summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.codecov.yml2
-rwxr-xr-x.devcontainer/postCreateCommand.sh20
-rw-r--r--.devcontainer/ubuntu20.04/devcontainer.json5
-rw-r--r--.devcontainer/ubuntu22.04/devcontainer.json5
-rw-r--r--.github/dependabot.yml11
-rw-r--r--.github/pull_request_template.md6
-rw-r--r--.github/workflows/audit.yaml51
-rwxr-xr-x.github/workflows/bin/bootstrap-test.sh (renamed from .github/workflows/bootstrap-test.sh)5
-rw-r--r--.github/workflows/bin/execute_installer.ps1 (renamed from .github/workflows/execute_installer.ps1)0
-rwxr-xr-x.github/workflows/bin/generate_spack_yaml_containerize.sh (renamed from .github/workflows/generate_spack_yaml_containerize.sh)0
-rw-r--r--.github/workflows/bin/setup_git.ps1 (renamed from .github/workflows/setup_git.ps1)0
-rwxr-xr-x.github/workflows/bin/setup_git.sh (renamed from .github/workflows/setup_git.sh)0
-rw-r--r--.github/workflows/bin/system_shortcut_check.ps1 (renamed from .github/workflows/system_shortcut_check.ps1)0
-rw-r--r--.github/workflows/bootstrap.yml367
-rw-r--r--.github/workflows/build-containers.yml48
-rw-r--r--.github/workflows/ci.yaml71
-rw-r--r--.github/workflows/coverage.yml35
-rwxr-xr-x.github/workflows/install_spack.sh8
-rw-r--r--.github/workflows/nightly-win-builds.yml4
-rw-r--r--.github/workflows/requirements/coverage/requirements.txt1
-rw-r--r--.github/workflows/requirements/style/requirements.txt7
-rw-r--r--.github/workflows/style/requirements.txt7
-rw-r--r--.github/workflows/unit_tests.yaml122
-rw-r--r--.github/workflows/valid-style.yml80
-rw-r--r--.github/workflows/windows_python.yml79
-rw-r--r--.readthedocs.yml23
-rw-r--r--CHANGELOG.md437
-rw-r--r--README.md15
-rwxr-xr-xbin/spack-python2
-rw-r--r--bin/spack.bat28
-rw-r--r--bin/spack.ps12
-rw-r--r--bin/spack_cmd.bat66
-rw-r--r--etc/spack/defaults/bootstrap.yaml10
-rw-r--r--etc/spack/defaults/concretizer.yaml25
-rw-r--r--etc/spack/defaults/config.yaml29
-rw-r--r--etc/spack/defaults/cray/modules.yaml16
-rw-r--r--etc/spack/defaults/darwin/packages.yaml1
-rw-r--r--etc/spack/defaults/packages.yaml26
-rw-r--r--etc/spack/defaults/windows/config.yaml1
-rw-r--r--lib/spack/docs/_templates/layout.html12
-rw-r--r--lib/spack/docs/basic_usage.rst274
-rw-r--r--lib/spack/docs/binary_caches.rst34
-rw-r--r--lib/spack/docs/bootstrapping.rst6
-rw-r--r--lib/spack/docs/build_settings.rst178
-rw-r--r--lib/spack/docs/build_systems/autotoolspackage.rst9
-rw-r--r--lib/spack/docs/build_systems/cmakepackage.rst2
-rw-r--r--lib/spack/docs/build_systems/custompackage.rst31
-rw-r--r--lib/spack/docs/build_systems/inteloneapipackage.rst2
-rw-r--r--lib/spack/docs/build_systems/makefilepackage.rst10
-rw-r--r--lib/spack/docs/build_systems/perlpackage.rst66
-rw-r--r--lib/spack/docs/build_systems/pythonpackage.rst42
-rw-r--r--lib/spack/docs/build_systems/sconspackage.rst6
-rw-r--r--lib/spack/docs/chain.rst12
-rw-r--r--lib/spack/docs/conf.py14
-rw-r--r--lib/spack/docs/config_yaml.rst19
-rw-r--r--lib/spack/docs/configuration.rst47
-rw-r--r--lib/spack/docs/containers.rst27
-rw-r--r--lib/spack/docs/contribution_guide.rst211
-rw-r--r--lib/spack/docs/developer_guide.rst345
-rw-r--r--lib/spack/docs/environments.rst631
-rw-r--r--lib/spack/docs/extensions.rst36
-rw-r--r--lib/spack/docs/getting_started.rst357
-rw-r--r--lib/spack/docs/images/pr-commit.pngbin44592 -> 0 bytes
-rw-r--r--lib/spack/docs/images/projects.pngbin69075 -> 0 bytes
-rw-r--r--lib/spack/docs/images/splices.pngbin0 -> 366972 bytes
-rw-r--r--lib/spack/docs/index.rst11
-rw-r--r--lib/spack/docs/module_file_support.rst420
-rw-r--r--lib/spack/docs/packages_yaml.rst61
-rw-r--r--lib/spack/docs/packaging_guide.rst997
-rw-r--r--lib/spack/docs/pipelines.rst270
-rw-r--r--lib/spack/docs/repositories.rst8
-rw-r--r--lib/spack/docs/requirements.txt22
-rwxr-xr-xlib/spack/env/cc377
-rw-r--r--lib/spack/external/__init__.py2
-rw-r--r--lib/spack/external/_vendoring/distro/distro.py24
-rw-r--r--lib/spack/external/_vendoring/jsonschema/_format.py173
-rw-r--r--lib/spack/external/_vendoring/ruamel/yaml/comments.py2
-rw-r--r--lib/spack/external/archspec/__init__.py3
-rw-r--r--lib/spack/external/archspec/__main__.py1
-rwxr-xr-xlib/spack/external/archspec/cli.py6
-rw-r--r--lib/spack/external/archspec/cpu/__init__.py19
-rw-r--r--lib/spack/external/archspec/cpu/detect.py420
-rw-r--r--lib/spack/external/archspec/cpu/microarchitecture.py130
-rw-r--r--lib/spack/external/archspec/cpu/schema.py68
-rw-r--r--lib/spack/external/archspec/json/README.md10
-rw-r--r--lib/spack/external/archspec/json/cpu/cpuid.json1050
-rw-r--r--lib/spack/external/archspec/json/cpu/cpuid_schema.json134
-rw-r--r--lib/spack/external/archspec/json/cpu/microarchitectures.json250
-rw-r--r--lib/spack/external/archspec/json/cpu/microarchitectures_schema.json5
-rw-r--r--lib/spack/external/archspec/vendor/cpuid/LICENSE20
-rw-r--r--lib/spack/external/archspec/vendor/cpuid/README.md76
-rw-r--r--lib/spack/external/archspec/vendor/cpuid/cpuid.py172
-rw-r--r--lib/spack/external/archspec/vendor/cpuid/example.py62
-rw-r--r--lib/spack/external/patches/distro.patch45
-rw-r--r--lib/spack/external/patches/jsonschema.patch188
-rw-r--r--lib/spack/external/patches/ruamelyaml.patch13
-rw-r--r--lib/spack/llnl/path.py12
-rw-r--r--lib/spack/llnl/string.py14
-rw-r--r--lib/spack/llnl/url.py10
-rw-r--r--lib/spack/llnl/util/filesystem.py758
-rw-r--r--lib/spack/llnl/util/lang.py275
-rw-r--r--lib/spack/llnl/util/link_tree.py109
-rw-r--r--lib/spack/llnl/util/lock.py4
-rw-r--r--lib/spack/llnl/util/symlink.py142
-rw-r--r--lib/spack/llnl/util/tty/__init__.py52
-rw-r--r--lib/spack/llnl/util/tty/colify.py1
-rw-r--r--lib/spack/llnl/util/tty/color.py153
-rw-r--r--lib/spack/llnl/util/tty/log.py172
-rw-r--r--lib/spack/spack/__init__.py65
-rw-r--r--lib/spack/spack/abi.py131
-rw-r--r--lib/spack/spack/audit.py828
-rw-r--r--lib/spack/spack/binary_distribution.py1714
-rw-r--r--lib/spack/spack/bootstrap/__init__.py12
-rw-r--r--lib/spack/spack/bootstrap/_common.py35
-rw-r--r--lib/spack/spack/bootstrap/clingo.py154
-rw-r--r--lib/spack/spack/bootstrap/config.py15
-rw-r--r--lib/spack/spack/bootstrap/core.py158
-rw-r--r--lib/spack/spack/bootstrap/environment.py68
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json1
-rw-r--r--lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json1
-rw-r--r--lib/spack/spack/bootstrap/status.py4
-rw-r--r--lib/spack/spack/build_environment.py598
-rw-r--r--lib/spack/spack/build_systems/_checks.py17
-rw-r--r--lib/spack/spack/build_systems/aspell_dict.py23
-rw-r--r--lib/spack/spack/build_systems/autotools.py298
-rw-r--r--lib/spack/spack/build_systems/cached_cmake.py69
-rw-r--r--lib/spack/spack/build_systems/cargo.py17
-rw-r--r--lib/spack/spack/build_systems/cmake.py517
-rw-r--r--lib/spack/spack/build_systems/compiler.py145
-rw-r--r--lib/spack/spack/build_systems/cuda.py63
-rw-r--r--lib/spack/spack/build_systems/generic.py9
-rw-r--r--lib/spack/spack/build_systems/go.py30
-rw-r--r--lib/spack/spack/build_systems/intel.py55
-rw-r--r--lib/spack/spack/build_systems/lua.py15
-rw-r--r--lib/spack/spack/build_systems/makefile.py49
-rw-r--r--lib/spack/spack/build_systems/maven.py4
-rw-r--r--lib/spack/spack/build_systems/meson.py55
-rw-r--r--lib/spack/spack/build_systems/msbuild.py12
-rw-r--r--lib/spack/spack/build_systems/nmake.py22
-rw-r--r--lib/spack/spack/build_systems/octave.py8
-rw-r--r--lib/spack/spack/build_systems/oneapi.py85
-rw-r--r--lib/spack/spack/build_systems/perl.py73
-rw-r--r--lib/spack/spack/build_systems/python.py146
-rw-r--r--lib/spack/spack/build_systems/qmake.py15
-rw-r--r--lib/spack/spack/build_systems/r.py27
-rw-r--r--lib/spack/spack/build_systems/racket.py2
-rw-r--r--lib/spack/spack/build_systems/rocm.py36
-rw-r--r--lib/spack/spack/build_systems/ruby.py13
-rw-r--r--lib/spack/spack/build_systems/scons.py16
-rw-r--r--lib/spack/spack/build_systems/sip.py23
-rw-r--r--lib/spack/spack/build_systems/waf.py15
-rw-r--r--lib/spack/spack/builder.py332
-rw-r--r--lib/spack/spack/caches.py28
-rw-r--r--lib/spack/spack/ci.py1177
-rw-r--r--lib/spack/spack/ci_needs_workaround.py36
-rw-r--r--lib/spack/spack/ci_optimization.py363
-rw-r--r--lib/spack/spack/cmd/__init__.py197
-rw-r--r--lib/spack/spack/cmd/arch.py19
-rw-r--r--lib/spack/spack/cmd/audit.py16
-rw-r--r--lib/spack/spack/cmd/bootstrap.py8
-rw-r--r--lib/spack/spack/cmd/buildcache.py712
-rw-r--r--lib/spack/spack/cmd/change.py1
-rw-r--r--lib/spack/spack/cmd/checksum.py49
-rw-r--r--lib/spack/spack/cmd/ci.py336
-rw-r--r--lib/spack/spack/cmd/clean.py8
-rw-r--r--lib/spack/spack/cmd/commands.py118
-rw-r--r--lib/spack/spack/cmd/common/arguments.py85
-rw-r--r--lib/spack/spack/cmd/common/confirmation.py1
-rw-r--r--lib/spack/spack/cmd/common/env_utility.py1
-rw-r--r--lib/spack/spack/cmd/compiler.py23
-rw-r--r--lib/spack/spack/cmd/concretize.py9
-rw-r--r--lib/spack/spack/cmd/config.py132
-rw-r--r--lib/spack/spack/cmd/create.py297
-rw-r--r--lib/spack/spack/cmd/debug.py12
-rw-r--r--lib/spack/spack/cmd/deconcretize.py2
-rw-r--r--lib/spack/spack/cmd/dependencies.py1
-rw-r--r--lib/spack/spack/cmd/dependents.py19
-rw-r--r--lib/spack/spack/cmd/deprecate.py27
-rw-r--r--lib/spack/spack/cmd/dev_build.py16
-rw-r--r--lib/spack/spack/cmd/develop.py43
-rw-r--r--lib/spack/spack/cmd/diff.py1
-rw-r--r--lib/spack/spack/cmd/edit.py119
-rw-r--r--lib/spack/spack/cmd/env.py646
-rw-r--r--lib/spack/spack/cmd/external.py34
-rw-r--r--lib/spack/spack/cmd/fetch.py8
-rw-r--r--lib/spack/spack/cmd/find.py253
-rw-r--r--lib/spack/spack/cmd/gc.py9
-rw-r--r--lib/spack/spack/cmd/gpg.py18
-rw-r--r--lib/spack/spack/cmd/graph.py36
-rw-r--r--lib/spack/spack/cmd/help.py7
-rw-r--r--lib/spack/spack/cmd/info.py98
-rw-r--r--lib/spack/spack/cmd/install.py36
-rw-r--r--lib/spack/spack/cmd/list.py24
-rw-r--r--lib/spack/spack/cmd/load.py20
-rw-r--r--lib/spack/spack/cmd/location.py1
-rw-r--r--lib/spack/spack/cmd/logs.py71
-rw-r--r--lib/spack/spack/cmd/mark.py22
-rw-r--r--lib/spack/spack/cmd/mirror.py303
-rw-r--r--lib/spack/spack/cmd/modules/__init__.py29
-rw-r--r--lib/spack/spack/cmd/modules/lmod.py1
-rw-r--r--lib/spack/spack/cmd/modules/tcl.py1
-rw-r--r--lib/spack/spack/cmd/patch.py9
-rw-r--r--lib/spack/spack/cmd/pkg.py5
-rw-r--r--lib/spack/spack/cmd/python.py61
-rw-r--r--lib/spack/spack/cmd/repo.py6
-rw-r--r--lib/spack/spack/cmd/restage.py1
-rw-r--r--lib/spack/spack/cmd/solve.py80
-rw-r--r--lib/spack/spack/cmd/spec.py71
-rw-r--r--lib/spack/spack/cmd/stage.py9
-rw-r--r--lib/spack/spack/cmd/style.py175
-rw-r--r--lib/spack/spack/cmd/tags.py2
-rw-r--r--lib/spack/spack/cmd/test.py7
-rw-r--r--lib/spack/spack/cmd/tutorial.py3
-rw-r--r--lib/spack/spack/cmd/undevelop.py1
-rw-r--r--lib/spack/spack/cmd/uninstall.py25
-rw-r--r--lib/spack/spack/cmd/unit_test.py21
-rw-r--r--lib/spack/spack/cmd/unload.py5
-rw-r--r--lib/spack/spack/cmd/url.py2
-rw-r--r--lib/spack/spack/cmd/verify.py1
-rw-r--r--lib/spack/spack/cmd/versions.py15
-rw-r--r--lib/spack/spack/cmd/view.py21
-rw-r--r--lib/spack/spack/compiler.py360
-rw-r--r--lib/spack/spack/compilers/__init__.py800
-rw-r--r--lib/spack/spack/compilers/aocc.py17
-rw-r--r--lib/spack/spack/compilers/apple_clang.py1
-rw-r--r--lib/spack/spack/compilers/arm.py20
-rw-r--r--lib/spack/spack/compilers/cce.py17
-rw-r--r--lib/spack/spack/compilers/clang.py44
-rw-r--r--lib/spack/spack/compilers/dpcpp.py34
-rw-r--r--lib/spack/spack/compilers/fj.py12
-rw-r--r--lib/spack/spack/compilers/gcc.py50
-rw-r--r--lib/spack/spack/compilers/intel.py33
-rw-r--r--lib/spack/spack/compilers/msvc.py200
-rw-r--r--lib/spack/spack/compilers/nag.py15
-rw-r--r--lib/spack/spack/compilers/nvhpc.py15
-rw-r--r--lib/spack/spack/compilers/oneapi.py57
-rw-r--r--lib/spack/spack/compilers/pgi.py92
-rw-r--r--lib/spack/spack/compilers/rocmcc.py23
-rw-r--r--lib/spack/spack/compilers/xl.py40
-rw-r--r--lib/spack/spack/compilers/xl_r.py12
-rw-r--r--lib/spack/spack/concretize.py951
-rw-r--r--lib/spack/spack/config.py566
-rw-r--r--lib/spack/spack/container/images.json97
-rw-r--r--lib/spack/spack/container/images.py5
-rw-r--r--lib/spack/spack/container/writers.py (renamed from lib/spack/spack/container/writers/__init__.py)57
-rw-r--r--lib/spack/spack/container/writers/docker.py34
-rw-r--r--lib/spack/spack/container/writers/singularity.py35
-rw-r--r--lib/spack/spack/cray_manifest.py8
-rw-r--r--lib/spack/spack/database.py909
-rw-r--r--lib/spack/spack/dependency.py9
-rw-r--r--lib/spack/spack/deptypes.py28
-rw-r--r--lib/spack/spack/detection/__init__.py4
-rw-r--r--lib/spack/spack/detection/common.py87
-rw-r--r--lib/spack/spack/detection/path.py124
-rw-r--r--lib/spack/spack/detection/test.py26
-rw-r--r--lib/spack/spack/directives.py660
-rw-r--r--lib/spack/spack/directives_meta.py237
-rw-r--r--lib/spack/spack/directory_layout.py160
-rw-r--r--lib/spack/spack/enums.py15
-rw-r--r--lib/spack/spack/environment/__init__.py130
-rw-r--r--lib/spack/spack/environment/depfile.py3
-rw-r--r--lib/spack/spack/environment/environment.py1464
-rw-r--r--lib/spack/spack/environment/shell.py2
-rw-r--r--lib/spack/spack/error.py67
-rw-r--r--lib/spack/spack/extensions.py57
-rw-r--r--lib/spack/spack/fetch_strategy.py511
-rw-r--r--lib/spack/spack/filesystem_view.py213
-rw-r--r--lib/spack/spack/graph.py8
-rw-r--r--lib/spack/spack/hash_types.py6
-rw-r--r--lib/spack/spack/hooks/__init__.py71
-rw-r--r--lib/spack/spack/hooks/absolutify_elf_sonames.py8
-rw-r--r--lib/spack/spack/hooks/autopush.py29
-rw-r--r--lib/spack/spack/hooks/drop_redundant_rpaths.py6
-rw-r--r--lib/spack/spack/hooks/module_file_generation.py13
-rw-r--r--lib/spack/spack/hooks/sbang.py2
-rw-r--r--lib/spack/spack/hooks/windows_runtime_linkage.py8
-rw-r--r--lib/spack/spack/install_test.py82
-rw-r--r--lib/spack/spack/installer.py1105
-rw-r--r--lib/spack/spack/main.py123
-rw-r--r--lib/spack/spack/mirror.py732
-rw-r--r--lib/spack/spack/mirrors/layout.py146
-rw-r--r--lib/spack/spack/mirrors/mirror.py470
-rw-r--r--lib/spack/spack/mirrors/utils.py262
-rw-r--r--lib/spack/spack/mixins.py4
-rw-r--r--lib/spack/spack/modules/__init__.py71
-rw-r--r--lib/spack/spack/modules/common.py173
-rw-r--r--lib/spack/spack/multimethod.py29
-rw-r--r--lib/spack/spack/oci/oci.py114
-rw-r--r--lib/spack/spack/oci/opener.py59
-rw-r--r--lib/spack/spack/operating_systems/__init__.py14
-rw-r--r--lib/spack/spack/operating_systems/cray_backend.py172
-rw-r--r--lib/spack/spack/operating_systems/cray_frontend.py105
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py1
-rwxr-xr-xlib/spack/spack/operating_systems/windows_os.py71
-rw-r--r--lib/spack/spack/package.py24
-rw-r--r--lib/spack/spack/package_base.py1064
-rw-r--r--lib/spack/spack/package_completions.py48
-rw-r--r--lib/spack/spack/package_prefs.py53
-rw-r--r--lib/spack/spack/parser.py68
-rw-r--r--lib/spack/spack/patch.py396
-rw-r--r--lib/spack/spack/paths.py13
-rw-r--r--lib/spack/spack/phase_callbacks.py105
-rw-r--r--lib/spack/spack/platforms/__init__.py13
-rw-r--r--lib/spack/spack/platforms/_functions.py18
-rw-r--r--lib/spack/spack/platforms/_platform.py8
-rw-r--r--lib/spack/spack/platforms/cray.py238
-rw-r--r--lib/spack/spack/platforms/darwin.py5
-rw-r--r--lib/spack/spack/platforms/freebsd.py4
-rw-r--r--lib/spack/spack/platforms/linux.py4
-rw-r--r--lib/spack/spack/platforms/test.py7
-rwxr-xr-xlib/spack/spack/platforms/windows.py5
-rw-r--r--lib/spack/spack/projections.py6
-rw-r--r--lib/spack/spack/provider_index.py4
-rw-r--r--lib/spack/spack/relocate.py153
-rw-r--r--lib/spack/spack/repo.py487
-rw-r--r--lib/spack/spack/report.py12
-rw-r--r--lib/spack/spack/reporters/cdash.py19
-rw-r--r--lib/spack/spack/reporters/extract.py34
-rw-r--r--lib/spack/spack/resource.py5
-rw-r--r--lib/spack/spack/rewiring.py31
-rw-r--r--lib/spack/spack/schema/__init__.py75
-rw-r--r--lib/spack/spack/schema/bootstrap.py5
-rw-r--r--lib/spack/spack/schema/buildcache_spec.py34
-rw-r--r--lib/spack/spack/schema/cdash.py5
-rw-r--r--lib/spack/spack/schema/ci.py145
-rw-r--r--lib/spack/spack/schema/compilers.py52
-rw-r--r--lib/spack/spack/schema/concretizer.py65
-rw-r--r--lib/spack/spack/schema/config.py31
-rw-r--r--lib/spack/spack/schema/container.py3
-rw-r--r--lib/spack/spack/schema/cray_manifest.py181
-rw-r--r--lib/spack/spack/schema/database_index.py58
-rw-r--r--lib/spack/spack/schema/definitions.py9
-rw-r--r--lib/spack/spack/schema/develop.py5
-rw-r--r--lib/spack/spack/schema/env.py88
-rw-r--r--lib/spack/spack/schema/environment.py3
-rw-r--r--lib/spack/spack/schema/gitlab_ci.py124
-rw-r--r--lib/spack/spack/schema/merged.py8
-rw-r--r--lib/spack/spack/schema/mirrors.py67
-rw-r--r--lib/spack/spack/schema/modules.py8
-rw-r--r--lib/spack/spack/schema/packages.py66
-rw-r--r--lib/spack/spack/schema/projections.py6
-rw-r--r--lib/spack/spack/schema/repos.py8
-rw-r--r--lib/spack/spack/schema/spec.py6
-rw-r--r--lib/spack/spack/schema/spec_list.py24
-rw-r--r--lib/spack/spack/schema/upstreams.py4
-rw-r--r--lib/spack/spack/schema/view.py50
-rw-r--r--lib/spack/spack/solver/asp.py2895
-rw-r--r--lib/spack/spack/solver/concretize.lp935
-rw-r--r--lib/spack/spack/solver/core.py299
-rw-r--r--lib/spack/spack/solver/counter.py17
-rw-r--r--lib/spack/spack/solver/display.lp6
-rw-r--r--lib/spack/spack/solver/error_messages.lp18
-rw-r--r--lib/spack/spack/solver/heuristic.lp45
-rw-r--r--lib/spack/spack/solver/heuristic_separate.lp24
-rw-r--r--lib/spack/spack/solver/libc_compatibility.lp43
-rw-r--r--lib/spack/spack/solver/os_compatibility.lp28
-rw-r--r--lib/spack/spack/solver/requirements.py232
-rw-r--r--lib/spack/spack/solver/splices.lp56
-rw-r--r--lib/spack/spack/solver/version_order.py21
-rw-r--r--lib/spack/spack/spec.py2559
-rw-r--r--lib/spack/spack/spec_list.py27
-rw-r--r--lib/spack/spack/stage.py555
-rw-r--r--lib/spack/spack/store.py28
-rw-r--r--lib/spack/spack/subprocess_context.py69
-rw-r--r--lib/spack/spack/tag.py3
-rw-r--r--lib/spack/spack/target.py155
-rw-r--r--lib/spack/spack/test/abi.py66
-rw-r--r--lib/spack/spack/test/abi_splicing.py247
-rw-r--r--lib/spack/spack/test/architecture.py121
-rw-r--r--lib/spack/spack/test/audit.py15
-rw-r--r--lib/spack/spack/test/bindist.py355
-rw-r--r--lib/spack/spack/test/bootstrap.py23
-rw-r--r--lib/spack/spack/test/build_distribution.py65
-rw-r--r--lib/spack/spack/test/build_environment.py211
-rw-r--r--lib/spack/spack/test/build_system_guess.py4
-rw-r--r--lib/spack/spack/test/build_systems.py67
-rw-r--r--lib/spack/spack/test/builder.py20
-rw-r--r--lib/spack/spack/test/buildtask.py44
-rw-r--r--lib/spack/spack/test/cc.py181
-rw-r--r--lib/spack/spack/test/ci.py181
-rw-r--r--lib/spack/spack/test/cmd/blame.py6
-rw-r--r--lib/spack/spack/test/cmd/bootstrap.py9
-rw-r--r--lib/spack/spack/test/cmd/buildcache.py191
-rw-r--r--lib/spack/spack/test/cmd/checksum.py88
-rw-r--r--lib/spack/spack/test/cmd/ci.py2041
-rw-r--r--lib/spack/spack/test/cmd/clean.py16
-rw-r--r--lib/spack/spack/test/cmd/commands.py18
-rw-r--r--lib/spack/spack/test/cmd/common/arguments.py38
-rw-r--r--lib/spack/spack/test/cmd/compiler.py118
-rw-r--r--lib/spack/spack/test/cmd/concretize.py6
-rw-r--r--lib/spack/spack/test/cmd/config.py8
-rw-r--r--lib/spack/spack/test/cmd/create.py54
-rw-r--r--lib/spack/spack/test/cmd/debug.py10
-rw-r--r--lib/spack/spack/test/cmd/deconcretize.py26
-rw-r--r--lib/spack/spack/test/cmd/deprecate.py48
-rw-r--r--lib/spack/spack/test/cmd/dev_build.py56
-rw-r--r--lib/spack/spack/test/cmd/develop.py40
-rw-r--r--lib/spack/spack/test/cmd/diff.py17
-rw-r--r--lib/spack/spack/test/cmd/edit.py45
-rw-r--r--lib/spack/spack/test/cmd/env.py1483
-rw-r--r--lib/spack/spack/test/cmd/extensions.py22
-rw-r--r--lib/spack/spack/test/cmd/external.py102
-rw-r--r--lib/spack/spack/test/cmd/fetch.py4
-rw-r--r--lib/spack/spack/test/cmd/find.py246
-rw-r--r--lib/spack/spack/test/cmd/gc.py95
-rw-r--r--lib/spack/spack/test/cmd/gpg.py1
-rw-r--r--lib/spack/spack/test/cmd/help.py16
-rw-r--r--lib/spack/spack/test/cmd/info.py4
-rw-r--r--lib/spack/spack/test/cmd/init_py_functions.py103
-rw-r--r--lib/spack/spack/test/cmd/install.py375
-rw-r--r--lib/spack/spack/test/cmd/is_git_repo.py2
-rw-r--r--lib/spack/spack/test/cmd/list.py17
-rw-r--r--lib/spack/spack/test/cmd/load.py187
-rw-r--r--lib/spack/spack/test/cmd/location.py11
-rw-r--r--lib/spack/spack/test/cmd/logs.py122
-rw-r--r--lib/spack/spack/test/cmd/maintainers.py16
-rw-r--r--lib/spack/spack/test/cmd/mirror.py196
-rw-r--r--lib/spack/spack/test/cmd/module.py16
-rw-r--r--lib/spack/spack/test/cmd/pkg.py132
-rw-r--r--lib/spack/spack/test/cmd/providers.py3
-rw-r--r--lib/spack/spack/test/cmd/reindex.py48
-rw-r--r--lib/spack/spack/test/cmd/spec.py53
-rw-r--r--lib/spack/spack/test/cmd/stage.py7
-rw-r--r--lib/spack/spack/test/cmd/style.py149
-rw-r--r--lib/spack/spack/test/cmd/tags.py3
-rw-r--r--lib/spack/spack/test/cmd/test.py58
-rw-r--r--lib/spack/spack/test/cmd/undevelop.py6
-rw-r--r--lib/spack/spack/test/cmd/uninstall.py10
-rw-r--r--lib/spack/spack/test/cmd/url.py12
-rw-r--r--lib/spack/spack/test/cmd/verify.py4
-rw-r--r--lib/spack/spack/test/cmd/versions.py7
-rw-r--r--lib/spack/spack/test/cmd/view.py57
-rw-r--r--lib/spack/spack/test/cmd_extensions.py14
-rw-r--r--lib/spack/spack/test/compilers/basics.py381
-rw-r--r--lib/spack/spack/test/compilers/detection.py518
-rw-r--r--lib/spack/spack/test/concretization/compiler_runtimes.py161
-rw-r--r--lib/spack/spack/test/concretization/core.py (renamed from lib/spack/spack/test/concretize.py)1338
-rw-r--r--lib/spack/spack/test/concretization/errors.py (renamed from lib/spack/spack/test/concretize_errors.py)6
-rw-r--r--lib/spack/spack/test/concretization/flag_mixing.py252
-rw-r--r--lib/spack/spack/test/concretization/preferences.py (renamed from lib/spack/spack/test/concretize_preferences.py)67
-rw-r--r--lib/spack/spack/test/concretization/requirements.py (renamed from lib/spack/spack/test/concretize_requirements.py)369
-rw-r--r--lib/spack/spack/test/concretize_compiler_runtimes.py42
-rw-r--r--lib/spack/spack/test/config.py179
-rw-r--r--lib/spack/spack/test/conftest.py362
-rw-r--r--lib/spack/spack/test/container/cli.py4
-rw-r--r--lib/spack/spack/test/container/conftest.py2
-rw-r--r--lib/spack/spack/test/container/docker.py4
-rw-r--r--lib/spack/spack/test/container/images.py7
-rw-r--r--lib/spack/spack/test/cray_manifest.py4
-rw-r--r--lib/spack/spack/test/data/compiler_verbose_output/pgcc-16.3.txt11
-rw-r--r--lib/spack/spack/test/data/config/bootstrap.yaml2
-rw-r--r--lib/spack/spack/test/data/config/compilers.yaml342
-rw-r--r--lib/spack/spack/test/data/config/concretizer.yaml2
-rw-r--r--lib/spack/spack/test/data/config/config.yaml4
-rw-r--r--lib/spack/spack/test/data/config/modules.yaml46
-rw-r--r--lib/spack/spack/test/data/config/packages.yaml3
-rw-r--r--lib/spack/spack/test/data/modules/lmod/complex_hierarchy.yaml2
-rw-r--r--lib/spack/spack/test/data/modules/lmod/core_compilers.yaml2
-rw-r--r--lib/spack/spack/test/data/modules/lmod/core_compilers_at_equal.yaml2
-rw-r--r--lib/spack/spack/test/data/modules/tcl/suffix-format.yaml9
-rw-r--r--lib/spack/spack/test/data/unparse/legion.txt45
-rw-r--r--lib/spack/spack/test/data/unparse/mfem.txt44
-rw-r--r--lib/spack/spack/test/data/unparse/py-torch.txt2
-rw-r--r--lib/spack/spack/test/data/web/index_with_javascript.html10
-rw-r--r--lib/spack/spack/test/database.py338
-rw-r--r--lib/spack/spack/test/detection.py34
-rw-r--r--lib/spack/spack/test/directives.py108
-rw-r--r--lib/spack/spack/test/directory_layout.py9
-rw-r--r--lib/spack/spack/test/entry_points.py114
-rw-r--r--lib/spack/spack/test/env.py152
-rw-r--r--lib/spack/spack/test/flag_handlers.py1
-rw-r--r--lib/spack/spack/test/gcs_fetch.py53
-rw-r--r--lib/spack/spack/test/git_fetch.py65
-rw-r--r--lib/spack/spack/test/graph.py41
-rw-r--r--lib/spack/spack/test/hg_fetch.py1
-rw-r--r--lib/spack/spack/test/install.py215
-rw-r--r--lib/spack/spack/test/installer.py634
-rw-r--r--lib/spack/spack/test/link_paths.py11
-rw-r--r--lib/spack/spack/test/llnl/url.py11
-rw-r--r--lib/spack/spack/test/llnl/util/file_list.py32
-rw-r--r--lib/spack/spack/test/llnl/util/filesystem.py450
-rw-r--r--lib/spack/spack/test/llnl/util/lang.py53
-rw-r--r--lib/spack/spack/test/llnl/util/link_tree.py58
-rw-r--r--lib/spack/spack/test/llnl/util/symlink.py47
-rw-r--r--lib/spack/spack/test/llnl/util/tty/log.py360
-rw-r--r--lib/spack/spack/test/main.py15
-rw-r--r--lib/spack/spack/test/make_executable.py5
-rw-r--r--lib/spack/spack/test/mirror.py198
-rw-r--r--lib/spack/spack/test/modules/common.py20
-rw-r--r--lib/spack/spack/test/modules/conftest.py12
-rw-r--r--lib/spack/spack/test/modules/lmod.py40
-rw-r--r--lib/spack/spack/test/modules/tcl.py50
-rw-r--r--lib/spack/spack/test/multimethod.py15
-rw-r--r--lib/spack/spack/test/oci/integration_test.py211
-rw-r--r--lib/spack/spack/test/oci/mock_registry.py47
-rw-r--r--lib/spack/spack/test/oci/urlopen.py46
-rw-r--r--lib/spack/spack/test/operating_system.py77
-rw-r--r--lib/spack/spack/test/optional_deps.py60
-rw-r--r--lib/spack/spack/test/package_class.py91
-rw-r--r--lib/spack/spack/test/packages.py36
-rw-r--r--lib/spack/spack/test/packaging.py87
-rw-r--r--lib/spack/spack/test/patch.py97
-rw-r--r--lib/spack/spack/test/projections.py19
-rw-r--r--lib/spack/spack/test/relocate.py34
-rw-r--r--lib/spack/spack/test/repo.py181
-rw-r--r--lib/spack/spack/test/reporters.py49
-rw-r--r--lib/spack/spack/test/rewiring.py61
-rw-r--r--lib/spack/spack/test/s3_fetch.py53
-rw-r--r--lib/spack/spack/test/sbang.py2
-rw-r--r--lib/spack/spack/test/schema.py20
-rw-r--r--lib/spack/spack/test/solver/intermediate.py50
-rw-r--r--lib/spack/spack/test/spack_yaml.py4
-rw-r--r--lib/spack/spack/test/spec_dag.py516
-rw-r--r--lib/spack/spack/test/spec_list.py40
-rw-r--r--lib/spack/spack/test/spec_semantics.py721
-rw-r--r--lib/spack/spack/test/spec_syntax.py154
-rw-r--r--lib/spack/spack/test/spec_yaml.py116
-rw-r--r--lib/spack/spack/test/stage.py170
-rw-r--r--lib/spack/spack/test/svn_fetch.py1
-rw-r--r--lib/spack/spack/test/tag.py4
-rw-r--r--lib/spack/spack/test/test_suite.py42
-rw-r--r--lib/spack/spack/test/traverse.py122
-rw-r--r--lib/spack/spack/test/url_fetch.py206
-rw-r--r--lib/spack/spack/test/url_parse.py7
-rw-r--r--lib/spack/spack/test/util/archive.py157
-rw-r--r--lib/spack/spack/test/util/compression.py49
-rw-r--r--lib/spack/spack/test/util/elf.py50
-rw-r--r--lib/spack/spack/test/util/environment.py29
-rw-r--r--lib/spack/spack/test/util/executable.py1
-rw-r--r--lib/spack/spack/test/util/file_cache.py10
-rw-r--r--lib/spack/spack/test/util/libc.py26
-rw-r--r--lib/spack/spack/test/util/package_hash.py15
-rw-r--r--lib/spack/spack/test/util/path.py11
-rw-r--r--lib/spack/spack/test/util/spack_lock_wrapper.py2
-rw-r--r--lib/spack/spack/test/util/util_url.py234
-rw-r--r--lib/spack/spack/test/utilities.py32
-rw-r--r--lib/spack/spack/test/variant.py226
-rw-r--r--lib/spack/spack/test/versions.py94
-rw-r--r--lib/spack/spack/test/views.py8
-rw-r--r--lib/spack/spack/test/web.py90
-rw-r--r--lib/spack/spack/traverse.py206
-rw-r--r--lib/spack/spack/url.py48
-rw-r--r--lib/spack/spack/user_environment.py28
-rw-r--r--lib/spack/spack/util/archive.py230
-rw-r--r--lib/spack/spack/util/classes.py35
-rw-r--r--lib/spack/spack/util/compression.py595
-rw-r--r--lib/spack/spack/util/cpus.py36
-rw-r--r--lib/spack/spack/util/elf.py476
-rw-r--r--lib/spack/spack/util/environment.py76
-rw-r--r--lib/spack/spack/util/executable.py35
-rw-r--r--lib/spack/spack/util/file_cache.py88
-rw-r--r--lib/spack/spack/util/filesystem.py104
-rw-r--r--lib/spack/spack/util/format.py12
-rw-r--r--lib/spack/spack/util/gpg.py18
-rw-r--r--lib/spack/spack/util/libc.py214
-rw-r--r--lib/spack/spack/util/lock.py1
-rw-r--r--lib/spack/spack/util/package_hash.py6
-rw-r--r--lib/spack/spack/util/parallel.py29
-rw-r--r--lib/spack/spack/util/path.py50
-rw-r--r--lib/spack/spack/util/s3.py29
-rw-r--r--lib/spack/spack/util/spack_yaml.py48
-rw-r--r--lib/spack/spack/util/unparse/unparser.py2
-rw-r--r--lib/spack/spack/util/url.py245
-rw-r--r--lib/spack/spack/util/web.py169
-rw-r--r--lib/spack/spack/util/windows_registry.py175
-rw-r--r--lib/spack/spack/variant.py614
-rw-r--r--lib/spack/spack/verify.py6
-rw-r--r--lib/spack/spack/version/__init__.py32
-rw-r--r--lib/spack/spack/version/common.py8
-rw-r--r--lib/spack/spack/version/git_ref_lookup.py3
-rw-r--r--lib/spack/spack/version/version_types.py694
-rw-r--r--pyproject.toml25
-rw-r--r--pytest.ini5
-rw-r--r--share/spack/bootstrap/github-actions-v0.4/clingo.json334
-rw-r--r--share/spack/bootstrap/github-actions-v0.4/gnupg.json254
-rw-r--r--share/spack/bootstrap/github-actions-v0.4/patchelf.json34
-rw-r--r--share/spack/bootstrap/github-actions-v0.6/clingo.json384
-rw-r--r--share/spack/bootstrap/github-actions-v0.6/gnupg.json269
-rw-r--r--share/spack/bootstrap/github-actions-v0.6/metadata.yaml (renamed from share/spack/bootstrap/github-actions-v0.4/metadata.yaml)4
-rw-r--r--share/spack/bootstrap/github-actions-v0.6/patchelf.json49
-rw-r--r--share/spack/csh/pathadd.csh4
-rw-r--r--share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml523
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/ci.yaml25
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/concretizer.yaml1
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/config.yaml1
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml1
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/darwin/ci.yaml2
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml250
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_n1/ci.yaml7
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v1/ci.yaml3
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v2/ci.yaml7
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/ppc64le/concretizer.yaml3
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/skylake_avx512/ci.yaml11
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v3/concretizer.yaml3
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/ci.yaml (renamed from share/spack/gitlab/cloud_pipelines/configs/linux/icelake/ci.yaml)3
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/concretizer.yaml3
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml18
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml10
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/win64/packages.yaml25
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/ci.yaml4
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/packages.yaml3
-rw-r--r--share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py6
-rw-r--r--share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py10
-rwxr-xr-xshare/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh112
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml34
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml32
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml56
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml58
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml67
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml46
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml56
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/packages.yaml143
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml45
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml33
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml35
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml42
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml89
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/developer-tools-darwin/spack.yaml75
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml100
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/developer-tools/spack.yaml69
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml24
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml10
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml235
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml175
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml128
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml68
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml235
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml197
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml4
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml12
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cpu/spack.yaml85
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cuda/spack.yaml91
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml16
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml23
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml34
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml6
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml2
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml12
-rw-r--r--share/spack/gitlab/nersc_pipeline.yml9
-rw-r--r--share/spack/qa/bootstrap-file.py4
-rw-r--r--share/spack/qa/config_state.py36
-rwxr-xr-xshare/spack/qa/run-unit-tests13
-rwxr-xr-xshare/spack/qa/setup-env-test.sh17
-rw-r--r--share/spack/qa/validate_last_exit.ps12
-rw-r--r--share/spack/setup-env.bat77
-rw-r--r--[-rwxr-xr-x]share/spack/setup-env.csh53
-rw-r--r--[-rwxr-xr-x]share/spack/setup-env.fish4
-rw-r--r--share/spack/setup-env.ps11
-rw-r--r--[-rwxr-xr-x]share/spack/setup-env.sh4
-rw-r--r--[-rwxr-xr-x]share/spack/setup-tutorial-env.sh0
-rw-r--r--[-rwxr-xr-x]share/spack/spack-completion.bash152
-rw-r--r--[-rwxr-xr-x]share/spack/spack-completion.fish518
-rw-r--r--share/spack/templates/container/Dockerfile5
-rw-r--r--share/spack/templates/container/bootstrap-base.dockerfile2
-rw-r--r--share/spack/templates/container/centos_7.dockerfile28
-rw-r--r--share/spack/templates/container/centos_stream9.dockerfile (renamed from share/spack/templates/container/centos_stream.dockerfile)6
-rw-r--r--share/spack/templates/container/fedora.dockerfile (renamed from share/spack/templates/container/fedora_38.dockerfile)0
-rw-r--r--share/spack/templates/container/fedora_37.dockerfile29
-rw-r--r--share/spack/templates/container/ubuntu_2404.dockerfile33
-rw-r--r--share/spack/templates/depfile/Makefile2
-rw-r--r--share/spack/templates/mock-repository/package.pyt2
-rw-r--r--share/spack/templates/modules/modulefile.tcl2
-rw-r--r--var/spack/repos/builder.test/packages/builder-and-mixins/package.py32
-rw-r--r--var/spack/repos/builtin.mock/packages/7zip/package.py14
-rw-r--r--var/spack/repos/builtin.mock/packages/attributes-foo/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/depb/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/dependency-mv/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/depends-on-manyvariants/package.py25
-rw-r--r--var/spack/repos/builtin.mock/packages/depends-on-virtual-with-abi/package.py19
-rw-r--r--var/spack/repos/builtin.mock/packages/deprecated-client/package.py16
-rw-r--r--var/spack/repos/builtin.mock/packages/deprecated-versions/package.py8
-rw-r--r--var/spack/repos/builtin.mock/packages/direct-dep-foo-bar/package.py22
-rw-r--r--var/spack/repos/builtin.mock/packages/dla-future/package.py21
-rw-r--r--var/spack/repos/builtin.mock/packages/dtbuild1/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/dtbuild2/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/fail-test-audit-deprecated/package.py32
-rw-r--r--var/spack/repos/builtin.mock/packages/fail-test-audit-docstring/package.py24
-rw-r--r--var/spack/repos/builtin.mock/packages/fail-test-audit-impl/package.py21
-rw-r--r--var/spack/repos/builtin.mock/packages/fail-test-audit/package.py15
-rw-r--r--var/spack/repos/builtin.mock/packages/find-externals1/package.py9
-rw-r--r--var/spack/repos/builtin.mock/packages/forward-multi-value/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/gcc/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/git-ref-package/package.py41
-rw-r--r--var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py17
-rw-r--r--var/spack/repos/builtin.mock/packages/glibc/package.py21
-rw-r--r--var/spack/repos/builtin.mock/packages/gmake/package.py1
-rw-r--r--var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py15
-rw-r--r--var/spack/repos/builtin.mock/packages/invalid-github-pull-commits-patch-url/package.py20
-rw-r--r--var/spack/repos/builtin.mock/packages/llvm/package.py30
-rw-r--r--var/spack/repos/builtin.mock/packages/manyvariants/package.py33
-rw-r--r--var/spack/repos/builtin.mock/packages/missing-dependency/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/mpich/package.py1
-rw-r--r--var/spack/repos/builtin.mock/packages/multivalue-variant/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/no-redistribute-dependent/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/no-redistribute/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/openblas/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/optional-dep-test/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/parent-foo-bar-fee/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py1
-rw-r--r--var/spack/repos/builtin.mock/packages/perl/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/pkg-a/package.py (renamed from var/spack/repos/builtin.mock/packages/a/package.py)12
-rw-r--r--var/spack/repos/builtin.mock/packages/pkg-b/package.py (renamed from var/spack/repos/builtin.mock/packages/b/package.py)2
-rw-r--r--var/spack/repos/builtin.mock/packages/pkg-c/package.py (renamed from var/spack/repos/builtin.mock/packages/c/package.py)2
-rw-r--r--var/spack/repos/builtin.mock/packages/pkg-e/package.py (renamed from var/spack/repos/builtin.mock/packages/e/package.py)2
-rw-r--r--var/spack/repos/builtin.mock/packages/preferred-test/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/py-test-callback/package.py30
-rw-r--r--var/spack/repos/builtin.mock/packages/python-venv/package.py21
-rw-r--r--var/spack/repos/builtin.mock/packages/quux/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/second-dependency-foo-bar-fee/package.py21
-rw-r--r--var/spack/repos/builtin.mock/packages/sombrero/package.py16
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-depends-on-t/package.py22
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-h/package.py9
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-vt/package.py24
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-z/package.py8
-rw-r--r--var/spack/repos/builtin.mock/packages/sticky-variant-dependent/package.py17
-rw-r--r--var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/trivial-smoke-test/package.py6
-rw-r--r--var/spack/repos/builtin.mock/packages/url-list-test/package.py5
-rw-r--r--var/spack/repos/builtin.mock/packages/variant-values-override/package.py12
-rw-r--r--var/spack/repos/builtin.mock/packages/variant-values/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/vendorsb/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/view-dir/package.py (renamed from var/spack/repos/builtin.mock/packages/view-dir-dir/package.py)6
-rw-r--r--var/spack/repos/builtin.mock/packages/view-file/package.py (renamed from var/spack/repos/builtin.mock/packages/view-dir-file/package.py)6
-rw-r--r--var/spack/repos/builtin.mock/packages/view-ignore-conflict/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/view-resolve-conflict-middle/package.py23
-rw-r--r--var/spack/repos/builtin.mock/packages/view-resolve-conflict-top/package.py26
-rw-r--r--var/spack/repos/builtin.mock/packages/view-symlinked-dir/package.py (renamed from var/spack/repos/builtin.mock/packages/view-dir-symlinked-dir/package.py)6
-rw-r--r--var/spack/repos/builtin.mock/packages/virtual-abi-1/package.py25
-rw-r--r--var/spack/repos/builtin.mock/packages/virtual-abi-2/package.py25
-rw-r--r--var/spack/repos/builtin.mock/packages/virtual-abi-multi/package.py29
-rw-r--r--var/spack/repos/builtin.mock/packages/virtual-with-abi/package.py16
-rw-r--r--var/spack/repos/builtin.mock/packages/when-directives-false/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/when-directives-true/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/with-constraint-met/package.py6
-rw-r--r--var/spack/repos/builtin.mock/packages/wrong-variant-in-depends-on/package.py2
-rw-r--r--var/spack/repos/builtin/packages/3dtk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/3proxy/package.py14
-rw-r--r--var/spack/repos/builtin/packages/7zip/package.py6
-rw-r--r--var/spack/repos/builtin/packages/abacus/package.py5
-rw-r--r--var/spack/repos/builtin/packages/abduco/package.py2
-rw-r--r--var/spack/repos/builtin/packages/abinit/package.py80
-rw-r--r--var/spack/repos/builtin/packages/abseil-cpp/package.py33
-rw-r--r--var/spack/repos/builtin/packages/abyss/package.py4
-rw-r--r--var/spack/repos/builtin/packages/accfft/package.py4
-rw-r--r--var/spack/repos/builtin/packages/acct/package.py3
-rw-r--r--var/spack/repos/builtin/packages/accumulo/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ace/package.py5
-rw-r--r--var/spack/repos/builtin/packages/acfl/detection_test.yaml83
-rw-r--r--var/spack/repos/builtin/packages/acfl/package.py224
-rw-r--r--var/spack/repos/builtin/packages/acl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/acpica-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/acpid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/activeharmony/package.py8
-rw-r--r--var/spack/repos/builtin/packages/activemq/package.py14
-rw-r--r--var/spack/repos/builtin/packages/acts-algebra-plugins/package.py69
-rw-r--r--var/spack/repos/builtin/packages/acts-dd4hep/package.py4
-rw-r--r--var/spack/repos/builtin/packages/acts/package.py163
-rw-r--r--var/spack/repos/builtin/packages/actsvg/package.py20
-rw-r--r--var/spack/repos/builtin/packages/additivefoam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/addrwatch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/adept-utils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/adept/package.py48
-rw-r--r--var/spack/repos/builtin/packages/adiak/package.py7
-rw-r--r--var/spack/repos/builtin/packages/adios/package.py8
-rw-r--r--var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch28
-rw-r--r--var/spack/repos/builtin/packages/adios2/2.7-fix-missing-cstdint-include.patch24
-rw-r--r--var/spack/repos/builtin/packages/adios2/package.py101
-rw-r--r--var/spack/repos/builtin/packages/adlbx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/admixtools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/adms/package.py2
-rw-r--r--var/spack/repos/builtin/packages/adol-c/package.py22
-rw-r--r--var/spack/repos/builtin/packages/advancecomp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aegean/package.py3
-rw-r--r--var/spack/repos/builtin/packages/aeskeyfind/package.py2
-rw-r--r--var/spack/repos/builtin/packages/aespipe/package.py4
-rw-r--r--var/spack/repos/builtin/packages/agile/package.py4
-rw-r--r--var/spack/repos/builtin/packages/agrep/package.py2
-rw-r--r--var/spack/repos/builtin/packages/akantu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/albany/package.py4
-rw-r--r--var/spack/repos/builtin/packages/albert/package.py2
-rw-r--r--var/spack/repos/builtin/packages/alembic/package.py3
-rw-r--r--var/spack/repos/builtin/packages/alglib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/all-library/package.py58
-rw-r--r--var/spack/repos/builtin/packages/allpaths-lg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/alluxio/package.py1
-rw-r--r--var/spack/repos/builtin/packages/alpaka/package.py99
-rw-r--r--var/spack/repos/builtin/packages/alquimia/package.py8
-rw-r--r--var/spack/repos/builtin/packages/alsa-lib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/aluminum/package.py3
-rw-r--r--var/spack/repos/builtin/packages/amber/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ambertools/package.py88
-rw-r--r--var/spack/repos/builtin/packages/amd-aocl/package.py33
-rw-r--r--var/spack/repos/builtin/packages/amdblis/blis-4.0_gcc_clang_znver4.patch55
-rw-r--r--var/spack/repos/builtin/packages/amdblis/package.py54
-rw-r--r--var/spack/repos/builtin/packages/amdfftw/amdfftw40-clang.patch11
-rw-r--r--var/spack/repos/builtin/packages/amdfftw/package.py50
-rw-r--r--var/spack/repos/builtin/packages/amdlibflame/libflame-pkgconfig.patch29
-rw-r--r--var/spack/repos/builtin/packages/amdlibflame/package.py162
-rw-r--r--var/spack/repos/builtin/packages/amdlibm/libm-ose-SconsSpack.patch10
-rw-r--r--var/spack/repos/builtin/packages/amdlibm/package.py53
-rw-r--r--var/spack/repos/builtin/packages/amdscalapack/clang-hollerith.patch1459
-rw-r--r--var/spack/repos/builtin/packages/amdscalapack/package.py64
-rw-r--r--var/spack/repos/builtin/packages/amdsmi/package.py16
-rw-r--r--var/spack/repos/builtin/packages/amduprof/package.py46
-rw-r--r--var/spack/repos/builtin/packages/amg2013/package.py8
-rw-r--r--var/spack/repos/builtin/packages/amg2023/package.py2
-rw-r--r--var/spack/repos/builtin/packages/amgx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/aml/package.py4
-rw-r--r--var/spack/repos/builtin/packages/amp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ampliconnoise/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ampt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/amqp-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/amr-wind/package.py139
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py98
-rw-r--r--var/spack/repos/builtin/packages/amrfinder/package.py3
-rw-r--r--var/spack/repos/builtin/packages/amrvis/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ams/package.py23
-rw-r--r--var/spack/repos/builtin/packages/andi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/angsd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ant/package.py1
-rw-r--r--var/spack/repos/builtin/packages/antimony/package.py2
-rw-r--r--var/spack/repos/builtin/packages/antlr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/antlr4-complete/package.py63
-rw-r--r--var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py41
-rw-r--r--var/spack/repos/builtin/packages/ants/package.py3
-rw-r--r--var/spack/repos/builtin/packages/aocc/detection_test.yaml75
-rw-r--r--var/spack/repos/builtin/packages/aocc/package.py23
-rw-r--r--var/spack/repos/builtin/packages/aocl-compression/package.py109
-rw-r--r--var/spack/repos/builtin/packages/aocl-crypto/lsb_release.patch153
-rw-r--r--var/spack/repos/builtin/packages/aocl-crypto/package.py104
-rw-r--r--var/spack/repos/builtin/packages/aocl-da/0001-Fix-to-enable-cmake-to-be-configured-with-examples-o.patch27
-rw-r--r--var/spack/repos/builtin/packages/aocl-da/package.py130
-rw-r--r--var/spack/repos/builtin/packages/aocl-libmem/cmake.patch46
-rw-r--r--var/spack/repos/builtin/packages/aocl-libmem/package.py90
-rw-r--r--var/spack/repos/builtin/packages/aocl-sparse/package.py70
-rw-r--r--var/spack/repos/builtin/packages/aocl-utils/package.py57
-rw-r--r--var/spack/repos/builtin/packages/aoflagger/package.py2
-rw-r--r--var/spack/repos/builtin/packages/aom/package.py3
-rw-r--r--var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch41
-rw-r--r--var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names.patch41
-rw-r--r--var/spack/repos/builtin/packages/aomp/0001-Add-cmake-option-for-copying-source-for-debugging.patch28
-rw-r--r--var/spack/repos/builtin/packages/aomp/package.py528
-rw-r--r--var/spack/repos/builtin/packages/apache-tvm/package.py38
-rw-r--r--var/spack/repos/builtin/packages/apachetop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/apcomp/package.py38
-rw-r--r--var/spack/repos/builtin/packages/ape/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aperture-photometry/package.py2
-rw-r--r--var/spack/repos/builtin/packages/apex/package.py46
-rw-r--r--var/spack/repos/builtin/packages/apfel/package.py37
-rw-r--r--var/spack/repos/builtin/packages/apple-clang/detection_test.yaml81
-rw-r--r--var/spack/repos/builtin/packages/apple-clang/package.py45
-rw-r--r--var/spack/repos/builtin/packages/apple-gl/package.py35
-rw-r--r--var/spack/repos/builtin/packages/apple-glu/package.py43
-rw-r--r--var/spack/repos/builtin/packages/apple-libunwind/package.py1
-rw-r--r--var/spack/repos/builtin/packages/apple-libuuid/package.py1
-rw-r--r--var/spack/repos/builtin/packages/appres/package.py6
-rw-r--r--var/spack/repos/builtin/packages/apptainer/package.py34
-rw-r--r--var/spack/repos/builtin/packages/apr-util/package.py12
-rw-r--r--var/spack/repos/builtin/packages/apr/package.py22
-rw-r--r--var/spack/repos/builtin/packages/aqlprofile/package.py267
-rw-r--r--var/spack/repos/builtin/packages/arbor/package.py27
-rw-r--r--var/spack/repos/builtin/packages/arborx/0001-update-major-version-required-for-rocm-6.0.patch24
-rw-r--r--var/spack/repos/builtin/packages/arborx/package.py65
-rw-r--r--var/spack/repos/builtin/packages/arc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/archer/package.py5
-rw-r--r--var/spack/repos/builtin/packages/argobots/package.py19
-rw-r--r--var/spack/repos/builtin/packages/argon2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/argp-standalone/package.py2
-rw-r--r--var/spack/repos/builtin/packages/args/package.py2
-rw-r--r--var/spack/repos/builtin/packages/argtable/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aria2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/arm-forge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py18
-rw-r--r--var/spack/repos/builtin/packages/armcimpi/package.py51
-rw-r--r--var/spack/repos/builtin/packages/armpl-gcc/package.py132
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/package.py15
-rw-r--r--var/spack/repos/builtin/packages/arrayfire/package.py5
-rw-r--r--var/spack/repos/builtin/packages/arrow/package.py19
-rw-r--r--var/spack/repos/builtin/packages/asagi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py139
-rw-r--r--var/spack/repos/builtin/packages/asciidoc/package.py18
-rw-r--r--var/spack/repos/builtin/packages/asdcplib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/asdf-cxx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/asio/package.py14
-rw-r--r--var/spack/repos/builtin/packages/aspa/package.py2
-rw-r--r--var/spack/repos/builtin/packages/aspcud/package.py3
-rw-r--r--var/spack/repos/builtin/packages/aspect/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aspell/package.py13
-rw-r--r--var/spack/repos/builtin/packages/aspell6-de/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aspell6-en/package.py3
-rw-r--r--var/spack/repos/builtin/packages/assimp/package.py28
-rw-r--r--var/spack/repos/builtin/packages/astral/package.py2
-rw-r--r--var/spack/repos/builtin/packages/astyle/package.py37
-rw-r--r--var/spack/repos/builtin/packages/at-spi2-atk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/at-spi2-core/package.py8
-rw-r--r--var/spack/repos/builtin/packages/atf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/athena/package.py38
-rw-r--r--var/spack/repos/builtin/packages/atk/package.py44
-rw-r--r--var/spack/repos/builtin/packages/atlas/package.py17
-rw-r--r--var/spack/repos/builtin/packages/atmi/0001-Remove-relative-link-paths-to-external-libraries.patch29
-rw-r--r--var/spack/repos/builtin/packages/atmi/0002-Remove-usr-bin-rsync-reference.patch68
-rw-r--r--var/spack/repos/builtin/packages/atmi/package.py135
-rw-r--r--var/spack/repos/builtin/packages/atompaw/package.py5
-rw-r--r--var/spack/repos/builtin/packages/atop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/attr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/audacious/package.py3
-rw-r--r--var/spack/repos/builtin/packages/audacity/package.py5
-rw-r--r--var/spack/repos/builtin/packages/audit-userspace/package.py10
-rw-r--r--var/spack/repos/builtin/packages/augustus/package.py25
-rw-r--r--var/spack/repos/builtin/packages/authd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/authselect/package.py2
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py14
-rw-r--r--var/spack/repos/builtin/packages/autodiff/package.py15
-rw-r--r--var/spack/repos/builtin/packages/autodock-gpu/package.py9
-rw-r--r--var/spack/repos/builtin/packages/autodock-vina/package.py2
-rw-r--r--var/spack/repos/builtin/packages/autogen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/automaded/package.py2
-rw-r--r--var/spack/repos/builtin/packages/automake/package.py6
-rw-r--r--var/spack/repos/builtin/packages/aws-ofi-nccl/package.py29
-rw-r--r--var/spack/repos/builtin/packages/aws-ofi-rccl/package.py8
-rw-r--r--var/spack/repos/builtin/packages/aws-sdk-cpp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/awscli-v2/package.py48
-rw-r--r--var/spack/repos/builtin/packages/axel/package.py14
-rw-r--r--var/spack/repos/builtin/packages/axl/package.py14
-rw-r--r--var/spack/repos/builtin/packages/axom/package.py285
-rw-r--r--var/spack/repos/builtin/packages/axom/umpire_camp_blt_targets.patch38
-rw-r--r--var/spack/repos/builtin/packages/babelflow/package.py2
-rw-r--r--var/spack/repos/builtin/packages/babelstream/package.py968
-rw-r--r--var/spack/repos/builtin/packages/babeltrace/package.py4
-rw-r--r--var/spack/repos/builtin/packages/babl/package.py6
-rw-r--r--var/spack/repos/builtin/packages/bacio/package.py20
-rw-r--r--var/spack/repos/builtin/packages/backward-cpp/package.py34
-rw-r--r--var/spack/repos/builtin/packages/bam-readcount/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bamaddrg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bamdst/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bamtools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bamutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/banner/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bannergrab/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bart/package.py7
-rw-r--r--var/spack/repos/builtin/packages/barvinok/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bash-completion/package.py7
-rw-r--r--var/spack/repos/builtin/packages/bash/package.py23
-rw-r--r--var/spack/repos/builtin/packages/bat/package.py11
-rw-r--r--var/spack/repos/builtin/packages/batchedblas/package.py2
-rw-r--r--var/spack/repos/builtin/packages/batctl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/baurmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bazel/cppcompileaction-7.0.0.patch12
-rw-r--r--var/spack/repos/builtin/packages/bazel/package.py91
-rw-r--r--var/spack/repos/builtin/packages/bbmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bcache/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bcftools/package.py6
-rw-r--r--var/spack/repos/builtin/packages/bdftopcf/package.py16
-rw-r--r--var/spack/repos/builtin/packages/bdsim/c++-standard.patch13
-rw-r--r--var/spack/repos/builtin/packages/bdsim/package.py13
-rw-r--r--var/spack/repos/builtin/packages/bdw-gc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/bear/package.py22
-rw-r--r--var/spack/repos/builtin/packages/beast-tracer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/beast1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/beatnik/package.py17
-rw-r--r--var/spack/repos/builtin/packages/bedops/package.py3
-rw-r--r--var/spack/repos/builtin/packages/bedtools2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/beforelight/package.py2
-rw-r--r--var/spack/repos/builtin/packages/benchmark/package.py23
-rw-r--r--var/spack/repos/builtin/packages/berkeley-db/package.py3
-rw-r--r--var/spack/repos/builtin/packages/berkeleygw/package.py79
-rw-r--r--var/spack/repos/builtin/packages/bertini/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bfs/package.py19
-rw-r--r--var/spack/repos/builtin/packages/bgen/package.py30
-rw-r--r--var/spack/repos/builtin/packages/bgpdump/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bigdft-atlab/package.py59
-rw-r--r--var/spack/repos/builtin/packages/bigdft-chess/package.py76
-rw-r--r--var/spack/repos/builtin/packages/bigdft-core/package.py97
-rw-r--r--var/spack/repos/builtin/packages/bigdft-futile/package.py54
-rw-r--r--var/spack/repos/builtin/packages/bigdft-libabinit/package.py50
-rw-r--r--var/spack/repos/builtin/packages/bigdft-liborbs/package.py93
-rw-r--r--var/spack/repos/builtin/packages/bigdft-psolver/package.py64
-rw-r--r--var/spack/repos/builtin/packages/bigdft-spred/package.py65
-rw-r--r--var/spack/repos/builtin/packages/bigdft-suite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/bind9/package.py26
-rw-r--r--var/spack/repos/builtin/packages/binder/llvm_dir.patch12
-rw-r--r--var/spack/repos/builtin/packages/binder/package.py8
-rw-r--r--var/spack/repos/builtin/packages/binutils/gold-gcc4.patch12
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py27
-rw-r--r--var/spack/repos/builtin/packages/biobambam2/package.py14
-rw-r--r--var/spack/repos/builtin/packages/biobloom/package.py3
-rw-r--r--var/spack/repos/builtin/packages/biopieces/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bird/package.py37
-rw-r--r--var/spack/repos/builtin/packages/bison/package.py11
-rw-r--r--var/spack/repos/builtin/packages/bison/pgi.patch10
-rw-r--r--var/spack/repos/builtin/packages/bitgroomingz/package.py10
-rw-r--r--var/spack/repos/builtin/packages/bitlbee/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bitmap/package.py7
-rw-r--r--var/spack/repos/builtin/packages/bitsery/package.py2
-rw-r--r--var/spack/repos/builtin/packages/blackhat/package.py3
-rw-r--r--var/spack/repos/builtin/packages/blake3/package.py23
-rw-r--r--var/spack/repos/builtin/packages/blaspp/0001-fix-blaspp-build-error-with-rocm-6.0.0.patch50
-rw-r--r--var/spack/repos/builtin/packages/blaspp/package.py23
-rw-r--r--var/spack/repos/builtin/packages/blast-legacy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/blast-plus/package.py29
-rw-r--r--var/spack/repos/builtin/packages/blat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/blaze/package.py4
-rw-r--r--var/spack/repos/builtin/packages/blis/package.py18
-rw-r--r--var/spack/repos/builtin/packages/blitz/fujitsu_compiler_specfic_header.patch37
-rw-r--r--var/spack/repos/builtin/packages/blitz/package.py12
-rw-r--r--var/spack/repos/builtin/packages/blktrace/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bloaty/package.py3
-rw-r--r--var/spack/repos/builtin/packages/blogbench/package.py2
-rw-r--r--var/spack/repos/builtin/packages/blt/package.py55
-rw-r--r--var/spack/repos/builtin/packages/bmake/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bmi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bml/package.py6
-rw-r--r--var/spack/repos/builtin/packages/bohrium/package.py28
-rw-r--r--var/spack/repos/builtin/packages/boinc-client/package.py5
-rw-r--r--var/spack/repos/builtin/packages/bolt/package.py5
-rw-r--r--var/spack/repos/builtin/packages/bonniepp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bookleaf-cpp/package.py10
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch290
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch250
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_1.67.0_pgi.patch13
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch61
-rw-r--r--var/spack/repos/builtin/packages/boost/bootstrap-path.patch33
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py277
-rw-r--r--var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py2
-rw-r--r--var/spack/repos/builtin/packages/botan/package.py7
-rw-r--r--var/spack/repos/builtin/packages/bowtie/package.py5
-rw-r--r--var/spack/repos/builtin/packages/bowtie2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/boxlib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/bpp-core/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-phyl-omics/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-phyl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-popgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-seq-omics/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-seq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bpp-suite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bracken/package.py3
-rw-r--r--var/spack/repos/builtin/packages/brahma/package.py22
-rw-r--r--var/spack/repos/builtin/packages/braker/package.py3
-rw-r--r--var/spack/repos/builtin/packages/branson/package.py9
-rw-r--r--var/spack/repos/builtin/packages/breakdancer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/breseq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/bricks/package.py8
-rw-r--r--var/spack/repos/builtin/packages/bridger/package.py3
-rw-r--r--var/spack/repos/builtin/packages/brigand/package.py2
-rw-r--r--var/spack/repos/builtin/packages/brltty/package.py2
-rw-r--r--var/spack/repos/builtin/packages/brotli/package.py3
-rw-r--r--var/spack/repos/builtin/packages/brpc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/brunsli/package.py3
-rw-r--r--var/spack/repos/builtin/packages/brynet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/btop/link-dl.patch12
-rw-r--r--var/spack/repos/builtin/packages/btop/package.py25
-rw-r--r--var/spack/repos/builtin/packages/bubblewrap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/buddy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/bueno/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bufr-query/package.py60
-rw-r--r--var/spack/repos/builtin/packages/bufr/package.py22
-rw-r--r--var/spack/repos/builtin/packages/busybox/package.py9
-rw-r--r--var/spack/repos/builtin/packages/butterflypack/package.py23
-rw-r--r--var/spack/repos/builtin/packages/bwa/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bwtool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/byfl/package.py26
-rw-r--r--var/spack/repos/builtin/packages/byte-lite/package.py29
-rw-r--r--var/spack/repos/builtin/packages/byte-unixbench/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bzip2/package.py13
-rw-r--r--var/spack/repos/builtin/packages/c-ares/package.py5
-rw-r--r--var/spack/repos/builtin/packages/c-blosc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/c-blosc2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/c-lime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/c-raft/package.py2
-rw-r--r--var/spack/repos/builtin/packages/c/package.py24
-rw-r--r--var/spack/repos/builtin/packages/c3d/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cabana/package.py43
-rw-r--r--var/spack/repos/builtin/packages/cachefilesd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/caffe/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cairo/package.py11
-rw-r--r--var/spack/repos/builtin/packages/cairomm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/caliper/package.py185
-rw-r--r--var/spack/repos/builtin/packages/callpath/package.py3
-rw-r--r--var/spack/repos/builtin/packages/camellia/package.py4
-rw-r--r--var/spack/repos/builtin/packages/camp/camp-rocm6.patch15
-rw-r--r--var/spack/repos/builtin/packages/camp/libstdc++-13-missing-header.patch (renamed from var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch)0
-rw-r--r--var/spack/repos/builtin/packages/camp/package.py104
-rw-r--r--var/spack/repos/builtin/packages/camx/package.py10
-rw-r--r--var/spack/repos/builtin/packages/candle-benchmarks/package.py42
-rw-r--r--var/spack/repos/builtin/packages/cans/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cantera/package.py20
-rw-r--r--var/spack/repos/builtin/packages/canu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/capnproto/package.py6
-rw-r--r--var/spack/repos/builtin/packages/capstone/package.py7
-rw-r--r--var/spack/repos/builtin/packages/cardioid/package.py8
-rw-r--r--var/spack/repos/builtin/packages/care/package.py313
-rw-r--r--var/spack/repos/builtin/packages/cargs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/casacore-measures/package.py29
-rw-r--r--var/spack/repos/builtin/packages/casacore/package.py36
-rw-r--r--var/spack/repos/builtin/packages/casper/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cassandra/package.py39
-rw-r--r--var/spack/repos/builtin/packages/castep/package.py95
-rw-r--r--var/spack/repos/builtin/packages/catch2/package.py14
-rw-r--r--var/spack/repos/builtin/packages/cbc/package.py12
-rw-r--r--var/spack/repos/builtin/packages/cbench/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cbflib/package.py7
-rw-r--r--var/spack/repos/builtin/packages/cbindgen/package.py40
-rw-r--r--var/spack/repos/builtin/packages/cblas/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cbqn/package.py62
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cbtf-krell/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cbtf-lanl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cc65/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ccache/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cce/detection_test.yaml57
-rw-r--r--var/spack/repos/builtin/packages/cce/package.py30
-rw-r--r--var/spack/repos/builtin/packages/ccfits/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ccls/package.py8
-rw-r--r--var/spack/repos/builtin/packages/ccs-qcd/package.py8
-rw-r--r--var/spack/repos/builtin/packages/cctools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cdbfasta/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cdd/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cddlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cdecimal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cdhit/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cdi/package.py30
-rw-r--r--var/spack/repos/builtin/packages/cdo/add_algorithm_header.patch22
-rw-r--r--var/spack/repos/builtin/packages/cdo/add_algorithm_header_222.patch23
-rw-r--r--var/spack/repos/builtin/packages/cdo/package.py51
-rw-r--r--var/spack/repos/builtin/packages/cdt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ceed/package.py12
-rw-r--r--var/spack/repos/builtin/packages/celeritas/package.py79
-rw-r--r--var/spack/repos/builtin/packages/cellpose/package.py46
-rw-r--r--var/spack/repos/builtin/packages/cellranger/package.py38
-rw-r--r--var/spack/repos/builtin/packages/centrifuge/package.py24
-rw-r--r--var/spack/repos/builtin/packages/cepgen/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cereal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ceres-solver/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cernlib/package.py21
-rw-r--r--var/spack/repos/builtin/packages/cfitsio/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cgal/package.py73
-rw-r--r--var/spack/repos/builtin/packages/cgdb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cgdcbxd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cgl/package.py11
-rw-r--r--var/spack/repos/builtin/packages/cgm/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cgns/gcc14.patch50
-rw-r--r--var/spack/repos/builtin/packages/cgns/package.py18
-rw-r--r--var/spack/repos/builtin/packages/cgsi-gsoap/package.py32
-rw-r--r--var/spack/repos/builtin/packages/chaco/package.py3
-rw-r--r--var/spack/repos/builtin/packages/chai/change_mpi_target_name_umpire_patch.patch13
-rw-r--r--var/spack/repos/builtin/packages/chai/package.py202
-rw-r--r--var/spack/repos/builtin/packages/chameleon/package.py12
-rw-r--r--var/spack/repos/builtin/packages/changa/fix_makefile.patch11
-rw-r--r--var/spack/repos/builtin/packages/changa/package.py44
-rw-r--r--var/spack/repos/builtin/packages/channelflow/package.py4
-rw-r--r--var/spack/repos/builtin/packages/chaparral/package.py2
-rw-r--r--var/spack/repos/builtin/packages/chapel/fix_spack_cc_wrapper_in_cray_prgenv.patch22
-rw-r--r--var/spack/repos/builtin/packages/chapel/package.py898
-rw-r--r--var/spack/repos/builtin/packages/chaplin/package.py2
-rw-r--r--var/spack/repos/builtin/packages/charliecloud/package.py34
-rw-r--r--var/spack/repos/builtin/packages/charmpp/ofi-crayshasta-arm.patch13
-rw-r--r--var/spack/repos/builtin/packages/charmpp/package.py99
-rw-r--r--var/spack/repos/builtin/packages/chatterbug/package.py10
-rw-r--r--var/spack/repos/builtin/packages/check/package.py2
-rw-r--r--var/spack/repos/builtin/packages/chemfiles/package.py3
-rw-r--r--var/spack/repos/builtin/packages/chgcentre/package.py2
-rw-r--r--var/spack/repos/builtin/packages/chombo/package.py10
-rw-r--r--var/spack/repos/builtin/packages/chrony/package.py2
-rw-r--r--var/spack/repos/builtin/packages/chrpath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/circe2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/citcoms/package.py11
-rw-r--r--var/spack/repos/builtin/packages/cityhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cjson/package.py2
-rw-r--r--var/spack/repos/builtin/packages/clamav/package.py3
-rw-r--r--var/spack/repos/builtin/packages/clamr/package.py12
-rw-r--r--var/spack/repos/builtin/packages/clapack/package.py4
-rw-r--r--var/spack/repos/builtin/packages/clara/package.py2
-rw-r--r--var/spack/repos/builtin/packages/claw/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cleverleaf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/clfft/package.py9
-rw-r--r--var/spack/repos/builtin/packages/clhep/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cli11/package.py14
-rw-r--r--var/spack/repos/builtin/packages/clinfo/package.py5
-rw-r--r--var/spack/repos/builtin/packages/clingo-bootstrap/package.py38
-rw-r--r--var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch35
-rw-r--r--var/spack/repos/builtin/packages/clingo/package.py76
-rw-r--r--var/spack/repos/builtin/packages/clingo/setuptools-2.patch8
-rw-r--r--var/spack/repos/builtin/packages/cln/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cloc/package.py11
-rw-r--r--var/spack/repos/builtin/packages/cloog/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cloverleaf-ref/package.py13
-rw-r--r--var/spack/repos/builtin/packages/cloverleaf/package.py34
-rw-r--r--var/spack/repos/builtin/packages/cloverleaf3d/package.py24
-rw-r--r--var/spack/repos/builtin/packages/clp/package.py14
-rw-r--r--var/spack/repos/builtin/packages/clustal-omega/package.py3
-rw-r--r--var/spack/repos/builtin/packages/clustalw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cmake/mr-9623.patch67
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py249
-rw-r--r--var/spack/repos/builtin/packages/cmaq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cmark/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cmdlime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cmdstan/package.py14
-rw-r--r--var/spack/repos/builtin/packages/cminpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cmocka/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cmockery/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cmor/package.py27
-rw-r--r--var/spack/repos/builtin/packages/cni-plugins/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cnmem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cnpy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cntk/package.py14
-rw-r--r--var/spack/repos/builtin/packages/cnvnator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/codar-cheetah/package.py2
-rw-r--r--var/spack/repos/builtin/packages/code-server/package.py3
-rw-r--r--var/spack/repos/builtin/packages/codec2/package.py12
-rw-r--r--var/spack/repos/builtin/packages/codes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/codipack/package.py40
-rw-r--r--var/spack/repos/builtin/packages/coevp/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cohmm/package.py6
-rw-r--r--var/spack/repos/builtin/packages/coin3d/package.py5
-rw-r--r--var/spack/repos/builtin/packages/coinhsl/package.py97
-rw-r--r--var/spack/repos/builtin/packages/coinutils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/collectd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/collier/package.py2
-rw-r--r--var/spack/repos/builtin/packages/colm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/comd/package.py12
-rw-r--r--var/spack/repos/builtin/packages/comgr/package.py175
-rw-r--r--var/spack/repos/builtin/packages/commons-lang3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/commons-logging/package.py3
-rw-r--r--var/spack/repos/builtin/packages/compadre/package.py16
-rw-r--r--var/spack/repos/builtin/packages/compiz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/composable-kernel/0001-mark-kernels-maybe-unused.patch88
-rw-r--r--var/spack/repos/builtin/packages/composable-kernel/package.py61
-rw-r--r--var/spack/repos/builtin/packages/composyx/package.py70
-rw-r--r--var/spack/repos/builtin/packages/conduit/package.py111
-rw-r--r--var/spack/repos/builtin/packages/conmon/package.py3
-rw-r--r--var/spack/repos/builtin/packages/conquest/package.py6
-rw-r--r--var/spack/repos/builtin/packages/conserver/package.py2
-rw-r--r--var/spack/repos/builtin/packages/console-bridge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/constype/package.py2
-rw-r--r--var/spack/repos/builtin/packages/converge/package.py28
-rw-r--r--var/spack/repos/builtin/packages/cool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/coordgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/coral/package.py2
-rw-r--r--var/spack/repos/builtin/packages/coreutils/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cosign/package.py1
-rw-r--r--var/spack/repos/builtin/packages/cosma/fj-ssl2.patch104
-rw-r--r--var/spack/repos/builtin/packages/cosma/package.py19
-rw-r--r--var/spack/repos/builtin/packages/cosmoflow-benchmark/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cosmomc/package.py13
-rw-r--r--var/spack/repos/builtin/packages/cosp2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/costa/package.py10
-rw-r--r--var/spack/repos/builtin/packages/costo/package.py50
-rw-r--r--var/spack/repos/builtin/packages/cotter/package.py2
-rw-r--r--var/spack/repos/builtin/packages/countdown/package.py89
-rw-r--r--var/spack/repos/builtin/packages/covfie/package.py39
-rw-r--r--var/spack/repos/builtin/packages/cp2k/cmake-relwithdebinfo-2024.1.patch23
-rw-r--r--var/spack/repos/builtin/packages/cp2k/d4-dispersion-bugfix-2024.3.patch56
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py717
-rw-r--r--var/spack/repos/builtin/packages/cpio/package.py7
-rw-r--r--var/spack/repos/builtin/packages/cpmd/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cpp-argparse/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cpp-httplib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cpp-logger/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cpp-termcolor/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cppad/package.py40
-rw-r--r--var/spack/repos/builtin/packages/cppcheck/package.py5
-rw-r--r--var/spack/repos/builtin/packages/cppcodec/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cppcoro/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cppgsl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cpprestsdk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cppunit/package.py20
-rw-r--r--var/spack/repos/builtin/packages/cppzmq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cpr/package.py12
-rw-r--r--var/spack/repos/builtin/packages/cprnc/install_rpath.patch18
-rw-r--r--var/spack/repos/builtin/packages/cprnc/package.py19
-rw-r--r--var/spack/repos/builtin/packages/cpu-features/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cpuinfo/package.py20
-rw-r--r--var/spack/repos/builtin/packages/cqrlib/Makefile.patch29
-rw-r--r--var/spack/repos/builtin/packages/cqrlib/package.py16
-rw-r--r--var/spack/repos/builtin/packages/cquery/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cracklib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cram/package.py5
-rw-r--r--var/spack/repos/builtin/packages/cray-fftw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cray-libsci/package.py11
-rw-r--r--var/spack/repos/builtin/packages/cray-mpich/package.py26
-rw-r--r--var/spack/repos/builtin/packages/cray-mvapich2/package.py27
-rw-r--r--var/spack/repos/builtin/packages/creduce/package.py3
-rw-r--r--var/spack/repos/builtin/packages/crmc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cronie/package.py3
-rw-r--r--var/spack/repos/builtin/packages/crosstool-ng/package.py2
-rw-r--r--var/spack/repos/builtin/packages/crtm-fix/package.py42
-rw-r--r--var/spack/repos/builtin/packages/crtm/package.py62
-rw-r--r--var/spack/repos/builtin/packages/crtm/v3.1.0-skylabv8.installprefix.patch14
-rw-r--r--var/spack/repos/builtin/packages/crunch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cryodrgn/package.py38
-rw-r--r--var/spack/repos/builtin/packages/cryptopp/package.py17
-rw-r--r--var/spack/repos/builtin/packages/cryptsetup/package.py2
-rw-r--r--var/spack/repos/builtin/packages/csa-c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cscope/package.py4
-rw-r--r--var/spack/repos/builtin/packages/csdp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ctffind/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ctpl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ctre/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cuba/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cubature/package.py17
-rw-r--r--var/spack/repos/builtin/packages/cube-blade/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cube/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cubelib/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cubew/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cubist/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cuda-memtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py143
-rw-r--r--var/spack/repos/builtin/packages/cudd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cudnn/package.py20
-rw-r--r--var/spack/repos/builtin/packages/cunit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cupla/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cups/package.py23
-rw-r--r--var/spack/repos/builtin/packages/curl/package.py289
-rw-r--r--var/spack/repos/builtin/packages/cusz/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cutensor/package.py9
-rw-r--r--var/spack/repos/builtin/packages/cutlang/package.py40
-rw-r--r--var/spack/repos/builtin/packages/cutlass/package.py32
-rw-r--r--var/spack/repos/builtin/packages/cvector/Makefile.patch19
-rw-r--r--var/spack/repos/builtin/packages/cvector/package.py22
-rw-r--r--var/spack/repos/builtin/packages/cvise/package.py13
-rw-r--r--var/spack/repos/builtin/packages/cvs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cxx/package.py47
-rw-r--r--var/spack/repos/builtin/packages/cxxopts/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cxxtest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cyrus-sasl/package.py10
-rw-r--r--var/spack/repos/builtin/packages/czmq/package.py11
-rw-r--r--var/spack/repos/builtin/packages/daemonize/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dakota/package.py42
-rw-r--r--var/spack/repos/builtin/packages/daligner/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dalton/package.py6
-rw-r--r--var/spack/repos/builtin/packages/damaris/package.py6
-rw-r--r--var/spack/repos/builtin/packages/damask-grid/package.py22
-rw-r--r--var/spack/repos/builtin/packages/damask-mesh/package.py22
-rw-r--r--var/spack/repos/builtin/packages/damask/package.py22
-rw-r--r--var/spack/repos/builtin/packages/damselfly/package.py3
-rw-r--r--var/spack/repos/builtin/packages/daos/package.py7
-rw-r--r--var/spack/repos/builtin/packages/darshan-runtime/package.py66
-rw-r--r--var/spack/repos/builtin/packages/darshan-util/package.py15
-rw-r--r--var/spack/repos/builtin/packages/dash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/datamash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dataspaces/package.py2
-rw-r--r--var/spack/repos/builtin/packages/datatransferkit/package.py13
-rw-r--r--var/spack/repos/builtin/packages/dateutils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dav-sdk/package.py177
-rw-r--r--var/spack/repos/builtin/packages/davix/package.py43
-rw-r--r--var/spack/repos/builtin/packages/dbcsr/package.py52
-rw-r--r--var/spack/repos/builtin/packages/dbow2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dbus-glib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dbus/package.py53
-rw-r--r--var/spack/repos/builtin/packages/dbxtool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dcap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dcm2niix/package.py6
-rw-r--r--var/spack/repos/builtin/packages/dcmtk/package.py8
-rw-r--r--var/spack/repos/builtin/packages/dcmtk/tiff-3.6.7.patch12
-rwxr-xr-xvar/spack/repos/builtin/packages/dctz/package.py39
-rw-r--r--var/spack/repos/builtin/packages/dd4hep/package.py85
-rw-r--r--var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch41
-rw-r--r--var/spack/repos/builtin/packages/dd4hep/tbb2.patch14
-rw-r--r--var/spack/repos/builtin/packages/ddt/package.py31
-rw-r--r--var/spack/repos/builtin/packages/dealii-parameter-gui/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py100
-rw-r--r--var/spack/repos/builtin/packages/debugedit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/decentralized-internet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/deconseq-standalone/package.py4
-rw-r--r--var/spack/repos/builtin/packages/dedisp/package.py45
-rw-r--r--var/spack/repos/builtin/packages/dejagnu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/delly2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/delphes/package.py17
-rw-r--r--var/spack/repos/builtin/packages/demuxlet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/denovogear/package.py3
-rw-r--r--var/spack/repos/builtin/packages/detray/package.py113
-rw-r--r--var/spack/repos/builtin/packages/dfelibs/package.py33
-rw-r--r--var/spack/repos/builtin/packages/dftbplus/package.py29
-rw-r--r--var/spack/repos/builtin/packages/dftd3-lib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dftd4/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dftfe/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dhtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dia/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dialign/package.py2
-rw-r--r--var/spack/repos/builtin/packages/diamond/package.py34
-rw-r--r--var/spack/repos/builtin/packages/dicom3tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/diffmark/package.py2
-rw-r--r--var/spack/repos/builtin/packages/diffsplice/package.py2
-rw-r--r--var/spack/repos/builtin/packages/diffutils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/digitrounding/package.py4
-rw-r--r--var/spack/repos/builtin/packages/dihydrogen/package.py23
-rw-r--r--var/spack/repos/builtin/packages/dimemas/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ding-libs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dire/package.py7
-rw-r--r--var/spack/repos/builtin/packages/direnv/package.py18
-rw-r--r--var/spack/repos/builtin/packages/discotec/package.py4
-rw-r--r--var/spack/repos/builtin/packages/discovar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/discovardenovo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/disktype/package.py2
-rw-r--r--var/spack/repos/builtin/packages/distbench/package.py2
-rw-r--r--var/spack/repos/builtin/packages/distcc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/diy/package.py41
-rw-r--r--var/spack/repos/builtin/packages/dla-future-fortran/package.py61
-rw-r--r--var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch23
-rw-r--r--var/spack/repos/builtin/packages/dla-future/package.py189
-rw-r--r--var/spack/repos/builtin/packages/dlb/package.py16
-rw-r--r--var/spack/repos/builtin/packages/dlib/package.py66
-rw-r--r--var/spack/repos/builtin/packages/dlpack/package.py4
-rw-r--r--var/spack/repos/builtin/packages/dmd/package.py6
-rw-r--r--var/spack/repos/builtin/packages/dmidecode/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dmlc-core/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dmtcp/package.py7
-rw-r--r--var/spack/repos/builtin/packages/dmxproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dnsmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dnsmasq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dnstop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dnstracer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/docbook-xml/package.py117
-rw-r--r--var/spack/repos/builtin/packages/dock/package.py9
-rw-r--r--var/spack/repos/builtin/packages/doctest/package.py25
-rw-r--r--var/spack/repos/builtin/packages/dorado/cmake-htslib.patch111
-rw-r--r--var/spack/repos/builtin/packages/dorado/package.py49
-rw-r--r--var/spack/repos/builtin/packages/dorian3d-dlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dos2unix/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dosfstools/package.py8
-rw-r--r--var/spack/repos/builtin/packages/dotconf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dotnet-core-sdk/package.py97
-rw-r--r--var/spack/repos/builtin/packages/double-batched-fft-library/package.py10
-rw-r--r--var/spack/repos/builtin/packages/double-conversion/package.py3
-rw-r--r--var/spack/repos/builtin/packages/doxygen/package.py56
-rw-r--r--var/spack/repos/builtin/packages/dpcpp/package.py166
-rw-r--r--var/spack/repos/builtin/packages/dpdk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/draco/package.py7
-rw-r--r--var/spack/repos/builtin/packages/dracut/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dramsim2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dramsim3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dray/package.py66
-rw-r--r--var/spack/repos/builtin/packages/drill/package.py37
-rw-r--r--var/spack/repos/builtin/packages/drishti/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dropwatch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dsdp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dsfmt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dsqss/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dsrc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dssp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/dtc/package.py15
-rw-r--r--var/spack/repos/builtin/packages/dtcmp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/dtf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/duckdb/package.py197
-rw-r--r--var/spack/repos/builtin/packages/duperemove/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dwz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/dyninst/missing_include_deque.patch11
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py43
-rw-r--r--var/spack/repos/builtin/packages/dysco/package.py3
-rw-r--r--var/spack/repos/builtin/packages/e2fsprogs/package.py30
-rw-r--r--var/spack/repos/builtin/packages/e3sm-kernels/package.py2
-rw-r--r--var/spack/repos/builtin/packages/e3sm-scorpio/package.py4
-rw-r--r--var/spack/repos/builtin/packages/e4s-alc/package.py29
-rw-r--r--var/spack/repos/builtin/packages/e4s-cl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ea-utils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/eagle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/earlyoom/package.py3
-rw-r--r--var/spack/repos/builtin/packages/easi/package.py32
-rw-r--r--var/spack/repos/builtin/packages/easyloggingpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ebms/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ecbuild/package.py4
-rw-r--r--var/spack/repos/builtin/packages/eccodes/package.py20
-rw-r--r--var/spack/repos/builtin/packages/ecdsautils/package.py13
-rw-r--r--var/spack/repos/builtin/packages/ecflow/ctsapi_cassert.patch10
-rw-r--r--var/spack/repos/builtin/packages/ecflow/package.py13
-rw-r--r--var/spack/repos/builtin/packages/ecflow/vfile_cassert.patch10
-rw-r--r--var/spack/repos/builtin/packages/eckit/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ecmwf-atlas/package.py21
-rw-r--r--var/spack/repos/builtin/packages/ecos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ecoslim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ecp-proxy-apps/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ectrans/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ed/package.py2
-rw-r--r--var/spack/repos/builtin/packages/editline/package.py2
-rw-r--r--var/spack/repos/builtin/packages/editorconfig/package.py24
-rw-r--r--var/spack/repos/builtin/packages/editres/package.py2
-rw-r--r--var/spack/repos/builtin/packages/edm4hep/package.py104
-rw-r--r--var/spack/repos/builtin/packages/edm4hep/test-deps.patch12
-rw-r--r--var/spack/repos/builtin/packages/eem/package.py4
-rw-r--r--var/spack/repos/builtin/packages/efivar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py38
-rw-r--r--var/spack/repos/builtin/packages/eigenexa/package.py32
-rw-r--r--var/spack/repos/builtin/packages/elasticsearch/package.py17
-rw-r--r--var/spack/repos/builtin/packages/elbencho/package.py12
-rw-r--r--var/spack/repos/builtin/packages/elemental/package.py20
-rw-r--r--var/spack/repos/builtin/packages/elfio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/elfutils/package.py16
-rw-r--r--var/spack/repos/builtin/packages/elk/package.py27
-rw-r--r--var/spack/repos/builtin/packages/elmerfem/package.py26
-rw-r--r--var/spack/repos/builtin/packages/elpa/fujitsu.patch65
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py107
-rw-r--r--var/spack/repos/builtin/packages/elsd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/elsdc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/elsi/package.py208
-rw-r--r--var/spack/repos/builtin/packages/emacs/package.py66
-rw-r--r--var/spack/repos/builtin/packages/ember/package.py2
-rw-r--r--var/spack/repos/builtin/packages/emboss/package.py4
-rw-r--r--var/spack/repos/builtin/packages/embree/package.py7
-rw-r--r--var/spack/repos/builtin/packages/enca/package.py2
-rw-r--r--var/spack/repos/builtin/packages/enchant/package.py22
-rw-r--r--var/spack/repos/builtin/packages/energyplus/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ensmallen/package.py3
-rw-r--r--var/spack/repos/builtin/packages/entrezdirect/package.py78
-rw-r--r--var/spack/repos/builtin/packages/entt/package.py6
-rw-r--r--var/spack/repos/builtin/packages/environment-modules/package.py34
-rw-r--r--var/spack/repos/builtin/packages/enzo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/enzyme/package.py9
-rw-r--r--var/spack/repos/builtin/packages/eospac/package.py34
-rw-r--r--var/spack/repos/builtin/packages/epics-base/package.py3
-rw-r--r--var/spack/repos/builtin/packages/epics-ca-gateway/package.py2
-rw-r--r--var/spack/repos/builtin/packages/epics-pcas/package.py3
-rw-r--r--var/spack/repos/builtin/packages/eprosima-fastcdr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/eprosima-fastdds/package.py3
-rw-r--r--var/spack/repos/builtin/packages/epsic/package.py2
-rw-r--r--var/spack/repos/builtin/packages/eq-r/package.py2
-rw-r--r--var/spack/repos/builtin/packages/er/package.py7
-rw-r--r--var/spack/repos/builtin/packages/erfa/package.py2
-rw-r--r--var/spack/repos/builtin/packages/erlang/package.py2
-rw-r--r--var/spack/repos/builtin/packages/erne/package.py7
-rw-r--r--var/spack/repos/builtin/packages/es-shell/package.py2
-rw-r--r--var/spack/repos/builtin/packages/esmf/package.py137
-rw-r--r--var/spack/repos/builtin/packages/essl/package.py8
-rw-r--r--var/spack/repos/builtin/packages/esys-particle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ethminer/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ethtool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/etsf-io/package.py9
-rw-r--r--var/spack/repos/builtin/packages/eve/package.py2
-rw-r--r--var/spack/repos/builtin/packages/evemu/package.py15
-rw-r--r--var/spack/repos/builtin/packages/everytrace-example/package.py2
-rw-r--r--var/spack/repos/builtin/packages/everytrace/package.py4
-rw-r--r--var/spack/repos/builtin/packages/evtgen/package.py12
-rw-r--r--var/spack/repos/builtin/packages/exabayes/package.py5
-rw-r--r--var/spack/repos/builtin/packages/exaca/package.py33
-rw-r--r--var/spack/repos/builtin/packages/exago/package.py14
-rw-r--r--var/spack/repos/builtin/packages/examinimd/package.py6
-rw-r--r--var/spack/repos/builtin/packages/examl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exampm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exasp2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/exawind/package.py121
-rw-r--r--var/spack/repos/builtin/packages/exciting/package.py22
-rw-r--r--var/spack/repos/builtin/packages/exempi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exiv2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exmcutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exo/package.py54
-rw-r--r--var/spack/repos/builtin/packages/exodusii/Fix-ioss-tpl.patch25
-rw-r--r--var/spack/repos/builtin/packages/exodusii/package.py205
-rw-r--r--var/spack/repos/builtin/packages/exonerate-gff3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exonerate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/expat/package.py70
-rw-r--r--var/spack/repos/builtin/packages/expect/package.py4
-rw-r--r--var/spack/repos/builtin/packages/extrae/dyninst_instruction.patch19
-rw-r--r--var/spack/repos/builtin/packages/extrae/package.py86
-rw-r--r--var/spack/repos/builtin/packages/exuberant-ctags/package.py6
-rw-r--r--var/spack/repos/builtin/packages/eza/package.py19
-rw-r--r--var/spack/repos/builtin/packages/eztrace/package.py151
-rw-r--r--var/spack/repos/builtin/packages/f2c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/f3d/package.py2
-rw-r--r--var/spack/repos/builtin/packages/f77-zmq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/f90cache/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fabtests/package.py10
-rw-r--r--var/spack/repos/builtin/packages/fabulous/package.py44
-rw-r--r--var/spack/repos/builtin/packages/fairlogger/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fairmq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/faiss/package.py39
-rw-r--r--var/spack/repos/builtin/packages/fakechroot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fakexrandr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/falco/package.py2
-rw-r--r--var/spack/repos/builtin/packages/falcon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fann/package.py3
-rw-r--r--var/spack/repos/builtin/packages/faodel/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fargparse/package.py11
-rw-r--r--var/spack/repos/builtin/packages/fast-float/package.py36
-rw-r--r--var/spack/repos/builtin/packages/fast-global-file-status/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fasta/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fastani/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fastdb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fastdfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fastjar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fastjet/package.py70
-rw-r--r--var/spack/repos/builtin/packages/fastjson/package.py12
-rw-r--r--var/spack/repos/builtin/packages/fastor/package.py28
-rw-r--r--var/spack/repos/builtin/packages/fastp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fastqvalidator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fasttext/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fasttransforms/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fasttree/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fastx-toolkit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/faust/package.py7
-rw-r--r--var/spack/repos/builtin/packages/fbgemm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fcgi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fckit/package.py15
-rw-r--r--var/spack/repos/builtin/packages/fd/package.py31
-rw-r--r--var/spack/repos/builtin/packages/fdb/package.py7
-rw-r--r--var/spack/repos/builtin/packages/fds/package.py15
-rw-r--r--var/spack/repos/builtin/packages/fdupes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/feh/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fenics-basix/package.py48
-rw-r--r--var/spack/repos/builtin/packages/fenics-dolfinx/package.py60
-rw-r--r--var/spack/repos/builtin/packages/fenics-ufcx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py27
-rw-r--r--var/spack/repos/builtin/packages/feq-parse/package.py9
-rw-r--r--var/spack/repos/builtin/packages/fermikit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fermisciencetools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ferret/package.py18
-rw-r--r--var/spack/repos/builtin/packages/feynhiggs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ffmpeg/package.py48
-rw-r--r--var/spack/repos/builtin/packages/ffsb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ffte/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py26
-rw-r--r--var/spack/repos/builtin/packages/fftw/pfft-3.3.9.patch15
-rw-r--r--var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch121
-rw-r--r--var/spack/repos/builtin/packages/fftx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/fgsl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fiat/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fides/package.py16
-rw-r--r--var/spack/repos/builtin/packages/figcone/package.py3
-rw-r--r--var/spack/repos/builtin/packages/figlet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/file/package.py3
-rw-r--r--var/spack/repos/builtin/packages/filebench/package.py3
-rw-r--r--var/spack/repos/builtin/packages/filo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/filtlong/package.py2
-rw-r--r--var/spack/repos/builtin/packages/findutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fio/package.py15
-rw-r--r--var/spack/repos/builtin/packages/fipscheck/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fish/package.py9
-rw-r--r--var/spack/repos/builtin/packages/fixesproto/package.py1
-rw-r--r--var/spack/repos/builtin/packages/fj/detection_test.yaml27
-rw-r--r--var/spack/repos/builtin/packages/fj/package.py40
-rw-r--r--var/spack/repos/builtin/packages/fjcontrib/package.py9
-rw-r--r--var/spack/repos/builtin/packages/flac/package.py7
-rw-r--r--var/spack/repos/builtin/packages/flamemaster/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flann/package.py9
-rw-r--r--var/spack/repos/builtin/packages/flap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flashdimmsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flatbuffers/package.py14
-rw-r--r--var/spack/repos/builtin/packages/flatcc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/flcl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/flecsale/package.py45
-rw-r--r--var/spack/repos/builtin/packages/flecsi/package.py163
-rw-r--r--var/spack/repos/builtin/packages/flecsph/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fleur/package.py31
-rw-r--r--var/spack/repos/builtin/packages/flex/package.py8
-rw-r--r--var/spack/repos/builtin/packages/flexi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/flexiblas/package.py5
-rw-r--r--var/spack/repos/builtin/packages/flibcpp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/flink/package.py9
-rw-r--r--var/spack/repos/builtin/packages/flint/package.py42
-rw-r--r--var/spack/repos/builtin/packages/flit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fltk/package.py9
-rw-r--r--var/spack/repos/builtin/packages/flume/package.py5
-rw-r--r--var/spack/repos/builtin/packages/flux-core/package.py116
-rw-r--r--var/spack/repos/builtin/packages/flux-pmix/package.py7
-rw-r--r--var/spack/repos/builtin/packages/flux-sched/package.py57
-rw-r--r--var/spack/repos/builtin/packages/flux-security/package.py8
-rw-r--r--var/spack/repos/builtin/packages/flux/package.py39
-rw-r--r--var/spack/repos/builtin/packages/fluxbox/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fmi4cpp/package.py32
-rw-r--r--var/spack/repos/builtin/packages/fms/package.py42
-rw-r--r--var/spack/repos/builtin/packages/fmt/fmt-no-variable-initialize_10.0.0.patch22
-rw-r--r--var/spack/repos/builtin/packages/fmt/package.py21
-rw-r--r--var/spack/repos/builtin/packages/foam-extend/package.py18
-rw-r--r--var/spack/repos/builtin/packages/foldseek/package.py25
-rw-r--r--var/spack/repos/builtin/packages/folly/package.py3
-rw-r--r--var/spack/repos/builtin/packages/font-util/package.py10
-rw-r--r--var/spack/repos/builtin/packages/fontconfig/package.py36
-rw-r--r--var/spack/repos/builtin/packages/fonttosfnt/package.py7
-rw-r--r--var/spack/repos/builtin/packages/foonathan-memory/package.py2
-rw-r--r--var/spack/repos/builtin/packages/form/package.py5
-rw-r--r--var/spack/repos/builtin/packages/formetis/package.py7
-rw-r--r--var/spack/repos/builtin/packages/fortran/package.py24
-rw-r--r--var/spack/repos/builtin/packages/fortrilinos/package.py5
-rw-r--r--var/spack/repos/builtin/packages/fossil/package.py3
-rw-r--r--var/spack/repos/builtin/packages/foundationdb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fox/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fp16/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fpart/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fpchecker/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fping/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fplll/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fplo/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fpm/package.py8
-rw-r--r--var/spack/repos/builtin/packages/fpocket/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fpzip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fqtrim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fraggenescan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/freebayes/package.py3
-rw-r--r--var/spack/repos/builtin/packages/freecad/package.py4
-rw-r--r--var/spack/repos/builtin/packages/freefem/package.py10
-rw-r--r--var/spack/repos/builtin/packages/freeglut/package.py11
-rw-r--r--var/spack/repos/builtin/packages/freeimage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/freeipmi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/freetype/package.py30
-rw-r--r--var/spack/repos/builtin/packages/freexl/package.py16
-rw-r--r--var/spack/repos/builtin/packages/fribidi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/frontier-client/package.py3
-rw-r--r--var/spack/repos/builtin/packages/frontistr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fsl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fslsfonts/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fstobdf/package.py6
-rw-r--r--var/spack/repos/builtin/packages/fstrack/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ftgl/package.py20
-rw-r--r--var/spack/repos/builtin/packages/ftjam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ftk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ftobjectlibrary/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ftxui/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fujitsu-fftw/package.py11
-rw-r--r--var/spack/repos/builtin/packages/fujitsu-frontistr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fujitsu-mpi/package.py53
-rw-r--r--var/spack/repos/builtin/packages/fujitsu-ssl2/package.py20
-rw-r--r--var/spack/repos/builtin/packages/fullock/package.py3
-rw-r--r--var/spack/repos/builtin/packages/funhpc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/funwave/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fuse-overlayfs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fxdiv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/fxt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/fyba/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fzf/package.py24
-rw-r--r--var/spack/repos/builtin/packages/g2/package.py36
-rw-r--r--var/spack/repos/builtin/packages/g2c/package.py18
-rw-r--r--var/spack/repos/builtin/packages/g2o/package.py3
-rw-r--r--var/spack/repos/builtin/packages/g2tmpl/package.py19
-rw-r--r--var/spack/repos/builtin/packages/g4abla/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4emlow/package.py12
-rw-r--r--var/spack/repos/builtin/packages/g4ensdfstate/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4incl/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4ndl/package.py10
-rw-r--r--var/spack/repos/builtin/packages/g4neutronxs/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4nudexlib/package.py40
-rw-r--r--var/spack/repos/builtin/packages/g4particlexs/package.py10
-rw-r--r--var/spack/repos/builtin/packages/g4photonevaporation/package.py11
-rw-r--r--var/spack/repos/builtin/packages/g4pii/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4radioactivedecay/package.py11
-rw-r--r--var/spack/repos/builtin/packages/g4realsurface/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4saiddata/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4tendl/package.py9
-rw-r--r--var/spack/repos/builtin/packages/g4urrpt/package.py40
-rw-r--r--var/spack/repos/builtin/packages/gadap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gamess-ri-mp2-miniapp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gapbs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/garcon/package.py51
-rw-r--r--var/spack/repos/builtin/packages/garfieldpp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gasnet/package.py99
-rw-r--r--var/spack/repos/builtin/packages/gatb-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gate/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gatepet2stir/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gatetools/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gatk/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gaudi/build_testing.patch13
-rw-r--r--var/spack/repos/builtin/packages/gaudi/includes.patch38
-rw-r--r--var/spack/repos/builtin/packages/gaudi/link_target_fixes.patch106
-rw-r--r--var/spack/repos/builtin/packages/gaudi/link_target_fixes32.patch107
-rw-r--r--var/spack/repos/builtin/packages/gaudi/package.py65
-rw-r--r--var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-building-c-code-with-pgcc.patch25
-rw-r--r--var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-shebangs.patch841
-rw-r--r--var/spack/repos/builtin/packages/gaussian-src/16-C.01-replace-deprecated-pgf77-with-pgfortran.patch146
-rw-r--r--var/spack/repos/builtin/packages/gaussian-src/package.py160
-rw-r--r--var/spack/repos/builtin/packages/gaussian-src/spack_perms_fix.sh.j23
-rw-r--r--var/spack/repos/builtin/packages/gaussian-view/package.py14
-rw-r--r--var/spack/repos/builtin/packages/gawk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gbl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gcc-runtime/package.py118
-rw-r--r--var/spack/repos/builtin/packages/gcc/detection_test.yaml157
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py502
-rw-r--r--var/spack/repos/builtin/packages/gccmakedep/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gccxml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gchp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gconf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gcta/package.py13
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py163
-rw-r--r--var/spack/repos/builtin/packages/gdb/package.py23
-rw-r--r--var/spack/repos/builtin/packages/gdbm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gdk-pixbuf/package.py117
-rw-r--r--var/spack/repos/builtin/packages/gdl/package.py22
-rw-r--r--var/spack/repos/builtin/packages/gdrcopy/package.py18
-rw-r--r--var/spack/repos/builtin/packages/geant3/package.py6
-rw-r--r--var/spack/repos/builtin/packages/geant4-data/package.py45
-rw-r--r--var/spack/repos/builtin/packages/geant4-vmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/geant4/geant4-10.6.patch98
-rw-r--r--var/spack/repos/builtin/packages/geant4/package.py112
-rw-r--r--var/spack/repos/builtin/packages/geant4/twisted-tubes.patch875
-rw-r--r--var/spack/repos/builtin/packages/gearshifft/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gegelati/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gegl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gem5/package.py71
-rw-r--r--var/spack/repos/builtin/packages/gemma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gemmlowp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/genemark-et/package.py3
-rw-r--r--var/spack/repos/builtin/packages/generate-ninja/package.py50
-rw-r--r--var/spack/repos/builtin/packages/generax/package.py3
-rw-r--r--var/spack/repos/builtin/packages/genesis/package.py9
-rw-r--r--var/spack/repos/builtin/packages/genfit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gengeo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gengetopt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/genie/package.py23
-rw-r--r--var/spack/repos/builtin/packages/genomefinisher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/genometools/package.py6
-rw-r--r--var/spack/repos/builtin/packages/genomeworks/package.py5
-rw-r--r--var/spack/repos/builtin/packages/genrich/package.py2
-rw-r--r--var/spack/repos/builtin/packages/geode/package.py17
-rw-r--r--var/spack/repos/builtin/packages/geoip-api-c/package.py8
-rw-r--r--var/spack/repos/builtin/packages/geoip/package.py20
-rw-r--r--var/spack/repos/builtin/packages/geomodel/package.py96
-rw-r--r--var/spack/repos/builtin/packages/geopm-runtime/package.py168
-rw-r--r--var/spack/repos/builtin/packages/geopm-service/0001-Support-NVML-via-CUDA-installation.patch28
-rw-r--r--var/spack/repos/builtin/packages/geopm-service/package.py166
-rw-r--r--var/spack/repos/builtin/packages/geopm/package.py110
-rw-r--r--var/spack/repos/builtin/packages/geos/package.py12
-rw-r--r--var/spack/repos/builtin/packages/gettext/package.py49
-rw-r--r--var/spack/repos/builtin/packages/gexiv2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gfal2-util/package.py21
-rw-r--r--var/spack/repos/builtin/packages/gfal2/package.py91
-rw-r--r--var/spack/repos/builtin/packages/gffcompare/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gffread/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gflags/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gfsio/package.py15
-rw-r--r--var/spack/repos/builtin/packages/gftl-shared/package.py11
-rw-r--r--var/spack/repos/builtin/packages/gftl/package.py10
-rw-r--r--var/spack/repos/builtin/packages/gh/package.py36
-rw-r--r--var/spack/repos/builtin/packages/ghost/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ghostscript/package.py32
-rw-r--r--var/spack/repos/builtin/packages/giflib/package.py13
-rw-r--r--var/spack/repos/builtin/packages/gimp/package.py33
-rw-r--r--var/spack/repos/builtin/packages/ginkgo/1.4.0_dpcpp_use_old_standard.patch70
-rw-r--r--var/spack/repos/builtin/packages/ginkgo/ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch19
-rw-r--r--var/spack/repos/builtin/packages/ginkgo/ginkgo-sycl-pr1524.patch13
-rw-r--r--var/spack/repos/builtin/packages/ginkgo/package.py54
-rw-r--r--var/spack/repos/builtin/packages/git-annex/package.py4
-rw-r--r--var/spack/repos/builtin/packages/git-lfs/package.py6
-rw-r--r--var/spack/repos/builtin/packages/git/package.py223
-rw-r--r--var/spack/repos/builtin/packages/gitconddb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gl2ps/package.py17
-rw-r--r--var/spack/repos/builtin/packages/gl2ps/prevent-ninja-target-clash.patch49
-rw-r--r--var/spack/repos/builtin/packages/glab/package.py47
-rw-r--r--var/spack/repos/builtin/packages/glew/package.py43
-rw-r--r--var/spack/repos/builtin/packages/glfmultiples/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glfw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glib-networking/package.py3
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py49
-rw-r--r--var/spack/repos/builtin/packages/glibc/package.py22
-rw-r--r--var/spack/repos/builtin/packages/glibmm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glimmer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/globalarrays/package.py9
-rw-r--r--var/spack/repos/builtin/packages/globus-callout/package.py31
-rw-r--r--var/spack/repos/builtin/packages/globus-common/package.py28
-rw-r--r--var/spack/repos/builtin/packages/globus-ftp-client/package.py43
-rw-r--r--var/spack/repos/builtin/packages/globus-ftp-control/package.py40
-rw-r--r--var/spack/repos/builtin/packages/globus-gass-copy/package.py37
-rw-r--r--var/spack/repos/builtin/packages/globus-gass-transfer/package.py38
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-callback/package.py34
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-cert-utils/package.py32
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-credential/package.py33
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-openssl-error/package.py36
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-proxy-core/package.py42
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-proxy-ssl/package.py30
-rw-r--r--var/spack/repos/builtin/packages/globus-gsi-sysconfig/package.py32
-rw-r--r--var/spack/repos/builtin/packages/globus-gss-assist/package.py40
-rw-r--r--var/spack/repos/builtin/packages/globus-gssapi-error/package.py37
-rw-r--r--var/spack/repos/builtin/packages/globus-gssapi-gsi/package.py45
-rw-r--r--var/spack/repos/builtin/packages/globus-io/package.py41
-rw-r--r--var/spack/repos/builtin/packages/globus-openssl-module/package.py32
-rw-r--r--var/spack/repos/builtin/packages/globus-xio-gsi-driver/package.py39
-rw-r--r--var/spack/repos/builtin/packages/globus-xio-pipe-driver/package.py31
-rw-r--r--var/spack/repos/builtin/packages/globus-xio-popen-driver/package.py33
-rw-r--r--var/spack/repos/builtin/packages/globus-xio/package.py35
-rw-r--r--var/spack/repos/builtin/packages/glog/package.py39
-rw-r--r--var/spack/repos/builtin/packages/gloo/package.py17
-rw-r--r--var/spack/repos/builtin/packages/glow/package.py50
-rw-r--r--var/spack/repos/builtin/packages/glpk/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gluegen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glusterfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glvis/package.py6
-rw-r--r--var/spack/repos/builtin/packages/gmake/package.py24
-rw-r--r--var/spack/repos/builtin/packages/gmap-gsnap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gmime/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gmodel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gmp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/gmsh/package.py35
-rw-r--r--var/spack/repos/builtin/packages/gmt/package.py17
-rw-r--r--var/spack/repos/builtin/packages/gmtsar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gnds/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gnina/package.py9
-rw-r--r--var/spack/repos/builtin/packages/gnuconfig/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gnupg/package.py126
-rw-r--r--var/spack/repos/builtin/packages/gnuplot/package.py23
-rw-r--r--var/spack/repos/builtin/packages/gnuradio/package.py11
-rw-r--r--var/spack/repos/builtin/packages/gnutls/package.py28
-rw-r--r--var/spack/repos/builtin/packages/go-bootstrap/package.py15
-rw-r--r--var/spack/repos/builtin/packages/go-md2man/package.py32
-rw-r--r--var/spack/repos/builtin/packages/go/package.py62
-rw-r--r--var/spack/repos/builtin/packages/goaccess/package.py25
-rw-r--r--var/spack/repos/builtin/packages/gobject-introspection/package.py31
-rw-r--r--var/spack/repos/builtin/packages/gobject-introspection/sbang-1.60.2.patch11
-rw-r--r--var/spack/repos/builtin/packages/goblin-hmc-sim/package.py6
-rw-r--r--var/spack/repos/builtin/packages/gocryptfs/package.py26
-rw-r--r--var/spack/repos/builtin/packages/goimports/package.py21
-rw-r--r--var/spack/repos/builtin/packages/goma/package.py7
-rw-r--r--var/spack/repos/builtin/packages/google-cloud-cli/package.py4
-rw-r--r--var/spack/repos/builtin/packages/google-cloud-cpp/package.py56
-rw-r--r--var/spack/repos/builtin/packages/google-crc32c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/googletest/package.py13
-rw-r--r--var/spack/repos/builtin/packages/gopls/package.py21
-rw-r--r--var/spack/repos/builtin/packages/gosam-contrib/package.py15
-rw-r--r--var/spack/repos/builtin/packages/gotcha/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gource/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gpcnet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gperf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gperftools/package.py59
-rw-r--r--var/spack/repos/builtin/packages/gpgme/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gpi-2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/gpi-space/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gprofng-gui/package.py29
-rw-r--r--var/spack/repos/builtin/packages/gprolog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gptl/package.py11
-rw-r--r--var/spack/repos/builtin/packages/gptune/package.py200
-rw-r--r--var/spack/repos/builtin/packages/gpu-burn/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gpuscout/package.py30
-rw-r--r--var/spack/repos/builtin/packages/gqrx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gr-osmosdr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/grabix/package.py3
-rw-r--r--var/spack/repos/builtin/packages/grace/package.py3
-rw-r--r--var/spack/repos/builtin/packages/grackle/package.py38
-rw-r--r--var/spack/repos/builtin/packages/gradle/package.py14
-rw-r--r--var/spack/repos/builtin/packages/grads/package.py10
-rw-r--r--var/spack/repos/builtin/packages/grafana/package.py2
-rw-r--r--var/spack/repos/builtin/packages/grandr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graph500/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphblast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphicsmagick/package.py5
-rw-r--r--var/spack/repos/builtin/packages/graphite2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/graphlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py21
-rw-r--r--var/spack/repos/builtin/packages/grass/package.py55
-rw-r--r--var/spack/repos/builtin/packages/grep/package.py16
-rw-r--r--var/spack/repos/builtin/packages/grib-api/package.py6
-rw-r--r--var/spack/repos/builtin/packages/grib-util/package.py21
-rw-r--r--var/spack/repos/builtin/packages/grid/package.py8
-rw-r--r--var/spack/repos/builtin/packages/gridlab-d/package.py5
-rw-r--r--var/spack/repos/builtin/packages/groff/package.py14
-rw-r--r--var/spack/repos/builtin/packages/gromacs-chain-coordinate/package.py13
-rw-r--r--var/spack/repos/builtin/packages/gromacs-swaxs/package.py13
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py427
-rw-r--r--var/spack/repos/builtin/packages/grpc/package.py21
-rw-r--r--var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gsi-ncdiag/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gsibec/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gsl-lite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gsl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gslib/package.py7
-rw-r--r--var/spack/repos/builtin/packages/gsoap/package.py31
-rw-r--r--var/spack/repos/builtin/packages/gtfsort/package.py17
-rw-r--r--var/spack/repos/builtin/packages/gtk-doc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gtkmm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-atl/package.py6
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-dill/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-enet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gtkplus/package.py80
-rw-r--r--var/spack/repos/builtin/packages/gtksourceview/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gts/package.py6
-rw-r--r--var/spack/repos/builtin/packages/guacamole-client/package.py15
-rw-r--r--var/spack/repos/builtin/packages/guacamole-server/package.py9
-rw-r--r--var/spack/repos/builtin/packages/guile/package.py8
-rw-r--r--var/spack/repos/builtin/packages/gunrock/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gurobi/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gxsview/package.py37
-rw-r--r--var/spack/repos/builtin/packages/gxsview/vtk90.patch51
-rw-r--r--var/spack/repos/builtin/packages/gzip/package.py2
-rw-r--r--var/spack/repos/builtin/packages/h5bench/package.py4
-rw-r--r--var/spack/repos/builtin/packages/h5cpp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/h5hut/package.py30
-rw-r--r--var/spack/repos/builtin/packages/h5utils/package.py12
-rw-r--r--var/spack/repos/builtin/packages/h5z-zfp/package.py7
-rw-r--r--var/spack/repos/builtin/packages/haccabana/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hacckernels/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hackrf-host/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hadoop-xrootd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hadoop/package.py9
-rw-r--r--var/spack/repos/builtin/packages/hal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/halide/package.py23
-rw-r--r--var/spack/repos/builtin/packages/hapcut2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/haproxy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hardlink/package.py2
-rw-r--r--var/spack/repos/builtin/packages/harfbuzz/package.py53
-rw-r--r--var/spack/repos/builtin/packages/harminv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hashcat/package.py3
-rw-r--r--var/spack/repos/builtin/packages/haveged/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hazelcast/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hbm-dramsim2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf-eos2/hdf-eos2.configure.patch25
-rw-r--r--var/spack/repos/builtin/packages/hdf-eos2/package.py82
-rw-r--r--var/spack/repos/builtin/packages/hdf-eos5/package.py26
-rw-r--r--var/spack/repos/builtin/packages/hdf/package.py30
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vfd-gds/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vol-async/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vol-cache/package.py5
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vol-daos/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vol-external-passthrough/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf5-vol-log/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hdf5/find_package_zlib.patch12
-rw-r--r--var/spack/repos/builtin/packages/hdf5/hdf5_1_14_3_fpe.patch203
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py309
-rw-r--r--var/spack/repos/builtin/packages/heaptrack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/heasoft/package.py8
-rw-r--r--var/spack/repos/builtin/packages/heffte/package.py24
-rw-r--r--var/spack/repos/builtin/packages/heimdall/package.py49
-rw-r--r--var/spack/repos/builtin/packages/helib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/helics/package.py28
-rw-r--r--var/spack/repos/builtin/packages/help2man/package.py2
-rw-r--r--var/spack/repos/builtin/packages/henson/package.py10
-rw-r--r--var/spack/repos/builtin/packages/hepmc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hepmc3/package.py28
-rw-r--r--var/spack/repos/builtin/packages/hepmcanalysis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/heppdt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hermes-shm/package.py87
-rw-r--r--var/spack/repos/builtin/packages/hermes/package.py101
-rw-r--r--var/spack/repos/builtin/packages/herwig3/package.py4
-rw-r--r--var/spack/repos/builtin/packages/herwigpp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hevea/package.py2
-rw-r--r--var/spack/repos/builtin/packages/heyoka/package.py88
-rw-r--r--var/spack/repos/builtin/packages/hh-suite/package.py11
-rw-r--r--var/spack/repos/builtin/packages/hicops/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hicup/package.py55
-rw-r--r--var/spack/repos/builtin/packages/highfive/package.py8
-rw-r--r--var/spack/repos/builtin/packages/highway/package.py23
-rw-r--r--var/spack/repos/builtin/packages/highwayhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hiop/package.py114
-rw-r--r--var/spack/repos/builtin/packages/hip-examples/package.py10
-rw-r--r--var/spack/repos/builtin/packages/hip-rocclr/opengl.patch49
-rw-r--r--var/spack/repos/builtin/packages/hip-rocclr/package.py208
-rw-r--r--var/spack/repos/builtin/packages/hip-tensor/package.py59
-rw-r--r--var/spack/repos/builtin/packages/hip/0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch27
-rw-r--r--var/spack/repos/builtin/packages/hip/0002-Fix-detection-of-HIP_CLANG_ROOT.patch28
-rw-r--r--var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch47
-rw-r--r--var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.10.0.patch56
-rw-r--r--var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.7.0.patch56
-rw-r--r--var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.4.1.0.patch44
-rw-r--r--var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch32
-rw-r--r--var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch35
-rw-r--r--var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.5.0.patch53
-rw-r--r--var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.6.0.patch65
-rw-r--r--var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.9.0.patch68
-rw-r--r--var/spack/repos/builtin/packages/hip/0005-Disable-tests-4.1.0.patch42
-rw-r--r--var/spack/repos/builtin/packages/hip/0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host_disabletests.4.5.0.patch101
-rw-r--r--var/spack/repos/builtin/packages/hip/0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.0.patch79
-rw-r--r--var/spack/repos/builtin/packages/hip/0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.2.patch78
-rw-r--r--var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.0.patch78
-rw-r--r--var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch71
-rw-r--r--var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.0.patch30
-rw-r--r--var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.1.patch21
-rw-r--r--var/spack/repos/builtin/packages/hip/0017-Set-PARAMETERS_MIN_ALIGNMENT-to-the-native-alignment.patch63
-rw-r--r--var/spack/repos/builtin/packages/hip/0018-reverting-hipMemoryType-with-memoryType.patch17
-rw-r--r--var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch125
-rw-r--r--var/spack/repos/builtin/packages/hip/package.py632
-rw-r--r--var/spack/repos/builtin/packages/hipace/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hipblas/hipblas-link-clients-blas-5.0.0.patch26
-rw-r--r--var/spack/repos/builtin/packages/hipblas/link-clients-blas-4.5.0.patch26
-rw-r--r--var/spack/repos/builtin/packages/hipblas/link-clients-blas.patch24
-rw-r--r--var/spack/repos/builtin/packages/hipblas/package.py187
-rw-r--r--var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation-6.0.patch32
-rw-r--r--var/spack/repos/builtin/packages/hipblaslt/0001-Set-LLVM_Path-Add-Hiblas-Include-to-CmakeLists-6.1.Patch88
-rw-r--r--var/spack/repos/builtin/packages/hipblaslt/001_Set_LLVM_Paths_And_Add_Includes.patch70
-rw-r--r--var/spack/repos/builtin/packages/hipblaslt/package.py75
-rw-r--r--var/spack/repos/builtin/packages/hipcc/0001-Update-the-ROCMINFO-HIPCLANG-PATHS-inside-hipcc-6.2.0.patch57
-rw-r--r--var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.0.patch30
-rw-r--r--var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.1.patch30
-rw-r--r--var/spack/repos/builtin/packages/hipcc/package.py69
-rw-r--r--var/spack/repos/builtin/packages/hipcub/find-hip-cuda-rocm-5.1.patch13
-rw-r--r--var/spack/repos/builtin/packages/hipcub/package.py154
-rw-r--r--var/spack/repos/builtin/packages/hipfft/001-remove-submodule-and-sync-shared-files-from-rocFFT.patch11431
-rw-r--r--var/spack/repos/builtin/packages/hipfft/package.py112
-rw-r--r--var/spack/repos/builtin/packages/hipfort/package.py121
-rw-r--r--var/spack/repos/builtin/packages/hipify-clang/0001-use-source-permission-for-hipify-perl.patch12
-rw-r--r--var/spack/repos/builtin/packages/hipify-clang/0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch22
-rw-r--r--var/spack/repos/builtin/packages/hipify-clang/package.py157
-rw-r--r--var/spack/repos/builtin/packages/hiprand/package.py48
-rw-r--r--var/spack/repos/builtin/packages/hipsolver/0001-suite-sparse-include-path-6.1.1.patch38
-rw-r--r--var/spack/repos/builtin/packages/hipsolver/001-suite-sparse-include-path.patch38
-rw-r--r--var/spack/repos/builtin/packages/hipsolver/package.py106
-rw-r--r--var/spack/repos/builtin/packages/hipsparse/530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch93
-rw-r--r--var/spack/repos/builtin/packages/hipsparse/e79985dccde22d826aceb3badfc643a3227979d2.patch93
-rw-r--r--var/spack/repos/builtin/packages/hipsparse/package.py157
-rw-r--r--var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch77
-rw-r--r--var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch77
-rw-r--r--var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch92
-rw-r--r--var/spack/repos/builtin/packages/hipsparselt/package.py91
-rw-r--r--var/spack/repos/builtin/packages/hipsycl/package.py130
-rw-r--r--var/spack/repos/builtin/packages/hiptt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hiredis/package.py21
-rw-r--r--var/spack/repos/builtin/packages/hisat2/package.py35
-rw-r--r--var/spack/repos/builtin/packages/hisea/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hive/package.py14
-rw-r--r--var/spack/repos/builtin/packages/hivex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hmmer/package.py6
-rw-r--r--var/spack/repos/builtin/packages/hohqmesh/package.py11
-rw-r--r--var/spack/repos/builtin/packages/homer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hoomd-blue/package.py14
-rw-r--r--var/spack/repos/builtin/packages/hoppet/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hotspot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hpcc/package.py19
-rw-r--r--var/spack/repos/builtin/packages/hpccg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/hpcg/package.py10
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/correcting-hsa-include-path.patch13
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/package.py271
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/test/sort.cpp54
-rw-r--r--var/spack/repos/builtin/packages/hpcviewer/package.py120
-rw-r--r--var/spack/repos/builtin/packages/hpcx-mpi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hpddm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hpgmg/package.py12
-rw-r--r--var/spack/repos/builtin/packages/hping/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hpl/package.py33
-rw-r--r--var/spack/repos/builtin/packages/hpx-kokkos/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hpx/package.py42
-rw-r--r--var/spack/repos/builtin/packages/hpx5/package.py25
-rw-r--r--var/spack/repos/builtin/packages/hsa-rocr-dev/0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch28
-rw-r--r--var/spack/repos/builtin/packages/hsa-rocr-dev/package.py186
-rw-r--r--var/spack/repos/builtin/packages/hsakmt-roct/0001-Remove-compiler-support-libraries-and-libudev-as-req.patch34
-rw-r--r--var/spack/repos/builtin/packages/hsakmt-roct/package.py158
-rw-r--r--var/spack/repos/builtin/packages/hsakmt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hssp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hstr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hto4l/package.py2
-rw-r--r--var/spack/repos/builtin/packages/htop/package.py3
-rw-r--r--var/spack/repos/builtin/packages/htslib/package.py24
-rw-r--r--var/spack/repos/builtin/packages/http-get/package.py2
-rw-r--r--var/spack/repos/builtin/packages/http-load/package.py2
-rw-r--r--var/spack/repos/builtin/packages/http-parser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/http-ping/package.py2
-rw-r--r--var/spack/repos/builtin/packages/http-post/package.py2
-rw-r--r--var/spack/repos/builtin/packages/httpd/package.py29
-rw-r--r--var/spack/repos/builtin/packages/httperf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hub/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hudi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hugo/package.py62
-rw-r--r--var/spack/repos/builtin/packages/hunspell/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hw-probe/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hwloc/package.py34
-rw-r--r--var/spack/repos/builtin/packages/hybpiper/package.py33
-rw-r--r--var/spack/repos/builtin/packages/hybrid-lambda/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hybridsim/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hydra/package.py4
-rw-r--r--var/spack/repos/builtin/packages/hydrogen/cmake-intel-mpi-escape-quotes-pr177.patch12
-rw-r--r--var/spack/repos/builtin/packages/hydrogen/package.py49
-rw-r--r--var/spack/repos/builtin/packages/hypar/package.py17
-rw-r--r--var/spack/repos/builtin/packages/hyperfine/package.py13
-rw-r--r--var/spack/repos/builtin/packages/hyperscan/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hyphen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hyphy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hypre-cmake/package.py73
-rw-r--r--var/spack/repos/builtin/packages/hypre/hypre-precision-fix.patch27
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py210
-rw-r--r--var/spack/repos/builtin/packages/hztool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/i3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ibm-databroker/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ibm-java/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ibmisc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/icarus/package.py3
-rw-r--r--var/spack/repos/builtin/packages/iceauth/package.py7
-rw-r--r--var/spack/repos/builtin/packages/icedtea/package.py9
-rw-r--r--var/spack/repos/builtin/packages/icet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ico/package.py6
-rw-r--r--var/spack/repos/builtin/packages/icon/package.py282
-rw-r--r--var/spack/repos/builtin/packages/icu4c/package.py86
-rw-r--r--var/spack/repos/builtin/packages/id3lib/package.py5
-rw-r--r--var/spack/repos/builtin/packages/idba/package.py2
-rw-r--r--var/spack/repos/builtin/packages/idg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/igprof/package.py4
-rw-r--r--var/spack/repos/builtin/packages/igraph/package.py8
-rw-r--r--var/spack/repos/builtin/packages/igv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ike-scan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ilmbase/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ima-evm-utils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/imagemagick/package.py59
-rw-r--r--var/spack/repos/builtin/packages/imake/package.py9
-rw-r--r--var/spack/repos/builtin/packages/imath/package.py4
-rw-r--r--var/spack/repos/builtin/packages/imgui/package.py4
-rw-r--r--var/spack/repos/builtin/packages/imlib2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/imp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/impalajit/package.py7
-rw-r--r--var/spack/repos/builtin/packages/improved-rdock/package.py68
-rw-r--r--var/spack/repos/builtin/packages/infernal/package.py12
-rw-r--r--var/spack/repos/builtin/packages/iniparser/package.py3
-rw-r--r--var/spack/repos/builtin/packages/intel-daal/package.py141
-rw-r--r--var/spack/repos/builtin/packages/intel-gpu-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/intel-gtpin/package.py25
-rw-r--r--var/spack/repos/builtin/packages/intel-ipp/package.py130
-rw-r--r--var/spack/repos/builtin/packages/intel-llvm/package.py8
-rw-r--r--var/spack/repos/builtin/packages/intel-mkl/package.py46
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py33
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi/package.py58
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py48
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py44
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/detection_test.yaml89
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py23
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-compilers/detection_test.yaml23
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py241
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-dal/package.py61
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py65
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py38
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py55
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py20
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py44
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py44
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-itac/package.py20
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py141
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py136
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py68
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py44
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py14
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py56
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py192
-rw-r--r--var/spack/repos/builtin/packages/intel-pin/package.py23
-rw-r--r--var/spack/repos/builtin/packages/intel-tbb/package.py27
-rw-r--r--var/spack/repos/builtin/packages/intel-xed/package.py142
-rw-r--r--var/spack/repos/builtin/packages/intel/detection_test.yaml42
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py63
-rw-r--r--var/spack/repos/builtin/packages/interproscan/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ioapi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ior/package.py9
-rw-r--r--var/spack/repos/builtin/packages/iozone/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ip/package.py43
-rw-r--r--var/spack/repos/builtin/packages/ip2/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ipcalc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/iperf2/package.py5
-rw-r--r--var/spack/repos/builtin/packages/iperf3/package.py12
-rw-r--r--var/spack/repos/builtin/packages/ipm/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ipopt/ipopt_mumps_mpi_comm_option.patch56
-rw-r--r--var/spack/repos/builtin/packages/ipopt/package.py35
-rw-r--r--var/spack/repos/builtin/packages/iproute2/package.py13
-rw-r--r--var/spack/repos/builtin/packages/iptraf-ng/package.py2
-rw-r--r--var/spack/repos/builtin/packages/iq-tree/package.py15
-rw-r--r--var/spack/repos/builtin/packages/iqtree2/package.py43
-rw-r--r--var/spack/repos/builtin/packages/irep/package.py4
-rw-r--r--var/spack/repos/builtin/packages/isa-l-crypto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/isa-l/package.py2
-rw-r--r--var/spack/repos/builtin/packages/isaac-server/package.py2
-rw-r--r--var/spack/repos/builtin/packages/isaac/package.py2
-rw-r--r--var/spack/repos/builtin/packages/isc-dhcp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/isescan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/isl/package.py6
-rw-r--r--var/spack/repos/builtin/packages/iso-codes/package.py1
-rw-r--r--var/spack/repos/builtin/packages/isoquant/package.py45
-rw-r--r--var/spack/repos/builtin/packages/ispc/package.py40
-rw-r--r--var/spack/repos/builtin/packages/istio/package.py12
-rw-r--r--var/spack/repos/builtin/packages/itensor/package.py25
-rw-r--r--var/spack/repos/builtin/packages/itk/package.py8
-rw-r--r--var/spack/repos/builtin/packages/itstool/package.py4
-rw-r--r--var/spack/repos/builtin/packages/iwyu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jackcess/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jags/package.py7
-rw-r--r--var/spack/repos/builtin/packages/jali/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jansi-native/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jansson/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jasper/package.py105
-rw-r--r--var/spack/repos/builtin/packages/javafx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jbigkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jchronoss/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jdk/package.py139
-rw-r--r--var/spack/repos/builtin/packages/jellyfish/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jemalloc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jhpcn-df/package.py4
-rw-r--r--var/spack/repos/builtin/packages/jimtcl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jmol/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jogl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/jose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jpegoptim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/json-c/package.py8
-rw-r--r--var/spack/repos/builtin/packages/json-cwx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/json-fortran/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jsoncpp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/jsonnet/package.py7
-rw-r--r--var/spack/repos/builtin/packages/jube/package.py25
-rw-r--r--var/spack/repos/builtin/packages/judy/package.py6
-rw-r--r--var/spack/repos/builtin/packages/julea/package.py3
-rw-r--r--var/spack/repos/builtin/packages/julia/julia-1.10-rm-suite-sparse-cuda-stubs.patch16
-rw-r--r--var/spack/repos/builtin/packages/julia/package.py85
-rw-r--r--var/spack/repos/builtin/packages/jump/package.py23
-rw-r--r--var/spack/repos/builtin/packages/justbuild/package.py8
-rw-r--r--var/spack/repos/builtin/packages/jwt-cpp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/jxrlib-debian/package.py2
-rw-r--r--var/spack/repos/builtin/packages/k8/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kadath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kafka/package.py11
-rw-r--r--var/spack/repos/builtin/packages/kahip/cstdint.patch11
-rw-r--r--var/spack/repos/builtin/packages/kahip/package.py5
-rw-r--r--var/spack/repos/builtin/packages/kakoune-lsp/package.py19
-rw-r--r--var/spack/repos/builtin/packages/kakoune/package.py15
-rw-r--r--var/spack/repos/builtin/packages/kaks-calculator/package.py4
-rw-r--r--var/spack/repos/builtin/packages/kaldi/package.py18
-rw-r--r--var/spack/repos/builtin/packages/kalign/package.py3
-rw-r--r--var/spack/repos/builtin/packages/kallisto/package.py27
-rw-r--r--var/spack/repos/builtin/packages/kassiopeia/package.py5
-rw-r--r--var/spack/repos/builtin/packages/kbd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kcov/package.py25
-rw-r--r--var/spack/repos/builtin/packages/kdiff3/package.py4
-rw-r--r--var/spack/repos/builtin/packages/kea/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kealib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/keepalived/package.py4
-rw-r--r--var/spack/repos/builtin/packages/keepassxc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/kentutils/fix-mysql-options-gcc13.patch13
-rw-r--r--var/spack/repos/builtin/packages/kentutils/mysql-zlib-workaround.patch13
-rw-r--r--var/spack/repos/builtin/packages/kentutils/package.py159
-rw-r--r--var/spack/repos/builtin/packages/keyutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/khmer/package.py35
-rw-r--r--var/spack/repos/builtin/packages/kibana/package.py5
-rw-r--r--var/spack/repos/builtin/packages/kicad/package.py6
-rw-r--r--var/spack/repos/builtin/packages/kim-api/package.py8
-rw-r--r--var/spack/repos/builtin/packages/kineto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kitty/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kmergenie/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kmod/package.py2
-rw-r--r--var/spack/repos/builtin/packages/knem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kokkos-kernels-legacy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kokkos-kernels/package.py170
-rw-r--r--var/spack/repos/builtin/packages/kokkos-legacy/package.py57
-rw-r--r--var/spack/repos/builtin/packages/kokkos-nvcc-wrapper/package.py10
-rw-r--r--var/spack/repos/builtin/packages/kokkos-tools/package.py31
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py283
-rw-r--r--var/spack/repos/builtin/packages/kraken/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kraken2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/krakenuniq/package.py4
-rw-r--r--var/spack/repos/builtin/packages/krb5/package.py69
-rw-r--r--var/spack/repos/builtin/packages/krims/package.py6
-rw-r--r--var/spack/repos/builtin/packages/kripke/001-remove-googletest-from-cmake.patch25
-rw-r--r--var/spack/repos/builtin/packages/kripke/package.py46
-rw-r--r--var/spack/repos/builtin/packages/kubectl/package.py14
-rw-r--r--var/spack/repos/builtin/packages/kubernetes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kumi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kvasir-mpl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kvtree/package.py9
-rw-r--r--var/spack/repos/builtin/packages/kylin/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kyotocabinet/package.py14
-rw-r--r--var/spack/repos/builtin/packages/laghos/package.py11
-rw-r--r--var/spack/repos/builtin/packages/lame/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lammps-example-plugin/package.py79
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py212
-rw-r--r--var/spack/repos/builtin/packages/landsfcutil/package.py15
-rw-r--r--var/spack/repos/builtin/packages/lapackpp/package.py26
-rw-r--r--var/spack/repos/builtin/packages/last/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lastz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/laszip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/latex2html/package.py9
-rw-r--r--var/spack/repos/builtin/packages/latte/package.py9
-rw-r--r--var/spack/repos/builtin/packages/launchmon/package.py3
-rw-r--r--var/spack/repos/builtin/packages/laynii/package.py31
-rw-r--r--var/spack/repos/builtin/packages/lazygit/package.py6
-rw-r--r--var/spack/repos/builtin/packages/lazyten/package.py8
-rw-r--r--var/spack/repos/builtin/packages/lbann/package.py30
-rw-r--r--var/spack/repos/builtin/packages/lbfgspp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lbxproxy/package.py8
-rw-r--r--var/spack/repos/builtin/packages/lc-framework/package.py51
-rw-r--r--var/spack/repos/builtin/packages/lcc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lci/package.py200
-rw-r--r--var/spack/repos/builtin/packages/lcio/package.py7
-rw-r--r--var/spack/repos/builtin/packages/lcms/package.py36
-rw-r--r--var/spack/repos/builtin/packages/lcov/package.py9
-rw-r--r--var/spack/repos/builtin/packages/ldak/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ldc-bootstrap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ldc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ldsc/package.py26
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py197
-rw-r--r--var/spack/repos/builtin/packages/lemon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/leptonica/package.py6
-rw-r--r--var/spack/repos/builtin/packages/lerc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/less/package.py14
-rw-r--r--var/spack/repos/builtin/packages/lesstif/package.py8
-rw-r--r--var/spack/repos/builtin/packages/leveldb/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lfortran/package.py10
-rw-r--r--var/spack/repos/builtin/packages/lftp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/lhapdf/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lhapdf5/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lhapdfsets/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libabigail/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libaec/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libaio/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libao/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libapplewm/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libapreq2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libarchive/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libasr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libassuan/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libatasmart/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libatomic-ops/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libavif/package.py29
-rw-r--r--var/spack/repos/builtin/packages/libbacktrace/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libbeagle/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libbeato/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libbigwig/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libbinio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libblastrampoline/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libbsd/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libbson/package.py76
-rw-r--r--var/spack/repos/builtin/packages/libbytesize/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libc/package.py24
-rw-r--r--var/spack/repos/builtin/packages/libcanberra/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libcap-ng/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libcap/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libcatalyst/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libceed/package.py25
-rw-r--r--var/spack/repos/builtin/packages/libcerf/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libcgroup/package.py23
-rw-r--r--var/spack/repos/builtin/packages/libcint/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libcircle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libconfig/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libconfuse/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libcroco/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libctl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libcudf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libcuml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libcumlprims/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libcxxwrap-julia/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libcyaml/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libdaemon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libdap4/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libdatrie/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libdc1394/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libde265/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libdeflate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libdicom/package.py30
-rw-r--r--var/spack/repos/builtin/packages/libdistributed/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libdivsufsort/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libdmx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libdrm/package.py64
-rw-r--r--var/spack/repos/builtin/packages/libdwarf/package.py94
-rw-r--r--var/spack/repos/builtin/packages/libeatmydata/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libecpint/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libedit/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libefence/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libelf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libepoxy/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libestr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libev/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libevdev/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libevent/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libevpath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libexif/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libfabric/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libfastcommon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libfastjson/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libffi/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libffs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libfirefly/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libfive/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libflame/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libfms/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libfontenc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libfort/package.py39
-rw-r--r--var/spack/repos/builtin/packages/libfs/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libfuse/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libfyaml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libgain/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch33
-rw-r--r--var/spack/repos/builtin/packages/libgcrypt/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libgd/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libgdsii/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libgeotiff/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libgff/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libgit2/package.py19
-rw-r--r--var/spack/repos/builtin/packages/libgpg-error/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libgpuarray/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libgridxc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libgssglue/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libgta/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libgtextutils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libgtop/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libgudev/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libharu/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libhbaapi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libheif/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libhio/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libhugetlbfs/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libiberty/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libibumad/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libical/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libicd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libice/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libiconv/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libid3tag/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libidl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libidn/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libidn2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libimagequant/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libinih/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py98
-rw-r--r--var/spack/repos/builtin/packages/libisal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libiscsi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libjpeg-turbo/package.py34
-rw-r--r--var/spack/repos/builtin/packages/libjpeg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libjson/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libjwt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libjxl/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libkcapi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libkml/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libksba/package.py43
-rw-r--r--var/spack/repos/builtin/packages/liblas/package.py11
-rw-r--r--var/spack/repos/builtin/packages/liblbxutil/package.py8
-rw-r--r--var/spack/repos/builtin/packages/liblockfile/package.py2
-rw-r--r--var/spack/repos/builtin/packages/liblognorm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/liblouis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libluv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/liblzf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmacaroons/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmad/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmatheval/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmaus2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libmaxminddb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libmbim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmcrypt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmesh/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libmetalink/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmicrodns/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmicrohttpd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmmtf-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmng/package.py25
-rw-r--r--var/spack/repos/builtin/packages/libmnl/package.py32
-rw-r--r--var/spack/repos/builtin/packages/libmo-unpack/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmodbus/package.py27
-rw-r--r--var/spack/repos/builtin/packages/libmolgrid/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libmonitor/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libmpdclient/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libmypaint/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libnbc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libndp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnet/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libnetfilter-conntrack/package.py35
-rw-r--r--var/spack/repos/builtin/packages/libnetfilter-cthelper/package.py23
-rw-r--r--var/spack/repos/builtin/packages/libnetfilter-cttimeout/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libnetfilter-queue/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libnetworkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnfnetlink/package.py28
-rw-r--r--var/spack/repos/builtin/packages/libnfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnfsidmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnftnl/package.py19
-rw-r--r--var/spack/repos/builtin/packages/libnids/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libnl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnotify/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnova/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libnrm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libnsl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libogg/package.py26
-rw-r--r--var/spack/repos/builtin/packages/liboldx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libopts/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libp11/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libpam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libpaper/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libpcap/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libpciaccess/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libpfm4/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libpipeline/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libplist/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libpmemobj-cpp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libpng/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libpostal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libpressio-adios1/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libpressio-adios2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libpressio-dataset/package.py44
-rw-r--r--var/spack/repos/builtin/packages/libpressio-errorinjector/package.py8
-rwxr-xr-xvar/spack/repos/builtin/packages/libpressio-jit/package.py30
-rw-r--r--var/spack/repos/builtin/packages/libpressio-nvcomp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libpressio-opt/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libpressio-predict/package.py66
-rw-r--r--var/spack/repos/builtin/packages/libpressio-rmetric/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libpressio-sperr/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libpressio-tools/package.py66
-rw-r--r--var/spack/repos/builtin/packages/libpressio-tthresh/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libpressio/package.py238
-rw-r--r--var/spack/repos/builtin/packages/libproxy/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libpsl/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libpsm3/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libpsml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libpspio/package.py (renamed from var/spack/repos/tutorial/packages/libpspio/package.py)4
-rw-r--r--var/spack/repos/builtin/packages/libpthread-stubs/package.py1
-rw-r--r--var/spack/repos/builtin/packages/libpulsar/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libqrencode/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libquo/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libraqm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libraw1394/package.py2
-rw-r--r--var/spack/repos/builtin/packages/librdkafka/package.py8
-rw-r--r--var/spack/repos/builtin/packages/librelp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libreproc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libressl/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libristra/package.py6
-rw-r--r--var/spack/repos/builtin/packages/librmm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/librom/package.py4
-rw-r--r--var/spack/repos/builtin/packages/librsb/package.py27
-rw-r--r--var/spack/repos/builtin/packages/librsvg/package.py12
-rw-r--r--var/spack/repos/builtin/packages/librtlsdr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/librttopo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsakura/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libsamplerate/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libseccomp/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libsecret/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsharp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/libshm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsigcpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsignal-protocol-c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsigsegv/new_config_guess.patch (renamed from var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess)0
-rw-r--r--var/spack/repos/builtin/packages/libsigsegv/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libsixel/package.py45
-rw-r--r--var/spack/repos/builtin/packages/libslirp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsm/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libsndfile/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libsodium/package.py21
-rw-r--r--var/spack/repos/builtin/packages/libsolv/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libspatialindex/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libspatialite/package.py42
-rw-r--r--var/spack/repos/builtin/packages/libspiro/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsplash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libspng/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libssh/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libssh2/package.py32
-rw-r--r--var/spack/repos/builtin/packages/libstdcompat/package.py25
-rw-r--r--var/spack/repos/builtin/packages/libsvm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libszip/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libtar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtasn1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtermkey/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libthai/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtheora/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libtiff/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libtirpc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtlx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtomlc99/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtommath/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libtool/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libtorrent/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libtraceevent/package.py50
-rw-r--r--var/spack/repos/builtin/packages/libtree/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libuecc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libunistring/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libunwind/package.py32
-rw-r--r--var/spack/repos/builtin/packages/liburcu/package.py26
-rw-r--r--var/spack/repos/builtin/packages/liburing/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libusb/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libuser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libuuid/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libuv-julia/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libuv/package.py100
-rw-r--r--var/spack/repos/builtin/packages/libva/package.py46
-rw-r--r--var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch13
-rw-r--r--var/spack/repos/builtin/packages/libvdwxc/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libverto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libvips/package.py20
-rw-r--r--var/spack/repos/builtin/packages/libvorbis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libvori/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libvpx/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libvterm/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libwebp/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libwebsockets/package.py7
-rw-r--r--var/spack/repos/builtin/packages/libwhich/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libwindowswm/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libwmf/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libwnck/package.py76
-rw-r--r--var/spack/repos/builtin/packages/libx11/package.py32
-rw-r--r--var/spack/repos/builtin/packages/libxau/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxaw/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libxaw3d/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libxc/nvhpc-configure.patch75
-rw-r--r--var/spack/repos/builtin/packages/libxc/nvhpc-libtool.patch77
-rw-r--r--var/spack/repos/builtin/packages/libxc/package.py74
-rw-r--r--var/spack/repos/builtin/packages/libxcb/package.py46
-rw-r--r--var/spack/repos/builtin/packages/libxcomposite/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxcrypt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libxcursor/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libxcvt/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libxdamage/package.py14
-rw-r--r--var/spack/repos/builtin/packages/libxdmcp/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxevie/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libxext/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libxfce4ui/package.py66
-rw-r--r--var/spack/repos/builtin/packages/libxfce4util/package.py56
-rw-r--r--var/spack/repos/builtin/packages/libxfixes/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libxfont/package.py10
-rw-r--r--var/spack/repos/builtin/packages/libxfont2/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libxfontcache/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libxft/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxi/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libxinerama/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxkbcommon/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxkbfile/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxkbui/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libxml2/package.py85
-rw-r--r--var/spack/repos/builtin/packages/libxmu/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxp/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxpm/package.py14
-rw-r--r--var/spack/repos/builtin/packages/libxpresent/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libxprintapputil/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libxprintutil/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libxrandr/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libxrender/package.py9
-rw-r--r--var/spack/repos/builtin/packages/libxres/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libxscrnsaver/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxshmfence/package.py17
-rw-r--r--var/spack/repos/builtin/packages/libxslt/package.py32
-rw-r--r--var/spack/repos/builtin/packages/libxsmm/package.py29
-rw-r--r--var/spack/repos/builtin/packages/libxstream/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libxt/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libxtrap/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libxtst/package.py16
-rw-r--r--var/spack/repos/builtin/packages/libxv/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxvmc/package.py15
-rw-r--r--var/spack/repos/builtin/packages/libxxf86dga/package.py14
-rw-r--r--var/spack/repos/builtin/packages/libxxf86misc/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libxxf86vm/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libyaml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libyogrt/package.py14
-rw-r--r--var/spack/repos/builtin/packages/libzip/package.py41
-rw-r--r--var/spack/repos/builtin/packages/libzmq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/liftoff/package.py39
-rw-r--r--var/spack/repos/builtin/packages/liggghts/package.py14
-rw-r--r--var/spack/repos/builtin/packages/lighttpd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ligra/package.py4
-rw-r--r--var/spack/repos/builtin/packages/likwid/package.py21
-rw-r--r--var/spack/repos/builtin/packages/lima/package.py28
-rw-r--r--var/spack/repos/builtin/packages/linaro-forge/package.py66
-rw-r--r--var/spack/repos/builtin/packages/linkphase3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/linktest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/linux-external-modules/kconfig_allconfig141
-rw-r--r--var/spack/repos/builtin/packages/linux-external-modules/package.py341
-rw-r--r--var/spack/repos/builtin/packages/linux-headers/package.py5
-rw-r--r--var/spack/repos/builtin/packages/linux-pam/package.py54
-rw-r--r--var/spack/repos/builtin/packages/linux-perf/package.py275
-rw-r--r--var/spack/repos/builtin/packages/lis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/listres/package.py3
-rw-r--r--var/spack/repos/builtin/packages/litestream/package.py23
-rw-r--r--var/spack/repos/builtin/packages/lizard/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lksctp-tools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/detection_test.yaml103
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/fix-ncurses-3.9.0.patch25
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/fix-spack-detection-4.2.0.patch94
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/fix-system-zlib-ncurses.patch60
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/package.py374
-rw-r--r--var/spack/repos/builtin/packages/llvm-amdgpu/remove-cyclades-inclusion-in-sanitizer.patch114
-rw-r--r--var/spack/repos/builtin/packages/llvm-doe/package.py73
-rw-r--r--var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py10
-rw-r--r--var/spack/repos/builtin/packages/llvm-openmp/package.py48
-rw-r--r--var/spack/repos/builtin/packages/llvm/detection_test.yaml156
-rw-r--r--var/spack/repos/builtin/packages/llvm/llvm17-18-thread.patch22
-rw-r--r--var/spack/repos/builtin/packages/llvm/llvm17-fujitsu.patch28
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py342
-rw-r--r--var/spack/repos/builtin/packages/lm-sensors/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lmbench/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lmdb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py8
-rw-r--r--var/spack/repos/builtin/packages/lndir/package.py7
-rw-r--r--var/spack/repos/builtin/packages/lodepng/package.py3
-rw-r--r--var/spack/repos/builtin/packages/log4c/package.py5
-rw-r--r--var/spack/repos/builtin/packages/log4cplus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/log4cpp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/log4cxx/package.py35
-rw-r--r--var/spack/repos/builtin/packages/logrotate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/logstash/package.py19
-rw-r--r--var/spack/repos/builtin/packages/loki/package.py10
-rw-r--r--var/spack/repos/builtin/packages/looptools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lordec/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lorene/package.py15
-rw-r--r--var/spack/repos/builtin/packages/lp-solve/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lrslib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lrzip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lshw/package.py15
-rw-r--r--var/spack/repos/builtin/packages/lsscsi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ltp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ltr-retriever/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ltrace/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lua-bitlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lua-ffi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lua-lpeg/package.py45
-rw-r--r--var/spack/repos/builtin/packages/lua-luafilesystem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lua-luajit-openresty/package.py26
-rw-r--r--var/spack/repos/builtin/packages/lua-luajit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lua-luaposix/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lua-mpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lua-sol2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/lua/package.py55
-rw-r--r--var/spack/repos/builtin/packages/lucene/package.py32
-rw-r--r--var/spack/repos/builtin/packages/luit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lulesh/package.py8
-rw-r--r--var/spack/repos/builtin/packages/lumpy-sv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lvarray/package.py33
-rw-r--r--var/spack/repos/builtin/packages/lvm2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lwgrp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/lwtnn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lxc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lynx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lz4/package.py16
-rw-r--r--var/spack/repos/builtin/packages/lzma/package.py3
-rw-r--r--var/spack/repos/builtin/packages/lzo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lzop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/m4/package.py3
-rw-r--r--var/spack/repos/builtin/packages/macfuse/package.py1
-rw-r--r--var/spack/repos/builtin/packages/macsio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mad-numdiff/package.py2
-rw-r--r--var/spack/repos/builtin/packages/madgraph5amc/gcc14.patch38
-rw-r--r--var/spack/repos/builtin/packages/madgraph5amc/package.py74
-rw-r--r--var/spack/repos/builtin/packages/madis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/madx/package.py5
-rw-r--r--var/spack/repos/builtin/packages/maeparser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mafft/package.py4
-rw-r--r--var/spack/repos/builtin/packages/magic-enum/package.py44
-rw-r--r--var/spack/repos/builtin/packages/magics/package.py21
-rw-r--r--var/spack/repos/builtin/packages/magma/0001-fix-magma-build-error-with-rocm-6.0.0.patch99
-rw-r--r--var/spack/repos/builtin/packages/magma/package.py96
-rw-r--r--var/spack/repos/builtin/packages/makedepend/package.py7
-rw-r--r--var/spack/repos/builtin/packages/makedepf90/package.py24
-rw-r--r--var/spack/repos/builtin/packages/mallocmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/maloc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/malt/package.py14
-rw-r--r--var/spack/repos/builtin/packages/man-db/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mapl/package.py193
-rw-r--r--var/spack/repos/builtin/packages/mapnik/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mapserver/package.py9
-rw-r--r--var/spack/repos/builtin/packages/maq/package.py5
-rw-r--r--var/spack/repos/builtin/packages/margo/package.py133
-rw-r--r--var/spack/repos/builtin/packages/mariadb-c-client/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mariadb/package.py7
-rw-r--r--var/spack/repos/builtin/packages/masa/package.py21
-rw-r--r--var/spack/repos/builtin/packages/mash/package.py3
-rw-r--r--var/spack/repos/builtin/packages/masurca/package.py10
-rw-r--r--var/spack/repos/builtin/packages/matio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/matrix-switch/package.py55
-rw-r--r--var/spack/repos/builtin/packages/maven/package.py6
-rw-r--r--var/spack/repos/builtin/packages/maverick/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mawk/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mbdyn/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mbedtls/package.py119
-rw-r--r--var/spack/repos/builtin/packages/mc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mcl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mcpp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mct/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mctc-lib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mcutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mdb/package.py51
-rw-r--r--var/spack/repos/builtin/packages/mdspan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mdsplus/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mdtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/med/package.py61
-rw-r--r--var/spack/repos/builtin/packages/medipack/package.py35
-rw-r--r--var/spack/repos/builtin/packages/meep/package.py4
-rw-r--r--var/spack/repos/builtin/packages/megadock/package.py2
-rw-r--r--var/spack/repos/builtin/packages/melissa-api/package.py3
-rw-r--r--var/spack/repos/builtin/packages/melissa/package.py3
-rw-r--r--var/spack/repos/builtin/packages/memaxes/package.py10
-rw-r--r--var/spack/repos/builtin/packages/memcached/package.py2
-rw-r--r--var/spack/repos/builtin/packages/meme/package.py2
-rw-r--r--var/spack/repos/builtin/packages/memkind/package.py6
-rw-r--r--var/spack/repos/builtin/packages/memsurfer/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mepo/package.py29
-rw-r--r--var/spack/repos/builtin/packages/meraculous/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mercurial/package.py7
-rw-r--r--var/spack/repos/builtin/packages/mercury/package.py6
-rw-r--r--var/spack/repos/builtin/packages/mesa-demos/package.py25
-rw-r--r--var/spack/repos/builtin/packages/mesa-glu/package.py21
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py28
-rw-r--r--var/spack/repos/builtin/packages/mesa18/autotools-x11-nodri.patch14
-rw-r--r--var/spack/repos/builtin/packages/mesa18/multiple-symbols_hash.patch22
-rw-r--r--var/spack/repos/builtin/packages/mesa18/package.py228
-rw-r--r--var/spack/repos/builtin/packages/meshkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/meshtool/package.py6
-rw-r--r--var/spack/repos/builtin/packages/meson/package.py173
-rw-r--r--var/spack/repos/builtin/packages/met/package.py3
-rw-r--r--var/spack/repos/builtin/packages/metabat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/metacarpa/package.py43
-rw-r--r--var/spack/repos/builtin/packages/metaeuk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/metal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/metall/package.py8
-rw-r--r--var/spack/repos/builtin/packages/metaphysicl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/methyldackel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/metis/no_warning.patch13
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py38
-rw-r--r--var/spack/repos/builtin/packages/metkit/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mfem/mfem-4.7-sundials-7.patch1129
-rw-r--r--var/spack/repos/builtin/packages/mfem/mfem-4.7.patch102
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py328
-rwxr-xr-xvar/spack/repos/builtin/packages/mfem/test_builds.sh120
-rw-r--r--var/spack/repos/builtin/packages/mg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mgard/package.py27
-rw-r--r--var/spack/repos/builtin/packages/mgardx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mgcfd-op2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/mgis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/microbiomeutil/package.py4
-rw-r--r--var/spack/repos/builtin/packages/micromamba/package.py2
-rw-r--r--var/spack/repos/builtin/packages/microsocks/package.py2
-rw-r--r--var/spack/repos/builtin/packages/migraphx/0002-restrict-python-2.7-usage.patch13
-rw-r--r--var/spack/repos/builtin/packages/migraphx/0003-add-half-include-directory-migraphx-6.0.patch23
-rw-r--r--var/spack/repos/builtin/packages/migraphx/package.py214
-rw-r--r--var/spack/repos/builtin/packages/migrate/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mii/package.py2
-rw-r--r--var/spack/repos/builtin/packages/millepede/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mimalloc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/minc-toolkit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mindthegap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/miniaero/package.py2
-rw-r--r--var/spack/repos/builtin/packages/miniamr/package.py7
-rw-r--r--var/spack/repos/builtin/packages/miniasm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/miniconda3/package.py74
-rw-r--r--var/spack/repos/builtin/packages/minife/package.py3
-rw-r--r--var/spack/repos/builtin/packages/miniforge3/package.py106
-rw-r--r--var/spack/repos/builtin/packages/minighost/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minigmg/package.py4
-rw-r--r--var/spack/repos/builtin/packages/minimap2/package.py5
-rw-r--r--var/spack/repos/builtin/packages/minio/package.py26
-rw-r--r--var/spack/repos/builtin/packages/miniqmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minisign/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minismac2d/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minitri/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minivite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minixyce/package.py2
-rw-r--r--var/spack/repos/builtin/packages/minizip/package.py14
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch14
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch42
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch41
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/0002-add-include-dir-miopen-hip-6.0.0.patch34
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/package.py249
-rw-r--r--var/spack/repos/builtin/packages/miopen-opencl/package.py144
-rw-r--r--var/spack/repos/builtin/packages/miopen-tensile/0002-Improve-compilation-by-using-local-tensile-path.patch48
-rw-r--r--var/spack/repos/builtin/packages/miopen-tensile/package.py114
-rw-r--r--var/spack/repos/builtin/packages/miopengemm/package.py134
-rw-r--r--var/spack/repos/builtin/packages/mira/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mitos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.1.0.patch86
-rw-r--r--var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.2.0.patch52
-rw-r--r--var/spack/repos/builtin/packages/mivisionx/package.py356
-rw-r--r--var/spack/repos/builtin/packages/mixcr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/mkfontscale/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mlc-llm/package.py89
-rw-r--r--var/spack/repos/builtin/packages/mlhka/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mlirmiopen/package.py21
-rw-r--r--var/spack/repos/builtin/packages/mlocate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mlpack/package.py20
-rw-r--r--var/spack/repos/builtin/packages/mlperf-deepcam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mmg/package.py11
-rw-r--r--var/spack/repos/builtin/packages/mmseqs2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/mmv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/moab/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mochi-margo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mochi-thallium/package.py2
-rw-r--r--var/spack/repos/builtin/packages/model-traits/package.py2
-rw-r--r--var/spack/repos/builtin/packages/modeltest-ng/package.py3
-rw-r--r--var/spack/repos/builtin/packages/modern-wheel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mokutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mold/package.py30
-rw-r--r--var/spack/repos/builtin/packages/molden/package.py3
-rw-r--r--var/spack/repos/builtin/packages/molgw/package.py34
-rw-r--r--var/spack/repos/builtin/packages/mongo-c-driver/package.py115
-rw-r--r--var/spack/repos/builtin/packages/mongo-cxx-driver/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mongodb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mono/package.py11
-rw-r--r--var/spack/repos/builtin/packages/montage/package.py4
-rw-r--r--var/spack/repos/builtin/packages/moosefs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/moreutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mosesdecoder/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mosquitto/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mothur/package.py2
-rw-r--r--var/spack/repos/builtin/packages/motif/add_wmluiltok_option_main.patch8
-rw-r--r--var/spack/repos/builtin/packages/motif/package.py5
-rw-r--r--var/spack/repos/builtin/packages/motioncor2/package.py25
-rw-r--r--var/spack/repos/builtin/packages/mount-point-attributes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mozjpeg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpark-variant/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpas-model/package.py27
-rw-r--r--var/spack/repos/builtin/packages/mpb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mpdecimal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpe2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpfr/package.py7
-rw-r--r--var/spack/repos/builtin/packages/mpi-bash/package.py7
-rw-r--r--var/spack/repos/builtin/packages/mpi-serial/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpi-test-suite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpibind/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpich/mpich33_slurm_hostlist.patch22
-rw-r--r--var/spack/repos/builtin/packages/mpich/mpich40_slurm_hostlist.patch22
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py155
-rw-r--r--var/spack/repos/builtin/packages/mpidiff/package.py39
-rw-r--r--var/spack/repos/builtin/packages/mpifileutils/package.py140
-rw-r--r--var/spack/repos/builtin/packages/mpigraph/package.py30
-rw-r--r--var/spack/repos/builtin/packages/mpilander/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpileaks/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mpip/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mpir/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpitrampoline/package.py17
-rw-r--r--var/spack/repos/builtin/packages/mpiwrapper/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mpix-launch-swift/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mppp/package.py113
-rw-r--r--var/spack/repos/builtin/packages/mpt/package.py23
-rw-r--r--var/spack/repos/builtin/packages/mptensor/package.py60
-rw-r--r--var/spack/repos/builtin/packages/mrbayes/package.py6
-rw-r--r--var/spack/repos/builtin/packages/mrchem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mrcpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mrnet/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mrtrix3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mruby/package.py7
-rw-r--r--var/spack/repos/builtin/packages/mscgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/msgpack-c/package.py19
-rw-r--r--var/spack/repos/builtin/packages/mshadow/package.py2
-rw-r--r--var/spack/repos/builtin/packages/msmpi/package.py15
-rw-r--r--var/spack/repos/builtin/packages/msr-safe/package.py61
-rw-r--r--var/spack/repos/builtin/packages/mstk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/msvc/detection_test.yaml14
-rw-r--r--var/spack/repos/builtin/packages/msvc/package.py67
-rw-r--r--var/spack/repos/builtin/packages/mt-metis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mtn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mujoco/package.py3
-rw-r--r--var/spack/repos/builtin/packages/multitime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/multiverso/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mummer/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mummer4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py40
-rw-r--r--var/spack/repos/builtin/packages/munge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/muparser/package.py41
-rw-r--r--var/spack/repos/builtin/packages/muparserx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/muscle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/muscle5/package.py2
-rw-r--r--var/spack/repos/builtin/packages/muse/package.py3
-rw-r--r--var/spack/repos/builtin/packages/music/package.py3
-rw-r--r--var/spack/repos/builtin/packages/musl/package.py18
-rw-r--r--var/spack/repos/builtin/packages/must/package.py4
-rw-r--r--var/spack/repos/builtin/packages/muster/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mutationpp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mvapich/package.py61
-rwxr-xr-xvar/spack/repos/builtin/packages/mvapich2-gdr/package.py13
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py80
-rw-r--r--var/spack/repos/builtin/packages/mvapich2x/package.py12
-rw-r--r--var/spack/repos/builtin/packages/mxml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mxnet/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mysql-connector-c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mysql/package.py14
-rw-r--r--var/spack/repos/builtin/packages/mysqlpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/n2p2/package.py80
-rw-r--r--var/spack/repos/builtin/packages/nag/detection_test.yaml13
-rw-r--r--var/spack/repos/builtin/packages/nag/package.py67
-rw-r--r--var/spack/repos/builtin/packages/nalu-wind/package.py151
-rw-r--r--var/spack/repos/builtin/packages/nalu/package.py18
-rw-r--r--var/spack/repos/builtin/packages/namd/package.py80
-rw-r--r--var/spack/repos/builtin/packages/nano/package.py12
-rw-r--r--var/spack/repos/builtin/packages/nanoflann/package.py4
-rw-r--r--var/spack/repos/builtin/packages/nanomsg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nanopb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nasm/package.py9
-rw-r--r--var/spack/repos/builtin/packages/nauty/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nb/package.py45
-rw-r--r--var/spack/repos/builtin/packages/nbdkit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncbi-magicblast/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncbi-rmblastn/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncbi-toolkit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncbi-vdb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nccl-fastsocket/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nccl-tests/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nccl/package.py7
-rw-r--r--var/spack/repos/builtin/packages/nccmp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ncdu/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncio/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ncl/package.py109
-rw-r--r--var/spack/repos/builtin/packages/nco/package.py11
-rw-r--r--var/spack/repos/builtin/packages/ncompress/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ncurses/0001-Fix-errors-in-type-conversion.patch153
-rw-r--r--var/spack/repos/builtin/packages/ncurses/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ncurses/rxvt_unicode_6_4.patch203
-rw-r--r--var/spack/repos/builtin/packages/ncview/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ncvis/package.py34
-rw-r--r--var/spack/repos/builtin/packages/ndiff/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ndzip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/neartree/Makefile-3.1.patch23
-rw-r--r--var/spack/repos/builtin/packages/neartree/Makefile.patch23
-rw-r--r--var/spack/repos/builtin/packages/neartree/package.py18
-rw-r--r--var/spack/repos/builtin/packages/neic-finitefault/fortran-filename-length.patch370
-rw-r--r--var/spack/repos/builtin/packages/neic-finitefault/package.py145
-rw-r--r--var/spack/repos/builtin/packages/nek5000/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nekbone/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nekcem/package.py6
-rw-r--r--var/spack/repos/builtin/packages/neko/package.py51
-rw-r--r--var/spack/repos/builtin/packages/nekrs/package.py78
-rw-r--r--var/spack/repos/builtin/packages/nektar/package.py169
-rw-r--r--var/spack/repos/builtin/packages/nektools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nemsio/package.py6
-rw-r--r--var/spack/repos/builtin/packages/nemsiogfs/package.py6
-rw-r--r--var/spack/repos/builtin/packages/neo4j/package.py5
-rw-r--r--var/spack/repos/builtin/packages/neocmakelsp/package.py27
-rw-r--r--var/spack/repos/builtin/packages/neovim/package.py18
-rw-r--r--var/spack/repos/builtin/packages/nest/package.py5
-rw-r--r--var/spack/repos/builtin/packages/net-snmp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/netcdf-c/netcdfc_correct_and_export_link_interface.patch (renamed from var/spack/repos/builtin/packages/netcdf-c/netcdfc-mpi-win-support.patch)49
-rw-r--r--var/spack/repos/builtin/packages/netcdf-c/package.py59
-rw-r--r--var/spack/repos/builtin/packages/netcdf-cxx/package.py5
-rw-r--r--var/spack/repos/builtin/packages/netcdf-cxx4/package.py123
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/package.py19
-rw-r--r--var/spack/repos/builtin/packages/netcdf95/package.py3
-rw-r--r--var/spack/repos/builtin/packages/netdata/package.py5
-rw-r--r--var/spack/repos/builtin/packages/netgauge/package.py3
-rw-r--r--var/spack/repos/builtin/packages/netgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netkit-ftp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py38
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py20
-rw-r--r--var/spack/repos/builtin/packages/netlib-xblas/package.py3
-rw-r--r--var/spack/repos/builtin/packages/netpbm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/netperf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nettle/package.py11
-rw-r--r--var/spack/repos/builtin/packages/neuron/package.py185
-rw-r--r--var/spack/repos/builtin/packages/neve/package.py2
-rw-r--r--var/spack/repos/builtin/packages/newt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nextdenovo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nextflow/package.py22
-rw-r--r--var/spack/repos/builtin/packages/nf-seqerakit/package.py26
-rw-r--r--var/spack/repos/builtin/packages/nf-tower-cli/package.py34
-rw-r--r--var/spack/repos/builtin/packages/nf-wave-cli/package.py62
-rw-r--r--var/spack/repos/builtin/packages/nfft/package.py5
-rw-r--r--var/spack/repos/builtin/packages/nfs-ganesha/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nfs-utils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nghttp2/package.py11
-rw-r--r--var/spack/repos/builtin/packages/nginx/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ngmerge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ngmlr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ngspice/package.py13
-rw-r--r--var/spack/repos/builtin/packages/nicstat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nim/package.py53
-rw-r--r--var/spack/repos/builtin/packages/nimrod-aai/package.py21
-rw-r--r--var/spack/repos/builtin/packages/ninja-fortran/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ninja-phylogeny/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ninja/package.py8
-rw-r--r--var/spack/repos/builtin/packages/njet/package.py4
-rw-r--r--var/spack/repos/builtin/packages/nlcglib/package.py54
-rw-r--r--var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py6
-rw-r--r--var/spack/repos/builtin/packages/nlohmann-json/package.py5
-rw-r--r--var/spack/repos/builtin/packages/nlopt/package.py41
-rw-r--r--var/spack/repos/builtin/packages/nmap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nn-c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nnpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nnvm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch22
-rw-r--r--var/spack/repos/builtin/packages/node-js/package.py38
-rw-r--r--var/spack/repos/builtin/packages/nopayloadclient/package.py33
-rw-r--r--var/spack/repos/builtin/packages/notmuch/package.py3
-rw-r--r--var/spack/repos/builtin/packages/npb/package.py11
-rw-r--r--var/spack/repos/builtin/packages/npm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/npth/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ns-3-dev/package.py68
-rw-r--r--var/spack/repos/builtin/packages/nsimd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nspr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nss/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ntirpc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ntl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ntpoly/package.py16
-rw-r--r--var/spack/repos/builtin/packages/numactl/link-with-latomic-if-needed-v2.0.16.patch11
-rw-r--r--var/spack/repos/builtin/packages/numactl/numactl-2.0.18-syscall-NR-ppc64.patch14
-rw-r--r--var/spack/repos/builtin/packages/numactl/package.py16
-rw-r--r--var/spack/repos/builtin/packages/numamma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/numap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/numaprof/package.py3
-rw-r--r--var/spack/repos/builtin/packages/numdiff/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nut/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nvbandwidth/package.py52
-rw-r--r--var/spack/repos/builtin/packages/nvcomp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nvdimmsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nvhpc/detection_test.yaml82
-rw-r--r--var/spack/repos/builtin/packages/nvhpc/package.py90
-rw-r--r--var/spack/repos/builtin/packages/nvidia-nsight-systems/package.py127
-rw-r--r--var/spack/repos/builtin/packages/nvpl-blas/package.py75
-rw-r--r--var/spack/repos/builtin/packages/nvpl-fft/package.py38
-rw-r--r--var/spack/repos/builtin/packages/nvpl-lapack/package.py83
-rw-r--r--var/spack/repos/builtin/packages/nvptx-tools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/nvshmem/package.py3
-rw-r--r--var/spack/repos/builtin/packages/nvtx/package.py5
-rw-r--r--var/spack/repos/builtin/packages/nwchem/package.py96
-rw-r--r--var/spack/repos/builtin/packages/nyancat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ocaml/package.py9
-rw-r--r--var/spack/repos/builtin/packages/occa/package.py4
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py105
-rw-r--r--var/spack/repos/builtin/packages/oce/sierra.patch12
-rw-r--r--var/spack/repos/builtin/packages/oci-systemd-hook/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ocl-icd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/oclgrind/package.py3
-rw-r--r--var/spack/repos/builtin/packages/oclint/package.py2
-rw-r--r--var/spack/repos/builtin/packages/oclock/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-arduino/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-control/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-gsl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-instrctl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave-splines/package.py2
-rw-r--r--var/spack/repos/builtin/packages/octave/package.py15
-rw-r--r--var/spack/repos/builtin/packages/octopus/package.py118
-rw-r--r--var/spack/repos/builtin/packages/odc/package.py8
-rw-r--r--var/spack/repos/builtin/packages/odgi/package.py9
-rw-r--r--var/spack/repos/builtin/packages/of-catalyst/package.py8
-rw-r--r--var/spack/repos/builtin/packages/of-precice/package.py20
-rw-r--r--var/spack/repos/builtin/packages/ollama/package.py57
-rw-r--r--var/spack/repos/builtin/packages/ome-common-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ome-files-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ome-model/package.py2
-rw-r--r--var/spack/repos/builtin/packages/omega-h/package.py88
-rw-r--r--var/spack/repos/builtin/packages/omm-bundle/fjmpi_pspBasicTool.patch15
-rw-r--r--var/spack/repos/builtin/packages/omm-bundle/package.py56
-rw-r--r--var/spack/repos/builtin/packages/omm/package.py60
-rw-r--r--var/spack/repos/builtin/packages/omniperf/0001-remove-VERSION.sha-install.patch24
-rw-r--r--var/spack/repos/builtin/packages/omniperf/package.py51
-rw-r--r--var/spack/repos/builtin/packages/omnitrace/package.py98
-rw-r--r--var/spack/repos/builtin/packages/ompss-2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ompss/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ompt-openmp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/oneapi-level-zero/package.py23
-rw-r--r--var/spack/repos/builtin/packages/onednn/package.py6
-rw-r--r--var/spack/repos/builtin/packages/oniguruma/package.py3
-rw-r--r--var/spack/repos/builtin/packages/onnx/package.py27
-rw-r--r--var/spack/repos/builtin/packages/oommf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/op2-dsl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/opa-psm2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/opam/package.py36
-rw-r--r--var/spack/repos/builtin/packages/opari2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/opdilib/package.py28
-rw-r--r--var/spack/repos/builtin/packages/open-iscsi/package.py9
-rw-r--r--var/spack/repos/builtin/packages/open-isns/package.py10
-rw-r--r--var/spack/repos/builtin/packages/open3d/package.py29
-rw-r--r--var/spack/repos/builtin/packages/openal-soft/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openbabel/cmake-time.patch15
-rw-r--r--var/spack/repos/builtin/packages/openbabel/package.py16
-rw-r--r--var/spack/repos/builtin/packages/openblas/openblas-0.3.28-thread-buffer.patch14
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py81
-rw-r--r--var/spack/repos/builtin/packages/opencarp/package.py15
-rw-r--r--var/spack/repos/builtin/packages/opencascade/package.py76
-rw-r--r--var/spack/repos/builtin/packages/opencl-c-headers/package.py35
-rw-r--r--var/spack/repos/builtin/packages/opencl-clhpp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/opencl-icd-loader/package.py68
-rw-r--r--var/spack/repos/builtin/packages/opencoarrays/package.py8
-rw-r--r--var/spack/repos/builtin/packages/opencolorio/package.py39
-rw-r--r--var/spack/repos/builtin/packages/opencv/package.py27
-rw-r--r--var/spack/repos/builtin/packages/opendatadetector/package.py4
-rw-r--r--var/spack/repos/builtin/packages/opendx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openexr/package.py17
-rw-r--r--var/spack/repos/builtin/packages/openfast/hub_seg_fault.patch17
-rw-r--r--var/spack/repos/builtin/packages/openfast/package.py50
-rw-r--r--var/spack/repos/builtin/packages/openfoam-org/package.py6
-rw-r--r--var/spack/repos/builtin/packages/openfoam/package.py13
-rw-r--r--var/spack/repos/builtin/packages/openfst/package.py10
-rw-r--r--var/spack/repos/builtin/packages/opengl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/openimagedenoise/package.py9
-rw-r--r--var/spack/repos/builtin/packages/openimageio/package.py36
-rw-r--r--var/spack/repos/builtin/packages/openipmi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openjdk/package.py115
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/openkim-models/package.py4
-rw-r--r--var/spack/repos/builtin/packages/openldap/package.py9
-rw-r--r--var/spack/repos/builtin/packages/openlibm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openloops/package.py4
-rw-r--r--var/spack/repos/builtin/packages/openmc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/openmm/package.py18
-rw-r--r--var/spack/repos/builtin/packages/openmolcas/package.py9
-rw-r--r--var/spack/repos/builtin/packages/openmpi/accelerator-build-components-as-dso-s-by-default.patch81
-rw-r--r--var/spack/repos/builtin/packages/openmpi/accelerator-cuda-fix-bug-in-makefile.patch33
-rw-r--r--var/spack/repos/builtin/packages/openmpi/btlsmcuda-fix-problem-with-makefile.patch73
-rw-r--r--var/spack/repos/builtin/packages/openmpi/fix-for-dlopen-missing-symbol-problem.patch32
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py285
-rw-r--r--var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version-prte.patch14
-rw-r--r--var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version.patch52
-rw-r--r--var/spack/repos/builtin/packages/openmx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/opennurbs/package.py33
-rw-r--r--var/spack/repos/builtin/packages/openpa/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openpbs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openpmd-api/package.py49
-rw-r--r--var/spack/repos/builtin/packages/openradioss-engine/package.py63
-rw-r--r--var/spack/repos/builtin/packages/openradioss-starter/package.py46
-rw-r--r--var/spack/repos/builtin/packages/openrasmol/package.py2
-rw-r--r--var/spack/repos/builtin/packages/openresty/package.py4
-rw-r--r--var/spack/repos/builtin/packages/openscenegraph/package.py25
-rw-r--r--var/spack/repos/builtin/packages/openslide/package.py35
-rw-r--r--var/spack/repos/builtin/packages/openslp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openspeedshop-utils/package.py39
-rw-r--r--var/spack/repos/builtin/packages/openspeedshop/package.py40
-rwxr-xr-xvar/spack/repos/builtin/packages/openssh/package.py73
-rw-r--r--var/spack/repos/builtin/packages/openssl/package.py348
-rw-r--r--var/spack/repos/builtin/packages/opensta/package.py2
-rw-r--r--var/spack/repos/builtin/packages/opensubdiv/package.py5
-rw-r--r--var/spack/repos/builtin/packages/openturns/package.py74
-rw-r--r--var/spack/repos/builtin/packages/openvdb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openvkl/package.py6
-rw-r--r--var/spack/repos/builtin/packages/openwsman/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ophidia-analytics-framework/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ophidia-io-server/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ophidia-primitives/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ophidia-server/package.py2
-rw-r--r--var/spack/repos/builtin/packages/opium/package.py5
-rw-r--r--var/spack/repos/builtin/packages/optional-lite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.7.patch (renamed from var/spack/repos/builtin/packages/optipng/for_aarch64.patch)0
-rw-r--r--var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.8.patch11
-rw-r--r--var/spack/repos/builtin/packages/optipng/package.py14
-rw-r--r--var/spack/repos/builtin/packages/opus/package.py10
-rw-r--r--var/spack/repos/builtin/packages/or-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/orbit2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/orc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/orca-faccts/package.py59
-rw-r--r--var/spack/repos/builtin/packages/orca/package.py80
-rw-r--r--var/spack/repos/builtin/packages/orfm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/orthofinder/package.py2
-rw-r--r--var/spack/repos/builtin/packages/osg-ca-certs/package.py27
-rw-r--r--var/spack/repos/builtin/packages/osi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/osmctools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/osmesa/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ospray/package.py25
-rw-r--r--var/spack/repos/builtin/packages/osqp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ossp-uuid/package.py8
-rw-r--r--var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py5
-rw-r--r--var/spack/repos/builtin/packages/otf-cpt/package.py37
-rw-r--r--var/spack/repos/builtin/packages/otf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/otf2/package.py34
-rw-r--r--var/spack/repos/builtin/packages/p11-kit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/p3dfft3/package.py7
-rw-r--r--var/spack/repos/builtin/packages/p4est/package.py2
-rw-r--r--var/spack/repos/builtin/packages/p7zip/package.py5
-rw-r--r--var/spack/repos/builtin/packages/pacbio-daligner/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pacbio-damasker/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pacbio-dazz-db/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pacbio-dextractor/package.py2
-rw-r--r--var/spack/repos/builtin/packages/packmol/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pacparser/package.py11
-rw-r--r--var/spack/repos/builtin/packages/pacvim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/paddle/package.py39
-rw-r--r--var/spack/repos/builtin/packages/pagit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pagmo/package.py7
-rw-r--r--var/spack/repos/builtin/packages/pagmo2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paintor/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pajeng/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/palace/package.py44
-rw-r--r--var/spack/repos/builtin/packages/palisade-development/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paml/package.py11
-rw-r--r--var/spack/repos/builtin/packages/panda/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pandaseq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pandoc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pandoramonitoring/package.py44
-rw-r--r--var/spack/repos/builtin/packages/pandorapfa/package.py62
-rw-r--r--var/spack/repos/builtin/packages/pandorasdk/package.py46
-rw-r--r--var/spack/repos/builtin/packages/pango/package.py66
-rw-r--r--var/spack/repos/builtin/packages/pangolin/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pangomm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/papi/package.py24
-rw-r--r--var/spack/repos/builtin/packages/papyrus/package.py5
-rw-r--r--var/spack/repos/builtin/packages/parallel-hashmap/package.py12
-rw-r--r--var/spack/repos/builtin/packages/parallel-netcdf/package.py85
-rw-r--r--var/spack/repos/builtin/packages/parallel/package.py9
-rw-r--r--var/spack/repos/builtin/packages/parallelio/package.py9
-rw-r--r--var/spack/repos/builtin/packages/parallelmergetree/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paraver/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paraview/kits_with_catalyst_5_12.patch21
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py262
-rw-r--r--var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch14
-rw-r--r--var/spack/repos/builtin/packages/parflow/package.py35
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py10
-rw-r--r--var/spack/repos/builtin/packages/parmgridgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/parmmg/package.py4
-rw-r--r--var/spack/repos/builtin/packages/parquet-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/parsec/package.py52
-rw-r--r--var/spack/repos/builtin/packages/parsimonator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/parsplice/package.py2
-rw-r--r--var/spack/repos/builtin/packages/parthenon/package.py77
-rw-r--r--var/spack/repos/builtin/packages/pass/package.py63
-rw-r--r--var/spack/repos/builtin/packages/pastix/package.py8
-rw-r--r--var/spack/repos/builtin/packages/patch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/patchelf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/patchutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pathfinder/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pax-utils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pbbam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pblat/package.py32
-rw-r--r--var/spack/repos/builtin/packages/pbmpi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pciutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pcl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pcma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pcre/package.py7
-rw-r--r--var/spack/repos/builtin/packages/pcre2/package.py62
-rw-r--r--var/spack/repos/builtin/packages/pcsclite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pdal/package.py44
-rw-r--r--var/spack/repos/builtin/packages/pdal/stdcppfs.patch8
-rw-r--r--var/spack/repos/builtin/packages/pdc/package.py35
-rw-r--r--var/spack/repos/builtin/packages/pdf2svg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pdsh/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pdt/package.py23
-rw-r--r--var/spack/repos/builtin/packages/pegtl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pennant/package.py4
-rw-r--r--var/spack/repos/builtin/packages/percept/package.py2
-rw-r--r--var/spack/repos/builtin/packages/percona-server/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perfstubs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/perl-algorithm-c3/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-alien-build-plugin-download-gitlab/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-alien-build/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-alien-libxml2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-alien-svn/package.py5
-rw-r--r--var/spack/repos/builtin/packages/perl-any-uri-escape/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-apache-logformat-compiler/package.py30
-rw-r--r--var/spack/repos/builtin/packages/perl-b-cow/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-b-hooks-endofscope/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-b-keywords/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-bignum/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-asn1-entrezgene/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-bigfile/package.py80
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-cluster/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py37
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-ensembl-io/package.py47
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py88
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-ensembl/package.py46
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-eutilities/package.py28
-rw-r--r--var/spack/repos/builtin/packages/perl-bio-variation/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-bioperl/package.py136
-rw-r--r--var/spack/repos/builtin/packages/perl-bit-vector/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-bsd-resource/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-cache-cache/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-cache-memcached/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-cairo/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-canary-stability/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-carp-clan/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-action-renderview/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-action-rest/package.py31
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-component-instancepercontext/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-devel/package.py38
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-plugin-cache/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-plugin-configloader/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-plugin-static-simple/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-runtime/package.py62
-rw-r--r--var/spack/repos/builtin/packages/perl-catalyst-view-json/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-cgi-simple/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-cgi-struct/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-chi-driver-memcached/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-chi/package.py43
-rw-r--r--var/spack/repos/builtin/packages/perl-class-accessor-grouped/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-class-accessor-lvalue/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-class-accessor/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-class-c3-adopt-next/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-class-c3-componentised/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-class-c3/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-class-singleton/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-class-tiny/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-clone-pp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-common-sense/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-compress-bzip2/package.py35
-rw-r--r--var/spack/repos/builtin/packages/perl-compress-lzo/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-compress-raw-zlib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/perl-config-any/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-config-general/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-config-inifiles/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-config-tiny/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-context-preserve/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-convert-nls-date-format/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-cookie-baker/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-cpanel-json-xs/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-css-minifier-xs/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-data-dump/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-data-dumper-concise/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-data-optlist/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-data-predicate/package.py20
-rw-r--r--var/spack/repos/builtin/packages/perl-data-stag/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-data-uuid/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-data-visitor/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-date-exception/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-date-utils/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-builder/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-iso8601/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-mysql/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-oracle/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-locale/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime-timezone/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-datetime/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-db-file/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-dbd-mysql/package.py31
-rw-r--r--var/spack/repos/builtin/packages/perl-dbd-oracle/package.py11
-rw-r--r--var/spack/repos/builtin/packages/perl-dbd-pg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-dbi/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-dbix-class/package.py44
-rw-r--r--var/spack/repos/builtin/packages/perl-devel-cover/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-devel-stacktrace-ashtml/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-digest-jhash/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-digest-sha1/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-email-abstract/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-email-address-xs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-email-date-format/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-email-messageid/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-email-mime-contenttype/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-email-mime-encodings/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-email-mime/package.py28
-rw-r--r--var/spack/repos/builtin/packages/perl-email-sender/package.py31
-rw-r--r--var/spack/repos/builtin/packages/perl-email-simple/package.py20
-rw-r--r--var/spack/repos/builtin/packages/perl-email-stuffer/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-exporter-auto/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-extutils-config/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-file-changenotify/package.py28
-rw-r--r--var/spack/repos/builtin/packages/perl-file-listing/package.py13
-rw-r--r--var/spack/repos/builtin/packages/perl-file-sharedir/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-filesys-notify-simple/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-fth/package.py6
-rw-r--r--var/spack/repos/builtin/packages/perl-gd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-getopt-long-descriptive/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-graph/package.py6
-rw-r--r--var/spack/repos/builtin/packages/perl-graphviz/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-gzip-faster/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-hash-moreutils/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-hash-multivalue/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-heap/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-hook-lexwrap/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-html-parser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-html-tagset/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-html-template/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-http-body/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-http-cookiejar/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-http-cookies/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-http-daemon/package.py13
-rw-r--r--var/spack/repos/builtin/packages/perl-http-date/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-http-entity-parser/package.py28
-rw-r--r--var/spack/repos/builtin/packages/perl-http-headers-fast/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-http-message/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-http-multipartparser/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-http-parser-xs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-http-request-ascgi/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-http-server-simple/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-http-tiny/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-import-into/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-io-stringy/package.py11
-rw-r--r--var/spack/repos/builtin/packages/perl-io-tty/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-ipc-run/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-ipc-run3/package.py10
-rw-r--r--var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-ipc-system-simple/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-javascript-minifier-xs/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-json-any/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-json-maybexs/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-json-xs/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-json/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-kyotocabinet/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-lingua-en-inflect/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-list-compare/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-list-someutils/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-log-any-adapter-callback/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-log-any/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-log-dispatch-filerotate/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-log-dispatch/package.py31
-rw-r--r--var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py11
-rw-r--r--var/spack/repos/builtin/packages/perl-lwp-protocol-https/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-math-bigint/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-math-cdf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-math-cephes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-math-symbolic/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-mce/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-metacpan-client/package.py32
-rw-r--r--var/spack/repos/builtin/packages/perl-mime-types/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-mock-config/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-module-build-tiny/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-module-build/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-module-corelist/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-module-find/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-module-install/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-module-mask/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-module-pluggable/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-module-util/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-mojolicious/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-moose/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-moosex-emulate-class-accessor-fast/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-moosex-getopt/package.py34
-rw-r--r--var/spack/repos/builtin/packages/perl-moosex-methodattributes/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-moosex-role-parameterized/package.py29
-rw-r--r--var/spack/repos/builtin/packages/perl-moox-types-mooselike-numeric/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-moox-types-mooselike/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-namespace-clean/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-net-cidr-lite/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-net-http/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-net-ip/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-net-server-ss-prefork/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-net-server/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-net-ssleay/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-package-stash-xs/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-package-stash/package.py13
-rw-r--r--var/spack/repos/builtin/packages/perl-package-variant/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-params-util/package.py13
-rw-r--r--var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-parse-recdescent/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-parsetemplate/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-path-class/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-path-tiny/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-perl-critic-moose/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-perl-critic/package.py36
-rw-r--r--var/spack/repos/builtin/packages/perl-perl-tidy/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-perl-version/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-assets/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-crossorigin/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-fixmissingbodyinredirect/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-methodoverride/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-removeredundantbody/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-middleware-reverseproxy/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-plack-test-externalserver/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-plack/package.py38
-rw-r--r--var/spack/repos/builtin/packages/perl-pod-coverage/package.py20
-rw-r--r--var/spack/repos/builtin/packages/perl-pod-parser/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-pod-spell/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-posix-strftime-compiler/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-ppi/package.py28
-rw-r--r--var/spack/repos/builtin/packages/perl-ppix-quotelike/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-ppix-regexp/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-ppix-utils/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-proc-daemon/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-proc-processtable/package.py11
-rw-r--r--var/spack/repos/builtin/packages/perl-readonly-xs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-ref-util/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-rose-datetime/package.py20
-rw-r--r--var/spack/repos/builtin/packages/perl-rose-db-object/package.py30
-rw-r--r--var/spack/repos/builtin/packages/perl-rose-db/package.py32
-rw-r--r--var/spack/repos/builtin/packages/perl-rose-object/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-safe-isa/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-scope-guard/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-search-elasticsearch/package.py40
-rw-r--r--var/spack/repos/builtin/packages/perl-sereal-decoder/package.py38
-rw-r--r--var/spack/repos/builtin/packages/perl-sereal-encoder/package.py39
-rw-r--r--var/spack/repos/builtin/packages/perl-sereal/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-server-starter/package.py24
-rw-r--r--var/spack/repos/builtin/packages/perl-set-intervaltree/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-set-object/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-sort-naturally/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-specio/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-spiffy/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-sql-abstract-classic/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-sql-abstract/package.py29
-rw-r--r--var/spack/repos/builtin/packages/perl-sql-reservedwords/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-sql-translator/package.py35
-rw-r--r--var/spack/repos/builtin/packages/perl-starman/package.py31
-rw-r--r--var/spack/repos/builtin/packages/perl-stream-buffered/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-strictures/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-string-approx/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-string-crc32/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-string-format/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-string-numeric/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-string-rewriteprefix/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-sub-exporter/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-sub-name/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-swissknife/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-task-weaken/package.py13
-rw-r--r--var/spack/repos/builtin/packages/perl-term-ansicolor-markup/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-term-table/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test-base/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test-class/package.py25
-rw-r--r--var/spack/repos/builtin/packages/perl-test-diaginc/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-differences/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-file-contents/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-file-sharedir/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test-file/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-json/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-longstring/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-test-mockobject/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-test-mocktime/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-test-nowarnings/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-object/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-test-output/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-test-perl-critic/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-pod-coverage/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-pod/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test-sharedfork/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test-subcalls/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-tcp/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-time-hires/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-test-time/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-test-trap/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-test-warn/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-test-warnings/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-weaken/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-without-module/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-test-xml-simple/package.py26
-rw-r--r--var/spack/repos/builtin/packages/perl-test-xml/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-test-xpath/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-test-yaml/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-test2-plugin-nowarnings/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-test2-suite/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-text-csv-xs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-text-csv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/perl-throwable/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-tie-ixhash/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-tie-toobject/package.py17
-rw-r--r--var/spack/repos/builtin/packages/perl-time-clock/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-time-duration-parse/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-time-duration/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-timedate/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-tk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-tree-simple-visitorfactory/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-tree-simple/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-type-tiny/package.py9
-rw-r--r--var/spack/repos/builtin/packages/perl-types-serialiser/package.py19
-rw-r--r--var/spack/repos/builtin/packages/perl-universal-can/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-universal-isa/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-uri-find/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-uri-ws/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-uri/package.py2
-rw-r--r--var/spack/repos/builtin/packages/perl-www-form-urlencoded/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py21
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-libxml/package.py6
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-libxslt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-parser/package.py5
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-semanticdiff/package.py22
-rw-r--r--var/spack/repos/builtin/packages/perl-xml-xpath/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl-yaml-syck/package.py23
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py168
-rw-r--r--var/spack/repos/builtin/packages/pestpp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/petaca/package.py7
-rw-r--r--var/spack/repos/builtin/packages/petsc/0001-Handle-the-hipsparse-api-changes-for-rocm-6.0.patch70
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py72
-rw-r--r--var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch11
-rw-r--r--var/spack/repos/builtin/packages/pexsi/package.py15
-rw-r--r--var/spack/repos/builtin/packages/pfapack/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pfft/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pflask/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pflogger/package.py24
-rw-r--r--var/spack/repos/builtin/packages/pflotran/package.py18
-rw-r--r--var/spack/repos/builtin/packages/pfunit/package.py13
-rw-r--r--var/spack/repos/builtin/packages/pgi/package.py108
-rw-r--r--var/spack/repos/builtin/packages/pgplot/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ph5concat/package.py35
-rw-r--r--var/spack/repos/builtin/packages/phast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/phasta/package.py4
-rw-r--r--var/spack/repos/builtin/packages/phist/package.py15
-rw-r--r--var/spack/repos/builtin/packages/photos-f/package.py2
-rw-r--r--var/spack/repos/builtin/packages/photos/package.py3
-rw-r--r--var/spack/repos/builtin/packages/photospline/package.py3
-rw-r--r--var/spack/repos/builtin/packages/php/package.py48
-rw-r--r--var/spack/repos/builtin/packages/php/sbang-7.patch (renamed from var/spack/repos/builtin/packages/php/sbang.patch)0
-rw-r--r--var/spack/repos/builtin/packages/php/sbang-8.patch42
-rw-r--r--var/spack/repos/builtin/packages/phylobayesmpi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/picard/package.py5
-rw-r--r--var/spack/repos/builtin/packages/picsar/package.py4
-rw-r--r--var/spack/repos/builtin/packages/picsarlite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pidx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pigz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pika-algorithms/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pika/package.py54
-rw-r--r--var/spack/repos/builtin/packages/pilercr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pindel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pinentry/package.py36
-rw-r--r--var/spack/repos/builtin/packages/pinfo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/piranha/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pism/package.py6
-rw-r--r--var/spack/repos/builtin/packages/pixman/package.py60
-rw-r--r--var/spack/repos/builtin/packages/pixz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pkg-config/package.py13
-rw-r--r--var/spack/repos/builtin/packages/pkgconf/package.py14
-rw-r--r--var/spack/repos/builtin/packages/pktools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/planck-likelihood/package.py13
-rw-r--r--var/spack/repos/builtin/packages/plasma/package.py5
-rw-r--r--var/spack/repos/builtin/packages/plink2/package.py17
-rw-r--r--var/spack/repos/builtin/packages/ploticus/package.py4
-rw-r--r--var/spack/repos/builtin/packages/plplot/package.py6
-rw-r--r--var/spack/repos/builtin/packages/plumed/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ply/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pmdk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pmemkv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pmerge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pmgr-collective/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pmix/package.py194
-rw-r--r--var/spack/repos/builtin/packages/pmlib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pnfft/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pngquant/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pngwriter/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pnmpi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/poamsa/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pocl/package.py26
-rw-r--r--var/spack/repos/builtin/packages/podio/cpack.patch11
-rw-r--r--var/spack/repos/builtin/packages/podio/dictloading.patch20
-rw-r--r--var/spack/repos/builtin/packages/podio/package.py145
-rw-r--r--var/spack/repos/builtin/packages/podio/python-tests.patch12
-rw-r--r--var/spack/repos/builtin/packages/podman/package.py2
-rw-r--r--var/spack/repos/builtin/packages/poke/package.py2
-rw-r--r--var/spack/repos/builtin/packages/polymake/package.py4
-rw-r--r--var/spack/repos/builtin/packages/polyml/package.py28
-rwxr-xr-xvar/spack/repos/builtin/packages/poorjit/package.py30
-rw-r--r--var/spack/repos/builtin/packages/poppler/package.py7
-rw-r--r--var/spack/repos/builtin/packages/popt/package.py13
-rw-r--r--var/spack/repos/builtin/packages/portage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/portcullis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ports-of-call/package.py3
-rw-r--r--var/spack/repos/builtin/packages/possvm/package.py47
-rw-r--r--var/spack/repos/builtin/packages/postgis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/postgresql/package.py72
-rw-r--r--var/spack/repos/builtin/packages/povray/package.py43
-rw-r--r--var/spack/repos/builtin/packages/powerapi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ppl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-bem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-fem/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-at/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ppopen-math-mp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ppopen-math-vis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/prank/package.py2
-rw-r--r--var/spack/repos/builtin/packages/precice/package.py27
-rw-r--r--var/spack/repos/builtin/packages/predixy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/premake-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/preseq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/prettier/package.py25
-rw-r--r--var/spack/repos/builtin/packages/price/package.py2
-rw-r--r--var/spack/repos/builtin/packages/primer3/package.py4
-rw-r--r--var/spack/repos/builtin/packages/prinseq-lite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/prism/package.py3
-rw-r--r--var/spack/repos/builtin/packages/prmon/package.py1
-rw-r--r--var/spack/repos/builtin/packages/prng/package.py2
-rw-r--r--var/spack/repos/builtin/packages/probconsrna/package.py2
-rw-r--r--var/spack/repos/builtin/packages/procenv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/process-in-process/package.py2
-rw-r--r--var/spack/repos/builtin/packages/procps-ng/package.py4
-rw-r--r--var/spack/repos/builtin/packages/procps/package.py8
-rw-r--r--var/spack/repos/builtin/packages/prod-util/package.py20
-rw-r--r--var/spack/repos/builtin/packages/prodigal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/professor/package.py2
-rw-r--r--var/spack/repos/builtin/packages/profugusmc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/proj/package.py66
-rw-r--r--var/spack/repos/builtin/packages/proj/proj-7-tiff.patch19
-rw-r--r--var/spack/repos/builtin/packages/proj/proj-8-tiff.patch19
-rw-r--r--var/spack/repos/builtin/packages/prometheus-cpp/package.py30
-rw-r--r--var/spack/repos/builtin/packages/prometheus/package.py7
-rw-r--r--var/spack/repos/builtin/packages/prophecy4f/package.py3
-rw-r--r--var/spack/repos/builtin/packages/protobuf-c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py29
-rw-r--r--var/spack/repos/builtin/packages/proxymngr/package.py8
-rw-r--r--var/spack/repos/builtin/packages/prrte/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pruners-ninja/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ps-lite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psalg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pscmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psipred/package.py73
-rw-r--r--var/spack/repos/builtin/packages/pslib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/psm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psrcat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/psrchive/package.py6
-rw-r--r--var/spack/repos/builtin/packages/psrdada/package.py32
-rw-r--r--var/spack/repos/builtin/packages/pstreams/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pthreadpool/package.py19
-rw-r--r--var/spack/repos/builtin/packages/pugixml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pulseaudio/package.py6
-rw-r--r--var/spack/repos/builtin/packages/pumi/package.py64
-rw-r--r--var/spack/repos/builtin/packages/purify/package.py73
-rw-r--r--var/spack/repos/builtin/packages/pv/package.py12
-rw-r--r--var/spack/repos/builtin/packages/pvm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pwgen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pxz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-4suite-xml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-accimage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-adios/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-aiobotocore/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-aiohttp/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-alabaster/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-alive-progress/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-alphafold/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-altair/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-amici/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-amplpy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-amqp/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-amrex/package.py142
-rw-r--r--var/spack/repos/builtin/packages/py-angel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-annotated-types/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-annoy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ansible/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-antimeridian/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-anuga/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-anvio/package.py55
-rw-r--r--var/spack/repos/builtin/packages/py-anybadge/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-arch/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-archspec/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-argcomplete/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-argon2-cffi-bindings/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-argparse-dataclass/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-arm-pyart/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-arpeggio/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-arrow/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-art/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-asdf-standard/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-asdf-transform-schemas/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-asdf/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-asdfghjkl/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-ase/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-asgiref/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-astor/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-astropy-healpix/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-astropy-helpers/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-astropy-iers-data/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-asyncio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-atropos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ats/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-attrs/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-auditwheel/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-autograd/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-autoray/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-avro/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-awkward-cpp/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-awkward/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-awscrt/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-azure-batch/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-azure-cli/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-azure-core/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-azure-identity/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-azure-mgmt-batch/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-azure-mgmt-core/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-azure-nspkg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-azure-storage-blob/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-automl-core/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-core/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-dataprep-native/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-dataprep-rslex/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-dataprep/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-dataset-runtime/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-pipeline-core/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-pipeline-steps/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-pipeline/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-sdk/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-telemetry/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-train-automl-client/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-train-core/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-train-restclients-hyperdrive/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-azureml-train/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-babel/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-backpack-for-pytorch/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-backports-lzma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-backports-zoneinfo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bakta/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-basemap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-bcolz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-bcrypt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-beancount/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-beautifulsoup4/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-bigdft/bad_string.patch22
-rw-r--r--var/spack/repos/builtin/packages/py-bigdft/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch9
-rw-r--r--var/spack/repos/builtin/packages/py-bigfloat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-billiard/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-common/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-gromacs/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-io/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-model/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-structure-checking/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-biobb-structure-utils/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-biopython/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-biotite/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-biotraj/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-bitarray/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bitshuffle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bitstruct/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-black/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-blis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-blosc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-blosc2/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-blosum/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-bluepyefe/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-bluepyemodel/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-bluepyopt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-bokeh/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-boost-histogram/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-boto3/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-botocore/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-bottleneck/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-braceexpand/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-brain-indexer/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-branca/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-bravado-core/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-bravado/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-breathe/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-brian/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-brian2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-brotli/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-brotlipy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bsddb3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-build/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-bx-python/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cairosvg/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-caliper-reader/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-carputils/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-cartopy/package.py138
-rw-r--r--var/spack/repos/builtin/packages/py-casadi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-cdsapi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-celery/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-cellprofiler-core/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-cellprofiler/package.py153
-rw-r--r--var/spack/repos/builtin/packages/py-centrosome/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-cf-units/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cf-xarray/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-cffi/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-cfgrib/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-cftime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-chainer/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-chainforgecodegen/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-charm4py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cheap-repr/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-cheetah3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-chemfiles/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-chex/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-cig-pythia/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-click-option-group/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-climate/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-climax/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-clip-anytorch/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-cloudpickle/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-cmake/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-cmocean/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-coca-pytorch/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-codepy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-codespell/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-colabtools/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-colored/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-colorlog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-conda-inject/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-configargparse/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-configspace/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-constantly/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-contourpy/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-cookiecutter/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-correctionlib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-coverage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-crcmod/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-croniter/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-crossmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cryptography/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-cssselect2/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-cudf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cuml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cupy/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-curvlinops-for-pytorch/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-cutadapt/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-cvxopt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cvxpy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cx-oracle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cylp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cyordereddict/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cython-bbox/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cython/package.py106
-rw-r--r--var/spack/repos/builtin/packages/py-cyvcf2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-d2to1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dace/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dadi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-damask/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-darshan/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-dasbus/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-dash-bootstrap-components/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-dash-svg/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-dash/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-dask-expr/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-dask/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-datasets/package.py64
-rw-r--r--var/spack/repos/builtin/packages/py-datashader/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-datrie/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-deap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-deephyper/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-deepsig-biocomp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-deepspeed/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-deeptools/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-devlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dgl/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-dinosaur/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-dipy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dirtyjson/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-distance/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-distlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-distributed/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-django/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-dm-haiku/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-dm-tree/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-dnaio/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-dnspython/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-docopt-ng/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-docutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dogpile-cache/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-doit/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-dotmap/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-dotnetcore2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-downhill/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dpath/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-dulwich/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-earth2mip/package.py83
-rw-r--r--var/spack/repos/builtin/packages/py-easybuild-framework/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-eccodes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ecmwf-opendata/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-ecmwflibs/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-ecos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-edfio/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-edflib-python/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-editables/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-editdistance/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-edlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-eeglabio/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-efel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-einconv/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-einops/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-elephant/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ema-pytorch/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-email-validator/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-embedding-reader/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-ephem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-eprosima-fastdds/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-espresso/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-espressopp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-ete3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-etils/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-eventlet/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-evodiff/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-exarl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-exodus-bundler/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-expandvars/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-extension-helpers/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-f90wrap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-fair-esm/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-falcon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fallocate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fastapi/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-fastcache/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fastcluster/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-fastdtw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fastfold/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fastpath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fastremap/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-fastrlock/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-faststructure/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-basix/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-ffc/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-ffcx/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-ufl-legacy/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-fenics-ufl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-find-libpython/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-fiona/package.py59
-rw-r--r--var/spack/repos/builtin/packages/py-flash-attn/package.py54
-rw-r--r--var/spack/repos/builtin/packages/py-flask-compress/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-flask-cors/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-flask/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-flatbuffers/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-flawfinder/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-flax/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-flit-core/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-fluiddyn/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-builder/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-fftw/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-fftwmpi/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-mpi-with-fftw/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-p3dfft/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft-pfft/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-fluidfft/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-fluidsim-core/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-fluidsim/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-flye/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-folium/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-ford/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fortls/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-fortran-language-server/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-fortranformat/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-fparser/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-frozendict/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-frozenlist/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-fsspec-xrootd/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-fsspec/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-furo/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-future/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-gcovr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-gcsfs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-gdown/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-gemmforge/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-genders/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-genshi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-gensim/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-geocube/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-geopandas/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-geopmdpy/package.py54
-rw-r--r--var/spack/repos/builtin/packages/py-geopmpy/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-geoviews/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-gevent/cython.patch9
-rw-r--r--var/spack/repos/builtin/packages/py-gevent/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-gimmik/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-gitpython/package.py95
-rw-r--r--var/spack/repos/builtin/packages/py-glean-parser/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-glean-sdk/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-glmnet-python/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-glmnet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-glmsingle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-glob2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-globus-cli/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-globus-sdk/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-gmsh/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-gmxapi/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-gnuplot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-google-api-core/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-google-auth/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-google-cloud-appengine-logging/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-google-cloud-audit-log/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-google-cloud-batch/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-google-cloud-logging/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-google-cloud-storage/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-google-crc32c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-google-resumable-media/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-gosam/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-gpaw/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-gpy/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-gpytorch/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-gradio/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-graphcast/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-grapheme/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-grayskull/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-greenlet/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-griddataformats/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-grpc-google-iam-v1/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-grpcio-status/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-grpcio-tools/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-grpcio/30522.diff21
-rw-r--r--var/spack/repos/builtin/packages/py-grpcio/package.py49
-rw-r--r--var/spack/repos/builtin/packages/py-gsd/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-gssapi/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-gtdbtk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-h5netcdf/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-hail/package.py236
-rw-r--r--var/spack/repos/builtin/packages/py-hatch-cython/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-hatch-jupyter-builder/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-hatch-nodejs-version/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-hatch-requirements-txt/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-hatch-vcs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-hatch/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-hatchet/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-hatchling/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-healpy/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-heat/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-hepdata-lib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-hf-transfer/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-hiredis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-hmmlearn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-holoviews/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-horovod/package.py165
-rw-r--r--var/spack/repos/builtin/packages/py-htgettoken/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-htseq/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-httpcore/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-httpstan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-httptools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-httpx/package.py56
-rw-r--r--var/spack/repos/builtin/packages/py-huggingface-hub/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-humanize/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-hvplot/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-hypothesis/package.py54
-rw-r--r--var/spack/repos/builtin/packages/py-igor2/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-igraph/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-igv-notebook/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-ilmbase/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-imagecodecs/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-imageio/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-iminuit/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-immutables/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-importlib-metadata/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-incremental/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-installer/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-intbitset/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-intel-openmp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-interlap/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-invoke/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ipykernel/package.py162
-rw-r--r--var/spack/repos/builtin/packages/py-ipympl/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-ipyrad/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-ipython/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-ipyvue/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-ipyvuetify/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-isal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-itk/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-jacobi/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-janus/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-jarowinkler/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jarvis-util/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-jax/package.py122
-rw-r--r--var/spack/repos/builtin/packages/py-jaxlib/jaxxlatsl.patch100
-rw-r--r--var/spack/repos/builtin/packages/py-jaxlib/package.py171
-rw-r--r--var/spack/repos/builtin/packages/py-jaxtyping/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-jcb/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-jedi/package.py104
-rw-r--r--var/spack/repos/builtin/packages/py-jellyfish/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jinja2/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-jiter/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-joblib/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-jproperties/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-jpype1/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-jraph/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-jsonargparse/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jsonlines/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-jsonschema-specifications/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-jsonschema/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-junit2html/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-core/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-events/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-packaging/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-server/no_npm_node.patch14
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter-server/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-jupyter/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-jupyterlab-pygments/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-jupyterlab-widgets/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-jupyterlab/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-jupytext/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-jwcrypto/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-kaleido/package.py74
-rw-r--r--var/spack/repos/builtin/packages/py-keras/package.py141
-rw-r--r--var/spack/repos/builtin/packages/py-kerberos/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-kiwisolver/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-kneaddata/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-kombu/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-kornia-rs/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-kornia/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-krb5/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-kubernetes/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-langsmith/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-lap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-laplace-torch/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-laspy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-lazy-loader/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lhsmdu/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-libclang/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-libensemble/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-libsonata/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-lightgbm/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-lightly/package.py88
-rw-r--r--var/spack/repos/builtin/packages/py-lightning-api-access/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-lightning-uq-box/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-lightning-utilities/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-lightning/package.py160
-rw-r--r--var/spack/repos/builtin/packages/py-ligo-segments/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch24
-rw-r--r--var/spack/repos/builtin/packages/py-line-profiler/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-linear-operator/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-linkchecker/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-llnl-sina/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-llvmlite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-lmdb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lpips/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-lru-dict/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lscsoft-glue/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lws/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lxml/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-lz4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-macs2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-macs3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mahotas/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mapbox-earcut/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mariadb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-markov-clustering/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-markupsafe/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch16
-rw-r--r--var/spack/repos/builtin/packages/py-matplotlib/package.py206
-rw-r--r--var/spack/repos/builtin/packages/py-maturin/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-mayavi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-mdanalysis/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-mdanalysistests/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mechanize/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-meldmd/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-melissa-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-memray/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-merlin/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-meshpy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-meson-python/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-metomi-rose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-metpy/package.py56
-rw-r--r--var/spack/repos/builtin/packages/py-metric-learn/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-metrics/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-mgmetis/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-mikado/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-minisom/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-minkowskiengine/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-misk/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-misopy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ml-dtypes/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-mlflow/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-mmcv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mne-bids/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-mne/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-modin/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-modules-gui/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-monai/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-morphio/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-mpi4py/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-mpmath/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-mrcfile/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-msal/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-msgpack/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-msrest/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-multi-imbalance/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-multidict/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-multiecho/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-multiqc/package.py53
-rw-r--r--var/spack/repos/builtin/packages/py-multiurl/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-murmurhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mxfold2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-myhdl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-mypy/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-mysql-connector-python/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-mysqlclient/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-mysqlclient/use-pkg-config.patch172
-rw-r--r--var/spack/repos/builtin/packages/py-mysqldb1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-namex/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-nanobind/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-nanoget/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-nanomath/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-nanoplot/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-nanostat/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-narwhals/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-natsort/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nbconvert/package.py99
-rw-r--r--var/spack/repos/builtin/packages/py-nbconvert/style.min.css37
-rw-r--r--var/spack/repos/builtin/packages/py-nbdime/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-ndg-httpsclient/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-neobolt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-neptune-client/package.py43
-rw-r--r--var/spack/repos/builtin/packages/py-nest-asyncio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-netcdf4/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-netifaces/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-netket/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-netpyne/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-networkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-neuralgcm/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-nexusforge/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-nglview/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-nibabel/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-nilearn/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-ninja/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-nltk/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-nodeenv/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-non-regression-test-tools/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-notebook/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-nugraph/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-nuitka/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-numba/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-numba4jax/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-numcodecs/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-numexpr/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-numexpr3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-numl/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-numpy-quaternion/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-numpy-stl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py166
-rw-r--r--var/spack/repos/builtin/packages/py-nvidia-dali/package.py107
-rw-r--r--var/spack/repos/builtin/packages/py-nvidia-modulus/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-nvtx/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-oauthlib/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-obspy/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-okada-wrapper/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-olcf-velocity/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-onnx-opcounter/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-onnx/package.py78
-rw-r--r--var/spack/repos/builtin/packages/py-onnxruntime/0001-Find-ROCm-Packages-Individually.patch45
-rw-r--r--var/spack/repos/builtin/packages/py-onnxruntime/package.py131
-rw-r--r--var/spack/repos/builtin/packages/py-open-clip-torch/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-opencensus-context/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-openmc/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-openmesh/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-openslide-python/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-opentuner/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-ops/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-opt-einsum/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-optax/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-optree/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-or-tools/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-oracledb/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-ordered-set/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-orjson/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-osqp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-outdated/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-owslib/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-packaging/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pandas-datareader/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-pandas/package.py181
-rw-r--r--var/spack/repos/builtin/packages/py-panel/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-param/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-paramiko/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-parmed/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-parsl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-parso/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-partd/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-particle/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-pathspec/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-pbr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pdb-tools/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-pdm-backend/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-pdm-pep517/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-peachpy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py57
-rw-r--r--var/spack/repos/builtin/packages/py-pennylane-lightning/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-pennylane/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-petsc4py/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-pexpect/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-phanotate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-phonopy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-photutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-phydms/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-phylophlan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pickle5/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-picmistandard/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-pillow-simd/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py144
-rw-r--r--var/spack/repos/builtin/packages/py-pint/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-pip/package.py122
-rw-r--r--var/spack/repos/builtin/packages/py-pivy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-plotille/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-plotly/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-pluggy/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-poetry-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-poetry-plugin-tweak-dependencies-version/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-poetry/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-polars/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-pomegranate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-postcactus/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-pot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-poxy/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-poyo/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-pre-commit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pretty-errors/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-prettytable/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-projectq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-prokaryote/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-prompt-toolkit/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-properscoring/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-proto-plus/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-prov/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-psalg/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-psana/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-psutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-psyclone/package.py63
-rw-r--r--var/spack/repos/builtin/packages/py-psycopg2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-py-spy/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-py-tes/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-py2bit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-py4j/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pyamg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pyaml-env/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-pyarrow/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-pybedtools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pybigwig/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pybind11-stubgen/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pybind11/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-pybrain/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pybv/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-pycairo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycares/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pychecker/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycifrw/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pycm/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-pycocotools/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pycompadre/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pycortex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycparser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycrypto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycryptodome/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pycubexr/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-pycuda/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycurl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pydantic-core/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-pydantic-extra-types/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-pydantic-settings/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-pydantic/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-pydftracer/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-pydispatcher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyeda/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyee/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-pyelftools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pyenchant/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-pyerfa/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pyfaidx/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-pyfastaq/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-pyfftw/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-pyfits/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyfr/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-pygdal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pygeos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pygit2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pygments/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-pygmsh/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-pygmt/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-pygobject/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-pygpu/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pygresql/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pyhdf/package.py52
-rw-r--r--var/spack/repos/builtin/packages/py-pyheadtail/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pyhmmer/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-pyhull/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyinstrument-cext/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyinstrument/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyke/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pykerberos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pykokkos-base/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pylev/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pylikwid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pylint-gitlab/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-pylint/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pylith/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-pymatgen/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pymatreader/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pymol/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pymongo/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-pymoo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pymorph/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pymummer/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-pynacl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pynio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pynn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pynpm/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-pynucleus/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pynvtx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyodbc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyogrio/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-pyomo/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-pyopencl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyopengl/package.py68
-rw-r--r--var/spack/repos/builtin/packages/py-pypar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyparsing/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pypdf/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-pyppeteer/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-pyprecice/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-pyproj/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt4/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt5-sip/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt5/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt6-sip/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt6/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-pyqtgraph/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-pyrevolve/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyrfr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyro-ppl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyrocko/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-pyrodigal/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-pyrsistent/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pysam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyscf/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-pyscipopt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyseer/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-pysftp/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-pyshacl/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-pyshp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-pyside/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyside2/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-pysimdjson/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pyspark/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-pyspnego/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-pyspoa/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pysqlite3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pystac-client/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-pystac/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-aiohttp/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-allclose/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-asyncio/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-mpi/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-pylint/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-regtest/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-timeout/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pytest/package.py99
-rw-r--r--var/spack/repos/builtin/packages/py-python-bioformats/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-python-calamine/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-python-crfsuite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-python-deprecated/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-python-dotenv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-python-fmask/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-python-javabridge/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-jose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-json-logger/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-python-ldap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-levenshtein/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-libsbml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-python-lsp-jsonrpc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-python-lsp-server/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-python-lzo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-magic/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-python-mapnik/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-multipart/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-python-pptx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-ptrace/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-python-rapidjson/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-python-swiftclient/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-pythonsollya/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-pythran/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-pytng/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pytorch-lightning/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pytorch-warmup/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-pytz/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-pyuwsgi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pyvista/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-pywavelets/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pywcs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-pywin32/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyworld/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyyaml/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-pyzmq/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-qdldl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-qiskit-aer/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-qiskit-nature/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-qmtest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-qrcode/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-quantiphy/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-quantum-blackbird/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-quart/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-quast/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-qutip/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-radical-entk/package.py95
-rw-r--r--var/spack/repos/builtin/packages/py-radical-gtod/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-radical-pilot/package.py112
-rw-r--r--var/spack/repos/builtin/packages/py-radical-saga/package.py81
-rw-r--r--var/spack/repos/builtin/packages/py-radical-utils/package.py92
-rw-r--r--var/spack/repos/builtin/packages/py-rapidfuzz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rarfile/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rasterio/package.py66
-rw-r--r--var/spack/repos/builtin/packages/py-ray/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-rdflib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-reacton/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-referencing/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-regex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-regionmask/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-reproject/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-requests-file/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-requests-kerberos/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-requests/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-reretry/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-resize-right/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-resolvelib/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-rich-argparse/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-rich/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rios/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-rioxarray/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-river/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-rmm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-roifile/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-rotary-embedding-torch/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-rpds-py/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-rsatoolbox/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-rseqc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rtree/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-ruamel-ordereddict/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-rucio-clients/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-ruff/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-rustworkx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-rx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-s3fs/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-s3transfer/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-safetensors/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-scandir/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-schema/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-scientificpython/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-build-core/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-build/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-fmm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py157
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn-extra/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn/package.py135
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-sparse/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikits-odes/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py149
-rw-r--r--var/spack/repos/builtin/packages/py-scooby/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-scs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-seaborn/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-seekpath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-segmentation-models-pytorch/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-send2trash/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-sentencepiece/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sequence-models/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-setproctitle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-setuptools-rust/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-setuptools-scm/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-setuptools/package.py240
-rw-r--r--var/spack/repos/builtin/packages/py-sfepy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-shap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-shapely/package.py47
-rw-r--r--var/spack/repos/builtin/packages/py-shiboken/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-shiboken2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-shroud/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-simpleeval/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-simplejson/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-simpletraj/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-simpy/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-sip/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-slepc4py/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-smartredis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-smartsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-smote-variants/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-azure-batch/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-generic/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-sync/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-drmaa/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-flux/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-googlebatch/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-kubernetes/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm-jobstep/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-executor-plugin-tes/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-interface-executor-plugins/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-interface-report-plugins/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-interface-storage-plugins/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-azure/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-fs/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-ftp/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-gcs/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-http/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-s3/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-sftp/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-snakemake-storage-plugin-zenodo/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-sncosmo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-snoop/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-sonlib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-soupsieve/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-spacy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-spatialpandas/package.py31
-rw-r--r--var/spack/repos/builtin/packages/py-spdlog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-spglib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-click/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-design/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-fortran/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-immaterial/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-prompt/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-tabs/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx-toolbox/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx/package.py134
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxcontrib-spelling/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-sphinxemoji/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sqlparse/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-srsly/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-sspilib/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-stack-data/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-starlette/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-statsmodels/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-storm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-stratify/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-striprtf/package.py19
-rw-r--r--var/spack/repos/builtin/packages/py-stsci-distutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-superqt/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-swagger-spec-validator/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-symengine/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sympy/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-sysrsync/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-systemd-python/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-tables/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-tabulate/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-tatsu/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-tensorboard-plugin-wit/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-tensorboard/package.py204
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow-estimator/package.py65
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow-hub/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow-probability/package.py61
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow/absl_neon.patch55
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow/package.py534
-rw-r--r--var/spack/repos/builtin/packages/py-tensorstore/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-termgraph/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-tesorter/package.py21
-rw-r--r--var/spack/repos/builtin/packages/py-textual/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-textx/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-tfdlpack/package.py16
-rw-r--r--var/spack/repos/builtin/packages/py-theano/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-thinc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-thop/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-tifffile/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-timm/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-tinyarray/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tokenizers/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-tomopy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-topiary-asr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-toposort/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-torch-cluster/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-torch-fidelity/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-torch-geometric/package.py94
-rw-r--r--var/spack/repos/builtin/packages/py-torch-harmonics/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py158
-rw-r--r--var/spack/repos/builtin/packages/py-torch-scatter/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-torch-sparse/package.py63
-rw-r--r--var/spack/repos/builtin/packages/py-torch-spline-conv/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py345
-rw-r--r--var/spack/repos/builtin/packages/py-torchaudio/package.py130
-rw-r--r--var/spack/repos/builtin/packages/py-torchdata/package.py57
-rw-r--r--var/spack/repos/builtin/packages/py-torchgeo/package.py287
-rw-r--r--var/spack/repos/builtin/packages/py-torchmetrics/package.py61
-rw-r--r--var/spack/repos/builtin/packages/py-torchseg/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-torchtext/package.py78
-rw-r--r--var/spack/repos/builtin/packages/py-torchvision/package.py133
-rw-r--r--var/spack/repos/builtin/packages/py-tornado/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tqdm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-traitlets/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-traits/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-transformer-engine/package.py50
-rw-r--r--var/spack/repos/builtin/packages/py-transformers/package.py59
-rw-r--r--var/spack/repos/builtin/packages/py-transonic/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-tree-math/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-tree/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-treelib/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-triangle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-trieregex/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-triton/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-trx-python/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-tuiview/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-tuspy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tuswsgi/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-tweedledum/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-twisted/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-typed-ast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-typing-extensions/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-ucsf-pyem/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-ucx-py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-uhi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ujson/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-umi-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-uncertainty-toolbox/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-unfoldnd/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-unicycler/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unshare/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-urllib3/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-urwid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-userpath/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-uv/package.py30
-rw-r--r--var/spack/repos/builtin/packages/py-uvicorn/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-uvloop/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-uwsgi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-uxarray/package.py56
-rw-r--r--var/spack/repos/builtin/packages/py-validators/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-vascpy/package.py33
-rw-r--r--var/spack/repos/builtin/packages/py-vector/package.py42
-rw-r--r--var/spack/repos/builtin/packages/py-versioneer-518/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-versioneer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-virtualenv/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-vl-convert-python/package.py34
-rw-r--r--var/spack/repos/builtin/packages/py-waitress/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-wand/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wandb/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-warpx/package.py134
-rw-r--r--var/spack/repos/builtin/packages/py-watchdog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-webcolors/package.py9
-rw-r--r--var/spack/repos/builtin/packages/py-webdataset/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-webkit-server/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-websocket-client/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-websockets/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-werkzeug/package.py59
-rw-r--r--var/spack/repos/builtin/packages/py-whatshap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wheel/package.py76
-rw-r--r--var/spack/repos/builtin/packages/py-wordcloud/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-workload-automation/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wrapt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wxflow/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-wxpython/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-x-clip/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-x21/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-xarray-tensorstore/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-xarray/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-xattr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xdot/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-xesmf/package.py32
-rw-r--r--var/spack/repos/builtin/packages/py-xgboost/add-lib64.patch24
-rw-r--r--var/spack/repos/builtin/packages/py-xgboost/package.py80
-rw-r--r--var/spack/repos/builtin/packages/py-xhistogram/package.py22
-rw-r--r--var/spack/repos/builtin/packages/py-xpyb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xrootdpyfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xskillscore/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-xtb/package.py7
-rw-r--r--var/spack/repos/builtin/packages/py-xxhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-yajl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-yarl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-your/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-yt/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-ytopt-autotune/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ytopt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-z3-solver/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-zarr/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-zfit-interface/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-zfit/package.py83
-rw-r--r--var/spack/repos/builtin/packages/py-zipfile-deflate64/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-zope-event/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-zope-interface/package.py17
-rw-r--r--var/spack/repos/builtin/packages/py-zstandard/package.py20
-rw-r--r--var/spack/repos/builtin/packages/pygmo/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pypy-bootstrap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pypy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/pystring/package.py21
-rw-r--r--var/spack/repos/builtin/packages/pythia6/CMakeLists.txt1
-rw-r--r--var/spack/repos/builtin/packages/pythia6/package.py23
-rw-r--r--var/spack/repos/builtin/packages/pythia8/package.py42
-rw-r--r--var/spack/repos/builtin/packages/pythia8/pythia8-cpp20-fjcore-forward-decl.patch37
-rw-r--r--var/spack/repos/builtin/packages/python-venv/package.py104
-rw-r--r--var/spack/repos/builtin/packages/python/package.py355
-rw-r--r--var/spack/repos/builtin/packages/q-e-sirius/package.py22
-rw-r--r--var/spack/repos/builtin/packages/qb3/package.py13
-rw-r--r--var/spack/repos/builtin/packages/qca/package.py3
-rw-r--r--var/spack/repos/builtin/packages/qcachegrind/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qcat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qctool/package.py32
-rw-r--r--var/spack/repos/builtin/packages/qd/package.py11
-rw-r--r--var/spack/repos/builtin/packages/qemu/package.py58
-rw-r--r--var/spack/repos/builtin/packages/qgis/package.py25
-rw-r--r--var/spack/repos/builtin/packages/qgraf/package.py5
-rw-r--r--var/spack/repos/builtin/packages/qhull/package.py3
-rw-r--r--var/spack/repos/builtin/packages/qjson/package.py4
-rw-r--r--var/spack/repos/builtin/packages/qmcpack/package.py6
-rw-r--r--var/spack/repos/builtin/packages/qmd-progress/package.py3
-rw-r--r--var/spack/repos/builtin/packages/qnnpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/qoz/package.py5
-rw-r--r--var/spack/repos/builtin/packages/qpdf/package.py49
-rw-r--r--var/spack/repos/builtin/packages/qperf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qrmumps/package.py54
-rw-r--r--var/spack/repos/builtin/packages/qrupdate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qscintilla/package.py34
-rw-r--r--var/spack/repos/builtin/packages/qt-5compat/package.py30
-rw-r--r--var/spack/repos/builtin/packages/qt-base/package.py65
-rw-r--r--var/spack/repos/builtin/packages/qt-declarative/package.py9
-rw-r--r--var/spack/repos/builtin/packages/qt-quick3d/package.py8
-rw-r--r--var/spack/repos/builtin/packages/qt-quicktimeline/package.py8
-rw-r--r--var/spack/repos/builtin/packages/qt-shadertools/package.py8
-rw-r--r--var/spack/repos/builtin/packages/qt-svg/package.py12
-rw-r--r--var/spack/repos/builtin/packages/qt-tools/package.py60
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py151
-rw-r--r--var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch31
-rw-r--r--var/spack/repos/builtin/packages/qt/qt515_masm_python.patch22
-rw-r--r--var/spack/repos/builtin/packages/qtgraph/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qthreads/package.py5
-rw-r--r--var/spack/repos/builtin/packages/qtkeychain/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qtltools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qualimap/package.py1
-rw-r--r--var/spack/repos/builtin/packages/quantum-espresso/package.py57
-rw-r--r--var/spack/repos/builtin/packages/qucs/package.py5
-rw-r--r--var/spack/repos/builtin/packages/quickjs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/quicksilver/package.py4
-rw-r--r--var/spack/repos/builtin/packages/quo-vadis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/quota/package.py4
-rw-r--r--var/spack/repos/builtin/packages/qwt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/qwtpolar/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-abaenrichment/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-acepack/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-acgh/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-acme/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-adabag/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-ade4/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-adegenet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-adegraphics/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-adephylo/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-adespatial/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-adsplit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-aer/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-afex/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-affxparser/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-affy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-affyio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-affyplm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-amap/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-amelia/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-analysispageserver/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-aneufinder/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-anytime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-aod/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ape/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-aplot/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-argparse/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-arm/package.py27
-rw-r--r--var/spack/repos/builtin/packages/r-arrangements/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-askpass/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-asreml/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-assertive-code/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-backports/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bamsignals/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-base64enc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bayesm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bayesplot/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-bbmisc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-beachmat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-beeswarm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bfast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bglr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bh/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-biasedurn/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bigalgebra/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-biglm/package.py19
-rw-r--r--var/spack/repos/builtin/packages/r-bigmemory-sri/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bigmemory/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bindrcpp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bio3d/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-biobase/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-biocmanager/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-biocneighbors/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-biocparallel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-biocsingular/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-biomartr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-biostrings/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-biovizbase/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bit64/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bitops/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-blavaan/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-blockmodeling/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bluster/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bookdown/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-boot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-brew/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-bridgesampling/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-brio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-brms/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-broom-helpers/package.py32
-rw-r--r--var/spack/repos/builtin/packages/r-broom/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-bslib/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-bsseq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-bwstest/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-c50/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-cachem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-cairo/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-callr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-caracas/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cardata/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-caret/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-caretensemble/package.py11
-rw-r--r--var/spack/repos/builtin/packages/r-caroline/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-catools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-cca/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-checkmate/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-chemometrics/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-chipseq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-chron/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-circlize/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-clarabel/package.py28
-rw-r--r--var/spack/repos/builtin/packages/r-class/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-classint/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cli/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-clock/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-clue/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cluster/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-clustergeneration/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cner/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-coda/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-codetools/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-coin/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-colorspace/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-colourpicker/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-commonmark/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-compositions/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-compquadform/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-conquer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-consrank/package.py23
-rw-r--r--var/spack/repos/builtin/packages/r-construct/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-convevol/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-copula/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-corrplot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-countrycode/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-covr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cowplot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-cpp11/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-crayon/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-credentials/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-crosstalk/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-crul/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cubature/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-cubist/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-curl/package.py39
-rw-r--r--var/spack/repos/builtin/packages/r-cvxr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-dada2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-data-table/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-dbi/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-dbplyr/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-debugme/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-decipher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-delayedarray/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-deldir/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-densvis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-deoptim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-deoptimr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-desc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-deseq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-deseq2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-desolve/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-diagram/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-diagrammer/package.py17
-rw-r--r--var/spack/repos/builtin/packages/r-dicekriging/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-diffobj/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-digest/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-diptest/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dismo/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-distributional/package.py10
-rw-r--r--var/spack/repos/builtin/packages/r-diversitree/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-dnacopy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-doby/package.py13
-rw-r--r--var/spack/repos/builtin/packages/r-dotcall64/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-downlit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dplyr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dqrng/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dss/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-dtw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-e1071/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-earth/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-ebseq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ecosolver/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ecp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-edger/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-ellipse/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ellipsis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-emmeans/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-energy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-envstats/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ergm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-estimability/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-europepmc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-evaluate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-evd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-exactextractr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-exomecopy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-expint/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-expm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-factominer/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fansi/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-farver/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastcluster/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastdigest/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastdummies/package.py24
-rw-r--r--var/spack/repos/builtin/packages/r-fastica/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastmap/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastmatch/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fastmatrix/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fda/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ff/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fftwtools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-fgsea/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-fields/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-filehash/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-filelock/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-fitdistrplus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-flashclust/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-flexclust/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fnn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-fontawesome/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-forecast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-foreign/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fpc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fracdiff/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-fs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-future-apply/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-future/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gamlss-data/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gamlss-dist/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gamlss/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gargle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gbm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gbrd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gcrma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gdalutilities/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gdata/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gdsfmt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-geiger/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-genefilter/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-genie3/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-genomeinfodbdata/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-genomicalignments/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-genomicranges/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gensa/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-geojsonsf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-geometries/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-geometry/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-geomorph/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-geor/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-geosphere/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-gert/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-getopt/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggally/package.py10
-rw-r--r--var/spack/repos/builtin/packages/r-ggbeeswarm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ggdendro/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ggforce/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggfun/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-ggmap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-ggnewscale/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ggplot2/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-ggplotify/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggraph/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-ggrastr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggrepel/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggridges/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ggsci/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ggstats/package.py33
-rw-r--r--var/spack/repos/builtin/packages/r-ggthemes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ggvis/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gh/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-git2r/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-glmgampoi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-glmnet/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-globals/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-glue/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gmodels/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gmp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-goftest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gofuncr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-googleauthr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-googledrive/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-googlesheets4/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-googlevis/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gosemsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gower/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gparotation/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gplots/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-graph/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-graphlayouts/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-grbase/package.py13
-rw-r--r--var/spack/repos/builtin/packages/r-gsa/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gsl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gsodr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-gss/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gstat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-gtable/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gtools/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-gwmodel/package.py11
-rw-r--r--var/spack/repos/builtin/packages/r-hardhat/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-haven/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-hdf5array/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-hdf5r/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-hdrcde/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-hexbin/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-hh/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-highr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-hmisc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-hoardr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-htmltable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-htmltools/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-htmlwidgets/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-httpuv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-httr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-httr2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-humaniformat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-hydrogof/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-hydrotsm/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-igraph/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-illuminaio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-imager/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-impute/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-influencer/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-inline/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-insight/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-interp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-intervals/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ipred/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-iranges/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-irlba/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-iso/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-isoband/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-jade/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-jomo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-jpeg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-jsonify/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-jsonlite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-kableextra/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-kernlab/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-kernsmooth/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-kknn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-klar/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-knitr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-ks/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-ksamples/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-labeling/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-labelled/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-lars/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-later/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lattice/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lava/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-lavaan/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lazyeval/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-leafem/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-leaflet-providers/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-leaflet/package.py15
-rw-r--r--var/spack/repos/builtin/packages/r-leaps/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-leiden/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lfe/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lhs/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-libcoin/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-libpressio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-lifecycle/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-limma/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-limsolve/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-list/package.py30
-rw-r--r--var/spack/repos/builtin/packages/r-listenv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lme4/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-lmtest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-lobstr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-locfit/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-log4r/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-loo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-lpsolve/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lpsolveapi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-lsei/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-lubridate/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-lwgeom/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-magick/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-magrittr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-makecdfenv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-maldiquant/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mapplots/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mapproj/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-maps/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-maptools/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mapview/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-markdown/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mass/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-matlab/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-matrix/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-matrixmodels/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-matrixstats/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mclust/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mcmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mcmcglmm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mcmcpack/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-mco/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mda/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-memisc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-memuse/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mendelianrandomization/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-meta/package.py11
-rw-r--r--var/spack/repos/builtin/packages/r-metafor/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-metap/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-metapod/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mgcv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mice/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-microbenchmark/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mime/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-minqa/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mixtools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mlbench/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mlr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mlrmbo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mnormt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-mockery/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-modelmetrics/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-mscoreutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-msnbase/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-multcomp/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-multcompview/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-multicool/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-multitaper/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-multtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-munsell/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mvtnorm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-mzr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-nanotime/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ncdf4/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-network/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nimble/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-nleqslv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nlme/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-nloptr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-nmf/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nmof/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-nnet/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nnls/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nonnest2/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-nor1mix/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-np/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-openssl/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-openxlsx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-optimx/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-optparse/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ordinal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-osqp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-packrat/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-paleotree/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pamr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pan/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-parallelly/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-paramhelpers/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-party/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-partykit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-patchwork/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-pbapply/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pbdzmq/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pbivnorm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pbkrtest/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-pcamethods/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pcapp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pegas/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-permute/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-phangorn/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-phantompeakqualtools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-philentropy/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-phylobase/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-phytools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-picante/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pinfsc50/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pixmap/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pkgbuild/package.py13
-rw-r--r--var/spack/repos/builtin/packages/r-pkgcache/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-pkgdepends/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-pkgdown/package.py19
-rw-r--r--var/spack/repos/builtin/packages/r-pkgload/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-pkgmaker/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pki/package.py22
-rw-r--r--var/spack/repos/builtin/packages/r-plot3d/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-plotly/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-plotmo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-plotrix/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pls/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-plyr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pmcmrplus/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-png/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-polspline/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-polyclip/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pool/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-poorman/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-popvar/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-posterior/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-powerlaw/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-prabclus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pracma/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-preprocesscore/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-prettyunits/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-proc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-processx/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-prodlim/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-profvis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-progress/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-progressr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-proj/package.py20
-rw-r--r--var/spack/repos/builtin/packages/r-proj4/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-projpred/package.py20
-rw-r--r--var/spack/repos/builtin/packages/r-promises/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-proxy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-pryr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ps/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-pscbs/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-pspline/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-psych/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-ptw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-purrr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-qqconf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-qs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-qtl/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-quadprog/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-quantmod/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-quantreg/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-quickjsr/package.py19
-rw-r--r--var/spack/repos/builtin/packages/r-quickplot/package.py22
-rw-r--r--var/spack/repos/builtin/packages/r-r-oo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-r-utils/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ragg/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rainbow/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-randomforest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-ranger/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rann/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rapiserialize/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rappdirs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-raster/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rbgl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rbibutils/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcpp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-rcppannoy/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcpparmadillo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppblaze/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rcppcctz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppcnpy/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcppdate/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppde/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppeigen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rcppensmallen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rcppgsl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rcpphnsw/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcppml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppparallel/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcppprogress/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rcpproll/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rcpptoml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rcppziggurat/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rcurl/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rdpack/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-readr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-readxl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-recipes/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rematch/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-remotes/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-renv/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-repr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-reprex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-reproducible/package.py20
-rw-r--r--var/spack/repos/builtin/packages/r-require/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-reshape2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-restfulr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-reticulate/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rfast/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rferns/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rgdal/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rgenoud/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rgeos/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rgexf/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rgl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rgooglemaps/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rgraphviz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rhdf5/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rhdf5filters/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rhdf5lib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rhtslib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rinside/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rio/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-rjags/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rjava/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rjson/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-rjsonio/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rlang/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rlist/package.py27
-rw-r--r--var/spack/repos/builtin/packages/r-rmariadb/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rmarkdown/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rmpfr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rmpi/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-rms/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-rmutil/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rmysql/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rnaseqmap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rncl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rnoaa/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-robust/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-robustbase/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-roc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rodbc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rook/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rots/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-roxygen2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rpart-plot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rpart/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rpostgres/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rpostgresql/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rprojroot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rrblup/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rrcov/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rrpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rsamtools/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-rsconnect/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rsnns/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rspectra/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-rsqlite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rstan/package.py12
-rw-r--r--var/spack/repos/builtin/packages/r-rstantools/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rstudioapi/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-rsubread/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rtracklayer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rtsne/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-runit/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-runjags/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-ruv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rvest/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-rviennacl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rzmq/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-s2/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-s4vectors/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-samr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-sandwich/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-sass/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-satellite/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-scales/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-scattermore/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-scatterpie/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-scatterplot3d/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-scran/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-scs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sctransform/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-scuttle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-segmented/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-seqinr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-servr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sets/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-seurat/package.py11
-rw-r--r--var/spack/repos/builtin/packages/r-seuratobject/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-sf/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-sfheaders/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sfsmisc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-shadowtext/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-shape/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-shiny/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-shortread/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-signac/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-simpleaffy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sitmo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-smoof/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-snakecase/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-snowfall/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-snprelate/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-snpstats/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-som/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sourcetools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-sp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-spacetime/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-spades-core/package.py16
-rw-r--r--var/spack/repos/builtin/packages/r-spades-tools/package.py24
-rw-r--r--var/spack/repos/builtin/packages/r-spades/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-spam/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sparsem/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-sparsematrixstats/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-spatial/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-spatialeco/package.py32
-rw-r--r--var/spack/repos/builtin/packages/r-spatialpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-spatialreg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-data/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-explore/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-geom/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-linnet/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-model/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-random/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-sparse/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-univar/package.py23
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat-utils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-spatstat/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-spdata/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-spdep/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-speedglm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-splancs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-splines2/package.py27
-rw-r--r--var/spack/repos/builtin/packages/r-stabledist/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-stanheaders/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-stars/package.py5
-rw-r--r--var/spack/repos/builtin/packages/r-statmod/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-statnet-common/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-stringfish/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-stringi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-stringr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-strucchange/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-strucchangercpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-styler/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-subplex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-suppdists/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-survey/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-survival/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-sva/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-svglite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-sys/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-systemfonts/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-tclust/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-teachingdemos/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tensora/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-terra/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tester/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-testthat/package.py23
-rw-r--r--var/spack/repos/builtin/packages/r-textshaping/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-tfbstools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-tfmpvalue/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-tibble/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-tictoc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tidycensus/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tidygraph/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-tidyr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-tidyselect/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-tidytree/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tiff/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tigris/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-timechange/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-timedate/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tinytex/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tinytiger/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-tmvnsim/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-triebeard/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-truncnorm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-tseries/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-ttr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tweenr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-tzdb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-ucminf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-udunits2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-units/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-urca/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-urltools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-usethis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-utf8/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-uuid/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-uwot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-v8/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-variantannotation/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-vcd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-vcfr/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-vctrs/package.py10
-rw-r--r--var/spack/repos/builtin/packages/r-vegan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-vgam/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-vioplot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-vipor/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-viridis/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-viridislite/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-vroom/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-vsn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-waldo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-webshot/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-wgcna/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-withr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-wk/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-writexl/package.py20
-rw-r--r--var/spack/repos/builtin/packages/r-wru/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-xde/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-xfun/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-xgboost/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-xlconnect/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-xml/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-xml2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/r-xnomial/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-xopen/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-xts/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-xvector/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-yaimpute/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-yaml/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-yulab-utils/package.py9
-rw-r--r--var/spack/repos/builtin/packages/r-zcompositions/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-zip/package.py1
-rw-r--r--var/spack/repos/builtin/packages/r-zlibbioc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-zoo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r/package.py47
-rw-r--r--var/spack/repos/builtin/packages/r/relocate-which.patch52
-rw-r--r--var/spack/repos/builtin/packages/r3d/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rabbitmq-c/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rabbitmq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/racket/package.py4
-rw-r--r--var/spack/repos/builtin/packages/racon/package.py3
-rw-r--r--var/spack/repos/builtin/packages/raft/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ragel/package.py3
-rw-r--r--var/spack/repos/builtin/packages/raja-perf/package.py344
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py369
-rw-r--r--var/spack/repos/builtin/packages/ramulator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/randfold/package.py2
-rw-r--r--var/spack/repos/builtin/packages/random123/package.py6
-rw-r--r--var/spack/repos/builtin/packages/random123/v1140-hip.patch296
-rw-r--r--var/spack/repos/builtin/packages/range-v3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rankstr/package.py7
-rw-r--r--var/spack/repos/builtin/packages/rapidjson/no_march-1.2-2024.patch38
-rw-r--r--var/spack/repos/builtin/packages/rapidjson/package.py8
-rw-r--r--var/spack/repos/builtin/packages/raptor2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rarpd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rasdaemon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rasqal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ratel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ravel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/raxml-ng/package.py3
-rw-r--r--var/spack/repos/builtin/packages/raxml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ray/package.py4
-rw-r--r--var/spack/repos/builtin/packages/rayleigh/package.py75
-rw-r--r--var/spack/repos/builtin/packages/raylib/package.py34
-rw-r--r--var/spack/repos/builtin/packages/rccl-tests/package.py8
-rw-r--r--var/spack/repos/builtin/packages/rccl/0001-Fix-numactl-path-issue.patch13
-rw-r--r--var/spack/repos/builtin/packages/rccl/0002-Fix-numactl-rocm-smi-path-issue.patch24
-rw-r--r--var/spack/repos/builtin/packages/rccl/0004-Set-rocm-core-path-for-version-file.patch13
-rw-r--r--var/spack/repos/builtin/packages/rccl/package.py221
-rw-r--r--var/spack/repos/builtin/packages/rclone/package.py43
-rw-r--r--var/spack/repos/builtin/packages/rdc/package.py180
-rw-r--r--var/spack/repos/builtin/packages/rdkit/package.py9
-rw-r--r--var/spack/repos/builtin/packages/rdma-core/libdrm.patch11
-rw-r--r--var/spack/repos/builtin/packages/rdma-core/package.py15
-rw-r--r--var/spack/repos/builtin/packages/re2/package.py43
-rw-r--r--var/spack/repos/builtin/packages/re2c/package.py66
-rw-r--r--var/spack/repos/builtin/packages/readfq/package.py2
-rw-r--r--var/spack/repos/builtin/packages/readline/package.py2
-rw-r--r--var/spack/repos/builtin/packages/recola-sm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/recola/package.py4
-rw-r--r--var/spack/repos/builtin/packages/recon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/recorder/package.py3
-rw-r--r--var/spack/repos/builtin/packages/redis-ai/package.py3
-rw-r--r--var/spack/repos/builtin/packages/redis-plus-plus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/redis/package.py65
-rw-r--r--var/spack/repos/builtin/packages/redland-bindings/package.py13
-rw-r--r--var/spack/repos/builtin/packages/redland/package.py2
-rw-r--r--var/spack/repos/builtin/packages/redset/package.py20
-rw-r--r--var/spack/repos/builtin/packages/reframe/package.py26
-rw-r--r--var/spack/repos/builtin/packages/regale/package.py3
-rw-r--r--var/spack/repos/builtin/packages/regtools/package.py25
-rw-r--r--var/spack/repos/builtin/packages/relax/package.py2
-rw-r--r--var/spack/repos/builtin/packages/relion/package.py2
-rw-r--r--var/spack/repos/builtin/packages/remhos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rempi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/rendercheck/package.py6
-rw-r--r--var/spack/repos/builtin/packages/repeatmasker/package.py4
-rw-r--r--var/spack/repos/builtin/packages/reprimand/package.py2
-rw-r--r--var/spack/repos/builtin/packages/resolve/package.py14
-rw-r--r--var/spack/repos/builtin/packages/restic/package.py33
-rw-r--r--var/spack/repos/builtin/packages/revbayes/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rgb/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rhash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rinetd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ripgrep/package.py27
-rw-r--r--var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py75
-rw-r--r--var/spack/repos/builtin/packages/rivet/package.py32
-rw-r--r--var/spack/repos/builtin/packages/rkcommon/package.py13
-rw-r--r--var/spack/repos/builtin/packages/rkt-base/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rkt-compiler-lib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rkt-racket-lib/package.py5
-rw-r--r--var/spack/repos/builtin/packages/rkt-zo-lib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rlwrap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rmgdft/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rmlab/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rnaz/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rng-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rngstreams/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rnpletal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rocal/package.py108
-rw-r--r--var/spack/repos/builtin/packages/rocalution/0003-fix-compilation-for-rocalution-5.2.0.patch35
-rw-r--r--var/spack/repos/builtin/packages/rocalution/package.py202
-rw-r--r--var/spack/repos/builtin/packages/rocblas/0001-Fix-compilation-error-with-StringRef-to-basic-string.patch25
-rw-r--r--var/spack/repos/builtin/packages/rocblas/0002-Fix-rocblas-clients-blas.patch24
-rw-r--r--var/spack/repos/builtin/packages/rocblas/0003-Fix-rocblas-gentest.patch9
-rw-r--r--var/spack/repos/builtin/packages/rocblas/0007-add-rocm-openmp-extras-include-dir.patch20
-rw-r--r--var/spack/repos/builtin/packages/rocblas/package.py274
-rw-r--r--var/spack/repos/builtin/packages/rocdecode/package.py54
-rw-r--r--var/spack/repos/builtin/packages/rocfft/0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch76
-rw-r--r--var/spack/repos/builtin/packages/rocfft/0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch13
-rw-r--r--var/spack/repos/builtin/packages/rocfft/0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch12
-rw-r--r--var/spack/repos/builtin/packages/rocfft/0005-Fix-clients-tests-include-rocrand-fftw-include-dir-rocm-6.0.0.patch39
-rw-r--r--var/spack/repos/builtin/packages/rocfft/package.py221
-rw-r--r--var/spack/repos/builtin/packages/rocketmq/package.py23
-rw-r--r--var/spack/repos/builtin/packages/rocksdb/package.py11
-rw-r--r--var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py150
-rw-r--r--var/spack/repos/builtin/packages/rocm-clang-ocl/package.py167
-rw-r--r--var/spack/repos/builtin/packages/rocm-cmake/package.py136
-rw-r--r--var/spack/repos/builtin/packages/rocm-core/package.py33
-rw-r--r--var/spack/repos/builtin/packages/rocm-dbgapi/package.py177
-rw-r--r--var/spack/repos/builtin/packages/rocm-debug-agent/package.py223
-rw-r--r--var/spack/repos/builtin/packages/rocm-device-libs/package.py175
-rw-r--r--var/spack/repos/builtin/packages/rocm-gdb/package.py156
-rw-r--r--var/spack/repos/builtin/packages/rocm-opencl/package.py302
-rw-r--r--var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env-6.2.patch13
-rw-r--r--var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env.patch26
-rw-r--r--var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Linking-hsakmt-libdrm-and-numactl-libraries-6.1.patch29
-rw-r--r--var/spack/repos/builtin/packages/rocm-openmp-extras/package.py604
-rw-r--r--var/spack/repos/builtin/packages/rocm-smi-lib/package.py212
-rw-r--r--var/spack/repos/builtin/packages/rocm-smi/package.py72
-rw-r--r--var/spack/repos/builtin/packages/rocm-tensile/0001-fix-compile-error.patch25
-rw-r--r--var/spack/repos/builtin/packages/rocm-tensile/0002-require-openmp-when-tensile-use-openmp-is-on.patch90
-rw-r--r--var/spack/repos/builtin/packages/rocm-tensile/package.py226
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch33
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch14
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch88
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch50
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/005-cleanup-path-reference-donot-download-googletest-yaml.patch159
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch371
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.1.patch543
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.2.1.patch686
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path.patch636
-rw-r--r--var/spack/repos/builtin/packages/rocm-validation-suite/package.py216
-rw-r--r--var/spack/repos/builtin/packages/rocminfo/package.py151
-rw-r--r--var/spack/repos/builtin/packages/rocmlir/package.py50
-rw-r--r--var/spack/repos/builtin/packages/rocprim/package.py161
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch74
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch68
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch69
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch24
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-dev/package.py222
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-register/001-add-cpack-fmt-glog.patch38
-rw-r--r--var/spack/repos/builtin/packages/rocprofiler-register/package.py40
-rw-r--r--var/spack/repos/builtin/packages/rocpydecode/package.py56
-rw-r--r--var/spack/repos/builtin/packages/rocrand/package.py218
-rw-r--r--var/spack/repos/builtin/packages/rocsolver/fmt-8.1-compatibility.patch143
-rw-r--r--var/spack/repos/builtin/packages/rocsolver/link-clients-blas.patch22
-rw-r--r--var/spack/repos/builtin/packages/rocsolver/package.py185
-rw-r--r--var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-4.5.patch78
-rw-r--r--var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-5.2.patch78
-rw-r--r--var/spack/repos/builtin/packages/rocsparse/package.py161
-rw-r--r--var/spack/repos/builtin/packages/rocthrust/package.py142
-rw-r--r--var/spack/repos/builtin/packages/roctracer-dev-api/package.py100
-rw-r--r--var/spack/repos/builtin/packages/roctracer-dev/0002-use-clang-18.patch26
-rw-r--r--var/spack/repos/builtin/packages/roctracer-dev/package.py160
-rw-r--r--var/spack/repos/builtin/packages/rocwmma/package.py54
-rw-r--r--var/spack/repos/builtin/packages/roms/package.py45
-rw-r--r--var/spack/repos/builtin/packages/root/package.py187
-rw-r--r--var/spack/repos/builtin/packages/rosco/intel-oneapi-29.patch13
-rw-r--r--var/spack/repos/builtin/packages/rosco/intel-oneapi-2x.patch13
-rw-r--r--var/spack/repos/builtin/packages/rosco/package.py66
-rw-r--r--var/spack/repos/builtin/packages/ross/package.py9
-rw-r--r--var/spack/repos/builtin/packages/routinator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/routino/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rpcsvc-proto/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rpm/package.py13
-rw-r--r--var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests-6.1.patch56
-rw-r--r--var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests.patch62
-rw-r--r--var/spack/repos/builtin/packages/rpp/0003-include-half-through-spack-package.patch61
-rw-r--r--var/spack/repos/builtin/packages/rpp/package.py126
-rw-r--r--var/spack/repos/builtin/packages/rr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rrdtool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rsbench/package.py17
-rw-r--r--var/spack/repos/builtin/packages/rsem/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rsl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rstart/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rstudio/package.py5
-rw-r--r--var/spack/repos/builtin/packages/rsync/package.py44
-rw-r--r--var/spack/repos/builtin/packages/rsyslog/package.py23
-rw-r--r--var/spack/repos/builtin/packages/rt-tests/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rtags/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rtmpdump/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ruby-hpricot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ruby-narray/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ruby-rake/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ruby-rdiscount/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py14
-rw-r--r--var/spack/repos/builtin/packages/runc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rust-bindgen/package.py28
-rw-r--r--var/spack/repos/builtin/packages/rust-bootstrap/package.py56
-rw-r--r--var/spack/repos/builtin/packages/rust-clap/package.py25
-rw-r--r--var/spack/repos/builtin/packages/rust/package.py93
-rw-r--r--var/spack/repos/builtin/packages/s4pred/package.py45
-rw-r--r--var/spack/repos/builtin/packages/sabre/package.py2
-rw-r--r--var/spack/repos/builtin/packages/saga-gis/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sailfish/package.py3
-rw-r--r--var/spack/repos/builtin/packages/salmon-tddft/package.py3
-rw-r--r--var/spack/repos/builtin/packages/salmon/package.py18
-rw-r--r--var/spack/repos/builtin/packages/salome-configuration/package.py8
-rw-r--r--var/spack/repos/builtin/packages/salome-med/package.py31
-rw-r--r--var/spack/repos/builtin/packages/salome-medcoupling/package.py69
-rw-r--r--var/spack/repos/builtin/packages/sam2p/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sambamba/package.py2
-rw-r--r--var/spack/repos/builtin/packages/samblaster/package.py3
-rw-r--r--var/spack/repos/builtin/packages/samrai/package.py4
-rw-r--r--var/spack/repos/builtin/packages/samtools/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sandbox/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sartre/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sarus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/satsuma2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/saws/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sbcl-bootstrap/package.py115
-rw-r--r--var/spack/repos/builtin/packages/sbcl/package.py82
-rw-r--r--var/spack/repos/builtin/packages/sblim-sfcc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sbml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sbp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sbt/package.py1
-rw-r--r--var/spack/repos/builtin/packages/scafacos/package.py4
-rw-r--r--var/spack/repos/builtin/packages/scala/package.py5
-rw-r--r--var/spack/repos/builtin/packages/scalasca/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scale/package.py5
-rw-r--r--var/spack/repos/builtin/packages/scallop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scalpel/package.py5
-rw-r--r--var/spack/repos/builtin/packages/scan-for-matches/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scantailor/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sccache/package.py66
-rw-r--r--var/spack/repos/builtin/packages/scine-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scine-database/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scine-molassembler/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scine-qcmaquis/cmake_molcas_interface.patch19
-rw-r--r--var/spack/repos/builtin/packages/scine-qcmaquis/package.py49
-rw-r--r--var/spack/repos/builtin/packages/scine-readuct/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scine-serenity/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scine-sparrow/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scine-utilities/package.py8
-rw-r--r--var/spack/repos/builtin/packages/scine-xtb/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scitokens-cpp/package.py8
-rw-r--r--var/spack/repos/builtin/packages/scnlib/package.py61
-rw-r--r--var/spack/repos/builtin/packages/scons/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scorec-core/package.py4
-rw-r--r--var/spack/repos/builtin/packages/scorep/package.py29
-rw-r--r--var/spack/repos/builtin/packages/scorpio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py30
-rw-r--r--var/spack/repos/builtin/packages/scotch/parmetis-mpi.patch127
-rw-r--r--var/spack/repos/builtin/packages/scr/package.py147
-rw-r--r--var/spack/repos/builtin/packages/screen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scripts/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scrot/package.py3
-rw-r--r--var/spack/repos/builtin/packages/scs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sctk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sdl2-image/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sdl2-ttf/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sdl2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/sdsl-lite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/seacas/package.py219
-rw-r--r--var/spack/repos/builtin/packages/seacr/package.py33
-rw-r--r--var/spack/repos/builtin/packages/seal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sed/package.py9
-rw-r--r--var/spack/repos/builtin/packages/seissol/package.py364
-rw-r--r--var/spack/repos/builtin/packages/selalib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/semiprof/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sensei/package.py56
-rw-r--r--var/spack/repos/builtin/packages/sentencepiece/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sentieon-genomics/package.py1
-rw-r--r--var/spack/repos/builtin/packages/seq-gen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/seqan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/seqfu/package.py37
-rw-r--r--var/spack/repos/builtin/packages/seqfu/wno_incompatible_pointer_types.patch13
-rw-r--r--var/spack/repos/builtin/packages/seqkit/package.py30
-rw-r--r--var/spack/repos/builtin/packages/seqprep/package.py2
-rw-r--r--var/spack/repos/builtin/packages/seqtk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/serenity-libint/package.py7
-rw-r--r--var/spack/repos/builtin/packages/serenity/package.py150
-rw-r--r--var/spack/repos/builtin/packages/serf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/serialbox/package.py19
-rw-r--r--var/spack/repos/builtin/packages/sessreg/package.py6
-rw-r--r--var/spack/repos/builtin/packages/setserial/package.py4
-rw-r--r--var/spack/repos/builtin/packages/setxkbmap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sfcgal/package.py42
-rw-r--r--var/spack/repos/builtin/packages/sfcio/package.py15
-rw-r--r--var/spack/repos/builtin/packages/sga/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sgpp/package.py42
-rw-r--r--var/spack/repos/builtin/packages/shadow/package.py8
-rw-r--r--var/spack/repos/builtin/packages/shapeit4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/shapelib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/shapemapper/package.py25
-rw-r--r--var/spack/repos/builtin/packages/shared-mime-info/package.py4
-rw-r--r--var/spack/repos/builtin/packages/shark/package.py2
-rw-r--r--var/spack/repos/builtin/packages/shc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sheenbidi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/shengbte/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sherpa/package.py197
-rw-r--r--var/spack/repos/builtin/packages/shocklibs/package.py3
-rw-r--r--var/spack/repos/builtin/packages/shoremap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/showfont/package.py2
-rw-r--r--var/spack/repos/builtin/packages/shtools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/shuffile/package.py7
-rw-r--r--var/spack/repos/builtin/packages/sicer2/package.py23
-rw-r--r--var/spack/repos/builtin/packages/sickle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sicm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/siesta/package.py279
-rw-r--r--var/spack/repos/builtin/packages/sigcpp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sigio/package.py13
-rw-r--r--var/spack/repos/builtin/packages/signify/package.py3
-rw-r--r--var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch30
-rw-r--r--var/spack/repos/builtin/packages/silo/package.py33
-rw-r--r--var/spack/repos/builtin/packages/simde/package.py2
-rw-r--r--var/spack/repos/builtin/packages/simgrid/package.py4
-rw-r--r--var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py7
-rw-r--r--var/spack/repos/builtin/packages/simple-dftd3/package.py3
-rw-r--r--var/spack/repos/builtin/packages/simplemoc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/simsipm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/simul/package.py2
-rw-r--r--var/spack/repos/builtin/packages/simulationio/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sina/package.py3
-rw-r--r--var/spack/repos/builtin/packages/singularity-eos/package.py6
-rw-r--r--var/spack/repos/builtin/packages/singularity-legacy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/singularity/package.py2
-rw-r--r--var/spack/repos/builtin/packages/singularityce/package.py16
-rw-r--r--var/spack/repos/builtin/packages/sio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sionlib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sirius/package.py104
-rw-r--r--var/spack/repos/builtin/packages/skilion-onedrive/package.py2
-rw-r--r--var/spack/repos/builtin/packages/skopeo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/slang/package.py2
-rw-r--r--var/spack/repos/builtin/packages/slate/omp.patch20
-rw-r--r--var/spack/repos/builtin/packages/slate/package.py70
-rw-r--r--var/spack/repos/builtin/packages/sleef/package.py64
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py26
-rw-r--r--var/spack/repos/builtin/packages/slirp4netns/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sloccount/package.py3
-rw-r--r--var/spack/repos/builtin/packages/slurm-drmaa/package.py2
-rw-r--r--var/spack/repos/builtin/packages/slurm/package.py7
-rw-r--r--var/spack/repos/builtin/packages/smalt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/smartdenovo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/smartmontools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/smee-client/package.py4
-rw-r--r--var/spack/repos/builtin/packages/smproxy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/snakemake/package.py144
-rw-r--r--var/spack/repos/builtin/packages/snap-berkeley/package.py2
-rw-r--r--var/spack/repos/builtin/packages/snap-korf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/snap/package.py4
-rw-r--r--var/spack/repos/builtin/packages/snappy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/snbone/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sniffles/package.py3
-rw-r--r--var/spack/repos/builtin/packages/snpeff/package.py2
-rw-r--r--var/spack/repos/builtin/packages/snptest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/soapdenovo-trans/package.py2
-rw-r--r--var/spack/repos/builtin/packages/soapdenovo2/package.py3
-rw-r--r--var/spack/repos/builtin/packages/socat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/soci/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sofa-c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sollve/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sollya/package.py3
-rw-r--r--var/spack/repos/builtin/packages/solr/package.py39
-rw-r--r--var/spack/repos/builtin/packages/somatic-sniper/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sombrero/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sonlib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sopt/package.py79
-rw-r--r--var/spack/repos/builtin/packages/soqt/package.py56
-rw-r--r--var/spack/repos/builtin/packages/sortmerna/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sos/package.py48
-rw-r--r--var/spack/repos/builtin/packages/sosflow/package.py3
-rw-r--r--var/spack/repos/builtin/packages/source-highlight/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sourmash/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sowing/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sox/package.py11
-rw-r--r--var/spack/repos/builtin/packages/sp/package.py5
-rw-r--r--var/spack/repos/builtin/packages/spaceranger/package.py38
-rw-r--r--var/spack/repos/builtin/packages/spack/package.py8
-rw-r--r--var/spack/repos/builtin/packages/spades/package.py14
-rw-r--r--var/spack/repos/builtin/packages/span-lite/package.py5
-rw-r--r--var/spack/repos/builtin/packages/spark/package.py6
-rw-r--r--var/spack/repos/builtin/packages/sparrow/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sparse/package.py6
-rw-r--r--var/spack/repos/builtin/packages/sparsehash/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sparskit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sparta/package.py1
-rw-r--r--var/spack/repos/builtin/packages/spath/package.py7
-rw-r--r--var/spack/repos/builtin/packages/spatialdata/package.py69
-rw-r--r--var/spack/repos/builtin/packages/spdk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/spdlog/package.py24
-rw-r--r--var/spack/repos/builtin/packages/specfem3d-globe/package.py4
-rw-r--r--var/spack/repos/builtin/packages/spectra/package.py3
-rw-r--r--var/spack/repos/builtin/packages/spectre/package.py69
-rw-r--r--var/spack/repos/builtin/packages/spectrum-mpi/package.py29
-rw-r--r--var/spack/repos/builtin/packages/speex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/speexdsp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sperr/package.py9
-rw-r--r--var/spack/repos/builtin/packages/spfft/package.py27
-rw-r--r--var/spack/repos/builtin/packages/spglib/package.py16
-rw-r--r--var/spack/repos/builtin/packages/sph2pipe/package.py2
-rw-r--r--var/spack/repos/builtin/packages/spherepack/package.py12
-rw-r--r--var/spack/repos/builtin/packages/spindle/package.py3
-rw-r--r--var/spack/repos/builtin/packages/spiner/package.py3
-rw-r--r--var/spack/repos/builtin/packages/spiral-package-fftx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/spiral-software/package.py8
-rw-r--r--var/spack/repos/builtin/packages/spla/package.py59
-rw-r--r--var/spack/repos/builtin/packages/spot/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sprng/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sqlcipher/package.py23
-rw-r--r--var/spack/repos/builtin/packages/sqlite-jdbc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sqlite/package.py160
-rw-r--r--var/spack/repos/builtin/packages/sqlite/quote_compiler_in_makefile.patch13
-rw-r--r--var/spack/repos/builtin/packages/sqlitebrowser/package.py3
-rw-r--r--var/spack/repos/builtin/packages/squashfs-mount/package.py2
-rw-r--r--var/spack/repos/builtin/packages/squashfs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/squashfuse/package.py19
-rw-r--r--var/spack/repos/builtin/packages/squid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sra-tools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/srcml-identifier-getter-tool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/srcml/package.py3
-rw-r--r--var/spack/repos/builtin/packages/srm-ifce/package.py39
-rw-r--r--var/spack/repos/builtin/packages/sse2neon/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sshfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sshpass/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ssht/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ssmtp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sst-core/package.py28
-rw-r--r--var/spack/repos/builtin/packages/sst-dumpi/package.py6
-rw-r--r--var/spack/repos/builtin/packages/sst-elements/package.py18
-rw-r--r--var/spack/repos/builtin/packages/sst-macro/package.py18
-rw-r--r--var/spack/repos/builtin/packages/sst-transports/package.py3
-rw-r--r--var/spack/repos/builtin/packages/stacks/package.py3
-rw-r--r--var/spack/repos/builtin/packages/staden-io-lib/package.py29
-rw-r--r--var/spack/repos/builtin/packages/star/package.py15
-rw-r--r--var/spack/repos/builtin/packages/starlight/package.py4
-rw-r--r--var/spack/repos/builtin/packages/starpu/package.py11
-rw-r--r--var/spack/repos/builtin/packages/startup-notification/package.py3
-rw-r--r--var/spack/repos/builtin/packages/stat/package.py4
-rw-r--r--var/spack/repos/builtin/packages/static-analysis-suite/package.py38
-rw-r--r--var/spack/repos/builtin/packages/stc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/stdexec/package.py12
-rw-r--r--var/spack/repos/builtin/packages/steps/package.py36
-rw-r--r--var/spack/repos/builtin/packages/stinger/package.py3
-rw-r--r--var/spack/repos/builtin/packages/storm/package.py1
-rw-r--r--var/spack/repos/builtin/packages/stow/package.py1
-rw-r--r--var/spack/repos/builtin/packages/strace/package.py17
-rw-r--r--var/spack/repos/builtin/packages/stream/package.py3
-rw-r--r--var/spack/repos/builtin/packages/stress/package.py2
-rw-r--r--var/spack/repos/builtin/packages/stressapptest/package.py3
-rw-r--r--var/spack/repos/builtin/packages/string-view-lite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/stringtie/package.py3
-rw-r--r--var/spack/repos/builtin/packages/stripack/package.py7
-rw-r--r--var/spack/repos/builtin/packages/structure/package.py2
-rw-r--r--var/spack/repos/builtin/packages/strumpack/package.py114
-rw-r--r--var/spack/repos/builtin/packages/su2/package.py103
-rw-r--r--var/spack/repos/builtin/packages/su2/remove_preconfigure_timestamp_check.patch13
-rw-r--r--var/spack/repos/builtin/packages/subread/package.py2
-rw-r--r--var/spack/repos/builtin/packages/subversion/package.py3
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py152
-rw-r--r--var/spack/repos/builtin/packages/sumo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sundials/Change-HIP_PLATFORM-from-HCC-to-AMD-and-NVCC-to-NVIDIA.patch28
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py215
-rw-r--r--var/spack/repos/builtin/packages/sundials/sundials-hip-platform.patch33
-rw-r--r--var/spack/repos/builtin/packages/superchic/package.py2
-rw-r--r--var/spack/repos/builtin/packages/superlu-dist/package.py14
-rw-r--r--var/spack/repos/builtin/packages/superlu-mt/package.py9
-rw-r--r--var/spack/repos/builtin/packages/superlu/package.py13
-rw-r--r--var/spack/repos/builtin/packages/supermagic/package.py34
-rw-r--r--var/spack/repos/builtin/packages/survey/package.py5
-rw-r--r--var/spack/repos/builtin/packages/sw4/package.py5
-rw-r--r--var/spack/repos/builtin/packages/swan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/swap-assembler/package.py2
-rw-r--r--var/spack/repos/builtin/packages/swarm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/swftools/package.py3
-rw-r--r--var/spack/repos/builtin/packages/swiftsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/swig/package.py7
-rw-r--r--var/spack/repos/builtin/packages/swipl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/symengine/package.py3
-rw-r--r--var/spack/repos/builtin/packages/symlinks/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sympack/package.py93
-rw-r--r--var/spack/repos/builtin/packages/sympol/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sys-sage/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sysbench/package.py3
-rw-r--r--var/spack/repos/builtin/packages/syscalc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sysfsutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sysget/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sysstat/package.py14
-rw-r--r--var/spack/repos/builtin/packages/systemc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/systemd/package.py155
-rw-r--r--var/spack/repos/builtin/packages/systemtap/package.py3
-rw-r--r--var/spack/repos/builtin/packages/sz-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/sz/package.py147
-rw-r--r--var/spack/repos/builtin/packages/sz3/package.py27
-rw-r--r--var/spack/repos/builtin/packages/szauto/package.py3
-rw-r--r--var/spack/repos/builtin/packages/szx/package.py53
-rw-r--r--var/spack/repos/builtin/packages/t8code/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tabix/package.py2
-rw-r--r--var/spack/repos/builtin/packages/talass/package.py2
-rw-r--r--var/spack/repos/builtin/packages/talloc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tamaas/package.py28
-rw-r--r--var/spack/repos/builtin/packages/tamaas/recent_compilers.patch57
-rw-r--r--var/spack/repos/builtin/packages/tandem/package.py44
-rw-r--r--var/spack/repos/builtin/packages/tangram/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tar/package.py65
-rw-r--r--var/spack/repos/builtin/packages/task/package.py11
-rw-r--r--var/spack/repos/builtin/packages/taskflow/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tasmanian/package.py20
-rw-r--r--var/spack/repos/builtin/packages/tau/package.py323
-rw-r--r--var/spack/repos/builtin/packages/tau/tau-rocm-disable-llvm-plugin.patch19
-rw-r--r--var/spack/repos/builtin/packages/tauola/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tb-lmto/package.py66
-rw-r--r--var/spack/repos/builtin/packages/tbl2asn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tblite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tcl-itcl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tcl-tcllib/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tcl-tclxml/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tcl/package.py197
-rw-r--r--var/spack/repos/builtin/packages/tcl/tcl-quote-cc-path.patch13
-rw-r--r--var/spack/repos/builtin/packages/tclap/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tcoffee/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tcpdump/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tcsh/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tdengine/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tealeaf/package.py6
-rw-r--r--var/spack/repos/builtin/packages/teckit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tecplot/package.py5
-rw-r--r--var/spack/repos/builtin/packages/telegraf/package.py1
-rw-r--r--var/spack/repos/builtin/packages/telocal/package.py21
-rw-r--r--var/spack/repos/builtin/packages/tempestremap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/templight-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/templight/package.py5
-rw-r--r--var/spack/repos/builtin/packages/tempo/package.py54
-rw-r--r--var/spack/repos/builtin/packages/tengine/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tensorflow-serving-client/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tensorpipe/package.py3
-rw-r--r--var/spack/repos/builtin/packages/termcap/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tesseract/package.py2
-rw-r--r--var/spack/repos/builtin/packages/test-drive/package.py2
-rw-r--r--var/spack/repos/builtin/packages/testdfsio/package.py10
-rw-r--r--var/spack/repos/builtin/packages/tests-sos/package.py36
-rw-r--r--var/spack/repos/builtin/packages/testu01/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tetgen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tethex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/texinfo/package.py6
-rw-r--r--var/spack/repos/builtin/packages/texlive/package.py178
-rw-r--r--var/spack/repos/builtin/packages/texstudio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/textparser/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tfel/package.py23
-rw-r--r--var/spack/repos/builtin/packages/the-silver-searcher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/thepeg/package.py4
-rw-r--r--var/spack/repos/builtin/packages/thermo4pfm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/thornado-mini/package.py2
-rw-r--r--var/spack/repos/builtin/packages/thrift/package.py8
-rw-r--r--var/spack/repos/builtin/packages/thrust/package.py38
-rw-r--r--var/spack/repos/builtin/packages/thunar-volman/package.py38
-rw-r--r--var/spack/repos/builtin/packages/thunar/package.py76
-rw-r--r--var/spack/repos/builtin/packages/tig/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tiled-mm/package.py5
-rw-r--r--var/spack/repos/builtin/packages/time/package.py2
-rw-r--r--var/spack/repos/builtin/packages/timedatex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/timemory/package.py9
-rw-r--r--var/spack/repos/builtin/packages/timew/package.py22
-rw-r--r--var/spack/repos/builtin/packages/tini/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tinker/package.py8
-rw-r--r--var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py52
-rw-r--r--var/spack/repos/builtin/packages/tinycbor/package.py27
-rw-r--r--var/spack/repos/builtin/packages/tinygltf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tinyobjloader/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tinyxml2/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tioga/package.py7
-rw-r--r--var/spack/repos/builtin/packages/tippecanoe/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tiptop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tiramisu/package.py8
-rw-r--r--var/spack/repos/builtin/packages/tix/package.py15
-rw-r--r--var/spack/repos/builtin/packages/tixi/package.py47
-rw-r--r--var/spack/repos/builtin/packages/tkrzw/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tl-expected/package.py18
-rw-r--r--var/spack/repos/builtin/packages/tldd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py11
-rw-r--r--var/spack/repos/builtin/packages/tnftp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tomcat/package.py41
-rw-r--r--var/spack/repos/builtin/packages/toml-f/package.py2
-rw-r--r--var/spack/repos/builtin/packages/toml11/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tomlplusplus/package.py20
-rw-r--r--var/spack/repos/builtin/packages/tophat/package.py3
-rw-r--r--var/spack/repos/builtin/packages/torque/package.py2
-rw-r--r--var/spack/repos/builtin/packages/totalview/package.py254
-rw-r--r--var/spack/repos/builtin/packages/tpm2-tss/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tracer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tracy-client/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tracy/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tramonto/package.py3
-rw-r--r--var/spack/repos/builtin/packages/transposome/package.py2
-rw-r--r--var/spack/repos/builtin/packages/transset/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tree-sitter/package.py13
-rw-r--r--var/spack/repos/builtin/packages/treelite/package.py9
-rw-r--r--var/spack/repos/builtin/packages/treesub/package.py2
-rw-r--r--var/spack/repos/builtin/packages/trexio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/trf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/trident/package.py1
-rw-r--r--var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py8
-rw-r--r--var/spack/repos/builtin/packages/trilinos/0001-use-the-gcnArchName-inplace-of-gcnArch-as-gcnArch-is.patch26
-rw-r--r--var/spack/repos/builtin/packages/trilinos/cstdint_gcc13.patch33
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py141
-rw-r--r--var/spack/repos/builtin/packages/trimal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/trinity/package.py3
-rw-r--r--var/spack/repos/builtin/packages/trnascan-se/package.py5
-rw-r--r--var/spack/repos/builtin/packages/trompeloeil/package.py3
-rw-r--r--var/spack/repos/builtin/packages/truchas/package.py31
-rw-r--r--var/spack/repos/builtin/packages/tskit/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tulip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/tumbler/package.py72
-rw-r--r--var/spack/repos/builtin/packages/turbine/package.py10
-rw-r--r--var/spack/repos/builtin/packages/turnserver/package.py2
-rw-r--r--var/spack/repos/builtin/packages/twm/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tycho2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/typhon/package.py3
-rw-r--r--var/spack/repos/builtin/packages/typhonio/package.py3
-rw-r--r--var/spack/repos/builtin/packages/typst/package.py37
-rw-r--r--var/spack/repos/builtin/packages/ucc/package.py34
-rw-r--r--var/spack/repos/builtin/packages/uchardet/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ucsc-bedclip/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ucsc-bedgraphtobigwig/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ucx/package.py14
-rw-r--r--var/spack/repos/builtin/packages/udunits/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ufo-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ufo-filters/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ufs-utils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ufs-weather-model/package.py175
-rw-r--r--var/spack/repos/builtin/packages/uftrace/package.py49
-rw-r--r--var/spack/repos/builtin/packages/umap/package.py4
-rw-r--r--var/spack/repos/builtin/packages/umesimd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/umoci/package.py7
-rw-r--r--var/spack/repos/builtin/packages/umpire/dual_blt_import_umpire_2022.10_2023.06.patch106
-rw-r--r--var/spack/repos/builtin/packages/umpire/export_includes.patch130
-rw-r--r--var/spack/repos/builtin/packages/umpire/package.py371
-rw-r--r--var/spack/repos/builtin/packages/unblur/package.py1
-rw-r--r--var/spack/repos/builtin/packages/uncrustify/package.py5
-rw-r--r--var/spack/repos/builtin/packages/unibilium/package.py3
-rw-r--r--var/spack/repos/builtin/packages/unifdef/package.py2
-rw-r--r--var/spack/repos/builtin/packages/unifyfs/package.py4
-rw-r--r--var/spack/repos/builtin/packages/unigen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/unison/package.py29
-rw-r--r--var/spack/repos/builtin/packages/units/package.py3
-rw-r--r--var/spack/repos/builtin/packages/unittest-cpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/universal-ctags/package.py7
-rw-r--r--var/spack/repos/builtin/packages/universal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/unixodbc/package.py8
-rw-r--r--var/spack/repos/builtin/packages/unqlite/package.py2
-rw-r--r--var/spack/repos/builtin/packages/unrar/package.py11
-rw-r--r--var/spack/repos/builtin/packages/unuran/package.py3
-rw-r--r--var/spack/repos/builtin/packages/unzip/package.py21
-rw-r--r--var/spack/repos/builtin/packages/unzip/strip.patch11
-rw-r--r--var/spack/repos/builtin/packages/upcxx/fix_configure_ldflags.patch26
-rw-r--r--var/spack/repos/builtin/packages/upcxx/package.py81
-rw-r--r--var/spack/repos/builtin/packages/upp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/uqtk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/uriparser/package.py3
-rw-r--r--var/spack/repos/builtin/packages/usbutils/package.py2
-rw-r--r--var/spack/repos/builtin/packages/usearch/0001-Don-t-statically-link.patch26
-rw-r--r--var/spack/repos/builtin/packages/usearch/package.py40
-rw-r--r--var/spack/repos/builtin/packages/userspace-rcu/package.py2
-rw-r--r--var/spack/repos/builtin/packages/ut/package.py4
-rw-r--r--var/spack/repos/builtin/packages/utf8cpp/package.py20
-rw-r--r--var/spack/repos/builtin/packages/utf8proc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/uthash/package.py3
-rw-r--r--var/spack/repos/builtin/packages/util-linux-uuid/package.py11
-rw-r--r--var/spack/repos/builtin/packages/util-linux/package.py11
-rw-r--r--var/spack/repos/builtin/packages/util-macros/package.py13
-rw-r--r--var/spack/repos/builtin/packages/uvw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vacuumms/package.py42
-rw-r--r--var/spack/repos/builtin/packages/vala/package.py2
-rw-r--r--var/spack/repos/builtin/packages/valgrind/package.py6
-rw-r--r--var/spack/repos/builtin/packages/valijson/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vampirtrace/package.py4
-rw-r--r--var/spack/repos/builtin/packages/vapor/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vardictjava/package.py1
-rw-r--r--var/spack/repos/builtin/packages/variorum/package.py6
-rw-r--r--var/spack/repos/builtin/packages/varnish-cache/package.py21
-rw-r--r--var/spack/repos/builtin/packages/vasp/package.py475
-rw-r--r--var/spack/repos/builtin/packages/vbfnlo/package.py7
-rw-r--r--var/spack/repos/builtin/packages/vbz-compression/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vc/package.py7
-rw-r--r--var/spack/repos/builtin/packages/vcftools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/vde/package.py28
-rw-r--r--var/spack/repos/builtin/packages/vdt/package.py8
-rw-r--r--var/spack/repos/builtin/packages/veccore/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vecgeom/package.py110
-rw-r--r--var/spack/repos/builtin/packages/veclibfort/package.py5
-rw-r--r--var/spack/repos/builtin/packages/vecmem/package.py38
-rw-r--r--var/spack/repos/builtin/packages/vectorclass-version2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/veloc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/vep-cache/package.py151
-rw-r--r--var/spack/repos/builtin/packages/vep/package.py131
-rw-r--r--var/spack/repos/builtin/packages/verdict/package.py41
-rw-r--r--var/spack/repos/builtin/packages/verible/package.py42
-rw-r--r--var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch13
-rw-r--r--var/spack/repos/builtin/packages/verilator/package.py21
-rw-r--r--var/spack/repos/builtin/packages/verrou/package.py5
-rw-r--r--var/spack/repos/builtin/packages/vgm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/viennarna/package.py6
-rw-r--r--var/spack/repos/builtin/packages/viewres/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vigra/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vim/package.py5
-rw-r--r--var/spack/repos/builtin/packages/virtualgl/package.py5
-rw-r--r--var/spack/repos/builtin/packages/virtuoso/package.py3
-rw-r--r--var/spack/repos/builtin/packages/visit-cgns/package.py4
-rw-r--r--var/spack/repos/builtin/packages/visit-ffp/package.py6
-rw-r--r--var/spack/repos/builtin/packages/visit-mfem/package.py4
-rw-r--r--var/spack/repos/builtin/packages/visit-silo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/visit-unv/package.py6
-rw-r--r--var/spack/repos/builtin/packages/visit/19958-enable-python-and-check-pip.patch60
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py85
-rw-r--r--var/spack/repos/builtin/packages/vite/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vmatch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vmd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/volk/package.py3
-rw-r--r--var/spack/repos/builtin/packages/voms/package.py54
-rw-r--r--var/spack/repos/builtin/packages/voropp/package.py28
-rw-r--r--var/spack/repos/builtin/packages/voropp/voro++-0.4.6-cmake.patch33
-rw-r--r--var/spack/repos/builtin/packages/votca-csg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/votca-csgapps/package.py2
-rw-r--r--var/spack/repos/builtin/packages/votca-ctp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/votca-tools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/votca-xtp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/votca/package.py10
-rw-r--r--var/spack/repos/builtin/packages/vpfft/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vpic/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vsearch/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vsftpd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/vtable-dumper/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vtk-h/package.py3
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch73
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/mr3259-thrust-is_arithmetic-fix.patch35
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/mr3271-contourtree-print-error.patch38
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/mr3272-bad-mir-table-method.patch35
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/package.py112
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/vtkm-mr3215-ext-geom-fix.patch145
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py101
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_alias_hdf5.patch14
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_find_liblzma.patch11
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_findproj_config.patch115
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_movie_link_ogg.patch12
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_proj_include_no_strict.patch26
-rw-r--r--var/spack/repos/builtin/packages/vtk/vtk_use_sqlite_name_vtk_expects.patch26
-rw-r--r--var/spack/repos/builtin/packages/vvtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/w3emc/package.py15
-rw-r--r--var/spack/repos/builtin/packages/w3m/package.py26
-rw-r--r--var/spack/repos/builtin/packages/w3nco/package.py13
-rw-r--r--var/spack/repos/builtin/packages/wannier90/package.py10
-rw-r--r--var/spack/repos/builtin/packages/warpx/package.py404
-rw-r--r--var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py38
-rw-r--r--var/spack/repos/builtin/packages/watch/package.py2
-rw-r--r--var/spack/repos/builtin/packages/wayland-protocols/package.py15
-rw-r--r--var/spack/repos/builtin/packages/wayland/package.py5
-rw-r--r--var/spack/repos/builtin/packages/wcs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/webbench/package.py2
-rw-r--r--var/spack/repos/builtin/packages/weechat/package.py3
-rw-r--r--var/spack/repos/builtin/packages/weighttp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/wget/package.py6
-rw-r--r--var/spack/repos/builtin/packages/wgl/package.py20
-rw-r--r--var/spack/repos/builtin/packages/wgrib2/package.py13
-rw-r--r--var/spack/repos/builtin/packages/wgsim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/which/package.py2
-rw-r--r--var/spack/repos/builtin/packages/whip/package.py3
-rw-r--r--var/spack/repos/builtin/packages/whizard/hepmc3.3.0.patch25
-rw-r--r--var/spack/repos/builtin/packages/whizard/package.py35
-rw-r--r--var/spack/repos/builtin/packages/wi4mpi/package.py6
-rw-r--r--var/spack/repos/builtin/packages/win-file/package.py35
-rw-r--r--var/spack/repos/builtin/packages/win-gpg/package.py36
-rw-r--r--var/spack/repos/builtin/packages/win-sdk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/win-wdk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/winbison/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wiredtiger/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wireshark/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wonton/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wordnet/package.py2
-rw-r--r--var/spack/repos/builtin/packages/wps/package.py5
-rw-r--r--var/spack/repos/builtin/packages/wrf-io/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wrf/package.py76
-rw-r--r--var/spack/repos/builtin/packages/wrf/patches/4.4/ifx.patch4
-rw-r--r--var/spack/repos/builtin/packages/wrk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/wsmancli/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wt/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wtdbg2/package.py5
-rw-r--r--var/spack/repos/builtin/packages/wxparaver/package.py3
-rw-r--r--var/spack/repos/builtin/packages/wxpropgrid/package.py4
-rw-r--r--var/spack/repos/builtin/packages/wxwidgets/package.py16
-rw-r--r--var/spack/repos/builtin/packages/x11perf/package.py6
-rw-r--r--var/spack/repos/builtin/packages/x264/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xalan-c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xapian-core/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xauth/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xbacklight/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xbae/package.py26
-rw-r--r--var/spack/repos/builtin/packages/xbiff/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xbitmaps/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xbraid/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xcalc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xcb-demo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xcb-proto/package.py37
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-cursor/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-errors/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-image/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-keysyms/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-renderutil/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-wm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xcb-util-xrm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xcb-util/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xcdf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xcfun/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xclip/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xclipboard/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xclock/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xcmiscproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xcmsdb/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xcompmgr/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xconsole/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xcursor-themes/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xcursorgen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xdbedizzy/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xdelta/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xditview/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xdm/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xdmf3/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xdotool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xdpyinfo/package.py12
-rw-r--r--var/spack/repos/builtin/packages/xdriinfo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xedit/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xeniumranger/package.py38
-rw-r--r--var/spack/repos/builtin/packages/xerces-c/package.py19
-rw-r--r--var/spack/repos/builtin/packages/xeus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xev/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xextproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xeyes/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xf86bigfontproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xf86dga/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xf86dgaproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xf86driproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xf86miscproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xf86rushproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xf86vidmodeproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xfce4-appfinder/package.py36
-rw-r--r--var/spack/repos/builtin/packages/xfce4-core/package.py46
-rw-r--r--var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch14
-rw-r--r--var/spack/repos/builtin/packages/xfce4-panel/package.py57
-rw-r--r--var/spack/repos/builtin/packages/xfce4-session/package.py65
-rw-r--r--var/spack/repos/builtin/packages/xfce4-settings/package.py59
-rw-r--r--var/spack/repos/builtin/packages/xfconf/package.py33
-rw-r--r--var/spack/repos/builtin/packages/xfd/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xfdesktop/package.py53
-rw-r--r--var/spack/repos/builtin/packages/xfindproxy/package.py8
-rw-r--r--var/spack/repos/builtin/packages/xfontsel/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xforms/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xforms/xformsPatch.patch66
-rw-r--r--var/spack/repos/builtin/packages/xfs/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xfsdump/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xfsinfo/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xfsprogs/package.py25
-rw-r--r--var/spack/repos/builtin/packages/xfwm4/package.py45
-rw-r--r--var/spack/repos/builtin/packages/xfwp/package.py8
-rw-r--r--var/spack/repos/builtin/packages/xgamma/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xgboost/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xgc/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xhmm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xhost/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xineramaproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xinit/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xinput/package.py12
-rw-r--r--var/spack/repos/builtin/packages/xkbcomp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/xkbevd/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xkbprint/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xkbutils/package.py9
-rw-r--r--var/spack/repos/builtin/packages/xkeyboard-config/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xkill/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xl/detection_test.yaml31
-rw-r--r--var/spack/repos/builtin/packages/xl/package.py65
-rw-r--r--var/spack/repos/builtin/packages/xlc/detection_test.yaml18
-rw-r--r--var/spack/repos/builtin/packages/xlc/package.py81
-rw-r--r--var/spack/repos/builtin/packages/xlf/detection_test.yaml11
-rw-r--r--var/spack/repos/builtin/packages/xlf/package.py69
-rw-r--r--var/spack/repos/builtin/packages/xload/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xlogo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xlsatoms/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xlsclients/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xlsfonts/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xmag/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xman/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xmessage/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xmh/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xmlf90/fj_modmakefile.patch13
-rw-r--r--var/spack/repos/builtin/packages/xmlf90/package.py23
-rw-r--r--var/spack/repos/builtin/packages/xmlrpc-c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xmlto/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xmodmap/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xmore/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xnnpack/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xorg-cf-files/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xorg-docs/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xorg-gtest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xorg-server/package.py110
-rw-r--r--var/spack/repos/builtin/packages/xorg-server/sysmacros.patch24
-rw-r--r--var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xorgproto/package.py21
-rw-r--r--var/spack/repos/builtin/packages/xphelloworld/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xplsprinters/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xpmem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xpr/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xprehashprinterlist/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xprop/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xproperty/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xproto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xqilla/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xrandr/package.py12
-rw-r--r--var/spack/repos/builtin/packages/xrdb/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xrdcl-record/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xrefresh/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xrootd/package.py51
-rw-r--r--var/spack/repos/builtin/packages/xrx/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xsbench/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xscope/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xsd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xsdk-examples/package.py19
-rw-r--r--var/spack/repos/builtin/packages/xsdk/package.py191
-rw-r--r--var/spack/repos/builtin/packages/xset/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xsetmode/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xsetpointer/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xsetroot/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xsimd/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xsm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xstdcmap/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xtb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xtcdata/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xtensor-blas/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xtensor-python/package.py10
-rw-r--r--var/spack/repos/builtin/packages/xtensor/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xterm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xtl/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xtrans/package.py8
-rw-r--r--var/spack/repos/builtin/packages/xtrap/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xts/package.py13
-rw-r--r--var/spack/repos/builtin/packages/xv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xvidtune/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xvinfo/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xwd/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xwidgets/package.py2
-rw-r--r--var/spack/repos/builtin/packages/xwininfo/package.py7
-rw-r--r--var/spack/repos/builtin/packages/xwud/package.py6
-rw-r--r--var/spack/repos/builtin/packages/xxd-standalone/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xxdiff/package.py3
-rw-r--r--var/spack/repos/builtin/packages/xxhash/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xyce/package.py125
-rw-r--r--var/spack/repos/builtin/packages/xz/package.py6
-rw-r--r--var/spack/repos/builtin/packages/yade/package.py2
-rw-r--r--var/spack/repos/builtin/packages/yafyaml/package.py42
-rw-r--r--var/spack/repos/builtin/packages/yajl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/yaksa/package.py2
-rw-r--r--var/spack/repos/builtin/packages/yambo/package.py138
-rw-r--r--var/spack/repos/builtin/packages/yaml-cpp/package.py14
-rw-r--r--var/spack/repos/builtin/packages/yara/package.py9
-rw-r--r--var/spack/repos/builtin/packages/yasm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/yoda/package.py8
-rw-r--r--var/spack/repos/builtin/packages/yorick/package.py4
-rw-r--r--var/spack/repos/builtin/packages/yosys/package.py18
-rw-r--r--var/spack/repos/builtin/packages/yq/package.py28
-rw-r--r--var/spack/repos/builtin/packages/yyjson/package.py23
-rw-r--r--var/spack/repos/builtin/packages/z-checker/package.py3
-rw-r--r--var/spack/repos/builtin/packages/z3/package.py15
-rw-r--r--var/spack/repos/builtin/packages/zabbix/package.py45
-rw-r--r--var/spack/repos/builtin/packages/zerosum/package.py76
-rw-r--r--var/spack/repos/builtin/packages/zfp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/zfs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/zig/package.py11
-rw-r--r--var/spack/repos/builtin/packages/zip/11-typo-it-is-ambiguities-not-amgibuities.patch26
-rw-r--r--var/spack/repos/builtin/packages/zip/12-gcc14-no-implicit-declarations-fix.patch71
-rw-r--r--var/spack/repos/builtin/packages/zip/package.py9
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/package.py66
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/pr-1542.patch224
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/pr-1546.patch182
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/pr-1561.patch210
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/pr-1562.patch432
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/pr-1698.patch31
-rw-r--r--var/spack/repos/builtin/packages/zlib/package.py25
-rw-r--r--var/spack/repos/builtin/packages/zoltan/package.py6
-rw-r--r--var/spack/repos/builtin/packages/zookeeper/package.py20
-rw-r--r--var/spack/repos/builtin/packages/zopfli/package.py3
-rw-r--r--var/spack/repos/builtin/packages/zoxide/package.py24
-rw-r--r--var/spack/repos/builtin/packages/zsh/package.py6
-rw-r--r--var/spack/repos/builtin/packages/zstd/package.py8
-rw-r--r--var/spack/repos/builtin/packages/zstr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/zziplib/package.py4
-rw-r--r--var/spack/repos/compiler_runtime.test/packages/gcc/package.py15
-rw-r--r--var/spack/repos/compiler_runtime.test/packages/pkg-a/package.py (renamed from var/spack/repos/compiler_runtime.test/packages/a/package.py)4
-rw-r--r--var/spack/repos/compiler_runtime.test/packages/pkg-b/package.py (renamed from var/spack/repos/compiler_runtime.test/packages/b/package.py)2
l---------var/spack/repos/duplicates.test/packages/python-venv1
-rw-r--r--var/spack/repos/flags.test/packages/t/package.py15
-rw-r--r--var/spack/repos/flags.test/packages/u/package.py13
-rw-r--r--var/spack/repos/flags.test/packages/v/package.py14
-rw-r--r--var/spack/repos/flags.test/packages/w/package.py18
-rw-r--r--var/spack/repos/flags.test/packages/x/package.py16
-rw-r--r--var/spack/repos/flags.test/packages/y/package.py12
-rw-r--r--var/spack/repos/flags.test/repo.yaml2
-rw-r--r--var/spack/repos/requirements.test/packages/t/package.py14
-rw-r--r--var/spack/repos/requirements.test/packages/u/package.py12
-rw-r--r--var/spack/repos/requirements.test/packages/v/package.py12
-rw-r--r--var/spack/repos/requirements.test/packages/x/package.py16
-rw-r--r--var/spack/repos/requirements.test/packages/y/package.py15
-rw-r--r--var/spack/repos/requirements.test/repo.yaml2
-rw-r--r--var/spack/repos/tutorial/packages/mpich/package.py14
6841 files changed, 156119 insertions, 69670 deletions
diff --git a/.codecov.yml b/.codecov.yml
index fead3ad004..0a5b8d6c8f 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -5,7 +5,7 @@ coverage:
status:
project:
default:
- threshold: 0.2%
+ threshold: 2.0%
ignore:
- lib/spack/spack/test/.*
diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh
new file mode 100755
index 0000000000..e319719a37
--- /dev/null
+++ b/.devcontainer/postCreateCommand.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Load spack environment at terminal startup
+cat <<EOF >> /root/.bashrc
+. /workspaces/spack/share/spack/setup-env.sh
+EOF
+
+# Load spack environment in this script
+. /workspaces/spack/share/spack/setup-env.sh
+
+# Ensure generic targets for maximum matching with buildcaches
+spack config --scope site add "packages:all:require:[target=x86_64_v3]"
+spack config --scope site add "concretizer:targets:granularity:generic"
+
+# Find compiler and install gcc-runtime
+spack compiler find --scope site
+
+# Setup buildcaches
+spack mirror add --scope site develop https://binaries.spack.io/develop
+spack buildcache keys --install --trust
diff --git a/.devcontainer/ubuntu20.04/devcontainer.json b/.devcontainer/ubuntu20.04/devcontainer.json
new file mode 100644
index 0000000000..325e6e57fd
--- /dev/null
+++ b/.devcontainer/ubuntu20.04/devcontainer.json
@@ -0,0 +1,5 @@
+{
+ "name": "Ubuntu 20.04",
+ "image": "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01",
+ "postCreateCommand": "./.devcontainer/postCreateCommand.sh"
+}
diff --git a/.devcontainer/ubuntu22.04/devcontainer.json b/.devcontainer/ubuntu22.04/devcontainer.json
new file mode 100644
index 0000000000..c4b5d24302
--- /dev/null
+++ b/.devcontainer/ubuntu22.04/devcontainer.json
@@ -0,0 +1,5 @@
+{
+ "name": "Ubuntu 22.04",
+ "image": "ghcr.io/spack/ubuntu-22.04:v2024-05-07",
+ "postCreateCommand": "./.devcontainer/postCreateCommand.sh"
+}
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index a5b42ffcf7..136f798711 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,13 +5,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
- # Requirements to build documentation
+ # Requirements to run style checks and build documentation
- package-ecosystem: "pip"
- directory: "/lib/spack/docs"
- schedule:
- interval: "daily"
- # Requirements to run style checks
- - package-ecosystem: "pip"
- directory: "/.github/workflows/style"
+ directories:
+ - "/.github/workflows/requirements/style/*"
+ - "/lib/spack/docs"
schedule:
interval: "daily"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000000..c5dedabdcd
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,6 @@
+<!--
+Remember that `spackbot` can help with your PR in multiple ways:
+- `@spackbot help` shows all the commands that are currently available
+- `@spackbot fix style` tries to push a commit to fix style issues in this PR
+- `@spackbot re-run pipeline` runs the pipelines again, if you have write access to the repository
+-->
diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml
index 2120d82b73..5476039357 100644
--- a/.github/workflows/audit.yaml
+++ b/.github/workflows/audit.yaml
@@ -17,33 +17,58 @@ concurrency:
jobs:
# Run audits on all the packages in the built-in repository
package-audits:
- runs-on: ${{ matrix.operating_system }}
+ runs-on: ${{ matrix.system.os }}
strategy:
matrix:
- operating_system: ["ubuntu-latest", "macos-latest"]
+ system:
+ - { os: windows-latest, shell: 'powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}' }
+ - { os: ubuntu-latest, shell: bash }
+ - { os: macos-latest, shell: bash }
+ defaults:
+ run:
+ shell: ${{ matrix.system.shell }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{inputs.python_version}}
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pytest coverage[toml]
+ - name: Setup for Windows run
+ if: runner.os == 'Windows'
+ run: |
+ python -m pip install --upgrade pywin32
- name: Package audits (with coverage)
- if: ${{ inputs.with_coverage == 'true' }}
+ env:
+ COVERAGE_FILE: coverage/.coverage-audits-${{ matrix.system.os }}
+ if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
run: |
. share/spack/setup-env.sh
coverage run $(which spack) audit packages
- coverage run $(which spack) audit externals
+ coverage run $(which spack) audit configs
+ coverage run $(which spack) -d audit externals
coverage combine
- coverage xml
- name: Package audits (without coverage)
- if: ${{ inputs.with_coverage == 'false' }}
+ if: ${{ inputs.with_coverage == 'false' && runner.os != 'Windows' }}
+ run: |
+ . share/spack/setup-env.sh
+ spack -d audit packages
+ spack -d audit configs
+ spack -d audit externals
+ - name: Package audits (without coverage)
+ if: ${{ runner.os == 'Windows' }}
run: |
. share/spack/setup-env.sh
- $(which spack) audit packages
- $(which spack) audit externals
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
- if: ${{ inputs.with_coverage == 'true' }}
+ spack -d audit packages
+ ./share/spack/qa/validate_last_exit.ps1
+ spack -d audit configs
+ ./share/spack/qa/validate_last_exit.ps1
+ spack -d audit externals
+ ./share/spack/qa/validate_last_exit.ps1
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
with:
- flags: unittests,audits
+ name: coverage-audits-${{ matrix.system.os }}
+ path: coverage
+ include-hidden-files: true
diff --git a/.github/workflows/bootstrap-test.sh b/.github/workflows/bin/bootstrap-test.sh
index b51db3d1b7..0d774c248c 100755
--- a/.github/workflows/bootstrap-test.sh
+++ b/.github/workflows/bin/bootstrap-test.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-set -ex
+set -e
source share/spack/setup-env.sh
+$PYTHON bin/spack bootstrap disable github-actions-v0.5
$PYTHON bin/spack bootstrap disable spack-install
-$PYTHON bin/spack -d solve zlib
+$PYTHON bin/spack $SPACK_FLAGS solve zlib
tree $BOOTSTRAP/store
exit 0
diff --git a/.github/workflows/execute_installer.ps1 b/.github/workflows/bin/execute_installer.ps1
index 9d9f5cfbeb..9d9f5cfbeb 100644
--- a/.github/workflows/execute_installer.ps1
+++ b/.github/workflows/bin/execute_installer.ps1
diff --git a/.github/workflows/generate_spack_yaml_containerize.sh b/.github/workflows/bin/generate_spack_yaml_containerize.sh
index 2a180b7dd1..2a180b7dd1 100755
--- a/.github/workflows/generate_spack_yaml_containerize.sh
+++ b/.github/workflows/bin/generate_spack_yaml_containerize.sh
diff --git a/.github/workflows/setup_git.ps1 b/.github/workflows/bin/setup_git.ps1
index 836b7f8a2c..836b7f8a2c 100644
--- a/.github/workflows/setup_git.ps1
+++ b/.github/workflows/bin/setup_git.ps1
diff --git a/.github/workflows/setup_git.sh b/.github/workflows/bin/setup_git.sh
index 4eb416720b..4eb416720b 100755
--- a/.github/workflows/setup_git.sh
+++ b/.github/workflows/bin/setup_git.sh
diff --git a/.github/workflows/system_shortcut_check.ps1 b/.github/workflows/bin/system_shortcut_check.ps1
index 03b3a236f1..03b3a236f1 100644
--- a/.github/workflows/system_shortcut_check.ps1
+++ b/.github/workflows/bin/system_shortcut_check.ps1
diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 21c1b2f0ba..90b31a098a 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -13,221 +13,141 @@ concurrency:
cancel-in-progress: true
jobs:
- fedora-clingo-sources:
+ distros-clingo-sources:
runs-on: ubuntu-latest
- container: "fedora:latest"
+ container: ${{ matrix.image }}
+ strategy:
+ matrix:
+ image: ["fedora:latest", "opensuse/leap:latest"]
steps:
- - name: Install dependencies
+ - name: Setup Fedora
+ if: ${{ matrix.image == 'fedora:latest' }}
run: |
dnf install -y \
- bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
+ bzip2 curl file gcc-c++ gcc gcc-gfortran git gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison bison-devel libstdc++-static
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- - name: Bootstrap clingo
- shell: runuser -u spack-test -- bash {0}
- run: |
- source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find cmake bison
- spack -d solve zlib
- tree ~/.spack/bootstrap/store/
-
- ubuntu-clingo-sources:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
- steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
+ - name: Setup OpenSUSE
+ if: ${{ matrix.image == 'opensuse/leap:latest' }}
run: |
- apt-get update -y && apt-get upgrade -y
- apt-get install -y \
- bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
- make patch unzip xz-utils python3 python3-dev tree \
+ # Harden CI by applying the workaround described here: https://www.suse.com/support/kb/doc/?id=000019505
+ zypper update -y || zypper update -y
+ zypper install -y \
+ bzip2 curl file gcc-c++ gcc gcc-fortran tar git gpg2 gzip \
+ make patch unzip which xz python3 python3-devel tree \
cmake bison
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- name: Bootstrap clingo
- shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
spack external find cmake bison
spack -d solve zlib
tree ~/.spack/bootstrap/store/
- ubuntu-clingo-binaries-and-patchelf:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
+ clingo-sources:
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ runner: ['macos-13', 'macos-14', "ubuntu-latest"]
steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
run: |
- apt-get update -y && apt-get upgrade -y
- apt-get install -y \
- bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
- make patch unzip xz-utils python3 python3-dev tree
+ brew install cmake bison tree
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- - name: Bootstrap clingo
- shell: runuser -u spack-test -- bash {0}
- run: |
- source share/spack/setup-env.sh
- spack -d solve zlib
- tree ~/.spack/bootstrap/store/
-
- opensuse-clingo-sources:
- runs-on: ubuntu-latest
- container: "opensuse/leap:latest"
- steps:
- - name: Install dependencies
- run: |
- # Harden CI by applying the workaround described here: https://www.suse.com/support/kb/doc/?id=000019505
- zypper update -y || zypper update -y
- zypper install -y \
- bzip2 curl file gcc-c++ gcc gcc-fortran tar git gpg2 gzip \
- make patch unzip which xz python3 python3-devel tree \
- cmake bison
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
- fetch-depth: 0
- - name: Setup repo
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- git --version
- . .github/workflows/setup_git.sh
+ python-version: "3.12"
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find cmake bison
+ spack external find --not-buildable cmake bison
spack -d solve zlib
- tree ~/.spack/bootstrap/store/
+ tree $HOME/.spack/bootstrap/store/
- macos-clingo-sources:
- runs-on: macos-latest
+ gnupg-sources:
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ runner: [ 'macos-13', 'macos-14', "ubuntu-latest" ]
steps:
- - name: Install dependencies
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
+ run: brew install tree gawk
+ - name: Remove system executables
run: |
- brew install cmake bison@2.7 tree
+ while [ -n "$(command -v gpg gpg2 patchelf)" ]; do
+ sudo rm $(command -v gpg gpg2 patchelf)
+ done
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
- python-version: "3.12"
- - name: Bootstrap clingo
+ fetch-depth: 0
+ - name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
- export PATH=/usr/local/opt/bison@2.7/bin:$PATH
+ spack solve zlib
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack external find --not-buildable cmake bison
- spack -d solve zlib
+ spack -d gpg list
tree ~/.spack/bootstrap/store/
- macos-clingo-binaries:
- runs-on: ${{ matrix.macos-version }}
+ from-binaries:
+ runs-on: ${{ matrix.runner }}
strategy:
matrix:
- macos-version: ['macos-11', 'macos-12']
+ runner: ['macos-13', 'macos-14', "ubuntu-latest"]
steps:
- - name: Install dependencies
- run: |
- brew install tree
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: Bootstrap clingo
+ - name: Setup macOS
+ if: ${{ matrix.runner != 'ubuntu-latest' }}
+ run: brew install tree
+ - name: Remove system executables
run: |
- set -ex
- for ver in '3.7' '3.8' '3.9' '3.10' '3.11' ; do
- not_found=1
- ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
- echo "Testing $ver_dir"
- if [[ -d "$ver_dir" ]] ; then
- if $ver_dir/python --version ; then
- export PYTHON="$ver_dir/python"
- not_found=0
- old_path="$PATH"
- export PATH="$ver_dir:$PATH"
- ./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
- export PATH="$old_path"
- fi
- fi
- # NOTE: test all pythons that exist, not all do on 12
+ while [ -n "$(command -v gpg gpg2 patchelf)" ]; do
+ sudo rm $(command -v gpg gpg2 patchelf)
done
-
- ubuntu-clingo-binaries:
- runs-on: ubuntu-20.04
- steps:
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup repo
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: |
+ 3.8
+ 3.9
+ 3.10
+ 3.11
+ 3.12
+ 3.13
+ - name: Set bootstrap sources
run: |
- git --version
- . .github/workflows/setup_git.sh
+ source share/spack/setup-env.sh
+ spack bootstrap disable github-actions-v0.5
+ spack bootstrap disable spack-install
- name: Bootstrap clingo
run: |
- set -ex
- for ver in '3.7' '3.8' '3.9' '3.10' '3.11' ; do
+ set -e
+ for ver in '3.8' '3.9' '3.10' '3.11' '3.12' '3.13'; do
not_found=1
ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
- echo "Testing $ver_dir"
if [[ -d "$ver_dir" ]] ; then
+ echo "Testing $ver_dir"
if $ver_dir/python --version ; then
export PYTHON="$ver_dir/python"
not_found=0
old_path="$PATH"
export PATH="$ver_dir:$PATH"
- ./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
+ ./bin/spack-tmpconfig -b ./.github/workflows/bin/bootstrap-test.sh
export PATH="$old_path"
fi
fi
@@ -236,122 +156,49 @@ jobs:
exit 1
fi
done
-
- ubuntu-gnupg-binaries:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
- steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
- run: |
- apt-get update -y && apt-get upgrade -y
- apt-get install -y \
- bzip2 curl file g++ gcc patchelf gfortran git gzip \
- make patch unzip xz-utils python3 python3-dev tree
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
- run: |
- git --version
- . .github/workflows/setup_git.sh
- name: Bootstrap GnuPG
- shell: runuser -u spack-test -- bash {0}
run: |
source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.4
- spack bootstrap disable spack-install
spack -d gpg list
- tree ~/.spack/bootstrap/store/
+ tree $HOME/.spack/bootstrap/store/
+ - name: Bootstrap File
+ run: |
+ source share/spack/setup-env.sh
+ spack -d python share/spack/qa/bootstrap-file.py
+ tree $HOME/.spack/bootstrap/store/
- ubuntu-gnupg-sources:
- runs-on: ubuntu-latest
- container: "ubuntu:latest"
+ windows:
+ runs-on: "windows-latest"
steps:
- - name: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
- run: |
- apt-get update -y && apt-get upgrade -y
- apt-get install -y \
- bzip2 curl file g++ gcc patchelf gfortran git gzip \
- make patch unzip xz-utils python3 python3-dev tree \
- gawk
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - name: Setup non-root user
- run: |
- # See [1] below
- git config --global --add safe.directory /__w/spack/spack
- useradd spack-test && mkdir -p ~spack-test
- chown -R spack-test . ~spack-test
- - name: Setup repo
- shell: runuser -u spack-test -- bash {0}
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: "3.12"
+ - name: Setup Windows
run: |
- git --version
- . .github/workflows/setup_git.sh
- - name: Bootstrap GnuPG
- shell: runuser -u spack-test -- bash {0}
+ Remove-Item -Path (Get-Command gpg).Path
+ Remove-Item -Path (Get-Command file).Path
+ - name: Bootstrap clingo
run: |
- source share/spack/setup-env.sh
- spack solve zlib
+ ./share/spack/setup-env.ps1
+ spack bootstrap disable github-actions-v0.6
spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
- spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
- macos-gnupg-binaries:
- runs-on: macos-latest
- steps:
- - name: Install dependencies
- run: |
- brew install tree
- # Remove GnuPG since we want to bootstrap it
- sudo rm -rf /usr/local/bin/gpg
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: Bootstrap GnuPG
- run: |
- source share/spack/setup-env.sh
- spack bootstrap disable github-actions-v0.4
- spack bootstrap disable spack-install
- spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
- macos-gnupg-sources:
- runs-on: macos-latest
- steps:
- - name: Install dependencies
- run: |
- brew install gawk tree
- # Remove GnuPG since we want to bootstrap it
- sudo rm -rf /usr/local/bin/gpg
- - name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ spack external find --not-buildable cmake bison
+ spack -d solve zlib
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
- name: Bootstrap GnuPG
run: |
- source share/spack/setup-env.sh
- spack solve zlib
- spack bootstrap disable github-actions-v0.5
- spack bootstrap disable github-actions-v0.4
+ ./share/spack/setup-env.ps1
spack -d gpg list
- tree ~/.spack/bootstrap/store/
-
-
-# [1] Distros that have patched git to resolve CVE-2022-24765 (e.g. Ubuntu patching v2.25.1)
-# introduce breaking behaviorso we have to set `safe.directory` in gitconfig ourselves.
-# See:
-# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
-# - https://github.com/actions/checkout/issues/760
-# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
+ - name: Bootstrap File
+ run: |
+ ./share/spack/setup-env.ps1
+ spack -d python share/spack/qa/bootstrap-file.py
+ ./share/spack/qa/validate_last_exit.ps1
+ tree $env:userprofile/.spack/bootstrap/store/
diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml
index e5543a0ae1..178de5ac36 100644
--- a/.github/workflows/build-containers.yml
+++ b/.github/workflows/build-containers.yml
@@ -40,24 +40,30 @@ jobs:
# 1: Platforms to build for
# 2: Base image (e.g. ubuntu:22.04)
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
- [centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'],
- [centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'],
+ [centos-stream9, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream9'],
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
+ [ubuntu-noble, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:24.04'],
[almalinux8, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:8'],
[almalinux9, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:9'],
[rockylinux8, 'linux/amd64,linux/arm64', 'rockylinux:8'],
[rockylinux9, 'linux/amd64,linux/arm64', 'rockylinux:9'],
- [fedora37, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:37'],
- [fedora38, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:38']]
+ [fedora39, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:39'],
+ [fedora40, 'linux/amd64,linux/arm64,linux/ppc64le', 'fedora:40']]
name: Build ${{ matrix.dockerfile[0] }}
if: github.repository == 'spack/spack'
steps:
- name: Checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e
+ - name: Determine latest release tag
+ id: latest
+ run: |
+ git fetch --quiet --tags
+ echo "tag=$(git tag --list --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | tee -a $GITHUB_OUTPUT
+
+ - uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
id: docker_meta
with:
images: |
@@ -71,12 +77,13 @@ jobs:
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
+ type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.latest.outputs.tag) }}
- name: Generate the Dockerfile
env:
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
run: |
- .github/workflows/generate_spack_yaml_containerize.sh
+ .github/workflows/bin/generate_spack_yaml_containerize.sh
. share/spack/setup-env.sh
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
@@ -87,19 +94,19 @@ jobs:
fi
- name: Upload Dockerfile
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
+ uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- name: dockerfiles
+ name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
- name: Set up QEMU
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
+ uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
+ uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
- name: Log in to GitHub Container Registry
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -107,18 +114,27 @@ jobs:
- name: Log in to DockerHub
if: github.event_name != 'pull_request'
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
+ uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
+ uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}
push: ${{ github.event_name != 'pull_request' }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
+
+ merge-dockerfiles:
+ runs-on: ubuntu-latest
+ needs: deploy-images
+ steps:
+ - name: Merge Artifacts
+ uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ with:
+ name: dockerfiles
+ pattern: dockerfiles_*
+ delete-merged: true
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 047109ca76..a7ceb1bd8e 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -15,17 +15,6 @@ concurrency:
cancel-in-progress: true
jobs:
- prechecks:
- needs: [ changes ]
- uses: ./.github/workflows/valid-style.yml
- with:
- with_coverage: ${{ needs.changes.outputs.core }}
- all-prechecks:
- needs: [ prechecks ]
- runs-on: ubuntu-latest
- steps:
- - name: Success
- run: "true"
# Check which files have been updated by the PR
changes:
runs-on: ubuntu-latest
@@ -35,12 +24,12 @@ jobs:
core: ${{ steps.filter.outputs.core }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
# For pull requests it's not necessary to checkout the code
- - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
+ - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
@@ -52,6 +41,13 @@ jobs:
- 'var/spack/repos/builtin/packages/clingo/**'
- 'var/spack/repos/builtin/packages/python/**'
- 'var/spack/repos/builtin/packages/re2c/**'
+ - 'var/spack/repos/builtin/packages/gnupg/**'
+ - 'var/spack/repos/builtin/packages/libassuan/**'
+ - 'var/spack/repos/builtin/packages/libgcrypt/**'
+ - 'var/spack/repos/builtin/packages/libgpg-error/**'
+ - 'var/spack/repos/builtin/packages/libksba/**'
+ - 'var/spack/repos/builtin/packages/npth/**'
+ - 'var/spack/repos/builtin/packages/pinentry/**'
- 'lib/spack/**'
- 'share/spack/**'
- '.github/workflows/bootstrap.yml'
@@ -70,17 +66,54 @@ jobs:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.bootstrap == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/bootstrap.yml
+ secrets: inherit
+
unit-tests:
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
needs: [ prechecks, changes ]
uses: ./.github/workflows/unit_tests.yaml
- windows:
- if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
+ secrets: inherit
+
+ prechecks:
+ needs: [ changes ]
+ uses: ./.github/workflows/valid-style.yml
+ secrets: inherit
+ with:
+ with_coverage: ${{ needs.changes.outputs.core }}
+
+ all-prechecks:
needs: [ prechecks ]
- uses: ./.github/workflows/windows_python.yml
- all:
- needs: [ windows, unit-tests, bootstrap ]
+ if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Success
- run: "true"
+ run: |
+ if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
+ echo "Unit tests failed."
+ exit 1
+ else
+ exit 0
+ fi
+
+ coverage:
+ needs: [ unit-tests, prechecks ]
+ uses: ./.github/workflows/coverage.yml
+ secrets: inherit
+
+ all:
+ needs: [ unit-tests, coverage, bootstrap ]
+ if: ${{ always() }}
+ runs-on: ubuntu-latest
+ # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#needs-context
+ steps:
+ - name: Status summary
+ run: |
+ if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
+ echo "Unit tests failed."
+ exit 1
+ elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
+ echo "Bootstrap tests failed."
+ exit 1
+ else
+ exit 0
+ fi
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 0000000000..be4302bfbc
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,35 @@
+name: coverage
+
+on:
+ workflow_call:
+
+jobs:
+ # Upload coverage reports to codecov once as a single bundle
+ upload:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: '3.11'
+ cache: 'pip'
+
+ - name: Install python dependencies
+ run: pip install -r .github/workflows/requirements/coverage/requirements.txt
+
+ - name: Download coverage artifact files
+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
+ with:
+ pattern: coverage-*
+ path: coverage
+ merge-multiple: true
+
+ - run: ls -la coverage
+ - run: coverage combine -a coverage/.coverage*
+ - run: coverage xml
+
+ - name: "Upload coverage report to CodeCov"
+ uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
+ with:
+ verbose: true
+ fail_ci_if_error: true
diff --git a/.github/workflows/install_spack.sh b/.github/workflows/install_spack.sh
deleted file mode 100755
index be8ec8af21..0000000000
--- a/.github/workflows/install_spack.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env sh
-. share/spack/setup-env.sh
-echo -e "config:\n build_jobs: 2" > etc/spack/config.yaml
-spack config add "packages:all:target:[x86_64]"
-spack compiler find
-spack compiler info apple-clang
-spack debug report
-spack solve zlib
diff --git a/.github/workflows/nightly-win-builds.yml b/.github/workflows/nightly-win-builds.yml
index e93e80e3e4..11f19c9244 100644
--- a/.github/workflows/nightly-win-builds.yml
+++ b/.github/workflows/nightly-win-builds.yml
@@ -14,10 +14,10 @@ jobs:
build-paraview-deps:
runs-on: windows-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: 3.9
- name: Install Python packages
diff --git a/.github/workflows/requirements/coverage/requirements.txt b/.github/workflows/requirements/coverage/requirements.txt
new file mode 100644
index 0000000000..1bf0f9a76b
--- /dev/null
+++ b/.github/workflows/requirements/coverage/requirements.txt
@@ -0,0 +1 @@
+coverage==7.6.1
diff --git a/.github/workflows/requirements/style/requirements.txt b/.github/workflows/requirements/style/requirements.txt
new file mode 100644
index 0000000000..93ab7eaa7f
--- /dev/null
+++ b/.github/workflows/requirements/style/requirements.txt
@@ -0,0 +1,7 @@
+black==24.10.0
+clingo==5.7.1
+flake8==7.1.1
+isort==5.13.2
+mypy==1.8.0
+types-six==1.16.21.20241105
+vermin==1.6.0
diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt
deleted file mode 100644
index eabbd46467..0000000000
--- a/.github/workflows/style/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-black==23.12.1
-clingo==5.6.2
-flake8==6.1.0
-isort==5.13.2
-mypy==1.8.0
-types-six==1.16.21.9
-vermin==1.6.0
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index b05a935c6a..72184b7fbf 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -16,45 +16,34 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
- concretizer: ['clingo']
on_develop:
- ${{ github.ref == 'refs/heads/develop' }}
include:
- - python-version: '3.11'
- os: ubuntu-latest
- concretizer: original
- on_develop: ${{ github.ref == 'refs/heads/develop' }}
- python-version: '3.6'
os: ubuntu-20.04
- concretizer: clingo
on_develop: ${{ github.ref == 'refs/heads/develop' }}
exclude:
- python-version: '3.7'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.8'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.9'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.10'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
- python-version: '3.11'
os: ubuntu-latest
- concretizer: 'clingo'
on_develop: false
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -72,7 +61,7 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Bootstrap clingo
if: ${{ matrix.concretizer == 'clingo' }}
env:
@@ -85,23 +74,25 @@ jobs:
- name: Run unit tests
env:
SPACK_PYTHON: python
- SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
SPACK_TEST_PARALLEL: 2
COVERAGE: true
+ COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
run: |
share/spack/qa/run-unit-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,linux,${{ matrix.concretizer }}
+ name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
+ path: coverage
+ include-hidden-files: true
# Test shell integration
shell:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
- name: Install System packages
@@ -116,15 +107,17 @@ jobs:
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Run shell tests
env:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: shelltests,linux
+ name: coverage-shell
+ path: coverage
+ include-hidden-files: true
# Test RHEL8 UBI with platform Python. This job is run
# only on PRs modifying core Spack
@@ -137,13 +130,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Run unit tests
@@ -156,45 +149,49 @@ jobs:
clingo-cffi:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
- python-version: '3.11'
+ python-version: '3.13'
- name: Install System packages
run: |
sudo apt-get -y update
- sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
+ sudo apt-get -y install coreutils gfortran graphviz gnupg2
- name: Install Python packages
run: |
- pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
+ pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
- - name: Setup git configuration
- run: |
- # Need this for the git tests to succeed.
- git --version
- . .github/workflows/setup_git.sh
- name: Run unit tests (full suite with coverage)
env:
COVERAGE: true
- SPACK_TEST_SOLVER: clingo
+ COVERAGE_FILE: coverage/.coverage-clingo-cffi
run: |
- share/spack/qa/run-unit-tests
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
+ . share/spack/setup-env.sh
+ spack bootstrap disable spack-install
+ spack bootstrap disable github-actions-v0.5
+ spack bootstrap disable github-actions-v0.6
+ spack bootstrap status
+ spack solve zlib
+ spack unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml lib/spack/spack/test/concretization/core.py
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,linux,clingo
+ name: coverage-clingo-cffi
+ path: coverage
+ include-hidden-files: true
# Run unit tests on MacOS
macos:
- runs-on: macos-latest
+ runs-on: ${{ matrix.os }}
strategy:
matrix:
+ os: [macos-13, macos-14]
python-version: ["3.11"]
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # @v2
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -203,19 +200,52 @@ jobs:
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
- name: Setup Homebrew packages
run: |
- brew install dash fish gcc gnupg2 kcov
+ brew install dash fish gcc gnupg kcov
- name: Run unit tests
env:
- SPACK_TEST_SOLVER: clingo
SPACK_TEST_PARALLEL: 4
+ COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
run: |
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
. share/spack/setup-env.sh
$(which spack) bootstrap disable spack-install
$(which spack) solve zlib
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
+ with:
+ name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
+ path: coverage
+ include-hidden-files: true
+ # Run unit tests on Windows
+ windows:
+ defaults:
+ run:
+ shell:
+ powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
+ with:
+ python-version: 3.9
+ - name: Install Python packages
+ run: |
+ python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
+ - name: Create local develop
+ run: |
+ ./.github/workflows/bin/setup_git.ps1
+ - name: Unit Test
+ env:
+ COVERAGE_FILE: coverage/.coverage-windows
+ run: |
+ spack unit-test -x --verbose --cov --cov-config=pyproject.toml
+ ./share/spack/qa/validate_last_exit.ps1
+ - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
- flags: unittests,macos
+ name: coverage-windows
+ path: coverage
+ include-hidden-files: true
diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml
index d75a70344d..ad96ff2cc5 100644
--- a/.github/workflows/valid-style.yml
+++ b/.github/workflows/valid-style.yml
@@ -18,15 +18,15 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python Packages
run: |
pip install --upgrade pip setuptools
- pip install -r .github/workflows/style/requirements.txt
+ pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin (Spack's Core)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
@@ -35,27 +35,28 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
+ - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.11'
cache: 'pip'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools
- pip install -r .github/workflows/style/requirements.txt
+ pip install -r .github/workflows/requirements/style/requirements.txt
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
git --version
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
- name: Run style tests
run: |
share/spack/qa/run-style-tests
audit:
uses: ./.github/workflows/audit.yaml
+ secrets: inherit
with:
with_coverage: ${{ inputs.with_coverage }}
python_version: '3.11'
@@ -69,13 +70,13 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup repo and non-root user
run: |
git --version
git config --global --add safe.directory /__w/spack/spack
git fetch --unshallow
- . .github/workflows/setup_git.sh
+ . .github/workflows/bin/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Bootstrap Spack development environment
@@ -84,5 +85,64 @@ jobs:
source share/spack/setup-env.sh
spack debug report
spack -d bootstrap now --dev
- spack style -t black
+ spack -d style -t black
spack unit-test -V
+ import-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: julia-actions/setup-julia@v2
+ with:
+ version: '1.10'
+ - uses: julia-actions/cache@v2
+
+ # PR: use the base of the PR as the old commit
+ - name: Checkout PR base commit
+ if: github.event_name == 'pull_request'
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ ref: ${{ github.event.pull_request.base.sha }}
+ path: old
+ # not a PR: use the previous commit as the old commit
+ - name: Checkout previous commit
+ if: github.event_name != 'pull_request'
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ fetch-depth: 2
+ path: old
+ - name: Checkout previous commit
+ if: github.event_name != 'pull_request'
+ run: git -C old reset --hard HEAD^
+
+ - name: Checkout new commit
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ path: new
+ - name: Install circular import checker
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+ with:
+ repository: haampie/circular-import-fighter
+ ref: 9f60f51bc7134e0be73f27623f1b0357d1718427
+ path: circular-import-fighter
+ - name: Install dependencies
+ working-directory: circular-import-fighter
+ run: make -j dependencies
+ - name: Import cycles before
+ working-directory: circular-import-fighter
+ run: make SPACK_ROOT=../old && cp solution solution.old
+ - name: Import cycles after
+ working-directory: circular-import-fighter
+ run: make clean-graph && make SPACK_ROOT=../new && cp solution solution.new
+ - name: Compare import cycles
+ working-directory: circular-import-fighter
+ run: |
+ edges_before="$(grep -oP 'edges to delete: \K\d+' solution.old)"
+ edges_after="$(grep -oP 'edges to delete: \K\d+' solution.new)"
+ if [ "$edges_after" -gt "$edges_before" ]; then
+ printf '\033[1;31mImport check failed: %s imports need to be deleted, ' "$edges_after"
+ printf 'previously this was %s\033[0m\n' "$edges_before"
+ printf 'Compare \033[1;97m"Import cycles before"\033[0m and '
+ printf '\033[1;97m"Import cycles after"\033[0m to see problematic imports.\n'
+ exit 1
+ else
+ printf '\033[1;32mImport check passed: %s <= %s\033[0m\n' "$edges_after" "$edges_before"
+ fi
diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml
deleted file mode 100644
index b1e4f72f2c..0000000000
--- a/.github/workflows/windows_python.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-name: windows
-
-on:
- workflow_call:
-
-concurrency:
- group: windows-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
- cancel-in-progress: true
-
-defaults:
- run:
- shell:
- powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
-jobs:
- unit-tests:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
- - name: Create local develop
- run: |
- ./.github/workflows/setup_git.ps1
- - name: Unit Test
- run: |
- spack unit-test -x --verbose --cov --cov-config=pyproject.toml --ignore=lib/spack/spack/test/cmd
- ./share/spack/qa/validate_last_exit.ps1
- coverage combine -a
- coverage xml
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- with:
- flags: unittests,windows
- unit-tests-cmd:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools coverage pytest-cov clingo
- - name: Create local develop
- run: |
- ./.github/workflows/setup_git.ps1
- - name: Command Unit Test
- run: |
- spack unit-test -x --verbose --cov --cov-config=pyproject.toml lib/spack/spack/test/cmd
- ./share/spack/qa/validate_last_exit.ps1
- coverage combine -a
- coverage xml
- - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- with:
- flags: unittests,windows
- build-abseil:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- with:
- fetch-depth: 0
- - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
- with:
- python-version: 3.9
- - name: Install Python packages
- run: |
- python -m pip install --upgrade pip pywin32 setuptools coverage
- - name: Build Test
- run: |
- spack compiler find
- spack -d external find cmake ninja
- spack -d install abseil-cpp
diff --git a/.readthedocs.yml b/.readthedocs.yml
index ff47753613..012a6e6e0a 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -14,3 +14,26 @@ sphinx:
python:
install:
- requirements: lib/spack/docs/requirements.txt
+
+search:
+ ranking:
+ spack.html: -10
+ spack.*.html: -10
+ llnl.html: -10
+ llnl.*.html: -10
+ _modules/*: -10
+ command_index.html: -9
+ basic_usage.html: 5
+ configuration.html: 5
+ config_yaml.html: 5
+ packages_yaml.html: 5
+ build_settings.html: 5
+ environments.html: 5
+ containers.html: 5
+ mirrors.html: 5
+ module_file_support.html: 5
+ repositories.html: 5
+ binary_caches.html: 5
+ chain.html: 5
+ pipelines.html: 5
+ packaging_guide.html: 5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ec04198b2..1d17e49d59 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,440 @@
+# v0.22.2 (2024-09-21)
+
+## Bugfixes
+- Forward compatibility with Spack 0.23 packages with language dependencies (#45205, #45191)
+- Forward compatibility with `urllib` from Python 3.12.6+ (#46453, #46483)
+- Bump vendored `archspec` for better aarch64 support (#45721, #46445)
+- Support macOS Sequoia (#45018, #45127)
+- Fix regression in `{variants.X}` and `{variants.X.value}` format strings (#46206)
+- Ensure shell escaping of environment variable values in load and activate commands (#42780)
+- Fix an issue where `spec[pkg]` considers specs outside the current DAG (#45090)
+- Do not halt concretization on unknown variants in externals (#45326)
+- Improve validation of `develop` config section (#46485)
+- Explicitly disable `ccache` if turned off in config, to avoid cache pollution (#45275)
+- Improve backwards compatibility in `include_concrete` (#45766)
+- Fix issue where package tags were sometimes repeated (#45160)
+- Make `setup-env.sh` "sourced only" by dropping execution bits (#45641)
+- Make certain source/binary fetch errors recoverable instead of a hard error (#45683)
+- Remove debug statements in package hash computation (#45235)
+- Remove redundant clingo warnings (#45269)
+- Remove hard-coded layout version (#45645)
+- Do not initialize previous store state in `use_store` (#45268)
+- Docs improvements (#46475)
+
+## Package updates
+- `chapel` major update (#42197, #44931, #45304)
+
+# v0.22.1 (2024-07-04)
+
+## Bugfixes
+- Fix reuse of externals on Linux (#44316)
+- Ensure parent gcc-runtime version >= child (#44834, #44870)
+- Ensure the latest gcc-runtime is rpath'ed when multiple exist among link deps (#44219)
+- Improve version detection of glibc (#44154)
+- Improve heuristics for solver (#44893, #44976, #45023)
+- Make strong preferences override reuse (#44373)
+- Reduce verbosity when C compiler is missing (#44182)
+- Make missing ccache executable an error when required (#44740)
+- Make every environment view containing `python` a `venv` (#44382)
+- Fix external detection for compilers with os but no target (#44156)
+- Fix version optimization for roots (#44272)
+- Handle common implementations of pagination of tags in OCI build caches (#43136)
+- Apply fetched patches to develop specs (#44950)
+- Avoid Windows wrappers for filesystem utilities on non-Windows (#44126)
+- Fix issue with long filenames in build caches on Windows (#43851)
+- Fix formatting issue in `spack audit` (#45045)
+- CI fixes (#44582, #43965, #43967, #44279, #44213)
+
+## Package updates
+- protobuf: fix 3.4:3.21 patch checksum (#44443)
+- protobuf: update hash for patch needed when="@3.4:3.21" (#44210)
+- git: bump v2.39 to 2.45; deprecate unsafe versions (#44248)
+- gcc: use -rpath {rpath_dir} not -rpath={rpath dir} (#44315)
+- Remove mesa18 and libosmesa (#44264)
+- Enforce consistency of `gl` providers (#44307)
+- Require libiconv for iconv (#44335, #45026).
+ Notice that glibc/musl also provide iconv, but are not guaranteed to be
+ complete. Set `packages:iconv:require:[glibc]` to restore the old behavior.
+- py-matplotlib: qualify when to do a post install (#44191)
+- rust: fix v1.78.0 instructions (#44127)
+- suite-sparse: improve setting of the `libs` property (#44214)
+- netlib-lapack: provide blas and lapack together (#44981)
+
+# v0.22.0 (2024-05-12)
+
+`v0.22.0` is a major feature release.
+
+## Features in this release
+
+1. **Compiler dependencies**
+
+ We are in the process of making compilers proper dependencies in Spack, and a number
+ of changes in `v0.22` support that effort. You may notice nodes in your dependency
+ graphs for compiler runtime libraries like `gcc-runtime` or `libgfortran`, and you
+ may notice that Spack graphs now include `libc`. We've also begun moving compiler
+ configuration from `compilers.yaml` to `packages.yaml` to make it consistent with
+ other externals. We are trying to do this with the least disruption possible, so
+ your existing `compilers.yaml` files should still work. We expect to be done with
+ this transition by the `v0.23` release in November.
+
+ * #41104: Packages compiled with `%gcc` on Linux, macOS and FreeBSD now depend on a
+ new package `gcc-runtime`, which contains a copy of the shared compiler runtime
+ libraries. This enables gcc runtime libraries to be installed and relocated when
+ using a build cache. When building minimal Spack-generated container images it is
+ no longer necessary to install libgfortran, libgomp etc. using the system package
+ manager.
+
+ * #42062: Packages compiled with `%oneapi` now depend on a new package
+ `intel-oneapi-runtime`. This is similar to `gcc-runtime`, and the runtimes can
+ provide virtuals and compilers can inject dependencies on virtuals into compiled
+ packages. This allows us to model library soname compatibility and allows
+ compilers like `%oneapi` to provide virtuals like `sycl` (which can also be
+ provided by standalone libraries). Note that until we have an agreement in place
+ with intel, Intel packages are marked `redistribute(source=False, binary=False)`
+ and must be downloaded outside of Spack.
+
+ * #43272: changes to the optimization criteria of the solver improve the hit-rate of
+ buildcaches by a fair amount. The solver more relaxed compatibility rules and will
+ not try to strictly match compilers or targets of reused specs. Users can still
+ enforce the previous strict behavior with `require:` sections in `packages.yaml`.
+ Note that to enforce correct linking, Spack will *not* reuse old `%gcc` and
+ `%oneapi` specs that do not have the runtime libraries as a dependency.
+
+ * #43539: Spack will reuse specs built with compilers that are *not* explicitly
+ configured in `compilers.yaml`. Because we can now keep runtime libraries in build
+ cache, we do not require you to also have a local configured compiler to *use* the
+ runtime libraries. This improves reuse in buildcaches and avoids conflicts with OS
+ updates that happen underneath Spack.
+
+ * #43190: binary compatibility on `linux` is now based on the `libc` version,
+ instead of on the `os` tag. Spack builds now detect the host `libc` (`glibc` or
+ `musl`) and add it as an implicit external node in the dependency graph. Binaries
+ with a `libc` with the same name and a version less than or equal to that of the
+ detected `libc` can be reused. This is only on `linux`, not `macos` or `Windows`.
+
+ * #43464: each package that can provide a compiler is now detectable using `spack
+ external find`. External packages defining compiler paths are effectively used as
+ compilers, and `spack external find -t compiler` can be used as a substitute for
+ `spack compiler find`. More details on this transition are in
+ [the docs](https://spack.readthedocs.io/en/latest/getting_started.html#manual-compiler-configuration)
+
+2. **Improved `spack find` UI for Environments**
+
+ If you're working in an enviroment, you likely care about:
+
+ * What are the roots
+ * Which ones are installed / not installed
+ * What's been added that still needs to be concretized
+
+ We've tweaked `spack find` in environments to show this information much more
+ clearly. Installation status is shown next to each root, so you can see what is
+ installed. Roots are also shown in bold in the list of installed packages. There is
+ also a new option for `spack find -r` / `--only-roots` that will only show env
+ roots, if you don't want to look at all the installed specs.
+
+ More details in #42334.
+
+3. **Improved command-line string quoting**
+
+ We are making some breaking changes to how Spack parses specs on the CLI in order to
+ respect shell quoting instead of trying to fight it. If you (sadly) had to write
+ something like this on the command line:
+
+ ```
+ spack install zlib cflags=\"-O2 -g\"
+ ```
+
+ That will now result in an error, but you can now write what you probably expected
+ to work in the first place:
+
+ ```
+ spack install zlib cflags="-O2 -g"
+ ```
+
+ Quoted can also now include special characters, so you can supply flags like:
+
+ ```
+ spack intall zlib ldflags='-Wl,-rpath=$ORIGIN/_libs'
+ ```
+
+ To reduce ambiguity in parsing, we now require that you *not* put spaces around `=`
+ and `==` when for flags or variants. This would not have broken before but will now
+ result in an error:
+
+ ```
+ spack install zlib cflags = "-O2 -g"
+ ```
+
+ More details and discussion in #30634.
+
+4. **Revert default `spack install` behavior to `--reuse`**
+
+ We changed the default concretizer behavior from `--reuse` to `--reuse-deps` in
+ #30990 (in `v0.20`), which meant that *every* `spack install` invocation would
+ attempt to build a new version of the requested package / any environment roots.
+ While this is a common ask for *upgrading* and for *developer* workflows, we don't
+ think it should be the default for a package manager.
+
+ We are going to try to stick to this policy:
+ 1. Prioritize reuse and build as little as possible by default.
+ 2. Only upgrade or install duplicates if they are explicitly asked for, or if there
+ is a known security issue that necessitates an upgrade.
+
+ With the install command you now have three options:
+
+ * `--reuse` (default): reuse as many existing installations as possible.
+ * `--reuse-deps` / `--fresh-roots`: upgrade (freshen) roots but reuse dependencies if possible.
+ * `--fresh`: install fresh versions of requested packages (roots) and their dependencies.
+
+ We've also introduced `--fresh-roots` as an alias for `--reuse-deps` to make it more clear
+ that it may give you fresh versions. More details in #41302 and #43988.
+
+5. **More control over reused specs**
+
+ You can now control which packages to reuse and how. There is a new
+ `concretizer:reuse` config option, which accepts the following properties:
+
+ - `roots`: `true` to reuse roots, `false` to reuse just dependencies
+ - `exclude`: list of constraints used to select which specs *not* to reuse
+ - `include`: list of constraints used to select which specs *to* reuse
+ - `from`: list of sources for reused specs (some combination of `local`,
+ `buildcache`, or `external`)
+
+ For example, to reuse only specs compiled with GCC, you could write:
+
+ ```yaml
+ concretizer:
+ reuse:
+ roots: true
+ include:
+ - "%gcc"
+ ```
+
+ Or, if `openmpi` must be used from externals, and it must be the only external used:
+
+ ```yaml
+ concretizer:
+ reuse:
+ roots: true
+ from:
+ - type: local
+ exclude: ["openmpi"]
+ - type: buildcache
+ exclude: ["openmpi"]
+ - type: external
+ include: ["openmpi"]
+ ```
+
+6. **New `redistribute()` directive**
+
+ Some packages can't be redistributed in source or binary form. We need an explicit
+ way to say that in a package.
+
+ Now there is a `redistribute()` directive so that package authors can write:
+
+ ```python
+ class MyPackage(Package):
+ redistribute(source=False, binary=False)
+ ```
+
+ Like other directives, this works with `when=`:
+
+ ```python
+ class MyPackage(Package):
+ # 12.0 and higher are proprietary
+ redistribute(source=False, binary=False, when="@12.0:")
+
+ # can't redistribute when we depend on some proprietary dependency
+ redistribute(source=False, binary=False, when="^proprietary-dependency")
+ ```
+
+ More in #20185.
+
+7. **New `conflict:` and `prefer:` syntax for package preferences**
+
+ Previously, you could express conflicts and preferences in `packages.yaml` through
+ some contortions with `require:`:
+
+ ```yaml
+ packages:
+ zlib-ng:
+ require:
+ - one_of: ["%clang", "@:"] # conflict on %clang
+ - any_of: ["+shared", "@:"] # strong preference for +shared
+ ```
+
+ You can now use `require:` and `prefer:` for a much more readable configuration:
+
+ ```yaml
+ packages:
+ zlib-ng:
+ conflict:
+ - "%clang"
+ prefer:
+ - "+shared"
+ ```
+
+ See [the documentation](https://spack.readthedocs.io/en/latest/packages_yaml.html#conflicts-and-strong-preferences)
+ and #41832 for more details.
+
+8. **`include_concrete` in environments**
+
+ You may want to build on the *concrete* contents of another environment without
+ changing that environment. You can now include the concrete specs from another
+ environment's `spack.lock` with `include_concrete`:
+
+ ```yaml
+ spack:
+ specs: []
+ concretizer:
+ unify: true
+ include_concrete:
+ - /path/to/environment1
+ - /path/to/environment2
+ ```
+
+ Now, when *this* environment is concretized, it will bring in the already concrete
+ specs from `environment1` and `environment2`, and build on top of them without
+ changing them. This is useful if you have phased deployments, where old deployments
+ should not be modified but you want to use as many of them as possible. More details
+ in #33768.
+
+9. **`python-venv` isolation**
+
+ Spack has unique requirements for Python because it:
+ 1. installs every package in its own independent directory, and
+ 2. allows users to register *external* python installations.
+
+ External installations may contain their own installed packages that can interfere
+ with Spack installations, and some distributions (Debian and Ubuntu) even change the
+ `sysconfig` in ways that alter the installation layout of installed Python packages
+ (e.g., with the addition of a `/local` prefix on Debian or Ubuntu). To isolate Spack
+ from these and other issues, we now insert a small `python-venv` package in between
+ `python` and packages that need to install Python code. This isolates Spack's build
+ environment, isolates Spack from any issues with an external python, and resolves a
+ large number of issues we've had with Python installations.
+
+ See #40773 for further details.
+
+## New commands, options, and directives
+
+* Allow packages to be pushed to build cache after install from source (#42423)
+* `spack develop`: stage build artifacts in same root as non-dev builds #41373
+ * Don't delete `spack develop` build artifacts after install (#43424)
+* `spack find`: add options for local/upstream only (#42999)
+* `spack logs`: print log files for packages (either partially built or installed) (#42202)
+* `patch`: support reversing patches (#43040)
+* `develop`: Add -b/--build-directory option to set build_directory package attribute (#39606)
+* `spack list`: add `--namesapce` / `--repo` option (#41948)
+* directives: add `checked_by` field to `license()`, add some license checks
+* `spack gc`: add options for environments and build dependencies (#41731)
+* Add `--create` to `spack env activate` (#40896)
+
+## Performance improvements
+
+* environment.py: fix excessive re-reads (#43746)
+* ruamel yaml: fix quadratic complexity bug (#43745)
+* Refactor to improve `spec format` speed (#43712)
+* Do not acquire a write lock on the env post install if no views (#43505)
+* asp.py: fewer calls to `spec.copy()` (#43715)
+* spec.py: early return in `__str__`
+* avoid `jinja2` import at startup unless needed (#43237)
+
+## Other new features of note
+
+* `archspec`: update to `v0.2.4`: support for Windows, bugfixes for `neoverse-v1` and
+ `neoverse-v2` detection.
+* `spack config get`/`blame`: with no args, show entire config
+* `spack env create <env>`: dir if dir-like (#44024)
+* ASP-based solver: update os compatibility for macOS (#43862)
+* Add handling of custom ssl certs in urllib ops (#42953)
+* Add ability to rename environments (#43296)
+* Add config option and compiler support to reuse across OS's (#42693)
+* Support for prereleases (#43140)
+* Only reuse externals when configured (#41707)
+* Environments: Add support for including views (#42250)
+
+## Binary caches
+* Build cache: make signed/unsigned a mirror property (#41507)
+* tools stack
+
+## Removals, deprecations, and syntax changes
+* remove `dpcpp` compiler and package (#43418)
+* spack load: remove --only argument (#42120)
+
+## Notable Bugfixes
+* repo.py: drop deleted packages from provider cache (#43779)
+* Allow `+` in module file names (#41999)
+* `cmd/python`: use runpy to allow multiprocessing in scripts (#41789)
+* Show extension commands with spack -h (#41726)
+* Support environment variable expansion inside module projections (#42917)
+* Alert user to failed concretizations (#42655)
+* shell: fix zsh color formatting for PS1 in environments (#39497)
+* spack mirror create --all: include patches (#41579)
+
+## Spack community stats
+
+* 7,994 total packages; 525 since `v0.21.0`
+ * 178 new Python packages, 5 new R packages
+* 358 people contributed to this release
+ * 344 committers to packages
+ * 45 committers to core
+
+# v0.21.3 (2024-10-02)
+
+## Bugfixes
+- Forward compatibility with Spack 0.23 packages with language dependencies (#45205, #45191)
+- Forward compatibility with `urllib` from Python 3.12.6+ (#46453, #46483)
+- Bump `archspec` to 0.2.5-dev for better aarch64 and Windows support (#42854, #44005,
+ #45721, #46445)
+- Support macOS Sequoia (#45018, #45127, #43862)
+- CI and test maintenance (#42909, #42728, #46711, #41943, #43363)
+
+# v0.21.2 (2024-03-01)
+
+## Bugfixes
+
+- Containerize: accommodate nested or pre-existing spack-env paths (#41558)
+- Fix setup-env script, when going back and forth between instances (#40924)
+- Fix using fully-qualified namespaces from root specs (#41957)
+- Fix a bug when a required provider is requested for multiple virtuals (#42088)
+- OCI buildcaches:
+ - only push in parallel when forking (#42143)
+ - use pickleable errors (#42160)
+- Fix using sticky variants in externals (#42253)
+- Fix a rare issue with conditional requirements and multi-valued variants (#42566)
+
+## Package updates
+- rust: add v1.75, rework a few variants (#41161,#41903)
+- py-transformers: add v4.35.2 (#41266)
+- mgard: fix OpenMP on AppleClang (#42933)
+
+# v0.21.1 (2024-01-11)
+
+## New features
+- Add support for reading buildcaches created by Spack v0.22 (#41773)
+
+## Bugfixes
+
+- spack graph: fix coloring with environments (#41240)
+- spack info: sort variants in --variants-by-name (#41389)
+- Spec.format: error on old style format strings (#41934)
+- ASP-based solver:
+ - fix infinite recursion when computing concretization errors (#41061)
+ - don't error for type mismatch on preferences (#41138)
+ - don't emit spurious debug output (#41218)
+- Improve the error message for deprecated preferences (#41075)
+- Fix MSVC preview version breaking clingo build on Windows (#41185)
+- Fix multi-word aliases (#41126)
+- Add a warning for unconfigured compiler (#41213)
+- environment: fix an issue with deconcretization/reconcretization of specs (#41294)
+- buildcache: don't error if a patch is missing, when installing from binaries (#41986)
+- Multiple improvements to unit-tests (#41215,#41369,#41495,#41359,#41361,#41345,#41342,#41308,#41226)
+
+## Package updates
+- root: add a webgui patch to address security issue (#41404)
+- BerkeleyGW: update source urls (#38218)
+
# v0.21.0 (2023-11-11)
`v0.21.0` is a major feature release.
diff --git a/README.md b/README.md
index 0bb54035f5..feff4b3105 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@
Spack is a multi-platform package manager that builds and installs
multiple versions and configurations of software. It works on Linux,
-macOS, and many supercomputers. Spack is non-destructive: installing a
+macOS, Windows, and many supercomputers. Spack is non-destructive: installing a
new version of a package does not break existing installations, so many
configurations of the same package can coexist.
@@ -46,13 +46,18 @@ See the
[Feature Overview](https://spack.readthedocs.io/en/latest/features.html)
for examples and highlights.
-To install spack and your first package, make sure you have Python.
+To install spack and your first package, make sure you have Python & Git.
Then:
- $ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
+ $ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install zlib
+> [!TIP]
+> `-c feature.manyFiles=true` improves git's performance on repositories with 1,000+ files.
+>
+> `--depth=2` prunes the git history to reduce the size of the Spack installation.
+
Documentation
----------------
@@ -65,7 +70,7 @@ Tutorial
----------------
We maintain a
-[**hands-on tutorial**](https://spack.readthedocs.io/en/latest/tutorial.html).
+[**hands-on tutorial**](https://spack-tutorial.readthedocs.io/).
It covers basic to advanced usage, packaging, developer features, and large HPC
deployments. You can do all of the exercises on your own laptop using a
Docker container.
@@ -88,7 +93,7 @@ Resources:
[bridged](https://github.com/matrix-org/matrix-appservice-slack#matrix-appservice-slack) to Slack.
* [**Github Discussions**](https://github.com/spack/spack/discussions):
for Q&A and discussions. Note the pinned discussions for announcements.
-* **Twitter**: [@spackpm](https://twitter.com/spackpm). Be sure to
+* **X**: [@spackpm](https://twitter.com/spackpm). Be sure to
`@mention` us!
* **Mailing list**: [groups.google.com/d/forum/spack](https://groups.google.com/d/forum/spack):
only for announcements. Please use other venues for discussions.
diff --git a/bin/spack-python b/bin/spack-python
index ff555aa93b..b8e76f826b 100755
--- a/bin/spack-python
+++ b/bin/spack-python
@@ -22,4 +22,4 @@
#
# This is compatible across platforms.
#
-exec /usr/bin/env spack python "$@"
+exec spack python "$@"
diff --git a/bin/spack.bat b/bin/spack.bat
index 8328013599..a5a5384e9f 100644
--- a/bin/spack.bat
+++ b/bin/spack.bat
@@ -188,25 +188,27 @@ if NOT "%_sp_args%"=="%_sp_args:--help=%" (
goto :end_switch
:case_load
-:: If args contain --sh, --csh, or -h/--help: just execute.
-if defined _sp_args (
- if NOT "%_sp_args%"=="%_sp_args:--help=%" (
- goto :default_case
- ) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
- goto :default_case
- ) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
- goto :default_case
- )
+if NOT defined _sp_args (
+ exit /B 0
+)
+
+:: If args contain --bat, or -h/--help: just execute.
+if NOT "%_sp_args%"=="%_sp_args:--help=%" (
+ goto :default_case
+) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
+ goto :default_case
+) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
+ goto :default_case
+) else if NOT "%_sp_args%"=="%_sp_args:--list=%" (
+ goto :default_case
)
for /f "tokens=* USEBACKQ" %%I in (
- `python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`) do %%I
+ `python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`
+ ) do %%I
goto :end_switch
-:case_unload
-goto :case_load
-
:default_case
python "%spack%" %_sp_flags% %_sp_subcommand% %_sp_args%
goto :end_switch
diff --git a/bin/spack.ps1 b/bin/spack.ps1
index 5a82b0b620..1ceeb0a250 100644
--- a/bin/spack.ps1
+++ b/bin/spack.ps1
@@ -144,3 +144,5 @@ switch($SpackSubCommand)
"unload" {Invoke-SpackLoad}
default {python "$Env:SPACK_ROOT/bin/spack" $SpackCMD_params $SpackSubCommand $SpackSubCommandArgs}
}
+
+exit $LASTEXITCODE
diff --git a/bin/spack_cmd.bat b/bin/spack_cmd.bat
index 392e42d29b..da7b67e3bc 100644
--- a/bin/spack_cmd.bat
+++ b/bin/spack_cmd.bat
@@ -1,71 +1,11 @@
@ECHO OFF
-setlocal EnableDelayedExpansion
:: (c) 2021 Lawrence Livermore National Laboratory
:: To use this file independently of Spack's installer, execute this script in its directory, or add the
:: associated bin directory to your PATH. Invoke to launch Spack Shell.
::
:: source_dir/spack/bin/spack_cmd.bat
::
-pushd %~dp0..
-set SPACK_ROOT=%CD%
-pushd %CD%\..
-set spackinstdir=%CD%
-popd
-
-:: Check if Python is on the PATH
-if not defined python_pf_ver (
-(for /f "delims=" %%F in ('where python.exe') do (
- set "python_pf_ver=%%F"
- goto :found_python
- ) ) 2> NUL
-)
-:found_python
-if not defined python_pf_ver (
- :: If not, look for Python from the Spack installer
- :get_builtin
- (for /f "tokens=*" %%g in ('dir /b /a:d "!spackinstdir!\Python*"') do (
- set "python_ver=%%g")) 2> NUL
-
- if not defined python_ver (
- echo Python was not found on your system.
- echo Please install Python or add Python to your PATH.
- ) else (
- set "py_path=!spackinstdir!\!python_ver!"
- set "py_exe=!py_path!\python.exe"
- )
- goto :exitpoint
-) else (
- :: Python is already on the path
- set "py_exe=!python_pf_ver!"
- (for /F "tokens=* USEBACKQ" %%F in (
- `"!py_exe!" --version`) do (set "output=%%F")) 2>NUL
- if not "!output:Microsoft Store=!"=="!output!" goto :get_builtin
- goto :exitpoint
-)
-:exitpoint
-
-set "PATH=%SPACK_ROOT%\bin\;%PATH%"
-if defined py_path (
- set "PATH=%py_path%;%PATH%"
-)
-
-if defined py_exe (
- "%py_exe%" "%SPACK_ROOT%\bin\haspywin.py"
-)
-
-set "EDITOR=notepad"
-
-DOSKEY spacktivate=spack env activate $*
-
-@echo **********************************************************************
-@echo ** Spack Package Manager
-@echo **********************************************************************
-
-IF "%1"=="" GOTO CONTINUE
-set
-GOTO:EOF
-
-:continue
-set PROMPT=[spack] %PROMPT%
-%comspec% /k
+call "%~dp0..\share\spack\setup-env.bat"
+pushd %SPACK_ROOT%
+%comspec% /K
diff --git a/etc/spack/defaults/bootstrap.yaml b/etc/spack/defaults/bootstrap.yaml
index 6f2dbe171c..b2e2c0f373 100644
--- a/etc/spack/defaults/bootstrap.yaml
+++ b/etc/spack/defaults/bootstrap.yaml
@@ -9,15 +9,15 @@ bootstrap:
# may not be able to bootstrap all the software that Spack needs,
# depending on its type.
sources:
- - name: 'github-actions-v0.5'
+ - name: github-actions-v0.6
+ metadata: $spack/share/spack/bootstrap/github-actions-v0.6
+ - name: github-actions-v0.5
metadata: $spack/share/spack/bootstrap/github-actions-v0.5
- - name: 'github-actions-v0.4'
- metadata: $spack/share/spack/bootstrap/github-actions-v0.4
- - name: 'spack-install'
+ - name: spack-install
metadata: $spack/share/spack/bootstrap/spack-install
trusted:
# By default we trust bootstrapping from sources and from binaries
# produced on Github via the workflow
+ github-actions-v0.6: true
github-actions-v0.5: true
- github-actions-v0.4: true
spack-install: true
diff --git a/etc/spack/defaults/concretizer.yaml b/etc/spack/defaults/concretizer.yaml
index edefa552ce..eda51c09be 100644
--- a/etc/spack/defaults/concretizer.yaml
+++ b/etc/spack/defaults/concretizer.yaml
@@ -15,7 +15,7 @@ concretizer:
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization. If `dependencies`, we'll only reuse dependencies but
# give you a fresh concretization for your root specs.
- reuse: dependencies
+ reuse: true
# Options that tune which targets are considered for concretization. The
# concretization process is very sensitive to the number targets, and the time
# needed to reach a solution increases noticeably with the number of targets
@@ -39,6 +39,27 @@ concretizer:
# Option to deal with possible duplicate nodes (i.e. different nodes from the same package) in the DAG.
duplicates:
# "none": allows a single node for any package in the DAG.
- # "minimal": allows the duplication of 'build-tools' nodes only (e.g. py-setuptools, cmake etc.)
+ # "minimal": allows the duplication of 'build-tools' nodes only
+ # (e.g. py-setuptools, cmake etc.)
# "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG)
strategy: minimal
+ # Option to specify compatibility between operating systems for reuse of compilers and packages
+ # Specified as a key: [list] where the key is the os that is being targeted, and the list contains the OS's
+ # it can reuse. Note this is a directional compatibility so mutual compatibility between two OS's
+ # requires two entries i.e. os_compatible: {sonoma: [monterey], monterey: [sonoma]}
+ os_compatible: {}
+
+ # Option to specify whether to support splicing. Splicing allows for
+ # the relinking of concrete package dependencies in order to better
+ # reuse already built packages with ABI compatible dependencies
+ splice:
+ explicit: []
+ automatic: false
+ # Maximum time, in seconds, allowed for the 'solve' phase. If set to 0, there is no time limit.
+ timeout: 0
+ # If set to true, exceeding the timeout will always result in a concretization error. If false,
+ # the best (suboptimal) model computed before the timeout is used.
+ #
+ # Setting this to false yields unreproducible results, so we advise to use that value only
+ # for debugging purposes (e.g. check which constraints can help Spack concretize faster).
+ error_on_timeout: true
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index 018e8deb55..b9c4aee64e 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -101,6 +101,12 @@ config:
verify_ssl: true
+ # This is where custom certs for proxy/firewall are stored.
+ # It can be a path or environment variable. To match ssl env configuration
+ # the default is the environment variable SSL_CERT_FILE
+ ssl_certs: $SSL_CERT_FILE
+
+
# Suppress gpg warnings from binary package verification
# Only suppresses warnings, gpg failure will still fail the install
# Potential rationale to set True: users have already explicitly trusted the
@@ -109,12 +115,6 @@ config:
suppress_gpg_warnings: false
- # If set to true, Spack will attempt to build any compiler on the spec
- # that is not already available. If set to False, Spack will only use
- # compilers already configured in compilers.yaml
- install_missing_compilers: false
-
-
# If set to true, Spack will always check checksums after downloading
# archives. If false, Spack skips the checksum step.
checksum: true
@@ -164,23 +164,6 @@ config:
# If set to true, Spack will use ccache to cache C compiles.
ccache: false
-
- # The concretization algorithm to use in Spack. Options are:
- #
- # 'clingo': Uses a logic solver under the hood to solve DAGs with full
- # backtracking and optimization for user preferences. Spack will
- # try to bootstrap the logic solver, if not already available.
- #
- # 'original': Spack's original greedy, fixed-point concretizer. This
- # algorithm can make decisions too early and will not backtrack
- # sufficiently for many specs. This will soon be deprecated in
- # favor of clingo.
- #
- # See `concretizer.yaml` for more settings you can fine-tune when
- # using clingo.
- concretizer: clingo
-
-
# How long to wait to lock the Spack installation database. This lock is used
# when Spack needs to manage its own package metadata and all operations are
# expected to complete within the default time limit. The timeout should
diff --git a/etc/spack/defaults/cray/modules.yaml b/etc/spack/defaults/cray/modules.yaml
deleted file mode 100644
index a80f87b16a..0000000000
--- a/etc/spack/defaults/cray/modules.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-# -------------------------------------------------------------------------
-# This is the default configuration for Spack's module file generation.
-#
-# Settings here are versioned with Spack and are intended to provide
-# sensible defaults out of the box. Spack maintainers should edit this
-# file to keep it current.
-#
-# Users can override these settings by editing the following files.
-#
-# Per-spack-instance settings (overrides defaults):
-# $SPACK_ROOT/etc/spack/modules.yaml
-#
-# Per-user settings (overrides default and site settings):
-# ~/.spack/modules.yaml
-# -------------------------------------------------------------------------
-modules: {}
diff --git a/etc/spack/defaults/darwin/packages.yaml b/etc/spack/defaults/darwin/packages.yaml
index 9fd54f2e6e..6aba11f273 100644
--- a/etc/spack/defaults/darwin/packages.yaml
+++ b/etc/spack/defaults/darwin/packages.yaml
@@ -19,7 +19,6 @@ packages:
- apple-clang
- clang
- gcc
- - intel
providers:
elf: [libelf]
fuse: [macfuse]
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml
index 24d19ac4cb..fe4eff20f8 100644
--- a/etc/spack/defaults/packages.yaml
+++ b/etc/spack/defaults/packages.yaml
@@ -15,15 +15,20 @@
# -------------------------------------------------------------------------
packages:
all:
- compiler: [gcc, intel, pgi, clang, xl, nag, fj, aocc]
+ compiler: [gcc, clang, oneapi, xl, nag, fj, aocc]
providers:
awk: [gawk]
+ armci: [armcimpi]
blas: [openblas, amdblis]
+ c: [gcc]
+ cxx: [gcc]
D: [ldc]
daal: [intel-oneapi-daal]
elf: [elfutils]
fftw-api: [fftw, amdfftw]
flame: [libflame, amdlibflame]
+ fortran: [gcc]
+ fortran-rt: [gcc-runtime, intel-oneapi-runtime]
fuse: [libfuse]
gl: [glx, osmesa]
glu: [mesa-glu, openglu]
@@ -34,9 +39,11 @@ packages:
java: [openjdk, jdk, ibm-java]
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
- libglx: [mesa+glx, mesa18+glx]
+ libc: [glibc, musl]
+ libgfortran: [gcc-runtime]
+ libglx: [mesa+glx]
+ libifcore: [intel-oneapi-runtime]
libllvm: [llvm]
- libosmesa: [mesa+osmesa, mesa18+osmesa]
lua-lang: [lua, lua-luajit-openresty, lua-luajit]
luajit: [lua-luajit-openresty, lua-luajit]
mariadb-client: [mariadb-c-client, mariadb]
@@ -57,6 +64,7 @@ packages:
tbb: [intel-tbb]
unwind: [libunwind]
uuid: [util-linux-uuid, libuuid]
+ wasi-sdk: [wasi-sdk-prebuilt]
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]
@@ -64,3 +72,15 @@ packages:
permissions:
read: world
write: user
+ cray-mpich:
+ buildable: false
+ cray-mvapich2:
+ buildable: false
+ egl:
+ buildable: false
+ fujitsu-mpi:
+ buildable: false
+ hpcx-mpi:
+ buildable: false
+ spectrum-mpi:
+ buildable: false
diff --git a/etc/spack/defaults/windows/config.yaml b/etc/spack/defaults/windows/config.yaml
index 53116391cc..eaa336dca2 100644
--- a/etc/spack/defaults/windows/config.yaml
+++ b/etc/spack/defaults/windows/config.yaml
@@ -1,6 +1,5 @@
config:
locks: false
- concretizer: clingo
build_stage::
- '$spack/.staging'
stage_name: '{name}-{version}-{hash:7}'
diff --git a/lib/spack/docs/_templates/layout.html b/lib/spack/docs/_templates/layout.html
new file mode 100644
index 0000000000..393cb1ebc1
--- /dev/null
+++ b/lib/spack/docs/_templates/layout.html
@@ -0,0 +1,12 @@
+{% extends "!layout.html" %}
+
+{%- block extrahead %}
+ <!-- Google tag (gtag.js) -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-S0PQ7WV75K"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', 'G-S0PQ7WV75K');
+ </script>
+{% endblock %}
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index a866d80fa8..21733a2566 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -865,7 +865,7 @@ There are several different ways to use Spack packages once you have
installed them. As you've seen, spack packages are installed into long
paths with hashes, and you need a way to get them into your path. The
easiest way is to use :ref:`spack load <cmd-spack-load>`, which is
-described in the next section.
+described in this section.
Some more advanced ways to use Spack packages include:
@@ -959,7 +959,86 @@ use ``spack find --loaded``.
You can also use ``spack load --list`` to get the same output, but it
does not have the full set of query options that ``spack find`` offers.
-We'll learn more about Spack's spec syntax in the next section.
+We'll learn more about Spack's spec syntax in :ref:`a later section <sec-specs>`.
+
+
+.. _extensions:
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Python packages and virtual environments
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Spack can install a large number of Python packages. Their names are
+typically prefixed with ``py-``. Installing and using them is no
+different from any other package:
+
+.. code-block:: console
+
+ $ spack install py-numpy
+ $ spack load py-numpy
+ $ python3
+ >>> import numpy
+
+The ``spack load`` command sets the ``PATH`` variable so that the right Python
+executable is used, and makes sure that ``numpy`` and its dependencies can be
+located in the ``PYTHONPATH``.
+
+Spack is different from other Python package managers in that it installs
+every package into its *own* prefix. This is in contrast to ``pip``, which
+installs all packages into the same prefix, be it in a virtual environment
+or not.
+
+For many users, **virtual environments** are more convenient than repeated
+``spack load`` commands, particularly when working with multiple Python
+packages. Fortunately Spack supports environments itself, which together
+with a view are no different from Python virtual environments.
+
+The recommended way of working with Python extensions such as ``py-numpy``
+is through :ref:`Environments <environments>`. The following example creates
+a Spack environment with ``numpy`` in the current working directory. It also
+puts a filesystem view in ``./view``, which is a more traditional combined
+prefix for all packages in the environment.
+
+.. code-block:: console
+
+ $ spack env create --with-view view --dir .
+ $ spack -e . add py-numpy
+ $ spack -e . concretize
+ $ spack -e . install
+
+Now you can activate the environment and start using the packages:
+
+.. code-block:: console
+
+ $ spack env activate .
+ $ python3
+ >>> import numpy
+
+The environment view is also a virtual environment, which is useful if you are
+sharing the environment with others who are unfamiliar with Spack. They can
+either use the Python executable directly:
+
+.. code-block:: console
+
+ $ ./view/bin/python3
+ >>> import numpy
+
+or use the activation script:
+
+.. code-block:: console
+
+ $ source ./view/bin/activate
+ $ python3
+ >>> import numpy
+
+In general, there should not be much difference between ``spack env activate``
+and using the virtual environment. The main advantage of ``spack env activate``
+is that it knows about more packages than just Python packages, and it may set
+additional runtime variables that are not covered by the virtual environment
+activation script.
+
+See :ref:`environments` for a more in-depth description of Spack
+environments and customizations to views.
.. _sec-specs:
@@ -1096,6 +1175,17 @@ unspecified version, but packages can depend on other packages with
could depend on ``mpich@1.2:`` if it can only build with version
``1.2`` or higher of ``mpich``.
+.. note:: Windows Spec Syntax Caveats
+ Windows has a few idiosyncrasies when it comes to the Spack spec syntax and the use of certain shells
+ Spack's spec dependency syntax uses the carat (``^``) character, however this is an escape string in CMD
+ so it must be escaped with an additional carat (i.e. ``^^``).
+ CMD also will attempt to interpret strings with ``=`` characters in them. Any spec including this symbol
+ must double quote the string.
+
+ Note: All of these issues are unique to CMD, they can be avoided by using Powershell.
+
+ For more context on these caveats see the related issues: `carat <https://github.com/spack/spack/issues/42833>`_ and `equals <https://github.com/spack/spack/issues/43348>`_
+
Below are more details about the specifiers that you can add to specs.
.. _version-specifier:
@@ -1119,6 +1209,9 @@ and ``3.4.2``. Similarly, ``@4.2:`` means any version above and including
``4.2``. As a short-hand, ``@3`` is equivalent to the range ``@3:3`` and
includes any version with major version ``3``.
+Versions are ordered lexicograpically by its components. For more details
+on the order, see :ref:`the packaging guide <version-comparison>`.
+
Notice that you can distinguish between the specific version ``@=3.2`` and
the range ``@3.2``. This is useful for packages that follow a versioning
scheme that omits the zero patch version number: ``3.2``, ``3.2.1``,
@@ -1130,6 +1223,10 @@ A version specifier can also be a list of ranges and specific versions,
separated by commas. For example, ``@1.0:1.5,=1.7.1`` matches any version
in the range ``1.0:1.5`` and the specific version ``1.7.1``.
+^^^^^^^^^^^^
+Git versions
+^^^^^^^^^^^^
+
For packages with a ``git`` attribute, ``git`` references
may be specified instead of a numerical version i.e. branches, tags
and commits. Spack will stage and build based off the ``git``
@@ -1262,6 +1359,10 @@ For example, for the ``stackstart`` variant:
mpileaks stackstart==4 # variant will be propagated to dependencies
mpileaks stackstart=4 # only mpileaks will have this variant value
+Spack also allows variants to be propagated from a package that does
+not have that variant.
+
+
^^^^^^^^^^^^^^
Compiler Flags
^^^^^^^^^^^^^^
@@ -1347,22 +1448,12 @@ the reserved keywords ``platform``, ``os`` and ``target``:
$ spack install libelf os=ubuntu18.04
$ spack install libelf target=broadwell
-or together by using the reserved keyword ``arch``:
-
-.. code-block:: console
-
- $ spack install libelf arch=cray-CNL10-haswell
-
Normally users don't have to bother specifying the architecture if they
are installing software for their current host, as in that case the
values will be detected automatically. If you need fine-grained control
over which packages use which targets (or over *all* packages' default
target), see :ref:`package-preferences`.
-.. admonition:: Cray machines
-
- The situation is a little bit different for Cray machines and a detailed
- explanation on how the architecture can be set on them can be found at :ref:`cray-support`
.. _support-for-microarchitectures:
@@ -1698,165 +1789,6 @@ check only local packages (as opposed to those used transparently from
``upstream`` spack instances) and the ``-j,--json`` option to output
machine-readable json data for any errors.
-
-.. _extensions:
-
----------------------------
-Extensions & Python support
----------------------------
-
-Spack's installation model assumes that each package will live in its
-own install prefix. However, certain packages are typically installed
-*within* the directory hierarchy of other packages. For example,
-`Python <https://www.python.org>`_ packages are typically installed in the
-``$prefix/lib/python-2.7/site-packages`` directory.
-
-In Spack, installation prefixes are immutable, so this type of installation
-is not directly supported. However, it is possible to create views that
-allow you to merge install prefixes of multiple packages into a single new prefix.
-Views are a convenient way to get a more traditional filesystem structure.
-Using *extensions*, you can ensure that Python packages always share the
-same prefix in the view as Python itself. Suppose you have
-Python installed like so:
-
-.. code-block:: console
-
- $ spack find python
- ==> 1 installed packages.
- -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
- python@2.7.8
-
-.. _cmd-spack-extensions:
-
-^^^^^^^^^^^^^^^^^^^^
-``spack extensions``
-^^^^^^^^^^^^^^^^^^^^
-
-You can find extensions for your Python installation like this:
-
-.. code-block:: console
-
- $ spack extensions python
- ==> python@2.7.8%gcc@4.4.7 arch=linux-debian7-x86_64-703c7a96
- ==> 36 extensions:
- geos py-ipython py-pexpect py-pyside py-sip
- py-basemap py-libxml2 py-pil py-pytz py-six
- py-biopython py-mako py-pmw py-rpy2 py-sympy
- py-cython py-matplotlib py-pychecker py-scientificpython py-virtualenv
- py-dateutil py-mpi4py py-pygments py-scikit-learn
- py-epydoc py-mx py-pylint py-scipy
- py-gnuplot py-nose py-pyparsing py-setuptools
- py-h5py py-numpy py-pyqt py-shiboken
-
- ==> 12 installed:
- -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
- py-dateutil@2.4.0 py-nose@1.3.4 py-pyside@1.2.2
- py-dateutil@2.4.0 py-numpy@1.9.1 py-pytz@2014.10
- py-ipython@2.3.1 py-pygments@2.0.1 py-setuptools@11.3.1
- py-matplotlib@1.4.2 py-pyparsing@2.0.3 py-six@1.9.0
-
-The extensions are a subset of what's returned by ``spack list``, and
-they are packages like any other. They are installed into their own
-prefixes, and you can see this with ``spack find --paths``:
-
-.. code-block:: console
-
- $ spack find --paths py-numpy
- ==> 1 installed packages.
- -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
- py-numpy@1.9.1 ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/py-numpy@1.9.1-66733244
-
-However, even though this package is installed, you cannot use it
-directly when you run ``python``:
-
-.. code-block:: console
-
- $ spack load python
- $ python
- Python 2.7.8 (default, Feb 17 2015, 01:35:25)
- [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import numpy
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- ImportError: No module named numpy
- >>>
-
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Using Extensions in Environments
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The recommended way of working with extensions such as ``py-numpy``
-above is through :ref:`Environments <environments>`. For example,
-the following creates an environment in the current working directory
-with a filesystem view in the ``./view`` directory:
-
-.. code-block:: console
-
- $ spack env create --with-view view --dir .
- $ spack -e . add py-numpy
- $ spack -e . concretize
- $ spack -e . install
-
-We recommend environments for two reasons. Firstly, environments
-can be activated (requires :ref:`shell-support`):
-
-.. code-block:: console
-
- $ spack env activate .
-
-which sets all the right environment variables such as ``PATH`` and
-``PYTHONPATH``. This ensures that
-
-.. code-block:: console
-
- $ python
- >>> import numpy
-
-works. Secondly, even without shell support, the view ensures
-that Python can locate its extensions:
-
-.. code-block:: console
-
- $ ./view/bin/python
- >>> import numpy
-
-See :ref:`environments` for a more in-depth description of Spack
-environments and customizations to views.
-
-^^^^^^^^^^^^^^^^^^^^
-Using ``spack load``
-^^^^^^^^^^^^^^^^^^^^
-
-A more traditional way of using Spack and extensions is ``spack load``
-(requires :ref:`shell-support`). This will add the extension to ``PYTHONPATH``
-in your current shell, and Python itself will be available in the ``PATH``:
-
-.. code-block:: console
-
- $ spack load py-numpy
- $ python
- >>> import numpy
-
-The loaded packages can be checked using ``spack find --loaded``
-
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Loading Extensions via Modules
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Apart from ``spack env activate`` and ``spack load``, you can load numpy
-through your environment modules (using ``environment-modules`` or
-``lmod``). This will also add the extension to the ``PYTHONPATH`` in
-your current shell.
-
-.. code-block:: console
-
- $ module load <name of numpy module>
-
-If you do not know the name of the specific numpy module you wish to
-load, you can use the ``spack module tcl|lmod loads`` command to get
-the name of the module from the Spack spec.
-
-----------------------
Filesystem requirements
-----------------------
diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst
index 27d72877a7..6d98bc8186 100644
--- a/lib/spack/docs/binary_caches.rst
+++ b/lib/spack/docs/binary_caches.rst
@@ -220,6 +220,40 @@ section of the configuration:
.. _binary_caches_oci:
+---------------------------------
+Automatic push to a build cache
+---------------------------------
+
+Sometimes it is convenient to push packages to a build cache as soon as they are installed. Spack can do this by setting autopush flag when adding a mirror:
+
+.. code-block:: console
+
+ $ spack mirror add --autopush <name> <url or path>
+
+Or the autopush flag can be set for an existing mirror:
+
+.. code-block:: console
+
+ $ spack mirror set --autopush <name> # enable automatic push for an existing mirror
+ $ spack mirror set --no-autopush <name> # disable automatic push for an existing mirror
+
+Then after installing a package it is automatically pushed to all mirrors with ``autopush: true``. The command
+
+.. code-block:: console
+
+ $ spack install <package>
+
+will have the same effect as
+
+.. code-block:: console
+
+ $ spack install <package>
+ $ spack buildcache push <cache> <package> # for all caches with autopush: true
+
+.. note::
+
+ Packages are automatically pushed to a build cache only if they are built from source.
+
-----------------------------------------
OCI / Docker V2 registries as build cache
-----------------------------------------
diff --git a/lib/spack/docs/bootstrapping.rst b/lib/spack/docs/bootstrapping.rst
index 621f888c67..5b09e8d818 100644
--- a/lib/spack/docs/bootstrapping.rst
+++ b/lib/spack/docs/bootstrapping.rst
@@ -87,7 +87,7 @@ You can check what is installed in the bootstrapping store at any time using:
.. code-block:: console
- % spack find -b
+ % spack -b find
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 11 installed packages
-- darwin-catalina-x86_64 / apple-clang@12.0.0 ------------------
@@ -101,7 +101,7 @@ In case it is needed you can remove all the software in the current bootstrappin
% spack clean -b
==> Removing bootstrapped software and configuration in "/Users/spack/.spack/bootstrap"
- % spack find -b
+ % spack -b find
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 0 installed packages
@@ -175,4 +175,4 @@ bootstrapping.
This command needs to be run on a machine with internet access and the resulting folder
has to be moved over to the air-gapped system. Once the local sources are added using the
-commands suggested at the prompt, they can be used to bootstrap Spack. \ No newline at end of file
+commands suggested at the prompt, they can be used to bootstrap Spack.
diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
index f58c9f4c97..bdad8c8a51 100644
--- a/lib/spack/docs/build_settings.rst
+++ b/lib/spack/docs/build_settings.rst
@@ -21,23 +21,86 @@ is the following:
Reuse already installed packages
--------------------------------
-The ``reuse`` attribute controls whether Spack will prefer to use installed packages (``true``), or
-whether it will do a "fresh" installation and prefer the latest settings from
-``package.py`` files and ``packages.yaml`` (``false``).
-You can use:
+The ``reuse`` attribute controls how aggressively Spack reuses binary packages during concretization. The
+attribute can either be a single value, or an object for more complex configurations.
+
+In the former case ("single value") it allows Spack to:
+
+1. Reuse installed packages and buildcaches for all the specs to be concretized, when ``true``
+2. Reuse installed packages and buildcaches only for the dependencies of the root specs, when ``dependencies``
+3. Disregard reusing installed packages and buildcaches, when ``false``
+
+In case a finer control over which specs are reused is needed, then the value of this attribute can be
+an object, with the following keys:
+
+1. ``roots``: if ``true`` root specs are reused, if ``false`` only dependencies of root specs are reused
+2. ``from``: list of sources from which reused specs are taken
+
+Each source in ``from`` is itself an object:
+
+.. list-table:: Attributes for a source or reusable specs
+ :header-rows: 1
+
+ * - Attribute name
+ - Description
+ * - type (mandatory, string)
+ - Can be ``local``, ``buildcache``, or ``external``
+ * - include (optional, list of specs)
+ - If present, reusable specs must match at least one of the constraint in the list
+ * - exclude (optional, list of specs)
+ - If present, reusable specs must not match any of the constraint in the list.
+
+For instance, the following configuration:
+
+.. code-block:: yaml
+
+ concretizer:
+ reuse:
+ roots: true
+ from:
+ - type: local
+ include:
+ - "%gcc"
+ - "%clang"
+
+tells the concretizer to reuse all specs compiled with either ``gcc`` or ``clang``, that are installed
+in the local store. Any spec from remote buildcaches is disregarded.
+
+To reduce the boilerplate in configuration files, default values for the ``include`` and
+``exclude`` options can be pushed up one level:
+
+.. code-block:: yaml
+
+ concretizer:
+ reuse:
+ roots: true
+ include:
+ - "%gcc"
+ from:
+ - type: local
+ - type: buildcache
+ - type: local
+ include:
+ - "foo %oneapi"
+
+In the example above we reuse all specs compiled with ``gcc`` from the local store
+and remote buildcaches, and we also reuse ``foo %oneapi``. Note that the last source of
+specs override the default ``include`` attribute.
+
+For one-off concretizations, the are command line arguments for each of the simple "single value"
+configurations. This means a user can:
.. code-block:: console
% spack install --reuse <spec>
-to enable reuse for a single installation, and you can use:
+to enable reuse for a single installation, or:
.. code-block:: console
spack install --fresh <spec>
to do a fresh install if ``reuse`` is enabled by default.
-``reuse: dependencies`` is the default.
.. seealso::
@@ -103,3 +166,106 @@ while `py-numpy` still needs an older version:
Up to Spack v0.20 ``duplicates:strategy:none`` was the default (and only) behavior. From Spack v0.21 the
default behavior is ``duplicates:strategy:minimal``.
+
+--------
+Splicing
+--------
+
+The ``splice`` key covers config attributes for splicing specs in the solver.
+
+"Splicing" is a method for replacing a dependency with another spec
+that provides the same package or virtual. There are two types of
+splices, referring to different behaviors for shared dependencies
+between the root spec and the new spec replacing a dependency:
+"transitive" and "intransitive". A "transitive" splice is one that
+resolves all conflicts by taking the dependency from the new node. An
+"intransitive" splice is one that resolves all conflicts by taking the
+dependency from the original root. From a theory perspective, hybrid
+splices are possible but are not modeled by Spack.
+
+All spliced specs retain a ``build_spec`` attribute that points to the
+original Spec before any splice occurred. The ``build_spec`` for a
+non-spliced spec is itself.
+
+The figure below shows examples of transitive and intransitive splices:
+
+.. figure:: images/splices.png
+ :align: center
+
+The concretizer can be configured to explicitly splice particular
+replacements for a target spec. Splicing will allow the user to make
+use of generically built public binary caches, while swapping in
+highly optimized local builds for performance critical components
+and/or components that interact closely with the specific hardware
+details of the system. The most prominent candidate for splicing is
+MPI providers. MPI packages have relatively well-understood ABI
+characteristics, and most High Performance Computing facilities deploy
+highly optimized MPI packages tailored to their particular
+hardware. The following config block configures Spack to replace
+whatever MPI provider each spec was concretized to use with the
+particular package of ``mpich`` with the hash that begins ``abcdef``.
+
+.. code-block:: yaml
+
+ concretizer:
+ splice:
+ explicit:
+ - target: mpi
+ replacement: mpich/abcdef
+ transitive: false
+
+.. warning::
+
+ When configuring an explicit splice, you as the user take on the
+ responsibility for ensuring ABI compatibility between the specs
+ matched by the target and the replacement you provide. If they are
+ not compatible, Spack will not warn you and your application will
+ fail to run.
+
+The ``target`` field of an explicit splice can be any abstract
+spec. The ``replacement`` field must be a spec that includes the hash
+of a concrete spec, and the replacement must either be the same
+package as the target, provide the virtual that is the target, or
+provide a virtual that the target provides. The ``transitive`` field
+is optional -- by default, splices will be transitive.
+
+.. note::
+
+ With explicit splices configured, it is possible for Spack to
+ concretize to a spec that does not satisfy the input. For example,
+ with the config above ``hdf5 ^mvapich2`` will concretize to user
+ ``mpich/abcdef`` instead of ``mvapich2`` as the MPI provider. Spack
+ will warn the user in this case, but will not fail the
+ concretization.
+
+.. _automatic_splicing:
+
+^^^^^^^^^^^^^^^^^^
+Automatic Splicing
+^^^^^^^^^^^^^^^^^^
+
+The Spack solver can be configured to do automatic splicing for
+ABI-compatible packages. Automatic splices are enabled in the concretizer
+config section
+
+.. code-block:: yaml
+
+ concretizer:
+ splice:
+ automatic: True
+
+Packages can include ABI-compatibility information using the
+``can_splice`` directive. See :ref:`the packaging
+guide<abi_compatibility>` for instructions on specifying ABI
+compatibility using the ``can_splice`` directive.
+
+.. note::
+
+ The ``can_splice`` directive is experimental and may be changed in
+ future versions.
+
+When automatic splicing is enabled, the concretizer will combine any
+number of ABI-compatible specs if possible to reuse installed packages
+and packages available from binary caches. The end result of these
+specs is equivalent to a series of transitive/intransitive splices,
+but the series may be non-obvious.
diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst
index c0adcda178..392feb3ed4 100644
--- a/lib/spack/docs/build_systems/autotoolspackage.rst
+++ b/lib/spack/docs/build_systems/autotoolspackage.rst
@@ -147,6 +147,15 @@ example, the ``bash`` shell is used to run the ``autogen.sh`` script.
def autoreconf(self, spec, prefix):
which("bash")("autogen.sh")
+If the ``package.py`` has build instructions in a separate
+:ref:`builder class <multiple_build_systems>`, the signature for a phase changes slightly:
+
+.. code-block:: python
+
+ class AutotoolsBuilder(AutotoolsBuilder):
+ def autoreconf(self, pkg, spec, prefix):
+ which("bash")("autogen.sh")
+
"""""""""""""""""""""""""""""""""""""""
patching configure or Makefile.in files
"""""""""""""""""""""""""""""""""""""""
diff --git a/lib/spack/docs/build_systems/cmakepackage.rst b/lib/spack/docs/build_systems/cmakepackage.rst
index 140fa34e3e..ca8d4589c9 100644
--- a/lib/spack/docs/build_systems/cmakepackage.rst
+++ b/lib/spack/docs/build_systems/cmakepackage.rst
@@ -250,7 +250,7 @@ generator is Ninja. To switch to the Ninja generator, simply add:
.. code-block:: python
- generator = "Ninja"
+ generator("ninja")
``CMakePackage`` defaults to "Unix Makefiles". If you switch to the
diff --git a/lib/spack/docs/build_systems/custompackage.rst b/lib/spack/docs/build_systems/custompackage.rst
index 35475fc8ec..cf5862d6a0 100644
--- a/lib/spack/docs/build_systems/custompackage.rst
+++ b/lib/spack/docs/build_systems/custompackage.rst
@@ -130,14 +130,19 @@ before or after a particular phase. For example, in ``perl``, we see:
@run_after("install")
def install_cpanm(self):
- spec = self.spec
-
- if spec.satisfies("+cpanm"):
- with working_dir(join_path("cpanm", "cpanm")):
- perl = spec["perl"].command
- perl("Makefile.PL")
- make()
- make("install")
+ spec = self.spec
+ maker = make
+ cpan_dir = join_path("cpanm", "cpanm")
+ if sys.platform == "win32":
+ maker = nmake
+ cpan_dir = join_path(self.stage.source_path, cpan_dir)
+ cpan_dir = windows_sfn(cpan_dir)
+ if "+cpanm" in spec:
+ with working_dir(cpan_dir):
+ perl = spec["perl"].command
+ perl("Makefile.PL")
+ maker()
+ maker("install")
This extra step automatically installs ``cpanm`` in addition to the
base Perl installation.
@@ -176,8 +181,14 @@ In the ``perl`` package, we can see:
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
- make("test")
+ def build_test(self):
+ if sys.platform == "win32":
+ win32_dir = os.path.join(self.stage.source_path, "win32")
+ win32_dir = windows_sfn(win32_dir)
+ with working_dir(win32_dir):
+ nmake("test", ignore_quotes=True)
+ else:
+ make("test")
As you can guess, this runs ``make test`` *after* building the package,
if and only if testing is requested. Again, this is not specific to
diff --git a/lib/spack/docs/build_systems/inteloneapipackage.rst b/lib/spack/docs/build_systems/inteloneapipackage.rst
index feae03a280..ea1882eaf7 100644
--- a/lib/spack/docs/build_systems/inteloneapipackage.rst
+++ b/lib/spack/docs/build_systems/inteloneapipackage.rst
@@ -25,7 +25,7 @@ use Spack to build packages with the tools.
The Spack Python class ``IntelOneapiPackage`` is a base class that is
used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``,
``IntelOneapiTbb`` and other classes to implement the oneAPI
-packages. Search for ``oneAPI`` at `<packages.spack.io>`_ for the full
+packages. Search for ``oneAPI`` at `packages.spack.io <https://packages.spack.io>`_ for the full
list of available oneAPI packages, or use::
spack list -d oneAPI
diff --git a/lib/spack/docs/build_systems/makefilepackage.rst b/lib/spack/docs/build_systems/makefilepackage.rst
index 2555ac163a..c6d6300ccc 100644
--- a/lib/spack/docs/build_systems/makefilepackage.rst
+++ b/lib/spack/docs/build_systems/makefilepackage.rst
@@ -88,13 +88,13 @@ command-line. However, Makefiles that use ``?=`` for assignment honor
environment variables. Since Spack already sets ``CC``, ``CXX``, ``F77``,
and ``FC``, you won't need to worry about setting these variables. If
there are any other variables you need to set, you can do this in the
-``edit`` method:
+``setup_build_environment`` method:
.. code-block:: python
- def edit(self, spec, prefix):
- env["PREFIX"] = prefix
- env["BLASLIB"] = spec["blas"].libs.ld_flags
+ def setup_build_environment(self, env):
+ env.set("PREFIX", prefix)
+ env.set("BLASLIB", spec["blas"].libs.ld_flags)
`cbench <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/cbench/package.py>`_
@@ -140,7 +140,7 @@ Edit Makefile
Some Makefiles are just plain stubborn and will ignore command-line
variables. The only way to ensure that these packages build correctly
is to directly edit the Makefile. Spack provides a ``FileFilter`` class
-and a ``filter_file`` method to help with this. For example:
+and a ``filter`` method to help with this. For example:
.. code-block:: python
diff --git a/lib/spack/docs/build_systems/perlpackage.rst b/lib/spack/docs/build_systems/perlpackage.rst
index 49fb874525..fcfecf59f4 100644
--- a/lib/spack/docs/build_systems/perlpackage.rst
+++ b/lib/spack/docs/build_systems/perlpackage.rst
@@ -173,6 +173,72 @@ arguments to ``Makefile.PL`` or ``Build.PL`` by overriding
]
+^^^^^^^
+Testing
+^^^^^^^
+
+``PerlPackage`` provides a simple stand-alone test of the successfully
+installed package to confirm that installed perl module(s) can be used.
+These tests can be performed any time after the installation using
+``spack -v test run``. (For more information on the command, see
+:ref:`cmd-spack-test-run`.)
+
+The base class automatically detects perl modules based on the presence
+of ``*.pm`` files under the package's library directory. For example,
+the files under ``perl-bignum``'s perl library are:
+
+.. code-block:: console
+
+ $ find . -name "*.pm"
+ ./bigfloat.pm
+ ./bigrat.pm
+ ./Math/BigFloat/Trace.pm
+ ./Math/BigInt/Trace.pm
+ ./Math/BigRat/Trace.pm
+ ./bigint.pm
+ ./bignum.pm
+
+
+which results in the package having the ``use_modules`` property containing:
+
+.. code-block:: python
+
+ use_modules = [
+ "bigfloat",
+ "bigrat",
+ "Math::BigFloat::Trace",
+ "Math::BigInt::Trace",
+ "Math::BigRat::Trace",
+ "bigint",
+ "bignum",
+ ]
+
+.. note::
+
+ This list can often be used to catch missing dependencies.
+
+If the list is somehow wrong, you can provide the names of the modules
+yourself by overriding ``use_modules`` like so:
+
+ .. code-block:: python
+
+ use_modules = ["bigfloat", "bigrat", "bigint", "bignum"]
+
+If you only want a subset of the automatically detected modules to be
+tested, you could instead define the ``skip_modules`` property on the
+package. So, instead of overriding ``use_modules`` as shown above, you
+could define the following:
+
+ .. code-block:: python
+
+ skip_modules = [
+ "Math::BigFloat::Trace",
+ "Math::BigInt::Trace",
+ "Math::BigRat::Trace",
+ ]
+
+for the same use tests.
+
^^^^^^^^^^^^^^^^^^^^^
Alternatives to Spack
^^^^^^^^^^^^^^^^^^^^^
diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst
index 372d4ad47c..9512b08885 100644
--- a/lib/spack/docs/build_systems/pythonpackage.rst
+++ b/lib/spack/docs/build_systems/pythonpackage.rst
@@ -718,23 +718,45 @@ command-line tool, or C/C++/Fortran program with optional Python
modules? The former should be prepended with ``py-``, while the
latter should not.
-""""""""""""""""""""""
-extends vs. depends_on
-""""""""""""""""""""""
+""""""""""""""""""""""""""""""
+``extends`` vs. ``depends_on``
+""""""""""""""""""""""""""""""
-This is very similar to the naming dilemma above, with a slight twist.
As mentioned in the :ref:`Packaging Guide <packaging_extensions>`,
``extends`` and ``depends_on`` are very similar, but ``extends`` ensures
that the extension and extendee share the same prefix in views.
This allows the user to import a Python module without
having to add that module to ``PYTHONPATH``.
-When deciding between ``extends`` and ``depends_on``, the best rule of
-thumb is to check the installation prefix. If Python libraries are
-installed to ``<prefix>/lib/pythonX.Y/site-packages``, then you
-should use ``extends``. If Python libraries are installed elsewhere
-or the only files that get installed reside in ``<prefix>/bin``, then
-don't use ``extends``.
+Additionally, ``extends("python")`` adds a dependency on the package
+``python-venv``. This improves isolation from the system, whether
+it's during the build or at runtime: user and system site packages
+cannot accidentally be used by any package that ``extends("python")``.
+
+As a rule of thumb: if a package does not install any Python modules
+of its own, and merely puts a Python script in the ``bin`` directory,
+then there is no need for ``extends``. If the package installs modules
+in the ``site-packages`` directory, it requires ``extends``.
+
+"""""""""""""""""""""""""""""""""""""
+Executing ``python`` during the build
+"""""""""""""""""""""""""""""""""""""
+
+Whenever you need to execute a Python command or pass the path of the
+Python interpreter to the build system, it is best to use the global
+variable ``python`` directly. For example:
+
+.. code-block:: python
+
+ @run_before("install")
+ def recythonize(self):
+ python("setup.py", "clean") # use the `python` global
+
+As mentioned in the previous section, ``extends("python")`` adds an
+automatic dependency on ``python-venv``, which is a virtual environment
+that guarantees build isolation. The ``python`` global always refers to
+the correct Python interpreter, whether the package uses ``extends("python")``
+or ``depends_on("python")``.
^^^^^^^^^^^^^^^^^^^^^
Alternatives to Spack
diff --git a/lib/spack/docs/build_systems/sconspackage.rst b/lib/spack/docs/build_systems/sconspackage.rst
index 8200d0998d..5e4b888c1c 100644
--- a/lib/spack/docs/build_systems/sconspackage.rst
+++ b/lib/spack/docs/build_systems/sconspackage.rst
@@ -49,14 +49,14 @@ following phases:
#. ``install`` - install the package
Package developers often add unit tests that can be invoked with
-``scons test`` or ``scons check``. Spack provides a ``test`` method
+``scons test`` or ``scons check``. Spack provides a ``build_test`` method
to handle this. Since we don't know which one the package developer
-chose, the ``test`` method does nothing by default, but can be easily
+chose, the ``build_test`` method does nothing by default, but can be easily
overridden like so:
.. code-block:: python
- def test(self):
+ def build_test(self):
scons("check")
diff --git a/lib/spack/docs/chain.rst b/lib/spack/docs/chain.rst
index e4a275df66..46300e6681 100644
--- a/lib/spack/docs/chain.rst
+++ b/lib/spack/docs/chain.rst
@@ -5,13 +5,14 @@
.. chain:
-============================
-Chaining Spack Installations
-============================
+=============================================
+Chaining Spack Installations (upstreams.yaml)
+=============================================
You can point your Spack installation to another installation to use any
packages that are installed there. To register the other Spack instance,
-you can add it as an entry to ``upstreams.yaml``:
+you can add it as an entry to ``upstreams.yaml`` at any of the
+:ref:`configuration-scopes`:
.. code-block:: yaml
@@ -22,7 +23,8 @@ you can add it as an entry to ``upstreams.yaml``:
install_tree: /path/to/another/spack/opt/spack
``install_tree`` must point to the ``opt/spack`` directory inside of the
-Spack base directory.
+Spack base directory, or the location of the ``install_tree`` defined
+in :ref:`config.yaml <config-yaml>`.
Once the upstream Spack instance has been added, ``spack find`` will
automatically check the upstream instance when querying installed packages,
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index 64a55b3151..c73bf7c196 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -199,22 +199,34 @@ nitpick_ignore = [
("py:class", "contextlib.contextmanager"),
("py:class", "module"),
("py:class", "_io.BufferedReader"),
+ ("py:class", "_io.BytesIO"),
("py:class", "unittest.case.TestCase"),
("py:class", "_frozen_importlib_external.SourceFileLoader"),
("py:class", "clingo.Control"),
("py:class", "six.moves.urllib.parse.ParseResult"),
("py:class", "TextIO"),
("py:class", "hashlib._Hash"),
+ ("py:class", "concurrent.futures._base.Executor"),
# Spack classes that are private and we don't want to expose
("py:class", "spack.provider_index._IndexBase"),
("py:class", "spack.repo._PrependFileLoader"),
- ("py:class", "spack.build_systems._checks.BaseBuilder"),
+ ("py:class", "spack.build_systems._checks.BuilderWithDefaults"),
# Spack classes that intersphinx is unable to resolve
("py:class", "spack.version.StandardVersion"),
("py:class", "spack.spec.DependencySpec"),
+ ("py:class", "spack.spec.ArchSpec"),
("py:class", "spack.spec.InstallStatus"),
("py:class", "spack.spec.SpecfileReaderBase"),
("py:class", "spack.install_test.Pb"),
+ ("py:class", "spack.filesystem_view.SimpleFilesystemView"),
+ ("py:class", "spack.traverse.EdgeAndDepth"),
+ ("py:class", "archspec.cpu.microarchitecture.Microarchitecture"),
+ ("py:class", "spack.compiler.CompilerCache"),
+ ("py:class", "spack.mirrors.mirror.Mirror"),
+ ("py:class", "spack.mirrors.layout.MirrorLayout"),
+ ("py:class", "spack.mirrors.utils.MirrorStats"),
+ # TypeVar that is not handled correctly
+ ("py:class", "llnl.util.lang.T"),
]
# The reST default role (used for this markup: `text`) to use for all documents.
diff --git a/lib/spack/docs/config_yaml.rst b/lib/spack/docs/config_yaml.rst
index 4781597d1a..92ae421571 100644
--- a/lib/spack/docs/config_yaml.rst
+++ b/lib/spack/docs/config_yaml.rst
@@ -146,6 +146,25 @@ tools like ``curl`` will use their ``--insecure`` options. Disabling
this can expose you to attacks. Use at your own risk.
--------------------
+``ssl_certs``
+--------------------
+
+Path to custom certificats for SSL verification. The value can be a
+filesytem path, or an environment variable that expands to an absolute file path.
+The default value is set to the environment variable ``SSL_CERT_FILE``
+to use the same syntax used by many other applications that automatically
+detect custom certificates.
+When ``url_fetch_method:curl`` the ``config:ssl_certs`` should resolve to
+a single file. Spack will then set the environment variable ``CURL_CA_BUNDLE``
+in the subprocess calling ``curl``.
+If ``url_fetch_method:urllib`` then files and directories are supported i.e.
+``config:ssl_certs:$SSL_CERT_FILE`` or ``config:ssl_certs:$SSL_CERT_DIR``
+will work.
+In all cases the expanded path must be absolute for Spack to use the certificates.
+Certificates relative to an environment can be created by prepending the path variable
+with the Spack configuration variable``$env``.
+
+--------------------
``checksum``
--------------------
diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst
index a4b60e43e3..b416c91499 100644
--- a/lib/spack/docs/configuration.rst
+++ b/lib/spack/docs/configuration.rst
@@ -73,9 +73,12 @@ are six configuration scopes. From lowest to highest:
Spack instance per project) or for site-wide settings on a multi-user
machine (e.g., for a common Spack instance).
+#. **plugin**: Read from a Python project's entry points. Settings here affect
+ all instances of Spack running with the same Python installation. This scope takes higher precedence than site, system, and default scopes.
+
#. **user**: Stored in the home directory: ``~/.spack/``. These settings
affect all instances of Spack and take higher precedence than site,
- system, or defaults scopes.
+ system, plugin, or defaults scopes.
#. **custom**: Stored in a custom directory specified by ``--config-scope``.
If multiple scopes are listed on the command line, they are ordered
@@ -196,6 +199,45 @@ with MPICH. You can create different configuration scopes for use with
mpi: [mpich]
+.. _plugin-scopes:
+
+^^^^^^^^^^^^^
+Plugin scopes
+^^^^^^^^^^^^^
+
+.. note::
+ Python version >= 3.8 is required to enable plugin configuration.
+
+Spack can be made aware of configuration scopes that are installed as part of a python package. To do so, register a function that returns the scope's path to the ``"spack.config"`` entry point. Consider the Python package ``my_package`` that includes Spack configurations:
+
+.. code-block:: console
+
+ my-package/
+ ├── src
+ │   ├── my_package
+ │   │   ├── __init__.py
+ │   │   └── spack/
+ │   │   │   └── config.yaml
+ └── pyproject.toml
+
+adding the following to ``my_package``'s ``pyproject.toml`` will make ``my_package``'s ``spack/`` configurations visible to Spack when ``my_package`` is installed:
+
+.. code-block:: toml
+
+ [project.entry_points."spack.config"]
+ my_package = "my_package:get_config_path"
+
+The function ``my_package.get_extension_path`` in ``my_package/__init__.py`` might look like
+
+.. code-block:: python
+
+ import importlib.resources
+
+ def get_config_path():
+ dirname = importlib.resources.files("my_package").joinpath("spack")
+ if dirname.exists():
+ return str(dirname)
+
.. _platform-scopes:
------------------------
@@ -239,7 +281,7 @@ When spack queries for configuration parameters, it searches in
higher-precedence scopes first. So, settings in a higher-precedence file
can override those with the same key in a lower-precedence one. For
list-valued settings, Spack *prepends* higher-precedence settings to
-lower-precedence settings. Completely ignoring higher-level configuration
+lower-precedence settings. Completely ignoring lower-precedence configuration
options is supported with the ``::`` notation for keys (see
:ref:`config-overrides` below).
@@ -469,6 +511,7 @@ Spack understands over a dozen special variables. These are:
* ``$target_family``. The target family for the current host, as
detected by ArchSpec. E.g. ``x86_64`` or ``aarch64``.
* ``$date``: the current date in the format YYYY-MM-DD
+* ``$spack_short_version``: the Spack version truncated to the first components.
Note that, as with shell variables, you can write these as ``$varname``
diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst
index 50d96f6537..38a3847549 100644
--- a/lib/spack/docs/containers.rst
+++ b/lib/spack/docs/containers.rst
@@ -194,21 +194,18 @@ The OS that are currently supported are summarized in the table below:
* - Operating System
- Base Image
- Spack Image
- * - Ubuntu 18.04
- - ``ubuntu:18.04``
- - ``spack/ubuntu-bionic``
* - Ubuntu 20.04
- ``ubuntu:20.04``
- ``spack/ubuntu-focal``
* - Ubuntu 22.04
- ``ubuntu:22.04``
- ``spack/ubuntu-jammy``
- * - CentOS 7
- - ``centos:7``
- - ``spack/centos7``
- * - CentOS Stream
- - ``quay.io/centos/centos:stream``
- - ``spack/centos-stream``
+ * - Ubuntu 24.04
+ - ``ubuntu:24.04``
+ - ``spack/ubuntu-noble``
+ * - CentOS Stream9
+ - ``quay.io/centos/centos:stream9``
+ - ``spack/centos-stream9``
* - openSUSE Leap
- ``opensuse/leap``
- ``spack/leap15``
@@ -227,12 +224,12 @@ The OS that are currently supported are summarized in the table below:
* - Rocky Linux 9
- ``rockylinux:9``
- ``spack/rockylinux9``
- * - Fedora Linux 37
- - ``fedora:37``
- - ``spack/fedora37``
- * - Fedora Linux 38
- - ``fedora:38``
- - ``spack/fedora38``
+ * - Fedora Linux 39
+ - ``fedora:39``
+ - ``spack/fedora39``
+ * - Fedora Linux 40
+ - ``fedora:40``
+ - ``spack/fedora40``
diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst
index 68a381be9f..110bea56da 100644
--- a/lib/spack/docs/contribution_guide.rst
+++ b/lib/spack/docs/contribution_guide.rst
@@ -184,7 +184,7 @@ Style Tests
Spack uses `Flake8 <http://flake8.pycqa.org/en/latest/>`_ to test for
`PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_ conformance and
-`mypy <https://mypy.readthedocs.io/en/stable/>` for type checking. PEP 8 is
+`mypy <https://mypy.readthedocs.io/en/stable/>`_ for type checking. PEP 8 is
a series of style guides for Python that provide suggestions for everything
from variable naming to indentation. In order to limit the number of PRs that
were mostly style changes, we decided to enforce PEP 8 conformance. Your PR
@@ -316,6 +316,215 @@ documentation tests to make sure there are no errors. Documentation changes can
in some obfuscated warning messages. If you don't understand what they mean, feel free
to ask when you submit your PR.
+.. _spack-builders-and-pipelines:
+
+^^^^^^^^^
+GitLab CI
+^^^^^^^^^
+
+""""""""""""""""""
+Build Cache Stacks
+""""""""""""""""""
+
+Spack welcomes the contribution of software stacks of interest to the community. These
+stacks are used to test package recipes and generate publicly available build caches.
+Spack uses GitLab CI for managing the orchestration of build jobs.
+
+GitLab Entry Point
+~~~~~~~~~~~~~~~~~~
+
+Add stack entrypoint to the ``share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml``. There
+are two stages required for each new stack, the generation stage and the build stage.
+
+The generate stage is defined using the job template ``.generate`` configured with
+environment variables defining the name of the stack in ``SPACK_CI_STACK_NAME`` and the
+platform (``SPACK_TARGET_PLATFORM``) and architecture (``SPACK_TARGET_ARCH``) configuration,
+and the tags associated with the class of runners to build on.
+
+.. note::
+
+ The ``SPACK_CI_STACK_NAME`` must match the name of the directory containing the
+ stacks ``spack.yaml``.
+
+
+.. note::
+
+ The platform and architecture variables are specified in order to select the
+ correct configurations from the generic configurations used in Spack CI. The
+ configurations currently available are:
+
+ * ``.cray_rhel_zen4``
+ * ``.cray_sles_zen4``
+ * ``.darwin_aarch64``
+ * ``.darwin_x86_64``
+ * ``.linux_aarch64``
+ * ``.linux_icelake``
+ * ``.linux_neoverse_n1``
+ * ``.linux_neoverse_v1``
+ * ``.linux_neoverse_v2``
+ * ``.linux_power``
+ * ``.linux_skylake``
+ * ``.linux_x86_64``
+ * ``.linux_x86_64_v4``
+
+ New configurations can be added to accommodate new platforms and architectures.
+
+
+The build stage is defined as a trigger job that consumes the GitLab CI pipeline generated in
+the generate stage for this stack. Build stage jobs use the ``.build`` job template which
+handles the basic configuration.
+
+An example entry point for a new stack called ``my-super-cool-stack``
+
+.. code-block:: yaml
+
+ .my-super-cool-stack:
+ extends: [ ".linux_x86_64_v3" ]
+ variables:
+ SPACK_CI_STACK_NAME: my-super-cool-stack
+ tags: [ "all", "tags", "your", "job", "needs"]
+
+ my-super-cool-stack-generate:
+ extends: [ ".generate", ".my-super-cool-stack" ]
+ image: my-super-cool-stack-image:0.0.1
+
+ my-super-cool-stack-build:
+ extends: [ ".build", ".my-super-cool-stack" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: my-super-cool-stack-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: my-super-cool-stack-generate
+
+
+Stack Configuration
+~~~~~~~~~~~~~~~~~~~
+
+The stack configuration is a spack environment file with two additional sections added.
+Stack configurations should be located in ``share/spack/gitlab/cloud_pipelines/stacks/<stack_name>/spack.yaml``.
+
+The ``ci`` section is generally used to define stack specific mappings such as image or tags.
+For more information on what can go into the ``ci`` section refer to the docs on pipelines.
+
+The ``cdash`` section is used for defining where to upload the results of builds. Spack configures
+most of the details for posting pipeline results to
+`cdash.spack.io <https://cdash.spack.io/index.php?project=Spack+Testing>`_. The only
+requirement in the stack configuration is to define a ``build-group`` that is unique,
+this is usually the long name of the stack.
+
+An example stack that builds ``zlib``.
+
+.. code-block:: yaml
+
+ spack:
+ view: false
+ packages:
+ all:
+ require: ["%gcc", "target=x86_64_v3"]
+ specs:
+ - zlib
+
+ ci:
+ pipeline-gen
+ - build-job:
+ image: my-super-cool-stack-image:0.0.1
+
+ cdash:
+ build-group: My Super Cool Stack
+
+.. note::
+
+ The ``image`` used in the ``*-generate`` job must match exactly the ``image`` used in the ``build-job``.
+ When the images do not match the build job may fail.
+
+
+"""""""""""""""""""
+Registering Runners
+"""""""""""""""""""
+
+Contributing computational resources to Spack's CI build farm is one way to help expand the
+capabilities and offerings of the public Spack build caches. Currently, Spack utilizes linux runners
+from AWS, Google, and the University of Oregon (UO).
+
+Runners require three key peices:
+* Runner Registration Token
+* Accurate tags
+* OIDC Authentication script
+* GPG keys
+
+
+Minimum GitLab Runner Version: ``16.1.0``
+`Intallation instructions <https://docs.gitlab.com/runner/install/>`_
+
+Registration Token
+~~~~~~~~~~~~~~~~~~
+
+The first step to contribute new runners is to open an issue in the `spack infrastructure <https://github.com/spack/spack-infrastructure/issues/new?assignees=&labels=runner-registration&projects=&template=runner_registration.yml>`_
+project. This will be reported to the spack infrastructure team who will guide users through the process
+of registering new runners for Spack CI.
+
+The information needed to register a runner is the motivation for the new resources, a semi-detailed description of
+the runner, and finallly the point of contact for maintaining the software on the runner.
+
+The point of contact will then work with the infrastruture team to obtain runner registration token(s) for interacting with
+with Spack's GitLab instance. Once the runner is active, this point of contact will also be responsible for updating the
+GitLab runner software to keep pace with Spack's Gitlab.
+
+Tagging
+~~~~~~~
+
+In the initial stages of runner registration it is important to **exclude** the special tag ``spack``. This will prevent
+the new runner(s) from being picked up for production CI jobs while it is configured and evaluated. Once it is determined
+that the runner is ready for production use the ``spack`` tag will be added.
+
+Because gitlab has no concept of tag exclustion, runners that provide specialized resource also require specialized tags.
+For example, a basic CPU only x86_64 runner may have a tag ``x86_64`` associated with it. However, a runner containing an
+CUDA capable GPU may have the tag ``x86_64-cuda`` to denote that it should only be used for packages that will benefit from
+a CUDA capable resource.
+
+OIDC
+~~~~
+
+Spack runners use OIDC authentication for connecting to the appropriate AWS bucket
+which is used for coordinating the communication of binaries between build jobs. In
+order to configure OIDC authentication, Spack CI runners use a python script with minimal
+dependencies. This script can be configured for runners as seen here using the ``pre_build_script``.
+
+.. code-block:: toml
+
+ [[runners]]
+ pre_build_script = """
+ echo 'Executing Spack pre-build setup script'
+
+ for cmd in "${PY3:-}" python3 python; do
+ if command -v > /dev/null "$cmd"; then
+ export PY3="$(command -v "$cmd")"
+ break
+ fi
+ done
+
+ if [ -z "${PY3:-}" ]; then
+ echo "Unable to find python3 executable"
+ exit 1
+ fi
+
+ $PY3 -c "import urllib.request;urllib.request.urlretrieve('https://raw.githubusercontent.com/spack/spack-infrastructure/main/scripts/gitlab_runner_pre_build/pre_build.py', 'pre_build.py')"
+ $PY3 pre_build.py > envvars
+
+ . ./envvars
+ rm -f envvars
+ unset GITLAB_OIDC_TOKEN
+ """
+
+GPG Keys
+~~~~~~~~
+
+Runners that may be utilized for ``protected`` CI require the registration of an intermediate signing key that
+can be used to sign packages. For more information on package signing read :ref:`key_architecture`.
+
--------
Coverage
--------
diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst
index 440fe01880..21204ba077 100644
--- a/lib/spack/docs/developer_guide.rst
+++ b/lib/spack/docs/developer_guide.rst
@@ -181,10 +181,6 @@ Spec-related modules
:mod:`spack.parser`
Contains :class:`~spack.parser.SpecParser` and functions related to parsing specs.
-:mod:`spack.concretize`
- Contains :class:`~spack.concretize.Concretizer` implementation,
- which allows site administrators to change Spack's :ref:`concretization-policies`.
-
:mod:`spack.version`
Implements a simple :class:`~spack.version.Version` class with simple
comparison semantics. Also implements :class:`~spack.version.VersionRange`
@@ -337,13 +333,9 @@ inserting them at different places in the spack code base. Whenever a hook
type triggers by way of a function call, we find all the hooks of that type,
and run them.
-Spack defines hooks by way of a module at ``lib/spack/spack/hooks`` where we can define
-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
-of hooks, and how to write them.
+Spack defines hooks by way of a module in the ``lib/spack/spack/hooks`` directory.
+This module has to be registered in ``__init__.py`` so that Spack is aware of it.
+This section will cover the basic kind of hooks, and how to write them.
^^^^^^^^^^^^^^
Types of Hooks
@@ -357,91 +349,23 @@ If there is a hook that you would like and is missing, you can propose to add a
``pre_install(spec)``
"""""""""""""""""""""
-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
-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
-a package install.
-
-
-""""""""""""""""""""""
-``post_install(spec)``
-""""""""""""""""""""""
-
-A ``post_install`` hook is run within an install subprocess, directly after
-the install finishes, but before the build stage is removed. If you
-write one of these hooks, you should expect it to accept a spec as the only
-argument. This is run in a multiprocessing subprocess. This ``post_install`` is
-also seen in packages, but in this context not related to the hooks described
-here.
-
-
-""""""""""""""""""""""""""
-``on_install_start(spec)``
-""""""""""""""""""""""""""
-
-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
-write a hook of this type, you should provide the spec to it.
-
-.. code-block:: python
-
- def on_install_start(spec):
- """On start of an install, we want to...
- """
- print('on_install_start')
-
-
-""""""""""""""""""""""""""""
-``on_install_success(spec)``
-""""""""""""""""""""""""""""
+A ``pre_install`` hook is run within the install subprocess, directly before the install starts.
+It expects a single argument of a spec.
-This hook is run on a successful install, and is also run inside the build
-process, akin to ``post_install``. The main difference is that this hook
-is run outside of the context of the stage directory, meaning after the
-build stage has been removed and the user is alerted that the install was
-successful. If you need to write a hook that is run on success of a particular
-phase, you should use ``on_phase_success``.
-""""""""""""""""""""""""""""
-``on_install_failure(spec)``
-""""""""""""""""""""""""""""
+"""""""""""""""""""""""""""""""""""""
+``post_install(spec, explicit=None)``
+"""""""""""""""""""""""""""""""""""""
-This hook is run given an install failure that happens outside of the build
-subprocess, but somewhere in ``installer.py`` when something else goes wrong.
-If you need to write a hook that is relevant to a failure within a build
-process, you would want to instead use ``on_phase_failure``.
+A ``post_install`` hook is run within the install subprocess, directly after the install finishes,
+but before the build stage is removed and the spec is registered in the database. It expects two
+arguments: spec and an optional boolean indicating whether this spec is being installed explicitly.
+""""""""""""""""""""""""""""""""""""""""""""""""""""
+``pre_uninstall(spec)`` and ``post_uninstall(spec)``
+""""""""""""""""""""""""""""""""""""""""""""""""""""
-"""""""""""""""""""""""""""
-``on_install_cancel(spec)``
-"""""""""""""""""""""""""""
-
-The same, but triggered if a spec install is cancelled for any reason.
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""
-``on_phase_success(pkg, phase_name, log_file)``
-"""""""""""""""""""""""""""""""""""""""""""""""
-
-This hook is run within the install subprocess, and specifically when a phase
-successfully finishes. Since we are interested in the package, the name of
-the phase, and any output from it, we require:
-
- - **pkg**: the package variable, which also has the attached spec at ``pkg.spec``
- - **phase_name**: the name of the phase that was successful (e.g., configure)
- - **log_file**: the path to the file with output, in case you need to inspect or otherwise interact with it.
-
-"""""""""""""""""""""""""""""""""""""""""""""
-``on_phase_error(pkg, phase_name, log_file)``
-"""""""""""""""""""""""""""""""""""""""""""""
-
-In the case of an error during a phase, we might want to trigger some event
-with a hook, and this is the purpose of this particular hook. Akin to
-``on_phase_success`` we require the same variables - the package that failed,
-the name of the phase, and the log file where we might find errors.
+These hooks are currently used for cleaning up module files after uninstall.
^^^^^^^^^^^^^^^^^^^^^^
@@ -620,11 +544,11 @@ With either interpreter you can run a single command:
.. code-block:: console
- $ spack python -c 'import distro; distro.linux_distribution()'
- ('Ubuntu', '18.04', 'Bionic Beaver')
+ $ spack python -c 'from spack.spec import Spec; Spec("python").concretized()'
+ ...
- $ spack python -i ipython -c 'import distro; distro.linux_distribution()'
- Out[1]: ('Ubuntu', '18.04', 'Bionic Beaver')
+ $ spack python -i ipython -c 'from spack.spec import Spec; Spec("python").concretized()'
+ Out[1]: ...
or a file:
@@ -784,27 +708,27 @@ Release branches
^^^^^^^^^^^^^^^^
There are currently two types of Spack releases: :ref:`major releases
-<major-releases>` (``0.17.0``, ``0.18.0``, etc.) and :ref:`point releases
-<point-releases>` (``0.17.1``, ``0.17.2``, ``0.17.3``, etc.). Here is a
+<major-releases>` (``0.21.0``, ``0.22.0``, etc.) and :ref:`patch releases
+<patch-releases>` (``0.22.1``, ``0.22.2``, ``0.22.3``, etc.). Here is a
diagram of how Spack release branches work::
- o branch: develop (latest version, v0.19.0.dev0)
+ o branch: develop (latest version, v0.23.0.dev0)
|
o
- | o branch: releases/v0.18, tag: v0.18.1
+ | o branch: releases/v0.22, tag: v0.22.1
o |
- | o tag: v0.18.0
+ | o tag: v0.22.0
o |
| o
|/
o
|
o
- | o branch: releases/v0.17, tag: v0.17.2
+ | o branch: releases/v0.21, tag: v0.21.2
o |
- | o tag: v0.17.1
+ | o tag: v0.21.1
o |
- | o tag: v0.17.0
+ | o tag: v0.21.0
o |
| o
|/
@@ -815,8 +739,8 @@ requests target ``develop``. The ``develop`` branch will report that its
version is that of the next **major** release with a ``.dev0`` suffix.
Each Spack release series also has a corresponding branch, e.g.
-``releases/v0.18`` has ``0.18.x`` versions of Spack, and
-``releases/v0.17`` has ``0.17.x`` versions. A major release is the first
+``releases/v0.22`` has ``v0.22.x`` versions of Spack, and
+``releases/v0.21`` has ``v0.21.x`` versions. A major release is the first
tagged version on a release branch. Minor releases are back-ported from
develop onto release branches. This is typically done by cherry-picking
bugfix commits off of ``develop``.
@@ -846,27 +770,40 @@ for more details.
Scheduling work for releases
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-We schedule work for releases by creating `GitHub projects
-<https://github.com/spack/spack/projects>`_. At any time, there may be
-several open release projects. For example, below are two releases (from
-some past version of the page linked above):
+We schedule work for **major releases** through `milestones
+<https://github.com/spack/spack/milestones>`_ and `GitHub Projects
+<https://github.com/spack/spack/projects>`_, while **patch releases** use `labels
+<https://github.com/spack/spack/labels>`_.
-.. image:: images/projects.png
+There is only one milestone open at a time. Its name corresponds to the next major version, for
+example ``v0.23``. Important issues and pull requests should be assigned to this milestone by
+core developers, so that they are not forgotten at the time of release. The milestone is closed
+when the release is made, and a new milestone is created for the next major release.
-This image shows one release in progress for ``0.15.1`` and another for
-``0.16.0``. Each of these releases has a project board containing issues
-and pull requests. GitHub shows a status bar with completed work in
-green, work in progress in purple, and work not started yet in gray, so
-it's fairly easy to see progress.
+Bug reports in GitHub issues are automatically labelled ``bug`` and ``triage``. Spack developers
+assign one of the labels ``impact-low``, ``impact-medium`` or ``impact-high``. This will make the
+issue appear in the `Triaged bugs <https://github.com/orgs/spack/projects/6>`_ project board.
+Important issues should be assigned to the next milestone as well, so they appear at the top of
+the project board.
-Spack's project boards are not firm commitments so we move work between
-releases frequently. If we need to make a release and some tasks are not
-yet done, we will simply move them to the next minor or major release, rather
-than delaying the release to complete them.
+Spack's milestones are not firm commitments so we move work between releases frequently. If we
+need to make a release and some tasks are not yet done, we will simply move them to the next major
+release milestone, rather than delaying the release to complete them.
-For more on using GitHub project boards, see `GitHub's documentation
-<https://docs.github.com/en/github/managing-your-work-on-github/about-project-boards>`_.
+^^^^^^^^^^^^^^^^^^^^^
+Backporting bug fixes
+^^^^^^^^^^^^^^^^^^^^^
+
+When a bug is fixed in the ``develop`` branch, it is often necessary to backport the fix to one
+(or more) of the ``release/vX.Y`` branches. Only the release manager is responsible for doing
+backports, but Spack maintainers are responsible for labelling pull requests (and issues if no bug
+fix is available yet) with ``vX.Y.Z`` labels. The label should correspond to the next patch version
+that the bug fix should be backported to.
+Backports are done publicly by the release manager using a pull request named ``Backports vX.Y.Z``.
+This pull request is opened from the ``backports/vX.Y.Z`` branch, targets the ``releases/vX.Y``
+branch and contains a (growing) list of cherry-picked commits from the ``develop`` branch.
+Typically there are one or two backport pull requests open at any given time.
.. _major-releases:
@@ -874,25 +811,21 @@ For more on using GitHub project boards, see `GitHub's documentation
Making major releases
^^^^^^^^^^^^^^^^^^^^^
-Assuming a project board has already been created and all required work
-completed, the steps to make the major release are:
+Assuming all required work from the milestone is completed, the steps to make the major release
+are:
-#. Create two new project boards:
+#. `Create a new milestone <https://github.com/spack/spack/milestones>`_ for the next major
+ release.
- * One for the next major release
- * One for the next point release
+#. `Create a new label <https://github.com/spack/spack/labels>`_ for the next patch release.
-#. Move any optional tasks that are not done to one of the new project boards.
-
- In general, small bugfixes should go to the next point release. Major
- features, refactors, and changes that could affect concretization should
- go in the next major release.
+#. Move any optional tasks that are not done to the next milestone.
#. Create a branch for the release, based on ``develop``:
.. code-block:: console
- $ git checkout -b releases/v0.15 develop
+ $ git checkout -b releases/v0.23 develop
For a version ``vX.Y.Z``, the branch's name should be
``releases/vX.Y``. That is, you should create a ``releases/vX.Y``
@@ -928,8 +861,8 @@ completed, the steps to make the major release are:
Create a pull request targeting the ``develop`` branch, bumping the major
version in ``lib/spack/spack/__init__.py`` with a ``dev0`` release segment.
- For instance when you have just released ``v0.15.0``, set the version
- to ``(0, 16, 0, 'dev0')`` on ``develop``.
+ For instance when you have just released ``v0.23.0``, set the version
+ to ``(0, 24, 0, 'dev0')`` on ``develop``.
#. Follow the steps in :ref:`publishing-releases`.
@@ -938,82 +871,52 @@ completed, the steps to make the major release are:
#. Follow the steps in :ref:`announcing-releases`.
-.. _point-releases:
+.. _patch-releases:
^^^^^^^^^^^^^^^^^^^^^
-Making point releases
+Making patch releases
^^^^^^^^^^^^^^^^^^^^^
-Assuming a project board has already been created and all required work
-completed, the steps to make the point release are:
-
-#. Create a new project board for the next point release.
-
-#. Move any optional tasks that are not done to the next project board.
+To make the patch release process both efficient and transparent, we use a *backports pull request*
+which contains cherry-picked commits from the ``develop`` branch. The majority of the work is to
+cherry-pick the bug fixes, which ideally should be done as soon as they land on ``develop``:
+this ensures cherry-picking happens in order, and makes conflicts easier to resolve since the
+changes are fresh in the mind of the developer.
-#. Check out the release branch (it should already exist).
+The backports pull request is always titled ``Backports vX.Y.Z`` and is labelled ``backports``. It
+is opened from a branch named ``backports/vX.Y.Z`` and targets the ``releases/vX.Y`` branch.
- For the ``X.Y.Z`` release, the release branch is called ``releases/vX.Y``.
- For ``v0.15.1``, you would check out ``releases/v0.15``:
+Whenever a pull request labelled ``vX.Y.Z`` is merged, cherry-pick the associated squashed commit
+on ``develop`` to the ``backports/vX.Y.Z`` branch. For pull requests that were rebased (or not
+squashed), cherry-pick each associated commit individually. Never force push to the
+``backports/vX.Y.Z`` branch.
- .. code-block:: console
-
- $ git checkout releases/v0.15
-
-#. If a pull request to the release branch named ``Backports vX.Y.Z`` is not already
- in the project, create it. This pull request ought to be created as early as
- possible when working on a release project, so that we can build the release
- commits incrementally, and identify potential conflicts at an early stage.
-
-#. Cherry-pick each pull request in the ``Done`` column of the release
- project board onto the ``Backports vX.Y.Z`` pull request.
-
- This is **usually** fairly simple since we squash the commits from the
- vast majority of pull requests. That means there is only one commit
- per pull request to cherry-pick. For example, `this pull request
- <https://github.com/spack/spack/pull/15777>`_ has three commits, but
- they were squashed into a single commit on merge. You can see the
- commit that was created here:
-
- .. image:: images/pr-commit.png
-
- You can easily cherry pick it like this (assuming you already have the
- release branch checked out):
-
- .. code-block:: console
-
- $ git cherry-pick 7e46da7
-
- For pull requests that were rebased (or not squashed), you'll need to
- cherry-pick each associated commit individually.
+.. warning::
- .. warning::
+ Sometimes you may **still** get merge conflicts even if you have
+ cherry-picked all the commits in order. This generally means there
+ is some other intervening pull request that the one you're trying
+ to pick depends on. In these cases, you'll need to make a judgment
+ call regarding those pull requests. Consider the number of affected
+ files and/or the resulting differences.
- It is important to cherry-pick commits in the order they happened,
- otherwise you can get conflicts while cherry-picking. When
- cherry-picking look at the merge date,
- **not** the number of the pull request or the date it was opened.
+ 1. If the changes are small, you might just cherry-pick it.
- Sometimes you may **still** get merge conflicts even if you have
- cherry-picked all the commits in order. This generally means there
- is some other intervening pull request that the one you're trying
- to pick depends on. In these cases, you'll need to make a judgment
- call regarding those pull requests. Consider the number of affected
- files and or the resulting differences.
+ 2. If the changes are large, then you may decide that this fix is not
+ worth including in a patch release, in which case you should remove
+ the label from the pull request. Remember that large, manual backports
+ are seldom the right choice for a patch release.
- 1. If the dependency changes are small, you might just cherry-pick it,
- too. If you do this, add the task to the release board.
+When all commits are cherry-picked in the ``backports/vX.Y.Z`` branch, make the patch
+release as follows:
- 2. If the changes are large, then you may decide that this fix is not
- worth including in a point release, in which case you should remove
- the task from the release project.
+#. `Create a new label <https://github.com/spack/spack/labels>`_ ``vX.Y.{Z+1}`` for the next patch
+ release.
- 3. You can always decide to manually back-port the fix to the release
- branch if neither of the above options makes sense, but this can
- require a lot of work. It's seldom the right choice.
+#. Replace the label ``vX.Y.Z`` with ``vX.Y.{Z+1}`` for all PRs and issues that are not done.
-#. When all the commits from the project board are cherry-picked into
- the ``Backports vX.Y.Z`` pull request, you can push a commit to:
+#. Manually push a single commit with commit message ``Set version to vX.Y.Z`` to the
+ ``backports/vX.Y.Z`` branch, that both bumps the Spack version number and updates the changelog:
1. Bump the version in ``lib/spack/spack/__init__.py``.
2. Update ``CHANGELOG.md`` with a list of the changes.
@@ -1022,20 +925,22 @@ completed, the steps to make the point release are:
release branch. See `the changelog from 0.14.1
<https://github.com/spack/spack/commit/ff0abb9838121522321df2a054d18e54b566b44a>`_.
-#. Merge the ``Backports vX.Y.Z`` PR with the **Rebase and merge** strategy. This
- is needed to keep track in the release branch of all the commits that were
- cherry-picked.
-
-#. Make sure CI passes on the release branch, including:
+#. Make sure CI passes on the **backports pull request**, including:
* Regular unit tests
* Build tests
* The E4S pipeline at `gitlab.spack.io <https://gitlab.spack.io>`_
- If CI does not pass, you'll need to figure out why, and make changes
- to the release branch until it does. You can make more commits, modify
- or remove cherry-picked commits, or cherry-pick **more** from
- ``develop`` to make this happen.
+#. Merge the ``Backports vX.Y.Z`` PR with the **Rebase and merge** strategy. This
+ is needed to keep track in the release branch of all the commits that were
+ cherry-picked.
+
+#. Make sure CI passes on the last commit of the **release branch**.
+
+#. In the rare case you need to include additional commits in the patch release after the backports
+ PR is merged, it is best to delete the last commit ``Set version to vX.Y.Z`` from the release
+ branch with a single force push, open a new backports PR named ``Backports vX.Y.Z (2)``, and
+ repeat the process. Avoid repeated force pushes to the release branch.
#. Follow the steps in :ref:`publishing-releases`.
@@ -1110,25 +1015,31 @@ Updating `releases/latest`
If the new release is the **highest** Spack release yet, you should
also tag it as ``releases/latest``. For example, suppose the highest
-release is currently ``0.15.3``:
+release is currently ``0.22.3``:
-* If you are releasing ``0.15.4`` or ``0.16.0``, then you should tag
- it with ``releases/latest``, as these are higher than ``0.15.3``.
+* If you are releasing ``0.22.4`` or ``0.23.0``, then you should tag
+ it with ``releases/latest``, as these are higher than ``0.22.3``.
* If you are making a new release of an **older** major version of
- Spack, e.g. ``0.14.4``, then you should not tag it as
+ Spack, e.g. ``0.21.4``, then you should not tag it as
``releases/latest`` (as there are newer major versions).
-To tag ``releases/latest``, do this:
+To do so, first fetch the latest tag created on GitHub, since you may not have it locally:
+
+.. code-block:: console
+
+ $ git fetch --force git@github.com:spack/spack vX.Y.Z
+
+Then tag ``vX.Y.Z`` as ``releases/latest`` and push the individual tag to GitHub.
.. code-block:: console
- $ git checkout releases/vX.Y # vX.Y is the new release's branch
- $ git tag --force releases/latest
- $ git push --force --tags
+ $ git tag --force releases/latest vX.Y.Z
+ $ git push --force git@github.com:spack/spack releases/latest
-The ``--force`` argument to ``git tag`` makes ``git`` overwrite the existing
-``releases/latest`` tag with the new one.
+The ``--force`` argument to ``git tag`` makes ``git`` overwrite the existing ``releases/latest``
+tag with the new one. Do **not** use the ``--tags`` flag when pushing, since this will push *all*
+local tags.
.. _announcing-releases:
@@ -1139,9 +1050,9 @@ Announcing a release
We announce releases in all of the major Spack communication channels.
Publishing the release takes care of GitHub. The remaining channels are
-Twitter, Slack, and the mailing list. Here are the steps:
+X, Slack, and the mailing list. Here are the steps:
-#. Announce the release on Twitter.
+#. Announce the release on X.
* Compose the tweet on the ``@spackpm`` account per the
``spack-twitter`` slack channel.
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst
index 63fe483876..988dd71ba8 100644
--- a/lib/spack/docs/environments.rst
+++ b/lib/spack/docs/environments.rst
@@ -5,49 +5,56 @@
.. _environments:
-=========================
-Environments (spack.yaml)
-=========================
-
-An environment is used to group together a set of specs for the
-purpose of building, rebuilding and deploying in a coherent fashion.
-Environments provide a number of advantages over the *à la carte*
-approach of building and loading individual Spack modules:
-
-#. Environments separate the steps of (a) choosing what to
- install, (b) concretizing, and (c) installing. This allows
- Environments to remain stable and repeatable, even if Spack packages
- are upgraded: specs are only re-concretized when the user
- explicitly asks for it. It is even possible to reliably
- transport environments between different computers running
- different versions of Spack!
-#. Environments allow several specs to be built at once; a more robust
- solution than ad-hoc scripts making multiple calls to ``spack
- install``.
-#. An Environment that is built as a whole can be loaded as a whole
- into the user environment. An Environment can be built to maintain
- a filesystem view of its packages, and the environment can load
- that view into the user environment at activation time. Spack can
- also generate a script to load all modules related to an
- environment.
+=====================================
+Environments (spack.yaml, spack.lock)
+=====================================
+
+An environment is used to group a set of specs intended for some purpose
+to be built, rebuilt, and deployed in a coherent fashion. Environments
+define aspects of the installation of the software, such as:
+
+#. *which* specs to install;
+#. *how* those specs are configured; and
+#. *where* the concretized software will be installed.
+
+Aggregating this information into an environment for processing has advantages
+over the *à la carte* approach of building and loading individual Spack modules.
+
+With environments, you concretize, install, or load (activate) all of the
+specs with a single command. Concretization fully configures the specs
+and dependencies of the environment in preparation for installing the
+software. This is a more robust solution than ad-hoc installation scripts.
+And you can share an environment or even re-use it on a different computer.
+
+Environment definitions, especially *how* specs are configured, allow the
+software to remain stable and repeatable even when Spack packages are upgraded. Changes are only picked up when the environment is explicitly re-concretized.
+
+Defining *where* specs are installed supports a filesystem view of the
+environment. Yet Spack maintains a single installation of the software that
+can be re-used across multiple environments.
+
+Activating an environment determines *when* all of the associated (and
+installed) specs are loaded so limits the software loaded to those specs
+actually needed by the environment. Spack can even generate a script to
+load all modules related to an environment.
Other packaging systems also provide environments that are similar in
some ways to Spack environments; for example, `Conda environments
<https://conda.io/docs/user-guide/tasks/manage-environments.html>`_ or
`Python Virtual Environments
<https://docs.python.org/3/tutorial/venv.html>`_. Spack environments
-provide some distinctive features:
+provide some distinctive features though:
#. A spec installed "in" an environment is no different from the same
- spec installed anywhere else in Spack. Environments are assembled
- simply by collecting together a set of specs.
-#. Spack Environments may contain more than one spec of the same
+ spec installed anywhere else in Spack.
+#. Spack environments may contain more than one spec of the same
package.
Spack uses a "manifest and lock" model similar to `Bundler gemfiles
-<https://bundler.io/man/gemfile.5.html>`_ and other package
-managers. The user input file is named ``spack.yaml`` and the lock
-file is named ``spack.lock``
+<https://bundler.io/man/gemfile.5.html>`_ and other package managers.
+The environment's user input file (or manifest), is named ``spack.yaml``.
+The lock file, which contains the fully configured and concretized specs,
+is named ``spack.lock``.
.. _environments-using:
@@ -68,55 +75,60 @@ An environment is created by:
$ spack env create myenv
-Spack then creates the directory ``var/spack/environments/myenv``.
+The directory ``$SPACK_ROOT/var/spack/environments/myenv`` is created
+to manage the environment.
.. note::
- All managed environments by default are stored in the ``var/spack/environments`` folder.
- This location can be changed by setting the ``environments_root`` variable in ``config.yaml``.
-
-In the ``var/spack/environments/myenv`` directory, Spack creates the
-file ``spack.yaml`` and the hidden directory ``.spack-env``.
+ All managed environments by default are stored in the
+ ``$SPACK_ROOT/var/spack/environments`` folder. This location can be changed
+ by setting the ``environments_root`` variable in ``config.yaml``.
-Spack stores metadata in the ``.spack-env`` directory. User
-interaction will occur through the ``spack.yaml`` file and the Spack
-commands that affect it. When the environment is concretized, Spack
-will create a file ``spack.lock`` with the concrete information for
+Spack creates the file ``spack.yaml``, hidden directory ``.spack-env``, and
+``spack.lock`` file under ``$SPACK_ROOT/var/spack/environments/myenv``. User
+interaction occurs through the ``spack.yaml`` file and the Spack commands
+that affect it. Metadata and, by default, the view are stored in the
+``.spack-env`` directory. When the environment is concretized, Spack creates
+the ``spack.lock`` file with the fully configured specs and dependencies for
the environment.
-In addition to being the default location for the view associated with
-an Environment, the ``.spack-env`` directory also contains:
+The ``.spack-env`` subdirectory also contains:
- * ``repo/``: A repo consisting of the Spack packages used in this
- environment. This allows the environment to build the same, in
- theory, even on different versions of Spack with different
+ * ``repo/``: A subdirectory acting as the repo consisting of the Spack
+ packages used in the environment. It allows the environment to build
+ the same, in theory, even on different versions of Spack with different
packages!
- * ``logs/``: A directory containing the build logs for the packages
- in this Environment.
+ * ``logs/``: A subdirectory containing the build logs for the packages
+ in this environment.
-Spack Environments can also be created from either a manifest file
-(usually but not necessarily named, ``spack.yaml``) or a lockfile.
-To create an Environment from a manifest:
+Spack Environments can also be created from either the user input, or
+manifest, file or the lockfile. Create an environment from a manifest using:
.. code-block:: console
$ spack env create myenv spack.yaml
-To create an Environment from a ``spack.lock`` lockfile:
+The resulting environment is guaranteed to have the same root specs as
+the original but may concretize differently in the presence of different
+explicit or default configuration settings (e.g., a different version of
+Spack or for a different user account).
+
+Create an environment from a ``spack.lock`` file using:
.. code-block:: console
$ spack env create myenv spack.lock
-Either of these commands can also take a full path to the
-initialization file.
+The resulting environment, when on the same or a compatible machine, is
+guaranteed to initially have the same concrete specs as the original.
-A Spack Environment created from a ``spack.yaml`` manifest is
-guaranteed to have the same root specs as the original Environment,
-but may concretize differently. A Spack Environment created from a
-``spack.lock`` lockfile is guaranteed to have the same concrete specs
-as the original Environment. Either may obviously then differ as the
-user modifies it.
+.. note::
+
+ Environment creation also accepts a full path to the file.
+
+ If the path is not under the ``$SPACK_ROOT/var/spack/environments``
+ directory then the source is referred to as an
+ :ref:`independent environment <independent_environments>`.
^^^^^^^^^^^^^^^^^^^^^^^^^
Activating an Environment
@@ -129,7 +141,7 @@ To activate an environment, use the following command:
$ spack env activate myenv
By default, the ``spack env activate`` will load the view associated
-with the Environment into the user environment. The ``-v,
+with the environment into the user environment. The ``-v,
--with-view`` argument ensures this behavior, and the ``-V,
--without-view`` argument activates the environment without changing
the user environment variables.
@@ -142,6 +154,20 @@ user's prompt to begin with the environment name in brackets.
$ spack env activate -p myenv
[myenv] $ ...
+The ``activate`` command can also be used to create a new environment, if it is
+not already defined, by adding the ``--create`` flag. Managed and independent
+environments can both be created using the same flags that `spack env create`
+accepts. If an environment already exists then spack will simply activate it
+and ignore the create-specific flags.
+
+.. code-block:: console
+
+ $ spack env activate --create -p myenv
+ # ...
+ # [creates if myenv does not exist yet]
+ # ...
+ [myenv] $ ...
+
To deactivate an environment, use the command:
.. code-block:: console
@@ -157,34 +183,50 @@ or the shortcut alias
If the environment was activated with its view, deactivating the
environment will remove the view from the user environment.
-^^^^^^^^^^^^^^^^^^^^^^
-Anonymous Environments
-^^^^^^^^^^^^^^^^^^^^^^
+.. _independent_environments:
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Independent Environments
+^^^^^^^^^^^^^^^^^^^^^^^^
-Any directory can be treated as an environment if it contains a file
-``spack.yaml``. To load an anonymous environment, use:
+Independent environments can be located in any directory outside of Spack.
+
+.. note::
+
+ When uninstalling packages, Spack asks the user to confirm the removal of packages
+ that are still used in a managed environment. This is not the case for independent
+ environments.
+
+To create an independent environment, use one of the following commands:
.. code-block:: console
- $ spack env activate -d /path/to/directory
+ $ spack env create --dir my_env
+ $ spack env create ./my_env
-Anonymous specs can be created in place using the command:
+As a shorthand, you can also create an independent environment upon activation if it does not
+already exist:
.. code-block:: console
- $ spack env create -d .
+ $ spack env activate --create ./my_env
-In this case Spack simply creates a ``spack.yaml`` file in the requested
-directory.
+For convenience, Spack can also place an independent environment in a temporary directory for you:
+
+.. code-block:: console
+
+ $ spack env activate --temp
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Environment Sensitive Commands
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Spack commands are environment sensitive. For example, the ``find``
-command shows only the specs in the active Environment if an
-Environment has been activated. Similarly, the ``install`` and
-``uninstall`` commands act on the active environment.
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Environment-Aware Commands
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Spack commands are environment-aware. For example, the ``find``
+command shows only the specs in the active environment if an
+environment has been activated. Otherwise it shows all specs in
+the Spack instance. The same rule applies to the ``install`` and
+``uninstall`` commands.
.. code-block:: console
@@ -229,32 +271,33 @@ Environment has been activated. Similarly, the ``install`` and
Note that when we installed the abstract spec ``zlib@1.2.8``, it was
-presented as a root of the Environment. All explicitly installed
-packages will be listed as roots of the Environment.
+presented as a root of the environment. All explicitly installed
+packages will be listed as roots of the environment.
All of the Spack commands that act on the list of installed specs are
-Environment-sensitive in this way, including ``install``,
-``uninstall``, ``find``, ``extensions``, and more. In the
+environment-aware in this way, including ``install``,
+``uninstall``, ``find``, ``extensions``, etcetera. In the
:ref:`environment-configuration` section we will discuss
-Environment-sensitive commands further.
+environment-aware commands further.
^^^^^^^^^^^^^^^^^^^^^
Adding Abstract Specs
^^^^^^^^^^^^^^^^^^^^^
-An abstract spec is the user-specified spec before Spack has applied
-any defaults or dependency information.
+An abstract spec is the user-specified spec before Spack applies
+defaults or dependency information.
-Users can add abstract specs to an Environment using the ``spack add``
-command. The most important component of an Environment is a list of
+Users can add abstract specs to an environment using the ``spack add``
+command. The most important component of an environment is a list of
abstract specs.
-Adding a spec adds to the manifest (the ``spack.yaml`` file), which is
-used to define the roots of the Environment, but does not affect the
-concrete specs in the lockfile, nor does it install the spec.
+Adding a spec adds it as a root spec of the environment in the user
+input file (``spack.yaml``). It does not affect the concrete specs
+in the lock file (``spack.lock``) and it does not install the spec.
-The ``spack add`` command is environment aware. It adds to the
-currently active environment. All environment aware commands can also
+The ``spack add`` command is environment-aware. It adds the spec to the
+currently active environment. An error is generated if there isn't an
+active environment. All environment-aware commands can also
be called using the ``spack -e`` flag to specify the environment.
.. code-block:: console
@@ -274,11 +317,11 @@ or
Concretizing
^^^^^^^^^^^^
-Once some user specs have been added to an environment, they can be concretized.
-There are at the moment three different modes of operation to concretize an environment,
-which are explained in details in :ref:`environments_concretization_config`.
-Regardless of which mode of operation has been chosen, the following
-command will ensure all the root specs are concretized according to the
+Once user specs have been added to an environment, they can be concretized.
+There are three different modes of operation to concretize an environment,
+explained in detail in :ref:`environments_concretization_config`.
+Regardless of which mode of operation is chosen, the following
+command will ensure all of the root specs are concretized according to the
constraints that are prescribed in the configuration:
.. code-block:: console
@@ -287,16 +330,15 @@ constraints that are prescribed in the configuration:
In the case of specs that are not concretized together, the command
above will concretize only the specs that were added and not yet
-concretized. Forcing a re-concretization of all the specs can be done
-instead with this command:
+concretized. Forcing a re-concretization of all of the specs can be done
+by adding the ``-f`` option:
.. code-block:: console
[myenv]$ spack concretize -f
-When the ``-f`` flag is not used to reconcretize all specs, Spack
-guarantees that already concretized specs are unchanged in the
-environment.
+Without the option, Spack guarantees that already concretized specs are
+unchanged in the environment.
The ``concretize`` command does not install any packages. For packages
that have already been installed outside of the environment, the
@@ -329,16 +371,16 @@ installed specs using the ``-c`` (``--concretized``) flag.
Installing an Environment
^^^^^^^^^^^^^^^^^^^^^^^^^
-In addition to installing individual specs into an Environment, one
-can install the entire Environment at once using the command
+In addition to adding individual specs to an environment, one
+can install the entire environment at once using the command
.. code-block:: console
[myenv]$ spack install
-If the Environment has been concretized, Spack will install the
-concretized specs. Otherwise, ``spack install`` will first concretize
-the Environment and then install the concretized specs.
+If the environment has been concretized, Spack will install the
+concretized specs. Otherwise, ``spack install`` will concretize
+the environment before installing the concretized specs.
.. note::
@@ -359,17 +401,17 @@ the Environment and then install the concretized specs.
As it installs, ``spack install`` creates symbolic links in the
-``logs/`` directory in the Environment, allowing for easy inspection
+``logs/`` directory in the environment, allowing for easy inspection
of build logs related to that environment. The ``spack install``
command also stores a Spack repo containing the ``package.py`` file
used at install time for each package in the ``repos/`` directory in
-the Environment.
+the environment.
The ``--no-add`` option can be used in a concrete environment to tell
spack to install specs already present in the environment but not to
add any new root specs to the environment. For root specs provided
to ``spack install`` on the command line, ``--no-add`` is the default,
-while for dependency specs on the other hand, it is optional. In other
+while for dependency specs, it is optional. In other
words, if there is an unambiguous match in the active concrete environment
for a root spec provided to ``spack install`` on the command line, spack
does not require you to specify the ``--no-add`` option to prevent the spec
@@ -383,12 +425,22 @@ Developing Packages in a Spack Environment
The ``spack develop`` command allows one to develop Spack packages in
an environment. It requires a spec containing a concrete version, and
-will configure Spack to install the package from local source. By
-default, it will also clone the package to a subdirectory in the
-environment. This package will have a special variant ``dev_path``
+will configure Spack to install the package from local source.
+If a version is not provided from the command line interface then spack
+will automatically pick the highest version the package has defined.
+This means any infinity versions (``develop``, ``main``, ``stable``) will be
+preferred in this selection process.
+By default, ``spack develop`` will also clone the package to a subdirectory in the
+environment for the local source. This package will have a special variant ``dev_path``
set, and Spack will ensure the package and its dependents are rebuilt
any time the environment is installed if the package's local source
-code has been modified. Spack ensures that all instances of a
+code has been modified. Spack's native implementation to check for modifications
+is to check if ``mtime`` is newer than the installation.
+A custom check can be created by overriding the ``detect_dev_src_change`` method
+in your package class. This is particularly useful for projects using custom spack repo's
+to drive development and want to optimize performance.
+
+Spack ensures that all instances of a
developed package in the environment are concretized to match the
version (and other constraints) passed as the spec argument to the
``spack develop`` command.
@@ -398,9 +450,26 @@ also be used as valid concrete versions (see :ref:`version-specifier`).
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
the ``main`` branch of the package, and ``spack install`` will install from
that git clone if ``foo`` is in the environment.
-Further development on ``foo`` can be tested by reinstalling the environment,
+Further development on ``foo`` can be tested by re-installing the environment,
and eventually committed and pushed to the upstream git repo.
+If the package being developed supports out-of-source builds then users can use the
+``--build_directory`` flag to control the location and name of the build directory.
+This is a shortcut to set the ``package_attributes:build_directory`` in the
+``packages`` configuration (see :ref:`assigning-package-attributes`).
+The supplied location will become the build-directory for that package in all future builds.
+
+.. warning::
+ Potential pitfalls of setting the build directory
+ Spack does not check for out-of-source build compatibility with the packages and
+ so the onerous of making sure the package supports out-of-source builds is on
+ the user.
+ For example, most ``autotool`` and ``makefile`` packages do not support out-of-source builds
+ while all ``CMake`` packages do.
+ Understanding these nuances are on the software developers and we strongly encourage
+ developers to only redirect the build directory if they understand their package's
+ build-system.
+
^^^^^^^
Loading
^^^^^^^
@@ -417,6 +486,125 @@ Sourcing that file in Bash will make the environment available to the
user; and can be included in ``.bashrc`` files, etc. The ``loads``
file may also be copied out of the environment, renamed, etc.
+
+.. _environment_include_concrete:
+
+------------------------------
+Included Concrete Environments
+------------------------------
+
+Spack environments can create an environment based off of information in already
+established environments. You can think of it as a combination of existing
+environments. It will gather information from the existing environment's
+``spack.lock`` and use that during the creation of this included concrete
+environment. When an included concrete environment is created it will generate
+a ``spack.lock`` file for the newly created environment.
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Creating included environments
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+To create a combined concrete environment, you must have at least one existing
+concrete environment. You will use the command ``spack env create`` with the
+argument ``--include-concrete`` followed by the name or path of the environment
+you'd like to include. Here is an example of how to create a combined environment
+from the command line.
+
+.. code-block:: console
+
+ $ spack env create myenv
+ $ spack -e myenv add python
+ $ spack -e myenv concretize
+ $ spack env create --include-concrete myenv included_env
+
+
+You can also include an environment directly in the ``spack.yaml`` file. It
+involves adding the ``include_concrete`` heading in the yaml followed by the
+absolute path to the independent environments.
+
+.. code-block:: yaml
+
+ spack:
+ specs: []
+ concretizer:
+ unify: true
+ include_concrete:
+ - /absolute/path/to/environment1
+ - /absolute/path/to/environment2
+
+
+Once the ``spack.yaml`` has been updated you must concretize the environment to
+get the concrete specs from the included environments.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Updating an included environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+If changes were made to the base environment and you want that reflected in the
+included environment you will need to reconcretize both the base environment and the
+included environment for the change to be implemented. For example:
+
+.. code-block:: console
+
+ $ spack env create myenv
+ $ spack -e myenv add python
+ $ spack -e myenv concretize
+ $ spack env create --include-concrete myenv included_env
+
+
+ $ spack -e myenv find
+ ==> In environment myenv
+ ==> Root specs
+ python
+
+ ==> 0 installed packages
+
+
+ $ spack -e included_env find
+ ==> In environment included_env
+ ==> No root specs
+ ==> Included specs
+ python
+
+ ==> 0 installed packages
+
+Here we see that ``included_env`` has access to the python package through
+the ``myenv`` environment. But if we were to add another spec to ``myenv``,
+``included_env`` will not be able to access the new information.
+
+.. code-block:: console
+
+ $ spack -e myenv add perl
+ $ spack -e myenv concretize
+ $ spack -e myenv find
+ ==> In environment myenv
+ ==> Root specs
+ perl python
+
+ ==> 0 installed packages
+
+
+ $ spack -e included_env find
+ ==> In environment included_env
+ ==> No root specs
+ ==> Included specs
+ python
+
+ ==> 0 installed packages
+
+It isn't until you run the ``spack concretize`` command that the combined
+environment will get the updated information from the reconcretized base environmennt.
+
+.. code-block:: console
+
+ $ spack -e included_env concretize
+ $ spack -e included_env find
+ ==> In environment included_env
+ ==> No root specs
+ ==> Included specs
+ perl python
+
+ ==> 0 installed packages
+
.. _environment-configuration:
------------------------
@@ -447,7 +635,7 @@ manipulate configuration inline in the ``spack.yaml`` file.
Inline configurations
^^^^^^^^^^^^^^^^^^^^^
-Inline Environment-scope configuration is done using the same yaml
+Inline environment-scope configuration is done using the same yaml
format as standard Spack configuration scopes, covered in the
:ref:`configuration` section. Each section is contained under a
top-level yaml object with it's name. For example, a ``spack.yaml``
@@ -457,11 +645,11 @@ a ``packages.yaml`` file) could contain:
.. code-block:: yaml
spack:
- ...
+ # ...
packages:
all:
compiler: [intel]
- ...
+ # ...
This configuration sets the default compiler for all packages to
``intel``.
@@ -472,7 +660,7 @@ Included configurations
Spack environments allow an ``include`` heading in their yaml
schema. This heading pulls in external configuration files and applies
-them to the Environment.
+them to the environment.
.. code-block:: yaml
@@ -485,6 +673,9 @@ them to the Environment.
Environments can include files or URLs. File paths can be relative or
absolute. URLs include the path to the text for individual files or
can be the path to a directory containing configuration files.
+Spack supports ``file``, ``http``, ``https`` and ``ftp`` protocols (or
+schemes). Spack-specific, environment and user path variables may be
+used in these paths. See :ref:`config-file-variables` for more information.
^^^^^^^^^^^^^^^^^^^^^^^^
Configuration precedence
@@ -499,7 +690,7 @@ have higher precedence, as the included configs are applied in reverse order.
Manually Editing the Specs List
-------------------------------
-The list of abstract/root specs in the Environment is maintained in
+The list of abstract/root specs in the environment is maintained in
the ``spack.yaml`` manifest under the heading ``specs``.
.. code-block:: yaml
@@ -607,7 +798,7 @@ evaluates to the cross-product of those specs. Spec matrices also
contain an ``excludes`` directive, which eliminates certain
combinations from the evaluated result.
-The following two Environment manifests are identical:
+The following two environment manifests are identical:
.. code-block:: yaml
@@ -682,7 +873,7 @@ files are identical.
In short files like the example, it may be easier to simply list the
included specs. However for more complicated examples involving many
packages across many toolchains, separately factored lists make
-Environments substantially more manageable.
+environments substantially more manageable.
Additionally, the ``-l`` option to the ``spack add`` command allows
one to add to named lists in the definitions section of the manifest
@@ -701,7 +892,7 @@ named list ``compilers`` is ``['%gcc', '%clang', '%intel']`` on
spack:
definitions:
- compilers: ['%gcc', '%clang']
- - when: arch.satisfies('x86_64:')
+ - when: arch.satisfies('target=x86_64:')
compilers: ['%intel']
.. note::
@@ -768,37 +959,90 @@ For example, the following environment has three root packages:
This allows for a much-needed reduction in redundancy between packages
and constraints.
-----------------
-Filesystem Views
-----------------
-Spack Environments can define filesystem views, which provide a direct access point
-for software similar to the directory hierarchy that might exist under ``/usr/local``.
-Filesystem views are updated every time the environment is written out to the lock
-file ``spack.lock``, so the concrete environment and the view are always compatible.
-The files of the view's installed packages are brought into the view by symbolic or
-hard links, referencing the original Spack installation, or by copy.
+-----------------
+Environment Views
+-----------------
+
+Spack Environments can have an associated filesystem view, which is a directory
+with a more traditional structure ``<view>/bin``, ``<view>/lib``, ``<view>/include``
+in which all files of the installed packages are linked.
+
+By default a view is created for each environment, thanks to the ``view: true``
+option in the ``spack.yaml`` manifest file:
+
+.. code-block:: yaml
+
+ spack:
+ specs: [perl, python]
+ view: true
+
+The view is created in a hidden directory ``.spack-env/view`` relative to the environment.
+If you've used ``spack env activate``, you may have already interacted with this view. Spack
+prepends its ``<view>/bin`` dir to ``PATH`` when the environment is activated, so that
+you can directly run executables from all installed packages in the environment.
+
+Views are highly customizable: you can control where they are put, modify their structure,
+include and exclude specs, change how files are linked, and you can even generate multiple
+views for a single environment.
.. _configuring_environment_views:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Configuration in ``spack.yaml``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Minimal view configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^
-The Spack Environment manifest file has a top-level keyword
-``view``. Each entry under that heading is a **view descriptor**, headed
-by a name. Any number of views may be defined under the ``view`` heading.
-The view descriptor contains the root of the view, and
-optionally the projections for the view, ``select`` and
-``exclude`` lists for the view and link information via ``link`` and
+The minimal configuration
+
+.. code-block:: yaml
+
+ spack:
+ # ...
+ view: true
+
+lets Spack generate a single view with default settings under the
+``.spack-env/view`` directory of the environment.
+
+Another short way to configure a view is to specify just where to put it:
+
+.. code-block:: yaml
+
+ spack:
+ # ...
+ view: /path/to/view
+
+Views can also be disabled by setting ``view: false``.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Advanced view configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+One or more **view descriptors** can be defined under ``view``, keyed by a name.
+The example from the previous section with ``view: /path/to/view`` is equivalent
+to defining a view descriptor named ``default`` with a ``root`` attribute:
+
+.. code-block:: yaml
+
+ spack:
+ # ...
+ view:
+ default: # name of the view
+ root: /path/to/view # view descriptor attribute
+
+The ``default`` view descriptor name is special: when you ``spack env activate`` your
+environment, this view will be used to update (among other things) your ``PATH``
+variable.
+
+View descriptors must contain the root of the view, and optionally projections,
+``select`` and ``exclude`` lists and link information via ``link`` and
``link_type``.
-For example, in the following manifest
+As a more advanced example, in the following manifest
file snippet we define a view named ``mpis``, rooted at
``/path/to/view`` in which all projections use the package name,
version, and compiler name to determine the path for a given
package. This view selects all packages that depend on MPI, and
-excludes those built with the PGI compiler at version 18.5.
+excludes those built with the GCC compiler at version 18.5.
The root specs with their (transitive) link and run type dependencies
will be put in the view due to the ``link: all`` option,
and the files in the view will be symlinks to the spack install
@@ -807,12 +1051,12 @@ directories.
.. code-block:: yaml
spack:
- ...
+ # ...
view:
mpis:
root: /path/to/view
select: [^mpi]
- exclude: ['%pgi@18.5']
+ exclude: ['%gcc@18.5']
projections:
all: '{name}/{version}-{compiler.name}'
link: all
@@ -838,63 +1082,14 @@ of ``hardlink`` or ``copy``.
when the environment is not activated, and linked libraries will be located
*outside* of the view thanks to rpaths.
-
-There are two shorthands for environments with a single view. If the
-environment at ``/path/to/env`` has a single view, with a root at
-``/path/to/env/.spack-env/view``, with default selection and exclusion
-and the default projection, we can put ``view: True`` in the
-environment manifest. Similarly, if the environment has a view with a
-different root, but default selection, exclusion, and projections, the
-manifest can say ``view: /path/to/view``. These views are
-automatically named ``default``, so that
-
-.. code-block:: yaml
-
- spack:
- ...
- view: True
-
-is equivalent to
-
-.. code-block:: yaml
-
- spack:
- ...
- view:
- default:
- root: .spack-env/view
-
-and
-
-.. code-block:: yaml
-
- spack:
- ...
- view: /path/to/view
-
-is equivalent to
-
-.. code-block:: yaml
-
- spack:
- ...
- view:
- default:
- root: /path/to/view
-
-By default, Spack environments are configured with ``view: True`` in
-the manifest. Environments can be configured without views using
-``view: False``. For backwards compatibility reasons, environments
-with no ``view`` key are treated the same as ``view: True``.
-
From the command line, the ``spack env create`` command takes an
argument ``--with-view [PATH]`` that sets the path for a single, default
view. If no path is specified, the default path is used (``view:
-True``). The argument ``--without-view`` can be used to create an
+true``). The argument ``--without-view`` can be used to create an
environment without any view configured.
The ``spack env view`` command can be used to change the manage views
-of an Environment. The subcommand ``spack env view enable`` will add a
+of an environment. The subcommand ``spack env view enable`` will add a
view named ``default`` to an environment. It takes an optional
argument to specify the path for the new default view. The subcommand
``spack env view disable`` will remove the view named ``default`` from
@@ -920,6 +1115,17 @@ function, as shown in the example below:
^mpi: "{name}-{version}/{^mpi.name}-{^mpi.version}-{compiler.name}-{compiler.version}"
all: "{name}-{version}/{compiler.name}-{compiler.version}"
+Projections also permit environment and spack configuration variable
+expansions as shown below:
+
+.. code-block:: yaml
+
+ projections:
+ all: "{name}-{version}/{compiler.name}-{compiler.version}/$date/$SYSTEM_ENV_VARIBLE"
+
+where ``$date`` is the spack configuration variable that will expand with the ``YYYY-MM-DD``
+format and ``$SYSTEM_ENV_VARIABLE`` is an environment variable defined in the shell.
+
The entries in the projections configuration file must all be either
specs or the keyword ``all``. For each spec, the projection used will
be the first non-``all`` entry that the spec satisfies, or ``all`` if
@@ -945,11 +1151,18 @@ the projection under ``all`` before reaching those entries.
Activating environment views
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The ``spack env activate`` command will put the default view for the
-environment into the user's path, in addition to activating the
-environment for Spack commands. The arguments ``-v,--with-view`` and
-``-V,--without-view`` can be used to tune this behavior. The default
-behavior is to activate with the environment view if there is one.
+The ``spack env activate <env>`` has two effects:
+
+1. It activates the environment so that further Spack commands such
+ as ``spack install`` will run in the context of the environment.
+2. It activates the view so that environment variables such as
+ ``PATH`` are updated to include the view.
+
+Without further arguments, the ``default`` view of the environment is
+activated. If a view with a different name has to be activated,
+``spack env activate --with-view <name> <env>`` can be
+used instead. You can also activate the environment without modifying
+further environment variables using ``--without-view``.
The environment variables affected by the ``spack env activate``
command and the paths that are used to update them are determined by
@@ -972,8 +1185,8 @@ relevant variable if the path exists. For this reason, it is not
recommended to use non-default projections with the default view of an
environment.
-The ``spack env deactivate`` command will remove the default view of
-the environment from the user's path.
+The ``spack env deactivate`` command will remove the active view of
+the Spack environment from the user's environment variables.
.. _env-generate-depfile:
@@ -990,7 +1203,7 @@ other targets to depend on the environment installation.
A typical workflow is as follows:
-.. code:: console
+.. code-block:: console
spack env create -d .
spack -e . add perl
@@ -1044,7 +1257,7 @@ gets installed and is available for use in the ``env`` target.
$(SPACK) -e . env depfile -o $@ --make-prefix spack
env: spack/env
- $(info Environment installed!)
+ $(info environment installed!)
clean:
rm -rf spack.lock env.mk spack/
@@ -1083,7 +1296,7 @@ its dependencies. This can be useful when certain flags should only apply to
dependencies. Below we show a use case where a spec is installed with verbose
output (``spack install --verbose``) while its dependencies are installed silently:
-.. code:: console
+.. code-block:: console
$ spack env depfile -o Makefile
@@ -1105,7 +1318,7 @@ This can be accomplished through the generated ``[<prefix>/]SPACK_PACKAGE_IDS``
variable. Assuming we have an active and concrete environment, we generate the
associated ``Makefile`` with a prefix ``example``:
-.. code:: console
+.. code-block:: console
$ spack env depfile -o env.mk --make-prefix example
@@ -1132,7 +1345,7 @@ index once every package is pushed. Note how this target uses the generated
example/push/%: example/install/%
@mkdir -p $(dir $@)
$(info About to push $(SPEC) to a buildcache)
- $(SPACK) -e . buildcache push --allow-root --only=package $(BUILDCACHE_DIR) /$(HASH)
+ $(SPACK) -e . buildcache push --only=package $(BUILDCACHE_DIR) /$(HASH)
@touch $@
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))
diff --git a/lib/spack/docs/extensions.rst b/lib/spack/docs/extensions.rst
index 2d82c2ba84..0879645b73 100644
--- a/lib/spack/docs/extensions.rst
+++ b/lib/spack/docs/extensions.rst
@@ -111,3 +111,39 @@ The corresponding unit tests can be run giving the appropriate options to ``spac
(5 durations < 0.005s hidden. Use -vv to show these durations.)
=========================================== 5 passed in 5.06s ============================================
+
+---------------------------------------
+Registering Extensions via Entry Points
+---------------------------------------
+
+.. note::
+ Python version >= 3.8 is required to register extensions via entry points.
+
+Spack can be made aware of extensions that are installed as part of a python package. To do so, register a function that returns the extension path, or paths, to the ``"spack.extensions"`` entry point. Consider the Python package ``my_package`` that includes a Spack extension:
+
+.. code-block:: console
+
+ my-package/
+ ├── src
+ │   ├── my_package
+ │   │   └── __init__.py
+ │   └── spack-scripting/ # the spack extensions
+ └── pyproject.toml
+
+adding the following to ``my_package``'s ``pyproject.toml`` will make the ``spack-scripting`` extension visible to Spack when ``my_package`` is installed:
+
+.. code-block:: toml
+
+ [project.entry_points."spack.extenions"]
+ my_package = "my_package:get_extension_path"
+
+The function ``my_package.get_extension_path`` in ``my_package/__init__.py`` might look like
+
+.. code-block:: python
+
+ import importlib.resources
+
+ def get_extension_path():
+ dirname = importlib.resources.files("my_package").joinpath("spack-scripting")
+ if dirname.exists():
+ return str(dirname)
diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst
index 7c53a07744..2569657c9f 100644
--- a/lib/spack/docs/getting_started.rst
+++ b/lib/spack/docs/getting_started.rst
@@ -35,7 +35,7 @@ A build matrix showing which packages are working on which systems is shown belo
.. code-block:: console
apt update
- apt install build-essential ca-certificates coreutils curl environment-modules gfortran git gpg lsb-release python3 python3-distutils python3-venv unzip zip
+ apt install bzip2 ca-certificates file g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
.. tab-item:: RHEL
@@ -43,14 +43,14 @@ A build matrix showing which packages are working on which systems is shown belo
dnf install epel-release
dnf group install "Development Tools"
- dnf install curl findutils gcc-gfortran gnupg2 hostname iproute redhat-lsb-core python3 python3-pip python3-setuptools unzip python3-boto3
+ dnf install gcc-gfortran redhat-lsb-core python3 unzip
.. tab-item:: macOS Brew
.. code-block:: console
brew update
- brew install curl gcc git gnupg zip
+ brew install gcc git zip
------------
Installation
@@ -61,10 +61,15 @@ Getting Spack is easy. You can clone it from the `github repository
.. code-block:: console
- $ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
+ $ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
This will create a directory called ``spack``.
+.. note::
+ ``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.
+
+ ``--depth=2`` prunes the git history to reduce the size of the Spack installation.
+
.. _shell-support:
^^^^^^^^^^^^^
@@ -250,9 +255,10 @@ Compiler configuration
Spack has the ability to build packages with multiple compilers and
compiler versions. Compilers can be made available to Spack by
-specifying them manually in ``compilers.yaml``, or automatically by
-running ``spack compiler find``, but for convenience Spack will
-automatically detect compilers the first time it needs them.
+specifying them manually in ``compilers.yaml`` or ``packages.yaml``,
+or automatically by running ``spack compiler find``, but for
+convenience Spack will automatically detect compilers the first time
+it needs them.
.. _cmd-spack-compilers:
@@ -277,10 +283,6 @@ compilers`` or ``spack compiler list``:
intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
-- clang -------------------------------------------------------
clang@3.4 clang@3.3 clang@3.2 clang@3.1
- -- pgi ---------------------------------------------------------
- pgi@14.3-0 pgi@13.2-0 pgi@12.1-0 pgi@10.9-0 pgi@8.0-1
- pgi@13.10-0 pgi@13.1-1 pgi@11.10-0 pgi@10.2-0 pgi@7.1-3
- pgi@13.6-0 pgi@12.8-0 pgi@11.1-0 pgi@9.0-4 pgi@7.0-6
Any of these compilers can be used to build Spack packages. More on
how this is done is in :ref:`sec-specs`.
@@ -457,6 +459,54 @@ specification. The operations available to modify the environment are ``set``, `
prepend_path: # Similar for append|remove_path
LD_LIBRARY_PATH: /ld/paths/added/by/setvars/sh
+.. note::
+
+ Spack is in the process of moving compilers from a separate
+ attribute to be handled like all other packages. As part of this
+ process, the ``compilers.yaml`` section will eventually be replaced
+ by configuration in the ``packages.yaml`` section. This new
+ configuration is now available, although it is not yet the default
+ behavior.
+
+Compilers can also be configured as external packages in the
+``packages.yaml`` config file. Any external package for a compiler
+(e.g. ``gcc`` or ``llvm``) will be treated as a configured compiler
+assuming the paths to the compiler executables are determinable from
+the prefix.
+
+If the paths to the compiler executable are not determinable from the
+prefix, you can add them to the ``extra_attributes`` field. Similarly,
+all other fields from the compilers config can be added to the
+``extra_attributes`` field for an external representing a compiler.
+
+Note that the format for the ``paths`` field in the
+``extra_attributes`` section is different than in the ``compilers``
+config. For compilers configured as external packages, the section is
+named ``compilers`` and the dictionary maps language names (``c``,
+``cxx``, ``fortran``) to paths, rather than using the names ``cc``,
+``fc``, and ``f77``.
+
+.. code-block:: yaml
+
+ packages:
+ gcc:
+ external:
+ - spec: gcc@12.2.0 arch=linux-rhel8-skylake
+ prefix: /usr
+ extra_attributes:
+ environment:
+ set:
+ GCC_ROOT: /usr
+ external:
+ - spec: llvm+clang@15.0.0 arch=linux-rhel8-skylake
+ prefix: /usr
+ extra_attributes:
+ compilers:
+ c: /usr/bin/clang-with-suffix
+ cxx: /usr/bin/clang++-with-extra-info
+ fortran: /usr/bin/gfortran
+ extra_rpaths:
+ - /usr/lib/llvm/
^^^^^^^^^^^^^^^^^^^^^^^
Build Your Own Compiler
@@ -623,7 +673,7 @@ Fortran.
compilers:
- compiler:
- ...
+ # ...
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
@@ -753,65 +803,6 @@ flags to the ``icc`` command:
^^^
-PGI
-^^^
-
-PGI comes with two sets of compilers for C++ and Fortran,
-distinguishable by their names. "Old" compilers:
-
-.. code-block:: yaml
-
- cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
- cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgCC
- f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgf77
- fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgf90
-
-"New" compilers:
-
-.. code-block:: yaml
-
- cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
- cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgc++
- f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
- fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
-
-Older installations of PGI contains just the old compilers; whereas
-newer installations contain the old and the new. The new compiler is
-considered preferable, as some packages
-(``hdf``) will not build with the old compiler.
-
-When auto-detecting a PGI compiler, there are cases where Spack will
-find the old compilers, when you really want it to find the new
-compilers. It is best to check this ``compilers.yaml``; and if the old
-compilers are being used, change ``pgf77`` and ``pgf90`` to
-``pgfortran``.
-
-Other issues:
-
-* There are reports that some packages will not build with PGI,
- including ``libpciaccess`` and ``openssl``. A workaround is to
- build these packages with another compiler and then use them as
- dependencies for PGI-build packages. For example:
-
- .. code-block:: console
-
- $ spack install openmpi%pgi ^libpciaccess%gcc
-
-
-* PGI requires a license to use; see :ref:`licensed-compilers` for more
- information on installation.
-
-.. note::
-
- It is believed the problem with HDF 4 is that everything is
- compiled with the ``F77`` compiler, but at some point some Fortran
- 90 code slipped in there. So compilers that can handle both FORTRAN
- 77 and Fortran 90 (``gfortran``, ``pgfortran``, etc) are fine. But
- compilers specific to one or the other (``pgf77``, ``pgf90``) won't
- work.
-
-
-^^^
NAG
^^^
@@ -1315,187 +1306,6 @@ This will write the private key to the file `dinosaur.priv`.
or for help on an issue or the Spack slack.
-.. _cray-support:
-
--------------
-Spack on Cray
--------------
-
-Spack differs slightly when used on a Cray system. The architecture spec
-can differentiate between the front-end and back-end processor and operating system.
-For example, on Edison at NERSC, the back-end target processor
-is "Ivy Bridge", so you can specify to use the back-end this way:
-
-.. code-block:: console
-
- $ spack install zlib target=ivybridge
-
-You can also use the operating system to build against the back-end:
-
-.. code-block:: console
-
- $ spack install zlib os=CNL10
-
-Notice that the name includes both the operating system name and the major
-version number concatenated together.
-
-Alternatively, if you want to build something for the front-end,
-you can specify the front-end target processor. The processor for a login node
-on Edison is "Sandy bridge" so we specify on the command line like so:
-
-.. code-block:: console
-
- $ spack install zlib target=sandybridge
-
-And the front-end operating system is:
-
-.. code-block:: console
-
- $ spack install zlib os=SuSE11
-
-^^^^^^^^^^^^^^^^^^^^^^^
-Cray compiler detection
-^^^^^^^^^^^^^^^^^^^^^^^
-
-Spack can detect compilers using two methods. For the front-end, we treat
-everything the same. The difference lies in back-end compiler detection.
-Back-end compiler detection is made via the Tcl module avail command.
-Once it detects the compiler it writes the appropriate PrgEnv and compiler
-module name to compilers.yaml and sets the paths to each compiler with Cray\'s
-compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load
-the correct PrgEnv and compiler module and will call appropriate wrapper.
-
-The compilers.yaml config file will also differ. There is a
-modules section that is filled with the compiler's Programming Environment
-and module name. On other systems, this field is empty []:
-
-.. code-block:: yaml
-
- - compiler:
- modules:
- - PrgEnv-intel
- - intel/15.0.109
-
-As mentioned earlier, the compiler paths will look different on a Cray system.
-Since most compilers are invoked using cc, CC and ftn, the paths for each
-compiler are replaced with their respective Cray compiler wrapper names:
-
-.. code-block:: yaml
-
- paths:
- cc: cc
- cxx: CC
- f77: ftn
- fc: ftn
-
-As opposed to an explicit path to the compiler executable. This allows Spack
-to call the Cray compiler wrappers during build time.
-
-For more on compiler configuration, check out :ref:`compiler-config`.
-
-Spack sets the default Cray link type to dynamic, to better match other
-other platforms. Individual packages can enable static linking (which is the
-default outside of Spack on cray systems) using the ``-static`` flag.
-
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Setting defaults and using Cray modules
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If you want to use default compilers for each PrgEnv and also be able
-to load cray external modules, you will need to set up a ``packages.yaml``.
-
-Here's an example of an external configuration for cray modules:
-
-.. code-block:: yaml
-
- packages:
- mpich:
- externals:
- - spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10"
- modules:
- - cray-mpich
- - spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10"
- modules:
- - cray-mpich
- all:
- providers:
- mpi: [mpich]
-
-This tells Spack that for whatever package that depends on mpi, load the
-cray-mpich module into the environment. You can then be able to use whatever
-environment variables, libraries, etc, that are brought into the environment
-via module load.
-
-.. note::
-
- For Cray-provided packages, it is best to use ``modules:`` instead of ``prefix:``
- in ``packages.yaml``, because the Cray Programming Environment heavily relies on
- modules (e.g., loading the ``cray-mpich`` module adds MPI libraries to the
- compiler wrapper link line).
-
-You can set the default compiler that Spack can use for each compiler type.
-If you want to use the Cray defaults, then set them under ``all:`` in packages.yaml.
-In the compiler field, set the compiler specs in your order of preference.
-Whenever you build with that compiler type, Spack will concretize to that version.
-
-Here is an example of a full packages.yaml used at NERSC
-
-.. code-block:: yaml
-
- packages:
- mpich:
- externals:
- - spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
- modules:
- - cray-mpich
- - spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge"
- modules:
- - cray-mpich
- buildable: False
- netcdf:
- externals:
- - spec: "netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
- modules:
- - cray-netcdf
- - spec: "netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
- modules:
- - cray-netcdf
- buildable: False
- hdf5:
- externals:
- - spec: "hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
- modules:
- - cray-hdf5
- - spec: "hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
- modules:
- - cray-hdf5
- buildable: False
- all:
- compiler: [gcc@5.2.0, intel@16.0.0.109]
- providers:
- mpi: [mpich]
-
-Here we tell spack that whenever we want to build with gcc use version 5.2.0 or
-if we want to build with intel compilers, use version 16.0.0.109. We add a spec
-for each compiler type for each cray modules. This ensures that for each
-compiler on our system we can use that external module.
-
-For more on external packages check out the section :ref:`sec-external-packages`.
-
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Using Linux containers on Cray machines
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Spack uses environment variables particular to the Cray programming
-environment to determine which systems are Cray platforms. These
-environment variables may be propagated into containers that are not
-using the Cray programming environment.
-
-To ensure that Spack does not autodetect the Cray programming
-environment, unset the environment variable ``MODULEPATH``. This
-will cause Spack to treat a linux container on a Cray system as a base
-linux distro.
-
.. _windows_support:
----------------
@@ -1516,6 +1326,7 @@ Required:
* Microsoft Visual Studio
* Python
* Git
+* 7z
Optional:
* Intel Fortran (needed for some packages)
@@ -1529,6 +1340,8 @@ Microsoft Visual Studio
"""""""""""""""""""""""
Microsoft Visual Studio provides the only Windows C/C++ compiler that is currently supported by Spack.
+Spack additionally requires that the Windows SDK (including WGL) to be installed as part of your
+visual studio installation as it is required to build many packages from source.
We require several specific components to be included in the Visual Studio installation.
One is the C/C++ toolset, which can be selected as "Desktop development with C++" or "C++ build tools,"
@@ -1536,6 +1349,7 @@ depending on installation type (Professional, Build Tools, etc.) The other requ
"C++ CMake tools for Windows," which can be selected from among the optional packages.
This provides CMake and Ninja for use during Spack configuration.
+
If you already have Visual Studio installed, you can make sure these components are installed by
rerunning the installer. Next to your installation, select "Modify" and look at the
"Installation details" pane on the right.
@@ -1578,6 +1392,13 @@ as the project providing Git support on Windows. This is additionally the recomm
for installing Git on Windows, a link to which can be found above. Spack requires the
utilities vendored by this project.
+"""
+7zip
+"""
+
+A tool for extracting ``.xz`` files is required for extracting source tarballs. The latest 7zip
+can be located at https://sourceforge.net/projects/sevenzip/.
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 2: Install and setup Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1604,16 +1425,14 @@ in a Windows CMD prompt.
Step 3: Run and configure Spack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-To use Spack, run ``bin\spack_cmd.bat`` (you may need to Run as Administrator) from the top-level spack
-directory. This will provide a Windows command prompt with an environment properly set up with Spack
-and its prerequisites. If you receive a warning message that Python is not in your ``PATH``
+On Windows, Spack supports both primary native shells, Powershell and the traditional command prompt.
+To use Spack, pick your favorite shell, and run ``bin\spack_cmd.bat`` or ``share/spack/setup-env.ps1``
+(you may need to Run as Administrator) from the top-level spack
+directory. This will provide a Spack enabled shell. If you receive a warning message that Python is not in your ``PATH``
(which may happen if you installed Python from the website and not the Windows Store) add the location
of the Python executable to your ``PATH`` now. You can permanently add Python to your ``PATH`` variable
by using the ``Edit the system environment variables`` utility in Windows Control Panel.
-.. note::
- Alternatively, Powershell can be used in place of CMD
-
To configure Spack, first run the following command inside the Spack console:
.. code-block:: console
@@ -1678,7 +1497,7 @@ and not tabs, so ensure that this is the case when editing one directly.
.. note:: Cygwin
The use of Cygwin is not officially supported by Spack and is not tested.
- However Spack will not throw an error, so use if choosing to use Spack
+ However Spack will not prevent this, so use if choosing to use Spack
with Cygwin, know that no functionality is garunteed.
^^^^^^^^^^^^^^^^^
@@ -1692,21 +1511,12 @@ Spack console via:
spack install cpuinfo
-If in the previous step, you did not have CMake or Ninja installed, running the command above should bootstrap both packages
+If in the previous step, you did not have CMake or Ninja installed, running the command above should install both packages
-"""""""""""""""""""""""""""
-Windows Compatible Packages
-"""""""""""""""""""""""""""
+.. note:: Spec Syntax Caveats
+ Windows has a few idiosyncrasies when it comes to the Spack spec syntax and the use of certain shells
+ See the Spack spec syntax doc for more information
-Not all spack packages currently have Windows support. Some are inherently incompatible with the
-platform, and others simply have yet to be ported. To view the current set of packages with Windows
-support, the list command should be used via `spack list -t windows`. If there's a package you'd like
-to install on Windows but is not in that list, feel free to reach out to request the port or contribute
-the port yourself.
-
-.. note::
- This is by no means a comprehensive list, some packages may have ports that were not tagged
- while others may just work out of the box on Windows and have not been tagged as such.
^^^^^^^^^^^^^^
For developers
@@ -1716,6 +1526,3 @@ The intent is to provide a Windows installer that will automatically set up
Python, Git, and Spack, instead of requiring the user to do so manually.
Instructions for creating the installer are at
https://github.com/spack/spack/blob/develop/lib/spack/spack/cmd/installer/README.md
-
-Alternatively a pre-built copy of the Windows installer is available as an artifact of Spack's Windows CI
-available at each run of the CI on develop or any PR.
diff --git a/lib/spack/docs/images/pr-commit.png b/lib/spack/docs/images/pr-commit.png
deleted file mode 100644
index a87c800ef5..0000000000
--- a/lib/spack/docs/images/pr-commit.png
+++ /dev/null
Binary files differ
diff --git a/lib/spack/docs/images/projects.png b/lib/spack/docs/images/projects.png
deleted file mode 100644
index bd2971ff62..0000000000
--- a/lib/spack/docs/images/projects.png
+++ /dev/null
Binary files differ
diff --git a/lib/spack/docs/images/splices.png b/lib/spack/docs/images/splices.png
new file mode 100644
index 0000000000..b2a3e99837
--- /dev/null
+++ b/lib/spack/docs/images/splices.png
Binary files differ
diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst
index 410cb8e41c..accedfee98 100644
--- a/lib/spack/docs/index.rst
+++ b/lib/spack/docs/index.rst
@@ -12,10 +12,6 @@
Spack
===================
-.. epigraph::
-
- `These are docs for the Spack package manager. For sphere packing, see` `pyspack <https://pyspack.readthedocs.io>`_.
-
Spack is a package management tool designed to support multiple
versions and configurations of software on a wide variety of platforms
and environments. It was designed for large supercomputing centers,
@@ -39,10 +35,15 @@ package:
.. code-block:: console
- $ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
+ $ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install libelf
+.. note::
+ ``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.
+
+ ``--depth=2`` prunes the git history to reduce the size of the Spack installation.
+
If you're new to spack and want to start using it, see :doc:`getting_started`,
or refer to the full manual below.
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
index 9ba9c3710d..80e3c2ee66 100644
--- a/lib/spack/docs/module_file_support.rst
+++ b/lib/spack/docs/module_file_support.rst
@@ -10,7 +10,7 @@ Modules (modules.yaml)
======================
The use of module systems to manage user environment in a controlled way
-is a common practice at HPC centers that is often embraced also by
+is a common practice at HPC centers that is sometimes embraced also by
individual programmers on their development machines. To support this
common practice Spack integrates with `Environment Modules
<http://modules.sourceforge.net/>`_ and `Lmod
@@ -21,14 +21,38 @@ Modules are one of several ways you can use Spack packages. For other
options that may fit your use case better, you should also look at
:ref:`spack load <spack-load>` and :ref:`environments <environments>`.
-----------------------------
-Using module files via Spack
-----------------------------
+-----------
+Quick start
+-----------
-If you have installed a supported module system you should be able to
-run ``module avail`` to see what module
-files have been installed. Here is sample output of those programs,
-showing lots of installed packages:
+In the current version of Spack, module files are not generated by default. To get started, you
+can generate module files for all currently installed packages by running either
+
+.. code-block:: console
+
+ $ spack module tcl refresh
+
+or
+
+.. code-block:: console
+
+ $ spack module lmod refresh
+
+Spack can also generate module files for all future installations automatically through the
+following configuration:
+
+.. code-block:: console
+
+ $ spack config add modules:default:enable:[tcl]
+
+or
+
+.. code-block:: console
+
+ $ spack config add modules:default:enable:[lmod]
+
+Assuming you have a module system installed, you should now be able to use the ``module`` command
+to interact with them:
.. code-block:: console
@@ -65,33 +89,17 @@ scheme used at your site.
Module file customization
-------------------------
-Module files are generated by post-install hooks after the successful
-installation of a package.
-
-.. note::
-
- Spack only generates modulefiles when a package is installed. If
- you attempt to install a package and it is already installed, Spack
- will not regenerate modulefiles for the package. This may lead to
- inconsistent modulefiles if the Spack module configuration has
- changed since the package was installed, either by editing a file
- or changing scopes or environments.
-
- Later in this section there is a subsection on :ref:`regenerating
- modules <cmd-spack-module-refresh>` that will allow you to bring
- your modules to a consistent state.
-
The table below summarizes the essential information associated with
the different file formats that can be generated by Spack:
- +-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
- | | **Hook name** | **Default root directory** | **Default template file** | **Compatible tools** |
- +=============================+====================+===============================+==============================================+======================+
- | **Tcl - Non-Hierarchical** | ``tcl`` | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/Lmod |
- +-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
- | **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | share/spack/templates/modules/modulefile.lua | Lmod |
- +-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
+ +-----------+--------------+------------------------------+----------------------------------------------+----------------------+
+ | | Hierarchical | **Default root directory** | **Default template file** | **Compatible tools** |
+ +===========+==============+==============================+==============================================+======================+
+ | ``tcl`` | No | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/Lmod |
+ +-----------+--------------+------------------------------+----------------------------------------------+----------------------+
+ | ``lmod`` | Yes | share/spack/lmod | share/spack/templates/modules/modulefile.lua | Lmod |
+ +-----------+--------------+------------------------------+----------------------------------------------+----------------------+
Spack ships with sensible defaults for the generation of module files, but
@@ -102,7 +110,7 @@ In general you can override or extend the default behavior by:
2. writing specific rules in the ``modules.yaml`` configuration file
3. writing your own templates to override or extend the defaults
-The former method let you express changes in the run-time environment
+The former method lets you express changes in the run-time environment
that are needed to use the installed software properly, e.g. injecting variables
from language interpreters into their extensions. The latter two instead permit to
fine tune the filesystem layout, content and creation of module files to meet
@@ -110,79 +118,62 @@ site specific conventions.
.. _overide-api-calls-in-package-py:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Override API calls in ``package.py``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Setting environment variables dynamically in ``package.py``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-There are two methods that you can override in any ``package.py`` to affect the
-content of the module files generated by Spack. The first one:
+There are two methods that you can implement in any ``package.py`` to dynamically affect the
+content of the module files generated by Spack. The most important one is
+``setup_run_environment``, which can be used to set environment variables in the module file that
+depend on the spec:
.. code-block:: python
def setup_run_environment(self, env):
- pass
+ if self.spec.satisfies("+foo"):
+ env.set("FOO", "bar")
+
+The second, less commonly used, is ``setup_dependent_run_environment(self, env, dependent_spec)``,
+which allows a dependency to set variables in the module file of its dependents. This is typically
+used in packages like ``python``, ``r``, or ``perl`` to prepend the dependent's prefix to the
+search path of the interpreter (``PYTHONPATH``, ``R_LIBS``, ``PERL5LIB`` resp.), so it can locate
+the packages at runtime.
-can alter the content of the module file associated with the same package where it is overridden.
-The second method:
+For example, a simplified version of the ``python`` package could look like this:
.. code-block:: python
def setup_dependent_run_environment(self, env, dependent_spec):
- pass
+ if dependent_spec.package.extends(self.spec):
+ env.prepend_path("PYTHONPATH", dependent_spec.prefix.lib.python)
-can instead inject run-time environment modifications in the module files of packages
-that depend on it. In both cases you need to fill ``env`` with the desired
-list of environment modifications.
-
-.. admonition:: The ``r`` package and callback APIs
-
- An example in which it is crucial to override both methods
- is given by the ``r`` package. This package installs libraries and headers
- in non-standard locations and it is possible to prepend the appropriate directory
- to the corresponding environment variables:
-
- ================== =================================
- LD_LIBRARY_PATH ``self.prefix/rlib/R/lib``
- PKG_CONFIG_PATH ``self.prefix/rlib/pkgconfig``
- ================== =================================
-
- with the following snippet:
-
- .. literalinclude:: _spack_root/var/spack/repos/builtin/packages/r/package.py
- :pyobject: R.setup_run_environment
-
- The ``r`` package also knows which environment variable should be modified
- to make language extensions provided by other packages available, and modifies
- it appropriately in the override of the second method:
-
- .. literalinclude:: _spack_root/var/spack/repos/builtin/packages/r/package.py
- :pyobject: R.setup_dependent_run_environment
+and would make any package that ``extends("python")`` have its library directory added to the
+``PYTHONPATH`` environment variable in the module file. It's much more convenient to set this
+variable here, than to repeat it in every Python extension's ``setup_run_environment`` method.
.. _modules-yaml:
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-Write a configuration file
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The ``modules.yaml`` config file and module sets
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The configuration files that control module generation behavior
-are named ``modules.yaml``. The default configuration:
+The configuration files that control module generation behavior are named ``modules.yaml``. The
+default configuration looks like this:
.. literalinclude:: _spack_root/etc/spack/defaults/modules.yaml
:language: yaml
-activates the hooks to generate ``tcl`` module files and inspects
-the installation folder of each package for the presence of a set of subdirectories
-(``bin``, ``man``, ``share/man``, etc.). If any is found its full path is prepended
-to the environment variables listed below the folder name.
+You can define one or more **module sets**, each of which can be configured separately with regard
+to install location, naming scheme, inclusion and exclusion, autoloading, et cetera.
+
+The default module set is aptly named ``default``. All
+:ref:`Spack commands that operate on modules <maintaining-module-files>` apply to the ``default``
+module set, unless another module set is specified explicitly (with the ``--name`` flag).
-Spack modules can be configured for multiple module sets. The default
-module set is named ``default``. All Spack commands which operate on
-modules default to apply the ``default`` module set, but can be
-applied to any module set in the configuration.
-"""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^
Changing the modules root
-"""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^
As shown in the table above, the default module root for ``lmod`` is
``$spack/share/spack/lmod`` and the default root for ``tcl`` is
@@ -198,7 +189,7 @@ set by changing the ``roots`` key of the configuration.
my_custom_lmod_modules:
roots:
lmod: /path/to/install/custom/lmod/modules
- ...
+ # ...
This configuration will create two module sets. The default module set
will install its ``tcl`` modules to ``/path/to/install/tcl/modules``
@@ -224,25 +215,32 @@ location could be confusing to users of your modules. In the next
section, we will discuss enabling and disabling module types (module
file generators) for each module set.
-""""""""""""""""""""
-Activate other hooks
-""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Automatically generating module files
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Any other module file generator shipped with Spack can be activated adding it to the
-list under the ``enable`` key in the module file. Currently the only generator that
-is not active by default is ``lmod``, which produces hierarchical lua module files.
-
-Each module system can then be configured separately. In fact, you should list configuration
-options that affect a particular type of module files under a top level key corresponding
-to the generator being customized:
+Spack can be configured to automatically generate module files as part of package installation.
+This is done by adding the desired module systems to the ``enable`` list.
.. code-block:: yaml
modules:
default:
enable:
- - tcl
- - lmod
+ - tcl
+ - lmod
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Configuring ``tcl`` and ``lmod`` modules
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You can configure the behavior of either module system separately, under a key corresponding to
+the generator being customized:
+
+.. code-block:: yaml
+
+ modules:
+ default:
tcl:
# contains environment modules specific customizations
lmod:
@@ -253,16 +251,82 @@ either change the layout of the module files on the filesystem, or they will aff
their content. For the latter point it is possible to use anonymous specs
to fine tune the set of packages on which the modifications should be applied.
+.. _autoloading-dependencies:
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Autoloading and hiding dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A module file should set the variables that are needed for an application to work. But since an
+application often has many dependencies, where should all the environment variables for those be
+set? In Spack the rule is that each package sets the runtime variables that are needed by the
+package itself, and no more. This way, dependencies can be loaded standalone too, and duplication
+of environment variables is avoided.
+
+That means however that if you want to use an application, you need to load the modules for all its
+dependencies. Of course this is not something you would want users to do manually.
+
+Since Spack knows the dependency graph of every package, it can easily generate module files that
+automatically load the modules for its dependencies recursively. It is enabled by default for both
+Lmod and Environment Modules under the ``autoload: direct`` config option. The former system has
+builtin support through the ``depends_on`` function, the latter simply uses a ``module load``
+statement. Both module systems (at least in newer versions) do reference counting, so that if a
+module is loaded by two different modules, it will only be unloaded after the others are.
+
+The ``autoload`` key accepts the values:
+
+ * ``none``: no autoloading
+ * ``run``: autoload direct *run* type dependencies
+ * ``direct``: autoload direct *link and run* type dependencies
+ * ``all``: autoload all dependencies
+
+In case of ``run`` and ``direct``, a ``module load`` triggers a recursive load.
+
+The ``direct`` option is most correct: there are cases where pure link dependencies need to set
+variables for themselves, or need to have variables of their own dependencies set.
+
+In practice however, ``run`` is often sufficient, and may make ``module load`` snappier.
+
+The ``all`` option is discouraged and seldomly used.
+
+A common complaint about autoloading is the large number of modules that are visible to the user.
+Spack has a solution for this as well: ``hide_implicits: true``. This ensures that only those
+packages you've explicitly installed are exposed by ``module avail``, but still allows for
+autoloading of hidden dependencies. Lmod should support hiding implicits in general, while
+Environment Modules requires version 4.7 or higher.
+
+.. note::
+ If supported by your module system, we highly encourage the following configuration that enables
+ autoloading and hiding of implicits. It ensures all runtime variables are set correctly,
+ including those for dependencies, without overwhelming the user with a large number of available
+ modules. Further, it makes it easier to get readable module names without collisions, see the
+ section below on :ref:`modules-projections`.
+
+ .. code-block:: yaml
+
+ modules:
+ default:
+ tcl:
+ hide_implicits: true
+ all:
+ autoload: direct # or `run`
+ lmod:
+ hide_implicits: true
+ all:
+ autoload: direct # or `run`
+
.. _anonymous_specs:
-""""""""""""""""""""""""""""
-Selection by anonymous specs
-""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Setting environment variables for selected packages in config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the configuration file you can filter particular specs, and make further changes to the
+environment variables that go into their module files. This is very powerful when you want to avoid
+:ref:`modifying the package itself <overide-api-calls-in-package-py>`, or when you want to set
+certain variables on multiple selected packages at once.
-In the configuration file you can use *anonymous specs* (i.e. specs
-that **are not required to have a root package** and are thus used just
-to express constraints) to apply certain modifications on a selected set
-of the installed software. For instance, in the snippet below:
+For instance, in the snippet below:
.. code-block:: yaml
@@ -305,12 +369,28 @@ the variable ``FOOBAR`` will be unset.
.. note::
Order does matter
The modifications associated with the ``all`` keyword are always evaluated
- first, no matter where they appear in the configuration file. All the other
- spec constraints are instead evaluated top to bottom.
+ first, no matter where they appear in the configuration file. All the other changes to
+ environment variables for matching specs are evaluated from top to bottom.
+
+.. warning::
+
+ As general advice, it's often better to set as few unnecessary variables as possible. For
+ example, the following seemingly innocent and potentially useful configuration
+
+ .. code-block:: yaml
-""""""""""""""""""""""""""""""""""""""""""""
+ all:
+ environment:
+ set:
+ "{name}_ROOT": "{prefix}"
+
+ sets ``BINUTILS_ROOT`` to its prefix in modules for ``binutils``, which happens to break
+ the ``gcc`` compiler: it uses this variable as its default search path for certain object
+ files and libraries, and by merely setting it, everything fails to link.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exclude or include specific module files
-""""""""""""""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can use anonymous specs also to prevent module files from being written or
to force them to be written. Consider the case where you want to hide from users
@@ -330,14 +410,19 @@ you will prevent the generation of module files for any package that
is compiled with ``gcc@4.4.7``, with the only exception of any ``gcc``
or any ``llvm`` installation.
+It is safe to combine ``exclude`` and ``autoload``
+:ref:`mentioned above <autoloading-dependencies>`. When ``exclude`` prevents a module file to be
+generated for a dependency, the ``autoload`` feature will simply not generate a statement to load
+it.
+
.. _modules-projections:
-"""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Customize the naming of modules
-"""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The names of environment modules generated by spack are not always easy to
+The names of environment modules generated by Spack are not always easy to
fully comprehend due to the long hash in the name. There are three module
configuration options to help with that. The first is a global setting to
adjust the hash length. It can be set anywhere from 0 to 32 and has a default
@@ -353,6 +438,13 @@ shows how to set hash length in the module file names:
tcl:
hash_length: 7
+.. tip::
+
+ Using ``hide_implicits: true`` (see :ref:`autoloading-dependencies`) vastly reduces the number
+ modules exposed to the user. The hidden modules always contain the hash in their name, and are
+ not influenced by the ``hash_length`` setting. Hidden implicits thus make it easier to use a
+ short hash length or no hash at all, without risking name conflicts.
+
To help make module names more readable, and to help alleviate name conflicts
with a short hash, one can use the ``suffixes`` option in the modules
configuration file. This option will add strings to modules that match a spec.
@@ -365,12 +457,12 @@ For instance, the following config options,
tcl:
all:
suffixes:
- ^python@2.7.12: 'python-2.7.12'
+ ^python@3: 'python{^python.version}'
^openblas: 'openblas'
-will add a ``python-2.7.12`` version string to any packages compiled with
-python matching the spec, ``python@2.7.12``. This is useful to know which
-version of python a set of python extensions is associated with. Likewise, the
+will add a ``python-3.12.1`` version string to any packages compiled with
+Python matching the spec, ``python@3``. This is useful to know which
+version of Python a set of Python extensions is associated with. Likewise, the
``openblas`` string is attached to any program that has openblas in the spec,
most likely via the ``+blas`` variant specification.
@@ -468,41 +560,11 @@ that are already in the Lmod hierarchy.
For hierarchies that are deeper than three layers ``lmod spider`` may have some issues.
See `this discussion on the Lmod project <https://github.com/TACC/Lmod/issues/114>`_.
-""""""""""""""""""""""
-Select default modules
-""""""""""""""""""""""
-
-By default, when multiple modules of the same name share a directory,
-the highest version number will be the default module. This behavior
-of the ``module`` command can be overridden with a symlink named
-``default`` to the desired default module. If you wish to configure
-default modules with Spack, add a ``defaults`` key to your modules
-configuration:
-
-.. code-block:: yaml
-
- modules:
- my-module-set:
- tcl:
- defaults:
- - gcc@10.2.1
- - hdf5@1.2.10+mpi+hl%gcc
-
-These defaults may be arbitrarily specific. For any package that
-satisfies a default, Spack will generate the module file in the
-appropriate path, and will generate a default symlink to the module
-file as well.
-
-.. warning::
- If Spack is configured to generate multiple default packages in the
- same directory, the last modulefile to be generated will be the
- default module.
-
.. _customize-env-modifications:
-"""""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Customize environment modifications
-"""""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can control which prefixes in a Spack package are added to
environment variables with the ``prefix_inspections`` section; this
@@ -600,9 +662,9 @@ stack to users who are likely to inspect the modules to find full
paths to software, when it is desirable to present the users with a
simpler set of paths than those generated by the Spack install tree.
-""""""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Filter out environment modifications
-""""""""""""""""""""""""""""""""""""
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Modifications to certain environment variables in module files are there by
default, for instance because they are generated by prefix inspections.
@@ -622,49 +684,37 @@ do so by using the ``exclude_env_vars``:
The configuration above will generate module files that will not contain
modifications to either ``CPATH`` or ``LIBRARY_PATH``.
+^^^^^^^^^^^^^^^^^^^^^^
+Select default modules
+^^^^^^^^^^^^^^^^^^^^^^
-.. _autoloading-dependencies:
-
-"""""""""""""""""""""
-Autoload dependencies
-"""""""""""""""""""""
-
-Often it is required for a module to have its (transient) dependencies loaded as well.
-One example where this is useful is when one package needs to use executables provided
-by its dependency; when the dependency is autoloaded, the executable will be in the
-PATH. Similarly for scripting languages such as Python, packages and their dependencies
-have to be loaded together.
-
-Autoloading is enabled by default for Lmod and Environment Modules. The former
-has builtin support for through the ``depends_on`` function. The latter uses
-``module load`` statement to load and track dependencies.
-
-Autoloading can also be enabled conditionally:
+By default, when multiple modules of the same name share a directory,
+the highest version number will be the default module. This behavior
+of the ``module`` command can be overridden with a symlink named
+``default`` to the desired default module. If you wish to configure
+default modules with Spack, add a ``defaults`` key to your modules
+configuration:
.. code-block:: yaml
- modules:
- default:
- tcl:
- all:
- autoload: none
- ^python:
- autoload: direct
+ modules:
+ my-module-set:
+ tcl:
+ defaults:
+ - gcc@10.2.1
+ - hdf5@1.2.10+mpi+hl%gcc
-The configuration file above will produce module files that will
-load their direct dependencies if the package installed depends on ``python``.
-The allowed values for the ``autoload`` statement are either ``none``,
-``direct`` or ``all``.
+These defaults may be arbitrarily specific. For any package that
+satisfies a default, Spack will generate the module file in the
+appropriate path, and will generate a default symlink to the module
+file as well.
-.. note::
- Tcl prerequisites
- In the ``tcl`` section of the configuration file it is possible to use
- the ``prerequisites`` directive that accepts the same values as
- ``autoload``. It will produce module files that have a ``prereq``
- statement, which autoloads dependencies on Environment Modules when its
- ``auto_handling`` configuration option is enabled. If Environment Modules
- is installed with Spack, ``auto_handling`` is enabled by default starting
- version 4.2. Otherwise it is enabled by default since version 5.0.
+.. warning::
+ If Spack is configured to generate multiple default packages in the
+ same directory, the last modulefile to be generated will be the
+ default module.
+
+.. _maintaining-module-files:
------------------------
Maintaining Module Files
diff --git a/lib/spack/docs/packages_yaml.rst b/lib/spack/docs/packages_yaml.rst
index 13c38af985..ab839500f8 100644
--- a/lib/spack/docs/packages_yaml.rst
+++ b/lib/spack/docs/packages_yaml.rst
@@ -487,6 +487,56 @@ present. For instance with a configuration like:
you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Conflicts and strong preferences
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If the semantic of requirements is too strong, you can also express "strong preferences" and "conflicts"
+from configuration files:
+
+.. code-block:: yaml
+
+ packages:
+ all:
+ prefer:
+ - '%clang'
+ conflict:
+ - '+shared'
+
+The ``prefer`` and ``conflict`` sections can be used whenever a ``require`` section is allowed.
+The argument is always a list of constraints, and each constraint can be either a simple string,
+or a more complex object:
+
+.. code-block:: yaml
+
+ packages:
+ all:
+ conflict:
+ - spec: '%clang'
+ when: 'target=x86_64_v3'
+ message: 'reason why clang cannot be used'
+
+The ``spec`` attribute is mandatory, while both ``when`` and ``message`` are optional.
+
+.. note::
+
+ Requirements allow for expressing both "strong preferences" and "conflicts".
+ The syntax for doing so, though, may not be immediately clear. For
+ instance, if we want to prevent any package from using ``%clang``, we can set:
+
+ .. code-block:: yaml
+
+ packages:
+ all:
+ require:
+ - one_of: ['%clang', '@:']
+
+ Since only one of the requirements must hold, and ``@:`` is always true, the rule above is
+ equivalent to a conflict. For "strong preferences" we need to substitute the ``one_of`` policy
+ with ``any_of``.
+
+
+
.. _package-preferences:
-------------------
@@ -597,6 +647,8 @@ manually placed files within the install prefix are owned by the
assigned group. If no group is assigned, Spack will allow the OS
default behavior to go as expected.
+.. _assigning-package-attributes:
+
----------------------------
Assigning Package Attributes
----------------------------
@@ -607,10 +659,11 @@ You can assign class-level attributes in the configuration:
packages:
mpileaks:
- # Override existing attributes
- url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz
- # ... or add new ones
- x: 1
+ package_attributes:
+ # Override existing attributes
+ url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz
+ # ... or add new ones
+ x: 1
Attributes set this way will be accessible to any method executed
in the package.py file (e.g. the ``install()`` method). Values for these
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 585276739c..a7564c2b03 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -893,26 +893,50 @@ as an option to the ``version()`` directive. Example situations would be a
"snapshot"-like Version Control System (VCS) tag, a VCS branch such as
``v6-16-00-patches``, or a URL specifying a regularly updated snapshot tarball.
+
+.. _version-comparison:
+
^^^^^^^^^^^^^^^^^^
Version comparison
^^^^^^^^^^^^^^^^^^
-Most Spack versions are numeric, a tuple of integers; for example,
-``0.1``, ``6.96`` or ``1.2.3.1``. Spack knows how to compare and sort
-numeric versions.
-
-Some Spack versions involve slight extensions of numeric syntax; for
-example, ``py-sphinx-rtd-theme@=0.1.10a0``. In this case, numbers are
-always considered to be "newer" than letters. This is for consistency
-with `RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_.
+Spack imposes a generic total ordering on the set of versions,
+independently from the package they are associated with.
-Spack versions may also be arbitrary non-numeric strings, for example
-``develop``, ``master``, ``local``.
-
-The order on versions is defined as follows. A version string is split
-into a list of components based on delimiters such as ``.``, ``-`` etc.
-Lists are then ordered lexicographically, where components are ordered
-as follows:
+Most Spack versions are numeric, a tuple of integers; for example,
+``0.1``, ``6.96`` or ``1.2.3.1``. In this very basic case, version
+comparison is lexicographical on the numeric components:
+``1.2 < 1.2.1 < 1.2.2 < 1.10``.
+
+Spack can also supports string components such as ``1.1.1a`` and
+``1.y.0``. String components are considered less than numeric
+components, so ``1.y.0 < 1.0``. This is for consistency with
+`RPM <https://bugzilla.redhat.com/show_bug.cgi?id=50977>`_. String
+components do not have to be separated by dots or any other delimiter.
+So, the contrived version ``1y0`` is identical to ``1.y.0``.
+
+Pre-release suffixes also contain string parts, but they are handled
+in a special way. For example ``1.2.3alpha1`` is parsed as a pre-release
+of the version ``1.2.3``. This allows Spack to order it before the
+actual release: ``1.2.3alpha1 < 1.2.3``. Spack supports alpha, beta and
+release candidate suffixes: ``1.2alpha1 < 1.2beta1 < 1.2rc1 < 1.2``. Any
+suffix not recognized as a pre-release is treated as an ordinary
+string component, so ``1.2 < 1.2-mysuffix``.
+
+Finally, there are a few special string components that are considered
+"infinity versions". They include ``develop``, ``main``, ``master``,
+``head``, ``trunk``, and ``stable``. For example: ``1.2 < develop``.
+These are useful for specifying the most recent development version of
+a package (often a moving target like a git branch), without assigning
+a specific version number. Infinity versions are not automatically used when determining the latest version of a package unless explicitly required by another package or user.
+
+More formally, the order on versions is defined as follows. A version
+string is split into a list of components based on delimiters such as
+``.`` and ``-`` and string boundaries. The components are split into
+the **release** and a possible **pre-release** (if the last component
+is numeric and the second to last is a string ``alpha``, ``beta`` or ``rc``).
+The release components are ordered lexicographically, with comparsion
+between different types of components as follows:
#. The following special strings are considered larger than any other
numeric or non-numeric version component, and satisfy the following
@@ -925,6 +949,9 @@ as follows:
#. All other non-numeric components are less than numeric components,
and are ordered alphabetically.
+Finally, if the release components are equal, the pre-release components
+are used to break the tie, in the obvious way.
+
The logic behind this sort order is two-fold:
#. Non-numeric versions are usually used for special cases while
@@ -1236,6 +1263,11 @@ Git fetching supports the following parameters to ``version``:
option ``--depth 1`` will be used if the version of git and the specified
transport protocol support it, and ``--single-branch`` will be used if the
version of git supports it.
+* ``git_sparse_paths``: Use ``sparse-checkout`` to only clone these relative paths.
+ This feature requires ``git`` to be version ``2.25.0`` or later but is useful for
+ large repositories that have separate portions that can be built independently.
+ If paths provided are directories then all the subdirectories and associated files
+ will also be cloned.
Only one of ``tag``, ``branch``, or ``commit`` can be used at a time.
@@ -1334,6 +1366,41 @@ Submodules
For more information about git submodules see the manpage of git: ``man
git-submodule``.
+Sparse-Checkout
+ You can supply ``git_sparse_paths`` at the package or version level to utilize git's
+ sparse-checkout feature. This will only clone the paths that are specified in the
+ ``git_sparse_paths`` attribute for the package along with the files in the top level directory.
+ This feature allows you to only clone what you need from a large repository.
+ Note that this is a newer feature in git and requries git ``2.25.0`` or greater.
+ If ``git_sparse_paths`` is supplied and the git version is too old
+ then a warning will be issued and that package will use the standard cloning operations instead.
+ ``git_sparse_paths`` should be supplied as a list of paths, a callable function for versions,
+ or a more complex package attribute using the ``@property`` decorator. The return value should be
+ a list for a callable implementation of ``git_sparse_paths``.
+
+ .. code-block:: python
+
+ def sparse_path_function(package)
+ """a callable function that can be used in side a version"""
+ # paths can be directories or functions, all subdirectories and files are included
+ paths = ["doe", "rae", "me/file.cpp"]
+ if package.spec.version > Version("1.2.0"):
+ paths.extend(["fae"])
+ return paths
+
+ class MyPackage(package):
+ # can also be a package attribute that will be used if not specified in versions
+ git_sparse_paths = ["doe", "rae"]
+
+ # use the package attribute
+ version("1.0.0")
+ version("1.1.0")
+ # use the function
+ version("1.1.5", git_sparse_paths=sparse_path_func)
+ version("1.2.0", git_sparse_paths=sparse_path_func)
+ version("1.2.5", git_sparse_paths=sparse_path_func)
+ version("1.1.5", git_sparse_paths=sparse_path_func)
+
.. _github-fetch:
^^^^^^
@@ -1861,71 +1928,29 @@ to the empty list.
String. A URL pointing to license setup instructions for the software.
Defaults to the empty string.
-For example, let's take a look at the package for the PGI compilers.
+For example, let's take a look at the Arm Forge package.
.. code-block:: python
# Licensing
license_required = True
- license_comment = "#"
- license_files = ["license.dat"]
- license_vars = ["PGROUPD_LICENSE_FILE", "LM_LICENSE_FILE"]
- license_url = "http://www.pgroup.com/doc/pgiinstall.pdf"
-
-As you can see, PGI requires a license. Its license manager, FlexNet, uses
-the ``#`` symbol to denote a comment. It expects the license file to be
-named ``license.dat`` and to be located directly in the installation prefix.
-If you would like the installation file to be located elsewhere, simply set
-``PGROUPD_LICENSE_FILE`` or ``LM_LICENSE_FILE`` after installation. For
-further instructions on installation and licensing, see the URL provided.
-
-Let's walk through a sample PGI installation to see exactly what Spack is
-and isn't capable of. Since PGI does not provide a download URL, it must
-be downloaded manually. It can either be added to a mirror or located in
-the current directory when ``spack install pgi`` is run. See :ref:`mirrors`
-for instructions on setting up a mirror.
-
-After running ``spack install pgi``, the first thing that will happen is
-Spack will create a global license file located at
-``$SPACK_ROOT/etc/spack/licenses/pgi/license.dat``. It will then open up the
-file using :ref:`your favorite editor <controlling-the-editor>`. It will look like
-this:
-
-.. code-block:: sh
-
- # A license is required to use pgi.
- #
- # The recommended solution is to store your license key in this global
- # license file. After installation, the following symlink(s) will be
- # added to point to this file (relative to the installation prefix):
- #
- # license.dat
- #
- # Alternatively, use one of the following environment variable(s):
- #
- # PGROUPD_LICENSE_FILE
- # LM_LICENSE_FILE
- #
- # If you choose to store your license in a non-standard location, you may
- # set one of these variable(s) to the full pathname to the license file, or
- # port@host if you store your license keys on a dedicated license server.
- # You will likely want to set this variable in a module file so that it
- # gets loaded every time someone tries to use pgi.
- #
- # For further information on how to acquire a license, please refer to:
- #
- # http://www.pgroup.com/doc/pgiinstall.pdf
- #
- # You may enter your license below.
-
-You can add your license directly to this file, or tell FlexNet to use a
-license stored on a separate license server. Here is an example that
-points to a license server called licman1:
+ license_comment = "#"
+ license_files = ["licences/Licence"]
+ license_vars = [
+ "ALLINEA_LICENSE_DIR",
+ "ALLINEA_LICENCE_DIR",
+ "ALLINEA_LICENSE_FILE",
+ "ALLINEA_LICENCE_FILE",
+ ]
+ license_url = "https://developer.arm.com/documentation/101169/latest/Use-Arm-Licence-Server"
-.. code-block:: none
+Arm Forge requires a license. Its license manager uses the ``#`` symbol to denote a comment.
+It expects the license file to be named ``License`` and to be located in a ``licenses`` directory
+in the installation prefix.
- SERVER licman1.mcs.anl.gov 00163eb7fba5 27200
- USE_SERVER
+If you would like the installation file to be located elsewhere, simply set ``ALLINEA_LICENSE_DIR`` or
+one of the other license variables after installation. For further instructions on installation and
+licensing, see the URL provided.
If your package requires the license to install, you can reference the
location of this global license using ``self.global_license_file``.
@@ -2317,6 +2342,27 @@ you set ``parallel`` to ``False`` at the package level, then each call
to ``make()`` will be sequential by default, but packagers can call
``make(parallel=True)`` to override it.
+Note that the ``--jobs`` option works out of the box for all standard
+build systems. If you are using a non-standard build system instead, you
+can use the variable ``make_jobs`` to extract the number of jobs specified
+by the ``--jobs`` option:
+
+.. code-block:: python
+ :emphasize-lines: 7, 11
+ :linenos:
+
+ class Xios(Package):
+ ...
+ def install(self, spec, prefix):
+ ...
+ options = [
+ ...
+ '--jobs', str(make_jobs),
+ ]
+ ...
+ make_xios = Executable("./make_xios")
+ make_xios(*options)
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Install-level build parallelism
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -2415,15 +2461,14 @@ with. For example, suppose that in the ``libdwarf`` package you write:
depends_on("libelf@0.8")
-Now ``libdwarf`` will require ``libelf`` at *exactly* version ``0.8``.
-You can also specify a requirement for a particular variant or for
-specific compiler flags:
+Now ``libdwarf`` will require ``libelf`` in the range ``0.8``, which
+includes patch versions ``0.8.1``, ``0.8.2``, etc. Apart from version
+restrictions, you can also specify variants if this package requires
+optional features of the dependency.
.. code-block:: python
- depends_on("libelf@0.8+debug")
- depends_on("libelf debug=True")
- depends_on("libelf cppflags='-fPIC'")
+ depends_on("libelf@0.8 +parser +pic")
Both users *and* package authors can use the same spec syntax to refer
to different package configurations. Users use the spec syntax on the
@@ -2431,46 +2476,82 @@ command line to find installed packages or to install packages with
particular constraints, and package authors can use specs to describe
relationships between packages.
-^^^^^^^^^^^^^^
-Version ranges
-^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Specifying backward and forward compatibility
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Packages are often compatible with a range of versions of their
+dependencies. This is typically referred to as backward and forward
+compatibility. Spack allows you to specify this in the ``depends_on``
+directive using version ranges.
-Although some packages require a specific version for their dependencies,
-most can be built with a range of versions. For example, if you are
-writing a package for a legacy Python module that only works with Python
-2.4 through 2.6, this would look like:
+**Backwards compatibility** means that the package requires at least a
+certain version of its dependency:
.. code-block:: python
- depends_on("python@2.4:2.6")
+ depends_on("python@3.10:")
-Version ranges in Spack are *inclusive*, so ``2.4:2.6`` means any version
-greater than or equal to ``2.4`` and up to and including any ``2.6.x``. If
-you want to specify that a package works with any version of Python 3 (or
-higher), this would look like:
+In this case, the package requires Python 3.10 or newer.
+
+Commonly, packages drop support for older versions of a dependency as
+they release new versions. In Spack you can conveniently add every
+backward compatibility rule as a separate line:
.. code-block:: python
- depends_on("python@3:")
+ # backward compatibility with Python
+ depends_on("python@3.8:")
+ depends_on("python@3.9:", when="@1.2:")
+ depends_on("python@3.10:", when="@1.4:")
+
+This means that in general we need Python 3.8 or newer; from version
+1.2 onwards we need Python 3.9 or newer; from version 1.4 onwards we
+need Python 3.10 or newer. Notice that it's fine to have overlapping
+ranges in the ``when`` clauses.
-Here we leave out the upper bound. If you want to say that a package
-requires Python 2, you can similarly leave out the lower bound:
+**Forward compatibility** means that the package requires at most a
+certain version of its dependency. Forward compatibility rules are
+necessary when there are breaking changes in the dependency that the
+package cannot handle. In Spack we often add forward compatibility
+bounds only at the time a new, breaking version of a dependency is
+released. As with backward compatibility, it is typical to see a list
+of forward compatibility bounds in a package file as seperate lines:
.. code-block:: python
- depends_on("python@:2")
+ # forward compatibility with Python
+ depends_on("python@:3.12", when="@:1.10")
+ depends_on("python@:3.13", when="@:1.12")
+
+Notice how the ``:`` now appears before the version number both in the
+dependency and in the ``when`` clause. This tells Spack that in general
+we need Python 3.13 or older up to version ``1.12.x``, and up to version
+``1.10.x`` we need Python 3.12 or older. Said differently, forward compatibility
+with Python 3.13 was added in version 1.11, while version 1.13 added forward
+compatibility with Python 3.14.
-Notice that we didn't use ``@:3``. Version ranges are *inclusive*, so
-``@:3`` means "up to and including any 3.x version".
+Notice that a version range ``@:3.12`` includes *any* patch version
+number ``3.12.x``, which is often useful when specifying forward compatibility
+bounds.
-You can also simply write
+So far we have seen open-ended version ranges, which is by far the most
+common use case. It is also possible to specify both a lower and an upper bound
+on the version of a dependency, like this:
.. code-block:: python
- depends_on("python@2.7")
+ depends_on("python@3.10:3.12")
-to tell Spack that the package needs Python 2.7.x. This is equivalent to
-``@2.7:2.7``.
+There is short syntax to specify that a package is compatible with say any
+``3.x`` version:
+
+.. code-block:: python
+
+ depends_on("python@3")
+
+The above is equivalent to ``depends_on("python@3:3")``, which means at least
+Python version 3 and at most any version ``3.x.y``.
In very rare cases, you may need to specify an exact version, for example
if you need to distinguish between ``3.2`` and ``3.2.1``:
@@ -2844,9 +2925,9 @@ make sense during the build phase may not be needed at runtime, and vice versa.
it makes sense to let a dependency set the environment variables for its dependents. To allow all
this, Spack provides four different methods that can be overridden in a package:
-1. :meth:`setup_build_environment <spack.builder.Builder.setup_build_environment>`
+1. :meth:`setup_build_environment <spack.builder.BaseBuilder.setup_build_environment>`
2. :meth:`setup_run_environment <spack.package_base.PackageBase.setup_run_environment>`
-3. :meth:`setup_dependent_build_environment <spack.builder.Builder.setup_dependent_build_environment>`
+3. :meth:`setup_dependent_build_environment <spack.builder.BaseBuilder.setup_dependent_build_environment>`
4. :meth:`setup_dependent_run_environment <spack.package_base.PackageBase.setup_dependent_run_environment>`
The Qt package, for instance, uses this call:
@@ -4379,10 +4460,16 @@ implementation was selected for this build:
elif "mvapich" in spec:
configure_args.append("--with-mvapich")
-It's also a bit more concise than satisfies. The difference between
-the two functions is that ``satisfies()`` tests whether spec
-constraints overlap at all, while ``in`` tests whether a spec or any
-of its dependencies satisfy the provided spec.
+It's also a bit more concise than satisfies.
+
+.. note::
+
+ The ``satisfies()`` method tests whether this spec has, at least, all the constraints of the argument spec,
+ while ``in`` tests whether a spec or any of its dependencies satisfy the provided spec.
+
+ If the provided spec is anonymous (e.g., ":1.2:", "+shared") or has the
+ same name as the spec being checked, then ``in`` works the same as
+ ``satisfies()``; however, use of ``satisfies()`` is more intuitive.
^^^^^^^^^^^^^^^^^^^^^^^
Architecture specifiers
@@ -5140,12 +5227,6 @@ installed executable. The check is implemented as follows:
reframe = Executable(self.prefix.bin.reframe)
reframe("-l")
-.. warning::
-
- The API for adding tests is not yet considered stable and may change
- in future releases.
-
-
""""""""""""""""""""""""""""""""
Checking build-time test results
""""""""""""""""""""""""""""""""
@@ -5183,38 +5264,42 @@ be left in the build stage directory as illustrated below:
Stand-alone tests
^^^^^^^^^^^^^^^^^
-While build-time tests are integrated with the build process, stand-alone
+While build-time tests are integrated with the installation process, stand-alone
tests are expected to run days, weeks, even months after the software is
installed. The goal is to provide a mechanism for gaining confidence that
packages work as installed **and** *continue* to work as the underlying
software evolves. Packages can add and inherit stand-alone tests. The
-`spack test`` command is used to manage stand-alone testing.
+``spack test`` command is used for stand-alone testing.
-.. note::
+.. admonition:: Stand-alone test methods should complete within a few minutes.
Execution speed is important since these tests are intended to quickly
- assess whether installed specs work on the system. Consequently, they
- should run relatively quickly -- as in on the order of at most a few
- minutes -- while ideally executing all, or at least key aspects of the
- installed software.
-
-.. note::
+ assess whether installed specs work on the system. Spack cannot spare
+ resources for more extensive testing of packages included in CI stacks.
- Failing stand-alone tests indicate problems with the installation and,
- therefore, there is no reason to proceed with more resource-intensive
- tests until those have been investigated.
-
- Passing stand-alone tests indicate that more thorough testing, such
- as running extensive unit or regression tests, or tests that run at
- scale can proceed without wasting resources on a problematic installation.
+ Consequently, stand-alone tests should run relatively quickly -- as in
+ on the order of at most a few minutes -- while testing at least key aspects
+ of the installed software. Save more extensive testing for other tools.
Tests are defined in the package using methods with names beginning ``test_``.
This allows Spack to support multiple independent checks, or parts. Files
needed for testing, such as source, data, and expected outputs, may be saved
from the build and or stored with the package in the repository. Regardless
of origin, these files are automatically copied to the spec's test stage
-directory prior to execution of the test method(s). Spack also provides some
-helper functions to facilitate processing.
+directory prior to execution of the test method(s). Spack also provides helper
+functions to facilitate common processing.
+
+.. tip::
+
+ **The status of stand-alone tests can be used to guide follow-up testing efforts.**
+
+ Passing stand-alone tests justify performing more thorough testing, such
+ as running extensive unit or regression tests or tests that run at scale,
+ when available. These tests are outside of the scope of Spack packaging.
+
+ Failing stand-alone tests indicate problems with the installation and,
+ therefore, no reason to proceed with more resource-intensive tests until
+ the failures have been investigated.
.. _configure-test-stage:
@@ -5222,30 +5307,26 @@ helper functions to facilitate processing.
Configuring the test stage directory
""""""""""""""""""""""""""""""""""""
-Stand-alone tests utilize a test stage directory for building, running,
-and tracking results in the same way Spack uses a build stage directory.
-The default test stage root directory, ``~/.spack/test``, is defined in
-:ref:`etc/spack/defaults/config.yaml <config-yaml>`. This location is
-customizable by adding or changing the ``test_stage`` path in the high-level
-``config`` of the appropriate ``config.yaml`` file such that:
+Stand-alone tests utilize a test stage directory to build, run, and track
+tests in the same way Spack uses a build stage directory to install software.
+The default test stage root directory, ``$HOME/.spack/test``, is defined in
+:ref:`config.yaml <config-yaml>`. This location is customizable by adding or
+changing the ``test_stage`` path such that:
.. code-block:: yaml
config:
test_stage: /path/to/test/stage
-Packages can use the ``self.test_suite.stage`` property to access this setting.
-Other package properties that provide access to spec-specific subdirectories
-and files are described in :ref:`accessing staged files <accessing-files>`.
+Packages can use the ``self.test_suite.stage`` property to access the path.
-.. note::
+.. admonition:: Each spec being tested has its own test stage directory.
- The test stage path is the root directory for the **entire suite**.
- In other words, it is the root directory for **all specs** being
- tested by the ``spack test run`` command. Each spec gets its own
- stage subdirectory. Use ``self.test_suite.test_dir_for_spec(self.spec)``
- to access the spec-specific test stage directory.
+ The ``config:test_stage`` option is the path to the root of a
+ **test suite**'s stage directories.
+ Other package properties that provide paths to spec-specific subdirectories
+ and files are described in :ref:`accessing-files`.
.. _adding-standalone-tests:
@@ -5258,61 +5339,144 @@ Test recipes are defined in the package using methods with names beginning
Each method has access to the information Spack tracks on the package, such
as options, compilers, and dependencies, supporting the customization of tests
to the build. Standard python ``assert`` statements and other error reporting
-mechanisms are available. Such exceptions are automatically caught and reported
+mechanisms can be used. These exceptions are automatically caught and reported
as test failures.
-Each test method is an implicit test part named by the method and whose
-purpose is the method's docstring. Providing a purpose gives context for
-aiding debugging. A test method may contain embedded test parts. Spack
-outputs the test name and purpose prior to running each test method and
-any embedded test parts. For example, ``MyPackage`` below provides two basic
-examples of installation tests: ``test_always_fails`` and ``test_example``.
-As the name indicates, the first always fails. The second simply runs the
-installed example.
+Each test method is an *implicit test part* named by the method. Its purpose
+is the method's docstring. Providing a meaningful purpose for the test gives
+context that can aid debugging. Spack outputs both the name and purpose at the
+start of test execution so it's also important that the docstring/purpose be
+brief.
+
+.. tip::
+
+ We recommend naming test methods so it is clear *what* is being tested.
+ For example, if a test method is building and or running an executable
+ called ``example``, then call the method ``test_example``. This, together
+ with a similarly meaningful test purpose, will aid test comprehension,
+ debugging, and maintainability.
+
+Stand-alone tests run in an environment that provides access to information
+on the installed software, such as build options, dependencies, and compilers.
+Build options and dependencies are accessed using the same spec checks used
+by build recipes. Examples of checking :ref:`variant settings <variants>` and
+:ref:`spec constraints <testing-specs>` can be found at the provided links.
+
+.. admonition:: Spack automatically sets up the test stage directory and environment.
+
+ Spack automatically creates the test stage directory and copies
+ relevant files *prior to* running tests. It can also ensure build
+ dependencies are available **if** necessary.
+
+ The path to the test stage is configurable (see :ref:`configure-test-stage`).
+
+ Files that Spack knows to copy are those saved from the build (see
+ :ref:`cache_extra_test_sources`) and those added to the package repository
+ (see :ref:`cache_custom_files`).
+
+ Spack will use the value of the ``test_requires_compiler`` property to
+ determine whether it needs to also set up build dependencies (see
+ :ref:`test-build-tests`).
+
+The ``MyPackage`` package below provides two basic test examples:
+``test_example`` and ``test_example2``. The first runs the installed
+``example`` and ensures its output contains an expected string. The second
+runs ``example2`` without checking output so is only concerned with confirming
+the executable runs successfully. If the installed spec is not expected to have
+``example2``, then the check at the top of the method will raise a special
+``SkipTest`` exception, which is captured to facilitate reporting skipped test
+parts to tools like CDash.
.. code-block:: python
class MyPackage(Package):
...
- def test_always_fails(self):
- """use assert to always fail"""
- assert False
-
def test_example(self):
- """run installed example"""
+ """ensure installed example works"""
+ expected = "Done."
example = which(self.prefix.bin.example)
- example()
+
+ # Capture stdout and stderr from running the Executable
+ # and check that the expected output was produced.
+ out = example(output=str.split, error=str.split)
+ assert expected in out, f"Expected '{expected}' in the output"
+
+ def test_example2(self):
+ """run installed example2"""
+ if self.spec.satisfies("@:1.0"):
+ # Raise SkipTest to ensure flagging the test as skipped for
+ # test reporting purposes.
+ raise SkipTest("Test is only available for v1.1 on")
+
+ example2 = which(self.prefix.bin.example2)
+ example2()
Output showing the identification of each test part after running the tests
is illustrated below.
.. code-block:: console
- $ spack test run --alias mypackage mypackage@1.0
+ $ spack test run --alias mypackage mypackage@2.0
==> Spack test mypackage
...
$ spack test results -l mypackage
==> Results for test suite 'mypackage':
...
- ==> [2023-03-10-16:03:56.625204] test: test_always_fails: use assert to always fail
+ ==> [2024-03-10-16:03:56.625439] test: test_example: ensure installed example works
...
- FAILED
- ==> [2023-03-10-16:03:56.625439] test: test_example: run installed example
+ PASSED: MyPackage::test_example
+ ==> [2024-03-10-16:03:56.625439] test: test_example2: run installed example2
...
- PASSED
+ PASSED: MyPackage::test_example2
+.. admonition:: Do NOT implement tests that must run in the installation prefix.
-.. note::
+ Use of the package spec's installation prefix for building and running
+ tests is **strongly discouraged**. Doing so causes permission errors for
+ shared spack instances *and* facilities that install the software in
+ read-only file systems or directories.
+
+ Instead, start these test methods by explicitly copying the needed files
+ from the installation prefix to the test stage directory. Note the test
+ stage directory is the current directory when the test is executed with
+ the ``spack test run`` command.
+
+.. admonition:: Test methods for library packages should build test executables.
+
+ Stand-alone tests for library packages *should* build test executables
+ that utilize the *installed* library. Doing so ensures the tests follow
+ a similar build process that users of the library would follow.
+
+ For more information on how to do this, see :ref:`test-build-tests`.
+
+.. tip::
+
+ If you want to see more examples from packages with stand-alone tests, run
+ ``spack pkg grep "def\stest" | sed "s/\/package.py.*//g" | sort -u``
+ from the command line to get a list of the packages.
+
+.. _adding-standalone-test-parts:
+
+"""""""""""""""""""""""""""""
+Adding stand-alone test parts
+"""""""""""""""""""""""""""""
+
+Sometimes dependencies between steps of a test lend themselves to being
+broken into parts. Tracking the pass/fail status of each part may aid
+debugging. Spack provides a ``test_part`` context manager for use within
+test methods.
- If ``MyPackage`` were a recipe for a library, the tests should build
- an example or test program that is then executed.
+Each test part is independently run, tracked, and reported. Test parts are
+executed in the order they appear. If one fails, subsequent test parts are
+still performed even if they would also fail. This allows tools like CDash
+to track and report the status of test parts across runs. The pass/fail status
+of the enclosing test is derived from the statuses of the embedded test parts.
-A test method can include test parts using the ``test_part`` context manager.
-Each part is treated as an independent check to allow subsequent test parts
-to execute even after a test part fails.
+.. admonition:: Test method and test part names **must** be unique.
-.. _test-part:
+ Test results reporting requires that test methods and embedded test parts
+ within a package have unique names.
The signature for ``test_part`` is:
@@ -5334,40 +5498,68 @@ where each argument has the following meaning:
* ``work_dir`` is the path to the directory in which the test will run.
The default of ``None``, or ``"."``, corresponds to the the spec's test
- stage (i.e., ``self.test_suite.test_dir_for_spec(self.spec)``.
+ stage (i.e., ``self.test_suite.test_dir_for_spec(self.spec)``).
-.. admonition:: Tests should **not** run under the installation directory.
+.. admonition:: Start test part names with the name of the enclosing test.
- Use of the package spec's installation directory for building and running
- tests is **strongly** discouraged. Doing so causes permission errors for
- shared spack instances *and* facilities that install the software in
- read-only file systems or directories.
+ We **highly recommend** starting the names of test parts with the name
+ of the enclosing test. Doing so helps with the comprehension, readability
+ and debugging of test results.
-Suppose ``MyPackage`` actually installs two examples we want to use for tests.
-These checks can be implemented as separate checks or, as illustrated below,
-embedded test parts.
+Suppose ``MyPackage`` installs multiple executables that need to run in a
+specific order since the outputs from one are inputs of others. Further suppose
+we want to add an integration test that runs the executables in order. We can
+accomplish this goal by implementing a stand-alone test method consisting of
+test parts for each executable as follows:
.. code-block:: python
class MyPackage(Package):
...
- def test_example(self):
- """run installed examples"""
- for example in ["ex1", "ex2"]:
- with test_part(
- self,
- f"test_example_{example}",
- purpose=f"run installed {example}",
- ):
- exe = which(join_path(self.prefix.bin, example))
- exe()
-
-In this case, there will be an implicit test part for ``test_example``
-and separate sub-parts for ``ex1`` and ``ex2``. The second sub-part
-will be executed regardless of whether the first passes. The test
-log for a run where the first executable fails and the second passes
-is illustrated below.
+ def test_series(self):
+ """run setup, perform, and report"""
+
+ with test_part(self, "test_series_setup", purpose="setup operation"):
+ exe = which(self.prefix.bin.setup))
+ exe()
+
+ with test_part(self, "test_series_run", purpose="perform operation"):
+ exe = which(self.prefix.bin.run))
+ exe()
+
+ with test_part(self, "test_series_report", purpose="generate report"):
+ exe = which(self.prefix.bin.report))
+ exe()
+
+The result is ``test_series`` runs the following executable in order: ``setup``,
+``run``, and ``report``. In this case no options are passed to any of the
+executables and no outputs from running them are checked. Consequently, the
+implementation could be simplified with a for-loop as follows:
+
+.. code-block:: python
+
+ class MyPackage(Package):
+ ...
+
+ def test_series(self):
+ """execute series setup, run, and report"""
+
+ for exe, reason in [
+ ("setup", "setup operation"),
+ ("run", "perform operation"),
+ ("report", "generate report")
+ ]:
+ with test_part(self, f"test_series_{exe}", purpose=reason):
+ exe = which(self.prefix.bin.join(exe))
+ exe()
+
+In both cases, since we're using a context manager, each test part in
+``test_series`` will execute regardless of the status of the other test
+parts.
+
+Now let's look at the output from running the stand-alone tests where
+the second test part, ``test_series_run``, fails.
.. code-block:: console
@@ -5377,50 +5569,68 @@ is illustrated below.
$ spack test results -l mypackage
==> Results for test suite 'mypackage':
...
- ==> [2023-03-10-16:03:56.625204] test: test_example: run installed examples
- ==> [2023-03-10-16:03:56.625439] test: test_example_ex1: run installed ex1
+ ==> [2024-03-10-16:03:56.625204] test: test_series: execute series setup, run, and report
+ ==> [2024-03-10-16:03:56.625439] test: test_series_setup: setup operation
+ ...
+ PASSED: MyPackage::test_series_setup
+ ==> [2024-03-10-16:03:56.625555] test: test_series_run: perform operation
...
- FAILED
- ==> [2023-03-10-16:03:56.625555] test: test_example_ex2: run installed ex2
+ FAILED: MyPackage::test_series_run
+ ==> [2024-03-10-16:03:57.003456] test: test_series_report: generate report
...
- PASSED
+ FAILED: MyPackage::test_series_report
+ FAILED: MyPackage::test_series
...
-.. warning::
+Since test parts depended on the success of previous parts, we see that the
+failure of one results in the failure of subsequent checks and the overall
+result of the test method, ``test_series``, is failure.
- Test results reporting requires that each test method and embedded
- test part for a package have a unique name.
+.. tip::
-Stand-alone tests run in an environment that provides access to information
-Spack has on how the software was built, such as build options, dependencies,
-and compilers. Build options and dependencies are accessed with the normal
-spec checks. Examples of checking :ref:`variant settings <variants>` and
-:ref:`spec constraints <testing-specs>` can be found at the provided links.
-Accessing compilers in stand-alone tests that are used by the build requires
-setting a package property as described :ref:`below <test-compilation>`.
+ If you want to see more examples from packages using ``test_part``, run
+ ``spack pkg grep "test_part(" | sed "s/\/package.py.*//g" | sort -u``
+ from the command line to get a list of the packages.
+
+.. _test-build-tests:
+
+"""""""""""""""""""""""""""""""""""""
+Building and running test executables
+"""""""""""""""""""""""""""""""""""""
+.. admonition:: Re-use build-time sources and (small) input data sets when possible.
-.. _test-compilation:
+ We **highly recommend** re-using build-time test sources and pared down
+ input files for testing installed software. These files are easier
+ to keep synchronized with software capabilities when they reside
+ within the software's repository. More information on saving files from
+ the installation process can be found at :ref:`cache_extra_test_sources`.
-"""""""""""""""""""""""""
-Enabling test compilation
-"""""""""""""""""""""""""
+ If that is not possible, you can add test-related files to the package
+ repository (see :ref:`cache_custom_files`). It will be important to
+ remember to maintain them so they work across listed or supported versions
+ of the package.
-If you want to build and run binaries in tests, then you'll need to tell
-Spack to load the package's compiler configuration. This is accomplished
-by setting the package's ``test_requires_compiler`` property to ``True``.
+Packages that build libraries are good examples of cases where you'll want
+to build test executables from the installed software before running them.
+Doing so requires you to let Spack know it needs to load the package's
+compiler configuration. This is accomplished by setting the package's
+``test_requires_compiler`` property to ``True``.
-Setting the property to ``True`` ensures access to the compiler through
-canonical environment variables (e.g., ``CC``, ``CXX``, ``FC``, ``F77``).
-It also gives access to build dependencies like ``cmake`` through their
-``spec objects`` (e.g., ``self.spec["cmake"].prefix.bin.cmake``).
+.. admonition:: ``test_requires_compiler = True`` is required to build test executables.
-.. note::
+ Setting the property to ``True`` ensures access to the compiler through
+ canonical environment variables (e.g., ``CC``, ``CXX``, ``FC``, ``F77``).
+ It also gives access to build dependencies like ``cmake`` through their
+ ``spec objects`` (e.g., ``self.spec["cmake"].prefix.bin.cmake`` for the
+ path or ``self.spec["cmake"].command`` for the ``Executable`` instance).
- The ``test_requires_compiler`` property should be added at the top of
- the package near other attributes, such as the ``homepage`` and ``url``.
+ Be sure to add the property at the top of the package class under other
+ properties like the ``homepage``.
-Below illustrates using this feature to compile an example.
+The example below, which ignores how ``cxx-example.cpp`` is acquired,
+illustrates the basic process of compiling a test executable using the
+installed library before running it.
.. code-block:: python
@@ -5444,28 +5654,22 @@ Below illustrates using this feature to compile an example.
cxx_example = which(exe)
cxx_example()
+Typically the files used to build and or run test executables are either
+cached from the installation (see :ref:`cache_extra_test_sources`) or added
+to the package repository (see :ref:`cache_custom_files`). There is nothing
+preventing the use of both.
.. _cache_extra_test_sources:
-"""""""""""""""""""""""
-Saving build-time files
-"""""""""""""""""""""""
-
-.. note::
-
- We highly recommend re-using build-time test sources and pared down
- input files for testing installed software. These files are easier
- to keep synchronized with software capabilities since they reside
- within the software's repository.
-
- If that is not possible, you can add test-related files to the package
- repository (see :ref:`adding custom files <cache_custom_files>`). It
- will be important to maintain them so they work across listed or supported
- versions of the package.
+""""""""""""""""""""""""""""""""""""
+Saving build- and install-time files
+""""""""""""""""""""""""""""""""""""
-You can use the ``cache_extra_test_sources`` helper to copy directories
-and or files from the source build stage directory to the package's
-installation directory.
+You can use the ``cache_extra_test_sources`` helper routine to copy
+directories and or files from the source build stage directory to the
+package's installation directory. Spack will automatically copy these
+files for you when it sets up the test stage directory and before it
+begins running the tests.
The signature for ``cache_extra_test_sources`` is:
@@ -5480,46 +5684,69 @@ where each argument has the following meaning:
* ``srcs`` is a string *or* a list of strings corresponding to the
paths of subdirectories and or files needed for stand-alone testing.
-The paths must be relative to the staged source directory. Contents of
-subdirectories and files are copied to a special test cache subdirectory
-of the installation prefix. They are automatically copied to the appropriate
-relative paths under the test stage directory prior to executing stand-alone
-tests.
+.. warning::
+
+ Paths provided in the ``srcs`` argument **must be relative** to the
+ staged source directory. They will be copied to the equivalent relative
+ location under the test stage directory prior to test execution.
+
+Contents of subdirectories and files are copied to a special test cache
+subdirectory of the installation prefix. They are automatically copied to
+the appropriate relative paths under the test stage directory prior to
+executing stand-alone tests.
+
+.. tip::
-For example, a package method for copying everything in the ``tests``
-subdirectory plus the ``foo.c`` and ``bar.c`` files from ``examples``
-and using ``foo.c`` in a test method is illustrated below.
+ *Perform test-related conversions once when copying files.*
+
+ If one or more of the copied files needs to be modified to reference
+ the installed software, it is recommended that those changes be made
+ to the cached files **once** in the post-``install`` copy method
+ **after** the call to ``cache_extra_test_sources``. This will reduce
+ the amount of unnecessary work in the test method **and** avoid problems
+ running stand-alone tests in shared instances and facility deployments.
+
+ The ``filter_file`` function can be quite useful for such changes
+ (see :ref:`file-filtering`).
+
+Below is a basic example of a test that relies on files from the installation.
+This package method re-uses the contents of the ``examples`` subdirectory,
+which is assumed to have all of the files implemented to allow ``make`` to
+compile and link ``foo.c`` and ``bar.c`` against the package's installed
+library.
.. code-block:: python
- class MyLibPackage(Package):
+ class MyLibPackage(MakefilePackage):
...
@run_after("install")
def copy_test_files(self):
- srcs = ["tests",
- join_path("examples", "foo.c"),
- join_path("examples", "bar.c")]
- cache_extra_test_sources(self, srcs)
-
- def test_foo(self):
- exe = "foo"
- src_dir = self.test_suite.current_test_cache_dir.examples
- with working_dir(src_dir):
- cc = which(os.environ["CC"])
- cc(
- f"-L{self.prefix.lib}",
- f"-I{self.prefix.include}",
- f"{exe}.c",
- "-o", exe
- )
- foo = which(exe)
- foo()
+ cache_extra_test_sources(self, "examples")
-In this case, the method copies the associated files from the build
-stage, **after** the software is installed, to the package's test
-cache directory. Then ``test_foo`` builds ``foo`` using ``foo.c``
-before running the program.
+ def test_example(self):
+ """build and run the examples"""
+ examples_dir = self.test_suite.current_test_cache_dir.examples
+ with working_dir(examples_dir):
+ make = which("make")
+ make()
+
+ for program in ["foo", "bar"]:
+ with test_part(
+ self,
+ f"test_example_{program}",
+ purpose=f"ensure {program} runs"
+ ):
+ exe = Executable(program)
+ exe()
+
+In this case, ``copy_test_files`` copies the associated files from the
+build stage to the package's test cache directory under the installation
+prefix. Running ``spack test run`` for the package results in Spack copying
+the directory and its contents to the the test stage directory. The
+``working_dir`` context manager ensures the commands within it are executed
+from the ``examples_dir``. The test builds the software using ``make`` before
+running each executable, ``foo`` and ``bar``, as independent test parts.
.. note::
@@ -5528,43 +5755,18 @@ before running the program.
The key to copying files for stand-alone testing at build time is use
of the ``run_after`` directive, which ensures the associated files are
- copied **after** the provided build stage where the files **and**
- installation prefix are available.
-
-These paths are **automatically copied** from cache to the test stage
-directory prior to the execution of any stand-alone tests. Tests access
-the files using the ``self.test_suite.current_test_cache_dir`` property.
-In our example above, test methods can use the following paths to reference
-the copy of each entry listed in ``srcs``, respectively:
-
-* ``self.test_suite.current_test_cache_dir.tests``
-* ``join_path(self.test_suite.current_test_cache_dir.examples, "foo.c")``
-* ``join_path(self.test_suite.current_test_cache_dir.examples, "bar.c")``
-
-.. admonition:: Library packages should build stand-alone tests
-
- Library developers will want to build the associated tests
- against their **installed** libraries before running them.
-
-.. note::
-
- While source and input files are generally recommended, binaries
- **may** also be cached by the build process. Only you, as the package
- writer or maintainer, know whether these files would be appropriate
- for testing the installed software weeks to months later.
-
-.. note::
+ copied **after** the provided build stage (``install``) when the installation
+ prefix **and** files are available.
- If one or more of the copied files needs to be modified to reference
- the installed software, it is recommended that those changes be made
- to the cached files **once** in the ``copy_test_sources`` method and
- ***after** the call to ``cache_extra_test_sources()``. This will
- reduce the amount of unnecessary work in the test method **and** avoid
- problems testing in shared instances and facility deployments.
+ The test method uses the path contained in the package's
+ ``self.test_suite.current_test_cache_dir`` property for the root directory
+ of the copied files. In this case, that's the ``examples`` subdirectory.
- The ``filter_file`` function can be quite useful for such changes.
- See :ref:`file manipulation <file-manipulation>`.
+.. tip::
+ If you want to see more examples from packages that cache build files, run
+ ``spack pkg grep cache_extra_test_sources | sed "s/\/package.py.*//g" | sort -u``
+ from the command line to get a list of the packages.
.. _cache_custom_files:
@@ -5572,8 +5774,9 @@ the copy of each entry listed in ``srcs``, respectively:
Adding custom files
"""""""""""""""""""
-In some cases it can be useful to have files that can be used to build or
-check the results of tests. Examples include:
+Sometimes it is helpful or necessary to include custom files for building and
+or checking the results of tests as part of the package. Examples of the types
+of files that might be useful are:
- test source files
- test input files
@@ -5581,17 +5784,15 @@ check the results of tests. Examples include:
- expected test outputs
While obtaining such files from the software repository is preferred (see
-:ref:`adding build-time files <cache_extra_test_sources>`), there are
-circumstances where that is not feasible (e.g., the software is not being
-actively maintained). When test files can't be obtained from the repository
-or as a supplement to files that can, Spack supports the inclusion of
-additional files under the ``test`` subdirectory of the package in the
-Spack repository.
+:ref:`cache_extra_test_sources`), there are circumstances where doing so is not
+feasible such as when the software is not being actively maintained. When test
+files cannot be obtained from the repository or there is a need to supplement
+files that can, Spack supports the inclusion of additional files under the
+``test`` subdirectory of the package in the Spack repository.
-Spack **automatically copies** the contents of that directory to the
-test staging directory prior to running stand-alone tests. Test methods
-access those files using the ``self.test_suite.current_test_data_dir``
-property as shown below.
+The following example assumes a ``custom-example.c`` is saved in ``MyLibary``
+package's ``test`` subdirectory. It also assumes the program simply needs to
+be compiled and linked against the installed ``MyLibrary`` software.
.. code-block:: python
@@ -5601,17 +5802,29 @@ property as shown below.
test_requires_compiler = True
...
- def test_example(self):
+ def test_custom_example(self):
"""build and run custom-example"""
- data_dir = self.test_suite.current_test_data_dir
+ src_dir = self.test_suite.current_test_data_dir
exe = "custom-example"
- src = datadir.join(f"{exe}.cpp")
- ...
- # TODO: Build custom-example using src and exe
- ...
- custom_example = which(exe)
- custom_example()
+ with working_dir(src_dir):
+ cc = which(os.environ["CC"])
+ cc(
+ f"-L{self.prefix.lib}",
+ f"-I{self.prefix.include}",
+ f"{exe}.cpp",
+ "-o", exe
+ )
+
+ custom_example = Executable(exe)
+ custom_example()
+
+In this case, ``spack test run`` for the package results in Spack copying
+the contents of the ``test`` subdirectory to the test stage directory path
+in ``self.test_suite.current_test_data_dir`` before calling
+``test_custom_example``. Use of the ``working_dir`` context manager
+ensures the commands to build and run the program are performed from
+within the appropriate subdirectory of the test stage.
.. _expected_test_output_from_file:
@@ -5620,9 +5833,8 @@ Reading expected output from a file
"""""""""""""""""""""""""""""""""""
The helper function ``get_escaped_text_output`` is available for packages
-to retrieve and properly format the text from a file that contains the
-expected output from running an executable that may contain special
-characters.
+to retrieve properly formatted text from a file potentially containing
+special characters.
The signature for ``get_escaped_text_output`` is:
@@ -5632,10 +5844,13 @@ 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 <cache_custom_files>` can be
-accessed by tests using the ``self.test_suite.current_test_data_dir``
-property. The example below illustrates how to read a file that was
-added to the package's ``test`` subdirectory.
+The path provided to ``filename`` for one of the copied custom files
+(:ref:`custom file <cache_custom_files>`) is in the path rooted at
+``self.test_suite.current_test_data_dir``.
+
+The example below shows how to reference both the custom database
+(``packages.db``) and expected output (``dump.out``) files Spack copies
+to the test stage:
.. code-block:: python
@@ -5657,8 +5872,9 @@ added to the package's ``test`` subdirectory.
for exp in expected:
assert re.search(exp, out), f"Expected '{exp}' in output"
-If the file was instead copied from the ``tests`` subdirectory of the staged
-source code, the path would be obtained as shown below.
+If the files were instead cached from installing the software, the paths to the
+two files would be found under the ``self.test_suite.current_test_cache_dir``
+directory as shown below:
.. code-block:: python
@@ -5666,17 +5882,24 @@ source code, the path would be obtained as shown below.
"""check example table dump"""
test_cache_dir = self.test_suite.current_test_cache_dir
db_filename = test_cache_dir.join("packages.db")
+ ..
+ expected = get_escaped_text_output(test_cache_dir.join("dump.out"))
+ ...
-Alternatively, if the file was copied to the ``share/tests`` subdirectory
-as part of the installation process, the test could access the path as
-follows:
+Alternatively, if both files had been installed by the software into the
+``share/tests`` subdirectory of the installation prefix, the paths to the
+two files would be referenced as follows:
.. code-block:: python
def test_example(self):
"""check example table dump"""
- db_filename = join_path(self.prefix.share.tests, "packages.db")
-
+ db_filename = self.prefix.share.tests.join("packages.db")
+ ..
+ expected = get_escaped_text_output(
+ self.prefix.share.tests.join("dump.out")
+ )
+ ...
.. _check_outputs:
@@ -5684,9 +5907,9 @@ follows:
Comparing expected to actual outputs
""""""""""""""""""""""""""""""""""""
-The helper function ``check_outputs`` is available for packages to ensure
-the expected outputs from running an executable are contained within the
-actual outputs.
+The ``check_outputs`` helper routine is available for packages to ensure
+multiple expected outputs from running an executable are contained within
+the actual outputs.
The signature for ``check_outputs`` is:
@@ -5712,11 +5935,17 @@ Invoking the method is the equivalent of:
if errors:
raise RuntimeError("\n ".join(errors))
+.. tip::
+
+ If you want to see more examples from packages that use this helper, run
+ ``spack pkg grep check_outputs | sed "s/\/package.py.*//g" | sort -u``
+ from the command line to get a list of the packages.
+
.. _accessing-files:
"""""""""""""""""""""""""""""""""""""""""
-Accessing package- and test-related files
+Finding package- and test-related files
"""""""""""""""""""""""""""""""""""""""""
You may need to access files from one or more locations when writing
@@ -5725,8 +5954,7 @@ include test source files or includes them but has no way to build the
executables using the installed headers and libraries. In these cases
you may need to reference the files relative to one or more root directory.
The table below lists relevant path properties and provides additional
-examples of their use.
-:ref:`Reading expected output <expected_test_output_from_file>` provides
+examples of their use. See :ref:`expected_test_output_from_file` for
examples of accessing files saved from the software repository, package
repository, and installation.
@@ -5755,7 +5983,6 @@ repository, and installation.
- ``self.test_suite.current_test_data_dir``
- ``join_path(self.test_suite.current_test_data_dir, "hello.f90")``
-
.. _inheriting-tests:
""""""""""""""""""""""""""""
@@ -5798,7 +6025,7 @@ maintainers provide additional stand-alone tests customized to the package.
.. warning::
Any package that implements a test method with the same name as an
- inherited method overrides the inherited method. If that is not the
+ inherited method will override the inherited method. If that is not the
goal and you are not explicitly calling and adding functionality to
the inherited method for the test, then make sure that all test methods
and embedded test parts have unique test names.
@@ -5963,6 +6190,8 @@ running:
This is already part of the boilerplate for packages created with
``spack create``.
+.. _file-filtering:
+
^^^^^^^^^^^^^^^^^^^
Filtering functions
^^^^^^^^^^^^^^^^^^^
@@ -6402,9 +6631,12 @@ the ``paths`` attribute:
echo "Target: x86_64-pc-linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /usr/bin"
+ platforms: ["linux", "darwin"]
results:
- spec: 'llvm@3.9.1 +clang~lld~lldb'
+If the ``platforms`` attribute is present, tests are run only if the current host
+matches one of the listed platforms.
Each test is performed by first creating a temporary directory structure as
specified in the corresponding ``layout`` and by then running
package detection and checking that the outcome matches the expected
@@ -6438,6 +6670,10 @@ package detection and checking that the outcome matches the expected
- A spec that is expected from detection
- Any valid spec
- Yes
+ * - ``results:[0]:extra_attributes``
+ - Extra attributes expected on the associated Spec
+ - Nested dictionary with string as keys, and regular expressions as leaf values
+ - No
"""""""""""""""""""""""""""""""
Reuse tests from other packages
@@ -6835,6 +7071,46 @@ might write:
CXXFLAGS += -I$DWARF_PREFIX/include
CXXFLAGS += -L$DWARF_PREFIX/lib
+.. _abi_compatibility:
+
+----------------------------
+Specifying ABI Compatibility
+----------------------------
+
+Packages can include ABI-compatibility information using the
+``can_splice`` directive. For example, if ``Foo`` version 1.1 can
+always replace version 1.0, then the package could have:
+
+.. code-block:: python
+
+ can_splice("foo@1.0", when="@1.1")
+
+For virtual packages, packages can also specify ABI-compabitiliby with
+other packages providing the same virtual. For example, ``zlib-ng``
+could specify:
+
+.. code-block:: python
+
+ can_splice("zlib@1.3.1", when="@2.2+compat")
+
+Some packages have ABI-compatibility that is dependent on matching
+variant values, either for all variants or for some set of
+ABI-relevant variants. In those cases, it is not necessary to specify
+the full combinatorial explosion. The ``match_variants`` keyword can
+cover all single-value variants.
+
+.. code-block:: python
+
+ can_splice("foo@1.1", when="@1.2", match_variants=["bar"]) # any value for bar as long as they're the same
+ can_splice("foo@1.2", when="@1.3", match_variants="*") # any variant values if all single-value variants match
+
+The concretizer will use ABI compatibility to determine automatic
+splices when :ref:`automatic splicing<automatic_splicing>` is enabled.
+
+.. note::
+
+ The ``can_splice`` directive is experimental, and may be replaced
+ by a higher-level interface in future versions of Spack.
.. _package_class_structure:
@@ -6973,3 +7249,18 @@ you probably care most about are:
You may also care about `license exceptions
<https://spdx.org/licenses/exceptions-index.html>`_ that use the ``WITH`` operator,
e.g. ``Apache-2.0 WITH LLVM-exception``.
+
+Many of the licenses that are currently in the spack repositories have been
+automatically determined. While this is great for bulk adding license
+information and is most likely correct, there are sometimes edge cases that
+require manual intervention. To determine which licenses are validated and
+which are not, there is the `checked_by` parameter in the license directive:
+
+.. code-block:: python
+
+ license("<license>", when="<when>", checked_by="<github username>")
+
+When you have validated a github license, either when doing so explicitly or
+as part of packaging a new package, please set the `checked_by` parameter
+to your Github username to signal that the license has been manually
+verified.
diff --git a/lib/spack/docs/pipelines.rst b/lib/spack/docs/pipelines.rst
index 0bed42ffd6..67c8a065aa 100644
--- a/lib/spack/docs/pipelines.rst
+++ b/lib/spack/docs/pipelines.rst
@@ -59,7 +59,7 @@ Functional Example
------------------
The simplest fully functional standalone example of a working pipeline can be
-examined live at this example `project <https://gitlab.com/scott.wittenburg/spack-pipeline-demo>`_
+examined live at this example `project <https://gitlab.com/spack/pipeline-quickstart>`_
on gitlab.com.
Here's the ``.gitlab-ci.yml`` file from that example that builds and runs the
@@ -67,39 +67,46 @@ pipeline:
.. code-block:: yaml
- stages: [generate, build]
+ stages: [ "generate", "build" ]
variables:
- SPACK_REPO: https://github.com/scottwittenburg/spack.git
- SPACK_REF: pipelines-reproducible-builds
+ SPACK_REPOSITORY: "https://github.com/spack/spack.git"
+ SPACK_REF: "develop-2024-10-06"
+ SPACK_USER_CONFIG_PATH: ${CI_PROJECT_DIR}
+ SPACK_BACKTRACE: 1
generate-pipeline:
- stage: generate
tags:
- - docker
+ - saas-linux-small-amd64
+ stage: generate
image:
- name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
- entrypoint: [""]
- before_script:
- - git clone ${SPACK_REPO}
- - pushd spack && git checkout ${SPACK_REF} && popd
- - . "./spack/share/spack/setup-env.sh"
+ name: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01
script:
+ - git clone ${SPACK_REPOSITORY}
+ - cd spack && git checkout ${SPACK_REF} && cd ../
+ - . "./spack/share/spack/setup-env.sh"
+ - spack --version
- spack env activate --without-view .
- - spack -d ci generate
+ - spack -d -v --color=always
+ ci generate
+ --check-index-only
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
- --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/pipeline.yml"
+ --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
- build-jobs:
+ build-pipeline:
stage: build
trigger:
include:
- - artifact: "jobs_scratch_dir/pipeline.yml"
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: generate-pipeline
strategy: depend
+ needs:
+ - artifacts: True
+ job: generate-pipeline
+
The key thing to note above is that there are two jobs: The first job to run,
``generate-pipeline``, runs the ``spack ci generate`` command to generate a
@@ -114,82 +121,93 @@ And here's the spack environment built by the pipeline represented as a
spack:
view: false
concretizer:
- unify: false
+ unify: true
+ reuse: false
definitions:
- pkgs:
- zlib
- - bzip2
- - arch:
- - '%gcc@7.5.0 arch=linux-ubuntu18.04-x86_64'
+ - bzip2 ~debug
+ - compiler:
+ - '%gcc'
specs:
- matrix:
- - $pkgs
- - - $arch
-
- mirrors: { "mirror": "s3://spack-public/mirror" }
+ - - $compiler
ci:
- enable-artifacts-buildcache: True
- rebuild-index: False
+ target: gitlab
+
pipeline-gen:
- any-job:
- before_script:
- - git clone ${SPACK_REPO}
- - pushd spack && git checkout ${SPACK_CHECKOUT_VERSION} && popd
- - . "./spack/share/spack/setup-env.sh"
- - build-job:
- tags: [docker]
+ tags:
+ - saas-linux-small-amd64
image:
- name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
- entrypoint: [""]
-
+ name: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01
+ before_script:
+ - git clone ${SPACK_REPOSITORY}
+ - cd spack && git checkout ${SPACK_REF} && cd ../
+ - . "./spack/share/spack/setup-env.sh"
+ - spack --version
+ - export SPACK_USER_CONFIG_PATH=${CI_PROJECT_DIR}
+ - spack config blame mirrors
-The elements of this file important to spack ci pipelines are described in more
-detail below, but there are a couple of things to note about the above working
-example:
.. note::
- There is no ``script`` attribute specified for here. The reason for this is
- Spack CI will automatically generate reasonable default scripts. More
- detail on what is in these scripts can be found below.
-
- Also notice the ``before_script`` section. It is required when using any of the
- default scripts to source the ``setup-env.sh`` script in order to inform
- the default scripts where to find the ``spack`` executable.
-
-Normally ``enable-artifacts-buildcache`` is not recommended in production as it
-results in large binary artifacts getting transferred back and forth between
-gitlab and the runners. But in this example on gitlab.com where there is no
-shared, persistent file system, and where no secrets are stored for giving
-permission to write to an S3 bucket, ``enabled-buildcache-artifacts`` is the only
-way to propagate binaries from jobs to their dependents.
-
-Also, it is usually a good idea to let the pipeline generate a final "rebuild the
-buildcache index" job, so that subsequent pipeline generation can quickly determine
-which specs are up to date and which need to be rebuilt (it's a good idea for other
-reasons as well, but those are out of scope for this discussion). In this case we
-have disabled it (using ``rebuild-index: False``) because the index would only be
-generated in the artifacts mirror anyway, and consequently would not be available
-during subsequent pipeline runs.
+ The use of ``reuse: false`` in spack environments used for pipelines is
+ almost always what you want, as without it your pipelines will not rebuild
+ packages even if package hashes have changed. This is due to the concretizer
+ strongly preferring known hashes when ``reuse: true``.
+
+The ``ci`` section in the above environment file contains the bare minimum
+configuration required for ``spack ci generate`` to create a working pipeline.
+The ``target: gitlab`` tells spack that the desired pipeline output is for
+gitlab. However, this isn't strictly required, as currently gitlab is the
+only possible output format for pipelines. The ``pipeline-gen`` section
+contains the key information needed to specify attributes for the generated
+jobs. Notice that it contains a list which has only a single element in
+this case. In real pipelines it will almost certainly have more elements,
+and in those cases, order is important: spack starts at the bottom of the
+list and works upwards when applying attributes.
+
+But in this simple case, we use only the special key ``any-job`` to
+indicate that spack should apply the specified attributes (``tags``, ``image``,
+and ``before_script``) to any job it generates. This includes jobs for
+building/pushing all packages, a ``rebuild-index`` job at the end of the
+pipeline, as well as any ``noop`` jobs that might be needed by gitlab when
+no rebuilds are required.
+
+Something to note is that in this simple case, we rely on spack to
+generate a reasonable script for the package build jobs (it just creates
+a script that invokes ``spack ci rebuild``).
+
+Another thing to note is the use of the ``SPACK_USER_CONFIG_DIR`` environment
+variable in any generated jobs. The purpose of this is to make spack
+aware of one final file in the example, the one that contains the mirror
+configuration. This file, ``mirrors.yaml`` looks like this:
-.. note::
- With the addition of reproducible builds (#22887) a previously working
- pipeline will require some changes:
+.. code-block:: yaml
+
+ mirrors:
+ buildcache-destination:
+ url: oci://registry.gitlab.com/spack/pipeline-quickstart
+ binary: true
+ access_pair:
+ id_variable: CI_REGISTRY_USER
+ secret_variable: CI_REGISTRY_PASSWORD
- * In the build-jobs, the environment location changed.
- This will typically show as a ``KeyError`` in the failing job. Be sure to
- point to ``${SPACK_CONCRETE_ENV_DIR}``.
- * When using ``include`` in your environment, be sure to make the included
- files available in the build jobs. This means adding those files to the
- artifact directory. Those files will also be missing in the reproducibility
- artifact.
+Note the name of the mirror is ``buildcache-destination``, which is required
+as of Spack 0.23 (see below for more information). The mirror url simply
+points to the container registry associated with the project, while
+``id_variable`` and ``secret_variable`` refer to to environment variables
+containing the access credentials for the mirror.
- * Because the location of the environment changed, including files with
- relative path may have to be adapted to work both in the project context
- (generation job) and in the concrete env dir context (build job).
+When spack builds packages for this example project, they will be pushed to
+the project container registry, where they will be available for subsequent
+jobs to install as dependencies, or for other pipelines to use to build runnable
+container images.
-----------------------------------
Spack commands supporting pipelines
@@ -253,17 +271,6 @@ can easily happen if it is not updated frequently, this behavior ensures that
spack has a way to know for certain about the status of any concrete spec on
the remote mirror, but can slow down pipeline generation significantly.
-The ``--optimize`` argument is experimental and runs the generated pipeline
-document through a series of optimization passes designed to reduce the size
-of the generated file.
-
-The ``--dependencies`` is also experimental and disables what in Gitlab is
-referred to as DAG scheduling, internally using the ``dependencies`` keyword
-rather than ``needs`` to list dependency jobs. The drawback of using this option
-is that before any job can begin, all jobs in previous stages must first
-complete. The benefit is that Gitlab allows more dependencies to be listed
-when using ``dependencies`` instead of ``needs``.
-
The optional ``--output-file`` argument should be an absolute path (including
file name) to the generated pipeline, and if not given, the default is
``./.gitlab-ci.yml``.
@@ -428,15 +435,6 @@ configuration with a ``script`` attribute. Specifying a signing job without a sc
does not create a signing job and the job configuration attributes will be ignored.
Signing jobs are always assigned the runner tags ``aws``, ``protected``, and ``notary``.
-^^^^^^^^^^^^^^^^^
-Cleanup (cleanup)
-^^^^^^^^^^^^^^^^^
-
-When using ``temporary-storage-url-prefix`` the cleanup job will destroy the mirror
-created for the associated Gitlab pipeline. Cleanup jobs do not allow modifying the
-script, but do expect that the spack command is in the path and require a
-``before_script`` to be specified that sources the ``setup-env.sh`` script.
-
.. _noop_jobs:
^^^^^^^^^^^^
@@ -603,6 +601,77 @@ the attributes will be merged starting from the bottom match going up to the top
In the case that no match is found in a submapping section, no additional attributes will be applied.
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Dynamic Mapping Sections
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+For large scale CI where cost optimization is required, dynamic mapping allows for the use of real-time
+mapping schemes served by a web service. This type of mapping does not support the ``-remove`` type
+behavior, but it does follow the rest of the merge rules for configurations.
+
+The dynamic mapping service needs to implement a single REST API interface for getting
+requests ``GET <URL>[:PORT][/PATH]?spec=<pkg_name@pkg_version +variant1+variant2%compiler@compiler_version>``.
+
+example request.
+
+.. code-block::
+
+ https://my-dyn-mapping.spack.io/allocation?spec=zlib-ng@2.1.6 +compat+opt+shared+pic+new_strategies arch=linux-ubuntu20.04-x86_64_v3%gcc@12.0.0
+
+
+With an example response the updates kubernetes request variables, overrides the max retries for gitlab,
+and prepends a note about the modifications made by the my-dyn-mapping.spack.io service.
+
+.. code-block::
+
+ 200 OK
+
+ {
+ "variables":
+ {
+ "KUBERNETES_CPU_REQUEST": "500m",
+ "KUBERNETES_MEMORY_REQUEST": "2G",
+ },
+ "retry": { "max:": "1"}
+ "script+:":
+ [
+ "echo \"Job modified by my-dyn-mapping.spack.io\""
+ ]
+ }
+
+
+The ci.yaml configuration section takes the URL endpoint as well as a number of options to configure how responses are handled.
+
+It is possible to specify a list of allowed and ignored configuration attributes under ``allow`` and ``ignore``
+respectively. It is also possible to configure required attributes under ``required`` section.
+
+Options to configure the client timeout and SSL verification using the ``timeout`` and ``verify_ssl`` options.
+By default, the ``timeout`` is set to the option in ``config:timeout`` and ``veryify_ssl`` is set the the option in ``config::verify_ssl``.
+
+Passing header parameters to the request can be achieved through the ``header`` section. The values of the variables passed to the
+header may be environment variables that are expanded at runtime, such as a private token configured on the runner.
+
+Here is an example configuration pointing to ``my-dyn-mapping.spack.io/allocation``.
+
+
+.. code-block:: yaml
+
+ ci:
+ - dynamic-mapping:
+ endpoint: my-dyn-mapping.spack.io/allocation
+ timeout: 10
+ verify_ssl: True
+ header:
+ PRIVATE_TOKEN: ${MY_PRIVATE_TOKEN}
+ MY_CONFIG: "fuzz_allocation:false"
+ allow:
+ - variables
+ ignore:
+ - script
+ require: []
+
+
^^^^^^^^^^^^^
Bootstrapping
^^^^^^^^^^^^^
@@ -674,26 +743,13 @@ build the package.
When including a bootstrapping phase as in the example above, the result is that
the bootstrapped compiler packages will be pushed to the binary mirror (and the
-local artifacts mirror) before the actual release specs are built. In this case,
-the jobs corresponding to subsequent release specs are configured to
-``install_missing_compilers``, so that if spack is asked to install a package
-with a compiler it doesn't know about, it can be quickly installed from the
-binary mirror first.
+local artifacts mirror) before the actual release specs are built.
Since bootstrapping compilers is optional, those items can be left out of the
environment/stack file, and in that case no bootstrapping will be done (only the
specs will be staged for building) and the runners will be expected to already
have all needed compilers installed and configured for spack to use.
-^^^^^^^^^^^^^^^^^^^
-Pipeline Buildcache
-^^^^^^^^^^^^^^^^^^^
-
-The ``enable-artifacts-buildcache`` key
-takes a boolean and determines whether the pipeline uses artifacts to store and
-pass along the buildcaches from one stage to the next (the default if you don't
-provide this option is ``False``).
-
^^^^^^^^^^^^^^^^
Broken Specs URL
^^^^^^^^^^^^^^^^
@@ -810,7 +866,7 @@ generated by ``spack ci generate``. You also want your generated rebuild jobs
.. code-block:: yaml
spack:
- ...
+ # ...
ci:
pipeline-gen:
- build-job:
diff --git a/lib/spack/docs/repositories.rst b/lib/spack/docs/repositories.rst
index 5a4cf1c108..3b20c78bfc 100644
--- a/lib/spack/docs/repositories.rst
+++ b/lib/spack/docs/repositories.rst
@@ -17,7 +17,7 @@ experimental software separately from the built-in repository. Spack
allows you to configure local repositories using either the
``repos.yaml`` or the ``spack repo`` command.
-A package repository a directory structured like this::
+A package repository is a directory structured like this::
repo/
repo.yaml
@@ -476,9 +476,3 @@ implemented using Python's built-in `sys.path
:py:mod:`spack.repo` module implements a custom `Python importer
<https://docs.python.org/2/library/imp.html>`_.
-.. warning::
-
- The mechanism for extending packages is not yet extensively tested,
- and extending packages across repositories imposes inter-repo
- dependencies, which may be hard to manage. Use this feature at your
- own risk, but let us know if you have a use case for it.
diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt
index 8fb5b70ac9..89af7d5567 100644
--- a/lib/spack/docs/requirements.txt
+++ b/lib/spack/docs/requirements.txt
@@ -1,13 +1,13 @@
-sphinx==7.2.6
+sphinx==8.1.3
sphinxcontrib-programoutput==0.17
-sphinx_design==0.5.0
-sphinx-rtd-theme==2.0.0
-python-levenshtein==0.23.0
-docutils==0.20.1
-pygments==2.17.2
-urllib3==2.1.0
-pytest==7.4.4
+sphinx_design==0.6.1
+sphinx-rtd-theme==3.0.2
+python-levenshtein==0.26.1
+docutils==0.21.2
+pygments==2.18.0
+urllib3==2.2.3
+pytest==8.3.4
isort==5.13.2
-black==23.12.1
-flake8==6.1.0
-mypy==1.8.0
+black==24.10.0
+flake8==7.1.1
+mypy==1.11.1
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index f72a6663a3..88969d3f30 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -47,7 +47,8 @@ SPACK_F77_RPATH_ARG
SPACK_FC_RPATH_ARG
SPACK_LINKER_ARG
SPACK_SHORT_SPEC
-SPACK_SYSTEM_DIRS"
+SPACK_SYSTEM_DIRS
+SPACK_MANAGED_DIRS"
# Optional parameters that aren't required to be set
@@ -100,10 +101,9 @@ setsep() {
esac
}
-# prepend LISTNAME ELEMENT [SEP]
+# prepend LISTNAME ELEMENT
#
-# Prepend ELEMENT to the list stored in the variable LISTNAME,
-# assuming the list is separated by SEP.
+# Prepend ELEMENT to the list stored in the variable LISTNAME.
# Handles empty lists and single-element lists.
prepend() {
varname="$1"
@@ -173,20 +173,44 @@ preextend() {
unset IFS
}
-# system_dir PATH
-# test whether a path is a system directory
-system_dir() {
- IFS=':' # SPACK_SYSTEM_DIRS is colon-separated
- path="$1"
- for sd in $SPACK_SYSTEM_DIRS; do
- if [ "${path}" = "${sd}" ] || [ "${path}" = "${sd}/" ]; then
- # success if path starts with a system prefix
- unset IFS
- return 0
- fi
- done
- unset IFS
- return 1 # fail if path starts no system prefix
+execute() {
+ # dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
+ if [ -n "${SPACK_TEST_COMMAND=}" ]; then
+ case "$SPACK_TEST_COMMAND" in
+ dump-args)
+ IFS="$lsep"
+ for arg in $full_command_list; do
+ echo "$arg"
+ done
+ unset IFS
+ exit
+ ;;
+ dump-env-*)
+ var=${SPACK_TEST_COMMAND#dump-env-}
+ eval "printf '%s\n' \"\$0: \$var: \$$var\""
+ ;;
+ *)
+ die "Unknown test command: '$SPACK_TEST_COMMAND'"
+ ;;
+ esac
+ fi
+
+ #
+ # Write the input and output commands to debug logs if it's asked for.
+ #
+ if [ "$SPACK_DEBUG" = TRUE ]; then
+ input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
+ output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
+ echo "[$mode] $command $input_command" >> "$input_log"
+ IFS="$lsep"
+ echo "[$mode] "$full_command_list >> "$output_log"
+ unset IFS
+ fi
+
+ # Execute the full command, preserving spaces with IFS set
+ # to the alarm bell separator.
+ IFS="$lsep"; exec $full_command_list
+ exit
}
# Fail with a clear message if the input contains any bell characters.
@@ -201,6 +225,48 @@ for param in $params; do
fi
done
+# eval this because SPACK_MANAGED_DIRS and SPACK_SYSTEM_DIRS are inputs we don't wanna loop over.
+# moving the eval inside the function would eval it every call.
+eval "\
+path_order() {
+case \"\$1\" in
+ $SPACK_MANAGED_DIRS) return 0 ;;
+ $SPACK_SYSTEM_DIRS) return 2 ;;
+ /*) return 1 ;;
+esac
+}
+"
+
+# path_list functions. Path_lists have 3 parts: spack_store_<list>, <list> and system_<list>,
+# which are used to prioritize paths when assembling the final command line.
+
+# init_path_lists LISTNAME
+# Set <LISTNAME>, spack_store_<LISTNAME>, and system_<LISTNAME> to "".
+init_path_lists() {
+ eval "spack_store_$1=\"\""
+ eval "$1=\"\""
+ eval "system_$1=\"\""
+}
+
+# assign_path_lists LISTNAME1 LISTNAME2
+# Copy contents of LISTNAME2 into LISTNAME1, for each path_list prefix.
+assign_path_lists() {
+ eval "spack_store_$1=\"\${spack_store_$2}\""
+ eval "$1=\"\${$2}\""
+ eval "system_$1=\"\${system_$2}\""
+}
+
+# append_path_lists LISTNAME ELT
+# Append the provided ELT to the appropriate list, based on the result of path_order().
+append_path_lists() {
+ path_order "$2"
+ case $? in
+ 0) eval "append spack_store_$1 \"\$2\"" ;;
+ 1) eval "append $1 \"\$2\"" ;;
+ 2) eval "append system_$1 \"\$2\"" ;;
+ esac
+}
+
# Check if optional parameters are defined
# If we aren't asking for debug flags, don't add them
if [ -z "${SPACK_ADD_DEBUG_FLAGS:-}" ]; then
@@ -234,12 +300,17 @@ fi
# ld link
# ccld compile & link
+# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations,
+# including version checks (SPACK_XFLAGS variants are not applied
+# for version checks).
command="${0##*/}"
comp="CC"
+vcheck_flags=""
case "$command" in
cpp)
mode=cpp
debug_flags="-g"
+ vcheck_flags="${SPACK_ALWAYS_CPPFLAGS}"
;;
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe|craycc)
command="$SPACK_CC"
@@ -247,13 +318,15 @@ case "$command" in
comp="CC"
lang_flags=C
debug_flags="-g"
+ vcheck_flags="${SPACK_ALWAYS_CFLAGS}"
;;
- c++|CC|g++|clang++|armclang++|icpc|icpx|dpcpp|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
+ c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
command="$SPACK_CXX"
language="C++"
comp="CXX"
lang_flags=CXX
debug_flags="-g"
+ vcheck_flags="${SPACK_ALWAYS_CXXFLAGS}"
;;
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang|crayftn)
command="$SPACK_FC"
@@ -261,6 +334,7 @@ case "$command" in
comp="FC"
lang_flags=F
debug_flags="-g"
+ vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
;;
f77|xlf|xlf_r|pgf77)
command="$SPACK_F77"
@@ -268,6 +342,7 @@ case "$command" in
comp="F77"
lang_flags=F
debug_flags="-g"
+ vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
;;
ld|ld.gold|ld.lld)
mode=ld
@@ -368,7 +443,11 @@ unset IFS
export PATH="$new_dirs"
if [ "$mode" = vcheck ]; then
- exec "${command}" "$@"
+ full_command_list="$command"
+ args="$@"
+ extend full_command_list vcheck_flags
+ extend full_command_list args
+ execute
fi
# Darwin's linker has a -r argument that merges object files together.
@@ -420,11 +499,7 @@ input_command="$*"
parse_Wl() {
while [ $# -ne 0 ]; do
if [ "$wl_expect_rpath" = yes ]; then
- if system_dir "$1"; then
- append return_system_rpath_dirs_list "$1"
- else
- append return_rpath_dirs_list "$1"
- fi
+ append_path_lists return_rpath_dirs_list "$1"
wl_expect_rpath=no
else
case "$1" in
@@ -432,21 +507,15 @@ parse_Wl() {
arg="${1#-rpath=}"
if [ -z "$arg" ]; then
shift; continue
- elif system_dir "$arg"; then
- append return_system_rpath_dirs_list "$arg"
- else
- append return_rpath_dirs_list "$arg"
fi
+ append_path_lists return_rpath_dirs_list "$arg"
;;
--rpath=*)
arg="${1#--rpath=}"
if [ -z "$arg" ]; then
shift; continue
- elif system_dir "$arg"; then
- append return_system_rpath_dirs_list "$arg"
- else
- append return_rpath_dirs_list "$arg"
fi
+ append_path_lists return_rpath_dirs_list "$arg"
;;
-rpath|--rpath)
wl_expect_rpath=yes
@@ -454,8 +523,7 @@ parse_Wl() {
"$dtags_to_strip")
;;
-Wl)
- # Nested -Wl,-Wl means we're in NAG compiler territory, we don't support
- # it.
+ # Nested -Wl,-Wl means we're in NAG compiler territory. We don't support it.
return 1
;;
*)
@@ -473,14 +541,11 @@ categorize_arguments() {
return_other_args_list=""
return_isystem_was_used=""
- return_isystem_system_include_dirs_list=""
- return_isystem_include_dirs_list=""
- return_system_include_dirs_list=""
- return_include_dirs_list=""
- return_system_lib_dirs_list=""
- return_lib_dirs_list=""
- return_system_rpath_dirs_list=""
- return_rpath_dirs_list=""
+
+ init_path_lists return_isystem_include_dirs_list
+ init_path_lists return_include_dirs_list
+ init_path_lists return_lib_dirs_list
+ init_path_lists return_rpath_dirs_list
# Global state for keeping track of -Wl,-rpath -Wl,/path
wl_expect_rpath=no
@@ -526,7 +591,7 @@ categorize_arguments() {
continue
fi
- replaced="$after$stripped"
+ replaced="$after$stripped"
# it matched, remove it
shift
@@ -546,29 +611,17 @@ categorize_arguments() {
arg="${1#-isystem}"
return_isystem_was_used=true
if [ -z "$arg" ]; then shift; arg="$1"; fi
- if system_dir "$arg"; then
- append return_isystem_system_include_dirs_list "$arg"
- else
- append return_isystem_include_dirs_list "$arg"
- fi
+ append_path_lists return_isystem_include_dirs_list "$arg"
;;
-I*)
arg="${1#-I}"
if [ -z "$arg" ]; then shift; arg="$1"; fi
- if system_dir "$arg"; then
- append return_system_include_dirs_list "$arg"
- else
- append return_include_dirs_list "$arg"
- fi
+ append_path_lists return_include_dirs_list "$arg"
;;
-L*)
arg="${1#-L}"
if [ -z "$arg" ]; then shift; arg="$1"; fi
- if system_dir "$arg"; then
- append return_system_lib_dirs_list "$arg"
- else
- append return_lib_dirs_list "$arg"
- fi
+ append_path_lists return_lib_dirs_list "$arg"
;;
-l*)
# -loopopt=0 is generated erroneously in autoconf <= 2.69,
@@ -601,29 +654,17 @@ categorize_arguments() {
break
elif [ "$xlinker_expect_rpath" = yes ]; then
# Register the path of -Xlinker -rpath <other args> -Xlinker <path>
- if system_dir "$1"; then
- append return_system_rpath_dirs_list "$1"
- else
- append return_rpath_dirs_list "$1"
- fi
+ append_path_lists return_rpath_dirs_list "$1"
xlinker_expect_rpath=no
else
case "$1" in
-rpath=*)
arg="${1#-rpath=}"
- if system_dir "$arg"; then
- append return_system_rpath_dirs_list "$arg"
- else
- append return_rpath_dirs_list "$arg"
- fi
+ append_path_lists return_rpath_dirs_list "$arg"
;;
--rpath=*)
arg="${1#--rpath=}"
- if system_dir "$arg"; then
- append return_system_rpath_dirs_list "$arg"
- else
- append return_rpath_dirs_list "$arg"
- fi
+ append_path_lists return_rpath_dirs_list "$arg"
;;
-rpath|--rpath)
xlinker_expect_rpath=yes
@@ -640,7 +681,36 @@ categorize_arguments() {
"$dtags_to_strip")
;;
*)
- append return_other_args_list "$1"
+ # if mode is not ld, we can just add to other args
+ if [ "$mode" != "ld" ]; then
+ append return_other_args_list "$1"
+ shift
+ continue
+ fi
+
+ # if we're in linker mode, we need to parse raw RPATH args
+ case "$1" in
+ -rpath=*)
+ arg="${1#-rpath=}"
+ append_path_lists return_rpath_dirs_list "$arg"
+ ;;
+ --rpath=*)
+ arg="${1#--rpath=}"
+ append_path_lists return_rpath_dirs_list "$arg"
+ ;;
+ -rpath|--rpath)
+ if [ $# -eq 1 ]; then
+ # -rpath without value: let the linker raise an error.
+ append return_other_args_list "$1"
+ break
+ fi
+ shift
+ append_path_lists return_rpath_dirs_list "$1"
+ ;;
+ *)
+ append return_other_args_list "$1"
+ ;;
+ esac
;;
esac
shift
@@ -661,16 +731,14 @@ categorize_arguments() {
}
categorize_arguments "$@"
- include_dirs_list="$return_include_dirs_list"
- lib_dirs_list="$return_lib_dirs_list"
- rpath_dirs_list="$return_rpath_dirs_list"
- system_include_dirs_list="$return_system_include_dirs_list"
- system_lib_dirs_list="$return_system_lib_dirs_list"
- system_rpath_dirs_list="$return_system_rpath_dirs_list"
- isystem_was_used="$return_isystem_was_used"
- isystem_system_include_dirs_list="$return_isystem_system_include_dirs_list"
- isystem_include_dirs_list="$return_isystem_include_dirs_list"
- other_args_list="$return_other_args_list"
+
+assign_path_lists isystem_include_dirs_list return_isystem_include_dirs_list
+assign_path_lists include_dirs_list return_include_dirs_list
+assign_path_lists lib_dirs_list return_lib_dirs_list
+assign_path_lists rpath_dirs_list return_rpath_dirs_list
+
+isystem_was_used="$return_isystem_was_used"
+other_args_list="$return_other_args_list"
#
# Add flags from Spack's cppflags, cflags, cxxflags, fcflags, fflags, and
@@ -697,6 +765,7 @@ case "$mode" in
cc|ccld)
case $lang_flags in
F)
+ extend spack_flags_list SPACK_ALWAYS_FFLAGS
extend spack_flags_list SPACK_FFLAGS
;;
esac
@@ -706,6 +775,7 @@ esac
# C preprocessor flags come before any C/CXX flags
case "$mode" in
cpp|as|cc|ccld)
+ extend spack_flags_list SPACK_ALWAYS_CPPFLAGS
extend spack_flags_list SPACK_CPPFLAGS
;;
esac
@@ -716,9 +786,11 @@ case "$mode" in
cc|ccld)
case $lang_flags in
C)
+ extend spack_flags_list SPACK_ALWAYS_CFLAGS
extend spack_flags_list SPACK_CFLAGS
;;
CXX)
+ extend spack_flags_list SPACK_ALWAYS_CXXFLAGS
extend spack_flags_list SPACK_CXXFLAGS
;;
esac
@@ -730,7 +802,7 @@ esac
# Linker flags
case "$mode" in
- ld|ccld)
+ ccld)
extend spack_flags_list SPACK_LDFLAGS
;;
esac
@@ -738,16 +810,14 @@ esac
IFS="$lsep"
categorize_arguments $spack_flags_list
unset IFS
- spack_flags_include_dirs_list="$return_include_dirs_list"
- spack_flags_lib_dirs_list="$return_lib_dirs_list"
- spack_flags_rpath_dirs_list="$return_rpath_dirs_list"
- spack_flags_system_include_dirs_list="$return_system_include_dirs_list"
- spack_flags_system_lib_dirs_list="$return_system_lib_dirs_list"
- spack_flags_system_rpath_dirs_list="$return_system_rpath_dirs_list"
- spack_flags_isystem_was_used="$return_isystem_was_used"
- spack_flags_isystem_system_include_dirs_list="$return_isystem_system_include_dirs_list"
- spack_flags_isystem_include_dirs_list="$return_isystem_include_dirs_list"
- spack_flags_other_args_list="$return_other_args_list"
+
+assign_path_lists spack_flags_isystem_include_dirs_list return_isystem_include_dirs_list
+assign_path_lists spack_flags_include_dirs_list return_include_dirs_list
+assign_path_lists spack_flags_lib_dirs_list return_lib_dirs_list
+assign_path_lists spack_flags_rpath_dirs_list return_rpath_dirs_list
+
+spack_flags_isystem_was_used="$return_isystem_was_used"
+spack_flags_other_args_list="$return_other_args_list"
# On macOS insert headerpad_max_install_names linker flag
@@ -767,11 +837,13 @@ if [ "$mode" = ccld ] || [ "$mode" = ld ]; then
# Append RPATH directories. Note that in the case of the
# top-level package these directories may not exist yet. For dependencies
# it is assumed that paths have already been confirmed.
+ extend spack_store_rpath_dirs_list SPACK_STORE_RPATH_DIRS
extend rpath_dirs_list SPACK_RPATH_DIRS
fi
fi
if [ "$mode" = ccld ] || [ "$mode" = ld ]; then
+ extend spack_store_lib_dirs_list SPACK_STORE_LINK_DIRS
extend lib_dirs_list SPACK_LINK_DIRS
fi
@@ -798,63 +870,82 @@ case "$mode" in
;;
esac
+case "$mode" in
+ cpp|cc|as|ccld)
+ if [ "$spack_flags_isystem_was_used" = "true" ] || [ "$isystem_was_used" = "true" ]; then
+ extend spack_store_isystem_include_dirs_list SPACK_STORE_INCLUDE_DIRS
+ extend isystem_include_dirs_list SPACK_INCLUDE_DIRS
+ else
+ extend spack_store_include_dirs_list SPACK_STORE_INCLUDE_DIRS
+ extend include_dirs_list SPACK_INCLUDE_DIRS
+ fi
+ ;;
+esac
+
#
# Finally, reassemble the command line.
#
args_list="$flags_list"
-# Insert include directories just prior to any system include directories
+# Include search paths partitioned by (in store, non-sytem, system)
# NOTE: adding ${lsep} to the prefix here turns every added element into two
-extend args_list spack_flags_include_dirs_list "-I"
-extend args_list include_dirs_list "-I"
+extend args_list spack_store_spack_flags_include_dirs_list -I
+extend args_list spack_store_include_dirs_list -I
+
+extend args_list spack_flags_include_dirs_list -I
+extend args_list include_dirs_list -I
+
+extend args_list spack_store_spack_flags_isystem_include_dirs_list "-isystem${lsep}"
+extend args_list spack_store_isystem_include_dirs_list "-isystem${lsep}"
+
extend args_list spack_flags_isystem_include_dirs_list "-isystem${lsep}"
extend args_list isystem_include_dirs_list "-isystem${lsep}"
-case "$mode" in
- cpp|cc|as|ccld)
- if [ "$spack_flags_isystem_was_used" = "true" ]; then
- extend args_list SPACK_INCLUDE_DIRS "-isystem${lsep}"
- elif [ "$isystem_was_used" = "true" ]; then
- extend args_list SPACK_INCLUDE_DIRS "-isystem${lsep}"
- else
- extend args_list SPACK_INCLUDE_DIRS "-I"
- fi
- ;;
-esac
-
-extend args_list spack_flags_system_include_dirs_list -I
+extend args_list system_spack_flags_include_dirs_list -I
extend args_list system_include_dirs_list -I
-extend args_list spack_flags_isystem_system_include_dirs_list "-isystem${lsep}"
-extend args_list isystem_system_include_dirs_list "-isystem${lsep}"
-# Library search paths
+extend args_list system_spack_flags_isystem_include_dirs_list "-isystem${lsep}"
+extend args_list system_isystem_include_dirs_list "-isystem${lsep}"
+
+# Library search paths partitioned by (in store, non-sytem, system)
+extend args_list spack_store_spack_flags_lib_dirs_list "-L"
+extend args_list spack_store_lib_dirs_list "-L"
+
extend args_list spack_flags_lib_dirs_list "-L"
extend args_list lib_dirs_list "-L"
-extend args_list spack_flags_system_lib_dirs_list "-L"
+
+extend args_list system_spack_flags_lib_dirs_list "-L"
extend args_list system_lib_dirs_list "-L"
# RPATHs arguments
+rpath_prefix=""
case "$mode" in
ccld)
if [ -n "$dtags_to_add" ] ; then
append args_list "$linker_arg$dtags_to_add"
fi
- extend args_list spack_flags_rpath_dirs_list "$rpath"
- extend args_list rpath_dirs_list "$rpath"
- extend args_list spack_flags_system_rpath_dirs_list "$rpath"
- extend args_list system_rpath_dirs_list "$rpath"
+ rpath_prefix="$rpath"
;;
ld)
if [ -n "$dtags_to_add" ] ; then
append args_list "$dtags_to_add"
fi
- extend args_list spack_flags_rpath_dirs_list "-rpath${lsep}"
- extend args_list rpath_dirs_list "-rpath${lsep}"
- extend args_list spack_flags_system_rpath_dirs_list "-rpath${lsep}"
- extend args_list system_rpath_dirs_list "-rpath${lsep}"
+ rpath_prefix="-rpath${lsep}"
;;
esac
+# if mode is ccld or ld, extend RPATH lists with the prefix determined above
+if [ -n "$rpath_prefix" ]; then
+ extend args_list spack_store_spack_flags_rpath_dirs_list "$rpath_prefix"
+ extend args_list spack_store_rpath_dirs_list "$rpath_prefix"
+
+ extend args_list spack_flags_rpath_dirs_list "$rpath_prefix"
+ extend args_list rpath_dirs_list "$rpath_prefix"
+
+ extend args_list system_spack_flags_rpath_dirs_list "$rpath_prefix"
+ extend args_list system_rpath_dirs_list "$rpath_prefix"
+fi
+
# Other arguments from the input command
extend args_list other_args_list
extend args_list spack_flags_other_args_list
@@ -877,40 +968,4 @@ if [ -n "$SPACK_CCACHE_BINARY" ]; then
esac
fi
-# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
-if [ -n "${SPACK_TEST_COMMAND=}" ]; then
- case "$SPACK_TEST_COMMAND" in
- dump-args)
- IFS="$lsep"
- for arg in $full_command_list; do
- echo "$arg"
- done
- unset IFS
- exit
- ;;
- dump-env-*)
- var=${SPACK_TEST_COMMAND#dump-env-}
- eval "printf '%s\n' \"\$0: \$var: \$$var\""
- ;;
- *)
- die "Unknown test command: '$SPACK_TEST_COMMAND'"
- ;;
- esac
-fi
-
-#
-# Write the input and output commands to debug logs if it's asked for.
-#
-if [ "$SPACK_DEBUG" = TRUE ]; then
- input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
- output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
- echo "[$mode] $command $input_command" >> "$input_log"
- IFS="$lsep"
- echo "[$mode] "$full_command_list >> "$output_log"
- unset IFS
-fi
-
-# Execute the full command, preserving spaces with IFS set
-# to the alarm bell separator.
-IFS="$lsep"; exec $full_command_list
-
+execute
diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py
index cb88b0c867..672bf17f80 100644
--- a/lib/spack/external/__init__.py
+++ b/lib/spack/external/__init__.py
@@ -18,7 +18,7 @@ archspec
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
-* Version: 0.2.2 (commit 1dc58a5776dd77e6fc6e4ba5626af5b1fb24996e)
+* Version: 0.2.5 (commit 38ce485258ffc4fc6dd6688f8dc90cb269478c47)
astunparse
----------------
diff --git a/lib/spack/external/_vendoring/distro/distro.py b/lib/spack/external/_vendoring/distro/distro.py
index 89e1868047..50c3b18d4d 100644
--- a/lib/spack/external/_vendoring/distro/distro.py
+++ b/lib/spack/external/_vendoring/distro/distro.py
@@ -1265,27 +1265,29 @@ class LinuxDistribution:
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
else:
try:
- basenames = [
- basename
- for basename in os.listdir(self.etc_dir)
- if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
- and os.path.isfile(os.path.join(self.etc_dir, basename))
- ]
+ with os.scandir(self.etc_dir) as it:
+ etc_files = [
+ p.path for p in it
+ if p.is_file() and p.name not in _DISTRO_RELEASE_IGNORE_BASENAMES
+ ]
# We sort for repeatability in cases where there are multiple
# distro specific files; e.g. CentOS, Oracle, Enterprise all
# containing `redhat-release` on top of their own.
- basenames.sort()
+ etc_files.sort()
except OSError:
# This may occur when /etc is not readable but we can't be
# sure about the *-release files. Check common entries of
# /etc for information. If they turn out to not be there the
# error is handled in `_parse_distro_release_file()`.
- basenames = _DISTRO_RELEASE_BASENAMES
- for basename in basenames:
- match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ etc_files = [
+ os.path.join(self.etc_dir, basename)
+ for basename in _DISTRO_RELEASE_BASENAMES
+ ]
+
+ for filepath in etc_files:
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(os.path.basename(filepath))
if match is None:
continue
- filepath = os.path.join(self.etc_dir, basename)
distro_info = self._parse_distro_release_file(filepath)
# The name is always present if the pattern matches.
if "name" not in distro_info:
diff --git a/lib/spack/external/_vendoring/jsonschema/_format.py b/lib/spack/external/_vendoring/jsonschema/_format.py
index 281a7cfcff..29061e3661 100644
--- a/lib/spack/external/_vendoring/jsonschema/_format.py
+++ b/lib/spack/external/_vendoring/jsonschema/_format.py
@@ -231,96 +231,6 @@ def is_host_name(instance):
return True
-try:
- # The built-in `idna` codec only implements RFC 3890, so we go elsewhere.
- import idna
-except ImportError:
- pass
-else:
- @_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
- def is_idn_host_name(instance):
- if not isinstance(instance, str_types):
- return True
- idna.encode(instance)
- return True
-
-
-try:
- import rfc3987
-except ImportError:
- try:
- from rfc3986_validator import validate_rfc3986
- except ImportError:
- pass
- else:
- @_checks_drafts(name="uri")
- def is_uri(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3986(instance, rule="URI")
-
- @_checks_drafts(
- draft6="uri-reference",
- draft7="uri-reference",
- raises=ValueError,
- )
- def is_uri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3986(instance, rule="URI_reference")
-
-else:
- @_checks_drafts(draft7="iri", raises=ValueError)
- def is_iri(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="IRI")
-
- @_checks_drafts(draft7="iri-reference", raises=ValueError)
- def is_iri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="IRI_reference")
-
- @_checks_drafts(name="uri", raises=ValueError)
- def is_uri(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="URI")
-
- @_checks_drafts(
- draft6="uri-reference",
- draft7="uri-reference",
- raises=ValueError,
- )
- def is_uri_reference(instance):
- if not isinstance(instance, str_types):
- return True
- return rfc3987.parse(instance, rule="URI_reference")
-
-
-try:
- from strict_rfc3339 import validate_rfc3339
-except ImportError:
- try:
- from rfc3339_validator import validate_rfc3339
- except ImportError:
- validate_rfc3339 = None
-
-if validate_rfc3339:
- @_checks_drafts(name="date-time")
- def is_datetime(instance):
- if not isinstance(instance, str_types):
- return True
- return validate_rfc3339(instance)
-
- @_checks_drafts(draft7="time")
- def is_time(instance):
- if not isinstance(instance, str_types):
- return True
- return is_datetime("1970-01-01T" + instance)
-
-
@_checks_drafts(name="regex", raises=re.error)
def is_regex(instance):
if not isinstance(instance, str_types):
@@ -340,86 +250,3 @@ def is_draft3_time(instance):
if not isinstance(instance, str_types):
return True
return datetime.datetime.strptime(instance, "%H:%M:%S")
-
-
-try:
- import webcolors
-except ImportError:
- pass
-else:
- def is_css_color_code(instance):
- return webcolors.normalize_hex(instance)
-
- @_checks_drafts(draft3="color", raises=(ValueError, TypeError))
- def is_css21_color(instance):
- if (
- not isinstance(instance, str_types) or
- instance.lower() in webcolors.css21_names_to_hex
- ):
- return True
- return is_css_color_code(instance)
-
- def is_css3_color(instance):
- if instance.lower() in webcolors.css3_names_to_hex:
- return True
- return is_css_color_code(instance)
-
-
-try:
- import jsonpointer
-except ImportError:
- pass
-else:
- @_checks_drafts(
- draft6="json-pointer",
- draft7="json-pointer",
- raises=jsonpointer.JsonPointerException,
- )
- def is_json_pointer(instance):
- if not isinstance(instance, str_types):
- return True
- return jsonpointer.JsonPointer(instance)
-
- # TODO: I don't want to maintain this, so it
- # needs to go either into jsonpointer (pending
- # https://github.com/stefankoegl/python-json-pointer/issues/34) or
- # into a new external library.
- @_checks_drafts(
- draft7="relative-json-pointer",
- raises=jsonpointer.JsonPointerException,
- )
- def is_relative_json_pointer(instance):
- # Definition taken from:
- # https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3
- if not isinstance(instance, str_types):
- return True
- non_negative_integer, rest = [], ""
- for i, character in enumerate(instance):
- if character.isdigit():
- non_negative_integer.append(character)
- continue
-
- if not non_negative_integer:
- return False
-
- rest = instance[i:]
- break
- return (rest == "#") or jsonpointer.JsonPointer(rest)
-
-
-try:
- import uritemplate.exceptions
-except ImportError:
- pass
-else:
- @_checks_drafts(
- draft6="uri-template",
- draft7="uri-template",
- raises=uritemplate.exceptions.InvalidTemplate,
- )
- def is_uri_template(
- instance,
- template_validator=uritemplate.Validator().force_balanced_braces(),
- ):
- template = uritemplate.URITemplate(instance)
- return template_validator.validate(template)
diff --git a/lib/spack/external/_vendoring/ruamel/yaml/comments.py b/lib/spack/external/_vendoring/ruamel/yaml/comments.py
index 892c868af3..1badeda585 100644
--- a/lib/spack/external/_vendoring/ruamel/yaml/comments.py
+++ b/lib/spack/external/_vendoring/ruamel/yaml/comments.py
@@ -497,7 +497,7 @@ class CommentedBase:
Tag.attrib, merge_attrib]:
if hasattr(self, a):
if memo is not None:
- setattr(t, a, copy.deepcopy(getattr(self, a, memo)))
+ setattr(t, a, copy.deepcopy(getattr(self, a), memo))
else:
setattr(t, a, getattr(self, a))
# fmt: on
diff --git a/lib/spack/external/archspec/__init__.py b/lib/spack/external/archspec/__init__.py
index 22a430894b..2930ad719e 100644
--- a/lib/spack/external/archspec/__init__.py
+++ b/lib/spack/external/archspec/__init__.py
@@ -1,2 +1,3 @@
"""Init file to avoid namespace packages"""
-__version__ = "0.2.2"
+
+__version__ = "0.2.4"
diff --git a/lib/spack/external/archspec/__main__.py b/lib/spack/external/archspec/__main__.py
index 2321fb06a6..45fbe12704 100644
--- a/lib/spack/external/archspec/__main__.py
+++ b/lib/spack/external/archspec/__main__.py
@@ -3,6 +3,7 @@ Run the `archspec` CLI as a module.
"""
import sys
+
from .cli import main
sys.exit(main())
diff --git a/lib/spack/external/archspec/cli.py b/lib/spack/external/archspec/cli.py
index 4049f98f7a..eaddaf5d77 100755
--- a/lib/spack/external/archspec/cli.py
+++ b/lib/spack/external/archspec/cli.py
@@ -46,7 +46,11 @@ def _make_parser() -> argparse.ArgumentParser:
def cpu() -> int:
"""Run the `archspec cpu` subcommand."""
- print(archspec.cpu.host())
+ try:
+ print(archspec.cpu.host())
+ except FileNotFoundError as exc:
+ print(exc)
+ return 1
return 0
diff --git a/lib/spack/external/archspec/cpu/__init__.py b/lib/spack/external/archspec/cpu/__init__.py
index b3ea025732..6fbb43b785 100644
--- a/lib/spack/external/archspec/cpu/__init__.py
+++ b/lib/spack/external/archspec/cpu/__init__.py
@@ -5,16 +5,23 @@
"""The "cpu" package permits to query and compare different
CPU microarchitectures.
"""
-from .microarchitecture import Microarchitecture, UnsupportedMicroarchitecture
-from .microarchitecture import TARGETS, generic_microarchitecture
-from .microarchitecture import version_components
-from .detect import host
+from .detect import brand_string, host
+from .microarchitecture import (
+ TARGETS,
+ InvalidCompilerVersion,
+ Microarchitecture,
+ UnsupportedMicroarchitecture,
+ generic_microarchitecture,
+ version_components,
+)
__all__ = [
+ "brand_string",
+ "host",
+ "TARGETS",
+ "InvalidCompilerVersion",
"Microarchitecture",
"UnsupportedMicroarchitecture",
- "TARGETS",
"generic_microarchitecture",
- "host",
"version_components",
]
diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py
index 305bf9d9d6..f9f095f78a 100644
--- a/lib/spack/external/archspec/cpu/detect.py
+++ b/lib/spack/external/archspec/cpu/detect.py
@@ -4,15 +4,17 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Detection of CPU microarchitectures"""
import collections
-import functools
import os
import platform
import re
+import struct
import subprocess
import warnings
+from typing import Dict, List, Optional, Set, Tuple, Union
-from .microarchitecture import generic_microarchitecture, TARGETS
-from .schema import TARGETS_JSON
+from ..vendor.cpuid.cpuid import CPUID
+from .microarchitecture import TARGETS, Microarchitecture, generic_microarchitecture
+from .schema import CPUID_JSON, TARGETS_JSON
#: Mapping from operating systems to chain of commands
#: to obtain a dictionary of raw info on the current cpu
@@ -22,43 +24,51 @@ INFO_FACTORY = collections.defaultdict(list)
#: functions checking the compatibility of the host with a given target
COMPATIBILITY_CHECKS = {}
+# Constants for commonly used architectures
+X86_64 = "x86_64"
+AARCH64 = "aarch64"
+PPC64LE = "ppc64le"
+PPC64 = "ppc64"
+RISCV64 = "riscv64"
-def info_dict(operating_system):
- """Decorator to mark functions that are meant to return raw info on
- the current cpu.
+
+def detection(operating_system: str):
+ """Decorator to mark functions that are meant to return partial information on the current cpu.
Args:
- operating_system (str or tuple): operating system for which the marked
- function is a viable factory of raw info dictionaries.
+ operating_system: operating system where this function can be used.
"""
def decorator(factory):
INFO_FACTORY[operating_system].append(factory)
+ return factory
- @functools.wraps(factory)
- def _impl():
- info = factory()
-
- # Check that info contains a few mandatory fields
- msg = 'field "{0}" is missing from raw info dictionary'
- assert "vendor_id" in info, msg.format("vendor_id")
- assert "flags" in info, msg.format("flags")
- assert "model" in info, msg.format("model")
- assert "model_name" in info, msg.format("model_name")
-
- return info
+ return decorator
- return _impl
- return decorator
+def partial_uarch(
+ name: str = "",
+ vendor: str = "",
+ features: Optional[Set[str]] = None,
+ generation: int = 0,
+ cpu_part: str = "",
+) -> Microarchitecture:
+ """Construct a partial microarchitecture, from information gathered during system scan."""
+ return Microarchitecture(
+ name=name,
+ parents=[],
+ vendor=vendor,
+ features=features or set(),
+ compilers={},
+ generation=generation,
+ cpu_part=cpu_part,
+ )
-@info_dict(operating_system="Linux")
-def proc_cpuinfo():
- """Returns a raw info dictionary by parsing the first entry of
- ``/proc/cpuinfo``
- """
- info = {}
+@detection(operating_system="Linux")
+def proc_cpuinfo() -> Microarchitecture:
+ """Returns a partial Microarchitecture, obtained from scanning ``/proc/cpuinfo``"""
+ data = {}
with open("/proc/cpuinfo") as file: # pylint: disable=unspecified-encoding
for line in file:
key, separator, value = line.partition(":")
@@ -70,11 +80,122 @@ def proc_cpuinfo():
#
# we are on a blank line separating two cpus. Exit early as
# we want to read just the first entry in /proc/cpuinfo
- if separator != ":" and info:
+ if separator != ":" and data:
break
- info[key.strip()] = value.strip()
- return info
+ data[key.strip()] = value.strip()
+
+ architecture = _machine()
+ if architecture == X86_64:
+ return partial_uarch(
+ vendor=data.get("vendor_id", "generic"), features=_feature_set(data, key="flags")
+ )
+
+ if architecture == AARCH64:
+ return partial_uarch(
+ vendor=_canonicalize_aarch64_vendor(data),
+ features=_feature_set(data, key="Features"),
+ cpu_part=data.get("CPU part", ""),
+ )
+
+ if architecture in (PPC64LE, PPC64):
+ generation_match = re.search(r"POWER(\d+)", data.get("cpu", ""))
+ try:
+ generation = int(generation_match.group(1))
+ except AttributeError:
+ # There might be no match under emulated environments. For instance
+ # emulating a ppc64le with QEMU and Docker still reports the host
+ # /proc/cpuinfo and not a Power
+ generation = 0
+ return partial_uarch(generation=generation)
+
+ if architecture == RISCV64:
+ if data.get("uarch") == "sifive,u74-mc":
+ data["uarch"] = "u74mc"
+ return partial_uarch(name=data.get("uarch", RISCV64))
+
+ return generic_microarchitecture(architecture)
+
+
+class CpuidInfoCollector:
+ """Collects the information we need on the host CPU from cpuid"""
+
+ # pylint: disable=too-few-public-methods
+ def __init__(self):
+ self.cpuid = CPUID()
+
+ registers = self.cpuid.registers_for(**CPUID_JSON["vendor"]["input"])
+ self.highest_basic_support = registers.eax
+ self.vendor = struct.pack("III", registers.ebx, registers.edx, registers.ecx).decode(
+ "utf-8"
+ )
+
+ registers = self.cpuid.registers_for(**CPUID_JSON["highest_extension_support"]["input"])
+ self.highest_extension_support = registers.eax
+
+ self.features = self._features()
+
+ def _features(self):
+ result = set()
+
+ def check_features(data):
+ registers = self.cpuid.registers_for(**data["input"])
+ for feature_check in data["bits"]:
+ current = getattr(registers, feature_check["register"])
+ if self._is_bit_set(current, feature_check["bit"]):
+ result.add(feature_check["name"])
+
+ for call_data in CPUID_JSON["flags"]:
+ if call_data["input"]["eax"] > self.highest_basic_support:
+ continue
+ check_features(call_data)
+
+ for call_data in CPUID_JSON["extension-flags"]:
+ if call_data["input"]["eax"] > self.highest_extension_support:
+ continue
+ check_features(call_data)
+
+ return result
+
+ def _is_bit_set(self, register: int, bit: int) -> bool:
+ mask = 1 << bit
+ return register & mask > 0
+
+ def brand_string(self) -> Optional[str]:
+ """Returns the brand string, if available."""
+ if self.highest_extension_support < 0x80000004:
+ return None
+
+ r1 = self.cpuid.registers_for(eax=0x80000002, ecx=0)
+ r2 = self.cpuid.registers_for(eax=0x80000003, ecx=0)
+ r3 = self.cpuid.registers_for(eax=0x80000004, ecx=0)
+ result = struct.pack(
+ "IIIIIIIIIIII",
+ r1.eax,
+ r1.ebx,
+ r1.ecx,
+ r1.edx,
+ r2.eax,
+ r2.ebx,
+ r2.ecx,
+ r2.edx,
+ r3.eax,
+ r3.ebx,
+ r3.ecx,
+ r3.edx,
+ ).decode("utf-8")
+ return result.strip("\x00")
+
+
+@detection(operating_system="Windows")
+def cpuid_info():
+ """Returns a partial Microarchitecture, obtained from running the cpuid instruction"""
+ architecture = _machine()
+ if architecture == X86_64:
+ data = CpuidInfoCollector()
+ return partial_uarch(vendor=data.vendor, features=data.features)
+
+ return generic_microarchitecture(architecture)
def _check_output(args, env):
@@ -83,14 +204,25 @@ def _check_output(args, env):
return str(output.decode("utf-8"))
+WINDOWS_MAPPING = {
+ "AMD64": X86_64,
+ "ARM64": AARCH64,
+}
+
+
def _machine():
- """ "Return the machine architecture we are on"""
+ """Return the machine architecture we are on"""
operating_system = platform.system()
- # If we are not on Darwin, trust what Python tells us
- if operating_system != "Darwin":
+ # If we are not on Darwin or Windows, trust what Python tells us
+ if operating_system not in ("Darwin", "Windows"):
return platform.machine()
+ # Normalize windows specific names
+ if operating_system == "Windows":
+ platform_machine = platform.machine()
+ return WINDOWS_MAPPING.get(platform_machine, platform_machine)
+
# On Darwin it might happen that we are on M1, but using an interpreter
# built for x86_64. In that case "platform.machine() == 'x86_64'", so we
# need to fix that.
@@ -103,54 +235,47 @@ def _machine():
if "Apple" in output:
# Note that a native Python interpreter on Apple M1 would return
# "arm64" instead of "aarch64". Here we normalize to the latter.
- return "aarch64"
+ return AARCH64
- return "x86_64"
+ return X86_64
-@info_dict(operating_system="Darwin")
-def sysctl_info_dict():
+@detection(operating_system="Darwin")
+def sysctl_info() -> Microarchitecture:
"""Returns a raw info dictionary parsing the output of sysctl."""
child_environment = _ensure_bin_usrbin_in_path()
- def sysctl(*args):
+ def sysctl(*args: str) -> str:
return _check_output(["sysctl"] + list(args), env=child_environment).strip()
- if _machine() == "x86_64":
- flags = (
- sysctl("-n", "machdep.cpu.features").lower()
- + " "
- + sysctl("-n", "machdep.cpu.leaf7_features").lower()
+ if _machine() == X86_64:
+ features = (
+ f'{sysctl("-n", "machdep.cpu.features").lower()} '
+ f'{sysctl("-n", "machdep.cpu.leaf7_features").lower()}'
)
- info = {
- "vendor_id": sysctl("-n", "machdep.cpu.vendor"),
- "flags": flags,
- "model": sysctl("-n", "machdep.cpu.model"),
- "model name": sysctl("-n", "machdep.cpu.brand_string"),
- }
- else:
- model = "unknown"
- model_str = sysctl("-n", "machdep.cpu.brand_string").lower()
- if "m2" in model_str:
- model = "m2"
- elif "m1" in model_str:
- model = "m1"
- elif "apple" in model_str:
- model = "m1"
-
- info = {
- "vendor_id": "Apple",
- "flags": [],
- "model": model,
- "CPU implementer": "Apple",
- "model name": sysctl("-n", "machdep.cpu.brand_string"),
- }
- return info
+ features = set(features.split())
+
+ # Flags detected on Darwin turned to their linux counterpart
+ for darwin_flag, linux_flag in TARGETS_JSON["conversions"]["darwin_flags"].items():
+ if darwin_flag in features:
+ features.update(linux_flag.split())
+
+ return partial_uarch(vendor=sysctl("-n", "machdep.cpu.vendor"), features=features)
+
+ model = "unknown"
+ model_str = sysctl("-n", "machdep.cpu.brand_string").lower()
+ if "m2" in model_str:
+ model = "m2"
+ elif "m1" in model_str:
+ model = "m1"
+ elif "apple" in model_str:
+ model = "m1"
+
+ return partial_uarch(name=model, vendor="Apple")
def _ensure_bin_usrbin_in_path():
- # Make sure that /sbin and /usr/sbin are in PATH as sysctl is
- # usually found there
+ # Make sure that /sbin and /usr/sbin are in PATH as sysctl is usually found there
child_environment = dict(os.environ.items())
search_paths = child_environment.get("PATH", "").split(os.pathsep)
for additional_path in ("/sbin", "/usr/sbin"):
@@ -160,22 +285,10 @@ def _ensure_bin_usrbin_in_path():
return child_environment
-def adjust_raw_flags(info):
- """Adjust the flags detected on the system to homogenize
- slightly different representations.
- """
- # Flags detected on Darwin turned to their linux counterpart
- flags = info.get("flags", [])
- d2l = TARGETS_JSON["conversions"]["darwin_flags"]
- for darwin_flag, linux_flag in d2l.items():
- if darwin_flag in flags:
- info["flags"] += " " + linux_flag
-
-
-def adjust_raw_vendor(info):
- """Adjust the vendor field to make it human readable"""
- if "CPU implementer" not in info:
- return
+def _canonicalize_aarch64_vendor(data: Dict[str, str]) -> str:
+ """Adjust the vendor field to make it human-readable"""
+ if "CPU implementer" not in data:
+ return "generic"
# Mapping numeric codes to vendor (ARM). This list is a merge from
# different sources:
@@ -185,43 +298,37 @@ def adjust_raw_vendor(info):
# https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64-cores.def
# https://patchwork.kernel.org/patch/10524949/
arm_vendors = TARGETS_JSON["conversions"]["arm_vendors"]
- arm_code = info["CPU implementer"]
- if arm_code in arm_vendors:
- info["CPU implementer"] = arm_vendors[arm_code]
+ arm_code = data["CPU implementer"]
+ return arm_vendors.get(arm_code, arm_code)
+
+
+def _feature_set(data: Dict[str, str], key: str) -> Set[str]:
+ return set(data.get(key, "").split())
-def raw_info_dictionary():
- """Returns a dictionary with information on the cpu of the current host.
+def detected_info() -> Microarchitecture:
+ """Returns a partial Microarchitecture with information on the CPU of the current host.
- This function calls all the viable factories one after the other until
- there's one that is able to produce the requested information.
+ This function calls all the viable factories one after the other until there's one that is
+ able to produce the requested information. Falls-back to a generic microarchitecture, if none
+ of the calls succeed.
"""
# pylint: disable=broad-except
- info = {}
for factory in INFO_FACTORY[platform.system()]:
try:
- info = factory()
+ return factory()
except Exception as exc:
warnings.warn(str(exc))
- if info:
- adjust_raw_flags(info)
- adjust_raw_vendor(info)
- break
+ return generic_microarchitecture(_machine())
- return info
-
-def compatible_microarchitectures(info):
- """Returns an unordered list of known micro-architectures that are
- compatible with the info dictionary passed as argument.
-
- Args:
- info (dict): dictionary containing information on the host cpu
+def compatible_microarchitectures(info: Microarchitecture) -> List[Microarchitecture]:
+ """Returns an unordered list of known micro-architectures that are compatible with the
+ partial Microarchitecture passed as input.
"""
architecture_family = _machine()
- # If a tester is not registered, be conservative and assume no known
- # target is compatible with the host
+ # If a tester is not registered, assume no known target is compatible with the host
tester = COMPATIBILITY_CHECKS.get(architecture_family, lambda x, y: False)
return [x for x in TARGETS.values() if tester(info, x)] or [
generic_microarchitecture(architecture_family)
@@ -230,8 +337,8 @@ def compatible_microarchitectures(info):
def host():
"""Detects the host micro-architecture and returns it."""
- # Retrieve a dictionary with raw information on the host's cpu
- info = raw_info_dictionary()
+ # Retrieve information on the host's cpu
+ info = detected_info()
# Get a list of possible candidates for this micro-architecture
candidates = compatible_microarchitectures(info)
@@ -244,6 +351,10 @@ def host():
generic_candidates = [c for c in candidates if c.vendor == "generic"]
best_generic = max(generic_candidates, key=sorting_fn)
+ # Relevant for AArch64. Filter on "cpu_part" if we have any match
+ if info.cpu_part != "" and any(c for c in candidates if info.cpu_part == c.cpu_part):
+ candidates = [c for c in candidates if info.cpu_part == c.cpu_part]
+
# Filter the candidates to be descendant of the best generic candidate.
# This is to avoid that the lack of a niche feature that can be disabled
# from e.g. BIOS prevents detection of a reasonably performant architecture
@@ -258,16 +369,15 @@ def host():
return max(candidates, key=sorting_fn)
-def compatibility_check(architecture_family):
+def compatibility_check(architecture_family: Union[str, Tuple[str, ...]]):
"""Decorator to register a function as a proper compatibility check.
- A compatibility check function takes the raw info dictionary as a first
- argument and an arbitrary target as the second argument. It returns True
- if the target is compatible with the info dictionary, False otherwise.
+ A compatibility check function takes a partial Microarchitecture object as a first argument,
+ and an arbitrary target Microarchitecture as the second argument. It returns True if the
+ target is compatible with first argument, False otherwise.
Args:
- architecture_family (str or tuple): architecture family for which
- this test can be used, e.g. x86_64 or ppc64le etc.
+ architecture_family: architecture family for which this test can be used
"""
# Turn the argument into something iterable
if isinstance(architecture_family, str):
@@ -280,86 +390,70 @@ def compatibility_check(architecture_family):
return decorator
-@compatibility_check(architecture_family=("ppc64le", "ppc64"))
+@compatibility_check(architecture_family=(PPC64LE, PPC64))
def compatibility_check_for_power(info, target):
"""Compatibility check for PPC64 and PPC64LE architectures."""
- basename = platform.machine()
- generation_match = re.search(r"POWER(\d+)", info.get("cpu", ""))
- try:
- generation = int(generation_match.group(1))
- except AttributeError:
- # There might be no match under emulated environments. For instance
- # emulating a ppc64le with QEMU and Docker still reports the host
- # /proc/cpuinfo and not a Power
- generation = 0
-
# We can use a target if it descends from our machine type and our
# generation (9 for POWER9, etc) is at least its generation.
- arch_root = TARGETS[basename]
+ arch_root = TARGETS[_machine()]
return (
target == arch_root or arch_root in target.ancestors
- ) and target.generation <= generation
+ ) and target.generation <= info.generation
-@compatibility_check(architecture_family="x86_64")
+@compatibility_check(architecture_family=X86_64)
def compatibility_check_for_x86_64(info, target):
"""Compatibility check for x86_64 architectures."""
- basename = "x86_64"
- vendor = info.get("vendor_id", "generic")
- features = set(info.get("flags", "").split())
-
# We can use a target if it descends from our machine type, is from our
# vendor, and we have all of its features
- arch_root = TARGETS[basename]
+ arch_root = TARGETS[X86_64]
return (
(target == arch_root or arch_root in target.ancestors)
- and target.vendor in (vendor, "generic")
- and target.features.issubset(features)
+ and target.vendor in (info.vendor, "generic")
+ and target.features.issubset(info.features)
)
-@compatibility_check(architecture_family="aarch64")
+@compatibility_check(architecture_family=AARCH64)
def compatibility_check_for_aarch64(info, target):
"""Compatibility check for AARCH64 architectures."""
- basename = "aarch64"
- features = set(info.get("Features", "").split())
- vendor = info.get("CPU implementer", "generic")
-
- # At the moment it's not clear how to detect compatibility with
+ # At the moment, it's not clear how to detect compatibility with
# a specific version of the architecture
- if target.vendor == "generic" and target.name != "aarch64":
+ if target.vendor == "generic" and target.name != AARCH64:
return False
- arch_root = TARGETS[basename]
+ arch_root = TARGETS[AARCH64]
arch_root_and_vendor = arch_root == target.family and target.vendor in (
- vendor,
+ info.vendor,
"generic",
)
# On macOS it seems impossible to get all the CPU features
# with syctl info, but for ARM we can get the exact model
if platform.system() == "Darwin":
- model_key = info.get("model", basename)
- model = TARGETS[model_key]
+ model = TARGETS[info.name]
return arch_root_and_vendor and (target == model or target in model.ancestors)
- return arch_root_and_vendor and target.features.issubset(features)
+ return arch_root_and_vendor and target.features.issubset(info.features)
-@compatibility_check(architecture_family="riscv64")
+@compatibility_check(architecture_family=RISCV64)
def compatibility_check_for_riscv64(info, target):
"""Compatibility check for riscv64 architectures."""
- basename = "riscv64"
- uarch = info.get("uarch")
-
- # sifive unmatched board
- if uarch == "sifive,u74-mc":
- uarch = "u74mc"
- # catch-all for unknown uarchs
- else:
- uarch = "riscv64"
-
- arch_root = TARGETS[basename]
+ arch_root = TARGETS[RISCV64]
return (target == arch_root or arch_root in target.ancestors) and (
- target == uarch or target.vendor == "generic"
+ target.name == info.name or target.vendor == "generic"
)
+
+
+def brand_string() -> Optional[str]:
+ """Returns the brand string of the host, if detected, or None."""
+ if platform.system() == "Darwin":
+ return _check_output(
+ ["sysctl", "-n", "machdep.cpu.brand_string"], env=_ensure_bin_usrbin_in_path()
+ ).strip()
+
+ if host().family == X86_64:
+ return CpuidInfoCollector().brand_string()
+
+ return None
diff --git a/lib/spack/external/archspec/cpu/microarchitecture.py b/lib/spack/external/archspec/cpu/microarchitecture.py
index 954242736b..bb85b9f37c 100644
--- a/lib/spack/external/archspec/cpu/microarchitecture.py
+++ b/lib/spack/external/archspec/cpu/microarchitecture.py
@@ -2,9 +2,7 @@
# Archspec Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-"""Types and functions to manage information
-on CPU microarchitectures.
-"""
+"""Types and functions to manage information on CPU microarchitectures."""
import functools
import platform
import re
@@ -13,6 +11,7 @@ import warnings
import archspec
import archspec.cpu.alias
import archspec.cpu.schema
+
from .alias import FEATURE_ALIASES
from .schema import LazyDictionary
@@ -47,7 +46,7 @@ class Microarchitecture:
which has "broadwell" as a parent, supports running binaries
optimized for "broadwell".
vendor (str): vendor of the micro-architecture
- features (list of str): supported CPU flags. Note that the semantic
+ features (set of str): supported CPU flags. Note that the semantic
of the flags in this field might vary among architectures, if
at all present. For instance x86_64 processors will list all
the flags supported by a given CPU while Arm processors will
@@ -64,23 +63,31 @@ class Microarchitecture:
passed in as argument above.
* versions: versions that support this micro-architecture.
- generation (int): generation of the micro-architecture, if
- relevant.
+ generation (int): generation of the micro-architecture, if relevant.
+ cpu_part (str): cpu part of the architecture, if relevant.
"""
- # pylint: disable=too-many-arguments
+ # pylint: disable=too-many-arguments,too-many-instance-attributes
#: Aliases for micro-architecture's features
feature_aliases = FEATURE_ALIASES
- def __init__(self, name, parents, vendor, features, compilers, generation=0):
+ def __init__(self, name, parents, vendor, features, compilers, generation=0, cpu_part=""):
self.name = name
self.parents = parents
self.vendor = vendor
self.features = features
self.compilers = compilers
+ # Only relevant for PowerPC
self.generation = generation
- # Cache the ancestor computation
+ # Only relevant for AArch64
+ self.cpu_part = cpu_part
+
+ # Cache the "ancestor" computation
self._ancestors = None
+ # Cache the "generic" computation
+ self._generic = None
+ # Cache the "family" computation
+ self._family = None
@property
def ancestors(self):
@@ -110,8 +117,12 @@ class Microarchitecture:
and self.parents == other.parents # avoid ancestors here
and self.compilers == other.compilers
and self.generation == other.generation
+ and self.cpu_part == other.cpu_part
)
+ def __hash__(self):
+ return hash(self.name)
+
@coerce_target_names
def __ne__(self, other):
return not self == other
@@ -142,7 +153,8 @@ class Microarchitecture:
cls_name = self.__class__.__name__
fmt = (
cls_name + "({0.name!r}, {0.parents!r}, {0.vendor!r}, "
- "{0.features!r}, {0.compilers!r}, {0.generation!r})"
+ "{0.features!r}, {0.compilers!r}, generation={0.generation!r}, "
+ "cpu_part={0.cpu_part!r})"
)
return fmt.format(self)
@@ -167,42 +179,54 @@ class Microarchitecture:
@property
def family(self):
"""Returns the architecture family a given target belongs to"""
- roots = [x for x in [self] + self.ancestors if not x.ancestors]
- msg = "a target is expected to belong to just one architecture family"
- msg += f"[found {', '.join(str(x) for x in roots)}]"
- assert len(roots) == 1, msg
+ if self._family is None:
+ roots = [x for x in [self] + self.ancestors if not x.ancestors]
+ msg = "a target is expected to belong to just one architecture family"
+ msg += f"[found {', '.join(str(x) for x in roots)}]"
+ assert len(roots) == 1, msg
+ self._family = roots.pop()
- return roots.pop()
+ return self._family
@property
def generic(self):
"""Returns the best generic architecture that is compatible with self"""
- generics = [x for x in [self] + self.ancestors if x.vendor == "generic"]
- return max(generics, key=lambda x: len(x.ancestors))
-
- def to_dict(self, return_list_of_items=False):
- """Returns a dictionary representation of this object.
-
- Args:
- return_list_of_items (bool): if True returns an ordered list of
- items instead of the dictionary
- """
- list_of_items = [
- ("name", str(self.name)),
- ("vendor", str(self.vendor)),
- ("features", sorted(str(x) for x in self.features)),
- ("generation", self.generation),
- ("parents", [str(x) for x in self.parents]),
- ]
- if return_list_of_items:
- return list_of_items
-
- return dict(list_of_items)
+ if self._generic is None:
+ generics = [x for x in [self] + self.ancestors if x.vendor == "generic"]
+ self._generic = max(generics, key=lambda x: len(x.ancestors))
+ return self._generic
+
+ def to_dict(self):
+ """Returns a dictionary representation of this object."""
+ return {
+ "name": str(self.name),
+ "vendor": str(self.vendor),
+ "features": sorted(str(x) for x in self.features),
+ "generation": self.generation,
+ "parents": [str(x) for x in self.parents],
+ "compilers": self.compilers,
+ "cpupart": self.cpu_part,
+ }
+
+ @staticmethod
+ def from_dict(data) -> "Microarchitecture":
+ """Construct a microarchitecture from a dictionary representation."""
+ return Microarchitecture(
+ name=data["name"],
+ parents=[TARGETS[x] for x in data["parents"]],
+ vendor=data["vendor"],
+ features=set(data["features"]),
+ compilers=data.get("compilers", {}),
+ generation=data.get("generation", 0),
+ cpu_part=data.get("cpupart", ""),
+ )
def optimization_flags(self, compiler, version):
"""Returns a string containing the optimization flags that needs
to be used to produce code optimized for this micro-architecture.
+ The version is expected to be a string of dot separated digits.
+
If there is no information on the compiler passed as argument the
function returns an empty string. If it is known that the compiler
version we want to use does not support this architecture the function
@@ -211,6 +235,11 @@ class Microarchitecture:
Args:
compiler (str): name of the compiler to be used
version (str): version of the compiler to be used
+
+ Raises:
+ UnsupportedMicroarchitecture: if the requested compiler does not support
+ this micro-architecture.
+ ValueError: if the version doesn't match the expected format
"""
# If we don't have information on compiler at all return an empty string
if compiler not in self.family.compilers:
@@ -227,6 +256,14 @@ class Microarchitecture:
msg = msg.format(compiler, best_target, best_target.family)
raise UnsupportedMicroarchitecture(msg)
+ # Check that the version matches the expected format
+ if not re.match(r"^(?:\d+\.)*\d+$", version):
+ msg = (
+ "invalid format for the compiler version argument. "
+ "Only dot separated digits are allowed."
+ )
+ raise InvalidCompilerVersion(msg)
+
# If we have information on this compiler we need to check the
# version being used
compiler_info = self.compilers[compiler]
@@ -271,9 +308,7 @@ class Microarchitecture:
flags = flags_fmt.format(**compiler_entry)
return flags
- msg = (
- "cannot produce optimized binary for micro-architecture '{0}' with {1}@{2}"
- )
+ msg = "cannot produce optimized binary for micro-architecture '{0}' with {1}@{2}"
if compiler_info:
versions = [x["versions"] for x in compiler_info]
msg += f' [supported compiler versions are {", ".join(versions)}]'
@@ -289,9 +324,7 @@ def generic_microarchitecture(name):
Args:
name (str): name of the micro-architecture
"""
- return Microarchitecture(
- name, parents=[], vendor="generic", features=[], compilers={}
- )
+ return Microarchitecture(name, parents=[], vendor="generic", features=set(), compilers={})
def version_components(version):
@@ -344,9 +377,10 @@ def _known_microarchitectures():
features = set(values["features"])
compilers = values.get("compilers", {})
generation = values.get("generation", 0)
+ cpu_part = values.get("cpupart", "")
targets[name] = Microarchitecture(
- name, parents, vendor, features, compilers, generation
+ name, parents, vendor, features, compilers, generation=generation, cpu_part=cpu_part
)
known_targets = {}
@@ -368,7 +402,15 @@ def _known_microarchitectures():
TARGETS = LazyDictionary(_known_microarchitectures)
-class UnsupportedMicroarchitecture(ValueError):
+class ArchspecError(Exception):
+ """Base class for errors within archspec"""
+
+
+class UnsupportedMicroarchitecture(ArchspecError, ValueError):
"""Raised if a compiler version does not support optimization for a given
micro-architecture.
"""
+
+
+class InvalidCompilerVersion(ArchspecError, ValueError):
+ """Raised when an invalid format is used for compiler versions in archspec."""
diff --git a/lib/spack/external/archspec/cpu/schema.py b/lib/spack/external/archspec/cpu/schema.py
index d560ce4e3c..0ffc223165 100644
--- a/lib/spack/external/archspec/cpu/schema.py
+++ b/lib/spack/external/archspec/cpu/schema.py
@@ -7,7 +7,9 @@ JSON file and its schema
"""
import collections.abc
import json
-import os.path
+import os
+import pathlib
+from typing import Tuple
class LazyDictionary(collections.abc.MutableMapping):
@@ -46,21 +48,65 @@ class LazyDictionary(collections.abc.MutableMapping):
return len(self.data)
-def _load_json_file(json_file):
- json_dir = os.path.join(os.path.dirname(__file__), "..", "json", "cpu")
- json_dir = os.path.abspath(json_dir)
+#: Environment variable that might point to a directory with a user defined JSON file
+DIR_FROM_ENVIRONMENT = "ARCHSPEC_CPU_DIR"
- def _factory():
- filename = os.path.join(json_dir, json_file)
- with open(filename, "r", encoding="utf-8") as file:
- return json.load(file)
+#: Environment variable that might point to a directory with extensions to JSON files
+EXTENSION_DIR_FROM_ENVIRONMENT = "ARCHSPEC_EXTENSION_CPU_DIR"
- return _factory
+
+def _json_file(filename: str, allow_custom: bool = False) -> Tuple[pathlib.Path, pathlib.Path]:
+ """Given a filename, returns the absolute path for the main JSON file, and an
+ optional absolute path for an extension JSON file.
+
+ Args:
+ filename: filename for the JSON file
+ allow_custom: if True, allows overriding the location where the file resides
+ """
+ json_dir = pathlib.Path(__file__).parent / ".." / "json" / "cpu"
+ if allow_custom and DIR_FROM_ENVIRONMENT in os.environ:
+ json_dir = pathlib.Path(os.environ[DIR_FROM_ENVIRONMENT])
+ json_dir = json_dir.absolute()
+ json_file = json_dir / filename
+
+ extension_file = None
+ if allow_custom and EXTENSION_DIR_FROM_ENVIRONMENT in os.environ:
+ extension_dir = pathlib.Path(os.environ[EXTENSION_DIR_FROM_ENVIRONMENT])
+ extension_dir.absolute()
+ extension_file = extension_dir / filename
+
+ return json_file, extension_file
+
+
+def _load(json_file: pathlib.Path, extension_file: pathlib.Path):
+ with open(json_file, "r", encoding="utf-8") as file:
+ data = json.load(file)
+
+ if not extension_file or not extension_file.exists():
+ return data
+
+ with open(extension_file, "r", encoding="utf-8") as file:
+ extension_data = json.load(file)
+
+ top_level_sections = list(data.keys())
+ for key in top_level_sections:
+ if key not in extension_data:
+ continue
+
+ data[key].update(extension_data[key])
+
+ return data
#: In memory representation of the data in microarchitectures.json,
#: loaded on first access
-TARGETS_JSON = LazyDictionary(_load_json_file("microarchitectures.json"))
+TARGETS_JSON = LazyDictionary(_load, *_json_file("microarchitectures.json", allow_custom=True))
#: JSON schema for microarchitectures.json, loaded on first access
-SCHEMA = LazyDictionary(_load_json_file("microarchitectures_schema.json"))
+TARGETS_JSON_SCHEMA = LazyDictionary(_load, *_json_file("microarchitectures_schema.json"))
+
+#: Information on how to call 'cpuid' to get information on the HOST CPU
+CPUID_JSON = LazyDictionary(_load, *_json_file("cpuid.json", allow_custom=True))
+
+#: JSON schema for cpuid.json, loaded on first access
+CPUID_JSON_SCHEMA = LazyDictionary(_load, *_json_file("cpuid_schema.json"))
diff --git a/lib/spack/external/archspec/json/README.md b/lib/spack/external/archspec/json/README.md
index e01b75f31a..78c424a86f 100644
--- a/lib/spack/external/archspec/json/README.md
+++ b/lib/spack/external/archspec/json/README.md
@@ -9,11 +9,11 @@ language specific APIs.
Currently the repository contains the following JSON files:
```console
-.
-├── COPYRIGHT
-└── cpu
-    ├── microarchitectures.json # Contains information on CPU microarchitectures
-    └── microarchitectures_schema.json # Schema for the file above
+cpu/
+├── cpuid.json # Contains information on CPUID calls to retrieve vendor and features on x86_64
+├── cpuid_schema.json # Schema for the file above
+├── microarchitectures.json # Contains information on CPU microarchitectures
+└── microarchitectures_schema.json # Schema for the file above
```
diff --git a/lib/spack/external/archspec/json/cpu/cpuid.json b/lib/spack/external/archspec/json/cpu/cpuid.json
new file mode 100644
index 0000000000..594e435383
--- /dev/null
+++ b/lib/spack/external/archspec/json/cpu/cpuid.json
@@ -0,0 +1,1050 @@
+{
+ "vendor": {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=0:_Highest_Function_Parameter_and_Manufacturer_ID",
+ "input": {
+ "eax": 0,
+ "ecx": 0
+ }
+ },
+ "highest_extension_support": {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=80000000h:_Get_Highest_Extended_Function_Implemented",
+ "input": {
+ "eax": 2147483648,
+ "ecx": 0
+ }
+ },
+ "flags": [
+ {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=1:_Processor_Info_and_Feature_Bits",
+ "input": {
+ "eax": 1,
+ "ecx": 0
+ },
+ "bits": [
+ {
+ "name": "fpu",
+ "register": "edx",
+ "bit": 0
+ },
+ {
+ "name": "vme",
+ "register": "edx",
+ "bit": 1
+ },
+ {
+ "name": "de",
+ "register": "edx",
+ "bit": 2
+ },
+ {
+ "name": "pse",
+ "register": "edx",
+ "bit": 3
+ },
+ {
+ "name": "tsc",
+ "register": "edx",
+ "bit": 4
+ },
+ {
+ "name": "msr",
+ "register": "edx",
+ "bit": 5
+ },
+ {
+ "name": "pae",
+ "register": "edx",
+ "bit": 6
+ },
+ {
+ "name": "mce",
+ "register": "edx",
+ "bit": 7
+ },
+ {
+ "name": "cx8",
+ "register": "edx",
+ "bit": 8
+ },
+ {
+ "name": "apic",
+ "register": "edx",
+ "bit": 9
+ },
+ {
+ "name": "sep",
+ "register": "edx",
+ "bit": 11
+ },
+ {
+ "name": "mtrr",
+ "register": "edx",
+ "bit": 12
+ },
+ {
+ "name": "pge",
+ "register": "edx",
+ "bit": 13
+ },
+ {
+ "name": "mca",
+ "register": "edx",
+ "bit": 14
+ },
+ {
+ "name": "cmov",
+ "register": "edx",
+ "bit": 15
+ },
+ {
+ "name": "pat",
+ "register": "edx",
+ "bit": 16
+ },
+ {
+ "name": "pse36",
+ "register": "edx",
+ "bit": 17
+ },
+ {
+ "name": "pn",
+ "register": "edx",
+ "bit": 18
+ },
+ {
+ "name": "clflush",
+ "register": "edx",
+ "bit": 19
+ },
+ {
+ "name": "dts",
+ "register": "edx",
+ "bit": 21
+ },
+ {
+ "name": "acpi",
+ "register": "edx",
+ "bit": 22
+ },
+ {
+ "name": "mmx",
+ "register": "edx",
+ "bit": 23
+ },
+ {
+ "name": "fxsr",
+ "register": "edx",
+ "bit": 24
+ },
+ {
+ "name": "sse",
+ "register": "edx",
+ "bit": 25
+ },
+ {
+ "name": "sse2",
+ "register": "edx",
+ "bit": 26
+ },
+ {
+ "name": "ss",
+ "register": "edx",
+ "bit": 27
+ },
+ {
+ "name": "ht",
+ "register": "edx",
+ "bit": 28
+ },
+ {
+ "name": "tm",
+ "register": "edx",
+ "bit": 29
+ },
+ {
+ "name": "ia64",
+ "register": "edx",
+ "bit": 30
+ },
+ {
+ "name": "pbe",
+ "register": "edx",
+ "bit": 31
+ },
+ {
+ "name": "pni",
+ "register": "ecx",
+ "bit": 0
+ },
+ {
+ "name": "pclmulqdq",
+ "register": "ecx",
+ "bit": 1
+ },
+ {
+ "name": "dtes64",
+ "register": "ecx",
+ "bit": 2
+ },
+ {
+ "name": "monitor",
+ "register": "ecx",
+ "bit": 3
+ },
+ {
+ "name": "ds_cpl",
+ "register": "ecx",
+ "bit": 4
+ },
+ {
+ "name": "vmx",
+ "register": "ecx",
+ "bit": 5
+ },
+ {
+ "name": "smx",
+ "register": "ecx",
+ "bit": 6
+ },
+ {
+ "name": "est",
+ "register": "ecx",
+ "bit": 7
+ },
+ {
+ "name": "tm2",
+ "register": "ecx",
+ "bit": 8
+ },
+ {
+ "name": "ssse3",
+ "register": "ecx",
+ "bit": 9
+ },
+ {
+ "name": "cid",
+ "register": "ecx",
+ "bit": 10
+ },
+ {
+ "name": "fma",
+ "register": "ecx",
+ "bit": 12
+ },
+ {
+ "name": "cx16",
+ "register": "ecx",
+ "bit": 13
+ },
+ {
+ "name": "xtpr",
+ "register": "ecx",
+ "bit": 14
+ },
+ {
+ "name": "pdcm",
+ "register": "ecx",
+ "bit": 15
+ },
+ {
+ "name": "pcid",
+ "register": "ecx",
+ "bit": 17
+ },
+ {
+ "name": "dca",
+ "register": "ecx",
+ "bit": 18
+ },
+ {
+ "name": "sse4_1",
+ "register": "ecx",
+ "bit": 19
+ },
+ {
+ "name": "sse4_2",
+ "register": "ecx",
+ "bit": 20
+ },
+ {
+ "name": "x2apic",
+ "register": "ecx",
+ "bit": 21
+ },
+ {
+ "name": "movbe",
+ "register": "ecx",
+ "bit": 22
+ },
+ {
+ "name": "popcnt",
+ "register": "ecx",
+ "bit": 23
+ },
+ {
+ "name": "tscdeadline",
+ "register": "ecx",
+ "bit": 24
+ },
+ {
+ "name": "aes",
+ "register": "ecx",
+ "bit": 25
+ },
+ {
+ "name": "xsave",
+ "register": "ecx",
+ "bit": 26
+ },
+ {
+ "name": "osxsave",
+ "register": "ecx",
+ "bit": 27
+ },
+ {
+ "name": "avx",
+ "register": "ecx",
+ "bit": 28
+ },
+ {
+ "name": "f16c",
+ "register": "ecx",
+ "bit": 29
+ },
+ {
+ "name": "rdrand",
+ "register": "ecx",
+ "bit": 30
+ },
+ {
+ "name": "hypervisor",
+ "register": "ecx",
+ "bit": 31
+ }
+ ]
+ },
+ {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features",
+ "input": {
+ "eax": 7,
+ "ecx": 0
+ },
+ "bits": [
+ {
+ "name": "fsgsbase",
+ "register": "ebx",
+ "bit": 0
+ },
+ {
+ "name": "sgx",
+ "register": "ebx",
+ "bit": 2
+ },
+ {
+ "name": "bmi1",
+ "register": "ebx",
+ "bit": 3
+ },
+ {
+ "name": "hle",
+ "register": "ebx",
+ "bit": 4
+ },
+ {
+ "name": "avx2",
+ "register": "ebx",
+ "bit": 5
+ },
+ {
+ "name": "fdp-excptn-only",
+ "register": "ebx",
+ "bit": 6
+ },
+ {
+ "name": "smep",
+ "register": "ebx",
+ "bit": 7
+ },
+ {
+ "name": "bmi2",
+ "register": "ebx",
+ "bit": 8
+ },
+ {
+ "name": "erms",
+ "register": "ebx",
+ "bit": 9
+ },
+ {
+ "name": "invpcid",
+ "register": "ebx",
+ "bit": 10
+ },
+ {
+ "name": "rtm",
+ "register": "ebx",
+ "bit": 11
+ },
+ {
+ "name": "pqm",
+ "register": "ebx",
+ "bit": 12
+ },
+ {
+ "name": "mpx",
+ "register": "ebx",
+ "bit": 14
+ },
+ {
+ "name": "pqe",
+ "register": "ebx",
+ "bit": 15
+ },
+ {
+ "name": "avx512f",
+ "register": "ebx",
+ "bit": 16
+ },
+ {
+ "name": "avx512dq",
+ "register": "ebx",
+ "bit": 17
+ },
+ {
+ "name": "rdseed",
+ "register": "ebx",
+ "bit": 18
+ },
+ {
+ "name": "adx",
+ "register": "ebx",
+ "bit": 19
+ },
+ {
+ "name": "smap",
+ "register": "ebx",
+ "bit": 20
+ },
+ {
+ "name": "avx512ifma",
+ "register": "ebx",
+ "bit": 21
+ },
+ {
+ "name": "pcommit",
+ "register": "ebx",
+ "bit": 22
+ },
+ {
+ "name": "clflushopt",
+ "register": "ebx",
+ "bit": 23
+ },
+ {
+ "name": "clwb",
+ "register": "ebx",
+ "bit": 24
+ },
+ {
+ "name": "intel_pt",
+ "register": "ebx",
+ "bit": 25
+ },
+ {
+ "name": "avx512pf",
+ "register": "ebx",
+ "bit": 26
+ },
+ {
+ "name": "avx512er",
+ "register": "ebx",
+ "bit": 27
+ },
+ {
+ "name": "avx512cd",
+ "register": "ebx",
+ "bit": 28
+ },
+ {
+ "name": "sha_ni",
+ "register": "ebx",
+ "bit": 29
+ },
+ {
+ "name": "avx512bw",
+ "register": "ebx",
+ "bit": 30
+ },
+ {
+ "name": "avx512vl",
+ "register": "ebx",
+ "bit": 31
+ },
+ {
+ "name": "prefetchwt1",
+ "register": "ecx",
+ "bit": 0
+ },
+ {
+ "name": "avx512vbmi",
+ "register": "ecx",
+ "bit": 1
+ },
+ {
+ "name": "umip",
+ "register": "ecx",
+ "bit": 2
+ },
+ {
+ "name": "pku",
+ "register": "ecx",
+ "bit": 3
+ },
+ {
+ "name": "ospke",
+ "register": "ecx",
+ "bit": 4
+ },
+ {
+ "name": "waitpkg",
+ "register": "ecx",
+ "bit": 5
+ },
+ {
+ "name": "avx512_vbmi2",
+ "register": "ecx",
+ "bit": 6
+ },
+ {
+ "name": "cet_ss",
+ "register": "ecx",
+ "bit": 7
+ },
+ {
+ "name": "gfni",
+ "register": "ecx",
+ "bit": 8
+ },
+ {
+ "name": "vaes",
+ "register": "ecx",
+ "bit": 9
+ },
+ {
+ "name": "vpclmulqdq",
+ "register": "ecx",
+ "bit": 10
+ },
+ {
+ "name": "avx512_vnni",
+ "register": "ecx",
+ "bit": 11
+ },
+ {
+ "name": "avx512_bitalg",
+ "register": "ecx",
+ "bit": 12
+ },
+ {
+ "name": "tme",
+ "register": "ecx",
+ "bit": 13
+ },
+ {
+ "name": "avx512_vpopcntdq",
+ "register": "ecx",
+ "bit": 14
+ },
+ {
+ "name": "rdpid",
+ "register": "ecx",
+ "bit": 22
+ },
+ {
+ "name": "cldemote",
+ "register": "ecx",
+ "bit": 25
+ },
+ {
+ "name": "movdiri",
+ "register": "ecx",
+ "bit": 27
+ },
+ {
+ "name": "movdir64b",
+ "register": "ecx",
+ "bit": 28
+ },
+ {
+ "name": "enqcmd",
+ "register": "ecx",
+ "bit": 29
+ },
+ {
+ "name": "sgx_lc",
+ "register": "ecx",
+ "bit": 30
+ },
+ {
+ "name": "pks",
+ "register": "ecx",
+ "bit": 31
+ },
+ {
+ "name": "fsrm",
+ "register": "edx",
+ "bit": 4
+ },
+ {
+ "name": "avx512_vp2intersect",
+ "register": "edx",
+ "bit": 8
+ },
+ {
+ "name": "md_clear",
+ "register": "edx",
+ "bit": 10
+ },
+ {
+ "name": "serialize",
+ "register": "edx",
+ "bit": 14
+ },
+ {
+ "name": "tsxldtrk",
+ "register": "edx",
+ "bit": 16
+ },
+ {
+ "name": "amx_bf16",
+ "register": "edx",
+ "bit": 22
+ },
+ {
+ "name": "avx512_fp16",
+ "register": "edx",
+ "bit": 23
+ },
+ {
+ "name": "amx_tile",
+ "register": "edx",
+ "bit": 24
+ },
+ {
+ "name": "amx_int8",
+ "register": "edx",
+ "bit": 25
+ },
+ {
+ "name": "ssbd",
+ "register": "edx",
+ "bit": 31
+ }
+ ]
+ },
+ {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features",
+ "input": {
+ "eax": 7,
+ "ecx": 1
+ },
+ "bits": [
+ {
+ "name": "sha512",
+ "register": "eax",
+ "bit": 0
+ },
+ {
+ "name": "sm3",
+ "register": "eax",
+ "bit": 1
+ },
+ {
+ "name": "sm4",
+ "register": "eax",
+ "bit": 2
+ },
+ {
+ "name": "rao_int",
+ "register": "eax",
+ "bit": 3
+ },
+ {
+ "name": "avx_vnni",
+ "register": "eax",
+ "bit": 4
+ },
+ {
+ "name": "avx512_bf16",
+ "register": "eax",
+ "bit": 5
+ },
+ {
+ "name": "cmpccxadd",
+ "register": "eax",
+ "bit": 7
+ },
+ {
+ "name": "arch_perfmon_ext",
+ "register": "eax",
+ "bit": 8
+ },
+ {
+ "name": "fzrm",
+ "register": "eax",
+ "bit": 10
+ },
+ {
+ "name": "fsrs",
+ "register": "eax",
+ "bit": 11
+ },
+ {
+ "name": "fsrc",
+ "register": "eax",
+ "bit": 12
+ },
+ {
+ "name": "lkgs",
+ "register": "eax",
+ "bit": 18
+ },
+ {
+ "name": "amx_fp16",
+ "register": "eax",
+ "bit": 21
+ },
+ {
+ "name": "avx_ifma",
+ "register": "eax",
+ "bit": 23
+ },
+ {
+ "name": "lam",
+ "register": "eax",
+ "bit": 26
+ }
+ ]
+ },
+ {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=0Dh:_XSAVE_features_and_state-components",
+ "input": {
+ "eax": 13,
+ "ecx": 1
+ },
+ "bits": [
+ {
+ "name": "xsaveopt",
+ "register": "eax",
+ "bit": 0
+ },
+ {
+ "name": "xsavec",
+ "register": "eax",
+ "bit": 1
+ },
+ {
+ "name": "xgetbv1",
+ "register": "eax",
+ "bit": 2
+ },
+ {
+ "name": "xsaves",
+ "register": "eax",
+ "bit": 3
+ },
+ {
+ "name": "xfd",
+ "register": "eax",
+ "bit": 4
+ }
+ ]
+ }
+ ],
+ "extension-flags": [
+ {
+ "description": "https://en.wikipedia.org/wiki/CPUID#EAX=0Dh:_XSAVE_features_and_state-components",
+ "input": {
+ "eax": 2147483649,
+ "ecx": 0
+ },
+ "bits": [
+ {
+ "name": "fpu",
+ "register": "edx",
+ "bit": 0
+ },
+ {
+ "name": "vme",
+ "register": "edx",
+ "bit": 1
+ },
+ {
+ "name": "de",
+ "register": "edx",
+ "bit": 2
+ },
+ {
+ "name": "pse",
+ "register": "edx",
+ "bit": 3
+ },
+ {
+ "name": "tsc",
+ "register": "edx",
+ "bit": 4
+ },
+ {
+ "name": "msr",
+ "register": "edx",
+ "bit": 5
+ },
+ {
+ "name": "pae",
+ "register": "edx",
+ "bit": 6
+ },
+ {
+ "name": "mce",
+ "register": "edx",
+ "bit": 7
+ },
+ {
+ "name": "cx8",
+ "register": "edx",
+ "bit": 8
+ },
+ {
+ "name": "apic",
+ "register": "edx",
+ "bit": 9
+ },
+ {
+ "name": "syscall",
+ "register": "edx",
+ "bit": 10
+ },
+ {
+ "name": "syscall",
+ "register": "edx",
+ "bit": 11
+ },
+ {
+ "name": "mtrr",
+ "register": "edx",
+ "bit": 12
+ },
+ {
+ "name": "pge",
+ "register": "edx",
+ "bit": 13
+ },
+ {
+ "name": "mca",
+ "register": "edx",
+ "bit": 14
+ },
+ {
+ "name": "cmov",
+ "register": "edx",
+ "bit": 15
+ },
+ {
+ "name": "pat",
+ "register": "edx",
+ "bit": 16
+ },
+ {
+ "name": "pse36",
+ "register": "edx",
+ "bit": 17
+ },
+ {
+ "name": "mp",
+ "register": "edx",
+ "bit": 19
+ },
+ {
+ "name": "nx",
+ "register": "edx",
+ "bit": 20
+ },
+ {
+ "name": "mmxext",
+ "register": "edx",
+ "bit": 22
+ },
+ {
+ "name": "mmx",
+ "register": "edx",
+ "bit": 23
+ },
+ {
+ "name": "fxsr",
+ "register": "edx",
+ "bit": 24
+ },
+ {
+ "name": "fxsr_opt",
+ "register": "edx",
+ "bit": 25
+ },
+ {
+ "name": "pdpe1gp",
+ "register": "edx",
+ "bit": 26
+ },
+ {
+ "name": "rdtscp",
+ "register": "edx",
+ "bit": 27
+ },
+ {
+ "name": "lm",
+ "register": "edx",
+ "bit": 29
+ },
+ {
+ "name": "3dnowext",
+ "register": "edx",
+ "bit": 30
+ },
+ {
+ "name": "3dnow",
+ "register": "edx",
+ "bit": 31
+ },
+ {
+ "name": "lahf_lm",
+ "register": "ecx",
+ "bit": 0
+ },
+ {
+ "name": "cmp_legacy",
+ "register": "ecx",
+ "bit": 1
+ },
+ {
+ "name": "svm",
+ "register": "ecx",
+ "bit": 2
+ },
+ {
+ "name": "extapic",
+ "register": "ecx",
+ "bit": 3
+ },
+ {
+ "name": "cr8_legacy",
+ "register": "ecx",
+ "bit": 4
+ },
+ {
+ "name": "abm",
+ "register": "ecx",
+ "bit": 5
+ },
+ {
+ "name": "sse4a",
+ "register": "ecx",
+ "bit": 6
+ },
+ {
+ "name": "misalignsse",
+ "register": "ecx",
+ "bit": 7
+ },
+ {
+ "name": "3dnowprefetch",
+ "register": "ecx",
+ "bit": 8
+ },
+ {
+ "name": "osvw",
+ "register": "ecx",
+ "bit": 9
+ },
+ {
+ "name": "ibs",
+ "register": "ecx",
+ "bit": 10
+ },
+ {
+ "name": "xop",
+ "register": "ecx",
+ "bit": 11
+ },
+ {
+ "name": "skinit",
+ "register": "ecx",
+ "bit": 12
+ },
+ {
+ "name": "wdt",
+ "register": "ecx",
+ "bit": 13
+ },
+ {
+ "name": "lwp",
+ "register": "ecx",
+ "bit": 15
+ },
+ {
+ "name": "fma4",
+ "register": "ecx",
+ "bit": 16
+ },
+ {
+ "name": "tce",
+ "register": "ecx",
+ "bit": 17
+ },
+ {
+ "name": "nodeid_msr",
+ "register": "ecx",
+ "bit": 19
+ },
+ {
+ "name": "tbm",
+ "register": "ecx",
+ "bit": 21
+ },
+ {
+ "name": "topoext",
+ "register": "ecx",
+ "bit": 22
+ },
+ {
+ "name": "perfctr_core",
+ "register": "ecx",
+ "bit": 23
+ },
+ {
+ "name": "perfctr_nb",
+ "register": "ecx",
+ "bit": 24
+ },
+ {
+ "name": "dbx",
+ "register": "ecx",
+ "bit": 26
+ },
+ {
+ "name": "perftsc",
+ "register": "ecx",
+ "bit": 27
+ },
+ {
+ "name": "pci_l2i",
+ "register": "ecx",
+ "bit": 28
+ },
+ {
+ "name": "mwaitx",
+ "register": "ecx",
+ "bit": 29
+ }
+ ]
+ }
+ ]
+}
diff --git a/lib/spack/external/archspec/json/cpu/cpuid_schema.json b/lib/spack/external/archspec/json/cpu/cpuid_schema.json
new file mode 100644
index 0000000000..8dc5b982ea
--- /dev/null
+++ b/lib/spack/external/archspec/json/cpu/cpuid_schema.json
@@ -0,0 +1,134 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Schema for microarchitecture definitions and feature aliases",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "vendor": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "eax": {
+ "type": "integer"
+ },
+ "ecx": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
+ "highest_extension_support": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "eax": {
+ "type": "integer"
+ },
+ "ecx": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
+ "flags": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "eax": {
+ "type": "integer"
+ },
+ "ecx": {
+ "type": "integer"
+ }
+ }
+ },
+ "bits": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "register": {
+ "type": "string"
+ },
+ "bit": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "extension-flags": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "eax": {
+ "type": "integer"
+ },
+ "ecx": {
+ "type": "integer"
+ }
+ }
+ },
+ "bits": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "register": {
+ "type": "string"
+ },
+ "bit": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json
index 1e77caba4a..9275422ef4 100644
--- a/lib/spack/external/archspec/json/cpu/microarchitectures.json
+++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json
@@ -1482,7 +1482,6 @@
"cldemote",
"movdir64b",
"movdiri",
- "pdcm",
"serialize",
"waitpkg"
],
@@ -2225,14 +2224,96 @@
],
"nvhpc": [
{
- "versions": "21.11:",
+ "versions": "21.11:23.8",
"name": "zen3",
"flags": "-tp {name}",
- "warnings": "zen4 is not fully supported by nvhpc yet, falling back to zen3"
+ "warnings": "zen4 is not fully supported by nvhpc versions < 23.9, falling back to zen3"
+ },
+ {
+ "versions": "23.9:",
+ "flags": "-tp {name}"
}
]
}
},
+ "zen5": {
+ "from": ["zen4"],
+ "vendor": "AuthenticAMD",
+ "features": [
+ "abm",
+ "aes",
+ "avx",
+ "avx2",
+ "avx512_bf16",
+ "avx512_bitalg",
+ "avx512bw",
+ "avx512cd",
+ "avx512dq",
+ "avx512f",
+ "avx512ifma",
+ "avx512vbmi",
+ "avx512_vbmi2",
+ "avx512vl",
+ "avx512_vnni",
+ "avx512_vp2intersect",
+ "avx512_vpopcntdq",
+ "avx_vnni",
+ "bmi1",
+ "bmi2",
+ "clflushopt",
+ "clwb",
+ "clzero",
+ "cppc",
+ "cx16",
+ "f16c",
+ "flush_l1d",
+ "fma",
+ "fsgsbase",
+ "gfni",
+ "ibrs_enhanced",
+ "mmx",
+ "movbe",
+ "movdir64b",
+ "movdiri",
+ "pclmulqdq",
+ "popcnt",
+ "rdseed",
+ "sse",
+ "sse2",
+ "sse4_1",
+ "sse4_2",
+ "sse4a",
+ "ssse3",
+ "tsc_adjust",
+ "vaes",
+ "vpclmulqdq",
+ "xsavec",
+ "xsaveopt"
+ ],
+ "compilers": {
+ "gcc": [
+ {
+ "versions": "14.1:",
+ "name": "znver5",
+ "flags": "-march={name} -mtune={name}"
+ }
+ ],
+ "aocc": [
+ {
+ "versions": "5.0:",
+ "name": "znver5",
+ "flags": "-march={name} -mtune={name}"
+ }
+ ],
+ "clang": [
+ {
+ "versions": "19.1:",
+ "name": "znver5",
+ "flags": "-march={name} -mtune={name}"
+ }
+ ]
+ }
+ },
"ppc64": {
"from": [],
"vendor": "generic",
@@ -2711,7 +2792,8 @@
"flags": "-mcpu=thunderx2t99"
}
]
- }
+ },
+ "cpupart": "0x0af"
},
"a64fx": {
"from": ["armv8.2a"],
@@ -2779,7 +2861,8 @@
"flags": "-march=armv8.2-a+crc+crypto+fp16+sve"
}
]
- }
+ },
+ "cpupart": "0x001"
},
"cortex_a72": {
"from": ["aarch64"],
@@ -2816,7 +2899,8 @@
"flags" : "-mcpu=cortex-a72"
}
]
- }
+ },
+ "cpupart": "0xd08"
},
"neoverse_n1": {
"from": ["cortex_a72", "armv8.2a"],
@@ -2837,8 +2921,7 @@
"asimdrdm",
"lrcpc",
"dcpop",
- "asimddp",
- "ssbs"
+ "asimddp"
],
"compilers" : {
"gcc": [
@@ -2902,7 +2985,8 @@
"flags": "-tp {name}"
}
]
- }
+ },
+ "cpupart": "0xd0c"
},
"neoverse_v1": {
"from": ["neoverse_n1", "armv8.4a"],
@@ -2926,8 +3010,6 @@
"lrcpc",
"dcpop",
"sha3",
- "sm3",
- "sm4",
"asimddp",
"sha512",
"sve",
@@ -2936,9 +3018,6 @@
"uscat",
"ilrcpc",
"flagm",
- "ssbs",
- "paca",
- "pacg",
"dcpodp",
"svei8mm",
"svebf16",
@@ -3006,7 +3085,7 @@
},
{
"versions": "11:",
- "flags" : "-march=armv8.4-a+sve+ssbs+fp16+bf16+crypto+i8mm+rng"
+ "flags" : "-march=armv8.4-a+sve+fp16+bf16+crypto+i8mm+rng"
},
{
"versions": "12:",
@@ -3030,7 +3109,8 @@
"flags": "-tp {name}"
}
]
- }
+ },
+ "cpupart": "0xd40"
},
"neoverse_v2": {
"from": ["neoverse_n1", "armv9.0a"],
@@ -3054,35 +3134,22 @@
"lrcpc",
"dcpop",
"sha3",
- "sm3",
- "sm4",
"asimddp",
"sha512",
"sve",
"asimdfhm",
- "dit",
"uscat",
"ilrcpc",
"flagm",
- "ssbs",
"sb",
- "paca",
- "pacg",
"dcpodp",
"sve2",
- "sveaes",
- "svepmull",
- "svebitperm",
- "svesha3",
- "svesm4",
"flagm2",
"frint",
"svei8mm",
"svebf16",
"i8mm",
- "bf16",
- "dgh",
- "bti"
+ "bf16"
],
"compilers" : {
"gcc": [
@@ -3107,15 +3174,19 @@
"flags" : "-march=armv8.5-a+sve -mtune=cortex-a76"
},
{
- "versions": "10.0:11.99",
+ "versions": "10.0:11.3.99",
"flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16 -mtune=cortex-a77"
},
+ {
+ "versions": "11.4:11.99",
+ "flags" : "-mcpu=neoverse-v2"
+ },
{
- "versions": "12.0:12.99",
+ "versions": "12.0:12.2.99",
"flags" : "-march=armv9-a+i8mm+bf16 -mtune=cortex-a710"
},
{
- "versions": "13.0:",
+ "versions": "12.3:",
"flags" : "-mcpu=neoverse-v2"
}
],
@@ -3150,7 +3221,112 @@
"flags": "-tp {name}"
}
]
- }
+ },
+ "cpupart": "0xd4f"
+ },
+ "neoverse_n2": {
+ "from": ["neoverse_n1", "armv9.0a"],
+ "vendor": "ARM",
+ "features": [
+ "fp",
+ "asimd",
+ "evtstrm",
+ "aes",
+ "pmull",
+ "sha1",
+ "sha2",
+ "crc32",
+ "atomics",
+ "fphp",
+ "asimdhp",
+ "cpuid",
+ "asimdrdm",
+ "jscvt",
+ "fcma",
+ "lrcpc",
+ "dcpop",
+ "sha3",
+ "asimddp",
+ "sha512",
+ "sve",
+ "asimdfhm",
+ "uscat",
+ "ilrcpc",
+ "flagm",
+ "sb",
+ "dcpodp",
+ "sve2",
+ "flagm2",
+ "frint",
+ "svei8mm",
+ "svebf16",
+ "i8mm",
+ "bf16"
+ ],
+ "compilers" : {
+ "gcc": [
+ {
+ "versions": "4.8:5.99",
+ "flags": "-march=armv8-a"
+ },
+ {
+ "versions": "6:6.99",
+ "flags" : "-march=armv8.1-a"
+ },
+ {
+ "versions": "7.0:7.99",
+ "flags" : "-march=armv8.2-a -mtune=cortex-a72"
+ },
+ {
+ "versions": "8.0:8.99",
+ "flags" : "-march=armv8.4-a+sve -mtune=cortex-a72"
+ },
+ {
+ "versions": "9.0:9.99",
+ "flags" : "-march=armv8.5-a+sve -mtune=cortex-a76"
+ },
+ {
+ "versions": "10.0:10.99",
+ "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16 -mtune=cortex-a77"
+ },
+ {
+ "versions": "11.0:",
+ "flags" : "-mcpu=neoverse-n2"
+ }
+ ],
+ "clang" : [
+ {
+ "versions": "9.0:10.99",
+ "flags" : "-march=armv8.5-a+sve"
+ },
+ {
+ "versions": "11.0:13.99",
+ "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16"
+ },
+ {
+ "versions": "14.0:15.99",
+ "flags" : "-march=armv9-a+i8mm+bf16"
+ },
+ {
+ "versions": "16.0:",
+ "flags" : "-mcpu=neoverse-n2"
+ }
+ ],
+ "arm" : [
+ {
+ "versions": "23.04.0:",
+ "flags" : "-mcpu=neoverse-n2"
+ }
+ ],
+ "nvhpc" : [
+ {
+ "versions": "23.3:",
+ "name": "neoverse-n1",
+ "flags": "-tp {name}"
+ }
+ ]
+ },
+ "cpupart": "0xd49"
},
"m1": {
"from": ["armv8.4a"],
@@ -3216,7 +3392,8 @@
"flags" : "-mcpu=apple-m1"
}
]
- }
+ },
+ "cpupart": "0x022"
},
"m2": {
"from": ["m1", "armv8.5a"],
@@ -3294,7 +3471,8 @@
"flags" : "-mcpu=apple-m2"
}
]
- }
+ },
+ "cpupart": "0x032"
},
"arm": {
"from": [],
diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json b/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json
index c21a3a1b37..085e5b9577 100644
--- a/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json
+++ b/lib/spack/external/archspec/json/cpu/microarchitectures_schema.json
@@ -52,6 +52,9 @@
}
}
}
+ },
+ "cpupart": {
+ "type": "string"
}
},
"required": [
@@ -107,4 +110,4 @@
"additionalProperties": false
}
}
-}
+} \ No newline at end of file
diff --git a/lib/spack/external/archspec/vendor/cpuid/LICENSE b/lib/spack/external/archspec/vendor/cpuid/LICENSE
new file mode 100644
index 0000000000..af36480022
--- /dev/null
+++ b/lib/spack/external/archspec/vendor/cpuid/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Anders Høst
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/lib/spack/external/archspec/vendor/cpuid/README.md b/lib/spack/external/archspec/vendor/cpuid/README.md
new file mode 100644
index 0000000000..4c79e37d86
--- /dev/null
+++ b/lib/spack/external/archspec/vendor/cpuid/README.md
@@ -0,0 +1,76 @@
+cpuid.py
+========
+
+Now, this is silly!
+
+Pure Python library for accessing information about x86 processors
+by querying the [CPUID](http://en.wikipedia.org/wiki/CPUID)
+instruction. Well, not exactly pure Python...
+
+It works by allocating a small piece of virtual memory, copying
+a raw x86 function to that memory, giving the memory execute
+permissions and then calling the memory as a function. The injected
+function executes the CPUID instruction and copies the result back
+to a ctypes.Structure where is can be read by Python.
+
+It should work fine on both 32 and 64 bit versions of Windows and Linux
+running x86 processors. Apple OS X and other BSD systems should also work,
+not tested though...
+
+
+Why?
+----
+For poops and giggles. Plus, having access to a low-level feature
+without having to compile a C wrapper is pretty neat.
+
+
+Examples
+--------
+Getting info with eax=0:
+
+ import cpuid
+
+ q = cpuid.CPUID()
+ eax, ebx, ecx, edx = q(0)
+
+Running the files:
+
+ $ python example.py
+ Vendor ID : GenuineIntel
+ CPU name : Intel(R) Xeon(R) CPU W3550 @ 3.07GHz
+
+ Vector instructions supported:
+ SSE : Yes
+ SSE2 : Yes
+ SSE3 : Yes
+ SSSE3 : Yes
+ SSE4.1 : Yes
+ SSE4.2 : Yes
+ SSE4a : --
+ AVX : --
+ AVX2 : --
+
+ $ python cpuid.py
+ CPUID A B C D
+ 00000000 0000000b 756e6547 6c65746e 49656e69
+ 00000001 000106a5 00100800 009ce3bd bfebfbff
+ 00000002 55035a01 00f0b2e4 00000000 09ca212c
+ 00000003 00000000 00000000 00000000 00000000
+ 00000004 00000000 00000000 00000000 00000000
+ 00000005 00000040 00000040 00000003 00001120
+ 00000006 00000003 00000002 00000001 00000000
+ 00000007 00000000 00000000 00000000 00000000
+ 00000008 00000000 00000000 00000000 00000000
+ 00000009 00000000 00000000 00000000 00000000
+ 0000000a 07300403 00000044 00000000 00000603
+ 0000000b 00000000 00000000 00000095 00000000
+ 80000000 80000008 00000000 00000000 00000000
+ 80000001 00000000 00000000 00000001 28100800
+ 80000002 65746e49 2952286c 6f655820 2952286e
+ 80000003 55504320 20202020 20202020 57202020
+ 80000004 30353533 20402020 37302e33 007a4847
+ 80000005 00000000 00000000 00000000 00000000
+ 80000006 00000000 00000000 01006040 00000000
+ 80000007 00000000 00000000 00000000 00000100
+ 80000008 00003024 00000000 00000000 00000000
+
diff --git a/lib/spack/external/archspec/vendor/cpuid/cpuid.py b/lib/spack/external/archspec/vendor/cpuid/cpuid.py
new file mode 100644
index 0000000000..79c15d16d1
--- /dev/null
+++ b/lib/spack/external/archspec/vendor/cpuid/cpuid.py
@@ -0,0 +1,172 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2024 Anders Høst
+#
+
+from __future__ import print_function
+
+import platform
+import os
+import ctypes
+from ctypes import c_uint32, c_long, c_ulong, c_size_t, c_void_p, POINTER, CFUNCTYPE
+
+# Posix x86_64:
+# Three first call registers : RDI, RSI, RDX
+# Volatile registers : RAX, RCX, RDX, RSI, RDI, R8-11
+
+# Windows x86_64:
+# Three first call registers : RCX, RDX, R8
+# Volatile registers : RAX, RCX, RDX, R8-11
+
+# cdecl 32 bit:
+# Three first call registers : Stack (%esp)
+# Volatile registers : EAX, ECX, EDX
+
+_POSIX_64_OPC = [
+ 0x53, # push %rbx
+ 0x89, 0xf0, # mov %esi,%eax
+ 0x89, 0xd1, # mov %edx,%ecx
+ 0x0f, 0xa2, # cpuid
+ 0x89, 0x07, # mov %eax,(%rdi)
+ 0x89, 0x5f, 0x04, # mov %ebx,0x4(%rdi)
+ 0x89, 0x4f, 0x08, # mov %ecx,0x8(%rdi)
+ 0x89, 0x57, 0x0c, # mov %edx,0xc(%rdi)
+ 0x5b, # pop %rbx
+ 0xc3 # retq
+]
+
+_WINDOWS_64_OPC = [
+ 0x53, # push %rbx
+ 0x89, 0xd0, # mov %edx,%eax
+ 0x49, 0x89, 0xc9, # mov %rcx,%r9
+ 0x44, 0x89, 0xc1, # mov %r8d,%ecx
+ 0x0f, 0xa2, # cpuid
+ 0x41, 0x89, 0x01, # mov %eax,(%r9)
+ 0x41, 0x89, 0x59, 0x04, # mov %ebx,0x4(%r9)
+ 0x41, 0x89, 0x49, 0x08, # mov %ecx,0x8(%r9)
+ 0x41, 0x89, 0x51, 0x0c, # mov %edx,0xc(%r9)
+ 0x5b, # pop %rbx
+ 0xc3 # retq
+]
+
+_CDECL_32_OPC = [
+ 0x53, # push %ebx
+ 0x57, # push %edi
+ 0x8b, 0x7c, 0x24, 0x0c, # mov 0xc(%esp),%edi
+ 0x8b, 0x44, 0x24, 0x10, # mov 0x10(%esp),%eax
+ 0x8b, 0x4c, 0x24, 0x14, # mov 0x14(%esp),%ecx
+ 0x0f, 0xa2, # cpuid
+ 0x89, 0x07, # mov %eax,(%edi)
+ 0x89, 0x5f, 0x04, # mov %ebx,0x4(%edi)
+ 0x89, 0x4f, 0x08, # mov %ecx,0x8(%edi)
+ 0x89, 0x57, 0x0c, # mov %edx,0xc(%edi)
+ 0x5f, # pop %edi
+ 0x5b, # pop %ebx
+ 0xc3 # ret
+]
+
+is_windows = os.name == "nt"
+is_64bit = ctypes.sizeof(ctypes.c_voidp) == 8
+
+
+class CPUID_struct(ctypes.Structure):
+ _register_names = ("eax", "ebx", "ecx", "edx")
+ _fields_ = [(r, c_uint32) for r in _register_names]
+
+ def __getitem__(self, item):
+ if item not in self._register_names:
+ raise KeyError(item)
+ return getattr(self, item)
+
+ def __repr__(self):
+ return "eax=0x{:x}, ebx=0x{:x}, ecx=0x{:x}, edx=0x{:x}".format(self.eax, self.ebx, self.ecx, self.edx)
+
+
+class CPUID(object):
+ def __init__(self):
+ if platform.machine() not in ("AMD64", "x86_64", "x86", "i686"):
+ raise SystemError("Only available for x86")
+
+ if is_windows:
+ if is_64bit:
+ # VirtualAlloc seems to fail under some weird
+ # circumstances when ctypes.windll.kernel32 is
+ # used under 64 bit Python. CDLL fixes this.
+ self.win = ctypes.CDLL("kernel32.dll")
+ opc = _WINDOWS_64_OPC
+ else:
+ # Here ctypes.windll.kernel32 is needed to get the
+ # right DLL. Otherwise it will fail when running
+ # 32 bit Python on 64 bit Windows.
+ self.win = ctypes.windll.kernel32
+ opc = _CDECL_32_OPC
+ else:
+ opc = _POSIX_64_OPC if is_64bit else _CDECL_32_OPC
+
+ size = len(opc)
+ code = (ctypes.c_ubyte * size)(*opc)
+
+ if is_windows:
+ self.win.VirtualAlloc.restype = c_void_p
+ self.win.VirtualAlloc.argtypes = [ctypes.c_void_p, ctypes.c_size_t, ctypes.c_ulong, ctypes.c_ulong]
+ self.addr = self.win.VirtualAlloc(None, size, 0x1000, 0x40)
+ if not self.addr:
+ raise MemoryError("Could not allocate RWX memory")
+ ctypes.memmove(self.addr, code, size)
+ else:
+ from mmap import (
+ mmap,
+ MAP_PRIVATE,
+ MAP_ANONYMOUS,
+ PROT_WRITE,
+ PROT_READ,
+ PROT_EXEC,
+ )
+ self.mm = mmap(
+ -1,
+ size,
+ flags=MAP_PRIVATE | MAP_ANONYMOUS,
+ prot=PROT_WRITE | PROT_READ | PROT_EXEC,
+ )
+ self.mm.write(code)
+ self.addr = ctypes.addressof(ctypes.c_int.from_buffer(self.mm))
+
+ func_type = CFUNCTYPE(None, POINTER(CPUID_struct), c_uint32, c_uint32)
+ self.func_ptr = func_type(self.addr)
+
+ def __call__(self, eax, ecx=0):
+ struct = self.registers_for(eax=eax, ecx=ecx)
+ return struct.eax, struct.ebx, struct.ecx, struct.edx
+
+ def registers_for(self, eax, ecx=0):
+ """Calls cpuid with eax and ecx set as the input arguments, and returns a structure
+ containing eax, ebx, ecx, and edx.
+ """
+ struct = CPUID_struct()
+ self.func_ptr(struct, eax, ecx)
+ return struct
+
+ def __del__(self):
+ if is_windows:
+ self.win.VirtualFree.restype = c_long
+ self.win.VirtualFree.argtypes = [c_void_p, c_size_t, c_ulong]
+ self.win.VirtualFree(self.addr, 0, 0x8000)
+ else:
+ self.mm.close()
+
+
+
+if __name__ == "__main__":
+ def valid_inputs():
+ cpuid = CPUID()
+ for eax in (0x0, 0x80000000):
+ highest, _, _, _ = cpuid(eax)
+ while eax <= highest:
+ regs = cpuid(eax)
+ yield (eax, regs)
+ eax += 1
+
+
+ print(" ".join(x.ljust(8) for x in ("CPUID", "A", "B", "C", "D")).strip())
+ for eax, regs in valid_inputs():
+ print("%08x" % eax, " ".join("%08x" % reg for reg in regs))
diff --git a/lib/spack/external/archspec/vendor/cpuid/example.py b/lib/spack/external/archspec/vendor/cpuid/example.py
new file mode 100644
index 0000000000..e07e3c1521
--- /dev/null
+++ b/lib/spack/external/archspec/vendor/cpuid/example.py
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2024 Anders Høst
+#
+
+from __future__ import print_function
+
+import struct
+import cpuid
+
+
+def cpu_vendor(cpu):
+ _, b, c, d = cpu(0)
+ return struct.pack("III", b, d, c).decode("utf-8")
+
+
+def cpu_name(cpu):
+ name = "".join((struct.pack("IIII", *cpu(0x80000000 + i)).decode("utf-8")
+ for i in range(2, 5)))
+
+ return name.split('\x00', 1)[0]
+
+
+def is_set(cpu, leaf, subleaf, reg_idx, bit):
+ """
+ @param {leaf} %eax
+ @param {sublead} %ecx, 0 in most cases
+ @param {reg_idx} idx of [%eax, %ebx, %ecx, %edx], 0-based
+ @param {bit} bit of reg selected by {reg_idx}, 0-based
+ """
+
+ regs = cpu(leaf, subleaf)
+
+ if (1 << bit) & regs[reg_idx]:
+ return "Yes"
+ else:
+ return "--"
+
+
+if __name__ == "__main__":
+ cpu = cpuid.CPUID()
+
+ print("Vendor ID : %s" % cpu_vendor(cpu))
+ print("CPU name : %s" % cpu_name(cpu))
+ print()
+ print("Vector instructions supported:")
+ print("SSE : %s" % is_set(cpu, 1, 0, 3, 25))
+ print("SSE2 : %s" % is_set(cpu, 1, 0, 3, 26))
+ print("SSE3 : %s" % is_set(cpu, 1, 0, 2, 0))
+ print("SSSE3 : %s" % is_set(cpu, 1, 0, 2, 9))
+ print("SSE4.1 : %s" % is_set(cpu, 1, 0, 2, 19))
+ print("SSE4.2 : %s" % is_set(cpu, 1, 0, 2, 20))
+ print("SSE4a : %s" % is_set(cpu, 0x80000001, 0, 2, 6))
+ print("AVX : %s" % is_set(cpu, 1, 0, 2, 28))
+ print("AVX2 : %s" % is_set(cpu, 7, 0, 1, 5))
+ print("BMI1 : %s" % is_set(cpu, 7, 0, 1, 3))
+ print("BMI2 : %s" % is_set(cpu, 7, 0, 1, 8))
+ # Intel RDT CMT/MBM
+ print("L3 Monitoring : %s" % is_set(cpu, 0xf, 0, 3, 1))
+ print("L3 Occupancy : %s" % is_set(cpu, 0xf, 1, 3, 0))
+ print("L3 Total BW : %s" % is_set(cpu, 0xf, 1, 3, 1))
+ print("L3 Local BW : %s" % is_set(cpu, 0xf, 1, 3, 2))
diff --git a/lib/spack/external/patches/distro.patch b/lib/spack/external/patches/distro.patch
new file mode 100644
index 0000000000..067df63d45
--- /dev/null
+++ b/lib/spack/external/patches/distro.patch
@@ -0,0 +1,45 @@
+diff --git a/lib/spack/external/_vendoring/distro/distro.py b/lib/spack/external/_vendoring/distro/distro.py
+index 89e1868047..50c3b18d4d 100644
+--- a/lib/spack/external/_vendoring/distro/distro.py
++++ b/lib/spack/external/_vendoring/distro/distro.py
+@@ -1265,27 +1265,29 @@ def _distro_release_info(self) -> Dict[str, str]:
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ else:
+ try:
+- basenames = [
+- basename
+- for basename in os.listdir(self.etc_dir)
+- if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
+- and os.path.isfile(os.path.join(self.etc_dir, basename))
+- ]
++ with os.scandir(self.etc_dir) as it:
++ etc_files = [
++ p.path for p in it
++ if p.is_file() and p.name not in _DISTRO_RELEASE_IGNORE_BASENAMES
++ ]
+ # We sort for repeatability in cases where there are multiple
+ # distro specific files; e.g. CentOS, Oracle, Enterprise all
+ # containing `redhat-release` on top of their own.
+- basenames.sort()
++ etc_files.sort()
+ except OSError:
+ # This may occur when /etc is not readable but we can't be
+ # sure about the *-release files. Check common entries of
+ # /etc for information. If they turn out to not be there the
+ # error is handled in `_parse_distro_release_file()`.
+- basenames = _DISTRO_RELEASE_BASENAMES
+- for basename in basenames:
+- match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
++ etc_files = [
++ os.path.join(self.etc_dir, basename)
++ for basename in _DISTRO_RELEASE_BASENAMES
++ ]
++
++ for filepath in etc_files:
++ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(os.path.basename(filepath))
+ if match is None:
+ continue
+- filepath = os.path.join(self.etc_dir, basename)
+ distro_info = self._parse_distro_release_file(filepath)
+ # The name is always present if the pattern matches.
+ if "name" not in distro_info:
diff --git a/lib/spack/external/patches/jsonschema.patch b/lib/spack/external/patches/jsonschema.patch
index d22d87a3d6..c753c641c1 100644
--- a/lib/spack/external/patches/jsonschema.patch
+++ b/lib/spack/external/patches/jsonschema.patch
@@ -13,3 +13,191 @@ index 6b630cdfbb..1791fe7fbf 100644
-__version__ = metadata.version("jsonschema")
+
+__version__ = "3.2.0"
+diff --git a/lib/spack/external/_vendoring/jsonschema/_format.py b/lib/spack/external/_vendoring/jsonschema/_format.py
+index 281a7cfcff..29061e3661 100644
+--- a/lib/spack/external/_vendoring/jsonschema/_format.py
++++ b/lib/spack/external/_vendoring/jsonschema/_format.py
+@@ -231,96 +231,6 @@ def is_host_name(instance):
+ return True
+
+
+-try:
+- # The built-in `idna` codec only implements RFC 3890, so we go elsewhere.
+- import idna
+-except ImportError:
+- pass
+-else:
+- @_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
+- def is_idn_host_name(instance):
+- if not isinstance(instance, str_types):
+- return True
+- idna.encode(instance)
+- return True
+-
+-
+-try:
+- import rfc3987
+-except ImportError:
+- try:
+- from rfc3986_validator import validate_rfc3986
+- except ImportError:
+- pass
+- else:
+- @_checks_drafts(name="uri")
+- def is_uri(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return validate_rfc3986(instance, rule="URI")
+-
+- @_checks_drafts(
+- draft6="uri-reference",
+- draft7="uri-reference",
+- raises=ValueError,
+- )
+- def is_uri_reference(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return validate_rfc3986(instance, rule="URI_reference")
+-
+-else:
+- @_checks_drafts(draft7="iri", raises=ValueError)
+- def is_iri(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return rfc3987.parse(instance, rule="IRI")
+-
+- @_checks_drafts(draft7="iri-reference", raises=ValueError)
+- def is_iri_reference(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return rfc3987.parse(instance, rule="IRI_reference")
+-
+- @_checks_drafts(name="uri", raises=ValueError)
+- def is_uri(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return rfc3987.parse(instance, rule="URI")
+-
+- @_checks_drafts(
+- draft6="uri-reference",
+- draft7="uri-reference",
+- raises=ValueError,
+- )
+- def is_uri_reference(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return rfc3987.parse(instance, rule="URI_reference")
+-
+-
+-try:
+- from strict_rfc3339 import validate_rfc3339
+-except ImportError:
+- try:
+- from rfc3339_validator import validate_rfc3339
+- except ImportError:
+- validate_rfc3339 = None
+-
+-if validate_rfc3339:
+- @_checks_drafts(name="date-time")
+- def is_datetime(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return validate_rfc3339(instance)
+-
+- @_checks_drafts(draft7="time")
+- def is_time(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return is_datetime("1970-01-01T" + instance)
+-
+-
+ @_checks_drafts(name="regex", raises=re.error)
+ def is_regex(instance):
+ if not isinstance(instance, str_types):
+@@ -340,86 +250,3 @@ def is_draft3_time(instance):
+ if not isinstance(instance, str_types):
+ return True
+ return datetime.datetime.strptime(instance, "%H:%M:%S")
+-
+-
+-try:
+- import webcolors
+-except ImportError:
+- pass
+-else:
+- def is_css_color_code(instance):
+- return webcolors.normalize_hex(instance)
+-
+- @_checks_drafts(draft3="color", raises=(ValueError, TypeError))
+- def is_css21_color(instance):
+- if (
+- not isinstance(instance, str_types) or
+- instance.lower() in webcolors.css21_names_to_hex
+- ):
+- return True
+- return is_css_color_code(instance)
+-
+- def is_css3_color(instance):
+- if instance.lower() in webcolors.css3_names_to_hex:
+- return True
+- return is_css_color_code(instance)
+-
+-
+-try:
+- import jsonpointer
+-except ImportError:
+- pass
+-else:
+- @_checks_drafts(
+- draft6="json-pointer",
+- draft7="json-pointer",
+- raises=jsonpointer.JsonPointerException,
+- )
+- def is_json_pointer(instance):
+- if not isinstance(instance, str_types):
+- return True
+- return jsonpointer.JsonPointer(instance)
+-
+- # TODO: I don't want to maintain this, so it
+- # needs to go either into jsonpointer (pending
+- # https://github.com/stefankoegl/python-json-pointer/issues/34) or
+- # into a new external library.
+- @_checks_drafts(
+- draft7="relative-json-pointer",
+- raises=jsonpointer.JsonPointerException,
+- )
+- def is_relative_json_pointer(instance):
+- # Definition taken from:
+- # https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3
+- if not isinstance(instance, str_types):
+- return True
+- non_negative_integer, rest = [], ""
+- for i, character in enumerate(instance):
+- if character.isdigit():
+- non_negative_integer.append(character)
+- continue
+-
+- if not non_negative_integer:
+- return False
+-
+- rest = instance[i:]
+- break
+- return (rest == "#") or jsonpointer.JsonPointer(rest)
+-
+-
+-try:
+- import uritemplate.exceptions
+-except ImportError:
+- pass
+-else:
+- @_checks_drafts(
+- draft6="uri-template",
+- draft7="uri-template",
+- raises=uritemplate.exceptions.InvalidTemplate,
+- )
+- def is_uri_template(
+- instance,
+- template_validator=uritemplate.Validator().force_balanced_braces(),
+- ):
+- template = uritemplate.URITemplate(instance)
+- return template_validator.validate(template)
diff --git a/lib/spack/external/patches/ruamelyaml.patch b/lib/spack/external/patches/ruamelyaml.patch
new file mode 100644
index 0000000000..24bf17f233
--- /dev/null
+++ b/lib/spack/external/patches/ruamelyaml.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/spack/external/_vendoring/ruamel/yaml/comments.py b/lib/spack/external/_vendoring/ruamel/yaml/comments.py
+index 1badeda585..892c868af3 100644
+--- a/lib/spack/external/_vendoring/ruamel/yaml/comments.py
++++ b/lib/spack/external/_vendoring/ruamel/yaml/comments.py
+@@ -497,7 +497,7 @@ def copy_attributes(self, t, memo=None):
+ Tag.attrib, merge_attrib]:
+ if hasattr(self, a):
+ if memo is not None:
+- setattr(t, a, copy.deepcopy(getattr(self, a, memo)))
++ setattr(t, a, copy.deepcopy(getattr(self, a), memo))
+ else:
+ setattr(t, a, getattr(self, a))
+ # fmt: on
diff --git a/lib/spack/llnl/path.py b/lib/spack/llnl/path.py
index 18f9b6e9a2..4c5da8472d 100644
--- a/lib/spack/llnl/path.py
+++ b/lib/spack/llnl/path.py
@@ -42,11 +42,6 @@ def convert_to_posix_path(path: str) -> str:
return format_os_path(path, mode=Path.unix)
-def convert_to_windows_path(path: str) -> str:
- """Converts the input path to Windows style."""
- return format_os_path(path, mode=Path.windows)
-
-
def convert_to_platform_path(path: str) -> str:
"""Converts the input path to the current platform's native style."""
return format_os_path(path, mode=Path.platform_path)
@@ -103,3 +98,10 @@ def system_path_filter(_func=None, arg_slice: Optional[slice] = None):
if _func:
return holder_func(_func)
return holder_func
+
+
+def sanitize_win_longpath(path: str) -> str:
+ """Strip Windows extended path prefix from strings
+ Returns sanitized string.
+ no-op if extended path prefix is not present"""
+ return path.lstrip("\\\\?\\")
diff --git a/lib/spack/llnl/string.py b/lib/spack/llnl/string.py
index d2995f34c1..0ad67d6775 100644
--- a/lib/spack/llnl/string.py
+++ b/lib/spack/llnl/string.py
@@ -41,6 +41,20 @@ def comma_and(sequence: List[str]) -> str:
return comma_list(sequence, "and")
+def ordinal(number: int) -> str:
+ """Return the ordinal representation (1st, 2nd, 3rd, etc.) for the provided number.
+
+ Args:
+ number: int to convert to ordinal number
+
+ Returns: number's corresponding ordinal
+ """
+ idx = (number % 10) << 1
+ tens = number % 100 // 10
+ suffix = "th" if tens == 1 or idx > 6 else "thstndrd"[idx : idx + 2]
+ return f"{number}{suffix}"
+
+
def quote(sequence: List[str], q: str = "'") -> List[str]:
"""Quotes each item in the input list with the quote character passed as second argument."""
return [f"{q}{e}{q}" for e in sequence]
diff --git a/lib/spack/llnl/url.py b/lib/spack/llnl/url.py
index 28f3187dd9..92acfed38d 100644
--- a/lib/spack/llnl/url.py
+++ b/lib/spack/llnl/url.py
@@ -12,7 +12,7 @@ from urllib.parse import urlsplit, urlunsplit
# Archive extensions allowed in Spack
PREFIX_EXTENSIONS = ("tar", "TAR")
EXTENSIONS = ("gz", "bz2", "xz", "Z")
-NO_TAR_EXTENSIONS = ("zip", "tgz", "tbz2", "tbz", "txz")
+NO_TAR_EXTENSIONS = ("zip", "tgz", "tbz2", "tbz", "txz", "whl")
# Add PREFIX_EXTENSIONS and EXTENSIONS last so that .tar.gz is matched *before* .tar or .gz
ALLOWED_ARCHIVE_TYPES = (
@@ -357,10 +357,8 @@ def strip_version_suffixes(path_or_url: str) -> str:
r"i[36]86",
r"ppc64(le)?",
r"armv?(7l|6l|64)?",
- # PyPI
- r"[._-]py[23].*\.whl",
- r"[._-]cp[23].*\.whl",
- r"[._-]win.*\.exe",
+ # PyPI wheels
+ r"-(?:py|cp)[23].*",
]
for regex in suffix_regexes:
@@ -403,7 +401,7 @@ def expand_contracted_extension_in_path(
def compression_ext_from_compressed_archive(extension: str) -> Optional[str]:
"""Returns compression extension for a compressed archive"""
extension = expand_contracted_extension(extension)
- for ext in [*EXTENSIONS]:
+ for ext in EXTENSIONS:
if ext in extension:
return ext
return None
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 75d2023c16..8f9590d284 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -20,15 +20,26 @@ import sys
import tempfile
from contextlib import contextmanager
from itertools import accumulate
-from typing import Callable, Iterable, List, Match, Optional, Tuple, Union
+from typing import (
+ Callable,
+ Deque,
+ Dict,
+ Generator,
+ Iterable,
+ List,
+ Match,
+ Optional,
+ Sequence,
+ Set,
+ Tuple,
+ Union,
+)
import llnl.util.symlink
from llnl.util import tty
-from llnl.util.lang import dedupe, memoized
+from llnl.util.lang import dedupe, fnmatch_translate_multiple, memoized
from llnl.util.symlink import islink, readlink, resolve_link_target_relative_to_the_link, symlink
-from spack.util.executable import Executable, which
-
from ..path import path_to_os_path, system_path_filter
if sys.platform != "win32":
@@ -49,11 +60,11 @@ __all__ = [
"copy_mode",
"filter_file",
"find",
+ "find_first",
"find_headers",
"find_all_headers",
"find_libraries",
"find_system_libraries",
- "fix_darwin_install_name",
"force_remove",
"force_symlink",
"getuid",
@@ -87,6 +98,8 @@ __all__ = [
"visit_directory_tree",
]
+Path = Union[str, pathlib.Path]
+
if sys.version_info < (3, 7, 4):
# monkeypatch shutil.copystat to fix PermissionError when copying read-only
# files on Lustre when using Python < 3.7.4
@@ -171,7 +184,7 @@ def polite_path(components: Iterable[str]):
@memoized
def _polite_antipattern():
# A regex of all the characters we don't want in a filename
- return re.compile(r"[^A-Za-z0-9_.-]")
+ return re.compile(r"[^A-Za-z0-9_+.-]")
def polite_filename(filename: str) -> str:
@@ -187,26 +200,58 @@ def polite_filename(filename: str) -> str:
return _polite_antipattern().sub("_", filename)
-def getuid():
+def getuid() -> Union[str, int]:
+ """Returns os getuid on non Windows
+ On Windows returns 0 for admin users, login string otherwise
+ This is in line with behavior from get_owner_uid which
+ always returns the login string on Windows
+ """
if sys.platform == "win32":
import ctypes
+ # If not admin, use the string name of the login as a unique ID
if ctypes.windll.shell32.IsUserAnAdmin() == 0:
- return 1
+ return os.getlogin()
return 0
else:
return os.getuid()
+def _win_rename(src, dst):
+ # os.replace will still fail if on Windows (but not POSIX) if the dst
+ # is a symlink to a directory (all other cases have parity Windows <-> Posix)
+ if os.path.islink(dst) and os.path.isdir(os.path.realpath(dst)):
+ if os.path.samefile(src, dst):
+ # src and dst are the same
+ # do nothing and exit early
+ return
+ # If dst exists and is a symlink to a directory
+ # we need to remove dst and then perform rename/replace
+ # this is safe to do as there's no chance src == dst now
+ os.remove(dst)
+ os.replace(src, dst)
+
+
+@system_path_filter
+def msdos_escape_parens(path):
+ """MS-DOS interprets parens as grouping parameters even in a quoted string"""
+ if sys.platform == "win32":
+ return path.replace("(", "^(").replace(")", "^)")
+ else:
+ return path
+
+
@system_path_filter
def rename(src, dst):
# On Windows, os.rename will fail if the destination file already exists
+ # os.replace is the same as os.rename on POSIX and is MoveFileExW w/
+ # the MOVEFILE_REPLACE_EXISTING flag on Windows
+ # Windows invocation is abstracted behind additonal logic handling
+ # remaining cases of divergent behavior accross platforms
if sys.platform == "win32":
- # Windows path existence checks will sometimes fail on junctions/links/symlinks
- # so check for that case
- if os.path.exists(dst) or islink(dst):
- os.remove(dst)
- os.rename(src, dst)
+ _win_rename(src, dst)
+ else:
+ os.replace(src, dst)
@system_path_filter
@@ -216,67 +261,6 @@ def path_contains_subdirectory(path, root):
return norm_path.startswith(norm_root)
-@memoized
-def file_command(*args):
- """Creates entry point to `file` system command with provided arguments"""
- file_cmd = which("file", required=True)
- for arg in args:
- file_cmd.add_default_arg(arg)
- return file_cmd
-
-
-@memoized
-def _get_mime_type():
- """Generate method to call `file` system command to aquire mime type
- for a specified path
- """
- if sys.platform == "win32":
- # -h option (no-dereference) does not exist in Windows
- return file_command("-b", "--mime-type")
- else:
- return file_command("-b", "-h", "--mime-type")
-
-
-@memoized
-def _get_mime_type_compressed():
- """Same as _get_mime_type but attempts to check for
- compression first
- """
- mime_uncompressed = _get_mime_type()
- mime_uncompressed.add_default_arg("-Z")
- return mime_uncompressed
-
-
-def mime_type(filename):
- """Returns the mime type and subtype of a file.
-
- Args:
- filename: file to be analyzed
-
- Returns:
- Tuple containing the MIME type and subtype
- """
- output = _get_mime_type()(filename, output=str, error=str).strip()
- tty.debug("==> " + output)
- type, _, subtype = output.partition("/")
- return type, subtype
-
-
-def compressed_mime_type(filename):
- """Same as mime_type but checks for type that has been compressed
-
- Args:
- filename (str): file to be analyzed
-
- Returns:
- Tuple containing the MIME type and subtype
- """
- output = _get_mime_type_compressed()(filename, output=str, error=str).strip()
- tty.debug("==> " + output)
- type, _, subtype = output.partition("/")
- return type, subtype
-
-
#: This generates the library filenames that may appear on any OS.
library_extensions = ["a", "la", "so", "tbd", "dylib"]
@@ -308,13 +292,6 @@ def paths_containing_libs(paths, library_names):
return rpaths_to_include
-@system_path_filter
-def same_path(path1, path2):
- norm1 = os.path.abspath(path1).rstrip(os.path.sep)
- norm2 = os.path.abspath(path2).rstrip(os.path.sep)
- return norm1 == norm2
-
-
def filter_file(
regex: str,
repl: Union[str, Callable[[Match], str]],
@@ -568,7 +545,13 @@ def exploding_archive_handler(tarball_container, stage):
@system_path_filter(arg_slice=slice(1))
-def get_owner_uid(path, err_msg=None):
+def get_owner_uid(path, err_msg=None) -> Union[str, int]:
+ """Returns owner UID of path destination
+ On non Windows this is the value of st_uid
+ On Windows this is the login string associated with the
+ owning user.
+
+ """
if not os.path.exists(path):
mkdirp(path, mode=stat.S_IRWXU)
@@ -760,7 +743,6 @@ def copy_tree(
src: str,
dest: str,
symlinks: bool = True,
- allow_broken_symlinks: bool = sys.platform != "win32",
ignore: Optional[Callable[[str], bool]] = None,
_permissions: bool = False,
):
@@ -783,8 +765,6 @@ def copy_tree(
src (str): the directory to copy
dest (str): the destination directory
symlinks (bool): whether or not to preserve symlinks
- allow_broken_symlinks (bool): whether or not to allow broken (dangling) symlinks,
- On Windows, setting this to True will raise an exception. Defaults to true on unix.
ignore (typing.Callable): function indicating which files to ignore
_permissions (bool): for internal use only
@@ -792,8 +772,6 @@ def copy_tree(
IOError: if *src* does not match any files or directories
ValueError: if *src* is a parent directory of *dest*
"""
- if allow_broken_symlinks and sys.platform == "win32":
- raise llnl.util.symlink.SymlinkError("Cannot allow broken symlinks on Windows!")
if _permissions:
tty.debug("Installing {0} to {1}".format(src, dest))
else:
@@ -837,7 +815,7 @@ def copy_tree(
if islink(s):
link_target = resolve_link_target_relative_to_the_link(s)
if symlinks:
- target = os.readlink(s)
+ target = readlink(s)
if os.path.isabs(target):
def escaped_path(path):
@@ -866,16 +844,14 @@ def copy_tree(
copy_mode(s, d)
for target, d, s in links:
- symlink(target, d, allow_broken_symlinks=allow_broken_symlinks)
+ symlink(target, d)
if _permissions:
set_install_permissions(d)
copy_mode(s, d)
@system_path_filter
-def install_tree(
- src, dest, symlinks=True, ignore=None, allow_broken_symlinks=sys.platform != "win32"
-):
+def install_tree(src, dest, symlinks=True, ignore=None):
"""Recursively install an entire directory tree rooted at *src*.
Same as :py:func:`copy_tree` with the addition of setting proper
@@ -886,21 +862,12 @@ def install_tree(
dest (str): the destination directory
symlinks (bool): whether or not to preserve symlinks
ignore (typing.Callable): function indicating which files to ignore
- allow_broken_symlinks (bool): whether or not to allow broken (dangling) symlinks,
- On Windows, setting this to True will raise an exception.
Raises:
IOError: if *src* does not match any files or directories
ValueError: if *src* is a parent directory of *dest*
"""
- copy_tree(
- src,
- dest,
- symlinks=symlinks,
- allow_broken_symlinks=allow_broken_symlinks,
- ignore=ignore,
- _permissions=True,
- )
+ copy_tree(src, dest, symlinks=symlinks, ignore=ignore, _permissions=True)
@system_path_filter
@@ -909,39 +876,34 @@ def is_exe(path):
return os.path.isfile(path) and os.access(path, os.X_OK)
-@system_path_filter
-def get_filetype(path_name):
- """
- Return the output of file path_name as a string to identify file type.
- """
- file = Executable("file")
- file.add_default_env("LC_ALL", "C")
- output = file("-b", "-h", "%s" % path_name, output=str, error=str)
- return output.strip()
+def has_shebang(path):
+ """Returns whether a path has a shebang line. Returns False if the file cannot be opened."""
+ try:
+ with open(path, "rb") as f:
+ return f.read(2) == b"#!"
+ except OSError:
+ return False
@system_path_filter
def is_nonsymlink_exe_with_shebang(path):
- """
- Returns whether the path is an executable script with a shebang.
- Return False when the path is a *symlink* to an executable script.
- """
+ """Returns whether the path is an executable regular file with a shebang. Returns False too
+ when the path is a symlink to a script, and also when the file cannot be opened."""
try:
st = os.lstat(path)
- # Should not be a symlink
- if stat.S_ISLNK(st.st_mode):
- return False
+ except OSError:
+ return False
- # Should be executable
- if not st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH):
- return False
+ # Should not be a symlink
+ if stat.S_ISLNK(st.st_mode):
+ return False
- # Should start with a shebang
- with open(path, "rb") as f:
- return f.read(2) == b"#!"
- except (IOError, OSError):
+ # Should be executable
+ if not st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH):
return False
+ return has_shebang(path)
+
@system_path_filter(arg_slice=slice(1))
def chgrp_if_not_world_writable(path, group):
@@ -1163,20 +1125,6 @@ def write_tmp_and_move(filename):
shutil.move(tmp, filename)
-@contextmanager
-@system_path_filter
-def open_if_filename(str_or_file, mode="r"):
- """Takes either a path or a file object, and opens it if it is a path.
-
- If it's a file object, just yields the file object.
- """
- if isinstance(str_or_file, str):
- with open(str_or_file, mode) as f:
- yield f
- else:
- yield str_or_file
-
-
@system_path_filter
def touch(path):
"""Creates an empty file at the specified path."""
@@ -1234,6 +1182,49 @@ def get_single_file(directory):
return fnames[0]
+@system_path_filter
+def windows_sfn(path: os.PathLike):
+ """Returns 8.3 Filename (SFN) representation of
+ path
+
+ 8.3 Filenames (SFN or short filename) is a file
+ naming convention used prior to Win95 that Windows
+ still (and will continue to) support. This convention
+ caps filenames at 8 characters, and most importantly
+ does not allow for spaces in addition to other specifications.
+ The scheme is generally the same as a normal Windows
+ file scheme, but all spaces are removed and the filename
+ is capped at 6 characters. The remaining characters are
+ replaced with ~N where N is the number file in a directory
+ that a given file represents i.e. Program Files and Program Files (x86)
+ would be PROGRA~1 and PROGRA~2 respectively.
+ Further, all file/directory names are all caps (although modern Windows
+ is case insensitive in practice).
+ Conversion is accomplished by fileapi.h GetShortPathNameW
+
+ Returns paths in 8.3 Filename form
+
+ Note: this method is a no-op on Linux
+
+ Args:
+ path: Path to be transformed into SFN (8.3 filename) format
+ """
+ # This should not be run-able on linux/macos
+ if sys.platform != "win32":
+ return path
+ path = str(path)
+ import ctypes
+
+ k32 = ctypes.WinDLL("kernel32", use_last_error=True)
+ # Method with null values returns size of short path name
+ sz = k32.GetShortPathNameW(path, None, 0)
+ # stub Windows types TCHAR[LENGTH]
+ TCHAR_arr = ctypes.c_wchar * sz
+ ret_str = TCHAR_arr()
+ k32.GetShortPathNameW(path, ctypes.byref(ret_str), sz)
+ return ret_str.value
+
+
@contextmanager
def temp_cwd():
tmp_dir = tempfile.mkdtemp()
@@ -1248,19 +1239,6 @@ def temp_cwd():
shutil.rmtree(tmp_dir, **kwargs)
-@contextmanager
-@system_path_filter
-def temp_rename(orig_path, temp_path):
- same_path = os.path.realpath(orig_path) == os.path.realpath(temp_path)
- if not same_path:
- shutil.move(orig_path, temp_path)
- try:
- yield
- finally:
- if not same_path:
- shutil.move(temp_path, orig_path)
-
-
@system_path_filter
def can_access(file_name):
"""True if we have read/write access to the file."""
@@ -1377,120 +1355,89 @@ def traverse_tree(
yield (source_path, dest_path)
-def lexists_islink_isdir(path):
- """Computes the tuple (lexists(path), islink(path), isdir(path)) in a minimal
- number of stat calls on unix. Use os.path and symlink.islink methods for windows."""
- if sys.platform == "win32":
- if not os.path.lexists(path):
- return False, False, False
- return os.path.lexists(path), islink(path), os.path.isdir(path)
- # First try to lstat, so we know if it's a link or not.
- try:
- lst = os.lstat(path)
- except (IOError, OSError):
- return False, False, False
-
- is_link = stat.S_ISLNK(lst.st_mode)
-
- # Check whether file is a dir.
- if not is_link:
- is_dir = stat.S_ISDIR(lst.st_mode)
- return True, is_link, is_dir
-
- # Check whether symlink points to a dir.
- try:
- st = os.stat(path)
- is_dir = stat.S_ISDIR(st.st_mode)
- except (IOError, OSError):
- # Dangling symlink (i.e. it lexists but not exists)
- is_dir = False
-
- return True, is_link, is_dir
-
-
class BaseDirectoryVisitor:
"""Base class and interface for :py:func:`visit_directory_tree`."""
- def visit_file(self, root, rel_path, depth):
+ def visit_file(self, root: str, rel_path: str, depth: int) -> None:
"""Handle the non-symlink file at ``os.path.join(root, rel_path)``
Parameters:
- root (str): root directory
- rel_path (str): relative path to current file from ``root``
+ root: root directory
+ rel_path: relative path to current file from ``root``
depth (int): depth of current file from the ``root`` directory"""
pass
- def visit_symlinked_file(self, root, rel_path, depth):
- """Handle the symlink to a file at ``os.path.join(root, rel_path)``.
- Note: ``rel_path`` is the location of the symlink, not to what it is
- pointing to. The symlink may be dangling.
+ def visit_symlinked_file(self, root: str, rel_path: str, depth) -> None:
+ """Handle the symlink to a file at ``os.path.join(root, rel_path)``. Note: ``rel_path`` is
+ the location of the symlink, not to what it is pointing to. The symlink may be dangling.
Parameters:
- root (str): root directory
- rel_path (str): relative path to current symlink from ``root``
- depth (int): depth of current symlink from the ``root`` directory"""
+ root: root directory
+ rel_path: relative path to current symlink from ``root``
+ depth: depth of current symlink from the ``root`` directory"""
pass
- def before_visit_dir(self, root, rel_path, depth):
+ def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""Return True from this function to recurse into the directory at
os.path.join(root, rel_path). Return False in order not to recurse further.
Parameters:
- root (str): root directory
- rel_path (str): relative path to current directory from ``root``
- depth (int): depth of current directory from the ``root`` directory
+ root: root directory
+ rel_path: relative path to current directory from ``root``
+ depth: depth of current directory from the ``root`` directory
Returns:
bool: ``True`` when the directory should be recursed into. ``False`` when
not"""
return False
- def before_visit_symlinked_dir(self, root, rel_path, depth):
- """Return ``True`` to recurse into the symlinked directory and ``False`` in
- order not to. Note: ``rel_path`` is the path to the symlink itself.
- Following symlinked directories blindly can cause infinite recursion due to
- cycles.
+ def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
+ """Return ``True`` to recurse into the symlinked directory and ``False`` in order not to.
+ Note: ``rel_path`` is the path to the symlink itself. Following symlinked directories
+ blindly can cause infinite recursion due to cycles.
Parameters:
- root (str): root directory
- rel_path (str): relative path to current symlink from ``root``
- depth (int): depth of current symlink from the ``root`` directory
+ root: root directory
+ rel_path: relative path to current symlink from ``root``
+ depth: depth of current symlink from the ``root`` directory
Returns:
bool: ``True`` when the directory should be recursed into. ``False`` when
not"""
return False
- def after_visit_dir(self, root, rel_path, depth):
- """Called after recursion into ``rel_path`` finished. This function is not
- called when ``rel_path`` was not recursed into.
+ def after_visit_dir(self, root: str, rel_path: str, depth: int) -> None:
+ """Called after recursion into ``rel_path`` finished. This function is not called when
+ ``rel_path`` was not recursed into.
Parameters:
- root (str): root directory
- rel_path (str): relative path to current directory from ``root``
- depth (int): depth of current directory from the ``root`` directory"""
+ root: root directory
+ rel_path: relative path to current directory from ``root``
+ depth: depth of current directory from the ``root`` directory"""
pass
- def after_visit_symlinked_dir(self, root, rel_path, depth):
- """Called after recursion into ``rel_path`` finished. This function is not
- called when ``rel_path`` was not recursed into.
+ def after_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> None:
+ """Called after recursion into ``rel_path`` finished. This function is not called when
+ ``rel_path`` was not recursed into.
Parameters:
- root (str): root directory
- rel_path (str): relative path to current symlink from ``root``
- depth (int): depth of current symlink from the ``root`` directory"""
+ root: root directory
+ rel_path: relative path to current symlink from ``root``
+ depth: depth of current symlink from the ``root`` directory"""
pass
-def visit_directory_tree(root, visitor, rel_path="", depth=0):
- """Recurses the directory root depth-first through a visitor pattern using the
- interface from :py:class:`BaseDirectoryVisitor`
+def visit_directory_tree(
+ root: str, visitor: BaseDirectoryVisitor, rel_path: str = "", depth: int = 0
+):
+ """Recurses the directory root depth-first through a visitor pattern using the interface from
+ :py:class:`BaseDirectoryVisitor`
Parameters:
- root (str): path of directory to recurse into
- visitor (BaseDirectoryVisitor): what visitor to use
- rel_path (str): current relative path from the root
- depth (str): current depth from the root
+ root: path of directory to recurse into
+ visitor: what visitor to use
+ rel_path: current relative path from the root
+ depth: current depth from the root
"""
dir = os.path.join(root, rel_path)
dir_entries = sorted(os.scandir(dir), key=lambda d: d.name)
@@ -1498,26 +1445,19 @@ def visit_directory_tree(root, visitor, rel_path="", depth=0):
for f in dir_entries:
rel_child = os.path.join(rel_path, f.name)
islink = f.is_symlink()
- # On Windows, symlinks to directories are distinct from
- # symlinks to files, and it is possible to create a
- # broken symlink to a directory (e.g. using os.symlink
- # without `target_is_directory=True`), invoking `isdir`
- # on a symlink on Windows that is broken in this manner
- # will result in an error. In this case we can work around
- # the issue by reading the target and resolving the
- # directory ourselves
+ # On Windows, symlinks to directories are distinct from symlinks to files, and it is
+ # possible to create a broken symlink to a directory (e.g. using os.symlink without
+ # `target_is_directory=True`), invoking `isdir` on a symlink on Windows that is broken in
+ # this manner will result in an error. In this case we can work around the issue by reading
+ # the target and resolving the directory ourselves
try:
isdir = f.is_dir()
except OSError as e:
if sys.platform == "win32" and hasattr(e, "winerror") and e.winerror == 5 and islink:
- # if path is a symlink, determine destination and
- # evaluate file vs directory
+ # if path is a symlink, determine destination and evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
- # link_target might be relative but
- # resolve_link_target_relative_to_the_link
- # will ensure that if so, that it is relative
- # to the CWD and therefore
- # makes sense
+ # link_target might be relative but resolve_link_target_relative_to_the_link
+ # will ensure that if so, that it is relative to the CWD and therefore makes sense
isdir = os.path.isdir(link_target)
else:
raise e
@@ -1661,6 +1601,12 @@ def remove_linked_tree(path):
shutil.rmtree(os.path.realpath(path), **kwargs)
os.unlink(path)
else:
+ if sys.platform == "win32":
+ # Adding this prefix allows shutil to remove long paths on windows
+ # https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
+ long_path_pfx = "\\\\?\\"
+ if not path.startswith(long_path_pfx):
+ path = long_path_pfx + path
shutil.rmtree(path, **kwargs)
@@ -1710,41 +1656,6 @@ def safe_remove(*files_or_dirs):
raise
-@system_path_filter
-def fix_darwin_install_name(path):
- """Fix install name of dynamic libraries on Darwin to have full path.
-
- There are two parts of this task:
-
- 1. Use ``install_name('-id', ...)`` to change install name of a single lib
- 2. Use ``install_name('-change', ...)`` to change the cross linking between
- libs. The function assumes that all libraries are in one folder and
- currently won't follow subfolders.
-
- Parameters:
- path (str): directory in which .dylib files are located
- """
- libs = glob.glob(join_path(path, "*.dylib"))
- for lib in libs:
- # fix install name first:
- install_name_tool = Executable("install_name_tool")
- install_name_tool("-id", lib, lib)
- otool = Executable("otool")
- long_deps = otool("-L", lib, output=str).split("\n")
- deps = [dep.partition(" ")[0][1::] for dep in long_deps[2:-1]]
- # fix all dependencies:
- for dep in deps:
- for loc in libs:
- # We really want to check for either
- # dep == os.path.basename(loc) or
- # dep == join_path(builddir, os.path.basename(loc)),
- # but we don't know builddir (nor how symbolic links look
- # in builddir). We thus only compare the basenames.
- if os.path.basename(dep) == os.path.basename(loc):
- install_name_tool("-change", dep, loc, lib)
- break
-
-
def find_first(root: str, files: Union[Iterable[str], str], bfs_depth: int = 2) -> Optional[str]:
"""Find the first file matching a pattern.
@@ -1777,105 +1688,203 @@ def find_first(root: str, files: Union[Iterable[str], str], bfs_depth: int = 2)
return FindFirstFile(root, *files, bfs_depth=bfs_depth).find()
-def find(root, files, recursive=True):
- """Search for ``files`` starting from the ``root`` directory.
-
- Like GNU/BSD find but written entirely in Python.
-
- Examples:
-
- .. code-block:: console
-
- $ find /usr -name python
-
- is equivalent to:
-
- >>> find('/usr', 'python')
-
- .. code-block:: console
-
- $ find /usr/local/bin -maxdepth 1 -name python
-
- is equivalent to:
-
- >>> find('/usr/local/bin', 'python', recursive=False)
+def find(
+ root: Union[Path, Sequence[Path]],
+ files: Union[str, Sequence[str]],
+ recursive: bool = True,
+ max_depth: Optional[int] = None,
+) -> List[str]:
+ """Finds all files matching the patterns from ``files`` starting from ``root``. This function
+ returns a deterministic result for the same input and directory structure when run multiple
+ times. Symlinked directories are followed, and unique directories are searched only once. Each
+ matching file is returned only once at lowest depth in case multiple paths exist due to
+ symlinked directories.
Accepts any glob characters accepted by fnmatch:
========== ====================================
Pattern Meaning
========== ====================================
- ``*`` matches everything
+ ``*`` matches one or more characters
``?`` matches any single character
``[seq]`` matches any character in ``seq``
``[!seq]`` matches any character not in ``seq``
========== ====================================
+ Examples:
+
+ >>> find("/usr", "*.txt", recursive=True, max_depth=2)
+
+ finds all files with the extension ``.txt`` in the directory ``/usr`` and subdirectories up to
+ depth 2.
+
+ >>> find(["/usr", "/var"], ["*.txt", "*.log"], recursive=True)
+
+ finds all files with the extension ``.txt`` or ``.log`` in the directories ``/usr`` and
+ ``/var`` at any depth.
+
+ >>> find("/usr", "GL/*.h", recursive=True)
+
+ finds all header files in a directory GL at any depth in the directory ``/usr``.
+
Parameters:
- root (str): The root directory to start searching from
- files (str or collections.abc.Sequence): Library name(s) to search for
- recursive (bool): if False search only root folder,
- if True descends top-down from the root. Defaults to True.
+ root: One or more root directories to start searching from
+ files: One or more filename patterns to search for
+ recursive: if False search only root, if True descends from roots. Defaults to True.
+ max_depth: if set, don't search below this depth. Cannot be set if recursive is False
- Returns:
- list: The files that have been found
+ Returns a list of absolute, matching file paths.
"""
+ if isinstance(root, (str, pathlib.Path)):
+ root = [root]
+ elif not isinstance(root, collections.abc.Sequence):
+ raise TypeError(f"'root' arg must be a path or a sequence of paths, not '{type(root)}']")
+
if isinstance(files, str):
files = [files]
+ elif not isinstance(files, collections.abc.Sequence):
+ raise TypeError(f"'files' arg must be str or a sequence of str, not '{type(files)}']")
- if recursive:
- tty.debug(f"Find (recursive): {root} {str(files)}")
- result = _find_recursive(root, files)
- else:
- tty.debug(f"Find (not recursive): {root} {str(files)}")
- result = _find_non_recursive(root, files)
+ # If recursive is false, max_depth can only be None or 0
+ if max_depth and not recursive:
+ raise ValueError(f"max_depth ({max_depth}) cannot be set if recursive is False")
- tty.debug(f"Find complete: {root} {str(files)}")
+ tty.debug(f"Find (max depth = {max_depth}): {root} {files}")
+ if not recursive:
+ max_depth = 0
+ elif max_depth is None:
+ max_depth = sys.maxsize
+ result = _find_max_depth(root, files, max_depth)
+ tty.debug(f"Find complete: {root} {files}")
return result
-@system_path_filter
-def _find_recursive(root, search_files):
- # The variable here is **on purpose** a defaultdict. The idea is that
- # we want to poke the filesystem as little as possible, but still maintain
- # stability in the order of the answer. Thus we are recording each library
- # found in a key, and reconstructing the stable order later.
- found_files = collections.defaultdict(list)
+def _log_file_access_issue(e: OSError, path: str) -> None:
+ errno_name = errno.errorcode.get(e.errno, "UNKNOWN")
+ tty.debug(f"find must skip {path}: {errno_name} {e}")
+
+
+def _file_id(s: os.stat_result) -> Tuple[int, int]:
+ # Note: on windows, st_ino is the file index and st_dev is the volume serial number. See
+ # https://github.com/python/cpython/blob/3.9/Python/fileutils.c
+ return (s.st_ino, s.st_dev)
- # Make the path absolute to have os.walk also return an absolute path
- root = os.path.abspath(root)
- for path, _, list_files in os.walk(root):
- for search_file in search_files:
- matches = glob.glob(os.path.join(path, search_file))
- matches = [os.path.join(path, x) for x in matches]
- found_files[search_file].extend(matches)
- answer = []
- for search_file in search_files:
- answer.extend(found_files[search_file])
+def _dedupe_files(paths: List[str]) -> List[str]:
+ """Deduplicate files by inode and device, dropping files that cannot be accessed."""
+ unique_files: List[str] = []
+ # tuple of (inode, device) for each file without following symlinks
+ visited: Set[Tuple[int, int]] = set()
+ for path in paths:
+ try:
+ stat_info = os.lstat(path)
+ except OSError as e:
+ _log_file_access_issue(e, path)
+ continue
+ file_id = _file_id(stat_info)
+ if file_id not in visited:
+ unique_files.append(path)
+ visited.add(file_id)
+ return unique_files
+
+
+def _find_max_depth(
+ roots: Sequence[Path], globs: Sequence[str], max_depth: int = sys.maxsize
+) -> List[str]:
+ """See ``find`` for the public API."""
+ # We optimize for the common case of simple filename only patterns: a single, combined regex
+ # is used. For complex patterns that include path components, we use a slower glob call from
+ # every directory we visit within max_depth.
+ filename_only_patterns = {
+ f"pattern_{i}": os.path.normcase(x) for i, x in enumerate(globs) if "/" not in x
+ }
+ complex_patterns = {f"pattern_{i}": x for i, x in enumerate(globs) if "/" in x}
+ regex = re.compile(fnmatch_translate_multiple(filename_only_patterns))
+ # Ordered dictionary that keeps track of what pattern found which files
+ matched_paths: Dict[str, List[str]] = {f"pattern_{i}": [] for i, _ in enumerate(globs)}
+ # Ensure returned paths are always absolute
+ roots = [os.path.abspath(r) for r in roots]
+ # Breadth-first search queue. Each element is a tuple of (depth, dir)
+ dir_queue: Deque[Tuple[int, str]] = collections.deque()
+ # Set of visited directories. Each element is a tuple of (inode, device)
+ visited_dirs: Set[Tuple[int, int]] = set()
+
+ for root in roots:
+ try:
+ stat_root = os.stat(root)
+ except OSError as e:
+ _log_file_access_issue(e, root)
+ continue
+ dir_id = _file_id(stat_root)
+ if dir_id not in visited_dirs:
+ dir_queue.appendleft((0, root))
+ visited_dirs.add(dir_id)
- return answer
+ while dir_queue:
+ depth, curr_dir = dir_queue.pop()
+ try:
+ dir_iter = os.scandir(curr_dir)
+ except OSError as e:
+ _log_file_access_issue(e, curr_dir)
+ continue
+ # Use glob.glob for complex patterns.
+ for pattern_name, pattern in complex_patterns.items():
+ matched_paths[pattern_name].extend(
+ path for path in glob.glob(os.path.join(curr_dir, pattern))
+ )
-@system_path_filter
-def _find_non_recursive(root, search_files):
- # The variable here is **on purpose** a defaultdict as os.list_dir
- # can return files in any order (does not preserve stability)
- found_files = collections.defaultdict(list)
+ # List of subdirectories by path and (inode, device) tuple
+ subdirs: List[Tuple[str, Tuple[int, int]]] = []
- # Make the path absolute to have absolute path returned
- root = os.path.abspath(root)
+ with dir_iter:
+ for dir_entry in dir_iter:
- for search_file in search_files:
- matches = glob.glob(os.path.join(root, search_file))
- matches = [os.path.join(root, x) for x in matches]
- found_files[search_file].extend(matches)
+ # Match filename only patterns
+ if filename_only_patterns:
+ m = regex.match(os.path.normcase(dir_entry.name))
+ if m:
+ for pattern_name in filename_only_patterns:
+ if m.group(pattern_name):
+ matched_paths[pattern_name].append(dir_entry.path)
+ break
- answer = []
- for search_file in search_files:
- answer.extend(found_files[search_file])
+ # Collect subdirectories
+ if depth >= max_depth:
+ continue
- return answer
+ try:
+ if not dir_entry.is_dir(follow_symlinks=True):
+ continue
+ if sys.platform == "win32":
+ # Note: st_ino/st_dev on DirEntry.stat are not set on Windows, so we have
+ # to call os.stat
+ stat_info = os.stat(dir_entry.path, follow_symlinks=True)
+ else:
+ stat_info = dir_entry.stat(follow_symlinks=True)
+ except OSError as e:
+ # Possible permission issue, or a symlink that cannot be resolved (ELOOP).
+ _log_file_access_issue(e, dir_entry.path)
+ continue
+
+ subdirs.append((dir_entry.path, _file_id(stat_info)))
+
+ # Enqueue subdirectories in a deterministic order
+ if subdirs:
+ subdirs.sort(key=lambda s: os.path.basename(s[0]))
+ for subdir, subdir_id in subdirs:
+ if subdir_id not in visited_dirs:
+ dir_queue.appendleft((depth + 1, subdir))
+ visited_dirs.add(subdir_id)
+
+ # Sort the matched paths for deterministic output
+ for paths in matched_paths.values():
+ paths.sort()
+ all_matching_paths = [path for paths in matched_paths.values() for path in paths]
+
+ # We only dedupe files if we have any complex patterns, since only they can match the same file
+ # multiple times
+ return _dedupe_files(all_matching_paths) if complex_patterns else all_matching_paths
# Utilities for libraries and headers
@@ -2314,7 +2323,9 @@ def find_system_libraries(libraries, shared=True):
return libraries_found
-def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
+def find_libraries(
+ libraries, root, shared=True, recursive=False, runtime=True, max_depth: Optional[int] = None
+):
"""Returns an iterable of full paths to libraries found in a root dir.
Accepts any glob characters accepted by fnmatch:
@@ -2335,6 +2346,8 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
otherwise for static. Defaults to True.
recursive (bool): if False search only root folder,
if True descends top-down from the root. Defaults to False.
+ max_depth (int): if set, don't search below this depth. Cannot be set
+ if recursive is False
runtime (bool): Windows only option, no-op elsewhere. If true,
search for runtime shared libs (.DLL), otherwise, search
for .Lib files. If shared is false, this has no meaning.
@@ -2343,6 +2356,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
Returns:
LibraryList: The libraries that have been found
"""
+
if isinstance(libraries, str):
libraries = [libraries]
elif not isinstance(libraries, collections.abc.Sequence):
@@ -2375,8 +2389,10 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
libraries = ["{0}.{1}".format(lib, suffix) for lib in libraries for suffix in suffixes]
if not recursive:
+ if max_depth:
+ raise ValueError(f"max_depth ({max_depth}) cannot be set if recursive is False")
# If not recursive, look for the libraries directly in root
- return LibraryList(find(root, libraries, False))
+ return LibraryList(find(root, libraries, recursive=False))
# To speedup the search for external packages configured e.g. in /usr,
# perform first non-recursive search in root/lib then in root/lib64 and
@@ -2394,7 +2410,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
if found_libs:
break
else:
- found_libs = find(root, libraries, True)
+ found_libs = find(root, libraries, recursive=True, max_depth=max_depth)
return LibraryList(found_libs)
@@ -2471,9 +2487,10 @@ class WindowsSimulatedRPath:
"""
for pth in dest:
if os.path.isfile(pth):
- self._additional_library_dependents.add(pathlib.Path(pth).parent)
+ new_pth = pathlib.Path(pth).parent
else:
- self._additional_library_dependents.add(pathlib.Path(pth))
+ new_pth = pathlib.Path(pth)
+ self._additional_library_dependents.add(new_pth)
@property
def rpaths(self):
@@ -2551,8 +2568,14 @@ class WindowsSimulatedRPath:
# for each binary install dir in self.pkg (i.e. pkg.prefix.bin, pkg.prefix.lib)
# install a symlink to each dependent library
- for library, lib_dir in itertools.product(self.rpaths, self.library_dependents):
- self._link(library, lib_dir)
+
+ # do not rpath for system libraries included in the dag
+ # we should not be modifying libraries managed by the Windows system
+ # as this will negatively impact linker behavior and can result in permission
+ # errors if those system libs are not modifiable by Spack
+ if "windows-system" not in getattr(self.pkg, "tags", []):
+ for library, lib_dir in itertools.product(self.rpaths, self.library_dependents):
+ self._link(library, lib_dir)
@system_path_filter
@@ -2751,22 +2774,6 @@ def prefixes(path):
@system_path_filter
-def md5sum(file):
- """Compute the MD5 sum of a file.
-
- Args:
- file (str): file to be checksummed
-
- Returns:
- MD5 sum of the file's content
- """
- md5 = hashlib.md5()
- with open(file, "rb") as f:
- md5.update(f.read())
- return md5.digest()
-
-
-@system_path_filter
def remove_directory_contents(dir):
"""Remove all contents of a directory."""
if os.path.exists(dir):
@@ -2816,6 +2823,25 @@ def temporary_dir(
remove_directory_contents(tmp_dir)
+@contextmanager
+def edit_in_place_through_temporary_file(file_path: str) -> Generator[str, None, None]:
+ """Context manager for modifying ``file_path`` in place, preserving its inode and hardlinks,
+ for functions or external tools that do not support in-place editing. Notice that this function
+ is unsafe in that it works with paths instead of a file descriptors, but this is by design,
+ since we assume the call site will create a new inode at the same path."""
+ tmp_fd, tmp_path = tempfile.mkstemp(
+ dir=os.path.dirname(file_path), prefix=f"{os.path.basename(file_path)}."
+ )
+ # windows cannot replace a file with open fds, so close since the call site needs to replace.
+ os.close(tmp_fd)
+ try:
+ shutil.copyfile(file_path, tmp_path, follow_symlinks=True)
+ yield tmp_path
+ shutil.copyfile(tmp_path, file_path, follow_symlinks=True)
+ finally:
+ os.unlink(tmp_path)
+
+
def filesummary(path, print_bytes=16) -> Tuple[int, bytes]:
"""Create a small summary of the given file. Does not error
when file does not exist.
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py
index 4f14a29ef8..4913a50fad 100644
--- a/lib/spack/llnl/util/lang.py
+++ b/lib/spack/llnl/util/lang.py
@@ -5,18 +5,20 @@
import collections.abc
import contextlib
+import fnmatch
import functools
-import inspect
import itertools
import os
import re
import sys
import traceback
+import typing
+import warnings
from datetime import datetime, timedelta
-from typing import Any, Callable, Iterable, List, Tuple
+from typing import Callable, Dict, Iterable, List, Tuple, TypeVar
# Ignore emacs backups when listing modules
-ignore_modules = [r"^\.#", "~$"]
+ignore_modules = r"^\.#|~$"
def index_by(objects, *funcs):
@@ -84,50 +86,6 @@ def index_by(objects, *funcs):
return result
-def caller_locals():
- """This will return the locals of the *parent* of the caller.
- This allows a function to insert variables into its caller's
- scope. Yes, this is some black magic, and yes it's useful
- for implementing things like depends_on and provides.
- """
- # Passing zero here skips line context for speed.
- stack = inspect.stack(0)
- try:
- return stack[2][0].f_locals
- finally:
- del stack
-
-
-def get_calling_module_name():
- """Make sure that the caller is a class definition, and return the
- enclosing module's name.
- """
- # Passing zero here skips line context for speed.
- stack = inspect.stack(0)
- try:
- # Make sure locals contain __module__
- caller_locals = stack[2][0].f_locals
- finally:
- del stack
-
- if "__module__" not in caller_locals:
- raise RuntimeError(
- "Must invoke get_calling_module_name() " "from inside a class definition!"
- )
-
- module_name = caller_locals["__module__"]
- base_name = module_name.split(".")[-1]
- return base_name
-
-
-def attr_required(obj, attr_name):
- """Ensure that a class has a required attribute."""
- if not hasattr(obj, attr_name):
- raise RequiredAttributeError(
- "No required attribute '%s' in class '%s'" % (attr_name, obj.__class__.__name__)
- )
-
-
def attr_setdefault(obj, name, value):
"""Like dict.setdefault, but for objects."""
if not hasattr(obj, name):
@@ -135,15 +93,6 @@ def attr_setdefault(obj, name, value):
return getattr(obj, name)
-def has_method(cls, name):
- for base in inspect.getmro(cls):
- if base is object:
- continue
- if name in base.__dict__:
- return True
- return False
-
-
def union_dicts(*dicts):
"""Use update() to combine all dicts into one.
@@ -208,19 +157,22 @@ def list_modules(directory, **kwargs):
order."""
list_directories = kwargs.setdefault("directories", True)
- for name in os.listdir(directory):
- if name == "__init__.py":
- continue
+ ignore = re.compile(ignore_modules)
+
+ with os.scandir(directory) as it:
+ for entry in it:
+ if entry.name == "__init__.py" or entry.name == "__pycache__":
+ continue
- path = os.path.join(directory, name)
- if list_directories and os.path.isdir(path):
- init_py = os.path.join(path, "__init__.py")
- if os.path.isfile(init_py):
- yield name
+ if (
+ list_directories
+ and entry.is_dir()
+ and os.path.isfile(os.path.join(entry.path, "__init__.py"))
+ ):
+ yield entry.name
- elif name.endswith(".py"):
- if not any(re.search(pattern, name) for pattern in ignore_modules):
- yield re.sub(".py$", "", name)
+ elif entry.name.endswith(".py") and entry.is_file() and not ignore.search(entry.name):
+ yield entry.name[:-3] # strip .py
def decorator_with_or_without_args(decorator):
@@ -267,8 +219,8 @@ def key_ordering(cls):
value.__name__ = name
setattr(cls, name, value)
- if not has_method(cls, "_cmp_key"):
- raise TypeError("'%s' doesn't define _cmp_key()." % cls.__name__)
+ if not hasattr(cls, "_cmp_key"):
+ raise TypeError(f"'{cls.__name__}' doesn't define _cmp_key().")
setter("__eq__", lambda s, o: (s is o) or (o is not None and s._cmp_key() == o._cmp_key()))
setter("__lt__", lambda s, o: o is not None and s._cmp_key() < o._cmp_key())
@@ -418,8 +370,8 @@ def lazy_lexicographic_ordering(cls, set_hash=True):
TypeError: If the class does not have a ``_cmp_iter`` method
"""
- if not has_method(cls, "_cmp_iter"):
- raise TypeError("'%s' doesn't define _cmp_iter()." % cls.__name__)
+ if not hasattr(cls, "_cmp_iter"):
+ raise TypeError(f"'{cls.__name__}' doesn't define _cmp_iter().")
# comparison operators are implemented in terms of lazy_eq and lazy_lt
def eq(self, other):
@@ -513,42 +465,6 @@ class HashableMap(collections.abc.MutableMapping):
return clone
-def in_function(function_name):
- """True if the caller was called from some function with
- the supplied Name, False otherwise."""
- stack = inspect.stack()
- try:
- for elt in stack[2:]:
- if elt[3] == function_name:
- return True
- return False
- finally:
- del stack
-
-
-def check_kwargs(kwargs, fun):
- """Helper for making functions with kwargs. Checks whether the kwargs
- are empty after all of them have been popped off. If they're
- not, raises an error describing which kwargs are invalid.
-
- Example::
-
- def foo(self, **kwargs):
- x = kwargs.pop('x', None)
- y = kwargs.pop('y', None)
- z = kwargs.pop('z', None)
- check_kwargs(kwargs, self.foo)
-
- # This raises a TypeError:
- foo(w='bad kwarg')
- """
- if kwargs:
- raise TypeError(
- "'%s' is an invalid keyword argument for function %s()."
- % (next(iter(kwargs)), fun.__name__)
- )
-
-
def match_predicate(*args):
"""Utility function for making string matching predicates.
@@ -764,11 +680,6 @@ def pretty_seconds(seconds):
return pretty_seconds_formatter(seconds)(seconds)
-class RequiredAttributeError(ValueError):
- def __init__(self, message):
- super().__init__(message)
-
-
class ObjectWrapper:
"""Base class that wraps an object. Derived classes can add new behavior
while staying undercover.
@@ -843,6 +754,30 @@ class Singleton:
return repr(self.instance)
+def get_entry_points(*, group: str):
+ """Wrapper for ``importlib.metadata.entry_points``
+
+ Args:
+ group: entry points to select
+
+ Returns:
+ EntryPoints for ``group`` or empty list if unsupported
+ """
+
+ try:
+ import importlib.metadata # type: ignore # novermin
+ except ImportError:
+ return []
+
+ try:
+ return importlib.metadata.entry_points(group=group)
+ except TypeError:
+ # Prior to Python 3.10, entry_points accepted no parameters and always
+ # returned a dictionary of entry points, keyed by group. See
+ # https://docs.python.org/3/library/importlib.metadata.html#entry-points
+ return importlib.metadata.entry_points().get(group, [])
+
+
def load_module_from_file(module_name, module_path):
"""Loads a python module from the path of the corresponding file.
@@ -911,39 +846,32 @@ def uniq(sequence):
return uniq_list
-def star(func):
- """Unpacks arguments for use with Multiprocessing mapping functions"""
-
- def _wrapper(args):
- return func(*args)
-
- return _wrapper
-
-
-class Devnull:
- """Null stream with less overhead than ``os.devnull``.
-
- See https://stackoverflow.com/a/2929954.
- """
-
- def write(self, *_):
- pass
-
-
-def elide_list(line_list, max_num=10):
+def elide_list(line_list: List[str], max_num: int = 10) -> List[str]:
"""Takes a long list and limits it to a smaller number of elements,
replacing intervening elements with '...'. For example::
- elide_list([1,2,3,4,5,6], 4)
+ elide_list(["1", "2", "3", "4", "5", "6"], 4)
gives::
- [1, 2, 3, '...', 6]
+ ["1", "2", "3", "...", "6"]
"""
if len(line_list) > max_num:
- return line_list[: max_num - 1] + ["..."] + line_list[-1:]
- else:
- return line_list
+ return [*line_list[: max_num - 1], "...", line_list[-1]]
+ return line_list
+
+
+if sys.version_info >= (3, 9):
+ PatternStr = re.Pattern[str]
+else:
+ PatternStr = typing.Pattern[str]
+
+
+def fnmatch_translate_multiple(named_patterns: Dict[str, str]) -> str:
+ """Similar to ``fnmatch.translate``, but takes an ordered dictionary where keys are pattern
+ names, and values are filename patterns. The output is a regex that matches any of the
+ patterns in order, and named capture groups are used to identify which pattern matched."""
+ return "|".join(f"(?P<{n}>{fnmatch.translate(p)})" for n, p in named_patterns.items())
@contextlib.contextmanager
@@ -958,18 +886,12 @@ class UnhashableArguments(TypeError):
"""Raise when an @memoized function receives unhashable arg or kwarg values."""
-def enum(**kwargs):
- """Return an enum-like class.
-
- Args:
- **kwargs: explicit dictionary of enums
- """
- return type("Enum", (object,), kwargs)
+T = TypeVar("T")
def stable_partition(
- input_iterable: Iterable, predicate_fn: Callable[[Any], bool]
-) -> Tuple[List[Any], List[Any]]:
+ input_iterable: Iterable[T], predicate_fn: Callable[[T], bool]
+) -> Tuple[List[T], List[T]]:
"""Partition the input iterable according to a custom predicate.
Args:
@@ -981,12 +903,13 @@ def stable_partition(
Tuple of the list of elements evaluating to True, and
list of elements evaluating to False.
"""
- true_items, false_items = [], []
+ true_items: List[T] = []
+ false_items: List[T] = []
for item in input_iterable:
if predicate_fn(item):
true_items.append(item)
- continue
- false_items.append(item)
+ else:
+ false_items.append(item)
return true_items, false_items
@@ -998,6 +921,21 @@ def ensure_last(lst, *elements):
lst.append(lst.pop(lst.index(elt)))
+class Const:
+ """Class level constant, raises when trying to set the attribute"""
+
+ __slots__ = ["value"]
+
+ def __init__(self, value):
+ self.value = value
+
+ def __get__(self, instance, owner):
+ return self.value
+
+ def __set__(self, instance, value):
+ raise TypeError(f"Const value does not support assignment [value={self.value}]")
+
+
class TypedMutableSequence(collections.abc.MutableSequence):
"""Base class that behaves like a list, just with a different type.
@@ -1102,3 +1040,42 @@ class classproperty:
def __get__(self, instance, owner):
return self.callback(owner)
+
+
+class DeprecatedProperty:
+ """Data descriptor to error or warn when a deprecated property is accessed.
+
+ Derived classes must define a factory method to return an adaptor for the deprecated
+ property, if the descriptor is not set to error.
+ """
+
+ __slots__ = ["name"]
+
+ #: 0 - Nothing
+ #: 1 - Warning
+ #: 2 - Error
+ error_lvl = 0
+
+ def __init__(self, name: str) -> None:
+ self.name = name
+
+ def __get__(self, instance, owner):
+ if instance is None:
+ return self
+
+ if self.error_lvl == 1:
+ warnings.warn(
+ f"accessing the '{self.name}' property of '{instance}', which is deprecated"
+ )
+ elif self.error_lvl == 2:
+ raise AttributeError(f"cannot access the '{self.name}' attribute of '{instance}'")
+
+ return self.factory(instance, owner)
+
+ def __set__(self, instance, value):
+ raise TypeError(
+ f"the deprecated property '{self.name}' of '{instance}' does not support assignment"
+ )
+
+ def factory(self, instance, owner):
+ raise NotImplementedError("must be implemented by derived classes")
diff --git a/lib/spack/llnl/util/link_tree.py b/lib/spack/llnl/util/link_tree.py
index 8ae1b0ab29..e6299e08e6 100644
--- a/lib/spack/llnl/util/link_tree.py
+++ b/lib/spack/llnl/util/link_tree.py
@@ -8,7 +8,7 @@
import filecmp
import os
import shutil
-from collections import OrderedDict
+from typing import Callable, Dict, List, Optional, Tuple
import llnl.util.tty as tty
from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, touch, traverse_tree
@@ -51,32 +51,32 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
- A list of merge conflicts in dst/
"""
- def __init__(self, ignore=None):
+ def __init__(self, ignore: Optional[Callable[[str], bool]] = None):
self.ignore = ignore if ignore is not None else lambda f: False
- # When mapping <src root> to <dst root>/<projection>, we need
- # to prepend the <projection> bit to the relative path in the
- # destination dir.
- self.projection = ""
+ # When mapping <src root> to <dst root>/<projection>, we need to prepend the <projection>
+ # bit to the relative path in the destination dir.
+ self.projection: str = ""
- # When a file blocks another file, the conflict can sometimes
- # be resolved / ignored (e.g. <prefix>/LICENSE or
- # or <site-packages>/<namespace>/__init__.py conflicts can be
- # ignored).
- self.file_conflicts = []
+ # Two files f and g conflict if they are not os.path.samefile(f, g) and they are both
+ # projected to the same destination file. These conflicts are not necessarily fatal, and
+ # can be resolved or ignored. For example <prefix>/LICENSE or
+ # <site-packages>/<namespace>/__init__.py conflicts can be ignored).
+ self.file_conflicts: List[MergeConflict] = []
- # When we have to create a dir where a file is, or a file
- # where a dir is, we have fatal errors, listed here.
- self.fatal_conflicts = []
+ # When we have to create a dir where a file is, or a file where a dir is, we have fatal
+ # errors, listed here.
+ self.fatal_conflicts: List[MergeConflict] = []
- # What directories we have to make; this is an ordered set,
- # so that we have a fast lookup and can run mkdir in order.
- self.directories = OrderedDict()
+ # What directories we have to make; this is an ordered dict, so that we have a fast lookup
+ # and can run mkdir in order.
+ self.directories: Dict[str, Tuple[str, str]] = {}
- # Files to link. Maps dst_rel to (src_root, src_rel)
- self.files = OrderedDict()
+ # Files to link. Maps dst_rel to (src_root, src_rel). This is an ordered dict, where files
+ # are guaranteed to be grouped by src_root in the order they were visited.
+ self.files: Dict[str, Tuple[str, str]] = {}
- def before_visit_dir(self, root, rel_path, depth):
+ def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Register a directory if dst / rel_path is not blocked by a file or ignored.
"""
@@ -104,7 +104,7 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
self.directories[proj_rel_path] = (root, rel_path)
return True
- def before_visit_symlinked_dir(self, root, rel_path, depth):
+ def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Replace symlinked dirs with actual directories when possible in low depths,
otherwise handle it as a file (i.e. we link to the symlink).
@@ -136,40 +136,56 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
self.visit_file(root, rel_path, depth)
return False
- def visit_file(self, root, rel_path, depth):
+ def visit_file(self, root: str, rel_path: str, depth: int, *, symlink: bool = False) -> None:
proj_rel_path = os.path.join(self.projection, rel_path)
if self.ignore(rel_path):
pass
elif proj_rel_path in self.directories:
# Can't create a file where a dir is; fatal error
- src_a_root, src_a_relpath = self.directories[proj_rel_path]
self.fatal_conflicts.append(
MergeConflict(
dst=proj_rel_path,
- src_a=os.path.join(src_a_root, src_a_relpath),
+ src_a=os.path.join(*self.directories[proj_rel_path]),
src_b=os.path.join(root, rel_path),
)
)
elif proj_rel_path in self.files:
- # In some cases we can resolve file-file conflicts
- src_a_root, src_a_relpath = self.files[proj_rel_path]
- self.file_conflicts.append(
- MergeConflict(
- dst=proj_rel_path,
- src_a=os.path.join(src_a_root, src_a_relpath),
- src_b=os.path.join(root, rel_path),
+ # When two files project to the same path, they conflict iff they are distinct.
+ # If they are the same (i.e. one links to the other), register regular files rather
+ # than symlinks. The reason is that in copy-type views, we need a copy of the actual
+ # file, not the symlink.
+
+ src_a = os.path.join(*self.files[proj_rel_path])
+ src_b = os.path.join(root, rel_path)
+
+ try:
+ samefile = os.path.samefile(src_a, src_b)
+ except OSError:
+ samefile = False
+
+ if not samefile:
+ # Distinct files produce a conflict.
+ self.file_conflicts.append(
+ MergeConflict(dst=proj_rel_path, src_a=src_a, src_b=src_b)
)
- )
+ return
+
+ if not symlink:
+ # Remove the link in favor of the actual file. The del is necessary to maintain the
+ # order of the files dict, which is grouped by root.
+ del self.files[proj_rel_path]
+ self.files[proj_rel_path] = (root, rel_path)
+
else:
# Otherwise register this file to be linked.
self.files[proj_rel_path] = (root, rel_path)
- def visit_symlinked_file(self, root, rel_path, depth):
+ def visit_symlinked_file(self, root: str, rel_path: str, depth: int) -> None:
# Treat symlinked files as ordinary files (without "dereferencing")
- self.visit_file(root, rel_path, depth)
+ self.visit_file(root, rel_path, depth, symlink=True)
- def set_projection(self, projection):
+ def set_projection(self, projection: str) -> None:
self.projection = os.path.normpath(projection)
# Todo, is this how to check in general for empty projection?
@@ -197,24 +213,19 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
class DestinationMergeVisitor(BaseDirectoryVisitor):
- """DestinatinoMergeVisitor takes a SourceMergeVisitor
- and:
+ """DestinatinoMergeVisitor takes a SourceMergeVisitor and:
- a. registers additional conflicts when merging
- to the destination prefix
- b. removes redundant mkdir operations when
- directories already exist in the destination
- prefix.
+ a. registers additional conflicts when merging to the destination prefix
+ b. removes redundant mkdir operations when directories already exist in the destination prefix.
- This also makes sure that symlinked directories
- in the target prefix will never be merged with
+ This also makes sure that symlinked directories in the target prefix will never be merged with
directories in the sources directories.
"""
- def __init__(self, source_merge_visitor):
+ def __init__(self, source_merge_visitor: SourceMergeVisitor):
self.src = source_merge_visitor
- def before_visit_dir(self, root, rel_path, depth):
+ def before_visit_dir(self, root: str, rel_path: str, depth: int) -> bool:
# If destination dir is a file in a src dir, add a conflict,
# and don't traverse deeper
if rel_path in self.src.files:
@@ -236,7 +247,7 @@ class DestinationMergeVisitor(BaseDirectoryVisitor):
# don't descend into it.
return False
- def before_visit_symlinked_dir(self, root, rel_path, depth):
+ def before_visit_symlinked_dir(self, root: str, rel_path: str, depth: int) -> bool:
"""
Symlinked directories in the destination prefix should
be seen as files; we should not accidentally merge
@@ -262,7 +273,7 @@ class DestinationMergeVisitor(BaseDirectoryVisitor):
# Never descend into symlinked target dirs.
return False
- def visit_file(self, root, rel_path, depth):
+ def visit_file(self, root: str, rel_path: str, depth: int) -> None:
# Can't merge a file if target already exists
if rel_path in self.src.directories:
src_a_root, src_a_relpath = self.src.directories[rel_path]
@@ -280,7 +291,7 @@ class DestinationMergeVisitor(BaseDirectoryVisitor):
)
)
- def visit_symlinked_file(self, root, rel_path, depth):
+ def visit_symlinked_file(self, root: str, rel_path: str, depth: int) -> None:
# Treat symlinked files as ordinary files (without "dereferencing")
self.visit_file(root, rel_path, depth)
diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py
index 08c90b21ce..3df408cb31 100644
--- a/lib/spack/llnl/util/lock.py
+++ b/lib/spack/llnl/util/lock.py
@@ -815,10 +815,6 @@ class LockDowngradeError(LockError):
super().__init__(msg)
-class LockLimitError(LockError):
- """Raised when exceed maximum attempts to acquire a lock."""
-
-
class LockTimeoutError(LockError):
"""Raised when an attempt to acquire a lock times out."""
diff --git a/lib/spack/llnl/util/symlink.py b/lib/spack/llnl/util/symlink.py
index 229f3f8115..be758c4d13 100644
--- a/lib/spack/llnl/util/symlink.py
+++ b/lib/spack/llnl/util/symlink.py
@@ -8,100 +8,75 @@ import shutil
import subprocess
import sys
import tempfile
+from typing import Union
from llnl.util import lang, tty
-from ..path import system_path_filter
+from ..path import sanitize_win_longpath, system_path_filter
if sys.platform == "win32":
from win32file import CreateHardLink
-is_windows = sys.platform == "win32"
+def _windows_symlink(
+ src: str, dst: str, target_is_directory: bool = False, *, dir_fd: Union[int, None] = None
+):
+ """On Windows with System Administrator privileges this will be a normal symbolic link via
+ os.symlink. On Windows without privledges the link will be a junction for a directory and a
+ hardlink for a file. On Windows the various link types are:
-def symlink(source_path: str, link_path: str, allow_broken_symlinks: bool = not is_windows):
- """
- Create a link.
-
- On non-Windows and Windows with System Administrator
- privleges this will be a normal symbolic link via
- os.symlink.
-
- On Windows without privledges the link will be a
- junction for a directory and a hardlink for a file.
- On Windows the various link types are:
-
- Symbolic Link: A link to a file or directory on the
- same or different volume (drive letter) or even to
- a remote file or directory (using UNC in its path).
- Need System Administrator privileges to make these.
-
- Hard Link: A link to a file on the same volume (drive
- letter) only. Every file (file's data) has at least 1
- hard link (file's name). But when this method creates
- a new hard link there will be 2. Deleting all hard
- links effectively deletes the file. Don't need System
- Administrator privileges.
-
- Junction: A link to a directory on the same or different
- volume (drive letter) but not to a remote directory. Don't
- need System Administrator privileges.
-
- Parameters:
- source_path (str): The real file or directory that the link points to.
- Must be absolute OR relative to the link.
- link_path (str): The path where the link will exist.
- allow_broken_symlinks (bool): On Linux or Mac, don't raise an exception if the source_path
- doesn't exist. This will still raise an exception on Windows.
- """
- source_path = os.path.normpath(source_path)
- win_source_path = source_path
- link_path = os.path.normpath(link_path)
+ Symbolic Link: A link to a file or directory on the same or different volume (drive letter) or
+ even to a remote file or directory (using UNC in its path). Need System Administrator
+ privileges to make these.
- # Never allow broken links on Windows.
- if sys.platform == "win32" and allow_broken_symlinks:
- raise ValueError("allow_broken_symlinks parameter cannot be True on Windows.")
+ Hard Link: A link to a file on the same volume (drive letter) only. Every file (file's data)
+ has at least 1 hard link (file's name). But when this method creates a new hard link there will
+ be 2. Deleting all hard links effectively deletes the file. Don't need System Administrator
+ privileges.
- if not allow_broken_symlinks:
- # Perform basic checks to make sure symlinking will succeed
- if os.path.lexists(link_path):
- raise AlreadyExistsError(
- f"Link path ({link_path}) already exists. Cannot create link."
+ Junction: A link to a directory on the same or different volume (drive letter) but not to a
+ remote directory. Don't need System Administrator privileges."""
+ source_path = os.path.normpath(src)
+ win_source_path = source_path
+ link_path = os.path.normpath(dst)
+
+ # Perform basic checks to make sure symlinking will succeed
+ if os.path.lexists(link_path):
+ raise AlreadyExistsError(f"Link path ({link_path}) already exists. Cannot create link.")
+
+ if not os.path.exists(source_path):
+ if os.path.isabs(source_path):
+ # An absolute source path that does not exist will result in a broken link.
+ raise SymlinkError(
+ f"Source path ({source_path}) is absolute but does not exist. Resulting "
+ f"link would be broken so not making link."
)
-
- if not os.path.exists(source_path):
- if os.path.isabs(source_path) and not allow_broken_symlinks:
- # An absolute source path that does not exist will result in a broken link.
+ else:
+ # os.symlink can create a link when the given source path is relative to
+ # the link path. Emulate this behavior and check to see if the source exists
+ # relative to the link path ahead of link creation to prevent broken
+ # links from being made.
+ link_parent_dir = os.path.dirname(link_path)
+ relative_path = os.path.join(link_parent_dir, source_path)
+ if os.path.exists(relative_path):
+ # In order to work on windows, the source path needs to be modified to be
+ # relative because hardlink/junction dont resolve relative paths the same
+ # way as os.symlink. This is ignored on other operating systems.
+ win_source_path = relative_path
+ else:
raise SymlinkError(
- f"Source path ({source_path}) is absolute but does not exist. Resulting "
- f"link would be broken so not making link."
+ f"The source path ({source_path}) is not relative to the link path "
+ f"({link_path}). Resulting link would be broken so not making link."
)
- else:
- # os.symlink can create a link when the given source path is relative to
- # the link path. Emulate this behavior and check to see if the source exists
- # relative to the link path ahead of link creation to prevent broken
- # links from being made.
- link_parent_dir = os.path.dirname(link_path)
- relative_path = os.path.join(link_parent_dir, source_path)
- if os.path.exists(relative_path):
- # In order to work on windows, the source path needs to be modified to be
- # relative because hardlink/junction dont resolve relative paths the same
- # way as os.symlink. This is ignored on other operating systems.
- win_source_path = relative_path
- elif not allow_broken_symlinks:
- raise SymlinkError(
- f"The source path ({source_path}) is not relative to the link path "
- f"({link_path}). Resulting link would be broken so not making link."
- )
# Create the symlink
- if sys.platform == "win32" and not _windows_can_symlink():
+ if not _windows_can_symlink():
_windows_create_link(win_source_path, link_path)
else:
os.symlink(source_path, link_path, target_is_directory=os.path.isdir(source_path))
-def islink(path: str) -> bool:
+def _windows_islink(path: str) -> bool:
"""Override os.islink to give correct answer for spack logic.
For Non-Windows: a link can be determined with the os.path.islink method.
@@ -189,6 +164,7 @@ def _windows_can_symlink() -> bool:
import llnl.util.filesystem as fs
fs.touchp(fpath)
+ fs.mkdirp(dpath)
try:
os.symlink(dpath, dlink)
@@ -246,9 +222,9 @@ def _windows_create_junction(source: str, link: str):
out, err = proc.communicate()
tty.debug(out.decode())
if proc.returncode != 0:
- err = err.decode()
- tty.error(err)
- raise SymlinkError("Make junction command returned a non-zero return code.", err)
+ err_str = err.decode()
+ tty.error(err_str)
+ raise SymlinkError("Make junction command returned a non-zero return code.", err_str)
def _windows_create_hard_link(path: str, link: str):
@@ -268,14 +244,14 @@ def _windows_create_hard_link(path: str, link: str):
CreateHardLink(link, path)
-def readlink(path: str):
+def _windows_readlink(path: str, *, dir_fd=None):
"""Spack utility to override of os.readlink method to work cross platform"""
if _windows_is_hardlink(path):
return _windows_read_hard_link(path)
elif _windows_is_junction(path):
return _windows_read_junction(path)
else:
- return os.readlink(path)
+ return sanitize_win_longpath(os.readlink(path, dir_fd=dir_fd))
def _windows_read_hard_link(link: str) -> str:
@@ -337,6 +313,16 @@ def resolve_link_target_relative_to_the_link(link):
return os.path.join(link_dir, target)
+if sys.platform == "win32":
+ symlink = _windows_symlink
+ readlink = _windows_readlink
+ islink = _windows_islink
+else:
+ symlink = os.symlink
+ readlink = os.readlink
+ islink = os.path.islink
+
+
class SymlinkError(RuntimeError):
"""Exception class for errors raised while creating symlinks,
junctions and hard links
diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py
index 7a322a6e48..807e50a159 100644
--- a/lib/spack/llnl/util/tty/__init__.py
+++ b/lib/spack/llnl/util/tty/__init__.py
@@ -12,7 +12,7 @@ import textwrap
import traceback
from datetime import datetime
from sys import platform as _platform
-from typing import NoReturn
+from typing import Any, NoReturn
if _platform != "win32":
import fcntl
@@ -44,10 +44,6 @@ def is_debug(level=1):
return _debug >= level
-def is_stacktrace():
- return _stacktrace
-
-
def set_debug(level=0):
global _debug
assert level >= 0, "Debug level must be a positive value"
@@ -162,21 +158,22 @@ def get_timestamp(force=False):
return ""
-def msg(message, *args, **kwargs):
+def msg(message: Any, *args: Any, newline: bool = True) -> None:
if not msg_enabled():
return
if isinstance(message, Exception):
- message = "%s: %s" % (message.__class__.__name__, str(message))
+ message = f"{message.__class__.__name__}: {message}"
+ else:
+ message = str(message)
- newline = kwargs.get("newline", True)
st_text = ""
if _stacktrace:
st_text = process_stacktrace(2)
- if newline:
- cprint("@*b{%s==>} %s%s" % (st_text, get_timestamp(), cescape(_output_filter(message))))
- else:
- cwrite("@*b{%s==>} %s%s" % (st_text, get_timestamp(), cescape(_output_filter(message))))
+
+ nl = "\n" if newline else ""
+ cwrite(f"@*b{{{st_text}==>}} {get_timestamp()}{cescape(_output_filter(message))}{nl}")
+
for arg in args:
print(indent + _output_filter(str(arg)))
@@ -252,37 +249,6 @@ def die(message, *args, **kwargs) -> NoReturn:
sys.exit(1)
-def get_number(prompt, **kwargs):
- default = kwargs.get("default", None)
- abort = kwargs.get("abort", None)
-
- if default is not None and abort is not None:
- prompt += " (default is %s, %s to abort) " % (default, abort)
- elif default is not None:
- prompt += " (default is %s) " % default
- elif abort is not None:
- prompt += " (%s to abort) " % abort
-
- number = None
- while number is None:
- msg(prompt, newline=False)
- ans = input()
- if ans == str(abort):
- return None
-
- if ans:
- try:
- number = int(ans)
- if number < 1:
- msg("Please enter a valid number.")
- number = None
- except ValueError:
- msg("Please enter a valid number.")
- elif default is not None:
- number = default
- return number
-
-
def get_yes_or_no(prompt, **kwargs):
default_value = kwargs.get("default", None)
diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py
index 719b480e4a..a40b8fb116 100644
--- a/lib/spack/llnl/util/tty/colify.py
+++ b/lib/spack/llnl/util/tty/colify.py
@@ -237,7 +237,6 @@ def colify_table(
def colified(
elts: List[Any],
cols: int = 0,
- output: Optional[IO] = None,
indent: int = 0,
padding: int = 2,
tty: Optional[bool] = None,
diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py
index bef7af8e58..51a5a1b5b1 100644
--- a/lib/spack/llnl/util/tty/color.py
+++ b/lib/spack/llnl/util/tty/color.py
@@ -59,9 +59,11 @@ The console can be reset later to plain text with '@.'.
To output an @, use '@@'. To output a } inside braces, use '}}'.
"""
+import os
import re
import sys
from contextlib import contextmanager
+from typing import Optional
class ColorParseError(Exception):
@@ -95,14 +97,34 @@ colors = {
} # white
# Regex to be used for color formatting
-color_re = r"@(?:@|\.|([*_])?([a-zA-Z])?(?:{((?:[^}]|}})*)})?)"
+COLOR_RE = re.compile(r"@(?:(@)|(\.)|([*_])?([a-zA-Z])?(?:{((?:[^}]|}})*)})?)")
# Mapping from color arguments to values for tty.set_color
color_when_values = {"always": True, "auto": None, "never": False}
-# Force color; None: Only color if stdout is a tty
-# True: Always colorize output, False: Never colorize output
-_force_color = None
+
+def _color_when_value(when):
+ """Raise a ValueError for an invalid color setting.
+
+ Valid values are 'always', 'never', and 'auto', or equivalently,
+ True, False, and None.
+ """
+ if when in color_when_values:
+ return color_when_values[when]
+ elif when not in color_when_values.values():
+ raise ValueError("Invalid color setting: %s" % when)
+ return when
+
+
+def _color_from_environ() -> Optional[bool]:
+ try:
+ return _color_when_value(os.environ.get("SPACK_COLOR", "auto"))
+ except ValueError:
+ return None
+
+
+#: When `None` colorize when stdout is tty, when `True` or `False` always or never colorize resp.
+_force_color = _color_from_environ()
def try_enable_terminal_color_on_windows():
@@ -163,19 +185,6 @@ def try_enable_terminal_color_on_windows():
debug("Unable to support color on Windows terminal")
-def _color_when_value(when):
- """Raise a ValueError for an invalid color setting.
-
- Valid values are 'always', 'never', and 'auto', or equivalently,
- True, False, and None.
- """
- if when in color_when_values:
- return color_when_values[when]
- elif when not in color_when_values.values():
- raise ValueError("Invalid color setting: %s" % when)
- return when
-
-
def get_color_when():
"""Return whether commands should print color or not."""
if _force_color is not None:
@@ -203,77 +212,66 @@ def color_when(value):
set_color_when(old_value)
-class match_to_ansi:
- def __init__(self, color=True, enclose=False, zsh=False):
- self.color = _color_when_value(color)
- self.enclose = enclose
- self.zsh = zsh
-
- def escape(self, s):
- """Returns a TTY escape sequence for a color"""
- if self.color:
- if self.zsh:
- result = rf"\e[0;{s}m"
- else:
- result = f"\033[{s}m"
-
- if self.enclose:
- result = rf"\[{result}\]"
-
- return result
+def _escape(s: str, color: bool, enclose: bool, zsh: bool) -> str:
+ """Returns a TTY escape sequence for a color"""
+ if color:
+ if zsh:
+ result = rf"\e[0;{s}m"
else:
- return ""
+ result = f"\033[{s}m"
- def __call__(self, match):
- """Convert a match object generated by ``color_re`` into an ansi
- color code. This can be used as a handler in ``re.sub``.
- """
- style, color, text = match.groups()
- m = match.group(0)
+ if enclose:
+ result = rf"\[{result}\]"
- if m == "@@":
- return "@"
- elif m == "@.":
- return self.escape(0)
- elif m == "@":
- raise ColorParseError("Incomplete color format: '%s' in %s" % (m, match.string))
-
- string = styles[style]
- if color:
- if color not in colors:
- raise ColorParseError(
- "Invalid color specifier: '%s' in '%s'" % (color, match.string)
- )
- string += ";" + str(colors[color])
+ return result
+ else:
+ return ""
- colored_text = ""
- if text:
- colored_text = text + self.escape(0)
- return self.escape(string) + colored_text
-
-
-def colorize(string, **kwargs):
+def colorize(
+ string: str, color: Optional[bool] = None, enclose: bool = False, zsh: bool = False
+) -> str:
"""Replace all color expressions in a string with ANSI control codes.
Args:
- string (str): The string to replace
+ string: The string to replace
Returns:
- str: The filtered string
+ The filtered string
Keyword Arguments:
- color (bool): If False, output will be plain text without control
- codes, for output to non-console devices.
- enclose (bool): If True, enclose ansi color sequences with
+ color: If False, output will be plain text without control codes, for output to
+ non-console devices (default: automatically choose color or not)
+ enclose: If True, enclose ansi color sequences with
square brackets to prevent misestimation of terminal width.
- zsh (bool): If True, use zsh ansi codes instead of bash ones (for variables like PS1)
+ zsh: If True, use zsh ansi codes instead of bash ones (for variables like PS1)
"""
- color = _color_when_value(kwargs.get("color", get_color_when()))
- zsh = kwargs.get("zsh", False)
- string = re.sub(color_re, match_to_ansi(color, kwargs.get("enclose")), string, zsh)
- string = string.replace("}}", "}")
- return string
+ color = color if color is not None else get_color_when()
+
+ def match_to_ansi(match):
+ """Convert a match object generated by ``COLOR_RE`` into an ansi
+ color code. This can be used as a handler in ``re.sub``.
+ """
+ escaped_at, dot, style, color_code, text = match.groups()
+
+ if escaped_at:
+ return "@"
+ elif dot:
+ return _escape(0, color, enclose, zsh)
+ elif not (style or color_code):
+ raise ColorParseError(
+ f"Incomplete color format: '{match.group(0)}' in '{match.string}'"
+ )
+
+ color_number = colors.get(color_code, "")
+ semi = ";" if color_number else ""
+ ansi_code = _escape(f"{styles[style]}{semi}{color_number}", color, enclose, zsh)
+ if text:
+ return f"{ansi_code}{text}{_escape(0, color, enclose, zsh)}"
+ else:
+ return ansi_code
+
+ return COLOR_RE.sub(match_to_ansi, string).replace("}}", "}")
def clen(string):
@@ -305,7 +303,7 @@ def cprint(string, stream=None, color=None):
cwrite(string + "\n", stream, color)
-def cescape(string):
+def cescape(string: str) -> str:
"""Escapes special characters needed for color codes.
Replaces the following symbols with their equivalent literal forms:
@@ -321,10 +319,7 @@ def cescape(string):
Returns:
(str): the string with color codes escaped
"""
- string = str(string)
- string = string.replace("@", "@@")
- string = string.replace("}", "}}")
- return string
+ return string.replace("@", "@@").replace("}", "}}")
class ColorStream:
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py
index 16fe45edfc..534472dbec 100644
--- a/lib/spack/llnl/util/tty/log.py
+++ b/lib/spack/llnl/util/tty/log.py
@@ -18,9 +18,10 @@ import sys
import threading
import traceback
from contextlib import contextmanager
+from multiprocessing.connection import Connection
from threading import Thread
from types import ModuleType
-from typing import Optional
+from typing import Callable, Optional
import llnl.util.tty as tty
@@ -33,8 +34,23 @@ except ImportError:
pass
+esc, bell, lbracket, bslash, newline = r"\x1b", r"\x07", r"\[", r"\\", r"\n"
+# Ansi Control Sequence Introducers (CSI) are a well-defined format
+# Standard ECMA-48: Control Functions for Character-Imaging I/O Devices, section 5.4
+# https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf
+csi_pre = f"{esc}{lbracket}"
+csi_param, csi_inter, csi_post = r"[0-?]", r"[ -/]", r"[@-~]"
+ansi_csi = f"{csi_pre}{csi_param}*{csi_inter}*{csi_post}"
+# General ansi escape sequences have well-defined prefixes,
+# but content and suffixes are less reliable.
+# Conservatively assume they end with either "<ESC>\" or "<BELL>",
+# with no intervening "<ESC>"/"<BELL>" keys or newlines
+esc_pre = f"{esc}[@-_]"
+esc_content = f"[^{esc}{bell}{newline}]"
+esc_post = f"(?:{esc}{bslash}|{bell})"
+ansi_esc = f"{esc_pre}{esc_content}*{esc_post}"
# Use this to strip escape sequences
-_escape = re.compile(r"\x1b[^m]*m|\x1b\[?1034h|\x1b\][0-9]+;[^\x07]*\x07")
+_escape = re.compile(f"{ansi_csi}|{ansi_esc}")
# control characters for enabling/disabling echo
#
@@ -329,49 +345,6 @@ class FileWrapper:
self.file.close()
-class MultiProcessFd:
- """Return an object which stores a file descriptor and can be passed as an
- argument to a function run with ``multiprocessing.Process``, such that
- the file descriptor is available in the subprocess."""
-
- def __init__(self, fd):
- self._connection = None
- self._fd = None
- if sys.version_info >= (3, 8):
- self._connection = multiprocessing.connection.Connection(fd)
- else:
- self._fd = fd
-
- @property
- def fd(self):
- if self._connection:
- return self._connection._handle
- else:
- return self._fd
-
- def close(self):
- if self._connection:
- self._connection.close()
- else:
- os.close(self._fd)
-
-
-def close_connection_and_file(multiprocess_fd, file):
- # MultiprocessFd is intended to transmit a FD
- # to a child process, this FD is then opened to a Python File object
- # (using fdopen). In >= 3.8, MultiprocessFd encapsulates a
- # multiprocessing.connection.Connection; Connection closes the FD
- # when it is deleted, and prints a warning about duplicate closure if
- # it is not explicitly closed. In < 3.8, MultiprocessFd encapsulates a
- # simple FD; closing the FD here appears to conflict with
- # closure of the File object (in < 3.8 that is). Therefore this needs
- # to choose whether to close the File or the Connection.
- if sys.version_info >= (3, 8):
- multiprocess_fd.close()
- else:
- file.close()
-
-
@contextmanager
def replace_environment(env):
"""Replace the current environment (`os.environ`) with `env`.
@@ -529,22 +502,20 @@ class nixlog:
# forcing debug output.
self._saved_debug = tty._debug
- # OS-level pipe for redirecting output to logger
- read_fd, write_fd = os.pipe()
-
- read_multiprocess_fd = MultiProcessFd(read_fd)
+ # Pipe for redirecting output to logger
+ read_fd, self.write_fd = multiprocessing.Pipe(duplex=False)
- # Multiprocessing pipe for communication back from the daemon
+ # Pipe for communication back from the daemon
# Currently only used to save echo value between uses
- self.parent_pipe, child_pipe = multiprocessing.Pipe()
+ self.parent_pipe, child_pipe = multiprocessing.Pipe(duplex=False)
# Sets a daemon that writes to file what it reads from a pipe
try:
# need to pass this b/c multiprocessing closes stdin in child.
- input_multiprocess_fd = None
+ input_fd = None
try:
if sys.stdin.isatty():
- input_multiprocess_fd = MultiProcessFd(os.dup(sys.stdin.fileno()))
+ input_fd = Connection(os.dup(sys.stdin.fileno()))
except BaseException:
# just don't forward input if this fails
pass
@@ -553,9 +524,9 @@ class nixlog:
self.process = multiprocessing.Process(
target=_writer_daemon,
args=(
- input_multiprocess_fd,
- read_multiprocess_fd,
- write_fd,
+ input_fd,
+ read_fd,
+ self.write_fd,
self.echo,
self.log_file,
child_pipe,
@@ -566,9 +537,9 @@ class nixlog:
self.process.start()
finally:
- if input_multiprocess_fd:
- input_multiprocess_fd.close()
- read_multiprocess_fd.close()
+ if input_fd:
+ input_fd.close()
+ read_fd.close()
# Flush immediately before redirecting so that anything buffered
# goes to the original stream
@@ -586,9 +557,9 @@ class nixlog:
self._saved_stderr = os.dup(sys.stderr.fileno())
# redirect to the pipe we created above
- os.dup2(write_fd, sys.stdout.fileno())
- os.dup2(write_fd, sys.stderr.fileno())
- os.close(write_fd)
+ os.dup2(self.write_fd.fileno(), sys.stdout.fileno())
+ os.dup2(self.write_fd.fileno(), sys.stderr.fileno())
+ self.write_fd.close()
else:
# Handle I/O the Python way. This won't redirect lower-level
@@ -601,7 +572,7 @@ class nixlog:
self._saved_stderr = sys.stderr
# create a file object for the pipe; redirect to it.
- pipe_fd_out = os.fdopen(write_fd, "w")
+ pipe_fd_out = os.fdopen(self.write_fd.fileno(), "w", closefd=False)
sys.stdout = pipe_fd_out
sys.stderr = pipe_fd_out
@@ -637,6 +608,7 @@ class nixlog:
else:
sys.stdout = self._saved_stdout
sys.stderr = self._saved_stderr
+ self.write_fd.close()
# print log contents in parent if needed.
if self.log_file.write_in_parent:
@@ -850,14 +822,14 @@ class winlog:
def _writer_daemon(
- stdin_multiprocess_fd,
- read_multiprocess_fd,
- write_fd,
- echo,
- log_file_wrapper,
- control_pipe,
- filter_fn,
-):
+ stdin_fd: Optional[Connection],
+ read_fd: Connection,
+ write_fd: Connection,
+ echo: bool,
+ log_file_wrapper: FileWrapper,
+ control_fd: Connection,
+ filter_fn: Optional[Callable[[str], str]],
+) -> None:
"""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
@@ -894,43 +866,37 @@ def _writer_daemon(
``StringIO`` in the parent. This is mainly for testing.
Arguments:
- stdin_multiprocess_fd (int): input from the terminal
- read_multiprocess_fd (int): pipe for reading from parent's redirected
- stdout
- echo (bool): initial echo setting -- controlled by user and
- preserved across multiple writer daemons
- 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
+ stdin_fd: optional input from the terminal
+ read_fd: pipe for reading from parent's redirected stdout
+ echo: initial echo setting -- controlled by user and preserved across multiple writer
+ daemons
+ log_file_wrapper: file to log all output
+ control_pipe: multiprocessing pipe on which to send control information to the parent
+ filter_fn: optional function to filter each line of output
"""
- # If this process was forked, then it will inherit file descriptors from
- # the parent process. This process depends on closing all instances of
- # write_fd to terminate the reading loop, so we close the file descriptor
- # here. Forking is the process spawning method everywhere except Mac OS
- # for Python >= 3.8 and on Windows
- if sys.version_info < (3, 8) or sys.platform != "darwin":
- os.close(write_fd)
+ # This process depends on closing all instances of write_pipe to terminate the reading loop
+ write_fd.close()
# 1. Use line buffering (3rd param = 1) since Python 3 has a bug
# that prevents unbuffered text I/O.
# 2. Python 3.x before 3.7 does not open with UTF-8 encoding by default
- in_pipe = os.fdopen(read_multiprocess_fd.fd, "r", 1, encoding="utf-8")
+ # 3. closefd=False because Connection has "ownership"
+ read_file = os.fdopen(read_fd.fileno(), "r", 1, encoding="utf-8", closefd=False)
- if stdin_multiprocess_fd:
- stdin = os.fdopen(stdin_multiprocess_fd.fd)
+ if stdin_fd:
+ stdin_file = os.fdopen(stdin_fd.fileno(), closefd=False)
else:
- stdin = None
+ stdin_file = None
# list of streams to select from
- istreams = [in_pipe, stdin] if stdin else [in_pipe]
+ istreams = [read_file, stdin_file] if stdin_file else [read_file]
force_echo = False # parent can force echo for certain output
log_file = log_file_wrapper.unwrap()
try:
- with keyboard_input(stdin) as kb:
+ with keyboard_input(stdin_file) as kb:
while True:
# fix the terminal settings if we recently came to
# the foreground
@@ -943,12 +909,12 @@ def _writer_daemon(
# Allow user to toggle echo with 'v' key.
# Currently ignores other chars.
# only read stdin if we're in the foreground
- if stdin in rlist and not _is_background_tty(stdin):
+ if stdin_file and stdin_file in rlist and not _is_background_tty(stdin_file):
# it's possible to be backgrounded between the above
# check and the read, so we ignore SIGTTIN here.
with ignore_signal(signal.SIGTTIN):
try:
- if stdin.read(1) == "v":
+ if stdin_file.read(1) == "v":
echo = not echo
except IOError as e:
# If SIGTTIN is ignored, the system gives EIO
@@ -957,13 +923,13 @@ def _writer_daemon(
if e.errno != errno.EIO:
raise
- if in_pipe in rlist:
+ if read_file in rlist:
line_count = 0
try:
while line_count < 100:
# Handle output from the calling process.
try:
- line = _retry(in_pipe.readline)()
+ line = _retry(read_file.readline)()
except UnicodeDecodeError:
# installs like --test=root gpgme produce non-UTF8 logs
line = "<line lost: output was not encoded as UTF-8>\n"
@@ -992,7 +958,7 @@ def _writer_daemon(
if xoff in controls:
force_echo = False
- if not _input_available(in_pipe):
+ if not _input_available(read_file):
break
finally:
if line_count > 0:
@@ -1007,14 +973,14 @@ def _writer_daemon(
finally:
# send written data back to parent if we used a StringIO
if isinstance(log_file, io.StringIO):
- control_pipe.send(log_file.getvalue())
+ control_fd.send(log_file.getvalue())
log_file_wrapper.close()
- close_connection_and_file(read_multiprocess_fd, in_pipe)
- if stdin_multiprocess_fd:
- close_connection_and_file(stdin_multiprocess_fd, stdin)
+ read_fd.close()
+ if stdin_fd:
+ stdin_fd.close()
# send echo value back to the parent so it can be preserved.
- control_pipe.send(echo)
+ control_fd.send(echo)
def _retry(function):
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index 2e2342ac80..e3b5bc21f4 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -3,8 +3,15 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+import re
+from typing import Optional
+
+import spack.paths
+import spack.util.git
+
#: PEP440 canonical <major>.<minor>.<micro>.<devN> string
-__version__ = "0.22.0.dev0"
+__version__ = "0.24.0.dev0"
spack_version = __version__
@@ -19,4 +26,58 @@ def __try_int(v):
spack_version_info = tuple([__try_int(v) for v in __version__.split(".")])
-__all__ = ["spack_version_info", "spack_version"]
+def get_spack_commit() -> Optional[str]:
+ """Get the Spack git commit sha.
+
+ Returns:
+ (str or None) the commit sha if available, otherwise None
+ """
+ git_path = os.path.join(spack.paths.prefix, ".git")
+ if not os.path.exists(git_path):
+ return None
+
+ git = spack.util.git.git()
+ if not git:
+ return None
+
+ rev = git(
+ "-C",
+ spack.paths.prefix,
+ "rev-parse",
+ "HEAD",
+ output=str,
+ error=os.devnull,
+ fail_on_error=False,
+ )
+ if git.returncode != 0:
+ return None
+
+ match = re.match(r"[a-f\d]{7,}$", rev)
+ return match.group(0) if match else None
+
+
+def get_version() -> str:
+ """Get a descriptive version of this instance of Spack.
+
+ Outputs '<PEP440 version> (<git commit sha>)'.
+
+ The commit sha is only added when available.
+ """
+ commit = get_spack_commit()
+ if commit:
+ return f"{spack_version} ({commit})"
+ return spack_version
+
+
+def get_short_version() -> str:
+ """Short Spack version."""
+ return f"{spack_version_info[0]}.{spack_version_info[1]}"
+
+
+__all__ = [
+ "spack_version_info",
+ "spack_version",
+ "get_version",
+ "get_spack_commit",
+ "get_short_version",
+]
diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py
deleted file mode 100644
index 33bc6293f5..0000000000
--- a/lib/spack/spack/abi.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 2013-2024 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 llnl.util.lang import memoized
-
-import spack.spec
-import spack.version
-from spack.compilers.clang import Clang
-from spack.util.executable import Executable, ProcessError
-
-
-class ABI:
- """This class provides methods to test ABI compatibility between specs.
- The current implementation is rather rough and could be improved."""
-
- def architecture_compatible(
- self, target: spack.spec.Spec, constraint: spack.spec.Spec
- ) -> bool:
- """Return true if architecture of target spec is ABI compatible
- to the architecture of constraint spec. If either the target
- or constraint specs have no architecture, target is also defined
- as architecture ABI compatible to constraint."""
- return (
- not target.architecture
- or not constraint.architecture
- or target.architecture.intersects(constraint.architecture)
- )
-
- @memoized
- def _gcc_get_libstdcxx_version(self, version):
- """Returns gcc ABI compatibility info by getting the library version of
- a compiler's libstdc++ or libgcc_s"""
- from spack.build_environment import dso_suffix
-
- spec = spack.spec.CompilerSpec("gcc", version)
- compilers = spack.compilers.compilers_for_spec(spec)
- if not compilers:
- return None
- compiler = compilers[0]
- rungcc = None
- libname = None
- output = None
- if compiler.cxx:
- rungcc = Executable(compiler.cxx)
- libname = "libstdc++." + dso_suffix
- elif compiler.cc:
- rungcc = Executable(compiler.cc)
- libname = "libgcc_s." + dso_suffix
- else:
- return None
- try:
- # Some gcc's are actually clang and don't respond properly to
- # --print-file-name (they just print the filename, not the
- # full path). Ignore these and expect them to be handled as clang.
- if Clang.default_version(rungcc.exe[0]) != "unknown":
- return None
-
- output = rungcc("--print-file-name=%s" % libname, output=str)
- except ProcessError:
- return None
- if not output:
- return None
- libpath = os.path.realpath(output.strip())
- if not libpath:
- return None
- return os.path.basename(libpath)
-
- @memoized
- def _gcc_compiler_compare(self, pversion, cversion):
- """Returns true iff the gcc version pversion and cversion
- are ABI compatible."""
- plib = self._gcc_get_libstdcxx_version(pversion)
- clib = self._gcc_get_libstdcxx_version(cversion)
- if not plib or not clib:
- return False
- return plib == clib
-
- def _intel_compiler_compare(
- self, pversion: spack.version.ClosedOpenRange, cversion: spack.version.ClosedOpenRange
- ) -> bool:
- """Returns true iff the intel version pversion and cversion
- are ABI compatible"""
-
- # Test major and minor versions. Ignore build version.
- pv = pversion.lo
- cv = cversion.lo
- return pv.up_to(2) == cv.up_to(2)
-
- def compiler_compatible(
- self, parent: spack.spec.Spec, child: spack.spec.Spec, loose: bool = False
- ) -> bool:
- """Return true if compilers for parent and child are ABI compatible."""
- if not parent.compiler or not child.compiler:
- return True
-
- if parent.compiler.name != child.compiler.name:
- # Different compiler families are assumed ABI incompatible
- return False
-
- if loose:
- return True
-
- # TODO: Can we move the specialized ABI matching stuff
- # TODO: into compiler classes?
- for pversion in parent.compiler.versions:
- for cversion in child.compiler.versions:
- # For a few compilers use specialized comparisons.
- # Otherwise match on version match.
- if pversion.intersects(cversion):
- return True
- elif parent.compiler.name == "gcc" and self._gcc_compiler_compare(
- pversion, cversion
- ):
- return True
- elif parent.compiler.name == "intel" and self._intel_compiler_compare(
- pversion, cversion
- ):
- return True
- return False
-
- def compatible(
- self, target: spack.spec.Spec, constraint: spack.spec.Spec, loose: bool = False
- ) -> bool:
- """Returns true if target spec is ABI compatible to constraint spec"""
- return self.architecture_compatible(target, constraint) and self.compiler_compatible(
- target, constraint, loose=loose
- )
diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py
index 03ec05b44d..77e85172d7 100644
--- a/lib/spack/spack/audit.py
+++ b/lib/spack/spack/audit.py
@@ -42,15 +42,20 @@ import glob
import inspect
import io
import itertools
+import os
import pathlib
import pickle
import re
import warnings
+from typing import Iterable, List, Set, Tuple
from urllib.request import urlopen
import llnl.util.lang
+from llnl.string import plural
+import spack.builder
import spack.config
+import spack.fetch_strategy
import spack.patch
import spack.repo
import spack.spec
@@ -73,7 +78,9 @@ class Error:
self.details = tuple(details)
def __str__(self):
- return self.summary + "\n" + "\n".join([" " + detail for detail in self.details])
+ if self.details:
+ return f"{self.summary}\n" + "\n".join(f" {detail}" for detail in self.details)
+ return self.summary
def __eq__(self, other):
if self.summary != other.summary or self.details != other.details:
@@ -210,6 +217,11 @@ config_packages = AuditClass(
group="configs", tag="CFG-PACKAGES", description="Sanity checks on packages.yaml", kwargs=()
)
+#: Sanity checks on packages.yaml
+config_repos = AuditClass(
+ group="configs", tag="CFG-REPOS", description="Sanity checks on repositories", kwargs=()
+)
+
@config_packages
def _search_duplicate_specs_in_externals(error_cls):
@@ -244,7 +256,7 @@ def _search_duplicate_specs_in_externals(error_cls):
+ lines
+ ["as they might result in non-deterministic hashes"]
)
- except TypeError:
+ except (TypeError, AttributeError):
details = []
errors.append(error_cls(summary=error_msg, details=details))
@@ -253,51 +265,11 @@ def _search_duplicate_specs_in_externals(error_cls):
@config_packages
-def _deprecated_preferences(error_cls):
- """Search package preferences deprecated in v0.21 (and slated for removal in v0.22)"""
- # TODO (v0.22): remove this audit as the attributes will not be allowed in config
- errors = []
- packages_yaml = spack.config.CONFIG.get_config("packages")
-
- def make_error(attribute_name, config_data, summary):
- s = io.StringIO()
- s.write("Occurring in the following file:\n")
- dict_view = syaml.syaml_dict((k, v) for k, v in config_data.items() if k == attribute_name)
- syaml.dump_config(dict_view, stream=s, blame=True)
- return error_cls(summary=summary, details=[s.getvalue()])
-
- if "all" in packages_yaml and "version" in packages_yaml["all"]:
- summary = "Using the deprecated 'version' attribute under 'packages:all'"
- errors.append(make_error("version", packages_yaml["all"], summary))
-
- for package_name in packages_yaml:
- if package_name == "all":
- continue
-
- package_conf = packages_yaml[package_name]
- for attribute in ("compiler", "providers", "target"):
- if attribute not in package_conf:
- continue
- summary = (
- f"Using the deprecated '{attribute}' attribute " f"under 'packages:{package_name}'"
- )
- errors.append(make_error(attribute, package_conf, summary))
-
- return errors
-
-
-@config_packages
def _avoid_mismatched_variants(error_cls):
"""Warns if variant preferences have mismatched types or names."""
errors = []
packages_yaml = spack.config.CONFIG.get_config("packages")
- def make_error(config_data, summary):
- s = io.StringIO()
- s.write("Occurring in the following file:\n")
- syaml.dump_config(config_data, stream=s, blame=True)
- return error_cls(summary=summary, details=[s.getvalue()])
-
for pkg_name in packages_yaml:
# 'all:' must be more forgiving, since it is setting defaults for everything
if pkg_name == "all" or "variants" not in packages_yaml[pkg_name]:
@@ -312,28 +284,94 @@ def _avoid_mismatched_variants(error_cls):
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
for variant in current_spec.variants.values():
# Variant does not exist at all
- if variant.name not in pkg_cls.variants:
+ if variant.name not in pkg_cls.variant_names():
summary = (
f"Setting a preference for the '{pkg_name}' package to the "
f"non-existing variant '{variant.name}'"
)
- errors.append(make_error(preferences, summary))
+ errors.append(_make_config_error(preferences, summary, error_cls=error_cls))
continue
# Variant cannot accept this value
- s = spack.spec.Spec(pkg_name)
try:
- s.update_variant_validate(variant.name, variant.value)
+ spack.variant.prevalidate_variant_value(pkg_cls, variant, strict=True)
except Exception:
summary = (
f"Setting the variant '{variant.name}' of the '{pkg_name}' package "
f"to the invalid value '{str(variant)}'"
)
- errors.append(make_error(preferences, summary))
+ errors.append(_make_config_error(preferences, summary, error_cls=error_cls))
+
+ return errors
+
+
+@config_packages
+def _wrongly_named_spec(error_cls):
+ """Warns if the wrong name is used for an external spec"""
+ errors = []
+ packages_yaml = spack.config.CONFIG.get_config("packages")
+ for pkg_name in packages_yaml:
+ if pkg_name == "all":
+ continue
+ externals = packages_yaml[pkg_name].get("externals", [])
+ is_virtual = spack.repo.PATH.is_virtual(pkg_name)
+ for entry in externals:
+ spec = spack.spec.Spec(entry["spec"])
+ regular_pkg_is_wrong = not is_virtual and pkg_name != spec.name
+ virtual_pkg_is_wrong = is_virtual and not any(
+ p.name == spec.name for p in spack.repo.PATH.providers_for(pkg_name)
+ )
+ if regular_pkg_is_wrong or virtual_pkg_is_wrong:
+ summary = f"Wrong external spec detected for '{pkg_name}': {spec}"
+ errors.append(_make_config_error(entry, summary, error_cls=error_cls))
+ return errors
+
+
+@config_packages
+def _ensure_all_virtual_packages_have_default_providers(error_cls):
+ """All virtual packages must have a default provider explicitly set."""
+ configuration = spack.config.create()
+ defaults = configuration.get("packages", scope="defaults")
+ default_providers = defaults["all"]["providers"]
+ virtuals = spack.repo.PATH.provider_index.providers
+ default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages")
+
+ return [
+ error_cls(f"'{virtual}' must have a default provider in {default_providers_filename}", [])
+ for virtual in virtuals
+ if virtual not in default_providers
+ ]
+
+
+@config_repos
+def _ensure_no_folders_without_package_py(error_cls):
+ """Check that we don't leave any folder without a package.py in repos"""
+ errors = []
+ for repository in spack.repo.PATH.repos:
+ missing = []
+ for entry in os.scandir(repository.packages_path):
+ if not entry.is_dir():
+ continue
+ package_py = pathlib.Path(entry.path) / spack.repo.package_file_name
+ if not package_py.exists():
+ missing.append(entry.path)
+ if missing:
+ summary = (
+ f"The '{repository.namespace}' repository misses a package.py file"
+ f" in the following folders"
+ )
+ errors.append(error_cls(summary=summary, details=[f"{x}" for x in missing]))
return errors
+def _make_config_error(config_data, summary, error_cls):
+ s = io.StringIO()
+ s.write("Occurring in the following file:\n")
+ syaml.dump_config(config_data, stream=s, blame=True)
+ return error_cls(summary=summary, details=[s.getvalue()])
+
+
#: Sanity checks on package directives
package_directives = AuditClass(
group="packages",
@@ -350,6 +388,14 @@ package_attributes = AuditClass(
)
+package_deprecated_attributes = AuditClass(
+ group="packages",
+ tag="PKG-DEPRECATED-ATTRIBUTES",
+ description="Sanity checks to preclude use of deprecated package attributes",
+ kwargs=("pkgs",),
+)
+
+
package_properties = AuditClass(
group="packages",
tag="PKG-PROPERTIES",
@@ -368,22 +414,23 @@ package_https_directives = AuditClass(
)
-@package_directives
+@package_properties
def _check_build_test_callbacks(pkgs, error_cls):
- """Ensure stand-alone test method is not included in build-time callbacks"""
+ """Ensure stand-alone test methods are not included in build-time callbacks.
+
+ Test methods are for checking the installed software as stand-alone tests.
+ They could also be called during the post-install phase of a build.
+ """
errors = []
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
test_callbacks = getattr(pkg_cls, "build_time_test_callbacks", None)
- # TODO (post-34236): "test*"->"test_*" once remove deprecated methods
- # TODO (post-34236): "test"->"test_" once remove deprecated methods
- has_test_method = test_callbacks and any([m.startswith("test") for m in test_callbacks])
+ has_test_method = test_callbacks and any([m.startswith("test_") for m in test_callbacks])
if has_test_method:
- msg = '{0} package contains "test*" method(s) in ' "build_time_test_callbacks"
- instr = 'Remove all methods whose names start with "test" from: [{0}]'.format(
- ", ".join(test_callbacks)
- )
+ msg = f"Package {pkg_name} includes stand-alone test methods in build-time checks."
+ callbacks = ", ".join(test_callbacks)
+ instr = f"Remove the following from 'build_time_test_callbacks': {callbacks}"
errors.append(error_cls(msg.format(pkg_name), [instr]))
return errors
@@ -397,6 +444,10 @@ def _check_patch_urls(pkgs, error_cls):
r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/"
r".+/.+/(?:commit|pull)/[a-fA-F0-9]+\.(?:patch|diff)"
)
+ github_pull_commits_re = (
+ r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/"
+ r".+/.+/pull/\d+/commits/[a-fA-F0-9]+\.(?:patch|diff)"
+ )
# Only .diff URLs have stable/full hashes:
# https://forum.gitlab.com/t/patches-with-full-index/29313
gitlab_patch_url_re = (
@@ -412,14 +463,24 @@ def _check_patch_urls(pkgs, error_cls):
if not isinstance(patch, spack.patch.UrlPatch):
continue
- if re.match(github_patch_url_re, patch.url):
+ if re.match(github_pull_commits_re, patch.url):
+ url = re.sub(r"/pull/\d+/commits/", r"/commit/", patch.url)
+ url = re.sub(r"^(.*)(?<!full_index=1)$", r"\1?full_index=1", url)
+ errors.append(
+ error_cls(
+ f"patch URL in package {pkg_cls.name} "
+ + "must not be a pull request commit; "
+ + f"instead use {url}",
+ [patch.url],
+ )
+ )
+ elif re.match(github_patch_url_re, patch.url):
full_index_arg = "?full_index=1"
if not patch.url.endswith(full_index_arg):
errors.append(
error_cls(
- "patch URL in package {0} must end with {1}".format(
- pkg_cls.name, full_index_arg
- ),
+ f"patch URL in package {pkg_cls.name} "
+ + f"must end with {full_index_arg}",
[patch.url],
)
)
@@ -427,9 +488,7 @@ def _check_patch_urls(pkgs, error_cls):
if not patch.url.endswith(".diff"):
errors.append(
error_cls(
- "patch URL in package {0} must end with .diff".format(
- pkg_cls.name
- ),
+ f"patch URL in package {pkg_cls.name} must end with .diff",
[patch.url],
)
)
@@ -446,7 +505,7 @@ def _search_for_reserved_attributes_names_in_packages(pkgs, error_cls):
name_definitions = collections.defaultdict(list)
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
- for cls_item in inspect.getmro(pkg_cls):
+ for cls_item in pkg_cls.__mro__:
for name in RESERVED_NAMES:
current_value = cls_item.__dict__.get(name)
if current_value is None:
@@ -469,13 +528,58 @@ def _search_for_reserved_attributes_names_in_packages(pkgs, error_cls):
return errors
+@package_deprecated_attributes
+def _search_for_deprecated_package_methods(pkgs, error_cls):
+ """Ensure the package doesn't define or use deprecated methods"""
+ DEPRECATED_METHOD = (("test", "a name starting with 'test_'"),)
+ DEPRECATED_USE = (
+ ("self.cache_extra_test_sources(", "cache_extra_test_sources(self, ..)"),
+ ("self.install_test_root(", "install_test_root(self, ..)"),
+ ("self.run_test(", "test_part(self, ..)"),
+ )
+ errors = []
+ for pkg_name in pkgs:
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ methods = inspect.getmembers(pkg_cls, predicate=lambda x: inspect.isfunction(x))
+ method_errors = collections.defaultdict(list)
+ for name, function in methods:
+ for deprecated_name, alternate in DEPRECATED_METHOD:
+ if name == deprecated_name:
+ msg = f"Rename '{deprecated_name}' method to {alternate} instead."
+ method_errors[name].append(msg)
+
+ source = inspect.getsource(function)
+ for deprecated_name, alternate in DEPRECATED_USE:
+ if deprecated_name in source:
+ msg = f"Change '{deprecated_name}' to '{alternate}' in '{name}' method."
+ method_errors[name].append(msg)
+
+ num_methods = len(method_errors)
+ if num_methods > 0:
+ methods = plural(num_methods, "method", show_n=False)
+ error_msg = (
+ f"Package '{pkg_name}' implements or uses unsupported deprecated {methods}."
+ )
+ instr = [f"Make changes to '{pkg_cls.__module__}':"]
+ for name in sorted(method_errors):
+ instr.extend([f" {msg}" for msg in method_errors[name]])
+ errors.append(error_cls(error_msg, instr))
+
+ return errors
+
+
@package_properties
def _ensure_all_package_names_are_lowercase(pkgs, error_cls):
"""Ensure package names are lowercase and consistent"""
+ reserved_names = ("all",)
badname_regex, errors = re.compile(r"[_A-Z]"), []
for pkg_name in pkgs:
+ if pkg_name in reserved_names:
+ error_msg = f"The name '{pkg_name}' is reserved, and cannot be used for packages"
+ errors.append(error_cls(error_msg, []))
+
if badname_regex.search(pkg_name):
- error_msg = "Package name '{}' is either lowercase or conatine '_'".format(pkg_name)
+ error_msg = f"Package name '{pkg_name}' should be lowercase and must not contain '_'"
errors.append(error_cls(error_msg, []))
return errors
@@ -589,19 +693,19 @@ def _ensure_all_packages_use_sha256_checksums(pkgs, error_cls):
return h, True
return None, False
- error_msg = "Package '{}' does not use sha256 checksum".format(pkg_name)
+ error_msg = f"Package '{pkg_name}' does not use sha256 checksum"
details = []
for v, args in pkg.versions.items():
fetcher = spack.fetch_strategy.for_package_version(pkg, v)
digest, is_bad = invalid_sha256_digest(fetcher)
if is_bad:
- details.append("{}@{} uses {}".format(pkg_name, v, digest))
+ details.append(f"{pkg_name}@{v} uses {digest}")
for _, resources in pkg.resources.items():
for resource in resources:
digest, is_bad = invalid_sha256_digest(resource.fetcher)
if is_bad:
- details.append("Resource in '{}' uses {}".format(pkg_name, digest))
+ details.append(f"Resource in '{pkg_name}' uses {digest}")
if details:
errors.append(error_cls(error_msg, details))
@@ -614,12 +718,17 @@ def _ensure_env_methods_are_ported_to_builders(pkgs, error_cls):
errors = []
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
- buildsystem_variant, _ = pkg_cls.variants["build_system"]
- buildsystem_names = [getattr(x, "value", x) for x in buildsystem_variant.values]
- builder_cls_names = [spack.builder.BUILDER_CLS[x].__name__ for x in buildsystem_names]
- module = pkg_cls.module
+
+ # values are either ConditionalValue objects or the values themselves
+ build_system_names = set(
+ v.value if isinstance(v, spack.variant.ConditionalValue) else v
+ for _, variant in pkg_cls.variant_definitions("build_system")
+ for v in variant.values
+ )
+ builder_cls_names = [spack.builder.BUILDER_CLS[x].__name__ for x in build_system_names]
+
has_builders_in_package_py = any(
- getattr(module, name, False) for name in builder_cls_names
+ spack.builder.get_builder_class(pkg_cls, name) for name in builder_cls_names
)
if not has_builders_in_package_py:
continue
@@ -635,6 +744,171 @@ def _ensure_env_methods_are_ported_to_builders(pkgs, error_cls):
return errors
+class DeprecatedMagicGlobals(ast.NodeVisitor):
+ def __init__(self, magic_globals: Iterable[str]):
+ super().__init__()
+
+ self.magic_globals: Set[str] = set(magic_globals)
+
+ # State to track whether we're in a class function
+ self.depth: int = 0
+ self.in_function: bool = False
+ self.path = (ast.Module, ast.ClassDef, ast.FunctionDef)
+
+ # Defined locals in the current function (heuristically at least)
+ self.locals: Set[str] = set()
+
+ # List of (name, lineno) tuples for references to magic globals
+ self.references_to_globals: List[Tuple[str, int]] = []
+
+ def descend_in_function_def(self, node: ast.AST) -> None:
+ if not isinstance(node, self.path[self.depth]):
+ return
+ self.depth += 1
+ if self.depth == len(self.path):
+ self.in_function = True
+ super().generic_visit(node)
+ if self.depth == len(self.path):
+ self.in_function = False
+ self.locals.clear()
+ self.depth -= 1
+
+ def generic_visit(self, node: ast.AST) -> None:
+ # Recurse into function definitions
+ if self.depth < len(self.path):
+ return self.descend_in_function_def(node)
+ elif not self.in_function:
+ return
+ elif isinstance(node, ast.Global):
+ for name in node.names:
+ if name in self.magic_globals:
+ self.references_to_globals.append((name, node.lineno))
+ elif isinstance(node, ast.Assign):
+ # visit the rhs before lhs
+ super().visit(node.value)
+ for target in node.targets:
+ super().visit(target)
+ elif isinstance(node, ast.Name) and node.id in self.magic_globals:
+ if isinstance(node.ctx, ast.Load) and node.id not in self.locals:
+ self.references_to_globals.append((node.id, node.lineno))
+ elif isinstance(node.ctx, ast.Store):
+ self.locals.add(node.id)
+ else:
+ super().generic_visit(node)
+
+
+@package_properties
+def _uses_deprecated_globals(pkgs, error_cls):
+ """Ensure that packages do not use deprecated globals"""
+ errors = []
+
+ for pkg_name in pkgs:
+ # some packages scheduled to be removed in v0.23 are not worth fixing.
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ if all(v.get("deprecated", False) for v in pkg_cls.versions.values()):
+ continue
+
+ file = spack.repo.PATH.filename_for_package_name(pkg_name)
+ tree = ast.parse(open(file).read())
+ visitor = DeprecatedMagicGlobals(("std_cmake_args", "std_meson_args", "std_pip_args"))
+ visitor.visit(tree)
+ if visitor.references_to_globals:
+ errors.append(
+ error_cls(
+ f"Package '{pkg_name}' uses deprecated globals",
+ [
+ f"{file}:{line} references '{name}'"
+ for name, line in visitor.references_to_globals
+ ],
+ )
+ )
+
+ return errors
+
+
+@package_properties
+def _ensure_test_docstring(pkgs, error_cls):
+ """Ensure stand-alone test methods have a docstring.
+
+ The docstring of a test method is implicitly used as the description of
+ the corresponding test part during test results reporting.
+ """
+ doc_regex = r'\s+("""[^"]+""")'
+
+ errors = []
+ for pkg_name in pkgs:
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ methods = inspect.getmembers(pkg_cls, predicate=lambda x: inspect.isfunction(x))
+ method_names = []
+ for name, test_fn in methods:
+ if not name.startswith("test_"):
+ continue
+
+ # Ensure the test method has a docstring
+ source = inspect.getsource(test_fn)
+ match = re.search(doc_regex, source)
+ if match is None or len(match.group(0).replace('"', "").strip()) == 0:
+ method_names.append(name)
+
+ num_methods = len(method_names)
+ if num_methods > 0:
+ methods = plural(num_methods, "method", show_n=False)
+ docstrings = plural(num_methods, "docstring", show_n=False)
+ msg = f"Package {pkg_name} has test {methods} with empty or missing {docstrings}."
+ names = ", ".join(method_names)
+ instr = [
+ "Docstrings are used as descriptions in test outputs.",
+ f"Add a concise summary to the following {methods} in '{pkg_cls.__module__}':",
+ f"{names}",
+ ]
+ errors.append(error_cls(msg, instr))
+
+ return errors
+
+
+@package_properties
+def _ensure_test_implemented(pkgs, error_cls):
+ """Ensure stand-alone test methods are implemented.
+
+ The test method is also required to be non-empty.
+ """
+
+ def skip(line):
+ ln = line.strip()
+ return ln.startswith("#") or "pass" in ln
+
+ doc_regex = r'\s+("""[^"]+""")'
+
+ errors = []
+ for pkg_name in pkgs:
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ methods = inspect.getmembers(pkg_cls, predicate=lambda x: inspect.isfunction(x))
+ method_names = []
+ for name, test_fn in methods:
+ if not name.startswith("test_"):
+ continue
+
+ source = inspect.getsource(test_fn)
+
+ # Attempt to ensure the test method is implemented.
+ impl = re.sub(doc_regex, r"", source).splitlines()[1:]
+ lines = [ln.strip() for ln in impl if not skip(ln)]
+ if not lines:
+ method_names.append(name)
+
+ num_methods = len(method_names)
+ if num_methods > 0:
+ methods = plural(num_methods, "method", show_n=False)
+ msg = f"Package {pkg_name} has empty or missing test {methods}."
+ names = ", ".join(method_names)
+ instr = [
+ f"Implement or remove the following {methods} from '{pkg_cls.__module__}': {names}"
+ ]
+ errors.append(error_cls(msg, instr))
+
+ return errors
+
+
@package_https_directives
def _linting_package_file(pkgs, error_cls):
"""Check for correctness of links"""
@@ -667,8 +941,8 @@ def _unknown_variants_in_directives(pkgs, error_cls):
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
# Check "conflicts" directive
- for conflict, triggers in pkg_cls.conflicts.items():
- for trigger, _ in triggers:
+ for trigger, conflicts in pkg_cls.conflicts.items():
+ for conflict, _ in conflicts:
vrn = spack.spec.Spec(conflict)
try:
vrn.constrain(trigger)
@@ -694,25 +968,21 @@ def _unknown_variants_in_directives(pkgs, error_cls):
)
# Check "depends_on" directive
- for _, triggers in pkg_cls.dependencies.items():
- triggers = list(triggers)
- for trigger in list(triggers):
- vrn = spack.spec.Spec(trigger)
- errors.extend(
- _analyze_variants_in_directive(
- pkg_cls, vrn, directive="depends_on", error_cls=error_cls
- )
+ for trigger in pkg_cls.dependencies:
+ vrn = spack.spec.Spec(trigger)
+ errors.extend(
+ _analyze_variants_in_directive(
+ pkg_cls, vrn, directive="depends_on", error_cls=error_cls
)
+ )
- # Check "patch" directive
- for _, triggers in pkg_cls.provided.items():
- triggers = [spack.spec.Spec(x) for x in triggers]
- for vrn in triggers:
- errors.extend(
- _analyze_variants_in_directive(
- pkg_cls, vrn, directive="patch", error_cls=error_cls
- )
+ # Check "provides" directive
+ for when_spec in pkg_cls.provided:
+ errors.extend(
+ _analyze_variants_in_directive(
+ pkg_cls, when_spec, directive="provides", error_cls=error_cls
)
+ )
# Check "resource" directive
for vrn in pkg_cls.resources:
@@ -736,70 +1006,94 @@ def _issues_in_depends_on_directive(pkgs, error_cls):
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
filename = spack.repo.PATH.filename_for_package_name(pkg_name)
- for dependency_name, dependency_data in pkg_cls.dependencies.items():
- # Check if there are nested dependencies declared. We don't want directives like:
- #
- # depends_on('foo+bar ^fee+baz')
- #
- # but we'd like to have two dependencies listed instead.
- for when, dependency_edge in dependency_data.items():
- dependency_spec = dependency_edge.spec
- nested_dependencies = dependency_spec.dependencies()
+
+ for when, deps_by_name in pkg_cls.dependencies.items():
+ for dep_name, dep in deps_by_name.items():
+ # Check if there are nested dependencies declared. We don't want directives like:
+ #
+ # depends_on('foo+bar ^fee+baz')
+ #
+ # but we'd like to have two dependencies listed instead.
+ nested_dependencies = dep.spec.dependencies()
if nested_dependencies:
- summary = (
- f"{pkg_name}: invalid nested dependency "
- f"declaration '{str(dependency_spec)}'"
- )
+ summary = f"{pkg_name}: nested dependency declaration '{dep.spec}'"
+ ndir = len(nested_dependencies) + 1
details = [
- f"split depends_on('{str(dependency_spec)}', when='{str(when)}') "
- f"into {len(nested_dependencies) + 1} directives",
+ f"split depends_on('{dep.spec}', when='{when}') into {ndir} directives",
f"in {filename}",
]
errors.append(error_cls(summary=summary, details=details))
- for s in (dependency_spec, when):
- if s.virtual and s.variants:
- summary = f"{pkg_name}: virtual dependency cannot have variants"
- details = [
- f"remove variants from '{str(s)}' in depends_on directive",
- f"in {filename}",
- ]
- errors.append(error_cls(summary=summary, details=details))
-
- # No need to analyze virtual packages
- if spack.repo.PATH.is_virtual(dependency_name):
- continue
+ def check_virtual_with_variants(spec, msg):
+ if not spec.virtual or not spec.variants:
+ return
+ error = error_cls(
+ f"{pkg_name}: {msg}",
+ [f"remove variants from '{spec}' in depends_on directive in {filename}"],
+ )
+ errors.append(error)
- try:
- dependency_pkg_cls = spack.repo.PATH.get_pkg_class(dependency_name)
- except spack.repo.UnknownPackageError:
- # This dependency is completely missing, so report
- # and continue the analysis
- summary = pkg_name + ": unknown package '{0}' in " "'depends_on' directive".format(
- dependency_name
- )
- details = [" in " + filename]
- errors.append(error_cls(summary=summary, details=details))
- continue
+ check_virtual_with_variants(dep.spec, "virtual dependency cannot have variants")
+ check_virtual_with_variants(dep.spec, "virtual when= spec cannot have variants")
+
+ # No need to analyze virtual packages
+ if spack.repo.PATH.is_virtual(dep_name):
+ continue
+
+ # check for unknown dependencies
+ try:
+ dependency_pkg_cls = spack.repo.PATH.get_pkg_class(dep_name)
+ except spack.repo.UnknownPackageError:
+ # This dependency is completely missing, so report
+ # and continue the analysis
+ summary = f"{pkg_name}: unknown package '{dep_name}' in 'depends_on' directive"
+ details = [f" in {filename}"]
+ errors.append(error_cls(summary=summary, details=details))
+ continue
- for _, dependency_edge in dependency_data.items():
- dependency_variants = dependency_edge.spec.variants
- for name, value in dependency_variants.items():
+ # Check for self-referential specs similar to:
+ #
+ # depends_on("foo@X.Y", when="^foo+bar")
+ #
+ # That would allow clingo to choose whether to have foo@X.Y+bar in the graph.
+ problematic_edges = [
+ x for x in when.edges_to_dependencies(dep_name) if not x.virtuals
+ ]
+ if problematic_edges and not dep.patches:
+ summary = (
+ f"{pkg_name}: dependency on '{dep.spec}' when '{when}' is self-referential"
+ )
+ details = [
+ (
+ f" please specify better using '^[virtuals=...] {dep_name}', or "
+ f"substitute with an equivalent condition on '{pkg_name}'"
+ ),
+ f" in {filename}",
+ ]
+ errors.append(error_cls(summary=summary, details=details))
+ continue
+
+ # check variants
+ dependency_variants = dep.spec.variants
+ for name, variant in dependency_variants.items():
try:
- v, _ = dependency_pkg_cls.variants[name]
- v.validate_or_raise(value, pkg_cls=dependency_pkg_cls)
+ spack.variant.prevalidate_variant_value(
+ dependency_pkg_cls, variant, dep.spec, strict=True
+ )
except Exception as e:
summary = (
- pkg_name + ": wrong variant used for a "
- "dependency in a 'depends_on' directive"
+ f"{pkg_name}: wrong variant used for dependency in 'depends_on()'"
)
- error_msg = str(e).strip()
+
+ error_msg = str(e)
if isinstance(e, KeyError):
- error_msg = "the variant {0} does not " "exist".format(error_msg)
- error_msg += " in package '" + dependency_name + "'"
+ error_msg = (
+ f"variant {str(e).strip()} does not exist in package {dep_name}"
+ f" in package '{dep_name}'"
+ )
errors.append(
- error_cls(summary=summary, details=[error_msg, "in " + filename])
+ error_cls(summary=summary, details=[error_msg, f"in {filename}"])
)
return errors
@@ -808,39 +1102,38 @@ def _issues_in_depends_on_directive(pkgs, error_cls):
@package_directives
def _ensure_variant_defaults_are_parsable(pkgs, error_cls):
"""Ensures that variant defaults are present and parsable from cli"""
- errors = []
- for pkg_name in pkgs:
- pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
- for variant_name, entry in pkg_cls.variants.items():
- variant, _ = entry
- default_is_parsable = (
- # Permitting a default that is an instance on 'int' permits
- # to have foo=false or foo=0. Other falsish values are
- # not allowed, since they can't be parsed from cli ('foo=')
- isinstance(variant.default, int)
- or variant.default
- )
- if not default_is_parsable:
- error_msg = "Variant '{}' of package '{}' has a bad default value"
- errors.append(error_cls(error_msg.format(variant_name, pkg_name), []))
- continue
- try:
- vspec = variant.make_default()
- except spack.variant.MultipleValuesInExclusiveVariantError:
- error_msg = "Cannot create a default value for the variant '{}' in package '{}'"
- errors.append(error_cls(error_msg.format(variant_name, pkg_name), []))
- continue
+ def check_variant(pkg_cls, variant, vname):
+ # bool is a subclass of int in python. Permitting a default that is an instance
+ # of 'int' means both foo=false and foo=0 are accepted. Other falsish values are
+ # not allowed, since they can't be parsed from CLI ('foo=')
+ default_is_parsable = isinstance(variant.default, int) or variant.default
- try:
- variant.validate_or_raise(vspec, pkg_cls=pkg_cls)
- except spack.variant.InvalidVariantValueError:
- error_msg = (
- "The default value of the variant '{}' in package '{}' failed validation"
- )
- question = "Is it among the allowed values?"
- errors.append(error_cls(error_msg.format(variant_name, pkg_name), [question]))
+ if not default_is_parsable:
+ msg = f"Variant '{vname}' of package '{pkg_cls.name}' has an unparsable default value"
+ return [error_cls(msg, [])]
+
+ try:
+ vspec = variant.make_default()
+ except spack.variant.MultipleValuesInExclusiveVariantError:
+ msg = f"Can't create default value for variant '{vname}' in package '{pkg_cls.name}'"
+ return [error_cls(msg, [])]
+
+ try:
+ variant.validate_or_raise(vspec, pkg_cls.name)
+ except spack.variant.InvalidVariantValueError:
+ msg = "Default value of variant '{vname}' in package '{pkg.name}' is invalid"
+ question = "Is it among the allowed values?"
+ return [error_cls(msg, [question])]
+
+ return []
+ errors = []
+ for pkg_name in pkgs:
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ for vname in pkg_cls.variant_names():
+ for _, variant_def in pkg_cls.variant_definitions(vname):
+ errors.extend(check_variant(pkg_cls, variant_def, vname))
return errors
@@ -850,11 +1143,11 @@ def _ensure_variants_have_descriptions(pkgs, error_cls):
errors = []
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
- for variant_name, entry in pkg_cls.variants.items():
- variant, _ = entry
- if not variant.description:
- error_msg = "Variant '{}' in package '{}' is missing a description"
- errors.append(error_cls(error_msg.format(variant_name, pkg_name), []))
+ for name in pkg_cls.variant_names():
+ for when, variant in pkg_cls.variant_definitions(name):
+ if not variant.description:
+ msg = f"Variant '{name}' in package '{pkg_name}' is missing a description"
+ errors.append(error_cls(msg, []))
return errors
@@ -866,14 +1159,17 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
filename = spack.repo.PATH.filename_for_package_name(pkg_name)
+
dependencies_to_check = []
- for dependency_name, dependency_data in pkg_cls.dependencies.items():
- # Skip virtual dependencies for the time being, check on
- # their versions can be added later
- if spack.repo.PATH.is_virtual(dependency_name):
- continue
- dependencies_to_check.extend([edge.spec for edge in dependency_data.values()])
+ for _, deps_by_name in pkg_cls.dependencies.items():
+ for dep_name, dep in deps_by_name.items():
+ # Skip virtual dependencies for the time being, check on
+ # their versions can be added later
+ if spack.repo.PATH.is_virtual(dep_name):
+ continue
+
+ dependencies_to_check.append(dep.spec)
host_architecture = spack.spec.ArchSpec.default_arch()
for s in dependencies_to_check:
@@ -908,29 +1204,26 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
def _analyze_variants_in_directive(pkg, constraint, directive, error_cls):
- variant_exceptions = (
- spack.variant.InconsistentValidationError,
- spack.variant.MultipleValuesInExclusiveVariantError,
- spack.variant.InvalidVariantValueError,
- KeyError,
- )
errors = []
- for name, v in constraint.variants.items():
- try:
- variant, _ = pkg.variants[name]
- variant.validate_or_raise(v, pkg_cls=pkg)
- except variant_exceptions as e:
- summary = pkg.name + ': wrong variant in "{0}" directive'
- summary = summary.format(directive)
- filename = spack.repo.PATH.filename_for_package_name(pkg.name)
+ variant_names = pkg.variant_names()
+ summary = f"{pkg.name}: wrong variant in '{directive}' directive"
+ filename = spack.repo.PATH.filename_for_package_name(pkg.name)
- error_msg = str(e).strip()
- if isinstance(e, KeyError):
- error_msg = "the variant {0} does not exist".format(error_msg)
-
- err = error_cls(summary=summary, details=[error_msg, "in " + filename])
+ for name, v in constraint.variants.items():
+ if name not in variant_names:
+ msg = f"variant {name} does not exist in {pkg.name}"
+ errors.append(error_cls(summary=summary, details=[msg, f"in {filename}"]))
+ continue
- errors.append(err)
+ try:
+ spack.variant.prevalidate_variant_value(pkg, v, constraint, strict=True)
+ except (
+ spack.variant.InconsistentValidationError,
+ spack.variant.MultipleValuesInExclusiveVariantError,
+ spack.variant.InvalidVariantValueError,
+ ) as e:
+ msg = str(e).strip()
+ errors.append(error_cls(summary=summary, details=[msg, f"in {filename}"]))
return errors
@@ -945,39 +1238,54 @@ def _named_specs_in_when_arguments(pkgs, error_cls):
for pkg_name in pkgs:
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ def _refers_to_pkg(when):
+ when_spec = spack.spec.Spec(when)
+ return when_spec.name is None or when_spec.name == pkg_name
+
+ def _error_items(when_dict):
+ for when, elts in when_dict.items():
+ if not _refers_to_pkg(when):
+ yield when, elts, [f"using '{when}', should be '^{when}'"]
+
def _extracts_errors(triggers, summary):
_errors = []
for trigger in list(triggers):
- when_spec = spack.spec.Spec(trigger)
- if when_spec.name is not None and when_spec.name != pkg_name:
+ if not _refers_to_pkg(trigger):
details = [f"using '{trigger}', should be '^{trigger}'"]
_errors.append(error_cls(summary=summary, details=details))
return _errors
- for dname, triggers in pkg_cls.dependencies.items():
- summary = f"{pkg_name}: wrong 'when=' condition for the '{dname}' dependency"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, dnames, details in _error_items(pkg_cls.dependencies):
+ errors.extend(
+ error_cls(f"{pkg_name}: wrong 'when=' condition for '{dname}' dependency", details)
+ for dname in dnames
+ )
- for vname, (variant, triggers) in pkg_cls.variants.items():
- summary = f"{pkg_name}: wrong 'when=' condition for the '{vname}' variant"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, variants_by_name in pkg_cls.variants.items():
+ for vname, variant in variants_by_name.items():
+ summary = f"{pkg_name}: wrong 'when=' condition for the '{vname}' variant"
+ errors.extend(_extracts_errors([when], summary))
- for provided, triggers in pkg_cls.provided.items():
- summary = f"{pkg_name}: wrong 'when=' condition for the '{provided}' virtual"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, providers, details in _error_items(pkg_cls.provided):
+ errors.extend(
+ error_cls(f"{pkg_name}: wrong 'when=' condition for '{provided}' virtual", details)
+ for provided in providers
+ )
- for _, triggers in pkg_cls.requirements.items():
- triggers = [when_spec for when_spec, _, _ in triggers]
- summary = f"{pkg_name}: wrong 'when=' condition in 'requires' directive"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, requirements, details in _error_items(pkg_cls.requirements):
+ errors.append(
+ error_cls(f"{pkg_name}: wrong 'when=' condition in 'requires' directive", details)
+ )
- triggers = list(pkg_cls.patches)
- summary = f"{pkg_name}: wrong 'when=' condition in 'patch' directives"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, _, details in _error_items(pkg_cls.patches):
+ errors.append(
+ error_cls(f"{pkg_name}: wrong 'when=' condition in 'patch' directives", details)
+ )
- triggers = list(pkg_cls.resources)
- summary = f"{pkg_name}: wrong 'when=' condition in 'resource' directives"
- errors.extend(_extracts_errors(triggers, summary))
+ for when, _, details in _error_items(pkg_cls.resources):
+ errors.append(
+ error_cls(f"{pkg_name}: wrong 'when=' condition in 'resource' directives", details)
+ )
return llnl.util.lang.dedupe(errors)
@@ -987,7 +1295,7 @@ external_detection = AuditClass(
group="externals",
tag="PKG-EXTERNALS",
description="Sanity checks for external software detection",
- kwargs=("pkgs",),
+ kwargs=("pkgs", "debug_log"),
)
@@ -1010,7 +1318,7 @@ def packages_with_detection_tests():
@external_detection
-def _test_detection_by_executable(pkgs, error_cls):
+def _test_detection_by_executable(pkgs, debug_log, error_cls):
"""Test drive external detection for packages"""
import spack.detection
@@ -1036,6 +1344,7 @@ def _test_detection_by_executable(pkgs, error_cls):
for idx, test_runner in enumerate(
spack.detection.detection_tests(pkg_name, spack.repo.PATH)
):
+ debug_log(f"[{__file__}]: running test {idx} for package {pkg_name}")
specs = test_runner.execute()
expected_specs = test_runner.expected_specs
@@ -1052,4 +1361,75 @@ def _test_detection_by_executable(pkgs, error_cls):
details = [msg.format(s, idx) for s in sorted(not_expected)]
errors.append(error_cls(summary=summary, details=details))
+ matched_detection = []
+ for candidate in expected_specs:
+ try:
+ idx = specs.index(candidate)
+ matched_detection.append((candidate, specs[idx]))
+ except (AttributeError, ValueError):
+ pass
+
+ def _compare_extra_attribute(_expected, _detected, *, _spec):
+ result = []
+ # Check items are of the same type
+ if not isinstance(_detected, type(_expected)):
+ _summary = f'{pkg_name}: error when trying to detect "{_expected}"'
+ _details = [f"{_detected} was detected instead"]
+ return [error_cls(summary=_summary, details=_details)]
+
+ # If they are string expected is a regex
+ if isinstance(_expected, str):
+ try:
+ _regex = re.compile(_expected)
+ except re.error:
+ _summary = f'{pkg_name}: illegal regex in "{_spec}" extra attributes'
+ _details = [f"{_expected} is not a valid regex"]
+ return [error_cls(summary=_summary, details=_details)]
+
+ if not _regex.match(_detected):
+ _summary = (
+ f'{pkg_name}: error when trying to match "{_expected}" '
+ f"in extra attributes"
+ )
+ _details = [f"{_detected} does not match the regex"]
+ return [error_cls(summary=_summary, details=_details)]
+
+ if isinstance(_expected, dict):
+ _not_detected = set(_expected.keys()) - set(_detected.keys())
+ if _not_detected:
+ _summary = f"{pkg_name}: cannot detect some attributes for spec {_spec}"
+ _details = [
+ f'"{_expected}" was expected',
+ f'"{_detected}" was detected',
+ ] + [f'attribute "{s}" was not detected' for s in sorted(_not_detected)]
+ result.append(error_cls(summary=_summary, details=_details))
+
+ _common = set(_expected.keys()) & set(_detected.keys())
+ for _key in _common:
+ result.extend(
+ _compare_extra_attribute(_expected[_key], _detected[_key], _spec=_spec)
+ )
+
+ return result
+
+ for expected, detected in matched_detection:
+ # We might not want to test all attributes, so avoid not_expected
+ not_detected = set(expected.extra_attributes) - set(detected.extra_attributes)
+ if not_detected:
+ summary = f"{pkg_name}: cannot detect some attributes for spec {expected}"
+ details = [
+ f'"{s}" was not detected [test_id={idx}]' for s in sorted(not_detected)
+ ]
+ errors.append(error_cls(summary=summary, details=details))
+
+ common = set(expected.extra_attributes) & set(detected.extra_attributes)
+ for key in common:
+ errors.extend(
+ _compare_extra_attribute(
+ expected.extra_attributes[key],
+ detected.extra_attributes[key],
+ _spec=expected,
+ )
+ )
+
return errors
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index b741e72501..0dbe8c0831 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -5,7 +5,8 @@
import codecs
import collections
-import errno
+import concurrent.futures
+import copy
import hashlib
import io
import itertools
@@ -18,57 +19,82 @@ import sys
import tarfile
import tempfile
import time
-import traceback
import urllib.error
import urllib.parse
import urllib.request
import warnings
-from contextlib import closing, contextmanager
-from gzip import GzipFile
-from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple
-from urllib.error import HTTPError, URLError
+from contextlib import closing
+from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
import llnl.util.filesystem as fsys
import llnl.util.lang
import llnl.util.tty as tty
from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, visit_directory_tree
+from llnl.util.symlink import readlink
import spack.caches
-import spack.cmd
import spack.config as config
import spack.database as spack_db
+import spack.deptypes as dt
import spack.error
+import spack.hash_types as ht
import spack.hooks
import spack.hooks.sbang
-import spack.mirror
+import spack.mirrors.mirror
import spack.oci.image
import spack.oci.oci
import spack.oci.opener
+import spack.paths
import spack.platforms
import spack.relocate as relocate
-import spack.repo
+import spack.spec
import spack.stage
import spack.store
-import spack.traverse as traverse
+import spack.user_environment
+import spack.util.archive
import spack.util.crypto
import spack.util.file_cache as file_cache
+import spack.util.filesystem as ssys
import spack.util.gpg
+import spack.util.parallel
import spack.util.path
import spack.util.spack_json as sjson
import spack.util.spack_yaml as syaml
import spack.util.timer as timer
import spack.util.url as url_util
import spack.util.web as web_util
+from spack import traverse
from spack.caches import misc_cache_location
+from spack.oci.image import (
+ Digest,
+ ImageReference,
+ default_config,
+ default_index_tag,
+ default_manifest,
+ default_tag,
+ tag_is_spec,
+)
+from spack.oci.oci import (
+ copy_missing_layers_with_retry,
+ get_manifest_and_config_with_retry,
+ list_tags,
+ upload_blob_with_retry,
+ upload_manifest_with_retry,
+)
from spack.package_prefs import get_package_dir_permissions, get_package_group
from spack.relocate_text import utf8_paths_to_single_binary_regex
from spack.spec import Spec
from spack.stage import Stage
from spack.util.executable import which
+from .enums import InstallRecordStatus
+
BUILD_CACHE_RELATIVE_PATH = "build_cache"
BUILD_CACHE_KEYS_RELATIVE_PATH = "_pgp"
-CURRENT_BUILD_CACHE_LAYOUT_VERSION = 1
+
+#: The build cache layout version that this version of Spack creates.
+#: Version 2: includes parent directories of the package prefix in the tarball
+CURRENT_BUILD_CACHE_LAYOUT_VERSION = 2
class BuildCacheDatabase(spack_db.Database):
@@ -82,7 +108,7 @@ class BuildCacheDatabase(spack_db.Database):
record_fields = ("spec", "ref_count", "in_buildcache")
def __init__(self, root):
- super().__init__(root, lock_cfg=spack_db.NO_LOCK)
+ super().__init__(root, lock_cfg=spack_db.NO_LOCK, layout=None)
self._write_transaction_impl = llnl.util.lang.nullcontext
self._read_transaction_impl = llnl.util.lang.nullcontext
@@ -109,10 +135,6 @@ class FetchCacheError(Exception):
super().__init__(self.message)
-class ListMirrorSpecsError(spack.error.SpackError):
- """Raised when unable to retrieve list of specs from the mirror"""
-
-
class BinaryCacheIndex:
"""
The BinaryCacheIndex tracks what specs are available on (usually remote)
@@ -232,7 +254,7 @@ class BinaryCacheIndex:
spec_list = [
s
- for s in db.query_local(installed=any, in_buildcache=any)
+ for s in db.query_local(installed=InstallRecordStatus.ANY)
if s.external or db.query_local_by_spec_hash(s.dag_hash()).in_buildcache
]
@@ -347,7 +369,7 @@ class BinaryCacheIndex:
on disk under ``_index_cache_root``)."""
self._init_local_index_cache()
configured_mirror_urls = [
- m.fetch_url for m in spack.mirror.MirrorCollection(binary=True).values()
+ m.fetch_url for m in spack.mirrors.mirror.MirrorCollection(binary=True).values()
]
items_to_remove = []
spec_cache_clear_needed = False
@@ -539,83 +561,6 @@ def binary_index_location():
BINARY_INDEX: BinaryCacheIndex = llnl.util.lang.Singleton(BinaryCacheIndex) # type: ignore
-class NoOverwriteException(spack.error.SpackError):
- """Raised when a file would be overwritten"""
-
- def __init__(self, file_path):
- super().__init__(f"Refusing to overwrite the following file: {file_path}")
-
-
-class NoGpgException(spack.error.SpackError):
- """
- Raised when gpg2 is not in PATH
- """
-
- def __init__(self, msg):
- super().__init__(msg)
-
-
-class NoKeyException(spack.error.SpackError):
- """
- Raised when gpg has no default key added.
- """
-
- def __init__(self, msg):
- super().__init__(msg)
-
-
-class PickKeyException(spack.error.SpackError):
- """
- Raised when multiple keys can be used to sign.
- """
-
- def __init__(self, keys):
- err_msg = "Multiple keys available for signing\n%s\n" % keys
- err_msg += "Use spack buildcache create -k <key hash> to pick a key."
- super().__init__(err_msg)
-
-
-class NoVerifyException(spack.error.SpackError):
- """
- Raised if file fails signature verification.
- """
-
- pass
-
-
-class NoChecksumException(spack.error.SpackError):
- """
- Raised if file fails checksum verification.
- """
-
- def __init__(self, path, size, contents, algorithm, expected, computed):
- super().__init__(
- f"{algorithm} checksum failed for {path}",
- f"Expected {expected} but got {computed}. "
- f"File size = {size} bytes. Contents = {contents!r}",
- )
-
-
-class NewLayoutException(spack.error.SpackError):
- """
- Raised if directory layout is different from buildcache.
- """
-
- def __init__(self, msg):
- super().__init__(msg)
-
-
-class InvalidMetadataFile(spack.error.SpackError):
- pass
-
-
-class UnsignedPackageException(spack.error.SpackError):
- """
- Raised if installation of unsigned package is attempted without
- the use of ``--no-check-signature``.
- """
-
-
def compute_hash(data):
if isinstance(data, str):
data = data.encode("utf-8")
@@ -738,14 +683,14 @@ def get_buildfile_manifest(spec):
# 2. paths are used as strings.
for rel_path in visitor.symlinks:
abs_path = os.path.join(root, rel_path)
- link = os.readlink(abs_path)
+ link = readlink(abs_path)
if os.path.isabs(link) and link.startswith(spack.store.STORE.layout.root):
data["link_to_relocate"].append(rel_path)
# Non-symlinks.
for rel_path in visitor.files:
abs_path = os.path.join(root, rel_path)
- m_type, m_subtype = fsys.mime_type(abs_path)
+ m_type, m_subtype = ssys.mime_type(abs_path)
if relocate.needs_binary_relocation(m_type, m_subtype):
# Why is this branch not part of needs_binary_relocation? :(
@@ -770,15 +715,32 @@ def get_buildfile_manifest(spec):
return data
-def hashes_to_prefixes(spec):
- """Return a dictionary of hashes to prefixes for a spec and its deps, excluding externals"""
- return {
- s.dag_hash(): str(s.prefix)
+def deps_to_relocate(spec):
+ """Return the transitive link and direct run dependencies of the spec.
+
+ This is a special traversal for dependencies we need to consider when relocating a package.
+
+ Package binaries, scripts, and other files may refer to the prefixes of dependencies, so
+ we need to rewrite those locations when dependencies are in a different place at install time
+ than they were at build time.
+
+ This traversal covers transitive link dependencies and direct run dependencies because:
+
+ 1. Spack adds RPATHs for transitive link dependencies so that packages can find needed
+ dependency libraries.
+ 2. Packages may call any of their *direct* run dependencies (and may bake their paths into
+ binaries or scripts), so we also need to search for run dependency prefixes when relocating.
+
+ This returns a deduplicated list of transitive link dependencies and direct run dependencies.
+ """
+ deps = [
+ s
for s in itertools.chain(
spec.traverse(root=True, deptype="link"), spec.dependencies(deptype="run")
)
if not s.external
- }
+ ]
+ return llnl.util.lang.dedupe(deps, key=lambda s: s.dag_hash())
def get_buildinfo_dict(spec):
@@ -794,7 +756,7 @@ def get_buildinfo_dict(spec):
"relocate_binaries": manifest["binary_to_relocate"],
"relocate_links": manifest["link_to_relocate"],
"hardlinks_deduped": manifest["hardlinks_deduped"],
- "hash_to_prefix": hashes_to_prefixes(spec),
+ "hash_to_prefix": {d.dag_hash(): str(d.prefix) for d in deps_to_relocate(spec)},
}
@@ -825,37 +787,30 @@ def tarball_path_name(spec, ext):
return os.path.join(tarball_directory_name(spec), tarball_name(spec, ext))
-def select_signing_key(key=None):
- if key is None:
- keys = spack.util.gpg.signing_keys()
- if len(keys) == 1:
- key = keys[0]
-
- if len(keys) > 1:
- raise PickKeyException(str(keys))
-
- if len(keys) == 0:
- raise NoKeyException(
- "No default key available for signing.\n"
- "Use spack gpg init and spack gpg create"
- " to create a default key."
- )
- return key
-
+def select_signing_key() -> str:
+ keys = spack.util.gpg.signing_keys()
+ num = len(keys)
+ if num > 1:
+ raise PickKeyException(str(keys))
+ elif num == 0:
+ raise NoKeyException(
+ "No default key available for signing.\n"
+ "Use spack gpg init and spack gpg create"
+ " to create a default key."
+ )
+ return keys[0]
-def sign_specfile(key, force, specfile_path):
- signed_specfile_path = "%s.sig" % specfile_path
- if os.path.exists(signed_specfile_path):
- if force:
- os.remove(signed_specfile_path)
- else:
- raise NoOverwriteException(signed_specfile_path)
- key = select_signing_key(key)
+def sign_specfile(key: str, specfile_path: str) -> str:
+ """sign and return the path to the signed specfile"""
+ signed_specfile_path = f"{specfile_path}.sig"
spack.util.gpg.sign(key, specfile_path, signed_specfile_path, clearsign=True)
+ return signed_specfile_path
-def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_dir, concurrency):
+def _read_specs_and_push_index(
+ file_list, read_method, cache_prefix, db: BuildCacheDatabase, temp_dir, concurrency
+):
"""Read all the specs listed in the provided list, using thread given thread parallelism,
generate the index, and push it to the mirror.
@@ -879,7 +834,7 @@ def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_di
else:
continue
- db.add(fetched_spec, None)
+ db.add(fetched_spec)
db.mark(fetched_spec, "in_buildcache", True)
# Now generate the index, compute its hash, and push the two files to
@@ -960,7 +915,7 @@ def _specs_from_cache_aws_cli(cache_prefix):
return file_list, read_fn
-def _specs_from_cache_fallback(cache_prefix):
+def _specs_from_cache_fallback(url: str):
"""Use spack.util.web module to get a list of all the specs at the remote url.
Args:
@@ -978,37 +933,31 @@ def _specs_from_cache_fallback(cache_prefix):
try:
_, _, spec_file = web_util.read_from_url(url)
contents = codecs.getreader("utf-8")(spec_file).read()
- except (URLError, web_util.SpackWebError) as url_err:
- tty.error("Error reading specfile: {0}".format(url))
- tty.error(url_err)
+ except web_util.SpackWebError as e:
+ tty.error(f"Error reading specfile: {url}: {e}")
return contents
try:
file_list = [
- url_util.join(cache_prefix, entry)
- for entry in web_util.list_url(cache_prefix)
+ url_util.join(url, entry)
+ for entry in web_util.list_url(url)
if entry.endswith("spec.json") or entry.endswith("spec.json.sig")
]
read_fn = url_read_method
- except KeyError as inst:
- msg = "No packages at {0}: {1}".format(cache_prefix, inst)
- tty.warn(msg)
except Exception as err:
- # If we got some kind of S3 (access denied or other connection
- # error), the first non boto-specific class in the exception
- # hierarchy is Exception. Just print a warning and return
- msg = "Encountered problem listing packages at {0}: {1}".format(cache_prefix, err)
- tty.warn(msg)
+ # If we got some kind of S3 (access denied or other connection error), the first non
+ # boto-specific class in the exception is Exception. Just print a warning and return
+ tty.warn(f"Encountered problem listing packages at {url}: {err}")
return file_list, read_fn
-def _spec_files_from_cache(cache_prefix):
+def _spec_files_from_cache(url: str):
"""Get a list of all the spec files in the mirror and a function to
read them.
Args:
- cache_prefix (str): Base url of mirror (location of spec files)
+ url: Base url of mirror (location of spec files)
Return:
A tuple where the first item is a list of absolute file paths or
@@ -1017,69 +966,56 @@ def _spec_files_from_cache(cache_prefix):
returning the spec read from that location.
"""
callbacks = []
- if cache_prefix.startswith("s3"):
+ if url.startswith("s3://"):
callbacks.append(_specs_from_cache_aws_cli)
callbacks.append(_specs_from_cache_fallback)
for specs_from_cache_fn in callbacks:
- file_list, read_fn = specs_from_cache_fn(cache_prefix)
+ file_list, read_fn = specs_from_cache_fn(url)
if file_list:
return file_list, read_fn
- raise ListMirrorSpecsError("Failed to get list of specs from {0}".format(cache_prefix))
+ raise ListMirrorSpecsError("Failed to get list of specs from {0}".format(url))
-def generate_package_index(cache_prefix, concurrency=32):
+def _url_generate_package_index(url: str, tmpdir: str, concurrency: int = 32):
"""Create or replace the build cache index on the given mirror. The
buildcache index contains an entry for each binary package under the
cache_prefix.
Args:
- cache_prefix(str): Base url of binary mirror.
- concurrency: (int): The desired threading concurrency to use when
- fetching the spec files from the mirror.
+ url: Base url of binary mirror.
+ concurrency: The desired threading concurrency to use when fetching the spec files from
+ the mirror.
Return:
None
"""
+ url = url_util.join(url, build_cache_relative_path())
try:
- file_list, read_fn = _spec_files_from_cache(cache_prefix)
- except ListMirrorSpecsError as err:
- tty.error("Unable to generate package index, {0}".format(err))
- return
-
- tty.debug("Retrieving spec descriptor files from {0} to build index".format(cache_prefix))
+ file_list, read_fn = _spec_files_from_cache(url)
+ except ListMirrorSpecsError as e:
+ raise GenerateIndexError(f"Unable to generate package index: {e}") from e
- tmpdir = tempfile.mkdtemp()
+ tty.debug(f"Retrieving spec descriptor files from {url} to build index")
db = BuildCacheDatabase(tmpdir)
- db.root = None
- db_root_dir = db.database_directory
try:
- _read_specs_and_push_index(file_list, read_fn, cache_prefix, db, db_root_dir, concurrency)
- except Exception as err:
- 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)
+ _read_specs_and_push_index(file_list, read_fn, url, db, db.database_directory, concurrency)
+ except Exception as e:
+ raise GenerateIndexError(f"Encountered problem pushing package index to {url}: {e}") from e
-def generate_key_index(key_prefix, tmpdir=None):
+def generate_key_index(key_prefix: str, tmpdir: str) -> None:
"""Create the key index page.
- Creates (or replaces) the "index.json" page at the location given in
- key_prefix. This page contains an entry for each key (.pub) under
- key_prefix.
+ Creates (or replaces) the "index.json" page at the location given in key_prefix. This page
+ contains an entry for each key (.pub) under key_prefix.
"""
- tty.debug(
- " ".join(
- ("Retrieving key.pub files from", url_util.format(key_prefix), "to build key index")
- )
- )
+ tty.debug(f"Retrieving key.pub files from {url_util.format(key_prefix)} to build key index")
try:
fingerprints = (
@@ -1087,438 +1023,822 @@ def generate_key_index(key_prefix, tmpdir=None):
for entry in web_util.list_url(key_prefix, recursive=False)
if entry.endswith(".pub")
)
- except KeyError as inst:
- msg = "No keys at {0}: {1}".format(key_prefix, inst)
- tty.warn(msg)
- return
- except Exception as err:
- # If we got some kind of S3 (access denied or other connection
- # error), the first non boto-specific class in the exception
- # hierarchy is Exception. Just print a warning and return
- msg = "Encountered problem listing keys at {0}: {1}".format(key_prefix, err)
- tty.warn(msg)
- return
-
- remove_tmpdir = False
+ except Exception as e:
+ raise CannotListKeys(f"Encountered problem listing keys at {key_prefix}: {e}") from e
- keys_local = url_util.local_file_path(key_prefix)
- if keys_local:
- target = os.path.join(keys_local, "index.json")
- else:
- if not tmpdir:
- tmpdir = tempfile.mkdtemp()
- remove_tmpdir = True
- target = os.path.join(tmpdir, "index.json")
+ target = os.path.join(tmpdir, "index.json")
index = {"keys": dict((fingerprint, {}) for fingerprint in sorted(set(fingerprints)))}
with open(target, "w") as f:
sjson.dump(index, f)
- if not keys_local:
- try:
- web_util.push_to_url(
- target,
- url_util.join(key_prefix, "index.json"),
- keep_original=False,
- extra_args={"ContentType": "application/json"},
- )
- except Exception as err:
- msg = "Encountered problem pushing key index to {0}: {1}".format(key_prefix, err)
- tty.warn(msg)
- finally:
- if remove_tmpdir:
- shutil.rmtree(tmpdir)
-
-
-@contextmanager
-def gzip_compressed_tarfile(path):
- """Create a reproducible, compressed tarfile"""
- # Create gzip compressed tarball of the install prefix
- # 1) Use explicit empty filename and mtime 0 for gzip header reproducibility.
- # If the filename="" is dropped, Python will use fileobj.name instead.
- # This should effectively mimick `gzip --no-name`.
- # 2) On AMD Ryzen 3700X and an SSD disk, we have the following on compression speed:
- # compresslevel=6 gzip default: llvm takes 4mins, roughly 2.1GB
- # compresslevel=9 python default: llvm takes 12mins, roughly 2.1GB
- # So we follow gzip.
- with open(path, "wb") as f, ChecksumWriter(f) as inner_checksum, closing(
- GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=inner_checksum)
- ) as gzip_file, ChecksumWriter(gzip_file) as outer_checksum, tarfile.TarFile(
- name="", mode="w", fileobj=outer_checksum
- ) as tar:
- yield tar, inner_checksum, outer_checksum
-
-
-def _tarinfo_name(absolute_path: str, *, _path=pathlib.PurePath) -> str:
- """Compute tarfile entry name as the relative path from the (system) root."""
- return _path(*_path(absolute_path).parts[1:]).as_posix()
+ try:
+ web_util.push_to_url(
+ target,
+ url_util.join(key_prefix, "index.json"),
+ keep_original=False,
+ extra_args={"ContentType": "application/json"},
+ )
+ except Exception as e:
+ raise GenerateIndexError(
+ f"Encountered problem pushing key index to {key_prefix}: {e}"
+ ) from e
def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None:
"""Create a tarfile of an install prefix of a spec. Skips existing buildinfo file.
- Only adds regular files, symlinks and dirs. Skips devices, fifos. Preserves hardlinks.
- Normalizes permissions like git. Tar entries are added in depth-first pre-order, with
- dir entries partitioned by file | dir, and sorted alphabetically, for reproducibility.
- Partitioning ensures only one dir is in memory at a time, and sorting improves compression.
Args:
tar: tarfile object to add files to
prefix: absolute install prefix of spec"""
if not os.path.isabs(prefix) or not os.path.isdir(prefix):
raise ValueError(f"prefix '{prefix}' must be an absolute path to a directory")
- hardlink_to_tarinfo_name: Dict[Tuple[int, int], str] = dict()
stat_key = lambda stat: (stat.st_dev, stat.st_ino)
try: # skip buildinfo file if it exists
files_to_skip = [stat_key(os.lstat(buildinfo_file_name(prefix)))]
+ skip = lambda entry: stat_key(entry.stat(follow_symlinks=False)) in files_to_skip
except OSError:
- files_to_skip = []
-
- dir_stack = [prefix]
- while dir_stack:
- dir = dir_stack.pop()
-
- # Add the dir before its contents
- dir_info = tarfile.TarInfo(_tarinfo_name(dir))
- dir_info.type = tarfile.DIRTYPE
- dir_info.mode = 0o755
- tar.addfile(dir_info)
-
- # Sort by name: reproducible & improves compression
- with os.scandir(dir) as it:
- entries = sorted(it, key=lambda entry: entry.name)
-
- new_dirs = []
- for entry in entries:
- if entry.is_dir(follow_symlinks=False):
- new_dirs.append(entry.path)
- continue
+ skip = lambda entry: False
+
+ spack.util.archive.reproducible_tarfile_from_prefix(
+ tar,
+ prefix,
+ # Spack <= 0.21 did not include parent directories, leading to issues when tarballs are
+ # used in runtimes like AWS lambda.
+ include_parent_directories=True,
+ skip=skip,
+ )
+
+
+def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict):
+ with spack.util.archive.gzip_compressed_tarfile(tarfile_path) as (
+ tar,
+ inner_checksum,
+ outer_checksum,
+ ):
+ # Tarball the install prefix
+ tarfile_of_spec_prefix(tar, binaries_dir)
- file_info = tarfile.TarInfo(_tarinfo_name(entry.path))
+ # Serialize buildinfo for the tarball
+ bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
+ tarinfo = tarfile.TarInfo(
+ name=spack.util.archive.default_path_to_name(buildinfo_file_name(binaries_dir))
+ )
+ tarinfo.type = tarfile.REGTYPE
+ tarinfo.size = len(bstring)
+ tarinfo.mode = 0o644
+ tar.addfile(tarinfo, io.BytesIO(bstring))
- s = entry.stat(follow_symlinks=False)
+ return inner_checksum.hexdigest(), outer_checksum.hexdigest()
- # Skip existing binary distribution files.
- id = stat_key(s)
- if id in files_to_skip:
- continue
- # Normalize the mode
- file_info.mode = 0o644 if s.st_mode & 0o100 == 0 else 0o755
-
- if entry.is_symlink():
- file_info.type = tarfile.SYMTYPE
- file_info.linkname = os.readlink(entry.path)
- tar.addfile(file_info)
-
- elif entry.is_file(follow_symlinks=False):
- # Deduplicate hardlinks
- if s.st_nlink > 1:
- if id in hardlink_to_tarinfo_name:
- file_info.type = tarfile.LNKTYPE
- file_info.linkname = hardlink_to_tarinfo_name[id]
- tar.addfile(file_info)
- continue
- hardlink_to_tarinfo_name[id] = file_info.name
+class ExistsInBuildcache(NamedTuple):
+ signed: bool
+ unsigned: bool
+ tarball: bool
- # If file not yet seen, copy it.
- file_info.type = tarfile.REGTYPE
- file_info.size = s.st_size
- with open(entry.path, "rb") as f:
- tar.addfile(file_info, f)
+class BuildcacheFiles:
+ def __init__(self, spec: Spec, local: str, remote: str):
+ """
+ Args:
+ spec: The spec whose tarball and specfile are being managed.
+ local: The local path to the buildcache.
+ remote: The remote URL to the buildcache.
+ """
+ self.local = local
+ self.remote = remote
+ self.spec = spec
+
+ def remote_specfile(self, signed: bool) -> str:
+ return url_util.join(
+ self.remote,
+ build_cache_relative_path(),
+ tarball_name(self.spec, ".spec.json.sig" if signed else ".spec.json"),
+ )
- dir_stack.extend(reversed(new_dirs)) # we pop, so reverse to stay alphabetical
+ def remote_tarball(self) -> str:
+ return url_util.join(
+ self.remote, build_cache_relative_path(), tarball_path_name(self.spec, ".spack")
+ )
+ def local_specfile(self) -> str:
+ return os.path.join(self.local, f"{self.spec.dag_hash()}.spec.json")
-class ChecksumWriter(io.BufferedIOBase):
- """Checksum writer computes a checksum while writing to a file."""
+ def local_tarball(self) -> str:
+ return os.path.join(self.local, f"{self.spec.dag_hash()}.tar.gz")
- myfileobj = None
- def __init__(self, fileobj, algorithm=hashlib.sha256):
- self.fileobj = fileobj
- self.hasher = algorithm()
- self.length = 0
+def _exists_in_buildcache(spec: Spec, tmpdir: str, out_url: str) -> ExistsInBuildcache:
+ """returns a tuple of bools (signed, unsigned, tarball) indicating whether specfiles/tarballs
+ exist in the buildcache"""
+ files = BuildcacheFiles(spec, tmpdir, out_url)
+ signed = web_util.url_exists(files.remote_specfile(signed=True))
+ unsigned = web_util.url_exists(files.remote_specfile(signed=False))
+ tarball = web_util.url_exists(files.remote_tarball())
+ return ExistsInBuildcache(signed, unsigned, tarball)
- def hexdigest(self):
- return self.hasher.hexdigest()
- def write(self, data):
- if isinstance(data, (bytes, bytearray)):
- length = len(data)
- else:
- data = memoryview(data)
- length = data.nbytes
+def _url_upload_tarball_and_specfile(
+ spec: Spec, tmpdir: str, out_url: str, exists: ExistsInBuildcache, signing_key: Optional[str]
+):
+ files = BuildcacheFiles(spec, tmpdir, out_url)
+ tarball = files.local_tarball()
+ checksum, _ = _do_create_tarball(tarball, spec.prefix, get_buildinfo_dict(spec))
+ spec_dict = spec.to_dict(hash=ht.dag_hash)
+ spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION
+ spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum}
- if length > 0:
- self.fileobj.write(data)
- self.hasher.update(data)
+ if exists.tarball:
+ web_util.remove_url(files.remote_tarball())
+ if exists.signed:
+ web_util.remove_url(files.remote_specfile(signed=True))
+ if exists.unsigned:
+ web_util.remove_url(files.remote_specfile(signed=False))
+ web_util.push_to_url(tarball, files.remote_tarball(), keep_original=False)
- self.length += length
+ specfile = files.local_specfile()
+ with open(specfile, "w") as f:
+ # Note: when using gpg clear sign, we need to avoid long lines (19995 chars).
+ # If lines are longer, they are truncated without error. Thanks GPG!
+ # So, here we still add newlines, but no indent, so save on file size and
+ # line length.
+ json.dump(spec_dict, f, indent=0, separators=(",", ":"))
- return length
+ # sign the tarball and spec file with gpg
+ if signing_key:
+ specfile = sign_specfile(signing_key, specfile)
- def read(self, size=-1):
- raise OSError(errno.EBADF, "read() on write-only object")
+ web_util.push_to_url(
+ specfile, files.remote_specfile(signed=bool(signing_key)), keep_original=False
+ )
- def read1(self, size=-1):
- raise OSError(errno.EBADF, "read1() on write-only object")
- def peek(self, n):
- raise OSError(errno.EBADF, "peek() on write-only object")
+class Uploader:
+ def __init__(self, mirror: spack.mirrors.mirror.Mirror, force: bool, update_index: bool):
+ self.mirror = mirror
+ self.force = force
+ self.update_index = update_index
- @property
- def closed(self):
- return self.fileobj is None
+ self.tmpdir: str
+ self.executor: concurrent.futures.Executor
- def close(self):
- fileobj = self.fileobj
- if fileobj is None:
- return
- self.fileobj.close()
- self.fileobj = None
+ # Verify if the mirror meets the requirements to push
+ self.mirror.ensure_mirror_usable("push")
- def flush(self):
- self.fileobj.flush()
+ def __enter__(self):
+ self._tmpdir = tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root())
+ self._executor = spack.util.parallel.make_concurrent_executor()
- def fileno(self):
- return self.fileobj.fileno()
+ self.tmpdir = self._tmpdir.__enter__()
+ self.executor = self.executor = self._executor.__enter__()
- def rewind(self):
- raise OSError("Can't rewind while computing checksum")
+ return self
- def readable(self):
- return False
+ def __exit__(self, *args):
+ self._executor.__exit__(*args)
+ self._tmpdir.__exit__(*args)
- def writable(self):
- return True
+ def push_or_raise(self, specs: List[spack.spec.Spec]) -> List[spack.spec.Spec]:
+ skipped, errors = self.push(specs)
+ if errors:
+ raise PushToBuildCacheError(
+ f"Failed to push {len(errors)} specs to {self.mirror.push_url}:\n"
+ + "\n".join(
+ f"Failed to push {_format_spec(spec)}: {error}" for spec, error in errors
+ )
+ )
+ return skipped
+
+ def push(
+ self, specs: List[spack.spec.Spec]
+ ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]:
+ raise NotImplementedError
+
+ def tag(self, tag: str, roots: List[spack.spec.Spec]):
+ """Make a list of selected specs together available under the given tag"""
+ pass
+
+
+class OCIUploader(Uploader):
+ def __init__(
+ self,
+ mirror: spack.mirrors.mirror.Mirror,
+ force: bool,
+ update_index: bool,
+ base_image: Optional[str],
+ ) -> None:
+ super().__init__(mirror, force, update_index)
+ self.target_image = spack.oci.oci.image_from_mirror(mirror)
+ self.base_image = ImageReference.from_string(base_image) if base_image else None
+
+ def push(
+ self, specs: List[spack.spec.Spec]
+ ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]:
+ skipped, base_images, checksums, upload_errors = _oci_push(
+ target_image=self.target_image,
+ base_image=self.base_image,
+ installed_specs_with_deps=specs,
+ force=self.force,
+ tmpdir=self.tmpdir,
+ executor=self.executor,
+ )
- def seekable(self):
- return True
+ self._base_images = base_images
+ self._checksums = checksums
- def tell(self):
- return self.fileobj.tell()
+ # only update index if any binaries were uploaded
+ if self.update_index and len(skipped) + len(upload_errors) < len(specs):
+ _oci_update_index(self.target_image, self.tmpdir, self.executor)
- def seek(self, offset, whence=io.SEEK_SET):
- # In principle forward seek is possible with b"0" padding,
- # but this is not implemented.
- if offset == 0 and whence == io.SEEK_CUR:
- return
- raise OSError("Can't seek while computing checksum")
+ return skipped, upload_errors
- def readline(self, size=-1):
- raise OSError(errno.EBADF, "readline() on write-only object")
+ def tag(self, tag: str, roots: List[spack.spec.Spec]):
+ tagged_image = self.target_image.with_tag(tag)
+ # _push_oci may not populate self._base_images if binaries were already in the registry
+ for spec in roots:
+ _oci_update_base_images(
+ base_image=self.base_image,
+ target_image=self.target_image,
+ spec=spec,
+ base_image_cache=self._base_images,
+ )
+ _oci_put_manifest(
+ self._base_images, self._checksums, tagged_image, self.tmpdir, None, None, *roots
+ )
-def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict):
- with gzip_compressed_tarfile(tarfile_path) as (tar, inner_checksum, outer_checksum):
- # Tarball the install prefix
- tarfile_of_spec_prefix(tar, binaries_dir)
- # Serialize buildinfo for the tarball
- bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8")
- tarinfo = tarfile.TarInfo(name=_tarinfo_name(buildinfo_file_name(binaries_dir)))
- tarinfo.type = tarfile.REGTYPE
- tarinfo.size = len(bstring)
- tarinfo.mode = 0o644
- tar.addfile(tarinfo, io.BytesIO(bstring))
+class URLUploader(Uploader):
+ def __init__(
+ self,
+ mirror: spack.mirrors.mirror.Mirror,
+ force: bool,
+ update_index: bool,
+ signing_key: Optional[str],
+ ) -> None:
+ super().__init__(mirror, force, update_index)
+ self.url = mirror.push_url
+ self.signing_key = signing_key
+
+ def push(
+ self, specs: List[spack.spec.Spec]
+ ) -> Tuple[List[spack.spec.Spec], List[Tuple[spack.spec.Spec, BaseException]]]:
+ return _url_push(
+ specs,
+ out_url=self.url,
+ force=self.force,
+ update_index=self.update_index,
+ signing_key=self.signing_key,
+ tmpdir=self.tmpdir,
+ executor=self.executor,
+ )
- return inner_checksum.hexdigest(), outer_checksum.hexdigest()
+def make_uploader(
+ mirror: spack.mirrors.mirror.Mirror,
+ force: bool = False,
+ update_index: bool = False,
+ signing_key: Optional[str] = None,
+ base_image: Optional[str] = None,
+) -> Uploader:
+ """Builder for the appropriate uploader based on the mirror type"""
+ if mirror.push_url.startswith("oci://"):
+ return OCIUploader(
+ mirror=mirror, force=force, update_index=update_index, base_image=base_image
+ )
+ else:
+ return URLUploader(
+ mirror=mirror, force=force, update_index=update_index, signing_key=signing_key
+ )
-class PushOptions(NamedTuple):
- #: Overwrite existing tarball/metadata files in buildcache
- force: bool = False
- #: Regenerated indices after pushing
- regenerate_index: bool = False
+def _format_spec(spec: Spec) -> str:
+ return spec.cformat("{name}{@version}{/hash:7}")
+
+
+class FancyProgress:
+ def __init__(self, total: int):
+ self.n = 0
+ self.total = total
+ self.running = False
+ self.enable = sys.stdout.isatty()
+ self.pretty_spec: str = ""
+ self.pre = ""
+
+ def _clear(self):
+ if self.enable and self.running:
+ sys.stdout.write("\033[F\033[K")
+
+ def _progress(self):
+ if self.total > 1:
+ digits = len(str(self.total))
+ return f"[{self.n:{digits}}/{self.total}] "
+ return ""
+
+ def start(self, spec: Spec, running: bool) -> None:
+ self.n += 1
+ self.running = running
+ self.pre = self._progress()
+ self.pretty_spec = _format_spec(spec)
+ if self.enable and self.running:
+ tty.info(f"{self.pre}Pushing {self.pretty_spec}...")
+
+ def ok(self, msg: Optional[str] = None) -> None:
+ self._clear()
+ msg = msg or f"Pushed {self.pretty_spec}"
+ tty.info(f"{self.pre}{msg}")
+
+ def fail(self) -> None:
+ self._clear()
+ tty.info(f"{self.pre}Failed to push {self.pretty_spec}")
+
+
+def _url_push(
+ specs: List[Spec],
+ out_url: str,
+ signing_key: Optional[str],
+ force: bool,
+ update_index: bool,
+ tmpdir: str,
+ executor: concurrent.futures.Executor,
+) -> Tuple[List[Spec], List[Tuple[Spec, BaseException]]]:
+ """Pushes to the provided build cache, and returns a list of skipped specs that were already
+ present (when force=False), and a list of errors. Does not raise on error."""
+ skipped: List[Spec] = []
+ errors: List[Tuple[Spec, BaseException]] = []
+
+ exists_futures = [
+ executor.submit(_exists_in_buildcache, spec, tmpdir, out_url) for spec in specs
+ ]
- #: Whether to sign or not.
- unsigned: bool = False
+ exists = {
+ spec.dag_hash(): exists_future.result()
+ for spec, exists_future in zip(specs, exists_futures)
+ }
- #: What key to use for signing
- key: Optional[str] = None
+ if not force:
+ specs_to_upload = []
+ for spec in specs:
+ signed, unsigned, tarball = exists[spec.dag_hash()]
+ if (signed or unsigned) and tarball:
+ skipped.append(spec)
+ else:
+ specs_to_upload.append(spec)
+ else:
+ specs_to_upload = specs
-def push_or_raise(spec: Spec, out_url: str, options: PushOptions):
- """
- Build a tarball from given spec and put it into the directory structure
- used at the mirror (following <tarball_directory_name>).
+ if not specs_to_upload:
+ return skipped, errors
- This method raises :py:class:`NoOverwriteException` when ``force=False`` and the tarball or
- spec.json file already exist in the buildcache.
- """
- if not spec.concrete:
- raise ValueError("spec must be concrete to build tarball")
+ total = len(specs_to_upload)
- with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir:
- _build_tarball_in_stage_dir(spec, out_url, stage_dir=tmpdir, options=options)
+ if total != len(specs):
+ tty.info(f"{total} specs need to be pushed to {out_url}")
+ upload_futures = [
+ executor.submit(
+ _url_upload_tarball_and_specfile,
+ spec,
+ tmpdir,
+ out_url,
+ exists[spec.dag_hash()],
+ signing_key,
+ )
+ for spec in specs_to_upload
+ ]
-def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, options: PushOptions):
- cache_prefix = build_cache_prefix(stage_dir)
- tarfile_name = tarball_name(spec, ".spack")
- tarfile_dir = os.path.join(cache_prefix, tarball_directory_name(spec))
- tarfile_path = os.path.join(tarfile_dir, tarfile_name)
- spackfile_path = os.path.join(cache_prefix, tarball_path_name(spec, ".spack"))
- remote_spackfile_path = url_util.join(out_url, os.path.relpath(spackfile_path, stage_dir))
+ uploaded_any = False
+ fancy_progress = FancyProgress(total)
- mkdirp(tarfile_dir)
- if web_util.url_exists(remote_spackfile_path):
- if options.force:
- web_util.remove_url(remote_spackfile_path)
+ for spec, upload_future in zip(specs_to_upload, upload_futures):
+ fancy_progress.start(spec, upload_future.running())
+ error = upload_future.exception()
+ if error is None:
+ uploaded_any = True
+ fancy_progress.ok()
else:
- raise NoOverwriteException(url_util.format(remote_spackfile_path))
+ fancy_progress.fail()
+ errors.append((spec, error))
- # need to copy the spec file so the build cache can be downloaded
- # without concretizing with the current spack packages
- # and preferences
+ # don't bother pushing keys / index if all failed to upload
+ if not uploaded_any:
+ return skipped, errors
- spec_file = spack.store.STORE.layout.spec_file_path(spec)
- specfile_name = tarball_name(spec, ".spec.json")
- specfile_path = os.path.realpath(os.path.join(cache_prefix, specfile_name))
- signed_specfile_path = "{0}.sig".format(specfile_path)
+ if signing_key:
+ keys_tmpdir = os.path.join(tmpdir, "keys")
+ os.mkdir(keys_tmpdir)
+ _url_push_keys(out_url, keys=[signing_key], update_index=update_index, tmpdir=keys_tmpdir)
+
+ if update_index:
+ index_tmpdir = os.path.join(tmpdir, "index")
+ os.mkdir(index_tmpdir)
+ _url_generate_package_index(out_url, index_tmpdir)
- remote_specfile_path = url_util.join(
- out_url, os.path.relpath(specfile_path, os.path.realpath(stage_dir))
+ return skipped, errors
+
+
+def _oci_upload_success_msg(spec: Spec, digest: Digest, size: int, elapsed: float):
+ elapsed = max(elapsed, 0.001) # guard against division by zero
+ return (
+ f"Pushed {_format_spec(spec)}: {digest} ({elapsed:.2f}s, "
+ f"{size / elapsed / 1024 / 1024:.2f} MB/s)"
)
- remote_signed_specfile_path = "{0}.sig".format(remote_specfile_path)
-
- # If force and exists, overwrite. Otherwise raise exception on collision.
- if options.force:
- if web_util.url_exists(remote_specfile_path):
- web_util.remove_url(remote_specfile_path)
- if web_util.url_exists(remote_signed_specfile_path):
- web_util.remove_url(remote_signed_specfile_path)
- elif web_util.url_exists(remote_specfile_path) or web_util.url_exists(
- remote_signed_specfile_path
- ):
- raise NoOverwriteException(url_util.format(remote_specfile_path))
- binaries_dir = spec.prefix
- # create info for later relocation and create tar
- buildinfo = get_buildinfo_dict(spec)
+def _oci_get_blob_info(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]:
+ """Get the spack tarball layer digests and size if it exists"""
+ try:
+ manifest, config = get_manifest_and_config_with_retry(image_ref)
- checksum, _ = _do_create_tarball(tarfile_path, binaries_dir, buildinfo)
+ return spack.oci.oci.Blob(
+ compressed_digest=Digest.from_string(manifest["layers"][-1]["digest"]),
+ uncompressed_digest=Digest.from_string(config["rootfs"]["diff_ids"][-1]),
+ size=manifest["layers"][-1]["size"],
+ )
+ except Exception:
+ return None
- # add sha256 checksum to spec.json
- with open(spec_file, "r") as inputfile:
- content = inputfile.read()
- if spec_file.endswith(".json"):
- spec_dict = sjson.load(content)
- else:
- raise ValueError("{0} not a valid spec file type".format(spec_file))
- spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION
- spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum}
- with open(specfile_path, "w") as outfile:
- # Note: when using gpg clear sign, we need to avoid long lines (19995 chars).
- # If lines are longer, they are truncated without error. Thanks GPG!
- # So, here we still add newlines, but no indent, so save on file size and
- # line length.
- json.dump(spec_dict, outfile, indent=0, separators=(",", ":"))
+def _oci_push_pkg_blob(
+ image_ref: ImageReference, spec: spack.spec.Spec, tmpdir: str
+) -> Tuple[spack.oci.oci.Blob, float]:
+ """Push a package blob to the registry and return the blob info and the time taken"""
+ filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz")
- # sign the tarball and spec file with gpg
- if not options.unsigned:
- key = select_signing_key(options.key)
- sign_specfile(key, options.force, specfile_path)
+ # Create an oci.image.layer aka tarball of the package
+ compressed_tarfile_checksum, tarfile_checksum = _do_create_tarball(
+ filename, spec.prefix, get_buildinfo_dict(spec)
+ )
- # push tarball and signed spec json to remote mirror
- web_util.push_to_url(spackfile_path, remote_spackfile_path, keep_original=False)
- web_util.push_to_url(
- signed_specfile_path if not options.unsigned else specfile_path,
- remote_signed_specfile_path if not options.unsigned else remote_specfile_path,
- keep_original=False,
+ blob = spack.oci.oci.Blob(
+ Digest.from_sha256(compressed_tarfile_checksum),
+ Digest.from_sha256(tarfile_checksum),
+ os.path.getsize(filename),
)
- # push the key to the build cache's _pgp directory so it can be
- # imported
- if not options.unsigned:
- push_keys(out_url, keys=[key], regenerate_index=options.regenerate_index, tmpdir=stage_dir)
+ # Upload the blob
+ start = time.time()
+ upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest)
+ elapsed = time.time() - start
- # create an index.json for the build_cache directory so specs can be
- # found
- if options.regenerate_index:
- generate_package_index(url_util.join(out_url, os.path.relpath(cache_prefix, stage_dir)))
+ # delete the file
+ os.unlink(filename)
- return None
+ return blob, elapsed
-class NotInstalledError(spack.error.SpackError):
- """Raised when a spec is not installed but picked to be packaged."""
+def _oci_retrieve_env_dict_from_config(config: dict) -> dict:
+ """Retrieve the environment variables from the image config file.
+ Sets a default value for PATH if it is not present.
- def __init__(self, specs: List[Spec]):
- super().__init__(
- "Cannot push non-installed packages",
- ", ".join(s.cformat("{name}{@version}{/hash:7}") for s in specs),
+ Args:
+ config (dict): The image config file.
+
+ Returns:
+ dict: The environment variables.
+ """
+ env = {"PATH": "/bin:/usr/bin"}
+
+ if "Env" in config.get("config", {}):
+ for entry in config["config"]["Env"]:
+ key, value = entry.split("=", 1)
+ env[key] = value
+ return env
+
+
+def _oci_archspec_to_gooarch(spec: spack.spec.Spec) -> str:
+ name = spec.target.family.name
+ name_map = {"aarch64": "arm64", "x86_64": "amd64"}
+ return name_map.get(name, name)
+
+
+def _oci_put_manifest(
+ base_images: Dict[str, Tuple[dict, dict]],
+ checksums: Dict[str, spack.oci.oci.Blob],
+ image_ref: ImageReference,
+ tmpdir: str,
+ extra_config: Optional[dict],
+ annotations: Optional[dict],
+ *specs: spack.spec.Spec,
+):
+ architecture = _oci_archspec_to_gooarch(specs[0])
+
+ expected_blobs: List[Spec] = [
+ s
+ for s in traverse.traverse_nodes(specs, order="topo", deptype=("link", "run"), root=True)
+ if not s.external
+ ]
+ expected_blobs.reverse()
+
+ base_manifest, base_config = base_images[architecture]
+ env = _oci_retrieve_env_dict_from_config(base_config)
+
+ # If the base image uses `vnd.docker.distribution.manifest.v2+json`, then we use that too.
+ # This is because Singularity / Apptainer is very strict about not mixing them.
+ base_manifest_mediaType = base_manifest.get(
+ "mediaType", "application/vnd.oci.image.manifest.v1+json"
+ )
+ use_docker_format = (
+ base_manifest_mediaType == "application/vnd.docker.distribution.manifest.v2+json"
+ )
+
+ spack.user_environment.environment_modifications_for_specs(*specs).apply_modifications(env)
+
+ # Create an oci.image.config file
+ config = copy.deepcopy(base_config)
+
+ # Add the diff ids of the blobs
+ for s in expected_blobs:
+ # If a layer for a dependency has gone missing (due to removed manifest in the registry, a
+ # failed push, or a local forced uninstall), we cannot create a runnable container image.
+ checksum = checksums.get(s.dag_hash())
+ if checksum:
+ config["rootfs"]["diff_ids"].append(str(checksum.uncompressed_digest))
+
+ # Set the environment variables
+ config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()]
+
+ if extra_config:
+ # From the OCI v1.0 spec:
+ # > Any extra fields in the Image JSON struct are considered implementation
+ # > specific and MUST be ignored by any implementations which are unable to
+ # > interpret them.
+ config.update(extra_config)
+
+ config_file = os.path.join(tmpdir, f"{specs[0].dag_hash()}.config.json")
+
+ with open(config_file, "w") as f:
+ json.dump(config, f, separators=(",", ":"))
+
+ config_file_checksum = Digest.from_sha256(
+ spack.util.crypto.checksum(hashlib.sha256, config_file)
+ )
+
+ # Upload the config file
+ upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum)
+
+ manifest = {
+ "mediaType": base_manifest_mediaType,
+ "schemaVersion": 2,
+ "config": {
+ "mediaType": base_manifest["config"]["mediaType"],
+ "digest": str(config_file_checksum),
+ "size": os.path.getsize(config_file),
+ },
+ "layers": [
+ *(layer for layer in base_manifest["layers"]),
+ *(
+ {
+ "mediaType": (
+ "application/vnd.docker.image.rootfs.diff.tar.gzip"
+ if use_docker_format
+ else "application/vnd.oci.image.layer.v1.tar+gzip"
+ ),
+ "digest": str(checksums[s.dag_hash()].compressed_digest),
+ "size": checksums[s.dag_hash()].size,
+ }
+ for s in expected_blobs
+ if s.dag_hash() in checksums
+ ),
+ ],
+ }
+
+ if not use_docker_format and annotations:
+ manifest["annotations"] = annotations
+
+ # Finally upload the manifest
+ upload_manifest_with_retry(image_ref, manifest=manifest)
+
+ # delete the config file
+ os.unlink(config_file)
+
+
+def _oci_update_base_images(
+ *,
+ base_image: Optional[ImageReference],
+ target_image: ImageReference,
+ spec: spack.spec.Spec,
+ base_image_cache: Dict[str, Tuple[dict, dict]],
+):
+ """For a given spec and base image, copy the missing layers of the base image with matching
+ arch to the registry of the target image. If no base image is specified, create a dummy
+ manifest and config file."""
+ architecture = _oci_archspec_to_gooarch(spec)
+ if architecture in base_image_cache:
+ return
+ if base_image is None:
+ base_image_cache[architecture] = (
+ default_manifest(),
+ default_config(architecture, "linux"),
+ )
+ else:
+ base_image_cache[architecture] = copy_missing_layers_with_retry(
+ base_image, target_image, architecture
)
-def specs_to_be_packaged(
- specs: List[Spec], root: bool = True, dependencies: bool = True
-) -> List[Spec]:
- """Return the list of nodes to be packaged, given a list of specs.
- Raises NotInstalledError if a spec is not installed but picked to be packaged.
+def _oci_push(
+ *,
+ target_image: ImageReference,
+ base_image: Optional[ImageReference],
+ installed_specs_with_deps: List[Spec],
+ tmpdir: str,
+ executor: concurrent.futures.Executor,
+ force: bool = False,
+) -> Tuple[
+ List[Spec],
+ Dict[str, Tuple[dict, dict]],
+ Dict[str, spack.oci.oci.Blob],
+ List[Tuple[Spec, BaseException]],
+]:
+ # Spec dag hash -> blob
+ checksums: Dict[str, spack.oci.oci.Blob] = {}
+
+ # arch -> (manifest, config)
+ base_images: Dict[str, Tuple[dict, dict]] = {}
+
+ # Specs not uploaded because they already exist
+ skipped: List[Spec] = []
+
+ if not force:
+ tty.info("Checking for existing specs in the buildcache")
+ blobs_to_upload = []
+
+ tags_to_check = (target_image.with_tag(default_tag(s)) for s in installed_specs_with_deps)
+ available_blobs = executor.map(_oci_get_blob_info, tags_to_check)
+
+ for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs):
+ if maybe_blob is not None:
+ checksums[spec.dag_hash()] = maybe_blob
+ skipped.append(spec)
+ else:
+ blobs_to_upload.append(spec)
+ else:
+ blobs_to_upload = installed_specs_with_deps
- Args:
- specs: list of root specs to be processed
- root: include the root of each spec in the nodes
- dependencies: include the dependencies of each
- spec in the nodes
- """
+ if not blobs_to_upload:
+ return skipped, base_images, checksums, []
- if not root and not dependencies:
- return []
+ if len(blobs_to_upload) != len(installed_specs_with_deps):
+ tty.info(
+ f"{len(blobs_to_upload)} specs need to be pushed to "
+ f"{target_image.domain}/{target_image.name}"
+ )
+
+ blob_progress = FancyProgress(len(blobs_to_upload))
+
+ # Upload blobs
+ blob_futures = [
+ executor.submit(_oci_push_pkg_blob, target_image, spec, tmpdir) for spec in blobs_to_upload
+ ]
- # Filter packageable roots
- with spack.store.STORE.db.read_transaction():
- if root:
- # Error on uninstalled roots, when roots are requested
- uninstalled_roots = list(s for s in specs if not s.installed)
- if uninstalled_roots:
- raise NotInstalledError(uninstalled_roots)
- roots = specs
+ manifests_to_upload: List[Spec] = []
+ errors: List[Tuple[Spec, BaseException]] = []
+
+ # And update the spec to blob mapping for successful uploads
+ for spec, blob_future in zip(blobs_to_upload, blob_futures):
+ blob_progress.start(spec, blob_future.running())
+ error = blob_future.exception()
+ if error is None:
+ blob, elapsed = blob_future.result()
+ blob_progress.ok(
+ _oci_upload_success_msg(spec, blob.compressed_digest, blob.size, elapsed)
+ )
+ manifests_to_upload.append(spec)
+ checksums[spec.dag_hash()] = blob
else:
- roots = []
+ blob_progress.fail()
+ errors.append((spec, error))
+
+ # Copy base images if necessary
+ for spec in manifests_to_upload:
+ _oci_update_base_images(
+ base_image=base_image,
+ target_image=target_image,
+ spec=spec,
+ base_image_cache=base_images,
+ )
- if dependencies:
- # Error on uninstalled deps, when deps are requested
- deps = list(
- traverse.traverse_nodes(
- specs, deptype="all", order="breadth", root=False, key=traverse.by_dag_hash
- )
+ def extra_config(spec: Spec):
+ spec_dict = spec.to_dict(hash=ht.dag_hash)
+ spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION
+ spec_dict["binary_cache_checksum"] = {
+ "hash_algorithm": "sha256",
+ "hash": checksums[spec.dag_hash()].compressed_digest.digest,
+ }
+ return spec_dict
+
+ # Upload manifests
+ tty.info("Uploading manifests")
+ manifest_futures = [
+ executor.submit(
+ _oci_put_manifest,
+ base_images,
+ checksums,
+ target_image.with_tag(default_tag(spec)),
+ tmpdir,
+ extra_config(spec),
+ {"org.opencontainers.image.description": spec.format()},
+ spec,
+ )
+ for spec in manifests_to_upload
+ ]
+
+ manifest_progress = FancyProgress(len(manifests_to_upload))
+
+ # Print the image names of the top-level specs
+ for spec, manifest_future in zip(manifests_to_upload, manifest_futures):
+ error = manifest_future.exception()
+ manifest_progress.start(spec, manifest_future.running())
+ if error is None:
+ manifest_progress.ok(
+ f"Tagged {_format_spec(spec)} as {target_image.with_tag(default_tag(spec))}"
)
- uninstalled_deps = list(s for s in deps if not s.installed)
- if uninstalled_deps:
- raise NotInstalledError(uninstalled_deps)
else:
- deps = []
+ manifest_progress.fail()
+ errors.append((spec, error))
- return [s for s in itertools.chain(roots, deps) if not s.external]
+ return skipped, base_images, checksums, errors
-def push(spec: Spec, mirror_url: str, options: PushOptions):
- """Create and push binary package for a single spec to the specified
- mirror url.
+def _oci_config_from_tag(image_ref_and_tag: Tuple[ImageReference, str]) -> Optional[dict]:
+ image_ref, tag = image_ref_and_tag
+ # Don't allow recursion here, since Spack itself always uploads
+ # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json
+ _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0)
- Args:
- spec: Spec to package and push
- mirror_url: Desired destination url for binary package
- options:
+ # Do very basic validation: if "spec" is a key in the config, it
+ # must be a Spec object too.
+ return config if "spec" in config else None
- Returns:
- True if package was pushed, False otherwise.
- """
- try:
- push_or_raise(spec, mirror_url, options)
- except NoOverwriteException as e:
- warnings.warn(str(e))
- return False
+def _oci_update_index(
+ image_ref: ImageReference, tmpdir: str, pool: concurrent.futures.Executor
+) -> None:
+ tags = list_tags(image_ref)
- return True
+ # Fetch all image config files in parallel
+ spec_dicts = pool.map(
+ _oci_config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag))
+ )
+
+ # Populate the database
+ db_root_dir = os.path.join(tmpdir, "db_root")
+ db = BuildCacheDatabase(db_root_dir)
+
+ for spec_dict in spec_dicts:
+ spec = Spec.from_dict(spec_dict)
+ db.add(spec)
+ db.mark(spec, "in_buildcache", True)
+
+ # Create the index.json file
+ index_json_path = os.path.join(tmpdir, "index.json")
+ with open(index_json_path, "w") as f:
+ db._write_to_file(f)
+
+ # Create an empty config.json file
+ empty_config_json_path = os.path.join(tmpdir, "config.json")
+ with open(empty_config_json_path, "wb") as f:
+ f.write(b"{}")
+
+ # Upload the index.json file
+ index_shasum = Digest.from_sha256(spack.util.crypto.checksum(hashlib.sha256, index_json_path))
+ upload_blob_with_retry(image_ref, file=index_json_path, digest=index_shasum)
+
+ # Upload the config.json file
+ empty_config_digest = Digest.from_sha256(
+ spack.util.crypto.checksum(hashlib.sha256, empty_config_json_path)
+ )
+ upload_blob_with_retry(image_ref, file=empty_config_json_path, digest=empty_config_digest)
+
+ # Push a manifest file that references the index.json file as a layer
+ # Notice that we push this as if it is an image, which it of course is not.
+ # When the ORAS spec becomes official, we can use that instead of a fake image.
+ # For now we just use the OCI image spec, so that we don't run into issues with
+ # automatic garbage collection of blobs that are not referenced by any image manifest.
+ oci_manifest = {
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
+ "schemaVersion": 2,
+ # Config is just an empty {} file for now, and irrelevant
+ "config": {
+ "mediaType": "application/vnd.oci.image.config.v1+json",
+ "digest": str(empty_config_digest),
+ "size": os.path.getsize(empty_config_json_path),
+ },
+ # The buildcache index is the only layer, and is not a tarball, we lie here.
+ "layers": [
+ {
+ "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
+ "digest": str(index_shasum),
+ "size": os.path.getsize(index_json_path),
+ }
+ ],
+ }
+
+ upload_manifest_with_retry(image_ref.with_tag(default_index_tag), oci_manifest)
def try_verify(specfile_path):
@@ -1633,9 +1953,9 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No
"signature_verified": "true-if-binary-pkg-was-already-verified"
}
"""
- configured_mirrors: Iterable[spack.mirror.Mirror] = spack.mirror.MirrorCollection(
- binary=True
- ).values()
+ configured_mirrors: Iterable[spack.mirrors.mirror.Mirror] = (
+ spack.mirrors.mirror.MirrorCollection(binary=True).values()
+ )
if not configured_mirrors:
tty.die("Please add a spack mirror to allow download of pre-compiled packages.")
@@ -1660,7 +1980,7 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No
for mirror in configured_mirrors:
if mirror.fetch_url == url:
return mirror
- return spack.mirror.Mirror(url)
+ return spack.mirrors.mirror.Mirror(url)
mirrors = [fetch_url_to_mirror(url) for url in mirror_urls]
@@ -1688,7 +2008,7 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No
response = spack.oci.opener.urlopen(
urllib.request.Request(
url=ref.manifest_url(),
- headers={"Accept": "application/vnd.oci.image.manifest.v1+json"},
+ headers={"Accept": ", ".join(spack.oci.oci.manifest_content_type)},
)
)
except Exception:
@@ -1903,11 +2223,36 @@ def relocate_package(spec):
# First match specific prefix paths. Possibly the *local* install prefix
# of some dependency is in an upstream, so we cannot assume the original
# spack store root can be mapped uniformly to the new spack store root.
- for dag_hash, new_dep_prefix in hashes_to_prefixes(spec).items():
- if dag_hash in hash_to_old_prefix:
- old_dep_prefix = hash_to_old_prefix[dag_hash]
- prefix_to_prefix_bin[old_dep_prefix] = new_dep_prefix
- prefix_to_prefix_text[old_dep_prefix] = new_dep_prefix
+ #
+ # If the spec is spliced, we need to handle the simultaneous mapping
+ # from the old install_tree to the new install_tree and from the build_spec
+ # to the spliced spec.
+ # Because foo.build_spec is foo for any non-spliced spec, we can simplify
+ # by checking for spliced-in nodes by checking for nodes not in the build_spec
+ # without any explicit check for whether the spec is spliced.
+ # An analog in this algorithm is any spec that shares a name or provides the same virtuals
+ # in the context of the relevant root spec. This ensures that the analog for a spec s
+ # is the spec that s replaced when we spliced.
+ relocation_specs = deps_to_relocate(spec)
+ build_spec_ids = set(id(s) for s in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD))
+ for s in relocation_specs:
+ analog = s
+ if id(s) not in build_spec_ids:
+ analogs = [
+ d
+ for d in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD)
+ if s._splice_match(d, self_root=spec, other_root=spec.build_spec)
+ ]
+ if analogs:
+ # Prefer same-name analogs and prefer higher versions
+ # This matches the preferences in Spec.splice, so we will find same node
+ analog = max(analogs, key=lambda a: (a.name == s.name, a.version))
+
+ lookup_dag_hash = analog.dag_hash()
+ if lookup_dag_hash in hash_to_old_prefix:
+ old_dep_prefix = hash_to_old_prefix[lookup_dag_hash]
+ prefix_to_prefix_bin[old_dep_prefix] = str(s.prefix)
+ prefix_to_prefix_text[old_dep_prefix] = str(s.prefix)
# Only then add the generic fallback of install prefix -> install prefix.
prefix_to_prefix_text[old_prefix] = new_prefix
@@ -1989,7 +2334,9 @@ def relocate_package(spec):
if not codesign:
return
for binary in changed_files:
- codesign("-fs-", binary)
+ # preserve the original inode by running codesign on a copy
+ with fsys.edit_in_place_through_temporary_file(binary) as tmp_binary:
+ codesign("-fs-", tmp_binary)
# If we are installing back to the same location
# relocate the sbang location if the spack directory changed
@@ -2047,11 +2394,12 @@ def _extract_inner_tarball(spec, filename, extract_to, signature_required: bool,
def _tar_strip_component(tar: tarfile.TarFile, prefix: str):
- """Strip the top-level directory `prefix` from the member names in a tarfile."""
+ """Yield all members of tarfile that start with given prefix, and strip that prefix (including
+ symlinks)"""
# Including trailing /, otherwise we end up with absolute paths.
regex = re.compile(re.escape(prefix) + "/*")
- # Remove the top-level directory from the member (link)names.
+ # Only yield members in the package prefix.
# Note: when a tarfile is created, relative in-prefix symlinks are
# expanded to matching member names of tarfile entries. So, we have
# to ensure that those are updated too.
@@ -2059,12 +2407,14 @@ def _tar_strip_component(tar: tarfile.TarFile, prefix: str):
# them.
for m in tar.getmembers():
result = regex.match(m.name)
- assert result is not None
+ if not result:
+ continue
m.name = m.name[result.end() :]
if m.linkname:
result = regex.match(m.linkname)
if result:
m.linkname = m.linkname[result.end() :]
+ yield m
def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
@@ -2110,7 +2460,7 @@ def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
_delete_staged_downloads(download_result)
shutil.rmtree(tmpdir)
raise e
- elif layout_version == 1:
+ elif 1 <= layout_version <= 2:
# Newer buildcache layout: the .spack file contains just
# in the install tree, the signature, if it exists, is
# wrapped around the spec.json at the root. If sig verify
@@ -2138,8 +2488,10 @@ def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
try:
with closing(tarfile.open(tarfile_path, "r")) as tar:
# Remove install prefix from tarfil to extract directly into spec.prefix
- _tar_strip_component(tar, prefix=_ensure_common_prefix(tar))
- tar.extractall(path=spec.prefix)
+ tar.extractall(
+ path=spec.prefix,
+ members=_tar_strip_component(tar, prefix=_ensure_common_prefix(tar)),
+ )
except Exception:
shutil.rmtree(spec.prefix, ignore_errors=True)
_delete_staged_downloads(download_result)
@@ -2174,23 +2526,56 @@ def extract_tarball(spec, download_result, force=False, timer=timer.NULL_TIMER):
def _ensure_common_prefix(tar: tarfile.TarFile) -> str:
- # Get the shortest length directory.
- common_prefix = min((e.name for e in tar.getmembers() if e.isdir()), key=len, default=None)
+ # Find the lowest `binary_distribution` file (hard-coded forward slash is on purpose).
+ binary_distribution = min(
+ (
+ e.name
+ for e in tar.getmembers()
+ if e.isfile() and e.name.endswith(".spack/binary_distribution")
+ ),
+ key=len,
+ default=None,
+ )
+
+ if binary_distribution is None:
+ raise ValueError("Tarball is not a Spack package, missing binary_distribution file")
- if common_prefix is None:
- raise ValueError("Tarball does not contain a common prefix")
+ pkg_path = pathlib.PurePosixPath(binary_distribution).parent.parent
- # Validate that each file starts with the prefix
+ # Even the most ancient Spack version has required to list the dir of the package itself, so
+ # guard against broken tarballs where `path.parent.parent` is empty.
+ if pkg_path == pathlib.PurePosixPath():
+ raise ValueError("Invalid tarball, missing package prefix dir")
+
+ pkg_prefix = str(pkg_path)
+
+ # Ensure all tar entries are in the pkg_prefix dir, and if they're not, they should be parent
+ # dirs of it.
+ has_prefix = False
for member in tar.getmembers():
- if not member.name.startswith(common_prefix):
- raise ValueError(
- f"Tarball contains file {member.name} outside of prefix {common_prefix}"
- )
+ stripped = member.name.rstrip("/")
+ if not (
+ stripped.startswith(pkg_prefix) or member.isdir() and pkg_prefix.startswith(stripped)
+ ):
+ raise ValueError(f"Tarball contains file {stripped} outside of prefix {pkg_prefix}")
+ if member.isdir() and stripped == pkg_prefix:
+ has_prefix = True
+
+ # This is technically not required, but let's be defensive about the existence of the package
+ # prefix dir.
+ if not has_prefix:
+ raise ValueError(f"Tarball does not contain a common prefix {pkg_prefix}")
- return common_prefix
+ return pkg_prefix
-def install_root_node(spec, unsigned=False, force=False, sha256=None):
+def install_root_node(
+ spec: spack.spec.Spec,
+ unsigned=False,
+ force: bool = False,
+ sha256: Optional[str] = None,
+ allow_missing: bool = False,
+) -> None:
"""Install the root node of a concrete spec from a buildcache.
Checking the sha256 sum of a node before installation is usually needed only
@@ -2199,11 +2584,10 @@ def install_root_node(spec, unsigned=False, force=False, sha256=None):
Args:
spec: spec to be installed (note that only the root node will be installed)
- unsigned (bool): if True allows installing unsigned binaries
- force (bool): force installation if the spec is already present in the
- local store
- sha256 (str): optional sha256 of the binary package, to be checked
- before installation
+ unsigned: if True allows installing unsigned binaries
+ force: force installation if the spec is already present in the local store
+ sha256: optional sha256 of the binary package, to be checked before installation
+ allow_missing: when true, allows installing a node with missing dependencies
"""
# Early termination
if spec.external or spec.virtual:
@@ -2213,10 +2597,10 @@ def install_root_node(spec, unsigned=False, force=False, sha256=None):
warnings.warn("Package for spec {0} already installed.".format(spec.format()))
return
- download_result = download_tarball(spec, unsigned)
+ download_result = download_tarball(spec.build_spec, unsigned)
if not download_result:
msg = 'download of binary cache file for spec "{0}" failed'
- raise RuntimeError(msg.format(spec.format()))
+ raise RuntimeError(msg.format(spec.build_spec.format()))
if sha256:
checker = spack.util.crypto.Checker(sha256)
@@ -2235,8 +2619,13 @@ def install_root_node(spec, unsigned=False, force=False, sha256=None):
with spack.util.path.filter_padding():
tty.msg('Installing "{0}" from a buildcache'.format(spec.format()))
extract_tarball(spec, download_result, force)
+ spec.package.windows_establish_runtime_linkage()
+ if spec.spliced: # overwrite old metadata with new
+ spack.store.STORE.layout.write_spec(
+ spec, spack.store.STORE.layout.spec_file_path(spec)
+ )
spack.hooks.post_install(spec, False)
- spack.store.STORE.db.add(spec, spack.store.STORE.layout)
+ spack.store.STORE.db.add(spec, allow_missing=allow_missing)
def install_single_spec(spec, unsigned=False, force=False):
@@ -2261,7 +2650,7 @@ def try_direct_fetch(spec, mirrors=None):
specfile_is_signed = False
found_specs = []
- binary_mirrors = spack.mirror.MirrorCollection(mirrors=mirrors, binary=True).values()
+ binary_mirrors = spack.mirrors.mirror.MirrorCollection(mirrors=mirrors, binary=True).values()
for mirror in binary_mirrors:
buildcache_fetch_url_json = url_util.join(
@@ -2273,21 +2662,17 @@ def try_direct_fetch(spec, mirrors=None):
try:
_, _, fs = web_util.read_from_url(buildcache_fetch_url_signed_json)
specfile_is_signed = True
- except (URLError, web_util.SpackWebError, HTTPError) as url_err:
+ except web_util.SpackWebError as e1:
try:
_, _, fs = web_util.read_from_url(buildcache_fetch_url_json)
- except (URLError, web_util.SpackWebError, HTTPError) as url_err_x:
+ except web_util.SpackWebError as e2:
tty.debug(
- "Did not find {0} on {1}".format(
- specfile_name, buildcache_fetch_url_signed_json
- ),
- url_err,
+ f"Did not find {specfile_name} on {buildcache_fetch_url_signed_json}",
+ e1,
level=2,
)
tty.debug(
- "Did not find {0} on {1}".format(specfile_name, buildcache_fetch_url_json),
- url_err_x,
- level=2,
+ f"Did not find {specfile_name} on {buildcache_fetch_url_json}", e2, level=2
)
continue
specfile_contents = codecs.getreader("utf-8")(fs).read()
@@ -2326,7 +2711,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False):
if spec is None:
return []
- if not spack.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True):
+ if not spack.mirrors.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True):
tty.debug("No Spack mirrors are currently configured")
return {}
@@ -2365,13 +2750,16 @@ def clear_spec_cache():
def get_keys(install=False, trust=False, force=False, mirrors=None):
"""Get pgp public keys available on mirror with suffix .pub"""
- mirror_collection = mirrors or spack.mirror.MirrorCollection(binary=True)
+ mirror_collection = mirrors or spack.mirrors.mirror.MirrorCollection(binary=True)
if not mirror_collection:
tty.die("Please add a spack mirror to allow " + "download of build caches.")
for mirror in mirror_collection.values():
fetch_url = mirror.fetch_url
+ # TODO: oci:// does not support signing.
+ if fetch_url.startswith("oci://"):
+ continue
keys_url = url_util.join(
fetch_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH
)
@@ -2382,19 +2770,12 @@ def get_keys(install=False, trust=False, force=False, mirrors=None):
try:
_, _, json_file = web_util.read_from_url(keys_index)
json_index = sjson.load(codecs.getreader("utf-8")(json_file))
- except (URLError, web_util.SpackWebError) as url_err:
+ except web_util.SpackWebError as url_err:
if web_util.url_exists(keys_index):
- err_msg = [
- "Unable to find public keys in {0},",
- " caught exception attempting to read from {1}.",
- ]
-
tty.error(
- "".join(err_msg).format(
- url_util.format(fetch_url), url_util.format(keys_index)
- )
+ f"Unable to find public keys in {url_util.format(fetch_url)},"
+ f" caught exception attempting to read from {url_util.format(keys_index)}."
)
-
tty.debug(url_err)
continue
@@ -2423,67 +2804,32 @@ def get_keys(install=False, trust=False, force=False, mirrors=None):
)
-def push_keys(*mirrors, **kwargs):
- """
- Upload pgp public keys to the given mirrors
- """
- keys = kwargs.get("keys")
- regenerate_index = kwargs.get("regenerate_index", False)
- tmpdir = kwargs.get("tmpdir")
- remove_tmpdir = False
+def _url_push_keys(
+ *mirrors: Union[spack.mirrors.mirror.Mirror, str],
+ keys: List[str],
+ tmpdir: str,
+ update_index: bool = False,
+):
+ """Upload pgp public keys to the given mirrors"""
+ keys = spack.util.gpg.public_keys(*(keys or ()))
+ files = [os.path.join(tmpdir, f"{key}.pub") for key in keys]
- keys = spack.util.gpg.public_keys(*(keys or []))
+ for key, file in zip(keys, files):
+ spack.util.gpg.export_keys(file, [key])
- try:
- for mirror in mirrors:
- push_url = getattr(mirror, "push_url", mirror)
- keys_url = url_util.join(
- push_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH
- )
- keys_local = url_util.local_file_path(keys_url)
+ for mirror in mirrors:
+ push_url = mirror if isinstance(mirror, str) else mirror.push_url
+ keys_url = url_util.join(
+ push_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH
+ )
- verb = "Writing" if keys_local else "Uploading"
- tty.debug("{0} public keys to {1}".format(verb, url_util.format(push_url)))
+ tty.debug(f"Pushing public keys to {url_util.format(push_url)}")
- if keys_local: # mirror is local, don't bother with the tmpdir
- prefix = keys_local
- mkdirp(keys_local)
- else:
- # A tmp dir is created for the first mirror that is non-local.
- # On the off-hand chance that all the mirrors are local, then
- # we can avoid the need to create a tmp dir.
- if tmpdir is None:
- tmpdir = tempfile.mkdtemp()
- remove_tmpdir = True
- prefix = tmpdir
-
- for fingerprint in keys:
- tty.debug(" " + fingerprint)
- filename = fingerprint + ".pub"
-
- export_target = os.path.join(prefix, filename)
-
- # Export public keys (private is set to False)
- spack.util.gpg.export_keys(export_target, [fingerprint])
-
- # If mirror is local, the above export writes directly to the
- # mirror (export_target points directly to the mirror).
- #
- # If not, then export_target is a tmpfile that needs to be
- # uploaded to the mirror.
- if not keys_local:
- spack.util.web.push_to_url(
- export_target, url_util.join(keys_url, filename), keep_original=False
- )
+ for key, file in zip(keys, files):
+ web_util.push_to_url(file, url_util.join(keys_url, os.path.basename(file)))
- if regenerate_index:
- if keys_local:
- generate_key_index(keys_url)
- else:
- generate_key_index(keys_url, tmpdir)
- finally:
- if remove_tmpdir:
- shutil.rmtree(tmpdir)
+ if update_index:
+ generate_key_index(keys_url, tmpdir=tmpdir)
def needs_rebuild(spec, mirror_url):
@@ -2526,7 +2872,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None):
"""
rebuilds = {}
- for mirror in spack.mirror.MirrorCollection(mirrors, binary=True).values():
+ for mirror in spack.mirrors.mirror.MirrorCollection(mirrors, binary=True).values():
tty.debug("Checking for built specs at {0}".format(mirror.fetch_url))
rebuild_list = []
@@ -2570,7 +2916,7 @@ def _download_buildcache_entry(mirror_root, descriptions):
def download_buildcache_entry(file_descriptions, mirror_url=None):
- if not mirror_url and not spack.mirror.MirrorCollection(binary=True):
+ if not mirror_url and not spack.mirrors.mirror.MirrorCollection(binary=True):
tty.die(
"Please provide or add a spack mirror to allow " + "download of buildcache entries."
)
@@ -2579,7 +2925,7 @@ def download_buildcache_entry(file_descriptions, mirror_url=None):
mirror_root = os.path.join(mirror_url, BUILD_CACHE_RELATIVE_PATH)
return _download_buildcache_entry(mirror_root, file_descriptions)
- for mirror in spack.mirror.MirrorCollection(binary=True).values():
+ for mirror in spack.mirrors.mirror.MirrorCollection(binary=True).values():
mirror_root = os.path.join(mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH)
if _download_buildcache_entry(mirror_root, file_descriptions):
@@ -2674,7 +3020,7 @@ class DefaultIndexFetcher:
url_index_hash = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json.hash")
try:
response = self.urlopen(urllib.request.Request(url_index_hash, headers=self.headers))
- except urllib.error.URLError:
+ except (TimeoutError, urllib.error.URLError):
return None
# Validate the hash
@@ -2696,7 +3042,7 @@ class DefaultIndexFetcher:
try:
response = self.urlopen(urllib.request.Request(url_index, headers=self.headers))
- except urllib.error.URLError as e:
+ except (TimeoutError, urllib.error.URLError) as e:
raise FetchIndexError("Could not fetch index from {}".format(url_index), e) from e
try:
@@ -2737,10 +3083,7 @@ class EtagIndexFetcher:
def conditional_fetch(self) -> FetchIndexResult:
# Just do a conditional fetch immediately
url = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json")
- headers = {
- "User-Agent": web_util.SPACK_USER_AGENT,
- "If-None-Match": '"{}"'.format(self.etag),
- }
+ headers = {"User-Agent": web_util.SPACK_USER_AGENT, "If-None-Match": f'"{self.etag}"'}
try:
response = self.urlopen(urllib.request.Request(url, headers=headers))
@@ -2748,14 +3091,14 @@ class EtagIndexFetcher:
if e.getcode() == 304:
# Not modified; that means fresh.
return FetchIndexResult(etag=None, hash=None, data=None, fresh=True)
- raise FetchIndexError("Could not fetch index {}".format(url), e) from e
- except urllib.error.URLError as e:
- raise FetchIndexError("Could not fetch index {}".format(url), e) from e
+ raise FetchIndexError(f"Could not fetch index {url}", e) from e
+ except (TimeoutError, urllib.error.URLError) as e:
+ raise FetchIndexError(f"Could not fetch index {url}", e) from e
try:
result = codecs.getreader("utf-8")(response).read()
except ValueError as e:
- raise FetchIndexError("Remote index {} is invalid".format(url), e) from e
+ raise FetchIndexError(f"Remote index {url} is invalid", e) from e
headers = response.headers
etag_header_value = headers.get("Etag", None) or headers.get("etag", None)
@@ -2786,21 +3129,19 @@ class OCIIndexFetcher:
headers={"Accept": "application/vnd.oci.image.manifest.v1+json"},
)
)
- except urllib.error.URLError as e:
- raise FetchIndexError(
- "Could not fetch manifest from {}".format(url_manifest), e
- ) from e
+ except (TimeoutError, urllib.error.URLError) as e:
+ raise FetchIndexError(f"Could not fetch manifest from {url_manifest}", e) from e
try:
manifest = json.loads(response.read())
except Exception as e:
- raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e
+ raise FetchIndexError(f"Remote index {url_manifest} is invalid", e) from e
# Get first blob hash, which should be the index.json
try:
index_digest = spack.oci.image.Digest.from_string(manifest["layers"][0]["digest"])
except Exception as e:
- raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e
+ raise FetchIndexError(f"Remote index {url_manifest} is invalid", e) from e
# Fresh?
if index_digest.digest == self.local_hash:
@@ -2821,3 +3162,96 @@ class OCIIndexFetcher:
raise FetchIndexError(f"Remote index {url_manifest} is invalid")
return FetchIndexResult(etag=None, hash=index_digest.digest, data=result, fresh=False)
+
+
+class NoOverwriteException(spack.error.SpackError):
+ """Raised when a file would be overwritten"""
+
+ def __init__(self, file_path):
+ super().__init__(f"Refusing to overwrite the following file: {file_path}")
+
+
+class NoGpgException(spack.error.SpackError):
+ """
+ Raised when gpg2 is not in PATH
+ """
+
+ def __init__(self, msg):
+ super().__init__(msg)
+
+
+class NoKeyException(spack.error.SpackError):
+ """
+ Raised when gpg has no default key added.
+ """
+
+ def __init__(self, msg):
+ super().__init__(msg)
+
+
+class PickKeyException(spack.error.SpackError):
+ """
+ Raised when multiple keys can be used to sign.
+ """
+
+ def __init__(self, keys):
+ err_msg = "Multiple keys available for signing\n%s\n" % keys
+ err_msg += "Use spack buildcache create -k <key hash> to pick a key."
+ super().__init__(err_msg)
+
+
+class NoVerifyException(spack.error.SpackError):
+ """
+ Raised if file fails signature verification.
+ """
+
+ pass
+
+
+class NoChecksumException(spack.error.SpackError):
+ """
+ Raised if file fails checksum verification.
+ """
+
+ def __init__(self, path, size, contents, algorithm, expected, computed):
+ super().__init__(
+ f"{algorithm} checksum failed for {path}",
+ f"Expected {expected} but got {computed}. "
+ f"File size = {size} bytes. Contents = {contents!r}",
+ )
+
+
+class NewLayoutException(spack.error.SpackError):
+ """
+ Raised if directory layout is different from buildcache.
+ """
+
+ def __init__(self, msg):
+ super().__init__(msg)
+
+
+class InvalidMetadataFile(spack.error.SpackError):
+ pass
+
+
+class UnsignedPackageException(spack.error.SpackError):
+ """
+ Raised if installation of unsigned package is attempted without
+ the use of ``--no-check-signature``.
+ """
+
+
+class ListMirrorSpecsError(spack.error.SpackError):
+ """Raised when unable to retrieve list of specs from the mirror"""
+
+
+class GenerateIndexError(spack.error.SpackError):
+ """Raised when unable to generate key or package index for mirror"""
+
+
+class CannotListKeys(GenerateIndexError):
+ """Raised when unable to list keys when generating key index"""
+
+
+class PushToBuildCacheError(spack.error.SpackError):
+ """Raised when unable to push objects to binary mirror"""
diff --git a/lib/spack/spack/bootstrap/__init__.py b/lib/spack/spack/bootstrap/__init__.py
index d6844ac14d..d710caee68 100644
--- a/lib/spack/spack/bootstrap/__init__.py
+++ b/lib/spack/spack/bootstrap/__init__.py
@@ -5,7 +5,14 @@
"""Function and classes needed to bootstrap Spack itself."""
from .config import ensure_bootstrap_configuration, is_bootstrapping, store_path
-from .core import all_core_root_specs, ensure_core_dependencies, ensure_patchelf_in_path_or_raise
+from .core import (
+ all_core_root_specs,
+ ensure_clingo_importable_or_raise,
+ ensure_core_dependencies,
+ ensure_file_in_path_or_raise,
+ ensure_gpg_in_path_or_raise,
+ ensure_patchelf_in_path_or_raise,
+)
from .environment import BootstrapEnvironment, ensure_environment_dependencies
from .status import status_message
@@ -13,6 +20,9 @@ __all__ = [
"is_bootstrapping",
"ensure_bootstrap_configuration",
"ensure_core_dependencies",
+ "ensure_file_in_path_or_raise",
+ "ensure_gpg_in_path_or_raise",
+ "ensure_clingo_importable_or_raise",
"ensure_patchelf_in_path_or_raise",
"all_core_root_specs",
"ensure_environment_dependencies",
diff --git a/lib/spack/spack/bootstrap/_common.py b/lib/spack/spack/bootstrap/_common.py
index 08bb9377b7..2a33fa9aba 100644
--- a/lib/spack/spack/bootstrap/_common.py
+++ b/lib/spack/spack/bootstrap/_common.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Common basic functions used through the spack.bootstrap package"""
import fnmatch
+import glob
+import importlib
import os.path
import re
import sys
@@ -28,7 +30,7 @@ QueryInfo = Dict[str, "spack.spec.Spec"]
def _python_import(module: str) -> bool:
try:
- __import__(module)
+ importlib.import_module(module)
except ImportError:
return False
return True
@@ -54,11 +56,24 @@ def _try_import_from_store(
installed_specs = spack.store.STORE.db.query(query_spec, installed=True)
for candidate_spec in installed_specs:
- pkg = candidate_spec["python"].package
- module_paths = [
- os.path.join(candidate_spec.prefix, pkg.purelib),
- os.path.join(candidate_spec.prefix, pkg.platlib),
- ]
+ # previously bootstrapped specs may not have a python-venv dependency.
+ if candidate_spec.dependencies("python-venv"):
+ python, *_ = candidate_spec.dependencies("python-venv")
+ else:
+ python, *_ = candidate_spec.dependencies("python")
+
+ # if python is installed, ask it for the layout
+ if python.installed:
+ module_paths = [
+ os.path.join(candidate_spec.prefix, python.package.purelib),
+ os.path.join(candidate_spec.prefix, python.package.platlib),
+ ]
+ # otherwise search for the site-packages directory
+ # (clingo from binaries with truncated python-venv runtime)
+ else:
+ module_paths = glob.glob(
+ os.path.join(candidate_spec.prefix, "lib", "python*", "site-packages")
+ )
path_before = list(sys.path)
# NOTE: try module_paths first and last, last allows an existing version in path
@@ -209,18 +224,18 @@ def _root_spec(spec_str: str) -> str:
Args:
spec_str: spec to be bootstrapped. Must be without compiler and target.
"""
- # Add a compiler requirement to the root spec.
+ # Add a compiler and platform requirement to the root spec.
platform = str(spack.platforms.host())
+
if platform == "darwin":
spec_str += " %apple-clang"
elif platform == "windows":
- # TODO (johnwparent): Remove version constraint when clingo patch is up
- spec_str += " %msvc@:19.37"
+ spec_str += " %msvc"
elif platform == "linux":
spec_str += " %gcc"
elif platform == "freebsd":
spec_str += " %clang"
-
+ spec_str += f" platform={platform}"
target = archspec.cpu.host().family
spec_str += f" target={target}"
diff --git a/lib/spack/spack/bootstrap/clingo.py b/lib/spack/spack/bootstrap/clingo.py
new file mode 100644
index 0000000000..fb0150f49d
--- /dev/null
+++ b/lib/spack/spack/bootstrap/clingo.py
@@ -0,0 +1,154 @@
+# Copyright 2013-2024 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)
+"""Bootstrap concrete specs for clingo
+
+Spack uses clingo to concretize specs. When clingo itself needs to be bootstrapped from sources,
+we need to rely on another mechanism to get a concrete spec that fits the current host.
+
+This module contains the logic to get a concrete spec for clingo, starting from a prototype
+JSON file for a similar platform.
+"""
+import pathlib
+import sys
+from typing import Dict, Optional, Tuple
+
+import archspec.cpu
+
+import spack.compiler
+import spack.compilers
+import spack.platforms
+import spack.spec
+import spack.traverse
+
+from .config import spec_for_current_python
+
+
+class ClingoBootstrapConcretizer:
+ def __init__(self, configuration):
+ self.host_platform = spack.platforms.host()
+ self.host_os = self.host_platform.operating_system("frontend")
+ self.host_target = archspec.cpu.host().family
+ self.host_architecture = spack.spec.ArchSpec.frontend_arch()
+ self.host_architecture.target = str(self.host_target)
+ self.host_compiler = self._valid_compiler_or_raise()
+ self.host_python = self.python_external_spec()
+ if str(self.host_platform) == "linux":
+ self.host_libc = self.libc_external_spec()
+
+ self.external_cmake, self.external_bison = self._externals_from_yaml(configuration)
+
+ def _valid_compiler_or_raise(self) -> "spack.compiler.Compiler":
+ if str(self.host_platform) == "linux":
+ compiler_name = "gcc"
+ elif str(self.host_platform) == "darwin":
+ compiler_name = "apple-clang"
+ elif str(self.host_platform) == "windows":
+ compiler_name = "msvc"
+ elif str(self.host_platform) == "freebsd":
+ compiler_name = "clang"
+ else:
+ raise RuntimeError(f"Cannot bootstrap clingo from sources on {self.host_platform}")
+ candidates = spack.compilers.compilers_for_spec(
+ compiler_name, arch_spec=self.host_architecture
+ )
+ if not candidates:
+ raise RuntimeError(
+ f"Cannot find any version of {compiler_name} to bootstrap clingo from sources"
+ )
+ candidates.sort(key=lambda x: x.spec.version, reverse=True)
+ return candidates[0]
+
+ def _externals_from_yaml(
+ self, configuration: "spack.config.Configuration"
+ ) -> Tuple[Optional["spack.spec.Spec"], Optional["spack.spec.Spec"]]:
+ packages_yaml = configuration.get("packages")
+ requirements = {"cmake": "@3.20:", "bison": "@2.5:"}
+ selected: Dict[str, Optional["spack.spec.Spec"]] = {"cmake": None, "bison": None}
+ for pkg_name in ["cmake", "bison"]:
+ if pkg_name not in packages_yaml:
+ continue
+
+ candidates = packages_yaml[pkg_name].get("externals", [])
+ for candidate in candidates:
+ s = spack.spec.Spec(candidate["spec"], external_path=candidate["prefix"])
+ if not s.satisfies(requirements[pkg_name]):
+ continue
+
+ if not s.intersects(f"%{self.host_compiler.spec}"):
+ continue
+
+ if not s.intersects(f"arch={self.host_architecture}"):
+ continue
+
+ selected[pkg_name] = self._external_spec(s)
+ break
+ return selected["cmake"], selected["bison"]
+
+ def prototype_path(self) -> pathlib.Path:
+ """Path to a prototype concrete specfile for clingo"""
+ parent_dir = pathlib.Path(__file__).parent
+ result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-{self.host_target}.json"
+ if str(self.host_platform) == "linux":
+ # Using aarch64 as a fallback, since it has gnuconfig (x86_64 doesn't have it)
+ if not result.exists():
+ result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-aarch64.json"
+
+ elif str(self.host_platform) == "freebsd":
+ result = parent_dir / "prototypes" / f"clingo-{self.host_platform}-amd64.json"
+
+ elif not result.exists():
+ raise RuntimeError(f"Cannot bootstrap clingo from sources on {self.host_platform}")
+
+ return result
+
+ def concretize(self) -> "spack.spec.Spec":
+ # Read the prototype and mark it NOT concrete
+ s = spack.spec.Spec.from_specfile(str(self.prototype_path()))
+ s._mark_concrete(False)
+
+ # Tweak it to conform to the host architecture
+ for node in s.traverse():
+ node.architecture.os = str(self.host_os)
+ node.compiler = self.host_compiler.spec
+ node.architecture = self.host_architecture
+
+ if node.name == "gcc-runtime":
+ node.versions = self.host_compiler.spec.versions
+
+ for edge in spack.traverse.traverse_edges([s], cover="edges"):
+ if edge.spec.name == "python":
+ edge.spec = self.host_python
+
+ if edge.spec.name == "bison" and self.external_bison:
+ edge.spec = self.external_bison
+
+ if edge.spec.name == "cmake" and self.external_cmake:
+ edge.spec = self.external_cmake
+
+ if "libc" in edge.virtuals:
+ edge.spec = self.host_libc
+
+ s._finalize_concretization()
+
+ # Work around the fact that the installer calls Spec.dependents() and
+ # we modified edges inconsistently
+ return s.copy()
+
+ def python_external_spec(self) -> "spack.spec.Spec":
+ """Python external spec corresponding to the current running interpreter"""
+ result = spack.spec.Spec(spec_for_current_python(), external_path=sys.exec_prefix)
+ return self._external_spec(result)
+
+ def libc_external_spec(self) -> "spack.spec.Spec":
+ result = self.host_compiler.default_libc
+ return self._external_spec(result)
+
+ def _external_spec(self, initial_spec) -> "spack.spec.Spec":
+ initial_spec.namespace = "builtin"
+ initial_spec.compiler = self.host_compiler.spec
+ initial_spec.architecture = self.host_architecture
+ for flag_type in spack.spec.FlagMap.valid_compiler_flags():
+ initial_spec.compiler_flags[flag_type] = []
+ return spack.spec.parse_with_version_concrete(initial_spec)
diff --git a/lib/spack/spack/bootstrap/config.py b/lib/spack/spack/bootstrap/config.py
index 10c5a3db4b..1781b3cc7e 100644
--- a/lib/spack/spack/bootstrap/config.py
+++ b/lib/spack/spack/bootstrap/config.py
@@ -14,6 +14,7 @@ from llnl.util import tty
import spack.compilers
import spack.config
import spack.environment
+import spack.modules
import spack.paths
import spack.platforms
import spack.repo
@@ -129,10 +130,10 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]:
configuration_paths = (spack.config.CONFIGURATION_DEFAULTS_PATH, ("bootstrap", _config_path()))
for name, path in configuration_paths:
platform = spack.platforms.host().name
- platform_scope = spack.config.ConfigScope(
- "/".join([name, platform]), os.path.join(path, platform)
+ platform_scope = spack.config.DirectoryConfigScope(
+ f"{name}/{platform}", os.path.join(path, platform)
)
- generic_scope = spack.config.ConfigScope(name, path)
+ generic_scope = spack.config.DirectoryConfigScope(name, path)
config_scopes.extend([generic_scope, platform_scope])
msg = "[BOOTSTRAP CONFIG SCOPE] name={0}, path={1}"
tty.debug(msg.format(generic_scope.name, generic_scope.path))
@@ -143,11 +144,7 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]:
def _add_compilers_if_missing() -> None:
arch = spack.spec.ArchSpec.frontend_arch()
if not spack.compilers.compilers_for_arch(arch):
- new_compilers = spack.compilers.find_new_compilers(
- mixed_toolchain=sys.platform == "darwin"
- )
- if new_compilers:
- spack.compilers.add_compilers_to_config(new_compilers, init_config=False)
+ spack.compilers.find_compilers()
@contextlib.contextmanager
@@ -156,7 +153,7 @@ def _ensure_bootstrap_configuration() -> Generator:
bootstrap_store_path = store_path()
user_configuration = _read_and_sanitize_configuration()
with spack.environment.no_active_environment():
- with spack.platforms.prevent_cray_detection(), spack.platforms.use_platform(
+ with spack.platforms.use_platform(
spack.platforms.real_host()
), spack.repo.use_repositories(spack.paths.packages_path):
# Default configuration scopes excluding command line
diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py
index 6ff18db843..d396aaac68 100644
--- a/lib/spack/spack/bootstrap/core.py
+++ b/lib/spack/spack/bootstrap/core.py
@@ -37,23 +37,19 @@ from llnl.util.lang import GroupedExceptionHandler
import spack.binary_distribution
import spack.config
import spack.detection
-import spack.environment
-import spack.modules
-import spack.paths
+import spack.mirrors.mirror
import spack.platforms
-import spack.platforms.linux
-import spack.repo
import spack.spec
import spack.store
import spack.user_environment
-import spack.util.environment
import spack.util.executable
import spack.util.path
import spack.util.spack_yaml
-import spack.util.url
import spack.version
+from spack.installer import PackageInstaller
from ._common import _executables_in_store, _python_import, _root_spec, _try_import_from_store
+from .clingo import ClingoBootstrapConcretizer
from .config import spack_python_interpreter, spec_for_current_python
#: Name of the file containing metadata about the bootstrapping source
@@ -95,12 +91,7 @@ class Bootstrapper:
self.metadata_dir = spack.util.path.canonicalize_path(conf["metadata"])
# Promote (relative) paths to file urls
- url = conf["info"]["url"]
- if spack.util.url.is_path_instead_of_url(url):
- if not os.path.isabs(url):
- url = os.path.join(self.metadata_dir, url)
- url = spack.util.url.path_to_file_url(url)
- self.url = url
+ self.url = spack.mirrors.mirror.Mirror(conf["info"]["url"]).fetch_url
@property
def mirror_scope(self) -> spack.config.InternalConfigScope:
@@ -173,35 +164,22 @@ class BuildcacheBootstrapper(Bootstrapper):
return data
def _install_by_hash(
- self,
- pkg_hash: str,
- pkg_sha256: str,
- index: List[spack.spec.Spec],
- bincache_platform: spack.platforms.Platform,
+ self, pkg_hash: str, pkg_sha256: str, bincache_platform: spack.platforms.Platform
) -> None:
- index_spec = next(x for x in index if x.dag_hash() == pkg_hash)
- # Reconstruct the compiler that we need to use for bootstrapping
- compiler_entry = {
- "modules": [],
- "operating_system": str(index_spec.os),
- "paths": {
- "cc": "/dev/null",
- "cxx": "/dev/null",
- "f77": "/dev/null",
- "fc": "/dev/null",
- },
- "spec": str(index_spec.compiler),
- "target": str(index_spec.target.family),
- }
with spack.platforms.use_platform(bincache_platform):
- with spack.config.override("compilers", [{"compiler": compiler_entry}]):
- spec_str = "/" + pkg_hash
- query = spack.binary_distribution.BinaryCacheQuery(all_architectures=True)
- matches = spack.store.find([spec_str], multiple=False, query_fn=query)
- for match in matches:
- spack.binary_distribution.install_root_node(
- match, unsigned=True, force=True, sha256=pkg_sha256
- )
+ query = spack.binary_distribution.BinaryCacheQuery(all_architectures=True)
+ for match in spack.store.find([f"/{pkg_hash}"], multiple=False, query_fn=query):
+ spack.binary_distribution.install_root_node(
+ # allow_missing is true since when bootstrapping clingo we truncate runtime
+ # deps such as gcc-runtime, since we link libstdc++ statically, and the other
+ # further runtime deps are loaded by the Python interpreter. This just silences
+ # warnings about missing dependencies.
+ match,
+ unsigned=True,
+ force=True,
+ sha256=pkg_sha256,
+ allow_missing=True,
+ )
def _install_and_test(
self,
@@ -232,7 +210,7 @@ class BuildcacheBootstrapper(Bootstrapper):
continue
for _, pkg_hash, pkg_sha256 in item["binaries"]:
- self._install_by_hash(pkg_hash, pkg_sha256, index, bincache_platform)
+ self._install_by_hash(pkg_hash, pkg_sha256, bincache_platform)
info: ConfigDictionary = {}
if test_fn(query_spec=abstract_spec, query_info=info):
@@ -289,19 +267,13 @@ class SourceBootstrapper(Bootstrapper):
# Try to build and install from sources
with spack_python_interpreter():
- # Add hint to use frontend operating system on Cray
- concrete_spec = spack.spec.Spec(abstract_spec_str + " ^" + spec_for_current_python())
- # This is needed to help the old concretizer taking the `setuptools` dependency
- # only when bootstrapping from sources on Python 3.12
- if spec_for_current_python() == "python@3.12":
- concrete_spec.constrain("+force_setuptools")
-
if module == "clingo":
- # TODO: remove when the old concretizer is deprecated # pylint: disable=fixme
- concrete_spec._old_concretize( # pylint: disable=protected-access
- deprecation_warning=False
- )
+ bootstrapper = ClingoBootstrapConcretizer(configuration=spack.config.CONFIG)
+ concrete_spec = bootstrapper.concretize()
else:
+ concrete_spec = spack.spec.Spec(
+ abstract_spec_str + " ^" + spec_for_current_python()
+ )
concrete_spec.concretize()
msg = "[BOOTSTRAP MODULE {0}] Try installing '{1}' from sources"
@@ -309,7 +281,7 @@ class SourceBootstrapper(Bootstrapper):
# Install the spec that should make the module importable
with spack.config.override(self.mirror_scope):
- concrete_spec.package.do_install(fail_fast=True)
+ PackageInstaller([concrete_spec.package], fail_fast=True).install()
if _try_import_from_store(module, query_spec=concrete_spec, query_info=info):
self.last_search = info
@@ -328,18 +300,11 @@ class SourceBootstrapper(Bootstrapper):
# might reduce compilation time by a fair amount
_add_externals_if_missing()
- concrete_spec = spack.spec.Spec(abstract_spec_str)
- if concrete_spec.name == "patchelf":
- concrete_spec._old_concretize( # pylint: disable=protected-access
- deprecation_warning=False
- )
- else:
- concrete_spec.concretize()
-
+ concrete_spec = spack.spec.Spec(abstract_spec_str).concretized()
msg = "[BOOTSTRAP] Try installing '{0}' from sources"
tty.debug(msg.format(abstract_spec_str))
with spack.config.override(self.mirror_scope):
- concrete_spec.package.do_install()
+ PackageInstaller([concrete_spec.package], fail_fast=True).install()
if _executables_in_store(executables, concrete_spec, query_info=info):
self.last_search = info
return True
@@ -505,7 +470,8 @@ def ensure_clingo_importable_or_raise() -> None:
def gnupg_root_spec() -> str:
"""Return the root spec used to bootstrap GnuPG"""
- return _root_spec("gnupg@2.3:")
+ root_spec_name = "win-gpg" if IS_WINDOWS else "gnupg"
+ return _root_spec(f"{root_spec_name}@2.3:")
def ensure_gpg_in_path_or_raise() -> None:
@@ -515,6 +481,19 @@ def ensure_gpg_in_path_or_raise() -> None:
)
+def file_root_spec() -> str:
+ """Return the root spec used to bootstrap file"""
+ root_spec_name = "win-file" if IS_WINDOWS else "file"
+ return _root_spec(root_spec_name)
+
+
+def ensure_file_in_path_or_raise() -> None:
+ """Ensure file is in the PATH or raise"""
+ return ensure_executables_in_path_or_raise(
+ executables=["file"], abstract_spec=file_root_spec()
+ )
+
+
def patchelf_root_spec() -> str:
"""Return the root spec used to bootstrap patchelf"""
# 0.13.1 is the last version not to require C++17.
@@ -542,7 +521,7 @@ def verify_patchelf(patchelf: "spack.util.executable.Executable") -> bool:
return version >= spack.version.Version("0.13.1")
-def ensure_patchelf_in_path_or_raise() -> None:
+def ensure_patchelf_in_path_or_raise() -> spack.util.executable.Executable:
"""Ensure patchelf is in the PATH or raise."""
# The old concretizer is not smart and we're doing its job: if the latest patchelf
# does not concretize because the compiler doesn't support C++17, we try to
@@ -559,18 +538,54 @@ def ensure_patchelf_in_path_or_raise() -> None:
)
+def ensure_winsdk_external_or_raise() -> None:
+ """Ensure the Windows SDK + WGL are available on system
+ If both of these package are found, the Spack user or bootstrap
+ configuration (depending on where Spack is running)
+ will be updated to include all versions and variants detected.
+ If either the WDK or WSDK are not found, this method will raise
+ a RuntimeError.
+
+ **NOTE:** This modifies the Spack config in the current scope,
+ either user or environment depending on the calling context.
+ This is different from all other current bootstrap dependency
+ checks.
+ """
+ if set(["win-sdk", "wgl"]).issubset(spack.config.get("packages").keys()):
+ return
+ externals = spack.detection.by_path(["win-sdk", "wgl"])
+ if not set(["win-sdk", "wgl"]) == externals.keys():
+ missing_packages_lst = []
+ if "wgl" not in externals:
+ missing_packages_lst.append("wgl")
+ if "win-sdk" not in externals:
+ missing_packages_lst.append("win-sdk")
+ missing_packages = " & ".join(missing_packages_lst)
+ raise RuntimeError(
+ f"Unable to find the {missing_packages}, please install these packages \
+via the Visual Studio installer \
+before proceeding with Spack or provide the path to a non standard install with \
+'spack external find --path'"
+ )
+ # wgl/sdk are not required for bootstrapping Spack, but
+ # are required for building anything non trivial
+ # add to user config so they can be used by subsequent Spack ops
+ spack.detection.update_configuration(externals, buildable=False)
+
+
def ensure_core_dependencies() -> None:
"""Ensure the presence of all the core dependencies."""
if sys.platform.lower() == "linux":
ensure_patchelf_in_path_or_raise()
- if not IS_WINDOWS:
- ensure_gpg_in_path_or_raise()
+ elif sys.platform == "win32":
+ ensure_file_in_path_or_raise()
+ ensure_gpg_in_path_or_raise()
ensure_clingo_importable_or_raise()
def all_core_root_specs() -> List[str]:
"""Return a list of all the core root specs that may be used to bootstrap Spack"""
- return [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec()]
+ return [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec(), file_root_spec()]
def bootstrapping_sources(scope: Optional[str] = None):
@@ -587,7 +602,10 @@ def bootstrapping_sources(scope: Optional[str] = None):
current = copy.copy(entry)
metadata_dir = spack.util.path.canonicalize_path(entry["metadata"])
metadata_yaml = os.path.join(metadata_dir, METADATA_YAML_FILENAME)
- with open(metadata_yaml, encoding="utf-8") as stream:
- current.update(spack.util.spack_yaml.load(stream))
- list_of_sources.append(current)
+ try:
+ with open(metadata_yaml, encoding="utf-8") as stream:
+ current.update(spack.util.spack_yaml.load(stream))
+ list_of_sources.append(current)
+ except OSError:
+ pass
return list_of_sources
diff --git a/lib/spack/spack/bootstrap/environment.py b/lib/spack/spack/bootstrap/environment.py
index 1f8fbe8097..39c8aa2fa5 100644
--- a/lib/spack/spack/bootstrap/environment.py
+++ b/lib/spack/spack/bootstrap/environment.py
@@ -3,22 +3,20 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Bootstrap non-core Spack dependencies from an environment."""
-import glob
import hashlib
import os
import pathlib
import sys
-import warnings
-from typing import List
+from typing import Iterable, List
import archspec.cpu
from llnl.util import tty
import spack.environment
+import spack.spec
import spack.tengine
-import spack.util.cpus
-import spack.util.executable
+import spack.util.path
from ._common import _root_spec
from .config import root_path, spec_for_current_python, store_path
@@ -28,6 +26,16 @@ from .core import _add_externals_if_missing
class BootstrapEnvironment(spack.environment.Environment):
"""Environment to install dependencies of Spack for a given interpreter and architecture"""
+ def __init__(self) -> None:
+ if not self.spack_yaml().exists():
+ self._write_spack_yaml_file()
+ super().__init__(self.environment_root())
+
+ # Remove python package roots created before python-venv was introduced
+ for s in self.concrete_roots():
+ if "python" in s.package.extendees and not s.dependencies("python-venv"):
+ self.deconcretize(s)
+
@classmethod
def spack_dev_requirements(cls) -> List[str]:
"""Spack development requirements"""
@@ -59,31 +67,19 @@ class BootstrapEnvironment(spack.environment.Environment):
return cls.environment_root().joinpath("view")
@classmethod
- def pythonpaths(cls) -> List[str]:
- """Paths to be added to sys.path or PYTHONPATH"""
- python_dir_part = f"python{'.'.join(str(x) for x in sys.version_info[:2])}"
- glob_expr = str(cls.view_root().joinpath("**", python_dir_part, "**"))
- result = glob.glob(glob_expr)
- if not result:
- msg = f"Cannot find any Python path in {cls.view_root()}"
- warnings.warn(msg)
- return result
-
- @classmethod
- def bin_dirs(cls) -> List[pathlib.Path]:
+ def bin_dir(cls) -> pathlib.Path:
"""Paths to be added to PATH"""
- return [cls.view_root().joinpath("bin")]
+ return cls.view_root().joinpath("bin")
+
+ def python_dirs(self) -> Iterable[pathlib.Path]:
+ python = next(s for s in self.all_specs_generator() if s.name == "python-venv").package
+ return {self.view_root().joinpath(p) for p in (python.platlib, python.purelib)}
@classmethod
def spack_yaml(cls) -> pathlib.Path:
"""Environment spack.yaml file"""
return cls.environment_root().joinpath("spack.yaml")
- def __init__(self) -> None:
- if not self.spack_yaml().exists():
- self._write_spack_yaml_file()
- super().__init__(self.environment_root())
-
def update_installations(self) -> None:
"""Update the installations of this environment."""
log_enabled = tty.is_debug() or tty.is_verbose()
@@ -100,21 +96,13 @@ class BootstrapEnvironment(spack.environment.Environment):
self.install_all()
self.write(regenerate=True)
- def update_syspath_and_environ(self) -> None:
- """Update ``sys.path`` and the PATH, PYTHONPATH environment variables to point to
- the environment view.
- """
- # Do minimal modifications to sys.path and environment variables. In particular, pay
- # attention to have the smallest PYTHONPATH / sys.path possible, since that may impact
- # the performance of the current interpreter
- sys.path.extend(self.pythonpaths())
- os.environ["PATH"] = os.pathsep.join(
- [str(x) for x in self.bin_dirs()] + os.environ.get("PATH", "").split(os.pathsep)
- )
- os.environ["PYTHONPATH"] = os.pathsep.join(
- os.environ.get("PYTHONPATH", "").split(os.pathsep)
- + [str(x) for x in self.pythonpaths()]
- )
+ def load(self) -> None:
+ """Update PATH and sys.path."""
+ # Make executables available (shouldn't need PYTHONPATH)
+ os.environ["PATH"] = f"{self.bin_dir()}{os.pathsep}{os.environ.get('PATH', '')}"
+
+ # Spack itself imports pytest
+ sys.path.extend(str(p) for p in self.python_dirs())
def _write_spack_yaml_file(self) -> None:
tty.msg(
@@ -146,7 +134,7 @@ def mypy_root_spec() -> str:
def black_root_spec() -> str:
"""Return the root spec used to bootstrap black"""
- return _root_spec("py-black@:23.1.0")
+ return _root_spec("py-black@:24.1.0")
def flake8_root_spec() -> str:
@@ -164,4 +152,4 @@ def ensure_environment_dependencies() -> None:
_add_externals_if_missing()
with BootstrapEnvironment() as env:
env.update_installations()
- env.update_syspath_and_environ()
+ env.load()
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json
new file mode 100644
index 0000000000..f313e4544f
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-aarch64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"usieka7hqtluag2n5avq33dzcx5fywas","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"l5u7o7gwhxg4n7zxbp75x4mvocxy45iy","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"qpn2suueaqg3p2xfcw3ruqfngnv6wfwt","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"5dtluxfskylswcrd7se47q6vowlb4t2r","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"oyppt4jowtz4mghkbbonp5vkup4ocgyo"},{"name":"bison","version":"3.8.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"7q76qbncpm6mducfafctabgeavuvmype","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"usieka7hqtluag2n5avq33dzcx5fywas"},{"name":"diffutils","version":"3.10","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa"},{"name":"gmake","version":"4.4.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf"},{"name":"libiconv","version":"1.17","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2ozelkl3vfy3eppsgocj37domutujqg5"},{"name":"m4","version":"1.4.19","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"kspd6u5yi5436so33e36qnnaz7k55o4s","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"7q76qbncpm6mducfafctabgeavuvmype"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kspd6u5yi5436so33e36qnnaz7k55o4s"},{"name":"cmake","version":"3.29.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"2hsifykculvqj6jqwhr6qhq4avgufc45","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l5u7o7gwhxg4n7zxbp75x4mvocxy45iy"},{"name":"curl","version":"8.7.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["secure_transport"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"h4puzdoh6vqddnhnbdquelff6ccukjpp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"2hsifykculvqj6jqwhr6qhq4avgufc45"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"h4puzdoh6vqddnhnbdquelff6ccukjpp"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf"},{"name":"perl","version":"5.38.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"owpo7sp32vczfk2nahlfzzkhm4od7b2y","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"owpo7sp32vczfk2nahlfzzkhm4od7b2y"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"4xrfasii3yrxkt7rasfshoevsstiuhoa","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm"},{"name":"gdbm","version":"1.23","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t"},{"name":"readline","version":"8.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"pzu53iejjjzqsuxjduvc752t2rx46md4"},{"name":"ncurses","version":"6.5","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"orq5smllpn6ex3qp2qula5uvxmuvatas"},{"name":"python","version":"3.11.9","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"apple-libuuid","hash":"pjmzrksnrtzuxyeeef66hehcoffzb7qq","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"647zzgfka4pilqx4rbosr4efrbcdbk3s","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"qugf72xw7oi4dlrxmchddrdn4v7cle7t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"3c5kdgak36exx3n4rrjrbd4ggporhbxl","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"5bf24m3l7qoj3mlajk7mlk66n5d5f5sx","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"u3f5iif7nopr6xnh4ps6n233mgyzxonv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"sp7ylb5lyleunjkdinknplmansaazm33","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"yumq26wifcmlqyvoysnly3dcplzc7h4l","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z"},{"name":"apple-libuuid","version":"1353.100.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"bundle","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk","module":null,"extra_attributes":{}},"package_hash":"rv7eeukm7m2umg6ulafeco2qz2kvaqpx2bjoita6g27hrs6vfmiq====","hash":"pjmzrksnrtzuxyeeef66hehcoffzb7qq"},{"name":"expat","version":"2.6.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"647zzgfka4pilqx4rbosr4efrbcdbk3s"},{"name":"gettext","version":"0.22.5","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"nyu7k62i347svjpkbtpyjhsw5afrz3xo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bo55ydm3qpkjtuh64uuuyrdxghgmf6lo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"dmnxmihjkv7iu53k5xffbycatl7jmnij","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"3c5kdgak36exx3n4rrjrbd4ggporhbxl"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"oezw2hhb5ejauxkepuvwcjee5dqo2jlf","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"nyu7k62i347svjpkbtpyjhsw5afrz3xo"},{"name":"xz","version":"5.4.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml"},{"name":"tar","version":"1.34","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"4sagfutlgwl35so2sa52kzoi6h2nrhdm","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2ozelkl3vfy3eppsgocj37domutujqg5","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"ttzjdjlimt4nrngxhd5wclhawnmskz4i","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"nrzvy3emno3sqpjnhppe2xfq7okvzyml","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"belg3dt3cvlblwuzu7twitbrpzscocdk","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"dmnxmihjkv7iu53k5xffbycatl7jmnij"},{"name":"pigz","version":"2.8","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ttzjdjlimt4nrngxhd5wclhawnmskz4i"},{"name":"zstd","version":"1.5.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"belg3dt3cvlblwuzu7twitbrpzscocdk"},{"name":"libffi","version":"3.4.6","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5bf24m3l7qoj3mlajk7mlk66n5d5f5sx"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"u3f5iif7nopr6xnh4ps6n233mgyzxonv"},{"name":"openssl","version":"3.3.1","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"zlwt7pdv4hpflspaoq2mielortiyhy63","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"bc6njsov5kfa4vkqlsbg3hzin7zcwpi4","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"sp7ylb5lyleunjkdinknplmansaazm33"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"zlwt7pdv4hpflspaoq2mielortiyhy63"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"q4jkyjbnmakcww365ua75wiemnsta6zf","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"pzu53iejjjzqsuxjduvc752t2rx46md4","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"orq5smllpn6ex3qp2qula5uvxmuvatas","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"yumq26wifcmlqyvoysnly3dcplzc7h4l"},{"name":"python-venv","version":"1.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"xfvnoiytjpkpxuvayzx73junhbjlo76z","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"qpn2suueaqg3p2xfcw3ruqfngnv6wfwt"},{"name":"re2c","version":"3.0","arch":{"platform":"darwin","platform_os":"ventura","target":"aarch64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"62ylhtcnqoldfzoub3pdhhhiyhgrotdc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"5dtluxfskylswcrd7se47q6vowlb4t2r"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json
new file mode 100644
index 0000000000..7251eef516
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-darwin-x86_64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"tcstiesejoijdcxvwpmmghqwxgyvadyi","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"ncmbvgmldvjq2ct7bdb36pa7rorgr6ia","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"46skxysjiafgqvyk2cqj2cithhkloj2g","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"p2betn6fduff6uhcmslks6lwdxdllaqx","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"tpv4lkit3ekpahcziwmpeawdnioucyut","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"yebuzmu45zxhlfnurot7f5fydgv4ujen"},{"name":"bison","version":"3.8.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"7f5bvgqhvzuhog5fjzjhc52boqpo4eg4","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"tcstiesejoijdcxvwpmmghqwxgyvadyi"},{"name":"diffutils","version":"3.10","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak"},{"name":"gmake","version":"4.4.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz"},{"name":"libiconv","version":"1.17","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"mctiikna6qibnfutgekl6h3h747nhl73"},{"name":"m4","version":"1.4.19","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"2ab3ieebereandqjennaq6bobs5ggc4y","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"7f5bvgqhvzuhog5fjzjhc52boqpo4eg4"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2ab3ieebereandqjennaq6bobs5ggc4y"},{"name":"cmake","version":"3.29.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"5midcs5brhx4h6vnh2bryqh7qipzww6p","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ncmbvgmldvjq2ct7bdb36pa7rorgr6ia"},{"name":"curl","version":"8.7.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["secure_transport"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"22mzwts36yiedkziivh5sdgyjogb2it2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"5midcs5brhx4h6vnh2bryqh7qipzww6p"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"22mzwts36yiedkziivh5sdgyjogb2it2"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc"},{"name":"perl","version":"5.38.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"upn52ynxcbgarg2trkmqwm4ppbdkx3zs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"wik3tgroytjrfvy5poap2gairb2nabxp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"upn52ynxcbgarg2trkmqwm4ppbdkx3zs"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"tllsflj5qmdgizkpd2d2vnum6jycfaak","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg"},{"name":"gdbm","version":"1.23","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"wik3tgroytjrfvy5poap2gairb2nabxp"},{"name":"readline","version":"8.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"amnbyrmtafl2pyypogji6gharv46lkrp"},{"name":"ncurses","version":"6.5","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"bfptmetyuv567sjav5haen57waanfxyc"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5"},{"name":"python","version":"3.11.9","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"apple-libuuid","hash":"zdktedsebu7zjozb4wqhr45hfr665tlh","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"ewxodvrjxwjn4gayblrayq4mxp4todqu","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"wik3tgroytjrfvy5poap2gairb2nabxp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"qatrw6nst2iqufrcjszou2zlbri6nphm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"ffu7cslh3j3fi4pnszo6kjfu7optpzzb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"wi4esgdayal4yyw3mcxqueiift2rvs2n","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"us6qb6xd62jhohhzq6uvwrkgtwazxdvf","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"mmdphtu7zomdlsupofpcuur3l2hobahc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"46skxysjiafgqvyk2cqj2cithhkloj2g"},{"name":"apple-libuuid","version":"1353.100.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"bundle","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk","module":null,"extra_attributes":{}},"package_hash":"rv7eeukm7m2umg6ulafeco2qz2kvaqpx2bjoita6g27hrs6vfmiq====","hash":"zdktedsebu7zjozb4wqhr45hfr665tlh"},{"name":"expat","version":"2.6.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ewxodvrjxwjn4gayblrayq4mxp4todqu"},{"name":"gettext","version":"0.22.5","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"mqe3367abnu4eijzq4akvplrxvef62f3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"bfptmetyuv567sjav5haen57waanfxyc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"jm53r4fgccnjp77x6ktjui5moishomnh","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"qatrw6nst2iqufrcjszou2zlbri6nphm"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"gutczpsbpaqctk6gm5rzrxtqdwsi7qxc","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mqe3367abnu4eijzq4akvplrxvef62f3"},{"name":"xz","version":"5.4.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bspvdxfryax3wnxlua26ghowojosrzaa"},{"name":"tar","version":"1.34","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"kvv2ofd7xftv7shuuhvsr5pcln2htiwg","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"mctiikna6qibnfutgekl6h3h747nhl73","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"73zuxkusbtdu7v52fgeiyhwuuaihvkhz","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"bspvdxfryax3wnxlua26ghowojosrzaa","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"54a5z2cqsezl7q7cudyonywh3tcth5m7","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"jm53r4fgccnjp77x6ktjui5moishomnh"},{"name":"pigz","version":"2.8","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"73zuxkusbtdu7v52fgeiyhwuuaihvkhz"},{"name":"zstd","version":"1.5.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"54a5z2cqsezl7q7cudyonywh3tcth5m7"},{"name":"libffi","version":"3.4.6","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ffu7cslh3j3fi4pnszo6kjfu7optpzzb"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wi4esgdayal4yyw3mcxqueiift2rvs2n"},{"name":"openssl","version":"3.3.1","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"rzhpcobyanwb5cncuh7o7zr23zbo3vr2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"5dub5yhb4fwo2o6iuos2ph5t5hg3yfwb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"us6qb6xd62jhohhzq6uvwrkgtwazxdvf"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"rzhpcobyanwb5cncuh7o7zr23zbo3vr2"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"amnbyrmtafl2pyypogji6gharv46lkrp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"xmqusd2jqtdty6qzkksuxmi4yi6jvdi5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mmdphtu7zomdlsupofpcuur3l2hobahc"},{"name":"python-venv","version":"1.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"46skxysjiafgqvyk2cqj2cithhkloj2g","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"p2betn6fduff6uhcmslks6lwdxdllaqx"},{"name":"re2c","version":"3.0","arch":{"platform":"darwin","platform_os":"sonoma","target":"x86_64"},"compiler":{"name":"apple-clang","version":"15.0.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"hmuuzsiltoh7g7kw4fjojz7ogxglkbwz","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"tpv4lkit3ekpahcziwmpeawdnioucyut"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json b/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json
new file mode 100644
index 0000000000..ba661aa4f8
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-freebsd-amd64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":false,"optimized":false,"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"3wdklrcdn74jrtsre32c2fw7rugodnhp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"bwpbzabluu6b4cifqacnggfj325hhygp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"elm263xl5rvuph7tksslsoxtr5ldsckf","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"g6rvrl5tghnxmldvsrjpye46y7nfa2it","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"d73jzr7ocsvpbwpbdfit6myiwe5soyd4"},{"name":"bison","version":"3.8.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"3bfqnppsvbrfgxfd2xhjvcwtz5xulzdh","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"3wdklrcdn74jrtsre32c2fw7rugodnhp"},{"name":"diffutils","version":"3.10","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"2jg7xlirln67iqw2owirghpez2vfhotd"},{"name":"gmake","version":"4.4.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"rpzjfobv7qh3wevti34nlbd2emtw5mnyszqmkyiq5jiq33xm7qzq====","hash":"wydxawduinvosugi5pwkm7dbsxqltryg"},{"name":"libiconv","version":"1.17","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"w5p56ykqczhy7l6h435qvjheivk36qy4"},{"name":"m4","version":"1.4.19","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"byc3ga7ez2d7jmzyao32x266cgubesqq","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"3bfqnppsvbrfgxfd2xhjvcwtz5xulzdh"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"byc3ga7ez2d7jmzyao32x266cgubesqq"},{"name":"cmake","version":"3.29.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"3eurdl4v6krpmgbfvqaivosebv5xyiis","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bwpbzabluu6b4cifqacnggfj325hhygp"},{"name":"curl","version":"8.7.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"ffcpmjsfc6rao2hylcfws5zedgekf5vz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3eurdl4v6krpmgbfvqaivosebv5xyiis"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"ffcpmjsfc6rao2hylcfws5zedgekf5vz"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup"},{"name":"openssl","version":"3.3.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"orkemgy3ncctka6e5wuhjmvv4hqf57dk","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","hash":"orkemgy3ncctka6e5wuhjmvv4hqf57dk"},{"name":"perl","version":"5.38.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"jk6dyv372wyksasduryfojgn55tugtie","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"mhn6tszi6hsltchugtzrcssvynz57csg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"pdpqvtmsot4linjoftvfkds3q3kqk7xr"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"jk6dyv372wyksasduryfojgn55tugtie"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"2jg7xlirln67iqw2owirghpez2vfhotd","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"uozy6txh4p3kq44rycstcadu7m5l36eh"},{"name":"gdbm","version":"1.23","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"mhn6tszi6hsltchugtzrcssvynz57csg"},{"name":"readline","version":"8.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"cdsre6iv6m4if3gx7k27ynraamwducqj"},{"name":"ncurses","version":"6.5","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6"},{"name":"python","version":"3.11.9","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"cjcphxa5agystc6egs7x2zfv6s7kt52p","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gdbm","hash":"mhn6tszi6hsltchugtzrcssvynz57csg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"ch2bcvngtps62qfxns4pzbleye7ic57c","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"kkc7oupodtd67dlhjugfuzw3g7tvcuno","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"7g3tlrp5kiroaak364nmsy2syb4zmvbs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"qgog7nkb6ubobruuhcvyv5vbraferneg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"u3rkbgitzhddldu75y6od4qcjad7h2a3","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a"},{"name":"expat","version":"2.6.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"cjcphxa5agystc6egs7x2zfv6s7kt52p"},{"name":"gettext","version":"0.22.5","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"uu3uyudar6cz5tmenmmk376i54alwmwl","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"6dhzcjbmiru3plbe6iaqpt63ivhsr73u","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"3on36tpbw5355v3czpeyn2vokzbttigm","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"ch2bcvngtps62qfxns4pzbleye7ic57c"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"uu3uyudar6cz5tmenmmk376i54alwmwl"},{"name":"xz","version":"5.4.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv"},{"name":"tar","version":"1.34","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"uozy6txh4p3kq44rycstcadu7m5l36eh","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"w5p56ykqczhy7l6h435qvjheivk36qy4","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"n6urcuk2bvv6q32udka2ldaf3ap345a4","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"umkf2v3ieee4orna3pe3mx7rhwzcx7dv","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"aejhse4tyvwvgywcz26ai4l4zxe4jvg2","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"3on36tpbw5355v3czpeyn2vokzbttigm"},{"name":"pigz","version":"2.8","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"n6urcuk2bvv6q32udka2ldaf3ap345a4"},{"name":"zstd","version":"1.5.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"aejhse4tyvwvgywcz26ai4l4zxe4jvg2"},{"name":"libffi","version":"3.4.6","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"kkc7oupodtd67dlhjugfuzw3g7tvcuno"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"lpes7bwf6khi6o2fswt6rex4o6jo5jipwzh4iq4hdfgnqp6wqxwq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"cdsre6iv6m4if3gx7k27ynraamwducqj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"7ztxp7zriik3rwsye5u7f3hrmykk6yj6","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"qgog7nkb6ubobruuhcvyv5vbraferneg"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"xixt5k4vsilk3mfkwnjilvd7zn7poeup","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"u3rkbgitzhddldu75y6od4qcjad7h2a3"},{"name":"python-venv","version":"1.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"7lm43ao2uclf2zc74fyuiy43v4gtzk7a","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"elm263xl5rvuph7tksslsoxtr5ldsckf"},{"name":"re2c","version":"3.0","arch":{"platform":"freebsd","platform_os":"freebsd14.1","target":"amd64"},"compiler":{"name":"clang","version":"18.1.5"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gmake","hash":"wydxawduinvosugi5pwkm7dbsxqltryg","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"g6rvrl5tghnxmldvsrjpye46y7nfa2it"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json
new file mode 100644
index 0000000000..d0692a8196
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-aarch64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"hnyddubugwyhntjpc5cflgtyyxesplfc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"ofd6tvbbzgk2oga4qlrbfnisfiyhkibe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"mgeapxgv3p333s676cdztm2khprm74c2","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"qup6txvaopzzxrih4wyskfbgsfrbw47g","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"ab6idsf3epl2usyp5beguihyxdya5y7y","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ruwcurd3t7tlujwpawnxmize6uyzi52g"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"msmyb5twiltq3za5olk25etbbtmmxr2p","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"hnyddubugwyhntjpc5cflgtyyxesplfc"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp"},{"name":"gcc-runtime","version":"11.4.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe"},{"name":"glibc","version":"2.34","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"4z35ntbdhytzlhaviffrorrqxvspd6k6jf3pqj7gbday4c2hld5q====","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"bqrwa4grh7j4dbhmao2gwq5li7otidvp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"msmyb5twiltq3za5olk25etbbtmmxr2p"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bqrwa4grh7j4dbhmao2gwq5li7otidvp"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"nevz7fogpskla4ygnbaa5dmigdk7ivtm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ofd6tvbbzgk2oga4qlrbfnisfiyhkibe"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"4pc2aydqr6xvckmsqpscnbpbvynb7akb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"lrcxk5wcodfzti2eembel774vg2mqpdr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"nevz7fogpskla4ygnbaa5dmigdk7ivtm"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"4pc2aydqr6xvckmsqpscnbpbvynb7akb"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"ldkgus2vincr7rsth3icgpbud5dd3fvr","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"lrcxk5wcodfzti2eembel774vg2mqpdr"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"ldkgus2vincr7rsth3icgpbud5dd3fvr"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"m4lrsz6xzcylkgacr64jour6kiyqk6mf","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"ib2pxjrvkjirkmyostemesulmlapdmdz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3lfg2qhin325sous4tomgjbrjezdokfd"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"m4lrsz6xzcylkgacr64jour6kiyqk6mf"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"f7tfxfx22v2xl6egzdd5pi2xiqhvh4rp","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ib2pxjrvkjirkmyostemesulmlapdmdz"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"xumzexii6opul35g6g67ohj4boco35hp"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"jrsnxzjej3vxqehewuelz4nwvqgyrv2l","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"ib2pxjrvkjirkmyostemesulmlapdmdz","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"sityderlvnhfgmj6qmg23hgjkt2mvgn7","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"6ztlwxyvhquaekh3ggnax4gxjcm7z5xs","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"ff6j37dfruzkftuo2vpxxuvgsguuircg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"lrcxk5wcodfzti2eembel774vg2mqpdr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"ssuidmgnu4g4rxns4yhsc2i35wm6w4nm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"u7tzv4v6hjmqwraas2fg4g4bggsg54hn","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"mgeapxgv3p333s676cdztm2khprm74c2"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"2asjwudpsolmnvtvy2klrx4423zxfb46","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"jrsnxzjej3vxqehewuelz4nwvqgyrv2l"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"5g3gadwxtaklyslka2absv2ey5nvu7qp","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"2asjwudpsolmnvtvy2klrx4423zxfb46"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5g3gadwxtaklyslka2absv2ey5nvu7qp"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"qok6mvtsef3v5oziizc5ypldokgfoufi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"xc5iptcuczyojtt6jjg7x7h5ryipu7wi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"vwkyj52hs7kfnk6ui4gtaav55zxlotm3","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"sityderlvnhfgmj6qmg23hgjkt2mvgn7"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"qok6mvtsef3v5oziizc5ypldokgfoufi"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"nfcexfnktluw4pmijv4fy5tuv5mv3k4j","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"2pbt2grycmnobdpzrx66rzvu22kz5kqp","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"l5sst3uni4hkaetfv5ep2knougpbpsvz","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"etawlzc7h4tcznfr2fkinr3lreskf7xc","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"xbn4zwa6afke6acunbztswy72j5khy5v","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"vwkyj52hs7kfnk6ui4gtaav55zxlotm3"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l5sst3uni4hkaetfv5ep2knougpbpsvz"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xbn4zwa6afke6acunbztswy72j5khy5v"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"6ztlwxyvhquaekh3ggnax4gxjcm7z5xs"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"3lfg2qhin325sous4tomgjbrjezdokfd","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ff6j37dfruzkftuo2vpxxuvgsguuircg"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"xumzexii6opul35g6g67ohj4boco35hp","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"rtfnw3rbazozyqi7jmp6ffk6dg3krvdb","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ssuidmgnu4g4rxns4yhsc2i35wm6w4nm"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"thrso55rw6rilvdzm4tnqiy34yqvg25p","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"wkhpj3qzsi4h7fmjhfngnz3upqyain5p","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"u7tzv4v6hjmqwraas2fg4g4bggsg54hn"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"mgeapxgv3p333s676cdztm2khprm74c2","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"qup6txvaopzzxrih4wyskfbgsfrbw47g"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel9","target":"aarch64"},"compiler":{"name":"gcc","version":"11.4.1"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"ztmwas7bacybmqzed5crdvdvrtgr7cwe","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"apvfuyfvngdhqsi5i5omavjav4n6hybu","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"2dj2qwyj5k52za5grdc2ap44jkyppct7","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ab6idsf3epl2usyp5beguihyxdya5y7y"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json
new file mode 100644
index 0000000000..9e170a92bb
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-ppc64le.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"zlf5po3jq7ewnyqvmijdqvezidjkewwc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"fhs7nnfo4fpelnw47cnlq2ta3gonoybi","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"rscwjgp3i7lrkw425i554hugfqtbpmcz","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"g36e7tmo7u3lrs5n3kn26xtdzsgnsjmf","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"e5azl4x62b2ttfez7tgh2amsaufw5kxf"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"k5nvhktsfld5k75nydtshmgqxt6vnd7z","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"zlf5po3jq7ewnyqvmijdqvezidjkewwc"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc"},{"name":"gcc-runtime","version":"8.5.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw"},{"name":"glibc","version":"2.28","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"riktbfk2yybad7tgbvdkntk5c5msjcm5pk3x7naszgbvfm57h4rq====","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"vlaspdtbomyzueuolydbhrmouikifc35"},{"name":"gnuconfig","version":"2022-09-17","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2gikx4ks5wrf2cct3kt2ras4snqcrgwicovqmrn7sfac5g55qzdq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"psjili5a534fgwzmso7e525glphp4cig"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"wcibv54gmuzs7r7ixxzou7unrzn7pa3w","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"k5nvhktsfld5k75nydtshmgqxt6vnd7z"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wcibv54gmuzs7r7ixxzou7unrzn7pa3w"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"vtskoiw5dhhv3kwxv27lc4cdxkdcxvwb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"fhs7nnfo4fpelnw47cnlq2ta3gonoybi"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"35pubyn2mdls6gppiymahqxlmjib5bzc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"vtskoiw5dhhv3kwxv27lc4cdxkdcxvwb"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"35pubyn2mdls6gppiymahqxlmjib5bzc"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"k6us4tbfauthyaqlndg2335pdgy4lu2i","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"k6us4tbfauthyaqlndg2335pdgy4lu2i"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"h3eno322vommoajsv332gkscxlcublqi","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"h3eno322vommoajsv332gkscxlcublqi"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"b7h3d4u5334hxyhyrpm3lo4goxwrksyc","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"nm6tjs4hxbxgbxgrgwk5m6p3cv5f2xp6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"nuzlj7idsicuuwlbhl2mtbgzx37ioumc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"lwsm4syj2fwaqauv765cbio3xmtecfh6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"7dro2wwskvjqmoknz4qqefn6dcypxvo3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"plkpy2gwretmhc2pncx4jxr3snyvrtl2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"otlr7jk6mle7jbxemw2jgouv6whcmbro","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"bgz5kp2p7vv4t3efvnn5ebsu3zvsa7xu","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"4zecuq35tj72zffmsonlxkrefs6nlind","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"kdvtk2gxo5qzxdqyotv3tja77tmq4vut","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"nm6tjs4hxbxgbxgrgwk5m6p3cv5f2xp6"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"y5jvp4qgm7obwftbvdkwpgc3jrabrwap","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"kdvtk2gxo5qzxdqyotv3tja77tmq4vut"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"y5jvp4qgm7obwftbvdkwpgc3jrabrwap"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"xubldvubx7oe3oux3uaogjydl2ejnw6t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"t3htmu6hhog5z2ysti2a7gzrcr7psjoc","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"7c7264uajtdc3onu5rxa5yf5uxtdzkox","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"lwsm4syj2fwaqauv765cbio3xmtecfh6"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"xubldvubx7oe3oux3uaogjydl2ejnw6t"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"7zi73iaio2aqbdf5kxkbq6so3ggc5nvo","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"psjili5a534fgwzmso7e525glphp4cig","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"ouuobfwhka4oby6ajleqfj74jewljbn3","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"wip3erpa25ivm7n6ovmcmz32dq7kcghj","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"iozznbkczpkeh2l73kzyq4s3rq2vfd6p","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"7c7264uajtdc3onu5rxa5yf5uxtdzkox"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ouuobfwhka4oby6ajleqfj74jewljbn3"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"iozznbkczpkeh2l73kzyq4s3rq2vfd6p"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7dro2wwskvjqmoknz4qqefn6dcypxvo3"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"jj4e2lsaidvevufbtp2gsgzh7yt7yqn2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"plkpy2gwretmhc2pncx4jxr3snyvrtl2"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"fqda7pllzy6k5eexjkyk2vawuxjvboxv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"5dxeptlo7lvlexgkmufa4ayy6v7eaiix","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"bgz5kp2p7vv4t3efvnn5ebsu3zvsa7xu"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gnuconfig","hash":"4ubm556zacirs3jeepcg6jukvp4qw7lb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"c6nn3cov3ksz6hgqu4cjq3272anhkvke","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"4zecuq35tj72zffmsonlxkrefs6nlind"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"kaunhs7qjatcib7dxtdumk6ti5rtkwhi","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"rscwjgp3i7lrkw425i554hugfqtbpmcz"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel8","target":"ppc64le"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"wdaw23psnntxjme66ftiuc6k2oti2rsw","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"73pbegdbzx3jsjyz2b4jcb3cofiebkbh","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"vlaspdtbomyzueuolydbhrmouikifc35","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"g36e7tmo7u3lrs5n3kn26xtdzsgnsjmf"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json
new file mode 100644
index 0000000000..a1c94c3b93
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-linux-x86_64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"make","ipo":true,"optimized":false,"python":true,"static_libstdcpp":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"677q63cwqryynuiid4piwkdfx2y4sujizh35x5vv5pokofsidsoa====","dependencies":[{"name":"bison","hash":"ddgl3onrbfkboqpjskzdaiwpomvppwgt","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"cmake","hash":"l2qxvjavbdyl4gh6it743qrknlgpaeu6","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"wt5iofmuq447aul5r6ydidmhv2rtepfg","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"ncrrgeaeg65l63s4n2ele3gssfbelqei","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"nf64noutpg25ptisllb435k3u3qgwgim"},{"name":"bison","version":"3.8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","color":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"d4j62fwvuxqbiez32ltjnhu47ac425wjebsy6fhoptv6saxazcxq====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"m4","hash":"hckrrjzj7upowvamvgbqux6s4hxfirbc","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"ddgl3onrbfkboqpjskzdaiwpomvppwgt"},{"name":"diffutils","version":"3.10","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kbmzdy7mgklc24qx55cvx7kq7hceby2yav4fnf64gfdo7epdghwa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}}],"hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe"},{"name":"gcc-runtime","version":"8.5.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"se7e7lu5ega7wrxwwnhpwjp2fsl4u277hopdz2lw7bwhatp22soq====","dependencies":[{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv"},{"name":"glibc","version":"2.28","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"external":{"path":"/usr","module":null,"extra_attributes":{}},"package_hash":"riktbfk2yybad7tgbvdkntk5c5msjcm5pk3x7naszgbvfm57h4rq====","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn"},{"name":"gmake","version":"4.4.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","guile":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ghstvqlc3r7kgiikwx24xhcxdxcqdk5viinrzgm2mssqigfonika====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2"},{"name":"libiconv","version":"1.17","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"hx2hgtfxuafavkaf2rp3hjq7ttx4zuoyareduhx25lb4a5b64sua====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"cvbsirp3vg7iuzzhddpebygekjj445ek"},{"name":"m4","version":"1.4.19","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573","bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89"],"sigsegv":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89","9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573"],"package_hash":"npb7a53yz7wqx4nvnasxwgzxaoiks6sdjz2eugrgkjxs4ml24xea====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libsigsegv","hash":"a7utmadxdq5pwbyzzsqufc5z4c5dzil3","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"hckrrjzj7upowvamvgbqux6s4hxfirbc"},{"name":"libsigsegv","version":"2.14","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"ypp3sciaprcyojozq2c5gqugtewmr5ytjbfpycyhu6wivtky7rja====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"a7utmadxdq5pwbyzzsqufc5z4c5dzil3"},{"name":"cmake","version":"3.29.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":true,"ownlibs":true,"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["dbc3892939348c71f35973dd30e74c4a84bc7a2446c6930523c9723b88a597d1"],"package_hash":"pbk2rknzfgc2vpxstkdbcoxv5xboiwe72owtgemfxhbuer6pcbbq====","dependencies":[{"name":"curl","hash":"tx4uqyb24um2fbkztpv45vte25ddwirm","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"l2qxvjavbdyl4gh6it743qrknlgpaeu6"},{"name":"curl","version":"8.7.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":["shared","static"],"libssh":false,"libssh2":false,"nghttp2":true,"tls":["openssl"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"nghttp2","hash":"izrdxl4retiy57ugtdmppsol5xlhiapb","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"tx4uqyb24um2fbkztpv45vte25ddwirm"},{"name":"nghttp2","version":"1.62.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5b4v4lpftbuslseu6whtdgpswnmbjd7hjj564rxnkfgdnylfro7q====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"izrdxl4retiy57ugtdmppsol5xlhiapb"},{"name":"pkgconf","version":"2.2.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"gl6tpyarjlclzsal6wa4dtc7cdzprq36nbibalai4a6wgzblrseq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx"},{"name":"openssl","version":"3.3.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","certs":"mozilla","docs":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"aqjwgxmqs2b7jublxelhue7n75puejodvhn2cbnpjjmq7xttex7a====","dependencies":[{"name":"ca-certificates-mozilla","hash":"4diyktn6tmoj6iurlz7gieu3ub5q5trh","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr"},{"name":"ca-certificates-mozilla","version":"2023-05-30","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"63npvwqwo2x7i6emvnklh4mhcn45gx2qzveorybh5h2inwr55sea====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}}],"hash":"4diyktn6tmoj6iurlz7gieu3ub5q5trh"},{"name":"perl","version":"5.38.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["714e4d1c7496e6b23834e7c88da3d69139418860fbc488fe82fd226b450a4be7"],"package_hash":"i5drmbzpsmo7jrmibmrmahee6y5rtiuo37vmdjda2kfgvfgy6ziq====","dependencies":[{"name":"berkeley-db","hash":"2zsffebnfhcjdsjgn6x7ydsrwf7yfxjq","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn"},{"name":"berkeley-db","version":"18.1.40","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cxx":true,"docs":false,"patches":["26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3","b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522"],"stl":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522","26090f418891757af46ac3b89a9f43d6eb5989f7a3dce3d1cfc99fba547203b3"],"package_hash":"h57ydfn33zevvzctzzioiiwjwe362izbbwncb6a26dfeno4y7tda====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2zsffebnfhcjdsjgn6x7ydsrwf7yfxjq"},{"name":"bzip2","version":"1.0.8","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","debug":false,"pic":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wa33h4h2abj7tx5cndixz7bdwu5fspdaf2kjlqsinnearayw6fra====","dependencies":[{"name":"diffutils","hash":"7r6i2y3dxeqpflb54mpqnn5otoq2ivbe","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"ypik55ez75ipc2357brsnfr6ns4zibrk"},{"name":"gdbm","version":"1.23","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"liepxl6phlcxbgfmibxafhewtihlgaa4x3hko37ckqlafhxkrgdq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t"},{"name":"readline","version":"8.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7"],"package_hash":"oww6dmr7xqgg6j7iiluonxbcl4irqnnrip4vfkjdwujncwnuhwuq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"knome32natgdwoyv6rlbqb6w5um5jzqa"},{"name":"ncurses","version":"6.5","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"abi":"none","build_system":"autotools","patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"symlinks":false,"termlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["7a351bc4953a4ab70dabdbea31c8db0c03d40ce505335f3b6687180dde24c535"],"package_hash":"rlqzqxoau3wwzu62x6qxlf4flon6b4n3p4zesnc6t2oyybrvnkwq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"qdrdnglnycx5usajs354nmxy763r5jd6"},{"name":"zlib-ng","version":"2.2.1","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","compat":true,"new_strategies":true,"opt":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jvdtkihgu4ykt4dwkunpk3ql7tcnl4wtxmhbd3vfl5o7hemoi4gq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4rjyysplubcoslfbmi23u2voobghr4jy"},{"name":"python","version":"3.11.9","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"crypt":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56","f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4"],"pic":true,"pyexpat":true,"pythoncmd":true,"readline":true,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["f2fd060afc4b4618fe8104c4c5d771f36dc55b1db5a4623785a4ea707ec72fb4","b0615b2fc96bb0cf7f180b107183b194b83b34c7614dcd6121e4a76bbf168155","13fa8bfa3e852cbf2e7b02a0313009df484bb39f55a50ada00e1a5599e956ac9","ebdca648c9c1d25f586d7e2a495b62e6d91973b55264a13d89eda1beff72ef56"],"package_hash":"t65rlqtklu5oqlcnkc62ld3dpxgvevfm2h5hfgp36ptz2uefx2sq====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"expat","hash":"hzopg2h3vpjkpb4gqcygzvvfb4wjquu3","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"gdbm","hash":"tduhe6zd7urqpt7i7rej5vzoaxa4ze3t","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gettext","hash":"yvb5vlha6yr2lwfkzkqz6mtzzz7wdiyv","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libffi","hash":"wmoq7qgzlbf7ebxnji4nro6gn7g25dt5","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"libxcrypt","hash":"2yxrh2umuxhtymwd2gxlkgogwxjy2epx","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"openssl","hash":"3ox4v5cseir7gcx7s6ygygoktdej4bfr","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"sqlite","hash":"kcdye5hn4jwz3a7u4ck4konz7747bn4w","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"util-linux-uuid","hash":"ws5pwa6qz45lahc75zo27ovgldtlmnpm","parameters":{"deptypes":["build","link"],"virtuals":["uuid"]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp"},{"name":"expat","version":"2.6.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libbsd":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zeyjv42sx5l6mjqie4smh2uxzfhsxvsnw7udjwg2sl5bcnc66req====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libbsd","hash":"ut2bfnjpiaw35lvt6efz5y62fjpah6ow","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"hzopg2h3vpjkpb4gqcygzvvfb4wjquu3"},{"name":"libbsd","version":"0.12.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"debyg3en7sgggswkdhcyd6lbp7arawzmyujthyyuaiad5jqd5msa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libmd","hash":"4yumgzpllawj3dfsg6ezog4lvblkc2cl","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ut2bfnjpiaw35lvt6efz5y62fjpah6ow"},{"name":"libmd","version":"1.0.4","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zs2e7fqr4dzthpj5fascqvfn7xcahf7dtc5bzdwfv6vqkzi7oncq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"4yumgzpllawj3dfsg6ezog4lvblkc2cl"},{"name":"gettext","version":"0.22.5","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","bzip2":true,"curses":true,"git":true,"libunistring":false,"libxml2":true,"pic":true,"shared":true,"tar":true,"xz":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"5bhbkykxueimk2h42d6gb7dumldhutohav3x2r23rsalexcgy42a====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"libxml2","hash":"dvhrxtvvpg2m4jyoex7qtn26zjrxmikg","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ncurses","hash":"qdrdnglnycx5usajs354nmxy763r5jd6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"tar","hash":"eygw75slf4egmw4pwyshieddjurkp2ph","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link","run"],"virtuals":[]}}],"hash":"yvb5vlha6yr2lwfkzkqz6mtzzz7wdiyv"},{"name":"libxml2","version":"2.10.3","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","pic":true,"python":false,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"squqo2aayigwxdusu3q3syojwit5gqdh6q4un576652hy4gytxcq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"dvhrxtvvpg2m4jyoex7qtn26zjrxmikg"},{"name":"xz","version":"5.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","libs":["shared","static"],"pic":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"zt5vu2vph2v2qjwgdbe7btgcz7axpyalorcsqiuxhrg5grwgrrvq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6"},{"name":"tar","version":"1.34","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","zip":"pigz","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"cpgzon3rxegbd3xdnmhrmxvzaq5hyvpzz4y6egmhghhydvefupuq====","dependencies":[{"name":"bzip2","hash":"ypik55ez75ipc2357brsnfr6ns4zibrk","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"libiconv","hash":"cvbsirp3vg7iuzzhddpebygekjj445ek","parameters":{"deptypes":["build","link"],"virtuals":["iconv"]}},{"name":"pigz","hash":"sh3u7ctgnbf567fhrrivyx3h5rgir4sy","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"xz","hash":"gwc3azaaupc5dbpodqiab2dssvmk5no6","parameters":{"deptypes":["run"],"virtuals":[]}},{"name":"zstd","hash":"zpktnpdo632qhcmiqavbu757gc3ze6te","parameters":{"deptypes":["run"],"virtuals":[]}}],"hash":"eygw75slf4egmw4pwyshieddjurkp2ph"},{"name":"pigz","version":"2.8","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"4w67lflje4giekjg4ie2vpyuiunjcumo6geofykvon3hodllp42q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"sh3u7ctgnbf567fhrrivyx3h5rgir4sy"},{"name":"zstd","version":"1.5.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"makefile","compression":["none"],"libs":["shared","static"],"programs":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"uvmrov4c6unft6o4yd3jk3uqvweua3uhwdli4sw7h5wvklaf5t3q====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"zpktnpdo632qhcmiqavbu757gc3ze6te"},{"name":"libffi","version":"3.4.6","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"umhsnvoj5ooa3glffnkk2hp3txmrsjvqbpfq2hbk4mhcvhza7gaa====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"wmoq7qgzlbf7ebxnji4nro6gn7g25dt5"},{"name":"libxcrypt","version":"4.4.35","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","obsolete_api":false,"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4885da3afc027999d7cc3c231de7fc6f3c8b119847536e0fc106bc846c617b9b"],"package_hash":"dam6cqot2l4nfh6nk3jidk7u2pr2p534tw7446ejqwttqitr4zea====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"perl","hash":"ewzhcgygpqpqoayw2fgcgart76wet4jn","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"2yxrh2umuxhtymwd2gxlkgogwxjy2epx"},{"name":"sqlite","version":"3.43.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","column_metadata":true,"dynamic_extensions":true,"fts":true,"functions":false,"rtree":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"3isun23rg3ucob7vs355eq7r5eyee4f2xperdje7xoxv5wayrqzq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"readline","hash":"knome32natgdwoyv6rlbqb6w5um5jzqa","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib-ng","hash":"4rjyysplubcoslfbmi23u2voobghr4jy","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"kcdye5hn4jwz3a7u4ck4konz7747bn4w"},{"name":"util-linux-uuid","version":"2.40.2","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"wnzs7tzbnlmwedntxawri35345ejg3cj2tj7jmpsvauet5hfi5yq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"pkgconf","hash":"bsrcmcbzidzseycq7emkkxo3t4ywt2tx","parameters":{"deptypes":["build"],"virtuals":["pkgconfig"]}}],"hash":"ws5pwa6qz45lahc75zo27ovgldtlmnpm"},{"name":"python-venv","version":"1.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"python","hash":"ipb4su3jaocbbxxn7ronvotabz4dkbgp","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"wt5iofmuq447aul5r6ydidmhv2rtepfg"},{"name":"re2c","version":"3.0","arch":{"platform":"linux","platform_os":"rhel8","target":"x86_64"},"compiler":{"name":"gcc","version":"8.5.0"},"namespace":"builtin","parameters":{"build_system":"autotools","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kuhq5ne7cdx2pca57zwnn57fezjovywffswkkryt4usm4zekw3yq====","dependencies":[{"name":"gcc-runtime","hash":"6kj4wwnm3lhukjkf4edmrdyeiluqnywv","parameters":{"deptypes":["link"],"virtuals":[]}},{"name":"glibc","hash":"sh4kegrdwgfqa2tlalzlhjfvosro32nn","parameters":{"deptypes":["link"],"virtuals":["libc"]}},{"name":"gmake","hash":"6vcsgmkhzd3xp5wce63hspfay6ivfvf2","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"ncrrgeaeg65l63s4n2ele3gssfbelqei"}]}}
diff --git a/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json b/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json
new file mode 100644
index 0000000000..f95ffefd1c
--- /dev/null
+++ b/lib/spack/spack/bootstrap/prototypes/clingo-windows-x86_64.json
@@ -0,0 +1 @@
+{"spec":{"_meta":{"version":4},"nodes":[{"name":"clingo-bootstrap","version":"spack","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","docs":false,"generator":"ninja","ipo":true,"optimized":false,"patches":["311bd2ae3f2f5274d1d36a2d65f887dfdf4c309a3c6bb29a53bbafb82b42ba7a","4ccfd173d439ed1e23eff42d5a01a8fbb21341c632d86b5691242dc270dbf065","c5c4db292a920ded6eecfbb6749d88ce9c4f179500aee6aee3a417b93c7c5c7a"],"python":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["4ccfd173d439ed1e23eff42d5a01a8fbb21341c632d86b5691242dc270dbf065","311bd2ae3f2f5274d1d36a2d65f887dfdf4c309a3c6bb29a53bbafb82b42ba7a","c5c4db292a920ded6eecfbb6749d88ce9c4f179500aee6aee3a417b93c7c5c7a"],"package_hash":"hkhwttazqtgz7nw7e6yzka5nc7o6akrqe23kb3gkdl37dcmwjxkq====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build","link","run"],"virtuals":[]}},{"name":"python-venv","hash":"x6lyli3psq6zk3644k2wugm576lci33r","parameters":{"deptypes":["build","run"],"virtuals":[]}},{"name":"re2c","hash":"7bxfiqnxbqtqsyb2un5c7gqyeqeovmuk","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"winbison","hash":"xvhc7don5aszzxvlizjiau2pbs4ar2a6","parameters":{"deptypes":["build","link"],"virtuals":[]}}],"hash":"wfpfomrvcbtfjrjxjc2f3fi3nj22cyat"},{"name":"cmake","version":"3.29.6","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","build_type":"Release","doc":false,"ncurses":false,"ownlibs":true,"patches":["d041289e3e9483cbdbbac46705a1fb01a7c40a8fc13e291229fb4fa2b071369b"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["d041289e3e9483cbdbbac46705a1fb01a7c40a8fc13e291229fb4fa2b071369b"],"package_hash":"6eevq4j4p722uva3cej3xbkvh57fv7ahuqg4pheefouecqh5rnxa====","dependencies":[{"name":"curl","hash":"jt3nq766b6qphqfhezutxbsls4r5ecf5","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"zlib","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"4ezjoethijaqxue2xt3nal4txe767xns"},{"name":"curl","version":"8.7.1","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"nmake","gssapi":false,"ldap":false,"libidn2":false,"librtmp":false,"libs":"shared","libssh":false,"libssh2":false,"nghttp2":false,"tls":["sspi"],"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"kcgsfmigaqmusztsy67k2gfkizipob2uj5o5yub2i4onsxph454q====","dependencies":[{"name":"perl","hash":"pkljs7xtxfgvkcbczmygiubpdczoqrlb","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"zlib","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5","parameters":{"deptypes":["build","link"],"virtuals":["zlib-api"]}}],"hash":"jt3nq766b6qphqfhezutxbsls4r5ecf5"},{"name":"perl","version":"5.38.2","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","cpanm":true,"opcode":true,"open":true,"shared":true,"threads":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"xx43demwtox532nxdz7gqwrlx2g5ksgxfv62c7h4zqfpmclnrruq====","hash":"pkljs7xtxfgvkcbczmygiubpdczoqrlb"},{"name":"zlib","version":"1.3.1","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","optimize":true,"pic":true,"shared":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"2jkvm4tfyhgosw533mwogyfqz2z32hvk4h5leguukrofpebi5xgq====","hash":"xfzaydeo4udjmwno4hi5mehuje43mrp5"},{"name":"ninja","version":"1.12.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","re2c":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"jcf35uxhgv42a53liynorg4clnpbgbirydp5s3fjeobf7ur2obbq====","dependencies":[{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6"},{"name":"python","version":"3.11.9","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","bz2":true,"ctypes":true,"dbm":true,"debug":false,"libxml2":true,"lzma":true,"nis":false,"optimizations":false,"patches":["01b5df08776d2c3ffeb75da4ccff144cd554b63fcf9962f27c6ecb5fca06a33d","7abb961432aa530349755d639c2902a342f3b5744d11103901e0acf88fae533e","bccfd87e518d2ebc1dafe5d009b9071c046fe8400d52d2f0283bda6904c4dbf1","fc5b6c586b1b654ac2ed00ba6417b1eb526bd24a0dc28074ce14ff56f6057f7c"],"pic":true,"pyexpat":true,"pythoncmd":false,"readline":false,"shared":true,"sqlite3":true,"ssl":true,"tkinter":false,"uuid":true,"zlib":true,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"patches":["01b5df08776d2c3ffeb75da4ccff144cd554b63fcf9962f27c6ecb5fca06a33d","fc5b6c586b1b654ac2ed00ba6417b1eb526bd24a0dc28074ce14ff56f6057f7c","bccfd87e518d2ebc1dafe5d009b9071c046fe8400d52d2f0283bda6904c4dbf1","7abb961432aa530349755d639c2902a342f3b5744d11103901e0acf88fae533e"],"package_hash":"u4pa2ashu6det7izfzs7hl7fhelecogvtit6mb3nzsn6gvzpnnoa====","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7"},{"name":"python-venv","version":"1.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"generic","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"bvjgntlwbvi343x5ctophqqvq6nbx2h4ggbxnjrvnjb3jneitahq====","dependencies":[{"name":"python","hash":"6aoldahfjkgxhhqij3254wekxgkw76j7","parameters":{"deptypes":["build","run"],"virtuals":[]}}],"hash":"x6lyli3psq6zk3644k2wugm576lci33r"},{"name":"re2c","version":"3.0","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","generator":"ninja","cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"e5avvdpvjibybyeqgefi3xrpxyzr2mejjap4mx7q2lgxmpqzco4q====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build","link"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"7bxfiqnxbqtqsyb2un5c7gqyeqeovmuk"},{"name":"winbison","version":"2.5.25","arch":{"platform":"windows","platform_os":"windows10.0.20348","target":"x86_64"},"compiler":{"name":"msvc","version":"19.40.33811"},"namespace":"builtin","parameters":{"build_system":"cmake","build_type":"Release","generator":"ninja","ipo":false,"cflags":[],"cppflags":[],"cxxflags":[],"fflags":[],"ldflags":[],"ldlibs":[]},"package_hash":"t3g2slcnnleieqtz66oly6vsfe5ibje6b2wmamxv5chuewwds5la====","dependencies":[{"name":"cmake","hash":"4ezjoethijaqxue2xt3nal4txe767xns","parameters":{"deptypes":["build"],"virtuals":[]}},{"name":"ninja","hash":"f5ggzol7zdybfonmhgh4ujmlb2or4ut6","parameters":{"deptypes":["build"],"virtuals":[]}}],"hash":"xvhc7don5aszzxvlizjiau2pbs4ar2a6"}]}}
diff --git a/lib/spack/spack/bootstrap/status.py b/lib/spack/spack/bootstrap/status.py
index 37b6bc37da..6d3270b42c 100644
--- a/lib/spack/spack/bootstrap/status.py
+++ b/lib/spack/spack/bootstrap/status.py
@@ -88,7 +88,7 @@ def _core_requirements() -> List[RequiredResponseType]:
def _buildcache_requirements() -> List[RequiredResponseType]:
_buildcache_exes = {
- "file": _missing("file", "required to analyze files for buildcaches"),
+ "file": _missing("file", "required to analyze files for buildcaches", system_only=False),
("gpg2", "gpg"): _missing("gpg2", "required to sign/verify buildcaches", False),
}
if platform.system().lower() == "darwin":
@@ -124,7 +124,7 @@ def _development_requirements() -> List[RequiredResponseType]:
# Ensure we trigger environment modifications if we have an environment
if BootstrapEnvironment.spack_yaml().exists():
with BootstrapEnvironment() as env:
- env.update_syspath_and_environ()
+ env.load()
return [
_required_executable(
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index c571689869..337ec98eb1 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -37,13 +37,17 @@ import io
import multiprocessing
import os
import re
+import stat
import sys
import traceback
import types
from collections import defaultdict
from enum import Flag, auto
from itertools import chain
-from typing import List, Tuple
+from multiprocessing.connection import Connection
+from typing import Callable, Dict, List, Optional, Set, Tuple
+
+import archspec.cpu
import llnl.util.tty as tty
from llnl.string import plural
@@ -51,34 +55,32 @@ from llnl.util.filesystem import join_path
from llnl.util.lang import dedupe, stable_partition
from llnl.util.symlink import symlink
from llnl.util.tty.color import cescape, colorize
-from llnl.util.tty.log import MultiProcessFd
import spack.build_systems.cmake
import spack.build_systems.meson
import spack.build_systems.python
import spack.builder
+import spack.compilers
import spack.config
import spack.deptypes as dt
-import spack.main
+import spack.error
+import spack.multimethod
import spack.package_base
import spack.paths
import spack.platforms
-import spack.repo
import spack.schema.environment
import spack.spec
+import spack.stage
import spack.store
import spack.subprocess_context
-import spack.user_environment
-import spack.util.path
-import spack.util.pattern
+import spack.util.executable
+import spack.util.libc
from spack import traverse
from spack.context import Context
-from spack.error import NoHeadersError, NoLibrariesError
+from spack.error import InstallError, NoHeadersError, NoLibrariesError
from spack.install_test import spack_install_test_log
-from spack.installer import InstallError
-from spack.util.cpus import determine_number_of_jobs
from spack.util.environment import (
- SYSTEM_DIRS,
+ SYSTEM_DIR_CASE_ENTRY,
EnvironmentModifications,
env_flag,
filter_system_paths,
@@ -88,7 +90,7 @@ from spack.util.environment import (
)
from spack.util.executable import Executable
from spack.util.log_parse import make_log_context, parse_log_events
-from spack.util.module_cmd import load_module, module, path_from_modules
+from spack.util.module_cmd import load_module
#
# This can be set by the user to globally disable parallel builds.
@@ -101,9 +103,13 @@ SPACK_NO_PARALLEL_MAKE = "SPACK_NO_PARALLEL_MAKE"
# Spack's compiler wrappers.
#
SPACK_ENV_PATH = "SPACK_ENV_PATH"
+SPACK_MANAGED_DIRS = "SPACK_MANAGED_DIRS"
SPACK_INCLUDE_DIRS = "SPACK_INCLUDE_DIRS"
SPACK_LINK_DIRS = "SPACK_LINK_DIRS"
SPACK_RPATH_DIRS = "SPACK_RPATH_DIRS"
+SPACK_STORE_INCLUDE_DIRS = "SPACK_STORE_INCLUDE_DIRS"
+SPACK_STORE_LINK_DIRS = "SPACK_STORE_LINK_DIRS"
+SPACK_STORE_RPATH_DIRS = "SPACK_STORE_RPATH_DIRS"
SPACK_RPATH_DEPS = "SPACK_RPATH_DEPS"
SPACK_LINK_DEPS = "SPACK_LINK_DEPS"
SPACK_PREFIX = "SPACK_PREFIX"
@@ -183,14 +189,6 @@ class MakeExecutable(Executable):
return super().__call__(*args, **kwargs)
-def _on_cray():
- host_platform = spack.platforms.host()
- host_os = host_platform.operating_system("default_os")
- on_cray = str(host_platform) == "cray"
- using_cnl = re.match(r"cnl\d+", str(host_os))
- return on_cray, using_cnl
-
-
def clean_environment():
# Stuff in here sanitizes the build environment to eliminate
# anything the user has set that may interfere. We apply it immediately
@@ -217,6 +215,9 @@ def clean_environment():
env.unset("R_HOME")
env.unset("R_ENVIRON")
+ env.unset("LUA_PATH")
+ env.unset("LUA_CPATH")
+
# Affects GNU make, can e.g. indirectly inhibit enabling parallel build
# env.unset('MAKEFLAGS')
@@ -231,17 +232,6 @@ def clean_environment():
if varname.endswith("_ROOT") and varname != "SPACK_ROOT":
env.unset(varname)
- # On Cray "cluster" systems, unset CRAY_LD_LIBRARY_PATH to avoid
- # interference with Spack dependencies.
- # CNL requires these variables to be set (or at least some of them,
- # depending on the CNL version).
- on_cray, using_cnl = _on_cray()
- if on_cray and not using_cnl:
- env.unset("CRAY_LD_LIBRARY_PATH")
- for varname in os.environ.keys():
- if "PKGCONF" in varname:
- env.unset(varname)
-
# Unset the following variables because they can affect installation of
# Autotools and CMake packages.
build_system_vars = [
@@ -371,11 +361,7 @@ def set_compiler_environment_variables(pkg, env):
_add_werror_handling(keep_werror, env)
# Set the target parameters that the compiler will add
- # Don't set on cray platform because the targeting module handles this
- if spec.satisfies("platform=cray"):
- isa_arg = ""
- else:
- isa_arg = spec.architecture.target.optimization_flags(compiler)
+ isa_arg = optimization_flags(compiler, spec.target)
env.set("SPACK_TARGET_ARGS", isa_arg)
# Trap spack-tracked compiler flags as appropriate.
@@ -413,13 +399,72 @@ def set_compiler_environment_variables(pkg, env):
env.set("SPACK_COMPILER_SPEC", str(spec.compiler))
- env.set("SPACK_SYSTEM_DIRS", ":".join(SYSTEM_DIRS))
+ env.set("SPACK_SYSTEM_DIRS", SYSTEM_DIR_CASE_ENTRY)
compiler.setup_custom_environment(pkg, env)
return env
+def optimization_flags(compiler, target):
+ if spack.compilers.is_mixed_toolchain(compiler):
+ msg = (
+ "microarchitecture specific optimizations are not "
+ "supported yet on mixed compiler toolchains [check"
+ f" {compiler.name}@{compiler.version} for further details]"
+ )
+ tty.debug(msg)
+ return ""
+
+ # Try to check if the current compiler comes with a version number or
+ # has an unexpected suffix. If so, treat it as a compiler with a
+ # custom spec.
+ compiler_version = compiler.version
+ version_number, suffix = archspec.cpu.version_components(compiler.version)
+ if not version_number or suffix:
+ try:
+ compiler_version = compiler.real_version
+ except spack.util.executable.ProcessError as e:
+ # log this and just return compiler.version instead
+ tty.debug(str(e))
+
+ try:
+ result = target.optimization_flags(compiler.name, compiler_version.dotted_numeric_string)
+ except (ValueError, archspec.cpu.UnsupportedMicroarchitecture):
+ result = ""
+
+ return result
+
+
+class FilterDefaultDynamicLinkerSearchPaths:
+ """Remove rpaths to directories that are default search paths of the dynamic linker."""
+
+ def __init__(self, dynamic_linker: Optional[str]) -> None:
+ # Identify directories by (inode, device) tuple, which handles symlinks too.
+ self.default_path_identifiers: Set[Tuple[int, int]] = set()
+ if not dynamic_linker:
+ return
+ for path in spack.util.libc.default_search_paths_from_dynamic_linker(dynamic_linker):
+ try:
+ s = os.stat(path)
+ if stat.S_ISDIR(s.st_mode):
+ self.default_path_identifiers.add((s.st_ino, s.st_dev))
+ except OSError:
+ continue
+
+ def is_dynamic_loader_default_path(self, p: str) -> bool:
+ try:
+ s = os.stat(p)
+ return (s.st_ino, s.st_dev) in self.default_path_identifiers
+ except OSError:
+ return False
+
+ def __call__(self, dirs: List[str]) -> List[str]:
+ if not self.default_path_identifiers:
+ return dirs
+ return [p for p in dirs if not self.is_dynamic_loader_default_path(p)]
+
+
def set_wrapper_variables(pkg, env):
"""Set environment variables used by the Spack compiler wrapper (which have the prefix
`SPACK_`) and also add the compiler wrappers to PATH.
@@ -467,83 +512,102 @@ def set_wrapper_variables(pkg, env):
env.set(SPACK_DEBUG, "TRUE")
env.set(SPACK_SHORT_SPEC, pkg.spec.short_spec)
env.set(SPACK_DEBUG_LOG_ID, pkg.spec.format("{name}-{hash:7}"))
- env.set(SPACK_DEBUG_LOG_DIR, spack.main.spack_working_dir)
+ env.set(SPACK_DEBUG_LOG_DIR, spack.paths.spack_working_dir)
- # Find ccache binary and hand it to build environment
if spack.config.get("config:ccache"):
- ccache = Executable("ccache")
- if not ccache:
- raise RuntimeError("No ccache binary found in PATH")
- env.set(SPACK_CCACHE_BINARY, ccache)
+ # Enable ccache in the compiler wrapper
+ env.set(SPACK_CCACHE_BINARY, spack.util.executable.which_string("ccache", required=True))
+ else:
+ # Avoid cache pollution if a build system forces `ccache <compiler wrapper invocation>`.
+ env.set("CCACHE_DISABLE", "1")
# Gather information about various types of dependencies
- link_deps = set(pkg.spec.traverse(root=False, deptype=("link")))
- rpath_deps = get_rpath_deps(pkg)
+ rpath_hashes = set(s.dag_hash() for s in get_rpath_deps(pkg))
+ link_deps = pkg.spec.traverse(root=False, order="topo", deptype=dt.LINK)
+ external_link_deps, nonexternal_link_deps = stable_partition(link_deps, lambda d: d.external)
link_dirs = []
include_dirs = []
rpath_dirs = []
- def _prepend_all(list_to_modify, items_to_add):
- # Update the original list (creating a new list would be faster but
- # may not be convenient)
- for item in reversed(list(items_to_add)):
- list_to_modify.insert(0, item)
-
- def update_compiler_args_for_dep(dep):
- if dep in link_deps and (not is_system_path(dep.prefix)):
- query = pkg.spec[dep.name]
- dep_link_dirs = list()
- try:
- # In some circumstances (particularly for externals) finding
- # libraries packages can be time consuming, so indicate that
- # we are performing this operation (and also report when it
- # finishes).
- tty.debug("Collecting libraries for {0}".format(dep.name))
- dep_link_dirs.extend(query.libs.directories)
- tty.debug("Libraries for {0} have been collected.".format(dep.name))
- except NoLibrariesError:
- tty.debug("No libraries found for {0}".format(dep.name))
-
- for default_lib_dir in ["lib", "lib64"]:
- default_lib_prefix = os.path.join(dep.prefix, default_lib_dir)
- if os.path.isdir(default_lib_prefix):
- dep_link_dirs.append(default_lib_prefix)
-
- _prepend_all(link_dirs, dep_link_dirs)
- if dep in rpath_deps:
- _prepend_all(rpath_dirs, dep_link_dirs)
-
- try:
- _prepend_all(include_dirs, query.headers.directories)
- except NoHeadersError:
- tty.debug("No headers found for {0}".format(dep.name))
-
- for dspec in pkg.spec.traverse(root=False, order="post"):
- if dspec.external:
- update_compiler_args_for_dep(dspec)
-
- # Just above, we prepended entries for -L/-rpath for externals. We
- # now do this for non-external packages so that Spack-built packages
- # are searched first for libraries etc.
- for dspec in pkg.spec.traverse(root=False, order="post"):
- if not dspec.external:
- update_compiler_args_for_dep(dspec)
-
- # The top-level package is always RPATHed. It hasn't been installed yet
- # so the RPATHs are added unconditionally (e.g. even though lib64/ may
- # not be created for the install).
- for libdir in ["lib64", "lib"]:
+ for dep in chain(external_link_deps, nonexternal_link_deps):
+ # TODO: is_system_path is wrong, but even if we knew default -L, -I flags from the compiler
+ # and default search dirs from the dynamic linker, it's not obvious how to avoid a possibly
+ # expensive search in `query.libs.directories` and `query.headers.directories`, which is
+ # what this branch is trying to avoid.
+ if is_system_path(dep.prefix):
+ continue
+ # TODO: as of Spack 0.22, multiple instances of the same package may occur among the link
+ # deps, so keying by name is wrong. In practice it is not problematic: we obtain the same
+ # gcc-runtime / glibc here, and repeatedly add the same dirs that are later deduped.
+ query = pkg.spec[dep.name]
+ dep_link_dirs = []
+ try:
+ # Locating libraries can be time consuming, so log start and finish.
+ tty.debug(f"Collecting libraries for {dep.name}")
+ dep_link_dirs.extend(query.libs.directories)
+ tty.debug(f"Libraries for {dep.name} have been collected.")
+ except NoLibrariesError:
+ tty.debug(f"No libraries found for {dep.name}")
+
+ for default_lib_dir in ("lib", "lib64"):
+ default_lib_prefix = os.path.join(dep.prefix, default_lib_dir)
+ if os.path.isdir(default_lib_prefix):
+ dep_link_dirs.append(default_lib_prefix)
+
+ link_dirs[:0] = dep_link_dirs
+ if dep.dag_hash() in rpath_hashes:
+ rpath_dirs[:0] = dep_link_dirs
+
+ try:
+ tty.debug(f"Collecting headers for {dep.name}")
+ include_dirs[:0] = query.headers.directories
+ tty.debug(f"Headers for {dep.name} have been collected.")
+ except NoHeadersError:
+ tty.debug(f"No headers found for {dep.name}")
+
+ # The top-level package is heuristically rpath'ed.
+ for libdir in ("lib64", "lib"):
lib_path = os.path.join(pkg.prefix, libdir)
rpath_dirs.insert(0, lib_path)
+ filter_default_dynamic_linker_search_paths = FilterDefaultDynamicLinkerSearchPaths(
+ pkg.compiler.default_dynamic_linker
+ )
+
+ # TODO: filter_system_paths is again wrong (and probably unnecessary due to the is_system_path
+ # branch above). link_dirs should be filtered with entries from _parse_link_paths.
link_dirs = list(dedupe(filter_system_paths(link_dirs)))
include_dirs = list(dedupe(filter_system_paths(include_dirs)))
rpath_dirs = list(dedupe(filter_system_paths(rpath_dirs)))
+ rpath_dirs = filter_default_dynamic_linker_search_paths(rpath_dirs)
- env.set(SPACK_LINK_DIRS, ":".join(link_dirs))
- env.set(SPACK_INCLUDE_DIRS, ":".join(include_dirs))
- env.set(SPACK_RPATH_DIRS, ":".join(rpath_dirs))
+ # TODO: implicit_rpaths is prefiltered by is_system_path, that should be removed in favor of
+ # just this filter.
+ implicit_rpaths = filter_default_dynamic_linker_search_paths(pkg.compiler.implicit_rpaths())
+ if implicit_rpaths:
+ env.set("SPACK_COMPILER_IMPLICIT_RPATHS", ":".join(implicit_rpaths))
+
+ # Spack managed directories include the stage, store and upstream stores. We extend this with
+ # their real paths to make it more robust (e.g. /tmp vs /private/tmp on macOS).
+ spack_managed_dirs: Set[str] = {
+ spack.stage.get_stage_root(),
+ spack.store.STORE.db.root,
+ *(db.root for db in spack.store.STORE.db.upstream_dbs),
+ }
+ spack_managed_dirs.update([os.path.realpath(p) for p in spack_managed_dirs])
+
+ env.set(SPACK_MANAGED_DIRS, "|".join(f'"{p}/"*' for p in sorted(spack_managed_dirs)))
+ is_spack_managed = lambda p: any(p.startswith(store) for store in spack_managed_dirs)
+ link_dirs_spack, link_dirs_system = stable_partition(link_dirs, is_spack_managed)
+ include_dirs_spack, include_dirs_system = stable_partition(include_dirs, is_spack_managed)
+ rpath_dirs_spack, rpath_dirs_system = stable_partition(rpath_dirs, is_spack_managed)
+ env.set(SPACK_LINK_DIRS, ":".join(link_dirs_system))
+ env.set(SPACK_INCLUDE_DIRS, ":".join(include_dirs_system))
+ env.set(SPACK_RPATH_DIRS, ":".join(rpath_dirs_system))
+ env.set(SPACK_STORE_LINK_DIRS, ":".join(link_dirs_spack))
+ env.set(SPACK_STORE_INCLUDE_DIRS, ":".join(include_dirs_spack))
+ env.set(SPACK_STORE_RPATH_DIRS, ":".join(rpath_dirs_spack))
def set_package_py_globals(pkg, context: Context = Context.BUILD):
@@ -552,58 +616,65 @@ def set_package_py_globals(pkg, context: Context = Context.BUILD):
"""
module = ModuleChangePropagator(pkg)
- m = module
-
+ jobs = spack.config.determine_number_of_jobs(parallel=pkg.parallel)
+ module.make_jobs = jobs
if context == Context.BUILD:
- jobs = determine_number_of_jobs(parallel=pkg.parallel)
- m.make_jobs = jobs
-
- # TODO: make these build deps that can be installed if not found.
- m.make = MakeExecutable("make", jobs)
- m.gmake = MakeExecutable("gmake", jobs)
- m.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False)
- # TODO: johnwparent: add package or builder support to define these build tools
- # for now there is no entrypoint for builders to define these on their
- # own
- if sys.platform == "win32":
- m.nmake = Executable("nmake")
- m.msbuild = Executable("msbuild")
- # analog to configure for win32
- m.cscript = Executable("cscript")
-
- # Find the configure script in the archive path
- # Don't use which for this; we want to find it in the current dir.
- m.configure = Executable("./configure")
-
- # Standard CMake arguments
- m.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg)
- m.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg)
- m.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg)
+ module.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg)
+ module.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg)
+
+ # TODO: make these build deps that can be installed if not found.
+ module.make = MakeExecutable("make", jobs)
+ module.gmake = MakeExecutable("gmake", jobs)
+ module.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False)
+ # TODO: johnwparent: add package or builder support to define these build tools
+ # for now there is no entrypoint for builders to define these on their
+ # own
+ if sys.platform == "win32":
+ module.nmake = Executable("nmake")
+ module.msbuild = Executable("msbuild")
+ # analog to configure for win32
+ module.cscript = Executable("cscript")
+
+ # Find the configure script in the archive path
+ # Don't use which for this; we want to find it in the current dir.
+ module.configure = Executable("./configure")
# Put spack compiler paths in module scope. (Some packages use it
# in setup_run_environment etc, so don't put it context == build)
link_dir = spack.paths.build_env_path
- m.spack_cc = os.path.join(link_dir, pkg.compiler.link_paths["cc"])
- m.spack_cxx = os.path.join(link_dir, pkg.compiler.link_paths["cxx"])
- m.spack_f77 = os.path.join(link_dir, pkg.compiler.link_paths["f77"])
- m.spack_fc = os.path.join(link_dir, pkg.compiler.link_paths["fc"])
+ pkg_compiler = None
+ try:
+ pkg_compiler = pkg.compiler
+ except spack.compilers.NoCompilerForSpecError as e:
+ tty.debug(f"cannot set 'spack_cc': {str(e)}")
+
+ if pkg_compiler is not None:
+ module.spack_cc = os.path.join(link_dir, pkg_compiler.link_paths["cc"])
+ module.spack_cxx = os.path.join(link_dir, pkg_compiler.link_paths["cxx"])
+ module.spack_f77 = os.path.join(link_dir, pkg_compiler.link_paths["f77"])
+ module.spack_fc = os.path.join(link_dir, pkg_compiler.link_paths["fc"])
+ else:
+ module.spack_cc = None
+ module.spack_cxx = None
+ module.spack_f77 = None
+ module.spack_fc = None
# Useful directories within the prefix are encapsulated in
# a Prefix object.
- m.prefix = pkg.prefix
+ module.prefix = pkg.prefix
# Platform-specific library suffix.
- m.dso_suffix = dso_suffix
+ module.dso_suffix = dso_suffix
def static_to_shared_library(static_lib, shared_lib=None, **kwargs):
- compiler_path = kwargs.get("compiler", m.spack_cc)
+ compiler_path = kwargs.get("compiler", module.spack_cc)
compiler = Executable(compiler_path)
return _static_to_shared_library(
pkg.spec.architecture, compiler, static_lib, shared_lib, **kwargs
)
- m.static_to_shared_library = static_to_shared_library
+ module.static_to_shared_library = static_to_shared_library
module.propagate_changes_to_mro()
@@ -694,25 +765,28 @@ def _static_to_shared_library(arch, compiler, static_lib, shared_lib=None, **kwa
return compiler(*compiler_args, output=compiler_output)
-def get_rpath_deps(pkg):
- """Return immediate or transitive RPATHs depending on the package."""
- if pkg.transitive_rpaths:
- return [d for d in pkg.spec.traverse(root=False, deptype=("link"))]
- else:
- return pkg.spec.dependencies(deptype="link")
+def _get_rpath_deps_from_spec(
+ spec: spack.spec.Spec, transitive_rpaths: bool
+) -> List[spack.spec.Spec]:
+ if not transitive_rpaths:
+ return spec.dependencies(deptype=dt.LINK)
+
+ by_name: Dict[str, spack.spec.Spec] = {}
+
+ for dep in spec.traverse(root=False, deptype=dt.LINK):
+ lookup = by_name.get(dep.name)
+ if lookup is None:
+ by_name[dep.name] = dep
+ elif lookup.version < dep.version:
+ by_name[dep.name] = dep
+ return list(by_name.values())
-def get_rpaths(pkg):
- """Get a list of all the rpaths for a package."""
- rpaths = [pkg.prefix.lib, pkg.prefix.lib64]
- deps = get_rpath_deps(pkg)
- rpaths.extend(d.prefix.lib for d in deps if os.path.isdir(d.prefix.lib))
- rpaths.extend(d.prefix.lib64 for d in deps if os.path.isdir(d.prefix.lib64))
- # Second module is our compiler mod name. We use that to get rpaths from
- # module show output.
- if pkg.compiler.modules and len(pkg.compiler.modules) > 1:
- rpaths.append(path_from_modules([pkg.compiler.modules[1]]))
- return list(dedupe(filter_system_paths(rpaths)))
+
+def get_rpath_deps(pkg: spack.package_base.PackageBase) -> List[spack.spec.Spec]:
+ """Return immediate or transitive dependencies (depending on the package) that need to be
+ rpath'ed. If a package occurs multiple times, the newest version is kept."""
+ return _get_rpath_deps_from_spec(pkg.spec, pkg.transitive_rpaths)
def load_external_modules(pkg):
@@ -756,7 +830,6 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
# Platform specific setup goes before package specific setup. This is for setting
# defaults like MACOSX_DEPLOYMENT_TARGET on macOS.
platform = spack.platforms.by_name(pkg.spec.architecture.platform)
- target = platform.target(pkg.spec.architecture.target)
platform.setup_platform_environment(pkg, env_mods)
tty.debug("setup_package: grabbing modifications from dependencies")
@@ -781,23 +854,8 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
for mod in pkg.compiler.modules:
load_module(mod)
- # kludge to handle cray mpich and libsci being automatically loaded by
- # PrgEnv modules on cray platform. Module unload does no damage when
- # unnecessary
- on_cray, _ = _on_cray()
- if on_cray and not dirty:
- for mod in ["cray-mpich", "cray-libsci"]:
- module("unload", mod)
-
- if target.module_name:
- load_module(target.module_name)
-
load_external_modules(pkg)
- implicit_rpaths = pkg.compiler.implicit_rpaths()
- if implicit_rpaths:
- env_mods.set("SPACK_COMPILER_IMPLICIT_RPATHS", ":".join(implicit_rpaths))
-
# Make sure nothing's strange about the Spack environment.
validate(env_mods, tty.warn)
env_mods.apply_modifications()
@@ -824,6 +882,9 @@ class EnvironmentVisitor:
elif context == Context.RUN:
self.root_depflag = dt.RUN | dt.LINK
+ def accept(self, item):
+ return True
+
def neighbors(self, item):
spec = item.edge.spec
if spec.dag_hash() in self.root_hashes:
@@ -861,19 +922,19 @@ def effective_deptypes(
a flag specifying in what way they do so. The list is ordered topologically
from root to leaf, meaning that environment modifications should be applied
in reverse so that dependents override dependencies, not the other way around."""
- visitor = traverse.TopoVisitor(
- EnvironmentVisitor(*specs, context=context),
- key=lambda x: x.dag_hash(),
+ topo_sorted_edges = traverse.traverse_topo_edges_generator(
+ traverse.with_artificial_edges(specs),
+ visitor=EnvironmentVisitor(*specs, context=context),
+ key=traverse.by_dag_hash,
root=True,
all_edges=True,
)
- traverse.traverse_depth_first_with_visitor(traverse.with_artificial_edges(specs), visitor)
# Dictionary with "no mode" as default value, so it's easy to write modes[x] |= flag.
use_modes = defaultdict(lambda: UseMode(0))
nodes_with_type = []
- for edge in visitor.edges:
+ for edge in topo_sorted_edges:
parent, child, depflag = edge.parent, edge.spec, edge.depflag
# Mark the starting point
@@ -972,8 +1033,8 @@ class SetupContext:
self.should_set_package_py_globals = (
self.should_setup_dependent_build_env | self.should_setup_run_env | UseMode.ROOT
)
- # In a build context, the root and direct build deps need build-specific globals set.
- self.needs_build_context = UseMode.ROOT | UseMode.BUILDTIME_DIRECT
+ # In a build context, the root needs build-specific globals set.
+ self.needs_build_context = UseMode.ROOT
def set_all_package_py_globals(self):
"""Set the globals in modules of package.py files."""
@@ -987,6 +1048,12 @@ class SetupContext:
# This includes runtime dependencies, also runtime deps of direct build deps.
set_package_py_globals(pkg, context=Context.RUN)
+ # Looping over the set of packages a second time
+ # ensures all globals are loaded into the module space prior to
+ # any package setup. This guarantees package setup methods have
+ # access to expected module level definitions such as "spack_cc"
+ for dspec, flag in chain(self.external, self.nonexternal):
+ pkg = dspec.package
for spec in dspec.dependents():
# Note: some specs have dependents that are unreachable from the root, so avoid
# setting globals for those.
@@ -996,6 +1063,15 @@ class SetupContext:
pkg.setup_dependent_package(dependent_module, spec)
dependent_module.propagate_changes_to_mro()
+ if self.context == Context.BUILD:
+ pkg = self.specs[0].package
+ module = ModuleChangePropagator(pkg)
+ # std_cmake_args is not sufficiently static to be defined
+ # in set_package_py_globals and is deprecated so its handled
+ # here as a special case
+ module.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg)
+ module.propagate_changes_to_mro()
+
def get_env_modifications(self) -> EnvironmentModifications:
"""Returns the environment variable modifications for the given input specs and context.
Environment modifications include:
@@ -1065,45 +1141,61 @@ class SetupContext:
env.prepend_path("PATH", bin_dir)
-def get_cmake_prefix_path(pkg):
- # Note that unlike modifications_from_dependencies, this does not include
- # any edits to CMAKE_PREFIX_PATH defined in custom
- # setup_dependent_build_environment implementations of dependency packages
- build_deps = set(pkg.spec.dependencies(deptype=("build", "test")))
- link_deps = set(pkg.spec.traverse(root=False, deptype=("link")))
- build_link_deps = build_deps | link_deps
- spack_built = []
- externals = []
- # modifications_from_dependencies updates CMAKE_PREFIX_PATH by first
- # prepending all externals and then all non-externals
- for dspec in pkg.spec.traverse(root=False, order="post"):
- if dspec in build_link_deps:
- if dspec.external:
- externals.insert(0, dspec)
- else:
- spack_built.insert(0, dspec)
-
- ordered_build_link_deps = spack_built + externals
- cmake_prefix_path_entries = []
- for spec in ordered_build_link_deps:
- cmake_prefix_path_entries.extend(spec.package.cmake_prefix_paths)
-
- return filter_system_paths(cmake_prefix_path_entries)
-
-
def _setup_pkg_and_run(
- serialized_pkg, function, kwargs, write_pipe, input_multiprocess_fd, jsfd1, jsfd2
+ serialized_pkg: "spack.subprocess_context.PackageInstallContext",
+ function: Callable,
+ kwargs: Dict,
+ write_pipe: Connection,
+ input_pipe: Optional[Connection],
+ jsfd1: Optional[Connection],
+ jsfd2: Optional[Connection],
):
+ """Main entry point in the child process for Spack builds.
+
+ ``_setup_pkg_and_run`` is called by the child process created in
+ ``start_build_process()``, and its main job is to run ``function()`` on behalf of
+ some Spack installation (see :ref:`spack.installer.PackageInstaller._install_task`).
+
+ The child process is passed a ``write_pipe``, on which it's expected to send one of
+ the following:
+
+ * ``StopPhase``: error raised by a build process indicating it's stopping at a
+ particular build phase.
+
+ * ``BaseException``: any exception raised by a child build process, which will be
+ wrapped in ``ChildError`` (which adds a bunch of debug info and log context) and
+ raised in the parent.
+
+ * The return value of ``function()``, which can be anything (except an exception).
+ This is returned to the caller.
+
+ Note: ``jsfd1`` and ``jsfd2`` are passed solely to ensure that the child process
+ does not close these file descriptors. Some ``multiprocessing`` backends will close
+ them automatically in the child if they are not passed at process creation time.
+
+ Arguments:
+ serialized_pkg: Spack package install context object (serialized form of the
+ package that we'll build in the child process).
+ function: function to call in the child process; serialized_pkg is passed to
+ this as the first argument.
+ kwargs: additional keyword arguments to pass to ``function()``.
+ write_pipe: multiprocessing ``Connection`` to the parent process, to which the
+ child *must* send a result (or an error) back to parent on.
+ input_multiprocess_fd: stdin from the parent (not passed currently on Windows)
+ jsfd1: gmake Jobserver file descriptor 1.
+ jsfd2: gmake Jobserver file descriptor 2.
+
+ """
+
context: str = kwargs.get("context", "build")
try:
- # We are in the child process. Python sets sys.stdin to
- # open(os.devnull) to prevent our process and its parent from
- # simultaneously reading from the original stdin. But, we assume
- # that the parent process is not going to read from it till we
- # are done with the child, so we undo Python's precaution.
- if input_multiprocess_fd is not None:
- sys.stdin = os.fdopen(input_multiprocess_fd.fd)
+ # We are in the child process. Python sets sys.stdin to open(os.devnull) to prevent our
+ # process and its parent from simultaneously reading from the original stdin. But, we
+ # assume that the parent process is not going to read from it till we are done with the
+ # child, so we undo Python's precaution. closefd=False since Connection has ownership.
+ if input_pipe is not None:
+ sys.stdin = os.fdopen(input_pipe.fileno(), closefd=False)
pkg = serialized_pkg.restore()
@@ -1115,17 +1207,18 @@ def _setup_pkg_and_run(
return_value = function(pkg, kwargs)
write_pipe.send(return_value)
- except StopPhase as e:
+ except spack.error.StopPhase as e:
# Do not create a full ChildError from this, it's not an error
# it's a control statement.
write_pipe.send(e)
- except BaseException:
+ except BaseException as e:
# catch ANYTHING that goes wrong in the child process
- exc_type, exc, tb = sys.exc_info()
# Need to unwind the traceback in the child because traceback
# objects can't be sent to the parent.
- tb_string = traceback.format_exc()
+ exc_type = type(e)
+ tb = e.__traceback__
+ tb_string = "".join(traceback.format_exception(exc_type, e, tb))
# build up some context from the offending package so we can
# show that, too.
@@ -1142,8 +1235,8 @@ def _setup_pkg_and_run(
elif context == "test":
logfile = os.path.join(pkg.test_suite.stage, pkg.test_suite.test_log_name(pkg.spec))
- error_msg = str(exc)
- if isinstance(exc, (spack.multimethod.NoSuchMethodError, AttributeError)):
+ error_msg = str(e)
+ if isinstance(e, (spack.multimethod.NoSuchMethodError, AttributeError)):
process = "test the installation" if context == "test" else "build from sources"
error_msg = (
"The '{}' package cannot find an attribute while trying to {}. "
@@ -1153,7 +1246,7 @@ def _setup_pkg_and_run(
"More information at https://spack.readthedocs.io/en/latest/packaging_guide.html#installation-procedure"
).format(pkg.name, process, context)
error_msg = colorize("@*R{{{}}}".format(error_msg))
- error_msg = "{}\n\n{}".format(str(exc), error_msg)
+ error_msg = "{}\n\n{}".format(str(e), error_msg)
# make a pickleable exception to send to parent.
msg = "%s: %s" % (exc_type.__name__, error_msg)
@@ -1171,8 +1264,8 @@ def _setup_pkg_and_run(
finally:
write_pipe.close()
- if input_multiprocess_fd is not None:
- input_multiprocess_fd.close()
+ if input_pipe is not None:
+ input_pipe.close()
def start_build_process(pkg, function, kwargs):
@@ -1199,23 +1292,9 @@ def start_build_process(pkg, function, kwargs):
If something goes wrong, the child process catches the error and
passes it to the parent wrapped in a ChildError. The parent is
expected to handle (or re-raise) the ChildError.
-
- This uses `multiprocessing.Process` to create the child process. The
- mechanism used to create the process differs on different operating
- systems and for different versions of Python. In some cases "fork"
- is used (i.e. the "fork" system call) and some cases it starts an
- entirely new Python interpreter process (in the docs this is referred
- to as the "spawn" start method). Breaking it down by OS:
-
- - Linux always uses fork.
- - Mac OS uses fork before Python 3.8 and "spawn" for 3.8 and after.
- - Windows always uses the "spawn" start method.
-
- For more information on `multiprocessing` child process creation
- mechanisms, see https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
"""
read_pipe, write_pipe = multiprocessing.Pipe(duplex=False)
- input_multiprocess_fd = None
+ input_fd = None
jobserver_fd1 = None
jobserver_fd2 = None
@@ -1224,14 +1303,13 @@ def start_build_process(pkg, function, kwargs):
try:
# Forward sys.stdin when appropriate, to allow toggling verbosity
if sys.platform != "win32" and sys.stdin.isatty() and hasattr(sys.stdin, "fileno"):
- input_fd = os.dup(sys.stdin.fileno())
- input_multiprocess_fd = MultiProcessFd(input_fd)
+ input_fd = Connection(os.dup(sys.stdin.fileno()))
mflags = os.environ.get("MAKEFLAGS", False)
if mflags:
m = re.search(r"--jobserver-[^=]*=(\d),(\d)", mflags)
if m:
- jobserver_fd1 = MultiProcessFd(int(m.group(1)))
- jobserver_fd2 = MultiProcessFd(int(m.group(2)))
+ jobserver_fd1 = Connection(int(m.group(1)))
+ jobserver_fd2 = Connection(int(m.group(2)))
p = multiprocessing.Process(
target=_setup_pkg_and_run,
@@ -1240,7 +1318,7 @@ def start_build_process(pkg, function, kwargs):
function,
kwargs,
write_pipe,
- input_multiprocess_fd,
+ input_fd,
jobserver_fd1,
jobserver_fd2,
),
@@ -1260,8 +1338,8 @@ def start_build_process(pkg, function, kwargs):
finally:
# Close the input stream in the parent process
- if input_multiprocess_fd is not None:
- input_multiprocess_fd.close()
+ if input_fd is not None:
+ input_fd.close()
def exitcode_msg(p):
typ = "exit" if p.exitcode >= 0 else "signal"
@@ -1276,7 +1354,7 @@ def start_build_process(pkg, function, kwargs):
p.join()
# If returns a StopPhase, raise it
- if isinstance(child_result, StopPhase):
+ if isinstance(child_result, spack.error.StopPhase):
# do not print
raise child_result
@@ -1299,7 +1377,7 @@ def start_build_process(pkg, function, kwargs):
return child_result
-CONTEXT_BASES = (spack.package_base.PackageBase, spack.build_systems._checks.BaseBuilder)
+CONTEXT_BASES = (spack.package_base.PackageBase, spack.builder.Builder)
def get_package_context(traceback, context=3):
@@ -1338,7 +1416,7 @@ def get_package_context(traceback, context=3):
# don't provide context if the code is actually in the base classes.
obj = frame.f_locals["self"]
func = getattr(obj, tb.tb_frame.f_code.co_name, "")
- if func:
+ if func and hasattr(func, "__qualname__"):
typename, *_ = func.__qualname__.partition(".")
if isinstance(obj, CONTEXT_BASES) and typename not in basenames:
break
@@ -1348,27 +1426,20 @@ def get_package_context(traceback, context=3):
# We found obj, the Package implementation we care about.
# Point out the location in the install method where we failed.
filename = inspect.getfile(frame.f_code)
- lineno = frame.f_lineno
- if os.path.basename(filename) == "package.py":
- # subtract 1 because we inject a magic import at the top of package files.
- # TODO: get rid of the magic import.
- lineno -= 1
-
- lines = ["{0}:{1:d}, in {2}:".format(filename, lineno, frame.f_code.co_name)]
+ lines = [f"{filename}:{frame.f_lineno}, in {frame.f_code.co_name}:"]
# Build a message showing context in the install method.
sourcelines, start = inspect.getsourcelines(frame)
# Calculate lineno of the error relative to the start of the function.
- fun_lineno = lineno - start
+ fun_lineno = frame.f_lineno - start
start_ctx = max(0, fun_lineno - context)
sourcelines = sourcelines[start_ctx : fun_lineno + context + 1]
for i, line in enumerate(sourcelines):
is_error = start_ctx + i == fun_lineno
- mark = ">> " if is_error else " "
# Add start to get lineno relative to start of file, not function.
- marked = " {0}{1:-6d}{2}".format(mark, start + start_ctx + i, line.rstrip())
+ marked = f" {'>> ' if is_error else ' '}{start + start_ctx + i:-6d}{line.rstrip()}"
if is_error:
marked = colorize("@R{%s}" % cescape(marked))
lines.append(marked)
@@ -1452,7 +1523,7 @@ class ChildError(InstallError):
out.write(" {0}\n".format(self.log_name))
# Also output the test log path IF it exists
- if self.context != "test":
+ if self.context != "test" and have_log:
test_log = join_path(os.path.dirname(self.log_name), spack_install_test_log)
if os.path.isfile(test_log):
out.write("\nSee test log for details:\n")
@@ -1485,17 +1556,6 @@ def _make_child_error(msg, module, name, traceback, log, log_type, context):
return ChildError(msg, module, name, traceback, log, log_type, context)
-class StopPhase(spack.error.SpackError):
- """Pickle-able exception to control stopped builds."""
-
- def __reduce__(self):
- return _make_stop_phase, (self.message, self.long_message)
-
-
-def _make_stop_phase(msg, long_msg):
- return StopPhase(msg, long_msg)
-
-
def write_log_summary(out, log_type, log, last=None):
errors, warnings = parse_log_events(log)
nerr = len(errors)
@@ -1529,21 +1589,21 @@ class ModuleChangePropagator:
_PROTECTED_NAMES = ("package", "current_module", "modules_in_mro", "_set_attributes")
- def __init__(self, package):
+ def __init__(self, package: spack.package_base.PackageBase) -> None:
self._set_self_attributes("package", package)
self._set_self_attributes("current_module", package.module)
#: Modules for the classes in the MRO up to PackageBase
modules_in_mro = []
- for cls in inspect.getmro(type(package)):
- module = cls.module
+ for cls in package.__class__.__mro__:
+ module = getattr(cls, "module", None)
- if module == self.current_module:
- continue
-
- if module == spack.package_base:
+ if module is None or module is spack.package_base:
break
+ if module is self.current_module:
+ continue
+
modules_in_mro.append(module)
self._set_self_attributes("modules_in_mro", modules_in_mro)
self._set_self_attributes("_set_attributes", {})
diff --git a/lib/spack/spack/build_systems/_checks.py b/lib/spack/spack/build_systems/_checks.py
index dfda043fad..2c88f15e2b 100644
--- a/lib/spack/spack/build_systems/_checks.py
+++ b/lib/spack/spack/build_systems/_checks.py
@@ -8,7 +8,8 @@ from typing import List
import llnl.util.lang
import spack.builder
-import spack.installer
+import spack.error
+import spack.phase_callbacks
import spack.relocate
import spack.spec
import spack.store
@@ -34,7 +35,7 @@ def sanity_check_prefix(builder: spack.builder.Builder):
if not predicate(abs_path):
msg = "Install failed for {0}. No such {1} in prefix: {2}"
msg = msg.format(pkg.name, filetype, path)
- raise spack.installer.InstallError(msg)
+ raise spack.error.InstallError(msg)
check_paths(pkg.sanity_check_is_file, "file", os.path.isfile)
check_paths(pkg.sanity_check_is_dir, "directory", os.path.isdir)
@@ -42,7 +43,7 @@ def sanity_check_prefix(builder: spack.builder.Builder):
ignore_file = llnl.util.lang.match_predicate(spack.store.STORE.layout.hidden_file_regexes)
if all(map(ignore_file, os.listdir(pkg.prefix))):
msg = "Install failed for {0}. Nothing was installed!"
- raise spack.installer.InstallError(msg.format(pkg.name))
+ raise spack.error.InstallError(msg.format(pkg.name))
def apply_macos_rpath_fixups(builder: spack.builder.Builder):
@@ -63,7 +64,7 @@ def apply_macos_rpath_fixups(builder: spack.builder.Builder):
def ensure_build_dependencies_or_raise(
- spec: spack.spec.Spec, dependencies: List[spack.spec.Spec], error_msg: str
+ spec: spack.spec.Spec, dependencies: List[str], error_msg: str
):
"""Ensure that some build dependencies are present in the concrete spec.
@@ -71,7 +72,7 @@ def ensure_build_dependencies_or_raise(
Args:
spec: concrete spec to be checked.
- dependencies: list of abstract specs to be satisfied
+ dependencies: list of package names of required build dependencies
error_msg: brief error message to be prepended to a longer description
Raises:
@@ -127,8 +128,8 @@ def execute_install_time_tests(builder: spack.builder.Builder):
builder.pkg.tester.phase_tests(builder, "install", builder.install_time_test_callbacks)
-class BaseBuilder(spack.builder.Builder):
- """Base class for builders to register common checks"""
+class BuilderWithDefaults(spack.builder.Builder):
+ """Base class for all specific builders with common callbacks registered."""
# Check that self.prefix is there after installation
- spack.builder.run_after("install")(sanity_check_prefix)
+ spack.phase_callbacks.run_after("install")(sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/aspell_dict.py b/lib/spack/spack/build_systems/aspell_dict.py
index e9fc4e1497..6c55c363ab 100644
--- a/lib/spack/spack/build_systems/aspell_dict.py
+++ b/lib/spack/spack/build_systems/aspell_dict.py
@@ -2,10 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
import llnl.util.filesystem as fs
import spack.directives
-import spack.package_base
import spack.util.executable
from .autotools import AutotoolsBuilder, AutotoolsPackage
@@ -46,18 +47,12 @@ class AspellDictPackage(AutotoolsPackage):
#: Override the default autotools builder
AutotoolsBuilder = AspellBuilder
- def view_destination(self, view):
+ def patch(self):
aspell_spec = self.spec["aspell"]
- if view.get_projection_for_spec(aspell_spec) != aspell_spec.prefix:
- raise spack.package_base.ExtensionError(
- "aspell does not support non-global extensions"
- )
aspell = aspell_spec.command
- return aspell("dump", "config", "dict-dir", output=str).strip()
-
- def view_source(self):
- return self.prefix.lib
-
- def patch(self):
- fs.filter_file(r"^dictdir=.*$", "dictdir=/lib", "configure")
- fs.filter_file(r"^datadir=.*$", "datadir=/lib", "configure")
+ dictdir = aspell("dump", "config", "dict-dir", output=str).strip()
+ datadir = aspell("dump", "config", "data-dir", output=str).strip()
+ dictdir = os.path.relpath(dictdir, aspell_spec.prefix)
+ datadir = os.path.relpath(datadir, aspell_spec.prefix)
+ fs.filter_file(r"^dictdir=.*$", f"dictdir=/{dictdir}", "configure")
+ fs.filter_file(r"^datadir=.*$", f"datadir=/{datadir}", "configure")
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
index d3b7893bfe..aad8a6ffb1 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -2,19 +2,22 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
import os.path
import stat
import subprocess
-from typing import List
+from typing import Callable, List, Optional, Set, Tuple, Union
import llnl.util.filesystem as fs
import llnl.util.tty as tty
import spack.build_environment
import spack.builder
+import spack.error
import spack.package_base
+import spack.phase_callbacks
+import spack.spec
+import spack.util.prefix
from spack.directives import build_system, conflicts, depends_on
from spack.multimethod import when
from spack.operating_systems.mac_os import macos_version
@@ -22,7 +25,7 @@ from spack.util.executable import Executable
from spack.version import Version
from ._checks import (
- BaseBuilder,
+ BuilderWithDefaults,
apply_macos_rpath_fixups,
ensure_build_dependencies_or_raise,
execute_build_time_tests,
@@ -69,14 +72,14 @@ class AutotoolsPackage(spack.package_base.PackageBase):
# Legacy methods (used by too many packages to change them,
# need to forward to the builder)
def enable_or_disable(self, *args, **kwargs):
- return self.builder.enable_or_disable(*args, **kwargs)
+ return spack.builder.create(self).enable_or_disable(*args, **kwargs)
def with_or_without(self, *args, **kwargs):
- return self.builder.with_or_without(*args, **kwargs)
+ return spack.builder.create(self).with_or_without(*args, **kwargs)
@spack.builder.builder("autotools")
-class AutotoolsBuilder(BaseBuilder):
+class AutotoolsBuilder(BuilderWithDefaults):
"""The autotools builder encodes the default way of installing software built
with autotools. It has four phases that can be overridden, if need be:
@@ -157,7 +160,7 @@ class AutotoolsBuilder(BaseBuilder):
install_libtool_archives = False
@property
- def patch_config_files(self):
+ def patch_config_files(self) -> bool:
"""Whether to update old ``config.guess`` and ``config.sub`` files
distributed with the tarball.
@@ -177,7 +180,7 @@ class AutotoolsBuilder(BaseBuilder):
)
@property
- def _removed_la_files_log(self):
+ def _removed_la_files_log(self) -> str:
"""File containing the list of removed libtool archives"""
build_dir = self.build_directory
if not os.path.isabs(self.build_directory):
@@ -185,15 +188,15 @@ class AutotoolsBuilder(BaseBuilder):
return os.path.join(build_dir, "removed_la_files.txt")
@property
- def archive_files(self):
+ def archive_files(self) -> List[str]:
"""Files to archive for packages based on autotools"""
files = [os.path.join(self.build_directory, "config.log")]
if not self.install_libtool_archives:
files.append(self._removed_la_files_log)
return files
- @spack.builder.run_after("autoreconf")
- def _do_patch_config_files(self):
+ @spack.phase_callbacks.run_after("autoreconf")
+ def _do_patch_config_files(self) -> None:
"""Some packages ship with older config.guess/config.sub files and need to
have these updated when installed on a newer architecture.
@@ -249,7 +252,7 @@ class AutotoolsBuilder(BaseBuilder):
# An external gnuconfig may not not have a prefix.
if gnuconfig_dir is None:
- raise spack.build_environment.InstallError(
+ raise spack.error.InstallError(
"Spack could not find substitutes for GNU config files because no "
"prefix is available for the `gnuconfig` package. Make sure you set a "
"prefix path instead of modules for external `gnuconfig`."
@@ -269,7 +272,7 @@ class AutotoolsBuilder(BaseBuilder):
msg += (
" or the `gnuconfig` package prefix is misconfigured as" " an external package"
)
- raise spack.build_environment.InstallError(msg)
+ raise spack.error.InstallError(msg)
# Filter working substitutes
candidates = [f for f in candidates if runs_ok(f)]
@@ -294,9 +297,7 @@ To resolve this problem, please try the following:
and set the prefix to the directory containing the `config.guess` and
`config.sub` files.
"""
- raise spack.build_environment.InstallError(
- msg.format(", ".join(to_be_found), self.name)
- )
+ raise spack.error.InstallError(msg.format(", ".join(to_be_found), self.pkg.name))
# Copy the good files over the bad ones
for abs_path in to_be_patched:
@@ -306,8 +307,8 @@ To resolve this problem, please try the following:
fs.copy(substitutes[name], abs_path)
os.chmod(abs_path, mode)
- @spack.builder.run_before("configure")
- def _patch_usr_bin_file(self):
+ @spack.phase_callbacks.run_before("configure")
+ def _patch_usr_bin_file(self) -> None:
"""On NixOS file is not available in /usr/bin/file. Patch configure
scripts to use file from path."""
@@ -318,8 +319,8 @@ To resolve this problem, please try the following:
with fs.keep_modification_time(*x.filenames):
x.filter(regex="/usr/bin/file", repl="file", string=True)
- @spack.builder.run_before("configure")
- def _set_autotools_environment_variables(self):
+ @spack.phase_callbacks.run_before("configure")
+ def _set_autotools_environment_variables(self) -> None:
"""Many autotools builds use a version of mknod.m4 that fails when
running as root unless FORCE_UNSAFE_CONFIGURE is set to 1.
@@ -332,8 +333,8 @@ To resolve this problem, please try the following:
"""
os.environ["FORCE_UNSAFE_CONFIGURE"] = "1"
- @spack.builder.run_before("configure")
- def _do_patch_libtool_configure(self):
+ @spack.phase_callbacks.run_before("configure")
+ def _do_patch_libtool_configure(self) -> None:
"""Patch bugs that propagate from libtool macros into "configure" and
further into "libtool". Note that patches that can be fixed by patching
"libtool" directly should be implemented in the _do_patch_libtool method
@@ -360,8 +361,8 @@ To resolve this problem, please try the following:
# Support Libtool 2.4.2 and older:
x.filter(regex=r'^(\s*test \$p = "-R")(; then\s*)$', repl=r'\1 || test x-l = x"$p"\2')
- @spack.builder.run_after("configure")
- def _do_patch_libtool(self):
+ @spack.phase_callbacks.run_after("configure")
+ def _do_patch_libtool(self) -> None:
"""If configure generates a "libtool" script that does not correctly
detect the compiler (and patch_libtool is set), patch in the correct
values for libtool variables.
@@ -434,11 +435,6 @@ To resolve this problem, please try the following:
r"crtendS\.o",
]:
x.filter(regex=(rehead + o), repl="")
- elif self.pkg.compiler.name == "dpcpp":
- # Hack to filter out spurious predep_objects when building with Intel dpcpp
- # (see https://github.com/spack/spack/issues/32863):
- x.filter(regex=r"^(predep_objects=.*)/tmp/conftest-[0-9A-Fa-f]+\.o", repl=r"\1")
- x.filter(regex=r"^(predep_objects=.*)/tmp/a-[0-9A-Fa-f]+\.o", repl=r"\1")
elif self.pkg.compiler.name == "nag":
for tag in ["fc", "f77"]:
marker = markers[tag]
@@ -514,64 +510,36 @@ To resolve this problem, please try the following:
)
@property
- def configure_directory(self):
+ def configure_directory(self) -> str:
"""Return the directory where 'configure' resides."""
return self.pkg.stage.source_path
@property
- def configure_abs_path(self):
+ def configure_abs_path(self) -> str:
# Absolute path to configure
configure_abs_path = os.path.join(os.path.abspath(self.configure_directory), "configure")
return configure_abs_path
@property
- def build_directory(self):
+ def build_directory(self) -> str:
"""Override to provide another place to build the package"""
return self.configure_directory
- @spack.builder.run_before("autoreconf")
- def delete_configure_to_force_update(self):
+ @spack.phase_callbacks.run_before("autoreconf")
+ def delete_configure_to_force_update(self) -> None:
if self.force_autoreconf:
fs.force_remove(self.configure_abs_path)
- def autoreconf(self, pkg, spec, prefix):
- """Not needed usually, configure should be already there"""
-
- # If configure exists nothing needs to be done
- if os.path.exists(self.configure_abs_path):
- return
-
- # Else try to regenerate it, which reuquires a few build dependencies
- ensure_build_dependencies_or_raise(
- spec=spec,
- dependencies=["autoconf", "automake", "libtool"],
- error_msg="Cannot generate configure",
- )
-
- tty.msg("Configure script not found: trying to generate it")
- tty.warn("*********************************************************")
- tty.warn("* If the default procedure fails, consider implementing *")
- tty.warn("* a custom AUTORECONF phase in the package *")
- tty.warn("*********************************************************")
- with fs.working_dir(self.configure_directory):
- m = inspect.getmodule(self.pkg)
- # This line is what is needed most of the time
- # --install, --verbose, --force
- autoreconf_args = ["-ivf"]
- autoreconf_args += self.autoreconf_search_path_args
- autoreconf_args += self.autoreconf_extra_args
- m.autoreconf(*autoreconf_args)
-
@property
- def autoreconf_search_path_args(self):
+ def autoreconf_search_path_args(self) -> List[str]:
"""Search path includes for autoreconf. Add an -I flag for all `aclocal` dirs
of build deps, skips the default path of automake, move external include
flags to the back, since they might pull in unrelated m4 files shadowing
spack dependencies."""
return _autoreconf_search_path_args(self.spec)
- @spack.builder.run_after("autoreconf")
- def set_configure_or_die(self):
+ @spack.phase_callbacks.run_after("autoreconf")
+ def set_configure_or_die(self) -> None:
"""Ensure the presence of a "configure" script, or raise. If the "configure"
is found, a module level attribute is set.
@@ -584,15 +552,54 @@ To resolve this problem, please try the following:
raise RuntimeError(msg.format(self.configure_directory))
# Monkey-patch the configure script in the corresponding module
- inspect.getmodule(self.pkg).configure = Executable(self.configure_abs_path)
+ globals_for_pkg = spack.build_environment.ModuleChangePropagator(self.pkg)
+ globals_for_pkg.configure = Executable(self.configure_abs_path)
+ globals_for_pkg.propagate_changes_to_mro()
- def configure_args(self):
+ def configure_args(self) -> List[str]:
"""Return the list of all the arguments that must be passed to configure,
except ``--prefix`` which will be pre-pended to the list.
"""
return []
- def configure(self, pkg, spec, prefix):
+ def autoreconf(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
+ """Not needed usually, configure should be already there"""
+
+ # If configure exists nothing needs to be done
+ if os.path.exists(self.configure_abs_path):
+ return
+
+ # Else try to regenerate it, which requires a few build dependencies
+ ensure_build_dependencies_or_raise(
+ spec=spec,
+ dependencies=["autoconf", "automake", "libtool"],
+ error_msg="Cannot generate configure",
+ )
+
+ tty.msg("Configure script not found: trying to generate it")
+ tty.warn("*********************************************************")
+ tty.warn("* If the default procedure fails, consider implementing *")
+ tty.warn("* a custom AUTORECONF phase in the package *")
+ tty.warn("*********************************************************")
+ with fs.working_dir(self.configure_directory):
+ # This line is what is needed most of the time
+ # --install, --verbose, --force
+ autoreconf_args = ["-ivf"]
+ autoreconf_args += self.autoreconf_search_path_args
+ autoreconf_args += self.autoreconf_extra_args
+ self.pkg.module.autoreconf(*autoreconf_args)
+
+ def configure(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run "configure", with the arguments specified by the builder and an
appropriately set prefix.
"""
@@ -601,51 +608,64 @@ To resolve this problem, please try the following:
options += self.configure_args()
with fs.working_dir(self.build_directory, create=True):
- inspect.getmodule(self.pkg).configure(*options)
-
- def build(self, pkg, spec, prefix):
+ pkg.module.configure(*options)
+
+ def build(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run "make" on the build targets specified by the builder."""
# See https://autotools.io/automake/silent.html
params = ["V=1"]
params += self.build_targets
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make(*params)
-
- def install(self, pkg, spec, prefix):
+ pkg.module.make(*params)
+
+ def install(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run "make" on the install targets specified by the builder."""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make(*self.install_targets)
+ pkg.module.make(*self.install_targets)
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
- def check(self):
+ def check(self) -> None:
"""Run "make" on the ``test`` and ``check`` targets, if found."""
with fs.working_dir(self.build_directory):
self.pkg._if_make_target_execute("test")
self.pkg._if_make_target_execute("check")
def _activate_or_not(
- self, name, activation_word, deactivation_word, activation_value=None, variant=None
- ):
+ self,
+ name: str,
+ activation_word: str,
+ deactivation_word: str,
+ activation_value: Optional[Union[Callable, str]] = None,
+ variant=None,
+ ) -> List[str]:
"""This function contain the current implementation details of
:meth:`~spack.build_systems.autotools.AutotoolsBuilder.with_or_without` and
:meth:`~spack.build_systems.autotools.AutotoolsBuilder.enable_or_disable`.
Args:
- name (str): name of the option that is being activated or not
- activation_word (str): the default activation word ('with' in the
- case of ``with_or_without``)
- deactivation_word (str): the default deactivation word ('without'
- in the case of ``with_or_without``)
- 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.
+ name: name of the option that is being activated or not
+ activation_word: the default activation word ('with' in the case of
+ ``with_or_without``)
+ deactivation_word: the default deactivation word ('without' in the case of
+ ``with_or_without``)
+ activation_value: 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.
- The special value 'prefix' can also be assigned and will return
+ The special value "prefix" can also be assigned and will return
``spec[name].prefix`` as activation parameter.
- variant (str): name of the variant that is being processed
- (if different from option name)
+ variant: name of the variant that is being processed (if different from option name)
Examples:
@@ -653,19 +673,19 @@ To resolve this problem, please try the following:
.. code-block:: python
- variant('foo', values=('x', 'y'), description='')
- variant('bar', default=True, description='')
- variant('ba_z', default=True, description='')
+ variant("foo", values=("x", "y"), description=")
+ variant("bar", default=True, description=")
+ variant("ba_z", default=True, description=")
calling this function like:
.. code-block:: python
_activate_or_not(
- 'foo', 'with', 'without', activation_value='prefix'
+ "foo", "with", "without", activation_value="prefix"
)
- _activate_or_not('bar', 'with', 'without')
- _activate_or_not('ba-z', 'with', 'without', variant='ba_z')
+ _activate_or_not("bar", "with", "without")
+ _activate_or_not("ba-z", "with", "without", variant="ba_z")
will generate the following configuration options:
@@ -685,17 +705,16 @@ To resolve this problem, please try the following:
Raises:
KeyError: if name is not among known variants
"""
- spec = self.pkg.spec
- args = []
+ spec: spack.spec.Spec = self.pkg.spec
+ args: List[str] = []
if activation_value == "prefix":
activation_value = lambda x: spec[x].prefix
variant = variant or name
- # Defensively look that the name passed as argument is among
- # variants
- if variant not in self.pkg.variants:
+ # Defensively look that the name passed as argument is among variants
+ if not self.pkg.has_variant(variant):
msg = '"{0}" is not a variant of "{1}"'
raise KeyError(msg.format(variant, self.pkg.name))
@@ -704,34 +723,24 @@ To resolve this problem, please try the following:
# Create a list of pairs. Each pair includes a configuration
# option and whether or not that option is activated
- variant_desc, _ = self.pkg.variants[variant]
- if set(variant_desc.values) == set((True, False)):
+ vdef = self.pkg.get_variant(variant)
+ if set(vdef.values) == set((True, False)): # type: ignore
# BoolValuedVariant carry information about a single option.
# Nonetheless, for uniformity of treatment we'll package them
# in an iterable of one element.
- condition = "+{name}".format(name=variant)
- options = [(name, condition in spec)]
+ options = [(name, f"+{variant}" in spec)]
else:
- condition = "{variant}={value}"
# "feature_values" is used to track values which correspond to
# features which can be enabled or disabled as understood by the
# package's build system. It excludes values which have special
# meanings and do not correspond to features (e.g. "none")
- feature_values = (
- getattr(variant_desc.values, "feature_values", None) or variant_desc.values
- )
-
- options = [
- (value, condition.format(variant=variant, value=value) in spec)
- for value in feature_values
- ]
+ feature_values = getattr(vdef.values, "feature_values", None) or vdef.values
+ options = [(v, f"{variant}={v}" in spec) for v in feature_values] # type: ignore
# For each allowed value in the list of values
for option_value, activated in options:
# Search for an override in the package for this value
- override_name = "{0}_or_{1}_{2}".format(
- activation_word, deactivation_word, option_value
- )
+ override_name = f"{activation_word}_or_{deactivation_word}_{option_value}"
line_generator = getattr(self, override_name, None) or getattr(
self.pkg, override_name, None
)
@@ -740,19 +749,24 @@ To resolve this problem, please try the following:
def _default_generator(is_activated):
if is_activated:
- line = "--{0}-{1}".format(activation_word, option_value)
+ line = f"--{activation_word}-{option_value}"
if activation_value is not None and activation_value(
option_value
): # NOQA=ignore=E501
- line += "={0}".format(activation_value(option_value))
+ line = f"{line}={activation_value(option_value)}"
return line
- return "--{0}-{1}".format(deactivation_word, option_value)
+ return f"--{deactivation_word}-{option_value}"
line_generator = _default_generator
args.append(line_generator(activated))
return args
- def with_or_without(self, name, activation_value=None, variant=None):
+ def with_or_without(
+ self,
+ name: str,
+ activation_value: Optional[Union[Callable, str]] = None,
+ variant: Optional[str] = None,
+ ) -> List[str]:
"""Inspects a variant and returns the arguments that activate
or deactivate the selected feature(s) for the configure options.
@@ -767,12 +781,11 @@ To resolve this problem, please try the following:
``variant=value`` is in the spec.
Args:
- name (str): name of a valid multi-valued variant
- 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}``.
+ name: name of a valid multi-valued variant
+ activation_value: callable that accepts a single value and returns the parameter to be
+ used leading to an entry of the type ``--with-{name}={parameter}``.
- The special value 'prefix' can also be assigned and will return
+ The special value "prefix" can also be assigned and will return
``spec[name].prefix`` as activation parameter.
Returns:
@@ -780,18 +793,22 @@ To resolve this problem, please try the following:
"""
return self._activate_or_not(name, "with", "without", activation_value, variant)
- def enable_or_disable(self, name, activation_value=None, variant=None):
+ def enable_or_disable(
+ self,
+ name: str,
+ activation_value: Optional[Union[Callable, str]] = None,
+ variant: Optional[str] = None,
+ ) -> List[str]:
"""Same as
:meth:`~spack.build_systems.autotools.AutotoolsBuilder.with_or_without`
but substitute ``with`` with ``enable`` and ``without`` with ``disable``.
Args:
- name (str): name of a valid multi-valued variant
- 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}``
+ name: name of a valid multi-valued variant
+ activation_value: if present accepts a single value and returns the parameter to be
+ used leading to an entry of the type ``--enable-{name}={parameter}``
- The special value 'prefix' can also be assigned and will return
+ The special value "prefix" can also be assigned and will return
``spec[name].prefix`` as activation parameter.
Returns:
@@ -799,15 +816,15 @@ To resolve this problem, please try the following:
"""
return self._activate_or_not(name, "enable", "disable", activation_value, variant)
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
- def installcheck(self):
+ def installcheck(self) -> None:
"""Run "make" on the ``installcheck`` target, if found."""
with fs.working_dir(self.build_directory):
self.pkg._if_make_target_execute("installcheck")
- @spack.builder.run_after("install")
- def remove_libtool_archives(self):
+ @spack.phase_callbacks.run_after("install")
+ def remove_libtool_archives(self) -> None:
"""Remove all .la files in prefix sub-folders if the package sets
``install_libtool_archives`` to be False.
"""
@@ -829,12 +846,13 @@ To resolve this problem, please try the following:
env.set("MACOSX_DEPLOYMENT_TARGET", "10.16")
# On macOS, force rpaths for shared library IDs and remove duplicate rpaths
- spack.builder.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
+ spack.phase_callbacks.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
-def _autoreconf_search_path_args(spec):
- dirs_seen = set()
- flags_spack, flags_external = [], []
+def _autoreconf_search_path_args(spec: spack.spec.Spec) -> List[str]:
+ dirs_seen: Set[Tuple[int, int]] = set()
+ flags_spack: List[str] = []
+ flags_external: List[str] = []
# We don't want to add an include flag for automake's default search path.
for automake in spec.dependencies(name="automake", deptype="build"):
diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py
index 8d3d10a208..273eb070b1 100644
--- a/lib/spack/spack/build_systems/cached_cmake.py
+++ b/lib/spack/spack/build_systems/cached_cmake.py
@@ -4,17 +4,23 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections.abc
import os
+import re
from typing import Tuple
import llnl.util.filesystem as fs
import llnl.util.tty as tty
-import spack.build_environment
-import spack.builder
+import spack.phase_callbacks
from .cmake import CMakeBuilder, CMakePackage
+def spec_uses_toolchain(spec):
+ gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
+ using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
+ return using_toolchain
+
+
def cmake_cache_path(name, value, comment="", force=False):
"""Generate a string for a cmake cache variable"""
force_str = " FORCE" if force else ""
@@ -82,7 +88,7 @@ class CachedCMakeBuilder(CMakeBuilder):
if variant is None:
variant = cmake_var.lower()
- if variant not in self.pkg.variants:
+ if not self.pkg.has_variant(variant):
raise KeyError('"{0}" is not a variant of "{1}"'.format(variant, self.pkg.name))
if variant not in self.pkg.spec.variants:
@@ -155,7 +161,9 @@ class CachedCMakeBuilder(CMakeBuilder):
ld_flags = " ".join(flags["ldflags"])
ld_format_string = "CMAKE_{0}_LINKER_FLAGS"
# CMake has separate linker arguments for types of builds.
- for ld_type in ["EXE", "MODULE", "SHARED", "STATIC"]:
+ # 'ldflags' should not be used with CMAKE_STATIC_LINKER_FLAGS which
+ # is used by the archiver, so don't include "STATIC" in this loop:
+ for ld_type in ["EXE", "MODULE", "SHARED"]:
ld_string = ld_format_string.format(ld_type)
entries.append(cmake_cache_string(ld_string, ld_flags))
@@ -184,7 +192,10 @@ class CachedCMakeBuilder(CMakeBuilder):
entries.append(cmake_cache_path("MPI_C_COMPILER", spec["mpi"].mpicc))
entries.append(cmake_cache_path("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
- entries.append(cmake_cache_path("MPI_Fortran_COMPILER", spec["mpi"].mpifc))
+
+ # not all MPIs have Fortran wrappers
+ if hasattr(spec["mpi"], "mpifc"):
+ entries.append(cmake_cache_path("MPI_Fortran_COMPILER", spec["mpi"].mpifc))
# Check for slurm
using_slurm = False
@@ -199,6 +210,8 @@ class CachedCMakeBuilder(CMakeBuilder):
mpiexec = "/usr/bin/srun"
else:
mpiexec = os.path.join(spec["slurm"].prefix.bin, "srun")
+ elif hasattr(spec["mpi"].package, "mpiexec"):
+ mpiexec = spec["mpi"].package.mpiexec
else:
mpiexec = os.path.join(spec["mpi"].prefix.bin, "mpirun")
if not os.path.exists(mpiexec):
@@ -211,7 +224,7 @@ class CachedCMakeBuilder(CMakeBuilder):
else:
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
# vs the older versions which expect MPIEXEC
- if self.pkg.spec["cmake"].satisfies("@3.10:"):
+ if spec["cmake"].satisfies("@3.10:"):
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", mpiexec))
else:
entries.append(cmake_cache_path("MPIEXEC", mpiexec))
@@ -246,12 +259,17 @@ class CachedCMakeBuilder(CMakeBuilder):
# Include the deprecated CUDA_TOOLKIT_ROOT_DIR for supporting BLT packages
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))
- archs = spec.variants["cuda_arch"].value
- if archs[0] != "none":
- arch_str = ";".join(archs)
- entries.append(
- cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(arch_str))
- )
+ # CUDA_FLAGS
+ cuda_flags = []
+
+ if not spec.satisfies("cuda_arch=none"):
+ cuda_archs = ";".join(spec.variants["cuda_arch"].value)
+ entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_archs))
+
+ if spec_uses_toolchain(spec):
+ cuda_flags.append("-Xcompiler {}".format(spec_uses_toolchain(spec)[0]))
+
+ entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags)))
if "+rocm" in spec:
entries.append("#------------------{0}".format("-" * 30))
@@ -260,9 +278,6 @@ class CachedCMakeBuilder(CMakeBuilder):
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
- entries.append(
- cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc))
- )
llvm_bin = spec["llvm-amdgpu"].prefix.bin
llvm_prefix = spec["llvm-amdgpu"].prefix
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
@@ -275,29 +290,15 @@ class CachedCMakeBuilder(CMakeBuilder):
archs = self.spec.variants["amdgpu_target"].value
if archs[0] != "none":
arch_str = ";".join(archs)
- entries.append(
- cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
- )
- entries.append(cmake_cache_string("AMDGPU_TARGETS", "{0}".format(arch_str)))
- entries.append(cmake_cache_string("GPU_TARGETS", "{0}".format(arch_str)))
+ entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str))
+ entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str))
+ entries.append(cmake_cache_string("GPU_TARGETS", arch_str))
return entries
def std_initconfig_entries(self):
cmake_prefix_path_env = os.environ["CMAKE_PREFIX_PATH"]
cmake_prefix_path = cmake_prefix_path_env.replace(os.pathsep, ";")
- cmake_rpaths_env = spack.build_environment.get_rpaths(self.pkg)
- cmake_rpaths_path = ";".join(cmake_rpaths_env)
- complete_rpath_list = cmake_rpaths_path
- if "SPACK_COMPILER_EXTRA_RPATHS" in os.environ:
- spack_extra_rpaths_env = os.environ["SPACK_COMPILER_EXTRA_RPATHS"]
- spack_extra_rpaths_path = spack_extra_rpaths_env.replace(os.pathsep, ";")
- complete_rpath_list = "{0};{1}".format(complete_rpath_list, spack_extra_rpaths_path)
-
- if "SPACK_COMPILER_IMPLICIT_RPATHS" in os.environ:
- spack_implicit_rpaths_env = os.environ["SPACK_COMPILER_IMPLICIT_RPATHS"]
- spack_implicit_rpaths_path = spack_implicit_rpaths_env.replace(os.pathsep, ";")
- complete_rpath_list = "{0};{1}".format(complete_rpath_list, spack_implicit_rpaths_path)
return [
"#------------------{0}".format("-" * 60),
@@ -307,8 +308,6 @@ class CachedCMakeBuilder(CMakeBuilder):
"#------------------{0}\n".format("-" * 60),
cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path),
cmake_cache_string("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "ON"),
- cmake_cache_string("CMAKE_BUILD_RPATH", complete_rpath_list),
- cmake_cache_string("CMAKE_INSTALL_RPATH", complete_rpath_list),
self.define_cmake_cache_from_variant("CMAKE_BUILD_TYPE", "build_type"),
]
@@ -336,7 +335,7 @@ class CachedCMakeBuilder(CMakeBuilder):
args.extend(["-C", self.cache_path])
return args
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def install_cmake_cache(self):
fs.mkdirp(self.pkg.spec.prefix.share.cmake)
fs.install(self.cache_path, self.pkg.spec.prefix.share.cmake)
diff --git a/lib/spack/spack/build_systems/cargo.py b/lib/spack/spack/build_systems/cargo.py
index 0aa31b4855..a27ded465c 100644
--- a/lib/spack/spack/build_systems/cargo.py
+++ b/lib/spack/spack/build_systems/cargo.py
@@ -3,20 +3,19 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
import llnl.util.filesystem as fs
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, depends_on
from spack.multimethod import when
-from ._checks import BaseBuilder, execute_install_time_tests
+from ._checks import BuilderWithDefaults, execute_install_time_tests
class CargoPackage(spack.package_base.PackageBase):
- """Specialized class for packages built using a Makefiles."""
+ """Specialized class for packages built using cargo."""
#: This attribute is used in UI queries that need to know the build
#: system base class
@@ -29,7 +28,7 @@ class CargoPackage(spack.package_base.PackageBase):
@spack.builder.builder("cargo")
-class CargoBuilder(BaseBuilder):
+class CargoBuilder(BuilderWithDefaults):
"""The Cargo builder encodes the most common way of building software with
a rust Cargo.toml file. It has two phases that can be overridden, if need be:
@@ -72,18 +71,16 @@ class CargoBuilder(BaseBuilder):
def build(self, pkg, spec, prefix):
"""Runs ``cargo install`` in the source directory"""
with fs.working_dir(self.build_directory):
- inspect.getmodule(pkg).cargo(
- "install", "--root", "out", "--path", ".", *self.build_args
- )
+ pkg.module.cargo("install", "--root", "out", "--path", ".", *self.build_args)
def install(self, pkg, spec, prefix):
"""Copy build files into package prefix."""
with fs.working_dir(self.build_directory):
fs.install_tree("out", prefix)
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
def check(self):
"""Run "cargo test"."""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).cargo("test", *self.check_args)
+ self.pkg.module.cargo("test", *self.check_args)
diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py
index 73f88d4e8e..010d427633 100644
--- a/lib/spack/spack/build_systems/cmake.py
+++ b/lib/spack/spack/build_systems/cmake.py
@@ -3,23 +3,30 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections.abc
-import inspect
import os
import pathlib
import platform
import re
import sys
-from typing import List, Optional, Tuple
+from itertools import chain
+from typing import Any, List, Optional, Tuple
import llnl.util.filesystem as fs
+from llnl.util.lang import stable_partition
-import spack.build_environment
import spack.builder
+import spack.deptypes as dt
+import spack.error
import spack.package_base
+import spack.phase_callbacks
+import spack.spec
+import spack.util.prefix
+from spack import traverse
from spack.directives import build_system, conflicts, depends_on, variant
from spack.multimethod import when
+from spack.util.environment import filter_system_paths
-from ._checks import BaseBuilder, execute_build_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests
# Regex to extract the primary generator from the CMake generator
# string.
@@ -31,11 +38,95 @@ def _extract_primary_generator(generator):
primary generator from the generator string which may contain an
optional secondary generator.
"""
- primary_generator = _primary_generator_extractor.match(generator).group(1)
- return primary_generator
+ return _primary_generator_extractor.match(generator).group(1)
+
+
+def _maybe_set_python_hints(pkg: spack.package_base.PackageBase, args: List[str]) -> None:
+ """Set the PYTHON_EXECUTABLE, Python_EXECUTABLE, and Python3_EXECUTABLE CMake variables
+ if the package has Python as build or link dep and ``find_python_hints`` is set to True. See
+ ``find_python_hints`` for context."""
+ if not getattr(pkg, "find_python_hints", False) or not pkg.spec.dependencies(
+ "python", dt.BUILD | dt.LINK
+ ):
+ return
+ python_executable = pkg.spec["python"].command.path
+ args.extend(
+ [
+ define("PYTHON_EXECUTABLE", python_executable),
+ define("Python_EXECUTABLE", python_executable),
+ define("Python3_EXECUTABLE", python_executable),
+ ]
+ )
+
+
+def _supports_compilation_databases(pkg: spack.package_base.PackageBase) -> bool:
+ """Check if this package (and CMake) can support compilation databases."""
+
+ # CMAKE_EXPORT_COMPILE_COMMANDS only exists for CMake >= 3.5
+ if not pkg.spec.satisfies("^cmake@3.5:"):
+ return False
+
+ # CMAKE_EXPORT_COMPILE_COMMANDS is only implemented for Makefile and Ninja generators
+ if not (pkg.spec.satisfies("generator=make") or pkg.spec.satisfies("generator=ninja")):
+ return False
+
+ return True
+
+
+def _conditional_cmake_defaults(pkg: spack.package_base.PackageBase, args: List[str]) -> None:
+ """Set a few default defines for CMake, depending on its version."""
+ cmakes = pkg.spec.dependencies("cmake", dt.BUILD)
+
+ if len(cmakes) != 1:
+ return
+
+ cmake = cmakes[0]
+
+ # CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
+ try:
+ ipo = pkg.spec.variants["ipo"].value
+ except KeyError:
+ ipo = False
+
+ if cmake.satisfies("@3.9:"):
+ args.append(define("CMAKE_INTERPROCEDURAL_OPTIMIZATION", ipo))
+
+ # Disable Package Registry: export(PACKAGE) may put files in the user's home directory, and
+ # find_package may search there. This is not what we want.
+
+ # Do not populate CMake User Package Registry
+ if cmake.satisfies("@3.15:"):
+ # see https://cmake.org/cmake/help/latest/policy/CMP0090.html
+ args.append(define("CMAKE_POLICY_DEFAULT_CMP0090", "NEW"))
+ elif cmake.satisfies("@3.1:"):
+ # see https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY.html
+ args.append(define("CMAKE_EXPORT_NO_PACKAGE_REGISTRY", True))
+
+ # Do not use CMake User/System Package Registry
+ # https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#disabling-the-package-registry
+ if cmake.satisfies("@3.16:"):
+ args.append(define("CMAKE_FIND_USE_PACKAGE_REGISTRY", False))
+ elif cmake.satisfies("@3.1:3.15"):
+ args.append(define("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY", False))
+ args.append(define("CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY", False))
+ # Export a compilation database if supported.
+ if _supports_compilation_databases(pkg):
+ args.append(define("CMAKE_EXPORT_COMPILE_COMMANDS", True))
-def generator(*names: str, default: Optional[str] = None):
+ # Enable MACOSX_RPATH by default when cmake_minimum_required < 3
+ # https://cmake.org/cmake/help/latest/policy/CMP0042.html
+ if pkg.spec.satisfies("platform=darwin") and cmake.satisfies("@3:"):
+ args.append(define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"))
+
+ # Disable find package's config mode for versions of Boost that
+ # didn't provide it. See https://github.com/spack/spack/issues/20169
+ # and https://cmake.org/cmake/help/latest/module/FindBoost.html
+ if pkg.spec.satisfies("^boost@:1.69.0"):
+ args.append(define("Boost_NO_BOOST_CMAKE", True))
+
+
+def generator(*names: str, default: Optional[str] = None) -> None:
"""The build system generator to use.
See ``cmake --help`` for a list of valid generators.
@@ -67,11 +158,33 @@ def generator(*names: str, default: Optional[str] = None):
default=default,
values=_values,
description="the build system generator to use",
+ when="build_system=cmake",
)
for x in not_used:
conflicts(f"generator={x}")
+def get_cmake_prefix_path(pkg: spack.package_base.PackageBase) -> List[str]:
+ """Obtain the CMAKE_PREFIX_PATH entries for a package, based on the cmake_prefix_path package
+ attribute of direct build/test and transitive link dependencies."""
+ edges = traverse.traverse_topo_edges_generator(
+ traverse.with_artificial_edges([pkg.spec]),
+ visitor=traverse.MixedDepthVisitor(
+ direct=dt.BUILD | dt.TEST, transitive=dt.LINK, key=traverse.by_dag_hash
+ ),
+ key=traverse.by_dag_hash,
+ root=False,
+ all_edges=False, # cover all nodes, not all edges
+ )
+ ordered_specs = [edge.spec for edge in edges]
+ # Separate out externals so they do not shadow Spack prefixes
+ externals, spack_built = stable_partition((s for s in ordered_specs), lambda x: x.external)
+
+ return filter_system_paths(
+ path for spec in chain(spack_built, externals) for path in spec.package.cmake_prefix_paths
+ )
+
+
class CMakePackage(spack.package_base.PackageBase):
"""Specialized class for packages built using CMake
@@ -86,6 +199,13 @@ class CMakePackage(spack.package_base.PackageBase):
#: Legacy buildsystem attribute used to deserialize and install old specs
legacy_buildsystem = "cmake"
+ #: When this package depends on Python and ``find_python_hints`` is set to True, pass the
+ #: defines {Python3,Python,PYTHON}_EXECUTABLE explicitly, so that CMake locates the right
+ #: Python in its builtin FindPython3, FindPython, and FindPythonInterp modules. Spack does
+ #: CMake's job because CMake's modules by default only search for Python versions known at the
+ #: time of release.
+ find_python_hints = True
+
build_system("cmake")
with when("build_system=cmake"):
@@ -156,15 +276,15 @@ class CMakePackage(spack.package_base.PackageBase):
# Legacy methods (used by too many packages to change them,
# need to forward to the builder)
- def define(self, *args, **kwargs):
- return self.builder.define(*args, **kwargs)
+ def define(self, cmake_var: str, value: Any) -> str:
+ return define(cmake_var, value)
- def define_from_variant(self, *args, **kwargs):
- return self.builder.define_from_variant(*args, **kwargs)
+ def define_from_variant(self, cmake_var: str, variant: Optional[str] = None) -> str:
+ return define_from_variant(self, cmake_var, variant)
@spack.builder.builder("cmake")
-class CMakeBuilder(BaseBuilder):
+class CMakeBuilder(BuilderWithDefaults):
"""The cmake builder encodes the default way of building software with CMake. IT
has three phases that can be overridden:
@@ -214,12 +334,15 @@ class CMakeBuilder(BaseBuilder):
build_time_test_callbacks = ["check"]
@property
- def archive_files(self):
+ def archive_files(self) -> List[str]:
"""Files to archive for packages based on CMake"""
- return [os.path.join(self.build_directory, "CMakeCache.txt")]
+ files = [os.path.join(self.build_directory, "CMakeCache.txt")]
+ if _supports_compilation_databases(self.pkg):
+ files.append(os.path.join(self.build_directory, "compile_commands.json"))
+ return files
@property
- def root_cmakelists_dir(self):
+ def root_cmakelists_dir(self) -> str:
"""The relative path to the directory containing CMakeLists.txt
This path is relative to the root of the extracted tarball,
@@ -228,25 +351,28 @@ class CMakeBuilder(BaseBuilder):
return self.pkg.stage.source_path
@property
- def generator(self):
+ def generator(self) -> str:
if self.spec.satisfies("generator=make"):
return "Unix Makefiles"
if self.spec.satisfies("generator=ninja"):
return "Ninja"
- msg = f'{self.spec.format()} has an unsupported value for the "generator" variant'
- raise ValueError(msg)
+ raise ValueError(
+ f'{self.spec.format()} has an unsupported value for the "generator" variant'
+ )
@property
- def std_cmake_args(self):
+ def std_cmake_args(self) -> List[str]:
"""Standard cmake arguments provided as a property for
convenience of package writers
"""
- std_cmake_args = CMakeBuilder.std_args(self.pkg, generator=self.generator)
- std_cmake_args += getattr(self.pkg, "cmake_flag_args", [])
- return std_cmake_args
+ args = CMakeBuilder.std_args(self.pkg, generator=self.generator)
+ args += getattr(self.pkg, "cmake_flag_args", [])
+ return args
@staticmethod
- def std_args(pkg, generator=None):
+ def std_args(
+ pkg: spack.package_base.PackageBase, generator: Optional[str] = None
+ ) -> List[str]:
"""Computes the standard cmake arguments for a generic package"""
default_generator = "Ninja" if sys.platform == "win32" else "Unix Makefiles"
generator = generator or default_generator
@@ -256,30 +382,30 @@ class CMakeBuilder(BaseBuilder):
msg = "Invalid CMake generator: '{0}'\n".format(generator)
msg += "CMakePackage currently supports the following "
msg += "primary generators: '{0}'".format("', '".join(valid_primary_generators))
- raise spack.package_base.InstallError(msg)
+ raise spack.error.InstallError(msg)
try:
build_type = pkg.spec.variants["build_type"].value
except KeyError:
build_type = "RelWithDebInfo"
- try:
- ipo = pkg.spec.variants["ipo"].value
- except KeyError:
- ipo = False
-
- define = CMakeBuilder.define
args = [
"-G",
generator,
define("CMAKE_INSTALL_PREFIX", pathlib.Path(pkg.prefix).as_posix()),
+ define("CMAKE_INSTALL_RPATH_USE_LINK_PATH", True),
+ # only include the install prefix lib dirs; rpaths for deps are added by USE_LINK_PATH
+ define(
+ "CMAKE_INSTALL_RPATH",
+ [
+ pathlib.Path(pkg.prefix, "lib").as_posix(),
+ pathlib.Path(pkg.prefix, "lib64").as_posix(),
+ ],
+ ),
+ define("CMAKE_PREFIX_PATH", get_cmake_prefix_path(pkg)),
define("CMAKE_BUILD_TYPE", build_type),
]
- # CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
- if pkg.spec.satisfies("^cmake@3.9:"):
- args.append(define("CMAKE_INTERPROCEDURAL_OPTIMIZATION", ipo))
-
if primary_generator == "Unix Makefiles":
args.append(define("CMAKE_VERBOSE_MAKEFILE", True))
@@ -288,208 +414,233 @@ class CMakeBuilder(BaseBuilder):
[define("CMAKE_FIND_FRAMEWORK", "LAST"), define("CMAKE_FIND_APPBUNDLE", "LAST")]
)
- # Set up CMake rpath
- args.extend(
- [
- define("CMAKE_INSTALL_RPATH_USE_LINK_PATH", True),
- define("CMAKE_INSTALL_RPATH", spack.build_environment.get_rpaths(pkg)),
- define("CMAKE_PREFIX_PATH", spack.build_environment.get_cmake_prefix_path(pkg)),
- ]
- )
+ _conditional_cmake_defaults(pkg, args)
+ _maybe_set_python_hints(pkg, args)
return args
@staticmethod
- def define_cuda_architectures(pkg):
- """Returns the str ``-DCMAKE_CUDA_ARCHITECTURES:STRING=(expanded cuda_arch)``.
+ def define_cuda_architectures(pkg: spack.package_base.PackageBase) -> str:
+ return define_cuda_architectures(pkg)
+
+ @staticmethod
+ def define_hip_architectures(pkg: spack.package_base.PackageBase) -> str:
+ return define_hip_architectures(pkg)
+
+ @staticmethod
+ def define(cmake_var: str, value: Any) -> str:
+ return define(cmake_var, value)
- ``cuda_arch`` is variant composed of a list of target CUDA architectures and
- it is declared in the cuda package.
+ def define_from_variant(self, cmake_var: str, variant: Optional[str] = None) -> str:
+ return define_from_variant(self.pkg, cmake_var, variant)
- This method is no-op for cmake<3.18 and when ``cuda_arch`` variant is not set.
+ @property
+ def build_dirname(self) -> str:
+ """Directory name to use when building the package."""
+ return f"spack-build-{self.pkg.spec.dag_hash(7)}"
+
+ @property
+ def build_directory(self) -> str:
+ """Full-path to the directory to use when building the package."""
+ return os.path.join(self.pkg.stage.path, self.build_dirname)
+
+ def cmake_args(self) -> List[str]:
+ """List of all the arguments that must be passed to cmake, except:
+ * CMAKE_INSTALL_PREFIX
+ * CMAKE_BUILD_TYPE
+
+ which will be set automatically.
"""
- cmake_flag = str()
- if "cuda_arch" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.18:"):
- cmake_flag = CMakeBuilder.define(
- "CMAKE_CUDA_ARCHITECTURES", pkg.spec.variants["cuda_arch"].value
- )
+ return []
- return cmake_flag
+ def cmake(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
+ """Runs ``cmake`` in the build directory"""
- @staticmethod
- def define_hip_architectures(pkg):
- """Returns the str ``-DCMAKE_HIP_ARCHITECTURES:STRING=(expanded amdgpu_target)``.
+ # skip cmake phase if it is an incremental develop build
+ if spec.is_develop and os.path.isfile(
+ os.path.join(self.build_directory, "CMakeCache.txt")
+ ):
+ return
- ``amdgpu_target`` is variant composed of a list of the target HIP
- architectures and it is declared in the rocm package.
+ options = self.std_cmake_args
+ options += self.cmake_args()
+ options.append(os.path.abspath(self.root_cmakelists_dir))
+ with fs.working_dir(self.build_directory, create=True):
+ pkg.module.cmake(*options)
+
+ def build(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
+ """Make the build targets"""
+ with fs.working_dir(self.build_directory):
+ if self.generator == "Unix Makefiles":
+ pkg.module.make(*self.build_targets)
+ elif self.generator == "Ninja":
+ self.build_targets.append("-v")
+ pkg.module.ninja(*self.build_targets)
+
+ def install(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
+ """Make the install targets"""
+ with fs.working_dir(self.build_directory):
+ if self.generator == "Unix Makefiles":
+ pkg.module.make(*self.install_targets)
+ elif self.generator == "Ninja":
+ pkg.module.ninja(*self.install_targets)
- This method is no-op for cmake<3.18 and when ``amdgpu_target`` variant is
- not set.
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
+ def check(self) -> None:
+ """Search the CMake-generated files for the targets ``test`` and ``check``,
+ and runs them if found.
"""
- cmake_flag = str()
- if "amdgpu_target" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.21:"):
- cmake_flag = CMakeBuilder.define(
- "CMAKE_HIP_ARCHITECTURES", pkg.spec.variants["amdgpu_target"].value
- )
+ with fs.working_dir(self.build_directory):
+ if self.generator == "Unix Makefiles":
+ self.pkg._if_make_target_execute("test", jobs_env="CTEST_PARALLEL_LEVEL")
+ self.pkg._if_make_target_execute("check")
+ elif self.generator == "Ninja":
+ self.pkg._if_ninja_target_execute("test", jobs_env="CTEST_PARALLEL_LEVEL")
+ self.pkg._if_ninja_target_execute("check")
- return cmake_flag
- @staticmethod
- def define(cmake_var, value):
- """Return a CMake command line argument that defines a variable.
+def define(cmake_var: str, value: Any) -> str:
+ """Return a CMake command line argument that defines a variable.
- The resulting argument will convert boolean values to OFF/ON
- and lists/tuples to CMake semicolon-separated string lists. All other
- values will be interpreted as strings.
+ The resulting argument will convert boolean values to OFF/ON and lists/tuples to CMake
+ semicolon-separated string lists. All other values will be interpreted as strings.
- Examples:
+ Examples:
- .. code-block:: python
+ .. code-block:: python
- [define('BUILD_SHARED_LIBS', True),
- define('CMAKE_CXX_STANDARD', 14),
- define('swr', ['avx', 'avx2'])]
+ [define("BUILD_SHARED_LIBS", True),
+ define("CMAKE_CXX_STANDARD", 14),
+ define("swr", ["avx", "avx2"])]
- will generate the following configuration options:
+ will generate the following configuration options:
- .. code-block:: console
+ .. code-block:: console
- ["-DBUILD_SHARED_LIBS:BOOL=ON",
- "-DCMAKE_CXX_STANDARD:STRING=14",
- "-DSWR:STRING=avx;avx2]
+ ["-DBUILD_SHARED_LIBS:BOOL=ON",
+ "-DCMAKE_CXX_STANDARD:STRING=14",
+ "-DSWR:STRING=avx;avx2]
- """
- # Create a list of pairs. Each pair includes a configuration
- # option and whether or not that option is activated
- if isinstance(value, bool):
- kind = "BOOL"
- value = "ON" if value else "OFF"
+ """
+ # Create a list of pairs. Each pair includes a configuration
+ # option and whether or not that option is activated
+ if isinstance(value, bool):
+ kind = "BOOL"
+ value = "ON" if value else "OFF"
+ else:
+ kind = "STRING"
+ if isinstance(value, collections.abc.Sequence) and not isinstance(value, str):
+ value = ";".join(str(v) for v in value)
else:
- kind = "STRING"
- if isinstance(value, collections.abc.Sequence) and not isinstance(value, str):
- value = ";".join(str(v) for v in value)
- else:
- value = str(value)
+ value = str(value)
- return "".join(["-D", cmake_var, ":", kind, "=", value])
+ return "".join(["-D", cmake_var, ":", kind, "=", value])
- def define_from_variant(self, cmake_var, variant=None):
- """Return a CMake command line argument from the given variant's value.
- The optional ``variant`` argument defaults to the lower-case transform
- of ``cmake_var``.
+def define_from_variant(
+ pkg: spack.package_base.PackageBase, cmake_var: str, variant: Optional[str] = None
+) -> str:
+ """Return a CMake command line argument from the given variant's value.
- This utility function is similar to
- :meth:`~spack.build_systems.autotools.AutotoolsBuilder.with_or_without`.
+ The optional ``variant`` argument defaults to the lower-case transform
+ of ``cmake_var``.
- Examples:
+ Examples:
- Given a package with:
+ Given a package with:
- .. code-block:: python
+ .. code-block:: python
- variant('cxxstd', default='11', values=('11', '14'),
- multi=False, description='')
- variant('shared', default=True, description='')
- variant('swr', values=any_combination_of('avx', 'avx2'),
- description='')
+ variant("cxxstd", default="11", values=("11", "14"),
+ multi=False, description="")
+ variant("shared", default=True, description="")
+ variant("swr", values=any_combination_of("avx", "avx2"),
+ description="")
- calling this function like:
+ calling this function like:
- .. code-block:: python
+ .. code-block:: python
- [self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
- self.define_from_variant('CMAKE_CXX_STANDARD', 'cxxstd'),
- self.define_from_variant('SWR')]
+ [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
+ self.define_from_variant("SWR"),
+ ]
- will generate the following configuration options:
+ will generate the following configuration options:
- .. code-block:: console
+ .. code-block:: console
- ["-DBUILD_SHARED_LIBS:BOOL=ON",
- "-DCMAKE_CXX_STANDARD:STRING=14",
- "-DSWR:STRING=avx;avx2]
+ [
+ "-DBUILD_SHARED_LIBS:BOOL=ON",
+ "-DCMAKE_CXX_STANDARD:STRING=14",
+ "-DSWR:STRING=avx;avx2",
+ ]
- for ``<spec-name> cxxstd=14 +shared swr=avx,avx2``
+ for ``<spec-name> cxxstd=14 +shared swr=avx,avx2``
- Note: if the provided variant is conditional, and the condition is not met,
- this function returns an empty string. CMake discards empty strings
- provided on the command line.
- """
+ Note: if the provided variant is conditional, and the condition is not met, this function
+ returns an empty string. CMake discards empty strings provided on the command line.
+ """
+ if variant is None:
+ variant = cmake_var.lower()
- if variant is None:
- variant = cmake_var.lower()
+ if not pkg.has_variant(variant):
+ raise KeyError('"{0}" is not a variant of "{1}"'.format(variant, pkg.name))
- if variant not in self.pkg.variants:
- raise KeyError('"{0}" is not a variant of "{1}"'.format(variant, self.pkg.name))
+ if variant not in pkg.spec.variants:
+ return ""
- if variant not in self.pkg.spec.variants:
- return ""
+ value = pkg.spec.variants[variant].value
+ if isinstance(value, (tuple, list)):
+ # Sort multi-valued variants for reproducibility
+ value = sorted(value)
- value = self.pkg.spec.variants[variant].value
- if isinstance(value, (tuple, list)):
- # Sort multi-valued variants for reproducibility
- value = sorted(value)
+ return define(cmake_var, value)
- return self.define(cmake_var, value)
- @property
- def build_dirname(self):
- """Directory name to use when building the package."""
- return "spack-build-%s" % self.pkg.spec.dag_hash(7)
+def define_hip_architectures(pkg: spack.package_base.PackageBase) -> str:
+ """Returns the str ``-DCMAKE_HIP_ARCHITECTURES:STRING=(expanded amdgpu_target)``.
- @property
- def build_directory(self):
- """Full-path to the directory to use when building the package."""
- return os.path.join(self.pkg.stage.path, self.build_dirname)
+ ``amdgpu_target`` is variant composed of a list of the target HIP
+ architectures and it is declared in the rocm package.
- def cmake_args(self):
- """List of all the arguments that must be passed to cmake, except:
+ This method is no-op for cmake<3.18 and when ``amdgpu_target`` variant is
+ not set.
- * CMAKE_INSTALL_PREFIX
- * CMAKE_BUILD_TYPE
+ """
+ if "amdgpu_target" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.21:"):
+ return define("CMAKE_HIP_ARCHITECTURES", pkg.spec.variants["amdgpu_target"].value)
- which will be set automatically.
- """
- return []
+ return ""
- def cmake(self, pkg, spec, prefix):
- """Runs ``cmake`` in the build directory"""
- options = self.std_cmake_args
- options += self.cmake_args()
- options.append(os.path.abspath(self.root_cmakelists_dir))
- with fs.working_dir(self.build_directory, create=True):
- inspect.getmodule(self.pkg).cmake(*options)
- def build(self, pkg, spec, prefix):
- """Make the build targets"""
- with fs.working_dir(self.build_directory):
- if self.generator == "Unix Makefiles":
- inspect.getmodule(self.pkg).make(*self.build_targets)
- elif self.generator == "Ninja":
- self.build_targets.append("-v")
- inspect.getmodule(self.pkg).ninja(*self.build_targets)
+def define_cuda_architectures(pkg: spack.package_base.PackageBase) -> str:
+ """Returns the str ``-DCMAKE_CUDA_ARCHITECTURES:STRING=(expanded cuda_arch)``.
- def install(self, pkg, spec, prefix):
- """Make the install targets"""
- with fs.working_dir(self.build_directory):
- if self.generator == "Unix Makefiles":
- inspect.getmodule(self.pkg).make(*self.install_targets)
- elif self.generator == "Ninja":
- inspect.getmodule(self.pkg).ninja(*self.install_targets)
+ ``cuda_arch`` is variant composed of a list of target CUDA architectures and
+ it is declared in the cuda package.
- spack.builder.run_after("build")(execute_build_time_tests)
+ This method is no-op for cmake<3.18 and when ``cuda_arch`` variant is not set.
- def check(self):
- """Search the CMake-generated files for the targets ``test`` and ``check``,
- and runs them if found.
- """
- with fs.working_dir(self.build_directory):
- if self.generator == "Unix Makefiles":
- self.pkg._if_make_target_execute("test", jobs_env="CTEST_PARALLEL_LEVEL")
- self.pkg._if_make_target_execute("check")
- elif self.generator == "Ninja":
- self.pkg._if_ninja_target_execute("test", jobs_env="CTEST_PARALLEL_LEVEL")
- self.pkg._if_ninja_target_execute("check")
+ """
+ if "cuda_arch" in pkg.spec.variants and pkg.spec.satisfies("^cmake@3.18:"):
+ return define("CMAKE_CUDA_ARCHITECTURES", pkg.spec.variants["cuda_arch"].value)
+ return ""
diff --git a/lib/spack/spack/build_systems/compiler.py b/lib/spack/spack/build_systems/compiler.py
new file mode 100644
index 0000000000..65a85ecddf
--- /dev/null
+++ b/lib/spack/spack/build_systems/compiler.py
@@ -0,0 +1,145 @@
+# Copyright 2013-2023 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 itertools
+import os
+import pathlib
+import re
+import sys
+from typing import Dict, List, Sequence, Tuple, Union
+
+import llnl.util.tty as tty
+from llnl.util.lang import classproperty
+
+import spack.compiler
+import spack.package_base
+import spack.util.executable
+
+# Local "type" for type hints
+Path = Union[str, pathlib.Path]
+
+
+class CompilerPackage(spack.package_base.PackageBase):
+ """A Package mixin for all common logic for packages that implement compilers"""
+
+ # TODO: how do these play nicely with other tags
+ tags: Sequence[str] = ["compiler"]
+
+ #: Optional suffix regexes for searching for this type of compiler.
+ #: Suffixes are used by some frameworks, e.g. macports uses an '-mp-X.Y'
+ #: version suffix for gcc.
+ compiler_suffixes: List[str] = [r"-.*"]
+
+ #: Optional prefix regexes for searching for this compiler
+ compiler_prefixes: List[str] = []
+
+ #: Compiler argument(s) that produces version information
+ #: If multiple arguments, the earlier arguments must produce errors when invalid
+ compiler_version_argument: Union[str, Tuple[str]] = "-dumpversion"
+
+ #: Regex used to extract version from compiler's output
+ compiler_version_regex: str = "(.*)"
+
+ #: Static definition of languages supported by this class
+ compiler_languages: Sequence[str] = ["c", "cxx", "fortran"]
+
+ def __init__(self, spec: "spack.spec.Spec"):
+ super().__init__(spec)
+ msg = f"Supported languages for {spec} are not a subset of possible supported languages"
+ msg += f" supports: {self.supported_languages}, valid values: {self.compiler_languages}"
+ assert set(self.supported_languages) <= set(self.compiler_languages), msg
+
+ @property
+ def supported_languages(self) -> Sequence[str]:
+ """Dynamic definition of languages supported by this package"""
+ return self.compiler_languages
+
+ @classproperty
+ def compiler_names(cls) -> Sequence[str]:
+ """Construct list of compiler names from per-language names"""
+ names = []
+ for language in cls.compiler_languages:
+ names.extend(getattr(cls, f"{language}_names"))
+ return names
+
+ @classproperty
+ def executables(cls) -> Sequence[str]:
+ """Construct executables for external detection from names, prefixes, and suffixes."""
+ regexp_fmt = r"^({0}){1}({2})$"
+ prefixes = [""] + cls.compiler_prefixes
+ suffixes = [""] + cls.compiler_suffixes
+ if sys.platform == "win32":
+ ext = r"\.(?:exe|bat)"
+ suffixes += [suf + ext for suf in suffixes]
+ return [
+ regexp_fmt.format(prefix, re.escape(name), suffix)
+ for prefix, name, suffix in itertools.product(prefixes, cls.compiler_names, suffixes)
+ ]
+
+ @classmethod
+ def determine_version(cls, exe: Path):
+ version_argument = cls.compiler_version_argument
+ if isinstance(version_argument, str):
+ version_argument = (version_argument,)
+
+ for va in version_argument:
+ try:
+ output = spack.compiler.get_compiler_version_output(exe, va)
+ match = re.search(cls.compiler_version_regex, output)
+ if match:
+ return ".".join(match.groups())
+ except spack.util.executable.ProcessError:
+ pass
+ except Exception as e:
+ tty.debug(
+ f"[{__file__}] Cannot detect a valid version for the executable "
+ f"{str(exe)}, for package '{cls.name}': {e}"
+ )
+
+ @classmethod
+ def compiler_bindir(cls, prefix: Path) -> Path:
+ """Overridable method for the location of the compiler bindir within the preifx"""
+ return os.path.join(prefix, "bin")
+
+ @classmethod
+ def determine_compiler_paths(cls, exes: Sequence[Path]) -> Dict[str, Path]:
+ """Compute the paths to compiler executables associated with this package
+
+ This is a helper method for ``determine_variants`` to compute the ``extra_attributes``
+ to include with each spec object."""
+ # There are often at least two copies (not symlinks) of each compiler executable in the
+ # same directory: one with a canonical name, e.g. "gfortran", and another one with the
+ # target prefix, e.g. "x86_64-pc-linux-gnu-gfortran". There also might be a copy of "gcc"
+ # with the version suffix, e.g. "x86_64-pc-linux-gnu-gcc-6.3.0". To ensure the consistency
+ # of values in the "paths" dictionary (i.e. we prefer all of them to reference copies
+ # with canonical names if possible), we iterate over the executables in the reversed sorted
+ # order:
+ # First pass over languages identifies exes that are perfect matches for canonical names
+ # Second pass checks for names with prefix/suffix
+ # Second pass is sorted by language name length because longer named languages
+ # e.g. cxx can often contain the names of shorter named languages
+ # e.g. c (e.g. clang/clang++)
+ paths = {}
+ exes = sorted(exes, reverse=True)
+ languages = {
+ lang: getattr(cls, f"{lang}_names")
+ for lang in sorted(cls.compiler_languages, key=len, reverse=True)
+ }
+ for exe in exes:
+ for lang, names in languages.items():
+ if os.path.basename(exe) in names:
+ paths[lang] = exe
+ break
+ else:
+ for lang, names in languages.items():
+ if any(name in os.path.basename(exe) for name in names):
+ paths[lang] = exe
+ break
+
+ return paths
+
+ @classmethod
+ def determine_variants(cls, exes: Sequence[Path], version_str: str) -> Tuple:
+ # path determination is separated so it can be reused in subclasses
+ return "", {"compilers": cls.determine_compiler_paths(exes=exes)}
diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py
index 4311df3a17..d25c63ed19 100644
--- a/lib/spack/spack/build_systems/cuda.py
+++ b/lib/spack/spack/build_systems/cuda.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+from typing import Iterable, List
+
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.multimethod import when
@@ -44,6 +47,7 @@ class CudaPackage(PackageBase):
"87",
"89",
"90",
+ "90a",
)
# FIXME: keep cuda and cuda_arch separate to make usage easier until
@@ -70,6 +74,27 @@ class CudaPackage(PackageBase):
for s in arch_list
]
+ @staticmethod
+ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:
+ """Adds a decimal place to each CUDA arch.
+
+ >>> compute_capabilities(['90', '90a'])
+ ['9.0', '9.0a']
+
+ Args:
+ arch_list: A list of integer strings, optionally followed by a suffix.
+
+ Returns:
+ A list of float strings, optionally followed by a suffix
+ """
+ pattern = re.compile(r"(\d+)")
+ capabilities = []
+ for arch in arch_list:
+ _, number, letter = re.split(pattern, arch)
+ number = "{0:.1f}".format(float(number) / 10.0)
+ capabilities.append(number + letter)
+ return capabilities
+
depends_on("cuda", when="+cuda")
# CUDA version vs Architecture
@@ -85,8 +110,8 @@ class CudaPackage(PackageBase):
depends_on("cuda@5.0:10.2", when="cuda_arch=30")
depends_on("cuda@5.0:10.2", when="cuda_arch=32")
- depends_on("cuda@5.0:", when="cuda_arch=35")
- depends_on("cuda@6.5:", when="cuda_arch=37")
+ depends_on("cuda@5.0:11.8", when="cuda_arch=35")
+ depends_on("cuda@6.5:11.8", when="cuda_arch=37")
depends_on("cuda@6.0:", when="cuda_arch=50")
depends_on("cuda@6.5:", when="cuda_arch=52")
@@ -106,13 +131,13 @@ class CudaPackage(PackageBase):
depends_on("cuda@11.8:", when="cuda_arch=89")
depends_on("cuda@12.0:", when="cuda_arch=90")
+ depends_on("cuda@12.0:", when="cuda_arch=90a")
# From the NVIDIA install guide we know of conflicts for particular
# platforms (linux, darwin), architectures (x86, powerpc) and compilers
# (gcc, clang). We don't restrict %gcc and %clang conflicts to
- # platform=linux, since they should also apply to platform=cray, and may
- # apply to platform=darwin. We currently do not provide conflicts for
- # platform=darwin with %apple-clang.
+ # platform=linux, since they may apply to platform=darwin. We currently
+ # do not provide conflicts for platform=darwin with %apple-clang.
# Linux x86_64 compiler conflicts from here:
# https://gist.github.com/ax3l/9489132
@@ -125,6 +150,7 @@ class CudaPackage(PackageBase):
# minimum supported versions
conflicts("%gcc@:4", when="+cuda ^cuda@11.0:")
conflicts("%gcc@:5", when="+cuda ^cuda@11.4:")
+ conflicts("%clang@:6", when="+cuda ^cuda@12.2:")
# maximum supported version
# NOTE:
@@ -137,11 +163,15 @@ class CudaPackage(PackageBase):
conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5")
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.3")
+ conflicts("%gcc@14:", when="+cuda ^cuda@:12.6")
conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0")
conflicts("%clang@13:", when="+cuda ^cuda@:11.5")
conflicts("%clang@14:", when="+cuda ^cuda@:11.7")
conflicts("%clang@15:", when="+cuda ^cuda@:12.0")
- conflicts("%clang@16:", when="+cuda ^cuda@:12.3")
+ conflicts("%clang@16:", when="+cuda ^cuda@:12.1")
+ conflicts("%clang@17:", when="+cuda ^cuda@:12.3")
+ conflicts("%clang@18:", when="+cuda ^cuda@:12.5")
+ conflicts("%clang@19:", when="+cuda ^cuda@:12.6")
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")
@@ -150,13 +180,6 @@ class CudaPackage(PackageBase):
conflicts("%gcc@7:", when="+cuda ^cuda@:9.1 target=x86_64:")
conflicts("%gcc@8:", when="+cuda ^cuda@:10.0.130 target=x86_64:")
conflicts("%gcc@9:", when="+cuda ^cuda@:10.2.89 target=x86_64:")
- conflicts("%pgi@:14.8", when="+cuda ^cuda@:7.0.27 target=x86_64:")
- conflicts("%pgi@:15.3,15.5:", when="+cuda ^cuda@7.5 target=x86_64:")
- conflicts("%pgi@:16.2,16.0:16.3", when="+cuda ^cuda@8 target=x86_64:")
- conflicts("%pgi@:15,18:", when="+cuda ^cuda@9.0:9.1 target=x86_64:")
- conflicts("%pgi@:16,19:", when="+cuda ^cuda@9.2.88:10.0 target=x86_64:")
- conflicts("%pgi@:17,20:", when="+cuda ^cuda@10.1.105:10.2.89 target=x86_64:")
- conflicts("%pgi@:17,21:", when="+cuda ^cuda@11.0.2:11.1.0 target=x86_64:")
conflicts("%clang@:3.4", when="+cuda ^cuda@:7.5 target=x86_64:")
conflicts("%clang@:3.7,4:", when="+cuda ^cuda@8.0:9.0 target=x86_64:")
conflicts("%clang@:3.7,4.1:", when="+cuda ^cuda@9.1 target=x86_64:")
@@ -182,9 +205,6 @@ class CudaPackage(PackageBase):
conflicts("%gcc@8:", when="+cuda ^cuda@:10.0.130 target=ppc64le:")
conflicts("%gcc@9:", when="+cuda ^cuda@:10.1.243 target=ppc64le:")
# officially, CUDA 11.0.2 only supports the system GCC 8.3 on ppc64le
- conflicts("%pgi", when="+cuda ^cuda@:8 target=ppc64le:")
- conflicts("%pgi@:16", when="+cuda ^cuda@:9.1.185 target=ppc64le:")
- conflicts("%pgi@:17", when="+cuda ^cuda@:10 target=ppc64le:")
conflicts("%clang@4:", when="+cuda ^cuda@:9.0.176 target=ppc64le:")
conflicts("%clang@5:", when="+cuda ^cuda@:9.1 target=ppc64le:")
conflicts("%clang@6:", when="+cuda ^cuda@:9.2 target=ppc64le:")
@@ -209,12 +229,21 @@ class CudaPackage(PackageBase):
conflicts("%intel@19.0:", when="+cuda ^cuda@:10.0")
conflicts("%intel@19.1:", when="+cuda ^cuda@:10.1")
conflicts("%intel@19.2:", when="+cuda ^cuda@:11.1.0")
+ conflicts("%intel@2021:", when="+cuda ^cuda@:11.4.0")
+
+ # ARM
+ # https://github.com/spack/spack/pull/39666#issuecomment-2377609263
+ # Might need to be expanded to other gcc versions
+ conflicts("%gcc@13.2.0", when="+cuda ^cuda@:12.4 target=aarch64:")
# XL is mostly relevant for ppc64le Linux
conflicts("%xl@:12,14:", when="+cuda ^cuda@:9.1")
conflicts("%xl@:12,14:15,17:", when="+cuda ^cuda@9.2")
conflicts("%xl@:12,17:", when="+cuda ^cuda@:11.1.0")
+ # PowerPC.
+ conflicts("target=ppc64le", when="+cuda ^cuda@12.5:")
+
# Darwin.
# TODO: add missing conflicts for %apple-clang cuda@:10
- conflicts("platform=darwin", when="+cuda ^cuda@11.0.2: ")
+ conflicts("platform=darwin", when="+cuda ^cuda@11.0.2:")
diff --git a/lib/spack/spack/build_systems/generic.py b/lib/spack/spack/build_systems/generic.py
index 5a0446a4ad..781aba9b0f 100644
--- a/lib/spack/spack/build_systems/generic.py
+++ b/lib/spack/spack/build_systems/generic.py
@@ -7,8 +7,9 @@ from typing import Tuple
import spack.builder
import spack.directives
import spack.package_base
+import spack.phase_callbacks
-from ._checks import BaseBuilder, apply_macos_rpath_fixups, execute_install_time_tests
+from ._checks import BuilderWithDefaults, apply_macos_rpath_fixups, execute_install_time_tests
class Package(spack.package_base.PackageBase):
@@ -26,7 +27,7 @@ class Package(spack.package_base.PackageBase):
@spack.builder.builder("generic")
-class GenericBuilder(BaseBuilder):
+class GenericBuilder(BuilderWithDefaults):
"""A builder for a generic build system, that require packagers
to implement an "install" phase.
"""
@@ -44,7 +45,7 @@ class GenericBuilder(BaseBuilder):
install_time_test_callbacks = []
# On macOS, force rpaths for shared library IDs and remove duplicate rpaths
- spack.builder.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
+ spack.phase_callbacks.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
# unconditionally perform any post-install phase tests
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
diff --git a/lib/spack/spack/build_systems/go.py b/lib/spack/spack/build_systems/go.py
index 95472642f6..bcd38d65bd 100644
--- a/lib/spack/spack/build_systems/go.py
+++ b/lib/spack/spack/build_systems/go.py
@@ -3,16 +3,15 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
import llnl.util.filesystem as fs
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, extends
from spack.multimethod import when
-from ._checks import BaseBuilder, execute_install_time_tests
+from ._checks import BuilderWithDefaults, execute_install_time_tests
class GoPackage(spack.package_base.PackageBase):
@@ -34,7 +33,7 @@ class GoPackage(spack.package_base.PackageBase):
@spack.builder.builder("go")
-class GoBuilder(BaseBuilder):
+class GoBuilder(BuilderWithDefaults):
"""The Go builder encodes the most common way of building software with
a golang go.mod file. It has two phases that can be overridden, if need be:
@@ -46,16 +45,27 @@ class GoBuilder(BaseBuilder):
+-----------------------------------------------+--------------------+
| **Method** | **Purpose** |
+===============================================+====================+
- | :py:meth:`~.GoBuilder.build_args` | Specify arguments |
+ | :py:attr:`~.GoBuilder.build_args` | Specify arguments |
| | to ``go build`` |
+-----------------------------------------------+--------------------+
- | :py:meth:`~.GoBuilder.check_args` | Specify arguments |
+ | :py:attr:`~.GoBuilder.check_args` | Specify arguments |
| | to ``go test`` |
+-----------------------------------------------+--------------------+
"""
phases = ("build", "install")
+ #: Names associated with package methods in the old build-system format
+ legacy_methods = ("check", "installcheck")
+
+ #: Names associated with package attributes in the old build-system format
+ legacy_attributes = (
+ "build_args",
+ "check_args",
+ "build_directory",
+ "install_time_test_callbacks",
+ )
+
#: Callback names for install-time test
install_time_test_callbacks = ["check"]
@@ -72,7 +82,7 @@ class GoBuilder(BaseBuilder):
def build_args(self):
"""Arguments for ``go build``."""
# Pass ldflags -s = --strip-all and -w = --no-warnings by default
- return ["-ldflags", "-s -w", "-o", f"{self.pkg.name}"]
+ return ["-modcacherw", "-ldflags", "-s -w", "-o", f"{self.pkg.name}"]
@property
def check_args(self):
@@ -82,7 +92,7 @@ class GoBuilder(BaseBuilder):
def build(self, pkg, spec, prefix):
"""Runs ``go build`` in the source directory"""
with fs.working_dir(self.build_directory):
- inspect.getmodule(pkg).go("build", *self.build_args)
+ pkg.module.go("build", *self.build_args)
def install(self, pkg, spec, prefix):
"""Install built binaries into prefix bin."""
@@ -90,9 +100,9 @@ class GoBuilder(BaseBuilder):
fs.mkdirp(prefix.bin)
fs.install(pkg.name, prefix.bin)
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
def check(self):
"""Run ``go test .`` in the source directory"""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).go("test", *self.check_args)
+ self.pkg.module.go("test", *self.check_args)
diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py
index 0dfe4ede26..0a791f8999 100644
--- a/lib/spack/spack/build_systems/intel.py
+++ b/lib/spack/spack/build_systems/intel.py
@@ -23,8 +23,9 @@ from llnl.util.filesystem import (
)
import spack.error
+import spack.phase_callbacks
from spack.build_environment import dso_suffix
-from spack.package_base import InstallError
+from spack.error import InstallError
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
from spack.util.prefix import Prefix
@@ -218,7 +219,7 @@ class IntelPackage(Package):
"+inspector": " intel-inspector",
"+itac": " intel-itac intel-ta intel-tc" " intel-trace-analyzer intel-trace-collector",
# Trace Analyzer and Collector
- "+vtune": " intel-vtune"
+ "+vtune": " intel-vtune",
# VTune, ..-profiler since 2020, ..-amplifier before
}.items():
if variant in self.spec:
@@ -846,6 +847,7 @@ class IntelPackage(Package):
"^mpich@2:" in spec_root
or "^cray-mpich" in spec_root
or "^mvapich2" in spec_root
+ or "^mvapich" in spec_root
or "^intel-mpi" in spec_root
or "^intel-oneapi-mpi" in spec_root
or "^intel-parallel-studio" in spec_root
@@ -936,32 +938,15 @@ class IntelPackage(Package):
"I_MPI_ROOT": self.normalize_path("mpi"),
}
- # CAUTION - SIMILAR code in:
- # var/spack/repos/builtin/packages/mpich/package.py
- # var/spack/repos/builtin/packages/openmpi/package.py
- # var/spack/repos/builtin/packages/mvapich2/package.py
- #
- # On Cray, the regular compiler wrappers *are* the MPI wrappers.
- if "platform=cray" in self.spec:
- # TODO: Confirm
- wrapper_vars.update(
- {
- "MPICC": compilers_of_client["CC"],
- "MPICXX": compilers_of_client["CXX"],
- "MPIF77": compilers_of_client["F77"],
- "MPIF90": compilers_of_client["F90"],
- }
- )
- else:
- compiler_wrapper_commands = self.mpi_compiler_wrappers
- wrapper_vars.update(
- {
- "MPICC": compiler_wrapper_commands["MPICC"],
- "MPICXX": compiler_wrapper_commands["MPICXX"],
- "MPIF77": compiler_wrapper_commands["MPIF77"],
- "MPIF90": compiler_wrapper_commands["MPIF90"],
- }
- )
+ compiler_wrapper_commands = self.mpi_compiler_wrappers
+ wrapper_vars.update(
+ {
+ "MPICC": compiler_wrapper_commands["MPICC"],
+ "MPICXX": compiler_wrapper_commands["MPICXX"],
+ "MPIF77": compiler_wrapper_commands["MPIF77"],
+ "MPIF90": compiler_wrapper_commands["MPIF90"],
+ }
+ )
# Ensure that the directory containing the compiler wrappers is in the
# PATH. Spack packages add `prefix.bin` to their dependents' paths,
@@ -1178,7 +1163,7 @@ class IntelPackage(Package):
debug_print(license_type)
return license_type
- @spack.builder.run_before("install")
+ @spack.phase_callbacks.run_before("install")
def configure(self):
"""Generates the silent.cfg file to pass to installer.sh.
@@ -1265,7 +1250,7 @@ class IntelPackage(Package):
for f in glob.glob("%s/intel*log" % tmpdir):
install(f, dst)
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def validate_install(self):
# Sometimes the installer exits with an error but doesn't pass a
# non-zero exit code to spack. Check for the existence of a 'bin'
@@ -1273,7 +1258,7 @@ class IntelPackage(Package):
if not os.path.exists(self.prefix.bin):
raise InstallError("The installer has failed to install anything.")
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def configure_rpath(self):
if "+rpath" not in self.spec:
return
@@ -1291,7 +1276,7 @@ class IntelPackage(Package):
with open(compiler_cfg, "w") as fh:
fh.write("-Xlinker -rpath={0}\n".format(compilers_lib_dir))
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def configure_auto_dispatch(self):
if self._has_compilers:
if "auto_dispatch=none" in self.spec:
@@ -1315,7 +1300,7 @@ class IntelPackage(Package):
with open(compiler_cfg, "a") as fh:
fh.write("-ax{0}\n".format(",".join(ad)))
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def filter_compiler_wrappers(self):
if ("+mpi" in self.spec or self.provides("mpi")) and "~newdtags" in self.spec:
bin_dir = self.component_bin_dir("mpi")
@@ -1323,7 +1308,7 @@ class IntelPackage(Package):
f = os.path.join(bin_dir, f)
filter_file("-Xlinker --enable-new-dtags", " ", f, string=True)
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def uninstall_ism(self):
# The "Intel(R) Software Improvement Program" [ahem] gets installed,
# apparently regardless of PHONEHOME_SEND_USAGE_DATA.
@@ -1355,7 +1340,7 @@ class IntelPackage(Package):
debug_print(d)
return d
- @spack.builder.run_after("install")
+ @spack.phase_callbacks.run_after("install")
def modify_LLVMgold_rpath(self):
"""Add libimf.so and other required libraries to the RUNPATH of LLVMgold.so.
diff --git a/lib/spack/spack/build_systems/lua.py b/lib/spack/spack/build_systems/lua.py
index d862604e90..9b19e1ef26 100644
--- a/lib/spack/spack/build_systems/lua.py
+++ b/lib/spack/spack/build_systems/lua.py
@@ -29,15 +29,12 @@ class LuaPackage(spack.package_base.PackageBase):
with when("build_system=lua"):
depends_on("lua-lang")
- extends("lua", when="^lua")
- with when("^lua-luajit"):
- extends("lua-luajit")
- depends_on("luajit")
- depends_on("lua-luajit+lualinks")
- with when("^lua-luajit-openresty"):
- extends("lua-luajit-openresty")
- depends_on("luajit")
- depends_on("lua-luajit-openresty+lualinks")
+ with when("^[virtuals=lua-lang] lua"):
+ extends("lua")
+ with when("^[virtuals=lua-lang] lua-luajit"):
+ extends("lua-luajit+lualinks")
+ with when("^[virtuals=lua-lang] lua-luajit-openresty"):
+ extends("lua-luajit-openresty+lualinks")
@property
def lua(self):
diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py
index baae2308a2..083cab3744 100644
--- a/lib/spack/spack/build_systems/makefile.py
+++ b/lib/spack/spack/build_systems/makefile.py
@@ -2,18 +2,20 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
from typing import List
import llnl.util.filesystem as fs
import spack.builder
import spack.package_base
+import spack.phase_callbacks
+import spack.spec
+import spack.util.prefix
from spack.directives import build_system, conflicts, depends_on
from spack.multimethod import when
from ._checks import (
- BaseBuilder,
+ BuilderWithDefaults,
apply_macos_rpath_fixups,
execute_build_time_tests,
execute_install_time_tests,
@@ -21,7 +23,7 @@ from ._checks import (
class MakefilePackage(spack.package_base.PackageBase):
- """Specialized class for packages built using a Makefiles."""
+ """Specialized class for packages built using Makefiles."""
#: This attribute is used in UI queries that need to know the build
#: system base class
@@ -37,7 +39,7 @@ class MakefilePackage(spack.package_base.PackageBase):
@spack.builder.builder("makefile")
-class MakefileBuilder(BaseBuilder):
+class MakefileBuilder(BuilderWithDefaults):
"""The Makefile builder encodes the most common way of building software with
Makefiles. It has three phases that can be overridden, if need be:
@@ -92,35 +94,50 @@ class MakefileBuilder(BaseBuilder):
install_time_test_callbacks = ["installcheck"]
@property
- def build_directory(self):
+ def build_directory(self) -> str:
"""Return the directory containing the main Makefile."""
return self.pkg.stage.source_path
- def edit(self, pkg, spec, prefix):
+ def edit(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Edit the Makefile before calling make. The default is a no-op."""
pass
- def build(self, pkg, spec, prefix):
+ def build(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run "make" on the build targets specified by the builder."""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make(*self.build_targets)
-
- def install(self, pkg, spec, prefix):
+ pkg.module.make(*self.build_targets)
+
+ def install(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run "make" on the install targets specified by the builder."""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make(*self.install_targets)
+ pkg.module.make(*self.install_targets)
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
- def check(self):
+ def check(self) -> None:
"""Run "make" on the ``test`` and ``check`` targets, if found."""
with fs.working_dir(self.build_directory):
self.pkg._if_make_target_execute("test")
self.pkg._if_make_target_execute("check")
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
- def installcheck(self):
+ def installcheck(self) -> None:
"""Searches the Makefile for an ``installcheck`` target
and runs it if found.
"""
@@ -128,4 +145,4 @@ class MakefileBuilder(BaseBuilder):
self.pkg._if_make_target_execute("installcheck")
# On macOS, force rpaths for shared library IDs and remove duplicate rpaths
- spack.builder.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
+ spack.phase_callbacks.run_after("install", when="platform=darwin")(apply_macos_rpath_fixups)
diff --git a/lib/spack/spack/build_systems/maven.py b/lib/spack/spack/build_systems/maven.py
index 809258d5df..962d05f96c 100644
--- a/lib/spack/spack/build_systems/maven.py
+++ b/lib/spack/spack/build_systems/maven.py
@@ -10,7 +10,7 @@ from spack.directives import build_system, depends_on
from spack.multimethod import when
from spack.util.executable import which
-from ._checks import BaseBuilder
+from ._checks import BuilderWithDefaults
class MavenPackage(spack.package_base.PackageBase):
@@ -34,7 +34,7 @@ class MavenPackage(spack.package_base.PackageBase):
@spack.builder.builder("maven")
-class MavenBuilder(BaseBuilder):
+class MavenBuilder(BuilderWithDefaults):
"""The Maven builder encodes the default way to build software with Maven.
It has two phases that can be overridden, if need be:
diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py
index 860fa4cf1b..8a5ea5d850 100644
--- a/lib/spack/spack/build_systems/meson.py
+++ b/lib/spack/spack/build_systems/meson.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
from typing import List
@@ -10,10 +9,13 @@ import llnl.util.filesystem as fs
import spack.builder
import spack.package_base
+import spack.phase_callbacks
+import spack.spec
+import spack.util.prefix
from spack.directives import build_system, conflicts, depends_on, variant
from spack.multimethod import when
-from ._checks import BaseBuilder, execute_build_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests
class MesonPackage(spack.package_base.PackageBase):
@@ -63,7 +65,7 @@ class MesonPackage(spack.package_base.PackageBase):
@spack.builder.builder("meson")
-class MesonBuilder(BaseBuilder):
+class MesonBuilder(BuilderWithDefaults):
"""The Meson builder encodes the default way to build software with Meson.
The builder has three phases that can be overridden, if need be:
@@ -113,7 +115,7 @@ class MesonBuilder(BaseBuilder):
return [os.path.join(self.build_directory, "meson-logs", "meson-log.txt")]
@property
- def root_mesonlists_dir(self):
+ def root_mesonlists_dir(self) -> str:
"""Relative path to the directory containing meson.build
This path is relative to the root of the extracted tarball,
@@ -122,7 +124,7 @@ class MesonBuilder(BaseBuilder):
return self.pkg.stage.source_path
@property
- def std_meson_args(self):
+ def std_meson_args(self) -> List[str]:
"""Standard meson arguments provided as a property for convenience
of package writers.
"""
@@ -133,7 +135,7 @@ class MesonBuilder(BaseBuilder):
return std_meson_args
@staticmethod
- def std_args(pkg):
+ def std_args(pkg) -> List[str]:
"""Standard meson arguments for a generic package."""
try:
build_type = pkg.spec.variants["buildtype"].value
@@ -149,7 +151,7 @@ class MesonBuilder(BaseBuilder):
else:
default_library = "shared"
- args = [
+ return [
"-Dprefix={0}".format(pkg.prefix),
# If we do not specify libdir explicitly, Meson chooses something
# like lib/x86_64-linux-gnu, which causes problems when trying to
@@ -163,8 +165,6 @@ class MesonBuilder(BaseBuilder):
"-Dwrap_mode=nodownload",
]
- return args
-
@property
def build_dirname(self):
"""Returns the directory name to use when building the package."""
@@ -175,7 +175,7 @@ class MesonBuilder(BaseBuilder):
"""Directory to use when building the package."""
return os.path.join(self.pkg.stage.path, self.build_dirname)
- def meson_args(self):
+ def meson_args(self) -> List[str]:
"""List of arguments that must be passed to meson, except:
* ``--prefix``
@@ -188,7 +188,12 @@ class MesonBuilder(BaseBuilder):
"""
return []
- def meson(self, pkg, spec, prefix):
+ def meson(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Run ``meson`` in the build directory"""
options = []
if self.spec["meson"].satisfies("@0.64:"):
@@ -197,23 +202,33 @@ class MesonBuilder(BaseBuilder):
options += self.std_meson_args
options += self.meson_args()
with fs.working_dir(self.build_directory, create=True):
- inspect.getmodule(self.pkg).meson(*options)
-
- def build(self, pkg, spec, prefix):
+ pkg.module.meson(*options)
+
+ def build(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Make the build targets"""
options = ["-v"]
options += self.build_targets
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).ninja(*options)
-
- def install(self, pkg, spec, prefix):
+ pkg.module.ninja(*options)
+
+ def install(
+ self,
+ pkg: spack.package_base.PackageBase,
+ spec: spack.spec.Spec,
+ prefix: spack.util.prefix.Prefix,
+ ) -> None:
"""Make the install targets"""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).ninja(*self.install_targets)
+ pkg.module.ninja(*self.install_targets)
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
- def check(self):
+ def check(self) -> None:
"""Search Meson-generated files for the target ``test`` and run it if found."""
with fs.working_dir(self.build_directory):
self.pkg._if_ninja_target_execute("test")
diff --git a/lib/spack/spack/build_systems/msbuild.py b/lib/spack/spack/build_systems/msbuild.py
index 4de8c86e0a..3ffc721215 100644
--- a/lib/spack/spack/build_systems/msbuild.py
+++ b/lib/spack/spack/build_systems/msbuild.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
from typing import List # novm
import llnl.util.filesystem as fs
@@ -11,7 +10,7 @@ import spack.builder
import spack.package_base
from spack.directives import build_system, conflicts
-from ._checks import BaseBuilder
+from ._checks import BuilderWithDefaults
class MSBuildPackage(spack.package_base.PackageBase):
@@ -24,11 +23,10 @@ class MSBuildPackage(spack.package_base.PackageBase):
build_system("msbuild")
conflicts("platform=linux", when="build_system=msbuild")
conflicts("platform=darwin", when="build_system=msbuild")
- conflicts("platform=cray", when="build_system=msbuild")
@spack.builder.builder("msbuild")
-class MSBuildBuilder(BaseBuilder):
+class MSBuildBuilder(BuilderWithDefaults):
"""The MSBuild builder encodes the most common way of building software with
Mircosoft's MSBuild tool. It has two phases that can be overridden, if need be:
@@ -69,7 +67,7 @@ class MSBuildBuilder(BaseBuilder):
@property
def build_directory(self):
"""Return the directory containing the MSBuild solution or vcxproj."""
- return self.pkg.stage.source_path
+ return fs.windows_sfn(self.pkg.stage.source_path)
@property
def toolchain_version(self):
@@ -105,7 +103,7 @@ class MSBuildBuilder(BaseBuilder):
def build(self, pkg, spec, prefix):
"""Run "msbuild" on the build targets specified by the builder."""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).msbuild(
+ pkg.module.msbuild(
*self.std_msbuild_args,
*self.msbuild_args(),
self.define_targets(*self.build_targets),
@@ -115,6 +113,6 @@ class MSBuildBuilder(BaseBuilder):
"""Run "msbuild" on the install targets specified by the builder.
This is INSTALL by default"""
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).msbuild(
+ pkg.module.msbuild(
*self.msbuild_install_args(), self.define_targets(*self.install_targets)
)
diff --git a/lib/spack/spack/build_systems/nmake.py b/lib/spack/spack/build_systems/nmake.py
index b9148dcd9f..b6eb75e3e5 100644
--- a/lib/spack/spack/build_systems/nmake.py
+++ b/lib/spack/spack/build_systems/nmake.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
from typing import List # novm
import llnl.util.filesystem as fs
@@ -11,7 +10,7 @@ import spack.builder
import spack.package_base
from spack.directives import build_system, conflicts
-from ._checks import BaseBuilder
+from ._checks import BuilderWithDefaults
class NMakePackage(spack.package_base.PackageBase):
@@ -24,11 +23,10 @@ class NMakePackage(spack.package_base.PackageBase):
build_system("nmake")
conflicts("platform=linux", when="build_system=nmake")
conflicts("platform=darwin", when="build_system=nmake")
- conflicts("platform=cray", when="build_system=nmake")
@spack.builder.builder("nmake")
-class NMakeBuilder(BaseBuilder):
+class NMakeBuilder(BuilderWithDefaults):
"""The NMake builder encodes the most common way of building software with
Mircosoft's NMake tool. It has two phases that can be overridden, if need be:
@@ -77,7 +75,11 @@ class NMakeBuilder(BaseBuilder):
@property
def build_directory(self):
"""Return the directory containing the makefile."""
- return self.pkg.stage.source_path if not self.makefile_root else self.makefile_root
+ return (
+ fs.windows_sfn(self.pkg.stage.source_path)
+ if not self.makefile_root
+ else fs.windows_sfn(self.makefile_root)
+ )
@property
def std_nmake_args(self):
@@ -129,9 +131,7 @@ class NMakeBuilder(BaseBuilder):
if self.makefile_name:
opts.append("/F{}".format(self.makefile_name))
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).nmake(
- *opts, *self.build_targets, ignore_quotes=self.ignore_quotes
- )
+ pkg.module.nmake(*opts, *self.build_targets, ignore_quotes=self.ignore_quotes)
def install(self, pkg, spec, prefix):
"""Run "nmake" on the install targets specified by the builder.
@@ -141,8 +141,6 @@ class NMakeBuilder(BaseBuilder):
opts += self.nmake_install_args()
if self.makefile_name:
opts.append("/F{}".format(self.makefile_name))
- opts.append(self.define("PREFIX", prefix))
+ opts.append(self.define("PREFIX", fs.windows_sfn(prefix)))
with fs.working_dir(self.build_directory):
- inspect.getmodule(self.pkg).nmake(
- *opts, *self.install_targets, ignore_quotes=self.ignore_quotes
- )
+ pkg.module.nmake(*opts, *self.install_targets, ignore_quotes=self.ignore_quotes)
diff --git a/lib/spack/spack/build_systems/octave.py b/lib/spack/spack/build_systems/octave.py
index 64958ce941..e8f1576785 100644
--- a/lib/spack/spack/build_systems/octave.py
+++ b/lib/spack/spack/build_systems/octave.py
@@ -2,14 +2,12 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
import spack.builder
import spack.package_base
from spack.directives import build_system, extends
from spack.multimethod import when
-from ._checks import BaseBuilder
+from ._checks import BuilderWithDefaults
class OctavePackage(spack.package_base.PackageBase):
@@ -31,7 +29,7 @@ class OctavePackage(spack.package_base.PackageBase):
@spack.builder.builder("octave")
-class OctaveBuilder(BaseBuilder):
+class OctaveBuilder(BuilderWithDefaults):
"""The octave builder provides the following phases that can be overridden:
1. :py:meth:`~.OctaveBuilder.install`
@@ -47,7 +45,7 @@ class OctaveBuilder(BaseBuilder):
def install(self, pkg, spec, prefix):
"""Install the package from the archive file"""
- inspect.getmodule(self.pkg).octave(
+ pkg.module.octave(
"--quiet",
"--norc",
"--built-in-docstrings-file=/dev/null",
diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py
index f1e63761bc..9082d4f8ab 100644
--- a/lib/spack/spack/build_systems/oneapi.py
+++ b/lib/spack/spack/build_systems/oneapi.py
@@ -3,16 +3,19 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Common utilities for managing intel oneapi packages."""
-import getpass
import os
import platform
import shutil
from os.path import basename, isdir
-from llnl.util.filesystem import HeaderList, find_libraries, join_path, mkdirp
+from llnl.util import tty
+from llnl.util.filesystem import HeaderList, LibraryList, find_libraries, join_path, mkdirp
from llnl.util.link_tree import LinkTree
-from spack.directives import conflicts, variant
+import spack.util.path
+from spack.build_environment import dso_suffix
+from spack.directives import conflicts, license, redistribute, variant
+from spack.error import InstallError
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
@@ -23,18 +26,18 @@ class IntelOneApiPackage(Package):
"""Base class for Intel oneAPI packages."""
homepage = "https://software.intel.com/oneapi"
+ license("https://intel.ly/393CijO")
# oneAPI license does not allow mirroring outside of the
# organization (e.g. University/Company).
- redistribute_source = False
+ redistribute(source=False, binary=False)
for c in [
"target=ppc64:",
"target=ppc64le:",
"target=aarch64:",
- "platform=darwin:",
- "platform=cray:",
- "platform=windows:",
+ "platform=darwin",
+ "platform=windows",
]:
conflicts(c, msg="This package in only available for x86_64 and Linux")
@@ -96,7 +99,7 @@ class IntelOneApiPackage(Package):
# with other install depends on the userid. For root, we
# delete the installercache before and after install. For
# non root we redefine the HOME environment variable.
- if getpass.getuser() == "root":
+ if spack.util.path.get_user() == "root":
shutil.rmtree("/var/intel/installercache", ignore_errors=True)
bash = Executable("bash")
@@ -119,7 +122,7 @@ class IntelOneApiPackage(Package):
self.prefix,
)
- if getpass.getuser() == "root":
+ if spack.util.path.get_user() == "root":
shutil.rmtree("/var/intel/installercache", ignore_errors=True)
# Some installers have a bug and do not return an error code when failing
@@ -179,16 +182,72 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage):
"""
+ def openmp_libs(self):
+ """Supply LibraryList for linking OpenMP"""
+
+ # NB: Hunting down explicit library files may be the Spack way of
+ # doing things, but it is better to add the compiler defined option
+ # e.g. -fopenmp
+
+ # If other packages use openmp, then all the packages need to
+ # support the same ABI. Spack usually uses the same compiler
+ # for all the packages, but you can force it if necessary:
+ #
+ # e.g. spack install blaspp%oneapi@2024 ^intel-oneapi-mkl%oneapi@2024
+ #
+ if self.spec.satisfies("%intel") or self.spec.satisfies("%oneapi"):
+ libname = "libiomp5"
+ elif self.spec.satisfies("%gcc"):
+ libname = "libgomp"
+ elif self.spec.satisfies("%clang"):
+ libname = "libomp"
+ else:
+ raise InstallError(
+ "OneAPI package with OpenMP threading requires one of %clang, %gcc, %oneapi, "
+ "or %intel"
+ )
+
+ # query the compiler for the library path
+ with self.compiler.compiler_environment():
+ omp_lib_path = Executable(self.compiler.cc)(
+ "--print-file-name", f"{libname}.{dso_suffix}", output=str
+ ).strip()
+
+ # Newer versions of clang do not give the full path to libomp. If that's
+ # the case, look in a path relative to the compiler where libomp is
+ # typically found. If it's not found there, error out.
+ if not os.path.exists(omp_lib_path) and self.spec.satisfies("%clang"):
+ compiler_root = os.path.dirname(os.path.dirname(os.path.realpath(self.compiler.cc)))
+ omp_lib_path_compiler = os.path.join(compiler_root, "lib", f"{libname}.{dso_suffix}")
+ if os.path.exists(omp_lib_path_compiler):
+ omp_lib_path = omp_lib_path_compiler
+
+ # if the compiler cannot find the file, it returns the input path
+ if not os.path.exists(omp_lib_path):
+ raise InstallError(f"OneAPI package cannot locate OpenMP library: {omp_lib_path}")
+
+ omp_libs = LibraryList(omp_lib_path)
+ tty.info(f"OneAPI package requires OpenMP library: {omp_libs}")
+ return omp_libs
+
+ # find_headers uses heuristics to determine the include directory
+ # that does not work for oneapi packages. Use explicit directories
+ # instead.
def header_directories(self, dirs):
h = HeaderList([])
h.directories = dirs
+ # trilinos passes the directories to cmake, and cmake requires
+ # that the directory exists
+ for dir in dirs:
+ if not isdir(dir):
+ raise RuntimeError(f"{dir} does not exist")
return h
@property
def headers(self):
- return self.header_directories(
- [self.component_prefix.include, self.component_prefix.include.join(self.component_dir)]
- )
+ # This should match the directories added to CPATH by
+ # env/vars.sh for the component
+ return self.header_directories([self.component_prefix.include])
@property
def libs(self):
@@ -196,7 +255,7 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage):
return find_libraries("*", root=self.component_prefix.lib, recursive=not self.v2_layout)
-class IntelOneApiLibraryPackageWithSdk(IntelOneApiPackage):
+class IntelOneApiLibraryPackageWithSdk(IntelOneApiLibraryPackage):
"""Base class for Intel oneAPI library packages with SDK components.
Contains some convenient default implementations for libraries
diff --git a/lib/spack/spack/build_systems/perl.py b/lib/spack/spack/build_systems/perl.py
index ff28bfe672..bb47adaaf5 100644
--- a/lib/spack/spack/build_systems/perl.py
+++ b/lib/spack/spack/build_systems/perl.py
@@ -2,17 +2,20 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
+from typing import Iterable
-from llnl.util.filesystem import filter_file
+from llnl.util.filesystem import filter_file, find
+from llnl.util.lang import memoized
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, extends
+from spack.install_test import SkipTest, test_part
from spack.util.executable import Executable
-from ._checks import BaseBuilder, execute_build_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests
class PerlPackage(spack.package_base.PackageBase):
@@ -28,9 +31,61 @@ class PerlPackage(spack.package_base.PackageBase):
extends("perl", when="build_system=perl")
+ @property
+ @memoized
+ def _platform_dir(self):
+ """Name of platform-specific module subdirectory."""
+ perl = self.spec["perl"].command
+ options = "-E", "use Config; say $Config{archname}"
+ out = perl(*options, output=str.split, error=str.split)
+ return out.strip()
+
+ @property
+ def use_modules(self) -> Iterable[str]:
+ """Names of the package's perl modules."""
+ module_files = find(self.prefix.lib, ["*.pm"], recursive=True)
+
+ # Drop the platform directory, if present
+ if self._platform_dir:
+ platform_dir = self._platform_dir + os.sep
+ module_files = [m.replace(platform_dir, "") for m in module_files]
+
+ # Drop the extension and library path
+ prefix = self.prefix.lib + os.sep
+ modules = [os.path.splitext(m)[0].replace(prefix, "") for m in module_files]
+
+ # Drop the perl subdirectory as well
+ return ["::".join(m.split(os.sep)[1:]) for m in modules]
+
+ @property
+ def skip_modules(self) -> Iterable[str]:
+ """Names of modules that should be skipped when running tests.
+
+ These are a subset of use_modules.
+
+ Returns:
+ List of strings of module names.
+ """
+ return []
+
+ def test_use(self):
+ """Test 'use module'"""
+ if not self.use_modules:
+ raise SkipTest("Test requires use_modules package property.")
+
+ perl = self.spec["perl"].command
+ for module in self.use_modules:
+ if module in self.skip_modules:
+ continue
+
+ with test_part(self, f"test_use-{module}", purpose=f"checking use of {module}"):
+ options = ["-we", f'use strict; use {module}; print("OK\n")']
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out
+
@spack.builder.builder("perl")
-class PerlBuilder(BaseBuilder):
+class PerlBuilder(BuilderWithDefaults):
"""The perl builder provides four phases that can be overridden, if required:
1. :py:meth:`~.PerlBuilder.configure`
@@ -52,7 +107,7 @@ class PerlBuilder(BaseBuilder):
phases = ("configure", "build", "install")
#: Names associated with package methods in the old build-system format
- legacy_methods = ("configure_args", "check")
+ legacy_methods = ("configure_args", "check", "test_use")
#: Names associated with package attributes in the old build-system format
legacy_attributes = ()
@@ -79,7 +134,7 @@ class PerlBuilder(BaseBuilder):
def build_executable(self):
"""Returns the executable method to build the perl package"""
if self.build_method == "Makefile.PL":
- build_executable = inspect.getmodule(self.pkg).make
+ build_executable = self.pkg.module.make
elif self.build_method == "Build.PL":
build_executable = Executable(os.path.join(self.pkg.stage.source_path, "Build"))
return build_executable
@@ -103,13 +158,13 @@ class PerlBuilder(BaseBuilder):
options = ["Build.PL", "--install_base", prefix]
options += self.configure_args()
- inspect.getmodule(self.pkg).perl(*options)
+ pkg.module.perl(*options)
# It is possible that the shebang in the Build script that is created from
# Build.PL may be too long causing the build to fail. Patching the shebang
# does not happen until after install so set '/usr/bin/env perl' here in
# the Build script.
- @spack.builder.run_after("configure")
+ @spack.phase_callbacks.run_after("configure")
def fix_shebang(self):
if self.build_method == "Build.PL":
pattern = "#!{0}".format(self.spec["perl"].command.path)
@@ -121,7 +176,7 @@ class PerlBuilder(BaseBuilder):
self.build_executable()
# Ensure that tests run after build (if requested):
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
def check(self):
"""Runs built-in tests of a Perl package."""
diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py
index 39dc7519e8..9f5db48f4d 100644
--- a/lib/spack/spack/build_systems/python.py
+++ b/lib/spack/spack/build_systems/python.py
@@ -2,18 +2,21 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
+
+import functools
+import operator
import os
import re
import shutil
-from typing import Iterable, List, Mapping, Optional
+import stat
+from typing import Dict, Iterable, List, Mapping, Optional, Tuple
import archspec
import llnl.util.filesystem as fs
import llnl.util.lang as lang
import llnl.util.tty as tty
-from llnl.util.filesystem import HeaderList, LibraryList
+from llnl.util.filesystem import HeaderList, LibraryList, join_path
import spack.builder
import spack.config
@@ -21,15 +24,18 @@ import spack.deptypes as dt
import spack.detection
import spack.multimethod
import spack.package_base
+import spack.phase_callbacks
+import spack.platforms
+import spack.repo
import spack.spec
import spack.store
-from spack.directives import build_system, depends_on, extends, maintainers
+from spack.directives import build_system, depends_on, extends
from spack.error import NoHeadersError, NoLibrariesError
from spack.install_test import test_part
from spack.spec import Spec
from spack.util.prefix import Prefix
-from ._checks import BaseBuilder, execute_install_time_tests
+from ._checks import BuilderWithDefaults, execute_install_time_tests
def _flatten_dict(dictionary: Mapping[str, object]) -> Iterable[str]:
@@ -52,8 +58,6 @@ def _flatten_dict(dictionary: Mapping[str, object]) -> Iterable[str]:
class PythonExtension(spack.package_base.PackageBase):
- maintainers("adamjstewart")
-
@property
def import_modules(self) -> Iterable[str]:
"""Names of modules that the Python package provides.
@@ -118,6 +122,12 @@ class PythonExtension(spack.package_base.PackageBase):
"""
return []
+ @property
+ def bindir(self) -> str:
+ """Path to Python package's bindir, bin on unix like OS's Scripts on Windows"""
+ windows = self.spec.satisfies("platform=windows")
+ return join_path(self.spec.prefix, "Scripts" if windows else "bin")
+
def view_file_conflicts(self, view, merge_map):
"""Report all file conflicts, excepting special cases for python.
Specifically, this does not report errors for duplicate
@@ -136,31 +146,57 @@ class PythonExtension(spack.package_base.PackageBase):
return conflicts
def add_files_to_view(self, view, merge_map, skip_if_exists=True):
+ # Patch up shebangs if the package extends Python and we put a Python interpreter in the
+ # view.
if not self.extendee_spec:
return super().add_files_to_view(view, merge_map, skip_if_exists)
+ python, *_ = self.spec.dependencies("python-venv") or self.spec.dependencies("python")
+
+ if python.external:
+ return super().add_files_to_view(view, merge_map, skip_if_exists)
+
+ # We only patch shebangs in the bin directory.
+ copied_files: Dict[Tuple[int, int], str] = {} # File identifier -> source
+ delayed_links: List[Tuple[str, str]] = [] # List of symlinks from merge map
bin_dir = self.spec.prefix.bin
- python_prefix = self.extendee_spec.prefix
- python_is_external = self.extendee_spec.external
- global_view = fs.same_path(python_prefix, view.get_projection_for_spec(self.spec))
+
for src, dst in merge_map.items():
- if os.path.exists(dst):
+ if skip_if_exists and os.path.lexists(dst):
continue
- elif global_view or not fs.path_contains_subdirectory(src, bin_dir):
+
+ if not fs.path_contains_subdirectory(src, bin_dir):
view.link(src, dst)
- elif not os.path.islink(src):
+ continue
+
+ s = os.lstat(src)
+
+ # Symlink is delayed because we may need to re-target if its target is copied in view
+ if stat.S_ISLNK(s.st_mode):
+ delayed_links.append((src, dst))
+ continue
+
+ # If it's executable and has a shebang, copy and patch it.
+ if (s.st_mode & 0b111) and fs.has_shebang(src):
+ copied_files[(s.st_dev, s.st_ino)] = dst
shutil.copy2(src, dst)
- is_script = fs.is_nonsymlink_exe_with_shebang(src)
- if is_script and not python_is_external:
- fs.filter_file(
- python_prefix,
- os.path.abspath(view.get_projection_for_spec(self.spec)),
- dst,
- )
+ fs.filter_file(
+ python.prefix, os.path.abspath(view.get_projection_for_spec(self.spec)), dst
+ )
+ else:
+ view.link(src, dst)
+
+ # Finally re-target the symlinks that point to copied files.
+ for src, dst in delayed_links:
+ try:
+ s = os.stat(src)
+ target = copied_files[(s.st_dev, s.st_ino)]
+ except (OSError, KeyError):
+ target = None
+ if target:
+ os.symlink(os.path.relpath(target, os.path.dirname(dst)), dst)
else:
- orig_link_target = os.path.realpath(src)
- new_link_target = os.path.abspath(merge_map[orig_link_target])
- view.link(new_link_target, dst)
+ view.link(src, dst, spec=self.spec)
def remove_files_from_view(self, view, merge_map):
ignore_namespace = False
@@ -176,14 +212,13 @@ class PythonExtension(spack.package_base.PackageBase):
ignore_namespace = True
bin_dir = self.spec.prefix.bin
- global_view = self.extendee_spec.prefix == view.get_projection_for_spec(self.spec)
to_remove = []
for src, dst in merge_map.items():
if ignore_namespace and namespace_init(dst):
continue
- if global_view or not fs.path_contains_subdirectory(src, bin_dir):
+ if not fs.path_contains_subdirectory(src, bin_dir):
to_remove.append(dst)
else:
os.remove(dst)
@@ -195,7 +230,7 @@ class PythonExtension(spack.package_base.PackageBase):
# Make sure we are importing the installed modules,
# not the ones in the source directory
- python = inspect.getmodule(self).python # type: ignore[union-attr]
+ python = self.module.python
for module in self.import_modules:
with test_part(
self,
@@ -282,9 +317,9 @@ class PythonExtension(spack.package_base.PackageBase):
)
python_externals_detected = [
- d.spec
- for d in python_externals_detection.get("python", [])
- if d.prefix == self.spec.external_path
+ spec
+ for spec in python_externals_detection.get("python", [])
+ if spec.external_path == self.spec.external_path
]
if python_externals_detected:
return python_externals_detected[0]
@@ -305,7 +340,7 @@ class PythonPackage(PythonExtension):
legacy_buildsystem = "python_pip"
#: Callback names for install-time test
- install_time_test_callbacks = ["test"]
+ install_time_test_callbacks = ["test_imports"]
build_system("python_pip")
@@ -340,22 +375,32 @@ class PythonPackage(PythonExtension):
return None
@property
+ def python_spec(self) -> Spec:
+ """Get python-venv if it exists or python otherwise."""
+ python, *_ = self.spec.dependencies("python-venv") or self.spec.dependencies("python")
+ return python
+
+ @property
def headers(self) -> HeaderList:
"""Discover header files in platlib."""
# Remove py- prefix in package name
name = self.spec.name[3:]
- # Headers may be in either location
+ # Headers should only be in include or platlib, but no harm in checking purelib too
include = self.prefix.join(self.spec["python"].package.include).join(name)
- platlib = self.prefix.join(self.spec["python"].package.platlib).join(name)
- headers = fs.find_all_headers(include) + fs.find_all_headers(platlib)
+ python = self.python_spec
+ platlib = self.prefix.join(python.package.platlib).join(name)
+ purelib = self.prefix.join(python.package.purelib).join(name)
+
+ headers_list = map(fs.find_all_headers, [include, platlib, purelib])
+ headers = functools.reduce(operator.add, headers_list)
if headers:
return headers
- msg = "Unable to locate {} headers in {} or {}"
- raise NoHeadersError(msg.format(self.spec.name, include, platlib))
+ msg = "Unable to locate {} headers in {}, {}, or {}"
+ raise NoHeadersError(msg.format(self.spec.name, include, platlib, purelib))
@property
def libs(self) -> LibraryList:
@@ -364,23 +409,28 @@ class PythonPackage(PythonExtension):
# Remove py- prefix in package name
name = self.spec.name[3:]
- root = self.prefix.join(self.spec["python"].package.platlib).join(name)
+ # Libraries should only be in platlib, but no harm in checking purelib too
+ python = self.python_spec
+ platlib = self.prefix.join(python.package.platlib).join(name)
+ purelib = self.prefix.join(python.package.purelib).join(name)
- libs = fs.find_all_libraries(root, recursive=True)
+ find_all_libraries = functools.partial(fs.find_all_libraries, recursive=True)
+ libs_list = map(find_all_libraries, [platlib, purelib])
+ libs = functools.reduce(operator.add, libs_list)
if libs:
return libs
- msg = "Unable to recursively locate {} libraries in {}"
- raise NoLibrariesError(msg.format(self.spec.name, root))
+ msg = "Unable to recursively locate {} libraries in {} or {}"
+ raise NoLibrariesError(msg.format(self.spec.name, platlib, purelib))
@spack.builder.builder("python_pip")
-class PythonPipBuilder(BaseBuilder):
+class PythonPipBuilder(BuilderWithDefaults):
phases = ("install",)
#: Names associated with package methods in the old build-system format
- legacy_methods = ("test",)
+ legacy_methods = ("test_imports",)
#: Same as legacy_methods, but the signature is different
legacy_long_methods = ("install_options", "global_options", "config_settings")
@@ -389,7 +439,7 @@ class PythonPipBuilder(BaseBuilder):
legacy_attributes = ("archive_files", "build_directory", "install_time_test_callbacks")
#: Callback names for install-time test
- install_time_test_callbacks = ["test"]
+ install_time_test_callbacks = ["test_imports"]
@staticmethod
def std_args(cls) -> List[str]:
@@ -474,6 +524,8 @@ class PythonPipBuilder(BaseBuilder):
def install(self, pkg: PythonPackage, spec: Spec, prefix: Prefix) -> None:
"""Install everything from build directory."""
+ pip = spec["python"].command
+ pip.add_default_arg("-m", "pip")
args = PythonPipBuilder.std_args(pkg) + [f"--prefix={prefix}"]
@@ -489,15 +541,7 @@ class PythonPipBuilder(BaseBuilder):
else:
args.append(".")
- pip = spec["python"].command
- # Hide user packages, since we don't have build isolation. This is
- # necessary because pip / setuptools may run hooks from arbitrary
- # packages during the build. There is no equivalent variable to hide
- # system packages, so this is not reliable for external Python.
- pip.add_default_env("PYTHONNOUSERSITE", "1")
- pip.add_default_arg("-m")
- pip.add_default_arg("pip")
with fs.working_dir(self.build_directory):
pip(*args)
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
diff --git a/lib/spack/spack/build_systems/qmake.py b/lib/spack/spack/build_systems/qmake.py
index a1e679b50c..eb530f4b38 100644
--- a/lib/spack/spack/build_systems/qmake.py
+++ b/lib/spack/spack/build_systems/qmake.py
@@ -2,15 +2,14 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from llnl.util.filesystem import working_dir
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, depends_on
-from ._checks import BaseBuilder, execute_build_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests
class QMakePackage(spack.package_base.PackageBase):
@@ -32,7 +31,7 @@ class QMakePackage(spack.package_base.PackageBase):
@spack.builder.builder("qmake")
-class QMakeBuilder(BaseBuilder):
+class QMakeBuilder(BuilderWithDefaults):
"""The qmake builder provides three phases that can be overridden:
1. :py:meth:`~.QMakeBuilder.qmake`
@@ -66,21 +65,21 @@ class QMakeBuilder(BaseBuilder):
def qmake(self, pkg, spec, prefix):
"""Run ``qmake`` to configure the project and generate a Makefile."""
with working_dir(self.build_directory):
- inspect.getmodule(self.pkg).qmake(*self.qmake_args())
+ pkg.module.qmake(*self.qmake_args())
def build(self, pkg, spec, prefix):
"""Make the build targets"""
with working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make()
+ pkg.module.make()
def install(self, pkg, spec, prefix):
"""Make the install targets"""
with working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make("install")
+ pkg.module.make("install")
def check(self):
"""Search the Makefile for a ``check:`` target and runs it if found."""
with working_dir(self.build_directory):
self.pkg._if_make_target_execute("check")
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
diff --git a/lib/spack/spack/build_systems/r.py b/lib/spack/spack/build_systems/r.py
index 5154f5a42d..07bdb3d0ae 100644
--- a/lib/spack/spack/build_systems/r.py
+++ b/lib/spack/spack/build_systems/r.py
@@ -2,10 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
from typing import Optional, Tuple
import llnl.util.lang as lang
+from llnl.util.filesystem import mkdirp
from spack.directives import extends
@@ -37,6 +37,7 @@ class RBuilder(GenericBuilder):
def install(self, pkg, spec, prefix):
"""Installs an R package."""
+ mkdirp(pkg.module.r_lib_dir)
config_args = self.configure_args()
config_vars = self.configure_vars()
@@ -44,14 +45,14 @@ class RBuilder(GenericBuilder):
args = ["--vanilla", "CMD", "INSTALL"]
if config_args:
- args.append("--configure-args={0}".format(" ".join(config_args)))
+ args.append(f"--configure-args={' '.join(config_args)}")
if config_vars:
- args.append("--configure-vars={0}".format(" ".join(config_vars)))
+ args.append(f"--configure-vars={' '.join(config_vars)}")
- args.extend(["--library={0}".format(self.pkg.module.r_lib_dir), self.stage.source_path])
+ args.extend([f"--library={pkg.module.r_lib_dir}", self.stage.source_path])
- inspect.getmodule(self.pkg).R(*args)
+ pkg.module.R(*args)
class RPackage(Package):
@@ -80,27 +81,21 @@ class RPackage(Package):
@lang.classproperty
def homepage(cls):
if cls.cran:
- return "https://cloud.r-project.org/package=" + cls.cran
+ return f"https://cloud.r-project.org/package={cls.cran}"
elif cls.bioc:
- return "https://bioconductor.org/packages/" + cls.bioc
+ return f"https://bioconductor.org/packages/{cls.bioc}"
@lang.classproperty
def url(cls):
if cls.cran:
- return (
- "https://cloud.r-project.org/src/contrib/"
- + cls.cran
- + "_"
- + str(list(cls.versions)[0])
- + ".tar.gz"
- )
+ return f"https://cloud.r-project.org/src/contrib/{cls.cran}_{str(list(cls.versions)[0])}.tar.gz"
@lang.classproperty
def list_url(cls):
if cls.cran:
- return "https://cloud.r-project.org/src/contrib/Archive/" + cls.cran + "/"
+ return f"https://cloud.r-project.org/src/contrib/Archive/{cls.cran}/"
@property
def git(self):
if self.bioc:
- return "https://git.bioconductor.org/packages/" + self.bioc
+ return f"https://git.bioconductor.org/packages/{self.bioc}"
diff --git a/lib/spack/spack/build_systems/racket.py b/lib/spack/spack/build_systems/racket.py
index facac62032..7e48f8b370 100644
--- a/lib/spack/spack/build_systems/racket.py
+++ b/lib/spack/spack/build_systems/racket.py
@@ -11,9 +11,9 @@ import llnl.util.tty as tty
import spack.builder
from spack.build_environment import SPACK_NO_PARALLEL_MAKE
+from spack.config import determine_number_of_jobs
from spack.directives import build_system, extends, maintainers
from spack.package_base import PackageBase
-from spack.util.cpus import determine_number_of_jobs
from spack.util.environment import env_flag
from spack.util.executable import Executable, ProcessError
diff --git a/lib/spack/spack/build_systems/rocm.py b/lib/spack/spack/build_systems/rocm.py
index f6ea0537fd..8094c90c2e 100644
--- a/lib/spack/spack/build_systems/rocm.py
+++ b/lib/spack/spack/build_systems/rocm.py
@@ -75,9 +75,12 @@
# does not like its directory structure.
#
+import os
+
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.package_base import PackageBase
+from spack.util.environment import EnvironmentModifications
class ROCmPackage(PackageBase):
@@ -154,6 +157,25 @@ class ROCmPackage(PackageBase):
archs = ",".join(amdgpu_target)
return "--amdgpu-target={0}".format(archs)
+ def asan_on(self, env: EnvironmentModifications):
+ llvm_path = self.spec["llvm-amdgpu"].prefix
+ env.set("CC", llvm_path + "/bin/clang")
+ env.set("CXX", llvm_path + "/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+
+ for root, _, files in os.walk(llvm_path):
+ if "libclang_rt.asan-x86_64.so" in files:
+ asan_lib_path = root
+ env.prepend_path("LD_LIBRARY_PATH", asan_lib_path)
+ if "rhel" in self.spec.os or "sles" in self.spec.os:
+ SET_DWARF_VERSION_4 = "-gdwarf-5"
+ else:
+ SET_DWARF_VERSION_4 = ""
+
+ env.set("CFLAGS", f"-fsanitize=address -shared-libasan -g {SET_DWARF_VERSION_4}")
+ env.set("CXXFLAGS", f"-fsanitize=address -shared-libasan -g {SET_DWARF_VERSION_4}")
+ env.set("LDFLAGS", "-Wl,--enable-new-dtags -fuse-ld=lld -fsanitize=address -g -Wl,")
+
# HIP version vs Architecture
# TODO: add a bunch of lines like:
@@ -162,23 +184,9 @@ class ROCmPackage(PackageBase):
# Add compiler minimum versions based on the first release where the
# processor is included in llvm/lib/Support/TargetParser.cpp
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx900:xnack-")
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx906:xnack-")
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx908:xnack-")
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx90c")
- depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a")
- depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack-")
- depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx90a:xnack+")
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx940")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx941")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx942")
- depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1013")
- depends_on("llvm-amdgpu@3.8.0:", when="amdgpu_target=gfx1030")
- depends_on("llvm-amdgpu@3.9.0:", when="amdgpu_target=gfx1031")
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1032")
- depends_on("llvm-amdgpu@4.1.0:", when="amdgpu_target=gfx1033")
- depends_on("llvm-amdgpu@4.3.0:", when="amdgpu_target=gfx1034")
- depends_on("llvm-amdgpu@4.5.0:", when="amdgpu_target=gfx1035")
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx1036")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1100")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1101")
diff --git a/lib/spack/spack/build_systems/ruby.py b/lib/spack/spack/build_systems/ruby.py
index 0f069e99f2..50228e2137 100644
--- a/lib/spack/spack/build_systems/ruby.py
+++ b/lib/spack/spack/build_systems/ruby.py
@@ -3,13 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
-import inspect
import spack.builder
import spack.package_base
from spack.directives import build_system, extends, maintainers
-from ._checks import BaseBuilder
+from ._checks import BuilderWithDefaults
class RubyPackage(spack.package_base.PackageBase):
@@ -29,7 +28,7 @@ class RubyPackage(spack.package_base.PackageBase):
@spack.builder.builder("ruby")
-class RubyBuilder(BaseBuilder):
+class RubyBuilder(BuilderWithDefaults):
"""The Ruby builder provides two phases that can be overridden if required:
#. :py:meth:`~.RubyBuilder.build`
@@ -52,10 +51,10 @@ class RubyBuilder(BaseBuilder):
gemspecs = glob.glob("*.gemspec")
rakefiles = glob.glob("Rakefile")
if gemspecs:
- inspect.getmodule(self.pkg).gem("build", "--norc", gemspecs[0])
+ pkg.module.gem("build", "--norc", gemspecs[0])
elif rakefiles:
- jobs = inspect.getmodule(self.pkg).make_jobs
- inspect.getmodule(self.pkg).rake("package", "-j{0}".format(jobs))
+ jobs = pkg.module.make_jobs
+ pkg.module.rake("package", "-j{0}".format(jobs))
else:
# Some Ruby packages only ship `*.gem` files, so nothing to build
pass
@@ -70,6 +69,6 @@ class RubyBuilder(BaseBuilder):
# if --install-dir is not used, GEM_PATH is deleted from the
# environement, and Gems required to build native extensions will
# not be found. Those extensions are built during `gem install`.
- inspect.getmodule(self.pkg).gem(
+ pkg.module.gem(
"install", "--norc", "--ignore-dependencies", "--install-dir", prefix, gems[0]
)
diff --git a/lib/spack/spack/build_systems/scons.py b/lib/spack/spack/build_systems/scons.py
index 0d2ea175a1..5e0211903d 100644
--- a/lib/spack/spack/build_systems/scons.py
+++ b/lib/spack/spack/build_systems/scons.py
@@ -2,13 +2,12 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, depends_on
-from ._checks import BaseBuilder, execute_build_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests
class SConsPackage(spack.package_base.PackageBase):
@@ -30,7 +29,7 @@ class SConsPackage(spack.package_base.PackageBase):
@spack.builder.builder("scons")
-class SConsBuilder(BaseBuilder):
+class SConsBuilder(BuilderWithDefaults):
"""The Scons builder provides the following phases that can be overridden:
1. :py:meth:`~.SConsBuilder.build`
@@ -63,8 +62,7 @@ class SConsBuilder(BaseBuilder):
def build(self, pkg, spec, prefix):
"""Build the package."""
- args = self.build_args(spec, prefix)
- inspect.getmodule(self.pkg).scons(*args)
+ pkg.module.scons(*self.build_args(spec, prefix))
def install_args(self, spec, prefix):
"""Arguments to pass to install."""
@@ -72,9 +70,7 @@ class SConsBuilder(BaseBuilder):
def install(self, pkg, spec, prefix):
"""Install the package."""
- args = self.install_args(spec, prefix)
-
- inspect.getmodule(self.pkg).scons("install", *args)
+ pkg.module.scons("install", *self.install_args(spec, prefix))
def build_test(self):
"""Run unit tests after build.
@@ -84,4 +80,4 @@ class SConsBuilder(BaseBuilder):
"""
pass
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
diff --git a/lib/spack/spack/build_systems/sip.py b/lib/spack/spack/build_systems/sip.py
index 5d93e23ac2..54ce4c6d8e 100644
--- a/lib/spack/spack/build_systems/sip.py
+++ b/lib/spack/spack/build_systems/sip.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
import re
@@ -12,11 +11,12 @@ from llnl.util.filesystem import find, working_dir
import spack.builder
import spack.install_test
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, depends_on, extends
from spack.multimethod import when
from spack.util.executable import Executable
-from ._checks import BaseBuilder, execute_install_time_tests
+from ._checks import BuilderWithDefaults, execute_install_time_tests
class SIPPackage(spack.package_base.PackageBase):
@@ -86,14 +86,13 @@ class SIPPackage(spack.package_base.PackageBase):
def python(self, *args, **kwargs):
"""The python ``Executable``."""
- inspect.getmodule(self).python(*args, **kwargs)
+ self.pkg.module.python(*args, **kwargs)
def test_imports(self):
"""Attempts to import modules of the installed package."""
# Make sure we are importing the installed modules,
# not the ones in the source directory
- python = inspect.getmodule(self).python
for module in self.import_modules:
with spack.install_test.test_part(
self,
@@ -101,11 +100,11 @@ class SIPPackage(spack.package_base.PackageBase):
purpose="checking import of {0}".format(module),
work_dir="spack-test",
):
- python("-c", "import {0}".format(module))
+ self.python("-c", "import {0}".format(module))
@spack.builder.builder("sip")
-class SIPBuilder(BaseBuilder):
+class SIPBuilder(BuilderWithDefaults):
"""The SIP builder provides the following phases that can be overridden:
* configure
@@ -136,9 +135,13 @@ class SIPBuilder(BaseBuilder):
"""Configure the package."""
# https://www.riverbankcomputing.com/static/Docs/sip/command_line_tools.html
- args = ["--verbose", "--target-dir", inspect.getmodule(self.pkg).python_platlib]
+ args = ["--verbose", "--target-dir", pkg.module.python_platlib]
args.extend(self.configure_args())
+ # https://github.com/Python-SIP/sip/commit/cb0be6cb6e9b756b8b0db3136efb014f6fb9b766
+ if spec["py-sip"].satisfies("@6.1.0:"):
+ args.extend(["--scripts-dir", pkg.prefix.bin])
+
sip_build = Executable(spec["py-sip"].prefix.bin.join("sip-build"))
sip_build(*args)
@@ -151,7 +154,7 @@ class SIPBuilder(BaseBuilder):
args = self.build_args()
with working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make(*args)
+ pkg.module.make(*args)
def build_args(self):
"""Arguments to pass to build."""
@@ -162,10 +165,10 @@ class SIPBuilder(BaseBuilder):
args = self.install_args()
with working_dir(self.build_directory):
- inspect.getmodule(self.pkg).make("install", *args)
+ pkg.module.make("install", *args)
def install_args(self):
"""Arguments to pass to install."""
return []
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
diff --git a/lib/spack/spack/build_systems/waf.py b/lib/spack/spack/build_systems/waf.py
index 0fd78d48da..5161f40985 100644
--- a/lib/spack/spack/build_systems/waf.py
+++ b/lib/spack/spack/build_systems/waf.py
@@ -2,15 +2,14 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from llnl.util.filesystem import working_dir
import spack.builder
import spack.package_base
+import spack.phase_callbacks
from spack.directives import build_system, depends_on
-from ._checks import BaseBuilder, execute_build_time_tests, execute_install_time_tests
+from ._checks import BuilderWithDefaults, execute_build_time_tests, execute_install_time_tests
class WafPackage(spack.package_base.PackageBase):
@@ -32,7 +31,7 @@ class WafPackage(spack.package_base.PackageBase):
@spack.builder.builder("waf")
-class WafBuilder(BaseBuilder):
+class WafBuilder(BuilderWithDefaults):
"""The WAF builder provides the following phases that can be overridden:
* configure
@@ -90,11 +89,11 @@ class WafBuilder(BaseBuilder):
def python(self, *args, **kwargs):
"""The python ``Executable``."""
- inspect.getmodule(self.pkg).python(*args, **kwargs)
+ self.pkg.module.python(*args, **kwargs)
def waf(self, *args, **kwargs):
"""Runs the waf ``Executable``."""
- jobs = inspect.getmodule(self.pkg).make_jobs
+ jobs = self.pkg.module.make_jobs
with working_dir(self.build_directory):
self.python("waf", "-j{0}".format(jobs), *args, **kwargs)
@@ -138,7 +137,7 @@ class WafBuilder(BaseBuilder):
"""
pass
- spack.builder.run_after("build")(execute_build_time_tests)
+ spack.phase_callbacks.run_after("build")(execute_build_time_tests)
def install_test(self):
"""Run unit tests after install.
@@ -148,4 +147,4 @@ class WafBuilder(BaseBuilder):
"""
pass
- spack.builder.run_after("install")(execute_install_time_tests)
+ spack.phase_callbacks.run_after("install")(execute_install_time_tests)
diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py
index 4119062ab6..6dd84fab45 100644
--- a/lib/spack/spack/builder.py
+++ b/lib/spack/spack/builder.py
@@ -6,41 +6,30 @@ import collections
import collections.abc
import copy
import functools
-import inspect
-from typing import List, Optional, Tuple
+from typing import Dict, List, Optional, Tuple, Type
-import spack.build_environment
+import spack.error
+import spack.multimethod
+import spack.package_base
+import spack.phase_callbacks
+import spack.repo
+import spack.spec
+import spack.util.environment
#: Builder classes, as registered by the "builder" decorator
-BUILDER_CLS = {}
-
-#: An object of this kind is a shared global state used to collect callbacks during
-#: class definition time, and is flushed when the class object is created at the end
-#: of the class definition
-#:
-#: Args:
-#: attribute_name (str): name of the attribute that will be attached to the builder
-#: callbacks (list): container used to temporarily aggregate the callbacks
-CallbackTemporaryStage = collections.namedtuple(
- "CallbackTemporaryStage", ["attribute_name", "callbacks"]
-)
-
-#: Shared global state to aggregate "@run_before" callbacks
-_RUN_BEFORE = CallbackTemporaryStage(attribute_name="run_before_callbacks", callbacks=[])
-#: Shared global state to aggregate "@run_after" callbacks
-_RUN_AFTER = CallbackTemporaryStage(attribute_name="run_after_callbacks", callbacks=[])
+BUILDER_CLS: Dict[str, Type["Builder"]] = {}
#: Map id(pkg) to a builder, to avoid creating multiple
#: builders for the same package object.
-_BUILDERS = {}
+_BUILDERS: Dict[int, "Builder"] = {}
-def builder(build_system_name):
+def builder(build_system_name: str):
"""Class decorator used to register the default builder
for a given build-system.
Args:
- build_system_name (str): name of the build-system
+ build_system_name: name of the build-system
"""
def _decorator(cls):
@@ -51,13 +40,9 @@ def builder(build_system_name):
return _decorator
-def create(pkg):
- """Given a package object with an associated concrete spec,
- return the builder object that can install it.
-
- Args:
- pkg (spack.package_base.PackageBase): package for which we want the builder
- """
+def create(pkg: spack.package_base.PackageBase) -> "Builder":
+ """Given a package object with an associated concrete spec, return the builder object that can
+ install it."""
if id(pkg) not in _BUILDERS:
_BUILDERS[id(pkg)] = _create(pkg)
return _BUILDERS[id(pkg)]
@@ -72,7 +57,15 @@ class _PhaseAdapter:
return self.phase_fn(self.builder.pkg, spec, prefix)
-def _create(pkg):
+def get_builder_class(pkg, name: str) -> Optional[Type["Builder"]]:
+ """Return the builder class if a package module defines it."""
+ cls = getattr(pkg.module, name, None)
+ if cls and cls.__module__.startswith(spack.repo.ROOT_PYTHON_NAMESPACE):
+ return cls
+ return None
+
+
+def _create(pkg: spack.package_base.PackageBase) -> "Builder":
"""Return a new builder object for the package object being passed as argument.
The function inspects the build-system used by the package object and try to:
@@ -92,15 +85,15 @@ def _create(pkg):
to look for build-related methods in the ``*Package``.
Args:
- pkg (spack.package_base.PackageBase): package object for which we need a builder
+ pkg: package object for which we need a builder
"""
- package_module = inspect.getmodule(pkg)
package_buildsystem = buildsystem_name(pkg)
default_builder_cls = BUILDER_CLS[package_buildsystem]
builder_cls_name = default_builder_cls.__name__
- builder_cls = getattr(package_module, builder_cls_name, None)
- if builder_cls:
- return builder_cls(pkg)
+ builder_class = get_builder_class(pkg, builder_cls_name)
+
+ if builder_class:
+ return builder_class(pkg)
# Specialized version of a given buildsystem can subclass some
# base classes and specialize certain phases or methods or attributes.
@@ -157,8 +150,8 @@ def _create(pkg):
# with the same name is defined in the Package, it will override this definition
# (when _ForwardToBaseBuilder is initialized)
for method_name in (
- base_cls.phases
- + base_cls.legacy_methods
+ base_cls.phases # type: ignore
+ + base_cls.legacy_methods # type: ignore
+ getattr(base_cls, "legacy_long_methods", tuple())
+ ("setup_build_environment", "setup_dependent_build_environment")
):
@@ -170,14 +163,14 @@ def _create(pkg):
return __forward
- for attribute_name in base_cls.legacy_attributes:
+ for attribute_name in base_cls.legacy_attributes: # type: ignore
setattr(
_ForwardToBaseBuilder,
attribute_name,
property(forward_property_to_getattr(attribute_name)),
)
- class Adapter(base_cls, metaclass=_PackageAdapterMeta):
+ class Adapter(base_cls, metaclass=_PackageAdapterMeta): # type: ignore
def __init__(self, pkg):
# Deal with custom phases in packages here
if hasattr(pkg, "phases"):
@@ -202,95 +195,21 @@ def _create(pkg):
return Adapter(pkg)
-def buildsystem_name(pkg):
+def buildsystem_name(pkg: spack.package_base.PackageBase) -> str:
"""Given a package object with an associated concrete spec,
- return the name of its build system.
-
- Args:
- pkg (spack.package_base.PackageBase): package for which we want
- the build system name
- """
+ return the name of its build system."""
try:
return pkg.spec.variants["build_system"].value
except KeyError:
# We are reading an old spec without the build_system variant
- return pkg.legacy_buildsystem
+ return pkg.legacy_buildsystem # type: ignore
-class PhaseCallbacksMeta(type):
- """Permit to register arbitrary functions during class definition and run them
- later, before or after a given install phase.
-
- Each method decorated with ``run_before`` or ``run_after`` gets temporarily
- stored in a global shared state when a class being defined is parsed by the Python
- interpreter. At class definition time that temporary storage gets flushed and a list
- of callbacks is attached to the class being defined.
- """
-
- def __new__(mcs, name, bases, attr_dict):
- for temporary_stage in (_RUN_BEFORE, _RUN_AFTER):
- staged_callbacks = temporary_stage.callbacks
-
- # We don't have callbacks in this class, move on
- if not staged_callbacks:
- continue
-
- # If we are here we have callbacks. To get a complete list, get first what
- # was attached to parent classes, then prepend what we have registered here.
- #
- # The order should be:
- # 1. Callbacks are registered in order within the same class
- # 2. Callbacks defined in derived classes precede those defined in base
- # classes
- for base in bases:
- callbacks_from_base = getattr(base, temporary_stage.attribute_name, None)
- if callbacks_from_base:
- break
- else:
- callbacks_from_base = []
-
- # Set the callbacks in this class and flush the temporary stage
- attr_dict[temporary_stage.attribute_name] = staged_callbacks[:] + callbacks_from_base
- del temporary_stage.callbacks[:]
-
- return super(PhaseCallbacksMeta, mcs).__new__(mcs, name, bases, attr_dict)
-
- @staticmethod
- def run_after(phase, when=None):
- """Decorator to register a function for running after a given phase.
-
- Args:
- phase (str): phase after which the function must run.
- when (str): condition under which the function is run (if None, it is always run).
- """
-
- def _decorator(fn):
- key = (phase, when)
- item = (key, fn)
- _RUN_AFTER.callbacks.append(item)
- return fn
-
- return _decorator
-
- @staticmethod
- def run_before(phase, when=None):
- """Decorator to register a function for running before a given phase.
-
- Args:
- phase (str): phase before which the function must run.
- when (str): condition under which the function is run (if None, it is always run).
- """
-
- def _decorator(fn):
- key = (phase, when)
- item = (key, fn)
- _RUN_BEFORE.callbacks.append(item)
- return fn
-
- return _decorator
-
-
-class BuilderMeta(PhaseCallbacksMeta, type(collections.abc.Sequence)): # type: ignore
+class BuilderMeta(
+ spack.phase_callbacks.PhaseCallbacksMeta,
+ spack.multimethod.MultiMethodMeta,
+ type(collections.abc.Sequence), # type: ignore
+):
pass
@@ -382,8 +301,12 @@ class _PackageAdapterMeta(BuilderMeta):
)
combine_callbacks = _PackageAdapterMeta.combine_callbacks
- attr_dict[_RUN_BEFORE.attribute_name] = combine_callbacks(_RUN_BEFORE.attribute_name)
- attr_dict[_RUN_AFTER.attribute_name] = combine_callbacks(_RUN_AFTER.attribute_name)
+ attr_dict[spack.phase_callbacks._RUN_BEFORE.attribute_name] = combine_callbacks(
+ spack.phase_callbacks._RUN_BEFORE.attribute_name
+ )
+ attr_dict[spack.phase_callbacks._RUN_AFTER.attribute_name] = combine_callbacks(
+ spack.phase_callbacks._RUN_AFTER.attribute_name
+ )
return super(_PackageAdapterMeta, mcs).__new__(mcs, name, bases, attr_dict)
@@ -403,8 +326,8 @@ class InstallationPhase:
self.name = name
self.builder = builder
self.phase_fn = self._select_phase_fn()
- self.run_before = self._make_callbacks(_RUN_BEFORE.attribute_name)
- self.run_after = self._make_callbacks(_RUN_AFTER.attribute_name)
+ self.run_before = self._make_callbacks(spack.phase_callbacks._RUN_BEFORE.attribute_name)
+ self.run_after = self._make_callbacks(spack.phase_callbacks._RUN_AFTER.attribute_name)
def _make_callbacks(self, callbacks_attribute):
result = []
@@ -453,58 +376,48 @@ class InstallationPhase:
# If a phase has a matching stop_before_phase attribute,
# stop the installation process raising a StopPhase
if getattr(instance, "stop_before_phase", None) == self.name:
- raise spack.build_environment.StopPhase(
- "Stopping before '{0}' phase".format(self.name)
- )
+ raise spack.error.StopPhase("Stopping before '{0}' phase".format(self.name))
def _on_phase_exit(self, instance):
# If a phase has a matching last_phase attribute,
# stop the installation process raising a StopPhase
if getattr(instance, "last_phase", None) == self.name:
- raise spack.build_environment.StopPhase("Stopping at '{0}' phase".format(self.name))
+ raise spack.error.StopPhase("Stopping at '{0}' phase".format(self.name))
def copy(self):
return copy.deepcopy(self)
-class Builder(collections.abc.Sequence, metaclass=BuilderMeta):
- """A builder is a class that, given a package object (i.e. associated with
- concrete spec), knows how to install it.
+class BaseBuilder(metaclass=BuilderMeta):
+ """An interface for builders, without any phases defined. This class is exposed in the package
+ API, so that packagers can create a single class to define ``setup_build_environment`` and
+ ``@run_before`` and ``@run_after`` callbacks that can be shared among different builders.
- The builder behaves like a sequence, and when iterated over return the
- "phases" of the installation in the correct order.
+ Example:
- Args:
- pkg (spack.package_base.PackageBase): package object to be built
- """
+ .. code-block:: python
- #: Sequence of phases. Must be defined in derived classes
- phases: Tuple[str, ...] = ()
- #: Build system name. Must also be defined in derived classes.
- build_system: Optional[str] = None
+ class AnyBuilder(BaseBuilder):
+ @run_after("install")
+ def fixup_install(self):
+ # do something after the package is installed
+ pass
- legacy_methods: Tuple[str, ...] = ()
- legacy_attributes: Tuple[str, ...] = ()
+ def setup_build_environment(self, env):
+ env.set("MY_ENV_VAR", "my_value")
- # type hints for some of the legacy methods
- build_time_test_callbacks: List[str]
- install_time_test_callbacks: List[str]
+ class CMakeBuilder(cmake.CMakeBuilder, AnyBuilder):
+ pass
- #: List of glob expressions. Each expression must either be
- #: absolute or relative to the package source path.
- #: Matching artifacts found at the end of the build process will be
- #: copied in the same directory tree as _spack_build_logfile and
- #: _spack_build_envfile.
- archive_files: List[str] = []
+ class AutotoolsBuilder(autotools.AutotoolsBuilder, AnyBuilder):
+ pass
+ """
- def __init__(self, pkg):
+ def __init__(self, pkg: spack.package_base.PackageBase) -> None:
self.pkg = pkg
- self.callbacks = {}
- for phase in self.phases:
- self.callbacks[phase] = InstallationPhase(phase, self)
@property
- def spec(self):
+ def spec(self) -> spack.spec.Spec:
return self.pkg.spec
@property
@@ -515,57 +428,89 @@ class Builder(collections.abc.Sequence, metaclass=BuilderMeta):
def prefix(self):
return self.pkg.prefix
- def test(self):
- # Defer tests to virtual and concrete packages
- pass
-
- def setup_build_environment(self, env):
+ def setup_build_environment(
+ self, env: spack.util.environment.EnvironmentModifications
+ ) -> None:
"""Sets up the build environment for a package.
This method will be called before the current package prefix exists in
Spack's store.
Args:
- env (spack.util.environment.EnvironmentModifications): environment
- modifications to be applied when the package is built. Package authors
+ env: environment modifications to be applied when the package is built. Package authors
can call methods on it to alter the build environment.
"""
if not hasattr(super(), "setup_build_environment"):
return
- super().setup_build_environment(env)
-
- def setup_dependent_build_environment(self, env, dependent_spec):
- """Sets up the build environment of packages that depend on this one.
+ super().setup_build_environment(env) # type: ignore
- This is similar to ``setup_build_environment``, but it is used to
- modify the build environments of packages that *depend* on this one.
+ def setup_dependent_build_environment(
+ self, env: spack.util.environment.EnvironmentModifications, dependent_spec: spack.spec.Spec
+ ) -> None:
+ """Sets up the build environment of a package that depends on this one.
- This gives packages like Python and others that follow the extension
- model a way to implement common environment or compile-time settings
- for dependencies.
+ This is similar to ``setup_build_environment``, but it is used to modify the build
+ environment of a package that *depends* on this one.
- This method will be called before the dependent package prefix exists
- in Spack's store.
+ This gives packages the ability to set environment variables for the build of the
+ dependent, which can be useful to provide search hints for headers or libraries if they are
+ not in standard locations.
- Examples:
- 1. Installing python modules generally requires ``PYTHONPATH``
- to point to the ``lib/pythonX.Y/site-packages`` directory in the
- module's install prefix. This method could be used to set that
- variable.
+ This method will be called before the dependent package prefix exists in Spack's store.
Args:
- env (spack.util.environment.EnvironmentModifications): environment
- modifications to be applied when the dependent package is built.
+ env: 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 (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
+ dependent_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``
"""
if not hasattr(super(), "setup_dependent_build_environment"):
return
- super().setup_dependent_build_environment(env, dependent_spec)
+ super().setup_dependent_build_environment(env, dependent_spec) # type: ignore
+
+ def __repr__(self):
+ fmt = "{name}{/hash:7}"
+ return f"{self.__class__.__name__}({self.spec.format(fmt)})"
+
+ def __str__(self):
+ fmt = "{name}{/hash:7}"
+ return f'"{self.__class__.__name__}" builder for "{self.spec.format(fmt)}"'
+
+
+class Builder(BaseBuilder, collections.abc.Sequence):
+ """A builder is a class that, given a package object (i.e. associated with concrete spec),
+ knows how to install it.
+
+ The builder behaves like a sequence, and when iterated over return the "phases" of the
+ installation in the correct order.
+ """
+
+ #: Sequence of phases. Must be defined in derived classes
+ phases: Tuple[str, ...] = ()
+ #: Build system name. Must also be defined in derived classes.
+ build_system: Optional[str] = None
+
+ legacy_methods: Tuple[str, ...] = ()
+ legacy_attributes: Tuple[str, ...] = ()
+
+ # type hints for some of the legacy methods
+ build_time_test_callbacks: List[str]
+ install_time_test_callbacks: List[str]
+
+ #: List of glob expressions. Each expression must either be absolute or relative to the package
+ #: source path. Matching artifacts found at the end of the build process will be copied in the
+ #: same directory tree as _spack_build_logfile and _spack_build_envfile.
+ @property
+ def archive_files(self) -> List[str]:
+ return []
+
+ def __init__(self, pkg: spack.package_base.PackageBase) -> None:
+ super().__init__(pkg)
+ self.callbacks = {}
+ for phase in self.phases:
+ self.callbacks[phase] = InstallationPhase(phase, self)
def __getitem__(self, idx):
key = self.phases[idx]
@@ -573,16 +518,3 @@ class Builder(collections.abc.Sequence, metaclass=BuilderMeta):
def __len__(self):
return len(self.phases)
-
- def __repr__(self):
- msg = "{0}({1})"
- return msg.format(type(self).__name__, self.pkg.spec.format("{name}/{hash:7}"))
-
- def __str__(self):
- msg = '"{0}" builder for "{1}"'
- return msg.format(type(self).build_system, self.pkg.spec.format("{name}/{hash:7}"))
-
-
-# Export these names as standalone to be used in packages
-run_after = PhaseCallbacksMeta.run_after
-run_before = PhaseCallbacksMeta.run_before
diff --git a/lib/spack/spack/caches.py b/lib/spack/spack/caches.py
index 81a16ea5d8..f2d4bfeec0 100644
--- a/lib/spack/spack/caches.py
+++ b/lib/spack/spack/caches.py
@@ -5,14 +5,11 @@
"""Caches used by Spack to store data"""
import os
-from typing import Union
import llnl.util.lang
from llnl.util.filesystem import mkdirp
-from llnl.util.symlink import symlink
import spack.config
-import spack.error
import spack.fetch_strategy
import spack.paths
import spack.util.file_cache
@@ -35,9 +32,7 @@ def _misc_cache():
#: Spack's cache for small data
-MISC_CACHE: Union[
- spack.util.file_cache.FileCache, llnl.util.lang.Singleton
-] = llnl.util.lang.Singleton(_misc_cache)
+MISC_CACHE: spack.util.file_cache.FileCache = llnl.util.lang.Singleton(_misc_cache) # type: ignore
def fetch_cache_location():
@@ -72,25 +67,6 @@ class MirrorCache:
mkdirp(os.path.dirname(dst))
fetcher.archive(dst)
- def symlink(self, mirror_ref):
- """Symlink a human readible path in our mirror to the actual
- storage location."""
-
- cosmetic_path = os.path.join(self.root, mirror_ref.cosmetic_path)
- storage_path = os.path.join(self.root, mirror_ref.storage_path)
- relative_dst = os.path.relpath(storage_path, start=os.path.dirname(cosmetic_path))
-
- if not os.path.exists(cosmetic_path):
- if os.path.lexists(cosmetic_path):
- # In this case the link itself exists but it is broken: remove
- # it and recreate it (in order to fix any symlinks broken prior
- # to https://github.com/spack/spack/pull/13908)
- os.unlink(cosmetic_path)
- mkdirp(os.path.dirname(cosmetic_path))
- symlink(relative_dst, cosmetic_path)
-
#: Spack's local cache for downloaded source archives
-FETCH_CACHE: Union[
- spack.fetch_strategy.FsCache, llnl.util.lang.Singleton
-] = llnl.util.lang.Singleton(_fetch_cache)
+FETCH_CACHE: spack.fetch_strategy.FsCache = llnl.util.lang.Singleton(_fetch_cache) # type: ignore
diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py
index 7c2f3f2eb6..56d1980a3a 100644
--- a/lib/spack/spack/ci.py
+++ b/lib/spack/spack/ci.py
@@ -10,29 +10,35 @@ import json
import os
import re
import shutil
+import ssl
import stat
import subprocess
import sys
import tempfile
import time
import zipfile
-from collections import namedtuple
-from typing import List, Optional
+from collections import defaultdict, namedtuple
+from typing import Dict, List, Optional, Set, Tuple
from urllib.error import HTTPError, URLError
-from urllib.parse import urlencode
-from urllib.request import HTTPHandler, Request, build_opener
+from urllib.parse import quote, urlencode, urlparse
+from urllib.request import HTTPHandler, HTTPSHandler, Request, build_opener
+
+import ruamel.yaml
import llnl.util.filesystem as fs
import llnl.util.tty as tty
-from llnl.util.lang import memoized
+from llnl.util.lang import Singleton, memoized
from llnl.util.tty.color import cescape, colorize
import spack
import spack.binary_distribution as bindist
+import spack.builder
+import spack.concretize
import spack.config as cfg
-import spack.environment as ev
+import spack.error
import spack.main
-import spack.mirror
+import spack.mirrors.mirror
+import spack.mirrors.utils
import spack.paths
import spack.repo
import spack.spec
@@ -44,8 +50,34 @@ import spack.util.web as web_util
from spack import traverse
from spack.error import SpackError
from spack.reporters import CDash, CDashConfiguration
+from spack.reporters.cdash import SPACK_CDASH_TIMEOUT
from spack.reporters.cdash import build_stamp as cdash_build_stamp
+
+def _urlopen():
+ error_handler = web_util.SpackHTTPDefaultErrorHandler()
+
+ # One opener with HTTPS ssl enabled
+ with_ssl = build_opener(
+ HTTPHandler(), HTTPSHandler(context=web_util.ssl_create_default_context()), error_handler
+ )
+
+ # One opener with HTTPS ssl disabled
+ without_ssl = build_opener(
+ HTTPHandler(), HTTPSHandler(context=ssl._create_unverified_context()), error_handler
+ )
+
+ # And dynamically dispatch based on the config:verify_ssl.
+ def dispatch_open(fullurl, data=None, timeout=None, verify_ssl=True):
+ opener = with_ssl if verify_ssl else without_ssl
+ timeout = timeout or spack.config.get("config:connect_timeout", 1)
+ return opener.open(fullurl, data, timeout)
+
+ return dispatch_open
+
+
+_dyn_mapping_urlopener = Singleton(_urlopen)
+
# See https://docs.gitlab.com/ee/ci/yaml/#retry for descriptions of conditions
JOB_RETRY_CONDITIONS = [
# "always",
@@ -65,12 +97,10 @@ JOB_RETRY_CONDITIONS = [
TEMP_STORAGE_MIRROR_NAME = "ci_temporary_mirror"
SPACK_RESERVED_TAGS = ["public", "protected", "notary"]
-# TODO: Remove this in Spack 0.23
-SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror"
JOB_NAME_FORMAT = (
- "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}"
+ "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{ arch=architecture}"
)
-
+IS_WINDOWS = sys.platform == "win32"
spack_gpg = spack.main.SpackCommand("gpg")
spack_compiler = spack.main.SpackCommand("compiler")
@@ -103,7 +133,7 @@ def get_job_name(spec: spack.spec.Spec, build_group: str = ""):
job_name = spec.format(JOB_NAME_FORMAT)
if build_group:
- job_name = "{0} {1}".format(job_name, build_group)
+ job_name = f"{job_name} {build_group}"
return job_name[:255]
@@ -113,54 +143,24 @@ def _remove_reserved_tags(tags):
return [tag for tag in tags if tag not in SPACK_RESERVED_TAGS]
-def _spec_deps_key(s):
- return "{0}/{1}".format(s.name, s.dag_hash(7))
-
-
-def _add_dependency(spec_label, dep_label, deps):
- if spec_label == dep_label:
- return
- if spec_label not in deps:
- deps[spec_label] = set()
- deps[spec_label].add(dep_label)
+def _spec_ci_label(s):
+ return f"{s.name}/{s.dag_hash(7)}"
-def _get_spec_dependencies(specs, deps, spec_labels):
- spec_deps_obj = _compute_spec_deps(specs)
+PlainNodes = Dict[str, spack.spec.Spec]
+PlainEdges = Dict[str, Set[str]]
- if spec_deps_obj:
- dependencies = spec_deps_obj["dependencies"]
- specs = spec_deps_obj["specs"]
- for entry in specs:
- spec_labels[entry["label"]] = entry["spec"]
-
- for entry in dependencies:
- _add_dependency(entry["spec"], entry["depends"], deps)
-
-
-def stage_spec_jobs(specs):
- """Take a set of release specs and generate a list of "stages", where the
- jobs in any stage are dependent only on jobs in previous stages. This
- allows us to maximize build parallelism within the gitlab-ci framework.
+def stage_spec_jobs(specs: List[spack.spec.Spec]) -> Tuple[PlainNodes, PlainEdges, List[Set[str]]]:
+ """Turn a DAG into a list of stages (set of nodes), the list is ordered topologically, so that
+ each node in a stage has dependencies only in previous stages.
Arguments:
- specs (Iterable): Specs to build
-
- Returns: A tuple of information objects describing the specs, dependencies
- and stages:
-
- spec_labels: A dictionary mapping the spec labels (which are formatted
- as pkg-name/hash-prefix) to concrete specs.
-
- deps: A dictionary where the keys should also have appeared as keys in
- the spec_labels dictionary, and the values are the set of
- dependencies for that spec.
-
- stages: An ordered list of sets, each of which contains all the jobs to
- built in that stage. The jobs are expressed in the same format as
- the keys in the spec_labels and deps objects.
+ specs: Specs to build
+ Returns: A tuple (nodes, edges, stages) where ``nodes`` maps labels to specs, ``edges`` maps
+ labels to a set of labels of dependencies, and ``stages`` is a topologically ordered list
+ of sets of labels.
"""
# The convenience method below, "_remove_satisfied_deps()", does not modify
@@ -177,17 +177,12 @@ def stage_spec_jobs(specs):
return new_deps
- deps = {}
- spec_labels = {}
+ nodes, edges = _extract_dag(specs)
- _get_spec_dependencies(specs, deps, spec_labels)
-
- # Save the original deps, as we need to return them at the end of the
- # function. In the while loop below, the "dependencies" variable is
- # overwritten rather than being modified each time through the loop,
- # thus preserving the original value of "deps" saved here.
- dependencies = deps
- unstaged = set(spec_labels.keys())
+ # Save the original edges, as we need to return them at the end of the function. In the loop
+ # below, the "dependencies" variable is rebound rather than mutated, so "edges" is not mutated.
+ dependencies = edges
+ unstaged = set(nodes.keys())
stages = []
while dependencies:
@@ -203,17 +198,17 @@ def stage_spec_jobs(specs):
if unstaged:
stages.append(unstaged.copy())
- return spec_labels, deps, stages
+ return nodes, edges, stages
-def _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisions):
+def _print_staging_summary(spec_labels, stages, rebuild_decisions):
if not stages:
return
- mirrors = spack.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True)
+ mirrors = spack.mirrors.mirror.MirrorCollection(binary=True)
tty.msg("Checked the following mirrors for binaries:")
for m in mirrors.values():
- tty.msg(" {0}".format(m.fetch_url))
+ tty.msg(f" {m.fetch_url}")
tty.msg("Staging summary ([x] means a job needs rebuilding):")
for stage_index, stage in enumerate(stages):
@@ -235,108 +230,36 @@ def _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisi
tty.msg(msg)
-def _compute_spec_deps(spec_list):
- """
- Computes all the dependencies for the spec(s) and generates a JSON
- object which provides both a list of unique spec names as well as a
- comprehensive list of all the edges in the dependency graph. For
- example, given a single spec like 'readline@7.0', this function
- generates the following JSON object:
-
- .. code-block:: JSON
-
- {
- "dependencies": [
- {
- "depends": "readline/ip6aiun",
- "spec": "readline/ip6aiun"
- },
- {
- "depends": "ncurses/y43rifz",
- "spec": "readline/ip6aiun"
- },
- {
- "depends": "ncurses/y43rifz",
- "spec": "readline/ip6aiun"
- },
- {
- "depends": "pkgconf/eg355zb",
- "spec": "ncurses/y43rifz"
- },
- {
- "depends": "pkgconf/eg355zb",
- "spec": "readline/ip6aiun"
- }
- ],
- "specs": [
- {
- "spec": "readline@7.0%apple-clang@9.1.0 arch=darwin-highs...",
- "label": "readline/ip6aiun"
- },
- {
- "spec": "ncurses@6.1%apple-clang@9.1.0 arch=darwin-highsi...",
- "label": "ncurses/y43rifz"
- },
- {
- "spec": "pkgconf@1.5.4%apple-clang@9.1.0 arch=darwin-high...",
- "label": "pkgconf/eg355zb"
- }
- ]
- }
-
- """
- spec_labels = {}
+def _extract_dag(specs: List[spack.spec.Spec]) -> Tuple[PlainNodes, PlainEdges]:
+ """Extract a sub-DAG as plain old Python objects with external nodes removed."""
+ nodes: PlainNodes = {}
+ edges: PlainEdges = defaultdict(set)
- specs = []
- dependencies = []
+ for edge in traverse.traverse_edges(specs, cover="edges"):
+ if (edge.parent and edge.parent.external) or edge.spec.external:
+ continue
+ child_id = _spec_ci_label(edge.spec)
+ nodes[child_id] = edge.spec
+ if edge.parent:
+ parent_id = _spec_ci_label(edge.parent)
+ nodes[parent_id] = edge.parent
+ edges[parent_id].add(child_id)
- def append_dep(s, d):
- dependencies.append({"spec": s, "depends": d})
-
- for spec in spec_list:
- for s in spec.traverse(deptype="all"):
- if s.external:
- tty.msg("Will not stage external pkg: {0}".format(s))
- continue
-
- skey = _spec_deps_key(s)
- spec_labels[skey] = s
-
- for d in s.dependencies(deptype="all"):
- dkey = _spec_deps_key(d)
- if d.external:
- tty.msg("Will not stage external dep: {0}".format(d))
- continue
-
- append_dep(skey, dkey)
-
- for spec_label, concrete_spec in spec_labels.items():
- specs.append({"label": spec_label, "spec": concrete_spec})
-
- deps_json_obj = {"specs": specs, "dependencies": dependencies}
-
- return deps_json_obj
+ return nodes, edges
def _spec_matches(spec, match_string):
return spec.intersects(match_string)
-def _format_job_needs(
- dep_jobs, build_group, prune_dag, rebuild_decisions, enable_artifacts_buildcache
-):
+def _format_job_needs(dep_jobs, build_group, prune_dag, rebuild_decisions):
needs_list = []
for dep_job in dep_jobs:
- dep_spec_key = _spec_deps_key(dep_job)
+ dep_spec_key = _spec_ci_label(dep_job)
rebuild = rebuild_decisions[dep_spec_key].rebuild
if not prune_dag or rebuild:
- needs_list.append(
- {
- "job": get_job_name(dep_job, build_group),
- "artifacts": enable_artifacts_buildcache,
- }
- )
+ needs_list.append({"job": get_job_name(dep_job, build_group), "artifacts": False})
return needs_list
@@ -374,8 +297,8 @@ def get_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
for path in lines:
if ".gitlab-ci.yml" in path or path in env_path:
- tty.debug("env represented by {0} changed".format(env_path))
- tty.debug("touched file: {0}".format(path))
+ tty.debug(f"env represented by {env_path} changed")
+ tty.debug(f"touched file: {path}")
return True
return False
@@ -419,7 +342,7 @@ def get_spec_filter_list(env, affected_pkgs, dependent_traverse_depth=None):
all_concrete_specs = env.all_specs()
tty.debug("All concrete environment specs:")
for s in all_concrete_specs:
- tty.debug(" {0}/{1}".format(s.name, s.dag_hash()[:7]))
+ tty.debug(f" {s.name}/{s.dag_hash()[:7]}")
affected_pkgs = frozenset(affected_pkgs)
env_matches = [s for s in all_concrete_specs if s.name in affected_pkgs]
visited = set()
@@ -480,12 +403,6 @@ class SpackCI:
self.ir = {
"jobs": {},
- "temporary-storage-url-prefix": self.ci_config.get(
- "temporary-storage-url-prefix", None
- ),
- "enable-artifacts-buildcache": self.ci_config.get(
- "enable-artifacts-buildcache", False
- ),
"rebuild-index": self.ci_config.get("rebuild-index", True),
"broken-specs-url": self.ci_config.get("broken-specs-url", None),
"broken-tests-packages": self.ci_config.get("broken-tests-packages", []),
@@ -501,16 +418,27 @@ class SpackCI:
if name not in ["any", "build"]:
jobs[name] = self.__init_job("")
- def __init_job(self, spec):
+ def __init_job(self, release_spec):
"""Initialize job object"""
- return {"spec": spec, "attributes": {}}
+ job_object = {"spec": release_spec, "attributes": {}}
+ if release_spec:
+ job_vars = job_object["attributes"].setdefault("variables", {})
+ job_vars["SPACK_JOB_SPEC_DAG_HASH"] = release_spec.dag_hash()
+ job_vars["SPACK_JOB_SPEC_PKG_NAME"] = release_spec.name
+ job_vars["SPACK_JOB_SPEC_PKG_VERSION"] = release_spec.format("{version}")
+ job_vars["SPACK_JOB_SPEC_COMPILER_NAME"] = release_spec.format("{compiler.name}")
+ job_vars["SPACK_JOB_SPEC_COMPILER_VERSION"] = release_spec.format("{compiler.version}")
+ job_vars["SPACK_JOB_SPEC_ARCH"] = release_spec.format("{architecture}")
+ job_vars["SPACK_JOB_SPEC_VARIANTS"] = release_spec.format("{variants}")
+
+ return job_object
def __is_named(self, section):
"""Check if a pipeline-gen configuration section is for a named job,
and if so return the name otherwise return none.
"""
for _name in self.named_jobs:
- keys = ["{0}-job".format(_name), "{0}-job-remove".format(_name)]
+ keys = [f"{_name}-job", f"{_name}-job-remove"]
if any([key for key in keys if key in section]):
return _name
@@ -525,9 +453,9 @@ class SpackCI:
jname = name
if suffix:
- jname = "{0}-job{1}".format(name, suffix)
+ jname = f"{name}-job{suffix}"
else:
- jname = "{0}-job".format(name)
+ jname = f"{name}-job"
return jname
@@ -596,6 +524,7 @@ class SpackCI:
for section in reversed(pipeline_gen):
name = self.__is_named(section)
has_submapping = "submapping" in section
+ has_dynmapping = "dynamic-mapping" in section
section = cfg.InternalConfigScope._process_dict_keyname_overrides(section)
if name:
@@ -638,6 +567,108 @@ class SpackCI:
job["attributes"] = self.__apply_submapping(
job["attributes"], job["spec"], section
)
+ elif has_dynmapping:
+ mapping = section["dynamic-mapping"]
+
+ dynmap_name = mapping.get("name")
+
+ # Check if this section should be skipped
+ dynmap_skip = os.environ.get("SPACK_CI_SKIP_DYNAMIC_MAPPING")
+ if dynmap_name and dynmap_skip:
+ if re.match(dynmap_skip, dynmap_name):
+ continue
+
+ # Get the endpoint
+ endpoint = mapping["endpoint"]
+ endpoint_url = urlparse(endpoint)
+
+ # Configure the request header
+ header = {"User-Agent": web_util.SPACK_USER_AGENT}
+ header.update(mapping.get("header", {}))
+
+ # Expand header environment variables
+ # ie. if tokens are passed
+ for value in header.values():
+ value = os.path.expandvars(value)
+
+ verify_ssl = mapping.get("verify_ssl", spack.config.get("config:verify_ssl", True))
+ timeout = mapping.get("timeout", spack.config.get("config:connect_timeout", 1))
+
+ required = mapping.get("require", [])
+ allowed = mapping.get("allow", [])
+ ignored = mapping.get("ignore", [])
+
+ # required keys are implicitly allowed
+ allowed = sorted(set(allowed + required))
+ ignored = sorted(set(ignored))
+ required = sorted(set(required))
+
+ # Make sure required things are not also ignored
+ assert not any([ikey in required for ikey in ignored])
+
+ def job_query(job):
+ job_vars = job["attributes"]["variables"]
+ query = (
+ "{SPACK_JOB_SPEC_PKG_NAME}@{SPACK_JOB_SPEC_PKG_VERSION}"
+ # The preceding spaces are required (ref. https://github.com/spack/spack-gantry/blob/develop/docs/api.md#allocation)
+ " {SPACK_JOB_SPEC_VARIANTS}"
+ " arch={SPACK_JOB_SPEC_ARCH}"
+ "%{SPACK_JOB_SPEC_COMPILER_NAME}@{SPACK_JOB_SPEC_COMPILER_VERSION}"
+ ).format_map(job_vars)
+ return f"spec={quote(query)}"
+
+ for job in jobs.values():
+ if not job["spec"]:
+ continue
+
+ # Create request for this job
+ query = job_query(job)
+ request = Request(
+ endpoint_url._replace(query=query).geturl(), headers=header, method="GET"
+ )
+ try:
+ response = _dyn_mapping_urlopener(
+ request, verify_ssl=verify_ssl, timeout=timeout
+ )
+ except Exception as e:
+ # For now just ignore any errors from dynamic mapping and continue
+ # This is still experimental, and failures should not stop CI
+ # from running normally
+ tty.warn(f"Failed to fetch dynamic mapping for query:\n\t{query}")
+ tty.warn(f"{e}")
+ continue
+
+ config = json.load(codecs.getreader("utf-8")(response))
+
+ # Strip ignore keys
+ if ignored:
+ for key in ignored:
+ if key in config:
+ config.pop(key)
+
+ # Only keep allowed keys
+ clean_config = {}
+ if allowed:
+ for key in allowed:
+ if key in config:
+ clean_config[key] = config[key]
+ else:
+ clean_config = config
+
+ # Verify all of the required keys are present
+ if required:
+ missing_keys = []
+ for key in required:
+ if key not in clean_config.keys():
+ missing_keys.append(key)
+
+ if missing_keys:
+ tty.warn(f"Response missing required keys: {missing_keys}")
+
+ if clean_config:
+ job["attributes"] = spack.config.merge_yaml(
+ job.get("attributes", {}), clean_config
+ )
for _, job in jobs.items():
if job["spec"]:
@@ -650,19 +681,17 @@ def generate_gitlab_ci_yaml(
env,
print_summary,
output_file,
+ *,
prune_dag=False,
check_index_only=False,
- run_optimizer=False,
- use_dependencies=False,
artifacts_root=None,
- remote_mirror_override=None,
):
"""Generate a gitlab yaml file to run a dynamic child pipeline from
the spec matrix in the active environment.
Arguments:
env (spack.environment.Environment): Activated environment object
- which must contain a gitlab-ci section describing how to map
+ which must contain a ci section describing how to map
specs to runners
print_summary (bool): Should we print a summary of all the jobs in
the stages in which they were placed.
@@ -674,48 +703,24 @@ def generate_gitlab_ci_yaml(
this mode results in faster yaml generation time). Otherwise, also
check each spec directly by url (useful if there is no index or it
might be out of date).
- run_optimizer (bool): If True, post-process the generated yaml to try
- try to reduce the size (attempts to collect repeated configuration
- and replace with definitions).)
- use_dependencies (bool): If true, use "dependencies" rather than "needs"
- ("needs" allows DAG scheduling). Useful if gitlab instance cannot
- be configured to handle more than a few "needs" per job.
artifacts_root (str): Path where artifacts like logs, environment
files (spack.yaml, spack.lock), etc should be written. GitLab
requires this to be within the project directory.
- remote_mirror_override (str): Typically only needed when one spack.yaml
- is used to populate several mirrors with binaries, based on some
- criteria. Spack protected pipelines populate different mirrors based
- on branch name, facilitated by this option. DEPRECATED
"""
with spack.concretize.disable_compiler_existence_check():
with env.write_transaction():
env.concretize()
env.write()
- yaml_root = env.manifest[ev.TOP_LEVEL_KEY]
-
# Get the joined "ci" config with all of the current scopes resolved
ci_config = cfg.get("ci")
- config_deprecated = False
if not ci_config:
- tty.warn("Environment does not have `ci` a configuration")
- gitlabci_config = yaml_root.get("gitlab-ci")
- if not gitlabci_config:
- tty.die("Environment yaml does not have `gitlab-ci` config section. Cannot recover.")
-
- tty.warn(
- "The `gitlab-ci` configuration is deprecated in favor of `ci`.\n",
- "To update run \n\t$ spack env update /path/to/ci/spack.yaml",
- )
- translate_deprecated_config(gitlabci_config)
- ci_config = gitlabci_config
- config_deprecated = True
+ raise SpackCIError("Environment does not have a `ci` configuration")
# Default target is gitlab...and only target is gitlab
if not ci_config.get("target", "gitlab") == "gitlab":
- tty.die('Spack CI module only generates target "gitlab"')
+ raise SpackCIError('Spack CI module only generates target "gitlab"')
cdash_config = cfg.get("cdash")
cdash_handler = CDashHandler(cdash_config) if "build-group" in cdash_config else None
@@ -739,7 +744,7 @@ def generate_gitlab_ci_yaml(
# Requested to prune untouched packages, but assume we won't do that
# unless we're actually in a git repo.
rev1, rev2 = get_change_revisions()
- tty.debug("Got following revisions: rev1={0}, rev2={1}".format(rev1, rev2))
+ tty.debug(f"Got following revisions: rev1={rev1}, rev2={rev2}")
if rev1 and rev2:
# If the stack file itself did not change, proceed with pruning
if not get_stack_changed(env.manifest_path, rev1, rev2):
@@ -747,13 +752,13 @@ def generate_gitlab_ci_yaml(
affected_pkgs = compute_affected_packages(rev1, rev2)
tty.debug("affected pkgs:")
for p in affected_pkgs:
- tty.debug(" {0}".format(p))
+ tty.debug(f" {p}")
affected_specs = get_spec_filter_list(
env, affected_pkgs, dependent_traverse_depth=dependent_depth
)
tty.debug("all affected specs:")
for s in affected_specs:
- tty.debug(" {0}/{1}".format(s.name, s.dag_hash()[:7]))
+ tty.debug(f" {s.name}/{s.dag_hash()[:7]}")
# Allow overriding --prune-dag cli opt with environment variable
prune_dag_override = os.environ.get("SPACK_PRUNE_UP_TO_DATE", None)
@@ -776,46 +781,34 @@ def generate_gitlab_ci_yaml(
spack_pipeline_type = os.environ.get("SPACK_PIPELINE_TYPE", None)
copy_only_pipeline = spack_pipeline_type == "spack_copy_only"
- if copy_only_pipeline and config_deprecated:
- tty.warn(
- "SPACK_PIPELINE_TYPE=spack_copy_only is not supported when using\n",
- "deprecated ci configuration, a no-op pipeline will be generated\n",
- "instead.",
- )
- pipeline_mirrors = spack.mirror.MirrorCollection(binary=True)
- deprecated_mirror_config = False
- buildcache_destination = None
- if "buildcache-destination" in pipeline_mirrors:
- if remote_mirror_override:
- tty.die(
- "Using the deprecated --buildcache-destination cli option and "
- "having a mirror named 'buildcache-destination' at the same time "
- "is not allowed"
- )
- buildcache_destination = pipeline_mirrors["buildcache-destination"]
- else:
- deprecated_mirror_config = True
- # TODO: This will be an error in Spack 0.23
+ def ensure_expected_target_path(path):
+ """Returns passed paths with all Windows path separators exchanged
+ for posix separators only if copy_only_pipeline is enabled
+
+ This is required as copy_only_pipelines are a unique scenario where
+ the generate job and child pipelines are run on different platforms.
+ To make this compatible w/ Windows, we cannot write Windows style path separators
+ that will be consumed on by the Posix copy job runner.
- # TODO: Remove this block in spack 0.23
- remote_mirror_url = None
- if deprecated_mirror_config:
- if "mirrors" not in yaml_root or len(yaml_root["mirrors"].values()) < 1:
- tty.die("spack ci generate requires an env containing a mirror")
+ TODO (johnwparent): Refactor config + cli read/write to deal only in posix
+ style paths
+ """
+ if copy_only_pipeline and path:
+ path = path.replace("\\", "/")
+ return path
+
+ pipeline_mirrors = spack.mirrors.mirror.MirrorCollection(binary=True)
+ buildcache_destination = None
+ if "buildcache-destination" not in pipeline_mirrors:
+ raise SpackCIError("spack ci generate requires a mirror named 'buildcache-destination'")
- ci_mirrors = yaml_root["mirrors"]
- mirror_urls = [url for url in ci_mirrors.values()]
- remote_mirror_url = mirror_urls[0]
+ buildcache_destination = pipeline_mirrors["buildcache-destination"]
spack_buildcache_copy = os.environ.get("SPACK_COPY_BUILDCACHE", None)
if spack_buildcache_copy:
buildcache_copies = {}
- buildcache_copy_src_prefix = (
- buildcache_destination.fetch_url
- if buildcache_destination
- else remote_mirror_override or remote_mirror_url
- )
+ buildcache_copy_src_prefix = buildcache_destination.fetch_url
buildcache_copy_dest_prefix = spack_buildcache_copy
# Check for a list of "known broken" specs that we should not bother
@@ -825,55 +818,10 @@ def generate_gitlab_ci_yaml(
if "broken-specs-url" in ci_config:
broken_specs_url = ci_config["broken-specs-url"]
- enable_artifacts_buildcache = False
- if "enable-artifacts-buildcache" in ci_config:
- tty.warn("Support for enable-artifacts-buildcache will be removed in Spack 0.23")
- enable_artifacts_buildcache = ci_config["enable-artifacts-buildcache"]
-
rebuild_index_enabled = True
if "rebuild-index" in ci_config and ci_config["rebuild-index"] is False:
rebuild_index_enabled = False
- temp_storage_url_prefix = None
- if "temporary-storage-url-prefix" in ci_config:
- tty.warn("Support for temporary-storage-url-prefix will be removed in Spack 0.23")
- temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"]
-
- # If a remote mirror override (alternate buildcache destination) was
- # specified, add it here in case it has already built hashes we might
- # generate.
- # TODO: Remove this block in Spack 0.23
- mirrors_to_check = None
- if deprecated_mirror_config and remote_mirror_override:
- if spack_pipeline_type == "spack_protected_branch":
- # Overriding the main mirror in this case might result
- # in skipping jobs on a release pipeline because specs are
- # up to date in develop. Eventually we want to notice and take
- # advantage of this by scheduling a job to copy the spec from
- # develop to the release, but until we have that, this makes
- # sure we schedule a rebuild job if the spec isn't already in
- # override mirror.
- mirrors_to_check = {"override": remote_mirror_override}
-
- # If we have a remote override and we want generate pipeline using
- # --check-index-only, then the override mirror needs to be added to
- # the configured mirrors when bindist.update() is run, or else we
- # won't fetch its index and include in our local cache.
- spack.mirror.add(
- spack.mirror.Mirror(remote_mirror_override, name="ci_pr_mirror"),
- cfg.default_modify_scope(),
- )
-
- # TODO: Remove this block in Spack 0.23
- shared_pr_mirror = None
- if deprecated_mirror_config and spack_pipeline_type == "spack_pull_request":
- stack_name = os.environ.get("SPACK_CI_STACK_NAME", "")
- shared_pr_mirror = url_util.join(SHARED_PR_MIRROR_URL, stack_name)
- spack.mirror.add(
- spack.mirror.Mirror(shared_pr_mirror, name="ci_shared_pr_mirror"),
- cfg.default_modify_scope(),
- )
-
pipeline_artifacts_dir = artifacts_root
if not pipeline_artifacts_dir:
proj_dir = os.environ.get("CI_PROJECT_DIR", os.getcwd())
@@ -882,9 +830,8 @@ def generate_gitlab_ci_yaml(
pipeline_artifacts_dir = os.path.abspath(pipeline_artifacts_dir)
concrete_env_dir = os.path.join(pipeline_artifacts_dir, "concrete_environment")
- # Now that we've added the mirrors we know about, they should be properly
- # reflected in the environment manifest file, so copy that into the
- # concrete environment directory, along with the spack.lock file.
+ # Copy the environment manifest file into the concrete environment directory,
+ # along with the spack.lock file.
if not os.path.exists(concrete_env_dir):
os.makedirs(concrete_env_dir)
shutil.copyfile(env.manifest_path, os.path.join(concrete_env_dir, "spack.yaml"))
@@ -897,7 +844,8 @@ def generate_gitlab_ci_yaml(
cli_scopes = [
os.path.relpath(s.path, concrete_env_dir)
for s in cfg.scopes().values()
- if isinstance(s, cfg.ImmutableConfigScope)
+ if not s.writable
+ and isinstance(s, (cfg.DirectoryConfigScope))
and s.path not in env_includes
and os.path.exists(s.path)
]
@@ -906,11 +854,7 @@ def generate_gitlab_ci_yaml(
if scope not in include_scopes and scope not in env_includes:
include_scopes.insert(0, scope)
env_includes.extend(include_scopes)
- env_yaml_root["spack"]["include"] = env_includes
-
- if "gitlab-ci" in env_yaml_root["spack"] and "ci" not in env_yaml_root["spack"]:
- env_yaml_root["spack"]["ci"] = env_yaml_root["spack"].pop("gitlab-ci")
- translate_deprecated_config(env_yaml_root["spack"]["ci"])
+ env_yaml_root["spack"]["include"] = [ensure_expected_target_path(i) for i in env_includes]
with open(os.path.join(concrete_env_dir, "spack.yaml"), "w") as fd:
fd.write(syaml.dump_config(env_yaml_root, default_flow_style=False))
@@ -918,8 +862,6 @@ def generate_gitlab_ci_yaml(
job_log_dir = os.path.join(pipeline_artifacts_dir, "logs")
job_repro_dir = os.path.join(pipeline_artifacts_dir, "reproduction")
job_test_dir = os.path.join(pipeline_artifacts_dir, "tests")
- # TODO: Remove this line in Spack 0.23
- local_mirror_dir = os.path.join(pipeline_artifacts_dir, "mirror")
user_artifacts_dir = os.path.join(pipeline_artifacts_dir, "user_data")
# We communicate relative paths to the downstream jobs to avoid issues in
@@ -933,8 +875,6 @@ def generate_gitlab_ci_yaml(
rel_job_log_dir = os.path.relpath(job_log_dir, ci_project_dir)
rel_job_repro_dir = os.path.relpath(job_repro_dir, ci_project_dir)
rel_job_test_dir = os.path.relpath(job_test_dir, ci_project_dir)
- # TODO: Remove this line in Spack 0.23
- rel_local_mirror_dir = os.path.join(local_mirror_dir, ci_project_dir)
rel_user_artifacts_dir = os.path.relpath(user_artifacts_dir, ci_project_dir)
# Speed up staging by first fetching binary indices from all mirrors
@@ -978,7 +918,7 @@ def generate_gitlab_ci_yaml(
rebuild_decisions = {}
for stage_jobs in stages:
- stage_name = "stage-{0}".format(stage_id)
+ stage_name = f"stage-{stage_id}"
stage_names.append(stage_name)
stage_id += 1
@@ -996,7 +936,7 @@ def generate_gitlab_ci_yaml(
continue
up_to_date_mirrors = bindist.get_mirrors_for_spec(
- spec=release_spec, mirrors_to_check=mirrors_to_check, index_only=check_index_only
+ spec=release_spec, index_only=check_index_only
)
spec_record.rebuild = not up_to_date_mirrors
@@ -1009,7 +949,7 @@ def generate_gitlab_ci_yaml(
job_object = spack_ci_ir["jobs"][release_spec_dag_hash]["attributes"]
if not job_object:
- tty.warn("No match found for {0}, skipping it".format(release_spec))
+ tty.warn(f"No match found for {release_spec}, skipping it")
continue
if spack_pipeline_type is not None:
@@ -1038,36 +978,16 @@ def generate_gitlab_ci_yaml(
job_name = get_job_name(release_spec, build_group)
- job_vars = job_object.setdefault("variables", {})
- job_vars["SPACK_JOB_SPEC_DAG_HASH"] = release_spec_dag_hash
- job_vars["SPACK_JOB_SPEC_PKG_NAME"] = release_spec.name
- job_vars["SPACK_JOB_SPEC_PKG_VERSION"] = release_spec.format("{version}")
- job_vars["SPACK_JOB_SPEC_COMPILER_NAME"] = release_spec.format("{compiler.name}")
- job_vars["SPACK_JOB_SPEC_COMPILER_VERSION"] = release_spec.format("{compiler.version}")
- job_vars["SPACK_JOB_SPEC_ARCH"] = release_spec.format("{architecture}")
- job_vars["SPACK_JOB_SPEC_VARIANTS"] = release_spec.format("{variants}")
-
job_object["needs"] = []
if spec_label in dependencies:
- if enable_artifacts_buildcache:
- # Get dependencies transitively, so they're all
- # available in the artifacts buildcache.
- dep_jobs = [d for d in release_spec.traverse(deptype="all", root=False)]
- else:
- # In this case, "needs" is only used for scheduling
- # purposes, so we only get the direct dependencies.
- dep_jobs = []
- for dep_label in dependencies[spec_label]:
- dep_jobs.append(spec_labels[dep_label])
+ # In this case, "needs" is only used for scheduling
+ # purposes, so we only get the direct dependencies.
+ dep_jobs = []
+ for dep_label in dependencies[spec_label]:
+ dep_jobs.append(spec_labels[dep_label])
job_object["needs"].extend(
- _format_job_needs(
- dep_jobs,
- build_group,
- prune_dag,
- rebuild_decisions,
- enable_artifacts_buildcache,
- )
+ _format_job_needs(dep_jobs, build_group, prune_dag, rebuild_decisions)
)
rebuild_spec = spec_record.rebuild
@@ -1119,11 +1039,12 @@ def generate_gitlab_ci_yaml(
if artifacts_root:
job_object["needs"].append(
- {"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)}
+ {"job": generate_job_name, "pipeline": f"{parent_pipeline_id}"}
)
# Let downstream jobs know whether the spec needed rebuilding, regardless
# whether DAG pruning was enabled or not.
+ job_vars = job_object["variables"]
job_vars["SPACK_SPEC_NEEDS_REBUILD"] = str(rebuild_spec)
if cdash_handler:
@@ -1148,19 +1069,6 @@ def generate_gitlab_ci_yaml(
},
)
- # TODO: Remove this block in Spack 0.23
- if enable_artifacts_buildcache:
- bc_root = os.path.join(local_mirror_dir, "build_cache")
- job_object["artifacts"]["paths"].extend(
- [
- os.path.join(bc_root, p)
- for p in [
- bindist.tarball_name(release_spec, ".spec.json"),
- bindist.tarball_directory_name(release_spec),
- ]
- ]
- )
-
job_object["stage"] = stage_name
job_object["retry"] = {"max": 2, "when": JOB_RETRY_CONDITIONS}
job_object["interruptible"] = True
@@ -1175,30 +1083,21 @@ def generate_gitlab_ci_yaml(
job_id += 1
if print_summary:
- _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisions)
+ _print_staging_summary(spec_labels, stages, rebuild_decisions)
- # Clean up remote mirror override if enabled
- # TODO: Remove this block in Spack 0.23
- if deprecated_mirror_config:
- if remote_mirror_override:
- spack.mirror.remove("ci_pr_mirror", cfg.default_modify_scope())
- if spack_pipeline_type == "spack_pull_request":
- spack.mirror.remove("ci_shared_pr_mirror", cfg.default_modify_scope())
-
- tty.debug("{0} build jobs generated in {1} stages".format(job_id, stage_id))
+ tty.debug(f"{job_id} build jobs generated in {stage_id} stages")
if job_id > 0:
- tty.debug(
- "The max_needs_job is {0}, with {1} needs".format(max_needs_job, max_length_needs)
- )
+ tty.debug(f"The max_needs_job is {max_needs_job}, with {max_length_needs} needs")
# Use "all_job_names" to populate the build group for this set
if cdash_handler and cdash_handler.auth_token:
try:
cdash_handler.populate_buildgroup(all_job_names)
- except (SpackError, HTTPError, URLError) as err:
- tty.warn("Problem populating buildgroup: {0}".format(err))
- else:
+ except (SpackError, HTTPError, URLError, TimeoutError) as err:
+ tty.warn(f"Problem populating buildgroup: {err}")
+ elif cdash_config:
+ # warn only if there was actually a CDash configuration.
tty.warn("Unable to populate buildgroup without CDash credentials")
service_job_retries = {
@@ -1206,56 +1105,29 @@ def generate_gitlab_ci_yaml(
"when": ["runner_system_failure", "stuck_or_timeout_failure", "script_failure"],
}
- if copy_only_pipeline and not config_deprecated:
+ if copy_only_pipeline:
stage_names.append("copy")
sync_job = copy.deepcopy(spack_ci_ir["jobs"]["copy"]["attributes"])
sync_job["stage"] = "copy"
if artifacts_root:
- sync_job["needs"] = [
- {"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)}
- ]
+ sync_job["needs"] = [{"job": generate_job_name, "pipeline": f"{parent_pipeline_id}"}]
if "variables" not in sync_job:
sync_job["variables"] = {}
- sync_job["variables"]["SPACK_COPY_ONLY_DESTINATION"] = (
- buildcache_destination.fetch_url
- if buildcache_destination
- else remote_mirror_override or remote_mirror_url
- )
+ sync_job["variables"]["SPACK_COPY_ONLY_DESTINATION"] = buildcache_destination.fetch_url
- if "buildcache-source" in pipeline_mirrors:
- buildcache_source = pipeline_mirrors["buildcache-source"].fetch_url
- else:
- # TODO: Remove this condition in Spack 0.23
- buildcache_source = os.environ.get("SPACK_SOURCE_MIRROR", None)
+ if "buildcache-source" not in pipeline_mirrors:
+ raise SpackCIError("Copy-only pipelines require a mirror named 'buildcache-source'")
+
+ buildcache_source = pipeline_mirrors["buildcache-source"].fetch_url
sync_job["variables"]["SPACK_BUILDCACHE_SOURCE"] = buildcache_source
+ sync_job["dependencies"] = []
output_object["copy"] = sync_job
job_id += 1
if job_id > 0:
- # TODO: Remove this block in Spack 0.23
- if temp_storage_url_prefix:
- # There were some rebuild jobs scheduled, so we will need to
- # schedule a job to clean up the temporary storage location
- # associated with this pipeline.
- stage_names.append("cleanup-temp-storage")
- cleanup_job = copy.deepcopy(spack_ci_ir["jobs"]["cleanup"]["attributes"])
-
- cleanup_job["stage"] = "cleanup-temp-storage"
- cleanup_job["when"] = "always"
- cleanup_job["retry"] = service_job_retries
- cleanup_job["interruptible"] = True
-
- cleanup_job["script"] = _unpack_script(
- cleanup_job["script"],
- op=lambda cmd: cmd.replace("mirror_prefix", temp_storage_url_prefix),
- )
-
- cleanup_job["dependencies"] = []
- output_object["cleanup"] = cleanup_job
-
if (
"script" in spack_ci_ir["jobs"]["signing"]["attributes"]
and spack_pipeline_type == "spack_protected_branch"
@@ -1272,11 +1144,9 @@ def generate_gitlab_ci_yaml(
signing_job["interruptible"] = True
if "variables" not in signing_job:
signing_job["variables"] = {}
- signing_job["variables"]["SPACK_BUILDCACHE_DESTINATION"] = (
- buildcache_destination.push_url # need the s3 url for aws s3 sync
- if buildcache_destination
- else remote_mirror_override or remote_mirror_url
- )
+ signing_job["variables"][
+ "SPACK_BUILDCACHE_DESTINATION"
+ ] = buildcache_destination.push_url
signing_job["dependencies"] = []
output_object["sign-pkgs"] = signing_job
@@ -1287,9 +1157,7 @@ def generate_gitlab_ci_yaml(
final_job = spack_ci_ir["jobs"]["reindex"]["attributes"]
final_job["stage"] = "stage-rebuild-index"
- target_mirror = remote_mirror_override or remote_mirror_url
- if buildcache_destination:
- target_mirror = buildcache_destination.push_url
+ target_mirror = buildcache_destination.push_url
final_job["script"] = _unpack_script(
final_job["script"],
op=lambda cmd: cmd.replace("{index_target_mirror}", target_mirror),
@@ -1307,33 +1175,26 @@ def generate_gitlab_ci_yaml(
# Capture the version of Spack used to generate the pipeline, that can be
# passed to `git checkout` for version consistency. If we aren't in a Git
# repository, presume we are a Spack release and use the Git tag instead.
- spack_version = spack.main.get_version()
- version_to_clone = spack.main.get_spack_commit() or f"v{spack.spack_version}"
+ spack_version = spack.get_version()
+ version_to_clone = spack.get_spack_commit() or f"v{spack.spack_version}"
output_object["variables"] = {
"SPACK_ARTIFACTS_ROOT": rel_artifacts_root,
"SPACK_CONCRETE_ENV_DIR": rel_concrete_env_dir,
"SPACK_VERSION": spack_version,
"SPACK_CHECKOUT_VERSION": version_to_clone,
- # TODO: Remove this line in Spack 0.23
- "SPACK_REMOTE_MIRROR_URL": remote_mirror_url,
"SPACK_JOB_LOG_DIR": rel_job_log_dir,
"SPACK_JOB_REPRO_DIR": rel_job_repro_dir,
"SPACK_JOB_TEST_DIR": rel_job_test_dir,
- # TODO: Remove this line in Spack 0.23
- "SPACK_LOCAL_MIRROR_DIR": rel_local_mirror_dir,
"SPACK_PIPELINE_TYPE": str(spack_pipeline_type),
"SPACK_CI_STACK_NAME": os.environ.get("SPACK_CI_STACK_NAME", "None"),
- # TODO: Remove this line in Spack 0.23
- "SPACK_CI_SHARED_PR_MIRROR_URL": shared_pr_mirror or "None",
"SPACK_REBUILD_CHECK_UP_TO_DATE": str(prune_dag),
"SPACK_REBUILD_EVERYTHING": str(rebuild_everything),
"SPACK_REQUIRE_SIGNING": os.environ.get("SPACK_REQUIRE_SIGNING", "False"),
}
-
- # TODO: Remove this block in Spack 0.23
- if deprecated_mirror_config and remote_mirror_override:
- (output_object["variables"]["SPACK_REMOTE_MIRROR_OVERRIDE"]) = remote_mirror_override
+ output_vars = output_object["variables"]
+ for item, val in output_vars.items():
+ output_vars[item] = ensure_expected_target_path(val)
spack_stack_name = os.environ.get("SPACK_CI_STACK_NAME", None)
if spack_stack_name:
@@ -1348,37 +1209,21 @@ def generate_gitlab_ci_yaml(
copy_specs_file = os.path.join(
copy_specs_dir,
- "copy_{}_specs.json".format(spack_stack_name if spack_stack_name else "rebuilt"),
+ f"copy_{spack_stack_name if spack_stack_name else 'rebuilt'}_specs.json",
)
with open(copy_specs_file, "w") as fd:
fd.write(json.dumps(buildcache_copies))
- # TODO(opadron): remove this or refactor
- if run_optimizer:
- import spack.ci_optimization as ci_opt
-
- output_object = ci_opt.optimizer(output_object)
-
- # TODO(opadron): remove this or refactor
- if use_dependencies:
- import spack.ci_needs_workaround as cinw
-
- output_object = cinw.needs_to_dependencies(output_object)
else:
# No jobs were generated
noop_job = spack_ci_ir["jobs"]["noop"]["attributes"]
- noop_job["retry"] = service_job_retries
+ # If this job fails ignore the status and carry on
+ noop_job["retry"] = 0
+ noop_job["allow_failure"] = True
- if copy_only_pipeline and config_deprecated:
- tty.debug("Generating no-op job as copy-only is unsupported here.")
- noop_job["script"] = [
- 'echo "copy-only pipelines are not supported with deprecated ci configs"'
- ]
- output_object = {"unsupported-copy": noop_job}
- else:
- tty.debug("No specs to rebuild, generating no-op job")
- output_object = {"no-specs-to-rebuild": noop_job}
+ tty.debug("No specs to rebuild, generating no-op job")
+ output_object = {"no-specs-to-rebuild": noop_job}
# Ensure the child pipeline always runs
output_object["workflow"] = {"rules": [{"when": "always"}]}
@@ -1386,7 +1231,6 @@ def generate_gitlab_ci_yaml(
sorted_output = {}
for output_key, output_value in sorted(output_object.items()):
sorted_output[output_key] = output_value
-
if known_broken_specs_encountered:
tty.error("This pipeline generated hashes known to be broken on develop:")
display_broken_spec_messages(broken_specs_url, known_broken_specs_encountered)
@@ -1394,8 +1238,11 @@ def generate_gitlab_ci_yaml(
if not rebuild_everything:
sys.exit(1)
- with open(output_file, "w") as outf:
- outf.write(syaml.dump(sorted_output, default_flow_style=True))
+ # Minimize yaml output size through use of anchors
+ syaml.anchorify(sorted_output)
+
+ with open(output_file, "w") as f:
+ ruamel.yaml.YAML().dump(sorted_output, f)
def _url_encode_string(input_string):
@@ -1440,7 +1287,7 @@ def import_signing_key(base64_signing_key):
fd.write(decoded_key)
key_import_output = spack_gpg("trust", sign_key_path, output=str)
- tty.debug("spack gpg trust {0}".format(sign_key_path))
+ tty.debug(f"spack gpg trust {sign_key_path}")
tty.debug(key_import_output)
# Now print the keys we have for verifying and signing
@@ -1466,45 +1313,25 @@ def can_verify_binaries():
return len(gpg_util.public_keys()) >= 1
-def _push_mirror_contents(input_spec, sign_binaries, mirror_url):
- """Unchecked version of the public API, for easier mocking"""
- unsigned = not sign_binaries
- tty.debug("Creating buildcache ({0})".format("unsigned" if unsigned else "signed"))
- push_url = spack.mirror.Mirror.from_url(mirror_url).push_url
- return bindist.push(input_spec, push_url, bindist.PushOptions(force=True, unsigned=unsigned))
-
-
-def push_mirror_contents(input_spec: spack.spec.Spec, mirror_url, sign_binaries):
+def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: bool) -> bool:
"""Push one or more binary packages to the mirror.
Arguments:
- input_spec(spack.spec.Spec): Installed spec to push
- mirror_url (str): Base url of target mirror
- sign_binaries (bool): If True, spack will attempt to sign binary
- package before pushing.
+ spec: Installed spec to push
+ mirror_url: URL of target mirror
+ sign_binaries: If True, spack will attempt to sign binary package before pushing.
"""
+ tty.debug(f"Pushing to build cache ({'signed' if sign_binaries else 'unsigned'})")
+ signing_key = bindist.select_signing_key() if sign_binaries else None
+ mirror = spack.mirrors.mirror.Mirror.from_url(mirror_url)
try:
- return _push_mirror_contents(input_spec, sign_binaries, mirror_url)
- except Exception as inst:
- # If the mirror we're pushing to is on S3 and there's some
- # permissions problem, for example, we can't just target
- # that exception type here, since users of the
- # `spack ci rebuild' may not need or want any dependency
- # on boto3. So we use the first non-boto exception type
- # in the heirarchy:
- # boto3.exceptions.S3UploadFailedError
- # boto3.exceptions.Boto3Error
- # Exception
- # BaseException
- # object
- err_msg = "Error msg: {0}".format(inst)
- 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)
- return False
- else:
- raise inst
+ with bindist.make_uploader(mirror, signing_key=signing_key) as uploader:
+ uploader.push_or_raise([spec])
+ return True
+ except bindist.PushToBuildCacheError as e:
+ tty.error(f"Problem writing to {mirror_url}: {e}")
+ return False
def remove_other_mirrors(mirrors_to_keep, scope=None):
@@ -1517,7 +1344,7 @@ def remove_other_mirrors(mirrors_to_keep, scope=None):
mirrors_to_remove.append(name)
for mirror_name in mirrors_to_remove:
- spack.mirror.remove(mirror_name, scope)
+ spack.mirrors.utils.remove(mirror_name, scope)
def copy_files_to_artifacts(src, artifacts_dir):
@@ -1531,8 +1358,9 @@ def copy_files_to_artifacts(src, artifacts_dir):
try:
fs.copy(src, artifacts_dir)
except Exception as err:
- msg = ("Unable to copy files ({0}) to artifacts {1} due to " "exception: {2}").format(
- src, artifacts_dir, str(err)
+ msg = (
+ f"Unable to copy files ({src}) to artifacts {artifacts_dir} due to "
+ f"exception: {str(err)}"
)
tty.warn(msg)
@@ -1548,24 +1376,24 @@ def copy_stage_logs_to_artifacts(job_spec: spack.spec.Spec, job_log_dir: str) ->
job_spec: spec associated with spack install log
job_log_dir: path into which build log should be copied
"""
- tty.debug("job spec: {0}".format(job_spec))
- if not job_spec:
- msg = "Cannot copy stage logs: job spec ({0}) is required"
- tty.error(msg.format(job_spec))
- return
+ tty.debug(f"job spec: {job_spec}")
try:
pkg_cls = spack.repo.PATH.get_pkg_class(job_spec.name)
job_pkg = pkg_cls(job_spec)
- tty.debug("job package: {0}".format(job_pkg))
+ tty.debug(f"job package: {job_pkg}")
except AssertionError:
- msg = "Cannot copy stage logs: job spec ({0}) must be concrete"
- tty.error(msg.format(job_spec))
+ msg = f"Cannot copy stage logs: job spec ({job_spec}) must be concrete"
+ tty.error(msg)
return
stage_dir = job_pkg.stage.path
- tty.debug("stage dir: {0}".format(stage_dir))
- for file in [job_pkg.log_path, job_pkg.env_mods_path, *job_pkg.builder.archive_files]:
+ tty.debug(f"stage dir: {stage_dir}")
+ for file in [
+ job_pkg.log_path,
+ job_pkg.env_mods_path,
+ *spack.builder.create(job_pkg).archive_files,
+ ]:
copy_files_to_artifacts(file, job_log_dir)
@@ -1577,15 +1405,21 @@ def copy_test_logs_to_artifacts(test_stage, job_test_dir):
test_stage (str): test stage path
job_test_dir (str): the destination artifacts test directory
"""
- tty.debug("test stage: {0}".format(test_stage))
+ tty.debug(f"test stage: {test_stage}")
if not os.path.exists(test_stage):
- msg = "Cannot copy test logs: job test stage ({0}) does not exist"
- tty.error(msg.format(test_stage))
+ msg = f"Cannot copy test logs: job test stage ({test_stage}) does not exist"
+ tty.error(msg)
return
copy_files_to_artifacts(os.path.join(test_stage, "*", "*.txt"), job_test_dir)
+def win_quote(quote_str: str) -> str:
+ if IS_WINDOWS:
+ quote_str = f'"{quote_str}"'
+ return quote_str
+
+
def download_and_extract_artifacts(url, work_dir):
"""Look for gitlab artifacts.zip at the given url, and attempt to download
and extract the contents into the given work_dir
@@ -1595,7 +1429,7 @@ def download_and_extract_artifacts(url, work_dir):
url (str): Complete url to artifacts.zip file
work_dir (str): Path to destination where artifacts should be extracted
"""
- tty.msg("Fetching artifacts from: {0}\n".format(url))
+ tty.msg(f"Fetching artifacts from: {url}\n")
headers = {"Content-Type": "application/zip"}
@@ -1608,11 +1442,11 @@ def download_and_extract_artifacts(url, work_dir):
request = Request(url, headers=headers)
request.get_method = lambda: "GET"
- response = opener.open(request)
+ response = opener.open(request, timeout=SPACK_CDASH_TIMEOUT)
response_code = response.getcode()
if response_code != 200:
- msg = "Error response code ({0}) in reproduce_ci_job".format(response_code)
+ msg = f"Error response code ({response_code}) in reproduce_ci_job"
raise SpackError(msg)
artifacts_zip_path = os.path.join(work_dir, "artifacts.zip")
@@ -1642,7 +1476,7 @@ def get_spack_info():
return git_log
- return "no git repo, use spack {0}".format(spack.spack_version)
+ return f"no git repo, use spack {spack.spack_version}"
def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
@@ -1665,8 +1499,8 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
"""
# figure out the path to the spack git version being used for the
# reproduction
- print("checkout_commit: {0}".format(checkout_commit))
- print("merge_commit: {0}".format(merge_commit))
+ print(f"checkout_commit: {checkout_commit}")
+ print(f"merge_commit: {merge_commit}")
dot_git_path = os.path.join(spack.paths.prefix, ".git")
if not os.path.exists(dot_git_path):
@@ -1685,14 +1519,14 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
git("log", "-1", checkout_commit, output=str, error=os.devnull, fail_on_error=False)
if git.returncode != 0:
- tty.error("Missing commit: {0}".format(checkout_commit))
+ tty.error(f"Missing commit: {checkout_commit}")
return False
if merge_commit:
git("log", "-1", merge_commit, output=str, error=os.devnull, fail_on_error=False)
if git.returncode != 0:
- tty.error("Missing commit: {0}".format(merge_commit))
+ tty.error(f"Missing commit: {merge_commit}")
return False
# Next attempt to clone your local spack repo into the repro dir
@@ -1715,7 +1549,7 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
)
if git.returncode != 0:
- tty.error("Unable to checkout {0}".format(checkout_commit))
+ tty.error(f"Unable to checkout {checkout_commit}")
tty.msg(co_out)
return False
@@ -1734,7 +1568,7 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
)
if git.returncode != 0:
- tty.error("Unable to merge {0}".format(merge_commit))
+ tty.error(f"Unable to merge {merge_commit}")
tty.msg(merge_out)
return False
@@ -1755,6 +1589,7 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
commands to run to reproduce the build once inside the container.
"""
work_dir = os.path.realpath(work_dir)
+ platform_script_ext = "ps1" if IS_WINDOWS else "sh"
download_and_extract_artifacts(url, work_dir)
gpg_path = None
@@ -1765,13 +1600,13 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
lock_file = fs.find(work_dir, "spack.lock")[0]
repro_lock_dir = os.path.dirname(lock_file)
- tty.debug("Found lock file in: {0}".format(repro_lock_dir))
+ tty.debug(f"Found lock file in: {repro_lock_dir}")
yaml_files = fs.find(work_dir, ["*.yaml", "*.yml"])
tty.debug("yaml files:")
for yaml_file in yaml_files:
- tty.debug(" {0}".format(yaml_file))
+ tty.debug(f" {yaml_file}")
pipeline_yaml = None
@@ -1786,10 +1621,10 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
pipeline_yaml = yaml_obj
if pipeline_yaml:
- tty.debug("\n{0} is likely your pipeline file".format(yf))
+ tty.debug(f"\n{yf} is likely your pipeline file")
relative_concrete_env_dir = pipeline_yaml["variables"]["SPACK_CONCRETE_ENV_DIR"]
- tty.debug("Relative environment path used by cloud job: {0}".format(relative_concrete_env_dir))
+ tty.debug(f"Relative environment path used by cloud job: {relative_concrete_env_dir}")
# Using the relative concrete environment path found in the generated
# pipeline variable above, copy the spack environment files so they'll
@@ -1803,10 +1638,11 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
shutil.copyfile(orig_yaml_path, copy_yaml_path)
# Find the install script in the unzipped artifacts and make it executable
- install_script = fs.find(work_dir, "install.sh")[0]
- st = os.stat(install_script)
- os.chmod(install_script, st.st_mode | stat.S_IEXEC)
-
+ install_script = fs.find(work_dir, f"install.{platform_script_ext}")[0]
+ if not IS_WINDOWS:
+ # pointless on Windows
+ st = os.stat(install_script)
+ os.chmod(install_script, st.st_mode | stat.S_IEXEC)
# Find the repro details file. This just includes some values we wrote
# during `spack ci rebuild` to make reproduction easier. E.g. the job
# name is written here so we can easily find the configuration of the
@@ -1844,7 +1680,7 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
job_image = job_image_elt["name"]
else:
job_image = job_image_elt
- tty.msg("Job ran with the following image: {0}".format(job_image))
+ tty.msg(f"Job ran with the following image: {job_image}")
# Because we found this job was run with a docker image, so we will try
# to print a "docker run" command that bind-mounts the directory where
@@ -1919,65 +1755,75 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
job_tags = None
if "tags" in job_yaml:
job_tags = job_yaml["tags"]
- tty.msg("Job ran with the following tags: {0}".format(job_tags))
+ tty.msg(f"Job ran with the following tags: {job_tags}")
entrypoint_script = [
["git", "config", "--global", "--add", "safe.directory", mount_as_dir],
- [".", os.path.join(mount_as_dir if job_image else work_dir, "share/spack/setup-env.sh")],
+ [
+ ".",
+ os.path.join(
+ mount_as_dir if job_image else work_dir,
+ f"share/spack/setup-env.{platform_script_ext}",
+ ),
+ ],
["spack", "gpg", "trust", mounted_gpg_path if job_image else gpg_path] if gpg_path else [],
["spack", "env", "activate", mounted_env_dir if job_image else repro_dir],
- [os.path.join(mounted_repro_dir, "install.sh") if job_image else install_script],
+ [
+ (
+ os.path.join(mounted_repro_dir, f"install.{platform_script_ext}")
+ if job_image
+ else install_script
+ )
+ ],
]
-
+ entry_script = os.path.join(mounted_workdir, f"entrypoint.{platform_script_ext}")
inst_list = []
# Finally, print out some instructions to reproduce the build
if job_image:
# Allow interactive
- entrypoint_script.extend(
- [
- [
- "echo",
- "Re-run install script using:\n\t{0}".format(
- os.path.join(mounted_repro_dir, "install.sh")
- if job_image
- else install_script
- ),
- ],
- # Allow interactive
- ["exec", "$@"],
- ]
+ install_mechanism = (
+ os.path.join(mounted_repro_dir, f"install.{platform_script_ext}")
+ if job_image
+ else install_script
)
+ entrypoint_script.append(["echo", f"Re-run install script using:\n\t{install_mechanism}"])
+ # Allow interactive
+ if IS_WINDOWS:
+ entrypoint_script.append(["&", "($args -Join ' ')", "-NoExit"])
+ else:
+ entrypoint_script.append(["exec", "$@"])
+
process_command(
"entrypoint", entrypoint_script, work_dir, run=False, exit_on_failure=False
)
docker_command = [
- [
- runtime,
- "run",
- "-i",
- "-t",
- "--rm",
- "--name",
- "spack_reproducer",
- "-v",
- ":".join([work_dir, mounted_workdir, "Z"]),
- "-v",
- ":".join(
- [
- os.path.join(work_dir, "jobs_scratch_dir"),
- os.path.join(mount_as_dir, "jobs_scratch_dir"),
- "Z",
- ]
- ),
- "-v",
- ":".join([os.path.join(work_dir, "spack"), mount_as_dir, "Z"]),
- "--entrypoint",
- os.path.join(mounted_workdir, "entrypoint.sh"),
- job_image,
- "bash",
- ]
+ runtime,
+ "run",
+ "-i",
+ "-t",
+ "--rm",
+ "--name",
+ "spack_reproducer",
+ "-v",
+ ":".join([work_dir, mounted_workdir, "Z"]),
+ "-v",
+ ":".join(
+ [
+ os.path.join(work_dir, "jobs_scratch_dir"),
+ os.path.join(mount_as_dir, "jobs_scratch_dir"),
+ "Z",
+ ]
+ ),
+ "-v",
+ ":".join([os.path.join(work_dir, "spack"), mount_as_dir, "Z"]),
+ "--entrypoint",
]
+ if IS_WINDOWS:
+ docker_command.extend(["powershell.exe", job_image, entry_script, "powershell.exe"])
+ else:
+ docker_command.extend([entry_script, job_image, "bash"])
+ docker_command = [docker_command]
autostart = autostart and setup_result
process_command("start", docker_command, work_dir, run=autostart)
@@ -1986,22 +1832,26 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
inst_list.extend(
[
" - Start the docker container install",
- " $ {0}/start.sh".format(work_dir),
+ f" $ {work_dir}/start.{platform_script_ext}",
]
)
else:
- process_command("reproducer", entrypoint_script, work_dir, run=False)
+ autostart = autostart and setup_result
+ process_command("reproducer", entrypoint_script, work_dir, run=autostart)
inst_list.append("\nOnce on the tagged runner:\n\n")
inst_list.extent(
- [" - Run the reproducer script", " $ {0}/reproducer.sh".format(work_dir)]
+ [
+ " - Run the reproducer script",
+ f" $ {work_dir}/reproducer.{platform_script_ext}",
+ ]
)
if not setup_result:
inst_list.append("\n - Clone spack and acquire tested commit")
- inst_list.append("\n {0}\n".format(spack_info))
+ inst_list.append(f"\n {spack_info}\n")
inst_list.append("\n")
- inst_list.append("\n Path to clone spack: {0}/spack\n\n".format(work_dir))
+ inst_list.append(f"\n Path to clone spack: {work_dir}/spack\n\n")
tty.msg("".join(inst_list))
@@ -2020,50 +1870,78 @@ def process_command(name, commands, repro_dir, run=True, exit_on_failure=True):
Returns: the exit code from processing the command
"""
- tty.debug("spack {0} arguments: {1}".format(name, commands))
+ tty.debug(f"spack {name} arguments: {commands}")
if len(commands) == 0 or isinstance(commands[0], str):
commands = [commands]
- # Create a string [command 1] && [command 2] && ... && [command n] with commands
- # quoted using double quotes.
- args_to_string = lambda args: " ".join('"{}"'.format(arg) for arg in args)
- full_command = " \n ".join(map(args_to_string, commands))
-
- # Write the command to a shell script
- script = "{0}.sh".format(name)
- with open(script, "w") as fd:
- fd.write("#!/bin/sh\n\n")
- fd.write("\n# spack {0} command\n".format(name))
+ def compose_command_err_handling(args):
+ if not IS_WINDOWS:
+ args = [f'"{arg}"' for arg in args]
+ arg_str = " ".join(args)
+ result = arg_str + "\n"
+ # ErrorActionPreference will handle PWSH commandlets (Spack calls),
+ # but we need to handle EXEs (git, etc) ourselves
+ catch_exe_failure = (
+ """
+if ($LASTEXITCODE -ne 0){{
+ throw 'Command {} has failed'
+}}
+"""
+ if IS_WINDOWS
+ else ""
+ )
+ if exit_on_failure and catch_exe_failure:
+ result += catch_exe_failure.format(arg_str)
+ return result
+
+ # Create a string [command 1] \n [command 2] \n ... \n [command n] with
+ # commands composed into a platform dependent shell script, pwsh on Windows,
+ full_command = "\n".join(map(compose_command_err_handling, commands))
+ # Write the command to a python script
+ if IS_WINDOWS:
+ script = f"{name}.ps1"
+ script_content = [f"\n# spack {name} command\n"]
if exit_on_failure:
- fd.write("set -e\n")
+ script_content.append('$ErrorActionPreference = "Stop"\n')
if os.environ.get("SPACK_VERBOSE_SCRIPT"):
- fd.write("set -x\n")
- fd.write(full_command)
- fd.write("\n")
+ script_content.append("Set-PSDebug -Trace 2\n")
+ else:
+ script = f"{name}.sh"
+ script_content = ["#!/bin/sh\n\n", f"\n# spack {name} command\n"]
+ if exit_on_failure:
+ script_content.append("set -e\n")
+ if os.environ.get("SPACK_VERBOSE_SCRIPT"):
+ script_content.append("set -x\n")
+ script_content.append(full_command)
+ script_content.append("\n")
- st = os.stat(script)
- os.chmod(script, st.st_mode | stat.S_IEXEC)
+ with open(script, "w") as fd:
+ for line in script_content:
+ fd.write(line)
copy_path = os.path.join(repro_dir, script)
shutil.copyfile(script, copy_path)
- st = os.stat(copy_path)
- os.chmod(copy_path, st.st_mode | stat.S_IEXEC)
+ if not IS_WINDOWS:
+ st = os.stat(copy_path)
+ os.chmod(copy_path, st.st_mode | stat.S_IEXEC)
- # Run the generated install.sh shell script as if it were being run in
+ # Run the generated shell script as if it were being run in
# a login shell.
exit_code = None
if run:
try:
- cmd_process = subprocess.Popen(["/bin/sh", "./{0}".format(script)])
+ # We use sh as executor on Linux like platforms, pwsh on Windows
+ interpreter = "powershell.exe" if IS_WINDOWS else "/bin/sh"
+ cmd_process = subprocess.Popen([interpreter, f"./{script}"])
cmd_process.wait()
exit_code = cmd_process.returncode
except (ValueError, subprocess.CalledProcessError, OSError) as err:
- tty.error("Encountered error running {0} script".format(name))
+ tty.error(f"Encountered error running {name} script")
tty.error(err)
exit_code = 1
- tty.debug("spack {0} exited {1}".format(name, exit_code))
+ tty.debug(f"spack {name} exited {exit_code}")
else:
# Delete the script, it is copied to the destination dir
os.remove(script)
@@ -2088,7 +1966,7 @@ def create_buildcache(
for mirror_url in destination_mirror_urls:
results.append(
PushResult(
- success=push_mirror_contents(input_spec, mirror_url, sign_binaries), url=mirror_url
+ success=push_to_build_cache(input_spec, mirror_url, sign_binaries), url=mirror_url
)
)
@@ -2122,7 +2000,7 @@ def write_broken_spec(url, pkg_name, stack_name, job_url, pipeline_url, spec_dic
# If there is an S3 error (e.g., access denied or connection
# error), the first non boto-specific class in the exception
# hierarchy is Exception. Just print a warning and return
- msg = "Error writing to broken specs list {0}: {1}".format(url, err)
+ msg = f"Error writing to broken specs list {url}: {err}"
tty.warn(msg)
finally:
shutil.rmtree(tmpdir)
@@ -2134,8 +2012,8 @@ def read_broken_spec(broken_spec_url):
"""
try:
_, _, fs = web_util.read_from_url(broken_spec_url)
- except (URLError, web_util.SpackWebError, HTTPError):
- tty.warn("Unable to read broken spec from {0}".format(broken_spec_url))
+ except web_util.SpackWebError:
+ tty.warn(f"Unable to read broken spec from {broken_spec_url}")
return None
broken_spec_contents = codecs.getreader("utf-8")(fs).read()
@@ -2150,14 +2028,14 @@ def display_broken_spec_messages(base_url, hashes):
for spec_hash, broken_spec in [tup for tup in broken_specs if tup[1]]:
details = broken_spec["broken-spec"]
if "job-name" in details:
- item_name = "{0}/{1}".format(details["job-name"], spec_hash[:7])
+ item_name = f"{details['job-name']}/{spec_hash[:7]}"
else:
item_name = spec_hash
if "job-stack" in details:
- item_name = "{0} (in stack {1})".format(item_name, details["job-stack"])
+ item_name = f"{item_name} (in stack {details['job-stack']})"
- msg = " {0} was reported broken here: {1}".format(item_name, details["job-url"])
+ msg = f" {item_name} was reported broken here: {details['job-url']}"
tty.msg(msg)
@@ -2180,7 +2058,7 @@ def run_standalone_tests(**kwargs):
log_file = kwargs.get("log_file")
if cdash and log_file:
- tty.msg("The test log file {0} option is ignored with CDash reporting".format(log_file))
+ tty.msg(f"The test log file {log_file} option is ignored with CDash reporting")
log_file = None
# Error out but do NOT terminate if there are missing required arguments.
@@ -2206,10 +2084,10 @@ def run_standalone_tests(**kwargs):
test_args.extend(["--log-file", log_file])
test_args.append(job_spec.name)
- tty.debug("Running {0} stand-alone tests".format(job_spec.name))
+ tty.debug(f"Running {job_spec.name} stand-alone tests")
exit_code = process_command("test", test_args, repro_dir)
- tty.debug("spack test exited {0}".format(exit_code))
+ tty.debug(f"spack test exited {exit_code}")
class CDashHandler:
@@ -2232,7 +2110,7 @@ class CDashHandler:
# append runner description to the site if available
runner = os.environ.get("CI_RUNNER_DESCRIPTION")
if runner:
- self.site += " ({0})".format(runner)
+ self.site += f" ({runner})"
# track current spec, if any
self.current_spec = None
@@ -2240,13 +2118,13 @@ class CDashHandler:
def args(self):
return [
"--cdash-upload-url",
- self.upload_url,
+ win_quote(self.upload_url),
"--cdash-build",
- self.build_name,
+ win_quote(self.build_name),
"--cdash-site",
- self.site,
+ win_quote(self.site),
"--cdash-buildstamp",
- self.build_stamp,
+ win_quote(self.build_stamp),
]
@property # type: ignore
@@ -2260,21 +2138,13 @@ class CDashHandler:
Returns: (str) current spec's CDash build name."""
spec = self.current_spec
if spec:
- build_name = "{0}@{1}%{2} hash={3} arch={4} ({5})".format(
- spec.name,
- spec.version,
- spec.compiler,
- spec.dag_hash(),
- spec.architecture,
- self.build_group,
- )
- tty.debug(
- "Generated CDash build name ({0}) from the {1}".format(build_name, spec.name)
- )
+ build_name = f"{spec.name}@{spec.version}%{spec.compiler} \
+hash={spec.dag_hash()} arch={spec.architecture} ({self.build_group})"
+ tty.debug(f"Generated CDash build name ({build_name}) from the {spec.name}")
return build_name
build_name = os.environ.get("SPACK_CDASH_BUILD_NAME")
- tty.debug("Using CDash build name ({0}) from the environment".format(build_name))
+ tty.debug(f"Using CDash build name ({build_name}) from the environment")
return build_name
@property # type: ignore
@@ -2288,25 +2158,25 @@ class CDashHandler:
Returns: (str) current CDash build stamp"""
build_stamp = os.environ.get("SPACK_CDASH_BUILD_STAMP")
if build_stamp:
- tty.debug("Using build stamp ({0}) from the environment".format(build_stamp))
+ tty.debug(f"Using build stamp ({build_stamp}) from the environment")
return build_stamp
build_stamp = cdash_build_stamp(self.build_group, time.time())
- tty.debug("Generated new build stamp ({0})".format(build_stamp))
+ tty.debug(f"Generated new build stamp ({build_stamp})")
return build_stamp
@property # type: ignore
@memoized
def project_enc(self):
- tty.debug("Encoding project ({0}): {1})".format(type(self.project), self.project))
+ tty.debug(f"Encoding project ({type(self.project)}): {self.project})")
encode = urlencode({"project": self.project})
index = encode.find("=") + 1
return encode[index:]
@property
def upload_url(self):
- url_format = "{0}/submit.php?project={1}"
- return url_format.format(self.url, self.project_enc)
+ url_format = f"{self.url}/submit.php?project={self.project_enc}"
+ return url_format
def copy_test_results(self, source, dest):
"""Copy test results to artifacts directory."""
@@ -2320,11 +2190,11 @@ class CDashHandler:
request = Request(url, data=enc_data, headers=headers)
- response = opener.open(request)
+ response = opener.open(request, timeout=SPACK_CDASH_TIMEOUT)
response_code = response.getcode()
if response_code not in [200, 201]:
- msg = "Creating buildgroup failed (response code = {0})".format(response_code)
+ msg = f"Creating buildgroup failed (response code = {response_code})"
tty.warn(msg)
return None
@@ -2335,10 +2205,10 @@ class CDashHandler:
return build_group_id
def populate_buildgroup(self, job_names):
- url = "{0}/api/v1/buildgroup.php".format(self.url)
+ url = f"{self.url}/api/v1/buildgroup.php"
headers = {
- "Authorization": "Bearer {0}".format(self.auth_token),
+ "Authorization": f"Bearer {self.auth_token}",
"Content-Type": "application/json",
}
@@ -2346,11 +2216,11 @@ class CDashHandler:
parent_group_id = self.create_buildgroup(opener, headers, url, self.build_group, "Daily")
group_id = self.create_buildgroup(
- opener, headers, url, "Latest {0}".format(self.build_group), "Latest"
+ opener, headers, url, f"Latest {self.build_group}", "Latest"
)
if not parent_group_id or not group_id:
- msg = "Failed to create or retrieve buildgroups for {0}".format(self.build_group)
+ msg = f"Failed to create or retrieve buildgroups for {self.build_group}"
tty.warn(msg)
return
@@ -2366,11 +2236,11 @@ class CDashHandler:
request = Request(url, data=enc_data, headers=headers)
request.get_method = lambda: "PUT"
- response = opener.open(request)
+ response = opener.open(request, timeout=SPACK_CDASH_TIMEOUT)
response_code = response.getcode()
if response_code != 200:
- msg = "Error response code ({0}) in populate_buildgroup".format(response_code)
+ msg = f"Error response code ({response_code}) in populate_buildgroup"
tty.warn(msg)
def report_skipped(self, spec: spack.spec.Spec, report_dir: str, reason: Optional[str]):
@@ -2395,83 +2265,6 @@ class CDashHandler:
reporter.test_skipped_report(report_dir, spec, reason)
-def translate_deprecated_config(config):
- # Remove all deprecated keys from config
- mappings = config.pop("mappings", [])
- match_behavior = config.pop("match_behavior", "first")
-
- build_job = {}
- if "image" in config:
- build_job["image"] = config.pop("image")
- if "tags" in config:
- build_job["tags"] = config.pop("tags")
- if "variables" in config:
- build_job["variables"] = config.pop("variables")
-
- # Scripts always override in old CI
- if "before_script" in config:
- build_job["before_script:"] = config.pop("before_script")
- if "script" in config:
- build_job["script:"] = config.pop("script")
- if "after_script" in config:
- build_job["after_script:"] = config.pop("after_script")
-
- signing_job = None
- if "signing-job-attributes" in config:
- signing_job = {"signing-job": config.pop("signing-job-attributes")}
-
- service_job_attributes = None
- if "service-job-attributes" in config:
- service_job_attributes = config.pop("service-job-attributes")
-
- # If this config already has pipeline-gen do not more
- if "pipeline-gen" in config:
- return True if mappings or build_job or signing_job or service_job_attributes else False
-
- config["target"] = "gitlab"
-
- config["pipeline-gen"] = []
- pipeline_gen = config["pipeline-gen"]
-
- # Build Job
- submapping = []
- for section in mappings:
- submapping_section = {"match": section["match"]}
- if "runner-attributes" in section:
- remapped_attributes = {}
- if match_behavior == "first":
- for key, value in section["runner-attributes"].items():
- # Scripts always override in old CI
- if key == "script":
- remapped_attributes["script:"] = value
- elif key == "before_script":
- remapped_attributes["before_script:"] = value
- elif key == "after_script":
- remapped_attributes["after_script:"] = value
- else:
- remapped_attributes[key] = value
- else:
- # Handle "merge" behavior be allowing scripts to merge in submapping section
- remapped_attributes = section["runner-attributes"]
- submapping_section["build-job"] = remapped_attributes
-
- if "remove-attributes" in section:
- # Old format only allowed tags in this section, so no extra checks are needed
- submapping_section["build-job-remove"] = section["remove-attributes"]
- submapping.append(submapping_section)
- pipeline_gen.append({"submapping": submapping, "match_behavior": match_behavior})
-
- if build_job:
- pipeline_gen.append({"build-job": build_job})
-
- # Signing Job
- if signing_job:
- pipeline_gen.append(signing_job)
-
- # Service Jobs
- if service_job_attributes:
- pipeline_gen.append({"reindex-job": service_job_attributes})
- pipeline_gen.append({"noop-job": service_job_attributes})
- pipeline_gen.append({"cleanup-job": service_job_attributes})
-
- return True
+class SpackCIError(spack.error.SpackError):
+ def __init__(self, msg):
+ super().__init__(msg)
diff --git a/lib/spack/spack/ci_needs_workaround.py b/lib/spack/spack/ci_needs_workaround.py
deleted file mode 100644
index e026b5c4fd..0000000000
--- a/lib/spack/spack/ci_needs_workaround.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2013-2024 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 collections.abc
-
-get_job_name = lambda needs_entry: (
- needs_entry.get("job")
- if (isinstance(needs_entry, collections.abc.Mapping) and needs_entry.get("artifacts", True))
- else needs_entry
- if isinstance(needs_entry, str)
- else None
-)
-
-
-def convert_job(job_entry):
- if not isinstance(job_entry, collections.abc.Mapping):
- return job_entry
-
- needs = job_entry.get("needs")
- if needs is None:
- return job_entry
-
- new_job = {}
- new_job.update(job_entry)
- del new_job["needs"]
-
- new_job["dependencies"] = list(
- filter((lambda x: x is not None), (get_job_name(needs_entry) for needs_entry in needs))
- )
-
- return new_job
-
-
-def needs_to_dependencies(yaml):
- return dict((k, convert_job(v)) for k, v in yaml.items())
diff --git a/lib/spack/spack/ci_optimization.py b/lib/spack/spack/ci_optimization.py
deleted file mode 100644
index 7d799fc907..0000000000
--- a/lib/spack/spack/ci_optimization.py
+++ /dev/null
@@ -1,363 +0,0 @@
-# Copyright 2013-2024 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 collections
-import collections.abc
-import copy
-import hashlib
-
-import spack.util.spack_yaml as syaml
-
-
-def sort_yaml_obj(obj):
- if isinstance(obj, collections.abc.Mapping):
- return syaml.syaml_dict(
- (k, sort_yaml_obj(v)) for k, v in sorted(obj.items(), key=(lambda item: str(item[0])))
- )
-
- if isinstance(obj, collections.abc.Sequence) and not isinstance(obj, str):
- return syaml.syaml_list(sort_yaml_obj(x) for x in obj)
-
- return obj
-
-
-def matches(obj, proto):
- """Returns True if the test object "obj" matches the prototype object
- "proto".
-
- If obj and proto are mappings, obj matches proto if (key in obj) and
- (obj[key] matches proto[key]) for every key in proto.
-
- If obj and proto are sequences, obj matches proto if they are of the same
- length and (a matches b) for every (a,b) in zip(obj, proto).
-
- Otherwise, obj matches proto if obj == proto.
-
- Precondition: proto must not have any reference cycles
- """
- if isinstance(obj, collections.abc.Mapping):
- if not isinstance(proto, collections.abc.Mapping):
- return False
-
- return all((key in obj and matches(obj[key], val)) for key, val in proto.items())
-
- if isinstance(obj, collections.abc.Sequence) and not isinstance(obj, str):
- if not (isinstance(proto, collections.abc.Sequence) and not isinstance(proto, str)):
- return False
-
- if len(obj) != len(proto):
- return False
-
- return all(matches(obj[index], val) for index, val in enumerate(proto))
-
- return obj == proto
-
-
-def subkeys(obj, proto):
- """Returns the test mapping "obj" after factoring out the items it has in
- common with the prototype mapping "proto".
-
- Consider a recursive merge operation, merge(a, b) on mappings a and b, that
- returns a mapping, m, whose keys are the union of the keys of a and b, and
- for every such key, "k", its corresponding value is:
-
- - merge(a[key], b[key]) if a[key] and b[key] are mappings, or
- - b[key] if (key in b) and not matches(a[key], b[key]),
- or
- - a[key] otherwise
-
-
- If obj and proto are mappings, the returned object is the smallest object,
- "a", such that merge(a, proto) matches obj.
-
- Otherwise, obj is returned.
- """
- if not (
- isinstance(obj, collections.abc.Mapping) and isinstance(proto, collections.abc.Mapping)
- ):
- return obj
-
- new_obj = {}
- for key, value in obj.items():
- if key not in proto:
- new_obj[key] = value
- continue
-
- if matches(value, proto[key]) and matches(proto[key], value):
- continue
-
- if isinstance(value, collections.abc.Mapping):
- new_obj[key] = subkeys(value, proto[key])
- continue
-
- new_obj[key] = value
-
- return new_obj
-
-
-def add_extends(yaml, key):
- """Modifies the given object "yaml" so that it includes an "extends" key
- whose value features "key".
-
- If "extends" is not in yaml, then yaml is modified such that
- yaml["extends"] == key.
-
- If yaml["extends"] is a str, then yaml is modified such that
- yaml["extends"] == [yaml["extends"], key]
-
- If yaml["extends"] is a list that does not include key, then key is
- appended to the list.
-
- Otherwise, yaml is left unchanged.
- """
-
- has_key = "extends" in yaml
- extends = yaml.get("extends")
-
- if has_key and not isinstance(extends, (str, collections.abc.Sequence)):
- return
-
- if extends is None:
- yaml["extends"] = key
- return
-
- if isinstance(extends, str):
- if extends != key:
- yaml["extends"] = [extends, key]
- return
-
- if key not in extends:
- extends.append(key)
-
-
-def common_subobject(yaml, sub):
- """Factor prototype object "sub" out of the values of mapping "yaml".
-
- Consider a modified copy of yaml, "new", where for each key, "key" in yaml:
-
- - If yaml[key] matches sub, then new[key] = subkeys(yaml[key], sub).
- - Otherwise, new[key] = yaml[key].
-
- If the above match criteria is not satisfied for any such key, then (yaml,
- None) is returned. The yaml object is returned unchanged.
-
- Otherwise, each matching value in new is modified as in
- add_extends(new[key], common_key), and then new[common_key] is set to sub.
- The common_key value is chosen such that it does not match any preexisting
- key in new. In this case, (new, common_key) is returned.
- """
- match_list = set(k for k, v in yaml.items() if matches(v, sub))
-
- if not match_list:
- return yaml, None
-
- common_prefix = ".c"
- common_index = 0
-
- while True:
- common_key = "".join((common_prefix, str(common_index)))
- if common_key not in yaml:
- break
- common_index += 1
-
- new_yaml = {}
-
- for key, val in yaml.items():
- new_yaml[key] = copy.deepcopy(val)
-
- if not matches(val, sub):
- continue
-
- new_yaml[key] = subkeys(new_yaml[key], sub)
- add_extends(new_yaml[key], common_key)
-
- new_yaml[common_key] = sub
-
- return new_yaml, common_key
-
-
-def print_delta(name, old, new, applied=None):
- delta = new - old
- reldelta = (1000 * delta) // old
- reldelta = (reldelta // 10, reldelta % 10)
-
- if applied is None:
- applied = new <= old
-
- print(
- "\n".join(
- (
- "{0} {1}:",
- " before: {2: 10d}",
- " after : {3: 10d}",
- " delta : {4:+10d} ({5:=+3d}.{6}%)",
- )
- ).format(name, ("+" if applied else "x"), old, new, delta, reldelta[0], reldelta[1])
- )
-
-
-def try_optimization_pass(name, yaml, optimization_pass, *args, **kwargs):
- """Try applying an optimization pass and return information about the
- result
-
- "name" is a string describing the nature of the pass. If it is a non-empty
- string, summary statistics are also printed to stdout.
-
- "yaml" is the object to apply the pass to.
-
- "optimization_pass" is the function implementing the pass to be applied.
-
- "args" and "kwargs" are the additional arguments to pass to optimization
- pass. The pass is applied as
-
- >>> (new_yaml, *other_results) = optimization_pass(yaml, *args, **kwargs)
-
- The pass's results are greedily rejected if it does not modify the original
- yaml document, or if it produces a yaml document that serializes to a
- larger string.
-
- Returns (new_yaml, yaml, applied, other_results) if applied, or
- (yaml, new_yaml, applied, other_results) otherwise.
- """
- result = optimization_pass(yaml, *args, **kwargs)
- new_yaml, other_results = result[0], result[1:]
-
- if new_yaml is yaml:
- # pass was not applied
- return (yaml, new_yaml, False, other_results)
-
- pre_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
- post_size = len(syaml.dump_config(sort_yaml_obj(new_yaml), default_flow_style=True))
-
- # pass makes the size worse: not applying
- applied = post_size <= pre_size
- if applied:
- yaml, new_yaml = new_yaml, yaml
-
- if name:
- print_delta(name, pre_size, post_size, applied)
-
- return (yaml, new_yaml, applied, other_results)
-
-
-def build_histogram(iterator, key):
- """Builds a histogram of values given an iterable of mappings and a key.
-
- For each mapping "m" with key "key" in iterator, the value m[key] is
- considered.
-
- Returns a list of tuples (hash, count, proportion, value), where
-
- - "hash" is a sha1sum hash of the value.
- - "count" is the number of occurences of values that hash to "hash".
- - "proportion" is the proportion of all values considered above that
- hash to "hash".
- - "value" is one of the values considered above that hash to "hash".
- Which value is chosen when multiple values hash to the same "hash" is
- undefined.
-
- The list is sorted in descending order by count, yielding the most
- frequently occuring hashes first.
- """
- buckets = collections.defaultdict(int)
- values = {}
-
- num_objects = 0
- for obj in iterator:
- num_objects += 1
-
- try:
- val = obj[key]
- except (KeyError, TypeError):
- continue
-
- value_hash = hashlib.sha1()
- value_hash.update(syaml.dump_config(sort_yaml_obj(val)).encode())
- value_hash = value_hash.hexdigest()
-
- buckets[value_hash] += 1
- values[value_hash] = val
-
- return [
- (h, buckets[h], float(buckets[h]) / num_objects, values[h])
- for h in sorted(buckets.keys(), key=lambda k: -buckets[k])
- ]
-
-
-def optimizer(yaml):
- original_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
-
- # try factoring out commonly repeated portions
- common_job = {
- "variables": {"SPACK_COMPILER_ACTION": "NONE"},
- "after_script": ['rm -rf "./spack"'],
- "artifacts": {"paths": ["jobs_scratch_dir", "cdash_report"], "when": "always"},
- }
-
- # look for a list of tags that appear frequently
- _, count, proportion, tags = next(iter(build_histogram(yaml.values(), "tags")), (None,) * 4)
-
- # If a list of tags is found, and there are more than one job that uses it,
- # *and* the jobs that do use it represent at least 70% of all jobs, then
- # add the list to the prototype object.
- if tags and count > 1 and proportion >= 0.70:
- common_job["tags"] = tags
-
- # apply common object factorization
- yaml, other, applied, rest = try_optimization_pass(
- "general common object factorization", yaml, common_subobject, common_job
- )
-
- # look for a common script, and try factoring that out
- _, count, proportion, script = next(
- iter(build_histogram(yaml.values(), "script")), (None,) * 4
- )
-
- if script and count > 1 and proportion >= 0.70:
- yaml, other, applied, rest = try_optimization_pass(
- "script factorization", yaml, common_subobject, {"script": script}
- )
-
- # look for a common before_script, and try factoring that out
- _, count, proportion, script = next(
- iter(build_histogram(yaml.values(), "before_script")), (None,) * 4
- )
-
- if script and count > 1 and proportion >= 0.70:
- yaml, other, applied, rest = try_optimization_pass(
- "before_script factorization", yaml, common_subobject, {"before_script": script}
- )
-
- # Look specifically for the SPACK_ROOT_SPEC environment variables.
- # Try to factor them out.
- h = build_histogram(
- (getattr(val, "get", lambda *args: {})("variables") for val in yaml.values()),
- "SPACK_ROOT_SPEC",
- )
-
- # In this case, we try to factor out *all* instances of the SPACK_ROOT_SPEC
- # environment variable; not just the one that appears with the greatest
- # frequency. We only require that more than 1 job uses a given instance's
- # value, because we expect the value to be very large, and so expect even
- # few-to-one factorizations to yield large space savings.
- counter = 0
- for _, count, proportion, spec in h:
- if count <= 1:
- continue
-
- counter += 1
-
- yaml, other, applied, rest = try_optimization_pass(
- "SPACK_ROOT_SPEC factorization ({count})".format(count=counter),
- yaml,
- common_subobject,
- {"variables": {"SPACK_ROOT_SPEC": spec}},
- )
-
- new_size = len(syaml.dump_config(sort_yaml_obj(yaml), default_flow_style=True))
-
- print("\n")
- print_delta("overall summary", original_size, new_size)
- print("\n")
- return yaml
diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index b30c6360d9..4b64a2529a 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -4,10 +4,13 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import argparse
+import difflib
+import importlib
import os
import re
import sys
-from typing import List, Union
+from collections import Counter
+from typing import List, Optional, Union
import llnl.string
import llnl.util.tty as tty
@@ -16,12 +19,14 @@ from llnl.util.lang import attr_setdefault, index_by
from llnl.util.tty.colify import colify
from llnl.util.tty.color import colorize
-import spack.config
+import spack.concretize
+import spack.config # breaks a cycle.
import spack.environment as ev
import spack.error
import spack.extensions
import spack.parser
import spack.paths
+import spack.repo
import spack.spec
import spack.store
import spack.traverse as traverse
@@ -29,6 +34,8 @@ import spack.user_environment as uenv
import spack.util.spack_json as sjson
import spack.util.spack_yaml as syaml
+from ..enums import InstallRecordStatus
+
# cmd has a submodule called "list" so preserve the python list module
python_list = list
@@ -114,11 +121,13 @@ def get_module(cmd_name):
try:
# Try to import the command from the built-in directory
- module_name = "%s.%s" % (__name__, pname)
- module = __import__(module_name, fromlist=[pname, SETUP_PARSER, DESCRIPTION], level=0)
+ module_name = f"{__name__}.{pname}"
+ module = importlib.import_module(module_name)
tty.debug("Imported {0} from built-in commands".format(pname))
except ImportError:
module = spack.extensions.get_module(cmd_name)
+ if not module:
+ raise CommandNotFoundError(cmd_name)
attr_setdefault(module, SETUP_PARSER, lambda *args: None) # null-op
attr_setdefault(module, DESCRIPTION, "")
@@ -172,10 +181,66 @@ def parse_specs(
arg_string = " ".join([quote_kvp(arg) for arg in args])
specs = spack.parser.parse(arg_string)
- for spec in specs:
- if concretize:
- spec.concretize(tests=tests)
- return specs
+ if not concretize:
+ return specs
+
+ to_concretize = [(s, None) for s in specs]
+ return _concretize_spec_pairs(to_concretize, tests=tests)
+
+
+def _concretize_spec_pairs(to_concretize, tests=False):
+ """Helper method that concretizes abstract specs from a list of abstract,concrete pairs.
+
+ Any spec with a concrete spec associated with it will concretize to that spec. Any spec
+ with ``None`` for its concrete spec will be newly concretized. This method respects unification
+ rules from config."""
+ unify = spack.config.get("concretizer:unify", False)
+
+ # Special case for concretizing a single spec
+ if len(to_concretize) == 1:
+ abstract, concrete = to_concretize[0]
+ return [concrete or abstract.concretized()]
+
+ # Special case if every spec is either concrete or has an abstract hash
+ if all(
+ concrete or abstract.concrete or abstract.abstract_hash
+ for abstract, concrete in to_concretize
+ ):
+ # Get all the concrete specs
+ ret = [
+ concrete or (abstract if abstract.concrete else abstract.lookup_hash())
+ for abstract, concrete in to_concretize
+ ]
+
+ # If unify: true, check that specs don't conflict
+ # Since all concrete, "when_possible" is not relevant
+ if unify is True: # True, "when_possible", False are possible values
+ runtimes = spack.repo.PATH.packages_with_tags("runtime")
+ specs_per_name = Counter(
+ spec.name
+ for spec in traverse.traverse_nodes(
+ ret, deptype=("link", "run"), key=traverse.by_dag_hash
+ )
+ if spec.name not in runtimes # runtimes are allowed multiple times
+ )
+
+ conflicts = sorted(name for name, count in specs_per_name.items() if count > 1)
+ if conflicts:
+ raise spack.error.SpecError(
+ "Specs conflict and `concretizer:unify` is configured true.",
+ f" specs depend on multiple versions of {', '.join(conflicts)}",
+ )
+ return ret
+
+ # Standard case
+ concretize_method = spack.concretize.concretize_separately # unify: false
+ if unify is True:
+ concretize_method = spack.concretize.concretize_together
+ elif unify == "when_possible":
+ concretize_method = spack.concretize.concretize_together_when_possible
+
+ concretized = concretize_method(to_concretize, tests=tests)
+ return [concrete for _, concrete in concretized]
def matching_spec_from_env(spec):
@@ -191,39 +256,64 @@ def matching_spec_from_env(spec):
return spec.concretized()
-def disambiguate_spec(spec, env, local=False, installed=True, first=False):
+def matching_specs_from_env(specs):
+ """
+ Same as ``matching_spec_from_env`` but respects spec unification rules.
+
+ For each spec, if there is a matching spec in the environment it is used. If no
+ matching spec is found, this will return the given spec but concretized in the
+ context of the active environment and other given specs, with unification rules applied.
+ """
+ env = ev.active_environment()
+ spec_pairs = [(spec, env.matching_spec(spec) if env else None) for spec in specs]
+ additional_concrete_specs = (
+ [(concrete, concrete) for _, concrete in env.concretized_specs()] if env else []
+ )
+ return _concretize_spec_pairs(spec_pairs + additional_concrete_specs)[: len(spec_pairs)]
+
+
+def disambiguate_spec(
+ spec: spack.spec.Spec,
+ env: Optional[ev.Environment],
+ local: bool = False,
+ installed: Union[bool, InstallRecordStatus] = True,
+ first: bool = False,
+) -> spack.spec.Spec:
"""Given a spec, figure out which installed package it refers to.
- Arguments:
- 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 (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.
+ Args:
+ spec: a spec to disambiguate
+ env: a spack environment, if one is active, or None if no environment is active
+ local: do not search chained spack instances
+ installed: install status argument passed to database query.
+ first: returns the first matching spec, even if more than one match is found
"""
hashes = env.all_hashes() if env else None
return disambiguate_spec_from_hashes(spec, hashes, local, installed, first)
-def disambiguate_spec_from_hashes(spec, hashes, local=False, installed=True, first=False):
+def disambiguate_spec_from_hashes(
+ spec: spack.spec.Spec,
+ hashes: List[str],
+ local: bool = False,
+ installed: Union[bool, InstallRecordStatus] = True,
+ first: bool = False,
+) -> spack.spec.Spec:
"""Given a spec and a list of hashes, get concrete spec the spec refers to.
Arguments:
- spec (spack.spec.Spec): a spec to disambiguate
- 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.
+ spec: a spec to disambiguate
+ hashes: a set of hashes of specs among which to disambiguate
+ local: if True, do not search chained spack instances
+ installed: install status argument passed to database query.
+ first: returns the first matching spec, even if more than one match is found
"""
if local:
matching_specs = spack.store.STORE.db.query_local(spec, hashes=hashes, installed=installed)
else:
matching_specs = spack.store.STORE.db.query(spec, hashes=hashes, installed=installed)
if not matching_specs:
- tty.die("Spec '%s' matches no installed packages." % spec)
+ tty.die(f"Spec '{spec}' matches no installed packages.")
elif first:
return matching_specs[0]
@@ -237,7 +327,7 @@ def ensure_single_spec_or_die(spec, matching_specs):
if len(matching_specs) <= 1:
return
- format_string = "{name}{@version}{%compiler.name}{@compiler.version}{arch=architecture}"
+ format_string = "{name}{@version}{%compiler.name}{@compiler.version}{ arch=architecture}"
args = ["%s matches multiple packages." % spec, "Matching packages:"]
args += [
colorize(" @K{%s} " % s.dag_hash(7)) + s.cformat(format_string) for s in matching_specs
@@ -334,9 +424,9 @@ def display_specs(specs, args=None, **kwargs):
variants (bool): Show variants with specs
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 (typing.Callable): called at start of arch/compiler groups
+ decorator (typing.Callable): function to call to decorate specs
all_headers (bool): show headers even when arch/compiler aren't defined
+ status_fn (typing.Callable): if provided, prepend install-status info
output (typing.IO): A file object to write to. Default is ``sys.stdout``
"""
@@ -360,6 +450,7 @@ def display_specs(specs, args=None, **kwargs):
groups = get_arg("groups", True)
all_headers = get_arg("all_headers", False)
output = get_arg("output", sys.stdout)
+ status_fn = get_arg("status_fn", None)
decorator = get_arg("decorator", None)
if decorator is None:
@@ -384,15 +475,20 @@ def display_specs(specs, args=None, **kwargs):
vfmt = "{variants}" if variants else ""
format_string = nfmt + "{@version}" + ffmt + vfmt
- transform = {"package": decorator, "fullpackage": decorator}
-
def fmt(s, depth=0):
"""Formatter function for all output specs"""
string = ""
+
+ if status_fn:
+ # This was copied from spec.tree's colorization logic
+ # then shortened because it seems like status_fn should
+ # always return an InstallStatus
+ string += colorize(status_fn(s).value)
+
if hashes:
string += gray_hash(s, hlen) + " "
string += depth * " "
- string += s.cformat(format_string, transform=transform)
+ string += decorator(s, s.cformat(format_string))
return string
def format_list(specs):
@@ -447,11 +543,11 @@ def display_specs(specs, args=None, **kwargs):
def filter_loaded_specs(specs):
"""Filter a list of specs returning only those that are
currently loaded."""
- hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(":")
+ hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(os.pathsep)
return [x for x in specs if x.dag_hash() in hashes]
-def print_how_many_pkgs(specs, pkg_type=""):
+def print_how_many_pkgs(specs, pkg_type="", suffix=""):
"""Given a list of specs, this will print a message about how many
specs are in that list.
@@ -462,7 +558,7 @@ def print_how_many_pkgs(specs, pkg_type=""):
category, e.g. if pkg_type is "installed" then the message
would be "3 installed packages"
"""
- tty.msg("%s" % llnl.string.plural(len(specs), pkg_type + " package"))
+ tty.msg("%s" % llnl.string.plural(len(specs), pkg_type + " package") + suffix)
def spack_is_git_repo():
@@ -502,6 +598,18 @@ class CommandNameError(spack.error.SpackError):
super().__init__("{0} is not a permissible Spack command name.".format(name))
+class MultipleSpecsMatch(Exception):
+ """Raised when multiple specs match a constraint, in a context where
+ this is not allowed.
+ """
+
+
+class NoSpecMatches(Exception):
+ """Raised when no spec matches a constraint, in a context where
+ this is not allowed.
+ """
+
+
########################################
# argparse types for argument validation
########################################
@@ -586,3 +694,24 @@ def find_environment(args):
def first_line(docstring):
"""Return the first line of the docstring."""
return docstring.split("\n")[0]
+
+
+class CommandNotFoundError(spack.error.SpackError):
+ """Exception class thrown when a requested command is not recognized as
+ such.
+ """
+
+ def __init__(self, cmd_name):
+ msg = (
+ f"{cmd_name} is not a recognized Spack command or extension command; "
+ "check with `spack commands`."
+ )
+ long_msg = None
+
+ similar = difflib.get_close_matches(cmd_name, all_commands())
+
+ if 1 <= len(similar) <= 5:
+ long_msg = "\nDid you mean one of the following commands?\n "
+ long_msg += "\n ".join(similar)
+
+ super().__init__(msg, long_msg)
diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py
index 56f597d778..c684a5fa4b 100644
--- a/lib/spack/spack/cmd/arch.py
+++ b/lib/spack/spack/cmd/arch.py
@@ -11,6 +11,7 @@ import llnl.util.tty.colify as colify
import llnl.util.tty.color as color
import spack.platforms
+import spack.spec
description = "print architecture information about this machine"
section = "system"
@@ -18,12 +19,23 @@ level = "short"
def setup_parser(subparser):
+ # DEPRECATED: equivalent to --generic --target
subparser.add_argument(
- "-g", "--generic-target", action="store_true", help="show the best generic target"
+ "-g",
+ "--generic-target",
+ action="store_true",
+ help="show the best generic target (deprecated)",
)
subparser.add_argument(
"--known-targets", action="store_true", help="show a list of all known targets and exit"
)
+ target_type = subparser.add_mutually_exclusive_group()
+ target_type.add_argument(
+ "--family", action="store_true", help="print generic ISA (x86_64, aarch64, ppc64le, ...)"
+ )
+ target_type.add_argument(
+ "--generic", action="store_true", help="print feature level (x86_64_v3, armv8.4a, ...)"
+ )
parts = subparser.add_mutually_exclusive_group()
parts2 = subparser.add_mutually_exclusive_group()
parts.add_argument(
@@ -79,6 +91,7 @@ def display_targets(targets):
def arch(parser, args):
if args.generic_target:
+ # TODO: add deprecation warning in 0.24
print(archspec.cpu.host().generic)
return
@@ -95,6 +108,10 @@ def arch(parser, args):
host_platform = spack.platforms.host()
host_os = host_platform.operating_system(os_args)
host_target = host_platform.target(target_args)
+ if args.family:
+ host_target = host_target.family
+ elif args.generic:
+ host_target = host_target.generic
architecture = spack.spec.ArchSpec((str(host_platform), str(host_os), str(host_target)))
if args.platform:
diff --git a/lib/spack/spack/cmd/audit.py b/lib/spack/spack/cmd/audit.py
index c8cef494ef..e5512d9a90 100644
--- a/lib/spack/spack/cmd/audit.py
+++ b/lib/spack/spack/cmd/audit.py
@@ -84,7 +84,7 @@ def externals(parser, args):
return
pkgs = args.name or spack.repo.PATH.all_package_names()
- reports = spack.audit.run_group(args.subcommand, pkgs=pkgs)
+ reports = spack.audit.run_group(args.subcommand, pkgs=pkgs, debug_log=tty.debug)
_process_reports(reports)
@@ -115,15 +115,11 @@ def audit(parser, args):
def _process_reports(reports):
for check, errors in reports:
if errors:
- msg = "{0}: {1} issue{2} found".format(
- check, len(errors), "" if len(errors) == 1 else "s"
- )
- header = "@*b{" + msg + "}"
- print(cl.colorize(header))
+ status = f"{len(errors)} issue{'' if len(errors) == 1 else 's'} found"
+ print(cl.colorize(f"{check}: @*r{{{status}}}"))
+ numdigits = len(str(len(errors)))
for idx, error in enumerate(errors):
- print(str(idx + 1) + ". " + str(error))
+ print(f"{idx + 1:>{numdigits}}. {error}")
raise SystemExit(1)
else:
- msg = "{0}: 0 issues found.".format(check)
- header = "@*b{" + msg + "}"
- print(cl.colorize(header))
+ print(cl.colorize(f"{check}: @*g{{passed}}"))
diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py
index 5221a980c7..97feea89f2 100644
--- a/lib/spack/spack/cmd/bootstrap.py
+++ b/lib/spack/spack/cmd/bootstrap.py
@@ -16,11 +16,11 @@ import spack.bootstrap
import spack.bootstrap.config
import spack.bootstrap.core
import spack.config
-import spack.main
-import spack.mirror
+import spack.mirrors.utils
import spack.spec
import spack.stage
import spack.util.path
+import spack.util.spack_yaml
from spack.cmd.common import arguments
description = "manage bootstrap configuration"
@@ -165,7 +165,7 @@ def _reset(args):
if not ok_to_continue:
raise RuntimeError("Aborting")
- for scope in spack.config.CONFIG.file_scopes:
+ for scope in spack.config.CONFIG.writable_scopes:
# The default scope should stay untouched
if scope.name == "defaults":
continue
@@ -400,7 +400,7 @@ def _mirror(args):
llnl.util.tty.set_msg_enabled(False)
spec = spack.spec.Spec(spec_str).concretized()
for node in spec.traverse():
- spack.mirror.create(mirror_dir, [node])
+ spack.mirrors.utils.create(mirror_dir, [node])
llnl.util.tty.set_msg_enabled(True)
if args.binary_packages:
diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py
index f2d88c07bf..40e2393204 100644
--- a/lib/spack/spack/cmd/buildcache.py
+++ b/lib/spack/spack/cmd/buildcache.py
@@ -3,61 +3,39 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import argparse
-import copy
import glob
-import hashlib
import json
-import multiprocessing.pool
import os
import shutil
import sys
import tempfile
-import urllib.request
-from typing import Dict, List, Optional, Tuple
+from typing import List, Tuple
import llnl.util.tty as tty
from llnl.string import plural
-from llnl.util.lang import elide_list
+from llnl.util.lang import elide_list, stable_partition
import spack.binary_distribution as bindist
import spack.cmd
import spack.config
+import spack.deptypes as dt
import spack.environment as ev
import spack.error
-import spack.hash_types as ht
-import spack.mirror
+import spack.mirrors.mirror
import spack.oci.oci
-import spack.oci.opener
-import spack.relocate
-import spack.repo
import spack.spec
import spack.stage
import spack.store
-import spack.user_environment
-import spack.util.crypto
+import spack.util.parallel
import spack.util.url as url_util
import spack.util.web as web_util
from spack import traverse
-from spack.build_environment import determine_number_of_jobs
from spack.cmd import display_specs
from spack.cmd.common import arguments
-from spack.oci.image import (
- Digest,
- ImageReference,
- default_config,
- default_index_tag,
- default_manifest,
- default_tag,
- tag_is_spec,
-)
-from spack.oci.oci import (
- copy_missing_layers_with_retry,
- get_manifest_and_config_with_retry,
- upload_blob_with_retry,
- upload_manifest_with_retry,
-)
from spack.spec import Spec, save_dependency_specfiles
+from ..enums import InstallRecordStatus
+
description = "create, download and install binary packages"
section = "packaging"
level = "long"
@@ -69,12 +47,6 @@ def setup_parser(subparser: argparse.ArgumentParser):
push = subparsers.add_parser("push", aliases=["create"], help=push_fn.__doc__)
push.add_argument("-f", "--force", action="store_true", help="overwrite tarball if it exists")
- push.add_argument(
- "--allow-root",
- "-a",
- action="store_true",
- help="allow install root string in binary files after RPATH substitution",
- )
push_sign = push.add_mutually_exclusive_group(required=False)
push_sign.add_argument(
"--unsigned",
@@ -117,6 +89,17 @@ def setup_parser(subparser: argparse.ArgumentParser):
"Alternatively, one can decide to build a cache for only the package or only the "
"dependencies",
)
+ with_or_without_build_deps = push.add_mutually_exclusive_group()
+ with_or_without_build_deps.add_argument(
+ "--with-build-dependencies",
+ action="store_true",
+ help="include build dependencies in the buildcache",
+ )
+ with_or_without_build_deps.add_argument(
+ "--without-build-dependencies",
+ action="store_true",
+ help="exclude build dependencies from the buildcache",
+ )
push.add_argument(
"--fail-fast",
action="store_true",
@@ -132,6 +115,11 @@ def setup_parser(subparser: argparse.ArgumentParser):
help="when pushing to an OCI registry, tag an image containing all root specs and their "
"runtime dependencies",
)
+ push.add_argument(
+ "--private",
+ action="store_true",
+ help="for a private mirror, include non-redistributable packages",
+ )
arguments.add_common_arguments(push, ["specs", "jobs"])
push.set_defaults(func=push_fn)
@@ -184,10 +172,6 @@ def setup_parser(subparser: argparse.ArgumentParser):
keys.add_argument("-f", "--force", action="store_true", help="force new download of keys")
keys.set_defaults(func=keys_fn)
- preview = subparsers.add_parser("preview", help=preview_fn.__doc__)
- arguments.add_common_arguments(preview, ["installed_specs"])
- preview.set_defaults(func=preview_fn)
-
# Check if binaries need to be rebuilt on remote mirror
check = subparsers.add_parser("check", help=check_fn.__doc__)
check.add_argument(
@@ -274,23 +258,37 @@ def setup_parser(subparser: argparse.ArgumentParser):
# Sync buildcache entries from one mirror to another
sync = subparsers.add_parser("sync", help=sync_fn.__doc__)
- sync.add_argument(
- "--manifest-glob", help="a quoted glob pattern identifying copy manifest files"
+
+ sync_manifest_source = sync.add_argument_group(
+ "Manifest Source",
+ "Specify a list of build cache objects to sync using manifest file(s)."
+ 'This option takes the place of the "source mirror" for synchronization'
+ 'and optionally takes a "destination mirror" ',
)
- sync.add_argument(
+ sync_manifest_source.add_argument(
+ "--manifest-glob", help="a quoted glob pattern identifying CI rebuild manifest files"
+ )
+ sync_source_mirror = sync.add_argument_group(
+ "Named Source",
+ "Specify a single registered source mirror to synchronize from. This option requires"
+ "the specification of a destination mirror.",
+ )
+ sync_source_mirror.add_argument(
"src_mirror",
metavar="source mirror",
- type=arguments.mirror_name_or_url,
nargs="?",
+ type=arguments.mirror_name_or_url,
help="source mirror name, path, or URL",
)
+
sync.add_argument(
"dest_mirror",
metavar="destination mirror",
- type=arguments.mirror_name_or_url,
nargs="?",
+ type=arguments.mirror_name_or_url,
help="destination mirror name, path, or URL",
)
+
sync.set_defaults(func=sync_fn)
# Update buildcache index without copying any additional packages
@@ -312,22 +310,72 @@ def setup_parser(subparser: argparse.ArgumentParser):
def _matching_specs(specs: List[Spec]) -> List[Spec]:
"""Disambiguate specs and return a list of matching specs"""
- return [spack.cmd.disambiguate_spec(s, ev.active_environment(), installed=any) for s in specs]
+ return [
+ spack.cmd.disambiguate_spec(s, ev.active_environment(), installed=InstallRecordStatus.ANY)
+ for s in specs
+ ]
def _format_spec(spec: Spec) -> str:
return spec.cformat("{name}{@version}{/hash:7}")
-def _progress(i: int, total: int):
- if total > 1:
- digits = len(str(total))
- return f"[{i+1:{digits}}/{total}] "
- return ""
+def _skip_no_redistribute_for_public(specs):
+ remaining_specs = list()
+ removed_specs = list()
+ for spec in specs:
+ if spec.package.redistribute_binary:
+ remaining_specs.append(spec)
+ else:
+ removed_specs.append(spec)
+ if removed_specs:
+ colified_output = tty.colify.colified(list(s.name for s in removed_specs), indent=4)
+ tty.debug(
+ "The following specs will not be added to the binary cache"
+ " because they cannot be redistributed:\n"
+ f"{colified_output}\n"
+ "You can use `--private` to include them."
+ )
+ return remaining_specs
-def _make_pool():
- return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True))
+class PackagesAreNotInstalledError(spack.error.SpackError):
+ """Raised when a list of specs is not installed but picked to be packaged."""
+
+ def __init__(self, specs: List[Spec]):
+ super().__init__(
+ "Cannot push non-installed packages",
+ ", ".join(elide_list([_format_spec(s) for s in specs], 5)),
+ )
+
+
+class PackageNotInstalledError(spack.error.SpackError):
+ """Raised when a spec is not installed but picked to be packaged."""
+
+
+def _specs_to_be_packaged(
+ requested: List[Spec], things_to_install: str, build_deps: bool
+) -> List[Spec]:
+ """Collect all non-external with or without roots and dependencies"""
+ if "dependencies" not in things_to_install:
+ deptype = dt.NONE
+ elif build_deps:
+ deptype = dt.ALL
+ else:
+ deptype = dt.RUN | dt.LINK | dt.TEST
+ specs = [
+ s
+ for s in traverse.traverse_nodes(
+ requested,
+ root="package" in things_to_install,
+ deptype=deptype,
+ order="breadth",
+ key=traverse.by_dag_hash,
+ )
+ if not s.external
+ ]
+ specs.reverse()
+ return specs
def push_fn(args):
@@ -343,18 +391,8 @@ def push_fn(args):
else:
roots = spack.cmd.require_active_env(cmd_name="buildcache push").concrete_roots()
- if args.allow_root:
- tty.warn(
- "The flag `--allow-root` is the default in Spack 0.21, will be removed in Spack 0.22"
- )
-
- mirror: spack.mirror.Mirror = args.mirror
-
- # Check if this is an OCI image.
- try:
- target_image = spack.oci.oci.image_from_mirror(mirror)
- except ValueError:
- target_image = None
+ mirror = args.mirror
+ assert isinstance(mirror, spack.mirrors.mirror.Mirror)
push_url = mirror.push_url
@@ -365,90 +403,52 @@ def push_fn(args):
unsigned = not (args.key or args.signed)
# For OCI images, we require dependencies to be pushed for now.
- if target_image:
- if "dependencies" not in args.things_to_install:
- tty.die("Dependencies must be pushed for OCI images.")
- if not unsigned:
- tty.warn(
- "Code signing is currently not supported for OCI images. "
- "Use --unsigned to silence this warning."
- )
+ if mirror.push_url.startswith("oci://") and not unsigned:
+ tty.warn(
+ "Code signing is currently not supported for OCI images. "
+ "Use --unsigned to silence this warning."
+ )
+ unsigned = True
- # This is a list of installed, non-external specs.
- specs = bindist.specs_to_be_packaged(
+ # Select a signing key, or None if unsigned.
+ signing_key = None if unsigned else (args.key or bindist.select_signing_key())
+
+ specs = _specs_to_be_packaged(
roots,
- root="package" in args.things_to_install,
- dependencies="dependencies" in args.things_to_install,
+ things_to_install=args.things_to_install,
+ build_deps=args.with_build_dependencies or not args.without_build_dependencies,
)
- # When pushing multiple specs, print the url once ahead of time, as well as how
- # many specs are being pushed.
+ if not args.private:
+ specs = _skip_no_redistribute_for_public(specs)
+
if len(specs) > 1:
tty.info(f"Selected {len(specs)} specs to push to {push_url}")
- failed = []
-
- # TODO: unify this logic in the future.
- if target_image:
- base_image = ImageReference.from_string(args.base_image) if args.base_image else None
- with tempfile.TemporaryDirectory(
- dir=spack.stage.get_stage_root()
- ) as tmpdir, _make_pool() as pool:
- skipped, base_images, checksums = _push_oci(
- target_image=target_image,
- base_image=base_image,
- installed_specs_with_deps=specs,
- force=args.force,
- tmpdir=tmpdir,
- pool=pool,
- )
-
- # Apart from creating manifests for each individual spec, we allow users to create a
- # separate image tag for all root specs and their runtime dependencies.
- if args.tag:
- tagged_image = target_image.with_tag(args.tag)
- # _push_oci may not populate base_images if binaries were already in the registry
- for spec in roots:
- _update_base_images(
- base_image=base_image,
- target_image=target_image,
- spec=spec,
- base_image_cache=base_images,
- )
- _put_manifest(base_images, checksums, tagged_image, tmpdir, None, None, *roots)
- tty.info(f"Tagged {tagged_image}")
-
- else:
- skipped = []
-
- for i, spec in enumerate(specs):
- try:
- bindist.push_or_raise(
- spec,
- push_url,
- bindist.PushOptions(
- force=args.force,
- unsigned=unsigned,
- key=args.key,
- regenerate_index=args.update_index,
- ),
+ # Pushing not installed specs is an error. Either fail fast or populate the error list and
+ # push installed package in best effort mode.
+ failed: List[Tuple[Spec, BaseException]] = []
+ with spack.store.STORE.db.read_transaction():
+ if any(not s.installed for s in specs):
+ specs, not_installed = stable_partition(specs, lambda s: s.installed)
+ if args.fail_fast:
+ raise PackagesAreNotInstalledError(not_installed)
+ else:
+ failed.extend(
+ (s, PackageNotInstalledError("package not installed")) for s in not_installed
)
- msg = f"{_progress(i, len(specs))}Pushed {_format_spec(spec)}"
- if len(specs) == 1:
- msg += f" to {push_url}"
- tty.info(msg)
-
- except bindist.NoOverwriteException:
- skipped.append(_format_spec(spec))
-
- # Catch any other exception unless the fail fast option is set
- except Exception as e:
- if args.fail_fast or isinstance(
- e, (bindist.PickKeyException, bindist.NoKeyException)
- ):
- raise
- failed.append((_format_spec(spec), e))
+ with bindist.make_uploader(
+ mirror=mirror,
+ force=args.force,
+ update_index=args.update_index,
+ signing_key=signing_key,
+ base_image=args.base_image,
+ ) as uploader:
+ skipped, upload_errors = uploader.push(specs=specs)
+ failed.extend(upload_errors)
+ if not upload_errors and args.tag:
+ uploader.tag(args.tag, roots)
if skipped:
if len(specs) == 1:
@@ -460,7 +460,7 @@ def push_fn(args):
"The following {} specs were skipped as they already exist in the buildcache:\n"
" {}\n"
" Use --force to overwrite them.".format(
- len(skipped), ", ".join(elide_list(skipped, 5))
+ len(skipped), ", ".join(elide_list([_format_spec(s) for s in skipped], 5))
)
)
@@ -471,381 +471,16 @@ def push_fn(args):
raise spack.error.SpackError(
f"The following {len(failed)} errors occurred while pushing specs to the buildcache",
"\n".join(
- elide_list([f" {spec}: {e.__class__.__name__}: {e}" for spec, e in failed], 5)
- ),
- )
-
- # Update the index if requested
- # TODO: remove update index logic out of bindist; should be once after all specs are pushed
- # not once per spec.
- if target_image and len(skipped) < len(specs) and args.update_index:
- with tempfile.TemporaryDirectory(
- dir=spack.stage.get_stage_root()
- ) as tmpdir, _make_pool() as pool:
- _update_index_oci(target_image, tmpdir, pool)
-
-
-def _get_spack_binary_blob(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]:
- """Get the spack tarball layer digests and size if it exists"""
- try:
- manifest, config = get_manifest_and_config_with_retry(image_ref)
-
- return spack.oci.oci.Blob(
- compressed_digest=Digest.from_string(manifest["layers"][-1]["digest"]),
- uncompressed_digest=Digest.from_string(config["rootfs"]["diff_ids"][-1]),
- size=manifest["layers"][-1]["size"],
- )
- except Exception:
- return None
-
-
-def _push_single_spack_binary_blob(image_ref: ImageReference, spec: spack.spec.Spec, tmpdir: str):
- filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz")
-
- # Create an oci.image.layer aka tarball of the package
- compressed_tarfile_checksum, tarfile_checksum = spack.oci.oci.create_tarball(spec, filename)
-
- blob = spack.oci.oci.Blob(
- Digest.from_sha256(compressed_tarfile_checksum),
- Digest.from_sha256(tarfile_checksum),
- os.path.getsize(filename),
- )
-
- # Upload the blob
- upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest)
-
- # delete the file
- os.unlink(filename)
-
- return blob
-
-
-def _retrieve_env_dict_from_config(config: dict) -> dict:
- """Retrieve the environment variables from the image config file.
- Sets a default value for PATH if it is not present.
-
- Args:
- config (dict): The image config file.
-
- Returns:
- dict: The environment variables.
- """
- env = {"PATH": "/bin:/usr/bin"}
-
- if "Env" in config.get("config", {}):
- for entry in config["config"]["Env"]:
- key, value = entry.split("=", 1)
- env[key] = value
- return env
-
-
-def _archspec_to_gooarch(spec: spack.spec.Spec) -> str:
- name = spec.target.family.name
- name_map = {"aarch64": "arm64", "x86_64": "amd64"}
- return name_map.get(name, name)
-
-
-def _put_manifest(
- base_images: Dict[str, Tuple[dict, dict]],
- checksums: Dict[str, spack.oci.oci.Blob],
- image_ref: ImageReference,
- tmpdir: str,
- extra_config: Optional[dict],
- annotations: Optional[dict],
- *specs: spack.spec.Spec,
-):
- architecture = _archspec_to_gooarch(specs[0])
-
- dependencies = list(
- reversed(
- list(
- s
- for s in traverse.traverse_nodes(
- specs, order="topo", deptype=("link", "run"), root=True
+ elide_list(
+ [
+ f" {_format_spec(spec)}: {e.__class__.__name__}: {e}"
+ for spec, e in failed
+ ],
+ 5,
)
- if not s.external
- )
- )
- )
-
- base_manifest, base_config = base_images[architecture]
- env = _retrieve_env_dict_from_config(base_config)
-
- spack.user_environment.environment_modifications_for_specs(*specs).apply_modifications(env)
-
- # Create an oci.image.config file
- config = copy.deepcopy(base_config)
-
- # Add the diff ids of the dependencies
- for s in dependencies:
- config["rootfs"]["diff_ids"].append(str(checksums[s.dag_hash()].uncompressed_digest))
-
- # Set the environment variables
- config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()]
-
- if extra_config:
- # From the OCI v1.0 spec:
- # > Any extra fields in the Image JSON struct are considered implementation
- # > specific and MUST be ignored by any implementations which are unable to
- # > interpret them.
- config.update(extra_config)
-
- config_file = os.path.join(tmpdir, f"{specs[0].dag_hash()}.config.json")
-
- with open(config_file, "w") as f:
- json.dump(config, f, separators=(",", ":"))
-
- config_file_checksum = Digest.from_sha256(
- spack.util.crypto.checksum(hashlib.sha256, config_file)
- )
-
- # Upload the config file
- upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum)
-
- oci_manifest = {
- "mediaType": "application/vnd.oci.image.manifest.v1+json",
- "schemaVersion": 2,
- "config": {
- "mediaType": base_manifest["config"]["mediaType"],
- "digest": str(config_file_checksum),
- "size": os.path.getsize(config_file),
- },
- "layers": [
- *(layer for layer in base_manifest["layers"]),
- *(
- {
- "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
- "digest": str(checksums[s.dag_hash()].compressed_digest),
- "size": checksums[s.dag_hash()].size,
- }
- for s in dependencies
),
- ],
- }
-
- if annotations:
- oci_manifest["annotations"] = annotations
-
- # Finally upload the manifest
- upload_manifest_with_retry(image_ref, oci_manifest=oci_manifest)
-
- # delete the config file
- os.unlink(config_file)
-
-
-def _update_base_images(
- *,
- base_image: Optional[ImageReference],
- target_image: ImageReference,
- spec: spack.spec.Spec,
- base_image_cache: Dict[str, Tuple[dict, dict]],
-):
- """For a given spec and base image, copy the missing layers of the base image with matching
- arch to the registry of the target image. If no base image is specified, create a dummy
- manifest and config file."""
- architecture = _archspec_to_gooarch(spec)
- if architecture in base_image_cache:
- return
- if base_image is None:
- base_image_cache[architecture] = (
- default_manifest(),
- default_config(architecture, "linux"),
- )
- else:
- base_image_cache[architecture] = copy_missing_layers_with_retry(
- base_image, target_image, architecture
- )
-
-
-def _push_oci(
- *,
- target_image: ImageReference,
- base_image: Optional[ImageReference],
- installed_specs_with_deps: List[Spec],
- tmpdir: str,
- pool: multiprocessing.pool.Pool,
- force: bool = False,
-) -> Tuple[List[str], Dict[str, Tuple[dict, dict]], Dict[str, spack.oci.oci.Blob]]:
- """Push specs to an OCI registry
-
- Args:
- image_ref: The target OCI image
- base_image: Optional base image, which will be copied to the target registry.
- installed_specs_with_deps: The installed specs to push, excluding externals,
- including deps, ordered from roots to leaves.
- force: Whether to overwrite existing layers and manifests in the buildcache.
-
- Returns:
- A tuple consisting of the list of skipped specs already in the build cache,
- a dictionary mapping architectures to base image manifests and configs,
- and a dictionary mapping each spec's dag hash to a blob.
- """
-
- # Reverse the order
- installed_specs_with_deps = list(reversed(installed_specs_with_deps))
-
- # Spec dag hash -> blob
- checksums: Dict[str, spack.oci.oci.Blob] = {}
-
- # arch -> (manifest, config)
- base_images: Dict[str, Tuple[dict, dict]] = {}
-
- # Specs not uploaded because they already exist
- skipped = []
-
- if not force:
- tty.info("Checking for existing specs in the buildcache")
- to_be_uploaded = []
-
- tags_to_check = (target_image.with_tag(default_tag(s)) for s in installed_specs_with_deps)
- available_blobs = pool.map(_get_spack_binary_blob, tags_to_check)
-
- for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs):
- if maybe_blob is not None:
- checksums[spec.dag_hash()] = maybe_blob
- skipped.append(_format_spec(spec))
- else:
- to_be_uploaded.append(spec)
- else:
- to_be_uploaded = installed_specs_with_deps
-
- if not to_be_uploaded:
- return skipped, base_images, checksums
-
- tty.info(
- f"{len(to_be_uploaded)} specs need to be pushed to "
- f"{target_image.domain}/{target_image.name}"
- )
-
- # Upload blobs
- new_blobs = pool.starmap(
- _push_single_spack_binary_blob, ((target_image, spec, tmpdir) for spec in to_be_uploaded)
- )
-
- # And update the spec to blob mapping
- for spec, blob in zip(to_be_uploaded, new_blobs):
- checksums[spec.dag_hash()] = blob
-
- # Copy base images if necessary
- for spec in to_be_uploaded:
- _update_base_images(
- base_image=base_image,
- target_image=target_image,
- spec=spec,
- base_image_cache=base_images,
)
- def extra_config(spec: Spec):
- spec_dict = spec.to_dict(hash=ht.dag_hash)
- spec_dict["buildcache_layout_version"] = 1
- spec_dict["binary_cache_checksum"] = {
- "hash_algorithm": "sha256",
- "hash": checksums[spec.dag_hash()].compressed_digest.digest,
- }
- return spec_dict
-
- # Upload manifests
- tty.info("Uploading manifests")
- pool.starmap(
- _put_manifest,
- (
- (
- base_images,
- checksums,
- target_image.with_tag(default_tag(spec)),
- tmpdir,
- extra_config(spec),
- {"org.opencontainers.image.description": spec.format()},
- spec,
- )
- for spec in to_be_uploaded
- ),
- )
-
- # Print the image names of the top-level specs
- for spec in to_be_uploaded:
- tty.info(f"Pushed {_format_spec(spec)} to {target_image.with_tag(default_tag(spec))}")
-
- return skipped, base_images, checksums
-
-
-def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]:
- # Don't allow recursion here, since Spack itself always uploads
- # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json
- _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0)
-
- # Do very basic validation: if "spec" is a key in the config, it
- # must be a Spec object too.
- return config if "spec" in config else None
-
-
-def _update_index_oci(
- image_ref: ImageReference, tmpdir: str, pool: multiprocessing.pool.Pool
-) -> None:
- response = spack.oci.opener.urlopen(urllib.request.Request(url=image_ref.tags_url()))
- spack.oci.opener.ensure_status(response, 200)
- tags = json.load(response)["tags"]
-
- # Fetch all image config files in parallel
- spec_dicts = pool.starmap(
- _config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag))
- )
-
- # Populate the database
- db_root_dir = os.path.join(tmpdir, "db_root")
- db = bindist.BuildCacheDatabase(db_root_dir)
-
- for spec_dict in spec_dicts:
- spec = Spec.from_dict(spec_dict)
- db.add(spec, directory_layout=None)
- db.mark(spec, "in_buildcache", True)
-
- # Create the index.json file
- index_json_path = os.path.join(tmpdir, "index.json")
- with open(index_json_path, "w") as f:
- db._write_to_file(f)
-
- # Create an empty config.json file
- empty_config_json_path = os.path.join(tmpdir, "config.json")
- with open(empty_config_json_path, "wb") as f:
- f.write(b"{}")
-
- # Upload the index.json file
- index_shasum = Digest.from_sha256(spack.util.crypto.checksum(hashlib.sha256, index_json_path))
- upload_blob_with_retry(image_ref, file=index_json_path, digest=index_shasum)
-
- # Upload the config.json file
- empty_config_digest = Digest.from_sha256(
- spack.util.crypto.checksum(hashlib.sha256, empty_config_json_path)
- )
- upload_blob_with_retry(image_ref, file=empty_config_json_path, digest=empty_config_digest)
-
- # Push a manifest file that references the index.json file as a layer
- # Notice that we push this as if it is an image, which it of course is not.
- # When the ORAS spec becomes official, we can use that instead of a fake image.
- # For now we just use the OCI image spec, so that we don't run into issues with
- # automatic garbage collection of blobs that are not referenced by any image manifest.
- oci_manifest = {
- "mediaType": "application/vnd.oci.image.manifest.v1+json",
- "schemaVersion": 2,
- # Config is just an empty {} file for now, and irrelevant
- "config": {
- "mediaType": "application/vnd.oci.image.config.v1+json",
- "digest": str(empty_config_digest),
- "size": os.path.getsize(empty_config_json_path),
- },
- # The buildcache index is the only layer, and is not a tarball, we lie here.
- "layers": [
- {
- "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
- "digest": str(index_shasum),
- "size": os.path.getsize(index_json_path),
- }
- ],
- }
-
- upload_manifest_with_retry(image_ref.with_tag(default_index_tag), oci_manifest)
-
def install_fn(args):
"""install from a binary package"""
@@ -888,14 +523,6 @@ def keys_fn(args):
bindist.get_keys(args.install, args.trust, args.force)
-def preview_fn(args):
- """analyze an installed spec and reports whether executables and libraries are relocatable"""
- tty.warn(
- "`spack buildcache preview` is deprecated since `spack buildcache push --allow-root` is "
- "now the default. This command will be removed in Spack 0.22"
- )
-
-
def check_fn(args: argparse.Namespace):
"""check specs against remote binary mirror(s) to see if any need to be rebuilt
@@ -1035,7 +662,17 @@ def sync_fn(args):
requires an active environment in order to know which specs to sync
"""
if args.manifest_glob:
- manifest_copy(glob.glob(args.manifest_glob))
+ # Passing the args.src_mirror here because it is not possible to
+ # have the destination be required when specifying a named source
+ # mirror and optional for the --manifest-glob argument. In the case
+ # of manifest glob sync, the source mirror positional argument is the
+ # destination mirror if it is specified. If there are two mirrors
+ # specified, the second is ignored and the first is the override
+ # destination.
+ if args.dest_mirror:
+ tty.warn(f"Ignoring unused arguemnt: {args.dest_mirror.name}")
+
+ manifest_copy(glob.glob(args.manifest_glob), args.src_mirror)
return 0
if args.src_mirror is None or args.dest_mirror is None:
@@ -1086,7 +723,7 @@ def sync_fn(args):
shutil.rmtree(tmpdir)
-def manifest_copy(manifest_file_list):
+def manifest_copy(manifest_file_list, dest_mirror=None):
"""Read manifest files containing information about specific specs to copy
from source to destination, remove duplicates since any binary packge for
a given hash should be the same as any other, and copy all files specified
@@ -1100,13 +737,20 @@ def manifest_copy(manifest_file_list):
# Last duplicate hash wins
deduped_manifest[spec_hash] = copy_list
+ build_cache_dir = bindist.build_cache_relative_path()
for spec_hash, copy_list in deduped_manifest.items():
for copy_file in copy_list:
- tty.debug("copying {0} to {1}".format(copy_file["src"], copy_file["dest"]))
- copy_buildcache_file(copy_file["src"], copy_file["dest"])
+ dest = copy_file["dest"]
+ if dest_mirror:
+ src_relative_path = os.path.join(
+ build_cache_dir, copy_file["src"].rsplit(build_cache_dir, 1)[1].lstrip("/")
+ )
+ dest = url_util.join(dest_mirror.push_url, src_relative_path)
+ tty.debug("copying {0} to {1}".format(copy_file["src"], dest))
+ copy_buildcache_file(copy_file["src"], dest)
-def update_index(mirror: spack.mirror.Mirror, update_keys=False):
+def update_index(mirror: spack.mirrors.mirror.Mirror, update_keys=False):
# Special case OCI images for now.
try:
image_ref = spack.oci.oci.image_from_mirror(mirror)
@@ -1116,28 +760,34 @@ def update_index(mirror: spack.mirror.Mirror, update_keys=False):
if image_ref:
with tempfile.TemporaryDirectory(
dir=spack.stage.get_stage_root()
- ) as tmpdir, _make_pool() as pool:
- _update_index_oci(image_ref, tmpdir, pool)
+ ) as tmpdir, spack.util.parallel.make_concurrent_executor() as executor:
+ bindist._oci_update_index(image_ref, tmpdir, executor)
return
# Otherwise, assume a normal mirror.
url = mirror.push_url
- bindist.generate_package_index(url_util.join(url, bindist.build_cache_relative_path()))
+ with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir:
+ bindist._url_generate_package_index(url, tmpdir)
if update_keys:
keys_url = url_util.join(
url, bindist.build_cache_relative_path(), bindist.build_cache_keys_relative_path()
)
- bindist.generate_key_index(keys_url)
+ try:
+ with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir:
+ bindist.generate_key_index(keys_url, tmpdir)
+ except bindist.CannotListKeys as e:
+ # Do not error out if listing keys went wrong. This usually means that the _gpg path
+ # does not exist. TODO: distinguish between this and other errors.
+ tty.warn(f"did not update the key index: {e}")
def update_index_fn(args):
"""update a buildcache index"""
- update_index(args.mirror, update_keys=args.keys)
+ return update_index(args.mirror, update_keys=args.keys)
def buildcache(parser, args):
- if args.func:
- args.func(args)
+ return args.func(args)
diff --git a/lib/spack/spack/cmd/change.py b/lib/spack/spack/cmd/change.py
index 9807d5cc55..d2c8d9ae5d 100644
--- a/lib/spack/spack/cmd/change.py
+++ b/lib/spack/spack/cmd/change.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.cmd
+import spack.spec
from spack.cmd.common import arguments
description = "change an existing spec in an environment"
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index 8e40d5e0b5..92413f6f00 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -5,6 +5,7 @@
import re
import sys
+from typing import Dict, Optional
import llnl.string
import llnl.util.lang
@@ -14,13 +15,17 @@ import spack.cmd
import spack.repo
import spack.spec
import spack.stage
-import spack.util.crypto
import spack.util.web as web_util
from spack.cmd.common import arguments
-from spack.package_base import PackageBase, deprecated_version, preferred_version
+from spack.package_base import (
+ ManualDownloadRequiredError,
+ PackageBase,
+ deprecated_version,
+ preferred_version,
+)
from spack.util.editor import editor
from spack.util.format import get_version_lines
-from spack.version import Version
+from spack.version import StandardVersion, Version
description = "checksum available versions of a package"
section = "packaging"
@@ -84,28 +89,30 @@ def checksum(parser, args):
spec = spack.spec.Spec(args.package)
# Get the package we're going to generate checksums for
- pkg = spack.repo.PATH.get_pkg_class(spec.name)(spec)
+ pkg: PackageBase = spack.repo.PATH.get_pkg_class(spec.name)(spec)
- versions = [Version(v) for v in args.versions]
+ # Skip manually downloaded packages
+ if pkg.manual_download:
+ raise ManualDownloadRequiredError(pkg.download_instr)
- # Define placeholder for remote versions.
- # This'll help reduce redundant work if we need to check for the existance
- # of remote versions more than once.
- remote_versions = None
+ versions = [StandardVersion.from_string(v) for v in args.versions]
+
+ # Define placeholder for remote versions. This'll help reduce redundant work if we need to
+ # check for the existence of remote versions more than once.
+ remote_versions: Optional[Dict[StandardVersion, str]] = None
# Add latest version if requested
if args.latest:
- remote_versions = pkg.fetch_remote_versions(args.jobs)
+ remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
if len(remote_versions) > 0:
- latest_version = sorted(remote_versions.keys(), reverse=True)[0]
- versions.append(latest_version)
+ versions.append(max(remote_versions.keys()))
- # Add preferred version if requested
+ # Add preferred version if requested (todo: exclude git versions)
if args.preferred:
versions.append(preferred_version(pkg))
# Store a dict of the form version -> URL
- url_dict = {}
+ url_dict: Dict[StandardVersion, str] = {}
for version in versions:
if deprecated_version(pkg, version):
@@ -115,16 +122,16 @@ def checksum(parser, args):
if url is not None:
url_dict[version] = url
continue
- # if we get here, it's because no valid url was provided by the package
- # do expensive fallback to try to recover
+ # If we get here, it's because no valid url was provided by the package. Do expensive
+ # fallback to try to recover
if remote_versions is None:
- remote_versions = pkg.fetch_remote_versions(args.jobs)
+ remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
if version in remote_versions:
url_dict[version] = remote_versions[version]
if len(versions) <= 0:
if remote_versions is None:
- remote_versions = pkg.fetch_remote_versions(args.jobs)
+ remote_versions = pkg.fetch_remote_versions(concurrency=args.jobs)
url_dict = remote_versions
# A spidered URL can differ from the package.py *computed* URL, pointing to different tarballs.
@@ -175,7 +182,7 @@ def checksum(parser, args):
print()
if args.add_to_package:
- add_versions_to_package(pkg, version_lines)
+ add_versions_to_package(pkg, version_lines, args.batch)
def print_checksum_status(pkg: PackageBase, version_hashes: dict):
@@ -221,7 +228,7 @@ def print_checksum_status(pkg: PackageBase, version_hashes: dict):
tty.die("Invalid checksums found.")
-def add_versions_to_package(pkg: PackageBase, version_lines: str):
+def add_versions_to_package(pkg: PackageBase, version_lines: str, is_batch: bool):
"""
Add checksumed versions to a package's instructions and open a user's
editor so they may double check the work of the function.
@@ -274,5 +281,5 @@ def add_versions_to_package(pkg: PackageBase, version_lines: str):
tty.msg(f"Added {num_versions_added} new versions to {pkg.name}")
tty.msg(f"Open {filename} to review the additions.")
- if sys.stdout.isatty():
+ if sys.stdout.isatty() and not is_batch:
editor(filename)
diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py
index 1b0eab888c..a7d4f09758 100644
--- a/lib/spack/spack/cmd/ci.py
+++ b/lib/spack/spack/cmd/ci.py
@@ -6,6 +6,8 @@
import json
import os
import shutil
+import warnings
+from urllib.parse import urlparse, urlunparse
import llnl.util.filesystem as fs
import llnl.util.tty as tty
@@ -13,12 +15,12 @@ import llnl.util.tty.color as clr
import spack.binary_distribution as bindist
import spack.ci as spack_ci
+import spack.cmd
import spack.cmd.buildcache as buildcache
import spack.config as cfg
import spack.environment as ev
-import spack.environment.depfile
import spack.hash_types as ht
-import spack.mirror
+import spack.mirrors.mirror
import spack.util.gpg as gpg_util
import spack.util.timer as timer
import spack.util.url as url_util
@@ -29,14 +31,20 @@ section = "build"
level = "long"
SPACK_COMMAND = "spack"
-MAKE_COMMAND = "make"
INSTALL_FAIL_CODE = 1
+FAILED_CREATE_BUILDCACHE_CODE = 100
def deindent(desc):
return desc.replace(" ", "")
+def unicode_escape(path: str) -> str:
+ """Returns transformed path with any unicode
+ characters replaced with their corresponding escapes"""
+ return path.encode("unicode-escape").decode("utf-8")
+
+
def setup_parser(subparser):
setup_parser.parser = subparser
subparsers = subparser.add_subparsers(help="CI sub-commands")
@@ -55,17 +63,10 @@ def setup_parser(subparser):
"default is .gitlab-ci.yml in the root of the repository",
)
generate.add_argument(
- "--copy-to",
- default=None,
- help="path to additional directory for job files\n\n"
- "this option provides an absolute path to a directory where the generated "
- "jobs yaml file should be copied. default is not to copy",
- )
- generate.add_argument(
"--optimize",
action="store_true",
default=False,
- help="(experimental) optimize the gitlab yaml file for size\n\n"
+ help="(DEPRECATED) optimize the gitlab yaml file for size\n\n"
"run the generated document through a series of optimization passes "
"designed to reduce the size of the generated file",
)
@@ -73,13 +74,7 @@ def setup_parser(subparser):
"--dependencies",
action="store_true",
default=False,
- help="(experimental) disable DAG scheduling (use 'plain' dependencies)",
- )
- generate.add_argument(
- "--buildcache-destination",
- default=None,
- help="override the mirror configured in the environment\n\n"
- "allows for pushing binaries from the generated pipeline to a different location",
+ help="(DEPRECATED) disable DAG scheduling (use 'plain' dependencies)",
)
prune_group = generate.add_mutually_exclusive_group()
prune_group.add_argument(
@@ -157,7 +152,9 @@ def setup_parser(subparser):
description=deindent(ci_reproduce.__doc__),
help=spack.cmd.first_line(ci_reproduce.__doc__),
)
- reproduce.add_argument("job_url", help="URL of job artifacts bundle")
+ reproduce.add_argument(
+ "job_url", help="URL of GitLab job web page or artifact", type=_gitlab_artifacts_url
+ )
reproduce.add_argument(
"--runtime",
help="Container runtime to use.",
@@ -190,24 +187,24 @@ def ci_generate(args):
before invoking this command. the value must be the CDash authorization token needed to create
a build group and register all generated jobs under it
"""
- env = spack.cmd.require_active_env(cmd_name="ci generate")
-
- if args.copy_to:
- tty.warn("The flag --copy-to is deprecated and will be removed in Spack 0.23")
+ if args.optimize:
+ warnings.warn(
+ "The --optimize option has been deprecated, and currently has no effect. "
+ "It will be removed in Spack v0.24."
+ )
- if args.buildcache_destination:
- tty.warn(
- "The flag --buildcache-destination is deprecated and will be removed in Spack 0.23"
+ if args.dependencies:
+ warnings.warn(
+ "The --dependencies option has been deprecated, and currently has no effect. "
+ "It will be removed in Spack v0.24."
)
+ env = spack.cmd.require_active_env(cmd_name="ci generate")
+
output_file = args.output_file
- copy_yaml_to = args.copy_to
- run_optimizer = args.optimize
- use_dependencies = args.dependencies
prune_dag = args.prune_dag
index_only = args.index_only
artifacts_root = args.artifacts_root
- buildcache_destination = args.buildcache_destination
if not output_file:
output_file = os.path.abspath(".gitlab-ci.yml")
@@ -224,18 +221,9 @@ def ci_generate(args):
output_file,
prune_dag=prune_dag,
check_index_only=index_only,
- run_optimizer=run_optimizer,
- use_dependencies=use_dependencies,
artifacts_root=artifacts_root,
- remote_mirror_override=buildcache_destination,
)
- if copy_yaml_to:
- copy_to_dir = os.path.dirname(copy_yaml_to)
- if not os.path.exists(copy_to_dir):
- os.makedirs(copy_to_dir)
- shutil.copyfile(output_file, copy_yaml_to)
-
def ci_reindex(args):
"""rebuild the buildcache index for the remote mirror
@@ -252,7 +240,7 @@ def ci_reindex(args):
ci_mirrors = yaml_root["mirrors"]
mirror_urls = [url for url in ci_mirrors.values()]
remote_mirror_url = mirror_urls[0]
- mirror = spack.mirror.Mirror(remote_mirror_url)
+ mirror = spack.mirrors.mirror.Mirror(remote_mirror_url)
buildcache.update_index(mirror, update_keys=True)
@@ -280,22 +268,13 @@ def ci_rebuild(args):
job_log_dir = os.environ.get("SPACK_JOB_LOG_DIR")
job_test_dir = os.environ.get("SPACK_JOB_TEST_DIR")
repro_dir = os.environ.get("SPACK_JOB_REPRO_DIR")
- # TODO: Remove this in Spack 0.23
- local_mirror_dir = os.environ.get("SPACK_LOCAL_MIRROR_DIR")
concrete_env_dir = os.environ.get("SPACK_CONCRETE_ENV_DIR")
- ci_pipeline_id = os.environ.get("CI_PIPELINE_ID")
ci_job_name = os.environ.get("CI_JOB_NAME")
signing_key = os.environ.get("SPACK_SIGNING_KEY")
job_spec_pkg_name = os.environ.get("SPACK_JOB_SPEC_PKG_NAME")
job_spec_dag_hash = os.environ.get("SPACK_JOB_SPEC_DAG_HASH")
spack_pipeline_type = os.environ.get("SPACK_PIPELINE_TYPE")
- # TODO: Remove this in Spack 0.23
- remote_mirror_override = os.environ.get("SPACK_REMOTE_MIRROR_OVERRIDE")
- # TODO: Remove this in Spack 0.23
- remote_mirror_url = os.environ.get("SPACK_REMOTE_MIRROR_URL")
spack_ci_stack_name = os.environ.get("SPACK_CI_STACK_NAME")
- # TODO: Remove this in Spack 0.23
- shared_pr_mirror_url = os.environ.get("SPACK_CI_SHARED_PR_MIRROR_URL")
rebuild_everything = os.environ.get("SPACK_REBUILD_EVERYTHING")
require_signing = os.environ.get("SPACK_REQUIRE_SIGNING")
@@ -315,12 +294,10 @@ def ci_rebuild(args):
job_log_dir = os.path.join(ci_project_dir, job_log_dir)
job_test_dir = os.path.join(ci_project_dir, job_test_dir)
repro_dir = os.path.join(ci_project_dir, repro_dir)
- local_mirror_dir = os.path.join(ci_project_dir, local_mirror_dir)
concrete_env_dir = os.path.join(ci_project_dir, concrete_env_dir)
# Debug print some of the key environment variables we should have received
tty.debug("pipeline_artifacts_dir = {0}".format(pipeline_artifacts_dir))
- tty.debug("remote_mirror_url = {0}".format(remote_mirror_url))
tty.debug("job_spec_pkg_name = {0}".format(job_spec_pkg_name))
# Query the environment manifest to find out whether we're reporting to a
@@ -351,52 +328,12 @@ def ci_rebuild(args):
full_rebuild = True if rebuild_everything and rebuild_everything.lower() == "true" else False
- pipeline_mirrors = spack.mirror.MirrorCollection(binary=True)
- deprecated_mirror_config = False
+ pipeline_mirrors = spack.mirrors.mirror.MirrorCollection(binary=True)
buildcache_destination = None
- if "buildcache-destination" in pipeline_mirrors:
- buildcache_destination = pipeline_mirrors["buildcache-destination"]
- else:
- deprecated_mirror_config = True
- # TODO: This will be an error in Spack 0.23
-
- # If no override url exists, then just push binary package to the
- # normal remote mirror url.
- # TODO: Remove in Spack 0.23
- buildcache_mirror_url = remote_mirror_override or remote_mirror_url
- if buildcache_destination:
- buildcache_mirror_url = buildcache_destination.push_url
-
- # Figure out what is our temporary storage mirror: Is it artifacts
- # buildcache? Or temporary-storage-url-prefix? In some cases we need to
- # force something or pipelines might not have a way to propagate build
- # artifacts from upstream to downstream jobs.
- # TODO: Remove this in Spack 0.23
- pipeline_mirror_url = None
-
- # TODO: Remove this in Spack 0.23
- temp_storage_url_prefix = None
- if "temporary-storage-url-prefix" in ci_config:
- temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"]
- pipeline_mirror_url = url_util.join(temp_storage_url_prefix, ci_pipeline_id)
-
- # TODO: Remove this in Spack 0.23
- enable_artifacts_mirror = False
- if "enable-artifacts-buildcache" in ci_config:
- enable_artifacts_mirror = ci_config["enable-artifacts-buildcache"]
- if enable_artifacts_mirror or (
- spack_is_pr_pipeline and not enable_artifacts_mirror and not temp_storage_url_prefix
- ):
- # If you explicitly enabled the artifacts buildcache feature, or
- # if this is a PR pipeline but you did not enable either of the
- # per-pipeline temporary storage features, we force the use of
- # artifacts buildcache. Otherwise jobs will not have binary
- # dependencies from previous stages available since we do not
- # allow pushing binaries to the remote mirror during PR pipelines.
- enable_artifacts_mirror = True
- pipeline_mirror_url = url_util.path_to_file_url(local_mirror_dir)
- mirror_msg = "artifact buildcache enabled, mirror url: {0}".format(pipeline_mirror_url)
- tty.debug(mirror_msg)
+ if "buildcache-destination" not in pipeline_mirrors:
+ tty.die("spack ci rebuild requires a mirror named 'buildcache-destination")
+
+ buildcache_destination = pipeline_mirrors["buildcache-destination"]
# Get the concrete spec to be built by this job.
try:
@@ -471,48 +408,7 @@ def ci_rebuild(args):
fd.write(spack_info.encode("utf8"))
fd.write(b"\n")
- pipeline_mirrors = []
-
- # If we decided there should be a temporary storage mechanism, add that
- # mirror now so it's used when we check for a hash match already
- # built for this spec.
- # TODO: Remove this block in Spack 0.23
- if pipeline_mirror_url:
- mirror = spack.mirror.Mirror(pipeline_mirror_url, name=spack_ci.TEMP_STORAGE_MIRROR_NAME)
- spack.mirror.add(mirror, cfg.default_modify_scope())
- pipeline_mirrors.append(pipeline_mirror_url)
-
- # Check configured mirrors for a built spec with a matching hash
- # TODO: Remove this block in Spack 0.23
- mirrors_to_check = None
- if remote_mirror_override:
- if spack_pipeline_type == "spack_protected_branch":
- # Passing "mirrors_to_check" below means we *only* look in the override
- # mirror to see if we should skip building, which is what we want.
- mirrors_to_check = {"override": remote_mirror_override}
-
- # Adding this mirror to the list of configured mirrors means dependencies
- # could be installed from either the override mirror or any other configured
- # mirror (e.g. remote_mirror_url which is defined in the environment or
- # pipeline_mirror_url), which is also what we want.
- spack.mirror.add(
- spack.mirror.Mirror(remote_mirror_override, name="mirror_override"),
- cfg.default_modify_scope(),
- )
- pipeline_mirrors.append(remote_mirror_override)
-
- # TODO: Remove this in Spack 0.23
- if deprecated_mirror_config and spack_pipeline_type == "spack_pull_request":
- if shared_pr_mirror_url != "None":
- pipeline_mirrors.append(shared_pr_mirror_url)
-
- matches = (
- None
- if full_rebuild
- else bindist.get_mirrors_for_spec(
- job_spec, mirrors_to_check=mirrors_to_check, index_only=False
- )
- )
+ matches = None if full_rebuild else bindist.get_mirrors_for_spec(job_spec, index_only=False)
if matches:
# Got a hash match on at least one configured mirror. All
@@ -524,97 +420,42 @@ def ci_rebuild(args):
tty.msg("No need to rebuild {0}, found hash match at: ".format(job_spec_pkg_name))
for match in matches:
tty.msg(" {0}".format(match["mirror_url"]))
- # TODO: Remove this block in Spack 0.23
- if enable_artifacts_mirror:
- matching_mirror = matches[0]["mirror_url"]
- build_cache_dir = os.path.join(local_mirror_dir, "build_cache")
- tty.debug("Getting {0} buildcache from {1}".format(job_spec_pkg_name, matching_mirror))
- tty.debug("Downloading to {0}".format(build_cache_dir))
- bindist.download_single_spec(job_spec, build_cache_dir, mirror_url=matching_mirror)
# Now we are done and successful
return 0
- # Before beginning the install, if this is a "rebuild everything" pipeline, we
- # only want to keep the mirror being used by the current pipeline as it's binary
- # package destination. This ensures that the when we rebuild everything, we only
- # consume binary dependencies built in this pipeline.
- # TODO: Remove this in Spack 0.23
- if deprecated_mirror_config and full_rebuild:
- spack_ci.remove_other_mirrors(pipeline_mirrors, cfg.default_modify_scope())
-
# No hash match anywhere means we need to rebuild spec
# Start with spack arguments
- spack_cmd = [SPACK_COMMAND, "--color=always", "--backtrace", "--verbose"]
+ spack_cmd = [SPACK_COMMAND, "--color=always", "--backtrace", "--verbose", "install"]
config = cfg.get("config")
if not config["verify_ssl"]:
spack_cmd.append("-k")
- install_args = []
+ install_args = [f'--use-buildcache={spack_ci.win_quote("package:never,dependencies:only")}']
can_verify = spack_ci.can_verify_binaries()
verify_binaries = can_verify and spack_is_pr_pipeline is False
if not verify_binaries:
install_args.append("--no-check-signature")
- slash_hash = "/{}".format(job_spec.dag_hash())
-
- # Arguments when installing dependencies from cache
- deps_install_args = install_args
+ slash_hash = spack_ci.win_quote("/" + job_spec.dag_hash())
# Arguments when installing the root from sources
- root_install_args = install_args + [
- "--keep-stage",
- "--only=package",
- "--use-buildcache=package:never,dependencies:only",
- ]
+ deps_install_args = install_args + ["--only=dependencies"]
+ root_install_args = install_args + ["--keep-stage", "--only=package"]
+
if cdash_handler:
# Add additional arguments to `spack install` for CDash reporting.
root_install_args.extend(cdash_handler.args())
- root_install_args.append(slash_hash)
-
- # ["x", "y"] -> "'x' 'y'"
- args_to_string = lambda args: " ".join("'{}'".format(arg) for arg in args)
commands = [
# apparently there's a race when spack bootstraps? do it up front once
- [SPACK_COMMAND, "-e", env.path, "bootstrap", "now"],
- [
- SPACK_COMMAND,
- "-e",
- env.path,
- "env",
- "depfile",
- "-o",
- "Makefile",
- "--use-buildcache=package:never,dependencies:only",
- slash_hash, # limit to spec we're building
- ],
- [
- # --output-sync requires GNU make 4.x.
- # Old make errors when you pass it a flag it doesn't recognize,
- # but it doesn't error or warn when you set unrecognized flags in
- # this variable.
- "export",
- "GNUMAKEFLAGS=--output-sync=recurse",
- ],
- [
- MAKE_COMMAND,
- "SPACK={}".format(args_to_string(spack_cmd)),
- "SPACK_COLOR=always",
- "SPACK_INSTALL_FLAGS={}".format(args_to_string(deps_install_args)),
- "-j$(nproc)",
- "install-deps/{}".format(
- spack.environment.depfile.MakefileSpec(job_spec).safe_format(
- "{name}-{version}-{hash}"
- )
- ),
- ],
- spack_cmd + ["install"] + root_install_args,
+ [SPACK_COMMAND, "-e", unicode_escape(env.path), "bootstrap", "now"],
+ spack_cmd + deps_install_args + [slash_hash],
+ spack_cmd + root_install_args + [slash_hash],
]
-
tty.debug("Installing {0} from source".format(job_spec.name))
install_exit_code = spack_ci.process_command("install", commands, repro_dir)
@@ -702,29 +543,20 @@ def ci_rebuild(args):
cdash_handler.report_skipped(job_spec, reports_dir, reason=msg)
cdash_handler.copy_test_results(reports_dir, job_test_dir)
- # If the install succeeded, create a buildcache entry for this job spec
- # and push it to one or more mirrors. If the install did not succeed,
- # print out some instructions on how to reproduce this build failure
- # outside of the pipeline environment.
if install_exit_code == 0:
- mirror_urls = [buildcache_mirror_url]
-
- # TODO: Remove this block in Spack 0.23
- if pipeline_mirror_url:
- mirror_urls.append(pipeline_mirror_url)
-
+ # If the install succeeded, push it to the buildcache destination. Failure to push
+ # will result in a non-zero exit code. Pushing is best-effort.
for result in spack_ci.create_buildcache(
input_spec=job_spec,
- destination_mirror_urls=mirror_urls,
+ destination_mirror_urls=[buildcache_destination.push_url],
sign_binaries=spack_ci.can_sign_binaries(),
):
- msg = tty.msg if result.success else tty.warn
- msg(
- "{} {} to {}".format(
- "Pushed" if result.success else "Failed to push",
- job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when()),
- result.url,
- )
+ if not result.success:
+ install_exit_code = FAILED_CREATE_BUILDCACHE_CODE
+ (tty.msg if result.success else tty.error)(
+ f'{"Pushed" if result.success else "Failed to push"} '
+ f'{job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when())} '
+ f"to {result.url}"
)
# If this is a develop pipeline, check if the spec that we just built is
@@ -745,22 +577,22 @@ def ci_rebuild(args):
tty.warn(msg.format(broken_spec_path, err))
else:
+ # If the install did not succeed, print out some instructions on how to reproduce this
+ # build failure outside of the pipeline environment.
tty.debug("spack install exited non-zero, will not create buildcache")
api_root_url = os.environ.get("CI_API_V4_URL")
ci_project_id = os.environ.get("CI_PROJECT_ID")
ci_job_id = os.environ.get("CI_JOB_ID")
- repro_job_url = "{0}/projects/{1}/jobs/{2}/artifacts".format(
- api_root_url, ci_project_id, ci_job_id
- )
-
+ repro_job_url = f"{api_root_url}/projects/{ci_project_id}/jobs/{ci_job_id}/artifacts"
# Control characters cause this to be printed in blue so it stands out
- reproduce_msg = """
+ print(
+ f"""
\033[34mTo reproduce this build locally, run:
- spack ci reproduce-build {0} [--working-dir <dir>] [--autostart]
+ spack ci reproduce-build {repro_job_url} [--working-dir <dir>] [--autostart]
If this project does not have public pipelines, you will need to first:
@@ -768,12 +600,9 @@ If this project does not have public pipelines, you will need to first:
... then follow the printed instructions.\033[0;0m
-""".format(
- repro_job_url
+"""
)
- print(reproduce_msg)
-
rebuild_timer.stop()
try:
with open("install_timers.json", "w") as timelog:
@@ -792,11 +621,6 @@ def ci_reproduce(args):
artifacts of the provided gitlab pipeline rebuild job's URL will be used to derive
instructions for reproducing the build locally
"""
- job_url = args.job_url
- work_dir = args.working_dir
- autostart = args.autostart
- runtime = args.runtime
-
# Allow passing GPG key for reprocuding protected CI jobs
if args.gpg_file:
gpg_key_url = url_util.path_to_file_url(args.gpg_file)
@@ -805,7 +629,47 @@ def ci_reproduce(args):
else:
gpg_key_url = None
- return spack_ci.reproduce_ci_job(job_url, work_dir, autostart, gpg_key_url, runtime)
+ return spack_ci.reproduce_ci_job(
+ args.job_url, args.working_dir, args.autostart, gpg_key_url, args.runtime
+ )
+
+
+def _gitlab_artifacts_url(url: str) -> str:
+ """Take a URL either to the URL of the job in the GitLab UI, or to the artifacts zip file,
+ and output the URL to the artifacts zip file."""
+ parsed = urlparse(url)
+
+ if not parsed.scheme or not parsed.netloc:
+ raise ValueError(url)
+
+ parts = parsed.path.split("/")
+
+ if len(parts) < 2:
+ raise ValueError(url)
+
+ # Just use API endpoints verbatim, they're probably generated by Spack.
+ if parts[1] == "api":
+ return url
+
+ # If it's a URL to the job in the Gitlab UI, we may need to append the artifacts path.
+ minus_idx = parts.index("-")
+
+ # Remove repeated slashes in the remainder
+ rest = [p for p in parts[minus_idx + 1 :] if p]
+
+ # Now the format is jobs/X or jobs/X/artifacts/download
+ if len(rest) < 2 or rest[0] != "jobs":
+ raise ValueError(url)
+
+ if len(rest) == 2:
+ # replace jobs/X with jobs/X/artifacts/download
+ rest.extend(("artifacts", "download"))
+
+ # Replace the parts and unparse.
+ parts[minus_idx + 1 :] = rest
+
+ # Don't allow fragments / queries
+ return urlunparse(parsed._replace(path="/".join(parts), fragment="", query=""))
def ci(parser, args):
diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py
index 3a9a7f32ab..59d650fd12 100644
--- a/lib/spack/spack/cmd/clean.py
+++ b/lib/spack/spack/cmd/clean.py
@@ -10,11 +10,9 @@ import shutil
import llnl.util.filesystem
import llnl.util.tty as tty
-import spack.bootstrap
import spack.caches
-import spack.cmd.test
+import spack.cmd
import spack.config
-import spack.repo
import spack.stage
import spack.store
import spack.util.path
@@ -106,7 +104,9 @@ def clean(parser, args):
# Then do the cleaning falling through the cases
if args.specs:
- specs = spack.cmd.parse_specs(args.specs, concretize=True)
+ specs = spack.cmd.parse_specs(args.specs, concretize=False)
+ specs = spack.cmd.matching_specs_from_env(specs)
+
for spec in specs:
msg = "Cleaning build stage [{0}]"
tty.msg(msg.format(spec.short_spec))
diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py
index f9979339ed..875d34ee35 100644
--- a/lib/spack/spack/cmd/commands.py
+++ b/lib/spack/spack/cmd/commands.py
@@ -7,18 +7,20 @@ import argparse
import copy
import os
import re
+import shlex
import sys
from argparse import ArgumentParser, Namespace
from typing import IO, Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union
-import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.argparsewriter import ArgparseRstWriter, ArgparseWriter, Command
from llnl.util.tty.colify import colify
import spack.cmd
+import spack.config
import spack.main
import spack.paths
+import spack.platforms
from spack.main import section_descriptions
description = "list available spack commands"
@@ -140,7 +142,7 @@ class SpackArgparseRstWriter(ArgparseRstWriter):
cmd = self.parser.prog.replace(" ", "-")
if cmd in self.documented:
- string += "\n:ref:`More documentation <cmd-{0}>`\n".format(cmd)
+ string = f"{string}\n:ref:`More documentation <cmd-{cmd}>`\n"
return string
@@ -250,33 +252,27 @@ class BashCompletionWriter(ArgparseWriter):
Function body.
"""
if positionals:
- return """
+ return f"""
if $list_options
then
- {0}
+ {self.optionals(optionals)}
else
- {1}
+ {self.positionals(positionals)}
fi
-""".format(
- self.optionals(optionals), self.positionals(positionals)
- )
+"""
elif subcommands:
- return """
+ return f"""
if $list_options
then
- {0}
+ {self.optionals(optionals)}
else
- {1}
+ {self.subcommands(subcommands)}
fi
-""".format(
- self.optionals(optionals), self.subcommands(subcommands)
- )
+"""
else:
- return """
- {0}
-""".format(
- self.optionals(optionals)
- )
+ return f"""
+ {self.optionals(optionals)}
+"""
def positionals(self, positionals: Sequence[str]) -> str:
"""Return the syntax for reporting positional arguments.
@@ -305,7 +301,7 @@ class BashCompletionWriter(ArgparseWriter):
Returns:
Syntax for optional flags.
"""
- return 'SPACK_COMPREPLY="{0}"'.format(" ".join(optionals))
+ return f'SPACK_COMPREPLY="{" ".join(optionals)}"'
def subcommands(self, subcommands: Sequence[str]) -> str:
"""Return the syntax for reporting subcommands.
@@ -316,7 +312,7 @@ class BashCompletionWriter(ArgparseWriter):
Returns:
Syntax for subcommand parsers
"""
- return 'SPACK_COMPREPLY="{0}"'.format(" ".join(subcommands))
+ return f'SPACK_COMPREPLY="{" ".join(subcommands)}"'
# Map argument destination names to their complete commands
@@ -396,7 +392,7 @@ def _fish_dest_get_complete(prog: str, dest: str) -> Optional[str]:
subcmd = s[1] if len(s) == 2 else ""
for (prog_key, pos_key), value in _dest_to_fish_complete.items():
- if subcmd.startswith(prog_key) and re.match("^" + pos_key + "$", dest):
+ if subcmd.startswith(prog_key) and re.match(f"^{pos_key}$", dest):
return value
return None
@@ -428,24 +424,6 @@ class FishCompletionWriter(ArgparseWriter):
+ self.complete(cmd.prog, positionals, optionals, subcommands)
)
- def _quote(self, string: str) -> str:
- """Quote string and escape special characters if necessary.
-
- Args:
- string: Input string.
-
- Returns:
- Quoted string.
- """
- # Goal here is to match fish_indent behavior
-
- # Strings without spaces (or other special characters) do not need to be escaped
- if not any([sub in string for sub in [" ", "'", '"']]):
- return string
-
- string = string.replace("'", r"\'")
- return f"'{string}'"
-
def optspecs(
self,
prog: str,
@@ -464,7 +442,7 @@ class FishCompletionWriter(ArgparseWriter):
optspec_var = "__fish_spack_optspecs_" + prog.replace(" ", "_").replace("-", "_")
if optionals is None:
- return "set -g %s\n" % optspec_var
+ return f"set -g {optspec_var}\n"
# Build optspec by iterating over options
args = []
@@ -491,11 +469,11 @@ class FishCompletionWriter(ArgparseWriter):
long = [f[2:] for f in flags if f.startswith("--")]
while len(short) > 0 and len(long) > 0:
- arg = "%s/%s%s" % (short.pop(), long.pop(), required)
+ arg = f"{short.pop()}/{long.pop()}{required}"
while len(short) > 0:
- arg = "%s/%s" % (short.pop(), required)
+ arg = f"{short.pop()}/{required}"
while len(long) > 0:
- arg = "%s%s" % (long.pop(), required)
+ arg = f"{long.pop()}{required}"
args.append(arg)
@@ -504,7 +482,7 @@ class FishCompletionWriter(ArgparseWriter):
# indicate that such subcommand exists.
args = " ".join(args)
- return "set -g %s %s\n" % (optspec_var, args)
+ return f"set -g {optspec_var} {args}\n"
@staticmethod
def complete_head(
@@ -525,12 +503,14 @@ class FishCompletionWriter(ArgparseWriter):
subcmd = s[1] if len(s) == 2 else ""
if index is None:
- return "complete -c %s -n '__fish_spack_using_command %s'" % (s[0], subcmd)
+ return f"complete -c {s[0]} -n '__fish_spack_using_command {subcmd}'"
elif nargs in [argparse.ZERO_OR_MORE, argparse.ONE_OR_MORE, argparse.REMAINDER]:
- head = "complete -c %s -n '__fish_spack_using_command_pos_remainder %d %s'"
+ return (
+ f"complete -c {s[0]} -n '__fish_spack_using_command_pos_remainder "
+ f"{index} {subcmd}'"
+ )
else:
- head = "complete -c %s -n '__fish_spack_using_command_pos %d %s'"
- return head % (s[0], index, subcmd)
+ return f"complete -c {s[0]} -n '__fish_spack_using_command_pos {index} {subcmd}'"
def complete(
self,
@@ -598,25 +578,18 @@ class FishCompletionWriter(ArgparseWriter):
if choices is not None:
# If there are choices, we provide a completion for all possible values.
- commands.append(head + " -f -a %s" % self._quote(" ".join(choices)))
+ commands.append(f"{head} -f -a {shlex.quote(' '.join(choices))}")
else:
# Otherwise, we try to find a predefined completion for it
value = _fish_dest_get_complete(prog, args)
if value is not None:
- commands.append(head + " " + value)
+ commands.append(f"{head} {value}")
return "\n".join(commands) + "\n"
def prog_comment(self, prog: str) -> str:
- """Return a comment line for the command.
-
- Args:
- prog: Program name.
-
- Returns:
- Comment line.
- """
- return "\n# %s\n" % prog
+ """Return a comment line for the command."""
+ return f"\n# {prog}\n"
def optionals(
self,
@@ -659,28 +632,28 @@ class FishCompletionWriter(ArgparseWriter):
for f in flags:
if f.startswith("--"):
long = f[2:]
- prefix += " -l %s" % long
+ prefix = f"{prefix} -l {long}"
elif f.startswith("-"):
short = f[1:]
assert len(short) == 1
- prefix += " -s %s" % short
+ prefix = f"{prefix} -s {short}"
# Check if option require argument.
# Currently multi-argument options are not supported, so we treat it like one argument.
if nargs != 0:
- prefix += " -r"
+ prefix = f"{prefix} -r"
if dest is not None:
# If there are choices, we provide a completion for all possible values.
- commands.append(prefix + " -f -a %s" % self._quote(" ".join(dest)))
+ commands.append(f"{prefix} -f -a {shlex.quote(' '.join(dest))}")
else:
# Otherwise, we try to find a predefined completion for it
value = _fish_dest_get_complete(prog, dest)
if value is not None:
- commands.append(prefix + " " + value)
+ commands.append(f"{prefix} {value}")
if help:
- commands.append(prefix + " -d %s" % self._quote(help))
+ commands.append(f"{prefix} -d {shlex.quote(help)}")
return "\n".join(commands) + "\n"
@@ -698,11 +671,11 @@ class FishCompletionWriter(ArgparseWriter):
head = self.complete_head(prog, 0)
for _, subcommand, help in subcommands:
- command = head + " -f -a %s" % self._quote(subcommand)
+ command = f"{head} -f -a {shlex.quote(subcommand)}"
if help is not None and len(help) > 0:
help = help.split("\n")[0]
- command += " -d %s" % self._quote(help)
+ command = f"{command} -d {shlex.quote(help)}"
commands.append(command)
@@ -748,7 +721,7 @@ def rst_index(out: IO) -> None:
for i, cmd in enumerate(sorted(commands)):
description = description.capitalize() if i == 0 else ""
- ref = ":ref:`%s <spack-%s>`" % (cmd, cmd)
+ ref = f":ref:`{cmd} <spack-{cmd}>`"
comma = "," if i != len(commands) - 1 else ""
bar = "| " if i % 8 == 0 else " "
out.write(line % (description, bar + ref + comma))
@@ -859,17 +832,14 @@ def _commands(parser: ArgumentParser, args: Namespace) -> None:
# check header first so we don't open out files unnecessarily
if args.header and not os.path.exists(args.header):
- tty.die("No such file: '%s'" % args.header)
+ tty.die(f"No such file: '{args.header}'")
if args.update:
- tty.msg("Updating file: %s" % args.update)
+ tty.msg(f"Updating file: {args.update}")
with open(args.update, "w") as f:
prepend_header(args, f)
formatter(args, f)
- if args.update_completion:
- fs.set_executable(args.update)
-
else:
prepend_header(args, sys.stdout)
formatter(args, sys.stdout)
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py
index 12f9e5b0d7..2ac136de1f 100644
--- a/lib/spack/spack/cmd/common/arguments.py
+++ b/lib/spack/spack/cmd/common/arguments.py
@@ -14,8 +14,8 @@ import spack.cmd
import spack.config
import spack.deptypes as dt
import spack.environment as ev
-import spack.mirror
-import spack.modules
+import spack.mirrors.mirror
+import spack.mirrors.utils
import spack.reporters
import spack.spec
import spack.store
@@ -563,33 +563,70 @@ def add_concretizer_args(subparser):
help="reuse installed packages/buildcaches when possible",
)
subgroup.add_argument(
+ "--fresh-roots",
"--reuse-deps",
action=ConfigSetAction,
dest="concretizer:reuse",
const="dependencies",
default=None,
- help="reuse installed dependencies only",
+ help="concretize with fresh roots and reused dependencies",
+ )
+ subgroup.add_argument(
+ "--deprecated",
+ action=ConfigSetAction,
+ dest="config:deprecated",
+ const=True,
+ default=None,
+ help="allow concretizer to select deprecated versions",
)
def add_connection_args(subparser, add_help):
- subparser.add_argument(
- "--s3-access-key-id", help="ID string to use to connect to this S3 mirror"
+ def add_argument_string_or_variable(parser, arg: str, *, deprecate_str: bool = True, **kwargs):
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument(arg, **kwargs)
+ # Update help string
+ if "help" in kwargs:
+ kwargs["help"] = "environment variable containing " + kwargs["help"]
+ group.add_argument(arg + "-variable", **kwargs)
+
+ s3_connection_parser = subparser.add_argument_group("S3 Connection")
+
+ add_argument_string_or_variable(
+ s3_connection_parser,
+ "--s3-access-key-id",
+ help="ID string to use to connect to this S3 mirror",
)
- subparser.add_argument(
- "--s3-access-key-secret", help="secret string to use to connect to this S3 mirror"
+ add_argument_string_or_variable(
+ s3_connection_parser,
+ "--s3-access-key-secret",
+ help="secret string to use to connect to this S3 mirror",
)
- subparser.add_argument(
- "--s3-access-token", help="access token to use to connect to this S3 mirror"
+ add_argument_string_or_variable(
+ s3_connection_parser,
+ "--s3-access-token",
+ help="access token to use to connect to this S3 mirror",
)
- subparser.add_argument(
+ s3_connection_parser.add_argument(
"--s3-profile", help="S3 profile name to use to connect to this S3 mirror", default=None
)
- subparser.add_argument(
+ s3_connection_parser.add_argument(
"--s3-endpoint-url", help="endpoint URL to use to connect to this S3 mirror"
)
- subparser.add_argument("--oci-username", help="username to use to connect to this OCI mirror")
- subparser.add_argument("--oci-password", help="password to use to connect to this OCI mirror")
+
+ oci_connection_parser = subparser.add_argument_group("OCI Connection")
+
+ add_argument_string_or_variable(
+ oci_connection_parser,
+ "--oci-username",
+ deprecate_str=False,
+ help="username to use to connect to this OCI mirror",
+ )
+ add_argument_string_or_variable(
+ oci_connection_parser,
+ "--oci-password",
+ help="password to use to connect to this OCI mirror",
+ )
def use_buildcache(cli_arg_value):
@@ -652,34 +689,32 @@ def mirror_name_or_url(m):
# accidentally to a dir in the current working directory.
# If there's a \ or / in the name, it's interpreted as a path or url.
- if "/" in m or "\\" in m:
- return spack.mirror.Mirror(m)
+ if "/" in m or "\\" in m or m in (".", ".."):
+ return spack.mirrors.mirror.Mirror(m)
# Otherwise, the named mirror is required to exist.
try:
- return spack.mirror.require_mirror_name(m)
+ return spack.mirrors.utils.require_mirror_name(m)
except ValueError as e:
- raise argparse.ArgumentTypeError(
- str(e) + ". Did you mean {}?".format(os.path.join(".", m))
- )
+ raise argparse.ArgumentTypeError(f"{e}. Did you mean {os.path.join('.', m)}?") from e
def mirror_url(url):
try:
- return spack.mirror.Mirror.from_url(url)
+ return spack.mirrors.mirror.Mirror.from_url(url)
except ValueError as e:
- raise argparse.ArgumentTypeError(str(e))
+ raise argparse.ArgumentTypeError(str(e)) from e
def mirror_directory(path):
try:
- return spack.mirror.Mirror.from_local_path(path)
+ return spack.mirrors.mirror.Mirror.from_local_path(path)
except ValueError as e:
- raise argparse.ArgumentTypeError(str(e))
+ raise argparse.ArgumentTypeError(str(e)) from e
def mirror_name(name):
try:
- return spack.mirror.require_mirror_name(name)
+ return spack.mirrors.utils.require_mirror_name(name)
except ValueError as e:
- raise argparse.ArgumentTypeError(str(e))
+ raise argparse.ArgumentTypeError(str(e)) from e
diff --git a/lib/spack/spack/cmd/common/confirmation.py b/lib/spack/spack/cmd/common/confirmation.py
index 8033e776b9..7e805b196c 100644
--- a/lib/spack/spack/cmd/common/confirmation.py
+++ b/lib/spack/spack/cmd/common/confirmation.py
@@ -9,6 +9,7 @@ from typing import List
import llnl.util.tty as tty
import spack.cmd
+import spack.spec
display_args = {"long": True, "show_flags": False, "variants": False, "indent": 4}
diff --git a/lib/spack/spack/cmd/common/env_utility.py b/lib/spack/spack/cmd/common/env_utility.py
index 1d04e199d9..6371ef65a8 100644
--- a/lib/spack/spack/cmd/common/env_utility.py
+++ b/lib/spack/spack/cmd/common/env_utility.py
@@ -10,7 +10,6 @@ import llnl.util.tty as tty
import spack.cmd
import spack.deptypes as dt
import spack.error
-import spack.paths
import spack.spec
import spack.store
from spack import build_environment, traverse
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index 006c6a79a7..2eb23bf714 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -50,6 +50,7 @@ def setup_parser(subparser):
default=lambda: spack.config.default_modify_scope("compilers"),
help="configuration scope to modify",
)
+ arguments.add_common_arguments(find_parser, ["jobs"])
# Remove
remove_parser = sp.add_parser("remove", aliases=["rm"], help="remove compiler by spec")
@@ -78,25 +79,21 @@ def setup_parser(subparser):
def compiler_find(args):
"""Search either $PATH or a list of paths OR MODULES for compilers and
add them to Spack's configuration.
-
"""
- # None signals spack.compiler.find_compilers to use its default logic
paths = args.add_paths or None
-
- # Below scope=None because we want new compilers that don't appear
- # in any other configuration.
- new_compilers = spack.compilers.find_new_compilers(
- paths, scope=None, mixed_toolchain=args.mixed_toolchain
+ new_compilers = spack.compilers.find_compilers(
+ path_hints=paths,
+ scope=args.scope,
+ mixed_toolchain=args.mixed_toolchain,
+ max_workers=args.jobs,
)
if new_compilers:
- spack.compilers.add_compilers_to_config(new_compilers, scope=args.scope, init_config=False)
n = len(new_compilers)
s = "s" if n > 1 else ""
-
- config = spack.config.CONFIG
- filename = config.get_config_filename(args.scope, "compilers")
- tty.msg("Added %d new compiler%s to %s" % (n, s, filename))
- colify(reversed(sorted(c.spec.display_str for c in new_compilers)), indent=4)
+ filename = spack.config.CONFIG.get_config_filename(args.scope, "compilers")
+ tty.msg(f"Added {n:d} new compiler{s} to {filename}")
+ compiler_strs = sorted(f"{c.spec.name}@{c.spec.version}" for c in new_compilers)
+ colify(reversed(compiler_strs), indent=4)
else:
tty.msg("Found no new compilers")
tty.msg("Compilers are defined in the following files:")
diff --git a/lib/spack/spack/cmd/concretize.py b/lib/spack/spack/cmd/concretize.py
index e07c0eb18c..061a03fc4d 100644
--- a/lib/spack/spack/cmd/concretize.py
+++ b/lib/spack/spack/cmd/concretize.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import llnl.util.tty as tty
+from llnl.string import plural
+
import spack.cmd
import spack.cmd.common.arguments
import spack.environment as ev
@@ -43,5 +46,9 @@ def concretize(parser, args):
with env.write_transaction():
concretized_specs = env.concretize(force=args.force, tests=tests)
if not args.quiet:
- ev.display_specs(concretized_specs)
+ if concretized_specs:
+ tty.msg(f"Concretized {plural(len(concretized_specs), 'spec')}:")
+ ev.display_specs([concrete for _, concrete in concretized_specs])
+ else:
+ tty.msg("No new specs to concretize.")
env.write()
diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py
index 50987ea069..aef2d7a541 100644
--- a/lib/spack/spack/cmd/config.py
+++ b/lib/spack/spack/cmd/config.py
@@ -13,9 +13,9 @@ import llnl.util.tty as tty
import spack.config
import spack.environment as ev
-import spack.repo
+import spack.error
import spack.schema.env
-import spack.schema.packages
+import spack.spec
import spack.store
import spack.util.spack_yaml as syaml
from spack.cmd.common import arguments
@@ -76,6 +76,10 @@ def setup_parser(subparser):
)
add_parser.add_argument("-f", "--file", help="file from which to set all config values")
+ change_parser = sp.add_parser("change", help="swap variants etc. on specs in config")
+ change_parser.add_argument("path", help="colon-separated path to config section with specs")
+ change_parser.add_argument("--match-spec", help="only change constraints that match this")
+
prefer_upstream_parser = sp.add_parser(
"prefer-upstream", help="set package preferences from upstream"
)
@@ -118,7 +122,7 @@ def _get_scope_and_section(args):
if not section and not scope:
env = ev.active_environment()
if env:
- scope = env.env_file_config_scope_name()
+ scope = env.scope_name
# set scope defaults
elif not scope:
@@ -152,7 +156,7 @@ def print_flattened_configuration(*, blame: bool) -> None:
"""
env = ev.active_environment()
if env is not None:
- pristine = env.manifest.pristine_yaml_content
+ pristine = env.manifest.yaml_content
flattened = pristine.copy()
flattened[spack.schema.env.TOP_LEVEL_KEY] = pristine[spack.schema.env.TOP_LEVEL_KEY].copy()
else:
@@ -252,7 +256,7 @@ def config_remove(args):
existing.pop(value, None)
else:
# This should be impossible to reach
- raise spack.config.ConfigError("Config has nested non-dict values")
+ raise spack.error.ConfigError("Config has nested non-dict values")
spack.config.set(path, existing, scope)
@@ -260,20 +264,111 @@ def config_remove(args):
def _can_update_config_file(scope: spack.config.ConfigScope, cfg_file):
if isinstance(scope, spack.config.SingleFileScope):
return fs.can_access(cfg_file)
- return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
+ elif isinstance(scope, spack.config.DirectoryConfigScope):
+ return fs.can_write_to_dir(scope.path) and fs.can_access(cfg_file)
+ return False
+
+
+def _config_change_requires_scope(path, spec, scope, match_spec=None):
+ """Return whether or not anything changed."""
+ require = spack.config.get(path, scope=scope)
+ if not require:
+ return False
+
+ changed = False
+
+ def override_cfg_spec(spec_str):
+ nonlocal changed
+
+ init_spec = spack.spec.Spec(spec_str)
+ # Overridden spec cannot be anonymous
+ init_spec.name = spec.name
+ if match_spec and not init_spec.satisfies(match_spec):
+ # If there is a match_spec, don't change constraints that
+ # don't match it
+ return spec_str
+ elif not init_spec.intersects(spec):
+ changed = True
+ return str(spack.spec.Spec.override(init_spec, spec))
+ else:
+ # Don't override things if they intersect, otherwise we'd
+ # be e.g. attaching +debug to every single version spec
+ return spec_str
+
+ if isinstance(require, str):
+ new_require = override_cfg_spec(require)
+ else:
+ new_require = []
+ for item in require:
+ if "one_of" in item:
+ item["one_of"] = [override_cfg_spec(x) for x in item["one_of"]]
+ elif "any_of" in item:
+ item["any_of"] = [override_cfg_spec(x) for x in item["any_of"]]
+ elif "spec" in item:
+ item["spec"] = override_cfg_spec(item["spec"])
+ elif isinstance(item, str):
+ item = override_cfg_spec(item)
+ else:
+ raise ValueError(f"Unexpected requirement: ({type(item)}) {str(item)}")
+ new_require.append(item)
+
+ spack.config.set(path, new_require, scope=scope)
+ return changed
+
+
+def _config_change(config_path, match_spec_str=None):
+ all_components = spack.config.process_config_path(config_path)
+ key_components = all_components[:-1]
+ key_path = ":".join(key_components)
+
+ spec = spack.spec.Spec(syaml.syaml_str(all_components[-1]))
+
+ match_spec = None
+ if match_spec_str:
+ match_spec = spack.spec.Spec(match_spec_str)
+
+ if key_components[-1] == "require":
+ # Extract the package name from the config path, which allows
+ # args.spec to be anonymous if desired
+ pkg_name = key_components[1]
+ spec.name = pkg_name
+
+ changed = False
+ for scope in spack.config.writable_scope_names():
+ changed |= _config_change_requires_scope(key_path, spec, scope, match_spec=match_spec)
+
+ if not changed:
+ existing_requirements = spack.config.get(key_path)
+ if isinstance(existing_requirements, str):
+ raise spack.error.ConfigError(
+ "'config change' needs to append a requirement,"
+ " but existing require: config is not a list"
+ )
+
+ ideal_scope_to_modify = None
+ for scope in spack.config.writable_scope_names():
+ if spack.config.get(key_path, scope=scope):
+ ideal_scope_to_modify = scope
+ break
+
+ update_path = f"{key_path}:[{str(spec)}]"
+ spack.config.add(update_path, scope=ideal_scope_to_modify)
+ else:
+ raise ValueError("'config change' can currently only change 'require' sections")
+
+
+def config_change(args):
+ _config_change(args.path, args.match_spec)
def config_update(args):
# Read the configuration files
spack.config.CONFIG.get_config(args.section, scope=args.scope)
- updates: List[spack.config.ConfigScope] = list(
- filter(
- lambda s: not isinstance(
- s, (spack.config.InternalConfigScope, spack.config.ImmutableConfigScope)
- ),
- spack.config.CONFIG.format_updates[args.section],
- )
- )
+ updates: List[spack.config.ConfigScope] = [
+ x
+ for x in spack.config.CONFIG.format_updates[args.section]
+ if not isinstance(x, spack.config.InternalConfigScope) and x.writable
+ ]
cannot_overwrite, skip_system_scope = [], False
for scope in updates:
@@ -351,7 +446,7 @@ def _can_revert_update(scope_dir, cfg_file, bkp_file):
def config_revert(args):
- scopes = [args.scope] if args.scope else [x.name for x in spack.config.CONFIG.file_scopes]
+ scopes = [args.scope] if args.scope else [x.name for x in spack.config.CONFIG.writable_scopes]
# Search for backup files in the configuration scopes
Entry = collections.namedtuple("Entry", ["scope", "cfg", "bkp"])
@@ -441,11 +536,11 @@ def config_prefer_upstream(args):
# Get and list all the variants that differ from the default.
variants = []
for var_name, variant in spec.variants.items():
- if var_name in ["patches"] or var_name not in spec.package.variants:
+ if var_name in ["patches"] or not spec.package.has_variant(var_name):
continue
- variant_desc, _ = spec.package.variants[var_name]
- if variant.value != variant_desc.default:
+ vdef = spec.package.get_variant(var_name)
+ if variant.value != vdef.default:
variants.append(str(variant))
variants.sort()
variants = " ".join(variants)
@@ -490,5 +585,6 @@ def config(parser, args):
"update": config_update,
"revert": config_revert,
"prefer-upstream": config_prefer_upstream,
+ "change": config_change,
}
action[args.config_command](args)
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index 74f9114597..1aa6191497 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -2,22 +2,27 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
import os
import re
import sys
import urllib.parse
+from typing import List
import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp
import spack.repo
import spack.stage
-import spack.util.web
from spack.spec import Spec
-from spack.url import UndetectableNameError, UndetectableVersionError, parse_name, parse_version
+from spack.url import (
+ UndetectableNameError,
+ UndetectableVersionError,
+ find_versions_of_archive,
+ parse_name,
+ parse_version,
+)
from spack.util.editor import editor
-from spack.util.executable import ProcessError, which
+from spack.util.executable import which
from spack.util.format import get_version_lines
from spack.util.naming import mod_to_class, simplify_name, valid_fully_qualified_module_name
@@ -64,8 +69,9 @@ class {class_name}({base_class_name}):
# maintainers("github_user1", "github_user2")
# FIXME: Add the SPDX identifier of the project's license below.
- # See https://spdx.org/licenses/ for a list.
- license("UNKNOWN")
+ # See https://spdx.org/licenses/ for a list. Upon manually verifying
+ # the license, set checked_by to your Github username.
+ license("UNKNOWN", checked_by="github_user1")
{versions}
@@ -89,14 +95,20 @@ class BundlePackageTemplate:
url_def = " # There is no URL since there is no code to download."
body_def = " # There is no need for install() since there is no code."
- def __init__(self, name, versions):
+ def __init__(self, name: str, versions, languages: List[str]):
self.name = name
self.class_name = mod_to_class(name)
self.versions = versions
+ self.languages = languages
def write(self, pkg_path):
"""Writes the new package file."""
+ all_deps = [f' depends_on("{lang}", type="build")' for lang in self.languages]
+ if all_deps and self.dependencies:
+ all_deps.append("")
+ all_deps.append(self.dependencies)
+
# Write out a template for the file
with open(pkg_path, "w") as pkg_file:
pkg_file.write(
@@ -106,7 +118,7 @@ class BundlePackageTemplate:
base_class_name=self.base_class_name,
url_def=self.url_def,
versions=self.versions,
- dependencies=self.dependencies,
+ dependencies="\n".join(all_deps),
body_def=self.body_def,
)
)
@@ -125,8 +137,8 @@ class PackageTemplate(BundlePackageTemplate):
url_line = ' url = "{url}"'
- def __init__(self, name, url, versions):
- super().__init__(name, versions)
+ def __init__(self, name, url, versions, languages: List[str]):
+ super().__init__(name, versions, languages)
self.url_def = self.url_line.format(url=url)
@@ -214,13 +226,13 @@ class LuaPackageTemplate(PackageTemplate):
args = []
return args"""
- def __init__(self, name, url, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name lua-lpeg`, don't rename it lua-lua-lpeg
if not name.startswith("lua-"):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to lua-{0}".format(name))
name = "lua-{0}".format(name)
- super().__init__(name, url, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class MesonPackageTemplate(PackageTemplate):
@@ -321,14 +333,14 @@ class RacketPackageTemplate(PackageTemplate):
# subdirectory = None
"""
- def __init__(self, name, url, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name rkt-scribble`, don't rename it rkt-rkt-scribble
if not name.startswith("rkt-"):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to rkt-{0}".format(name))
name = "rkt-{0}".format(name)
self.body_def = self.body_def.format(name[4:])
- super().__init__(name, url, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class PythonPackageTemplate(PackageTemplate):
@@ -361,7 +373,7 @@ class PythonPackageTemplate(PackageTemplate):
settings = {}
return settings"""
- def __init__(self, name, url, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name py-numpy`, don't rename it py-py-numpy
if not name.startswith("py-"):
# Make it more obvious that we are renaming the package
@@ -415,7 +427,7 @@ class PythonPackageTemplate(PackageTemplate):
+ self.url_line
)
- super().__init__(name, url, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class RPackageTemplate(PackageTemplate):
@@ -434,7 +446,7 @@ class RPackageTemplate(PackageTemplate):
args = []
return args"""
- def __init__(self, name, url, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name r-rcpp`, don't rename it r-r-rcpp
if not name.startswith("r-"):
# Make it more obvious that we are renaming the package
@@ -454,7 +466,7 @@ class RPackageTemplate(PackageTemplate):
if bioc:
self.url_line = ' url = "{0}"\n' ' bioc = "{1}"'.format(url, r_name)
- super().__init__(name, url, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class PerlmakePackageTemplate(PackageTemplate):
@@ -474,14 +486,14 @@ class PerlmakePackageTemplate(PackageTemplate):
args = []
return args"""
- def __init__(self, name, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name perl-cpp`, don't rename it perl-perl-cpp
if not name.startswith("perl-"):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to perl-{0}".format(name))
name = "perl-{0}".format(name)
- super().__init__(name, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class PerlbuildPackageTemplate(PerlmakePackageTemplate):
@@ -506,7 +518,7 @@ class OctavePackageTemplate(PackageTemplate):
# FIXME: Add additional dependencies if required.
# depends_on("octave-foo", type=("build", "run"))"""
- def __init__(self, name, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name octave-splines`, don't rename it
# octave-octave-splines
if not name.startswith("octave-"):
@@ -514,7 +526,7 @@ class OctavePackageTemplate(PackageTemplate):
tty.msg("Changing package name from {0} to octave-{0}".format(name))
name = "octave-{0}".format(name)
- super().__init__(name, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class RubyPackageTemplate(PackageTemplate):
@@ -534,7 +546,7 @@ class RubyPackageTemplate(PackageTemplate):
# FIXME: If not needed delete this function
pass"""
- def __init__(self, name, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name ruby-numpy`, don't rename it
# ruby-ruby-numpy
if not name.startswith("ruby-"):
@@ -542,7 +554,7 @@ class RubyPackageTemplate(PackageTemplate):
tty.msg("Changing package name from {0} to ruby-{0}".format(name))
name = "ruby-{0}".format(name)
- super().__init__(name, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
class MakefilePackageTemplate(PackageTemplate):
@@ -580,14 +592,14 @@ class SIPPackageTemplate(PackageTemplate):
args = []
return args"""
- def __init__(self, name, *args, **kwargs):
+ def __init__(self, name, url, versions, languages: List[str]):
# If the user provided `--name py-pyqt4`, don't rename it py-py-pyqt4
if not name.startswith("py-"):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to py-{0}".format(name))
name = "py-{0}".format(name)
- super().__init__(name, *args, **kwargs)
+ super().__init__(name, url, versions, languages)
templates = {
@@ -658,8 +670,48 @@ def setup_parser(subparser):
)
-class BuildSystemGuesser:
- """An instance of BuildSystemGuesser provides a callable object to be used
+#: C file extensions
+C_EXT = {".c"}
+
+#: C++ file extensions
+CXX_EXT = {
+ ".C",
+ ".c++",
+ ".cc",
+ ".ccm",
+ ".cpp",
+ ".CPP",
+ ".cxx",
+ ".h++",
+ ".hh",
+ ".hpp",
+ ".hxx",
+ ".inl",
+ ".ipp",
+ ".ixx",
+ ".tcc",
+ ".tpp",
+}
+
+#: Fortran file extensions
+FORTRAN_EXT = {
+ ".f77",
+ ".F77",
+ ".f90",
+ ".F90",
+ ".f95",
+ ".F95",
+ ".f",
+ ".F",
+ ".for",
+ ".FOR",
+ ".ftn",
+ ".FTN",
+}
+
+
+class BuildSystemAndLanguageGuesser:
+ """An instance of BuildSystemAndLanguageGuesser provides a callable object to be used
during ``spack create``. By passing this object to ``spack checksum``, we
can take a peek at the fetched tarball and discern the build system it uses
"""
@@ -667,81 +719,119 @@ class BuildSystemGuesser:
def __init__(self):
"""Sets the default build system."""
self.build_system = "generic"
+ self._c = False
+ self._cxx = False
+ self._fortran = False
- def __call__(self, stage, url):
+ # List of files in the archive ordered by their depth in the directory tree.
+ self._file_entries: List[str] = []
+
+ def __call__(self, archive: str, url: str) -> None:
"""Try to guess the type of build system used by a project based on
the contents of its archive or the URL it was downloaded from."""
- if url is not None:
- # Most octave extensions are hosted on Octave-Forge:
- # https://octave.sourceforge.net/index.html
- # They all have the same base URL.
- if "downloads.sourceforge.net/octave/" in url:
- self.build_system = "octave"
- return
- if url.endswith(".gem"):
- self.build_system = "ruby"
- return
- if url.endswith(".whl") or ".whl#" in url:
- self.build_system = "python"
- return
- if url.endswith(".rock"):
- self.build_system = "lua"
- return
-
- # A list of clues that give us an idea of the build system a package
- # uses. If the regular expression matches a file contained in the
- # archive, the corresponding build system is assumed.
- # NOTE: Order is important here. If a package supports multiple
- # build systems, we choose the first match in this list.
- clues = [
- (r"/CMakeLists\.txt$", "cmake"),
- (r"/NAMESPACE$", "r"),
- (r"/Cargo\.toml$", "cargo"),
- (r"/go\.mod$", "go"),
- (r"/configure$", "autotools"),
- (r"/configure\.(in|ac)$", "autoreconf"),
- (r"/Makefile\.am$", "autoreconf"),
- (r"/pom\.xml$", "maven"),
- (r"/SConstruct$", "scons"),
- (r"/waf$", "waf"),
- (r"/pyproject.toml", "python"),
- (r"/setup\.(py|cfg)$", "python"),
- (r"/WORKSPACE$", "bazel"),
- (r"/Build\.PL$", "perlbuild"),
- (r"/Makefile\.PL$", "perlmake"),
- (r"/.*\.gemspec$", "ruby"),
- (r"/Rakefile$", "ruby"),
- (r"/setup\.rb$", "ruby"),
- (r"/.*\.pro$", "qmake"),
- (r"/.*\.rockspec$", "lua"),
- (r"/(GNU)?[Mm]akefile$", "makefile"),
- (r"/DESCRIPTION$", "octave"),
- (r"/meson\.build$", "meson"),
- (r"/configure\.py$", "sip"),
- ]
-
# Peek inside the compressed file.
- if stage.archive_file.endswith(".zip") or ".zip#" in stage.archive_file:
+ if archive.endswith(".zip") or ".zip#" in archive:
try:
unzip = which("unzip")
- output = unzip("-lq", stage.archive_file, output=str)
- except ProcessError:
+ assert unzip is not None
+ output = unzip("-lq", archive, output=str)
+ except Exception:
output = ""
else:
try:
tar = which("tar")
- output = tar("--exclude=*/*/*", "-tf", stage.archive_file, output=str)
- except ProcessError:
+ assert tar is not None
+ output = tar("tf", archive, output=str)
+ except Exception:
output = ""
- lines = output.splitlines()
+ self._file_entries[:] = output.splitlines()
+
+ # Files closest to the root should be considered first when determining build system.
+ self._file_entries.sort(key=lambda p: p.count("/"))
+
+ self._determine_build_system(url)
+ self._determine_language()
+
+ def _determine_build_system(self, url: str) -> None:
+ # Most octave extensions are hosted on Octave-Forge:
+ # https://octave.sourceforge.net/index.html
+ # They all have the same base URL.
+ if "downloads.sourceforge.net/octave/" in url:
+ self.build_system = "octave"
+ elif url.endswith(".gem"):
+ self.build_system = "ruby"
+ elif url.endswith(".whl") or ".whl#" in url:
+ self.build_system = "python"
+ elif url.endswith(".rock"):
+ self.build_system = "lua"
+ elif self._file_entries:
+ # A list of clues that give us an idea of the build system a package
+ # uses. If the regular expression matches a file contained in the
+ # archive, the corresponding build system is assumed.
+ # NOTE: Order is important here. If a package supports multiple
+ # build systems, we choose the first match in this list.
+ clues = [
+ (re.compile(pattern), build_system)
+ for pattern, build_system in (
+ (r"/CMakeLists\.txt$", "cmake"),
+ (r"/NAMESPACE$", "r"),
+ (r"/Cargo\.toml$", "cargo"),
+ (r"/go\.mod$", "go"),
+ (r"/configure$", "autotools"),
+ (r"/configure\.(in|ac)$", "autoreconf"),
+ (r"/Makefile\.am$", "autoreconf"),
+ (r"/pom\.xml$", "maven"),
+ (r"/SConstruct$", "scons"),
+ (r"/waf$", "waf"),
+ (r"/pyproject.toml", "python"),
+ (r"/setup\.(py|cfg)$", "python"),
+ (r"/WORKSPACE$", "bazel"),
+ (r"/Build\.PL$", "perlbuild"),
+ (r"/Makefile\.PL$", "perlmake"),
+ (r"/.*\.gemspec$", "ruby"),
+ (r"/Rakefile$", "ruby"),
+ (r"/setup\.rb$", "ruby"),
+ (r"/.*\.pro$", "qmake"),
+ (r"/.*\.rockspec$", "lua"),
+ (r"/(GNU)?[Mm]akefile$", "makefile"),
+ (r"/DESCRIPTION$", "octave"),
+ (r"/meson\.build$", "meson"),
+ (r"/configure\.py$", "sip"),
+ )
+ ]
+
+ # Determine the build system based on the files contained in the archive.
+ for file in self._file_entries:
+ for pattern, build_system in clues:
+ if pattern.search(file):
+ self.build_system = build_system
+ return
+
+ def _determine_language(self):
+ for entry in self._file_entries:
+ _, ext = os.path.splitext(entry)
+
+ if not self._c and ext in C_EXT:
+ self._c = True
+ elif not self._cxx and ext in CXX_EXT:
+ self._cxx = True
+ elif not self._fortran and ext in FORTRAN_EXT:
+ self._fortran = True
+
+ if self._c and self._cxx and self._fortran:
+ return
- # Determine the build system based on the files contained
- # in the archive.
- for pattern, bs in clues:
- if any(re.search(pattern, line) for line in lines):
- self.build_system = bs
- break
+ @property
+ def languages(self) -> List[str]:
+ langs: List[str] = []
+ if self._c:
+ langs.append("c")
+ if self._cxx:
+ langs.append("cxx")
+ if self._fortran:
+ langs.append("fortran")
+ return langs
def get_name(name, url):
@@ -811,7 +901,7 @@ def get_url(url):
def get_versions(args, name):
"""Returns a list of versions and hashes for a package.
- Also returns a BuildSystemGuesser object.
+ Also returns a BuildSystemAndLanguageGuesser object.
Returns default values if no URL is provided.
@@ -820,7 +910,7 @@ def get_versions(args, name):
name (str): The name of the package
Returns:
- tuple: versions and hashes, and a BuildSystemGuesser object
+ tuple: versions and hashes, and a BuildSystemAndLanguageGuesser object
"""
# Default version with hash
@@ -834,7 +924,7 @@ def get_versions(args, name):
# version("1.2.4")"""
# Default guesser
- guesser = BuildSystemGuesser()
+ guesser = BuildSystemAndLanguageGuesser()
valid_url = True
try:
@@ -847,7 +937,7 @@ def get_versions(args, name):
if args.url is not None and args.template != "bundle" and valid_url:
# Find available versions
try:
- url_dict = spack.url.find_versions_of_archive(args.url)
+ url_dict = find_versions_of_archive(args.url)
if len(url_dict) > 1 and not args.batch and sys.stdin.isatty():
url_dict_filtered = spack.stage.interactive_version_filter(url_dict)
if url_dict_filtered is None:
@@ -874,7 +964,7 @@ def get_versions(args, name):
return versions, guesser
-def get_build_system(template, url, guesser):
+def get_build_system(template: str, url: str, guesser: BuildSystemAndLanguageGuesser) -> str:
"""Determine the build system template.
If a template is specified, always use that. Otherwise, if a URL
@@ -882,11 +972,10 @@ def get_build_system(template, url, guesser):
build system it uses. Otherwise, use a generic template by default.
Args:
- template (str): ``--template`` argument given to ``spack create``
- url (str): ``url`` argument given to ``spack create``
- args (argparse.Namespace): The arguments given to ``spack create``
- guesser (BuildSystemGuesser): The first_stage_function given to
- ``spack checksum`` which records the build system it detects
+ template: ``--template`` argument given to ``spack create``
+ url: ``url`` argument given to ``spack create``
+ guesser: The first_stage_function given to ``spack checksum`` which records the build
+ system it detects
Returns:
str: The name of the build system template to use
@@ -933,7 +1022,7 @@ def get_repository(args, name):
# Figure out where the new package should live
repo_path = args.repo
if repo_path is not None:
- repo = spack.repo.Repo(repo_path)
+ repo = spack.repo.from_path(repo_path)
if spec.namespace and spec.namespace != repo.namespace:
tty.die(
"Can't create package with namespace {0} in repo with "
@@ -941,9 +1030,7 @@ def get_repository(args, name):
)
else:
if spec.namespace:
- repo = spack.repo.PATH.get_repo(spec.namespace, None)
- if not repo:
- tty.die("Unknown namespace: '{0}'".format(spec.namespace))
+ repo = spack.repo.PATH.get_repo(spec.namespace)
else:
repo = spack.repo.PATH.first_repo()
@@ -962,7 +1049,7 @@ def create(parser, args):
build_system = get_build_system(args.template, url, guesser)
# Create the package template object
- constr_args = {"name": name, "versions": versions}
+ constr_args = {"name": name, "versions": versions, "languages": guesser.languages}
package_class = templates[build_system]
if package_class != BundlePackageTemplate:
constr_args["url"] = url
diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py
index 1c9fb214f4..02c22c70fd 100644
--- a/lib/spack/spack/cmd/debug.py
+++ b/lib/spack/spack/cmd/debug.py
@@ -6,17 +6,19 @@
import os
import platform
import re
+import sys
from datetime import datetime
from glob import glob
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
-import spack.config
+import spack
import spack.paths
import spack.platforms
+import spack.spec
+import spack.store
import spack.util.git
-from spack.main import get_version
from spack.util.executable import which
description = "debugging commands for troubleshooting Spack"
@@ -62,9 +64,10 @@ def create_db_tarball(args):
base = os.path.basename(str(spack.store.STORE.root))
transform_args = []
+ # Currently --transform and -s are not supported by Windows native tar
if "GNU" in tar("--version", output=str):
transform_args = ["--transform", "s/^%s/%s/" % (base, tarball_name)]
- else:
+ elif sys.platform != "win32":
transform_args = ["-s", "/^%s/%s/" % (base, tarball_name)]
wd = os.path.dirname(str(spack.store.STORE.root))
@@ -87,10 +90,9 @@ def report(args):
host_os = host_platform.operating_system("frontend")
host_target = host_platform.target("frontend")
architecture = spack.spec.ArchSpec((str(host_platform), str(host_os), str(host_target)))
- print("* **Spack:**", get_version())
+ print("* **Spack:**", spack.get_version())
print("* **Python:**", platform.python_version())
print("* **Platform:**", architecture)
- print("* **Concretizer:**", spack.config.get("config:concretizer"))
def debug(parser, args):
diff --git a/lib/spack/spack/cmd/deconcretize.py b/lib/spack/spack/cmd/deconcretize.py
index ffb05eebe7..7e2feab5aa 100644
--- a/lib/spack/spack/cmd/deconcretize.py
+++ b/lib/spack/spack/cmd/deconcretize.py
@@ -99,5 +99,5 @@ def deconcretize(parser, args):
" Use `spack deconcretize --all` to deconcretize ALL specs.",
)
- specs = spack.cmd.parse_specs(args.specs) if args.specs else [any]
+ specs = spack.cmd.parse_specs(args.specs) if args.specs else [None]
deconcretize_specs(args, specs)
diff --git a/lib/spack/spack/cmd/dependencies.py b/lib/spack/spack/cmd/dependencies.py
index 676da2f089..51d2389f79 100644
--- a/lib/spack/spack/cmd/dependencies.py
+++ b/lib/spack/spack/cmd/dependencies.py
@@ -11,7 +11,6 @@ from llnl.util.tty.colify import colify
import spack.cmd
import spack.environment as ev
import spack.package_base
-import spack.repo
import spack.store
from spack.cmd.common import arguments
diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py
index b78603bfae..7c997bad9d 100644
--- a/lib/spack/spack/cmd/dependents.py
+++ b/lib/spack/spack/cmd/dependents.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import collections
import sys
import llnl.util.tty as tty
@@ -46,18 +47,18 @@ def inverted_dependencies():
dependents of, e.g., `mpi`, but virtuals are not included as
actual dependents.
"""
- dag = {}
+ dag = collections.defaultdict(set)
for pkg_cls in spack.repo.PATH.all_package_classes():
- dag.setdefault(pkg_cls.name, set())
- for dep in pkg_cls.dependencies:
- deps = [dep]
+ for _, deps_by_name in pkg_cls.dependencies.items():
+ for dep in deps_by_name:
+ deps = [dep]
- # expand virtuals if necessary
- if spack.repo.PATH.is_virtual(dep):
- deps += [s.name for s in spack.repo.PATH.providers_for(dep)]
+ # expand virtuals if necessary
+ if spack.repo.PATH.is_virtual(dep):
+ deps += [s.name for s in spack.repo.PATH.providers_for(dep)]
- for d in deps:
- dag.setdefault(d, set()).add(pkg_cls.name)
+ for d in deps:
+ dag[d].add(pkg_cls.name)
return dag
diff --git a/lib/spack/spack/cmd/deprecate.py b/lib/spack/spack/cmd/deprecate.py
index dd61b0915b..f7ecc39312 100644
--- a/lib/spack/spack/cmd/deprecate.py
+++ b/lib/spack/spack/cmd/deprecate.py
@@ -14,18 +14,19 @@ It is up to the user to ensure binary compatibility between the deprecated
installation and its deprecator.
"""
import argparse
-import os
import llnl.util.tty as tty
from llnl.util.symlink import symlink
import spack.cmd
import spack.environment as ev
+import spack.installer
import spack.store
from spack.cmd.common import arguments
-from spack.database import InstallStatuses
from spack.error import SpackError
+from ..enums import InstallRecordStatus
+
description = "replace one package with another via symlinks"
section = "admin"
level = "long"
@@ -76,12 +77,7 @@ def setup_parser(sp):
)
sp.add_argument(
- "-l",
- "--link-type",
- type=str,
- default="soft",
- choices=["soft", "hard"],
- help="type of filesystem link to use for deprecation (default soft)",
+ "-l", "--link-type", type=str, default=None, choices=["soft", "hard"], help="(deprecated)"
)
sp.add_argument(
@@ -91,14 +87,21 @@ def setup_parser(sp):
def deprecate(parser, args):
"""Deprecate one spec in favor of another"""
+ if args.link_type is not None:
+ tty.warn("The --link-type option is deprecated and will be removed in a future release.")
+
env = ev.active_environment()
specs = spack.cmd.parse_specs(args.specs)
if len(specs) != 2:
raise SpackError("spack deprecate requires exactly two specs")
- install_query = [InstallStatuses.INSTALLED, InstallStatuses.DEPRECATED]
- deprecate = spack.cmd.disambiguate_spec(specs[0], env, local=True, installed=install_query)
+ deprecate = spack.cmd.disambiguate_spec(
+ specs[0],
+ env,
+ local=True,
+ installed=(InstallRecordStatus.INSTALLED | InstallRecordStatus.DEPRECATED),
+ )
if args.install:
deprecator = specs[1].concretized()
@@ -144,7 +147,5 @@ def deprecate(parser, args):
if not answer:
tty.die("Will not deprecate any packages.")
- link_fn = os.link if args.link_type == "hard" else symlink
-
for dcate, dcator in zip(all_deprecate, all_deprecators):
- dcate.package.do_deprecate(dcator, link_fn)
+ spack.installer.deprecate(dcate, dcator, symlink)
diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py
index fbd8a78f09..696c16f4dc 100644
--- a/lib/spack/spack/cmd/dev_build.py
+++ b/lib/spack/spack/cmd/dev_build.py
@@ -8,10 +8,13 @@ import sys
import llnl.util.tty as tty
+import spack.build_environment
import spack.cmd
+import spack.cmd.common.arguments
import spack.config
import spack.repo
from spack.cmd.common import arguments
+from spack.installer import PackageInstaller
description = "developer build: build from code in current working directory"
section = "build"
@@ -19,7 +22,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["jobs"])
+ arguments.add_common_arguments(subparser, ["jobs", "no_checksum", "spec"])
subparser.add_argument(
"-d",
"--source-path",
@@ -34,7 +37,6 @@ def setup_parser(subparser):
dest="ignore_deps",
help="do not try to install dependencies of requested packages",
)
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
subparser.add_argument(
"--keep-prefix",
action="store_true",
@@ -63,7 +65,6 @@ def setup_parser(subparser):
choices=["root", "all"],
help="run tests on only root packages or all packages",
)
- arguments.add_common_arguments(subparser, ["spec"])
stop_group = subparser.add_mutually_exclusive_group()
stop_group.add_argument(
@@ -125,18 +126,15 @@ def dev_build(self, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
tests = False
if args.test == "all":
tests = True
elif args.test == "root":
tests = [spec.name for spec in specs]
- spec.package.do_install(
+ PackageInstaller(
+ [spec.package],
tests=tests,
- make_jobs=args.jobs,
keep_prefix=args.keep_prefix,
install_deps=not args.ignore_deps,
verbose=not args.quiet,
@@ -144,7 +142,7 @@ def dev_build(self, args):
stop_before=args.before,
skip_patch=args.skip_patch,
stop_at=args.until,
- )
+ ).install()
# drop into the build environment of the package?
if args.shell is not None:
diff --git a/lib/spack/spack/cmd/develop.py b/lib/spack/spack/cmd/develop.py
index 13a265af12..1025b1bb69 100644
--- a/lib/spack/spack/cmd/develop.py
+++ b/lib/spack/spack/cmd/develop.py
@@ -8,7 +8,11 @@ import shutil
import llnl.util.tty as tty
import spack.cmd
+import spack.config
+import spack.fetch_strategy
+import spack.repo
import spack.spec
+import spack.stage
import spack.util.path
import spack.version
from spack.cmd.common import arguments
@@ -21,6 +25,7 @@ level = "long"
def setup_parser(subparser):
subparser.add_argument("-p", "--path", help="source location of package")
+ subparser.add_argument("-b", "--build-directory", help="build directory for the package")
clone_group = subparser.add_mutually_exclusive_group()
clone_group.add_argument(
@@ -58,7 +63,7 @@ def _update_config(spec, path):
spack.config.change_or_add("develop", find_fn, change_fn)
-def _retrieve_develop_source(spec, abspath):
+def _retrieve_develop_source(spec: spack.spec.Spec, abspath: str) -> None:
# "steal" the source code via staging API. We ask for a stage
# to be created, then copy it afterwards somewhere else. It would be
# better if we can create the `source_path` directly into its final
@@ -67,19 +72,27 @@ def _retrieve_develop_source(spec, abspath):
# We construct a package class ourselves, rather than asking for
# Spec.package, since Spec only allows this when it is concrete
package = pkg_cls(spec)
- if isinstance(package.stage[0].fetcher, spack.fetch_strategy.GitFetchStrategy):
- package.stage[0].fetcher.get_full_repo = True
+ source_stage: spack.stage.Stage = package.stage[0]
+ if isinstance(source_stage.fetcher, spack.fetch_strategy.GitFetchStrategy):
+ source_stage.fetcher.get_full_repo = True
# If we retrieved this version before and cached it, we may have
# done so without cloning the full git repo; likewise, any
# mirror might store an instance with truncated history.
- package.stage[0].disable_mirrors()
+ source_stage.default_fetcher_only = True
+ source_stage.fetcher.set_package(package)
package.stage.steal_source(abspath)
def develop(parser, args):
+ # Note: we could put develop specs in any scope, but I assume
+ # users would only ever want to do this for either (a) an active
+ # env or (b) a specified config file (e.g. that is included by
+ # an environment)
+ # TODO: when https://github.com/spack/spack/pull/35307 is merged,
+ # an active env is not required if a scope is specified
+ env = spack.cmd.require_active_env(cmd_name="develop")
if not args.spec:
- env = spack.cmd.require_active_env(cmd_name="develop")
if args.clone is False:
raise SpackError("No spec provided to spack develop command")
@@ -109,16 +122,18 @@ def develop(parser, args):
raise SpackError("spack develop requires at most one named spec")
spec = specs[0]
+
version = spec.versions.concrete_range_as_version
if not version:
- raise SpackError("Packages to develop must have a concrete version")
+ # look up the maximum version so infintiy versions are preferred for develop
+ version = max(spec.package_class.versions.keys())
+ tty.msg(f"Defaulting to highest version: {spec.name}@{version}")
spec.versions = spack.version.VersionList([version])
# If user does not specify --path, we choose to create a directory in the
# active environment's directory, named after the spec
path = args.path or spec.name
if not os.path.isabs(path):
- env = spack.cmd.require_active_env(cmd_name="develop")
abspath = spack.util.path.canonicalize_path(path, default_wd=env.path)
else:
abspath = path
@@ -142,13 +157,13 @@ def develop(parser, args):
_retrieve_develop_source(spec, abspath)
- # Note: we could put develop specs in any scope, but I assume
- # users would only ever want to do this for either (a) an active
- # env or (b) a specified config file (e.g. that is included by
- # an environment)
- # TODO: when https://github.com/spack/spack/pull/35307 is merged,
- # an active env is not required if a scope is specified
- env = spack.cmd.require_active_env(cmd_name="develop")
tty.debug("Updating develop config for {0} transactionally".format(env.name))
with env.write_transaction():
+ if args.build_directory is not None:
+ spack.config.add(
+ "packages:{}:package_attributes:build_directory:{}".format(
+ spec.name, args.build_directory
+ ),
+ env.scope_name,
+ )
_update_config(spec, path)
diff --git a/lib/spack/spack/cmd/diff.py b/lib/spack/spack/cmd/diff.py
index a841986355..3a9311e0e6 100644
--- a/lib/spack/spack/cmd/diff.py
+++ b/lib/spack/spack/cmd/diff.py
@@ -12,7 +12,6 @@ from llnl.util.tty.color import cprint, get_color_when
import spack.cmd
import spack.environment as ev
import spack.solver.asp as asp
-import spack.util.environment
import spack.util.spack_json as sjson
from spack.cmd.common import arguments
diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py
index 0134a522d8..9951bb65a3 100644
--- a/lib/spack/spack/cmd/edit.py
+++ b/lib/spack/spack/cmd/edit.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import errno
import glob
import os
@@ -11,43 +12,13 @@ import llnl.util.tty as tty
import spack.cmd
import spack.paths
import spack.repo
-from spack.spec import Spec
-from spack.util.editor import editor
+import spack.util.editor
description = "open package files in $EDITOR"
section = "packaging"
level = "short"
-def edit_package(name, repo_path, namespace):
- """Opens the requested package file in your favorite $EDITOR.
-
- Args:
- name (str): The name of the package
- repo_path (str): The path to the repository containing this package
- namespace (str): A valid namespace registered with Spack
- """
- # Find the location of the package
- if repo_path:
- repo = spack.repo.Repo(repo_path)
- elif namespace:
- repo = spack.repo.PATH.get_repo(namespace)
- else:
- repo = spack.repo.PATH
- path = repo.filename_for_package_name(name)
-
- spec = Spec(name)
- if os.path.exists(path):
- if not os.path.isfile(path):
- tty.die("Something is wrong. '{0}' is not a file!".format(path))
- if not os.access(path, os.R_OK):
- tty.die("Insufficient permissions on '%s'!" % path)
- else:
- raise spack.repo.UnknownPackageError(spec.name)
-
- editor(path)
-
-
def setup_parser(subparser):
excl_args = subparser.add_mutually_exclusive_group()
@@ -98,41 +69,67 @@ def setup_parser(subparser):
excl_args.add_argument("-r", "--repo", default=None, help="path to repo to edit package in")
excl_args.add_argument("-N", "--namespace", default=None, help="namespace of package to edit")
- subparser.add_argument("package", nargs="?", default=None, help="package name")
+ subparser.add_argument("package", nargs="*", default=None, help="package name")
-def edit(parser, args):
- name = args.package
+def locate_package(name: str, repo: spack.repo.Repo) -> str:
+ path = repo.filename_for_package_name(name)
- # By default, edit package files
- path = spack.paths.packages_path
+ try:
+ with open(path, "r"):
+ return path
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ raise spack.repo.UnknownPackageError(name) from e
+ tty.die(f"Cannot edit package: {e}")
+
+
+def locate_file(name: str, path: str) -> str:
+ # convert command names to python module name
+ if path == spack.paths.command_path:
+ name = spack.cmd.python_name(name)
+
+ file_path = os.path.join(path, name)
+
+ # Try to open direct match.
+ try:
+ with open(file_path, "r"):
+ return file_path
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ tty.die(f"Cannot edit file: {e}")
+ pass
+
+ # Otherwise try to find a file that starts with the name
+ candidates = glob.glob(file_path + "*")
+ exclude_list = [".pyc", "~"] # exclude binaries and backups
+ files = [f for f in candidates if not any(f.endswith(ext) for ext in exclude_list)]
+ if len(files) > 1:
+ tty.die(
+ f"Multiple files start with `{name}`:\n"
+ + "\n".join(f" {os.path.basename(f)}" for f in files)
+ )
+ elif not files:
+ tty.die(f"No file for '{name}' was found in {path}")
+ return files[0]
+
+
+def edit(parser, args):
+ names = args.package
# If `--command`, `--test`, or `--module` is chosen, edit those instead
if args.path:
- path = args.path
- if name:
- # convert command names to python module name
- if path == spack.paths.command_path:
- name = spack.cmd.python_name(name)
-
- path = os.path.join(path, name)
- if not os.path.exists(path):
- files = glob.glob(path + "*")
- exclude_list = [".pyc", "~"] # exclude binaries and backups
- files = list(filter(lambda x: all(s not in x for s in exclude_list), files))
- if len(files) > 1:
- m = "Multiple files exist with the name {0}.".format(name)
- m += " Please specify a suffix. Files are:\n\n"
- for f in files:
- m += " " + os.path.basename(f) + "\n"
- tty.die(m)
- if not files:
- tty.die("No file for '{0}' was found in {1}".format(name, path))
- path = files[0] # already confirmed only one entry in files
-
- editor(path)
- elif name:
- edit_package(name, args.repo, args.namespace)
+ paths = [locate_file(name, args.path) for name in names] if names else [args.path]
+ spack.util.editor.editor(*paths)
+ elif names:
+ if args.repo:
+ repo = spack.repo.from_path(args.repo)
+ elif args.namespace:
+ repo = spack.repo.PATH.get_repo(args.namespace)
+ else:
+ repo = spack.repo.PATH
+ paths = [locate_package(name, repo) for name in names]
+ spack.util.editor.editor(*paths)
else:
# By default open the directory where packages live
- editor(path)
+ spack.util.editor.editor(spack.paths.packages_path)
diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py
index 72af8de9aa..5a80f0e1a8 100644
--- a/lib/spack/spack/cmd/env.py
+++ b/lib/spack/spack/cmd/env.py
@@ -9,26 +9,25 @@ import shlex
import shutil
import sys
import tempfile
-from typing import Optional
+from pathlib import Path
+from typing import List, Optional, Set
import llnl.string as string
import llnl.util.filesystem as fs
import llnl.util.tty as tty
+from llnl.util.symlink import islink, symlink
from llnl.util.tty.colify import colify
-from llnl.util.tty.color import colorize
+from llnl.util.tty.color import cescape, colorize
import spack.cmd
import spack.cmd.common
import spack.cmd.common.arguments
-import spack.cmd.install
import spack.cmd.modules
-import spack.cmd.uninstall
import spack.config
import spack.environment as ev
import spack.environment.depfile as depfile
+import spack.environment.environment
import spack.environment.shell
-import spack.schema.env
-import spack.spec
import spack.tengine
from spack.cmd.common import arguments
from spack.util.environment import EnvironmentModifications
@@ -44,6 +43,7 @@ subcommands = [
"deactivate",
"create",
["remove", "rm"],
+ ["rename", "mv"],
["list", "ls"],
["status", "st"],
"loads",
@@ -51,14 +51,138 @@ subcommands = [
"update",
"revert",
"depfile",
+ "track",
+ "untrack",
]
#
+# env create
+#
+def env_create_setup_parser(subparser):
+ """create a new environment
+
+ create a new environment or, optionally, copy an existing environment
+
+ a manifest file results in a new abstract environment while a lock file
+ creates a new concrete environment
+ """
+ subparser.add_argument(
+ "env_name", metavar="env", help="name or directory of the new environment"
+ )
+ subparser.add_argument(
+ "-d", "--dir", action="store_true", help="create an environment in a specific directory"
+ )
+ subparser.add_argument(
+ "--keep-relative",
+ action="store_true",
+ help="copy envfile's relative develop paths verbatim",
+ )
+ view_opts = subparser.add_mutually_exclusive_group()
+ view_opts.add_argument(
+ "--without-view", action="store_true", help="do not maintain a view for this environment"
+ )
+ view_opts.add_argument(
+ "--with-view", help="maintain view at WITH_VIEW (vs. environment's directory)"
+ )
+ subparser.add_argument(
+ "envfile",
+ nargs="?",
+ default=None,
+ help="manifest or lock file (ends with '.json' or '.lock')",
+ )
+ subparser.add_argument(
+ "--include-concrete",
+ action="append",
+ help="copy concrete specs from INCLUDE_CONCRETE's environment",
+ )
+
+
+def env_create(args):
+ if args.with_view:
+ # Expand relative paths provided on the command line to the current working directory
+ # This way we interpret `spack env create --with-view ./view --dir ./env` as
+ # a view in $PWD/view, not $PWD/env/view. This is different from specifying a relative
+ # path in the manifest, which is resolved relative to the manifest file's location.
+ with_view = os.path.abspath(args.with_view)
+ elif args.without_view:
+ with_view = False
+ else:
+ # Note that 'None' means unspecified, in which case the Environment
+ # object could choose to enable a view by default. False means that
+ # the environment should not include a view.
+ with_view = None
+
+ include_concrete = None
+ if hasattr(args, "include_concrete"):
+ include_concrete = args.include_concrete
+
+ env = _env_create(
+ args.env_name,
+ init_file=args.envfile,
+ dir=args.dir or os.path.sep in args.env_name or args.env_name in (".", ".."),
+ with_view=with_view,
+ keep_relative=args.keep_relative,
+ include_concrete=include_concrete,
+ )
+
+ # Generate views, only really useful for environments created from spack.lock files.
+ env.regenerate_views()
+
+
+def _env_create(
+ name_or_path: str,
+ *,
+ init_file: Optional[str] = None,
+ dir: bool = False,
+ with_view: Optional[str] = None,
+ keep_relative: bool = False,
+ include_concrete: Optional[List[str]] = None,
+):
+ """Create a new environment, with an optional yaml description.
+
+ Arguments:
+ name_or_path (str): name of the environment to create, or path to it
+ init_file (str or file): optional initialization file -- can be
+ a JSON lockfile (*.lock, *.json) or YAML manifest file
+ dir (bool): if True, create an environment in a directory instead
+ of a named environment
+ keep_relative (bool): if True, develop paths are copied verbatim into
+ the new environment file, otherwise they may be made absolute if the
+ new environment is in a different location
+ include_concrete (list): list of the included concrete environments
+ """
+ if not dir:
+ env = ev.create(
+ name_or_path,
+ init_file=init_file,
+ with_view=with_view,
+ keep_relative=keep_relative,
+ include_concrete=include_concrete,
+ )
+ tty.msg(
+ colorize(
+ f"Created environment @c{{{cescape(name_or_path)}}} in: @c{{{cescape(env.path)}}}"
+ )
+ )
+ else:
+ env = ev.create_in_dir(
+ name_or_path,
+ init_file=init_file,
+ with_view=with_view,
+ keep_relative=keep_relative,
+ include_concrete=include_concrete,
+ )
+ tty.msg(colorize(f"Created independent environment in: @c{{{cescape(env.path)}}}"))
+ tty.msg(f"Activate with: {colorize(f'@c{{spack env activate {cescape(name_or_path)}}}')}")
+ return env
+
+
+#
# env activate
#
def env_activate_setup_parser(subparser):
- """set the current environment"""
+ """set the active environment"""
shells = subparser.add_mutually_exclusive_group()
shells.add_argument(
"--sh",
@@ -98,14 +222,14 @@ def env_activate_setup_parser(subparser):
view_options = subparser.add_mutually_exclusive_group()
view_options.add_argument(
- "--with-view",
"-v",
+ "--with-view",
metavar="name",
- help="set runtime environment variables for specific view",
+ help="set runtime environment variables for the named view",
)
view_options.add_argument(
- "--without-view",
"-V",
+ "--without-view",
action="store_true",
help="do not set runtime environment variables for any view",
)
@@ -115,25 +239,45 @@ def env_activate_setup_parser(subparser):
"--prompt",
action="store_true",
default=False,
- help="decorate the command line prompt when activating",
+ help="add the active environment to the command line prompt",
)
- env_options = subparser.add_mutually_exclusive_group()
- env_options.add_argument(
+ subparser.add_argument(
"--temp",
action="store_true",
default=False,
- help="create and activate an environment in a temporary directory",
+ help="create and activate in a temporary directory",
)
- env_options.add_argument(
- "-d", "--dir", default=None, help="activate the environment in this directory"
+ subparser.add_argument(
+ "--create",
+ action="store_true",
+ default=False,
+ help="create and activate the environment if it doesn't exist",
)
- env_options.add_argument(
+ subparser.add_argument(
+ "--envfile",
+ nargs="?",
+ default=None,
+ help="manifest or lock file (ends with '.json' or '.lock')",
+ )
+ subparser.add_argument(
+ "--keep-relative",
+ action="store_true",
+ help="copy envfile's relative develop paths verbatim when create",
+ )
+ subparser.add_argument(
+ "-d",
+ "--dir",
+ default=False,
+ action="store_true",
+ help="activate environment based on the directory supplied",
+ )
+ subparser.add_argument(
metavar="env",
- dest="activate_env",
+ dest="env_name",
nargs="?",
default=None,
- help="name of environment to activate",
+ help=("name or directory of the environment being activated"),
)
@@ -148,7 +292,8 @@ def create_temp_env_directory():
def _tty_info(msg):
"""tty.info like function that prints the equivalent printf statement for eval."""
decorated = f'{colorize("@*b{==>}")} {msg}\n'
- print(f"printf {shlex.quote(decorated)};")
+ executor = "echo" if sys.platform == "win32" else "printf"
+ print(f"{executor} {shlex.quote(decorated)};")
def env_activate(args):
@@ -162,11 +307,17 @@ def env_activate(args):
if args.env or args.no_env or args.env_dir:
tty.die("Calling spack env activate with --env, --env-dir and --no-env is ambiguous")
- env_name_or_dir = args.activate_env or args.dir
+ # special parser error handling relative to the --temp flag
+ temp_conflicts = iter([args.keep_relative, args.dir, args.env_name, args.with_view])
+ if args.temp and any(temp_conflicts):
+ tty.die(
+ "spack env activate --temp cannot be combined with managed environments, --with-view,"
+ " --keep-relative, or --dir."
+ )
# When executing `spack env activate` without further arguments, activate
# the default environment. It's created when it doesn't exist yet.
- if not env_name_or_dir and not args.temp:
+ if not args.env_name and not args.temp:
short_name = "default"
if not ev.exists(short_name):
ev.create(short_name)
@@ -185,17 +336,25 @@ def env_activate(args):
_tty_info(f"Created and activated temporary environment in {env_path}")
# Managed environment
- elif ev.exists(env_name_or_dir) and not args.dir:
- env_path = ev.root(env_name_or_dir)
- short_name = env_name_or_dir
+ elif ev.exists(args.env_name) and not args.dir:
+ env_path = ev.root(args.env_name)
+ short_name = args.env_name
# Environment directory
- elif ev.is_env_dir(env_name_or_dir):
- env_path = os.path.abspath(env_name_or_dir)
+ elif ev.is_env_dir(args.env_name):
+ env_path = os.path.abspath(args.env_name)
short_name = os.path.basename(env_path)
+ # create if user requested, and then recall recursively
+ elif args.create:
+ tty.set_msg_enabled(False)
+ env_create(args)
+ tty.set_msg_enabled(True)
+ env_activate(args)
+ return
+
else:
- tty.die("No such environment: '%s'" % env_name_or_dir)
+ tty.die("No such environment: '%s'" % args.env_name)
env_prompt = "[%s]" % short_name
@@ -231,7 +390,7 @@ def env_activate(args):
# env deactivate
#
def env_deactivate_setup_parser(subparser):
- """deactivate any active environment in the shell"""
+ """deactivate the active environment"""
shells = subparser.add_mutually_exclusive_group()
shells.add_argument(
"--sh",
@@ -291,146 +450,301 @@ def env_deactivate(args):
#
-# env create
+# env track
#
-def env_create_setup_parser(subparser):
- """create a new environment"""
- subparser.add_argument("create_env", metavar="env", help="name of environment to create")
- subparser.add_argument(
- "-d", "--dir", action="store_true", help="create an environment in a specific directory"
- )
- subparser.add_argument(
- "--keep-relative",
- action="store_true",
- help="copy relative develop paths verbatim into the new environment"
- " when initializing from envfile",
- )
- view_opts = subparser.add_mutually_exclusive_group()
- view_opts.add_argument(
- "--without-view", action="store_true", help="do not maintain a view for this environment"
- )
- view_opts.add_argument(
- "--with-view",
- help="specify that this environment should maintain a view at the"
- " specified path (by default the view is maintained in the"
- " environment directory)",
- )
- subparser.add_argument(
- "envfile",
- nargs="?",
- default=None,
- help="either a lockfile (must end with '.json' or '.lock') or a manifest file",
- )
+def env_track_setup_parser(subparser):
+ """track an environment from a directory in Spack"""
+ subparser.add_argument("-n", "--name", help="custom environment name")
+ subparser.add_argument("dir", help="path to environment")
+ arguments.add_common_arguments(subparser, ["yes_to_all"])
-def env_create(args):
- if args.with_view:
- # Expand relative paths provided on the command line to the current working directory
- # This way we interpret `spack env create --with-view ./view --dir ./env` as
- # a view in $PWD/view, not $PWD/env/view. This is different from specifying a relative
- # path in the manifest, which is resolved relative to the manifest file's location.
- with_view = os.path.abspath(args.with_view)
- elif args.without_view:
- with_view = False
+def env_track(args):
+ src_path = os.path.abspath(args.dir)
+ if not ev.is_env_dir(src_path):
+ tty.die("Cannot track environment. Path doesn't contain an environment")
+
+ if args.name:
+ name = args.name
else:
- # Note that 'None' means unspecified, in which case the Environment
- # object could choose to enable a view by default. False means that
- # the environment should not include a view.
- with_view = None
+ name = os.path.basename(src_path)
+
+ try:
+ dst_path = ev.environment_dir_from_name(name, exists_ok=False)
+ except ev.SpackEnvironmentError:
+ tty.die(
+ f"An environment named {name} already exists. Set a name with:"
+ "\n\n"
+ f" spack env track --name NAME {src_path}\n"
+ )
- env = _env_create(
- args.create_env,
- init_file=args.envfile,
- dir=args.dir,
- with_view=with_view,
- keep_relative=args.keep_relative,
+ symlink(src_path, dst_path)
+
+ tty.msg(f"Tracking environment in {src_path}")
+ tty.msg(
+ "You can now activate this environment with the following command:\n\n"
+ f" spack env activate {name}\n"
)
- # Generate views, only really useful for environments created from spack.lock files.
- env.regenerate_views()
+#
+# env remove & untrack helpers
+#
+def filter_managed_env_names(env_names: Set[str]) -> Set[str]:
+ tracked_env_names = {e for e in env_names if islink(ev.environment_dir_from_name(e))}
+ managed_env_names = env_names - set(tracked_env_names)
+
+ num_managed_envs = len(managed_env_names)
+ managed_envs_str = " ".join(managed_env_names)
+ if num_managed_envs >= 2:
+ tty.error(
+ f"The following are not tracked environments. "
+ "To remove them completely run,"
+ "\n\n"
+ f" spack env rm {managed_envs_str}\n"
+ )
-def _env_create(name_or_path, *, init_file=None, dir=False, with_view=None, keep_relative=False):
- """Create a new environment, with an optional yaml description.
+ elif num_managed_envs > 0:
+ tty.error(
+ f"'{managed_envs_str}' is not a tracked env. "
+ "To remove it completely run,"
+ "\n\n"
+ f" spack env rm {managed_envs_str}\n"
+ )
- Arguments:
- name_or_path (str): name of the environment to create, or path to it
- init_file (str or file): optional initialization file -- can be
- a JSON lockfile (*.lock, *.json) or YAML manifest file
- dir (bool): if True, create an environment in a directory instead
- of a named environment
- keep_relative (bool): if True, develop paths are copied verbatim into
- the new environment file, otherwise they may be made absolute if the
- new environment is in a different location
- """
- if not dir:
- env = ev.create(
- name_or_path, init_file=init_file, with_view=with_view, keep_relative=keep_relative
+ return tracked_env_names
+
+
+def get_valid_envs(env_names: Set[str]) -> Set[ev.Environment]:
+ valid_envs = set()
+ for env_name in env_names:
+ try:
+ env = ev.read(env_name)
+ valid_envs.add(env)
+
+ except (spack.config.ConfigFormatError, ev.SpackEnvironmentConfigError):
+ pass
+
+ return valid_envs
+
+
+def _env_untrack_or_remove(
+ env_names: List[str], remove: bool = False, force: bool = False, yes_to_all: bool = False
+):
+ all_env_names = set(ev.all_environment_names())
+ known_env_names = set(env_names).intersection(all_env_names)
+ unknown_env_names = set(env_names) - known_env_names
+
+ # print error for unknown environments
+ for env_name in unknown_env_names:
+ tty.error(f"Environment '{env_name}' does not exist")
+
+ # if only unlinking is allowed, remove all environments
+ # which do not point internally at symlinks
+ if not remove:
+ env_names_to_remove = filter_managed_env_names(known_env_names)
+ else:
+ env_names_to_remove = known_env_names
+
+ # initalize all environments with valid spack.yaml configs
+ all_valid_envs = get_valid_envs(all_env_names)
+
+ # build a task list of environments and bad env names to remove
+ envs_to_remove = [e for e in all_valid_envs if e.name in env_names_to_remove]
+ bad_env_names_to_remove = env_names_to_remove - {e.name for e in envs_to_remove}
+ for remove_env in envs_to_remove:
+ for env in all_valid_envs:
+ # don't check if an environment is included to itself
+ if env.name == remove_env.name:
+ continue
+
+ # check if an environment is included un another
+ if remove_env.path in env.included_concrete_envs:
+ msg = f"Environment '{remove_env.name}' is used by environment '{env.name}'"
+ if force:
+ tty.warn(msg)
+ else:
+ tty.error(msg)
+ envs_to_remove.remove(remove_env)
+
+ # ask the user if they really want to remove the known environments
+ # force should do the same as yes to all here following the symantics of rm
+ if not (yes_to_all or force) and (envs_to_remove or bad_env_names_to_remove):
+ environments = string.plural(len(env_names_to_remove), "environment", show_n=False)
+ envs = string.comma_and(list(env_names_to_remove))
+ answer = tty.get_yes_or_no(
+ f"Really {'remove' if remove else 'untrack'} {environments} {envs}?", default=False
+ )
+ if not answer:
+ tty.die("Will not remove any environments")
+
+ # keep track of the environments we remove for later printing the exit code
+ removed_env_names = []
+ for env in envs_to_remove:
+ name = env.name
+ if not force and env.active:
+ tty.error(
+ f"Environment '{name}' can't be "
+ f"{'removed' if remove else 'untracked'} while activated."
+ )
+ continue
+ # Get path to check if environment is a tracked / symlinked environment
+ if islink(env.path):
+ real_env_path = os.path.realpath(env.path)
+ os.unlink(env.path)
+ tty.msg(
+ f"Sucessfully untracked environment '{name}', "
+ "but it can still be found at:\n\n"
+ f" {real_env_path}\n"
+ )
+ else:
+ env.destroy()
+ tty.msg(f"Successfully removed environment '{name}'")
+
+ removed_env_names.append(env.name)
+
+ for bad_env_name in bad_env_names_to_remove:
+ shutil.rmtree(
+ spack.environment.environment.environment_dir_from_name(bad_env_name, exists_ok=True)
)
- tty.msg("Created environment '%s' in %s" % (name_or_path, env.path))
- tty.msg("You can activate this environment with:")
- tty.msg(" spack env activate %s" % (name_or_path))
- return env
+ tty.msg(f"Successfully removed environment '{bad_env_name}'")
+ removed_env_names.append(env.name)
+
+ # Following the design of linux rm we should exit with a status of 1
+ # anytime we cannot delete every environment the user asks for.
+ # However, we should still process all the environments we know about
+ # and delete them instead of failing on the first unknown enviornment.
+ if len(removed_env_names) < len(known_env_names):
+ sys.exit(1)
+
+
+#
+# env untrack
+#
+def env_untrack_setup_parser(subparser):
+ """track an environment from a directory in Spack"""
+ subparser.add_argument("env", nargs="+", help="tracked environment name")
+ subparser.add_argument(
+ "-f", "--force", action="store_true", help="force unlink even when environment is active"
+ )
+ arguments.add_common_arguments(subparser, ["yes_to_all"])
+
- env = ev.create_in_dir(
- name_or_path, init_file=init_file, with_view=with_view, keep_relative=keep_relative
+def env_untrack(args):
+ _env_untrack_or_remove(
+ env_names=args.env, force=args.force, yes_to_all=args.yes_to_all, remove=False
)
- tty.msg("Created environment in %s" % env.path)
- tty.msg("You can activate this environment with:")
- tty.msg(" spack env activate %s" % env.path)
- return env
#
# env remove
#
def env_remove_setup_parser(subparser):
- """remove an existing environment"""
- subparser.add_argument("rm_env", metavar="env", nargs="+", help="environment(s) to remove")
+ """remove managed environment(s)
+
+ remove existing environment(s) managed by Spack
+
+ directory environments and manifests embedded in repositories must be
+ removed manually
+ """
+ subparser.add_argument(
+ "rm_env", metavar="env", nargs="+", help="name(s) of the environment(s) being removed"
+ )
arguments.add_common_arguments(subparser, ["yes_to_all"])
+ subparser.add_argument(
+ "-f",
+ "--force",
+ action="store_true",
+ help="force removal even when included in other environment(s)",
+ )
def env_remove(args):
- """Remove a *named* environment.
+ """remove existing environment(s)"""
+ _env_untrack_or_remove(
+ env_names=args.rm_env, remove=True, force=args.force, yes_to_all=args.yes_to_all
+ )
- This removes an environment managed by Spack. Directory environments
- and manifests embedded in repositories should be removed manually.
+
+#
+# env rename
+#
+def env_rename_setup_parser(subparser):
+ """rename an existing environment
+
+ rename a managed environment or move an independent/directory environment
+
+ operation cannot be performed to or from an active environment
"""
- read_envs = []
- bad_envs = []
- for env_name in args.rm_env:
- try:
- env = ev.read(env_name)
- read_envs.append(env)
- except (spack.config.ConfigFormatError, ev.SpackEnvironmentConfigError):
- bad_envs.append(env_name)
+ subparser.add_argument(
+ "mv_from", metavar="from", help="current name or directory of the environment"
+ )
+ subparser.add_argument("mv_to", metavar="to", help="new name or directory for the environment")
+ subparser.add_argument(
+ "-d",
+ "--dir",
+ action="store_true",
+ help="positional arguments are environment directory paths",
+ )
+ subparser.add_argument(
+ "-f",
+ "--force",
+ action="store_true",
+ help="force renaming even if overwriting an existing environment",
+ )
- if not args.yes_to_all:
- environments = string.plural(len(args.rm_env), "environment", show_n=False)
- envs = string.comma_and(args.rm_env)
- answer = tty.get_yes_or_no(f"Really remove {environments} {envs}?", default=False)
- if not answer:
- tty.die("Will not remove any environments")
- for env in read_envs:
- name = env.name
- if env.active:
- tty.die(f"Environment {name} can't be removed while activated.")
- env.destroy()
- tty.msg(f"Successfully removed environment '{name}'")
+def env_rename(args):
+ """rename or move an existing environment"""
+
+ # Directory option has been specified
+ if args.dir:
+ if not ev.is_env_dir(args.mv_from):
+ tty.die("The specified path does not correspond to a valid spack environment")
+ from_path = Path(args.mv_from)
+ if not args.force:
+ if ev.is_env_dir(args.mv_to):
+ tty.die(
+ "The new path corresponds to an existing environment;"
+ " specify the --force flag to overwrite it."
+ )
+ if Path(args.mv_to).exists():
+ tty.die("The new path already exists; specify the --force flag to overwrite it.")
+ to_path = Path(args.mv_to)
+
+ # Name option being used
+ elif ev.exists(args.mv_from):
+ from_path = ev.environment.environment_dir_from_name(args.mv_from)
+ if not args.force and ev.exists(args.mv_to):
+ tty.die(
+ "The new name corresponds to an existing environment;"
+ " specify the --force flag to overwrite it."
+ )
+ to_path = ev.environment.root(args.mv_to)
+
+ # Neither
+ else:
+ tty.die("The specified name does not correspond to a managed spack environment")
- for bad_env_name in bad_envs:
- shutil.rmtree(
- spack.environment.environment.environment_dir_from_name(bad_env_name, exists_ok=True)
- )
- tty.msg(f"Successfully removed environment '{bad_env_name}'")
+ # Guard against renaming from or to an active environment
+ active_env = ev.active_environment()
+ if active_env:
+ from_env = ev.Environment(from_path)
+ if from_env.path == active_env.path:
+ tty.die("Cannot rename active environment")
+ if to_path == active_env.path:
+ tty.die(f"{args.mv_to} is an active environment")
+
+ shutil.rmtree(to_path, ignore_errors=True)
+ fs.rename(from_path, to_path)
+ tty.msg(f"Successfully renamed environment {args.mv_from} to {args.mv_to}")
#
# env list
#
def env_list_setup_parser(subparser):
- """list available environments"""
+ """list all managed environments"""
def env_list(args):
@@ -466,13 +780,14 @@ class ViewAction:
# env view
#
def env_view_setup_parser(subparser):
- """manage a view associated with the environment"""
+ """manage the environment's view
+
+ provide the path when enabling a view with a non-default path
+ """
subparser.add_argument(
"action", choices=ViewAction.actions(), help="action to take for the environment's view"
)
- subparser.add_argument(
- "view_path", nargs="?", help="when enabling a view, optionally set the path manually"
- )
+ subparser.add_argument("view_path", nargs="?", help="view's non-default path when enabling it")
def env_view(args):
@@ -500,7 +815,7 @@ def env_view(args):
# env status
#
def env_status_setup_parser(subparser):
- """print whether there is an active environment"""
+ """print active environment status"""
def env_status(args):
@@ -560,14 +875,22 @@ def env_loads(args):
def env_update_setup_parser(subparser):
- """update environments to the latest format"""
+ """update the environment manifest to the latest schema format
+
+ update the environment to the latest schema format, which may not be
+ readable by older versions of spack
+
+ a backup copy of the manifest is retained in case there is a need to revert
+ this operation
+ """
subparser.add_argument(
- metavar="env", dest="update_env", help="name or directory of the environment to activate"
+ metavar="env", dest="update_env", help="name or directory of the environment"
)
spack.cmd.common.arguments.add_common_arguments(subparser, ["yes_to_all"])
def env_update(args):
+ """update the manifest to the latest format"""
manifest_file = ev.manifest_file(args.update_env)
backup_file = manifest_file + ".bkp"
@@ -597,14 +920,22 @@ def env_update(args):
def env_revert_setup_parser(subparser):
- """restore environments to their state before update"""
+ """restore the environment manifest to its previous format
+
+ revert the environment's manifest to the schema format from its last
+ 'spack env update'
+
+ the current manifest will be overwritten by the backup copy and the backup
+ copy will be removed
+ """
subparser.add_argument(
- metavar="env", dest="revert_env", help="name or directory of the environment to activate"
+ metavar="env", dest="revert_env", help="name or directory of the environment"
)
spack.cmd.common.arguments.add_common_arguments(subparser, ["yes_to_all"])
def env_revert(args):
+ """restore the environment manifest to its previous format"""
manifest_file = ev.manifest_file(args.revert_env)
backup_file = manifest_file + ".bkp"
@@ -636,15 +967,19 @@ def env_revert(args):
def env_depfile_setup_parser(subparser):
- """generate a depfile from the concrete environment specs"""
+ """generate a depfile to exploit parallel builds across specs
+
+ requires the active environment to be concrete
+ """
subparser.add_argument(
"--make-prefix",
"--make-target-prefix",
default=None,
metavar="TARGET",
- help="prefix Makefile targets (and variables) with <TARGET>/<name>\n\nby default "
- "the absolute path to the directory makedeps under the environment metadata dir is "
- "used. can be set to an empty string --make-prefix ''",
+ help="prefix Makefile targets/variables with <TARGET>/<name>,\n"
+ "which can be an empty string (--make-prefix '')\n"
+ "defaults to the absolute path of the environment's makedeps\n"
+ "environment metadata dir\n",
)
subparser.add_argument(
"--make-disable-jobserver",
@@ -659,8 +994,8 @@ def env_depfile_setup_parser(subparser):
type=arguments.use_buildcache,
default="package:auto,dependencies:auto",
metavar="[{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]",
- help="when using `only`, redundant build dependencies are pruned from the DAG\n\n"
- "this flag is passed on to the generated spack install commands",
+ help="use `only` to prune redundant build dependencies\n"
+ "option is also passed to generated spack install commands",
)
subparser.add_argument(
"-o",
@@ -674,14 +1009,14 @@ def env_depfile_setup_parser(subparser):
"--generator",
default="make",
choices=("make",),
- help="specify the depfile type\n\ncurrently only make is supported",
+ help="specify the depfile type (only supports `make`)",
)
subparser.add_argument(
metavar="specs",
dest="specs",
nargs=argparse.REMAINDER,
default=None,
- help="generate a depfile only for matching specs in the environment",
+ help="limit the generated file to matching specs",
)
@@ -750,7 +1085,12 @@ def setup_parser(subparser):
setup_parser_cmd_name = "env_%s_setup_parser" % name
setup_parser_cmd = globals()[setup_parser_cmd_name]
- subsubparser = sp.add_parser(name, aliases=aliases, help=setup_parser_cmd.__doc__)
+ subsubparser = sp.add_parser(
+ name,
+ aliases=aliases,
+ description=setup_parser_cmd.__doc__,
+ help=spack.cmd.first_line(setup_parser_cmd.__doc__),
+ )
setup_parser_cmd(subsubparser)
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py
index 29be54ba64..ca32035cd7 100644
--- a/lib/spack/spack/cmd/external.py
+++ b/lib/spack/spack/cmd/external.py
@@ -7,7 +7,7 @@ import errno
import os
import re
import sys
-from typing import List, Optional
+from typing import List, Optional, Set
import llnl.util.tty as tty
import llnl.util.tty.colify as colify
@@ -18,7 +18,9 @@ import spack.config
import spack.cray_manifest as cray_manifest
import spack.detection
import spack.error
-import spack.util.environment
+import spack.package_base
+import spack.repo
+import spack.spec
from spack.cmd.common import arguments
description = "manage external packages in Spack configuration"
@@ -137,14 +139,26 @@ def external_find(args):
candidate_packages, path_hints=args.path, max_workers=args.jobs
)
- new_entries = spack.detection.update_configuration(
+ new_specs = spack.detection.update_configuration(
detected_packages, scope=args.scope, buildable=not args.not_buildable
)
- if new_entries:
+
+ # If the user runs `spack external find --not-buildable mpich` we also mark `mpi` non-buildable
+ # to avoid that the concretizer picks a different mpi provider.
+ if new_specs and args.not_buildable:
+ virtuals: Set[str] = {
+ virtual.name
+ for new_spec in new_specs
+ for virtual_specs in spack.repo.PATH.get_pkg_class(new_spec.name).provided.values()
+ for virtual in virtual_specs
+ }
+ new_virtuals = spack.detection.set_virtuals_nonbuildable(virtuals, scope=args.scope)
+ new_specs.extend(spack.spec.Spec(name) for name in new_virtuals)
+
+ if new_specs:
path = spack.config.CONFIG.get_config_filename(args.scope, "packages")
- msg = "The following specs have been detected on this system and added to {0}"
- tty.msg(msg.format(path))
- spack.cmd.display_specs(new_entries)
+ tty.msg(f"The following specs have been detected on this system and added to {path}")
+ spack.cmd.display_specs(new_specs)
else:
tty.msg("No new external packages detected")
@@ -152,9 +166,9 @@ def external_find(args):
def packages_to_search_for(
*, names: Optional[List[str]], tags: List[str], exclude: Optional[List[str]]
):
- result = []
- for current_tag in tags:
- result.extend(spack.repo.PATH.packages_with_tags(current_tag, full=True))
+ result = list(
+ {pkg for tag in tags for pkg in spack.repo.PATH.packages_with_tags(tag, full=True)}
+ )
if names:
# Match both fully qualified and unqualified
diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py
index 383c722ad6..ef831dd054 100644
--- a/lib/spack/spack/cmd/fetch.py
+++ b/lib/spack/spack/cmd/fetch.py
@@ -8,7 +8,6 @@ import llnl.util.tty as tty
import spack.cmd
import spack.config
import spack.environment as ev
-import spack.repo
import spack.traverse
from spack.cmd.common import arguments
@@ -18,7 +17,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
subparser.add_argument(
"-m",
"--missing",
@@ -28,7 +27,7 @@ def setup_parser(subparser):
subparser.add_argument(
"-D", "--dependencies", action="store_true", help="also fetch all dependencies"
)
- arguments.add_common_arguments(subparser, ["specs"])
+ arguments.add_concretizer_args(subparser)
subparser.epilog = (
"With an active environment, the specs "
"parameter can be omitted. In this case all (uninstalled"
@@ -40,9 +39,6 @@ def fetch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if args.specs:
specs = spack.cmd.parse_specs(args.specs, concretize=True)
else:
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py
index 070ac9bd0e..29ac155984 100644
--- a/lib/spack/spack/cmd/find.py
+++ b/lib/spack/spack/cmd/find.py
@@ -10,12 +10,15 @@ import llnl.util.lang
import llnl.util.tty as tty
import llnl.util.tty.color as color
-import spack.bootstrap
import spack.cmd as cmd
+import spack.config
import spack.environment as ev
import spack.repo
+import spack.spec
+import spack.store
from spack.cmd.common import arguments
-from spack.database import InstallStatuses
+
+from ..enums import InstallRecordStatus
description = "list and search installed packages"
section = "basic"
@@ -46,6 +49,10 @@ def setup_parser(subparser):
)
subparser.add_argument(
+ "-I", "--install-status", action="store_true", help="show install status of packages"
+ )
+
+ subparser.add_argument(
"-d", "--deps", action="store_true", help="output dependencies along with found specs"
)
@@ -70,6 +77,12 @@ def setup_parser(subparser):
arguments.add_common_arguments(subparser, ["long", "very_long", "tags", "namespaces"])
subparser.add_argument(
+ "-r",
+ "--only-roots",
+ action="store_true",
+ help="don't show full list of installed specs in an environment",
+ )
+ subparser.add_argument(
"-c",
"--show-concretized",
action="store_true",
@@ -125,20 +138,27 @@ def setup_parser(subparser):
subparser.add_argument(
"--loaded", action="store_true", help="show only packages loaded in the user environment"
)
- subparser.add_argument(
+ only_missing_or_deprecated = subparser.add_mutually_exclusive_group()
+ only_missing_or_deprecated.add_argument(
"-M",
"--only-missing",
action="store_true",
dest="only_missing",
help="show only missing dependencies",
)
+ only_missing_or_deprecated.add_argument(
+ "--only-deprecated", action="store_true", help="show only deprecated packages"
+ )
subparser.add_argument(
"--deprecated",
action="store_true",
help="show deprecated packages as well as installed specs",
)
subparser.add_argument(
- "--only-deprecated", action="store_true", help="show only deprecated packages"
+ "--install-tree",
+ action="store",
+ default="all",
+ help="Install trees to query: 'all' (default), 'local', 'upstream', upstream name or path",
)
subparser.add_argument("--start-date", help="earliest date of installation [YYYY-MM-DD]")
@@ -147,26 +167,41 @@ def setup_parser(subparser):
def query_arguments(args):
- # Set up query arguments.
- installed = []
- if not (args.only_missing or args.only_deprecated):
- installed.append(InstallStatuses.INSTALLED)
- if (args.deprecated or args.only_deprecated) and not args.only_missing:
- installed.append(InstallStatuses.DEPRECATED)
- if (args.missing or args.only_missing) and not args.only_deprecated:
- installed.append(InstallStatuses.MISSING)
-
- known = any
+ if args.only_missing and (args.deprecated or args.missing):
+ raise RuntimeError("cannot use --only-missing with --deprecated, or --missing")
+
+ if args.only_deprecated and (args.deprecated or args.missing):
+ raise RuntimeError("cannot use --only-deprecated with --deprecated, or --missing")
+
+ installed = InstallRecordStatus.INSTALLED
+ if args.only_missing:
+ installed = InstallRecordStatus.MISSING
+ elif args.only_deprecated:
+ installed = InstallRecordStatus.DEPRECATED
+
+ if args.missing:
+ installed |= InstallRecordStatus.MISSING
+
+ if args.deprecated:
+ installed |= InstallRecordStatus.DEPRECATED
+
+ predicate_fn = None
if args.unknown:
- known = False
+ predicate_fn = lambda x: not spack.repo.PATH.exists(x.spec.name)
- explicit = any
+ explicit = None
if args.explicit:
explicit = True
if args.implicit:
explicit = False
- q_args = {"installed": installed, "known": known, "explicit": explicit}
+ q_args = {"installed": installed, "predicate_fn": predicate_fn, "explicit": explicit}
+
+ install_tree = args.install_tree
+ upstreams = spack.config.get("upstreams", {})
+ if install_tree in upstreams.keys():
+ install_tree = upstreams[install_tree]["install_tree"]
+ q_args["install_tree"] = install_tree
# Time window of installation
for attribute in ("start_date", "end_date"):
@@ -177,44 +212,82 @@ def query_arguments(args):
return q_args
-def setup_env(env):
+def make_env_decorator(env):
"""Create a function for decorating specs when in an environment."""
- def strip_build(seq):
- return set(s.copy(deps=("link", "run")) for s in seq)
-
- added = set(strip_build(env.added_specs()))
- roots = set(strip_build(env.roots()))
- removed = set(strip_build(env.removed_specs()))
+ roots = set(env.roots())
+ removed = set(env.removed_specs())
def decorator(spec, fmt):
# add +/-/* to show added/removed/root specs
if any(spec.dag_hash() == r.dag_hash() for r in roots):
- return color.colorize("@*{%s}" % fmt)
+ return color.colorize(f"@*{{{fmt}}}")
elif spec in removed:
- return color.colorize("@K{%s}" % fmt)
+ return color.colorize(f"@K{{{fmt}}}")
else:
- return "%s" % fmt
+ return fmt
- return decorator, added, roots, removed
+ return decorator
def display_env(env, args, decorator, results):
"""Display extra find output when running in an environment.
- Find in an environment outputs 2 or 3 sections:
-
- 1. Root specs
- 2. Concretized roots (if asked for with -c)
- 3. Installed specs
+ In an environment, `spack find` outputs a preliminary section
+ showing the root specs of the environment (this is in addition
+ to the section listing out specs matching the query parameters).
"""
tty.msg("In environment %s" % env.name)
- if not env.user_specs:
- tty.msg("No root specs")
- else:
- tty.msg("Root specs")
+ num_roots = len(env.user_specs) or "No"
+ tty.msg(f"{num_roots} root specs")
+
+ concrete_specs = {
+ root: concrete_root
+ for root, concrete_root in zip(env.concretized_user_specs, env.concrete_roots())
+ }
+
+ def root_decorator(spec, string):
+ """Decorate root specs with their install status if needed"""
+ concrete = concrete_specs.get(spec)
+ if concrete:
+ status = color.colorize(concrete.install_status().value)
+ hash = concrete.dag_hash()
+ else:
+ status = color.colorize(spack.spec.InstallStatus.absent.value)
+ hash = "-" * 32
+
+ # TODO: status has two extra spaces on the end of it, but fixing this and other spec
+ # TODO: space format idiosyncrasies is complicated. Fix this eventually
+ status = status[:-2]
+
+ if args.long or args.very_long:
+ hash = color.colorize(f"@K{{{hash[: 7 if args.long else None]}}}")
+ return f"{status} {hash} {string}"
+ else:
+ return f"{status} {string}"
+
+ with spack.store.STORE.db.read_transaction():
+ cmd.display_specs(
+ env.user_specs,
+ args,
+ # these are overrides of CLI args
+ paths=False,
+ long=False,
+ very_long=False,
+ # these enforce details in the root specs to show what the user asked for
+ namespaces=True,
+ show_flags=True,
+ show_full_compiler=True,
+ decorator=root_decorator,
+ variants=True,
+ )
+
+ print()
+
+ if env.included_concrete_envs:
+ tty.msg("Included specs")
# Root specs cannot be displayed with prefixes, since those are not
# set for abstract specs. Same for hashes
@@ -224,65 +297,121 @@ def display_env(env, args, decorator, results):
# Roots are displayed with variants, etc. so that we can see
# specifically what the user asked for.
cmd.display_specs(
- env.user_specs,
+ env.included_user_specs,
root_args,
decorator=lambda s, f: color.colorize("@*{%s}" % f),
- namespaces=True,
+ namespace=True,
show_flags=True,
show_full_compiler=True,
variants=True,
)
print()
- if args.show_concretized:
- tty.msg("Concretized roots")
- cmd.display_specs(env.specs_by_hash.values(), args, decorator=decorator)
- print()
-
- # Display a header for the installed packages section IF there are installed
- # packages. If there aren't any, we'll just end up printing "0 installed packages"
- # later.
- if results:
- tty.msg("Installed packages")
-
-def find(parser, args):
+def _find_query(args, env):
q_args = query_arguments(args)
- results = args.specs(**q_args)
-
- env = ev.active_environment()
- decorator = lambda s, f: f
+ concretized_but_not_installed = list()
if env:
- decorator, _, roots, _ = setup_env(env)
+ all_env_specs = env.all_specs()
+ if args.constraint:
+ init_specs = cmd.parse_specs(args.constraint)
+ env_specs = env.all_matching_specs(*init_specs)
+ else:
+ env_specs = all_env_specs
+
+ spec_hashes = set(x.dag_hash() for x in env_specs)
+ specs_meeting_q_args = set(spack.store.STORE.db.query(hashes=spec_hashes, **q_args))
+
+ results = list()
+ with spack.store.STORE.db.read_transaction():
+ for spec in env_specs:
+ if not spec.installed:
+ concretized_but_not_installed.append(spec)
+ if spec in specs_meeting_q_args:
+ results.append(spec)
+ else:
+ results = args.specs(**q_args)
# use groups by default except with format.
if args.groups is None:
args.groups = not args.format
# Exit early with an error code if no package matches the constraint
- if not results and args.constraint:
- constraint_str = " ".join(str(s) for s in args.constraint_specs)
- tty.die(f"No package matches the query: {constraint_str}")
+ if concretized_but_not_installed and args.show_concretized:
+ pass
+ elif results:
+ pass
+ elif args.constraint:
+ raise cmd.NoSpecMatches()
# If tags have been specified on the command line, filter by tags
if args.tags:
packages_with_tags = spack.repo.PATH.packages_with_tags(*args.tags)
results = [x for x in results if x.name in packages_with_tags]
+ concretized_but_not_installed = [
+ x for x in concretized_but_not_installed if x.name in packages_with_tags
+ ]
if args.loaded:
- results = spack.cmd.filter_loaded_specs(results)
+ results = cmd.filter_loaded_specs(results)
+
+ return results, concretized_but_not_installed
+
+
+def find(parser, args):
+ env = ev.active_environment()
+
+ if not env and args.only_roots:
+ tty.die("-r / --only-roots requires an active environment")
+ if not env and args.show_concretized:
+ tty.die("-c / --show-concretized requires an active environment")
+
+ try:
+ results, concretized_but_not_installed = _find_query(args, env)
+ except cmd.NoSpecMatches:
+ # Note: this uses args.constraint vs. args.constraint_specs because
+ # the latter only exists if you call args.specs()
+ tty.die(f"No package matches the query: {' '.join(args.constraint)}")
+
+ if args.install_status or args.show_concretized:
+ status_fn = spack.spec.Spec.install_status
+ else:
+ status_fn = None
# Display the result
if args.json:
cmd.display_specs_as_json(results, deps=args.deps)
else:
+ decorator = make_env_decorator(env) if env else lambda s, f: f
+
if not args.format:
if env:
display_env(env, args, decorator, results)
- cmd.display_specs(results, args, decorator=decorator, all_headers=True)
+ if not args.only_roots:
+ display_results = list(results)
+ if args.show_concretized:
+ display_results += concretized_but_not_installed
+ cmd.display_specs(
+ display_results, args, decorator=decorator, all_headers=True, status_fn=status_fn
+ )
# print number of installed packages last (as the list may be long)
if sys.stdout.isatty() and args.groups:
+ installed_suffix = ""
+ concretized_suffix = " to be installed"
+
+ if args.only_roots:
+ installed_suffix += " (not shown)"
+ concretized_suffix += " (not shown)"
+ else:
+ if env and not args.show_concretized:
+ concretized_suffix += " (show with `spack find -c`)"
+
pkg_type = "loaded" if args.loaded else "installed"
- spack.cmd.print_how_many_pkgs(results, pkg_type)
+ cmd.print_how_many_pkgs(results, pkg_type, suffix=installed_suffix)
+
+ if env:
+ cmd.print_how_many_pkgs(
+ concretized_but_not_installed, "concretized", suffix=concretized_suffix
+ )
diff --git a/lib/spack/spack/cmd/gc.py b/lib/spack/spack/cmd/gc.py
index 7e55dc4240..63e7aacfb8 100644
--- a/lib/spack/spack/cmd/gc.py
+++ b/lib/spack/spack/cmd/gc.py
@@ -41,7 +41,7 @@ def setup_parser(subparser):
help="do not remove installed build-only dependencies of roots\n"
"(default is to keep only link & run dependencies)",
)
- spack.cmd.common.arguments.add_common_arguments(subparser, ["yes_to_all"])
+ spack.cmd.common.arguments.add_common_arguments(subparser, ["yes_to_all", "constraint"])
def roots_from_environments(args, active_env):
@@ -56,7 +56,6 @@ def roots_from_environments(args, active_env):
# -e says "also preserve things needed by this particular env"
for env_name_or_dir in args.except_environment:
- print("HMM", env_name_or_dir)
if ev.exists(env_name_or_dir):
env = ev.read(env_name_or_dir)
elif ev.is_env_dir(env_name_or_dir):
@@ -98,6 +97,12 @@ def gc(parser, args):
root_hashes = None
specs = spack.store.STORE.db.unused_specs(root_hashes=root_hashes, deptype=deptype)
+
+ # limit search to constraint specs if provided
+ if args.constraint:
+ hashes = set(spec.dag_hash() for spec in args.specs())
+ specs = [spec for spec in specs if spec.dag_hash() in hashes]
+
if not specs:
tty.msg("There are no unused specs. Spack's store is clean.")
return
diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py
index d05db0a61e..616755d832 100644
--- a/lib/spack/spack/cmd/gpg.py
+++ b/lib/spack/spack/cmd/gpg.py
@@ -5,10 +5,12 @@
import argparse
import os
+import tempfile
import spack.binary_distribution
-import spack.mirror
+import spack.mirrors.mirror
import spack.paths
+import spack.stage
import spack.util.gpg
import spack.util.url
from spack.cmd.common import arguments
@@ -115,6 +117,7 @@ def setup_parser(subparser):
help="URL of the mirror where keys will be published",
)
publish.add_argument(
+ "--update-index",
"--rebuild-index",
action="store_true",
default=False,
@@ -214,15 +217,16 @@ def gpg_publish(args):
mirror = None
if args.directory:
url = spack.util.url.path_to_file_url(args.directory)
- mirror = spack.mirror.Mirror(url, url)
+ mirror = spack.mirrors.mirror.Mirror(url, url)
elif args.mirror_name:
- mirror = spack.mirror.MirrorCollection(binary=True).lookup(args.mirror_name)
+ mirror = spack.mirrors.mirror.MirrorCollection(binary=True).lookup(args.mirror_name)
elif args.mirror_url:
- mirror = spack.mirror.Mirror(args.mirror_url, args.mirror_url)
+ mirror = spack.mirrors.mirror.Mirror(args.mirror_url, args.mirror_url)
- spack.binary_distribution.push_keys(
- mirror, keys=args.keys, regenerate_index=args.rebuild_index
- )
+ with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir:
+ spack.binary_distribution._url_push_keys(
+ mirror, keys=args.keys, tmpdir=tmpdir, update_index=args.update_index
+ )
def gpg(parser, args):
diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py
index f76e9dbeac..36a49a1ea0 100644
--- a/lib/spack/spack/cmd/graph.py
+++ b/lib/spack/spack/cmd/graph.py
@@ -18,7 +18,14 @@ level = "long"
def setup_parser(subparser):
setup_parser.parser = subparser
+ subparser.epilog = """
+Outside of an environment, the command concretizes specs and graphs them, unless the
+--installed option is given. In that case specs are matched from the current DB.
+If an environment is active, specs are matched from the currently available concrete specs
+in the lockfile.
+
+"""
method = subparser.add_mutually_exclusive_group()
method.add_argument(
"-a", "--ascii", action="store_true", help="draw graph as ascii to stdout (default)"
@@ -41,39 +48,40 @@ def setup_parser(subparser):
)
subparser.add_argument(
- "-i",
- "--installed",
- action="store_true",
- help="graph installed specs, or specs in the active env (implies --dot)",
+ "-i", "--installed", action="store_true", help="graph specs from the DB"
)
arguments.add_common_arguments(subparser, ["deptype", "specs"])
def graph(parser, args):
- if args.installed and args.specs:
- tty.die("cannot specify specs with --installed")
+ env = ev.active_environment()
+ if args.installed and env:
+ tty.die("cannot use --installed with an active environment")
if args.color and not args.dot:
tty.die("the --color option can be used only with --dot")
if args.installed:
- args.dot = True
- env = ev.active_environment()
- if env:
- specs = env.concrete_roots()
- else:
+ if not args.specs:
specs = spack.store.STORE.db.query()
+ else:
+ result = []
+ for item in args.specs:
+ result.extend(spack.store.STORE.db.query(item))
+ specs = list(set(result))
+ elif env:
+ specs = env.concrete_roots()
+ if args.specs:
+ specs = env.all_matching_specs(*args.specs)
else:
specs = spack.cmd.parse_specs(args.specs, concretize=not args.static)
if not specs:
- setup_parser.parser.print_help()
- return 1
+ tty.die("no spec matching the query")
if args.static:
- args.dot = True
static_graph_dot(specs, depflag=args.deptype)
return
diff --git a/lib/spack/spack/cmd/help.py b/lib/spack/spack/cmd/help.py
index d8e053f8ae..1a38d55cb6 100644
--- a/lib/spack/spack/cmd/help.py
+++ b/lib/spack/spack/cmd/help.py
@@ -30,6 +30,7 @@ spec expression syntax:
@c{@min:max} version range (inclusive)
@c{@min:} version <min> or higher
@c{@:max} up to version <max> (inclusive)
+ @c{@=version} exact version
compilers:
@g{%compiler} build with <compiler>
@@ -49,7 +50,7 @@ spec expression syntax:
@B{++}, @r{--}, @r{~~}, @B{==} propagate variants to package dependencies
architecture variants:
- @m{platform=platform} linux, darwin, cray, etc.
+ @m{platform=platform} linux, darwin, freebsd, windows
@m{os=operating_system} specific <operating_system>
@m{target=target} specific <target> processor
@m{arch=platform-os-target} shortcut for all three above
@@ -77,8 +78,8 @@ spec expression syntax:
boxlib @B{dim=2} boxlib built for 2 dimensions
libdwarf @g{%intel} ^libelf@g{%gcc}
libdwarf, built with intel compiler, linked to libelf built with gcc
- mvapich2 @g{%pgi} @B{fabrics=psm,mrail,sock}
- mvapich2, built with pgi compiler, with support for multiple fabrics
+ mvapich2 @g{%gcc} @B{fabrics=psm,mrail,sock}
+ mvapich2, built with gcc compiler, with support for multiple fabrics
"""
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py
index fd5ccc5087..25b113992d 100644
--- a/lib/spack/spack/cmd/info.py
+++ b/lib/spack/spack/cmd/info.py
@@ -11,12 +11,13 @@ import llnl.util.tty as tty
import llnl.util.tty.color as color
from llnl.util.tty.colify import colify
+import spack.builder
import spack.deptypes as dt
import spack.fetch_strategy as fs
import spack.install_test
import spack.repo
import spack.spec
-import spack.version
+import spack.variant
from spack.cmd.common import arguments
from spack.package_base import preferred_version
@@ -48,6 +49,7 @@ def setup_parser(subparser):
options = [
("--detectable", print_detectable.__doc__),
("--maintainers", print_maintainers.__doc__),
+ ("--namespace", print_namespace.__doc__),
("--no-dependencies", "do not " + print_dependencies.__doc__),
("--no-variants", "do not " + print_variants.__doc__),
("--no-versions", "do not " + print_versions.__doc__),
@@ -189,14 +191,25 @@ def print_maintainers(pkg, args):
color.cprint(section_title("Maintainers: ") + mnt)
+def print_namespace(pkg, args):
+ """output package namespace"""
+
+ repo = spack.repo.PATH.get_repo(pkg.namespace)
+ color.cprint("")
+ color.cprint(section_title("Namespace:"))
+ color.cprint(f" @c{{{repo.namespace}}} at {repo.root}")
+
+
def print_phases(pkg, args):
"""output installation phases"""
- if hasattr(pkg.builder, "phases") and pkg.builder.phases:
+ builder = spack.builder.create(pkg)
+
+ if hasattr(builder, "phases") and builder.phases:
color.cprint("")
color.cprint(section_title("Installation Phases:"))
phase_str = ""
- for phase in pkg.builder.phases:
+ for phase in builder.phases:
phase_str += " {0}".format(phase)
color.cprint(phase_str)
@@ -263,8 +276,8 @@ def _fmt_name_and_default(variant):
return color.colorize(f"@c{{{variant.name}}} @C{{[{_fmt_value(variant.default)}]}}")
-def _fmt_when(when, indent):
- return color.colorize(f"{indent * ' '}@B{{when}} {color.cescape(when)}")
+def _fmt_when(when: "spack.spec.Spec", indent: int):
+ return color.colorize(f"{indent * ' '}@B{{when}} {color.cescape(str(when))}")
def _fmt_variant_description(variant, width, indent):
@@ -323,26 +336,6 @@ def _fmt_variant(variant, max_name_default_len, indent, when=None, out=None):
out.write("\n")
-def _variants_by_name_when(pkg):
- """Adaptor to get variants keyed by { name: { when: { [Variant...] } }."""
- # TODO: replace with pkg.variants_by_name(when=True) when unified directive dicts are merged.
- variants = {}
- for name, (variant, whens) in sorted(pkg.variants.items()):
- for when in whens:
- variants.setdefault(name, {}).setdefault(when, []).append(variant)
- return variants
-
-
-def _variants_by_when_name(pkg):
- """Adaptor to get variants keyed by { when: { name: Variant } }"""
- # TODO: replace with pkg.variants when unified directive dicts are merged.
- variants = {}
- for name, (variant, whens) in pkg.variants.items():
- for when in whens:
- variants.setdefault(when, {})[name] = variant
- return variants
-
-
def _print_variants_header(pkg):
"""output variants"""
@@ -353,32 +346,22 @@ def _print_variants_header(pkg):
color.cprint("")
color.cprint(section_title("Variants:"))
- variants_by_name = _variants_by_name_when(pkg)
-
# Calculate the max length of the "name [default]" part of the variant display
# This lets us know where to print variant values.
max_name_default_len = max(
color.clen(_fmt_name_and_default(variant))
- for name, when_variants in variants_by_name.items()
- for variants in when_variants.values()
- for variant in variants
+ for name in pkg.variant_names()
+ for _, variant in pkg.variant_definitions(name)
)
- return max_name_default_len, variants_by_name
-
-
-def _unconstrained_ver_first(item):
- """sort key that puts specs with open version ranges first"""
- spec, _ = item
- return (spack.version.any_version not in spec.versions, spec)
+ return max_name_default_len
def print_variants_grouped_by_when(pkg):
- max_name_default_len, _ = _print_variants_header(pkg)
+ max_name_default_len = _print_variants_header(pkg)
indent = 4
- variants = _variants_by_when_name(pkg)
- for when, variants_by_name in sorted(variants.items(), key=_unconstrained_ver_first):
+ for when, variants_by_name in pkg.variant_items():
padded_values = max_name_default_len + 4
start_indent = indent
@@ -396,15 +379,14 @@ def print_variants_grouped_by_when(pkg):
def print_variants_by_name(pkg):
- max_name_default_len, variants_by_name = _print_variants_header(pkg)
+ max_name_default_len = _print_variants_header(pkg)
max_name_default_len += 4
indent = 4
- for name, when_variants in variants_by_name.items():
- for when, variants in sorted(when_variants.items(), key=_unconstrained_ver_first):
- for variant in variants:
- _fmt_variant(variant, max_name_default_len, indent, when, out=sys.stdout)
- sys.stdout.write("\n")
+ for name in pkg.variant_names():
+ for when, variant in pkg.variant_definitions(name):
+ _fmt_variant(variant, max_name_default_len, indent, when, out=sys.stdout)
+ sys.stdout.write("\n")
def print_variants(pkg, args):
@@ -441,7 +423,7 @@ def print_versions(pkg, args):
return "No URL"
url = get_url(preferred) if pkg.has_code else ""
- line = version(" {0}".format(pad(preferred))) + color.cescape(url)
+ line = version(" {0}".format(pad(preferred))) + color.cescape(str(url))
color.cwrite(line)
print()
@@ -464,7 +446,7 @@ def print_versions(pkg, args):
continue
for v, url in vers:
- line = version(" {0}".format(pad(v))) + color.cescape(url)
+ line = version(" {0}".format(pad(v))) + color.cescape(str(url))
color.cprint(line)
@@ -474,17 +456,8 @@ def print_virtuals(pkg, args):
color.cprint("")
color.cprint(section_title("Virtual Packages: "))
if pkg.provided:
- inverse_map = {}
- for spec, whens in pkg.provided.items():
- for when in whens:
- if when not in inverse_map:
- inverse_map[when] = set()
- inverse_map[when].add(spec)
- for when, specs in reversed(sorted(inverse_map.items())):
- line = " %s provides %s" % (
- when.colorized(),
- ", ".join(s.colorized() for s in specs),
- )
+ for when, specs in reversed(sorted(pkg.provided.items())):
+ line = " %s provides %s" % (when.cformat(), ", ".join(s.cformat() for s in specs))
print(line)
else:
@@ -503,13 +476,15 @@ def print_licenses(pkg, args):
pad = padder(pkg.licenses, 4)
for when_spec in pkg.licenses:
license_identifier = pkg.licenses[when_spec]
- line = license(" {0}".format(pad(license_identifier))) + color.cescape(when_spec)
+ line = license(" {0}".format(pad(license_identifier))) + color.cescape(
+ str(when_spec)
+ )
color.cprint(line)
def info(parser, args):
spec = spack.spec.Spec(args.package)
- pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
+ pkg_cls = spack.repo.PATH.get_pkg_class(spec.fullname)
pkg = pkg_cls(spec)
# Output core package information
@@ -529,6 +504,7 @@ def info(parser, args):
# Now output optional information in expected order
sections = [
(args.all or args.maintainers, print_maintainers),
+ (args.all or args.namespace, print_namespace),
(args.all or args.detectable, print_detectable),
(args.all or args.tags, print_tags),
(args.all or not args.no_versions, print_versions),
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 288d2cc354..5040032f2b 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -10,20 +10,18 @@ import sys
from typing import List
import llnl.util.filesystem as fs
+from llnl.string import plural
from llnl.util import lang, tty
-import spack.build_environment
import spack.cmd
import spack.config
import spack.environment as ev
-import spack.fetch_strategy
-import spack.package_base
import spack.paths
import spack.report
import spack.spec
import spack.store
from spack.cmd.common import arguments
-from spack.error import SpackError
+from spack.error import InstallError, SpackError
from spack.installer import PackageInstaller
description = "build and install packages"
@@ -61,7 +59,6 @@ def install_kwargs_from_args(args):
"dependencies_use_cache": cache_opt(args.use_cache, dep_use_bc),
"dependencies_cache_only": cache_opt(args.cache_only, dep_use_bc),
"include_build_deps": args.include_build_deps,
- "explicit": True, # Use true as a default for install command
"stop_at": args.until,
"unsigned": args.unsigned,
"install_deps": ("dependencies" in args.things_to_install),
@@ -176,7 +173,7 @@ def setup_parser(subparser):
dest="install_source",
help="install source files in prefix",
)
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum"])
subparser.add_argument(
"-v",
"--verbose",
@@ -287,14 +284,14 @@ def require_user_confirmation_for_overwrite(concrete_specs, args):
tty.die("Reinstallation aborted.")
-def _dump_log_on_error(e: spack.build_environment.InstallError):
+def _dump_log_on_error(e: InstallError):
e.print_context()
assert e.pkg, "Expected InstallError to include the associated package"
- if not os.path.exists(e.pkg.build_log_path):
+ if not os.path.exists(e.pkg.log_path):
tty.error("'spack install' created no log.")
else:
sys.stderr.write("Full build log:\n")
- with open(e.pkg.build_log_path, errors="replace") as log:
+ with open(e.pkg.log_path, errors="replace") as log:
shutil.copyfileobj(log, sys.stderr)
@@ -326,9 +323,6 @@ def install(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if args.log_file and not args.log_format:
msg = "the '--log-format' must be specified when using '--log-file'"
tty.die(msg)
@@ -355,7 +349,7 @@ def install(parser, args):
install_with_active_env(env, args, install_kwargs, reporter_factory)
else:
install_without_active_env(args, install_kwargs, reporter_factory)
- except spack.build_environment.InstallError as e:
+ except InstallError as e:
if args.show_log_on_error:
_dump_log_on_error(e)
raise
@@ -379,7 +373,9 @@ def _maybe_add_and_concretize(args, env, specs):
# `spack concretize`
tests = compute_tests_install_kwargs(env.user_specs, args.test)
concretized_specs = env.concretize(tests=tests)
- ev.display_specs(concretized_specs)
+ if concretized_specs:
+ tty.msg(f"Concretized {plural(len(concretized_specs), 'spec')}")
+ ev.display_specs([concrete for _, concrete in concretized_specs])
# save view regeneration for later, so that we only do it
# once, as it can be slow.
@@ -423,10 +419,9 @@ def install_with_active_env(env: ev.Environment, args, install_kwargs, reporter_
with reporter_factory(specs_to_install):
env.install_specs(specs_to_install, **install_kwargs)
finally:
- # TODO: this is doing way too much to trigger
- # views and modules to be generated.
- with env.write_transaction():
- env.write(regenerate=True)
+ if env.views:
+ with env.write_transaction():
+ env.write(regenerate=True)
def concrete_specs_from_cli(args, install_kwargs):
@@ -477,6 +472,7 @@ def install_without_active_env(args, install_kwargs, reporter_factory):
require_user_confirmation_for_overwrite(concrete_specs, args)
install_kwargs["overwrite"] = [spec.dag_hash() for spec in concrete_specs]
- installs = [(s.package, install_kwargs) for s in concrete_specs]
- builder = PackageInstaller(installs)
+ installs = [s.package for s in concrete_specs]
+ install_kwargs["explicit"] = [s.dag_hash() for s in concrete_specs]
+ builder = PackageInstaller(installs, **install_kwargs)
builder.install()
diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py
index 231e33dc51..d20621d324 100644
--- a/lib/spack/spack/cmd/list.py
+++ b/lib/spack/spack/cmd/list.py
@@ -41,6 +41,16 @@ def setup_parser(subparser):
help="optional case-insensitive glob patterns to filter results",
)
subparser.add_argument(
+ "-r",
+ "--repo",
+ "-N",
+ "--namespace",
+ dest="repos",
+ action="append",
+ default=[],
+ help="only list packages from the specified repo/namespace",
+ )
+ subparser.add_argument(
"-d",
"--search-description",
action="store_true",
@@ -282,9 +292,11 @@ def html(pkg_names, out):
out.write("<dd>\n")
out.write(
", ".join(
- d
- if d not in pkg_names
- else '<a class="reference internal" href="#%s">%s</a>' % (d, d)
+ (
+ d
+ if d not in pkg_names
+ else '<a class="reference internal" href="#%s">%s</a>' % (d, d)
+ )
for d in deps
)
)
@@ -307,7 +319,11 @@ def list(parser, args):
formatter = formatters[args.format]
# Retrieve the names of all the packages
- pkgs = set(spack.repo.all_package_names(args.virtuals))
+ repos = [spack.repo.PATH]
+ if args.repos:
+ repos = [spack.repo.PATH.get_repo(name) for name in args.repos]
+ pkgs = set().union(*[set(repo.all_package_names(args.virtuals)) for repo in repos])
+
# Filter the set appropriately
sorted_packages = filter_by_name(pkgs, args)
diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py
index a34b72ebb2..d88d4b771f 100644
--- a/lib/spack/spack/cmd/load.py
+++ b/lib/spack/spack/cmd/load.py
@@ -5,14 +5,11 @@
import sys
-import llnl.util.tty as tty
-
import spack.cmd
-import spack.cmd.find
+import spack.cmd.common
import spack.environment as ev
import spack.store
import spack.user_environment as uenv
-import spack.util.environment
from spack.cmd.common import arguments
description = "add package to the user environment"
@@ -71,16 +68,6 @@ def setup_parser(subparser):
)
subparser.add_argument(
- "--only",
- default="package,dependencies",
- dest="things_to_load",
- choices=["package", "dependencies"],
- help="select whether to load the package and its dependencies\n\n"
- "the default is to load the package and all dependencies. alternatively, "
- "one can decide to load only the package or only the dependencies",
- )
-
- subparser.add_argument(
"--list",
action="store_true",
default=False,
@@ -110,11 +97,6 @@ def load(parser, args):
)
return 1
- if args.things_to_load != "package,dependencies":
- tty.warn(
- "The `--only` flag in spack load is deprecated and will be removed in Spack v0.22"
- )
-
with spack.store.STORE.db.read_transaction():
env_mod = uenv.environment_modifications_for_specs(*specs)
for spec in specs:
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index d2bac9b9ba..d774784622 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -53,6 +53,7 @@ def setup_parser(subparser):
"-S", "--stages", action="store_true", help="top level stage directory"
)
directories.add_argument(
+ "-c",
"--source-dir",
action="store_true",
help="source directory for a spec (requires it to be staged first)",
diff --git a/lib/spack/spack/cmd/logs.py b/lib/spack/spack/cmd/logs.py
new file mode 100644
index 0000000000..9d5da880ed
--- /dev/null
+++ b/lib/spack/spack/cmd/logs.py
@@ -0,0 +1,71 @@
+# Copyright 2013-2024 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 errno
+import gzip
+import io
+import os
+import shutil
+import sys
+
+import spack.cmd
+import spack.spec
+import spack.util.compression as compression
+from spack.cmd.common import arguments
+from spack.main import SpackCommandError
+
+description = "print out logs for packages"
+section = "basic"
+level = "long"
+
+
+def setup_parser(subparser):
+ arguments.add_common_arguments(subparser, ["spec"])
+
+
+def _dump_byte_stream_to_stdout(instream: io.BufferedIOBase) -> None:
+ # Reopen stdout in binary mode so we don't have to worry about encoding
+ outstream = os.fdopen(sys.stdout.fileno(), "wb", closefd=False)
+ shutil.copyfileobj(instream, outstream)
+
+
+def _logs(cmdline_spec: spack.spec.Spec, concrete_spec: spack.spec.Spec):
+ if concrete_spec.installed:
+ log_path = concrete_spec.package.install_log_path
+ elif os.path.exists(concrete_spec.package.stage.path):
+ # TODO: `spack logs` can currently not show the logs while a package is being built, as the
+ # combined log file is only written after the build is finished.
+ log_path = concrete_spec.package.log_path
+ else:
+ raise SpackCommandError(f"{cmdline_spec} is not installed or staged")
+
+ try:
+ stream = open(log_path, "rb")
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ raise SpackCommandError(f"No logs are available for {cmdline_spec}") from e
+ raise SpackCommandError(f"Error reading logs for {cmdline_spec}: {e}") from e
+
+ with stream as f:
+ ext = compression.extension_from_magic_numbers_by_stream(f, decompress=False)
+ if ext and ext != "gz":
+ raise SpackCommandError(f"Unsupported storage format for {log_path}: {ext}")
+
+ # If the log file is gzip compressed, wrap it with a decompressor
+ _dump_byte_stream_to_stdout(gzip.GzipFile(fileobj=f) if ext == "gz" else f)
+
+
+def logs(parser, args):
+ specs = spack.cmd.parse_specs(args.spec)
+
+ if not specs:
+ raise SpackCommandError("You must supply a spec.")
+
+ if len(specs) != 1:
+ raise SpackCommandError("Too many specs. Supply only one.")
+
+ concrete_spec = spack.cmd.matching_spec_from_env(specs[0])
+
+ _logs(specs[0], concrete_spec)
diff --git a/lib/spack/spack/cmd/mark.py b/lib/spack/spack/cmd/mark.py
index cf816a21f5..f613522d2c 100644
--- a/lib/spack/spack/cmd/mark.py
+++ b/lib/spack/spack/cmd/mark.py
@@ -8,12 +8,10 @@ import sys
from llnl.util import tty
import spack.cmd
-import spack.error
-import spack.package_base
-import spack.repo
import spack.store
from spack.cmd.common import arguments
-from spack.database import InstallStatuses
+
+from ..enums import InstallRecordStatus
description = "mark packages as explicitly or implicitly installed"
section = "admin"
@@ -70,8 +68,7 @@ def find_matching_specs(specs, allow_multiple_matches=False):
has_errors = False
for spec in specs:
- install_query = [InstallStatuses.INSTALLED]
- matching = spack.store.STORE.db.query_local(spec, installed=install_query)
+ matching = spack.store.STORE.db.query_local(spec, installed=InstallRecordStatus.INSTALLED)
# For each spec provided, make sure it refers to only one package.
# Fail and ask user to be unambiguous if it doesn't
if not allow_multiple_matches and len(matching) > 1:
@@ -83,8 +80,8 @@ def find_matching_specs(specs, allow_multiple_matches=False):
has_errors = True
# No installed package matches the query
- if len(matching) == 0 and spec is not any:
- tty.die("{0} does not match any installed packages.".format(spec))
+ if len(matching) == 0 and spec is not None:
+ tty.die(f"{spec} does not match any installed packages.")
specs_from_cli.extend(matching)
@@ -101,8 +98,9 @@ def do_mark(specs, explicit):
specs (list): list of specs to be marked
explicit (bool): whether to mark specs as explicitly installed
"""
- for spec in specs:
- spack.store.STORE.db.update_explicit(spec, explicit)
+ with spack.store.STORE.db.write_transaction():
+ for spec in specs:
+ spack.store.STORE.db.mark(spec, "explicit", explicit)
def mark_specs(args, specs):
@@ -119,6 +117,6 @@ def mark(parser, args):
" Use `spack mark --all` to mark ALL packages.",
)
- # [any] here handles the --all case by forcing all specs to be returned
- specs = spack.cmd.parse_specs(args.specs) if args.specs else [any]
+ # [None] here handles the --all case by forcing all specs to be returned
+ specs = spack.cmd.parse_specs(args.specs) if args.specs else [None]
mark_specs(args, specs)
diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py
index fe9cafd545..d2891b1276 100644
--- a/lib/spack/spack/cmd/mirror.py
+++ b/lib/spack/spack/cmd/mirror.py
@@ -14,10 +14,10 @@ import spack.cmd
import spack.concretize
import spack.config
import spack.environment as ev
-import spack.mirror
+import spack.mirrors.mirror
+import spack.mirrors.utils
import spack.repo
import spack.spec
-import spack.util.path
import spack.util.web as web_util
from spack.cmd.common import arguments
from spack.error import SpackError
@@ -28,7 +28,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum"])
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="mirror_command")
@@ -71,7 +71,13 @@ def setup_parser(subparser):
help="the number of versions to fetch for each spec, choose 'all' to"
" retrieve all versions of each package",
)
+ create_parser.add_argument(
+ "--private",
+ action="store_true",
+ help="for a private mirror, include non-redistributable packages",
+ )
arguments.add_common_arguments(create_parser, ["specs"])
+ arguments.add_concretizer_args(create_parser)
# Destroy
destroy_parser = sp.add_parser("destroy", help=mirror_destroy.__doc__)
@@ -107,6 +113,11 @@ def setup_parser(subparser):
"and source use `--type binary --type source` (default)"
),
)
+ add_parser.add_argument(
+ "--autopush",
+ action="store_true",
+ help=("set mirror to push automatically after installation"),
+ )
add_parser_signed = add_parser.add_mutually_exclusive_group(required=False)
add_parser_signed.add_argument(
"--unsigned",
@@ -174,6 +185,21 @@ def setup_parser(subparser):
),
)
set_parser.add_argument("--url", help="url of mirror directory from 'spack mirror create'")
+ set_parser_autopush = set_parser.add_mutually_exclusive_group(required=False)
+ set_parser_autopush.add_argument(
+ "--autopush",
+ help="set mirror to push automatically after installation",
+ action="store_true",
+ default=None,
+ dest="autopush",
+ )
+ set_parser_autopush.add_argument(
+ "--no-autopush",
+ help="set mirror to not push automatically after installation",
+ action="store_false",
+ default=None,
+ dest="autopush",
+ )
set_parser_unsigned = set_parser.add_mutually_exclusive_group(required=False)
set_parser_unsigned.add_argument(
"--unsigned",
@@ -206,44 +232,149 @@ def setup_parser(subparser):
)
+def _configure_access_pair(
+ args, id_tok, id_variable_tok, secret_tok, secret_variable_tok, default=None
+):
+ """Configure the access_pair options"""
+
+ # Check if any of the arguments are set to update this access_pair.
+ # If none are set, then skip computing the new access pair
+ args_id = getattr(args, id_tok)
+ args_id_variable = getattr(args, id_variable_tok)
+ args_secret = getattr(args, secret_tok)
+ args_secret_variable = getattr(args, secret_variable_tok)
+ if not any([args_id, args_id_variable, args_secret, args_secret_variable]):
+ return None
+
+ def _default_value(id_):
+ if isinstance(default, list):
+ return default[0] if id_ == "id" else default[1]
+ elif isinstance(default, dict):
+ return default.get(id_)
+ else:
+ return None
+
+ def _default_variable(id_):
+ if isinstance(default, dict):
+ return default.get(id_ + "_variable")
+ else:
+ return None
+
+ id_ = None
+ id_variable = None
+ secret = None
+ secret_variable = None
+
+ # Get the value/default value if the argument of the inverse
+ if not args_id_variable:
+ id_ = getattr(args, id_tok) or _default_value("id")
+ if not args_id:
+ id_variable = getattr(args, id_variable_tok) or _default_variable("id")
+ if not args_secret_variable:
+ secret = getattr(args, secret_tok) or _default_value("secret")
+ if not args_secret:
+ secret_variable = getattr(args, secret_variable_tok) or _default_variable("secret")
+
+ if (id_ or id_variable) and (secret or secret_variable):
+ if secret:
+ if not id_:
+ raise SpackError("Cannot add mirror with a variable id and text secret")
+
+ return [id_, secret]
+ else:
+ return dict(
+ [
+ (("id", id_) if id_ else ("id_variable", id_variable)),
+ ("secret_variable", secret_variable),
+ ]
+ )
+ else:
+ if id_ or id_variable or secret or secret_variable is not None:
+ id_arg_tok = id_tok.replace("_", "-")
+ secret_arg_tok = secret_tok.replace("_", "-")
+ tty.warn(
+ "Expected both parts of the access pair to be specified. "
+ f"(i.e. --{id_arg_tok} and --{secret_arg_tok})"
+ )
+
+ return None
+
+
def mirror_add(args):
"""add a mirror to Spack"""
if (
args.s3_access_key_id
or args.s3_access_key_secret
or args.s3_access_token
+ or args.s3_access_key_id_variable
+ or args.s3_access_key_secret_variable
+ or args.s3_access_token_variable
or args.s3_profile
or args.s3_endpoint_url
or args.type
or args.oci_username
or args.oci_password
+ or args.oci_username_variable
+ or args.oci_password_variable
+ or args.autopush
or args.signed is not None
):
connection = {"url": args.url}
- if args.s3_access_key_id and args.s3_access_key_secret:
- connection["access_pair"] = [args.s3_access_key_id, args.s3_access_key_secret]
+ # S3 Connection
+ if args.s3_access_key_secret:
+ tty.warn(
+ "Configuring mirror secrets as plain text with --s3-access-key-secret is "
+ "deprecated. Use --s3-access-key-secret-variable instead"
+ )
+ if args.oci_password:
+ tty.warn(
+ "Configuring mirror secrets as plain text with --oci-password is deprecated. "
+ "Use --oci-password-variable instead"
+ )
+ access_pair = _configure_access_pair(
+ args,
+ "s3_access_key_id",
+ "s3_access_key_id_variable",
+ "s3_access_key_secret",
+ "s3_access_key_secret_variable",
+ )
+ if access_pair:
+ connection["access_pair"] = access_pair
+
if args.s3_access_token:
connection["access_token"] = args.s3_access_token
+ elif args.s3_access_token_variable:
+ connection["access_token_variable"] = args.s3_access_token_variable
+
if args.s3_profile:
connection["profile"] = args.s3_profile
+
if args.s3_endpoint_url:
connection["endpoint_url"] = args.s3_endpoint_url
- if args.oci_username and args.oci_password:
- connection["access_pair"] = [args.oci_username, args.oci_password]
+
+ # OCI Connection
+ access_pair = _configure_access_pair(
+ args, "oci_username", "oci_username_variable", "oci_password", "oci_password_variable"
+ )
+ if access_pair:
+ connection["access_pair"] = access_pair
+
if args.type:
connection["binary"] = "binary" in args.type
connection["source"] = "source" in args.type
+ if args.autopush:
+ connection["autopush"] = args.autopush
if args.signed is not None:
connection["signed"] = args.signed
- mirror = spack.mirror.Mirror(connection, name=args.name)
+ mirror = spack.mirrors.mirror.Mirror(connection, name=args.name)
else:
- mirror = spack.mirror.Mirror(args.url, name=args.name)
- spack.mirror.add(mirror, args.scope)
+ mirror = spack.mirrors.mirror.Mirror(args.url, name=args.name)
+ spack.mirrors.utils.add(mirror, args.scope)
def mirror_remove(args):
"""remove a mirror by name"""
- spack.mirror.remove(args.name, args.scope)
+ spack.mirrors.utils.remove(args.name, args.scope)
def _configure_mirror(args):
@@ -252,23 +383,44 @@ def _configure_mirror(args):
if args.name not in mirrors:
tty.die(f"No mirror found with name {args.name}.")
- entry = spack.mirror.Mirror(mirrors[args.name], args.name)
+ entry = spack.mirrors.mirror.Mirror(mirrors[args.name], args.name)
direction = "fetch" if args.fetch else "push" if args.push else None
changes = {}
if args.url:
changes["url"] = args.url
- if args.s3_access_key_id and args.s3_access_key_secret:
- changes["access_pair"] = [args.s3_access_key_id, args.s3_access_key_secret]
+
+ default_access_pair = entry._get_value("access_pair", direction or "fetch")
+ # TODO: Init access_pair args with the fetch/push/base values in the current mirror state
+ access_pair = _configure_access_pair(
+ args,
+ "s3_access_key_id",
+ "s3_access_key_id_variable",
+ "s3_access_key_secret",
+ "s3_access_key_secret_variable",
+ default=default_access_pair,
+ )
+ if access_pair:
+ changes["access_pair"] = access_pair
if args.s3_access_token:
changes["access_token"] = args.s3_access_token
if args.s3_profile:
changes["profile"] = args.s3_profile
if args.s3_endpoint_url:
changes["endpoint_url"] = args.s3_endpoint_url
- if args.oci_username and args.oci_password:
- changes["access_pair"] = [args.oci_username, args.oci_password]
+ access_pair = _configure_access_pair(
+ args,
+ "oci_username",
+ "oci_username_variable",
+ "oci_password",
+ "oci_password_variable",
+ default=default_access_pair,
+ )
+ if access_pair:
+ changes["access_pair"] = access_pair
if getattr(args, "signed", None) is not None:
changes["signed"] = args.signed
+ if getattr(args, "autopush", None) is not None:
+ changes["autopush"] = args.autopush
# argparse cannot distinguish between --binary and --no-binary when same dest :(
# notice that set-url does not have these args, so getattr
@@ -298,7 +450,7 @@ def mirror_set_url(args):
def mirror_list(args):
"""print out available mirrors to the console"""
- mirrors = spack.mirror.MirrorCollection(scope=args.scope)
+ mirrors = spack.mirrors.mirror.MirrorCollection(scope=args.scope)
if not mirrors:
tty.msg("No mirrors configured.")
return
@@ -333,15 +485,14 @@ def concrete_specs_from_user(args):
specs = filter_externals(specs)
specs = list(set(specs))
specs.sort(key=lambda s: (s.name, s.version))
- specs, _ = lang.stable_partition(specs, predicate_fn=not_excluded_fn(args))
return specs
def extend_with_additional_versions(specs, num_versions):
if num_versions == "all":
- mirror_specs = spack.mirror.get_all_versions(specs)
+ mirror_specs = spack.mirrors.utils.get_all_versions(specs)
else:
- mirror_specs = spack.mirror.get_matching_versions(specs, num_versions=num_versions)
+ mirror_specs = spack.mirrors.utils.get_matching_versions(specs, num_versions=num_versions)
mirror_specs = [x.concretized() for x in mirror_specs]
return mirror_specs
@@ -378,36 +529,50 @@ def concrete_specs_from_cli_or_file(args):
return specs
-def not_excluded_fn(args):
- """Return a predicate that evaluate to True if a spec was not explicitly
- excluded by the user.
- """
- exclude_specs = []
- if args.exclude_file:
- exclude_specs.extend(specs_from_text_file(args.exclude_file, concretize=False))
- if args.exclude_specs:
- exclude_specs.extend(spack.cmd.parse_specs(str(args.exclude_specs).split()))
-
- def not_excluded(x):
- return not any(x.satisfies(y) for y in exclude_specs)
+class IncludeFilter:
+ def __init__(self, args):
+ self.exclude_specs = []
+ if args.exclude_file:
+ self.exclude_specs.extend(specs_from_text_file(args.exclude_file, concretize=False))
+ if args.exclude_specs:
+ self.exclude_specs.extend(spack.cmd.parse_specs(str(args.exclude_specs).split()))
+ self.private = args.private
+
+ def __call__(self, x):
+ return all([self._not_license_excluded(x), self._not_cmdline_excluded(x)])
+
+ def _not_license_excluded(self, x):
+ """True if the spec is for a private mirror, or as long as the
+ package does not explicitly forbid redistributing source."""
+ if self.private:
+ return True
+ elif x.package_class.redistribute_source(x):
+ return True
+ else:
+ tty.debug(
+ "Skip adding {0} to mirror: the package.py file"
+ " indicates that a public mirror should not contain"
+ " it.".format(x.name)
+ )
+ return False
- return not_excluded
+ def _not_cmdline_excluded(self, x):
+ """True if a spec was not explicitly excluded by the user."""
+ return not any(x.satisfies(y) for y in self.exclude_specs)
-def concrete_specs_from_environment(selection_fn):
+def concrete_specs_from_environment():
env = ev.active_environment()
assert env, "an active environment is required"
mirror_specs = env.all_specs()
mirror_specs = filter_externals(mirror_specs)
- mirror_specs, _ = lang.stable_partition(mirror_specs, predicate_fn=selection_fn)
return mirror_specs
-def all_specs_with_all_versions(selection_fn):
+def all_specs_with_all_versions():
specs = [spack.spec.Spec(n) for n in spack.repo.all_package_names()]
- mirror_specs = spack.mirror.get_all_versions(specs)
+ mirror_specs = spack.mirrors.utils.get_all_versions(specs)
mirror_specs.sort(key=lambda s: (s.name, s.version))
- mirror_specs, _ = lang.stable_partition(mirror_specs, predicate_fn=selection_fn)
return mirror_specs
@@ -428,12 +593,6 @@ def versions_per_spec(args):
return num_versions
-def create_mirror_for_individual_specs(mirror_specs, path, skip_unstable_versions):
- present, mirrored, error = spack.mirror.create(path, mirror_specs, skip_unstable_versions)
- tty.msg("Summary for mirror in {}".format(path))
- process_mirror_stats(present, mirrored, error)
-
-
def process_mirror_stats(present, mirrored, error):
p, m, e = len(present), len(mirrored), len(error)
tty.msg(
@@ -479,46 +638,45 @@ def mirror_create(args):
# When no directory is provided, the source dir is used
path = args.directory or spack.caches.fetch_cache_location()
- if args.all and not ev.active_environment():
- create_mirror_for_all_specs(
- path=path,
- skip_unstable_versions=args.skip_unstable_versions,
- selection_fn=not_excluded_fn(args),
- )
- return
+ mirror_specs, mirror_fn = _specs_and_action(args)
+ mirror_fn(mirror_specs, path=path, skip_unstable_versions=args.skip_unstable_versions)
- if args.all and ev.active_environment():
- create_mirror_for_all_specs_inside_environment(
- path=path,
- skip_unstable_versions=args.skip_unstable_versions,
- selection_fn=not_excluded_fn(args),
- )
- return
- mirror_specs = concrete_specs_from_user(args)
- create_mirror_for_individual_specs(
- mirror_specs, path=path, skip_unstable_versions=args.skip_unstable_versions
- )
+def _specs_and_action(args):
+ include_fn = IncludeFilter(args)
+ if args.all and not ev.active_environment():
+ mirror_specs = all_specs_with_all_versions()
+ mirror_fn = create_mirror_for_all_specs
+ elif args.all and ev.active_environment():
+ mirror_specs = concrete_specs_from_environment()
+ mirror_fn = create_mirror_for_individual_specs
+ else:
+ mirror_specs = concrete_specs_from_user(args)
+ mirror_fn = create_mirror_for_individual_specs
-def create_mirror_for_all_specs(path, skip_unstable_versions, selection_fn):
- mirror_specs = all_specs_with_all_versions(selection_fn=selection_fn)
- mirror_cache, mirror_stats = spack.mirror.mirror_cache_and_stats(
+ mirror_specs, _ = lang.stable_partition(mirror_specs, predicate_fn=include_fn)
+ return mirror_specs, mirror_fn
+
+
+def create_mirror_for_all_specs(mirror_specs, path, skip_unstable_versions):
+ mirror_cache, mirror_stats = spack.mirrors.utils.mirror_cache_and_stats(
path, skip_unstable_versions=skip_unstable_versions
)
for candidate in mirror_specs:
pkg_cls = spack.repo.PATH.get_pkg_class(candidate.name)
pkg_obj = pkg_cls(spack.spec.Spec(candidate))
mirror_stats.next_spec(pkg_obj.spec)
- spack.mirror.create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats)
+ spack.mirrors.utils.create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats)
process_mirror_stats(*mirror_stats.stats())
-def create_mirror_for_all_specs_inside_environment(path, skip_unstable_versions, selection_fn):
- mirror_specs = concrete_specs_from_environment(selection_fn=selection_fn)
- create_mirror_for_individual_specs(
- mirror_specs, path=path, skip_unstable_versions=skip_unstable_versions
+def create_mirror_for_individual_specs(mirror_specs, path, skip_unstable_versions):
+ present, mirrored, error = spack.mirrors.utils.create(
+ path, mirror_specs, skip_unstable_versions
)
+ tty.msg("Summary for mirror in {}".format(path))
+ process_mirror_stats(present, mirrored, error)
def mirror_destroy(args):
@@ -526,7 +684,7 @@ def mirror_destroy(args):
mirror_url = None
if args.mirror_name:
- result = spack.mirror.MirrorCollection().lookup(args.mirror_name)
+ result = spack.mirrors.mirror.MirrorCollection().lookup(args.mirror_name)
mirror_url = result.push_url
elif args.mirror_url:
mirror_url = args.mirror_url
@@ -549,7 +707,4 @@ def mirror(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
action[args.mirror_command](args)
diff --git a/lib/spack/spack/cmd/modules/__init__.py b/lib/spack/spack/cmd/modules/__init__.py
index 1cb04189b9..013f4723db 100644
--- a/lib/spack/spack/cmd/modules/__init__.py
+++ b/lib/spack/spack/cmd/modules/__init__.py
@@ -15,9 +15,11 @@ from llnl.util.tty import color
import spack.cmd
import spack.config
+import spack.error
import spack.modules
import spack.modules.common
import spack.repo
+from spack.cmd import MultipleSpecsMatch, NoSpecMatches
from spack.cmd.common import arguments
description = "manipulate module files"
@@ -90,18 +92,6 @@ def add_loads_arguments(subparser):
arguments.add_common_arguments(subparser, ["recurse_dependencies"])
-class MultipleSpecsMatch(Exception):
- """Raised when multiple specs match a constraint, in a context where
- this is not allowed.
- """
-
-
-class NoSpecMatches(Exception):
- """Raised when no spec matches a constraint, in a context where
- this is not allowed.
- """
-
-
def one_spec_or_raise(specs):
"""Ensures exactly one spec has been selected, or raises the appropriate
exception.
@@ -124,13 +114,13 @@ def check_module_set_name(name):
names = [k for k in modules if k != "prefix_inspections"]
if not names:
- raise spack.config.ConfigError(
+ raise spack.error.ConfigError(
f"Module set configuration is missing. Cannot use module set '{name}'"
)
pretty_names = "', '".join(names)
- raise spack.config.ConfigError(
+ raise spack.error.ConfigError(
f"Cannot use invalid module set '{name}'.",
f"Valid module set names are: '{pretty_names}'.",
)
@@ -172,7 +162,7 @@ def loads(module_type, specs, args, out=None):
modules = list(
(
spec,
- spack.modules.common.get_module(
+ spack.modules.get_module(
module_type,
spec,
get_full_path=False,
@@ -221,7 +211,7 @@ def find(module_type, specs, args):
try:
modules = [
- spack.modules.common.get_module(
+ spack.modules.get_module(
module_type,
spec,
args.full_path,
@@ -232,7 +222,7 @@ def find(module_type, specs, args):
]
modules.append(
- spack.modules.common.get_module(
+ spack.modules.get_module(
module_type,
single_spec,
args.full_path,
@@ -377,7 +367,10 @@ callbacks = {"refresh": refresh, "rm": rm, "find": find, "loads": loads}
def modules_cmd(parser, args, module_type, callbacks=callbacks):
# Qualifiers to be used when querying the db for specs
constraint_qualifiers = {
- "refresh": {"installed": True, "known": lambda x: not spack.repo.PATH.exists(x)}
+ "refresh": {
+ "installed": True,
+ "predicate_fn": lambda x: spack.repo.PATH.exists(x.spec.name),
+ }
}
query_args = constraint_qualifiers.get(args.subparser_name, {})
diff --git a/lib/spack/spack/cmd/modules/lmod.py b/lib/spack/spack/cmd/modules/lmod.py
index 4fd6992a47..3f2f7d2ec0 100644
--- a/lib/spack/spack/cmd/modules/lmod.py
+++ b/lib/spack/spack/cmd/modules/lmod.py
@@ -8,6 +8,7 @@ import functools
import spack.cmd.common.arguments
import spack.cmd.modules
import spack.config
+import spack.modules
import spack.modules.lmod
diff --git a/lib/spack/spack/cmd/modules/tcl.py b/lib/spack/spack/cmd/modules/tcl.py
index 4ca8ece704..e31d5bcc46 100644
--- a/lib/spack/spack/cmd/modules/tcl.py
+++ b/lib/spack/spack/cmd/modules/tcl.py
@@ -7,6 +7,7 @@ import functools
import spack.cmd.common.arguments
import spack.cmd.modules
import spack.config
+import spack.modules
import spack.modules.tcl
diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py
index e9aac661a2..dbd18f7948 100644
--- a/lib/spack/spack/cmd/patch.py
+++ b/lib/spack/spack/cmd/patch.py
@@ -9,7 +9,6 @@ import spack.cmd
import spack.config
import spack.environment as ev
import spack.package_base
-import spack.repo
import spack.traverse
from spack.cmd.common import arguments
@@ -19,7 +18,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated", "specs"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
arguments.add_concretizer_args(subparser)
@@ -33,12 +32,10 @@ def patch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
specs = spack.cmd.parse_specs(args.specs, concretize=False)
+ specs = spack.cmd.matching_specs_from_env(specs)
for spec in specs:
- _patch(spack.cmd.matching_spec_from_env(spec).package)
+ _patch(spec.package)
def _patch_env(env: ev.Environment):
diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py
index e4e616db56..fa4084437f 100644
--- a/lib/spack/spack/cmd/pkg.py
+++ b/lib/spack/spack/cmd/pkg.py
@@ -12,7 +12,6 @@ import llnl.util.tty as tty
from llnl.util.tty.colify import colify
import spack.cmd
-import spack.paths
import spack.repo
import spack.util.executable as exe
import spack.util.package_hash as ph
@@ -169,7 +168,9 @@ def pkg_hash(args):
def get_grep(required=False):
"""Get a grep command to use with ``spack pkg grep``."""
- return exe.which(os.environ.get("SPACK_GREP") or "grep", required=required)
+ grep = exe.which(os.environ.get("SPACK_GREP") or "grep", required=required)
+ grep.ignore_quotes = True # allow `spack pkg grep '"quoted string"'` without warning
+ return grep
def pkg_grep(args, unknown_args):
diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py
index 71ce88eed6..6f96234642 100644
--- a/lib/spack/spack/cmd/python.py
+++ b/lib/spack/spack/cmd/python.py
@@ -78,8 +78,8 @@ def python(parser, args, unknown_args):
# Run user choice of interpreter
if args.python_interpreter == "ipython":
- return spack.cmd.python.ipython_interpreter(args)
- return spack.cmd.python.python_interpreter(args)
+ return ipython_interpreter(args)
+ return python_interpreter(args)
def ipython_interpreter(args):
@@ -116,39 +116,38 @@ def ipython_interpreter(args):
def python_interpreter(args):
"""A python interpreter is the default interpreter"""
- # Fake a main python shell by setting __name__ to __main__.
- console = code.InteractiveConsole({"__name__": "__main__", "spack": spack})
- if "PYTHONSTARTUP" in os.environ:
- startup_file = os.environ["PYTHONSTARTUP"]
- if os.path.isfile(startup_file):
- with open(startup_file) as startup:
- console.runsource(startup.read(), startup_file, "exec")
- if args.python_command:
- propagate_exceptions_from(console)
- console.runsource(args.python_command)
- elif args.python_args:
- propagate_exceptions_from(console)
+ if args.python_args and not args.python_command:
sys.argv = args.python_args
- with open(args.python_args[0]) as file:
- console.runsource(file.read(), args.python_args[0], "exec")
+ runpy.run_path(args.python_args[0], run_name="__main__")
else:
- # Provides readline support, allowing user to use arrow keys
- console.push("import readline")
- # Provide tabcompletion
- console.push("from rlcompleter import Completer")
- console.push("readline.set_completer(Completer(locals()).complete)")
- console.push('readline.parse_and_bind("tab: complete")')
-
- console.interact(
- "Spack version %s\nPython %s, %s %s"
- % (
- spack.spack_version,
- platform.python_version(),
- platform.system(),
- platform.machine(),
+ # Fake a main python shell by setting __name__ to __main__.
+ console = code.InteractiveConsole({"__name__": "__main__", "spack": spack})
+ if "PYTHONSTARTUP" in os.environ:
+ startup_file = os.environ["PYTHONSTARTUP"]
+ if os.path.isfile(startup_file):
+ with open(startup_file) as startup:
+ console.runsource(startup.read(), startup_file, "exec")
+ if args.python_command:
+ propagate_exceptions_from(console)
+ console.runsource(args.python_command)
+ else:
+ # Provides readline support, allowing user to use arrow keys
+ console.push("import readline")
+ # Provide tabcompletion
+ console.push("from rlcompleter import Completer")
+ console.push("readline.set_completer(Completer(locals()).complete)")
+ console.push('readline.parse_and_bind("tab: complete")')
+
+ console.interact(
+ "Spack version %s\nPython %s, %s %s"
+ % (
+ spack.spack_version,
+ platform.python_version(),
+ platform.system(),
+ platform.machine(),
+ )
)
- )
def propagate_exceptions_from(console):
diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py
index 68af91cd91..e41e21f0a5 100644
--- a/lib/spack/spack/cmd/repo.py
+++ b/lib/spack/spack/cmd/repo.py
@@ -91,7 +91,7 @@ def repo_add(args):
tty.die("Not a Spack repository: %s" % path)
# Make sure it's actually a spack repository by constructing it.
- repo = spack.repo.Repo(canon_path)
+ repo = spack.repo.from_path(canon_path)
# If that succeeds, finally add it to the configuration.
repos = spack.config.get("repos", scope=args.scope)
@@ -124,7 +124,7 @@ def repo_remove(args):
# If it is a namespace, remove corresponding repo
for path in repos:
try:
- repo = spack.repo.Repo(path)
+ repo = spack.repo.from_path(path)
if repo.namespace == namespace_or_path:
repos.remove(path)
spack.config.set("repos", repos, args.scope)
@@ -142,7 +142,7 @@ def repo_list(args):
repos = []
for r in roots:
try:
- repos.append(spack.repo.Repo(r))
+ repos.append(spack.repo.from_path(r))
except spack.repo.RepoError:
continue
diff --git a/lib/spack/spack/cmd/restage.py b/lib/spack/spack/cmd/restage.py
index a21317405c..d3d596fa12 100644
--- a/lib/spack/spack/cmd/restage.py
+++ b/lib/spack/spack/cmd/restage.py
@@ -6,7 +6,6 @@
import llnl.util.tty as tty
import spack.cmd
-import spack.repo
from spack.cmd.common import arguments
description = "revert checked out package source code"
diff --git a/lib/spack/spack/cmd/solve.py b/lib/spack/spack/cmd/solve.py
index 9b03e596ed..8adc06fdfb 100644
--- a/lib/spack/spack/cmd/solve.py
+++ b/lib/spack/spack/cmd/solve.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import argparse
import re
import sys
@@ -12,12 +11,12 @@ import llnl.util.tty.color as color
import spack
import spack.cmd
+import spack.cmd.spec
import spack.config
import spack.environment
import spack.hash_types as ht
-import spack.package_base
import spack.solver.asp as asp
-from spack.cmd.common import arguments
+import spack.spec
description = "concretize a specs using an ASP solver"
section = "developer"
@@ -40,42 +39,6 @@ def setup_parser(subparser):
" solutions models found by asp program\n"
" all all of the above",
)
-
- # Below are arguments w.r.t. spec display (like spack spec)
- arguments.add_common_arguments(subparser, ["long", "very_long", "namespaces"])
-
- install_status_group = subparser.add_mutually_exclusive_group()
- arguments.add_common_arguments(install_status_group, ["install_status", "no_install_status"])
-
- subparser.add_argument(
- "-y",
- "--yaml",
- action="store_const",
- dest="format",
- default=None,
- const="yaml",
- help="print concrete spec as yaml",
- )
- subparser.add_argument(
- "-j",
- "--json",
- action="store_const",
- dest="format",
- default=None,
- const="json",
- help="print concrete spec as json",
- )
- subparser.add_argument(
- "-c",
- "--cover",
- action="store",
- default="nodes",
- choices=["nodes", "edges", "paths"],
- help="how extensively to traverse the DAG (default: nodes)",
- )
- subparser.add_argument(
- "-t", "--types", action="store_true", default=False, help="show dependency types"
- )
subparser.add_argument(
"--timers",
action="store_true",
@@ -85,13 +48,11 @@ def setup_parser(subparser):
subparser.add_argument(
"--stats", action="store_true", default=False, help="print out statistics from clingo"
)
- subparser.add_argument("specs", nargs=argparse.REMAINDER, help="specs of packages")
- spack.cmd.common.arguments.add_concretizer_args(subparser)
+ spack.cmd.spec.setup_parser(subparser)
def _process_result(result, show, required_format, kwargs):
- result.raise_if_unsat()
opt, _, _ = min(result.answers)
if ("opt" in show) and (not required_format):
tty.msg("Best of %d considered solutions." % result.nmodels)
@@ -115,22 +76,20 @@ def _process_result(result, show, required_format, kwargs):
# dump the solutions as concretized specs
if "solutions" in show:
- for spec in result.specs:
- # With -y, just print YAML to output.
- if required_format == "yaml":
- # use write because to_yaml already has a newline.
- sys.stdout.write(spec.to_yaml(hash=ht.dag_hash))
- elif required_format == "json":
- sys.stdout.write(spec.to_json(hash=ht.dag_hash))
- else:
- sys.stdout.write(spec.tree(color=sys.stdout.isatty(), **kwargs))
+ if required_format:
+ for spec in result.specs:
+ # With -y, just print YAML to output.
+ if required_format == "yaml":
+ # use write because to_yaml already has a newline.
+ sys.stdout.write(spec.to_yaml(hash=ht.dag_hash))
+ elif required_format == "json":
+ sys.stdout.write(spec.to_json(hash=ht.dag_hash))
+ else:
+ sys.stdout.write(spack.spec.tree(result.specs, color=sys.stdout.isatty(), **kwargs))
print()
if result.unsolved_specs and "solutions" in show:
- tty.msg("Unsolved specs")
- for spec in result.unsolved_specs:
- print(spec)
- print()
+ tty.msg(asp.Result.format_unsolved(result.unsolved_specs))
def solve(parser, args):
@@ -166,11 +125,12 @@ def solve(parser, args):
# If we have an active environment, pick the specs from there
env = spack.environment.active_environment()
- if env and args.specs:
- msg = "cannot give explicit specs when an environment is active"
- raise RuntimeError(msg)
-
- specs = list(env.user_specs) if env else spack.cmd.parse_specs(args.specs)
+ if args.specs:
+ specs = spack.cmd.parse_specs(args.specs)
+ elif env:
+ specs = list(env.user_specs)
+ else:
+ tty.die("spack solve requires at least one spec or an active environment")
solver = asp.Solver()
output = sys.stdout if "asp" in show else None
diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py
index e2d5cb1055..d1278a7175 100644
--- a/lib/spack/spack/cmd/spec.py
+++ b/lib/spack/spack/cmd/spec.py
@@ -14,6 +14,7 @@ import spack.environment as ev
import spack.hash_types as ht
import spack.spec
import spack.store
+import spack.traverse
from spack.cmd.common import arguments
description = "show what would be installed, given a spec"
@@ -81,56 +82,44 @@ def spec(parser, args):
if args.namespaces:
fmt = "{namespace}." + fmt
- tree_kwargs = {
- "cover": args.cover,
- "format": fmt,
- "hashlen": None if args.very_long else 7,
- "show_types": args.types,
- "status_fn": install_status_fn if args.install_status else None,
- }
-
# use a read transaction if we are getting install status for every
# spec in the DAG. This avoids repeatedly querying the DB.
tree_context = lang.nullcontext
if args.install_status:
tree_context = spack.store.STORE.db.read_transaction
- # Use command line specified specs, otherwise try to use environment specs.
+ env = ev.active_environment()
+
if args.specs:
- input_specs = spack.cmd.parse_specs(args.specs)
- concretized_specs = spack.cmd.parse_specs(args.specs, concretize=True)
- specs = list(zip(input_specs, concretized_specs))
+ concrete_specs = spack.cmd.parse_specs(args.specs, concretize=True)
+ elif env:
+ env.concretize()
+ concrete_specs = env.concrete_roots()
else:
- env = ev.active_environment()
- if env:
- env.concretize()
- specs = env.concretized_specs()
- else:
- tty.die("spack spec requires at least one spec or an active environment")
-
- for input, output in specs:
- # With -y, just print YAML to output.
- if args.format:
+ tty.die("spack spec requires at least one spec or an active environment")
+
+ # With --yaml, --json, or --format, just print the raw specs to output
+ if args.format:
+ for spec in concrete_specs:
if args.format == "yaml":
# use write because to_yaml already has a newline.
- sys.stdout.write(output.to_yaml(hash=ht.dag_hash))
+ sys.stdout.write(spec.to_yaml(hash=ht.dag_hash))
elif args.format == "json":
- print(output.to_json(hash=ht.dag_hash))
+ print(spec.to_json(hash=ht.dag_hash))
else:
- print(output.format(args.format))
- continue
-
- with tree_context():
- # Only show the headers for input specs that are not concrete to avoid
- # repeated output. This happens because parse_specs outputs concrete
- # specs for `/hash` inputs.
- if not input.concrete:
- tree_kwargs["hashes"] = False # Always False for input spec
- print("Input spec")
- print("--------------------------------")
- print(input.tree(**tree_kwargs))
- print("Concretized")
- print("--------------------------------")
-
- tree_kwargs["hashes"] = args.long or args.very_long
- print(output.tree(**tree_kwargs))
+ print(spec.format(args.format))
+ return
+
+ with tree_context():
+ print(
+ spack.spec.tree(
+ concrete_specs,
+ cover=args.cover,
+ format=fmt,
+ hashlen=None if args.very_long else 7,
+ show_types=args.types,
+ status_fn=install_status_fn if args.install_status else None,
+ hashes=args.long or args.very_long,
+ key=spack.traverse.by_dag_hash,
+ )
+ )
diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py
index 8e74bcafca..20da92926f 100644
--- a/lib/spack/spack/cmd/stage.py
+++ b/lib/spack/spack/cmd/stage.py
@@ -11,8 +11,6 @@ import spack.cmd
import spack.config
import spack.environment as ev
import spack.package_base
-import spack.repo
-import spack.stage
import spack.traverse
from spack.cmd.common import arguments
@@ -22,7 +20,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated", "specs"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
subparser.add_argument(
"-p", "--path", dest="path", help="path to stage package, does not add to spack tree"
)
@@ -33,9 +31,6 @@ def stage(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if not args.specs:
env = ev.active_environment()
if not env:
@@ -52,8 +47,8 @@ def stage(parser, args):
if len(specs) > 1 and custom_path:
tty.die("`--path` requires a single spec, but multiple were provided")
+ specs = spack.cmd.matching_specs_from_env(specs)
for spec in specs:
- spec = spack.cmd.matching_spec_from_env(spec)
pkg = spec.package
if custom_path:
diff --git a/lib/spack/spack/cmd/style.py b/lib/spack/spack/cmd/style.py
index d16ff34277..15efb64bfa 100644
--- a/lib/spack/spack/cmd/style.py
+++ b/lib/spack/spack/cmd/style.py
@@ -3,18 +3,21 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import argparse
+import ast
import os
import re
import sys
from itertools import zip_longest
+from typing import Dict, List, Optional
import llnl.util.tty as tty
import llnl.util.tty.color as color
from llnl.util.filesystem import working_dir
import spack.paths
+import spack.repo
import spack.util.git
-from spack.util.executable import which
+from spack.util.executable import Executable, which
description = "runs source code style checks on spack"
section = "developer"
@@ -36,10 +39,7 @@ exclude_directories = [os.path.relpath(spack.paths.external_path, spack.paths.pr
#: double-check the results of other tools (if, e.g., --fix was provided)
#: The list maps an executable name to a method to ensure the tool is
#: bootstrapped or present in the environment.
-tool_names = ["isort", "black", "flake8", "mypy"]
-
-#: tools we run in spack style
-tools = {}
+tool_names = ["import", "isort", "black", "flake8", "mypy"]
#: warnings to ignore in mypy
mypy_ignores = [
@@ -61,14 +61,28 @@ def is_package(f):
#: decorator for adding tools to the list
class tool:
- def __init__(self, name, required=False):
+ def __init__(self, name: str, required: bool = False, external: bool = True) -> None:
self.name = name
+ self.external = external
self.required = required
def __call__(self, fun):
- tools[self.name] = (fun, self.required)
+ self.fun = fun
+ tools[self.name] = self
return fun
+ @property
+ def installed(self) -> bool:
+ return bool(which(self.name)) if self.external else True
+
+ @property
+ def executable(self) -> Optional[Executable]:
+ return which(self.name) if self.external else None
+
+
+#: tools we run in spack style
+tools: Dict[str, tool] = {}
+
def changed_files(base="develop", untracked=True, all_files=False, root=None):
"""Get list of changed files in the Spack repository.
@@ -176,22 +190,22 @@ def setup_parser(subparser):
"-t",
"--tool",
action="append",
- help="specify which tools to run (default: %s)" % ",".join(tool_names),
+ help="specify which tools to run (default: %s)" % ", ".join(tool_names),
)
tool_group.add_argument(
"-s",
"--skip",
metavar="TOOL",
action="append",
- help="specify tools to skip (choose from %s)" % ",".join(tool_names),
+ help="specify tools to skip (choose from %s)" % ", ".join(tool_names),
)
subparser.add_argument("files", nargs=argparse.REMAINDER, help="specific files to check")
-def cwd_relative(path, args):
+def cwd_relative(path, root, initial_working_dir):
"""Translate prefix-relative path to current working directory-relative."""
- return os.path.relpath(os.path.join(args.root, path), args.initial_working_dir)
+ return os.path.relpath(os.path.join(root, path), initial_working_dir)
def rewrite_and_print_output(
@@ -201,7 +215,10 @@ def rewrite_and_print_output(
# print results relative to current working directory
def translate(match):
- return replacement.format(cwd_relative(match.group(1), args), *list(match.groups()[1:]))
+ return replacement.format(
+ cwd_relative(match.group(1), args.root, args.initial_working_dir),
+ *list(match.groups()[1:]),
+ )
for line in output.split("\n"):
if not line:
@@ -220,7 +237,7 @@ def print_style_header(file_list, args, tools_to_run):
# translate modified paths to cwd_relative if needed
paths = [filename.strip() for filename in file_list]
if not args.root_relative:
- paths = [cwd_relative(filename, args) for filename in paths]
+ paths = [cwd_relative(filename, args.root, args.initial_working_dir) for filename in paths]
tty.msg("Modified files", *paths)
sys.stdout.flush()
@@ -307,8 +324,6 @@ def run_isort(isort_cmd, file_list, args):
packages_isort_args = (
"--rm",
- "spack",
- "--rm",
"spack.pkgkit",
"--rm",
"spack.package_defs",
@@ -352,17 +367,137 @@ def run_black(black_cmd, file_list, args):
return returncode
+def _module_part(root: str, expr: str):
+ parts = expr.split(".")
+ # spack.pkg is for repositories, don't try to resolve it here.
+ if ".".join(parts[:2]) == spack.repo.ROOT_PYTHON_NAMESPACE:
+ return None
+ while parts:
+ f1 = os.path.join(root, "lib", "spack", *parts) + ".py"
+ f2 = os.path.join(root, "lib", "spack", *parts, "__init__.py")
+
+ if (
+ os.path.exists(f1)
+ # ensure case sensitive match
+ and f"{parts[-1]}.py" in os.listdir(os.path.dirname(f1))
+ or os.path.exists(f2)
+ ):
+ return ".".join(parts)
+ parts.pop()
+ return None
+
+
+def _run_import_check(
+ file_list: List[str],
+ *,
+ fix: bool,
+ root_relative: bool,
+ root=spack.paths.prefix,
+ working_dir=spack.paths.prefix,
+ out=sys.stdout,
+):
+ if sys.version_info < (3, 9):
+ print("import check requires Python 3.9 or later")
+ return 0
+
+ is_use = re.compile(r"(?<!from )(?<!import )(?:llnl|spack)\.[a-zA-Z0-9_\.]+")
+
+ # redundant imports followed by a `# comment` are ignored, cause there can be legimitate reason
+ # to import a module: execute module scope init code, or to deal with circular imports.
+ is_abs_import = re.compile(r"^import ((?:llnl|spack)\.[a-zA-Z0-9_\.]+)$", re.MULTILINE)
+
+ exit_code = 0
+
+ for file in file_list:
+ to_add = set()
+ to_remove = []
+
+ pretty_path = file if root_relative else cwd_relative(file, root, working_dir)
+
+ try:
+ with open(file, "r") as f:
+ contents = open(file, "r").read()
+ parsed = ast.parse(contents)
+ except Exception:
+ exit_code = 1
+ print(f"{pretty_path}: could not parse", file=out)
+ continue
+
+ for m in is_abs_import.finditer(contents):
+ if contents.count(m.group(1)) == 1:
+ to_remove.append(m.group(0))
+ exit_code = 1
+ print(f"{pretty_path}: redundant import: {m.group(1)}", file=out)
+
+ # Clear all strings to avoid matching comments/strings etc.
+ for node in ast.walk(parsed):
+ if isinstance(node, ast.Constant) and isinstance(node.value, str):
+ node.value = ""
+
+ filtered_contents = ast.unparse(parsed) # novermin
+ for m in is_use.finditer(filtered_contents):
+ module = _module_part(root, m.group(0))
+ if not module or module in to_add:
+ continue
+ if re.search(rf"import {re.escape(module)}\b(?!\.)", contents):
+ continue
+ to_add.add(module)
+ exit_code = 1
+ print(f"{pretty_path}: missing import: {module} ({m.group(0)})", file=out)
+
+ if not fix or not to_add and not to_remove:
+ continue
+
+ with open(file, "r") as f:
+ lines = f.readlines()
+
+ if to_add:
+ # insert missing imports before the first import, delegate ordering to isort
+ for node in parsed.body:
+ if isinstance(node, (ast.Import, ast.ImportFrom)):
+ first_line = node.lineno
+ break
+ else:
+ print(f"{pretty_path}: could not fix", file=out)
+ continue
+ lines.insert(first_line, "\n".join(f"import {x}" for x in to_add) + "\n")
+
+ new_contents = "".join(lines)
+
+ # remove redundant imports
+ for statement in to_remove:
+ new_contents = new_contents.replace(f"{statement}\n", "")
+
+ with open(file, "w") as f:
+ f.write(new_contents)
+
+ return exit_code
+
+
+@tool("import", external=False)
+def run_import_check(import_check_cmd, file_list, args):
+ exit_code = _run_import_check(
+ file_list,
+ fix=args.fix,
+ root_relative=args.root_relative,
+ root=args.root,
+ working_dir=args.initial_working_dir,
+ )
+ print_tool_result("import", exit_code)
+ return exit_code
+
+
def validate_toolset(arg_value):
"""Validate --tool and --skip arguments (sets of optionally comma-separated tools)."""
tools = set(",".join(arg_value).split(",")) # allow args like 'isort,flake8'
for tool in tools:
if tool not in tool_names:
- tty.die("Invaild tool: '%s'" % tool, "Choose from: %s" % ", ".join(tool_names))
+ tty.die("Invalid tool: '%s'" % tool, "Choose from: %s" % ", ".join(tool_names))
return tools
-def missing_tools(tools_to_run):
- return [t for t in tools_to_run if which(t) is None]
+def missing_tools(tools_to_run: List[str]) -> List[str]:
+ return [t for t in tools_to_run if not tools[t].installed]
def _bootstrap_dev_dependencies():
@@ -417,9 +552,9 @@ def style(parser, args):
print_style_header(file_list, args, tools_to_run)
for tool_name in tools_to_run:
- run_function, required = tools[tool_name]
+ tool = tools[tool_name]
print_tool_header(tool_name)
- return_code |= run_function(which(tool_name), file_list, args)
+ return_code |= tool.fun(tool.executable, file_list, args)
if return_code == 0:
tty.msg(color.colorize("@*{spack style checks were clean}"))
diff --git a/lib/spack/spack/cmd/tags.py b/lib/spack/spack/cmd/tags.py
index a4f9786b93..e43740abc7 100644
--- a/lib/spack/spack/cmd/tags.py
+++ b/lib/spack/spack/cmd/tags.py
@@ -9,8 +9,8 @@ import llnl.string
import llnl.util.tty as tty
import llnl.util.tty.colify as colify
+import spack.environment
import spack.repo
-import spack.store
import spack.tag
description = "show package tags and associated packages"
diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py
index e84df8c74a..1457804382 100644
--- a/lib/spack/spack/cmd/test.py
+++ b/lib/spack/spack/cmd/test.py
@@ -15,11 +15,12 @@ from llnl.util import lang, tty
from llnl.util.tty import colify
import spack.cmd
+import spack.config
import spack.environment as ev
import spack.install_test
-import spack.package_base
import spack.repo
import spack.report
+import spack.store
from spack.cmd.common import arguments
description = "run spack's tests for an install"
@@ -164,7 +165,7 @@ def test_run(args):
if args.fail_fast:
spack.config.set("config:fail_fast", True, scope="command_line")
- explicit = args.explicit or any
+ explicit = args.explicit or None
explicit_str = "explicitly " if args.explicit else ""
# Get specs to test
@@ -228,7 +229,7 @@ def create_reporter(args, specs_to_test, test_suite):
def test_list(args):
"""list installed packages with available tests"""
- tagged = set(spack.repo.PATH.packages_with_tags(*args.tag)) if args.tag else set()
+ tagged = spack.repo.PATH.packages_with_tags(*args.tag) if args.tag else set()
def has_test_and_tags(pkg_class):
tests = spack.install_test.test_functions(pkg_class)
diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py
index e0c49c831d..678a926236 100644
--- a/lib/spack/spack/cmd/tutorial.py
+++ b/lib/spack/spack/cmd/tutorial.py
@@ -10,6 +10,7 @@ import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
import spack
+import spack.cmd
import spack.config
import spack.paths
import spack.util.git
@@ -23,7 +24,7 @@ level = "long"
# tutorial configuration parameters
-tutorial_branch = "releases/v0.21"
+tutorial_branch = "releases/v0.23"
tutorial_mirror = "file:///mirror"
tutorial_key = os.path.join(spack.paths.share_path, "keys", "tutorial.pub")
diff --git a/lib/spack/spack/cmd/undevelop.py b/lib/spack/spack/cmd/undevelop.py
index 539ddb850d..a4c6371ae5 100644
--- a/lib/spack/spack/cmd/undevelop.py
+++ b/lib/spack/spack/cmd/undevelop.py
@@ -6,6 +6,7 @@
import llnl.util.tty as tty
import spack.cmd
+import spack.config
from spack.cmd.common import arguments
description = "remove specs from an environment"
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 62a7ac1f32..fb13df369c 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -17,7 +17,8 @@ import spack.spec
import spack.store
import spack.traverse as traverse
from spack.cmd.common import arguments
-from spack.database import InstallStatuses
+
+from ..enums import InstallRecordStatus
description = "remove installed packages"
section = "build"
@@ -90,6 +91,7 @@ def find_matching_specs(
env: optional active environment
specs: list of specs to be matched against installed packages
allow_multiple_matches: if True multiple matches are admitted
+ origin: origin of the spec
Return:
list: list of specs
@@ -98,12 +100,14 @@ def find_matching_specs(
hashes = env.all_hashes() if env else None
# List of specs that match expressions given via command line
- specs_from_cli = []
+ specs_from_cli: List[spack.spec.Spec] = []
has_errors = False
for spec in specs:
- install_query = [InstallStatuses.INSTALLED, InstallStatuses.DEPRECATED]
matching = spack.store.STORE.db.query_local(
- spec, hashes=hashes, installed=install_query, origin=origin
+ spec,
+ hashes=hashes,
+ installed=(InstallRecordStatus.INSTALLED | InstallRecordStatus.DEPRECATED),
+ origin=origin,
)
# For each spec provided, make sure it refers to only one package.
# Fail and ask user to be unambiguous if it doesn't
@@ -116,7 +120,7 @@ def find_matching_specs(
has_errors = True
# No installed package matches the query
- if len(matching) == 0 and spec is not any:
+ if len(matching) == 0 and spec is not None:
if env:
pkg_type = "packages in environment '%s'" % env.name
else:
@@ -151,7 +155,8 @@ def installed_dependents(specs: List[spack.spec.Spec]) -> List[spack.spec.Spec]:
key=lambda s: s.dag_hash(),
)
- return [spec for spec in specs if is_installed(spec)]
+ with spack.store.STORE.db.read_transaction():
+ return [spec for spec in specs if is_installed(spec)]
def dependent_environments(
@@ -212,7 +217,7 @@ def get_uninstall_list(args, specs: List[spack.spec.Spec], env: Optional[ev.Envi
# Gets the list of installed specs that match the ones given via cli
# args.all takes care of the case where '-a' is given in the cli
- matching_specs = find_matching_specs(env, specs, args.all)
+ matching_specs = find_matching_specs(env, specs, args.all, origin=args.origin)
dependent_specs = installed_dependents(matching_specs)
all_uninstall_specs = matching_specs + dependent_specs if args.dependents else matching_specs
other_dependent_envs = dependent_environments(all_uninstall_specs, current_env=env)
@@ -239,6 +244,8 @@ def get_uninstall_list(args, specs: List[spack.spec.Spec], env: Optional[ev.Envi
print()
tty.info("The following environments still reference these specs:")
colify([e.name for e in other_dependent_envs.keys()], indent=4)
+ if env:
+ msgs.append("use `spack remove` to remove the spec from the current environment")
msgs.append("use `spack env remove` to remove environments")
msgs.append("use `spack uninstall --force` to override")
print()
@@ -298,6 +305,6 @@ def uninstall(parser, args):
" Use `spack uninstall --all` to uninstall ALL packages.",
)
- # [any] here handles the --all case by forcing all specs to be returned
- specs = spack.cmd.parse_specs(args.specs) if args.specs else [any]
+ # [None] here handles the --all case by forcing all specs to be returned
+ specs = spack.cmd.parse_specs(args.specs) if args.specs else [None]
uninstall_specs(args, specs)
diff --git a/lib/spack/spack/cmd/unit_test.py b/lib/spack/spack/cmd/unit_test.py
index 2931be5e74..4717c9ee9b 100644
--- a/lib/spack/spack/cmd/unit_test.py
+++ b/lib/spack/spack/cmd/unit_test.py
@@ -10,6 +10,8 @@ import os.path
import re
import sys
+import spack.extensions
+
try:
import pytest
except ImportError:
@@ -34,6 +36,13 @@ def setup_parser(subparser):
default=False,
help="show full pytest help, with advanced options",
)
+ subparser.add_argument(
+ "-n",
+ "--numprocesses",
+ type=int,
+ default=1,
+ help="run tests in parallel up to this wide, default 1 for sequential",
+ )
# extra spack arguments to list tests
list_group = subparser.add_argument_group("listing tests")
@@ -207,8 +216,6 @@ def unit_test(parser, args, unknown_args):
# Ensure clingo is available before switching to the
# mock configuration used by unit tests
- # Note: skip on windows here because for the moment,
- # clingo is wholly unsupported from bootstrap
with spack.bootstrap.ensure_bootstrap_configuration():
spack.bootstrap.ensure_core_dependencies()
if pytest is None:
@@ -229,6 +236,16 @@ def unit_test(parser, args, unknown_args):
if args.extension:
pytest_root = spack.extensions.load_extension(args.extension)
+ if args.numprocesses is not None and args.numprocesses > 1:
+ pytest_args.extend(
+ [
+ "--dist",
+ "loadfile",
+ "--tx",
+ f"{args.numprocesses}*popen//python=spack-tmpconfig spack python",
+ ]
+ )
+
# pytest.ini lives in the root of the spack repository.
with llnl.util.filesystem.working_dir(pytest_root):
if args.list:
diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py
index 3bafe5e8c6..f937ebd313 100644
--- a/lib/spack/spack/cmd/unload.py
+++ b/lib/spack/spack/cmd/unload.py
@@ -7,9 +7,10 @@ import os
import sys
import spack.cmd
+import spack.cmd.common
import spack.error
+import spack.store
import spack.user_environment as uenv
-import spack.util.environment
from spack.cmd.common import arguments
description = "remove package from the user environment"
@@ -71,7 +72,7 @@ def unload(parser, args):
"Cannot specify specs on command line when unloading all specs with '--all'"
)
- hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(":")
+ hashes = os.environ.get(uenv.spack_loaded_hashes_var, "").split(os.pathsep)
if args.specs:
specs = [
spack.cmd.disambiguate_spec_from_hashes(spec, hashes)
diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py
index 38dd6a4aeb..cb151b26d9 100644
--- a/lib/spack/spack/cmd/url.py
+++ b/lib/spack/spack/cmd/url.py
@@ -339,7 +339,7 @@ def url_stats(args):
for pkg_cls in spack.repo.PATH.all_package_classes():
npkgs += 1
- for v in pkg_cls.versions:
+ for v in list(pkg_cls.versions):
try:
pkg = pkg_cls(spack.spec.Spec(pkg_cls.name))
fetcher = fs.for_package_version(pkg, v)
diff --git a/lib/spack/spack/cmd/verify.py b/lib/spack/spack/cmd/verify.py
index 383e9e046b..57b3078832 100644
--- a/lib/spack/spack/cmd/verify.py
+++ b/lib/spack/spack/cmd/verify.py
@@ -6,6 +6,7 @@ import argparse
import llnl.util.tty as tty
+import spack.cmd
import spack.environment as ev
import spack.store
import spack.verify
diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py
index fb1a303713..2735b6a31f 100644
--- a/lib/spack/spack/cmd/versions.py
+++ b/lib/spack/spack/cmd/versions.py
@@ -24,11 +24,6 @@ def setup_parser(subparser):
"-s", "--safe", action="store_true", help="only list safe versions of the package"
)
output.add_argument(
- "--safe-only",
- action="store_true",
- help="[deprecated] only list safe versions of the package",
- )
- output.add_argument(
"-r", "--remote", action="store_true", help="only list remote versions of the package"
)
output.add_argument(
@@ -47,17 +42,13 @@ def versions(parser, args):
safe_versions = pkg.versions
- if args.safe_only:
- tty.warn('"--safe-only" is deprecated. Use "--safe" instead.')
- args.safe = args.safe_only
-
if not (args.remote or args.new):
if sys.stdout.isatty():
tty.msg("Safe versions (already checksummed):")
if not safe_versions:
if sys.stdout.isatty():
- tty.warn("Found no versions for {0}".format(pkg.name))
+ tty.warn(f"Found no versions for {pkg.name}")
tty.debug("Manually add versions to the package.")
else:
colify(sorted(safe_versions, reverse=True), indent=2)
@@ -83,12 +74,12 @@ def versions(parser, args):
if not remote_versions:
if sys.stdout.isatty():
if not fetched_versions:
- tty.warn("Found no versions for {0}".format(pkg.name))
+ tty.warn(f"Found no versions for {pkg.name}")
tty.debug(
"Check the list_url and list_depth attributes of "
"the package to help Spack find versions."
)
else:
- tty.warn("Found no unchecksummed versions for {0}".format(pkg.name))
+ tty.warn(f"Found no unchecksummed versions for {pkg.name}")
else:
colify(sorted(remote_versions, reverse=True), indent=2)
diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py
index 586a9c6eb4..374aa570d2 100644
--- a/lib/spack/spack/cmd/view.py
+++ b/lib/spack/spack/cmd/view.py
@@ -33,15 +33,17 @@ All operations on views are performed via proxy objects such as
YamlFilesystemView.
"""
+import sys
+
import llnl.util.tty as tty
from llnl.util.link_tree import MergeConflictError
import spack.cmd
import spack.environment as ev
+import spack.filesystem_view as fsv
import spack.schema.projections
import spack.store
from spack.config import validate
-from spack.filesystem_view import YamlFilesystemView, view_func_parser
from spack.util import spack_yaml as s_yaml
description = "project packages to a compact naming scheme on the filesystem"
@@ -178,7 +180,12 @@ def setup_parser(sp):
def view(parser, args):
- "Produce a view of a set of packages."
+ """Produce a view of a set of packages."""
+
+ if sys.platform == "win32" and args.action in ("hardlink", "hard"):
+ # Hard-linked views are not yet allowed on Windows.
+ # See https://github.com/spack/spack/pull/46335#discussion_r1757411915
+ tty.die("Hard linking is not supported on Windows. Please use symlinks or copy methods.")
specs = spack.cmd.parse_specs(args.specs)
path = args.path[0]
@@ -193,17 +200,13 @@ def view(parser, args):
ordered_projections = {}
# What method are we using for this view
- if args.action in actions_link:
- link_fn = view_func_parser(args.action)
- else:
- link_fn = view_func_parser("symlink")
-
- view = YamlFilesystemView(
+ link_type = args.action if args.action in actions_link else "symlink"
+ view = fsv.YamlFilesystemView(
path,
spack.store.STORE.layout,
projections=ordered_projections,
ignore_conflicts=getattr(args, "ignore_conflicts", False),
- link=link_fn,
+ link_type=link_type,
verbose=args.verbose,
)
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index 30511d90db..e16e4a2725 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -4,33 +4,41 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
+import hashlib
import itertools
+import json
import os
import platform
import re
import shutil
import sys
import tempfile
-from typing import List, Optional, Sequence
+from typing import Dict, List, Optional, Sequence
import llnl.path
import llnl.util.lang
import llnl.util.tty as tty
from llnl.util.filesystem import path_contains_subdirectory, paths_containing_libs
-import spack.compilers
+import spack.caches
import spack.error
+import spack.schema.environment
import spack.spec
import spack.util.executable
+import spack.util.libc
import spack.util.module_cmd
import spack.version
from spack.util.environment import filter_system_paths
+from spack.util.file_cache import FileCache
__all__ = ["Compiler"]
+PATH_INSTANCE_VARS = ["cc", "cxx", "f77", "fc"]
+FLAG_INSTANCE_VARS = ["cflags", "cppflags", "cxxflags", "fflags"]
+
@llnl.util.lang.memoized
-def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()):
+def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()) -> str:
"""Invokes the compiler at a given path passing a single
version argument and returns the output.
@@ -53,7 +61,7 @@ def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()):
return output
-def get_compiler_version_output(compiler_path, *args, **kwargs):
+def get_compiler_version_output(compiler_path, *args, **kwargs) -> str:
"""Wrapper for _get_compiler_version_output()."""
# This ensures that we memoize compiler output by *absolute path*,
# not just executable name. If we don't do this, and the path changes
@@ -107,7 +115,6 @@ def _parse_link_paths(string):
"""
lib_search_paths = False
raw_link_dirs = []
- tty.debug("parsing implicit link info")
for line in string.splitlines():
if lib_search_paths:
if line.startswith("\t"):
@@ -122,7 +129,7 @@ def _parse_link_paths(string):
continue
if _LINKER_LINE_IGNORE.match(line):
continue
- tty.debug("linker line: %s" % line)
+ tty.debug(f"implicit link dirs: link line: {line}")
next_arg = False
for arg in line.split():
@@ -138,15 +145,12 @@ def _parse_link_paths(string):
link_dir_arg = _LINK_DIR_ARG.match(arg)
if link_dir_arg:
link_dir = link_dir_arg.group("dir")
- tty.debug("linkdir: %s" % link_dir)
raw_link_dirs.append(link_dir)
link_dir_arg = _LIBPATH_ARG.match(arg)
if link_dir_arg:
link_dir = link_dir_arg.group("dir")
- tty.debug("libpath: %s", link_dir)
raw_link_dirs.append(link_dir)
- tty.debug("found raw link dirs: %s" % ", ".join(raw_link_dirs))
implicit_link_dirs = list()
visited = set()
@@ -156,7 +160,7 @@ def _parse_link_paths(string):
implicit_link_dirs.append(normalized_path)
visited.add(normalized_path)
- tty.debug("found link dirs: %s" % ", ".join(implicit_link_dirs))
+ tty.debug(f"implicit link dirs: result: {', '.join(implicit_link_dirs)}")
return implicit_link_dirs
@@ -202,18 +206,6 @@ class Compiler:
support for specific compilers, their possible names, arguments,
and how to identify the particular type of compiler."""
- # Subclasses use possible names of C compiler
- cc_names: List[str] = []
-
- # Subclasses use possible names of C++ compiler
- cxx_names: List[str] = []
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names: List[str] = []
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names: List[str] = []
-
# Optional prefix regexes for searching for this type of compiler.
# Prefixes are sometimes used for toolchains
prefixes: List[str] = []
@@ -281,18 +273,13 @@ class Compiler:
def opt_flags(self):
return ["-O", "-O0", "-O1", "-O2", "-O3"]
- # Cray PrgEnv name that can be used to load this compiler
- PrgEnv: Optional[str] = None
- # Name of module used to switch versions of this compiler
- PrgEnv_compiler: Optional[str] = None
-
def __init__(
self,
cspec,
operating_system,
target,
paths,
- modules=None,
+ modules: Optional[List[str]] = None,
alias=None,
environment=None,
extra_rpaths=None,
@@ -307,6 +294,7 @@ class Compiler:
self.environment = environment or {}
self.extra_rpaths = extra_rpaths or []
self.enable_implicit_rpaths = enable_implicit_rpaths
+ self.cache = COMPILER_CACHE
self.cc = paths[0]
self.cxx = paths[1]
@@ -334,6 +322,40 @@ class Compiler:
# used for version checks for API, e.g. C++11 flag
self._real_version = None
+ def __eq__(self, other):
+ return (
+ self.cc == other.cc
+ and self.cxx == other.cxx
+ and self.fc == other.fc
+ and self.f77 == other.f77
+ and self.spec == other.spec
+ and self.operating_system == other.operating_system
+ and self.target == other.target
+ and self.flags == other.flags
+ and self.modules == other.modules
+ and self.environment == other.environment
+ and self.extra_rpaths == other.extra_rpaths
+ and self.enable_implicit_rpaths == other.enable_implicit_rpaths
+ )
+
+ def __hash__(self):
+ return hash(
+ (
+ self.cc,
+ self.cxx,
+ self.fc,
+ self.f77,
+ self.spec,
+ self.operating_system,
+ self.target,
+ str(self.flags),
+ str(self.modules),
+ str(self.environment),
+ str(self.extra_rpaths),
+ self.enable_implicit_rpaths,
+ )
+ )
+
def verify_executables(self):
"""Raise an error if any of the compiler executables is not valid.
@@ -373,29 +395,52 @@ class Compiler:
E.g. C++11 flag checks.
"""
- if not self._real_version:
- try:
- real_version = spack.version.Version(self.get_real_version())
- if real_version == spack.version.Version("unknown"):
- return self.version
- self._real_version = real_version
- except spack.util.executable.ProcessError:
- self._real_version = self.version
- return self._real_version
-
- def implicit_rpaths(self):
+ real_version_str = self.cache.get(self).real_version
+ if not real_version_str or real_version_str == "unknown":
+ return self.version
+
+ return spack.version.StandardVersion.from_string(real_version_str)
+
+ def implicit_rpaths(self) -> List[str]:
if self.enable_implicit_rpaths is False:
return []
- # Put CXX first since it has the most linking issues
- # And because it has flags that affect linking
- exe_paths = [x for x in [self.cxx, self.cc, self.fc, self.f77] if x]
- link_dirs = self._get_compiler_link_paths(exe_paths)
+ output = self.compiler_verbose_output
+
+ if not output:
+ return []
+
+ link_dirs = _parse_non_system_link_dirs(output)
all_required_libs = list(self.required_libs) + Compiler._all_compiler_rpath_libraries
return list(paths_containing_libs(link_dirs, all_required_libs))
@property
+ def default_dynamic_linker(self) -> Optional[str]:
+ """Determine default dynamic linker from compiler link line"""
+ output = self.compiler_verbose_output
+
+ if not output:
+ return None
+
+ return spack.util.libc.parse_dynamic_linker(output)
+
+ @property
+ def default_libc(self) -> Optional["spack.spec.Spec"]:
+ """Determine libc targeted by the compiler from link line"""
+ # technically this should be testing the target platform of the compiler, but we don't have
+ # that, so stick to host platform for now.
+ if sys.platform in ("darwin", "win32"):
+ return None
+
+ dynamic_linker = self.default_dynamic_linker
+
+ if not dynamic_linker:
+ return None
+
+ return spack.util.libc.libc_from_dynamic_linker(dynamic_linker)
+
+ @property
def required_libs(self):
"""For executables created with this compiler, the compiler libraries
that would be generally required to run it.
@@ -403,52 +448,45 @@ class Compiler:
# By default every compiler returns the empty list
return []
- def _get_compiler_link_paths(self, paths):
- first_compiler = next((c for c in paths if c), None)
- if not first_compiler:
- return []
- if not self.verbose_flag:
- # In this case there is no mechanism to learn what link directories
- # are used by the compiler
- return []
-
- # What flag types apply to first_compiler, in what order
- flags = ["cppflags", "ldflags"]
- if first_compiler == self.cc:
- flags = ["cflags"] + flags
- elif first_compiler == self.cxx:
- flags = ["cxxflags"] + flags
+ @property
+ def compiler_verbose_output(self) -> Optional[str]:
+ """Verbose output from compiling a dummy C source file. Output is cached."""
+ return self.cache.get(self).c_compiler_output
+
+ def _compile_dummy_c_source(self) -> Optional[str]:
+ if self.cc:
+ cc = self.cc
+ ext = "c"
else:
- flags.append("fflags")
+ cc = self.cxx
+ ext = "cc"
+
+ if not cc or not self.verbose_flag:
+ return None
try:
tmpdir = tempfile.mkdtemp(prefix="spack-implicit-link-info")
fout = os.path.join(tmpdir, "output")
- fin = os.path.join(tmpdir, "main.c")
+ fin = os.path.join(tmpdir, f"main.{ext}")
- with open(fin, "w+") as csource:
+ with open(fin, "w") as csource:
csource.write(
- "int main(int argc, char* argv[]) { " "(void)argc; (void)argv; return 0; }\n"
+ "int main(int argc, char* argv[]) { (void)argc; (void)argv; return 0; }\n"
)
- compiler_exe = spack.util.executable.Executable(first_compiler)
- for flag_type in flags:
- for flag in self.flags.get(flag_type, []):
- compiler_exe.add_default_arg(flag)
+ cc_exe = spack.util.executable.Executable(cc)
+ for flag_type in ["cflags" if cc == self.cc else "cxxflags", "cppflags", "ldflags"]:
+ cc_exe.add_default_arg(*self.flags.get(flag_type, []))
- output = ""
with self.compiler_environment():
- output = str(
- compiler_exe(self.verbose_flag, fin, "-o", fout, output=str, error=str)
- ) # str for py2
- return _parse_non_system_link_dirs(output)
+ return cc_exe(self.verbose_flag, fin, "-o", fout, output=str, error=str)
except spack.util.executable.ProcessError as pe:
tty.debug("ProcessError: Command exited with non-zero status: " + pe.long_message)
- return []
+ return None
finally:
shutil.rmtree(tmpdir, ignore_errors=True)
@property
- def verbose_flag(self):
+ def verbose_flag(self) -> Optional[str]:
"""
This property should be overridden in the compiler subclass if a
verbose flag is available.
@@ -531,7 +569,7 @@ class Compiler:
# Note: This is not a class method. The class methods are used to detect
# compilers on PATH based systems, and do not set up the run environment of
# the compiler. This method can be called on `module` based systems as well
- def get_real_version(self):
+ def get_real_version(self) -> str:
"""Query the compiler for its version.
This is the "real" compiler version, regardless of what is in the
@@ -541,14 +579,17 @@ class Compiler:
modifications) to enable the compiler to run properly on any platform.
"""
cc = spack.util.executable.Executable(self.cc)
- with self.compiler_environment():
- output = cc(
- self.version_argument,
- output=str,
- error=str,
- ignore_errors=tuple(self.ignore_version_errors),
- )
- return self.extract_version_from_output(output)
+ try:
+ with self.compiler_environment():
+ output = cc(
+ self.version_argument,
+ output=str,
+ error=str,
+ ignore_errors=tuple(self.ignore_version_errors),
+ )
+ return self.extract_version_from_output(output)
+ except spack.util.executable.ProcessError:
+ return "unknown"
@property
def prefix(self):
@@ -575,7 +616,7 @@ class Compiler:
@classmethod
@llnl.util.lang.memoized
- def extract_version_from_output(cls, output):
+ def extract_version_from_output(cls, output: str) -> str:
"""Extracts the version from compiler's output."""
match = re.search(cls.version_regex, output)
return match.group(1) if match else "unknown"
@@ -585,18 +626,6 @@ class Compiler:
return cls.default_version(cc)
@classmethod
- def cxx_version(cls, cxx):
- return cls.default_version(cxx)
-
- @classmethod
- def f77_version(cls, f77):
- return cls.default_version(f77)
-
- @classmethod
- def fc_version(cls, fc):
- return cls.default_version(fc)
-
- @classmethod
def search_regexps(cls, language):
# Compile all the regular expressions used for files beforehand.
# This searches for any combination of <prefix><name><suffix>
@@ -646,8 +675,8 @@ class Compiler:
@contextlib.contextmanager
def compiler_environment(self):
- # yield immediately if no modules
- if not self.modules:
+ # Avoid modifying os.environ if possible.
+ if not self.modules and not self.environment:
yield
return
@@ -657,25 +686,41 @@ class Compiler:
try:
# load modules and set env variables
for module in self.modules:
- # On cray, mic-knl module cannot be loaded without cce module
- # See: https://github.com/spack/spack/issues/3153
- if os.environ.get("CRAY_CPU_TARGET") == "mic-knl":
- spack.util.module_cmd.load_module("cce")
spack.util.module_cmd.load_module(module)
# apply other compiler environment changes
- env = spack.util.environment.EnvironmentModifications()
- env.extend(spack.schema.environment.parse(self.environment))
- env.apply_modifications()
+ spack.schema.environment.parse(self.environment).apply_modifications()
yield
- except BaseException:
- raise
finally:
# Restore environment regardless of whether inner code succeeded
os.environ.clear()
os.environ.update(backup_env)
+ def to_dict(self):
+ flags_dict = {fname: " ".join(fvals) for fname, fvals in self.flags.items()}
+ flags_dict.update(
+ {attr: getattr(self, attr, None) for attr in FLAG_INSTANCE_VARS if hasattr(self, attr)}
+ )
+ result = {
+ "spec": str(self.spec),
+ "paths": {attr: getattr(self, attr, None) for attr in PATH_INSTANCE_VARS},
+ "flags": flags_dict,
+ "operating_system": str(self.operating_system),
+ "target": str(self.target),
+ "modules": self.modules or [],
+ "environment": self.environment or {},
+ "extra_rpaths": self.extra_rpaths or [],
+ }
+
+ if self.enable_implicit_rpaths is not None:
+ result["implicit_rpaths"] = self.enable_implicit_rpaths
+
+ if self.alias:
+ result["alias"] = self.alias
+
+ return result
+
class CompilerAccessError(spack.error.SpackError):
def __init__(self, compiler, paths):
@@ -700,3 +745,106 @@ class UnsupportedCompilerFlag(spack.error.SpackError):
)
+ " implement the {0} property and submit a pull request or issue.".format(flag_name),
)
+
+
+class CompilerCacheEntry:
+ """Deserialized cache entry for a compiler"""
+
+ __slots__ = ["c_compiler_output", "real_version"]
+
+ def __init__(self, c_compiler_output: Optional[str], real_version: str):
+ self.c_compiler_output = c_compiler_output
+ self.real_version = real_version
+
+ @classmethod
+ def from_dict(cls, data: Dict[str, Optional[str]]):
+ if not isinstance(data, dict):
+ raise ValueError(f"Invalid {cls.__name__} data")
+ c_compiler_output = data.get("c_compiler_output")
+ real_version = data.get("real_version")
+ if not isinstance(real_version, str) or not isinstance(
+ c_compiler_output, (str, type(None))
+ ):
+ raise ValueError(f"Invalid {cls.__name__} data")
+ return cls(c_compiler_output, real_version)
+
+
+class CompilerCache:
+ """Base class for compiler output cache. Default implementation does not cache anything."""
+
+ def value(self, compiler: Compiler) -> Dict[str, Optional[str]]:
+ return {
+ "c_compiler_output": compiler._compile_dummy_c_source(),
+ "real_version": compiler.get_real_version(),
+ }
+
+ def get(self, compiler: Compiler) -> CompilerCacheEntry:
+ return CompilerCacheEntry.from_dict(self.value(compiler))
+
+
+class FileCompilerCache(CompilerCache):
+ """Cache for compiler output, which is used to determine implicit link paths, the default libc
+ version, and the compiler version."""
+
+ name = os.path.join("compilers", "compilers.json")
+
+ def __init__(self, cache: "FileCache") -> None:
+ self.cache = cache
+ self.cache.init_entry(self.name)
+ self._data: Dict[str, Dict[str, Optional[str]]] = {}
+
+ def _get_entry(self, key: str) -> Optional[CompilerCacheEntry]:
+ try:
+ return CompilerCacheEntry.from_dict(self._data[key])
+ except ValueError:
+ del self._data[key]
+ except KeyError:
+ pass
+ return None
+
+ def get(self, compiler: Compiler) -> CompilerCacheEntry:
+ # Cache hit
+ try:
+ with self.cache.read_transaction(self.name) as f:
+ assert f is not None
+ self._data = json.loads(f.read())
+ assert isinstance(self._data, dict)
+ except (json.JSONDecodeError, AssertionError):
+ self._data = {}
+
+ key = self._key(compiler)
+ value = self._get_entry(key)
+ if value is not None:
+ return value
+
+ # Cache miss
+ with self.cache.write_transaction(self.name) as (old, new):
+ try:
+ assert old is not None
+ self._data = json.loads(old.read())
+ assert isinstance(self._data, dict)
+ except (json.JSONDecodeError, AssertionError):
+ self._data = {}
+
+ # Use cache entry that may have been created by another process in the meantime.
+ entry = self._get_entry(key)
+
+ # Finally compute the cache entry
+ if entry is None:
+ self._data[key] = self.value(compiler)
+ entry = CompilerCacheEntry.from_dict(self._data[key])
+
+ new.write(json.dumps(self._data, separators=(",", ":")))
+
+ return entry
+
+ def _key(self, compiler: Compiler) -> str:
+ as_bytes = json.dumps(compiler.to_dict(), separators=(",", ":")).encode("utf-8")
+ return hashlib.sha256(as_bytes).hexdigest()
+
+
+def _make_compiler_cache():
+ return FileCompilerCache(spack.caches.MISC_CACHE)
+
+
+COMPILER_CACHE: CompilerCache = llnl.util.lang.Singleton(_make_compiler_cache) # type: ignore
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index c58bc4996c..bfb781685f 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -6,11 +6,12 @@
"""This module contains functions related to finding compilers on the
system and configuring Spack to use multiple compilers.
"""
-import collections
-import itertools
-import multiprocessing.pool
+import importlib
import os
-from typing import Dict, List, Optional, Tuple
+import re
+import sys
+import warnings
+from typing import Dict, List, Optional
import archspec.cpu
@@ -21,16 +22,14 @@ import llnl.util.tty as tty
import spack.compiler
import spack.config
import spack.error
-import spack.operating_systems
import spack.paths
import spack.platforms
+import spack.repo
import spack.spec
-import spack.version
+from spack.operating_systems import windows_os
from spack.util.environment import get_path
from spack.util.naming import mod_to_class
-_path_instance_vars = ["cc", "cxx", "f77", "fc"]
-_flags_instance_vars = ["cflags", "cppflags", "cxxflags", "fflags"]
_other_instance_vars = [
"modules",
"operating_system",
@@ -62,6 +61,10 @@ package_name_to_compiler_name = {
}
+#: Tag used to identify packages providing a compiler
+COMPILER_TAG = "compiler"
+
+
def pkg_spec_for_compiler(cspec):
"""Return the spec of the package that provides the compiler."""
for spec, package in _compiler_to_pkg.items():
@@ -84,75 +87,61 @@ def _auto_compiler_spec(function):
def _to_dict(compiler):
"""Return a dict version of compiler suitable to insert in YAML."""
- d = {}
- d["spec"] = str(compiler.spec)
- d["paths"] = dict((attr, getattr(compiler, attr, None)) for attr in _path_instance_vars)
- d["flags"] = dict((fname, " ".join(fvals)) for fname, fvals in compiler.flags.items())
- d["flags"].update(
- dict(
- (attr, getattr(compiler, attr, None))
- for attr in _flags_instance_vars
- if hasattr(compiler, attr)
- )
- )
- d["operating_system"] = str(compiler.operating_system)
- d["target"] = str(compiler.target)
- d["modules"] = compiler.modules or []
- d["environment"] = compiler.environment or {}
- d["extra_rpaths"] = compiler.extra_rpaths or []
- if compiler.enable_implicit_rpaths is not None:
- d["implicit_rpaths"] = compiler.enable_implicit_rpaths
-
- if compiler.alias:
- d["alias"] = compiler.alias
+ return {"compiler": compiler.to_dict()}
- return {"compiler": d}
-
-def get_compiler_config(scope=None, init_config=True):
+def get_compiler_config(
+ configuration: "spack.config.Configuration",
+ *,
+ scope: Optional[str] = None,
+ init_config: bool = False,
+) -> List[Dict]:
"""Return the compiler configuration for the specified architecture."""
-
- config = spack.config.get("compilers", scope=scope) or []
+ config = configuration.get("compilers", scope=scope) or []
if config or not init_config:
return config
- merged_config = spack.config.get("compilers")
+ merged_config = configuration.get("compilers")
if merged_config:
+ # Config is empty for this scope
+ # Do not init config because there is a non-empty scope
return config
- _init_compiler_config(scope=scope)
- config = spack.config.get("compilers", scope=scope)
+ find_compilers(scope=scope)
+ config = configuration.get("compilers", scope=scope)
return config
-def _init_compiler_config(*, scope):
- """Compiler search used when Spack has no compilers."""
- compilers = find_compilers()
- compilers_dict = []
- for compiler in compilers:
- compilers_dict.append(_to_dict(compiler))
- spack.config.set("compilers", compilers_dict, scope=scope)
+def get_compiler_config_from_packages(
+ configuration: "spack.config.Configuration", *, scope: Optional[str] = None
+) -> List[Dict]:
+ """Return the compiler configuration from packages.yaml"""
+ packages_yaml = configuration.get("packages", scope=scope)
+ return CompilerConfigFactory.from_packages_yaml(packages_yaml)
def compiler_config_files():
config_files = list()
config = spack.config.CONFIG
- for scope in config.file_scopes:
+ for scope in config.writable_scopes:
name = scope.name
compiler_config = config.get("compilers", scope=name)
if compiler_config:
config_files.append(config.get_config_filename(name, "compilers"))
+ compiler_config_from_packages = get_compiler_config_from_packages(config, scope=name)
+ if compiler_config_from_packages:
+ config_files.append(config.get_config_filename(name, "packages"))
return config_files
-def add_compilers_to_config(compilers, scope=None, init_config=True):
+def add_compilers_to_config(compilers, scope=None):
"""Add compilers to the config for the specified architecture.
Arguments:
compilers: a list of Compiler objects.
scope: configuration scope to modify.
"""
- compiler_config = get_compiler_config(scope, init_config)
+ compiler_config = get_compiler_config(configuration=spack.config.CONFIG, scope=scope)
for compiler in compilers:
if not compiler.cc:
tty.debug(f"{compiler.spec} does not have a C compiler")
@@ -184,6 +173,9 @@ def remove_compiler_from_config(compiler_spec, scope=None):
for current_scope in candidate_scopes:
removal_happened |= _remove_compiler_from_scope(compiler_spec, scope=current_scope)
+ msg = "`spack compiler remove` will not remove compilers defined in packages.yaml"
+ msg += "\nTo remove these compilers, either edit the config or use `spack external remove`"
+ tty.debug(msg)
return removal_happened
@@ -198,7 +190,7 @@ def _remove_compiler_from_scope(compiler_spec, scope):
True if one or more compiler entries were actually removed, False otherwise
"""
assert scope is not None, "a specific scope is needed when calling this function"
- compiler_config = get_compiler_config(scope)
+ compiler_config = get_compiler_config(configuration=spack.config.CONFIG, scope=scope)
filtered_compiler_config = [
compiler_entry
for compiler_entry in compiler_config
@@ -213,99 +205,111 @@ def _remove_compiler_from_scope(compiler_spec, scope):
# We need to preserve the YAML type for comments, hence we are copying the
# items in the list that has just been retrieved
compiler_config[:] = filtered_compiler_config
- spack.config.set("compilers", compiler_config, scope=scope)
+ spack.config.CONFIG.set("compilers", compiler_config, scope=scope)
return True
-def all_compilers_config(scope=None, init_config=True):
+def all_compilers_config(
+ configuration: "spack.config.Configuration",
+ *,
+ scope: Optional[str] = None,
+ init_config: bool = True,
+) -> List["spack.compiler.Compiler"]:
"""Return a set of specs for all the compiler versions currently
available to build with. These are instances of CompilerSpec.
"""
- return get_compiler_config(scope, init_config)
+ from_packages_yaml = get_compiler_config_from_packages(configuration, scope=scope)
+ if from_packages_yaml:
+ init_config = False
+ from_compilers_yaml = get_compiler_config(configuration, scope=scope, init_config=init_config)
+
+ result = from_compilers_yaml + from_packages_yaml
+ # Dedupe entries by the compiler they represent
+ # If the entry is invalid, treat it as unique for deduplication
+ key = lambda c: _compiler_from_config_entry(c["compiler"] or id(c))
+ return list(llnl.util.lang.dedupe(result, key=key))
def all_compiler_specs(scope=None, init_config=True):
# Return compiler specs from the merged config.
return [
spack.spec.parse_with_version_concrete(s["compiler"]["spec"], compiler=True)
- for s in all_compilers_config(scope, init_config)
+ for s in all_compilers_config(spack.config.CONFIG, scope=scope, init_config=init_config)
]
def find_compilers(
- path_hints: Optional[List[str]] = None, *, mixed_toolchain=False
+ path_hints: Optional[List[str]] = None,
+ *,
+ scope: Optional[str] = None,
+ mixed_toolchain: bool = False,
+ max_workers: Optional[int] = None,
) -> List["spack.compiler.Compiler"]:
- """Return the list of compilers found in the paths given as arguments.
+ """Searches for compiler in the paths given as argument. If any new compiler is found, the
+ configuration is updated, and the list of new compiler objects is returned.
Args:
path_hints: list of path hints where to look for. A sensible default based on the ``PATH``
environment variable will be used if the value is None
+ scope: configuration scope to modify
mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for
a certain language
+ max_workers: number of processes used to search for compilers
"""
+ import spack.detection
+
+ known_compilers = set(all_compilers(init_config=False))
+
if path_hints is None:
path_hints = get_path("PATH")
default_paths = fs.search_paths_for_executables(*path_hints)
+ if sys.platform == "win32":
+ default_paths.extend(windows_os.WindowsOs().compiler_search_paths)
+ compiler_pkgs = spack.repo.PATH.packages_with_tags(COMPILER_TAG, full=True)
- # To detect the version of the compilers, we dispatch a certain number
- # of function calls to different workers. Here we construct the list
- # of arguments for each call.
- arguments = []
- for o in all_os_classes():
- search_paths = getattr(o, "compiler_search_paths", default_paths)
- arguments.extend(arguments_to_detect_version_fn(o, search_paths))
-
- # Here we map the function arguments to the corresponding calls
- tp = multiprocessing.pool.ThreadPool()
- try:
- detected_versions = tp.map(detect_version, arguments)
- finally:
- tp.close()
-
- def valid_version(item: Tuple[Optional[DetectVersionArgs], Optional[str]]) -> bool:
- value, error = item
- if error is None:
- return True
- try:
- # This will fail on Python 2.6 if a non ascii
- # character is in the error
- tty.debug(error)
- except UnicodeEncodeError:
- pass
- return False
-
- def remove_errors(
- item: Tuple[Optional[DetectVersionArgs], Optional[str]]
- ) -> DetectVersionArgs:
- value, _ = item
- assert value is not None
- return value
-
- return make_compiler_list(
- [remove_errors(detected) for detected in detected_versions if valid_version(detected)],
- mixed_toolchain=mixed_toolchain,
+ detected_packages = spack.detection.by_path(
+ compiler_pkgs, path_hints=default_paths, max_workers=max_workers
)
+ valid_compilers = {}
+ for name, detected in detected_packages.items():
+ compilers = [x for x in detected if CompilerConfigFactory.from_external_spec(x)]
+ if not compilers:
+ continue
+ valid_compilers[name] = compilers
-def find_new_compilers(
- path_hints: Optional[List[str]] = None,
- scope: Optional[str] = None,
- *,
- mixed_toolchain: bool = False,
-):
- """Same as ``find_compilers`` but return only the compilers that are not
- already in compilers.yaml.
+ def _has_fortran_compilers(x):
+ if "compilers" not in x.extra_attributes:
+ return False
- Args:
- path_hints: list of path hints where to look for. A sensible default based on the ``PATH``
- environment variable will be used if the value is None
- scope: scope to look for a compiler. If None consider the merged configuration.
- mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for
- a certain language
- """
- compilers = find_compilers(path_hints, mixed_toolchain=mixed_toolchain)
+ return "fortran" in x.extra_attributes["compilers"]
- return select_new_compilers(compilers, scope)
+ if mixed_toolchain:
+ gccs = [x for x in valid_compilers.get("gcc", []) if _has_fortran_compilers(x)]
+ if gccs:
+ best_gcc = sorted(
+ gccs, key=lambda x: spack.spec.parse_with_version_concrete(x).version
+ )[-1]
+ gfortran = best_gcc.extra_attributes["compilers"]["fortran"]
+ for name in ("llvm", "apple-clang"):
+ if name not in valid_compilers:
+ continue
+ candidates = valid_compilers[name]
+ for candidate in candidates:
+ if _has_fortran_compilers(candidate):
+ continue
+ candidate.extra_attributes["compilers"]["fortran"] = gfortran
+
+ new_compilers = []
+ for name, detected in valid_compilers.items():
+ for config in CompilerConfigFactory.from_specs(detected):
+ c = _compiler_from_config_entry(config["compiler"])
+ if c in known_compilers:
+ continue
+ new_compilers.append(c)
+
+ add_compilers_to_config(new_compilers, scope=scope)
+ return new_compilers
def select_new_compilers(compilers, scope=None):
@@ -315,7 +319,9 @@ def select_new_compilers(compilers, scope=None):
compilers_not_in_config = []
for c in compilers:
arch_spec = spack.spec.ArchSpec((None, c.operating_system, c.target))
- same_specs = compilers_for_spec(c.spec, arch_spec, scope=scope, init_config=False)
+ same_specs = compilers_for_spec(
+ c.spec, arch_spec=arch_spec, scope=scope, init_config=False
+ )
if not same_specs:
compilers_not_in_config.append(c)
@@ -341,7 +347,7 @@ def supported_compilers_for_host_platform() -> List[str]:
return supported_compilers_for_platform(host_plat)
-def supported_compilers_for_platform(platform: spack.platforms.Platform) -> List[str]:
+def supported_compilers_for_platform(platform: "spack.platforms.Platform") -> List[str]:
"""Return a set of compiler class objects supported by Spack
that are also supported by the provided platform
@@ -363,8 +369,9 @@ def all_compiler_names() -> List[str]:
return [replace_apple_clang(name) for name in all_compiler_module_names()]
+@llnl.util.lang.memoized
def all_compiler_module_names() -> List[str]:
- return [name for name in llnl.util.lang.list_modules(spack.paths.compilers_path)]
+ return list(llnl.util.lang.list_modules(spack.paths.compilers_path))
@_auto_compiler_spec
@@ -384,30 +391,38 @@ def find(compiler_spec, scope=None, init_config=True):
def find_specs_by_arch(compiler_spec, arch_spec, scope=None, init_config=True):
"""Return specs of available compilers that match the supplied
compiler spec. Return an empty list if nothing found."""
- return [c.spec for c in compilers_for_spec(compiler_spec, arch_spec, scope, True, init_config)]
+ return [
+ c.spec
+ for c in compilers_for_spec(
+ compiler_spec, arch_spec=arch_spec, scope=scope, init_config=init_config
+ )
+ ]
def all_compilers(scope=None, init_config=True):
- config = get_compiler_config(scope, init_config=init_config)
- compilers = list()
- for items in config:
+ return all_compilers_from(
+ configuration=spack.config.CONFIG, scope=scope, init_config=init_config
+ )
+
+
+def all_compilers_from(configuration, scope=None, init_config=True):
+ compilers = []
+ for items in all_compilers_config(
+ configuration=configuration, scope=scope, init_config=init_config
+ ):
items = items["compiler"]
- compilers.append(_compiler_from_config_entry(items))
+ compiler = _compiler_from_config_entry(items) # can be None in error case
+ if compiler:
+ compilers.append(compiler)
return compilers
@_auto_compiler_spec
-def compilers_for_spec(
- compiler_spec, arch_spec=None, scope=None, use_cache=True, init_config=True
-):
+def compilers_for_spec(compiler_spec, *, arch_spec=None, scope=None, init_config=True):
"""This gets all compilers that satisfy the supplied CompilerSpec.
Returns an empty list if none are found.
"""
- if use_cache:
- config = all_compilers_config(scope, init_config)
- else:
- config = get_compiler_config(scope, init_config)
-
+ config = all_compilers_config(spack.config.CONFIG, scope=scope, init_config=init_config)
matches = set(find(compiler_spec, scope, init_config))
compilers = []
for cspec in matches:
@@ -416,7 +431,7 @@ def compilers_for_spec(
def compilers_for_arch(arch_spec, scope=None):
- config = all_compilers_config(scope)
+ config = all_compilers_config(spack.config.CONFIG, scope=scope, init_config=False)
return list(get_compilers(config, arch_spec=arch_spec))
@@ -448,13 +463,15 @@ def compiler_from_dict(items):
os = items.get("operating_system", None)
target = items.get("target", None)
- if not ("paths" in items and all(n in items["paths"] for n in _path_instance_vars)):
+ if not (
+ "paths" in items and all(n in items["paths"] for n in spack.compiler.PATH_INSTANCE_VARS)
+ ):
raise InvalidCompilerConfigurationError(cspec)
cls = class_for_compiler_name(cspec.name)
compiler_paths = []
- for c in _path_instance_vars:
+ for c in spack.compiler.PATH_INSTANCE_VARS:
compiler_path = items["paths"][c]
if compiler_path != "None":
compiler_paths.append(compiler_path)
@@ -502,7 +519,10 @@ def _compiler_from_config_entry(items):
compiler = _compiler_cache.get(config_id, None)
if compiler is None:
- compiler = compiler_from_dict(items)
+ try:
+ compiler = compiler_from_dict(items)
+ except UnknownCompilerError as e:
+ warnings.warn(e.message)
_compiler_cache[config_id] = compiler
return compiler
@@ -514,9 +534,10 @@ def get_compilers(config, cspec=None, arch_spec=None):
for items in config:
items = items["compiler"]
- # NOTE: in principle this should be equality not satisfies, but config can still
- # be written in old format gcc@10.1.0 instead of gcc@=10.1.0.
- if cspec and not cspec.satisfies(items["spec"]):
+ # We might use equality here.
+ if cspec and not spack.spec.parse_with_version_concrete(
+ items["spec"], compiler=True
+ ).satisfies(cspec):
continue
# If an arch spec is given, confirm that this compiler
@@ -537,7 +558,7 @@ def get_compilers(config, cspec=None, arch_spec=None):
except KeyError:
# TODO: Check if this exception handling makes sense, or if we
# TODO: need to change / refactor tests
- family = arch_spec.target
+ family = str(arch_spec.target)
except AttributeError:
assert arch_spec is None
@@ -554,7 +575,9 @@ def get_compilers(config, cspec=None, arch_spec=None):
raise ValueError(msg)
continue
- compilers.append(_compiler_from_config_entry(items))
+ compiler = _compiler_from_config_entry(items)
+ if compiler:
+ compilers.append(compiler)
return compilers
@@ -576,26 +599,6 @@ def compiler_for_spec(compiler_spec, arch_spec):
return compilers[0]
-@_auto_compiler_spec
-def get_compiler_duplicates(compiler_spec, arch_spec):
- config = spack.config.CONFIG
-
- scope_to_compilers = {}
- for scope in config.scopes:
- compilers = compilers_for_spec(
- compiler_spec, arch_spec=arch_spec, scope=scope, use_cache=False
- )
- if compilers:
- scope_to_compilers[scope] = compilers
-
- cfg_file_to_duplicates = {}
- for scope, compilers in scope_to_compilers.items():
- config_file = config.get_config_filename(scope, "compilers")
- cfg_file_to_duplicates[config_file] = compilers
-
- return cfg_file_to_duplicates
-
-
@llnl.util.lang.memoized
def class_for_compiler_name(compiler_name):
"""Given a compiler module name, get the corresponding Compiler class."""
@@ -609,7 +612,7 @@ def class_for_compiler_name(compiler_name):
submodule_name = compiler_name.replace("-", "_")
module_name = ".".join(["spack", "compilers", submodule_name])
- module_obj = __import__(module_name, fromlist=[None])
+ module_obj = importlib.import_module(module_name)
cls = getattr(module_obj, mod_to_class(compiler_name))
# make a note of the name in the module so we can get to it easily.
@@ -618,271 +621,10 @@ def class_for_compiler_name(compiler_name):
return cls
-def all_os_classes():
- """
- Return the list of classes for all operating systems available on
- this platform
- """
- classes = []
-
- platform = spack.platforms.host()
- for os_class in platform.operating_sys.values():
- classes.append(os_class)
-
- return classes
-
-
def all_compiler_types():
return [class_for_compiler_name(c) for c in supported_compilers()]
-#: Gathers the attribute values by which a detected compiler is considered
-#: unique in Spack.
-#:
-#: - os: the operating system
-#: - compiler_name: the name of the compiler (e.g. 'gcc', 'clang', etc.)
-#: - version: the version of the compiler
-#:
-CompilerID = collections.namedtuple("CompilerID", ["os", "compiler_name", "version"])
-
-#: Variations on a matched compiler name
-NameVariation = collections.namedtuple("NameVariation", ["prefix", "suffix"])
-
-#: Groups together the arguments needed by `detect_version`. The four entries
-#: in the tuple are:
-#:
-#: - id: An instance of the CompilerID named tuple (version can be set to None
-#: as it will be detected later)
-#: - variation: a NameVariation for file being tested
-#: - language: compiler language being tested (one of 'cc', 'cxx', 'fc', 'f77')
-#: - path: full path to the executable being tested
-#:
-DetectVersionArgs = collections.namedtuple(
- "DetectVersionArgs", ["id", "variation", "language", "path"]
-)
-
-
-def arguments_to_detect_version_fn(
- operating_system: spack.operating_systems.OperatingSystem, paths: List[str]
-) -> List[DetectVersionArgs]:
- """Returns a list of DetectVersionArgs tuples to be used in a
- corresponding function to detect compiler versions.
-
- The ``operating_system`` instance can customize the behavior of this
- function by providing a method called with the same name.
-
- Args:
- operating_system: the operating system on which we are looking for compilers
- paths: paths to search for compilers
-
- Returns:
- List of DetectVersionArgs tuples. Each item in the list will be later
- mapped to the corresponding function call to detect the version of the
- compilers in this OS.
- """
-
- def _default(search_paths: List[str]) -> List[DetectVersionArgs]:
- command_arguments: List[DetectVersionArgs] = []
- files_to_be_tested = fs.files_in(*search_paths)
- for compiler_name in supported_compilers_for_host_platform():
- compiler_cls = class_for_compiler_name(compiler_name)
-
- for language in ("cc", "cxx", "f77", "fc"):
- # Select only the files matching a regexp
- for (file, full_path), regexp in itertools.product(
- files_to_be_tested, compiler_cls.search_regexps(language)
- ):
- match = regexp.match(file)
- if match:
- compiler_id = CompilerID(operating_system, compiler_name, None)
- detect_version_args = DetectVersionArgs(
- id=compiler_id,
- variation=NameVariation(*match.groups()),
- language=language,
- path=full_path,
- )
- command_arguments.append(detect_version_args)
-
- return command_arguments
-
- fn = getattr(operating_system, "arguments_to_detect_version_fn", _default)
- return fn(paths)
-
-
-def detect_version(
- detect_version_args: DetectVersionArgs,
-) -> Tuple[Optional[DetectVersionArgs], Optional[str]]:
- """Computes the version of a compiler and adds it to the information
- passed as input.
-
- As this function is meant to be executed by worker processes it won't
- raise any exception but instead will return a (value, error) tuple that
- needs to be checked by the code dispatching the calls.
-
- Args:
- detect_version_args: information on the compiler for which we should detect the version.
-
- Returns:
- A ``(DetectVersionArgs, error)`` tuple. If ``error`` is ``None`` the
- version of the compiler was computed correctly and the first argument
- of the tuple will contain it. Otherwise ``error`` is a string
- containing an explanation on why the version couldn't be computed.
- """
-
- def _default(fn_args):
- compiler_id = fn_args.id
- language = fn_args.language
- compiler_cls = class_for_compiler_name(compiler_id.compiler_name)
- path = fn_args.path
-
- # Get compiler names and the callback to detect their versions
- callback = getattr(compiler_cls, f"{language}_version")
-
- try:
- version = callback(path)
- if version and str(version).strip() and version != "unknown":
- value = fn_args._replace(id=compiler_id._replace(version=version))
- return value, None
-
- error = f"Couldn't get version for compiler {path}".format(path)
- except spack.util.executable.ProcessError as e:
- error = f"Couldn't get version for compiler {path}\n" + str(e)
- except spack.util.executable.ProcessTimeoutError as e:
- error = f"Couldn't get version for compiler {path}\n" + str(e)
- except Exception as e:
- # Catching "Exception" here is fine because it just
- # means something went wrong running a candidate executable.
- error = "Error while executing candidate compiler {0}" "\n{1}: {2}".format(
- path, e.__class__.__name__, str(e)
- )
- return None, error
-
- operating_system = detect_version_args.id.os
- fn = getattr(operating_system, "detect_version", _default)
- return fn(detect_version_args)
-
-
-def make_compiler_list(
- detected_versions: List[DetectVersionArgs], mixed_toolchain: bool = False
-) -> List["spack.compiler.Compiler"]:
- """Process a list of detected versions and turn them into a list of
- compiler specs.
-
- Args:
- detected_versions: list of DetectVersionArgs containing a valid version
- mixed_toolchain: allow mixing compilers from different toolchains if langauge is missing
-
- Returns:
- list: list of Compiler objects
- """
- group_fn = lambda x: (x.id, x.variation, x.language)
- sorted_compilers = sorted(detected_versions, key=group_fn)
-
- # Gather items in a dictionary by the id, name variation and language
- compilers_d: Dict[CompilerID, Dict[NameVariation, dict]] = {}
- for sort_key, group in itertools.groupby(sorted_compilers, key=group_fn):
- compiler_id, name_variation, language = sort_key
- by_compiler_id = compilers_d.setdefault(compiler_id, {})
- by_name_variation = by_compiler_id.setdefault(name_variation, {})
- by_name_variation[language] = next(x.path for x in group)
-
- def _default_make_compilers(cmp_id, paths):
- operating_system, compiler_name, version = cmp_id
- compiler_cls = class_for_compiler_name(compiler_name)
- spec = spack.spec.CompilerSpec(compiler_cls.name, f"={version}")
- paths = [paths.get(x, None) for x in ("cc", "cxx", "f77", "fc")]
- # TODO: johnwparent - revist the following line as per discussion at:
- # https://github.com/spack/spack/pull/33385/files#r1040036318
- target = archspec.cpu.host()
- compiler = compiler_cls(spec, operating_system, str(target.family), paths)
- return [compiler]
-
- # For compilers with the same compiler id:
- #
- # - Prefer with C compiler to without
- # - Prefer with C++ compiler to without
- # - Prefer no variations to variations (e.g., clang to clang-gpu)
- #
- sort_fn = lambda variation: (
- "cc" not in by_compiler_id[variation], # None last
- "cxx" not in by_compiler_id[variation], # None last
- getattr(variation, "prefix", None),
- getattr(variation, "suffix", None),
- )
-
- # Flatten to a list of compiler id, primary variation and compiler dictionary
- flat_compilers: List[Tuple[CompilerID, NameVariation, dict]] = []
- for compiler_id, by_compiler_id in compilers_d.items():
- ordered = sorted(by_compiler_id, key=sort_fn)
- selected_variation = ordered[0]
- selected = by_compiler_id[selected_variation]
-
- # Fill any missing parts from subsequent entries (without mixing toolchains)
- for lang in ["cxx", "f77", "fc"]:
- if lang not in selected:
- next_lang = next(
- (by_compiler_id[v][lang] for v in ordered if lang in by_compiler_id[v]), None
- )
- if next_lang:
- selected[lang] = next_lang
-
- flat_compilers.append((compiler_id, selected_variation, selected))
-
- # Next, fill out the blanks of missing compilers by creating a mixed toolchain (if requested)
- if mixed_toolchain:
- make_mixed_toolchain(flat_compilers)
-
- # Finally, create the compiler list
- compilers = []
- for compiler_id, _, compiler in flat_compilers:
- make_compilers = getattr(compiler_id.os, "make_compilers", _default_make_compilers)
- compilers.extend(make_compilers(compiler_id, compiler))
-
- return compilers
-
-
-def make_mixed_toolchain(compilers: List[Tuple[CompilerID, NameVariation, dict]]) -> None:
- """Add missing compilers across toolchains when they are missing for a particular language.
- This currently only adds the most sensible gfortran to (apple)-clang if it doesn't have a
- fortran compiler (no flang)."""
-
- # First collect the clangs that are missing a fortran compiler
- clangs_without_flang = [
- (id, variation, compiler)
- for id, variation, compiler in compilers
- if id.compiler_name in ("clang", "apple-clang")
- and "f77" not in compiler
- and "fc" not in compiler
- ]
- if not clangs_without_flang:
- return
-
- # Filter on GCCs with fortran compiler
- gccs_with_fortran = [
- (id, variation, compiler)
- for id, variation, compiler in compilers
- if id.compiler_name == "gcc" and "f77" in compiler and "fc" in compiler
- ]
-
- # Sort these GCCs by "best variation" (no prefix / suffix first)
- gccs_with_fortran.sort(
- key=lambda x: (getattr(x[1], "prefix", None), getattr(x[1], "suffix", None))
- )
-
- # Attach the optimal GCC fortran compiler to the clangs that don't have one
- for clang_id, _, clang_compiler in clangs_without_flang:
- gcc_compiler = next(
- (gcc[2] for gcc in gccs_with_fortran if gcc[0].os == clang_id.os), None
- )
-
- if not gcc_compiler:
- continue
-
- # Update the fc / f77 entries
- clang_compiler["f77"] = gcc_compiler["f77"]
- clang_compiler["fc"] = gcc_compiler["fc"]
-
-
def is_mixed_toolchain(compiler):
"""Returns True if the current compiler is a mixed toolchain,
False otherwise.
@@ -890,37 +632,34 @@ def is_mixed_toolchain(compiler):
Args:
compiler (spack.compiler.Compiler): a valid compiler object
"""
- cc = os.path.basename(compiler.cc or "")
- cxx = os.path.basename(compiler.cxx or "")
- f77 = os.path.basename(compiler.f77 or "")
- fc = os.path.basename(compiler.fc or "")
+ import spack.detection.path
+
+ executables = [
+ os.path.basename(compiler.cc or ""),
+ os.path.basename(compiler.cxx or ""),
+ os.path.basename(compiler.f77 or ""),
+ os.path.basename(compiler.fc or ""),
+ ]
toolchains = set()
- for compiler_cls in all_compiler_types():
- # Inspect all the compiler toolchain we know. If a compiler is the
- # only compiler supported there it belongs to that toolchain.
- def name_matches(name, name_list):
- # This is such that 'gcc' matches variations
- # like 'ggc-9' etc that are found in distros
- name, _, _ = name.partition("-")
- return len(name_list) == 1 and name and name in name_list
-
- if any(
- [
- name_matches(cc, compiler_cls.cc_names),
- name_matches(cxx, compiler_cls.cxx_names),
- name_matches(f77, compiler_cls.f77_names),
- name_matches(fc, compiler_cls.fc_names),
- ]
- ):
- tty.debug("[TOOLCHAIN] MATCH {0}".format(compiler_cls.__name__))
- toolchains.add(compiler_cls.__name__)
+ finder = spack.detection.path.ExecutablesFinder()
+
+ for pkg_name in spack.repo.PATH.packages_with_tags(COMPILER_TAG):
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ patterns = finder.search_patterns(pkg=pkg_cls)
+ if not patterns:
+ continue
+ joined_pattern = re.compile(r"|".join(patterns))
+
+ if any(joined_pattern.search(exe) for exe in executables):
+ tty.debug(f"[TOOLCHAIN] MATCH {pkg_name}")
+ toolchains.add(pkg_name)
if len(toolchains) > 1:
if (
- toolchains == set(["Clang", "AppleClang", "Aocc"])
+ toolchains == {"llvm", "apple-clang", "aocc"}
# Msvc toolchain uses Intel ifx
- or toolchains == set(["Msvc", "Dpcpp", "Oneapi"])
+ or toolchains == {"msvc", "intel-oneapi-compilers"}
):
return False
tty.debug("[TOOLCHAINS] {0}".format(toolchains))
@@ -929,20 +668,163 @@ def is_mixed_toolchain(compiler):
return False
+_EXTRA_ATTRIBUTES_KEY = "extra_attributes"
+_COMPILERS_KEY = "compilers"
+_C_KEY = "c"
+_CXX_KEY, _FORTRAN_KEY = "cxx", "fortran"
+
+
+class CompilerConfigFactory:
+ """Class aggregating all ways of constructing a list of compiler config entries."""
+
+ @staticmethod
+ def from_specs(specs: List["spack.spec.Spec"]) -> List[dict]:
+ result = []
+ compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys())
+ for s in specs:
+ if s.name not in compiler_package_names:
+ continue
+
+ candidate = CompilerConfigFactory.from_external_spec(s)
+ if candidate is None:
+ continue
+
+ result.append(candidate)
+ return result
+
+ @staticmethod
+ def from_packages_yaml(packages_yaml) -> List[dict]:
+ compiler_specs = []
+ compiler_package_names = supported_compilers() + list(package_name_to_compiler_name.keys())
+ for name, entry in packages_yaml.items():
+ if name not in compiler_package_names:
+ continue
+
+ externals_config = entry.get("externals", None)
+ if not externals_config:
+ continue
+
+ current_specs = []
+ for current_external in externals_config:
+ compiler = CompilerConfigFactory._spec_from_external_config(current_external)
+ if compiler:
+ current_specs.append(compiler)
+ compiler_specs.extend(current_specs)
+
+ return CompilerConfigFactory.from_specs(compiler_specs)
+
+ @staticmethod
+ def _spec_from_external_config(config):
+ # Allow `@x.y.z` instead of `@=x.y.z`
+ err_header = f"The external spec '{config['spec']}' cannot be used as a compiler"
+ # If extra_attributes is not there I might not want to use this entry as a compiler,
+ # therefore just leave a debug message, but don't be loud with a warning.
+ if _EXTRA_ATTRIBUTES_KEY not in config:
+ tty.debug(f"[{__file__}] {err_header}: missing the '{_EXTRA_ATTRIBUTES_KEY}' key")
+ return None
+ extra_attributes = config[_EXTRA_ATTRIBUTES_KEY]
+ result = spack.spec.Spec(
+ str(spack.spec.parse_with_version_concrete(config["spec"])),
+ external_modules=config.get("modules"),
+ )
+ result.extra_attributes = extra_attributes
+ return result
+
+ @staticmethod
+ def from_external_spec(spec: "spack.spec.Spec") -> Optional[dict]:
+ spec = spack.spec.parse_with_version_concrete(spec)
+ extra_attributes = getattr(spec, _EXTRA_ATTRIBUTES_KEY, None)
+ if extra_attributes is None:
+ return None
+
+ paths = CompilerConfigFactory._extract_compiler_paths(spec)
+ if paths is None:
+ return None
+
+ compiler_spec = spack.spec.CompilerSpec(
+ package_name_to_compiler_name.get(spec.name, spec.name), spec.version
+ )
+
+ operating_system, target = CompilerConfigFactory._extract_os_and_target(spec)
+
+ compiler_entry = {
+ "compiler": {
+ "spec": str(compiler_spec),
+ "paths": paths,
+ "flags": extra_attributes.get("flags", {}),
+ "operating_system": str(operating_system),
+ "target": str(target.family),
+ "modules": getattr(spec, "external_modules", []),
+ "environment": extra_attributes.get("environment", {}),
+ "extra_rpaths": extra_attributes.get("extra_rpaths", []),
+ "implicit_rpaths": extra_attributes.get("implicit_rpaths", None),
+ }
+ }
+ return compiler_entry
+
+ @staticmethod
+ def _extract_compiler_paths(spec: "spack.spec.Spec") -> Optional[Dict[str, str]]:
+ err_header = f"The external spec '{spec}' cannot be used as a compiler"
+ extra_attributes = spec.extra_attributes
+ # If I have 'extra_attributes' warn if 'compilers' is missing,
+ # or we don't have a C compiler
+ if _COMPILERS_KEY not in extra_attributes:
+ warnings.warn(
+ f"{err_header}: missing the '{_COMPILERS_KEY}' key under '{_EXTRA_ATTRIBUTES_KEY}'"
+ )
+ return None
+ attribute_compilers = extra_attributes[_COMPILERS_KEY]
+
+ if _C_KEY not in attribute_compilers:
+ warnings.warn(
+ f"{err_header}: missing the C compiler path under "
+ f"'{_EXTRA_ATTRIBUTES_KEY}:{_COMPILERS_KEY}'"
+ )
+ return None
+ c_compiler = attribute_compilers[_C_KEY]
+
+ # C++ and Fortran compilers are not mandatory, so let's just leave a debug trace
+ if _CXX_KEY not in attribute_compilers:
+ tty.debug(f"[{__file__}] The external spec {spec} does not have a C++ compiler")
+
+ if _FORTRAN_KEY not in attribute_compilers:
+ tty.debug(f"[{__file__}] The external spec {spec} does not have a Fortran compiler")
+
+ # compilers format has cc/fc/f77, externals format has "c/fortran"
+ return {
+ "cc": c_compiler,
+ "cxx": attribute_compilers.get(_CXX_KEY, None),
+ "fc": attribute_compilers.get(_FORTRAN_KEY, None),
+ "f77": attribute_compilers.get(_FORTRAN_KEY, None),
+ }
+
+ @staticmethod
+ def _extract_os_and_target(spec: "spack.spec.Spec"):
+ if not spec.architecture:
+ host_platform = spack.platforms.host()
+ operating_system = host_platform.operating_system("default_os")
+ target = host_platform.target("default_target")
+ else:
+ target = spec.architecture.target
+ if not target:
+ target = spack.platforms.host().target("default_target")
+
+ operating_system = spec.os
+ if not operating_system:
+ host_platform = spack.platforms.host()
+ operating_system = host_platform.operating_system("default_os")
+ return operating_system, target
+
+
class InvalidCompilerConfigurationError(spack.error.SpackError):
def __init__(self, compiler_spec):
super().__init__(
- 'Invalid configuration for [compiler "%s"]: ' % compiler_spec,
- "Compiler configuration must contain entries for all compilers: %s"
- % _path_instance_vars,
+ f'Invalid configuration for [compiler "{compiler_spec}"]: ',
+ f"Compiler configuration must contain entries for "
+ f"all compilers: {spack.compiler.PATH_INSTANCE_VARS}",
)
-class NoCompilersError(spack.error.SpackError):
- def __init__(self):
- super().__init__("Spack could not find any compilers!")
-
-
class UnknownCompilerError(spack.error.SpackError):
def __init__(self, compiler_name):
super().__init__("Spack doesn't support the requested compiler: {0}".format(compiler_name))
@@ -953,25 +835,3 @@ class NoCompilerForSpecError(spack.error.SpackError):
super().__init__(
"No compilers for operating system %s satisfy spec %s" % (target, compiler_spec)
)
-
-
-class CompilerDuplicateError(spack.error.SpackError):
- def __init__(self, compiler_spec, arch_spec):
- config_file_to_duplicates = get_compiler_duplicates(compiler_spec, arch_spec)
- duplicate_table = list((x, len(y)) for x, y in config_file_to_duplicates.items())
- descriptor = lambda num: "time" if num == 1 else "times"
- duplicate_msg = lambda cfgfile, count: "{0}: {1} {2}".format(
- cfgfile, str(count), descriptor(count)
- )
- msg = (
- "Compiler configuration contains entries with duplicate"
- + " specification ({0}, {1})".format(compiler_spec, arch_spec)
- + " in the following files:\n\t"
- + "\n\t".join(duplicate_msg(x, y) for x, y in duplicate_table)
- )
- super().__init__(msg)
-
-
-class CompilerSpecInsufficientlySpecificError(spack.error.SpackError):
- def __init__(self, compiler_spec):
- super().__init__("Multiple compilers satisfy spec %s" % compiler_spec)
diff --git a/lib/spack/spack/compilers/aocc.py b/lib/spack/spack/compilers/aocc.py
index ad67e17338..920e7d0492 100644
--- a/lib/spack/spack/compilers/aocc.py
+++ b/lib/spack/spack/compilers/aocc.py
@@ -13,21 +13,6 @@ from spack.version import ver
class Aocc(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["clang"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["clang++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["flang"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["flang"]
-
- PrgEnv = "PrgEnv-aocc"
- PrgEnv_compiler = "aocc"
-
version_argument = "--version"
@property
@@ -131,5 +116,5 @@ class Aocc(Compiler):
def _handle_default_flag_addtions(self):
# This is a known issue for AOCC 3.0 see:
# https://developer.amd.com/wp-content/resources/AOCC-3.0-Install-Guide.pdf
- if self.real_version.satisfies(ver("3.0.0")):
+ if self.version.satisfies(ver("3.0.0")):
return "-Wno-unused-command-line-argument " "-mllvm -eliminate-similar-expr=false"
diff --git a/lib/spack/spack/compilers/apple_clang.py b/lib/spack/spack/compilers/apple_clang.py
index 9201b16402..7537620709 100644
--- a/lib/spack/spack/compilers/apple_clang.py
+++ b/lib/spack/spack/compilers/apple_clang.py
@@ -8,7 +8,6 @@ import llnl.util.lang
import spack.compiler
import spack.compilers.clang
-import spack.util.executable
from spack.version import Version
diff --git a/lib/spack/spack/compilers/arm.py b/lib/spack/spack/compilers/arm.py
index 3bf40aec20..84e661337b 100644
--- a/lib/spack/spack/compilers/arm.py
+++ b/lib/spack/spack/compilers/arm.py
@@ -9,18 +9,6 @@ import spack.compiler
class Arm(spack.compiler.Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["armclang"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["armclang++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["armflang"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["armflang"]
-
# Named wrapper links within lib/spack/env
link_paths = {
"cc": os.path.join("arm", "armclang"),
@@ -90,11 +78,3 @@ class Arm(spack.compiler.Compiler):
return "-fPIC"
required_libs = ["libclang", "libflang"]
-
- @classmethod
- def fc_version(cls, fc):
- return cls.default_version(fc)
-
- @classmethod
- def f77_version(cls, f77):
- return cls.fc_version(f77)
diff --git a/lib/spack/spack/compilers/cce.py b/lib/spack/spack/compilers/cce.py
index e9377a0bb1..7082ffa3c9 100644
--- a/lib/spack/spack/compilers/cce.py
+++ b/lib/spack/spack/compilers/cce.py
@@ -19,27 +19,12 @@ class Cce(Compiler):
if not self.is_clang_based:
self.version_argument = "-V"
- # Subclasses use possible names of C compiler
- cc_names = ["craycc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["crayCC"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["crayftn"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["crayftn"]
-
# MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes.
suffixes = [r"-mp-\d\.\d"]
- PrgEnv = "PrgEnv-cray"
- PrgEnv_compiler = "cce"
-
@property
def link_paths(self):
- if any(self.PrgEnv in m for m in self.modules):
+ if any("PrgEnv-cray" in m for m in self.modules):
# Old module-based interface to cray compilers
return {
"cc": os.path.join("cce", "cc"),
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 88154a1921..f4a2708164 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -16,7 +16,6 @@ f77_mapping = [
("gfortran", os.path.join("clang", "gfortran")),
("xlf_r", os.path.join("xl_r", "xlf_r")),
("xlf", os.path.join("xl", "xlf")),
- ("pgfortran", os.path.join("pgi", "pgfortran")),
("ifort", os.path.join("intel", "ifort")),
]
@@ -25,24 +24,11 @@ fc_mapping = [
("gfortran", os.path.join("clang", "gfortran")),
("xlf90_r", os.path.join("xl_r", "xlf90_r")),
("xlf90", os.path.join("xl", "xlf90")),
- ("pgfortran", os.path.join("pgi", "pgfortran")),
("ifort", os.path.join("intel", "ifort")),
]
class Clang(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["clang"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["clang++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["flang"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["flang"]
-
version_argument = "--version"
@property
@@ -96,6 +82,8 @@ class Clang(Compiler):
openmp_flag = "-fopenmp"
+ # C++ flags based on CMake Modules/Compiler/Clang.cmake
+
@property
def cxx11_flag(self):
if self.real_version < Version("3.3"):
@@ -121,6 +109,24 @@ class Clang(Compiler):
return "-std=c++17"
@property
+ def cxx20_flag(self):
+ if self.real_version < Version("5.0"):
+ raise UnsupportedCompilerFlag(self, "the C++20 standard", "cxx20_flag", "< 5.0")
+ elif self.real_version < Version("11.0"):
+ return "-std=c++2a"
+ else:
+ return "-std=c++20"
+
+ @property
+ def cxx23_flag(self):
+ if self.real_version < Version("12.0"):
+ raise UnsupportedCompilerFlag(self, "the C++23 standard", "cxx23_flag", "< 12.0")
+ elif self.real_version < Version("17.0"):
+ return "-std=c++2b"
+ else:
+ return "-std=c++23"
+
+ @property
def c99_flag(self):
return "-std=c99"
@@ -142,7 +148,10 @@ class Clang(Compiler):
def c23_flag(self):
if self.real_version < Version("9.0"):
raise UnsupportedCompilerFlag(self, "the C23 standard", "c23_flag", "< 9.0")
- return "-std=c2x"
+ elif self.real_version < Version("18.0"):
+ return "-std=c2x"
+ else:
+ return "-std=c23"
@property
def cc_pic_flag(self):
@@ -171,10 +180,11 @@ class Clang(Compiler):
match = re.search(
# Normal clang compiler versions are left as-is
- r"clang version ([^ )\n]+)-svn[~.\w\d-]*|"
+ r"(?:clang|flang-new) version ([^ )\n]+)-svn[~.\w\d-]*|"
# Don't include hyphenated patch numbers in the version
# (see https://github.com/spack/spack/pull/14365 for details)
- r"clang version ([^ )\n]+?)-[~.\w\d-]*|" r"clang version ([^ )\n]+)",
+ r"(?:clang|flang-new) version ([^ )\n]+?)-[~.\w\d-]*|"
+ r"(?:clang|flang-new) version ([^ )\n]+)",
output,
)
if match:
diff --git a/lib/spack/spack/compilers/dpcpp.py b/lib/spack/spack/compilers/dpcpp.py
deleted file mode 100644
index 392817fd39..0000000000
--- a/lib/spack/spack/compilers/dpcpp.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2013-2024 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 spack.compilers.oneapi
-
-
-class Dpcpp(spack.compilers.oneapi.Oneapi):
- """This is the same as the oneAPI compiler but uses dpcpp instead of
- icpx (for DPC++ source files). It explicitly refers to dpcpp, so that
- CMake test files which check the compiler name (e.g. CMAKE_CXX_COMPILER)
- detect it as dpcpp.
-
- Ideally we could switch out icpx for dpcpp where needed in the oneAPI
- compiler definition, but two things are needed for that: (a) a way to
- tell the compiler that it should be using dpcpp and (b) a way to
- customize the link_paths
-
- See also: https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/using-the-command-line/invoking-the-compiler.html
- """
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["dpcpp"]
-
- # Named wrapper links within build_env_path
- link_paths = {
- "cc": os.path.join("oneapi", "icx"),
- "cxx": os.path.join("oneapi", "dpcpp"),
- "f77": os.path.join("oneapi", "ifx"),
- "fc": os.path.join("oneapi", "ifx"),
- }
diff --git a/lib/spack/spack/compilers/fj.py b/lib/spack/spack/compilers/fj.py
index a9df7d2c23..54fa832fd7 100644
--- a/lib/spack/spack/compilers/fj.py
+++ b/lib/spack/spack/compilers/fj.py
@@ -9,18 +9,6 @@ import spack.compiler
class Fj(spack.compiler.Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["fcc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["FCC"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["frt"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["frt"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("fj", "fcc"),
diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py
index 6d635523ae..41915f5a8a 100644
--- a/lib/spack/spack/compilers/gcc.py
+++ b/lib/spack/spack/compilers/gcc.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-import re
from llnl.util.filesystem import ancestor
@@ -15,18 +14,6 @@ from spack.version import Version
class Gcc(spack.compiler.Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["gcc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["g++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["gfortran"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["gfortran"]
-
# MacPorts builds gcc versions with prefixes and -mp-X or -mp-X.Y suffixes.
# Homebrew and Linuxbrew may build gcc with -X, -X.Y suffixes.
# Old compatibility versions may contain XY suffixes.
@@ -40,9 +27,6 @@ class Gcc(spack.compiler.Compiler):
"fc": os.path.join("gcc", "gfortran"),
}
- PrgEnv = "PrgEnv-gnu"
- PrgEnv_compiler = "gcc"
-
@property
def verbose_flag(self):
return "-v"
@@ -184,40 +168,6 @@ class Gcc(spack.compiler.Compiler):
version = cls.extract_version_from_output(output)
return version
- @classmethod
- def fc_version(cls, fc):
- """Older versions of gfortran use the ``-dumpversion`` option.
- Output looks like this::
-
- GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
- Copyright (C) 2010 Free Software Foundation, Inc.
-
- or::
-
- 4.8.5
-
- In GCC 7, this option was changed to only return the major
- version of the compiler::
-
- 7
-
- A new ``-dumpfullversion`` option was added that gives us
- what we want::
-
- 7.2.0
- """
- output = spack.compiler.get_compiler_version_output(fc, "-dumpversion")
- match = re.search(r"(?:GNU Fortran \(GCC\) )?([\d.]+)", output)
- version = match.group(match.lastindex) if match else "unknown"
- if Version(version) >= Version("7"):
- output = spack.compiler.get_compiler_version_output(fc, "-dumpfullversion")
- version = cls.extract_version_from_output(output)
- return version
-
- @classmethod
- def f77_version(cls, f77):
- return cls.fc_version(f77)
-
@property
def stdcxx_libs(self):
return ("-lstdc++",)
diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py
index c7b0d8033c..46e0584778 100644
--- a/lib/spack/spack/compilers/intel.py
+++ b/lib/spack/spack/compilers/intel.py
@@ -11,18 +11,6 @@ from spack.version import Version
class Intel(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["icc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["icpc"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["ifort"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["ifort"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("intel", "icc"),
@@ -31,9 +19,6 @@ class Intel(Compiler):
"fc": os.path.join("intel", "ifort"),
}
- PrgEnv = "PrgEnv-intel"
- PrgEnv_compiler = "intel"
-
if sys.platform == "win32":
version_argument = "/QV"
else:
@@ -108,6 +93,14 @@ class Intel(Compiler):
return "-std=c1x"
@property
+ def c18_flag(self):
+ # c18 supported since oneapi 2022, which is classic version 2021.5.0
+ if self.real_version < Version("21.5.0"):
+ raise UnsupportedCompilerFlag(self, "the C18 standard", "c18_flag", "< 21.5.0")
+ else:
+ return "-std=c18"
+
+ @property
def cc_pic_flag(self):
return "-fPIC"
@@ -126,3 +119,13 @@ class Intel(Compiler):
@property
def stdcxx_libs(self):
return ("-cxxlib",)
+
+ def setup_custom_environment(self, pkg, env):
+ # Edge cases for Intel's oneAPI compilers when using the legacy classic compilers:
+ # Always pass flags to disable deprecation warnings, since these warnings can
+ # confuse tools that parse the output of compiler commands (e.g. version checks).
+ if self.real_version >= Version("2021") and self.real_version < Version("2024"):
+ env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441")
+ env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441")
+ if self.real_version >= Version("2021") and self.real_version < Version("2025"):
+ env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448")
diff --git a/lib/spack/spack/compilers/msvc.py b/lib/spack/spack/compilers/msvc.py
index e6cd29c570..c3e9e13d71 100644
--- a/lib/spack/spack/compilers/msvc.py
+++ b/lib/spack/spack/compilers/msvc.py
@@ -7,7 +7,10 @@ import os
import re
import subprocess
import sys
-from typing import Dict, List, Set
+import tempfile
+from typing import Dict
+
+import archspec.cpu
import spack.compiler
import spack.operating_systems.windows_os
@@ -15,17 +18,9 @@ import spack.platforms
import spack.util.executable
from spack.compiler import Compiler
from spack.error import SpackError
-from spack.version import Version
-
-avail_fc_version: Set[str] = set()
-fc_path: Dict[str, str] = dict()
+from spack.version import Version, VersionRange
-fortran_mapping = {
- "2021.3.0": "19.29.30133",
- "2021.2.1": "19.28.29913",
- "2021.2.0": "19.28.29334",
- "2021.1.0": "19.28.29333",
-}
+FC_PATH: Dict[str, str] = dict()
class CmdCall:
@@ -112,30 +107,16 @@ class VCVarsInvocation(VarsInvocation):
return f"{script} {self.arch} {self.sdk_ver} {self.vcvars_ver}"
-def get_valid_fortran_pth(comp_ver):
- cl_ver = str(comp_ver)
+def get_valid_fortran_pth():
+ """Assign maximum available fortran compiler version"""
+ # TODO (johnwparent): validate compatibility w/ try compiler
+ # functionality when added
sort_fn = lambda fc_ver: Version(fc_ver)
- sort_fc_ver = sorted(list(avail_fc_version), key=sort_fn)
- for ver in sort_fc_ver:
- if ver in fortran_mapping:
- if Version(cl_ver) <= Version(fortran_mapping[ver]):
- return fc_path[ver]
- return None
+ sort_fc_ver = sorted(list(FC_PATH.keys()), key=sort_fn)
+ return FC_PATH[sort_fc_ver[-1]] if sort_fc_ver else None
class Msvc(Compiler):
- # Subclasses use possible names of C compiler
- cc_names: List[str] = ["cl"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names: List[str] = ["cl"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names: List[str] = ["ifx"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names: List[str] = ["ifx"]
-
# Named wrapper links within build_env_path
# Due to the challenges of supporting compiler wrappers
# in Windows, we leave these blank, and dynamically compute
@@ -164,11 +145,9 @@ class Msvc(Compiler):
# This positional argument "paths" is later parsed and process by the base class
# via the call to `super` later in this method
paths = args[3]
- # This positional argument "cspec" is also parsed and handled by the base class
- # constructor
- cspec = args[0]
- new_pth = [pth if pth else get_valid_fortran_pth(cspec.version) for pth in paths]
- paths[:] = new_pth
+ latest_fc = get_valid_fortran_pth()
+ new_pth = [pth if pth else latest_fc for pth in paths[2:]]
+ paths[2:] = new_pth
# Initialize, deferring to base class but then adding the vcvarsallfile
# file based on compiler executable path.
super().__init__(*args, **kwargs)
@@ -180,11 +159,14 @@ class Msvc(Compiler):
# and stores their path, but their respective VCVARS
# file must be invoked before useage.
env_cmds = []
- compiler_root = os.path.join(self.cc, "../../../../../../..")
+ compiler_root = os.path.join(os.path.dirname(self.cc), "../../../../../..")
vcvars_script_path = os.path.join(compiler_root, "Auxiliary", "Build", "vcvars64.bat")
# get current platform architecture and format for vcvars argument
arch = spack.platforms.real_host().default.lower()
arch = arch.replace("-", "_")
+ if str(archspec.cpu.host().family) == "x86_64":
+ arch = "amd64"
+
self.vcvars_call = VCVarsInvocation(vcvars_script_path, arch, self.msvc_version)
env_cmds.append(self.vcvars_call)
# Below is a check for a valid fortran path
@@ -192,11 +174,34 @@ class Msvc(Compiler):
# paths[2] refers to the fc path and is a generic check
# for a fortran compiler
if paths[2]:
+
+ def get_oneapi_root(pth: str):
+ """From within a prefix known to be a oneAPI path
+ determine the oneAPI root path from arbitrary point
+ under root
+
+ Args:
+ pth: path prefixed within oneAPI root
+ """
+ if not pth:
+ return ""
+ while os.path.basename(pth) and os.path.basename(pth) != "oneAPI":
+ pth = os.path.dirname(pth)
+ return pth
+
# If this found, it sets all the vars
- oneapi_root = os.getenv("ONEAPI_ROOT")
+ oneapi_root = get_oneapi_root(self.fc)
+ if not oneapi_root:
+ raise RuntimeError(f"Non-oneAPI Fortran compiler {self.fc} assigned to MSVC")
oneapi_root_setvars = os.path.join(oneapi_root, "setvars.bat")
+ # some oneAPI exes return a version more precise than their
+ # install paths specify, so we determine path from
+ # the install path rather than the fc executable itself
+ numver = r"\d+\.\d+(?:\.\d+)?"
+ pattern = f"((?:{numver})|(?:latest))"
+ version_from_path = re.search(pattern, self.fc).group(1)
oneapi_version_setvars = os.path.join(
- oneapi_root, "compiler", str(self.ifx_version), "env", "vars.bat"
+ oneapi_root, "compiler", version_from_path, "env", "vars.bat"
)
# order matters here, the specific version env must be invoked first,
# otherwise it will be ignored if the root setvars sets up the oneapi
@@ -207,6 +212,30 @@ class Msvc(Compiler):
self.msvc_compiler_environment = CmdCall(*env_cmds)
@property
+ def cxx11_flag(self):
+ return "/std:c++11"
+
+ @property
+ def cxx14_flag(self):
+ return "/std:c++14"
+
+ @property
+ def cxx17_flag(self):
+ return "/std:c++17"
+
+ @property
+ def cxx20_flag(self):
+ return "/std:c++20"
+
+ @property
+ def c11_flag(self):
+ return "/std:c11"
+
+ @property
+ def c17_flag(self):
+ return "/std:c17"
+
+ @property
def msvc_version(self):
"""This is the VCToolset version *NOT* the actual version of the cl compiler
For CL version, query `Msvc.cl_version`"""
@@ -214,24 +243,66 @@ class Msvc(Compiler):
@property
def short_msvc_version(self):
+ """This is the shorthand VCToolset version of form
+ MSVC<short-ver>
+ """
+ return "MSVC" + self.vc_toolset_ver
+
+ @property
+ def vc_toolset_ver(self):
"""
- This is the shorthand VCToolset version of form
- MSVC<short-ver> *NOT* the full version, for that see
+ The toolset version is the version of the combined set of cl and link
+ This typically relates directly to VS version i.e. VS 2022 is v143
+ VS 19 is v142, etc.
+ This value is defined by the first three digits of the major + minor
+ version of the VS toolset (143 for 14.3x.bbbbb). Traditionally the
+ minor version has remained a static two digit number for a VS release
+ series, however, as of VS22, this is no longer true, both
+ 14.4x.bbbbb and 14.3x.bbbbb are considered valid VS22 VC toolset
+ versions due to a change in toolset minor version sentiment.
+
+ This is *NOT* the full version, for that see
Msvc.msvc_version or MSVC.platform_toolset_ver for the
raw platform toolset version
+
"""
- ver = self.platform_toolset_ver
- return "MSVC" + ver
+ ver = self.msvc_version[:2].joined.string[:3]
+ return ver
@property
def platform_toolset_ver(self):
"""
This is the platform toolset version of current MSVC compiler
- i.e. 142.
+ i.e. 142. The platform toolset is the targeted MSVC library/compiler
+ versions by compilation (this is different from the VC Toolset)
+
+
This is different from the VC toolset version as established
- by `short_msvc_version`
+ by `short_msvc_version`, but typically are represented by the same
+ three digit value
"""
- return self.msvc_version[:2].joined.string[:3]
+ # Typically VS toolset version and platform toolset versions match
+ # VS22 introduces the first divergence of VS toolset version
+ # (144 for "recent" releases) and platform toolset version (143)
+ # so it needs additional handling until MS releases v144
+ # (assuming v144 is also for VS22)
+ # or adds better support for detection
+ # TODO: (johnwparent) Update this logic for the next platform toolset
+ # or VC toolset version update
+ toolset_ver = self.vc_toolset_ver
+ vs22_toolset = Version(toolset_ver) > Version("142")
+ return toolset_ver if not vs22_toolset else "143"
+
+ @property
+ def visual_studio_version(self):
+ """The four digit Visual Studio version (i.e. 2019 or 2022)
+
+ Note: This differs from the msvc version or toolset version as
+ those properties track the compiler and build tools version
+ respectively, whereas this tracks the VS release associated
+ with a given MSVC compiler.
+ """
+ return re.search(r"[0-9]{4}", self.cc).group(0)
def _compiler_version(self, compiler):
"""Returns version object for given compiler"""
@@ -292,6 +363,15 @@ class Msvc(Compiler):
else:
env.set_path(env_var, int_env[env_var].split(os.pathsep))
+ # certain versions of ifx (2021.3.0:2023.1.0) do not play well with env:TMP
+ # that has a "." character in the path
+ # Work around by pointing tmp to the stage for the duration of the build
+ if self.fc and Version(self.fc_version(self.fc)).satisfies(
+ VersionRange("2021.3.0", "2023.1.0")
+ ):
+ new_tmp = tempfile.mkdtemp(dir=pkg.stage.path)
+ env.set("TMP", new_tmp)
+
env.set("CC", self.cc)
env.set("CXX", self.cxx)
env.set("FC", self.fc)
@@ -299,24 +379,16 @@ class Msvc(Compiler):
@classmethod
def fc_version(cls, fc):
- # We're using intel for the Fortran compilers, which exist if
- # ONEAPI_ROOT is a meaningful variable
if not sys.platform == "win32":
return "unknown"
fc_ver = cls.default_version(fc)
- avail_fc_version.add(fc_ver)
- fc_path[fc_ver] = fc
- if os.getenv("ONEAPI_ROOT"):
- try:
- sps = spack.operating_systems.windows_os.WindowsOs.compiler_search_paths
- except AttributeError:
- raise SpackError("Windows compiler search paths not established")
- clp = spack.util.executable.which_string("cl", path=sps)
- ver = cls.default_version(clp)
- else:
- ver = fc_ver
- return ver
-
- @classmethod
- def f77_version(cls, f77):
- return cls.fc_version(f77)
+ FC_PATH[fc_ver] = fc
+ try:
+ sps = spack.operating_systems.windows_os.WindowsOs().compiler_search_paths
+ except AttributeError:
+ raise SpackError(
+ "Windows compiler search paths not established, "
+ "please report this behavior to github.com/spack/spack"
+ )
+ clp = spack.util.executable.which_string("cl", path=sps)
+ return cls.default_version(clp) if clp else fc_ver
diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py
index c12ccec7bf..4c735c3562 100644
--- a/lib/spack/spack/compilers/nag.py
+++ b/lib/spack/spack/compilers/nag.py
@@ -5,7 +5,6 @@
import os
import re
-from typing import List
import llnl.util.lang
@@ -13,18 +12,6 @@ import spack.compiler
class Nag(spack.compiler.Compiler):
- # Subclasses use possible names of C compiler
- cc_names: List[str] = []
-
- # Subclasses use possible names of C++ compiler
- cxx_names: List[str] = []
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["nagfor"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["nagfor"]
-
# Named wrapper links within build_env_path
# Use default wrappers for C and C++, in case provided in compilers.yaml
link_paths = {
@@ -64,7 +51,7 @@ class Nag(spack.compiler.Compiler):
#
# This way, we at least enable the implicit rpath detection, which is
# based on compilation of a C file (see method
- # spack.compiler._get_compiler_link_paths): in the case of a mixed
+ # spack.compiler._compile_dummy_c_source): in the case of a mixed
# NAG/GCC toolchain, the flag will be passed to g++ (e.g.
# 'g++ -Wl,-v ./main.c'), otherwise, the flag will be passed to nagfor
# (e.g. 'nagfor -Wl,-v ./main.c' - note that nagfor recognizes '.c'
diff --git a/lib/spack/spack/compilers/nvhpc.py b/lib/spack/spack/compilers/nvhpc.py
index 1078e92108..9031ee8fc3 100644
--- a/lib/spack/spack/compilers/nvhpc.py
+++ b/lib/spack/spack/compilers/nvhpc.py
@@ -9,18 +9,6 @@ from spack.compiler import Compiler
class Nvhpc(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["nvc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["nvc++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["nvfortran"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["nvfortran"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("nvhpc", "nvc"),
@@ -29,9 +17,6 @@ class Nvhpc(Compiler):
"fc": os.path.join("nvhpc", "nvfortran"),
}
- PrgEnv = "PrgEnv-nvhpc"
- PrgEnv_compiler = "nvhpc"
-
version_argument = "--version"
version_regex = r"nv[^ ]* (?:[^ ]+ Dev-r)?([0-9.]+)(?:-[0-9]+)?"
diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py
index ecba99081a..75cee851d7 100644
--- a/lib/spack/spack/compilers/oneapi.py
+++ b/lib/spack/spack/compilers/oneapi.py
@@ -4,26 +4,17 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-from os.path import dirname
+from os.path import dirname, join
from llnl.util import tty
+from llnl.util.filesystem import ancestor
+import spack.util.executable
from spack.compiler import Compiler
+from spack.version import Version
class Oneapi(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["icx"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["icpx"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["ifx"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["ifx"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("oneapi", "icx"),
@@ -32,9 +23,6 @@ class Oneapi(Compiler):
"fc": os.path.join("oneapi", "ifx"),
}
- PrgEnv = "PrgEnv-oneapi"
- PrgEnv_compiler = "oneapi"
-
version_argument = "--version"
version_regex = r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
@@ -130,13 +118,48 @@ class Oneapi(Compiler):
def stdcxx_libs(self):
return ("-cxxlib",)
+ @property
+ def prefix(self):
+ # OneAPI reports its install prefix when running ``--version``
+ # on the line ``InstalledDir: <prefix>/bin/compiler``.
+ cc = spack.util.executable.Executable(self.cc)
+ with self.compiler_environment():
+ oneapi_output = cc("--version", output=str, error=str)
+
+ for line in oneapi_output.splitlines():
+ if line.startswith("InstalledDir:"):
+ oneapi_prefix = line.split(":")[1].strip()
+ # Go from <prefix>/bin/compiler to <prefix>
+ return ancestor(oneapi_prefix, 2)
+
+ raise RuntimeError(
+ "could not find install prefix of OneAPI from output:\n\t{}".format(oneapi_output)
+ )
+
def setup_custom_environment(self, pkg, env):
# workaround bug in icpx driver where it requires sycl-post-link is on the PATH
# It is located in the same directory as the driver. Error message:
# clang++: error: unable to execute command:
# Executable "sycl-post-link" doesn't exist!
- if self.cxx:
+ # also ensures that shared objects and libraries required by the compiler,
+ # e.g. libonnx, can be found succesfully
+ # due to a fix, this is no longer required for OneAPI versions >= 2024.2
+ if self.cxx and pkg.spec.satisfies("%oneapi@:2024.1"):
env.prepend_path("PATH", dirname(self.cxx))
+ env.prepend_path("LD_LIBRARY_PATH", join(dirname(dirname(self.cxx)), "lib"))
+
+ # Edge cases for Intel's oneAPI compilers when using the legacy classic compilers:
+ # Always pass flags to disable deprecation warnings, since these warnings can
+ # confuse tools that parse the output of compiler commands (e.g. version checks).
+ # This is really only needed for Fortran, since oneapi@ should be using either
+ # icx+icpx+ifx or icx+icpx+ifort. But to be on the safe side (some users may
+ # want to try to swap icpx against icpc, for example), and since the Intel LLVM
+ # compilers accept these diag-disable flags, we apply them for all compilers.
+ if self.real_version >= Version("2021") and self.real_version < Version("2024"):
+ env.append_flags("SPACK_ALWAYS_CFLAGS", "-diag-disable=10441")
+ env.append_flags("SPACK_ALWAYS_CXXFLAGS", "-diag-disable=10441")
+ if self.real_version >= Version("2021") and self.real_version < Version("2025"):
+ env.append_flags("SPACK_ALWAYS_FFLAGS", "-diag-disable=10448")
# 2024 release bumped the libsycl version because of an ABI
# change, 2024 compilers are required. You will see this
diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py
deleted file mode 100644
index 1e8656fd3f..0000000000
--- a/lib/spack/spack/compilers/pgi.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 2013-2024 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.compiler import Compiler, UnsupportedCompilerFlag
-from spack.version import Version
-
-
-class Pgi(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["pgcc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["pgc++", "pgCC"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["pgfortran", "pgf77"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["pgfortran", "pgf95", "pgf90"]
-
- # Named wrapper links within build_env_path
- link_paths = {
- "cc": os.path.join("pgi", "pgcc"),
- "cxx": os.path.join("pgi", "pgc++"),
- "f77": os.path.join("pgi", "pgfortran"),
- "fc": os.path.join("pgi", "pgfortran"),
- }
-
- PrgEnv = "PrgEnv-pgi"
- PrgEnv_compiler = "pgi"
-
- version_argument = "-V"
- ignore_version_errors = [2] # `pgcc -V` on PowerPC annoyingly returns 2
- version_regex = r"pg[^ ]* ([0-9.]+)-[0-9]+ (LLVM )?[^ ]+ target on "
-
- @property
- def verbose_flag(self):
- return "-v"
-
- @property
- def debug_flags(self):
- return ["-g", "-gopt"]
-
- @property
- def opt_flags(self):
- return ["-O", "-O0", "-O1", "-O2", "-O3", "-O4"]
-
- @property
- def openmp_flag(self):
- return "-mp"
-
- @property
- def cxx11_flag(self):
- return "-std=c++11"
-
- @property
- def cc_pic_flag(self):
- return "-fpic"
-
- @property
- def cxx_pic_flag(self):
- return "-fpic"
-
- @property
- def f77_pic_flag(self):
- return "-fpic"
-
- @property
- def fc_pic_flag(self):
- return "-fpic"
-
- required_libs = ["libpgc", "libpgf90"]
-
- @property
- def c99_flag(self):
- if self.real_version >= Version("12.10"):
- return "-c99"
- raise UnsupportedCompilerFlag(self, "the C99 standard", "c99_flag", "< 12.10")
-
- @property
- def c11_flag(self):
- if self.real_version >= Version("15.3"):
- return "-c11"
- raise UnsupportedCompilerFlag(self, "the C11 standard", "c11_flag", "< 15.3")
-
- @property
- def stdcxx_libs(self):
- return ("-pgc++libs",)
diff --git a/lib/spack/spack/compilers/rocmcc.py b/lib/spack/spack/compilers/rocmcc.py
index 863d3c2cbf..04c3456066 100644
--- a/lib/spack/spack/compilers/rocmcc.py
+++ b/lib/spack/spack/compilers/rocmcc.py
@@ -11,21 +11,6 @@ import spack.compilers.clang
class Rocmcc(spack.compilers.clang.Clang):
- # Subclasses use possible names of C compiler
- cc_names = ["amdclang"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["amdclang++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["amdflang"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["amdflang"]
-
- PrgEnv = "PrgEnv-amd"
- PrgEnv_compiler = "amd"
-
@property
def link_paths(self):
link_paths = {
@@ -64,14 +49,6 @@ class Rocmcc(spack.compilers.clang.Clang):
if match:
return ".".join(match.groups())
- @classmethod
- def fc_version(cls, fortran_compiler):
- return cls.default_version(fortran_compiler)
-
- @classmethod
- def f77_version(cls, f77):
- return cls.fc_version(f77)
-
@property
def stdcxx_libs(self):
return ("-lstdc++",)
diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py
index 1c1be0e41b..f3232e5807 100644
--- a/lib/spack/spack/compilers/xl.py
+++ b/lib/spack/spack/compilers/xl.py
@@ -10,18 +10,6 @@ from spack.version import Version
class Xl(Compiler):
- # Subclasses use possible names of C compiler
- cc_names = ["xlc"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["xlC", "xlc++"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["xlf"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["xlf90", "xlf95", "xlf2003", "xlf2008"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("xl", "xlc"),
@@ -103,31 +91,3 @@ class Xl(Compiler):
# For Fortran 90 and beyond, it is set by default and has not impact.
# Its use has no negative side effects.
return "-qzerosize"
-
- @classmethod
- def fc_version(cls, fc):
- # The fortran and C/C++ versions of the XL compiler are always
- # two units apart. By this we mean that the fortran release that
- # goes with XL C/C++ 11.1 is 13.1. Having such a difference in
- # version number is confusing spack quite a lot. Most notably
- # if you keep the versions as is the default xl compiler will
- # only have fortran and no C/C++. So we associate the Fortran
- # compiler with the version associated to the C/C++ compiler.
- # One last stumble. Version numbers over 10 have at least a .1
- # those under 10 a .0. There is no xlf 9.x or under currently
- # available. BG/P and BG/L can such a compiler mix and possibly
- # older version of AIX and linux on power.
- fortran_version = cls.default_version(fc)
- if fortran_version >= 16:
- # Starting with version 16.1, the XL C and Fortran compilers
- # have the same version. So no need to downgrade the Fortran
- # compiler version to match that of the C compiler version.
- return str(fortran_version)
- c_version = float(fortran_version) - 2
- if c_version < 10:
- c_version = c_version - 0.1
- return str(c_version)
-
- @classmethod
- def f77_version(cls, f77):
- return cls.fc_version(f77)
diff --git a/lib/spack/spack/compilers/xl_r.py b/lib/spack/spack/compilers/xl_r.py
index 15bcb7234f..7a3007a9c4 100644
--- a/lib/spack/spack/compilers/xl_r.py
+++ b/lib/spack/spack/compilers/xl_r.py
@@ -9,18 +9,6 @@ import spack.compilers.xl
class XlR(spack.compilers.xl.Xl):
- # Subclasses use possible names of C compiler
- cc_names = ["xlc_r"]
-
- # Subclasses use possible names of C++ compiler
- cxx_names = ["xlC_r", "xlc++_r"]
-
- # Subclasses use possible names of Fortran 77 compiler
- f77_names = ["xlf_r"]
-
- # Subclasses use possible names of Fortran 90 compiler
- fc_names = ["xlf90_r", "xlf95_r", "xlf2003_r", "xlf2008_r"]
-
# Named wrapper links within build_env_path
link_paths = {
"cc": os.path.join("xl_r", "xlc_r"),
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index bfa3c133b7..65ad755e7e 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -2,810 +2,206 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-"""
-Functions here are used to take abstract specs and make them concrete.
-For example, if a spec asks for a version between 1.8 and 1.9, these
-functions might take will take the most recent 1.9 version of the
-package available. Or, if the user didn't specify a compiler for a
-spec, then this will assign a compiler to the spec based on defaults
-or user preferences.
-
-TODO: make this customizable and allow users to configure
- concretization policies.
-"""
-import functools
-import platform
-import tempfile
+"""High-level functions to concretize list of specs"""
+import sys
+import time
from contextlib import contextmanager
-from itertools import chain
-from typing import Union
-
-import archspec.cpu
+from typing import Iterable, Optional, Sequence, Tuple, Union
-import llnl.util.lang
import llnl.util.tty as tty
-import spack.abi
import spack.compilers
import spack.config
-import spack.environment
import spack.error
-import spack.platforms
import spack.repo
-import spack.spec
-import spack.target
-import spack.tengine
-import spack.util.path
-import spack.variant as vt
-from spack.package_prefs import PackagePrefs, is_spec_buildable, spec_externals
-from spack.version import ClosedOpenRange, VersionList, ver
-
-#: impements rudimentary logic for ABI compatibility
-_abi: Union[spack.abi.ABI, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(
- lambda: spack.abi.ABI()
-)
-
-
-@functools.total_ordering
-class reverse_order:
- """Helper for creating key functions.
-
- This is a wrapper that inverts the sense of the natural
- comparisons on the object.
- """
-
- def __init__(self, value):
- self.value = value
-
- def __eq__(self, other):
- return other.value == self.value
-
- def __lt__(self, other):
- return other.value < self.value
-
-
-class Concretizer:
- """You can subclass this class to override some of the default
- concretization strategies, or you can override all of them.
- """
-
- #: Controls whether we check that compiler versions actually exist
- #: during concretization. Used for testing and for mirror creation
- check_for_compiler_existence = None
-
- def __init__(self, abstract_spec=None):
- if Concretizer.check_for_compiler_existence is None:
- Concretizer.check_for_compiler_existence = not spack.config.get(
- "config:install_missing_compilers", False
- )
- self.abstract_spec = abstract_spec
- self._adjust_target_answer_generator = None
-
- def concretize_develop(self, spec):
- """
- Add ``dev_path=*`` variant to packages built from local source.
- """
- env = spack.environment.active_environment()
- dev_info = env.dev_specs.get(spec.name, {}) if env else {}
- if not dev_info:
- return False
-
- path = spack.util.path.canonicalize_path(dev_info["path"], default_wd=env.path)
-
- if "dev_path" in spec.variants:
- assert spec.variants["dev_path"].value == path
- changed = False
- else:
- spec.variants.setdefault("dev_path", vt.SingleValuedVariant("dev_path", path))
- changed = True
- changed |= spec.constrain(dev_info["spec"])
- return changed
-
- def _valid_virtuals_and_externals(self, spec):
- """Returns a list of candidate virtual dep providers and external
- packages that coiuld be used to concretize a spec.
-
- Preferred specs come first in the list.
- """
- # First construct a list of concrete candidates to replace spec with.
- candidates = [spec]
- pref_key = lambda spec: 0 # no-op pref key
-
- if spec.virtual:
- candidates = spack.repo.PATH.providers_for(spec)
- if not candidates:
- raise spack.error.UnsatisfiableProviderSpecError(candidates[0], spec)
-
- # Find nearest spec in the DAG (up then down) that has prefs.
- spec_w_prefs = find_spec(
- spec, lambda p: PackagePrefs.has_preferred_providers(p.name, spec.name), spec
- ) # default to spec itself.
-
- # Create a key to sort candidates by the prefs we found
- pref_key = PackagePrefs(spec_w_prefs.name, "providers", spec.name)
-
- # For each candidate package, if it has externals, add those
- # to the usable list. if it's not buildable, then *only* add
- # the externals.
- usable = []
- for cspec in candidates:
- if is_spec_buildable(cspec):
- usable.append(cspec)
-
- externals = spec_externals(cspec)
- for ext in externals:
- if ext.intersects(spec):
- usable.append(ext)
-
- # If nothing is in the usable list now, it's because we aren't
- # allowed to build anything.
- if not usable:
- raise NoBuildError(spec)
-
- # Use a sort key to order the results
- return sorted(
- usable,
- key=lambda spec: (
- not spec.external, # prefer externals
- pref_key(spec), # respect prefs
- spec.name, # group by name
- reverse_order(spec.versions), # latest version
- spec, # natural order
- ),
- )
-
- def choose_virtual_or_external(self, spec: spack.spec.Spec):
- """Given a list of candidate virtual and external packages, try to
- find one that is most ABI compatible.
- """
- candidates = self._valid_virtuals_and_externals(spec)
- if not candidates:
- return candidates
-
- # Find the nearest spec in the dag that has a compiler. We'll
- # use that spec to calibrate compiler compatibility.
- abi_exemplar = find_spec(spec, lambda x: x.compiler)
- if abi_exemplar is None:
- abi_exemplar = spec.root
-
- # Sort candidates from most to least compatibility.
- # We reverse because True > False.
- # Sort is stable, so candidates keep their order.
- return sorted(
- candidates,
- reverse=True,
- key=lambda spec: (
- _abi.compatible(spec, abi_exemplar, loose=True),
- _abi.compatible(spec, abi_exemplar),
- ),
- )
-
- def concretize_version(self, spec):
- """If the spec is already concrete, return. Otherwise take
- the preferred version from spackconfig, and default to the package's
- version if there are no available versions.
-
- TODO: In many cases we probably want to look for installed
- versions of each package and use an installed version
- if we can link to it. The policy implemented here will
- tend to rebuild a lot of stuff becasue it will prefer
- a compiler in the spec to any compiler already-
- installed things were built with. There is likely
- some better policy that finds some middle ground
- between these two extremes.
- """
- # return if already concrete.
- if spec.versions.concrete:
- return False
-
- # List of versions we could consider, in sorted order
- pkg_versions = spec.package_class.versions
- usable = [v for v in pkg_versions if any(v.intersects(sv) for sv in spec.versions)]
-
- yaml_prefs = PackagePrefs(spec.name, "version")
-
- # The keys below show the order of precedence of factors used
- # to select a version when concretizing. The item with
- # the "largest" key will be selected.
- #
- # NOTE: When COMPARING VERSIONS, the '@develop' version is always
- # larger than other versions. BUT when CONCRETIZING,
- # the largest NON-develop version is selected by default.
- keyfn = lambda v: (
- # ------- Special direction from the user
- # Respect order listed in packages.yaml
- -yaml_prefs(v),
- # The preferred=True flag (packages or packages.yaml or both?)
- pkg_versions.get(v).get("preferred", False),
- # ------- Regular case: use latest non-develop version by default.
- # Avoid @develop version, which would otherwise be the "largest"
- # in straight version comparisons
- not v.isdevelop(),
- # Compare the version itself
- # This includes the logic:
- # a) develop > everything (disabled by "not v.isdevelop() above)
- # b) numeric > non-numeric
- # c) Numeric or string comparison
- v,
- )
- usable.sort(key=keyfn, reverse=True)
-
- if usable:
- spec.versions = ver([usable[0]])
- else:
- # We don't know of any SAFE versions that match the given
- # spec. Grab the spec's versions and grab the highest
- # *non-open* part of the range of versions it specifies.
- # Someone else can raise an error if this happens,
- # e.g. when we go to fetch it and don't know how. But it
- # *might* work.
- if not spec.versions or spec.versions == VersionList([":"]):
- raise NoValidVersionError(spec)
- else:
- last = spec.versions[-1]
- if isinstance(last, ClosedOpenRange):
- range_as_version = VersionList([last]).concrete_range_as_version
- if range_as_version:
- spec.versions = ver([range_as_version])
- else:
- raise NoValidVersionError(spec)
- else:
- spec.versions = ver([last])
-
- return True # Things changed
-
- def concretize_architecture(self, spec):
- """If the spec is empty provide the defaults of the platform. If the
- architecture is not a string type, then check if either the platform,
- target or operating system are concretized. If any of the fields are
- changed then return True. If everything is concretized (i.e the
- architecture attribute is a namedtuple of classes) then return False.
- If the target is a string type, then convert the string into a
- concretized architecture. If it has no architecture and the root of the
- DAG has an architecture, then use the root otherwise use the defaults
- on the platform.
- """
- # ensure type safety for the architecture
- if spec.architecture is None:
- spec.architecture = spack.spec.ArchSpec()
-
- if spec.architecture.concrete:
- return False
-
- # Get platform of nearest spec with a platform, including spec
- # If spec has a platform, easy
- if spec.architecture.platform:
- new_plat = spack.platforms.by_name(spec.architecture.platform)
- else:
- # Else if anyone else has a platform, take the closest one
- # Search up, then down, along build/link deps first
- # Then any nearest. Algorithm from compilerspec search
- platform_spec = find_spec(spec, lambda x: x.architecture and x.architecture.platform)
- if platform_spec:
- new_plat = spack.platforms.by_name(platform_spec.architecture.platform)
- else:
- # If no platform anywhere in this spec, grab the default
- new_plat = spack.platforms.host()
-
- # Get nearest spec with relevant platform and an os
- # Generally, same algorithm as finding platform, except we only
- # consider specs that have a platform
- if spec.architecture.os:
- new_os = spec.architecture.os
- else:
- new_os_spec = find_spec(
- spec,
- lambda x: (
- x.architecture
- and x.architecture.platform == str(new_plat)
- and x.architecture.os
- ),
- )
- if new_os_spec:
- new_os = new_os_spec.architecture.os
- else:
- new_os = new_plat.operating_system("default_os")
-
- # Get the nearest spec with relevant platform and a target
- # Generally, same algorithm as finding os
- curr_target = None
- if spec.architecture.target:
- curr_target = spec.architecture.target
- if spec.architecture.target and spec.architecture.target_concrete:
- new_target = spec.architecture.target
- else:
- new_target_spec = find_spec(
- spec,
- lambda x: (
- x.architecture
- and x.architecture.platform == str(new_plat)
- and x.architecture.target
- and x.architecture.target != curr_target
- ),
- )
- if new_target_spec:
- if curr_target:
- # constrain one target by the other
- new_target_arch = spack.spec.ArchSpec(
- (None, None, new_target_spec.architecture.target)
- )
- curr_target_arch = spack.spec.ArchSpec((None, None, curr_target))
- curr_target_arch.constrain(new_target_arch)
- new_target = curr_target_arch.target
- else:
- new_target = new_target_spec.architecture.target
- else:
- # To get default platform, consider package prefs
- if PackagePrefs.has_preferred_targets(spec.name):
- new_target = self.target_from_package_preferences(spec)
- else:
- new_target = new_plat.target("default_target")
- if curr_target:
- # convert to ArchSpec to compare satisfaction
- new_target_arch = spack.spec.ArchSpec((None, None, str(new_target)))
- curr_target_arch = spack.spec.ArchSpec((None, None, str(curr_target)))
-
- if not new_target_arch.intersects(curr_target_arch):
- # new_target is an incorrect guess based on preferences
- # and/or default
- valid_target_ranges = str(curr_target).split(",")
- for target_range in valid_target_ranges:
- t_min, t_sep, t_max = target_range.partition(":")
- if not t_sep:
- new_target = t_min
- break
- elif t_max:
- new_target = t_max
- break
- elif t_min:
- # TODO: something better than picking first
- new_target = t_min
- break
-
- # Construct new architecture, compute whether spec changed
- arch_spec = (str(new_plat), str(new_os), str(new_target))
- new_arch = spack.spec.ArchSpec(arch_spec)
- spec_changed = new_arch != spec.architecture
- spec.architecture = new_arch
- return spec_changed
-
- def target_from_package_preferences(self, spec):
- """Returns the preferred target from the package preferences if
- there's any.
-
- Args:
- spec: abstract spec to be concretized
- """
- target_prefs = PackagePrefs(spec.name, "target")
- target_specs = [spack.spec.Spec("target=%s" % tname) for tname in archspec.cpu.TARGETS]
-
- def tspec_filter(s):
- # Filter target specs by whether the architecture
- # family is the current machine type. This ensures
- # we only consider x86_64 targets when on an
- # x86_64 machine, etc. This may need to change to
- # enable setting cross compiling as a default
- target = archspec.cpu.TARGETS[str(s.architecture.target)]
- arch_family_name = target.family.name
- return arch_family_name == platform.machine()
-
- # Sort filtered targets by package prefs
- target_specs = list(filter(tspec_filter, target_specs))
- target_specs.sort(key=target_prefs)
- new_target = target_specs[0].architecture.target
- return new_target
-
- def concretize_variants(self, spec):
- """If the spec already has variants filled in, return. Otherwise, add
- the user preferences from packages.yaml or the default variants from
- the package specification.
- """
- changed = False
- preferred_variants = PackagePrefs.preferred_variants(spec.name)
- pkg_cls = spec.package_class
- for name, entry in pkg_cls.variants.items():
- variant, when = entry
- var = spec.variants.get(name, None)
- if var and "*" in var:
- # remove variant wildcard before concretizing
- # wildcard cannot be combined with other variables in a
- # multivalue variant, a concrete variant cannot have the value
- # wildcard, and a wildcard does not constrain a variant
- spec.variants.pop(name)
- if name not in spec.variants and any(spec.satisfies(w) for w in when):
- changed = True
- if name in preferred_variants:
- spec.variants[name] = preferred_variants.get(name)
- else:
- spec.variants[name] = variant.make_default()
- if name in spec.variants and not any(spec.satisfies(w) for w in when):
- raise vt.InvalidVariantForSpecError(name, when, spec)
-
- return changed
-
- def concretize_compiler(self, spec):
- """If the spec already has a compiler, we're done. If not, then take
- the compiler used for the nearest ancestor with a compiler
- spec and use that. If the ancestor's compiler is not
- concrete, then used the preferred compiler as specified in
- spackconfig.
-
- Intuition: Use the spackconfig default if no package that depends on
- this one has a strict compiler requirement. Otherwise, try to
- build with the compiler that will be used by libraries that
- link to this one, to maximize compatibility.
- """
- # Pass on concretizing the compiler if the target or operating system
- # is not yet determined
- if not spec.architecture.concrete:
- # We haven't changed, but other changes need to happen before we
- # continue. `return True` here to force concretization to keep
- # running.
- return True
-
- # Only use a matching compiler if it is of the proper style
- # Takes advantage of the proper logic already existing in
- # compiler_for_spec Should think whether this can be more
- # efficient
- def _proper_compiler_style(cspec, aspec):
- compilers = spack.compilers.compilers_for_spec(cspec, arch_spec=aspec)
- # If the spec passed as argument is concrete we want to check
- # the versions match exactly
- if (
- cspec.concrete
- and compilers
- and cspec.version not in [c.version for c in compilers]
- ):
- return []
-
- return compilers
-
- if spec.compiler and spec.compiler.concrete:
- if self.check_for_compiler_existence and not _proper_compiler_style(
- spec.compiler, spec.architecture
- ):
- _compiler_concretization_failure(spec.compiler, spec.architecture)
- return False
-
- # Find another spec that has a compiler, or the root if none do
- other_spec = spec if spec.compiler else find_spec(spec, lambda x: x.compiler, spec.root)
- other_compiler = other_spec.compiler
- assert other_spec
-
- # Check if the compiler is already fully specified
- if other_compiler and other_compiler.concrete:
- if self.check_for_compiler_existence and not _proper_compiler_style(
- other_compiler, spec.architecture
- ):
- _compiler_concretization_failure(other_compiler, spec.architecture)
- spec.compiler = other_compiler
- return True
-
- if other_compiler: # Another node has abstract compiler information
- compiler_list = spack.compilers.find_specs_by_arch(other_compiler, spec.architecture)
- if not compiler_list:
- # We don't have a matching compiler installed
- if not self.check_for_compiler_existence:
- # Concretize compiler spec versions as a package to build
- cpkg_spec = spack.compilers.pkg_spec_for_compiler(other_compiler)
- self.concretize_version(cpkg_spec)
- spec.compiler = spack.spec.CompilerSpec(
- other_compiler.name, cpkg_spec.versions
- )
- return True
- else:
- # No compiler with a satisfactory spec was found
- raise UnavailableCompilerVersionError(other_compiler, spec.architecture)
- else:
- # We have no hints to go by, grab any compiler
- compiler_list = spack.compilers.all_compiler_specs()
- if not compiler_list:
- # Spack has no compilers.
- raise spack.compilers.NoCompilersError()
-
- # By default, prefer later versions of compilers
- compiler_list = sorted(compiler_list, key=lambda x: (x.name, x.version), reverse=True)
- ppk = PackagePrefs(other_spec.name, "compiler")
- matches = sorted(compiler_list, key=ppk)
-
- # copy concrete version into other_compiler
- try:
- spec.compiler = next(
- c for c in matches if _proper_compiler_style(c, spec.architecture)
- ).copy()
- except StopIteration:
- # No compiler with a satisfactory spec has a suitable arch
- _compiler_concretization_failure(other_compiler, spec.architecture)
-
- assert spec.compiler.concrete
- return True # things changed.
-
- def concretize_compiler_flags(self, spec):
- """
- The compiler flags are updated to match those of the spec whose
- compiler is used, defaulting to no compiler flags in the spec.
- Default specs set at the compiler level will still be added later.
- """
- # Pass on concretizing the compiler flags if the target or operating
- # system is not set.
- if not spec.architecture.concrete:
- # We haven't changed, but other changes need to happen before we
- # continue. `return True` here to force concretization to keep
- # running.
- return True
-
- compiler_match = lambda other: (
- spec.compiler == other.compiler and spec.architecture == other.architecture
- )
+import spack.util.parallel
+from spack.spec import ArchSpec, CompilerSpec, Spec
- ret = False
- for flag in spack.spec.FlagMap.valid_compiler_flags():
- if flag not in spec.compiler_flags:
- spec.compiler_flags[flag] = list()
- try:
- nearest = next(
- p
- for p in spec.traverse(direction="parents")
- if (compiler_match(p) and (p is not spec) and flag in p.compiler_flags)
- )
- nearest_flags = nearest.compiler_flags.get(flag, [])
- flags = spec.compiler_flags.get(flag, [])
- if set(nearest_flags) - set(flags):
- spec.compiler_flags[flag] = list(llnl.util.lang.dedupe(nearest_flags + flags))
- ret = True
- except StopIteration:
- pass
-
- # Include the compiler flag defaults from the config files
- # This ensures that spack will detect conflicts that stem from a change
- # in default compiler flags.
- try:
- compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture)
- except spack.compilers.NoCompilerForSpecError:
- if self.check_for_compiler_existence:
- raise
- return ret
- for flag in compiler.flags:
- config_flags = compiler.flags.get(flag, [])
- flags = spec.compiler_flags.get(flag, [])
- spec.compiler_flags[flag] = list(llnl.util.lang.dedupe(config_flags + flags))
- if set(config_flags) - set(flags):
- ret = True
-
- return ret
-
- def adjust_target(self, spec):
- """Adjusts the target microarchitecture if the compiler is too old
- to support the default one.
-
- Args:
- spec: spec to be concretized
-
- Returns:
- True if spec was modified, False otherwise
- """
- # To minimize the impact on performance this function will attempt
- # to adjust the target only at the very first call once necessary
- # information is set. It will just return False on subsequent calls.
- # The way this is achieved is by initializing a generator and making
- # this function return the next answer.
- if not (spec.architecture and spec.architecture.concrete):
- # Not ready, but keep going because we have work to do later
- return True
-
- def _make_only_one_call(spec):
- yield self._adjust_target(spec)
- while True:
- yield False
-
- if self._adjust_target_answer_generator is None:
- self._adjust_target_answer_generator = _make_only_one_call(spec)
-
- return next(self._adjust_target_answer_generator)
-
- def _adjust_target(self, spec):
- """Assumes that the architecture and the compiler have been
- set already and checks if the current target microarchitecture
- is the default and can be optimized by the compiler.
-
- If not, downgrades the microarchitecture until a suitable one
- is found. If none can be found raise an error.
-
- Args:
- spec: spec to be concretized
-
- Returns:
- True if any modification happened, False otherwise
- """
- import archspec.cpu
-
- # Try to adjust the target only if it is the default
- # target for this platform
- current_target = spec.architecture.target
- current_platform = spack.platforms.by_name(spec.architecture.platform)
-
- default_target = current_platform.target("default_target")
- if PackagePrefs.has_preferred_targets(spec.name):
- default_target = self.target_from_package_preferences(spec)
-
- if current_target != default_target or (
- self.abstract_spec
- and self.abstract_spec.architecture
- and self.abstract_spec.architecture.concrete
- ):
- return False
-
- try:
- current_target.optimization_flags(spec.compiler)
- except archspec.cpu.UnsupportedMicroarchitecture:
- microarchitecture = current_target.microarchitecture
- for ancestor in microarchitecture.ancestors:
- candidate = None
- try:
- candidate = spack.target.Target(ancestor)
- candidate.optimization_flags(spec.compiler)
- except archspec.cpu.UnsupportedMicroarchitecture:
- continue
-
- if candidate is not None:
- msg = (
- "{0.name}@{0.version} cannot build optimized "
- 'binaries for "{1}". Using best target possible: '
- '"{2}"'
- )
- msg = msg.format(spec.compiler, current_target, candidate)
- tty.warn(msg)
- spec.architecture.target = candidate
- return True
- else:
- raise
-
- return False
+CHECK_COMPILER_EXISTENCE = True
@contextmanager
def disable_compiler_existence_check():
- saved = Concretizer.check_for_compiler_existence
- Concretizer.check_for_compiler_existence = False
+ global CHECK_COMPILER_EXISTENCE
+ CHECK_COMPILER_EXISTENCE, saved = False, CHECK_COMPILER_EXISTENCE
yield
- Concretizer.check_for_compiler_existence = saved
+ CHECK_COMPILER_EXISTENCE = saved
@contextmanager
def enable_compiler_existence_check():
- saved = Concretizer.check_for_compiler_existence
- Concretizer.check_for_compiler_existence = True
+ global CHECK_COMPILER_EXISTENCE
+ CHECK_COMPILER_EXISTENCE, saved = True, CHECK_COMPILER_EXISTENCE
yield
- Concretizer.check_for_compiler_existence = saved
-
-
-def find_spec(spec, condition, default=None):
- """Searches the dag from spec in an intelligent order and looks
- for a spec that matches a condition"""
- # First search parents, then search children
- deptype = ("build", "link")
- dagiter = chain(
- spec.traverse(direction="parents", deptype=deptype, root=False),
- spec.traverse(direction="children", deptype=deptype, root=False),
- )
- visited = set()
- for relative in dagiter:
- if condition(relative):
- return relative
- visited.add(id(relative))
-
- # Then search all other relatives in the DAG *except* spec
- for relative in spec.root.traverse(deptype="all"):
- if relative is spec:
- continue
- if id(relative) in visited:
- continue
- if condition(relative):
- return relative
-
- # Finally search spec itself.
- if condition(spec):
- return spec
-
- return default # Nothing matched the condition; return default.
-
-
-def _compiler_concretization_failure(compiler_spec, arch):
- # Distinguish between the case that there are compilers for
- # the arch but not with the given compiler spec and the case that
- # there are no compilers for the arch at all
- if not spack.compilers.compilers_for_arch(arch):
- available_os_targets = set(
- (c.operating_system, c.target) for c in spack.compilers.all_compilers()
- )
- raise NoCompilersForArchError(arch, available_os_targets)
- else:
- raise UnavailableCompilerVersionError(compiler_spec, arch)
+ CHECK_COMPILER_EXISTENCE = saved
+
+SpecPair = Tuple[Spec, Spec]
+SpecLike = Union[Spec, str]
+TestsType = Union[bool, Iterable[str]]
-def concretize_specs_together(*abstract_specs, **kwargs):
+
+def concretize_specs_together(
+ abstract_specs: Sequence[SpecLike], tests: TestsType = False
+) -> Sequence[Spec]:
"""Given a number of specs as input, tries to concretize them together.
Args:
- tests (bool or list or set): False to run no tests, True to test
- all packages, or a list of package names to run tests for some
- *abstract_specs: abstract specs to be concretized, given either
- as Specs or strings
+ abstract_specs: abstract specs to be concretized
+ tests: list of package names for which to consider tests dependencies. If True, all nodes
+ will have test dependencies. If False, test dependencies will be disregarded.
+ """
+ import spack.solver.asp
+
+ allow_deprecated = spack.config.get("config:deprecated", False)
+ solver = spack.solver.asp.Solver()
+ result = solver.solve(abstract_specs, tests=tests, allow_deprecated=allow_deprecated)
+ return [s.copy() for s in result.specs]
+
+
+def concretize_together(
+ spec_list: Sequence[SpecPair], tests: TestsType = False
+) -> Sequence[SpecPair]:
+ """Given a number of specs as input, tries to concretize them together.
- Returns:
- List of concretized specs
+ Args:
+ spec_list: list of tuples to concretize. First entry is abstract spec, second entry is
+ already concrete spec or None if not yet concretized
+ tests: list of package names for which to consider tests dependencies. If True, all nodes
+ will have test dependencies. If False, test dependencies will be disregarded.
"""
- if spack.config.get("config:concretizer", "clingo") == "original":
- return _concretize_specs_together_original(*abstract_specs, **kwargs)
- return _concretize_specs_together_new(*abstract_specs, **kwargs)
+ to_concretize = [concrete if concrete else abstract for abstract, concrete in spec_list]
+ abstract_specs = [abstract for abstract, _ in spec_list]
+ concrete_specs = concretize_specs_together(to_concretize, tests=tests)
+ return list(zip(abstract_specs, concrete_specs))
+
+def concretize_together_when_possible(
+ spec_list: Sequence[SpecPair], tests: TestsType = False
+) -> Sequence[SpecPair]:
+ """Given a number of specs as input, tries to concretize them together to the extent possible.
-def _concretize_specs_together_new(*abstract_specs, **kwargs):
+ See documentation for ``unify: when_possible`` concretization for the precise definition of
+ "to the extent possible".
+
+ Args:
+ spec_list: list of tuples to concretize. First entry is abstract spec, second entry is
+ already concrete spec or None if not yet concretized
+ tests: list of package names for which to consider tests dependencies. If True, all nodes
+ will have test dependencies. If False, test dependencies will be disregarded.
+ """
import spack.solver.asp
- allow_deprecated = spack.config.get("config:deprecated", False)
+ to_concretize = [concrete if concrete else abstract for abstract, concrete in spec_list]
+ old_concrete_to_abstract = {
+ concrete: abstract for (abstract, concrete) in spec_list if concrete
+ }
+
+ result_by_user_spec = {}
solver = spack.solver.asp.Solver()
- result = solver.solve(
- abstract_specs, tests=kwargs.get("tests", False), allow_deprecated=allow_deprecated
- )
- result.raise_if_unsat()
- return [s.copy() for s in result.specs]
+ allow_deprecated = spack.config.get("config:deprecated", False)
+ for result in solver.solve_in_rounds(
+ to_concretize, tests=tests, allow_deprecated=allow_deprecated
+ ):
+ result_by_user_spec.update(result.specs_by_input)
+
+ # If the "abstract" spec is a concrete spec from the previous concretization
+ # translate it back to an abstract spec. Otherwise, keep the abstract spec
+ return [
+ (old_concrete_to_abstract.get(abstract, abstract), concrete)
+ for abstract, concrete in sorted(result_by_user_spec.items())
+ ]
+
+
+def concretize_separately(
+ spec_list: Sequence[SpecPair], tests: TestsType = False
+) -> Sequence[SpecPair]:
+ """Concretizes the input specs separately from each other.
+ Args:
+ spec_list: list of tuples to concretize. First entry is abstract spec, second entry is
+ already concrete spec or None if not yet concretized
+ tests: list of package names for which to consider tests dependencies. If True, all nodes
+ will have test dependencies. If False, test dependencies will be disregarded.
+ """
+ import spack.bootstrap
-def _concretize_specs_together_original(*abstract_specs, **kwargs):
- abstract_specs = [spack.spec.Spec(s) for s in abstract_specs]
- tmpdir = tempfile.mkdtemp()
- builder = spack.repo.MockRepositoryBuilder(tmpdir)
- # Split recursive specs, as it seems the concretizer has issue
- # respecting conditions on dependents expressed like
- # depends_on('foo ^bar@1.0'), see issue #11160
- split_specs = [
- dep.copy(deps=False) for spec1 in abstract_specs for dep in spec1.traverse(root=True)
+ to_concretize = [abstract for abstract, concrete in spec_list if not concrete]
+ args = [
+ (i, str(abstract), tests)
+ for i, abstract in enumerate(to_concretize)
+ if not abstract.concrete
]
- builder.add_package(
- "concretizationroot", dependencies=[(str(x), None, None) for x in split_specs]
- )
-
- with spack.repo.use_repositories(builder.root, override=False):
- # Spec from a helper package that depends on all the abstract_specs
- concretization_root = spack.spec.Spec("concretizationroot")
- concretization_root.concretize(tests=kwargs.get("tests", False))
- # Retrieve the direct dependencies
- concrete_specs = [concretization_root[spec.name].copy() for spec in abstract_specs]
-
- return concrete_specs
-
-
-class NoCompilersForArchError(spack.error.SpackError):
- def __init__(self, arch, available_os_targets):
- err_msg = (
- "No compilers found"
- " for operating system %s and target %s."
- "\nIf previous installations have succeeded, the"
- " operating system may have been updated." % (arch.os, arch.target)
+ ret = [(i, abstract) for i, abstract in enumerate(to_concretize) if abstract.concrete]
+ # Ensure we don't try to bootstrap clingo in parallel
+ with spack.bootstrap.ensure_bootstrap_configuration():
+ spack.bootstrap.ensure_clingo_importable_or_raise()
+
+ # Ensure all the indexes have been built or updated, since
+ # otherwise the processes in the pool may timeout on waiting
+ # for a write lock. We do this indirectly by retrieving the
+ # provider index, which should in turn trigger the update of
+ # all the indexes if there's any need for that.
+ _ = spack.repo.PATH.provider_index
+
+ # Ensure we have compilers in compilers.yaml to avoid that
+ # processes try to write the config file in parallel
+ _ = spack.compilers.all_compilers_config(spack.config.CONFIG)
+
+ # Early return if there is nothing to do
+ if len(args) == 0:
+ # Still have to combine the things that were passed in as abstract with the things
+ # that were passed in as pairs
+ return [(abstract, concrete) for abstract, (_, concrete) in zip(to_concretize, ret)] + [
+ (abstract, concrete) for abstract, concrete in spec_list if concrete
+ ]
+
+ # Solve the environment in parallel on Linux
+ # TODO: support parallel concretization on macOS and Windows
+ num_procs = min(len(args), spack.config.determine_number_of_jobs(parallel=True))
+
+ msg = "Starting concretization"
+ if sys.platform not in ("darwin", "win32") and num_procs > 1:
+ msg += f" pool with {num_procs} processes"
+ tty.msg(msg)
+
+ for j, (i, concrete, duration) in enumerate(
+ spack.util.parallel.imap_unordered(
+ _concretize_task, args, processes=num_procs, debug=tty.is_debug(), maxtaskperchild=1
)
-
- available_os_target_strs = list()
- for operating_system, t in available_os_targets:
- os_target_str = "%s-%s" % (operating_system, t) if t else operating_system
- available_os_target_strs.append(os_target_str)
- err_msg += (
- "\nCompilers are defined for the following"
- " operating systems and targets:\n\t" + "\n\t".join(available_os_target_strs)
+ ):
+ ret.append((i, concrete))
+ percentage = (j + 1) / len(args) * 100
+ tty.verbose(
+ f"{duration:6.1f}s [{percentage:3.0f}%] {concrete.cformat('{hash:7}')} "
+ f"{to_concretize[i].colored_str}"
)
+ sys.stdout.flush()
+
+ # Add specs in original order
+ ret.sort(key=lambda x: x[0])
+
+ return [(abstract, concrete) for abstract, (_, concrete) in zip(to_concretize, ret)] + [
+ (abstract, concrete) for abstract, concrete in spec_list if concrete
+ ]
- super().__init__(err_msg, "Run 'spack compiler find' to add compilers.")
+
+def _concretize_task(packed_arguments: Tuple[int, str, TestsType]) -> Tuple[int, Spec, float]:
+ index, spec_str, tests = packed_arguments
+ with tty.SuppressOutput(msg_enabled=False):
+ start = time.time()
+ spec = Spec(spec_str).concretized(tests=tests)
+ return index, spec, time.time() - start
class UnavailableCompilerVersionError(spack.error.SpackError):
"""Raised when there is no available compiler that satisfies a
compiler spec."""
- def __init__(self, compiler_spec, arch=None):
- err_msg = "No compilers with spec {0} found".format(compiler_spec)
+ def __init__(self, compiler_spec: CompilerSpec, arch: Optional[ArchSpec] = None) -> None:
+ err_msg = f"No compilers with spec {compiler_spec} found"
if arch:
- err_msg += " for operating system {0} and target {1}.".format(arch.os, arch.target)
+ err_msg += f" for operating system {arch.os} and target {arch.target}."
super().__init__(
err_msg,
@@ -813,38 +209,3 @@ class UnavailableCompilerVersionError(spack.error.SpackError):
"'spack compilers' to see which compilers are already recognized"
" by spack.",
)
-
-
-class NoValidVersionError(spack.error.SpackError):
- """Raised when there is no way to have a concrete version for a
- particular spec."""
-
- def __init__(self, spec):
- super().__init__(
- "There are no valid versions for %s that match '%s'" % (spec.name, spec.versions)
- )
-
-
-class InsufficientArchitectureInfoError(spack.error.SpackError):
-
- """Raised when details on architecture cannot be collected from the
- system"""
-
- def __init__(self, spec, archs):
- super().__init__(
- "Cannot determine necessary architecture information for '%s': %s"
- % (spec.name, str(archs))
- )
-
-
-class NoBuildError(spack.error.SpecError):
- """Raised when a package is configured with the buildable option False, but
- no satisfactory external versions can be found
- """
-
- def __init__(self, spec):
- msg = (
- "The spec\n '%s'\n is configured as not buildable, "
- "and no matching external installs were found"
- )
- super().__init__(msg % spec)
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index ee48a261c8..1cafc1f738 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -35,11 +35,11 @@ import functools
import os
import re
import sys
-from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Type, Union
+from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union
from llnl.util import filesystem, lang, tty
-import spack.compilers
+import spack.error
import spack.paths
import spack.platforms
import spack.schema
@@ -49,24 +49,27 @@ import spack.schema.ci
import spack.schema.compilers
import spack.schema.concretizer
import spack.schema.config
+import spack.schema.definitions
+import spack.schema.develop
import spack.schema.env
import spack.schema.mirrors
import spack.schema.modules
import spack.schema.packages
import spack.schema.repos
import spack.schema.upstreams
+import spack.schema.view
# Hacked yaml for configuration files preserves line numbers.
import spack.util.spack_yaml as syaml
import spack.util.web as web_util
-from spack.error import SpackError
from spack.util.cpus import cpus_available
#: Dict from section names -> schema for that section
-SECTION_SCHEMAS = {
+SECTION_SCHEMAS: Dict[str, Any] = {
"compilers": spack.schema.compilers.schema,
"concretizer": spack.schema.concretizer.schema,
"definitions": spack.schema.definitions.schema,
+ "view": spack.schema.view.schema,
"develop": spack.schema.develop.schema,
"mirrors": spack.schema.mirrors.schema,
"repos": spack.schema.repos.schema,
@@ -81,7 +84,7 @@ SECTION_SCHEMAS = {
# Same as above, but including keys for environments
# this allows us to unify config reading between configs and environments
-_ALL_SCHEMAS = copy.deepcopy(SECTION_SCHEMAS)
+_ALL_SCHEMAS: Dict[str, Any] = copy.deepcopy(SECTION_SCHEMAS)
_ALL_SCHEMAS.update({spack.schema.env.TOP_LEVEL_KEY: spack.schema.env.schema})
#: Path to the default configuration
@@ -99,14 +102,13 @@ CONFIG_DEFAULTS = {
"dirty": False,
"build_jobs": min(16, cpus_available()),
"build_stage": "$tempdir/spack-stage",
- "concretizer": "clingo",
"license_dir": spack.paths.default_license_dir,
}
}
#: metavar to use for commands that accept scopes
#: this is shorter and more readable than listing all choices
-SCOPES_METAVAR = "{defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT"
+SCOPES_METAVAR = "{defaults,system,site,user,command_line}[/PLATFORM] or env:ENVIRONMENT"
#: Base name for the (internal) overrides scope.
_OVERRIDES_BASE_NAME = "overrides-"
@@ -116,21 +118,39 @@ YamlConfigDict = Dict[str, Any]
class ConfigScope:
- """This class represents a configuration scope.
+ def __init__(self, name: str) -> None:
+ self.name = name
+ self.writable = False
+ self.sections = syaml.syaml_dict()
- A scope is one directory containing named configuration files.
- Each file is a config "section" (e.g., mirrors, compilers, etc.).
- """
+ def get_section_filename(self, section: str) -> str:
+ raise NotImplementedError
+
+ def get_section(self, section: str) -> Optional[YamlConfigDict]:
+ raise NotImplementedError
- def __init__(self, name, path) -> None:
- self.name = name # scope name.
- self.path = path # path to directory containing configs.
- self.sections = syaml.syaml_dict() # sections read from config files.
+ def _write_section(self, section: str) -> None:
+ raise NotImplementedError
@property
def is_platform_dependent(self) -> bool:
- """Returns true if the scope name is platform specific"""
- return os.sep in self.name
+ return False
+
+ def clear(self) -> None:
+ """Empty cached config information."""
+ self.sections = syaml.syaml_dict()
+
+ def __repr__(self) -> str:
+ return f"<ConfigScope: {self.name}>"
+
+
+class DirectoryConfigScope(ConfigScope):
+ """Config scope backed by a directory containing one file per section."""
+
+ def __init__(self, name: str, path: str, *, writable: bool = True) -> None:
+ super().__init__(name)
+ self.path = path
+ self.writable = writable
def get_section_filename(self, section: str) -> str:
"""Returns the filename associated with a given section"""
@@ -147,14 +167,15 @@ class ConfigScope:
return self.sections[section]
def _write_section(self, section: str) -> None:
+ if not self.writable:
+ raise spack.error.ConfigError(f"Cannot write to immutable scope {self}")
+
filename = self.get_section_filename(section)
data = self.get_section(section)
if data is None:
return
- # We copy data here to avoid adding defaults at write time
- validate_data = copy.deepcopy(data)
- validate(validate_data, SECTION_SCHEMAS[section])
+ validate(data, SECTION_SCHEMAS[section])
try:
filesystem.mkdirp(self.path)
@@ -163,19 +184,23 @@ class ConfigScope:
except (syaml.SpackYAMLError, OSError) as e:
raise ConfigFileError(f"cannot write to '{filename}'") from e
- def clear(self) -> None:
- """Empty cached config information."""
- self.sections = syaml.syaml_dict()
-
- def __repr__(self) -> str:
- return f"<ConfigScope: {self.name}: {self.path}>"
+ @property
+ def is_platform_dependent(self) -> bool:
+ """Returns true if the scope name is platform specific"""
+ return "/" in self.name
class SingleFileScope(ConfigScope):
"""This class represents a configuration scope in a single YAML file."""
def __init__(
- self, name: str, path: str, schema: YamlConfigDict, yaml_path: Optional[List[str]] = None
+ self,
+ name: str,
+ path: str,
+ schema: YamlConfigDict,
+ *,
+ yaml_path: Optional[List[str]] = None,
+ writable: bool = True,
) -> None:
"""Similar to ``ConfigScope`` but can be embedded in another schema.
@@ -194,15 +219,13 @@ class SingleFileScope(ConfigScope):
config:
install_tree: $spack/opt/spack
"""
- super().__init__(name, path)
+ super().__init__(name)
self._raw_data: Optional[YamlConfigDict] = None
self.schema = schema
+ self.path = path
+ self.writable = writable
self.yaml_path = yaml_path or []
- @property
- def is_platform_dependent(self) -> bool:
- return False
-
def get_section_filename(self, section) -> str:
return self.path
@@ -256,6 +279,8 @@ class SingleFileScope(ConfigScope):
return self.sections.get(section, None)
def _write_section(self, section: str) -> None:
+ if not self.writable:
+ raise spack.error.ConfigError(f"Cannot write to immutable scope {self}")
data_to_write: Optional[YamlConfigDict] = self._raw_data
# If there is no existing data, this section SingleFileScope has never
@@ -300,19 +325,6 @@ class SingleFileScope(ConfigScope):
return f"<SingleFileScope: {self.name}: {self.path}>"
-class ImmutableConfigScope(ConfigScope):
- """A configuration scope that cannot be written to.
-
- This is used for ConfigScopes passed on the command line.
- """
-
- def _write_section(self, section) -> None:
- raise ConfigError(f"Cannot write to immutable scope {self}")
-
- def __repr__(self) -> str:
- return f"<ImmutableConfigScope: {self.name}: {self.path}>"
-
-
class InternalConfigScope(ConfigScope):
"""An internal configuration scope that is not persisted to a file.
@@ -322,7 +334,7 @@ class InternalConfigScope(ConfigScope):
"""
def __init__(self, name: str, data: Optional[YamlConfigDict] = None) -> None:
- super().__init__(name, None)
+ super().__init__(name)
self.sections = syaml.syaml_dict()
if data is not None:
@@ -332,9 +344,6 @@ class InternalConfigScope(ConfigScope):
validate({section: dsec}, SECTION_SCHEMAS[section])
self.sections[section] = _mark_internal(syaml.syaml_dict({section: dsec}), name)
- def get_section_filename(self, section: str) -> str:
- raise NotImplementedError("Cannot get filename for InternalConfigScope.")
-
def get_section(self, section: str) -> Optional[YamlConfigDict]:
"""Just reads from an internal dictionary."""
if section not in self.sections:
@@ -418,6 +427,10 @@ class Configuration:
self.push_scope(scope)
self.format_updates: Dict[str, List[ConfigScope]] = collections.defaultdict(list)
+ def ensure_unwrapped(self) -> "Configuration":
+ """Ensure we unwrap this object from any dynamic wrapper (like Singleton)"""
+ return self
+
@_config_mutator
def push_scope(self, scope: ConfigScope) -> None:
"""Add a higher precedence scope to the Configuration."""
@@ -439,27 +452,21 @@ class Configuration:
return scope
@property
- def file_scopes(self) -> List[ConfigScope]:
- """List of writable scopes with an associated file."""
- return [
- s
- for s in self.scopes.values()
- if (type(s) is ConfigScope or type(s) is SingleFileScope)
- ]
+ def writable_scopes(self) -> Generator[ConfigScope, None, None]:
+ """Generator of writable scopes with an associated file."""
+ return (s for s in self.scopes.values() if s.writable)
def highest_precedence_scope(self) -> ConfigScope:
- """Non-internal scope with highest precedence."""
- return next(reversed(self.file_scopes))
+ """Writable scope with highest precedence."""
+ return next(s for s in reversed(self.scopes.values()) if s.writable) # type: ignore
def highest_precedence_non_platform_scope(self) -> ConfigScope:
- """Non-internal non-platform scope with highest precedence
-
- Platform-specific scopes are of the form scope/platform"""
- generator = reversed(self.file_scopes)
- highest = next(generator)
- while highest and highest.is_platform_dependent:
- highest = next(generator)
- return highest
+ """Writable non-platform scope with highest precedence"""
+ return next(
+ s
+ for s in reversed(self.scopes.values()) # type: ignore
+ if s.writable and not s.is_platform_dependent
+ )
def matching_scopes(self, reg_expr) -> List[ConfigScope]:
"""
@@ -638,7 +645,6 @@ class Configuration:
We use ``:`` as the separator, like YAML objects.
"""
- # TODO: Currently only handles maps. Think about lists if needed.
parts = process_config_path(path)
section = parts.pop(0)
@@ -706,13 +712,13 @@ class Configuration:
data[section] = self.get_config(section, scope=scope)
syaml.dump_config(data, stream=sys.stdout, default_flow_style=False, blame=blame)
except (syaml.SpackYAMLError, OSError) as e:
- raise ConfigError(f"cannot read '{section}' configuration") from e
+ raise spack.error.ConfigError(f"cannot read '{section}' configuration") from e
@contextlib.contextmanager
def override(
path_or_scope: Union[ConfigScope, str], value: Optional[Any] = None
-) -> Generator[Union[lang.Singleton, Configuration], None, None]:
+) -> Generator[Configuration, None, None]:
"""Simple way to override config settings within a context.
Arguments:
@@ -750,39 +756,62 @@ def override(
assert scope is overrides
-#: configuration scopes added on the command line set by ``spack.main.main()``
-COMMAND_LINE_SCOPES: List[str] = []
-
-
-def _add_platform_scope(
- cfg: Union[Configuration, lang.Singleton], scope_type: Type[ConfigScope], name: str, path: str
-) -> None:
+def _add_platform_scope(cfg: Configuration, name: str, path: str, writable: bool = True) -> None:
"""Add a platform-specific subdirectory for the current platform."""
platform = spack.platforms.host().name
- plat_name = os.path.join(name, platform)
- plat_path = os.path.join(path, platform)
- cfg.push_scope(scope_type(plat_name, plat_path))
+ scope = DirectoryConfigScope(
+ f"{name}/{platform}", os.path.join(path, platform), writable=writable
+ )
+ cfg.push_scope(scope)
-def _add_command_line_scopes(
- cfg: Union[Configuration, lang.Singleton], command_line_scopes: List[str]
-) -> None:
- """Add additional scopes from the --config-scope argument.
+def config_paths_from_entry_points() -> List[Tuple[str, str]]:
+ """Load configuration paths from entry points
+
+ A python package can register entry point metadata so that Spack can find
+ its configuration by adding the following to the project's pyproject.toml:
+
+ .. code-block:: toml
+
+ [project.entry-points."spack.config"]
+ baz = "baz:get_spack_config_path"
+
+ The function ``get_spack_config_path`` returns the path to the package's
+ spack configuration scope
- Command line scopes are named after their position in the arg list.
"""
+ config_paths: List[Tuple[str, str]] = []
+ for entry_point in lang.get_entry_points(group="spack.config"):
+ hook = entry_point.load()
+ if callable(hook):
+ config_path = hook()
+ if config_path and os.path.exists(config_path):
+ config_paths.append(("plugin-%s" % entry_point.name, str(config_path)))
+ return config_paths
+
+
+def _add_command_line_scopes(cfg: Configuration, command_line_scopes: List[str]) -> None:
+ """Add additional scopes from the --config-scope argument, either envs or dirs."""
+ import spack.environment.environment as env # circular import
+
for i, path in enumerate(command_line_scopes):
- # We ensure that these scopes exist and are readable, as they are
- # provided on the command line by the user.
- if not os.path.isdir(path):
- raise ConfigError(f"config scope is not a directory: '{path}'")
- elif not os.access(path, os.R_OK):
- raise ConfigError(f"config scope is not readable: '{path}'")
+ name = f"cmd_scope_{i}"
+
+ if env.exists(path): # managed environment
+ manifest = env.EnvironmentManifestFile(env.root(path))
+ elif env.is_env_dir(path): # anonymous environment
+ manifest = env.EnvironmentManifestFile(path)
+ elif os.path.isdir(path): # directory with config files
+ cfg.push_scope(DirectoryConfigScope(name, path, writable=False))
+ _add_platform_scope(cfg, name, path, writable=False)
+ continue
+ else:
+ raise spack.error.ConfigError(f"Invalid configuration scope: {path}")
- # name based on order on the command line
- name = f"cmd_scope_{i:d}"
- cfg.push_scope(ImmutableConfigScope(name, path))
- _add_platform_scope(cfg, ImmutableConfigScope, name, path)
+ for scope in manifest.env_config_scopes:
+ scope.name = f"{name}:{scope.name}"
+ scope.writable = False
+ cfg.push_scope(scope)
def create() -> Configuration:
@@ -816,6 +845,9 @@ def create() -> Configuration:
# No site-level configs should be checked into spack by default.
configuration_paths.append(("site", os.path.join(spack.paths.etc_path)))
+ # Python package's can register configuration scopes via entry_points
+ configuration_paths.extend(config_paths_from_entry_points())
+
# User configuration can override both spack defaults and site config
# This is disabled if user asks for no local configuration.
if not disable_local_config:
@@ -823,23 +855,16 @@ def create() -> Configuration:
# add each scope and its platform-specific directory
for name, path in configuration_paths:
- cfg.push_scope(ConfigScope(name, path))
+ cfg.push_scope(DirectoryConfigScope(name, path))
# Each scope can have per-platfom overrides in subdirectories
- _add_platform_scope(cfg, ConfigScope, name, path)
-
- # add command-line scopes
- _add_command_line_scopes(cfg, COMMAND_LINE_SCOPES)
-
- # we make a special scope for spack commands so that they can
- # override configuration options.
- cfg.push_scope(InternalConfigScope("command_line"))
+ _add_platform_scope(cfg, name, path)
return cfg
#: This is the singleton configuration instance for Spack.
-CONFIG: Union[Configuration, lang.Singleton] = lang.Singleton(create)
+CONFIG: Configuration = lang.Singleton(create) # type: ignore
def add_from_file(filename: str, scope: Optional[str] = None) -> None:
@@ -883,7 +908,9 @@ def add(fullpath: str, scope: Optional[str] = None) -> None:
has_existing_value = True
path = ""
override = False
- value = syaml.load_config(components[-1])
+ value = components[-1]
+ if not isinstance(value, syaml.syaml_str):
+ value = syaml.load_config(value)
for idx, name in enumerate(components[:-1]):
# First handle double colons in constructing path
colon = "::" if override else ":" if path else ""
@@ -905,7 +932,7 @@ def add(fullpath: str, scope: Optional[str] = None) -> None:
# construct value from this point down
for component in reversed(components[idx + 1 : -1]):
- value = {component: value}
+ value: Dict[str, str] = {component: value} # type: ignore[no-redef]
break
if override:
@@ -916,7 +943,7 @@ def add(fullpath: str, scope: Optional[str] = None) -> None:
# append values to lists
if isinstance(existing, list) and not isinstance(value, list):
- value = [value]
+ value: List[str] = [value] # type: ignore[no-redef]
# merge value into existing
new = merge_yaml(existing, value)
@@ -939,7 +966,7 @@ def set(path: str, value: Any, scope: Optional[str] = None) -> None:
def add_default_platform_scope(platform: str) -> None:
plat_name = os.path.join("defaults", platform)
plat_path = os.path.join(CONFIGURATION_DEFAULTS_PATH[1], platform)
- CONFIG.push_scope(ConfigScope(plat_name, plat_path))
+ CONFIG.push_scope(DirectoryConfigScope(plat_name, plat_path))
def scopes() -> Dict[str, ConfigScope]:
@@ -948,18 +975,10 @@ def scopes() -> Dict[str, ConfigScope]:
def writable_scopes() -> List[ConfigScope]:
- """
- Return list of writable scopes
- """
- return list(
- reversed(
- list(
- x
- for x in CONFIG.scopes.values()
- if not isinstance(x, (InternalConfigScope, ImmutableConfigScope))
- )
- )
- )
+ """Return list of writable scopes. Higher-priority scopes come first in the list."""
+ scopes = [x for x in CONFIG.scopes.values() if x.writable]
+ scopes.reverse()
+ return scopes
def writable_scope_names() -> List[str]:
@@ -992,7 +1011,7 @@ def change_or_add(
if found:
update_fn(section)
- spack.config.set(section_name, section, scope=scope)
+ CONFIG.set(section_name, section, scope=scope)
return
# If no scope meets the criteria specified by ``find_fn``,
@@ -1005,14 +1024,14 @@ def change_or_add(
break
if found:
- spack.config.set(section_name, section, scope=scope)
+ CONFIG.set(section_name, section, scope=scope)
return
# If no scopes define any config for the named section, then
# modify the highest-priority scope.
scope, section = configs_by_section[0]
update_fn(section)
- spack.config.set(section_name, section, scope=scope)
+ CONFIG.set(section_name, section, scope=scope)
def update_all(section_name: str, change_fn: Callable[[str], bool]) -> None:
@@ -1024,7 +1043,7 @@ def update_all(section_name: str, change_fn: Callable[[str], bool]) -> None:
for scope, section in configs_by_section:
modified = change_fn(section)
if modified:
- spack.config.set(section_name, section, scope=scope)
+ CONFIG.set(section_name, section, scope=scope)
def _validate_section_name(section: str) -> None:
@@ -1049,11 +1068,8 @@ def validate(
"""
import jsonschema
- # Validate a copy to avoid adding defaults
- # This allows us to round-trip data without adding to it.
- test_data = syaml.deepcopy(data)
try:
- spack.schema.Validator(schema).validate(test_data)
+ spack.schema.Validator(schema).validate(data)
except jsonschema.ValidationError as e:
if hasattr(e.instance, "lc"):
line_number = e.instance.lc.line + 1
@@ -1062,11 +1078,11 @@ def validate(
raise ConfigFormatError(e, data, filename, line_number) from e
# return the validated data so that we can access the raw data
# mostly relevant for environments
- return test_data
+ return data
def read_config_file(
- filename: str, schema: Optional[YamlConfigDict] = None
+ path: str, schema: Optional[YamlConfigDict] = None
) -> Optional[YamlConfigDict]:
"""Read a YAML configuration file.
@@ -1076,40 +1092,33 @@ def read_config_file(
# to preserve flexibility in calling convention (don't need to provide
# schema when it's not necessary) while allowing us to validate against a
# known schema when the top-level key could be incorrect.
-
- if not os.path.exists(filename):
- # Ignore nonexistent files.
- tty.debug(f"Skipping nonexistent config path {filename}", level=3)
- return None
-
- elif not os.path.isfile(filename):
- raise ConfigFileError(f"Invalid configuration. {filename} exists but is not a file.")
-
- elif not os.access(filename, os.R_OK):
- raise ConfigFileError(f"Config file is not readable: {filename}")
-
try:
- tty.debug(f"Reading config from file {filename}")
- with open(filename) as f:
+ with open(path) as f:
+ tty.debug(f"Reading config from file {path}")
data = syaml.load_config(f)
if data:
- if not schema:
+ if schema is None:
key = next(iter(data))
schema = _ALL_SCHEMAS[key]
validate(data, schema)
return data
- except StopIteration:
- raise ConfigFileError(f"Config file is empty or is not a valid YAML dict: {filename}")
+ except FileNotFoundError:
+ # Ignore nonexistent files.
+ tty.debug(f"Skipping nonexistent config path {path}", level=3)
+ return None
+
+ except OSError as e:
+ raise ConfigFileError(f"Path is not a file or is not readable: {path}: {str(e)}") from e
+
+ except StopIteration as e:
+ raise ConfigFileError(f"Config file is empty or is not a valid YAML dict: {path}") from e
except syaml.SpackYAMLError as e:
raise ConfigFileError(str(e)) from e
- except OSError as e:
- raise ConfigFileError(f"Error reading configuration file {filename}: {str(e)}") from e
-
def _override(string: str) -> bool:
"""Test if a spack YAML string is an override.
@@ -1208,7 +1217,7 @@ def get_valid_type(path):
return types[schema_type]()
else:
return type(None)
- raise ConfigError(f"Cannot determine valid type for path '{path}'.")
+ raise spack.error.ConfigError(f"Cannot determine valid type for path '{path}'.")
def remove_yaml(dest, source):
@@ -1251,7 +1260,7 @@ def remove_yaml(dest, source):
unmerge = sk in dest
old_dest_value = dest.pop(sk, None)
- if unmerge and not spack.config._override(sk):
+ if unmerge and not _override(sk):
dest[sk] = remove_yaml(old_dest_value, sv)
return dest
@@ -1336,56 +1345,141 @@ def merge_yaml(dest, source, prepend=False, append=False):
return copy.copy(source)
+class ConfigPath:
+ quoted_string = "(?:\"[^\"]+\")|(?:'[^']+')"
+ unquoted_string = "[^:'\"]+"
+ element = rf"(?:(?:{quoted_string})|(?:{unquoted_string}))"
+ next_key_pattern = rf"({element}[+-]?)(?:\:|$)"
+
+ @staticmethod
+ def _split_front(string, extract):
+ m = re.match(extract, string)
+ if not m:
+ return None, None
+ token = m.group(1)
+ return token, string[len(token) :]
+
+ @staticmethod
+ def _validate(path):
+ """Example valid config paths:
+
+ x:y:z
+ x:"y":z
+ x:y+:z
+ x:y::z
+ x:y+::z
+ x:y:
+ x:y::
+ """
+ first_key, path = ConfigPath._split_front(path, ConfigPath.next_key_pattern)
+ if not first_key:
+ raise ValueError(f"Config path does not start with a parse-able key: {path}")
+ path_elements = [first_key]
+ path_index = 1
+ while path:
+ separator, path = ConfigPath._split_front(path, r"(\:+)")
+ if not separator:
+ raise ValueError(f"Expected separator for {path}")
+
+ path_elements[path_index - 1] += separator
+ if not path:
+ break
+
+ element, remainder = ConfigPath._split_front(path, ConfigPath.next_key_pattern)
+ if not element:
+ # If we can't parse something as a key, then it must be a
+ # value (if it's valid).
+ try:
+ syaml.load_config(path)
+ except spack.util.spack_yaml.SpackYAMLError as e:
+ raise ValueError(
+ "Remainder of path is not a valid key"
+ f" and does not parse as a value {path}"
+ ) from e
+ element = path
+ path = None # The rest of the path was consumed into the value
+ else:
+ path = remainder
+
+ path_elements.append(element)
+ path_index += 1
+
+ return path_elements
+
+ @staticmethod
+ def process(path):
+ result = []
+ quote = "['\"]"
+ seen_override_in_path = False
+
+ path_elements = ConfigPath._validate(path)
+ last_element_idx = len(path_elements) - 1
+ for i, element in enumerate(path_elements):
+ override = False
+ append = False
+ prepend = False
+ quoted = False
+ if element.endswith("::") or (element.endswith(":") and i == last_element_idx):
+ if seen_override_in_path:
+ raise syaml.SpackYAMLError(
+ "Meaningless second override indicator `::' in path `{0}'".format(path), ""
+ )
+ override = True
+ seen_override_in_path = True
+ element = element.rstrip(":")
+
+ if element.endswith("+"):
+ prepend = True
+ elif element.endswith("-"):
+ append = True
+ element = element.rstrip("+-")
+
+ if re.match(f"^{quote}", element):
+ quoted = True
+ element = element.strip("'\"")
+
+ if any([append, prepend, override, quoted]):
+ element = syaml.syaml_str(element)
+ if append:
+ element.append = True
+ if prepend:
+ element.prepend = True
+ if override:
+ element.override = True
+
+ result.append(element)
+
+ return result
+
+
def process_config_path(path: str) -> List[str]:
"""Process a path argument to config.set() that may contain overrides ('::' or
trailing ':')
- Note: quoted value path components will be processed as a single value (escaping colons)
- quoted path components outside of the value will be considered ill formed and will
- raise.
- e.g. `this:is:a:path:'value:with:colon'` will yield:
+ Colons will be treated as static strings if inside of quotes,
+ e.g. `this:is:a:path:'value:with:colon'` will yield:
- [this, is, a, path, value:with:colon]
- """
- result = []
- if path.startswith(":"):
- raise syaml.SpackYAMLError(f"Illegal leading `:' in path `{path}'", "")
- seen_override_in_path = False
- while path:
- front, sep, path = path.partition(":")
- if (sep and not path) or path.startswith(":"):
- if seen_override_in_path:
- raise syaml.SpackYAMLError(
- f"Meaningless second override indicator `::' in path `{path}'", ""
- )
- path = path.lstrip(":")
- front = syaml.syaml_str(front)
- front.override = True # type: ignore[attr-defined]
- seen_override_in_path = True
-
- elif front.endswith("+"):
- front = front.rstrip("+")
- front = syaml.syaml_str(front)
- front.prepend = True # type: ignore[attr-defined]
-
- elif front.endswith("-"):
- front = front.rstrip("-")
- front = syaml.syaml_str(front)
- front.append = True # type: ignore[attr-defined]
-
- result.append(front)
+ [this, is, a, path, value:with:colon]
- quote = "['\"]"
- not_quote = "[^'\"]"
+ The path may consist only of keys (e.g. for a `get`) or may end in a value.
+ Keys are always strings: if a user encloses a key in quotes, the quotes
+ should be removed. Values with quotes should be treated as strings,
+ but without quotes, may be parsed as a different yaml object (e.g.
+ '{}' is a dict, but '"{}"' is a string).
- if re.match(f"^{quote}", path):
- m = re.match(rf"^({quote}{not_quote}+{quote})$", path)
- if not m:
- raise ValueError("Quotes indicate value, but there are additional path entries")
- result.append(m.group(1))
- break
+ This function does not know whether the final element of the path is a
+ key or value, so:
- return result
+ * It must strip the quotes, in case it is a key (so we look for "key" and
+ not '"key"'))
+ * It must indicate somehow that the quotes were stripped, in case it is a
+ value (so that we don't process '"{}"' as a YAML dict)
+
+ Therefore, all elements with quotes are stripped, and then also converted
+ to ``syaml_str`` (if treating the final element as a value, the caller
+ should not parse it in this case).
+ """
+ return ConfigPath.process(path)
#
@@ -1446,8 +1540,9 @@ def ensure_latest_format_fn(section: str) -> Callable[[YamlConfigDict], bool]:
def use_configuration(
*scopes_or_paths: Union[ConfigScope, str]
) -> Generator[Configuration, None, None]:
- """Use the configuration scopes passed as arguments within the
- context manager.
+ """Use the configuration scopes passed as arguments within the context manager.
+
+ This function invalidates caches, and is therefore very slow.
Args:
*scopes_or_paths: scope objects or paths to be used
@@ -1482,7 +1577,7 @@ def _config_from(scopes_or_paths: List[Union[ConfigScope, str]]) -> Configuratio
path = os.path.normpath(scope_or_path)
assert os.path.isdir(path), f'"{path}" must be a directory'
name = os.path.basename(path)
- scopes.append(ConfigScope(name, path))
+ scopes.append(DirectoryConfigScope(name, path))
configuration = Configuration(*scopes)
return configuration
@@ -1580,19 +1675,70 @@ def fetch_remote_configs(url: str, dest_dir: str, skip_existing: bool = True) ->
raise ConfigFileError(f"Cannot retrieve configuration (yaml) from {url}")
-class ConfigError(SpackError):
- """Superclass for all Spack config related errors."""
+def get_mark_from_yaml_data(obj):
+ """Try to get ``spack.util.spack_yaml`` mark from YAML data.
+ We try the object, and if that fails we try its first member (if it's a container).
-class ConfigSectionError(ConfigError):
+ Returns:
+ mark if one is found, otherwise None.
+ """
+ # mark of object itelf
+ mark = getattr(obj, "_start_mark", None)
+ if mark:
+ return mark
+
+ # mark of first member if it is a container
+ if isinstance(obj, (list, dict)):
+ first_member = next(iter(obj), None)
+ if first_member:
+ mark = getattr(first_member, "_start_mark", None)
+
+ return mark
+
+
+def determine_number_of_jobs(
+ *,
+ parallel: bool = False,
+ max_cpus: int = cpus_available(),
+ config: Optional[Configuration] = None,
+) -> int:
+ """
+ Packages that require sequential builds need 1 job. Otherwise we use the
+ number of jobs set on the command line. If not set, then we use the config
+ defaults (which is usually set through the builtin config scope), but we
+ cap to the number of CPUs available to avoid oversubscription.
+
+ Parameters:
+ parallel: true when package supports parallel builds
+ max_cpus: maximum number of CPUs to use (defaults to cpus_available())
+ config: configuration object (defaults to global config)
+ """
+ if not parallel:
+ return 1
+
+ cfg = config or CONFIG
+
+ # Command line overrides all
+ try:
+ command_line = cfg.get("config:build_jobs", default=None, scope="command_line")
+ if command_line is not None:
+ return command_line
+ except ValueError:
+ pass
+
+ return min(max_cpus, cfg.get("config:build_jobs", 16))
+
+
+class ConfigSectionError(spack.error.ConfigError):
"""Error for referring to a bad config section name in a configuration."""
-class ConfigFileError(ConfigError):
+class ConfigFileError(spack.error.ConfigError):
"""Issue reading or accessing a configuration file."""
-class ConfigFormatError(ConfigError):
+class ConfigFormatError(spack.error.ConfigError):
"""Raised when a configuration format does not match its schema."""
def __init__(
@@ -1625,23 +1771,9 @@ class ConfigFormatError(ConfigError):
def _get_mark(self, validation_error, data):
"""Get the file/line mark fo a validation error from a Spack YAML file."""
- def _get_mark_or_first_member_mark(obj):
- # mark of object itelf
- mark = getattr(obj, "_start_mark", None)
- if mark:
- return mark
-
- # mark of first member if it is a container
- if isinstance(obj, (list, dict)):
- first_member = next(iter(obj), None)
- if first_member:
- mark = getattr(first_member, "_start_mark", None)
- if mark:
- return mark
-
# Try various places, starting with instance and parent
for obj in (validation_error.instance, validation_error.parent):
- mark = _get_mark_or_first_member_mark(obj)
+ mark = get_mark_from_yaml_data(obj)
if mark:
return mark
diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json
index 8bf11ace93..72029facea 100644
--- a/lib/spack/spack/container/images.json
+++ b/lib/spack/spack/container/images.json
@@ -12,32 +12,26 @@
},
"os_package_manager": "yum_amazon"
},
- "fedora:38": {
+ "fedora:40": {
"bootstrap": {
- "template": "container/fedora_38.dockerfile",
- "image": "docker.io/fedora:38"
+ "template": "container/fedora.dockerfile",
+ "image": "docker.io/fedora:40"
},
"os_package_manager": "dnf",
- "build": "spack/fedora38",
- "build_tags": {
- "develop": "latest"
- },
+ "build": "spack/fedora40",
"final": {
- "image": "docker.io/fedora:38"
+ "image": "docker.io/fedora:40"
}
},
- "fedora:37": {
+ "fedora:39": {
"bootstrap": {
- "template": "container/fedora_37.dockerfile",
- "image": "docker.io/fedora:37"
+ "template": "container/fedora.dockerfile",
+ "image": "docker.io/fedora:39"
},
"os_package_manager": "dnf",
- "build": "spack/fedora37",
- "build_tags": {
- "develop": "latest"
- },
+ "build": "spack/fedora39",
"final": {
- "image": "docker.io/fedora:37"
+ "image": "docker.io/fedora:39"
}
},
"rockylinux:9": {
@@ -47,9 +41,6 @@
},
"os_package_manager": "dnf_epel",
"build": "spack/rockylinux9",
- "build_tags": {
- "develop": "latest"
- },
"final": {
"image": "docker.io/rockylinux:9"
}
@@ -61,9 +52,6 @@
},
"os_package_manager": "dnf_epel",
"build": "spack/rockylinux8",
- "build_tags": {
- "develop": "latest"
- },
"final": {
"image": "docker.io/rockylinux:8"
}
@@ -71,53 +59,34 @@
"almalinux:9": {
"bootstrap": {
"template": "container/almalinux_9.dockerfile",
- "image": "quay.io/almalinux/almalinux:9"
+ "image": "quay.io/almalinuxorg/almalinux:9"
},
"os_package_manager": "dnf_epel",
"build": "spack/almalinux9",
- "build_tags": {
- "develop": "latest"
- },
"final": {
- "image": "quay.io/almalinux/almalinux:9"
+ "image": "quay.io/almalinuxorg/almalinux:9"
}
},
"almalinux:8": {
"bootstrap": {
"template": "container/almalinux_8.dockerfile",
- "image": "quay.io/almalinux/almalinux:8"
+ "image": "quay.io/almalinuxorg/almalinux:8"
},
"os_package_manager": "dnf_epel",
"build": "spack/almalinux8",
- "build_tags": {
- "develop": "latest"
- },
"final": {
- "image": "quay.io/almalinux/almalinux:8"
+ "image": "quay.io/almalinuxorg/almalinux:8"
}
},
- "centos:stream": {
+ "centos:stream9": {
"bootstrap": {
- "template": "container/centos_stream.dockerfile",
- "image": "quay.io/centos/centos:stream"
+ "template": "container/centos_stream9.dockerfile",
+ "image": "quay.io/centos/centos:stream9"
},
"os_package_manager": "dnf_epel",
- "build": "spack/centos-stream",
+ "build": "spack/centos-stream9",
"final": {
- "image": "quay.io/centos/centos:stream"
- },
- "build_tags": {
- "develop": "latest"
- }
- },
- "centos:7": {
- "bootstrap": {
- "template": "container/centos_7.dockerfile"
- },
- "os_package_manager": "yum",
- "build": "spack/centos7",
- "build_tags": {
- "develop": "latest"
+ "image": "quay.io/centos/centos:stream9"
}
},
"opensuse/leap:15": {
@@ -126,9 +95,6 @@
},
"os_package_manager": "zypper",
"build": "spack/leap15",
- "build_tags": {
- "develop": "latest"
- },
"final": {
"image": "opensuse/leap:latest"
}
@@ -143,35 +109,26 @@
},
"os_package_manager": "apt"
},
+ "ubuntu:24.04": {
+ "bootstrap": {
+ "template": "container/ubuntu_2404.dockerfile"
+ },
+ "os_package_manager": "apt",
+ "build": "spack/ubuntu-noble"
+ },
"ubuntu:22.04": {
"bootstrap": {
"template": "container/ubuntu_2204.dockerfile"
},
"os_package_manager": "apt",
- "build": "spack/ubuntu-jammy",
- "build_tags": {
- "develop": "latest"
- }
+ "build": "spack/ubuntu-jammy"
},
"ubuntu:20.04": {
"bootstrap": {
"template": "container/ubuntu_2004.dockerfile"
},
"build": "spack/ubuntu-focal",
- "build_tags": {
- "develop": "latest"
- },
"os_package_manager": "apt"
- },
- "ubuntu:18.04": {
- "bootstrap": {
- "template": "container/ubuntu_1804.dockerfile"
- },
- "os_package_manager": "apt",
- "build": "spack/ubuntu-bionic",
- "build_tags": {
- "develop": "latest"
- }
}
},
"os_package_managers": {
diff --git a/lib/spack/spack/container/images.py b/lib/spack/spack/container/images.py
index 6ff4f456af..8f012bce2f 100644
--- a/lib/spack/spack/container/images.py
+++ b/lib/spack/spack/container/images.py
@@ -50,10 +50,7 @@ def build_info(image, spack_version):
if not build_image:
return None, None
- # Translate version from git to docker if necessary
- build_tag = image_data["build_tags"].get(spack_version, spack_version)
-
- return build_image, build_tag
+ return build_image, spack_version
def os_package_manager_for(image):
diff --git a/lib/spack/spack/container/writers/__init__.py b/lib/spack/spack/container/writers.py
index cf186b5764..0b5d14157c 100644
--- a/lib/spack/spack/container/writers/__init__.py
+++ b/lib/spack/spack/container/writers.py
@@ -6,6 +6,7 @@
convenience functions.
"""
import copy
+import shlex
from collections import namedtuple
from typing import Optional
@@ -15,7 +16,7 @@ import spack.schema.env
import spack.tengine as tengine
import spack.util.spack_yaml as syaml
-from ..images import (
+from .images import (
bootstrap_template_for,
build_info,
checkout_command,
@@ -308,8 +309,54 @@ class PathContext(tengine.Context):
return t.render(**self.to_dict())
-import spack.container.writers.docker # noqa: E402
+@writer("docker")
+class DockerContext(PathContext):
+ """Context used to instantiate a Dockerfile"""
-# Import after function definition all the modules in this package,
-# so that registration of writers will happen automatically
-import spack.container.writers.singularity # noqa: E402
+ #: Name of the template used for Dockerfiles
+ template_name = "container/Dockerfile"
+
+ @tengine.context_property
+ def manifest(self):
+ manifest_str = super().manifest
+ # Docker doesn't support HEREDOC, so we need to resort to
+ # a horrible echo trick to have the manifest in the Dockerfile
+ echoed_lines = []
+ for idx, line in enumerate(manifest_str.split("\n")):
+ quoted_line = shlex.quote(line)
+ if idx == 0:
+ echoed_lines.append("&& (echo " + quoted_line + " \\")
+ continue
+ echoed_lines.append("&& echo " + quoted_line + " \\")
+
+ echoed_lines[-1] = echoed_lines[-1].replace(" \\", ")")
+
+ return "\n".join(echoed_lines)
+
+
+@writer("singularity")
+class SingularityContext(PathContext):
+ """Context used to instantiate a Singularity definition file"""
+
+ #: Name of the template used for Singularity definition files
+ template_name = "container/singularity.def"
+
+ @property
+ def singularity_config(self):
+ return self.container_config.get("singularity", {})
+
+ @tengine.context_property
+ def runscript(self):
+ return self.singularity_config.get("runscript", "")
+
+ @tengine.context_property
+ def startscript(self):
+ return self.singularity_config.get("startscript", "")
+
+ @tengine.context_property
+ def test(self):
+ return self.singularity_config.get("test", "")
+
+ @tengine.context_property
+ def help(self):
+ return self.singularity_config.get("help", "")
diff --git a/lib/spack/spack/container/writers/docker.py b/lib/spack/spack/container/writers/docker.py
deleted file mode 100644
index 287ef9d1ac..0000000000
--- a/lib/spack/spack/container/writers/docker.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2013-2024 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 shlex
-
-import spack.tengine as tengine
-
-from . import PathContext, writer
-
-
-@writer("docker")
-class DockerContext(PathContext):
- """Context used to instantiate a Dockerfile"""
-
- #: Name of the template used for Dockerfiles
- template_name = "container/Dockerfile"
-
- @tengine.context_property
- def manifest(self):
- manifest_str = super().manifest
- # Docker doesn't support HEREDOC, so we need to resort to
- # a horrible echo trick to have the manifest in the Dockerfile
- echoed_lines = []
- for idx, line in enumerate(manifest_str.split("\n")):
- quoted_line = shlex.quote(line)
- if idx == 0:
- echoed_lines.append("&& (echo " + quoted_line + " \\")
- continue
- echoed_lines.append("&& echo " + quoted_line + " \\")
-
- echoed_lines[-1] = echoed_lines[-1].replace(" \\", ")")
-
- return "\n".join(echoed_lines)
diff --git a/lib/spack/spack/container/writers/singularity.py b/lib/spack/spack/container/writers/singularity.py
deleted file mode 100644
index 5cbb055fd3..0000000000
--- a/lib/spack/spack/container/writers/singularity.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2013-2024 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 spack.tengine as tengine
-
-from . import PathContext, writer
-
-
-@writer("singularity")
-class SingularityContext(PathContext):
- """Context used to instantiate a Singularity definition file"""
-
- #: Name of the template used for Singularity definition files
- template_name = "container/singularity.def"
-
- @property
- def singularity_config(self):
- return self.container_config.get("singularity", {})
-
- @tengine.context_property
- def runscript(self):
- return self.singularity_config.get("runscript", "")
-
- @tengine.context_property
- def startscript(self):
- return self.singularity_config.get("startscript", "")
-
- @tengine.context_property
- def test(self):
- return self.singularity_config.get("test", "")
-
- @tengine.context_property
- def help(self):
- return self.singularity_config.get("help", "")
diff --git a/lib/spack/spack/cray_manifest.py b/lib/spack/spack/cray_manifest.py
index eb26b3e6b9..41767bdf06 100644
--- a/lib/spack/spack/cray_manifest.py
+++ b/lib/spack/spack/cray_manifest.py
@@ -14,12 +14,14 @@ import jsonschema.exceptions
import llnl.util.tty as tty
import spack.cmd
+import spack.compilers
import spack.deptypes as dt
import spack.error
import spack.hash_types as hash_types
import spack.platforms
import spack.repo
import spack.spec
+import spack.store
from spack.schema.cray_manifest import schema as manifest_schema
#: Cray systems can store a Spack-compatible description of system
@@ -130,7 +132,7 @@ def spec_from_entry(entry):
variant_strs = list()
for name, value in entry["parameters"].items():
# TODO: also ensure that the variant value is valid?
- if not (name in pkg_cls.variants):
+ if not pkg_cls.has_variant(name):
tty.debug(
"Omitting variant {0} for entry {1}/{2}".format(
name, entry["name"], entry["hash"][:7]
@@ -227,7 +229,7 @@ def read(path, apply_updates):
if apply_updates and compilers:
for compiler in compilers:
try:
- spack.compilers.add_compilers_to_config([compiler], init_config=False)
+ spack.compilers.add_compilers_to_config([compiler])
except Exception:
warnings.warn(
f"Could not add compiler {str(compiler.spec)}: "
@@ -237,7 +239,7 @@ def read(path, apply_updates):
tty.debug(f"Include this\n{traceback.format_exc()}")
if apply_updates:
for spec in specs.values():
- spack.store.STORE.db.add(spec, directory_layout=None)
+ spack.store.STORE.db.add(spec)
class ManifestValidationError(spack.error.SpackError):
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index a854b864da..ed68b5d13c 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -25,12 +25,14 @@ import pathlib
import socket
import sys
import time
+from json import JSONDecoder
from typing import (
Any,
Callable,
Container,
Dict,
Generator,
+ Iterable,
List,
NamedTuple,
Optional,
@@ -49,6 +51,7 @@ except ImportError:
pass
import llnl.util.filesystem as fs
+import llnl.util.lang
import llnl.util.tty as tty
import spack.deptypes as dt
@@ -58,10 +61,16 @@ import spack.traverse as tr
import spack.util.lock as lk
import spack.util.spack_json as sjson
import spack.version as vn
-from spack.directory_layout import DirectoryLayoutError, InconsistentInstallDirectoryError
+from spack.directory_layout import (
+ DirectoryLayout,
+ DirectoryLayoutError,
+ InconsistentInstallDirectoryError,
+)
from spack.error import SpackError
from spack.util.crypto import bit_length
+from .enums import InstallRecordStatus
+
# TODO: Provide an API automatically retyring a build after detecting and
# TODO: clearing a failure.
@@ -116,6 +125,17 @@ DEFAULT_INSTALL_RECORD_FIELDS = (
)
+@llnl.util.lang.memoized
+def _getfqdn():
+ """Memoized version of `getfqdn()`.
+
+ If we call `getfqdn()` too many times, DNS can be very slow. We only need to call it
+ one time per process, so we cache it here.
+
+ """
+ return socket.getfqdn()
+
+
def reader(version: vn.StandardVersion) -> Type["spack.spec.SpecfileReaderBase"]:
reader_cls = {
vn.Version("5"): spack.spec.SpecfileV1,
@@ -142,36 +162,12 @@ def _autospec(function):
return converter
-class InstallStatus(str):
- pass
-
-
-class InstallStatuses:
- INSTALLED = InstallStatus("installed")
- DEPRECATED = InstallStatus("deprecated")
- MISSING = InstallStatus("missing")
-
- @classmethod
- def canonicalize(cls, query_arg):
- if query_arg is True:
- return [cls.INSTALLED]
- if query_arg is False:
- return [cls.MISSING]
- if query_arg is any:
- return [cls.INSTALLED, cls.DEPRECATED, cls.MISSING]
- if isinstance(query_arg, InstallStatus):
- return [query_arg]
- try:
- statuses = list(query_arg)
- if all(isinstance(x, InstallStatus) for x in statuses):
- return statuses
- except TypeError:
- pass
-
- raise TypeError(
- "installation query must be `any`, boolean, "
- "InstallStatus, or iterable of InstallStatus"
- )
+def normalize_query(installed: Union[bool, InstallRecordStatus]) -> InstallRecordStatus:
+ if installed is True:
+ installed = InstallRecordStatus.INSTALLED
+ elif installed is False:
+ installed = InstallRecordStatus.MISSING
+ return installed
class InstallRecord:
@@ -202,15 +198,15 @@ class InstallRecord:
def __init__(
self,
spec: "spack.spec.Spec",
- path: str,
+ path: Optional[str],
installed: bool,
ref_count: int = 0,
explicit: bool = False,
installation_time: Optional[float] = None,
- deprecated_for: Optional["spack.spec.Spec"] = None,
+ deprecated_for: Optional[str] = None,
in_buildcache: bool = False,
- origin=None,
- ):
+ origin: Optional[str] = None,
+ ) -> None:
self.spec = spec
self.path = str(path) if path else None
self.installed = bool(installed)
@@ -221,14 +217,12 @@ class InstallRecord:
self.in_buildcache = in_buildcache
self.origin = origin
- def install_type_matches(self, installed):
- installed = InstallStatuses.canonicalize(installed)
+ def install_type_matches(self, installed: InstallRecordStatus) -> bool:
if self.installed:
- return InstallStatuses.INSTALLED in installed
+ return InstallRecordStatus.INSTALLED in installed
elif self.deprecated_for:
- return InstallStatuses.DEPRECATED in installed
- else:
- return InstallStatuses.MISSING in installed
+ return InstallRecordStatus.DEPRECATED in installed
+ return InstallRecordStatus.MISSING in installed
def to_dict(self, include_fields=DEFAULT_INSTALL_RECORD_FIELDS):
rec_dict = {}
@@ -273,55 +267,6 @@ class ForbiddenLock:
return ForbiddenLock, tuple()
-_QUERY_DOCSTRING = """
-
- Args:
- query_spec: queries iterate through specs in the database and
- return those that satisfy the supplied ``query_spec``. If
- query_spec is `any`, This will match all specs in the
- database. If it is a spec, we'll evaluate
- ``spec.satisfies(query_spec)``
-
- 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 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 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.datetime or None): filters the query
- discarding specs that have been installed before ``start_date``.
-
- 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
- restrict the search
-
- 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``.
-
- Returns:
- list of specs that match the query
-
- """
-
-
class LockConfiguration(NamedTuple):
"""Data class to configure locks in Database objects
@@ -587,6 +532,9 @@ class FailureTracker:
return self.dir / f"{spec.name}-{spec.dag_hash()}"
+SelectType = Callable[[InstallRecord], bool]
+
+
class Database:
#: Fields written for each install record
record_fields: Tuple[str, ...] = DEFAULT_INSTALL_RECORD_FIELDS
@@ -594,9 +542,11 @@ class Database:
def __init__(
self,
root: str,
+ *,
upstream_dbs: Optional[List["Database"]] = None,
is_upstream: bool = False,
lock_cfg: LockConfiguration = DEFAULT_LOCK_CFG,
+ layout: Optional[DirectoryLayout] = None,
) -> None:
"""Database for Spack installations.
@@ -619,6 +569,7 @@ class Database:
"""
self.root = root
self.database_directory = os.path.join(self.root, _DB_DIRNAME)
+ self.layout = layout
# Set up layout of database files within the db dir
self._index_path = os.path.join(self.database_directory, "index.json")
@@ -663,14 +614,6 @@ class Database:
self.upstream_dbs = list(upstream_dbs) if upstream_dbs else []
- # whether there was an error at the start of a read transaction
- self._error = None
-
- # For testing: if this is true, an exception is thrown when missing
- # dependencies are detected (rather than just printing a warning
- # message)
- self._fail_when_missing_deps = False
-
self._write_transaction_impl = lk.WriteTransaction
self._read_transaction_impl = lk.ReadTransaction
@@ -773,7 +716,13 @@ class Database:
with self.read_transaction():
return self._data.get(hash_key, None)
- def _assign_dependencies(self, spec_reader, hash_key, installs, data):
+ def _assign_dependencies(
+ self,
+ spec_reader: Type["spack.spec.SpecfileReaderBase"],
+ hash_key: str,
+ installs: dict,
+ data: Dict[str, InstallRecord],
+ ):
# Add dependencies from other records in the install DB to
# form a full spec.
spec = data[hash_key].spec
@@ -786,26 +735,20 @@ class Database:
for dname, dhash, dtypes, _, virtuals in spec_reader.read_specfile_dep_specs(
yaml_deps
):
- # It is important that we always check upstream installations
- # in the same order, and that we always check the local
- # installation first: if a downstream Spack installs a package
- # then dependents in that installation could be using it.
- # If a hash is installed locally and upstream, there isn't
- # enough information to determine which one a local package
- # depends on, so the convention ensures that this isn't an
- # issue.
- upstream, record = self.query_by_spec_hash(dhash, data=data)
+ # It is important that we always check upstream installations in the same order,
+ # and that we always check the local installation first: if a downstream Spack
+ # installs a package then dependents in that installation could be using it. If a
+ # hash is installed locally and upstream, there isn't enough information to
+ # determine which one a local package depends on, so the convention ensures that
+ # this isn't an issue.
+ _, record = self.query_by_spec_hash(dhash, data=data)
child = record.spec if record else None
if not child:
- msg = "Missing dependency not in database: " "%s needs %s-%s" % (
- spec.cformat("{name}{/hash:7}"),
- dname,
- dhash[:7],
+ tty.warn(
+ f"Missing dependency not in database: "
+ f"{spec.cformat('{name}{/hash:7}')} needs {dname}-{dhash[:7]}"
)
- if self._fail_when_missing_deps:
- raise MissingDependenciesError(msg)
- tty.warn(msg)
continue
spec._add_dependency(child, depflag=dt.canonicalize(dtypes), virtuals=virtuals)
@@ -818,7 +761,8 @@ class Database:
"""
try:
with open(filename, "r") as f:
- fdata = sjson.load(f)
+ # In the future we may use a stream of JSON objects, hence `raw_decode` for compat.
+ fdata, _ = JSONDecoder().raw_decode(f.read())
except Exception as e:
raise CorruptDatabaseError("error parsing database:", str(e)) from e
@@ -833,27 +777,24 @@ class Database:
# High-level file checks
db = fdata["database"]
- check("installs" in db, "no 'installs' in JSON DB.")
check("version" in db, "no 'version' in JSON DB.")
- installs = db["installs"]
-
# TODO: better version checking semantics.
version = vn.Version(db["version"])
if version > _DB_VERSION:
raise InvalidDatabaseVersionError(self, _DB_VERSION, version)
- elif version < _DB_VERSION:
- if not any(old == version and new == _DB_VERSION for old, new in _SKIP_REINDEX):
- tty.warn(
- "Spack database version changed from %s to %s. Upgrading."
- % (version, _DB_VERSION)
- )
-
- self.reindex(spack.store.STORE.layout)
- installs = dict(
- (k, v.to_dict(include_fields=self._record_fields))
- for k, v in self._data.items()
- )
+ elif version < _DB_VERSION and not any(
+ old == version and new == _DB_VERSION for old, new in _SKIP_REINDEX
+ ):
+ tty.warn(f"Spack database version changed from {version} to {_DB_VERSION}. Upgrading.")
+
+ self.reindex()
+ installs = dict(
+ (k, v.to_dict(include_fields=self._record_fields)) for k, v in self._data.items()
+ )
+ else:
+ check("installs" in db, "no 'installs' in JSON DB.")
+ installs = db["installs"]
spec_reader = reader(version)
@@ -874,8 +815,8 @@ class Database:
# (i.e., its specs are a true Merkle DAG, unlike most specs.)
# Pass 1: Iterate through database and build specs w/o dependencies
- data = {}
- installed_prefixes = set()
+ data: Dict[str, InstallRecord] = {}
+ installed_prefixes: Set[str] = set()
for hash_key, rec in installs.items():
try:
# This constructs a spec DAG from the list of all installs
@@ -912,7 +853,7 @@ class Database:
self._data = data
self._installed_prefixes = installed_prefixes
- def reindex(self, directory_layout):
+ def reindex(self):
"""Build database index from scratch based on a directory layout.
Locks the DB if it isn't locked already.
@@ -927,105 +868,116 @@ class Database:
if os.path.isfile(self._index_path):
self._read_from_file(self._index_path)
except CorruptDatabaseError as e:
- self._error = e
+ tty.warn(f"Reindexing corrupt database, error was: {e}")
self._data = {}
self._installed_prefixes = set()
- transaction = lk.WriteTransaction(
- self.lock, acquire=_read_suppress_error, release=self._write
- )
-
- with transaction:
- if self._error:
- tty.warn("Spack database was corrupt. Will rebuild. Error was:", str(self._error))
- self._error = None
-
- old_data = self._data
- old_installed_prefixes = self._installed_prefixes
+ with lk.WriteTransaction(self.lock, acquire=_read_suppress_error, release=self._write):
+ old_installed_prefixes, self._installed_prefixes = self._installed_prefixes, set()
+ old_data, self._data = self._data, {}
try:
- self._construct_from_directory_layout(directory_layout, old_data)
+ self._reindex(old_data)
except BaseException:
# If anything explodes, restore old data, skip write.
self._data = old_data
self._installed_prefixes = old_installed_prefixes
raise
- def _construct_entry_from_directory_layout(
- self, directory_layout, old_data, spec, deprecator=None
- ):
- # Try to recover explicit value from old DB, but
- # default it to True if DB was corrupt. This is
- # just to be conservative in case a command like
- # "autoremove" is run by the user after a reindex.
- tty.debug("RECONSTRUCTING FROM SPEC.YAML: {0}".format(spec))
- explicit = True
- inst_time = os.stat(spec.prefix).st_ctime
- if old_data is not None:
- old_info = old_data.get(spec.dag_hash())
- if old_info is not None:
- explicit = old_info.explicit
- inst_time = old_info.installation_time
-
- extra_args = {"explicit": explicit, "installation_time": inst_time}
- self._add(spec, directory_layout, **extra_args)
- if deprecator:
- self._deprecate(spec, deprecator)
-
- def _construct_from_directory_layout(self, directory_layout, old_data):
- # Read first the `spec.yaml` files in the prefixes. They should be
- # considered authoritative with respect to DB reindexing, as
- # entries in the DB may be corrupted in a way that still makes
- # them readable. If we considered DB entries authoritative
- # instead, we would perpetuate errors over a reindex.
- with directory_layout.disable_upstream_check():
- # Initialize data in the reconstructed DB
- self._data = {}
- self._installed_prefixes = set()
-
- # Start inspecting the installed prefixes
- processed_specs = set()
-
- for spec in directory_layout.all_specs():
- self._construct_entry_from_directory_layout(directory_layout, old_data, spec)
- processed_specs.add(spec)
-
- for spec, deprecator in directory_layout.all_deprecated_specs():
- self._construct_entry_from_directory_layout(
- directory_layout, old_data, spec, deprecator
+ def _reindex(self, old_data: Dict[str, InstallRecord]):
+ # Specs on the file system are the source of truth for record.spec. The old database values
+ # if available are the source of truth for the rest of the record.
+ assert self.layout, "Database layout must be set to reindex"
+
+ specs_from_fs = self.layout.all_specs()
+ deprecated_for = self.layout.deprecated_for(specs_from_fs)
+
+ known_specs: List[spack.spec.Spec] = [
+ *specs_from_fs,
+ *(deprecated for _, deprecated in deprecated_for),
+ *(rec.spec for rec in old_data.values()),
+ ]
+
+ upstream_hashes = {
+ dag_hash for upstream in self.upstream_dbs for dag_hash in upstream._data
+ }
+ upstream_hashes.difference_update(spec.dag_hash() for spec in known_specs)
+
+ def create_node(edge: spack.spec.DependencySpec, is_upstream: bool):
+ if is_upstream:
+ return
+
+ self._data[edge.spec.dag_hash()] = InstallRecord(
+ spec=edge.spec.copy(deps=False),
+ path=edge.spec.external_path if edge.spec.external else None,
+ installed=edge.spec.external,
+ )
+
+ # Store all nodes of known specs, excluding ones found in upstreams
+ tr.traverse_breadth_first_with_visitor(
+ known_specs,
+ tr.CoverNodesVisitor(
+ NoUpstreamVisitor(upstream_hashes, create_node), key=tr.by_dag_hash
+ ),
+ )
+
+ # Store the prefix and other information for specs were found on the file system
+ for s in specs_from_fs:
+ record = self._data[s.dag_hash()]
+ record.path = s.prefix
+ record.installed = True
+ record.explicit = True # conservative assumption
+ record.installation_time = os.stat(s.prefix).st_ctime
+
+ # Deprecate specs
+ for new, old in deprecated_for:
+ self._data[old.dag_hash()].deprecated_for = new.dag_hash()
+
+ # Copy data we have from the old database
+ for old_record in old_data.values():
+ record = self._data[old_record.spec.dag_hash()]
+ record.explicit = old_record.explicit
+ record.installation_time = old_record.installation_time
+ record.origin = old_record.origin
+ record.deprecated_for = old_record.deprecated_for
+
+ # Warn when the spec has been removed from the file system (i.e. it was not detected)
+ if not record.installed and old_record.installed:
+ tty.warn(
+ f"Spec {old_record.spec.short_spec} was marked installed in the database "
+ "but was not found on the file system. It is now marked as missing."
)
- processed_specs.add(spec)
-
- for key, entry in old_data.items():
- # We already took care of this spec using
- # `spec.yaml` from its prefix.
- if entry.spec in processed_specs:
- msg = "SKIPPING RECONSTRUCTION FROM OLD DB: {0}"
- msg += " [already reconstructed from spec.yaml]"
- tty.debug(msg.format(entry.spec))
- continue
- # If we arrived here it very likely means that
- # we have external specs that are not dependencies
- # of other specs. This may be the case for externally
- # installed compilers or externally installed
- # applications.
- tty.debug("RECONSTRUCTING FROM OLD DB: {0}".format(entry.spec))
- try:
- layout = None if entry.spec.external else directory_layout
- kwargs = {
- "spec": entry.spec,
- "directory_layout": layout,
- "explicit": entry.explicit,
- "installation_time": entry.installation_time,
- }
- self._add(**kwargs)
- processed_specs.add(entry.spec)
- except Exception as e:
- # Something went wrong, so the spec was not restored
- # from old data
- tty.debug(e)
-
- self._check_ref_counts()
+ def create_edge(edge: spack.spec.DependencySpec, is_upstream: bool):
+ if not edge.parent:
+ return
+ parent_record = self._data[edge.parent.dag_hash()]
+ if is_upstream:
+ upstream, child_record = self.query_by_spec_hash(edge.spec.dag_hash())
+ assert upstream and child_record, "Internal error: upstream spec not found"
+ else:
+ child_record = self._data[edge.spec.dag_hash()]
+ parent_record.spec._add_dependency(
+ child_record.spec, depflag=edge.depflag, virtuals=edge.virtuals
+ )
+
+ # Then store edges
+ tr.traverse_breadth_first_with_visitor(
+ known_specs,
+ tr.CoverEdgesVisitor(
+ NoUpstreamVisitor(upstream_hashes, create_edge), key=tr.by_dag_hash
+ ),
+ )
+
+ # Finally update the ref counts
+ for record in self._data.values():
+ for dep in record.spec.dependencies(deptype=_TRACKED_DEPENDENCIES):
+ dep_record = self._data.get(dep.dag_hash())
+ if dep_record: # dep might be upstream
+ dep_record.ref_count += 1
+ if record.deprecated_for:
+ self._data[record.deprecated_for].ref_count += 1
+
+ self._check_ref_counts()
def _check_ref_counts(self):
"""Ensure consistency of reference counts in the DB.
@@ -1034,7 +986,7 @@ class Database:
Does no locking.
"""
- counts = {}
+ counts: Dict[str, int] = {}
for key, rec in self._data.items():
counts.setdefault(key, 0)
for dep in rec.spec.dependencies(deptype=_TRACKED_DEPENDENCIES):
@@ -1075,7 +1027,7 @@ class Database:
self._state_is_inconsistent = True
return
- temp_file = self._index_path + (".%s.%s.temp" % (socket.getfqdn(), os.getpid()))
+ temp_file = self._index_path + (".%s.%s.temp" % (_getfqdn(), os.getpid()))
# Write a temporary database file them move it into place
try:
@@ -1118,29 +1070,23 @@ class Database:
def _add(
self,
- spec,
- directory_layout=None,
- explicit=False,
- installation_time=None,
- allow_missing=False,
+ spec: "spack.spec.Spec",
+ explicit: bool = False,
+ installation_time: Optional[float] = None,
+ allow_missing: bool = False,
):
"""Add an install record for this spec to the database.
- Assumes spec is installed in ``directory_layout.path_for_spec(spec)``.
-
- Also ensures dependencies are present and updated in the DB as
- either installed or missing.
+ Also ensures dependencies are present and updated in the DB as either installed or missing.
Args:
- spec (spack.spec.Spec): spec to be added
- directory_layout: layout of the spec installation
+ spec: spec to be added
explicit:
Possible values: True, False, any
- 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.
+ 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.
installation_time:
Date and time of installation
@@ -1151,48 +1097,42 @@ class Database:
raise NonConcreteSpecAddError("Specs added to DB must be concrete.")
key = spec.dag_hash()
- spec_pkg_hash = spec._package_hash
+ spec_pkg_hash = spec._package_hash # type: ignore[attr-defined]
upstream, record = self.query_by_spec_hash(key)
if upstream:
return
- # Retrieve optional arguments
installation_time = installation_time or _now()
for edge in spec.edges_to_dependencies(depflag=_TRACKED_DEPENDENCIES):
if edge.spec.dag_hash() in self._data:
continue
- # allow missing build-only deps. This prevents excessive
- # warnings when a spec is installed, and its build dep
- # is missing a build dep; there's no need to install the
- # build dep's build dep first, and there's no need to warn
- # about it missing.
- dep_allow_missing = allow_missing or edge.depflag == dt.BUILD
self._add(
edge.spec,
- directory_layout,
explicit=False,
installation_time=installation_time,
- allow_missing=dep_allow_missing,
+ # allow missing build-only deps. This prevents excessive warnings when a spec is
+ # installed, and its build dep is missing a build dep; there's no need to install
+ # the build dep's build dep first, and there's no need to warn about it missing.
+ allow_missing=allow_missing or edge.depflag == dt.BUILD,
)
# Make sure the directory layout agrees whether the spec is installed
- if not spec.external and directory_layout:
- path = directory_layout.path_for_spec(spec)
+ if not spec.external and self.layout:
+ path = self.layout.path_for_spec(spec)
installed = False
try:
- directory_layout.ensure_installed(spec)
+ self.layout.ensure_installed(spec)
installed = True
self._installed_prefixes.add(path)
except DirectoryLayoutError as e:
if not (allow_missing and isinstance(e, InconsistentInstallDirectoryError)):
- msg = (
- "{0} is being {1} in the database with prefix {2}, "
+ action = "updated" if key in self._data else "registered"
+ tty.warn(
+ f"{spec.short_spec} is being {action} in the database with prefix {path}, "
"but this directory does not contain an installation of "
- "the spec, due to: {3}"
+ f"the spec, due to: {e}"
)
- action = "updated" if key in self._data else "registered"
- tty.warn(msg.format(spec.short_spec, action, path, str(e)))
elif spec.external_path:
path = spec.external_path
installed = True
@@ -1203,23 +1143,27 @@ class Database:
if key not in self._data:
# Create a new install record with no deps initially.
new_spec = spec.copy(deps=False)
- extra_args = {"explicit": explicit, "installation_time": installation_time}
- # Commands other than 'spack install' may add specs to the DB,
- # we can record the source of an installed Spec with 'origin'
- if hasattr(spec, "origin"):
- extra_args["origin"] = spec.origin
- self._data[key] = InstallRecord(new_spec, path, installed, ref_count=0, **extra_args)
+ self._data[key] = InstallRecord(
+ new_spec,
+ path=path,
+ installed=installed,
+ ref_count=0,
+ explicit=explicit,
+ installation_time=installation_time,
+ origin=None if not hasattr(spec, "origin") else spec.origin,
+ )
# Connect dependencies from the DB to the new copy.
for dep in spec.edges_to_dependencies(depflag=_TRACKED_DEPENDENCIES):
dkey = dep.spec.dag_hash()
upstream, record = self.query_by_spec_hash(dkey)
+ assert record, f"Missing dependency {dep.spec.short_spec} in DB"
new_spec._add_dependency(record.spec, depflag=dep.depflag, virtuals=dep.virtuals)
if not upstream:
record.ref_count += 1
- # Mark concrete once everything is built, and preserve
- # the original hashes of concrete specs.
+ # Mark concrete once everything is built, and preserve the original hashes of concrete
+ # specs.
new_spec._mark_concrete()
new_spec._hash = key
new_spec._package_hash = spec_pkg_hash
@@ -1232,7 +1176,7 @@ class Database:
self._data[key].explicit = explicit
@_autospec
- def add(self, spec, directory_layout, explicit=False):
+ def add(self, spec: "spack.spec.Spec", *, explicit: bool = False, allow_missing=False) -> None:
"""Add spec at path to database, locking and reading DB to sync.
``add()`` will lock and read from the DB on disk.
@@ -1241,9 +1185,9 @@ class Database:
# TODO: ensure that spec is concrete?
# Entire add is transactional.
with self.write_transaction():
- self._add(spec, directory_layout, explicit=explicit)
+ self._add(spec, explicit=explicit, allow_missing=allow_missing)
- def _get_matching_spec_key(self, spec, **kwargs):
+ def _get_matching_spec_key(self, spec: "spack.spec.Spec", **kwargs) -> str:
"""Get the exact spec OR get a single spec that matches."""
key = spec.dag_hash()
upstream, record = self.query_by_spec_hash(key)
@@ -1255,12 +1199,12 @@ class Database:
return key
@_autospec
- def get_record(self, spec, **kwargs):
+ def get_record(self, spec: "spack.spec.Spec", **kwargs) -> Optional[InstallRecord]:
key = self._get_matching_spec_key(spec, **kwargs)
upstream, record = self.query_by_spec_hash(key)
return record
- def _decrement_ref_count(self, spec):
+ def _decrement_ref_count(self, spec: "spack.spec.Spec") -> None:
key = spec.dag_hash()
if key not in self._data:
@@ -1277,7 +1221,7 @@ class Database:
for dep in spec.dependencies(deptype=_TRACKED_DEPENDENCIES):
self._decrement_ref_count(dep)
- def _increment_ref_count(self, spec):
+ def _increment_ref_count(self, spec: "spack.spec.Spec") -> None:
key = spec.dag_hash()
if key not in self._data:
@@ -1286,14 +1230,14 @@ class Database:
rec = self._data[key]
rec.ref_count += 1
- def _remove(self, spec):
+ def _remove(self, spec: "spack.spec.Spec") -> "spack.spec.Spec":
"""Non-locking version of remove(); does real work."""
key = self._get_matching_spec_key(spec)
rec = self._data[key]
# This install prefix is now free for other specs to use, even if the
# spec is only marked uninstalled.
- if not rec.spec.external and rec.installed:
+ if not rec.spec.external and rec.installed and rec.path:
self._installed_prefixes.remove(rec.path)
if rec.ref_count > 0:
@@ -1317,7 +1261,7 @@ class Database:
return rec.spec
@_autospec
- def remove(self, spec):
+ def remove(self, spec: "spack.spec.Spec") -> "spack.spec.Spec":
"""Removes a spec from the database. To be called on uninstall.
Reads the database, then:
@@ -1332,7 +1276,7 @@ class Database:
with self.write_transaction():
return self._remove(spec)
- def deprecator(self, spec):
+ def deprecator(self, spec: "spack.spec.Spec") -> Optional["spack.spec.Spec"]:
"""Return the spec that the given spec is deprecated for, or None"""
with self.read_transaction():
spec_key = self._get_matching_spec_key(spec)
@@ -1343,14 +1287,14 @@ class Database:
else:
return None
- def specs_deprecated_by(self, spec):
+ def specs_deprecated_by(self, spec: "spack.spec.Spec") -> List["spack.spec.Spec"]:
"""Return all specs deprecated in favor of the given spec"""
with self.read_transaction():
return [
rec.spec for rec in self._data.values() if rec.deprecated_for == spec.dag_hash()
]
- def _deprecate(self, spec, deprecator):
+ def _deprecate(self, spec: "spack.spec.Spec", deprecator: "spack.spec.Spec") -> None:
spec_key = self._get_matching_spec_key(spec)
spec_rec = self._data[spec_key]
@@ -1368,17 +1312,17 @@ class Database:
self._data[spec_key] = spec_rec
@_autospec
- def mark(self, spec, key, value):
+ def mark(self, spec: "spack.spec.Spec", key: str, value: Any) -> None:
"""Mark an arbitrary record on a spec."""
with self.write_transaction():
return self._mark(spec, key, value)
- def _mark(self, spec, key, value):
+ def _mark(self, spec: "spack.spec.Spec", key, value) -> None:
record = self._data[self._get_matching_spec_key(spec)]
setattr(record, key, value)
@_autospec
- def deprecate(self, spec, deprecator):
+ def deprecate(self, spec: "spack.spec.Spec", deprecator: "spack.spec.Spec") -> None:
"""Marks a spec as deprecated in favor of its deprecator"""
with self.write_transaction():
return self._deprecate(spec, deprecator)
@@ -1386,16 +1330,16 @@ class Database:
@_autospec
def installed_relatives(
self,
- spec,
- direction="children",
- transitive=True,
+ spec: "spack.spec.Spec",
+ direction: str = "children",
+ transitive: bool = True,
deptype: Union[dt.DepFlag, dt.DepTypes] = dt.ALL,
- ):
+ ) -> Set["spack.spec.Spec"]:
"""Return installed specs related to this one."""
if direction not in ("parents", "children"):
raise ValueError("Invalid direction: %s" % direction)
- relatives = set()
+ relatives: Set[spack.spec.Spec] = set()
for spec in self.query(spec):
if transitive:
to_add = spec.traverse(direction=direction, root=False, deptype=deptype)
@@ -1406,17 +1350,13 @@ class Database:
for relative in to_add:
hash_key = relative.dag_hash()
- upstream, record = self.query_by_spec_hash(hash_key)
+ _, record = self.query_by_spec_hash(hash_key)
if not record:
- reltype = "Dependent" if direction == "parents" else "Dependency"
- msg = "Inconsistent state! %s %s of %s not in DB" % (
- reltype,
- hash_key,
- spec.dag_hash(),
+ tty.warn(
+ f"Inconsistent state: "
+ f"{'dependent' if direction == 'parents' else 'dependency'} {hash_key} of "
+ f"{spec.dag_hash()} not in DB"
)
- if self._fail_when_missing_deps:
- raise MissingDependenciesError(msg)
- tty.warn(msg)
continue
if not record.installed:
@@ -1426,13 +1366,19 @@ class Database:
return relatives
@_autospec
- def installed_extensions_for(self, extendee_spec):
+ def installed_extensions_for(self, extendee_spec: "spack.spec.Spec"):
"""Returns the specs of all packages that extend the given spec"""
for spec in self.query():
if spec.package.extends(extendee_spec):
yield spec.package
- def _get_by_hash_local(self, dag_hash, default=None, installed=any):
+ def _get_by_hash_local(
+ self,
+ dag_hash: str,
+ default: Optional[List["spack.spec.Spec"]] = None,
+ installed: Union[bool, InstallRecordStatus] = InstallRecordStatus.ANY,
+ ) -> Optional[List["spack.spec.Spec"]]:
+ installed = normalize_query(installed)
# hash is a full hash and is in the data somewhere
if dag_hash in self._data:
rec = self._data[dag_hash]
@@ -1441,8 +1387,7 @@ class Database:
else:
return default
- # check if hash is a prefix of some installed (or previously
- # installed) spec.
+ # check if hash is a prefix of some installed (or previously installed) spec.
matches = [
record.spec
for h, record in self._data.items()
@@ -1454,52 +1399,43 @@ class Database:
# nothing found
return default
- def get_by_hash_local(self, dag_hash, default=None, installed=any):
+ def get_by_hash_local(
+ self,
+ dag_hash: str,
+ default: Optional[List["spack.spec.Spec"]] = None,
+ installed: Union[bool, InstallRecordStatus] = InstallRecordStatus.ANY,
+ ) -> Optional[List["spack.spec.Spec"]]:
"""Look up a spec in *this DB* by DAG hash, or by a DAG hash prefix.
- Arguments:
- dag_hash (str): hash (or hash prefix) to look up
- default (object or None): default value to return if dag_hash is
- not in the DB (default: None)
- 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
- known hash. Note that ``query()`` and ``query_one()`` differ in
- that they only return installed specs by default.
-
- Returns:
- (list): a list of specs matching the hash or hash prefix
+ Args:
+ dag_hash: hash (or hash prefix) to look up
+ default: default value to return if dag_hash is not in the DB
+ installed: if ``True``, includes only installed specs in the search; if ``False``
+ only missing specs. Otherwise, a InstallRecordStatus flag.
+
+ ``installed`` defaults to ``InstallRecordStatus.ANY`` so we can refer to any known hash.
+ ``query()`` and ``query_one()`` differ in that they only return installed specs by default.
"""
with self.read_transaction():
return self._get_by_hash_local(dag_hash, default=default, installed=installed)
- def get_by_hash(self, dag_hash, default=None, installed=any):
+ def get_by_hash(
+ self,
+ dag_hash: str,
+ default: Optional[List["spack.spec.Spec"]] = None,
+ installed: Union[bool, InstallRecordStatus] = InstallRecordStatus.ANY,
+ ) -> Optional[List["spack.spec.Spec"]]:
"""Look up a spec by DAG hash, or by a DAG hash prefix.
- Arguments:
- dag_hash (str): hash (or hash prefix) to look up
- default (object or None): default value to return if dag_hash is
- not in the DB (default: None)
- 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
- known hash. Note that ``query()`` and ``query_one()`` differ in
- that they only return installed specs by default.
-
- Returns:
- (list): a list of specs matching the hash or hash prefix
+ Args:
+ dag_hash: hash (or hash prefix) to look up
+ default: default value to return if dag_hash is not in the DB
+ installed: if ``True``, includes only installed specs in the search; if ``False``
+ only missing specs. Otherwise, a InstallRecordStatus flag.
+
+ ``installed`` defaults to ``InstallRecordStatus.ANY`` so we can refer to any known hash.
+ ``query()`` and ``query_one()`` differ in that they only return installed specs by default.
"""
@@ -1516,62 +1452,52 @@ class Database:
def _query(
self,
- query_spec=any,
- known=any,
- installed=True,
- explicit=any,
- start_date=None,
- end_date=None,
- hashes=None,
- in_buildcache=any,
- origin=None,
- ):
- """Run a query on the database."""
-
- # TODO: Specs are a lot like queries. Should there be a
- # TODO: wildcard spec object, and should specs have attributes
- # TODO: like installed and known that can be queried? Or are
- # TODO: these really special cases that only belong here?
-
- if query_spec is not any:
- if not isinstance(query_spec, spack.spec.Spec):
- query_spec = spack.spec.Spec(query_spec)
-
- # Just look up concrete specs with hashes; no fancy search.
- if query_spec.concrete:
- # TODO: handling of hashes restriction is not particularly elegant.
- hash_key = query_spec.dag_hash()
- if hash_key in self._data and (not hashes or hash_key in hashes):
- return [self._data[hash_key].spec]
- else:
- return []
-
- # Abstract specs require more work -- currently we test
- # against everything.
+ query_spec: Optional[Union[str, "spack.spec.Spec"]] = None,
+ *,
+ predicate_fn: Optional[SelectType] = None,
+ installed: Union[bool, InstallRecordStatus] = True,
+ explicit: Optional[bool] = None,
+ start_date: Optional[datetime.datetime] = None,
+ end_date: Optional[datetime.datetime] = None,
+ hashes: Optional[Iterable[str]] = None,
+ in_buildcache: Optional[bool] = None,
+ origin: Optional[str] = None,
+ ) -> List["spack.spec.Spec"]:
+ installed = normalize_query(installed)
+
+ # Restrict the set of records over which we iterate first
+ matching_hashes = self._data
+ if hashes is not None:
+ matching_hashes = {h: self._data[h] for h in hashes if h in self._data}
+
+ if isinstance(query_spec, str):
+ query_spec = spack.spec.Spec(query_spec)
+
+ if query_spec is not None and query_spec.concrete:
+ hash_key = query_spec.dag_hash()
+ if hash_key not in matching_hashes:
+ return []
+ matching_hashes = {hash_key: matching_hashes[hash_key]}
+
results = []
start_date = start_date or datetime.datetime.min
end_date = end_date or datetime.datetime.max
- # save specs whose name doesn't match for last, to avoid a virtual check
deferred = []
-
- for key, rec in self._data.items():
- if hashes is not None and rec.spec.dag_hash() not in hashes:
- continue
-
+ for rec in matching_hashes.values():
if origin and not (origin == rec.origin):
continue
if not rec.install_type_matches(installed):
continue
- if in_buildcache is not any and rec.in_buildcache != in_buildcache:
+ if in_buildcache is not None and rec.in_buildcache != in_buildcache:
continue
- if explicit is not any and rec.explicit != explicit:
+ if explicit is not None and rec.explicit != explicit:
continue
- if known is not any and known(rec.spec.name):
+ if predicate_fn is not None and not predicate_fn(rec):
continue
if start_date or end_date:
@@ -1579,7 +1505,7 @@ class Database:
if not (start_date < inst_date < end_date):
continue
- if query_spec is any:
+ if query_spec is None or query_spec.concrete:
results.append(rec.spec)
continue
@@ -1597,56 +1523,182 @@ class Database:
# If we did fine something, the query spec can't be virtual b/c we matched an actual
# package installation, so skip the virtual check entirely. If we *didn't* find anything,
# check all the deferred specs *if* the query is virtual.
- if not results and query_spec is not any and deferred and query_spec.virtual:
+ if not results and query_spec is not None and deferred and query_spec.virtual:
results = [spec for spec in deferred if spec.satisfies(query_spec)]
return results
- if _query.__doc__ is None:
- _query.__doc__ = ""
- _query.__doc__ += _QUERY_DOCSTRING
+ def query_local(
+ self,
+ query_spec: Optional[Union[str, "spack.spec.Spec"]] = None,
+ *,
+ predicate_fn: Optional[SelectType] = None,
+ installed: Union[bool, InstallRecordStatus] = True,
+ explicit: Optional[bool] = None,
+ start_date: Optional[datetime.datetime] = None,
+ end_date: Optional[datetime.datetime] = None,
+ hashes: Optional[List[str]] = None,
+ in_buildcache: Optional[bool] = None,
+ origin: Optional[str] = None,
+ ) -> List["spack.spec.Spec"]:
+ """Queries the local Spack database.
+
+ This function doesn't guarantee any sorting of the returned data for performance reason,
+ since comparing specs for __lt__ may be an expensive operation.
+
+ Args:
+ query_spec: if query_spec is ``None``, match all specs in the database.
+ If it is a spec, return all specs matching ``spec.satisfies(query_spec)``.
+
+ predicate_fn: optional predicate taking an InstallRecord as argument, and returning
+ whether that record is selected for the query. It can be used to craft criteria
+ that need some data for selection not provided by the Database itself.
- def query_local(self, *args, **kwargs):
- """Query only the local Spack database.
+ installed: 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 matches at least
+ one of the InstallStatus.
- This function doesn't guarantee any sorting of the returned
- data for performance reason, since comparing specs for __lt__
- may be an expensive operation.
+ explicit: 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: if set considers only specs installed from the starting date.
+
+ end_date: if set considers only specs installed until the ending date.
+
+ in_buildcache: 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. By default, it does not check this status.
+
+ hashes: list of hashes used to restrict the search
+
+ origin: origin of the spec
"""
with self.read_transaction():
- return self._query(*args, **kwargs)
+ return self._query(
+ query_spec,
+ predicate_fn=predicate_fn,
+ installed=installed,
+ explicit=explicit,
+ start_date=start_date,
+ end_date=end_date,
+ hashes=hashes,
+ in_buildcache=in_buildcache,
+ origin=origin,
+ )
- if query_local.__doc__ is None:
- query_local.__doc__ = ""
- query_local.__doc__ += _QUERY_DOCSTRING
+ def query(
+ self,
+ query_spec: Optional[Union[str, "spack.spec.Spec"]] = None,
+ *,
+ predicate_fn: Optional[SelectType] = None,
+ installed: Union[bool, InstallRecordStatus] = True,
+ explicit: Optional[bool] = None,
+ start_date: Optional[datetime.datetime] = None,
+ end_date: Optional[datetime.datetime] = None,
+ in_buildcache: Optional[bool] = None,
+ hashes: Optional[List[str]] = None,
+ origin: Optional[str] = None,
+ install_tree: str = "all",
+ ) -> List["spack.spec.Spec"]:
+ """Queries the Spack database including all upstream databases.
+
+ Args:
+ query_spec: if query_spec is ``None``, match all specs in the database.
+ If it is a spec, return all specs matching ``spec.satisfies(query_spec)``.
+
+ predicate_fn: optional predicate taking an InstallRecord as argument, and returning
+ whether that record is selected for the query. It can be used to craft criteria
+ that need some data for selection not provided by the Database itself.
+
+ installed: 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 matches at least
+ one of the InstallStatus.
+
+ explicit: 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: if set considers only specs installed from the starting date.
+
+ end_date: if set considers only specs installed until the ending date.
+
+ in_buildcache: 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. By default, it does not check this status.
+
+ hashes: list of hashes used to restrict the search
+
+ install_tree: query 'all' (default), 'local', 'upstream', or upstream path
+
+ origin: origin of the spec
+ """
+ valid_trees = ["all", "upstream", "local", self.root] + [u.root for u in self.upstream_dbs]
+ if install_tree not in valid_trees:
+ msg = "Invalid install_tree argument to Database.query()\n"
+ msg += f"Try one of {', '.join(valid_trees)}"
+ tty.error(msg)
+ return []
- def query(self, *args, **kwargs):
- """Query the Spack database including all upstream databases."""
upstream_results = []
- for upstream_db in self.upstream_dbs:
+ upstreams = self.upstream_dbs
+ if install_tree not in ("all", "upstream"):
+ upstreams = [u for u in self.upstream_dbs if u.root == install_tree]
+ for upstream_db in upstreams:
# queries for upstream DBs need to *not* lock - we may not
# have permissions to do this and the upstream DBs won't know about
# us anyway (so e.g. they should never uninstall specs)
- upstream_results.extend(upstream_db._query(*args, **kwargs) or [])
+ upstream_results.extend(
+ upstream_db._query(
+ query_spec,
+ predicate_fn=predicate_fn,
+ installed=installed,
+ explicit=explicit,
+ start_date=start_date,
+ end_date=end_date,
+ hashes=hashes,
+ in_buildcache=in_buildcache,
+ origin=origin,
+ )
+ or []
+ )
- local_results = set(self.query_local(*args, **kwargs))
+ local_results: Set["spack.spec.Spec"] = set()
+ if install_tree in ("all", "local") or self.root == install_tree:
+ local_results = set(
+ self.query_local(
+ query_spec,
+ predicate_fn=predicate_fn,
+ installed=installed,
+ explicit=explicit,
+ start_date=start_date,
+ end_date=end_date,
+ hashes=hashes,
+ in_buildcache=in_buildcache,
+ origin=origin,
+ )
+ )
results = list(local_results) + list(x for x in upstream_results if x not in local_results)
+ results.sort()
+ return results
- return sorted(results)
-
- if query.__doc__ is None:
- query.__doc__ = ""
- query.__doc__ += _QUERY_DOCSTRING
-
- def query_one(self, query_spec, known=any, installed=True):
+ def query_one(
+ self,
+ query_spec: Optional[Union[str, "spack.spec.Spec"]],
+ predicate_fn: Optional[SelectType] = None,
+ installed: Union[bool, InstallRecordStatus] = True,
+ ) -> Optional["spack.spec.Spec"]:
"""Query for exactly one spec that matches the query spec.
- Raises an assertion error if more than one spec matches the
- query. Returns None if no installed package matches.
+ Returns None if no installed package matches.
+ Raises:
+ AssertionError: if more than one spec matches the query.
"""
- concrete_specs = self.query(query_spec, known=known, installed=installed)
+ concrete_specs = self.query(query_spec, predicate_fn=predicate_fn, installed=installed)
assert len(concrete_specs) <= 1
return concrete_specs[0] if concrete_specs else None
@@ -1668,7 +1720,7 @@ class Database:
self,
root_hashes: Optional[Container[str]] = None,
deptype: Union[dt.DepFlag, dt.DepTypes] = dt.LINK | dt.RUN,
- ) -> "List[spack.spec.Spec]":
+ ) -> List["spack.spec.Spec"]:
"""Return all specs that are currently installed but not needed by root specs.
By default, roots are all explicit specs in the database. If a set of root
@@ -1687,25 +1739,38 @@ class Database:
with self.read_transaction():
roots = [rec.spec for key, rec in self._data.items() if root(key, rec)]
needed = set(id(spec) for spec in tr.traverse_nodes(roots, deptype=deptype))
- return [rec.spec for rec in self._data.values() if id(rec.spec) not in needed]
+ return [
+ rec.spec
+ for rec in self._data.values()
+ if id(rec.spec) not in needed and rec.installed
+ ]
- def update_explicit(self, spec, explicit):
- """
- Update the spec's explicit state in the database.
- Args:
- 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.
- """
- rec = self.get_record(spec)
- if explicit != rec.explicit:
- with self.write_transaction():
- message = "{s.name}@{s.version} : marking the package {0}"
- status = "explicit" if explicit else "implicit"
- tty.debug(message.format(status, s=spec))
- rec.explicit = explicit
+class NoUpstreamVisitor:
+ """Gives edges to upstream specs, but does follow edges from upstream specs."""
+
+ def __init__(
+ self,
+ upstream_hashes: Set[str],
+ on_visit: Callable[["spack.spec.DependencySpec", bool], None],
+ ):
+ self.upstream_hashes = upstream_hashes
+ self.on_visit = on_visit
+
+ def accept(self, item: tr.EdgeAndDepth) -> bool:
+ self.on_visit(item.edge, self.is_upstream(item))
+ return True
+
+ def is_upstream(self, item: tr.EdgeAndDepth) -> bool:
+ return item.edge.spec.dag_hash() in self.upstream_hashes
+
+ def neighbors(self, item: tr.EdgeAndDepth):
+ # Prune edges from upstream nodes, only follow database tracked dependencies
+ return (
+ []
+ if self.is_upstream(item)
+ else item.edge.spec.edges_to_dependencies(depflag=_TRACKED_DEPENDENCIES)
+ )
class UpstreamDatabaseLockingError(SpackError):
diff --git a/lib/spack/spack/dependency.py b/lib/spack/spack/dependency.py
index f863c5329d..a680af0836 100644
--- a/lib/spack/spack/dependency.py
+++ b/lib/spack/spack/dependency.py
@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Data structures that represent Spack's dependency relationships."""
-from typing import Dict, List
+from typing import Dict, List, Type
import spack.deptypes as dt
import spack.spec
@@ -38,7 +38,7 @@ class Dependency:
def __init__(
self,
- pkg: "spack.package_base.PackageBase",
+ pkg: Type["spack.package_base.PackageBase"],
spec: "spack.spec.Spec",
depflag: dt.DepFlag = dt.DEFAULT,
):
@@ -79,4 +79,7 @@ class Dependency:
def __repr__(self) -> str:
types = dt.flag_to_chars(self.depflag)
- return f"<Dependency: {self.pkg.name} -> {self.spec} [{types}]>"
+ if self.patches:
+ return f"<Dependency: {self.pkg.name} -> {self.spec} [{types}, {self.patches}]>"
+ else:
+ return f"<Dependency: {self.pkg.name} -> {self.spec} [{types}]>"
diff --git a/lib/spack/spack/deptypes.py b/lib/spack/spack/deptypes.py
index af196bd4ad..53e138e1c2 100644
--- a/lib/spack/spack/deptypes.py
+++ b/lib/spack/spack/deptypes.py
@@ -36,10 +36,38 @@ ALL: DepFlag = BUILD | LINK | RUN | TEST
#: Default dependency type if none is specified
DEFAULT: DepFlag = BUILD | LINK
+#: A flag with no dependency types set
+NONE: DepFlag = 0
+
#: An iterator of all flag components
ALL_FLAGS: Tuple[DepFlag, DepFlag, DepFlag, DepFlag] = (BUILD, LINK, RUN, TEST)
+def compatible(flag1: DepFlag, flag2: DepFlag) -> bool:
+ """Returns True if two depflags can be dependencies from a Spec to deps of the same name.
+
+ The only allowable separated dependencies are a build-only dependency, combined with a
+ non-build dependency. This separates our two process spaces, build time and run time.
+
+ These dependency combinations are allowed:
+ single dep on name: [b], [l], [r], [bl], [br], [blr]
+ two deps on name: [b, l], [b, r], [b, lr]
+
+ but none of these make any sense:
+ two build deps: [b, b], [b, br], [b, bl], [b, blr]
+ any two deps that both have an l or an r, i.e. [l, l], [r, r], [l, r], [bl, l], [bl, r]"""
+ # Cannot have overlapping build types to two different dependencies
+ if flag1 & flag2:
+ return False
+
+ # Cannot have two different link/run dependencies for the same name
+ link_run = LINK | RUN
+ if flag1 & link_run and flag2 & link_run:
+ return False
+
+ return True
+
+
def flag_from_string(s: str) -> DepFlag:
if s == "build":
return BUILD
diff --git a/lib/spack/spack/detection/__init__.py b/lib/spack/spack/detection/__init__.py
index 44225ef062..e2909d5c14 100644
--- a/lib/spack/spack/detection/__init__.py
+++ b/lib/spack/spack/detection/__init__.py
@@ -2,15 +2,15 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from .common import DetectedPackage, executable_prefix, update_configuration
+from .common import executable_prefix, set_virtuals_nonbuildable, update_configuration
from .path import by_path, executables_in_path
from .test import detection_tests
__all__ = [
- "DetectedPackage",
"by_path",
"executables_in_path",
"executable_prefix",
"update_configuration",
+ "set_virtuals_nonbuildable",
"detection_tests",
]
diff --git a/lib/spack/spack/detection/common.py b/lib/spack/spack/detection/common.py
index 516bd11c8d..1b16aa6ccd 100644
--- a/lib/spack/spack/detection/common.py
+++ b/lib/spack/spack/detection/common.py
@@ -6,9 +6,9 @@
function to update packages.yaml given a list of detected packages.
Ideally, each detection method should be placed in a specific subpackage
-and implement at least a function that returns a list of DetectedPackage
-objects. The update in packages.yaml can then be done using the function
-provided here.
+and implement at least a function that returns a list of specs.
+
+The update in packages.yaml can then be done using the function provided here.
The module also contains other functions that might be useful across different
detection mechanisms.
@@ -17,38 +17,22 @@ import glob
import itertools
import os
import os.path
+import pathlib
import re
import sys
-from typing import Dict, List, NamedTuple, Optional, Set, Tuple, Union
+from typing import Dict, List, Optional, Set, Tuple, Union
import llnl.util.tty
import spack.config
+import spack.error
import spack.operating_systems.windows_os as winOs
import spack.spec
+import spack.util.environment
import spack.util.spack_yaml
import spack.util.windows_registry
-class DetectedPackage(NamedTuple):
- """Information on a package that has been detected."""
-
- #: Spec that was detected
- spec: spack.spec.Spec
- #: Prefix of the spec
- prefix: str
-
- def __reduce__(self):
- return DetectedPackage.restore, (str(self.spec), self.prefix, self.spec.extra_attributes)
-
- @staticmethod
- def restore(
- spec_str: str, prefix: str, extra_attributes: Optional[Dict[str, str]]
- ) -> "DetectedPackage":
- spec = spack.spec.Spec.from_detection(spec_str=spec_str, extra_attributes=extra_attributes)
- return DetectedPackage(spec=spec, prefix=prefix)
-
-
def _externals_in_packages_yaml() -> Set[spack.spec.Spec]:
"""Returns all the specs mentioned as externals in packages.yaml"""
packages_yaml = spack.config.get("packages")
@@ -63,7 +47,7 @@ ExternalEntryType = Union[str, Dict[str, str]]
def _pkg_config_dict(
- external_pkg_entries: List[DetectedPackage],
+ external_pkg_entries: List["spack.spec.Spec"],
) -> Dict[str, Union[bool, List[Dict[str, ExternalEntryType]]]]:
"""Generate a package specific config dict according to the packages.yaml schema.
@@ -83,22 +67,19 @@ def _pkg_config_dict(
pkg_dict = spack.util.spack_yaml.syaml_dict()
pkg_dict["externals"] = []
for e in external_pkg_entries:
- if not _spec_is_valid(e.spec):
+ if not _spec_is_valid(e):
continue
external_items: List[Tuple[str, ExternalEntryType]] = [
- ("spec", str(e.spec)),
- ("prefix", e.prefix),
+ ("spec", str(e)),
+ ("prefix", pathlib.Path(e.external_path).as_posix()),
]
- if e.spec.external_modules:
- external_items.append(("modules", e.spec.external_modules))
+ if e.external_modules:
+ external_items.append(("modules", e.external_modules))
- if e.spec.extra_attributes:
+ if e.extra_attributes:
external_items.append(
- (
- "extra_attributes",
- spack.util.spack_yaml.syaml_dict(e.spec.extra_attributes.items()),
- )
+ ("extra_attributes", spack.util.spack_yaml.syaml_dict(e.extra_attributes.items()))
)
# external_items.extend(e.spec.extra_attributes.items())
@@ -136,10 +117,10 @@ def path_to_dict(search_paths: List[str]):
# entry overrides later entries
for search_path in reversed(search_paths):
try:
- for lib in os.listdir(search_path):
- lib_path = os.path.join(search_path, lib)
- if llnl.util.filesystem.is_readable_file(lib_path):
- path_to_lib[lib_path] = lib
+ with os.scandir(search_path) as entries:
+ path_to_lib.update(
+ {entry.path: entry.name for entry in entries if entry.is_file()}
+ )
except OSError as e:
msg = f"cannot scan '{search_path}' for external software: {str(e)}"
llnl.util.tty.debug(msg)
@@ -219,39 +200,59 @@ def library_prefix(library_dir: str) -> str:
def update_configuration(
- detected_packages: Dict[str, List[DetectedPackage]],
+ detected_packages: Dict[str, List["spack.spec.Spec"]],
scope: Optional[str] = None,
buildable: bool = True,
) -> List[spack.spec.Spec]:
"""Add the packages passed as arguments to packages.yaml
Args:
- detected_packages: list of DetectedPackage objects to be added
+ detected_packages: list of specs to be added
scope: configuration scope where to add the detected packages
buildable: whether the detected packages are buildable or not
"""
predefined_external_specs = _externals_in_packages_yaml()
pkg_to_cfg, all_new_specs = {}, []
for package_name, entries in detected_packages.items():
- new_entries = [e for e in entries if (e.spec not in predefined_external_specs)]
+ new_entries = [s for s in entries if s not in predefined_external_specs]
pkg_config = _pkg_config_dict(new_entries)
external_entries = pkg_config.get("externals", [])
assert not isinstance(external_entries, bool), "unexpected value for external entry"
- all_new_specs.extend([spack.spec.Spec(x["spec"]) for x in external_entries])
+ all_new_specs.extend(new_entries)
if buildable is False:
pkg_config["buildable"] = False
pkg_to_cfg[package_name] = pkg_config
pkgs_cfg = spack.config.get("packages", scope=scope)
-
pkgs_cfg = spack.config.merge_yaml(pkgs_cfg, pkg_to_cfg)
spack.config.set("packages", pkgs_cfg, scope=scope)
return all_new_specs
+def set_virtuals_nonbuildable(virtuals: Set[str], scope: Optional[str] = None) -> List[str]:
+ """Update packages:virtual:buildable:False for the provided virtual packages, if the property
+ is not set by the user. Returns the list of virtual packages that have been updated."""
+ packages = spack.config.get("packages")
+ new_config = {}
+ for virtual in virtuals:
+ # If the user has set the buildable prop do not override it
+ if virtual in packages and "buildable" in packages[virtual]:
+ continue
+ new_config[virtual] = {"buildable": False}
+
+ # Update the provided scope
+ spack.config.set(
+ "packages",
+ spack.config.merge_yaml(spack.config.get("packages", scope=scope), new_config),
+ scope=scope,
+ )
+
+ return list(new_config.keys())
+
+
def _windows_drive() -> str:
"""Return Windows drive string extracted from the PROGRAMFILES environment variable,
which is guaranteed to be defined for all logins.
diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py
index 514d1c13e2..d529f94f29 100644
--- a/lib/spack/spack/detection/path.py
+++ b/lib/spack/spack/detection/path.py
@@ -11,20 +11,23 @@ import os
import os.path
import re
import sys
+import traceback
import warnings
-from typing import Dict, List, Optional, Set, Tuple
+from typing import Dict, Iterable, List, Optional, Set, Tuple, Type
import llnl.util.filesystem
import llnl.util.lang
import llnl.util.tty
+import spack.error
+import spack.spec
import spack.util.elf as elf_utils
import spack.util.environment
import spack.util.environment as environment
import spack.util.ld_so_conf
+import spack.util.parallel
from .common import (
- DetectedPackage,
WindowsCompilerExternalPaths,
WindowsKitExternalPaths,
_convert_to_iterable,
@@ -62,7 +65,22 @@ def common_windows_package_paths(pkg_cls=None) -> List[str]:
def file_identifier(path):
s = os.stat(path)
- return (s.st_dev, s.st_ino)
+ return s.st_dev, s.st_ino
+
+
+def dedupe_paths(paths: List[str]) -> List[str]:
+ """Deduplicate paths based on inode and device number. In case the list contains first a
+ symlink and then the directory it points to, the symlink is replaced with the directory path.
+ This ensures that we pick for example ``/usr/bin`` over ``/bin`` if the latter is a symlink to
+ the former`."""
+ seen: Dict[Tuple[int, int], str] = {}
+ for path in paths:
+ identifier = file_identifier(path)
+ if identifier not in seen:
+ seen[identifier] = path
+ elif not os.path.islink(path):
+ seen[identifier] = path
+ return list(seen.values())
def executables_in_path(path_hints: List[str]) -> Dict[str, str]:
@@ -80,29 +98,19 @@ def executables_in_path(path_hints: List[str]) -> Dict[str, str]:
constructed based on the PATH environment variable.
"""
search_paths = llnl.util.filesystem.search_paths_for_executables(*path_hints)
- return path_to_dict(search_paths)
-
-
-def get_elf_compat(path):
- """For ELF files, get a triplet (EI_CLASS, EI_DATA, e_machine) and see if
- it is host-compatible."""
- # On ELF platforms supporting, we try to be a bit smarter when it comes to shared
- # libraries, by dropping those that are not host compatible.
- with open(path, "rb") as f:
- elf = elf_utils.parse_elf(f, only_header=True)
- return (elf.is_64_bit, elf.is_little_endian, elf.elf_hdr.e_machine)
+ # Make use we don't doubly list /usr/lib and /lib etc
+ return path_to_dict(dedupe_paths(search_paths))
def accept_elf(path, host_compat):
- """Accept an ELF file if the header matches the given compat triplet,
- obtained with :py:func:`get_elf_compat`. In case it's not an ELF (e.g.
- static library, or some arbitrary file, fall back to is_readable_file)."""
+ """Accept an ELF file if the header matches the given compat triplet. In case it's not an ELF
+ (e.g. static library, or some arbitrary file, fall back to is_readable_file)."""
# Fast path: assume libraries at least have .so in their basename.
# Note: don't replace with splitext, because of libsmth.so.1.2.3 file names.
if ".so" not in os.path.basename(path):
return llnl.util.filesystem.is_readable_file(path)
try:
- return host_compat == get_elf_compat(path)
+ return host_compat == elf_utils.get_elf_compat(path)
except (OSError, elf_utils.ElfParsingError):
return llnl.util.filesystem.is_readable_file(path)
@@ -152,10 +160,10 @@ def libraries_in_ld_and_system_library_path(
search_paths = list(filter(os.path.isdir, search_paths))
# Make use we don't doubly list /usr/lib and /lib etc
- search_paths = list(llnl.util.lang.dedupe(search_paths, key=file_identifier))
+ search_paths = dedupe_paths(search_paths)
try:
- host_compat = get_elf_compat(sys.executable)
+ host_compat = elf_utils.get_elf_compat(sys.executable)
accept = lambda path: accept_elf(path, host_compat)
except (OSError, elf_utils.ElfParsingError):
accept = llnl.util.filesystem.is_readable_file
@@ -198,7 +206,7 @@ def libraries_in_windows_paths(path_hints: Optional[List[str]] = None) -> Dict[s
return path_to_dict(search_paths)
-def _group_by_prefix(paths: Set[str]) -> Dict[str, Set[str]]:
+def _group_by_prefix(paths: List[str]) -> Dict[str, Set[str]]:
groups = collections.defaultdict(set)
for p in paths:
groups[os.path.dirname(p)].add(p)
@@ -211,7 +219,7 @@ class Finder:
def default_path_hints(self) -> List[str]:
return []
- def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
+ def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
"""Returns the list of patterns used to match candidate files.
Args:
@@ -237,8 +245,8 @@ class Finder:
raise NotImplementedError("must be implemented by derived classes")
def detect_specs(
- self, *, pkg: "spack.package_base.PackageBase", paths: List[str]
- ) -> List[DetectedPackage]:
+ self, *, pkg: Type["spack.package_base.PackageBase"], paths: List[str]
+ ) -> List["spack.spec.Spec"]:
"""Given a list of files matching the search patterns, returns a list of detected specs.
Args:
@@ -254,7 +262,9 @@ class Finder:
return []
result = []
- for candidate_path, items_in_prefix in sorted(_group_by_prefix(set(paths)).items()):
+ for candidate_path, items_in_prefix in _group_by_prefix(
+ llnl.util.lang.dedupe(paths)
+ ).items():
# TODO: multiple instances of a package can live in the same
# prefix, and a package implementation can return multiple specs
# for one prefix, but without additional details (e.g. about the
@@ -266,8 +276,12 @@ class Finder:
)
except Exception as e:
specs = []
+ if spack.error.SHOW_BACKTRACE:
+ details = traceback.format_exc()
+ else:
+ details = f"[{e.__class__.__name__}: {e}]"
warnings.warn(
- f'error detecting "{pkg.name}" from prefix {candidate_path} [{str(e)}]'
+ f'error detecting "{pkg.name}" from prefix {candidate_path}: {details}'
)
if not specs:
@@ -302,27 +316,25 @@ class Finder:
warnings.warn(msg)
continue
- if spec.external_path:
- prefix = spec.external_path
+ if not spec.external_path:
+ spec.external_path = prefix
- result.append(DetectedPackage(spec=spec, prefix=prefix))
+ result.append(spec)
return result
def find(
- self, *, pkg_name: str, initial_guess: Optional[List[str]] = None
- ) -> List[DetectedPackage]:
+ self, *, pkg_name: str, repository, initial_guess: Optional[List[str]] = None
+ ) -> List["spack.spec.Spec"]:
"""For a given package, returns a list of detected specs.
Args:
pkg_name: package being detected
- initial_guess: initial list of paths to search from the caller
- if None, default paths are searched. If this
- is an empty list, nothing will be searched.
+ repository: repository to retrieve the package
+ initial_guess: initial list of paths to search from the caller if None, default paths
+ are searched. If this is an empty list, nothing will be searched.
"""
- import spack.repo
-
- pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ pkg_cls = repository.get_pkg_class(pkg_name)
patterns = self.search_patterns(pkg=pkg_cls)
if not patterns:
return []
@@ -338,7 +350,7 @@ class ExecutablesFinder(Finder):
def default_path_hints(self) -> List[str]:
return spack.util.environment.get_path("PATH")
- def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
+ def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
result = []
if hasattr(pkg, "executables") and hasattr(pkg, "platform_executables"):
result = pkg.platform_executables()
@@ -346,13 +358,10 @@ class ExecutablesFinder(Finder):
def candidate_files(self, *, patterns: List[str], paths: List[str]) -> List[str]:
executables_by_path = executables_in_path(path_hints=paths)
- patterns = [re.compile(x) for x in patterns]
- result = []
- for compiled_re in patterns:
- for path, exe in executables_by_path.items():
- if compiled_re.search(exe):
- result.append(path)
- return list(sorted(set(result)))
+ joined_pattern = re.compile(r"|".join(patterns))
+ result = [path for path, exe in executables_by_path.items() if joined_pattern.search(exe)]
+ result.sort()
+ return result
def prefix_from_path(self, *, path: str) -> str:
result = executable_prefix(path)
@@ -367,7 +376,7 @@ class LibrariesFinder(Finder):
DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH, and standard system library paths
"""
- def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]:
+ def search_patterns(self, *, pkg: Type["spack.package_base.PackageBase"]) -> List[str]:
result = []
if hasattr(pkg, "libraries"):
result = pkg.libraries
@@ -396,11 +405,11 @@ class LibrariesFinder(Finder):
def by_path(
- packages_to_search: List[str],
+ packages_to_search: Iterable[str],
*,
path_hints: Optional[List[str]] = None,
max_workers: Optional[int] = None,
-) -> Dict[str, List[DetectedPackage]]:
+) -> Dict[str, List["spack.spec.Spec"]]:
"""Return the list of packages that have been detected on the system, keyed by
unqualified package name.
@@ -410,19 +419,28 @@ def by_path(
path_hints: initial list of paths to be searched
max_workers: maximum number of workers to search for packages in parallel
"""
+ import spack.repo
+
# TODO: Packages should be able to define both .libraries and .executables in the future
# TODO: determine_spec_details should get all relevant libraries and executables in one call
executables_finder, libraries_finder = ExecutablesFinder(), LibrariesFinder()
detected_specs_by_package: Dict[str, Tuple[concurrent.futures.Future, ...]] = {}
result = collections.defaultdict(list)
- with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor:
+ repository = spack.repo.PATH.ensure_unwrapped()
+ with spack.util.parallel.make_concurrent_executor(max_workers, require_fork=False) as executor:
for pkg in packages_to_search:
executable_future = executor.submit(
- executables_finder.find, pkg_name=pkg, initial_guess=path_hints
+ executables_finder.find,
+ pkg_name=pkg,
+ initial_guess=path_hints,
+ repository=repository,
)
library_future = executor.submit(
- libraries_finder.find, pkg_name=pkg, initial_guess=path_hints
+ libraries_finder.find,
+ pkg_name=pkg,
+ initial_guess=path_hints,
+ repository=repository,
)
detected_specs_by_package[pkg] = executable_future, library_future
@@ -437,9 +455,9 @@ def by_path(
llnl.util.tty.debug(
f"[EXTERNAL DETECTION] Skipping {pkg_name}: timeout reached"
)
- except Exception as e:
+ except Exception:
llnl.util.tty.debug(
- f"[EXTERNAL DETECTION] Skipping {pkg_name}: exception occured {e}"
+ f"[EXTERNAL DETECTION] Skipping {pkg_name}: {traceback.format_exc()}"
)
return result
diff --git a/lib/spack/spack/detection/test.py b/lib/spack/spack/detection/test.py
index a9a0311520..1d56e8522c 100644
--- a/lib/spack/spack/detection/test.py
+++ b/lib/spack/spack/detection/test.py
@@ -9,10 +9,9 @@ import pathlib
import tempfile
from typing import Any, Deque, Dict, Generator, List, NamedTuple, Tuple
-import jinja2
-
from llnl.util import filesystem
+import spack.platforms
import spack.repo
import spack.spec
from spack.util import spack_yaml
@@ -34,6 +33,8 @@ class ExpectedTestResult(NamedTuple):
#: Spec to be detected
spec: str
+ #: Attributes expected in the external spec
+ extra_attributes: Dict[str, str]
class DetectionTest(NamedTuple):
@@ -67,7 +68,7 @@ class Runner:
with self._mock_layout() as path_hints:
entries = by_path([self.test.pkg_name], path_hints=path_hints)
_, unqualified_name = spack.repo.partition_package_name(self.test.pkg_name)
- specs = set(x.spec for x in entries[unqualified_name])
+ specs = set(entries[unqualified_name])
return list(specs)
@contextlib.contextmanager
@@ -85,6 +86,8 @@ class Runner:
self.tmpdir.cleanup()
def _create_executable_scripts(self, mock_executables: MockExecutables) -> List[pathlib.Path]:
+ import jinja2
+
relative_paths = mock_executables.executables
script = mock_executables.script
script_template = jinja2.Template("#!/bin/bash\n{{ script }}\n")
@@ -100,7 +103,12 @@ class Runner:
@property
def expected_specs(self) -> List[spack.spec.Spec]:
- return [spack.spec.Spec(r.spec) for r in self.test.results]
+ return [
+ spack.spec.Spec.from_detection(
+ item.spec, external_path=self.tmpdir.name, extra_attributes=item.extra_attributes
+ )
+ for item in self.test.results
+ ]
def detection_tests(pkg_name: str, repository: spack.repo.RepoPath) -> List[Runner]:
@@ -117,9 +125,13 @@ def detection_tests(pkg_name: str, repository: spack.repo.RepoPath) -> List[Runn
"""
result = []
detection_tests_content = read_detection_tests(pkg_name, repository)
+ current_platform = str(spack.platforms.host())
tests_by_path = detection_tests_content.get("paths", [])
for single_test_data in tests_by_path:
+ if current_platform not in single_test_data.get("platforms", [current_platform]):
+ continue
+
mock_executables = []
for layout in single_test_data["layout"]:
mock_executables.append(
@@ -127,7 +139,11 @@ def detection_tests(pkg_name: str, repository: spack.repo.RepoPath) -> List[Runn
)
expected_results = []
for assertion in single_test_data["results"]:
- expected_results.append(ExpectedTestResult(spec=assertion["spec"]))
+ expected_results.append(
+ ExpectedTestResult(
+ spec=assertion["spec"], extra_attributes=assertion.get("extra_attributes", {})
+ )
+ )
current_test = DetectionTest(
pkg_name=pkg_name, layout=mock_executables, results=expected_results
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index a3ccee1816..08f6ec9ba9 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -21,32 +21,33 @@ The available directives are:
* ``conflicts``
* ``depends_on``
* ``extends``
+ * ``license``
* ``patch``
* ``provides``
* ``resource``
* ``variant``
* ``version``
* ``requires``
+ * ``redistribute``
"""
+import collections
import collections.abc
-import functools
import os.path
import re
-from typing import Any, Callable, List, Optional, Set, Tuple, Union
+from typing import Any, Callable, List, Optional, Tuple, Type, Union
-import llnl.util.lang
import llnl.util.tty.color
import spack.deptypes as dt
-import spack.error
+import spack.fetch_strategy
+import spack.package_base
import spack.patch
import spack.spec
-import spack.url
import spack.util.crypto
import spack.variant
from spack.dependency import Dependency
-from spack.fetch_strategy import from_kwargs
+from spack.directives_meta import DirectiveError, DirectiveMeta
from spack.resource import Resource
from spack.version import (
GitVersion,
@@ -58,8 +59,8 @@ from spack.version import (
__all__ = [
"DirectiveError",
- "DirectiveMeta",
"version",
+ "conditional",
"conflicts",
"depends_on",
"extends",
@@ -71,19 +72,24 @@ __all__ = [
"resource",
"build_system",
"requires",
+ "redistribute",
+ "can_splice",
]
-#: These are variant names used by Spack internally; packages can't use them
-reserved_names = ["patches", "dev_path"]
+_patch_order_index = 0
-#: Names of possible directives. This list is mostly populated using the @directive decorator.
-#: Some directives leverage others and in that case are not automatically added.
-directive_names = ["build_system"]
-_patch_order_index = 0
+SpecType = str
+DepType = Union[Tuple[str, ...], str]
+WhenType = Optional[Union[spack.spec.Spec, str, bool]]
+Patcher = Callable[[Union[Type[spack.package_base.PackageBase], Dependency]], None]
+PatchesType = Union[Patcher, str, List[Union[Patcher, str]]]
+
+SUPPORTED_LANGUAGES = ("fortran", "cxx", "c")
-def make_when_spec(value):
+
+def _make_when_spec(value: WhenType) -> Optional[spack.spec.Spec]:
"""Create a ``Spec`` that indicates when a directive should be applied.
Directives with ``when`` specs, e.g.:
@@ -106,7 +112,7 @@ def make_when_spec(value):
as part of concretization.
Arguments:
- value (spack.spec.Spec or bool): a conditional Spec or a constant ``bool``
+ value: a conditional Spec, constant ``bool``, or None if not supplied
value indicating when a directive should be applied.
"""
@@ -116,7 +122,7 @@ def make_when_spec(value):
# Unsatisfiable conditions are discarded by the caller, and never
# added to the package class
if value is False:
- return False
+ return None
# If there is no constraint, the directive should always apply;
# represent this by returning the unconstrained `Spec()`, which is
@@ -128,219 +134,7 @@ def make_when_spec(value):
return spack.spec.Spec(value)
-class DirectiveMeta(type):
- """Flushes the directives that were temporarily stored in the staging
- area into the package.
- """
-
- # Set of all known directives
- _directive_dict_names: Set[str] = set()
- _directives_to_be_executed: List[str] = []
- _when_constraints_from_context: List[str] = []
- _default_args: List[dict] = []
-
- def __new__(cls, name, bases, attr_dict):
- # Initialize the attribute containing the list of directives
- # to be executed. Here we go reversed because we want to execute
- # commands:
- # 1. in the order they were defined
- # 2. following the MRO
- attr_dict["_directives_to_be_executed"] = []
- for base in reversed(bases):
- try:
- directive_from_base = base._directives_to_be_executed
- attr_dict["_directives_to_be_executed"].extend(directive_from_base)
- except AttributeError:
- # The base class didn't have the required attribute.
- # Continue searching
- pass
-
- # De-duplicates directives from base classes
- attr_dict["_directives_to_be_executed"] = [
- x for x in llnl.util.lang.dedupe(attr_dict["_directives_to_be_executed"])
- ]
-
- # Move things to be executed from module scope (where they
- # are collected first) to class scope
- if DirectiveMeta._directives_to_be_executed:
- attr_dict["_directives_to_be_executed"].extend(
- DirectiveMeta._directives_to_be_executed
- )
- DirectiveMeta._directives_to_be_executed = []
-
- return super(DirectiveMeta, cls).__new__(cls, name, bases, attr_dict)
-
- def __init__(cls, name, bases, attr_dict):
- # The instance is being initialized: if it is a package we must ensure
- # that the directives are called to set it up.
-
- if "spack.pkg" in cls.__module__:
- # Ensure the presence of the dictionaries associated
- # with the directives
- for d in DirectiveMeta._directive_dict_names:
- setattr(cls, d, {})
-
- # Lazily execute directives
- for directive in cls._directives_to_be_executed:
- directive(cls)
-
- # Ignore any directives executed *within* top-level
- # directives by clearing out the queue they're appended to
- DirectiveMeta._directives_to_be_executed = []
-
- super(DirectiveMeta, cls).__init__(name, bases, attr_dict)
-
- @staticmethod
- def push_to_context(when_spec):
- """Add a spec to the context constraints."""
- DirectiveMeta._when_constraints_from_context.append(when_spec)
-
- @staticmethod
- def pop_from_context():
- """Pop the last constraint from the context"""
- return DirectiveMeta._when_constraints_from_context.pop()
-
- @staticmethod
- def push_default_args(default_args):
- """Push default arguments"""
- DirectiveMeta._default_args.append(default_args)
-
- @staticmethod
- def pop_default_args():
- """Pop default arguments"""
- return DirectiveMeta._default_args.pop()
-
- @staticmethod
- def directive(dicts=None):
- """Decorator for Spack directives.
-
- Spack directives allow you to modify a package while it is being
- defined, e.g. to add version or dependency information. Directives
- are one of the key pieces of Spack's package "language", which is
- embedded in python.
-
- 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(...)
-
- The ``@directive`` decorator handles a couple things for you:
-
- 1. Adds the class scope (pkg) as an initial parameter when
- called, like a class method would. This allows you to modify
- a package from within a directive, while the package is still
- being defined.
-
- 2. It automatically adds a dictionary called "versions" to the
- package so that you can refer to pkg.versions.
-
- The ``(dicts='versions')`` part ensures that ALL packages in Spack
- will have a ``versions`` attribute after they're constructed, and
- that if no directive actually modified it, it will just be an
- empty dict.
-
- This is just a modular way to add storage attributes to the
- Package class, and it's how Spack gets information from the
- packages to the core.
- """
- global directive_names
-
- if isinstance(dicts, str):
- dicts = (dicts,)
-
- if not isinstance(dicts, collections.abc.Sequence):
- message = "dicts arg must be list, tuple, or string. Found {0}"
- raise TypeError(message.format(type(dicts)))
-
- # Add the dictionary names if not already there
- DirectiveMeta._directive_dict_names |= set(dicts)
-
- # This decorator just returns the directive functions
- def _decorator(decorated_function):
- directive_names.append(decorated_function.__name__)
-
- @functools.wraps(decorated_function)
- def _wrapper(*args, **_kwargs):
- # First merge default args with kwargs
- kwargs = dict()
- for default_args in DirectiveMeta._default_args:
- kwargs.update(default_args)
- kwargs.update(_kwargs)
-
- # Inject when arguments from the context
- if DirectiveMeta._when_constraints_from_context:
- # Check that directives not yet supporting the when= argument
- # are not used inside the context manager
- if decorated_function.__name__ == "version":
- msg = (
- 'directive "{0}" cannot be used within a "when"'
- ' context since it does not support a "when=" '
- "argument"
- )
- msg = msg.format(decorated_function.__name__)
- raise DirectiveError(msg)
-
- when_constraints = [
- spack.spec.Spec(x) for x in DirectiveMeta._when_constraints_from_context
- ]
- if kwargs.get("when"):
- when_constraints.append(spack.spec.Spec(kwargs["when"]))
- when_spec = spack.spec.merge_abstract_anonymous_specs(*when_constraints)
-
- kwargs["when"] = when_spec
-
- # If any of the arguments are executors returned by a
- # directive passed as an argument, don't execute them
- # lazily. Instead, let the called directive handle them.
- # This allows nested directive calls in packages. The
- # caller can return the directive if it should be queued.
- def remove_directives(arg):
- directives = DirectiveMeta._directives_to_be_executed
- if isinstance(arg, (list, tuple)):
- # Descend into args that are lists or tuples
- for a in arg:
- remove_directives(a)
- else:
- # Remove directives args from the exec queue
- remove = next((d for d in directives if d is arg), None)
- if remove is not None:
- directives.remove(remove)
-
- # Nasty, but it's the best way I can think of to avoid
- # side effects if directive results are passed as args
- remove_directives(args)
- remove_directives(list(kwargs.values()))
-
- # A directive returns either something that is callable on a
- # package or a sequence of them
- result = decorated_function(*args, **kwargs)
-
- # ...so if it is not a sequence make it so
- values = result
- if not isinstance(values, collections.abc.Sequence):
- values = (values,)
-
- DirectiveMeta._directives_to_be_executed.extend(values)
-
- # wrapped function returns same result as original so
- # that we can nest directives
- return result
-
- return _wrapper
-
- return _decorator
-
-
+SubmoduleCallback = Callable[[spack.package_base.PackageBase], Union[str, List[str], bool]]
directive = DirectiveMeta.directive
@@ -372,7 +166,7 @@ def version(
tag: Optional[str] = None,
branch: Optional[str] = None,
get_full_repo: Optional[bool] = None,
- submodules: Optional[bool] = None,
+ submodules: Union[SubmoduleCallback, Optional[bool]] = None,
submodules_delete: Optional[bool] = None,
# other version control
svn: Optional[str] = None,
@@ -425,7 +219,7 @@ def version(
return lambda pkg: _execute_version(pkg, ver, **kwargs)
-def _execute_version(pkg, ver, **kwargs):
+def _execute_version(pkg: Type[spack.package_base.PackageBase], ver: Union[str, int], **kwargs):
if (
(any(s in kwargs for s in spack.util.crypto.hashes) or "checksum" in kwargs)
and hasattr(pkg, "has_code")
@@ -455,19 +249,24 @@ def _execute_version(pkg, ver, **kwargs):
pkg.versions[version] = kwargs
-def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
- when_spec = make_when_spec(when)
+def _depends_on(
+ pkg: Type[spack.package_base.PackageBase],
+ spec: spack.spec.Spec,
+ *,
+ when: WhenType = None,
+ type: DepType = dt.DEFAULT_TYPES,
+ patches: Optional[PatchesType] = None,
+):
+ when_spec = _make_when_spec(when)
if not when_spec:
return
- dep_spec = spack.spec.Spec(spec)
- if not dep_spec.name:
- raise DependencyError("Invalid dependency specification in package '%s':" % pkg.name, spec)
- if pkg.name == dep_spec.name:
- raise CircularReferenceError("Package '%s' cannot depend on itself." % pkg.name)
+ if not spec.name:
+ raise DependencyError(f"Invalid dependency specification in package '{pkg.name}':", spec)
+ if pkg.name == spec.name:
+ raise CircularReferenceError(f"Package '{pkg.name}' cannot depend on itself.")
depflag = dt.canonicalize(type)
- conditions = pkg.dependencies.setdefault(dep_spec.name, {})
# call this patches here for clarity -- we want patch to be a list,
# but the caller doesn't have to make it one.
@@ -481,7 +280,7 @@ def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
# ensure `Spec.virtual` is a valid thing to call in a directive.
# For now, we comment out the following check to allow for virtual packages
# with package files.
- # if patches and dep_spec.virtual:
+ # if patches and spec.virtual:
# raise DependencyPatchError("Cannot patch a virtual dependency.")
# ensure patches is a list
@@ -495,12 +294,14 @@ def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
assert all(callable(p) for p in patches)
# this is where we actually add the dependency to this package
- if when_spec not in conditions:
- dependency = Dependency(pkg, dep_spec, depflag=depflag)
- conditions[when_spec] = dependency
+ deps_by_name = pkg.dependencies.setdefault(when_spec, {})
+ dependency = deps_by_name.get(spec.name)
+
+ if not dependency:
+ dependency = Dependency(pkg, spec, depflag=depflag)
+ deps_by_name[spec.name] = dependency
else:
- dependency = conditions[when_spec]
- dependency.spec.constrain(dep_spec, deps=False)
+ dependency.spec.constrain(spec, deps=False)
dependency.depflag |= depflag
# apply patches to the dependency
@@ -509,7 +310,7 @@ def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
@directive("conflicts")
-def conflicts(conflict_spec, when=None, msg=None):
+def conflicts(conflict_spec: SpecType, when: WhenType = None, msg: Optional[str] = None):
"""Allows a package to define a conflict.
Currently, a "conflict" is a concretized configuration that is known
@@ -529,30 +330,35 @@ def conflicts(conflict_spec, when=None, msg=None):
msg (str): optional user defined message
"""
- def _execute_conflicts(pkg):
+ def _execute_conflicts(pkg: Type[spack.package_base.PackageBase]):
# If when is not specified the conflict always holds
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
# Save in a list the conflicts and the associated custom messages
- when_spec_list = pkg.conflicts.setdefault(conflict_spec, [])
+ conflict_spec_list = pkg.conflicts.setdefault(when_spec, [])
msg_with_name = f"{pkg.name}: {msg}" if msg is not None else msg
- when_spec_list.append((when_spec, msg_with_name))
+ conflict_spec_list.append((spack.spec.Spec(conflict_spec), msg_with_name))
return _execute_conflicts
@directive(("dependencies"))
-def depends_on(spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
+def depends_on(
+ spec: SpecType,
+ when: WhenType = None,
+ type: DepType = dt.DEFAULT_TYPES,
+ patches: Optional[PatchesType] = None,
+):
"""Creates a dict of deps with specs defining when they apply.
Args:
- 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
+ spec: the package and constraints depended on
+ when: when the dependent satisfies this, it has
the dependency represented by ``spec``
- type (str or tuple): str or tuple of legal Spack deptypes
- patches (typing.Callable or list): single result of ``patch()`` directive, a
+ type: str or tuple of legal Spack deptypes
+ patches: 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
@@ -560,38 +366,104 @@ def depends_on(spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
@see The section "Dependency specs" in the Spack Packaging Guide.
"""
+ dep_spec = spack.spec.Spec(spec)
+ if dep_spec.name in SUPPORTED_LANGUAGES:
+ assert type == "build", "languages must be of 'build' type"
+ return _language(lang_spec_str=spec, when=when)
- def _execute_depends_on(pkg):
- _depends_on(pkg, spec, when=when, type=type, patches=patches)
+ def _execute_depends_on(pkg: Type[spack.package_base.PackageBase]):
+ _depends_on(pkg, dep_spec, when=when, type=type, patches=patches)
return _execute_depends_on
+@directive("disable_redistribute")
+def redistribute(
+ source: Optional[bool] = None, binary: Optional[bool] = None, when: WhenType = None
+):
+ """Can be used inside a Package definition to declare that
+ the package source and/or compiled binaries should not be
+ redistributed.
+
+ By default, Packages allow source/binary distribution (i.e. in
+ mirrors). Because of this, and because overlapping enable/
+ disable specs are not allowed, this directive only allows users
+ to explicitly disable redistribution for specs.
+ """
+
+ return lambda pkg: _execute_redistribute(pkg, source, binary, when)
+
+
+def _execute_redistribute(
+ pkg: Type[spack.package_base.PackageBase],
+ source: Optional[bool],
+ binary: Optional[bool],
+ when: WhenType,
+):
+ if source is None and binary is None:
+ return
+ elif (source is True) or (binary is True):
+ raise DirectiveError(
+ "Source/binary distribution are true by default, they can only "
+ "be explicitly disabled."
+ )
+
+ if source is None:
+ source = True
+ if binary is None:
+ binary = True
+
+ when_spec = _make_when_spec(when)
+ if not when_spec:
+ return
+ if source is False:
+ max_constraint = spack.spec.Spec(f"{pkg.name}@{when_spec.versions}")
+ if not max_constraint.satisfies(when_spec):
+ raise DirectiveError("Source distribution can only be disabled for versions")
+
+ if when_spec in pkg.disable_redistribute:
+ disable = pkg.disable_redistribute[when_spec]
+ if not source:
+ disable.source = True
+ if not binary:
+ disable.binary = True
+ else:
+ pkg.disable_redistribute[when_spec] = spack.package_base.DisableRedistribute(
+ source=not source, binary=not binary
+ )
+
+
@directive(("extendees", "dependencies"))
-def extends(spec, type=("build", "run"), **kwargs):
+def extends(spec, when=None, type=("build", "run"), patches=None):
"""Same as depends_on, but also adds this package to the extendee list.
+ In case of Python, also adds a dependency on python-venv.
keyword arguments can be passed to extends() so that extension
packages can pass parameters to the extendee's extension
- mechanism.
-
- """
+ mechanism."""
def _execute_extends(pkg):
- when = kwargs.get("when")
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
- _depends_on(pkg, spec, when=when, type=type)
- spec_obj = spack.spec.Spec(spec)
- pkg.extendees[spec_obj.name] = (spec_obj, kwargs)
+ dep_spec = spack.spec.Spec(spec)
+
+ _depends_on(pkg, dep_spec, when=when, type=type, patches=patches)
+
+ # When extending python, also add a dependency on python-venv. This is done so that
+ # Spack environment views are Python virtual environments.
+ if dep_spec.name == "python" and not pkg.name == "python-venv":
+ _depends_on(pkg, spack.spec.Spec("python-venv"), when=when, type=("build", "run"))
+
+ # TODO: the values of the extendees dictionary are not used. Remove in next refactor.
+ pkg.extendees[dep_spec.name] = (dep_spec, None)
return _execute_extends
@directive(dicts=("provided", "provided_together"))
-def provides(*specs, when: Optional[str] = None):
+def provides(*specs: SpecType, when: WhenType = None):
"""Allows packages to provide a virtual dependency.
If a package provides "mpi", other packages can declare that they depend on "mpi",
@@ -602,16 +474,15 @@ def provides(*specs, when: Optional[str] = None):
when: condition when this provides clause needs to be considered
"""
- def _execute_provides(pkg):
- import spack.parser # Avoid circular dependency
-
- when_spec = make_when_spec(when)
+ def _execute_provides(pkg: Type[spack.package_base.PackageBase]):
+ when_spec = _make_when_spec(when)
if not when_spec:
return
# ``when`` specs for ``provides()`` need a name, as they are used
# to build the ProviderIndex.
when_spec.name = pkg.name
+
spec_objs = [spack.spec.Spec(x) for x in specs]
spec_names = [x.name for x in spec_objs]
if len(spec_names) > 1:
@@ -621,46 +492,86 @@ def provides(*specs, when: Optional[str] = None):
if pkg.name == provided_spec.name:
raise CircularReferenceError("Package '%s' cannot provide itself." % pkg.name)
- if provided_spec not in pkg.provided:
- pkg.provided[provided_spec] = set()
- pkg.provided[provided_spec].add(when_spec)
+ provided_set = pkg.provided.setdefault(when_spec, set())
+ provided_set.add(provided_spec)
return _execute_provides
+@directive("splice_specs")
+def can_splice(
+ target: SpecType, *, when: SpecType, match_variants: Union[None, str, List[str]] = None
+):
+ """Packages can declare whether they are ABI-compatible with another package
+ and thus can be spliced into concrete versions of that package.
+
+ Args:
+ target: The spec that the current package is ABI-compatible with.
+
+ when: An anonymous spec constraining current package for when it is
+ ABI-compatible with target.
+
+ match_variants: A list of variants that must match
+ between target spec and current package, with special value '*'
+ which matches all variants. Example: a variant is defined on both
+ packages called json, and they are ABI-compatible whenever they agree on
+ the json variant (regardless of whether it is turned on or off). Note
+ that this cannot be applied to multi-valued variants and multi-valued
+ variants will be skipped by '*'.
+ """
+
+ def _execute_can_splice(pkg: Type[spack.package_base.PackageBase]):
+ when_spec = _make_when_spec(when)
+ if isinstance(match_variants, str) and match_variants != "*":
+ raise ValueError(
+ "* is the only valid string for match_variants "
+ "if looking to provide a single variant, use "
+ f"[{match_variants}] instead"
+ )
+ if when_spec is None:
+ return
+ pkg.splice_specs[when_spec] = (spack.spec.Spec(target), match_variants)
+
+ return _execute_can_splice
+
+
@directive("patches")
-def patch(url_or_filename, level=1, when=None, working_dir=".", **kwargs):
+def patch(
+ url_or_filename: str,
+ level: int = 1,
+ when: WhenType = None,
+ working_dir: str = ".",
+ reverse: bool = False,
+ sha256: Optional[str] = None,
+ archive_sha256: Optional[str] = None,
+) -> Patcher:
"""Packages can declare patches to apply to source. You can
optionally provide a when spec to indicate that a particular
patch should only be applied when the package's spec meets
certain conditions (e.g. a particular version).
Args:
- url_or_filename (str): url or relative filename of the patch
- level (int): patch level (as in the patch shell command)
- when (spack.spec.Spec): optional anonymous spec that specifies when to apply
- the patch
- working_dir (str): dir to change to before applying
-
- Keyword Args:
- sha256 (str): sha256 sum of the patch, used to verify the patch
- (only required for URL patches)
- archive_sha256 (str): sha256 sum of the *archive*, if the patch
- is compressed (only required for compressed URL patches)
-
+ url_or_filename: url or relative filename of the patch
+ level: patch level (as in the patch shell command)
+ when: optional anonymous spec that specifies when to apply the patch
+ working_dir: dir to change to before applying
+ reverse: reverse the patch
+ sha256: sha256 sum of the patch, used to verify the patch (only required for URL patches)
+ archive_sha256: sha256 sum of the *archive*, if the patch is compressed (only required for
+ compressed URL patches)
"""
- def _execute_patch(pkg_or_dep):
- pkg = pkg_or_dep
- if isinstance(pkg, Dependency):
- pkg = pkg.pkg
+ def _execute_patch(
+ pkg_or_dep: Union[Type[spack.package_base.PackageBase], Dependency]
+ ) -> None:
+ pkg = pkg_or_dep.pkg if isinstance(pkg_or_dep, Dependency) else pkg_or_dep
if hasattr(pkg, "has_code") and not pkg.has_code:
raise UnsupportedPackageDirective(
"Patches are not allowed in {0}: package has no code.".format(pkg.name)
)
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
@@ -672,13 +583,24 @@ def patch(url_or_filename, level=1, when=None, working_dir=".", **kwargs):
ordering_key = (pkg.name, _patch_order_index)
_patch_order_index += 1
+ patch: spack.patch.Patch
if "://" in url_or_filename:
+ if sha256 is None:
+ raise ValueError("patch() with a url requires a sha256")
+
patch = spack.patch.UrlPatch(
- pkg, url_or_filename, level, working_dir, ordering_key=ordering_key, **kwargs
+ pkg,
+ url_or_filename,
+ level,
+ working_dir=working_dir,
+ reverse=reverse,
+ ordering_key=ordering_key,
+ sha256=sha256,
+ archive_sha256=archive_sha256,
)
else:
patch = spack.patch.FilePatch(
- pkg, url_or_filename, level, working_dir, ordering_key=ordering_key
+ pkg, url_or_filename, level, working_dir, reverse, ordering_key=ordering_key
)
cur_patches.append(patch)
@@ -686,6 +608,15 @@ def patch(url_or_filename, level=1, when=None, working_dir=".", **kwargs):
return _execute_patch
+def conditional(*values: List[Any], when: Optional[WhenType] = None):
+ """Conditional values that can be used in variant declarations."""
+ # _make_when_spec returns None when the condition is statically false.
+ when = _make_when_spec(when)
+ return spack.variant.ConditionalVariantValues(
+ spack.variant.ConditionalValue(x, when=when) for x in values
+ )
+
+
@directive("variants")
def variant(
name: str,
@@ -723,7 +654,7 @@ def variant(
msg += " @*r{{[{0}, variant '{1}']}}"
return llnl.util.tty.color.colorize(msg.format(pkg.name, name))
- if name in reserved_names:
+ if name in spack.variant.reserved_names:
def _raise_reserved_name(pkg):
msg = "The name '%s' is reserved by Spack" % name
@@ -781,81 +712,81 @@ def variant(
description = str(description).strip()
def _execute_variant(pkg):
- when_spec = make_when_spec(when)
- when_specs = [when_spec]
+ when_spec = _make_when_spec(when)
if not re.match(spack.spec.IDENTIFIER_RE, name):
directive = "variant"
msg = "Invalid variant name in {0}: '{1}'"
raise DirectiveError(directive, msg.format(pkg.name, name))
- if name in pkg.variants:
- # We accumulate when specs, but replace the rest of the variant
- # with the newer values
- _, orig_when = pkg.variants[name]
- when_specs += orig_when
-
- pkg.variants[name] = (
- spack.variant.Variant(name, default, description, values, multi, validator, sticky),
- when_specs,
+ # variants are stored by condition then by name (so only the last variant of a
+ # given name takes precedence *per condition*).
+ # NOTE: variant defaults and values can conflict if when conditions overlap.
+ variants_by_name = pkg.variants.setdefault(when_spec, {})
+ variants_by_name[name] = spack.variant.Variant(
+ name=name,
+ default=default,
+ description=description,
+ values=values,
+ multi=multi,
+ validator=validator,
+ sticky=sticky,
+ precedence=pkg.num_variant_definitions(),
)
return _execute_variant
@directive("resources")
-def resource(**kwargs):
- """Define an external resource to be fetched and staged when building the
- package. Based on the keywords present in the dictionary the appropriate
- FetchStrategy will be used for the resource. Resources are fetched and
- staged in their own folder inside spack stage area, and then moved into
- the stage area of the package that needs them.
-
- List of recognized keywords:
-
- * 'when' : (optional) represents the condition upon which the resource is
- needed
- * 'destination' : (optional) path where to move the resource. This path
- must be relative to the main package stage area.
- * 'placement' : (optional) gives the possibility to fine tune how the
- resource is moved into the main package stage area.
+def resource(
+ *,
+ name: Optional[str] = None,
+ destination: str = "",
+ placement: Optional[str] = None,
+ when: WhenType = None,
+ # additional kwargs are as for `version()`
+ **kwargs,
+):
+ """Define an external resource to be fetched and staged when building the package.
+ Based on the keywords present in the dictionary the appropriate FetchStrategy will
+ be used for the resource. Resources are fetched and staged in their own folder
+ inside spack stage area, and then moved into the stage area of the package that
+ needs them.
+
+ Keyword Arguments:
+ name: name for the resource
+ when: condition defining when the resource is needed
+ destination: path, relative to the package stage area, to which resource should be moved
+ placement: optionally rename the expanded resource inside the destination directory
+
"""
def _execute_resource(pkg):
- when = kwargs.get("when")
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
- destination = kwargs.get("destination", "")
- placement = kwargs.get("placement", None)
-
# Check if the path is relative
if os.path.isabs(destination):
- message = (
- "The destination keyword of a resource directive " "can't be an absolute path.\n"
- )
- message += "\tdestination : '{dest}\n'".format(dest=destination)
- raise RuntimeError(message)
+ msg = "The destination keyword of a resource directive can't be an absolute path.\n"
+ msg += f"\tdestination : '{destination}\n'"
+ raise RuntimeError(msg)
# Check if the path falls within the main package stage area
test_path = "stage_folder_root"
- normalized_destination = os.path.normpath(
- os.path.join(test_path, destination)
- ) # Normalized absolute path
+
+ # Normalized absolute path
+ normalized_destination = os.path.normpath(os.path.join(test_path, destination))
if test_path not in normalized_destination:
- message = (
- "The destination folder of a resource must fall "
- "within the main package stage directory.\n"
- )
- message += "\tdestination : '{dest}'\n".format(dest=destination)
- raise RuntimeError(message)
+ msg = "Destination of a resource must be within the package stage directory.\n"
+ msg += f"\tdestination : '{destination}'\n"
+ raise RuntimeError(msg)
resources = pkg.resources.setdefault(when_spec, [])
- name = kwargs.get("name")
- fetcher = from_kwargs(**kwargs)
- resources.append(Resource(name, fetcher, destination, placement))
+ resources.append(
+ Resource(name, spack.fetch_strategy.from_kwargs(**kwargs), destination, placement)
+ )
return _execute_resource
@@ -880,26 +811,28 @@ def maintainers(*names: str):
"""
def _execute_maintainer(pkg):
- maintainers_from_base = getattr(pkg, "maintainers", [])
- # Here it is essential to copy, otherwise we might add to an empty list in the parent
- pkg.maintainers = list(sorted(set(maintainers_from_base + list(names))))
+ maintainers = set(getattr(pkg, "maintainers", []))
+ maintainers.update(names)
+ pkg.maintainers = sorted(maintainers)
return _execute_maintainer
-def _execute_license(pkg, license_identifier: str, when):
+def _execute_license(
+ pkg: Type[spack.package_base.PackageBase], license_identifier: str, when: WhenType
+):
# If when is not specified the license always holds
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
for other_when_spec in pkg.licenses:
if when_spec.intersects(other_when_spec):
when_message = ""
- if when_spec != make_when_spec(None):
+ if when_spec != _make_when_spec(None):
when_message = f"when {when_spec}"
other_when_message = ""
- if other_when_spec != make_when_spec(None):
+ if other_when_spec != _make_when_spec(None):
other_when_message = f"when {other_when_spec}"
err_msg = (
f"{pkg.name} is specified as being licensed as {license_identifier} "
@@ -926,14 +859,13 @@ def license(
checked_by: string or list of strings indicating which github user checked the
license (if any).
when: A spec specifying when the license applies.
- when: A spec specifying when the license applies.
"""
return lambda pkg: _execute_license(pkg, license_identifier, when)
@directive("requirements")
-def requires(*requirement_specs, policy="one_of", when=None, msg=None):
+def requires(*requirement_specs: str, policy="one_of", when=None, msg=None):
"""Allows a package to request a configuration to be present in all valid solutions.
For instance, a package that is known to compile only with GCC can declare:
@@ -952,7 +884,7 @@ def requires(*requirement_specs, policy="one_of", when=None, msg=None):
msg: optional user defined message
"""
- def _execute_requires(pkg):
+ def _execute_requires(pkg: Type[spack.package_base.PackageBase]):
if policy not in ("one_of", "any_of"):
err_msg = (
f"the 'policy' argument of the 'requires' directive in {pkg.name} is set "
@@ -960,20 +892,32 @@ def requires(*requirement_specs, policy="one_of", when=None, msg=None):
)
raise DirectiveError(err_msg)
- when_spec = make_when_spec(when)
+ when_spec = _make_when_spec(when)
if not when_spec:
return
# Save in a list the requirements and the associated custom messages
- when_spec_list = pkg.requirements.setdefault(tuple(requirement_specs), [])
+ requirement_list = pkg.requirements.setdefault(when_spec, [])
msg_with_name = f"{pkg.name}: {msg}" if msg is not None else msg
- when_spec_list.append((when_spec, policy, msg_with_name))
+ requirements = tuple(spack.spec.Spec(s) for s in requirement_specs)
+ requirement_list.append((requirements, policy, msg_with_name))
return _execute_requires
-class DirectiveError(spack.error.SpackError):
- """This is raised when something is wrong with a package directive."""
+@directive("languages")
+def _language(lang_spec_str: str, *, when: Optional[Union[str, bool]] = None):
+ """Temporary implementation of language virtuals, until compilers are proper dependencies."""
+
+ def _execute_languages(pkg: Type[spack.package_base.PackageBase]):
+ when_spec = _make_when_spec(when)
+ if not when_spec:
+ return
+
+ languages = pkg.languages.setdefault(when_spec, set())
+ languages.add(lang_spec_str)
+
+ return _execute_languages
class DependencyError(DirectiveError):
diff --git a/lib/spack/spack/directives_meta.py b/lib/spack/spack/directives_meta.py
new file mode 100644
index 0000000000..0ba1acb7bb
--- /dev/null
+++ b/lib/spack/spack/directives_meta.py
@@ -0,0 +1,237 @@
+# Copyright 2013-2024 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 collections.abc
+import functools
+from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Type, Union
+
+import llnl.util.lang
+
+import spack.error
+import spack.repo
+import spack.spec
+
+#: Names of possible directives. This list is mostly populated using the @directive decorator.
+#: Some directives leverage others and in that case are not automatically added.
+directive_names = ["build_system"]
+
+
+class DirectiveMeta(type):
+ """Flushes the directives that were temporarily stored in the staging
+ area into the package.
+ """
+
+ # Set of all known directives
+ _directive_dict_names: Set[str] = set()
+ _directives_to_be_executed: List[Callable] = []
+ _when_constraints_from_context: List[spack.spec.Spec] = []
+ _default_args: List[dict] = []
+
+ def __new__(
+ cls: Type["DirectiveMeta"], name: str, bases: tuple, attr_dict: dict
+ ) -> "DirectiveMeta":
+ # Initialize the attribute containing the list of directives
+ # to be executed. Here we go reversed because we want to execute
+ # commands:
+ # 1. in the order they were defined
+ # 2. following the MRO
+ attr_dict["_directives_to_be_executed"] = []
+ for base in reversed(bases):
+ try:
+ directive_from_base = base._directives_to_be_executed
+ attr_dict["_directives_to_be_executed"].extend(directive_from_base)
+ except AttributeError:
+ # The base class didn't have the required attribute.
+ # Continue searching
+ pass
+
+ # De-duplicates directives from base classes
+ attr_dict["_directives_to_be_executed"] = [
+ x for x in llnl.util.lang.dedupe(attr_dict["_directives_to_be_executed"])
+ ]
+
+ # Move things to be executed from module scope (where they
+ # are collected first) to class scope
+ if DirectiveMeta._directives_to_be_executed:
+ attr_dict["_directives_to_be_executed"].extend(
+ DirectiveMeta._directives_to_be_executed
+ )
+ DirectiveMeta._directives_to_be_executed = []
+
+ return super(DirectiveMeta, cls).__new__(cls, name, bases, attr_dict)
+
+ def __init__(cls: "DirectiveMeta", name: str, bases: tuple, attr_dict: dict):
+ # The instance is being initialized: if it is a package we must ensure
+ # that the directives are called to set it up.
+
+ if cls.__module__.startswith(spack.repo.ROOT_PYTHON_NAMESPACE):
+ # Ensure the presence of the dictionaries associated with the directives.
+ # All dictionaries are defaultdicts that create lists for missing keys.
+ for d in DirectiveMeta._directive_dict_names:
+ setattr(cls, d, {})
+
+ # Lazily execute directives
+ for directive in cls._directives_to_be_executed:
+ directive(cls)
+
+ # Ignore any directives executed *within* top-level
+ # directives by clearing out the queue they're appended to
+ DirectiveMeta._directives_to_be_executed = []
+
+ super(DirectiveMeta, cls).__init__(name, bases, attr_dict)
+
+ @staticmethod
+ def push_to_context(when_spec: spack.spec.Spec) -> None:
+ """Add a spec to the context constraints."""
+ DirectiveMeta._when_constraints_from_context.append(when_spec)
+
+ @staticmethod
+ def pop_from_context() -> spack.spec.Spec:
+ """Pop the last constraint from the context"""
+ return DirectiveMeta._when_constraints_from_context.pop()
+
+ @staticmethod
+ def push_default_args(default_args: Dict[str, Any]) -> None:
+ """Push default arguments"""
+ DirectiveMeta._default_args.append(default_args)
+
+ @staticmethod
+ def pop_default_args() -> dict:
+ """Pop default arguments"""
+ return DirectiveMeta._default_args.pop()
+
+ @staticmethod
+ def directive(dicts: Optional[Union[Sequence[str], str]] = None) -> Callable:
+ """Decorator for Spack directives.
+
+ Spack directives allow you to modify a package while it is being
+ defined, e.g. to add version or dependency information. Directives
+ are one of the key pieces of Spack's package "language", which is
+ embedded in python.
+
+ 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(...)
+
+ The ``@directive`` decorator handles a couple things for you:
+
+ 1. Adds the class scope (pkg) as an initial parameter when
+ called, like a class method would. This allows you to modify
+ a package from within a directive, while the package is still
+ being defined.
+
+ 2. It automatically adds a dictionary called "versions" to the
+ package so that you can refer to pkg.versions.
+
+ The ``(dicts='versions')`` part ensures that ALL packages in Spack
+ will have a ``versions`` attribute after they're constructed, and
+ that if no directive actually modified it, it will just be an
+ empty dict.
+
+ This is just a modular way to add storage attributes to the
+ Package class, and it's how Spack gets information from the
+ packages to the core.
+ """
+ global directive_names
+
+ if isinstance(dicts, str):
+ dicts = (dicts,)
+
+ if not isinstance(dicts, collections.abc.Sequence):
+ message = "dicts arg must be list, tuple, or string. Found {0}"
+ raise TypeError(message.format(type(dicts)))
+
+ # Add the dictionary names if not already there
+ DirectiveMeta._directive_dict_names |= set(dicts)
+
+ # This decorator just returns the directive functions
+ def _decorator(decorated_function: Callable) -> Callable:
+ directive_names.append(decorated_function.__name__)
+
+ @functools.wraps(decorated_function)
+ def _wrapper(*args, **_kwargs):
+ # First merge default args with kwargs
+ kwargs = dict()
+ for default_args in DirectiveMeta._default_args:
+ kwargs.update(default_args)
+ kwargs.update(_kwargs)
+
+ # Inject when arguments from the context
+ if DirectiveMeta._when_constraints_from_context:
+ # Check that directives not yet supporting the when= argument
+ # are not used inside the context manager
+ if decorated_function.__name__ == "version":
+ msg = (
+ 'directive "{0}" cannot be used within a "when"'
+ ' context since it does not support a "when=" '
+ "argument"
+ )
+ msg = msg.format(decorated_function.__name__)
+ raise DirectiveError(msg)
+
+ when_constraints = [
+ spack.spec.Spec(x) for x in DirectiveMeta._when_constraints_from_context
+ ]
+ if kwargs.get("when"):
+ when_constraints.append(spack.spec.Spec(kwargs["when"]))
+ when_spec = spack.spec.merge_abstract_anonymous_specs(*when_constraints)
+
+ kwargs["when"] = when_spec
+
+ # If any of the arguments are executors returned by a
+ # directive passed as an argument, don't execute them
+ # lazily. Instead, let the called directive handle them.
+ # This allows nested directive calls in packages. The
+ # caller can return the directive if it should be queued.
+ def remove_directives(arg):
+ directives = DirectiveMeta._directives_to_be_executed
+ if isinstance(arg, (list, tuple)):
+ # Descend into args that are lists or tuples
+ for a in arg:
+ remove_directives(a)
+ else:
+ # Remove directives args from the exec queue
+ remove = next((d for d in directives if d is arg), None)
+ if remove is not None:
+ directives.remove(remove)
+
+ # Nasty, but it's the best way I can think of to avoid
+ # side effects if directive results are passed as args
+ remove_directives(args)
+ remove_directives(list(kwargs.values()))
+
+ # A directive returns either something that is callable on a
+ # package or a sequence of them
+ result = decorated_function(*args, **kwargs)
+
+ # ...so if it is not a sequence make it so
+ values = result
+ if not isinstance(values, collections.abc.Sequence):
+ values = (values,)
+
+ DirectiveMeta._directives_to_be_executed.extend(values)
+
+ # wrapped function returns same result as original so
+ # that we can nest directives
+ return result
+
+ return _wrapper
+
+ return _decorator
+
+
+class DirectiveError(spack.error.SpackError):
+ """This is raised when something is wrong with a package directive."""
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index b7a9b93431..19f5582bce 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -4,31 +4,26 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
-import glob
import os
-import posixpath
import re
import shutil
import sys
-from contextlib import contextmanager
from pathlib import Path
+from typing import List, Optional, Tuple
import llnl.util.filesystem as fs
-import llnl.util.tty as tty
+from llnl.util.symlink import readlink
import spack.config
import spack.hash_types as ht
+import spack.projections
import spack.spec
+import spack.store
import spack.util.spack_json as sjson
from spack.error import SpackError
-# Note: Posixpath is used here as opposed to
-# os.path.join due to spack.spec.Spec.format
-# requiring forward slash path seperators at this stage
default_projections = {
- "all": posixpath.join(
- "{architecture}", "{compiler.name}-{compiler.version}", "{name}-{version}-{hash}"
- )
+ "all": "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"
}
@@ -38,6 +33,42 @@ def _check_concrete(spec):
raise ValueError("Specs passed to a DirectoryLayout must be concrete!")
+def _get_spec(prefix: str) -> Optional["spack.spec.Spec"]:
+ """Returns a spec if the prefix contains a spec file in the .spack subdir"""
+ for f in ("spec.json", "spec.yaml"):
+ try:
+ return spack.spec.Spec.from_specfile(os.path.join(prefix, ".spack", f))
+ except Exception:
+ continue
+ return None
+
+
+def specs_from_metadata_dirs(root: str) -> List["spack.spec.Spec"]:
+ stack = [root]
+ specs = []
+
+ while stack:
+ prefix = stack.pop()
+
+ spec = _get_spec(prefix)
+
+ if spec:
+ spec.prefix = prefix
+ specs.append(spec)
+ continue
+
+ try:
+ scandir = os.scandir(prefix)
+ except OSError:
+ continue
+
+ with scandir as entries:
+ for entry in entries:
+ if entry.is_dir(follow_symlinks=False):
+ stack.append(entry.path)
+ return specs
+
+
class DirectoryLayout:
"""A directory layout is used to associate unique paths with specs.
Different installations are going to want different layouts for their
@@ -151,20 +182,9 @@ class DirectoryLayout:
def spec_file_path(self, spec):
"""Gets full path to spec file"""
_check_concrete(spec)
- # Attempts to convert to JSON if possible.
- # Otherwise just returns the YAML.
yaml_path = os.path.join(self.metadata_path(spec), self._spec_file_name_yaml)
json_path = os.path.join(self.metadata_path(spec), self.spec_file_name)
- if os.path.exists(yaml_path) and fs.can_write_to_dir(yaml_path):
- self.write_spec(spec, json_path)
- try:
- os.remove(yaml_path)
- except OSError as err:
- tty.debug("Could not remove deprecated {0}".format(yaml_path))
- tty.debug(err)
- elif os.path.exists(yaml_path):
- return yaml_path
- return json_path
+ return yaml_path if os.path.exists(yaml_path) else json_path
def deprecated_file_path(self, deprecated_spec, deprecator_spec=None):
"""Gets full path to spec file for deprecated spec
@@ -181,7 +201,7 @@ class DirectoryLayout:
base_dir = (
self.path_for_spec(deprecator_spec)
if deprecator_spec
- else os.readlink(deprecated_spec.prefix)
+ else readlink(deprecated_spec.prefix)
)
yaml_path = os.path.join(
@@ -198,23 +218,7 @@ class DirectoryLayout:
deprecated_spec.dag_hash() + "_" + self.spec_file_name,
)
- if os.path.exists(yaml_path) and fs.can_write_to_dir(yaml_path):
- self.write_spec(deprecated_spec, json_path)
- try:
- os.remove(yaml_path)
- except (IOError, OSError) as err:
- tty.debug("Could not remove deprecated {0}".format(yaml_path))
- tty.debug(err)
- elif os.path.exists(yaml_path):
- return yaml_path
-
- return json_path
-
- @contextmanager
- def disable_upstream_check(self):
- self.check_upstream = False
- yield
- self.check_upstream = True
+ return yaml_path if os.path.exists(yaml_path) else json_path
def metadata_path(self, spec):
return os.path.join(spec.prefix, self.metadata_dir)
@@ -270,53 +274,6 @@ class DirectoryLayout:
"Spec file in %s does not match hash!" % spec_file_path
)
- def all_specs(self):
- if not os.path.isdir(self.root):
- return []
-
- specs = []
- for _, path_scheme in self.projections.items():
- path_elems = ["*"] * len(path_scheme.split(posixpath.sep))
- # NOTE: Does not validate filename extension; should happen later
- path_elems += [self.metadata_dir, "spec.json"]
- pattern = os.path.join(self.root, *path_elems)
- spec_files = glob.glob(pattern)
- if not spec_files: # we're probably looking at legacy yaml...
- path_elems += [self.metadata_dir, "spec.yaml"]
- pattern = os.path.join(self.root, *path_elems)
- spec_files = glob.glob(pattern)
- specs.extend([self.read_spec(s) for s in spec_files])
- return specs
-
- def all_deprecated_specs(self):
- if not os.path.isdir(self.root):
- return []
-
- deprecated_specs = set()
- for _, path_scheme in self.projections.items():
- path_elems = ["*"] * len(path_scheme.split(posixpath.sep))
- # NOTE: Does not validate filename extension; should happen later
- path_elems += [
- self.metadata_dir,
- self.deprecated_dir,
- "*_spec.*",
- ] # + self.spec_file_name]
- pattern = os.path.join(self.root, *path_elems)
- spec_files = glob.glob(pattern)
- get_depr_spec_file = lambda x: os.path.join(
- os.path.dirname(os.path.dirname(x)), self.spec_file_name
- )
- deprecated_specs |= set(
- (self.read_spec(s), self.read_spec(get_depr_spec_file(s))) for s in spec_files
- )
- return deprecated_specs
-
- def specs_by_hash(self):
- by_hash = {}
- for spec in self.all_specs():
- by_hash[spec.dag_hash()] = spec
- return by_hash
-
def path_for_spec(self, spec):
"""Return absolute path from the root to a directory for the spec."""
_check_concrete(spec)
@@ -382,6 +339,35 @@ class DirectoryLayout:
raise e
path = os.path.dirname(path)
+ def all_specs(self) -> List["spack.spec.Spec"]:
+ """Returns a list of all specs detected in self.root, detected by `.spack` directories.
+ Their prefix is set to the directory containing the `.spack` directory. Note that these
+ specs may follow a different layout than the current layout if it was changed after
+ installation."""
+ return specs_from_metadata_dirs(self.root)
+
+ def deprecated_for(
+ self, specs: List["spack.spec.Spec"]
+ ) -> List[Tuple["spack.spec.Spec", "spack.spec.Spec"]]:
+ """Returns a list of tuples of specs (new, old) where new is deprecated for old"""
+ spec_with_deprecated = []
+ for spec in specs:
+ try:
+ deprecated = os.scandir(
+ os.path.join(str(spec.prefix), self.metadata_dir, self.deprecated_dir)
+ )
+ except OSError:
+ continue
+
+ with deprecated as entries:
+ for entry in entries:
+ try:
+ deprecated_spec = spack.spec.Spec.from_specfile(entry.path)
+ spec_with_deprecated.append((spec, deprecated_spec))
+ except Exception:
+ continue
+ return spec_with_deprecated
+
class DirectoryLayoutError(SpackError):
"""Superclass for directory layout errors."""
diff --git a/lib/spack/spack/enums.py b/lib/spack/spack/enums.py
new file mode 100644
index 0000000000..7df7ab5a42
--- /dev/null
+++ b/lib/spack/spack/enums.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2024 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)
+"""Enumerations used throughout Spack"""
+import enum
+
+
+class InstallRecordStatus(enum.Flag):
+ """Enum flag to facilitate querying status from the DB"""
+
+ INSTALLED = enum.auto()
+ DEPRECATED = enum.auto()
+ MISSING = enum.auto()
+ ANY = INSTALLED | DEPRECATED | MISSING
diff --git a/lib/spack/spack/environment/__init__.py b/lib/spack/spack/environment/__init__.py
index e6521aed87..62445e0437 100644
--- a/lib/spack/spack/environment/__init__.py
+++ b/lib/spack/spack/environment/__init__.py
@@ -34,6 +34,9 @@ contents have. Lockfiles are JSON-formatted and their top-level sections are:
* ``spec``: a string representation of the abstract spec that was concretized
4. ``concrete_specs``: a dictionary containing the specs in the environment.
+ 5. ``include_concrete`` (dictionary): an optional dictionary that includes the roots
+ and concrete specs from the included environments, keyed by the path to that
+ environment
Compatibility
-------------
@@ -50,26 +53,37 @@ upgrade Spack to use them.
- ``v2``
- ``v3``
- ``v4``
+ - ``v5``
* - ``v0.12:0.14``
- ✅
-
-
-
+ -
* - ``v0.15:0.16``
- ✅
- ✅
-
-
+ -
* - ``v0.17``
- ✅
- ✅
- ✅
-
+ -
* - ``v0.18:``
- ✅
- ✅
- ✅
- ✅
+ -
+ * - ``v0.22:``
+ - ✅
+ - ✅
+ - ✅
+ - ✅
+ - ✅
Version 1
---------
@@ -334,6 +348,118 @@ the commit or version.
}
}
}
+
+
+Version 5
+---------
+
+Version 5 doesn't change the top-level lockfile format, but an optional dictionary is
+added. The dictionary has the ``root`` and ``concrete_specs`` of the included
+environments, which are keyed by the path to that environment. Since this is optional
+if the environment does not have any included environments ``include_concrete`` will
+not be a part of the lockfile.
+
+.. code-block:: json
+
+ {
+ "_meta": {
+ "file-type": "spack-lockfile",
+ "lockfile-version": 5,
+ "specfile-version": 3
+ },
+ "roots": [
+ {
+ "hash": "<dag_hash 1>",
+ "spec": "<abstract spec 1>"
+ },
+ {
+ "hash": "<dag_hash 2>",
+ "spec": "<abstract spec 2>"
+ }
+ ],
+ "concrete_specs": {
+ "<dag_hash 1>": {
+ "... <spec dict attributes> ...": { },
+ "dependencies": [
+ {
+ "name": "depname_1",
+ "hash": "<dag_hash for depname_1>",
+ "type": ["build", "link"]
+ },
+ {
+ "name": "depname_2",
+ "hash": "<dag_hash for depname_2>",
+ "type": ["build", "link"]
+ }
+ ],
+ "hash": "<dag_hash 1>",
+ },
+ "<daghash 2>": {
+ "... <spec dict attributes> ...": { },
+ "dependencies": [
+ {
+ "name": "depname_3",
+ "hash": "<dag_hash for depname_3>",
+ "type": ["build", "link"]
+ },
+ {
+ "name": "depname_4",
+ "hash": "<dag_hash for depname_4>",
+ "type": ["build", "link"]
+ }
+ ],
+ "hash": "<dag_hash 2>"
+ }
+ }
+ "include_concrete": {
+ "<path to environment>": {
+ "roots": [
+ {
+ "hash": "<dag_hash 1>",
+ "spec": "<abstract spec 1>"
+ },
+ {
+ "hash": "<dag_hash 2>",
+ "spec": "<abstract spec 2>"
+ }
+ ],
+ "concrete_specs": {
+ "<dag_hash 1>": {
+ "... <spec dict attributes> ...": { },
+ "dependencies": [
+ {
+ "name": "depname_1",
+ "hash": "<dag_hash for depname_1>",
+ "type": ["build", "link"]
+ },
+ {
+ "name": "depname_2",
+ "hash": "<dag_hash for depname_2>",
+ "type": ["build", "link"]
+ }
+ ],
+ "hash": "<dag_hash 1>",
+ },
+ "<daghash 2>": {
+ "... <spec dict attributes> ...": { },
+ "dependencies": [
+ {
+ "name": "depname_3",
+ "hash": "<dag_hash for depname_3>",
+ "type": ["build", "link"]
+ },
+ {
+ "name": "depname_4",
+ "hash": "<dag_hash for depname_4>",
+ "type": ["build", "link"]
+ }
+ ],
+ "hash": "<dag_hash 2>"
+ }
+ }
+ }
+ }
+ }
"""
from .environment import (
@@ -347,6 +473,7 @@ from .environment import (
active_environment,
all_environment_names,
all_environments,
+ as_env_dir,
create,
create_in_dir,
deactivate,
@@ -354,6 +481,7 @@ from .environment import (
default_view_name,
display_specs,
environment_dir_from_name,
+ environment_from_name_or_dir,
exists,
initialize_environment_dir,
installed_specs,
@@ -381,6 +509,7 @@ __all__ = [
"active_environment",
"all_environment_names",
"all_environments",
+ "as_env_dir",
"create",
"create_in_dir",
"deactivate",
@@ -388,6 +517,7 @@ __all__ = [
"default_view_name",
"display_specs",
"environment_dir_from_name",
+ "environment_from_name_or_dir",
"exists",
"initialize_environment_dir",
"installed_specs",
diff --git a/lib/spack/spack/environment/depfile.py b/lib/spack/spack/environment/depfile.py
index 06dc8f157d..38d673192b 100644
--- a/lib/spack/spack/environment/depfile.py
+++ b/lib/spack/spack/environment/depfile.py
@@ -9,11 +9,13 @@ depfiles from an environment.
import os
import re
+import shlex
from enum import Enum
from typing import List, Optional
import spack.deptypes as dt
import spack.environment.environment as ev
+import spack.paths
import spack.spec
import spack.traverse as traverse
@@ -226,6 +228,7 @@ class MakefileModel:
"install_deps_target": self._target("install-deps"),
"any_hash_target": self._target("%"),
"jobserver_support": self.jobserver_support,
+ "spack_script": shlex.quote(spack.paths.spack_script),
"adjacency_list": self.make_adjacency_list,
"phony_convenience_targets": " ".join(self.phony_convenience_targets),
"pkg_ids_variable": self.pkg_identifier_variable,
diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py
index cacc938985..9a3361c734 100644
--- a/lib/spack/spack/environment/environment.py
+++ b/lib/spack/spack/environment/environment.py
@@ -5,61 +5,55 @@
import collections
import collections.abc
import contextlib
-import copy
+import errno
import os
import pathlib
import re
import shutil
import stat
-import sys
-import time
import urllib.parse
import urllib.request
import warnings
-from typing import Dict, Iterable, List, Optional, Set, Tuple, Union
+from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
import llnl.util.filesystem as fs
import llnl.util.tty as tty
import llnl.util.tty.color as clr
-from llnl.util.lang import dedupe
from llnl.util.link_tree import ConflictingSpecsError
-from llnl.util.symlink import symlink
+from llnl.util.symlink import islink, readlink, symlink
-import spack.compilers
+import spack
+import spack.caches
import spack.concretize
import spack.config
import spack.deptypes as dt
+import spack.environment
import spack.error
-import spack.fetch_strategy
+import spack.filesystem_view as fsv
import spack.hash_types as ht
-import spack.hooks
-import spack.main
import spack.paths
import spack.repo
import spack.schema.env
+import spack.schema.merged
import spack.spec
-import spack.stage
+import spack.spec_list
import spack.store
-import spack.subprocess_context
import spack.user_environment as uenv
-import spack.util.cpus
import spack.util.environment
import spack.util.hash
import spack.util.lock as lk
-import spack.util.parallel
import spack.util.path
import spack.util.spack_json as sjson
import spack.util.spack_yaml as syaml
import spack.util.url
-import spack.version
from spack import traverse
-from spack.filesystem_view import SimpleFilesystemView, inverse_view_func_parser, view_func_parser
from spack.installer import PackageInstaller
from spack.schema.env import TOP_LEVEL_KEY
from spack.spec import Spec
-from spack.spec_list import InvalidSpecConstraintError, SpecList
+from spack.spec_list import SpecList
from spack.util.path import substitute_path_variables
-from spack.variant import UnknownVariantError
+
+SpecPair = spack.concretize.SpecPair
#: environment variable used to indicate the active environment
spack_env_var = "SPACK_ENV"
@@ -83,28 +77,40 @@ manifest_name = "spack.yaml"
lockfile_name = "spack.lock"
-#: Name of the directory where environments store repos, logs, views
+#: Name of the directory where environments store repos, logs, views, configs
env_subdir_name = ".spack-env"
-def env_root_path():
+def env_root_path() -> str:
"""Override default root path if the user specified it"""
return spack.util.path.canonicalize_path(
spack.config.get("config:environments_root", default=default_env_path)
)
-def check_disallowed_env_config_mods(scopes):
+def environment_name(path: Union[str, pathlib.Path]) -> str:
+ """Human-readable representation of the environment.
+
+ This is the path for directory environments, and just the name
+ for managed environments.
+ """
+ path_str = str(path)
+ if path_str.startswith(env_root_path()):
+ return os.path.basename(path_str)
+ else:
+ return path_str
+
+
+def ensure_no_disallowed_env_config_mods(scopes: List[spack.config.ConfigScope]) -> None:
for scope in scopes:
- with spack.config.use_configuration(scope):
- if spack.config.get("config:environments_root"):
- raise SpackEnvironmentError(
- "Spack environments are prohibited from modifying 'config:environments_root' "
- "because it can make the definition of the environment ill-posed. Please "
- "remove from your environment and place it in a permanent scope such as "
- "defaults, system, site, etc."
- )
- return scopes
+ config = scope.get_section("config")
+ if config and "environments_root" in config["config"]:
+ raise SpackEnvironmentError(
+ "Spack environments are prohibited from modifying 'config:environments_root' "
+ "because it can make the definition of the environment ill-posed. Please "
+ "remove from your environment and place it in a permanent scope such as "
+ "defaults, system, site, etc."
+ )
def default_manifest_yaml():
@@ -148,6 +154,8 @@ user_speclist_name = "specs"
default_view_name = "default"
# Default behavior to link all packages into views (vs. only root packages)
default_view_link = "all"
+# The name for any included concrete specs
+included_concrete_name = "include_concrete"
def installed_specs():
@@ -179,9 +187,8 @@ def validate_env_name(name):
def activate(env, use_env_repo=False):
"""Activate an environment.
- To activate an environment, we add its configuration scope to the
- existing Spack configuration, and we set active to the current
- environment.
+ To activate an environment, we add its manifest's configuration scope to the
+ existing Spack configuration, and we set active to the current environment.
Arguments:
env (Environment): the environment to activate
@@ -198,7 +205,7 @@ def activate(env, use_env_repo=False):
# below.
install_tree_before = spack.config.get("config:install_tree")
upstreams_before = spack.config.get("upstreams")
- prepare_config_scope(env)
+ env.manifest.prepare_config_scope()
install_tree_after = spack.config.get("config:install_tree")
upstreams_after = spack.config.get("upstreams")
if install_tree_before != install_tree_after or upstreams_before != upstreams_after:
@@ -226,7 +233,7 @@ def deactivate():
if hasattr(_active_environment, "store_token"):
spack.store.restore(_active_environment.store_token)
delattr(_active_environment, "store_token")
- deactivate_config_scope(_active_environment)
+ _active_environment.manifest.deactivate_config_scope()
# use _repo so we only remove if a repo was actually constructed
if _active_environment._repo:
@@ -255,9 +262,7 @@ def root(name):
def exists(name):
"""Whether an environment with this name exists or not."""
- if not valid_env_name(name):
- return False
- return os.path.isdir(root(name))
+ return valid_env_name(name) and os.path.isdir(_root(name))
def active(name):
@@ -270,6 +275,22 @@ def is_env_dir(path):
return os.path.isdir(path) and os.path.exists(os.path.join(path, manifest_name))
+def as_env_dir(name_or_dir):
+ """Translate an environment name or directory to the environment directory"""
+ if is_env_dir(name_or_dir):
+ return name_or_dir
+ else:
+ validate_env_name(name_or_dir)
+ if not exists(name_or_dir):
+ raise SpackEnvironmentError("no such environment '%s'" % name_or_dir)
+ return root(name_or_dir)
+
+
+def environment_from_name_or_dir(name_or_dir):
+ """Get an environment with the supplied name."""
+ return Environment(as_env_dir(name_or_dir))
+
+
def read(name):
"""Get an environment with the supplied name."""
validate_env_name(name)
@@ -283,6 +304,7 @@ def create(
init_file: Optional[Union[str, pathlib.Path]] = None,
with_view: Optional[Union[str, pathlib.Path, bool]] = None,
keep_relative: bool = False,
+ include_concrete: Optional[List[str]] = None,
) -> "Environment":
"""Create a managed environment in Spack and returns it.
@@ -299,10 +321,15 @@ def create(
string, it specifies the path to the view
keep_relative: if True, develop paths are copied verbatim into the new environment file,
otherwise they are made absolute
+ include_concrete: list of concrete environment names/paths to be included
"""
environment_dir = environment_dir_from_name(name, exists_ok=False)
return create_in_dir(
- environment_dir, init_file=init_file, with_view=with_view, keep_relative=keep_relative
+ environment_dir,
+ init_file=init_file,
+ with_view=with_view,
+ keep_relative=keep_relative,
+ include_concrete=include_concrete,
)
@@ -311,6 +338,7 @@ def create_in_dir(
init_file: Optional[Union[str, pathlib.Path]] = None,
with_view: Optional[Union[str, pathlib.Path, bool]] = None,
keep_relative: bool = False,
+ include_concrete: Optional[List[str]] = None,
) -> "Environment":
"""Create an environment in the directory passed as input and returns it.
@@ -324,6 +352,7 @@ def create_in_dir(
string, it specifies the path to the view
keep_relative: if True, develop paths are copied verbatim into the new environment file,
otherwise they are made absolute
+ include_concrete: concrete environment names/paths to be included
"""
initialize_environment_dir(root, envfile=init_file)
@@ -336,6 +365,12 @@ def create_in_dir(
if with_view is not None:
manifest.set_default_view(with_view)
+ if include_concrete is not None:
+ set_included_envs_to_env_paths(include_concrete)
+ validate_included_envs_exists(include_concrete)
+ validate_included_envs_concrete(include_concrete)
+ manifest.set_include_concrete(include_concrete)
+
manifest.flush()
except (spack.config.ConfigFormatError, SpackEnvironmentConfigError) as e:
@@ -363,12 +398,12 @@ def _rewrite_relative_dev_paths_on_relocation(env, init_file_dir):
to store the environment in a different directory, we have to rewrite
relative paths to absolute ones."""
with env:
- dev_specs = spack.config.get("develop", default={}, scope=env.env_file_config_scope_name())
+ dev_specs = spack.config.get("develop", default={}, scope=env.scope_name)
if not dev_specs:
return
for name, entry in dev_specs.items():
- dev_path = entry["path"]
- expanded_path = os.path.normpath(os.path.join(init_file_dir, entry["path"]))
+ dev_path = substitute_path_variables(entry["path"])
+ expanded_path = spack.util.path.canonicalize_path(dev_path, default_wd=init_file_dir)
# Skip if the expanded path is the same (e.g. when absolute)
if dev_path == expanded_path:
@@ -378,7 +413,7 @@ def _rewrite_relative_dev_paths_on_relocation(env, init_file_dir):
dev_specs[name]["path"] = expanded_path
- spack.config.set("develop", dev_specs, scope=env.env_file_config_scope_name())
+ spack.config.set("develop", dev_specs, scope=env.scope_name)
env._dev_specs = None
# If we changed the environment's spack.yaml scope, that will not be reflected
@@ -409,6 +444,67 @@ def ensure_env_root_path_exists():
fs.mkdirp(env_root_path())
+def set_included_envs_to_env_paths(include_concrete: List[str]) -> None:
+ """If the included environment(s) is the environment name
+ it is replaced by the path to the environment
+
+ Args:
+ include_concrete: list of env name or path to env"""
+
+ for i, env_name in enumerate(include_concrete):
+ if is_env_dir(env_name):
+ include_concrete[i] = env_name
+ elif exists(env_name):
+ include_concrete[i] = root(env_name)
+
+
+def validate_included_envs_exists(include_concrete: List[str]) -> None:
+ """Checks that all of the included environments exist
+
+ Args:
+ include_concrete: list of already existing concrete environments to include
+
+ Raises:
+ SpackEnvironmentError: if any of the included environments do not exist
+ """
+
+ missing_envs = set()
+
+ for i, env_name in enumerate(include_concrete):
+ if not is_env_dir(env_name):
+ missing_envs.add(env_name)
+
+ if missing_envs:
+ msg = "The following environment(s) are missing: {0}".format(", ".join(missing_envs))
+ raise SpackEnvironmentError(msg)
+
+
+def validate_included_envs_concrete(include_concrete: List[str]) -> None:
+ """Checks that all of the included environments are concrete
+
+ Args:
+ include_concrete: list of already existing concrete environments to include
+
+ Raises:
+ SpackEnvironmentError: if any of the included environments are not concrete
+ """
+
+ non_concrete_envs = set()
+
+ for env_path in include_concrete:
+ if not os.path.exists(Environment(env_path).lock_path):
+ non_concrete_envs.add(Environment(env_path).name)
+
+ if non_concrete_envs:
+ msg = "The following environment(s) are not concrete: {0}\n" "Please run:".format(
+ ", ".join(non_concrete_envs)
+ )
+ for env in non_concrete_envs:
+ msg += f"\n\t`spack -e {env} concretize`"
+
+ raise SpackEnvironmentError(msg)
+
+
def all_environment_names():
"""List the names of environments that currently exist."""
# just return empty if the env path does not exist. A read-only
@@ -441,8 +537,8 @@ def _read_yaml(str_or_file):
)
filename = getattr(str_or_file, "name", None)
- default_data = spack.config.validate(data, spack.schema.env.schema, filename)
- return data, default_data
+ spack.config.validate(data, spack.schema.env.schema, filename)
+ return data
def _write_yaml(data, str_or_file):
@@ -464,8 +560,7 @@ def _is_dev_spec_and_has_changed(spec):
last installation"""
# First check if this is a dev build and in the process already try to get
# the dev_path
- dev_path_var = spec.variants.get("dev_path", None)
- if not dev_path_var:
+ if not spec.variants.get("dev_path", None):
return False
# Now we can check whether the code changed since the last installation
@@ -473,9 +568,10 @@ def _is_dev_spec_and_has_changed(spec):
# Not installed -> nothing to compare against
return False
- _, record = spack.store.STORE.db.query_by_spec_hash(spec.dag_hash())
- mtime = fs.last_modification_time_recursive(dev_path_var.value)
- return mtime > record.installation_time
+ # hook so packages can use to write their own method for checking the dev_path
+ # use package so attributes about concretization such as variant state can be
+ # utilized
+ return spec.package.detect_dev_src_change()
def _error_on_nonempty_view_dir(new_root):
@@ -519,7 +615,7 @@ class ViewDescriptor:
self.projections = projections
self.select = select
self.exclude = exclude
- self.link_type = view_func_parser(link_type)
+ self.link_type = fsv.canonicalize_link_type(link_type)
self.link = link
def select_fn(self, spec):
@@ -553,7 +649,7 @@ class ViewDescriptor:
if self.exclude:
ret["exclude"] = self.exclude
if self.link_type:
- ret["link_type"] = inverse_view_func_parser(self.link_type)
+ ret["link_type"] = self.link_type
if self.link != default_view_link:
ret["link"] = self.link
return ret
@@ -572,10 +668,10 @@ class ViewDescriptor:
@property
def _current_root(self):
- if not os.path.islink(self.root):
+ if not islink(self.root):
return None
- root = os.readlink(self.root)
+ root = readlink(self.root)
if os.path.isabs(root):
return root
@@ -599,45 +695,38 @@ class ViewDescriptor:
return spack.util.hash.b32_hash(contents)
def get_projection_for_spec(self, spec):
- """Get projection for spec relative to view root
-
- Getting the projection from the underlying root will get the temporary
- projection. This gives the permanent projection relative to the root
- symlink.
- """
- view = self.view()
- view_path = view.get_projection_for_spec(spec)
- rel_path = os.path.relpath(view_path, self._current_root)
- return os.path.join(self.root, rel_path)
+ """Get projection for spec. This function does not require the view
+ to exist on the filesystem."""
+ return self._view(self.root).get_projection_for_spec(spec)
- def view(self, new=None):
+ def view(self, new: Optional[str] = None) -> fsv.SimpleFilesystemView:
"""
- Generate the FilesystemView object for this ViewDescriptor
-
- By default, this method returns a FilesystemView object rooted at the
- current underlying root of this ViewDescriptor (self._current_root)
+ Returns a view object for the *underlying* view directory. This means that the
+ self.root symlink is followed, and that the view has to exist on the filesystem
+ (unless ``new``). This function is useful when writing to the view.
Raise if new is None and there is no current view
Arguments:
- 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.
+ new: 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.
"""
- root = new if new else self._current_root
- if not root:
+ path = new if new else self._current_root
+ if not path:
# This can only be hit if we write a future bug
- msg = (
- "Attempting to get nonexistent view from environment. "
- "View root is at %s" % self.root
+ raise SpackEnvironmentViewError(
+ f"Attempting to get nonexistent view from environment. View root is at {self.root}"
)
- raise SpackEnvironmentViewError(msg)
- return SimpleFilesystemView(
+ return self._view(path)
+
+ def _view(self, root: str) -> fsv.SimpleFilesystemView:
+ """Returns a view object for a given root dir."""
+ return fsv.SimpleFilesystemView(
root,
spack.store.STORE.layout,
ignore_conflicts=True,
projections=self.projections,
- link=self.link_type,
+ link_type=self.link_type,
)
def __contains__(self, spec):
@@ -657,30 +746,28 @@ class ViewDescriptor:
return True
- def specs_for_view(self, concretized_root_specs):
- """
- From the list of concretized user specs in the environment, flatten
- the dags, and filter selected, installed specs, remove duplicates on dag hash.
- """
- # With deps, requires traversal
- if self.link == "all" or self.link == "run":
- deptype = ("run") if self.link == "run" else ("link", "run")
- specs = list(
- traverse.traverse_nodes(
- concretized_root_specs, deptype=deptype, key=traverse.by_dag_hash
- )
- )
+ def specs_for_view(self, concrete_roots: List[Spec]) -> List[Spec]:
+ """Flatten the DAGs of the concrete roots, keep only unique, selected, and installed specs
+ in topological order from root to leaf."""
+ if self.link == "all":
+ deptype = dt.LINK | dt.RUN
+ elif self.link == "run":
+ deptype = dt.RUN
else:
- specs = list(dedupe(concretized_root_specs, key=traverse.by_dag_hash))
+ deptype = dt.NONE
+
+ specs = traverse.traverse_nodes(
+ concrete_roots, order="topo", deptype=deptype, key=traverse.by_dag_hash
+ )
# Filter selected, installed specs
with spack.store.STORE.db.read_transaction():
- specs = [s for s in specs if s in self and s.installed]
+ result = [s for s in specs if s in self and s.installed]
- return specs
+ return self._exclude_duplicate_runtimes(result)
- def regenerate(self, concretized_root_specs):
- specs = self.specs_for_view(concretized_root_specs)
+ def regenerate(self, concrete_roots: List[Spec]) -> None:
+ specs = self.specs_for_view(concrete_roots)
# To ensure there are no conflicts with packages being installed
# that cannot be resolved or have repos that have been removed
@@ -697,24 +784,41 @@ class ViewDescriptor:
old_root = self._current_root
if new_root == old_root:
- tty.debug("View at %s does not need regeneration." % self.root)
+ tty.debug(f"View at {self.root} does not need regeneration.")
return
_error_on_nonempty_view_dir(new_root)
# construct view at new_root
if specs:
- tty.msg("Updating view at {0}".format(self.root))
+ tty.msg(f"Updating view at {self.root}")
view = self.view(new=new_root)
root_dirname = os.path.dirname(self.root)
tmp_symlink_name = os.path.join(root_dirname, "._view_link")
+ # Remove self.root if is it an empty dir, since we need a symlink there. Note that rmdir
+ # fails if self.root is a symlink.
+ try:
+ os.rmdir(self.root)
+ except (FileNotFoundError, NotADirectoryError):
+ pass
+ except OSError as e:
+ if e.errno == errno.ENOTEMPTY:
+ msg = "it is a non-empty directory"
+ elif e.errno == errno.EACCES:
+ msg = "of insufficient permissions"
+ else:
+ raise
+ raise SpackEnvironmentViewError(
+ f"The environment view in {self.root} cannot not be created because {msg}."
+ ) from e
+
# Create a new view
try:
fs.mkdirp(new_root)
- view.add_specs(*specs, with_dependencies=False)
+ view.add_specs(*specs)
# create symlink from tmp_symlink_name to new_root
if os.path.exists(tmp_symlink_name):
@@ -728,7 +832,7 @@ class ViewDescriptor:
try:
shutil.rmtree(new_root, ignore_errors=True)
os.unlink(tmp_symlink_name)
- except (IOError, OSError):
+ except OSError:
pass
# Give an informative error message for the typical error case: two specs, same package
@@ -764,11 +868,32 @@ class ViewDescriptor:
msg += str(e)
tty.warn(msg)
+ def _exclude_duplicate_runtimes(self, nodes):
+ all_runtimes = spack.repo.PATH.packages_with_tags("runtime")
+ runtimes_by_name = {}
+ for s in nodes:
+ if s.name not in all_runtimes:
+ continue
+ current_runtime = runtimes_by_name.get(s.name, s)
+ runtimes_by_name[s.name] = max(current_runtime, s, key=lambda x: x.version)
+ return [x for x in nodes if x.name not in all_runtimes or runtimes_by_name[x.name] == x]
+
def _create_environment(path):
return Environment(path)
+def env_subdir_path(manifest_dir: Union[str, pathlib.Path]) -> str:
+ """Path to where the environment stores repos, logs, views, configs.
+
+ Args:
+ manifest_dir: directory containing the environment manifest file
+
+ Returns: directory the environment uses to manage its files
+ """
+ return os.path.join(str(manifest_dir), env_subdir_name)
+
+
class Environment:
"""A Spack environment, which bundles together configuration and a list of specs."""
@@ -780,12 +905,13 @@ class Environment:
manifest_dir: directory with the "spack.yaml" associated with the environment
"""
self.path = os.path.abspath(str(manifest_dir))
+ self.name = environment_name(self.path)
+ self.env_subdir_path = env_subdir_path(self.path)
self.txlock = lk.Lock(self._transaction_lock_path)
self._unify = None
self.new_specs: List[Spec] = []
- self.new_installs: List[Spec] = []
self.views: Dict[str, ViewDescriptor] = {}
#: Specs from "spack.yaml"
@@ -798,13 +924,31 @@ class Environment:
self.specs_by_hash: Dict[str, Spec] = {}
#: Repository for this environment (memoized)
self._repo = None
+
+ #: Environment paths for concrete (lockfile) included environments
+ self.included_concrete_envs: List[str] = []
+ #: First-level included concretized spec data from/to the lockfile.
+ self.included_concrete_spec_data: Dict[str, Dict[str, List[str]]] = {}
+ #: User specs from included environments from the last concretization
+ self.included_concretized_user_specs: Dict[str, List[Spec]] = {}
+ #: Roots from included environments with the last concretization, in order
+ self.included_concretized_order: Dict[str, List[str]] = {}
+ #: Concretized specs by hash from the included environments
+ self.included_specs_by_hash: Dict[str, Dict[str, Spec]] = {}
+
#: Previously active environment
self._previous_active = None
self._dev_specs = None
+ # Load the manifest file contents into memory
+ self._load_manifest_file()
+
+ def _load_manifest_file(self):
+ """Instantiate and load the manifest file contents into memory."""
with lk.ReadTransaction(self.txlock):
- self.manifest = EnvironmentManifestFile(manifest_dir)
- self._read()
+ self.manifest = EnvironmentManifestFile(self.path, self.name)
+ with self.manifest.use_config():
+ self._read()
@property
def unify(self):
@@ -822,23 +966,14 @@ class Environment:
def _re_read(self):
"""Reinitialize the environment object."""
self.clear(re_read=True)
- self.manifest = EnvironmentManifestFile(self.path)
- self._read(re_read=True)
+ self._load_manifest_file()
- def _read(self, re_read=False):
- # If the manifest has included files, then some of the information
- # (e.g., definitions) MAY be in those files. So we need to ensure
- # the config is populated with any associated spec lists in order
- # to fully construct the manifest state.
- includes = self.manifest[TOP_LEVEL_KEY].get("include", [])
- if includes and not re_read:
- prepare_config_scope(self)
-
- self._construct_state_from_manifest(re_read)
+ def _read(self):
+ self._construct_state_from_manifest()
if os.path.exists(self.lock_path):
with open(self.lock_path) as f:
- read_lock_version = self._read_lockfile(f)
+ read_lock_version = self._read_lockfile(f)["_meta"]["lockfile-version"]
if read_lock_version == 1:
tty.debug(f"Storing backup of {self.lock_path} at {self._lock_backup_v1_path}")
@@ -848,51 +983,126 @@ class Environment:
"""Get a write lock context manager for use in a `with` block."""
return lk.WriteTransaction(self.txlock, acquire=self._re_read)
- def _process_definition(self, item):
+ def _process_definition(self, entry):
"""Process a single spec definition item."""
- entry = copy.deepcopy(item)
- when = _eval_conditional(entry.pop("when", "True"))
- assert len(entry) == 1
+ when_string = entry.get("when")
+ if when_string is not None:
+ when = _eval_conditional(when_string)
+ assert len([x for x in entry if x != "when"]) == 1
+ else:
+ when = True
+ assert len(entry) == 1
+
if when:
- name, spec_list = next(iter(entry.items()))
- user_specs = SpecList(name, spec_list, self.spec_lists.copy())
- if name in self.spec_lists:
- self.spec_lists[name].extend(user_specs)
+ for name, spec_list in entry.items():
+ if name == "when":
+ continue
+ user_specs = SpecList(name, spec_list, self.spec_lists.copy())
+ if name in self.spec_lists:
+ self.spec_lists[name].extend(user_specs)
+ else:
+ self.spec_lists[name] = user_specs
+
+ def _process_view(self, env_view: Optional[Union[bool, str, Dict]]):
+ """Process view option(s), which can be boolean, string, or None.
+
+ A boolean environment view option takes precedence over any that may
+ be included. So ``view: True`` results in the default view only. And
+ ``view: False`` means the environment will have no view.
+
+ Args:
+ env_view: view option provided in the manifest or configuration
+ """
+
+ def add_view(name, values):
+ """Add the view with the name and the string or dict values."""
+ if isinstance(values, str):
+ self.views[name] = ViewDescriptor(self.path, values)
+ elif isinstance(values, dict):
+ self.views[name] = ViewDescriptor.from_dict(self.path, values)
else:
- self.spec_lists[name] = user_specs
+ tty.error(f"Cannot add view named {name} for {type(values)} values {values}")
- def _construct_state_from_manifest(self, re_read=False):
- """Read manifest file and set up user specs."""
- self.spec_lists = collections.OrderedDict()
+ # If the configuration specifies 'view: False' then we are done
+ # processing views. If this is called with the environment's view
+ # view (versus an included view), then there are to be NO views.
+ if env_view is False:
+ return
- if not re_read:
- for item in spack.config.get("definitions", []):
- self._process_definition(item)
+ # If the configuration specifies 'view: True' then only the default
+ # view will be created for the environment and we are done processing
+ # views.
+ if env_view is True:
+ add_view(default_view_name, self.view_path_default)
+ return
- env_configuration = self.manifest[TOP_LEVEL_KEY]
- for item in env_configuration.get("definitions", []):
+ # Otherwise, the configuration has a subdirectory or dictionary.
+ if isinstance(env_view, str):
+ add_view(default_view_name, env_view)
+ elif env_view:
+ for name, values in env_view.items():
+ add_view(name, values)
+
+ # If we reach this point without an explicit view option then we
+ # provide the default view.
+ if self.views == dict():
+ self.views[default_view_name] = ViewDescriptor(self.path, self.view_path_default)
+
+ def _process_concrete_includes(self):
+ """Extract and load into memory included concrete spec data."""
+ self.included_concrete_envs = self.manifest[TOP_LEVEL_KEY].get(included_concrete_name, [])
+
+ if self.included_concrete_envs:
+ if os.path.exists(self.lock_path):
+ with open(self.lock_path) as f:
+ data = self._read_lockfile(f)
+
+ if included_concrete_name in data:
+ self.included_concrete_spec_data = data[included_concrete_name]
+ else:
+ self.include_concrete_envs()
+
+ def _construct_state_from_manifest(self):
+ """Set up user specs and views from the manifest file."""
+ self.spec_lists = collections.OrderedDict()
+ self.views = {}
+
+ for item in spack.config.get("definitions", []):
self._process_definition(item)
+ env_configuration = self.manifest[TOP_LEVEL_KEY]
spec_list = env_configuration.get(user_speclist_name, [])
user_specs = SpecList(
user_speclist_name, [s for s in spec_list if s], self.spec_lists.copy()
)
self.spec_lists[user_speclist_name] = user_specs
- enable_view = env_configuration.get("view")
- # enable_view can be boolean, string, or None
- if enable_view is True or enable_view is None:
- self.views = {default_view_name: ViewDescriptor(self.path, self.view_path_default)}
- elif isinstance(enable_view, str):
- self.views = {default_view_name: ViewDescriptor(self.path, enable_view)}
- elif enable_view:
- path = self.path
- self.views = dict(
- (name, ViewDescriptor.from_dict(path, values))
- for name, values in enable_view.items()
- )
- else:
- self.views = {}
+ self._process_view(spack.config.get("view", True))
+ self._process_concrete_includes()
+
+ def all_concretized_user_specs(self) -> List[Spec]:
+ """Returns all of the concretized user specs of the environment and
+ its included environment(s)."""
+ concretized_user_specs = self.concretized_user_specs[:]
+ for included_specs in self.included_concretized_user_specs.values():
+ for included in included_specs:
+ # Don't duplicate included spec(s)
+ if included not in concretized_user_specs:
+ concretized_user_specs.append(included)
+
+ return concretized_user_specs
+
+ def all_concretized_orders(self) -> List[str]:
+ """Returns all of the concretized order of the environment and
+ its included environment(s)."""
+ concretized_order = self.concretized_order[:]
+ for included_concretized_order in self.included_concretized_order.values():
+ for included in included_concretized_order:
+ # Don't duplicate included spec(s)
+ if included not in concretized_order:
+ concretized_order.append(included)
+
+ return concretized_order
@property
def user_specs(self):
@@ -917,45 +1127,53 @@ class Environment:
dev_specs[name] = local_entry
return dev_specs
+ @property
+ def included_user_specs(self) -> SpecList:
+ """Included concrete user (or root) specs from last concretization."""
+ spec_list = SpecList()
+
+ if not self.included_concrete_envs:
+ return spec_list
+
+ def add_root_specs(included_concrete_specs):
+ # add specs from the include *and* any nested includes it may have
+ for env, info in included_concrete_specs.items():
+ for root_list in info["roots"]:
+ spec_list.add(root_list["spec"])
+
+ if "include_concrete" in info:
+ add_root_specs(info["include_concrete"])
+
+ add_root_specs(self.included_concrete_spec_data)
+ return spec_list
+
def clear(self, re_read=False):
"""Clear the contents of the environment
Arguments:
- 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.
+ re_read: If ``True``, do not clear ``new_specs``. This value cannot be read from yaml,
+ and needs to be maintained when re-reading an existing environment.
"""
self.spec_lists = collections.OrderedDict()
self.spec_lists[user_speclist_name] = SpecList()
self._dev_specs = {}
- self.concretized_user_specs = [] # user specs from last concretize
self.concretized_order = [] # roots of last concretize, in order
+ self.concretized_user_specs = [] # user specs from last concretize
self.specs_by_hash = {} # concretized specs by hash
+
+ self.included_concrete_spec_data = {} # concretized specs from lockfile of included envs
+ self.included_concretized_order = {} # root specs of the included envs, keyed by env path
+ self.included_concretized_user_specs = {} # user specs from last concretize's included env
+ self.included_specs_by_hash = {} # concretized specs by hash from the included envs
+
self.invalidate_repository_cache()
self._previous_active = None # previously active environment
if not re_read:
# things that cannot be recreated from file
self.new_specs = [] # write packages for these on write()
- self.new_installs = [] # write modules for these on write()
- @property
- def internal(self):
- """Whether this environment is managed by Spack."""
- return self.path.startswith(env_root_path())
-
- @property
- def name(self):
- """Human-readable representation of the environment.
-
- This is the path for directory environments, and just the name
- for managed environments.
- """
- if self.internal:
- return os.path.basename(self.path)
- else:
- return self.path
+ self.manifest.clear()
@property
def active(self):
@@ -985,22 +1203,8 @@ class Environment:
return self.lock_path + ".backup.v1"
@property
- def env_subdir_path(self):
- """Path to directory where the env stores repos, logs, views."""
- return os.path.join(self.path, env_subdir_name)
-
- @property
def repos_path(self):
- return os.path.join(self.path, env_subdir_name, "repos")
-
- @property
- def log_path(self):
- return os.path.join(self.path, env_subdir_name, "logs")
-
- @property
- def config_stage_dir(self):
- """Directory for any staged configuration file(s)."""
- return os.path.join(self.env_subdir_path, "config")
+ return os.path.join(self.env_subdir_path, "repos")
@property
def view_path_default(self):
@@ -1013,122 +1217,47 @@ class Environment:
self._repo = make_repo_path(self.repos_path)
return self._repo
- def included_config_scopes(self):
- """List of included configuration scopes from the environment.
-
- Scopes are listed in the YAML file in order from highest to
- lowest precedence, so configuration from earlier scope will take
- precedence over later ones.
-
- This routine returns them in the order they should be pushed onto
- the internal scope stack (so, in reverse, from lowest to highest).
- """
- scopes = []
-
- # load config scopes added via 'include:', in reverse so that
- # highest-precedence scopes are last.
- includes = self.manifest[TOP_LEVEL_KEY].get("include", [])
- missing = []
- for i, config_path in enumerate(reversed(includes)):
- # allow paths to contain spack config/environment variables, etc.
- config_path = substitute_path_variables(config_path)
-
- include_url = urllib.parse.urlparse(config_path)
-
- # Transform file:// URLs to direct includes.
- if include_url.scheme == "file":
- config_path = urllib.request.url2pathname(include_url.path)
-
- # Any other URL should be fetched.
- elif include_url.scheme in ("http", "https", "ftp"):
- # Stage any remote configuration file(s)
- staged_configs = (
- os.listdir(self.config_stage_dir)
- if os.path.exists(self.config_stage_dir)
- else []
- )
- remote_path = urllib.request.url2pathname(include_url.path)
- basename = os.path.basename(remote_path)
- if basename in staged_configs:
- # Do NOT re-stage configuration files over existing
- # ones with the same name since there is a risk of
- # losing changes (e.g., from 'spack config update').
- tty.warn(
- "Will not re-stage configuration from {0} to avoid "
- "losing changes to the already staged file of the "
- "same name.".format(remote_path)
- )
-
- # Recognize the configuration stage directory
- # is flattened to ensure a single copy of each
- # configuration file.
- config_path = self.config_stage_dir
- if basename.endswith(".yaml"):
- config_path = os.path.join(config_path, basename)
- else:
- staged_path = spack.config.fetch_remote_configs(
- config_path, self.config_stage_dir, skip_existing=True
- )
- if not staged_path:
- raise SpackEnvironmentError(
- "Unable to fetch remote configuration {0}".format(config_path)
- )
- config_path = staged_path
-
- elif include_url.scheme:
- raise ValueError(
- f"Unsupported URL scheme ({include_url.scheme}) for "
- f"environment include: {config_path}"
- )
-
- # treat relative paths as relative to the environment
- if not os.path.isabs(config_path):
- config_path = os.path.join(self.path, config_path)
- config_path = os.path.normpath(os.path.realpath(config_path))
-
- if os.path.isdir(config_path):
- # directories are treated as regular ConfigScopes
- config_name = "env:%s:%s" % (self.name, os.path.basename(config_path))
- tty.debug("Creating ConfigScope {0} for '{1}'".format(config_name, config_path))
- scope = spack.config.ConfigScope(config_name, config_path)
- elif os.path.exists(config_path):
- # files are assumed to be SingleFileScopes
- config_name = "env:%s:%s" % (self.name, config_path)
- tty.debug(
- "Creating SingleFileScope {0} for '{1}'".format(config_name, config_path)
- )
- scope = spack.config.SingleFileScope(
- config_name, config_path, spack.schema.merged.schema
- )
- else:
- missing.append(config_path)
- continue
-
- scopes.append(scope)
-
- if missing:
- msg = "Detected {0} missing include path(s):".format(len(missing))
- msg += "\n {0}".format("\n ".join(missing))
- raise spack.config.ConfigFileError(msg)
-
- return scopes
-
- def env_file_config_scope_name(self):
+ @property
+ def scope_name(self):
"""Name of the config scope of this environment's manifest file."""
- return "env:%s" % self.name
+ return self.manifest.scope_name
+
+ def include_concrete_envs(self):
+ """Copy and save the included envs' specs internally"""
+
+ root_hash_seen = set()
+ concrete_hash_seen = set()
+ self.included_concrete_spec_data = {}
+
+ for env_path in self.included_concrete_envs:
+ # Check that environment exists
+ if not is_env_dir(env_path):
+ raise SpackEnvironmentError(f"Unable to find env at {env_path}")
+
+ env = Environment(env_path)
+ self.included_concrete_spec_data[env_path] = {"roots": [], "concrete_specs": {}}
+
+ # Copy unique root specs from env
+ for root_dict in env._concrete_roots_dict():
+ if root_dict["hash"] not in root_hash_seen:
+ self.included_concrete_spec_data[env_path]["roots"].append(root_dict)
+ root_hash_seen.add(root_dict["hash"])
+
+ # Copy unique concrete specs from env
+ for dag_hash, spec_details in env._concrete_specs_dict().items():
+ if dag_hash not in concrete_hash_seen:
+ self.included_concrete_spec_data[env_path]["concrete_specs"].update(
+ {dag_hash: spec_details}
+ )
+ concrete_hash_seen.add(dag_hash)
- def env_file_config_scope(self):
- """Get the configuration scope for the environment's manifest file."""
- config_name = self.env_file_config_scope_name()
- return spack.config.SingleFileScope(
- config_name, self.manifest_path, spack.schema.env.schema, [TOP_LEVEL_KEY]
- )
+ # Copy transitive include data
+ transitive = env.included_concrete_spec_data
+ if transitive:
+ self.included_concrete_spec_data[env_path]["include_concrete"] = transitive
- def config_scopes(self):
- """A list of all configuration scopes for this environment."""
- return check_disallowed_env_config_mods(
- self.included_config_scopes() + [self.env_file_config_scope()]
- )
+ self._read_lockfile_dict(self._to_lockfile_dict())
+ self.write()
def destroy(self):
"""Remove this environment from Spack entirely."""
@@ -1228,7 +1357,7 @@ class Environment:
for idx, spec in matches:
override_spec = Spec.override(spec, change_spec)
- self.spec_lists[list_name].specs[idx] = override_spec
+ self.spec_lists[list_name].replace(idx, str(override_spec))
if list_name == user_speclist_name:
self.manifest.override_user_spec(str(override_spec), idx=idx)
else:
@@ -1236,7 +1365,6 @@ class Environment:
str(spec), override=str(override_spec), list_name=list_name
)
self.update_stale_references(from_list=list_name)
- self._construct_state_from_manifest()
def remove(self, query_spec, list_name=user_speclist_name, force=False):
"""Remove specs from an environment that match a query_spec"""
@@ -1330,6 +1458,10 @@ class Environment:
for spec in set(self.concretized_user_specs) - set(self.user_specs):
self.deconcretize(spec, concrete=False)
+ # If a combined env, check updated spec is in the linked envs
+ if self.included_concrete_envs:
+ self.include_concrete_envs()
+
# Pick the right concretization strategy
if self.unify == "when_possible":
return self._concretize_together_where_possible(tests=tests)
@@ -1376,7 +1508,7 @@ class Environment:
def _get_specs_to_concretize(
self,
- ) -> Tuple[Set[spack.spec.Spec], Set[spack.spec.Spec], List[spack.spec.Spec]]:
+ ) -> Tuple[List[spack.spec.Spec], List[spack.spec.Spec], List[SpecPair]]:
"""Compute specs to concretize for unify:true and unify:when_possible.
This includes new user specs and any already concretized specs.
@@ -1386,23 +1518,20 @@ class Environment:
"""
# Exit early if the set of concretized specs is the set of user specs
- new_user_specs = set(self.user_specs) - set(self.concretized_user_specs)
- kept_user_specs = set(self.user_specs) & set(self.concretized_user_specs)
+ new_user_specs = list(set(self.user_specs) - set(self.concretized_user_specs))
+ kept_user_specs = list(set(self.user_specs) & set(self.concretized_user_specs))
+ kept_user_specs += self.included_user_specs
if not new_user_specs:
return new_user_specs, kept_user_specs, []
- concrete_specs_to_keep = [
- concrete
+ specs_to_concretize = [(s, None) for s in new_user_specs] + [
+ (abstract, concrete)
for abstract, concrete in self.concretized_specs()
if abstract in kept_user_specs
]
-
- specs_to_concretize = list(new_user_specs) + concrete_specs_to_keep
return new_user_specs, kept_user_specs, specs_to_concretize
- def _concretize_together_where_possible(
- self, tests: bool = False
- ) -> List[Tuple[spack.spec.Spec, spack.spec.Spec]]:
+ def _concretize_together_where_possible(self, tests: bool = False) -> Sequence[SpecPair]:
# Avoid cyclic dependency
import spack.solver.asp
@@ -1411,36 +1540,26 @@ class Environment:
if not new_user_specs:
return []
- old_concrete_to_abstract = {
- concrete: abstract for (abstract, concrete) in self.concretized_specs()
- }
-
self.concretized_user_specs = []
self.concretized_order = []
self.specs_by_hash = {}
- result_by_user_spec = {}
- solver = spack.solver.asp.Solver()
- allow_deprecated = spack.config.get("config:deprecated", False)
- for result in solver.solve_in_rounds(
- specs_to_concretize, tests=tests, allow_deprecated=allow_deprecated
- ):
- result_by_user_spec.update(result.specs_by_input)
+ ret = []
+ result = spack.concretize.concretize_together_when_possible(
+ specs_to_concretize, tests=tests
+ )
+ for abstract, concrete in result:
+ # Only add to the environment if it's from this environment (not included in)
+ if abstract in self.user_specs:
+ self._add_concrete_spec(abstract, concrete)
- result = []
- for abstract, concrete in sorted(result_by_user_spec.items()):
- # If the "abstract" spec is a concrete spec from the previous concretization
- # translate it back to an abstract spec. Otherwise, keep the abstract spec
- abstract = old_concrete_to_abstract.get(abstract, abstract)
+ # Return only the new specs
if abstract in new_user_specs:
- result.append((abstract, concrete))
- self._add_concrete_spec(abstract, concrete)
+ ret.append((abstract, concrete))
- return result
+ return ret
- def _concretize_together(
- self, tests: bool = False
- ) -> List[Tuple[spack.spec.Spec, spack.spec.Spec]]:
+ def _concretize_together(self, tests: bool = False) -> Sequence[SpecPair]:
"""Concretization strategy that concretizes all the specs
in the same DAG.
"""
@@ -1454,8 +1573,8 @@ class Environment:
self.specs_by_hash = {}
try:
- concrete_specs: List[spack.spec.Spec] = spack.concretize.concretize_specs_together(
- *specs_to_concretize, tests=tests
+ concretized_specs = spack.concretize.concretize_together(
+ specs_to_concretize, tests=tests
)
except spack.error.UnsatisfiableSpecError as e:
# "Enhance" the error message for multiple root specs, suggest a less strict
@@ -1473,14 +1592,13 @@ class Environment:
)
raise
- # set() | set() does not preserve ordering, even though sets are ordered
- ordered_user_specs = list(new_user_specs) + list(kept_user_specs)
- concretized_specs = [x for x in zip(ordered_user_specs, concrete_specs)]
for abstract, concrete in concretized_specs:
- self._add_concrete_spec(abstract, concrete)
+ # Don't add if it's just included
+ if abstract in self.user_specs:
+ self._add_concrete_spec(abstract, concrete)
- # zip truncates the longer list, which is exactly what we want here
- return list(zip(new_user_specs, concrete_specs))
+ # Return the portion of the return value that is new
+ return concretized_specs[: len(new_user_specs)]
def _concretize_separately(self, tests=False):
"""Concretization strategy that concretizes separately one
@@ -1502,72 +1620,16 @@ class Environment:
concrete = old_specs_by_hash[h]
self._add_concrete_spec(s, concrete, new=False)
- # Concretize any new user specs that we haven't concretized yet
- args, root_specs, i = [], [], 0
- for uspec, uspec_constraints in zip(self.user_specs, self.user_specs.specs_as_constraints):
- if uspec not in old_concretized_user_specs:
- root_specs.append(uspec)
- args.append((i, [str(x) for x in uspec_constraints], tests))
- i += 1
-
- # Ensure we don't try to bootstrap clingo in parallel
- if spack.config.get("config:concretizer", "clingo") == "clingo":
- with spack.bootstrap.ensure_bootstrap_configuration():
- spack.bootstrap.ensure_core_dependencies()
-
- # Ensure all the indexes have been built or updated, since
- # otherwise the processes in the pool may timeout on waiting
- # for a write lock. We do this indirectly by retrieving the
- # provider index, which should in turn trigger the update of
- # all the indexes if there's any need for that.
- _ = spack.repo.PATH.provider_index
-
- # Ensure we have compilers in compilers.yaml to avoid that
- # processes try to write the config file in parallel
- _ = spack.compilers.get_compiler_config()
-
- # Early return if there is nothing to do
- if len(args) == 0:
- return []
-
- # Solve the environment in parallel on Linux
- start = time.time()
- num_procs = min(len(args), spack.util.cpus.determine_number_of_jobs(parallel=True))
-
- # TODO: support parallel concretization on macOS and Windows
- msg = "Starting concretization"
- if sys.platform not in ("darwin", "win32") and num_procs > 1:
- msg += f" pool with {num_procs} processes"
- tty.msg(msg)
-
- batch = []
- for j, (i, concrete, duration) in enumerate(
- spack.util.parallel.imap_unordered(
- _concretize_task,
- args,
- processes=num_procs,
- debug=tty.is_debug(),
- maxtaskperchild=1,
- )
- ):
- batch.append((i, concrete))
- percentage = (j + 1) / len(args) * 100
- tty.verbose(
- f"{duration:6.1f}s [{percentage:3.0f}%] {concrete.cformat('{hash:7}')} "
- f"{root_specs[i].colored_str}"
- )
- sys.stdout.flush()
+ to_concretize = [
+ (root, None) for root in self.user_specs if root not in old_concretized_user_specs
+ ]
+ concretized_specs = spack.concretize.concretize_separately(to_concretize, tests=tests)
- # Add specs in original order
- batch.sort(key=lambda x: x[0])
- by_hash = {} # for attaching information on test dependencies
- for root, (_, concrete) in zip(root_specs, batch):
- self._add_concrete_spec(root, concrete)
+ by_hash = {}
+ for abstract, concrete in concretized_specs:
+ self._add_concrete_spec(abstract, concrete)
by_hash[concrete.dag_hash()] = concrete
- finish = time.time()
- tty.msg(f"Environment concretized in {finish - start:.2f} seconds")
-
# Unify the specs objects, so we get correct references to all parents
self._read_lockfile_dict(self._to_lockfile_dict())
@@ -1587,49 +1649,7 @@ class Environment:
test_dependency.copy(), depflag=dt.TEST, virtuals=current_edge.virtuals
)
- results = [
- (abstract, self.specs_by_hash[h])
- for abstract, h in zip(self.concretized_user_specs, self.concretized_order)
- ]
- return results
-
- def concretize_and_add(self, user_spec, concrete_spec=None, tests=False):
- """Concretize and add a single spec to the environment.
-
- Concretize the provided ``user_spec`` and add it along with the
- concretized result to the environment. If the given ``user_spec`` was
- already present in the environment, this does not add a duplicate.
- The concretized spec will be added unless the ``user_spec`` was
- already present and an associated concrete spec was already present.
-
- Args:
- concrete_spec: if provided, then it is assumed that it is the
- result of concretizing the provided ``user_spec``
- """
- if self.unify is True:
- msg = (
- "cannot install a single spec in an environment that is "
- "configured to be concretized together. Run instead:\n\n"
- " $ spack add <spec>\n"
- " $ spack install\n"
- )
- raise SpackEnvironmentError(msg)
-
- spec = Spec(user_spec)
-
- if self.add(spec):
- concrete = concrete_spec or spec.concretized(tests=tests)
- self._add_concrete_spec(spec, concrete)
- else:
- # spec might be in the user_specs, but not installed.
- # TODO: Redo name-based comparison for old style envs
- spec = next(s for s in self.user_specs if s.satisfies(user_spec))
- concrete = self.specs_by_hash.get(spec.dag_hash())
- if not concrete:
- concrete = spec.concretized(tests=tests)
- self._add_concrete_spec(spec, concrete)
-
- return concrete
+ return concretized_specs
@property
def default_view(self):
@@ -1807,8 +1827,8 @@ class Environment:
self.concretized_order.append(h)
self.specs_by_hash[h] = concrete
- def _get_overwrite_specs(self):
- # Find all dev specs that were modified.
+ def _dev_specs_that_need_overwrite(self):
+ """Return the hashes of all specs that need to be reinstalled due to source code change."""
changed_dev_specs = [
s
for s in traverse.traverse_nodes(
@@ -1833,21 +1853,6 @@ class Environment:
if depth == 0 or spec.installed
]
- def _install_log_links(self, spec):
- if not spec.external:
- # Make sure log directory exists
- log_path = self.log_path
- fs.mkdirp(log_path)
-
- with fs.working_dir(self.path):
- # Link the resulting log file into logs dir
- build_log_link = os.path.join(
- log_path, "%s-%s.log" % (spec.name, spec.dag_hash(7))
- )
- if os.path.lexists(build_log_link):
- os.remove(build_log_link)
- symlink(spec.package.build_log_path, build_log_link)
-
def _partition_roots_by_install_status(self):
"""Partition root specs into those that do not have to be passed to the
installer, and those that should be, taking into account development
@@ -1855,8 +1860,14 @@ class Environment:
of per spec."""
installed, uninstalled = [], []
with spack.store.STORE.db.read_transaction():
- for concretized_hash in self.concretized_order:
- spec = self.specs_by_hash[concretized_hash]
+ for concretized_hash in self.all_concretized_orders():
+ if concretized_hash in self.specs_by_hash:
+ spec = self.specs_by_hash[concretized_hash]
+ else:
+ for env_path in self.included_specs_by_hash.keys():
+ if concretized_hash in self.included_specs_by_hash[env_path]:
+ spec = self.included_specs_by_hash[env_path][concretized_hash]
+ break
if not spec.installed or (
spec.satisfies("dev_path=*") or spec.satisfies("^dev_path=*")
):
@@ -1881,58 +1892,23 @@ class Environment:
"""
self.install_specs(None, **install_args)
- def install_specs(self, specs=None, **install_args):
- tty.debug("Assessing installation status of environment packages")
- # If "spack install" is invoked repeatedly for a large environment
- # where all specs are already installed, the operation can take
- # a large amount of time due to repeatedly acquiring and releasing
- # locks. As a small optimization, drop already installed root specs.
- installed_roots, uninstalled_roots = self._partition_roots_by_install_status()
- if specs:
- specs_to_install = [s for s in specs if s not in installed_roots]
- specs_dropped = [s for s in specs if s in installed_roots]
- else:
- specs_to_install = uninstalled_roots
- specs_dropped = installed_roots
-
- # We need to repeat the work of the installer thanks to the above optimization:
- # Already installed root specs should be marked explicitly installed in the
- # database.
- if specs_dropped:
- with spack.store.STORE.db.write_transaction(): # do all in one transaction
- for spec in specs_dropped:
- spack.store.STORE.db.update_explicit(spec, True)
-
- if not specs_to_install:
- tty.msg("All of the packages are already installed")
- else:
- tty.debug("Processing {0} uninstalled specs".format(len(specs_to_install)))
-
- specs_to_overwrite = self._get_overwrite_specs()
- tty.debug("{0} specs need to be overwritten".format(len(specs_to_overwrite)))
+ def install_specs(self, specs: Optional[List[Spec]] = None, **install_args):
+ roots = self.concrete_roots()
+ specs = specs if specs is not None else roots
- install_args["overwrite"] = install_args.get("overwrite", []) + specs_to_overwrite
+ # Extend the set of specs to overwrite with modified dev specs and their parents
+ install_args["overwrite"] = {
+ *install_args.get("overwrite", ()),
+ *self._dev_specs_that_need_overwrite(),
+ }
- installs = []
- for spec in specs_to_install:
- pkg_install_args = install_args.copy()
- pkg_install_args["explicit"] = spec in self.roots()
- installs.append((spec.package, pkg_install_args))
+ # Only environment roots are marked explicit
+ install_args["explicit"] = {
+ *install_args.get("explicit", ()),
+ *(s.dag_hash() for s in roots),
+ }
- try:
- builder = PackageInstaller(installs)
- builder.install()
- finally:
- # Ensure links are set appropriately
- for spec in specs_to_install:
- if spec.installed:
- self.new_installs.append(spec)
- try:
- self._install_log_links(spec)
- except OSError as e:
- tty.warn(
- "Could not install log links for {0}: {1}".format(spec.name, str(e))
- )
+ PackageInstaller([spec.package for spec in specs], **install_args).install()
def all_specs_generator(self) -> Iterable[Spec]:
"""Returns a generator for all concrete specs"""
@@ -1976,8 +1952,14 @@ class Environment:
def concretized_specs(self):
"""Tuples of (user spec, concrete spec) for all concrete specs."""
- for s, h in zip(self.concretized_user_specs, self.concretized_order):
- yield (s, self.specs_by_hash[h])
+ for s, h in zip(self.all_concretized_user_specs(), self.all_concretized_orders()):
+ if h in self.specs_by_hash:
+ yield (s, self.specs_by_hash[h])
+ else:
+ for env_path in self.included_specs_by_hash.keys():
+ if h in self.included_specs_by_hash[env_path]:
+ yield (s, self.included_specs_by_hash[env_path][h])
+ break
def concrete_roots(self):
"""Same as concretized_specs, except it returns the list of concrete
@@ -2106,8 +2088,7 @@ class Environment:
If these specs appear under different user_specs, only one copy
is added to the list returned.
"""
- specs = [self.specs_by_hash[h] for h in self.concretized_order]
-
+ specs = [self.specs_by_hash[h] for h in self.all_concretized_orders()]
if recurse_dependencies:
specs.extend(
traverse.traverse_nodes(
@@ -2117,8 +2098,7 @@ class Environment:
return specs
- def _to_lockfile_dict(self):
- """Create a dictionary to store a lockfile for this environment."""
+ def _concrete_specs_dict(self):
concrete_specs = {}
for s in traverse.traverse_nodes(self.specs_by_hash.values(), key=traverse.by_dag_hash):
spec_dict = s.node_dict_with_hashes(hash=ht.dag_hash)
@@ -2126,10 +2106,25 @@ class Environment:
spec_dict[ht.dag_hash.name] = s.dag_hash()
concrete_specs[s.dag_hash()] = spec_dict
+ if s.build_spec is not s:
+ for d in s.build_spec.traverse():
+ build_spec_dict = d.node_dict_with_hashes(hash=ht.dag_hash)
+ build_spec_dict[ht.dag_hash.name] = d.dag_hash()
+ concrete_specs[d.dag_hash()] = build_spec_dict
+
+ return concrete_specs
+
+ def _concrete_roots_dict(self):
hash_spec_list = zip(self.concretized_order, self.concretized_user_specs)
+ return [{"hash": h, "spec": str(s)} for h, s in hash_spec_list]
+
+ def _to_lockfile_dict(self):
+ """Create a dictionary to store a lockfile for this environment."""
+ concrete_specs = self._concrete_specs_dict()
+ root_specs = self._concrete_roots_dict()
spack_dict = {"version": spack.spack_version}
- spack_commit = spack.main.get_spack_commit()
+ spack_commit = spack.get_spack_commit()
if spack_commit:
spack_dict["type"] = "git"
spack_dict["commit"] = spack_commit
@@ -2147,36 +2142,81 @@ class Environment:
# spack version information
"spack": spack_dict,
# users specs + hashes are the 'roots' of the environment
- "roots": [{"hash": h, "spec": str(s)} for h, s in hash_spec_list],
+ "roots": root_specs,
# Concrete specs by hash, including dependencies
"concrete_specs": concrete_specs,
}
+ if self.included_concrete_envs:
+ data[included_concrete_name] = self.included_concrete_spec_data
+
return data
def _read_lockfile(self, file_or_json):
"""Read a lockfile from a file or from a raw string."""
lockfile_dict = sjson.load(file_or_json)
self._read_lockfile_dict(lockfile_dict)
- return lockfile_dict["_meta"]["lockfile-version"]
+ return lockfile_dict
+
+ def set_included_concretized_user_specs(
+ self,
+ env_name: str,
+ env_info: Dict[str, Dict[str, Any]],
+ included_json_specs_by_hash: Dict[str, Dict[str, Any]],
+ ) -> Dict[str, Dict[str, Any]]:
+ """Sets all of the concretized user specs from included environments
+ to include those from nested included environments.
+
+ Args:
+ env_name: the name (technically the path) of the included environment
+ env_info: included concrete environment data
+ included_json_specs_by_hash: concrete spec data keyed by hash
+
+ Returns: updated specs_by_hash
+ """
+ self.included_concretized_order[env_name] = []
+ self.included_concretized_user_specs[env_name] = []
+
+ def add_specs(name, info, specs_by_hash):
+ # Add specs from the environment as well as any of its nested
+ # environments.
+ for root_info in info["roots"]:
+ self.included_concretized_order[name].append(root_info["hash"])
+ self.included_concretized_user_specs[name].append(Spec(root_info["spec"]))
+ if "concrete_specs" in info:
+ specs_by_hash.update(info["concrete_specs"])
+
+ if included_concrete_name in info:
+ for included_name, included_info in info[included_concrete_name].items():
+ if included_name not in self.included_concretized_order:
+ self.included_concretized_order[included_name] = []
+ self.included_concretized_user_specs[included_name] = []
+ add_specs(included_name, included_info, specs_by_hash)
+
+ add_specs(env_name, env_info, included_json_specs_by_hash)
+ return included_json_specs_by_hash
def _read_lockfile_dict(self, d):
"""Read a lockfile dictionary into this environment."""
self.specs_by_hash = {}
+ self.included_specs_by_hash = {}
+ self.included_concretized_user_specs = {}
+ self.included_concretized_order = {}
roots = d["roots"]
self.concretized_user_specs = [Spec(r["spec"]) for r in roots]
self.concretized_order = [r["hash"] for r in roots]
json_specs_by_hash = d["concrete_specs"]
+ included_json_specs_by_hash = {}
- # Track specs by their lockfile key. Currently spack uses the finest
- # grained hash as the lockfile key, while older formats used the build
- # hash or a previous incarnation of the DAG hash (one that did not
- # include build deps or package hash).
- specs_by_hash = {}
+ if included_concrete_name in d:
+ for env_name, env_info in d[included_concrete_name].items():
+ included_json_specs_by_hash.update(
+ self.set_included_concretized_user_specs(
+ env_name, env_info, included_json_specs_by_hash
+ )
+ )
- # Track specs by their DAG hash, allows handling DAG hash collisions
- first_seen = {}
current_lockfile_format = d["_meta"]["lockfile-version"]
try:
reader = READER_CLS[current_lockfile_format]
@@ -2189,6 +2229,39 @@ class Environment:
msg += " You need to use a newer Spack version."
raise SpackEnvironmentError(msg)
+ first_seen, self.concretized_order = self.filter_specs(
+ reader, json_specs_by_hash, self.concretized_order
+ )
+
+ for spec_dag_hash in self.concretized_order:
+ self.specs_by_hash[spec_dag_hash] = first_seen[spec_dag_hash]
+
+ if any(self.included_concretized_order.values()):
+ first_seen = {}
+
+ for env_name, concretized_order in self.included_concretized_order.items():
+ filtered_spec, self.included_concretized_order[env_name] = self.filter_specs(
+ reader, included_json_specs_by_hash, concretized_order
+ )
+ first_seen.update(filtered_spec)
+
+ for env_path, spec_hashes in self.included_concretized_order.items():
+ self.included_specs_by_hash[env_path] = {}
+ for spec_dag_hash in spec_hashes:
+ self.included_specs_by_hash[env_path].update(
+ {spec_dag_hash: first_seen[spec_dag_hash]}
+ )
+
+ def filter_specs(self, reader, json_specs_by_hash, order_concretized):
+ # Track specs by their lockfile key. Currently spack uses the finest
+ # grained hash as the lockfile key, while older formats used the build
+ # hash or a previous incarnation of the DAG hash (one that did not
+ # include build deps or package hash).
+ specs_by_hash = {}
+
+ # Track specs by their DAG hash, allows handling DAG hash collisions
+ first_seen = {}
+
# First pass: Put each spec in the map ignoring dependencies
for lockfile_key, node_dict in json_specs_by_hash.items():
spec = reader.from_node_dict(node_dict)
@@ -2198,7 +2271,7 @@ class Environment:
specs_by_hash[lockfile_key] = spec
# Second pass: For each spec, get its dependencies from the node dict
- # and add them to the spec
+ # and add them to the spec, including build specs
for lockfile_key, node_dict in json_specs_by_hash.items():
name, data = reader.name_and_data(node_dict)
for _, dep_hash, deptypes, _, virtuals in reader.dependencies_from_node_dict(data):
@@ -2206,12 +2279,17 @@ class Environment:
specs_by_hash[dep_hash], depflag=dt.canonicalize(deptypes), virtuals=virtuals
)
+ if "build_spec" in node_dict:
+ _, bhash, _ = reader.extract_build_spec_info_from_node_dict(node_dict)
+ specs_by_hash[lockfile_key]._build_spec = specs_by_hash[bhash]
+
# Traverse the root specs one at a time in the order they appear.
# The first time we see each DAG hash, that's the one we want to
# keep. This is only required as long as we support older lockfile
# formats where the mapping from DAG hash to lockfile key is possibly
# one-to-many.
- for lockfile_key in self.concretized_order:
+
+ for lockfile_key in order_concretized:
for s in specs_by_hash[lockfile_key].traverse():
if s.dag_hash() not in first_seen:
first_seen[s.dag_hash()] = s
@@ -2219,12 +2297,10 @@ class Environment:
# Now make sure concretized_order and our internal specs dict
# contains the keys used by modern spack (i.e. the dag_hash
# that includes build deps and package hash).
- self.concretized_order = [
- specs_by_hash[h_key].dag_hash() for h_key in self.concretized_order
- ]
- for spec_dag_hash in self.concretized_order:
- self.specs_by_hash[spec_dag_hash] = first_seen[spec_dag_hash]
+ order_concretized = [specs_by_hash[h_key].dag_hash() for h_key in order_concretized]
+
+ return first_seen, order_concretized
def write(self, regenerate: bool = True) -> None:
"""Writes an in-memory environment to its location on disk.
@@ -2237,7 +2313,7 @@ class Environment:
regenerate: regenerate views and run post-write hooks as well as writing if True.
"""
self.manifest_uptodate_or_warn()
- if self.specs_by_hash:
+ if self.specs_by_hash or self.included_concrete_envs:
self.ensure_env_directory_exists(dot_env=True)
self.update_environment_repository()
self.manifest.flush()
@@ -2253,13 +2329,8 @@ class Environment:
if regenerate:
self.regenerate_views()
- spack.hooks.post_env_write(self)
- self._reset_new_specs_and_installs()
-
- def _reset_new_specs_and_installs(self) -> None:
- self.new_specs = []
- self.new_installs = []
+ self.new_specs.clear()
def update_lockfile(self) -> None:
with fs.write_tmp_and_move(self.lock_path) as f:
@@ -2368,81 +2439,26 @@ def _equiv_dict(first, second):
return same_values and same_keys_with_same_overrides
-def display_specs(concretized_specs):
- """Displays the list of specs returned by `Environment.concretize()`.
+def display_specs(specs):
+ """Displays a list of specs traversed breadth-first, covering nodes, with install status.
Args:
- concretized_specs (list): list of specs returned by
- `Environment.concretize()`
+ specs (list): list of specs
"""
-
- def _tree_to_display(spec):
- return spec.tree(
- recurse_dependencies=True,
- format=spack.spec.DISPLAY_FORMAT,
- status_fn=spack.spec.Spec.install_status,
- hashlen=7,
- hashes=True,
- )
-
- for user_spec, concrete_spec in concretized_specs:
- tty.msg("Concretized {0}".format(user_spec))
- sys.stdout.write(_tree_to_display(concrete_spec))
- print("")
-
-
-def _concretize_from_constraints(spec_constraints, tests=False):
- # Accept only valid constraints from list and concretize spec
- # Get the named spec even if out of order
- root_spec = [s for s in spec_constraints if s.name]
- if len(root_spec) != 1:
- m = "The constraints %s are not a valid spec " % spec_constraints
- m += "concretization target. all specs must have a single name "
- m += "constraint for concretization."
- raise InvalidSpecConstraintError(m)
- spec_constraints.remove(root_spec[0])
-
- invalid_constraints = []
- while True:
- # Attach all anonymous constraints to one named spec
- s = root_spec[0].copy()
- for c in spec_constraints:
- if c not in invalid_constraints:
- s.constrain(c)
- try:
- return s.concretized(tests=tests)
- except spack.spec.InvalidDependencyError as e:
- invalid_deps_string = ["^" + d for d in e.invalid_deps]
- invalid_deps = [
- c
- for c in spec_constraints
- if any(c.satisfies(invd) for invd in invalid_deps_string)
- ]
- if len(invalid_deps) != len(invalid_deps_string):
- raise e
- invalid_constraints.extend(invalid_deps)
- except UnknownVariantError as e:
- invalid_variants = e.unknown_variants
- inv_variant_constraints = [
- c for c in spec_constraints if any(name in c.variants for name in invalid_variants)
- ]
- if len(inv_variant_constraints) != len(invalid_variants):
- raise e
- invalid_constraints.extend(inv_variant_constraints)
-
-
-def _concretize_task(packed_arguments) -> Tuple[int, Spec, float]:
- index, spec_constraints, tests = packed_arguments
- spec_constraints = [Spec(x) for x in spec_constraints]
- with tty.SuppressOutput(msg_enabled=False):
- start = time.time()
- spec = _concretize_from_constraints(spec_constraints, tests)
- return index, spec, time.time() - start
+ tree_string = spack.spec.tree(
+ specs,
+ format=spack.spec.DISPLAY_FORMAT,
+ hashes=True,
+ hashlen=7,
+ status_fn=spack.spec.Spec.install_status,
+ key=traverse.by_dag_hash,
+ )
+ print(tree_string)
def make_repo_path(root):
"""Make a RepoPath from the repo subdirectories in an environment."""
- path = spack.repo.RepoPath()
+ path = spack.repo.RepoPath(cache=spack.caches.MISC_CACHE)
if os.path.isdir(root):
for repo_root in os.listdir(root):
@@ -2451,24 +2467,12 @@ def make_repo_path(root):
if not os.path.isdir(repo_root):
continue
- repo = spack.repo.Repo(repo_root)
+ repo = spack.repo.from_path(repo_root)
path.put_last(repo)
return path
-def prepare_config_scope(env):
- """Add env's scope to the global configuration search path."""
- for scope in env.config_scopes():
- spack.config.CONFIG.push_scope(scope)
-
-
-def deactivate_config_scope(env):
- """Remove any scopes from env from the global config path."""
- for scope in env.config_scopes():
- spack.config.CONFIG.remove_scope(scope.name)
-
-
def manifest_file(env_name_or_dir):
"""Return the absolute path to a manifest file given the environment
name or directory.
@@ -2647,8 +2651,9 @@ class EnvironmentManifestFile(collections.abc.Mapping):
already existing in the directory.
Args:
- manifest_dir: directory where the lockfile is
+ manifest_dir: directory containing the manifest and lockfile
"""
+ # TBD: Should this be the abspath?
manifest_dir = pathlib.Path(manifest_dir)
lockfile = manifest_dir / lockfile_name
with lockfile.open("r") as f:
@@ -2663,21 +2668,24 @@ class EnvironmentManifestFile(collections.abc.Mapping):
manifest.flush()
return manifest
- def __init__(self, manifest_dir: Union[pathlib.Path, str]) -> None:
+ def __init__(self, manifest_dir: Union[pathlib.Path, str], name: Optional[str] = None) -> None:
self.manifest_dir = pathlib.Path(manifest_dir)
+ self.name = name or str(manifest_dir)
self.manifest_file = self.manifest_dir / manifest_name
+ self.scope_name = f"env:{self.name}"
+ self.config_stage_dir = os.path.join(env_subdir_path(manifest_dir), "config")
+
+ #: Configuration scopes associated with this environment. Note that these are not
+ #: invalidated by a re-read of the manifest file.
+ self._config_scopes: Optional[List[spack.config.ConfigScope]] = None
if not self.manifest_file.exists():
msg = f"cannot find '{manifest_name}' in {self.manifest_dir}"
raise SpackEnvironmentError(msg)
with self.manifest_file.open() as f:
- raw, with_defaults_added = _read_yaml(f)
+ self.yaml_content = _read_yaml(f)
- #: Pristine YAML content, without defaults being added
- self.pristine_yaml_content = raw
- #: YAML content with defaults added by Spack, if they're missing
- self.yaml_content = with_defaults_added
self.changed = False
def _all_matches(self, user_spec: str) -> List[str]:
@@ -2691,7 +2699,7 @@ class EnvironmentManifestFile(collections.abc.Mapping):
ValueError: if no equivalent match is found
"""
result = []
- for yaml_spec_str in self.pristine_configuration["specs"]:
+ for yaml_spec_str in self.configuration["specs"]:
if Spec(yaml_spec_str) == Spec(user_spec):
result.append(yaml_spec_str)
@@ -2706,7 +2714,6 @@ class EnvironmentManifestFile(collections.abc.Mapping):
Args:
user_spec: user spec to be appended
"""
- self.pristine_configuration.setdefault("specs", []).append(user_spec)
self.configuration.setdefault("specs", []).append(user_spec)
self.changed = True
@@ -2721,13 +2728,17 @@ class EnvironmentManifestFile(collections.abc.Mapping):
"""
try:
for key in self._all_matches(user_spec):
- self.pristine_configuration["specs"].remove(key)
self.configuration["specs"].remove(key)
except ValueError as e:
msg = f"cannot remove {user_spec} from {self}, no such spec exists"
raise SpackEnvironmentError(msg) from e
self.changed = True
+ def clear(self) -> None:
+ """Clear all user specs from the list of root specs"""
+ self.configuration["specs"] = []
+ self.changed = True
+
def override_user_spec(self, user_spec: str, idx: int) -> None:
"""Overrides the user spec at index idx with the one passed as input.
@@ -2739,13 +2750,25 @@ class EnvironmentManifestFile(collections.abc.Mapping):
SpackEnvironmentError: when the user spec cannot be overridden
"""
try:
- self.pristine_configuration["specs"][idx] = user_spec
self.configuration["specs"][idx] = user_spec
except ValueError as e:
msg = f"cannot override {user_spec} from {self}"
raise SpackEnvironmentError(msg) from e
self.changed = True
+ def set_include_concrete(self, include_concrete: List[str]) -> None:
+ """Sets the included concrete environments in the manifest to the value(s) passed as input.
+
+ Args:
+ include_concrete: list of already existing concrete environments to include
+ """
+ self.configuration[included_concrete_name] = []
+
+ for env_path in include_concrete:
+ self.configuration[included_concrete_name].append(env_path)
+
+ self.changed = True
+
def add_definition(self, user_spec: str, list_name: str) -> None:
"""Appends a user spec to the first active definition matching the name passed as argument.
@@ -2756,14 +2779,13 @@ class EnvironmentManifestFile(collections.abc.Mapping):
Raises:
SpackEnvironmentError: is no valid definition exists already
"""
- defs = self.pristine_configuration.get("definitions", [])
+ defs = self.configuration.get("definitions", [])
msg = f"cannot add {user_spec} to the '{list_name}' definition, no valid list exists"
for idx, item in self._iterate_on_definitions(defs, list_name=list_name, err_msg=msg):
item[list_name].append(user_spec)
break
- self.configuration["definitions"][idx][list_name].append(user_spec)
self.changed = True
def remove_definition(self, user_spec: str, list_name: str) -> None:
@@ -2777,7 +2799,7 @@ class EnvironmentManifestFile(collections.abc.Mapping):
SpackEnvironmentError: if the user spec cannot be removed from the list,
or the list does not exist
"""
- defs = self.pristine_configuration.get("definitions", [])
+ defs = self.configuration.get("definitions", [])
msg = (
f"cannot remove {user_spec} from the '{list_name}' definition, "
f"no valid list exists"
@@ -2790,7 +2812,6 @@ class EnvironmentManifestFile(collections.abc.Mapping):
except ValueError:
pass
- self.configuration["definitions"][idx][list_name].remove(user_spec)
self.changed = True
def override_definition(self, user_spec: str, *, override: str, list_name: str) -> None:
@@ -2805,7 +2826,7 @@ class EnvironmentManifestFile(collections.abc.Mapping):
Raises:
SpackEnvironmentError: if the user spec cannot be overridden
"""
- defs = self.pristine_configuration.get("definitions", [])
+ defs = self.configuration.get("definitions", [])
msg = f"cannot override {user_spec} with {override} in the '{list_name}' definition"
for idx, item in self._iterate_on_definitions(defs, list_name=list_name, err_msg=msg):
@@ -2816,7 +2837,6 @@ class EnvironmentManifestFile(collections.abc.Mapping):
except ValueError:
pass
- self.configuration["definitions"][idx][list_name][sub_index] = override
self.changed = True
def _iterate_on_definitions(self, definitions, *, list_name, err_msg):
@@ -2848,7 +2868,6 @@ class EnvironmentManifestFile(collections.abc.Mapping):
True the default view is used for the environment, if False there's no view.
"""
if isinstance(view, dict):
- self.pristine_configuration["view"][default_view_name].update(view)
self.configuration["view"][default_view_name].update(view)
self.changed = True
return
@@ -2856,15 +2875,13 @@ class EnvironmentManifestFile(collections.abc.Mapping):
if not isinstance(view, bool):
view = str(view)
- self.pristine_configuration["view"] = view
self.configuration["view"] = view
self.changed = True
def remove_default_view(self) -> None:
"""Removes the default view from the manifest file"""
- view_data = self.pristine_configuration.get("view")
+ view_data = self.configuration.get("view")
if isinstance(view_data, collections.abc.Mapping):
- self.pristine_configuration["view"].pop(default_view_name)
self.configuration["view"].pop(default_view_name)
self.changed = True
return
@@ -2877,17 +2894,12 @@ class EnvironmentManifestFile(collections.abc.Mapping):
return
with fs.write_tmp_and_move(os.path.realpath(self.manifest_file)) as f:
- _write_yaml(self.pristine_yaml_content, f)
+ _write_yaml(self.yaml_content, f)
self.changed = False
@property
- def pristine_configuration(self):
- """Return the dictionaries in the pristine YAML, without the top level attribute"""
- return self.pristine_yaml_content[TOP_LEVEL_KEY]
-
- @property
def configuration(self):
- """Return the dictionaries in the YAML, without the top level attribute"""
+ """Return the dictionaries in the pristine YAML, without the top level attribute"""
return self.yaml_content[TOP_LEVEL_KEY]
def __len__(self):
@@ -2902,6 +2914,150 @@ class EnvironmentManifestFile(collections.abc.Mapping):
def __str__(self):
return str(self.manifest_file)
+ @property
+ def included_config_scopes(self) -> List[spack.config.ConfigScope]:
+ """List of included configuration scopes from the manifest.
+
+ Scopes are listed in the YAML file in order from highest to
+ lowest precedence, so configuration from earlier scope will take
+ precedence over later ones.
+
+ This routine returns them in the order they should be pushed onto
+ the internal scope stack (so, in reverse, from lowest to highest).
+
+ Returns: Configuration scopes associated with the environment manifest
+
+ Raises:
+ SpackEnvironmentError: if the manifest includes a remote file but
+ no configuration stage directory has been identified
+ """
+ scopes: List[spack.config.ConfigScope] = []
+
+ # load config scopes added via 'include:', in reverse so that
+ # highest-precedence scopes are last.
+ includes = self[TOP_LEVEL_KEY].get("include", [])
+ missing = []
+ for i, config_path in enumerate(reversed(includes)):
+ # allow paths to contain spack config/environment variables, etc.
+ config_path = substitute_path_variables(config_path)
+ include_url = urllib.parse.urlparse(config_path)
+
+ # If scheme is not valid, config_path is not a url
+ # of a type Spack is generally aware
+ if spack.util.url.validate_scheme(include_url.scheme):
+ # Transform file:// URLs to direct includes.
+ if include_url.scheme == "file":
+ config_path = urllib.request.url2pathname(include_url.path)
+
+ # Any other URL should be fetched.
+ elif include_url.scheme in ("http", "https", "ftp"):
+ # Stage any remote configuration file(s)
+ staged_configs = (
+ os.listdir(self.config_stage_dir)
+ if os.path.exists(self.config_stage_dir)
+ else []
+ )
+ remote_path = urllib.request.url2pathname(include_url.path)
+ basename = os.path.basename(remote_path)
+ if basename in staged_configs:
+ # Do NOT re-stage configuration files over existing
+ # ones with the same name since there is a risk of
+ # losing changes (e.g., from 'spack config update').
+ tty.warn(
+ "Will not re-stage configuration from {0} to avoid "
+ "losing changes to the already staged file of the "
+ "same name.".format(remote_path)
+ )
+
+ # Recognize the configuration stage directory
+ # is flattened to ensure a single copy of each
+ # configuration file.
+ config_path = self.config_stage_dir
+ if basename.endswith(".yaml"):
+ config_path = os.path.join(config_path, basename)
+ else:
+ staged_path = spack.config.fetch_remote_configs(
+ config_path, str(self.config_stage_dir), skip_existing=True
+ )
+ if not staged_path:
+ raise SpackEnvironmentError(
+ "Unable to fetch remote configuration {0}".format(config_path)
+ )
+ config_path = staged_path
+
+ elif include_url.scheme:
+ raise ValueError(
+ f"Unsupported URL scheme ({include_url.scheme}) for "
+ f"environment include: {config_path}"
+ )
+
+ # treat relative paths as relative to the environment
+ if not os.path.isabs(config_path):
+ config_path = os.path.join(self.manifest_dir, config_path)
+ config_path = os.path.normpath(os.path.realpath(config_path))
+
+ if os.path.isdir(config_path):
+ # directories are treated as regular ConfigScopes
+ config_name = f"env:{self.name}:{os.path.basename(config_path)}"
+ tty.debug(f"Creating DirectoryConfigScope {config_name} for '{config_path}'")
+ scopes.append(spack.config.DirectoryConfigScope(config_name, config_path))
+ elif os.path.exists(config_path):
+ # files are assumed to be SingleFileScopes
+ config_name = f"env:{self.name}:{config_path}"
+ tty.debug(f"Creating SingleFileScope {config_name} for '{config_path}'")
+ scopes.append(
+ spack.config.SingleFileScope(
+ config_name, config_path, spack.schema.merged.schema
+ )
+ )
+ else:
+ missing.append(config_path)
+ continue
+
+ if missing:
+ msg = "Detected {0} missing include path(s):".format(len(missing))
+ msg += "\n {0}".format("\n ".join(missing))
+ raise spack.config.ConfigFileError(msg)
+
+ return scopes
+
+ @property
+ def env_config_scopes(self) -> List[spack.config.ConfigScope]:
+ """A list of all configuration scopes for the environment manifest. On the first call this
+ instantiates all the scopes, on subsequent calls it returns the cached list."""
+ if self._config_scopes is not None:
+ return self._config_scopes
+ scopes: List[spack.config.ConfigScope] = [
+ *self.included_config_scopes,
+ spack.config.SingleFileScope(
+ self.scope_name,
+ str(self.manifest_file),
+ spack.schema.env.schema,
+ yaml_path=[TOP_LEVEL_KEY],
+ ),
+ ]
+ ensure_no_disallowed_env_config_mods(scopes)
+ self._config_scopes = scopes
+ return scopes
+
+ def prepare_config_scope(self) -> None:
+ """Add the manifest's scopes to the global configuration search path."""
+ for scope in self.env_config_scopes:
+ spack.config.CONFIG.push_scope(scope)
+
+ def deactivate_config_scope(self) -> None:
+ """Remove any of the manifest's scopes from the global config path."""
+ for scope in self.env_config_scopes:
+ spack.config.CONFIG.remove_scope(scope.name)
+
+ @contextlib.contextmanager
+ def use_config(self):
+ """Ensure only the manifest's configuration scopes are global."""
+ with no_active_environment():
+ self.prepare_config_scope()
+ yield
+ self.deactivate_config_scope()
+
class SpackEnvironmentError(spack.error.SpackError):
"""Superclass for all errors to do with Spack environments."""
diff --git a/lib/spack/spack/environment/shell.py b/lib/spack/spack/environment/shell.py
index b1d87a48fd..bb2dea04c0 100644
--- a/lib/spack/spack/environment/shell.py
+++ b/lib/spack/spack/environment/shell.py
@@ -48,8 +48,6 @@ def activate_header(env, shell, prompt=None, view: Optional[str] = None):
cmds += 'set "SPACK_ENV=%s"\n' % env.path
if view:
cmds += 'set "SPACK_ENV_VIEW=%s"\n' % view
- # TODO: despacktivate
- # TODO: prompt
elif shell == "pwsh":
cmds += "$Env:SPACK_ENV='%s'\n" % env.path
if view:
diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py
index 804dc6867b..b7c21b7341 100644
--- a/lib/spack/spack/error.py
+++ b/lib/spack/spack/error.py
@@ -12,6 +12,9 @@ import llnl.util.tty as tty
#: this is module-scoped because it needs to be set very early
debug = 0
+#: whether to show a backtrace when an error is printed, enabled with --backtrace.
+SHOW_BACKTRACE = False
+
class SpackError(Exception):
"""This is the superclass for all Spack errors.
@@ -132,3 +135,67 @@ class UnsatisfiableSpecError(SpecError):
class FetchError(SpackError):
"""Superclass for fetch-related errors."""
+
+
+class NoSuchPatchError(SpackError):
+ """Raised when a patch file doesn't exist."""
+
+
+class PatchDirectiveError(SpackError):
+ """Raised when the wrong arguments are suppled to the patch directive."""
+
+
+class PatchLookupError(NoSuchPatchError):
+ """Raised when a patch file cannot be located from sha256."""
+
+
+class SpecSyntaxError(Exception):
+ """Base class for Spec syntax errors"""
+
+
+class PackageError(SpackError):
+ """Raised when something is wrong with a package definition."""
+
+ def __init__(self, message, long_msg=None):
+ super().__init__(message, long_msg)
+
+
+class NoURLError(PackageError):
+ """Raised when someone tries to build a URL for a package with no URLs."""
+
+ def __init__(self, cls):
+ super().__init__("Package %s has no version with a URL." % cls.__name__)
+
+
+class InstallError(SpackError):
+ """Raised when something goes wrong during install or uninstall.
+
+ The error can be annotated with a ``pkg`` attribute to allow the
+ caller to get the package for which the exception was raised.
+ """
+
+ def __init__(self, message, long_msg=None, pkg=None):
+ super().__init__(message, long_msg)
+ self.pkg = pkg
+
+
+class ConfigError(SpackError):
+ """Superclass for all Spack config related errors."""
+
+
+class StopPhase(SpackError):
+ """Pickle-able exception to control stopped builds."""
+
+ def __reduce__(self):
+ return _make_stop_phase, (self.message, self.long_message)
+
+
+def _make_stop_phase(msg, long_msg):
+ return StopPhase(msg, long_msg)
+
+
+class MirrorError(SpackError):
+ """Superclass of all mirror-creation related errors."""
+
+ def __init__(self, msg, long_msg=None):
+ super().__init__(msg, long_msg)
diff --git a/lib/spack/spack/extensions.py b/lib/spack/spack/extensions.py
index b7b30e135c..af7766f098 100644
--- a/lib/spack/spack/extensions.py
+++ b/lib/spack/spack/extensions.py
@@ -5,13 +5,13 @@
"""Service functions and classes to implement the hooks
for Spack's command extensions.
"""
-import difflib
import glob
import importlib
import os
import re
import sys
import types
+from pathlib import Path
from typing import List
import llnl.util.lang
@@ -23,9 +23,6 @@ import spack.util.path
_extension_regexp = re.compile(r"spack-(\w[-\w]*)$")
-# TODO: For consistency we should use spack.cmd.python_name(), but
-# currently this would create a circular relationship between
-# spack.cmd and spack.extensions.
def _python_name(cmd_name):
return cmd_name.replace("-", "_")
@@ -132,10 +129,38 @@ def load_extension(name: str) -> str:
def get_extension_paths():
"""Return the list of canonicalized extension paths from config:extensions."""
extension_paths = spack.config.get("config:extensions") or []
+ extension_paths.extend(extension_paths_from_entry_points())
paths = [spack.util.path.canonicalize_path(p) for p in extension_paths]
return paths
+def extension_paths_from_entry_points() -> List[str]:
+ """Load extensions from a Python package's entry points.
+
+ A python package can register entry point metadata so that Spack can find
+ its extensions by adding the following to the project's pyproject.toml:
+
+ .. code-block:: toml
+
+ [project.entry-points."spack.extensions"]
+ baz = "baz:get_spack_extensions"
+
+ The function ``get_spack_extensions`` returns paths to the package's
+ spack extensions
+
+ """
+ extension_paths: List[str] = []
+ for entry_point in llnl.util.lang.get_entry_points(group="spack.extensions"):
+ hook = entry_point.load()
+ if callable(hook):
+ paths = hook() or []
+ if isinstance(paths, (Path, str)):
+ extension_paths.append(str(paths))
+ else:
+ extension_paths.extend(paths)
+ return extension_paths
+
+
def get_command_paths():
"""Return the list of paths where to search for command files."""
command_paths = []
@@ -181,8 +206,7 @@ def get_module(cmd_name):
module = load_command_extension(cmd_name, folder)
if module:
return module
- else:
- raise CommandNotFoundError(cmd_name)
+ return None
def get_template_dirs():
@@ -194,27 +218,6 @@ def get_template_dirs():
return extensions
-class CommandNotFoundError(spack.error.SpackError):
- """Exception class thrown when a requested command is not recognized as
- such.
- """
-
- def __init__(self, cmd_name):
- msg = (
- "{0} is not a recognized Spack command or extension command;"
- " check with `spack commands`.".format(cmd_name)
- )
- long_msg = None
-
- similar = difflib.get_close_matches(cmd_name, spack.cmd.all_commands())
-
- if 1 <= len(similar) <= 5:
- long_msg = "\nDid you mean one of the following commands?\n "
- long_msg += "\n ".join(similar)
-
- super().__init__(msg, long_msg)
-
-
class ExtensionNamingError(spack.error.SpackError):
"""Exception class thrown when a configured extension does not follow
the expected naming convention.
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 864fcddcc3..54e8a80b8a 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -24,12 +24,15 @@ in order to build it. They need to define the following methods:
"""
import copy
import functools
+import http.client
import os
import os.path
import re
import shutil
import urllib.error
import urllib.parse
+import urllib.request
+from pathlib import PurePath
from typing import List, Optional
import llnl.url
@@ -37,13 +40,13 @@ import llnl.util
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.string import comma_and, quote
-from llnl.util.filesystem import get_single_file, mkdirp, temp_cwd, temp_rename, working_dir
+from llnl.util.filesystem import get_single_file, mkdirp, temp_cwd, working_dir
from llnl.util.symlink import symlink
import spack.config
import spack.error
import spack.oci.opener
-import spack.url
+import spack.util.archive
import spack.util.crypto as crypto
import spack.util.git
import spack.util.url as url_util
@@ -51,24 +54,11 @@ import spack.util.web as web_util
import spack.version
import spack.version.git_ref_lookup
from spack.util.compression import decompressor_for
-from spack.util.executable import CommandNotFoundError, which
+from spack.util.executable import CommandNotFoundError, Executable, which
#: List of all fetch strategies, created by FetchStrategy metaclass.
all_strategies = []
-CONTENT_TYPE_MISMATCH_WARNING_TEMPLATE = (
- "The contents of {subject} look like {content_type}. Either the URL"
- " you are trying to use does not exist or you have an internet gateway"
- " issue. You can remove the bad archive using 'spack clean"
- " <package>', then try again using the correct URL."
-)
-
-
-def warn_content_type_mismatch(subject, content_type="HTML"):
- tty.warn(
- CONTENT_TYPE_MISMATCH_WARNING_TEMPLATE.format(subject=subject, content_type=content_type)
- )
-
def _needs_stage(fun):
"""Many methods on fetch strategies require a stage to be set
@@ -243,38 +233,31 @@ class URLFetchStrategy(FetchStrategy):
# these are checksum types. The generic 'checksum' is deprecated for
# specific hash names, but we need it for backward compatibility
- optional_attrs = list(crypto.hashes.keys()) + ["checksum"]
+ optional_attrs = [*crypto.hashes.keys(), "checksum"]
- def __init__(self, url=None, checksum=None, **kwargs):
+ def __init__(self, *, url: str, checksum: Optional[str] = None, **kwargs) -> None:
super().__init__(**kwargs)
- # Prefer values in kwargs to the positionals.
- self.url = kwargs.get("url", url)
+ self.url = url
self.mirrors = kwargs.get("mirrors", [])
# digest can be set as the first argument, or from an explicit
# kwarg by the hash name.
- self.digest = kwargs.get("checksum", checksum)
+ self.digest: Optional[str] = checksum
for h in self.optional_attrs:
if h in kwargs:
self.digest = kwargs[h]
- self.expand_archive = kwargs.get("expand", True)
- self.extra_options = kwargs.get("fetch_options", {})
- self._curl = None
-
- self.extension = kwargs.get("extension", None)
-
- if not self.url:
- raise ValueError("URLFetchStrategy requires a url for fetching.")
+ self.expand_archive: bool = kwargs.get("expand", True)
+ self.extra_options: dict = kwargs.get("fetch_options", {})
+ self._curl: Optional[Executable] = None
+ self.extension: Optional[str] = kwargs.get("extension", None)
+ self._effective_url: Optional[str] = None
@property
- def curl(self):
+ def curl(self) -> Executable:
if not self._curl:
- try:
- self._curl = which("curl", required=True)
- except CommandNotFoundError as exc:
- tty.error(str(exc))
+ self._curl = web_util.require_curl()
return self._curl
def source_id(self):
@@ -295,27 +278,23 @@ class URLFetchStrategy(FetchStrategy):
@_needs_stage
def fetch(self):
if self.archive_file:
- tty.debug("Already downloaded {0}".format(self.archive_file))
+ tty.debug(f"Already downloaded {self.archive_file}")
return
- url = None
- errors = []
+ errors: List[Exception] = []
for url in self.candidate_urls:
- if not web_util.url_exists(url):
- tty.debug("URL does not exist: " + url)
- continue
-
try:
self._fetch_from_url(url)
break
except FailedDownloadError as e:
- errors.append(str(e))
-
- for msg in errors:
- tty.debug(msg)
+ errors.extend(e.exceptions)
+ else:
+ raise FailedDownloadError(*errors)
if not self.archive_file:
- raise FailedDownloadError(url)
+ raise FailedDownloadError(
+ RuntimeError(f"Missing archive {self.archive_file} after fetching")
+ )
def _fetch_from_url(self, url):
if spack.config.get("config:url_fetch_method") == "curl":
@@ -329,32 +308,45 @@ class URLFetchStrategy(FetchStrategy):
# redirects properly.
content_types = re.findall(r"Content-Type:[^\r\n]+", headers, flags=re.IGNORECASE)
if content_types and "text/html" in content_types[-1]:
- warn_content_type_mismatch(self.archive_file or "the archive")
+ msg = (
+ f"The contents of {self.archive_file or 'the archive'} fetched from {self.url} "
+ " looks like HTML. This can indicate a broken URL, or an internet gateway issue."
+ )
+ if self._effective_url != self.url:
+ msg += f" The URL redirected to {self._effective_url}."
+ tty.warn(msg)
@_needs_stage
def _fetch_urllib(self, url):
save_file = self.stage.save_filename
- tty.msg("Fetching {0}".format(url))
- # Run urllib but grab the mime type from the http headers
+ request = urllib.request.Request(url, headers={"User-Agent": web_util.SPACK_USER_AGENT})
+
try:
- url, headers, response = web_util.read_from_url(url)
- except web_util.SpackWebError as e:
+ response = web_util.urlopen(request)
+ except (TimeoutError, urllib.error.URLError) as e:
# clean up archive on failure.
if self.archive_file:
os.remove(self.archive_file)
if os.path.lexists(save_file):
os.remove(save_file)
- msg = "urllib failed to fetch with error {0}".format(e)
- raise FailedDownloadError(url, msg)
+ raise FailedDownloadError(e) from e
+
+ tty.msg(f"Fetching {url}")
if os.path.lexists(save_file):
os.remove(save_file)
- with open(save_file, "wb") as _open_file:
- shutil.copyfileobj(response, _open_file)
+ with open(save_file, "wb") as f:
+ shutil.copyfileobj(response, f)
+
+ # Save the redirected URL for error messages. Sometimes we're redirected to an arbitrary
+ # mirror that is broken, leading to spurious download failures. In that case it's helpful
+ # for users to know which URL was actually fetched.
+ if isinstance(response, http.client.HTTPResponse):
+ self._effective_url = response.geturl()
- self._check_headers(str(headers))
+ self._check_headers(str(response.headers))
@_needs_stage
def _fetch_curl(self, url):
@@ -363,7 +355,7 @@ class URLFetchStrategy(FetchStrategy):
if self.stage.save_filename:
save_file = self.stage.save_filename
partial_file = self.stage.save_filename + ".part"
- tty.msg("Fetching {0}".format(url))
+ tty.msg(f"Fetching {url}")
if partial_file:
save_args = [
"-C",
@@ -403,8 +395,8 @@ class URLFetchStrategy(FetchStrategy):
try:
web_util.check_curl_code(curl.returncode)
- except spack.error.FetchError as err:
- raise spack.fetch_strategy.FailedDownloadError(url, str(err))
+ except spack.error.FetchError as e:
+ raise FailedDownloadError(e) from e
self._check_headers(headers)
@@ -471,9 +463,9 @@ class URLFetchStrategy(FetchStrategy):
"""Check the downloaded archive against a checksum digest.
No-op if this stage checks code out of a repository."""
if not self.digest:
- raise NoDigestError("Attempt to check URLFetchStrategy with no digest.")
+ raise NoDigestError(f"Attempt to check {self.__class__.__name__} with no digest.")
- verify_checksum(self.archive_file, self.digest)
+ verify_checksum(self.archive_file, self.digest, self.url, self._effective_url)
@_needs_stage
def reset(self):
@@ -482,8 +474,8 @@ class URLFetchStrategy(FetchStrategy):
"""
if not self.archive_file:
raise NoArchiveFileError(
- "Tried to reset URLFetchStrategy before fetching",
- "Failed on reset() for URL %s" % self.url,
+ f"Tried to reset {self.__class__.__name__} before fetching",
+ f"Failed on reset() for URL{self.url}",
)
# Remove everything but the archive from the stage
@@ -496,14 +488,10 @@ class URLFetchStrategy(FetchStrategy):
self.expand()
def __repr__(self):
- url = self.url if self.url else "no url"
- return "%s<%s>" % (self.__class__.__name__, url)
+ return f"{self.__class__.__name__}<{self.url}>"
def __str__(self):
- if self.url:
- return self.url
- else:
- return "[no url]"
+ return self.url
@fetcher
@@ -516,7 +504,7 @@ class CacheURLFetchStrategy(URLFetchStrategy):
# check whether the cache file exists.
if not os.path.isfile(path):
- raise NoCacheError("No cache of %s" % path)
+ raise NoCacheError(f"No cache of {path}")
# remove old symlink if one is there.
filename = self.stage.save_filename
@@ -526,8 +514,8 @@ class CacheURLFetchStrategy(URLFetchStrategy):
# Symlink to local cached archive.
symlink(path, filename)
- # Remove link if checksum fails, or subsequent fetchers
- # will assume they don't need to download.
+ # Remove link if checksum fails, or subsequent fetchers will assume they don't need to
+ # download.
if self.digest:
try:
self.check()
@@ -536,12 +524,12 @@ class CacheURLFetchStrategy(URLFetchStrategy):
raise
# Notify the user how we fetched.
- tty.msg("Using cached archive: {0}".format(path))
+ tty.msg(f"Using cached archive: {path}")
class OCIRegistryFetchStrategy(URLFetchStrategy):
- def __init__(self, url=None, checksum=None, **kwargs):
- super().__init__(url, checksum, **kwargs)
+ def __init__(self, *, url: str, checksum: Optional[str] = None, **kwargs):
+ super().__init__(url=url, checksum=checksum, **kwargs)
self._urlopen = kwargs.get("_urlopen", spack.oci.opener.urlopen)
@@ -552,13 +540,13 @@ class OCIRegistryFetchStrategy(URLFetchStrategy):
try:
response = self._urlopen(self.url)
- except urllib.error.URLError as e:
+ except (TimeoutError, urllib.error.URLError) as e:
# clean up archive on failure.
if self.archive_file:
os.remove(self.archive_file)
if os.path.lexists(file):
os.remove(file)
- raise FailedDownloadError(self.url, f"Failed to fetch {self.url}: {e}") from e
+ raise FailedDownloadError(e) from e
if os.path.lexists(file):
os.remove(file)
@@ -586,49 +574,41 @@ class VCSFetchStrategy(FetchStrategy):
# Set a URL based on the type of fetch strategy.
self.url = kwargs.get(self.url_attr, None)
if not self.url:
- raise ValueError("%s requires %s argument." % (self.__class__, self.url_attr))
+ raise ValueError(f"{self.__class__} requires {self.url_attr} argument.")
for attr in self.optional_attrs:
setattr(self, attr, kwargs.get(attr, None))
@_needs_stage
def check(self):
- tty.debug("No checksum needed when fetching with {0}".format(self.url_attr))
+ tty.debug(f"No checksum needed when fetching with {self.url_attr}")
@_needs_stage
def expand(self):
- tty.debug("Source fetched with %s is already expanded." % self.url_attr)
+ tty.debug(f"Source fetched with {self.url_attr} is already expanded.")
@_needs_stage
- def archive(self, destination, **kwargs):
+ def archive(self, destination, *, exclude: Optional[str] = None):
assert llnl.url.extension_from_path(destination) == "tar.gz"
assert self.stage.source_path.startswith(self.stage.path)
-
- tar = which("tar", required=True)
-
- patterns = kwargs.get("exclude", None)
- if patterns is not None:
- if isinstance(patterns, str):
- patterns = [patterns]
- for p in patterns:
- tar.add_default_arg("--exclude=%s" % p)
-
- with working_dir(self.stage.path):
- if self.stage.srcdir:
- # Here we create an archive with the default repository name.
- # The 'tar' command has options for changing the name of a
- # directory that is included in the archive, but they differ
- # based on OS, so we temporarily rename the repo
- with temp_rename(self.stage.source_path, self.stage.srcdir):
- tar("-czf", destination, self.stage.srcdir)
- else:
- tar("-czf", destination, os.path.basename(self.stage.source_path))
+ # We need to prepend this dir name to every entry of the tarfile
+ top_level_dir = PurePath(self.stage.srcdir or os.path.basename(self.stage.source_path))
+
+ with working_dir(self.stage.source_path), spack.util.archive.gzip_compressed_tarfile(
+ destination
+ ) as (tar, _, _):
+ spack.util.archive.reproducible_tarfile_from_prefix(
+ tar=tar,
+ prefix=".",
+ skip=lambda entry: entry.name == exclude,
+ path_to_name=lambda path: (top_level_dir / PurePath(path)).as_posix(),
+ )
def __str__(self):
- return "VCS: %s" % self.url
+ return f"VCS: {self.url}"
def __repr__(self):
- return "%s<%s>" % (self.__class__, self.url)
+ return f"{self.__class__}<{self.url}>"
@fetcher
@@ -703,7 +683,6 @@ class GoFetchStrategy(VCSFetchStrategy):
@fetcher
class GitFetchStrategy(VCSFetchStrategy):
-
"""
Fetch strategy that gets source code from a git repository.
Use like this in a package:
@@ -732,11 +711,17 @@ class GitFetchStrategy(VCSFetchStrategy):
"submodules",
"get_full_repo",
"submodules_delete",
+ "git_sparse_paths",
]
git_version_re = r"git version (\S+)"
def __init__(self, **kwargs):
+
+ self.commit: Optional[str] = None
+ self.tag: Optional[str] = None
+ self.branch: Optional[str] = None
+
# Discards the keywords in kwargs that may conflict with the next call
# to __init__
forwarded_args = copy.copy(kwargs)
@@ -747,6 +732,7 @@ class GitFetchStrategy(VCSFetchStrategy):
self.submodules = kwargs.get("submodules", False)
self.submodules_delete = kwargs.get("submodules_delete", False)
self.get_full_repo = kwargs.get("get_full_repo", False)
+ self.git_sparse_paths = kwargs.get("git_sparse_paths", None)
@property
def git_version(self):
@@ -784,68 +770,71 @@ class GitFetchStrategy(VCSFetchStrategy):
@property
def cachable(self):
- return self.cache_enabled and bool(self.commit or self.tag)
+ return self.cache_enabled and bool(self.commit)
def source_id(self):
- return self.commit or self.tag
+ # TODO: tree-hash would secure download cache and mirrors, commit only secures checkouts.
+ return self.commit
def mirror_id(self):
- repo_ref = self.commit or self.tag or self.branch
- if repo_ref:
+ if self.commit:
repo_path = urllib.parse.urlparse(self.url).path
- result = os.path.sep.join(["git", repo_path, repo_ref])
+ result = os.path.sep.join(["git", repo_path, self.commit])
return result
def _repo_info(self):
args = ""
-
if self.commit:
- args = " at commit {0}".format(self.commit)
+ args = f" at commit {self.commit}"
elif self.tag:
- args = " at tag {0}".format(self.tag)
+ args = f" at tag {self.tag}"
elif self.branch:
- args = " on branch {0}".format(self.branch)
+ args = f" on branch {self.branch}"
- return "{0}{1}".format(self.url, args)
+ return f"{self.url}{args}"
@_needs_stage
def fetch(self):
if self.stage.expanded:
- tty.debug("Already fetched {0}".format(self.stage.source_path))
+ tty.debug(f"Already fetched {self.stage.source_path}")
return
- self.clone(commit=self.commit, branch=self.branch, tag=self.tag)
+ if self.git_sparse_paths:
+ self._sparse_clone_src()
+ else:
+ self._clone_src()
+ self.submodule_operations()
- def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False):
+ def bare_clone(self, dest: str) -> None:
"""
- Clone a repository to a path.
-
- This method handles cloning from git, but does not require a stage.
-
- Arguments:
- dest (str or None): The path into which the code is cloned. If None,
- requires a stage and uses the stage's source path.
- commit (str or None): A commit to fetch from the remote. Only one of
- commit, branch, and tag may be non-None.
- branch (str or None): A branch to fetch from the remote.
- tag (str or None): A tag to fetch from the remote.
- bare (bool): Execute a "bare" git clone (--bare option to git)
+ Execute a bare clone for metadata only
+
+ Requires a destination since bare cloning does not provide source
+ and shouldn't be used for staging.
"""
# Default to spack source path
- dest = dest or self.stage.source_path
- tty.debug("Cloning git repository: {0}".format(self._repo_info()))
+ tty.debug(f"Cloning git repository: {self._repo_info()}")
git = self.git
debug = spack.config.get("config:debug")
- if bare:
- # We don't need to worry about which commit/branch/tag is checked out
- clone_args = ["clone", "--bare"]
- if not debug:
- clone_args.append("--quiet")
- clone_args.extend([self.url, dest])
- git(*clone_args)
- elif commit:
+ # We don't need to worry about which commit/branch/tag is checked out
+ clone_args = ["clone", "--bare"]
+ if not debug:
+ clone_args.append("--quiet")
+ clone_args.extend([self.url, dest])
+ git(*clone_args)
+
+ def _clone_src(self) -> None:
+ """Clone a repository to a path using git."""
+ # Default to spack source path
+ dest = self.stage.source_path
+ tty.debug(f"Cloning git repository: {self._repo_info()}")
+
+ git = self.git
+ debug = spack.config.get("config:debug")
+
+ if self.commit:
# Need to do a regular clone and check out everything if
# they asked for a particular commit.
clone_args = ["clone", self.url]
@@ -864,7 +853,7 @@ class GitFetchStrategy(VCSFetchStrategy):
)
with working_dir(dest):
- checkout_args = ["checkout", commit]
+ checkout_args = ["checkout", self.commit]
if not debug:
checkout_args.insert(1, "--quiet")
git(*checkout_args)
@@ -876,10 +865,10 @@ class GitFetchStrategy(VCSFetchStrategy):
args.append("--quiet")
# If we want a particular branch ask for it.
- if branch:
- args.extend(["--branch", branch])
- elif tag and self.git_version >= spack.version.Version("1.8.5.2"):
- args.extend(["--branch", tag])
+ if self.branch:
+ args.extend(["--branch", self.branch])
+ elif self.tag and self.git_version >= spack.version.Version("1.8.5.2"):
+ args.extend(["--branch", self.tag])
# Try to be efficient if we're using a new enough git.
# This checks out only one branch's history
@@ -911,7 +900,7 @@ class GitFetchStrategy(VCSFetchStrategy):
# For tags, be conservative and check them out AFTER
# cloning. Later git versions can do this with clone
# --branch, but older ones fail.
- if tag and self.git_version < spack.version.Version("1.8.5.2"):
+ if self.tag and self.git_version < spack.version.Version("1.8.5.2"):
# pull --tags returns a "special" error code of 1 in
# older versions that we have to ignore.
# see: https://github.com/git/git/commit/19d122b
@@ -924,6 +913,79 @@ class GitFetchStrategy(VCSFetchStrategy):
git(*pull_args, ignore_errors=1)
git(*co_args)
+ def _sparse_clone_src(self, **kwargs):
+ """Use git's sparse checkout feature to clone portions of a git repository"""
+ dest = self.stage.source_path
+ git = self.git
+
+ if self.git_version < spack.version.Version("2.26.0"):
+ # technically this should be supported for 2.25, but bumping for OS issues
+ # see https://github.com/spack/spack/issues/45771
+ # code paths exist where the package is not set. Assure some indentifier for the
+ # package that was configured for sparse checkout exists in the error message
+ identifier = str(self.url)
+ if self.package:
+ identifier += f" ({self.package.name})"
+ tty.warn(
+ (
+ f"{identifier} is configured for git sparse-checkout "
+ "but the git version is too old to support sparse cloning. "
+ "Cloning the full repository instead."
+ )
+ )
+ self._clone_src()
+ else:
+ # default to depth=2 to allow for retention of some git properties
+ depth = kwargs.get("depth", 2)
+ needs_fetch = self.branch or self.tag
+ git_ref = self.branch or self.tag or self.commit
+
+ assert git_ref
+
+ clone_args = ["clone"]
+
+ if needs_fetch:
+ clone_args.extend(["--branch", git_ref])
+
+ if self.get_full_repo:
+ clone_args.append("--no-single-branch")
+ else:
+ clone_args.append("--single-branch")
+
+ clone_args.extend(
+ [f"--depth={depth}", "--no-checkout", "--filter=blob:none", self.url]
+ )
+
+ sparse_args = ["sparse-checkout", "set"]
+
+ if callable(self.git_sparse_paths):
+ sparse_args.extend(self.git_sparse_paths())
+ else:
+ sparse_args.extend([p for p in self.git_sparse_paths])
+
+ sparse_args.append("--cone")
+
+ checkout_args = ["checkout", git_ref]
+
+ if not spack.config.get("config:debug"):
+ clone_args.insert(1, "--quiet")
+ checkout_args.insert(1, "--quiet")
+
+ with temp_cwd():
+ git(*clone_args)
+ repo_name = get_single_file(".")
+ if self.stage:
+ self.stage.srcdir = repo_name
+ shutil.move(repo_name, dest)
+
+ with working_dir(dest):
+ git(*sparse_args)
+ git(*checkout_args)
+
+ def submodule_operations(self):
+ dest = self.stage.source_path
+ git = self.git
+
if self.submodules_delete:
with working_dir(dest):
for submodule_to_delete in self.submodules_delete:
@@ -936,9 +998,12 @@ class GitFetchStrategy(VCSFetchStrategy):
git_commands = []
submodules = self.submodules
if callable(submodules):
- submodules = list(submodules(self.package))
- git_commands.append(["submodule", "init", "--"] + submodules)
- git_commands.append(["submodule", "update", "--recursive"])
+ submodules = submodules(self.package)
+ if submodules:
+ if isinstance(submodules, str):
+ submodules = [submodules]
+ git_commands.append(["submodule", "init", "--"] + submodules)
+ git_commands.append(["submodule", "update", "--recursive"])
elif submodules:
git_commands.append(["submodule", "update", "--init", "--recursive"])
@@ -973,7 +1038,7 @@ class GitFetchStrategy(VCSFetchStrategy):
return not (self.url.startswith("http://") or self.url.startswith("/"))
def __str__(self):
- return "[git] {0}".format(self._repo_info())
+ return f"[git] {self._repo_info()}"
@fetcher
@@ -1095,7 +1160,6 @@ class CvsFetchStrategy(VCSFetchStrategy):
@fetcher
class SvnFetchStrategy(VCSFetchStrategy):
-
"""Fetch strategy that gets source code from a subversion repository.
Use like this in a package:
@@ -1190,7 +1254,6 @@ class SvnFetchStrategy(VCSFetchStrategy):
@fetcher
class HgFetchStrategy(VCSFetchStrategy):
-
"""
Fetch strategy that gets source code from a Mercurial repository.
Use like this in a package:
@@ -1299,7 +1362,7 @@ class HgFetchStrategy(VCSFetchStrategy):
shutil.move(scrubbed, source_path)
def __str__(self):
- return "[hg] %s" % self.url
+ return f"[hg] {self.url}"
@fetcher
@@ -1308,45 +1371,20 @@ class S3FetchStrategy(URLFetchStrategy):
url_attr = "s3"
- def __init__(self, *args, **kwargs):
- try:
- super().__init__(*args, **kwargs)
- except ValueError:
- if not kwargs.get("url"):
- raise ValueError("S3FetchStrategy requires a url for fetching.")
-
@_needs_stage
def fetch(self):
+ if not self.url.startswith("s3://"):
+ raise spack.error.FetchError(
+ f"{self.__class__.__name__} can only fetch from s3:// urls."
+ )
if self.archive_file:
- tty.debug("Already downloaded {0}".format(self.archive_file))
+ tty.debug(f"Already downloaded {self.archive_file}")
return
-
- parsed_url = urllib.parse.urlparse(self.url)
- if parsed_url.scheme != "s3":
- raise spack.error.FetchError("S3FetchStrategy can only fetch from s3:// urls.")
-
- tty.debug("Fetching {0}".format(self.url))
-
- basename = os.path.basename(parsed_url.path)
-
- with working_dir(self.stage.path):
- _, headers, stream = web_util.read_from_url(self.url)
-
- with open(basename, "wb") as f:
- shutil.copyfileobj(stream, f)
-
- content_type = web_util.get_header(headers, "Content-type")
-
- if content_type == "text/html":
- warn_content_type_mismatch(self.archive_file or "the archive")
-
- if self.stage.save_filename:
- llnl.util.filesystem.rename(
- os.path.join(self.stage.path, basename), self.stage.save_filename
- )
-
+ self._fetch_urllib(self.url)
if not self.archive_file:
- raise FailedDownloadError(self.url)
+ raise FailedDownloadError(
+ RuntimeError(f"Missing archive {self.archive_file} after fetching")
+ )
@fetcher
@@ -1355,43 +1393,22 @@ class GCSFetchStrategy(URLFetchStrategy):
url_attr = "gs"
- def __init__(self, *args, **kwargs):
- try:
- super().__init__(*args, **kwargs)
- except ValueError:
- if not kwargs.get("url"):
- raise ValueError("GCSFetchStrategy requires a url for fetching.")
-
@_needs_stage
def fetch(self):
+ if not self.url.startswith("gs"):
+ raise spack.error.FetchError(
+ f"{self.__class__.__name__} can only fetch from gs:// urls."
+ )
if self.archive_file:
- tty.debug("Already downloaded {0}".format(self.archive_file))
+ tty.debug(f"Already downloaded {self.archive_file}")
return
- parsed_url = urllib.parse.urlparse(self.url)
- if parsed_url.scheme != "gs":
- raise spack.error.FetchError("GCSFetchStrategy can only fetch from gs:// urls.")
-
- tty.debug("Fetching {0}".format(self.url))
-
- basename = os.path.basename(parsed_url.path)
-
- with working_dir(self.stage.path):
- _, headers, stream = web_util.read_from_url(self.url)
-
- with open(basename, "wb") as f:
- shutil.copyfileobj(stream, f)
-
- content_type = web_util.get_header(headers, "Content-type")
-
- if content_type == "text/html":
- warn_content_type_mismatch(self.archive_file or "the archive")
-
- if self.stage.save_filename:
- os.rename(os.path.join(self.stage.path, basename), self.stage.save_filename)
+ self._fetch_urllib(self.url)
if not self.archive_file:
- raise FailedDownloadError(self.url)
+ raise FailedDownloadError(
+ RuntimeError(f"Missing archive {self.archive_file} after fetching")
+ )
@fetcher
@@ -1400,7 +1417,7 @@ class FetchAndVerifyExpandedFile(URLFetchStrategy):
as well as after expanding it."""
def __init__(self, url, archive_sha256: str, expanded_sha256: str):
- super().__init__(url, archive_sha256)
+ super().__init__(url=url, checksum=archive_sha256)
self.expanded_sha256 = expanded_sha256
def expand(self):
@@ -1416,21 +1433,26 @@ class FetchAndVerifyExpandedFile(URLFetchStrategy):
if len(files) != 1:
raise ChecksumError(self, f"Expected a single file in {src_dir}.")
- verify_checksum(os.path.join(src_dir, files[0]), self.expanded_sha256)
+ verify_checksum(
+ os.path.join(src_dir, files[0]), self.expanded_sha256, self.url, self._effective_url
+ )
-def verify_checksum(file, digest):
+def verify_checksum(file: str, digest: str, url: str, effective_url: Optional[str]) -> None:
checker = crypto.Checker(digest)
if not checker.check(file):
# On failure, provide some information about the file size and
# contents, so that we can quickly see what the issue is (redirect
# was not followed, empty file, text instead of binary, ...)
size, contents = fs.filesummary(file)
- raise ChecksumError(
- f"{checker.hash_name} checksum failed for {file}",
+ long_msg = (
f"Expected {digest} but got {checker.sum}. "
- f"File size = {size} bytes. Contents = {contents!r}",
+ f"File size = {size} bytes. Contents = {contents!r}. "
+ f"URL = {url}"
)
+ if effective_url and effective_url != url:
+ long_msg += f", redirected to = {effective_url}"
+ raise ChecksumError(f"{checker.hash_name} checksum failed for {file}", long_msg)
def stable_target(fetcher):
@@ -1442,14 +1464,14 @@ def stable_target(fetcher):
return False
-def from_url(url):
+def from_url(url: str) -> URLFetchStrategy:
"""Given a URL, find an appropriate fetch strategy for it.
Currently just gives you a URLFetchStrategy that uses curl.
TODO: make this return appropriate fetch strategies for other
types of URLs.
"""
- return URLFetchStrategy(url)
+ return URLFetchStrategy(url=url)
def from_kwargs(**kwargs):
@@ -1518,10 +1540,12 @@ def _check_version_attributes(fetcher, pkg, version):
def _extrapolate(pkg, version):
"""Create a fetcher from an extrapolated URL for this version."""
try:
- return URLFetchStrategy(pkg.url_for_version(version), fetch_options=pkg.fetch_options)
- except spack.package_base.NoURLError:
- msg = "Can't extrapolate a URL for version %s " "because package %s defines no URLs"
- raise ExtrapolationError(msg % (version, pkg.name))
+ return URLFetchStrategy(url=pkg.url_for_version(version), fetch_options=pkg.fetch_options)
+ except spack.error.NoURLError:
+ raise ExtrapolationError(
+ f"Can't extrapolate a URL for version {version} because "
+ f"package {pkg.name} defines no URLs"
+ )
def _from_merged_attrs(fetcher, pkg, version):
@@ -1538,8 +1562,11 @@ def _from_merged_attrs(fetcher, pkg, version):
attrs["fetch_options"] = pkg.fetch_options
attrs.update(pkg.versions[version])
- if fetcher.url_attr == "git" and hasattr(pkg, "submodules"):
- attrs.setdefault("submodules", pkg.submodules)
+ if fetcher.url_attr == "git":
+ pkg_attr_list = ["submodules", "git_sparse_paths"]
+ for pkg_attr in pkg_attr_list:
+ if hasattr(pkg, pkg_attr):
+ attrs.setdefault(pkg_attr, getattr(pkg, pkg_attr))
return fetcher(**attrs)
@@ -1634,11 +1661,9 @@ def for_package_version(pkg, version=None):
raise InvalidArgsError(pkg, version, **args)
-def from_url_scheme(url, *args, **kwargs):
+def from_url_scheme(url: str, **kwargs) -> FetchStrategy:
"""Finds a suitable FetchStrategy by matching its url_attr with the scheme
in the given url."""
-
- url = kwargs.get("url", url)
parsed_url = urllib.parse.urlparse(url, scheme="file")
scheme_mapping = kwargs.get("scheme_mapping") or {
@@ -1655,11 +1680,9 @@ def from_url_scheme(url, *args, **kwargs):
for fetcher in all_strategies:
url_attr = getattr(fetcher, "url_attr", None)
if url_attr and url_attr == scheme:
- return fetcher(url, *args, **kwargs)
+ return fetcher(url=url, **kwargs)
- raise ValueError(
- 'No FetchStrategy found for url with scheme: "{SCHEME}"'.format(SCHEME=parsed_url.scheme)
- )
+ raise ValueError(f'No FetchStrategy found for url with scheme: "{parsed_url.scheme}"')
def from_list_url(pkg):
@@ -1684,7 +1707,9 @@ def from_list_url(pkg):
)
# construct a fetcher
- return URLFetchStrategy(url_from_list, checksum, fetch_options=pkg.fetch_options)
+ return URLFetchStrategy(
+ url=url_from_list, checksum=checksum, fetch_options=pkg.fetch_options
+ )
except KeyError as e:
tty.debug(e)
tty.msg("Cannot find version %s in url_list" % pkg.version)
@@ -1712,10 +1737,10 @@ class FsCache:
mkdirp(os.path.dirname(dst))
fetcher.archive(dst)
- def fetcher(self, target_path, digest, **kwargs):
+ def fetcher(self, target_path: str, digest: Optional[str], **kwargs) -> CacheURLFetchStrategy:
path = os.path.join(self.root, target_path)
url = url_util.path_to_file_url(path)
- return CacheURLFetchStrategy(url, digest, **kwargs)
+ return CacheURLFetchStrategy(url=url, checksum=digest, **kwargs)
def destroy(self):
shutil.rmtree(self.root, ignore_errors=True)
@@ -1728,9 +1753,9 @@ class NoCacheError(spack.error.FetchError):
class FailedDownloadError(spack.error.FetchError):
"""Raised when a download fails."""
- def __init__(self, url, msg=""):
- super().__init__("Failed to fetch file from URL: %s" % url, msg)
- self.url = url
+ def __init__(self, *exceptions: Exception):
+ super().__init__("Failed to download")
+ self.exceptions = exceptions
class NoArchiveFileError(spack.error.FetchError):
diff --git a/lib/spack/spack/filesystem_view.py b/lib/spack/spack/filesystem_view.py
index 6d9e85b9c4..2785413779 100644
--- a/lib/spack/spack/filesystem_view.py
+++ b/lib/spack/spack/filesystem_view.py
@@ -10,8 +10,9 @@ import re
import shutil
import stat
import sys
-from typing import Optional
+from typing import Callable, Dict, Optional
+from llnl.string import comma_or
from llnl.util import tty
from llnl.util.filesystem import (
mkdirp,
@@ -32,6 +33,8 @@ from llnl.util.symlink import symlink
from llnl.util.tty.color import colorize
import spack.config
+import spack.directory_layout
+import spack.paths
import spack.projections
import spack.relocate
import spack.schema.projections
@@ -48,19 +51,20 @@ __all__ = ["FilesystemView", "YamlFilesystemView"]
_projections_path = ".spack/projections.yaml"
-def view_symlink(src, dst, **kwargs):
- # keyword arguments are irrelevant
- # here to fit required call signature
+LinkCallbackType = Callable[[str, str, "FilesystemView", Optional[spack.spec.Spec]], None]
+
+
+def view_symlink(src: str, dst: str, *args, **kwargs) -> None:
symlink(src, dst)
-def view_hardlink(src, dst, **kwargs):
- # keyword arguments are irrelevant
- # here to fit required call signature
+def view_hardlink(src: str, dst: str, *args, **kwargs) -> None:
os.link(src, dst)
-def view_copy(src: str, dst: str, view, spec: Optional[spack.spec.Spec] = None):
+def view_copy(
+ src: str, dst: str, view: "FilesystemView", spec: Optional[spack.spec.Spec] = None
+) -> None:
"""
Copy a file from src to dst.
@@ -91,39 +95,54 @@ def view_copy(src: str, dst: str, view, spec: Optional[spack.spec.Spec] = None):
prefix_to_projection[spack.store.STORE.layout.root] = view._root
# This is vestigial code for the *old* location of sbang.
- prefix_to_projection[
- "#!/bin/bash {0}/bin/sbang".format(spack.paths.spack_root)
- ] = sbang.sbang_shebang_line()
+ prefix_to_projection[f"#!/bin/bash {spack.paths.spack_root}/bin/sbang"] = (
+ sbang.sbang_shebang_line()
+ )
spack.relocate.relocate_text(files=[dst], prefixes=prefix_to_projection)
- try:
- os.chown(dst, src_stat.st_uid, src_stat.st_gid)
- except OSError:
- tty.debug("Can't change the permissions for %s" % dst)
+ # The os module on Windows does not have a chown function.
+ if sys.platform != "win32":
+ try:
+ os.chown(dst, src_stat.st_uid, src_stat.st_gid)
+ except OSError:
+ tty.debug(f"Can't change the permissions for {dst}")
+
+
+#: supported string values for `link_type` in an env, mapped to canonical values
+_LINK_TYPES = {
+ "hardlink": "hardlink",
+ "hard": "hardlink",
+ "copy": "copy",
+ "relocate": "copy",
+ "add": "symlink",
+ "symlink": "symlink",
+ "soft": "symlink",
+}
+
+_VALID_LINK_TYPES = sorted(set(_LINK_TYPES.values()))
+
+
+def canonicalize_link_type(link_type: str) -> str:
+ """Return canonical"""
+ canonical = _LINK_TYPES.get(link_type)
+ if not canonical:
+ raise ValueError(
+ f"Invalid link type: '{link_type}. Must be one of {comma_or(_VALID_LINK_TYPES)}'"
+ )
+ return canonical
-def view_func_parser(parsed_name):
- # What method are we using for this view
- if parsed_name in ("hardlink", "hard"):
+def function_for_link_type(link_type: str) -> LinkCallbackType:
+ link_type = canonicalize_link_type(link_type)
+ if link_type == "hardlink":
return view_hardlink
- elif parsed_name in ("copy", "relocate"):
- return view_copy
- elif parsed_name in ("add", "symlink", "soft"):
+ elif link_type == "symlink":
return view_symlink
- else:
- raise ValueError("invalid link type for view: '%s'" % parsed_name)
+ elif link_type == "copy":
+ return view_copy
-
-def inverse_view_func_parser(view_type):
- # get string based on view type
- if view_type is view_hardlink:
- link_name = "hardlink"
- elif view_type is view_copy:
- link_name = "copy"
- else:
- link_name = "symlink"
- return link_name
+ assert False, "invalid link type" # need mypy Literal values
class FilesystemView:
@@ -139,7 +158,16 @@ class FilesystemView:
directory structure.
"""
- def __init__(self, root, layout, **kwargs):
+ def __init__(
+ self,
+ root: str,
+ layout: spack.directory_layout.DirectoryLayout,
+ *,
+ projections: Optional[Dict] = None,
+ ignore_conflicts: bool = False,
+ verbose: bool = False,
+ link_type: str = "symlink",
+ ):
"""
Initialize a filesystem view under the given `root` directory with
corresponding directory `layout`.
@@ -148,15 +176,17 @@ class FilesystemView:
"""
self._root = root
self.layout = layout
+ self.projections = {} if projections is None else projections
- self.projections = kwargs.get("projections", {})
-
- self.ignore_conflicts = kwargs.get("ignore_conflicts", False)
- self.verbose = kwargs.get("verbose", False)
+ self.ignore_conflicts = ignore_conflicts
+ self.verbose = verbose
# Setup link function to include view
- link_func = kwargs.get("link", view_symlink)
- self.link = ft.partial(link_func, view=self)
+ self.link_type = link_type
+ self._link = function_for_link_type(link_type)
+
+ def link(self, src: str, dst: str, spec: Optional[spack.spec.Spec] = None) -> None:
+ self._link(src, dst, self, spec)
def add_specs(self, *specs, **kwargs):
"""
@@ -254,8 +284,24 @@ class YamlFilesystemView(FilesystemView):
Filesystem view to work with a yaml based directory layout.
"""
- def __init__(self, root, layout, **kwargs):
- super().__init__(root, layout, **kwargs)
+ def __init__(
+ self,
+ root: str,
+ layout: spack.directory_layout.DirectoryLayout,
+ *,
+ projections: Optional[Dict] = None,
+ ignore_conflicts: bool = False,
+ verbose: bool = False,
+ link_type: str = "symlink",
+ ):
+ super().__init__(
+ root,
+ layout,
+ projections=projections,
+ ignore_conflicts=ignore_conflicts,
+ verbose=verbose,
+ link_type=link_type,
+ )
# Super class gets projections from the kwargs
# YAML specific to get projections from YAML file
@@ -270,9 +316,10 @@ class YamlFilesystemView(FilesystemView):
# Ensure projections are the same from each source
# Read projections file from view
if self.projections != self.read_projections():
- msg = "View at %s has projections file" % self._root
- msg += " which does not match projections passed manually."
- raise ConflictingProjectionsError(msg)
+ raise ConflictingProjectionsError(
+ f"View at {self._root} has projections file"
+ " which does not match projections passed manually."
+ )
self._croot = colorize_root(self._root) + " "
@@ -313,11 +360,11 @@ class YamlFilesystemView(FilesystemView):
def add_standalone(self, spec):
if spec.external:
- tty.warn(self._croot + "Skipping external package: %s" % colorize_spec(spec))
+ tty.warn(f"{self._croot}Skipping external package: {colorize_spec(spec)}")
return True
if self.check_added(spec):
- tty.warn(self._croot + "Skipping already linked package: %s" % colorize_spec(spec))
+ tty.warn(f"{self._croot}Skipping already linked package: {colorize_spec(spec)}")
return True
self.merge(spec)
@@ -325,7 +372,7 @@ class YamlFilesystemView(FilesystemView):
self.link_meta_folder(spec)
if self.verbose:
- tty.info(self._croot + "Linked package: %s" % colorize_spec(spec))
+ tty.info(f"{self._croot}Linked package: {colorize_spec(spec)}")
return True
def merge(self, spec, ignore=None):
@@ -393,7 +440,7 @@ class YamlFilesystemView(FilesystemView):
for file in files:
if not os.path.lexists(file):
- tty.warn("Tried to remove %s which does not exist" % file)
+ tty.warn(f"Tried to remove {file} which does not exist")
continue
# remove if file is not owned by any other package in the view
@@ -404,7 +451,7 @@ class YamlFilesystemView(FilesystemView):
# we are currently removing, as we remove files before unlinking the
# metadata directory.
if len([s for s in specs if needs_file(s, file)]) <= 1:
- tty.debug("Removing file " + file)
+ tty.debug(f"Removing file {file}")
os.remove(file)
def check_added(self, spec):
@@ -477,14 +524,14 @@ class YamlFilesystemView(FilesystemView):
Remove (unlink) a standalone package from this view.
"""
if not self.check_added(spec):
- tty.warn(self._croot + "Skipping package not linked in view: %s" % spec.name)
+ tty.warn(f"{self._croot}Skipping package not linked in view: {spec.name}")
return
self.unmerge(spec)
self.unlink_meta_folder(spec)
if self.verbose:
- tty.info(self._croot + "Removed package: %s" % colorize_spec(spec))
+ tty.info(f"{self._croot}Removed package: {colorize_spec(spec)}")
def get_projection_for_spec(self, spec):
"""
@@ -558,9 +605,9 @@ class YamlFilesystemView(FilesystemView):
linked = tty.color.colorize(" (@gLinked@.)", color=color)
specified = tty.color.colorize("(@rSpecified@.)", color=color)
cprint(
- self._croot + "Package conflict detected:\n"
- "%s %s\n" % (linked, colorize_spec(spec_active))
- + "%s %s" % (specified, colorize_spec(spec_specified))
+ f"{self._croot}Package conflict detected:\n"
+ f"{linked} {colorize_spec(spec_active)}\n"
+ f"{specified} {colorize_spec(spec_specified)}"
)
def print_status(self, *specs, **kwargs):
@@ -572,14 +619,14 @@ class YamlFilesystemView(FilesystemView):
for s, v in zip(specs, in_view):
if not v:
- tty.error(self._croot + "Package not linked: %s" % s.name)
+ tty.error(f"{self._croot}Package not linked: {s.name}")
elif s != v:
self.print_conflict(v, s, level="warn")
in_view = list(filter(None, in_view))
if len(specs) > 0:
- tty.msg("Packages linked in %s:" % self._croot[:-1])
+ tty.msg(f"Packages linked in {self._croot[:-1]}:")
# Make a dict with specs keyed by architecture and compiler.
index = index_by(specs, ("architecture", "compiler"))
@@ -589,20 +636,19 @@ class YamlFilesystemView(FilesystemView):
if i > 0:
print()
- header = "%s{%s} / %s{%s}" % (
- spack.spec.ARCHITECTURE_COLOR,
- architecture,
- spack.spec.COMPILER_COLOR,
- compiler,
+ header = (
+ f"{spack.spec.ARCHITECTURE_COLOR}{{{architecture}}} "
+ f"/ {spack.spec.COMPILER_COLOR}{{{compiler}}}"
)
tty.hline(colorize(header), char="-")
specs = index[(architecture, compiler)]
specs.sort()
- format_string = "{name}{@version}"
- format_string += "{%compiler}{compiler_flags}{variants}"
- abbreviated = [s.cformat(format_string) for s in specs]
+ abbreviated = [
+ s.cformat("{name}{@version}{%compiler}{compiler_flags}{variants}")
+ for s in specs
+ ]
# Print one spec per line along with prefix path
width = max(len(s) for s in abbreviated)
@@ -634,22 +680,16 @@ class YamlFilesystemView(FilesystemView):
class SimpleFilesystemView(FilesystemView):
- """A simple and partial implementation of FilesystemView focused on
- performance and immutable views, where specs cannot be removed after they
- were added."""
-
- def __init__(self, root, layout, **kwargs):
- super().__init__(root, layout, **kwargs)
+ """A simple and partial implementation of FilesystemView focused on performance and immutable
+ views, where specs cannot be removed after they were added."""
def _sanity_check_view_projection(self, specs):
- """A very common issue is that we end up with two specs of the same
- package, that project to the same prefix. We want to catch that as
- early as possible and give a sensible error to the user. Here we use
- the metadata dir (.spack) projection as a quick test to see whether
- two specs in the view are going to clash. The metadata dir is used
- because it's always added by Spack with identical files, so a
- guaranteed clash that's easily verified."""
- seen = dict()
+ """A very common issue is that we end up with two specs of the same package, that project
+ to the same prefix. We want to catch that as early as possible and give a sensible error to
+ the user. Here we use the metadata dir (.spack) projection as a quick test to see whether
+ two specs in the view are going to clash. The metadata dir is used because it's always
+ added by Spack with identical files, so a guaranteed clash that's easily verified."""
+ seen = {}
for current_spec in specs:
metadata_dir = self.relative_metadata_dir_for_spec(current_spec)
conflicting_spec = seen.get(metadata_dir)
@@ -657,20 +697,15 @@ class SimpleFilesystemView(FilesystemView):
raise ConflictingSpecsError(current_spec, conflicting_spec)
seen[metadata_dir] = current_spec
- def add_specs(self, *specs, **kwargs):
+ def add_specs(self, *specs: spack.spec.Spec) -> None:
+ """Link a root-to-leaf topologically ordered list of specs into the view."""
assert all((s.concrete for s in specs))
if len(specs) == 0:
return
# Drop externals
- for s in specs:
- if s.external:
- tty.warn("Skipping external package: " + s.short_spec)
specs = [s for s in specs if not s.external]
- if kwargs.get("exclude", None):
- specs = set(filter_exclude(specs, kwargs["exclude"]))
-
self._sanity_check_view_projection(specs)
# Ignore spack meta data folder.
@@ -695,13 +730,11 @@ class SimpleFilesystemView(FilesystemView):
# Inform about file-file conflicts.
if visitor.file_conflicts:
if self.ignore_conflicts:
- tty.debug("{0} file conflicts".format(len(visitor.file_conflicts)))
+ tty.debug(f"{len(visitor.file_conflicts)} file conflicts")
else:
raise MergeConflictSummary(visitor.file_conflicts)
- tty.debug(
- "Creating {0} dirs and {1} links".format(len(visitor.directories), len(visitor.files))
- )
+ tty.debug(f"Creating {len(visitor.directories)} dirs and {len(visitor.files)} links")
# Make the directory structure
for dst in visitor.directories:
diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py
index 684a6061fb..2d0fc9c3a8 100644
--- a/lib/spack/spack/graph.py
+++ b/lib/spack/spack/graph.py
@@ -46,6 +46,7 @@ import spack.deptypes as dt
import spack.repo
import spack.spec
import spack.tengine
+import spack.traverse
def find(seq, predicate):
@@ -324,12 +325,7 @@ class AsciiGraph:
self._out = llnl.util.tty.color.ColorStream(out, color=color)
# We'll traverse the spec in topological order as we graph it.
- nodes_in_topological_order = [
- edge.spec
- for edge in spack.traverse.traverse_edges_topo(
- [spec], direction="children", deptype=self.depflag
- )
- ]
+ nodes_in_topological_order = list(spec.traverse(order="topo", deptype=self.depflag))
nodes_in_topological_order.reverse()
# Work on a copy to be nondestructive
diff --git a/lib/spack/spack/hash_types.py b/lib/spack/spack/hash_types.py
index 0684667528..4b1bf627d6 100644
--- a/lib/spack/spack/hash_types.py
+++ b/lib/spack/spack/hash_types.py
@@ -37,6 +37,12 @@ class SpecHashDescriptor:
"""Run this hash on the provided spec."""
return spec.spec_hash(self)
+ def __repr__(self):
+ return (
+ f"SpecHashDescriptor(depflag={self.depflag!r}, "
+ f"package_hash={self.package_hash!r}, name={self.name!r}, override={self.override!r})"
+ )
+
#: Spack's deployment hash. Includes all inputs that can affect how a package is built.
dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN, package_hash=True, name="hash")
diff --git a/lib/spack/spack/hooks/__init__.py b/lib/spack/spack/hooks/__init__.py
index 5eb2c0bf57..73fad62d6a 100644
--- a/lib/spack/spack/hooks/__init__.py
+++ b/lib/spack/spack/hooks/__init__.py
@@ -15,59 +15,46 @@ Currently the following hooks are supported:
* post_install(spec, explicit)
* pre_uninstall(spec)
* post_uninstall(spec)
- * on_install_start(spec)
- * on_install_success(spec)
- * on_install_failure(spec)
- * on_phase_success(pkg, phase_name, log_file)
- * on_phase_error(pkg, phase_name, log_file)
- * on_phase_error(pkg, phase_name, log_file)
- * post_env_write(env)
This can be used to implement support for things like module
systems (e.g. modules, lmod, etc.) or to add other custom
features.
"""
-
-from llnl.util.lang import ensure_last, list_modules
-
-import spack.paths
+import importlib
+import types
+from typing import List, Optional
class _HookRunner:
- #: Stores all hooks on first call, shared among
- #: all HookRunner objects
- _hooks = None
+ #: Order in which hooks are executed
+ HOOK_ORDER = [
+ "spack.hooks.module_file_generation",
+ "spack.hooks.licensing",
+ "spack.hooks.sbang",
+ "spack.hooks.windows_runtime_linkage",
+ "spack.hooks.drop_redundant_rpaths",
+ "spack.hooks.absolutify_elf_sonames",
+ "spack.hooks.permissions_setters",
+ # after all mutations to the install prefix, write metadata
+ "spack.hooks.write_install_manifest",
+ # after all metadata is written
+ "spack.hooks.autopush",
+ ]
+
+ #: Contains all hook modules after first call, shared among all HookRunner objects
+ _hooks: Optional[List[types.ModuleType]] = None
def __init__(self, hook_name):
self.hook_name = hook_name
- @classmethod
- def _populate_hooks(cls):
- # Lazily populate the list of hooks
- cls._hooks = []
-
- relative_names = list(list_modules(spack.paths.hooks_path))
-
- # Ensure that write_install_manifest comes last
- ensure_last(relative_names, "absolutify_elf_sonames", "write_install_manifest")
-
- for name in relative_names:
- module_name = __name__ + "." + name
- # When importing a module from a package, __import__('A.B', ...)
- # returns package A when 'fromlist' is empty. If fromlist is not
- # empty it returns the submodule B instead
- # See: https://stackoverflow.com/a/2725668/771663
- module_obj = __import__(module_name, fromlist=[None])
- cls._hooks.append((module_name, module_obj))
-
@property
- def hooks(self):
+ def hooks(self) -> List[types.ModuleType]:
if not self._hooks:
- self._populate_hooks()
+ self._hooks = [importlib.import_module(module_name) for module_name in self.HOOK_ORDER]
return self._hooks
def __call__(self, *args, **kwargs):
- for _, module in self.hooks:
+ for module in self.hooks:
if hasattr(module, self.hook_name):
hook = getattr(module, self.hook_name)
if hasattr(hook, "__call__"):
@@ -78,17 +65,5 @@ class _HookRunner:
pre_install = _HookRunner("pre_install")
post_install = _HookRunner("post_install")
-# These hooks are run within an install subprocess
pre_uninstall = _HookRunner("pre_uninstall")
post_uninstall = _HookRunner("post_uninstall")
-on_phase_success = _HookRunner("on_phase_success")
-on_phase_error = _HookRunner("on_phase_error")
-
-# These are hooks in installer.py, before starting install subprocess
-on_install_start = _HookRunner("on_install_start")
-on_install_success = _HookRunner("on_install_success")
-on_install_failure = _HookRunner("on_install_failure")
-on_install_cancel = _HookRunner("on_install_cancel")
-
-# Environment hooks
-post_env_write = _HookRunner("post_env_write")
diff --git a/lib/spack/spack/hooks/absolutify_elf_sonames.py b/lib/spack/spack/hooks/absolutify_elf_sonames.py
index d203c6d1ef..5f1c4d0eac 100644
--- a/lib/spack/spack/hooks/absolutify_elf_sonames.py
+++ b/lib/spack/spack/hooks/absolutify_elf_sonames.py
@@ -13,7 +13,6 @@ import spack.bootstrap
import spack.config
import spack.relocate
from spack.util.elf import ElfParsingError, parse_elf
-from spack.util.executable import Executable
def is_shared_library_elf(filepath):
@@ -141,7 +140,7 @@ def post_install(spec, explicit=None):
return
# Only enable on platforms using ELF.
- if not spec.satisfies("platform=linux") and not spec.satisfies("platform=cray"):
+ if not spec.satisfies("platform=linux"):
return
# Disable this hook when bootstrapping, to avoid recursion.
@@ -149,10 +148,9 @@ def post_install(spec, explicit=None):
return
# Should failing to locate patchelf be a hard error?
- patchelf_path = spack.relocate._patchelf()
- if not patchelf_path:
+ patchelf = spack.relocate._patchelf()
+ if not patchelf:
return
- patchelf = Executable(patchelf_path)
fixes = find_and_patch_sonames(spec.prefix, spec.package.non_bindable_shared_objects, patchelf)
diff --git a/lib/spack/spack/hooks/autopush.py b/lib/spack/spack/hooks/autopush.py
new file mode 100644
index 0000000000..07beef3c20
--- /dev/null
+++ b/lib/spack/spack/hooks/autopush.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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 llnl.util.tty as tty
+
+import spack.binary_distribution as bindist
+import spack.mirrors.mirror
+
+
+def post_install(spec, explicit):
+ # Push package to all buildcaches with autopush==True
+
+ # Do nothing if spec is an external package
+ if spec.external:
+ return
+
+ # Do nothing if package was not installed from source
+ pkg = spec.package
+ if pkg.installed_from_binary_cache:
+ return
+
+ # Push the package to all autopush mirrors
+ for mirror in spack.mirrors.mirror.MirrorCollection(binary=True, autopush=True).values():
+ signing_key = bindist.select_signing_key() if mirror.signed else None
+ with bindist.make_uploader(mirror=mirror, force=True, signing_key=signing_key) as uploader:
+ uploader.push_or_raise([spec])
+ tty.msg(f"{spec.name}: Pushed to build cache: '{mirror.name}'")
diff --git a/lib/spack/spack/hooks/drop_redundant_rpaths.py b/lib/spack/spack/hooks/drop_redundant_rpaths.py
index 0c43fc1b5a..f17355fe78 100644
--- a/lib/spack/spack/hooks/drop_redundant_rpaths.py
+++ b/lib/spack/spack/hooks/drop_redundant_rpaths.py
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-from typing import IO, Optional, Tuple
+from typing import BinaryIO, Optional, Tuple
import llnl.util.tty as tty
from llnl.util.filesystem import BaseDirectoryVisitor, visit_directory_tree
@@ -18,7 +18,7 @@ def should_keep(path: bytes) -> bool:
return path.startswith(b"$") or (os.path.isabs(path) and os.path.lexists(path))
-def _drop_redundant_rpaths(f: IO) -> Optional[Tuple[bytes, bytes]]:
+def _drop_redundant_rpaths(f: BinaryIO) -> Optional[Tuple[bytes, bytes]]:
"""Drop redundant entries from rpath.
Args:
@@ -117,7 +117,7 @@ def post_install(spec, explicit=None):
return
# Only enable on platforms using ELF.
- if not spec.satisfies("platform=linux") and not spec.satisfies("platform=cray"):
+ if not spec.satisfies("platform=linux"):
return
visit_directory_tree(spec.prefix, ElfFilesWithRPathVisitor())
diff --git a/lib/spack/spack/hooks/module_file_generation.py b/lib/spack/spack/hooks/module_file_generation.py
index cb51a4eb85..485861d27c 100644
--- a/lib/spack/spack/hooks/module_file_generation.py
+++ b/lib/spack/spack/hooks/module_file_generation.py
@@ -34,21 +34,8 @@ def _for_each_enabled(
def post_install(spec, explicit: bool):
- import spack.environment as ev # break import cycle
-
- if ev.active_environment():
- # If the installed through an environment, we skip post_install
- # module generation and generate the modules on env_write so Spack
- # can manage interactions between env views and modules
- return
-
_for_each_enabled(spec, "write", explicit)
def post_uninstall(spec):
_for_each_enabled(spec, "remove")
-
-
-def post_env_write(env):
- for spec in env.new_installs:
- _for_each_enabled(spec, "write")
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py
index fa100dc6af..83968603d5 100644
--- a/lib/spack/spack/hooks/sbang.py
+++ b/lib/spack/spack/hooks/sbang.py
@@ -229,6 +229,8 @@ def post_install(spec, explicit=None):
$spack_prefix/bin/sbang instead of something longer than the
shebang limit.
"""
+ if sys.platform == "win32":
+ return
if spec.external:
tty.debug("SKIP: shebang filtering [external package]")
return
diff --git a/lib/spack/spack/hooks/windows_runtime_linkage.py b/lib/spack/spack/hooks/windows_runtime_linkage.py
new file mode 100644
index 0000000000..5bb3744910
--- /dev/null
+++ b/lib/spack/spack/hooks/windows_runtime_linkage.py
@@ -0,0 +1,8 @@
+# Copyright 2013-2024 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)
+
+
+def post_install(spec, explicit=None):
+ spec.package.windows_establish_runtime_linkage()
diff --git a/lib/spack/spack/install_test.py b/lib/spack/spack/install_test.py
index c27e8ea60a..d639548ecf 100644
--- a/lib/spack/spack/install_test.py
+++ b/lib/spack/spack/install_test.py
@@ -17,14 +17,22 @@ from typing import Callable, List, Optional, Tuple, Type, TypeVar, Union
import llnl.util.filesystem as fs
import llnl.util.tty as tty
+import llnl.util.tty.log
from llnl.string import plural
from llnl.util.lang import nullcontext
from llnl.util.tty.color import colorize
+import spack.build_environment
+import spack.config
import spack.error
+import spack.package_base
import spack.paths
+import spack.repo
+import spack.spec
+import spack.util.executable
+import spack.util.path
import spack.util.spack_json as sjson
-from spack.installer import InstallError
+from spack.error import InstallError
from spack.spec import Spec
from spack.util.prefix import Prefix
@@ -42,7 +50,7 @@ spack_install_test_log = "install-time-test-log.txt"
ListOrStringType = Union[str, List[str]]
-LogType = Union["tty.log.nixlog", "tty.log.winlog"]
+LogType = Union[llnl.util.tty.log.nixlog, llnl.util.tty.log.winlog]
Pb = TypeVar("Pb", bound="spack.package_base.PackageBase")
PackageObjectOrClass = Union[Pb, Type[Pb]]
@@ -110,7 +118,7 @@ def cache_extra_test_sources(pkg: Pb, srcs: ListOrStringType):
location(s) under the install testing directory.
Raises:
- spack.installer.InstallError: if any of the source paths are absolute
+ spack.error.InstallError: if any of the source paths are absolute
or do not exist
under the build stage
"""
@@ -280,7 +288,7 @@ class PackageTest:
def logger(self) -> Optional[LogType]:
"""The current logger or, if none, sets to one."""
if not self._logger:
- self._logger = tty.log.log_output(self.test_log_file)
+ self._logger = llnl.util.tty.log.log_output(self.test_log_file)
return self._logger
@@ -297,7 +305,7 @@ class PackageTest:
fs.touch(self.test_log_file) # Otherwise log_parse complains
fs.set_install_permissions(self.test_log_file)
- with tty.log.log_output(self.test_log_file, verbose) as self._logger:
+ with llnl.util.tty.log.log_output(self.test_log_file, verbose) as self._logger:
with self.logger.force_echo(): # type: ignore[union-attr]
tty.msg("Testing package " + colorize(r"@*g{" + self.pkg_id + r"}"))
@@ -344,9 +352,7 @@ class PackageTest:
self.test_parts[part_name] = status
self.counts[status] += 1
- def phase_tests(
- self, builder: spack.builder.Builder, phase_name: str, method_names: List[str]
- ):
+ def phase_tests(self, builder, phase_name: str, method_names: List[str]):
"""Execute the builder's package phase-time tests.
Args:
@@ -363,30 +369,22 @@ class PackageTest:
builder.pkg.test_suite.current_test_spec = builder.pkg.spec
builder.pkg.test_suite.current_base_spec = builder.pkg.spec
- # TODO (post-34236): "test"->"test_" once remove deprecated methods
- have_tests = any(name.startswith("test") for name in method_names)
+ have_tests = any(name.startswith("test_") for name in method_names)
if have_tests:
copy_test_files(builder.pkg, builder.pkg.spec)
for name in method_names:
try:
- # Prefer the method in the package over the builder's.
- # We need this primarily to pick up arbitrarily named test
- # methods but also some build-time checks.
- fn = getattr(builder.pkg, name, getattr(builder, name))
-
- msg = f"RUN-TESTS: {phase_name}-time tests [{name}]"
- print_message(logger, msg, verbose)
-
- fn()
-
+ fn = getattr(builder, name, None) or getattr(builder.pkg, name)
except AttributeError as e:
- msg = f"RUN-TESTS: method not implemented [{name}]"
- print_message(logger, msg, verbose)
-
- self.add_failure(e, msg)
+ print_message(logger, f"RUN-TESTS: method not implemented [{name}]", verbose)
+ self.add_failure(e, f"RUN-TESTS: method not implemented [{name}]")
if fail_fast:
break
+ continue
+
+ print_message(logger, f"RUN-TESTS: {phase_name}-time tests [{name}]", verbose)
+ fn()
if have_tests:
print_message(logger, "Completed testing", verbose)
@@ -468,16 +466,9 @@ class PackageTest:
def test_part(pkg: Pb, test_name: str, purpose: str, work_dir: str = ".", verbose: bool = False):
wdir = "." if work_dir is None else work_dir
tester = pkg.tester
- # TODO (post-34236): "test"->"test_" once remove deprecated methods
assert test_name and test_name.startswith(
- "test"
- ), f"Test name must start with 'test' but {test_name} was provided"
-
- if test_name == "test":
- tty.warn(
- "{}: the 'test' method is deprecated. Convert stand-alone "
- "test(s) to methods with names starting 'test_'.".format(pkg.name)
- )
+ "test_"
+ ), f"Test name must start with 'test_' but {test_name} was provided"
title = "test: {}: {}".format(test_name, purpose or "unspecified purpose")
with fs.working_dir(wdir, create=True):
@@ -637,28 +628,11 @@ def test_functions(
except spack.repo.UnknownPackageError:
tty.debug(f"{vname}: virtual does not appear to have a package file")
- # TODO (post-34236): Remove if removing empty test method check
- def skip(line):
- # This should match the lines in the deprecated test() method
- ln = line.strip()
- return ln.startswith("#") or ("warn" in ln and "deprecated" in ln)
-
- doc_regex = r'\s+("""[\w\s\(\)\-\,\;\:]+""")'
tests = []
for clss in classes:
methods = inspect.getmembers(clss, predicate=lambda x: inspect.isfunction(x))
for name, test_fn in methods:
- # TODO (post-34236): "test"->"test_" once remove deprecated methods
- if not name.startswith("test"):
- continue
-
- # TODO (post-34236): Could remove empty method check once remove
- # TODO (post-34236): deprecated methods though some use cases,
- # TODO (post-34236): such as checking packages have actual, non-
- # TODO (post-34236): empty tests, may want this check to remain.
- source = re.sub(doc_regex, r"", inspect.getsource(test_fn)).splitlines()[1:]
- lines = [ln.strip() for ln in source if not skip(ln)]
- if not lines:
+ if not name.startswith("test_"):
continue
tests.append((clss.__name__, test_fn)) # type: ignore[union-attr]
@@ -757,6 +731,10 @@ def test_process(pkg: Pb, kwargs):
pkg.tester.status(pkg.spec.name, TestStatus.SKIPPED)
return
+ # Make sure properly named build-time test methods actually run as
+ # stand-alone tests.
+ pkg.run_tests = True
+
# run test methods from the package and all virtuals it provides
v_names = virtuals(pkg)
test_specs = [pkg.spec] + [spack.spec.Spec(v_name) for v_name in sorted(v_names)]
@@ -776,7 +754,7 @@ def virtuals(pkg):
# hack for compilers that are not dependencies (yet)
# TODO: this all eventually goes away
- c_names = ("gcc", "intel", "intel-parallel-studio", "pgi")
+ c_names = ("gcc", "intel", "intel-parallel-studio")
if pkg.name in c_names:
v_names.extend(["c", "cxx", "fortran"])
if pkg.spec.satisfies("llvm+clang"):
diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py
index 55436ab0b0..dba9f57466 100644
--- a/lib/spack/spack/installer.py
+++ b/lib/spack/spack/installer.py
@@ -2,8 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-"""
-This module encapsulates package installation functionality.
+"""This module encapsulates package installation functionality.
The PackageInstaller coordinates concurrent builds of packages for the same
Spack instance by leveraging the dependency DAG and file system locks. It
@@ -17,16 +16,18 @@ of separate packages associated with a spec.
File system locks enable coordination such that no two processes attempt to
build the same or a failed dependency package.
-Failures to install dependency packages result in removal of their dependents'
-build tasks from the current process. A failure file is also written (and
-locked) so that other processes can detect the failure and adjust their build
-tasks accordingly.
+If a dependency package fails to install, its dependents' tasks will be
+removed from the installing process's queue. A failure file is also written
+and locked. Other processes use this file to detect the failure and dequeue
+its dependents.
This module supports the coordination of local and distributed concurrent
installations of packages in a Spack instance.
+
"""
import copy
+import enum
import glob
import heapq
import io
@@ -36,27 +37,30 @@ import shutil
import sys
import time
from collections import defaultdict
-from typing import Dict, Iterator, List, Optional, Set, Tuple
+from gzip import GzipFile
+from typing import Dict, Iterator, List, Optional, Set, Tuple, Union
import llnl.util.filesystem as fs
import llnl.util.lock as lk
import llnl.util.tty as tty
+from llnl.string import ordinal
from llnl.util.lang import pretty_seconds
from llnl.util.tty.color import colorize
from llnl.util.tty.log import log_output
import spack.binary_distribution as binary_distribution
import spack.build_environment
-import spack.compilers
+import spack.builder
import spack.config
import spack.database
import spack.deptypes as dt
import spack.error
import spack.hooks
-import spack.mirror
+import spack.mirrors.mirror
import spack.package_base
import spack.package_prefs as prefs
import spack.repo
+import spack.rewiring
import spack.spec
import spack.store
import spack.util.executable
@@ -70,25 +74,32 @@ from spack.util.executable import which
#: were added (see https://docs.python.org/2/library/heapq.html).
_counter = itertools.count(0)
-#: Build status indicating task has been added.
-STATUS_ADDED = "queued"
-#: Build status indicating the spec failed to install
-STATUS_FAILED = "failed"
+class BuildStatus(enum.Enum):
+ """Different build (task) states."""
+
+ #: Build status indicating task has been added/queued.
+ QUEUED = enum.auto()
+
+ #: Build status indicating the spec failed to install
+ FAILED = enum.auto()
+
+ #: Build status indicating the spec is being installed (possibly by another
+ #: process)
+ INSTALLING = enum.auto()
-#: Build status indicating the spec is being installed (possibly by another
-#: process)
-STATUS_INSTALLING = "installing"
+ #: Build status indicating the spec was sucessfully installed
+ INSTALLED = enum.auto()
-#: Build status indicating the spec was sucessfully installed
-STATUS_INSTALLED = "installed"
+ #: Build status indicating the task has been popped from the queue
+ DEQUEUED = enum.auto()
-#: Build status indicating the task has been popped from the queue
-STATUS_DEQUEUED = "dequeued"
+ #: Build status indicating task has been removed (to maintain priority
+ #: queue invariants).
+ REMOVED = enum.auto()
-#: Build status indicating task has been removed (to maintain priority
-#: queue invariants).
-STATUS_REMOVED = "removed"
+ def __str__(self):
+ return f"{self.name.lower()}"
def _write_timer_json(pkg, timer, cache):
@@ -101,13 +112,22 @@ def _write_timer_json(pkg, timer, cache):
return
-class InstallAction:
+class ExecuteResult(enum.Enum):
+ # Task succeeded
+ SUCCESS = enum.auto()
+ # Task failed
+ FAILED = enum.auto()
+ # Task is missing build spec and will be requeued
+ MISSING_BUILD_SPEC = enum.auto()
+
+
+class InstallAction(enum.Enum):
#: Don't perform an install
- NONE = 0
+ NONE = enum.auto()
#: Do a standard install
- INSTALL = 1
+ INSTALL = enum.auto()
#: Do an overwrite install
- OVERWRITE = 2
+ OVERWRITE = enum.auto()
class InstallStatus:
@@ -118,7 +138,7 @@ class InstallStatus:
self.pkg_ids: Set[str] = set()
def next_pkg(self, pkg: "spack.package_base.PackageBase"):
- pkg_id = package_id(pkg)
+ pkg_id = package_id(pkg.spec)
if pkg_id not in self.pkg_ids:
self.pkg_num += 1
@@ -193,7 +213,7 @@ def _check_last_phase(pkg: "spack.package_base.PackageBase") -> None:
Raises:
``BadInstallPhase`` if stop_before or last phase is invalid
"""
- phases = pkg.builder.phases # type: ignore[attr-defined]
+ phases = spack.builder.create(pkg).phases # type: ignore[attr-defined]
if pkg.stop_before_phase and pkg.stop_before_phase not in phases: # type: ignore[attr-defined]
raise BadInstallPhase(pkg.name, pkg.stop_before_phase) # type: ignore[attr-defined]
@@ -220,12 +240,12 @@ def _handle_external_and_upstream(pkg: "spack.package_base.PackageBase", explici
# consists in module file generation and registration in the DB.
if pkg.spec.external:
_process_external_package(pkg, explicit)
- _print_installed_pkg(f"{pkg.prefix} (external {package_id(pkg)})")
+ _print_installed_pkg(f"{pkg.prefix} (external {package_id(pkg.spec)})")
return True
if pkg.spec.installed_upstream:
tty.verbose(
- f"{package_id(pkg)} is installed in an upstream Spack instance at "
+ f"{package_id(pkg.spec)} is installed in an upstream Spack instance at "
f"{pkg.spec.prefix}"
)
_print_installed_pkg(pkg.prefix)
@@ -275,52 +295,6 @@ def _do_fake_install(pkg: "spack.package_base.PackageBase") -> None:
dump_packages(pkg.spec, packages_dir)
-def _packages_needed_to_bootstrap_compiler(
- compiler: "spack.spec.CompilerSpec", architecture: "spack.spec.ArchSpec", pkgs: list
-) -> List[Tuple["spack.package_base.PackageBase", bool]]:
- """
- Return a list of packages required to bootstrap `pkg`s compiler
-
- Checks Spack's compiler configuration for a compiler that
- matches the package spec.
-
- Args:
- compiler: the compiler to bootstrap
- architecture: the architecture for which to boostrap the compiler
- pkgs: the packages that may need their compiler installed
-
- Return:
- list of tuples of packages and a boolean, 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(f"Bootstrapping {compiler} compiler")
- compilers = spack.compilers.compilers_for_spec(compiler, arch_spec=architecture)
- if compilers:
- return []
-
- dep = spack.compilers.pkg_spec_for_compiler(compiler)
-
- # Set the architecture for the compiler package in a way that allows the
- # concretizer to back off if needed for the older bootstrapping compiler
- dep.constrain(f"platform={str(architecture.platform)}")
- dep.constrain(f"os={str(architecture.os)}")
- dep.constrain(f"target={architecture.target.microarchitecture.family.name}:")
- # concrete CompilerSpec has less info than concrete Spec
- # concretize as Spec to add that information
- dep.concretize()
- # mark compiler as depended-on by the packages that use it
- for pkg in pkgs:
- dep._dependents.add(
- spack.spec.DependencySpec(pkg.spec, dep, depflag=dt.BUILD, virtuals=())
- )
- packages = [(s.package, False) for s in dep.traverse(order="post", root=False)]
-
- packages.append((dep.package, True))
- return packages
-
-
def _hms(seconds: int) -> str:
"""
Convert seconds to hours, minutes, seconds
@@ -381,17 +355,13 @@ def _print_timer(pre: str, pkg_id: str, timer: timer.BaseTimer) -> None:
def _install_from_cache(
- pkg: "spack.package_base.PackageBase",
- cache_only: bool,
- explicit: bool,
- unsigned: Optional[bool] = False,
+ pkg: "spack.package_base.PackageBase", explicit: bool, unsigned: Optional[bool] = False
) -> bool:
"""
- Extract the package from binary cache
+ Install the package from binary cache
Args:
pkg: package to install from the binary cache
- cache_only: only extract from binary cache
explicit: ``True`` if installing the package was explicitly
requested by the user, otherwise, ``False``
unsigned: if ``True`` or ``False`` override the mirror signature verification defaults
@@ -402,15 +372,11 @@ def _install_from_cache(
installed_from_cache = _try_install_from_binary_cache(
pkg, explicit, unsigned=unsigned, timer=t
)
- pkg_id = package_id(pkg)
if not installed_from_cache:
- pre = f"No binary for {pkg_id} found"
- if cache_only:
- tty.die(f"{pre} when cache-only specified")
-
- tty.msg(f"{pre}: installing from source")
return False
t.stop()
+
+ pkg_id = package_id(pkg.spec)
tty.debug(f"Successfully extracted {pkg_id} from binary cache")
_write_timer_json(pkg, t, True)
@@ -447,7 +413,7 @@ def _process_external_package(pkg: "spack.package_base.PackageBase", explicit: b
tty.debug(f"{pre} already registered in DB")
record = spack.store.STORE.db.get_record(spec)
if explicit and not record.explicit:
- spack.store.STORE.db.update_explicit(spec, explicit)
+ spack.store.STORE.db.mark(spec, "explicit", True)
except KeyError:
# If not, register it and generate the module file.
@@ -458,7 +424,7 @@ def _process_external_package(pkg: "spack.package_base.PackageBase", explicit: b
# Add to the DB
tty.debug(f"{pre} registering into DB")
- spack.store.STORE.db.add(spec, None, explicit=explicit)
+ spack.store.STORE.db.add(spec, explicit=explicit)
def _process_binary_cache_tarball(
@@ -485,19 +451,27 @@ def _process_binary_cache_tarball(
"""
with timer.measure("fetch"):
download_result = binary_distribution.download_tarball(
- pkg.spec, unsigned, mirrors_for_spec
+ pkg.spec.build_spec, unsigned, mirrors_for_spec
)
if download_result is None:
return False
- tty.msg(f"Extracting {package_id(pkg)} from binary cache")
+ tty.msg(f"Extracting {package_id(pkg.spec)} from binary cache")
with timer.measure("install"), spack.util.path.filter_padding():
binary_distribution.extract_tarball(pkg.spec, download_result, force=False, timer=timer)
+ if pkg.spec.spliced: # overwrite old metadata with new
+ spack.store.STORE.layout.write_spec(
+ pkg.spec, spack.store.STORE.layout.spec_file_path(pkg.spec)
+ )
+
+ if hasattr(pkg, "_post_buildcache_install_hook"):
+ pkg._post_buildcache_install_hook()
+
pkg.installed_from_binary_cache = True
- spack.store.STORE.db.add(pkg.spec, spack.store.STORE.layout, explicit=explicit)
+ spack.store.STORE.db.add(pkg.spec, explicit=explicit)
return True
@@ -517,10 +491,10 @@ def _try_install_from_binary_cache(
timer: timer to keep track of binary install phases.
"""
# Early exit if no binary mirrors are configured.
- if not spack.mirror.MirrorCollection(binary=True):
+ if not spack.mirrors.mirror.MirrorCollection(binary=True):
return False
- tty.debug(f"Searching for binary cache of {package_id(pkg)}")
+ tty.debug(f"Searching for binary cache of {package_id(pkg.spec)}")
with timer.measure("search"):
matches = binary_distribution.get_mirrors_for_spec(pkg.spec, index_only=True)
@@ -585,7 +559,7 @@ def dump_packages(spec: "spack.spec.Spec", path: str) -> None:
# Create a source repo and get the pkg directory out of it.
try:
- source_repo = spack.repo.Repo(source_repo_root)
+ source_repo = spack.repo.from_path(source_repo_root)
source_pkg_dir = source_repo.dirname_for_package_name(node.name)
except spack.repo.RepoError as err:
tty.debug(f"Failed to create source repo for {node.name}: {str(err)}")
@@ -596,16 +570,14 @@ def dump_packages(spec: "spack.spec.Spec", path: str) -> None:
dest_repo_root = os.path.join(path, node.namespace)
if not os.path.exists(dest_repo_root):
spack.repo.create_repo(dest_repo_root)
- repo = spack.repo.Repo(dest_repo_root)
+ repo = spack.repo.from_path(dest_repo_root)
# Get the location of the package in the dest repo.
dest_pkg_dir = repo.dirname_for_package_name(node.name)
if node is spec:
spack.repo.PATH.dump_provenance(node, dest_pkg_dir)
elif source_pkg_dir:
- fs.install_tree(
- source_pkg_dir, dest_pkg_dir, allow_broken_symlinks=(sys.platform != "win32")
- )
+ fs.install_tree(source_pkg_dir, dest_pkg_dir)
def get_dependent_ids(spec: "spack.spec.Spec") -> List[str]:
@@ -617,7 +589,7 @@ def get_dependent_ids(spec: "spack.spec.Spec") -> List[str]:
Returns: list of package ids
"""
- return [package_id(d.package) for d in spec.dependents()]
+ return [package_id(d) for d in spec.dependents()]
def install_msg(name: str, pid: int, install_status: InstallStatus) -> str:
@@ -646,13 +618,12 @@ def archive_install_logs(pkg: "spack.package_base.PackageBase", phase_log_dir: s
pkg: the package that was built and installed
phase_log_dir: path to the archive directory
"""
- # Archive the whole stdout + stderr for the package
- fs.install(pkg.log_path, pkg.install_log_path)
-
- # Archive all phase log paths
- for phase_log in pkg.phase_log_files:
- log_file = os.path.basename(phase_log)
- fs.install(phase_log, os.path.join(phase_log_dir, log_file))
+ # Copy a compressed version of the install log
+ with open(pkg.log_path, "rb") as f, open(pkg.install_log_path, "wb") as g:
+ # Use GzipFile directly so we can omit filename / mtime in header
+ gzip_file = GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=g)
+ shutil.copyfileobj(f, gzip_file)
+ gzip_file.close()
# Archive the install-phase test log, if present
pkg.archive_install_test_log()
@@ -691,7 +662,7 @@ def log(pkg: "spack.package_base.PackageBase") -> None:
spack.store.STORE.layout.metadata_path(pkg.spec), "archived-files"
)
- for glob_expr in pkg.builder.archive_files:
+ for glob_expr in spack.builder.create(pkg).archive_files:
# Check that we are trying to copy things that are
# in the stage tree (not arbitrary files)
abs_expr = os.path.realpath(glob_expr)
@@ -728,10 +699,10 @@ def log(pkg: "spack.package_base.PackageBase") -> None:
dump_packages(pkg.spec, packages_dir)
-def package_id(pkg: "spack.package_base.PackageBase") -> str:
+def package_id(spec: "spack.spec.Spec") -> str:
"""A "unique" package identifier for installation purposes
- The identifier is used to track build tasks, locks, install, and
+ The identifier is used to track tasks, locks, install, and
failure statuses.
The identifier needs to distinguish between combinations of compilers
@@ -740,10 +711,10 @@ def package_id(pkg: "spack.package_base.PackageBase") -> str:
Args:
pkg: the package from which the identifier is derived
"""
- if not pkg.spec.concrete:
+ if not spec.concrete:
raise ValueError("Cannot provide a unique, readable id when the spec is not concretized.")
- return f"{pkg.name}-{pkg.version}-{pkg.spec.dag_hash()}"
+ return f"{spec.name}-{spec.version}-{spec.dag_hash()}"
class BuildRequest:
@@ -765,15 +736,11 @@ class BuildRequest:
if not self.pkg.spec.concrete:
raise ValueError(f"{self.pkg.name} must have a concrete spec")
- # Cache the package phase options with the explicit package,
- # popping the options to ensure installation of associated
- # dependencies is NOT affected by these options.
-
- self.pkg.stop_before_phase = install_args.pop("stop_before", None) # type: ignore[attr-defined] # noqa: E501
- self.pkg.last_phase = install_args.pop("stop_at", None) # type: ignore[attr-defined]
+ self.pkg.stop_before_phase = install_args.get("stop_before") # type: ignore[attr-defined] # noqa: E501
+ self.pkg.last_phase = install_args.get("stop_at") # type: ignore[attr-defined]
# Cache the package id for convenience
- self.pkg_id = package_id(pkg)
+ self.pkg_id = package_id(pkg.spec)
# Save off the original install arguments plus standard defaults
# since they apply to the requested package *and* dependencies.
@@ -788,20 +755,20 @@ class BuildRequest:
# are not able to return full dependents for all packages across
# environment specs.
self.dependencies = set(
- package_id(d.package)
+ package_id(d)
for d in self.pkg.spec.dependencies(deptype=self.get_depflags(self.pkg))
- if package_id(d.package) != self.pkg_id
+ if package_id(d) != self.pkg_id
)
def __repr__(self) -> str:
- """Returns a formal representation of the build request."""
+ """Return a formal representation of the build request."""
rep = f"{self.__class__.__name__}("
for attr, value in self.__dict__.items():
rep += f"{attr}={value.__repr__()}, "
return f"{rep.strip(', ')})"
def __str__(self) -> str:
- """Returns a printable version of the build request."""
+ """Return a printable version of the build request."""
return f"package={self.pkg.name}, install_args={self.install_args}"
def _add_default_args(self) -> None:
@@ -840,7 +807,7 @@ class BuildRequest:
depflag = dt.LINK | dt.RUN
include_build_deps = self.install_args.get("include_build_deps")
- if self.pkg_id == package_id(pkg):
+ if self.pkg_id == package_id(pkg.spec):
cache_only = self.install_args.get("package_cache_only")
else:
cache_only = self.install_args.get("dependencies_cache_only")
@@ -898,67 +865,80 @@ class BuildRequest:
yield dep
-class BuildTask:
- """Class for representing the build task for a package."""
+class Task:
+ """Base class for representing a task for a package."""
def __init__(
self,
pkg: "spack.package_base.PackageBase",
- request: Optional[BuildRequest],
- compiler: bool,
- start: float,
- attempts: int,
- status: str,
- installed: Set[str],
+ request: BuildRequest,
+ *,
+ compiler: bool = False,
+ start: float = 0.0,
+ attempts: int = 0,
+ status: BuildStatus = BuildStatus.QUEUED,
+ installed: Set[str] = set(),
):
"""
- Instantiate a build task for a package.
+ Instantiate a task for a package.
Args:
pkg: the package to be built and installed
- request: the associated install request where ``None`` can be
- used to indicate the package was explicitly requested by the user
- compiler: whether task is for a bootstrap compiler
+ request: the associated install request
start: the initial start time for the package, in seconds
- attempts: the number of attempts to install the package
+ attempts: the number of attempts to install the package, which
+ should be 0 when the task is initially instantiated
status: the installation status
- installed: the identifiers of packages that have
+ installed: the (string) identifiers of packages that have
been installed so far
+
+ Raises:
+ ``InstallError`` if the build status is incompatible with the task
+ ``TypeError`` if provided an argument of the wrong type
+ ``ValueError`` if provided an argument with the wrong value or state
"""
# Ensure dealing with a package that has a concrete spec
if not isinstance(pkg, spack.package_base.PackageBase):
- raise ValueError(f"{str(pkg)} must be a package")
+ raise TypeError(f"{str(pkg)} must be a package")
self.pkg = pkg
if not self.pkg.spec.concrete:
raise ValueError(f"{self.pkg.name} must have a concrete spec")
# The "unique" identifier for the task's package
- self.pkg_id = package_id(self.pkg)
+ self.pkg_id = package_id(self.pkg.spec)
# The explicit build request associated with the package
if not isinstance(request, BuildRequest):
- raise ValueError(f"{str(pkg)} must have a build request")
-
+ raise TypeError(f"{request} is not a valid build request")
self.request = request
# Initialize the status to an active state. The status is used to
# ensure priority queue invariants when tasks are "removed" from the
# queue.
- if status == STATUS_REMOVED:
- raise InstallError(
- f"Cannot create a build task for {self.pkg_id} with status '{status}'", pkg=pkg
- )
+ if not isinstance(status, BuildStatus):
+ raise TypeError(f"{status} is not a valid build status")
+ # The initial build task cannot have status "removed".
+ if attempts == 0 and status == BuildStatus.REMOVED:
+ raise spack.error.InstallError(
+ f"Cannot create a task for {self.pkg_id} with status '{status}'", pkg=pkg
+ )
self.status = status
- # Package is associated with a bootstrap compiler
- self.compiler = compiler
+ # cache the PID, which is used for distributed build messages in self.execute
+ self.pid = os.getpid()
# The initial start time for processing the spec
self.start = start
+ if not isinstance(installed, set):
+ raise TypeError(
+ f"BuildTask constructor requires 'installed' be a 'set', "
+ f"not '{installed.__class__.__name__}'."
+ )
+
# Set of dependents, which needs to include the requesting package
# to support tracking of parallel, multi-spec, environment installs.
self.dependents = set(get_dependent_ids(self.pkg.spec))
@@ -973,38 +953,28 @@ class BuildTask:
# if use traverse for transitive dependencies, then must remove
# transitive dependents on failure.
self.dependencies = set(
- package_id(d.package)
+ package_id(d)
for d in self.pkg.spec.dependencies(deptype=self.request.get_depflags(self.pkg))
- if package_id(d.package) != self.pkg_id
+ if package_id(d) != self.pkg_id
)
- # Handle bootstrapped compiler
- #
- # The bootstrapped compiler is not a dependency in the spec, but it is
- # a dependency of the build task. Here we add it to self.dependencies
- compiler_spec = self.pkg.spec.compiler
- arch_spec = self.pkg.spec.architecture
- if not spack.compilers.compilers_for_spec(compiler_spec, arch_spec=arch_spec):
- # The compiler is in the queue, identify it as dependency
- dep = spack.compilers.pkg_spec_for_compiler(compiler_spec)
- dep.constrain(f"platform={str(arch_spec.platform)}")
- dep.constrain(f"os={str(arch_spec.os)}")
- dep.constrain(f"target={arch_spec.target.microarchitecture.family.name}:")
- dep.concretize()
- dep_id = package_id(dep.package)
- self.dependencies.add(dep_id)
-
# List of uninstalled dependencies, which is used to establish
- # the priority of the build task.
- #
+ # the priority of the task.
self.uninstalled_deps = set(
pkg_id for pkg_id in self.dependencies if pkg_id not in installed
)
# Ensure key sequence-related properties are updated accordingly.
- self.attempts = 0
+ self.attempts = attempts
self._update()
+ def execute(self, install_status: InstallStatus) -> ExecuteResult:
+ """Execute the work of this task.
+
+ The ``install_status`` is an ``InstallStatus`` object used to format progress reporting for
+ this task in the context of the full ``BuildRequest``."""
+ raise NotImplementedError
+
def __eq__(self, other):
return self.key == other.key
@@ -1024,14 +994,14 @@ class BuildTask:
return self.key != other.key
def __repr__(self) -> str:
- """Returns a formal representation of the build task."""
+ """Returns a formal representation of the task."""
rep = f"{self.__class__.__name__}("
for attr, value in self.__dict__.items():
rep += f"{attr}={value.__repr__()}, "
return f"{rep.strip(', ')})"
def __str__(self) -> str:
- """Returns a printable version of the build task."""
+ """Returns a printable version of the task."""
dependencies = f"#dependencies={len(self.dependencies)}"
return "priority={0}, status={1}, start={2}, {3}".format(
self.priority, self.status, self.start, dependencies
@@ -1048,8 +1018,7 @@ class BuildTask:
def add_dependent(self, pkg_id: str) -> None:
"""
- Ensure the dependent package id is in the task's list so it will be
- properly updated when this package is installed.
+ Ensure the package is in this task's ``dependents`` list.
Args:
pkg_id: package identifier of the dependent package
@@ -1058,6 +1027,20 @@ class BuildTask:
tty.debug(f"Adding {pkg_id} as a dependent of {self.pkg_id}")
self.dependents.add(pkg_id)
+ def add_dependency(self, pkg_id, installed=False):
+ """
+ Ensure the package is in this task's ``dependencies`` list.
+
+ Args:
+ pkg_id (str): package identifier of the dependency package
+ installed (bool): install status of the dependency package
+ """
+ if pkg_id != self.pkg_id and pkg_id not in self.dependencies:
+ tty.debug(f"Adding {pkg_id} as a depencency of {self.pkg_id}")
+ self.dependencies.add(pkg_id)
+ if not installed:
+ self.uninstalled_deps.add(pkg_id)
+
def flag_installed(self, installed: List[str]) -> None:
"""
Ensure the dependency is not considered to still be uninstalled.
@@ -1074,21 +1057,52 @@ class BuildTask:
level=2,
)
+ def _setup_install_dir(self, pkg: "spack.package_base.PackageBase") -> None:
+ """
+ Create and ensure proper access controls for the install directory.
+ Write a small metadata file with the current spack environment.
+
+ Args:
+ pkg: the package to be built and installed
+ """
+ # Move to a module level method.
+ if not os.path.exists(pkg.spec.prefix):
+ path = spack.util.path.debug_padded_filter(pkg.spec.prefix)
+ tty.debug(f"Creating the installation directory {path}")
+ spack.store.STORE.layout.create_install_directory(pkg.spec)
+ else:
+ # Set the proper group for the prefix
+ group = prefs.get_package_group(pkg.spec)
+ if group:
+ fs.chgrp(pkg.spec.prefix, group)
+
+ # Set the proper permissions.
+ # This has to be done after group because changing groups blows
+ # away the sticky group bit on the directory
+ mode = os.stat(pkg.spec.prefix).st_mode
+ perms = prefs.get_package_dir_permissions(pkg.spec)
+ if mode != perms:
+ os.chmod(pkg.spec.prefix, perms)
+
+ # Ensure the metadata path exists as well
+ fs.mkdirp(spack.store.STORE.layout.metadata_path(pkg.spec), mode=perms)
+
+ # Always write host environment - we assume this can change
+ spack.store.STORE.layout.write_host_environment(pkg.spec)
+
@property
def explicit(self) -> bool:
- """The package was explicitly requested by the user."""
- return self.is_root and self.request.install_args.get("explicit", True)
+ return self.pkg.spec.dag_hash() in self.request.install_args.get("explicit", [])
@property
- def is_root(self) -> bool:
- """The package was requested directly, but may or may not be explicit
- in an environment."""
+ def is_build_request(self) -> bool:
+ """The package was requested directly"""
return self.pkg == self.request.pkg
@property
def use_cache(self) -> bool:
_use_cache = True
- if self.is_root:
+ if self.is_build_request:
return self.request.install_args.get("package_use_cache", _use_cache)
else:
return self.request.install_args.get("dependencies_use_cache", _use_cache)
@@ -1096,7 +1110,7 @@ class BuildTask:
@property
def cache_only(self) -> bool:
_cache_only = False
- if self.is_root:
+ if self.is_build_request:
return self.request.install_args.get("package_cache_only", _cache_only)
else:
return self.request.install_args.get("dependencies_cache_only", _cache_only)
@@ -1106,7 +1120,7 @@ class BuildTask:
"""The key is the tuple (# uninstalled dependencies, sequence)."""
return (self.priority, self.sequence)
- def next_attempt(self, installed) -> "BuildTask":
+ def next_attempt(self, installed) -> "Task":
"""Create a new, updated task for the next installation attempt."""
task = copy.copy(self)
task._update()
@@ -1120,32 +1134,198 @@ class BuildTask:
return len(self.uninstalled_deps)
+class BuildTask(Task):
+ """Class for representing a build task for a package."""
+
+ def execute(self, install_status):
+ """
+ Perform the installation of the requested spec and/or dependency
+ represented by the build task.
+ """
+ install_args = self.request.install_args
+ tests = install_args.get("tests")
+ unsigned = install_args.get("unsigned")
+
+ pkg, pkg_id = self.pkg, self.pkg_id
+
+ tty.msg(install_msg(pkg_id, self.pid, install_status))
+ self.start = self.start or time.time()
+ self.status = BuildStatus.INSTALLING
+
+ # Use the binary cache if requested
+ if self.use_cache:
+ if _install_from_cache(pkg, self.explicit, unsigned):
+ return ExecuteResult.SUCCESS
+ elif self.cache_only:
+ raise spack.error.InstallError(
+ "No binary found when cache-only was specified", pkg=pkg
+ )
+ else:
+ tty.msg(f"No binary for {pkg_id} found: installing from source")
+
+ pkg.run_tests = tests is True or tests and pkg.name in tests
+
+ # hook that allows tests to inspect the Package before installation
+ # see unit_test_check() docs.
+ if not pkg.unit_test_check():
+ return ExecuteResult.FAILED
+
+ try:
+ # Create stage object now and let it be serialized for the child process. That
+ # way monkeypatch in tests works correctly.
+ pkg.stage
+
+ self._setup_install_dir(pkg)
+
+ # Create a child process to do the actual installation.
+ # Preserve verbosity settings across installs.
+ spack.package_base.PackageBase._verbose = spack.build_environment.start_build_process(
+ pkg, build_process, install_args
+ )
+
+ # Note: PARENT of the build process adds the new package to
+ # the database, so that we don't need to re-read from file.
+ spack.store.STORE.db.add(pkg.spec, explicit=self.explicit)
+ except spack.error.StopPhase as e:
+ # A StopPhase exception means that do_install was asked to
+ # stop early from clients, and is not an error at this point
+ pid = f"{self.pid}: " if tty.show_pid() else ""
+ tty.debug(f"{pid}{str(e)}")
+ tty.debug(f"Package stage directory: {pkg.stage.source_path}")
+ return ExecuteResult.SUCCESS
+
+
+class RewireTask(Task):
+ """Class for representing a rewire task for a package."""
+
+ def execute(self, install_status):
+ """Execute rewire task
+
+ Rewire tasks are executed by either rewiring self.package.spec.build_spec that is already
+ installed or downloading and rewiring a binary for the it.
+
+ If not available installed or as binary, return ExecuteResult.MISSING_BUILD_SPEC.
+ This will prompt the Installer to requeue the task with a dependency on the BuildTask
+ to install self.pkg.spec.build_spec
+ """
+ oldstatus = self.status
+ self.status = BuildStatus.INSTALLING
+ tty.msg(install_msg(self.pkg_id, self.pid, install_status))
+ self.start = self.start or time.time()
+ if not self.pkg.spec.build_spec.installed:
+ try:
+ install_args = self.request.install_args
+ unsigned = install_args.get("unsigned")
+ _process_binary_cache_tarball(self.pkg, explicit=self.explicit, unsigned=unsigned)
+ _print_installed_pkg(self.pkg.prefix)
+ return ExecuteResult.SUCCESS
+ except BaseException as e:
+ tty.error(f"Failed to rewire {self.pkg.spec} from binary. {e}")
+ self.status = oldstatus
+ return ExecuteResult.MISSING_BUILD_SPEC
+ spack.rewiring.rewire_node(self.pkg.spec, self.explicit)
+ _print_installed_pkg(self.pkg.prefix)
+ return ExecuteResult.SUCCESS
+
+
class PackageInstaller:
"""
- Class for managing the install process for a Spack instance based on a
- bottom-up DAG approach.
+ Class for managing the install process for a Spack instance based on a bottom-up DAG approach.
- This installer can coordinate concurrent batch and interactive, local
- and distributed (on a shared file system) builds for the same Spack
- instance.
+ This installer can coordinate concurrent batch and interactive, local and distributed (on a
+ shared file system) builds for the same Spack instance.
"""
- def __init__(self, installs: List[Tuple["spack.package_base.PackageBase", dict]] = []) -> None:
- """Initialize the installer.
-
- Args:
- installs (list): list of tuples, where each
- tuple consists of a package (PackageBase) and its associated
- install arguments (dict)
+ def __init__(
+ self,
+ packages: List["spack.package_base.PackageBase"],
+ *,
+ cache_only: bool = False,
+ dependencies_cache_only: bool = False,
+ dependencies_use_cache: bool = True,
+ dirty: bool = False,
+ explicit: Union[Set[str], bool] = False,
+ overwrite: Optional[Union[List[str], Set[str]]] = None,
+ fail_fast: bool = False,
+ fake: bool = False,
+ include_build_deps: bool = False,
+ install_deps: bool = True,
+ install_package: bool = True,
+ install_source: bool = False,
+ keep_prefix: bool = False,
+ keep_stage: bool = False,
+ package_cache_only: bool = False,
+ package_use_cache: bool = True,
+ restage: bool = False,
+ skip_patch: bool = False,
+ stop_at: Optional[str] = None,
+ stop_before: Optional[str] = None,
+ tests: Union[bool, List[str], Set[str]] = False,
+ unsigned: Optional[bool] = None,
+ use_cache: bool = False,
+ verbose: bool = False,
+ ) -> None:
+ """
+ Arguments:
+ explicit: Set of package hashes to be marked as installed explicitly in the db. If
+ True, the specs from ``packages`` are marked explicit, while their dependencies are
+ not.
+ fail_fast: Fail if any dependency fails to install; otherwise, the default is to
+ install as many dependencies as possible (i.e., best effort installation).
+ fake: Don't really build; install fake stub files instead.
+ install_deps: Install dependencies before installing this package
+ install_source: By default, source is not installed, but for debugging it might be
+ useful to keep it around.
+ keep_prefix: Keep install prefix on failure. By default, destroys it.
+ keep_stage: By default, stage is destroyed only if there are no exceptions during
+ build. Set to True to keep the stage even with exceptions.
+ restage: Force spack to restage the package source.
+ skip_patch: Skip patch stage of build if True.
+ stop_before: stop execution before this installation phase (or None)
+ stop_at: last installation phase to be executed (or None)
+ tests: False to run no tests, True to test all packages, or a list of package names to
+ run tests for some
+ use_cache: Install from binary package, if available.
+ verbose: Display verbose build output (by default, suppresses it)
"""
+ if isinstance(explicit, bool):
+ explicit = {pkg.spec.dag_hash() for pkg in packages} if explicit else set()
+
+ install_args = {
+ "cache_only": cache_only,
+ "dependencies_cache_only": dependencies_cache_only,
+ "dependencies_use_cache": dependencies_use_cache,
+ "dirty": dirty,
+ "explicit": explicit,
+ "fail_fast": fail_fast,
+ "fake": fake,
+ "include_build_deps": include_build_deps,
+ "install_deps": install_deps,
+ "install_package": install_package,
+ "install_source": install_source,
+ "keep_prefix": keep_prefix,
+ "keep_stage": keep_stage,
+ "overwrite": overwrite or [],
+ "package_cache_only": package_cache_only,
+ "package_use_cache": package_use_cache,
+ "restage": restage,
+ "skip_patch": skip_patch,
+ "stop_at": stop_at,
+ "stop_before": stop_before,
+ "tests": tests,
+ "unsigned": unsigned,
+ "use_cache": use_cache,
+ "verbose": verbose,
+ }
+
# List of build requests
- self.build_requests = [BuildRequest(pkg, install_args) for pkg, install_args in installs]
+ self.build_requests = [BuildRequest(pkg, install_args) for pkg in packages]
- # Priority queue of build tasks
- self.build_pq: List[Tuple[Tuple[int, int], BuildTask]] = []
+ # Priority queue of tasks
+ self.build_pq: List[Tuple[Tuple[int, int], Task]] = []
- # Mapping of unique package ids to build task
- self.build_tasks: Dict[str, BuildTask] = {}
+ # Mapping of unique package ids to task
+ self.build_tasks: Dict[str, Task] = {}
# Cache of package locks for failed packages, keyed on package's ids
self.failed: Dict[str, Optional[lk.Lock]] = {}
@@ -1166,6 +1346,9 @@ class PackageInstaller:
# fast then that option applies to all build requests.
self.fail_fast = False
+ # Initializing all_dependencies to empty. This will be set later in _init_queue.
+ self.all_dependencies: Dict[str, Set[str]] = {}
+
def __repr__(self) -> str:
"""Returns a formal representation of the package installer."""
rep = f"{self.__class__.__name__}("
@@ -1181,75 +1364,24 @@ class PackageInstaller:
installed = f"installed ({len(self.installed)}) = {self.installed}"
return f"{self.pid}: {requests}; {tasks}; {installed}; {failed}"
- def _add_bootstrap_compilers(
- self,
- compiler: "spack.spec.CompilerSpec",
- architecture: "spack.spec.ArchSpec",
- pkgs: List["spack.package_base.PackageBase"],
- request: BuildRequest,
- all_deps,
- ) -> None:
- """
- Add bootstrap compilers and dependencies to the build queue.
-
- Args:
- compiler: the compiler to boostrap
- architecture: the architecture for which to bootstrap the compiler
- pkgs: the package list with possible compiler dependencies
- request: the associated install request
- all_deps (defaultdict(set)): dictionary of all dependencies and
- associated dependents
- """
- packages = _packages_needed_to_bootstrap_compiler(compiler, architecture, pkgs)
- for comp_pkg, is_compiler in packages:
- pkgid = package_id(comp_pkg)
- if pkgid not in self.build_tasks:
- self._add_init_task(comp_pkg, request, is_compiler, all_deps)
- elif is_compiler:
- # ensure it's queued as a compiler
- self._modify_existing_task(pkgid, "compiler", True)
-
- def _modify_existing_task(self, pkgid: str, attr, value) -> None:
- """
- Update a task in-place to modify its behavior.
-
- Currently used to update the ``compiler`` field on tasks
- that were originally created as a dependency of a compiler,
- but are compilers in their own right.
-
- For example, ``intel-oneapi-compilers-classic`` depends on
- ``intel-oneapi-compilers``, which can cause the latter to be
- queued first as a non-compiler, and only later as a compiler.
- """
- for i, tup in enumerate(self.build_pq):
- key, task = tup
- if task.pkg_id == pkgid:
- tty.debug(f"Modifying task for {pkgid} to treat it as a compiler", level=2)
- setattr(task, attr, value)
- self.build_pq[i] = (key, task)
-
def _add_init_task(
self,
pkg: "spack.package_base.PackageBase",
- request: Optional[BuildRequest],
- is_compiler: bool,
+ request: BuildRequest,
all_deps: Dict[str, Set[str]],
) -> None:
"""
- Creates and queus the initial build task for the package.
+ Creates and queues the initial task for the package.
Args:
pkg: 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
- is_compiler (bool): whether task is for a bootstrap compiler
- all_deps (defaultdict(set)): dictionary of all dependencies and
- associated dependents
+ request: the associated install request
+ all_deps: dictionary of all dependencies and associated dependents
"""
- task = BuildTask(pkg, request, is_compiler, 0, 0, STATUS_ADDED, self.installed)
+ cls = RewireTask if pkg.spec.spliced else BuildTask
+ task = cls(pkg, request=request, status=BuildStatus.QUEUED, installed=self.installed)
for dep_id in task.dependencies:
- all_deps[dep_id].add(package_id(pkg))
+ all_deps[dep_id].add(package_id(pkg.spec))
self._push_task(task)
@@ -1284,13 +1416,13 @@ class PackageInstaller:
err = "Cannot proceed with {0}: {1}"
for dep in request.traverse_dependencies():
dep_pkg = dep.package
- dep_id = package_id(dep_pkg)
+ dep_id = package_id(dep)
# Check for failure since a prefix lock is not required
if spack.store.STORE.failure_tracker.has_failed(dep):
action = "'spack install' the dependency"
msg = f"{dep_id} is marked as an install failure: {action}"
- raise InstallError(err.format(request.pkg_id, msg), pkg=dep_pkg)
+ raise spack.error.InstallError(err.format(request.pkg_id, msg), pkg=dep_pkg)
# Attempt to get a read lock to ensure another process does not
# uninstall the dependency while the requested spec is being
@@ -1298,7 +1430,7 @@ class PackageInstaller:
ltype, lock = self._ensure_locked("read", dep_pkg)
if lock is None:
msg = f"{dep_id} is write locked by another process"
- raise InstallError(err.format(request.pkg_id, msg), pkg=request.pkg)
+ raise spack.error.InstallError(err.format(request.pkg_id, msg), pkg=request.pkg)
# Flag external and upstream packages as being installed
if dep_pkg.spec.external or dep_pkg.spec.installed_upstream:
@@ -1321,7 +1453,7 @@ class PackageInstaller:
else:
lock.release_read()
- def _prepare_for_install(self, task: BuildTask) -> None:
+ def _prepare_for_install(self, task: Task) -> None:
"""
Check the database and leftover installation directories/files and
prepare for a new install attempt for an uninstalled package.
@@ -1329,12 +1461,11 @@ class PackageInstaller:
and ensuring the database is up-to-date.
Args:
- task (BuildTask): the build task whose associated package is
+ task: the task whose associated package is
being checked
"""
install_args = task.request.install_args
keep_prefix = install_args.get("keep_prefix")
- restage = install_args.get("restage")
# Make sure the package is ready to be locally installed.
self._ensure_install_ready(task.pkg)
@@ -1351,7 +1482,7 @@ class PackageInstaller:
if not installed_in_db:
# Ensure there is no other installed spec with the same prefix dir
if spack.store.STORE.db.is_occupied_install_prefix(task.pkg.spec.prefix):
- raise InstallError(
+ raise spack.error.InstallError(
f"Install prefix collision for {task.pkg_id}",
long_msg=f"Prefix directory {task.pkg.spec.prefix} already "
"used by another installed spec.",
@@ -1366,10 +1497,6 @@ class PackageInstaller:
else:
tty.debug(f"{task.pkg_id} is partially installed")
- # Destroy the stage for a locally installed, non-DIYStage, package
- if restage and task.pkg.stage.managed_by_spack:
- task.pkg.stage.destroy()
-
if (
rec
and installed_in_db
@@ -1381,11 +1508,11 @@ class PackageInstaller:
self._update_installed(task)
# Only update the explicit entry once for the explicit package
- if task.explicit:
- spack.store.STORE.db.update_explicit(task.pkg.spec, True)
+ if task.explicit and not rec.explicit:
+ spack.store.STORE.db.mark(task.pkg.spec, "explicit", True)
def _cleanup_all_tasks(self) -> None:
- """Cleanup all build tasks to include releasing their locks."""
+ """Cleanup all tasks to include releasing their locks."""
for pkg_id in self.locks:
self._release_lock(pkg_id)
@@ -1417,12 +1544,12 @@ class PackageInstaller:
def _cleanup_task(self, pkg: "spack.package_base.PackageBase") -> None:
"""
- Cleanup the build task for the spec
+ Cleanup the task for the spec
Args:
pkg: the package being installed
"""
- self._remove_task(package_id(pkg))
+ self._remove_task(package_id(pkg.spec))
# Ensure we have a read lock to prevent others from uninstalling the
# spec during our installation.
@@ -1436,7 +1563,7 @@ class PackageInstaller:
Args:
pkg: the package being locally installed
"""
- pkg_id = package_id(pkg)
+ pkg_id = package_id(pkg.spec)
pre = f"{pkg_id} cannot be installed locally:"
# External packages cannot be installed locally.
@@ -1478,7 +1605,7 @@ class PackageInstaller:
"write",
], f'"{lock_type}" is not a supported package management lock type'
- pkg_id = package_id(pkg)
+ pkg_id = package_id(pkg.spec)
ltype, lock = self.locks.get(pkg_id, (lock_type, None))
if lock and ltype == lock_type:
return ltype, lock
@@ -1489,7 +1616,7 @@ class PackageInstaller:
if lock_type == "read":
# Wait until the other process finishes if there are no more
- # build tasks with priority 0 (i.e., with no uninstalled
+ # tasks with priority 0 (i.e., with no uninstalled
# dependencies).
no_p0 = len(self.build_tasks) == 0 or not self._next_is_pri0()
timeout = None if no_p0 else 3.0
@@ -1541,6 +1668,33 @@ class PackageInstaller:
self.locks[pkg_id] = (lock_type, lock)
return self.locks[pkg_id]
+ def _requeue_with_build_spec_tasks(self, task):
+ """Requeue the task and its missing build spec dependencies"""
+ # Full install of the build_spec is necessary because it didn't already exist somewhere
+ spec = task.pkg.spec
+ for dep in spec.build_spec.traverse():
+ dep_pkg = dep.package
+
+ dep_id = package_id(dep)
+ if dep_id not in self.build_tasks:
+ self._add_init_task(dep_pkg, task.request, self.all_dependencies)
+
+ # Clear any persistent failure markings _unless_ they are
+ # associated with another process in this parallel build
+ # of the spec.
+ spack.store.STORE.failure_tracker.clear(dep, force=False)
+
+ # Queue the build spec.
+ build_pkg_id = package_id(spec.build_spec)
+ build_spec_task = self.build_tasks[build_pkg_id]
+ spec_pkg_id = package_id(spec)
+ spec_task = task.next_attempt(self.installed)
+ spec_task.status = BuildStatus.QUEUED
+ # Convey a build spec as a dependency of a deployed spec.
+ build_spec_task.add_dependent(spec_pkg_id)
+ spec_task.add_dependency(build_pkg_id)
+ self._push_task(spec_task)
+
def _add_tasks(self, request: BuildRequest, all_deps):
"""Add tasks to the priority queue for the given build request.
@@ -1562,61 +1716,15 @@ class PackageInstaller:
tty.warn(f"Installation request refused: {str(err)}")
return
- # Skip out early if the spec is not being installed locally (i.e., if
- # external or upstream).
- #
- # External and upstream packages need to get flagged as installed to
- # ensure proper status tracking for environment build.
- explicit = request.install_args.get("explicit", True)
- not_local = _handle_external_and_upstream(request.pkg, explicit)
- if not_local:
- self._flag_installed(request.pkg)
- return
-
- install_compilers = spack.config.get("config:install_missing_compilers", False)
-
install_deps = request.install_args.get("install_deps")
- # Bootstrap compilers first
- if install_deps and install_compilers:
- packages_per_compiler: Dict[
- "spack.spec.CompilerSpec",
- Dict["spack.spec.ArchSpec", List["spack.package_base.PackageBase"]],
- ] = {}
-
- for dep in request.traverse_dependencies():
- dep_pkg = dep.package
- compiler = dep_pkg.spec.compiler
- arch = dep_pkg.spec.architecture
- if compiler not in packages_per_compiler:
- packages_per_compiler[compiler] = {}
-
- if arch not in packages_per_compiler[compiler]:
- packages_per_compiler[compiler][arch] = []
-
- packages_per_compiler[compiler][arch].append(dep_pkg)
-
- compiler = request.pkg.spec.compiler
- arch = request.pkg.spec.architecture
-
- if compiler not in packages_per_compiler:
- packages_per_compiler[compiler] = {}
-
- if arch not in packages_per_compiler[compiler]:
- packages_per_compiler[compiler][arch] = []
-
- packages_per_compiler[compiler][arch].append(request.pkg)
-
- for compiler, archs in packages_per_compiler.items():
- for arch, packages in archs.items():
- self._add_bootstrap_compilers(compiler, arch, packages, request, all_deps)
if install_deps:
for dep in request.traverse_dependencies():
dep_pkg = dep.package
- dep_id = package_id(dep_pkg)
+ dep_id = package_id(dep)
if dep_id not in self.build_tasks:
- self._add_init_task(dep_pkg, request, False, all_deps)
+ self._add_init_task(dep_pkg, request, all_deps=all_deps)
# Clear any persistent failure markings _unless_ they are
# associated with another process in this parallel build
@@ -1634,89 +1742,29 @@ class PackageInstaller:
self._check_deps_status(request)
# Now add the package itself, if appropriate
- self._add_init_task(request.pkg, request, False, all_deps)
+ self._add_init_task(request.pkg, request, all_deps=all_deps)
# Ensure if one request is to fail fast then all requests will.
fail_fast = bool(request.install_args.get("fail_fast"))
self.fail_fast = self.fail_fast or fail_fast
- def _add_compiler_package_to_config(self, pkg: "spack.package_base.PackageBase") -> None:
- compiler_search_prefix = getattr(pkg, "compiler_search_prefix", pkg.spec.prefix)
- spack.compilers.add_compilers_to_config(
- spack.compilers.find_compilers([compiler_search_prefix])
- )
-
- def _install_task(self, task: BuildTask, install_status: InstallStatus) -> None:
+ def _install_task(self, task: Task, install_status: InstallStatus) -> None:
"""
Perform the installation of the requested spec and/or dependency
- represented by the build task.
+ represented by the task.
Args:
- task: the installation build task for a package
+ task: the installation task for a package
install_status: the installation status for the package"""
-
- explicit = task.explicit
- install_args = task.request.install_args
- cache_only = task.cache_only
- use_cache = task.use_cache
- tests = install_args.get("tests", False)
- assert isinstance(tests, (bool, list)) # make mypy happy.
- unsigned: Optional[bool] = install_args.get("unsigned")
-
- pkg, pkg_id = task.pkg, task.pkg_id
-
- tty.msg(install_msg(pkg_id, self.pid, install_status))
- task.start = task.start or time.time()
- task.status = STATUS_INSTALLING
-
- # Use the binary cache if requested
- if use_cache and _install_from_cache(pkg, cache_only, explicit, unsigned):
+ rc = task.execute(install_status)
+ if rc == ExecuteResult.MISSING_BUILD_SPEC:
+ self._requeue_with_build_spec_tasks(task)
+ else: # if rc == ExecuteResult.SUCCESS or rc == ExecuteResult.FAILED
self._update_installed(task)
- if task.compiler:
- self._add_compiler_package_to_config(pkg)
- return
-
- pkg.run_tests = tests if isinstance(tests, bool) else pkg.name in tests
-
- # hook that allows tests to inspect the Package before installation
- # see unit_test_check() docs.
- if not pkg.unit_test_check():
- return
-
- # Injecting information to know if this installation request is the root one
- # to determine in BuildProcessInstaller whether installation is explicit or not
- install_args["is_root"] = task.is_root
-
- try:
- self._setup_install_dir(pkg)
-
- # Create a child process to do the actual installation.
- # Preserve verbosity settings across installs.
- spack.package_base.PackageBase._verbose = spack.build_environment.start_build_process(
- pkg, build_process, install_args
- )
- # Currently this is how RPATH-like behavior is achieved on Windows, after install
- # establish runtime linkage via Windows Runtime link object
- # Note: this is a no-op on non Windows platforms
- pkg.windows_establish_runtime_linkage()
- # Note: PARENT of the build process adds the new package to
- # the database, so that we don't need to re-read from file.
- spack.store.STORE.db.add(pkg.spec, spack.store.STORE.layout, explicit=explicit)
-
- # If a compiler, ensure it is added to the configuration
- if task.compiler:
- self._add_compiler_package_to_config(pkg)
- except spack.build_environment.StopPhase as e:
- # A StopPhase exception means that do_install was asked to
- # stop early from clients, and is not an error at this point
- spack.hooks.on_install_failure(task.request.pkg.spec)
- pid = f"{self.pid}: " if tty.show_pid() else ""
- tty.debug(f"{pid}{str(e)}")
- tty.debug(f"Package stage directory: {pkg.stage.source_path}")
def _next_is_pri0(self) -> bool:
"""
- Determine if the next build task has priority 0
+ Determine if the next task has priority 0
Return:
True if it does, False otherwise
@@ -1726,31 +1774,31 @@ class PackageInstaller:
task = self.build_pq[0][1]
return task.priority == 0
- def _pop_task(self) -> Optional[BuildTask]:
+ def _pop_task(self) -> Optional[Task]:
"""
- Remove and return the lowest priority build task.
+ Remove and return the lowest priority task.
Source: Variant of function at docs.python.org/2/library/heapq.html
"""
while self.build_pq:
task = heapq.heappop(self.build_pq)[1]
- if task.status != STATUS_REMOVED:
+ if task.status != BuildStatus.REMOVED:
del self.build_tasks[task.pkg_id]
- task.status = STATUS_DEQUEUED
+ task.status = BuildStatus.DEQUEUED
return task
return None
- def _push_task(self, task: BuildTask) -> None:
+ def _push_task(self, task: Task) -> None:
"""
- Push (or queue) the specified build task for the package.
+ Push (or queue) the specified task for the package.
Source: Customization of "add_task" function at
docs.python.org/2/library/heapq.html
Args:
- task: the installation build task for a package
+ task: the installation task for a package
"""
- msg = "{0} a build task for {1} with status '{2}'"
+ msg = "{0} a task for {1} with status '{2}'"
skip = "Skipping requeue of task for {0}: {1}"
# Ensure do not (re-)queue installed or failed packages whose status
@@ -1763,9 +1811,11 @@ class PackageInstaller:
tty.debug(skip.format(task.pkg_id, "failed"))
return
- # Remove any associated build task since its sequence will change
+ # Remove any associated task since its sequence will change
self._remove_task(task.pkg_id)
- desc = "Queueing" if task.attempts == 0 else "Requeueing"
+ desc = (
+ "Queueing" if task.attempts == 1 else f"Requeueing ({ordinal(task.attempts)} attempt)"
+ )
tty.debug(msg.format(desc, task.pkg_id, task.status))
# Now add the new task to the queue with a new sequence number to
@@ -1796,9 +1846,9 @@ class PackageInstaller:
except Exception as exc:
tty.warn(err.format(exc.__class__.__name__, ltype, pkg_id, str(exc)))
- def _remove_task(self, pkg_id: str) -> Optional[BuildTask]:
+ def _remove_task(self, pkg_id: str) -> Optional[Task]:
"""
- Mark the existing package build task as being removed and return it.
+ Mark the existing package task as being removed and return it.
Raises KeyError if not found.
Source: Variant of function at docs.python.org/2/library/heapq.html
@@ -1807,71 +1857,39 @@ class PackageInstaller:
pkg_id: identifier for the package to be removed
"""
if pkg_id in self.build_tasks:
- tty.debug(f"Removing build task for {pkg_id} from list")
+ tty.debug(f"Removing task for {pkg_id} from list")
task = self.build_tasks.pop(pkg_id)
- task.status = STATUS_REMOVED
+ task.status = BuildStatus.REMOVED
return task
else:
return None
- def _requeue_task(self, task: BuildTask, install_status: InstallStatus) -> None:
+ def _requeue_task(self, task: Task, install_status: InstallStatus) -> None:
"""
Requeues a task that appears to be in progress by another process.
Args:
- task (BuildTask): the installation build task for a package
+ task (Task): the installation task for a package
"""
- if task.status not in [STATUS_INSTALLED, STATUS_INSTALLING]:
+ if task.status not in [BuildStatus.INSTALLED, BuildStatus.INSTALLING]:
tty.debug(
f"{install_msg(task.pkg_id, self.pid, install_status)} "
"in progress by another process"
)
new_task = task.next_attempt(self.installed)
- new_task.status = STATUS_INSTALLING
+ new_task.status = BuildStatus.INSTALLING
self._push_task(new_task)
- def _setup_install_dir(self, pkg: "spack.package_base.PackageBase") -> None:
- """
- Create and ensure proper access controls for the install directory.
- Write a small metadata file with the current spack environment.
-
- Args:
- pkg: the package to be built and installed
- """
- if not os.path.exists(pkg.spec.prefix):
- path = spack.util.path.debug_padded_filter(pkg.spec.prefix)
- tty.debug(f"Creating the installation directory {path}")
- spack.store.STORE.layout.create_install_directory(pkg.spec)
- else:
- # Set the proper group for the prefix
- group = prefs.get_package_group(pkg.spec)
- if group:
- fs.chgrp(pkg.spec.prefix, group)
-
- # Set the proper permissions.
- # This has to be done after group because changing groups blows
- # away the sticky group bit on the directory
- mode = os.stat(pkg.spec.prefix).st_mode
- perms = prefs.get_package_dir_permissions(pkg.spec)
- if mode != perms:
- os.chmod(pkg.spec.prefix, perms)
-
- # Ensure the metadata path exists as well
- fs.mkdirp(spack.store.STORE.layout.metadata_path(pkg.spec), mode=perms)
-
- # Always write host environment - we assume this can change
- spack.store.STORE.layout.write_host_environment(pkg.spec)
-
def _update_failed(
- self, task: BuildTask, mark: bool = False, exc: Optional[BaseException] = None
+ self, task: Task, mark: bool = False, exc: Optional[BaseException] = None
) -> None:
"""
Update the task and transitive dependents as failed; optionally mark
- externally as failed; and remove associated build tasks.
+ externally as failed; and remove associated tasks.
Args:
- task: the build task for the failed package
+ task: the task for the failed package
mark: ``True`` if the package and its dependencies are to
be marked as "failed", otherwise, ``False``
exc: optional exception if associated with the failure
@@ -1883,34 +1901,34 @@ class PackageInstaller:
self.failed[pkg_id] = spack.store.STORE.failure_tracker.mark(task.pkg.spec)
else:
self.failed[pkg_id] = None
- task.status = STATUS_FAILED
+ task.status = BuildStatus.FAILED
for dep_id in task.dependents:
if dep_id in self.build_tasks:
tty.warn(f"Skipping build of {dep_id} since {pkg_id} failed")
# Ensure the dependent's uninstalled dependents are
- # up-to-date and their build tasks removed.
+ # up-to-date and their tasks removed.
dep_task = self.build_tasks[dep_id]
self._update_failed(dep_task, mark)
self._remove_task(dep_id)
else:
- tty.debug(f"No build task for {dep_id} to skip since {pkg_id} failed")
+ tty.debug(f"No task for {dep_id} to skip since {pkg_id} failed")
- def _update_installed(self, task: BuildTask) -> None:
+ def _update_installed(self, task: Task) -> None:
"""
- Mark the task as installed and ensure dependent build tasks are aware.
+ Mark the task as installed and ensure dependent tasks are aware.
Args:
- task (BuildTask): the build task for the installed package
+ task: the task for the installed package
"""
- task.status = STATUS_INSTALLED
+ task.status = BuildStatus.INSTALLED
self._flag_installed(task.pkg, task.dependents)
def _flag_installed(
self, pkg: "spack.package_base.PackageBase", dependent_ids: Optional[Set[str]] = None
) -> None:
"""
- Flag the package as installed and ensure known by all build tasks of
+ Flag the package as installed and ensure known by all tasks of
known dependents.
Args:
@@ -1918,7 +1936,7 @@ class PackageInstaller:
dependent_ids: set of the package's dependent ids, or None if the dependent ids are
limited to those maintained in the package (dependency DAG)
"""
- pkg_id = package_id(pkg)
+ pkg_id = package_id(pkg.spec)
if pkg_id in self.installed:
# Already determined the package has been installed
@@ -1938,7 +1956,7 @@ class PackageInstaller:
dep_task = self.build_tasks[dep_id]
self._push_task(dep_task.next_attempt(self.installed))
else:
- tty.debug(f"{dep_id} has no build task to update for {pkg_id}'s success")
+ tty.debug(f"{dep_id} has no task to update for {pkg_id}'s success")
def _init_queue(self) -> None:
"""Initialize the build queue from the list of build requests."""
@@ -1957,8 +1975,9 @@ class PackageInstaller:
task = self.build_tasks[dep_id]
for dependent_id in dependents.difference(task.dependents):
task.add_dependent(dependent_id)
+ self.all_dependencies = all_dependencies
- def _install_action(self, task: BuildTask) -> int:
+ def _install_action(self, task: Task) -> InstallAction:
"""
Determine whether the installation should be overwritten (if it already
exists) or skipped (if has been handled by another process).
@@ -1999,8 +2018,8 @@ class PackageInstaller:
self._init_queue()
fail_fast_err = "Terminating after first install failure"
- single_explicit_spec = len(self.build_requests) == 1
- failed_explicits = []
+ single_requested_spec = len(self.build_requests) == 1
+ failed_build_requests = []
install_status = InstallStatus(len(self.build_pq))
@@ -2015,7 +2034,6 @@ class PackageInstaller:
if task is None:
continue
- spack.hooks.on_install_start(task.request.pkg.spec)
install_args = task.request.install_args
keep_prefix = install_args.get("keep_prefix")
@@ -2041,10 +2059,7 @@ class PackageInstaller:
tty.warn(f"{pkg_id} does NOT actually have any uninstalled deps left")
dep_str = "dependencies" if task.priority > 1 else "dependency"
- # Hook to indicate task failure, but without an exception
- spack.hooks.on_install_failure(task.request.pkg.spec)
-
- raise InstallError(
+ raise spack.error.InstallError(
f"Cannot proceed with {pkg_id}: {task.priority} uninstalled "
f"{dep_str}: {','.join(task.uninstalled_deps)}",
pkg=pkg,
@@ -2053,11 +2068,10 @@ class PackageInstaller:
# Skip the installation if the spec is not being installed locally
# (i.e., if external or upstream) BUT flag it as installed since
# some package likely depends on it.
- if not task.explicit:
- if _handle_external_and_upstream(pkg, False):
- term_status.clear()
- self._flag_installed(pkg, task.dependents)
- continue
+ if _handle_external_and_upstream(pkg, task.explicit):
+ term_status.clear()
+ self._flag_installed(pkg, task.dependents)
+ continue
# Flag a failed spec. Do not need an (install) prefix lock since
# assume using a separate (failed) prefix lock file.
@@ -2066,13 +2080,8 @@ class PackageInstaller:
tty.warn(f"{pkg_id} failed to install")
self._update_failed(task)
- # Mark that the package failed
- # TODO: this should also be for the task.pkg, but we don't
- # model transitive yet.
- spack.hooks.on_install_failure(task.request.pkg.spec)
-
if self.fail_fast:
- raise InstallError(fail_fast_err, pkg=pkg)
+ raise spack.error.InstallError(fail_fast_err, pkg=pkg)
continue
@@ -2116,11 +2125,6 @@ class PackageInstaller:
self._update_installed(task)
path = spack.util.path.debug_padded_filter(pkg.prefix)
_print_installed_pkg(path)
-
- # It's an already installed compiler, add it to the config
- if task.compiler:
- self._add_compiler_package_to_config(pkg)
-
else:
# At this point we've failed to get a write or a read
# lock, which means another process has taken a write
@@ -2160,8 +2164,6 @@ class PackageInstaller:
# wrapper -- silence mypy
OverwriteInstall(self, spack.store.STORE.db, task, install_status).install() # type: ignore[arg-type] # noqa: E501
- self._update_installed(task)
-
# If we installed then we should keep the prefix
stop_before_phase = getattr(pkg, "stop_before_phase", None)
last_phase = getattr(pkg, "last_phase", None)
@@ -2173,7 +2175,6 @@ class PackageInstaller:
tty.error(
f"Failed to install {pkg.name} due to " f"{exc.__class__.__name__}: {str(exc)}"
)
- spack.hooks.on_install_cancel(task.request.pkg.spec)
raise
except binary_distribution.NoChecksumException as exc:
@@ -2192,7 +2193,6 @@ class PackageInstaller:
except (Exception, SystemExit) as exc:
self._update_failed(task, True, exc)
- spack.hooks.on_install_failure(task.request.pkg.spec)
# Best effort installs suppress the exception and mark the
# package as a failure.
@@ -2207,16 +2207,15 @@ class PackageInstaller:
)
# Terminate if requested to do so on the first failure.
if self.fail_fast:
- raise InstallError(f"{fail_fast_err}: {str(exc)}", pkg=pkg)
+ raise spack.error.InstallError(
+ f"{fail_fast_err}: {str(exc)}", pkg=pkg
+ ) from exc
- # Terminate at this point if the single explicit spec has
- # failed to install.
- if single_explicit_spec and task.explicit:
- raise
-
- # Track explicit spec id and error to summarize when done
- if task.explicit:
- failed_explicits.append((pkg, pkg_id, str(exc)))
+ # Terminate when a single build request has failed, or summarize errors later.
+ if task.is_build_request:
+ if single_requested_spec:
+ raise
+ failed_build_requests.append((pkg, pkg_id, str(exc)))
finally:
# Remove the install prefix if anything went wrong during
@@ -2224,14 +2223,10 @@ class PackageInstaller:
if not keep_prefix and not action == InstallAction.OVERWRITE:
pkg.remove_prefix()
- # The subprocess *may* have removed the build stage. Mark it
- # not created so that the next time pkg.stage is invoked, we
- # check the filesystem for it.
- pkg.stage.created = False
-
# Perform basic task cleanup for the installed spec to
# include downgrading the write to a read lock
- self._cleanup_task(pkg)
+ if pkg.spec.installed:
+ self._cleanup_task(pkg)
# Cleanup, which includes releasing all of the read locks
self._cleanup_all_tasks()
@@ -2244,16 +2239,16 @@ class PackageInstaller:
if request.install_args.get("install_package") and request.pkg_id not in self.installed
]
- if failed_explicits or missing:
- for _, pkg_id, err in failed_explicits:
+ if failed_build_requests or missing:
+ for _, pkg_id, err in failed_build_requests:
tty.error(f"{pkg_id}: {err}")
for _, pkg_id in missing:
tty.error(f"{pkg_id}: Package was not installed")
- if len(failed_explicits) > 0:
- pkg = failed_explicits[0][0]
- ids = [pkg_id for _, pkg_id, _ in failed_explicits]
+ if len(failed_build_requests) > 0:
+ pkg = failed_build_requests[0][0]
+ ids = [pkg_id for _, pkg_id, _ in failed_build_requests]
tty.debug(
"Associating installation failure with first failed "
f"explicit package ({ids[0]}) from {', '.join(ids)}"
@@ -2267,7 +2262,7 @@ class PackageInstaller:
f"missing package ({ids[0]}) from {', '.join(ids)}"
)
- raise InstallError(
+ raise spack.error.InstallError(
"Installation request failed. Refer to reported errors for failing package(s).",
pkg=pkg,
)
@@ -2284,7 +2279,7 @@ class BuildProcessInstaller:
Arguments:
pkg: the package being installed.
- install_args: arguments to do_install() from parent process.
+ install_args: arguments to the installer from parent process.
"""
self.pkg = pkg
@@ -2295,8 +2290,15 @@ class BuildProcessInstaller:
# whether to install source code with the packag
self.install_source = install_args.get("install_source", False)
+ is_develop = pkg.spec.is_develop
# whether to keep the build stage after installation
- self.keep_stage = install_args.get("keep_stage", False)
+ # Note: user commands do not have an explicit choice to disable
+ # keeping stages (i.e., we have a --keep-stage option, but not
+ # a --destroy-stage option), so we can override a default choice
+ # to destroy
+ self.keep_stage = is_develop or install_args.get("keep_stage", False)
+ # whether to restage
+ self.restage = (not is_develop) and install_args.get("restage", False)
# whether to skip the patch phase
self.skip_patch = install_args.get("skip_patch", False)
@@ -2305,7 +2307,7 @@ class BuildProcessInstaller:
self.verbose = bool(install_args.get("verbose", False))
# whether installation was explicitly requested by the user
- self.explicit = install_args.get("is_root", False) and install_args.get("explicit", True)
+ self.explicit = pkg.spec.dag_hash() in install_args.get("explicit", [])
# env before starting installation
self.unmodified_env = install_args.get("unmodified_env", {})
@@ -2323,14 +2325,18 @@ class BuildProcessInstaller:
# info/debug information
self.pre = _log_prefix(pkg.name)
- self.pkg_id = package_id(pkg)
+ self.pkg_id = package_id(pkg.spec)
def run(self) -> bool:
"""Main entry point from ``build_process`` to kick off install in child."""
- self.pkg.stage.keep = self.keep_stage
+ stage = self.pkg.stage
+ stage.keep = self.keep_stage
+
+ if self.restage:
+ stage.destroy()
- with self.pkg.stage:
+ with stage:
self.timer.start("stage")
if not self.fake:
@@ -2345,7 +2351,7 @@ class BuildProcessInstaller:
f"{self.pre} Building {self.pkg_id} [{self.pkg.build_system_class}]" # type: ignore[attr-defined] # noqa: E501
)
- # get verbosity from do_install() parameter or saved value
+ # get verbosity from install parameter or saved value
self.echo = self.verbose
if spack.package_base.PackageBase._verbose is not None:
self.echo = spack.package_base.PackageBase._verbose
@@ -2374,9 +2380,6 @@ class BuildProcessInstaller:
_print_timer(pre=self.pre, pkg_id=self.pkg_id, timer=self.timer)
_print_installed_pkg(self.pkg.prefix)
- # Send final status that install is successful
- spack.hooks.on_install_success(self.pkg.spec)
-
# preserve verbosity across runs
return self.echo
@@ -2389,12 +2392,9 @@ class BuildProcessInstaller:
src_target = os.path.join(pkg.spec.prefix, "share", pkg.name, "src")
tty.debug(f"{self.pre} Copying source to {src_target}")
- fs.install_tree(
- pkg.stage.source_path, src_target, allow_broken_symlinks=(sys.platform != "win32")
- )
+ fs.install_tree(pkg.stage.source_path, src_target)
def _real_install(self) -> None:
- import spack.builder
pkg = self.pkg
@@ -2455,15 +2455,10 @@ class BuildProcessInstaller:
# Catch any errors to report to logging
self.timer.start(phase_fn.name)
phase_fn.execute()
- spack.hooks.on_phase_success(pkg, phase_fn.name, log_file)
self.timer.stop(phase_fn.name)
except BaseException:
combine_phase_logs(pkg.phase_log_files, pkg.log_path)
- spack.hooks.on_phase_error(pkg, phase_fn.name, log_file)
-
- # phase error indicates install error
- spack.hooks.on_install_failure(pkg.spec)
raise
# We assume loggers share echo True/False
@@ -2487,7 +2482,7 @@ def build_process(pkg: "spack.package_base.PackageBase", install_args: dict) ->
Arguments:
pkg: the package being installed.
- install_args: arguments to do_install() from parent process.
+ install_args: arguments to installer from parent process.
"""
installer = BuildProcessInstaller(pkg, install_args)
@@ -2497,12 +2492,48 @@ def build_process(pkg: "spack.package_base.PackageBase", install_args: dict) ->
return installer.run()
+def deprecate(spec: "spack.spec.Spec", deprecator: "spack.spec.Spec", link_fn) -> None:
+ """Deprecate this package in favor of deprecator spec"""
+ # Here we assume we don't deprecate across different stores, and that same hash
+ # means same binary artifacts
+ if spec.dag_hash() == deprecator.dag_hash():
+ return
+
+ # We can't really have control over external specs, and cannot link anything in their place
+ if spec.external:
+ return
+
+ # Install deprecator if it isn't installed already
+ if not spack.store.STORE.db.query(deprecator):
+ PackageInstaller([deprecator.package], explicit=True).install()
+
+ old_deprecator = spack.store.STORE.db.deprecator(spec)
+ if old_deprecator:
+ # Find this spec file from its old deprecation
+ specfile = spack.store.STORE.layout.deprecated_file_path(spec, old_deprecator)
+ else:
+ specfile = spack.store.STORE.layout.spec_file_path(spec)
+
+ # copy spec metadata to "deprecated" dir of deprecator
+ depr_specfile = spack.store.STORE.layout.deprecated_file_path(spec, deprecator)
+ fs.mkdirp(os.path.dirname(depr_specfile))
+ shutil.copy2(specfile, depr_specfile)
+
+ # Any specs deprecated in favor of this spec are re-deprecated in favor of its new deprecator
+ for deprecated in spack.store.STORE.db.specs_deprecated_by(spec):
+ deprecate(deprecated, deprecator, link_fn)
+
+ # Now that we've handled metadata, uninstall and replace with link
+ spack.package_base.PackageBase.uninstall_by_spec(spec, force=True, deprecator=deprecator)
+ link_fn(deprecator.prefix, spec.prefix)
+
+
class OverwriteInstall:
def __init__(
self,
installer: PackageInstaller,
database: spack.database.Database,
- task: BuildTask,
+ task: Task,
install_status: InstallStatus,
):
self.installer = installer
@@ -2532,33 +2563,21 @@ class OverwriteInstall:
raise e.inner_exception
-class InstallError(spack.error.SpackError):
- """Raised when something goes wrong during install or uninstall.
-
- The error can be annotated with a ``pkg`` attribute to allow the
- caller to get the package for which the exception was raised.
- """
-
- def __init__(self, message, long_msg=None, pkg=None):
- super().__init__(message, long_msg)
- self.pkg = pkg
-
-
-class BadInstallPhase(InstallError):
+class BadInstallPhase(spack.error.InstallError):
"""Raised for an install phase option is not allowed for a package."""
def __init__(self, pkg_name, phase):
super().__init__(f"'{phase}' is not a valid phase for package {pkg_name}")
-class ExternalPackageError(InstallError):
+class ExternalPackageError(spack.error.InstallError):
"""Raised by install() when a package is only for external use."""
-class InstallLockError(InstallError):
+class InstallLockError(spack.error.InstallError):
"""Raised during install when something goes wrong with package locking."""
-class UpstreamPackageError(InstallError):
+class UpstreamPackageError(spack.error.InstallError):
"""Raised during install when something goes wrong with an upstream
package."""
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index 5d78e354d1..7cab47d77f 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -9,6 +9,8 @@ In a normal Spack installation, this is invoked from the bin/spack script
after the system path is set up.
"""
import argparse
+
+# import spack.modules.common
import inspect
import io
import operator
@@ -32,20 +34,20 @@ import llnl.util.tty.colify
import llnl.util.tty.color as color
from llnl.util.tty.log import log_output
+import spack
import spack.cmd
import spack.config
import spack.environment as ev
+import spack.error
import spack.modules
import spack.paths
import spack.platforms
import spack.repo
-import spack.solver.asp
import spack.spec
import spack.store
import spack.util.debug
import spack.util.environment
-import spack.util.git
-import spack.util.path
+import spack.util.lock
from spack.error import SpackError
#: names of profile statistics
@@ -98,23 +100,8 @@ section_order = {
#: Properties that commands are required to set.
required_command_properties = ["level", "section", "description"]
-#: Recorded directory where spack command was originally invoked
-spack_working_dir = None
spack_ld_library_path = os.environ.get("LD_LIBRARY_PATH", "")
-#: Whether to print backtraces on error
-SHOW_BACKTRACE = False
-
-
-def set_working_dir():
- """Change the working directory to getcwd, or spack prefix if no cwd."""
- global spack_working_dir
- try:
- spack_working_dir = os.getcwd()
- except OSError:
- os.chdir(spack.paths.prefix)
- spack_working_dir = spack.paths.prefix
-
def add_all_commands(parser):
"""Add all spack subcommands to the parser."""
@@ -122,51 +109,6 @@ def add_all_commands(parser):
parser.add_command(cmd)
-def get_spack_commit():
- """Get the Spack git commit sha.
-
- Returns:
- (str or None) the commit sha if available, otherwise None
- """
- git_path = os.path.join(spack.paths.prefix, ".git")
- if not os.path.exists(git_path):
- return None
-
- git = spack.util.git.git()
- if not git:
- return None
-
- rev = git(
- "-C",
- spack.paths.prefix,
- "rev-parse",
- "HEAD",
- output=str,
- error=os.devnull,
- fail_on_error=False,
- )
- if git.returncode != 0:
- return None
-
- match = re.match(r"[a-f\d]{7,}$", rev)
- return match.group(0) if match else None
-
-
-def get_version():
- """Get a descriptive version of this instance of Spack.
-
- Outputs '<PEP440 version> (<git commit sha>)'.
-
- The commit sha is only added when available.
- """
- version = spack.spack_version
- commit = get_spack_commit()
- if commit:
- version += " ({0})".format(commit)
-
- return version
-
-
def index_commands():
"""create an index of commands by section for this help level"""
index = {}
@@ -427,7 +369,7 @@ def make_argument_parser(**kwargs):
parser.add_argument(
"--color",
action="store",
- default=os.environ.get("SPACK_COLOR", "auto"),
+ default=None,
choices=("always", "never", "auto"),
help="when to colorize output (default: auto)",
)
@@ -444,8 +386,9 @@ def make_argument_parser(**kwargs):
"--config-scope",
dest="config_scopes",
action="append",
- metavar="DIR",
- help="add a custom configuration scope",
+ metavar="DIR|ENV",
+ help="add directory or environment as read-only configuration scope, without activating "
+ "the environment.",
)
parser.add_argument(
"-d",
@@ -546,6 +489,7 @@ def make_argument_parser(**kwargs):
help="add stacktraces to all printed statements",
)
parser.add_argument(
+ "-t",
"--backtrace",
action="store_true",
default="SPACK_BACKTRACE" in os.environ,
@@ -581,8 +525,7 @@ def setup_main_options(args):
if args.debug or args.backtrace:
spack.error.debug = True
- global SHOW_BACKTRACE
- SHOW_BACKTRACE = True
+ spack.error.SHOW_BACKTRACE = True
if args.debug:
spack.util.debug.register_interrupt_handler()
@@ -622,7 +565,8 @@ def setup_main_options(args):
# with color
color.try_enable_terminal_color_on_windows()
# when to use color (takes always, auto, or never)
- color.set_color_when(args.color)
+ if args.color is not None:
+ color.set_color_when(args.color)
def allows_unknown_args(command):
@@ -808,6 +752,8 @@ def print_setup_info(*info):
This is in ``main.py`` to make it fast; the setup scripts need to
invoke spack in login scripts, and it needs to be quick.
"""
+ import spack.modules.common
+
shell = "csh" if "csh" in info else "sh"
def shell_set(var, value):
@@ -950,13 +896,9 @@ def _main(argv=None):
parser.print_help()
return 1
- # -h, -H, and -V are special as they do not require a command, but
- # all the other options do nothing without a command.
+ # version is special as it does not require a command or loading and additional infrastructure
if args.version:
- print(get_version())
- return 0
- elif args.help:
- sys.stdout.write(parser.format_help(level=args.help))
+ print(spack.get_version())
return 0
# ------------------------------------------------------------------------
@@ -969,13 +911,6 @@ def _main(argv=None):
# Make spack load / env activate work on macOS
restore_macos_dyld_vars()
- # make spack.config aware of any command line configuration scopes
- if args.config_scopes:
- spack.config.COMMAND_LINE_SCOPES = args.config_scopes
-
- # ensure options on spack command come before everything
- setup_main_options(args)
-
# activate an environment if one was specified on the command line
env_format_error = None
if not args.no_env:
@@ -989,6 +924,12 @@ def _main(argv=None):
e.print_context()
env_format_error = e
+ # Push scopes from the command line last
+ if args.config_scopes:
+ spack.config._add_command_line_scopes(spack.config.CONFIG, args.config_scopes)
+ spack.config.CONFIG.push_scope(spack.config.InternalConfigScope("command_line"))
+ setup_main_options(args)
+
# ------------------------------------------------------------------------
# Things that require configuration should go below here
# ------------------------------------------------------------------------
@@ -996,6 +937,12 @@ def _main(argv=None):
print_setup_info(*args.print_shell_vars.split(","))
return 0
+ # -h and -H are special as they do not require a command, but
+ # all the other options do nothing without a command.
+ if args.help:
+ sys.stdout.write(parser.format_help(level=args.help))
+ return 0
+
# At this point we've considered all the options to spack itself, so we
# need a command or we're done.
if not args.command:
@@ -1035,12 +982,12 @@ def finish_parse_and_run(parser, cmd_name, main_args, env_format_error):
raise env_format_error
# many operations will fail without a working directory.
- set_working_dir()
+ spack.paths.set_working_dir()
# now we can actually execute the command.
- if args.spack_profile or args.sorted_profile:
+ if main_args.spack_profile or main_args.sorted_profile:
_profile_wrapper(command, parser, args, unknown)
- elif args.pdb:
+ elif main_args.pdb:
import pdb
pdb.runctx("_invoke_command(command, parser, args, unknown)", globals(), locals())
@@ -1070,19 +1017,19 @@ def main(argv=None):
e.die() # gracefully die on any SpackErrors
except KeyboardInterrupt:
- if spack.config.get("config:debug") or SHOW_BACKTRACE:
+ if spack.config.get("config:debug") or spack.error.SHOW_BACKTRACE:
raise
sys.stderr.write("\n")
tty.error("Keyboard interrupt.")
return signal.SIGINT.value
except SystemExit as e:
- if spack.config.get("config:debug") or SHOW_BACKTRACE:
+ if spack.config.get("config:debug") or spack.error.SHOW_BACKTRACE:
traceback.print_exc()
return e.code
except Exception as e:
- if spack.config.get("config:debug") or SHOW_BACKTRACE:
+ if spack.config.get("config:debug") or spack.error.SHOW_BACKTRACE:
raise
tty.error(e)
return 3
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py
deleted file mode 100644
index 2f1b9966ce..0000000000
--- a/lib/spack/spack/mirror.py
+++ /dev/null
@@ -1,732 +0,0 @@
-# Copyright 2013-2024 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)
-"""
-This file contains code for creating spack mirror directories. A
-mirror is an organized hierarchy containing specially named archive
-files. This enabled spack to know where to find files in a mirror if
-the main server for a particular package is down. Or, if the computer
-where spack is run is not connected to the internet, it allows spack
-to download packages directly from a mirror (e.g., on an intranet).
-"""
-import collections
-import collections.abc
-import operator
-import os
-import os.path
-import sys
-import traceback
-import urllib.parse
-from typing import List, Optional, Union
-
-import llnl.url
-import llnl.util.tty as tty
-from llnl.util.filesystem import mkdirp
-
-import spack.caches
-import spack.config
-import spack.error
-import spack.fetch_strategy
-import spack.mirror
-import spack.oci.image
-import spack.spec
-import spack.util.path
-import spack.util.spack_json as sjson
-import spack.util.spack_yaml as syaml
-import spack.util.url as url_util
-import spack.version
-
-#: What schemes do we support
-supported_url_schemes = ("file", "http", "https", "sftp", "ftp", "s3", "gs", "oci")
-
-
-def _url_or_path_to_url(url_or_path: str) -> str:
- """For simplicity we allow mirror URLs in config files to be local, relative paths.
- This helper function takes care of distinguishing between URLs and paths, and
- canonicalizes paths before transforming them into file:// URLs."""
- # Is it a supported URL already? Then don't do path-related canonicalization.
- parsed = urllib.parse.urlparse(url_or_path)
- if parsed.scheme in supported_url_schemes:
- return url_or_path
-
- # Otherwise we interpret it as path, and we should promote it to file:// URL.
- return url_util.path_to_file_url(spack.util.path.canonicalize_path(url_or_path))
-
-
-class Mirror:
- """Represents a named location for storing source tarballs and binary
- packages.
-
- Mirrors have a fetch_url that indicate where and how artifacts are fetched
- from them, and a push_url that indicate where and how artifacts are pushed
- to them. These two URLs are usually the same.
- """
-
- def __init__(self, data: Union[str, dict], name: Optional[str] = None):
- self._data = data
- self._name = name
-
- @staticmethod
- def from_yaml(stream, name=None):
- return Mirror(syaml.load(stream), name)
-
- @staticmethod
- def from_json(stream, name=None):
- try:
- return Mirror(sjson.load(stream), name)
- except Exception as e:
- raise sjson.SpackJSONError("error parsing JSON mirror:", str(e)) from e
-
- @staticmethod
- def from_local_path(path: str):
- return Mirror(url_util.path_to_file_url(path))
-
- @staticmethod
- def from_url(url: str):
- """Create an anonymous mirror by URL. This method validates the URL."""
- if not urllib.parse.urlparse(url).scheme in supported_url_schemes:
- raise ValueError(
- '"{}" is not a valid mirror URL. Scheme must be once of {}.'.format(
- url, ", ".join(supported_url_schemes)
- )
- )
- return Mirror(url)
-
- def __eq__(self, other):
- if not isinstance(other, Mirror):
- return NotImplemented
- return self._data == other._data and self._name == other._name
-
- def __str__(self):
- return f"{self._name}: {self.push_url} {self.fetch_url}"
-
- def __repr__(self):
- return f"Mirror(name={self._name!r}, data={self._data!r})"
-
- def to_json(self, stream=None):
- return sjson.dump(self.to_dict(), stream)
-
- def to_yaml(self, stream=None):
- return syaml.dump(self.to_dict(), stream)
-
- def to_dict(self):
- return self._data
-
- def display(self, max_len=0):
- fetch, push = self.fetch_url, self.push_url
- # don't print the same URL twice
- url = fetch if fetch == push else f"fetch: {fetch} push: {push}"
- source = "s" if self.source else " "
- binary = "b" if self.binary else " "
- print(f"{self.name: <{max_len}} [{source}{binary}] {url}")
-
- @property
- def name(self):
- return self._name or "<unnamed>"
-
- @property
- def binary(self):
- return isinstance(self._data, str) or self._data.get("binary", True)
-
- @property
- def source(self):
- return isinstance(self._data, str) or self._data.get("source", True)
-
- @property
- def signed(self) -> bool:
- return isinstance(self._data, str) or self._data.get("signed", True)
-
- @property
- def fetch_url(self):
- """Get the valid, canonicalized fetch URL"""
- return self.get_url("fetch")
-
- @property
- def push_url(self):
- """Get the valid, canonicalized fetch URL"""
- return self.get_url("push")
-
- def _update_connection_dict(self, current_data: dict, new_data: dict, top_level: bool):
- keys = ["url", "access_pair", "access_token", "profile", "endpoint_url"]
- if top_level:
- keys += ["binary", "source", "signed"]
- changed = False
- for key in keys:
- if key in new_data and current_data.get(key) != new_data[key]:
- current_data[key] = new_data[key]
- changed = True
- return changed
-
- def update(self, data: dict, direction: Optional[str] = None) -> bool:
- """Modify the mirror with the given data. This takes care
- of expanding trivial mirror definitions by URL to something more
- rich with a dict if necessary
-
- Args:
- data (dict): The data to update the mirror with.
- direction (str): The direction to update the mirror in (fetch
- or push or None for top-level update)
-
- Returns:
- bool: True if the mirror was updated, False otherwise."""
-
- # Modify the top-level entry when no direction is given.
- if not data:
- return False
-
- # If we only update a URL, there's typically no need to expand things to a dict.
- set_url = data["url"] if len(data) == 1 and "url" in data else None
-
- if direction is None:
- # First deal with the case where the current top-level entry is just a string.
- if isinstance(self._data, str):
- # Can we replace that string with something new?
- if set_url:
- if self._data == set_url:
- return False
- self._data = set_url
- return True
-
- # Otherwise promote to a dict
- self._data = {"url": self._data}
-
- # And update the dictionary accordingly.
- return self._update_connection_dict(self._data, data, top_level=True)
-
- # Otherwise, update the fetch / push entry; turn top-level
- # url string into a dict if necessary.
- if isinstance(self._data, str):
- self._data = {"url": self._data}
-
- # Create a new fetch / push entry if necessary
- if direction not in self._data:
- # Keep config minimal if we're just setting the URL.
- if set_url:
- self._data[direction] = set_url
- return True
- self._data[direction] = {}
-
- entry = self._data[direction]
-
- # Keep the entry simple if we're just swapping out the URL.
- if isinstance(entry, str):
- if set_url:
- if entry == set_url:
- return False
- self._data[direction] = set_url
- return True
-
- # Otherwise promote to a dict
- self._data[direction] = {"url": entry}
-
- return self._update_connection_dict(self._data[direction], data, top_level=False)
-
- def _get_value(self, attribute: str, direction: str):
- """Returns the most specific value for a given attribute (either push/fetch or global)"""
- if direction not in ("fetch", "push"):
- raise ValueError(f"direction must be either 'fetch' or 'push', not {direction}")
-
- if isinstance(self._data, str):
- return None
-
- # Either a string (url) or a dictionary, we care about the dict here.
- value = self._data.get(direction, {})
-
- # Return top-level entry if only a URL was set.
- if isinstance(value, str) or attribute not in value:
- return self._data.get(attribute)
-
- return value[attribute]
-
- def get_url(self, direction: str) -> str:
- if direction not in ("fetch", "push"):
- raise ValueError(f"direction must be either 'fetch' or 'push', not {direction}")
-
- # Whole mirror config is just a url.
- if isinstance(self._data, str):
- return _url_or_path_to_url(self._data)
-
- # Default value
- url = self._data.get("url")
-
- # Override it with a direction-specific value
- if direction in self._data:
- # Either a url as string or a dict with url key
- info = self._data[direction]
- if isinstance(info, str):
- url = info
- elif "url" in info:
- url = info["url"]
-
- if not url:
- raise ValueError(f"Mirror {self.name} has no URL configured")
-
- return _url_or_path_to_url(url)
-
- def get_access_token(self, direction: str) -> Optional[str]:
- return self._get_value("access_token", direction)
-
- def get_access_pair(self, direction: str) -> Optional[List]:
- return self._get_value("access_pair", direction)
-
- def get_profile(self, direction: str) -> Optional[str]:
- return self._get_value("profile", direction)
-
- def get_endpoint_url(self, direction: str) -> Optional[str]:
- return self._get_value("endpoint_url", direction)
-
-
-class MirrorCollection(collections.abc.Mapping):
- """A mapping of mirror names to mirrors."""
-
- def __init__(
- self,
- mirrors=None,
- scope=None,
- binary: Optional[bool] = None,
- source: Optional[bool] = None,
- ):
- """Initialize a mirror collection.
-
- Args:
- mirrors: A name-to-mirror mapping to initialize the collection with.
- scope: The scope to use when looking up mirrors from the config.
- binary: If True, only include binary mirrors.
- If False, omit binary mirrors.
- If None, do not filter on binary mirrors.
- source: If True, only include source mirrors.
- If False, omit source mirrors.
- If None, do not filter on source mirrors."""
- self._mirrors = {
- name: Mirror(data=mirror, name=name)
- for name, mirror in (
- mirrors.items()
- if mirrors is not None
- else spack.config.get("mirrors", scope=scope).items()
- )
- }
-
- if source is not None:
- self._mirrors = {k: v for k, v in self._mirrors.items() if v.source == source}
-
- if binary is not None:
- self._mirrors = {k: v for k, v in self._mirrors.items() if v.binary == binary}
-
- def __eq__(self, other):
- return self._mirrors == other._mirrors
-
- def to_json(self, stream=None):
- return sjson.dump(self.to_dict(True), stream)
-
- def to_yaml(self, stream=None):
- return syaml.dump(self.to_dict(True), stream)
-
- # TODO: this isn't called anywhere
- @staticmethod
- def from_yaml(stream, name=None):
- data = syaml.load(stream)
- return MirrorCollection(data)
-
- @staticmethod
- def from_json(stream, name=None):
- try:
- d = sjson.load(stream)
- return MirrorCollection(d)
- except Exception as e:
- raise sjson.SpackJSONError("error parsing JSON mirror collection:", str(e)) from e
-
- def to_dict(self, recursive=False):
- return syaml.syaml_dict(
- sorted(
- ((k, (v.to_dict() if recursive else v)) for (k, v) in self._mirrors.items()),
- key=operator.itemgetter(0),
- )
- )
-
- @staticmethod
- def from_dict(d):
- return MirrorCollection(d)
-
- def __getitem__(self, item):
- return self._mirrors[item]
-
- def display(self):
- max_len = max(len(mirror.name) for mirror in self._mirrors.values())
- for mirror in self._mirrors.values():
- mirror.display(max_len)
-
- def lookup(self, name_or_url):
- """Looks up and returns a Mirror.
-
- If this MirrorCollection contains a named Mirror under the name
- [name_or_url], then that mirror is returned. Otherwise, [name_or_url]
- is assumed to be a mirror URL, and an anonymous mirror with the given
- URL is returned.
- """
- result = self.get(name_or_url)
-
- if result is None:
- result = Mirror(fetch=name_or_url)
-
- return result
-
- def __iter__(self):
- return iter(self._mirrors)
-
- def __len__(self):
- return len(self._mirrors)
-
-
-def _determine_extension(fetcher):
- if isinstance(fetcher, spack.fetch_strategy.URLFetchStrategy):
- if fetcher.expand_archive:
- # If we fetch with a URLFetchStrategy, use URL's archive type
- ext = llnl.url.determine_url_file_extension(fetcher.url)
-
- if ext:
- # Remove any leading dots
- ext = ext.lstrip(".")
- else:
- msg = """\
-Unable to parse extension from {0}.
-
-If this URL is for a tarball but does not include the file extension
-in the name, you can explicitly declare it with the following syntax:
-
- version('1.2.3', 'hash', extension='tar.gz')
-
-If this URL is for a download like a .jar or .whl that does not need
-to be expanded, or an uncompressed installation script, you can tell
-Spack not to expand it with the following syntax:
-
- version('1.2.3', 'hash', expand=False)
-"""
- raise MirrorError(msg.format(fetcher.url))
- else:
- # If the archive shouldn't be expanded, don't check extension.
- ext = None
- else:
- # Otherwise we'll make a .tar.gz ourselves
- ext = "tar.gz"
-
- return ext
-
-
-class MirrorReference:
- """A ``MirrorReference`` stores the relative paths where you can store a
- package/resource in a mirror directory.
-
- The appropriate storage location is given by ``storage_path``. The
- ``cosmetic_path`` property provides a reference that a human could generate
- themselves based on reading the details of the package.
-
- A user can iterate over a ``MirrorReference`` object to get all the
- possible names that might be used to refer to the resource in a mirror;
- this includes names generated by previous naming schemes that are no-longer
- reported by ``storage_path`` or ``cosmetic_path``.
- """
-
- def __init__(self, cosmetic_path, global_path=None):
- self.global_path = global_path
- self.cosmetic_path = cosmetic_path
-
- @property
- def storage_path(self):
- if self.global_path:
- return self.global_path
- else:
- return self.cosmetic_path
-
- def __iter__(self):
- if self.global_path:
- yield self.global_path
- yield self.cosmetic_path
-
-
-class OCIImageLayout:
- """Follow the OCI Image Layout Specification to archive blobs
-
- Paths are of the form `blobs/<algorithm>/<digest>`
- """
-
- def __init__(self, digest: spack.oci.image.Digest) -> None:
- self.storage_path = os.path.join("blobs", digest.algorithm, digest.digest)
-
- def __iter__(self):
- yield self.storage_path
-
-
-def mirror_archive_paths(fetcher, per_package_ref, spec=None):
- """Returns a ``MirrorReference`` object which keeps track of the relative
- storage path of the resource associated with the specified ``fetcher``."""
- ext = None
- if spec:
- pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
- versions = pkg_cls.versions.get(spec.version, {})
- ext = versions.get("extension", None)
- # If the spec does not explicitly specify an extension (the default case),
- # then try to determine it automatically. An extension can only be
- # specified for the primary source of the package (e.g. the source code
- # identified in the 'version' declaration). Resources/patches don't have
- # an option to specify an extension, so it must be inferred for those.
- ext = ext or _determine_extension(fetcher)
-
- if ext:
- per_package_ref += ".%s" % ext
-
- global_ref = fetcher.mirror_id()
- if global_ref:
- global_ref = os.path.join("_source-cache", global_ref)
- if global_ref and ext:
- global_ref += ".%s" % ext
-
- return MirrorReference(per_package_ref, global_ref)
-
-
-def get_all_versions(specs):
- """Given a set of initial specs, return a new set of specs that includes
- each version of each package in the original set.
-
- Note that if any spec in the original set specifies properties other than
- version, this information will be omitted in the new set; for example; the
- new set of specs will not include variant settings.
- """
- version_specs = []
- for spec in specs:
- pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
- # Skip any package that has no known versions.
- if not pkg_cls.versions:
- tty.msg("No safe (checksummed) versions for package %s" % pkg_cls.name)
- continue
-
- for version in pkg_cls.versions:
- version_spec = spack.spec.Spec(pkg_cls.name)
- version_spec.versions = spack.version.VersionList([version])
- version_specs.append(version_spec)
-
- return version_specs
-
-
-def get_matching_versions(specs, num_versions=1):
- """Get a spec for EACH known version matching any spec in the list.
- For concrete specs, this retrieves the concrete version and, if more
- than one version per spec is requested, retrieves the latest versions
- of the package.
- """
- matching = []
- for spec in specs:
- pkg = spec.package
-
- # Skip any package that has no known versions.
- if not pkg.versions:
- tty.msg("No safe (checksummed) versions for package %s" % pkg.name)
- continue
-
- pkg_versions = num_versions
-
- version_order = list(reversed(sorted(pkg.versions)))
- matching_spec = []
- if spec.concrete:
- matching_spec.append(spec)
- pkg_versions -= 1
- if spec.version in version_order:
- version_order.remove(spec.version)
-
- for v in version_order:
- # Generate no more than num_versions versions for each spec.
- if pkg_versions < 1:
- break
-
- # Generate only versions that satisfy the spec.
- if spec.concrete or v.intersects(spec.versions):
- s = spack.spec.Spec(pkg.name)
- s.versions = spack.version.VersionList([v])
- s.variants = spec.variants.copy()
- # This is needed to avoid hanging references during the
- # concretization phase
- s.variants.spec = s
- matching_spec.append(s)
- pkg_versions -= 1
-
- if not matching_spec:
- tty.warn("No known version matches spec: %s" % spec)
- matching.extend(matching_spec)
-
- return matching
-
-
-def create(path, specs, skip_unstable_versions=False):
- """Create a directory to be used as a spack mirror, and fill it with
- package archives.
-
- Arguments:
- path: Path to create a mirror directory hierarchy in.
- specs: Any package versions matching these specs will be added \
- to the mirror.
- skip_unstable_versions: if true, this skips adding resources when
- they do not have a stable archive checksum (as determined by
- ``fetch_strategy.stable_target``)
-
- Return Value:
- Returns a tuple of lists: (present, mirrored, error)
-
- * present: Package specs that were already present.
- * mirrored: Package specs that were successfully mirrored.
- * error: Package specs that failed to mirror due to some error.
- """
- # automatically spec-ify anything in the specs array.
- specs = [s if isinstance(s, spack.spec.Spec) else spack.spec.Spec(s) for s in specs]
-
- mirror_cache, mirror_stats = mirror_cache_and_stats(path, skip_unstable_versions)
- for spec in specs:
- mirror_stats.next_spec(spec)
- create_mirror_from_package_object(spec.package, mirror_cache, mirror_stats)
-
- return mirror_stats.stats()
-
-
-def mirror_cache_and_stats(path, skip_unstable_versions=False):
- """Return both a mirror cache and a mirror stats, starting from the path
- where a mirror ought to be created.
-
- Args:
- path (str): path to create a mirror directory hierarchy in.
- skip_unstable_versions: if true, this skips adding resources when
- they do not have a stable archive checksum (as determined by
- ``fetch_strategy.stable_target``)
- """
- # Get the absolute path of the root before we start jumping around.
- if not os.path.isdir(path):
- try:
- mkdirp(path)
- except OSError as e:
- raise MirrorError("Cannot create directory '%s':" % path, str(e))
- mirror_cache = spack.caches.MirrorCache(path, skip_unstable_versions=skip_unstable_versions)
- mirror_stats = MirrorStats()
- return mirror_cache, mirror_stats
-
-
-def add(mirror: Mirror, scope=None):
- """Add a named mirror in the given scope"""
- mirrors = spack.config.get("mirrors", scope=scope)
- if not mirrors:
- mirrors = syaml.syaml_dict()
-
- if mirror.name in mirrors:
- tty.die("Mirror with name {} already exists.".format(mirror.name))
-
- items = [(n, u) for n, u in mirrors.items()]
- items.insert(0, (mirror.name, mirror.to_dict()))
- mirrors = syaml.syaml_dict(items)
- spack.config.set("mirrors", mirrors, scope=scope)
-
-
-def remove(name, scope):
- """Remove the named mirror in the given scope"""
- mirrors = spack.config.get("mirrors", scope=scope)
- if not mirrors:
- mirrors = syaml.syaml_dict()
-
- if name not in mirrors:
- tty.die("No mirror with name %s" % name)
-
- mirrors.pop(name)
- spack.config.set("mirrors", mirrors, scope=scope)
- tty.msg("Removed mirror %s." % name)
-
-
-class MirrorStats:
- def __init__(self):
- self.present = {}
- self.new = {}
- self.errors = set()
-
- self.current_spec = None
- self.added_resources = set()
- self.existing_resources = set()
-
- def next_spec(self, spec):
- self._tally_current_spec()
- self.current_spec = spec
-
- def _tally_current_spec(self):
- if self.current_spec:
- if self.added_resources:
- self.new[self.current_spec] = len(self.added_resources)
- if self.existing_resources:
- self.present[self.current_spec] = len(self.existing_resources)
- self.added_resources = set()
- self.existing_resources = set()
- self.current_spec = None
-
- def stats(self):
- self._tally_current_spec()
- return list(self.present), list(self.new), list(self.errors)
-
- def already_existed(self, resource):
- # If an error occurred after caching a subset of a spec's
- # resources, a secondary attempt may consider them already added
- if resource not in self.added_resources:
- self.existing_resources.add(resource)
-
- def added(self, resource):
- self.added_resources.add(resource)
-
- def error(self):
- self.errors.add(self.current_spec)
-
-
-def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats):
- """Add a single package object to a mirror.
-
- The package object is only required to have an associated spec
- with a concrete version.
-
- Args:
- pkg_obj (spack.package_base.PackageBase): package object with to be added.
- mirror_cache (spack.caches.MirrorCache): mirror where to add the spec.
- mirror_stats (spack.mirror.MirrorStats): statistics on the current mirror
-
- Return:
- True if the spec was added successfully, False otherwise
- """
- tty.msg("Adding package {} to mirror".format(pkg_obj.spec.format("{name}{@version}")))
- num_retries = 3
- while num_retries > 0:
- try:
- # Includes patches and resources
- with pkg_obj.stage as pkg_stage:
- pkg_stage.cache_mirror(mirror_cache, mirror_stats)
- exception = None
- break
- except Exception as e:
- exc_tuple = sys.exc_info()
- exception = e
- num_retries -= 1
- if exception:
- if spack.config.get("config:debug"):
- traceback.print_exception(file=sys.stderr, *exc_tuple)
- else:
- tty.warn(
- "Error while fetching %s" % pkg_obj.spec.cformat("{name}{@version}"),
- getattr(exception, "message", exception),
- )
- mirror_stats.error()
- return False
- return True
-
-
-def require_mirror_name(mirror_name):
- """Find a mirror by name and raise if it does not exist"""
- mirror = spack.mirror.MirrorCollection().get(mirror_name)
- if not mirror:
- raise ValueError('no mirror named "{0}"'.format(mirror_name))
- return mirror
-
-
-class MirrorError(spack.error.SpackError):
- """Superclass of all mirror-creation related errors."""
-
- def __init__(self, msg, long_msg=None):
- super().__init__(msg, long_msg)
diff --git a/lib/spack/spack/mirrors/layout.py b/lib/spack/spack/mirrors/layout.py
new file mode 100644
index 0000000000..94a2606bc8
--- /dev/null
+++ b/lib/spack/spack/mirrors/layout.py
@@ -0,0 +1,146 @@
+# Copyright 2013-2024 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 os.path
+from typing import Optional
+
+import llnl.url
+import llnl.util.symlink
+from llnl.util.filesystem import mkdirp
+
+import spack.fetch_strategy
+import spack.oci.image
+import spack.repo
+import spack.spec
+from spack.error import MirrorError
+
+
+class MirrorLayout:
+ """A ``MirrorLayout`` object describes the relative path of a mirror entry."""
+
+ def __init__(self, path: str) -> None:
+ self.path = path
+
+ def __iter__(self):
+ """Yield all paths including aliases where the resource can be found."""
+ yield self.path
+
+ def make_alias(self, root: str) -> None:
+ """Make the entry ``root / self.path`` available under a human readable alias"""
+ pass
+
+
+class DefaultLayout(MirrorLayout):
+ def __init__(self, alias_path: str, digest_path: Optional[str] = None) -> None:
+ # When we have a digest, it is used as the primary storage location. If not, then we use
+ # the human-readable alias. In case of mirrors of a VCS checkout, we currently do not have
+ # a digest, that's why an alias is required and a digest optional.
+ super().__init__(path=digest_path or alias_path)
+ self.alias = alias_path
+ self.digest_path = digest_path
+
+ def make_alias(self, root: str) -> None:
+ """Symlink a human readible path in our mirror to the actual storage location."""
+ # We already use the human-readable path as the main storage location.
+ if not self.digest_path:
+ return
+
+ alias, digest = os.path.join(root, self.alias), os.path.join(root, self.digest_path)
+
+ alias_dir = os.path.dirname(alias)
+ relative_dst = os.path.relpath(digest, start=alias_dir)
+
+ mkdirp(alias_dir)
+ tmp = f"{alias}.tmp"
+ llnl.util.symlink.symlink(relative_dst, tmp)
+
+ try:
+ os.rename(tmp, alias)
+ except OSError:
+ # Clean up the temporary if possible
+ try:
+ os.unlink(tmp)
+ except OSError:
+ pass
+ raise
+
+ def __iter__(self):
+ if self.digest_path:
+ yield self.digest_path
+ yield self.alias
+
+
+class OCILayout(MirrorLayout):
+ """Follow the OCI Image Layout Specification to archive blobs where paths are of the form
+ ``blobs/<algorithm>/<digest>``"""
+
+ def __init__(self, digest: spack.oci.image.Digest) -> None:
+ super().__init__(os.path.join("blobs", digest.algorithm, digest.digest))
+
+
+def _determine_extension(fetcher):
+ if isinstance(fetcher, spack.fetch_strategy.URLFetchStrategy):
+ if fetcher.expand_archive:
+ # If we fetch with a URLFetchStrategy, use URL's archive type
+ ext = llnl.url.determine_url_file_extension(fetcher.url)
+
+ if ext:
+ # Remove any leading dots
+ ext = ext.lstrip(".")
+ else:
+ msg = """\
+Unable to parse extension from {0}.
+
+If this URL is for a tarball but does not include the file extension
+in the name, you can explicitly declare it with the following syntax:
+
+ version('1.2.3', 'hash', extension='tar.gz')
+
+If this URL is for a download like a .jar or .whl that does not need
+to be expanded, or an uncompressed installation script, you can tell
+Spack not to expand it with the following syntax:
+
+ version('1.2.3', 'hash', expand=False)
+"""
+ raise MirrorError(msg.format(fetcher.url))
+ else:
+ # If the archive shouldn't be expanded, don't check extension.
+ ext = None
+ else:
+ # Otherwise we'll make a .tar.gz ourselves
+ ext = "tar.gz"
+
+ return ext
+
+
+def default_mirror_layout(
+ fetcher: "spack.fetch_strategy.FetchStrategy",
+ per_package_ref: str,
+ spec: Optional["spack.spec.Spec"] = None,
+) -> MirrorLayout:
+ """Returns a ``MirrorReference`` object which keeps track of the relative
+ storage path of the resource associated with the specified ``fetcher``."""
+ ext = None
+ if spec:
+ pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
+ versions = pkg_cls.versions.get(spec.version, {})
+ ext = versions.get("extension", None)
+ # If the spec does not explicitly specify an extension (the default case),
+ # then try to determine it automatically. An extension can only be
+ # specified for the primary source of the package (e.g. the source code
+ # identified in the 'version' declaration). Resources/patches don't have
+ # an option to specify an extension, so it must be inferred for those.
+ ext = ext or _determine_extension(fetcher)
+
+ if ext:
+ per_package_ref += ".%s" % ext
+
+ global_ref = fetcher.mirror_id()
+ if global_ref:
+ global_ref = os.path.join("_source-cache", global_ref)
+ if global_ref and ext:
+ global_ref += ".%s" % ext
+
+ return DefaultLayout(per_package_ref, global_ref)
diff --git a/lib/spack/spack/mirrors/mirror.py b/lib/spack/spack/mirrors/mirror.py
new file mode 100644
index 0000000000..21da1b9234
--- /dev/null
+++ b/lib/spack/spack/mirrors/mirror.py
@@ -0,0 +1,470 @@
+# Copyright 2013-2024 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 collections.abc
+import operator
+import os
+import urllib.parse
+from typing import Any, Dict, Optional, Tuple, Union
+
+import llnl.util.tty as tty
+
+import spack.config
+import spack.util.path
+import spack.util.spack_json as sjson
+import spack.util.spack_yaml as syaml
+import spack.util.url as url_util
+from spack.error import MirrorError
+
+#: What schemes do we support
+supported_url_schemes = ("file", "http", "https", "sftp", "ftp", "s3", "gs", "oci")
+
+
+def _url_or_path_to_url(url_or_path: str) -> str:
+ """For simplicity we allow mirror URLs in config files to be local, relative paths.
+ This helper function takes care of distinguishing between URLs and paths, and
+ canonicalizes paths before transforming them into file:// URLs."""
+ # Is it a supported URL already? Then don't do path-related canonicalization.
+ parsed = urllib.parse.urlparse(url_or_path)
+ if parsed.scheme in supported_url_schemes:
+ return url_or_path
+
+ # Otherwise we interpret it as path, and we should promote it to file:// URL.
+ return url_util.path_to_file_url(spack.util.path.canonicalize_path(url_or_path))
+
+
+class Mirror:
+ """Represents a named location for storing source tarballs and binary
+ packages.
+
+ Mirrors have a fetch_url that indicate where and how artifacts are fetched
+ from them, and a push_url that indicate where and how artifacts are pushed
+ to them. These two URLs are usually the same.
+ """
+
+ def __init__(self, data: Union[str, dict], name: Optional[str] = None):
+ self._data = data
+ self._name = name
+
+ @staticmethod
+ def from_yaml(stream, name=None):
+ return Mirror(syaml.load(stream), name)
+
+ @staticmethod
+ def from_json(stream, name=None):
+ try:
+ return Mirror(sjson.load(stream), name)
+ except Exception as e:
+ raise sjson.SpackJSONError("error parsing JSON mirror:", str(e)) from e
+
+ @staticmethod
+ def from_local_path(path: str):
+ return Mirror(url_util.path_to_file_url(path))
+
+ @staticmethod
+ def from_url(url: str):
+ """Create an anonymous mirror by URL. This method validates the URL."""
+ if not urllib.parse.urlparse(url).scheme in supported_url_schemes:
+ raise ValueError(
+ f'"{url}" is not a valid mirror URL. '
+ f"Scheme must be one of {supported_url_schemes}."
+ )
+ return Mirror(url)
+
+ def __eq__(self, other):
+ if not isinstance(other, Mirror):
+ return NotImplemented
+ return self._data == other._data and self._name == other._name
+
+ def __str__(self):
+ return f"{self._name}: {self.push_url} {self.fetch_url}"
+
+ def __repr__(self):
+ return f"Mirror(name={self._name!r}, data={self._data!r})"
+
+ def to_json(self, stream=None):
+ return sjson.dump(self.to_dict(), stream)
+
+ def to_yaml(self, stream=None):
+ return syaml.dump(self.to_dict(), stream)
+
+ def to_dict(self):
+ return self._data
+
+ def display(self, max_len=0):
+ fetch, push = self.fetch_url, self.push_url
+ # don't print the same URL twice
+ url = fetch if fetch == push else f"fetch: {fetch} push: {push}"
+ source = "s" if self.source else " "
+ binary = "b" if self.binary else " "
+ print(f"{self.name: <{max_len}} [{source}{binary}] {url}")
+
+ @property
+ def name(self):
+ return self._name or "<unnamed>"
+
+ @property
+ def binary(self):
+ return isinstance(self._data, str) or self._data.get("binary", True)
+
+ @property
+ def source(self):
+ return isinstance(self._data, str) or self._data.get("source", True)
+
+ @property
+ def signed(self) -> bool:
+ return isinstance(self._data, str) or self._data.get("signed", True)
+
+ @property
+ def autopush(self) -> bool:
+ if isinstance(self._data, str):
+ return False
+ return self._data.get("autopush", False)
+
+ @property
+ def fetch_url(self):
+ """Get the valid, canonicalized fetch URL"""
+ return self.get_url("fetch")
+
+ @property
+ def push_url(self):
+ """Get the valid, canonicalized fetch URL"""
+ return self.get_url("push")
+
+ def ensure_mirror_usable(self, direction: str = "push"):
+ access_pair = self._get_value("access_pair", direction)
+ access_token_variable = self._get_value("access_token_variable", direction)
+
+ errors = []
+
+ # Verify that the credentials that are variables expand
+ if access_pair and isinstance(access_pair, dict):
+ if "id_variable" in access_pair and access_pair["id_variable"] not in os.environ:
+ errors.append(f"id_variable {access_pair['id_variable']} not set in environment")
+ if "secret_variable" in access_pair:
+ if access_pair["secret_variable"] not in os.environ:
+ errors.append(
+ f"environment variable `{access_pair['secret_variable']}` "
+ "(secret_variable) not set"
+ )
+
+ if access_token_variable:
+ if access_token_variable not in os.environ:
+ errors.append(
+ f"environment variable `{access_pair['access_token_variable']}` "
+ "(access_token_variable) not set"
+ )
+
+ if errors:
+ msg = f"invalid {direction} configuration for mirror {self.name}: "
+ msg += "\n ".join(errors)
+ raise MirrorError(msg)
+
+ def _update_connection_dict(self, current_data: dict, new_data: dict, top_level: bool):
+ # Only allow one to exist in the config
+ if "access_token" in current_data and "access_token_variable" in new_data:
+ current_data.pop("access_token")
+ elif "access_token_variable" in current_data and "access_token" in new_data:
+ current_data.pop("access_token_variable")
+
+ # If updating to a new access_pair that is the deprecated list, warn
+ warn_deprecated_access_pair = False
+ if "access_pair" in new_data:
+ warn_deprecated_access_pair = isinstance(new_data["access_pair"], list)
+ # If the not updating the current access_pair, and it is the deprecated list, warn
+ elif "access_pair" in current_data:
+ warn_deprecated_access_pair = isinstance(current_data["access_pair"], list)
+
+ if warn_deprecated_access_pair:
+ tty.warn(
+ f"in mirror {self.name}: support for plain text secrets in config files "
+ "(access_pair: [id, secret]) is deprecated and will be removed in a future Spack "
+ "version. Use environment variables instead (access_pair: "
+ "{id: ..., secret_variable: ...})"
+ )
+
+ keys = [
+ "url",
+ "access_pair",
+ "access_token",
+ "access_token_variable",
+ "profile",
+ "endpoint_url",
+ ]
+ if top_level:
+ keys += ["binary", "source", "signed", "autopush"]
+ changed = False
+ for key in keys:
+ if key in new_data and current_data.get(key) != new_data[key]:
+ current_data[key] = new_data[key]
+ changed = True
+ return changed
+
+ def update(self, data: dict, direction: Optional[str] = None) -> bool:
+ """Modify the mirror with the given data. This takes care
+ of expanding trivial mirror definitions by URL to something more
+ rich with a dict if necessary
+
+ Args:
+ data (dict): The data to update the mirror with.
+ direction (str): The direction to update the mirror in (fetch
+ or push or None for top-level update)
+
+ Returns:
+ bool: True if the mirror was updated, False otherwise."""
+
+ # Modify the top-level entry when no direction is given.
+ if not data:
+ return False
+
+ # If we only update a URL, there's typically no need to expand things to a dict.
+ set_url = data["url"] if len(data) == 1 and "url" in data else None
+
+ if direction is None:
+ # First deal with the case where the current top-level entry is just a string.
+ if isinstance(self._data, str):
+ # Can we replace that string with something new?
+ if set_url:
+ if self._data == set_url:
+ return False
+ self._data = set_url
+ return True
+
+ # Otherwise promote to a dict
+ self._data = {"url": self._data}
+
+ # And update the dictionary accordingly.
+ return self._update_connection_dict(self._data, data, top_level=True)
+
+ # Otherwise, update the fetch / push entry; turn top-level
+ # url string into a dict if necessary.
+ if isinstance(self._data, str):
+ self._data = {"url": self._data}
+
+ # Create a new fetch / push entry if necessary
+ if direction not in self._data:
+ # Keep config minimal if we're just setting the URL.
+ if set_url:
+ self._data[direction] = set_url
+ return True
+ self._data[direction] = {}
+
+ entry = self._data[direction]
+
+ # Keep the entry simple if we're just swapping out the URL.
+ if isinstance(entry, str):
+ if set_url:
+ if entry == set_url:
+ return False
+ self._data[direction] = set_url
+ return True
+
+ # Otherwise promote to a dict
+ self._data[direction] = {"url": entry}
+
+ return self._update_connection_dict(self._data[direction], data, top_level=False)
+
+ def _get_value(self, attribute: str, direction: str):
+ """Returns the most specific value for a given attribute (either push/fetch or global)"""
+ if direction not in ("fetch", "push"):
+ raise ValueError(f"direction must be either 'fetch' or 'push', not {direction}")
+
+ if isinstance(self._data, str):
+ return None
+
+ # Either a string (url) or a dictionary, we care about the dict here.
+ value = self._data.get(direction, {})
+
+ # Return top-level entry if only a URL was set.
+ if isinstance(value, str) or attribute not in value:
+ return self._data.get(attribute)
+
+ return value[attribute]
+
+ def get_url(self, direction: str) -> str:
+ if direction not in ("fetch", "push"):
+ raise ValueError(f"direction must be either 'fetch' or 'push', not {direction}")
+
+ # Whole mirror config is just a url.
+ if isinstance(self._data, str):
+ return _url_or_path_to_url(self._data)
+
+ # Default value
+ url = self._data.get("url")
+
+ # Override it with a direction-specific value
+ if direction in self._data:
+ # Either a url as string or a dict with url key
+ info = self._data[direction]
+ if isinstance(info, str):
+ url = info
+ elif "url" in info:
+ url = info["url"]
+
+ if not url:
+ raise ValueError(f"Mirror {self.name} has no URL configured")
+
+ return _url_or_path_to_url(url)
+
+ def get_credentials(self, direction: str) -> Dict[str, Any]:
+ """Get the mirror credentials from the mirror config
+
+ Args:
+ direction: fetch or push mirror config
+
+ Returns:
+ Dictionary from credential type string to value
+
+ Credential Type Map:
+ access_token -> str
+ access_pair -> tuple(str,str)
+ profile -> str
+ """
+ creddict: Dict[str, Any] = {}
+ access_token = self.get_access_token(direction)
+ if access_token:
+ creddict["access_token"] = access_token
+
+ access_pair = self.get_access_pair(direction)
+ if access_pair:
+ creddict.update({"access_pair": access_pair})
+
+ profile = self.get_profile(direction)
+ if profile:
+ creddict["profile"] = profile
+
+ return creddict
+
+ def get_access_token(self, direction: str) -> Optional[str]:
+ tok = self._get_value("access_token_variable", direction)
+ if tok:
+ return os.environ.get(tok)
+ else:
+ return self._get_value("access_token", direction)
+ return None
+
+ def get_access_pair(self, direction: str) -> Optional[Tuple[str, str]]:
+ pair = self._get_value("access_pair", direction)
+ if isinstance(pair, (tuple, list)) and len(pair) == 2:
+ return (pair[0], pair[1]) if all(pair) else None
+ elif isinstance(pair, dict):
+ id_ = os.environ.get(pair["id_variable"]) if "id_variable" in pair else pair["id"]
+ secret = os.environ.get(pair["secret_variable"])
+ return (id_, secret) if id_ and secret else None
+ else:
+ return None
+
+ def get_profile(self, direction: str) -> Optional[str]:
+ return self._get_value("profile", direction)
+
+ def get_endpoint_url(self, direction: str) -> Optional[str]:
+ return self._get_value("endpoint_url", direction)
+
+
+class MirrorCollection(collections.abc.Mapping):
+ """A mapping of mirror names to mirrors."""
+
+ def __init__(
+ self,
+ mirrors=None,
+ scope=None,
+ binary: Optional[bool] = None,
+ source: Optional[bool] = None,
+ autopush: Optional[bool] = None,
+ ):
+ """Initialize a mirror collection.
+
+ Args:
+ mirrors: A name-to-mirror mapping to initialize the collection with.
+ scope: The scope to use when looking up mirrors from the config.
+ binary: If True, only include binary mirrors.
+ If False, omit binary mirrors.
+ If None, do not filter on binary mirrors.
+ source: If True, only include source mirrors.
+ If False, omit source mirrors.
+ If None, do not filter on source mirrors.
+ autopush: If True, only include mirrors that have autopush enabled.
+ If False, omit mirrors that have autopush enabled.
+ If None, do not filter on autopush."""
+ mirrors_data = (
+ mirrors.items()
+ if mirrors is not None
+ else spack.config.get("mirrors", scope=scope).items()
+ )
+ mirrors = (Mirror(data=mirror, name=name) for name, mirror in mirrors_data)
+
+ def _filter(m: Mirror):
+ if source is not None and m.source != source:
+ return False
+ if binary is not None and m.binary != binary:
+ return False
+ if autopush is not None and m.autopush != autopush:
+ return False
+ return True
+
+ self._mirrors = {m.name: m for m in mirrors if _filter(m)}
+
+ def __eq__(self, other):
+ return self._mirrors == other._mirrors
+
+ def to_json(self, stream=None):
+ return sjson.dump(self.to_dict(True), stream)
+
+ def to_yaml(self, stream=None):
+ return syaml.dump(self.to_dict(True), stream)
+
+ # TODO: this isn't called anywhere
+ @staticmethod
+ def from_yaml(stream, name=None):
+ data = syaml.load(stream)
+ return MirrorCollection(data)
+
+ @staticmethod
+ def from_json(stream, name=None):
+ try:
+ d = sjson.load(stream)
+ return MirrorCollection(d)
+ except Exception as e:
+ raise sjson.SpackJSONError("error parsing JSON mirror collection:", str(e)) from e
+
+ def to_dict(self, recursive=False):
+ return syaml.syaml_dict(
+ sorted(
+ ((k, (v.to_dict() if recursive else v)) for (k, v) in self._mirrors.items()),
+ key=operator.itemgetter(0),
+ )
+ )
+
+ @staticmethod
+ def from_dict(d):
+ return MirrorCollection(d)
+
+ def __getitem__(self, item):
+ return self._mirrors[item]
+
+ def display(self):
+ max_len = max(len(mirror.name) for mirror in self._mirrors.values())
+ for mirror in self._mirrors.values():
+ mirror.display(max_len)
+
+ def lookup(self, name_or_url):
+ """Looks up and returns a Mirror.
+
+ If this MirrorCollection contains a named Mirror under the name
+ [name_or_url], then that mirror is returned. Otherwise, [name_or_url]
+ is assumed to be a mirror URL, and an anonymous mirror with the given
+ URL is returned.
+ """
+ result = self.get(name_or_url)
+
+ if result is None:
+ result = Mirror(fetch=name_or_url)
+
+ return result
+
+ def __iter__(self):
+ return iter(self._mirrors)
+
+ def __len__(self):
+ return len(self._mirrors)
diff --git a/lib/spack/spack/mirrors/utils.py b/lib/spack/spack/mirrors/utils.py
new file mode 100644
index 0000000000..ba5aba3774
--- /dev/null
+++ b/lib/spack/spack/mirrors/utils.py
@@ -0,0 +1,262 @@
+# Copyright 2013-2024 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 os.path
+import sys
+import traceback
+
+import llnl.util.tty as tty
+from llnl.util.filesystem import mkdirp
+
+import spack.caches
+import spack.config
+import spack.error
+import spack.repo
+import spack.spec
+import spack.util.spack_yaml as syaml
+import spack.version
+from spack.error import MirrorError
+from spack.mirrors.mirror import Mirror, MirrorCollection
+
+
+def get_all_versions(specs):
+ """Given a set of initial specs, return a new set of specs that includes
+ each version of each package in the original set.
+
+ Note that if any spec in the original set specifies properties other than
+ version, this information will be omitted in the new set; for example; the
+ new set of specs will not include variant settings.
+ """
+ version_specs = []
+ for spec in specs:
+ pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
+ # Skip any package that has no known versions.
+ if not pkg_cls.versions:
+ tty.msg("No safe (checksummed) versions for package %s" % pkg_cls.name)
+ continue
+
+ for version in pkg_cls.versions:
+ version_spec = spack.spec.Spec(pkg_cls.name)
+ version_spec.versions = spack.version.VersionList([version])
+ version_specs.append(version_spec)
+
+ return version_specs
+
+
+def get_matching_versions(specs, num_versions=1):
+ """Get a spec for EACH known version matching any spec in the list.
+ For concrete specs, this retrieves the concrete version and, if more
+ than one version per spec is requested, retrieves the latest versions
+ of the package.
+ """
+ matching = []
+ for spec in specs:
+ pkg = spec.package
+
+ # Skip any package that has no known versions.
+ if not pkg.versions:
+ tty.msg("No safe (checksummed) versions for package %s" % pkg.name)
+ continue
+
+ pkg_versions = num_versions
+
+ version_order = list(reversed(sorted(pkg.versions)))
+ matching_spec = []
+ if spec.concrete:
+ matching_spec.append(spec)
+ pkg_versions -= 1
+ if spec.version in version_order:
+ version_order.remove(spec.version)
+
+ for v in version_order:
+ # Generate no more than num_versions versions for each spec.
+ if pkg_versions < 1:
+ break
+
+ # Generate only versions that satisfy the spec.
+ if spec.concrete or v.intersects(spec.versions):
+ s = spack.spec.Spec(pkg.name)
+ s.versions = spack.version.VersionList([v])
+ s.variants = spec.variants.copy()
+ # This is needed to avoid hanging references during the
+ # concretization phase
+ s.variants.spec = s
+ matching_spec.append(s)
+ pkg_versions -= 1
+
+ if not matching_spec:
+ tty.warn("No known version matches spec: %s" % spec)
+ matching.extend(matching_spec)
+
+ return matching
+
+
+def create(path, specs, skip_unstable_versions=False):
+ """Create a directory to be used as a spack mirror, and fill it with
+ package archives.
+
+ Arguments:
+ path: Path to create a mirror directory hierarchy in.
+ specs: Any package versions matching these specs will be added \
+ to the mirror.
+ skip_unstable_versions: if true, this skips adding resources when
+ they do not have a stable archive checksum (as determined by
+ ``fetch_strategy.stable_target``)
+
+ Return Value:
+ Returns a tuple of lists: (present, mirrored, error)
+
+ * present: Package specs that were already present.
+ * mirrored: Package specs that were successfully mirrored.
+ * error: Package specs that failed to mirror due to some error.
+ """
+ # automatically spec-ify anything in the specs array.
+ specs = [s if isinstance(s, spack.spec.Spec) else spack.spec.Spec(s) for s in specs]
+
+ mirror_cache, mirror_stats = mirror_cache_and_stats(path, skip_unstable_versions)
+ for spec in specs:
+ mirror_stats.next_spec(spec)
+ create_mirror_from_package_object(spec.package, mirror_cache, mirror_stats)
+
+ return mirror_stats.stats()
+
+
+def mirror_cache_and_stats(path, skip_unstable_versions=False):
+ """Return both a mirror cache and a mirror stats, starting from the path
+ where a mirror ought to be created.
+
+ Args:
+ path (str): path to create a mirror directory hierarchy in.
+ skip_unstable_versions: if true, this skips adding resources when
+ they do not have a stable archive checksum (as determined by
+ ``fetch_strategy.stable_target``)
+ """
+ # Get the absolute path of the root before we start jumping around.
+ if not os.path.isdir(path):
+ try:
+ mkdirp(path)
+ except OSError as e:
+ raise MirrorError("Cannot create directory '%s':" % path, str(e))
+ mirror_cache = spack.caches.MirrorCache(path, skip_unstable_versions=skip_unstable_versions)
+ mirror_stats = MirrorStats()
+ return mirror_cache, mirror_stats
+
+
+def add(mirror: Mirror, scope=None):
+ """Add a named mirror in the given scope"""
+ mirrors = spack.config.get("mirrors", scope=scope)
+ if not mirrors:
+ mirrors = syaml.syaml_dict()
+
+ if mirror.name in mirrors:
+ tty.die("Mirror with name {} already exists.".format(mirror.name))
+
+ items = [(n, u) for n, u in mirrors.items()]
+ items.insert(0, (mirror.name, mirror.to_dict()))
+ mirrors = syaml.syaml_dict(items)
+ spack.config.set("mirrors", mirrors, scope=scope)
+
+
+def remove(name, scope):
+ """Remove the named mirror in the given scope"""
+ mirrors = spack.config.get("mirrors", scope=scope)
+ if not mirrors:
+ mirrors = syaml.syaml_dict()
+
+ if name not in mirrors:
+ tty.die("No mirror with name %s" % name)
+
+ mirrors.pop(name)
+ spack.config.set("mirrors", mirrors, scope=scope)
+ tty.msg("Removed mirror %s." % name)
+
+
+class MirrorStats:
+ def __init__(self):
+ self.present = {}
+ self.new = {}
+ self.errors = set()
+
+ self.current_spec = None
+ self.added_resources = set()
+ self.existing_resources = set()
+
+ def next_spec(self, spec):
+ self._tally_current_spec()
+ self.current_spec = spec
+
+ def _tally_current_spec(self):
+ if self.current_spec:
+ if self.added_resources:
+ self.new[self.current_spec] = len(self.added_resources)
+ if self.existing_resources:
+ self.present[self.current_spec] = len(self.existing_resources)
+ self.added_resources = set()
+ self.existing_resources = set()
+ self.current_spec = None
+
+ def stats(self):
+ self._tally_current_spec()
+ return list(self.present), list(self.new), list(self.errors)
+
+ def already_existed(self, resource):
+ # If an error occurred after caching a subset of a spec's
+ # resources, a secondary attempt may consider them already added
+ if resource not in self.added_resources:
+ self.existing_resources.add(resource)
+
+ def added(self, resource):
+ self.added_resources.add(resource)
+
+ def error(self):
+ self.errors.add(self.current_spec)
+
+
+def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats):
+ """Add a single package object to a mirror.
+
+ The package object is only required to have an associated spec
+ with a concrete version.
+
+ Args:
+ pkg_obj (spack.package_base.PackageBase): package object with to be added.
+ mirror_cache (spack.caches.MirrorCache): mirror where to add the spec.
+ mirror_stats (spack.mirror.MirrorStats): statistics on the current mirror
+
+ Return:
+ True if the spec was added successfully, False otherwise
+ """
+ tty.msg("Adding package {} to mirror".format(pkg_obj.spec.format("{name}{@version}")))
+ num_retries = 3
+ while num_retries > 0:
+ try:
+ # Includes patches and resources
+ with pkg_obj.stage as pkg_stage:
+ pkg_stage.cache_mirror(mirror_cache, mirror_stats)
+ exception = None
+ break
+ except Exception as e:
+ exc_tuple = sys.exc_info()
+ exception = e
+ num_retries -= 1
+ if exception:
+ if spack.config.get("config:debug"):
+ traceback.print_exception(file=sys.stderr, *exc_tuple)
+ else:
+ tty.warn(
+ "Error while fetching %s" % pkg_obj.spec.cformat("{name}{@version}"),
+ getattr(exception, "message", exception),
+ )
+ mirror_stats.error()
+ return False
+ return True
+
+
+def require_mirror_name(mirror_name):
+ """Find a mirror by name and raise if it does not exist"""
+ mirror = MirrorCollection().get(mirror_name)
+ if not mirror:
+ raise ValueError(f'no mirror named "{mirror_name}"')
+ return mirror
diff --git a/lib/spack/spack/mixins.py b/lib/spack/spack/mixins.py
index e0e25f42bb..2db35fa134 100644
--- a/lib/spack/spack/mixins.py
+++ b/lib/spack/spack/mixins.py
@@ -10,7 +10,7 @@ import os
import llnl.util.filesystem
-import spack.builder
+import spack.phase_callbacks
def filter_compiler_wrappers(*files, **kwargs):
@@ -111,4 +111,4 @@ def filter_compiler_wrappers(*files, **kwargs):
if pkg.compiler.name == "nag":
x.filter("-Wl,--enable-new-dtags", "", **filter_kwargs)
- spack.builder.run_after(after)(_filter_compiler_wrappers_impl)
+ spack.phase_callbacks.run_after(after)(_filter_compiler_wrappers_impl)
diff --git a/lib/spack/spack/modules/__init__.py b/lib/spack/spack/modules/__init__.py
index b466b2aafb..39d696b136 100644
--- a/lib/spack/spack/modules/__init__.py
+++ b/lib/spack/spack/modules/__init__.py
@@ -7,8 +7,16 @@
include Tcl non-hierarchical modules, Lua hierarchical modules, and others.
"""
+import os
from typing import Dict, Type
+import llnl.util.tty as tty
+
+import spack.repo
+import spack.spec
+import spack.store
+
+from . import common
from .common import BaseModuleFileWriter, disable_modules
from .lmod import LmodModulefileWriter
from .tcl import TclModulefileWriter
@@ -19,3 +27,66 @@ module_types: Dict[str, Type[BaseModuleFileWriter]] = {
"tcl": TclModulefileWriter,
"lmod": LmodModulefileWriter,
}
+
+
+def get_module(
+ module_type, spec: spack.spec.Spec, get_full_path, module_set_name="default", required=True
+):
+ """Retrieve the module file for a given spec and module type.
+
+ Retrieve the module file for the given spec if it is available. If the
+ module is not available, this will raise an exception unless the module
+ is excluded or if the spec is installed upstream.
+
+ Args:
+ module_type: the type of module we want to retrieve (e.g. lmod)
+ spec: refers to the installed package that we want to retrieve a module
+ for
+ required: if the module is required but excluded, this function will
+ print a debug message. If a module is missing but not excluded,
+ then an exception is raised (regardless of whether it is required)
+ get_full_path: if ``True``, this returns the full path to the module.
+ Otherwise, this returns the module name.
+ module_set_name: the named module configuration set from modules.yaml
+ for which to retrieve the module.
+
+ Returns:
+ The module name or path. May return ``None`` if the module is not
+ available.
+ """
+ try:
+ upstream = spec.installed_upstream
+ except spack.repo.UnknownPackageError:
+ upstream, record = spack.store.STORE.db.query_by_spec_hash(spec.dag_hash())
+ if upstream:
+ module = common.upstream_module_index.upstream_module(spec, module_type)
+ if not module:
+ return None
+
+ if get_full_path:
+ return module.path
+ else:
+ return module.use_name
+ else:
+ writer = module_types[module_type](spec, module_set_name)
+ if not os.path.isfile(writer.layout.filename):
+ fmt_str = "{name}{@version}{/hash:7}"
+ if not writer.conf.excluded:
+ raise common.ModuleNotFoundError(
+ "The module for package {} should be at {}, but it does not exist".format(
+ spec.format(fmt_str), writer.layout.filename
+ )
+ )
+ elif required:
+ tty.debug(
+ "The module configuration has excluded {}: omitting it".format(
+ spec.format(fmt_str)
+ )
+ )
+ else:
+ return None
+
+ if get_full_path:
+ return writer.layout.filename
+ else:
+ return writer.layout.use_name
diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py
index 1246403c89..e62520a6c2 100644
--- a/lib/spack/spack/modules/common.py
+++ b/lib/spack/spack/modules/common.py
@@ -39,20 +39,20 @@ from typing import List, Optional
import llnl.util.filesystem
import llnl.util.tty as tty
-from llnl.util.lang import dedupe, memoized
+from llnl.util.lang import Singleton, dedupe, memoized
import spack.build_environment
import spack.config
+import spack.deptypes as dt
import spack.environment
import spack.error
-import spack.modules.common
import spack.paths
import spack.projections as proj
-import spack.repo
import spack.schema.environment
import spack.spec
import spack.store
import spack.tengine as tengine
+import spack.user_environment
import spack.util.environment
import spack.util.file_permissions as fp
import spack.util.path
@@ -81,6 +81,17 @@ _valid_tokens = (
)
+_FORMAT_STRING_RE = re.compile(r"({[^}]*})")
+
+
+def _format_env_var_name(spec, var_name_fmt):
+ """Format the variable name, but uppercase any formatted fields."""
+ fmt_parts = _FORMAT_STRING_RE.split(var_name_fmt)
+ return "".join(
+ spec.format(part).upper() if _FORMAT_STRING_RE.match(part) else part for part in fmt_parts
+ )
+
+
def _check_tokens_are_valid(format_string, message):
"""Checks that the tokens used in the format string are valid in
the context of module file and environment variable naming.
@@ -119,43 +130,26 @@ def update_dictionary_extending_lists(target, update):
target[key] = update[key]
-def dependencies(spec, request="all"):
- """Returns the list of dependent specs for a given spec, according to the
- request passed as parameter.
+def dependencies(spec: spack.spec.Spec, request: str = "all") -> List[spack.spec.Spec]:
+ """Returns the list of dependent specs for a given spec.
Args:
spec: spec to be analyzed
- request: either 'none', 'direct' or 'all'
+ request: one of "none", "run", "direct", "all"
Returns:
- list of dependencies
-
- The return list will be empty if request is 'none', will contain
- the direct dependencies if request is 'direct', or the entire DAG
- if request is 'all'.
+ list of requested dependencies
"""
- if request not in ("none", "direct", "all"):
- message = "Wrong value for argument 'request' : "
- message += "should be one of ('none', 'direct', 'all')"
- raise tty.error(message + " [current value is '%s']" % request)
-
if request == "none":
return []
+ elif request == "run":
+ return spec.dependencies(deptype=dt.RUN)
+ elif request == "direct":
+ return spec.dependencies(deptype=dt.RUN | dt.LINK)
+ elif request == "all":
+ return list(spec.traverse(order="topo", deptype=dt.LINK | dt.RUN, root=False))
- if request == "direct":
- return spec.dependencies(deptype=("link", "run"))
-
- # FIXME : during module file creation nodes seem to be visited multiple
- # FIXME : times even if cover='nodes' is given. This work around permits
- # FIXME : to get a unique list of spec anyhow. Do we miss a merge
- # FIXME : step among nodes that refer to the same package?
- seen = set()
- seen_add = seen.add
- deps = sorted(
- spec.traverse(order="post", cover="nodes", deptype=("link", "run"), root=False),
- reverse=True,
- )
- return [d for d in deps if not (d in seen or seen_add(d))]
+ raise ValueError(f'request "{request}" is not one of "none", "direct", "run", "all"')
def merge_config_rules(configuration, spec):
@@ -252,7 +246,7 @@ def _generate_upstream_module_index():
return UpstreamModuleIndex(spack.store.STORE.db, module_indices)
-upstream_module_index = llnl.util.lang.Singleton(_generate_upstream_module_index)
+upstream_module_index = Singleton(_generate_upstream_module_index)
ModuleIndexEntry = collections.namedtuple("ModuleIndexEntry", ["path", "use_name"])
@@ -328,67 +322,6 @@ class UpstreamModuleIndex:
return None
-def get_module(module_type, spec, get_full_path, module_set_name="default", required=True):
- """Retrieve the module file for a given spec and module type.
-
- Retrieve the module file for the given spec if it is available. If the
- module is not available, this will raise an exception unless the module
- is excluded or if the spec is installed upstream.
-
- Args:
- module_type: the type of module we want to retrieve (e.g. lmod)
- spec: refers to the installed package that we want to retrieve a module
- for
- required: if the module is required but excluded, this function will
- print a debug message. If a module is missing but not excluded,
- then an exception is raised (regardless of whether it is required)
- get_full_path: if ``True``, this returns the full path to the module.
- Otherwise, this returns the module name.
- module_set_name: the named module configuration set from modules.yaml
- for which to retrieve the module.
-
- Returns:
- The module name or path. May return ``None`` if the module is not
- available.
- """
- try:
- upstream = spec.installed_upstream
- except spack.repo.UnknownPackageError:
- upstream, record = spack.store.STORE.db.query_by_spec_hash(spec.dag_hash())
- if upstream:
- module = spack.modules.common.upstream_module_index.upstream_module(spec, module_type)
- if not module:
- return None
-
- if get_full_path:
- return module.path
- else:
- return module.use_name
- else:
- writer = spack.modules.module_types[module_type](spec, module_set_name)
- if not os.path.isfile(writer.layout.filename):
- fmt_str = "{name}{@version}{/hash:7}"
- if not writer.conf.excluded:
- raise ModuleNotFoundError(
- "The module for package {} should be at {}, but it does not exist".format(
- spec.format(fmt_str), writer.layout.filename
- )
- )
- elif required:
- tty.debug(
- "The module configuration has excluded {}: omitting it".format(
- spec.format(fmt_str)
- )
- )
- else:
- return None
-
- if get_full_path:
- return writer.layout.filename
- else:
- return writer.layout.use_name
-
-
class BaseConfiguration:
"""Manipulates the information needed to generate a module file to make
querying easier. It needs to be sub-classed for specific module types.
@@ -594,7 +527,8 @@ class BaseFileLayout:
parts = name.split("/")
name = os.path.join(*parts)
# Add optional suffixes based on constraints
- path_elements = [name] + self.conf.suffixes
+ path_elements = [name]
+ path_elements.extend(map(self.spec.format, self.conf.suffixes))
return "-".join(path_elements)
@property
@@ -695,28 +629,33 @@ class BaseContext(tengine.Context):
)
spack.config.merge_yaml(
prefix_inspections,
- spack.config.get("modules:%s:prefix_inspections" % self.conf.name, {}),
+ spack.config.get(f"modules:{self.conf.name}:prefix_inspections", {}),
)
- use_view = spack.config.get("modules:%s:use_view" % self.conf.name, False)
+ use_view = spack.config.get(f"modules:{self.conf.name}:use_view", False)
- spec = self.spec.copy() # defensive copy before setting prefix
- if use_view:
- if use_view is True:
- use_view = spack.environment.default_view_name
+ assert isinstance(use_view, (bool, str))
+ if use_view:
env = spack.environment.active_environment()
if not env:
raise spack.environment.SpackEnvironmentViewError(
"Module generation with views requires active environment"
)
- view = env.views[use_view]
+ view_name = spack.environment.default_view_name if use_view is True else use_view
- spec.prefix = view.get_projection_for_spec(spec)
+ if not env.has_view(view_name):
+ raise spack.environment.SpackEnvironmentViewError(
+ f"View {view_name} not found in environment {env.name} when generating modules"
+ )
+
+ view = env.views[view_name]
+ else:
+ view = None
env = spack.util.environment.inspect_path(
- spec.prefix, prefix_inspections, exclude=spack.util.environment.is_system_path
+ self.spec.prefix, prefix_inspections, exclude=spack.util.environment.is_system_path
)
# Let the extendee/dependency modify their extensions/dependencies
@@ -726,13 +665,19 @@ class BaseContext(tengine.Context):
# whole chain of setup_dependent_package has to be followed from leaf to spec.
# So: just run it here, but don't collect env mods.
spack.build_environment.SetupContext(
- spec, context=Context.RUN
+ self.spec, context=Context.RUN
).set_all_package_py_globals()
# Then run setup_dependent_run_environment before setup_run_environment.
- for dep in spec.dependencies(deptype=("link", "run")):
- dep.package.setup_dependent_run_environment(env, spec)
- spec.package.setup_run_environment(env)
+ for dep in self.spec.dependencies(deptype=("link", "run")):
+ dep.package.setup_dependent_run_environment(env, self.spec)
+ self.spec.package.setup_run_environment(env)
+
+ # Project the environment variables from prefix to view if needed
+ if view and self.spec in view:
+ spack.user_environment.project_env_mods(
+ *self.spec.traverse(deptype=dt.LINK | dt.RUN), view=view, env=env
+ )
# Modifications required from modules.yaml
env.extend(self.conf.env)
@@ -741,24 +686,16 @@ class BaseContext(tengine.Context):
exclude = self.conf.exclude_env_vars
# We may have tokens to substitute in environment commands
-
- # Prepare a suitable transformation dictionary for the names
- # of the environment variables. This means turn the valid
- # tokens uppercase.
- transform = {}
- for token in _valid_tokens:
- transform[token] = lambda s, string: str.upper(string)
-
for x in env:
# Ensure all the tokens are valid in this context
msg = "some tokens cannot be expanded in an environment variable name"
+
_check_tokens_are_valid(x.name, message=msg)
- # Transform them
- x.name = spec.format(x.name, transform=transform)
+ x.name = _format_env_var_name(self.spec, x.name)
if self.modification_needs_formatting(x):
try:
# Not every command has a value
- x.value = spec.format(x.value)
+ x.value = self.spec.format(x.value)
except AttributeError:
pass
x.name = str(x.name).replace("-", "_")
diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py
index 4c21da3c91..7f4fc0d1b0 100644
--- a/lib/spack/spack/multimethod.py
+++ b/lib/spack/spack/multimethod.py
@@ -25,14 +25,11 @@ depending on the scenario, regular old conditionals might be clearer,
so package authors should use their judgement.
"""
import functools
-import inspect
from contextlib import contextmanager
-from llnl.util.lang import caller_locals
-
-import spack.directives
+import spack.directives_meta
import spack.error
-from spack.spec import Spec
+import spack.spec
class MultiMethodMeta(type):
@@ -135,7 +132,7 @@ class SpecMultiMethod:
# its superclasses for successive calls. We don't have that
# information within `SpecMultiMethod`, because it is not
# associated with the package class.
- for cls in inspect.getmro(package_or_builder_self.__class__)[1:]:
+ for cls in package_or_builder_self.__class__.__mro__[1:]:
superself = cls.__dict__.get(self.__name__, None)
if isinstance(superself, SpecMultiMethod):
@@ -165,9 +162,9 @@ class when:
condition (str): condition to be met
"""
if isinstance(condition, bool):
- self.spec = Spec() if condition else None
+ self.spec = spack.spec.Spec() if condition else None
else:
- self.spec = Spec(condition)
+ self.spec = spack.spec.Spec(condition)
def __call__(self, method):
"""This annotation lets packages declare multiple versions of
@@ -229,11 +226,9 @@ class when:
platform-specific versions. There's not much we can do to get
around this because of the way decorators work.
"""
- # In Python 2, Get the first definition of the method in the
- # calling scope by looking at the caller's locals. In Python 3,
- # we handle this using MultiMethodMeta.__prepare__.
- if MultiMethodMeta._locals is None:
- MultiMethodMeta._locals = caller_locals()
+ assert (
+ MultiMethodMeta._locals is not None
+ ), "cannot use multimethod, missing MultiMethodMeta metaclass?"
# Create a multimethod with this name if there is not one already
original_method = MultiMethodMeta._locals.get(method.__name__)
@@ -266,17 +261,17 @@ class when:
and add their constraint to whatever may be already present in the directive
`when=` argument.
"""
- spack.directives.DirectiveMeta.push_to_context(str(self.spec))
+ spack.directives_meta.DirectiveMeta.push_to_context(str(self.spec))
def __exit__(self, exc_type, exc_val, exc_tb):
- spack.directives.DirectiveMeta.pop_from_context()
+ spack.directives_meta.DirectiveMeta.pop_from_context()
@contextmanager
def default_args(**kwargs):
- spack.directives.DirectiveMeta.push_default_args(kwargs)
+ spack.directives_meta.DirectiveMeta.push_default_args(kwargs)
yield
- spack.directives.DirectiveMeta.pop_default_args()
+ spack.directives_meta.DirectiveMeta.pop_default_args()
class MultiMethodError(spack.error.SpackError):
diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py
index 48cd83818a..d6f4d1efd5 100644
--- a/lib/spack/spack/oci/oci.py
+++ b/lib/spack/spack/oci/oci.py
@@ -6,27 +6,21 @@
import hashlib
import json
import os
-import time
import urllib.error
import urllib.parse
import urllib.request
from http.client import HTTPResponse
-from typing import NamedTuple, Tuple
+from typing import List, NamedTuple, Tuple
from urllib.request import Request
import llnl.util.tty as tty
-import spack.binary_distribution
-import spack.config
-import spack.error
import spack.fetch_strategy
-import spack.mirror
+import spack.mirrors.layout
+import spack.mirrors.mirror
import spack.oci.opener
-import spack.repo
-import spack.spec
import spack.stage
-import spack.traverse
-import spack.util.crypto
+import spack.util.url
from .image import Digest, ImageReference
@@ -37,16 +31,6 @@ class Blob(NamedTuple):
size: int
-def create_tarball(spec: spack.spec.Spec, tarfile_path):
- buildinfo = spack.binary_distribution.get_buildinfo_dict(spec)
- return spack.binary_distribution._do_create_tarball(tarfile_path, spec.prefix, buildinfo)
-
-
-def _log_upload_progress(digest: Digest, size: int, elapsed: float):
- elapsed = max(elapsed, 0.001) # guard against division by zero
- tty.info(f"Uploaded {digest} ({elapsed:.2f}s, {size / elapsed / 1024 / 1024:.2f} MB/s)")
-
-
def with_query_param(url: str, param: str, value: str) -> str:
"""Add a query parameter to a URL
@@ -69,6 +53,42 @@ def with_query_param(url: str, param: str, value: str) -> str:
)
+def list_tags(ref: ImageReference, _urlopen: spack.oci.opener.MaybeOpen = None) -> List[str]:
+ """Retrieves the list of tags associated with an image, handling pagination."""
+ _urlopen = _urlopen or spack.oci.opener.urlopen
+ tags = set()
+ fetch_url = ref.tags_url()
+
+ while True:
+ # Fetch tags
+ request = Request(url=fetch_url)
+ response = _urlopen(request)
+ spack.oci.opener.ensure_status(request, response, 200)
+ tags.update(json.load(response)["tags"])
+
+ # Check for pagination
+ link_header = response.headers["Link"]
+
+ if link_header is None:
+ break
+
+ tty.debug(f"OCI tag pagination: {link_header}")
+
+ rel_next_value = spack.util.url.parse_link_rel_next(link_header)
+
+ if rel_next_value is None:
+ break
+
+ rel_next = urllib.parse.urlparse(rel_next_value)
+
+ if rel_next.scheme not in ("https", ""):
+ break
+
+ fetch_url = ref.endpoint(rel_next_value)
+
+ return sorted(tags)
+
+
def upload_blob(
ref: ImageReference,
file: str,
@@ -104,8 +124,6 @@ def upload_blob(
if not force and blob_exists(ref, digest, _urlopen):
return False
- start = time.time()
-
with open(file, "rb") as f:
file_size = os.fstat(f.fileno()).st_size
@@ -130,11 +148,10 @@ def upload_blob(
# Created the blob in one go.
if response.status == 201:
- _log_upload_progress(digest, file_size, time.time() - start)
return True
# Otherwise, do another PUT request.
- spack.oci.opener.ensure_status(response, 202)
+ spack.oci.opener.ensure_status(request, response, 202)
assert "Location" in response.headers
# Can be absolute or relative, joining handles both
@@ -143,28 +160,23 @@ def upload_blob(
)
f.seek(0)
- response = _urlopen(
- Request(
- url=upload_url,
- method="PUT",
- data=f,
- headers={
- "Content-Type": "application/octet-stream",
- "Content-Length": str(file_size),
- },
- )
+ request = Request(
+ url=upload_url,
+ method="PUT",
+ data=f,
+ headers={"Content-Type": "application/octet-stream", "Content-Length": str(file_size)},
)
- spack.oci.opener.ensure_status(response, 201)
+ response = _urlopen(request)
+
+ spack.oci.opener.ensure_status(request, response, 201)
- # print elapsed time and # MB/s
- _log_upload_progress(digest, file_size, time.time() - start)
return True
def upload_manifest(
ref: ImageReference,
- oci_manifest: dict,
+ manifest: dict,
tag: bool = True,
_urlopen: spack.oci.opener.MaybeOpen = None,
):
@@ -172,7 +184,7 @@ def upload_manifest(
Args:
ref: The image reference.
- oci_manifest: The OCI manifest or index.
+ manifest: The manifest or index.
tag: When true, use the tag, otherwise use the digest,
this is relevant for multi-arch images, where the
tag is an index, referencing the manifests by digest.
@@ -182,27 +194,27 @@ def upload_manifest(
"""
_urlopen = _urlopen or spack.oci.opener.urlopen
- data = json.dumps(oci_manifest, separators=(",", ":")).encode()
+ data = json.dumps(manifest, separators=(",", ":")).encode()
digest = Digest.from_sha256(hashlib.sha256(data).hexdigest())
size = len(data)
if not tag:
ref = ref.with_digest(digest)
- response = _urlopen(
- Request(
- url=ref.manifest_url(),
- method="PUT",
- data=data,
- headers={"Content-Type": oci_manifest["mediaType"]},
- )
+ request = Request(
+ url=ref.manifest_url(),
+ method="PUT",
+ data=data,
+ headers={"Content-Type": manifest["mediaType"]},
)
- spack.oci.opener.ensure_status(response, 201)
+ response = _urlopen(request)
+
+ spack.oci.opener.ensure_status(request, response, 201)
return digest, size
-def image_from_mirror(mirror: spack.mirror.Mirror) -> ImageReference:
+def image_from_mirror(mirror: spack.mirrors.mirror.Mirror) -> ImageReference:
"""Given an OCI based mirror, extract the URL and image name from it"""
url = mirror.push_url
if not url.startswith("oci://"):
@@ -367,7 +379,7 @@ def make_stage(
) -> spack.stage.Stage:
_urlopen = _urlopen or spack.oci.opener.urlopen
fetch_strategy = spack.fetch_strategy.OCIRegistryFetchStrategy(
- url, checksum=digest.digest, _urlopen=_urlopen
+ url=url, checksum=digest.digest, _urlopen=_urlopen
)
# Use blobs/<alg>/<encoded> as the cache path, which follows
# the OCI Image Layout Specification. What's missing though,
@@ -375,7 +387,7 @@ def make_stage(
# required by the spec.
return spack.stage.Stage(
fetch_strategy,
- mirror_paths=spack.mirror.OCIImageLayout(digest),
+ mirror_paths=spack.mirrors.layout.OCILayout(digest),
name=digest.digest,
keep=keep,
)
diff --git a/lib/spack/spack/oci/opener.py b/lib/spack/spack/oci/opener.py
index 84d4d23b9a..118fdcf931 100644
--- a/lib/spack/spack/oci/opener.py
+++ b/lib/spack/spack/oci/opener.py
@@ -20,9 +20,8 @@ from urllib.request import Request
import llnl.util.lang
import spack.config
-import spack.mirror
+import spack.mirrors.mirror
import spack.parser
-import spack.repo
import spack.util.web
from .image import ImageReference
@@ -310,19 +309,15 @@ class OCIAuthHandler(urllib.request.BaseHandler):
# Login failed, avoid infinite recursion where we go back and
# forth between auth server and registry
if hasattr(req, "login_attempted"):
- raise urllib.error.HTTPError(
- req.full_url, code, f"Failed to login to {req.full_url}: {msg}", headers, fp
+ raise spack.util.web.DetailedHTTPError(
+ req, code, f"Failed to login: {msg}", headers, fp
)
# On 401 Unauthorized, parse the WWW-Authenticate header
# to determine what authentication is required
if "WWW-Authenticate" not in headers:
- raise urllib.error.HTTPError(
- req.full_url,
- code,
- "Cannot login to registry, missing WWW-Authenticate header",
- headers,
- fp,
+ raise spack.util.web.DetailedHTTPError(
+ req, code, "Cannot login to registry, missing WWW-Authenticate header", headers, fp
)
header_value = headers["WWW-Authenticate"]
@@ -330,8 +325,8 @@ class OCIAuthHandler(urllib.request.BaseHandler):
try:
challenge = get_bearer_challenge(parse_www_authenticate(header_value))
except ValueError as e:
- raise urllib.error.HTTPError(
- req.full_url,
+ raise spack.util.web.DetailedHTTPError(
+ req,
code,
f"Cannot login to registry, malformed WWW-Authenticate header: {header_value}",
headers,
@@ -340,8 +335,8 @@ class OCIAuthHandler(urllib.request.BaseHandler):
# If there is no bearer challenge, we can't handle it
if not challenge:
- raise urllib.error.HTTPError(
- req.full_url,
+ raise spack.util.web.DetailedHTTPError(
+ req,
code,
f"Cannot login to registry, unsupported authentication scheme: {header_value}",
headers,
@@ -356,8 +351,8 @@ class OCIAuthHandler(urllib.request.BaseHandler):
timeout=req.timeout,
)
except ValueError as e:
- raise urllib.error.HTTPError(
- req.full_url,
+ raise spack.util.web.DetailedHTTPError(
+ req,
code,
f"Cannot login to registry, failed to obtain bearer token: {e}",
headers,
@@ -372,19 +367,20 @@ class OCIAuthHandler(urllib.request.BaseHandler):
def credentials_from_mirrors(
- domain: str, *, mirrors: Optional[Iterable[spack.mirror.Mirror]] = None
+ domain: str, *, mirrors: Optional[Iterable[spack.mirrors.mirror.Mirror]] = None
) -> Optional[UsernamePassword]:
"""Filter out OCI registry credentials from a list of mirrors."""
- mirrors = mirrors or spack.mirror.MirrorCollection().values()
+ mirrors = mirrors or spack.mirrors.mirror.MirrorCollection().values()
for mirror in mirrors:
# Prefer push credentials over fetch. Unlikely that those are different
# but our config format allows it.
for direction in ("push", "fetch"):
- pair = mirror.get_access_pair(direction)
- if pair is None:
+ pair = mirror.get_credentials(direction).get("access_pair")
+ if not pair:
continue
+
url = mirror.get_url(direction)
if not url.startswith("oci://"):
continue
@@ -402,7 +398,7 @@ def create_opener():
opener = urllib.request.OpenerDirector()
for handler in [
urllib.request.UnknownHandler(),
- urllib.request.HTTPSHandler(),
+ urllib.request.HTTPSHandler(context=spack.util.web.ssl_create_default_context()),
spack.util.web.SpackHTTPDefaultErrorHandler(),
urllib.request.HTTPRedirectHandler(),
urllib.request.HTTPErrorProcessor(),
@@ -412,28 +408,37 @@ def create_opener():
return opener
-def ensure_status(response: HTTPResponse, status: int):
+def ensure_status(request: urllib.request.Request, response: HTTPResponse, status: int):
"""Raise an error if the response status is not the expected one."""
if response.status == status:
return
- raise urllib.error.HTTPError(
- response.geturl(), response.status, response.reason, response.info(), None
+ raise spack.util.web.DetailedHTTPError(
+ request, response.status, response.reason, response.info(), None
)
-def default_retry(f, retries: int = 3, sleep=None):
+def default_retry(f, retries: int = 5, sleep=None):
sleep = sleep or time.sleep
def wrapper(*args, **kwargs):
for i in range(retries):
try:
return f(*args, **kwargs)
- except urllib.error.HTTPError as e:
+ except (urllib.error.URLError, TimeoutError) as e:
# Retry on internal server errors, and rate limit errors
# Potentially this could take into account the Retry-After header
# if registries support it
- if i + 1 != retries and (500 <= e.code < 600 or e.code == 429):
+ if i + 1 != retries and (
+ (
+ isinstance(e, urllib.error.HTTPError)
+ and (500 <= e.code < 600 or e.code == 429)
+ )
+ or (
+ isinstance(e, urllib.error.URLError) and isinstance(e.reason, TimeoutError)
+ )
+ or isinstance(e, TimeoutError)
+ ):
# Exponential backoff
sleep(2**i)
continue
diff --git a/lib/spack/spack/operating_systems/__init__.py b/lib/spack/spack/operating_systems/__init__.py
index 22a5ea48e7..2b60c62525 100644
--- a/lib/spack/spack/operating_systems/__init__.py
+++ b/lib/spack/spack/operating_systems/__init__.py
@@ -3,22 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from ._operating_system import OperatingSystem
-from .cray_backend import CrayBackend
-from .cray_frontend import CrayFrontend
from .freebsd import FreeBSDOs
from .linux_distro import LinuxDistro
from .mac_os import MacOs
from .windows_os import WindowsOs
-__all__ = [
- "OperatingSystem",
- "LinuxDistro",
- "MacOs",
- "CrayFrontend",
- "CrayBackend",
- "WindowsOs",
- "FreeBSDOs",
-]
+__all__ = ["OperatingSystem", "LinuxDistro", "MacOs", "WindowsOs", "FreeBSDOs"]
#: List of all the Operating Systems known to Spack
-operating_systems = [LinuxDistro, MacOs, CrayFrontend, CrayBackend, WindowsOs, FreeBSDOs]
+operating_systems = [LinuxDistro, MacOs, WindowsOs, FreeBSDOs]
diff --git a/lib/spack/spack/operating_systems/cray_backend.py b/lib/spack/spack/operating_systems/cray_backend.py
deleted file mode 100644
index 6657020dff..0000000000
--- a/lib/spack/spack/operating_systems/cray_backend.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 2013-2024 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
-
-import llnl.util.tty as tty
-
-import spack.error
-import spack.version
-from spack.util.module_cmd import module
-
-from .linux_distro import LinuxDistro
-
-#: Possible locations of the Cray CLE release file,
-#: which we look at to get the CNL OS version.
-_cle_release_file = "/etc/opt/cray/release/cle-release"
-_clerelease_file = "/etc/opt/cray/release/clerelease"
-
-
-def read_cle_release_file():
- """Read the CLE release file and return a dict with its attributes.
-
- This file is present on newer versions of Cray.
-
- The release file looks something like this::
-
- RELEASE=6.0.UP07
- BUILD=6.0.7424
- ...
-
- The dictionary we produce looks like this::
-
- {
- "RELEASE": "6.0.UP07",
- "BUILD": "6.0.7424",
- ...
- }
-
- Returns:
- dict: dictionary of release attributes
- """
- with open(_cle_release_file) as release_file:
- result = {}
- for line in release_file:
- # use partition instead of split() to ensure we only split on
- # the first '=' in the line.
- key, _, value = line.partition("=")
- result[key] = value.strip()
- return result
-
-
-def read_clerelease_file():
- """Read the CLE release file and return the Cray OS version.
-
- This file is present on older versions of Cray.
-
- The release file looks something like this::
-
- 5.2.UP04
-
- Returns:
- str: the Cray OS version
- """
- with open(_clerelease_file) as release_file:
- for line in release_file:
- return line.strip()
-
-
-class CrayBackend(LinuxDistro):
- """Compute Node Linux (CNL) is the operating system used for the Cray XC
- series super computers. It is a very stripped down version of GNU/Linux.
- Any compilers found through this operating system will be used with
- modules. If updated, user must make sure that version and name are
- updated to indicate that OS has been upgraded (or downgraded)
- """
-
- def __init__(self):
- name = "cnl"
- version = self._detect_crayos_version()
- if version:
- # If we found a CrayOS version, we do not want the information
- # from LinuxDistro. In order to skip the logic from
- # distro.linux_distribution, while still calling __init__
- # methods further up the MRO, we skip LinuxDistro in the MRO and
- # call the OperatingSystem superclass __init__ method
- super(LinuxDistro, self).__init__(name, version)
- else:
- super().__init__()
- self.modulecmd = module
-
- def __str__(self):
- return self.name + str(self.version)
-
- @classmethod
- def _detect_crayos_version(cls):
- if os.path.isfile(_cle_release_file):
- release_attrs = read_cle_release_file()
- if "RELEASE" not in release_attrs:
- # This Cray system uses a base OS not CLE/CNL
- return None
- v = spack.version.Version(release_attrs["RELEASE"])
- return v[0]
- elif os.path.isfile(_clerelease_file):
- v = read_clerelease_file()
- return spack.version.Version(v)[0]
- else:
- # Not all Cray systems run CNL on the backend.
- # Systems running in what Cray calls "cluster" mode run other
- # linux OSs under the Cray PE.
- # So if we don't detect any Cray OS version on the system,
- # we return None. We can't ever be sure we will get a Cray OS
- # version.
- # Returning None allows the calling code to test for the value
- # being "True-ish" rather than requiring a try/except block.
- return None
-
- def arguments_to_detect_version_fn(self, paths):
- import spack.compilers
-
- command_arguments = []
- for compiler_name in spack.compilers.supported_compilers():
- cmp_cls = spack.compilers.class_for_compiler_name(compiler_name)
-
- # If the compiler doesn't have a corresponding
- # Programming Environment, skip to the next
- if cmp_cls.PrgEnv is None:
- continue
-
- if cmp_cls.PrgEnv_compiler is None:
- tty.die("Must supply PrgEnv_compiler with PrgEnv")
-
- compiler_id = spack.compilers.CompilerID(self, compiler_name, None)
- detect_version_args = spack.compilers.DetectVersionArgs(
- id=compiler_id, variation=(None, None), language="cc", path="cc"
- )
- command_arguments.append(detect_version_args)
- return command_arguments
-
- def detect_version(self, detect_version_args):
- import spack.compilers
-
- modulecmd = self.modulecmd
- compiler_name = detect_version_args.id.compiler_name
- compiler_cls = spack.compilers.class_for_compiler_name(compiler_name)
- output = modulecmd("avail", compiler_cls.PrgEnv_compiler)
- version_regex = r"({0})/([\d\.]+[\d]-?[\w]*)".format(compiler_cls.PrgEnv_compiler)
- matches = re.findall(version_regex, output)
- version = tuple(version for _, version in matches if "classic" not in version)
- compiler_id = detect_version_args.id
- value = detect_version_args._replace(id=compiler_id._replace(version=version))
- return value, None
-
- def make_compilers(self, compiler_id, paths):
- import spack.spec
-
- name = compiler_id.compiler_name
- cmp_cls = spack.compilers.class_for_compiler_name(name)
- compilers = []
- for v in compiler_id.version:
- comp = cmp_cls(
- spack.spec.CompilerSpec(name + "@=" + v),
- self,
- "any",
- ["cc", "CC", "ftn"],
- [cmp_cls.PrgEnv, name + "/" + v],
- )
-
- compilers.append(comp)
- return compilers
diff --git a/lib/spack/spack/operating_systems/cray_frontend.py b/lib/spack/spack/operating_systems/cray_frontend.py
deleted file mode 100644
index d6fa4fd2fa..0000000000
--- a/lib/spack/spack/operating_systems/cray_frontend.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 2013-2024 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 contextlib
-import os
-import re
-
-import llnl.util.filesystem as fs
-import llnl.util.lang
-import llnl.util.tty as tty
-
-from spack.util.environment import get_path
-from spack.util.module_cmd import module
-
-from .linux_distro import LinuxDistro
-
-
-@contextlib.contextmanager
-def unload_programming_environment():
- """Context manager that unloads Cray Programming Environments."""
- env_bu = None
-
- # We rely on the fact that the PrgEnv-* modules set the PE_ENV
- # environment variable.
- if "PE_ENV" in os.environ:
- # Copy environment variables to restore them after the compiler
- # detection. We expect that the only thing PrgEnv-* modules do is
- # the environment variables modifications.
- env_bu = os.environ.copy()
-
- # Get the name of the module from the environment variable.
- prg_env = "PrgEnv-" + os.environ["PE_ENV"].lower()
-
- # Unload the PrgEnv-* module. By doing this we intentionally
- # provoke errors when the Cray's compiler wrappers are executed
- # (Error: A PrgEnv-* modulefile must be loaded.) so they will not
- # be detected as valid compilers by the overridden method. We also
- # expect that the modules that add the actual compilers' binaries
- # into the PATH environment variable (i.e. the following modules:
- # 'intel', 'cce', 'gcc', etc.) will also be unloaded since they are
- # specified as prerequisites in the PrgEnv-* modulefiles.
- module("unload", prg_env)
-
- yield
-
- # Restore the environment.
- if env_bu is not None:
- os.environ.clear()
- os.environ.update(env_bu)
-
-
-class CrayFrontend(LinuxDistro):
- """Represents OS that runs on login and service nodes of the Cray platform.
- It acts as a regular Linux without Cray-specific modules and compiler
- wrappers."""
-
- @property
- def compiler_search_paths(self):
- """Calls the default function but unloads Cray's programming
- environments first.
-
- This prevents from detecting Cray compiler wrappers and avoids
- possible false detections.
- """
- import spack.compilers
-
- with unload_programming_environment():
- search_paths = get_path("PATH")
-
- extract_path_re = re.compile(r"prepend-path[\s]*PATH[\s]*([/\w\.:-]*)")
-
- for compiler_cls in spack.compilers.all_compiler_types():
- # Check if the compiler class is supported on Cray
- prg_env = getattr(compiler_cls, "PrgEnv", None)
- compiler_module = getattr(compiler_cls, "PrgEnv_compiler", None)
- if not (prg_env and compiler_module):
- continue
-
- # It is supported, check which versions are available
- output = module("avail", compiler_cls.PrgEnv_compiler)
- version_regex = r"({0})/([\d\.]+[\d]-?[\w]*)".format(compiler_cls.PrgEnv_compiler)
- matches = re.findall(version_regex, output)
- versions = tuple(version for _, version in matches if "classic" not in version)
-
- # Now inspect the modules and add to paths
- msg = "[CRAY FE] Detected FE compiler [name={0}, versions={1}]"
- tty.debug(msg.format(compiler_module, versions))
- for v in versions:
- try:
- current_module = compiler_module + "/" + v
- out = module("show", current_module)
- match = extract_path_re.search(out)
- search_paths += match.group(1).split(":")
- except Exception as e:
- msg = (
- "[CRAY FE] An unexpected error occurred while "
- "detecting FE compiler [compiler={0}, "
- " version={1}, error={2}]"
- )
- tty.debug(msg.format(compiler_cls.name, v, str(e)))
-
- search_paths = list(llnl.util.lang.dedupe(search_paths))
- return fs.search_paths_for_executables(*search_paths)
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py
index 799f183d11..7b41ee7a13 100644
--- a/lib/spack/spack/operating_systems/mac_os.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -143,6 +143,7 @@ class MacOs(OperatingSystem):
"12": "monterey",
"13": "ventura",
"14": "sonoma",
+ "15": "sequoia",
}
version = macos_version()
diff --git a/lib/spack/spack/operating_systems/windows_os.py b/lib/spack/spack/operating_systems/windows_os.py
index 073a654eed..3d3d44175f 100755
--- a/lib/spack/spack/operating_systems/windows_os.py
+++ b/lib/spack/spack/operating_systems/windows_os.py
@@ -9,6 +9,8 @@ import pathlib
import platform
import subprocess
+from llnl.util import tty
+
from spack.error import SpackError
from spack.util import windows_registry as winreg
from spack.version import Version
@@ -72,22 +74,68 @@ class WindowsOs(OperatingSystem):
return [os.path.join(path, "VC", "Tools", "MSVC") for path in self.vs_install_paths]
@property
+ def oneapi_root(self):
+ root = os.environ.get("ONEAPI_ROOT", "") or os.path.join(
+ os.environ.get("ProgramFiles(x86)", ""), "Intel", "oneAPI"
+ )
+ if os.path.exists(root):
+ return root
+
+ @property
def compiler_search_paths(self):
# First Strategy: Find MSVC directories using vswhere
_compiler_search_paths = []
for p in self.msvc_paths:
_compiler_search_paths.extend(glob.glob(os.path.join(p, "*", "bin", "Hostx64", "x64")))
- if os.getenv("ONEAPI_ROOT"):
+ oneapi_root = self.oneapi_root
+ if oneapi_root:
_compiler_search_paths.extend(
- glob.glob(
- os.path.join(str(os.getenv("ONEAPI_ROOT")), "compiler", "*", "windows", "bin")
- )
+ glob.glob(os.path.join(oneapi_root, "compiler", "**", "bin"), recursive=True)
)
+
# Second strategy: Find MSVC via the registry
- msft = winreg.WindowsRegistryView(
- "SOFTWARE\\WOW6432Node\\Microsoft", winreg.HKEY.HKEY_LOCAL_MACHINE
- )
- vs_entries = msft.find_subkeys(r"VisualStudio_.*")
+ def try_query_registry(retry=False):
+ winreg_report_error = lambda e: tty.debug(
+ 'Windows registry query on "SOFTWARE\\WOW6432Node\\Microsoft"'
+ f"under HKEY_LOCAL_MACHINE: {str(e)}"
+ )
+ try:
+ # Registry interactions are subject to race conditions, etc and can generally
+ # be flakey, do this in a catch block to prevent reg issues from interfering
+ # with compiler detection
+ msft = winreg.WindowsRegistryView(
+ "SOFTWARE\\WOW6432Node\\Microsoft", winreg.HKEY.HKEY_LOCAL_MACHINE
+ )
+ return msft.find_subkeys(r"VisualStudio_.*", recursive=False)
+ except OSError as e:
+ # OSErrors propagated into caller by Spack's registry module are expected
+ # and indicate a known issue with the registry query
+ # i.e. user does not have permissions or the key/value
+ # doesn't exist
+ winreg_report_error(e)
+ return []
+ except winreg.InvalidRegistryOperation as e:
+ # Other errors raised by the Spack's reg module indicate
+ # an unexpected error type, and are handled specifically
+ # as the underlying cause is difficult/impossible to determine
+ # without manually exploring the registry
+ # These errors can also be spurious (race conditions)
+ # and may resolve on re-execution of the query
+ # or are permanent (specific types of permission issues)
+ # but the registry raises the same exception for all types of
+ # atypical errors
+ if retry:
+ winreg_report_error(e)
+ return []
+
+ vs_entries = try_query_registry()
+ if not vs_entries:
+ # Occasional spurious race conditions can arise when reading the MS reg
+ # typically these race conditions resolve immediately and we can safely
+ # retry the reg query without waiting
+ # Note: Winreg does not support locking
+ vs_entries = try_query_registry(retry=True)
+
vs_paths = []
def clean_vs_path(path):
@@ -99,11 +147,8 @@ class WindowsOs(OperatingSystem):
val = entry.get_subkey("Capabilities").get_value("ApplicationDescription").value
vs_paths.append(clean_vs_path(val))
except FileNotFoundError as e:
- if hasattr(e, "winerror"):
- if e.winerror == 2:
- pass
- else:
- raise
+ if hasattr(e, "winerror") and e.winerror == 2:
+ pass
else:
raise
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index ac56cf1e1a..525721ebb3 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -11,6 +11,8 @@ Everything in this module is automatically imported into Spack package files.
from os import chdir, environ, getcwd, makedirs, mkdir, remove, removedirs
from shutil import move, rmtree
+from spack.error import InstallError, NoHeadersError, NoLibrariesError
+
# Emulate some shell commands for convenience
env = environ
cd = chdir
@@ -39,6 +41,7 @@ from spack.build_systems.cached_cmake import (
)
from spack.build_systems.cargo import CargoPackage
from spack.build_systems.cmake import CMakePackage, generator
+from spack.build_systems.compiler import CompilerPackage
from spack.build_systems.cuda import CudaPackage
from spack.build_systems.generic import Package
from spack.build_systems.gnu import GNUMirrorPackage
@@ -71,7 +74,8 @@ from spack.build_systems.sourceforge import SourceforgePackage
from spack.build_systems.sourceware import SourcewarePackage
from spack.build_systems.waf import WafPackage
from spack.build_systems.xorg import XorgPackage
-from spack.builder import run_after, run_before
+from spack.builder import BaseBuilder
+from spack.config import determine_number_of_jobs
from spack.deptypes import ALL_TYPES as all_deptypes
from spack.directives import *
from spack.install_test import (
@@ -83,12 +87,7 @@ from spack.install_test import (
install_test_root,
test_part,
)
-from spack.installer import (
- ExternalPackageError,
- InstallError,
- InstallLockError,
- UpstreamPackageError,
-)
+from spack.installer import ExternalPackageError, InstallLockError, UpstreamPackageError
from spack.mixins import filter_compiler_wrappers
from spack.multimethod import default_args, when
from spack.package_base import (
@@ -100,15 +99,12 @@ from spack.package_base import (
install_dependency_symlinks,
on_package_attributes,
)
+from spack.package_completions import *
+from spack.phase_callbacks import run_after, run_before
from spack.spec import InvalidSpecDetected, Spec
-from spack.util.cpus import determine_number_of_jobs
from spack.util.executable import *
-from spack.variant import (
- any_combination_of,
- auto_or_any_combination_of,
- conditional,
- disjoint_sets,
-)
+from spack.util.filesystem import file_command, fix_darwin_install_name, mime_type
+from spack.variant import any_combination_of, auto_or_any_combination_of, disjoint_sets
from spack.version import Version, ver
# These are just here for editor support; they will be replaced when the build env
diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py
index e5016f54f3..1bc67005f1 100644
--- a/lib/spack/spack/package_base.py
+++ b/lib/spack/spack/package_base.py
@@ -15,17 +15,17 @@ import copy
import functools
import glob
import hashlib
-import inspect
+import importlib
import io
import os
import re
-import shutil
import sys
import textwrap
import time
import traceback
+import typing
import warnings
-from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, TypeVar, Union
import llnl.util.filesystem as fsys
import llnl.util.tty as tty
@@ -34,18 +34,17 @@ from llnl.util.link_tree import LinkTree
import spack.compilers
import spack.config
+import spack.dependency
import spack.deptypes as dt
-import spack.directives
-import spack.directory_layout
-import spack.environment
+import spack.directives_meta
import spack.error
import spack.fetch_strategy as fs
import spack.hooks
-import spack.mirror
-import spack.mixins
+import spack.mirrors.layout
+import spack.mirrors.mirror
import spack.multimethod
import spack.patch
-import spack.paths
+import spack.phase_callbacks
import spack.repo
import spack.spec
import spack.store
@@ -53,20 +52,14 @@ import spack.url
import spack.util.environment
import spack.util.path
import spack.util.web
+import spack.variant
+from spack.error import InstallError, NoURLError, PackageError
from spack.filesystem_view import YamlFilesystemView
-from spack.install_test import (
- PackageTest,
- TestFailure,
- TestStatus,
- TestSuite,
- cache_extra_test_sources,
- install_test_root,
-)
-from spack.installer import InstallError, PackageInstaller
-from spack.stage import DIYStage, ResourceStage, Stage, StageComposite, compute_stage_name
-from spack.util.executable import ProcessError, which
+from spack.resource import Resource
+from spack.solver.version_order import concretization_version_order
+from spack.stage import DevelopStage, ResourceStage, Stage, StageComposite, compute_stage_name
from spack.util.package_hash import package_hash
-from spack.version import GitVersion, StandardVersion, Version
+from spack.version import GitVersion, StandardVersion
FLAG_HANDLER_RETURN_TYPE = Tuple[
Optional[Iterable[str]], Optional[Iterable[str]], Optional[Iterable[str]]
@@ -93,35 +86,30 @@ _spack_configure_argsfile = "spack-configure-args.txt"
spack_times_log = "install_times.json"
-def deprecated_version(pkg, version):
- """Return True if the version is deprecated, False otherwise.
+def deprecated_version(pkg: "PackageBase", version: Union[str, StandardVersion]) -> bool:
+ """Return True iff the version is deprecated.
Arguments:
- pkg (PackageBase): The package whose version is to be checked.
- version (str or spack.version.StandardVersion): The version being checked
+ pkg: The package whose version is to be checked.
+ version: The version being checked
"""
if not isinstance(version, StandardVersion):
- version = Version(version)
+ version = StandardVersion.from_string(version)
- for k, v in pkg.versions.items():
- if version == k and v.get("deprecated", False):
- return True
+ details = pkg.versions.get(version)
+ return details is not None and details.get("deprecated", False)
- return False
-
-def preferred_version(pkg):
+def preferred_version(pkg: "PackageBase"):
"""
Returns a sorted list of the preferred versions of the package.
Arguments:
- pkg (PackageBase): The package whose versions are to be assessed.
+ pkg: The package whose versions are to be assessed.
"""
- # Here we sort first on the fact that a version is marked
- # as preferred in the package, then on the fact that the
- # version is not develop, then lexicographically
- key_fn = lambda v: (pkg.versions[v].get("preferred", False), not v.isdevelop(), v)
- return max(pkg.versions, key=key_fn)
+
+ version, _ = max(pkg.versions.items(), key=concretization_version_order)
+ return version
class WindowsRPath:
@@ -163,7 +151,11 @@ class WindowsRPath:
Performs symlinking to incorporate rpath dependencies to Windows runtime search paths
"""
- if sys.platform == "win32":
+ # If spec is an external, we should not be modifying its bin directory, as we would
+ # be doing in this method
+ # Spack should in general not modify things it has not installed
+ # we can reasonably expect externals to have their link interface properly established
+ if sys.platform == "win32" and not self.spec.external:
self.win_rpath.add_library_dependent(*self.win_add_library_dependent())
self.win_rpath.add_rpath(*self.win_add_rpath())
self.win_rpath.establish_link()
@@ -194,13 +186,12 @@ class DetectablePackageMeta(type):
# that "foo" was a possible executable.
# If a package has the executables or libraries attribute then it's
- # assumed to be detectable
+ # assumed to be detectable. Add a tag, so finding them is faster
if hasattr(cls, "executables") or hasattr(cls, "libraries"):
- # Append a tag to each detectable package, so that finding them is faster
- if hasattr(cls, "tags"):
- getattr(cls, "tags").append(DetectablePackageMeta.TAG)
- else:
- setattr(cls, "tags", [DetectablePackageMeta.TAG])
+ # To add the tag, we need to copy the tags attribute, and attach it to
+ # the current class. We don't use append, since it might modify base classes,
+ # if "tags" is retrieved following the MRO.
+ cls.tags = getattr(cls, "tags", []) + [DetectablePackageMeta.TAG]
@classmethod
def platform_executables(cls):
@@ -243,10 +234,7 @@ class DetectablePackageMeta(type):
if version_str:
objs_by_version[version_str].append(obj)
except Exception as e:
- msg = (
- "An error occurred when trying to detect " 'the version of "{0}" [{1}]'
- )
- tty.debug(msg.format(obj, str(e)))
+ tty.debug(f"Cannot detect the version of '{obj}' [{str(e)}]")
specs = []
for version_str, objs in objs_by_version.items():
@@ -259,27 +247,23 @@ class DetectablePackageMeta(type):
if isinstance(variant, str):
variant = (variant, {})
variant_str, extra_attributes = variant
- spec_str = "{0}@{1} {2}".format(cls.name, version_str, variant_str)
+ spec_str = f"{cls.name}@{version_str} {variant_str}"
# Pop a few reserved keys from extra attributes, since
# they have a different semantics
external_path = extra_attributes.pop("prefix", None)
external_modules = extra_attributes.pop("modules", None)
try:
- spec = spack.spec.Spec(
+ spec = spack.spec.Spec.from_detection(
spec_str,
external_path=external_path,
external_modules=external_modules,
+ extra_attributes=extra_attributes,
)
except Exception as e:
- msg = 'Parsing failed [spec_str="{0}", error={1}]'
- tty.debug(msg.format(spec_str, str(e)))
+ tty.debug(f'Parsing failed [spec_str="{spec_str}", error={str(e)}]')
else:
- specs.append(
- spack.spec.Spec.from_detection(
- spec, extra_attributes=extra_attributes
- )
- )
+ specs.append(spec)
return sorted(specs)
@@ -317,9 +301,9 @@ class DetectablePackageMeta(type):
class PackageMeta(
- spack.builder.PhaseCallbacksMeta,
+ spack.phase_callbacks.PhaseCallbacksMeta,
DetectablePackageMeta,
- spack.directives.DirectiveMeta,
+ spack.directives_meta.DirectiveMeta,
spack.multimethod.MultiMethodMeta,
):
"""
@@ -432,6 +416,90 @@ class PackageViewMixin:
Pb = TypeVar("Pb", bound="PackageBase")
+WhenDict = Dict[spack.spec.Spec, Dict[str, Any]]
+NameValuesDict = Dict[str, List[Any]]
+NameWhenDict = Dict[str, Dict[spack.spec.Spec, List[Any]]]
+
+
+def _by_name(
+ when_indexed_dictionary: WhenDict, when: bool = False
+) -> Union[NameValuesDict, NameWhenDict]:
+ """Convert a dict of dicts keyed by when/name into a dict of lists keyed by name.
+
+ Optional Arguments:
+ when: if ``True``, don't discared the ``when`` specs; return a 2-level dictionary
+ keyed by name and when spec.
+ """
+ # very hard to define this type to be conditional on `when`
+ all_by_name: Dict[str, Any] = {}
+
+ for when_spec, by_name in when_indexed_dictionary.items():
+ for name, value in by_name.items():
+ if when:
+ when_dict = all_by_name.setdefault(name, {})
+ when_dict.setdefault(when_spec, []).append(value)
+ else:
+ all_by_name.setdefault(name, []).append(value)
+
+ # this needs to preserve the insertion order of whens
+ return dict(sorted(all_by_name.items()))
+
+
+def _names(when_indexed_dictionary: WhenDict) -> List[str]:
+ """Get sorted names from dicts keyed by when/name."""
+ all_names = set()
+ for when, by_name in when_indexed_dictionary.items():
+ for name in by_name:
+ all_names.add(name)
+
+ return sorted(all_names)
+
+
+WhenVariantList = List[Tuple[spack.spec.Spec, spack.variant.Variant]]
+
+
+def _remove_overridden_vdefs(variant_defs: WhenVariantList) -> None:
+ """Remove variant defs from the list if their when specs are satisfied by later ones.
+
+ Any such variant definitions are *always* overridden by their successor, as it will
+ match everything the predecessor matches, and the solver will prefer it because of
+ its higher precedence.
+
+ We can just remove these defs from variant definitions and avoid putting them in the
+ solver. This is also useful for, e.g., `spack info`, where we don't want to show a
+ variant from a superclass if it is always overridden by a variant defined in a
+ subclass.
+
+ Example::
+
+ class ROCmPackage:
+ variant("amdgpu_target", ..., when="+rocm")
+
+ class Hipblas:
+ variant("amdgpu_target", ...)
+
+ The subclass definition *always* overrides the superclass definition here, but they
+ have different when specs and the subclass def won't just replace the one in the
+ superclass. In this situation, the subclass should *probably* also have
+ ``when="+rocm"``, but we can't guarantee that will always happen when a vdef is
+ overridden. So we use this method to remove any overrides we can know statically.
+
+ """
+ i = 0
+ while i < len(variant_defs):
+ when, vdef = variant_defs[i]
+ if any(when.satisfies(successor) for successor, _ in variant_defs[i + 1 :]):
+ del variant_defs[i]
+ else:
+ i += 1
+
+
+#: Store whether a given Spec source/binary should not be redistributed.
+class DisableRedistribute:
+ def __init__(self, source, binary):
+ self.source = source
+ self.binary = binary
+
class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""This is the superclass for all spack packages.
@@ -451,19 +519,16 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
There are two main parts of a Spack package:
- 1. **The package class**. Classes contain ``directives``, which are
- special functions, that add metadata (versions, patches,
- dependencies, and other information) to packages (see
- ``directives.py``). Directives provide the constraints that are
- used as input to the concretizer.
+ 1. **The package class**. Classes contain ``directives``, which are special functions, that
+ add metadata (versions, patches, dependencies, and other information) to packages (see
+ ``directives.py``). Directives provide the constraints that are used as input to the
+ concretizer.
- 2. **Package instances**. Once instantiated, a package is
- essentially a software installer. Spack calls methods like
- ``do_install()`` on the ``Package`` object, and it uses those to
- drive user-implemented methods like ``patch()``, ``install()``, and
- other build steps. To install software, an instantiated package
- needs a *concrete* spec, which guides the behavior of the various
- install methods.
+ 2. **Package instances**. Once instantiated, a package can be passed to the PackageInstaller.
+ It calls methods like ``do_stage()`` on the ``Package`` object, and it uses those to drive
+ user-implemented methods like ``patch()``, ``install()``, and other build steps. To
+ install software, an instantiated package needs a *concrete* spec, which guides the
+ behavior of the various install methods.
Packages are imported from repos (see ``repo.py``).
@@ -485,7 +550,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
p.do_fetch() # downloads tarball from a URL (or VCS)
p.do_stage() # expands tarball in a temp directory
p.do_patch() # applies patches to expanded source
- p.do_install() # calls package's install() function
p.do_uninstall() # removes install directory
although packages that do not have code have nothing to fetch so omit
@@ -523,9 +587,22 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# Declare versions dictionary as placeholder for values.
# This allows analysis tools to correctly interpret the class attributes.
versions: dict
+ resources: Dict[spack.spec.Spec, List[Resource]]
+ dependencies: Dict[spack.spec.Spec, Dict[str, spack.dependency.Dependency]]
+ conflicts: Dict[spack.spec.Spec, List[Tuple[spack.spec.Spec, Optional[str]]]]
+ requirements: Dict[
+ spack.spec.Spec, List[Tuple[Tuple[spack.spec.Spec, ...], str, Optional[str]]]
+ ]
+ provided: Dict[spack.spec.Spec, Set[spack.spec.Spec]]
+ provided_together: Dict[spack.spec.Spec, List[Set[str]]]
+ patches: Dict[spack.spec.Spec, List[spack.patch.Patch]]
+ variants: Dict[spack.spec.Spec, Dict[str, spack.variant.Variant]]
+ languages: Dict[spack.spec.Spec, Set[str]]
+ licenses: Dict[spack.spec.Spec, str]
+ splice_specs: Dict[spack.spec.Spec, Tuple[spack.spec.Spec, Union[None, str, List[str]]]]
- # Same for dependencies
- dependencies: dict
+ #: Store whether a given Spec source/binary should not be redistributed.
+ disable_redistribute: Dict[spack.spec.Spec, DisableRedistribute]
#: By default, packages are not virtual
#: Virtual packages override this attribute
@@ -541,10 +618,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
#: By default do not run tests within package's install()
run_tests = False
- #: Keep -Werror flags, matches config:flags:keep_werror to override config
- # NOTE: should be type Optional[Literal['all', 'specific', 'none']] in 3.8+
- keep_werror: Optional[str] = None
-
#: Most packages are NOT extendable. Set to True if you want extensions.
extendable = False
@@ -644,11 +717,11 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
test_requires_compiler: bool = False
#: TestSuite instance used to manage stand-alone tests for 1+ specs.
- test_suite: Optional["TestSuite"] = None
+ test_suite: Optional[Any] = None
def __init__(self, spec):
# this determines how the package should be built.
- self.spec: "spack.spec.Spec" = spec
+ self.spec: spack.spec.Spec = spec
# Allow custom staging paths for packages
self.path = None
@@ -664,31 +737,98 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
raise ValueError(msg.format(self))
# init internal variables
- self._stage = None
+ self._stage: Optional[StageComposite] = None
self._fetcher = None
- self._tester: Optional["PackageTest"] = None
+ self._tester: Optional[Any] = None
# Set up timing variables
self._fetch_time = 0.0
self.win_rpath = fsys.WindowsSimulatedRPath(self)
+ super().__init__()
- if self.is_extension:
- pkg_cls = spack.repo.PATH.get_pkg_class(self.extendee_spec.name)
- pkg_cls(self.extendee_spec)._check_extendable()
+ @classmethod
+ def dependency_names(cls):
+ return _names(cls.dependencies)
- super().__init__()
+ @classmethod
+ def dependencies_by_name(cls, when: bool = False):
+ return _by_name(cls.dependencies, when=when)
+
+ # Accessors for variants
+ # External code workingw with Variants should go through the methods below
+
+ @classmethod
+ def variant_names(cls) -> List[str]:
+ return _names(cls.variants)
+
+ @classmethod
+ def has_variant(cls, name) -> bool:
+ return any(name in dictionary for dictionary in cls.variants.values())
+
+ @classmethod
+ def num_variant_definitions(cls) -> int:
+ """Total number of variant definitions in this class so far."""
+ return sum(len(variants_by_name) for variants_by_name in cls.variants.values())
+
+ @classmethod
+ def variant_definitions(cls, name: str) -> WhenVariantList:
+ """Iterator over (when_spec, Variant) for all variant definitions for a particular name."""
+ # construct a list of defs sorted by precedence
+ defs: WhenVariantList = []
+ for when, variants_by_name in cls.variants.items():
+ variant_def = variants_by_name.get(name)
+ if variant_def:
+ defs.append((when, variant_def))
+
+ # With multiple definitions, ensure precedence order and simplify overrides
+ if len(defs) > 1:
+ defs.sort(key=lambda v: v[1].precedence)
+ _remove_overridden_vdefs(defs)
+
+ return defs
+
+ @classmethod
+ def variant_items(cls) -> Iterable[Tuple[spack.spec.Spec, Dict[str, spack.variant.Variant]]]:
+ """Iterate over ``cls.variants.items()`` with overridden definitions removed."""
+ # Note: This is quadratic in the average number of variant definitions per name.
+ # That is likely close to linear in practice, as there are few variants with
+ # multiple definitions (but it matters when they are there).
+ exclude = {
+ name: [id(vdef) for _, vdef in cls.variant_definitions(name)]
+ for name in cls.variant_names()
+ }
+
+ for when, variants_by_name in cls.variants.items():
+ filtered_variants_by_name = {
+ name: vdef for name, vdef in variants_by_name.items() if id(vdef) in exclude[name]
+ }
+
+ if filtered_variants_by_name:
+ yield when, filtered_variants_by_name
+
+ def get_variant(self, name: str) -> spack.variant.Variant:
+ """Get the highest precedence variant definition matching this package's spec.
+
+ Arguments:
+ name: name of the variant definition to get
+ """
+ try:
+ highest_to_lowest = reversed(self.variant_definitions(name))
+ return next(vdef for when, vdef in highest_to_lowest if self.spec.satisfies(when))
+ except StopIteration:
+ raise ValueError(f"No variant '{name}' on spec: {self.spec}")
@classmethod
def possible_dependencies(
cls,
- transitive=True,
- expand_virtuals=True,
+ transitive: bool = True,
+ expand_virtuals: bool = True,
depflag: dt.DepFlag = dt.ALL,
- visited=None,
- missing=None,
- virtuals=None,
- ):
+ visited: Optional[dict] = None,
+ missing: Optional[dict] = None,
+ virtuals: Optional[set] = None,
+ ) -> Dict[str, Set[str]]:
"""Return dict of possible dependencies of this package.
Args:
@@ -727,11 +867,12 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
visited.setdefault(cls.name, set())
- for name, conditions in cls.dependencies.items():
+ for name, conditions in cls.dependencies_by_name(when=True).items():
# check whether this dependency could be of the type asked for
depflag_union = 0
- for dep in conditions.values():
- depflag_union |= dep.depflag
+ for deplist in conditions.values():
+ for dep in deplist:
+ depflag_union |= dep.depflag
if not (depflag & depflag_union):
continue
@@ -788,7 +929,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
We use this to add variables to package modules. This makes
install() methods easier to write (e.g., can call configure())
"""
- return __import__(cls.__module__, fromlist=[cls.__name__])
+ return importlib.import_module(cls.__module__)
@classproperty
def namespace(cls):
@@ -804,7 +945,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
def fullnames(cls):
"""Fullnames for this package and any packages from which it inherits."""
fullnames = []
- for cls in inspect.getmro(cls):
+ for cls in cls.__mro__:
namespace = getattr(cls, "namespace", None)
if namespace:
fullnames.append("%s.%s" % (namespace, cls.name))
@@ -841,6 +982,52 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
self.global_license_dir, self.name, os.path.basename(self.license_files[0])
)
+ # Source redistribution must be determined before concretization (because source mirrors work
+ # with abstract specs).
+ @classmethod
+ def redistribute_source(cls, spec):
+ """Whether it should be possible to add the source of this
+ package to a Spack mirror."""
+ for when_spec, disable_redistribute in cls.disable_redistribute.items():
+ if disable_redistribute.source and spec.satisfies(when_spec):
+ return False
+ return True
+
+ @property
+ def redistribute_binary(self):
+ """Whether it should be possible to create a binary out of an installed instance of this
+ package."""
+ for when_spec, disable_redistribute in self.disable_redistribute.items():
+ if disable_redistribute.binary and self.spec.satisfies(when_spec):
+ return False
+ return True
+
+ # NOTE: return type should be Optional[Literal['all', 'specific', 'none']] in
+ # Python 3.8+, but we still support 3.6.
+ @property
+ def keep_werror(self) -> Optional[str]:
+ """Keep ``-Werror`` flags, matches ``config:flags:keep_werror`` to override config.
+
+ Valid return values are:
+ * ``"all"``: keep all ``-Werror`` flags.
+ * ``"specific"``: keep only ``-Werror=specific-warning`` flags.
+ * ``"none"``: filter out all ``-Werror*`` flags.
+ * ``None``: respect the user's configuration (``"none"`` by default).
+ """
+ if self.spec.satisfies("%nvhpc@:23.3"):
+ # Filtering works by replacing -Werror with -Wno-error, but older nvhpc and
+ # PGI do not understand -Wno-error, so we disable filtering.
+ return "all"
+
+ elif self.spec.satisfies("%nvhpc@23.4:"):
+ # newer nvhpc supports -Wno-error but can't disable specific warnings with
+ # -Wno-error=warning. Skip -Werror=warning, but still filter -Werror.
+ return "specific"
+
+ else:
+ # use -Werror disablement by default for other compilers
+ return None
+
@property
def version(self):
if not self.spec.versions.concrete:
@@ -851,22 +1038,16 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
@classmethod
@memoized
- def version_urls(cls):
- """OrderedDict of explicitly defined URLs for versions of this package.
+ def version_urls(cls) -> Dict[StandardVersion, str]:
+ """Dict of explicitly defined URLs for versions of this package.
Return:
- An OrderedDict (version -> URL) different versions of this
- package, sorted by version.
+ An dict mapping version to url, ordered by version.
- A version's URL only appears in the result if it has an an
- explicitly defined ``url`` argument. So, this list may be empty
- if a package only defines ``url`` at the top level.
+ A version's URL only appears in the result if it has an an explicitly defined ``url``
+ argument. So, this list may be empty if a package only defines ``url`` at the top level.
"""
- version_urls = collections.OrderedDict()
- for v, args in sorted(cls.versions.items()):
- if "url" in args:
- version_urls[v] = args["url"]
- return version_urls
+ return {v: args["url"] for v, args in sorted(cls.versions.items()) if "url" in args}
def nearest_url(self, version):
"""Finds the URL with the "closest" version to ``version``.
@@ -909,36 +1090,48 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
pass
- def all_urls_for_version(self, version):
+ def detect_dev_src_change(self):
+ """
+ Method for checking for source code changes to trigger rebuild/reinstall
+ """
+ dev_path_var = self.spec.variants.get("dev_path", None)
+ _, record = spack.store.STORE.db.query_by_spec_hash(self.spec.dag_hash())
+ mtime = fsys.last_modification_time_recursive(dev_path_var.value)
+ return mtime > record.installation_time
+
+ def all_urls_for_version(self, version: StandardVersion) -> List[str]:
"""Return all URLs derived from version_urls(), url, urls, and
list_url (if it contains a version) in a package in that order.
Args:
- version (spack.version.Version): the version for which a URL is sought
+ version: the version for which a URL is sought
"""
uf = None
if type(self).url_for_version != PackageBase.url_for_version:
uf = self.url_for_version
return self._implement_all_urls_for_version(version, uf)
- def _implement_all_urls_for_version(self, version, custom_url_for_version=None):
- if not isinstance(version, StandardVersion):
- version = Version(version)
+ def _implement_all_urls_for_version(
+ self,
+ version: Union[str, StandardVersion],
+ custom_url_for_version: Optional[Callable[[StandardVersion], Optional[str]]] = None,
+ ) -> List[str]:
+ version = StandardVersion.from_string(version) if isinstance(version, str) else version
- urls = []
+ urls: List[str] = []
# If we have a specific URL for this version, don't extrapolate.
- version_urls = self.version_urls()
- if version in version_urls:
- urls.append(version_urls[version])
+ url = self.version_urls().get(version)
+ if url:
+ urls.append(url)
# if there is a custom url_for_version, use it
if custom_url_for_version is not None:
u = custom_url_for_version(version)
- if u not in urls and u is not None:
+ if u is not None and u not in urls:
urls.append(u)
- def sub_and_add(u):
+ def sub_and_add(u: Optional[str]) -> None:
if u is None:
return
# skip the url if there is no version to replace
@@ -946,9 +1139,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
spack.url.parse_version(u)
except spack.url.UndetectableVersionError:
return
- nu = spack.url.substitute_version(u, self.url_version(version))
-
- urls.append(nu)
+ urls.append(spack.url.substitute_version(u, self.url_version(version)))
# If no specific URL, use the default, class-level URL
sub_and_add(getattr(self, "url", None))
@@ -997,9 +1188,10 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
root=root_stage,
resource=resource,
name=self._resource_stage(resource),
- mirror_paths=spack.mirror.mirror_archive_paths(
+ mirror_paths=spack.mirrors.layout.default_mirror_layout(
resource.fetcher, os.path.join(self.name, pretty_resource_name)
),
+ mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(),
path=self.path,
)
@@ -1011,7 +1203,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# Construct a mirror path (TODO: get this out of package.py)
format_string = "{name}-{version}"
pretty_name = self.spec.format_path(format_string)
- mirror_paths = spack.mirror.mirror_archive_paths(
+ mirror_paths = spack.mirrors.layout.default_mirror_layout(
fetcher, os.path.join(self.name, pretty_name), self.spec
)
# Construct a path where the stage should build..
@@ -1020,6 +1212,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
stage = Stage(
fetcher,
mirror_paths=mirror_paths,
+ mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(),
name=stage_name,
path=self.path,
search_fn=self._download_search,
@@ -1030,10 +1223,14 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# If it's a dev package (not transitively), use a DIY stage object
dev_path_var = self.spec.variants.get("dev_path", None)
if dev_path_var:
- return DIYStage(dev_path_var.value)
-
- # To fetch the current version
- source_stage = self._make_root_stage(self.fetcher)
+ dev_path = dev_path_var.value
+ link_format = spack.config.get("config:develop_stage_link")
+ if not link_format:
+ link_format = "build-{arch}-{hash:7}"
+ stage_link = self.spec.format_path(link_format)
+ source_stage = DevelopStage(compute_stage_name(self.spec), dev_path, stage_link)
+ else:
+ source_stage = self._make_root_stage(self.fetcher)
# all_stages is source + resources + patches
all_stages = StageComposite()
@@ -1072,20 +1269,14 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
return self._stage
@stage.setter
- def stage(self, stage):
+ def stage(self, stage: StageComposite):
"""Allow a stage object to be set to override the default."""
self._stage = stage
@property
def env_path(self):
"""Return the build environment file path associated with staging."""
- # Backward compatibility: Return the name of an existing log path;
- # otherwise, return the current install env path name.
- old_filename = os.path.join(self.stage.path, "spack-build.env")
- if os.path.exists(old_filename):
- return old_filename
- else:
- return os.path.join(self.stage.path, _spack_build_envfile)
+ return os.path.join(self.stage.path, _spack_build_envfile)
@property
def env_mods_path(self):
@@ -1116,13 +1307,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
@property
def log_path(self):
"""Return the build log file path associated with staging."""
- # Backward compatibility: Return the name of an existing log path.
- for filename in ["spack-build.out", "spack-build.txt"]:
- old_log = os.path.join(self.stage.path, filename)
- if os.path.exists(old_log):
- return old_log
-
- # Otherwise, return the current log path name.
return os.path.join(self.stage.path, _spack_build_logfile)
@property
@@ -1135,15 +1319,15 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
@property
def install_log_path(self):
- """Return the build log file path on successful installation."""
+ """Return the (compressed) build log file path on successful installation"""
# Backward compatibility: Return the name of an existing install log.
- for filename in ["build.out", "build.txt"]:
+ for filename in [_spack_build_logfile, "build.out", "build.txt"]:
old_log = os.path.join(self.metadata_dir, filename)
if os.path.exists(old_log):
return old_log
# Otherwise, return the current install log path name.
- return os.path.join(self.metadata_dir, _spack_build_logfile)
+ return os.path.join(self.metadata_dir, _spack_build_logfile + ".gz")
@property
def configure_args_path(self):
@@ -1160,18 +1344,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""Return the configure args file path on successful installation."""
return os.path.join(self.metadata_dir, _spack_configure_argsfile)
- # TODO (post-34236): Update tests and all packages that use this as a
- # TODO (post-34236): package method to the function already available
- # TODO (post-34236): to packages. Once done, remove this property.
- @property
- def install_test_root(self):
- """Return the install test root directory."""
- tty.warn(
- "The 'pkg.install_test_root' property is deprecated with removal "
- "expected v0.22. Use 'install_test_root(pkg)' instead."
- )
- return install_test_root(self)
-
def archive_install_test_log(self):
"""Archive the install-phase test log, if present."""
if getattr(self, "tester", None):
@@ -1179,11 +1351,13 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
@property
def tester(self):
+ import spack.install_test
+
if not self.spec.versions.concrete:
raise ValueError("Cannot retrieve tester for package without concrete version.")
if not self._tester:
- self._tester = PackageTest(self)
+ self._tester = spack.install_test.PackageTest(self)
return self._tester
@property
@@ -1219,7 +1393,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
@classmethod
def dependencies_of_type(cls, deptypes: dt.DepFlag):
- """Get dependencies that can possibly have these deptypes.
+ """Get names of dependencies that can possibly have these deptypes.
This analyzes the package and determines which dependencies *can*
be a certain kind of dependency. Note that they may not *always*
@@ -1227,11 +1401,11 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
so something may be a build dependency in one configuration and a
run dependency in another.
"""
- return dict(
- (name, conds)
- for name, conds in cls.dependencies.items()
- if any(deptypes & cls.dependencies[name][cond].depflag for cond in conds)
- )
+ return {
+ name
+ for name, dependencies in cls.dependencies_by_name().items()
+ if any(deptypes & dep.depflag for dep in dependencies)
+ }
# TODO: allow more than one active extendee.
@property
@@ -1260,22 +1434,10 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
else:
# If it's not concrete, then return the spec from the
# extends() directive since that is all we know so far.
- spec_str, kwargs = next(iter(self.extendees.items()))
+ spec_str = next(iter(self.extendees))
return spack.spec.Spec(spec_str)
@property
- def extendee_args(self):
- """
- Spec of the extendee of this package, or None if it is not an extension
- """
- if not self.extendees:
- return None
-
- # TODO: allow multiple extendees.
- name = next(iter(self.extendees))
- return self.extendees[name][1]
-
- @property
def is_extension(self):
# if it is concrete, it's only an extension if it actually
# dependes on the extendee.
@@ -1305,9 +1467,9 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
True if this package provides a virtual package with the specified name
"""
return any(
- any(self.spec.intersects(c) for c in constraints)
- for s, constraints in self.provided.items()
- if s.name == vpkg_name
+ any(spec.name == vpkg_name for spec in provided)
+ for when_spec, provided in self.provided.items()
+ if self.spec.intersects(when_spec)
)
@property
@@ -1317,10 +1479,16 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
return [
vspec
- for vspec, constraints in self.provided.items()
- if any(self.spec.satisfies(c) for c in constraints)
+ for when_spec, provided in self.provided.items()
+ for vspec in provided
+ if self.spec.satisfies(when_spec)
]
+ @classmethod
+ def provided_virtual_names(cls):
+ """Return sorted list of names of virtuals that can be provided by this package."""
+ return sorted(set(vpkg.name for virtuals in cls.provided.values() for vpkg in virtuals))
+
@property
def prefix(self):
"""Get the prefix into which this package should be installed."""
@@ -1367,13 +1535,9 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
(str): default manual download instructions
"""
required = (
- "Manual download is required for {0}. ".format(self.spec.name)
- if self.manual_download
- else ""
- )
- return "{0}Refer to {1} for download instructions.".format(
- required, self.spec.package.homepage
+ f"Manual download is required for {self.spec.name}. " if self.manual_download else ""
)
+ return f"{required}Refer to {self.homepage} for download instructions."
def do_fetch(self, mirror_only=False):
"""
@@ -1385,12 +1549,11 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
return
checksum = spack.config.get("config:checksum")
- fetch = self.stage.managed_by_spack
if (
checksum
- and fetch
and (self.version not in self.versions)
and (not isinstance(self.version, GitVersion))
+ and ("dev_path" not in self.spec.variants)
):
tty.warn(
"There is no checksum on file to fetch %s safely."
@@ -1458,9 +1621,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
if self.has_code:
self.do_fetch(mirror_only)
self.stage.expand_archive()
-
- if not os.listdir(self.stage.path):
- raise spack.error.FetchError("Archive was empty for %s" % self.name)
else:
# Support for post-install hooks requires a stage.source_path
fsys.mkdirp(self.stage.source_path)
@@ -1494,17 +1654,15 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# If we encounter an archive that failed to patch, restage it
# so that we can apply all the patches again.
if os.path.isfile(bad_file):
- if self.stage.managed_by_spack:
+ if self.stage.requires_patch_success:
tty.debug("Patching failed last time. Restaging.")
self.stage.restage()
else:
- # develop specs/ DIYStages may have patch failures but
- # should never be restaged
- msg = (
- "A patch failure was detected in %s." % self.name
- + " Build errors may occur due to this."
+ # develop specs may have patch failures but should never be restaged
+ tty.warn(
+ f"A patch failure was detected in {self.name}."
+ " Build errors may occur due to this."
)
- tty.warn(msg)
return
# If this file exists, then we already applied all the patches.
@@ -1515,6 +1673,8 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
tty.msg("No patches needed for {0}".format(self.name))
return
+ errors = []
+
# Apply all the patches for specs that match this one
patched = False
for patch in patches:
@@ -1524,12 +1684,16 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
tty.msg("Applied patch {0}".format(patch.path_or_url))
patched = True
except spack.error.SpackError as e:
- tty.debug(e)
-
# Touch bad file if anything goes wrong.
- tty.msg("Patch %s failed." % patch.path_or_url)
fsys.touch(bad_file)
- raise
+ error_msg = f"Patch {patch.path_or_url} failed."
+ if self.stage.requires_patch_success:
+ tty.msg(error_msg)
+ raise
+ else:
+ tty.debug(error_msg)
+ tty.debug(e)
+ errors.append(e)
if has_patch_fun:
try:
@@ -1547,24 +1711,29 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# printed a message for each patch.
tty.msg("No patches needed for {0}".format(self.name))
except spack.error.SpackError as e:
- tty.debug(e)
-
# Touch bad file if anything goes wrong.
- tty.msg("patch() function failed for {0}".format(self.name))
fsys.touch(bad_file)
- raise
-
- # Get rid of any old failed file -- patches have either succeeded
- # or are not needed. This is mostly defensive -- it's needed
- # if the restage() method doesn't clean *everything* (e.g., for a repo)
- if os.path.isfile(bad_file):
- os.remove(bad_file)
-
- # touch good or no patches file so that we skip next time.
- if patched:
- fsys.touch(good_file)
- else:
- fsys.touch(no_patches_file)
+ error_msg = f"patch() function failed for {self.name}"
+ if self.stage.requires_patch_success:
+ tty.msg(error_msg)
+ raise
+ else:
+ tty.debug(error_msg)
+ tty.debug(e)
+ errors.append(e)
+
+ if not errors:
+ # Get rid of any old failed file -- patches have either succeeded
+ # or are not needed. This is mostly defensive -- it's needed
+ # if we didn't restage
+ if os.path.isfile(bad_file):
+ os.remove(bad_file)
+
+ # touch good or no patches file so that we skip next time.
+ if patched:
+ fsys.touch(good_file)
+ else:
+ fsys.touch(no_patches_file)
@classmethod
def all_patches(cls):
@@ -1618,8 +1787,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# should this attempt to download the source and set one? This
# probably only happens for source repositories which are
# referenced by branch name rather than tag or commit ID.
- env = spack.environment.active_environment()
- from_local_sources = env and env.is_develop(self.spec)
+ from_local_sources = "dev_path" in self.spec.variants
if self.has_code and not self.spec.external and not from_local_sources:
message = "Missing a source id for {s.name}@{s.version}"
tty.debug(message.format(s=self))
@@ -1661,7 +1829,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
bool: True if 'target' is found, else False
"""
# Prevent altering LC_ALL for 'make' outside this function
- make = copy.deepcopy(inspect.getmodule(self).make)
+ make = copy.deepcopy(self.module.make)
# Use English locale for missing target message comparison
make.add_default_env("LC_ALL", "C")
@@ -1686,13 +1854,22 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
#
# BSD Make:
# make: don't know how to make test. Stop
+ #
+ # Note: "Stop." is not printed when running a Make jobserver (spack env depfile) that runs
+ # with `make -k/--keep-going`
missing_target_msgs = [
- "No rule to make target `{0}'. Stop.",
- "No rule to make target '{0}'. Stop.",
- "don't know how to make {0}. Stop",
+ "No rule to make target `{0}'.",
+ "No rule to make target '{0}'.",
+ "don't know how to make {0}.",
]
- kwargs = {"fail_on_error": False, "output": os.devnull, "error": str}
+ kwargs = {
+ "fail_on_error": False,
+ "output": os.devnull,
+ "error": str,
+ # Remove MAKEFLAGS to avoid inherited flags from Make jobserver (spack env depfile)
+ "extra_env": {"MAKEFLAGS": ""},
+ }
stderr = make("-n", target, **kwargs)
@@ -1711,7 +1888,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
if self._has_make_target(target):
# Execute target
- inspect.getmodule(self).make(target, *args, **kwargs)
+ self.module.make(target, *args, **kwargs)
def _has_ninja_target(self, target):
"""Checks to see if 'target' is a valid target in a Ninja build script.
@@ -1722,7 +1899,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
Returns:
bool: True if 'target' is found, else False
"""
- ninja = inspect.getmodule(self).ninja
+ ninja = self.module.ninja
# Check if we have a Ninja build script
if not os.path.exists("build.ninja"):
@@ -1751,7 +1928,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
if self._has_ninja_target(target):
# Execute target
- inspect.getmodule(self).ninja(target, *args, **kwargs)
+ self.module.ninja(target, *args, **kwargs)
def _get_needed_resources(self):
# We use intersects here cause it would also work if self.spec is abstract
@@ -1770,70 +1947,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
resource_stage_folder = "-".join(pieces)
return resource_stage_folder
- def do_install(self, **kwargs):
- """Called by commands to install a package and or its dependencies.
-
- Package implementations should override install() to describe
- their build process.
-
- Args:
- cache_only (bool): Fail if binary package unavailable.
- dirty (bool): Don't clean the build environment before installing.
- explicit (bool): True if package was explicitly installed, False
- if package was implicitly installed (as a dependency).
- fail_fast (bool): Fail if any dependency fails to install;
- otherwise, the default is to install as many dependencies as
- possible (i.e., best effort installation).
- fake (bool): Don't really build; install fake stub files instead.
- force (bool): Install again, even if already installed.
- install_deps (bool): Install dependencies before installing this
- package
- install_source (bool): By default, source is not installed, but
- for debugging it might be useful to keep it around.
- keep_prefix (bool): Keep install prefix on failure. By default,
- destroys it.
- keep_stage (bool): By default, stage is destroyed only if there
- are no exceptions during build. Set to True to keep the stage
- even with exceptions.
- restage (bool): Force spack to restage the package source.
- skip_patch (bool): Skip patch stage of build if True.
- stop_before (str): stop execution before this
- installation phase (or None)
- stop_at (str): last installation phase to be executed
- (or None)
- tests (bool or list or set): False to run no tests, True to test
- all packages, or a list of package names to run tests for some
- use_cache (bool): Install from binary package, if available.
- verbose (bool): Display verbose build output (by default,
- suppresses it)
- """
- PackageInstaller([(self, kwargs)]).install()
-
- # TODO (post-34236): Update tests and all packages that use this as a
- # TODO (post-34236): package method to the routine made available to
- # TODO (post-34236): packages. Once done, remove this method.
- def cache_extra_test_sources(self, srcs):
- """Copy relative source paths to the corresponding install test subdir
-
- This method is intended as an optional install test setup helper for
- grabbing source files/directories during the installation process and
- copying them to the installation test subdirectory for subsequent use
- during install testing.
-
- Args:
- 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.
- """
- msg = (
- "'pkg.cache_extra_test_sources(srcs) is deprecated with removal "
- "expected in v0.22. Use 'cache_extra_test_sources(pkg, srcs)' "
- "instead."
- )
- warnings.warn(msg)
- cache_extra_test_sources(self, srcs)
-
def do_test(self, dirty=False, externals=False):
if self.test_requires_compiler:
compilers = spack.compilers.compilers_for_spec(
@@ -1857,178 +1970,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
self.tester.stand_alone_tests(kwargs)
- # TODO (post-34236): Remove this deprecated method when eliminate test,
- # TODO (post-34236): run_test, etc.
- @property
- def _test_deprecated_warning(self):
- alt = f"Use any name starting with 'test_' instead in {self.spec.name}."
- return f"The 'test' method is deprecated. {alt}"
-
- # TODO (post-34236): Remove this deprecated method when eliminate test,
- # TODO (post-34236): run_test, etc.
- def test(self):
- # Defer tests to virtual and concrete packages
- warnings.warn(self._test_deprecated_warning)
-
- # TODO (post-34236): Remove this deprecated method when eliminate test,
- # TODO (post-34236): run_test, etc.
- def run_test(
- self,
- exe,
- options=[],
- expected=[],
- status=0,
- installed=False,
- purpose=None,
- skip_missing=False,
- work_dir=None,
- ):
- """Run the test and confirm the expected results are obtained
-
- Log any failures and continue, they will be re-raised later
-
- Args:
- exe (str): the name of the executable
- 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): 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
- purpose (str): message to display before running test
- skip_missing (bool): skip the test if the executable is not
- in the install prefix bin directory or the provided work_dir
- work_dir (str or None): path to the smoke test directory
- """
-
- def test_title(purpose, test_name):
- if not purpose:
- return f"test: {test_name}: execute {test_name}"
-
- match = re.search(r"test: ([^:]*): (.*)", purpose)
- if match:
- # The test title has all the expected parts
- return purpose
-
- match = re.search(r"test: (.*)", purpose)
- if match:
- reason = match.group(1)
- return f"test: {test_name}: {reason}"
-
- return f"test: {test_name}: {purpose}"
-
- base_exe = os.path.basename(exe)
- alternate = f"Use 'test_part' instead for {self.spec.name} to process {base_exe}."
- warnings.warn(f"The 'run_test' method is deprecated. {alternate}")
-
- extra = re.compile(r"[\s,\- ]")
- details = (
- [extra.sub("", options)]
- if isinstance(options, str)
- else [extra.sub("", os.path.basename(opt)) for opt in options]
- )
- details = "_".join([""] + details) if details else ""
- test_name = f"test_{base_exe}{details}"
- tty.info(test_title(purpose, test_name), format="g")
-
- wdir = "." if work_dir is None else work_dir
- with fsys.working_dir(wdir, create=True):
- try:
- runner = which(exe)
- if runner is None and skip_missing:
- self.tester.status(test_name, TestStatus.SKIPPED, f"{exe} is missing")
- return
- assert runner is not None, f"Failed to find executable '{exe}'"
-
- self._run_test_helper(runner, options, expected, status, installed, purpose)
- self.tester.status(test_name, TestStatus.PASSED, None)
- return True
- except (AssertionError, BaseException) as e:
- # print a summary of the error to the log file
- # so that cdash and junit reporters know about it
- exc_type, _, tb = sys.exc_info()
-
- self.tester.status(test_name, TestStatus.FAILED, str(e))
-
- import traceback
-
- # remove the current call frame to exclude the extract_stack
- # call from the error
- stack = traceback.extract_stack()[:-1]
-
- # Package files have a line added at import time, so we re-read
- # the file to make line numbers match. We have to subtract two
- # from the line number because the original line number is
- # inflated once by the import statement and the lines are
- # displaced one by the import statement.
- for i, entry in enumerate(stack):
- filename, lineno, function, text = entry
- if spack.repo.is_package_file(filename):
- with open(filename, "r") as f:
- lines = f.readlines()
- new_lineno = lineno - 2
- text = lines[new_lineno]
- stack[i] = (filename, new_lineno, function, text)
-
- # Format the stack to print and print it
- out = traceback.format_list(stack)
- for line in out:
- print(line.rstrip("\n"))
-
- if exc_type is spack.util.executable.ProcessError:
- out = io.StringIO()
- spack.build_environment.write_log_summary(
- out, "test", self.tester.test_log_file, last=1
- )
- m = out.getvalue()
- else:
- # We're below the package context, so get context from
- # stack instead of from traceback.
- # The traceback is truncated here, so we can't use it to
- # traverse the stack.
- context = spack.build_environment.get_package_context(tb)
- m = "\n".join(context) if context else ""
-
- exc = e # e is deleted after this block
-
- # If we fail fast, raise another error
- if spack.config.get("config:fail_fast", False):
- raise TestFailure([(exc, m)])
- else:
- self.tester.add_failure(exc, m)
- return False
-
- # TODO (post-34236): Remove this deprecated method when eliminate test,
- # TODO (post-34236): run_test, etc.
- def _run_test_helper(self, runner, options, expected, status, installed, purpose):
- status = [status] if isinstance(status, int) else status
- expected = [expected] if isinstance(expected, str) else expected
- options = [options] if isinstance(options, str) else options
-
- if installed:
- msg = f"Executable '{runner.name}' expected in prefix, "
- msg += f"found in {runner.path} instead"
- assert runner.path.startswith(self.spec.prefix), msg
-
- tty.msg(f"Expecting return code in {status}")
-
- try:
- output = runner(*options, output=str.split, error=str.split)
-
- assert 0 in status, f"Expected {runner.name} execution to fail"
- except ProcessError as err:
- output = str(err)
- match = re.search(r"exited with status ([0-9]+)", output)
- if not (match and int(match.group(1)) in status):
- raise
-
- for check in expected:
- cmd = " ".join([runner.name] + options)
- msg = f"Expected '{check}' to match output of `{cmd}`"
- msg += f"\n\nOutput: {output}"
- assert re.search(check, output), msg
-
def unit_test_check(self):
"""Hook for unit tests to assert things about package internals.
@@ -2046,15 +1987,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
return True
- @property
- def build_log_path(self):
- """
- Return the expected (or current) build log file path. The path points
- to the staging build file until the software is successfully installed,
- when it points to the file in the installation directory.
- """
- return self.install_log_path if self.spec.installed else self.log_path
-
@classmethod
def inject_flags(cls: Type[Pb], name: str, flags: Iterable[str]) -> FLAG_HANDLER_RETURN_TYPE:
"""
@@ -2082,72 +2014,58 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
return None, None, flags
- def setup_run_environment(self, env):
+ def setup_run_environment(self, env: spack.util.environment.EnvironmentModifications) -> None:
"""Sets up the run environment for a package.
Args:
- env (spack.util.environment.EnvironmentModifications): environment
- modifications to be applied when the package is run. Package authors
+ env: environment modifications to be applied when the package is run. Package authors
can call methods on it to alter the run environment.
"""
pass
- def setup_dependent_run_environment(self, env, dependent_spec):
+ def setup_dependent_run_environment(
+ self, env: spack.util.environment.EnvironmentModifications, dependent_spec: spack.spec.Spec
+ ) -> None:
"""Sets up the run environment of packages that depend on this one.
- This is similar to ``setup_run_environment``, but it is used to
- modify the run environments of packages that *depend* on this one.
+ This is similar to ``setup_run_environment``, but it is used to modify the run environment
+ of a package that *depends* on this one.
- This gives packages like Python and others that follow the extension
- model a way to implement common environment or run-time settings
- for dependencies.
+ This gives packages like Python and others that follow the extension model a way to
+ implement common environment or run-time settings for dependencies.
Args:
- 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.
+ env: 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 (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
+ dependent_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``
"""
pass
- def setup_dependent_package(self, module, dependent_spec):
- """Set up Python module-scope variables for dependent packages.
+ def setup_dependent_package(self, module, dependent_spec: spack.spec.Spec) -> None:
+ """Set up module-scope global variables for dependent packages.
- Called before the install() method of dependents.
-
- Default implementation does nothing, but this can be
- overridden by an extendable package to set up the module of
- its extensions. This is useful if there are some common steps
- to installing all extensions for a certain package.
+ This function is called when setting up the build and run environments of a DAG.
Examples:
- 1. Extensions often need to invoke the ``python`` interpreter
- from the Python installation being extended. This routine
- can put a ``python()`` Executable object in the module scope
- for the extension package to simplify extension installs.
-
- 2. MPI compilers could set some variables in the dependent's
- scope that point to ``mpicc``, ``mpicxx``, etc., allowing
- them to be called by common name regardless of which MPI is used.
+ 1. Extensions often need to invoke the ``python`` interpreter from the Python installation
+ being extended. This routine can put a ``python`` Executable as a global in the module
+ scope for the extension package to simplify extension installs.
- 3. BLAS/LAPACK implementations can set some variables
- indicating the path to their libraries, since these
- paths differ by BLAS/LAPACK implementation.
+ 2. MPI compilers could set some variables in the dependent's scope that point to ``mpicc``,
+ ``mpicxx``, etc., allowing them to be called by common name regardless of which MPI is
+ used.
Args:
- module (spack.package_base.PackageBase.module): The Python ``module``
- object of the dependent package. Packages can use this to set
- module-scope variables for the dependent to use.
+ module: The Python ``module`` object of the dependent package. Packages can use this to
+ set module-scope variables for the dependent to use.
- 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``.
+ dependent_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``.
"""
pass
@@ -2174,7 +2092,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# arguments. This is implemented for build system classes where
# appropriate and will otherwise raise a NotImplementedError.
- def flags_to_build_system_args(self, flags):
+ def flags_to_build_system_args(self, flags: Dict[str, List[str]]) -> None:
# Takes flags as a dict name: list of values
if any(v for v in flags.values()):
msg = "The {0} build system".format(self.__class__.__name__)
@@ -2274,39 +2192,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# delegate to instance-less method.
PackageBase.uninstall_by_spec(self.spec, force)
- def do_deprecate(self, deprecator, link_fn):
- """Deprecate this package in favor of deprecator spec"""
- spec = self.spec
-
- # Install deprecator if it isn't installed already
- if not spack.store.STORE.db.query(deprecator):
- deprecator.package.do_install()
-
- old_deprecator = spack.store.STORE.db.deprecator(spec)
- if old_deprecator:
- # Find this specs yaml file from its old deprecation
- self_yaml = spack.store.STORE.layout.deprecated_file_path(spec, old_deprecator)
- else:
- self_yaml = spack.store.STORE.layout.spec_file_path(spec)
-
- # copy spec metadata to "deprecated" dir of deprecator
- depr_yaml = spack.store.STORE.layout.deprecated_file_path(spec, deprecator)
- fsys.mkdirp(os.path.dirname(depr_yaml))
- shutil.copy2(self_yaml, depr_yaml)
-
- # Any specs deprecated in favor of this spec are re-deprecated in
- # favor of its new deprecator
- for deprecated in spack.store.STORE.db.specs_deprecated_by(spec):
- deprecated.package.do_deprecate(deprecator, link_fn)
-
- # Now that we've handled metadata, uninstall and replace with link
- PackageBase.uninstall_by_spec(spec, force=True, deprecator=deprecator)
- link_fn(deprecator.prefix, spec.prefix)
-
- def _check_extendable(self):
- if not self.extendable:
- raise ValueError("Package %s is not extendable!" % self.name)
-
def view(self):
"""Create a view with the prefix of this package as the root.
Extensions added to this view will modify the installation prefix of
@@ -2338,15 +2223,14 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
return results.getvalue()
@property
- def all_urls(self):
+ def all_urls(self) -> List[str]:
"""A list of all URLs in a package.
Check both class-level and version-specific URLs.
- Returns:
- list: a list of URLs
+ Returns a list of URLs
"""
- urls = []
+ urls: List[str] = []
if hasattr(self, "url") and self.url:
urls.append(self.url)
@@ -2359,7 +2243,9 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
urls.append(args["url"])
return urls
- def fetch_remote_versions(self, concurrency=None):
+ def fetch_remote_versions(
+ self, concurrency: Optional[int] = None
+ ) -> Dict[StandardVersion, str]:
"""Find remote versions of this package.
Uses ``list_url`` and any other URLs listed in the package file.
@@ -2384,9 +2270,18 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
# on Windows, libraries of runtime interest are typically
# stored in the bin directory
+ # Do not include Windows system libraries in the rpath interface
+ # these libraries are handled automatically by VS/VCVARS and adding
+ # Spack derived system libs into the link path or address space of a program
+ # can result in conflicting versions, which makes Spack packages less useable
if sys.platform == "win32":
rpaths = [self.prefix.bin]
- rpaths.extend(d.prefix.bin for d in deps if os.path.isdir(d.prefix.bin))
+ rpaths.extend(
+ d.prefix.bin
+ for d in deps
+ if os.path.isdir(d.prefix.bin)
+ and "windows-system" not in getattr(d.package, "tags", [])
+ )
else:
rpaths = [self.prefix.lib, self.prefix.lib64]
rpaths.extend(d.prefix.lib for d in deps if os.path.isdir(d.prefix.lib))
@@ -2400,10 +2295,6 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
"""
return " ".join("-Wl,-rpath,%s" % p for p in self.rpath)
- @property
- def builder(self):
- return spack.builder.create(self)
-
inject_flags = PackageBase.inject_flags
env_flags = PackageBase.env_flags
@@ -2448,14 +2339,21 @@ def flatten_dependencies(spec, flat_dir):
dep_files.merge(flat_dir + "/" + name)
-def possible_dependencies(*pkg_or_spec, **kwargs):
+def possible_dependencies(
+ *pkg_or_spec: Union[str, spack.spec.Spec, typing.Type[PackageBase]],
+ transitive: bool = True,
+ expand_virtuals: bool = True,
+ depflag: dt.DepFlag = dt.ALL,
+ missing: Optional[dict] = None,
+ virtuals: Optional[set] = None,
+) -> Dict[str, Set[str]]:
"""Get the possible dependencies of a number of packages.
See ``PackageBase.possible_dependencies`` for details.
"""
packages = []
for pos in pkg_or_spec:
- if isinstance(pos, PackageMeta):
+ if isinstance(pos, PackageMeta) and issubclass(pos, PackageBase):
packages.append(pos)
continue
@@ -2468,9 +2366,16 @@ def possible_dependencies(*pkg_or_spec, **kwargs):
else:
packages.append(pos.package_class)
- visited = {}
+ visited: Dict[str, Set[str]] = {}
for pkg in packages:
- pkg.possible_dependencies(visited=visited, **kwargs)
+ pkg.possible_dependencies(
+ visited=visited,
+ transitive=transitive,
+ expand_virtuals=expand_virtuals,
+ depflag=depflag,
+ missing=missing,
+ virtuals=virtuals,
+ )
return visited
@@ -2479,25 +2384,16 @@ class PackageStillNeededError(InstallError):
"""Raised when package is still needed by another on uninstall."""
def __init__(self, spec, dependents):
- super().__init__("Cannot uninstall %s" % spec)
+ spec_fmt = spack.spec.DEFAULT_FORMAT + " /{hash:7}"
+ dep_fmt = "{name}{@versions} /{hash:7}"
+ super().__init__(
+ f"Cannot uninstall {spec.format(spec_fmt)}, "
+ f"needed by {[dep.format(dep_fmt) for dep in dependents]}"
+ )
self.spec = spec
self.dependents = dependents
-class PackageError(spack.error.SpackError):
- """Raised when something is wrong with a package definition."""
-
- def __init__(self, message, long_msg=None):
- super().__init__(message, long_msg)
-
-
-class NoURLError(PackageError):
- """Raised when someone tries to build a URL for a package with no URLs."""
-
- def __init__(self, cls):
- super().__init__("Package %s has no version with a URL." % cls.__name__)
-
-
class InvalidPackageOpError(PackageError):
"""Raised when someone tries perform an invalid operation on a package."""
@@ -2518,3 +2414,7 @@ class DependencyConflictError(spack.error.SpackError):
def __init__(self, conflict):
super().__init__("%s conflicts with another file in the flattened directory." % (conflict))
+
+
+class ManualDownloadRequiredError(InvalidPackageOpError):
+ """Raised when attempting an invalid operation on a package that requires a manual download."""
diff --git a/lib/spack/spack/package_completions.py b/lib/spack/spack/package_completions.py
new file mode 100644
index 0000000000..b985d77093
--- /dev/null
+++ b/lib/spack/spack/package_completions.py
@@ -0,0 +1,48 @@
+# Copyright 2013-2024 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 pathlib import Path
+from typing import Union
+
+"""Functions relating to shell autocompletion scripts for packages."""
+
+
+def bash_completion_path(root: Union[str, Path]) -> Path:
+ """
+ Return standard path for bash completion scripts under root.
+
+ Args:
+ root: The prefix root under which to generate the path.
+
+ Returns:
+ Standard path for bash completion scripts under root.
+ """
+ return Path(root) / "share" / "bash-completion" / "completions"
+
+
+def zsh_completion_path(root: Union[str, Path]) -> Path:
+ """
+ Return standard path for zsh completion scripts under root.
+
+ Args:
+ root: The prefix root under which to generate the path.
+
+ Returns:
+ Standard path for zsh completion scripts under root.
+ """
+ return Path(root) / "share" / "zsh" / "site-functions"
+
+
+def fish_completion_path(root: Union[str, Path]) -> Path:
+ """
+ Return standard path for fish completion scripts under root.
+
+ Args:
+ root: The prefix root under which to generate the path.
+
+ Returns:
+ Standard path for fish completion scripts under root.
+ """
+ return Path(root) / "share" / "fish" / "vendor_completions.d"
diff --git a/lib/spack/spack/package_prefs.py b/lib/spack/spack/package_prefs.py
index 117308e84e..0204e156f1 100644
--- a/lib/spack/spack/package_prefs.py
+++ b/lib/spack/spack/package_prefs.py
@@ -5,10 +5,11 @@
import stat
import warnings
+import spack.config
import spack.error
import spack.repo
-from spack.config import ConfigError
-from spack.util.path import canonicalize_path
+import spack.spec
+from spack.error import ConfigError
from spack.version import Version
_lesser_spec_types = {"compiler": spack.spec.CompilerSpec, "version": Version}
@@ -148,48 +149,12 @@ class PackagePrefs:
# Only return variants that are actually supported by the package
pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
- spec = spack.spec.Spec("%s %s" % (pkg_name, variants))
- return dict(
- (name, variant) for name, variant in spec.variants.items() if name in pkg_cls.variants
- )
-
-
-def spec_externals(spec):
- """Return a list of external specs (w/external directory path filled in),
- one for each known external installation.
- """
- # break circular import.
- from spack.util.module_cmd import path_from_modules # noqa: F401
-
- def _package(maybe_abstract_spec):
- pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
- return pkg_cls(maybe_abstract_spec)
-
- allpkgs = spack.config.get("packages")
- names = set([spec.name])
- names |= set(vspec.name for vspec in _package(spec).virtuals_provided)
-
- external_specs = []
- for name in names:
- pkg_config = allpkgs.get(name, {})
- pkg_externals = pkg_config.get("externals", [])
- for entry in pkg_externals:
- spec_str = entry["spec"]
- external_path = entry.get("prefix", None)
- if external_path:
- external_path = canonicalize_path(external_path)
- external_modules = entry.get("modules", None)
- external_spec = spack.spec.Spec.from_detection(
- spack.spec.Spec(
- spec_str, external_path=external_path, external_modules=external_modules
- ),
- extra_attributes=entry.get("extra_attributes", {}),
- )
- if external_spec.intersects(spec):
- external_specs.append(external_spec)
-
- # Defensively copy returned specs
- return [s.copy() for s in external_specs]
+ spec = spack.spec.Spec(f"{pkg_name} {variants}")
+ return {
+ name: variant
+ for name, variant in spec.variants.items()
+ if name in pkg_cls.variant_names()
+ }
def is_spec_buildable(spec):
diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py
index 29e335d65e..23739b6841 100644
--- a/lib/spack/spack/parser.py
+++ b/lib/spack/spack/parser.py
@@ -70,6 +70,7 @@ import spack.deptypes
import spack.error
import spack.spec
import spack.version
+from spack.error import SpecSyntaxError
IS_WINDOWS = sys.platform == "win32"
#: Valid name for specs and variants. Here we are not using
@@ -328,19 +329,26 @@ class SpecParser:
if not self.ctx.next_token:
return initial_spec
+ def add_dependency(dep, **edge_properties):
+ """wrapper around root_spec._add_dependency"""
+ try:
+ root_spec._add_dependency(dep, **edge_properties)
+ except spack.error.SpecError as e:
+ raise SpecParsingError(str(e), self.ctx.current_token, self.literal_str) from e
+
initial_spec = initial_spec or spack.spec.Spec()
- root_spec = SpecNodeParser(self.ctx).parse(initial_spec)
+ root_spec = SpecNodeParser(self.ctx, self.literal_str).parse(initial_spec)
while True:
if self.ctx.accept(TokenType.START_EDGE_PROPERTIES):
edge_properties = EdgeAttributeParser(self.ctx, self.literal_str).parse()
edge_properties.setdefault("depflag", 0)
edge_properties.setdefault("virtuals", ())
dependency = self._parse_node(root_spec)
- root_spec._add_dependency(dependency, **edge_properties)
+ add_dependency(dependency, **edge_properties)
elif self.ctx.accept(TokenType.DEPENDENCY):
dependency = self._parse_node(root_spec)
- root_spec._add_dependency(dependency, depflag=0, virtuals=())
+ add_dependency(dependency, depflag=0, virtuals=())
else:
break
@@ -348,7 +356,7 @@ class SpecParser:
return root_spec
def _parse_node(self, root_spec):
- dependency = SpecNodeParser(self.ctx).parse()
+ dependency = SpecNodeParser(self.ctx, self.literal_str).parse()
if dependency is None:
msg = (
"the dependency sigil and any optional edge attributes must be followed by a "
@@ -367,10 +375,11 @@ class SpecParser:
class SpecNodeParser:
"""Parse a single spec node from a stream of tokens"""
- __slots__ = "ctx", "has_compiler", "has_version"
+ __slots__ = "ctx", "has_compiler", "has_version", "literal_str"
- def __init__(self, ctx):
+ def __init__(self, ctx, literal_str):
self.ctx = ctx
+ self.literal_str = literal_str
self.has_compiler = False
self.has_version = False
@@ -388,7 +397,8 @@ class SpecNodeParser:
if not self.ctx.next_token or self.ctx.expect(TokenType.DEPENDENCY):
return initial_spec
- initial_spec = initial_spec or spack.spec.Spec()
+ if initial_spec is None:
+ initial_spec = spack.spec.Spec()
# If we start with a package name we have a named spec, we cannot
# accept another package name afterwards in a node
@@ -405,12 +415,21 @@ class SpecNodeParser:
elif self.ctx.accept(TokenType.FILENAME):
return FileParser(self.ctx).parse(initial_spec)
+ def raise_parsing_error(string: str, cause: Optional[Exception] = None):
+ """Raise a spec parsing error with token context."""
+ raise SpecParsingError(string, self.ctx.current_token, self.literal_str) from cause
+
+ def add_flag(name: str, value: str, propagate: bool):
+ """Wrapper around ``Spec._add_flag()`` that adds parser context to errors raised."""
+ try:
+ initial_spec._add_flag(name, value, propagate)
+ except Exception as e:
+ raise_parsing_error(str(e), e)
+
while True:
if self.ctx.accept(TokenType.COMPILER):
if self.has_compiler:
- raise spack.spec.DuplicateCompilerSpecError(
- f"{initial_spec} cannot have multiple compilers"
- )
+ raise_parsing_error("Spec cannot have multiple compilers")
compiler_name = self.ctx.current_token.value[1:]
initial_spec.compiler = spack.spec.CompilerSpec(compiler_name.strip(), ":")
@@ -418,9 +437,7 @@ class SpecNodeParser:
elif self.ctx.accept(TokenType.COMPILER_AND_VERSION):
if self.has_compiler:
- raise spack.spec.DuplicateCompilerSpecError(
- f"{initial_spec} cannot have multiple compilers"
- )
+ raise_parsing_error("Spec cannot have multiple compilers")
compiler_name, compiler_version = self.ctx.current_token.value[1:].split("@")
initial_spec.compiler = spack.spec.CompilerSpec(
@@ -434,9 +451,8 @@ class SpecNodeParser:
or self.ctx.accept(TokenType.VERSION)
):
if self.has_version:
- raise spack.spec.MultipleVersionError(
- f"{initial_spec} cannot have multiple versions"
- )
+ raise_parsing_error("Spec cannot have multiple versions")
+
initial_spec.versions = spack.version.VersionList(
[spack.version.from_string(self.ctx.current_token.value[1:])]
)
@@ -445,29 +461,25 @@ class SpecNodeParser:
elif self.ctx.accept(TokenType.BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0] == "+"
- initial_spec._add_flag(
- self.ctx.current_token.value[1:].strip(), variant_value, propagate=False
- )
+ add_flag(self.ctx.current_token.value[1:].strip(), variant_value, propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0:2] == "++"
- initial_spec._add_flag(
- self.ctx.current_token.value[2:].strip(), variant_value, propagate=True
- )
+ add_flag(self.ctx.current_token.value[2:].strip(), variant_value, propagate=True)
elif self.ctx.accept(TokenType.KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and KEY_VALUE_PAIR do not agree."
- name, delim, value = match.groups()
- initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=False)
+ name, _, value = match.groups()
+ add_flag(name, strip_quotes_and_unescape(value), propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and PROPAGATED_KEY_VALUE_PAIR do not agree."
- name, delim, value = match.groups()
- initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=True)
+ name, _, value = match.groups()
+ add_flag(name, strip_quotes_and_unescape(value), propagate=True)
elif self.ctx.expect(TokenType.DAG_HASH):
if initial_spec.abstract_hash:
@@ -589,10 +601,6 @@ def parse_one_or_raise(
return result
-class SpecSyntaxError(Exception):
- """Base class for Spec syntax errors"""
-
-
class SpecTokenizationError(SpecSyntaxError):
"""Syntax error in a spec string"""
diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py
index 09b76a1dc1..8d2d0b690d 100644
--- a/lib/spack/spack/patch.py
+++ b/lib/spack/spack/patch.py
@@ -4,20 +4,20 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import hashlib
-import inspect
import os
import os.path
import pathlib
import sys
+from typing import Any, Dict, Optional, Tuple, Type, Union
import llnl.util.filesystem
-import llnl.util.lang
from llnl.url import allowed_archive
import spack
import spack.error
-import spack.fetch_strategy as fs
-import spack.mirror
+import spack.fetch_strategy
+import spack.mirrors.layout
+import spack.mirrors.mirror
import spack.repo
import spack.stage
import spack.util.spack_json as sjson
@@ -25,15 +25,21 @@ from spack.util.crypto import Checker, checksum
from spack.util.executable import which, which_string
-def apply_patch(stage, patch_path, level=1, working_dir="."):
+def apply_patch(
+ stage: "spack.stage.Stage",
+ patch_path: str,
+ level: int = 1,
+ working_dir: str = ".",
+ reverse: bool = False,
+) -> None:
"""Apply the patch at patch_path to code in the stage.
Args:
- stage (spack.stage.Stage): stage with code that will be patched
- patch_path (str): filesystem location for the patch to apply
- level (int or None): patch level (default 1)
- working_dir (str): relative path *within* the stage to change to
- (default '.')
+ stage: stage with code that will be patched
+ patch_path: filesystem location for the patch to apply
+ level: patch level
+ working_dir: relative path *within* the stage to change to
+ reverse: reverse the patch
"""
git_utils_path = os.environ.get("PATH", "")
if sys.platform == "win32":
@@ -44,6 +50,10 @@ def apply_patch(stage, patch_path, level=1, working_dir="."):
git_root = git_root / "usr" / "bin"
git_utils_path = os.pathsep.join([str(git_root), git_utils_path])
+ args = ["-s", "-p", str(level), "-i", patch_path, "-d", working_dir]
+ if reverse:
+ args.append("-R")
+
# TODO: Decouple Spack's patch support on Windows from Git
# for Windows, and instead have Spack directly fetch, install, and
# utilize that patch.
@@ -52,22 +62,39 @@ def apply_patch(stage, patch_path, level=1, working_dir="."):
# flag is passed.
patch = which("patch", required=True, path=git_utils_path)
with llnl.util.filesystem.working_dir(stage.source_path):
- patch("-s", "-p", str(level), "-i", patch_path, "-d", working_dir)
+ patch(*args)
+
+
+PatchPackageType = Union["spack.package_base.PackageBase", Type["spack.package_base.PackageBase"]]
class Patch:
"""Base class for patches.
- Arguments:
- pkg (str): the package that owns the patch
-
The owning package is not necessarily the package to apply the patch
to -- in the case where a dependent package patches its dependency,
it is the dependent's fullname.
-
"""
- def __init__(self, pkg, path_or_url, level, working_dir):
+ sha256: str
+
+ def __init__(
+ self,
+ pkg: PatchPackageType,
+ path_or_url: str,
+ level: int,
+ working_dir: str,
+ reverse: bool = False,
+ ) -> None:
+ """Initialize a new Patch instance.
+
+ Args:
+ pkg: the package that owns the patch
+ path_or_url: the relative path or URL to a patch file
+ level: patch level
+ working_dir: relative path *within* the stage to change to
+ reverse: reverse the patch
+ """
# validate level (must be an integer >= 0)
if not isinstance(level, int) or not level >= 0:
raise ValueError("Patch level needs to be a non-negative integer.")
@@ -75,62 +102,91 @@ class Patch:
# Attributes shared by all patch subclasses
self.owner = pkg.fullname
self.path_or_url = path_or_url # needed for debug output
- self.path = None # must be set before apply()
+ self.path: Optional[str] = None # must be set before apply()
self.level = level
self.working_dir = working_dir
+ self.reverse = reverse
- def apply(self, stage: "spack.stage.Stage"):
+ def apply(self, stage: "spack.stage.Stage") -> None:
"""Apply a patch to source in a stage.
- Arguments:
- stage (spack.stage.Stage): stage where source code lives
+ Args:
+ stage: stage where source code lives
"""
if not self.path or not os.path.isfile(self.path):
- raise NoSuchPatchError(f"No such patch: {self.path}")
+ raise spack.error.NoSuchPatchError(f"No such patch: {self.path}")
- apply_patch(stage, self.path, self.level, self.working_dir)
+ apply_patch(stage, self.path, self.level, self.working_dir, self.reverse)
- @property
- def stage(self):
- return None
+ # TODO: Use TypedDict once Spack supports Python 3.8+ only
+ def to_dict(self) -> Dict[str, Any]:
+ """Dictionary representation of the patch.
- def to_dict(self):
- """Partial dictionary -- subclases should add to this."""
+ Returns:
+ A dictionary representation.
+ """
return {
"owner": self.owner,
"sha256": self.sha256,
"level": self.level,
"working_dir": self.working_dir,
+ "reverse": self.reverse,
}
- def __eq__(self, other):
+ def __eq__(self, other: object) -> bool:
+ """Equality check.
+
+ Args:
+ other: another patch
+
+ Returns:
+ True if both patches have the same checksum, else False
+ """
+ if not isinstance(other, Patch):
+ return NotImplemented
return self.sha256 == other.sha256
- def __hash__(self):
+ def __hash__(self) -> int:
+ """Unique hash.
+
+ Returns:
+ A unique hash based on the sha256.
+ """
return hash(self.sha256)
class FilePatch(Patch):
- """Describes a patch that is retrieved from a file in the repository.
-
- Arguments:
- pkg (str): the class object for the package that owns the patch
- relative_path (str): path to patch, relative to the repository
- directory for a package.
- level (int): level to pass to patch command
- working_dir (str): path within the source directory where patch
- should be applied
- """
-
- def __init__(self, pkg, relative_path, level, working_dir, ordering_key=None):
+ """Describes a patch that is retrieved from a file in the repository."""
+
+ _sha256: Optional[str] = None
+
+ def __init__(
+ self,
+ pkg: PatchPackageType,
+ relative_path: str,
+ level: int,
+ working_dir: str,
+ reverse: bool = False,
+ ordering_key: Optional[Tuple[str, int]] = None,
+ ) -> None:
+ """Initialize a new FilePatch instance.
+
+ Args:
+ pkg: the class object for the package that owns the patch
+ relative_path: path to patch, relative to the repository directory for a package.
+ level: level to pass to patch command
+ working_dir: path within the source directory where patch should be applied
+ reverse: reverse the patch
+ ordering_key: key used to ensure patches are applied in a consistent order
+ """
self.relative_path = relative_path
# patches may be defined by relative paths to parent classes
# search mro to look for the file
- abs_path = None
+ abs_path: Optional[str] = None
# At different times we call FilePatch on instances and classes
- pkg_cls = pkg if inspect.isclass(pkg) else pkg.__class__
- for cls in inspect.getmro(pkg_cls):
+ pkg_cls = pkg if isinstance(pkg, type) else pkg.__class__
+ for cls in pkg_cls.__mro__: # type: ignore
if not hasattr(cls, "module"):
# We've gone too far up the MRO
break
@@ -148,52 +204,94 @@ class FilePatch(Patch):
msg += "package %s.%s does not exist." % (pkg.namespace, pkg.name)
raise ValueError(msg)
- super().__init__(pkg, abs_path, level, working_dir)
+ super().__init__(pkg, abs_path, level, working_dir, reverse)
self.path = abs_path
- self._sha256 = None
self.ordering_key = ordering_key
@property
- def sha256(self):
- if self._sha256 is None:
+ def sha256(self) -> str:
+ """Get the patch checksum.
+
+ Returns:
+ The sha256 of the patch file.
+ """
+ if self._sha256 is None and self.path is not None:
self._sha256 = checksum(hashlib.sha256, self.path)
+ assert isinstance(self._sha256, str)
return self._sha256
- def to_dict(self):
- return llnl.util.lang.union_dicts(super().to_dict(), {"relative_path": self.relative_path})
+ @sha256.setter
+ def sha256(self, value: str) -> None:
+ """Set the patch checksum.
+
+ Args:
+ value: the sha256
+ """
+ self._sha256 = value
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Dictionary representation of the patch.
+
+ Returns:
+ A dictionary representation.
+ """
+ data = super().to_dict()
+ data["relative_path"] = self.relative_path
+ return data
class UrlPatch(Patch):
- """Describes a patch that is retrieved from a URL.
-
- Arguments:
- pkg (str): the package that owns the patch
- url (str): URL where the patch can be fetched
- level (int): level to pass to patch command
- working_dir (str): path within the source directory where patch
- should be applied
- """
+ """Describes a patch that is retrieved from a URL."""
+
+ def __init__(
+ self,
+ pkg: PatchPackageType,
+ url: str,
+ level: int = 1,
+ *,
+ working_dir: str = ".",
+ reverse: bool = False,
+ sha256: str, # This is required for UrlPatch
+ ordering_key: Optional[Tuple[str, int]] = None,
+ archive_sha256: Optional[str] = None,
+ ) -> None:
+ """Initialize a new UrlPatch instance.
- def __init__(self, pkg, url, level=1, working_dir=".", ordering_key=None, **kwargs):
- super().__init__(pkg, url, level, working_dir)
+ Arguments:
+ pkg: the package that owns the patch
+ url: URL where the patch can be fetched
+ level: level to pass to patch command
+ working_dir: path within the source directory where patch should be applied
+ reverse: reverse the patch
+ ordering_key: key used to ensure patches are applied in a consistent order
+ sha256: sha256 sum of the patch, used to verify the patch
+ archive_sha256: sha256 sum of the *archive*, if the patch is compressed
+ (only required for compressed URL patches)
+ """
+ super().__init__(pkg, url, level, working_dir, reverse)
self.url = url
- self._stage = None
+ self._stage: Optional["spack.stage.Stage"] = None
self.ordering_key = ordering_key
- self.archive_sha256 = kwargs.get("archive_sha256")
- if allowed_archive(self.url) and not self.archive_sha256:
- raise PatchDirectiveError(
+ if allowed_archive(self.url) and not archive_sha256:
+ raise spack.error.PatchDirectiveError(
"Compressed patches require 'archive_sha256' "
"and patch 'sha256' attributes: %s" % self.url
)
+ self.archive_sha256 = archive_sha256
+
+ if not sha256:
+ raise spack.error.PatchDirectiveError("URL patches require a sha256 checksum")
+ self.sha256 = sha256
- self.sha256 = kwargs.get("sha256")
- if not self.sha256:
- raise PatchDirectiveError("URL patches require a sha256 checksum")
+ def apply(self, stage: "spack.stage.Stage") -> None:
+ """Apply a patch to source in a stage.
- def apply(self, stage: "spack.stage.Stage"):
+ Args:
+ stage: stage where source code lives
+ """
assert self.stage.expanded, "Stage must be expanded before applying patches"
# Get the patch file.
@@ -204,34 +302,49 @@ class UrlPatch(Patch):
return super().apply(stage)
@property
- def stage(self):
+ def stage(self) -> "spack.stage.Stage":
+ """The stage in which to download (and unpack) the URL patch.
+
+ Returns:
+ The stage object.
+ """
if self._stage:
return self._stage
fetch_digest = self.archive_sha256 or self.sha256
# Two checksums, one for compressed file, one for its contents
- if self.archive_sha256:
- fetcher = fs.FetchAndVerifyExpandedFile(
- self.url, archive_sha256=self.archive_sha256, expanded_sha256=self.sha256
+ if self.archive_sha256 and self.sha256:
+ fetcher: spack.fetch_strategy.FetchStrategy = (
+ spack.fetch_strategy.FetchAndVerifyExpandedFile(
+ self.url, archive_sha256=self.archive_sha256, expanded_sha256=self.sha256
+ )
)
else:
- fetcher = fs.URLFetchStrategy(self.url, sha256=self.sha256, expand=False)
+ fetcher = spack.fetch_strategy.URLFetchStrategy(
+ url=self.url, sha256=self.sha256, expand=False
+ )
# The same package can have multiple patches with the same name but
# with different contents, therefore apply a subset of the hash.
name = "{0}-{1}".format(os.path.basename(self.url), fetch_digest[:7])
per_package_ref = os.path.join(self.owner.split(".")[-1], name)
- mirror_ref = spack.mirror.mirror_archive_paths(fetcher, per_package_ref)
+ mirror_ref = spack.mirrors.layout.default_mirror_layout(fetcher, per_package_ref)
self._stage = spack.stage.Stage(
fetcher,
name=f"{spack.stage.stage_prefix}patch-{fetch_digest}",
mirror_paths=mirror_ref,
+ mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(),
)
return self._stage
- def to_dict(self):
+ def to_dict(self) -> Dict[str, Any]:
+ """Dictionary representation of the patch.
+
+ Returns:
+ A dictionary representation.
+ """
data = super().to_dict()
data["url"] = self.url
if self.archive_sha256:
@@ -239,12 +352,26 @@ class UrlPatch(Patch):
return data
-def from_dict(dictionary, repository=None):
- """Create a patch from json dictionary."""
+def from_dict(
+ dictionary: Dict[str, Any], repository: Optional["spack.repo.RepoPath"] = None
+) -> Patch:
+ """Create a patch from json dictionary.
+
+ Args:
+ dictionary: dictionary representation of a patch
+ repository: repository containing package
+
+ Returns:
+ A patch object.
+
+ Raises:
+ ValueError: If *owner* or *url*/*relative_path* are missing in the dictionary.
+ """
repository = repository or spack.repo.PATH
owner = dictionary.get("owner")
- if "owner" not in dictionary:
- raise ValueError("Invalid patch dictionary: %s" % dictionary)
+ if owner is None:
+ raise ValueError(f"Invalid patch dictionary: {dictionary}")
+ assert isinstance(owner, str)
pkg_cls = repository.get_pkg_class(owner)
if "url" in dictionary:
@@ -252,14 +379,21 @@ def from_dict(dictionary, repository=None):
pkg_cls,
dictionary["url"],
dictionary["level"],
- dictionary["working_dir"],
+ working_dir=dictionary["working_dir"],
+ # Added in v0.22, fallback required for backwards compatibility
+ reverse=dictionary.get("reverse", False),
sha256=dictionary["sha256"],
archive_sha256=dictionary.get("archive_sha256"),
)
elif "relative_path" in dictionary:
patch = FilePatch(
- pkg_cls, dictionary["relative_path"], dictionary["level"], dictionary["working_dir"]
+ pkg_cls,
+ dictionary["relative_path"],
+ dictionary["level"],
+ dictionary["working_dir"],
+ # Added in v0.22, fallback required for backwards compatibility
+ dictionary.get("reverse", False),
)
# If the patch in the repo changes, we cannot get it back, so we
@@ -267,8 +401,8 @@ def from_dict(dictionary, repository=None):
# TODO: handle this more gracefully.
sha256 = dictionary["sha256"]
checker = Checker(sha256)
- if not checker.check(patch.path):
- raise fs.ChecksumError(
+ if patch.path and not checker.check(patch.path):
+ raise spack.fetch_strategy.ChecksumError(
"sha256 checksum failed for %s" % patch.path,
"Expected %s but got %s " % (sha256, checker.sum)
+ "Patch may have changed since concretization.",
@@ -295,10 +429,17 @@ class PatchCache:
namespace2.package2:
<patch json>
... etc. ...
-
"""
- def __init__(self, repository, data=None):
+ def __init__(
+ self, repository: "spack.repo.RepoPath", data: Optional[Dict[str, Any]] = None
+ ) -> None:
+ """Initialize a new PatchCache instance.
+
+ Args:
+ repository: repository containing package
+ data: nested dictionary of patches
+ """
if data is None:
self.index = {}
else:
@@ -309,24 +450,42 @@ class PatchCache:
self.repository = repository
@classmethod
- def from_json(cls, stream, repository):
+ def from_json(cls, stream: Any, repository: "spack.repo.RepoPath") -> "PatchCache":
+ """Initialize a new PatchCache instance from JSON.
+
+ Args:
+ stream: stream of data
+ repository: repository containing package
+
+ Returns:
+ A new PatchCache instance.
+ """
return PatchCache(repository=repository, data=sjson.load(stream))
- def to_json(self, stream):
+ def to_json(self, stream: Any) -> None:
+ """Dump a JSON representation to a stream.
+
+ Args:
+ stream: stream of data
+ """
sjson.dump({"patches": self.index}, stream)
- def patch_for_package(self, sha256: str, pkg):
+ def patch_for_package(self, sha256: str, pkg: "spack.package_base.PackageBase") -> Patch:
"""Look up a patch in the index and build a patch object for it.
- Arguments:
+ We build patch objects lazily because building them requires that
+ we have information about the package's location in its repo.
+
+ Args:
sha256: sha256 hash to look up
- pkg (spack.package_base.PackageBase): Package object to get patch for.
+ pkg: Package object to get patch for.
- We build patch objects lazily because building them requires that
- we have information about the package's location in its repo."""
+ Returns:
+ The patch object.
+ """
sha_index = self.index.get(sha256)
if not sha_index:
- raise PatchLookupError(
+ raise spack.error.PatchLookupError(
f"Couldn't find patch for package {pkg.fullname} with sha256: {sha256}"
)
@@ -336,7 +495,7 @@ class PatchCache:
if patch_dict:
break
else:
- raise PatchLookupError(
+ raise spack.error.PatchLookupError(
f"Couldn't find patch for package {pkg.fullname} with sha256: {sha256}"
)
@@ -346,7 +505,12 @@ class PatchCache:
patch_dict["sha256"] = sha256
return from_dict(patch_dict, repository=self.repository)
- def update_package(self, pkg_fullname):
+ def update_package(self, pkg_fullname: str) -> None:
+ """Update the patch cache.
+
+ Args:
+ pkg_fullname: package to update.
+ """
# remove this package from any patch entries that reference it.
empty = []
for sha256, package_to_patch in self.index.items():
@@ -372,14 +536,29 @@ class PatchCache:
p2p = self.index.setdefault(sha256, {})
p2p.update(package_to_patch)
- def update(self, other):
- """Update this cache with the contents of another."""
+ def update(self, other: "PatchCache") -> None:
+ """Update this cache with the contents of another.
+
+ Args:
+ other: another patch cache to merge
+ """
for sha256, package_to_patch in other.index.items():
p2p = self.index.setdefault(sha256, {})
p2p.update(package_to_patch)
@staticmethod
- def _index_patches(pkg_class, repository):
+ def _index_patches(
+ pkg_class: Type["spack.package_base.PackageBase"], repository: "spack.repo.RepoPath"
+ ) -> Dict[Any, Any]:
+ """Patch index for a specific patch.
+
+ Args:
+ pkg_class: package object to get patches for
+ repository: repository containing the package
+
+ Returns:
+ The patch index for that package.
+ """
index = {}
# Add patches from the class
@@ -389,10 +568,9 @@ class PatchCache:
patch_dict.pop("sha256") # save some space
index[patch.sha256] = {pkg_class.fullname: patch_dict}
- # and patches on dependencies
- for name, conditions in pkg_class.dependencies.items():
- for cond, dependency in conditions.items():
- for pcond, patch_list in dependency.patches.items():
+ for deps_by_name in pkg_class.dependencies.values():
+ for dependency in deps_by_name.values():
+ for patch_list in dependency.patches.values():
for patch in patch_list:
dspec_cls = repository.get_pkg_class(dependency.spec.name)
patch_dict = patch.to_dict()
@@ -400,15 +578,3 @@ class PatchCache:
index[patch.sha256] = {dspec_cls.fullname: patch_dict}
return index
-
-
-class NoSuchPatchError(spack.error.SpackError):
- """Raised when a patch file doesn't exist."""
-
-
-class PatchLookupError(NoSuchPatchError):
- """Raised when a patch file cannot be located from sha256."""
-
-
-class PatchDirectiveError(spack.error.SpackError):
- """Raised when the wrong arguments are suppled to the patch directive."""
diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py
index aa64276421..84583cd552 100644
--- a/lib/spack/spack/paths.py
+++ b/lib/spack/spack/paths.py
@@ -136,3 +136,16 @@ user_config_path = _get_user_config_path()
#: System configuration location
system_config_path = _get_system_config_path()
+
+#: Recorded directory where spack command was originally invoked
+spack_working_dir = None
+
+
+def set_working_dir():
+ """Change the working directory to getcwd, or spack prefix if no cwd."""
+ global spack_working_dir
+ try:
+ spack_working_dir = os.getcwd()
+ except OSError:
+ os.chdir(prefix)
+ spack_working_dir = prefix
diff --git a/lib/spack/spack/phase_callbacks.py b/lib/spack/spack/phase_callbacks.py
new file mode 100644
index 0000000000..58eec54ca1
--- /dev/null
+++ b/lib/spack/spack/phase_callbacks.py
@@ -0,0 +1,105 @@
+# Copyright 2013-2024 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 collections
+
+import llnl.util.lang as lang
+
+#: An object of this kind is a shared global state used to collect callbacks during
+#: class definition time, and is flushed when the class object is created at the end
+#: of the class definition
+#:
+#: Args:
+#: attribute_name (str): name of the attribute that will be attached to the builder
+#: callbacks (list): container used to temporarily aggregate the callbacks
+CallbackTemporaryStage = collections.namedtuple(
+ "CallbackTemporaryStage", ["attribute_name", "callbacks"]
+)
+
+#: Shared global state to aggregate "@run_before" callbacks
+_RUN_BEFORE = CallbackTemporaryStage(attribute_name="run_before_callbacks", callbacks=[])
+#: Shared global state to aggregate "@run_after" callbacks
+_RUN_AFTER = CallbackTemporaryStage(attribute_name="run_after_callbacks", callbacks=[])
+
+
+class PhaseCallbacksMeta(type):
+ """Permit to register arbitrary functions during class definition and run them
+ later, before or after a given install phase.
+
+ Each method decorated with ``run_before`` or ``run_after`` gets temporarily
+ stored in a global shared state when a class being defined is parsed by the Python
+ interpreter. At class definition time that temporary storage gets flushed and a list
+ of callbacks is attached to the class being defined.
+ """
+
+ def __new__(mcs, name, bases, attr_dict):
+ for temporary_stage in (_RUN_BEFORE, _RUN_AFTER):
+ staged_callbacks = temporary_stage.callbacks
+
+ # Here we have an adapter from an old-style package. This means there is no
+ # hierarchy of builders, and every callback that had to be combined between
+ # *Package and *Builder has been combined already by _PackageAdapterMeta
+ if name == "Adapter":
+ continue
+
+ # If we are here we have callbacks. To get a complete list, we accumulate all the
+ # callbacks from base classes, we deduplicate them, then prepend what we have
+ # registered here.
+ #
+ # The order should be:
+ # 1. Callbacks are registered in order within the same class
+ # 2. Callbacks defined in derived classes precede those defined in base
+ # classes
+ callbacks_from_base = []
+ for base in bases:
+ current_callbacks = getattr(base, temporary_stage.attribute_name, None)
+ if not current_callbacks:
+ continue
+ callbacks_from_base.extend(current_callbacks)
+ callbacks_from_base = list(lang.dedupe(callbacks_from_base))
+ # Set the callbacks in this class and flush the temporary stage
+ attr_dict[temporary_stage.attribute_name] = staged_callbacks[:] + callbacks_from_base
+ del temporary_stage.callbacks[:]
+
+ return super(PhaseCallbacksMeta, mcs).__new__(mcs, name, bases, attr_dict)
+
+ @staticmethod
+ def run_after(phase, when=None):
+ """Decorator to register a function for running after a given phase.
+
+ Args:
+ phase (str): phase after which the function must run.
+ when (str): condition under which the function is run (if None, it is always run).
+ """
+
+ def _decorator(fn):
+ key = (phase, when)
+ item = (key, fn)
+ _RUN_AFTER.callbacks.append(item)
+ return fn
+
+ return _decorator
+
+ @staticmethod
+ def run_before(phase, when=None):
+ """Decorator to register a function for running before a given phase.
+
+ Args:
+ phase (str): phase before which the function must run.
+ when (str): condition under which the function is run (if None, it is always run).
+ """
+
+ def _decorator(fn):
+ key = (phase, when)
+ item = (key, fn)
+ _RUN_BEFORE.callbacks.append(item)
+ return fn
+
+ return _decorator
+
+
+# Export these names as standalone to be used in packages
+run_after = PhaseCallbacksMeta.run_after
+run_before = PhaseCallbacksMeta.run_before
diff --git a/lib/spack/spack/platforms/__init__.py b/lib/spack/spack/platforms/__init__.py
index 54d3e6eae5..7b7a668fb1 100644
--- a/lib/spack/spack/platforms/__init__.py
+++ b/lib/spack/spack/platforms/__init__.py
@@ -4,9 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
-from ._functions import _host, by_name, platforms, prevent_cray_detection, reset
+from ._functions import _host, by_name, platforms, reset
from ._platform import Platform
-from .cray import Cray
from .darwin import Darwin
from .freebsd import FreeBSD
from .linux import Linux
@@ -15,7 +14,6 @@ from .windows import Windows
__all__ = [
"Platform",
- "Cray",
"Darwin",
"Linux",
"FreeBSD",
@@ -25,7 +23,6 @@ __all__ = [
"host",
"by_name",
"reset",
- "prevent_cray_detection",
]
#: The "real" platform of the host running Spack. This should not be changed
@@ -54,7 +51,6 @@ class _PickleableCallable:
def use_platform(new_platform):
global host
- import spack.compilers
import spack.config
msg = '"{0}" must be an instance of Platform'
@@ -64,16 +60,9 @@ def use_platform(new_platform):
try:
host = _PickleableCallable(new_platform)
-
- # Clear configuration and compiler caches
spack.config.CONFIG.clear_caches()
- spack.compilers._cache_config_files = []
-
yield new_platform
finally:
host = original_host_fn
-
- # Clear configuration and compiler caches
spack.config.CONFIG.clear_caches()
- spack.compilers._cache_config_files = []
diff --git a/lib/spack/spack/platforms/_functions.py b/lib/spack/spack/platforms/_functions.py
index d04f2587b0..80ff277d21 100644
--- a/lib/spack/spack/platforms/_functions.py
+++ b/lib/spack/spack/platforms/_functions.py
@@ -2,13 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import contextlib
-
import llnl.util.lang
-import spack.util.environment
-
-from .cray import Cray
from .darwin import Darwin
from .freebsd import FreeBSD
from .linux import Linux
@@ -16,7 +11,7 @@ from .test import Test
from .windows import Windows
#: List of all the platform classes known to Spack
-platforms = [Cray, Darwin, Linux, Windows, FreeBSD, Test]
+platforms = [Darwin, Linux, Windows, FreeBSD, Test]
@llnl.util.lang.memoized
@@ -58,14 +53,3 @@ def by_name(name):
"""
platform_cls = cls_by_name(name)
return platform_cls() if platform_cls else None
-
-
-@contextlib.contextmanager
-def prevent_cray_detection():
- """Context manager that prevents the detection of the Cray platform"""
- reset()
- try:
- with spack.util.environment.set_env(MODULEPATH=""):
- yield
- finally:
- reset()
diff --git a/lib/spack/spack/platforms/_platform.py b/lib/spack/spack/platforms/_platform.py
index c165cf9f33..8668958966 100644
--- a/lib/spack/spack/platforms/_platform.py
+++ b/lib/spack/spack/platforms/_platform.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from typing import Optional
+import archspec.cpu
+
import llnl.util.lang
import spack.error
@@ -60,7 +62,7 @@ class Platform:
self.operating_sys = {}
self.name = name
- def add_target(self, name, target):
+ def add_target(self, name: str, target: archspec.cpu.Microarchitecture) -> None:
"""Used by the platform specific subclass to list available targets.
Raises an error if the platform specifies a name
that is reserved by spack as an alias.
@@ -70,6 +72,10 @@ class Platform:
raise ValueError(msg.format(name))
self.targets[name] = target
+ def _add_archspec_targets(self):
+ for name, microarchitecture in archspec.cpu.TARGETS.items():
+ self.add_target(name, microarchitecture)
+
def target(self, name):
"""This is a getter method for the target dictionary
that handles defaulting based on the values provided by default,
diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py
index 180af15435..8fc69ac12e 100644
--- a/lib/spack/spack/platforms/cray.py
+++ b/lib/spack/spack/platforms/cray.py
@@ -2,248 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
import os.path
-import platform
-import re
-
-import archspec.cpu
-
-import llnl.util.tty as tty
-
-import spack.target
-import spack.version
-from spack.operating_systems.cray_backend import CrayBackend
-from spack.operating_systems.cray_frontend import CrayFrontend
-from spack.paths import build_env_path
-from spack.util.executable import Executable
-from spack.util.module_cmd import module
-
-from ._platform import NoPlatformError, Platform
-
-_craype_name_to_target_name = {
- "x86-cascadelake": "cascadelake",
- "x86-naples": "zen",
- "x86-rome": "zen2",
- "x86-milan": "zen3",
- "x86-skylake": "skylake_avx512",
- "mic-knl": "mic_knl",
- "interlagos": "bulldozer",
- "abudhabi": "piledriver",
-}
-
-_ex_craype_dir = "/opt/cray/pe/cpe"
-_xc_craype_dir = "/opt/cray/pe/cdt"
def slingshot_network():
return os.path.exists("/opt/cray/pe") and (
os.path.exists("/lib64/libcxi.so") or os.path.exists("/usr/lib64/libcxi.so")
)
-
-
-def _target_name_from_craype_target_name(name):
- return _craype_name_to_target_name.get(name, name)
-
-
-class Cray(Platform):
- priority = 10
-
- def __init__(self):
- """Create a Cray system platform.
-
- Target names should use craype target names but not include the
- 'craype-' prefix. Uses first viable target from:
- self
- envars [SPACK_FRONT_END, SPACK_BACK_END]
- configuration file "targets.yaml" with keys 'front_end', 'back_end'
- scanning /etc/bash/bashrc.local for back_end only
- """
- super().__init__("cray")
-
- # Make all craype targets available.
- for target in self._avail_targets():
- name = _target_name_from_craype_target_name(target)
- self.add_target(name, spack.target.Target(name, "craype-%s" % target))
-
- self.back_end = os.environ.get("SPACK_BACK_END", self._default_target_from_env())
- self.default = self.back_end
- if self.back_end not in self.targets:
- # We didn't find a target module for the backend
- raise NoPlatformError()
-
- # Setup frontend targets
- for name in archspec.cpu.TARGETS:
- if name not in self.targets:
- self.add_target(name, spack.target.Target(name))
- self.front_end = os.environ.get("SPACK_FRONT_END", archspec.cpu.host().name)
- if self.front_end not in self.targets:
- self.add_target(self.front_end, spack.target.Target(self.front_end))
-
- front_distro = CrayFrontend()
- back_distro = CrayBackend()
-
- self.default_os = str(back_distro)
- self.back_os = self.default_os
- self.front_os = str(front_distro)
-
- self.add_operating_system(self.back_os, back_distro)
- if self.front_os != self.back_os:
- self.add_operating_system(self.front_os, front_distro)
-
- def setup_platform_environment(self, pkg, env):
- """Change the linker to default dynamic to be more
- similar to linux/standard linker behavior
- """
- # Unload these modules to prevent any silent linking or unnecessary
- # I/O profiling in the case of darshan.
- modules_to_unload = ["cray-mpich", "darshan", "cray-libsci", "altd"]
- for mod in modules_to_unload:
- module("unload", mod)
-
- env.set("CRAYPE_LINK_TYPE", "dynamic")
- cray_wrapper_names = os.path.join(build_env_path, "cray")
-
- if os.path.isdir(cray_wrapper_names):
- env.prepend_path("PATH", cray_wrapper_names)
- env.prepend_path("SPACK_ENV_PATH", cray_wrapper_names)
-
- # Makes spack installed pkg-config work on Crays
- env.append_path("PKG_CONFIG_PATH", "/usr/lib64/pkgconfig")
- env.append_path("PKG_CONFIG_PATH", "/usr/local/lib64/pkgconfig")
-
- # CRAY_LD_LIBRARY_PATH is used at build time by the cray compiler
- # wrappers to augment LD_LIBRARY_PATH. This is to avoid long load
- # times at runtime. This behavior is not always respected on cray
- # "cluster" systems, so we reproduce it here.
- if os.environ.get("CRAY_LD_LIBRARY_PATH"):
- env.prepend_path("LD_LIBRARY_PATH", os.environ["CRAY_LD_LIBRARY_PATH"])
-
- @classmethod
- def craype_type_and_version(cls):
- if os.path.isdir(_ex_craype_dir):
- craype_dir = _ex_craype_dir
- craype_type = "EX"
- elif os.path.isdir(_xc_craype_dir):
- craype_dir = _xc_craype_dir
- craype_type = "XC"
- else:
- return (None, None)
-
- # Take the default version from known symlink path
- default_path = os.path.join(craype_dir, "default")
- if os.path.islink(default_path):
- version = spack.version.Version(os.readlink(default_path))
- return (craype_type, version)
-
- # If no default version, sort available versions and return latest
- versions_available = [spack.version.Version(v) for v in os.listdir(craype_dir)]
- versions_available.sort(reverse=True)
- if not versions_available:
- return (craype_type, None)
- return (craype_type, versions_available[0])
-
- @classmethod
- def detect(cls):
- """
- Detect whether this system requires CrayPE module support.
-
- Systems with newer CrayPE (21.10 for EX systems, future work for CS and
- XC systems) have compilers and MPI wrappers that can be used directly
- by path. These systems are considered ``linux`` platforms.
-
- For systems running an older CrayPE, we detect the Cray platform based
- on the availability through `module` of the Cray programming
- environment. If this environment is available, we can use it to find
- compilers, target modules, etc. If the Cray programming environment is
- not available via modules, then we will treat it as a standard linux
- system, as the Cray compiler wrappers and other components of the Cray
- programming environment are irrelevant without module support.
- """
- craype_type, craype_version = cls.craype_type_and_version()
- if craype_type == "EX" and craype_version >= spack.version.Version("21.10"):
- return False
- return "opt/cray" in os.environ.get("MODULEPATH", "")
-
- def _default_target_from_env(self):
- """Set and return the default CrayPE target loaded in a clean login
- session.
-
- A bash subshell is launched with a wiped environment and the list of
- loaded modules is parsed for the first acceptable CrayPE target.
- """
- # env -i /bin/bash -lc echo $CRAY_CPU_TARGET 2> /dev/null
- if getattr(self, "default", None) is None:
- bash = Executable("/bin/bash")
- output = bash(
- "--norc",
- "--noprofile",
- "-lc",
- "echo $CRAY_CPU_TARGET",
- env={"TERM": os.environ.get("TERM", "")},
- output=str,
- error=os.devnull,
- )
-
- default_from_module = "".join(output.split()) # rm all whitespace
- if default_from_module:
- tty.debug("Found default module:%s" % default_from_module)
- return default_from_module
- else:
- front_end = archspec.cpu.host()
- # Look for the frontend architecture or closest ancestor
- # available in cray target modules
- avail = [_target_name_from_craype_target_name(x) for x in self._avail_targets()]
- for front_end_possibility in [front_end] + front_end.ancestors:
- if front_end_possibility.name in avail:
- tty.debug("using front-end architecture or available ancestor")
- return front_end_possibility.name
- else:
- tty.debug("using platform.machine as default")
- return platform.machine()
-
- def _avail_targets(self):
- """Return a list of available CrayPE CPU targets."""
-
- def modules_in_output(output):
- """Returns a list of valid modules parsed from modulecmd output"""
- return [i for i in re.split(r"\s\s+|\n", output)]
-
- def target_names_from_modules(modules):
- # Craype- module prefixes that are not valid CPU targets.
- targets = []
- for mod in modules:
- if "craype-" in mod:
- name = mod[7:]
- name = name.split()[0]
- _n = name.replace("-", "_") # test for mic-knl/mic_knl
- is_target_name = name in archspec.cpu.TARGETS or _n in archspec.cpu.TARGETS
- is_cray_target_name = name in _craype_name_to_target_name
- if is_target_name or is_cray_target_name:
- targets.append(name)
-
- return targets
-
- def modules_from_listdir():
- craype_default_path = "/opt/cray/pe/craype/default/modulefiles"
- if os.path.isdir(craype_default_path):
- return os.listdir(craype_default_path)
- return []
-
- if getattr(self, "_craype_targets", None) is None:
- strategies = [
- lambda: modules_in_output(module("avail", "-t", "craype-")),
- modules_from_listdir,
- ]
- for available_craype_modules in strategies:
- craype_modules = available_craype_modules()
- craype_targets = target_names_from_modules(craype_modules)
- if craype_targets:
- self._craype_targets = craype_targets
- break
- else:
- # If nothing is found add platform.machine()
- # to avoid Spack erroring out
- self._craype_targets = [platform.machine()]
-
- return self._craype_targets
diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py
index 1b7a5927f4..7ea6a09c58 100644
--- a/lib/spack/spack/platforms/darwin.py
+++ b/lib/spack/spack/platforms/darwin.py
@@ -7,7 +7,6 @@ import platform as py_platform
import archspec.cpu
-import spack.target
from spack.operating_systems.mac_os import MacOs
from spack.version import Version
@@ -21,9 +20,7 @@ class Darwin(Platform):
def __init__(self):
super().__init__("darwin")
-
- for name in archspec.cpu.TARGETS:
- self.add_target(name, spack.target.Target(name))
+ self._add_archspec_targets()
self.default = archspec.cpu.host().name
self.front_end = self.default
diff --git a/lib/spack/spack/platforms/freebsd.py b/lib/spack/spack/platforms/freebsd.py
index 4485550789..af9b1a0934 100644
--- a/lib/spack/spack/platforms/freebsd.py
+++ b/lib/spack/spack/platforms/freebsd.py
@@ -6,7 +6,6 @@ import platform
import archspec.cpu
-import spack.target
from spack.operating_systems.freebsd import FreeBSDOs
from ._platform import Platform
@@ -18,8 +17,7 @@ class FreeBSD(Platform):
def __init__(self):
super().__init__("freebsd")
- for name in archspec.cpu.TARGETS:
- self.add_target(name, spack.target.Target(name))
+ self._add_archspec_targets()
# Get specific default
self.default = archspec.cpu.host().name
diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py
index 2be5b51cb2..aede37d868 100644
--- a/lib/spack/spack/platforms/linux.py
+++ b/lib/spack/spack/platforms/linux.py
@@ -6,7 +6,6 @@ import platform
import archspec.cpu
-import spack.target
from spack.operating_systems.linux_distro import LinuxDistro
from ._platform import Platform
@@ -18,8 +17,7 @@ class Linux(Platform):
def __init__(self):
super().__init__("linux")
- for name in archspec.cpu.TARGETS:
- self.add_target(name, spack.target.Target(name))
+ self._add_archspec_targets()
# Get specific default
self.default = archspec.cpu.host().name
diff --git a/lib/spack/spack/platforms/test.py b/lib/spack/spack/platforms/test.py
index 9ead66ab27..8633efc7cb 100644
--- a/lib/spack/spack/platforms/test.py
+++ b/lib/spack/spack/platforms/test.py
@@ -4,8 +4,9 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import platform
+import archspec.cpu
+
import spack.operating_systems
-import spack.target
from ._platform import Platform
@@ -32,8 +33,8 @@ class Test(Platform):
def __init__(self, name=None):
name = name or "test"
super().__init__(name)
- self.add_target(self.default, spack.target.Target(self.default))
- self.add_target(self.front_end, spack.target.Target(self.front_end))
+ self.add_target(self.default, archspec.cpu.TARGETS[self.default])
+ self.add_target(self.front_end, archspec.cpu.TARGETS[self.front_end])
self.add_operating_system(
self.default_os, spack.operating_systems.OperatingSystem("debian", 6)
diff --git a/lib/spack/spack/platforms/windows.py b/lib/spack/spack/platforms/windows.py
index c00382e198..8cc89b4b19 100755
--- a/lib/spack/spack/platforms/windows.py
+++ b/lib/spack/spack/platforms/windows.py
@@ -7,7 +7,6 @@ import platform
import archspec.cpu
-import spack.target
from spack.operating_systems.windows_os import WindowsOs
from ._platform import Platform
@@ -18,9 +17,7 @@ class Windows(Platform):
def __init__(self):
super().__init__("windows")
-
- for name in archspec.cpu.TARGETS:
- self.add_target(name, spack.target.Target(name))
+ self._add_archspec_targets()
self.default = archspec.cpu.host().name
self.front_end = self.default
diff --git a/lib/spack/spack/projections.py b/lib/spack/spack/projections.py
index b11c9c2a6d..acdb57b49c 100644
--- a/lib/spack/spack/projections.py
+++ b/lib/spack/spack/projections.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.util.path
+
def get_projection(projections, spec):
"""
@@ -11,7 +13,7 @@ def get_projection(projections, spec):
all_projection = None
for spec_like, projection in projections.items():
if spec.satisfies(spec_like):
- return projection
+ return spack.util.path.substitute_path_variables(projection)
elif spec_like == "all":
- all_projection = projection
+ all_projection = spack.util.path.substitute_path_variables(projection)
return all_projection
diff --git a/lib/spack/spack/provider_index.py b/lib/spack/spack/provider_index.py
index a59cb1be80..29c32ce1b5 100644
--- a/lib/spack/spack/provider_index.py
+++ b/lib/spack/spack/provider_index.py
@@ -128,8 +128,8 @@ class ProviderIndex(_IndexBase):
assert not self.repository.is_virtual_safe(spec.name), msg
pkg_provided = self.repository.get_pkg_class(spec.name).provided
- for provided_spec, provider_specs in pkg_provided.items():
- for provider_spec_readonly in provider_specs:
+ for provider_spec_readonly, provided_specs in pkg_provided.items():
+ for provided_spec in provided_specs:
# TODO: fix this comment.
# We want satisfaction other than flags
provider_spec = provider_spec_readonly.copy()
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index 6fcb4e98bc..dda17a128e 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -6,7 +6,9 @@ import collections
import itertools
import os
import re
+import sys
from collections import OrderedDict
+from typing import List, Optional
import macholib.mach_o
import macholib.MachO
@@ -15,20 +17,16 @@ import llnl.util.filesystem as fs
import llnl.util.lang
import llnl.util.tty as tty
from llnl.util.lang import memoized
-from llnl.util.symlink import symlink
+from llnl.util.symlink import readlink, symlink
-import spack.paths
-import spack.platforms
-import spack.repo
-import spack.spec
+import spack.error
import spack.store
import spack.util.elf as elf
import spack.util.executable as executable
+import spack.util.filesystem as ssys
from .relocate_text import BinaryFilePrefixReplacer, TextFilePrefixReplacer
-is_macos = str(spack.platforms.real_host()) == "darwin"
-
class InstallRootStringError(spack.error.SpackError):
def __init__(self, file_path, root_path):
@@ -47,17 +45,15 @@ class InstallRootStringError(spack.error.SpackError):
@memoized
-def _patchelf():
+def _patchelf() -> Optional[executable.Executable]:
"""Return the full path to the patchelf binary, if available, else None."""
import spack.bootstrap
- if is_macos:
+ if sys.platform == "darwin":
return None
with spack.bootstrap.ensure_bootstrap_configuration():
- patchelf = spack.bootstrap.ensure_patchelf_in_path_or_raise()
-
- return patchelf.path
+ return spack.bootstrap.ensure_patchelf_in_path_or_raise()
def _elf_rpaths_for(path):
@@ -210,23 +206,33 @@ def macho_find_paths(orig_rpaths, deps, idpath, old_layout_root, prefix_to_prefi
paths_to_paths dictionary which maps all of the old paths to new paths
"""
paths_to_paths = dict()
+ # Sort from longest path to shortest, to ensure we try /foo/bar/baz before /foo/bar
+ prefix_iteration_order = sorted(prefix_to_prefix, key=len, reverse=True)
for orig_rpath in orig_rpaths:
if orig_rpath.startswith(old_layout_root):
- for old_prefix, new_prefix in prefix_to_prefix.items():
+ for old_prefix in prefix_iteration_order:
+ new_prefix = prefix_to_prefix[old_prefix]
if orig_rpath.startswith(old_prefix):
new_rpath = re.sub(re.escape(old_prefix), new_prefix, orig_rpath)
paths_to_paths[orig_rpath] = new_rpath
+ break
else:
paths_to_paths[orig_rpath] = orig_rpath
if idpath:
- for old_prefix, new_prefix in prefix_to_prefix.items():
+ for old_prefix in prefix_iteration_order:
+ new_prefix = prefix_to_prefix[old_prefix]
if idpath.startswith(old_prefix):
paths_to_paths[idpath] = re.sub(re.escape(old_prefix), new_prefix, idpath)
+ break
+
for dep in deps:
- for old_prefix, new_prefix in prefix_to_prefix.items():
+ for old_prefix in prefix_iteration_order:
+ new_prefix = prefix_to_prefix[old_prefix]
if dep.startswith(old_prefix):
paths_to_paths[dep] = re.sub(re.escape(old_prefix), new_prefix, dep)
+ break
+
if dep.startswith("@"):
paths_to_paths[dep] = dep
@@ -270,45 +276,19 @@ def modify_macho_object(cur_path, rpaths, deps, idpath, paths_to_paths):
# Deduplicate and flatten
args = list(itertools.chain.from_iterable(llnl.util.lang.dedupe(args)))
+ install_name_tool = executable.Executable("install_name_tool")
if args:
- args.append(str(cur_path))
- install_name_tool = executable.Executable("install_name_tool")
- install_name_tool(*args)
-
- return
-
-
-def modify_object_macholib(cur_path, paths_to_paths):
- """
- This function is used when install machO buildcaches on linux by
- rewriting mach-o loader commands for dependency library paths of
- mach-o binaries and the id path for mach-o libraries.
- Rewritting of rpaths is handled by replace_prefix_bin.
- Inputs
- mach-o binary to be modified
- dictionary mapping paths in old install layout to new install layout
- """
-
- dll = macholib.MachO.MachO(cur_path)
- dll.rewriteLoadCommands(paths_to_paths.get)
-
- try:
- f = open(dll.filename, "rb+")
- for header in dll.headers:
- f.seek(0)
- dll.write(f)
- f.seek(0, 2)
- f.flush()
- f.close()
- except Exception:
- pass
-
- return
+ with fs.edit_in_place_through_temporary_file(cur_path) as temp_path:
+ install_name_tool(*args, temp_path)
def macholib_get_paths(cur_path):
"""Get rpaths, dependent libraries, and library id of mach-o objects."""
- headers = macholib.MachO.MachO(cur_path).headers
+ headers = []
+ try:
+ headers = macholib.MachO.MachO(cur_path).headers
+ except ValueError:
+ pass
if not headers:
tty.warn("Failed to read Mach-O headers: {0}".format(cur_path))
commands = []
@@ -340,31 +320,34 @@ def macholib_get_paths(cur_path):
return (rpaths, deps, ident)
-def _set_elf_rpaths(target, rpaths):
- """Replace the original RPATH of the target with the paths passed
- as arguments.
+def _set_elf_rpaths_and_interpreter(
+ target: str, rpaths: List[str], interpreter: Optional[str] = None
+) -> Optional[str]:
+ """Replace the original RPATH of the target with the paths passed as arguments.
Args:
target: target executable. Must be an ELF object.
rpaths: paths to be set in the RPATH
+ interpreter: optionally set the interpreter
Returns:
- A string concatenating the stdout and stderr of the call
- to ``patchelf`` if it was invoked
+ A string concatenating the stdout and stderr of the call to ``patchelf`` if it was invoked
"""
# Join the paths using ':' as a separator
rpaths_str = ":".join(rpaths)
- patchelf, output = executable.Executable(_patchelf()), None
try:
+ # TODO: error handling is not great here?
# TODO: revisit the use of --force-rpath as it might be conditional
# TODO: if we want to support setting RUNPATH from binary packages
- patchelf_args = ["--force-rpath", "--set-rpath", rpaths_str, target]
- output = patchelf(*patchelf_args, output=str, error=str)
+ args = ["--force-rpath", "--set-rpath", rpaths_str]
+ if interpreter:
+ args.extend(["--set-interpreter", interpreter])
+ args.append(target)
+ return _patchelf()(*args, output=str, error=str)
except executable.ProcessError as e:
- msg = "patchelf --force-rpath --set-rpath {0} failed with error {1}"
- tty.warn(msg.format(target, e))
- return output
+ tty.warn(str(e))
+ return None
def needs_binary_relocation(m_type, m_subtype):
@@ -417,10 +400,7 @@ def relocate_macho_binaries(
# normalized paths
rel_to_orig = macho_make_paths_normal(orig_path_name, rpaths, deps, idpath)
# replace the relativized paths with normalized paths
- if is_macos:
- modify_macho_object(path_name, rpaths, deps, idpath, rel_to_orig)
- else:
- modify_object_macholib(path_name, rel_to_orig)
+ modify_macho_object(path_name, rpaths, deps, idpath, rel_to_orig)
# get the normalized paths in the mach-o binary
rpaths, deps, idpath = macholib_get_paths(path_name)
# get the mapping of paths in old prefix to path in new prefix
@@ -428,10 +408,7 @@ def relocate_macho_binaries(
rpaths, deps, idpath, old_layout_root, prefix_to_prefix
)
# replace the old paths with new paths
- if is_macos:
- modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
- else:
- modify_object_macholib(path_name, paths_to_paths)
+ modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
# get the new normalized path in the mach-o binary
rpaths, deps, idpath = macholib_get_paths(path_name)
# get the mapping of paths to relative paths in the new prefix
@@ -439,10 +416,7 @@ def relocate_macho_binaries(
path_name, new_layout_root, rpaths, deps, idpath
)
# replace the new paths with relativized paths in the new prefix
- if is_macos:
- modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
- else:
- modify_object_macholib(path_name, paths_to_paths)
+ modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
else:
# get the paths in the old prefix
rpaths, deps, idpath = macholib_get_paths(path_name)
@@ -451,10 +425,7 @@ def relocate_macho_binaries(
rpaths, deps, idpath, old_layout_root, prefix_to_prefix
)
# replace the old paths with new paths
- if is_macos:
- modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
- else:
- modify_object_macholib(path_name, paths_to_paths)
+ modify_macho_object(path_name, rpaths, deps, idpath, paths_to_paths)
def _transform_rpaths(orig_rpaths, orig_root, new_prefixes):
@@ -501,10 +472,12 @@ def new_relocate_elf_binaries(binaries, prefix_to_prefix):
for path in binaries:
try:
- elf.replace_rpath_in_place_or_raise(path, prefix_to_prefix)
- except elf.ElfDynamicSectionUpdateFailed as e:
- # Fall back to the old `patchelf --set-rpath` method.
- _set_elf_rpaths(path, e.new.decode("utf-8").split(":"))
+ elf.substitute_rpath_and_pt_interp_in_place_or_raise(path, prefix_to_prefix)
+ except elf.ElfCStringUpdatesFailed as e:
+ # Fall back to `patchelf --set-rpath ... --set-interpreter ...`
+ rpaths = e.rpath.new_value.decode("utf-8").split(":") if e.rpath else []
+ interpreter = e.pt_interp.new_value.decode("utf-8") if e.pt_interp else None
+ _set_elf_rpaths_and_interpreter(path, rpaths=rpaths, interpreter=interpreter)
def relocate_elf_binaries(
@@ -546,10 +519,10 @@ def relocate_elf_binaries(
new_rpaths = _make_relative(new_binary, new_root, new_norm_rpaths)
# check to see if relative rpaths are changed before rewriting
if sorted(new_rpaths) != sorted(orig_rpaths):
- _set_elf_rpaths(new_binary, new_rpaths)
+ _set_elf_rpaths_and_interpreter(new_binary, new_rpaths)
else:
new_rpaths = _transform_rpaths(orig_rpaths, orig_root, new_prefixes)
- _set_elf_rpaths(new_binary, new_rpaths)
+ _set_elf_rpaths_and_interpreter(new_binary, new_rpaths)
def make_link_relative(new_links, orig_links):
@@ -561,7 +534,7 @@ def make_link_relative(new_links, orig_links):
orig_links (list): original links
"""
for new_link, orig_link in zip(new_links, orig_links):
- target = os.readlink(orig_link)
+ target = readlink(orig_link)
relative_target = os.path.relpath(target, os.path.dirname(orig_link))
os.unlink(new_link)
symlink(relative_target, new_link)
@@ -571,7 +544,7 @@ def make_macho_binaries_relative(cur_path_names, orig_path_names, old_layout_roo
"""
Replace old RPATHs with paths relative to old_dir in binary files
"""
- if not is_macos:
+ if not sys.platform == "darwin":
return
for cur_path, orig_path in zip(cur_path_names, orig_path_names):
@@ -596,7 +569,7 @@ def make_elf_binaries_relative(new_binaries, orig_binaries, orig_layout_root):
orig_rpaths = _elf_rpaths_for(new_binary)
if orig_rpaths:
new_rpaths = _make_relative(orig_binary, orig_layout_root, orig_rpaths)
- _set_elf_rpaths(new_binary, new_rpaths)
+ _set_elf_rpaths_and_interpreter(new_binary, new_rpaths)
def warn_if_link_cant_be_relocated(link, target):
@@ -609,7 +582,7 @@ def relocate_links(links, prefix_to_prefix):
"""Relocate links to a new install prefix."""
regex = re.compile("|".join(re.escape(p) for p in prefix_to_prefix.keys()))
for link in links:
- old_target = os.readlink(link)
+ old_target = readlink(link)
match = regex.match(old_target)
# No match.
@@ -659,7 +632,7 @@ def is_binary(filename):
Returns:
True or False
"""
- m_type, _ = fs.mime_type(filename)
+ m_type, _ = ssys.mime_type(filename)
msg = "[{0}] -> ".format(filename)
if m_type == "application":
@@ -687,7 +660,7 @@ def fixup_macos_rpath(root, filename):
True if fixups were applied, else False
"""
abspath = os.path.join(root, filename)
- if fs.mime_type(abspath) != ("application", "x-mach-binary"):
+ if ssys.mime_type(abspath) != ("application", "x-mach-binary"):
return False
# Get Mach-O header commands
@@ -745,8 +718,8 @@ def fixup_macos_rpath(root, filename):
# No fixes needed
return False
- args.append(abspath)
- executable.Executable("install_name_tool")(*args)
+ with fs.edit_in_place_through_temporary_file(abspath) as temp_path:
+ executable.Executable("install_name_tool")(*args, temp_path)
return True
diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py
index c4aa991b5d..502aa4734b 100644
--- a/lib/spack/spack/repo.py
+++ b/lib/spack/spack/repo.py
@@ -25,7 +25,8 @@ import sys
import traceback
import types
import uuid
-from typing import Any, Dict, List, Tuple, Union
+import warnings
+from typing import Any, Dict, Generator, List, Optional, Set, Tuple, Type, Union
import llnl.path
import llnl.util.filesystem as fs
@@ -40,6 +41,7 @@ import spack.patch
import spack.provider_index
import spack.spec
import spack.tag
+import spack.tengine
import spack.util.file_cache
import spack.util.git
import spack.util.naming as nm
@@ -80,43 +82,6 @@ def namespace_from_fullname(fullname):
return namespace
-class _PrependFileLoader(importlib.machinery.SourceFileLoader):
- def __init__(self, fullname, path, prepend=None):
- super(_PrependFileLoader, self).__init__(fullname, path)
- self.prepend = prepend
-
- def path_stats(self, path):
- stats = super(_PrependFileLoader, self).path_stats(path)
- if self.prepend:
- stats["size"] += len(self.prepend) + 1
- return stats
-
- def get_data(self, path):
- data = super(_PrependFileLoader, self).get_data(path)
- if path != self.path or self.prepend is None:
- return data
- else:
- return self.prepend.encode() + b"\n" + data
-
-
-class RepoLoader(_PrependFileLoader):
- """Loads a Python module associated with a package in specific repository"""
-
- #: Code in ``_package_prepend`` is prepended to imported packages.
- #:
- #: Spack packages are expected to call `from spack.package import *`
- #: themselves, but we are allowing a deprecation period before breaking
- #: external repos that don't do this yet.
- _package_prepend = "from spack.package import *"
-
- def __init__(self, fullname, repo, package_name):
- self.repo = repo
- self.package_name = package_name
- self.package_py = repo.filename_for_package_name(package_name)
- self.fullname = fullname
- super().__init__(self.fullname, self.package_py, prepend=self._package_prepend)
-
-
class SpackNamespaceLoader:
def create_module(self, spec):
return SpackNamespace(spec.name)
@@ -126,11 +91,35 @@ class SpackNamespaceLoader:
class ReposFinder:
- """MetaPathFinder class that loads a Python module corresponding to a Spack package
+ """MetaPathFinder class that loads a Python module corresponding to a Spack package.
- Return a loader based on the inspection of the current global repository list.
+ Returns a loader based on the inspection of the current repository list.
"""
+ def __init__(self):
+ self._repo_init = _path
+ self._repo = None
+
+ @property
+ def current_repository(self):
+ if self._repo is None:
+ self._repo = self._repo_init()
+ return self._repo
+
+ @current_repository.setter
+ def current_repository(self, value):
+ self._repo = value
+
+ @contextlib.contextmanager
+ def switch_repo(self, substitute: "RepoType"):
+ """Switch the current repository list for the duration of the context manager."""
+ old = self._repo
+ try:
+ self._repo = substitute
+ yield
+ finally:
+ self._repo = old
+
def find_spec(self, fullname, python_path, target=None):
# "target" is not None only when calling importlib.reload()
if target is not None:
@@ -149,15 +138,21 @@ class ReposFinder:
# namespaces are added to repo, and package modules are leaves.
namespace, dot, module_name = fullname.rpartition(".")
- # If it's a module in some repo, or if it is the repo's
- # namespace, let the repo handle it.
- for repo in PATH.repos:
+ # If it's a module in some repo, or if it is the repo's namespace, let the repo handle it.
+ is_repo_path = isinstance(self.current_repository, RepoPath)
+ if is_repo_path:
+ repos = self.current_repository.repos
+ else:
+ repos = [self.current_repository]
+
+ for repo in repos:
# We are using the namespace of the repo and the repo contains the package
if namespace == repo.full_namespace:
# With 2 nested conditionals we can call "repo.real_name" only once
package_name = repo.real_name(module_name)
if package_name:
- return RepoLoader(fullname, repo, package_name)
+ module_path = repo.filename_for_package_name(package_name)
+ return importlib.machinery.SourceFileLoader(fullname, module_path)
# We are importing a full namespace like 'spack.pkg.builtin'
if fullname == repo.full_namespace:
@@ -165,7 +160,7 @@ class ReposFinder:
# No repo provides the namespace, but it is a valid prefix of
# something in the RepoPath.
- if PATH.by_namespace.is_prefix(fullname):
+ if is_repo_path and self.current_repository.by_namespace.is_prefix(fullname):
return SpackNamespaceLoader()
return None
@@ -186,9 +181,9 @@ NOT_PROVIDED = object()
def packages_path():
"""Get the test repo if it is active, otherwise the builtin repo."""
try:
- return spack.repo.PATH.get_repo("builtin.mock").packages_path
- except spack.repo.UnknownNamespaceError:
- return spack.repo.PATH.get_repo("builtin").packages_path
+ return PATH.get_repo("builtin.mock").packages_path
+ except UnknownNamespaceError:
+ return PATH.get_repo("builtin").packages_path
class GitExe:
@@ -241,7 +236,7 @@ def get_all_package_diffs(type, rev1="HEAD^1", rev2="HEAD"):
Arguments:
- type (str): String containing one or more of 'A', 'B', 'C'
+ type (str): String containing one or more of 'A', 'R', 'C'
rev1 (str): Revision to compare against, default is 'HEAD^'
rev2 (str): Revision to compare to rev1, default is 'HEAD'
@@ -264,7 +259,7 @@ def get_all_package_diffs(type, rev1="HEAD^1", rev2="HEAD"):
lines = [] if not out else re.split(r"\s+", out)
changed = set()
for path in lines:
- pkg_name, _, _ = path.partition(os.sep)
+ pkg_name, _, _ = path.partition("/")
if pkg_name not in added and pkg_name not in removed:
changed.add(pkg_name)
@@ -284,7 +279,7 @@ def add_package_to_git_stage(packages):
git = GitExe()
for pkg_name in packages:
- filename = spack.repo.PATH.filename_for_package_name(pkg_name)
+ filename = PATH.filename_for_package_name(pkg_name)
if not os.path.isfile(filename):
tty.die("No such package: %s. Path does not exist:" % pkg_name, filename)
@@ -335,9 +330,9 @@ class SpackNamespace(types.ModuleType):
def __getattr__(self, name):
"""Getattr lazily loads modules if they're not already loaded."""
- submodule = self.__package__ + "." + name
+ submodule = f"{self.__package__}.{name}"
try:
- setattr(self, name, __import__(submodule))
+ setattr(self, name, importlib.import_module(submodule))
except ImportError:
msg = "'{0}' object has no attribute {1}"
raise AttributeError(msg.format(type(self), name))
@@ -490,7 +485,7 @@ class TagIndexer(Indexer):
self.index = spack.tag.TagIndex.from_json(stream, self.repository)
def update(self, pkg_fullname):
- self.index.update_package(pkg_fullname)
+ self.index.update_package(pkg_fullname.split(".")[-1])
def write(self, stream):
self.index.to_json(stream)
@@ -645,33 +640,44 @@ class RepoPath:
repository.
Args:
- repos (list): list Repo objects or paths to put in this RepoPath
+ repos: list Repo objects or paths to put in this RepoPath
+ cache: file cache associated with this repository
+ overrides: dict mapping package name to class attribute overrides for that package
"""
- def __init__(self, *repos, **kwargs):
- cache = kwargs.get("cache", spack.caches.MISC_CACHE)
- self.repos = []
+ def __init__(
+ self,
+ *repos: Union[str, "Repo"],
+ cache: Optional[spack.util.file_cache.FileCache],
+ overrides: Optional[Dict[str, Any]] = None,
+ ) -> None:
+ self.repos: List[Repo] = []
self.by_namespace = nm.NamespaceTrie()
-
- self._provider_index = None
- self._patch_index = None
- self._tag_index = None
+ self._provider_index: Optional[spack.provider_index.ProviderIndex] = None
+ self._patch_index: Optional[spack.patch.PatchCache] = None
+ self._tag_index: Optional[spack.tag.TagIndex] = None
# Add each repo to this path.
for repo in repos:
try:
if isinstance(repo, str):
- repo = Repo(repo, cache=cache)
+ assert cache is not None, "cache must hold a value, when repo is a string"
+ repo = Repo(repo, cache=cache, overrides=overrides)
+ repo.finder(self)
self.put_last(repo)
except RepoError as e:
tty.warn(
- "Failed to initialize repository: '%s'." % repo,
+ f"Failed to initialize repository: '{repo}'.",
e.message,
"To remove the bad repository, run this command:",
- " spack repo rm %s" % repo,
+ f" spack repo rm {repo}",
)
- def put_first(self, repo):
+ def ensure_unwrapped(self) -> "RepoPath":
+ """Ensure we unwrap this object from any dynamic wrapper (like Singleton)"""
+ return self
+
+ def put_first(self, repo: "Repo") -> None:
"""Add repo first in the search path."""
if isinstance(repo, RepoPath):
for r in reversed(repo.repos):
@@ -699,110 +705,95 @@ class RepoPath:
if repo in self.repos:
self.repos.remove(repo)
- def get_repo(self, namespace, default=NOT_PROVIDED):
- """Get a repository by namespace.
-
- Arguments:
-
- namespace:
-
- Look up this namespace in the RepoPath, and return it if found.
-
- Optional Arguments:
-
- default:
-
- If default is provided, return it when the namespace
- isn't found. If not, raise an UnknownNamespaceError.
- """
+ def get_repo(self, namespace: str) -> "Repo":
+ """Get a repository by namespace."""
full_namespace = python_package_for_repo(namespace)
if full_namespace not in self.by_namespace:
- if default == NOT_PROVIDED:
- raise UnknownNamespaceError(namespace)
- return default
+ raise UnknownNamespaceError(namespace)
return self.by_namespace[full_namespace]
- def first_repo(self):
+ def first_repo(self) -> Optional["Repo"]:
"""Get the first repo in precedence order."""
return self.repos[0] if self.repos else None
@llnl.util.lang.memoized
- def _all_package_names(self, include_virtuals):
+ def _all_package_names_set(self, include_virtuals) -> Set[str]:
+ return {name for repo in self.repos for name in repo.all_package_names(include_virtuals)}
+
+ @llnl.util.lang.memoized
+ def _all_package_names(self, include_virtuals: bool) -> List[str]:
"""Return all unique package names in all repositories."""
- all_pkgs = set()
- for repo in self.repos:
- for name in repo.all_package_names(include_virtuals):
- all_pkgs.add(name)
- return sorted(all_pkgs, key=lambda n: n.lower())
+ return sorted(self._all_package_names_set(include_virtuals), key=lambda n: n.lower())
- def all_package_names(self, include_virtuals=False):
+ def all_package_names(self, include_virtuals: bool = False) -> List[str]:
return self._all_package_names(include_virtuals)
- def package_path(self, name):
+ def package_path(self, name: str) -> str:
"""Get path to package.py file for this repo."""
return self.repo_for_pkg(name).package_path(name)
- def all_package_paths(self):
+ def all_package_paths(self) -> Generator[str, None, None]:
for name in self.all_package_names():
yield self.package_path(name)
- def packages_with_tags(self, *tags, full=False):
- """Returns a list of packages matching any of the tags in input.
+ def packages_with_tags(self, *tags: str, full: bool = False) -> Set[str]:
+ """Returns a set of packages matching any of the tags in input.
Args:
full: if True the package names in the output are fully-qualified
"""
- r = set()
- for repo in self.repos:
- current = repo.packages_with_tags(*tags)
- if full:
- current = [f"{repo.namespace}.{x}" for x in current]
- r |= set(current)
- return sorted(r)
+ return {
+ f"{repo.namespace}.{pkg}" if full else pkg
+ for repo in self.repos
+ for pkg in repo.packages_with_tags(*tags)
+ }
- def all_package_classes(self):
+ def all_package_classes(self) -> Generator[Type["spack.package_base.PackageBase"], None, None]:
for name in self.all_package_names():
yield self.get_pkg_class(name)
@property
- def provider_index(self):
+ def provider_index(self) -> spack.provider_index.ProviderIndex:
"""Merged ProviderIndex from all Repos in the RepoPath."""
if self._provider_index is None:
self._provider_index = spack.provider_index.ProviderIndex(repository=self)
for repo in reversed(self.repos):
self._provider_index.merge(repo.provider_index)
-
return self._provider_index
@property
- def tag_index(self):
+ def tag_index(self) -> spack.tag.TagIndex:
"""Merged TagIndex from all Repos in the RepoPath."""
if self._tag_index is None:
self._tag_index = spack.tag.TagIndex(repository=self)
for repo in reversed(self.repos):
self._tag_index.merge(repo.tag_index)
-
return self._tag_index
@property
- def patch_index(self):
+ def patch_index(self) -> spack.patch.PatchCache:
"""Merged PatchIndex from all Repos in the RepoPath."""
if self._patch_index is None:
self._patch_index = spack.patch.PatchCache(repository=self)
for repo in reversed(self.repos):
self._patch_index.update(repo.patch_index)
-
return self._patch_index
@autospec
- def providers_for(self, vpkg_spec):
- providers = self.provider_index.providers_for(vpkg_spec)
+ def providers_for(self, virtual_spec: "spack.spec.Spec") -> List["spack.spec.Spec"]:
+ providers = [
+ spec
+ for spec in self.provider_index.providers_for(virtual_spec)
+ if spec.name in self._all_package_names_set(include_virtuals=False)
+ ]
if not providers:
- raise UnknownPackageError(vpkg_spec.fullname)
+ raise UnknownPackageError(virtual_spec.fullname)
return providers
@autospec
- def extensions_for(self, extendee_spec):
+ def extensions_for(
+ self, extendee_spec: "spack.spec.Spec"
+ ) -> List["spack.package_base.PackageBase"]:
return [
pkg_cls(spack.spec.Spec(pkg_cls.name))
for pkg_cls in self.all_package_classes()
@@ -813,7 +804,7 @@ class RepoPath:
"""Time a package file in this repo was last updated."""
return max(repo.last_mtime() for repo in self.repos)
- def repo_for_pkg(self, spec):
+ def repo_for_pkg(self, spec: Union[str, "spack.spec.Spec"]) -> "Repo":
"""Given a spec, get the repository for its package."""
# We don't @_autospec this function b/c it's called very frequently
# and we want to avoid parsing str's into Specs unnecessarily.
@@ -838,17 +829,20 @@ class RepoPath:
return repo
# If the package isn't in any repo, return the one with
- # highest precedence. This is for commands like `spack edit`
+ # highest precedence. This is for commands like `spack edit`
# that can operate on packages that don't exist yet.
- return self.first_repo()
+ selected = self.first_repo()
+ if selected is None:
+ raise UnknownPackageError(name)
+ return selected
- def get(self, spec):
+ def get(self, spec: "spack.spec.Spec") -> "spack.package_base.PackageBase":
"""Returns the package associated with the supplied spec."""
msg = "RepoPath.get can only be called on concrete specs"
assert isinstance(spec, spack.spec.Spec) and spec.concrete, msg
return self.repo_for_pkg(spec).get(spec)
- def get_pkg_class(self, pkg_name):
+ def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]:
"""Find a class for the spec's package and return the class object."""
return self.repo_for_pkg(pkg_name).get_pkg_class(pkg_name)
@@ -861,26 +855,26 @@ class RepoPath:
"""
return self.repo_for_pkg(spec).dump_provenance(spec, path)
- def dirname_for_package_name(self, pkg_name):
+ def dirname_for_package_name(self, pkg_name: str) -> str:
return self.repo_for_pkg(pkg_name).dirname_for_package_name(pkg_name)
- def filename_for_package_name(self, pkg_name):
+ def filename_for_package_name(self, pkg_name: str) -> str:
return self.repo_for_pkg(pkg_name).filename_for_package_name(pkg_name)
- def exists(self, pkg_name):
+ def exists(self, pkg_name: str) -> bool:
"""Whether package with the give name exists in the path's repos.
Note that virtual packages do not "exist".
"""
return any(repo.exists(pkg_name) for repo in self.repos)
- def _have_name(self, pkg_name):
+ def _have_name(self, pkg_name: str) -> bool:
have_name = pkg_name is not None
if have_name and not isinstance(pkg_name, str):
- raise ValueError("is_virtual(): expected package name, got %s" % type(pkg_name))
+ raise ValueError(f"is_virtual(): expected package name, got {type(pkg_name)}")
return have_name
- def is_virtual(self, pkg_name):
+ def is_virtual(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function use the provider index. If calling from a code block that
@@ -892,7 +886,7 @@ class RepoPath:
have_name = self._have_name(pkg_name)
return have_name and pkg_name in self.provider_index
- def is_virtual_safe(self, pkg_name):
+ def is_virtual_safe(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function doesn't use the provider index.
@@ -906,6 +900,16 @@ class RepoPath:
def __contains__(self, pkg_name):
return self.exists(pkg_name)
+ def marshal(self):
+ return (self.repos,)
+
+ @staticmethod
+ def unmarshal(repos):
+ return RepoPath(*repos, cache=None)
+
+ def __reduce__(self):
+ return RepoPath.unmarshal, self.marshal()
+
class Repo:
"""Class representing a package repository in the filesystem.
@@ -913,18 +917,28 @@ class Repo:
Each package repository must have a top-level configuration file
called `repo.yaml`.
- Currently, `repo.yaml` this must define:
+ Currently, `repo.yaml` must define:
`namespace`:
A Python namespace where the repository's packages should live.
+ `subdirectory`:
+ An optional subdirectory name where packages are placed
"""
- def __init__(self, root, cache=None):
+ def __init__(
+ self,
+ root: str,
+ *,
+ cache: spack.util.file_cache.FileCache,
+ overrides: Optional[Dict[str, Any]] = None,
+ ) -> None:
"""Instantiate a package repository from a filesystem path.
Args:
root: the root directory of the repository
+ cache: file cache associated with this repository
+ overrides: dict mapping package name to class attribute overrides for that package
"""
# Root directory, containing _repo.yaml and package dirs
# Allow roots to by spack-relative by starting with '$spack'
@@ -937,20 +951,20 @@ class Repo:
# Validate repository layout.
self.config_file = os.path.join(self.root, repo_config_name)
- check(os.path.isfile(self.config_file), "No %s found in '%s'" % (repo_config_name, root))
+ check(os.path.isfile(self.config_file), f"No {repo_config_name} found in '{root}'")
# Read configuration and validate namespace
config = self._read_config()
check(
"namespace" in config,
- "%s must define a namespace." % os.path.join(root, repo_config_name),
+ f"{os.path.join(root, repo_config_name)} must define a namespace.",
)
self.namespace = config["namespace"]
check(
re.match(r"[a-zA-Z][a-zA-Z0-9_.]+", self.namespace),
- ("Invalid namespace '%s' in repo '%s'. " % (self.namespace, self.root))
- + "Namespaces must be valid python identifiers separated by '.'",
+ f"Invalid namespace '{self.namespace}' in repo '{self.root}'. "
+ "Namespaces must be valid python identifiers separated by '.'",
)
# Set up 'full_namespace' to include the super-namespace
@@ -962,23 +976,26 @@ class Repo:
packages_dir = config.get("subdirectory", packages_dir_name)
self.packages_path = os.path.join(self.root, packages_dir)
check(
- os.path.isdir(self.packages_path),
- "No directory '%s' found in '%s'" % (packages_dir, root),
+ os.path.isdir(self.packages_path), f"No directory '{packages_dir}' found in '{root}'"
)
- # These are internal cache variables.
- self._modules = {}
- self._classes = {}
- self._instances = {}
+ # Class attribute overrides by package name
+ self.overrides = overrides or {}
+
+ # Optional reference to a RepoPath to influence module import from spack.pkg
+ self._finder: Optional[RepoPath] = None
# Maps that goes from package name to corresponding file stat
- self._fast_package_checker = None
+ self._fast_package_checker: Optional[FastPackageChecker] = None
# Indexes for this repository, computed lazily
- self._repo_index = None
- self._cache = cache or spack.caches.MISC_CACHE
+ self._repo_index: Optional[RepoIndex] = None
+ self._cache = cache
- def real_name(self, import_name):
+ def finder(self, value: RepoPath) -> None:
+ self._finder = value
+
+ def real_name(self, import_name: str) -> Optional[str]:
"""Allow users to import Spack packages using Python identifiers.
A python identifier might map to many different Spack package
@@ -997,18 +1014,21 @@ class Repo:
return import_name
options = nm.possible_spack_module_names(import_name)
- options.remove(import_name)
+ try:
+ options.remove(import_name)
+ except ValueError:
+ pass
for name in options:
if name in self:
return name
return None
- def is_prefix(self, fullname):
+ def is_prefix(self, fullname: str) -> bool:
"""True if fullname is a prefix of this Repo's namespace."""
parts = fullname.split(".")
return self._names[: len(parts)] == parts
- def _read_config(self):
+ def _read_config(self) -> Dict[str, str]:
"""Check for a YAML config file in this db's root directory."""
try:
with open(self.config_file) as reponame_file:
@@ -1019,14 +1039,14 @@ class Repo:
or "repo" not in yaml_data
or not isinstance(yaml_data["repo"], dict)
):
- tty.die("Invalid %s in repository %s" % (repo_config_name, self.root))
+ tty.die(f"Invalid {repo_config_name} in repository {self.root}")
return yaml_data["repo"]
except IOError:
- tty.die("Error reading %s when opening %s" % (self.config_file, self.root))
+ tty.die(f"Error reading {self.config_file} when opening {self.root}")
- def get(self, spec):
+ def get(self, spec: "spack.spec.Spec") -> "spack.package_base.PackageBase":
"""Returns the package associated with the supplied spec."""
msg = "Repo.get can only be called on concrete specs"
assert isinstance(spec, spack.spec.Spec) and spec.concrete, msg
@@ -1047,16 +1067,13 @@ class Repo:
# pass these through as their error messages will be fine.
raise
except Exception as e:
- tty.debug(e)
-
# Make sure other errors in constructors hit the error
# handler by wrapping them
- if spack.config.get("config:debug"):
- sys.excepthook(*sys.exc_info())
- raise FailedConstructorError(spec.fullname, *sys.exc_info())
+ tty.debug(e)
+ raise FailedConstructorError(spec.fullname, *sys.exc_info()) from e
@autospec
- def dump_provenance(self, spec, path):
+ def dump_provenance(self, spec: "spack.spec.Spec", path: str) -> None:
"""Dump provenance information for a spec to a particular path.
This dumps the package file and any associated patch files.
@@ -1064,7 +1081,7 @@ class Repo:
"""
if spec.namespace and spec.namespace != self.namespace:
raise UnknownPackageError(
- "Repository %s does not contain package %s." % (self.namespace, spec.fullname)
+ f"Repository {self.namespace} does not contain package {spec.fullname}."
)
package_path = self.filename_for_package_name(spec.name)
@@ -1081,17 +1098,13 @@ class Repo:
if os.path.exists(patch.path):
fs.install(patch.path, path)
else:
- tty.warn("Patch file did not exist: %s" % patch.path)
+ warnings.warn(f"Patch file did not exist: {patch.path}")
# Install the package.py file itself.
fs.install(self.filename_for_package_name(spec.name), path)
- def purge(self):
- """Clear entire package instance cache."""
- self._instances.clear()
-
@property
- def index(self):
+ def index(self) -> RepoIndex:
"""Construct the index for this repo lazily."""
if self._repo_index is None:
self._repo_index = RepoIndex(self._pkg_checker, self.namespace, cache=self._cache)
@@ -1101,42 +1114,40 @@ class Repo:
return self._repo_index
@property
- def provider_index(self):
+ def provider_index(self) -> spack.provider_index.ProviderIndex:
"""A provider index with names *specific* to this repo."""
return self.index["providers"]
@property
- def tag_index(self):
+ def tag_index(self) -> spack.tag.TagIndex:
"""Index of tags and which packages they're defined on."""
return self.index["tags"]
@property
- def patch_index(self):
+ def patch_index(self) -> spack.patch.PatchCache:
"""Index of patches and packages they're defined on."""
return self.index["patches"]
@autospec
- def providers_for(self, vpkg_spec):
+ def providers_for(self, vpkg_spec: "spack.spec.Spec") -> List["spack.spec.Spec"]:
providers = self.provider_index.providers_for(vpkg_spec)
if not providers:
raise UnknownPackageError(vpkg_spec.fullname)
return providers
@autospec
- def extensions_for(self, extendee_spec):
- return [
- pkg_cls(spack.spec.Spec(pkg_cls.name))
- for pkg_cls in self.all_package_classes()
- if pkg_cls(spack.spec.Spec(pkg_cls.name)).extends(extendee_spec)
- ]
-
- def dirname_for_package_name(self, pkg_name):
- """Get the directory name for a particular package. This is the
- directory that contains its package.py file."""
+ def extensions_for(
+ self, extendee_spec: "spack.spec.Spec"
+ ) -> List["spack.package_base.PackageBase"]:
+ result = [pkg_cls(spack.spec.Spec(pkg_cls.name)) for pkg_cls in self.all_package_classes()]
+ return [x for x in result if x.extends(extendee_spec)]
+
+ def dirname_for_package_name(self, pkg_name: str) -> str:
+ """Given a package name, get the directory containing its package.py file."""
_, unqualified_name = self.partition_package_name(pkg_name)
return os.path.join(self.packages_path, unqualified_name)
- def filename_for_package_name(self, pkg_name):
+ def filename_for_package_name(self, pkg_name: str) -> str:
"""Get the filename for the module we should load for a particular
package. Packages for a Repo live in
``$root/<package_name>/package.py``
@@ -1149,37 +1160,32 @@ class Repo:
return os.path.join(pkg_dir, package_file_name)
@property
- def _pkg_checker(self):
+ def _pkg_checker(self) -> FastPackageChecker:
if self._fast_package_checker is None:
self._fast_package_checker = FastPackageChecker(self.packages_path)
return self._fast_package_checker
- def all_package_names(self, include_virtuals=False):
+ def all_package_names(self, include_virtuals: bool = False) -> List[str]:
"""Returns a sorted list of all package names in the Repo."""
names = sorted(self._pkg_checker.keys())
if include_virtuals:
return names
return [x for x in names if not self.is_virtual(x)]
- def package_path(self, name):
+ def package_path(self, name: str) -> str:
"""Get path to package.py file for this repo."""
return os.path.join(self.packages_path, name, package_file_name)
- def all_package_paths(self):
+ def all_package_paths(self) -> Generator[str, None, None]:
for name in self.all_package_names():
yield self.package_path(name)
- def packages_with_tags(self, *tags):
+ def packages_with_tags(self, *tags: str) -> Set[str]:
v = set(self.all_package_names())
- index = self.tag_index
-
- for t in tags:
- t = t.lower()
- v &= set(index[t])
-
- return sorted(v)
+ v.intersection_update(*(self.tag_index[tag.lower()] for tag in tags))
+ return v
- def all_package_classes(self):
+ def all_package_classes(self) -> Generator[Type["spack.package_base.PackageBase"], None, None]:
"""Iterator over all package *classes* in the repository.
Use this with care, because loading packages is slow.
@@ -1187,7 +1193,7 @@ class Repo:
for name in self.all_package_names():
yield self.get_pkg_class(name)
- def exists(self, pkg_name):
+ def exists(self, pkg_name: str) -> bool:
"""Whether a package with the supplied name exists."""
if pkg_name is None:
return False
@@ -1204,28 +1210,22 @@ class Repo:
"""Time a package file in this repo was last updated."""
return self._pkg_checker.last_mtime()
- def is_virtual(self, pkg_name):
+ def is_virtual(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function use the provider index. If calling from a code block that
is used to construct the provider index use the ``is_virtual_safe`` function.
-
- Args:
- pkg_name (str): name of the package we want to check
"""
return pkg_name in self.provider_index
- def is_virtual_safe(self, pkg_name):
+ def is_virtual_safe(self, pkg_name: str) -> bool:
"""Return True if the package with this name is virtual, False otherwise.
This function doesn't use the provider index.
-
- Args:
- pkg_name (str): name of the package we want to check
"""
return not self.exists(pkg_name) or self.get_pkg_class(pkg_name).virtual
- def get_pkg_class(self, pkg_name):
+ def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]:
"""Get the class for the package out of its module.
First loads (or fetches from cache) a module for the
@@ -1237,7 +1237,8 @@ class Repo:
fullname = f"{self.full_namespace}.{pkg_name}"
try:
- module = importlib.import_module(fullname)
+ with REPOS_FINDER.switch_repo(self._finder or self):
+ module = importlib.import_module(fullname)
except ImportError:
raise UnknownPackageError(fullname)
except Exception as e:
@@ -1245,29 +1246,24 @@ class Repo:
raise RepoError(msg) from e
cls = getattr(module, class_name)
- if not inspect.isclass(cls):
+ if not isinstance(cls, type):
tty.die(f"{pkg_name}.{class_name} is not a class")
- new_cfg_settings = (
- spack.config.get("packages").get(pkg_name, {}).get("package_attributes", {})
- )
-
+ # Clear any prior changes to class attributes in case the class was loaded from the
+ # same repo, but with different overrides
overridden_attrs = getattr(cls, "overridden_attrs", {})
attrs_exclusively_from_config = getattr(cls, "attrs_exclusively_from_config", [])
- # Clear any prior changes to class attributes in case the config has
- # since changed
for key, val in overridden_attrs.items():
setattr(cls, key, val)
for key in attrs_exclusively_from_config:
delattr(cls, key)
- # Keep track of every class attribute that is overridden by the config:
- # if the config changes between calls to this method, we make sure to
- # restore the original config values (in case the new config no longer
- # sets attributes that it used to)
+ # Keep track of every class attribute that is overridden: if different overrides
+ # dictionaries are used on the same physical repo, we make sure to restore the original
+ # config values
new_overridden_attrs = {}
new_attrs_exclusively_from_config = set()
- for key, val in new_cfg_settings.items():
+ for key, val in self.overrides.get(pkg_name, {}).items():
if hasattr(cls, key):
new_overridden_attrs[key] = getattr(cls, key)
else:
@@ -1294,15 +1290,29 @@ class Repo:
return namespace, pkg_name
- def __str__(self):
- return "[Repo '%s' at '%s']" % (self.namespace, self.root)
+ def __str__(self) -> str:
+ return f"Repo '{self.namespace}' at {self.root}"
- def __repr__(self):
+ def __repr__(self) -> str:
return self.__str__()
- def __contains__(self, pkg_name):
+ def __contains__(self, pkg_name: str) -> bool:
return self.exists(pkg_name)
+ @staticmethod
+ def unmarshal(root, cache, overrides):
+ """Helper method to unmarshal keyword arguments"""
+ return Repo(root, cache=cache, overrides=overrides)
+
+ def marshal(self):
+ cache = self._cache
+ if isinstance(cache, llnl.util.lang.Singleton):
+ cache = cache.instance
+ return self.root, cache, self.overrides
+
+ def __reduce__(self):
+ return Repo.unmarshal, self.marshal()
+
RepoType = Union[Repo, RepoPath]
@@ -1376,12 +1386,17 @@ def create_repo(root, namespace=None, subdir=packages_dir_name):
return full_path, namespace
+def from_path(path: str) -> "Repo":
+ """Returns a repository from the path passed as input. Injects the global misc cache."""
+ return Repo(path, cache=spack.caches.MISC_CACHE)
+
+
def create_or_construct(path, namespace=None):
"""Create a repository, or just return a Repo if it already exists."""
if not os.path.exists(path):
fs.mkdirp(path)
create_repo(path, namespace)
- return Repo(path)
+ return from_path(path)
def _path(configuration=None):
@@ -1390,7 +1405,7 @@ def _path(configuration=None):
return create(configuration=configuration)
-def create(configuration):
+def create(configuration: spack.config.Configuration) -> RepoPath:
"""Create a RepoPath from a configuration object.
Args:
@@ -1399,11 +1414,21 @@ def create(configuration):
repo_dirs = configuration.get("repos")
if not repo_dirs:
raise NoRepoConfiguredError("Spack configuration contains no package repositories.")
- return RepoPath(*repo_dirs)
+
+ overrides = {}
+ for pkg_name, data in configuration.get("packages").items():
+ if pkg_name == "all":
+ continue
+ value = data.get("package_attributes", {})
+ if not value:
+ continue
+ overrides[pkg_name] = value
+
+ return RepoPath(*repo_dirs, cache=spack.caches.MISC_CACHE, overrides=overrides)
#: Singleton repo path instance
-PATH: Union[RepoPath, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(_path)
+PATH: RepoPath = llnl.util.lang.Singleton(_path) # type: ignore
# Add the finder to sys.meta_path
REPOS_FINDER = ReposFinder()
@@ -1416,20 +1441,20 @@ def all_package_names(include_virtuals=False):
@contextlib.contextmanager
-def use_repositories(*paths_and_repos, **kwargs):
+def use_repositories(
+ *paths_and_repos: Union[str, Repo], override: bool = True
+) -> Generator[RepoPath, None, None]:
"""Use the repositories passed as arguments within the context manager.
Args:
*paths_and_repos: paths to the repositories to be used, or
already constructed Repo objects
- override (bool): if True use only the repositories passed as input,
+ override: if True use only the repositories passed as input,
if False add them to the top of the list of current repositories.
Returns:
Corresponding RepoPath object
"""
global PATH
- # TODO (Python 2.7): remove this kwargs on deprecation of Python 2.7 support
- override = kwargs.get("override", True)
paths = [getattr(x, "root", x) for x in paths_and_repos]
scope_name = "use-repo-{}".format(uuid.uuid4())
repos_key = "repos:" if override else "repos"
@@ -1438,7 +1463,8 @@ def use_repositories(*paths_and_repos, **kwargs):
)
PATH, saved = create(configuration=spack.config.CONFIG), PATH
try:
- yield PATH
+ with REPOS_FINDER.switch_repo(PATH): # type: ignore
+ yield PATH
finally:
spack.config.CONFIG.remove_scope(scope_name=scope_name)
PATH = saved
@@ -1461,7 +1487,7 @@ class MockRepositoryBuilder:
``spack.dependency.default_deptype`` and ``spack.spec.Spec()`` are used.
"""
dependencies = dependencies or []
- context = {"cls_name": spack.util.naming.mod_to_class(name), "dependencies": dependencies}
+ context = {"cls_name": nm.mod_to_class(name), "dependencies": dependencies}
template = spack.tengine.make_environment().get_template("mock-repository/package.pyt")
text = template.render(context)
package_py = self.recipe_filename(name)
@@ -1520,7 +1546,7 @@ class UnknownPackageError(UnknownEntityError):
long_msg = "Use 'spack create' to create a new package."
if not repo:
- repo = spack.repo.PATH
+ repo = PATH
# We need to compare the base package name
pkg_name = name.rsplit(".", 1)[-1]
@@ -1538,10 +1564,9 @@ class UnknownNamespaceError(UnknownEntityError):
"""Raised when we encounter an unknown namespace"""
def __init__(self, namespace, name=None):
- msg, long_msg = "Unknown namespace: {}".format(namespace), None
+ msg, long_msg = f"Unknown namespace: {namespace}", None
if name == "yaml":
- long_msg = "Did you mean to specify a filename with './{}.{}'?"
- long_msg = long_msg.format(namespace, name)
+ long_msg = f"Did you mean to specify a filename with './{namespace}.{name}'?"
super().__init__(msg, long_msg)
diff --git a/lib/spack/spack/report.py b/lib/spack/spack/report.py
index 8e14747d9a..409810f58a 100644
--- a/lib/spack/spack/report.py
+++ b/lib/spack/spack/report.py
@@ -6,6 +6,7 @@
import collections
import contextlib
import functools
+import gzip
import os
import time
import traceback
@@ -14,7 +15,6 @@ from typing import Any, Callable, Dict, List, Type
import llnl.util.lang
import spack.build_environment
-import spack.fetch_strategy
import spack.install_test
import spack.installer
import spack.package_base
@@ -190,9 +190,13 @@ class BuildInfoCollector(InfoCollector):
def fetch_log(self, pkg):
try:
- with open(pkg.build_log_path, "r", encoding="utf-8") as stream:
- return "".join(stream.readlines())
- except Exception:
+ if os.path.exists(pkg.install_log_path):
+ stream = gzip.open(pkg.install_log_path, "rt")
+ else:
+ stream = open(pkg.log_path)
+ with stream as f:
+ return f.read()
+ except OSError:
return f"Cannot open log for {pkg.spec.cshort_spec}"
def extract_package_from_signature(self, instance, *args, **kwargs):
diff --git a/lib/spack/spack/reporters/cdash.py b/lib/spack/spack/reporters/cdash.py
index c65feb35d8..d2da8bbed2 100644
--- a/lib/spack/spack/reporters/cdash.py
+++ b/lib/spack/spack/reporters/cdash.py
@@ -14,19 +14,21 @@ import time
import xml.sax.saxutils
from typing import Dict, Optional
from urllib.parse import urlencode
-from urllib.request import HTTPHandler, Request, build_opener
+from urllib.request import HTTPSHandler, Request, build_opener
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
-import spack.build_environment
-import spack.fetch_strategy
-import spack.package_base
+import spack
+import spack.paths
import spack.platforms
+import spack.spec
+import spack.tengine
import spack.util.git
from spack.error import SpackError
from spack.util.crypto import checksum
from spack.util.log_parse import parse_log_events
+from spack.util.web import ssl_create_default_context
from .base import Reporter
from .extract import extract_test_parts
@@ -57,7 +59,8 @@ MAP_PHASES_TO_CDASH = {
# Initialize data structures common to each phase's report.
CDASH_PHASES = set(MAP_PHASES_TO_CDASH.values())
CDASH_PHASES.add("update")
-
+# CDash request timeout in seconds
+SPACK_CDASH_TIMEOUT = 45
CDashConfiguration = collections.namedtuple(
"CDashConfiguration", ["upload_url", "packages", "build", "site", "buildstamp", "track"]
@@ -117,7 +120,7 @@ class CDash(Reporter):
git = spack.util.git.git()
with working_dir(spack.paths.spack_root):
self.revision = git("rev-parse", "HEAD", output=str).strip()
- self.generator = "spack-{0}".format(spack.main.get_version())
+ self.generator = "spack-{0}".format(spack.get_version())
self.multiple_packages = False
def report_build_name(self, pkg_name):
@@ -427,7 +430,7 @@ class CDash(Reporter):
# Compute md5 checksum for the contents of this file.
md5sum = checksum(hashlib.md5, filename, block_size=8192)
- opener = build_opener(HTTPHandler)
+ opener = build_opener(HTTPSHandler(context=ssl_create_default_context()))
with open(filename, "rb") as f:
params_dict = {
"build": self.buildname,
@@ -446,7 +449,7 @@ class CDash(Reporter):
# By default, urllib2 only support GET and POST.
# CDash expects this file to be uploaded via PUT.
request.get_method = lambda: "PUT"
- response = opener.open(request)
+ response = opener.open(request, timeout=SPACK_CDASH_TIMEOUT)
if self.current_package_name not in self.buildIds:
resp_value = response.read()
if isinstance(resp_value, bytes):
diff --git a/lib/spack/spack/reporters/extract.py b/lib/spack/spack/reporters/extract.py
index 5554d89f0a..b222fdbad9 100644
--- a/lib/spack/spack/reporters/extract.py
+++ b/lib/spack/spack/reporters/extract.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
import re
import xml.sax.saxutils
from datetime import datetime
@@ -42,17 +41,6 @@ def elapsed(current, previous):
return diff.total_seconds()
-# TODO (post-34236): Should remove with deprecated test methods since don't
-# TODO (post-34236): have an XFAIL mechanism with the new test_part() approach.
-def expected_failure(line):
- if not line:
- return False
-
- match = returns_regexp.search(line)
- xfail = "0" not in match.group(1) if match else False
- return xfail
-
-
def new_part():
return {
"command": None,
@@ -66,14 +54,6 @@ def new_part():
}
-# TODO (post-34236): Remove this when remove deprecated methods
-def part_name(source):
- elements = []
- for e in source.replace("'", "").split(" "):
- elements.append(os.path.basename(e) if os.sep in e else e)
- return "_".join(elements)
-
-
def process_part_end(part, curr_time, last_time):
if part:
if not part["elapsed"]:
@@ -81,11 +61,7 @@ def process_part_end(part, curr_time, last_time):
stat = part["status"]
if stat in completed:
- # TODO (post-34236): remove the expected failure mapping when
- # TODO (post-34236): remove deprecated test methods.
- if stat == "passed" and expected_failure(part["desc"]):
- part["completed"] = "Expected to fail"
- elif part["completed"] == "Unknown":
+ if part["completed"] == "Unknown":
part["completed"] = completed[stat]
elif stat is None or stat == "unknown":
part["status"] = "passed"
@@ -153,14 +129,6 @@ def extract_test_parts(default_name, outputs):
if msg.startswith("Installing"):
continue
- # TODO (post-34236): Remove this check when remove run_test(),
- # TODO (post-34236): etc. since no longer supporting expected
- # TODO (post-34236): failures.
- if msg.startswith("Expecting return code"):
- if part:
- part["desc"] += f"; {msg}"
- continue
-
# Terminate without further parsing if no more test messages
if "Completed testing" in msg:
# Process last lingering part IF it didn't generate status
diff --git a/lib/spack/spack/resource.py b/lib/spack/spack/resource.py
index ba855cbb63..5f222fe016 100644
--- a/lib/spack/spack/resource.py
+++ b/lib/spack/spack/resource.py
@@ -12,7 +12,10 @@ package to enable optional features.
class Resource:
- """Represents an optional resource to be fetched by a package.
+ """Represents any resource to be fetched by a package.
+
+ This includes the main tarball or source archive, as well as extra archives defined
+ by the resource() directive.
Aggregates a name, a fetcher, a destination and a placement.
"""
diff --git a/lib/spack/spack/rewiring.py b/lib/spack/spack/rewiring.py
index 297b0bd232..ae7eb0a8d8 100644
--- a/lib/spack/spack/rewiring.py
+++ b/lib/spack/spack/rewiring.py
@@ -9,14 +9,14 @@ import shutil
import tempfile
from collections import OrderedDict
-from llnl.util.symlink import symlink
+from llnl.util.symlink import readlink, symlink
import spack.binary_distribution as bindist
+import spack.deptypes as dt
import spack.error
import spack.hooks
-import spack.paths
+import spack.platforms
import spack.relocate as relocate
-import spack.stage
import spack.store
@@ -26,7 +26,7 @@ def _relocate_spliced_links(links, orig_prefix, new_prefix):
in our case. This still needs to be called after the copy to destination
because it expects the new directory structure to be in place."""
for link in links:
- link_target = os.readlink(os.path.join(orig_prefix, link))
+ link_target = readlink(os.path.join(orig_prefix, link))
link_target = re.sub("^" + orig_prefix, new_prefix, link_target)
new_link_path = os.path.join(new_prefix, link)
os.unlink(new_link_path)
@@ -40,7 +40,8 @@ def rewire(spliced_spec):
for spec in spliced_spec.traverse(order="post", root=True):
if not spec.build_spec.installed:
# TODO: May want to change this at least for the root spec...
- # spec.build_spec.package.do_install(force=True)
+ # TODO: Also remember to import PackageInstaller
+ # PackageInstaller([spec.build_spec.package]).install()
raise PackageNotInstalledError(spliced_spec, spec.build_spec, spec)
if spec.build_spec is not spec and not spec.installed:
explicit = spec is spliced_spec
@@ -52,6 +53,7 @@ def rewire_node(spec, explicit):
its subgraph. Binaries, text, and links are all changed in accordance with
the splice. The resulting package is then 'installed.'"""
tempdir = tempfile.mkdtemp()
+
# copy anything installed to a temporary directory
shutil.copytree(spec.build_spec.prefix, os.path.join(tempdir, spec.dag_hash()))
@@ -59,8 +61,21 @@ def rewire_node(spec, explicit):
# compute prefix-to-prefix for every node from the build spec to the spliced
# spec
prefix_to_prefix = OrderedDict({spec.build_spec.prefix: spec.prefix})
- for build_dep in spec.build_spec.traverse(root=False):
- prefix_to_prefix[build_dep.prefix] = spec[build_dep.name].prefix
+ build_spec_ids = set(id(s) for s in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD))
+ for s in bindist.deps_to_relocate(spec):
+ analog = s
+ if id(s) not in build_spec_ids:
+ analogs = [
+ d
+ for d in spec.build_spec.traverse(deptype=dt.ALL & ~dt.BUILD)
+ if s._splice_match(d, self_root=spec, other_root=spec.build_spec)
+ ]
+ if analogs:
+ # Prefer same-name analogs and prefer higher versions
+ # This matches the preferences in Spec.splice, so we will find same node
+ analog = max(analogs, key=lambda a: (a.name == s.name, a.version))
+
+ prefix_to_prefix[analog.prefix] = s.prefix
manifest = bindist.get_buildfile_manifest(spec.build_spec)
platform = spack.platforms.by_name(spec.platform)
@@ -116,7 +131,7 @@ def rewire_node(spec, explicit):
# spec being added to look for mismatches)
spack.store.STORE.layout.write_spec(spec, spack.store.STORE.layout.spec_file_path(spec))
# add to database, not sure about explicit
- spack.store.STORE.db.add(spec, spack.store.STORE.layout, explicit=explicit)
+ spack.store.STORE.db.add(spec, explicit=explicit)
# run post install hooks
spack.hooks.post_install(spec, explicit)
diff --git a/lib/spack/spack/schema/__init__.py b/lib/spack/spack/schema/__init__.py
index d6df072117..8c04ebdaac 100644
--- a/lib/spack/spack/schema/__init__.py
+++ b/lib/spack/spack/schema/__init__.py
@@ -3,10 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""This module contains jsonschema files for all of Spack's YAML formats."""
+import typing
import warnings
import llnl.util.lang
-import llnl.util.tty
+
+from spack.error import SpecSyntaxError
+
+
+class DeprecationMessage(typing.NamedTuple):
+ message: str
+ error: bool
# jsonschema is imported lazily as it is heavy to import
@@ -14,46 +21,50 @@ import llnl.util.tty
def _make_validator():
import jsonschema
- import spack.parser
-
def _validate_spec(validator, is_spec, instance, schema):
"""Check if the attributes on instance are valid specs."""
import jsonschema
+ import spack.parser
+
if not validator.is_type(instance, "object"):
return
for spec_str in instance:
try:
spack.parser.parse(spec_str)
- except spack.parser.SpecSyntaxError as e:
+ except SpecSyntaxError as e:
yield jsonschema.ValidationError(str(e))
def _deprecated_properties(validator, deprecated, instance, schema):
if not (validator.is_type(instance, "object") or validator.is_type(instance, "array")):
return
- # Get a list of the deprecated properties, return if there is none
- deprecated_properties = [x for x in instance if x in deprecated["properties"]]
- if not deprecated_properties:
+ if not deprecated:
return
- # Retrieve the template message
- msg_str_or_func = deprecated["message"]
- if isinstance(msg_str_or_func, str):
- msg = msg_str_or_func.format(properties=deprecated_properties)
- else:
- msg = msg_str_or_func(instance, deprecated_properties)
- if msg is None:
- return
+ deprecations = {
+ name: DeprecationMessage(message=x["message"], error=x["error"])
+ for x in deprecated
+ for name in x["names"]
+ }
- is_error = deprecated["error"]
- if not is_error:
- warnings.warn(msg)
- else:
- import jsonschema
+ # Get a list of the deprecated properties, return if there is none
+ issues = [entry for entry in instance if entry in deprecations]
+ if not issues:
+ return
- yield jsonschema.ValidationError(msg)
+ # Process issues
+ errors = []
+ for name in issues:
+ msg = deprecations[name].message.format(name=name)
+ if deprecations[name].error:
+ errors.append(msg)
+ else:
+ warnings.warn(msg)
+
+ if errors:
+ yield jsonschema.ValidationError("\n".join(errors))
return jsonschema.validators.extend(
jsonschema.Draft4Validator,
@@ -62,25 +73,3 @@ def _make_validator():
Validator = llnl.util.lang.Singleton(_make_validator)
-
-spec_list_schema = {
- "type": "array",
- "default": [],
- "items": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "matrix": {
- "type": "array",
- "items": {"type": "array", "items": {"type": "string"}},
- },
- "exclude": {"type": "array", "items": {"type": "string"}},
- },
- },
- {"type": "string"},
- {"type": "null"},
- ]
- },
-}
diff --git a/lib/spack/spack/schema/bootstrap.py b/lib/spack/spack/schema/bootstrap.py
index 0007852d1c..ecd2f0f834 100644
--- a/lib/spack/spack/schema/bootstrap.py
+++ b/lib/spack/spack/schema/bootstrap.py
@@ -3,16 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Schema for bootstrap.yaml configuration file."""
+from typing import Any, Dict
#: Schema of a single source
-_source_schema = {
+_source_schema: Dict[str, Any] = {
"type": "object",
"properties": {"name": {"type": "string"}, "metadata": {"type": "string"}},
"additionalProperties": False,
"required": ["name", "metadata"],
}
-properties = {
+properties: Dict[str, Any] = {
"bootstrap": {
"type": "object",
"properties": {
diff --git a/lib/spack/spack/schema/buildcache_spec.py b/lib/spack/spack/schema/buildcache_spec.py
index e04a8e9519..70aa3a32f1 100644
--- a/lib/spack/spack/schema/buildcache_spec.py
+++ b/lib/spack/spack/schema/buildcache_spec.py
@@ -6,27 +6,31 @@
"""Schema for a buildcache spec.yaml file
.. literalinclude:: _spack_root/lib/spack/spack/schema/buildcache_spec.py
- :lines: 13-
+ :lines: 15-
"""
+from typing import Any, Dict
+
import spack.schema.spec
+properties: Dict[str, Any] = {
+ # `buildinfo` is no longer needed as of Spack 0.21
+ "buildinfo": {"type": "object"},
+ "spec": {
+ "type": "object",
+ "additionalProperties": True,
+ "items": spack.schema.spec.properties,
+ },
+ "binary_cache_checksum": {
+ "type": "object",
+ "properties": {"hash_algorithm": {"type": "string"}, "hash": {"type": "string"}},
+ },
+ "buildcache_layout_version": {"type": "number"},
+}
+
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Spack buildcache specfile schema",
"type": "object",
"additionalProperties": False,
- "properties": {
- # `buildinfo` is no longer needed as of Spack 0.21
- "buildinfo": {"type": "object"},
- "spec": {
- "type": "object",
- "additionalProperties": True,
- "items": spack.schema.spec.properties,
- },
- "binary_cache_checksum": {
- "type": "object",
- "properties": {"hash_algorithm": {"type": "string"}, "hash": {"type": "string"}},
- },
- "buildcache_layout_version": {"type": "number"},
- },
+ "properties": properties,
}
diff --git a/lib/spack/spack/schema/cdash.py b/lib/spack/spack/schema/cdash.py
index 42d40a5c3a..5360038f61 100644
--- a/lib/spack/spack/schema/cdash.py
+++ b/lib/spack/spack/schema/cdash.py
@@ -2,16 +2,15 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
"""Schema for cdash.yaml configuration file.
.. literalinclude:: ../spack/schema/cdash.py
:lines: 13-
"""
-
+from typing import Any, Dict
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"cdash": {
"type": "object",
"additionalProperties": False,
diff --git a/lib/spack/spack/schema/ci.py b/lib/spack/spack/schema/ci.py
index 9cc9baf385..9f7380ab44 100644
--- a/lib/spack/spack/schema/ci.py
+++ b/lib/spack/spack/schema/ci.py
@@ -2,17 +2,15 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
"""Schema for gitlab-ci.yaml configuration file.
.. literalinclude:: ../spack/schema/ci.py
- :lines: 13-
+ :lines: 16-
"""
+from typing import Any, Dict
from llnl.util.lang import union_dicts
-import spack.schema.gitlab_ci
-
# Schema for script fields
# List of lists and/or strings
# This is similar to what is allowed in
@@ -47,7 +45,7 @@ attributes_schema = {
"tags": {"type": "array", "items": {"type": "string"}},
"variables": {
"type": "object",
- "patternProperties": {r"[\w\d\-_\.]+": {"type": "string"}},
+ "patternProperties": {r"[\w\d\-_\.]+": {"type": ["string", "number"]}},
},
"before_script": script_schema,
"script": script_schema,
@@ -77,58 +75,54 @@ submapping_schema = {
},
}
-named_attributes_schema = {
- "oneOf": [
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {"noop-job": attributes_schema, "noop-job-remove": attributes_schema},
- },
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {"build-job": attributes_schema, "build-job-remove": attributes_schema},
- },
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {"copy-job": attributes_schema, "copy-job-remove": attributes_schema},
- },
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "reindex-job": attributes_schema,
- "reindex-job-remove": attributes_schema,
- },
- },
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "signing-job": attributes_schema,
- "signing-job-remove": attributes_schema,
- },
- },
- {
+dynamic_mapping_schema = {
+ "type": "object",
+ "additionalProperties": False,
+ "required": ["dynamic-mapping"],
+ "properties": {
+ "dynamic-mapping": {
"type": "object",
- "additionalProperties": False,
+ "required": ["endpoint"],
"properties": {
- "cleanup-job": attributes_schema,
- "cleanup-job-remove": attributes_schema,
+ "name": {"type": "string"},
+ # "endpoint" cannot have http patternProperties constaint as it is a required field
+ # Constrain is applied in code
+ "endpoint": {"type": "string"},
+ "timeout": {"type": "integer", "minimum": 0},
+ "verify_ssl": {"type": "boolean", "default": False},
+ "header": {"type": "object", "additionalProperties": False},
+ "allow": {"type": "array", "items": {"type": "string"}},
+ "require": {"type": "array", "items": {"type": "string"}},
+ "ignore": {"type": "array", "items": {"type": "string"}},
},
- },
- {
- "type": "object",
- "additionalProperties": False,
- "properties": {"any-job": attributes_schema, "any-job-remove": attributes_schema},
- },
- ]
+ }
+ },
}
+
+def job_schema(name: str):
+ return {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {f"{name}-job": attributes_schema, f"{name}-job-remove": attributes_schema},
+ }
+
+
pipeline_gen_schema = {
"type": "array",
- "items": {"oneOf": [submapping_schema, named_attributes_schema]},
+ "items": {
+ "oneOf": [
+ submapping_schema,
+ dynamic_mapping_schema,
+ job_schema("any"),
+ job_schema("build"),
+ job_schema("cleanup"),
+ job_schema("copy"),
+ job_schema("noop"),
+ job_schema("reindex"),
+ job_schema("signing"),
+ ]
+ },
}
core_shared_properties = union_dicts(
@@ -141,39 +135,8 @@ core_shared_properties = union_dicts(
}
)
-# TODO: Remove in Spack 0.23
-ci_properties = {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": False,
- # "required": ["mappings"],
- "properties": union_dicts(
- core_shared_properties, {"enable-artifacts-buildcache": {"type": "boolean"}}
- ),
- },
- {
- "type": "object",
- "additionalProperties": False,
- # "required": ["mappings"],
- "properties": union_dicts(
- core_shared_properties, {"temporary-storage-url-prefix": {"type": "string"}}
- ),
- },
- ]
-}
-
#: Properties for inclusion in other schemas
-properties = {
- "ci": {
- "oneOf": [
- # TODO: Replace with core-shared-properties in Spack 0.23
- ci_properties,
- # Allow legacy format under `ci` for `config update ci`
- spack.schema.gitlab_ci.gitlab_ci_properties,
- ]
- }
-}
+properties: Dict[str, Any] = {"ci": core_shared_properties}
#: Full schema with metadata
schema = {
@@ -183,21 +146,3 @@ schema = {
"additionalProperties": False,
"properties": properties,
}
-
-
-def update(data):
- import llnl.util.tty as tty
-
- import spack.ci
- import spack.environment as ev
-
- # Warn if deprecated section is still in the environment
- ci_env = ev.active_environment()
- if ci_env:
- env_config = ci_env.manifest[ev.TOP_LEVEL_KEY]
- if "gitlab-ci" in env_config:
- tty.die("Error: `gitlab-ci` section detected with `ci`, these are not compatible")
-
- # Detect if the ci section is using the new pipeline-gen
- # If it is, assume it has already been converted
- return spack.ci.translate_deprecated_config(data)
diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py
index 831ef9ad2b..8146088210 100644
--- a/lib/spack/spack/schema/compilers.py
+++ b/lib/spack/spack/schema/compilers.py
@@ -2,16 +2,37 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
"""Schema for compilers.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/compilers.py
- :lines: 13-
+ :lines: 15-
"""
+from typing import Any, Dict
+
import spack.schema.environment
+flags: Dict[str, Any] = {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]},
+ },
+}
+
+
+extra_rpaths: Dict[str, Any] = {"type": "array", "default": [], "items": {"type": "string"}}
+
+implicit_rpaths: Dict[str, Any] = {
+ "anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "boolean"}]
+}
+
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"compilers": {
"type": "array",
"items": {
@@ -34,37 +55,20 @@ properties = {
"fc": {"anyOf": [{"type": "string"}, {"type": "null"}]},
},
},
- "flags": {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- },
- },
+ "flags": flags,
"spec": {"type": "string"},
"operating_system": {"type": "string"},
"target": {"type": "string"},
"alias": {"anyOf": [{"type": "string"}, {"type": "null"}]},
"modules": {
- "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}]
- },
- "implicit_rpaths": {
"anyOf": [
+ {"type": "null"},
{"type": "array", "items": {"type": "string"}},
- {"type": "boolean"},
]
},
+ "implicit_rpaths": implicit_rpaths,
"environment": spack.schema.environment.definition,
- "extra_rpaths": {
- "type": "array",
- "default": [],
- "items": {"type": "string"},
- },
+ "extra_rpaths": extra_rpaths,
},
}
},
diff --git a/lib/spack/spack/schema/concretizer.py b/lib/spack/spack/schema/concretizer.py
index 57f0c06b54..a81962a926 100644
--- a/lib/spack/spack/schema/concretizer.py
+++ b/lib/spack/spack/schema/concretizer.py
@@ -2,20 +2,53 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
"""Schema for concretizer.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/concretizer.py
- :lines: 13-
+ :lines: 12-
"""
+from typing import Any, Dict
+
+LIST_OF_SPECS = {"type": "array", "items": {"type": "string"}}
-properties = {
+properties: Dict[str, Any] = {
"concretizer": {
"type": "object",
"additionalProperties": False,
"properties": {
"reuse": {
- "oneOf": [{"type": "boolean"}, {"type": "string", "enum": ["dependencies"]}]
+ "oneOf": [
+ {"type": "boolean"},
+ {"type": "string", "enum": ["dependencies"]},
+ {
+ "type": "object",
+ "properties": {
+ "roots": {"type": "boolean"},
+ "include": LIST_OF_SPECS,
+ "exclude": LIST_OF_SPECS,
+ "from": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "local",
+ "buildcache",
+ "external",
+ "environment",
+ ],
+ },
+ "path": {"type": "string"},
+ "include": LIST_OF_SPECS,
+ "exclude": LIST_OF_SPECS,
+ },
+ },
+ },
+ },
+ },
+ ]
},
"enable_node_namespace": {"type": "boolean"},
"targets": {
@@ -28,12 +61,36 @@ properties = {
"unify": {
"oneOf": [{"type": "boolean"}, {"type": "string", "enum": ["when_possible"]}]
},
+ "splice": {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "explicit": {
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "object",
+ "required": ["target", "replacement"],
+ "additionalProperties": False,
+ "properties": {
+ "target": {"type": "string"},
+ "replacement": {"type": "string"},
+ "transitive": {"type": "boolean", "default": False},
+ },
+ },
+ },
+ "automatic": {"type": "boolean"},
+ },
+ },
"duplicates": {
"type": "object",
"properties": {
"strategy": {"type": "string", "enum": ["none", "minimal", "full"]}
},
},
+ "timeout": {"type": "integer", "minimum": 0},
+ "error_on_timeout": {"type": "boolean"},
+ "os_compatible": {"type": "object", "additionalProperties": {"type": "array"}},
},
}
}
diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py
index add66118f7..9f380da92b 100644
--- a/lib/spack/spack/schema/config.py
+++ b/lib/spack/spack/schema/config.py
@@ -5,15 +5,17 @@
"""Schema for config.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/config.py
- :lines: 13-
+ :lines: 17-
"""
+from typing import Any, Dict
from llnl.util.lang import union_dicts
+import spack.config
import spack.schema.projections
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"config": {
"type": "object",
"default": {},
@@ -62,6 +64,7 @@ properties = {
"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]
},
"stage_name": {"type": "string"},
+ "develop_stage_link": {"type": "string"},
"test_stage": {"type": "string"},
"extensions": {"type": "array", "items": {"type": "string"}},
"template_dirs": {"type": "array", "items": {"type": "string"}},
@@ -71,8 +74,8 @@ properties = {
"environments_root": {"type": "string"},
"connect_timeout": {"type": "integer", "minimum": 0},
"verify_ssl": {"type": "boolean"},
+ "ssl_certs": {"type": "string"},
"suppress_gpg_warnings": {"type": "boolean"},
- "install_missing_compilers": {"type": "boolean"},
"debug": {"type": "boolean"},
"checksum": {"type": "boolean"},
"deprecated": {"type": "boolean"},
@@ -81,7 +84,6 @@ properties = {
"build_language": {"type": "string"},
"build_jobs": {"type": "integer", "minimum": 1},
"ccache": {"type": "boolean"},
- "concretizer": {"type": "string", "enum": ["original", "clingo"]},
"db_lock_timeout": {"type": "integer", "minimum": 1},
"package_lock_timeout": {
"anyOf": [{"type": "integer", "minimum": 1}, {"type": "null"}]
@@ -94,12 +96,21 @@ properties = {
"binary_index_ttl": {"type": "integer", "minimum": 0},
"aliases": {"type": "object", "patternProperties": {r"\w[\w-]*": {"type": "string"}}},
},
- "deprecatedProperties": {
- "properties": ["terminal_title"],
- "message": "config:terminal_title has been replaced by "
- "install_status and is ignored",
- "error": False,
- },
+ "deprecatedProperties": [
+ {
+ "names": ["concretizer"],
+ "message": "Spack supports only clingo as a concretizer from v0.23. "
+ "The config:concretizer config option is ignored.",
+ "error": False,
+ },
+ {
+ "names": ["install_missing_compilers"],
+ "message": "The config:install_missing_compilers option has been deprecated in "
+ "Spack v0.23, and is currently ignored. It will be removed from config after "
+ "Spack v1.0.",
+ "error": False,
+ },
+ ],
}
}
diff --git a/lib/spack/spack/schema/container.py b/lib/spack/spack/schema/container.py
index 287ed945eb..12b157c5cc 100644
--- a/lib/spack/spack/schema/container.py
+++ b/lib/spack/spack/schema/container.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Schema for the 'container' subsection of Spack environments."""
+from typing import Any, Dict
_stages_from_dockerhub = {
"type": "object",
@@ -85,4 +86,4 @@ container_schema = {
},
}
-properties = {"container": container_schema}
+properties: Dict[str, Any] = {"container": container_schema}
diff --git a/lib/spack/spack/schema/cray_manifest.py b/lib/spack/spack/schema/cray_manifest.py
index c922bb2c31..ff76ecf915 100644
--- a/lib/spack/spack/schema/cray_manifest.py
+++ b/lib/spack/spack/schema/cray_manifest.py
@@ -11,112 +11,115 @@
This does not specify a configuration - it is an input format
that is consumed and transformed into Spack DB records.
"""
+from typing import Any, Dict
-schema = {
- "$schema": "http://json-schema.org/schema#",
- "title": "CPE manifest schema",
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "_meta": {
+properties: Dict[str, Any] = {
+ "_meta": {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "file-type": {"type": "string", "minLength": 1},
+ "cpe-version": {"type": "string", "minLength": 1},
+ "system-type": {"type": "string", "minLength": 1},
+ "schema-version": {"type": "string", "minLength": 1},
+ # Older schemas use did not have "cpe-version", just the
+ # schema version; in that case it was just called "version"
+ "version": {"type": "string", "minLength": 1},
+ },
+ },
+ "compilers": {
+ "type": "array",
+ "items": {
"type": "object",
"additionalProperties": False,
"properties": {
- "file-type": {"type": "string", "minLength": 1},
- "cpe-version": {"type": "string", "minLength": 1},
- "system-type": {"type": "string", "minLength": 1},
- "schema-version": {"type": "string", "minLength": 1},
- # Older schemas use did not have "cpe-version", just the
- # schema version; in that case it was just called "version"
+ "name": {"type": "string", "minLength": 1},
"version": {"type": "string", "minLength": 1},
- },
- },
- "compilers": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "name": {"type": "string", "minLength": 1},
- "version": {"type": "string", "minLength": 1},
- "prefix": {"type": "string", "minLength": 1},
- "executables": {
- "type": "object",
- "additionalProperties": False,
- "properties": {
- "cc": {"type": "string", "minLength": 1},
- "cxx": {"type": "string", "minLength": 1},
- "fc": {"type": "string", "minLength": 1},
- },
+ "prefix": {"type": "string", "minLength": 1},
+ "executables": {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "cc": {"type": "string", "minLength": 1},
+ "cxx": {"type": "string", "minLength": 1},
+ "fc": {"type": "string", "minLength": 1},
},
- "arch": {
- "type": "object",
- "required": ["os", "target"],
- "additionalProperties": False,
- "properties": {
- "os": {"type": "string", "minLength": 1},
- "target": {"type": "string", "minLength": 1},
- },
+ },
+ "arch": {
+ "type": "object",
+ "required": ["os", "target"],
+ "additionalProperties": False,
+ "properties": {
+ "os": {"type": "string", "minLength": 1},
+ "target": {"type": "string", "minLength": 1},
},
},
},
},
- "specs": {
- "type": "array",
- "items": {
- "type": "object",
- "required": ["name", "version", "arch", "compiler", "prefix", "hash"],
- "additionalProperties": False,
- "properties": {
- "name": {"type": "string", "minLength": 1},
- "version": {"type": "string", "minLength": 1},
- "arch": {
- "type": "object",
- "required": ["platform", "platform_os", "target"],
- "additioanlProperties": False,
- "properties": {
- "platform": {"type": "string", "minLength": 1},
- "platform_os": {"type": "string", "minLength": 1},
- "target": {
- "type": "object",
- "additionalProperties": False,
- "required": ["name"],
- "properties": {"name": {"type": "string", "minLength": 1}},
- },
+ },
+ "specs": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": ["name", "version", "arch", "compiler", "prefix", "hash"],
+ "additionalProperties": False,
+ "properties": {
+ "name": {"type": "string", "minLength": 1},
+ "version": {"type": "string", "minLength": 1},
+ "arch": {
+ "type": "object",
+ "required": ["platform", "platform_os", "target"],
+ "additionalProperties": False,
+ "properties": {
+ "platform": {"type": "string", "minLength": 1},
+ "platform_os": {"type": "string", "minLength": 1},
+ "target": {
+ "type": "object",
+ "additionalProperties": False,
+ "required": ["name"],
+ "properties": {"name": {"type": "string", "minLength": 1}},
},
},
- "compiler": {
- "type": "object",
- "required": ["name", "version"],
- "additionalProperties": False,
- "properties": {
- "name": {"type": "string", "minLength": 1},
- "version": {"type": "string", "minLength": 1},
- },
+ },
+ "compiler": {
+ "type": "object",
+ "required": ["name", "version"],
+ "additionalProperties": False,
+ "properties": {
+ "name": {"type": "string", "minLength": 1},
+ "version": {"type": "string", "minLength": 1},
},
- "dependencies": {
- "type": "object",
- "patternProperties": {
- "\\w[\\w-]*": {
- "type": "object",
- "required": ["hash"],
- "additionalProperties": False,
- "properties": {
- "hash": {"type": "string", "minLength": 1},
- "type": {
- "type": "array",
- "items": {"type": "string", "minLength": 1},
- },
+ },
+ "dependencies": {
+ "type": "object",
+ "patternProperties": {
+ "\\w[\\w-]*": {
+ "type": "object",
+ "required": ["hash"],
+ "additionalProperties": False,
+ "properties": {
+ "hash": {"type": "string", "minLength": 1},
+ "type": {
+ "type": "array",
+ "items": {"type": "string", "minLength": 1},
},
- }
- },
+ },
+ }
},
- "prefix": {"type": "string", "minLength": 1},
- "rpm": {"type": "string", "minLength": 1},
- "hash": {"type": "string", "minLength": 1},
- "parameters": {"type": "object"},
},
+ "prefix": {"type": "string", "minLength": 1},
+ "rpm": {"type": "string", "minLength": 1},
+ "hash": {"type": "string", "minLength": 1},
+ "parameters": {"type": "object"},
},
},
},
}
+
+schema = {
+ "$schema": "http://json-schema.org/schema#",
+ "title": "CPE manifest schema",
+ "type": "object",
+ "additionalProperties": False,
+ "properties": properties,
+}
diff --git a/lib/spack/spack/schema/database_index.py b/lib/spack/spack/schema/database_index.py
index 4b25b415a3..eaa0d2ece9 100644
--- a/lib/spack/spack/schema/database_index.py
+++ b/lib/spack/spack/schema/database_index.py
@@ -6,12 +6,41 @@
"""Schema for database index.json file
.. literalinclude:: _spack_root/lib/spack/spack/schema/database_index.py
- :lines: 36-
+ :lines: 17-
"""
+from typing import Any, Dict
+
import spack.schema.spec
# spack.schema.spec.properties
+properties: Dict[str, Any] = {
+ "database": {
+ "type": "object",
+ "required": ["installs", "version"],
+ "additionalProperties": False,
+ "properties": {
+ "installs": {
+ "type": "object",
+ "patternProperties": {
+ r"^[\w\d]{32}$": {
+ "type": "object",
+ "properties": {
+ "spec": spack.schema.spec.properties,
+ "path": {"oneOf": [{"type": "string"}, {"type": "null"}]},
+ "installed": {"type": "boolean"},
+ "ref_count": {"type": "integer", "minimum": 0},
+ "explicit": {"type": "boolean"},
+ "installation_time": {"type": "number"},
+ },
+ }
+ },
+ },
+ "version": {"type": "string"},
+ },
+ }
+}
+
#: Full schema with metadata
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
@@ -19,30 +48,5 @@ schema = {
"type": "object",
"required": ["database"],
"additionalProperties": False,
- "properties": {
- "database": {
- "type": "object",
- "required": ["installs", "version"],
- "additionalProperties": False,
- "properties": {
- "installs": {
- "type": "object",
- "patternProperties": {
- r"^[\w\d]{32}$": {
- "type": "object",
- "properties": {
- "spec": spack.schema.spec.properties,
- "path": {"oneOf": [{"type": "string"}, {"type": "null"}]},
- "installed": {"type": "boolean"},
- "ref_count": {"type": "integer", "minimum": 0},
- "explicit": {"type": "boolean"},
- "installation_time": {"type": "number"},
- },
- }
- },
- },
- "version": {"type": "string"},
- },
- }
- },
+ "properties": properties,
}
diff --git a/lib/spack/spack/schema/definitions.py b/lib/spack/spack/schema/definitions.py
index 81579811b2..8f0699a175 100644
--- a/lib/spack/spack/schema/definitions.py
+++ b/lib/spack/spack/schema/definitions.py
@@ -6,20 +6,21 @@
"""Schema for definitions
.. literalinclude:: _spack_root/lib/spack/spack/schema/definitions.py
- :lines: 13-
+ :lines: 16-
"""
+from typing import Any, Dict
-import spack.schema
+from .spec_list import spec_list_schema
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"definitions": {
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {"when": {"type": "string"}},
- "patternProperties": {r"^(?!when$)\w*": spack.schema.spec_list_schema},
+ "patternProperties": {r"^(?!when$)\w*": spec_list_schema},
},
}
}
diff --git a/lib/spack/spack/schema/develop.py b/lib/spack/spack/schema/develop.py
index 7fa2ec5b07..8db1220e63 100644
--- a/lib/spack/spack/schema/develop.py
+++ b/lib/spack/spack/schema/develop.py
@@ -2,9 +2,9 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from typing import Any, Dict
-
-properties = {
+properties: Dict[str, Any] = {
"develop": {
"type": "object",
"default": {},
@@ -13,6 +13,7 @@ properties = {
r"\w[\w-]*": {
"type": "object",
"additionalProperties": False,
+ "required": ["spec"],
"properties": {"spec": {"type": "string"}, "path": {"type": "string"}},
}
},
diff --git a/lib/spack/spack/schema/env.py b/lib/spack/spack/schema/env.py
index b5f1294722..b75bd231f4 100644
--- a/lib/spack/spack/schema/env.py
+++ b/lib/spack/spack/schema/env.py
@@ -6,74 +6,45 @@
"""Schema for env.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/env.py
- :lines: 36-
+ :lines: 19-
"""
+from typing import Any, Dict
+
from llnl.util.lang import union_dicts
-import spack.schema.gitlab_ci # DEPRECATED
import spack.schema.merged
-import spack.schema.projections
+
+from .spec_list import spec_list_schema
#: Top level key in a manifest file
TOP_LEVEL_KEY = "spack"
-projections_scheme = spack.schema.projections.properties["projections"]
+include_concrete = {"type": "array", "default": [], "items": {"type": "string"}}
+
+properties: Dict[str, Any] = {
+ "spack": {
+ "type": "object",
+ "default": {},
+ "additionalProperties": False,
+ "properties": union_dicts(
+ # merged configuration scope schemas
+ spack.schema.merged.properties,
+ # extra environment schema properties
+ {
+ "include": {"type": "array", "default": [], "items": {"type": "string"}},
+ "specs": spec_list_schema,
+ "include_concrete": include_concrete,
+ },
+ ),
+ }
+}
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Spack environment file schema",
"type": "object",
"additionalProperties": False,
- "properties": {
- "spack": {
- "type": "object",
- "default": {},
- "additionalProperties": False,
- "properties": union_dicts(
- # Include deprecated "gitlab-ci" section
- spack.schema.gitlab_ci.properties,
- # merged configuration scope schemas
- spack.schema.merged.properties,
- # extra environment schema properties
- {
- "include": {"type": "array", "default": [], "items": {"type": "string"}},
- "specs": spack.schema.spec_list_schema,
- "view": {
- "anyOf": [
- {"type": "boolean"},
- {"type": "string"},
- {
- "type": "object",
- "patternProperties": {
- r"\w+": {
- "required": ["root"],
- "additionalProperties": False,
- "properties": {
- "root": {"type": "string"},
- "link": {
- "type": "string",
- "pattern": "(roots|all|run)",
- },
- "link_type": {"type": "string"},
- "select": {
- "type": "array",
- "items": {"type": "string"},
- },
- "exclude": {
- "type": "array",
- "items": {"type": "string"},
- },
- "projections": projections_scheme,
- },
- }
- },
- },
- ]
- },
- },
- ),
- }
- },
+ "properties": properties,
}
@@ -86,15 +57,6 @@ def update(data):
Returns:
True if data was changed, False otherwise
"""
-
- import spack.ci
-
- if "gitlab-ci" in data:
- data["ci"] = data.pop("gitlab-ci")
-
- if "ci" in data:
- return spack.ci.translate_deprecated_config(data["ci"])
-
# There are not currently any deprecated attributes in this section
# that have not been removed
return False
diff --git a/lib/spack/spack/schema/environment.py b/lib/spack/spack/schema/environment.py
index 1c5070092e..193a07b657 100644
--- a/lib/spack/spack/schema/environment.py
+++ b/lib/spack/spack/schema/environment.py
@@ -6,6 +6,7 @@
schemas.
"""
import collections.abc
+from typing import Any, Dict
array_of_strings_or_num = {
"type": "array",
@@ -18,7 +19,7 @@ dictionary_of_strings_or_num = {
"patternProperties": {r"\w[\w-]*": {"anyOf": [{"type": "string"}, {"type": "number"}]}},
}
-definition = {
+definition: Dict[str, Any] = {
"type": "object",
"default": {},
"additionalProperties": False,
diff --git a/lib/spack/spack/schema/gitlab_ci.py b/lib/spack/spack/schema/gitlab_ci.py
deleted file mode 100644
index c95cd674d9..0000000000
--- a/lib/spack/spack/schema/gitlab_ci.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 2013-2024 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 gitlab-ci.yaml configuration file.
-
-.. literalinclude:: ../spack/schema/gitlab_ci.py
- :lines: 13-
-"""
-
-from llnl.util.lang import union_dicts
-
-image_schema = {
- "oneOf": [
- {"type": "string"},
- {
- "type": "object",
- "properties": {
- "name": {"type": "string"},
- "entrypoint": {"type": "array", "items": {"type": "string"}},
- },
- },
- ]
-}
-
-runner_attributes_schema_items = {
- "image": image_schema,
- "tags": {"type": "array", "items": {"type": "string"}},
- "variables": {"type": "object", "patternProperties": {r"[\w\d\-_\.]+": {"type": "string"}}},
- "before_script": {"type": "array", "items": {"type": "string"}},
- "script": {"type": "array", "items": {"type": "string"}},
- "after_script": {"type": "array", "items": {"type": "string"}},
-}
-
-runner_selector_schema = {
- "type": "object",
- "additionalProperties": False,
- "required": ["tags"],
- "properties": runner_attributes_schema_items,
-}
-
-remove_attributes_schema = {
- "type": "object",
- "additionalProperties": False,
- "required": ["tags"],
- "properties": {"tags": {"type": "array", "items": {"type": "string"}}},
-}
-
-
-core_shared_properties = union_dicts(
- runner_attributes_schema_items,
- {
- "bootstrap": {
- "type": "array",
- "items": {
- "anyOf": [
- {"type": "string"},
- {
- "type": "object",
- "additionalProperties": False,
- "required": ["name"],
- "properties": {
- "name": {"type": "string"},
- "compiler-agnostic": {"type": "boolean", "default": False},
- },
- },
- ]
- },
- },
- "match_behavior": {"type": "string", "enum": ["first", "merge"], "default": "first"},
- "mappings": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": False,
- "required": ["match"],
- "properties": {
- "match": {"type": "array", "items": {"type": "string"}},
- "remove-attributes": remove_attributes_schema,
- "runner-attributes": runner_selector_schema,
- },
- },
- },
- "service-job-attributes": runner_selector_schema,
- "signing-job-attributes": runner_selector_schema,
- "rebuild-index": {"type": "boolean"},
- "broken-specs-url": {"type": "string"},
- "broken-tests-packages": {"type": "array", "items": {"type": "string"}},
- },
-)
-
-gitlab_ci_properties = {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": False,
- "required": ["mappings"],
- "properties": union_dicts(
- core_shared_properties, {"enable-artifacts-buildcache": {"type": "boolean"}}
- ),
- },
- {
- "type": "object",
- "additionalProperties": False,
- "required": ["mappings"],
- "properties": union_dicts(
- core_shared_properties, {"temporary-storage-url-prefix": {"type": "string"}}
- ),
- },
- ]
-}
-
-#: Properties for inclusion in other schemas
-properties = {"gitlab-ci": gitlab_ci_properties}
-
-#: Full schema with metadata
-schema = {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "Spack gitlab-ci 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 f4d70f8241..a883f5af62 100644
--- a/lib/spack/spack/schema/merged.py
+++ b/lib/spack/spack/schema/merged.py
@@ -6,8 +6,10 @@
"""Schema for configuration merged into one file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/merged.py
- :lines: 39-
+ :lines: 32-
"""
+from typing import Any, Dict
+
from llnl.util.lang import union_dicts
import spack.schema.bootstrap
@@ -24,9 +26,10 @@ import spack.schema.modules
import spack.schema.packages
import spack.schema.repos
import spack.schema.upstreams
+import spack.schema.view
#: Properties for inclusion in other schemas
-properties = union_dicts(
+properties: Dict[str, Any] = union_dicts(
spack.schema.bootstrap.properties,
spack.schema.cdash.properties,
spack.schema.compilers.properties,
@@ -41,6 +44,7 @@ properties = union_dicts(
spack.schema.packages.properties,
spack.schema.repos.properties,
spack.schema.upstreams.properties,
+ spack.schema.view.properties,
)
diff --git a/lib/spack/spack/schema/mirrors.py b/lib/spack/spack/schema/mirrors.py
index 13ed1c746e..8a61fd5b53 100644
--- a/lib/spack/spack/schema/mirrors.py
+++ b/lib/spack/spack/schema/mirrors.py
@@ -6,22 +6,51 @@
"""Schema for mirrors.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/mirrors.py
- :lines: 12-69
+ :lines: 13-
"""
+from typing import Any, Dict
#: Common properties for connection specification
connection = {
"url": {"type": "string"},
# todo: replace this with named keys "username" / "password" or "id" / "secret"
"access_pair": {
- "type": "array",
- "items": {"type": ["string", "null"], "minItems": 2, "maxItems": 2},
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {"minItems": 2, "maxItems": 2, "type": ["string", "null"]},
+ }, # deprecated
+ {
+ "type": "object",
+ "required": ["secret_variable"],
+ # Only allow id or id_variable to be set, not both
+ "oneOf": [{"required": ["id"]}, {"required": ["id_variable"]}],
+ "properties": {
+ "id": {"type": "string"},
+ "id_variable": {"type": "string"},
+ "secret_variable": {"type": "string"},
+ },
+ },
+ ]
},
- "access_token": {"type": ["string", "null"]},
"profile": {"type": ["string", "null"]},
"endpoint_url": {"type": ["string", "null"]},
+ "access_token": {"type": ["string", "null"]}, # deprecated
+ "access_token_variable": {"type": ["string", "null"]},
}
+connection_ext = {
+ "deprecatedProperties": [
+ {
+ "names": ["access_token"],
+ "message": "Use of plain text `access_token` in mirror config is deprecated, use "
+ "environment variables instead (access_token_variable)",
+ "error": False,
+ }
+ ]
+}
+
+
#: Mirror connection inside pull/push keys
fetch_and_push = {
"anyOf": [
@@ -30,6 +59,7 @@ fetch_and_push = {
"type": "object",
"additionalProperties": False,
"properties": {**connection}, # type: ignore
+ **connection_ext, # type: ignore
},
]
}
@@ -45,12 +75,14 @@ mirror_entry = {
"signed": {"type": "boolean"},
"fetch": fetch_and_push,
"push": fetch_and_push,
+ "autopush": {"type": "boolean"},
**connection, # type: ignore
},
+ **connection_ext, # type: ignore
}
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"mirrors": {
"type": "object",
"default": {},
@@ -68,3 +100,28 @@ schema = {
"additionalProperties": False,
"properties": properties,
}
+
+
+def update(data):
+ import jsonschema
+
+ errors = []
+
+ def check_access_pair(name, section):
+ if not section or not isinstance(section, dict):
+ return
+
+ if "access_token" in section and "access_token_variable" in section:
+ errors.append(
+ f'{name}: mirror credential "access_token" conflicts with "access_token_variable"'
+ )
+
+ # Check all of the sections
+ for name, section in data.items():
+ check_access_pair(name, section)
+ if isinstance(section, dict):
+ check_access_pair(name, section.get("fetch"))
+ check_access_pair(name, section.get("push"))
+
+ if errors:
+ raise jsonschema.ValidationError("\n".join(errors))
diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py
index 48db98c485..15d933404c 100644
--- a/lib/spack/spack/schema/modules.py
+++ b/lib/spack/spack/schema/modules.py
@@ -6,8 +6,10 @@
"""Schema for modules.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/modules.py
- :lines: 13-
+ :lines: 16-
"""
+from typing import Any, Dict
+
import spack.schema.environment
import spack.schema.projections
@@ -32,7 +34,7 @@ array_of_strings = {"type": "array", "default": [], "items": {"type": "string"}}
dictionary_of_strings = {"type": "object", "patternProperties": {r"\w[\w-]*": {"type": "string"}}}
-dependency_selection = {"type": "string", "enum": ["none", "direct", "all"]}
+dependency_selection = {"type": "string", "enum": ["none", "run", "direct", "all"]}
module_file_configuration = {
"type": "object",
@@ -141,7 +143,7 @@ module_config_properties = {
# Properties for inclusion into other schemas (requires definitions)
-properties = {
+properties: Dict[str, Any] = {
"modules": {
"type": "object",
"additionalProperties": False,
diff --git a/lib/spack/spack/schema/packages.py b/lib/spack/spack/schema/packages.py
index acedb15966..2193a62541 100644
--- a/lib/spack/spack/schema/packages.py
+++ b/lib/spack/spack/schema/packages.py
@@ -5,10 +5,14 @@
"""Schema for packages.yaml configuration files.
.. literalinclude:: _spack_root/lib/spack/spack/schema/packages.py
- :lines: 13-
+ :lines: 14-
"""
+from typing import Any, Dict
+
import spack.schema.environment
+from .compilers import extra_rpaths, flags, implicit_rpaths
+
permissions = {
"type": "object",
"additionalProperties": False,
@@ -54,6 +58,24 @@ requirements = {
]
}
+prefer_and_conflict = {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "spec": {"type": "string"},
+ "message": {"type": "string"},
+ "when": {"type": "string"},
+ },
+ },
+ {"type": "string"},
+ ]
+ },
+}
+
permissions = {
"type": "object",
"additionalProperties": False,
@@ -73,7 +95,7 @@ package_attributes = {
REQUIREMENT_URL = "https://spack.readthedocs.io/en/latest/packages_yaml.html#package-requirements"
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"packages": {
"type": "object",
"default": {},
@@ -85,7 +107,8 @@ properties = {
"additionalProperties": False,
"properties": {
"require": requirements,
- "version": {}, # Here only to warn users on ignored properties
+ "prefer": prefer_and_conflict,
+ "conflict": prefer_and_conflict,
"target": {
"type": "array",
"default": [],
@@ -116,14 +139,6 @@ properties = {
},
"variants": variants,
},
- "deprecatedProperties": {
- "properties": ["version"],
- "message": "setting version preferences in the 'all' section of packages.yaml "
- "is deprecated and will be removed in v0.22\n\n\tThese preferences "
- "will be ignored by Spack. You can set them only in package-specific sections "
- "of the same file.\n",
- "error": False,
- },
}
},
"patternProperties": {
@@ -133,20 +148,19 @@ properties = {
"additionalProperties": False,
"properties": {
"require": requirements,
+ "prefer": prefer_and_conflict,
+ "conflict": prefer_and_conflict,
"version": {
"type": "array",
"default": [],
# version strings
"items": {"anyOf": [{"type": "string"}, {"type": "number"}]},
},
- "target": {}, # Here only to warn users on ignored properties
- "compiler": {}, # Here only to warn users on ignored properties
"buildable": {"type": "boolean", "default": True},
"permissions": permissions,
# If 'get_full_repo' is promoted to a Package-level
# attribute, it could be useful to set it here
"package_attributes": package_attributes,
- "providers": {}, # Here only to warn users on ignored properties
"variants": variants,
"externals": {
"type": "array",
@@ -160,7 +174,16 @@ properties = {
"type": "object",
"additionalProperties": True,
"properties": {
- "environment": spack.schema.environment.definition
+ "compilers": {
+ "type": "object",
+ "patternProperties": {
+ r"(^\w[\w-]*)": {"type": "string"}
+ },
+ },
+ "environment": spack.schema.environment.definition,
+ "extra_rpaths": extra_rpaths,
+ "implicit_rpaths": implicit_rpaths,
+ "flags": flags,
},
},
},
@@ -169,24 +192,11 @@ properties = {
},
},
},
- "deprecatedProperties": {
- "properties": ["target", "compiler", "providers"],
- "message": "setting 'compiler:', 'target:' or 'provider:' preferences in "
- "a package-specific section of packages.yaml is deprecated, and will be "
- "removed in v0.22.\n\n\tThese preferences will be ignored by Spack, and "
- "can be set only in the 'all' section of the same file. "
- "You can run:\n\n\t\t$ spack audit configs\n\n\tto get better diagnostics, "
- "including files:lines where the deprecated attributes are used.\n\n"
- "\tUse requirements to enforce conditions on specific packages: "
- f"{REQUIREMENT_URL}\n",
- "error": False,
- },
}
},
}
}
-
#: Full schema with metadata
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
diff --git a/lib/spack/spack/schema/projections.py b/lib/spack/spack/schema/projections.py
index 00f28d8bf9..60f956bba6 100644
--- a/lib/spack/spack/schema/projections.py
+++ b/lib/spack/spack/schema/projections.py
@@ -6,12 +6,12 @@
"""Schema for projections.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/projections.py
- :lines: 13-
+ :lines: 14-
"""
-
+from typing import Any, Dict
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"projections": {"type": "object", "patternProperties": {r"all|\w[\w-]*": {"type": "string"}}}
}
diff --git a/lib/spack/spack/schema/repos.py b/lib/spack/spack/schema/repos.py
index 46f775fb4e..654efe0f00 100644
--- a/lib/spack/spack/schema/repos.py
+++ b/lib/spack/spack/schema/repos.py
@@ -6,12 +6,14 @@
"""Schema for repos.yaml configuration file.
.. literalinclude:: _spack_root/lib/spack/spack/schema/repos.py
- :lines: 13-
+ :lines: 14-
"""
-
+from typing import Any, Dict
#: Properties for inclusion in other schemas
-properties = {"repos": {"type": "array", "default": [], "items": {"type": "string"}}}
+properties: Dict[str, Any] = {
+ "repos": {"type": "array", "default": [], "items": {"type": "string"}}
+}
#: Full schema with metadata
diff --git a/lib/spack/spack/schema/spec.py b/lib/spack/spack/schema/spec.py
index 3cbb8a65d2..5ae59d9ffa 100644
--- a/lib/spack/spack/schema/spec.py
+++ b/lib/spack/spack/schema/spec.py
@@ -8,9 +8,9 @@
TODO: This needs to be updated? Especially the hashes under properties.
.. literalinclude:: _spack_root/lib/spack/spack/schema/spec.py
- :lines: 13-
+ :lines: 15-
"""
-
+from typing import Any, Dict
target = {
"oneOf": [
@@ -57,7 +57,7 @@ build_spec = {
}
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"spec": {
"type": "object",
"additionalProperties": False,
diff --git a/lib/spack/spack/schema/spec_list.py b/lib/spack/spack/schema/spec_list.py
new file mode 100644
index 0000000000..67d6b2745a
--- /dev/null
+++ b/lib/spack/spack/schema/spec_list.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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)
+matrix_schema = {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}
+
+spec_list_schema = {
+ "type": "array",
+ "default": [],
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": False,
+ "properties": {
+ "matrix": matrix_schema,
+ "exclude": {"type": "array", "items": {"type": "string"}},
+ },
+ },
+ {"type": "string"},
+ {"type": "null"},
+ ]
+ },
+}
diff --git a/lib/spack/spack/schema/upstreams.py b/lib/spack/spack/schema/upstreams.py
index eee9d050ba..6ce313ff89 100644
--- a/lib/spack/spack/schema/upstreams.py
+++ b/lib/spack/spack/schema/upstreams.py
@@ -2,10 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
+from typing import Any, Dict
#: Properties for inclusion in other schemas
-properties = {
+properties: Dict[str, Any] = {
"upstreams": {
"type": "object",
"default": {},
diff --git a/lib/spack/spack/schema/view.py b/lib/spack/spack/schema/view.py
new file mode 100644
index 0000000000..d3e983167f
--- /dev/null
+++ b/lib/spack/spack/schema/view.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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 view
+
+.. literalinclude:: _spack_root/lib/spack/spack/schema/view.py
+ :lines: 15-
+"""
+from typing import Any, Dict
+
+import spack.schema
+import spack.schema.projections
+
+projections_scheme = spack.schema.projections.properties["projections"]
+
+#: Properties for inclusion in other schemas
+properties: Dict[str, Any] = {
+ "view": {
+ "anyOf": [
+ {"type": "boolean"},
+ {"type": "string"},
+ {
+ "type": "object",
+ "patternProperties": {
+ r"\w+": {
+ "required": ["root"],
+ "additionalProperties": False,
+ "properties": {
+ "root": {"type": "string"},
+ "link": {"type": "string", "pattern": "(roots|all|run)"},
+ "link_type": {"type": "string"},
+ "select": {"type": "array", "items": {"type": "string"}},
+ "exclude": {"type": "array", "items": {"type": "string"}},
+ "projections": projections_scheme,
+ },
+ }
+ },
+ },
+ ]
+ }
+}
+
+#: Full schema with metadata
+schema = {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Spack view configuration file schema",
+ "properties": properties,
+}
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index dd4ed9e0c2..436776e272 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -6,6 +6,7 @@ import collections
import collections.abc
import copy
import enum
+import functools
import itertools
import os
import pathlib
@@ -13,64 +14,24 @@ import pprint
import re
import sys
import types
+import typing
import warnings
-from typing import Callable, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple, Union
+from contextlib import contextmanager
+from typing import Callable, Dict, Iterator, List, NamedTuple, Optional, Set, Tuple, Type, Union
import archspec.cpu
-import spack.config as sc
-import spack.deptypes as dt
-import spack.paths as sp
-import spack.util.path as sup
-
-try:
- import clingo # type: ignore[import]
-
- # There may be a better way to detect this
- clingo_cffi = hasattr(clingo.Symbol, "_rep")
-except ImportError:
- clingo = None # type: ignore
- clingo_cffi = False
-except AttributeError:
- # Reaching this point indicates a broken clingo installation
- # If Spack derived clingo, suggest user re-run bootstrap
- # if non-spack, suggest user investigate installation
-
- # assume Spack is not responsibe for broken clingo
- msg = (
- f"Clingo installation at {clingo.__file__} is incomplete or invalid."
- "Please repair installation or re-install. "
- "Alternatively, consider installing clingo via Spack."
- )
- # check whether Spack is responsible
- if (
- pathlib.Path(
- sup.canonicalize_path(sc.get("bootstrap:root", sp.default_user_bootstrap_path))
- )
- in pathlib.Path(clingo.__file__).parents
- ):
- # Spack is responsible for the broken clingo
- msg = (
- "Spack bootstrapped copy of Clingo is broken, "
- "please re-run the bootstrapping process via command `spack bootstrap now`."
- " If this issue persists, please file a bug at: github.com/spack/spack"
- )
- raise RuntimeError(
- "Clingo installation may be broken or incomplete, "
- "please verify clingo has been installed correctly"
- "\n\nClingo does not provide symbol clingo.Symbol"
- f"{msg}"
- )
-
import llnl.util.lang
import llnl.util.tty as tty
+from llnl.util.lang import elide_list
import spack
import spack.binary_distribution
-import spack.cmd
+import spack.compiler
import spack.compilers
+import spack.concretize
import spack.config
-import spack.directives
+import spack.deptypes as dt
import spack.environment as ev
import spack.error
import spack.package_base
@@ -80,20 +41,34 @@ import spack.repo
import spack.spec
import spack.store
import spack.util.crypto
+import spack.util.libc
import spack.util.path
import spack.util.timer
-import spack.variant
+import spack.variant as vt
import spack.version as vn
import spack.version.git_ref_lookup
from spack import traverse
+from .core import (
+ AspFunction,
+ AspVar,
+ NodeArgument,
+ ast_sym,
+ ast_type,
+ clingo,
+ clingo_cffi,
+ extract_args,
+ fn,
+ parse_files,
+ parse_term,
+)
from .counter import FullDuplicatesCounter, MinimalDuplicatesCounter, NoDuplicatesCounter
+from .requirements import RequirementKind, RequirementParser, RequirementRule
+from .version_order import concretization_version_order
GitOrStandardVersion = Union[spack.version.GitVersion, spack.version.StandardVersion]
-# these are from clingo.ast and bootstrapped later
-ASTType = None
-parse_files = None
+TransformFunction = Callable[["spack.spec.Spec", List[AspFunction]], List[AspFunction]]
#: Enable the addition of a runtime node
WITH_RUNTIME = sys.platform != "win32"
@@ -118,29 +93,13 @@ DEFAULT_OUTPUT_CONFIGURATION = OutputConfiguration(
def default_clingo_control():
"""Return a control object with the default settings used in Spack"""
- control = clingo.Control()
+ control = clingo().Control()
control.configuration.configuration = "tweety"
control.configuration.solver.heuristic = "Domain"
control.configuration.solver.opt_strategy = "usc,one"
return control
-# backward compatibility functions for clingo ASTs
-def ast_getter(*names):
- def getter(node):
- for name in names:
- result = getattr(node, name, None)
- if result:
- return result
- raise KeyError("node has no such keys: %s" % names)
-
- return getter
-
-
-ast_type = ast_getter("ast_type", "type")
-ast_sym = ast_getter("symbol", "term")
-
-
class Provenance(enum.IntEnum):
"""Enumeration of the possible provenances of a version."""
@@ -158,6 +117,8 @@ class Provenance(enum.IntEnum):
PACKAGE_PY = enum.auto()
# An installed spec
INSTALLED = enum.auto()
+ # lower provenance for installed git refs so concretizer prefers StandardVersion installs
+ INSTALLED_GIT_VERSION = enum.auto()
# A runtime injected from another package (e.g. a compiler)
RUNTIME = enum.auto()
@@ -165,15 +126,21 @@ class Provenance(enum.IntEnum):
return f"{self._name_.lower()}"
-class RequirementKind(enum.Enum):
- """Purpose / provenance of a requirement"""
+@contextmanager
+def named_spec(
+ spec: Optional["spack.spec.Spec"], name: Optional[str]
+) -> Iterator[Optional["spack.spec.Spec"]]:
+ """Context manager to temporarily set the name of a spec"""
+ if spec is None or name is None:
+ yield spec
+ return
- #: Default requirement expressed under the 'all' attribute of packages.yaml
- DEFAULT = enum.auto()
- #: Requirement expressed on a virtual package
- VIRTUAL = enum.auto()
- #: Requirement expressed on a specific package
- PACKAGE = enum.auto()
+ old_name = spec.name
+ spec.name = name
+ try:
+ yield spec
+ finally:
+ spec.name = old_name
class DeclaredVersion(NamedTuple):
@@ -299,92 +266,12 @@ def specify(spec):
return spack.spec.Spec(spec)
-class AspObject:
- """Object representing a piece of ASP code."""
-
-
-def _id(thing):
- """Quote string if needed for it to be a valid identifier."""
- if isinstance(thing, AspObject):
- return thing
- elif isinstance(thing, bool):
- return '"%s"' % str(thing)
- elif isinstance(thing, int):
- return str(thing)
- else:
- return '"%s"' % str(thing)
-
-
-@llnl.util.lang.key_ordering
-class AspFunction(AspObject):
- __slots__ = ["name", "args"]
-
- def __init__(self, name, args=None):
- self.name = name
- self.args = () if args is None else tuple(args)
-
- def _cmp_key(self):
- return self.name, self.args
-
- def __call__(self, *args):
- """Return a new instance of this function with added arguments.
-
- Note that calls are additive, so you can do things like::
-
- >>> attr = AspFunction("attr")
- attr()
-
- >>> attr("version")
- attr("version")
-
- >>> attr("version")("foo")
- attr("version", "foo")
-
- >>> v = AspFunction("attr", "version")
- attr("version")
-
- >>> v("foo", "bar")
- attr("version", "foo", "bar")
-
- """
- return AspFunction(self.name, self.args + args)
-
- def symbol(self, positive=True):
- def argify(arg):
- if isinstance(arg, bool):
- return clingo.String(str(arg))
- elif isinstance(arg, int):
- return clingo.Number(arg)
- elif isinstance(arg, AspFunction):
- return clingo.Function(arg.name, [argify(x) for x in arg.args], positive=positive)
- else:
- return clingo.String(str(arg))
-
- return clingo.Function(self.name, [argify(arg) for arg in self.args], positive=positive)
-
- def __str__(self):
- return "%s(%s)" % (self.name, ", ".join(str(_id(arg)) for arg in self.args))
-
- def __repr__(self):
- return str(self)
-
-
-class AspFunctionBuilder:
- def __getattr__(self, name):
- return AspFunction(name)
-
-
-fn = AspFunctionBuilder()
-
-TransformFunction = Callable[[spack.spec.Spec, List[AspFunction]], List[AspFunction]]
-
-
def remove_node(spec: spack.spec.Spec, facts: List[AspFunction]) -> List[AspFunction]:
"""Transformation that removes all "node" and "virtual_node" from the input list of facts."""
return list(filter(lambda x: x.args[0] not in ("node", "virtual_node"), facts))
-def _create_counter(specs, tests):
+def _create_counter(specs: List[spack.spec.Spec], tests: bool):
strategy = spack.config.CONFIG.get("concretizer:duplicates:strategy", "none")
if strategy == "full":
return FullDuplicatesCounter(specs, tests=tests)
@@ -393,8 +280,38 @@ def _create_counter(specs, tests):
return NoDuplicatesCounter(specs, tests=tests)
-def all_compilers_in_config():
- return spack.compilers.all_compilers()
+def all_libcs() -> Set[spack.spec.Spec]:
+ """Return a set of all libc specs targeted by any configured compiler. If none, fall back to
+ libc determined from the current Python process if dynamically linked."""
+
+ libcs = {
+ c.default_libc
+ for c in spack.compilers.all_compilers_from(spack.config.CONFIG)
+ if c.default_libc
+ }
+
+ if libcs:
+ return libcs
+
+ libc = spack.util.libc.libc_from_current_python_process()
+ return {libc} if libc else set()
+
+
+def libc_is_compatible(lhs: spack.spec.Spec, rhs: spack.spec.Spec) -> List[spack.spec.Spec]:
+ return (
+ lhs.name == rhs.name
+ and lhs.external_path == rhs.external_path
+ and lhs.version >= rhs.version
+ )
+
+
+def using_libc_compatibility() -> bool:
+ """Returns True if we are currently using libc compatibility"""
+ return spack.platforms.host().name == "linux"
+
+
+def c_compiler_runs(compiler: spack.compiler.Compiler) -> bool:
+ return compiler.compiler_verbose_output is not None
def extend_flag_list(flag_list, new_flags):
@@ -417,7 +334,7 @@ def check_packages_exist(specs):
for spec in specs:
for s in spec.traverse():
try:
- check_passed = repo.exists(s.name) or repo.is_virtual(s.name)
+ check_passed = repo.repo_for_pkg(s).exists(s.name) or repo.is_virtual(s.name)
except Exception as e:
msg = "Cannot find package: {0}".format(str(e))
check_passed = False
@@ -537,7 +454,7 @@ class Result:
"""
Raise an appropriate error if the result is unsatisfiable.
- The error is an InternalConcretizerError, and includes the minimized cores
+ The error is an SolverError, and includes the minimized cores
resulting from the solve, formatted to be human readable.
"""
if self.satisfiable:
@@ -548,7 +465,7 @@ class Result:
constraints = constraints[0]
conflicts = self.format_minimal_cores()
- raise InternalConcretizerError(constraints, conflicts=conflicts)
+ raise SolverError(constraints, conflicts=conflicts)
@property
def specs(self):
@@ -561,7 +478,10 @@ class Result:
@property
def unsolved_specs(self):
- """List of abstract input specs that were not solved."""
+ """List of tuples pairing abstract input specs that were not
+ solved with their associated candidate spec from the solver
+ (if the solve completed).
+ """
if self._unsolved_specs is None:
self._compute_specs_from_answer_set()
return self._unsolved_specs
@@ -575,7 +495,7 @@ class Result:
def _compute_specs_from_answer_set(self):
if not self.satisfiable:
self._concrete_specs = []
- self._unsolved_specs = self.abstract_specs
+ self._unsolved_specs = list((x, None) for x in self.abstract_specs)
self._concrete_specs_by_input = {}
return
@@ -584,6 +504,8 @@ class Result:
best = min(self.answers)
opt, _, answer = best
for input_spec in self.abstract_specs:
+ # The specs must be unified to get here, so it is safe to associate any satisfying spec
+ # with the input. Multiple inputs may be matched to the same concrete spec
node = SpecBuilder.make_node(pkg=input_spec.name)
if input_spec.virtual:
providers = [
@@ -595,8 +517,30 @@ class Result:
if candidate and candidate.satisfies(input_spec):
self._concrete_specs.append(answer[node])
self._concrete_specs_by_input[input_spec] = answer[node]
+ elif candidate and candidate.build_spec.satisfies(input_spec):
+ tty.warn(
+ "explicit splice configuration has caused the concretized spec"
+ f" {candidate} not to satisfy the input spec {input_spec}"
+ )
+ self._concrete_specs.append(answer[node])
+ self._concrete_specs_by_input[input_spec] = answer[node]
else:
- self._unsolved_specs.append(input_spec)
+ self._unsolved_specs.append((input_spec, candidate))
+
+ @staticmethod
+ def format_unsolved(unsolved_specs):
+ """Create a message providing info on unsolved user specs and for
+ each one show the associated candidate spec from the solver (if
+ there is one).
+ """
+ msg = "Unsatisfied input specs:"
+ for input_spec, candidate in unsolved_specs:
+ msg += f"\n\tInput spec: {str(input_spec)}"
+ if candidate:
+ msg += f"\n\tCandidate spec: {str(candidate)}"
+ else:
+ msg += "\n\t(No candidate specs from solver)"
+ return msg
def _normalize_packages_yaml(packages_yaml):
@@ -640,19 +584,6 @@ def _is_checksummed_version(version_info: Tuple[GitOrStandardVersion, dict]):
return _is_checksummed_git_version(version)
-def _concretization_version_order(version_info: Tuple[GitOrStandardVersion, dict]):
- """Version order key for concretization, where preferred > not preferred,
- not deprecated > deprecated, finite > any infinite component; only if all are
- the same, do we use default version ordering."""
- version, info = version_info
- return (
- info.get("preferred", False),
- not info.get("deprecated", False),
- not version.isdevelop(),
- version,
- )
-
-
def _spec_with_default_name(spec_str, name):
"""Return a spec with a default name if none is provided, used for requirement specs"""
spec = spack.spec.Spec(spec_str)
@@ -661,75 +592,27 @@ def _spec_with_default_name(spec_str, name):
return spec
-def bootstrap_clingo():
- global clingo, ASTType, parse_files
-
- if not clingo:
- import spack.bootstrap
-
- with spack.bootstrap.ensure_bootstrap_configuration():
- spack.bootstrap.ensure_core_dependencies()
- import clingo
-
- from clingo.ast import ASTType
-
- try:
- from clingo.ast import parse_files
- except ImportError:
- # older versions of clingo have this one namespace up
- from clingo import parse_files
-
-
-class NodeArgument(NamedTuple):
- id: str
- pkg: str
-
-
-def intermediate_repr(sym):
- """Returns an intermediate representation of clingo models for Spack's spec builder.
+def _external_config_with_implicit_externals(configuration):
+ # Read packages.yaml and normalize it, so that it will not contain entries referring to
+ # virtual packages.
+ packages_yaml = _normalize_packages_yaml(configuration.get("packages"))
- Currently, transforms symbols from clingo models either to strings or to NodeArgument objects.
+ # Add externals for libc from compilers on Linux
+ if not using_libc_compatibility():
+ return packages_yaml
- Returns:
- This will turn a ``clingo.Symbol`` into a string or NodeArgument, or a sequence of
- ``clingo.Symbol`` objects into a tuple of those objects.
- """
- # TODO: simplify this when we no longer have to support older clingo versions.
- if isinstance(sym, (list, tuple)):
- return tuple(intermediate_repr(a) for a in sym)
-
- try:
- if sym.name == "node":
- return NodeArgument(
- id=intermediate_repr(sym.arguments[0]), pkg=intermediate_repr(sym.arguments[1])
- )
- except RuntimeError:
- # This happens when using clingo w/ CFFI and trying to access ".name" for symbols
- # that are not functions
- pass
-
- if clingo_cffi:
- # Clingo w/ CFFI will throw an exception on failure
- try:
- return sym.string
- except RuntimeError:
- return str(sym)
- else:
- return sym.string or str(sym)
-
-
-def extract_args(model, predicate_name):
- """Extract the arguments to predicates with the provided name from a model.
-
- Pull out all the predicates with name ``predicate_name`` from the model, and
- return their intermediate representation.
- """
- return [intermediate_repr(sym.arguments) for sym in model if sym.name == predicate_name]
+ for compiler in spack.compilers.all_compilers_from(configuration):
+ libc = compiler.default_libc
+ if libc:
+ entry = {"spec": f"{libc} %{compiler.spec}", "prefix": libc.external_path}
+ packages_yaml.setdefault(libc.name, {}).setdefault("externals", []).append(entry)
+ return packages_yaml
class ErrorHandler:
- def __init__(self, model):
+ def __init__(self, model, input_specs: List[spack.spec.Spec]):
self.model = model
+ self.input_specs = input_specs
self.full_model = None
def multiple_values_error(self, attribute, pkg):
@@ -816,19 +699,20 @@ class ErrorHandler:
return msg
def message(self, errors) -> str:
- messages = [
- f" {idx+1: 2}. {self.handle_error(msg, *args)}"
+ input_specs = ", ".join(elide_list([f"`{s}`" for s in self.input_specs], 5))
+ header = f"failed to concretize {input_specs} for the following reasons:"
+ messages = (
+ f" {idx+1:2}. {self.handle_error(msg, *args)}"
for idx, (_, msg, args) in enumerate(errors)
- ]
- header = "concretization failed for the following reasons:\n"
- return "\n".join([header] + messages)
+ )
+ return "\n".join((header, *messages))
def raise_if_errors(self):
initial_error_args = extract_args(self.model, "error")
if not initial_error_args:
return
- error_causation = clingo.Control()
+ error_causation = clingo().Control()
parent_dir = pathlib.Path(__file__).parent
errors_lp = parent_dir / "error_messages.lp"
@@ -857,14 +741,29 @@ class ErrorHandler:
f"unexpected error during concretization [{str(e)}]. "
f"Please report a bug at https://github.com/spack/spack/issues"
)
- raise spack.error.SpackError(msg)
+ raise spack.error.SpackError(msg) from e
raise UnsatisfiableSpecError(msg)
-#: Data class to collect information on a requirement
-RequirementRule = collections.namedtuple(
- "RequirementRule", ["pkg_name", "policy", "requirements", "condition", "kind", "message"]
-)
+class KnownCompiler(NamedTuple):
+ """Data class to collect information on compilers"""
+
+ spec: "spack.spec.Spec"
+ os: str
+ target: str
+ available: bool
+ compiler_obj: Optional["spack.compiler.Compiler"]
+
+ def _key(self):
+ return self.spec, self.os, self.target
+
+ def __eq__(self, other: object):
+ if not isinstance(other, KnownCompiler):
+ return NotImplemented
+ return self._key() == other._key()
+
+ def __hash__(self):
+ return hash(self._key())
class PyclingoDriver:
@@ -875,54 +774,9 @@ class PyclingoDriver:
cores (bool): whether to generate unsatisfiable cores for better
error reporting.
"""
- bootstrap_clingo()
-
- self.out = llnl.util.lang.Devnull()
self.cores = cores
-
- # These attributes are part of the object, but will be reset
- # at each call to solve
+ # This attribute will be reset at each call to solve
self.control = None
- self.backend = None
- self.assumptions = None
-
- def title(self, name, char):
- self.out.write("\n")
- self.out.write("%" + (char * 76))
- self.out.write("\n")
- self.out.write("%% %s\n" % name)
- self.out.write("%" + (char * 76))
- self.out.write("\n")
-
- def h1(self, name):
- self.title(name, "=")
-
- def h2(self, name):
- self.title(name, "-")
-
- def newline(self):
- self.out.write("\n")
-
- def fact(self, head):
- """ASP fact (a rule without a body).
-
- Arguments:
- head (AspFunction): ASP function to generate as fact
- """
- symbol = head.symbol() if hasattr(head, "symbol") else head
-
- # This is commented out to avoid evaluating str(symbol) when we have no stream
- if not isinstance(self.out, llnl.util.lang.Devnull):
- self.out.write(f"{str(symbol)}.\n")
-
- atom = self.backend.add_atom(symbol)
-
- # Only functions relevant for constructing bug reports for bad error messages
- # are assumptions, and only when using cores.
- choice = self.cores and symbol.name == "internal_error"
- self.backend.add_rule([atom], [], choice=choice)
- if choice:
- self.assumptions.append(atom)
def solve(self, setup, specs, reuse=None, output=None, control=None, allow_deprecated=False):
"""Set up the input and solve for dependencies of ``specs``.
@@ -941,58 +795,49 @@ class PyclingoDriver:
A tuple of the solve result, the timer for the different phases of the
solve, and the internal statistics from clingo.
"""
- output = output or DEFAULT_OUTPUT_CONFIGURATION
- # allow solve method to override the output stream
- if output.out is not None:
- self.out = output.out
+ # avoid circular import
+ import spack.bootstrap.core
+ output = output or DEFAULT_OUTPUT_CONFIGURATION
timer = spack.util.timer.Timer()
# Initialize the control object for the solver
self.control = control or default_clingo_control()
- # set up the problem -- this generates facts and rules
- self.assumptions = []
- timer.start("setup")
- with self.control.backend() as backend:
- self.backend = backend
- setup.setup(self, specs, reuse=reuse, allow_deprecated=allow_deprecated)
- timer.stop("setup")
-
- timer.start("load")
- # read in the main ASP program and display logic -- these are
- # handwritten, not generated, so we load them as resources
- parent_dir = os.path.dirname(__file__)
- # extract error messages from concretize.lp by inspecting its AST
- with self.backend:
+ # ensure core deps are present on Windows
+ # needs to modify active config scope, so cannot be run within
+ # bootstrap config scope
+ if sys.platform == "win32":
+ tty.debug("Ensuring basic dependencies {win-sdk, wgl} available")
+ spack.bootstrap.core.ensure_winsdk_external_or_raise()
- def visit(node):
- if ast_type(node) == ASTType.Rule:
- for term in node.body:
- if ast_type(term) == ASTType.Literal:
- if ast_type(term.atom) == ASTType.SymbolicAtom:
- name = ast_sym(term.atom).name
- if name == "internal_error":
- arg = ast_sym(ast_sym(term.atom).arguments[0])
- self.fact(AspFunction(name)(arg.string))
-
- self.h1("Error messages")
- path = os.path.join(parent_dir, "concretize.lp")
- parse_files([path], visit)
-
- # If we're only doing setup, just return an empty solve result
+ timer.start("setup")
+ asp_problem = setup.setup(specs, reuse=reuse, allow_deprecated=allow_deprecated)
+ if output.out is not None:
+ output.out.write(asp_problem)
if output.setup_only:
return Result(specs), None, None
+ timer.stop("setup")
+ timer.start("load")
+ # Add the problem instance
+ self.control.add("base", [], asp_problem)
# Load the file itself
+ parent_dir = os.path.dirname(__file__)
self.control.load(os.path.join(parent_dir, "concretize.lp"))
self.control.load(os.path.join(parent_dir, "heuristic.lp"))
- if spack.config.CONFIG.get("concretizer:duplicates:strategy", "none") != "none":
- self.control.load(os.path.join(parent_dir, "heuristic_separate.lp"))
- self.control.load(os.path.join(parent_dir, "os_compatibility.lp"))
self.control.load(os.path.join(parent_dir, "display.lp"))
if not setup.concretize_everything:
self.control.load(os.path.join(parent_dir, "when_possible.lp"))
+
+ # Binary compatibility is based on libc on Linux, and on the os tag elsewhere
+ if using_libc_compatibility():
+ self.control.load(os.path.join(parent_dir, "libc_compatibility.lp"))
+ else:
+ self.control.load(os.path.join(parent_dir, "os_compatibility.lp"))
+ if setup.enable_splicing:
+ self.control.load(os.path.join(parent_dir, "splices.lp"))
+
timer.stop("load")
# Grounding is the first step in the solve -- it turns our facts
@@ -1002,7 +847,6 @@ class PyclingoDriver:
timer.stop("ground")
# With a grounded program, we can run the solve.
- result = Result(specs)
models = [] # stable models if things go well
cores = [] # unsatisfiable cores if they do not
@@ -1010,28 +854,45 @@ class PyclingoDriver:
models.append((model.cost, model.symbols(shown=True, terms=True)))
solve_kwargs = {
- "assumptions": self.assumptions,
+ "assumptions": setup.assumptions,
"on_model": on_model,
"on_core": cores.append,
}
- if clingo_cffi:
+ if clingo_cffi():
solve_kwargs["on_unsat"] = cores.append
timer.start("solve")
- solve_result = self.control.solve(**solve_kwargs)
+ time_limit = spack.config.CONFIG.get("concretizer:timeout", -1)
+ error_on_timeout = spack.config.CONFIG.get("concretizer:error_on_timeout", True)
+ # Spack uses 0 to set no time limit, clingo API uses -1
+ if time_limit == 0:
+ time_limit = -1
+ with self.control.solve(**solve_kwargs, async_=True) as handle:
+ finished = handle.wait(time_limit)
+ if not finished:
+ specs_str = ", ".join(llnl.util.lang.elide_list([str(s) for s in specs], 4))
+ header = f"Spack is taking more than {time_limit} seconds to solve for {specs_str}"
+ if error_on_timeout:
+ raise UnsatisfiableSpecError(f"{header}, stopping concretization")
+ warnings.warn(f"{header}, using the best configuration found so far")
+ handle.cancel()
+
+ solve_result = handle.get()
timer.stop("solve")
# once done, construct the solve result
+ result = Result(specs)
result.satisfiable = solve_result.satisfiable
if result.satisfiable:
+ timer.start("construct_specs")
# get the best model
builder = SpecBuilder(specs, hash_lookup=setup.reusable_and_possible)
min_cost, best_model = min(models)
# first check for errors
- error_handler = ErrorHandler(best_model)
+ error_handler = ErrorHandler(best_model, specs)
error_handler.raise_if_errors()
# build specs from spec attributes in the model
@@ -1050,7 +911,8 @@ class PyclingoDriver:
# record the possible dependencies in the solve
result.possible_dependencies = setup.pkgs
-
+ timer.stop("construct_specs")
+ timer.stop()
elif cores:
result.control = self.control
result.cores.extend(cores)
@@ -1063,6 +925,16 @@ class PyclingoDriver:
print("Statistics:")
pprint.pprint(self.control.statistics)
+ result.raise_if_unsat()
+
+ if result.satisfiable and result.unsolved_specs and setup.concretize_everything:
+ unsolved_str = Result.format_unsolved(result.unsolved_specs)
+ raise InternalConcretizerError(
+ "Internal Spack error: the solver completed but produced specs"
+ " that do not satisfy the request. Please report a bug at "
+ f"https://github.com/spack/spack/issues\n\t{unsolved_str}"
+ )
+
return result, timer, self.control.statistics
@@ -1075,14 +947,26 @@ class ConcreteSpecsByHash(collections.abc.Mapping):
def __init__(self) -> None:
self.data: Dict[str, spack.spec.Spec] = {}
+ self.explicit: Set[str] = set()
def __getitem__(self, dag_hash: str) -> spack.spec.Spec:
return self.data[dag_hash]
+ def explicit_items(self) -> Iterator[Tuple[str, spack.spec.Spec]]:
+ """Iterate on items that have been added explicitly, and not just as a dependency
+ of other nodes.
+ """
+ for h, s in self.items():
+ # We need to make an exception for gcc-runtime, until we can splice it.
+ if h in self.explicit or s.name == "gcc-runtime":
+ yield h, s
+
def add(self, spec: spack.spec.Spec) -> bool:
"""Adds a new concrete spec to the mapping. Returns True if the spec was just added,
False if the spec was already in the mapping.
+ Calling this function marks the spec as added explicitly.
+
Args:
spec: spec to be added
@@ -1097,6 +981,7 @@ class ConcreteSpecsByHash(collections.abc.Mapping):
raise ValueError(msg)
dag_hash = spec.dag_hash()
+ self.explicit.add(dag_hash)
if dag_hash in self.data:
return False
@@ -1130,34 +1015,139 @@ class ConcreteSpecsByHash(collections.abc.Mapping):
return iter(self.data)
-class SpackSolverSetup:
- """Class to set up and run a Spack concretization solve."""
+# types for condition caching in solver setup
+ConditionSpecKey = Tuple[str, Optional[TransformFunction]]
+ConditionIdFunctionPair = Tuple[int, List[AspFunction]]
+ConditionSpecCache = Dict[str, Dict[ConditionSpecKey, ConditionIdFunctionPair]]
+
+
+class ConstraintOrigin(enum.Enum):
+ """Generates identifiers that can be pased into the solver attached
+ to constraints, and then later retrieved to determine the origin of
+ those constraints when ``SpecBuilder`` creates Specs from the solve
+ result.
+ """
+
+ DEPENDS_ON = 1
+ REQUIRE = 2
+
+ @staticmethod
+ def _SUFFIXES() -> Dict["ConstraintOrigin", str]:
+ return {ConstraintOrigin.DEPENDS_ON: "_dep", ConstraintOrigin.REQUIRE: "_req"}
+
+ @staticmethod
+ def append_type_suffix(pkg_id: str, kind: "ConstraintOrigin") -> str:
+ """Given a package identifier and a constraint kind, generate a string ID."""
+ suffix = ConstraintOrigin._SUFFIXES()[kind]
+ return f"{pkg_id}{suffix}"
+
+ @staticmethod
+ def strip_type_suffix(source: str) -> Tuple[int, Optional[str]]:
+ """Take a combined package/type ID generated by
+ ``append_type_suffix``, and extract the package ID and
+ an associated weight.
+ """
+ if not source:
+ return -1, None
+ for kind, suffix in ConstraintOrigin._SUFFIXES().items():
+ if source.endswith(suffix):
+ return kind.value, source[: -len(suffix)]
+ return -1, source
+
+
+class SourceContext:
+ """Tracks context in which a Spec's clause-set is generated (i.e.
+ with ``SpackSolverSetup.spec_clauses``).
+
+ Facts generated for the spec may include this context.
+ """
+
+ def __init__(self):
+ # This can be "literal" for constraints that come from a user
+ # spec (e.g. from the command line); it can be the output of
+ # `ConstraintOrigin.append_type_suffix`; the default is "none"
+ # (which means it isn't important to keep track of the source
+ # in that case).
+ self.source = "none"
- def __init__(self, tests=False):
- self.gen = None # set by setup()
- self.declared_versions = collections.defaultdict(list)
- self.possible_versions = collections.defaultdict(set)
- self.deprecated_versions = collections.defaultdict(set)
+class ConditionIdContext(SourceContext):
+ """Derived from a ``ConditionContext``: for clause-sets generated by
+ imposed/required specs, stores an associated transform.
- self.possible_virtuals = None
- self.possible_compilers = []
- self.possible_oses = set()
- self.variant_values_from_specs = set()
- self.version_constraints = set()
- self.target_constraints = set()
- self.default_targets = []
- self.compiler_version_constraints = set()
- self.post_facts = []
+ This is primarily used for tracking whether we are generating clauses
+ in the context of a required spec, or for an imposed spec.
- # (ID, CompilerSpec) -> dictionary of attributes
- self.compiler_info = collections.defaultdict(dict)
+ Is not a subclass of ``ConditionContext`` because it exists in a
+ lower-level context with less information.
+ """
+
+ def __init__(self):
+ super().__init__()
+ self.transform = None
+
+
+class ConditionContext(SourceContext):
+ """Tracks context in which a condition (i.e. ``SpackSolverSetup.condition``)
+ is generated (e.g. for a `depends_on`).
+
+ This may modify the required/imposed specs generated as relevant
+ for the context.
+ """
+
+ def __init__(self):
+ super().__init__()
+ # transformation applied to facts from the required spec. Defaults
+ # to leave facts as they are.
+ self.transform_required = None
+ # transformation applied to facts from the imposed spec. Defaults
+ # to removing "node" and "virtual_node" facts.
+ self.transform_imposed = None
+
+ def requirement_context(self) -> ConditionIdContext:
+ ctxt = ConditionIdContext()
+ ctxt.source = self.source
+ ctxt.transform = self.transform_required
+ return ctxt
+
+ def impose_context(self) -> ConditionIdContext:
+ ctxt = ConditionIdContext()
+ ctxt.source = self.source
+ ctxt.transform = self.transform_imposed
+ return ctxt
+
+
+class SpackSolverSetup:
+ """Class to set up and run a Spack concretization solve."""
+
+ def __init__(self, tests: bool = False):
+ # these are all initialized in setup()
+ self.gen: "ProblemInstanceBuilder" = ProblemInstanceBuilder()
+ self.requirement_parser = RequirementParser(spack.config.CONFIG)
+ self.possible_virtuals: Set[str] = set()
+
+ self.assumptions: List[Tuple["clingo.Symbol", bool]] = [] # type: ignore[name-defined]
+ self.declared_versions: Dict[str, List[DeclaredVersion]] = collections.defaultdict(list)
+ self.possible_versions: Dict[str, Set[GitOrStandardVersion]] = collections.defaultdict(set)
+ self.deprecated_versions: Dict[str, Set[GitOrStandardVersion]] = collections.defaultdict(
+ set
+ )
+
+ self.possible_compilers: List = []
+ self.possible_oses: Set = set()
+ self.variant_values_from_specs: Set = set()
+ self.version_constraints: Set = set()
+ self.target_constraints: Set = set()
+ self.default_targets: List = []
+ self.compiler_version_constraints: Set = set()
+ self.post_facts: List = []
+ self.variant_ids_by_def_id: Dict[int, int] = {}
- self.reusable_and_possible = ConcreteSpecsByHash()
+ self.reusable_and_possible: ConcreteSpecsByHash = ConcreteSpecsByHash()
- self._id_counter = itertools.count()
- self._trigger_cache = collections.defaultdict(dict)
- self._effect_cache = collections.defaultdict(dict)
+ self._id_counter: Iterator[int] = itertools.count()
+ self._trigger_cache: ConditionSpecCache = collections.defaultdict(dict)
+ self._effect_cache: ConditionSpecCache = collections.defaultdict(dict)
# Caches to optimize the setup phase of the solver
self.target_specs_cache = None
@@ -1169,7 +1159,14 @@ class SpackSolverSetup:
self.concretize_everything = True
# Set during the call to setup
- self.pkgs = None
+ self.pkgs: Set[str] = set()
+ self.explicitly_required_namespaces: Dict[str, str] = {}
+
+ # list of unique libc specs targeted by compilers (or an educated guess if no compiler)
+ self.libcs: List[spack.spec.Spec] = []
+
+ # If true, we have to load the code for synthesizing splices
+ self.enable_splicing: bool = spack.config.CONFIG.get("concretizer:splice:automatic")
def pkg_version_rules(self, pkg):
"""Output declared versions of a package.
@@ -1182,7 +1179,9 @@ class SpackSolverSetup:
# Origins are sorted by "provenance" first, see the Provenance enumeration above
return version.origin, version.idx
- pkg = packagize(pkg)
+ if isinstance(pkg, str):
+ pkg = self.pkg_class(pkg)
+
declared_versions = self.declared_versions[pkg.name]
partially_sorted_versions = sorted(set(declared_versions), key=key_fn)
@@ -1234,170 +1233,98 @@ class SpackSolverSetup:
return [fn.attr("node_target_satisfies", spec.name, target)]
def conflict_rules(self, pkg):
- default_msg = "{0}: '{1}' conflicts with '{2}'"
- no_constraint_msg = "{0}: conflicts with '{1}'"
- for trigger, constraints in pkg.conflicts.items():
- trigger_msg = f"conflict is triggered when {str(trigger)}"
- trigger_spec = spack.spec.Spec(trigger)
- trigger_id = self.condition(
- trigger_spec, name=trigger_spec.name or pkg.name, msg=trigger_msg
- )
+ for when_spec, conflict_specs in pkg.conflicts.items():
+ when_spec_msg = "conflict constraint %s" % str(when_spec)
+ when_spec_id = self.condition(when_spec, required_name=pkg.name, msg=when_spec_msg)
- for constraint, conflict_msg in constraints:
+ for conflict_spec, conflict_msg in conflict_specs:
+ conflict_spec = spack.spec.Spec(conflict_spec)
if conflict_msg is None:
- if constraint == spack.spec.Spec():
- conflict_msg = no_constraint_msg.format(pkg.name, trigger)
+ conflict_msg = f"{pkg.name}: "
+ if when_spec == spack.spec.Spec():
+ conflict_msg += f"conflicts with '{conflict_spec}'"
else:
- conflict_msg = default_msg.format(pkg.name, trigger, constraint)
-
- spec_for_msg = (
- spack.spec.Spec(pkg.name) if constraint == spack.spec.Spec() else constraint
+ conflict_msg += f"'{conflict_spec}' conflicts with '{when_spec}'"
+
+ spec_for_msg = conflict_spec
+ if conflict_spec == spack.spec.Spec():
+ spec_for_msg = spack.spec.Spec(pkg.name)
+ conflict_spec_msg = f"conflict is triggered when {str(spec_for_msg)}"
+ conflict_spec_id = self.condition(
+ conflict_spec,
+ required_name=conflict_spec.name or pkg.name,
+ msg=conflict_spec_msg,
)
- constraint_msg = f"conflict applies to spec {str(spec_for_msg)}"
- constraint_id = self.condition(constraint, name=pkg.name, msg=constraint_msg)
self.gen.fact(
- fn.pkg_fact(pkg.name, fn.conflict(trigger_id, constraint_id, conflict_msg))
+ fn.pkg_fact(
+ pkg.name, fn.conflict(conflict_spec_id, when_spec_id, conflict_msg)
+ )
)
self.gen.newline()
+ def package_languages(self, pkg):
+ for when_spec, languages in pkg.languages.items():
+ condition_msg = f"{pkg.name} needs the {', '.join(sorted(languages))} language"
+ if when_spec != spack.spec.Spec():
+ condition_msg += f" when {when_spec}"
+ condition_id = self.condition(when_spec, required_name=pkg.name, msg=condition_msg)
+ for language in sorted(languages):
+ self.gen.fact(fn.pkg_fact(pkg.name, fn.language(condition_id, language)))
+ self.gen.newline()
+
+ def config_compatible_os(self):
+ """Facts about compatible os's specified in configs"""
+ self.gen.h2("Compatible OS from concretizer config file")
+ os_data = spack.config.get("concretizer:os_compatible", {})
+ for recent, reusable in os_data.items():
+ for old in reusable:
+ self.gen.fact(fn.os_compatible(recent, old))
+ self.gen.newline()
+
def compiler_facts(self):
"""Facts about available compilers."""
self.gen.h2("Available compilers")
- indexed_possible_compilers = list(enumerate(self.possible_compilers))
- for compiler_id, compiler in indexed_possible_compilers:
+ for compiler_id, compiler in enumerate(self.possible_compilers):
self.gen.fact(fn.compiler_id(compiler_id))
self.gen.fact(fn.compiler_name(compiler_id, compiler.spec.name))
self.gen.fact(fn.compiler_version(compiler_id, compiler.spec.version))
- if compiler.operating_system:
- self.gen.fact(fn.compiler_os(compiler_id, compiler.operating_system))
-
- if compiler.target == "any":
- compiler.target = None
+ if compiler.os:
+ self.gen.fact(fn.compiler_os(compiler_id, compiler.os))
if compiler.target is not None:
self.gen.fact(fn.compiler_target(compiler_id, compiler.target))
- for flag_type, flags in compiler.flags.items():
- for flag in flags:
- self.gen.fact(fn.compiler_flag(compiler_id, flag_type, flag))
-
- self.gen.newline()
-
- # Set compiler defaults, given a list of possible compilers
- self.gen.h2("Default compiler preferences (CompilerID, Weight)")
+ if compiler.compiler_obj is not None:
+ c = compiler.compiler_obj
+ for flag_type, flags in c.flags.items():
+ flag_group = " ".join(flags)
+ for flag in flags:
+ self.gen.fact(fn.compiler_flag(compiler_id, flag_type, flag, flag_group))
- ppk = spack.package_prefs.PackagePrefs("all", "compiler", all=False)
- matches = sorted(indexed_possible_compilers, key=lambda x: ppk(x[1].spec))
+ if compiler.available:
+ self.gen.fact(fn.compiler_available(compiler_id))
- for weight, (compiler_id, cspec) in enumerate(matches):
- f = fn.compiler_weight(compiler_id, weight)
- self.gen.fact(f)
+ self.gen.fact(fn.compiler_weight(compiler_id, compiler_id))
+ self.gen.newline()
def package_requirement_rules(self, pkg):
- rules = self.requirement_rules_from_package_py(pkg)
- rules.extend(self.requirement_rules_from_packages_yaml(pkg))
- self.emit_facts_from_requirement_rules(rules)
-
- def requirement_rules_from_package_py(self, pkg):
- rules = []
- for requirements, conditions in pkg.requirements.items():
- for when_spec, policy, message in conditions:
- rules.append(
- RequirementRule(
- pkg_name=pkg.name,
- policy=policy,
- requirements=requirements,
- kind=RequirementKind.PACKAGE,
- condition=when_spec,
- message=message,
- )
- )
- return rules
-
- def requirement_rules_from_packages_yaml(self, pkg):
- pkg_name = pkg.name
- config = spack.config.get("packages")
- requirements = config.get(pkg_name, {}).get("require", [])
- kind = RequirementKind.PACKAGE
- if not requirements:
- requirements = config.get("all", {}).get("require", [])
- kind = RequirementKind.DEFAULT
- return self._rules_from_requirements(pkg_name, requirements, kind=kind)
-
- def _rules_from_requirements(
- self, pkg_name: str, requirements, *, kind: RequirementKind
- ) -> List[RequirementRule]:
- """Manipulate requirements from packages.yaml, and return a list of tuples
- with a uniform structure (name, policy, requirements).
- """
- if isinstance(requirements, str):
- requirements = [requirements]
-
- rules = []
- for requirement in requirements:
- # A string is equivalent to a one_of group with a single element
- if isinstance(requirement, str):
- requirement = {"one_of": [requirement]}
-
- for policy in ("spec", "one_of", "any_of"):
- if policy not in requirement:
- continue
-
- constraints = requirement[policy]
- # "spec" is for specifying a single spec
- if policy == "spec":
- constraints = [constraints]
- policy = "one_of"
-
- constraints = [
- x
- for x in constraints
- if not self.reject_requirement_constraint(pkg_name, constraint=x, kind=kind)
- ]
- if not constraints:
- continue
-
- rules.append(
- RequirementRule(
- pkg_name=pkg_name,
- policy=policy,
- requirements=constraints,
- kind=kind,
- message=requirement.get("message"),
- condition=requirement.get("when"),
- )
- )
- return rules
-
- def reject_requirement_constraint(
- self, pkg_name: str, *, constraint: str, kind: RequirementKind
- ) -> bool:
- """Returns True if a requirement constraint should be rejected"""
- if kind == RequirementKind.DEFAULT:
- # Requirements under all: are applied only if they are satisfiable considering only
- # package rules, so e.g. variants must exist etc. Otherwise, they are rejected.
- try:
- s = spack.spec.Spec(pkg_name)
- s.constrain(constraint)
- s.validate_or_raise()
- except spack.error.SpackError as e:
- tty.debug(
- f"[SETUP] Rejecting the default '{constraint}' requirement "
- f"on '{pkg_name}': {str(e)}",
- level=2,
- )
- return True
- return False
+ self.emit_facts_from_requirement_rules(self.requirement_parser.rules(pkg))
def pkg_rules(self, pkg, tests):
- pkg = packagize(pkg)
+ pkg = self.pkg_class(pkg)
+
+ # Namespace of the package
+ self.gen.fact(fn.pkg_fact(pkg.name, fn.namespace(pkg.namespace)))
# versions
self.pkg_version_rules(pkg)
self.gen.newline()
+ # languages
+ self.package_languages(pkg)
+
# variants
self.variant_rules(pkg)
@@ -1410,6 +1337,10 @@ class SpackSolverSetup:
# dependencies
self.package_dependencies_rules(pkg)
+ # splices
+ if self.enable_splicing:
+ self.package_splice_rules(pkg)
+
# virtual preferences
self.virtual_preferences(
pkg.name,
@@ -1424,6 +1355,9 @@ class SpackSolverSetup:
def trigger_rules(self):
"""Flushes all the trigger rules collected so far, and clears the cache."""
+ if not self._trigger_cache:
+ return
+
self.gen.h2("Trigger conditions")
for name in self._trigger_cache:
cache = self._trigger_cache[name]
@@ -1437,6 +1371,9 @@ class SpackSolverSetup:
def effect_rules(self):
"""Flushes all the effect rules collected so far, and clears the cache."""
+ if not self._effect_cache:
+ return
+
self.gen.h2("Imposed requirements")
for name in self._effect_cache:
cache = self._effect_cache[name]
@@ -1448,165 +1385,218 @@ class SpackSolverSetup:
self.gen.newline()
self._effect_cache.clear()
- def variant_rules(self, pkg):
- for name, entry in sorted(pkg.variants.items()):
- variant, when = entry
+ def define_variant(
+ self,
+ pkg: "Type[spack.package_base.PackageBase]",
+ name: str,
+ when: spack.spec.Spec,
+ variant_def: vt.Variant,
+ ):
+ pkg_fact = lambda f: self.gen.fact(fn.pkg_fact(pkg.name, f))
- if spack.spec.Spec() in when:
- # unconditional variant
- self.gen.fact(fn.pkg_fact(pkg.name, fn.variant(name)))
- else:
- # conditional variant
- for w in when:
- msg = "%s has variant %s" % (pkg.name, name)
- if str(w):
- msg += " when %s" % w
-
- cond_id = self.condition(w, name=pkg.name, msg=msg)
- self.gen.fact(fn.pkg_fact(pkg.name, fn.conditional_variant(cond_id, name)))
-
- single_value = not variant.multi
- if single_value:
- self.gen.fact(fn.pkg_fact(pkg.name, fn.variant_single_value(name)))
- self.gen.fact(
- fn.pkg_fact(
- pkg.name, fn.variant_default_value_from_package_py(name, variant.default)
- )
+ # Every variant id has a unique definition (conditional or unconditional), and
+ # higher variant id definitions take precedence when variants intersect.
+ vid = next(self._id_counter)
+
+ # used to find a variant id from its variant definition (for variant values on specs)
+ self.variant_ids_by_def_id[id(variant_def)] = vid
+
+ if when == spack.spec.Spec():
+ # unconditional variant
+ pkg_fact(fn.variant_definition(name, vid))
+ else:
+ # conditional variant
+ msg = f"Package {pkg.name} has variant '{name}' when {when}"
+ cond_id = self.condition(when, required_name=pkg.name, msg=msg)
+ pkg_fact(fn.variant_condition(name, vid, cond_id))
+
+ # record type so we can construct the variant when we read it back in
+ self.gen.fact(fn.variant_type(vid, variant_def.variant_type.value))
+
+ if variant_def.sticky:
+ pkg_fact(fn.variant_sticky(vid))
+
+ # define defaults for this variant definition
+ defaults = variant_def.make_default().value if variant_def.multi else [variant_def.default]
+ for val in sorted(defaults):
+ pkg_fact(fn.variant_default_value_from_package_py(vid, val))
+
+ # define possible values for this variant definition
+ values = variant_def.values
+ if values is None:
+ values = []
+
+ elif isinstance(values, vt.DisjointSetsOfValues):
+ union = set()
+ for sid, s in enumerate(values.sets):
+ for value in s:
+ pkg_fact(fn.variant_value_from_disjoint_sets(vid, value, sid))
+ union.update(s)
+ values = union
+
+ # ensure that every variant has at least one possible value.
+ if not values:
+ values = [variant_def.default]
+
+ for value in sorted(values):
+ pkg_fact(fn.variant_possible_value(vid, value))
+
+ # we're done here for unconditional values
+ if not isinstance(value, vt.ConditionalValue):
+ continue
+
+ # make a spec indicating whether the variant has this conditional value
+ variant_has_value = spack.spec.Spec()
+ variant_has_value.variants[name] = spack.variant.AbstractVariant(name, value.value)
+
+ if value.when:
+ # the conditional value is always "possible", but it imposes its when condition as
+ # a constraint if the conditional value is taken. This may seem backwards, but it
+ # ensures that the conditional can only occur when its condition holds.
+ self.condition(
+ required_spec=variant_has_value,
+ imposed_spec=value.when,
+ required_name=pkg.name,
+ imposed_name=pkg.name,
+ msg=f"{pkg.name} variant {name} has value '{value.value}' when {value.when}",
)
else:
- spec_variant = variant.make_default()
- defaults = spec_variant.value
- for val in sorted(defaults):
- self.gen.fact(
- fn.pkg_fact(pkg.name, fn.variant_default_value_from_package_py(name, val))
- )
+ vstring = f"{name}='{value.value}'"
+
+ # We know the value is never allowed statically (when was None), but we can't just
+ # ignore it b/c it could come in as a possible value and we need a good error msg.
+ # So, it's a conflict -- if the value is somehow used, it'll trigger an error.
+ trigger_id = self.condition(
+ variant_has_value,
+ required_name=pkg.name,
+ msg=f"invalid variant value: {vstring}",
+ )
+ constraint_id = self.condition(
+ spack.spec.Spec(),
+ required_name=pkg.name,
+ msg="empty (total) conflict constraint",
+ )
+ msg = f"variant value {vstring} is conditionally disabled"
+ pkg_fact(fn.conflict(trigger_id, constraint_id, msg))
- values = variant.values
- if values is None:
- values = []
- elif isinstance(values, spack.variant.DisjointSetsOfValues):
- union = set()
- # Encode the disjoint sets in the logic program
- for sid, s in enumerate(values.sets):
- for value in s:
- self.gen.fact(
- fn.pkg_fact(
- pkg.name, fn.variant_value_from_disjoint_sets(name, value, sid)
- )
- )
- union.update(s)
- values = union
-
- # make sure that every variant has at least one possible value
- if not values:
- values = [variant.default]
-
- for value in sorted(values):
- if getattr(value, "when", True) is not True: # when=True means unconditional
- condition_spec = spack.spec.Spec("{0}={1}".format(name, value))
- if value.when is False:
- # This value is a conflict
- # Cannot just prevent listing it as a possible value because it could
- # also come in as a possible value from the command line
- trigger_id = self.condition(
- condition_spec,
- name=pkg.name,
- msg="invalid variant value {0}={1}".format(name, value),
- )
- constraint_id = self.condition(
- spack.spec.Spec(),
- name=pkg.name,
- msg="empty (total) conflict constraint",
- )
- msg = "variant {0}={1} is conditionally disabled".format(name, value)
- self.gen.fact(
- fn.pkg_fact(pkg.name, fn.conflict(trigger_id, constraint_id, msg))
- )
- else:
- imposed = spack.spec.Spec(value.when)
- imposed.name = pkg.name
-
- self.condition(
- required_spec=condition_spec,
- imposed_spec=imposed,
- name=pkg.name,
- msg="%s variant %s value %s when %s" % (pkg.name, name, value, when),
- )
- self.gen.fact(fn.pkg_fact(pkg.name, fn.variant_possible_value(name, value)))
+ self.gen.newline()
- if variant.sticky:
- self.gen.fact(fn.pkg_fact(pkg.name, fn.variant_sticky(name)))
+ def define_auto_variant(self, name: str, multi: bool):
+ self.gen.h3(f"Special variant: {name}")
+ vid = next(self._id_counter)
+ self.gen.fact(fn.auto_variant(name, vid))
+ self.gen.fact(
+ fn.variant_type(
+ vid, vt.VariantType.MULTI.value if multi else vt.VariantType.SINGLE.value
+ )
+ )
- self.gen.newline()
+ def variant_rules(self, pkg: "Type[spack.package_base.PackageBase]"):
+ for name in pkg.variant_names():
+ self.gen.h3(f"Variant {name} in package {pkg.name}")
+ for when, variant_def in pkg.variant_definitions(name):
+ self.define_variant(pkg, name, when, variant_def)
+
+ def _get_condition_id(
+ self,
+ named_cond: spack.spec.Spec,
+ cache: ConditionSpecCache,
+ body: bool,
+ context: ConditionIdContext,
+ ) -> int:
+ """Get the id for one half of a condition (either a trigger or an imposed constraint).
+
+ Construct a key from the condition spec and any associated transformation, and
+ cache the ASP functions that they imply. The saved functions will be output
+ later in ``trigger_rules()`` and ``effect_rules()``.
+
+ Returns:
+ The id of the cached trigger or effect.
+
+ """
+ pkg_cache = cache[named_cond.name]
+
+ named_cond_key = (str(named_cond), context.transform)
+ result = pkg_cache.get(named_cond_key)
+ if result:
+ return result[0]
+
+ cond_id = next(self._id_counter)
+ requirements = self.spec_clauses(named_cond, body=body, context=context)
+ if context.transform:
+ requirements = context.transform(named_cond, requirements)
+ pkg_cache[named_cond_key] = (cond_id, requirements)
+
+ return cond_id
def condition(
self,
required_spec: spack.spec.Spec,
imposed_spec: Optional[spack.spec.Spec] = None,
- name: Optional[str] = None,
+ *,
+ required_name: Optional[str] = None,
+ imposed_name: Optional[str] = None,
msg: Optional[str] = None,
- transform_required: Optional[TransformFunction] = None,
- transform_imposed: Optional[TransformFunction] = remove_node,
+ context: Optional[ConditionContext] = None,
):
"""Generate facts for a dependency or virtual provider condition.
Arguments:
required_spec: the constraints that triggers this condition
imposed_spec: the constraints that are imposed when this condition is triggered
- name: name for `required_spec` (required if required_spec is anonymous, ignored if not)
+ required_name: name for ``required_spec``
+ (required if required_spec is anonymous, ignored if not)
+ imposed_name: name for ``imposed_spec``
+ (required if imposed_spec is anonymous, ignored if not)
msg: description of the condition
- transform_required: transformation applied to facts from the required spec. Defaults
- to leave facts as they are.
- transform_imposed: transformation applied to facts from the imposed spec. Defaults
- to removing "node" and "virtual_node" facts.
+ context: if provided, indicates how to modify the clause-sets for the required/imposed
+ specs based on the type of constraint they are generated for (e.g. `depends_on`)
Returns:
int: id of the condition created by this function
"""
- named_cond = required_spec.copy()
- named_cond.name = named_cond.name or name
- assert named_cond.name, "must provide name for anonymous conditions!"
+ required_name = required_spec.name or required_name
+ if not required_name:
+ raise ValueError(f"Must provide a name for anonymous condition: '{required_spec}'")
- # Check if we can emit the requirements before updating the condition ID counter.
- # In this way, if a condition can't be emitted but the exception is handled in the caller,
- # we won't emit partial facts.
+ if not context:
+ context = ConditionContext()
+ context.transform_imposed = remove_node
- condition_id = next(self._id_counter)
- self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition(condition_id)))
- self.gen.fact(fn.condition_reason(condition_id, msg))
+ if imposed_spec:
+ imposed_name = imposed_spec.name or imposed_name
+ if not imposed_name:
+ raise ValueError(f"Must provide a name for imposed constraint: '{imposed_spec}'")
- cache = self._trigger_cache[named_cond.name]
+ with named_spec(required_spec, required_name), named_spec(imposed_spec, imposed_name):
+ # Check if we can emit the requirements before updating the condition ID counter.
+ # In this way, if a condition can't be emitted but the exception is handled in the
+ # caller, we won't emit partial facts.
- named_cond_key = (str(named_cond), transform_required)
- if named_cond_key not in cache:
- trigger_id = next(self._id_counter)
- requirements = self.spec_clauses(named_cond, body=True, required_from=name)
-
- if transform_required:
- requirements = transform_required(named_cond, requirements)
+ condition_id = next(self._id_counter)
+ requirement_context = context.requirement_context()
+ trigger_id = self._get_condition_id(
+ required_spec, cache=self._trigger_cache, body=True, context=requirement_context
+ )
+ self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id)))
+ self.gen.fact(fn.condition_reason(condition_id, msg))
+ self.gen.fact(
+ fn.pkg_fact(required_spec.name, fn.condition_trigger(condition_id, trigger_id))
+ )
+ if not imposed_spec:
+ return condition_id
- cache[named_cond_key] = (trigger_id, requirements)
- trigger_id, requirements = cache[named_cond_key]
- self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition_trigger(condition_id, trigger_id)))
+ impose_context = context.impose_context()
+ effect_id = self._get_condition_id(
+ imposed_spec, cache=self._effect_cache, body=False, context=impose_context
+ )
+ self.gen.fact(
+ fn.pkg_fact(required_spec.name, fn.condition_effect(condition_id, effect_id))
+ )
- if not imposed_spec:
return condition_id
- cache = self._effect_cache[named_cond.name]
- imposed_spec_key = (str(imposed_spec), transform_imposed)
- if imposed_spec_key not in cache:
- effect_id = next(self._id_counter)
- requirements = self.spec_clauses(imposed_spec, body=False, required_from=name)
-
- if transform_imposed:
- requirements = transform_imposed(imposed_spec, requirements)
-
- cache[imposed_spec_key] = (effect_id, requirements)
- effect_id, requirements = cache[imposed_spec_key]
- self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition_effect(condition_id, effect_id)))
- return condition_id
-
- def impose(self, condition_id, imposed_spec, node=True, name=None, body=False):
- imposed_constraints = self.spec_clauses(imposed_spec, body=body, required_from=name)
+ def impose(self, condition_id, imposed_spec, node=True, body=False):
+ imposed_constraints = self.spec_clauses(imposed_spec, body=body)
for pred in imposed_constraints:
# imposed "node"-like conditions are no-ops
if not node and pred.args[0] in ("node", "virtual_node"):
@@ -1614,25 +1604,26 @@ class SpackSolverSetup:
self.gen.fact(fn.imposed_constraint(condition_id, *pred.args))
def package_provider_rules(self, pkg):
- for provider_name in sorted(set(s.name for s in pkg.provided.keys())):
- if provider_name not in self.possible_virtuals:
+ for vpkg_name in pkg.provided_virtual_names():
+ if vpkg_name not in self.possible_virtuals:
continue
- self.gen.fact(fn.pkg_fact(pkg.name, fn.possible_provider(provider_name)))
+ self.gen.fact(fn.pkg_fact(pkg.name, fn.possible_provider(vpkg_name)))
- for provided, whens in pkg.provided.items():
- if provided.name not in self.possible_virtuals:
- continue
- for when in whens:
- msg = "%s provides %s when %s" % (pkg.name, provided, when)
- condition_id = self.condition(when, provided, pkg.name, msg)
+ for when, provided in pkg.provided.items():
+ for vpkg in provided:
+ if vpkg.name not in self.possible_virtuals:
+ continue
+
+ msg = f"{pkg.name} provides {vpkg} when {when}"
+ condition_id = self.condition(when, vpkg, required_name=pkg.name, msg=msg)
self.gen.fact(
- fn.pkg_fact(when.name, fn.provider_condition(condition_id, provided.name))
+ fn.pkg_fact(when.name, fn.provider_condition(condition_id, vpkg.name))
)
self.gen.newline()
for when, sets_of_virtuals in pkg.provided_together.items():
condition_id = self.condition(
- when, name=pkg.name, msg="Virtuals are provided together"
+ when, required_name=pkg.name, msg="Virtuals are provided together"
)
for set_id, virtuals_together in enumerate(sets_of_virtuals):
for name in virtuals_together:
@@ -1643,8 +1634,8 @@ class SpackSolverSetup:
def package_dependencies_rules(self, pkg):
"""Translate 'depends_on' directives into ASP logic."""
- for _, conditions in sorted(pkg.dependencies.items()):
- for cond, dep in sorted(conditions.items()):
+ for cond, deps_by_name in sorted(pkg.dependencies.items()):
+ for _, dep in sorted(deps_by_name.items()):
depflag = dep.depflag
# Skip test dependencies if they're not requested
if not self.tests:
@@ -1677,17 +1668,105 @@ class SpackSolverSetup:
if t & depflag
]
- self.condition(
- cond,
- dep.spec,
- name=pkg.name,
- msg=msg,
- transform_required=track_dependencies,
- transform_imposed=dependency_holds,
+ context = ConditionContext()
+ context.source = ConstraintOrigin.append_type_suffix(
+ pkg.name, ConstraintOrigin.DEPENDS_ON
)
+ context.transform_required = track_dependencies
+ context.transform_imposed = dependency_holds
+
+ self.condition(cond, dep.spec, required_name=pkg.name, msg=msg, context=context)
self.gen.newline()
+ def _gen_match_variant_splice_constraints(
+ self,
+ pkg,
+ cond_spec: "spack.spec.Spec",
+ splice_spec: "spack.spec.Spec",
+ hash_asp_var: "AspVar",
+ splice_node,
+ match_variants: List[str],
+ ):
+ # If there are no variants to match, no constraints are needed
+ variant_constraints = []
+ for i, variant_name in enumerate(match_variants):
+ vari_defs = pkg.variant_definitions(variant_name)
+ # the spliceable config of the package always includes the variant
+ if vari_defs != [] and any(cond_spec.satisfies(s) for (s, _) in vari_defs):
+ variant = vari_defs[0][1]
+ if variant.multi:
+ continue # cannot automatically match multi-valued variants
+ value_var = AspVar(f"VariValue{i}")
+ attr_constraint = fn.attr("variant_value", splice_node, variant_name, value_var)
+ hash_attr_constraint = fn.hash_attr(
+ hash_asp_var, "variant_value", splice_spec.name, variant_name, value_var
+ )
+ variant_constraints.append(attr_constraint)
+ variant_constraints.append(hash_attr_constraint)
+ return variant_constraints
+
+ def package_splice_rules(self, pkg):
+ self.gen.h2("Splice rules")
+ for i, (cond, (spec_to_splice, match_variants)) in enumerate(
+ sorted(pkg.splice_specs.items())
+ ):
+ with named_spec(cond, pkg.name):
+ self.version_constraints.add((cond.name, cond.versions))
+ self.version_constraints.add((spec_to_splice.name, spec_to_splice.versions))
+ hash_var = AspVar("Hash")
+ splice_node = fn.node(AspVar("NID"), cond.name)
+ when_spec_attrs = [
+ fn.attr(c.args[0], splice_node, *(c.args[2:]))
+ for c in self.spec_clauses(cond, body=True, required_from=None)
+ if c.args[0] != "node"
+ ]
+ splice_spec_hash_attrs = [
+ fn.hash_attr(hash_var, *(c.args))
+ for c in self.spec_clauses(spec_to_splice, body=True, required_from=None)
+ if c.args[0] != "node"
+ ]
+ if match_variants is None:
+ variant_constraints = []
+ elif match_variants == "*":
+ filt_match_variants = set()
+ for map in pkg.variants.values():
+ for k in map:
+ filt_match_variants.add(k)
+ filt_match_variants = list(filt_match_variants)
+ variant_constraints = self._gen_match_variant_splice_constraints(
+ pkg, cond, spec_to_splice, hash_var, splice_node, filt_match_variants
+ )
+ else:
+ if any(
+ v in cond.variants or v in spec_to_splice.variants for v in match_variants
+ ):
+ raise Exception(
+ "Overlap between match_variants and explicitly set variants"
+ )
+ variant_constraints = self._gen_match_variant_splice_constraints(
+ pkg, cond, spec_to_splice, hash_var, splice_node, match_variants
+ )
+
+ rule_head = fn.abi_splice_conditions_hold(
+ i, splice_node, spec_to_splice.name, hash_var
+ )
+ rule_body_components = (
+ [
+ # splice_set_fact,
+ fn.attr("node", splice_node),
+ fn.installed_hash(spec_to_splice.name, hash_var),
+ ]
+ + when_spec_attrs
+ + splice_spec_hash_attrs
+ + variant_constraints
+ )
+ rule_body = ",\n ".join(str(r) for r in rule_body_components)
+ rule = f"{rule_head} :-\n {rule_body}."
+ self.gen.append(rule)
+
+ self.gen.newline()
+
def virtual_preferences(self, pkg_name, func):
"""Call func(vspec, provider, i) for each of pkg's provider prefs."""
config = spack.config.get("packages")
@@ -1703,31 +1782,18 @@ class SpackSolverSetup:
def provider_defaults(self):
self.gen.h2("Default virtual providers")
- msg = (
- "Internal Error: possible_virtuals is not populated. Please report to the spack"
- " maintainers"
- )
- assert self.possible_virtuals is not None, msg
self.virtual_preferences(
"all", lambda v, p, i: self.gen.fact(fn.default_provider_preference(v, p, i))
)
def provider_requirements(self):
self.gen.h2("Requirements on virtual providers")
- msg = (
- "Internal Error: possible_virtuals is not populated. Please report to the spack"
- " maintainers"
- )
- packages_yaml = spack.config.CONFIG.get("packages")
- assert self.possible_virtuals is not None, msg
for virtual_str in sorted(self.possible_virtuals):
- requirements = packages_yaml.get(virtual_str, {}).get("require", [])
- rules = self._rules_from_requirements(
- virtual_str, requirements, kind=RequirementKind.VIRTUAL
- )
- self.emit_facts_from_requirement_rules(rules)
- self.trigger_rules()
- self.effect_rules()
+ rules = self.requirement_parser.rules_from_virtual(virtual_str)
+ if rules:
+ self.emit_facts_from_requirement_rules(rules)
+ self.trigger_rules()
+ self.effect_rules()
def emit_facts_from_requirement_rules(self, rules: List[RequirementRule]):
"""Generate facts to enforce requirements.
@@ -1739,18 +1805,14 @@ class SpackSolverSetup:
virtual = rule.kind == RequirementKind.VIRTUAL
pkg_name, policy, requirement_grp = rule.pkg_name, rule.policy, rule.requirements
-
requirement_weight = 0
- main_requirement_condition = spack.directives.make_when_spec(rule.condition)
- if main_requirement_condition is False:
- continue
# Write explicitly if a requirement is conditional or not
- if main_requirement_condition != spack.spec.Spec():
+ if rule.condition != spack.spec.Spec():
msg = f"condition to activate requirement {requirement_grp_id}"
try:
main_condition_id = self.condition(
- main_requirement_condition, name=pkg_name, msg=msg
+ rule.condition, required_name=pkg_name, msg=msg
)
except Exception as e:
if rule.kind != RequirementKind.DEFAULT:
@@ -1769,8 +1831,8 @@ class SpackSolverSetup:
self.gen.fact(fn.requirement_message(pkg_name, requirement_grp_id, rule.message))
self.gen.newline()
- for spec_str in requirement_grp:
- spec = spack.spec.Spec(spec_str)
+ for input_spec in requirement_grp:
+ spec = spack.spec.Spec(input_spec)
if not spec.name:
spec.name = pkg_name
spec.attach_git_version_lookup()
@@ -1780,17 +1842,21 @@ class SpackSolverSetup:
when_spec = spack.spec.Spec(pkg_name)
try:
- # With virtual we want to emit "node" and "virtual_node" in imposed specs
- transform: Optional[TransformFunction] = remove_node
- if virtual:
- transform = None
+ context = ConditionContext()
+ context.source = ConstraintOrigin.append_type_suffix(
+ pkg_name, ConstraintOrigin.REQUIRE
+ )
+ if not virtual:
+ context.transform_imposed = remove_node
+ # else: for virtuals we want to emit "node" and
+ # "virtual_node" in imposed specs
member_id = self.condition(
required_spec=when_spec,
imposed_spec=spec,
- name=pkg_name,
- transform_imposed=transform,
- msg=f"{spec_str} is a requirement for package {pkg_name}",
+ required_name=pkg_name,
+ msg=f"{input_spec} is a requirement for package {pkg_name}",
+ context=context,
)
except Exception as e:
# Do not raise if the rule comes from the 'all' subsection, since usability
@@ -1808,23 +1874,47 @@ class SpackSolverSetup:
requirement_weight += 1
def external_packages(self):
- """Facts on external packages, as read from packages.yaml"""
- # Read packages.yaml and normalize it, so that it
- # will not contain entries referring to virtual
- # packages.
- packages_yaml = spack.config.get("packages")
- packages_yaml = _normalize_packages_yaml(packages_yaml)
+ """Facts on external packages, from packages.yaml and implicit externals."""
+ packages_yaml = _external_config_with_implicit_externals(spack.config.CONFIG)
self.gen.h1("External packages")
+ spec_filters = []
+ concretizer_yaml = spack.config.get("concretizer")
+ reuse_yaml = concretizer_yaml.get("reuse")
+ if isinstance(reuse_yaml, typing.Mapping):
+ default_include = reuse_yaml.get("include", [])
+ default_exclude = reuse_yaml.get("exclude", [])
+ libc_externals = list(all_libcs())
+ for source in reuse_yaml.get("from", []):
+ if source["type"] != "external":
+ continue
+
+ include = source.get("include", default_include)
+ if include:
+ # Since libcs are implicit externals, we need to implicitly include them
+ include = include + libc_externals
+ exclude = source.get("exclude", default_exclude)
+ spec_filters.append(
+ SpecFilter(
+ factory=lambda: [],
+ is_usable=lambda x: True,
+ include=include,
+ exclude=exclude,
+ )
+ )
+
for pkg_name, data in packages_yaml.items():
if pkg_name == "all":
continue
- # This package does not appear in any repository
- if pkg_name not in spack.repo.PATH:
+ # package isn't a possible dependency and can't be in the solution
+ if pkg_name not in self.pkgs:
+ continue
+
+ # This package is not among possible dependencies
+ if pkg_name not in self.pkgs:
continue
- self.gen.h2("External package: {0}".format(pkg_name))
# Check if the external package is buildable. If it is
# not then "external(<pkg>)" is a fact, unless we can
# reuse an already installed spec.
@@ -1834,14 +1924,50 @@ class SpackSolverSetup:
# Read a list of all the specs for this package
externals = data.get("externals", [])
- external_specs = [spack.spec.parse_with_version_concrete(x["spec"]) for x in externals]
+ candidate_specs = [
+ spack.spec.parse_with_version_concrete(x["spec"]) for x in externals
+ ]
+
+ selected_externals = set()
+ if spec_filters:
+ for current_filter in spec_filters:
+ current_filter.factory = lambda: candidate_specs
+ selected_externals.update(current_filter.selected_specs())
+
+ # Emit facts for externals specs. Note that "local_idx" is the index of the spec
+ # in packages:<pkg_name>:externals. This means:
+ #
+ # packages:<pkg_name>:externals[local_idx].spec == spec
+ external_versions = []
+ for local_idx, spec in enumerate(candidate_specs):
+ msg = f"{spec.name} available as external when satisfying {spec}"
+
+ if spec_filters and spec not in selected_externals:
+ continue
+
+ if not spec.versions.concrete:
+ warnings.warn(f"cannot use the external spec {spec}: needs a concrete version")
+ continue
+
+ def external_imposition(input_spec, requirements):
+ return requirements + [
+ fn.attr("external_conditions_hold", input_spec.name, local_idx)
+ ]
+
+ try:
+ context = ConditionContext()
+ context.transform_imposed = external_imposition
+ self.condition(spec, spec, msg=msg, context=context)
+ except (spack.error.SpecError, RuntimeError) as e:
+ warnings.warn(f"while setting up external spec {spec}: {e}")
+ continue
+ external_versions.append((spec.version, local_idx))
+ self.possible_versions[spec.name].add(spec.version)
+ self.gen.newline()
# Order the external versions to prefer more recent versions
# even if specs in packages.yaml are not ordered that way
external_versions = [
- (x.version, external_id) for external_id, x in enumerate(external_specs)
- ]
- external_versions = [
(v, idx, external_id)
for idx, (v, external_id) in enumerate(sorted(external_versions, reverse=True))
]
@@ -1850,23 +1976,8 @@ class SpackSolverSetup:
DeclaredVersion(version=version, idx=idx, origin=Provenance.EXTERNAL)
)
- # Declare external conditions with a local index into packages.yaml
- for local_idx, spec in enumerate(external_specs):
- msg = "%s available as external when satisfying %s" % (spec.name, spec)
-
- def external_imposition(input_spec, _):
- return [fn.attr("external_conditions_hold", input_spec.name, local_idx)]
-
- self.condition(
- spec,
- spack.spec.Spec(spec.name),
- msg=msg,
- transform_imposed=external_imposition,
- )
- self.possible_versions[spec.name].add(spec.version)
- self.gen.newline()
-
self.trigger_rules()
+ self.effect_rules()
def preferred_variants(self, pkg_name):
"""Facts on concretization preferences, as read from packages.yaml"""
@@ -1877,23 +1988,19 @@ class SpackSolverSetup:
for variant_name in sorted(preferred_variants):
variant = preferred_variants[variant_name]
- values = variant.value
-
- if not isinstance(values, tuple):
- values = (values,)
# perform validation of the variant and values
- spec = spack.spec.Spec(pkg_name)
try:
- spec.update_variant_validate(variant_name, values)
- except (spack.variant.InvalidVariantValueError, KeyError, ValueError) as e:
+ variant_defs = vt.prevalidate_variant_value(self.pkg_class(pkg_name), variant)
+ except (vt.InvalidVariantValueError, KeyError, ValueError) as e:
tty.debug(
f"[SETUP]: rejected {str(variant)} as a preference for {pkg_name}: {str(e)}"
)
continue
- for value in values:
- self.variant_values_from_specs.add((pkg_name, variant.name, value))
+ for value in variant.value_as_tuple:
+ for variant_def in variant_defs:
+ self.variant_values_from_specs.add((pkg_name, id(variant_def), value))
self.gen.fact(
fn.variant_default_value_from_packages_yaml(pkg_name, variant.name, value)
)
@@ -1912,52 +2019,62 @@ class SpackSolverSetup:
for i, preferred in enumerate(package_targets):
self.gen.fact(fn.target_weight(str(preferred.architecture.target), i))
- def flag_defaults(self):
- self.gen.h2("Compiler flag defaults")
-
- # types of flags that can be on specs
- for flag in spack.spec.FlagMap.valid_compiler_flags():
- self.gen.fact(fn.flag_type(flag))
- self.gen.newline()
+ def spec_clauses(
+ self,
+ spec: spack.spec.Spec,
+ *,
+ body: bool = False,
+ transitive: bool = True,
+ expand_hashes: bool = False,
+ concrete_build_deps=False,
+ required_from: Optional[str] = None,
+ context: Optional[SourceContext] = None,
+ ) -> List[AspFunction]:
+ """Wrap a call to `_spec_clauses()` into a try/except block with better error handling.
- # flags from compilers.yaml
- compilers = all_compilers_in_config()
- for compiler in compilers:
- for name, flags in compiler.flags.items():
- for flag in flags:
- self.gen.fact(
- fn.compiler_version_flag(compiler.name, compiler.version, name, flag)
- )
+ Arguments are as for ``_spec_clauses()`` except ``required_from``.
- def spec_clauses(self, *args, **kwargs):
- """Wrap a call to `_spec_clauses()` into a try/except block that
- raises a comprehensible error message in case of failure.
+ Arguments:
+ required_from: name of package that caused this call.
"""
- requestor = kwargs.pop("required_from", None)
try:
- clauses = self._spec_clauses(*args, **kwargs)
+ clauses = self._spec_clauses(
+ spec,
+ body=body,
+ transitive=transitive,
+ expand_hashes=expand_hashes,
+ concrete_build_deps=concrete_build_deps,
+ context=context,
+ )
except RuntimeError as exc:
msg = str(exc)
- if requestor:
- msg += ' [required from package "{0}"]'.format(requestor)
+ if required_from:
+ msg += f" [required from package '{required_from}']"
raise RuntimeError(msg)
return clauses
def _spec_clauses(
- self, spec, body=False, transitive=True, expand_hashes=False, concrete_build_deps=False
- ):
+ self,
+ spec: spack.spec.Spec,
+ *,
+ body: bool = False,
+ transitive: bool = True,
+ expand_hashes: bool = False,
+ concrete_build_deps: bool = False,
+ context: Optional[SourceContext] = None,
+ ) -> List[AspFunction]:
"""Return a list of clauses for a spec mandates are true.
Arguments:
- 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
- dependencies (default True)
- expand_hashes (bool): if True, descend into hashes of concrete specs
- (default False)
- concrete_build_deps (bool): if False, do not include pure build deps
- of concrete specs (as they have no effect on runtime constraints)
+ spec: the spec to analyze
+ body: if True, generate clauses to be used in rule bodies (final values) instead
+ of rule heads (setters).
+ transitive: if False, don't generate clauses from dependencies (default True)
+ expand_hashes: if True, descend into hashes of concrete specs (default False)
+ concrete_build_deps: if False, do not include pure build deps of concrete specs
+ (as they have no effect on runtime constraints)
+ context: tracks what constraint this clause set is generated for (e.g. a
+ `depends_on` constraint in a package.py file)
Normally, if called with ``transitive=True``, ``spec_clauses()`` just generates
hashes for the dependency requirements of concrete specs. If ``expand_hashes``
@@ -1967,39 +2084,12 @@ class SpackSolverSetup:
"""
clauses = []
- # TODO: do this with consistent suffixes.
- class Head:
- node = fn.attr("node")
- virtual_node = fn.attr("virtual_node")
- node_platform = fn.attr("node_platform_set")
- node_os = fn.attr("node_os_set")
- node_target = fn.attr("node_target_set")
- variant_value = fn.attr("variant_set")
- node_compiler = fn.attr("node_compiler_set")
- node_compiler_version = fn.attr("node_compiler_version_set")
- node_flag = fn.attr("node_flag_set")
- node_flag_source = fn.attr("node_flag_source")
- node_flag_propagate = fn.attr("node_flag_propagate")
- variant_propagation_candidate = fn.attr("variant_propagation_candidate")
-
- class Body:
- node = fn.attr("node")
- virtual_node = fn.attr("virtual_node")
- node_platform = fn.attr("node_platform")
- node_os = fn.attr("node_os")
- node_target = fn.attr("node_target")
- variant_value = fn.attr("variant_value")
- node_compiler = fn.attr("node_compiler")
- node_compiler_version = fn.attr("node_compiler_version")
- node_flag = fn.attr("node_flag")
- node_flag_source = fn.attr("node_flag_source")
- node_flag_propagate = fn.attr("node_flag_propagate")
- variant_propagation_candidate = fn.attr("variant_propagation_candidate")
-
- f = Body if body else Head
+ f: Union[Type[_Head], Type[_Body]] = _Body if body else _Head
if spec.name:
clauses.append(f.node(spec.name) if not spec.virtual else f.virtual_node(spec.name))
+ if spec.namespace:
+ clauses.append(f.namespace(spec.name, spec.namespace))
clauses.extend(self.spec_versions(spec))
@@ -2016,41 +2106,30 @@ class SpackSolverSetup:
# variants
for vname, variant in sorted(spec.variants.items()):
- values = variant.value
- if not isinstance(values, (list, tuple)):
- values = [values]
-
- for value in values:
- # * is meaningless for concretization -- just for matching
- if value == "*":
- continue
+ # TODO: variant="*" means 'variant is defined to something', which used to
+ # be meaningless in concretization, as all variants had to be defined. But
+ # now that variants can be conditional, it should force a variant to exist.
+ if variant.value == ("*",):
+ continue
- # validate variant value only if spec not concrete
- if not spec.concrete:
- reserved_names = spack.directives.reserved_names
- if not spec.virtual and vname not in reserved_names:
- pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
- try:
- variant_def, _ = pkg_cls.variants[vname]
- except KeyError:
- msg = 'variant "{0}" not found in package "{1}"'
- raise RuntimeError(msg.format(vname, spec.name))
- else:
- variant_def.validate_or_raise(
- variant, spack.repo.PATH.get_pkg_class(spec.name)
- )
+ for value in variant.value_as_tuple:
+ # ensure that the value *can* be valid for the spec
+ if spec.name and not spec.concrete and not spec.virtual:
+ variant_defs = vt.prevalidate_variant_value(
+ self.pkg_class(spec.name), variant, spec
+ )
- clauses.append(f.variant_value(spec.name, vname, value))
+ # Record that that this is a valid possible value. Accounts for
+ # int/str/etc., where valid values can't be listed in the package
+ for variant_def in variant_defs:
+ self.variant_values_from_specs.add((spec.name, id(variant_def), value))
if variant.propagate:
- clauses.append(
- f.variant_propagation_candidate(spec.name, vname, value, spec.name)
- )
-
- # Tell the concretizer that this is a possible value for the
- # variant, to account for things like int/str values where we
- # can't enumerate the valid values
- self.variant_values_from_specs.add((spec.name, vname, value))
+ clauses.append(f.propagate(spec.name, fn.variant_value(vname, value)))
+ if self.pkg_class(spec.name).has_variant(vname):
+ clauses.append(f.variant_value(spec.name, vname, value))
+ else:
+ clauses.append(f.variant_value(spec.name, vname, value))
# compiler and compiler version
if spec.compiler:
@@ -2075,18 +2154,28 @@ class SpackSolverSetup:
self.compiler_version_constraints.add(spec.compiler)
# compiler flags
+ source = context.source if context else "none"
for flag_type, flags in spec.compiler_flags.items():
+ flag_group = " ".join(flags)
for flag in flags:
- clauses.append(f.node_flag(spec.name, flag_type, flag))
- clauses.append(f.node_flag_source(spec.name, flag_type, spec.name))
+ clauses.append(
+ f.node_flag(spec.name, fn.node_flag(flag_type, flag, flag_group, source))
+ )
if not spec.concrete and flag.propagate is True:
- clauses.append(f.node_flag_propagate(spec.name, flag_type))
+ clauses.append(
+ f.propagate(
+ spec.name,
+ fn.node_flag(flag_type, flag, flag_group, source),
+ fn.edge_types("link", "run"),
+ )
+ )
# dependencies
if spec.concrete:
# older specs do not have package hashes, so we have to do this carefully
- if getattr(spec, "_package_hash", None):
- clauses.append(fn.attr("package_hash", spec.name, spec._package_hash))
+ package_hash = getattr(spec, "_package_hash", None)
+ if package_hash:
+ clauses.append(fn.attr("package_hash", spec.name, package_hash))
clauses.append(fn.attr("hash", spec.name, spec.dag_hash()))
edges = spec.edges_from_dependents()
@@ -2099,6 +2188,11 @@ class SpackSolverSetup:
for virtual in virtuals:
clauses.append(fn.attr("virtual_on_incoming_edges", spec.name, virtual))
+ # If the spec is external and concrete, we allow all the libcs on the system
+ if spec.external and spec.concrete and using_libc_compatibility():
+ for libc in self.libcs:
+ clauses.append(fn.attr("compatible_libc", spec.name, libc.name, libc.version))
+
# add all clauses from dependencies
if transitive:
# TODO: Eventually distinguish 2 deps on the same pkg (build and link)
@@ -2106,6 +2200,21 @@ class SpackSolverSetup:
dep = dspec.spec
if spec.concrete:
+ # GCC runtime is solved again by clingo, even on concrete specs, to give
+ # the possibility to reuse specs built against a different runtime.
+ if dep.name == "gcc-runtime":
+ continue
+
+ # libc is also solved again by clingo, but in this case the compatibility
+ # is not encoded in the parent node - so we need to emit explicit facts
+ if "libc" in dspec.virtuals:
+ for libc in self.libcs:
+ if libc_is_compatible(libc, dep):
+ clauses.append(
+ fn.attr("compatible_libc", spec.name, libc.name, libc.version)
+ )
+ continue
+
# We know dependencies are real for concrete specs. For abstract
# specs they just mean the dep is somehow in the DAG.
for dtype in dt.ALL_FLAGS:
@@ -2139,24 +2248,25 @@ class SpackSolverSetup:
body=body,
expand_hashes=expand_hashes,
concrete_build_deps=concrete_build_deps,
+ context=context,
)
)
return clauses
def define_package_versions_and_validate_preferences(
- self, possible_pkgs, *, require_checksum: bool, allow_deprecated: bool
+ self, possible_pkgs: Set[str], *, require_checksum: bool, allow_deprecated: bool
):
"""Declare any versions in specs not declared in packages."""
packages_yaml = spack.config.get("packages")
for pkg_name in possible_pkgs:
- pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ pkg_cls = self.pkg_class(pkg_name)
# All the versions from the corresponding package.py file. Since concepts
# like being a "develop" version or being preferred exist only at a
# package.py level, sort them in this partial list here
package_py_versions = sorted(
- pkg_cls.versions.items(), key=_concretization_version_order, reverse=True
+ pkg_cls.versions.items(), key=concretization_version_order, reverse=True
)
if require_checksum and pkg_cls.has_code:
@@ -2178,7 +2288,7 @@ class SpackSolverSetup:
if pkg_name not in packages_yaml or "version" not in packages_yaml[pkg_name]:
continue
- version_defs = []
+ version_defs: List[GitOrStandardVersion] = []
for vstr in packages_yaml[pkg_name]["version"]:
v = vn.ver(vstr)
@@ -2190,7 +2300,7 @@ class SpackSolverSetup:
matches = [x for x in self.possible_versions[pkg_name] if x.satisfies(v)]
matches.sort(reverse=True)
if not matches:
- raise spack.config.ConfigError(
+ raise spack.error.ConfigError(
f"Preference for version {v} does not match any known "
f"version of {pkg_name} (in its package.py or any external)"
)
@@ -2212,7 +2322,7 @@ class SpackSolverSetup:
# best possible, so they're guaranteed to be used preferentially.
version = s.versions.concrete
- if version is None or any(v == version for v in self.possible_versions[s.name]):
+ if version is None or (any((v == version) for v in self.possible_versions[s.name])):
continue
if require_checksum and not _is_checksummed_git_version(version):
@@ -2238,7 +2348,7 @@ class SpackSolverSetup:
try:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
- target.optimization_flags(compiler_name, compiler_version)
+ target.optimization_flags(compiler_name, str(compiler_version))
supported.append(target)
except archspec.cpu.UnsupportedMicroarchitecture:
continue
@@ -2335,9 +2445,16 @@ class SpackSolverSetup:
candidate_targets.append(ancestor)
best_targets = {uarch.family.name}
- for compiler_id, compiler in enumerate(self.possible_compilers):
+ for compiler_id, known_compiler in enumerate(self.possible_compilers):
+ if not known_compiler.available:
+ continue
+
+ compiler = known_compiler.compiler_obj
# Stub support for cross-compilation, to be expanded later
- if compiler.target is not None and compiler.target != str(uarch.family):
+ if known_compiler.target is not None and compiler.target not in (
+ str(uarch.family),
+ "any",
+ ):
self.gen.fact(fn.compiler_supports_target(compiler_id, compiler.target))
self.gen.newline()
continue
@@ -2389,69 +2506,10 @@ class SpackSolverSetup:
def virtual_providers(self):
self.gen.h2("Virtual providers")
- msg = (
- "Internal Error: possible_virtuals is not populated. Please report to the spack"
- " maintainers"
- )
- assert self.possible_virtuals is not None, msg
-
- # what provides what
for vspec in sorted(self.possible_virtuals):
self.gen.fact(fn.virtual(vspec))
self.gen.newline()
- def generate_possible_compilers(self, specs):
- compilers = all_compilers_in_config()
-
- # Search for compilers which differs only by aspects that are
- # not selectable by users using the spec syntax
- seen, sanitized_list = set(), []
- for compiler in compilers:
- key = compiler.spec, compiler.operating_system, compiler.target
- if key in seen:
- warnings.warn(
- f"duplicate found for {compiler.spec} on "
- f"{compiler.operating_system}/{compiler.target}. "
- f"Edit your compilers.yaml configuration to remove it."
- )
- continue
- sanitized_list.append(compiler)
- seen.add(key)
-
- cspecs = set([c.spec for c in compilers])
-
- # add compiler specs from the input line to possibilities if we
- # don't require compilers to exist.
- strict = spack.concretize.Concretizer().check_for_compiler_existence
- for s in traverse.traverse_nodes(specs):
- # we don't need to validate compilers for already-built specs
- if s.concrete or not s.compiler:
- continue
-
- version = s.compiler.versions.concrete
-
- if not version or any(c.satisfies(s.compiler) for c in cspecs):
- continue
-
- # Error when a compiler is not found and strict mode is enabled
- if strict:
- raise spack.concretize.UnavailableCompilerVersionError(s.compiler)
-
- # Make up a compiler matching the input spec. This is for bootstrapping.
- compiler_cls = spack.compilers.class_for_compiler_name(s.compiler.name)
- compilers.append(
- compiler_cls(s.compiler, operating_system=None, target=None, paths=[None] * 4)
- )
- self.gen.fact(fn.allow_compiler(s.compiler.name, version))
-
- return list(
- sorted(
- compilers,
- key=lambda compiler: (compiler.spec.name, compiler.spec.version),
- reverse=True,
- )
- )
-
def define_version_constraints(self):
"""Define what version_satisfies(...) means in ASP logic."""
for pkg_name, versions in sorted(self.version_constraints):
@@ -2479,7 +2537,7 @@ class SpackSolverSetup:
if isinstance(v, vn.StandardVersion):
return [v]
elif isinstance(v, vn.ClosedOpenRange):
- return [v.lo, vn.prev_version(v.hi)]
+ return [v.lo, vn._prev_version(v.hi)]
elif isinstance(v, vn.VersionList):
return sum((versions_for(e) for e in v), [])
else:
@@ -2525,7 +2583,7 @@ class SpackSolverSetup:
return allowed_targets
cache = {}
- for target_constraint in sorted(self.target_constraints):
+ for target_constraint in sorted(self.target_constraints, key=lambda x: x.name):
# Construct the list of allowed targets for this constraint
allowed_targets = []
for single_constraint in str(target_constraint).split(","):
@@ -2540,15 +2598,15 @@ class SpackSolverSetup:
def define_variant_values(self):
"""Validate variant values from the command line.
- Also add valid variant values from the command line to the
- possible values for a variant.
+ Add valid variant values from the command line to the possible values for
+ variant definitions.
"""
- # Tell the concretizer about possible values from specs we saw in
- # spec_clauses(). We might want to order these facts by pkg and name
- # if we are debugging.
- for pkg, variant, value in self.variant_values_from_specs:
- self.gen.fact(fn.pkg_fact(pkg, fn.variant_possible_value(variant, value)))
+ # Tell the concretizer about possible values from specs seen in spec_clauses().
+ # We might want to order these facts by pkg and name if we are debugging.
+ for pkg_name, variant_def_id, value in self.variant_values_from_specs:
+ vid = self.variant_ids_by_def_id[variant_def_id]
+ self.gen.fact(fn.pkg_fact(pkg_name, fn.variant_possible_value(vid, value)))
def register_concrete_spec(self, spec, possible):
# tell the solver about any installed packages that could
@@ -2567,20 +2625,28 @@ class SpackSolverSetup:
def concrete_specs(self):
"""Emit facts for reusable specs"""
- for h, spec in self.reusable_and_possible.items():
+ for h, spec in self.reusable_and_possible.explicit_items():
# this indicates that there is a spec like this installed
self.gen.fact(fn.installed_hash(spec.name, h))
- # this describes what constraints it imposes on the solve
- self.impose(h, spec, body=True)
+ # indirection layer between hash constraints and imposition to allow for splicing
+ for pred in self.spec_clauses(spec, body=True, required_from=None):
+ self.gen.fact(fn.hash_attr(h, *pred.args))
self.gen.newline()
# Declare as possible parts of specs that are not in package.py
# - Add versions to possible versions
# - Add OS to possible OS's
for dep in spec.traverse():
self.possible_versions[dep.name].add(dep.version)
- self.declared_versions[dep.name].append(
- DeclaredVersion(version=dep.version, idx=0, origin=Provenance.INSTALLED)
- )
+ if isinstance(dep.version, vn.GitVersion):
+ self.declared_versions[dep.name].append(
+ DeclaredVersion(
+ version=dep.version, idx=0, origin=Provenance.INSTALLED_GIT_VERSION
+ )
+ )
+ else:
+ self.declared_versions[dep.name].append(
+ DeclaredVersion(version=dep.version, idx=0, origin=Provenance.INSTALLED)
+ )
self.possible_oses.add(dep.os)
def define_concrete_input_specs(self, specs, possible):
@@ -2592,12 +2658,11 @@ class SpackSolverSetup:
def setup(
self,
- driver: PyclingoDriver,
- specs: Sequence[spack.spec.Spec],
+ specs: List[spack.spec.Spec],
*,
reuse: Optional[List[spack.spec.Spec]] = None,
allow_deprecated: bool = False,
- ):
+ ) -> str:
"""Generate an ASP program with relevant constraints for specs.
This calls methods on the solve driver to set up the problem with
@@ -2605,21 +2670,16 @@ class SpackSolverSetup:
specs, as well as constraints from the specs themselves.
Arguments:
- driver: driver instance of this solve
specs: list of Specs to solve
reuse: list of concrete specs that can be reused
allow_deprecated: if True adds deprecated versions into the solve
"""
check_packages_exist(specs)
- self.possible_virtuals = set(x.name for x in specs if x.virtual)
-
node_counter = _create_counter(specs, tests=self.tests)
self.possible_virtuals = node_counter.possible_virtuals()
self.pkgs = node_counter.possible_dependencies()
-
- runtimes = spack.repo.PATH.packages_with_tags("runtime")
- self.pkgs.update(set(runtimes))
+ self.libcs = sorted(all_libcs()) # type: ignore[type-var]
# Fail if we already know an unreachable node is requested
for spec in specs:
@@ -2629,9 +2689,16 @@ class SpackSolverSetup:
if missing_deps:
raise spack.spec.InvalidDependencyError(spec.name, missing_deps)
- # driver is used by all the functions below to add facts and
- # rules to generate an ASP program.
- self.gen = driver
+ for node in traverse.traverse_nodes(specs):
+ if node.namespace is not None:
+ self.explicitly_required_namespaces[node.name] = node.namespace
+
+ self.gen = ProblemInstanceBuilder()
+ compiler_parser = CompilerParser(configuration=spack.config.CONFIG).with_input_specs(specs)
+
+ if using_libc_compatibility():
+ for libc in self.libcs:
+ self.gen.fact(fn.host_libc(libc.name, libc.version))
if not allow_deprecated:
self.gen.fact(fn.deprecated_versions_not_allowed())
@@ -2649,19 +2716,20 @@ class SpackSolverSetup:
)
for name, info in env.dev_specs.items()
)
- specs = tuple(specs) # ensure compatible types to add
- # get possible compilers
- self.possible_compilers = self.generate_possible_compilers(specs)
+ specs = tuple(specs) # ensure compatible types to add
self.gen.h1("Reusable concrete specs")
self.define_concrete_input_specs(specs, self.pkgs)
if reuse:
self.gen.fact(fn.optimize_for_reuse())
for reusable_spec in reuse:
+ compiler_parser.add_compiler_from_concrete_spec(reusable_spec)
self.register_concrete_spec(reusable_spec, self.pkgs)
self.concrete_specs()
+ self.possible_compilers = compiler_parser.possible_compilers()
+
self.gen.h1("Generic statements on possible packages")
node_counter.possible_packages_facts(self.gen, fn)
@@ -2671,6 +2739,7 @@ class SpackSolverSetup:
self.gen.newline()
self.gen.h1("General Constraints")
+ self.config_compatible_os()
self.compiler_facts()
# architecture defaults
@@ -2708,6 +2777,10 @@ class SpackSolverSetup:
self.gen.h2("Package preferences: %s" % pkg)
self.preferred_variants(pkg)
+ self.gen.h1("Special variants")
+ self.define_auto_variant("dev_path", multi=False)
+ self.define_auto_variant("patches", multi=True)
+
self.gen.h1("Develop specs")
# Inject dev_path from environment
for ds in dev_specs:
@@ -2735,18 +2808,64 @@ class SpackSolverSetup:
self.gen.h1("Target Constraints")
self.define_target_constraints()
+ self.gen.h1("Internal errors")
+ self.internal_errors()
+
+ return self.gen.value()
+
+ def internal_errors(self):
+ parent_dir = os.path.dirname(__file__)
+
+ def visit(node):
+ if ast_type(node) == clingo().ast.ASTType.Rule:
+ for term in node.body:
+ if ast_type(term) == clingo().ast.ASTType.Literal:
+ if ast_type(term.atom) == clingo().ast.ASTType.SymbolicAtom:
+ name = ast_sym(term.atom).name
+ if name == "internal_error":
+ arg = ast_sym(ast_sym(term.atom).arguments[0])
+ symbol = AspFunction(name)(arg.string)
+ self.assumptions.append((parse_term(str(symbol)), True))
+ self.gen.asp_problem.append(f"{{ {symbol} }}.\n")
+
+ path = os.path.join(parent_dir, "concretize.lp")
+ parse_files([path], visit)
+
def define_runtime_constraints(self):
"""Define the constraints to be imposed on the runtimes"""
recorder = RuntimePropertyRecorder(self)
+
for compiler in self.possible_compilers:
- if compiler.name != "gcc":
- continue
+ compiler_with_different_cls_names = {
+ "oneapi": "intel-oneapi-compilers",
+ "clang": "llvm",
+ }
+ compiler_cls_name = compiler_with_different_cls_names.get(
+ compiler.spec.name, compiler.spec.name
+ )
try:
- compiler_cls = spack.repo.PATH.get_pkg_class(compiler.name)
+ compiler_cls = spack.repo.PATH.get_pkg_class(compiler_cls_name)
+ if hasattr(compiler_cls, "runtime_constraints"):
+ compiler_cls.runtime_constraints(spec=compiler.spec, pkg=recorder)
except spack.repo.UnknownPackageError:
+ pass
+
+ # Inject libc from available compilers, on Linux
+ if not compiler.available:
continue
- if hasattr(compiler_cls, "runtime_constraints"):
- compiler_cls.runtime_constraints(compiler=compiler, pkg=recorder)
+
+ current_libc = compiler.compiler_obj.default_libc
+
+ if using_libc_compatibility() and current_libc:
+ recorder("*").depends_on(
+ "libc", when=f"%{compiler.spec}", type="link", description="Add libc"
+ )
+ recorder("*").depends_on(
+ str(current_libc),
+ when=f"%{compiler.spec}",
+ type="link",
+ description="Add libc",
+ )
recorder.consume_facts()
@@ -2767,7 +2886,9 @@ class SpackSolverSetup:
effect_id, requirements = cache[imposed_spec_key]
else:
effect_id = next(self._id_counter)
- requirements = self.spec_clauses(spec)
+ context = SourceContext()
+ context.source = "literal"
+ requirements = self.spec_clauses(spec, context=context)
root_name = spec.name
for clause in requirements:
clause_name = clause.args[0]
@@ -2815,7 +2936,7 @@ class SpackSolverSetup:
# not throw an error, which is just so that users know they need to change
# their config, instead of getting a hard to decipher concretization error.
if not any(x for x in self.possible_versions[name] if x.satisfies(versions)):
- raise spack.config.ConfigError(
+ raise spack.error.ConfigError(
f"Version requirement {versions} on {pkg_name} for {name} "
f"cannot match any known version from package.py or externals"
)
@@ -2857,6 +2978,189 @@ class SpackSolverSetup:
for s in spec_group[key]:
yield _spec_with_default_name(s, pkg_name)
+ def pkg_class(self, pkg_name: str) -> typing.Type["spack.package_base.PackageBase"]:
+ request = pkg_name
+ if pkg_name in self.explicitly_required_namespaces:
+ namespace = self.explicitly_required_namespaces[pkg_name]
+ request = f"{namespace}.{pkg_name}"
+ return spack.repo.PATH.get_pkg_class(request)
+
+
+class _Head:
+ """ASP functions used to express spec clauses in the HEAD of a rule"""
+
+ node = fn.attr("node")
+ namespace = fn.attr("namespace_set")
+ virtual_node = fn.attr("virtual_node")
+ node_platform = fn.attr("node_platform_set")
+ node_os = fn.attr("node_os_set")
+ node_target = fn.attr("node_target_set")
+ variant_value = fn.attr("variant_set")
+ node_compiler = fn.attr("node_compiler_set")
+ node_compiler_version = fn.attr("node_compiler_version_set")
+ node_flag = fn.attr("node_flag_set")
+ propagate = fn.attr("propagate")
+
+
+class _Body:
+ """ASP functions used to express spec clauses in the BODY of a rule"""
+
+ node = fn.attr("node")
+ namespace = fn.attr("namespace")
+ virtual_node = fn.attr("virtual_node")
+ node_platform = fn.attr("node_platform")
+ node_os = fn.attr("node_os")
+ node_target = fn.attr("node_target")
+ variant_value = fn.attr("variant_value")
+ node_compiler = fn.attr("node_compiler")
+ node_compiler_version = fn.attr("node_compiler_version")
+ node_flag = fn.attr("node_flag")
+ propagate = fn.attr("propagate")
+
+
+class ProblemInstanceBuilder:
+ """Provides an interface to construct a problem instance.
+
+ Once all the facts and rules have been added, the problem instance can be retrieved with:
+
+ >>> builder = ProblemInstanceBuilder()
+ >>> ...
+ >>> problem_instance = builder.value()
+
+ The problem instance can be added directly to the "control" structure of clingo.
+ """
+
+ def __init__(self):
+ self.asp_problem = []
+
+ def fact(self, atom: AspFunction) -> None:
+ symbol = atom.symbol() if hasattr(atom, "symbol") else atom
+ self.asp_problem.append(f"{str(symbol)}.\n")
+
+ def append(self, rule: str) -> None:
+ self.asp_problem.append(rule)
+
+ def title(self, header: str, char: str) -> None:
+ self.asp_problem.append("\n")
+ self.asp_problem.append("%" + (char * 76))
+ self.asp_problem.append("\n")
+ self.asp_problem.append(f"% {header}\n")
+ self.asp_problem.append("%" + (char * 76))
+ self.asp_problem.append("\n")
+
+ def h1(self, header: str) -> None:
+ self.title(header, "=")
+
+ def h2(self, header: str) -> None:
+ self.title(header, "-")
+
+ def h3(self, header: str):
+ self.asp_problem.append(f"% {header}\n")
+
+ def newline(self):
+ self.asp_problem.append("\n")
+
+ def value(self) -> str:
+ return "".join(self.asp_problem)
+
+
+class CompilerParser:
+ """Parses configuration files, and builds a list of possible compilers for the solve."""
+
+ def __init__(self, configuration) -> None:
+ self.compilers: Set[KnownCompiler] = set()
+ for c in spack.compilers.all_compilers_from(configuration):
+ if using_libc_compatibility() and not c_compiler_runs(c):
+ tty.debug(
+ f"the C compiler {c.cc} does not exist, or does not run correctly."
+ f" The compiler {c.spec} will not be used during concretization."
+ )
+ continue
+
+ if using_libc_compatibility() and not c.default_libc:
+ warnings.warn(
+ f"cannot detect libc from {c.spec}. The compiler will not be used "
+ f"during concretization."
+ )
+ continue
+
+ target = c.target if c.target != "any" else None
+ candidate = KnownCompiler(
+ spec=c.spec, os=c.operating_system, target=target, available=True, compiler_obj=c
+ )
+ if candidate in self.compilers:
+ warnings.warn(
+ f"duplicate found for {c.spec} on {c.operating_system}/{c.target}. "
+ f"Edit your compilers.yaml configuration to remove it."
+ )
+ continue
+
+ self.compilers.add(candidate)
+
+ def with_input_specs(self, input_specs: List["spack.spec.Spec"]) -> "CompilerParser":
+ """Accounts for input specs when building the list of possible compilers.
+
+ Args:
+ input_specs: specs to be concretized
+ """
+ strict = spack.concretize.CHECK_COMPILER_EXISTENCE
+ default_os = str(spack.platforms.host().default_os)
+ default_target = str(archspec.cpu.host().family)
+ for s in traverse.traverse_nodes(input_specs):
+ # we don't need to validate compilers for already-built specs
+ if s.concrete or not s.compiler:
+ continue
+
+ version = s.compiler.versions.concrete
+
+ if not version or any(item.spec.satisfies(s.compiler) for item in self.compilers):
+ continue
+
+ # Error when a compiler is not found and strict mode is enabled
+ if strict:
+ raise spack.concretize.UnavailableCompilerVersionError(s.compiler)
+
+ # Make up a compiler matching the input spec. This is for bootstrapping.
+ compiler_cls = spack.compilers.class_for_compiler_name(s.compiler.name)
+ compiler_obj = compiler_cls(
+ s.compiler, operating_system=default_os, target=default_target, paths=[None] * 4
+ )
+ self.compilers.add(
+ KnownCompiler(
+ spec=s.compiler,
+ os=default_os,
+ target=default_target,
+ available=True,
+ compiler_obj=compiler_obj,
+ )
+ )
+
+ return self
+
+ def add_compiler_from_concrete_spec(self, spec: "spack.spec.Spec") -> None:
+ """Account for compilers that are coming from concrete specs, through reuse.
+
+ Args:
+ spec: concrete spec to be reused
+ """
+ assert spec.concrete, "the spec argument must be concrete"
+ candidate = KnownCompiler(
+ spec=spec.compiler,
+ os=str(spec.architecture.os),
+ target=str(spec.architecture.target.family),
+ available=False,
+ compiler_obj=None,
+ )
+ self.compilers.add(candidate)
+
+ def possible_compilers(self) -> List[KnownCompiler]:
+ # Here we have to sort two times, first sort by name and ascending version
+ result = sorted(self.compilers, key=lambda x: (x.spec.name, x.spec.version), reverse=True)
+ # Then stable sort to prefer available compilers and account for preferences
+ ppk = spack.package_prefs.PackagePrefs("all", "compiler", all=False)
+ result.sort(key=lambda x: (not x.available, ppk(x.spec)))
+ return result
+
class RuntimePropertyRecorder:
"""An object of this class is injected in callbacks to compilers, to let them declare
@@ -2898,13 +3202,24 @@ class RuntimePropertyRecorder:
"""Resets the current state."""
self.current_package = None
- def depends_on(self, dependency_str: str, *, when: str, type: str, description: str) -> None:
+ def depends_on(
+ self,
+ dependency_str: str,
+ *,
+ when: str,
+ type: str,
+ description: str,
+ languages: Optional[List[str]] = None,
+ ) -> None:
"""Injects conditional dependencies on packages.
+ Conditional dependencies can be either "real" packages or virtual dependencies.
+
Args:
dependency_str: the dependency spec to inject
when: anonymous condition to be met on a package to have the dependency
type: dependency type
+ languages: languages needed by the package for the dependency to be considered
description: human-readable description of the rule for adding the dependency
"""
# TODO: The API for this function is not final, and is still subject to change. At
@@ -2927,28 +3242,48 @@ class RuntimePropertyRecorder:
body_clauses = self._setup.spec_clauses(when_spec, body=True)
body_str = (
f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
+ f" not external({node_variable}),\n"
f" not runtime(Package)"
).replace(f'"{placeholder}"', f"{node_variable}")
+ if languages:
+ body_str += ",\n"
+ for language in languages:
+ body_str += f' attr("language", {node_variable}, "{language}")'
+
head_clauses = self._setup.spec_clauses(dependency_spec, body=False)
runtime_pkg = dependency_spec.name
+
+ is_virtual = head_clauses[0].args[0] == "virtual_node"
main_rule = (
f"% {description}\n"
f'1 {{ attr("depends_on", {node_variable}, node(0..X-1, "{runtime_pkg}"), "{type}") :'
- f' max_dupes("gcc-runtime", X)}} 1:-\n'
+ f' max_dupes("{runtime_pkg}", X)}} 1:-\n'
f"{body_str}.\n\n"
)
+ if is_virtual:
+ main_rule = (
+ f"% {description}\n"
+ f'attr("dependency_holds", {node_variable}, "{runtime_pkg}", "{type}") :-\n'
+ f"{body_str}.\n\n"
+ )
+
self.rules.append(main_rule)
for clause in head_clauses:
if clause.args[0] == "node":
continue
runtime_node = f'node(RuntimeID, "{runtime_pkg}")'
head_str = str(clause).replace(f'"{runtime_pkg}"', runtime_node)
- rule = (
- f"{head_str} :-\n"
+ depends_on_constraint = (
f' attr("depends_on", {node_variable}, {runtime_node}, "{type}"),\n'
- f"{body_str}.\n\n"
)
+ if is_virtual:
+ depends_on_constraint = (
+ f' attr("depends_on", {node_variable}, ProviderNode, "{type}"),\n'
+ f" provider(ProviderNode, {runtime_node}),\n"
+ )
+
+ rule = f"{head_str} :-\n" f"{depends_on_constraint}" f"{body_str}.\n\n"
self.rules.append(rule)
self.reset()
@@ -2981,6 +3316,39 @@ class RuntimePropertyRecorder:
self.runtime_conditions.add((imposed_spec, when_spec))
self.reset()
+ def propagate(self, constraint_str: str, *, when: str):
+ msg = "the 'propagate' method can be called only with pkg('*')"
+ assert self.current_package == "*", msg
+
+ when_spec = spack.spec.Spec(when)
+ assert when_spec.name is None, "only anonymous when specs are accepted"
+
+ placeholder = "XXX"
+ node_variable = "node(ID, Package)"
+ when_spec.name = placeholder
+
+ body_clauses = self._setup.spec_clauses(when_spec, body=True)
+ body_str = (
+ f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
+ f" not external({node_variable}),\n"
+ f" not runtime(Package)"
+ ).replace(f'"{placeholder}"', f"{node_variable}")
+
+ constraint_spec = spack.spec.Spec(constraint_str)
+ assert constraint_spec.name is None, "only anonymous constraint specs are accepted"
+
+ constraint_spec.name = placeholder
+ constraint_clauses = self._setup.spec_clauses(constraint_spec, body=False)
+ for clause in constraint_clauses:
+ if clause.args[0] == "node_compiler_version_satisfies":
+ self._setup.compiler_version_constraints.add(constraint_spec.compiler)
+ args = f'"{constraint_spec.compiler.name}", "{constraint_spec.compiler.versions}"'
+ head_str = f"propagate({node_variable}, node_compiler_version_satisfies({args}))"
+ rule = f"{head_str} :-\n{body_str}.\n\n"
+ self.rules.append(rule)
+
+ self.reset()
+
def consume_facts(self):
"""Consume the facts collected by this object, and emits rules and
facts for the runtimes.
@@ -2988,9 +3356,7 @@ class RuntimePropertyRecorder:
self._setup.gen.h2("Runtimes: rules")
self._setup.gen.newline()
for rule in self.rules:
- if not isinstance(self._setup.gen.out, llnl.util.lang.Devnull):
- self._setup.gen.out.write(rule)
- self._setup.gen.control.add("base", [], rule)
+ self._setup.gen.append(rule)
self._setup.gen.h2("Runtimes: conditions")
for runtime_pkg in spack.repo.PATH.packages_with_tags("runtime"):
@@ -3009,6 +3375,14 @@ class RuntimePropertyRecorder:
self._setup.effect_rules()
+# This should be a dataclass, but dataclasses don't work on Python 3.6
+class Splice:
+ def __init__(self, splice_node: NodeArgument, child_name: str, child_hash: str):
+ self.splice_node = splice_node
+ self.child_name = child_name
+ self.child_hash = child_hash
+
+
class SpecBuilder:
"""Class with actions to rebuild a spec from ASP results."""
@@ -3019,13 +3393,16 @@ class SpecBuilder:
r"^.*_propagate$",
r"^.*_satisfies$",
r"^.*_set$",
+ r"^compatible_libc$",
r"^dependency_holds$",
+ r"^external_conditions_hold$",
r"^node_compiler$",
r"^package_hash$",
r"^root$",
r"^track_dependencies$",
r"^variant_default_value_from_cli$",
r"^virtual_node$",
+ r"^virtual_on_incoming_edges$",
r"^virtual_root$",
]
)
@@ -3042,15 +3419,19 @@ class SpecBuilder:
return NodeArgument(id="0", pkg=pkg)
def __init__(self, specs, hash_lookup=None):
- self._specs = {}
+ self._specs: Dict[NodeArgument, spack.spec.Spec] = {}
+
+ # Matches parent nodes to splice node
+ self._splices: Dict[NodeArgument, List[Splice]] = {}
self._result = None
self._command_line_specs = specs
- self._flag_sources = collections.defaultdict(lambda: set())
- self._flag_compiler_defaults = set()
+ self._flag_sources: Dict[Tuple[NodeArgument, str], Set[str]] = collections.defaultdict(
+ lambda: set()
+ )
# Pass in as arguments reusable specs and plug them in
# from this dictionary during reconstruction
- self._hash_lookup = hash_lookup or {}
+ self._hash_lookup = hash_lookup or ConcreteSpecsByHash()
def hash(self, node, h):
if node not in self._specs:
@@ -3059,6 +3440,8 @@ class SpecBuilder:
def node(self, node):
if node not in self._specs:
self._specs[node] = spack.spec.Spec(node.pkg)
+ for flag_type in spack.spec.FlagMap.valid_compiler_flags():
+ self._specs[node].compiler_flags[flag_type] = []
def _arch(self, node):
arch = self._specs[node].architecture
@@ -3067,6 +3450,9 @@ class SpecBuilder:
self._specs[node].architecture = arch
return arch
+ def namespace(self, node, namespace):
+ self._specs[node].namespace = namespace
+
def node_platform(self, node, platform):
self._arch(node).platform = platform
@@ -3076,21 +3462,17 @@ class SpecBuilder:
def node_target(self, node, target):
self._arch(node).target = target
- def variant_value(self, node, name, value):
- # FIXME: is there a way not to special case 'dev_path' everywhere?
- if name == "dev_path":
- self._specs[node].variants.setdefault(
- name, spack.variant.SingleValuedVariant(name, value)
- )
- return
-
- if name == "patches":
- self._specs[node].variants.setdefault(
- name, spack.variant.MultiValuedVariant(name, value)
+ def variant_selected(self, node, name, value, variant_type, variant_id):
+ spec = self._specs[node]
+ variant = spec.variants.get(name)
+ if not variant:
+ spec.variants[name] = vt.VariantType(variant_type).variant_class(name, value)
+ else:
+ assert variant_type == vt.VariantType.MULTI.value, (
+ f"Can't have multiple values for single-valued variant: "
+ f"{node}, {name}, {value}, {variant_type}, {variant_id}"
)
- return
-
- self._specs[node].update_variant_validate(name, value)
+ variant.append(value)
def version(self, node, version):
self._specs[node].versions = vn.VersionList([vn.Version(version)])
@@ -3099,25 +3481,14 @@ class SpecBuilder:
self._specs[node].compiler = spack.spec.CompilerSpec(compiler)
self._specs[node].compiler.versions = vn.VersionList([vn.Version(version)])
- def node_flag_compiler_default(self, node):
- self._flag_compiler_defaults.add(node)
-
- def node_flag(self, node, flag_type, flag):
- self._specs[node].compiler_flags.add_flag(flag_type, flag, False)
-
- def node_flag_source(self, node, flag_type, source):
- self._flag_sources[(node, flag_type)].add(source)
-
- def no_flags(self, node, flag_type):
- self._specs[node].compiler_flags[flag_type] = []
+ def node_flag(self, node, node_flag):
+ self._specs[node].compiler_flags.add_flag(
+ node_flag.flag_type, node_flag.flag, False, node_flag.flag_group, node_flag.source
+ )
def external_spec_selected(self, node, idx):
- """This means that the external spec and index idx
- has been selected for this package.
- """
-
- packages_yaml = spack.config.get("packages")
- packages_yaml = _normalize_packages_yaml(packages_yaml)
+ """This means that the external spec and index idx has been selected for this package."""
+ packages_yaml = _external_config_with_implicit_externals(spack.config.CONFIG)
spec_info = packages_yaml[node.pkg]["externals"][int(idx)]
self._specs[node].external_path = spec_info.get("prefix", None)
self._specs[node].external_modules = spack.spec.Spec._format_module_list(
@@ -3135,16 +3506,8 @@ class SpecBuilder:
def depends_on(self, parent_node, dependency_node, type):
dependency_spec = self._specs[dependency_node]
- edges = self._specs[parent_node].edges_to_dependencies(name=dependency_spec.name)
- edges = [x for x in edges if id(x.spec) == id(dependency_spec)]
depflag = dt.flag_from_string(type)
-
- if not edges:
- self._specs[parent_node].add_dependency_edge(
- self._specs[dependency_node], depflag=depflag, virtuals=()
- )
- else:
- edges[0].update_deptypes(depflag=depflag)
+ self._specs[parent_node].add_dependency_edge(dependency_spec, depflag=depflag, virtuals=())
def virtual_on_edge(self, parent_node, provider_node, virtual):
dependencies = self._specs[parent_node].edges_to_dependencies(name=(provider_node.pkg))
@@ -3154,18 +3517,28 @@ class SpecBuilder:
dependencies[0].update_virtuals((virtual,))
def reorder_flags(self):
- """Order compiler flags on specs in predefined order.
-
- We order flags so that any node's flags will take priority over
- those of its dependents. That is, the deepest node in the DAG's
- flags will appear last on the compile line, in the order they
- were specified.
+ """For each spec, determine the order of compiler flags applied to it.
The solver determines which flags are on nodes; this routine
- imposes order afterwards.
+ imposes order afterwards. The order is:
+
+ 1. Flags applied in compiler definitions should come first
+ 2. Flags applied by dependents are ordered topologically (with a
+ dependency on `traverse` to resolve the partial order into a
+ stable total order)
+ 3. Flags from requirements are then applied (requirements always
+ come from the package and never a parent)
+ 4. Command-line flags should come last
+
+ Additionally, for each source (requirements, compiler, command line, and
+ dependents), flags from that source should retain their order and grouping:
+ e.g. for `y cflags="-z -a"` "-z" and "-a" should never have any intervening
+ flags inserted, and should always appear in that order.
"""
# reverse compilers so we get highest priority compilers that share a spec
- compilers = dict((c.spec, c) for c in reversed(all_compilers_in_config()))
+ compilers = dict(
+ (c.spec, c) for c in reversed(spack.compilers.all_compilers_from(spack.config.CONFIG))
+ )
cmd_specs = dict((s.name, s) for spec in self._command_line_specs for s in spec.traverse())
for spec in self._specs.values():
@@ -3175,46 +3548,135 @@ class SpecBuilder:
flagmap_from_compiler = compilers[spec.compiler].flags
for flag_type in spec.compiler_flags.valid_compiler_flags():
- from_compiler = flagmap_from_compiler.get(flag_type, [])
- from_sources = []
-
- # order is determined by the DAG. A spec's flags come after any of its ancestors
- # on the compile line
node = SpecBuilder.make_node(pkg=spec.name)
- source_key = (node, flag_type)
- if source_key in self._flag_sources:
- order = [
- SpecBuilder.make_node(pkg=s.name)
- for s in spec.traverse(order="post", direction="parents")
- ]
- sorted_sources = sorted(
- self._flag_sources[source_key], key=lambda s: order.index(s)
+
+ ordered_flags = []
+
+ # 1. Put compiler flags first
+ from_compiler = tuple(flagmap_from_compiler.get(flag_type, []))
+ extend_flag_list(ordered_flags, from_compiler)
+
+ # 2. Add all sources (the compiler is one of them, so skip any
+ # flag group that matches it exactly)
+ flag_groups = set()
+ for flag in self._specs[node].compiler_flags.get(flag_type, []):
+ flag_groups.add(
+ spack.spec.CompilerFlag(
+ flag.flag_group,
+ propagate=flag.propagate,
+ flag_group=flag.flag_group,
+ source=flag.source,
+ )
)
- # add flags from each source, lowest to highest precedence
- for node in sorted_sources:
- all_src_flags = list()
- per_pkg_sources = [self._specs[node]]
- if node.pkg in cmd_specs:
- per_pkg_sources.append(cmd_specs[node.pkg])
- for source in per_pkg_sources:
- all_src_flags.extend(source.compiler_flags.get(flag_type, []))
- extend_flag_list(from_sources, all_src_flags)
-
- # compiler flags from compilers config are lowest precedence
- ordered_compiler_flags = list(llnl.util.lang.dedupe(from_compiler + from_sources))
- compiler_flags = spec.compiler_flags.get(flag_type, [])
+ # For flags that are applied by dependents, put flags from parents
+ # before children; we depend on the stability of traverse() to
+ # achieve a stable flag order for flags introduced in this manner.
+ topo_order = list(s.name for s in spec.traverse(order="post", direction="parents"))
+ lex_order = list(sorted(flag_groups))
+
+ def _order_index(flag_group):
+ source = flag_group.source
+ # Note: if 'require: ^dependency cflags=...' is ever possible,
+ # this will topologically sort for require as well
+ type_index, pkg_source = ConstraintOrigin.strip_type_suffix(source)
+ if pkg_source in topo_order:
+ major_index = topo_order.index(pkg_source)
+ # If for x->y, x has multiple depends_on declarations that
+ # are activated, and each adds cflags to y, we fall back on
+ # alphabetical ordering to maintain a total order
+ minor_index = lex_order.index(flag_group)
+ else:
+ major_index = len(topo_order) + lex_order.index(flag_group)
+ minor_index = 0
+ return (type_index, major_index, minor_index)
+
+ prioritized_groups = sorted(flag_groups, key=lambda x: _order_index(x))
+
+ for grp in prioritized_groups:
+ grp_flags = tuple(
+ x for (x, y) in spack.compiler.tokenize_flags(grp.flag_group)
+ )
+ if grp_flags == from_compiler:
+ continue
+ as_compiler_flags = list(
+ spack.spec.CompilerFlag(
+ x,
+ propagate=grp.propagate,
+ flag_group=grp.flag_group,
+ source=grp.source,
+ )
+ for x in grp_flags
+ )
+ extend_flag_list(ordered_flags, as_compiler_flags)
- msg = "%s does not equal %s" % (set(compiler_flags), set(ordered_compiler_flags))
- assert set(compiler_flags) == set(ordered_compiler_flags), msg
+ # 3. Now put cmd-line flags last
+ if node.pkg in cmd_specs:
+ cmd_flags = cmd_specs[node.pkg].compiler_flags.get(flag_type, [])
+ extend_flag_list(ordered_flags, cmd_flags)
- spec.compiler_flags.update({flag_type: ordered_compiler_flags})
+ compiler_flags = spec.compiler_flags.get(flag_type, [])
+ msg = "%s does not equal %s" % (set(compiler_flags), set(ordered_flags))
+ assert set(compiler_flags) == set(ordered_flags), msg
+
+ spec.compiler_flags.update({flag_type: ordered_flags})
def deprecated(self, node: NodeArgument, version: str) -> None:
tty.warn(f'using "{node.pkg}@{version}" which is a deprecated version')
+ def splice_at_hash(
+ self,
+ parent_node: NodeArgument,
+ splice_node: NodeArgument,
+ child_name: str,
+ child_hash: str,
+ ):
+ splice = Splice(splice_node, child_name=child_name, child_hash=child_hash)
+ self._splices.setdefault(parent_node, []).append(splice)
+
+ def _resolve_automatic_splices(self):
+ """After all of the specs have been concretized, apply all immediate splices.
+
+ Use reverse topological order to ensure that all dependencies are resolved
+ before their parents, allowing for maximal sharing and minimal copying.
+
+ """
+ fixed_specs = {}
+
+ # create a mapping from dag hash to an integer representing position in reverse topo order.
+ specs = self._specs.values()
+ topo_order = list(traverse.traverse_nodes(specs, order="topo", key=traverse.by_dag_hash))
+ topo_lookup = {spec.dag_hash(): index for index, spec in enumerate(reversed(topo_order))}
+
+ # iterate over specs, children before parents
+ for node, spec in sorted(self._specs.items(), key=lambda x: topo_lookup[x[1].dag_hash()]):
+ immediate = self._splices.get(node, [])
+ if not immediate and not any(
+ edge.spec in fixed_specs for edge in spec.edges_to_dependencies()
+ ):
+ continue
+ new_spec = spec.copy(deps=False)
+ new_spec.build_spec = spec
+ for edge in spec.edges_to_dependencies():
+ depflag = edge.depflag & ~dt.BUILD
+ if any(edge.spec.dag_hash() == splice.child_hash for splice in immediate):
+ splice = [s for s in immediate if s.child_hash == edge.spec.dag_hash()][0]
+ new_spec.add_dependency_edge(
+ self._specs[splice.splice_node], depflag=depflag, virtuals=edge.virtuals
+ )
+ elif edge.spec in fixed_specs:
+ new_spec.add_dependency_edge(
+ fixed_specs[edge.spec], depflag=depflag, virtuals=edge.virtuals
+ )
+ else:
+ new_spec.add_dependency_edge(
+ edge.spec, depflag=depflag, virtuals=edge.virtuals
+ )
+ self._specs[node] = new_spec
+ fixed_specs[spec] = new_spec
+
@staticmethod
- def sort_fn(function_tuple):
+ def sort_fn(function_tuple) -> Tuple[int, int]:
"""Ensure attributes are evaluated in the correct order.
hash attributes are handled first, since they imply entire concrete specs
@@ -3242,7 +3704,6 @@ class SpecBuilder:
# them here so that directives that build objects (like node and
# node_compiler) are called in the right order.
self.function_tuples = sorted(set(function_tuples), key=self.sort_fn)
-
self._specs = {}
for name, args in self.function_tuples:
if SpecBuilder.ignored_attributes.match(name):
@@ -3274,28 +3735,22 @@ class SpecBuilder:
# if we've already gotten a concrete spec for this pkg,
# do not bother calling actions on it except for node_flag_source,
# since node_flag_source is tracking information not in the spec itself
+ # we also need to keep track of splicing information.
spec = self._specs.get(args[0])
if spec and spec.concrete:
- if name != "node_flag_source":
+ do_not_ignore_attrs = ["node_flag_source", "splice_at_hash"]
+ if name not in do_not_ignore_attrs:
continue
action(*args)
- # namespace assignment is done after the fact, as it is not
- # currently part of the solve
- for spec in self._specs.values():
- if spec.namespace:
- continue
- repo = spack.repo.PATH.repo_for_pkg(spec)
- spec.namespace = repo.namespace
-
# fix flags after all specs are constructed
self.reorder_flags()
# inject patches -- note that we' can't use set() to unique the
# roots here, because the specs aren't complete, and the hash
# function will loop forever.
- roots = [spec.root for spec in self._specs.values() if not spec.root.installed]
+ roots = [spec.root for spec in self._specs.values()]
roots = dict((id(r), r) for r in roots)
for root in roots.values():
spack.spec.Spec.inject_patches_variant(root)
@@ -3311,6 +3766,8 @@ class SpecBuilder:
for root in roots.values():
root._finalize_concretization()
+ self._resolve_automatic_splices()
+
for s in self._specs.values():
spack.spec.Spec.ensure_no_deprecated(s)
@@ -3324,7 +3781,44 @@ class SpecBuilder:
spack.version.git_ref_lookup.GitRefLookup(spec.fullname)
)
- return self._specs
+ specs = self.execute_explicit_splices()
+ return specs
+
+ def execute_explicit_splices(self):
+ splice_config = spack.config.CONFIG.get("concretizer:splice:explicit", [])
+ splice_triples = []
+ for splice_set in splice_config:
+ target = splice_set["target"]
+ replacement = spack.spec.Spec(splice_set["replacement"])
+
+ if not replacement.abstract_hash:
+ location = getattr(
+ splice_set["replacement"], "_start_mark", " at unknown line number"
+ )
+ msg = f"Explicit splice replacement '{replacement}' does not include a hash.\n"
+ msg += f"{location}\n\n"
+ msg += " Splice replacements must be specified by hash"
+ raise InvalidSpliceError(msg)
+
+ transitive = splice_set.get("transitive", False)
+ splice_triples.append((target, replacement, transitive))
+
+ specs = {}
+ for key, spec in self._specs.items():
+ current_spec = spec
+ for target, replacement, transitive in splice_triples:
+ if target in current_spec:
+ # matches root or non-root
+ # e.g. mvapich2%gcc
+
+ # The first iteration, we need to replace the abstract hash
+ if not replacement.concrete:
+ replacement.replace_hash()
+ current_spec = current_spec.splice(replacement, transitive)
+ new_key = NodeArgument(id=key.id, pkg=current_spec.name)
+ specs[new_key] = current_spec
+
+ return specs
def _develop_specs_from_env(spec, env):
@@ -3343,8 +3837,9 @@ def _develop_specs_from_env(spec, env):
assert spec.variants["dev_path"].value == path, error_msg
else:
- spec.variants.setdefault("dev_path", spack.variant.SingleValuedVariant("dev_path", path))
- spec.constrain(dev_info["spec"])
+ spec.variants.setdefault("dev_path", vt.SingleValuedVariant("dev_path", path))
+
+ assert spec.satisfies(dev_info["spec"])
def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
@@ -3365,7 +3860,7 @@ def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
return False
if not spec.external:
- return True
+ return _has_runtime_dependencies(spec)
# Cray external manifest externals are always reusable
if local:
@@ -3374,7 +3869,7 @@ def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
return True
try:
- provided = [p.name for p in spec.package.provided]
+ provided = spack.repo.PATH.get(spec).provided_virtual_names()
except spack.repo.RepoError:
provided = []
@@ -3390,25 +3885,256 @@ def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
return False
+def _has_runtime_dependencies(spec: spack.spec.Spec) -> bool:
+ if not WITH_RUNTIME:
+ return True
+
+ if spec.compiler.name == "gcc" and not spec.dependencies("gcc-runtime"):
+ return False
+
+ if spec.compiler.name == "oneapi" and not spec.dependencies("intel-oneapi-runtime"):
+ return False
+
+ return True
+
+
+class SpecFilter:
+ """Given a method to produce a list of specs, this class can filter them according to
+ different criteria.
+ """
+
+ def __init__(
+ self,
+ factory: Callable[[], List[spack.spec.Spec]],
+ is_usable: Callable[[spack.spec.Spec], bool],
+ include: List[str],
+ exclude: List[str],
+ ) -> None:
+ """
+ Args:
+ factory: factory to produce a list of specs
+ is_usable: predicate that takes a spec in input and returns False if the spec
+ should not be considered for this filter, True otherwise.
+ include: if present, a "good" spec must match at least one entry in the list
+ exclude: if present, a "good" spec must not match any entry in the list
+ """
+ self.factory = factory
+ self.is_usable = is_usable
+ self.include = include
+ self.exclude = exclude
+
+ def is_selected(self, s: spack.spec.Spec) -> bool:
+ if not self.is_usable(s):
+ return False
+
+ if self.include and not any(s.satisfies(c) for c in self.include):
+ return False
+
+ if self.exclude and any(s.satisfies(c) for c in self.exclude):
+ return False
+
+ return True
+
+ def selected_specs(self) -> List[spack.spec.Spec]:
+ return [s for s in self.factory() if self.is_selected(s)]
+
+ @staticmethod
+ def from_store(configuration, *, include, exclude) -> "SpecFilter":
+ """Constructs a filter that takes the specs from the current store."""
+ packages = _external_config_with_implicit_externals(configuration)
+ is_reusable = functools.partial(_is_reusable, packages=packages, local=True)
+ factory = functools.partial(_specs_from_store, configuration=configuration)
+ return SpecFilter(factory=factory, is_usable=is_reusable, include=include, exclude=exclude)
+
+ @staticmethod
+ def from_buildcache(configuration, *, include, exclude) -> "SpecFilter":
+ """Constructs a filter that takes the specs from the configured buildcaches."""
+ packages = _external_config_with_implicit_externals(configuration)
+ is_reusable = functools.partial(_is_reusable, packages=packages, local=False)
+ return SpecFilter(
+ factory=_specs_from_mirror, is_usable=is_reusable, include=include, exclude=exclude
+ )
+
+ @staticmethod
+ def from_environment(configuration, *, include, exclude, env) -> "SpecFilter":
+ packages = _external_config_with_implicit_externals(configuration)
+ is_reusable = functools.partial(_is_reusable, packages=packages, local=True)
+ factory = functools.partial(_specs_from_environment, env=env)
+ return SpecFilter(factory=factory, is_usable=is_reusable, include=include, exclude=exclude)
+
+ @staticmethod
+ def from_environment_included_concrete(
+ configuration,
+ *,
+ include: List[str],
+ exclude: List[str],
+ env: ev.Environment,
+ included_concrete: str,
+ ) -> "SpecFilter":
+ packages = _external_config_with_implicit_externals(configuration)
+ is_reusable = functools.partial(_is_reusable, packages=packages, local=True)
+ factory = functools.partial(
+ _specs_from_environment_included_concrete, env=env, included_concrete=included_concrete
+ )
+ return SpecFilter(factory=factory, is_usable=is_reusable, include=include, exclude=exclude)
+
+
+def _specs_from_store(configuration):
+ store = spack.store.create(configuration)
+ with store.db.read_transaction():
+ return store.db.query(installed=True)
+
+
+def _specs_from_mirror():
+ try:
+ return spack.binary_distribution.update_cache_and_get_specs()
+ except (spack.binary_distribution.FetchCacheError, IndexError):
+ # this is raised when no mirrors had indices.
+ # TODO: update mirror configuration so it can indicate that the
+ # TODO: source cache (or any mirror really) doesn't have binaries.
+ return []
+
+
+def _specs_from_environment(env):
+ """Return all concrete specs from the environment. This includes all included concrete"""
+ if env:
+ return [concrete for _, concrete in env.concretized_specs()]
+ else:
+ return []
+
+
+def _specs_from_environment_included_concrete(env, included_concrete):
+ """Return only concrete specs from the environment included from the included_concrete"""
+ if env:
+ assert included_concrete in env.included_concrete_envs
+ return [concrete for concrete in env.included_specs_by_hash[included_concrete].values()]
+ else:
+ return []
+
+
+class ReuseStrategy(enum.Enum):
+ ROOTS = enum.auto()
+ DEPENDENCIES = enum.auto()
+ NONE = enum.auto()
+
+
+class ReusableSpecsSelector:
+ """Selects specs that can be reused during concretization."""
+
+ def __init__(self, configuration: spack.config.Configuration) -> None:
+ self.configuration = configuration
+ self.store = spack.store.create(configuration)
+ self.reuse_strategy = ReuseStrategy.ROOTS
+
+ reuse_yaml = self.configuration.get("concretizer:reuse", False)
+ self.reuse_sources = []
+ if not isinstance(reuse_yaml, typing.Mapping):
+ if reuse_yaml is False:
+ self.reuse_strategy = ReuseStrategy.NONE
+ if reuse_yaml == "dependencies":
+ self.reuse_strategy = ReuseStrategy.DEPENDENCIES
+ self.reuse_sources.extend(
+ [
+ SpecFilter.from_store(
+ configuration=self.configuration, include=[], exclude=[]
+ ),
+ SpecFilter.from_buildcache(
+ configuration=self.configuration, include=[], exclude=[]
+ ),
+ SpecFilter.from_environment(
+ configuration=self.configuration,
+ include=[],
+ exclude=[],
+ env=ev.active_environment(), # includes all concrete includes
+ ),
+ ]
+ )
+ else:
+ roots = reuse_yaml.get("roots", True)
+ if roots is True:
+ self.reuse_strategy = ReuseStrategy.ROOTS
+ else:
+ self.reuse_strategy = ReuseStrategy.DEPENDENCIES
+ default_include = reuse_yaml.get("include", [])
+ default_exclude = reuse_yaml.get("exclude", [])
+ default_sources = [{"type": "local"}, {"type": "buildcache"}]
+ for source in reuse_yaml.get("from", default_sources):
+ include = source.get("include", default_include)
+ exclude = source.get("exclude", default_exclude)
+ if source["type"] == "environment" and "path" in source:
+ env_dir = ev.as_env_dir(source["path"])
+ active_env = ev.active_environment()
+ if active_env and env_dir in active_env.included_concrete_envs:
+ # If environment is included as a concrete environment, use the local copy
+ # of specs in the active environment.
+ # note: included concrete environments are only updated at concretization
+ # time, and reuse needs to matchthe included specs.
+ self.reuse_sources.append(
+ SpecFilter.from_environment_included_concrete(
+ self.configuration,
+ include=include,
+ exclude=exclude,
+ env=active_env,
+ included_concrete=env_dir,
+ )
+ )
+ else:
+ # If the environment is not included as a concrete environment, use the
+ # current specs from its lockfile.
+ self.reuse_sources.append(
+ SpecFilter.from_environment(
+ self.configuration,
+ include=include,
+ exclude=exclude,
+ env=ev.environment_from_name_or_dir(env_dir),
+ )
+ )
+ elif source["type"] == "environment":
+ # reusing from the current environment implicitly reuses from all of the
+ # included concrete environments
+ self.reuse_sources.append(
+ SpecFilter.from_environment(
+ self.configuration,
+ include=include,
+ exclude=exclude,
+ env=ev.active_environment(),
+ )
+ )
+ elif source["type"] == "local":
+ self.reuse_sources.append(
+ SpecFilter.from_store(self.configuration, include=include, exclude=exclude)
+ )
+ elif source["type"] == "buildcache":
+ self.reuse_sources.append(
+ SpecFilter.from_buildcache(
+ self.configuration, include=include, exclude=exclude
+ )
+ )
+
+ def reusable_specs(self, specs: List[spack.spec.Spec]) -> List[spack.spec.Spec]:
+ if self.reuse_strategy == ReuseStrategy.NONE:
+ return []
+
+ result = []
+ for reuse_source in self.reuse_sources:
+ result.extend(reuse_source.selected_specs())
+ # If we only want to reuse dependencies, remove the root specs
+ if self.reuse_strategy == ReuseStrategy.DEPENDENCIES:
+ result = [spec for spec in result if not any(root in spec for root in specs)]
+
+ return result
+
+
class Solver:
"""This is the main external interface class for solving.
It manages solver configuration and preferences in one place. It sets up the solve
and passes the setup method to the driver, as well.
-
- Properties of interest:
-
- ``reuse (bool)``
- Whether to try to reuse existing installs/binaries
-
"""
def __init__(self):
self.driver = PyclingoDriver()
-
- # These properties are settable via spack configuration, and overridable
- # by setting them directly as properties.
- self.reuse = spack.config.get("concretizer:reuse", False)
+ self.selector = ReusableSpecsSelector(configuration=spack.config.CONFIG)
@staticmethod
def _check_input_and_extract_concrete_specs(specs):
@@ -3422,40 +4148,7 @@ class Solver:
spack.spec.Spec.ensure_valid_variants(s)
return reusable
- def _reusable_specs(self, specs):
- reusable_specs = []
- if self.reuse:
- packages = spack.config.get("packages")
- # Specs from the local Database
- with spack.store.STORE.db.read_transaction():
- reusable_specs.extend(
- s
- for s in spack.store.STORE.db.query(installed=True)
- if _is_reusable(s, packages, local=True)
- )
-
- # Specs from buildcaches
- try:
- reusable_specs.extend(
- s
- for s in spack.binary_distribution.update_cache_and_get_specs()
- if _is_reusable(s, packages, local=False)
- )
- except (spack.binary_distribution.FetchCacheError, IndexError):
- # this is raised when no mirrors had indices.
- # TODO: update mirror configuration so it can indicate that the
- # TODO: source cache (or any mirror really) doesn't have binaries.
- pass
-
- # If we only want to reuse dependencies, remove the root specs
- if self.reuse == "dependencies":
- reusable_specs = [
- spec for spec in reusable_specs if not any(root in spec for root in specs)
- ]
-
- return reusable_specs
-
- def solve(
+ def solve_with_stats(
self,
specs,
out=None,
@@ -3466,6 +4159,8 @@ class Solver:
allow_deprecated=False,
):
"""
+ Concretize a set of specs and track the timing and statistics for the solve
+
Arguments:
specs (list): List of ``Spec`` objects to solve for.
out: Optionally write the generate ASP program to a file-like object.
@@ -3477,15 +4172,22 @@ class Solver:
setup_only (bool): if True, stop after setup and don't solve (default False).
allow_deprecated (bool): allow deprecated version in the solve
"""
- # Check upfront that the variants are admissible
specs = [s.lookup_hash() for s in specs]
reusable_specs = self._check_input_and_extract_concrete_specs(specs)
- reusable_specs.extend(self._reusable_specs(specs))
+ reusable_specs.extend(self.selector.reusable_specs(specs))
setup = SpackSolverSetup(tests=tests)
output = OutputConfiguration(timers=timers, stats=stats, out=out, setup_only=setup_only)
- result, _, _ = self.driver.solve(
+ return self.driver.solve(
setup, specs, reuse=reusable_specs, output=output, allow_deprecated=allow_deprecated
)
+
+ def solve(self, specs, **kwargs):
+ """
+ Convenience function for concretizing a set of specs and ignoring timing
+ and statistics. Uses the same kwargs as solve_with_stats.
+ """
+ # Check upfront that the variants are admissible
+ result, _, _ = self.solve_with_stats(specs, **kwargs)
return result
def solve_in_rounds(
@@ -3509,7 +4211,7 @@ class Solver:
"""
specs = [s.lookup_hash() for s in specs]
reusable_specs = self._check_input_and_extract_concrete_specs(specs)
- reusable_specs.extend(self._reusable_specs(specs))
+ reusable_specs.extend(self.selector.reusable_specs(specs))
setup = SpackSolverSetup(tests=tests)
# Tell clingo that we don't have to solve all the inputs at once
@@ -3531,19 +4233,22 @@ class Solver:
if not result.unsolved_specs:
break
- # This means we cannot progress with solving the input
- if not result.satisfiable or not result.specs:
- break
+ if not result.specs:
+ # This is also a problem: no specs were solved for, which
+ # means we would be in a loop if we tried again
+ unsolved_str = Result.format_unsolved(result.unsolved_specs)
+ raise InternalConcretizerError(
+ "Internal Spack error: a subset of input specs could not"
+ f" be solved for.\n\t{unsolved_str}"
+ )
- input_specs = result.unsolved_specs
+ input_specs = list(x for (x, y) in result.unsolved_specs)
for spec in result.specs:
reusable_specs.extend(spec.traverse())
class UnsatisfiableSpecError(spack.error.UnsatisfiableSpecError):
- """
- Subclass for new constructor signature for new concretizer
- """
+ """There was an issue with the spec that was requested (i.e. a user error)."""
def __init__(self, msg):
super(spack.error.UnsatisfiableSpecError, self).__init__(msg)
@@ -3553,8 +4258,21 @@ class UnsatisfiableSpecError(spack.error.UnsatisfiableSpecError):
class InternalConcretizerError(spack.error.UnsatisfiableSpecError):
- """
- Subclass for new constructor signature for new concretizer
+ """Errors that indicate a bug in Spack."""
+
+ def __init__(self, msg):
+ super(spack.error.UnsatisfiableSpecError, self).__init__(msg)
+ self.provided = None
+ self.required = None
+ self.constraint_type = None
+
+
+class SolverError(InternalConcretizerError):
+ """For cases where the solver is unable to produce a solution.
+
+ Such cases are unexpected because we allow for solutions with errors,
+ so for example user specs that are over-constrained should still
+ get a solution.
"""
def __init__(self, provided, conflicts):
@@ -3567,10 +4285,13 @@ class InternalConcretizerError(spack.error.UnsatisfiableSpecError):
if conflicts:
msg += ", errors are:" + "".join([f"\n {conflict}" for conflict in conflicts])
- super(spack.error.UnsatisfiableSpecError, self).__init__(msg)
-
- self.provided = provided
+ super().__init__(msg)
# Add attribute expected of the superclass interface
self.required = None
self.constraint_type = None
+ self.provided = provided
+
+
+class InvalidSpliceError(spack.error.SpackError):
+ """For cases in which the splice configuration is invalid."""
diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index 21cdbbf848..ebcffa784d 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -18,36 +18,79 @@
{ attr("virtual_node", node(0..X-1, Package)) } :- max_dupes(Package, X), virtual(Package).
% Integrity constraints on DAG nodes
-:- attr("root", PackageNode), not attr("node", PackageNode).
-:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
-:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
-:- attr("hash", PackageNode, _), not attr("node", PackageNode).
-:- attr("node_platform", PackageNode, _), not attr("node", PackageNode).
-:- attr("node_os", PackageNode, _), not attr("node", PackageNode).
-:- attr("node_target", PackageNode, _), not attr("node", PackageNode).
-:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode).
-:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode).
-:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode).
-:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode).
-:- attr("no_flags", PackageNode, _), not attr("node", PackageNode).
-:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode).
-:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode).
-:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode).
-:- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode).
-:- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode).
-:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), internal_error("virtual node with no provider").
-:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), internal_error("provider with no virtual node").
-:- provider(PackageNode, _), not attr("node", PackageNode), internal_error("provider with no real node").
-
-:- attr("root", node(ID, PackageNode)), ID > min_dupe_id, internal_error("root with a non-minimal duplicate ID").
+:- attr("root", PackageNode),
+ not attr("node", PackageNode),
+ internal_error("Every root must be a node").
+:- attr("version", PackageNode, _),
+ not attr("node", PackageNode),
+ not attr("virtual_node", PackageNode),
+ internal_error("Only nodes and virtual_nodes can have versions").
+:- attr("node_version_satisfies", PackageNode, _),
+ not attr("node", PackageNode),
+ not attr("virtual_node", PackageNode),
+ internal_error("Only nodes and virtual_nodes can have version satisfaction").
+:- attr("hash", PackageNode, _),
+ not attr("node", PackageNode),
+ internal_error("Only nodes can have hashes").
+:- attr("node_platform", PackageNode, _),
+ not attr("node", PackageNode),
+ internal_error("Only nodes can have platforms").
+:- attr("node_os", PackageNode, _), not attr("node", PackageNode),
+ internal_error("Only nodes can have node_os").
+:- attr("node_target", PackageNode, _), not attr("node", PackageNode),
+ internal_error("Only nodes can have node_target").
+:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode),
+ internal_error("Only nodes can have node_compiler_version").
+:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode),
+ internal_error("variant_value true for a non-node").
+:- attr("node_flag", PackageNode, _), not attr("node", PackageNode),
+ internal_error("node_flag assigned for non-node").
+:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode),
+ internal_error("external_spec_selected for non-node").
+:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode),
+ internal_error("non-node depends on something").
+:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode),
+ internal_error("something depends_on a non-node").
+:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode),
+ internal_error("virtual node with no provider").
+:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode),
+ internal_error("provider with no virtual node").
+:- provider(PackageNode, _), not attr("node", PackageNode),
+ internal_error("provider with no real node").
+:- node_has_variant(PackageNode, _, _), not attr("node", PackageNode),
+ internal_error("node has variant for a non-node").
+:- attr("variant_set", PackageNode, _, _), not attr("node", PackageNode),
+ internal_error("variant_set for a non-node").
+:- variant_is_propagated(PackageNode, _), not attr("node", PackageNode),
+ internal_error("variant_is_propagated for a non-node").
+
+:- attr("root", node(ID, PackageNode)), ID > min_dupe_id,
+ internal_error("root with a non-minimal duplicate ID").
% Nodes in the "root" unification set cannot depend on non-root nodes if the dependency is "link" or "run"
:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "link"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("link dependency out of the root unification set").
:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "run"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("run dependency out of the root unification set").
+% Namespaces are statically assigned by a package fact if not otherwise set
+error(100, "{0} does not have a namespace", Package) :- attr("node", node(ID, Package)),
+ not attr("namespace", node(ID, Package), _),
+ internal_error("A node must have a namespace").
+error(100, "{0} cannot come from both {1} and {2} namespaces", Package, NS1, NS2) :- attr("node", node(ID, Package)),
+ attr("namespace", node(ID, Package), NS1),
+ attr("namespace", node(ID, Package), NS2),
+ NS1 != NS2,
+ internal_error("A node cannot have two namespaces").
+
+attr("namespace", node(ID, Package), Namespace) :- attr("namespace_set", node(ID, Package), Namespace).
+attr("namespace", node(ID, Package), Namespace)
+ :- attr("node", node(ID, Package)),
+ not attr("namespace_set", node(ID, Package), _),
+ pkg_fact(Package, namespace(Namespace)).
+
% Rules on "unification sets", i.e. on sets of nodes allowing a single configuration of any given package
unify(SetID, PackageName) :- unification_set(SetID, node(_, PackageName)).
-:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName).
+:- 2 { unification_set(SetID, node(_, PackageName)) }, unify(SetID, PackageName),
+ internal_error("Cannot have multiple unification sets IDs for one set").
unification_set("root", PackageNode) :- attr("root", PackageNode).
unification_set(SetID, ChildNode) :- attr("depends_on", ParentNode, ChildNode, Type), Type != "build", unification_set(SetID, ParentNode).
@@ -73,10 +116,12 @@ unification_set(SetID, VirtualNode)
% as a build dependency.
%
% We'll need to relax the rule before we get to actual cross-compilation
-:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y.
+:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y,
+ internal_error("Cannot split link/build deptypes for a single edge (yet)").
#defined multiple_unification_sets/1.
+#defined runtime/1.
%----
% Rules to break symmetry and speed-up searches
@@ -109,7 +154,6 @@ unification_set(SetID, VirtualNode)
% TODO: literals, at the moment, can only influence the "root" unification set. This needs to be extended later.
% Node attributes that have multiple node arguments (usually, only the first argument is a node)
-multiple_nodes_attribute("node_flag_source").
multiple_nodes_attribute("depends_on").
multiple_nodes_attribute("virtual_on_edge").
multiple_nodes_attribute("provider_set").
@@ -123,10 +167,13 @@ trigger_node(TriggerID, Node, Node) :-
trigger_condition_holds(TriggerID, Node),
literal(TriggerID).
-% Since we trigger the existence of literal nodes from a condition, we need to construct
-% the condition_set/2 manually below
+% Since we trigger the existence of literal nodes from a condition, we need to construct the condition_set/2
mentioned_in_literal(Root, Mentioned) :- mentioned_in_literal(TriggerID, Root, Mentioned), solve_literal(TriggerID).
-condition_set(node(min_dupe_id, Root), node(min_dupe_id, Mentioned)) :- mentioned_in_literal(Root, Mentioned).
+condition_set(node(min_dupe_id, Root), node(min_dupe_id, Root)) :- mentioned_in_literal(Root, Root).
+
+1 { condition_set(node(min_dupe_id, Root), node(0..Y-1, Mentioned)) : max_dupes(Mentioned, Y) } 1 :-
+ mentioned_in_literal(Root, Mentioned), Mentioned != Root,
+ internal_error("must have exactly one condition_set for literals").
% Discriminate between "roots" that have been explicitly requested, and roots that are deduced from "virtual roots"
explicitly_requested_root(node(min_dupe_id, Package)) :-
@@ -134,6 +181,21 @@ explicitly_requested_root(node(min_dupe_id, Package)) :-
trigger_and_effect(Package, TriggerID, EffectID),
imposed_constraint(EffectID, "root", Package).
+
+% Keep track of which nodes are associated with which root DAG
+associated_with_root(RootNode, RootNode) :- attr("root", RootNode).
+
+associated_with_root(RootNode, ChildNode) :-
+ depends_on(ParentNode, ChildNode),
+ associated_with_root(RootNode, ParentNode).
+
+% We cannot have a node in the root condition set, that is not associated with that root
+:- attr("root", RootNode),
+ condition_set(RootNode, node(X, Package)),
+ not virtual(Package),
+ not associated_with_root(RootNode, node(X, Package)),
+ internal_error("nodes in root condition set must be associated with root").
+
#defined concretize_everything/0.
#defined literal/1.
@@ -156,6 +218,14 @@ error(100, multiple_values_error, Attribute, Package)
2 { attr(Attribute, node(ID, Package), Value) }.
%-----------------------------------------------------------------------------
+% Languages used
+%-----------------------------------------------------------------------------
+
+attr("language", node(X, Package), Language) :-
+ condition_holds(ConditionID, node(X, Package)),
+ pkg_fact(Package,language(ConditionID, Language)).
+
+%-----------------------------------------------------------------------------
% Version semantics
%-----------------------------------------------------------------------------
@@ -228,6 +298,7 @@ possible_version_weight(node(ID, Package), Weight)
:- attr("version", node(ID, Package), Version),
version_weight(node(ID, Package), Weight),
not pkg_fact(Package, version_declared(Version, Weight, "installed")),
+ not pkg_fact(Package, version_declared(Version, Weight, "installed_git_version")),
not build(node(ID, Package)),
internal_error("Build version weight used for reused package").
@@ -320,7 +391,6 @@ trigger_condition_holds(ID, RequestorNode) :-
attr(Name, node(X, A1), A2, A3) : condition_requirement(ID, Name, A1, A2, A3), condition_nodes(ID, PackageNode, node(X, A1)), not multiple_nodes_attribute(Name);
attr(Name, node(X, A1), A2, A3, A4) : condition_requirement(ID, Name, A1, A2, A3, A4), condition_nodes(ID, PackageNode, node(X, A1));
% Special cases
- attr("node_flag_source", node(X, A1), A2, node(Y, A3)) : condition_requirement(ID, "node_flag_source", A1, A2, A3), condition_nodes(ID, PackageNode, node(X, A1)), condition_nodes(ID, PackageNode, node(Y, A3));
not cannot_hold(ID, PackageNode).
condition_holds(ConditionID, node(X, Package))
@@ -357,8 +427,10 @@ imposed_nodes(ConditionID, PackageNode, node(X, A1))
condition_set(PackageNode, node(X, A1)),
attr("hash", PackageNode, ConditionID).
-:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)).
-:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)).
+:- imposed_packages(ID, A1), impose(ID, PackageNode), not condition_set(PackageNode, node(_, A1)),
+ internal_error("Imposing constraint outside of condition set").
+:- imposed_packages(ID, A1), impose(ID, PackageNode), not imposed_nodes(ID, PackageNode, node(_, A1)),
+ internal_error("Imposing constraint outside of imposed_nodes").
% Conditions that hold impose may impose constraints on other specs
attr(Name, node(X, A1)) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1), imposed_nodes(ID, PackageNode, node(X, A1)).
@@ -366,13 +438,6 @@ attr(Name, node(X, A1), A2) :- impose(ID, PackageNode), imposed_constrai
attr(Name, node(X, A1), A2, A3) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2, A3), imposed_nodes(ID, PackageNode, node(X, A1)), not multiple_nodes_attribute(Name).
attr(Name, node(X, A1), A2, A3, A4) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2, A3, A4), imposed_nodes(ID, PackageNode, node(X, A1)).
-% For node flag sources we need to look at the condition_set of the source, since it is the dependent
-% of the package on which I want to impose the constraint
-attr("node_flag_source", node(X, A1), A2, node(Y, A3))
- :- impose(ID, node(X, A1)),
- imposed_constraint(ID, "node_flag_source", A1, A2, A3),
- condition_set(node(Y, A3), node(X, A1)).
-
% Provider set is relevant only for literals, since it's the only place where `^[virtuals=foo] bar`
% might appear in the HEAD of a rule
attr("provider_set", node(min_dupe_id, Provider), node(min_dupe_id, Virtual))
@@ -388,7 +453,8 @@ provider(ProviderNode, VirtualNode) :- attr("provider_set", ProviderNode, Virtua
% satisfy the dependency.
1 { attr("depends_on", node(X, A1), node(0..Y-1, A2), A3) : max_dupes(A2, Y) } 1
:- impose(ID, node(X, A1)),
- imposed_constraint(ID, "depends_on", A1, A2, A3).
+ imposed_constraint(ID, "depends_on", A1, A2, A3),
+ internal_error("Build deps must land in exactly one duplicate").
% Reconstruct virtual dependencies for reused specs
attr("virtual_on_edge", node(X, A1), node(Y, A2), Virtual)
@@ -412,8 +478,8 @@ virtual_condition_holds(node(Y, A2), Virtual)
% we cannot have additional flag values when we are working with concrete specs
:- attr("node", node(ID, Package)),
attr("hash", node(ID, Package), Hash),
- attr("node_flag", node(ID, Package), FlagType, Flag),
- not imposed_constraint(Hash, "node_flag", Package, FlagType, Flag),
+ attr("node_flag", node(ID, Package), node_flag(FlagType, Flag, _, _)),
+ not imposed_constraint(Hash, "node_flag", Package, node_flag(FlagType, Flag, _, _)),
internal_error("imposed hash without imposing all flag values").
#defined condition/2.
@@ -511,6 +577,13 @@ attr("virtual_on_edge", PackageNode, ProviderNode, Virtual)
provider(ProviderNode, node(_, Virtual)),
not external(PackageNode).
+% If a virtual node is in the answer set, it must be either a virtual root,
+% or used somewhere
+:- attr("virtual_node", node(_, Virtual)),
+ not attr("virtual_on_incoming_edges", _, Virtual),
+ not attr("virtual_root", node(_, Virtual)),
+ internal_error("virtual node does not match incoming edge").
+
attr("virtual_on_incoming_edges", ProviderNode, Virtual)
:- attr("virtual_on_edge", _, ProviderNode, Virtual).
@@ -563,7 +636,8 @@ do_not_impose(EffectID, node(X, Package))
virtual_condition_holds(_, PossibleProvider, Virtual),
PossibleProvider != ProviderNode,
explicitly_requested_root(PossibleProvider),
- not explicitly_requested_root(ProviderNode).
+ not explicitly_requested_root(ProviderNode),
+ internal_error("If a root can provide a virtual, it must be the provider").
% A package cannot be the actual provider for a virtual if it does not
% fulfill the conditions to provide that virtual
@@ -577,25 +651,18 @@ do_not_impose(EffectID, node(X, Package))
% Virtual dependency weights
%-----------------------------------------------------------------------------
-% A provider may have different possible weights depending on whether it's an external
-% or not, or on preferences expressed in packages.yaml etc. This rule ensures that
+% A provider has different possible weights depending on its preference. This rule ensures that
% we select the weight, among the possible ones, that minimizes the overall objective function.
1 { provider_weight(DependencyNode, VirtualNode, Weight) :
possible_provider_weight(DependencyNode, VirtualNode, Weight, _) } 1
:- provider(DependencyNode, VirtualNode), internal_error("Package provider weights must be unique").
-% A provider that is an external can use a weight of 0
-possible_provider_weight(DependencyNode, VirtualNode, 0, "external")
- :- provider(DependencyNode, VirtualNode),
- external(DependencyNode).
-
-% A provider mentioned in the default configuration can use a weight
-% according to its priority in the list of providers
+% Any configured provider has a weight based on index in the preference list
possible_provider_weight(node(ProviderID, Provider), node(VirtualID, Virtual), Weight, "default")
:- provider(node(ProviderID, Provider), node(VirtualID, Virtual)),
default_provider_preference(Virtual, Provider, Weight).
-% Any provider can use 100 as a weight, which is very high and discourage its use
+% Any non-configured provider has a default weight of 100
possible_provider_weight(node(ProviderID, Provider), VirtualNode, 100, "fallback")
:- provider(node(ProviderID, Provider), VirtualNode).
@@ -695,22 +762,36 @@ requirement_group_satisfied(node(ID, Package), X) :-
activate_requirement(node(ID, Package), X),
requirement_group(Package, X).
-% TODO: the following two choice rules allow the solver to add compiler
+% Do not impose requirements, if the conditional requirement is not active
+do_not_impose(EffectID, node(ID, Package)) :-
+ trigger_condition_holds(TriggerID, node(ID, Package)),
+ pkg_fact(Package, condition_trigger(ConditionID, TriggerID)),
+ pkg_fact(Package, condition_effect(ConditionID, EffectID)),
+ requirement_group_member(ConditionID , Package, RequirementID),
+ not activate_requirement(node(ID, Package), RequirementID).
+
+% When we have a required provider, we need to ensure that the provider/2 facts respect
+% the requirement. This is particularly important for packages that could provide multiple
+% virtuals independently
+required_provider(Provider, Virtual)
+ :- requirement_group_member(ConditionID, Virtual, RequirementID),
+ condition_holds(ConditionID, _),
+ virtual(Virtual),
+ pkg_fact(Virtual, condition_effect(ConditionID, EffectID)),
+ imposed_constraint(EffectID, "node", Provider).
+
+:- provider(node(Y, Package), node(X, Virtual)), required_provider(Provider, Virtual), Package != Provider,
+ internal_error("If a provider is required the concretizer must use it").
+
+% TODO: the following choice rule allows the solver to add compiler
% flags if their only source is from a requirement. This is overly-specific
% and should use a more-generic approach like in https://github.com/spack/spack/pull/37180
-{ attr("node_flag", node(ID, Package), FlagType, FlagValue) } :-
+{ attr("node_flag", node(ID, Package), NodeFlag) } :-
requirement_group_member(ConditionID, Package, RequirementID),
activate_requirement(node(ID, Package), RequirementID),
pkg_fact(Package, condition_effect(ConditionID, EffectID)),
- imposed_constraint(EffectID, "node_flag_set", Package, FlagType, FlagValue).
-
-{ attr("node_flag_source", node(NodeID1, Package1), FlagType, node(NodeID2, Package2)) } :-
- requirement_group_member(ConditionID, Package1, RequirementID),
- activate_requirement(node(NodeID1, Package1), RequirementID),
- pkg_fact(Package1, condition_effect(ConditionID, EffectID)),
- imposed_constraint(EffectID, "node_flag_source", Package1, FlagType, Package2),
- imposed_nodes(EffectID, node(NodeID2, Package2), node(NodeID1, Package1)).
+ imposed_constraint(EffectID, "node_flag_set", Package, NodeFlag).
requirement_weight(node(ID, Package), Group, W) :-
W = #min {
@@ -747,89 +828,133 @@ error(10, Message) :-
%-----------------------------------------------------------------------------
% Variant semantics
%-----------------------------------------------------------------------------
-% a variant is a variant of a package if it is a variant under some condition
-% and that condition holds
-node_has_variant(node(NodeID, Package), Variant) :-
- pkg_fact(Package, conditional_variant(ID, Variant)),
- condition_holds(ID, node(NodeID, Package)).
-
-node_has_variant(node(ID, Package), Variant) :-
- pkg_fact(Package, variant(Variant)),
- attr("node", node(ID, Package)).
-
-% Variant propagation is forwarded to dependencies
-attr("variant_propagation_candidate", PackageNode, Variant, Value, Source) :-
- attr("node", PackageNode),
- depends_on(ParentNode, PackageNode),
- attr("variant_value", node(_, Source), Variant, Value),
- attr("variant_propagation_candidate", ParentNode, Variant, _, Source).
-
-% If the node is a candidate, and it has the variant and value,
-% then those variant and value should be propagated
-attr("variant_propagate", node(ID, Package), Variant, Value, Source) :-
- attr("variant_propagation_candidate", node(ID, Package), Variant, Value, Source),
- node_has_variant(node(ID, Package), Variant),
- pkg_fact(Package, variant_possible_value(Variant, Value)),
- not attr("variant_set", node(ID, Package), Variant).
-
-% Propagate the value, if there is the corresponding attribute
-attr("variant_value", PackageNode, Variant, Value) :- attr("variant_propagate", PackageNode, Variant, Value, _).
-
-% If a variant is propagated, we cannot have extraneous values (this is for multi valued variants)
-variant_is_propagated(PackageNode, Variant) :- attr("variant_propagate", PackageNode, Variant, _, _).
-:- variant_is_propagated(PackageNode, Variant),
- attr("variant_value", PackageNode, Variant, Value),
- not attr("variant_propagate", PackageNode, Variant, Value, _).
+% Packages define potentially several definitions for each variant, and depending
+% on their attibutes, duplicate nodes for the same package may use different
+% definitions. So the variant logic has several jobs:
+% A. Associate a variant definition with a node, by VariantID
+% B. Associate defaults and attributes (sticky, etc.) for the selected variant ID with the node.
+% C. Once these rules are established for a node, select variant value(s) based on them.
+
+% A: Selecting a variant definition
+
+% Variant definitions come from package facts in two ways:
+% 1. unconditional variants are always defined on all nodes for a given package
+variant_definition(node(NodeID, Package), Name, VariantID) :-
+ pkg_fact(Package, variant_definition(Name, VariantID)),
+ attr("node", node(NodeID, Package)).
+
+% 2. conditional variants are only defined if the conditions hold for the node
+variant_definition(node(NodeID, Package), Name, VariantID) :-
+ pkg_fact(Package, variant_condition(Name, VariantID, ConditionID)),
+ condition_holds(ConditionID, node(NodeID, Package)).
+
+% If there are any definitions for a variant on a node, the variant is "defined".
+variant_defined(PackageNode, Name) :- variant_definition(PackageNode, Name, _).
+
+% We must select one definition for each defined variant on a node.
+1 {
+ node_has_variant(PackageNode, Name, VariantID) : variant_definition(PackageNode, Name, VariantID)
+} 1 :-
+ variant_defined(PackageNode, Name).
+
+% Solver must pick the variant definition with the highest id. When conditions hold
+% for two or more variant definitions, this prefers the last one defined.
+:- node_has_variant(node(NodeID, Package), Name, SelectedVariantID),
+ variant_definition(node(NodeID, Package), Name, VariantID),
+ VariantID > SelectedVariantID,
+ internal_error("If the solver picks a variant descriptor it must use that variant descriptor").
+
+% B: Associating applicable package rules with nodes
-% Cannot receive different values from different sources on the same variant
-error(100, "{0} and {1} cannot both propagate variant '{2}' to package {3} with values '{4}' and '{5}'", Source1, Source2, Variant, Package, Value1, Value2) :-
- attr("variant_propagate", node(X, Package), Variant, Value1, Source1),
- attr("variant_propagate", node(X, Package), Variant, Value2, Source2),
- node_has_variant(node(X, Package), Variant),
- Value1 < Value2, Source1 < Source2.
+% The default value for a variant in a package is what is prescribed:
+% 1. On the command line
+% 2. In packages.yaml (if there's no command line settings)
+% 3. In the package.py file (if there are no settings in packages.yaml and the command line)
+
+% -- Associate the definition's default values with the node
+% note that the package.py variant defaults are associated with a particular definition, but
+% packages.yaml and CLI are associated with just the variant name.
+% Also, settings specified on the CLI apply to all duplicates, but always have
+% `min_dupe_id` as their node id.
+variant_default_value(node(NodeID, Package), VariantName, Value) :-
+ node_has_variant(node(NodeID, Package), VariantName, VariantID),
+ pkg_fact(Package, variant_default_value_from_package_py(VariantID, Value)),
+ not variant_default_value_from_packages_yaml(Package, VariantName, _),
+ not attr("variant_default_value_from_cli", node(min_dupe_id, Package), VariantName, _).
+
+variant_default_value(node(NodeID, Package), VariantName, Value) :-
+ node_has_variant(node(NodeID, Package), VariantName, _),
+ variant_default_value_from_packages_yaml(Package, VariantName, Value),
+ not attr("variant_default_value_from_cli", node(min_dupe_id, Package), VariantName, _).
+
+variant_default_value(node(NodeID, Package), VariantName, Value) :-
+ node_has_variant(node(NodeID, Package), VariantName, _),
+ attr("variant_default_value_from_cli", node(min_dupe_id, Package), VariantName, Value).
+
+% -- Associate the definition's possible values with the node
+variant_possible_value(node(NodeID, Package), VariantName, Value) :-
+ node_has_variant(node(NodeID, Package), VariantName, VariantID),
+ pkg_fact(Package, variant_possible_value(VariantID, Value)).
+
+variant_value_from_disjoint_sets(node(NodeID, Package), VariantName, Value1, Set1) :-
+ node_has_variant(node(NodeID, Package), VariantName, VariantID),
+ pkg_fact(Package, variant_value_from_disjoint_sets(VariantID, Value1, Set1)).
+
+% -- Associate definition's arity with the node
+variant_single_value(node(NodeID, Package), VariantName) :-
+ node_has_variant(node(NodeID, Package), VariantName, VariantID),
+ not variant_type(VariantID, "multi").
+
+% C: Determining variant values on each node
+
+% if a variant is sticky, but not set, its value is the default value
+attr("variant_selected", node(ID, Package), Variant, Value, VariantType, VariantID) :-
+ node_has_variant(node(ID, Package), Variant, VariantID),
+ variant_default_value(node(ID, Package), Variant, Value),
+ pkg_fact(Package, variant_sticky(VariantID)),
+ variant_type(VariantID, VariantType),
+ not attr("variant_set", node(ID, Package), Variant),
+ build(node(ID, Package)).
+
+% we can choose variant values from all the possible values for the node
+{
+ attr("variant_selected", node(ID, Package), Variant, Value, VariantType, VariantID)
+ : variant_possible_value(node(ID, Package), Variant, Value)
+} :-
+ attr("node", node(ID, Package)),
+ node_has_variant(node(ID, Package), Variant, VariantID),
+ variant_type(VariantID, VariantType),
+ build(node(ID, Package)).
+
+% variant_selected is only needed for reconstruction on the python side, so we can ignore it here
+attr("variant_value", PackageNode, Variant, Value) :-
+ attr("variant_selected", PackageNode, Variant, Value, VariantType, VariantID).
% a variant cannot be set if it is not a variant on the package
error(100, "Cannot set variant '{0}' for package '{1}' because the variant condition cannot be satisfied for the given spec", Variant, Package)
- :- attr("variant_set", node(X, Package), Variant),
- not node_has_variant(node(X, Package), Variant),
- build(node(X, Package)).
+ :- attr("variant_set", node(ID, Package), Variant),
+ not node_has_variant(node(ID, Package), Variant, _),
+ build(node(ID, Package)).
% a variant cannot take on a value if it is not a variant of the package
error(100, "Cannot set variant '{0}' for package '{1}' because the variant condition cannot be satisfied for the given spec", Variant, Package)
- :- attr("variant_value", node(X, Package), Variant, _),
- not node_has_variant(node(X, Package), Variant),
- build(node(X, Package)).
-
-% if a variant is sticky and not set its value is the default value
-attr("variant_value", node(ID, Package), Variant, Value) :-
- node_has_variant(node(ID, Package), Variant),
- not attr("variant_set", node(ID, Package), Variant),
- pkg_fact(Package, variant_sticky(Variant)),
- variant_default_value(Package, Variant, Value),
- build(node(ID, Package)).
+ :- attr("variant_value", node(ID, Package), Variant, _),
+ not node_has_variant(node(ID, Package), Variant, _),
+ build(node(ID, Package)).
% at most one variant value for single-valued variants.
-{
- attr("variant_value", node(ID, Package), Variant, Value)
- : pkg_fact(Package, variant_possible_value(Variant, Value))
-}
- :- attr("node", node(ID, Package)),
- node_has_variant(node(ID, Package), Variant),
- build(node(ID, Package)).
-
-
error(100, "'{0}' required multiple values for single-valued variant '{1}'", Package, Variant)
:- attr("node", node(ID, Package)),
- node_has_variant(node(ID, Package), Variant),
- pkg_fact(Package, variant_single_value(Variant)),
+ node_has_variant(node(ID, Package), Variant, _),
+ variant_single_value(node(ID, Package), Variant),
build(node(ID, Package)),
2 { attr("variant_value", node(ID, Package), Variant, Value) }.
error(100, "No valid value for variant '{1}' of package '{0}'", Package, Variant)
- :- attr("node", node(X, Package)),
- node_has_variant(node(X, Package), Variant),
- build(node(X, Package)),
- not attr("variant_value", node(X, Package), Variant, _).
+ :- attr("node", node(ID, Package)),
+ node_has_variant(node(ID, Package), Variant, _),
+ build(node(ID, Package)),
+ not attr("variant_value", node(ID, Package), Variant, _).
% if a variant is set to anything, it is considered 'set'.
attr("variant_set", PackageNode, Variant) :- attr("variant_set", PackageNode, Variant, _).
@@ -839,50 +964,47 @@ attr("variant_set", PackageNode, Variant) :- attr("variant_set", PackageNode, Va
% have been built w/different variants from older/different package versions.
error(10, "'Spec({1}={2})' is not a valid value for '{0}' variant '{1}'", Package, Variant, Value)
:- attr("variant_value", node(ID, Package), Variant, Value),
- not pkg_fact(Package, variant_possible_value(Variant, Value)),
+ not variant_possible_value(node(ID, Package), Variant, Value),
build(node(ID, Package)).
-% Some multi valued variants accept multiple values from disjoint sets.
-% Ensure that we respect that constraint and we don't pick values from more
-% than one set at once
+% Some multi valued variants accept multiple values from disjoint sets. Ensure that we
+% respect that constraint and we don't pick values from more than one set at once
error(100, "{0} variant '{1}' cannot have values '{2}' and '{3}' as they come from disjoint value sets", Package, Variant, Value1, Value2)
:- attr("variant_value", node(ID, Package), Variant, Value1),
attr("variant_value", node(ID, Package), Variant, Value2),
- pkg_fact(Package, variant_value_from_disjoint_sets(Variant, Value1, Set1)),
- pkg_fact(Package, variant_value_from_disjoint_sets(Variant, Value2, Set2)),
+ variant_value_from_disjoint_sets(node(ID, Package), Variant, Value1, Set1),
+ variant_value_from_disjoint_sets(node(ID, Package), Variant, Value2, Set2),
Set1 < Set2, % see[1]
build(node(ID, Package)).
-% variant_set is an explicitly set variant value. If it's not 'set',
-% we revert to the default value. If it is set, we force the set value
-attr("variant_value", PackageNode, Variant, Value)
- :- attr("node", PackageNode),
- node_has_variant(PackageNode, Variant),
- attr("variant_set", PackageNode, Variant, Value).
+:- attr("variant_set", node(ID, Package), Variant, Value),
+ not attr("variant_value", node(ID, Package), Variant, Value).
+ internal_error("If a variant is set to a value it must have that value").
% The rules below allow us to prefer default values for variants
% whenever possible. If a variant is set in a spec, or if it is
% specified in an external, we score it as if it was a default value.
variant_not_default(node(ID, Package), Variant, Value)
:- attr("variant_value", node(ID, Package), Variant, Value),
- not variant_default_value(Package, Variant, Value),
+ not variant_default_value(node(ID, Package), Variant, Value),
% variants set explicitly on the CLI don't count as non-default
not attr("variant_set", node(ID, Package), Variant, Value),
% variant values forced by propagation don't count as non-default
- not attr("variant_propagate", node(ID, Package), Variant, Value, _),
+ not propagate(node(ID, Package), variant_value(Variant, Value, _)),
% variants set on externals that we could use don't count as non-default
% this makes spack prefer to use an external over rebuilding with the
% default configuration
not external_with_variant_set(node(ID, Package), Variant, Value),
attr("node", node(ID, Package)).
-
% A default variant value that is not used
variant_default_not_used(node(ID, Package), Variant, Value)
- :- variant_default_value(Package, Variant, Value),
- node_has_variant(node(ID, Package), Variant),
+ :- variant_default_value(node(ID, Package), Variant, Value),
+ node_has_variant(node(ID, Package), Variant, _),
not attr("variant_value", node(ID, Package), Variant, Value),
- not attr("variant_propagate", node(ID, Package), Variant, _, _),
+ not propagate(node(ID, Package), variant_value(Variant, _, _)),
+ % variant set explicitly don't count for this metric
+ not attr("variant_set", node(ID, Package), Variant, _),
attr("node", node(ID, Package)).
% The variant is set in an external spec
@@ -894,25 +1016,6 @@ external_with_variant_set(node(NodeID, Package), Variant, Value)
external(node(NodeID, Package)),
attr("node", node(NodeID, Package)).
-% The default value for a variant in a package is what is prescribed:
-%
-% 1. On the command line
-% 2. In packages.yaml (if there's no command line settings)
-% 3. In the package.py file (if there are no settings in
-% packages.yaml and the command line)
-%
-variant_default_value(Package, Variant, Value)
- :- pkg_fact(Package, variant_default_value_from_package_py(Variant, Value)),
- not variant_default_value_from_packages_yaml(Package, Variant, _),
- not attr("variant_default_value_from_cli", node(min_dupe_id, Package), Variant, _).
-
-variant_default_value(Package, Variant, Value)
- :- variant_default_value_from_packages_yaml(Package, Variant, Value),
- not attr("variant_default_value_from_cli", node(min_dupe_id, Package), Variant, _).
-
-variant_default_value(Package, Variant, Value) :-
- attr("variant_default_value_from_cli", node(min_dupe_id, Package), Variant, Value).
-
% Treat 'none' in a special way - it cannot be combined with other
% values even if the variant is multi-valued
error(100, "{0} variant '{1}' cannot have values '{2}' and 'none'", Package, Variant, Value)
@@ -921,36 +1024,169 @@ error(100, "{0} variant '{1}' cannot have values '{2}' and 'none'", Package, Var
Value != "none",
build(node(X, Package)).
-% patches and dev_path are special variants -- they don't have to be
-% declared in the package, so we just allow them to spring into existence
-% when assigned a value.
-auto_variant("dev_path").
-auto_variant("patches").
+% -- Auto variants
+% These don't have to be declared in the package. We allow them to spring into
+% existence when assigned a value.
+variant_possible_value(PackageNode, Variant, Value)
+ :- attr("variant_set", PackageNode, Variant, Value), auto_variant(Variant, _).
-node_has_variant(PackageNode, Variant)
- :- attr("variant_set", PackageNode, Variant, _), auto_variant(Variant).
+node_has_variant(PackageNode, Variant, VariantID)
+ :- attr("variant_set", PackageNode, Variant, _), auto_variant(Variant, VariantID).
-pkg_fact(Package, variant_single_value("dev_path"))
- :- attr("variant_set", node(ID, Package), "dev_path", _).
+variant_single_value(PackageNode, Variant)
+ :- node_has_variant(PackageNode, Variant, VariantID),
+ auto_variant(Variant, VariantID),
+ not variant_type(VariantID, "multi").
% suppress warnings about this atom being unset. It's only set if some
% spec or some package sets it, and without this, clingo will give
% warnings like 'info: atom does not occur in any rule head'.
#defined variant_default_value/3.
#defined variant_default_value_from_packages_yaml/3.
+#defined variant_default_value_from_package_py/3.
+
+%-----------------------------------------------------------------------------
+% Propagation semantics
+%-----------------------------------------------------------------------------
+
+non_default_propagation(variant_value(Name, Value)) :- attr("propagate", RootNode, variant_value(Name, Value)).
+
+% Propagation roots have a corresponding attr("propagate", ...)
+propagate(RootNode, PropagatedAttribute) :- attr("propagate", RootNode, PropagatedAttribute), not non_default_propagation(PropagatedAttribute).
+propagate(RootNode, PropagatedAttribute, EdgeTypes) :- attr("propagate", RootNode, PropagatedAttribute, EdgeTypes).
+
+% Special case variants, to inject the source node in the propagated attribute
+propagate(RootNode, variant_value(Name, Value, RootNode)) :- attr("propagate", RootNode, variant_value(Name, Value)).
+
+% Propagate an attribute along edges to child nodes
+propagate(ChildNode, PropagatedAttribute) :-
+ propagate(ParentNode, PropagatedAttribute),
+ depends_on(ParentNode, ChildNode).
+
+propagate(ChildNode, PropagatedAttribute, edge_types(DepType1, DepType2)) :-
+ propagate(ParentNode, PropagatedAttribute, edge_types(DepType1, DepType2)),
+ depends_on(ParentNode, ChildNode),
+ 1 { attr("depends_on", ParentNode, ChildNode, DepType1); attr("depends_on", ParentNode, ChildNode, DepType2) }.
+
+%-----------------------------------------------------------------------------
+% Activation of propagated values
+%-----------------------------------------------------------------------------
+
+%----
+% Variants
+%----
+
+% If a variant is propagated, and can be accepted, set its value
+attr("variant_selected", PackageNode, Variant, Value, VariantType, VariantID) :-
+ propagate(PackageNode, variant_value(Variant, Value, _)),
+ node_has_variant(PackageNode, Variant, VariantID),
+ variant_type(VariantID, VariantType),
+ variant_possible_value(PackageNode, Variant, Value).
+
+% If a variant is propagated, we cannot have extraneous values
+variant_is_propagated(PackageNode, Variant) :-
+ attr("variant_value", PackageNode, Variant, Value),
+ propagate(PackageNode, variant_value(Variant, Value, _)),
+ not attr("variant_set", PackageNode, Variant).
+
+:- variant_is_propagated(PackageNode, Variant),
+ attr("variant_selected", PackageNode, Variant, Value, _, _),
+ not propagate(PackageNode, variant_value(Variant, Value, _)).
+
+error(100, "{0} and {1} cannot both propagate variant '{2}' to the shared dependency: {3}",
+ Package1, Package2, Variant, Dependency) :-
+ % The variant is a singlevalued variant
+ variant_single_value(node(X, Package1), Variant),
+ % Dependency is trying to propagate Variant with different values and is not the source package
+ propagate(node(Z, Dependency), variant_value(Variant, Value1, node(X, Package1))),
+ propagate(node(Z, Dependency), variant_value(Variant, Value2, node(Y, Package2))),
+ % Package1 and Package2 and their values are different
+ Package1 > Package2, Value1 != Value2,
+ not propagate(node(Z, Dependency), variant_value(Variant, _, node(Z, Dependency))).
+
+% Cannot propagate the same variant from two different packages if one is a dependency of the other
+error(100, "{0} and {1} cannot both propagate variant '{2}'", Package1, Package2, Variant) :-
+ % The variant is a single-valued variant
+ variant_single_value(node(X, Package1), Variant),
+ % Package1 and Package2 and their values are different
+ Package1 != Package2, Value1 != Value2,
+ % Package2 is set to propagate the value from Package1
+ propagate(node(Y, Package2), variant_value(Variant, Value2, node(X, Package2))),
+ propagate(node(Y, Package2), variant_value(Variant, Value1, node(X, Package1))),
+ variant_is_propagated(node(Y, Package2), Variant).
+
+% Cannot propagate a variant if a different value was set for it in a dependency
+error(100, "Cannot propagate the variant '{0}' from the package: {1} because package: {2} is set to exclude it", Variant, Source, Package) :-
+ % Package has a Variant and Source is propagating Variant
+ attr("variant_set", node(X, Package), Variant, Value1),
+ % The packages and values are different
+ Source != Package, Value1 != Value2,
+ % The variant is a single-valued variant
+ variant_single_value(node(X, Package1), Variant),
+ % A different value is being propagated from somewhere else
+ propagate(node(X, Package), variant_value(Variant, Value2, node(Y, Source))).
+
+%----
+% Flags
+%----
+
+% A propagated flag implies:
+% 1. The same flag type is not set on this node
+% 2. This node has the same compiler as the propagation source
+
+propagated_flag(node(PackageID, Package), node_flag(FlagType, Flag, FlagGroup, Source), SourceNode) :-
+ propagate(node(PackageID, Package), node_flag(FlagType, Flag, FlagGroup, Source), _),
+ not attr("node_flag_set", node(PackageID, Package), node_flag(FlagType, _, _, "literal")),
+ % Same compiler as propagation source
+ node_compiler(node(PackageID, Package), CompilerID),
+ node_compiler(SourceNode, CompilerID),
+ attr("propagate", SourceNode, node_flag(FlagType, Flag, FlagGroup, Source), _),
+ node(PackageID, Package) != SourceNode,
+ not runtime(Package).
+
+attr("node_flag", PackageNode, NodeFlag) :- propagated_flag(PackageNode, NodeFlag, _).
+
+% Cannot propagate the same flag from two distinct sources
+error(100, "{0} and {1} cannot both propagate compiler flags '{2}' to {3}", Source1, Source2, Package, FlagType) :-
+ propagated_flag(node(ID, Package), node_flag(FlagType, _, _, _), node(_, Source1)),
+ propagated_flag(node(ID, Package), node_flag(FlagType, _, _, _), node(_, Source2)),
+ Source1 < Source2.
+
+%----
+% Compiler constraints
+%----
+
+attr("node_compiler_version_satisfies", node(ID, Package), Compiler, Version) :-
+ propagate(node(ID, Package), node_compiler_version_satisfies(Compiler, Version)),
+ node_compiler(node(ID, Package), CompilerID),
+ compiler_name(CompilerID, Compiler),
+ not runtime(Package),
+ not external(Package).
+
+%-----------------------------------------------------------------------------
+% Runtimes
+%-----------------------------------------------------------------------------
+
+% Check whether the DAG has any built package
+has_built_packages() :- build(X), not external(X).
+
+% If we build packages, the runtime nodes must use an available compiler
+1 { node_compiler(PackageNode, CompilerID) : build(PackageNode), not external(PackageNode) } :-
+ has_built_packages(),
+ runtime(RuntimePackage),
+ node_compiler(node(_, RuntimePackage), CompilerID).
%-----------------------------------------------------------------------------
% Platform semantics
%-----------------------------------------------------------------------------
-% if no platform is set, fall back to the default
-error(100, "platform '{0}' is not allowed on the current host", Platform)
- :- attr("node_platform", _, Platform), not allowed_platform(Platform).
+% NOTE: Currently we have a single allowed platform per DAG, therefore there is no
+% need to have additional optimization criteria. If we ever add cross-platform dags,
+% this needs to be changed.
+:- 2 { allowed_platform(Platform) }, internal_error("More than one allowed platform detected").
-attr("node_platform", PackageNode, Platform)
- :- attr("node", PackageNode),
- not attr("node_platform_set", PackageNode),
- node_platform_default(Platform).
+1 { attr("node_platform", PackageNode, Platform) : allowed_platform(Platform) } 1
+ :- attr("node", PackageNode).
% setting platform on a node is a hard constraint
attr("node_platform", PackageNode, Platform)
@@ -974,43 +1210,18 @@ error(100, "Cannot select '{0} os={1}' (operating system '{1}' is not buildable)
attr("node_os", node(X, Package), OS),
not buildable_os(OS).
-% can't have dependencies on incompatible OS's
-error(100, "{0} and dependency {1} have incompatible operating systems 'os={2}' and 'os={3}'", Package, Dependency, PackageNodeOS, DependencyOS)
- :- depends_on(node(X, Package), node(Y, Dependency)),
- attr("node_os", node(X, Package), PackageNodeOS),
- attr("node_os", node(Y, Dependency), DependencyOS),
- not os_compatible(PackageNodeOS, DependencyOS),
- build(node(X, Package)).
-
% give OS choice weights according to os declarations
node_os_weight(PackageNode, Weight)
:- attr("node", PackageNode),
attr("node_os", PackageNode, OS),
os(OS, Weight).
-% match semantics for OS's
-node_os_match(PackageNode, DependencyNode) :-
- depends_on(PackageNode, DependencyNode),
- attr("node_os", PackageNode, OS),
- attr("node_os", DependencyNode, OS).
-
-node_os_mismatch(PackageNode, DependencyNode) :-
- depends_on(PackageNode, DependencyNode),
- not node_os_match(PackageNode, DependencyNode).
-
% every OS is compatible with itself. We can use `os_compatible` to declare
os_compatible(OS, OS) :- os(OS).
% Transitive compatibility among operating systems
os_compatible(OS1, OS3) :- os_compatible(OS1, OS2), os_compatible(OS2, OS3).
-% We can select only operating systems compatible with the ones
-% for which we can build software. We need a cardinality constraint
-% since we might have more than one "buildable_os(OS)" fact.
-:- not 1 { os_compatible(CurrentOS, ReusedOS) : buildable_os(CurrentOS) },
- attr("node_os", Package, ReusedOS),
- internal_error("Reused OS incompatible with build OS").
-
% If an OS is set explicitly respect the value
attr("node_os", PackageNode, OS) :- attr("node_os_set", PackageNode, OS), attr("node", PackageNode).
@@ -1058,15 +1269,26 @@ error(100, "{0} compiler '{2}@{3}' incompatible with 'target={1}'", Package, Tar
compiler_version(CompilerID, Version),
build(node(X, Package)).
+#defined compiler_supports_target/2.
+#defined compiler_available/1.
+
% if a target is set explicitly, respect it
attr("node_target", PackageNode, Target)
:- attr("node", PackageNode), attr("node_target_set", PackageNode, Target).
% each node has the weight of its assigned target
-node_target_weight(node(ID, Package), Weight)
- :- attr("node", node(ID, Package)),
- attr("node_target", node(ID, Package), Target),
- target_weight(Target, Weight).
+target_weight(Target, 0)
+ :- attr("node", PackageNode),
+ attr("node_target", PackageNode, Target),
+ attr("node_target_set", PackageNode, Target).
+
+node_target_weight(PackageNode, MinWeight)
+ :- attr("node", PackageNode),
+ attr("node_target", PackageNode, Target),
+ target(Target),
+ MinWeight = #min { Weight : target_weight(Target, Weight) }.
+
+:- attr("node_target", PackageNode, Target), not node_target_weight(PackageNode, _).
% compatibility rules for targets among nodes
node_target_match(ParentNode, DependencyNode)
@@ -1088,7 +1310,7 @@ error(100, "'{0} target={1}' is not compatible with this machine", Package, Targ
% Compiler semantics
%-----------------------------------------------------------------------------
% There must be only one compiler set per built node.
-{ node_compiler(PackageNode, CompilerID) : compiler_id(CompilerID) } :-
+{ node_compiler(PackageNode, CompilerID) : compiler_id(CompilerID), compiler_available(CompilerID) } :-
attr("node", PackageNode),
build(PackageNode).
@@ -1105,6 +1327,7 @@ attr("node_compiler_version", PackageNode, CompilerName, CompilerVersion)
:- node_compiler(PackageNode, CompilerID),
compiler_name(CompilerID, CompilerName),
compiler_version(CompilerID, CompilerVersion),
+ compiler_available(CompilerID),
build(PackageNode).
attr("node_compiler", PackageNode, CompilerName)
@@ -1127,12 +1350,12 @@ error(10, "No valid compiler for {0} satisfies '%{1}'", Package, Compiler)
% If the compiler of a node must satisfy a constraint, then its version
% must be chosen among the ones that satisfy said constraint
-error(100, "No valid version for '{0}' compiler '{1}' satisfies '@{2}'", Package, Compiler, Constraint)
+error(100, "Package {0} cannot satisfy '%{1}@{2}'", Package, Compiler, Constraint)
:- attr("node", node(X, Package)),
attr("node_compiler_version_satisfies", node(X, Package), Compiler, Constraint),
- not compiler_version_satisfies(Compiler, Constraint, _).
+ not compiler_version_satisfies(Compiler, Constraint, _).
-error(100, "No valid version for '{0}' compiler '{1}' satisfies '@{2}'", Package, Compiler, Constraint)
+error(100, "Package {0} cannot satisfy '%{1}@{2}'", Package, Compiler, Constraint)
:- attr("node", node(X, Package)),
attr("node_compiler_version_satisfies", node(X, Package), Compiler, Constraint),
not compiler_version_satisfies(Compiler, Constraint, ID),
@@ -1149,11 +1372,13 @@ attr("node_compiler_version_satisfies", PackageNode, Compiler, Constraint)
% If the compiler version was set from the command line,
% respect it verbatim
-:- attr("node_compiler_version_set", PackageNode, Compiler, Version),
- not attr("node_compiler_version", PackageNode, Compiler, Version).
+error(100, "Cannot set the required compiler: {2}%{0}@{1}", Compiler, Version, Package)
+ :- attr("node_compiler_version_set", node(X, Package), Compiler, Version),
+ not attr("node_compiler_version", node(X, Package), Compiler, Version).
-:- attr("node_compiler_set", PackageNode, Compiler),
- not attr("node_compiler_version", PackageNode, Compiler, _).
+error(100, "Cannot set the required compiler: {1}%{0}", Compiler, Package)
+ :- attr("node_compiler_set", node(X, Package), Compiler),
+ not attr("node_compiler_version", node(X, Package), Compiler, _).
% Cannot select a compiler if it is not supported on the OS
% Compilers that are explicitly marked as allowed
@@ -1163,8 +1388,8 @@ error(100, "{0} compiler '%{1}@{2}' incompatible with 'os={3}'", Package, Compil
node_compiler(node(X, Package), CompilerID),
compiler_name(CompilerID, Compiler),
compiler_version(CompilerID, Version),
- not compiler_os(CompilerID, OS),
- not allow_compiler(Compiler, Version),
+ compiler_os(CompilerID, CompilerOS),
+ not os_compatible(CompilerOS, OS),
build(node(X, Package)).
% If a package and one of its dependencies don't have the
@@ -1185,7 +1410,6 @@ compiler_mismatch_required(PackageNode, DependencyNode)
not compiler_match(PackageNode, DependencyNode).
#defined compiler_os/3.
-#defined allow_compiler/2.
% compilers weighted by preference according to packages.yaml
node_compiler_weight(node(ID, Package), Weight)
@@ -1201,7 +1425,7 @@ node_compiler_weight(node(ID, Package), 100)
not compiler_weight(CompilerID, _).
% For the time being, be strict and reuse only if the compiler match one we have on the system
-error(100, "Compiler {1}@{2} requested for {0} cannot be found. Set install_missing_compilers:true if intended.", Package, Compiler, Version)
+error(100, "Compiler {1}@{2} requested for {0} cannot be found.", Package, Compiler, Version)
:- attr("node_compiler_version", node(ID, Package), Compiler, Version),
not node_compiler(node(ID, Package), _).
@@ -1212,97 +1436,86 @@ error(100, "Compiler {1}@{2} requested for {0} cannot be found. Set install_miss
% Compiler flags
%-----------------------------------------------------------------------------
-% propagate flags when compiler match
-can_inherit_flags(PackageNode, DependencyNode, FlagType)
- :- same_compiler(PackageNode, DependencyNode),
- not attr("node_flag_set", DependencyNode, FlagType, _),
- flag_type(FlagType).
-
-same_compiler(PackageNode, DependencyNode)
- :- depends_on(PackageNode, DependencyNode),
- node_compiler(PackageNode, CompilerID),
- node_compiler(DependencyNode, CompilerID),
- compiler_id(CompilerID).
-
-node_flag_inherited(DependencyNode, FlagType, Flag)
- :- attr("node_flag_set", PackageNode, FlagType, Flag),
- can_inherit_flags(PackageNode, DependencyNode, FlagType),
- attr("node_flag_propagate", PackageNode, FlagType).
-
-% Ensure propagation
-:- node_flag_inherited(PackageNode, FlagType, Flag),
- can_inherit_flags(PackageNode, DependencyNode, FlagType),
- attr("node_flag_propagate", PackageNode, FlagType).
-
-error(100, "{0} and {1} cannot both propagate compiler flags '{2}' to {3}", Source1, Source2, Package, FlagType) :-
- depends_on(Source1, Package),
- depends_on(Source2, Package),
- attr("node_flag_propagate", Source1, FlagType),
- attr("node_flag_propagate", Source2, FlagType),
- can_inherit_flags(Source1, Package, FlagType),
- can_inherit_flags(Source2, Package, FlagType),
- Source1 < Source2.
-
-% remember where flags came from
-attr("node_flag_source", PackageNode, FlagType, PackageNode)
- :- attr("node_flag_set", PackageNode, FlagType, _).
-
-attr("node_flag_source", DependencyNode, FlagType, Q)
- :- attr("node_flag_source", PackageNode, FlagType, Q),
- node_flag_inherited(DependencyNode, FlagType, _),
- attr("node_flag_propagate", PackageNode, FlagType).
-
% compiler flags from compilers.yaml are put on nodes if compiler matches
-attr("node_flag", PackageNode, FlagType, Flag)
- :- compiler_flag(CompilerID, FlagType, Flag),
+attr("node_flag", PackageNode, node_flag(FlagType, Flag, FlagGroup, CompilerID))
+ :- compiler_flag(CompilerID, FlagType, Flag, FlagGroup),
node_compiler(PackageNode, CompilerID),
flag_type(FlagType),
compiler_id(CompilerID),
compiler_name(CompilerID, CompilerName),
compiler_version(CompilerID, Version).
-attr("node_flag_compiler_default", PackageNode)
- :- not attr("node_flag_set", PackageNode, FlagType, _),
- compiler_flag(CompilerID, FlagType, Flag),
- node_compiler(PackageNode, CompilerID),
- flag_type(FlagType),
- compiler_id(CompilerID),
- compiler_name(CompilerID, CompilerName),
- compiler_version(CompilerID, Version).
+attr("node_flag", PackageNode, NodeFlag) :- attr("node_flag_set", PackageNode, NodeFlag).
-% if a flag is set to something or inherited, it's included
-attr("node_flag", PackageNode, FlagType, Flag) :- attr("node_flag_set", PackageNode, FlagType, Flag).
-attr("node_flag", PackageNode, FlagType, Flag) :- node_flag_inherited(PackageNode, FlagType, Flag).
-
-% if no node flags are set for a type, there are no flags.
-attr("no_flags", PackageNode, FlagType)
- :- not attr("node_flag", PackageNode, FlagType, _),
- attr("node", PackageNode),
- flag_type(FlagType).
-
-#defined compiler_flag/3.
+#defined compiler_flag/4.
%-----------------------------------------------------------------------------
-% Installed packages
+% Installed Packages
%-----------------------------------------------------------------------------
-% the solver is free to choose at most one installed hash for each package
-{ attr("hash", node(ID, Package), Hash) : installed_hash(Package, Hash) } 1
- :- attr("node", node(ID, Package)), internal_error("Package must resolve to at most one hash").
+#defined installed_hash/2.
+#defined abi_splice_conditions_hold/4.
+
+% These are the previously concretized attributes of the installed package as
+% a hash. It has the general form:
+% hash_attr(Hash, Attribute, PackageName, Args*)
+#defined hash_attr/3.
+#defined hash_attr/4.
+#defined hash_attr/5.
+#defined hash_attr/6.
+#defined hash_attr/7.
+
+{ attr("hash", node(ID, PackageName), Hash): installed_hash(PackageName, Hash) } 1 :-
+ attr("node", node(ID, PackageName)),
+ internal_error("Package must resolve to at most 1 hash").
% you can't choose an installed hash for a dev spec
:- attr("hash", PackageNode, Hash), attr("variant_value", PackageNode, "dev_path", _).
-
% You can't install a hash, if it is not installed
:- attr("hash", node(ID, Package), Hash), not installed_hash(Package, Hash).
-% This should be redundant given the constraint above
-:- attr("node", PackageNode), 2 { attr("hash", PackageNode, Hash) }.
-% if a hash is selected, we impose all the constraints that implies
-impose(Hash, PackageNode) :- attr("hash", PackageNode, Hash).
+% hash_attrs are versions, but can_splice_attr are usually node_version_satisfies
+hash_attr(Hash, "node_version_satisfies", PackageName, Constraint) :-
+ hash_attr(Hash, "version", PackageName, Version),
+ pkg_fact(PackageName, version_satisfies(Constraint, Version)).
+
+% This recovers the exact semantics for hash reuse hash and depends_on are where
+% splices are decided, and virtual_on_edge can result in name-changes, which is
+% why they are all treated separately.
+imposed_constraint(Hash, Attr, PackageName) :-
+ hash_attr(Hash, Attr, PackageName).
+imposed_constraint(Hash, Attr, PackageName, A1) :-
+ hash_attr(Hash, Attr, PackageName, A1), Attr != "hash".
+imposed_constraint(Hash, Attr, PackageName, Arg1, Arg2) :-
+ hash_attr(Hash, Attr, PackageName, Arg1, Arg2),
+ Attr != "depends_on",
+ Attr != "virtual_on_edge".
+imposed_constraint(Hash, Attr, PackageName, A1, A2, A3) :-
+ hash_attr(Hash, Attr, PackageName, A1, A2, A3).
+imposed_constraint(Hash, "hash", PackageName, Hash) :- installed_hash(PackageName, Hash).
+% Without splicing, we simply recover the exact semantics
+imposed_constraint(ParentHash, "hash", ChildName, ChildHash) :-
+ hash_attr(ParentHash, "hash", ChildName, ChildHash),
+ ChildHash != ParentHash,
+ not abi_splice_conditions_hold(_, _, ChildName, ChildHash).
+
+imposed_constraint(Hash, "depends_on", PackageName, DepName, Type) :-
+ hash_attr(Hash, "depends_on", PackageName, DepName, Type),
+ hash_attr(Hash, "hash", DepName, DepHash),
+ not attr("splice_at_hash", _, _, DepName, DepHash).
+
+imposed_constraint(Hash, "virtual_on_edge", PackageName, DepName, VirtName) :-
+ hash_attr(Hash, "virtual_on_edge", PackageName, DepName, VirtName),
+ not attr("splice_at_hash", _, _, DepName,_).
+
+% Rules pertaining to attr("splice_at_hash") and abi_splice_conditions_hold will
+% be conditionally loaded from splices.lp
+
+impose(Hash, PackageNode) :- attr("hash", PackageNode, Hash), attr("node", PackageNode).
+
+% If there is not a hash for a package, we build it.
+build(PackageNode) :- attr("node", PackageNode), not concrete(PackageNode).
-% if we haven't selected a hash for a package, we'll be building it
-build(PackageNode) :- not attr("hash", PackageNode, _), attr("node", PackageNode).
% Minimizing builds is tricky. We want a minimizing criterion
@@ -1315,9 +1528,12 @@ build(PackageNode) :- not attr("hash", PackageNode, _), attr("node", PackageNode
% criteria for built specs -- so that they take precedence over the otherwise
% topmost-priority criterion to reuse what is installed.
%
+
% The priority ranges are:
-% 200+ Shifted priorities for build nodes; correspond to priorities 0 - 99.
-% 100 - 199 Unshifted priorities. Currently only includes minimizing #builds.
+% 1000+ Optimizations for concretization errors
+% 300 - 1000 Highest priority optimizations for valid solutions
+% 200 - 299 Shifted priorities for build nodes; correspond to priorities 0 - 99.
+% 100 - 199 Unshifted priorities. Currently only includes minimizing #builds and minimizing dupes.
% 0 - 99 Priorities for non-built nodes.
build_priority(PackageNode, 200) :- build(PackageNode), attr("node", PackageNode).
build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", PackageNode).
@@ -1338,12 +1554,10 @@ build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", Package
pkg_fact(Package, version_declared(Version, Weight, "installed")),
not optimize_for_reuse().
-#defined installed_hash/2.
% This statement, which is a hidden feature of clingo, let us avoid cycles in the DAG
#edge (A, B) : depends_on(A, B).
-
%-----------------------------------------------------------------
% Optimization to avoid errors
%-----------------------------------------------------------------
@@ -1365,6 +1579,16 @@ build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", Package
% 2. a `#minimize{ 0@2 : #true }.` statement that ensures the criterion
% is displayed (clingo doesn't display sums over empty sets by default)
+% A condition group specifies one or more specs that must be satisfied.
+% Specs declared first are preferred, so we assign increasing weights and
+% minimize the weights.
+opt_criterion(310, "requirement weight").
+#minimize{ 0@310: #true }.
+#minimize {
+ Weight@310,PackageNode,Group
+ : requirement_weight(PackageNode, Group, Weight)
+}.
+
% Try hard to reuse installed packages (i.e., minimize the number built)
opt_criterion(110, "number of packages to build (vs. reuse)").
#minimize { 0@110: #true }.
@@ -1376,18 +1600,6 @@ opt_criterion(100, "number of nodes from the same package").
#minimize { ID@100,Package : attr("virtual_node", node(ID, Package)) }.
#defined optimize_for_reuse/0.
-% A condition group specifies one or more specs that must be satisfied.
-% Specs declared first are preferred, so we assign increasing weights and
-% minimize the weights.
-opt_criterion(75, "requirement weight").
-#minimize{ 0@275: #true }.
-#minimize{ 0@75: #true }.
-#minimize {
- Weight@75+Priority,PackageNode,Group
- : requirement_weight(PackageNode, Group, Weight),
- build_priority(PackageNode, Priority)
-}.
-
% Minimize the number of deprecated versions being used
opt_criterion(73, "deprecated versions used").
#minimize{ 0@273: #true }.
@@ -1395,6 +1607,7 @@ opt_criterion(73, "deprecated versions used").
#minimize{
1@73+Priority,PackageNode
: attr("deprecated", PackageNode, _),
+ not external(PackageNode),
build_priority(PackageNode, Priority)
}.
@@ -1402,11 +1615,11 @@ opt_criterion(73, "deprecated versions used").
% 1. Version weight
% 2. Number of variants with a non default value, if not set
% for the root package.
-opt_criterion(70, "version weight").
+opt_criterion(70, "version badness (roots)").
#minimize{ 0@270: #true }.
#minimize{ 0@70: #true }.
#minimize {
- Weight@70+Priority
+ Weight@70+Priority,PackageNode
: attr("root", PackageNode),
version_weight(PackageNode, Weight),
build_priority(PackageNode, Priority)
@@ -1466,32 +1679,24 @@ opt_criterion(45, "preferred providers (non-roots)").
}.
% Try to minimize the number of compiler mismatches in the DAG.
-opt_criterion(40, "compiler mismatches that are not from CLI").
+opt_criterion(40, "compiler mismatches that are not required").
#minimize{ 0@240: #true }.
#minimize{ 0@40: #true }.
#minimize{
- 1@40+Priority,PackageNode,DependencyNode
- : compiler_mismatch(PackageNode, DependencyNode),
- build_priority(PackageNode, Priority)
+ 1@40+Priority,PackageNode,node(ID, Dependency)
+ : compiler_mismatch(PackageNode, node(ID, Dependency)),
+ build_priority(node(ID, Dependency), Priority),
+ not runtime(Dependency)
}.
-opt_criterion(39, "compiler mismatches that are not from CLI").
+opt_criterion(39, "compiler mismatches that are required").
#minimize{ 0@239: #true }.
#minimize{ 0@39: #true }.
#minimize{
- 1@39+Priority,PackageNode,DependencyNode
- : compiler_mismatch_required(PackageNode, DependencyNode),
- build_priority(PackageNode, Priority)
-}.
-
-% Try to minimize the number of compiler mismatches in the DAG.
-opt_criterion(35, "OS mismatches").
-#minimize{ 0@235: #true }.
-#minimize{ 0@35: #true }.
-#minimize{
- 1@35+Priority,PackageNode,DependencyNode
- : node_os_mismatch(PackageNode, DependencyNode),
- build_priority(PackageNode, Priority)
+ 1@39+Priority,PackageNode,node(ID, Dependency)
+ : compiler_mismatch_required(PackageNode, node(ID, Dependency)),
+ build_priority(node(ID, Dependency), Priority),
+ not runtime(Dependency)
}.
opt_criterion(30, "non-preferred OS's").
@@ -1504,13 +1709,15 @@ opt_criterion(30, "non-preferred OS's").
}.
% Choose more recent versions for nodes
-opt_criterion(25, "version badness").
+opt_criterion(25, "version badness (non roots)").
#minimize{ 0@225: #true }.
#minimize{ 0@25: #true }.
#minimize{
- Weight@25+Priority,PackageNode
- : version_weight(PackageNode, Weight),
- build_priority(PackageNode, Priority)
+ Weight@25+Priority,node(X, Package)
+ : version_weight(node(X, Package), Weight),
+ build_priority(node(X, Package), Priority),
+ not attr("root", node(X, Package)),
+ not runtime(Package)
}.
% Try to use all the default values of variants
@@ -1529,9 +1736,10 @@ opt_criterion(15, "non-preferred compilers").
#minimize{ 0@215: #true }.
#minimize{ 0@15: #true }.
#minimize{
- Weight@15+Priority,PackageNode
- : node_compiler_weight(PackageNode, Weight),
- build_priority(PackageNode, Priority)
+ Weight@15+Priority,node(X, Package)
+ : node_compiler_weight(node(X, Package), Weight),
+ build_priority(node(X, Package), Priority),
+ not runtime(Package)
}.
% Minimize the number of mismatches for targets in the DAG, try
@@ -1540,18 +1748,55 @@ opt_criterion(10, "target mismatches").
#minimize{ 0@210: #true }.
#minimize{ 0@10: #true }.
#minimize{
- 1@10+Priority,PackageNode,Dependency
- : node_target_mismatch(PackageNode, Dependency),
- build_priority(PackageNode, Priority)
+ 1@10+Priority,PackageNode,node(ID, Dependency)
+ : node_target_mismatch(PackageNode, node(ID, Dependency)),
+ build_priority(node(ID, Dependency), Priority),
+ not runtime(Dependency)
}.
opt_criterion(5, "non-preferred targets").
#minimize{ 0@205: #true }.
#minimize{ 0@5: #true }.
#minimize{
- Weight@5+Priority,PackageNode
- : node_target_weight(PackageNode, Weight),
- build_priority(PackageNode, Priority)
+ Weight@5+Priority,node(X, Package)
+ : node_target_weight(node(X, Package), Weight),
+ build_priority(node(X, Package), Priority),
+ not runtime(Package)
+}.
+
+
+% Minimize the number of compiler mismatches for runtimes
+opt_criterion(4, "compiler mismatches (runtimes)").
+#minimize{ 0@204: #true }.
+#minimize{ 0@4: #true }.
+#minimize{
+ 1@4,PackageNode,node(ID, Dependency)
+ : compiler_mismatch(PackageNode, node(ID, Dependency)), runtime(Dependency)
+}.
+#minimize{
+ 1@4,PackageNode,node(ID, Dependency)
+ : compiler_mismatch_required(PackageNode, node(ID, Dependency)), runtime(Dependency)
+}.
+
+
+% Choose more recent versions for runtimes
+opt_criterion(3, "version badness (runtimes)").
+#minimize{ 0@203: #true }.
+#minimize{ 0@3: #true }.
+#minimize{
+ Weight@3,node(X, Package)
+ : version_weight(node(X, Package), Weight),
+ runtime(Package)
+}.
+
+% Choose best target for runtimes
+opt_criterion(2, "non-preferred targets (runtimes)").
+#minimize{ 0@202: #true }.
+#minimize{ 0@2: #true }.
+#minimize{
+ Weight@2,node(X, Package)
+ : node_target_weight(node(X, Package), Weight),
+ runtime(Package)
}.
% Choose more recent versions for nodes
diff --git a/lib/spack/spack/solver/core.py b/lib/spack/spack/solver/core.py
new file mode 100644
index 0000000000..ba257173a5
--- /dev/null
+++ b/lib/spack/spack/solver/core.py
@@ -0,0 +1,299 @@
+# Copyright 2013-2024 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)
+"""Low-level wrappers around clingo API."""
+import importlib
+import pathlib
+from types import ModuleType
+from typing import Any, Callable, NamedTuple, Optional, Tuple, Union
+
+from llnl.util import lang
+
+
+def _ast_getter(*names: str) -> Callable[[Any], Any]:
+ """Helper to retrieve AST attributes from different versions of the clingo API"""
+
+ def getter(node):
+ for name in names:
+ result = getattr(node, name, None)
+ if result:
+ return result
+ raise KeyError(f"node has no such keys: {names}")
+
+ return getter
+
+
+ast_type = _ast_getter("ast_type", "type")
+ast_sym = _ast_getter("symbol", "term")
+
+
+class AspObject:
+ """Object representing a piece of ASP code."""
+
+
+def _id(thing: Any) -> Union[str, AspObject]:
+ """Quote string if needed for it to be a valid identifier."""
+ if isinstance(thing, AspObject):
+ return thing
+ elif isinstance(thing, bool):
+ return f'"{str(thing)}"'
+ elif isinstance(thing, int):
+ return str(thing)
+ else:
+ return f'"{str(thing)}"'
+
+
+class AspVar(AspObject):
+ """Represents a variable in an ASP rule, allows for conditionally generating
+ rules"""
+
+ def __init__(self, name: str):
+ self.name = name
+
+ def __str__(self) -> str:
+ return str(self.name)
+
+
+@lang.key_ordering
+class AspFunction(AspObject):
+ """A term in the ASP logic program"""
+
+ __slots__ = ["name", "args"]
+
+ def __init__(self, name: str, args: Optional[Tuple[Any, ...]] = None) -> None:
+ self.name = name
+ self.args = () if args is None else tuple(args)
+
+ def _cmp_key(self) -> Tuple[str, Optional[Tuple[Any, ...]]]:
+ return self.name, self.args
+
+ def __call__(self, *args: Any) -> "AspFunction":
+ """Return a new instance of this function with added arguments.
+
+ Note that calls are additive, so you can do things like::
+
+ >>> attr = AspFunction("attr")
+ attr()
+
+ >>> attr("version")
+ attr("version")
+
+ >>> attr("version")("foo")
+ attr("version", "foo")
+
+ >>> v = AspFunction("attr", "version")
+ attr("version")
+
+ >>> v("foo", "bar")
+ attr("version", "foo", "bar")
+
+ """
+ return AspFunction(self.name, self.args + args)
+
+ def _argify(self, arg: Any) -> Any:
+ """Turn the argument into an appropriate clingo symbol"""
+ if isinstance(arg, bool):
+ return clingo().String(str(arg))
+ elif isinstance(arg, int):
+ return clingo().Number(arg)
+ elif isinstance(arg, AspFunction):
+ return clingo().Function(arg.name, [self._argify(x) for x in arg.args], positive=True)
+ elif isinstance(arg, AspVar):
+ return clingo().Variable(arg.name)
+ return clingo().String(str(arg))
+
+ def symbol(self):
+ """Return a clingo symbol for this function"""
+ return clingo().Function(
+ self.name, [self._argify(arg) for arg in self.args], positive=True
+ )
+
+ def __str__(self) -> str:
+ return f"{self.name}({', '.join(str(_id(arg)) for arg in self.args)})"
+
+ def __repr__(self) -> str:
+ return str(self)
+
+
+class _AspFunctionBuilder:
+ def __getattr__(self, name):
+ return AspFunction(name)
+
+
+#: Global AspFunction builder
+fn = _AspFunctionBuilder()
+
+_CLINGO_MODULE: Optional[ModuleType] = None
+
+
+def clingo() -> ModuleType:
+ """Lazy imports the Python module for clingo, and returns it."""
+ if _CLINGO_MODULE is not None:
+ return _CLINGO_MODULE
+
+ try:
+ clingo_mod = importlib.import_module("clingo")
+ # Make sure we didn't import an empty module
+ _ensure_clingo_or_raise(clingo_mod)
+ except ImportError:
+ clingo_mod = None
+
+ if clingo_mod is not None:
+ return _set_clingo_module_cache(clingo_mod)
+
+ clingo_mod = _bootstrap_clingo()
+ return _set_clingo_module_cache(clingo_mod)
+
+
+def _set_clingo_module_cache(clingo_mod: ModuleType) -> ModuleType:
+ """Sets the global cache to the lazy imported clingo module"""
+ global _CLINGO_MODULE
+ importlib.import_module("clingo.ast")
+ _CLINGO_MODULE = clingo_mod
+ return clingo_mod
+
+
+def _ensure_clingo_or_raise(clingo_mod: ModuleType) -> None:
+ """Ensures the clingo module can access expected attributes, otherwise raises an error."""
+ # These are imports that may be problematic at top level (circular imports). They are used
+ # only to provide exhaustive details when erroring due to a broken clingo module.
+ import spack.config
+ import spack.paths as sp
+ import spack.util.path as sup
+
+ try:
+ clingo_mod.Symbol
+ except AttributeError:
+ assert clingo_mod.__file__ is not None, "clingo installation is incomplete or invalid"
+ # Reaching this point indicates a broken clingo installation
+ # If Spack derived clingo, suggest user re-run bootstrap
+ # if non-spack, suggest user investigate installation
+ # assume Spack is not responsible for broken clingo
+ msg = (
+ f"Clingo installation at {clingo_mod.__file__} is incomplete or invalid."
+ "Please repair installation or re-install. "
+ "Alternatively, consider installing clingo via Spack."
+ )
+ # check whether Spack is responsible
+ if (
+ pathlib.Path(
+ sup.canonicalize_path(
+ spack.config.CONFIG.get("bootstrap:root", sp.default_user_bootstrap_path)
+ )
+ )
+ in pathlib.Path(clingo_mod.__file__).parents
+ ):
+ # Spack is responsible for the broken clingo
+ msg = (
+ "Spack bootstrapped copy of Clingo is broken, "
+ "please re-run the bootstrapping process via command `spack bootstrap now`."
+ " If this issue persists, please file a bug at: github.com/spack/spack"
+ )
+ raise RuntimeError(
+ "Clingo installation may be broken or incomplete, "
+ "please verify clingo has been installed correctly"
+ "\n\nClingo does not provide symbol clingo.Symbol"
+ f"{msg}"
+ )
+
+
+def clingo_cffi() -> bool:
+ """Returns True if clingo uses the CFFI interface"""
+ return hasattr(clingo().Symbol, "_rep")
+
+
+def _bootstrap_clingo() -> ModuleType:
+ """Bootstraps the clingo module and returns it"""
+ import spack.bootstrap
+
+ with spack.bootstrap.ensure_bootstrap_configuration():
+ spack.bootstrap.ensure_clingo_importable_or_raise()
+ clingo_mod = importlib.import_module("clingo")
+
+ return clingo_mod
+
+
+def parse_files(*args, **kwargs):
+ """Wrapper around clingo parse_files, that dispatches the function according
+ to clingo API version.
+ """
+ clingo()
+ try:
+ return importlib.import_module("clingo.ast").parse_files(*args, **kwargs)
+ except (ImportError, AttributeError):
+ return clingo().parse_files(*args, **kwargs)
+
+
+def parse_term(*args, **kwargs):
+ """Wrapper around clingo parse_term, that dispatches the function according
+ to clingo API version.
+ """
+ clingo()
+ try:
+ return importlib.import_module("clingo.symbol").parse_term(*args, **kwargs)
+ except (ImportError, AttributeError):
+ return clingo().parse_term(*args, **kwargs)
+
+
+class NodeArgument(NamedTuple):
+ """Represents a node in the DAG"""
+
+ id: str
+ pkg: str
+
+
+class NodeFlag(NamedTuple):
+ flag_type: str
+ flag: str
+ flag_group: str
+ source: str
+
+
+def intermediate_repr(sym):
+ """Returns an intermediate representation of clingo models for Spack's spec builder.
+
+ Currently, transforms symbols from clingo models either to strings or to NodeArgument objects.
+
+ Returns:
+ This will turn a ``clingo.Symbol`` into a string or NodeArgument, or a sequence of
+ ``clingo.Symbol`` objects into a tuple of those objects.
+ """
+ # TODO: simplify this when we no longer have to support older clingo versions.
+ if isinstance(sym, (list, tuple)):
+ return tuple(intermediate_repr(a) for a in sym)
+
+ try:
+ if sym.name == "node":
+ return NodeArgument(
+ id=intermediate_repr(sym.arguments[0]), pkg=intermediate_repr(sym.arguments[1])
+ )
+ elif sym.name == "node_flag":
+ return NodeFlag(
+ flag_type=intermediate_repr(sym.arguments[0]),
+ flag=intermediate_repr(sym.arguments[1]),
+ flag_group=intermediate_repr(sym.arguments[2]),
+ source=intermediate_repr(sym.arguments[3]),
+ )
+ except RuntimeError:
+ # This happens when using clingo w/ CFFI and trying to access ".name" for symbols
+ # that are not functions
+ pass
+
+ if clingo_cffi():
+ # Clingo w/ CFFI will throw an exception on failure
+ try:
+ return sym.string
+ except RuntimeError:
+ return str(sym)
+ else:
+ return sym.string or str(sym)
+
+
+def extract_args(model, predicate_name):
+ """Extract the arguments to predicates with the provided name from a model.
+
+ Pull out all the predicates with name ``predicate_name`` from the model, and
+ return their intermediate representation.
+ """
+ return [intermediate_repr(sym.arguments) for sym in model if sym.name == predicate_name]
diff --git a/lib/spack/spack/solver/counter.py b/lib/spack/spack/solver/counter.py
index 632740da05..8da8aa1b4e 100644
--- a/lib/spack/spack/solver/counter.py
+++ b/lib/spack/spack/solver/counter.py
@@ -10,6 +10,7 @@ from llnl.util import lang
import spack.deptypes as dt
import spack.package_base
import spack.repo
+import spack.spec
PossibleDependencies = Set[str]
@@ -24,7 +25,13 @@ class Counter:
"""
def __init__(self, specs: List["spack.spec.Spec"], tests: bool) -> None:
- self.specs = specs
+ runtime_pkgs = spack.repo.PATH.packages_with_tags("runtime")
+ runtime_virtuals = set()
+ for x in runtime_pkgs:
+ pkg_class = spack.repo.PATH.get_pkg_class(x)
+ runtime_virtuals.update(pkg_class.provided_virtual_names())
+
+ self.specs = specs + [spack.spec.Spec(x) for x in runtime_pkgs]
self.link_run_types: dt.DepFlag = dt.LINK | dt.RUN | dt.TEST
self.all_types: dt.DepFlag = dt.ALL
@@ -33,7 +40,9 @@ class Counter:
self.all_types = dt.LINK | dt.RUN | dt.BUILD
self._possible_dependencies: PossibleDependencies = set()
- self._possible_virtuals: Set[str] = set(x.name for x in specs if x.virtual)
+ self._possible_virtuals: Set[str] = (
+ set(x.name for x in specs if x.virtual) | runtime_virtuals
+ )
def possible_dependencies(self) -> PossibleDependencies:
"""Returns the list of possible dependencies"""
@@ -117,7 +126,7 @@ class MinimalDuplicatesCounter(NoDuplicatesCounter):
self._possible_dependencies = set(self._link_run) | set(self._total_build)
def possible_packages_facts(self, gen, fn):
- build_tools = set(spack.repo.PATH.packages_with_tags("build-tools"))
+ build_tools = spack.repo.PATH.packages_with_tags("build-tools")
gen.h2("Packages with at most a single node")
for package_name in sorted(self.possible_dependencies() - build_tools):
gen.fact(fn.max_dupes(package_name, 1))
@@ -142,7 +151,7 @@ class MinimalDuplicatesCounter(NoDuplicatesCounter):
class FullDuplicatesCounter(MinimalDuplicatesCounter):
def possible_packages_facts(self, gen, fn):
- build_tools = set(spack.repo.PATH.packages_with_tags("build-tools"))
+ build_tools = spack.repo.PATH.packages_with_tags("build-tools")
counter = collections.Counter(
list(self._link_run) + list(self._total_build) + list(self._direct_build)
)
diff --git a/lib/spack/spack/solver/display.lp b/lib/spack/spack/solver/display.lp
index 358a1628aa..61d96b25b5 100644
--- a/lib/spack/spack/solver/display.lp
+++ b/lib/spack/spack/solver/display.lp
@@ -13,7 +13,8 @@
#show attr/2.
#show attr/3.
#show attr/4.
-
+#show attr/5.
+#show attr/6.
% names of optimization criteria
#show opt_criterion/2.
@@ -38,7 +39,7 @@
#show condition_requirement/4.
#show condition_requirement/5.
#show condition_requirement/6.
-#show node_has_variant/2.
+#show node_has_variant/3.
#show build/1.
#show external/1.
#show external_version/3.
@@ -48,5 +49,6 @@
#show condition_nodes/3.
#show trigger_node/3.
#show imposed_nodes/3.
+#show variant_single_value/2.
% debug
diff --git a/lib/spack/spack/solver/error_messages.lp b/lib/spack/spack/solver/error_messages.lp
index 79a9b4b7eb..7bc9ed2e93 100644
--- a/lib/spack/spack/solver/error_messages.lp
+++ b/lib/spack/spack/solver/error_messages.lp
@@ -5,6 +5,10 @@
%=============================================================================
% This logic program adds detailed error messages to Spack's concretizer
+%
+% Note that functions used in rule bodies here need to have a corresponding
+% #show line in display.lp, otherwise they won't be passed through to the
+% error solve.
%=============================================================================
#program error_messages.
@@ -113,12 +117,11 @@ error(0, "Cannot find a valid provider for virtual {0}", Virtual, startcauses, C
pkg_fact(TriggerPkg, condition_effect(Cause, EID)),
condition_holds(Cause, node(CID, TriggerPkg)).
-
% At most one variant value for single-valued variants
error(0, "'{0}' required multiple values for single-valued variant '{1}'\n Requested 'Spec({1}={2})' and 'Spec({1}={3})'", Package, Variant, Value1, Value2, startcauses, Cause1, X, Cause2, X)
:- attr("node", node(X, Package)),
- node_has_variant(node(X, Package), Variant),
- pkg_fact(Package, variant_single_value(Variant)),
+ node_has_variant(node(X, Package), Variant, VariantID),
+ variant_single_value(node(X, Package), Variant),
build(node(X, Package)),
attr("variant_value", node(X, Package), Variant, Value1),
imposed_constraint(EID1, "variant_set", Package, Variant, Value1),
@@ -216,6 +219,11 @@ error(0, Msg, startcauses, TriggerID, ID1, ConstraintID, ID2)
#defined error/4.
#defined error/5.
#defined error/6.
+#defined error/7.
+#defined error/8.
+#defined error/9.
+#defined error/10.
+#defined error/11.
#defined attr/2.
#defined attr/3.
#defined attr/4.
@@ -225,6 +233,7 @@ error(0, Msg, startcauses, TriggerID, ID1, ConstraintID, ID2)
#defined imposed_constraint/4.
#defined imposed_constraint/5.
#defined imposed_constraint/6.
+#defined condition_cause/4.
#defined condition_requirement/3.
#defined condition_requirement/4.
#defined condition_requirement/5.
@@ -234,6 +243,7 @@ error(0, Msg, startcauses, TriggerID, ID1, ConstraintID, ID2)
#defined external/1.
#defined trigger_and_effect/3.
#defined build/1.
-#defined node_has_variant/2.
+#defined node_has_variant/3.
#defined provider/2.
#defined external_version/3.
+#defined variant_single_value/2.
diff --git a/lib/spack/spack/solver/heuristic.lp b/lib/spack/spack/solver/heuristic.lp
index 71ed64b3f8..e5d7de4966 100644
--- a/lib/spack/spack/solver/heuristic.lp
+++ b/lib/spack/spack/solver/heuristic.lp
@@ -4,21 +4,40 @@
% SPDX-License-Identifier: (Apache-2.0 OR MIT)
%=============================================================================
-% Heuristic to speed-up solves (node with ID 0)
+% Heuristic to speed-up solves
%=============================================================================
+#heuristic attr("node", PackageNode). [300, init]
+#heuristic attr("node", PackageNode). [ 2, factor]
+#heuristic attr("node", PackageNode). [ -1, sign]
+#heuristic attr("node", node(0, Dependency)) : attr("dependency_holds", ParentNode, Dependency, Type), not virtual(Dependency). [1@2, sign]
-%-----------------
-% Domain heuristic
-%-----------------
+#heuristic attr("virtual_node", node(X, Virtual)). [60, init]
+#heuristic attr("virtual_node", node(X, Virtual)). [-1, sign]
+#heuristic attr("virtual_node", node(0, Virtual)) : node_depends_on_virtual(PackageNode, Virtual). [1@2, sign]
-% Root node
-#heuristic attr("version", node(0, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true]
-#heuristic version_weight(node(0, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true]
-#heuristic attr("variant_value", node(0, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("root", node(0, Package)). [35, true]
-#heuristic attr("node_target", node(0, Package), Target) : target_weight(Target, 0), attr("root", node(0, Package)). [35, true]
-#heuristic node_target_weight(node(0, Package), 0) : attr("root", node(0, Package)). [35, true]
-#heuristic node_compiler(node(0, Package), CompilerID) : compiler_weight(ID, 0), compiler_id(ID), attr("root", node(0, Package)). [35, true]
+#heuristic attr("depends_on", ParentNode, ChildNode, Type). [150, init]
+#heuristic attr("depends_on", ParentNode, ChildNode, Type). [4, factor]
+#heuristic attr("depends_on", ParentNode, ChildNode, Type). [-1, sign]
+#heuristic attr("depends_on", ParentNode, node(0, Dependency), Type) : attr("dependency_holds", ParentNode, Dependency, Type), not virtual(Dependency). [1@2, sign]
+#heuristic attr("depends_on", ParentNode, ProviderNode , Type) : node_depends_on_virtual(ParentNode, Virtual, Type), provider(ProviderNode, node(VirtualID, Virtual)). [1@2, sign]
-% Providers
-#heuristic attr("node", node(0, Package)) : default_provider_preference(Virtual, Package, 0), possible_in_link_run(Package). [30, true]
+#heuristic attr("version", node(PackageID, Package), Version). [30, init]
+#heuristic attr("version", node(PackageID, Package), Version). [-1, sign]
+#heuristic attr("version", node(PackageID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(PackageID, Package)). [ 1@2, sign]
+
+#heuristic version_weight(node(PackageID, Package), Weight). [30, init]
+#heuristic version_weight(node(PackageID, Package), Weight). [-1 , sign]
+#heuristic version_weight(node(PackageID, Package), 0 ) : attr("node", node(PackageID, Package)). [ 1@2, sign]
+
+% Use default variants
+#heuristic attr("variant_value", PackageNode, Variant, Value). [30, init]
+#heuristic attr("variant_value", PackageNode, Variant, Value). [-1, sign]
+#heuristic attr("variant_value", PackageNode, Variant, Value) : variant_default_value(PackageNode, Variant, Value), attr("node", PackageNode). [1@2, sign]
+
+% Use default targets
+#heuristic attr("node_target", node(PackageID, Package), Target). [-1, sign]
+#heuristic attr("node_target", node(PackageID, Package), Target) : target_weight(Target, 0), attr("node", node(PackageID, Package)). [1@2, sign]
+
+% Use the default compilers
+#heuristic node_compiler(node(PackageID, Package), ID) : compiler_weight(ID, 0), compiler_id(ID), attr("node", node(PackageID, Package)). [30, init]
diff --git a/lib/spack/spack/solver/heuristic_separate.lp b/lib/spack/spack/solver/heuristic_separate.lp
deleted file mode 100644
index 2b499d0798..0000000000
--- a/lib/spack/spack/solver/heuristic_separate.lp
+++ /dev/null
@@ -1,24 +0,0 @@
-% Copyright 2013-2024 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)
-
-%=============================================================================
-% Heuristic to speed-up solves (node with ID > 0)
-%=============================================================================
-
-% node(ID, _)
-#heuristic attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-#heuristic version_weight(node(ID, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-#heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-#heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-#heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true]
-
-% node(ID, _), split build dependencies
-#heuristic attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
-#heuristic version_weight(node(ID, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
-#heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
-#heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
-#heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
-#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true]
diff --git a/lib/spack/spack/solver/libc_compatibility.lp b/lib/spack/spack/solver/libc_compatibility.lp
new file mode 100644
index 0000000000..e9d90c52ac
--- /dev/null
+++ b/lib/spack/spack/solver/libc_compatibility.lp
@@ -0,0 +1,43 @@
+% Copyright 2013-2024 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)
+
+%=============================================================================
+% Libc compatibility rules for reusing solves.
+%
+% These rules are used on Linux
+%=============================================================================
+
+% A package cannot be reused if the libc is not compatible with it
+error(100, "Cannot reuse {0} since we cannot determine libc compatibility", ReusedPackage)
+ :- provider(node(X, LibcPackage), node(0, "libc")),
+ attr("version", node(X, LibcPackage), LibcVersion),
+ attr("hash", node(R, ReusedPackage), Hash),
+ % Libc packages can be reused without the "compatible_libc" attribute
+ ReusedPackage != LibcPackage,
+ not attr("compatible_libc", node(R, ReusedPackage), LibcPackage, LibcVersion).
+
+% A libc is needed in the DAG
+:- has_built_packages(), not provider(_, node(0, "libc")).
+
+% Non-libc reused specs must be host libc compatible. In case we build packages, we get a
+% host compatible libc provider from other rules. If nothing is built, there is no libc provider,
+% since it's pruned from reusable specs, meaning we have to explicitly impose reused specs are host
+% compatible.
+:- attr("hash", node(R, ReusedPackage), Hash),
+ not provider(node(R, ReusedPackage), node(0, "libc")),
+ not attr("compatible_libc", node(R, ReusedPackage), _, _).
+
+% The libc provider must be one that a compiler can target
+:- has_built_packages(),
+ provider(node(X, LibcPackage), node(0, "libc")),
+ attr("node", node(X, LibcPackage)),
+ attr("version", node(X, LibcPackage), LibcVersion),
+ not host_libc(LibcPackage, LibcVersion).
+
+% A built node must depend on libc
+:- build(PackageNode),
+ provider(LibcNode, node(0, "libc")),
+ not external(PackageNode),
+ not depends_on(PackageNode, LibcNode).
diff --git a/lib/spack/spack/solver/os_compatibility.lp b/lib/spack/spack/solver/os_compatibility.lp
index 2ed8a15388..f711860d77 100644
--- a/lib/spack/spack/solver/os_compatibility.lp
+++ b/lib/spack/spack/solver/os_compatibility.lp
@@ -7,21 +7,27 @@
% OS compatibility rules for reusing solves.
% os_compatible(RecentOS, OlderOS)
% OlderOS binaries can be used on RecentOS
+%
+% These rules are used on every platform, but Linux
%=============================================================================
% macOS
+os_compatible("sequoia", "sonoma").
+os_compatible("sonoma", "ventura").
+os_compatible("ventura", "monterey").
os_compatible("monterey", "bigsur").
os_compatible("bigsur", "catalina").
-% Ubuntu
-os_compatible("ubuntu22.04", "ubuntu21.10").
-os_compatible("ubuntu21.10", "ubuntu21.04").
-os_compatible("ubuntu21.04", "ubuntu20.10").
-os_compatible("ubuntu20.10", "ubuntu20.04").
-os_compatible("ubuntu20.04", "ubuntu19.10").
-os_compatible("ubuntu19.10", "ubuntu19.04").
-os_compatible("ubuntu19.04", "ubuntu18.10").
-os_compatible("ubuntu18.10", "ubuntu18.04").
+% can't have dependencies on incompatible OS's
+error(100, "{0} and dependency {1} have incompatible operating systems 'os={2}' and 'os={3}'", Package, Dependency, PackageNodeOS, DependencyOS)
+ :- depends_on(node(X, Package), node(Y, Dependency)),
+ attr("node_os", node(X, Package), PackageNodeOS),
+ attr("node_os", node(Y, Dependency), DependencyOS),
+ not os_compatible(PackageNodeOS, DependencyOS),
+ build(node(X, Package)).
-%EL8
-os_compatible("rhel8", "rocky8").
+% We can select only operating systems compatible with the ones
+% for which we can build software. We need a cardinality constraint
+% since we might have more than one "buildable_os(OS)" fact.
+:- not 1 { os_compatible(CurrentOS, ReusedOS) : buildable_os(CurrentOS) },
+ attr("node_os", Package, ReusedOS).
diff --git a/lib/spack/spack/solver/requirements.py b/lib/spack/spack/solver/requirements.py
new file mode 100644
index 0000000000..412f4c22cd
--- /dev/null
+++ b/lib/spack/spack/solver/requirements.py
@@ -0,0 +1,232 @@
+# Copyright 2013-2024 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 enum
+from typing import List, NamedTuple, Optional, Sequence
+
+from llnl.util import tty
+
+import spack.config
+import spack.error
+import spack.package_base
+import spack.spec
+from spack.config import get_mark_from_yaml_data
+
+
+class RequirementKind(enum.Enum):
+ """Purpose / provenance of a requirement"""
+
+ #: Default requirement expressed under the 'all' attribute of packages.yaml
+ DEFAULT = enum.auto()
+ #: Requirement expressed on a virtual package
+ VIRTUAL = enum.auto()
+ #: Requirement expressed on a specific package
+ PACKAGE = enum.auto()
+
+
+class RequirementRule(NamedTuple):
+ """Data class to collect information on a requirement"""
+
+ pkg_name: str
+ policy: str
+ requirements: Sequence[spack.spec.Spec]
+ condition: spack.spec.Spec
+ kind: RequirementKind
+ message: Optional[str]
+
+
+class RequirementParser:
+ """Parses requirements from package.py files and configuration, and returns rules."""
+
+ def __init__(self, configuration: spack.config.Configuration):
+ self.config = configuration
+
+ def rules(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]:
+ result = []
+ result.extend(self.rules_from_package_py(pkg))
+ result.extend(self.rules_from_require(pkg))
+ result.extend(self.rules_from_prefer(pkg))
+ result.extend(self.rules_from_conflict(pkg))
+ return result
+
+ def rules_from_package_py(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]:
+ rules = []
+ for when_spec, requirement_list in pkg.requirements.items():
+ for requirements, policy, message in requirement_list:
+ rules.append(
+ RequirementRule(
+ pkg_name=pkg.name,
+ policy=policy,
+ requirements=requirements,
+ kind=RequirementKind.PACKAGE,
+ condition=when_spec,
+ message=message,
+ )
+ )
+ return rules
+
+ def rules_from_virtual(self, virtual_str: str) -> List[RequirementRule]:
+ requirements = self.config.get("packages", {}).get(virtual_str, {}).get("require", [])
+ return self._rules_from_requirements(
+ virtual_str, requirements, kind=RequirementKind.VIRTUAL
+ )
+
+ def rules_from_require(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]:
+ kind, requirements = self._raw_yaml_data(pkg, section="require")
+ return self._rules_from_requirements(pkg.name, requirements, kind=kind)
+
+ def rules_from_prefer(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]:
+ result = []
+ kind, preferences = self._raw_yaml_data(pkg, section="prefer")
+ for item in preferences:
+ spec, condition, message = self._parse_prefer_conflict_item(item)
+ result.append(
+ # A strong preference is defined as:
+ #
+ # require:
+ # - any_of: [spec_str, "@:"]
+ RequirementRule(
+ pkg_name=pkg.name,
+ policy="any_of",
+ requirements=[spec, spack.spec.Spec("@:")],
+ kind=kind,
+ message=message,
+ condition=condition,
+ )
+ )
+ return result
+
+ def rules_from_conflict(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]:
+ result = []
+ kind, conflicts = self._raw_yaml_data(pkg, section="conflict")
+ for item in conflicts:
+ spec, condition, message = self._parse_prefer_conflict_item(item)
+ result.append(
+ # A conflict is defined as:
+ #
+ # require:
+ # - one_of: [spec_str, "@:"]
+ RequirementRule(
+ pkg_name=pkg.name,
+ policy="one_of",
+ requirements=[spec, spack.spec.Spec("@:")],
+ kind=kind,
+ message=message,
+ condition=condition,
+ )
+ )
+ return result
+
+ def _parse_prefer_conflict_item(self, item):
+ # The item is either a string or an object with at least a "spec" attribute
+ if isinstance(item, str):
+ spec = parse_spec_from_yaml_string(item)
+ condition = spack.spec.Spec()
+ message = None
+ else:
+ spec = parse_spec_from_yaml_string(item["spec"])
+ condition = spack.spec.Spec(item.get("when"))
+ message = item.get("message")
+ return spec, condition, message
+
+ def _raw_yaml_data(self, pkg: spack.package_base.PackageBase, *, section: str):
+ config = self.config.get("packages")
+ data = config.get(pkg.name, {}).get(section, [])
+ kind = RequirementKind.PACKAGE
+ if not data:
+ data = config.get("all", {}).get(section, [])
+ kind = RequirementKind.DEFAULT
+ return kind, data
+
+ def _rules_from_requirements(
+ self, pkg_name: str, requirements, *, kind: RequirementKind
+ ) -> List[RequirementRule]:
+ """Manipulate requirements from packages.yaml, and return a list of tuples
+ with a uniform structure (name, policy, requirements).
+ """
+ if isinstance(requirements, str):
+ requirements = [requirements]
+
+ rules = []
+ for requirement in requirements:
+ # A string is equivalent to a one_of group with a single element
+ if isinstance(requirement, str):
+ requirement = {"one_of": [requirement]}
+
+ for policy in ("spec", "one_of", "any_of"):
+ if policy not in requirement:
+ continue
+
+ constraints = requirement[policy]
+ # "spec" is for specifying a single spec
+ if policy == "spec":
+ constraints = [constraints]
+ policy = "one_of"
+
+ # validate specs from YAML first, and fail with line numbers if parsing fails.
+ constraints = [
+ parse_spec_from_yaml_string(constraint) for constraint in constraints
+ ]
+ when_str = requirement.get("when")
+ when = parse_spec_from_yaml_string(when_str) if when_str else spack.spec.Spec()
+
+ constraints = [
+ x
+ for x in constraints
+ if not self.reject_requirement_constraint(pkg_name, constraint=x, kind=kind)
+ ]
+ if not constraints:
+ continue
+
+ rules.append(
+ RequirementRule(
+ pkg_name=pkg_name,
+ policy=policy,
+ requirements=constraints,
+ kind=kind,
+ message=requirement.get("message"),
+ condition=when,
+ )
+ )
+ return rules
+
+ def reject_requirement_constraint(
+ self, pkg_name: str, *, constraint: spack.spec.Spec, kind: RequirementKind
+ ) -> bool:
+ """Returns True if a requirement constraint should be rejected"""
+ if kind == RequirementKind.DEFAULT:
+ # Requirements under all: are applied only if they are satisfiable considering only
+ # package rules, so e.g. variants must exist etc. Otherwise, they are rejected.
+ try:
+ s = spack.spec.Spec(pkg_name)
+ s.constrain(constraint)
+ s.validate_or_raise()
+ except spack.error.SpackError as e:
+ tty.debug(
+ f"[SETUP] Rejecting the default '{constraint}' requirement "
+ f"on '{pkg_name}': {str(e)}",
+ level=2,
+ )
+ return True
+ return False
+
+
+def parse_spec_from_yaml_string(string: str) -> spack.spec.Spec:
+ """Parse a spec from YAML and add file/line info to errors, if it's available.
+
+ Parse a ``Spec`` from the supplied string, but also intercept any syntax errors and
+ add file/line information for debugging using file/line annotations from the string.
+
+ Arguments:
+ string: a string representing a ``Spec`` from config YAML.
+
+ """
+ try:
+ return spack.spec.Spec(string)
+ except spack.error.SpecSyntaxError as e:
+ mark = get_mark_from_yaml_data(string)
+ if mark:
+ msg = f"{mark.name}:{mark.line + 1}: {str(e)}"
+ raise spack.error.SpecSyntaxError(msg) from e
+ raise e
diff --git a/lib/spack/spack/solver/splices.lp b/lib/spack/spack/solver/splices.lp
new file mode 100644
index 0000000000..96762c456c
--- /dev/null
+++ b/lib/spack/spack/solver/splices.lp
@@ -0,0 +1,56 @@
+% Copyright 2013-2024 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)
+
+%=============================================================================
+% These rules are conditionally loaded to handle the synthesis of spliced
+% packages.
+% =============================================================================
+% Consider the concrete spec:
+% foo@2.72%gcc@11.4 arch=linux-ubuntu22.04-icelake build_system=autotools ^bar ...
+% It will emit the following facts for reuse (below is a subset)
+% installed_hash("foo", "xxxyyy")
+% hash_attr("xxxyyy", "hash", "foo", "xxxyyy")
+% hash_attr("xxxyyy", "version", "foo", "2.72")
+% hash_attr("xxxyyy", "node_os", "ubuntu22.04")
+% hash_attr("xxxyyy", "hash", "bar", "zzzqqq")
+% hash_attr("xxxyyy", "depends_on", "foo", "bar", "link")
+% Rules that derive abi_splice_conditions_hold will be generated from
+% use of the `can_splice` directive. The will have the following form:
+% can_splice("foo@1.0.0+a", when="@1.0.1+a", match_variants=["b"]) --->
+% abi_splice_conditions_hold(0, node(SID, "foo"), "foo", BashHash) :-
+% installed_hash("foo", BaseHash),
+% attr("node", node(SID, SpliceName)),
+% attr("node_version_satisfies", node(SID, "foo"), "1.0.1"),
+% hash_attr("hash", "node_version_satisfies", "foo", "1.0.1"),
+% attr("variant_value", node(SID, "foo"), "a", "True"),
+% hash_attr("hash", "variant_value", "foo", "a", "True"),
+% attr("variant_value", node(SID, "foo"), "b", VariVar0),
+% hash_attr("hash", "variant_value", "foo", "b", VariVar0),
+
+% If the splice is valid (i.e. abi_splice_conditions_hold is derived) in the
+% dependency of a concrete spec the solver free to choose whether to continue
+% with the exact hash semantics by simply imposing the child hash, or introducing
+% a spliced node as the dependency instead
+{ imposed_constraint(ParentHash, "hash", ChildName, ChildHash) } :-
+ hash_attr(ParentHash, "hash", ChildName, ChildHash),
+ abi_splice_conditions_hold(_, node(SID, SpliceName), ChildName, ChildHash).
+
+attr("splice_at_hash", ParentNode, node(SID, SpliceName), ChildName, ChildHash) :-
+ attr("hash", ParentNode, ParentHash),
+ hash_attr(ParentHash, "hash", ChildName, ChildHash),
+ abi_splice_conditions_hold(_, node(SID, SpliceName), ChildName, ChildHash),
+ ParentHash != ChildHash,
+ not imposed_constraint(ParentHash, "hash", ChildName, ChildHash).
+
+% Names and virtual providers may change when a dependency is spliced in
+imposed_constraint(Hash, "dependency_holds", ParentName, SpliceName, Type) :-
+ hash_attr(Hash, "depends_on", ParentName, DepName, Type),
+ hash_attr(Hash, "hash", DepName, DepHash),
+ attr("splice_at_hash", node(ID, ParentName), node(SID, SpliceName), DepName, DepHash).
+
+imposed_constraint(Hash, "virtual_on_edge", ParentName, SpliceName, VirtName) :-
+ hash_attr(Hash, "virtual_on_edge", ParentName, DepName, VirtName),
+ attr("splice_at_hash", node(ID, ParentName), node(SID, SpliceName), DepName, DepHash).
+
diff --git a/lib/spack/spack/solver/version_order.py b/lib/spack/spack/solver/version_order.py
new file mode 100644
index 0000000000..23d3e390ce
--- /dev/null
+++ b/lib/spack/spack/solver/version_order.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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 typing import Tuple, Union
+
+from spack.version import GitVersion, StandardVersion
+
+
+def concretization_version_order(version_info: Tuple[Union[GitVersion, StandardVersion], dict]):
+ """Version order key for concretization, where preferred > not preferred,
+ not deprecated > deprecated, finite > any infinite component; only if all are
+ the same, do we use default version ordering."""
+ version, info = version_info
+ return (
+ info.get("preferred", False),
+ not info.get("deprecated", False),
+ not version.isdevelop(),
+ not version.is_prerelease(),
+ version,
+ )
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index f37d993993..1c5f96ee72 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -26,7 +26,7 @@ line is a spec for a particular installation of the mpileaks package.
version, like "1.2", or it can be a range of versions, e.g. "1.2:1.4".
If multiple specific versions or multiple ranges are acceptable, they
can be separated by commas, e.g. if a package will only build with
- versions 1.0, 1.2-1.4, and 1.6-1.8 of mavpich, you could say:
+ versions 1.0, 1.2-1.4, and 1.6-1.8 of mvapich, you could say:
depends_on("mvapich@1.0,1.2:1.4,1.6:1.8")
@@ -59,7 +59,9 @@ import platform
import re
import socket
import warnings
-from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
+from typing import Any, Callable, Dict, Iterable, List, Match, Optional, Set, Tuple, Union
+
+import archspec.cpu
import llnl.path
import llnl.string
@@ -68,24 +70,21 @@ import llnl.util.lang as lang
import llnl.util.tty as tty
import llnl.util.tty.color as clr
+import spack
import spack.compiler
import spack.compilers
import spack.config
-import spack.dependency as dp
import spack.deptypes as dt
import spack.error
import spack.hash_types as ht
import spack.parser
-import spack.patch
import spack.paths
import spack.platforms
import spack.provider_index
import spack.repo
import spack.solver
import spack.store
-import spack.target
import spack.traverse as traverse
-import spack.util.crypto
import spack.util.executable
import spack.util.hash
import spack.util.module_cmd as md
@@ -96,11 +95,13 @@ import spack.variant as vt
import spack.version as vn
import spack.version.git_ref_lookup
+from .enums import InstallRecordStatus
+
__all__ = [
"CompilerSpec",
"Spec",
"SpecParseError",
- "ArchitecturePropagationError",
+ "UnsupportedPropagationError",
"DuplicateDependencyError",
"DuplicateCompilerSpecError",
"UnsupportedCompilerError",
@@ -121,49 +122,57 @@ __all__ = [
"SpecDeprecatedError",
]
+
+SPEC_FORMAT_RE = re.compile(
+ r"(?:" # this is one big or, with matches ordered by priority
+ # OPTION 1: escaped character (needs to be first to catch opening \{)
+ # Note that an unterminated \ at the end of a string is left untouched
+ r"(?:\\(.))"
+ r"|" # or
+ # OPTION 2: an actual format string
+ r"{" # non-escaped open brace {
+ r"([%@/]|[\w ][\w -]*=)?" # optional sigil (or identifier or space) to print sigil in color
+ r"(?:\^([^}\.]+)\.)?" # optional ^depname. (to get attr from dependency)
+ # after the sigil or depname, we can have a hash expression or another attribute
+ r"(?:" # one of
+ r"(hash\b)(?:\:(\d+))?" # hash followed by :<optional length>
+ r"|" # or
+ r"([^}]*)" # another attribute to format
+ r")" # end one of
+ r"(})?" # finish format string with non-escaped close brace }, or missing if not present
+ r"|"
+ # OPTION 3: mismatched close brace (option 2 would consume a matched open brace)
+ r"(})" # brace
+ r")",
+ re.IGNORECASE,
+)
+
#: Valid pattern for an identifier in Spack
IDENTIFIER_RE = r"\w[\w-]*"
+# Coloring of specs when using color output. Fields are printed with
+# different colors to enhance readability.
+# See llnl.util.tty.color for descriptions of the color codes.
COMPILER_COLOR = "@g" #: color for highlighting compilers
VERSION_COLOR = "@c" #: color for highlighting versions
ARCHITECTURE_COLOR = "@m" #: color for highlighting architectures
-ENABLED_VARIANT_COLOR = "@B" #: color for highlighting enabled variants
-DISABLED_VARIANT_COLOR = "r" #: color for highlighting disabled varaints
-DEPENDENCY_COLOR = "@." #: color for highlighting dependencies
+VARIANT_COLOR = "@B" #: color for highlighting variants
HASH_COLOR = "@K" #: color for highlighting package hashes
-#: This map determines the coloring of specs when using color output.
-#: We make the fields different colors to enhance readability.
-#: See llnl.util.tty.color for descriptions of the color codes.
-COLOR_FORMATS = {
- "%": COMPILER_COLOR,
- "@": VERSION_COLOR,
- "=": ARCHITECTURE_COLOR,
- "+": ENABLED_VARIANT_COLOR,
- "~": DISABLED_VARIANT_COLOR,
- "^": DEPENDENCY_COLOR,
- "#": HASH_COLOR,
-}
-
-#: Regex used for splitting by spec field separators.
-#: These need to be escaped to avoid metacharacters in
-#: ``COLOR_FORMATS.keys()``.
-_SEPARATORS = "[\\%s]" % "\\".join(COLOR_FORMATS.keys())
-
#: Default format for Spec.format(). This format can be round-tripped, so that:
#: Spec(Spec("string").format()) == Spec("string)"
DEFAULT_FORMAT = (
"{name}{@versions}"
"{%compiler.name}{@compiler.versions}{compiler_flags}"
- "{variants}{arch=architecture}{/abstract_hash}"
+ "{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Display format, which eliminates extra `@=` in the output, for readability.
DISPLAY_FORMAT = (
"{name}{@version}"
"{%compiler.name}{@compiler.version}{compiler_flags}"
- "{variants}{arch=architecture}{/abstract_hash}"
+ "{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Regular expression to pull spec contents out of clearsigned signature
@@ -193,24 +202,24 @@ class InstallStatus(enum.Enum):
missing = "@r{[-]} "
-def colorize_spec(spec):
- """Returns a spec colorized according to the colors specified in
- COLOR_FORMATS."""
+# regexes used in spec formatting
+OLD_STYLE_FMT_RE = re.compile(r"\${[A-Z]+}")
- class insert_color:
- def __init__(self):
- self.last = None
- def __call__(self, match):
- # ignore compiler versions (color same as compiler)
- sep = match.group(0)
- if self.last == "%" and sep == "@":
- return clr.cescape(sep)
- self.last = sep
+def ensure_modern_format_string(fmt: str) -> None:
+ """Ensure that the format string does not contain old ${...} syntax."""
+ result = OLD_STYLE_FMT_RE.search(fmt)
+ if result:
+ raise SpecFormatStringError(
+ f"Format string `{fmt}` contains old syntax `{result.group(0)}`. "
+ "This is no longer supported."
+ )
- return "%s%s" % (COLOR_FORMATS[sep], clr.cescape(sep))
- return clr.colorize(re.sub(_SEPARATORS, insert_color(), str(spec)) + "@.")
+def _make_microarchitecture(name: str) -> archspec.cpu.Microarchitecture:
+ if isinstance(name, archspec.cpu.Microarchitecture):
+ return name
+ return archspec.cpu.TARGETS.get(name, archspec.cpu.generic_microarchitecture(name))
@lang.lazy_lexicographic_ordering
@@ -301,7 +310,10 @@ class ArchSpec:
def _cmp_iter(self):
yield self.platform
yield self.os
- yield self.target
+ if self.target is None:
+ yield self.target
+ else:
+ yield self.target.name
@property
def platform(self):
@@ -360,10 +372,10 @@ class ArchSpec:
# will assumed to be the host machine's platform.
def target_or_none(t):
- if isinstance(t, spack.target.Target):
+ if isinstance(t, archspec.cpu.Microarchitecture):
return t
if t and t != "None":
- return spack.target.Target(t)
+ return _make_microarchitecture(t)
return None
value = target_or_none(value)
@@ -452,10 +464,11 @@ class ArchSpec:
results = self._target_intersection(other)
attribute_str = ",".join(results)
- if self.target == attribute_str:
+ intersection_target = _make_microarchitecture(attribute_str)
+ if self.target == intersection_target:
return False
- self.target = attribute_str
+ self.target = intersection_target
return True
def _target_intersection(self, other):
@@ -473,7 +486,7 @@ class ArchSpec:
# s_target_range is a concrete target
# get a microarchitecture reference for at least one side
# of each comparison so we can use archspec comparators
- s_comp = spack.target.Target(s_min).microarchitecture
+ s_comp = _make_microarchitecture(s_min)
if not o_sep:
if s_min == o_min:
results.append(s_min)
@@ -481,21 +494,21 @@ class ArchSpec:
results.append(s_min)
elif not o_sep:
# "cast" to microarchitecture
- o_comp = spack.target.Target(o_min).microarchitecture
+ o_comp = _make_microarchitecture(o_min)
if (not s_min or o_comp >= s_min) and (not s_max or o_comp <= s_max):
results.append(o_min)
else:
# Take intersection of two ranges
# Lots of comparisons needed
- _s_min = spack.target.Target(s_min).microarchitecture
- _s_max = spack.target.Target(s_max).microarchitecture
- _o_min = spack.target.Target(o_min).microarchitecture
- _o_max = spack.target.Target(o_max).microarchitecture
+ _s_min = _make_microarchitecture(s_min)
+ _s_max = _make_microarchitecture(s_max)
+ _o_min = _make_microarchitecture(o_min)
+ _o_max = _make_microarchitecture(o_max)
n_min = s_min if _s_min >= _o_min else o_min
n_max = s_max if _s_max <= _o_max else o_max
- _n_min = spack.target.Target(n_min).microarchitecture
- _n_max = spack.target.Target(n_max).microarchitecture
+ _n_min = _make_microarchitecture(n_min)
+ _n_max = _make_microarchitecture(n_max)
if _n_min == _n_max:
results.append(n_min)
elif not n_min or not n_max or _n_min < _n_max:
@@ -548,12 +561,18 @@ class ArchSpec:
)
def to_dict(self):
+ # Generic targets represent either an architecture family (like x86_64)
+ # or a custom micro-architecture
+ if self.target.vendor == "generic":
+ target_data = str(self.target)
+ else:
+ # Get rid of compiler flag information before turning the uarch into a dict
+ uarch_dict = self.target.to_dict()
+ uarch_dict.pop("compilers", None)
+ target_data = syaml.syaml_dict(uarch_dict.items())
+
d = syaml.syaml_dict(
- [
- ("platform", self.platform),
- ("platform_os", self.os),
- ("target", self.target.to_dict_or_value()),
- ]
+ [("platform", self.platform), ("platform_os", self.os), ("target", target_data)]
)
return syaml.syaml_dict([("arch", d)])
@@ -561,7 +580,10 @@ class ArchSpec:
def from_dict(d):
"""Import an ArchSpec from raw YAML/JSON data"""
arch = d["arch"]
- target = spack.target.Target.from_dict_or_value(arch["target"])
+ target_name = arch["target"]
+ if not isinstance(target_name, str):
+ target_name = target_name["name"]
+ target = _make_microarchitecture(target_name)
return ArchSpec((arch["platform"], arch["platform_os"], target))
def __str__(self):
@@ -612,18 +634,6 @@ class CompilerSpec:
else:
raise TypeError("__init__ takes 1 or 2 arguments. (%d given)" % nargs)
- def _add_versions(self, version_list):
- # If it already has a non-trivial version list, this is an error
- if self.versions and self.versions != vn.any_version:
- # Note: This may be impossible to reach by the current parser
- # Keeping it in case the implementation changes.
- raise MultipleVersionError(
- "A spec cannot contain multiple version signifiers. Use a version list instead."
- )
- self.versions = vn.VersionList()
- for version in version_list:
- self.versions.add(version)
-
def _autospec(self, compiler_spec_like):
if isinstance(compiler_spec_like, CompilerSpec):
return compiler_spec_like
@@ -792,17 +802,49 @@ class CompilerFlag(str):
propagate (bool): if ``True`` the flag value will
be passed to the package's dependencies. If
``False`` it will not
+ flag_group (str): if this flag was introduced along
+ with several flags via a single source, then
+ this will store all such flags
+ source (str): identifies the type of constraint that
+ introduced this flag (e.g. if a package has
+ ``depends_on(... cflags=-g)``, then the ``source``
+ for "-g" would indicate ``depends_on``.
"""
def __new__(cls, value, **kwargs):
obj = str.__new__(cls, value)
obj.propagate = kwargs.pop("propagate", False)
+ obj.flag_group = kwargs.pop("flag_group", value)
+ obj.source = kwargs.pop("source", None)
return obj
_valid_compiler_flags = ["cflags", "cxxflags", "fflags", "ldflags", "ldlibs", "cppflags"]
+def _shared_subset_pair_iterate(container1, container2):
+ """
+ [0, a, c, d, f]
+ [a, d, e, f]
+
+ yields [(a, a), (d, d), (f, f)]
+
+ no repeated elements
+ """
+ a_idx, b_idx = 0, 0
+ max_a, max_b = len(container1), len(container2)
+ while a_idx < max_a and b_idx < max_b:
+ if container1[a_idx] == container2[b_idx]:
+ yield (container1[a_idx], container2[b_idx])
+ a_idx += 1
+ b_idx += 1
+ else:
+ while container1[a_idx] < container2[b_idx]:
+ a_idx += 1
+ while container1[a_idx] > container2[b_idx]:
+ b_idx += 1
+
+
class FlagMap(lang.HashableMap):
__slots__ = ("spec",)
@@ -811,23 +853,9 @@ class FlagMap(lang.HashableMap):
self.spec = spec
def satisfies(self, other):
- return all(f in self and self[f] == other[f] for f in other)
+ return all(f in self and set(self[f]) >= set(other[f]) for f in other)
def intersects(self, other):
- common_types = set(self) & set(other)
- for flag_type in common_types:
- if not self[flag_type] or not other[flag_type]:
- # At least one of the two is empty
- continue
-
- if self[flag_type] != other[flag_type]:
- return False
-
- if not all(
- f1.propagate == f2.propagate for f1, f2 in zip(self[flag_type], other[flag_type])
- ):
- # At least one propagation flag didn't match
- return False
return True
def constrain(self, other):
@@ -835,28 +863,29 @@ class FlagMap(lang.HashableMap):
Return whether the spec changed.
"""
- if other.spec and other.spec._concrete:
- for k in self:
- if k not in other:
- raise UnsatisfiableCompilerFlagSpecError(self[k], "<absent>")
-
changed = False
- for k in other:
- if k in self and not set(self[k]) <= set(other[k]):
- raise UnsatisfiableCompilerFlagSpecError(
- " ".join(f for f in self[k]), " ".join(f for f in other[k])
- )
- elif k not in self:
- self[k] = other[k]
+ for flag_type in other:
+ if flag_type not in self:
+ self[flag_type] = other[flag_type]
changed = True
+ else:
+ extra_other = set(other[flag_type]) - set(self[flag_type])
+ if extra_other:
+ self[flag_type] = list(self[flag_type]) + list(
+ x for x in other[flag_type] if x in extra_other
+ )
+ changed = True
+
+ # Next, if any flags in other propagate, we force them to propagate in our case
+ shared = list(sorted(set(other[flag_type]) - extra_other))
+ for x, y in _shared_subset_pair_iterate(shared, sorted(self[flag_type])):
+ if y.propagate is True and x.propagate is False:
+ changed = True
+ y.propagate = False
+
+ # TODO: what happens if flag groups with a partial (but not complete)
+ # intersection specify different behaviors for flag propagation?
- # Check that the propagation values match
- if self[k] == other[k]:
- for i in range(len(other[k])):
- if self[k][i].propagate != other[k][i].propagate:
- raise UnsatisfiableCompilerFlagSpecError(
- self[k][i].propagate, other[k][i].propagate
- )
return changed
@staticmethod
@@ -869,7 +898,7 @@ class FlagMap(lang.HashableMap):
clone[name] = compiler_flag
return clone
- def add_flag(self, flag_type, value, propagation):
+ def add_flag(self, flag_type, value, propagation, flag_group=None, source=None):
"""Stores the flag's value in CompilerFlag and adds it
to the FlagMap
@@ -880,7 +909,8 @@ class FlagMap(lang.HashableMap):
propagation (bool): if ``True`` the flag value will be passed to
the packages' dependencies. If``False`` it will not be passed
"""
- flag = CompilerFlag(value, propagate=propagation)
+ flag_group = flag_group or value
+ flag = CompilerFlag(value, propagate=propagation, flag_group=flag_group, source=source)
if flag_type not in self:
self[flag_type] = [flag]
@@ -906,10 +936,14 @@ class FlagMap(lang.HashableMap):
def flags():
for flag in v:
yield flag
+ yield flag.propagate
yield flags
def __str__(self):
+ if not self:
+ return ""
+
sorted_items = sorted((k, v) for k, v in self.items() if v)
result = ""
@@ -933,10 +967,6 @@ def _sort_by_dep_types(dspec: DependencySpec):
return dspec.depflag
-#: Enum for edge directions
-EdgeDirection = lang.enum(parent=0, child=1)
-
-
@lang.lazy_lexicographic_ordering
class _EdgeMap(collections.abc.Mapping):
"""Represent a collection of edges (DependencySpec objects) in the DAG.
@@ -950,26 +980,20 @@ class _EdgeMap(collections.abc.Mapping):
__slots__ = "edges", "store_by_child"
- def __init__(self, store_by=EdgeDirection.child):
- # Sanitize input arguments
- msg = 'unexpected value for "store_by" argument'
- assert store_by in (EdgeDirection.child, EdgeDirection.parent), msg
-
- #: This dictionary maps a package name to a list of edges
- #: i.e. to a list of DependencySpec objects
- self.edges = {}
- self.store_by_child = store_by == EdgeDirection.child
+ def __init__(self, store_by_child: bool = True) -> None:
+ self.edges: Dict[str, List[DependencySpec]] = {}
+ self.store_by_child = store_by_child
- def __getitem__(self, key):
+ def __getitem__(self, key: str) -> List[DependencySpec]:
return self.edges[key]
def __iter__(self):
return iter(self.edges)
- def __len__(self):
+ def __len__(self) -> int:
return len(self.edges)
- def add(self, edge: DependencySpec):
+ def add(self, edge: DependencySpec) -> None:
key = edge.spec.name if self.store_by_child else edge.parent.name
if key in self.edges:
lst = self.edges[key]
@@ -978,8 +1002,8 @@ class _EdgeMap(collections.abc.Mapping):
else:
self.edges[key] = [edge]
- def __str__(self):
- return "{deps: %s}" % ", ".join(str(d) for d in sorted(self.values()))
+ def __str__(self) -> str:
+ return f"{{deps: {', '.join(str(d) for d in sorted(self.values()))}}}"
def _cmp_iter(self):
for item in sorted(itertools.chain.from_iterable(self.edges.values())):
@@ -996,24 +1020,32 @@ class _EdgeMap(collections.abc.Mapping):
return clone
- def select(self, parent=None, child=None, depflag: dt.DepFlag = dt.ALL):
- """Select a list of edges and return them.
+ def select(
+ self,
+ *,
+ parent: Optional[str] = None,
+ child: Optional[str] = None,
+ depflag: dt.DepFlag = dt.ALL,
+ virtuals: Optional[List[str]] = None,
+ ) -> List[DependencySpec]:
+ """Selects a list of edges and returns them.
If an edge:
+
- Has *any* of the dependency types passed as argument,
- - Matches the parent and/or child name, if passed
+ - Matches the parent and/or child name
+ - Provides *any* of the virtuals passed as argument
+
then it is selected.
The deptypes argument needs to be a flag, since the method won't
convert it for performance reason.
Args:
- parent (str): name of the parent package
- child (str): name of the child package
+ parent: name of the parent package
+ child: name of the child package
depflag: allowed dependency types in flag form
-
- Returns:
- List of DependencySpec objects
+ virtuals: list of virtuals on the edge
"""
if not depflag:
return []
@@ -1032,22 +1064,23 @@ class _EdgeMap(collections.abc.Mapping):
# Filter by allowed dependency types
selected = (dep for dep in selected if not dep.depflag or (depflag & dep.depflag))
+ # Filter by virtuals
+ if virtuals is not None:
+ selected = (dep for dep in selected if any(v in dep.virtuals for v in virtuals))
+
return list(selected)
def clear(self):
self.edges.clear()
-def _command_default_handler(descriptor, spec, cls):
+def _command_default_handler(spec: "Spec"):
"""Default handler when looking for the 'command' attribute.
Tries to search for ``spec.name`` in the ``spec.home.bin`` directory.
Parameters:
- descriptor (ForwardQueryToPackage): descriptor that triggered the call
- spec (Spec): spec that is being queried
- cls (type(spec)): type of spec, to match the signature of the
- descriptor ``__get__`` method
+ spec: spec that is being queried
Returns:
Executable: An executable of the command
@@ -1060,22 +1093,17 @@ def _command_default_handler(descriptor, spec, cls):
if fs.is_exe(path):
return spack.util.executable.Executable(path)
- else:
- msg = "Unable to locate {0} command in {1}"
- raise RuntimeError(msg.format(spec.name, home.bin))
+ raise RuntimeError(f"Unable to locate {spec.name} command in {home.bin}")
-def _headers_default_handler(descriptor, spec, cls):
+def _headers_default_handler(spec: "Spec"):
"""Default handler when looking for the 'headers' attribute.
Tries to search for ``*.h`` files recursively starting from
``spec.package.home.include``.
Parameters:
- descriptor (ForwardQueryToPackage): descriptor that triggered the call
- spec (Spec): spec that is being queried
- cls (type(spec)): type of spec, to match the signature of the
- descriptor ``__get__`` method
+ spec: spec that is being queried
Returns:
HeaderList: The headers in ``prefix.include``
@@ -1088,12 +1116,10 @@ def _headers_default_handler(descriptor, spec, cls):
if headers:
return headers
- else:
- msg = "Unable to locate {0} headers in {1}"
- raise spack.error.NoHeadersError(msg.format(spec.name, home))
+ raise spack.error.NoHeadersError(f"Unable to locate {spec.name} headers in {home}")
-def _libs_default_handler(descriptor, spec, cls):
+def _libs_default_handler(spec: "Spec"):
"""Default handler when looking for the 'libs' attribute.
Tries to search for ``lib{spec.name}`` recursively starting from
@@ -1101,10 +1127,7 @@ def _libs_default_handler(descriptor, spec, cls):
``{spec.name}`` instead.
Parameters:
- descriptor (ForwardQueryToPackage): descriptor that triggered the call
- spec (Spec): spec that is being queried
- cls (type(spec)): type of spec, to match the signature of the
- descriptor ``__get__`` method
+ spec: spec that is being queried
Returns:
LibraryList: The libraries found
@@ -1138,32 +1161,38 @@ def _libs_default_handler(descriptor, spec, cls):
for shared in search_shared:
# Since we are searching for link libraries, on Windows search only for
- # ".Lib" extensions by default as those represent import libraries for implict links.
+ # ".Lib" extensions by default as those represent import libraries for implicit links.
libs = fs.find_libraries(name, home, shared=shared, recursive=True, runtime=False)
if libs:
return libs
- msg = "Unable to recursively locate {0} libraries in {1}"
- raise spack.error.NoLibrariesError(msg.format(spec.name, home))
+ raise spack.error.NoLibrariesError(
+ f"Unable to recursively locate {spec.name} libraries in {home}"
+ )
class ForwardQueryToPackage:
"""Descriptor used to forward queries from Spec to Package"""
- def __init__(self, attribute_name, default_handler=None):
+ def __init__(
+ self,
+ attribute_name: str,
+ default_handler: Optional[Callable[["Spec"], Any]] = None,
+ _indirect: bool = False,
+ ) -> None:
"""Create a new descriptor.
Parameters:
- attribute_name (str): name of the attribute to be
- searched for in the Package instance
- default_handler (callable, optional): default function to be
- called if the attribute was not found in the Package
- instance
+ attribute_name: name of the attribute to be searched for in the Package instance
+ default_handler: default function to be called if the attribute was not found in the
+ Package instance
+ _indirect: temporarily added to redirect a query to another package.
"""
self.attribute_name = attribute_name
self.default = default_handler
+ self.indirect = _indirect
- def __get__(self, instance, cls):
+ def __get__(self, instance: "SpecBuildInterface", cls):
"""Retrieves the property from Package using a well defined chain
of responsibility.
@@ -1185,13 +1214,18 @@ class ForwardQueryToPackage:
indicating a query failure, e.g. that library files were not found in a
'libs' query.
"""
- pkg = instance.package
+ # TODO: this indirection exist solely for `spec["python"].command` to actually return
+ # spec["python-venv"].command. It should be removed when `python` is a virtual.
+ if self.indirect and instance.indirect_spec:
+ pkg = instance.indirect_spec.package
+ else:
+ pkg = instance.wrapped_obj.package
try:
query = instance.last_query
except AttributeError:
# There has been no query yet: this means
# a spec is trying to access its own attributes
- _ = instance[instance.name] # NOQA: ignore=F841
+ _ = instance.wrapped_obj[instance.wrapped_obj.name] # NOQA: ignore=F841
query = instance.last_query
callbacks_chain = []
@@ -1203,7 +1237,8 @@ class ForwardQueryToPackage:
callbacks_chain.append(lambda: getattr(pkg, self.attribute_name))
# Final resort : default callback
if self.default is not None:
- callbacks_chain.append(lambda: self.default(self, instance, cls))
+ _default = self.default # make mypy happy
+ callbacks_chain.append(lambda: _default(instance.wrapped_obj))
# Trigger the callbacks in order, the first one producing a
# value wins
@@ -1262,25 +1297,33 @@ QueryState = collections.namedtuple("QueryState", ["name", "extra_parameters", "
class SpecBuildInterface(lang.ObjectWrapper):
# home is available in the base Package so no default is needed
home = ForwardQueryToPackage("home", default_handler=None)
-
- command = ForwardQueryToPackage("command", default_handler=_command_default_handler)
-
headers = ForwardQueryToPackage("headers", default_handler=_headers_default_handler)
-
libs = ForwardQueryToPackage("libs", default_handler=_libs_default_handler)
+ command = ForwardQueryToPackage(
+ "command", default_handler=_command_default_handler, _indirect=True
+ )
- def __init__(self, spec, name, query_parameters):
+ def __init__(self, spec: "Spec", name: str, query_parameters: List[str], _parent: "Spec"):
super().__init__(spec)
# Adding new attributes goes after super() call since the ObjectWrapper
# resets __dict__ to behave like the passed object
original_spec = getattr(spec, "wrapped_obj", spec)
self.wrapped_obj = original_spec
- self.token = original_spec, name, query_parameters
+ self.token = original_spec, name, query_parameters, _parent
is_virtual = spack.repo.PATH.is_virtual(name)
self.last_query = QueryState(
name=name, extra_parameters=query_parameters, isvirtual=is_virtual
)
+ # TODO: this ad-hoc logic makes `spec["python"].command` return
+ # `spec["python-venv"].command` and should be removed when `python` is a virtual.
+ self.indirect_spec = None
+ if spec.name == "python":
+ python_venvs = _parent.dependencies("python-venv")
+ if not python_venvs:
+ return
+ self.indirect_spec = python_venvs[0]
+
def __reduce__(self):
return SpecBuildInterface, self.token
@@ -1288,6 +1331,104 @@ class SpecBuildInterface(lang.ObjectWrapper):
return self.wrapped_obj.copy(*args, **kwargs)
+def tree(
+ specs: List["Spec"],
+ *,
+ color: Optional[bool] = None,
+ depth: bool = False,
+ hashes: bool = False,
+ hashlen: Optional[int] = None,
+ cover: str = "nodes",
+ indent: int = 0,
+ format: str = DEFAULT_FORMAT,
+ deptypes: Union[Tuple[str, ...], str] = "all",
+ show_types: bool = False,
+ depth_first: bool = False,
+ recurse_dependencies: bool = True,
+ status_fn: Optional[Callable[["Spec"], InstallStatus]] = None,
+ prefix: Optional[Callable[["Spec"], str]] = None,
+ key=id,
+) -> str:
+ """Prints out specs and their dependencies, tree-formatted with indentation.
+
+ Status function may either output a boolean or an InstallStatus
+
+ Args:
+ color: if True, always colorize the tree. If False, don't colorize the tree. If None,
+ use the default from llnl.tty.color
+ depth: print the depth from the root
+ hashes: if True, print the hash of each node
+ hashlen: length of the hash to be printed
+ cover: either "nodes" or "edges"
+ indent: extra indentation for the tree being printed
+ format: format to be used to print each node
+ deptypes: dependency types to be represented in the tree
+ show_types: if True, show the (merged) dependency type of a node
+ depth_first: if True, traverse the DAG depth first when representing it as a tree
+ recurse_dependencies: if True, recurse on dependencies
+ status_fn: optional callable that takes a node as an argument and return its
+ installation status
+ prefix: optional callable that takes a node as an argument and return its
+ installation prefix
+ """
+ out = ""
+
+ if color is None:
+ color = clr.get_color_when()
+
+ # reduce deptypes over all in-edges when covering nodes
+ if show_types and cover == "nodes":
+ deptype_lookup: Dict[str, dt.DepFlag] = collections.defaultdict(dt.DepFlag)
+ for edge in traverse.traverse_edges(specs, cover="edges", deptype=deptypes, root=False):
+ deptype_lookup[edge.spec.dag_hash()] |= edge.depflag
+
+ for d, dep_spec in traverse.traverse_tree(
+ sorted(specs), cover=cover, deptype=deptypes, depth_first=depth_first, key=key
+ ):
+ node = dep_spec.spec
+
+ if prefix is not None:
+ out += prefix(node)
+ out += " " * indent
+
+ if depth:
+ out += "%-4d" % d
+
+ if status_fn:
+ status = status_fn(node)
+ if status in list(InstallStatus):
+ out += clr.colorize(status.value, color=color)
+ elif status:
+ out += clr.colorize("@g{[+]} ", color=color)
+ else:
+ out += clr.colorize("@r{[-]} ", color=color)
+
+ if hashes:
+ out += clr.colorize("@K{%s} ", color=color) % node.dag_hash(hashlen)
+
+ if show_types:
+ if cover == "nodes":
+ depflag = deptype_lookup[dep_spec.spec.dag_hash()]
+ else:
+ # when covering edges or paths, we show dependency
+ # types only for the edge through which we visited
+ depflag = dep_spec.depflag
+
+ type_chars = dt.flag_to_chars(depflag)
+ out += "[%s] " % type_chars
+
+ out += " " * d
+ if d > 0:
+ out += "^"
+ out += node.format(format, color=color) + "\n"
+
+ # Check if we wanted just the first line
+ if not recurse_dependencies:
+ break
+
+ return out
+
+
@lang.lazy_lexicographic_ordering(set_hash=False)
class Spec:
#: Cache for spec's prefix, computed lazily in the corresponding property
@@ -1331,12 +1472,12 @@ class Spec:
# init an empty spec that matches anything.
self.name = None
self.versions = vn.VersionList(":")
- self.variants = vt.VariantMap(self)
+ self.variants = VariantMap(self)
self.architecture = None
self.compiler = None
self.compiler_flags = FlagMap(self)
- self._dependents = _EdgeMap(store_by=EdgeDirection.parent)
- self._dependencies = _EdgeMap(store_by=EdgeDirection.child)
+ self._dependents = _EdgeMap(store_by_child=False)
+ self._dependencies = _EdgeMap(store_by_child=True)
self.namespace = None
# initial values for all spec hash types
@@ -1407,6 +1548,13 @@ class Spec:
def external(self):
return bool(self.external_path) or bool(self.external_modules)
+ @property
+ def is_develop(self):
+ """Return whether the Spec represents a user-developed package
+ in a Spack ``Environment`` (i.e. using `spack develop`).
+ """
+ return bool(self.variants.get("dev_path", False))
+
def clear_dependencies(self):
"""Trim the dependencies of this spec."""
self._dependencies.clear()
@@ -1448,25 +1596,34 @@ class Spec:
raise spack.error.SpecError(err_msg.format(name, len(deps)))
return deps[0]
- def edges_from_dependents(self, name=None, depflag: dt.DepFlag = dt.ALL):
+ def edges_from_dependents(
+ self, name=None, depflag: dt.DepFlag = dt.ALL, *, virtuals: Optional[List[str]] = None
+ ) -> List[DependencySpec]:
"""Return a list of edges connecting this node in the DAG
to parents.
Args:
name (str): filter dependents by package name
depflag: allowed dependency types
+ virtuals: allowed virtuals
"""
- return [d for d in self._dependents.select(parent=name, depflag=depflag)]
+ return [
+ d for d in self._dependents.select(parent=name, depflag=depflag, virtuals=virtuals)
+ ]
- def edges_to_dependencies(self, name=None, depflag: dt.DepFlag = dt.ALL):
- """Return a list of edges connecting this node in the DAG
- to children.
+ def edges_to_dependencies(
+ self, name=None, depflag: dt.DepFlag = dt.ALL, *, virtuals: Optional[List[str]] = None
+ ) -> List[DependencySpec]:
+ """Returns a list of edges connecting this node in the DAG to children.
Args:
name (str): filter dependencies by package name
depflag: allowed dependency types
+ virtuals: allowed virtuals
"""
- return [d for d in self._dependencies.select(child=name, depflag=depflag)]
+ return [
+ d for d in self._dependencies.select(child=name, depflag=depflag, virtuals=virtuals)
+ ]
@property
def edge_attributes(self) -> str:
@@ -1488,18 +1645,29 @@ class Spec:
result = f"{deptypes_str} {virtuals_str}".strip()
return f"[{result}]"
- def dependencies(self, name=None, deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL):
- """Return a list of direct dependencies (nodes in the DAG).
+ def dependencies(
+ self,
+ name=None,
+ deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL,
+ *,
+ virtuals: Optional[List[str]] = None,
+ ) -> List["Spec"]:
+ """Returns a list of direct dependencies (nodes in the DAG)
Args:
- name (str): filter dependencies by package name
+ name: filter dependencies by package name
deptype: allowed dependency types
+ virtuals: allowed virtuals
"""
if not isinstance(deptype, dt.DepFlag):
deptype = dt.canonicalize(deptype)
- return [d.spec for d in self.edges_to_dependencies(name, depflag=deptype)]
+ return [
+ d.spec for d in self.edges_to_dependencies(name, depflag=deptype, virtuals=virtuals)
+ ]
- def dependents(self, name=None, deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL):
+ def dependents(
+ self, name=None, deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL
+ ) -> List["Spec"]:
"""Return a list of direct dependents (nodes in the DAG).
Args:
@@ -1527,38 +1695,14 @@ class Spec:
result[key] = list(group)
return result
- #
- # Private routines here are called by the parser when building a spec.
- #
- def _add_versions(self, version_list):
- """Called by the parser to add an allowable version."""
- # If it already has a non-trivial version list, this is an error
- if self.versions and self.versions != vn.any_version:
- raise MultipleVersionError(
- "A spec cannot contain multiple version signifiers." " Use a version list instead."
- )
- self.versions = vn.VersionList()
- for version in version_list:
- self.versions.add(version)
-
def _add_flag(self, name, value, propagate):
"""Called by the parser to add a known flag.
Known flags currently include "arch"
"""
- # If the == syntax is used to propagate the spec architecture
- # This is an error
- architecture_names = [
- "arch",
- "architecture",
- "platform",
- "os",
- "operating_system",
- "target",
- ]
- if propagate and name in architecture_names:
- raise ArchitecturePropagationError(
- "Unable to propagate the architecture failed." " Use a '=' instead."
+ if propagate and name in vt.reserved_names:
+ raise UnsupportedPropagationError(
+ f"Propagation with '==' is not supported for '{name}'."
)
valid_flags = FlagMap.valid_compiler_flags()
@@ -1572,11 +1716,14 @@ class Spec:
self._set_architecture(os=value)
elif name == "target":
self._set_architecture(target=value)
+ elif name == "namespace":
+ self.namespace = value
elif name in valid_flags:
assert self.compiler_flags is not None
flags_and_propagation = spack.compiler.tokenize_flags(value, propagate)
+ flag_group = " ".join(x for (x, y) in flags_and_propagation)
for flag, propagation in flags_and_propagation:
- self.compiler_flags.add_flag(name, flag, propagation)
+ self.compiler_flags.add_flag(name, flag, propagation, flag_group)
else:
# FIXME:
# All other flags represent variants. 'foo=true' and 'foo=false'
@@ -1591,9 +1738,7 @@ class Spec:
"""Called by the parser to set the architecture."""
arch_attrs = ["platform", "os", "target"]
if self.architecture and self.architecture.concrete:
- raise DuplicateArchitectureError(
- "Spec for '%s' cannot have two architectures." % self.name
- )
+ raise DuplicateArchitectureError("Spec cannot have two architectures.")
if not self.architecture:
new_vals = tuple(kwargs.get(arg, None) for arg in arch_attrs)
@@ -1602,44 +1747,42 @@ class Spec:
new_attrvals = [(a, v) for a, v in kwargs.items() if a in arch_attrs]
for new_attr, new_value in new_attrvals:
if getattr(self.architecture, new_attr):
- raise DuplicateArchitectureError(
- "Spec for '%s' cannot have two '%s' specified "
- "for its architecture" % (self.name, new_attr)
- )
+ raise DuplicateArchitectureError(f"Cannot specify '{new_attr}' twice")
else:
setattr(self.architecture, new_attr, new_value)
- def _set_compiler(self, compiler):
- """Called by the parser to set the compiler."""
- if self.compiler:
- raise DuplicateCompilerSpecError(
- "Spec for '%s' cannot have two compilers." % self.name
- )
- self.compiler = compiler
-
def _add_dependency(self, spec: "Spec", *, depflag: dt.DepFlag, virtuals: Tuple[str, ...]):
"""Called by the parser to add another spec as a dependency."""
if spec.name not in self._dependencies or not spec.name:
self.add_dependency_edge(spec, depflag=depflag, virtuals=virtuals)
return
- # Keep the intersection of constraints when a dependency is added
- # multiple times. Currently, we only allow identical edge types.
+ # Keep the intersection of constraints when a dependency is added multiple times with
+ # the same deptype. Add a new dependency if it is added with a compatible deptype
+ # (for example, a build-only dependency is compatible with a link-only dependenyc).
+ # The only restrictions, currently, are that we cannot add edges with overlapping
+ # dependency types and we cannot add multiple edges that have link/run dependency types.
+ # See ``spack.deptypes.compatible``.
orig = self._dependencies[spec.name]
try:
dspec = next(dspec for dspec in orig if depflag == dspec.depflag)
except StopIteration:
- current_deps = ", ".join(
- dt.flag_to_chars(x.depflag) + " " + x.spec.short_spec for x in orig
- )
- raise DuplicateDependencyError(
- f"{self.short_spec} cannot depend on '{spec.short_spec}' multiple times.\n"
- f"\tRequired: {dt.flag_to_chars(depflag)}\n"
- f"\tDependency: {current_deps}"
- )
+ # Error if we have overlapping or incompatible deptypes
+ if any(not dt.compatible(dspec.depflag, depflag) for dspec in orig):
+ edge_attrs = f"deptypes={dt.flag_to_chars(depflag).strip()}"
+ required_dep_str = f"^[{edge_attrs}] {str(spec)}"
+
+ raise DuplicateDependencyError(
+ f"{spec.name} is a duplicate dependency, with conflicting dependency types\n"
+ f"\t'{str(self)}' cannot depend on '{required_dep_str}'"
+ )
+
+ self.add_dependency_edge(spec, depflag=depflag, virtuals=virtuals)
+ return
try:
dspec.spec.constrain(spec)
+ dspec.update_virtuals(virtuals=virtuals)
except spack.error.UnsatisfiableSpecError:
raise DuplicateDependencyError(
f"Cannot depend on incompatible specs '{dspec.spec}' and '{spec}'"
@@ -1660,7 +1803,10 @@ class Spec:
for edge in selected:
has_errors, details = False, []
msg = f"cannot update the edge from {edge.parent.name} to {edge.spec.name}"
- if edge.depflag & depflag:
+
+ # If the dependency is to an existing spec, we can update dependency
+ # types. If it is to a new object, check deptype compatibility.
+ if id(edge.spec) != id(dependency_spec) and not dt.compatible(edge.depflag, depflag):
has_errors = True
details.append(
(
@@ -1669,14 +1815,13 @@ class Spec:
)
)
- if any(v in edge.virtuals for v in virtuals):
- has_errors = True
- details.append(
- (
- f"{edge.parent.name} has already an edge matching any"
- f" of these virtuals {virtuals}"
+ if any(v in edge.virtuals for v in virtuals):
+ details.append(
+ (
+ f"{edge.parent.name} has already an edge matching any"
+ f" of these virtuals {virtuals}"
+ )
)
- )
if has_errors:
raise spack.error.SpecError(msg, "\n".join(details))
@@ -1808,14 +1953,14 @@ class Spec:
"""Returns a version of the spec with the dependencies hashed
instead of completely enumerated."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
- spec_format += "{variants}{arch=architecture}{/hash:7}"
+ spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.format(spec_format)
@property
def cshort_spec(self):
"""Returns an auto-colorized version of ``self.short_spec``."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
- spec_format += "{variants}{arch=architecture}{/hash:7}"
+ spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.cformat(spec_format)
@property
@@ -1920,6 +2065,7 @@ class Spec:
def _lookup_hash(self):
"""Lookup just one spec with an abstract hash, returning a spec from the the environment,
store, or finally, binary caches."""
+ import spack.binary_distribution
import spack.environment
active_env = spack.environment.active_environment()
@@ -1927,7 +2073,7 @@ class Spec:
# First env, then store, then binary cache
matches = (
(active_env.all_matching_specs(self) if active_env else [])
- or spack.store.STORE.db.query(self, installed=any)
+ or spack.store.STORE.db.query(self, installed=InstallRecordStatus.ANY)
or spack.binary_distribution.BinaryCacheQuery(True)(self)
)
@@ -1935,7 +2081,7 @@ class Spec:
raise InvalidHashError(self, self.abstract_hash)
if len(matches) != 1:
- raise spack.spec.AmbiguousHashError(
+ raise AmbiguousHashError(
f"Multiple packages specify hash beginning '{self.abstract_hash}'.", *matches
)
@@ -2057,6 +2203,18 @@ class Spec:
if params:
d["parameters"] = params
+ if params and not self.concrete:
+ flag_names = [
+ name
+ for name, flags in self.compiler_flags.items()
+ if any(x.propagate for x in flags)
+ ]
+ d["propagate"] = sorted(
+ itertools.chain(
+ [v.name for v in self.variants.values() if v.propagate], flag_names
+ )
+ )
+
if self.external:
d["external"] = syaml.syaml_dict(
[
@@ -2074,7 +2232,12 @@ class Spec:
if hasattr(variant, "_patches_in_order_of_appearance"):
d["patches"] = variant._patches_in_order_of_appearance
- if self._concrete and hash.package_hash and self._package_hash:
+ if (
+ self._concrete
+ and hash.package_hash
+ and hasattr(self, "_package_hash")
+ and self._package_hash
+ ):
# We use the attribute here instead of `self.package_hash()` because this
# should *always* be assignhed at concretization time. We don't want to try
# to compute a package hash for concrete spec where a) the package might not
@@ -2224,16 +2387,10 @@ class Spec:
spec is concrete, the full hash is added as well. If 'build' is in
the hash_type, the build hash is also added."""
node = self.to_node_dict(hash)
+ # All specs have at least a DAG hash
node[ht.dag_hash.name] = self.dag_hash()
- # dag_hash is lazily computed -- but if we write a spec out, we want it
- # to be included. This is effectively the last chance we get to compute
- # it accurately.
- if self.concrete:
- # all specs have at least a DAG hash
- node[ht.dag_hash.name] = self.dag_hash()
-
- else:
+ if not self.concrete:
node["concrete"] = False
# we can also give them other hash types if we want
@@ -2265,14 +2422,16 @@ class Spec:
package_cls = spack.repo.PATH.get_pkg_class(new_spec.name)
if change_spec.versions and not change_spec.versions == vn.any_version:
new_spec.versions = change_spec.versions
- for variant, value in change_spec.variants.items():
- if variant in package_cls.variants:
- if variant in new_spec.variants:
+
+ for vname, value in change_spec.variants.items():
+ if vname in package_cls.variant_names():
+ if vname in new_spec.variants:
new_spec.variants.substitute(value)
else:
- new_spec.variants[variant] = value
+ new_spec.variants[vname] = value
else:
- raise ValueError("{0} is not a variant of {1}".format(variant, new_spec.name))
+ raise ValueError("{0} is not a variant of {1}".format(vname, new_spec.name))
+
if change_spec.compiler:
new_spec.compiler = change_spec.compiler
if change_spec.compiler_flags:
@@ -2373,7 +2532,7 @@ class Spec:
spec_like, dep_like = next(iter(d.items()))
# If the requirements was for unique nodes (default)
- # then re-use keys from the local cache. Otherwise build
+ # then reuse keys from the local cache. Otherwise build
# a new node every time.
if not isinstance(spec_like, Spec):
spec = spec_cache[spec_like] if normal else Spec(spec_like)
@@ -2500,22 +2659,27 @@ class Spec:
return Spec.from_dict(extracted_json)
@staticmethod
- def from_detection(spec_str, extra_attributes=None):
+ def from_detection(
+ spec_str: str,
+ *,
+ external_path: str,
+ external_modules: Optional[List[str]] = None,
+ extra_attributes: Optional[Dict] = None,
+ ) -> "Spec":
"""Construct a spec from a spec string determined during external
detection and attach extra attributes to it.
Args:
- spec_str (str): spec string
- extra_attributes (dict): dictionary containing extra attributes
-
- Returns:
- spack.spec.Spec: external spec
+ spec_str: spec string
+ external_path: prefix of the external spec
+ external_modules: optional module files to be loaded when the external spec is used
+ extra_attributes: dictionary containing extra attributes
"""
- s = Spec(spec_str)
+ s = Spec(spec_str, external_path=external_path, external_modules=external_modules)
extra_attributes = syaml.sorted_dict(extra_attributes or {})
# This is needed to be able to validate multi-valued variants,
# otherwise they'll still be abstract in the context of detection.
- vt.substitute_abstract_variants(s)
+ substitute_abstract_variants(s)
s.extra_attributes = extra_attributes
return s
@@ -2537,293 +2701,6 @@ class Spec:
validate_fn = getattr(pkg_cls, "validate_detected_spec", lambda x, y: None)
validate_fn(self, self.extra_attributes)
- def _concretize_helper(self, concretizer, presets=None, visited=None):
- """Recursive helper function for concretize().
- This concretizes everything bottom-up. As things are
- concretized, they're added to the presets, and ancestors
- will prefer the settings of their children.
- """
- if presets is None:
- presets = {}
- if visited is None:
- visited = set()
-
- if self.name in visited:
- return False
-
- if self.concrete:
- visited.add(self.name)
- return False
-
- changed = False
-
- # Concretize deps first -- this is a bottom-up process.
- for name in sorted(self._dependencies):
- # WARNING: This function is an implementation detail of the
- # WARNING: original concretizer. Since with that greedy
- # WARNING: algorithm we don't allow multiple nodes from
- # WARNING: the same package in a DAG, here we hard-code
- # WARNING: using index 0 i.e. we assume that we have only
- # WARNING: one edge from package "name"
- changed |= self._dependencies[name][0].spec._concretize_helper(
- concretizer, presets, visited
- )
-
- if self.name in presets:
- changed |= self.constrain(presets[self.name])
- else:
- # Concretize virtual dependencies last. Because they're added
- # to presets below, their constraints will all be merged, but we'll
- # still need to select a concrete package later.
- if not self.virtual:
- changed |= any(
- (
- concretizer.concretize_develop(self), # special variant
- concretizer.concretize_architecture(self),
- concretizer.concretize_compiler(self),
- concretizer.adjust_target(self),
- # flags must be concretized after compiler
- concretizer.concretize_compiler_flags(self),
- concretizer.concretize_version(self),
- concretizer.concretize_variants(self),
- )
- )
- presets[self.name] = self
-
- visited.add(self.name)
- return changed
-
- def _replace_with(self, concrete):
- """Replace this virtual spec with a concrete spec."""
- assert self.virtual
- virtuals = (self.name,)
- for dep_spec in itertools.chain.from_iterable(self._dependents.values()):
- dependent = dep_spec.parent
- depflag = dep_spec.depflag
-
- # remove self from all dependents, unless it is already removed
- if self.name in dependent._dependencies:
- del dependent._dependencies.edges[self.name]
-
- # add the replacement, unless it is already a dep of dependent.
- if concrete.name not in dependent._dependencies:
- dependent._add_dependency(concrete, depflag=depflag, virtuals=virtuals)
- else:
- dependent.edges_to_dependencies(name=concrete.name)[0].update_virtuals(
- virtuals=virtuals
- )
-
- def _expand_virtual_packages(self, concretizer):
- """Find virtual packages in this spec, replace them with providers,
- and normalize again to include the provider's (potentially virtual)
- dependencies. Repeat until there are no virtual deps.
-
- Precondition: spec is normalized.
-
- .. todo::
-
- If a provider depends on something that conflicts with
- other dependencies in the spec being expanded, this can
- produce a conflicting spec. For example, if mpich depends
- on hwloc@:1.3 but something in the spec needs hwloc1.4:,
- then we should choose an MPI other than mpich. Cases like
- this are infrequent, but should implement this before it is
- a problem.
- """
- # Make an index of stuff this spec already provides
- self_index = spack.provider_index.ProviderIndex(
- repository=spack.repo.PATH, specs=self.traverse(), restrict=True
- )
- changed = False
- done = False
-
- while not done:
- done = True
- for spec in list(self.traverse()):
- replacement = None
- if spec.external:
- continue
- if spec.virtual:
- replacement = self._find_provider(spec, self_index)
- if replacement:
- # TODO: may break if in-place on self but
- # shouldn't happen if root is traversed first.
- spec._replace_with(replacement)
- done = False
- break
-
- if not replacement:
- # Get a list of possible replacements in order of
- # preference.
- candidates = concretizer.choose_virtual_or_external(spec)
-
- # Try the replacements in order, skipping any that cause
- # satisfiability problems.
- for replacement in candidates:
- if replacement is spec:
- break
-
- # Replace spec with the candidate and normalize
- copy = self.copy()
- copy[spec.name]._dup(replacement, deps=False)
-
- try:
- # If there are duplicate providers or duplicate
- # provider deps, consolidate them and merge
- # constraints.
- copy.normalize(force=True)
- break
- except spack.error.SpecError:
- # On error, we'll try the next replacement.
- continue
-
- # If replacement is external then trim the dependencies
- if replacement.external:
- if spec._dependencies:
- for dep in spec.dependencies():
- del dep._dependents.edges[spec.name]
- changed = True
- spec.clear_dependencies()
- replacement.clear_dependencies()
- replacement.architecture = self.architecture
-
- # TODO: could this and the stuff in _dup be cleaned up?
- def feq(cfield, sfield):
- return (not cfield) or (cfield == sfield)
-
- if replacement is spec or (
- feq(replacement.name, spec.name)
- and feq(replacement.versions, spec.versions)
- and feq(replacement.compiler, spec.compiler)
- and feq(replacement.architecture, spec.architecture)
- and feq(replacement._dependencies, spec._dependencies)
- and feq(replacement.variants, spec.variants)
- and feq(replacement.external_path, spec.external_path)
- and feq(replacement.external_modules, spec.external_modules)
- ):
- continue
- # Refine this spec to the candidate. This uses
- # replace_with AND dup so that it can work in
- # place. TODO: make this more efficient.
- if spec.virtual:
- spec._replace_with(replacement)
- changed = True
- if spec._dup(replacement, deps=False, cleardeps=False):
- changed = True
-
- self_index.update(spec)
- done = False
- break
-
- return changed
-
- def _old_concretize(self, tests=False, deprecation_warning=True):
- """A spec is concrete if it describes one build of a package uniquely.
- This will ensure that this spec is concrete.
-
- Args:
- tests (list or bool): list of packages that will need test
- dependencies, or True/False for test all/none
- deprecation_warning (bool): enable or disable the deprecation
- warning for the old concretizer
-
- If this spec could describe more than one version, variant, or build
- of a package, this will add constraints to make it concrete.
-
- Some rigorous validation and checks are also performed on the spec.
- Concretizing ensures that it is self-consistent and that it's
- consistent with requirements of its packages. See flatten() and
- normalize() for more details on this.
- """
- import spack.concretize
-
- # Add a warning message to inform users that the original concretizer
- # will be removed
- if deprecation_warning:
- msg = (
- "the original concretizer is currently being used.\n\tUpgrade to "
- '"clingo" at your earliest convenience. The original concretizer '
- "will be removed from Spack in a future version."
- )
- warnings.warn(msg)
-
- self.replace_hash()
-
- if not self.name:
- raise spack.error.SpecError("Attempting to concretize anonymous spec")
-
- if self._concrete:
- return
-
- changed = True
- force = False
-
- user_spec_deps = self.flat_dependencies(copy=False)
- concretizer = spack.concretize.Concretizer(self.copy())
- while changed:
- changes = (
- self.normalize(force, tests=tests, user_spec_deps=user_spec_deps),
- self._expand_virtual_packages(concretizer),
- self._concretize_helper(concretizer),
- )
- changed = any(changes)
- force = True
-
- visited_user_specs = set()
- for dep in self.traverse():
- visited_user_specs.add(dep.name)
- pkg_cls = spack.repo.PATH.get_pkg_class(dep.name)
- visited_user_specs.update(x.name for x in pkg_cls(dep).provided)
-
- extra = set(user_spec_deps.keys()).difference(visited_user_specs)
- if extra:
- raise InvalidDependencyError(self.name, extra)
-
- Spec.inject_patches_variant(self)
-
- for s in self.traverse():
- # TODO: Refactor this into a common method to build external specs
- # TODO: or turn external_path into a lazy property
- Spec.ensure_external_path_if_external(s)
-
- # assign hashes and mark concrete
- self._finalize_concretization()
-
- # If any spec in the DAG is deprecated, throw an error
- Spec.ensure_no_deprecated(self)
-
- # Update externals as needed
- for dep in self.traverse():
- if dep.external:
- dep.package.update_external_dependencies()
-
- # Now that the spec is concrete we should check if
- # there are declared conflicts
- #
- # TODO: this needs rethinking, as currently we can only express
- # TODO: internal configuration conflicts within one package.
- matches = []
- for x in self.traverse():
- if x.external:
- # external specs are already built, don't worry about whether
- # it's possible to build that configuration with Spack
- continue
- for conflict_spec, when_list in x.package_class.conflicts.items():
- if x.satisfies(conflict_spec):
- for when_spec, msg in when_list:
- if x.satisfies(when_spec):
- when = when_spec.copy()
- when.name = x.name
- matches.append((x, conflict_spec, when, msg))
- if matches:
- raise ConflictsInSpecError(self, matches)
-
- # Check if we can produce an optimized binary (will throw if
- # there are declared inconsistencies)
- # No need on platform=cray because of the targeting modules
- if not self.satisfies("platform=cray"):
- self.architecture.target.optimization_flags(self.compiler)
-
def _patches_assigned(self):
"""Whether patches have been assigned to this spec by the concretizer."""
# FIXME: _patches_in_order_of_appearance is attached after concretization
@@ -2861,13 +2738,14 @@ class Spec:
continue
# Add any patches from the package to the spec.
- patches = []
+ patches = set()
for cond, patch_list in s.package_class.patches.items():
if s.satisfies(cond):
for patch in patch_list:
- patches.append(patch)
+ patches.add(patch)
if patches:
spec_to_patches[id(s)] = patches
+
# Also record all patches required on dependencies by
# depends_on(..., patch=...)
for dspec in root.traverse_edges(deptype=all, cover="edges", root=False):
@@ -2875,17 +2753,25 @@ class Spec:
continue
pkg_deps = dspec.parent.package_class.dependencies
- if dspec.spec.name not in pkg_deps:
- continue
patches = []
- for cond, dependency in pkg_deps[dspec.spec.name].items():
+ for cond, deps_by_name in pkg_deps.items():
+ if not dspec.parent.satisfies(cond):
+ continue
+
+ dependency = deps_by_name.get(dspec.spec.name)
+ if not dependency:
+ continue
+
for pcond, patch_list in dependency.patches.items():
- if dspec.parent.satisfies(cond) and dspec.spec.satisfies(pcond):
+ if dspec.spec.satisfies(pcond):
patches.extend(patch_list)
+
if patches:
- all_patches = spec_to_patches.setdefault(id(dspec.spec), [])
- all_patches.extend(patches)
+ all_patches = spec_to_patches.setdefault(id(dspec.spec), set())
+ for patch in patches:
+ all_patches.add(patch)
+
for spec in root.traverse():
if id(spec) not in spec_to_patches:
continue
@@ -2944,7 +2830,13 @@ class Spec:
msg += " For each package listed, choose another spec\n"
raise SpecDeprecatedError(msg)
- def _new_concretize(self, tests=False):
+ def concretize(self, tests: Union[bool, Iterable[str]] = False) -> None:
+ """Concretize the current spec.
+
+ Args:
+ tests: if False disregard 'test' dependencies, if a list of names activate them for
+ the packages in the list, if True activate 'test' dependencies for all packages.
+ """
import spack.solver.asp
self.replace_hash()
@@ -2961,7 +2853,6 @@ class Spec:
allow_deprecated = spack.config.get("config:deprecated", False)
solver = spack.solver.asp.Solver()
result = solver.solve([self], tests=tests, allow_deprecated=allow_deprecated)
- result.raise_if_unsat()
# take the best answer
opt, i, answer = min(result.answers)
@@ -2979,19 +2870,6 @@ class Spec:
concretized = answer[node]
self._dup(concretized)
- def concretize(self, tests=False):
- """Concretize the current spec.
-
- Args:
- tests (bool or list): if False disregard 'test' dependencies,
- if a list of names activate them for the packages in the list,
- if True activate 'test' dependencies for all packages.
- """
- if spack.config.get("config:concretizer", "clingo") == "clingo":
- self._new_concretize(tests)
- else:
- self._old_concretize(tests)
-
def _mark_root_concrete(self, value=True):
"""Mark just this spec (not dependencies) concrete."""
if (not value) and self.concrete and self.installed:
@@ -3031,7 +2909,7 @@ class Spec:
if (not value) and s.concrete and s.installed:
continue
elif not value:
- s.clear_cached_hashes()
+ s.clear_caches()
s._mark_root_concrete(value)
def _finalize_concretization(self):
@@ -3080,7 +2958,7 @@ class Spec:
for spec in self.traverse():
spec._cached_hash(ht.dag_hash)
- def concretized(self, tests=False):
+ def concretized(self, tests: Union[bool, Iterable[str]] = False) -> "spack.spec.Spec":
"""This is a non-destructive version of concretize().
First clones, then returns a concrete version of this package
@@ -3095,46 +2973,6 @@ class Spec:
clone.concretize(tests=tests)
return clone
- def flat_dependencies(self, **kwargs):
- """Return a DependencyMap containing all of this spec's
- dependencies with their constraints merged.
-
- If copy is True, returns merged copies of its dependencies
- without modifying the spec it's called on.
-
- If copy is False, clears this spec's dependencies and
- returns them. This disconnects all dependency links including
- transitive dependencies, except for concrete specs: if a spec
- is concrete it will not be disconnected from its dependencies
- (although a non-concrete spec with concrete dependencies will
- be disconnected from those dependencies).
- """
- copy = kwargs.get("copy", True)
-
- flat_deps = {}
- try:
- deptree = self.traverse(root=False)
- for spec in deptree:
- if spec.name not in flat_deps:
- if copy:
- spec = spec.copy(deps=False)
- flat_deps[spec.name] = spec
- else:
- flat_deps[spec.name].constrain(spec)
-
- if not copy:
- for spec in flat_deps.values():
- if not spec.concrete:
- spec.clear_edges()
- self.clear_dependencies()
-
- return flat_deps
-
- except spack.error.UnsatisfiableSpecError as e:
- # Here, the DAG contains two instances of the same package
- # with inconsistent constraints.
- raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e
-
def index(self, deptype="all"):
"""Return a dictionary that points to all the dependencies in this
spec.
@@ -3144,300 +2982,6 @@ class Spec:
dm[spec.name].append(spec)
return dm
- def _evaluate_dependency_conditions(self, name):
- """Evaluate all the conditions on a dependency with this name.
-
- Args:
- name (str): name of dependency to evaluate conditions on.
-
- Returns:
- (Dependency): new Dependency object combining all constraints.
-
- If the package depends on <name> in the current spec
- configuration, return the constrained dependency and
- corresponding dependency types.
-
- If no conditions are True (and we don't depend on it), return
- ``(None, None)``.
- """
- conditions = self.package_class.dependencies[name]
-
- vt.substitute_abstract_variants(self)
- # evaluate when specs to figure out constraints on the dependency.
- dep = None
- for when_spec, dependency in conditions.items():
- if self.satisfies(when_spec):
- if dep is None:
- dep = dp.Dependency(self.name, Spec(name), depflag=0)
- try:
- dep.merge(dependency)
- except spack.error.UnsatisfiableSpecError as e:
- e.message = (
- "Conflicting conditional dependencies for spec"
- "\n\n\t{0}\n\n"
- "Cannot merge constraint"
- "\n\n\t{1}\n\n"
- "into"
- "\n\n\t{2}".format(self, dependency.spec, dep.spec)
- )
- raise e
-
- return dep
-
- def _find_provider(self, vdep, provider_index):
- """Find provider for a virtual spec in the provider index.
- Raise an exception if there is a conflicting virtual
- dependency already in this spec.
- """
- assert spack.repo.PATH.is_virtual_safe(vdep.name), vdep
-
- # note that this defensively copies.
- providers = provider_index.providers_for(vdep)
-
- # If there is a provider for the vpkg, then use that instead of
- # the virtual package.
- if providers:
- # Remove duplicate providers that can concretize to the same
- # result.
- for provider in providers:
- for spec in providers:
- if spec is not provider and provider.intersects(spec):
- providers.remove(spec)
- # Can't have multiple providers for the same thing in one spec.
- if len(providers) > 1:
- raise MultipleProviderError(vdep, providers)
- return providers[0]
- else:
- # The user might have required something insufficient for
- # pkg_dep -- so we'll get a conflict. e.g., user asked for
- # mpi@:1.1 but some package required mpi@2.1:.
- required = provider_index.providers_for(vdep.name)
- if len(required) > 1:
- raise MultipleProviderError(vdep, required)
- elif required:
- raise UnsatisfiableProviderSpecError(required[0], vdep)
-
- def _merge_dependency(self, dependency, visited, spec_deps, provider_index, tests):
- """Merge dependency information from a Package into this Spec.
-
- Args:
- dependency (Dependency): dependency metadata from a package;
- this is typically the result of merging *all* matching
- dependency constraints from the package.
- visited (set): set of dependency nodes already visited by
- ``normalize()``.
- spec_deps (dict): ``dict`` of all dependencies from the spec
- being normalized.
- provider_index (dict): ``provider_index`` of virtual dep
- providers in the ``Spec`` as normalized so far.
-
- NOTE: Caller should assume that this routine owns the
- ``dependency`` parameter, i.e., it needs to be a copy of any
- internal structures.
-
- This is the core of ``normalize()``. There are some basic steps:
-
- * If dep is virtual, evaluate whether it corresponds to an
- existing concrete dependency, and merge if so.
-
- * If it's real and it provides some virtual dep, see if it provides
- what some virtual dependency wants and merge if so.
-
- * Finally, if none of the above, merge dependency and its
- constraints into this spec.
-
- This method returns True if the spec was changed, False otherwise.
-
- """
- changed = False
- dep = dependency.spec
-
- # If it's a virtual dependency, try to find an existing
- # provider in the spec, and merge that.
- virtuals = ()
- if spack.repo.PATH.is_virtual_safe(dep.name):
- virtuals = (dep.name,)
- visited.add(dep.name)
- provider = self._find_provider(dep, provider_index)
- if provider:
- dep = provider
- else:
- index = spack.provider_index.ProviderIndex(
- repository=spack.repo.PATH, specs=[dep], restrict=True
- )
- items = list(spec_deps.items())
- for name, vspec in items:
- if not spack.repo.PATH.is_virtual_safe(vspec.name):
- continue
-
- if index.providers_for(vspec):
- vspec._replace_with(dep)
- del spec_deps[vspec.name]
- changed = True
- else:
- required = index.providers_for(vspec.name)
- if required:
- raise UnsatisfiableProviderSpecError(required[0], dep)
- provider_index.update(dep)
-
- # If the spec isn't already in the set of dependencies, add it.
- # Note: dep is always owned by this method. If it's from the
- # caller, it's a copy from _evaluate_dependency_conditions. If it
- # comes from a vdep, it's a defensive copy from _find_provider.
- if dep.name not in spec_deps:
- if self.concrete:
- return False
-
- spec_deps[dep.name] = dep
- changed = True
- else:
- # merge package/vdep information into spec
- try:
- tty.debug("{0} applying constraint {1}".format(self.name, str(dep)))
- changed |= spec_deps[dep.name].constrain(dep)
- except spack.error.UnsatisfiableSpecError as e:
- fmt = "An unsatisfiable {0}".format(e.constraint_type)
- fmt += " constraint has been detected for spec:"
- fmt += "\n\n{0}\n\n".format(spec_deps[dep.name].tree(indent=4))
- fmt += "while trying to concretize the partial spec:"
- fmt += "\n\n{0}\n\n".format(self.tree(indent=4))
- fmt += "{0} requires {1} {2} {3}, but spec asked for {4}"
-
- e.message = fmt.format(
- self.name, dep.name, e.constraint_type, e.required, e.provided
- )
-
- raise
-
- # Add merged spec to my deps and recurse
- spec_dependency = spec_deps[dep.name]
- if dep.name not in self._dependencies:
- self._add_dependency(spec_dependency, depflag=dependency.depflag, virtuals=virtuals)
-
- changed |= spec_dependency._normalize_helper(visited, spec_deps, provider_index, tests)
- return changed
-
- def _normalize_helper(self, visited, spec_deps, provider_index, tests):
- """Recursive helper function for _normalize."""
- if self.name in visited:
- return False
- visited.add(self.name)
-
- # If we descend into a virtual spec, there's nothing more
- # to normalize. Concretize will finish resolving it later.
- if self.virtual or self.external:
- return False
-
- # Avoid recursively adding constraints for already-installed packages:
- # these may include build dependencies which are not needed for this
- # install (since this package is already installed).
- if self.concrete and self.installed:
- return False
-
- # Combine constraints from package deps with constraints from
- # the spec, until nothing changes.
- any_change = False
- changed = True
-
- while changed:
- changed = False
- for dep_name in self.package_class.dependencies:
- # Do we depend on dep_name? If so pkg_dep is not None.
- dep = self._evaluate_dependency_conditions(dep_name)
-
- # If dep is a needed dependency, merge it.
- if dep:
- merge = (
- # caller requested test dependencies
- tests is True
- or (tests and self.name in tests)
- or
- # this is not a test-only dependency
- (dep.depflag & ~dt.TEST)
- )
-
- if merge:
- changed |= self._merge_dependency(
- dep, visited, spec_deps, provider_index, tests
- )
- any_change |= changed
-
- return any_change
-
- def normalize(self, force=False, tests=False, user_spec_deps=None):
- """When specs are parsed, any dependencies specified are hanging off
- the root, and ONLY the ones that were explicitly provided are there.
- Normalization turns a partial flat spec into a DAG, where:
-
- 1. Known dependencies of the root package are in the DAG.
- 2. Each node's dependencies dict only contains its known direct
- deps.
- 3. There is only ONE unique spec for each package in the DAG.
-
- * This includes virtual packages. If there a non-virtual
- package that provides a virtual package that is in the spec,
- then we replace the virtual package with the non-virtual one.
-
- TODO: normalize should probably implement some form of cycle
- detection, to ensure that the spec is actually a DAG.
- """
- if not self.name:
- raise spack.error.SpecError("Attempting to normalize anonymous spec")
-
- # Set _normal and _concrete to False when forced
- if force and not self._concrete:
- self._normal = False
-
- if self._normal:
- return False
-
- # Ensure first that all packages & compilers in the DAG exist.
- self.validate_or_raise()
- # Clear the DAG and collect all dependencies in the DAG, which will be
- # reapplied as constraints. All dependencies collected this way will
- # have been created by a previous execution of 'normalize'.
- # A dependency extracted here will only be reintegrated if it is
- # discovered to apply according to _normalize_helper, so
- # user-specified dependencies are recorded separately in case they
- # refer to specs which take several normalization passes to
- # materialize.
- all_spec_deps = self.flat_dependencies(copy=False)
-
- if user_spec_deps:
- for name, spec in user_spec_deps.items():
- if not name:
- msg = "Attempted to normalize anonymous dependency spec"
- msg += " %s" % spec
- raise InvalidSpecDetected(msg)
- if name not in all_spec_deps:
- all_spec_deps[name] = spec
- else:
- all_spec_deps[name].constrain(spec)
-
- # Initialize index of virtual dependency providers if
- # concretize didn't pass us one already
- provider_index = spack.provider_index.ProviderIndex(
- repository=spack.repo.PATH, specs=[s for s in all_spec_deps.values()], restrict=True
- )
-
- # traverse the package DAG and fill out dependencies according
- # to package files & their 'when' specs
- visited = set()
-
- any_change = self._normalize_helper(visited, all_spec_deps, provider_index, tests)
-
- # Mark the spec as normal once done.
- self._normal = True
- return any_change
-
- def normalized(self):
- """
- Return a normalized copy of this spec without modifying this spec.
- """
- clone = self.copy()
- clone.normalize()
- return clone
-
def validate_or_raise(self):
"""Checks that names and values in this spec are real. If they're not,
it will raise an appropriate exception.
@@ -3458,7 +3002,7 @@ class Spec:
# Ensure correctness of variants (if the spec is not virtual)
if not spec.virtual:
Spec.ensure_valid_variants(spec)
- vt.substitute_abstract_variants(spec)
+ substitute_abstract_variants(spec)
@staticmethod
def ensure_valid_variants(spec):
@@ -3475,50 +3019,19 @@ class Spec:
return
pkg_cls = spec.package_class
- pkg_variants = pkg_cls.variants
+ pkg_variants = pkg_cls.variant_names()
# reserved names are variants that may be set on any package
# but are not necessarily recorded by the package's class
+ propagate_variants = [name for name, variant in spec.variants.items() if variant.propagate]
+
not_existing = set(spec.variants) - (
- set(pkg_variants) | set(spack.directives.reserved_names)
+ set(pkg_variants) | set(vt.reserved_names) | set(propagate_variants)
)
- if not_existing:
- raise vt.UnknownVariantError(spec, not_existing)
-
- def update_variant_validate(self, variant_name, values):
- """If it is not already there, adds the variant named
- `variant_name` to the spec `spec` based on the definition
- contained in the package metadata. Validates the variant and
- values before returning.
-
- Used to add values to a variant without being sensitive to the
- variant being single or multi-valued. If the variant already
- exists on the spec it is assumed to be multi-valued and the
- values are appended.
-
- Args:
- variant_name: the name of the variant to add or append to
- values: the value or values (as a tuple) to add/append
- to the variant
- """
- if not isinstance(values, tuple):
- values = (values,)
-
- pkg_variant, _ = self.package_class.variants[variant_name]
-
- for value in values:
- if self.variants.get(variant_name):
- msg = (
- f"cannot append the new value '{value}' to the single-valued "
- f"variant '{self.variants[variant_name]}'"
- )
- assert pkg_variant.multi, msg
- self.variants[variant_name].append(value)
- else:
- variant = pkg_variant.make_variant(value)
- self.variants[variant_name] = variant
- pkg_cls = spack.repo.PATH.get_pkg_class(self.name)
- pkg_variant.validate_or_raise(self.variants[variant_name], pkg_cls)
+ if not_existing:
+ raise vt.UnknownVariantError(
+ f"No such variant {not_existing} for spec: '{spec}'", list(not_existing)
+ )
def constrain(self, other, deps=True):
"""Intersect self with other in-place. Return True if self changed, False otherwise.
@@ -3541,6 +3054,10 @@ class Spec:
raise spack.error.UnsatisfiableSpecError(self, other, "constrain a concrete spec")
other = self._autospec(other)
+ if other.concrete and other.satisfies(self):
+ self._dup(other)
+ return True
+
if other.abstract_hash:
if not self.abstract_hash or other.abstract_hash.startswith(self.abstract_hash):
self.abstract_hash = other.abstract_hash
@@ -3749,11 +3266,9 @@ class Spec:
return False
if pkg.provides(virtual_spec.name):
- for provided, when_specs in pkg.provided.items():
- if any(
- non_virtual_spec.intersects(when, deps=False) for when in when_specs
- ):
- if provided.intersects(virtual_spec):
+ for when_spec, provided in pkg.provided.items():
+ if non_virtual_spec.intersects(when_spec, deps=False):
+ if any(vpkg.intersects(virtual_spec) for vpkg in provided):
return True
return False
@@ -3856,9 +3371,9 @@ class Spec:
return False
if pkg.provides(other.name):
- for provided, when_specs in pkg.provided.items():
- if any(self.satisfies(when, deps=False) for when in when_specs):
- if provided.intersects(other):
+ for when_spec, provided in pkg.provided.items():
+ if self.satisfies(when_spec, deps=False):
+ if any(vpkg.intersects(other) for vpkg in provided):
return True
return False
@@ -3903,9 +3418,13 @@ class Spec:
if not self._dependencies:
return False
- # If we arrived here, then rhs is abstract. At the moment we don't care about the edge
- # structure of an abstract DAG, so we check if any edge could satisfy the properties
- # we ask for.
+ # If we arrived here, the lhs root node satisfies the rhs root node. Now we need to check
+ # all the edges that have an abstract parent, and verify that they match some edge in the
+ # lhs.
+ #
+ # It might happen that the rhs brings in concrete sub-DAGs. For those we don't need to
+ # verify the edge properties, cause everything is encoded in the hash of the nodes that
+ # will be verified later.
lhs_edges: Dict[str, Set[DependencySpec]] = collections.defaultdict(set)
for rhs_edge in other.traverse_edges(root=False, cover="edges"):
# If we are checking for ^mpi we need to verify if there is any edge
@@ -3915,6 +3434,10 @@ class Spec:
if not rhs_edge.virtuals:
continue
+ # Skip edges from a concrete sub-DAG
+ if rhs_edge.parent.concrete:
+ continue
+
if not lhs_edges:
# Construct a map of the link/run subDAG + direct "build" edges,
# keyed by dependency name
@@ -3973,7 +3496,7 @@ class Spec:
pkg_cls = spack.repo.PATH.get_pkg_class(self.name)
try:
patch = index.patch_for_package(sha256, pkg_cls)
- except spack.patch.PatchLookupError as e:
+ except spack.error.PatchLookupError as e:
raise spack.error.SpecError(
f"{e}. This usually means the patch was modified or removed. "
"To fix this, either reconcretize or use the original package "
@@ -4029,8 +3552,8 @@ class Spec:
self.architecture = other.architecture.copy() if other.architecture else None
self.compiler = other.compiler.copy() if other.compiler else None
if cleardeps:
- self._dependents = _EdgeMap(store_by=EdgeDirection.parent)
- self._dependencies = _EdgeMap(store_by=EdgeDirection.child)
+ self._dependents = _EdgeMap(store_by_child=False)
+ self._dependencies = _EdgeMap(store_by_child=True)
self.compiler_flags = other.compiler_flags.copy()
self.compiler_flags.spec = self
self.variants = other.variants.copy()
@@ -4134,7 +3657,7 @@ class Spec:
raise spack.error.SpecError("Spec version is not concrete: " + str(self))
return self.versions[0]
- def __getitem__(self, name):
+ def __getitem__(self, name: str):
"""Get a dependency from the spec by its name. This call implicitly
sets a query state in the package being retrieved. The behavior of
packages may be influenced by additional query parameters that are
@@ -4143,7 +3666,7 @@ class Spec:
Note that if a virtual package is queried a copy of the Spec is
returned while for non-virtual a reference is returned.
"""
- query_parameters = name.split(":")
+ query_parameters: List[str] = name.split(":")
if len(query_parameters) > 2:
raise KeyError("key has more than one ':' symbol. At most one is admitted.")
@@ -4154,38 +3677,30 @@ class Spec:
csv = query_parameters.pop().strip()
query_parameters = re.split(r"\s*,\s*", csv)
- # In some cases a package appears multiple times in the same DAG for *distinct*
- # specs. For example, a build-type dependency may itself depend on a package
- # the current spec depends on, but their specs may differ. Therefore we iterate
- # in an order here that prioritizes the build, test and runtime dependencies;
- # only when we don't find the package do we consider the full DAG.
order = lambda: itertools.chain(
- self.traverse(deptype="link"),
- self.dependencies(deptype=dt.BUILD | dt.RUN | dt.TEST),
- self.traverse(), # fall back to a full search
+ self.traverse_edges(deptype=dt.LINK, order="breadth", cover="edges"),
+ self.edges_to_dependencies(depflag=dt.BUILD | dt.RUN | dt.TEST),
+ self.traverse_edges(deptype=dt.ALL, order="breadth", cover="edges"),
)
+ # Consider runtime dependencies and direct build/test deps before transitive dependencies,
+ # and prefer matches closest to the root.
try:
- value = next(
- itertools.chain(
- # Regular specs
- (x for x in order() if x.name == name),
- (
- x
- for x in order()
- if (not x.virtual)
- and any(name in edge.virtuals for edge in x.edges_from_dependents())
- ),
- (x for x in order() if (not x.virtual) and x.package.provides(name)),
+ child: Spec = next(
+ e.spec
+ for e in itertools.chain(
+ (e for e in order() if e.spec.name == name or name in e.virtuals),
+ # for historical reasons
+ (e for e in order() if e.spec.concrete and e.spec.package.provides(name)),
)
)
except StopIteration:
raise KeyError(f"No spec with name {name} in {self}")
if self._concrete:
- return SpecBuildInterface(value, name, query_parameters)
+ return SpecBuildInterface(child, name, query_parameters, _parent=self)
- return value
+ return child
def __contains__(self, spec):
"""True if this spec or some dependency satisfies the spec.
@@ -4288,17 +3803,19 @@ class Spec:
yield deps
- def colorized(self):
- return colorize_spec(self)
+ @property
+ def namespace_if_anonymous(self):
+ return self.namespace if not self.name else None
+
+ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str:
+ r"""Prints out attributes of a spec according to a format string.
- def format(self, format_string=DEFAULT_FORMAT, **kwargs):
- r"""Prints out particular pieces of a spec, depending on what is
- in the format string.
+ Using an ``{attribute}`` format specifier, any field of the spec can be
+ selected. Those attributes can be recursive. For example,
+ ``s.format({compiler.version})`` will print the version of the compiler.
- Using the ``{attribute}`` syntax, any field of the spec can be
- selected. Those attributes can be recursive. For example,
- ``s.format({compiler.version})`` will print the version of the
- compiler.
+ If the attribute in a format specifier evaluates to ``None``, then the format
+ specifier will evaluate to the empty string, ``""``.
Commonly used attributes of the Spec for format strings include::
@@ -4314,6 +3831,7 @@ class Spec:
architecture.os
architecture.target
prefix
+ namespace
Some additional special-case properties can be added::
@@ -4322,198 +3840,165 @@ class Spec:
spack_install The spack install directory
The ``^`` sigil can be used to access dependencies by name.
- ``s.format({^mpi.name})`` will print the name of the MPI
- implementation in the spec.
+ ``s.format({^mpi.name})`` will print the name of the MPI implementation in the
+ spec.
- The ``@``, ``%``, ``arch=``, and ``/`` sigils
- can be used to include the sigil with the printed
- string. These sigils may only be used with the appropriate
- attributes, listed below::
+ The ``@``, ``%``, and ``/`` sigils can be used to include the sigil with the
+ printed string. These sigils may only be used with the appropriate attributes,
+ listed below::
@ ``{@version}``, ``{@compiler.version}``
% ``{%compiler}``, ``{%compiler.name}``
- arch= ``{arch=architecture}``
/ ``{/hash}``, ``{/hash:7}``, etc
- The ``@`` sigil may also be used for any other property named
- ``version``. Sigils printed with the attribute string are only
- printed if the attribute string is non-empty, and are colored
- according to the color of the attribute.
-
- Sigils are not used for printing variants. Variants listed by
- name naturally print with their sigil. For example,
- ``spec.format('{variants.debug}')`` would print either
- ``+debug`` or ``~debug`` depending on the name of the
- variant. Non-boolean variants print as ``name=value``. To
- print variant names or values independently, use
+ The ``@`` sigil may also be used for any other property named ``version``.
+ Sigils printed with the attribute string are only printed if the attribute
+ string is non-empty, and are colored according to the color of the attribute.
+
+ Variants listed by name naturally print with their sigil. For example,
+ ``spec.format('{variants.debug}')`` prints either ``+debug`` or ``~debug``
+ depending on the name of the variant. Non-boolean variants print as
+ ``name=value``. To print variant names or values independently, use
``spec.format('{variants.<name>.name}')`` or
``spec.format('{variants.<name>.value}')``.
- Spec format strings use ``\`` as the escape character. Use
- ``\{`` and ``\}`` for literal braces, and ``\\`` for the
- literal ``\`` character.
-
- Args:
- format_string (str): string containing the format to be expanded
+ There are a few attributes on specs that can be specified as key-value pairs
+ that are *not* variants, e.g.: ``os``, ``arch``, ``architecture``, ``target``,
+ ``namespace``, etc. You can format these with an optional ``key=`` prefix, e.g.
+ ``{namespace=namespace}`` or ``{arch=architecture}``, etc. The ``key=`` prefix
+ will be colorized along with the value.
- Keyword Args:
- color (bool): True if returned string is colored
- transform (dict): maps full-string formats to a callable \
- that accepts a string and returns another one
+ When formatting specs, key-value pairs are separated from preceding parts of the
+ spec by whitespace. To avoid printing extra whitespace when the formatted
+ attribute is not set, you can add whitespace to the key *inside* the braces of
+ the format string, e.g.:
- """
- color = kwargs.get("color", False)
- transform = kwargs.get("transform", {})
+ { namespace=namespace}
- out = io.StringIO()
+ This evaluates to `` namespace=builtin`` if ``namespace`` is set to ``builtin``,
+ and to ``""`` if ``namespace`` is ``None``.
- def write(s, c=None):
- f = clr.cescape(s)
- if c is not None:
- f = COLOR_FORMATS[c] + f + "@."
- clr.cwrite(f, stream=out, color=color)
+ Spec format strings use ``\`` as the escape character. Use ``\{`` and ``\}`` for
+ literal braces, and ``\\`` for the literal ``\`` character.
- def write_attribute(spec, attribute, color):
- attribute = attribute.lower()
+ Args:
+ format_string: string containing the format to be expanded
+ color: True for colorized result; False for no color; None for auto color.
- sig = ""
- if attribute.startswith(("@", "%", "/")):
- # color sigils that are inside braces
- sig = attribute[0]
- attribute = attribute[1:]
- elif attribute.startswith("arch="):
- sig = " arch=" # include space as separator
- attribute = attribute[5:]
-
- current = spec
- if attribute.startswith("^"):
- attribute = attribute[1:]
- dep, attribute = attribute.split(".", 1)
- current = self[dep]
+ """
+ ensure_modern_format_string(format_string)
+
+ def safe_color(sigil: str, string: str, color_fmt: Optional[str]) -> str:
+ # avoid colorizing if there is no color or the string is empty
+ if (color is False) or not color_fmt or not string:
+ return sigil + string
+ # escape and add the sigil here to avoid multiple concatenations
+ if sigil == "@":
+ sigil = "@@"
+ return clr.colorize(f"{color_fmt}{sigil}{clr.cescape(string)}@.", color=color)
+
+ def format_attribute(match_object: Match) -> str:
+ (esc, sig, dep, hash, hash_len, attribute, close_brace, unmatched_close_brace) = (
+ match_object.groups()
+ )
+ if esc:
+ return esc
+ elif unmatched_close_brace:
+ raise SpecFormatStringError(f"Unmatched close brace: '{format_string}'")
+ elif not close_brace:
+ raise SpecFormatStringError(f"Missing close brace: '{format_string}'")
+
+ current = self if dep is None else self[dep]
+
+ # Hash attributes can return early.
+ # NOTE: we currently treat abstract_hash like an attribute and ignore
+ # any length associated with it. We may want to change that.
+ if hash:
+ if sig and sig != "/":
+ raise SpecFormatSigilError(sig, "DAG hashes", hash)
+ try:
+ length = int(hash_len) if hash_len else None
+ except ValueError:
+ raise SpecFormatStringError(f"Invalid hash length: '{hash_len}'")
+ return safe_color(sig or "", current.dag_hash(length), HASH_COLOR)
if attribute == "":
raise SpecFormatStringError("Format string attributes must be non-empty")
+ attribute = attribute.lower()
parts = attribute.split(".")
assert parts
# check that the sigil is valid for the attribute.
- if sig == "@" and parts[-1] not in ("versions", "version"):
+ if not sig:
+ sig = ""
+ elif sig == "@" and parts[-1] not in ("versions", "version"):
raise SpecFormatSigilError(sig, "versions", attribute)
elif sig == "%" and attribute not in ("compiler", "compiler.name"):
raise SpecFormatSigilError(sig, "compilers", attribute)
- elif sig == "/" and not re.match(r"(abstract_)?hash(:\d+)?$", attribute):
+ elif sig == "/" and attribute != "abstract_hash":
raise SpecFormatSigilError(sig, "DAG hashes", attribute)
- elif sig == " arch=" and attribute not in ("architecture", "arch"):
- raise SpecFormatSigilError(sig, "the architecture", attribute)
-
- # find the morph function for our attribute
- morph = transform.get(attribute, lambda s, x: x)
-
- # Special cases for non-spec attributes and hashes.
- # These must be the only non-dep component of the format attribute
- if attribute == "spack_root":
- write(morph(spec, spack.paths.spack_root))
- return
- elif attribute == "spack_install":
- write(morph(spec, spack.store.STORE.layout.root))
- return
- elif re.match(r"hash(:\d)?", attribute):
- col = "#"
- if ":" in attribute:
- _, length = attribute.split(":")
- write(sig + morph(spec, current.dag_hash(int(length))), col)
- else:
- write(sig + morph(spec, current.dag_hash()), col)
- return
# Iterate over components using getattr to get next element
for idx, part in enumerate(parts):
if not part:
raise SpecFormatStringError("Format string attributes must be non-empty")
- if part.startswith("_"):
+ elif part.startswith("_"):
raise SpecFormatStringError("Attempted to format private attribute")
- else:
- if isinstance(current, vt.VariantMap):
- # subscript instead of getattr for variant names
+ elif isinstance(current, VariantMap):
+ # subscript instead of getattr for variant names
+ try:
current = current[part]
- else:
- # aliases
- if part == "arch":
- part = "architecture"
- elif part == "version":
- # version (singular) requires a concrete versions list. Avoid
- # pedantic errors by using versions (plural) when not concrete.
- # These two are not entirely equivalent for pkg@=1.2.3:
- # - version prints '1.2.3'
- # - versions prints '=1.2.3'
- if not current.versions.concrete:
- part = "versions"
- try:
- current = getattr(current, part)
- except AttributeError:
- parent = ".".join(parts[:idx])
- m = "Attempted to format attribute %s." % attribute
- m += "Spec %s has no attribute %s" % (parent, part)
- raise SpecFormatStringError(m)
- if isinstance(current, vn.VersionList):
- if current == vn.any_version:
- # We don't print empty version lists
- return
-
- if callable(current):
- raise SpecFormatStringError("Attempted to format callable object")
- if current is None:
- # We're not printing anything
- return
+ except KeyError:
+ raise SpecFormatStringError(f"Variant '{part}' does not exist")
+ else:
+ # aliases
+ if part == "arch":
+ part = "architecture"
+ elif part == "version" and not current.versions.concrete:
+ # version (singular) requires a concrete versions list. Avoid
+ # pedantic errors by using versions (plural) when not concrete.
+ # These two are not entirely equivalent for pkg@=1.2.3:
+ # - version prints '1.2.3'
+ # - versions prints '=1.2.3'
+ part = "versions"
+ try:
+ current = getattr(current, part)
+ except AttributeError:
+ raise SpecFormatStringError(
+ f"Attempted to format attribute {attribute}. "
+ f"Spec {'.'.join(parts[:idx])} has no attribute {part}"
+ )
+ if isinstance(current, vn.VersionList) and current == vn.any_version:
+ # don't print empty version lists
+ return ""
+
+ if callable(current):
+ raise SpecFormatStringError("Attempted to format callable object")
+
+ if current is None:
+ # not printing anything
+ return ""
# Set color codes for various attributes
- col = None
- if "variants" in parts:
- col = "+"
- elif "architecture" in parts:
- col = "="
+ color = None
+ if "architecture" in parts:
+ color = ARCHITECTURE_COLOR
+ elif "variants" in parts or sig.endswith("="):
+ color = VARIANT_COLOR
elif "compiler" in parts or "compiler_flags" in parts:
- col = "%"
+ color = COMPILER_COLOR
elif "version" in parts or "versions" in parts:
- col = "@"
-
- # Finally, write the output
- write(sig + morph(spec, str(current)), col)
-
- attribute = ""
- in_attribute = False
- escape = False
-
- for c in format_string:
- if escape:
- out.write(c)
- escape = False
- elif c == "\\":
- escape = True
- elif in_attribute:
- if c == "}":
- write_attribute(self, attribute, color)
- attribute = ""
- in_attribute = False
- else:
- attribute += c
- else:
- if c == "}":
- raise SpecFormatStringError(
- "Encountered closing } before opening { in %s" % format_string
- )
- elif c == "{":
- in_attribute = True
- else:
- out.write(c)
- if in_attribute:
- raise SpecFormatStringError(
- "Format string terminated while reading attribute." "Missing terminating }."
- )
+ color = VERSION_COLOR
+
+ # return empty string if the value of the attribute is None.
+ if current is None:
+ return ""
+
+ # return colored output
+ return safe_color(sig, str(current), color)
- formatted_spec = out.getvalue()
- return formatted_spec.strip()
+ return SPEC_FORMAT_RE.sub(format_attribute, format_string).strip()
def cformat(self, *args, **kwargs):
"""Same as format, but color defaults to auto instead of False."""
@@ -4521,6 +4006,16 @@ class Spec:
kwargs.setdefault("color", None)
return self.format(*args, **kwargs)
+ @property
+ def spack_root(self):
+ """Special field for using ``{spack_root}`` in Spec.format()."""
+ return spack.paths.spack_root
+
+ @property
+ def spack_install(self):
+ """Special field for using ``{spack_install}`` in Spec.format()."""
+ return spack.store.STORE.layout.root
+
def format_path(
# self, format_string: str, _path_ctor: Optional[pathlib.PurePath] = None
self,
@@ -4546,18 +4041,31 @@ class Spec:
path_ctor = _path_ctor or pathlib.PurePath
format_string_as_path = path_ctor(format_string)
- if format_string_as_path.is_absolute():
+ if format_string_as_path.is_absolute() or (
+ # Paths that begin with a single "\" on windows are relative, but we still
+ # want to preserve the initial "\\" to be consistent with PureWindowsPath.
+ # Ensure that this '\' is not passed to polite_filename() so it's not converted to '_'
+ (os.name == "nt" or path_ctor == pathlib.PureWindowsPath)
+ and format_string_as_path.parts[0] == "\\"
+ ):
output_path_components = [format_string_as_path.parts[0]]
input_path_components = list(format_string_as_path.parts[1:])
else:
output_path_components = []
input_path_components = list(format_string_as_path.parts)
+
output_path_components += [
- fs.polite_filename(self.format(x)) for x in input_path_components
+ fs.polite_filename(self.format(part)) for part in input_path_components
]
return str(path_ctor(*output_path_components))
def __str__(self):
+ if self._concrete:
+ return self.format("{name}{@version}{/hash}")
+
+ if not self._dependencies:
+ return self.format()
+
root_str = [self.format()]
sorted_dependencies = sorted(
self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash)
@@ -4580,7 +4088,7 @@ class Spec:
spec_str = " ^".join(root_str + sorted_dependencies)
return spec_str.strip()
- def install_status(self):
+ def install_status(self) -> InstallStatus:
"""Helper for tree to print DB install status."""
if not self.concrete:
return InstallStatus.absent
@@ -4624,13 +4132,14 @@ class Spec:
recurse_dependencies: bool = True,
status_fn: Optional[Callable[["Spec"], InstallStatus]] = None,
prefix: Optional[Callable[["Spec"], str]] = None,
+ key=id,
) -> str:
- """Prints out this spec and its dependencies, tree-formatted
- with indentation.
+ """Prints out this spec and its dependencies, tree-formatted with indentation.
- Status function may either output a boolean or an InstallStatus
+ See multi-spec ``spack.spec.tree()`` function for details.
Args:
+ specs: List of specs to format.
color: if True, always colorize the tree. If False, don't colorize the tree. If None,
use the default from llnl.tty.color
depth: print the depth from the root
@@ -4648,60 +4157,23 @@ class Spec:
prefix: optional callable that takes a node as an argument and return its
installation prefix
"""
- out = ""
-
- if color is None:
- color = clr.get_color_when()
-
- for d, dep_spec in traverse.traverse_tree(
- [self], cover=cover, deptype=deptypes, depth_first=depth_first
- ):
- node = dep_spec.spec
-
- if prefix is not None:
- out += prefix(node)
- out += " " * indent
-
- if depth:
- out += "%-4d" % d
-
- if status_fn:
- status = status_fn(node)
- if status in list(InstallStatus):
- out += clr.colorize(status.value, color=color)
- elif status:
- out += clr.colorize("@g{[+]} ", color=color)
- else:
- out += clr.colorize("@r{[-]} ", color=color)
-
- if hashes:
- out += clr.colorize("@K{%s} ", color=color) % node.dag_hash(hashlen)
-
- if show_types:
- if cover == "nodes":
- # when only covering nodes, we merge dependency types
- # from all dependents before showing them.
- depflag = 0
- for ds in node.edges_from_dependents():
- depflag |= ds.depflag
- else:
- # when covering edges or paths, we show dependency
- # types only for the edge through which we visited
- depflag = dep_spec.depflag
-
- type_chars = dt.flag_to_chars(depflag)
- out += "[%s] " % type_chars
-
- out += " " * d
- if d > 0:
- out += "^"
- out += node.format(format, color=color) + "\n"
-
- # Check if we wanted just the first line
- if not recurse_dependencies:
- break
-
- return out
+ return tree(
+ [self],
+ color=color,
+ depth=depth,
+ hashes=hashes,
+ hashlen=hashlen,
+ cover=cover,
+ indent=indent,
+ format=format,
+ deptypes=deptypes,
+ show_types=show_types,
+ depth_first=depth_first,
+ recurse_dependencies=recurse_dependencies,
+ status_fn=status_fn,
+ prefix=prefix,
+ key=key,
+ )
def __repr__(self):
return str(self)
@@ -4716,9 +4188,7 @@ class Spec:
@property
def target(self):
- # This property returns the underlying microarchitecture object
- # to give to the attribute the appropriate comparison semantic
- return self.architecture.target.microarchitecture
+ return self.architecture.target
@property
def build_spec(self):
@@ -4742,156 +4212,247 @@ class Spec:
new_dependencies.add(edge)
spec._dependencies = new_dependencies
- def splice(self, other, transitive):
- """Splices dependency "other" into this ("target") Spec, and return the
- result as a concrete Spec.
- If transitive, then other and its dependencies will be extrapolated to
- a list of Specs and spliced in accordingly.
- For example, let there exist a dependency graph as follows:
- T
- | \
- Z<-H
- In this example, Spec T depends on H and Z, and H also depends on Z.
- Suppose, however, that we wish to use a different H, known as H'. This
- function will splice in the new H' in one of two ways:
- 1. transitively, where H' depends on the Z' it was built with, and the
- new T* also directly depends on this new Z', or
- 2. intransitively, where the new T* and H' both depend on the original
- Z.
- Since the Spec returned by this splicing function is no longer deployed
- the same way it was built, any such changes are tracked by setting the
- build_spec to point to the corresponding dependency from the original
- Spec.
- TODO: Extend this for non-concrete Specs.
+ def _virtuals_provided(self, root):
+ """Return set of virtuals provided by self in the context of root"""
+ if root is self:
+ # Could be using any virtual the package can provide
+ return set(v.name for v in self.package.virtuals_provided)
+
+ hashes = [s.dag_hash() for s in root.traverse()]
+ in_edges = set(
+ [edge for edge in self.edges_from_dependents() if edge.parent.dag_hash() in hashes]
+ )
+ return set().union(*[edge.virtuals for edge in in_edges])
+
+ def _splice_match(self, other, self_root, other_root):
+ """Return True if other is a match for self in a splice of other_root into self_root
+
+ Other is a splice match for self if it shares a name, or if self is a virtual provider
+ and other provides a superset of the virtuals provided by self. Virtuals provided are
+ evaluated in the context of a root spec (self_root for self, other_root for other).
+
+ This is a slight oversimplification. Other could be a match for self in the context of
+ one edge in self_root and not in the context of another edge. This method could be
+ expanded in the future to account for these cases.
"""
- assert self.concrete
- assert other.concrete
+ if other.name == self.name:
+ return True
- virtuals_to_replace = [v.name for v in other.package.virtuals_provided if v in self]
- if virtuals_to_replace:
- deps_to_replace = dict((self[v], other) for v in virtuals_to_replace)
- # deps_to_replace = [self[v] for v in virtuals_to_replace]
- else:
- # TODO: sanity check and error raise here for other.name not in self
- deps_to_replace = {self[other.name]: other}
- # deps_to_replace = [self[other.name]]
+ return bool(
+ bool(self._virtuals_provided(self_root))
+ and self._virtuals_provided(self_root) <= other._virtuals_provided(other_root)
+ )
- for d in deps_to_replace:
- if not all(
- v in other.package.virtuals_provided or v not in self
- for v in d.package.virtuals_provided
- ):
- # There was something provided by the original that we don't
- # get from its replacement.
- raise SpliceError(
- ("Splice between {0} and {1} will not provide " "the same virtuals.").format(
- self.name, other.name
- )
- )
- for n in d.traverse(root=False):
- if not all(
- any(
- v in other_n.package.virtuals_provided
- for other_n in other.traverse(root=False)
- )
- or v not in self
- for v in n.package.virtuals_provided
- ):
- raise SpliceError(
- (
- "Splice between {0} and {1} will not provide " "the same virtuals."
- ).format(self.name, other.name)
- )
+ def _splice_detach_and_add_dependents(self, replacement, context):
+ """Helper method for Spec._splice_helper.
+
+ replacement is a node to splice in, context is the scope of dependents to consider relevant
+ to this splice."""
+ # Update build_spec attributes for all transitive dependents
+ # before we start changing their dependencies
+ ancestors_in_context = [
+ a
+ for a in self.traverse(root=False, direction="parents")
+ if a in context.traverse(deptype=dt.LINK | dt.RUN)
+ ]
+ for ancestor in ancestors_in_context:
+ # Only set it if it hasn't been spliced before
+ ancestor._build_spec = ancestor._build_spec or ancestor.copy()
+ ancestor.clear_caches(ignore=(ht.package_hash.attr,))
+ for edge in ancestor.edges_to_dependencies(depflag=dt.BUILD):
+ if edge.depflag & ~dt.BUILD:
+ edge.depflag &= ~dt.BUILD
+ else:
+ ancestor._dependencies[edge.spec.name].remove(edge)
+ edge.spec._dependents[ancestor.name].remove(edge)
- # For now, check that we don't have DAG with multiple specs from the
- # same package
- def multiple_specs(root):
- counter = collections.Counter([node.name for node in root.traverse()])
- _, max_number = counter.most_common()[0]
- return max_number > 1
-
- if multiple_specs(self) or multiple_specs(other):
- msg = (
- 'Either "{0}" or "{1}" contain multiple specs from the same '
- "package, which cannot be handled by splicing at the moment"
- )
- raise ValueError(msg.format(self, other))
+ # For each direct dependent in the link/run graph, replace the dependency on
+ # node with one on replacement
+ for edge in self.edges_from_dependents():
+ if edge.parent not in ancestors_in_context:
+ continue
- # Multiple unique specs with the same name will collide, so the
- # _dependents of these specs should not be trusted.
- # Variants may also be ignored here for now...
+ edge.parent._dependencies.edges[self.name].remove(edge)
+ self._dependents.edges[edge.parent.name].remove(edge)
+ edge.parent._add_dependency(replacement, depflag=edge.depflag, virtuals=edge.virtuals)
- # Keep all cached hashes because we will invalidate the ones that need
- # invalidating later, and we don't want to invalidate unnecessarily
+ def _splice_helper(self, replacement):
+ """Main loop of a transitive splice.
- def from_self(name, transitive):
- if transitive:
- if name in other:
- return False
- if any(v in other for v in self[name].package.virtuals_provided):
- return False
- return True
- else:
- if name == other.name:
- return False
- if any(
- v in other.package.virtuals_provided
- for v in self[name].package.virtuals_provided
- ):
- return False
- return True
+ The while loop around a traversal of self ensures that changes to self from previous
+ iterations are reflected in the traversal. This avoids evaluating irrelevant nodes
+ using topological traversal (all incoming edges traversed before any outgoing edge).
+ If any node will not be in the end result, its parent will be spliced and it will not
+ ever be considered.
+ For each node in self, find any analogous node in replacement and swap it in.
+ We assume all build deps are handled outside of this method
- self_nodes = dict(
- (s.name, s.copy(deps=False))
- for s in self.traverse(root=True)
- if from_self(s.name, transitive)
- )
+ Arguments:
+ replacement: The node that will replace any equivalent node in self
+ self_root: The root of the spec that self comes from. This provides the context for
+ evaluating whether ``replacement`` is a match for each node of ``self``. See
+ ``Spec._splice_match`` and ``Spec._virtuals_provided`` for details.
+ other_root: The root of the spec that replacement comes from. This provides the context
+ for evaluating whether ``replacement`` is a match for each node of ``self``. See
+ ``Spec._splice_match`` and ``Spec._virtuals_provided`` for details.
+ """
+ ids = set(id(s) for s in replacement.traverse())
- if transitive:
- other_nodes = dict((s.name, s.copy(deps=False)) for s in other.traverse(root=True))
- else:
- # NOTE: Does not fully validate providers; loader races possible
- other_nodes = dict(
- (s.name, s.copy(deps=False))
- for s in other.traverse(root=True)
- if s is other or s.name not in self
- )
+ # Sort all possible replacements by name and virtual for easy access later
+ replacements_by_name = collections.defaultdict(list)
+ for node in replacement.traverse():
+ replacements_by_name[node.name].append(node)
+ virtuals = node._virtuals_provided(root=replacement)
+ for virtual in virtuals:
+ replacements_by_name[virtual].append(node)
- nodes = other_nodes.copy()
- nodes.update(self_nodes)
+ changed = True
+ while changed:
+ changed = False
- for name in nodes:
- if name in self_nodes:
- for edge in self[name].edges_to_dependencies():
- dep_name = deps_to_replace.get(edge.spec, edge.spec).name
- nodes[name].add_dependency_edge(
- nodes[dep_name], depflag=edge.depflag, virtuals=edge.virtuals
- )
- if any(dep not in self_nodes for dep in self[name]._dependencies):
- nodes[name].build_spec = self[name].build_spec
- else:
- for edge in other[name].edges_to_dependencies():
- nodes[name].add_dependency_edge(
- nodes[edge.spec.name], depflag=edge.depflag, virtuals=edge.virtuals
- )
- if any(dep not in other_nodes for dep in other[name]._dependencies):
- nodes[name].build_spec = other[name].build_spec
+ # Intentionally allowing traversal to change on each iteration
+ # using breadth-first traversal to ensure we only reach nodes that will
+ # be in final result
+ for node in self.traverse(root=False, order="topo", deptype=dt.ALL & ~dt.BUILD):
+ # If this node has already been swapped in, don't consider it again
+ if id(node) in ids:
+ continue
+
+ analogs = replacements_by_name[node.name]
+ if not analogs:
+ # If we have to check for matching virtuals, then we need to check that it
+ # matches all virtuals. Use `_splice_match` to validate possible matches
+ for virtual in node._virtuals_provided(root=self):
+ analogs += [
+ r
+ for r in replacements_by_name[virtual]
+ if node._splice_match(r, self_root=self, other_root=replacement)
+ ]
+
+ # No match, keep iterating over self
+ if not analogs:
+ continue
+
+ # If there are multiple analogs, this package must satisfy the constraint
+ # that a newer version can always replace a lesser version.
+ analog = max(analogs, key=lambda s: s.version)
+
+ # No splice needed here, keep checking
+ if analog == node:
+ continue
+
+ node._splice_detach_and_add_dependents(analog, context=self)
+ changed = True
+ break
- ret = nodes[self.name]
+ def splice(self, other: "Spec", transitive: bool = True) -> "Spec":
+ """Returns a new, spliced concrete Spec with the "other" dependency and,
+ optionally, its dependencies.
- # 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()):
- # package hash cannot be affected by splice
- dep.clear_cached_hashes(ignore=["package_hash"])
+ Args:
+ other: alternate dependency
+ transitive: include other's dependencies
+
+ Returns: a concrete, spliced version of the current Spec
+
+ When transitive is "True", use the dependencies from "other" to reconcile
+ conflicting dependencies. When transitive is "False", use dependencies from self.
+
+ For example, suppose we have the following dependency graph:
+
+ T
+ | \
+ Z<-H
- dep.dag_hash()
+ Spec T depends on H and Z, and H also depends on Z. Now we want to use
+ a different H, called H'. This function can be used to splice in H' to
+ create a new spec, called T*. If H' was built with Z', then transitive
+ "True" will ensure H' and T* both depend on Z':
- return nodes[self.name]
+ T*
+ | \
+ Z'<-H'
- def clear_cached_hashes(self, ignore=()):
+ If transitive is "False", then H' and T* will both depend on
+ the original Z, resulting in a new H'*
+
+ T*
+ | \
+ Z<-H'*
+
+ Provenance of the build is tracked through the "build_spec" property
+ of the spliced spec and any correspondingly modified dependency specs.
+ The build specs are set to that of the original spec, so the original
+ spec's provenance is preserved unchanged."""
+ assert self.concrete
+ assert other.concrete
+
+ if self._splice_match(other, self_root=self, other_root=other):
+ return other.copy()
+
+ if not any(
+ node._splice_match(other, self_root=self, other_root=other)
+ for node in self.traverse(root=False, deptype=dt.LINK | dt.RUN)
+ ):
+ other_str = other.format("{name}/{hash:7}")
+ self_str = self.format("{name}/{hash:7}")
+ msg = f"Cannot splice {other_str} into {self_str}."
+ msg += f" Either {self_str} cannot depend on {other_str},"
+ msg += f" or {other_str} fails to provide a virtual used in {self_str}"
+ raise SpliceError(msg)
+
+ # Copies of all non-build deps, build deps will get added at the end
+ spec = self.copy(deps=dt.ALL & ~dt.BUILD)
+ replacement = other.copy(deps=dt.ALL & ~dt.BUILD)
+
+ def make_node_pairs(orig_spec, copied_spec):
+ return list(
+ zip(
+ orig_spec.traverse(deptype=dt.ALL & ~dt.BUILD),
+ copied_spec.traverse(deptype=dt.ALL & ~dt.BUILD),
+ )
+ )
+
+ def mask_build_deps(in_spec):
+ for edge in in_spec.traverse_edges(cover="edges"):
+ edge.depflag &= ~dt.BUILD
+
+ if transitive:
+ # These pairs will allow us to reattach all direct build deps
+ # We need the list of pairs while the two specs still match
+ node_pairs = make_node_pairs(self, spec)
+
+ # Ignore build deps in the modified spec while doing the splice
+ # They will be added back in at the end
+ mask_build_deps(spec)
+
+ # Transitively splice any relevant nodes from new into base
+ # This handles all shared dependencies between self and other
+ spec._splice_helper(replacement)
+ else:
+ # Do the same thing as the transitive splice, but reversed
+ node_pairs = make_node_pairs(other, replacement)
+ mask_build_deps(replacement)
+ replacement._splice_helper(spec)
+
+ # Intransitively splice replacement into spec
+ # This is very simple now that all shared dependencies have been handled
+ for node in spec.traverse(order="topo", deptype=dt.LINK | dt.RUN):
+ if node._splice_match(other, self_root=spec, other_root=other):
+ node._splice_detach_and_add_dependents(replacement, context=spec)
+
+ # For nodes that were spliced, modify the build spec to ensure build deps are preserved
+ # For nodes that were not spliced, replace the build deps on the spec itself
+ for orig, copy in node_pairs:
+ if copy._build_spec:
+ copy._build_spec = orig.build_spec.copy()
+ else:
+ for edge in orig.edges_to_dependencies(depflag=dt.BUILD):
+ copy._add_dependency(edge.spec, depflag=dt.BUILD, virtuals=edge.virtuals)
+
+ return spec
+
+ def clear_caches(self, ignore=()):
"""
Clears all cached hashes in a Spec, while preserving other properties.
"""
@@ -4899,7 +4460,9 @@ class Spec:
if h.attr not in ignore:
if hasattr(self, h.attr):
setattr(self, h.attr, None)
- self._dunder_hash = None
+ for attr in ("_dunder_hash", "_prefix"):
+ if attr not in ignore:
+ setattr(self, attr, None)
def __hash__(self):
# If the spec is concrete, we leverage the process hash and just use
@@ -4933,9 +4496,237 @@ class Spec:
v.attach_lookup(spack.version.git_ref_lookup.GitRefLookup(self.fullname))
-def parse_with_version_concrete(string: str, compiler: bool = False):
+class VariantMap(lang.HashableMap):
+ """Map containing variant instances. New values can be added only
+ if the key is not already present."""
+
+ def __init__(self, spec: Spec):
+ super().__init__()
+ self.spec = spec
+
+ def __setitem__(self, name, vspec):
+ # Raise a TypeError if vspec is not of the right type
+ if not isinstance(vspec, vt.AbstractVariant):
+ raise TypeError(
+ "VariantMap accepts only values of variant types "
+ f"[got {type(vspec).__name__} instead]"
+ )
+
+ # Raise an error if the variant was already in this map
+ if name in self.dict:
+ msg = 'Cannot specify variant "{0}" twice'.format(name)
+ raise vt.DuplicateVariantError(msg)
+
+ # Raise an error if name and vspec.name don't match
+ if name != vspec.name:
+ raise KeyError(
+ f'Inconsistent key "{name}", must be "{vspec.name}" to ' "match VariantSpec"
+ )
+
+ # Set the item
+ super().__setitem__(name, vspec)
+
+ def substitute(self, vspec):
+ """Substitutes the entry under ``vspec.name`` with ``vspec``.
+
+ Args:
+ vspec: variant spec to be substituted
+ """
+ if vspec.name not in self:
+ raise KeyError(f"cannot substitute a key that does not exist [{vspec.name}]")
+
+ # Set the item
+ super().__setitem__(vspec.name, vspec)
+
+ def partition_variants(self):
+ non_prop, prop = lang.stable_partition(self.values(), lambda x: not x.propagate)
+ # Just return the names
+ non_prop = [x.name for x in non_prop]
+ prop = [x.name for x in prop]
+ return non_prop, prop
+
+ def satisfies(self, other: "VariantMap") -> bool:
+ if self.spec.concrete:
+ return self._satisfies_when_self_concrete(other)
+ return self._satisfies_when_self_abstract(other)
+
+ def _satisfies_when_self_concrete(self, other: "VariantMap") -> bool:
+ non_propagating, propagating = other.partition_variants()
+ result = all(
+ name in self and self[name].satisfies(other[name]) for name in non_propagating
+ )
+ if not propagating:
+ return result
+
+ for node in self.spec.traverse():
+ if not all(
+ node.variants[name].satisfies(other[name])
+ for name in propagating
+ if name in node.variants
+ ):
+ return False
+ return result
+
+ def _satisfies_when_self_abstract(self, other: "VariantMap") -> bool:
+ other_non_propagating, other_propagating = other.partition_variants()
+ self_non_propagating, self_propagating = self.partition_variants()
+
+ # First check variants without propagation set
+ result = all(
+ name in self_non_propagating
+ and (self[name].propagate or self[name].satisfies(other[name]))
+ for name in other_non_propagating
+ )
+ if result is False or (not other_propagating and not self_propagating):
+ return result
+
+ # Check that self doesn't contradict variants propagated by other
+ if other_propagating:
+ for node in self.spec.traverse():
+ if not all(
+ node.variants[name].satisfies(other[name])
+ for name in other_propagating
+ if name in node.variants
+ ):
+ return False
+
+ # Check that other doesn't contradict variants propagated by self
+ if self_propagating:
+ for node in other.spec.traverse():
+ if not all(
+ node.variants[name].satisfies(self[name])
+ for name in self_propagating
+ if name in node.variants
+ ):
+ return False
+
+ return result
+
+ def intersects(self, other):
+ return all(self[k].intersects(other[k]) for k in other if k in self)
+
+ def constrain(self, other: "VariantMap") -> bool:
+ """Add all variants in other that aren't in self to self. Also constrain all multi-valued
+ variants that are already present. Return True iff self changed"""
+ if other.spec is not None and other.spec._concrete:
+ for k in self:
+ if k not in other:
+ raise vt.UnsatisfiableVariantSpecError(self[k], "<absent>")
+
+ changed = False
+ for k in other:
+ if k in self:
+ # If they are not compatible raise an error
+ if not self[k].compatible(other[k]):
+ raise vt.UnsatisfiableVariantSpecError(self[k], other[k])
+ # If they are compatible merge them
+ changed |= self[k].constrain(other[k])
+ else:
+ # If it is not present copy it straight away
+ self[k] = other[k].copy()
+ changed = True
+
+ return changed
+
+ @property
+ def concrete(self):
+ """Returns True if the spec is concrete in terms of variants.
+
+ Returns:
+ bool: True or False
+ """
+ return self.spec._concrete or all(
+ v in self for v in self.spec.package_class.variant_names()
+ )
+
+ def copy(self) -> "VariantMap":
+ clone = VariantMap(self.spec)
+ for name, variant in self.items():
+ clone[name] = variant.copy()
+ return clone
+
+ def __str__(self):
+ if not self:
+ return ""
+
+ # print keys in order
+ sorted_keys = sorted(self.keys())
+
+ # Separate boolean variants from key-value pairs as they print
+ # differently. All booleans go first to avoid ' ~foo' strings that
+ # break spec reuse in zsh.
+ bool_keys = []
+ kv_keys = []
+ for key in sorted_keys:
+ bool_keys.append(key) if isinstance(self[key].value, bool) else kv_keys.append(key)
+
+ # add spaces before and after key/value variants.
+ string = io.StringIO()
+
+ for key in bool_keys:
+ string.write(str(self[key]))
+
+ for key in kv_keys:
+ string.write(" ")
+ string.write(str(self[key]))
+
+ return string.getvalue()
+
+
+def substitute_abstract_variants(spec: Spec):
+ """Uses the information in `spec.package` to turn any variant that needs
+ it into a SingleValuedVariant or BoolValuedVariant.
+
+ This method is best effort. All variants that can be substituted will be
+ substituted before any error is raised.
+
+ Args:
+ spec: spec on which to operate the substitution
+ """
+ # This method needs to be best effort so that it works in matrix exclusion
+ # in $spack/lib/spack/spack/spec_list.py
+ unknown = []
+ for name, v in spec.variants.items():
+ if name == "dev_path":
+ spec.variants.substitute(vt.SingleValuedVariant(name, v._original_value))
+ continue
+ elif name in vt.reserved_names:
+ continue
+
+ variant_defs = spec.package_class.variant_definitions(name)
+ valid_defs = []
+ for when, vdef in variant_defs:
+ if when.intersects(spec):
+ valid_defs.append(vdef)
+
+ if not valid_defs:
+ if name not in spec.package_class.variant_names():
+ unknown.append(name)
+ else:
+ whens = [str(when) for when, _ in variant_defs]
+ raise InvalidVariantForSpecError(v.name, f"({', '.join(whens)})", spec)
+ continue
+
+ pkg_variant, *rest = valid_defs
+ if rest:
+ continue
+
+ new_variant = pkg_variant.make_variant(v._original_value)
+ pkg_variant.validate_or_raise(new_variant, spec.name)
+ spec.variants.substitute(new_variant)
+
+ if unknown:
+ variants = llnl.string.plural(len(unknown), "variant")
+ raise vt.UnknownVariantError(
+ f"Tried to set {variants} {llnl.string.comma_and(unknown)}. "
+ f"{spec.name} has no such {variants}",
+ unknown_variants=unknown,
+ )
+
+
+def parse_with_version_concrete(spec_like: Union[str, Spec], compiler: bool = False):
"""Same as Spec(string), but interprets @x as @=x"""
- s: Union[CompilerSpec, Spec] = CompilerSpec(string) if compiler else Spec(string)
+ s: Union[CompilerSpec, Spec] = CompilerSpec(spec_like) if compiler else Spec(spec_like)
interpreted_version = s.versions.concrete_range_as_version
if interpreted_version:
s.versions = vn.VersionList([interpreted_version])
@@ -4953,7 +4744,7 @@ def merge_abstract_anonymous_specs(*abstract_specs: Spec):
Args:
*abstract_specs: abstract specs to be merged
"""
- merged_spec = spack.spec.Spec()
+ merged_spec = Spec()
for current_spec_constraint in abstract_specs:
merged_spec.constrain(current_spec_constraint, deps=False)
@@ -5022,13 +4813,17 @@ class SpecfileReaderBase:
else:
spec.compiler = None
+ propagated_names = node.get("propagate", [])
for name, values in node.get("parameters", {}).items():
+ propagate = name in propagated_names
if name in _valid_compiler_flags:
spec.compiler_flags[name] = []
for val in values:
- spec.compiler_flags.add_flag(name, val, False)
+ spec.compiler_flags.add_flag(name, val, propagate)
else:
- spec.variants[name] = vt.MultiValuedVariant.from_node_dict(name, values)
+ spec.variants[name] = vt.MultiValuedVariant.from_node_dict(
+ name, values, propagate=propagate
+ )
spec.external_path = None
spec.external_modules = None
@@ -5119,11 +4914,15 @@ class SpecfileReaderBase:
virtuals=virtuals,
)
if "build_spec" in node.keys():
- _, bhash, _ = cls.build_spec_from_node_dict(node, hash_type=hash_type)
+ _, bhash, _ = cls.extract_build_spec_info_from_node_dict(node, hash_type=hash_type)
node_spec._build_spec = hash_dict[bhash]["node_spec"]
return hash_dict[root_spec_hash]["node_spec"]
+ @classmethod
+ def read_specfile_dep_specs(cls, deps, hash_type=ht.dag_hash.name):
+ raise NotImplementedError("Subclasses must implement this method.")
+
class SpecfileV1(SpecfileReaderBase):
@classmethod
@@ -5243,7 +5042,7 @@ class SpecfileV2(SpecfileReaderBase):
return dep_hash, deptypes, hash_type, virtuals
@classmethod
- def build_spec_from_node_dict(cls, node, hash_type=ht.dag_hash.name):
+ def extract_build_spec_info_from_node_dict(cls, node, hash_type=ht.dag_hash.name):
build_spec_dict = node["build_spec"]
return build_spec_dict["name"], build_spec_dict[hash_type], hash_type
@@ -5304,7 +5103,6 @@ def get_host_environment_metadata() -> Dict[str, str]:
"""Get the host environment, reduce to a subset that we can store in
the install directory, and add the spack version.
"""
- import spack.main
environ = get_host_environment()
return {
@@ -5312,7 +5110,7 @@ def get_host_environment_metadata() -> Dict[str, str]:
"platform": environ["platform"],
"host_target": environ["target"],
"hostname": environ["hostname"],
- "spack_version": spack.main.get_version(),
+ "spack_version": spack.get_version(),
"kernel_version": platform.version(),
}
@@ -5356,10 +5154,17 @@ class SpecParseError(spack.error.SpecError):
)
-class ArchitecturePropagationError(spack.error.SpecError):
- """Raised when the double equal symbols are used to assign
- the spec's architecture.
- """
+class InvalidVariantForSpecError(spack.error.SpecError):
+ """Raised when an invalid conditional variant is specified."""
+
+ def __init__(self, variant, when, spec):
+ msg = f"Invalid variant {variant} for spec {spec}.\n"
+ msg += f"{variant} is only available for {spec.name} when satisfying one of {when}."
+ super().__init__(msg)
+
+
+class UnsupportedPropagationError(spack.error.SpecError):
+ """Raised when propagation (==) is used with reserved variant names."""
class DuplicateDependencyError(spack.error.SpecError):
@@ -5440,7 +5245,7 @@ class UnsatisfiableVersionSpecError(spack.error.UnsatisfiableSpecError):
class UnsatisfiableCompilerSpecError(spack.error.UnsatisfiableSpecError):
- """Raised when a spec comiler conflicts with package constraints."""
+ """Raised when a spec compiler conflicts with package constraints."""
def __init__(self, provided, required):
super().__init__(provided, required, "compiler")
@@ -5489,7 +5294,7 @@ class UnconstrainableDependencySpecError(spack.error.SpecError):
class AmbiguousHashError(spack.error.SpecError):
def __init__(self, msg, *specs):
spec_fmt = "{namespace}.{name}{@version}{%compiler}{compiler_flags}"
- spec_fmt += "{variants}{arch=architecture}{/hash:7}"
+ spec_fmt += "{variants}{ arch=architecture}{/hash:7}"
specs_str = "\n " + "\n ".join(spec.format(spec_fmt) for spec in specs)
super().__init__(msg + specs_str)
diff --git a/lib/spack/spack/spec_list.py b/lib/spack/spack/spec_list.py
index 7f9efdfa59..e62b2608dc 100644
--- a/lib/spack/spack/spec_list.py
+++ b/lib/spack/spack/spec_list.py
@@ -5,6 +5,7 @@
import itertools
from typing import List
+import spack.spec
import spack.variant
from spack.error import SpackError
from spack.spec import Spec
@@ -107,6 +108,20 @@ class SpecList:
self._constraints = None
self._specs = None
+ def replace(self, idx: int, spec: str):
+ """Replace the existing spec at the index with the new one.
+
+ Args:
+ idx: index of the spec to replace in the speclist
+ spec: new spec
+ """
+ self.yaml_list[idx] = spec
+
+ # invalidate cache variables when we change the list
+ self._expanded_list = None
+ self._constraints = None
+ self._specs = None
+
def extend(self, other, copy_reference=True):
self.yaml_list.extend(other.yaml_list)
self._expanded_list = None
@@ -148,6 +163,7 @@ class SpecList:
if isinstance(item, str) and item.startswith("$"):
# replace the reference and apply the sigil if needed
name, sigil = self._parse_reference(item)
+
referent = [
_sigilify(item, sigil) for item in self._reference[name].specs_as_yaml_list
]
@@ -197,10 +213,7 @@ def _expand_matrix_constraints(matrix_config):
results = []
for combo in itertools.product(*expanded_rows):
# Construct a combined spec to test against excludes
- flat_combo = [constraint for constraint_list in combo for constraint in constraint_list]
-
- # Resolve abstract hashes so we can exclude by their concrete properties
- flat_combo = [Spec(x).lookup_hash() for x in flat_combo]
+ flat_combo = [Spec(constraint) for constraints in combo for constraint in constraints]
test_spec = flat_combo[0].copy()
for constraint in flat_combo[1:]:
@@ -213,10 +226,12 @@ def _expand_matrix_constraints(matrix_config):
# Catch exceptions because we want to be able to operate on
# abstract specs without needing package information
try:
- spack.variant.substitute_abstract_variants(test_spec)
+ spack.spec.substitute_abstract_variants(test_spec)
except spack.variant.UnknownVariantError:
pass
- if any(test_spec.satisfies(x) for x in excludes):
+
+ # Resolve abstract hashes for exclusion criteria
+ if any(test_spec.lookup_hash().satisfies(x) for x in excludes):
continue
if sigil:
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 959df18ec8..eca80df227 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import concurrent.futures
import errno
import getpass
import glob
@@ -13,10 +12,11 @@ import shutil
import stat
import sys
import tempfile
-from typing import Callable, Dict, Iterable, Optional, Set
+from typing import Callable, Dict, Generator, Iterable, List, Optional, Set
import llnl.string
import llnl.util.lang
+import llnl.util.symlink
import llnl.util.tty as tty
from llnl.util.filesystem import (
can_access,
@@ -34,16 +34,17 @@ from llnl.util.tty.color import colorize
import spack.caches
import spack.config
import spack.error
-import spack.fetch_strategy as fs
-import spack.mirror
-import spack.paths
+import spack.mirrors.layout
+import spack.mirrors.utils
import spack.resource
import spack.spec
-import spack.stage
+import spack.util.crypto
import spack.util.lock
+import spack.util.parallel
import spack.util.path as sup
import spack.util.pattern as pattern
import spack.util.url as url_util
+from spack import fetch_strategy as fs # breaks a cycle
from spack.util.crypto import bit_length, prefix_bits
from spack.util.editor import editor, executable
from spack.version import StandardVersion, VersionList
@@ -199,14 +200,112 @@ def get_stage_root():
def _mirror_roots():
mirrors = spack.config.get("mirrors")
return [
- sup.substitute_path_variables(root)
- if root.endswith(os.sep)
- else sup.substitute_path_variables(root) + os.sep
+ (
+ sup.substitute_path_variables(root)
+ if root.endswith(os.sep)
+ else sup.substitute_path_variables(root) + os.sep
+ )
for root in mirrors.values()
]
-class Stage:
+class LockableStagingDir:
+ """A directory whose lifetime can be managed with a context
+ manager (but persists if the user requests it). Instances can have
+ a specified name and if they do, then for all instances that have
+ the same name, only one can enter the context manager at a time.
+ """
+
+ def __init__(self, name, path, keep, lock):
+ # TODO: This uses a protected member of tempfile, but seemed the only
+ # TODO: way to get a temporary name. It won't be the same as the
+ # TODO: temporary stage area in _stage_root.
+ self.name = name
+ if name is None:
+ self.name = stage_prefix + next(tempfile._get_candidate_names())
+
+ # Use the provided path or construct an optionally named stage path.
+ if path is not None:
+ self.path = path
+ else:
+ self.path = os.path.join(get_stage_root(), self.name)
+
+ # Flag to decide whether to delete the stage folder on exit or not
+ self.keep = keep
+
+ # File lock for the stage directory. We use one file for all
+ # stage locks. See spack.database.Database.prefix_locker.lock for
+ # details on this approach.
+ self._lock = None
+ self._use_locks = lock
+
+ # When stages are reused, we need to know whether to re-create
+ # it. This marks whether it has been created/destroyed.
+ self.created = False
+
+ def _get_lock(self):
+ if not self._lock:
+ sha1 = hashlib.sha1(self.name.encode("utf-8")).digest()
+ lock_id = prefix_bits(sha1, bit_length(sys.maxsize))
+ stage_lock_path = os.path.join(get_stage_root(), ".lock")
+ self._lock = spack.util.lock.Lock(
+ stage_lock_path, start=lock_id, length=1, desc=self.name
+ )
+ return self._lock
+
+ def __enter__(self):
+ """
+ Entering a stage context will create the stage directory
+
+ Returns:
+ self
+ """
+ if self._use_locks:
+ self._get_lock().acquire_write(timeout=60)
+ self.create()
+ return self
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ """
+ Exiting from a stage context will delete the stage directory unless:
+ - it was explicitly requested not to do so
+ - an exception has been raised
+
+ Args:
+ exc_type: exception type
+ exc_val: exception value
+ exc_tb: exception traceback
+
+ Returns:
+ Boolean
+ """
+ # Delete when there are no exceptions, unless asked to keep.
+ if exc_type is None and not self.keep:
+ self.destroy()
+
+ if self._use_locks:
+ self._get_lock().release_write()
+
+ def create(self):
+ """
+ Ensures the top-level (config:build_stage) directory exists.
+ """
+ # User has full permissions and group has only read permissions
+ if not os.path.exists(self.path):
+ mkdirp(self.path, mode=stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP)
+ elif not os.path.isdir(self.path):
+ os.remove(self.path)
+ mkdirp(self.path, mode=stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP)
+
+ # Make sure we can actually do something with the stage we made.
+ ensure_access(self.path)
+ self.created = True
+
+ def destroy(self):
+ raise NotImplementedError(f"{self.__class__.__name__} is abstract")
+
+
+class Stage(LockableStagingDir):
"""Manages a temporary stage directory for building.
A Stage object is a context manager that handles a directory where
@@ -248,14 +347,15 @@ class Stage:
similar, and are intended to persist for only one run of spack.
"""
- #: Most staging is managed by Spack. DIYStage is one exception.
- managed_by_spack = True
+ requires_patch_success = True
def __init__(
self,
url_or_fetch_strategy,
+ *,
name=None,
- mirror_paths=None,
+ mirror_paths: Optional["spack.mirrors.layout.MirrorLayout"] = None,
+ mirrors: Optional[Iterable["spack.mirrors.mirror.Mirror"]] = None,
keep=False,
path=None,
lock=True,
@@ -264,37 +364,33 @@ class Stage:
"""Create a stage object.
Parameters:
url_or_fetch_strategy
- URL of the archive to be downloaded into this stage, OR
- a valid FetchStrategy.
+ URL of the archive to be downloaded into this stage, OR a valid FetchStrategy.
name
- If a name is provided, then this stage is a named stage
- and will persist between runs (or if you construct another
- stage object later). If name is not provided, then this
+ If a name is provided, then this stage is a named stage and will persist between runs
+ (or if you construct another stage object later). If name is not provided, then this
stage will be given a unique name automatically.
mirror_paths
- If provided, Stage will search Spack's mirrors for
- this archive at each of the provided relative mirror paths
- before using the default fetch strategy.
+ If provided, Stage will search Spack's mirrors for this archive at each of the
+ provided relative mirror paths before using the default fetch strategy.
keep
- By default, when used as a context manager, the Stage
- is deleted on exit when no exceptions are raised.
- Pass True to keep the stage intact even if no
- exceptions are raised.
+ By default, when used as a context manager, the Stage is deleted on exit when no
+ exceptions are raised. Pass True to keep the stage intact even if no exceptions are
+ raised.
path
If provided, the stage path to use for associated builds.
lock
- True if the stage directory file lock is to be used, False
- otherwise.
+ True if the stage directory file lock is to be used, False otherwise.
search_fn
- The search function that provides the fetch strategy
- instance.
+ The search function that provides the fetch strategy instance.
"""
+ super().__init__(name, path, keep, lock)
+
# TODO: fetch/stage coupling needs to be reworked -- the logic
# TODO: here is convoluted and not modular enough.
if isinstance(url_or_fetch_strategy, str):
@@ -307,94 +403,37 @@ class Stage:
# self.fetcher can change with mirrors.
self.default_fetcher = self.fetcher
self.search_fn = search_fn
- # used for mirrored archives of repositories.
- self.skip_checksum_for_mirror = True
-
- self.srcdir = None
-
- # TODO: This uses a protected member of tempfile, but seemed the only
- # TODO: way to get a temporary name. It won't be the same as the
- # TODO: temporary stage area in _stage_root.
- self.name = name
- if name is None:
- self.name = stage_prefix + next(tempfile._get_candidate_names())
- self.mirror_paths = mirror_paths
-
- # Use the provided path or construct an optionally named stage path.
- if path is not None:
- self.path = path
+ # If we fetch from a mirror, but the original data is from say git, we can currently not
+ # prove that they are equal (we don't even have a tree hash in package.py). This bool is
+ # used to skip checksum verification and instead warn the user.
+ if isinstance(self.default_fetcher, fs.URLFetchStrategy):
+ self.skip_checksum_for_mirror = not bool(self.default_fetcher.digest)
else:
- self.path = os.path.join(get_stage_root(), self.name)
-
- # Flag to decide whether to delete the stage folder on exit or not
- self.keep = keep
-
- # File lock for the stage directory. We use one file for all
- # stage locks. See spack.database.Database.prefix_locker.lock for
- # details on this approach.
- self._lock = None
- if lock:
- sha1 = hashlib.sha1(self.name.encode("utf-8")).digest()
- lock_id = prefix_bits(sha1, bit_length(sys.maxsize))
- stage_lock_path = os.path.join(get_stage_root(), ".lock")
- self._lock = spack.util.lock.Lock(
- stage_lock_path, start=lock_id, length=1, desc=self.name
- )
-
- # When stages are reused, we need to know whether to re-create
- # it. This marks whether it has been created/destroyed.
- self.created = False
-
- def __enter__(self):
- """
- Entering a stage context will create the stage directory
-
- Returns:
- self
- """
- if self._lock is not None:
- self._lock.acquire_write(timeout=60)
- self.create()
- return self
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- """
- Exiting from a stage context will delete the stage directory unless:
- - it was explicitly requested not to do so
- - an exception has been raised
-
- Args:
- exc_type: exception type
- exc_val: exception value
- exc_tb: exception traceback
+ self.skip_checksum_for_mirror = True
- Returns:
- Boolean
- """
- # Delete when there are no exceptions, unless asked to keep.
- if exc_type is None and not self.keep:
- self.destroy()
+ self.srcdir = None
- if self._lock is not None:
- self._lock.release_write()
+ self.mirror_layout = mirror_paths
+ self.mirrors = list(mirrors) if mirrors else []
+ # Allow users the disable both mirrors and download cache
+ self.default_fetcher_only = False
@property
def expected_archive_files(self):
"""Possible archive file paths."""
- paths = []
fnames = []
expanded = True
if isinstance(self.default_fetcher, fs.URLFetchStrategy):
expanded = self.default_fetcher.expand_archive
fnames.append(url_util.default_download_filename(self.default_fetcher.url))
- if self.mirror_paths:
- fnames.extend(os.path.basename(x) for x in self.mirror_paths)
+ if self.mirror_layout:
+ fnames.append(os.path.basename(self.mirror_layout.path))
- paths.extend(os.path.join(self.path, f) for f in fnames)
+ paths = [os.path.join(self.path, f) for f in fnames]
if not expanded:
- # If the download file is not compressed, the "archive" is a
- # single file placed in Stage.source_path
+ # If the download file is not compressed, the "archive" is a single file placed in
+ # Stage.source_path
paths.extend(os.path.join(self.source_path, f) for f in fnames)
return paths
@@ -427,104 +466,84 @@ class Stage:
"""Returns the well-known source directory path."""
return os.path.join(self.path, _source_path_subdir)
- def disable_mirrors(self):
- """The Stage will not attempt to look for the associated fetcher
- target in any of Spack's mirrors (including the local download cache).
- """
- self.mirror_paths = []
-
- def fetch(self, mirror_only=False, err_msg=None):
- """Retrieves the code or archive
-
- Args:
- mirror_only (bool): only fetch from a mirror
- err_msg (str or None): the error message to display if all fetchers
- fail or ``None`` for the default fetch failure message
- """
- fetchers = []
+ def _generate_fetchers(self, mirror_only=False) -> Generator["fs.FetchStrategy", None, None]:
+ fetchers: List[fs.FetchStrategy] = []
if not mirror_only:
fetchers.append(self.default_fetcher)
- # TODO: move mirror logic out of here and clean it up!
- # TODO: Or @alalazo may have some ideas about how to use a
- # TODO: CompositeFetchStrategy here.
- self.skip_checksum_for_mirror = True
- if self.mirror_paths:
- # Join URLs of mirror roots with mirror paths. Because
- # urljoin() will strip everything past the final '/' in
- # the root, so we add a '/' if it is not present.
- mirror_urls = [
- url_util.join(mirror.fetch_url, rel_path)
- for mirror in spack.mirror.MirrorCollection(source=True).values()
- if not mirror.fetch_url.startswith("oci://")
- for rel_path in self.mirror_paths
- ]
-
- # If this archive is normally fetched from a tarball URL,
- # then use the same digest. `spack mirror` ensures that
- # the checksum will be the same.
+ # If this archive is normally fetched from a URL, then use the same digest.
+ if isinstance(self.default_fetcher, fs.URLFetchStrategy):
+ digest = self.default_fetcher.digest
+ expand = self.default_fetcher.expand_archive
+ extension = self.default_fetcher.extension
+ else:
digest = None
expand = True
extension = None
- if isinstance(self.default_fetcher, fs.URLFetchStrategy):
- digest = self.default_fetcher.digest
- expand = self.default_fetcher.expand_archive
- extension = self.default_fetcher.extension
-
- # Have to skip the checksum for things archived from
- # repositories. How can this be made safer?
- self.skip_checksum_for_mirror = not bool(digest)
+ # TODO: move mirror logic out of here and clean it up!
+ # TODO: Or @alalazo may have some ideas about how to use a
+ # TODO: CompositeFetchStrategy here.
+ if not self.default_fetcher_only and self.mirror_layout and self.mirrors:
# Add URL strategies for all the mirrors with the digest
# Insert fetchers in the order that the URLs are provided.
- for url in reversed(mirror_urls):
- fetchers.insert(
- 0, fs.from_url_scheme(url, digest, expand=expand, extension=extension)
+ fetchers[:0] = (
+ fs.from_url_scheme(
+ url_util.join(mirror.fetch_url, *self.mirror_layout.path.split(os.sep)),
+ checksum=digest,
+ expand=expand,
+ extension=extension,
)
+ for mirror in self.mirrors
+ if not mirror.fetch_url.startswith("oci://") # no support for mirrors yet
+ )
- if self.default_fetcher.cachable:
- for rel_path in reversed(list(self.mirror_paths)):
- cache_fetcher = spack.caches.FETCH_CACHE.fetcher(
- rel_path, digest, expand=expand, extension=extension
- )
- fetchers.insert(0, cache_fetcher)
-
- def generate_fetchers():
- for fetcher in fetchers:
- yield fetcher
- # The search function may be expensive, so wait until now to
- # call it so the user can stop if a prior fetcher succeeded
- if self.search_fn and not mirror_only:
- dynamic_fetchers = self.search_fn()
- for fetcher in dynamic_fetchers:
- yield fetcher
-
- def print_errors(errors):
- for msg in errors:
- tty.debug(msg)
-
- errors = []
- for fetcher in generate_fetchers():
+ if not self.default_fetcher_only and self.mirror_layout and self.default_fetcher.cachable:
+ fetchers.insert(
+ 0,
+ spack.caches.FETCH_CACHE.fetcher(
+ self.mirror_layout.path, digest, expand=expand, extension=extension
+ ),
+ )
+
+ yield from fetchers
+
+ # The search function may be expensive, so wait until now to call it so the user can stop
+ # if a prior fetcher succeeded
+ if self.search_fn and not mirror_only:
+ yield from self.search_fn()
+
+ def fetch(self, mirror_only: bool = False, err_msg: Optional[str] = None) -> None:
+ """Retrieves the code or archive
+
+ Args:
+ mirror_only: only fetch from a mirror
+ err_msg: the error message to display if all fetchers fail or ``None`` for the default
+ fetch failure message
+ """
+ errors: List[str] = []
+ for fetcher in self._generate_fetchers(mirror_only):
try:
fetcher.stage = self
self.fetcher = fetcher
self.fetcher.fetch()
break
- except spack.fetch_strategy.NoCacheError:
+ except fs.NoCacheError:
# Don't bother reporting when something is not cached.
continue
+ except fs.FailedDownloadError as f:
+ errors.extend(f"{fetcher}: {e.__class__.__name__}: {e}" for e in f.exceptions)
+ continue
except spack.error.SpackError as e:
- errors.append("Fetching from {0} failed.".format(fetcher))
- tty.debug(e)
+ errors.append(f"{fetcher}: {e.__class__.__name__}: {e}")
continue
else:
- print_errors(errors)
-
self.fetcher = self.default_fetcher
- default_msg = "All fetchers failed for {0}".format(self.name)
- raise spack.error.FetchError(err_msg or default_msg, None)
-
- print_errors(errors)
+ if err_msg:
+ raise spack.error.FetchError(err_msg)
+ raise spack.error.FetchError(
+ f"All fetchers failed for {self.name}", "\n".join(f" {e}" for e in errors)
+ )
def steal_source(self, dest):
"""Copy the source_path directory in its entirety to directory dest
@@ -562,56 +581,60 @@ class Stage:
self.destroy()
def check(self):
- """Check the downloaded archive against a checksum digest.
- No-op if this stage checks code out of a repository."""
+ """Check the downloaded archive against a checksum digest."""
if self.fetcher is not self.default_fetcher and self.skip_checksum_for_mirror:
+ cache = isinstance(self.fetcher, fs.CacheURLFetchStrategy)
+ if cache:
+ secure_msg = "your download cache is in a secure location"
+ else:
+ secure_msg = "you trust this mirror and have a secure connection"
tty.warn(
- "Fetching from mirror without a checksum!",
- "This package is normally checked out from a version "
- "control system, but it has been archived on a spack "
- "mirror. This means we cannot know a checksum for the "
- "tarball in advance. Be sure that your connection to "
- "this mirror is secure!",
+ f"Using {'download cache' if cache else 'a mirror'} instead of version control",
+ "The required sources are normally checked out from a version control system, "
+ f"but have been archived {'in download cache' if cache else 'on a mirror'}: "
+ f"{self.fetcher}. Spack lacks a tree hash to verify the integrity of this "
+ f"archive. Make sure {secure_msg}.",
)
elif spack.config.get("config:checksum"):
self.fetcher.check()
def cache_local(self):
- spack.caches.FETCH_CACHE.store(self.fetcher, self.mirror_paths.storage_path)
+ spack.caches.FETCH_CACHE.store(self.fetcher, self.mirror_layout.path)
- def cache_mirror(self, mirror, stats):
+ def cache_mirror(
+ self, mirror: "spack.caches.MirrorCache", stats: "spack.mirrors.utils.MirrorStats"
+ ) -> None:
"""Perform a fetch if the resource is not already cached
Arguments:
- 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
+ mirror: the mirror to cache this Stage's resource in
+ stats: this is updated depending on whether the caching operation succeeded or failed
"""
if isinstance(self.default_fetcher, fs.BundleFetchStrategy):
- # BundleFetchStrategy has no source to fetch. The associated
- # fetcher does nothing but the associated stage may still exist.
- # There is currently no method available on the fetcher to
- # distinguish this ('cachable' refers to whether the fetcher
- # refers to a resource with a fixed ID, which is not the same
- # concept as whether there is anything to fetch at all) so we
- # must examine the type of the fetcher.
+ # BundleFetchStrategy has no source to fetch. The associated fetcher does nothing but
+ # the associated stage may still exist. There is currently no method available on the
+ # fetcher to distinguish this ('cachable' refers to whether the fetcher refers to a
+ # resource with a fixed ID, which is not the same concept as whether there is anything
+ # to fetch at all) so we must examine the type of the fetcher.
+ return
+
+ elif mirror.skip_unstable_versions and not fs.stable_target(self.default_fetcher):
return
- if mirror.skip_unstable_versions and not fs.stable_target(self.default_fetcher):
+ elif not self.mirror_layout:
return
- absolute_storage_path = os.path.join(mirror.root, self.mirror_paths.storage_path)
+ absolute_storage_path = os.path.join(mirror.root, self.mirror_layout.path)
if os.path.exists(absolute_storage_path):
stats.already_existed(absolute_storage_path)
else:
self.fetch()
self.check()
- mirror.store(self.fetcher, self.mirror_paths.storage_path)
+ mirror.store(self.fetcher, self.mirror_layout.path)
stats.added(absolute_storage_path)
- mirror.symlink(self.mirror_paths)
+ self.mirror_layout.make_alias(mirror.root)
def expand_archive(self):
"""Changes to the stage directory and attempt to expand the downloaded
@@ -619,9 +642,9 @@ class Stage:
downloaded."""
if not self.expanded:
self.fetcher.expand()
- tty.debug("Created stage in {0}".format(self.path))
+ tty.debug(f"Created stage in {self.path}")
else:
- tty.debug("Already staged {0} in {1}".format(self.name, self.path))
+ tty.debug(f"Already staged {self.name} in {self.path}")
def restage(self):
"""Removes the expanded archive path if it exists, then re-expands
@@ -629,21 +652,6 @@ class Stage:
"""
self.fetcher.reset()
- def create(self):
- """
- Ensures the top-level (config:build_stage) directory exists.
- """
- # User has full permissions and group has only read permissions
- if not os.path.exists(self.path):
- mkdirp(self.path, mode=stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP)
- elif not os.path.isdir(self.path):
- os.remove(self.path)
- mkdirp(self.path, mode=stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP)
-
- # Make sure we can actually do something with the stage we made.
- ensure_access(self.path)
- self.created = True
-
def destroy(self):
"""Removes this stage directory."""
remove_linked_tree(self.path)
@@ -662,7 +670,7 @@ class Stage:
class ResourceStage(Stage):
def __init__(
self,
- fetch_strategy: fs.FetchStrategy,
+ fetch_strategy: "fs.FetchStrategy",
root: Stage,
resource: spack.resource.Resource,
**kwargs,
@@ -750,7 +758,6 @@ class StageComposite(pattern.Composite):
"cache_mirror",
"steal_source",
"disable_mirrors",
- "managed_by_spack",
]
)
@@ -790,6 +797,10 @@ class StageComposite(pattern.Composite):
return self[0].archive_file
@property
+ def requires_patch_success(self):
+ return self[0].requires_patch_success
+
+ @property
def keep(self):
return self[0].keep
@@ -799,60 +810,66 @@ class StageComposite(pattern.Composite):
item.keep = value
-class DIYStage:
- """
- Simple class that allows any directory to be a spack stage. Consequently,
- it does not expect or require that the source path adhere to the standard
- directory naming convention.
- """
-
- """DIY staging is, by definition, not managed by Spack."""
- managed_by_spack = False
-
- def __init__(self, path):
- if path is None:
- raise ValueError("Cannot construct DIYStage without a path.")
- elif not os.path.isdir(path):
- raise StagePathError("The stage path directory does not exist:", path)
+class DevelopStage(LockableStagingDir):
+ requires_patch_success = False
- self.archive_file = None
- self.path = path
- self.source_path = path
- self.created = True
+ def __init__(self, name, dev_path, reference_link):
+ super().__init__(name=name, path=None, keep=False, lock=True)
+ self.dev_path = dev_path
+ self.source_path = dev_path
- # DIY stages do nothing as context managers.
- def __enter__(self):
- pass
+ # The path of a link that will point to this stage
+ if os.path.isabs(reference_link):
+ link_path = reference_link
+ else:
+ link_path = os.path.join(self.source_path, reference_link)
+ if not os.path.isdir(os.path.dirname(link_path)):
+ raise StageError(f"The directory containing {link_path} must exist")
+ self.reference_link = link_path
- def __exit__(self, exc_type, exc_val, exc_tb):
- pass
+ @property
+ def archive_file(self):
+ return None
def fetch(self, *args, **kwargs):
- tty.debug("No need to fetch for DIY.")
+ tty.debug("No fetching needed for develop stage.")
def check(self):
- tty.debug("No checksum needed for DIY.")
+ tty.debug("No checksum needed for develop stage.")
def expand_archive(self):
- tty.debug("Using source directory: {0}".format(self.source_path))
+ tty.debug("No expansion needed for develop stage.")
@property
def expanded(self):
"""Returns True since the source_path must exist."""
return True
- def restage(self):
- raise RestageError("Cannot restage a DIY stage.")
-
def create(self):
- self.created = True
+ super().create()
+ try:
+ llnl.util.symlink.symlink(self.path, self.reference_link)
+ except (llnl.util.symlink.AlreadyExistsError, FileExistsError):
+ pass
def destroy(self):
- # No need to destroy DIY stage.
- pass
+ # Destroy all files, but do not follow symlinks
+ try:
+ shutil.rmtree(self.path)
+ except FileNotFoundError:
+ pass
+ try:
+ os.remove(self.reference_link)
+ except FileNotFoundError:
+ pass
+ self.created = False
+
+ def restage(self):
+ self.destroy()
+ self.create()
def cache_local(self):
- tty.debug("Sources for DIY stages are not cached")
+ tty.debug("Sources for Develop stages are not cached")
def ensure_access(file):
@@ -964,8 +981,8 @@ def interactive_version_filter(
data = buffer.getvalue().encode("utf-8")
short_hash = hashlib.sha1(data).hexdigest()[:7]
- filename = f"{spack.stage.stage_prefix}versions-{short_hash}.txt"
- filepath = os.path.join(spack.stage.get_stage_root(), filename)
+ filename = f"{stage_prefix}versions-{short_hash}.txt"
+ filepath = os.path.join(get_stage_root(), filename)
# Write contents
with open(filepath, "wb") as f:
@@ -1066,14 +1083,14 @@ def interactive_version_filter(
def get_checksums_for_versions(
- url_by_version: Dict[str, str],
+ url_by_version: Dict[StandardVersion, str],
package_name: str,
*,
first_stage_function: Optional[Callable[[Stage, str], None]] = None,
keep_stage: bool = False,
concurrency: Optional[int] = None,
fetch_options: Optional[Dict[str, str]] = None,
-) -> Dict[str, str]:
+) -> Dict[StandardVersion, str]:
"""Computes the checksums for each version passed in input, and returns the results.
Archives are fetched according to the usl dictionary passed as input.
@@ -1117,7 +1134,7 @@ def get_checksums_for_versions(
if checksum is not None:
version_hashes[version] = checksum
- with concurrent.futures.ProcessPoolExecutor(max_workers=concurrency) as executor:
+ with spack.util.parallel.make_concurrent_executor(concurrency, require_fork=False) as executor:
results = []
for url, version in search_arguments:
future = executor.submit(_fetch_and_checksum, url, fetch_options, keep_stage)
@@ -1146,20 +1163,22 @@ def _fetch_and_checksum(url, options, keep_stage, action_fn=None):
try:
url_or_fs = url
if options:
- url_or_fs = fs.URLFetchStrategy(url, fetch_options=options)
+ url_or_fs = fs.URLFetchStrategy(url=url, fetch_options=options)
with Stage(url_or_fs, keep=keep_stage) as stage:
# Fetch the archive
stage.fetch()
- if action_fn is not None:
+ archive = stage.archive_file
+ assert archive is not None, f"Archive not found for {url}"
+ if action_fn is not None and archive:
# Only run first_stage_function the first time,
# no need to run it every time
- action_fn(stage, url)
+ action_fn(archive, url)
# Checksum the archive and add it to the list
- checksum = spack.util.crypto.checksum(hashlib.sha256, stage.archive_file)
+ checksum = spack.util.crypto.checksum(hashlib.sha256, archive)
return checksum, None
- except FailedDownloadError:
+ except fs.FailedDownloadError:
return None, f"[WORKER] Failed to fetch {url}"
except Exception as e:
return None, f"[WORKER] Something failed on {url}, skipping. ({e})"
@@ -1179,7 +1198,3 @@ class RestageError(StageError):
class VersionFetchError(StageError):
"""Raised when we can't determine a URL to fetch a package."""
-
-
-# Keep this in namespace for convenience
-FailedDownloadError = fs.FailedDownloadError
diff --git a/lib/spack/spack/store.py b/lib/spack/spack/store.py
index dc2d5de54b..abd7d92500 100644
--- a/lib/spack/spack/store.py
+++ b/lib/spack/spack/store.py
@@ -39,9 +39,6 @@ import spack.util.path
DEFAULT_INSTALL_TREE_ROOT = os.path.join(spack.paths.opt_path, "spack")
-ConfigurationType = Union["spack.config.Configuration", "llnl.util.lang.Singleton"]
-
-
def parse_install_tree(config_dict):
"""Parse config settings and return values relevant to the store object.
@@ -173,7 +170,12 @@ class Store:
self.hash_length = hash_length
self.upstreams = upstreams
self.lock_cfg = lock_cfg
- self.db = spack.database.Database(root, upstream_dbs=upstreams, lock_cfg=lock_cfg)
+ self.layout = spack.directory_layout.DirectoryLayout(
+ root, projections=projections, hash_length=hash_length
+ )
+ self.db = spack.database.Database(
+ root, upstream_dbs=upstreams, lock_cfg=lock_cfg, layout=self.layout
+ )
timeout_format_str = (
f"{str(lock_cfg.package_timeout)}s" if lock_cfg.package_timeout else "No timeout"
@@ -187,13 +189,9 @@ class Store:
self.root, default_timeout=lock_cfg.package_timeout
)
- self.layout = spack.directory_layout.DirectoryLayout(
- root, projections=projections, hash_length=hash_length
- )
-
def reindex(self) -> None:
"""Convenience function to reindex the store DB with its own layout."""
- return self.db.reindex(self.layout)
+ return self.db.reindex()
def __reduce__(self):
return Store, (
@@ -206,7 +204,7 @@ class Store:
)
-def create(configuration: ConfigurationType) -> Store:
+def create(configuration: spack.config.Configuration) -> Store:
"""Create a store from the configuration passed as input.
Args:
@@ -239,7 +237,7 @@ def _create_global() -> Store:
#: Singleton store instance
-STORE: Union[Store, llnl.util.lang.Singleton] = llnl.util.lang.Singleton(_create_global)
+STORE: Store = llnl.util.lang.Singleton(_create_global) # type: ignore
def reinitialize():
@@ -261,7 +259,7 @@ def restore(token):
def _construct_upstream_dbs_from_install_roots(
- install_roots: List[str], _test: bool = False
+ install_roots: List[str],
) -> List[spack.database.Database]:
accumulated_upstream_dbs: List[spack.database.Database] = []
for install_root in reversed(install_roots):
@@ -271,7 +269,6 @@ def _construct_upstream_dbs_from_install_roots(
is_upstream=True,
upstream_dbs=upstream_dbs,
)
- next_db._fail_when_missing_deps = _test
next_db._read()
accumulated_upstream_dbs.insert(0, next_db)
@@ -307,7 +304,7 @@ def find(
matching_specs: List[spack.spec.Spec] = []
errors = []
- query_fn = query_fn or spack.store.STORE.db.query
+ query_fn = query_fn or STORE.db.query
for spec in constraints:
current_matches = query_fn(spec, **kwargs)
@@ -340,7 +337,7 @@ def specfile_matches(filename: str, **kwargs) -> List["spack.spec.Spec"]:
**kwargs: keyword arguments forwarded to "find"
"""
query = [spack.spec.Spec.from_specfile(filename)]
- return spack.store.find(query, **kwargs)
+ return find(query, **kwargs)
def ensure_singleton_created() -> None:
@@ -371,7 +368,6 @@ def use_store(
data.update(extra_data)
# Swap the store with the one just constructed and return it
- ensure_singleton_created()
spack.config.CONFIG.push_scope(
spack.config.InternalConfigScope(name=scope_name, data={"config": {"install_tree": data}})
)
diff --git a/lib/spack/spack/subprocess_context.py b/lib/spack/spack/subprocess_context.py
index c90dcf8409..507045e42f 100644
--- a/lib/spack/spack/subprocess_context.py
+++ b/lib/spack/spack/subprocess_context.py
@@ -12,24 +12,20 @@ installations performed in Spack unit tests may include additional
modifications to global state in memory that must be replicated in the
child process.
"""
-
+import importlib
import io
import multiprocessing
import pickle
import pydoc
-import sys
from types import ModuleType
import spack.config
import spack.environment
-import spack.main
+import spack.paths
import spack.platforms
import spack.repo
import spack.store
-_SERIALIZE = sys.platform == "win32" or (sys.version_info >= (3, 8) and sys.platform == "darwin")
-
-
patches = None
@@ -56,7 +52,7 @@ class SpackTestProcess:
fn()
def create(self):
- test_state = TestState()
+ test_state = GlobalStateMarshaler()
return multiprocessing.Process(target=self._restore_and_run, args=(self.fn, test_state))
@@ -65,47 +61,56 @@ class PackageInstallContext:
needs to be transmitted to a child process.
"""
- def __init__(self, pkg):
- if _SERIALIZE:
+ def __init__(self, pkg, *, ctx=None):
+ ctx = ctx or multiprocessing.get_context()
+ self.serialize = ctx.get_start_method() != "fork"
+ if self.serialize:
self.serialized_pkg = serialize(pkg)
+ self.global_state = GlobalStateMarshaler()
self.serialized_env = serialize(spack.environment.active_environment())
else:
self.pkg = pkg
+ self.global_state = None
self.env = spack.environment.active_environment()
- self.spack_working_dir = spack.main.spack_working_dir
- self.test_state = TestState()
+ self.spack_working_dir = spack.paths.spack_working_dir
def restore(self):
- self.test_state.restore()
- spack.main.spack_working_dir = self.spack_working_dir
- env = pickle.load(self.serialized_env) if _SERIALIZE else self.env
- pkg = pickle.load(self.serialized_pkg) if _SERIALIZE else self.pkg
+ spack.paths.spack_working_dir = self.spack_working_dir
+ env = pickle.load(self.serialized_env) if self.serialize else self.env
+ # Activating the environment modifies the global configuration, so globals have to
+ # be restored afterward, in case other modifications were applied on top (e.g. from
+ # command line)
if env:
spack.environment.activate(env)
+
+ if self.serialize:
+ self.global_state.restore()
+
+ # Order of operation is important, since the package might be retrieved
+ # from a repo defined within the environment configuration
+ pkg = pickle.load(self.serialized_pkg) if self.serialize else self.pkg
return pkg
-class TestState:
- """Spack tests may modify state that is normally read from disk in memory;
- this object is responsible for properly serializing that state to be
- applied to a subprocess. This isn't needed outside of a testing environment
- but this logic is designed to behave the same inside or outside of tests.
+class GlobalStateMarshaler:
+ """Class to serialize and restore global state for child processes.
+
+ Spack may modify state that is normally read from disk or command line in memory;
+ this object is responsible for properly serializing that state to be applied to a subprocess.
"""
def __init__(self):
- if _SERIALIZE:
- self.config = spack.config.CONFIG
- self.platform = spack.platforms.host
- self.test_patches = store_patches()
- self.store = spack.store.STORE
+ self.config = spack.config.CONFIG.ensure_unwrapped()
+ self.platform = spack.platforms.host
+ self.test_patches = store_patches()
+ self.store = spack.store.STORE
def restore(self):
- if _SERIALIZE:
- spack.config.CONFIG = self.config
- spack.repo.PATH = spack.repo.create(self.config)
- spack.platforms.host = self.platform
- spack.store.STORE = self.store
- self.test_patches.restore()
+ spack.config.CONFIG = self.config
+ spack.repo.PATH = spack.repo.create(self.config)
+ spack.platforms.host = self.platform
+ spack.store.STORE = self.store
+ self.test_patches.restore()
class TestPatches:
@@ -116,7 +121,7 @@ class TestPatches:
def restore(self):
for module_name, attr_name, value in self.module_patches:
value = pickle.load(value)
- module = __import__(module_name)
+ module = importlib.import_module(module_name)
setattr(module, attr_name, value)
for class_fqn, attr_name, value in self.class_patches:
value = pickle.load(value)
diff --git a/lib/spack/spack/tag.py b/lib/spack/spack/tag.py
index 559af56f0c..fd2b252d83 100644
--- a/lib/spack/spack/tag.py
+++ b/lib/spack/spack/tag.py
@@ -8,11 +8,14 @@ import copy
from collections.abc import Mapping
import spack.error
+import spack.repo
import spack.util.spack_json as sjson
def _get_installed_package_names():
"""Returns names of packages installed in the active environment."""
+ import spack.environment
+
specs = spack.environment.installed_specs()
return [spec.name for spec in specs]
diff --git a/lib/spack/spack/target.py b/lib/spack/spack/target.py
deleted file mode 100644
index 4ce8866ac7..0000000000
--- a/lib/spack/spack/target.py
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 2013-2024 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 functools
-
-import archspec.cpu
-
-import llnl.util.tty as tty
-
-import spack.compiler
-import spack.compilers
-import spack.spec
-import spack.util.spack_yaml as syaml
-
-
-def _ensure_other_is_target(method):
- """In a single argument method, ensure that the argument is an
- instance of ``Target``.
- """
-
- @functools.wraps(method)
- def _impl(self, other):
- if isinstance(other, str):
- other = Target(other)
-
- if not isinstance(other, Target):
- return NotImplemented
-
- return method(self, other)
-
- return _impl
-
-
-class Target:
- def __init__(self, name, module_name=None):
- """Target models microarchitectures and their compatibility.
-
- Args:
- name (str or Microarchitecture): microarchitecture of the target
- module_name (str): optional module name to get access to the
- current target. This is typically used on machines
- like Cray (e.g. craype-compiler)
- """
- if not isinstance(name, archspec.cpu.Microarchitecture):
- name = archspec.cpu.TARGETS.get(name, archspec.cpu.generic_microarchitecture(name))
- self.microarchitecture = name
- self.module_name = module_name
-
- @property
- def name(self):
- return self.microarchitecture.name
-
- @_ensure_other_is_target
- def __eq__(self, other):
- return (
- self.microarchitecture == other.microarchitecture
- and self.module_name == other.module_name
- )
-
- def __ne__(self, other):
- # This method is necessary as long as we support Python 2. In Python 3
- # __ne__ defaults to the implementation below
- return not self == other
-
- @_ensure_other_is_target
- def __lt__(self, other):
- # TODO: In the future it would be convenient to say
- # TODO: `spec.architecture.target < other.architecture.target`
- # TODO: and change the semantic of the comparison operators
-
- # This is needed to sort deterministically specs in a list.
- # It doesn't implement a total ordering semantic.
- return self.microarchitecture.name < other.microarchitecture.name
-
- def __hash__(self):
- return hash((self.name, self.module_name))
-
- @staticmethod
- def from_dict_or_value(dict_or_value):
- # A string here represents a generic target (like x86_64 or ppc64) or
- # a custom micro-architecture
- if isinstance(dict_or_value, str):
- return Target(dict_or_value)
-
- # TODO: From a dict we actually retrieve much more information than
- # TODO: just the name. We can use that information to reconstruct an
- # TODO: "old" micro-architecture or check the current definition.
- target_info = dict_or_value
- return Target(target_info["name"])
-
- def to_dict_or_value(self):
- """Returns a dict or a value representing the current target.
-
- String values are used to keep backward compatibility with generic
- targets, like e.g. x86_64 or ppc64. More specific micro-architectures
- will return a dictionary which contains information on the name,
- features, vendor, generation and parents of the current target.
- """
- # Generic targets represent either an architecture
- # family (like x86_64) or a custom micro-architecture
- if self.microarchitecture.vendor == "generic":
- return str(self)
-
- return syaml.syaml_dict(self.microarchitecture.to_dict(return_list_of_items=True))
-
- def __repr__(self):
- cls_name = self.__class__.__name__
- fmt = cls_name + "({0}, {1})"
- return fmt.format(repr(self.microarchitecture), repr(self.module_name))
-
- def __str__(self):
- return str(self.microarchitecture)
-
- def __contains__(self, cpu_flag):
- return cpu_flag in self.microarchitecture
-
- def optimization_flags(self, compiler):
- """Returns the flags needed to optimize for this target using
- the compiler passed as argument.
-
- Args:
- 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
- if isinstance(compiler, spack.compiler.Compiler):
- if spack.compilers.is_mixed_toolchain(compiler):
- msg = (
- "microarchitecture specific optimizations are not "
- "supported yet on mixed compiler toolchains [check"
- " {0.name}@{0.version} for further details]"
- )
- tty.debug(msg.format(compiler))
- return ""
-
- # Try to check if the current compiler comes with a version number or
- # has an unexpected suffix. If so, treat it as a compiler with a
- # custom spec.
- compiler_version = compiler.version
- version_number, suffix = archspec.cpu.version_components(compiler.version)
- if not version_number or suffix not in ("", "apple"):
- # Try to deduce the underlying version of the compiler, regardless
- # of its name in compilers.yaml. Depending on where this function
- # is called we might get either a CompilerSpec or a fully fledged
- # compiler object.
- if isinstance(compiler, spack.spec.CompilerSpec):
- compiler = spack.compilers.compilers_for_spec(compiler).pop()
- try:
- compiler_version = compiler.real_version
- except spack.util.executable.ProcessError as e:
- # log this and just return compiler.version instead
- tty.debug(str(e))
-
- return self.microarchitecture.optimization_flags(compiler.name, str(compiler_version))
diff --git a/lib/spack/spack/test/abi.py b/lib/spack/spack/test/abi.py
deleted file mode 100644
index 757b8b6861..0000000000
--- a/lib/spack/spack/test/abi.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2013-2024 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)
-""" Test ABI compatibility helpers"""
-
-import pytest
-
-from spack.abi import ABI
-from spack.spec import Spec
-
-
-@pytest.mark.parametrize(
- "target,constraint,expected",
- [
- ("foo", "bar", True),
- ("platform=linux", "foo", True),
- ("foo", "arch=linux-fedora31-x86_64", True),
- ("arch=linux-fedora31-skylake", "arch=linux-fedora31-skylake", True),
- ("arch=linux-fedora31-skylake", "arch=linux-fedora31-x86_64", False),
- ("platform=linux os=fedora31", "arch=linux-fedora31-x86_64", True),
- ("platform=linux", "arch=linux-fedora31-x86_64", True),
- ("platform=linux os=fedora31", "platform=linux", True),
- ("platform=darwin", "arch=linux-fedora31-x86_64", False),
- ("os=fedora31", "platform=linux", True),
- ],
-)
-def test_architecture_compatibility(target, constraint, expected):
- assert ABI().architecture_compatible(Spec(target), Spec(constraint)) == expected
-
-
-@pytest.mark.parametrize(
- "target,constraint,loose,expected",
- [
- ("foo", "bar", False, True),
- ("%gcc", "foo", False, True),
- ("foo", "%gcc", False, True),
- ("%gcc", "%gcc", False, True),
- ("%gcc", "%intel", False, False),
- ("%gcc", "%clang", False, False),
- ("%gcc@9.1", "%gcc@9.2", False, False), # TODO should be true ?
- ("%gcc@9.2.1", "%gcc@9.2.2", False, False), # TODO should be true ?
- ("%gcc@4.9", "%gcc@9.2", False, False),
- ("%clang@5", "%clang@6", False, False),
- ("%gcc@9.1", "%gcc@9.2", True, True),
- ("%gcc@9.2.1", "%gcc@9.2.2", True, True),
- ("%gcc@4.9", "%gcc@9.2", True, True),
- ("%clang@5", "%clang@6", True, True),
- ],
-)
-def test_compiler_compatibility(target, constraint, loose, expected):
- assert ABI().compiler_compatible(Spec(target), Spec(constraint), loose=loose) == expected
-
-
-@pytest.mark.parametrize(
- "target,constraint,loose,expected",
- [
- ("foo", "bar", False, True),
- ("%gcc", "platform=linux", False, True),
- ("%gcc@9.2.1", "%gcc@8.3.1 platform=linux", False, False),
- ("%gcc@9.2.1", "%gcc@8.3.1 platform=linux", True, True),
- ("%gcc@9.2.1 arch=linux-fedora31-skylake", "%gcc@9.2.1 platform=linux", False, True),
- ],
-)
-def test_compatibility(target, constraint, loose, expected):
- assert ABI().compatible(Spec(target), Spec(constraint), loose=loose) == expected
diff --git a/lib/spack/spack/test/abi_splicing.py b/lib/spack/spack/test/abi_splicing.py
new file mode 100644
index 0000000000..d647647797
--- /dev/null
+++ b/lib/spack/spack/test/abi_splicing.py
@@ -0,0 +1,247 @@
+# Copyright 2013-2024 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)
+""" Test ABI-based splicing of dependencies """
+
+from typing import List
+
+import pytest
+
+import spack.config
+import spack.deptypes as dt
+import spack.solver.asp
+from spack.installer import PackageInstaller
+from spack.spec import Spec
+
+
+class CacheManager:
+ def __init__(self, specs: List[str]) -> None:
+ self.req_specs = specs
+ self.concr_specs: List[Spec]
+ self.concr_specs = []
+
+ def __enter__(self):
+ self.concr_specs = [Spec(s).concretized() for s in self.req_specs]
+ for s in self.concr_specs:
+ PackageInstaller([s.package], fake=True, explicit=True).install()
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ for s in self.concr_specs:
+ s.package.do_uninstall()
+
+
+# MacOS and Windows only work if you pass this function pointer rather than a
+# closure
+def _mock_has_runtime_dependencies(_x):
+ return True
+
+
+def _make_specs_non_buildable(specs: List[str]):
+ output_config = {}
+ for spec in specs:
+ output_config[spec] = {"buildable": False}
+ return output_config
+
+
+@pytest.fixture
+def splicing_setup(mutable_database, mock_packages, monkeypatch):
+ spack.config.set("concretizer:reuse", True)
+ monkeypatch.setattr(
+ spack.solver.asp, "_has_runtime_dependencies", _mock_has_runtime_dependencies
+ )
+
+
+def _enable_splicing():
+ spack.config.set("concretizer:splice", {"automatic": True})
+
+
+def _has_build_dependency(spec: Spec, name: str):
+ return any(s.name == name for s in spec.dependencies(None, dt.BUILD))
+
+
+def test_simple_reuse(splicing_setup):
+ with CacheManager(["splice-z@1.0.0+compat"]):
+ spack.config.set("packages", _make_specs_non_buildable(["splice-z"]))
+ assert Spec("splice-z").concretized().satisfies(Spec("splice-z"))
+
+
+def test_simple_dep_reuse(splicing_setup):
+ with CacheManager(["splice-z@1.0.0+compat"]):
+ spack.config.set("packages", _make_specs_non_buildable(["splice-z"]))
+ assert Spec("splice-h@1").concretized().satisfies(Spec("splice-h@1"))
+
+
+def test_splice_installed_hash(splicing_setup):
+ cache = [
+ "splice-t@1 ^splice-h@1.0.0+compat ^splice-z@1.0.0",
+ "splice-h@1.0.2+compat ^splice-z@1.0.0",
+ ]
+ with CacheManager(cache):
+ packages_config = _make_specs_non_buildable(["splice-t", "splice-h"])
+ spack.config.set("packages", packages_config)
+ goal_spec = Spec("splice-t@1 ^splice-h@1.0.2+compat ^splice-z@1.0.0")
+ with pytest.raises(Exception):
+ goal_spec.concretized()
+ _enable_splicing()
+ assert goal_spec.concretized().satisfies(goal_spec)
+
+
+def test_splice_build_splice_node(splicing_setup):
+ with CacheManager(["splice-t@1 ^splice-h@1.0.0+compat ^splice-z@1.0.0+compat"]):
+ spack.config.set("packages", _make_specs_non_buildable(["splice-t"]))
+ goal_spec = Spec("splice-t@1 ^splice-h@1.0.2+compat ^splice-z@1.0.0+compat")
+ with pytest.raises(Exception):
+ goal_spec.concretized()
+ _enable_splicing()
+ assert goal_spec.concretized().satisfies(goal_spec)
+
+
+def test_double_splice(splicing_setup):
+ cache = [
+ "splice-t@1 ^splice-h@1.0.0+compat ^splice-z@1.0.0+compat",
+ "splice-h@1.0.2+compat ^splice-z@1.0.1+compat",
+ "splice-z@1.0.2+compat",
+ ]
+ with CacheManager(cache):
+ freeze_builds_config = _make_specs_non_buildable(["splice-t", "splice-h", "splice-z"])
+ spack.config.set("packages", freeze_builds_config)
+ goal_spec = Spec("splice-t@1 ^splice-h@1.0.2+compat ^splice-z@1.0.2+compat")
+ with pytest.raises(Exception):
+ goal_spec.concretized()
+ _enable_splicing()
+ assert goal_spec.concretized().satisfies(goal_spec)
+
+
+# The next two tests are mirrors of one another
+def test_virtual_multi_splices_in(splicing_setup):
+ cache = [
+ "depends-on-virtual-with-abi ^virtual-abi-1",
+ "depends-on-virtual-with-abi ^virtual-abi-2",
+ ]
+ goal_specs = [
+ "depends-on-virtual-with-abi ^virtual-abi-multi abi=one",
+ "depends-on-virtual-with-abi ^virtual-abi-multi abi=two",
+ ]
+ with CacheManager(cache):
+ spack.config.set("packages", _make_specs_non_buildable(["depends-on-virtual-with-abi"]))
+ for gs in goal_specs:
+ with pytest.raises(Exception):
+ Spec(gs).concretized()
+ _enable_splicing()
+ for gs in goal_specs:
+ assert Spec(gs).concretized().satisfies(gs)
+
+
+def test_virtual_multi_can_be_spliced(splicing_setup):
+ cache = [
+ "depends-on-virtual-with-abi ^virtual-abi-multi abi=one",
+ "depends-on-virtual-with-abi ^virtual-abi-multi abi=two",
+ ]
+ goal_specs = [
+ "depends-on-virtual-with-abi ^virtual-abi-1",
+ "depends-on-virtual-with-abi ^virtual-abi-2",
+ ]
+ with CacheManager(cache):
+ spack.config.set("packages", _make_specs_non_buildable(["depends-on-virtual-with-abi"]))
+ with pytest.raises(Exception):
+ for gs in goal_specs:
+ Spec(gs).concretized()
+ _enable_splicing()
+ for gs in goal_specs:
+ assert Spec(gs).concretized().satisfies(gs)
+
+
+def test_manyvariant_star_matching_variant_splice(splicing_setup):
+ cache = [
+ # can_splice("manyvariants@1.0.0", when="@1.0.1", match_variants="*")
+ "depends-on-manyvariants ^manyvariants@1.0.0+a+b c=v1 d=v2",
+ "depends-on-manyvariants ^manyvariants@1.0.0~a~b c=v3 d=v3",
+ ]
+ goal_specs = [
+ Spec("depends-on-manyvariants ^manyvariants@1.0.1+a+b c=v1 d=v2"),
+ Spec("depends-on-manyvariants ^manyvariants@1.0.1~a~b c=v3 d=v3"),
+ ]
+ with CacheManager(cache):
+ freeze_build_config = {"depends-on-manyvariants": {"buildable": False}}
+ spack.config.set("packages", freeze_build_config)
+ for goal in goal_specs:
+ with pytest.raises(Exception):
+ goal.concretized()
+ _enable_splicing()
+ for goal in goal_specs:
+ assert goal.concretized().satisfies(goal)
+
+
+def test_manyvariant_limited_matching(splicing_setup):
+ cache = [
+ # can_splice("manyvariants@2.0.0+a~b", when="@2.0.1~a+b", match_variants=["c", "d"])
+ "depends-on-manyvariants@2.0 ^manyvariants@2.0.0+a~b c=v3 d=v2",
+ # can_splice("manyvariants@2.0.0 c=v1 d=v1", when="@2.0.1+a+b")
+ "depends-on-manyvariants@2.0 ^manyvariants@2.0.0~a~b c=v1 d=v1",
+ ]
+ goal_specs = [
+ Spec("depends-on-manyvariants@2.0 ^manyvariants@2.0.1~a+b c=v3 d=v2"),
+ Spec("depends-on-manyvariants@2.0 ^manyvariants@2.0.1+a+b c=v3 d=v3"),
+ ]
+ with CacheManager(cache):
+ freeze_build_config = {"depends-on-manyvariants": {"buildable": False}}
+ spack.config.set("packages", freeze_build_config)
+ for s in goal_specs:
+ with pytest.raises(Exception):
+ s.concretized()
+ _enable_splicing()
+ for s in goal_specs:
+ assert s.concretized().satisfies(s)
+
+
+def test_external_splice_same_name(splicing_setup):
+ cache = [
+ "splice-h@1.0.0 ^splice-z@1.0.0+compat",
+ "splice-t@1.0 ^splice-h@1.0.1 ^splice-z@1.0.1+compat",
+ ]
+ packages_yaml = {
+ "splice-z": {"externals": [{"spec": "splice-z@1.0.2+compat", "prefix": "/usr"}]}
+ }
+ goal_specs = [
+ Spec("splice-h@1.0.0 ^splice-z@1.0.2"),
+ Spec("splice-t@1.0 ^splice-h@1.0.1 ^splice-z@1.0.2"),
+ ]
+ with CacheManager(cache):
+ spack.config.set("packages", packages_yaml)
+ _enable_splicing()
+ for s in goal_specs:
+ assert s.concretized().satisfies(s)
+
+
+def test_spliced_build_deps_only_in_build_spec(splicing_setup):
+ cache = ["splice-t@1.0 ^splice-h@1.0.1 ^splice-z@1.0.0"]
+ goal_spec = Spec("splice-t@1.0 ^splice-h@1.0.2 ^splice-z@1.0.0")
+
+ with CacheManager(cache):
+ _enable_splicing()
+ concr_goal = goal_spec.concretized()
+ build_spec = concr_goal._build_spec
+ # Spec has been spliced
+ assert build_spec is not None
+ # Build spec has spliced build dependencies
+ assert _has_build_dependency(build_spec, "splice-h")
+ assert _has_build_dependency(build_spec, "splice-z")
+ # Spliced build dependencies are removed
+ assert len(concr_goal.dependencies(None, dt.BUILD)) == 0
+
+
+def test_spliced_transitive_dependency(splicing_setup):
+ cache = ["splice-depends-on-t@1.0 ^splice-h@1.0.1"]
+ goal_spec = Spec("splice-depends-on-t^splice-h@1.0.2")
+
+ with CacheManager(cache):
+ spack.config.set("packages", _make_specs_non_buildable(["splice-depends-on-t"]))
+ _enable_splicing()
+ concr_goal = goal_spec.concretized()
+ # Spec has been spliced
+ assert concr_goal._build_spec is not None
+ assert concr_goal["splice-t"]._build_spec is not None
+ assert concr_goal.satisfies(goal_spec)
+ # Spliced build dependencies are removed
+ assert len(concr_goal.dependencies(None, dt.BUILD)) == 0
diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py
index f01e43ec90..a029aa4790 100644
--- a/lib/spack/spack/test/architecture.py
+++ b/lib/spack/spack/test/architecture.py
@@ -2,19 +2,16 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
import platform
-import sys
import pytest
-import llnl.util.filesystem as fs
+import archspec.cpu
import spack.concretize
import spack.operating_systems
import spack.platforms
-import spack.target
-from spack.spec import ArchSpec, CompilerSpec, Spec
+from spack.spec import ArchSpec, Spec
@pytest.fixture(scope="module")
@@ -22,9 +19,8 @@ def current_host_platform():
"""Return the platform of the current host as detected by the
'platform' stdlib package.
"""
- if os.path.exists("/opt/cray/pe"):
- current_platform = spack.platforms.Cray()
- elif "Linux" in platform.system():
+ current_platform = None
+ if "Linux" in platform.system():
current_platform = spack.platforms.Linux()
elif "Darwin" in platform.system():
current_platform = spack.platforms.Darwin()
@@ -86,25 +82,6 @@ def test_operating_system_conversion_to_dict():
@pytest.mark.parametrize(
- "cpu_flag,target_name",
- [
- # Test that specific flags can be used in queries
- ("ssse3", "haswell"),
- ("popcnt", "nehalem"),
- ("avx512f", "skylake_avx512"),
- ("avx512ifma", "icelake"),
- # Test that proxy flags can be used in queries too
- ("sse3", "nehalem"),
- ("avx512", "skylake_avx512"),
- ("avx512", "icelake"),
- ],
-)
-def test_target_container_semantic(cpu_flag, target_name):
- target = spack.target.Target(target_name)
- assert cpu_flag in target
-
-
-@pytest.mark.parametrize(
"item,architecture_str",
[
# We can search the architecture string representation
@@ -120,59 +97,6 @@ def test_arch_spec_container_semantic(item, architecture_str):
assert item in architecture
-@pytest.mark.parametrize(
- "compiler_spec,target_name,expected_flags",
- [
- # Check compilers with version numbers from a single toolchain
- ("gcc@4.7.2", "ivybridge", "-march=core-avx-i -mtune=core-avx-i"),
- # Check mixed toolchains
- ("clang@8.0.0", "broadwell", ""),
- ("clang@3.5", "x86_64", "-march=x86-64 -mtune=generic"),
- # Check Apple's Clang compilers
- ("apple-clang@9.1.0", "x86_64", "-march=x86-64"),
- ],
-)
-@pytest.mark.filterwarnings("ignore:microarchitecture specific")
-def test_optimization_flags(compiler_spec, target_name, expected_flags, config):
- target = spack.target.Target(target_name)
- compiler = spack.compilers.compilers_for_spec(compiler_spec).pop()
- opt_flags = target.optimization_flags(compiler)
- assert opt_flags == expected_flags
-
-
-@pytest.mark.parametrize(
- "compiler,real_version,target_str,expected_flags",
- [
- (CompilerSpec("gcc@=9.2.0"), None, "haswell", "-march=haswell -mtune=haswell"),
- # Check that custom string versions are accepted
- (
- CompilerSpec("gcc@=10foo"),
- "9.2.0",
- "icelake",
- "-march=icelake-client -mtune=icelake-client",
- ),
- # Check that we run version detection (4.4.0 doesn't support icelake)
- (
- CompilerSpec("gcc@=4.4.0-special"),
- "9.2.0",
- "icelake",
- "-march=icelake-client -mtune=icelake-client",
- ),
- # Check that the special case for Apple's clang is treated correctly
- # i.e. it won't try to detect the version again
- (CompilerSpec("apple-clang@=9.1.0"), None, "x86_64", "-march=x86-64"),
- ],
-)
-def test_optimization_flags_with_custom_versions(
- compiler, real_version, target_str, expected_flags, monkeypatch, config
-):
- target = spack.target.Target(target_str)
- if real_version:
- monkeypatch.setattr(spack.compiler.Compiler, "get_real_version", lambda x: real_version)
- opt_flags = target.optimization_flags(compiler)
- assert opt_flags == expected_flags
-
-
@pytest.mark.regression("15306")
@pytest.mark.parametrize(
"architecture_tuple,constraint_tuple",
@@ -202,36 +126,13 @@ def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constra
],
)
@pytest.mark.usefixtures("mock_packages", "config")
-@pytest.mark.only_clingo("Fixing the parser broke this test for the original concretizer.")
+@pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="tests are for x86_64 uarch ranges"
+)
def test_concretize_target_ranges(root_target_range, dep_target_range, result, monkeypatch):
- # Monkeypatch so that all concretization is done as if the machine is core2
- monkeypatch.setattr(spack.platforms.test.Test, "default", "core2")
- spec = Spec(f"a %gcc@10 foobar=bar target={root_target_range} ^b target={dep_target_range}")
+ spec = Spec(
+ f"pkg-a %gcc@10 foobar=bar target={root_target_range} ^pkg-b target={dep_target_range}"
+ )
with spack.concretize.disable_compiler_existence_check():
spec.concretize()
- assert spec.target == spec["b"].target == result
-
-
-@pytest.mark.parametrize(
- "versions,default,expected",
- [
- (["21.11", "21.9"], "21.11", False),
- (["21.11", "21.9"], "21.9", True),
- (["21.11", "21.9"], None, False),
- ],
-)
-@pytest.mark.skipif(sys.platform == "win32", reason="Cray does not use windows")
-def test_cray_platform_detection(versions, default, expected, tmpdir, monkeypatch, working_env):
- ex_path = str(tmpdir.join("fake_craype_dir"))
- fs.mkdirp(ex_path)
-
- with fs.working_dir(ex_path):
- for version in versions:
- fs.touch(version)
- if default:
- os.symlink(default, "default")
-
- monkeypatch.setattr(spack.platforms.cray, "_ex_craype_dir", ex_path)
- os.environ["MODULEPATH"] = "/opt/cray/pe"
-
- assert spack.platforms.cray.Cray.detect() == expected
+ assert spec.target == spec["pkg-b"].target == result
diff --git a/lib/spack/spack/test/audit.py b/lib/spack/spack/test/audit.py
index 98e6ad83c8..18994fa88b 100644
--- a/lib/spack/spack/test/audit.py
+++ b/lib/spack/spack/test/audit.py
@@ -19,14 +19,23 @@ import spack.config
(["missing-dependency"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
# The package use a non existing variant in a depends_on directive
(["wrong-variant-in-depends-on"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
+ # This package has a GitHub pull request commit patch URL
+ (["invalid-github-pull-commits-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
# This package has a GitHub patch URL without full_index=1
(["invalid-github-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
# This package has invalid GitLab patch URLs
(["invalid-gitlab-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
# This package has invalid GitLab patch URLs
(["invalid-selfhosted-gitlab-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
- # This package has a stand-alone 'test*' method in build-time callbacks
- (["fail-test-audit"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]),
+ # This package has a stand-alone test method in build-time callbacks
+ (["fail-test-audit"], ["PKG-PROPERTIES"]),
+ # This package implements and uses several deprecated stand-alone
+ # test methods
+ (["fail-test-audit-deprecated"], ["PKG-DEPRECATED-ATTRIBUTES"]),
+ # This package has stand-alone test methods without non-trivial docstrings
+ (["fail-test-audit-docstring"], ["PKG-PROPERTIES"]),
+ # This package has a stand-alone test method without an implementation
+ (["fail-test-audit-impl"], ["PKG-PROPERTIES"]),
# This package has no issues
(["mpileaks"], None),
# This package has a conflict with a trigger which cannot constrain the constraint
@@ -39,7 +48,7 @@ def test_package_audits(packages, expected_errors, mock_packages):
# Check that errors were reported only for the expected failure
actual_errors = [check for check, errors in reports if errors]
- msg = [str(e) for _, errors in reports for e in errors]
+ msg = "\n".join([str(e) for _, errors in reports for e in errors])
if expected_errors:
assert expected_errors == actual_errors, msg
else:
diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py
index 5544c521d1..d8383ca0fe 100644
--- a/lib/spack/spack/test/bindist.py
+++ b/lib/spack/spack/test/bindist.py
@@ -8,33 +8,40 @@ import gzip
import io
import json
import os
+import pathlib
import platform
+import shutil
import sys
import tarfile
import urllib.error
import urllib.request
import urllib.response
-from pathlib import PurePath
+from pathlib import Path, PurePath
-import py
import pytest
-from llnl.util.filesystem import join_path, visit_directory_tree
+import archspec.cpu
+
+from llnl.util.filesystem import copy_tree, join_path, visit_directory_tree
+from llnl.util.symlink import readlink
import spack.binary_distribution as bindist
import spack.caches
+import spack.compilers
import spack.config
import spack.fetch_strategy
import spack.hooks.sbang as sbang
import spack.main
-import spack.mirror
-import spack.repo
+import spack.mirrors.mirror
+import spack.paths
+import spack.spec
+import spack.stage
import spack.store
import spack.util.gpg
import spack.util.spack_yaml as syaml
import spack.util.url as url_util
import spack.util.web as web_util
-from spack.binary_distribution import get_buildfile_manifest
+from spack.binary_distribution import CannotListKeys, GenerateIndexError, get_buildfile_manifest
from spack.directory_layout import DirectoryLayout
from spack.paths import test_path
from spack.spec import Spec
@@ -62,88 +69,67 @@ def cache_directory(tmpdir):
@pytest.fixture(scope="module")
-def mirror_dir(tmpdir_factory):
- dir = tmpdir_factory.mktemp("mirror")
- dir.ensure("build_cache", dir=True)
- yield str(dir)
- dir.join("build_cache").remove()
+def config_directory(tmp_path_factory):
+ # Copy defaults to a temporary "site" scope
+ defaults_dir = tmp_path_factory.mktemp("test_configs")
+ config_path = pathlib.Path(spack.paths.etc_path)
+ copy_tree(str(config_path / "defaults"), str(defaults_dir / "site"))
+ # Create a "user" scope
+ (defaults_dir / "user").mkdir()
-@pytest.fixture(scope="function")
-def test_mirror(mirror_dir):
- mirror_url = url_util.path_to_file_url(mirror_dir)
- mirror_cmd("add", "--scope", "site", "test-mirror-func", mirror_url)
- yield mirror_dir
- mirror_cmd("rm", "--scope=site", "test-mirror-func")
+ # Detect compilers
+ cfg_scopes = [
+ spack.config.DirectoryConfigScope(name, str(defaults_dir / name))
+ for name in [f"site/{platform.system().lower()}", "site", "user"]
+ ]
+ with spack.config.use_configuration(*cfg_scopes):
+ _ = spack.compilers.find_compilers(scope="site")
+ yield defaults_dir
-@pytest.fixture(scope="module")
-def config_directory(tmpdir_factory):
- tmpdir = tmpdir_factory.mktemp("test_configs")
- # restore some sane defaults for packages and config
- config_path = py.path.local(spack.paths.etc_path)
- modules_yaml = config_path.join("defaults", "modules.yaml")
- os_modules_yaml = config_path.join(
- "defaults", "%s" % platform.system().lower(), "modules.yaml"
- )
- packages_yaml = config_path.join("defaults", "packages.yaml")
- config_yaml = config_path.join("defaults", "config.yaml")
- repos_yaml = config_path.join("defaults", "repos.yaml")
- tmpdir.ensure("site", dir=True)
- tmpdir.ensure("user", dir=True)
- tmpdir.ensure("site/%s" % platform.system().lower(), dir=True)
- modules_yaml.copy(tmpdir.join("site", "modules.yaml"))
- os_modules_yaml.copy(tmpdir.join("site/%s" % platform.system().lower(), "modules.yaml"))
- packages_yaml.copy(tmpdir.join("site", "packages.yaml"))
- config_yaml.copy(tmpdir.join("site", "config.yaml"))
- repos_yaml.copy(tmpdir.join("site", "repos.yaml"))
- yield tmpdir
- tmpdir.remove()
+ shutil.rmtree(str(defaults_dir))
@pytest.fixture(scope="function")
-def default_config(tmpdir, config_directory, monkeypatch, install_mockery_mutable_config):
- # This fixture depends on install_mockery_mutable_config to ensure
+def default_config(tmp_path, config_directory, monkeypatch, install_mockery):
+ # This fixture depends on install_mockery to ensure
# there is a clear order of initialization. The substitution of the
# config scopes here is done on top of the substitution that comes with
- # install_mockery_mutable_config
- mutable_dir = tmpdir.mkdir("mutable_config").join("tmp")
- config_directory.copy(mutable_dir)
-
- cfg = spack.config.Configuration(
- *[
- spack.config.ConfigScope(name, str(mutable_dir))
- for name in ["site/%s" % platform.system().lower(), "site", "user"]
- ]
- )
-
- spack.config.CONFIG, old_config = cfg, spack.config.CONFIG
- spack.config.CONFIG.set("repos", [spack.paths.mock_packages_path])
- njobs = spack.config.get("config:build_jobs")
- if not njobs:
- spack.config.set("config:build_jobs", 4, scope="user")
- extensions = spack.config.get("config:template_dirs")
- if not extensions:
- spack.config.set(
- "config:template_dirs",
- [os.path.join(spack.paths.share_path, "templates")],
- scope="user",
- )
-
- mutable_dir.ensure("build_stage", dir=True)
- build_stage = spack.config.get("config:build_stage")
- if not build_stage:
- spack.config.set(
- "config:build_stage", [str(mutable_dir.join("build_stage"))], scope="user"
- )
- timeout = spack.config.get("config:connect_timeout")
- if not timeout:
- spack.config.set("config:connect_timeout", 10, scope="user")
+ # install_mockery
+ mutable_dir = tmp_path / "mutable_config" / "tmp"
+ mutable_dir.mkdir(parents=True)
+ copy_tree(str(config_directory), str(mutable_dir))
+
+ scopes = [
+ spack.config.DirectoryConfigScope(name, str(mutable_dir / name))
+ for name in [f"site/{platform.system().lower()}", "site", "user"]
+ ]
+
+ with spack.config.use_configuration(*scopes):
+ spack.config.CONFIG.set("repos", [spack.paths.mock_packages_path])
+ njobs = spack.config.get("config:build_jobs")
+ if not njobs:
+ spack.config.set("config:build_jobs", 4, scope="user")
+ extensions = spack.config.get("config:template_dirs")
+ if not extensions:
+ spack.config.set(
+ "config:template_dirs",
+ [os.path.join(spack.paths.share_path, "templates")],
+ scope="user",
+ )
- yield spack.config.CONFIG
+ (mutable_dir / "build_stage").mkdir()
+ build_stage = spack.config.get("config:build_stage")
+ if not build_stage:
+ spack.config.set(
+ "config:build_stage", [str(mutable_dir / "build_stage")], scope="user"
+ )
+ timeout = spack.config.get("config:connect_timeout")
+ if not timeout:
+ spack.config.set("config:connect_timeout", 10, scope="user")
- spack.config.CONFIG = old_config
- mutable_dir.remove()
+ yield spack.config.CONFIG
@pytest.fixture(scope="function")
@@ -201,6 +187,9 @@ def dummy_prefix(tmpdir):
with open(data, "w") as f:
f.write("hello world")
+ with open(p.join(".spack", "binary_distribution"), "w") as f:
+ f.write("{}")
+
os.symlink("app", relative_app_link)
os.symlink(app, absolute_app_link)
@@ -217,9 +206,9 @@ else:
@pytest.mark.requires_executables(*args)
@pytest.mark.maybeslow
@pytest.mark.usefixtures(
- "default_config", "cache_directory", "install_dir_default_layout", "test_mirror"
+ "default_config", "cache_directory", "install_dir_default_layout", "temporary_mirror"
)
-def test_default_rpaths_create_install_default_layout(mirror_dir):
+def test_default_rpaths_create_install_default_layout(temporary_mirror_dir):
"""
Test the creation and installation of buildcaches with default rpaths
into the default directory layout scheme.
@@ -232,13 +221,12 @@ def test_default_rpaths_create_install_default_layout(mirror_dir):
install_cmd("--no-cache", sy_spec.name)
# Create a buildache
- buildcache_cmd("push", "-u", mirror_dir, cspec.name, sy_spec.name)
-
+ buildcache_cmd("push", "-u", temporary_mirror_dir, cspec.name, sy_spec.name)
# Test force overwrite create buildcache (-f option)
- buildcache_cmd("push", "-uf", mirror_dir, cspec.name)
+ buildcache_cmd("push", "-uf", temporary_mirror_dir, cspec.name)
# Create mirror index
- buildcache_cmd("update-index", mirror_dir)
+ buildcache_cmd("update-index", temporary_mirror_dir)
# List the buildcaches in the mirror
buildcache_cmd("list", "-alv")
@@ -266,9 +254,9 @@ def test_default_rpaths_create_install_default_layout(mirror_dir):
@pytest.mark.maybeslow
@pytest.mark.nomockstage
@pytest.mark.usefixtures(
- "default_config", "cache_directory", "install_dir_non_default_layout", "test_mirror"
+ "default_config", "cache_directory", "install_dir_non_default_layout", "temporary_mirror"
)
-def test_default_rpaths_install_nondefault_layout(mirror_dir):
+def test_default_rpaths_install_nondefault_layout(temporary_mirror_dir):
"""
Test the creation and installation of buildcaches with default rpaths
into the non-default directory layout scheme.
@@ -289,9 +277,9 @@ def test_default_rpaths_install_nondefault_layout(mirror_dir):
@pytest.mark.maybeslow
@pytest.mark.nomockstage
@pytest.mark.usefixtures(
- "default_config", "cache_directory", "install_dir_default_layout", "test_mirror"
+ "default_config", "cache_directory", "install_dir_default_layout", "temporary_mirror"
)
-def test_relative_rpaths_install_default_layout(mirror_dir):
+def test_relative_rpaths_install_default_layout(temporary_mirror_dir):
"""
Test the creation and installation of buildcaches with relative
rpaths into the default directory layout scheme.
@@ -318,9 +306,9 @@ def test_relative_rpaths_install_default_layout(mirror_dir):
@pytest.mark.maybeslow
@pytest.mark.nomockstage
@pytest.mark.usefixtures(
- "default_config", "cache_directory", "install_dir_non_default_layout", "test_mirror"
+ "default_config", "cache_directory", "install_dir_non_default_layout", "temporary_mirror"
)
-def test_relative_rpaths_install_nondefault(mirror_dir):
+def test_relative_rpaths_install_nondefault(temporary_mirror_dir):
"""
Test the installation of buildcaches with relativized rpaths
into the non-default directory layout scheme.
@@ -331,13 +319,13 @@ def test_relative_rpaths_install_nondefault(mirror_dir):
buildcache_cmd("install", "-uf", cspec.name)
-def test_push_and_fetch_keys(mock_gnupghome):
+def test_push_and_fetch_keys(mock_gnupghome, tmp_path):
testpath = str(mock_gnupghome)
mirror = os.path.join(testpath, "mirror")
mirrors = {"test-mirror": url_util.path_to_file_url(mirror)}
- mirrors = spack.mirror.MirrorCollection(mirrors)
- mirror = spack.mirror.Mirror(url_util.path_to_file_url(mirror))
+ mirrors = spack.mirrors.mirror.MirrorCollection(mirrors)
+ mirror = spack.mirrors.mirror.Mirror(url_util.path_to_file_url(mirror))
gpg_dir1 = os.path.join(testpath, "gpg1")
gpg_dir2 = os.path.join(testpath, "gpg2")
@@ -351,7 +339,7 @@ def test_push_and_fetch_keys(mock_gnupghome):
assert len(keys) == 1
fpr = keys[0]
- bindist.push_keys(mirror, keys=[fpr], regenerate_index=True)
+ bindist._url_push_keys(mirror, keys=[fpr], tmpdir=str(tmp_path), update_index=True)
# dir 2: import the key from the mirror, and confirm that its fingerprint
# matches the one created above
@@ -369,9 +357,9 @@ def test_push_and_fetch_keys(mock_gnupghome):
@pytest.mark.maybeslow
@pytest.mark.nomockstage
@pytest.mark.usefixtures(
- "default_config", "cache_directory", "install_dir_non_default_layout", "test_mirror"
+ "default_config", "cache_directory", "install_dir_non_default_layout", "temporary_mirror"
)
-def test_built_spec_cache(mirror_dir):
+def test_built_spec_cache(temporary_mirror_dir):
"""Because the buildcache list command fetches the buildcache index
and uses it to populate the binary_distribution built spec cache, when
this test calls get_mirrors_for_spec, it is testing the popluation of
@@ -385,16 +373,14 @@ def test_built_spec_cache(mirror_dir):
assert any([r["spec"] == s for r in results])
-def fake_dag_hash(spec):
+def fake_dag_hash(spec, length=None):
# Generate an arbitrary hash that is intended to be different than
# whatever a Spec reported before (to test actions that trigger when
# the hash changes)
- return "tal4c7h4z0gqmixb1eqa92mjoybxn5l6"
+ return "tal4c7h4z0gqmixb1eqa92mjoybxn5l6"[:length]
-@pytest.mark.usefixtures(
- "install_mockery_mutable_config", "mock_packages", "mock_fetch", "test_mirror"
-)
+@pytest.mark.usefixtures("install_mockery", "mock_packages", "mock_fetch", "temporary_mirror")
def test_spec_needs_rebuild(monkeypatch, tmpdir):
"""Make sure needs_rebuild properly compares remote hash
against locally computed one, avoiding unnecessary rebuilds"""
@@ -423,7 +409,7 @@ def test_spec_needs_rebuild(monkeypatch, tmpdir):
assert rebuild
-@pytest.mark.usefixtures("install_mockery_mutable_config", "mock_packages", "mock_fetch")
+@pytest.mark.usefixtures("install_mockery", "mock_packages", "mock_fetch")
def test_generate_index_missing(monkeypatch, tmpdir, mutable_config):
"""Ensure spack buildcache index only reports available packages"""
@@ -460,54 +446,62 @@ def test_generate_index_missing(monkeypatch, tmpdir, mutable_config):
assert "libelf" not in cache_list
-def test_generate_indices_key_error(monkeypatch, capfd):
+def test_generate_key_index_failure(monkeypatch, tmp_path):
+ def list_url(url, recursive=False):
+ if "fails-listing" in url:
+ raise Exception("Couldn't list the directory")
+ return ["first.pub", "second.pub"]
+
+ def push_to_url(*args, **kwargs):
+ raise Exception("Couldn't upload the file")
+
+ monkeypatch.setattr(web_util, "list_url", list_url)
+ monkeypatch.setattr(web_util, "push_to_url", push_to_url)
+
+ with pytest.raises(CannotListKeys, match="Encountered problem listing keys"):
+ bindist.generate_key_index("s3://non-existent/fails-listing", str(tmp_path))
+
+ with pytest.raises(GenerateIndexError, match="problem pushing .* Couldn't upload"):
+ bindist.generate_key_index("s3://non-existent/fails-uploading", str(tmp_path))
+
+
+def test_generate_package_index_failure(monkeypatch, tmp_path, capfd):
def mock_list_url(url, recursive=False):
- print("mocked list_url({0}, {1})".format(url, recursive))
- raise KeyError("Test KeyError handling")
+ raise Exception("Some HTTP error")
monkeypatch.setattr(web_util, "list_url", mock_list_url)
test_url = "file:///fake/keys/dir"
- # Make sure generate_key_index handles the KeyError
- bindist.generate_key_index(test_url)
+ with pytest.raises(GenerateIndexError, match="Unable to generate package index"):
+ bindist._url_generate_package_index(test_url, str(tmp_path))
- err = capfd.readouterr()[1]
- assert "Warning: No keys at {0}".format(test_url) in err
-
- # Make sure generate_package_index handles the KeyError
- bindist.generate_package_index(test_url)
-
- err = capfd.readouterr()[1]
- assert "Warning: No packages at {0}".format(test_url) in err
+ assert (
+ "Warning: Encountered problem listing packages at "
+ f"{test_url}/{bindist.BUILD_CACHE_RELATIVE_PATH}: Some HTTP error"
+ in capfd.readouterr().err
+ )
-def test_generate_indices_exception(monkeypatch, capfd):
+def test_generate_indices_exception(monkeypatch, tmp_path, capfd):
def mock_list_url(url, recursive=False):
- print("mocked list_url({0}, {1})".format(url, recursive))
raise Exception("Test Exception handling")
monkeypatch.setattr(web_util, "list_url", mock_list_url)
- test_url = "file:///fake/keys/dir"
-
- # Make sure generate_key_index handles the Exception
- bindist.generate_key_index(test_url)
+ url = "file:///fake/keys/dir"
- err = capfd.readouterr()[1]
- expect = "Encountered problem listing keys at {0}".format(test_url)
- assert expect in err
+ with pytest.raises(GenerateIndexError, match=f"Encountered problem listing keys at {url}"):
+ bindist.generate_key_index(url, str(tmp_path))
- # Make sure generate_package_index handles the Exception
- bindist.generate_package_index(test_url)
+ with pytest.raises(GenerateIndexError, match="Unable to generate package index"):
+ bindist._url_generate_package_index(url, str(tmp_path))
- err = capfd.readouterr()[1]
- expect = "Encountered problem listing packages at {0}".format(test_url)
- assert expect in err
+ assert f"Encountered problem listing packages at {url}" in capfd.readouterr().err
@pytest.mark.usefixtures("mock_fetch", "install_mockery")
-def test_update_sbang(tmpdir, test_mirror):
+def test_update_sbang(tmpdir, temporary_mirror):
"""Test the creation and installation of buildcaches with default rpaths
into the non-default directory layout scheme, triggering an update of the
sbang.
@@ -518,7 +512,7 @@ def test_update_sbang(tmpdir, test_mirror):
old_spec_hash_str = "/{0}".format(old_spec.dag_hash())
# Need a fake mirror with *function* scope.
- mirror_dir = test_mirror
+ mirror_dir = temporary_mirror
# Assume all commands will concretize old_spec the same way.
install_cmd("--no-cache", old_spec.name)
@@ -570,11 +564,18 @@ def test_update_sbang(tmpdir, test_mirror):
uninstall_cmd("-y", "/%s" % new_spec.dag_hash())
-def test_install_legacy_buildcache_layout(install_mockery_mutable_config):
+@pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64",
+ reason="test data uses gcc 4.5.0 which does not support aarch64",
+)
+def test_install_legacy_buildcache_layout(mutable_config, compiler_factory, install_mockery):
"""Legacy buildcache layout involved a nested archive structure
where the .spack file contained a repeated spec.json and another
compressed archive file containing the install tree. This test
makes sure we can still read that layout."""
+ mutable_config.set(
+ "compilers", [compiler_factory(spec="gcc@4.5.0", operating_system="debian6")]
+ )
legacy_layout_dir = os.path.join(test_path, "data", "mirrors", "legacy_layout")
mirror_url = "file://{0}".format(legacy_layout_dir)
filename = (
@@ -658,11 +659,13 @@ def test_build_manifest_visitor(tmpdir):
assert all(os.path.islink(f) for f in visitor.symlinks)
-def test_text_relocate_if_needed(install_mockery, mock_fetch, monkeypatch, capfd):
- spec = Spec("needs-text-relocation").concretized()
- install_cmd(str(spec))
+def test_text_relocate_if_needed(install_mockery, temporary_store, mock_fetch, monkeypatch, capfd):
+ install_cmd("needs-text-relocation")
+
+ specs = temporary_store.db.query("needs-text-relocation")
+ assert len(specs) == 1
+ manifest = get_buildfile_manifest(specs[0])
- manifest = get_buildfile_manifest(spec)
assert join_path("bin", "exe") in manifest["text_to_relocate"]
assert join_path("bin", "otherexe") not in manifest["text_to_relocate"]
assert join_path("bin", "secretexe") not in manifest["text_to_relocate"]
@@ -887,24 +890,29 @@ def test_default_index_json_404():
fetcher.conditional_fetch()
-def test_tarball_doesnt_include_buildinfo_twice(tmpdir):
+def _all_parents(prefix):
+ parts = [p for p in prefix.split("/")]
+ return ["/".join(parts[: i + 1]) for i in range(len(parts))]
+
+
+def test_tarball_doesnt_include_buildinfo_twice(tmp_path: Path):
"""When tarballing a package that was installed from a buildcache, make
sure that the buildinfo file is not included twice in the tarball."""
- p = tmpdir.mkdir("prefix")
- p.mkdir(".spack")
+ p = tmp_path / "prefix"
+ p.joinpath(".spack").mkdir(parents=True)
# Create a binary_distribution file in the .spack folder
- with open(p.join(".spack", "binary_distribution"), "w") as f:
+ with open(p / ".spack" / "binary_distribution", "w") as f:
f.write(syaml.dump({"metadata", "old"}))
# Now create a tarball, which should include a new binary_distribution file
- tarball = str(tmpdir.join("prefix.tar.gz"))
+ tarball = str(tmp_path / "prefix.tar.gz")
bindist._do_create_tarball(
- tarfile_path=tarball, binaries_dir=p.strpath, buildinfo={"metadata": "new"}
+ tarfile_path=tarball, binaries_dir=str(p), buildinfo={"metadata": "new"}
)
- expected_prefix = p.strpath.lstrip("/")
+ expected_prefix = str(p).lstrip("/")
# Verify we don't have a repeated binary_distribution file,
# and that the tarball contains the new one, not the old one.
@@ -913,21 +921,20 @@ def test_tarball_doesnt_include_buildinfo_twice(tmpdir):
"metadata": "new"
}
assert tar.getnames() == [
- f"{expected_prefix}",
+ *_all_parents(expected_prefix),
f"{expected_prefix}/.spack",
f"{expected_prefix}/.spack/binary_distribution",
]
-def test_reproducible_tarball_is_reproducible(tmpdir):
- p = tmpdir.mkdir("prefix")
- p.mkdir("bin")
- p.mkdir(".spack")
-
- app = p.join("bin", "app")
+def test_reproducible_tarball_is_reproducible(tmp_path: Path):
+ p = tmp_path / "prefix"
+ p.joinpath("bin").mkdir(parents=True)
+ p.joinpath(".spack").mkdir(parents=True)
+ app = p / "bin" / "app"
- tarball_1 = str(tmpdir.join("prefix-1.tar.gz"))
- tarball_2 = str(tmpdir.join("prefix-2.tar.gz"))
+ tarball_1 = str(tmp_path / "prefix-1.tar.gz")
+ tarball_2 = str(tmp_path / "prefix-2.tar.gz")
with open(app, "w") as f:
f.write("hello world")
@@ -936,16 +943,16 @@ def test_reproducible_tarball_is_reproducible(tmpdir):
# Create a tarball with a certain mtime of bin/app
os.utime(app, times=(0, 0))
- bindist._do_create_tarball(tarball_1, binaries_dir=p.strpath, buildinfo=buildinfo)
+ bindist._do_create_tarball(tarball_1, binaries_dir=str(p), buildinfo=buildinfo)
# Do it another time with different mtime of bin/app
os.utime(app, times=(10, 10))
- bindist._do_create_tarball(tarball_2, binaries_dir=p.strpath, buildinfo=buildinfo)
+ bindist._do_create_tarball(tarball_2, binaries_dir=str(p), buildinfo=buildinfo)
# They should be bitwise identical:
assert filecmp.cmp(tarball_1, tarball_2, shallow=False)
- expected_prefix = p.strpath.lstrip("/")
+ expected_prefix = str(p).lstrip("/")
# Sanity check for contents:
with tarfile.open(tarball_1, mode="r") as f:
@@ -954,7 +961,7 @@ def test_reproducible_tarball_is_reproducible(tmpdir):
assert m.uname == m.gname == ""
assert set(f.getnames()) == {
- f"{expected_prefix}",
+ *_all_parents(expected_prefix),
f"{expected_prefix}/bin",
f"{expected_prefix}/bin/app",
f"{expected_prefix}/.spack",
@@ -1002,8 +1009,10 @@ def test_tarball_normalized_permissions(tmpdir):
def test_tarball_common_prefix(dummy_prefix, tmpdir):
- """Tests whether Spack can figure out the package directory
- from the tarball contents, and strip them when extracting."""
+ """Tests whether Spack can figure out the package directory from the tarball contents, and
+ strip them when extracting. This test creates a CURRENT_BUILD_CACHE_LAYOUT_VERSION=1 type
+ tarball where the parent directories of the package prefix are missing. Spack should be able
+ to figure out the common prefix and extract the files into the correct location."""
# When creating a tarball, Python (and tar) use relative paths,
# Absolute paths become relative to `/`, so drop the leading `/`.
@@ -1020,11 +1029,10 @@ def test_tarball_common_prefix(dummy_prefix, tmpdir):
common_prefix = bindist._ensure_common_prefix(tar)
assert common_prefix == expected_prefix
- # Strip the prefix from the tar entries
- bindist._tar_strip_component(tar, common_prefix)
-
# Extract into prefix2
- tar.extractall(path="prefix2")
+ tar.extractall(
+ path="prefix2", members=bindist._tar_strip_component(tar, common_prefix)
+ )
# Verify files are all there at the correct level.
assert set(os.listdir("prefix2")) == {"bin", "share", ".spack"}
@@ -1036,21 +1044,38 @@ def test_tarball_common_prefix(dummy_prefix, tmpdir):
assert set(os.listdir(os.path.join("prefix2", "share"))) == {"file"}
# Relative symlink should still be correct
- assert os.readlink(os.path.join("prefix2", "bin", "relative_app_link")) == "app"
+ assert readlink(os.path.join("prefix2", "bin", "relative_app_link")) == "app"
# Absolute symlink should remain absolute -- this is for relocation to fix up.
- assert os.readlink(os.path.join("prefix2", "bin", "absolute_app_link")) == os.path.join(
+ assert readlink(os.path.join("prefix2", "bin", "absolute_app_link")) == os.path.join(
dummy_prefix, "bin", "app"
)
+def test_tarfile_missing_binary_distribution_file(tmpdir):
+ """A tarfile that does not contain a .spack/binary_distribution file cannot be
+ used to install."""
+ with tmpdir.as_cwd():
+ # An empty .spack dir.
+ with tarfile.open("empty.tar", mode="w") as tar:
+ tarinfo = tarfile.TarInfo(name="example/.spack")
+ tarinfo.type = tarfile.DIRTYPE
+ tar.addfile(tarinfo)
+
+ with pytest.raises(ValueError, match="missing binary_distribution file"):
+ bindist._ensure_common_prefix(tarfile.open("empty.tar", mode="r"))
+
+
def test_tarfile_without_common_directory_prefix_fails(tmpdir):
"""A tarfile that only contains files without a common package directory
should fail to extract, as we won't know where to put the files."""
with tmpdir.as_cwd():
# Create a broken tarball with just a file, no directories.
with tarfile.open("empty.tar", mode="w") as tar:
- tar.addfile(tarfile.TarInfo(name="example/file"), fileobj=io.BytesIO(b"hello"))
+ tar.addfile(
+ tarfile.TarInfo(name="example/.spack/binary_distribution"),
+ fileobj=io.BytesIO(b"hello"),
+ )
with pytest.raises(ValueError, match="Tarball does not contain a common prefix"):
bindist._ensure_common_prefix(tarfile.open("empty.tar", mode="r"))
@@ -1091,7 +1116,7 @@ def test_tarfile_of_spec_prefix(tmpdir):
# Verify that entries are added in depth-first pre-order, files preceding dirs,
# entries ordered alphabetically
assert tar.getnames() == [
- f"{expected_prefix}",
+ *_all_parents(expected_prefix),
f"{expected_prefix}/file",
f"{expected_prefix}/hardlink",
f"{expected_prefix}/symlink",
diff --git a/lib/spack/spack/test/bootstrap.py b/lib/spack/spack/test/bootstrap.py
index 5f11e2d381..603fe90fad 100644
--- a/lib/spack/spack/test/bootstrap.py
+++ b/lib/spack/spack/test/bootstrap.py
@@ -9,6 +9,7 @@ import spack.bootstrap
import spack.bootstrap.config
import spack.bootstrap.core
import spack.compilers
+import spack.config
import spack.environment
import spack.store
import spack.util.path
@@ -228,3 +229,25 @@ def test_source_is_disabled(mutable_config):
spack.config.add("bootstrap:trusted:{0}:{1}".format(conf["name"], False))
with pytest.raises(ValueError):
spack.bootstrap.core.source_is_enabled_or_raise(conf)
+
+
+@pytest.mark.regression("45247")
+def test_use_store_does_not_try_writing_outside_root(tmp_path, monkeypatch, mutable_config):
+ """Tests that when we use the 'use_store' context manager, there is no attempt at creating
+ a Store outside the given root.
+ """
+ initial_store = mutable_config.get("config:install_tree:root")
+ user_store = tmp_path / "store"
+
+ fn = spack.store.Store.__init__
+
+ def _checked_init(self, root, *args, **kwargs):
+ fn(self, root, *args, **kwargs)
+ assert self.root == str(user_store)
+
+ monkeypatch.setattr(spack.store.Store, "__init__", _checked_init)
+
+ spack.store.reinitialize()
+ with spack.store.use_store(user_store):
+ assert spack.config.CONFIG.get("config:install_tree:root") == str(user_store)
+ assert spack.config.CONFIG.get("config:install_tree:root") == initial_store
diff --git a/lib/spack/spack/test/build_distribution.py b/lib/spack/spack/test/build_distribution.py
index 6ab68659e6..f2976da8ae 100644
--- a/lib/spack/spack/test/build_distribution.py
+++ b/lib/spack/spack/test/build_distribution.py
@@ -9,38 +9,43 @@ import os.path
import pytest
import spack.binary_distribution as bd
-import spack.main
+import spack.mirrors.mirror
import spack.spec
-import spack.util.url
-
-install = spack.main.SpackCommand("install")
+from spack.installer import PackageInstaller
pytestmark = pytest.mark.not_on_windows("does not run on windows")
-def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmpdir):
- with tmpdir.as_cwd():
- spec = spack.spec.Spec("trivial-install-test-package").concretized()
- install(str(spec))
-
- # Runs fine the first time, throws the second time
- out_url = spack.util.url.path_to_file_url(str(tmpdir))
- bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True))
- with pytest.raises(bd.NoOverwriteException):
- bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True))
-
- # Should work fine with force=True
- bd.push_or_raise(spec, out_url, bd.PushOptions(force=True, unsigned=True))
-
- # Remove the tarball and try again.
- # This must *also* throw, because of the existing .spec.json file
- os.remove(
- os.path.join(
- bd.build_cache_prefix("."),
- bd.tarball_directory_name(spec),
- bd.tarball_name(spec, ".spack"),
- )
- )
-
- with pytest.raises(bd.NoOverwriteException):
- bd.push_or_raise(spec, out_url, bd.PushOptions(unsigned=True))
+def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmp_path):
+ spec = spack.spec.Spec("trivial-install-test-package").concretized()
+ PackageInstaller([spec.package], fake=True).install()
+
+ specs = [spec]
+
+ # populate cache, everything is new
+ mirror = spack.mirrors.mirror.Mirror.from_local_path(str(tmp_path))
+ with bd.make_uploader(mirror) as uploader:
+ skipped = uploader.push_or_raise(specs)
+ assert not skipped
+
+ # should skip all
+ with bd.make_uploader(mirror) as uploader:
+ skipped = uploader.push_or_raise(specs)
+ assert skipped == specs
+
+ # with force=True none should be skipped
+ with bd.make_uploader(mirror, force=True) as uploader:
+ skipped = uploader.push_or_raise(specs)
+ assert not skipped
+
+ # Remove the tarball, which should cause push to push.
+ os.remove(
+ tmp_path
+ / bd.BUILD_CACHE_RELATIVE_PATH
+ / bd.tarball_directory_name(spec)
+ / bd.tarball_name(spec, ".spack")
+ )
+
+ with bd.make_uploader(mirror) as uploader:
+ skipped = uploader.push_or_raise(specs)
+ assert not skipped
diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py
index fb9874daeb..dd42d5cb45 100644
--- a/lib/spack/spack/test/build_environment.py
+++ b/lib/spack/spack/test/build_environment.py
@@ -2,25 +2,31 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
import platform
import posixpath
+import sys
import pytest
+import archspec.cpu
+
from llnl.path import Path, convert_to_platform_path
from llnl.util.filesystem import HeaderList, LibraryList
import spack.build_environment
+import spack.compiler
+import spack.compilers
import spack.config
+import spack.deptypes as dt
import spack.package_base
+import spack.paths
import spack.spec
import spack.util.spack_yaml as syaml
from spack.build_environment import UseMode, _static_to_shared_library, dso_suffix
from spack.context import Context
+from spack.installer import PackageInstaller
from spack.paths import build_env_path
-from spack.util.cpus import determine_number_of_jobs
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
@@ -63,7 +69,8 @@ def build_environment(working_env):
os.environ["SPACK_LINKER_ARG"] = "-Wl,"
os.environ["SPACK_DTAGS_TO_ADD"] = "--disable-new-dtags"
os.environ["SPACK_DTAGS_TO_STRIP"] = "--enable-new-dtags"
- os.environ["SPACK_SYSTEM_DIRS"] = "/usr/include /usr/lib"
+ os.environ["SPACK_SYSTEM_DIRS"] = "/usr/include|/usr/lib"
+ os.environ["SPACK_MANAGED_DIRS"] = f"{prefix}/opt/spack"
os.environ["SPACK_TARGET_ARGS"] = ""
if "SPACK_DEPENDENCIES" in os.environ:
@@ -175,11 +182,11 @@ def test_cc_not_changed_by_modules(monkeypatch, working_env):
def test_setup_dependent_package_inherited_modules(
- config, working_env, mock_packages, install_mockery, mock_fetch
+ working_env, mock_packages, install_mockery, mock_fetch
):
# This will raise on regression
s = spack.spec.Spec("cmake-client-inheritor").concretized()
- s.package.do_install()
+ PackageInstaller([s.package]).install()
@pytest.mark.parametrize(
@@ -285,6 +292,25 @@ def test_compiler_config_modifications(
assert name not in os.environ
+def test_compiler_custom_env(config, mock_packages, monkeypatch, working_env):
+ if sys.platform == "win32":
+ test_path = r"C:\test\path\element\custom-env" + "\\"
+ else:
+ test_path = r"/test/path/element/custom-env/"
+
+ def custom_env(pkg, env):
+ env.prepend_path("PATH", test_path)
+ env.append_flags("ENV_CUSTOM_CC_FLAGS", "--custom-env-flag1")
+
+ pkg = spack.spec.Spec("cmake").concretized().package
+ monkeypatch.setattr(pkg.compiler, "setup_custom_environment", custom_env)
+ spack.build_environment.setup_package(pkg, False)
+
+ # Note: trailing slash may be stripped by internal logic
+ assert test_path[:-1] in os.environ["PATH"]
+ assert "--custom-env-flag1" in os.environ["ENV_CUSTOM_CC_FLAGS"]
+
+
def test_external_config_env(mock_packages, mutable_config, working_env):
cmake_config = {
"externals": [
@@ -455,14 +481,14 @@ def test_parallel_false_is_not_propagating(default_mock_concretization):
# a foobar=bar (parallel = False)
# |
# b (parallel =True)
- s = default_mock_concretization("a foobar=bar")
+ s = default_mock_concretization("pkg-a foobar=bar")
- spack.build_environment.set_package_py_globals(s.package)
- assert s["a"].package.module.make_jobs == 1
+ spack.build_environment.set_package_py_globals(s.package, context=Context.BUILD)
+ assert s["pkg-a"].package.module.make_jobs == 1
- spack.build_environment.set_package_py_globals(s["b"].package)
- assert s["b"].package.module.make_jobs == spack.build_environment.determine_number_of_jobs(
- parallel=s["b"].package.parallel
+ spack.build_environment.set_package_py_globals(s["pkg-b"].package, context=Context.BUILD)
+ assert s["pkg-b"].package.module.make_jobs == spack.config.determine_number_of_jobs(
+ parallel=s["pkg-b"].package.parallel
)
@@ -492,9 +518,33 @@ def test_setting_dtags_based_on_config(config_setting, expected_flag, config, mo
assert dtags_to_add.value == expected_flag
+def test_module_globals_available_at_setup_dependent_time(
+ monkeypatch, mutable_config, mock_packages, working_env
+):
+ """Spack built package externaltest depends on an external package
+ externaltool. Externaltool's setup_dependent_package needs to be able to
+ access globals on the dependent"""
+
+ def setup_dependent_package(module, dependent_spec):
+ # Make sure set_package_py_globals was already called on
+ # dependents
+ # ninja is always set by the setup context and is not None
+ dependent_module = dependent_spec.package.module
+ assert hasattr(dependent_module, "ninja")
+ assert dependent_module.ninja is not None
+ dependent_spec.package.test_attr = True
+
+ externaltool = spack.spec.Spec("externaltest").concretized()
+ monkeypatch.setattr(
+ externaltool["externaltool"].package, "setup_dependent_package", setup_dependent_package
+ )
+ spack.build_environment.setup_package(externaltool.package, False)
+ assert externaltool.package.test_attr
+
+
def test_build_jobs_sequential_is_sequential():
assert (
- determine_number_of_jobs(
+ spack.config.determine_number_of_jobs(
parallel=False,
max_cpus=8,
config=spack.config.Configuration(
@@ -508,7 +558,7 @@ def test_build_jobs_sequential_is_sequential():
def test_build_jobs_command_line_overrides():
assert (
- determine_number_of_jobs(
+ spack.config.determine_number_of_jobs(
parallel=True,
max_cpus=1,
config=spack.config.Configuration(
@@ -519,7 +569,7 @@ def test_build_jobs_command_line_overrides():
== 10
)
assert (
- determine_number_of_jobs(
+ spack.config.determine_number_of_jobs(
parallel=True,
max_cpus=100,
config=spack.config.Configuration(
@@ -533,7 +583,7 @@ def test_build_jobs_command_line_overrides():
def test_build_jobs_defaults():
assert (
- determine_number_of_jobs(
+ spack.config.determine_number_of_jobs(
parallel=True,
max_cpus=10,
config=spack.config.Configuration(
@@ -543,7 +593,7 @@ def test_build_jobs_defaults():
== 1
)
assert (
- determine_number_of_jobs(
+ spack.config.determine_number_of_jobs(
parallel=True,
max_cpus=10,
config=spack.config.Configuration(
@@ -554,24 +604,6 @@ def test_build_jobs_defaults():
)
-def test_dirty_disable_module_unload(config, mock_packages, working_env, mock_module_cmd):
- """Test that on CRAY platform 'module unload' is not called if the 'dirty'
- option is on.
- """
- s = spack.spec.Spec("a").concretized()
-
- # If called with "dirty" we don't unload modules, so no calls to the
- # `module` function on Cray
- spack.build_environment.setup_package(s.package, dirty=True)
- assert not mock_module_cmd.calls
-
- # If called without "dirty" we unload modules on Cray
- spack.build_environment.setup_package(s.package, dirty=False)
- assert mock_module_cmd.calls
- assert any(("unload", "cray-libsci") == item[0] for item in mock_module_cmd.calls)
- assert any(("unload", "cray-mpich") == item[0] for item in mock_module_cmd.calls)
-
-
class TestModuleMonkeyPatcher:
def test_getting_attributes(self, default_mock_concretization):
s = default_mock_concretization("libelf")
@@ -589,7 +621,7 @@ class TestModuleMonkeyPatcher:
# We can also propagate the settings to classes in the MRO
module_wrapper.propagate_changes_to_mro()
- for cls in inspect.getmro(type(s.package)):
+ for cls in s.package.__class__.__mro__:
current_module = cls.module
if current_module == spack.package_base:
break
@@ -685,3 +717,112 @@ def test_clear_compiler_related_runtime_variables_of_build_deps(default_mock_con
assert "FC" not in result
assert "F77" not in result
assert result["ANOTHER_VAR"] == "this-should-be-present"
+
+
+@pytest.mark.parametrize("context", [Context.BUILD, Context.RUN])
+def test_build_system_globals_only_set_on_root_during_build(default_mock_concretization, context):
+ """Test whether when setting up a build environment, the build related globals are set only
+ in the top level spec.
+
+ TODO: Since module instances are globals themselves, and Spack defines properties on them, they
+ persist across tests. In principle this is not terrible, cause the variables are mostly static.
+ But obviously it can lead to very hard to find bugs... We should get rid of those globals and
+ define them instead as a property on the package instance.
+ """
+ root = spack.spec.Spec("mpileaks").concretized()
+ build_variables = ("std_cmake_args", "std_meson_args", "std_pip_args")
+
+ # See todo above, we clear out any properties that may have been set by the previous test.
+ # Commenting this loop will make the test fail. I'm leaving it here as a reminder that those
+ # globals were always a bad idea, and we should pass them to the package instance.
+ for spec in root.traverse():
+ for variable in build_variables:
+ spec.package.module.__dict__.pop(variable, None)
+
+ spack.build_environment.SetupContext(root, context=context).set_all_package_py_globals()
+
+ # Excpect the globals to be set at the root in a build context only.
+ should_be_set = lambda depth: context == Context.BUILD and depth == 0
+
+ for depth, spec in root.traverse(depth=True, root=True):
+ for variable in build_variables:
+ assert hasattr(spec.package.module, variable) == should_be_set(depth)
+
+
+def test_rpath_with_duplicate_link_deps():
+ """If we have two instances of one package in the same link sub-dag, only the newest version is
+ rpath'ed. This is for runtime support without splicing."""
+ runtime_1 = spack.spec.Spec("runtime@=1.0")
+ runtime_2 = spack.spec.Spec("runtime@=2.0")
+ child = spack.spec.Spec("child@=1.0")
+ root = spack.spec.Spec("root@=1.0")
+
+ root.add_dependency_edge(child, depflag=dt.LINK, virtuals=())
+ root.add_dependency_edge(runtime_2, depflag=dt.LINK, virtuals=())
+ child.add_dependency_edge(runtime_1, depflag=dt.LINK, virtuals=())
+
+ rpath_deps = spack.build_environment._get_rpath_deps_from_spec(root, transitive_rpaths=True)
+ assert child in rpath_deps
+ assert runtime_2 in rpath_deps
+ assert runtime_1 not in rpath_deps
+
+
+@pytest.mark.parametrize(
+ "compiler_spec,target_name,expected_flags",
+ [
+ # Homogeneous compilers
+ ("gcc@4.7.2", "ivybridge", "-march=core-avx-i -mtune=core-avx-i"),
+ ("clang@3.5", "x86_64", "-march=x86-64 -mtune=generic"),
+ ("apple-clang@9.1.0", "x86_64", "-march=x86-64"),
+ # Mixed toolchain
+ ("clang@8.0.0", "broadwell", ""),
+ ],
+)
+@pytest.mark.filterwarnings("ignore:microarchitecture specific")
+@pytest.mark.not_on_windows("Windows doesn't support the compiler wrapper")
+def test_optimization_flags(compiler_spec, target_name, expected_flags, compiler_factory):
+ target = archspec.cpu.TARGETS[target_name]
+ compiler_dict = compiler_factory(spec=compiler_spec, operating_system="")["compiler"]
+ if compiler_spec == "clang@8.0.0":
+ compiler_dict["paths"] = {
+ "cc": "/path/to/clang-8",
+ "cxx": "/path/to/clang++-8",
+ "f77": "/path/to/gfortran-9",
+ "fc": "/path/to/gfortran-9",
+ }
+ compiler = spack.compilers.compiler_from_dict(compiler_dict)
+ opt_flags = spack.build_environment.optimization_flags(compiler, target)
+ assert opt_flags == expected_flags
+
+
+@pytest.mark.parametrize(
+ "compiler_str,real_version,target_str,expected_flags",
+ [
+ ("gcc@=9.2.0", None, "haswell", "-march=haswell -mtune=haswell"),
+ # Check that custom string versions are accepted
+ ("gcc@=10foo", "9.2.0", "icelake", "-march=icelake-client -mtune=icelake-client"),
+ # Check that we run version detection (4.4.0 doesn't support icelake)
+ ("gcc@=4.4.0-special", "9.2.0", "icelake", "-march=icelake-client -mtune=icelake-client"),
+ # Check that the special case for Apple's clang is treated correctly
+ # i.e. it won't try to detect the version again
+ ("apple-clang@=9.1.0", None, "x86_64", "-march=x86-64"),
+ ],
+)
+def test_optimization_flags_with_custom_versions(
+ compiler_str,
+ real_version,
+ target_str,
+ expected_flags,
+ monkeypatch,
+ mutable_config,
+ compiler_factory,
+):
+ target = archspec.cpu.TARGETS[target_str]
+ compiler_dict = compiler_factory(spec=compiler_str, operating_system="redhat6")
+ mutable_config.set("compilers", [compiler_dict])
+ if real_version:
+ monkeypatch.setattr(spack.compiler.Compiler, "get_real_version", lambda x: real_version)
+ compiler = spack.compilers.compiler_from_dict(compiler_dict["compiler"])
+
+ opt_flags = spack.build_environment.optimization_flags(compiler, target)
+ assert opt_flags == expected_flags
diff --git a/lib/spack/spack/test/build_system_guess.py b/lib/spack/spack/test/build_system_guess.py
index 97e357b8eb..8a632ea3b1 100644
--- a/lib/spack/spack/test/build_system_guess.py
+++ b/lib/spack/spack/test/build_system_guess.py
@@ -56,6 +56,6 @@ def test_build_systems(url_and_build_system):
url, build_system = url_and_build_system
with spack.stage.Stage(url) as stage:
stage.fetch()
- guesser = spack.cmd.create.BuildSystemGuesser()
- guesser(stage, url)
+ guesser = spack.cmd.create.BuildSystemAndLanguageGuesser()
+ guesser(stage.archive_file, url)
assert build_system == guesser.build_system
diff --git a/lib/spack/spack/test/build_systems.py b/lib/spack/spack/test/build_systems.py
index a77dfb0907..47173b7dfc 100644
--- a/lib/spack/spack/test/build_systems.py
+++ b/lib/spack/spack/test/build_systems.py
@@ -9,14 +9,20 @@ import os
import py.path
import pytest
+import archspec.cpu
+
import llnl.util.filesystem as fs
import spack.build_systems.autotools
import spack.build_systems.cmake
+import spack.builder
import spack.environment
+import spack.error
+import spack.paths
import spack.platforms
-import spack.repo
+import spack.platforms.test
from spack.build_environment import ChildError, setup_package
+from spack.installer import PackageInstaller
from spack.spec import Spec
from spack.util.executable import which
@@ -92,10 +98,10 @@ class TestTargets:
@pytest.mark.not_on_windows("autotools not available on windows")
-@pytest.mark.usefixtures("config", "mock_packages")
+@pytest.mark.usefixtures("mock_packages")
class TestAutotoolsPackage:
def test_with_or_without(self, default_mock_concretization):
- s = default_mock_concretization("a")
+ s = default_mock_concretization("pkg-a")
options = s.package.with_or_without("foo")
# Ensure that values that are not representing a feature
@@ -127,7 +133,7 @@ class TestAutotoolsPackage:
assert "--without-lorem-ipsum" in options
def test_none_is_allowed(self, default_mock_concretization):
- s = default_mock_concretization("a foo=none")
+ s = default_mock_concretization("pkg-a foo=none")
options = s.package.with_or_without("foo")
# Ensure that values that are not representing a feature
@@ -137,41 +143,39 @@ class TestAutotoolsPackage:
assert "--without-baz" in options
assert "--no-fee" in options
- def test_libtool_archive_files_are_deleted_by_default(
- self, default_mock_concretization, mutable_database
- ):
+ def test_libtool_archive_files_are_deleted_by_default(self, mutable_database):
# Install a package that creates a mock libtool archive
- s = default_mock_concretization("libtool-deletion")
- s.package.do_install(explicit=True)
+ s = Spec("libtool-deletion").concretized()
+ PackageInstaller([s.package], explicit=True).install()
# Assert the libtool archive is not there and we have
# a log of removed files
- assert not os.path.exists(s.package.builder.libtool_archive_file)
+ assert not os.path.exists(spack.builder.create(s.package).libtool_archive_file)
search_directory = os.path.join(s.prefix, ".spack")
libtool_deletion_log = fs.find(search_directory, "removed_la_files.txt", recursive=True)
assert libtool_deletion_log
def test_libtool_archive_files_might_be_installed_on_demand(
- self, mutable_database, monkeypatch, default_mock_concretization
+ self, mutable_database, monkeypatch
):
# Install a package that creates a mock libtool archive,
# patch its package to preserve the installation
- s = default_mock_concretization("libtool-deletion")
- monkeypatch.setattr(type(s.package.builder), "install_libtool_archives", True)
- s.package.do_install(explicit=True)
+ s = Spec("libtool-deletion").concretized()
+ monkeypatch.setattr(
+ type(spack.builder.create(s.package)), "install_libtool_archives", True
+ )
+ PackageInstaller([s.package], explicit=True).install()
# Assert libtool archives are installed
- assert os.path.exists(s.package.builder.libtool_archive_file)
+ assert os.path.exists(spack.builder.create(s.package).libtool_archive_file)
- def test_autotools_gnuconfig_replacement(self, default_mock_concretization, mutable_database):
+ def test_autotools_gnuconfig_replacement(self, mutable_database):
"""
Tests whether only broken config.sub and config.guess are replaced with
files from working alternatives from the gnuconfig package.
"""
- s = default_mock_concretization(
- "autotools-config-replacement +patch_config_files +gnuconfig"
- )
- s.package.do_install()
+ s = Spec("autotools-config-replacement +patch_config_files +gnuconfig").concretized()
+ PackageInstaller([s.package]).install()
with open(os.path.join(s.prefix.broken, "config.sub")) as f:
assert "gnuconfig version of config.sub" in f.read()
@@ -185,16 +189,12 @@ class TestAutotoolsPackage:
with open(os.path.join(s.prefix.working, "config.guess")) as f:
assert "gnuconfig version of config.guess" not in f.read()
- def test_autotools_gnuconfig_replacement_disabled(
- self, default_mock_concretization, mutable_database
- ):
+ def test_autotools_gnuconfig_replacement_disabled(self, mutable_database):
"""
Tests whether disabling patch_config_files
"""
- s = default_mock_concretization(
- "autotools-config-replacement ~patch_config_files +gnuconfig"
- )
- s.package.do_install()
+ s = Spec("autotools-config-replacement ~patch_config_files +gnuconfig").concretized()
+ PackageInstaller([s.package]).install()
with open(os.path.join(s.prefix.broken, "config.sub")) as f:
assert "gnuconfig version of config.sub" not in f.read()
@@ -209,6 +209,9 @@ class TestAutotoolsPackage:
assert "gnuconfig version of config.guess" not in f.read()
@pytest.mark.disable_clean_stage_check
+ @pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
+ )
def test_autotools_gnuconfig_replacement_no_gnuconfig(self, mutable_database, monkeypatch):
"""
Tests whether a useful error message is shown when patch_config_files is
@@ -220,7 +223,7 @@ class TestAutotoolsPackage:
msg = "Cannot patch config files: missing dependencies: gnuconfig"
with pytest.raises(ChildError, match=msg):
- s.package.do_install()
+ PackageInstaller([s.package]).install()
@pytest.mark.disable_clean_stage_check
def test_broken_external_gnuconfig(self, mutable_database, tmpdir):
@@ -261,7 +264,7 @@ class TestCMakePackage:
# Call the function on a CMakePackage instance
s = default_mock_concretization("cmake-client")
expected = spack.build_systems.cmake.CMakeBuilder.std_args(s.package)
- assert s.package.builder.std_cmake_args == expected
+ assert spack.builder.create(s.package).std_cmake_args == expected
# Call it on another kind of package
s = default_mock_concretization("mpich")
@@ -269,7 +272,7 @@ class TestCMakePackage:
def test_cmake_bad_generator(self, default_mock_concretization):
s = default_mock_concretization("cmake-client")
- with pytest.raises(spack.package_base.InstallError):
+ with pytest.raises(spack.error.InstallError):
spack.build_systems.cmake.CMakeBuilder.std_args(
s.package, generator="Yellow Sticky Notes"
)
@@ -381,7 +384,9 @@ def test_autotools_args_from_conditional_variant(default_mock_concretization):
is not met. When this is the case, the variant is not set in the spec."""
s = default_mock_concretization("autotools-conditional-variants-test")
assert "example" not in s.variants
- assert len(s.package.builder._activate_or_not("example", "enable", "disable")) == 0
+ assert (
+ len(spack.builder.create(s.package)._activate_or_not("example", "enable", "disable")) == 0
+ )
def test_autoreconf_search_path_args_multiple(default_mock_concretization, tmpdir):
diff --git a/lib/spack/spack/test/builder.py b/lib/spack/spack/test/builder.py
index 9a99e6ee08..ab611dbaec 100644
--- a/lib/spack/spack/test/builder.py
+++ b/lib/spack/spack/test/builder.py
@@ -8,7 +8,10 @@ import pytest
from llnl.util.filesystem import touch
+import spack.builder
import spack.paths
+import spack.repo
+import spack.spec
@pytest.fixture()
@@ -164,3 +167,20 @@ def test_install_time_test_callback(tmpdir, config, mock_packages, mock_stage):
with open(s.package.tester.test_log_file, "r") as f:
results = f.read().replace("\n", " ")
assert "PyTestCallback test" in results
+
+
+@pytest.mark.regression("43097")
+@pytest.mark.usefixtures("builder_test_repository", "config")
+def test_mixins_with_builders(working_env):
+ """Tests that run_after and run_before callbacks are accumulated correctly,
+ when mixins are used with builders.
+ """
+ s = spack.spec.Spec("builder-and-mixins").concretized()
+ builder = spack.builder.create(s.package)
+
+ # Check that callbacks added by the mixin are in the list
+ assert any(fn.__name__ == "before_install" for _, fn in builder.run_before_callbacks)
+ assert any(fn.__name__ == "after_install" for _, fn in builder.run_after_callbacks)
+
+ # Check that callback from the GenericBuilder are in the list too
+ assert any(fn.__name__ == "sanity_check_prefix" for _, fn in builder.run_after_callbacks)
diff --git a/lib/spack/spack/test/buildtask.py b/lib/spack/spack/test/buildtask.py
index a571e1dccd..3e90c9ad7e 100644
--- a/lib/spack/spack/test/buildtask.py
+++ b/lib/spack/spack/test/buildtask.py
@@ -5,28 +5,46 @@
import pytest
+import spack.error
import spack.installer as inst
import spack.repo
import spack.spec
def test_build_task_errors(install_mockery):
- with pytest.raises(ValueError, match="must be a package"):
- inst.BuildTask("abc", None, False, 0, 0, 0, [])
-
+ """Check expected errors when instantiating a BuildTask."""
spec = spack.spec.Spec("trivial-install-test-package")
pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
+
+ # The value of the request argument is expected to not be checked.
+ for pkg in [None, "abc"]:
+ with pytest.raises(TypeError, match="must be a package"):
+ inst.BuildTask(pkg, None)
+
with pytest.raises(ValueError, match="must have a concrete spec"):
- inst.BuildTask(pkg_cls(spec), None, False, 0, 0, 0, [])
+ inst.BuildTask(pkg_cls(spec), None)
+ # Using a concretized package now means the request argument is checked.
spec.concretize()
assert spec.concrete
- with pytest.raises(ValueError, match="must have a build request"):
- inst.BuildTask(spec.package, None, False, 0, 0, 0, [])
+ with pytest.raises(TypeError, match="is not a valid build request"):
+ inst.BuildTask(spec.package, None)
+
+ # Using a valid package and spec, the next check is the status argument.
request = inst.BuildRequest(spec.package, {})
- with pytest.raises(inst.InstallError, match="Cannot create a build task"):
- inst.BuildTask(spec.package, request, False, 0, 0, inst.STATUS_REMOVED, [])
+
+ with pytest.raises(TypeError, match="is not a valid build status"):
+ inst.BuildTask(spec.package, request, status="queued")
+
+ # Now we can check that build tasks cannot be create when the status
+ # indicates the task is/should've been removed.
+ with pytest.raises(spack.error.InstallError, match="Cannot create a task"):
+ inst.BuildTask(spec.package, request, status=inst.BuildStatus.REMOVED)
+
+ # Also make sure to not accept an incompatible installed argument value.
+ with pytest.raises(TypeError, match="'installed' be a 'set', not 'str'"):
+ inst.BuildTask(spec.package, request, installed="mpileaks")
def test_build_task_basics(install_mockery):
@@ -36,8 +54,8 @@ def test_build_task_basics(install_mockery):
# Ensure key properties match expectations
request = inst.BuildRequest(spec.package, {})
- task = inst.BuildTask(spec.package, request, False, 0, 0, inst.STATUS_ADDED, [])
- assert task.explicit # package was "explicitly" requested
+ task = inst.BuildTask(spec.package, request=request, status=inst.BuildStatus.QUEUED)
+ assert not task.explicit
assert task.priority == len(task.uninstalled_deps)
assert task.key == (task.priority, task.sequence)
@@ -58,16 +76,16 @@ def test_build_task_strings(install_mockery):
# Ensure key properties match expectations
request = inst.BuildRequest(spec.package, {})
- task = inst.BuildTask(spec.package, request, False, 0, 0, inst.STATUS_ADDED, [])
+ task = inst.BuildTask(spec.package, request=request, status=inst.BuildStatus.QUEUED)
# Cover __repr__
irep = task.__repr__()
assert irep.startswith(task.__class__.__name__)
- assert "status='queued'" in irep # == STATUS_ADDED
+ assert "BuildStatus.QUEUED" in irep
assert "sequence=" in irep
# Cover __str__
istr = str(task)
- assert "status=queued" in istr # == STATUS_ADDED
+ assert "status=queued" in istr # == BuildStatus.QUEUED
assert "#dependencies=1" in istr
assert "priority=" in istr
diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py
index 25aab774a7..f65bef9b01 100644
--- a/lib/spack/spack/test/cc.py
+++ b/lib/spack/spack/test/cc.py
@@ -13,9 +13,8 @@ import pytest
import spack.build_environment
import spack.config
-import spack.spec
from spack.paths import build_env_path
-from spack.util.environment import SYSTEM_DIRS, set_env
+from spack.util.environment import SYSTEM_DIR_CASE_ENTRY, set_env
from spack.util.executable import Executable, ProcessError
#
@@ -127,7 +126,7 @@ spack_cppflags = ["-g", "-O1", "-DVAR=VALUE"]
spack_cflags = ["-Wall"]
spack_cxxflags = ["-Werror"]
spack_fflags = ["-w"]
-spack_ldflags = ["-L", "foo"]
+spack_ldflags = ["-Wl,--gc-sections", "-L", "foo"]
spack_ldlibs = ["-lfoo"]
lheaderpad = ["-Wl,-headerpad_max_install_names"]
@@ -159,7 +158,8 @@ def wrapper_environment(working_env):
SPACK_DEBUG_LOG_ID="foo-hashabc",
SPACK_COMPILER_SPEC="gcc@4.4.7",
SPACK_SHORT_SPEC="foo@1.2 arch=linux-rhel6-x86_64 /hashabc",
- SPACK_SYSTEM_DIRS=":".join(SYSTEM_DIRS),
+ SPACK_SYSTEM_DIRS=SYSTEM_DIR_CASE_ENTRY,
+ SPACK_MANAGED_DIRS="/path/to/spack-1/opt/spack/*|/path/to/spack-2/opt/spack/*",
SPACK_CC_RPATH_ARG="-Wl,-rpath,",
SPACK_CXX_RPATH_ARG="-Wl,-rpath,",
SPACK_F77_RPATH_ARG="-Wl,-rpath,",
@@ -199,7 +199,7 @@ def check_args(cc, args, expected):
"""
with set_env(SPACK_TEST_COMMAND="dump-args"):
cc_modified_args = cc(*args, output=str).strip().split("\n")
- assert expected == cc_modified_args
+ assert cc_modified_args == expected
def check_args_contents(cc, args, must_contain, must_not_contain):
@@ -272,13 +272,49 @@ def test_ld_mode(wrapper_environment):
assert dump_mode(ld, ["foo.o", "bar.o", "baz.o", "-o", "foo", "-Wl,-rpath,foo"]) == "ld"
+def test_ld_unterminated_rpath(wrapper_environment):
+ check_args(
+ ld,
+ ["foo.o", "bar.o", "baz.o", "-o", "foo", "-rpath"],
+ ["ld", "--disable-new-dtags", "foo.o", "bar.o", "baz.o", "-o", "foo", "-rpath"],
+ )
+
+
+def test_xlinker_unterminated_rpath(wrapper_environment):
+ check_args(
+ cc,
+ ["foo.o", "bar.o", "baz.o", "-o", "foo", "-Xlinker", "-rpath"],
+ [real_cc]
+ + target_args
+ + [
+ "-Wl,--disable-new-dtags",
+ "foo.o",
+ "bar.o",
+ "baz.o",
+ "-o",
+ "foo",
+ "-Xlinker",
+ "-rpath",
+ ],
+ )
+
+
+def test_wl_unterminated_rpath(wrapper_environment):
+ check_args(
+ cc,
+ ["foo.o", "bar.o", "baz.o", "-o", "foo", "-Wl,-rpath"],
+ [real_cc]
+ + target_args
+ + ["-Wl,--disable-new-dtags", "foo.o", "bar.o", "baz.o", "-o", "foo", "-Wl,-rpath"],
+ )
+
+
def test_ld_flags(wrapper_environment, wrapper_flags):
check_args(
ld,
test_args,
["ld"]
+ test_include_paths
- + [spack_ldflags[i] + spack_ldflags[i + 1] for i in range(0, len(spack_ldflags), 2)]
+ test_library_paths
+ ["--disable-new-dtags"]
+ test_rpaths
@@ -306,13 +342,14 @@ def test_cc_flags(wrapper_environment, wrapper_flags):
[real_cc]
+ target_args
+ test_include_paths
- + [spack_ldflags[i] + spack_ldflags[i + 1] for i in range(0, len(spack_ldflags), 2)]
+ + ["-Lfoo"]
+ test_library_paths
+ ["-Wl,--disable-new-dtags"]
+ test_wl_rpaths
+ test_args_without_paths
+ spack_cppflags
+ spack_cflags
+ + ["-Wl,--gc-sections"]
+ spack_ldlibs,
)
@@ -324,12 +361,13 @@ def test_cxx_flags(wrapper_environment, wrapper_flags):
[real_cc]
+ target_args
+ test_include_paths
- + [spack_ldflags[i] + spack_ldflags[i + 1] for i in range(0, len(spack_ldflags), 2)]
+ + ["-Lfoo"]
+ test_library_paths
+ ["-Wl,--disable-new-dtags"]
+ test_wl_rpaths
+ test_args_without_paths
+ spack_cppflags
+ + ["-Wl,--gc-sections"]
+ spack_ldlibs,
)
@@ -341,17 +379,27 @@ def test_fc_flags(wrapper_environment, wrapper_flags):
[real_cc]
+ target_args
+ test_include_paths
- + [spack_ldflags[i] + spack_ldflags[i + 1] for i in range(0, len(spack_ldflags), 2)]
+ + ["-Lfoo"]
+ test_library_paths
+ ["-Wl,--disable-new-dtags"]
+ test_wl_rpaths
+ test_args_without_paths
+ spack_fflags
+ spack_cppflags
+ + ["-Wl,--gc-sections"]
+ spack_ldlibs,
)
+def test_always_cflags(wrapper_environment, wrapper_flags):
+ with set_env(SPACK_ALWAYS_CFLAGS="-always1 -always2"):
+ check_args(
+ cc,
+ ["-v", "--cmd-line-v-opt"],
+ [real_cc] + ["-always1", "-always2"] + ["-v", "--cmd-line-v-opt"],
+ )
+
+
def test_Wl_parsing(wrapper_environment):
check_args(
cc,
@@ -825,14 +873,14 @@ def test_keep_and_replace(wrapper_environment):
),
(
"config:flags:keep_werror:specific",
- ["-Werror", "-Werror=specific", "-bah"],
- ["-Werror=specific", "-bah"],
+ ["-Werror", "-Werror=specific", "-Werror-specific2", "-bah"],
+ ["-Wno-error", "-Werror=specific", "-Werror-specific2", "-bah"],
["-Werror"],
),
(
"config:flags:keep_werror:none",
["-Werror", "-Werror=specific", "-bah"],
- ["-bah", "-Wno-error", "-Wno-error=specific"],
+ ["-Wno-error", "-Wno-error=specific", "-bah"],
["-Werror", "-Werror=specific"],
),
# check non-standard -Werror opts like -Werror-implicit-function-declaration
@@ -845,13 +893,13 @@ def test_keep_and_replace(wrapper_environment):
(
"config:flags:keep_werror:specific",
["-Werror", "-Werror-implicit-function-declaration", "-bah"],
- ["-Werror-implicit-function-declaration", "-bah", "-Wno-error"],
+ ["-Wno-error", "-Werror-implicit-function-declaration", "-bah"],
["-Werror"],
),
(
"config:flags:keep_werror:none",
["-Werror", "-Werror-implicit-function-declaration", "-bah"],
- ["-bah", "-Wno-error=implicit-function-declaration"],
+ ["-Wno-error", "-bah", "-Wno-error=implicit-function-declaration"],
["-Werror", "-Werror-implicit-function-declaration"],
),
],
@@ -907,3 +955,108 @@ def test_linker_strips_loopopt(wrapper_environment, wrapper_flags):
result = cc(*(test_args + ["-loopopt=0", "-c", "x.c"]), output=str)
result = result.strip().split("\n")
assert "-loopopt=0" in result
+
+
+def test_spack_managed_dirs_are_prioritized(wrapper_environment):
+ # We have two different stores with 5 packages divided over them
+ pkg1 = "/path/to/spack-1/opt/spack/linux-ubuntu22.04-zen2/gcc-13.2.0/pkg-1.0-abcdef"
+ pkg2 = "/path/to/spack-1/opt/spack/linux-ubuntu22.04-zen2/gcc-13.2.0/pkg-2.0-abcdef"
+ pkg3 = "/path/to/spack-2/opt/spack/linux-ubuntu22.04-zen2/gcc-13.2.0/pkg-3.0-abcdef"
+ pkg4 = "/path/to/spack-2/opt/spack/linux-ubuntu22.04-zen2/gcc-13.2.0/pkg-4.0-abcdef"
+ pkg5 = "/path/to/spack-2/opt/spack/linux-ubuntu22.04-zen2/gcc-13.2.0/pkg-5.0-abcdef"
+
+ variables = {
+ # cppflags, ldflags from the command line, config or package.py take highest priority
+ "SPACK_CPPFLAGS": f"-I/usr/local/include -I/external-1/include -I{pkg1}/include",
+ "SPACK_LDFLAGS": f"-L/usr/local/lib -L/external-1/lib -L{pkg1}/lib "
+ f"-Wl,-rpath,/usr/local/lib -Wl,-rpath,/external-1/lib -Wl,-rpath,{pkg1}/lib",
+ # automatic -L, -Wl,-rpath, -I flags from dependencies -- on the spack side they are
+ # already partitioned into "spack owned prefixes" and "non-spack owned prefixes"
+ "SPACK_STORE_LINK_DIRS": f"{pkg4}/lib:{pkg5}/lib",
+ "SPACK_STORE_RPATH_DIRS": f"{pkg4}/lib:{pkg5}/lib",
+ "SPACK_STORE_INCLUDE_DIRS": f"{pkg4}/include:{pkg5}/include",
+ "SPACK_LINK_DIRS": "/external-3/lib:/external-4/lib",
+ "SPACK_RPATH_DIRS": "/external-3/lib:/external-4/lib",
+ "SPACK_INCLUDE_DIRS": "/external-3/include:/external-4/include",
+ }
+
+ with set_env(SPACK_TEST_COMMAND="dump-args", **variables):
+ effective_call = (
+ cc(
+ # system paths
+ "-I/usr/include",
+ "-L/usr/lib",
+ "-Wl,-rpath,/usr/lib",
+ # some other externals
+ "-I/external-2/include",
+ "-L/external-2/lib",
+ "-Wl,-rpath,/external-2/lib",
+ # relative paths are considered "spack managed" since they are in the stage dir
+ "-I..",
+ "-L..",
+ "-Wl,-rpath,..", # pathological but simpler for the test.
+ # spack store paths
+ f"-I{pkg2}/include",
+ f"-I{pkg3}/include",
+ f"-L{pkg2}/lib",
+ f"-L{pkg3}/lib",
+ f"-Wl,-rpath,{pkg2}/lib",
+ f"-Wl,-rpath,{pkg3}/lib",
+ "hello.c",
+ "-o",
+ "hello",
+ output=str,
+ )
+ .strip()
+ .split("\n")
+ )
+
+ dash_I = [flag[2:] for flag in effective_call if flag.startswith("-I")]
+ dash_L = [flag[2:] for flag in effective_call if flag.startswith("-L")]
+ dash_Wl_rpath = [flag[11:] for flag in effective_call if flag.startswith("-Wl,-rpath")]
+
+ assert dash_I == [
+ # spack owned dirs from SPACK_*FLAGS
+ f"{pkg1}/include",
+ # spack owned dirs from command line & automatic flags for deps (in that order)]
+ "..",
+ f"{pkg2}/include", # from command line
+ f"{pkg3}/include", # from command line
+ f"{pkg4}/include", # from SPACK_STORE_INCLUDE_DIRS
+ f"{pkg5}/include", # from SPACK_STORE_INCLUDE_DIRS
+ # non-system dirs from SPACK_*FLAGS
+ "/external-1/include",
+ # non-system dirs from command line & automatic flags for deps (in that order)
+ "/external-2/include", # from command line
+ "/external-3/include", # from SPACK_INCLUDE_DIRS
+ "/external-4/include", # from SPACK_INCLUDE_DIRS
+ # system dirs from SPACK_*FLAGS
+ "/usr/local/include",
+ # system dirs from command line
+ "/usr/include",
+ ]
+
+ assert (
+ dash_L
+ == dash_Wl_rpath
+ == [
+ # spack owned dirs from SPACK_*FLAGS
+ f"{pkg1}/lib",
+ # spack owned dirs from command line & automatic flags for deps (in that order)
+ "..",
+ f"{pkg2}/lib", # from command line
+ f"{pkg3}/lib", # from command line
+ f"{pkg4}/lib", # from SPACK_STORE_LINK_DIRS
+ f"{pkg5}/lib", # from SPACK_STORE_LINK_DIRS
+ # non-system dirs from SPACK_*FLAGS
+ "/external-1/lib",
+ # non-system dirs from command line & automatic flags for deps (in that order)
+ "/external-2/lib", # from command line
+ "/external-3/lib", # from SPACK_LINK_DIRS
+ "/external-4/lib", # from SPACK_LINK_DIRS
+ # system dirs from SPACK_*FLAGS
+ "/usr/local/lib",
+ # system dirs from command line
+ "/usr/lib",
+ ]
+ )
diff --git a/lib/spack/spack/test/ci.py b/lib/spack/spack/test/ci.py
index e01b970c2d..0c9a10814a 100644
--- a/lib/spack/spack/test/ci.py
+++ b/lib/spack/spack/test/ci.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import itertools
import os
import subprocess
@@ -11,15 +10,11 @@ import pytest
import llnl.util.filesystem as fs
import spack.ci as ci
-import spack.ci_needs_workaround as cinw
-import spack.ci_optimization as ci_opt
-import spack.config
import spack.environment as ev
import spack.error
import spack.paths as spack_paths
+import spack.spec
import spack.util.git
-import spack.util.gpg
-import spack.util.spack_yaml as syaml
@pytest.fixture
@@ -51,7 +46,7 @@ class FakeWebResponder:
self._content = content_to_read
self._read = [False for c in content_to_read]
- def open(self, request):
+ def open(self, request, data=None, timeout=object()):
return self
def getcode(self):
@@ -203,165 +198,7 @@ def test_setup_spack_repro_version(tmpdir, capfd, last_two_git_commits, monkeypa
assert "Unable to merge {0}".format(c1) in err
-@pytest.mark.parametrize("obj, proto", [({}, [])])
-def test_ci_opt_argument_checking(obj, proto):
- """Check that matches() and subkeys() return False when `proto` is not a dict."""
- assert not ci_opt.matches(obj, proto)
- assert not ci_opt.subkeys(obj, proto)
-
-
-@pytest.mark.parametrize("yaml", [{"extends": 1}])
-def test_ci_opt_add_extends_non_sequence(yaml):
- """Check that add_extends() exits if 'extends' is not a sequence."""
- yaml_copy = yaml.copy()
- ci_opt.add_extends(yaml, None)
- assert yaml == yaml_copy
-
-
-def test_ci_workarounds():
- fake_root_spec = "x" * 544
- fake_spack_ref = "x" * 40
-
- common_variables = {"SPACK_IS_PR_PIPELINE": "False"}
-
- common_before_script = [
- 'git clone "https://github.com/spack/spack"',
- " && ".join(("pushd ./spack", 'git checkout "{ref}"'.format(ref=fake_spack_ref), "popd")),
- '. "./spack/share/spack/setup-env.sh"',
- ]
-
- def make_build_job(name, deps, stage, use_artifact_buildcache, optimize, use_dependencies):
- variables = common_variables.copy()
- variables["SPACK_JOB_SPEC_PKG_NAME"] = name
-
- result = {
- "stage": stage,
- "tags": ["tag-0", "tag-1"],
- "artifacts": {
- "paths": ["jobs_scratch_dir", "cdash_report", name + ".spec.json", name],
- "when": "always",
- },
- "retry": {"max": 2, "when": ["always"]},
- "after_script": ['rm -rf "./spack"'],
- "script": ["spack ci rebuild"],
- "image": {"name": "spack/centos7", "entrypoint": [""]},
- }
-
- if optimize:
- result["extends"] = [".c0", ".c1"]
- else:
- variables["SPACK_ROOT_SPEC"] = fake_root_spec
- result["before_script"] = common_before_script
-
- result["variables"] = variables
-
- if use_dependencies:
- result["dependencies"] = list(deps) if use_artifact_buildcache else []
- else:
- result["needs"] = [{"job": dep, "artifacts": use_artifact_buildcache} for dep in deps]
-
- return {name: result}
-
- def make_rebuild_index_job(use_artifact_buildcache, optimize, use_dependencies):
- result = {
- "stage": "stage-rebuild-index",
- "script": "spack buildcache update-index s3://mirror",
- "tags": ["tag-0", "tag-1"],
- "image": {"name": "spack/centos7", "entrypoint": [""]},
- "after_script": ['rm -rf "./spack"'],
- }
-
- if optimize:
- result["extends"] = ".c0"
- else:
- result["before_script"] = common_before_script
-
- return {"rebuild-index": result}
-
- def make_factored_jobs(optimize):
- return (
- {
- ".c0": {"before_script": common_before_script},
- ".c1": {"variables": {"SPACK_ROOT_SPEC": fake_root_spec}},
- }
- if optimize
- else {}
- )
-
- def make_stage_list(num_build_stages):
- return {
- "stages": (
- ["-".join(("stage", str(i))) for i in range(num_build_stages)]
- + ["stage-rebuild-index"]
- )
- }
-
- def make_yaml_obj(use_artifact_buildcache, optimize, use_dependencies):
- result = {}
-
- result.update(
- make_build_job(
- "pkg-a", [], "stage-0", use_artifact_buildcache, optimize, use_dependencies
- )
- )
-
- result.update(
- make_build_job(
- "pkg-b", ["pkg-a"], "stage-1", use_artifact_buildcache, optimize, use_dependencies
- )
- )
-
- result.update(
- make_build_job(
- "pkg-c",
- ["pkg-a", "pkg-b"],
- "stage-2",
- use_artifact_buildcache,
- optimize,
- use_dependencies,
- )
- )
-
- result.update(make_rebuild_index_job(use_artifact_buildcache, optimize, use_dependencies))
-
- result.update(make_factored_jobs(optimize))
-
- result.update(make_stage_list(3))
-
- return result
-
- # test every combination of:
- # use artifact buildcache: true or false
- # run optimization pass: true or false
- # convert needs to dependencies: true or false
- for use_ab in (False, True):
- original = make_yaml_obj(
- use_artifact_buildcache=use_ab, optimize=False, use_dependencies=False
- )
-
- for opt, deps in itertools.product(*(((False, True),) * 2)):
- # neither optimizing nor converting needs->dependencies
- if not (opt or deps):
- # therefore, nothing to test
- continue
-
- predicted = make_yaml_obj(
- use_artifact_buildcache=use_ab, optimize=opt, use_dependencies=deps
- )
-
- actual = original.copy()
- if opt:
- actual = ci_opt.optimizer(actual)
- if deps:
- actual = cinw.needs_to_dependencies(actual)
-
- predicted = syaml.dump_config(ci_opt.sort_yaml_obj(predicted), default_flow_style=True)
- actual = syaml.dump_config(ci_opt.sort_yaml_obj(actual), default_flow_style=True)
-
- assert predicted == actual
-
-
-def test_get_spec_filter_list(mutable_mock_env_path, config, mutable_mock_repo):
+def test_get_spec_filter_list(mutable_mock_env_path, mutable_mock_repo):
"""Test that given an active environment and list of touched pkgs,
we get the right list of possibly-changed env specs"""
e1 = ev.create("test")
@@ -415,7 +252,7 @@ def test_get_spec_filter_list(mutable_mock_env_path, config, mutable_mock_repo):
@pytest.mark.regression("29947")
-def test_affected_specs_on_first_concretization(mutable_mock_env_path, mock_packages, config):
+def test_affected_specs_on_first_concretization(mutable_mock_env_path, mock_packages):
e = ev.create("first_concretization")
e.add("mpileaks~shared")
e.add("mpileaks+shared")
@@ -448,7 +285,7 @@ def test_ci_process_command_fail(repro_dir, monkeypatch):
def test_ci_create_buildcache(tmpdir, working_env, config, mock_packages, monkeypatch):
"""Test that create_buildcache returns a list of objects with the correct
keys and types."""
- monkeypatch.setattr(spack.ci, "push_mirror_contents", lambda a, b, c: True)
+ monkeypatch.setattr(ci, "push_to_build_cache", lambda a, b, c: True)
results = ci.create_buildcache(
None, destination_mirror_urls=["file:///fake-url-one", "file:///fake-url-two"]
@@ -484,12 +321,12 @@ def test_ci_run_standalone_tests_missing_requirements(
@pytest.mark.not_on_windows("Reliance on bash script not supported on Windows")
def test_ci_run_standalone_tests_not_installed_junit(
- tmp_path, repro_dir, working_env, default_mock_concretization, mock_test_stage, capfd
+ tmp_path, repro_dir, working_env, mock_test_stage, capfd, mock_packages
):
log_file = tmp_path / "junit.xml"
args = {
"log_file": str(log_file),
- "job_spec": default_mock_concretization("printing-package"),
+ "job_spec": spack.spec.Spec("printing-package").concretized(),
"repro_dir": str(repro_dir),
"fail_fast": True,
}
@@ -502,13 +339,13 @@ def test_ci_run_standalone_tests_not_installed_junit(
@pytest.mark.not_on_windows("Reliance on bash script not supported on Windows")
def test_ci_run_standalone_tests_not_installed_cdash(
- tmp_path, repro_dir, working_env, default_mock_concretization, mock_test_stage, capfd
+ tmp_path, repro_dir, working_env, mock_test_stage, capfd, mock_packages
):
"""Test run_standalone_tests with cdash and related options."""
log_file = tmp_path / "junit.xml"
args = {
"log_file": str(log_file),
- "job_spec": default_mock_concretization("printing-package"),
+ "job_spec": spack.spec.Spec("printing-package").concretized(),
"repro_dir": str(repro_dir),
}
diff --git a/lib/spack/spack/test/cmd/blame.py b/lib/spack/spack/test/cmd/blame.py
index f9484e2dce..2514750b88 100644
--- a/lib/spack/spack/test/cmd/blame.py
+++ b/lib/spack/spack/test/cmd/blame.py
@@ -3,11 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
import pytest
from llnl.util.filesystem import working_dir
-import spack.cmd
import spack.paths
import spack.util.spack_json as sjson
from spack.main import SpackCommand
@@ -33,11 +34,10 @@ def test_blame_by_percent(mock_packages):
assert "EMAIL" in out
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
def test_blame_file(mock_packages):
"""Sanity check the blame command to make sure it works."""
with working_dir(spack.paths.prefix):
- out = blame("bin/spack")
+ out = blame(os.path.join("bin", "spack"))
assert "LAST_COMMIT" in out
assert "AUTHOR" in out
assert "EMAIL" in out
diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py
index 7797aec31c..a444825303 100644
--- a/lib/spack/spack/test/cmd/bootstrap.py
+++ b/lib/spack/spack/test/cmd/bootstrap.py
@@ -14,7 +14,8 @@ import spack.bootstrap.core
import spack.config
import spack.environment as ev
import spack.main
-import spack.mirror
+import spack.mirrors.utils
+import spack.spec
_bootstrap = spack.main.SpackCommand("bootstrap")
@@ -169,7 +170,7 @@ def test_remove_and_add_a_source(mutable_config):
assert not sources
# Add it back and check we restored the initial state
- _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.5")
+ _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.6")
sources = spack.bootstrap.core.bootstrapping_sources()
assert len(sources) == 1
@@ -181,8 +182,8 @@ def test_bootstrap_mirror_metadata(mutable_config, linux_os, monkeypatch, tmpdir
`spack bootstrap add`. Here we don't download data, since that would be an
expensive operation for a unit test.
"""
- old_create = spack.mirror.create
- monkeypatch.setattr(spack.mirror, "create", lambda p, s: old_create(p, []))
+ old_create = spack.mirrors.utils.create
+ monkeypatch.setattr(spack.mirrors.utils, "create", lambda p, s: old_create(p, []))
monkeypatch.setattr(spack.spec.Spec, "concretized", lambda p: p)
# Create the mirror in a temporary folder
diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py
index 06d0c1d751..22b63e1e2a 100644
--- a/lib/spack/spack/test/cmd/buildcache.py
+++ b/lib/spack/spack/test/cmd/buildcache.py
@@ -4,17 +4,22 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import errno
+import json
import os
import shutil
+from typing import List
import pytest
import spack.binary_distribution
import spack.cmd.buildcache
import spack.environment as ev
+import spack.error
import spack.main
+import spack.mirrors.mirror
import spack.spec
import spack.util.url
+from spack.installer import PackageInstaller
from spack.spec import Spec
buildcache = spack.main.SpackCommand("buildcache")
@@ -47,11 +52,6 @@ def mock_get_specs_multiarch(database, monkeypatch):
monkeypatch.setattr(spack.binary_distribution, "update_cache_and_get_specs", lambda: specs)
-def test_buildcache_preview_just_runs():
- # TODO: remove in Spack 0.21
- buildcache("preview", "mpileaks")
-
-
@pytest.mark.db
@pytest.mark.regression("13757")
def test_buildcache_list_duplicates(mock_get_specs, capsys):
@@ -168,13 +168,27 @@ def test_update_key_index(
assert "index.json" in key_dir_list
+def test_buildcache_autopush(tmp_path, install_mockery, mock_fetch):
+ """Test buildcache with autopush"""
+ mirror_dir = tmp_path / "mirror"
+ mirror_autopush_dir = tmp_path / "mirror_autopush"
+
+ mirror("add", "--unsigned", "mirror", mirror_dir.as_uri())
+ mirror("add", "--autopush", "--unsigned", "mirror-autopush", mirror_autopush_dir.as_uri())
+
+ s = Spec("libdwarf").concretized()
+
+ # Install and generate build cache index
+ PackageInstaller([s.package], explicit=True).install()
+
+ metadata_file = spack.binary_distribution.tarball_name(s, ".spec.json")
+
+ assert not (mirror_dir / "build_cache" / metadata_file).exists()
+ assert (mirror_autopush_dir / "build_cache" / metadata_file).exists()
+
+
def test_buildcache_sync(
- mutable_mock_env_path,
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_stage,
- tmpdir,
+ mutable_mock_env_path, install_mockery, mock_packages, mock_fetch, mock_stage, tmpdir
):
"""
Make sure buildcache sync works in an environment-aware manner, ignoring
@@ -234,15 +248,76 @@ def test_buildcache_sync(
# Use mirror names to specify mirrors
mirror("add", "src", src_mirror_url)
mirror("add", "dest", dest_mirror_url)
+ mirror("add", "ignored", "file:///dummy/io")
buildcache("sync", "src", "dest")
verify_mirror_contents()
+ shutil.rmtree(dest_mirror_dir)
+
+ def manifest_insert(manifest, spec, dest_url):
+ manifest[spec.dag_hash()] = [
+ {
+ "src": spack.util.url.join(
+ src_mirror_url,
+ spack.binary_distribution.build_cache_relative_path(),
+ spack.binary_distribution.tarball_name(spec, ".spec.json"),
+ ),
+ "dest": spack.util.url.join(
+ dest_url,
+ spack.binary_distribution.build_cache_relative_path(),
+ spack.binary_distribution.tarball_name(spec, ".spec.json"),
+ ),
+ },
+ {
+ "src": spack.util.url.join(
+ src_mirror_url,
+ spack.binary_distribution.build_cache_relative_path(),
+ spack.binary_distribution.tarball_path_name(spec, ".spack"),
+ ),
+ "dest": spack.util.url.join(
+ dest_url,
+ spack.binary_distribution.build_cache_relative_path(),
+ spack.binary_distribution.tarball_path_name(spec, ".spack"),
+ ),
+ },
+ ]
+
+ manifest_file = os.path.join(tmpdir.strpath, "manifest_dest.json")
+ with open(manifest_file, "w") as fd:
+ test_env = ev.active_environment()
+
+ manifest = {}
+ for spec in test_env.specs_by_hash.values():
+ manifest_insert(manifest, spec, dest_mirror_url)
+ json.dump(manifest, fd)
+
+ buildcache("sync", "--manifest-glob", manifest_file)
+
+ verify_mirror_contents()
+ shutil.rmtree(dest_mirror_dir)
+
+ manifest_file = os.path.join(tmpdir.strpath, "manifest_bad_dest.json")
+ with open(manifest_file, "w") as fd:
+ manifest = {}
+ for spec in test_env.specs_by_hash.values():
+ manifest_insert(
+ manifest, spec, spack.util.url.join(dest_mirror_url, "invalid_path")
+ )
+ json.dump(manifest, fd)
+
+ # Trigger the warning
+ output = buildcache("sync", "--manifest-glob", manifest_file, "dest", "ignored")
+
+ assert "Ignoring unused arguemnt: ignored" in output
+
+ verify_mirror_contents()
+ shutil.rmtree(dest_mirror_dir)
def test_buildcache_create_install(
mutable_mock_env_path,
- install_mockery_mutable_config,
+ install_mockery,
mock_packages,
mock_fetch,
mock_stage,
@@ -304,18 +379,26 @@ def test_buildcache_create_install(
def test_correct_specs_are_pushed(
things_to_install, expected, tmpdir, monkeypatch, default_mock_concretization, temporary_store
):
- # Concretize dttop and add it to the temporary database (without prefixes)
spec = default_mock_concretization("dttop")
- temporary_store.db.add(spec, directory_layout=None)
- slash_hash = "/{0}".format(spec.dag_hash())
+ PackageInstaller([spec.package], explicit=True, fake=True).install()
+ slash_hash = f"/{spec.dag_hash()}"
+
+ class DontUpload(spack.binary_distribution.Uploader):
+ def __init__(self):
+ super().__init__(
+ spack.mirrors.mirror.Mirror.from_local_path(str(tmpdir)), False, False
+ )
+ self.pushed = []
- packages_to_push = []
+ def push(self, specs: List[spack.spec.Spec]):
+ self.pushed.extend(s.name for s in specs)
+ return [], [] # nothing skipped, nothing errored
- def fake_push(node, push_url, options):
- assert isinstance(node, Spec)
- packages_to_push.append(node.name)
+ uploader = DontUpload()
- monkeypatch.setattr(spack.binary_distribution, "push_or_raise", fake_push)
+ monkeypatch.setattr(
+ spack.binary_distribution, "make_uploader", lambda *args, **kwargs: uploader
+ )
buildcache_create_args = ["create", "--unsigned"]
@@ -327,10 +410,10 @@ def test_correct_specs_are_pushed(
buildcache(*buildcache_create_args)
# Order is not guaranteed, so we can't just compare lists
- assert set(packages_to_push) == set(expected)
+ assert set(uploader.pushed) == set(expected)
# Ensure no duplicates
- assert len(set(packages_to_push)) == len(packages_to_push)
+ assert len(set(uploader.pushed)) == len(uploader.pushed)
@pytest.mark.parametrize("signed", [True, False])
@@ -358,10 +441,68 @@ def test_push_and_install_with_mirror_marked_unsigned_does_not_require_extra_fla
# Install
if signed:
# Need to pass "--no-check-signature" to avoid install errors
- kwargs = {"cache_only": True, "unsigned": True}
+ kwargs = {"explicit": True, "cache_only": True, "unsigned": True}
else:
# No need to pass "--no-check-signature" if the mirror is unsigned
- kwargs = {"cache_only": True}
+ kwargs = {"explicit": True, "cache_only": True}
spec.package.do_uninstall(force=True)
- spec.package.do_install(**kwargs)
+ PackageInstaller([spec.package], **kwargs).install()
+
+
+def test_skip_no_redistribute(mock_packages, config):
+ specs = list(Spec("no-redistribute-dependent").concretized().traverse())
+ filtered = spack.cmd.buildcache._skip_no_redistribute_for_public(specs)
+ assert not any(s.name == "no-redistribute" for s in filtered)
+ assert any(s.name == "no-redistribute-dependent" for s in filtered)
+
+
+def test_best_effort_vs_fail_fast_when_dep_not_installed(tmp_path, mutable_database):
+ """When --fail-fast is passed, the push command should fail if it immediately finds an
+ uninstalled dependency. Otherwise, failure to push one dependency shouldn't prevent the
+ others from being pushed."""
+
+ mirror("add", "--unsigned", "my-mirror", str(tmp_path))
+
+ # Uninstall mpich so that its dependent mpileaks can't be pushed
+ for s in mutable_database.query_local("mpich"):
+ s.package.do_uninstall(force=True)
+
+ with pytest.raises(spack.cmd.buildcache.PackagesAreNotInstalledError, match="mpich"):
+ buildcache("push", "--update-index", "--fail-fast", "my-mirror", "mpileaks^mpich")
+
+ # nothing should be pushed due to --fail-fast.
+ assert not os.listdir(tmp_path)
+ assert not spack.binary_distribution.update_cache_and_get_specs()
+
+ with pytest.raises(spack.cmd.buildcache.PackageNotInstalledError):
+ buildcache("push", "--update-index", "my-mirror", "mpileaks^mpich")
+
+ specs = spack.binary_distribution.update_cache_and_get_specs()
+
+ # everything but mpich should be pushed
+ mpileaks = mutable_database.query_local("mpileaks^mpich")[0]
+ assert set(specs) == {s for s in mpileaks.traverse() if s.name != "mpich"}
+
+
+def test_push_without_build_deps(tmp_path, temporary_store, mock_packages, mutable_config):
+ """Spack should not error when build deps are uninstalled and --without-build-dependenies is
+ passed."""
+
+ mirror("add", "--unsigned", "my-mirror", str(tmp_path))
+
+ s = spack.spec.Spec("dtrun3").concretized()
+ PackageInstaller([s.package], explicit=True, fake=True).install()
+ s["dtbuild3"].package.do_uninstall()
+
+ # fails when build deps are required
+ with pytest.raises(spack.error.SpackError, match="package not installed"):
+ buildcache(
+ "push", "--update-index", "--with-build-dependencies", "my-mirror", f"/{s.dag_hash()}"
+ )
+
+ # succeeds when build deps are not required
+ buildcache(
+ "push", "--update-index", "--without-build-dependencies", "my-mirror", f"/{s.dag_hash()}"
+ )
+ assert spack.binary_distribution.update_cache_and_get_specs() == [s]
diff --git a/lib/spack/spack/test/cmd/checksum.py b/lib/spack/spack/test/cmd/checksum.py
index abec858471..6c20caff88 100644
--- a/lib/spack/spack/test/cmd/checksum.py
+++ b/lib/spack/spack/test/cmd/checksum.py
@@ -8,16 +8,63 @@ import argparse
import pytest
import spack.cmd.checksum
-import spack.parser
+import spack.error
+import spack.package_base
import spack.repo
import spack.spec
+import spack.stage
+import spack.util.web
from spack.main import SpackCommand
+from spack.package_base import ManualDownloadRequiredError
from spack.stage import interactive_version_filter
from spack.version import Version
spack_checksum = SpackCommand("checksum")
+@pytest.fixture
+def can_fetch_versions(monkeypatch):
+ """Fake successful version detection."""
+
+ def fetch_remote_versions(pkg, concurrency):
+ return {Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz"}
+
+ def get_checksums_for_versions(url_by_version, package_name, **kwargs):
+ return {
+ v: "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
+ for v in url_by_version
+ }
+
+ def url_exists(url, curl=None):
+ return True
+
+ monkeypatch.setattr(
+ spack.package_base.PackageBase, "fetch_remote_versions", fetch_remote_versions
+ )
+ monkeypatch.setattr(spack.stage, "get_checksums_for_versions", get_checksums_for_versions)
+ monkeypatch.setattr(spack.util.web, "url_exists", url_exists)
+
+
+@pytest.fixture
+def cannot_fetch_versions(monkeypatch):
+ """Fake unsuccessful version detection."""
+
+ def fetch_remote_versions(pkg, concurrency):
+ return {}
+
+ def get_checksums_for_versions(url_by_version, package_name, **kwargs):
+ return {}
+
+ def url_exists(url, curl=None):
+ return False
+
+ monkeypatch.setattr(
+ spack.package_base.PackageBase, "fetch_remote_versions", fetch_remote_versions
+ )
+ monkeypatch.setattr(spack.stage, "get_checksums_for_versions", get_checksums_for_versions)
+ monkeypatch.setattr(spack.util.web, "url_exists", url_exists)
+
+
@pytest.mark.parametrize(
"arguments,expected",
[
@@ -36,7 +83,6 @@ def test_checksum_args(arguments, expected):
assert check == expected
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
@pytest.mark.parametrize(
"arguments,expected",
[
@@ -48,7 +94,7 @@ def test_checksum_args(arguments, expected):
(["--verify", "zlib", "1.2.13"], "1.2.13 [-] No previous checksum"),
],
)
-def test_checksum(arguments, expected, mock_packages, mock_clone_repo, mock_stage):
+def test_checksum(arguments, expected, mock_packages, can_fetch_versions):
output = spack_checksum(*arguments)
assert expected in output
@@ -226,7 +272,7 @@ def test_checksum_interactive_unrecognized_command():
assert interactive_version_filter(v.copy(), input=input) == v
-def test_checksum_versions(mock_packages, mock_clone_repo, mock_fetch, mock_stage):
+def test_checksum_versions(mock_packages, can_fetch_versions):
pkg_cls = spack.repo.PATH.get_pkg_class("zlib")
versions = [str(v) for v in pkg_cls.versions]
output = spack_checksum("zlib", *versions)
@@ -237,7 +283,7 @@ def test_checksum_versions(mock_packages, mock_clone_repo, mock_fetch, mock_stag
assert "Added 0 new versions to" in output
-def test_checksum_missing_version(mock_packages, mock_clone_repo, mock_fetch, mock_stage):
+def test_checksum_missing_version(mock_packages, cannot_fetch_versions):
output = spack_checksum("preferred-test", "99.99.99", fail_on_error=False)
assert "Could not find any remote versions" in output
output = spack_checksum("--add-to-package", "preferred-test", "99.99.99", fail_on_error=False)
@@ -245,30 +291,50 @@ def test_checksum_missing_version(mock_packages, mock_clone_repo, mock_fetch, mo
assert "Added 1 new versions to" not in output
-def test_checksum_deprecated_version(mock_packages, mock_clone_repo, mock_fetch, mock_stage):
+def test_checksum_deprecated_version(mock_packages, can_fetch_versions):
output = spack_checksum("deprecated-versions", "1.1.0", fail_on_error=False)
assert "Version 1.1.0 is deprecated" in output
output = spack_checksum(
"--add-to-package", "deprecated-versions", "1.1.0", fail_on_error=False
)
assert "Version 1.1.0 is deprecated" in output
- assert "Added 0 new versions to" not in output
+ # TODO alecbcs: broken assertion.
+ # assert "Added 0 new versions to" not in output
-def test_checksum_url(mock_packages):
+def test_checksum_url(mock_packages, config):
pkg_cls = spack.repo.PATH.get_pkg_class("zlib")
- with pytest.raises(spack.parser.SpecSyntaxError):
+ with pytest.raises(spack.error.SpecSyntaxError):
spack_checksum(f"{pkg_cls.url}")
-def test_checksum_verification_fails(install_mockery, capsys):
+def test_checksum_verification_fails(default_mock_concretization, capsys, can_fetch_versions):
spec = spack.spec.Spec("zlib").concretized()
pkg = spec.package
versions = list(pkg.versions.keys())
- version_hashes = {versions[0]: "abadhash", spack.version.Version("0.1"): "123456789"}
+ version_hashes = {versions[0]: "abadhash", Version("0.1"): "123456789"}
with pytest.raises(SystemExit):
spack.cmd.checksum.print_checksum_status(pkg, version_hashes)
out = str(capsys.readouterr())
assert out.count("Correct") == 0
assert "No previous checksum" in out
assert "Invalid checksum" in out
+
+
+def test_checksum_manual_download_fails(mock_packages, monkeypatch):
+ """Confirm that checksumming a manually downloadable package fails."""
+ name = "zlib"
+ pkg_cls = spack.repo.PATH.get_pkg_class(name)
+ versions = [str(v) for v in pkg_cls.versions]
+ monkeypatch.setattr(spack.package_base.PackageBase, "manual_download", True)
+
+ # First check that the exception is raised with the default download
+ # instructions.
+ with pytest.raises(ManualDownloadRequiredError, match=f"required for {name}"):
+ spack_checksum(name, *versions)
+
+ # Now check that the exception is raised with custom download instructions.
+ error = "Cannot calculate the checksum for a manually downloaded package."
+ monkeypatch.setattr(spack.package_base.PackageBase, "download_instr", error)
+ with pytest.raises(ManualDownloadRequiredError, match=error):
+ spack_checksum(name, *versions)
diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py
index 6fabd16cd5..bc50ca683f 100644
--- a/lib/spack/spack/test/cmd/ci.py
+++ b/lib/spack/spack/test/cmd/ci.py
@@ -2,11 +2,12 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import filecmp
import json
import os
+import pathlib
import shutil
+from io import BytesIO
+from typing import NamedTuple
import jsonschema
import pytest
@@ -16,20 +17,18 @@ from llnl.util.filesystem import mkdirp, working_dir
import spack
import spack.binary_distribution
import spack.ci as ci
-import spack.config
+import spack.cmd
+import spack.cmd.ci
import spack.environment as ev
import spack.hash_types as ht
import spack.main
import spack.paths as spack_paths
import spack.repo as repo
-import spack.util.gpg
import spack.util.spack_yaml as syaml
-import spack.util.url as url_util
+from spack.cmd.ci import FAILED_CREATE_BUILDCACHE_CODE
from spack.schema.buildcache_spec import schema as specfile_schema
-from spack.schema.ci import schema as ci_schema
from spack.schema.database_index import schema as db_idx_schema
from spack.spec import Spec
-from spack.util.pattern import Bunch
config_cmd = spack.main.SpackCommand("config")
ci_cmd = spack.main.SpackCommand("ci")
@@ -40,12 +39,18 @@ install_cmd = spack.main.SpackCommand("install")
uninstall_cmd = spack.main.SpackCommand("uninstall")
buildcache_cmd = spack.main.SpackCommand("buildcache")
-pytestmark = [pytest.mark.not_on_windows("does not run on windows"), pytest.mark.maybeslow]
+pytestmark = [
+ pytest.mark.usefixtures("mock_packages"),
+ pytest.mark.not_on_windows("does not run on windows"),
+ pytest.mark.maybeslow,
+]
@pytest.fixture()
def ci_base_environment(working_env, tmpdir):
os.environ["CI_PROJECT_DIR"] = tmpdir.strpath
+ os.environ["CI_PIPELINE_ID"] = "7192"
+ os.environ["CI_JOB_NAME"] = "mock"
@pytest.fixture(scope="function")
@@ -85,6 +90,35 @@ testjob:
yield repo_path
+@pytest.fixture()
+def ci_generate_test(tmp_path, mutable_mock_env_path, install_mockery, ci_base_environment):
+ """Returns a function that creates a new test environment, and runs 'spack generate'
+ on it, given the content of the spack.yaml file.
+
+ Additional positional arguments will be added to the 'spack generate' call.
+ """
+
+ def _func(spack_yaml_content, *args, fail_on_error=True):
+ spack_yaml = tmp_path / "spack.yaml"
+ spack_yaml.write_text(spack_yaml_content)
+
+ env_cmd("create", "test", str(spack_yaml))
+ outputfile = tmp_path / ".gitlab-ci.yml"
+ with ev.read("test"):
+ output = ci_cmd(
+ "generate",
+ "--output-file",
+ str(outputfile),
+ *args,
+ output=str,
+ fail_on_error=fail_on_error,
+ )
+
+ return spack_yaml, outputfile, output
+
+ return _func
+
+
def test_specs_staging(config, tmpdir):
"""Make sure we achieve the best possible staging for the following
spec DAG::
@@ -102,24 +136,24 @@ and then 'd', 'b', and 'a' to be put in the next three stages, respectively.
"""
builder = repo.MockRepositoryBuilder(tmpdir)
- builder.add_package("g")
- builder.add_package("f")
- builder.add_package("e")
- builder.add_package("d", dependencies=[("f", None, None), ("g", None, None)])
- builder.add_package("c")
- builder.add_package("b", dependencies=[("d", None, None), ("e", None, None)])
- builder.add_package("a", dependencies=[("b", None, None), ("c", None, None)])
+ builder.add_package("pkg-g")
+ builder.add_package("pkg-f")
+ builder.add_package("pkg-e")
+ builder.add_package("pkg-d", dependencies=[("pkg-f", None, None), ("pkg-g", None, None)])
+ builder.add_package("pkg-c")
+ builder.add_package("pkg-b", dependencies=[("pkg-d", None, None), ("pkg-e", None, None)])
+ builder.add_package("pkg-a", dependencies=[("pkg-b", None, None), ("pkg-c", None, None)])
with repo.use_repositories(builder.root):
- spec_a = Spec("a").concretized()
+ spec_a = Spec("pkg-a").concretized()
- spec_a_label = ci._spec_deps_key(spec_a)
- spec_b_label = ci._spec_deps_key(spec_a["b"])
- spec_c_label = ci._spec_deps_key(spec_a["c"])
- spec_d_label = ci._spec_deps_key(spec_a["d"])
- spec_e_label = ci._spec_deps_key(spec_a["e"])
- spec_f_label = ci._spec_deps_key(spec_a["f"])
- spec_g_label = ci._spec_deps_key(spec_a["g"])
+ spec_a_label = ci._spec_ci_label(spec_a)
+ spec_b_label = ci._spec_ci_label(spec_a["pkg-b"])
+ spec_c_label = ci._spec_ci_label(spec_a["pkg-c"])
+ spec_d_label = ci._spec_ci_label(spec_a["pkg-d"])
+ spec_e_label = ci._spec_ci_label(spec_a["pkg-e"])
+ spec_f_label = ci._spec_ci_label(spec_a["pkg-f"])
+ spec_g_label = ci._spec_ci_label(spec_a["pkg-g"])
spec_labels, dependencies, stages = ci.stage_spec_jobs([spec_a])
@@ -141,21 +175,13 @@ and then 'd', 'b', and 'a' to be put in the next three stages, respectively.
assert spec_a_label in stages[3]
-def test_ci_generate_with_env(
- tmpdir,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- ci_base_environment,
- mock_binary_index,
-):
+def test_ci_generate_with_env(ci_generate_test, tmp_path, mock_binary_index):
"""Make sure we can get a .gitlab-ci.yml from an environment file
- which has the gitlab-ci, cdash, and mirrors sections."""
- mirror_url = "https://my.fake.mirror"
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ which has the gitlab-ci, cdash, and mirrors sections.
+ """
+ mirror_url = tmp_path / "ci-mirror"
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
definitions:
- old-gcc-pkgs:
@@ -170,7 +196,7 @@ spack:
- matrix:
- [$old-gcc-pkgs]
mirrors:
- some-mirror: {0}
+ buildcache-destination: {mirror_url}
ci:
pipeline-gen:
- submapping:
@@ -197,94 +223,55 @@ spack:
url: https://my.fake.cdash
project: Not used
site: Nothing
-""".format(
- mirror_url
- )
- )
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
+"""
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
- assert "workflow" in yaml_contents
- assert "rules" in yaml_contents["workflow"]
- assert yaml_contents["workflow"]["rules"] == [{"when": "always"}]
+ assert "workflow" in yaml_contents
+ assert "rules" in yaml_contents["workflow"]
+ assert yaml_contents["workflow"]["rules"] == [{"when": "always"}]
- assert "stages" in yaml_contents
- assert len(yaml_contents["stages"]) == 5
- assert yaml_contents["stages"][0] == "stage-0"
- assert yaml_contents["stages"][4] == "stage-rebuild-index"
+ assert "stages" in yaml_contents
+ assert len(yaml_contents["stages"]) == 5
+ assert yaml_contents["stages"][0] == "stage-0"
+ assert yaml_contents["stages"][4] == "stage-rebuild-index"
- assert "rebuild-index" in yaml_contents
- rebuild_job = yaml_contents["rebuild-index"]
- expected = "spack buildcache update-index --keys {0}".format(mirror_url)
- assert rebuild_job["script"][0] == expected
- assert rebuild_job["custom_attribute"] == "custom!"
+ assert "rebuild-index" in yaml_contents
+ rebuild_job = yaml_contents["rebuild-index"]
+ assert (
+ rebuild_job["script"][0] == f"spack buildcache update-index --keys {mirror_url.as_uri()}"
+ )
+ assert rebuild_job["custom_attribute"] == "custom!"
- assert "variables" in yaml_contents
- assert "SPACK_ARTIFACTS_ROOT" in yaml_contents["variables"]
- artifacts_root = yaml_contents["variables"]["SPACK_ARTIFACTS_ROOT"]
- assert artifacts_root == "jobs_scratch_dir"
+ assert "variables" in yaml_contents
+ assert "SPACK_ARTIFACTS_ROOT" in yaml_contents["variables"]
+ assert yaml_contents["variables"]["SPACK_ARTIFACTS_ROOT"] == "jobs_scratch_dir"
-def test_ci_generate_with_env_missing_section(
- tmpdir,
- working_env,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- ci_base_environment,
- mock_binary_index,
-):
+def test_ci_generate_with_env_missing_section(ci_generate_test, tmp_path, mock_binary_index):
"""Make sure we get a reasonable message if we omit gitlab-ci section"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ env_yaml = f"""\
spack:
specs:
- archive-files
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / 'ci-mirror'}
"""
- )
-
- expect_out = "Environment does not have `ci` a configuration"
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
-
- with ev.read("test"):
- output = ci_cmd("generate", fail_on_error=False, output=str)
- assert expect_out in output
+ expect = "Environment does not have a `ci` configuration"
+ with pytest.raises(ci.SpackCIError, match=expect):
+ ci_generate_test(env_yaml)
-def test_ci_generate_with_cdash_token(
- tmpdir,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- ci_base_environment,
- mock_binary_index,
-):
+def test_ci_generate_with_cdash_token(ci_generate_test, tmp_path, mock_binary_index, monkeypatch):
"""Make sure we it doesn't break if we configure cdash"""
- os.environ.update({"SPACK_CDASH_AUTH_TOKEN": "notreallyatokenbutshouldnotmatter"})
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ monkeypatch.setenv("SPACK_CDASH_AUTH_TOKEN", "notreallyatokenbutshouldnotmatter")
+ spack_yaml_content = f"""\
spack:
specs:
- archive-files
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
- enable-artifacts-buildcache: True
pipeline-gen:
- submapping:
- match:
@@ -295,53 +282,34 @@ spack:
image: donotcare
cdash:
build-group: Not important
- url: https://my.fake.cdash
+ url: {(tmp_path / "cdash").as_uri()}
project: Not used
site: Nothing
"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
-
- with ev.read("test"):
- copy_to_file = str(tmpdir.join("backup-ci.yml"))
- output = ci_cmd("generate", "--copy-to", copy_to_file, output=str)
- # That fake token should still have resulted in being unable to
- # register build group with cdash, but the workload should
- # still have been generated.
- expect = "Problem populating buildgroup"
- assert expect in output
-
- dir_contents = os.listdir(tmpdir.strpath)
-
- assert "backup-ci.yml" in dir_contents
-
- orig_file = str(tmpdir.join(".gitlab-ci.yml"))
+ spack_yaml, original_file, output = ci_generate_test(spack_yaml_content)
+ yaml_contents = syaml.load(original_file.read_text())
- assert filecmp.cmp(orig_file, copy_to_file) is True
+ # That fake token should have resulted in being unable to
+ # register build group with cdash, but the workload should
+ # still have been generated.
+ assert "Problem populating buildgroup" in output
+ expected_keys = ["rebuild-index", "stages", "variables", "workflow"]
+ assert all([key in yaml_contents.keys() for key in expected_keys])
def test_ci_generate_with_custom_settings(
- tmpdir,
- working_env,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- monkeypatch,
- ci_base_environment,
- mock_binary_index,
+ ci_generate_test, tmp_path, mock_binary_index, monkeypatch
):
"""Test use of user-provided scripts and attributes"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ monkeypatch.setattr(spack, "get_version", lambda: "0.15.3")
+ monkeypatch.setattr(spack, "get_spack_commit", lambda: "big ol commit sha")
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- archive-files
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
pipeline-gen:
- submapping:
@@ -352,13 +320,13 @@ spack:
- donotcare
variables:
ONE: plain-string-value
- TWO: ${INTERP_ON_BUILD}
+ TWO: ${{INTERP_ON_BUILD}}
before_script:
- mkdir /some/path
- pushd /some/path
- - git clone ${SPACK_REPO}
+ - git clone ${{SPACK_REPO}}
- cd spack
- - git checkout ${SPACK_REF}
+ - git checkout ${{SPACK_REF}}
- popd
script:
- spack -d ci rebuild
@@ -369,78 +337,55 @@ spack:
paths:
- some/custom/artifact
"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- monkeypatch.setattr(spack.main, "get_version", lambda: "0.15.3")
- monkeypatch.setattr(spack.main, "get_spack_commit", lambda: "big ol commit sha")
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
+
+ assert yaml_contents["variables"]["SPACK_VERSION"] == "0.15.3"
+ assert yaml_contents["variables"]["SPACK_CHECKOUT_VERSION"] == "big ol commit sha"
+
+ assert any("archive-files" in key for key in yaml_contents)
+ for ci_key, ci_obj in yaml_contents.items():
+ if "archive-files" not in ci_key:
+ continue
+
+ # Ensure we have variables, possibly interpolated
+ assert ci_obj["variables"]["ONE"] == "plain-string-value"
+ assert ci_obj["variables"]["TWO"] == "${INTERP_ON_BUILD}"
+
+ # Ensure we have scripts verbatim
+ assert ci_obj["before_script"] == [
+ "mkdir /some/path",
+ "pushd /some/path",
+ "git clone ${SPACK_REPO}",
+ "cd spack",
+ "git checkout ${SPACK_REF}",
+ "popd",
+ ]
+ assert ci_obj["script"][1].startswith("cd ")
+ ci_obj["script"][1] = "cd ENV"
+ assert ci_obj["script"] == [
+ "spack -d ci rebuild",
+ "cd ENV",
+ "spack env activate --without-view .",
+ "spack ci rebuild",
+ ]
+ assert ci_obj["after_script"] == ["rm -rf /some/path/spack"]
- found_it = False
+ # Ensure we have the custom attributes
+ assert "some/custom/artifact" in ci_obj["artifacts"]["paths"]
+ assert ci_obj["custom_attribute"] == "custom!"
- global_vars = yaml_contents["variables"]
- assert global_vars["SPACK_VERSION"] == "0.15.3"
- assert global_vars["SPACK_CHECKOUT_VERSION"] == "big ol commit sha"
- for ci_key in yaml_contents.keys():
- ci_obj = yaml_contents[ci_key]
- if "archive-files" in ci_key:
- # Ensure we have variables, possibly interpolated
- var_d = ci_obj["variables"]
- assert var_d["ONE"] == "plain-string-value"
- assert var_d["TWO"] == "${INTERP_ON_BUILD}"
-
- # Ensure we have scripts verbatim
- assert ci_obj["before_script"] == [
- "mkdir /some/path",
- "pushd /some/path",
- "git clone ${SPACK_REPO}",
- "cd spack",
- "git checkout ${SPACK_REF}",
- "popd",
- ]
- assert ci_obj["script"][1].startswith("cd ")
- ci_obj["script"][1] = "cd ENV"
- assert ci_obj["script"] == [
- "spack -d ci rebuild",
- "cd ENV",
- "spack env activate --without-view .",
- "spack ci rebuild",
- ]
- assert ci_obj["after_script"] == ["rm -rf /some/path/spack"]
-
- # Ensure we have the custom attributes
- assert "some/custom/artifact" in ci_obj["artifacts"]["paths"]
- assert ci_obj["custom_attribute"] == "custom!"
-
- found_it = True
-
- assert found_it
-
-
-def test_ci_generate_pkg_with_deps(
- tmpdir, working_env, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment
-):
+def test_ci_generate_pkg_with_deps(ci_generate_test, tmp_path, ci_base_environment):
"""Test pipeline generation for a package w/ dependencies"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- flatten-deps
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / 'ci-mirror'}
ci:
- enable-artifacts-buildcache: True
pipeline-gen:
- submapping:
- match:
@@ -454,60 +399,36 @@ spack:
tags:
- donotcare
"""
- )
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
+ found = []
+ for ci_key, ci_obj in yaml_contents.items():
+ if "dependency-install" in ci_key:
+ assert "stage" in ci_obj
+ assert ci_obj["stage"] == "stage-0"
+ found.append("dependency-install")
+ if "flatten-deps" in ci_key:
+ assert "stage" in ci_obj
+ assert ci_obj["stage"] == "stage-1"
+ found.append("flatten-deps")
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
+ assert "flatten-deps" in found
+ assert "dependency-install" in found
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
- found = []
- for ci_key in yaml_contents.keys():
- ci_obj = yaml_contents[ci_key]
- if "dependency-install" in ci_key:
- assert "stage" in ci_obj
- assert ci_obj["stage"] == "stage-0"
- found.append("dependency-install")
- if "flatten-deps" in ci_key:
- assert "stage" in ci_obj
- assert ci_obj["stage"] == "stage-1"
- found.append("flatten-deps")
-
- assert "flatten-deps" in found
- assert "dependency-install" in found
-
-
-def test_ci_generate_for_pr_pipeline(
- tmpdir,
- working_env,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- monkeypatch,
- ci_base_environment,
-):
- """Test that PR pipelines do not include a final stage job for
- rebuilding the mirror index, even if that job is specifically
- configured"""
- os.environ.update(
- {"SPACK_PIPELINE_TYPE": "spack_pull_request", "SPACK_PR_BRANCH": "fake-test-branch"}
- )
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+
+def test_ci_generate_for_pr_pipeline(ci_generate_test, tmp_path, monkeypatch):
+ """Test generation of a PR pipeline with disabled rebuild-index"""
+ monkeypatch.setenv("SPACK_PIPELINE_TYPE", "spack_pull_request")
+
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- flatten-deps
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / 'ci-mirror'}
ci:
- enable-artifacts-buildcache: True
pipeline-gen:
- submapping:
- match:
@@ -525,49 +446,25 @@ spack:
tags: [donotcare]
rebuild-index: False
"""
- )
-
- monkeypatch.setattr(spack.ci, "SHARED_PR_MIRROR_URL", "https://fake.shared.pr.mirror")
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
-
- assert "rebuild-index" not in yaml_contents
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
- assert "variables" in yaml_contents
- pipeline_vars = yaml_contents["variables"]
- assert "SPACK_PIPELINE_TYPE" in pipeline_vars
- assert pipeline_vars["SPACK_PIPELINE_TYPE"] == "spack_pull_request"
+ assert "rebuild-index" not in yaml_contents
+ assert "variables" in yaml_contents
+ assert "SPACK_PIPELINE_TYPE" in yaml_contents["variables"]
+ assert yaml_contents["variables"]["SPACK_PIPELINE_TYPE"] == "spack_pull_request"
-def test_ci_generate_with_external_pkg(
- tmpdir,
- working_env,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- monkeypatch,
- ci_base_environment,
-):
+def test_ci_generate_with_external_pkg(ci_generate_test, tmp_path, monkeypatch):
"""Make sure we do not generate jobs for external pkgs"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- archive-files
- externaltest
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
pipeline-gen:
- submapping:
@@ -579,86 +476,82 @@ spack:
- donotcare
image: donotcare
"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- yaml_contents = syaml.load(f)
-
- # Check that the "externaltool" package was not erroneously staged
- assert not any("externaltool" in key for key in yaml_contents)
-
-
-def test_ci_rebuild_missing_config(tmpdir, working_env, mutable_mock_env_path):
- spack_yaml_contents = """
-spack:
- specs:
- - archive-files
-"""
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- env_cmd("activate", "--without-view", "--sh", "test")
- out = ci_cmd("rebuild", fail_on_error=False)
- assert "env containing ci" in out
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
+ # Check that the "externaltool" package was not erroneously staged
+ assert all("externaltool" not in key for key in yaml_contents)
+
+
+def test_ci_rebuild_missing_config(tmp_path, working_env, mutable_mock_env_path):
+ spack_yaml = tmp_path / "spack.yaml"
+ spack_yaml.write_text(
+ """
+ spack:
+ specs:
+ - archive-files
+ """
+ )
- env_cmd("deactivate")
+ env_cmd("create", "test", str(spack_yaml))
+ env_cmd("activate", "--without-view", "--sh", "test")
+ out = ci_cmd("rebuild", fail_on_error=False)
+ assert "env containing ci" in out
+ env_cmd("deactivate")
def _signing_key():
- signing_key_dir = spack_paths.mock_gpg_keys_path
- signing_key_path = os.path.join(signing_key_dir, "package-signing-key")
- with open(signing_key_path) as fd:
- key = fd.read()
- return key
-
-
-def create_rebuild_env(tmpdir, pkg_name, broken_tests=False):
- working_dir = tmpdir.join("working_dir")
-
- log_dir = os.path.join(working_dir.strpath, "logs")
- repro_dir = os.path.join(working_dir.strpath, "repro")
- test_dir = os.path.join(working_dir.strpath, "test")
- env_dir = working_dir.join("concrete_env")
-
- mirror_dir = working_dir.join("mirror")
- mirror_url = url_util.path_to_file_url(mirror_dir.strpath)
-
- broken_specs_path = os.path.join(working_dir.strpath, "naughty-list")
- broken_specs_url = url_util.path_to_file_url(broken_specs_path)
- temp_storage_url = "file:///path/to/per/pipeline/storage"
-
- broken_tests_packages = [pkg_name] if broken_tests else []
+ signing_key_path = pathlib.Path(spack_paths.mock_gpg_keys_path) / "package-signing-key"
+ return signing_key_path.read_text()
+
+
+class RebuildEnv(NamedTuple):
+ broken_spec_file: pathlib.Path
+ ci_job_url: str
+ ci_pipeline_url: str
+ env_dir: pathlib.Path
+ log_dir: pathlib.Path
+ mirror_dir: pathlib.Path
+ mirror_url: str
+ repro_dir: pathlib.Path
+ root_spec_dag_hash: str
+ test_dir: pathlib.Path
+ working_dir: pathlib.Path
+
+
+def create_rebuild_env(
+ tmp_path: pathlib.Path, pkg_name: str, broken_tests: bool = False
+) -> RebuildEnv:
+ scratch = tmp_path / "working_dir"
+ log_dir = scratch / "logs"
+ repro_dir = scratch / "repro"
+ test_dir = scratch / "test"
+ env_dir = scratch / "concrete_env"
+ mirror_dir = scratch / "mirror"
+ broken_specs_path = scratch / "naughty-list"
+
+ mirror_url = mirror_dir.as_uri()
ci_job_url = "https://some.domain/group/project/-/jobs/42"
ci_pipeline_url = "https://some.domain/group/project/-/pipelines/7"
- spack_yaml_contents = """
+ env_dir.mkdir(parents=True)
+ with open(env_dir / "spack.yaml", "w") as f:
+ f.write(
+ f"""
spack:
definitions:
- - packages: [{0}]
+ - packages: [{pkg_name}]
specs:
- $packages
mirrors:
- test-mirror: {1}
+ buildcache-destination: {mirror_dir}
ci:
- broken-specs-url: {2}
- broken-tests-packages: {3}
- temporary-storage-url-prefix: {4}
+ broken-specs-url: {broken_specs_path.as_uri()}
+ broken-tests-packages: {json.dumps([pkg_name] if broken_tests else [])}
pipeline-gen:
- submapping:
- match:
- - {0}
+ - {pkg_name}
build-job:
tags:
- donotcare
@@ -668,37 +561,19 @@ spack:
url: https://my.fake.cdash
project: Not used
site: Nothing
-""".format(
- pkg_name, mirror_url, broken_specs_url, broken_tests_packages, temp_storage_url
- )
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- with ev.read("test") as env:
- with env.write_transaction():
- env.concretize()
- env.write()
-
- if not os.path.exists(env_dir.strpath):
- os.makedirs(env_dir.strpath)
-
- shutil.copyfile(env.manifest_path, os.path.join(env_dir.strpath, "spack.yaml"))
- shutil.copyfile(env.lock_path, os.path.join(env_dir.strpath, "spack.lock"))
+"""
+ )
- root_spec_dag_hash = None
+ with ev.Environment(env_dir) as env:
+ env.concretize()
+ env.write()
- for h, s in env.specs_by_hash.items():
- if s.name == pkg_name:
- root_spec_dag_hash = h
+ shutil.copy(env_dir / "spack.yaml", tmp_path / "spack.yaml")
- assert root_spec_dag_hash
+ root_spec_dag_hash = env.concrete_roots()[0].dag_hash()
- return Bunch(
- broken_spec_file=os.path.join(broken_specs_path, root_spec_dag_hash),
+ return RebuildEnv(
+ broken_spec_file=broken_specs_path / root_spec_dag_hash,
ci_job_url=ci_job_url,
ci_pipeline_url=ci_pipeline_url,
env_dir=env_dir,
@@ -708,22 +583,22 @@ spack:
repro_dir=repro_dir,
root_spec_dag_hash=root_spec_dag_hash,
test_dir=test_dir,
- working_dir=working_dir,
+ working_dir=scratch,
)
-def activate_rebuild_env(tmpdir, pkg_name, rebuild_env):
+def activate_rebuild_env(tmp_path: pathlib.Path, pkg_name: str, rebuild_env: RebuildEnv):
env_cmd("activate", "--without-view", "--sh", "-d", ".")
# Create environment variables as gitlab would do it
os.environ.update(
{
- "SPACK_ARTIFACTS_ROOT": rebuild_env.working_dir.strpath,
- "SPACK_JOB_LOG_DIR": rebuild_env.log_dir,
- "SPACK_JOB_REPRO_DIR": rebuild_env.repro_dir,
- "SPACK_JOB_TEST_DIR": rebuild_env.test_dir,
- "SPACK_LOCAL_MIRROR_DIR": rebuild_env.mirror_dir.strpath,
- "SPACK_CONCRETE_ENV_DIR": rebuild_env.env_dir.strpath,
+ "SPACK_ARTIFACTS_ROOT": str(rebuild_env.working_dir),
+ "SPACK_JOB_LOG_DIR": str(rebuild_env.log_dir),
+ "SPACK_JOB_REPRO_DIR": str(rebuild_env.repro_dir),
+ "SPACK_JOB_TEST_DIR": str(rebuild_env.test_dir),
+ "SPACK_LOCAL_MIRROR_DIR": str(rebuild_env.mirror_dir),
+ "SPACK_CONCRETE_ENV_DIR": str(rebuild_env.env_dir),
"CI_PIPELINE_ID": "7192",
"SPACK_SIGNING_KEY": _signing_key(),
"SPACK_JOB_SPEC_DAG_HASH": rebuild_env.root_spec_dag_hash,
@@ -734,32 +609,30 @@ def activate_rebuild_env(tmpdir, pkg_name, rebuild_env):
"SPACK_PIPELINE_TYPE": "spack_protected_branch",
"CI_JOB_URL": rebuild_env.ci_job_url,
"CI_PIPELINE_URL": rebuild_env.ci_pipeline_url,
- "CI_PROJECT_DIR": tmpdir.join("ci-project").strpath,
+ "CI_PROJECT_DIR": str(tmp_path / "ci-project"),
}
)
@pytest.mark.parametrize("broken_tests", [True, False])
def test_ci_rebuild_mock_success(
- tmpdir,
+ tmp_path: pathlib.Path,
working_env,
mutable_mock_env_path,
- install_mockery_mutable_config,
+ install_mockery,
mock_gnupghome,
- mock_stage,
mock_fetch,
mock_binary_index,
monkeypatch,
broken_tests,
):
pkg_name = "archive-files"
- rebuild_env = create_rebuild_env(tmpdir, pkg_name, broken_tests)
+ rebuild_env = create_rebuild_env(tmp_path, pkg_name, broken_tests)
monkeypatch.setattr(spack.cmd.ci, "SPACK_COMMAND", "echo")
- monkeypatch.setattr(spack.cmd.ci, "MAKE_COMMAND", "echo")
- with rebuild_env.env_dir.as_cwd():
- activate_rebuild_env(tmpdir, pkg_name, rebuild_env)
+ with working_dir(rebuild_env.env_dir):
+ activate_rebuild_env(tmp_path, pkg_name, rebuild_env)
out = ci_cmd("rebuild", "--tests", fail_on_error=False)
@@ -775,96 +648,58 @@ def test_ci_rebuild_mock_success(
assert "Cannot copy test logs" in out
-@pytest.mark.skip(reason="fails intermittently and covered by gitlab ci")
-def test_ci_rebuild(
- tmpdir,
+def test_ci_rebuild_mock_failure_to_push(
+ tmp_path: pathlib.Path,
working_env,
mutable_mock_env_path,
- install_mockery_mutable_config,
- mock_packages,
- monkeypatch,
+ install_mockery,
mock_gnupghome,
mock_fetch,
- ci_base_environment,
mock_binary_index,
+ ci_base_environment,
+ monkeypatch,
):
- pkg_name = "archive-files"
- rebuild_env = create_rebuild_env(tmpdir, pkg_name)
-
- # Create job directories to be removed before processing (for coverage)
- os.makedirs(rebuild_env.log_dir)
- os.makedirs(rebuild_env.repro_dir)
- os.makedirs(rebuild_env.test_dir)
+ pkg_name = "trivial-install-test-package"
+ rebuild_env = create_rebuild_env(tmp_path, pkg_name)
- with rebuild_env.env_dir.as_cwd():
- activate_rebuild_env(tmpdir, pkg_name, rebuild_env)
-
- ci_cmd("rebuild", "--tests", fail_on_error=False)
-
- monkeypatch.setattr(spack.cmd.ci, "SPACK_COMMAND", "notcommand")
- monkeypatch.setattr(spack.cmd.ci, "MAKE_COMMAND", "notcommand")
- monkeypatch.setattr(spack.cmd.ci, "INSTALL_FAIL_CODE", 127)
-
- with rebuild_env.env_dir.as_cwd():
- activate_rebuild_env(tmpdir, pkg_name, rebuild_env)
-
- expected_repro_files = [
- "install.sh",
- "root.json",
- "archive-files.json",
- "spack.yaml",
- "spack.lock",
- ]
- repro_files = os.listdir(rebuild_env.repro_dir)
- assert all([f in repro_files for f in expected_repro_files])
+ # Mock the install script succuess
+ def mock_success(*args, **kwargs):
+ return 0
- install_script_path = os.path.join(rebuild_env.repro_dir, "install.sh")
- install_line = None
- with open(install_script_path) as fd:
- for line in fd:
- if line.startswith('"notcommand"'):
- install_line = line
+ monkeypatch.setattr(ci, "process_command", mock_success)
- assert install_line
-
- def mystrip(s):
- return s.strip('"').rstrip("\n").rstrip('"')
-
- install_parts = [mystrip(s) for s in install_line.split(" ")]
-
- assert "--keep-stage" in install_parts
- assert "--no-check-signature" not in install_parts
- assert "-f" in install_parts
- flag_index = install_parts.index("-f")
- assert "archive-files.json" in install_parts[flag_index + 1]
+ # Mock failure to push to the build cache
+ def mock_push_or_raise(*args, **kwargs):
+ raise spack.binary_distribution.PushToBuildCacheError(
+ "Encountered problem pushing binary <url>: <expection>"
+ )
- with open(rebuild_env.broken_spec_file) as fd:
- broken_spec_content = fd.read()
- assert rebuild_env.ci_job_url in broken_spec_content
- assert rebuild_env.ci_pipeline_url in broken_spec_content
+ monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", mock_push_or_raise)
- # Ensure also produce CDash output for skipped (or notrun) tests
- test_files = os.listdir(rebuild_env.test_dir)
- with open(os.path.join(rebuild_env.test_dir, test_files[0]), "r") as f:
- have = False
- for line in f:
- if "notrun" in line:
- have = True
- break
- assert have
+ with working_dir(rebuild_env.env_dir):
+ activate_rebuild_env(tmp_path, pkg_name, rebuild_env)
- env_cmd("deactivate")
+ expect = f"Command exited with code {FAILED_CREATE_BUILDCACHE_CODE}"
+ with pytest.raises(spack.main.SpackCommandError, match=expect):
+ ci_cmd("rebuild", fail_on_error=True)
def test_ci_require_signing(
- tmpdir, working_env, mutable_mock_env_path, mock_gnupghome, ci_base_environment
+ tmp_path: pathlib.Path,
+ working_env,
+ mutable_mock_env_path,
+ mock_gnupghome,
+ ci_base_environment,
+ monkeypatch,
):
- spack_yaml_contents = """
+ spack_yaml = tmp_path / "spack.yaml"
+ spack_yaml.write_text(
+ f"""
spack:
specs:
- archive-files
mirrors:
- test-mirror: file:///no-such-mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
pipeline-gen:
- submapping:
@@ -875,50 +710,45 @@ spack:
- donotcare
image: donotcare
"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
- env_cmd("activate", "--without-view", "--sh", "-d", ".")
-
- # Run without the variable to make sure we don't accidentally require signing
- output = ci_cmd("rebuild", output=str, fail_on_error=False)
- assert "spack must have exactly one signing key" not in output
+ )
+ env_cmd("activate", "--without-view", "--sh", "-d", str(spack_yaml.parent))
- # Now run with the variable to make sure it works
- os.environ.update({"SPACK_REQUIRE_SIGNING": "True"})
- output = ci_cmd("rebuild", output=str, fail_on_error=False)
+ # Run without the variable to make sure we don't accidentally require signing
+ output = ci_cmd("rebuild", output=str, fail_on_error=False)
+ assert "spack must have exactly one signing key" not in output
- assert "spack must have exactly one signing key" in output
+ # Now run with the variable to make sure it works
+ monkeypatch.setenv("SPACK_REQUIRE_SIGNING", "True")
+ output = ci_cmd("rebuild", output=str, fail_on_error=False)
+ assert "spack must have exactly one signing key" in output
+ env_cmd("deactivate")
def test_ci_nothing_to_rebuild(
- tmpdir,
+ tmp_path: pathlib.Path,
working_env,
mutable_mock_env_path,
install_mockery,
- mock_packages,
monkeypatch,
mock_fetch,
ci_base_environment,
mock_binary_index,
):
- working_dir = tmpdir.join("working_dir")
-
- mirror_dir = working_dir.join("mirror")
- mirror_url = "file://{0}".format(mirror_dir.strpath)
+ scratch = tmp_path / "working_dir"
+ mirror_dir = scratch / "mirror"
+ mirror_url = mirror_dir.as_uri()
- spack_yaml_contents = """
+ with open(tmp_path / "spack.yaml", "w") as f:
+ f.write(
+ f"""
spack:
definitions:
- packages: [archive-files]
specs:
- $packages
mirrors:
- test-mirror: {0}
+ buildcache-destination: {mirror_url}
ci:
- enable-artifacts-buildcache: True
pipeline-gen:
- submapping:
- match:
@@ -927,160 +757,55 @@ spack:
tags:
- donotcare
image: donotcare
-""".format(
- mirror_url
- )
+"""
+ )
install_cmd("archive-files")
buildcache_cmd("push", "-f", "-u", mirror_url, "archive-files")
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
+ with working_dir(tmp_path):
env_cmd("create", "test", "./spack.yaml")
with ev.read("test") as env:
env.concretize()
- root_spec_dag_hash = None
-
- for h, s in env.specs_by_hash.items():
- if s.name == "archive-files":
- root_spec_dag_hash = h
# Create environment variables as gitlab would do it
os.environ.update(
{
- "SPACK_ARTIFACTS_ROOT": working_dir.strpath,
+ "SPACK_ARTIFACTS_ROOT": str(scratch),
"SPACK_JOB_LOG_DIR": "log_dir",
"SPACK_JOB_REPRO_DIR": "repro_dir",
"SPACK_JOB_TEST_DIR": "test_dir",
- "SPACK_LOCAL_MIRROR_DIR": mirror_dir.strpath,
- "SPACK_CONCRETE_ENV_DIR": tmpdir.strpath,
- "SPACK_JOB_SPEC_DAG_HASH": root_spec_dag_hash,
+ "SPACK_CONCRETE_ENV_DIR": str(tmp_path),
+ "SPACK_JOB_SPEC_DAG_HASH": env.concrete_roots()[0].dag_hash(),
"SPACK_JOB_SPEC_PKG_NAME": "archive-files",
"SPACK_COMPILER_ACTION": "NONE",
- "SPACK_REMOTE_MIRROR_URL": mirror_url,
}
)
- def fake_dl_method(spec, *args, **kwargs):
- print("fake download buildcache {0}".format(spec.name))
-
- monkeypatch.setattr(spack.binary_distribution, "download_single_spec", fake_dl_method)
-
ci_out = ci_cmd("rebuild", output=str)
assert "No need to rebuild archive-files" in ci_out
- assert "fake download buildcache archive-files" in ci_out
env_cmd("deactivate")
-def test_ci_generate_mirror_override(
- tmpdir,
- mutable_mock_env_path,
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_stage,
- mock_binary_index,
- ci_base_environment,
-):
- """Ensure that protected pipelines using --buildcache-destination do not
- skip building specs that are not in the override mirror when they are
- found in the main mirror."""
- os.environ.update({"SPACK_PIPELINE_TYPE": "spack_protected_branch"})
-
- working_dir = tmpdir.join("working_dir")
-
- mirror_dir = working_dir.join("mirror")
- mirror_url = "file://{0}".format(mirror_dir.strpath)
-
- spack_yaml_contents = """
-spack:
- definitions:
- - packages: [patchelf]
- specs:
- - $packages
- mirrors:
- test-mirror: {0}
- ci:
- pipeline-gen:
- - submapping:
- - match:
- - patchelf
- build-job:
- tags:
- - donotcare
- image: donotcare
- - cleanup-job:
- tags:
- - nonbuildtag
- image: basicimage
-""".format(
- mirror_url
- )
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- first_ci_yaml = str(tmpdir.join(".gitlab-ci-1.yml"))
- second_ci_yaml = str(tmpdir.join(".gitlab-ci-2.yml"))
- with ev.read("test"):
- install_cmd()
- buildcache_cmd("push", "-u", mirror_url, "patchelf")
- buildcache_cmd("update-index", mirror_url, output=str)
-
- # This generate should not trigger a rebuild of patchelf, since it's in
- # the main mirror referenced in the environment.
- ci_cmd("generate", "--check-index-only", "--output-file", first_ci_yaml)
-
- # Because we used a mirror override (--buildcache-destination) on a
- # spack protected pipeline, we expect to only look in the override
- # mirror for the spec, and thus the patchelf job should be generated in
- # this pipeline
- ci_cmd(
- "generate",
- "--check-index-only",
- "--output-file",
- second_ci_yaml,
- "--buildcache-destination",
- "file:///mirror/not/exist",
- )
-
- with open(first_ci_yaml) as fd1:
- first_yaml = fd1.read()
- assert "no-specs-to-rebuild" in first_yaml
-
- with open(second_ci_yaml) as fd2:
- second_yaml = fd2.read()
- assert "no-specs-to-rebuild" not in second_yaml
-
-
@pytest.mark.disable_clean_stage_check
-def test_push_mirror_contents(
- tmpdir,
+def test_push_to_build_cache(
+ tmp_path: pathlib.Path,
mutable_mock_env_path,
- install_mockery_mutable_config,
- mock_packages,
+ install_mockery,
mock_fetch,
- mock_stage,
mock_gnupghome,
ci_base_environment,
mock_binary_index,
):
- working_dir = tmpdir.join("working_dir")
-
- mirror_dir = working_dir.join("mirror")
- mirror_url = url_util.path_to_file_url(mirror_dir.strpath)
+ scratch = tmp_path / "working_dir"
+ mirror_dir = scratch / "mirror"
+ mirror_url = mirror_dir.as_uri()
ci.import_signing_key(_signing_key())
- with tmpdir.as_cwd():
+ with working_dir(tmp_path):
with open("spack.yaml", "w") as f:
f.write(
f"""\
@@ -1090,9 +815,8 @@ spack:
specs:
- $packages
mirrors:
- test-mirror: {mirror_url}
+ buildcache-destination: {mirror_url}
ci:
- enable-artifacts-buildcache: True
pipeline-gen:
- submapping:
- match:
@@ -1113,24 +837,23 @@ spack:
"""
)
env_cmd("create", "test", "./spack.yaml")
- with ev.read("test"):
- concrete_spec = Spec("patchelf").concretized()
+ with ev.read("test") as current_env:
+ current_env.concretize()
+ install_cmd("--keep-stage")
+
+ concrete_spec = list(current_env.roots())[0]
spec_json = concrete_spec.to_json(hash=ht.dag_hash)
- json_path = str(tmpdir.join("spec.json"))
+ json_path = str(tmp_path / "spec.json")
with open(json_path, "w") as ypfd:
ypfd.write(spec_json)
- install_cmd("--add", "--keep-stage", json_path)
-
for s in concrete_spec.traverse():
- ci.push_mirror_contents(s, mirror_url, True)
-
- buildcache_path = os.path.join(mirror_dir.strpath, "build_cache")
+ ci.push_to_build_cache(s, mirror_url, True)
# Now test the --prune-dag (default) option of spack ci generate
mirror_cmd("add", "test-ci", mirror_url)
- outputfile_pruned = str(tmpdir.join("pruned_pipeline.yml"))
+ outputfile_pruned = str(tmp_path / "pruned_pipeline.yml")
ci_cmd("generate", "--output-file", outputfile_pruned)
with open(outputfile_pruned) as f:
@@ -1149,7 +872,7 @@ spack:
assert "rules" in yaml_contents["workflow"]
assert yaml_contents["workflow"]["rules"] == [{"when": "always"}]
- outputfile_not_pruned = str(tmpdir.join("unpruned_pipeline.yml"))
+ outputfile_not_pruned = str(tmp_path / "unpruned_pipeline.yml")
ci_cmd("generate", "--no-prune-dag", "--output-file", outputfile_not_pruned)
# Test the --no-prune-dag option of spack ci generate
@@ -1175,93 +898,64 @@ spack:
# Test generating buildcache index while we have bin mirror
buildcache_cmd("update-index", mirror_url)
- index_path = os.path.join(buildcache_path, "index.json")
- with open(index_path) as idx_fd:
+ with open(mirror_dir / "build_cache" / "index.json") as idx_fd:
index_object = json.load(idx_fd)
jsonschema.validate(index_object, db_idx_schema)
# Now that index is regenerated, validate "buildcache list" output
- buildcache_list_output = buildcache_cmd("list", output=str)
- assert "patchelf" in buildcache_list_output
+ assert "patchelf" in buildcache_cmd("list", output=str)
# Also test buildcache_spec schema
- bc_files_list = os.listdir(buildcache_path)
- for file_name in bc_files_list:
+ for file_name in os.listdir(mirror_dir / "build_cache"):
if file_name.endswith(".spec.json.sig"):
- spec_json_path = os.path.join(buildcache_path, file_name)
- with open(spec_json_path) as json_fd:
- json_object = Spec.extract_json_from_clearsig(json_fd.read())
- jsonschema.validate(json_object, specfile_schema)
-
- logs_dir = working_dir.join("logs_dir")
- if not os.path.exists(logs_dir.strpath):
- os.makedirs(logs_dir.strpath)
-
- ci.copy_stage_logs_to_artifacts(concrete_spec, logs_dir.strpath)
-
- logs_dir_list = os.listdir(logs_dir.strpath)
+ with open(mirror_dir / "build_cache" / file_name) as f:
+ spec_dict = Spec.extract_json_from_clearsig(f.read())
+ jsonschema.validate(spec_dict, specfile_schema)
- assert "spack-build-out.txt" in logs_dir_list
+ logs_dir = scratch / "logs_dir"
+ logs_dir.mkdir()
+ ci.copy_stage_logs_to_artifacts(concrete_spec, str(logs_dir))
+ assert "spack-build-out.txt" in os.listdir(logs_dir)
- # Also just make sure that if something goes wrong with the
- # stage logs copy, no exception is thrown
- ci.copy_stage_logs_to_artifacts(concrete_spec, None)
- ci.copy_stage_logs_to_artifacts(None, logs_dir.strpath)
+ dl_dir = scratch / "download_dir"
+ buildcache_cmd("download", "--spec-file", json_path, "--path", str(dl_dir))
+ assert len(os.listdir(dl_dir)) == 2
- dl_dir = working_dir.join("download_dir")
- if not os.path.exists(dl_dir.strpath):
- os.makedirs(dl_dir.strpath)
- buildcache_cmd("download", "--spec-file", json_path, "--path", dl_dir.strpath)
- dl_dir_list = os.listdir(dl_dir.strpath)
- assert len(dl_dir_list) == 2
+def test_push_to_build_cache_exceptions(monkeypatch, tmp_path, capsys):
+ def push_or_raise(*args, **kwargs):
+ raise spack.binary_distribution.PushToBuildCacheError("Error: Access Denied")
+ monkeypatch.setattr(spack.binary_distribution.Uploader, "push_or_raise", push_or_raise)
-def test_push_mirror_contents_exceptions(monkeypatch, capsys):
- def failing_access(*args, **kwargs):
- raise Exception("Error: Access Denied")
-
- monkeypatch.setattr(spack.ci, "_push_mirror_contents", failing_access)
-
- # Input doesn't matter, as wwe are faking exceptional output
- url = "fakejunk"
- ci.push_mirror_contents(None, url, None)
-
- captured = capsys.readouterr()
- std_out = captured[0]
- expect_msg = "Permission problem writing to {0}".format(url)
-
- assert expect_msg in std_out
+ # Input doesn't matter, as we are faking exceptional output
+ url = tmp_path.as_uri()
+ ci.push_to_build_cache(None, url, None)
+ assert f"Problem writing to {url}: Error: Access Denied" in capsys.readouterr().err
@pytest.mark.parametrize("match_behavior", ["first", "merge"])
@pytest.mark.parametrize("git_version", ["big ol commit sha", None])
def test_ci_generate_override_runner_attrs(
- tmpdir,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- monkeypatch,
- ci_base_environment,
- match_behavior,
- git_version,
+ ci_generate_test, tmp_path, monkeypatch, match_behavior, git_version
):
"""Test that we get the behavior we want with respect to the provision
of runner attributes like tags, variables, and scripts, both when we
inherit them from the top level, as well as when we override one or
more at the runner level"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ monkeypatch.setattr(spack, "spack_version", "0.20.0.test0")
+ monkeypatch.setattr(spack, "get_version", lambda: "0.20.0.test0 (blah)")
+ monkeypatch.setattr(spack, "get_spack_commit", lambda: git_version)
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- flatten-deps
- - a
+ - pkg-a
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
pipeline-gen:
- - match_behavior: {0}
+ - match_behavior: {match_behavior}
submapping:
- match:
- flatten-deps
@@ -1273,12 +967,12 @@ spack:
- match:
- dependency-install
- match:
- - a
+ - pkg-a
build-job:
tags:
- specific-a-2
- match:
- - a
+ - pkg-a
build-job-remove:
tags:
- toplevel2
@@ -1311,198 +1005,119 @@ spack:
- cleanup-job:
image: donotcare
tags: [donotcare]
-""".format(
- match_behavior
- )
- )
+"""
+ )
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
+ yaml_contents = syaml.load(outputfile.read_text())
+
+ assert "variables" in yaml_contents
+ global_vars = yaml_contents["variables"]
+ assert "SPACK_VERSION" in global_vars
+ assert global_vars["SPACK_VERSION"] == "0.20.0.test0 (blah)"
+ assert "SPACK_CHECKOUT_VERSION" in global_vars
+ assert global_vars["SPACK_CHECKOUT_VERSION"] == git_version or "v0.20.0.test0"
+
+ for ci_key in yaml_contents.keys():
+ if ci_key.startswith("pkg-a"):
+ # Make sure pkg-a's attributes override variables, and all the
+ # scripts. Also, make sure the 'toplevel' tag doesn't
+ # appear twice, but that a's specific extra tag does appear
+ the_elt = yaml_contents[ci_key]
+ assert the_elt["variables"]["ONE"] == "specificvarone"
+ assert the_elt["variables"]["TWO"] == "specificvartwo"
+ assert "THREE" not in the_elt["variables"]
+ assert len(the_elt["tags"]) == (2 if match_behavior == "first" else 3)
+ assert "specific-a" in the_elt["tags"]
+ if match_behavior == "merge":
+ assert "specific-a-2" in the_elt["tags"]
+ assert "toplevel" in the_elt["tags"]
+ assert "toplevel2" not in the_elt["tags"]
+ assert len(the_elt["before_script"]) == 1
+ assert the_elt["before_script"][0] == "custom pre step one"
+ assert len(the_elt["script"]) == 1
+ assert the_elt["script"][0] == "custom main step"
+ assert len(the_elt["after_script"]) == 1
+ assert the_elt["after_script"][0] == "custom post step one"
+ if "dependency-install" in ci_key:
+ # Since the dependency-install match omits any
+ # runner-attributes, make sure it inherited all the
+ # top-level attributes.
+ the_elt = yaml_contents[ci_key]
+ assert the_elt["variables"]["ONE"] == "toplevelvarone"
+ assert the_elt["variables"]["TWO"] == "toplevelvartwo"
+ assert "THREE" not in the_elt["variables"]
+ assert len(the_elt["tags"]) == 2
+ assert "toplevel" in the_elt["tags"]
+ assert "toplevel2" in the_elt["tags"]
+ assert len(the_elt["before_script"]) == 2
+ assert the_elt["before_script"][0] == "pre step one"
+ assert the_elt["before_script"][1] == "pre step two"
+ assert len(the_elt["script"]) == 1
+ assert the_elt["script"][0] == "main step"
+ assert len(the_elt["after_script"]) == 1
+ assert the_elt["after_script"][0] == "post step one"
+ if "flatten-deps" in ci_key:
+ # The flatten-deps match specifies that we keep the two
+ # top level variables, but add a third specifc one. It
+ # also adds a custom tag which should be combined with
+ # the top-level tag.
+ the_elt = yaml_contents[ci_key]
+ assert the_elt["variables"]["ONE"] == "toplevelvarone"
+ assert the_elt["variables"]["TWO"] == "toplevelvartwo"
+ assert the_elt["variables"]["THREE"] == "specificvarthree"
+ assert len(the_elt["tags"]) == 3
+ assert "specific-one" in the_elt["tags"]
+ assert "toplevel" in the_elt["tags"]
+ assert "toplevel2" in the_elt["tags"]
+ assert len(the_elt["before_script"]) == 2
+ assert the_elt["before_script"][0] == "pre step one"
+ assert the_elt["before_script"][1] == "pre step two"
+ assert len(the_elt["script"]) == 1
+ assert the_elt["script"][0] == "main step"
+ assert len(the_elt["after_script"]) == 1
+ assert the_elt["after_script"][0] == "post step one"
- with ev.read("test"):
- monkeypatch.setattr(spack, "spack_version", "0.20.0.test0")
- monkeypatch.setattr(spack.main, "get_version", lambda: "0.20.0.test0 (blah)")
- monkeypatch.setattr(spack.main, "get_spack_commit", lambda: git_version)
- ci_cmd("generate", "--output-file", outputfile)
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
-
- assert "variables" in yaml_contents
- global_vars = yaml_contents["variables"]
- assert "SPACK_VERSION" in global_vars
- assert global_vars["SPACK_VERSION"] == "0.20.0.test0 (blah)"
- assert "SPACK_CHECKOUT_VERSION" in global_vars
- assert global_vars["SPACK_CHECKOUT_VERSION"] == git_version or "v0.20.0.test0"
-
- for ci_key in yaml_contents.keys():
- if ci_key.startswith("a"):
- # Make sure a's attributes override variables, and all the
- # scripts. Also, make sure the 'toplevel' tag doesn't
- # appear twice, but that a's specific extra tag does appear
- the_elt = yaml_contents[ci_key]
- assert the_elt["variables"]["ONE"] == "specificvarone"
- assert the_elt["variables"]["TWO"] == "specificvartwo"
- assert "THREE" not in the_elt["variables"]
- assert len(the_elt["tags"]) == (2 if match_behavior == "first" else 3)
- assert "specific-a" in the_elt["tags"]
- if match_behavior == "merge":
- assert "specific-a-2" in the_elt["tags"]
- assert "toplevel" in the_elt["tags"]
- assert "toplevel2" not in the_elt["tags"]
- assert len(the_elt["before_script"]) == 1
- assert the_elt["before_script"][0] == "custom pre step one"
- assert len(the_elt["script"]) == 1
- assert the_elt["script"][0] == "custom main step"
- assert len(the_elt["after_script"]) == 1
- assert the_elt["after_script"][0] == "custom post step one"
- if "dependency-install" in ci_key:
- # Since the dependency-install match omits any
- # runner-attributes, make sure it inherited all the
- # top-level attributes.
- the_elt = yaml_contents[ci_key]
- assert the_elt["variables"]["ONE"] == "toplevelvarone"
- assert the_elt["variables"]["TWO"] == "toplevelvartwo"
- assert "THREE" not in the_elt["variables"]
- assert len(the_elt["tags"]) == 2
- assert "toplevel" in the_elt["tags"]
- assert "toplevel2" in the_elt["tags"]
- assert len(the_elt["before_script"]) == 2
- assert the_elt["before_script"][0] == "pre step one"
- assert the_elt["before_script"][1] == "pre step two"
- assert len(the_elt["script"]) == 1
- assert the_elt["script"][0] == "main step"
- assert len(the_elt["after_script"]) == 1
- assert the_elt["after_script"][0] == "post step one"
- if "flatten-deps" in ci_key:
- # The flatten-deps match specifies that we keep the two
- # top level variables, but add a third specifc one. It
- # also adds a custom tag which should be combined with
- # the top-level tag.
- the_elt = yaml_contents[ci_key]
- assert the_elt["variables"]["ONE"] == "toplevelvarone"
- assert the_elt["variables"]["TWO"] == "toplevelvartwo"
- assert the_elt["variables"]["THREE"] == "specificvarthree"
- assert len(the_elt["tags"]) == 3
- assert "specific-one" in the_elt["tags"]
- assert "toplevel" in the_elt["tags"]
- assert "toplevel2" in the_elt["tags"]
- assert len(the_elt["before_script"]) == 2
- assert the_elt["before_script"][0] == "pre step one"
- assert the_elt["before_script"][1] == "pre step two"
- assert len(the_elt["script"]) == 1
- assert the_elt["script"][0] == "main step"
- assert len(the_elt["after_script"]) == 1
- assert the_elt["after_script"][0] == "post step one"
-
-
-def test_ci_generate_with_workarounds(
- tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, ci_base_environment
+def test_ci_rebuild_index(
+ tmp_path: pathlib.Path, working_env, mutable_mock_env_path, install_mockery, mock_fetch
):
- """Make sure the post-processing cli workarounds do what they should"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
+ scratch = tmp_path / "working_dir"
+ mirror_dir = scratch / "mirror"
+ mirror_url = mirror_dir.as_uri()
+
+ with open(tmp_path / "spack.yaml", "w") as f:
f.write(
- """\
+ f"""
spack:
specs:
- - callpath%gcc@=9.5
+ - callpath
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {mirror_url}
ci:
pipeline-gen:
- submapping:
- - match: ['%gcc@9.5']
+ - match:
+ - patchelf
build-job:
tags:
- - donotcare
+ - donotcare
image: donotcare
- enable-artifacts-buildcache: true
"""
)
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile, "--dependencies")
-
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
-
- found_one = False
- non_rebuild_keys = ["workflow", "stages", "variables", "rebuild-index"]
-
- for ci_key in yaml_contents.keys():
- if ci_key not in non_rebuild_keys:
- found_one = True
- job_obj = yaml_contents[ci_key]
- assert "needs" not in job_obj
- assert "dependencies" in job_obj
-
- assert found_one is True
-
-
-@pytest.mark.disable_clean_stage_check
-def test_ci_rebuild_index(
- tmpdir,
- working_env,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- mock_fetch,
- mock_stage,
-):
- working_dir = tmpdir.join("working_dir")
-
- mirror_dir = working_dir.join("mirror")
- mirror_url = "file://{0}".format(mirror_dir.strpath)
-
- spack_yaml_contents = """
-spack:
- specs:
- - callpath
- mirrors:
- test-mirror: {0}
- ci:
- pipeline-gen:
- - submapping:
- - match:
- - patchelf
- build-job:
- tags:
- - donotcare
- image: donotcare
-""".format(
- mirror_url
- )
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
+ with working_dir(tmp_path):
env_cmd("create", "test", "./spack.yaml")
with ev.read("test"):
concrete_spec = Spec("callpath").concretized()
- spec_json = concrete_spec.to_json(hash=ht.dag_hash)
- json_path = str(tmpdir.join("spec.json"))
- with open(json_path, "w") as ypfd:
- ypfd.write(spec_json)
+ with open(tmp_path / "spec.json", "w") as f:
+ f.write(concrete_spec.to_json(hash=ht.dag_hash))
- install_cmd("--add", "--keep-stage", "-f", json_path)
+ install_cmd("--add", "-f", str(tmp_path / "spec.json"))
buildcache_cmd("push", "-u", "-f", mirror_url, "callpath")
ci_cmd("rebuild-index")
- buildcache_path = os.path.join(mirror_dir.strpath, "build_cache")
- index_path = os.path.join(buildcache_path, "index.json")
- with open(index_path) as idx_fd:
- index_object = json.load(idx_fd)
- jsonschema.validate(index_object, db_idx_schema)
+ with open(mirror_dir / "build_cache" / "index.json") as f:
+ jsonschema.validate(json.load(f), db_idx_schema)
def test_ci_get_stack_changed(mock_git_repo, monkeypatch):
@@ -1512,148 +1127,68 @@ def test_ci_get_stack_changed(mock_git_repo, monkeypatch):
assert ci.get_stack_changed("/no/such/env/path") is True
-def test_ci_generate_prune_untouched(
- tmpdir, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment, monkeypatch
-):
+def test_ci_generate_prune_untouched(ci_generate_test, tmp_path, monkeypatch):
"""Test pipeline generation with pruning works to eliminate
specs that were not affected by a change"""
- os.environ.update({"SPACK_PRUNE_UNTOUCHED": "TRUE"}) # enables pruning of untouched specs
- mirror_url = "https://my.fake.mirror"
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ monkeypatch.setenv("SPACK_PRUNE_UNTOUCHED", "TRUE") # enables pruning of untouched specs
+
+ def fake_compute_affected(r1=None, r2=None):
+ return ["libdwarf"]
+
+ def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
+ return False
+
+ monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected)
+ monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed)
+
+ spack_yaml, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- archive-files
- callpath
mirrors:
- some-mirror: {0}
+ buildcache-destination: {tmp_path / 'ci-mirror'}
ci:
pipeline-gen:
- build-job:
tags:
- donotcare
image: donotcare
-""".format(
- mirror_url
- )
- )
+"""
+ )
# Dependency graph rooted at callpath
# callpath -> dyninst -> libelf
# -> libdwarf -> libelf
# -> mpich
+ env_hashes = {}
+ with ev.read("test") as active_env:
+ active_env.concretize()
+ for s in active_env.all_specs():
+ env_hashes[s.name] = s.dag_hash()
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- def fake_compute_affected(r1=None, r2=None):
- return ["libdwarf"]
-
- def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
- return False
-
- env_hashes = {}
-
- with ev.read("test") as active_env:
- monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected)
- monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed)
-
- active_env.concretize()
-
- for s in active_env.all_specs():
- env_hashes[s.name] = s.dag_hash()
-
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- contents = f.read()
- print(contents)
- yaml_contents = syaml.load(contents)
-
- generated_hashes = []
-
- for ci_key in yaml_contents.keys():
- if "variables" in yaml_contents[ci_key]:
- generated_hashes.append(
- yaml_contents[ci_key]["variables"]["SPACK_JOB_SPEC_DAG_HASH"]
- )
-
- assert env_hashes["archive-files"] not in generated_hashes
- for spec_name in ["callpath", "dyninst", "mpich", "libdwarf", "libelf"]:
- assert env_hashes[spec_name] in generated_hashes
-
-
-def test_ci_generate_prune_env_vars(
- tmpdir, mutable_mock_env_path, install_mockery, mock_packages, ci_base_environment, monkeypatch
-):
- """Make sure environment variables controlling untouched spec
- pruning behave as expected."""
- os.environ.update({"SPACK_PRUNE_UNTOUCHED": "TRUE"}) # enables pruning of untouched specs
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- specs:
- - libelf
- gitlab-ci:
- mappings:
- - match:
- - arch=test-debian6-core2
- runner-attributes:
- tags:
- - donotcare
- image: donotcare
-"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
-
- def fake_compute_affected(r1=None, r2=None):
- return ["libdwarf"]
+ yaml_contents = syaml.load(outputfile.read_text())
- def fake_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
- return False
+ generated_hashes = []
+ for ci_key in yaml_contents.keys():
+ if "variables" in yaml_contents[ci_key]:
+ generated_hashes.append(yaml_contents[ci_key]["variables"]["SPACK_JOB_SPEC_DAG_HASH"])
- expected_depth_param = None
-
- def check_get_spec_filter_list(env, affected_pkgs, dependent_traverse_depth=None):
- assert dependent_traverse_depth == expected_depth_param
- return set()
-
- monkeypatch.setattr(ci, "compute_affected_packages", fake_compute_affected)
- monkeypatch.setattr(ci, "get_stack_changed", fake_stack_changed)
- monkeypatch.setattr(ci, "get_spec_filter_list", check_get_spec_filter_list)
-
- expectations = {"-1": -1, "0": 0, "True": None}
-
- for key, val in expectations.items():
- with ev.read("test"):
- os.environ.update({"SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH": key})
- expected_depth_param = val
- # Leaving out the mirror in the spack.yaml above means the
- # pipeline generation command will fail, pretty much immediately.
- # But for this test, we only care how the environment variables
- # for pruning are handled, the faster the better. So allow the
- # spack command to fail.
- ci_cmd("generate", fail_on_error=False)
+ assert env_hashes["archive-files"] not in generated_hashes
+ for spec_name in ["callpath", "dyninst", "mpich", "libdwarf", "libelf"]:
+ assert env_hashes[spec_name] in generated_hashes
def test_ci_subcommands_without_mirror(
- tmpdir,
+ tmp_path: pathlib.Path,
mutable_mock_env_path,
- mock_packages,
install_mockery,
ci_base_environment,
mock_binary_index,
):
"""Make sure we catch if there is not a mirror and report an error"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
+ with open(tmp_path / "spack.yaml", "w") as f:
f.write(
"""\
spack:
@@ -1671,134 +1206,30 @@ spack:
"""
)
- with tmpdir.as_cwd():
+ with working_dir(tmp_path):
env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
with ev.read("test"):
# Check the 'generate' subcommand
- output = ci_cmd(
- "generate", "--output-file", outputfile, output=str, fail_on_error=False
- )
- ex = "spack ci generate requires an env containing a mirror"
- assert ex in output
+ expect = "spack ci generate requires a mirror named 'buildcache-destination'"
+ with pytest.raises(ci.SpackCIError, match=expect):
+ ci_cmd("generate", "--output-file", str(tmp_path / ".gitlab-ci.yml"))
# Also check the 'rebuild-index' subcommand
output = ci_cmd("rebuild-index", output=str, fail_on_error=False)
- ex = "spack ci rebuild-index requires an env containing a mirror"
- assert ex in output
+ assert "spack ci rebuild-index requires an env containing a mirror" in output
-def test_ensure_only_one_temporary_storage():
- """Make sure 'gitlab-ci' section of env does not allow specification of
- both 'enable-artifacts-buildcache' and 'temporary-storage-url-prefix'."""
- gitlab_ci_template = """
- ci:
- {0}
- pipeline-gen:
- - submapping:
- - match:
- - notcheckedhere
- build-job:
- tags:
- - donotcare
-"""
-
- enable_artifacts = "enable-artifacts-buildcache: True"
- temp_storage = "temporary-storage-url-prefix: file:///temp/mirror"
- specify_both = """{0}
- {1}
-""".format(
- enable_artifacts, temp_storage
- )
- specify_neither = ""
-
- # User can specify "enable-artifacts-buildcache" (boolean)
- yaml_obj = syaml.load(gitlab_ci_template.format(enable_artifacts))
- jsonschema.validate(yaml_obj, ci_schema)
-
- # User can also specify "temporary-storage-url-prefix" (string)
- yaml_obj = syaml.load(gitlab_ci_template.format(temp_storage))
- jsonschema.validate(yaml_obj, ci_schema)
-
- # However, specifying both should fail to validate
- yaml_obj = syaml.load(gitlab_ci_template.format(specify_both))
- with pytest.raises(jsonschema.ValidationError):
- jsonschema.validate(yaml_obj, ci_schema)
-
- # Specifying neither should be fine too, as neither of these properties
- # should be required
- yaml_obj = syaml.load(gitlab_ci_template.format(specify_neither))
- jsonschema.validate(yaml_obj, ci_schema)
-
-
-def test_ci_generate_temp_storage_url(
- tmpdir,
+def test_ci_generate_read_broken_specs_url(
+ tmp_path: pathlib.Path,
mutable_mock_env_path,
install_mockery,
mock_packages,
monkeypatch,
ci_base_environment,
- mock_binary_index,
-):
- """Verify correct behavior when using temporary-storage-url-prefix"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- specs:
- - archive-files
- mirrors:
- some-mirror: https://my.fake.mirror
- ci:
- temporary-storage-url-prefix: file:///work/temp/mirror
- pipeline-gen:
- - submapping:
- - match:
- - archive-files
- build-job:
- tags:
- - donotcare
- image: donotcare
- - cleanup-job:
- custom_attribute: custom!
-"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as of:
- pipeline_doc = syaml.load(of.read())
-
- assert "cleanup" in pipeline_doc
- cleanup_job = pipeline_doc["cleanup"]
-
- assert cleanup_job["custom_attribute"] == "custom!"
-
- assert "script" in cleanup_job
- cleanup_task = cleanup_job["script"][0]
-
- assert cleanup_task.startswith("spack -d mirror destroy")
-
- assert "stages" in pipeline_doc
- stages = pipeline_doc["stages"]
-
- # Cleanup job should be 2nd to last, just before rebuild-index
- assert "stage" in cleanup_job
- assert cleanup_job["stage"] == stages[-2]
-
-
-def test_ci_generate_read_broken_specs_url(
- tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, ci_base_environment
):
"""Verify that `broken-specs-url` works as intended"""
- spec_a = Spec("a")
+ spec_a = Spec("pkg-a")
spec_a.concretize()
a_dag_hash = spec_a.dag_hash()
@@ -1806,7 +1237,7 @@ def test_ci_generate_read_broken_specs_url(
spec_flattendeps.concretize()
flattendeps_dag_hash = spec_flattendeps.dag_hash()
- broken_specs_url = "file://{0}".format(tmpdir.strpath)
+ broken_specs_url = tmp_path.as_uri()
# Mark 'a' as broken (but not 'flatten-deps')
broken_spec_a_url = "{0}/{1}".format(broken_specs_url, a_dag_hash)
@@ -1817,68 +1248,61 @@ def test_ci_generate_read_broken_specs_url(
)
# Test that `spack ci generate` notices this broken spec and fails.
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
+ with open(tmp_path / "spack.yaml", "w") as f:
f.write(
- """\
+ f"""\
spack:
specs:
- flatten-deps
- - a
+ - pkg-a
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {(tmp_path / "ci-mirror").as_uri()}
ci:
- broken-specs-url: "{0}"
+ broken-specs-url: "{broken_specs_url}"
pipeline-gen:
- submapping:
- match:
- - a
+ - pkg-a
- flatten-deps
- - b
+ - pkg-b
- dependency-install
build-job:
tags:
- donotcare
image: donotcare
-""".format(
- broken_specs_url
- )
+"""
)
- with tmpdir.as_cwd():
+ with working_dir(tmp_path):
env_cmd("create", "test", "./spack.yaml")
with ev.read("test"):
# Check output of the 'generate' subcommand
output = ci_cmd("generate", output=str, fail_on_error=False)
assert "known to be broken" in output
- expected = "{0}/{1} (in stack {2}) was reported broken here: {3}".format(
- spec_a.name, a_dag_hash[:7], job_stack, a_job_url
+ expected = (
+ f"{spec_a.name}/{a_dag_hash[:7]} (in stack {job_stack}) was "
+ f"reported broken here: {a_job_url}"
)
assert expected in output
- not_expected = "flatten-deps/{0} (in stack".format(flattendeps_dag_hash[:7])
+ not_expected = f"flatten-deps/{flattendeps_dag_hash[:7]} (in stack"
assert not_expected not in output
-def test_ci_generate_external_signing_job(
- tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, ci_base_environment
-):
+def test_ci_generate_external_signing_job(ci_generate_test, tmp_path, monkeypatch):
"""Verify that in external signing mode: 1) each rebuild jobs includes
the location where the binary hash information is written and 2) we
properly generate a final signing job in the pipeline."""
- os.environ.update({"SPACK_PIPELINE_TYPE": "spack_protected_branch"})
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
+ monkeypatch.setenv("SPACK_PIPELINE_TYPE", "spack_protected_branch")
+ _, outputfile, _ = ci_generate_test(
+ f"""\
spack:
specs:
- archive-files
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: {(tmp_path / "ci-mirror").as_uri()}
ci:
- temporary-storage-url-prefix: file:///work/temp/mirror
pipeline-gen:
- submapping:
- match:
@@ -1900,48 +1324,40 @@ spack:
- echo hello
custom_attribute: custom!
"""
- )
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = str(tmpdir.join(".gitlab-ci.yml"))
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as of:
- pipeline_doc = syaml.load(of.read())
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
- assert "sign-pkgs" in pipeline_doc
- signing_job = pipeline_doc["sign-pkgs"]
- assert "tags" in signing_job
- signing_job_tags = signing_job["tags"]
- for expected_tag in ["notary", "protected", "aws"]:
- assert expected_tag in signing_job_tags
- assert signing_job["custom_attribute"] == "custom!"
+ assert "sign-pkgs" in yaml_contents
+ signing_job = yaml_contents["sign-pkgs"]
+ assert "tags" in signing_job
+ signing_job_tags = signing_job["tags"]
+ for expected_tag in ["notary", "protected", "aws"]:
+ assert expected_tag in signing_job_tags
+ assert signing_job["custom_attribute"] == "custom!"
def test_ci_reproduce(
- tmpdir,
+ tmp_path: pathlib.Path,
mutable_mock_env_path,
install_mockery,
- mock_packages,
monkeypatch,
last_two_git_commits,
ci_base_environment,
mock_binary_index,
):
- working_dir = tmpdir.join("repro_dir")
+ repro_dir = tmp_path / "repro_dir"
image_name = "org/image:tag"
- spack_yaml_contents = """
+ with open(tmp_path / "spack.yaml", "w") as f:
+ f.write(
+ f"""
spack:
definitions:
- packages: [archive-files]
specs:
- $packages
mirrors:
- test-mirror: file:///some/fake/mirror
+ buildcache-destination: {tmp_path / "ci-mirror"}
ci:
pipeline-gen:
- submapping:
@@ -1950,65 +1366,49 @@ spack:
build-job:
tags:
- donotcare
- image: {0}
-""".format(
- image_name
- )
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(spack_yaml_contents)
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- with ev.read("test") as env:
- with env.write_transaction():
- env.concretize()
- env.write()
-
- if not os.path.exists(working_dir.strpath):
- os.makedirs(working_dir.strpath)
-
- shutil.copyfile(env.manifest_path, os.path.join(working_dir.strpath, "spack.yaml"))
- shutil.copyfile(env.lock_path, os.path.join(working_dir.strpath, "spack.lock"))
+ image: {image_name}
+"""
+ )
- job_spec = None
+ with working_dir(tmp_path), ev.Environment(".") as env:
+ env.concretize()
+ env.write()
- for h, s in env.specs_by_hash.items():
- if s.name == "archive-files":
- job_spec = s
+ repro_dir.mkdir()
- job_spec_json_path = os.path.join(working_dir.strpath, "archivefiles.json")
- with open(job_spec_json_path, "w") as fd:
- fd.write(job_spec.to_json(hash=ht.dag_hash))
+ job_spec = env.concrete_roots()[0]
+ with open(repro_dir / "archivefiles.json", "w") as f:
+ f.write(job_spec.to_json(hash=ht.dag_hash))
- artifacts_root = os.path.join(working_dir.strpath, "scratch_dir")
- pipeline_path = os.path.join(artifacts_root, "pipeline.yml")
+ artifacts_root = repro_dir / "scratch_dir"
+ pipeline_path = artifacts_root / "pipeline.yml"
- ci_cmd("generate", "--output-file", pipeline_path, "--artifacts-root", artifacts_root)
+ ci_cmd(
+ "generate",
+ "--output-file",
+ str(pipeline_path),
+ "--artifacts-root",
+ str(artifacts_root),
+ )
- job_name = ci.get_job_name(job_spec)
+ job_name = ci.get_job_name(job_spec)
- repro_file = os.path.join(working_dir.strpath, "repro.json")
- repro_details = {
- "job_name": job_name,
- "job_spec_json": "archivefiles.json",
- "ci_project_dir": working_dir.strpath,
- }
- with open(repro_file, "w") as fd:
- fd.write(json.dumps(repro_details))
+ with open(repro_dir / "repro.json", "w") as f:
+ f.write(
+ json.dumps(
+ {
+ "job_name": job_name,
+ "job_spec_json": "archivefiles.json",
+ "ci_project_dir": str(repro_dir),
+ }
+ )
+ )
- install_script = os.path.join(working_dir.strpath, "install.sh")
- with open(install_script, "w") as fd:
- fd.write("#!/bin/sh\n\n#fake install\nspack install blah\n")
+ with open(repro_dir / "install.sh", "w") as f:
+ f.write("#!/bin/sh\n\n#fake install\nspack install blah\n")
- spack_info_file = os.path.join(working_dir.strpath, "spack_info.txt")
- with open(spack_info_file, "w") as fd:
- fd.write(
- "\nMerge {0} into {1}\n\n".format(
- last_two_git_commits[1], last_two_git_commits[0]
- )
- )
+ with open(repro_dir / "spack_info.txt", "w") as f:
+ f.write(f"\nMerge {last_two_git_commits[1]} into {last_two_git_commits[0]}\n\n")
def fake_download_and_extract_artifacts(url, work_dir):
pass
@@ -2016,16 +1416,53 @@ spack:
monkeypatch.setattr(ci, "download_and_extract_artifacts", fake_download_and_extract_artifacts)
rep_out = ci_cmd(
"reproduce-build",
- "https://some.domain/api/v1/projects/1/jobs/2/artifacts",
+ "https://example.com/api/v1/projects/1/jobs/2/artifacts",
"--working-dir",
- working_dir.strpath,
+ str(repro_dir),
output=str,
)
# Make sure the script was generated
- assert os.path.exists(os.path.join(os.path.realpath(working_dir.strpath), "start.sh"))
- # Make sure we tell the suer where it is when not in interactive mode
- expect_out = "$ {0}/start.sh".format(os.path.realpath(working_dir.strpath))
- assert expect_out in rep_out
+ assert (repro_dir / "start.sh").exists()
+
+ # Make sure we tell the user where it is when not in interactive mode
+ assert f"$ {repro_dir}/start.sh" in rep_out
+
+
+@pytest.mark.parametrize(
+ "url_in,url_out",
+ [
+ (
+ "https://example.com/api/v4/projects/1/jobs/2/artifacts",
+ "https://example.com/api/v4/projects/1/jobs/2/artifacts",
+ ),
+ (
+ "https://example.com/spack/spack/-/jobs/123456/artifacts/download",
+ "https://example.com/spack/spack/-/jobs/123456/artifacts/download",
+ ),
+ (
+ "https://example.com/spack/spack/-/jobs/123456",
+ "https://example.com/spack/spack/-/jobs/123456/artifacts/download",
+ ),
+ (
+ "https://example.com/spack/spack/-/jobs/////123456////?x=y#z",
+ "https://example.com/spack/spack/-/jobs/123456/artifacts/download",
+ ),
+ ],
+)
+def test_reproduce_build_url_validation(url_in, url_out):
+ assert spack.cmd.ci._gitlab_artifacts_url(url_in) == url_out
+
+
+def test_reproduce_build_url_validation_fails():
+ """Wrong URLs should cause an exception"""
+ with pytest.raises(SystemExit):
+ ci_cmd("reproduce-build", "example.com/spack/spack/-/jobs/123456/artifacts/download")
+
+ with pytest.raises(SystemExit):
+ ci_cmd("reproduce-build", "https://example.com/spack/spack/-/issues")
+
+ with pytest.raises(SystemExit):
+ ci_cmd("reproduce-build", "https://example.com/spack/spack/-")
@pytest.mark.parametrize(
@@ -2051,208 +1488,166 @@ def test_cmd_first_line():
assert spack.cmd.first_line(doc) == first
-legacy_spack_yaml_contents = """
+def test_gitlab_config_scopes(ci_generate_test, tmp_path):
+ """Test pipeline generation with real configs included"""
+ configs_path = os.path.join(spack_paths.share_path, "gitlab", "cloud_pipelines", "configs")
+ _, outputfile, _ = ci_generate_test(
+ f"""\
spack:
- definitions:
- - old-gcc-pkgs:
- - archive-files
- - callpath
- # specify ^openblas-with-lapack to ensure that builtin.mock repo flake8
- # package (which can also provide lapack) is not chosen, as it violates
- # a package-level check which requires exactly one fetch strategy (this
- # is apparently not an issue for other tests that use it).
- - hypre@0.2.15 ^openblas-with-lapack
+ config:
+ install_tree: {tmp_path / "opt"}
+ include: [{configs_path}]
+ view: false
specs:
- - matrix:
- - [$old-gcc-pkgs]
+ - flatten-deps
mirrors:
- test-mirror: file:///some/fake/mirror
- {0}:
- match_behavior: first
- mappings:
- - match:
- - arch=test-debian6-core2
- runner-attributes:
- tags:
- - donotcare
- image: donotcare
- - match:
- - arch=test-debian6-m1
- runner-attributes:
- tags:
- - donotcare
- image: donotcare
- service-job-attributes:
- image: donotcare
- tags: [donotcare]
- cdash:
- build-group: Not important
- url: https://my.fake.cdash
- project: Not used
- site: Nothing
+ buildcache-destination: {tmp_path / "ci-mirror"}
+ ci:
+ pipeline-gen:
+ - build-job:
+ image: "ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01"
+ tags: ["some_tag"]
"""
+ )
+ yaml_contents = syaml.load(outputfile.read_text())
-@pytest.mark.regression("36409")
-def test_gitlab_ci_deprecated(
- tmpdir,
- mutable_mock_env_path,
- install_mockery,
- mock_packages,
- monkeypatch,
- ci_base_environment,
- mock_binary_index,
-):
- mirror_url = "file:///some/fake/mirror"
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(legacy_spack_yaml_contents.format("gitlab-ci"))
-
- with tmpdir.as_cwd():
- env_cmd("create", "test", "./spack.yaml")
- outputfile = "generated-pipeline.yaml"
-
- with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
-
- assert "stages" in yaml_contents
- assert len(yaml_contents["stages"]) == 5
- assert yaml_contents["stages"][0] == "stage-0"
- assert yaml_contents["stages"][4] == "stage-rebuild-index"
+ assert "rebuild-index" in yaml_contents
- assert "rebuild-index" in yaml_contents
- rebuild_job = yaml_contents["rebuild-index"]
- expected = "spack buildcache update-index --keys {0}".format(mirror_url)
- assert rebuild_job["script"][0] == expected
+ rebuild_job = yaml_contents["rebuild-index"]
+ assert "tags" in rebuild_job
+ assert "variables" in rebuild_job
- assert "variables" in yaml_contents
- assert "SPACK_ARTIFACTS_ROOT" in yaml_contents["variables"]
- artifacts_root = yaml_contents["variables"]["SPACK_ARTIFACTS_ROOT"]
- assert artifacts_root == "jobs_scratch_dir"
+ rebuild_tags = rebuild_job["tags"]
+ rebuild_vars = rebuild_job["variables"]
+ assert all([t in rebuild_tags for t in ["spack", "service"]])
+ expected_vars = ["CI_JOB_SIZE", "KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST"]
+ assert all([v in rebuild_vars for v in expected_vars])
-@pytest.mark.regression("36045")
-def test_gitlab_ci_update(
- tmpdir,
+def test_ci_generate_mirror_config(
+ tmp_path: pathlib.Path,
mutable_mock_env_path,
install_mockery,
- mock_packages,
monkeypatch,
ci_base_environment,
mock_binary_index,
):
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(legacy_spack_yaml_contents.format("ci"))
-
- with tmpdir.as_cwd():
- env_cmd("update", "-y", ".")
-
- with open("spack.yaml") as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
+ """Make sure the correct mirror gets used as the buildcache destination"""
+ fst, snd = (tmp_path / "first").as_uri(), (tmp_path / "second").as_uri()
+ with open(tmp_path / "spack.yaml", "w") as f:
+ f.write(
+ f"""\
+spack:
+ specs:
+ - archive-files
+ mirrors:
+ some-mirror: {fst}
+ buildcache-destination: {snd}
+ ci:
+ pipeline-gen:
+ - submapping:
+ - match:
+ - archive-files
+ build-job:
+ tags:
+ - donotcare
+ image: donotcare
+"""
+ )
- ci_root = yaml_contents["spack"]["ci"]
+ with ev.Environment(tmp_path):
+ ci_cmd("generate", "--output-file", str(tmp_path / ".gitlab-ci.yml"))
- assert "pipeline-gen" in ci_root
+ with open(tmp_path / ".gitlab-ci.yml") as f:
+ pipeline_doc = syaml.load(f)
+ assert fst not in pipeline_doc["rebuild-index"]["script"][0]
+ assert snd in pipeline_doc["rebuild-index"]["script"][0]
-def test_gitlab_config_scopes(
- tmpdir, working_env, mutable_mock_env_path, mock_packages, ci_base_environment
-):
- """Test pipeline generation with real configs included"""
- configs_path = os.path.join(spack_paths.share_path, "gitlab", "cloud_pipelines", "configs")
+def dynamic_mapping_setup(tmpdir):
filename = str(tmpdir.join("spack.yaml"))
with open(filename, "w") as f:
f.write(
"""\
spack:
- config:
- install_tree: {0}
- include: [{1}]
- view: false
specs:
- - flatten-deps
+ - pkg-a
mirrors:
- some-mirror: https://my.fake.mirror
+ buildcache-destination: https://my.fake.mirror
ci:
pipeline-gen:
- - build-job:
- image: "ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01"
- tags: ["some_tag"]
-""".format(
- tmpdir.strpath, configs_path
- )
+ - dynamic-mapping:
+ endpoint: https://fake.spack.io/mapper
+ require: ["variables"]
+ ignore: ["ignored_field"]
+ allow: ["variables", "retry"]
+"""
)
+ spec_a = Spec("pkg-a")
+ spec_a.concretize()
+
+ return ci.get_job_name(spec_a)
+
+
+def test_ci_dynamic_mapping_empty(
+ tmpdir,
+ working_env,
+ mutable_mock_env_path,
+ install_mockery,
+ mock_packages,
+ monkeypatch,
+ ci_base_environment,
+):
+ # The test will always return an empty dictionary
+ def fake_dyn_mapping_urlopener(*args, **kwargs):
+ return BytesIO("{}".encode())
+
+ monkeypatch.setattr(ci, "_dyn_mapping_urlopener", fake_dyn_mapping_urlopener)
+
+ _ = dynamic_mapping_setup(tmpdir)
with tmpdir.as_cwd():
env_cmd("create", "test", "./spack.yaml")
outputfile = str(tmpdir.join(".gitlab-ci.yml"))
with ev.read("test"):
- ci_cmd("generate", "--output-file", outputfile)
-
- with open(outputfile) as f:
- contents = f.read()
- yaml_contents = syaml.load(contents)
+ output = ci_cmd("generate", "--output-file", outputfile)
+ assert "Response missing required keys: ['variables']" in output
- assert "rebuild-index" in yaml_contents
- rebuild_job = yaml_contents["rebuild-index"]
- assert "tags" in rebuild_job
- assert "variables" in rebuild_job
- rebuild_tags = rebuild_job["tags"]
- rebuild_vars = rebuild_job["variables"]
- assert all([t in rebuild_tags for t in ["spack", "service"]])
- expected_vars = ["CI_JOB_SIZE", "KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST"]
- assert all([v in rebuild_vars for v in expected_vars])
-
-def test_ci_generate_mirror_config(
+def test_ci_dynamic_mapping_full(
tmpdir,
+ working_env,
mutable_mock_env_path,
install_mockery,
mock_packages,
monkeypatch,
ci_base_environment,
- mock_binary_index,
):
- """Make sure the correct mirror gets used as the buildcache destination"""
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- specs:
- - archive-files
- mirrors:
- some-mirror: file:///this/is/a/source/mirror
- buildcache-destination: file:///push/binaries/here
- ci:
- pipeline-gen:
- - submapping:
- - match:
- - archive-files
- build-job:
- tags:
- - donotcare
- image: donotcare
-"""
+ # The test will always return an empty dictionary
+ def fake_dyn_mapping_urlopener(*args, **kwargs):
+ return BytesIO(
+ json.dumps(
+ {"variables": {"MY_VAR": "hello"}, "ignored_field": 0, "unallowed_field": 0}
+ ).encode()
)
+ monkeypatch.setattr(ci, "_dyn_mapping_urlopener", fake_dyn_mapping_urlopener)
+
+ label = dynamic_mapping_setup(tmpdir)
with tmpdir.as_cwd():
env_cmd("create", "test", "./spack.yaml")
outputfile = str(tmpdir.join(".gitlab-ci.yml"))
with ev.read("test"):
ci_cmd("generate", "--output-file", outputfile)
+
with open(outputfile) as of:
pipeline_doc = syaml.load(of.read())
- assert "rebuild-index" in pipeline_doc
- reindex_job = pipeline_doc["rebuild-index"]
- assert "script" in reindex_job
- reindex_step = reindex_job["script"][0]
- assert "file:///push/binaries/here" in reindex_step
+ assert label in pipeline_doc
+ job = pipeline_doc[label]
+
+ assert job.get("variables", {}).get("MY_VAR") == "hello"
+ assert "ignored_field" not in job
+ assert "unallowed_field" not in job
diff --git a/lib/spack/spack/test/cmd/clean.py b/lib/spack/spack/test/cmd/clean.py
index 43441c487c..8b671e495e 100644
--- a/lib/spack/spack/test/cmd/clean.py
+++ b/lib/spack/spack/test/cmd/clean.py
@@ -11,8 +11,10 @@ import llnl.util.filesystem as fs
import spack.caches
import spack.cmd.clean
+import spack.environment as ev
import spack.main
import spack.package_base
+import spack.spec
import spack.stage
import spack.store
@@ -68,6 +70,20 @@ def test_function_calls(command_line, effects, mock_calls_for_clean):
assert mock_calls_for_clean[name] == (1 if name in effects else 0)
+def test_env_aware_clean(mock_stage, install_mockery, mutable_mock_env_path, monkeypatch):
+ e = ev.create("test", with_view=False)
+ e.add("mpileaks")
+ e.concretize()
+
+ def fail(*args, **kwargs):
+ raise Exception("This should not have been called")
+
+ monkeypatch.setattr(spack.spec.Spec, "concretize", fail)
+
+ with e:
+ clean("mpileaks")
+
+
def test_remove_python_cache(tmpdir, monkeypatch):
cache_files = ["file1.pyo", "file2.pyc"]
source_file = "file1.py"
diff --git a/lib/spack/spack/test/cmd/commands.py b/lib/spack/spack/test/cmd/commands.py
index 68d28f5684..c0c781cb89 100644
--- a/lib/spack/spack/test/cmd/commands.py
+++ b/lib/spack/spack/test/cmd/commands.py
@@ -6,11 +6,11 @@
import filecmp
import os
import shutil
-import subprocess
import pytest
import spack.cmd
+import spack.cmd.commands
import spack.main
import spack.paths
from spack.cmd.commands import _dest_to_fish_complete, _positional_to_subroutine
@@ -156,22 +156,6 @@ def test_update_with_header(tmpdir):
commands("--update", str(update_file), "--header", str(filename))
-@pytest.mark.xfail
-def test_no_pipe_error():
- """Make sure we don't see any pipe errors when piping output."""
-
- proc = subprocess.Popen(
- ["spack", "commands", "--format=rst"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
-
- # Call close() on stdout to cause a broken pipe
- proc.stdout.close()
- proc.wait()
- stderr = proc.stderr.read().decode("utf-8")
-
- assert "Broken pipe" not in stderr
-
-
def test_bash_completion():
"""Test the bash completion writer."""
out1 = commands("--format=bash")
diff --git a/lib/spack/spack/test/cmd/common/arguments.py b/lib/spack/spack/test/cmd/common/arguments.py
index c1f75e99f3..167130816f 100644
--- a/lib/spack/spack/test/cmd/common/arguments.py
+++ b/lib/spack/spack/test/cmd/common/arguments.py
@@ -72,7 +72,6 @@ def test_parse_spec_flags_with_spaces(specs, cflags, propagation, negated_varian
assert "~{0}".format(v) in s
-@pytest.mark.usefixtures("config")
def test_match_spec_env(mock_packages, mutable_mock_env_path):
"""
Concretize a spec with non-default options in an environment. Make
@@ -81,59 +80,64 @@ def test_match_spec_env(mock_packages, mutable_mock_env_path):
"""
# Initial sanity check: we are planning on choosing a non-default
# value, so make sure that is in fact not the default.
- check_defaults = spack.cmd.parse_specs(["a"], concretize=True)[0]
+ check_defaults = spack.cmd.parse_specs(["pkg-a"], concretize=True)[0]
assert not check_defaults.satisfies("foobar=baz")
e = ev.create("test")
- e.add("a foobar=baz")
+ e.add("pkg-a foobar=baz")
e.concretize()
with e:
- env_spec = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["a"])[0])
+ env_spec = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["pkg-a"])[0])
assert env_spec.satisfies("foobar=baz")
assert env_spec.concrete
-@pytest.mark.usefixtures("config")
def test_multiple_env_match_raises_error(mock_packages, mutable_mock_env_path):
e = ev.create("test")
- e.add("a foobar=baz")
- e.add("a foobar=fee")
+ e.add("pkg-a foobar=baz")
+ e.add("pkg-a foobar=fee")
e.concretize()
with e:
with pytest.raises(ev.SpackEnvironmentError) as exc_info:
- spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["a"])[0])
+ spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["pkg-a"])[0])
assert "matches multiple specs" in exc_info.value.message
-@pytest.mark.usefixtures("config")
def test_root_and_dep_match_returns_root(mock_packages, mutable_mock_env_path):
e = ev.create("test")
- e.add("b@0.9")
- e.add("a foobar=bar") # Depends on b, should choose b@1.0
+ e.add("pkg-b@0.9")
+ e.add("pkg-a foobar=bar") # Depends on b, should choose b@1.0
e.concretize()
with e:
# This query matches the root b and b as a dependency of a. In that
# case the root instance should be preferred.
- env_spec1 = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["b"])[0])
+ env_spec1 = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["pkg-b"])[0])
assert env_spec1.satisfies("@0.9")
- env_spec2 = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["b@1.0"])[0])
+ env_spec2 = spack.cmd.matching_spec_from_env(spack.cmd.parse_specs(["pkg-b@1.0"])[0])
assert env_spec2
@pytest.mark.parametrize(
- "arg,config", [("--reuse", True), ("--fresh", False), ("--reuse-deps", "dependencies")]
+ "arg,conf",
+ [
+ ("--reuse", True),
+ ("--fresh", False),
+ ("--reuse-deps", "dependencies"),
+ ("--fresh-roots", "dependencies"),
+ ],
)
-def test_concretizer_arguments(mutable_config, mock_packages, arg, config):
+def test_concretizer_arguments(mutable_config, mock_packages, arg, conf):
"""Ensure that ConfigSetAction is doing the right thing."""
spec = spack.main.SpackCommand("spec")
- assert spack.config.get("concretizer:reuse", None) is None
+ assert spack.config.get("concretizer:reuse", None, scope="command_line") is None
spec(arg, "zlib")
- assert spack.config.get("concretizer:reuse", None) == config
+ assert spack.config.get("concretizer:reuse", None) == conf
+ assert spack.config.get("concretizer:reuse", None, scope="command_line") == conf
def test_use_buildcache_type():
diff --git a/lib/spack/spack/test/cmd/compiler.py b/lib/spack/spack/test/cmd/compiler.py
index 3a8c662a5e..431cdfd787 100644
--- a/lib/spack/spack/test/cmd/compiler.py
+++ b/lib/spack/spack/test/cmd/compiler.py
@@ -4,11 +4,13 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import shutil
+import sys
import pytest
import spack.cmd.compiler
import spack.compilers
+import spack.config
import spack.main
import spack.spec
import spack.util.pattern
@@ -80,41 +82,13 @@ def test_compiler_find_without_paths(no_compilers_yaml, working_env, mock_execut
assert "gcc" in output
-@pytest.mark.regression("17589")
-def test_compiler_find_no_apple_gcc(no_compilers_yaml, working_env, mock_executable):
- """Tests that Spack won't mistake Apple's GCC as a "real" GCC, since it's really
- Clang with a few tweaks.
- """
- gcc_path = mock_executable(
- "gcc",
- output="""
-if [ "$1" = "-dumpversion" ]; then
- echo "4.2.1"
-elif [ "$1" = "--version" ]; then
- echo "Configured with: --prefix=/dummy"
- echo "Apple clang version 11.0.0 (clang-1100.0.33.16)"
- echo "Target: x86_64-apple-darwin18.7.0"
- echo "Thread model: posix"
- echo "InstalledDir: /dummy"
-else
- echo "clang: error: no input files"
-fi
-""",
- )
-
- os.environ["PATH"] = str(gcc_path.parent)
- output = compiler("find", "--scope=site")
-
- assert "gcc" not in output
-
-
@pytest.mark.regression("37996")
def test_compiler_remove(mutable_config, mock_packages):
"""Tests that we can remove a compiler from configuration."""
- assert spack.spec.CompilerSpec("gcc@=4.5.0") in spack.compilers.all_compiler_specs()
- args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@4.5.0", add_paths=[], scope=None)
+ assert spack.spec.CompilerSpec("gcc@=9.4.0") in spack.compilers.all_compiler_specs()
+ args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@9.4.0", add_paths=[], scope=None)
spack.cmd.compiler.compiler_remove(args)
- assert spack.spec.CompilerSpec("gcc@=4.5.0") not in spack.compilers.all_compiler_specs()
+ assert spack.spec.CompilerSpec("gcc@=9.4.0") not in spack.compilers.all_compiler_specs()
@pytest.mark.regression("37996")
@@ -123,14 +97,14 @@ def test_removing_compilers_from_multiple_scopes(mutable_config, mock_packages):
site_config = spack.config.get("compilers", scope="site")
spack.config.set("compilers", site_config, scope="user")
- assert spack.spec.CompilerSpec("gcc@=4.5.0") in spack.compilers.all_compiler_specs()
- args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@4.5.0", add_paths=[], scope=None)
+ assert spack.spec.CompilerSpec("gcc@=9.4.0") in spack.compilers.all_compiler_specs()
+ args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@9.4.0", add_paths=[], scope=None)
spack.cmd.compiler.compiler_remove(args)
- assert spack.spec.CompilerSpec("gcc@=4.5.0") not in spack.compilers.all_compiler_specs()
+ assert spack.spec.CompilerSpec("gcc@=9.4.0") not in spack.compilers.all_compiler_specs()
@pytest.mark.not_on_windows("Cannot execute bash script on Windows")
-def test_compiler_add(mutable_config, mock_packages, mock_executable):
+def test_compiler_add(mutable_config, mock_executable):
"""Tests that we can add a compiler to configuration."""
expected_version = "4.5.3"
gcc_path = mock_executable(
@@ -148,7 +122,12 @@ done
compilers_before_find = set(spack.compilers.all_compiler_specs())
args = spack.util.pattern.Bunch(
- all=None, compiler_spec=None, add_paths=[str(root_dir)], scope=None, mixed_toolchain=False
+ all=None,
+ compiler_spec=None,
+ add_paths=[str(root_dir)],
+ scope=None,
+ mixed_toolchain=False,
+ jobs=1,
)
spack.cmd.compiler.compiler_find(args)
compilers_after_find = set(spack.compilers.all_compiler_specs())
@@ -174,7 +153,9 @@ def test_compiler_find_mixed_suffixes(
assert "clang@11.0.0" in output
assert "gcc@8.4.0" in output
- config = spack.compilers.get_compiler_config("site", False)
+ config = spack.compilers.get_compiler_config(
+ no_compilers_yaml, scope="site", init_config=False
+ )
clang = next(c["compiler"] for c in config if c["compiler"]["spec"] == "clang@=11.0.0")
gcc = next(c["compiler"] for c in config if c["compiler"]["spec"] == "gcc@=8.4.0")
@@ -209,7 +190,9 @@ def test_compiler_find_prefer_no_suffix(no_compilers_yaml, working_env, compiler
assert "clang@11.0.0" in output
assert "gcc@8.4.0" in output
- config = spack.compilers.get_compiler_config("site", False)
+ config = spack.compilers.get_compiler_config(
+ no_compilers_yaml, scope="site", init_config=False
+ )
clang = next(c["compiler"] for c in config if c["compiler"]["spec"] == "clang@=11.0.0")
assert clang["paths"]["cc"] == str(compilers_dir / "clang")
@@ -224,11 +207,13 @@ def test_compiler_find_path_order(no_compilers_yaml, working_env, compilers_dir)
for name in ("gcc-8", "g++-8", "gfortran-8"):
shutil.copy(compilers_dir / name, new_dir / name)
# Set PATH to have the new folder searched first
- os.environ["PATH"] = "{}:{}".format(str(new_dir), str(compilers_dir))
+ os.environ["PATH"] = f"{str(new_dir)}:{str(compilers_dir)}"
compiler("find", "--scope=site")
- config = spack.compilers.get_compiler_config("site", False)
+ config = spack.compilers.get_compiler_config(
+ no_compilers_yaml, scope="site", init_config=False
+ )
gcc = next(c["compiler"] for c in config if c["compiler"]["spec"] == "gcc@=8.4.0")
assert gcc["paths"] == {
"cc": str(new_dir / "gcc-8"),
@@ -247,3 +232,56 @@ def test_compiler_list_empty(no_compilers_yaml, working_env, compilers_dir):
out = compiler("list")
assert not out
assert compiler.returncode == 0
+
+
+@pytest.mark.parametrize(
+ "external,expected",
+ [
+ (
+ {
+ "spec": "gcc@=7.7.7 languages=c,cxx,fortran os=foobar target=x86_64",
+ "prefix": "/path/to/fake",
+ "modules": ["gcc/7.7.7", "foobar"],
+ "extra_attributes": {
+ "compilers": {
+ "c": "/path/to/fake/gcc",
+ "cxx": "/path/to/fake/g++",
+ "fortran": "/path/to/fake/gfortran",
+ },
+ "flags": {"fflags": "-ffree-form"},
+ },
+ },
+ """gcc@7.7.7:
+\tpaths:
+\t\tcc = /path/to/fake/gcc
+\t\tcxx = /path/to/fake/g++
+\t\tf77 = /path/to/fake/gfortran
+\t\tfc = /path/to/fake/gfortran
+\tflags:
+\t\tfflags = ['-ffree-form']
+\tmodules = ['gcc/7.7.7', 'foobar']
+\toperating system = foobar
+""",
+ )
+ ],
+)
+def test_compilers_shows_packages_yaml(
+ external, expected, no_compilers_yaml, working_env, compilers_dir
+):
+ """Spack should see a single compiler defined from packages.yaml"""
+ external["prefix"] = external["prefix"].format(prefix=os.path.dirname(compilers_dir))
+ gcc_entry = {"externals": [external]}
+
+ packages = spack.config.get("packages")
+ packages["gcc"] = gcc_entry
+ spack.config.set("packages", packages)
+
+ out = compiler("list")
+ assert out.count("gcc@7.7.7") == 1
+
+ out = compiler("info", "gcc@7.7.7")
+ assert out == expected.format(
+ compilers_dir=str(compilers_dir),
+ sep=os.sep,
+ suffix=".bat" if sys.platform == "win32" else "",
+ )
diff --git a/lib/spack/spack/test/cmd/concretize.py b/lib/spack/spack/test/cmd/concretize.py
index da3cec034d..806675a07c 100644
--- a/lib/spack/spack/test/cmd/concretize.py
+++ b/lib/spack/spack/test/cmd/concretize.py
@@ -10,7 +10,7 @@ import spack.environment as ev
from spack import spack_version
from spack.main import SpackCommand
-pytestmark = pytest.mark.usefixtures("config", "mutable_mock_repo")
+pytestmark = pytest.mark.usefixtures("mutable_config", "mutable_mock_repo")
env = SpackCommand("env")
add = SpackCommand("add")
@@ -51,8 +51,8 @@ def test_concretize_root_test_dependencies_are_concretized(unify, mutable_mock_e
with ev.read("test") as e:
e.unify = unify
- add("a")
- add("b")
+ add("pkg-a")
+ add("pkg-b")
concretize("--test", "root")
assert e.matching_spec("test-dependency")
diff --git a/lib/spack/spack/test/cmd/config.py b/lib/spack/spack/test/cmd/config.py
index 6bc19831a5..93d7c70483 100644
--- a/lib/spack/spack/test/cmd/config.py
+++ b/lib/spack/spack/test/cmd/config.py
@@ -591,14 +591,12 @@ def test_config_prefer_upstream(
"""
mock_db_root = str(tmpdir_factory.mktemp("mock_db_root"))
- prepared_db = spack.database.Database(mock_db_root)
-
- upstream_layout = gen_mock_layout("/a/")
+ prepared_db = spack.database.Database(mock_db_root, layout=gen_mock_layout("/a/"))
for spec in ["hdf5 +mpi", "hdf5 ~mpi", "boost+debug~icu+graph", "dependency-install", "patch"]:
dep = spack.spec.Spec(spec)
dep.concretize()
- prepared_db.add(dep, upstream_layout)
+ prepared_db.add(dep)
downstream_db_root = str(tmpdir_factory.mktemp("mock_downstream_db_root"))
db_for_test = spack.database.Database(downstream_db_root, upstream_dbs=[prepared_db])
@@ -640,4 +638,4 @@ spack:
config("update", "-y", "config")
with ev.Environment(str(tmpdir)) as e:
- assert not e.manifest.pristine_yaml_content["spack"]["config"]["ccache"]
+ assert not e.manifest.yaml_content["spack"]["config"]["ccache"]
diff --git a/lib/spack/spack/test/cmd/create.py b/lib/spack/spack/test/cmd/create.py
index 7e0bc2bbd4..03dc5ec0e6 100644
--- a/lib/spack/spack/test/cmd/create.py
+++ b/lib/spack/spack/test/cmd/create.py
@@ -4,11 +4,12 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import tarfile
import pytest
import spack.cmd.create
-import spack.util.editor
+import spack.url
from spack.main import SpackCommand
from spack.url import UndetectableNameError
from spack.util.executable import which
@@ -27,7 +28,11 @@ create = SpackCommand("create")
[r"TestNamedPackage(Package)", r"def install(self"],
),
(["file://example.tar.gz"], "example", [r"Example(Package)", r"def install(self"]),
- (["-n", "test-license"], "test-license", [r'license("UNKNOWN")']),
+ (
+ ["-n", "test-license"],
+ "test-license",
+ [r'license("UNKNOWN", checked_by="github_user1")'],
+ ),
# Template-specific cases
(
["-t", "autoreconf", "/test-autoreconf"],
@@ -150,24 +155,24 @@ def test_create_template_bad_name(mock_test_repo, name, expected):
def test_build_system_guesser_no_stage():
"""Test build system guesser when stage not provided."""
- guesser = spack.cmd.create.BuildSystemGuesser()
+ guesser = spack.cmd.create.BuildSystemAndLanguageGuesser()
# Ensure get the expected build system
with pytest.raises(AttributeError, match="'NoneType' object has no attribute"):
guesser(None, "/the/url/does/not/matter")
-def test_build_system_guesser_octave():
+def test_build_system_guesser_octave(tmp_path):
"""
Test build system guesser for the special case, where the same base URL
identifies the build system rather than guessing the build system from
files contained in the archive.
"""
url, expected = "downloads.sourceforge.net/octave/", "octave"
- guesser = spack.cmd.create.BuildSystemGuesser()
+ guesser = spack.cmd.create.BuildSystemAndLanguageGuesser()
# Ensure get the expected build system
- guesser(None, url)
+ guesser(str(tmp_path / "archive.tar.gz"), url)
assert guesser.build_system == expected
# Also ensure get the correct template
@@ -203,3 +208,40 @@ def test_get_name_error(monkeypatch, capsys):
def test_no_url():
"""Test creation of package without a URL."""
create("--skip-editor", "-n", "create-new-package")
+
+
+@pytest.mark.parametrize(
+ "source_files,languages",
+ [
+ (["fst.c", "snd.C"], ["c", "cxx"]),
+ (["fst.c", "snd.cxx"], ["c", "cxx"]),
+ (["fst.F", "snd.cc"], ["cxx", "fortran"]),
+ (["fst.f", "snd.c"], ["c", "fortran"]),
+ (["fst.jl", "snd.py"], []),
+ ],
+)
+def test_language_and_build_system_detection(tmp_path, source_files, languages):
+ """Test that languages are detected from tarball, and the build system is guessed from the
+ most top-level build system file."""
+
+ def add(tar: tarfile.TarFile, name: str, type):
+ tarinfo = tarfile.TarInfo(name)
+ tarinfo.type = type
+ tar.addfile(tarinfo)
+
+ tarball = str(tmp_path / "example.tar.gz")
+
+ with tarfile.open(tarball, "w:gz") as tar:
+ add(tar, "./third-party/", tarfile.DIRTYPE)
+ add(tar, "./third-party/example/", tarfile.DIRTYPE)
+ add(tar, "./third-party/example/CMakeLists.txt", tarfile.REGTYPE) # false positive
+ add(tar, "./configure", tarfile.REGTYPE) # actual build system
+ add(tar, "./src/", tarfile.DIRTYPE)
+ for file in source_files:
+ add(tar, f"src/{file}", tarfile.REGTYPE)
+
+ guesser = spack.cmd.create.BuildSystemAndLanguageGuesser()
+ guesser(str(tarball), "https://example.com")
+
+ assert guesser.build_system == "autotools"
+ assert guesser.languages == languages
diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py
index 6a240a0ca7..49f739b543 100644
--- a/lib/spack/spack/test/cmd/debug.py
+++ b/lib/spack/spack/test/cmd/debug.py
@@ -9,15 +9,14 @@ import platform
import pytest
-import spack.config
+import spack
import spack.platforms
-from spack.main import SpackCommand, get_version
+import spack.spec
+from spack.main import SpackCommand
from spack.util.executable import which
debug = SpackCommand("debug")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
@pytest.mark.db
def test_create_db_tarball(tmpdir, database):
@@ -57,7 +56,6 @@ def test_report():
host_target = host_platform.target("frontend")
architecture = spack.spec.ArchSpec((str(host_platform), str(host_os), str(host_target)))
- assert get_version() in out
+ assert spack.get_version() in out
assert platform.python_version() in out
assert str(architecture) in out
- assert spack.config.get("config:concretizer") in out
diff --git a/lib/spack/spack/test/cmd/deconcretize.py b/lib/spack/spack/test/cmd/deconcretize.py
index 92553b7e53..06dbd39458 100644
--- a/lib/spack/spack/test/cmd/deconcretize.py
+++ b/lib/spack/spack/test/cmd/deconcretize.py
@@ -12,29 +12,29 @@ deconcretize = SpackCommand("deconcretize")
@pytest.fixture(scope="function")
-def test_env(mutable_mock_env_path, config, mock_packages):
+def test_env(mutable_mock_env_path, mock_packages):
ev.create("test")
with ev.read("test") as e:
- e.add("a@2.0 foobar=bar ^b@1.0")
- e.add("a@1.0 foobar=bar ^b@0.9")
+ e.add("pkg-a@2.0 foobar=bar ^pkg-b@1.0")
+ e.add("pkg-a@1.0 foobar=bar ^pkg-b@0.9")
e.concretize()
e.write()
def test_deconcretize_dep(test_env):
with ev.read("test") as e:
- deconcretize("-y", "b@1.0")
+ deconcretize("-y", "pkg-b@1.0")
specs = [s for s, _ in e.concretized_specs()]
assert len(specs) == 1
- assert specs[0].satisfies("a@1.0")
+ assert specs[0].satisfies("pkg-a@1.0")
def test_deconcretize_all_dep(test_env):
with ev.read("test") as e:
with pytest.raises(SpackCommandError):
- deconcretize("-y", "b")
- deconcretize("-y", "--all", "b")
+ deconcretize("-y", "pkg-b")
+ deconcretize("-y", "--all", "pkg-b")
specs = [s for s, _ in e.concretized_specs()]
assert len(specs) == 0
@@ -42,27 +42,27 @@ def test_deconcretize_all_dep(test_env):
def test_deconcretize_root(test_env):
with ev.read("test") as e:
- output = deconcretize("-y", "--root", "b@1.0")
+ output = deconcretize("-y", "--root", "pkg-b@1.0")
assert "No matching specs to deconcretize" in output
assert len(e.concretized_order) == 2
- deconcretize("-y", "--root", "a@2.0")
+ deconcretize("-y", "--root", "pkg-a@2.0")
specs = [s for s, _ in e.concretized_specs()]
assert len(specs) == 1
- assert specs[0].satisfies("a@1.0")
+ assert specs[0].satisfies("pkg-a@1.0")
def test_deconcretize_all_root(test_env):
with ev.read("test") as e:
with pytest.raises(SpackCommandError):
- deconcretize("-y", "--root", "a")
+ deconcretize("-y", "--root", "pkg-a")
- output = deconcretize("-y", "--root", "--all", "b")
+ output = deconcretize("-y", "--root", "--all", "pkg-b")
assert "No matching specs to deconcretize" in output
assert len(e.concretized_order) == 2
- deconcretize("-y", "--root", "--all", "a")
+ deconcretize("-y", "--root", "--all", "pkg-a")
specs = [s for s, _ in e.concretized_specs()]
assert len(specs) == 0
diff --git a/lib/spack/spack/test/cmd/deprecate.py b/lib/spack/spack/test/cmd/deprecate.py
index 6669be57fe..89e07bd04b 100644
--- a/lib/spack/spack/test/cmd/deprecate.py
+++ b/lib/spack/spack/test/cmd/deprecate.py
@@ -5,8 +5,9 @@
import pytest
+import spack.spec
import spack.store
-from spack.database import InstallStatuses
+from spack.enums import InstallRecordStatus
from spack.main import SpackCommand
install = SpackCommand("install")
@@ -14,8 +15,6 @@ uninstall = SpackCommand("uninstall")
deprecate = SpackCommand("deprecate")
find = SpackCommand("find")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
def test_deprecate(mock_packages, mock_archive, mock_fetch, install_mockery):
install("libelf@0.8.13")
@@ -27,7 +26,7 @@ def test_deprecate(mock_packages, mock_archive, mock_fetch, install_mockery):
deprecate("-y", "libelf@0.8.10", "libelf@0.8.13")
non_deprecated = spack.store.STORE.db.query()
- all_available = spack.store.STORE.db.query(installed=any)
+ all_available = spack.store.STORE.db.query(installed=InstallRecordStatus.ANY)
assert all_available == all_installed
assert non_deprecated == spack.store.STORE.db.query("libelf@0.8.13")
@@ -57,7 +56,7 @@ def test_deprecate_install(mock_packages, mock_archive, mock_fetch, install_mock
deprecate("-y", "-i", "libelf@0.8.10", "libelf@0.8.13")
non_deprecated = spack.store.STORE.db.query()
- deprecated = spack.store.STORE.db.query(installed=InstallStatuses.DEPRECATED)
+ deprecated = spack.store.STORE.db.query(installed=InstallRecordStatus.DEPRECATED)
assert deprecated == to_deprecate
assert len(non_deprecated) == 1
assert non_deprecated[0].satisfies("libelf@0.8.13")
@@ -76,8 +75,8 @@ def test_deprecate_deps(mock_packages, mock_archive, mock_fetch, install_mockery
deprecate("-y", "-d", "libdwarf@20130207", "libdwarf@20130729")
non_deprecated = spack.store.STORE.db.query()
- all_available = spack.store.STORE.db.query(installed=any)
- deprecated = spack.store.STORE.db.query(installed=InstallStatuses.DEPRECATED)
+ all_available = spack.store.STORE.db.query(installed=InstallRecordStatus.ANY)
+ deprecated = spack.store.STORE.db.query(installed=InstallRecordStatus.DEPRECATED)
assert all_available == all_installed
assert sorted(all_available) == sorted(deprecated + non_deprecated)
@@ -97,7 +96,9 @@ def test_uninstall_deprecated(mock_packages, mock_archive, mock_fetch, install_m
uninstall("-y", "libelf@0.8.10")
- assert spack.store.STORE.db.query() == spack.store.STORE.db.query(installed=any)
+ assert spack.store.STORE.db.query() == spack.store.STORE.db.query(
+ installed=InstallRecordStatus.ANY
+ )
assert spack.store.STORE.db.query() == non_deprecated
@@ -117,7 +118,7 @@ def test_deprecate_already_deprecated(mock_packages, mock_archive, mock_fetch, i
deprecate("-y", "libelf@0.8.10", "libelf@0.8.13")
non_deprecated = spack.store.STORE.db.query()
- all_available = spack.store.STORE.db.query(installed=any)
+ all_available = spack.store.STORE.db.query(installed=InstallRecordStatus.ANY)
assert len(non_deprecated) == 2
assert len(all_available) == 3
@@ -144,7 +145,7 @@ def test_deprecate_deprecator(mock_packages, mock_archive, mock_fetch, install_m
deprecate("-y", "libelf@0.8.12", "libelf@0.8.13")
non_deprecated = spack.store.STORE.db.query()
- all_available = spack.store.STORE.db.query(installed=any)
+ all_available = spack.store.STORE.db.query(installed=InstallRecordStatus.ANY)
assert len(non_deprecated) == 1
assert len(all_available) == 3
@@ -165,3 +166,30 @@ def test_concretize_deprecated(mock_packages, mock_archive, mock_fetch, install_
spec = spack.spec.Spec("libelf@0.8.10")
with pytest.raises(spack.spec.SpecDeprecatedError):
spec.concretize()
+
+
+@pytest.mark.usefixtures("mock_packages", "mock_archive", "mock_fetch", "install_mockery")
+@pytest.mark.regression("46915")
+def test_deprecate_spec_with_external_dependency(mutable_config, temporary_store, tmp_path):
+ """Tests that we can deprecate a spec that has an external dependency"""
+ packages_yaml = {
+ "libelf": {
+ "buildable": False,
+ "externals": [{"spec": "libelf@0.8.13", "prefix": str(tmp_path / "libelf")}],
+ }
+ }
+ mutable_config.set("packages", packages_yaml)
+
+ install("--fake", "dyninst ^libdwarf@=20111030")
+ install("--fake", "libdwarf@=20130729")
+
+ # Ensure we are using the external libelf
+ db = temporary_store.db
+ libelf = db.query_one("libelf")
+ assert libelf.external
+
+ deprecated_spec = db.query_one("libdwarf@=20111030")
+ new_libdwarf = db.query_one("libdwarf@=20130729")
+ deprecate("-y", "libdwarf@=20111030", "libdwarf@=20130729")
+
+ assert db.deprecator(deprecated_spec) == new_libdwarf
diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py
index 8649e17490..c335ea0ccf 100644
--- a/lib/spack/spack/test/cmd/dev_build.py
+++ b/lib/spack/spack/test/cmd/dev_build.py
@@ -9,9 +9,9 @@ import pytest
import llnl.util.filesystem as fs
-import spack.build_environment
import spack.environment as ev
import spack.error
+import spack.repo
import spack.spec
import spack.store
from spack.main import SpackCommand
@@ -20,7 +20,7 @@ dev_build = SpackCommand("dev-build")
install = SpackCommand("install")
env = SpackCommand("env")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
+pytestmark = [pytest.mark.disable_clean_stage_check]
def test_dev_build_basics(tmpdir, install_mockery):
@@ -93,7 +93,7 @@ def test_dev_build_until_last_phase(tmpdir, install_mockery):
assert os.path.exists(str(tmpdir))
-def test_dev_build_before_until(tmpdir, install_mockery, capsys):
+def test_dev_build_before_until(tmpdir, install_mockery):
spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized()
with tmpdir.as_cwd():
@@ -122,21 +122,11 @@ def print_spack_cc(*args):
print(os.environ.get("CC", ""))
-# `module unload cray-libsci` in test environment causes failure
-# It does not fail for actual installs
-# build_environment.py imports module directly, so we monkeypatch it there
-# rather than in module_cmd
-def mock_module_noop(*args):
- pass
-
-
def test_dev_build_drop_in(tmpdir, mock_packages, monkeypatch, install_mockery, working_env):
monkeypatch.setattr(os, "execvp", print_spack_cc)
- monkeypatch.setattr(spack.build_environment, "module", mock_module_noop)
-
with tmpdir.as_cwd():
output = dev_build("-b", "edit", "--drop-in", "sh", "dev-build-test-install@0.0.0")
- assert "lib/spack/env" in output
+ assert os.path.join("lib", "spack", "env") in output
def test_dev_build_fails_already_installed(tmpdir, install_mockery):
@@ -215,6 +205,44 @@ spack:
assert f.read() == spec.package.replacement_string
+def test_dev_build_env_with_vars(tmpdir, install_mockery, mutable_mock_env_path, monkeypatch):
+ """Test Spack does dev builds for packages in develop section of env (path with variables)."""
+ # setup dev-build-test-install package for dev build
+ build_dir = tmpdir.mkdir("build")
+ spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={build_dir}")
+ spec.concretize()
+
+ # store the build path in an environment variable that will be used in the environment
+ monkeypatch.setenv("CUSTOM_BUILD_PATH", build_dir)
+
+ with build_dir.as_cwd(), open(spec.package.filename, "w") as f:
+ f.write(spec.package.original_string)
+
+ # setup environment
+ envdir = tmpdir.mkdir("env")
+ with envdir.as_cwd():
+ with open("spack.yaml", "w") as f:
+ f.write(
+ """\
+spack:
+ specs:
+ - dev-build-test-install@0.0.0
+
+ develop:
+ dev-build-test-install:
+ spec: dev-build-test-install@0.0.0
+ path: $CUSTOM_BUILD_PATH
+"""
+ )
+ env("create", "test", "./spack.yaml")
+ with ev.read("test"):
+ install()
+
+ assert spec.package.filename in os.listdir(spec.prefix)
+ with open(os.path.join(spec.prefix, spec.package.filename), "r") as f:
+ assert f.read() == spec.package.replacement_string
+
+
def test_dev_build_env_version_mismatch(tmpdir, install_mockery, mutable_mock_env_path):
"""Test Spack constraints concretization by develop specs."""
# setup dev-build-test-install package for dev build
diff --git a/lib/spack/spack/test/cmd/develop.py b/lib/spack/spack/test/cmd/develop.py
index 73741ddbe7..c0cbb003ec 100644
--- a/lib/spack/spack/test/cmd/develop.py
+++ b/lib/spack/spack/test/cmd/develop.py
@@ -9,19 +9,23 @@ import pytest
import llnl.util.filesystem as fs
+import spack.config
import spack.environment as ev
+import spack.package_base
import spack.spec
+import spack.stage
+import spack.util.git
+import spack.util.path
from spack.main import SpackCommand
+add = SpackCommand("add")
develop = SpackCommand("develop")
env = SpackCommand("env")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
@pytest.mark.usefixtures("mutable_mock_env_path", "mock_packages", "mock_fetch", "mutable_config")
class TestDevelop:
- def check_develop(self, env, spec, path=None):
+ def check_develop(self, env, spec, path=None, build_dir=None):
path = path or spec.name
# check in memory representation
@@ -41,6 +45,12 @@ class TestDevelop:
else:
assert yaml_entry["path"] == path
+ if build_dir is not None:
+ scope = env.scope_name
+ assert build_dir == spack.config.get(
+ "packages:{}:package_attributes:build_directory".format(spec.name), scope
+ )
+
def test_develop_no_path_no_clone(self):
env("create", "test")
with ev.read("test") as e:
@@ -55,6 +65,12 @@ class TestDevelop:
develop("--no-clone", "-p", str(tmpdir), "mpich@1.0")
self.check_develop(e, spack.spec.Spec("mpich@=1.0"), str(tmpdir))
+ def test_develop_no_version(self, tmpdir):
+ env("create", "test")
+ with ev.read("test") as e:
+ develop("--no-clone", "-p", str(tmpdir), "mpich")
+ self.check_develop(e, spack.spec.Spec("mpich@=main"), str(tmpdir))
+
def test_develop(self):
env("create", "test")
with ev.read("test") as e:
@@ -72,6 +88,12 @@ class TestDevelop:
develop()
self.check_develop(e, spack.spec.Spec("mpich@=1.0"))
+ def test_develop_build_directory(self):
+ env("create", "test")
+ with ev.read("test") as e:
+ develop("-b", "test_build_dir", "mpich@1.0")
+ self.check_develop(e, spack.spec.Spec("mpich@=1.0"), None, "test_build_dir")
+
def test_develop_twice(self):
env("create", "test")
with ev.read("test") as e:
@@ -179,14 +201,16 @@ def test_develop_full_git_repo(
finally:
spec.package.do_clean()
- # Now use "spack develop": look at the resulting stage directory and make
+ # Now use "spack develop": look at the resulting dev_path and make
# sure the git repo pulled includes the full branch history (or rather,
# more than just one commit).
env("create", "test")
- with ev.read("test"):
+ with ev.read("test") as e:
+ add("git-test-commit")
develop("git-test-commit@1.2")
- location = SpackCommand("location")
- develop_stage_dir = location("git-test-commit").strip()
- commits = _git_commit_list(develop_stage_dir)
+ e.concretize()
+ spec = e.all_specs()[0]
+ develop_dir = spec.variants["dev_path"].value
+ commits = _git_commit_list(develop_dir)
assert len(commits) > 1
diff --git a/lib/spack/spack/test/cmd/diff.py b/lib/spack/spack/test/cmd/diff.py
index 1792674253..125a646253 100644
--- a/lib/spack/spack/test/cmd/diff.py
+++ b/lib/spack/spack/test/cmd/diff.py
@@ -6,9 +6,9 @@
import pytest
import spack.cmd.diff
-import spack.config
import spack.main
-import spack.store
+import spack.repo
+import spack.spec
import spack.util.spack_json as sjson
from spack.test.conftest import create_test_repo
@@ -20,6 +20,8 @@ find_cmd = spack.main.SpackCommand("find")
_p1 = (
"p1",
"""\
+from spack.package import *
+
class P1(Package):
version("1.0")
@@ -35,6 +37,8 @@ class P1(Package):
_p2 = (
"p2",
"""\
+from spack.package import *
+
class P2(Package):
version("1.0")
@@ -48,6 +52,8 @@ class P2(Package):
_p3 = (
"p3",
"""\
+from spack.package import *
+
class P3(Package):
version("1.0")
@@ -58,6 +64,8 @@ class P3(Package):
_i1 = (
"i1",
"""\
+from spack.package import *
+
class I1(Package):
version("1.0")
@@ -73,6 +81,8 @@ class I1(Package):
_i2 = (
"i2",
"""\
+from spack.package import *
+
class I2(Package):
version("1.0")
@@ -89,6 +99,8 @@ class I2(Package):
_p4 = (
"p4",
"""\
+from spack.package import *
+
class P4(Package):
version("1.0")
@@ -181,7 +193,6 @@ def test_diff_cmd(install_mockery, mock_fetch, mock_archive, mock_packages):
assert ["hash", "mpileaks %s" % specB.dag_hash()] in c["b_not_a"]
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
def test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages):
"""Test with and without the --first option"""
install_cmd("mpileaks")
diff --git a/lib/spack/spack/test/cmd/edit.py b/lib/spack/spack/test/cmd/edit.py
new file mode 100644
index 0000000000..1735f7f4a5
--- /dev/null
+++ b/lib/spack/spack/test/cmd/edit.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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 spack.repo
+import spack.util.editor
+from spack.build_systems import autotools, cmake
+from spack.main import SpackCommand
+
+edit = SpackCommand("edit")
+
+
+def test_edit_packages(monkeypatch, mock_packages: spack.repo.RepoPath):
+ """Test spack edit pkg-a pkg-b"""
+ path_a = mock_packages.filename_for_package_name("pkg-a")
+ path_b = mock_packages.filename_for_package_name("pkg-b")
+ called = False
+
+ def editor(*args: str, **kwargs):
+ nonlocal called
+ called = True
+ assert args[0] == path_a
+ assert args[1] == path_b
+
+ monkeypatch.setattr(spack.util.editor, "editor", editor)
+ edit("pkg-a", "pkg-b")
+ assert called
+
+
+def test_edit_files(monkeypatch):
+ """Test spack edit --build-system autotools cmake"""
+ called = False
+
+ def editor(*args: str, **kwargs):
+ nonlocal called
+ called = True
+ assert os.path.samefile(args[0], autotools.__file__)
+ assert os.path.samefile(args[1], cmake.__file__)
+
+ monkeypatch.setattr(spack.util.editor, "editor", editor)
+ edit("--build-system", "autotools", "cmake")
+ assert called
diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py
index d71a2412b3..099e6306ac 100644
--- a/lib/spack/spack/test/cmd/env.py
+++ b/lib/spack/spack/test/cmd/env.py
@@ -9,12 +9,14 @@ import os
import pathlib
import shutil
from argparse import Namespace
+from typing import Any, Dict, Optional
import pytest
import llnl.util.filesystem as fs
import llnl.util.link_tree
import llnl.util.tty as tty
+from llnl.util.symlink import readlink
import spack.cmd.env
import spack.config
@@ -23,12 +25,21 @@ import spack.environment.depfile as depfile
import spack.environment.environment
import spack.environment.shell
import spack.error
+import spack.main
import spack.modules
+import spack.modules.tcl
import spack.package_base
import spack.paths
import spack.repo
+import spack.solver.asp
+import spack.spec
+import spack.stage
+import spack.store
+import spack.util.environment
import spack.util.spack_json as sjson
+import spack.util.spack_yaml
from spack.cmd.env import _env_create
+from spack.installer import PackageInstaller
from spack.main import SpackCommand, SpackCommandError
from spack.spec import Spec
from spack.stage import stage_prefix
@@ -39,7 +50,7 @@ from spack.version import Version
# TODO-27021
# everything here uses the mock_env_path
pytestmark = [
- pytest.mark.usefixtures("mutable_mock_env_path", "config", "mutable_mock_repo"),
+ pytest.mark.usefixtures("mutable_config", "mutable_mock_env_path", "mutable_mock_repo"),
pytest.mark.maybeslow,
pytest.mark.not_on_windows("Envs unsupported on Window"),
]
@@ -48,6 +59,7 @@ env = SpackCommand("env")
install = SpackCommand("install")
add = SpackCommand("add")
change = SpackCommand("change")
+config = SpackCommand("config")
remove = SpackCommand("remove")
concretize = SpackCommand("concretize")
stage = SpackCommand("stage")
@@ -59,6 +71,27 @@ module = SpackCommand("module")
sep = os.sep
+def setup_combined_multiple_env():
+ env("create", "test1")
+ test1 = ev.read("test1")
+ with test1:
+ add("mpich@1.0")
+ test1.concretize()
+ test1.write()
+
+ env("create", "test2")
+ test2 = ev.read("test2")
+ with test2:
+ add("libelf")
+ test2.concretize()
+ test2.write()
+
+ env("create", "--include-concrete", "test1", "--include-concrete", "test2", "combined_env")
+ combined = ev.read("combined_env")
+
+ return test1, test2, combined
+
+
@pytest.fixture()
def environment_from_manifest(tmp_path):
"""Returns a new environment named 'test' from the content of a manifest file."""
@@ -84,6 +117,99 @@ def check_viewdir_removal(viewdir):
) == ["projections.yaml"]
+def test_env_track_nonexistant_path_fails(capfd):
+ with pytest.raises(spack.main.SpackCommandError):
+ env("track", "path/does/not/exist")
+
+ out, _ = capfd.readouterr()
+ assert "doesn't contain an environment" in out
+
+
+def test_env_track_existing_env_fails(capfd):
+ env("create", "track_test")
+
+ with pytest.raises(spack.main.SpackCommandError):
+ env("track", "--name", "track_test", ev.environment_dir_from_name("track_test"))
+
+ out, _ = capfd.readouterr()
+ assert "environment named track_test already exists" in out
+
+
+def test_env_track_valid(tmp_path):
+ with fs.working_dir(str(tmp_path)):
+ # create an independent environment
+ env("create", "-d", ".")
+
+ # test tracking an environment in known store
+ env("track", "--name", "test1", ".")
+
+ # test removing environment to ensure independent isn't deleted
+ env("rm", "-y", "test1")
+
+ assert os.path.isfile("spack.yaml")
+
+
+def test_env_untrack_valid(tmp_path):
+ with fs.working_dir(str(tmp_path)):
+ # create an independent environment
+ env("create", "-d", ".")
+
+ # test tracking an environment in known store
+ env("track", "--name", "test_untrack", ".")
+ env("untrack", "--yes-to-all", "test_untrack")
+
+ # check that environment was sucessfully untracked
+ out = env("ls")
+ assert "test_untrack" not in out
+
+
+def test_env_untrack_invalid_name():
+ # test untracking an environment that doesn't exist
+ env_name = "invalid_enviornment_untrack"
+
+ out = env("untrack", env_name)
+
+ assert f"Environment '{env_name}' does not exist" in out
+
+
+def test_env_untrack_when_active(tmp_path, capfd):
+ env_name = "test_untrack_active"
+
+ with fs.working_dir(str(tmp_path)):
+ # create an independent environment
+ env("create", "-d", ".")
+
+ # test tracking an environment in known store
+ env("track", "--name", env_name, ".")
+
+ active_env = ev.read(env_name)
+ with active_env:
+ with pytest.raises(spack.main.SpackCommandError):
+ env("untrack", "--yes-to-all", env_name)
+
+ # check that environment could not be untracked while active
+ out, _ = capfd.readouterr()
+ assert f"'{env_name}' can't be untracked while activated" in out
+
+ env("untrack", "-f", env_name)
+ out = env("ls")
+ assert env_name not in out
+
+
+def test_env_untrack_managed(tmp_path, capfd):
+ env_name = "test_untrack_managed"
+
+ # create an managed environment
+ env("create", env_name)
+
+ with pytest.raises(spack.main.SpackCommandError):
+ env("untrack", env_name)
+
+ # check that environment could not be untracked while active
+ out, _ = capfd.readouterr()
+ assert f"'{env_name}' is not a tracked env" in out
+
+
def test_add():
e = ev.create("test")
e.add("mpileaks")
@@ -95,6 +221,7 @@ def test_change_match_spec():
e = ev.read("test")
with e:
+
add("mpileaks@2.1")
add("mpileaks@2.2")
@@ -187,6 +314,127 @@ def test_env_remove(capfd):
assert "bar" not in out
+def test_env_rename_managed(capfd):
+ # Need real environment
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "foo", "bar")
+ assert (
+ "The specified name does not correspond to a managed spack environment"
+ in capfd.readouterr()[0]
+ )
+
+ env("create", "foo")
+
+ out = env("list")
+ assert "foo" in out
+
+ out = env("rename", "foo", "bar")
+ assert "Successfully renamed environment foo to bar" in out
+
+ out = env("list")
+ assert "foo" not in out
+ assert "bar" in out
+
+ bar = ev.read("bar")
+ with bar:
+ # Cannot rename active environment
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "bar", "baz")
+ assert "Cannot rename active environment" in capfd.readouterr()[0]
+
+ env("create", "qux")
+
+ # Cannot rename to an active environment (even with force flag)
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "-f", "qux", "bar")
+ assert "bar is an active environment" in capfd.readouterr()[0]
+
+ # Can rename inactive environment when another's active
+ out = env("rename", "qux", "quux")
+ assert "Successfully renamed environment qux to quux" in out
+
+ out = env("list")
+ assert "bar" in out
+ assert "baz" not in out
+
+ env("create", "baz")
+
+ # Cannot rename to existing environment without --force
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "bar", "baz")
+ errmsg = (
+ "The new name corresponds to an existing environment;"
+ " specify the --force flag to overwrite it."
+ )
+ assert errmsg in capfd.readouterr()[0]
+
+ env("rename", "-f", "bar", "baz")
+ out = env("list")
+ assert "bar" not in out
+ assert "baz" in out
+
+
+def test_env_rename_independent(capfd, tmpdir):
+ # Need real environment
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "-d", "./non-existing", "./also-non-existing")
+ assert (
+ "The specified path does not correspond to a valid spack environment"
+ in capfd.readouterr()[0]
+ )
+
+ anon_foo = str(tmpdir / "foo")
+ env("create", "-d", anon_foo)
+
+ anon_bar = str(tmpdir / "bar")
+ out = env("rename", "-d", anon_foo, anon_bar)
+ assert f"Successfully renamed environment {anon_foo} to {anon_bar}" in out
+ assert not ev.is_env_dir(anon_foo)
+ assert ev.is_env_dir(anon_bar)
+
+ # Cannot rename active environment
+ anon_baz = str(tmpdir / "baz")
+ env("activate", "--sh", "-d", anon_bar)
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "-d", anon_bar, anon_baz)
+ assert "Cannot rename active environment" in capfd.readouterr()[0]
+ env("deactivate", "--sh")
+
+ assert ev.is_env_dir(anon_bar)
+ assert not ev.is_env_dir(anon_baz)
+
+ # Cannot rename to existing environment without --force
+ env("create", "-d", anon_baz)
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "-d", anon_bar, anon_baz)
+ errmsg = (
+ "The new path corresponds to an existing environment;"
+ " specify the --force flag to overwrite it."
+ )
+ assert errmsg in capfd.readouterr()[0]
+ assert ev.is_env_dir(anon_bar)
+ assert ev.is_env_dir(anon_baz)
+
+ env("rename", "-f", "-d", anon_bar, anon_baz)
+ assert not ev.is_env_dir(anon_bar)
+ assert ev.is_env_dir(anon_baz)
+
+ # Cannot rename to existing (non-environment) path without --force
+ qux = tmpdir / "qux"
+ qux.mkdir()
+ anon_qux = str(qux)
+ assert not ev.is_env_dir(anon_qux)
+
+ with pytest.raises(spack.main.SpackCommandError):
+ env("rename", "-d", anon_baz, anon_qux)
+ errmsg = "The new path already exists; specify the --force flag to overwrite it."
+ assert errmsg in capfd.readouterr()[0]
+
+ env("rename", "-f", "-d", anon_baz, anon_qux)
+ assert not ev.is_env_dir(anon_baz)
+ assert ev.is_env_dir(anon_qux)
+
+
def test_concretize():
e = ev.create("test")
e.add("mpileaks")
@@ -247,6 +495,40 @@ def test_env_install_single_spec(install_mockery, mock_fetch):
assert e.specs_by_hash[e.concretized_order[0]].name == "cmake-client"
+@pytest.mark.parametrize("unify", [True, False, "when_possible"])
+def test_env_install_include_concrete_env(unify, install_mockery, mock_fetch, mutable_config):
+ test1, test2, combined = setup_combined_multiple_env()
+
+ combined.unify = unify
+ if not unify:
+ combined.manifest.set_default_view(False)
+
+ combined.add("mpileaks")
+ combined.concretize()
+ combined.write()
+
+ with combined:
+ install()
+
+ test1_roots = test1.concretized_order
+ test2_roots = test2.concretized_order
+ combined_included_roots = combined.included_concretized_order
+
+ for spec in combined.all_specs():
+ assert spec.installed
+
+ assert test1_roots == combined_included_roots[test1.path]
+ assert test2_roots == combined_included_roots[test2.path]
+
+ mpileaks = combined.specs_by_hash[combined.concretized_order[0]]
+ if unify:
+ assert mpileaks["mpi"].dag_hash() in test1_roots
+ assert mpileaks["libelf"].dag_hash() in test2_roots
+ else:
+ # check that unification is not by accident
+ assert mpileaks["mpi"].dag_hash() not in test1_roots
+
+
def test_env_roots_marked_explicit(install_mockery, mock_fetch):
install = SpackCommand("install")
install("dependent-install")
@@ -302,20 +584,6 @@ def test_activate_adds_transitive_run_deps_to_path(install_mockery, mock_fetch,
assert env_variables["DEPENDENCY_ENV_VAR"] == "1"
-def test_env_install_same_spec_twice(install_mockery, mock_fetch):
- env("create", "test")
-
- e = ev.read("test")
- with e:
- # The first installation outputs the package prefix, updates the view
- out = install("--add", "cmake-client")
- assert "Updating view at" in out
-
- # The second installation reports all packages already installed
- out = install("cmake-client")
- assert "already installed" in out
-
-
def test_env_definition_symlink(install_mockery, mock_fetch, tmpdir):
filepath = str(tmpdir.join("spack.yaml"))
filepath_mid = str(tmpdir.join("spack_mid.yaml"))
@@ -348,7 +616,7 @@ def test_env_install_two_specs_same_dep(install_mockery, mock_fetch, tmpdir, cap
"""\
spack:
specs:
- - a
+ - pkg-a
- depb
"""
)
@@ -367,8 +635,8 @@ spack:
depb = spack.store.STORE.db.query_one("depb", installed=True)
assert depb, "Expected depb to be installed"
- a = spack.store.STORE.db.query_one("a", installed=True)
- assert a, "Expected a to be installed"
+ a = spack.store.STORE.db.query_one("pkg-a", installed=True)
+ assert a, "Expected pkg-a to be installed"
def test_remove_after_concretize():
@@ -413,42 +681,111 @@ def test_remove_command():
with ev.read("test"):
add("mpileaks")
+
+ with ev.read("test"):
assert "mpileaks" in find()
assert "mpileaks@" not in find()
assert "mpileaks@" not in find("--show-concretized")
with ev.read("test"):
remove("mpileaks")
+
+ with ev.read("test"):
assert "mpileaks" not in find()
assert "mpileaks@" not in find()
assert "mpileaks@" not in find("--show-concretized")
with ev.read("test"):
add("mpileaks")
+
+ with ev.read("test"):
assert "mpileaks" in find()
assert "mpileaks@" not in find()
assert "mpileaks@" not in find("--show-concretized")
with ev.read("test"):
concretize()
+
+ with ev.read("test"):
assert "mpileaks" in find()
assert "mpileaks@" not in find()
assert "mpileaks@" in find("--show-concretized")
with ev.read("test"):
remove("mpileaks")
+
+ with ev.read("test"):
assert "mpileaks" not in find()
# removed but still in last concretized specs
assert "mpileaks@" in find("--show-concretized")
with ev.read("test"):
concretize()
+
+ with ev.read("test"):
assert "mpileaks" not in find()
assert "mpileaks@" not in find()
# now the lockfile is regenerated and it's gone.
assert "mpileaks@" not in find("--show-concretized")
+def test_remove_command_all():
+ # Need separate ev.read calls for each command to ensure we test round-trip to disk
+ env("create", "test")
+ test_pkgs = ("mpileaks", "zlib")
+
+ with ev.read("test"):
+ for name in test_pkgs:
+ add(name)
+
+ with ev.read("test"):
+ for name in test_pkgs:
+ assert name in find()
+ assert f"{name}@" not in find()
+
+ with ev.read("test"):
+ remove("-a")
+
+ with ev.read("test"):
+ for name in test_pkgs:
+ assert name not in find()
+
+
+def test_bad_remove_included_env():
+ env("create", "test")
+ test = ev.read("test")
+
+ with test:
+ add("mpileaks")
+
+ test.concretize()
+ test.write()
+
+ env("create", "--include-concrete", "test", "combined_env")
+
+ with pytest.raises(SpackCommandError):
+ env("remove", "test")
+
+
+def test_force_remove_included_env():
+ env("create", "test")
+ test = ev.read("test")
+
+ with test:
+ add("mpileaks")
+
+ test.concretize()
+ test.write()
+
+ env("create", "--include-concrete", "test", "combined_env")
+
+ rm_output = env("remove", "-f", "-y", "test")
+ list_output = env("list")
+
+ assert "'test' is used by environment 'combined_env'" in rm_output
+ assert "test" not in list_output
+
+
def test_environment_status(capsys, tmpdir):
with tmpdir.as_cwd():
with capsys.disabled():
@@ -573,6 +910,39 @@ spack:
assert not any(x.name == "hypre" for x in env_specs)
+def test_lockfile_spliced_specs(environment_from_manifest, install_mockery):
+ """Test that an environment can round-trip a spliced spec."""
+ # Create a local install for zmpi to splice in
+ # Default concretization is not using zmpi
+ zmpi = spack.spec.Spec("zmpi").concretized()
+ PackageInstaller([zmpi.package], fake=True).install()
+
+ e1 = environment_from_manifest(
+ f"""
+spack:
+ specs:
+ - mpileaks
+ concretizer:
+ splice:
+ explicit:
+ - target: mpi
+ replacement: zmpi/{zmpi.dag_hash()}
+"""
+ )
+ with e1:
+ e1.concretize()
+ e1.write()
+
+ # By reading into a second environment, we force a round trip to json
+ e2 = _env_create("test2", init_file=e1.lock_path)
+
+ # The one spec is mpileaks
+ for _, spec in e2.concretized_specs():
+ assert spec.spliced
+ assert spec["mpi"].satisfies(f"zmpi@{zmpi.version}")
+ assert spec["mpi"].build_spec.satisfies(zmpi)
+
+
def test_init_from_lockfile(environment_from_manifest):
"""Test that an environment can be instantiated from a lockfile."""
e1 = environment_from_manifest(
@@ -624,7 +994,6 @@ spack:
assert not e2.specs_by_hash
-@pytest.mark.usefixtures("config")
def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages):
fake_prefix = tmp_path / "a-prefix"
fake_bin = fake_prefix / "bin"
@@ -637,7 +1006,7 @@ def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages):
"""\
spack:
specs:
- - a
+ - pkg-a
view: true
"""
)
@@ -645,9 +1014,9 @@ spack:
external_config = io.StringIO(
"""\
packages:
- a:
+ pkg-a:
externals:
- - spec: a@2.0
+ - spec: pkg-a@2.0
prefix: {a_prefix}
buildable: false
""".format(
@@ -750,8 +1119,7 @@ spack:
"""
)
- e = ev.Environment(env_root)
- with e:
+ with ev.Environment(env_root) as e:
e.concretize()
# we've created an environment with some included config files (which do
@@ -761,7 +1129,7 @@ spack:
os.remove(abs_include_path)
os.remove(include1)
with pytest.raises(spack.config.ConfigFileError) as exc:
- ev.activate(e)
+ ev.activate(ev.Environment(env_root))
err = exc.value.message
assert "missing include" in err
@@ -869,6 +1237,113 @@ spack:
assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs())
+def test_config_change_existing(mutable_mock_env_path, tmp_path, mock_packages, mutable_config):
+ """Test ``config change`` with config in the ``spack.yaml`` as well as an
+ included file scope.
+ """
+
+ included_file = "included-packages.yaml"
+ included_path = tmp_path / included_file
+ with open(included_path, "w") as f:
+ f.write(
+ """\
+packages:
+ mpich:
+ require:
+ - spec: "@3.0.2"
+ libelf:
+ require: "@0.8.10"
+ bowtie:
+ require:
+ - one_of: ["@1.3.0", "@1.2.0"]
+"""
+ )
+
+ spack_yaml = tmp_path / ev.manifest_name
+ spack_yaml.write_text(
+ f"""\
+spack:
+ packages:
+ mpich:
+ require:
+ - spec: "+debug"
+ include:
+ - {os.path.join(".", included_file)}
+ specs: []
+"""
+ )
+
+ e = ev.Environment(tmp_path)
+ with e:
+ # List of requirements, flip a variant
+ config("change", "packages:mpich:require:~debug")
+ test_spec = spack.spec.Spec("mpich").concretized()
+ assert test_spec.satisfies("@3.0.2~debug")
+
+ # List of requirements, change the version (in a different scope)
+ config("change", "packages:mpich:require:@3.0.3")
+ test_spec = spack.spec.Spec("mpich").concretized()
+ assert test_spec.satisfies("@3.0.3")
+
+ # "require:" as a single string, also try specifying
+ # a spec string that requires enclosing in quotes as
+ # part of the config path
+ config("change", 'packages:libelf:require:"@0.8.12:"')
+ spack.spec.Spec("libelf@0.8.12").concretized()
+ # No need for assert, if there wasn't a failure, we
+ # changed the requirement successfully.
+
+ # Use change to add a requirement for a package that
+ # has no requirements defined
+ config("change", "packages:fftw:require:+mpi")
+ test_spec = spack.spec.Spec("fftw").concretized()
+ assert test_spec.satisfies("+mpi")
+ config("change", "packages:fftw:require:~mpi")
+ test_spec = spack.spec.Spec("fftw").concretized()
+ assert test_spec.satisfies("~mpi")
+ config("change", "packages:fftw:require:@1.0")
+ test_spec = spack.spec.Spec("fftw").concretized()
+ assert test_spec.satisfies("@1.0~mpi")
+
+ # Use "--match-spec" to change one spec in a "one_of"
+ # list
+ config("change", "packages:bowtie:require:@1.2.2", "--match-spec", "@1.2.0")
+ spack.spec.Spec("bowtie@1.3.0").concretize()
+ spack.spec.Spec("bowtie@1.2.2").concretized()
+
+
+def test_config_change_new(mutable_mock_env_path, tmp_path, mock_packages, mutable_config):
+ spack_yaml = tmp_path / ev.manifest_name
+ spack_yaml.write_text(
+ """\
+spack:
+ specs: []
+"""
+ )
+
+ with ev.Environment(tmp_path):
+ config("change", "packages:mpich:require:~debug")
+ with pytest.raises(spack.solver.asp.UnsatisfiableSpecError):
+ spack.spec.Spec("mpich+debug").concretized()
+ spack.spec.Spec("mpich~debug").concretized()
+
+ # Now check that we raise an error if we need to add a require: constraint
+ # when preexisting config manually specified it as a singular spec
+ spack_yaml.write_text(
+ """\
+spack:
+ specs: []
+ packages:
+ mpich:
+ require: "@3.0.3"
+"""
+ )
+ with ev.Environment(tmp_path):
+ assert spack.spec.Spec("mpich").concretized().satisfies("@3.0.3")
+ with pytest.raises(spack.error.ConfigError, match="not a list"):
+ config("change", "packages:mpich:require:~debug")
+
+
def test_env_with_included_config_file_url(tmpdir, mutable_empty_config, packages_file):
"""Test configuration inclusion of a file whose path is a URL before
the environment is concretized."""
@@ -879,8 +1354,6 @@ def test_env_with_included_config_file_url(tmpdir, mutable_empty_config, package
env = ev.Environment(tmpdir.strpath)
ev.activate(env)
- scopes = env.included_config_scopes()
- assert len(scopes) == 1
cfg = spack.config.get("packages")
assert cfg["mpileaks"]["version"] == ["2.2"]
@@ -895,7 +1368,7 @@ def test_env_with_included_config_missing_file(tmpdir, mutable_empty_config):
with spack_yaml.open("w") as f:
f.write("spack:\n include:\n - {0}\n".format(missing_file.strpath))
- with pytest.raises(spack.config.ConfigError, match="missing include path"):
+ with pytest.raises(spack.error.ConfigError, match="missing include path"):
ev.Environment(tmpdir.strpath)
@@ -1265,7 +1738,6 @@ def test_uninstall_removes_from_env(mock_stage, mock_fetch, install_mockery):
assert not test.user_specs
-@pytest.mark.usefixtures("config")
def test_indirect_build_dep(tmp_path):
"""Simple case of X->Y->Z where Y is a build/link dep and Z is a
build-only dep. Make sure this concrete DAG is preserved when writing the
@@ -1293,7 +1765,6 @@ def test_indirect_build_dep(tmp_path):
assert x_env_spec == x_concretized
-@pytest.mark.usefixtures("config")
def test_store_different_build_deps(tmp_path):
r"""Ensure that an environment can store two instances of a build-only
dependency::
@@ -1378,8 +1849,8 @@ def test_env_view_fails_dir_file(tmpdir, mock_packages, mock_stage, mock_fetch,
view_dir = tmpdir.join("view")
env("create", "--with-view=%s" % view_dir, "test")
with ev.read("test"):
- add("view-dir-file")
- add("view-dir-dir")
+ add("view-file")
+ add("view-dir")
with pytest.raises(
llnl.util.link_tree.MergeConflictSummary, match=os.path.join("bin", "x")
):
@@ -1393,8 +1864,8 @@ def test_env_view_succeeds_symlinked_dir_file(
view_dir = tmpdir.join("view")
env("create", "--with-view=%s" % view_dir, "test")
with ev.read("test"):
- add("view-dir-symlinked-dir")
- add("view-dir-dir")
+ add("view-symlinked-dir")
+ add("view-dir")
install()
x_dir = os.path.join(str(view_dir), "bin", "x")
assert os.path.exists(os.path.join(x_dir, "file_in_dir"))
@@ -1422,6 +1893,396 @@ def test_env_without_view_install(tmpdir, mock_stage, mock_fetch, install_mocker
check_mpileaks_and_deps_in_view(view_dir)
+@pytest.mark.parametrize("env_name", [True, False])
+def test_env_include_concrete_env_yaml(env_name):
+ env("create", "test")
+ test = ev.read("test")
+
+ with test:
+ add("mpileaks")
+ test.concretize()
+ test.write()
+
+ environ = "test" if env_name else test.path
+
+ env("create", "--include-concrete", environ, "combined_env")
+
+ combined = ev.read("combined_env")
+ combined_yaml = combined.manifest["spack"]
+
+ assert "include_concrete" in combined_yaml
+ assert test.path in combined_yaml["include_concrete"]
+
+
+@pytest.mark.regression("45766")
+@pytest.mark.parametrize("format", ["v1", "v2", "v3"])
+def test_env_include_concrete_old_env(format, tmpdir):
+ lockfile = os.path.join(spack.paths.test_path, "data", "legacy_env", f"{format}.lock")
+ # create an env from old .lock file -- this does not update the format
+ env("create", "old-env", lockfile)
+ env("create", "--include-concrete", "old-env", "test")
+
+ assert ev.read("old-env").all_specs() == ev.read("test").all_specs()
+
+
+def test_env_bad_include_concrete_env():
+ with pytest.raises(ev.SpackEnvironmentError):
+ env("create", "--include-concrete", "nonexistant_env", "combined_env")
+
+
+def test_env_not_concrete_include_concrete_env():
+ env("create", "test")
+ test = ev.read("test")
+
+ with test:
+ add("mpileaks")
+
+ with pytest.raises(ev.SpackEnvironmentError):
+ env("create", "--include-concrete", "test", "combined_env")
+
+
+def test_env_multiple_include_concrete_envs():
+ test1, test2, combined = setup_combined_multiple_env()
+
+ combined_yaml = combined.manifest["spack"]
+
+ assert test1.path in combined_yaml["include_concrete"][0]
+ assert test2.path in combined_yaml["include_concrete"][1]
+
+ # No local specs in the combined env
+ assert not combined_yaml["specs"]
+
+
+def test_env_include_concrete_envs_lockfile():
+ test1, test2, combined = setup_combined_multiple_env()
+
+ combined_yaml = combined.manifest["spack"]
+
+ assert "include_concrete" in combined_yaml
+ assert test1.path in combined_yaml["include_concrete"]
+
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert set(
+ entry["hash"] for entry in lockfile_as_dict["include_concrete"][test1.path]["roots"]
+ ) == set(test1.specs_by_hash)
+ assert set(
+ entry["hash"] for entry in lockfile_as_dict["include_concrete"][test2.path]["roots"]
+ ) == set(test2.specs_by_hash)
+
+
+def test_env_include_concrete_add_env():
+ test1, test2, combined = setup_combined_multiple_env()
+
+ # create new env & concretize
+ env("create", "new")
+ new_env = ev.read("new")
+ with new_env:
+ add("mpileaks")
+
+ new_env.concretize()
+ new_env.write()
+
+ # add new env to combined
+ combined.included_concrete_envs.append(new_env.path)
+
+ # assert thing haven't changed yet
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert new_env.path not in lockfile_as_dict["include_concrete"].keys()
+
+ # concretize combined env with new env
+ combined.concretize()
+ combined.write()
+
+ # assert changes
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert new_env.path in lockfile_as_dict["include_concrete"].keys()
+
+
+def test_env_include_concrete_remove_env():
+ test1, test2, combined = setup_combined_multiple_env()
+
+ # remove test2 from combined
+ combined.included_concrete_envs = [test1.path]
+
+ # assert test2 is still in combined's lockfile
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert test2.path in lockfile_as_dict["include_concrete"].keys()
+
+ # reconcretize combined
+ combined.concretize()
+ combined.write()
+
+ # assert test2 is not in combined's lockfile
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert test2.path not in lockfile_as_dict["include_concrete"].keys()
+
+
+def configure_reuse(reuse_mode, combined_env) -> Optional[ev.Environment]:
+ override_env = None
+ _config: Dict[Any, Any] = {}
+ if reuse_mode == "true":
+ _config = {"concretizer": {"reuse": True}}
+ elif reuse_mode == "from_environment":
+ _config = {"concretizer": {"reuse": {"from": [{"type": "environment"}]}}}
+ elif reuse_mode == "from_environment_test1":
+ _config = {"concretizer": {"reuse": {"from": [{"type": "environment", "path": "test1"}]}}}
+ elif reuse_mode == "from_environment_external_test":
+ # Create a new environment called external_test that enables the "debug"
+ # The default is "~debug"
+ env("create", "external_test")
+ override_env = ev.read("external_test")
+ with override_env:
+ add("mpich@1.0 +debug")
+ override_env.concretize()
+ override_env.write()
+
+ # Reuse from the environment that is not included.
+ # Specify the requirement for the debug variant. By default this would concretize to use
+ # mpich@3.0 but with include concrete the mpich@1.0 +debug version from the
+ # "external_test" environment will be used.
+ _config = {
+ "concretizer": {"reuse": {"from": [{"type": "environment", "path": "external_test"}]}},
+ "packages": {"mpich": {"require": ["+debug"]}},
+ }
+ elif reuse_mode == "from_environment_raise":
+ _config = {
+ "concretizer": {"reuse": {"from": [{"type": "environment", "path": "not-a-real-env"}]}}
+ }
+ # Disable unification in these tests to avoid confusing reuse due to unification using an
+ # include concrete spec vs reuse due to the reuse configuration
+ _config["concretizer"].update({"unify": False})
+
+ combined_env.manifest.configuration.update(_config)
+ combined_env.manifest.changed = True
+ combined_env.write()
+
+ return override_env
+
+
+@pytest.mark.parametrize(
+ "reuse_mode",
+ [
+ "true",
+ "from_environment",
+ "from_environment_test1",
+ "from_environment_external_test",
+ "from_environment_raise",
+ ],
+)
+def test_env_include_concrete_reuse(monkeypatch, reuse_mode):
+
+ # The mock packages do not use the gcc-runtime
+ def mock_has_runtime_dependencies(*args, **kwargs):
+ return True
+
+ monkeypatch.setattr(
+ spack.solver.asp, "_has_runtime_dependencies", mock_has_runtime_dependencies
+ )
+ # The default mpi version is 3.x provided by mpich in the mock repo.
+ # This test verifies that concretizing with an included concrete
+ # environment with "concretizer:reuse:true" the included
+ # concrete spec overrides the default with mpi@1.0.
+ test1, _, combined = setup_combined_multiple_env()
+
+ # Set the reuse mode for the environment
+ override_env = configure_reuse(reuse_mode, combined)
+ if override_env:
+ # If there is an override environment (ie. testing reuse with
+ # an external environment) update it here.
+ test1 = override_env
+
+ # Capture the test1 specs included by combined
+ test1_specs_by_hash = test1.specs_by_hash
+
+ try:
+ # Add mpileaks to the combined environment
+ with combined:
+ add("mpileaks")
+ combined.concretize()
+ comb_specs_by_hash = combined.specs_by_hash
+
+ # create reference env with mpileaks that does not use reuse
+ # This should concretize to the default version of mpich (3.0)
+ env("create", "new")
+ ref_env = ev.read("new")
+ with ref_env:
+ add("mpileaks")
+ ref_env.concretize()
+ ref_specs_by_hash = ref_env.specs_by_hash
+
+ # Ensure that the mpich used by the mpileaks is the mpich from the reused test environment
+ comb_mpileaks_spec = [s for s in comb_specs_by_hash.values() if s.name == "mpileaks"]
+ test1_mpich_spec = [s for s in test1_specs_by_hash.values() if s.name == "mpich"]
+ assert len(comb_mpileaks_spec) == 1
+ assert len(test1_mpich_spec) == 1
+ assert comb_mpileaks_spec[0]["mpich"].dag_hash() == test1_mpich_spec[0].dag_hash()
+
+ # None of the references specs (using mpich@3) reuse specs from test1.
+ # This tests that the reuse is not happening coincidently
+ assert not any([s in test1_specs_by_hash for s in ref_specs_by_hash])
+
+ # Make sure the raise tests raises
+ assert "raise" not in reuse_mode
+ except ev.SpackEnvironmentError:
+ assert "raise" in reuse_mode
+
+
+@pytest.mark.parametrize("unify", [True, False, "when_possible"])
+def test_env_include_concrete_env_reconcretized(unify):
+ """Double check to make sure that concrete_specs for the local specs is empty
+ after recocnretizing.
+ """
+ _, _, combined = setup_combined_multiple_env()
+
+ combined.unify = unify
+
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert not lockfile_as_dict["roots"]
+ assert not lockfile_as_dict["concrete_specs"]
+
+ combined.concretize()
+ combined.write()
+
+ with open(combined.lock_path) as f:
+ lockfile_as_dict = combined._read_lockfile(f)
+
+ assert not lockfile_as_dict["roots"]
+ assert not lockfile_as_dict["concrete_specs"]
+
+
+def test_concretize_include_concrete_env():
+ test1, _, combined = setup_combined_multiple_env()
+
+ with test1:
+ add("mpileaks")
+ test1.concretize()
+ test1.write()
+
+ assert Spec("mpileaks") in test1.concretized_user_specs
+ assert Spec("mpileaks") not in combined.included_concretized_user_specs[test1.path]
+
+ combined.concretize()
+ combined.write()
+
+ assert Spec("mpileaks") in combined.included_concretized_user_specs[test1.path]
+
+
+def test_concretize_nested_include_concrete_envs():
+ env("create", "test1")
+ test1 = ev.read("test1")
+ with test1:
+ add("zlib")
+ test1.concretize()
+ test1.write()
+
+ env("create", "--include-concrete", "test1", "test2")
+ test2 = ev.read("test2")
+ with test2:
+ add("libelf")
+ test2.concretize()
+ test2.write()
+
+ env("create", "--include-concrete", "test2", "test3")
+ test3 = ev.read("test3")
+
+ with open(test3.lock_path) as f:
+ lockfile_as_dict = test3._read_lockfile(f)
+
+ assert test2.path in lockfile_as_dict["include_concrete"]
+ assert test1.path in lockfile_as_dict["include_concrete"][test2.path]["include_concrete"]
+
+ assert Spec("zlib") in test3.included_concretized_user_specs[test1.path]
+
+
+def test_concretize_nested_included_concrete():
+ """Confirm that nested included environments use specs concretized at
+ environment creation time and change with reconcretization."""
+ env("create", "test1")
+ test1 = ev.read("test1")
+ with test1:
+ add("zlib")
+ test1.concretize()
+ test1.write()
+
+ # test2 should include test1 with zlib
+ env("create", "--include-concrete", "test1", "test2")
+ test2 = ev.read("test2")
+ with test2:
+ add("libelf")
+ test2.concretize()
+ test2.write()
+
+ assert Spec("zlib") in test2.included_concretized_user_specs[test1.path]
+
+ # Modify/re-concretize test1 to replace zlib with mpileaks
+ with test1:
+ remove("zlib")
+ add("mpileaks")
+ test1.concretize()
+ test1.write()
+
+ # test3 should include the latest concretization of test1
+ env("create", "--include-concrete", "test1", "test3")
+ test3 = ev.read("test3")
+ with test3:
+ add("callpath")
+ test3.concretize()
+ test3.write()
+
+ included_specs = test3.included_concretized_user_specs[test1.path]
+ assert len(included_specs) == 1
+ assert Spec("mpileaks") in included_specs
+
+ # The last concretization of test4's included environments should have test2
+ # with the original concretized test1 spec and test3 with the re-concretized
+ # test1 spec.
+ env("create", "--include-concrete", "test2", "--include-concrete", "test3", "test4")
+ test4 = ev.read("test4")
+
+ def included_included_spec(path1, path2):
+ included_path1 = test4.included_concrete_spec_data[path1]
+ included_path2 = included_path1["include_concrete"][path2]
+ return included_path2["roots"][0]["spec"]
+
+ included_test2_test1 = included_included_spec(test2.path, test1.path)
+ assert "zlib" in included_test2_test1
+
+ included_test3_test1 = included_included_spec(test3.path, test1.path)
+ assert "mpileaks" in included_test3_test1
+
+ # test4's concretized specs should reflect the original concretization.
+ concrete_specs = [s for s, _ in test4.concretized_specs()]
+ expected = [Spec(s) for s in ["libelf", "zlib", "mpileaks", "callpath"]]
+ assert all(s in concrete_specs for s in expected)
+
+ # Re-concretize test2 to reflect the new concretization of included test1
+ # to remove zlib and write it out so it can be picked up by test4.
+ # Re-concretize test4 to reflect the re-concretization of included test2
+ # and ensure that its included specs are up-to-date
+ test2.concretize()
+ test2.write()
+ test4.concretize()
+
+ concrete_specs = [s for s, _ in test4.concretized_specs()]
+ assert Spec("zlib") not in concrete_specs
+
+ # Expecting mpileaks to appear only once
+ expected = [Spec(s) for s in ["libelf", "mpileaks", "callpath"]]
+ assert len(concrete_specs) == 3 and all(s in concrete_specs for s in expected)
+
+
def test_env_config_view_default(
environment_from_manifest, mock_stage, mock_fetch, install_mockery
):
@@ -1765,105 +2626,6 @@ spack:
assert mpileaks_spec not in after_conc
-def test_stack_concretize_extraneous_deps(tmpdir, config, mock_packages):
- # FIXME: The new concretizer doesn't handle yet soft
- # FIXME: constraints for stacks
- # FIXME: This now works for statically-determinable invalid deps
- # FIXME: But it still does not work for dynamically determined invalid deps
- # if spack.config.get('config:concretizer') == 'clingo':
- # pytest.skip('Clingo concretizer does not support soft constraints')
-
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- definitions:
- - packages: [libelf, mpileaks]
- - install:
- - matrix:
- - [$packages]
- - ['^zmpi', '^mpich']
- specs:
- - $install
-"""
- )
- with tmpdir.as_cwd():
- env("create", "test", "./spack.yaml")
- with ev.read("test"):
- concretize()
-
- test = ev.read("test")
-
- for user, concrete in test.concretized_specs():
- assert concrete.concrete
- assert not user.concrete
- if user.name == "libelf":
- assert not concrete.satisfies("^mpi")
- elif user.name == "mpileaks":
- assert concrete.satisfies("^mpi")
-
-
-def test_stack_concretize_extraneous_variants(tmpdir, config, mock_packages):
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- definitions:
- - packages: [libelf, mpileaks]
- - install:
- - matrix:
- - [$packages]
- - ['~shared', '+shared']
- specs:
- - $install
-"""
- )
- with tmpdir.as_cwd():
- env("create", "test", "./spack.yaml")
- with ev.read("test"):
- concretize()
-
- test = ev.read("test")
-
- for user, concrete in test.concretized_specs():
- assert concrete.concrete
- assert not user.concrete
- if user.name == "libelf":
- assert "shared" not in concrete.variants
- if user.name == "mpileaks":
- assert concrete.variants["shared"].value == user.variants["shared"].value
-
-
-def test_stack_concretize_extraneous_variants_with_dash(tmpdir, config, mock_packages):
- filename = str(tmpdir.join("spack.yaml"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
- definitions:
- - packages: [libelf, mpileaks]
- - install:
- - matrix:
- - [$packages]
- - ['shared=False', '+shared-libs']
- specs:
- - $install
-"""
- )
- with tmpdir.as_cwd():
- env("create", "test", "./spack.yaml")
- with ev.read("test"):
- concretize()
-
- ev.read("test")
-
- # Regression test for handling of variants with dashes in them
- # will fail before this point if code regresses
- assert True
-
-
def test_stack_definition_extension(tmpdir):
filename = str(tmpdir.join("spack.yaml"))
with open(filename, "w") as f:
@@ -2444,58 +3206,88 @@ spack:
assert viewdir not in shell
+@pytest.mark.parametrize("include_views", [True, False, "split"])
def test_stack_view_multiple_views(
- tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery
+ tmp_path,
+ mock_fetch,
+ mock_packages,
+ mock_archive,
+ install_mockery,
+ mutable_config,
+ include_views,
):
- filename = str(tmpdir.join("spack.yaml"))
- default_viewdir = str(tmpdir.join("default-view"))
- combin_viewdir = str(tmpdir.join("combinatorial-view"))
- with open(filename, "w") as f:
- f.write(
- """\
-spack:
+ """Test multiple views as both included views (True), as both environment
+ views (False), or as one included and the other in the environment."""
+ # Write the view configuration and or manifest file
+ view_filename = tmp_path / "view.yaml"
+ base_content = """\
definitions:
- packages: [mpileaks, cmake]
- - compilers: ['%%gcc', '%%clang']
+ - compilers: ['%gcc', '%clang']
specs:
- matrix:
- [$packages]
- [$compilers]
+"""
- view:
- default:
- root: %s
- select: ['%%gcc']
- combinatorial:
- root: %s
- exclude: [callpath %%gcc]
- projections:
- 'all': '{name}/{version}-{compiler.name}'"""
- % (default_viewdir, combin_viewdir)
- )
- with tmpdir.as_cwd():
- env("create", "test", "./spack.yaml")
- with ev.read("test"):
- install()
+ include_content = f" include:\n - {view_filename}\n"
+ view_line = " view:\n"
- shell = env("activate", "--sh", "test")
- assert "PATH" in shell
- assert os.path.join(default_viewdir, "bin") in shell
+ comb_dir = tmp_path / "combinatorial-view"
+ comb_view = """\
+{0}combinatorial:
+{0} root: {1}
+{0} exclude: [callpath%gcc]
+{0} projections:
+"""
- test = ev.read("test")
- for spec in test._get_environment_specs():
+ projection = " 'all': '{name}/{version}-{compiler.name}'"
+
+ default_dir = tmp_path / "default-view"
+ default_view = """\
+{0}default:
+{0} root: {1}
+{0} select: ['%gcc']
+"""
+
+ content = "spack:\n"
+ indent = " "
+ if include_views is True:
+ # Include both the gcc and combinatorial views
+ view = "view:\n" + default_view.format(indent, str(default_dir))
+ view += comb_view.format(indent, str(comb_dir)) + indent + projection
+ view_filename.write_text(view)
+ content += include_content + base_content
+ elif include_views == "split":
+ # Include the gcc view and inline the combinatorial view
+ view = "view:\n" + default_view.format(indent, str(default_dir))
+ view_filename.write_text(view)
+ content += include_content + base_content + view_line
+ indent += " "
+ content += comb_view.format(indent, str(comb_dir)) + indent + projection
+ else:
+ # Inline both the gcc and combinatorial views in the environment.
+ indent += " "
+ content += base_content + view_line
+ content += default_view.format(indent, str(default_dir))
+ content += comb_view.format(indent, str(comb_dir)) + indent + projection
+
+ filename = tmp_path / ev.manifest_name
+ filename.write_text(content)
+
+ env("create", "test", str(filename))
+ with ev.read("test"):
+ install()
+
+ with ev.read("test") as e:
+ assert os.path.exists(str(default_dir / "bin"))
+ for spec in e._get_environment_specs():
+ spec_subdir = f"{spec.version}-{spec.compiler.name}"
+ comb_spec_dir = str(comb_dir / spec.name / spec_subdir)
if not spec.satisfies("callpath%gcc"):
- assert os.path.exists(
- os.path.join(
- combin_viewdir, spec.name, "%s-%s" % (spec.version, spec.compiler.name)
- )
- )
+ assert os.path.exists(comb_spec_dir)
else:
- assert not os.path.exists(
- os.path.join(
- combin_viewdir, spec.name, "%s-%s" % (spec.version, spec.compiler.name)
- )
- )
+ assert not os.path.exists(comb_spec_dir)
def test_env_activate_sh_prints_shell_output(tmpdir, mock_stage, mock_fetch, install_mockery):
@@ -2588,9 +3380,7 @@ def test_concretize_user_specs_together():
e.remove("mpich")
e.add("mpich2")
- exc_cls = spack.error.SpackError
- if spack.config.get("config:concretizer") == "clingo":
- exc_cls = spack.error.UnsatisfiableSpecError
+ exc_cls = spack.error.UnsatisfiableSpecError
# Concretizing without invalidating the concrete spec for mpileaks fails
with pytest.raises(exc_cls):
@@ -2608,15 +3398,6 @@ def test_concretize_user_specs_together():
assert all("mpich" not in spec for _, spec in e.concretized_specs())
-def test_cant_install_single_spec_when_concretizing_together():
- e = ev.create("coconcretization")
- e.unify = True
-
- with pytest.raises(ev.SpackEnvironmentError, match=r"cannot install"):
- e.concretize_and_add("zlib")
- e.install_all()
-
-
def test_duplicate_packages_raise_when_concretizing_together():
e = ev.create("coconcretization")
e.unify = True
@@ -2625,10 +3406,8 @@ def test_duplicate_packages_raise_when_concretizing_together():
e.add("mpileaks~opt")
e.add("mpich")
- exc_cls, match = spack.error.SpackError, None
- if spack.config.get("config:concretizer") == "clingo":
- exc_cls = spack.error.UnsatisfiableSpecError
- match = r"You could consider setting `concretizer:unify`"
+ exc_cls = spack.error.UnsatisfiableSpecError
+ match = r"You could consider setting `concretizer:unify`"
with pytest.raises(exc_cls, match=match):
e.concretize()
@@ -2877,51 +3656,86 @@ spack:
assert spec.prefix not in contents
-def test_multiple_modules_post_env_hook(environment_from_manifest, install_mockery, mock_fetch):
+def test_modules_exist_after_env_install(
+ environment_from_manifest, install_mockery, mock_fetch, monkeypatch
+):
+ # Some caching issue
+ monkeypatch.setattr(spack.modules.tcl, "configuration_registry", {})
environment_from_manifest(
"""
spack:
specs:
- - trivial-install-test-package
+ - mpileaks
modules:
default:
enable:: [tcl]
use_view: true
roots:
- tcl: modules
+ tcl: uses_view
full:
enable:: [tcl]
roots:
- tcl: full_modules
+ tcl: without_view
"""
)
with ev.read("test") as e:
install()
+ specs = e.all_specs()
- spec = e.specs_by_hash[e.concretized_order[0]]
- view_prefix = e.default_view.get_projection_for_spec(spec)
- modules_glob = "%s/modules/**/*/*" % e.path
- modules = glob.glob(modules_glob)
- assert len(modules) == 1
- module = modules[0]
+ for module_set in ("uses_view", "without_view"):
+ modules = glob.glob(f"{e.path}/{module_set}/**/*/*")
+ assert len(modules) == len(specs), "Not all modules were generated"
+ for spec in specs:
+ module = next((m for m in modules if os.path.dirname(m).endswith(spec.name)), None)
+ assert module, f"Module for {spec} not found"
- full_modules_glob = "%s/full_modules/**/*/*" % e.path
- full_modules = glob.glob(full_modules_glob)
- assert len(full_modules) == 1
- full_module = full_modules[0]
+ # Now verify that modules have paths pointing into the view instead of the package
+ # prefix if and only if they set use_view to true.
+ with open(module, "r") as f:
+ contents = f.read()
- with open(module, "r") as f:
- contents = f.read()
+ if module_set == "uses_view":
+ assert e.default_view.get_projection_for_spec(spec) in contents
+ assert spec.prefix not in contents
+ else:
+ assert e.default_view.get_projection_for_spec(spec) not in contents
+ assert spec.prefix in contents
- with open(full_module, "r") as f:
- full_contents = f.read()
- assert view_prefix in contents
- assert spec.prefix not in contents
+@pytest.mark.disable_clean_stage_check
+def test_install_develop_keep_stage(
+ environment_from_manifest, install_mockery, mock_fetch, monkeypatch, tmpdir
+):
+ """Develop a dependency of a package and make sure that the associated
+ stage for the package is retained after a successful install.
+ """
+ environment_from_manifest(
+ """
+spack:
+ specs:
+ - mpileaks
+"""
+ )
- assert view_prefix not in full_contents
- assert spec.prefix in full_contents
+ monkeypatch.setattr(spack.stage.DevelopStage, "destroy", _always_fail)
+
+ with ev.read("test") as e:
+ libelf_dev_path = tmpdir.ensure("libelf-test-dev-path", dir=True)
+ develop(f"--path={libelf_dev_path}", "libelf@0.8.13")
+ concretize()
+ (libelf_spec,) = e.all_matching_specs("libelf")
+ (mpileaks_spec,) = e.all_matching_specs("mpileaks")
+ assert not os.path.exists(libelf_spec.package.stage.path)
+ assert not os.path.exists(mpileaks_spec.package.stage.path)
+ install()
+ assert os.path.exists(libelf_spec.package.stage.path)
+ assert not os.path.exists(mpileaks_spec.package.stage.path)
+
+
+# Helper method for test_install_develop_keep_stage
+def _always_fail(cls, *args, **kwargs):
+ raise Exception("Restage or destruction of dev stage detected during install")
@pytest.mark.regression("24148")
@@ -2956,7 +3770,9 @@ def test_query_develop_specs(tmpdir):
)
def test_activation_and_deactiviation_ambiguities(method, env, no_env, env_dir, capsys):
"""spack [-e x | -E | -D x/] env [activate | deactivate] y are ambiguous"""
- args = Namespace(shell="sh", activate_env="a", env=env, no_env=no_env, env_dir=env_dir)
+ args = Namespace(
+ shell="sh", env_name="a", env=env, no_env=no_env, env_dir=env_dir, keep_relative=False
+ )
with pytest.raises(SystemExit):
method(args)
_, err = capsys.readouterr()
@@ -2997,6 +3813,34 @@ def test_activate_temp(monkeypatch, tmpdir):
assert ev.is_env_dir(str(tmpdir))
+@pytest.mark.parametrize(
+ "conflict_arg", [["--dir"], ["--keep-relative"], ["--with-view", "foo"], ["env"]]
+)
+def test_activate_parser_conflicts_with_temp(conflict_arg):
+ with pytest.raises(SpackCommandError):
+ env("activate", "--sh", "--temp", *conflict_arg)
+
+
+def test_create_and_activate_managed(tmp_path):
+ with fs.working_dir(str(tmp_path)):
+ shell = env("activate", "--without-view", "--create", "--sh", "foo")
+ active_env_var = next(line for line in shell.splitlines() if ev.spack_env_var in line)
+ assert str(tmp_path) in active_env_var
+ active_ev = ev.active_environment()
+ assert "foo" == active_ev.name
+ env("deactivate")
+
+
+def test_create_and_activate_independent(tmp_path):
+ with fs.working_dir(str(tmp_path)):
+ env_dir = os.path.join(str(tmp_path), "foo")
+ shell = env("activate", "--without-view", "--create", "--sh", env_dir)
+ active_env_var = next(line for line in shell.splitlines() if ev.spack_env_var in line)
+ assert str(env_dir) in active_env_var
+ assert ev.is_env_dir(env_dir)
+ env("deactivate")
+
+
def test_activate_default(monkeypatch):
"""Tests whether `spack env activate` creates / activates the default
environment"""
@@ -3101,7 +3945,7 @@ def test_environment_query_spec_by_hash(mock_stage, mock_fetch, install_mockery)
@pytest.mark.parametrize("lockfile", ["v1", "v2", "v3"])
-def test_read_old_lock_and_write_new(config, tmpdir, lockfile):
+def test_read_old_lock_and_write_new(tmpdir, lockfile):
# v1 lockfiles stored by a coarse DAG hash that did not include build deps.
# They could not represent multiple build deps with different build hashes.
#
@@ -3167,7 +4011,7 @@ def test_read_old_lock_and_write_new(config, tmpdir, lockfile):
assert old_hashes == hashes
-def test_read_v1_lock_creates_backup(config, tmp_path):
+def test_read_v1_lock_creates_backup(tmp_path):
"""When reading a version-1 lockfile, make sure that a backup of that file
is created.
"""
@@ -3325,7 +4169,7 @@ def test_environment_depfile_makefile(depfile_flags, expected_installs, tmpdir,
)
# Do make dry run.
- out = make("-n", "-f", makefile, output=str)
+ out = make("-n", "-f", makefile, "SPACK=spack", output=str)
specs_that_make_would_install = _parse_dry_run_package_installs(out)
@@ -3363,7 +4207,7 @@ def test_depfile_works_with_gitversions(tmpdir, mock_packages, monkeypatch):
env("depfile", "-o", makefile, "--make-disable-jobserver", "--make-prefix=prefix")
# Do a dry run on the generated depfile
- out = make("-n", "-f", makefile, output=str)
+ out = make("-n", "-f", makefile, "SPACK=spack", output=str)
# Check that all specs are there (without duplicates)
specs_that_make_would_install = _parse_dry_run_package_installs(out)
@@ -3425,7 +4269,12 @@ def test_depfile_phony_convenience_targets(
# Phony install/* target should install picked package and all its deps
specs_that_make_would_install = _parse_dry_run_package_installs(
- make("-n", picked_spec.format("install/{name}-{version}-{hash}"), output=str)
+ make(
+ "-n",
+ picked_spec.format("install/{name}-{version}-{hash}"),
+ "SPACK=spack",
+ output=str,
+ )
)
assert set(specs_that_make_would_install) == set(expected_installs)
@@ -3433,7 +4282,12 @@ def test_depfile_phony_convenience_targets(
# Phony install-deps/* target shouldn't install picked package
specs_that_make_would_install = _parse_dry_run_package_installs(
- make("-n", picked_spec.format("install-deps/{name}-{version}-{hash}"), output=str)
+ make(
+ "-n",
+ picked_spec.format("install-deps/{name}-{version}-{hash}"),
+ "SPACK=spack",
+ output=str,
+ )
)
assert set(specs_that_make_would_install) == set(expected_installs) - {picked_package}
@@ -3479,13 +4333,13 @@ def test_spack_package_ids_variable(tmpdir, mock_packages):
# Include in Makefile and create target that depend on SPACK_PACKAGE_IDS
with open(makefile_path, "w") as f:
f.write(
- r"""
+ """
all: post-install
include include.mk
example/post-install/%: example/install/%
- $(info post-install: $(HASH)) # noqa: W191,E101
+\t$(info post-install: $(HASH)) # noqa: W191,E101
post-install: $(addprefix example/post-install/,$(example/SPACK_PACKAGE_IDS))
"""
@@ -3493,7 +4347,7 @@ post-install: $(addprefix example/post-install/,$(example/SPACK_PACKAGE_IDS))
make = Executable("make")
# Do dry run.
- out = make("-n", "-C", str(tmpdir), output=str)
+ out = make("-n", "-C", str(tmpdir), "SPACK=spack", output=str)
# post-install: <hash> should've been executed
with ev.read("test") as test:
@@ -3545,14 +4399,12 @@ def test_env_include_packages_url(
with spack.config.override("config:url_fetch_method", "curl"):
env = ev.Environment(tmpdir.strpath)
ev.activate(env)
- scopes = env.included_config_scopes()
- assert len(scopes) == 1
cfg = spack.config.get("packages")
assert "openmpi" in cfg["all"]["providers"]["mpi"]
-def test_relative_view_path_on_command_line_is_made_absolute(tmp_path, config):
+def test_relative_view_path_on_command_line_is_made_absolute(tmp_path):
with fs.working_dir(str(tmp_path)):
env("create", "--with-view", "view", "--dir", "env")
environment = ev.Environment(os.path.join(".", "env"))
@@ -3593,3 +4445,188 @@ def test_environment_created_from_lockfile_has_view(mock_packages, temporary_sto
# Make sure the view was created
with ev.Environment(env_b) as e:
assert os.path.isdir(e.view_path_default)
+
+
+def test_env_view_disabled(tmp_path, mutable_mock_env_path):
+ """Ensure an inlined view being disabled means not even the default view
+ is created (since the case doesn't appear to be covered in this module)."""
+ spack_yaml = tmp_path / ev.manifest_name
+ spack_yaml.write_text(
+ """\
+spack:
+ specs:
+ - mpileaks
+ view: false
+"""
+ )
+ env("create", "disabled", str(spack_yaml))
+ with ev.read("disabled") as e:
+ e.concretize()
+
+ assert len(e.views) == 0
+ assert not os.path.exists(e.view_path_default)
+
+
+@pytest.mark.parametrize("first", ["false", "true", "custom"])
+def test_env_include_mixed_views(tmp_path, mutable_mock_env_path, mutable_config, first):
+ """Ensure including path and boolean views in different combinations result
+ in the creation of only the first view if it is not disabled."""
+ false_yaml = tmp_path / "false-view.yaml"
+ false_yaml.write_text("view: false\n")
+
+ true_yaml = tmp_path / "true-view.yaml"
+ true_yaml.write_text("view: true\n")
+
+ custom_name = "my-test-view"
+ custom_view = tmp_path / custom_name
+ custom_yaml = tmp_path / "custom-view.yaml"
+ custom_yaml.write_text(
+ f"""
+view:
+ {custom_name}:
+ root: {custom_view}
+"""
+ )
+
+ if first == "false":
+ order = [false_yaml, true_yaml, custom_yaml]
+ elif first == "true":
+ order = [true_yaml, custom_yaml, false_yaml]
+ else:
+ order = [custom_yaml, false_yaml, true_yaml]
+ includes = [f" - {yaml}\n" for yaml in order]
+
+ spack_yaml = tmp_path / ev.manifest_name
+ spack_yaml.write_text(
+ f"""\
+spack:
+ include:
+{''.join(includes)}
+ specs:
+ - mpileaks
+"""
+ )
+
+ env("create", "test", str(spack_yaml))
+ with ev.read("test") as e:
+ concretize()
+
+ # Only the first included view should be created if view not disabled by it
+ assert len(e.views) == 0 if first == "false" else 1
+ if first == "true":
+ assert os.path.exists(e.view_path_default)
+ else:
+ assert not os.path.exists(e.view_path_default)
+
+ if first == "custom":
+ assert os.path.exists(custom_view)
+ else:
+ assert not os.path.exists(custom_view)
+
+
+def test_stack_view_multiple_views_same_name(
+ tmp_path, mock_fetch, mock_packages, mock_archive, install_mockery, mutable_config
+):
+ """Test multiple views with the same name combine settings with precedence
+ given to the options in spack.yaml."""
+ # Write the view configuration and or manifest file
+
+ view_filename = tmp_path / "view.yaml"
+ default_dir = tmp_path / "default-view"
+ default_view = f"""\
+view:
+ default:
+ root: {default_dir}
+ select: ['%gcc']
+ projections:
+ all: '{{name}}/{{version}}-{{compiler.name}}'
+"""
+ view_filename.write_text(default_view)
+
+ view_dir = tmp_path / "view"
+ content = f"""\
+spack:
+ include:
+ - {view_filename}
+ definitions:
+ - packages: [mpileaks, cmake]
+ - compilers: ['%gcc', '%clang']
+ specs:
+ - matrix:
+ - [$packages]
+ - [$compilers]
+
+ view:
+ default:
+ root: {view_dir}
+ exclude: ['cmake']
+ projections:
+ all: '{{name}}/{{compiler.name}}-{{version}}'
+"""
+
+ filename = tmp_path / ev.manifest_name
+ filename.write_text(content)
+
+ env("create", "test", str(filename))
+ with ev.read("test"):
+ install()
+
+ with ev.read("test") as e:
+ # the view root in the included view should NOT exist
+ assert not os.path.exists(str(default_dir))
+
+ for spec in e._get_environment_specs():
+ # no specs will exist in the included view projection
+ included_spec_subdir = f"{spec.version}-{spec.compiler.name}"
+ included_spec_dir = str(view_dir / spec.name / included_spec_subdir)
+ assert not os.path.exists(included_spec_dir)
+
+ # only specs compiled with %gcc (selected in the included view) that
+ # are also not cmake (excluded in the environment view) should exist
+ env_spec_subdir = f"{spec.compiler.name}-{spec.version}"
+ env_spec_dir = str(view_dir / spec.name / env_spec_subdir)
+ if spec.satisfies("cmake") or spec.satisfies("%clang"):
+ assert not os.path.exists(env_spec_dir)
+ else:
+ assert os.path.exists(env_spec_dir)
+
+
+def test_env_view_resolves_identical_file_conflicts(tmp_path, install_mockery, mock_fetch):
+ """When files clash in a view, but refer to the same file on disk (for example, the dependent
+ symlinks to a file in the dependency at the same relative path), Spack links the first regular
+ file instead of symlinks. This is important for copy type views where we need the underlying
+ file to be copied instead of the symlink (when a symlink would be copied, it would become a
+ self-referencing symlink after relocation). The test uses a symlink type view though, since
+ that keeps track of the original file path."""
+ with ev.create("env", with_view=tmp_path / "view") as e:
+ add("view-resolve-conflict-top")
+ install()
+ top = e.matching_spec("view-resolve-conflict-top").prefix
+ bottom = e.matching_spec("view-file").prefix
+
+ # In this example we have `./bin/x` in 3 prefixes, two links, one regular file. We expect the
+ # regular file to be linked into the view. There are also 2 links at `./bin/y`, but no regular
+ # file, so we expect standard behavior: first entry is linked into the view.
+
+ # view-resolve-conflict-top/bin/
+ # x -> view-file/bin/x
+ # y -> view-resolve-conflict-middle/bin/y # expect this y to be linked
+ # view-resolve-conflict-middle/bin/
+ # x -> view-file/bin/x
+ # y -> view-file/bin/x
+ # view-file/bin/
+ # x # expect this x to be linked
+
+ assert readlink(tmp_path / "view" / "bin" / "x") == bottom.bin.x
+ assert readlink(tmp_path / "view" / "bin" / "y") == top.bin.y
+
+
+def test_env_view_ignores_different_file_conflicts(tmp_path, install_mockery, mock_fetch):
+ """Test that file-file conflicts for two unique files in environment views are ignored, and
+ that the dependent's file is linked into the view, not the dependency's file."""
+ with ev.create("env", with_view=tmp_path / "view") as e:
+ add("view-ignore-conflict")
+ install()
+ prefix_dependent = e.matching_spec("view-ignore-conflict").prefix
+ # The dependent's file is linked into the view
+ assert readlink(tmp_path / "view" / "bin" / "x") == prefix_dependent.bin.x
diff --git a/lib/spack/spack/test/cmd/extensions.py b/lib/spack/spack/test/cmd/extensions.py
index 1f6ed95b56..082628cc34 100644
--- a/lib/spack/spack/test/cmd/extensions.py
+++ b/lib/spack/spack/test/cmd/extensions.py
@@ -6,6 +6,7 @@
import pytest
+from spack.installer import PackageInstaller
from spack.main import SpackCommand, SpackCommandError
from spack.spec import Spec
@@ -15,16 +16,13 @@ extensions = SpackCommand("extensions")
@pytest.fixture
def python_database(mock_packages, mutable_database):
specs = [Spec(s).concretized() for s in ["python", "py-extension1", "py-extension2"]]
-
- for spec in specs:
- spec.package.do_install(fake=True, explicit=True)
-
+ PackageInstaller([s.package for s in specs], explicit=True, fake=True).install()
yield
@pytest.mark.not_on_windows("All Fetchers Failed")
@pytest.mark.db
-def test_extensions(mock_packages, python_database, config, capsys):
+def test_extensions(mock_packages, python_database, capsys):
ext2 = Spec("py-extension2").concretized()
def check_output(ni):
@@ -33,21 +31,23 @@ def test_extensions(mock_packages, python_database, config, capsys):
packages = extensions("-s", "packages", "python")
installed = extensions("-s", "installed", "python")
assert "==> python@2.7.11" in output
- assert "==> 2 extensions" in output
+ assert "==> 3 extensions" in output
assert "py-extension1" in output
assert "py-extension2" in output
+ assert "python-venv" in output
- assert "==> 2 extensions" in packages
+ assert "==> 3 extensions" in packages
assert "py-extension1" in packages
assert "py-extension2" in packages
+ assert "python-venv" in packages
assert "installed" not in packages
- assert ("%s installed" % (ni if ni else "None")) in output
- assert ("%s installed" % (ni if ni else "None")) in installed
+ assert f"{ni if ni else 'None'} installed" in output
+ assert f"{ni if ni else 'None'} installed" in installed
- check_output(2)
+ check_output(3)
ext2.package.do_uninstall(force=True)
- check_output(1)
+ check_output(2)
def test_extensions_no_arguments(mock_packages):
diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py
index 362b2360a5..684520bea2 100644
--- a/lib/spack/spack/test/cmd/external.py
+++ b/lib/spack/spack/test/cmd/external.py
@@ -11,8 +11,12 @@ import pytest
from llnl.util.filesystem import getuid, touch
import spack
+import spack.cmd.external
+import spack.config
+import spack.cray_manifest
import spack.detection
import spack.detection.path
+import spack.repo
from spack.main import SpackCommand
from spack.spec import Spec
@@ -42,7 +46,7 @@ def test_find_external_single_package(mock_executable):
assert len(specs_by_package) == 1 and "cmake" in specs_by_package
detected_spec = specs_by_package["cmake"]
- assert len(detected_spec) == 1 and detected_spec[0].spec == Spec("cmake@1.foo")
+ assert len(detected_spec) == 1 and detected_spec[0] == Spec("cmake@1.foo")
def test_find_external_two_instances_same_package(mock_executable):
@@ -54,13 +58,15 @@ def test_find_external_two_instances_same_package(mock_executable):
search_paths = [str(cmake1.parent.parent), str(cmake2.parent.parent)]
finder = spack.detection.path.ExecutablesFinder()
- detected_specs = finder.find(pkg_name="cmake", initial_guess=search_paths)
+ detected_specs = finder.find(
+ pkg_name="cmake", initial_guess=search_paths, repository=spack.repo.PATH
+ )
assert len(detected_specs) == 2
- spec_to_path = {e.spec: e.prefix for e in detected_specs}
+ spec_to_path = {s: s.external_path for s in detected_specs}
assert spec_to_path[Spec("cmake@1.foo")] == (
spack.detection.executable_prefix(str(cmake1.parent))
- )
+ ), spec_to_path
assert spec_to_path[Spec("cmake@3.17.2")] == (
spack.detection.executable_prefix(str(cmake2.parent))
)
@@ -68,8 +74,8 @@ def test_find_external_two_instances_same_package(mock_executable):
def test_find_external_update_config(mutable_config):
entries = [
- spack.detection.DetectedPackage(Spec.from_detection("cmake@1.foo"), "/x/y1/"),
- spack.detection.DetectedPackage(Spec.from_detection("cmake@3.17.2"), "/x/y2/"),
+ Spec.from_detection("cmake@1.foo", external_path="/x/y1"),
+ Spec.from_detection("cmake@3.17.2", external_path="/x/y2"),
]
pkg_to_entries = {"cmake": entries}
@@ -80,8 +86,8 @@ def test_find_external_update_config(mutable_config):
cmake_cfg = pkgs_cfg["cmake"]
cmake_externals = cmake_cfg["externals"]
- assert {"spec": "cmake@1.foo", "prefix": "/x/y1/"} in cmake_externals
- assert {"spec": "cmake@3.17.2", "prefix": "/x/y2/"} in cmake_externals
+ assert {"spec": "cmake@1.foo", "prefix": "/x/y1"} in cmake_externals
+ assert {"spec": "cmake@3.17.2", "prefix": "/x/y2"} in cmake_externals
def test_get_executables(working_env, mock_executable):
@@ -94,6 +100,9 @@ def test_get_executables(working_env, mock_executable):
external = SpackCommand("external")
+# TODO: this test should be made to work, but in the meantime it is
+# causing intermittent (spurious) CI failures on all PRs
+@pytest.mark.not_on_windows("Test fails intermittently on Windows")
def test_find_external_cmd_not_buildable(mutable_config, working_env, mock_executable):
"""When the user invokes 'spack external find --not-buildable', the config
for any package where Spack finds an external version should be marked as
@@ -110,11 +119,31 @@ def test_find_external_cmd_not_buildable(mutable_config, working_env, mock_execu
@pytest.mark.parametrize(
"names,tags,exclude,expected",
[
- # find --all
- (None, ["detectable"], [], ["builtin.mock.find-externals1"]),
+ # find -all
+ (
+ None,
+ ["detectable"],
+ [],
+ [
+ "builtin.mock.find-externals1",
+ "builtin.mock.gcc",
+ "builtin.mock.llvm",
+ "builtin.mock.intel-oneapi-compilers",
+ ],
+ ),
# find --all --exclude find-externals1
- (None, ["detectable"], ["builtin.mock.find-externals1"], []),
- (None, ["detectable"], ["find-externals1"], []),
+ (
+ None,
+ ["detectable"],
+ ["builtin.mock.find-externals1"],
+ ["builtin.mock.gcc", "builtin.mock.llvm", "builtin.mock.intel-oneapi-compilers"],
+ ),
+ (
+ None,
+ ["detectable"],
+ ["find-externals1"],
+ ["builtin.mock.gcc", "builtin.mock.llvm", "builtin.mock.intel-oneapi-compilers"],
+ ),
# find cmake (and cmake is not detectable)
(["cmake"], ["detectable"], [], []),
],
@@ -194,21 +223,19 @@ def test_find_external_manifest_failure(mutable_config, mutable_mock_repo, tmpdi
assert "Skipping manifest and continuing" in output
-def test_find_external_merge(mutable_config, mutable_mock_repo):
- """Check that 'spack find external' doesn't overwrite an existing spec
- entry in packages.yaml.
- """
+def test_find_external_merge(mutable_config, mutable_mock_repo, tmp_path):
+ """Checks that 'spack find external' doesn't overwrite an existing spec in packages.yaml."""
pkgs_cfg_init = {
"find-externals1": {
- "externals": [{"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix/"}],
+ "externals": [{"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix"}],
"buildable": False,
}
}
mutable_config.update_config("packages", pkgs_cfg_init)
entries = [
- spack.detection.DetectedPackage(Spec.from_detection("find-externals1@1.1"), "/x/y1/"),
- spack.detection.DetectedPackage(Spec.from_detection("find-externals1@1.2"), "/x/y2/"),
+ Spec.from_detection("find-externals1@1.1", external_path="/x/y1"),
+ Spec.from_detection("find-externals1@1.2", external_path="/x/y2"),
]
pkg_to_entries = {"find-externals1": entries}
scope = spack.config.default_modify_scope("packages")
@@ -218,8 +245,8 @@ def test_find_external_merge(mutable_config, mutable_mock_repo):
pkg_cfg = pkgs_cfg["find-externals1"]
pkg_externals = pkg_cfg["externals"]
- assert {"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix/"} in pkg_externals
- assert {"spec": "find-externals1@1.2", "prefix": "/x/y2/"} in pkg_externals
+ assert {"spec": "find-externals1@1.1", "prefix": "/preexisting-prefix"} in pkg_externals
+ assert {"spec": "find-externals1@1.2", "prefix": "/x/y2"} in pkg_externals
def test_list_detectable_packages(mutable_config, mutable_mock_repo):
@@ -239,15 +266,18 @@ def test_overriding_prefix(mock_executable, mutable_config, monkeypatch):
monkeypatch.setattr(gcc_cls, "determine_variants", _determine_variants)
finder = spack.detection.path.ExecutablesFinder()
- detected_specs = finder.find(pkg_name="gcc", initial_guess=[str(search_dir)])
+ detected_specs = finder.find(
+ pkg_name="gcc", initial_guess=[str(search_dir)], repository=spack.repo.PATH
+ )
assert len(detected_specs) == 1
- gcc = detected_specs[0].spec
+ gcc = detected_specs[0]
assert gcc.name == "gcc"
assert gcc.external_path == os.path.sep + os.path.join("opt", "gcc", "bin")
+@pytest.mark.not_on_windows("Fails spuriously on Windows")
def test_new_entries_are_reported_correctly(mock_executable, mutable_config, monkeypatch):
# Prepare an environment to detect a fake gcc
gcc_exe = mock_executable("gcc", output="echo 4.2.1")
@@ -307,3 +337,29 @@ def test_failures_in_scanning_do_not_result_in_an_error(
assert "cmake" in output
assert "3.23.3" in output
assert "3.19.1" not in output
+
+
+def test_detect_virtuals(mock_executable, mutable_config, monkeypatch):
+ """Test whether external find --not-buildable sets virtuals as non-buildable (unless user
+ config sets them to buildable)"""
+ mpich = mock_executable("mpichversion", output="echo MPICH Version: 4.0.2")
+ prefix = os.path.dirname(mpich)
+ external("find", "--path", prefix, "--not-buildable", "mpich")
+
+ # Check that mpich was correctly detected
+ mpich = mutable_config.get("packages:mpich")
+ assert mpich["buildable"] is False
+ assert Spec(mpich["externals"][0]["spec"]).satisfies("mpich@4.0.2")
+
+ # Check that the virtual package mpi was marked as non-buildable
+ assert mutable_config.get("packages:mpi:buildable") is False
+
+ # Delete the mpich entry, and set mpi explicitly to buildable
+ mutable_config.set("packages:mpich", {})
+ mutable_config.set("packages:mpi:buildable", True)
+
+ # Run the detection again
+ external("find", "--path", prefix, "--not-buildable", "mpich")
+
+ # Check that the mpi:buildable entry was not overwritten
+ assert mutable_config.get("packages:mpi:buildable") is True
diff --git a/lib/spack/spack/test/cmd/fetch.py b/lib/spack/spack/test/cmd/fetch.py
index cf05f4299d..d2ba0f8280 100644
--- a/lib/spack/spack/test/cmd/fetch.py
+++ b/lib/spack/spack/test/cmd/fetch.py
@@ -9,7 +9,9 @@ import spack.environment as ev
from spack.main import SpackCommand, SpackCommandError
# everything here uses the mock_env_path
-pytestmark = pytest.mark.usefixtures("mutable_mock_env_path", "config", "mutable_mock_repo")
+pytestmark = pytest.mark.usefixtures(
+ "mutable_mock_env_path", "mutable_config", "mutable_mock_repo"
+)
@pytest.mark.disable_clean_stage_check
diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py
index 5d551e6df9..656ddac442 100644
--- a/lib/spack/spack/test/cmd/find.py
+++ b/lib/spack/spack/test/cmd/find.py
@@ -14,9 +14,14 @@ import pytest
import spack.cmd as cmd
import spack.cmd.find
import spack.environment as ev
+import spack.repo
+import spack.store
import spack.user_environment as uenv
+from spack.enums import InstallRecordStatus
from spack.main import SpackCommand
from spack.spec import Spec
+from spack.test.conftest import create_test_repo
+from spack.test.utilities import SpackCommandArgs
from spack.util.pattern import Bunch
find = SpackCommand("find")
@@ -64,17 +69,19 @@ def test_query_arguments():
implicit=False,
start_date="2018-02-23",
end_date=None,
+ install_tree="all",
)
q_args = query_arguments(args)
assert "installed" in q_args
- assert "known" in q_args
+ assert "predicate_fn" in q_args
assert "explicit" in q_args
- assert q_args["installed"] == ["installed"]
- assert q_args["known"] is any
- assert q_args["explicit"] is any
+ assert q_args["installed"] == InstallRecordStatus.INSTALLED
+ assert q_args["predicate_fn"] is None
+ assert q_args["explicit"] is None
assert "start_date" in q_args
assert "end_date" not in q_args
+ assert q_args["install_tree"] == "all"
# Check that explicit works correctly
args.explicit = True
@@ -332,10 +339,9 @@ def test_find_command_basic_usage(database):
assert "mpileaks" in output
-@pytest.mark.not_on_windows("envirnment is not yet supported on windows")
@pytest.mark.regression("9875")
def test_find_prefix_in_env(
- mutable_mock_env_path, install_mockery, mock_fetch, mock_packages, mock_archive, config
+ mutable_mock_env_path, install_mockery, mock_fetch, mock_packages, mock_archive
):
"""Test `find` formats requiring concrete specs work in environments."""
env("create", "test")
@@ -347,11 +353,90 @@ def test_find_prefix_in_env(
# Would throw error on regression
+def test_find_specs_include_concrete_env(mutable_mock_env_path, mutable_mock_repo, tmpdir):
+ path = tmpdir.join("spack.yaml")
+
+ with tmpdir.as_cwd():
+ with open(str(path), "w") as f:
+ f.write(
+ """\
+spack:
+ specs:
+ - mpileaks
+"""
+ )
+ env("create", "test1", "spack.yaml")
+
+ test1 = ev.read("test1")
+ test1.concretize()
+ test1.write()
+
+ with tmpdir.as_cwd():
+ with open(str(path), "w") as f:
+ f.write(
+ """\
+spack:
+ specs:
+ - libelf
+"""
+ )
+ env("create", "test2", "spack.yaml")
+
+ test2 = ev.read("test2")
+ test2.concretize()
+ test2.write()
+
+ env("create", "--include-concrete", "test1", "--include-concrete", "test2", "combined_env")
+
+ with ev.read("combined_env"):
+ output = find()
+
+ assert "No root specs" in output
+ assert "Included specs" in output
+ assert "mpileaks" in output
+ assert "libelf" in output
+
+
+def test_find_specs_nested_include_concrete_env(mutable_mock_env_path, mutable_mock_repo, tmpdir):
+ path = tmpdir.join("spack.yaml")
+
+ with tmpdir.as_cwd():
+ with open(str(path), "w") as f:
+ f.write(
+ """\
+spack:
+ specs:
+ - mpileaks
+"""
+ )
+ env("create", "test1", "spack.yaml")
+
+ test1 = ev.read("test1")
+ test1.concretize()
+ test1.write()
+
+ env("create", "--include-concrete", "test1", "test2")
+ test2 = ev.read("test2")
+ test2.add("libelf")
+ test2.concretize()
+ test2.write()
+
+ env("create", "--include-concrete", "test2", "test3")
+
+ with ev.read("test3"):
+ output = find()
+
+ assert "No root specs" in output
+ assert "Included specs" in output
+ assert "mpileaks" in output
+ assert "libelf" in output
+
+
def test_find_loaded(database, working_env):
output = find("--loaded", "--group")
assert output == ""
- os.environ[uenv.spack_loaded_hashes_var] = ":".join(
+ os.environ[uenv.spack_loaded_hashes_var] = os.pathsep.join(
[x.dag_hash() for x in spack.store.STORE.db.query()]
)
output = find("--loaded")
@@ -372,3 +457,150 @@ def test_environment_with_version_range_in_compiler_doesnt_fail(tmp_path):
with test_environment:
output = find()
assert "zlib%gcc@12.1.0" in output
+
+
+_pkga = (
+ "a0",
+ """\
+from spack.package import *
+
+class A0(Package):
+ version("1.2")
+ version("1.1")
+
+ depends_on("b0")
+ depends_on("c0")
+""",
+)
+
+
+_pkgb = (
+ "b0",
+ """\
+from spack.package import *
+
+class B0(Package):
+ version("1.2")
+ version("1.1")
+""",
+)
+
+
+_pkgc = (
+ "c0",
+ """\
+from spack.package import *
+
+class C0(Package):
+ version("1.2")
+ version("1.1")
+
+ tags = ["tag0", "tag1"]
+""",
+)
+
+
+_pkgd = (
+ "d0",
+ """\
+from spack.package import *
+
+class D0(Package):
+ version("1.2")
+ version("1.1")
+
+ depends_on("c0")
+ depends_on("e0")
+""",
+)
+
+
+_pkge = (
+ "e0",
+ """\
+from spack.package import *
+
+class E0(Package):
+ tags = ["tag1", "tag2"]
+
+ version("1.2")
+ version("1.1")
+""",
+)
+
+
+@pytest.fixture
+def _create_test_repo(tmpdir, mutable_config):
+ r"""
+ a0 d0
+ / \ / \
+ b0 c0 e0
+ """
+ yield create_test_repo(tmpdir, [_pkga, _pkgb, _pkgc, _pkgd, _pkge])
+
+
+@pytest.fixture
+def test_repo(_create_test_repo, monkeypatch, mock_stage):
+ with spack.repo.use_repositories(_create_test_repo) as mock_repo_path:
+ yield mock_repo_path
+
+
+def test_find_concretized_not_installed(
+ mutable_mock_env_path, install_mockery, mock_fetch, test_repo, mock_archive
+):
+ """Test queries against installs of specs against fake repo.
+
+ Given A, B, C, D, E, create an environment and install A.
+ Add and concretize (but do not install) D.
+ Test a few queries after force uninstalling a dependency of A (but not
+ A itself).
+ """
+ add = SpackCommand("add")
+ concretize = SpackCommand("concretize")
+ uninstall = SpackCommand("uninstall")
+
+ def _query(_e, *args):
+ return spack.cmd.find._find_query(SpackCommandArgs("find")(*args), _e)
+
+ def _nresults(_qresult):
+ return len(_qresult[0]), len(_qresult[1])
+
+ env("create", "test")
+ with ev.read("test") as e:
+ install("--fake", "--add", "a0")
+
+ assert _nresults(_query(e)) == (3, 0)
+ assert _nresults(_query(e, "--explicit")) == (1, 0)
+
+ add("d0")
+ concretize("--reuse")
+
+ # At this point d0 should use existing c0, but d/e
+ # are not installed in the env
+
+ # --explicit, --deprecated, --start-date, etc. are all
+ # filters on records, and therefore don't apply to
+ # concretized-but-not-installed results
+ assert _nresults(_query(e, "--explicit")) == (1, 2)
+
+ assert _nresults(_query(e)) == (3, 2)
+ assert _nresults(_query(e, "-c", "d0")) == (0, 1)
+
+ uninstall("-f", "-y", "b0")
+
+ # b0 is now missing (it is not installed, but has an
+ # installed parent)
+
+ assert _nresults(_query(e)) == (2, 3)
+ # b0 is "double-counted" here: it meets the --missing
+ # criteria, and also now qualifies as a
+ # concretized-but-not-installed spec
+ assert _nresults(_query(e, "--missing")) == (3, 3)
+ assert _nresults(_query(e, "--only-missing")) == (1, 3)
+
+ # Tags are not attached to install records, so they
+ # can modify the concretized-but-not-installed results
+
+ assert _nresults(_query(e, "--tag=tag0")) == (1, 0)
+ assert _nresults(_query(e, "--tag=tag1")) == (1, 1)
+ assert _nresults(_query(e, "--tag=tag2")) == (0, 1)
diff --git a/lib/spack/spack/test/cmd/gc.py b/lib/spack/spack/test/cmd/gc.py
index b9d39567f4..d997be59b2 100644
--- a/lib/spack/spack/test/cmd/gc.py
+++ b/lib/spack/spack/test/cmd/gc.py
@@ -6,44 +6,56 @@
import pytest
+import spack.deptypes as dt
import spack.environment as ev
import spack.main
import spack.spec
+import spack.traverse
+from spack.installer import PackageInstaller
gc = spack.main.SpackCommand("gc")
add = spack.main.SpackCommand("add")
install = spack.main.SpackCommand("install")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
@pytest.mark.db
-def test_gc_without_build_dependency(config, mutable_database):
- output = gc("-yb")
- assert "There are no unused specs." in output
-
- output = gc("-y")
- assert "There are no unused specs." in output
+def test_gc_without_build_dependency(mutable_database):
+ assert "There are no unused specs." in gc("-yb")
+ assert "There are no unused specs." in gc("-y")
@pytest.mark.db
-def test_gc_with_build_dependency(config, mutable_database):
+def test_gc_with_build_dependency(mutable_database):
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], explicit=True, fake=True).install()
+
+ assert "There are no unused specs." in gc("-yb")
+ assert "Successfully uninstalled cmake" in gc("-y")
+ assert "There are no unused specs." in gc("-y")
+
+
+@pytest.mark.db
+def test_gc_with_constraints(mutable_database):
+ s_cmake1 = spack.spec.Spec("simple-inheritance ^cmake@3.4.3").concretized()
+ s_cmake2 = spack.spec.Spec("simple-inheritance ^cmake@3.23.1").concretized()
+ PackageInstaller([s_cmake1.package], explicit=True, fake=True).install()
+ PackageInstaller([s_cmake2.package], explicit=True, fake=True).install()
+
+ assert "There are no unused specs." in gc("python")
- output = gc("-yb")
- assert "There are no unused specs." in output
+ assert "Successfully uninstalled cmake@3.4.3" in gc("-y", "cmake@3.4.3")
+ assert "There are no unused specs." in gc("-y", "cmake@3.4.3")
- output = gc("-y")
- assert "Successfully uninstalled cmake" in output
+ assert "Successfully uninstalled cmake" in gc("-y", "cmake@3.23.1")
+ assert "There are no unused specs." in gc("-y", "cmake")
@pytest.mark.db
-def test_gc_with_environment(config, mutable_database, mutable_mock_env_path):
+def test_gc_with_environment(mutable_database, mutable_mock_env_path):
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], explicit=True, fake=True).install()
e = ev.create("test_gc")
with e:
@@ -56,10 +68,10 @@ def test_gc_with_environment(config, mutable_database, mutable_mock_env_path):
@pytest.mark.db
-def test_gc_with_build_dependency_in_environment(config, mutable_database, mutable_mock_env_path):
+def test_gc_with_build_dependency_in_environment(mutable_database, mutable_mock_env_path):
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], explicit=True, fake=True).install()
e = ev.create("test_gc")
with e:
@@ -72,41 +84,46 @@ def test_gc_with_build_dependency_in_environment(config, mutable_database, mutab
with e:
assert mutable_database.query_local("simple-inheritance")
- output = gc("-y")
- assert "Restricting garbage collection" in output
- assert "Successfully uninstalled cmake" in output
+ fst = gc("-y")
+ assert "Restricting garbage collection" in fst
+ assert "Successfully uninstalled cmake" in fst
+ snd = gc("-y")
+ assert "Restricting garbage collection" in snd
+ assert "There are no unused specs" in snd
@pytest.mark.db
-def test_gc_except_any_environments(config, mutable_database, mutable_mock_env_path):
- s = spack.spec.Spec("simple-inheritance")
- s.concretize()
- s.package.do_install(fake=True, explicit=True)
-
+def test_gc_except_any_environments(mutable_database, mutable_mock_env_path):
+ """Tests whether the garbage collector can remove all specs except those still needed in some
+ environment (needed in the sense of roots + link/run deps)."""
assert mutable_database.query_local("zmpi")
e = ev.create("test_gc")
- with e:
- add("simple-inheritance")
- install()
- assert mutable_database.query_local("simple-inheritance")
+ e.add("simple-inheritance")
+ e.concretize()
+ e.install_all(fake=True)
+ e.write()
+
+ assert mutable_database.query_local("simple-inheritance")
+ assert not e.all_matching_specs(spack.spec.Spec("zmpi"))
output = gc("-yE")
assert "Restricting garbage collection" not in output
assert "Successfully uninstalled zmpi" in output
assert not mutable_database.query_local("zmpi")
- with e:
- output = gc("-yE")
- assert "Restricting garbage collection" not in output
- assert "There are no unused specs" not in output
+ # All runtime specs in this env should still be installed.
+ assert all(
+ s.installed
+ for s in spack.traverse.traverse_nodes(e.concrete_roots(), deptype=dt.LINK | dt.RUN)
+ )
@pytest.mark.db
-def test_gc_except_specific_environments(config, mutable_database, mutable_mock_env_path):
+def test_gc_except_specific_environments(mutable_database, mutable_mock_env_path):
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], explicit=True, fake=True).install()
assert mutable_database.query_local("zmpi")
@@ -123,17 +140,17 @@ def test_gc_except_specific_environments(config, mutable_database, mutable_mock_
@pytest.mark.db
-def test_gc_except_nonexisting_dir_env(config, mutable_database, mutable_mock_env_path, tmpdir):
+def test_gc_except_nonexisting_dir_env(mutable_database, mutable_mock_env_path, tmpdir):
output = gc("-ye", tmpdir.strpath, fail_on_error=False)
assert "No such environment" in output
gc.returncode == 1
@pytest.mark.db
-def test_gc_except_specific_dir_env(config, mutable_database, mutable_mock_env_path, tmpdir):
+def test_gc_except_specific_dir_env(mutable_database, mutable_mock_env_path, tmpdir):
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], explicit=True, fake=True).install()
assert mutable_database.query_local("zmpi")
diff --git a/lib/spack/spack/test/cmd/gpg.py b/lib/spack/spack/test/cmd/gpg.py
index d342897db7..b720b7d9e6 100644
--- a/lib/spack/spack/test/cmd/gpg.py
+++ b/lib/spack/spack/test/cmd/gpg.py
@@ -9,7 +9,6 @@ import pytest
import llnl.util.filesystem as fs
-import spack.bootstrap
import spack.util.executable
import spack.util.gpg
from spack.main import SpackCommand
diff --git a/lib/spack/spack/test/cmd/help.py b/lib/spack/spack/test/cmd/help.py
index 688675be68..91303dbb6e 100644
--- a/lib/spack/spack/test/cmd/help.py
+++ b/lib/spack/spack/test/cmd/help.py
@@ -2,29 +2,13 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import pytest
-
from spack.main import SpackCommand
-@pytest.mark.xfail
def test_reuse_after_help():
"""Test `spack help` can be called twice with the same SpackCommand."""
help_cmd = SpackCommand("help", subprocess=True)
help_cmd()
-
- # This second invocation will somehow fail because the parser no
- # longer works after add_all_commands() is called in
- # SpackArgumentParser.format_help_sections().
- #
- # TODO: figure out why this doesn't work properly and change this
- # test to use a single SpackCommand.
- #
- # It seems that parse_known_args() finds "too few arguments" the
- # second time through b/c add_all_commands() ends up leaving extra
- # positionals in the parser. But this used to work before we loaded
- # commands lazily.
help_cmd()
diff --git a/lib/spack/spack/test/cmd/info.py b/lib/spack/spack/test/cmd/info.py
index e3d7b383a5..a0ea57b03e 100644
--- a/lib/spack/spack/test/cmd/info.py
+++ b/lib/spack/spack/test/cmd/info.py
@@ -57,9 +57,9 @@ def test_info_noversion(mock_packages, print_buffer):
@pytest.mark.parametrize(
- "pkg_query,expected", [("zlib", "False"), ("gcc", "True (version, variants)")]
+ "pkg_query,expected", [("zlib", "False"), ("find-externals1", "True (version)")]
)
-def test_is_externally_detectable(pkg_query, expected, parser, print_buffer):
+def test_is_externally_detectable(mock_packages, pkg_query, expected, parser, print_buffer):
args = parser.parse_args(["--detectable", pkg_query])
spack.cmd.info.info(parser, args)
diff --git a/lib/spack/spack/test/cmd/init_py_functions.py b/lib/spack/spack/test/cmd/init_py_functions.py
index 4dc000edb9..d7245c6ecc 100644
--- a/lib/spack/spack/test/cmd/init_py_functions.py
+++ b/lib/spack/spack/test/cmd/init_py_functions.py
@@ -4,10 +4,17 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import pytest
+import spack.config
+import spack.environment as ev
+import spack.error
+import spack.solver.asp as asp
+import spack.store
from spack.cmd import (
CommandNameError,
PythonNameError,
cmd_name,
+ matching_specs_from_env,
+ parse_specs,
python_name,
require_cmd_name,
require_python_name,
@@ -34,3 +41,99 @@ def test_require_cmd_name():
with pytest.raises(CommandNameError):
require_cmd_name("okey_dokey")
require_cmd_name(cmd_name("okey_dokey"))
+
+
+@pytest.mark.parametrize(
+ "unify,spec_strs,error",
+ [
+ # single spec
+ (True, ["zmpi"], None),
+ (False, ["mpileaks"], None),
+ # multiple specs, some from hash some from file
+ (True, ["zmpi", "mpileaks^zmpi", "libelf"], None),
+ (True, ["mpileaks^zmpi", "mpileaks^mpich", "libelf"], spack.error.SpecError),
+ (False, ["mpileaks^zmpi", "mpileaks^mpich", "libelf"], None),
+ ],
+)
+def test_special_cases_concretization_parse_specs(
+ unify, spec_strs, error, monkeypatch, mutable_config, mutable_database, tmpdir
+):
+ """Test that special cases in parse_specs(concretize=True) bypass solver"""
+
+ # monkeypatch to ensure we do not call the actual concretizer
+ def _fail(*args, **kwargs):
+ assert False
+
+ monkeypatch.setattr(asp.SpackSolverSetup, "setup", _fail)
+
+ spack.config.set("concretizer:unify", unify)
+
+ args = [f"/{spack.store.STORE.db.query(s)[0].dag_hash()}" for s in spec_strs]
+ if len(args) > 1:
+ # We convert the last one to a specfile input
+ filename = tmpdir.join("spec.json")
+ spec = parse_specs(args[-1], concretize=True)[0]
+ with open(filename, "w") as f:
+ spec.to_json(f)
+ args[-1] = str(filename)
+
+ if error:
+ with pytest.raises(error):
+ parse_specs(args, concretize=True)
+ else:
+ # assertion error from monkeypatch above if test fails
+ parse_specs(args, concretize=True)
+
+
+@pytest.mark.parametrize(
+ "unify,spec_strs,error",
+ [
+ # single spec
+ (True, ["zmpi"], None),
+ (False, ["mpileaks"], None),
+ # multiple specs, some from hash some from file
+ (True, ["zmpi", "mpileaks^zmpi", "libelf"], None),
+ (True, ["mpileaks^zmpi", "mpileaks^mpich", "libelf"], spack.error.SpecError),
+ (False, ["mpileaks^zmpi", "mpileaks^mpich", "libelf"], None),
+ ],
+)
+def test_special_cases_concretization_matching_specs_from_env(
+ unify,
+ spec_strs,
+ error,
+ monkeypatch,
+ mutable_config,
+ mutable_database,
+ tmpdir,
+ mutable_mock_env_path,
+):
+ """Test that special cases in parse_specs(concretize=True) bypass solver"""
+
+ # monkeypatch to ensure we do not call the actual concretizer
+ def _fail(*args, **kwargs):
+ assert False
+
+ monkeypatch.setattr(asp.SpackSolverSetup, "setup", _fail)
+
+ spack.config.set("concretizer:unify", unify)
+
+ ev.create("test")
+ env = ev.read("test")
+
+ args = [f"/{spack.store.STORE.db.query(s)[0].dag_hash()}" for s in spec_strs]
+ if len(args) > 1:
+ # We convert the last one to a specfile input
+ filename = tmpdir.join("spec.json")
+ spec = parse_specs(args[-1], concretize=True)[0]
+ with open(filename, "w") as f:
+ spec.to_json(f)
+ args[-1] = str(filename)
+
+ with env:
+ specs = parse_specs(args, concretize=False)
+ if error:
+ with pytest.raises(error):
+ matching_specs_from_env(specs)
+ else:
+ # assertion error from monkeypatch above if test fails
+ matching_specs_from_env(specs)
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index e304e1a627..445f376b1b 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -5,6 +5,7 @@
import argparse
import builtins
import filecmp
+import gzip
import itertools
import os
import pathlib
@@ -16,19 +17,20 @@ import pytest
import llnl.util.filesystem as fs
import llnl.util.tty as tty
+import spack.build_environment
import spack.cmd.common.arguments
import spack.cmd.install
-import spack.compilers as compilers
import spack.config
import spack.environment as ev
+import spack.error
import spack.hash_types as ht
+import spack.installer
import spack.package_base
import spack.store
-import spack.util.executable
-from spack.error import SpackError
+from spack.error import SpackError, SpecSyntaxError
+from spack.installer import PackageInstaller
from spack.main import SpackCommand
-from spack.parser import SpecSyntaxError
-from spack.spec import CompilerSpec, Spec
+from spack.spec import Spec
install = SpackCommand("install")
env = SpackCommand("env")
@@ -48,7 +50,7 @@ def noop_install(monkeypatch):
def test_install_package_and_dependency(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery
):
log = "test"
with tmpdir.as_cwd():
@@ -88,11 +90,11 @@ def test_install_runtests_all(monkeypatch, mock_packages, install_mockery):
assert pkg.run_tests
monkeypatch.setattr(spack.package_base.PackageBase, "unit_test_check", check)
- install("--test=all", "a")
+ install("--test=all", "pkg-a")
def test_install_package_already_installed(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery
):
with tmpdir.as_cwd():
install("libdwarf")
@@ -135,10 +137,9 @@ def test_package_output(tmpdir, capsys, install_mockery, mock_fetch):
# when nested AND in pytest
spec = Spec("printing-package").concretized()
pkg = spec.package
- pkg.do_install(verbose=True)
+ PackageInstaller([pkg], explicit=True, verbose=True).install()
- log_file = pkg.build_log_path
- with open(log_file) as f:
+ with gzip.open(pkg.install_log_path, "rt") as f:
out = f.read()
# make sure that output from the actual package file appears in the
@@ -149,7 +150,7 @@ def test_package_output(tmpdir, capsys, install_mockery, mock_fetch):
@pytest.mark.disable_clean_stage_check
def test_install_output_on_build_error(
- mock_packages, mock_archive, mock_fetch, config, install_mockery, capfd
+ mock_packages, mock_archive, mock_fetch, install_mockery, capfd
):
"""
This test used to assume receiving full output, but since we've updated
@@ -163,9 +164,7 @@ def test_install_output_on_build_error(
@pytest.mark.disable_clean_stage_check
-def test_install_output_on_python_error(
- mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_install_output_on_python_error(mock_packages, mock_archive, mock_fetch, install_mockery):
out = install("failing-build", fail_on_error=False)
assert isinstance(install.error, spack.build_environment.ChildError)
assert install.error.name == "InstallError"
@@ -173,7 +172,7 @@ def test_install_output_on_python_error(
@pytest.mark.disable_clean_stage_check
-def test_install_with_source(mock_packages, mock_archive, mock_fetch, config, install_mockery):
+def test_install_with_source(mock_packages, mock_archive, mock_fetch, install_mockery):
"""Verify that source has been copied into place."""
install("--source", "--keep-stage", "trivial-install-test-package")
spec = Spec("trivial-install-test-package").concretized()
@@ -183,7 +182,7 @@ def test_install_with_source(mock_packages, mock_archive, mock_fetch, config, in
)
-def test_install_env_variables(mock_packages, mock_archive, mock_fetch, config, install_mockery):
+def test_install_env_variables(mock_packages, mock_archive, mock_fetch, install_mockery):
spec = Spec("libdwarf")
spec.concretize()
install("libdwarf")
@@ -191,9 +190,7 @@ def test_install_env_variables(mock_packages, mock_archive, mock_fetch, config,
@pytest.mark.disable_clean_stage_check
-def test_show_log_on_error(
- mock_packages, mock_archive, mock_fetch, config, install_mockery, capfd
-):
+def test_show_log_on_error(mock_packages, mock_archive, mock_fetch, install_mockery, capfd):
"""
Make sure --show-log-on-error works.
"""
@@ -206,7 +203,7 @@ def test_show_log_on_error(
assert "See build log for details:" in out
-def test_install_overwrite(mock_packages, mock_archive, mock_fetch, config, install_mockery):
+def test_install_overwrite(mock_packages, mock_archive, mock_fetch, install_mockery):
# Try to install a spec and then to reinstall it.
spec = Spec("libdwarf")
spec.concretize()
@@ -240,9 +237,7 @@ def test_install_overwrite(mock_packages, mock_archive, mock_fetch, config, inst
assert fs.hash_directory(spec.prefix, ignore=ignores) != bad_md5
-def test_install_overwrite_not_installed(
- mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_install_overwrite_not_installed(mock_packages, mock_archive, mock_fetch, install_mockery):
# Try to install a spec and then to reinstall it.
spec = Spec("libdwarf")
spec.concretize()
@@ -267,7 +262,7 @@ def test_install_commit(mock_git_version_info, install_mockery, mock_packages, m
# Use the earliest commit in the respository
spec = Spec(f"git-test-commit@{commits[-1]}").concretized()
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
# Ensure first commit file contents were written
installed = os.listdir(spec.prefix.bin)
@@ -277,9 +272,7 @@ def test_install_commit(mock_git_version_info, install_mockery, mock_packages, m
assert content == "[0]" # contents are weird for another test
-def test_install_overwrite_multiple(
- mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_install_overwrite_multiple(mock_packages, mock_archive, mock_fetch, install_mockery):
# Try to install a spec and then to reinstall it.
libdwarf = Spec("libdwarf")
libdwarf.concretize()
@@ -337,18 +330,14 @@ def test_install_overwrite_multiple(
assert cm_hash != bad_cmake_md5
-@pytest.mark.usefixtures(
- "mock_packages", "mock_archive", "mock_fetch", "config", "install_mockery"
-)
+@pytest.mark.usefixtures("mock_packages", "mock_archive", "mock_fetch", "install_mockery")
def test_install_conflicts(conflict_spec):
# Make sure that spec with conflicts raises a SpackError
with pytest.raises(SpackError):
install(conflict_spec)
-@pytest.mark.usefixtures(
- "mock_packages", "mock_archive", "mock_fetch", "config", "install_mockery"
-)
+@pytest.mark.usefixtures("mock_packages", "mock_archive", "mock_fetch", "install_mockery")
def test_install_invalid_spec(invalid_spec):
# Make sure that invalid specs raise a SpackError
with pytest.raises(SpecSyntaxError, match="unexpected tokens"):
@@ -390,9 +379,7 @@ def test_install_from_file(spec, concretize, error_code, tmpdir):
@pytest.mark.disable_clean_stage_check
-@pytest.mark.usefixtures(
- "mock_packages", "mock_archive", "mock_fetch", "config", "install_mockery"
-)
+@pytest.mark.usefixtures("mock_packages", "mock_archive", "mock_fetch", "install_mockery")
@pytest.mark.parametrize(
"exc_typename,msg",
[("RuntimeError", "something weird happened"), ("ValueError", "spec is not concrete")],
@@ -436,7 +423,7 @@ def test_junit_output_with_failures(tmpdir, exc_typename, msg):
@pytest.mark.parametrize(
"exc_typename,expected_exc,msg",
[
- ("RuntimeError", spack.installer.InstallError, "something weird happened"),
+ ("RuntimeError", spack.error.InstallError, "something weird happened"),
("KeyboardInterrupt", KeyboardInterrupt, "Ctrl-C strikes again"),
],
)
@@ -448,7 +435,6 @@ def test_junit_output_with_errors(
mock_archive,
mock_fetch,
install_mockery,
- config,
tmpdir,
monkeypatch,
):
@@ -509,9 +495,7 @@ def test_install_mix_cli_and_files(clispecs, filespecs, tmpdir):
assert install.returncode == 0
-def test_extra_files_are_archived(
- mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_extra_files_are_archived(mock_packages, mock_archive, mock_fetch, install_mockery):
s = Spec("archive-files")
s.concretize()
@@ -570,100 +554,96 @@ def test_cdash_upload_build_error(tmpdir, mock_fetch, install_mockery, capfd):
@pytest.mark.disable_clean_stage_check
def test_cdash_upload_clean_build(tmpdir, mock_fetch, install_mockery, capfd):
# capfd interferes with Spack's capturing of e.g., Build.xml output
- with capfd.disabled():
- with tmpdir.as_cwd():
- install("--log-file=cdash_reports", "--log-format=cdash", "a")
- report_dir = tmpdir.join("cdash_reports")
- assert report_dir in tmpdir.listdir()
- report_file = report_dir.join("a_Build.xml")
- assert report_file in report_dir.listdir()
- content = report_file.open().read()
- assert "</Build>" in content
- assert "<Text>" not in content
+ with capfd.disabled(), tmpdir.as_cwd():
+ install("--log-file=cdash_reports", "--log-format=cdash", "pkg-a")
+ report_dir = tmpdir.join("cdash_reports")
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join("pkg-a_Build.xml")
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ assert "</Build>" in content
+ assert "<Text>" not in content
@pytest.mark.disable_clean_stage_check
def test_cdash_upload_extra_params(tmpdir, mock_fetch, install_mockery, capfd):
# capfd interferes with Spack's capture of e.g., Build.xml output
- with capfd.disabled():
- with tmpdir.as_cwd():
- install(
- "--log-file=cdash_reports",
- "--log-format=cdash",
- "--cdash-build=my_custom_build",
- "--cdash-site=my_custom_site",
- "--cdash-track=my_custom_track",
- "a",
- )
- report_dir = tmpdir.join("cdash_reports")
- assert report_dir in tmpdir.listdir()
- report_file = report_dir.join("a_Build.xml")
- assert report_file in report_dir.listdir()
- content = report_file.open().read()
- assert 'Site BuildName="my_custom_build - a"' in content
- assert 'Name="my_custom_site"' in content
- assert "-my_custom_track" in content
+ with capfd.disabled(), tmpdir.as_cwd():
+ install(
+ "--log-file=cdash_reports",
+ "--log-format=cdash",
+ "--cdash-build=my_custom_build",
+ "--cdash-site=my_custom_site",
+ "--cdash-track=my_custom_track",
+ "pkg-a",
+ )
+ report_dir = tmpdir.join("cdash_reports")
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join("pkg-a_Build.xml")
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ assert 'Site BuildName="my_custom_build - pkg-a"' in content
+ assert 'Name="my_custom_site"' in content
+ assert "-my_custom_track" in content
@pytest.mark.disable_clean_stage_check
def test_cdash_buildstamp_param(tmpdir, mock_fetch, install_mockery, capfd):
# capfd interferes with Spack's capture of e.g., Build.xml output
- with capfd.disabled():
- with tmpdir.as_cwd():
- cdash_track = "some_mocked_track"
- buildstamp_format = "%Y%m%d-%H%M-{0}".format(cdash_track)
- buildstamp = time.strftime(buildstamp_format, time.localtime(int(time.time())))
- install(
- "--log-file=cdash_reports",
- "--log-format=cdash",
- "--cdash-buildstamp={0}".format(buildstamp),
- "a",
- )
- report_dir = tmpdir.join("cdash_reports")
- assert report_dir in tmpdir.listdir()
- report_file = report_dir.join("a_Build.xml")
- assert report_file in report_dir.listdir()
- content = report_file.open().read()
- assert buildstamp in content
+ with capfd.disabled(), tmpdir.as_cwd():
+ cdash_track = "some_mocked_track"
+ buildstamp_format = "%Y%m%d-%H%M-{0}".format(cdash_track)
+ buildstamp = time.strftime(buildstamp_format, time.localtime(int(time.time())))
+ install(
+ "--log-file=cdash_reports",
+ "--log-format=cdash",
+ "--cdash-buildstamp={0}".format(buildstamp),
+ "pkg-a",
+ )
+ report_dir = tmpdir.join("cdash_reports")
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join("pkg-a_Build.xml")
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ assert buildstamp in content
@pytest.mark.disable_clean_stage_check
def test_cdash_install_from_spec_json(
- tmpdir, mock_fetch, install_mockery, capfd, mock_packages, mock_archive, config
+ tmpdir, mock_fetch, install_mockery, capfd, mock_packages, mock_archive
):
# capfd interferes with Spack's capturing
- with capfd.disabled():
- with tmpdir.as_cwd():
- spec_json_path = str(tmpdir.join("spec.json"))
-
- pkg_spec = Spec("a")
- pkg_spec.concretize()
-
- with open(spec_json_path, "w") as fd:
- fd.write(pkg_spec.to_json(hash=ht.dag_hash))
-
- install(
- "--log-format=cdash",
- "--log-file=cdash_reports",
- "--cdash-build=my_custom_build",
- "--cdash-site=my_custom_site",
- "--cdash-track=my_custom_track",
- "-f",
- spec_json_path,
- )
+ with capfd.disabled(), tmpdir.as_cwd():
+ spec_json_path = str(tmpdir.join("spec.json"))
- report_dir = tmpdir.join("cdash_reports")
- assert report_dir in tmpdir.listdir()
- report_file = report_dir.join("a_Configure.xml")
- assert report_file in report_dir.listdir()
- content = report_file.open().read()
- install_command_regex = re.compile(
- r"<ConfigureCommand>(.+)</ConfigureCommand>", re.MULTILINE | re.DOTALL
- )
- m = install_command_regex.search(content)
- assert m
- install_command = m.group(1)
- assert "a@" in install_command
+ pkg_spec = Spec("pkg-a")
+ pkg_spec.concretize()
+
+ with open(spec_json_path, "w") as fd:
+ fd.write(pkg_spec.to_json(hash=ht.dag_hash))
+
+ install(
+ "--log-format=cdash",
+ "--log-file=cdash_reports",
+ "--cdash-build=my_custom_build",
+ "--cdash-site=my_custom_site",
+ "--cdash-track=my_custom_track",
+ "-f",
+ spec_json_path,
+ )
+
+ report_dir = tmpdir.join("cdash_reports")
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join("pkg-a_Configure.xml")
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ install_command_regex = re.compile(
+ r"<ConfigureCommand>(.+)</ConfigureCommand>", re.MULTILINE | re.DOTALL
+ )
+ m = install_command_regex.search(content)
+ assert m
+ install_command = m.group(1)
+ assert "pkg-a@" in install_command
@pytest.mark.disable_clean_stage_check
@@ -727,7 +707,7 @@ def test_install_only_package(tmpdir, mock_fetch, install_mockery, capfd):
with capfd.disabled():
try:
install("--only", "package", "dependent-install")
- except spack.installer.InstallError as e:
+ except spack.error.InstallError as e:
msg = str(e)
assert "Cannot proceed with dependent-install" in msg
@@ -795,15 +775,15 @@ def test_install_no_add_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock
# ^libdwarf
# ^mpich
# libelf@0.8.10
- # a~bvv
- # ^b
- # a
- # ^b
+ # pkg-a~bvv
+ # ^pkg-b
+ # pkg-a
+ # ^pkg-b
e = ev.create("test", with_view=False)
e.add("mpileaks")
e.add("libelf@0.8.10") # so env has both root and dep libelf specs
- e.add("a")
- e.add("a ~bvv")
+ e.add("pkg-a")
+ e.add("pkg-a ~bvv")
e.concretize()
e.write()
env_specs = e.all_specs()
@@ -814,9 +794,9 @@ def test_install_no_add_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock
# First find and remember some target concrete specs in the environment
for e_spec in env_specs:
- if e_spec.satisfies(Spec("a ~bvv")):
+ if e_spec.satisfies(Spec("pkg-a ~bvv")):
a_spec = e_spec
- elif e_spec.name == "b":
+ elif e_spec.name == "pkg-b":
b_spec = e_spec
elif e_spec.satisfies(Spec("mpi")):
mpi_spec = e_spec
@@ -839,8 +819,8 @@ def test_install_no_add_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock
assert "You can add specs to the environment with 'spack add " in inst_out
# Without --add, ensure that two packages "a" get installed
- inst_out = install("a", output=str)
- assert len([x for x in e.all_specs() if x.installed and x.name == "a"]) == 2
+ inst_out = install("pkg-a", output=str)
+ assert len([x for x in e.all_specs() if x.installed and x.name == "pkg-a"]) == 2
# Install an unambiguous dependency spec (that already exists as a dep
# in the environment) and make sure it gets installed (w/ deps),
@@ -873,7 +853,7 @@ def test_install_no_add_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock
# root of the environment as well as installed.
assert b_spec not in e.roots()
- install("--add", "b")
+ install("--add", "pkg-b")
assert b_spec in e.roots()
assert b_spec not in e.uninstalled_specs()
@@ -908,7 +888,7 @@ def test_cdash_auth_token(tmpdir, mock_fetch, install_mockery, monkeypatch, capf
# capfd interferes with Spack's capturing
with tmpdir.as_cwd(), capfd.disabled():
monkeypatch.setenv("SPACK_CDASH_AUTH_TOKEN", "asdf")
- out = install("-v", "--log-file=cdash_reports", "--log-format=cdash", "a")
+ out = install("-v", "--log-file=cdash_reports", "--log-format=cdash", "pkg-a")
assert "Using CDash auth token from environment" in out
@@ -916,104 +896,25 @@ def test_cdash_auth_token(tmpdir, mock_fetch, install_mockery, monkeypatch, capf
@pytest.mark.disable_clean_stage_check
def test_cdash_configure_warning(tmpdir, mock_fetch, install_mockery, capfd):
# capfd interferes with Spack's capturing of e.g., Build.xml output
- with capfd.disabled():
- with tmpdir.as_cwd():
- # Test would fail if install raised an error.
-
- # Ensure that even on non-x86_64 architectures, there are no
- # dependencies installed
- spec = spack.spec.Spec("configure-warning").concretized()
- spec.clear_dependencies()
- specfile = "./spec.json"
- with open(specfile, "w") as f:
- f.write(spec.to_json())
-
- install("--log-file=cdash_reports", "--log-format=cdash", specfile)
- # Verify Configure.xml exists with expected contents.
- report_dir = tmpdir.join("cdash_reports")
- assert report_dir in tmpdir.listdir()
- report_file = report_dir.join("Configure.xml")
- assert report_file in report_dir.listdir()
- content = report_file.open().read()
- assert "foo: No such file or directory" in content
-
-
-@pytest.mark.not_on_windows("ArchSpec gives test platform debian rather than windows")
-def test_compiler_bootstrap(
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_archive,
- mutable_config,
- monkeypatch,
-):
- monkeypatch.setattr(spack.concretize.Concretizer, "check_for_compiler_existence", False)
- spack.config.set("config:install_missing_compilers", True)
- assert CompilerSpec("gcc@=12.0") not in compilers.all_compiler_specs()
-
- # Test succeeds if it does not raise an error
- install("a%gcc@=12.0")
-
-
-@pytest.mark.not_on_windows("Binary mirrors not supported on windows")
-def test_compiler_bootstrap_from_binary_mirror(
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_archive,
- mutable_config,
- monkeypatch,
- tmpdir,
-):
- """
- Make sure installing compiler from buildcache registers compiler
- """
-
- # Create a temp mirror directory for buildcache usage
- mirror_dir = tmpdir.join("mirror_dir")
- mirror_url = "file://{0}".format(mirror_dir.strpath)
-
- # Install a compiler, because we want to put it in a buildcache
- install("gcc@=10.2.0")
-
- # Put installed compiler in the buildcache
- buildcache("push", "-u", "-f", mirror_dir.strpath, "gcc@10.2.0")
-
- # Now uninstall the compiler
- uninstall("-y", "gcc@10.2.0")
-
- monkeypatch.setattr(spack.concretize.Concretizer, "check_for_compiler_existence", False)
- spack.config.set("config:install_missing_compilers", True)
- assert CompilerSpec("gcc@=10.2.0") not in compilers.all_compiler_specs()
-
- # Configure the mirror where we put that buildcache w/ the compiler
- mirror("add", "test-mirror", mirror_url)
-
- # Now make sure that when the compiler is installed from binary mirror,
- # it also gets configured as a compiler. Test succeeds if it does not
- # raise an error
- install("--no-check-signature", "--cache-only", "--only", "dependencies", "b%gcc@=10.2.0")
- install("--no-cache", "--only", "package", "b%gcc@10.2.0")
-
-
-@pytest.mark.not_on_windows("ArchSpec gives test platform debian rather than windows")
-@pytest.mark.regression("16221")
-def test_compiler_bootstrap_already_installed(
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_archive,
- mutable_config,
- monkeypatch,
-):
- monkeypatch.setattr(spack.concretize.Concretizer, "check_for_compiler_existence", False)
- spack.config.set("config:install_missing_compilers", True)
-
- assert CompilerSpec("gcc@=12.0") not in compilers.all_compiler_specs()
-
- # Test succeeds if it does not raise an error
- install("gcc@=12.0")
- install("a%gcc@=12.0")
+ with capfd.disabled(), tmpdir.as_cwd():
+ # Test would fail if install raised an error.
+
+ # Ensure that even on non-x86_64 architectures, there are no
+ # dependencies installed
+ spec = Spec("configure-warning").concretized()
+ spec.clear_dependencies()
+ specfile = "./spec.json"
+ with open(specfile, "w") as f:
+ f.write(spec.to_json())
+ print(spec.to_json())
+ install("--log-file=cdash_reports", "--log-format=cdash", specfile)
+ # Verify Configure.xml exists with expected contents.
+ report_dir = tmpdir.join("cdash_reports")
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join("Configure.xml")
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ assert "foo: No such file or directory" in content
def test_install_fails_no_args(tmpdir):
@@ -1104,13 +1005,7 @@ def test_installation_fail_tests(install_mockery, mock_fetch, name, method):
@pytest.mark.not_on_windows("Buildcache not supported on windows")
def test_install_use_buildcache(
- capsys,
- mock_packages,
- mock_fetch,
- mock_archive,
- mock_binary_index,
- tmpdir,
- install_mockery_mutable_config,
+ capsys, mock_packages, mock_fetch, mock_archive, mock_binary_index, tmpdir, install_mockery
):
"""
Make sure installing with use-buildcache behaves correctly.
@@ -1183,19 +1078,19 @@ def test_install_use_buildcache(
@pytest.mark.not_on_windows("Windows logger I/O operation on closed file when install fails")
@pytest.mark.regression("34006")
@pytest.mark.disable_clean_stage_check
-def test_padded_install_runtests_root(install_mockery_mutable_config, mock_fetch):
+def test_padded_install_runtests_root(install_mockery, mock_fetch):
spack.config.set("config:install_tree:padded_length", 255)
output = install("--test=root", "--no-cache", "test-build-callbacks", fail_on_error=False)
assert output.count("method not implemented") == 1
@pytest.mark.regression("35337")
-def test_report_filename_for_cdash(install_mockery_mutable_config, mock_fetch):
+def test_report_filename_for_cdash(install_mockery, mock_fetch):
"""Test that the temporary file used to write the XML for CDash is not the upload URL"""
parser = argparse.ArgumentParser()
spack.cmd.install.setup_parser(parser)
args = parser.parse_args(
- ["--cdash-upload-url", "https://blahblah/submit.php?project=debugging", "a"]
+ ["--cdash-upload-url", "https://blahblah/submit.php?project=debugging", "pkg-a"]
)
specs = spack.cmd.install.concrete_specs_from_cli(args, {})
filename = spack.cmd.install.report_filename(args, specs)
diff --git a/lib/spack/spack/test/cmd/is_git_repo.py b/lib/spack/spack/test/cmd/is_git_repo.py
index 087f69e028..3dabc8623a 100644
--- a/lib/spack/spack/test/cmd/is_git_repo.py
+++ b/lib/spack/spack/test/cmd/is_git_repo.py
@@ -11,6 +11,8 @@ import pytest
from llnl.util.filesystem import mkdirp, working_dir
import spack
+import spack.cmd
+import spack.fetch_strategy
from spack.version import ver
diff --git a/lib/spack/spack/test/cmd/list.py b/lib/spack/spack/test/cmd/list.py
index 848a6d20e4..23903107f6 100644
--- a/lib/spack/spack/test/cmd/list.py
+++ b/lib/spack/spack/test/cmd/list.py
@@ -3,9 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os.path
import sys
from textwrap import dedent
+import spack.paths
import spack.repo
from spack.main import SpackCommand
@@ -134,3 +136,18 @@ def test_list_count(mock_packages):
assert int(output.strip()) == len(
[name for name in spack.repo.all_package_names() if "py-" in name]
)
+
+
+# def test_list_repos(mock_packages, builder_test_repository):
+def test_list_repos():
+ with spack.repo.use_repositories(
+ os.path.join(spack.paths.repos_path, "builtin.mock"),
+ os.path.join(spack.paths.repos_path, "builder.test"),
+ ):
+ total_pkgs = len(list().strip().split())
+ mock_pkgs = len(list("-r", "builtin.mock").strip().split())
+ builder_pkgs = len(list("-r", "builder.test").strip().split())
+ both_repos = len(list("-r", "builtin.mock", "-r", "builder.test").strip().split())
+
+ assert total_pkgs > mock_pkgs > builder_pkgs
+ assert both_repos == total_pkgs
diff --git a/lib/spack/spack/test/cmd/load.py b/lib/spack/spack/test/cmd/load.py
index e2abe72e0e..1c36bcc86a 100644
--- a/lib/spack/spack/test/cmd/load.py
+++ b/lib/spack/spack/test/cmd/load.py
@@ -4,12 +4,12 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
+import sys
import pytest
import spack.spec
import spack.user_environment as uenv
-import spack.util.environment
from spack.main import SpackCommand
load = SpackCommand("load")
@@ -17,101 +17,125 @@ unload = SpackCommand("unload")
install = SpackCommand("install")
location = SpackCommand("location")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
def test_manpath_trailing_colon(
install_mockery, mock_fetch, mock_archive, mock_packages, working_env
):
+ (shell, set_command, commandsep) = (
+ ("--bat", 'set "%s=%s"', "\n")
+ if sys.platform == "win32"
+ else ("--sh", "export %s=%s", ";")
+ )
+
"""Test that the commands generated by load add the MANPATH prefix
inspections. Also test that Spack correctly preserves the default/existing
manpath search path via a trailing colon"""
install("mpileaks")
- sh_out = load("--sh", "mpileaks")
- lines = sh_out.split("\n")
- assert any(re.match(r"export MANPATH=.*:;", ln) for ln in lines)
-
- os.environ["MANPATH"] = "/tmp/man:"
-
- sh_out = load("--sh", "mpileaks")
- lines = sh_out.split("\n")
- assert any(re.match(r"export MANPATH=.*:/tmp/man:;", ln) for ln in lines)
-
-
-def test_load_recursive(install_mockery, mock_fetch, mock_archive, mock_packages, working_env):
- """Test that `spack load` applies prefix inspections of its required runtime deps in
- topo-order"""
- install("mpileaks")
- mpileaks_spec = spack.spec.Spec("mpileaks").concretized()
-
- # Ensure our reference variable is cleed.
- os.environ["CMAKE_PREFIX_PATH"] = "/hello:/world"
-
- sh_out = load("--sh", "mpileaks")
- csh_out = load("--csh", "mpileaks")
-
- def extract_cmake_prefix_path(output, prefix):
- return next(cmd for cmd in output.split(";") if cmd.startswith(prefix))[
- len(prefix) :
- ].split(":")
+ sh_out = load(shell, "mpileaks")
+ lines = [line.strip("\n") for line in sh_out.split(commandsep)]
+ assert any(re.match(set_command % ("MANPATH", ".*" + os.pathsep), ln) for ln in lines)
+ os.environ["MANPATH"] = "/tmp/man" + os.pathsep
- # Map a prefix found in CMAKE_PREFIX_PATH back to a package name in mpileaks' DAG.
- prefix_to_pkg = lambda prefix: next(
- s.name for s in mpileaks_spec.traverse() if s.prefix == prefix
+ sh_out = load(shell, "mpileaks")
+ lines = [line.strip("\n") for line in sh_out.split(commandsep)]
+ assert any(
+ re.match(set_command % ("MANPATH", ".*" + os.pathsep + "/tmp/man" + os.pathsep), ln)
+ for ln in lines
)
- paths_sh = extract_cmake_prefix_path(sh_out, prefix="export CMAKE_PREFIX_PATH=")
- paths_csh = extract_cmake_prefix_path(csh_out, prefix="setenv CMAKE_PREFIX_PATH ")
- # Shouldn't be a difference between loading csh / sh, so check they're the same.
- assert paths_sh == paths_csh
-
- # We should've prepended new paths, and keep old ones.
- assert paths_sh[-2:] == ["/hello", "/world"]
-
- # All but the last two paths are added by spack load; lookup what packages they're from.
- pkgs = [prefix_to_pkg(p) for p in paths_sh[:-2]]
-
- # Do we have all the runtime packages?
- assert set(pkgs) == set(
- s.name for s in mpileaks_spec.traverse(deptype=("link", "run"), root=True)
- )
-
- # Finally, do we list them in topo order?
- for i, pkg in enumerate(pkgs):
- set(s.name for s in mpileaks_spec[pkg].traverse(direction="parents")) in set(pkgs[:i])
-
- # Lastly, do we keep track that mpileaks was loaded?
- assert f"export {uenv.spack_loaded_hashes_var}={mpileaks_spec.dag_hash()}" in sh_out
- assert f"setenv {uenv.spack_loaded_hashes_var} {mpileaks_spec.dag_hash()}" in csh_out
-
-
-def test_load_includes_run_env(install_mockery, mock_fetch, mock_archive, mock_packages):
+def test_load_recursive(install_mockery, mock_fetch, mock_archive, mock_packages, working_env):
+ def test_load_shell(shell, set_command):
+ """Test that `spack load` applies prefix inspections of its required runtime deps in
+ topo-order"""
+ install("mpileaks")
+ mpileaks_spec = spack.spec.Spec("mpileaks").concretized()
+
+ # Ensure our reference variable is clean.
+ os.environ["CMAKE_PREFIX_PATH"] = "/hello" + os.pathsep + "/world"
+
+ shell_out = load(shell, "mpileaks")
+
+ def extract_value(output, variable):
+ match = re.search(set_command % variable, output, flags=re.MULTILINE)
+ value = match.group(1)
+ return value.split(os.pathsep)
+
+ # Map a prefix found in CMAKE_PREFIX_PATH back to a package name in mpileaks' DAG.
+ prefix_to_pkg = lambda prefix: next(
+ s.name for s in mpileaks_spec.traverse() if s.prefix == prefix
+ )
+
+ paths_shell = extract_value(shell_out, "CMAKE_PREFIX_PATH")
+
+ # We should've prepended new paths, and keep old ones.
+ assert paths_shell[-2:] == ["/hello", "/world"]
+
+ # All but the last two paths are added by spack load; lookup what packages they're from.
+ pkgs = [prefix_to_pkg(p) for p in paths_shell[:-2]]
+
+ # Do we have all the runtime packages?
+ assert set(pkgs) == set(
+ s.name for s in mpileaks_spec.traverse(deptype=("link", "run"), root=True)
+ )
+
+ # Finally, do we list them in topo order?
+ for i, pkg in enumerate(pkgs):
+ set(s.name for s in mpileaks_spec[pkg].traverse(direction="parents")) in set(pkgs[:i])
+
+ # Lastly, do we keep track that mpileaks was loaded?
+ assert (
+ extract_value(shell_out, uenv.spack_loaded_hashes_var)[0] == mpileaks_spec.dag_hash()
+ )
+ return paths_shell
+
+ if sys.platform == "win32":
+ shell, set_command = ("--bat", r'set "%s=(.*)"')
+ test_load_shell(shell, set_command)
+ else:
+ params = [("--sh", r"export %s=([^;]*)"), ("--csh", r"setenv %s ([^;]*)")]
+ shell, set_command = params[0]
+ paths_sh = test_load_shell(shell, set_command)
+ shell, set_command = params[1]
+ paths_csh = test_load_shell(shell, set_command)
+ assert paths_sh == paths_csh
+
+
+@pytest.mark.parametrize(
+ "shell,set_command",
+ (
+ [("--bat", 'set "%s=%s"')]
+ if sys.platform == "win32"
+ else [("--sh", "export %s=%s"), ("--csh", "setenv %s %s")]
+ ),
+)
+def test_load_includes_run_env(
+ shell, set_command, install_mockery, mock_fetch, mock_archive, mock_packages
+):
"""Tests that environment changes from the package's
`setup_run_environment` method are added to the user environment in
addition to the prefix inspections"""
install("mpileaks")
- sh_out = load("--sh", "mpileaks")
- csh_out = load("--csh", "mpileaks")
+ shell_out = load(shell, "mpileaks")
- assert "export FOOBAR=mpileaks" in sh_out
- assert "setenv FOOBAR mpileaks" in csh_out
+ assert set_command % ("FOOBAR", "mpileaks") in shell_out
def test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages):
"""Test with and without the --first option"""
+ shell = "--bat" if sys.platform == "win32" else "--sh"
install("libelf@0.8.12")
install("libelf@0.8.13")
# Now there are two versions of libelf, which should cause an error
- out = load("--sh", "libelf", fail_on_error=False)
+ out = load(shell, "libelf", fail_on_error=False)
assert "matches multiple packages" in out
assert "Use a more specific spec" in out
# Using --first should avoid the error condition
- load("--sh", "--first", "libelf")
+ load(shell, "--first", "libelf")
def test_load_fails_no_shell(install_mockery, mock_fetch, mock_archive, mock_packages):
@@ -122,7 +146,24 @@ def test_load_fails_no_shell(install_mockery, mock_fetch, mock_archive, mock_pac
assert "To set up shell support" in out
-def test_unload(install_mockery, mock_fetch, mock_archive, mock_packages, working_env):
+@pytest.mark.parametrize(
+ "shell,set_command,unset_command",
+ (
+ [("--bat", 'set "%s=%s"', 'set "%s="')]
+ if sys.platform == "win32"
+ else [("--sh", "export %s=%s", "unset %s"), ("--csh", "setenv %s %s", "unsetenv %s")]
+ ),
+)
+def test_unload(
+ shell,
+ set_command,
+ unset_command,
+ install_mockery,
+ mock_fetch,
+ mock_archive,
+ mock_packages,
+ working_env,
+):
"""Tests that any variables set in the user environment are undone by the
unload command"""
install("mpileaks")
@@ -130,16 +171,16 @@ def test_unload(install_mockery, mock_fetch, mock_archive, mock_packages, workin
# Set so unload has something to do
os.environ["FOOBAR"] = "mpileaks"
- os.environ[uenv.spack_loaded_hashes_var] = "%s:%s" % (mpileaks_spec.dag_hash(), "garbage")
+ os.environ[uenv.spack_loaded_hashes_var] = ("%s" + os.pathsep + "%s") % (
+ mpileaks_spec.dag_hash(),
+ "garbage",
+ )
- sh_out = unload("--sh", "mpileaks")
- csh_out = unload("--csh", "mpileaks")
+ shell_out = unload(shell, "mpileaks")
- assert "unset FOOBAR" in sh_out
- assert "unsetenv FOOBAR" in csh_out
+ assert (unset_command % "FOOBAR") in shell_out
- assert "export %s=garbage" % uenv.spack_loaded_hashes_var in sh_out
- assert "setenv %s garbage" % uenv.spack_loaded_hashes_var in csh_out
+ assert set_command % (uenv.spack_loaded_hashes_var, "garbage") in shell_out
def test_unload_fails_no_shell(
diff --git a/lib/spack/spack/test/cmd/location.py b/lib/spack/spack/test/cmd/location.py
index 25008e8e44..25fa02a6b0 100644
--- a/lib/spack/spack/test/cmd/location.py
+++ b/lib/spack/spack/test/cmd/location.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
import shutil
import pytest
@@ -12,14 +11,13 @@ from llnl.util.filesystem import mkdirp
import spack.environment as ev
import spack.paths
+import spack.spec
import spack.stage
from spack.main import SpackCommand, SpackCommandError
# Everything here uses (or can use) the mock config and database.
-pytestmark = [
- pytest.mark.usefixtures("config", "database"),
- pytest.mark.not_on_windows("does not run on windows"),
-]
+pytestmark = [pytest.mark.usefixtures("mutable_config", "mutable_database")]
+
# location prints out "locations of packages and spack directories"
location = SpackCommand("location")
env = SpackCommand("env")
@@ -65,7 +63,7 @@ def test_location_source_dir_missing():
prefix = "==> Error: "
expected = (
"%sSource directory does not exist yet. Run this to create it:"
- "%s spack stage %s" % (prefix, os.linesep, spec)
+ "%s spack stage %s" % (prefix, "\n", spec)
)
out = location("--source-dir", spec, fail_on_error=False).strip()
assert out == expected
@@ -126,6 +124,7 @@ def test_location_env_missing():
@pytest.mark.db
+@pytest.mark.not_on_windows("Broken on Windows")
def test_location_install_dir(mock_spec):
"""Tests spack location --install-dir."""
spec, _ = mock_spec
diff --git a/lib/spack/spack/test/cmd/logs.py b/lib/spack/spack/test/cmd/logs.py
new file mode 100644
index 0000000000..b668cd449c
--- /dev/null
+++ b/lib/spack/spack/test/cmd/logs.py
@@ -0,0 +1,122 @@
+# Copyright 2013-2024 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 gzip
+import os
+import sys
+import tempfile
+from contextlib import contextmanager
+from io import BytesIO, TextIOWrapper
+
+import pytest
+
+import spack
+import spack.cmd.logs
+import spack.main
+import spack.spec
+from spack.main import SpackCommand
+
+logs = SpackCommand("logs")
+install = SpackCommand("install")
+
+
+@contextmanager
+def stdout_as_buffered_text_stream():
+ """Attempt to simulate "typical" interface for stdout when user is
+ running Spack/Python from terminal. "spack log" should not be run
+ for all possible cases of what stdout might look like, in
+ particular some programmatic redirections of stdout like StringIO
+ are not meant to be supported by this command; more-generally,
+ mechanisms that depend on decoding binary output prior to write
+ are not supported for "spack log".
+ """
+ original_stdout = sys.stdout
+
+ with tempfile.TemporaryFile(mode="w+b") as tf:
+ sys.stdout = TextIOWrapper(tf)
+ try:
+ yield tf
+ finally:
+ sys.stdout = original_stdout
+
+
+def _rewind_collect_and_decode(rw_stream):
+ rw_stream.seek(0)
+ return rw_stream.read().decode("utf-8")
+
+
+@pytest.fixture
+def disable_capture(capfd):
+ with capfd.disabled():
+ yield
+
+
+def test_logs_cmd_errors(install_mockery, mock_fetch, mock_archive, mock_packages):
+ spec = spack.spec.Spec("libelf").concretized()
+ assert not spec.installed
+
+ with pytest.raises(spack.main.SpackCommandError, match="is not installed or staged"):
+ logs("libelf")
+
+ with pytest.raises(spack.main.SpackCommandError, match="Too many specs"):
+ logs("libelf mpi")
+
+ install("libelf")
+ os.remove(spec.package.install_log_path)
+ with pytest.raises(spack.main.SpackCommandError, match="No logs are available"):
+ logs("libelf")
+
+
+def _write_string_to_path(string, path):
+ """Write a string to a file, preserving newline format in the string."""
+ with open(path, "wb") as f:
+ f.write(string.encode("utf-8"))
+
+
+def test_dump_logs(install_mockery, mock_fetch, mock_archive, mock_packages, disable_capture):
+ """Test that ``spack log`` can find (and print) the logs for partial
+ builds and completed installs.
+
+ Also make sure that for compressed logs, that we automatically
+ decompress them.
+ """
+ cmdline_spec = spack.spec.Spec("libelf")
+ concrete_spec = cmdline_spec.concretized()
+
+ # Sanity check, make sure this test is checking what we want: to
+ # start with
+ assert not concrete_spec.installed
+
+ stage_log_content = "test_log stage output\nanother line"
+ installed_log_content = "test_log install output\nhere to test multiple lines"
+
+ with concrete_spec.package.stage:
+ _write_string_to_path(stage_log_content, concrete_spec.package.log_path)
+ with stdout_as_buffered_text_stream() as redirected_stdout:
+ spack.cmd.logs._logs(cmdline_spec, concrete_spec)
+ assert _rewind_collect_and_decode(redirected_stdout) == stage_log_content
+
+ install("libelf")
+
+ # Sanity check: make sure a path is recorded, regardless of whether
+ # it exists (if it does exist, we will overwrite it with content
+ # in this test)
+ assert concrete_spec.package.install_log_path
+
+ with gzip.open(concrete_spec.package.install_log_path, "wb") as compressed_file:
+ bstream = BytesIO(installed_log_content.encode("utf-8"))
+ compressed_file.writelines(bstream)
+
+ with stdout_as_buffered_text_stream() as redirected_stdout:
+ spack.cmd.logs._logs(cmdline_spec, concrete_spec)
+ assert _rewind_collect_and_decode(redirected_stdout) == installed_log_content
+
+ with concrete_spec.package.stage:
+ _write_string_to_path(stage_log_content, concrete_spec.package.log_path)
+ # We re-create the stage, but "spack log" should ignore that
+ # if the package is installed
+ with stdout_as_buffered_text_stream() as redirected_stdout:
+ spack.cmd.logs._logs(cmdline_spec, concrete_spec)
+ assert _rewind_collect_and_decode(redirected_stdout) == installed_log_content
diff --git a/lib/spack/spack/test/cmd/maintainers.py b/lib/spack/spack/test/cmd/maintainers.py
index 3534310a9d..3928bebff1 100644
--- a/lib/spack/spack/test/cmd/maintainers.py
+++ b/lib/spack/spack/test/cmd/maintainers.py
@@ -12,13 +12,7 @@ import spack.repo
maintainers = spack.main.SpackCommand("maintainers")
-MAINTAINED_PACKAGES = [
- "maintainers-1",
- "maintainers-2",
- "maintainers-3",
- "py-extension1",
- "py-extension2",
-]
+MAINTAINED_PACKAGES = ["maintainers-1", "maintainers-2", "maintainers-3", "py-extension1"]
def split(output):
@@ -53,11 +47,8 @@ def test_all(mock_packages, capfd):
"user2,",
"user3",
"py-extension1:",
- "adamjstewart,",
"user1,",
"user2",
- "py-extension2:",
- "adamjstewart",
]
with capfd.disabled():
@@ -69,9 +60,6 @@ def test_all_by_user(mock_packages, capfd):
with capfd.disabled():
out = split(maintainers("--all", "--by-user"))
assert out == [
- "adamjstewart:",
- "py-extension1,",
- "py-extension2",
"user0:",
"maintainers-3",
"user1:",
@@ -133,7 +121,7 @@ def test_maintainers_list_packages(mock_packages, capfd):
def test_maintainers_list_fails(mock_packages, capfd):
- out = maintainers("a", fail_on_error=False)
+ out = maintainers("pkg-a", fail_on_error=False)
assert not out
assert maintainers.returncode == 1
diff --git a/lib/spack/spack/test/cmd/mirror.py b/lib/spack/spack/test/cmd/mirror.py
index ca4c0dd8ce..b10335d56f 100644
--- a/lib/spack/spack/test/cmd/mirror.py
+++ b/lib/spack/spack/test/cmd/mirror.py
@@ -10,10 +10,14 @@ import pytest
import spack.cmd.mirror
import spack.config
import spack.environment as ev
+import spack.error
+import spack.mirrors.utils
import spack.spec
import spack.util.url as url_util
+import spack.version
from spack.main import SpackCommand, SpackCommandError
+config = SpackCommand("config")
mirror = SpackCommand("mirror")
env = SpackCommand("env")
add = SpackCommand("add")
@@ -35,7 +39,7 @@ def test_regression_8083(tmpdir, capfd, mock_packages, mock_fetch, config):
@pytest.mark.regression("12345")
-def test_mirror_from_env(tmp_path, mock_packages, mock_fetch, config, mutable_mock_env_path):
+def test_mirror_from_env(tmp_path, mock_packages, mock_fetch, mutable_mock_env_path):
mirror_dir = str(tmp_path / "mirror")
env_name = "test"
@@ -70,7 +74,7 @@ def test_mirror_skip_unstable(tmpdir_factory, mock_packages, config, source_for_
mirror_dir = str(tmpdir_factory.mktemp("mirror-dir"))
specs = [spack.spec.Spec(x).concretized() for x in ["git-test", "trivial-pkg-with-valid-hash"]]
- spack.mirror.create(mirror_dir, specs, skip_unstable_versions=True)
+ spack.mirrors.utils.create(mirror_dir, specs, skip_unstable_versions=True)
assert set(os.listdir(mirror_dir)) - set(["_source-cache"]) == set(
["trivial-pkg-with-valid-hash"]
@@ -88,6 +92,7 @@ class MockMirrorArgs:
exclude_file=None,
exclude_specs=None,
directory=None,
+ private=False,
):
self.specs = specs or []
self.all = all
@@ -96,6 +101,7 @@ class MockMirrorArgs:
self.dependencies = dependencies
self.exclude_file = exclude_file
self.exclude_specs = exclude_specs
+ self.private = private
self.directory = directory
@@ -104,7 +110,7 @@ def test_exclude_specs(mock_packages, config):
specs=["mpich"], versions_per_spec="all", exclude_specs="mpich@3.0.1:3.0.2 mpich@1.0"
)
- mirror_specs = spack.cmd.mirror.concrete_specs_from_user(args)
+ mirror_specs, _ = spack.cmd.mirror._specs_and_action(args)
expected_include = set(
spack.spec.Spec(x).concretized() for x in ["mpich@3.0.3", "mpich@3.0.4", "mpich@3.0"]
)
@@ -113,6 +119,19 @@ def test_exclude_specs(mock_packages, config):
assert not any(spec.satisfies(y) for spec in mirror_specs for y in expected_exclude)
+def test_exclude_specs_public_mirror(mock_packages, config):
+ args = MockMirrorArgs(
+ specs=["no-redistribute-dependent"],
+ versions_per_spec="all",
+ dependencies=True,
+ private=False,
+ )
+
+ mirror_specs, _ = spack.cmd.mirror._specs_and_action(args)
+ assert not any(s.name == "no-redistribute" for s in mirror_specs)
+ assert any(s.name == "no-redistribute-dependent" for s in mirror_specs)
+
+
def test_exclude_file(mock_packages, tmpdir, config):
exclude_path = os.path.join(str(tmpdir), "test-exclude.txt")
with open(exclude_path, "w") as exclude_file:
@@ -125,7 +144,7 @@ mpich@1.0
args = MockMirrorArgs(specs=["mpich"], versions_per_spec="all", exclude_file=exclude_path)
- mirror_specs = spack.cmd.mirror.concrete_specs_from_user(args)
+ mirror_specs, _ = spack.cmd.mirror._specs_and_action(args)
expected_include = set(
spack.spec.Spec(x).concretized() for x in ["mpich@3.0.3", "mpich@3.0.4", "mpich@3.0"]
)
@@ -163,20 +182,122 @@ def test_mirror_crud(mutable_config, capsys):
output = mirror("remove", "mirror")
assert "Removed mirror" in output
- # Test S3 connection info id/key
- mirror(
- "add",
- "--s3-access-key-id",
- "foo",
- "--s3-access-key-secret",
- "bar",
- "mirror",
- "s3://spack-public",
- )
+ # Test S3 connection info token as variable
+ mirror("add", "--s3-access-token-variable", "aaaaaazzzzz", "mirror", "s3://spack-public")
output = mirror("remove", "mirror")
assert "Removed mirror" in output
+ def do_add_set_seturl_access_pair(
+ id_arg, secret_arg, mirror_name="mirror", mirror_url="s3://spack-public"
+ ):
+ # Test S3 connection info id/key
+ output = mirror("add", id_arg, "foo", secret_arg, "bar", mirror_name, mirror_url)
+ if "variable" not in secret_arg:
+ assert (
+ f"Configuring mirror secrets as plain text with {secret_arg} is deprecated. "
+ in output
+ )
+
+ output = config("blame", "mirrors")
+ assert all([x in output for x in ("foo", "bar", mirror_name, mirror_url)])
+ # Mirror access_pair deprecation warning should not be in blame output
+ assert "support for plain text secrets" not in output
+
+ output = mirror("set", id_arg, "foo_set", secret_arg, "bar_set", mirror_name)
+ if "variable" not in secret_arg:
+ assert "support for plain text secrets" in output
+ output = config("blame", "mirrors")
+ assert all([x in output for x in ("foo_set", "bar_set", mirror_name, mirror_url)])
+ if "variable" not in secret_arg:
+ output = mirror(
+ "set", id_arg, "foo_set", secret_arg + "-variable", "bar_set_var", mirror_name
+ )
+ assert "support for plain text secrets" not in output
+ output = config("blame", "mirrors")
+ assert all(
+ [x in output for x in ("foo_set", "bar_set_var", mirror_name, mirror_url)]
+ )
+
+ output = mirror(
+ "set-url",
+ id_arg,
+ "foo_set_url",
+ secret_arg,
+ "bar_set_url",
+ "--push",
+ mirror_name,
+ mirror_url + "-push",
+ )
+ output = config("blame", "mirrors")
+ assert all(
+ [
+ x in output
+ for x in ("foo_set_url", "bar_set_url", mirror_name, mirror_url + "-push")
+ ]
+ )
+
+ output = mirror("set", id_arg, "a", mirror_name)
+ assert "No changes made to mirror" not in output
+
+ output = mirror("set", secret_arg, "b", mirror_name)
+ assert "No changes made to mirror" not in output
+
+ output = mirror("set-url", id_arg, "c", mirror_name, mirror_url)
+ assert "No changes made to mirror" not in output
+
+ output = mirror("set-url", secret_arg, "d", mirror_name, mirror_url)
+ assert "No changes made to mirror" not in output
+
+ output = mirror("remove", mirror_name)
+ assert "Removed mirror" in output
+
+ output = mirror("add", id_arg, "foo", mirror_name, mirror_url)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("set-url", id_arg, "bar", mirror_name, mirror_url)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("set", id_arg, "bar", mirror_name)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("remove", mirror_name)
+ assert "Removed mirror" in output
+
+ output = mirror("add", secret_arg, "bar", mirror_name, mirror_url)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("set-url", secret_arg, "bar", mirror_name, mirror_url)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("set", secret_arg, "bar", mirror_name)
+ assert "Expected both parts of the access pair to be specified. " in output
+
+ output = mirror("remove", mirror_name)
+ assert "Removed mirror" in output
+
+ output = mirror("list")
+ assert "No mirrors configured" in output
+
+ do_add_set_seturl_access_pair("--s3-access-key-id", "--s3-access-key-secret")
+ do_add_set_seturl_access_pair("--s3-access-key-id", "--s3-access-key-secret-variable")
+ do_add_set_seturl_access_pair(
+ "--s3-access-key-id-variable", "--s3-access-key-secret-variable"
+ )
+ with pytest.raises(
+ spack.error.SpackError, match="Cannot add mirror with a variable id and text secret"
+ ):
+ do_add_set_seturl_access_pair("--s3-access-key-id-variable", "--s3-access-key-secret")
+
+ # Test OCI connection info user/password
+ do_add_set_seturl_access_pair("--oci-username", "--oci-password")
+ do_add_set_seturl_access_pair("--oci-username", "--oci-password-variable")
+ do_add_set_seturl_access_pair("--oci-username-variable", "--oci-password-variable")
+ with pytest.raises(
+ spack.error.SpackError, match="Cannot add mirror with a variable id and text secret"
+ ):
+ do_add_set_seturl_access_pair("--s3-access-key-id-variable", "--s3-access-key-secret")
+
# Test S3 connection info with endpoint URL
mirror(
"add",
@@ -200,6 +321,9 @@ def test_mirror_crud(mutable_config, capsys):
output = mirror("remove", "mirror")
assert "Removed mirror" in output
+ output = mirror("list")
+ assert "No mirrors configured" in output
+
def test_mirror_nonexisting(mutable_config):
with pytest.raises(SpackCommandError):
@@ -217,13 +341,7 @@ def test_mirror_name_collision(mutable_config):
def test_mirror_destroy(
- install_mockery_mutable_config,
- mock_packages,
- mock_fetch,
- mock_archive,
- mutable_config,
- monkeypatch,
- tmpdir,
+ install_mockery, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch, tmpdir
):
# Create a temp mirror directory for buildcache usage
mirror_dir = tmpdir.join("mirror_dir")
@@ -262,11 +380,9 @@ def test_mirror_destroy(
class TestMirrorCreate:
@pytest.mark.regression("31736", "31985")
def test_all_specs_with_all_versions_dont_concretize(self):
- args = MockMirrorArgs(exclude_file=None, exclude_specs=None)
- specs = spack.cmd.mirror.all_specs_with_all_versions(
- selection_fn=spack.cmd.mirror.not_excluded_fn(args)
- )
- assert all(not s.concrete for s in specs)
+ args = MockMirrorArgs(all=True, exclude_file=None, exclude_specs=None)
+ mirror_specs, _ = spack.cmd.mirror._specs_and_action(args)
+ assert all(not s.concrete for s in mirror_specs)
@pytest.mark.parametrize(
"cli_args,error_str",
@@ -324,8 +440,8 @@ class TestMirrorCreate:
],
)
def test_exclude_specs_from_user(self, cli_args, not_expected, config):
- specs = spack.cmd.mirror.concrete_specs_from_user(MockMirrorArgs(**cli_args))
- assert not any(s.satisfies(y) for s in specs for y in not_expected)
+ mirror_specs, _ = spack.cmd.mirror._specs_and_action(MockMirrorArgs(**cli_args))
+ assert not any(s.satisfies(y) for s in mirror_specs for y in not_expected)
@pytest.mark.parametrize("abstract_specs", [("bowtie", "callpath")])
def test_specs_from_cli_are_the_same_as_from_file(self, abstract_specs, config, tmpdir):
@@ -407,3 +523,27 @@ def test_mirror_add_set_signed(mutable_config):
assert spack.config.get("mirrors:example") == {"url": "http://example.com", "signed": False}
mirror("set", "--signed", "example")
assert spack.config.get("mirrors:example") == {"url": "http://example.com", "signed": True}
+
+
+def test_mirror_add_set_autopush(mutable_config):
+ # Add mirror without autopush
+ mirror("add", "example", "http://example.com")
+ assert spack.config.get("mirrors:example") == "http://example.com"
+ mirror("set", "--no-autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": False}
+ mirror("set", "--autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": True}
+ mirror("set", "--no-autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": False}
+ mirror("remove", "example")
+
+ # Add mirror with autopush
+ mirror("add", "--autopush", "example", "http://example.com")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": True}
+ mirror("set", "--autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": True}
+ mirror("set", "--no-autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": False}
+ mirror("set", "--autopush", "example")
+ assert spack.config.get("mirrors:example") == {"url": "http://example.com", "autopush": True}
+ mirror("remove", "example")
diff --git a/lib/spack/spack/test/cmd/module.py b/lib/spack/spack/test/cmd/module.py
index 4c1ea78432..759d1391c9 100644
--- a/lib/spack/spack/test/cmd/module.py
+++ b/lib/spack/spack/test/cmd/module.py
@@ -11,7 +11,11 @@ import pytest
import spack.config
import spack.main
import spack.modules
+import spack.modules.lmod
+import spack.repo
+import spack.spec
import spack.store
+from spack.installer import PackageInstaller
module = spack.main.SpackCommand("module")
@@ -139,7 +143,7 @@ def test_find_recursive():
@pytest.mark.db
-def test_find_recursive_excluded(database, module_configuration):
+def test_find_recursive_excluded(mutable_database, module_configuration):
module_configuration("exclude")
module("lmod", "refresh", "-y", "--delete-tree")
@@ -147,7 +151,7 @@ def test_find_recursive_excluded(database, module_configuration):
@pytest.mark.db
-def test_loads_recursive_excluded(database, module_configuration):
+def test_loads_recursive_excluded(mutable_database, module_configuration):
module_configuration("exclude")
module("lmod", "refresh", "-y", "--delete-tree")
@@ -178,11 +182,11 @@ def test_setdefault_command(mutable_database, mutable_config):
}
}
spack.config.set("modules", data)
- # Install two different versions of a package
- other_spec, preferred = "a@1.0", "a@2.0"
+ # Install two different versions of pkg-a
+ other_spec, preferred = "pkg-a@1.0", "pkg-a@2.0"
- spack.spec.Spec(other_spec).concretized().package.do_install(fake=True)
- spack.spec.Spec(preferred).concretized().package.do_install(fake=True)
+ specs = [spack.spec.Spec(other_spec).concretized(), spack.spec.Spec(preferred).concretized()]
+ PackageInstaller([s.package for s in specs], explicit=True, fake=True).install()
writers = {
preferred: writer_cls(spack.spec.Spec(preferred).concretized(), "default"),
diff --git a/lib/spack/spack/test/cmd/pkg.py b/lib/spack/spack/test/cmd/pkg.py
index f37d66363e..8fdc89b1fd 100644
--- a/lib/spack/spack/test/cmd/pkg.py
+++ b/lib/spack/spack/test/cmd/pkg.py
@@ -10,9 +10,12 @@ import pytest
from llnl.util.filesystem import mkdirp, working_dir
+import spack.cmd
import spack.cmd.pkg
import spack.main
+import spack.paths
import spack.repo
+import spack.util.file_cache
#: new fake package template
pkg_template = """\
@@ -28,19 +31,20 @@ class {name}(Package):
pass
"""
-abc = set(("pkg-a", "pkg-b", "pkg-c"))
-abd = set(("pkg-a", "pkg-b", "pkg-d"))
+abc = {"mockpkg-a", "mockpkg-b", "mockpkg-c"}
+abd = {"mockpkg-a", "mockpkg-b", "mockpkg-d"}
# Force all tests to use a git repository *in* the mock packages repo.
@pytest.fixture(scope="module")
-def mock_pkg_git_repo(git, tmpdir_factory):
+def mock_pkg_git_repo(git, tmp_path_factory):
"""Copy the builtin.mock repo and make a mutable git repo inside it."""
- tmproot = tmpdir_factory.mktemp("mock_pkg_git_repo")
- repo_path = tmproot.join("builtin.mock")
+ root_dir = tmp_path_factory.mktemp("mock_pkg_git_repo")
+ repo_dir = root_dir / "builtin.mock"
+ shutil.copytree(spack.paths.mock_packages_path, str(repo_dir))
- shutil.copytree(spack.paths.mock_packages_path, str(repo_path))
- mock_repo = spack.repo.RepoPath(str(repo_path))
+ repo_cache = spack.util.file_cache.FileCache(str(root_dir / "cache"))
+ mock_repo = spack.repo.RepoPath(str(repo_dir), cache=repo_cache)
mock_repo_packages = mock_repo.repos[0].packages_path
with working_dir(mock_repo_packages):
@@ -53,29 +57,35 @@ def mock_pkg_git_repo(git, tmpdir_factory):
git("config", "user.name", "Spack Testing")
git("-c", "commit.gpgsign=false", "commit", "-m", "initial mock repo commit")
- # add commit with pkg-a, pkg-b, pkg-c packages
- mkdirp("pkg-a", "pkg-b", "pkg-c")
- with open("pkg-a/package.py", "w") as f:
+ # add commit with mockpkg-a, mockpkg-b, mockpkg-c packages
+ mkdirp("mockpkg-a", "mockpkg-b", "mockpkg-c")
+ with open("mockpkg-a/package.py", "w") as f:
f.write(pkg_template.format(name="PkgA"))
- with open("pkg-b/package.py", "w") as f:
+ with open("mockpkg-b/package.py", "w") as f:
f.write(pkg_template.format(name="PkgB"))
- with open("pkg-c/package.py", "w") as f:
+ with open("mockpkg-c/package.py", "w") as f:
f.write(pkg_template.format(name="PkgC"))
- git("add", "pkg-a", "pkg-b", "pkg-c")
- git("-c", "commit.gpgsign=false", "commit", "-m", "add pkg-a, pkg-b, pkg-c")
-
- # remove pkg-c, add pkg-d
- with open("pkg-b/package.py", "a") as f:
- f.write("\n# change pkg-b")
- git("add", "pkg-b")
- mkdirp("pkg-d")
- with open("pkg-d/package.py", "w") as f:
+ git("add", "mockpkg-a", "mockpkg-b", "mockpkg-c")
+ git("-c", "commit.gpgsign=false", "commit", "-m", "add mockpkg-a, mockpkg-b, mockpkg-c")
+
+ # remove mockpkg-c, add mockpkg-d
+ with open("mockpkg-b/package.py", "a") as f:
+ f.write("\n# change mockpkg-b")
+ git("add", "mockpkg-b")
+ mkdirp("mockpkg-d")
+ with open("mockpkg-d/package.py", "w") as f:
f.write(pkg_template.format(name="PkgD"))
- git("add", "pkg-d")
- git("rm", "-rf", "pkg-c")
- git("-c", "commit.gpgsign=false", "commit", "-m", "change pkg-b, remove pkg-c, add pkg-d")
-
- with spack.repo.use_repositories(str(repo_path)):
+ git("add", "mockpkg-d")
+ git("rm", "-rf", "mockpkg-c")
+ git(
+ "-c",
+ "commit.gpgsign=false",
+ "commit",
+ "-m",
+ "change mockpkg-b, remove mockpkg-c, add mockpkg-d",
+ )
+
+ with spack.repo.use_repositories(str(repo_dir)):
yield mock_repo_packages
@@ -86,12 +96,11 @@ def mock_pkg_names():
# Be sure to include virtual packages since packages with stand-alone
# tests may inherit additional tests from the virtuals they provide,
# such as packages that implement `mpi`.
- names = set(
+ return {
name
for name in repo.all_package_names(include_virtuals=True)
- if not name.startswith("pkg-")
- )
- return names
+ if not name.startswith("mockpkg-")
+ }
def split(output):
@@ -113,17 +122,17 @@ def test_mock_packages_path(mock_packages):
def test_pkg_add(git, mock_pkg_git_repo):
with working_dir(mock_pkg_git_repo):
- mkdirp("pkg-e")
- with open("pkg-e/package.py", "w") as f:
+ mkdirp("mockpkg-e")
+ with open("mockpkg-e/package.py", "w") as f:
f.write(pkg_template.format(name="PkgE"))
- pkg("add", "pkg-e")
+ pkg("add", "mockpkg-e")
with working_dir(mock_pkg_git_repo):
try:
- assert "A pkg-e/package.py" in git("status", "--short", output=str)
+ assert "A mockpkg-e/package.py" in git("status", "--short", output=str)
finally:
- shutil.rmtree("pkg-e")
+ shutil.rmtree("mockpkg-e")
# Removing a package mid-run disrupts Spack's caching
if spack.repo.PATH.repos[0]._fast_package_checker:
spack.repo.PATH.repos[0]._fast_package_checker.invalidate()
@@ -138,10 +147,10 @@ def test_pkg_list(mock_pkg_git_repo, mock_pkg_names):
assert sorted(mock_pkg_names) == sorted(out)
out = split(pkg("list", "HEAD^"))
- assert sorted(mock_pkg_names.union(["pkg-a", "pkg-b", "pkg-c"])) == sorted(out)
+ assert sorted(mock_pkg_names.union(["mockpkg-a", "mockpkg-b", "mockpkg-c"])) == sorted(out)
out = split(pkg("list", "HEAD"))
- assert sorted(mock_pkg_names.union(["pkg-a", "pkg-b", "pkg-d"])) == sorted(out)
+ assert sorted(mock_pkg_names.union(["mockpkg-a", "mockpkg-b", "mockpkg-d"])) == sorted(out)
# test with three dots to make sure pkg calls `git merge-base`
out = split(pkg("list", "HEAD^^..."))
@@ -151,25 +160,25 @@ def test_pkg_list(mock_pkg_git_repo, mock_pkg_names):
@pytest.mark.not_on_windows("stdout format conflict")
def test_pkg_diff(mock_pkg_git_repo, mock_pkg_names):
out = split(pkg("diff", "HEAD^^", "HEAD^"))
- assert out == ["HEAD^:", "pkg-a", "pkg-b", "pkg-c"]
+ assert out == ["HEAD^:", "mockpkg-a", "mockpkg-b", "mockpkg-c"]
out = split(pkg("diff", "HEAD^^", "HEAD"))
- assert out == ["HEAD:", "pkg-a", "pkg-b", "pkg-d"]
+ assert out == ["HEAD:", "mockpkg-a", "mockpkg-b", "mockpkg-d"]
out = split(pkg("diff", "HEAD^", "HEAD"))
- assert out == ["HEAD^:", "pkg-c", "HEAD:", "pkg-d"]
+ assert out == ["HEAD^:", "mockpkg-c", "HEAD:", "mockpkg-d"]
@pytest.mark.not_on_windows("stdout format conflict")
def test_pkg_added(mock_pkg_git_repo):
out = split(pkg("added", "HEAD^^", "HEAD^"))
- assert ["pkg-a", "pkg-b", "pkg-c"] == out
+ assert ["mockpkg-a", "mockpkg-b", "mockpkg-c"] == out
out = split(pkg("added", "HEAD^^", "HEAD"))
- assert ["pkg-a", "pkg-b", "pkg-d"] == out
+ assert ["mockpkg-a", "mockpkg-b", "mockpkg-d"] == out
out = split(pkg("added", "HEAD^", "HEAD"))
- assert ["pkg-d"] == out
+ assert ["mockpkg-d"] == out
out = split(pkg("added", "HEAD", "HEAD"))
assert out == []
@@ -184,7 +193,7 @@ def test_pkg_removed(mock_pkg_git_repo):
assert out == []
out = split(pkg("removed", "HEAD^", "HEAD"))
- assert out == ["pkg-c"]
+ assert out == ["mockpkg-c"]
@pytest.mark.not_on_windows("stdout format conflict")
@@ -196,34 +205,34 @@ def test_pkg_changed(mock_pkg_git_repo):
assert out == []
out = split(pkg("changed", "--type", "a", "HEAD^^", "HEAD^"))
- assert out == ["pkg-a", "pkg-b", "pkg-c"]
+ assert out == ["mockpkg-a", "mockpkg-b", "mockpkg-c"]
out = split(pkg("changed", "--type", "r", "HEAD^^", "HEAD^"))
assert out == []
out = split(pkg("changed", "--type", "ar", "HEAD^^", "HEAD^"))
- assert out == ["pkg-a", "pkg-b", "pkg-c"]
+ assert out == ["mockpkg-a", "mockpkg-b", "mockpkg-c"]
out = split(pkg("changed", "--type", "arc", "HEAD^^", "HEAD^"))
- assert out == ["pkg-a", "pkg-b", "pkg-c"]
+ assert out == ["mockpkg-a", "mockpkg-b", "mockpkg-c"]
out = split(pkg("changed", "HEAD^", "HEAD"))
- assert out == ["pkg-b"]
+ assert out == ["mockpkg-b"]
out = split(pkg("changed", "--type", "c", "HEAD^", "HEAD"))
- assert out == ["pkg-b"]
+ assert out == ["mockpkg-b"]
out = split(pkg("changed", "--type", "a", "HEAD^", "HEAD"))
- assert out == ["pkg-d"]
+ assert out == ["mockpkg-d"]
out = split(pkg("changed", "--type", "r", "HEAD^", "HEAD"))
- assert out == ["pkg-c"]
+ assert out == ["mockpkg-c"]
out = split(pkg("changed", "--type", "ar", "HEAD^", "HEAD"))
- assert out == ["pkg-c", "pkg-d"]
+ assert out == ["mockpkg-c", "mockpkg-d"]
out = split(pkg("changed", "--type", "arc", "HEAD^", "HEAD"))
- assert out == ["pkg-b", "pkg-c", "pkg-d"]
+ assert out == ["mockpkg-b", "mockpkg-c", "mockpkg-d"]
# invalid type argument
with pytest.raises(spack.main.SpackCommandError):
@@ -289,7 +298,7 @@ def test_pkg_canonical_source(mock_packages):
def test_pkg_hash(mock_packages):
- output = pkg("hash", "a", "b").strip().split()
+ output = pkg("hash", "pkg-a", "pkg-b").strip().split()
assert len(output) == 2 and all(len(elt) == 32 for elt in output)
output = pkg("hash", "multimethod").strip().split()
@@ -303,7 +312,20 @@ def test_pkg_grep(mock_packages, capfd):
output, _ = capfd.readouterr()
assert output.strip() == "\n".join(
spack.repo.PATH.get_pkg_class(name).module.__file__
- for name in ["splice-a", "splice-h", "splice-t", "splice-vh", "splice-z"]
+ for name in [
+ "depends-on-manyvariants",
+ "manyvariants",
+ "splice-a",
+ "splice-depends-on-t",
+ "splice-h",
+ "splice-t",
+ "splice-vh",
+ "splice-vt",
+ "splice-z",
+ "virtual-abi-1",
+ "virtual-abi-2",
+ "virtual-abi-multi",
+ ]
)
# ensure that this string isn't fouhnd
diff --git a/lib/spack/spack/test/cmd/providers.py b/lib/spack/spack/test/cmd/providers.py
index e979f2db47..4ea642ef32 100644
--- a/lib/spack/spack/test/cmd/providers.py
+++ b/lib/spack/spack/test/cmd/providers.py
@@ -10,8 +10,6 @@ from spack.main import SpackCommand
providers = SpackCommand("providers")
-pytestmark = pytest.mark.not_on_windows("Providers not currently supported on Windows")
-
@pytest.mark.parametrize(
"pkg",
@@ -33,7 +31,6 @@ def test_it_just_runs(pkg):
"mpilander",
"mvapich2",
"openmpi",
- "openmpi@1.6.5",
"openmpi@1.7.5:",
"openmpi@2.0.0:",
"spectrum-mpi",
diff --git a/lib/spack/spack/test/cmd/reindex.py b/lib/spack/spack/test/cmd/reindex.py
index f8c1d8b0e9..a7d6d8fda0 100644
--- a/lib/spack/spack/test/cmd/reindex.py
+++ b/lib/spack/spack/test/cmd/reindex.py
@@ -2,19 +2,17 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
-import pytest
+import shutil
import spack.store
+from spack.database import Database
+from spack.enums import InstallRecordStatus
from spack.main import SpackCommand
install = SpackCommand("install")
deprecate = SpackCommand("deprecate")
reindex = SpackCommand("reindex")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
def test_reindex_basic(mock_packages, mock_archive, mock_fetch, install_mockery):
install("libelf@0.8.13")
@@ -27,31 +25,55 @@ def test_reindex_basic(mock_packages, mock_archive, mock_fetch, install_mockery)
assert spack.store.STORE.db.query() == all_installed
-def test_reindex_db_deleted(mock_packages, mock_archive, mock_fetch, install_mockery):
+def _clear_db(tmp_path):
+ empty_db = Database(str(tmp_path))
+ with empty_db.write_transaction():
+ pass
+ shutil.rmtree(spack.store.STORE.db.database_directory)
+ shutil.copytree(empty_db.database_directory, spack.store.STORE.db.database_directory)
+ # force a re-read of the database
+ assert len(spack.store.STORE.db.query()) == 0
+
+
+def test_reindex_db_deleted(mock_packages, mock_archive, mock_fetch, install_mockery, tmp_path):
install("libelf@0.8.13")
install("libelf@0.8.12")
all_installed = spack.store.STORE.db.query()
- os.remove(spack.store.STORE.db._index_path)
+ _clear_db(tmp_path)
+
reindex()
assert spack.store.STORE.db.query() == all_installed
def test_reindex_with_deprecated_packages(
- mock_packages, mock_archive, mock_fetch, install_mockery
+ mock_packages, mock_archive, mock_fetch, install_mockery, tmp_path
):
install("libelf@0.8.13")
install("libelf@0.8.12")
deprecate("-y", "libelf@0.8.12", "libelf@0.8.13")
- all_installed = spack.store.STORE.db.query(installed=any)
- non_deprecated = spack.store.STORE.db.query(installed=True)
+ db = spack.store.STORE.db
+
+ all_installed = db.query(installed=InstallRecordStatus.ANY)
+ non_deprecated = db.query(installed=True)
+
+ _clear_db(tmp_path)
- os.remove(spack.store.STORE.db._index_path)
reindex()
- assert spack.store.STORE.db.query(installed=any) == all_installed
- assert spack.store.STORE.db.query(installed=True) == non_deprecated
+ assert db.query(installed=InstallRecordStatus.ANY) == all_installed
+ assert db.query(installed=True) == non_deprecated
+
+ old_libelf = db.query_local_by_spec_hash(
+ db.query_local("libelf@0.8.12", installed=InstallRecordStatus.ANY)[0].dag_hash()
+ )
+ new_libelf = db.query_local_by_spec_hash(
+ db.query_local("libelf@0.8.13", installed=True)[0].dag_hash()
+ )
+ assert old_libelf.deprecated_for == new_libelf.spec.dag_hash()
+ assert new_libelf.deprecated_for is None
+ assert new_libelf.ref_count == 1
diff --git a/lib/spack/spack/test/cmd/spec.py b/lib/spack/spack/test/cmd/spec.py
index 718a5e08d4..dda48de4df 100644
--- a/lib/spack/spack/test/cmd/spec.py
+++ b/lib/spack/spack/test/cmd/spec.py
@@ -7,14 +7,14 @@ import re
import pytest
+import spack.config
import spack.environment as ev
import spack.error
-import spack.parser
import spack.spec
import spack.store
from spack.main import SpackCommand, SpackCommandError
-pytestmark = pytest.mark.usefixtures("config", "mutable_mock_repo")
+pytestmark = pytest.mark.usefixtures("mutable_config", "mutable_mock_repo")
spec = SpackCommand("spec")
@@ -30,8 +30,7 @@ def test_spec():
assert "mpich@3.0.4" in output
-@pytest.mark.only_clingo("Known failure of the original concretizer")
-def test_spec_concretizer_args(mutable_config, mutable_database):
+def test_spec_concretizer_args(mutable_database, do_not_check_runtimes_on_reuse):
"""End-to-end test of CLI concretizer prefs.
It's here to make sure that everything works from CLI
@@ -58,7 +57,7 @@ def test_spec_concretizer_args(mutable_config, mutable_database):
def test_spec_parse_dependency_variant_value():
"""Verify that we can provide multiple key=value variants to multiple separate
packages within a spec string."""
- output = spec("multivalue-variant fee=barbaz ^ a foobar=baz")
+ output = spec("multivalue-variant fee=barbaz ^ pkg-a foobar=baz")
assert "fee=barbaz" in output
assert "foobar=baz" in output
@@ -97,7 +96,7 @@ def test_spec_json():
assert "mpich" in mpileaks
-def test_spec_format(database, config):
+def test_spec_format(mutable_database):
output = spec("--format", "{name}-{^mpi.name}", "mpileaks^mpich")
assert output.rstrip("\n") == "mpileaks-mpich"
@@ -143,7 +142,7 @@ def test_spec_returncode():
def test_spec_parse_error():
- with pytest.raises(spack.parser.SpecSyntaxError) as e:
+ with pytest.raises(spack.error.SpecSyntaxError) as e:
spec("1.15:")
# make sure the error is formatted properly
@@ -181,3 +180,43 @@ def test_spec_version_assigned_git_ref_as_version(name, version, error):
else:
output = spec(name + "@" + version)
assert version in output
+
+
+@pytest.mark.parametrize(
+ "unify, spec_hash_args, match, error",
+ [
+ # success cases with unfiy:true
+ (True, ["mpileaks_mpich"], "mpich", None),
+ (True, ["mpileaks_zmpi"], "zmpi", None),
+ (True, ["mpileaks_mpich", "dyninst"], "mpich", None),
+ (True, ["mpileaks_zmpi", "dyninst"], "zmpi", None),
+ # same success cases with unfiy:false
+ (False, ["mpileaks_mpich"], "mpich", None),
+ (False, ["mpileaks_zmpi"], "zmpi", None),
+ (False, ["mpileaks_mpich", "dyninst"], "mpich", None),
+ (False, ["mpileaks_zmpi", "dyninst"], "zmpi", None),
+ # cases with unfiy:false
+ (True, ["mpileaks_mpich", "mpileaks_zmpi"], "callpath, mpileaks", spack.error.SpecError),
+ (False, ["mpileaks_mpich", "mpileaks_zmpi"], "zmpi", None),
+ ],
+)
+def test_spec_unification_from_cli(
+ install_mockery, mutable_config, mutable_database, unify, spec_hash_args, match, error
+):
+ """Ensure specs grouped together on the CLI are concretized together when unify:true."""
+ spack.config.set("concretizer:unify", unify)
+
+ db = spack.store.STORE.db
+ spec_lookup = {
+ "mpileaks_mpich": db.query_one("mpileaks ^mpich").dag_hash(),
+ "mpileaks_zmpi": db.query_one("mpileaks ^zmpi").dag_hash(),
+ "dyninst": db.query_one("dyninst").dag_hash(),
+ }
+
+ hashes = [f"/{spec_lookup[name]}" for name in spec_hash_args]
+ if error:
+ with pytest.raises(error, match=match):
+ output = spec(*hashes)
+ else:
+ output = spec(*hashes)
+ assert match in output
diff --git a/lib/spack/spack/test/cmd/stage.py b/lib/spack/spack/test/cmd/stage.py
index cdca18d5e7..ba37eff0dc 100644
--- a/lib/spack/spack/test/cmd/stage.py
+++ b/lib/spack/spack/test/cmd/stage.py
@@ -10,8 +10,6 @@ import pytest
import spack.config
import spack.environment as ev
import spack.package_base
-import spack.repo
-import spack.stage
import spack.traverse
from spack.main import SpackCommand, SpackCommandError
from spack.version import Version
@@ -22,7 +20,6 @@ env = SpackCommand("env")
pytestmark = pytest.mark.usefixtures("install_mockery", "mock_packages")
-@pytest.mark.not_on_windows("not implemented on windows")
@pytest.mark.disable_clean_stage_check
def test_stage_spec(monkeypatch):
"""Verify that staging specs works."""
@@ -51,7 +48,6 @@ def check_stage_path(monkeypatch, tmpdir):
return expected_path
-@pytest.mark.not_on_windows("PermissionError")
def test_stage_path(check_stage_path):
"""Verify that --path only works with single specs."""
stage("--path={0}".format(check_stage_path), "trivial-install-test-package")
@@ -63,7 +59,6 @@ def test_stage_path_errors_multiple_specs(check_stage_path):
stage(f"--path={check_stage_path}", "trivial-install-test-package", "mpileaks")
-@pytest.mark.not_on_windows("not implemented on windows")
@pytest.mark.disable_clean_stage_check
def test_stage_with_env_outside_env(mutable_mock_env_path, monkeypatch):
"""Verify that stage concretizes specs not in environment instead of erroring."""
@@ -82,7 +77,6 @@ def test_stage_with_env_outside_env(mutable_mock_env_path, monkeypatch):
stage("trivial-install-test-package")
-@pytest.mark.not_on_windows("not implemented on windows")
@pytest.mark.disable_clean_stage_check
def test_stage_with_env_inside_env(mutable_mock_env_path, monkeypatch):
"""Verify that stage filters specs in environment instead of reconcretizing."""
@@ -101,7 +95,6 @@ def test_stage_with_env_inside_env(mutable_mock_env_path, monkeypatch):
stage("mpileaks")
-@pytest.mark.not_on_windows("not implemented on windows")
@pytest.mark.disable_clean_stage_check
def test_stage_full_env(mutable_mock_env_path, monkeypatch):
"""Verify that stage filters specs in environment."""
diff --git a/lib/spack/spack/test/cmd/style.py b/lib/spack/spack/test/cmd/style.py
index afdb3dbb1f..ee33de9b4b 100644
--- a/lib/spack/spack/test/cmd/style.py
+++ b/lib/spack/spack/test/cmd/style.py
@@ -4,17 +4,21 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import filecmp
+import io
import os
+import pathlib
import shutil
+import sys
import pytest
from llnl.util.filesystem import FileFilter
+import spack.cmd.style
import spack.main
import spack.paths
import spack.repo
-from spack.cmd.style import changed_files
+from spack.cmd.style import _run_import_check, changed_files
from spack.util.executable import which
#: directory with sample style files
@@ -24,6 +28,12 @@ style_data = os.path.join(spack.paths.test_path, "data", "style")
style = spack.main.SpackCommand("style")
+ISORT = which("isort")
+BLACK = which("black")
+FLAKE8 = which("flake8")
+MYPY = which("mypy")
+
+
@pytest.fixture(autouse=True)
def has_develop_branch(git):
"""spack style requires git and a develop branch to run -- skip if we're missing either."""
@@ -38,7 +48,7 @@ def flake8_package(tmpdir):
change to the ``flake8`` mock package, yields the filename, then undoes the
change on cleanup.
"""
- repo = spack.repo.Repo(spack.paths.mock_packages_path)
+ repo = spack.repo.from_path(spack.paths.mock_packages_path)
filename = repo.filename_for_package_name("flake8")
rel_path = os.path.dirname(os.path.relpath(filename, spack.paths.prefix))
tmp = tmpdir / rel_path / "flake8-ci-package.py"
@@ -54,7 +64,7 @@ def flake8_package(tmpdir):
@pytest.fixture
def flake8_package_with_errors(scope="function"):
"""A flake8 package with errors."""
- repo = spack.repo.Repo(spack.paths.mock_packages_path)
+ repo = spack.repo.from_path(spack.paths.mock_packages_path)
filename = repo.filename_for_package_name("flake8")
tmp = filename + ".tmp"
@@ -130,7 +140,7 @@ def test_changed_files_all_files():
assert os.path.join(spack.paths.module_path, "spec.py") in files
# a mock package
- repo = spack.repo.Repo(spack.paths.mock_packages_path)
+ repo = spack.repo.from_path(spack.paths.mock_packages_path)
filename = repo.filename_for_package_name("flake8")
assert filename in files
@@ -190,8 +200,8 @@ def external_style_root(git, flake8_package_with_errors, tmpdir):
yield tmpdir, py_file
-@pytest.mark.skipif(not which("isort"), reason="isort is not installed.")
-@pytest.mark.skipif(not which("black"), reason="black is not installed.")
+@pytest.mark.skipif(not ISORT, reason="isort is not installed.")
+@pytest.mark.skipif(not BLACK, reason="black is not installed.")
def test_fix_style(external_style_root):
"""Make sure spack style --fix works."""
tmpdir, py_file = external_style_root
@@ -209,10 +219,10 @@ def test_fix_style(external_style_root):
assert filecmp.cmp(broken_py, fixed_py)
-@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
-@pytest.mark.skipif(not which("isort"), reason="isort is not installed.")
-@pytest.mark.skipif(not which("mypy"), reason="mypy is not installed.")
-@pytest.mark.skipif(not which("black"), reason="black is not installed.")
+@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.")
+@pytest.mark.skipif(not ISORT, reason="isort is not installed.")
+@pytest.mark.skipif(not MYPY, reason="mypy is not installed.")
+@pytest.mark.skipif(not BLACK, reason="black is not installed.")
def test_external_root(external_style_root, capfd):
"""Ensure we can run in a separate root directory w/o configuration files."""
tmpdir, py_file = external_style_root
@@ -238,7 +248,7 @@ def test_external_root(external_style_root, capfd):
assert "lib/spack/spack/dummy.py:7: [F401] 'os' imported but unused" in output
-@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
+@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.")
def test_style(flake8_package, tmpdir):
root_relative = os.path.relpath(flake8_package, spack.paths.prefix)
@@ -264,7 +274,7 @@ def test_style(flake8_package, tmpdir):
assert "spack style checks were clean" in output
-@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
+@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.")
def test_style_with_errors(flake8_package_with_errors):
root_relative = os.path.relpath(flake8_package_with_errors, spack.paths.prefix)
output = style(
@@ -275,8 +285,8 @@ def test_style_with_errors(flake8_package_with_errors):
assert "spack style found errors" in output
-@pytest.mark.skipif(not which("black"), reason="black is not installed.")
-@pytest.mark.skipif(not which("flake8"), reason="flake8 is not installed.")
+@pytest.mark.skipif(not BLACK, reason="black is not installed.")
+@pytest.mark.skipif(not FLAKE8, reason="flake8 is not installed.")
def test_style_with_black(flake8_package_with_errors):
output = style("--tool", "black,flake8", flake8_package_with_errors, fail_on_error=False)
assert "black found errors" in output
@@ -285,5 +295,114 @@ def test_style_with_black(flake8_package_with_errors):
def test_skip_tools():
- output = style("--skip", "isort,mypy,black,flake8")
+ output = style("--skip", "import,isort,mypy,black,flake8")
assert "Nothing to run" in output
+
+
+@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires Python 3.9+")
+def test_run_import_check(tmp_path: pathlib.Path):
+ file = tmp_path / "issues.py"
+ contents = '''
+import spack.cmd
+import spack.config # do not drop this import because of this comment
+
+# this comment about spack.error should not be removed
+class Example(spack.build_systems.autotools.AutotoolsPackage):
+ """this is a docstring referencing unused spack.error.SpackError, which is fine"""
+ pass
+
+def foo(config: "spack.error.SpackError"):
+ # the type hint is quoted, so it should not be removed
+ spack.util.executable.Executable("example")
+ print(spack.__version__)
+'''
+ file.write_text(contents)
+ root = str(tmp_path)
+ output_buf = io.StringIO()
+ exit_code = _run_import_check(
+ [str(file)],
+ fix=False,
+ out=output_buf,
+ root_relative=False,
+ root=spack.paths.prefix,
+ working_dir=root,
+ )
+ output = output_buf.getvalue()
+
+ assert "issues.py: redundant import: spack.cmd" in output
+ assert "issues.py: redundant import: spack.config" not in output # comment prevents removal
+ assert "issues.py: missing import: spack" in output # used by spack.__version__
+ assert "issues.py: missing import: spack.build_systems.autotools" in output
+ assert "issues.py: missing import: spack.util.executable" in output
+ assert "issues.py: missing import: spack.error" not in output # not directly used
+ assert exit_code == 1
+ assert file.read_text() == contents # fix=False should not change the file
+
+ # run it with --fix, should have the same output.
+ output_buf = io.StringIO()
+ exit_code = _run_import_check(
+ [str(file)],
+ fix=True,
+ out=output_buf,
+ root_relative=False,
+ root=spack.paths.prefix,
+ working_dir=root,
+ )
+ output = output_buf.getvalue()
+ assert exit_code == 1
+ assert "issues.py: redundant import: spack.cmd" in output
+ assert "issues.py: missing import: spack" in output
+ assert "issues.py: missing import: spack.build_systems.autotools" in output
+ assert "issues.py: missing import: spack.util.executable" in output
+
+ # after fix a second fix is idempotent
+ output_buf = io.StringIO()
+ exit_code = _run_import_check(
+ [str(file)],
+ fix=True,
+ out=output_buf,
+ root_relative=False,
+ root=spack.paths.prefix,
+ working_dir=root,
+ )
+ output = output_buf.getvalue()
+ assert exit_code == 0
+ assert not output
+
+ # check that the file was fixed
+ new_contents = file.read_text()
+ assert "import spack.cmd" not in new_contents
+ assert "import spack\n" in new_contents
+ assert "import spack.build_systems.autotools\n" in new_contents
+ assert "import spack.util.executable\n" in new_contents
+
+
+@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires Python 3.9+")
+def test_run_import_check_syntax_error_and_missing(tmp_path: pathlib.Path):
+ (tmp_path / "syntax-error.py").write_text("""this 'is n(ot python code""")
+ output_buf = io.StringIO()
+ exit_code = _run_import_check(
+ [str(tmp_path / "syntax-error.py"), str(tmp_path / "missing.py")],
+ fix=False,
+ out=output_buf,
+ root_relative=True,
+ root=str(tmp_path),
+ working_dir=str(tmp_path / "does-not-matter"),
+ )
+ output = output_buf.getvalue()
+ assert "syntax-error.py: could not parse" in output
+ assert "missing.py: could not parse" in output
+ assert exit_code == 1
+
+
+def test_case_sensitive_imports(tmp_path: pathlib.Path):
+ # example.Example is a name, while example.example is a module.
+ (tmp_path / "lib" / "spack" / "example").mkdir(parents=True)
+ (tmp_path / "lib" / "spack" / "example" / "__init__.py").write_text("class Example:\n pass")
+ (tmp_path / "lib" / "spack" / "example" / "example.py").write_text("foo = 1")
+ assert spack.cmd.style._module_part(str(tmp_path), "example.Example") == "example"
+
+
+def test_pkg_imports():
+ assert spack.cmd.style._module_part(spack.paths.prefix, "spack.pkg.builtin.boost") is None
+ assert spack.cmd.style._module_part(spack.paths.prefix, "spack.pkg") is None
diff --git a/lib/spack/spack/test/cmd/tags.py b/lib/spack/spack/test/cmd/tags.py
index 7de107c923..0e8e7f0165 100644
--- a/lib/spack/spack/test/cmd/tags.py
+++ b/lib/spack/spack/test/cmd/tags.py
@@ -6,6 +6,7 @@
import spack.main
import spack.repo
import spack.spec
+from spack.installer import PackageInstaller
tags = spack.main.SpackCommand("tags")
@@ -48,7 +49,7 @@ def test_tags_no_tags(monkeypatch):
def test_tags_installed(install_mockery, mock_fetch):
s = spack.spec.Spec("mpich").concretized()
- s.package.do_install()
+ PackageInstaller([s.package], explicit=True, fake=True).install()
out = tags("-i")
for tag in ["tag1", "tag2"]:
diff --git a/lib/spack/spack/test/cmd/test.py b/lib/spack/spack/test/cmd/test.py
index 3ed5077c78..866d579aa7 100644
--- a/lib/spack/spack/test/cmd/test.py
+++ b/lib/spack/spack/test/cmd/test.py
@@ -10,11 +10,12 @@ import pytest
from llnl.util.filesystem import copy_tree
-import spack.cmd.install
+import spack.cmd.common.arguments
+import spack.cmd.test
import spack.config
-import spack.package_base
+import spack.install_test
import spack.paths
-import spack.store
+import spack.spec
from spack.install_test import TestStatus
from spack.main import SpackCommand
@@ -25,13 +26,7 @@ pytestmark = pytest.mark.not_on_windows("does not run on windows")
def test_test_package_not_installed(
- tmpdir,
- mock_packages,
- mock_archive,
- mock_fetch,
- config,
- install_mockery_mutable_config,
- mock_test_stage,
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery, mock_test_stage
):
output = spack_test("run", "libdwarf")
@@ -54,7 +49,7 @@ def test_test_dirty_flag(arguments, expected):
def test_test_dup_alias(
- mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config, capfd
+ mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery, capfd
):
"""Ensure re-using an alias fails with suggestion to change."""
install("libdwarf")
@@ -69,9 +64,7 @@ def test_test_dup_alias(
assert "already exists" in out and "Try another alias" in out
-def test_test_output(
- mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config
-):
+def test_test_output(mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery):
"""Ensure output printed from pkgs is captured by output redirection."""
install("printing-package")
spack_test("run", "--alias", "printpkg", "printing-package")
@@ -97,13 +90,7 @@ def test_test_output(
"pkg_name,failure", [("test-error", "exited with status 1"), ("test-fail", "not callable")]
)
def test_test_output_fails(
- mock_packages,
- mock_archive,
- mock_fetch,
- install_mockery_mutable_config,
- mock_test_stage,
- pkg_name,
- failure,
+ mock_packages, mock_archive, mock_fetch, install_mockery, mock_test_stage, pkg_name, failure
):
"""Confirm stand-alone test failure with expected outputs."""
install(pkg_name)
@@ -117,9 +104,7 @@ def test_test_output_fails(
assert "See test log for details" in out
-@pytest.mark.usefixtures(
- "mock_packages", "mock_archive", "mock_fetch", "install_mockery_mutable_config"
-)
+@pytest.mark.usefixtures("mock_packages", "mock_archive", "mock_fetch", "install_mockery")
@pytest.mark.parametrize(
"pkg_name,msgs",
[
@@ -153,13 +138,7 @@ def test_junit_output_with_failures(tmpdir, mock_test_stage, pkg_name, msgs):
def test_cdash_output_test_error(
- tmpdir,
- mock_fetch,
- install_mockery_mutable_config,
- mock_packages,
- mock_archive,
- mock_test_stage,
- capfd,
+ tmpdir, mock_fetch, install_mockery, mock_packages, mock_archive, mock_test_stage, capfd
):
"""Confirm stand-alone test error expected outputs in CDash reporting."""
install("test-error")
@@ -179,12 +158,7 @@ def test_cdash_output_test_error(
def test_cdash_upload_clean_test(
- tmpdir,
- mock_fetch,
- install_mockery_mutable_config,
- mock_packages,
- mock_archive,
- mock_test_stage,
+ tmpdir, mock_fetch, install_mockery, mock_packages, mock_archive, mock_test_stage
):
install("printing-package")
with tmpdir.as_cwd():
@@ -220,7 +194,11 @@ def test_test_list_all(mock_packages):
assert set(pkgs) == set(
[
"fail-test-audit",
+ "fail-test-audit-deprecated",
+ "fail-test-audit-docstring",
+ "fail-test-audit-impl",
"mpich",
+ "perl-extension",
"printing-package",
"py-extension1",
"py-extension2",
@@ -232,7 +210,7 @@ def test_test_list_all(mock_packages):
)
-def test_test_list(mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config):
+def test_test_list(mock_packages, mock_archive, mock_fetch, install_mockery):
pkg_with_tests = "printing-package"
install(pkg_with_tests)
output = spack_test("list")
@@ -298,7 +276,7 @@ def test_test_results_status(mock_packages, mock_test_stage, status):
@pytest.mark.regression("35337")
-def test_report_filename_for_cdash(install_mockery_mutable_config, mock_fetch):
+def test_report_filename_for_cdash(install_mockery, mock_fetch):
"""Test that the temporary file used to write Testing.xml for CDash is not the upload URL"""
name = "trivial"
spec = spack.spec.Spec("trivial-smoke-test").concretized()
@@ -321,7 +299,7 @@ def test_report_filename_for_cdash(install_mockery_mutable_config, mock_fetch):
def test_test_output_multiple_specs(
- mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config
+ mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery
):
"""Ensure proper reporting for suite with skipped, failing, and passed tests."""
install("test-error", "simple-standalone-test@0.9", "simple-standalone-test@1.0")
diff --git a/lib/spack/spack/test/cmd/undevelop.py b/lib/spack/spack/test/cmd/undevelop.py
index 9b5a2a5692..684a9f5019 100644
--- a/lib/spack/spack/test/cmd/undevelop.py
+++ b/lib/spack/spack/test/cmd/undevelop.py
@@ -2,10 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
-import pytest
-
import spack.environment as ev
import spack.spec
from spack.main import SpackCommand
@@ -14,8 +10,6 @@ undevelop = SpackCommand("undevelop")
env = SpackCommand("env")
concretize = SpackCommand("concretize")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
-
def test_undevelop(tmpdir, mutable_config, mock_packages, mutable_mock_env_path):
# setup environment
diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py
index f3eca94d65..6ac74b8abc 100644
--- a/lib/spack/spack/test/cmd/uninstall.py
+++ b/lib/spack/spack/test/cmd/uninstall.py
@@ -11,6 +11,7 @@ import llnl.util.tty as tty
import spack.cmd.uninstall
import spack.environment
import spack.store
+from spack.enums import InstallRecordStatus
from spack.main import SpackCommand, SpackCommandError
uninstall = SpackCommand("uninstall")
@@ -129,10 +130,10 @@ def test_force_uninstall_and_reinstall_by_hash(mutable_database):
specs = spack.store.STORE.db.get_by_hash(dag_hash[:7], installed=installed)
assert len(specs) == 1 and specs[0] == callpath_spec
- specs = spack.store.STORE.db.get_by_hash(dag_hash, installed=any)
+ specs = spack.store.STORE.db.get_by_hash(dag_hash, installed=InstallRecordStatus.ANY)
assert len(specs) == 1 and specs[0] == callpath_spec
- specs = spack.store.STORE.db.get_by_hash(dag_hash[:7], installed=any)
+ specs = spack.store.STORE.db.get_by_hash(dag_hash[:7], installed=InstallRecordStatus.ANY)
assert len(specs) == 1 and specs[0] == callpath_spec
specs = spack.store.STORE.db.get_by_hash(dag_hash, installed=not installed)
@@ -147,7 +148,7 @@ def test_force_uninstall_and_reinstall_by_hash(mutable_database):
spec = spack.store.STORE.db.query_one("callpath ^mpich", installed=installed)
assert spec == callpath_spec
- spec = spack.store.STORE.db.query_one("callpath ^mpich", installed=any)
+ spec = spack.store.STORE.db.query_one("callpath ^mpich", installed=InstallRecordStatus.ANY)
assert spec == callpath_spec
spec = spack.store.STORE.db.query_one("callpath ^mpich", installed=not installed)
@@ -205,7 +206,6 @@ def test_in_memory_consistency_when_uninstalling(mutable_database, monkeypatch):
# Note: I want to use https://docs.pytest.org/en/7.1.x/how-to/skipping.html#skip-all-test-functions-of-a-class-or-module
# the style formatter insists on separating these two lines.
-@pytest.mark.not_on_windows("Envs unsupported on Windows")
class TestUninstallFromEnv:
"""Tests an installation with two environments e1 and e2, which each have
shared package installations:
@@ -222,7 +222,7 @@ class TestUninstallFromEnv:
@pytest.fixture(scope="function")
def environment_setup(
- self, mutable_mock_env_path, config, mock_packages, mutable_database, install_mockery
+ self, mutable_mock_env_path, mock_packages, mutable_database, install_mockery
):
TestUninstallFromEnv.env("create", "e1")
e1 = spack.environment.read("e1")
diff --git a/lib/spack/spack/test/cmd/url.py b/lib/spack/spack/test/cmd/url.py
index 4d970ddd97..e29253299a 100644
--- a/lib/spack/spack/test/cmd/url.py
+++ b/lib/spack/spack/test/cmd/url.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
-import sys
import pytest
@@ -98,13 +97,9 @@ def test_url_list(mock_packages):
def test_url_summary(mock_packages):
"""Test the URL summary command."""
# test url_summary, the internal function that does the work
- (
- total_urls,
- correct_names,
- correct_versions,
- name_count_dict,
- version_count_dict,
- ) = url_summary(None)
+ (total_urls, correct_names, correct_versions, name_count_dict, version_count_dict) = (
+ url_summary(None)
+ )
assert 0 < correct_names <= sum(name_count_dict.values()) <= total_urls
assert 0 < correct_versions <= sum(version_count_dict.values()) <= total_urls
@@ -121,7 +116,6 @@ def test_url_summary(mock_packages):
assert out_correct_versions == correct_versions
-@pytest.mark.skipif(sys.platform.startswith("win"), reason="Unsupported on Windows for now")
def test_url_stats(capfd, mock_packages):
with capfd.disabled():
output = url("stats")
diff --git a/lib/spack/spack/test/cmd/verify.py b/lib/spack/spack/test/cmd/verify.py
index 0ac3c136c0..53b57cd790 100644
--- a/lib/spack/spack/test/cmd/verify.py
+++ b/lib/spack/spack/test/cmd/verify.py
@@ -63,9 +63,7 @@ def test_single_file_verify_cmd(tmpdir):
assert sorted(errors) == sorted(expected)
-def test_single_spec_verify_cmd(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_single_spec_verify_cmd(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery):
# Test the verify command interface to verify a single spec
install("libelf")
s = spack.spec.Spec("libelf").concretized()
diff --git a/lib/spack/spack/test/cmd/versions.py b/lib/spack/spack/test/cmd/versions.py
index 8506be8221..542365dacb 100644
--- a/lib/spack/spack/test/cmd/versions.py
+++ b/lib/spack/spack/test/cmd/versions.py
@@ -11,13 +11,6 @@ from spack.version import Version
versions = SpackCommand("versions")
-def test_safe_only_versions():
- """Only test the safe versions of a package.
- (Using the deprecated command line argument)
- """
- versions("--safe-only", "zlib")
-
-
def test_safe_versions():
"""Only test the safe versions of a package."""
diff --git a/lib/spack/spack/test/cmd/view.py b/lib/spack/spack/test/cmd/view.py
index eaf6999868..1c405728b4 100644
--- a/lib/spack/spack/test/cmd/view.py
+++ b/lib/spack/spack/test/cmd/view.py
@@ -4,10 +4,14 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
+import sys
import pytest
+from llnl.util.symlink import _windows_can_symlink
+
import spack.util.spack_yaml as s_yaml
+from spack.installer import PackageInstaller
from spack.main import SpackCommand
from spack.spec import Spec
@@ -15,7 +19,16 @@ extensions = SpackCommand("extensions")
install = SpackCommand("install")
view = SpackCommand("view")
-pytestmark = pytest.mark.not_on_windows("does not run on windows")
+if sys.platform == "win32":
+ if not _windows_can_symlink():
+ pytest.skip(
+ "Windows must be able to create symlinks to run tests.", allow_module_level=True
+ )
+ # TODO: Skipping hardlink command testing on windows until robust checks can be added.
+ # See https://github.com/spack/spack/pull/46335#discussion_r1757411915
+ commands = ["symlink", "add", "copy", "relocate"]
+else:
+ commands = ["hardlink", "symlink", "hard", "add", "copy", "relocate"]
def create_projection_file(tmpdir, projection):
@@ -27,10 +40,8 @@ def create_projection_file(tmpdir, projection):
return projection_file
-@pytest.mark.parametrize("cmd", ["hardlink", "symlink", "hard", "add", "copy", "relocate"])
-def test_view_link_type(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd
-):
+@pytest.mark.parametrize("cmd", commands)
+def test_view_link_type(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery, cmd):
install("libdwarf")
viewpath = str(tmpdir.mkdir("view_{0}".format(cmd)))
view(cmd, viewpath, "libdwarf")
@@ -42,9 +53,9 @@ def test_view_link_type(
assert os.path.islink(package_prefix) == is_link_cmd
-@pytest.mark.parametrize("add_cmd", ["hardlink", "symlink", "hard", "add", "copy", "relocate"])
+@pytest.mark.parametrize("add_cmd", commands)
def test_view_link_type_remove(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, add_cmd
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery, add_cmd
):
install("needs-relocation")
viewpath = str(tmpdir.mkdir("view_{0}".format(add_cmd)))
@@ -56,10 +67,8 @@ def test_view_link_type_remove(
assert not os.path.exists(bindir)
-@pytest.mark.parametrize("cmd", ["hardlink", "symlink", "hard", "add", "copy", "relocate"])
-def test_view_projections(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd
-):
+@pytest.mark.parametrize("cmd", commands)
+def test_view_projections(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery, cmd):
install("libdwarf@20130207")
viewpath = str(tmpdir.mkdir("view_{0}".format(cmd)))
@@ -76,7 +85,7 @@ def test_view_projections(
def test_view_multiple_projections(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery
):
install("libdwarf@20130207")
install("extendee@1.0%gcc")
@@ -96,7 +105,7 @@ def test_view_multiple_projections(
def test_view_multiple_projections_all_first(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery
):
install("libdwarf@20130207")
install("extendee@1.0%gcc")
@@ -115,14 +124,14 @@ def test_view_multiple_projections_all_first(
assert os.path.exists(extendee_prefix)
-def test_view_external(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery):
+def test_view_external(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery):
install("externaltool")
viewpath = str(tmpdir.mkdir("view"))
output = view("symlink", viewpath, "externaltool")
assert "Skipping external package: externaltool" in output
-def test_view_extension(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery):
+def test_view_extension(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery):
install("extendee")
install("extension1@1.0")
install("extension1@2.0")
@@ -136,9 +145,7 @@ def test_view_extension(tmpdir, mock_packages, mock_archive, mock_fetch, config,
assert os.path.exists(os.path.join(viewpath, "bin", "extension1"))
-def test_view_extension_remove(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_view_extension_remove(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery):
install("extendee")
install("extension1@1.0")
viewpath = str(tmpdir.mkdir("view"))
@@ -149,9 +156,7 @@ def test_view_extension_remove(
assert not os.path.exists(os.path.join(viewpath, "bin", "extension1"))
-def test_view_extension_conflict(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
-):
+def test_view_extension_conflict(tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery):
install("extendee")
install("extension1@1.0")
install("extension1@2.0")
@@ -162,7 +167,7 @@ def test_view_extension_conflict(
def test_view_extension_conflict_ignored(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery
):
install("extendee")
install("extension1@1.0")
@@ -184,14 +189,14 @@ def test_view_fails_with_missing_projections_file(tmpdir):
@pytest.mark.parametrize("with_projection", [False, True])
@pytest.mark.parametrize("cmd", ["symlink", "copy"])
def test_view_files_not_ignored(
- tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd, with_projection
+ tmpdir, mock_packages, mock_archive, mock_fetch, install_mockery, cmd, with_projection
):
spec = Spec("view-not-ignored").concretized()
pkg = spec.package
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
pkg.assert_installed(spec.prefix)
- install("view-dir-file") # Arbitrary package to add noise
+ install("view-file") # Arbitrary package to add noise
viewpath = str(tmpdir.mkdir("view_{0}".format(cmd)))
@@ -205,7 +210,7 @@ def test_view_files_not_ignored(
prefix_in_view = viewpath
args = []
- view(cmd, *(args + [viewpath, "view-not-ignored", "view-dir-file"]))
+ view(cmd, *(args + [viewpath, "view-not-ignored", "view-file"]))
pkg.assert_installed(prefix_in_view)
view("remove", viewpath, "view-not-ignored")
diff --git a/lib/spack/spack/test/cmd_extensions.py b/lib/spack/spack/test/cmd_extensions.py
index 8af8972859..fe2ab2c70b 100644
--- a/lib/spack/spack/test/cmd_extensions.py
+++ b/lib/spack/spack/test/cmd_extensions.py
@@ -103,9 +103,9 @@ def hello_world_with_module_in_root(extension_creator):
@contextlib.contextmanager
def _hwwmir(extension_name=None):
- with extension_creator(
- extension_name
- ) if extension_name else extension_creator() as extension:
+ with (
+ extension_creator(extension_name) if extension_name else extension_creator()
+ ) as extension:
# Note that the namespace of the extension is derived from the
# fixture.
extension.add_command(
@@ -210,7 +210,7 @@ def test_missing_command():
"""Ensure that we raise the expected exception if the desired command is
not present.
"""
- with pytest.raises(spack.extensions.CommandNotFoundError):
+ with pytest.raises(spack.cmd.CommandNotFoundError):
spack.cmd.get_module("no-such-command")
@@ -220,9 +220,9 @@ def test_missing_command():
("/my/bad/extension", spack.extensions.ExtensionNamingError),
("", spack.extensions.ExtensionNamingError),
("/my/bad/spack--extra-hyphen", spack.extensions.ExtensionNamingError),
- ("/my/good/spack-extension", spack.extensions.CommandNotFoundError),
- ("/my/still/good/spack-extension/", spack.extensions.CommandNotFoundError),
- ("/my/spack-hyphenated-extension", spack.extensions.CommandNotFoundError),
+ ("/my/good/spack-extension", spack.cmd.CommandNotFoundError),
+ ("/my/still/good/spack-extension/", spack.cmd.CommandNotFoundError),
+ ("/my/spack-hyphenated-extension", spack.cmd.CommandNotFoundError),
],
ids=["no_stem", "vacuous", "leading_hyphen", "basic_good", "trailing_slash", "hyphenated"],
)
diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py
index b0bd0b4026..14567745fa 100644
--- a/lib/spack/spack/test/compilers/basics.py
+++ b/lib/spack/spack/test/compilers/basics.py
@@ -3,38 +3,23 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Test basic behavior of compilers in Spack"""
+import json
import os
from copy import copy
+from typing import Optional
import pytest
import llnl.util.filesystem as fs
import spack.compiler
-import spack.compilers as compilers
+import spack.compilers
+import spack.config
import spack.spec
-import spack.util.environment
+import spack.util.module_cmd
from spack.compiler import Compiler
-from spack.util.executable import ProcessError
-
-
-@pytest.fixture()
-def make_args_for_version(monkeypatch):
- def _factory(version, path="/usr/bin/gcc"):
- class MockOs:
- pass
-
- compiler_name = "gcc"
- compiler_cls = compilers.class_for_compiler_name(compiler_name)
- monkeypatch.setattr(compiler_cls, "cc_version", lambda x: version)
-
- compiler_id = compilers.CompilerID(os=MockOs, compiler_name=compiler_name, version=None)
- variation = compilers.NameVariation(prefix="", suffix="")
- return compilers.DetectVersionArgs(
- id=compiler_id, variation=variation, language="cc", path=path
- )
-
- return _factory
+from spack.util.executable import Executable, ProcessError
+from spack.util.file_cache import FileCache
def test_multiple_conflicting_compiler_definitions(mutable_config):
@@ -56,45 +41,10 @@ def test_multiple_conflicting_compiler_definitions(mutable_config):
mutable_config.update_config("compilers", compiler_config)
arch_spec = spack.spec.ArchSpec(("test", "test", "test"))
- cmp = compilers.compiler_for_spec("clang@=0.0.0", arch_spec)
+ cmp = spack.compilers.compiler_for_spec("clang@=0.0.0", arch_spec)
assert cmp.f77 == "f77"
-def test_get_compiler_duplicates(config):
- # In this case there is only one instance of the specified compiler in
- # the test configuration (so it is not actually a duplicate), but the
- # method behaves the same.
- cfg_file_to_duplicates = compilers.get_compiler_duplicates(
- "gcc@4.5.0", spack.spec.ArchSpec("cray-CNL-xeon")
- )
-
- assert len(cfg_file_to_duplicates) == 1
- cfg_file, duplicates = next(iter(cfg_file_to_duplicates.items()))
- assert len(duplicates) == 1
-
-
-def test_all_compilers(config):
- all_compilers = compilers.all_compilers()
- filtered = [x for x in all_compilers if str(x.spec) == "clang@=3.3"]
- filtered = [x for x in filtered if x.operating_system == "SuSE11"]
- assert len(filtered) == 1
-
-
-@pytest.mark.parametrize(
- "input_version,expected_version,expected_error",
- [(None, None, "Couldn't get version for compiler /usr/bin/gcc"), ("4.9", "4.9", None)],
-)
-def test_version_detection_is_empty(
- make_args_for_version, input_version, expected_version, expected_error
-):
- args = make_args_for_version(version=input_version)
- result, error = compilers.detect_version(args)
- if not error:
- assert result.id.version == expected_version
-
- assert error == expected_error
-
-
def test_compiler_flags_from_config_are_grouped():
compiler_entry = {
"spec": "intel@17.0.2",
@@ -104,7 +54,7 @@ def test_compiler_flags_from_config_are_grouped():
"modules": None,
}
- compiler = compilers.compiler_from_dict(compiler_entry)
+ compiler = spack.compilers.compiler_from_dict(compiler_entry)
assert any(x == "-foo-flag foo-val" for x in compiler.flags["cflags"])
@@ -136,14 +86,6 @@ class MockCompiler(Compiler):
environment={},
)
- def _get_compiler_link_paths(self, paths):
- # Mock os.path.isdir so the link paths don't have to exist
- old_isdir = os.path.isdir
- os.path.isdir = lambda x: True
- ret = super()._get_compiler_link_paths(paths)
- os.path.isdir = old_isdir
- return ret
-
@property
def name(self):
return "mockcompiler"
@@ -161,103 +103,91 @@ class MockCompiler(Compiler):
required_libs = ["libgfortran"]
+@pytest.mark.not_on_windows("Not supported on Windows (yet)")
def test_implicit_rpaths(dirs_with_libfiles, monkeypatch):
lib_to_dirs, all_dirs = dirs_with_libfiles
+ monkeypatch.setattr(
+ MockCompiler,
+ "_compile_dummy_c_source",
+ lambda self: "ld " + " ".join(f"-L{d}" for d in all_dirs),
+ )
+ retrieved_rpaths = MockCompiler().implicit_rpaths()
+ assert set(retrieved_rpaths) == set(lib_to_dirs["libstdc++"] + lib_to_dirs["libgfortran"])
- def try_all_dirs(*args):
- return all_dirs
-
- monkeypatch.setattr(MockCompiler, "_get_compiler_link_paths", try_all_dirs)
-
- expected_rpaths = set(lib_to_dirs["libstdc++"] + lib_to_dirs["libgfortran"])
-
- compiler = MockCompiler()
- retrieved_rpaths = compiler.implicit_rpaths()
- assert set(retrieved_rpaths) == expected_rpaths
-
-
-no_flag_dirs = ["/path/to/first/lib", "/path/to/second/lib64"]
-no_flag_output = "ld -L%s -L%s" % tuple(no_flag_dirs)
-flag_dirs = ["/path/to/first/with/flag/lib", "/path/to/second/lib64"]
-flag_output = "ld -L%s -L%s" % tuple(flag_dirs)
+without_flag_output = "ld -L/path/to/first/lib -L/path/to/second/lib64"
+with_flag_output = "ld -L/path/to/first/with/flag/lib -L/path/to/second/lib64"
def call_compiler(exe, *args, **kwargs):
# This method can replace Executable.__call__ to emulate a compiler that
# changes libraries depending on a flag.
if "--correct-flag" in exe.exe:
- return flag_output
- return no_flag_output
+ return with_flag_output
+ return without_flag_output
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
@pytest.mark.parametrize(
"exe,flagname",
[
- ("cxx", ""),
("cxx", "cxxflags"),
("cxx", "cppflags"),
("cxx", "ldflags"),
- ("cc", ""),
("cc", "cflags"),
("cc", "cppflags"),
- ("fc", ""),
- ("fc", "fflags"),
- ("f77", "fflags"),
- ("f77", "cppflags"),
],
)
-@pytest.mark.enable_compiler_link_paths
-def test_get_compiler_link_paths(monkeypatch, exe, flagname):
+@pytest.mark.enable_compiler_execution
+def test_compile_dummy_c_source_adds_flags(monkeypatch, exe, flagname):
# create fake compiler that emits mock verbose output
compiler = MockCompiler()
- monkeypatch.setattr(spack.util.executable.Executable, "__call__", call_compiler)
-
- # Grab executable path to test
- paths = [getattr(compiler, exe)]
+ monkeypatch.setattr(Executable, "__call__", call_compiler)
+
+ if exe == "cxx":
+ compiler.cc = None
+ compiler.fc = None
+ compiler.f77 = None
+ elif exe == "cc":
+ compiler.cxx = None
+ compiler.fc = None
+ compiler.f77 = None
+ else:
+ assert False
# Test without flags
- dirs = compiler._get_compiler_link_paths(paths)
- assert dirs == no_flag_dirs
+ assert compiler._compile_dummy_c_source() == without_flag_output
if flagname:
# set flags and test
- setattr(compiler, "flags", {flagname: ["--correct-flag"]})
- dirs = compiler._get_compiler_link_paths(paths)
- assert dirs == flag_dirs
+ compiler.flags = {flagname: ["--correct-flag"]}
+ assert compiler._compile_dummy_c_source() == with_flag_output
-def test_get_compiler_link_paths_no_path():
+@pytest.mark.enable_compiler_execution
+def test_compile_dummy_c_source_no_path():
compiler = MockCompiler()
compiler.cc = None
compiler.cxx = None
- compiler.f77 = None
- compiler.fc = None
+ assert compiler._compile_dummy_c_source() is None
- dirs = compiler._get_compiler_link_paths([compiler.cxx])
- assert dirs == []
-
-def test_get_compiler_link_paths_no_verbose_flag():
+@pytest.mark.enable_compiler_execution
+def test_compile_dummy_c_source_no_verbose_flag():
compiler = MockCompiler()
compiler._verbose_flag = None
-
- dirs = compiler._get_compiler_link_paths([compiler.cxx])
- assert dirs == []
+ assert compiler._compile_dummy_c_source() is None
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
-@pytest.mark.enable_compiler_link_paths
-def test_get_compiler_link_paths_load_env(working_env, monkeypatch, tmpdir):
+@pytest.mark.enable_compiler_execution
+def test_compile_dummy_c_source_load_env(working_env, monkeypatch, tmpdir):
gcc = str(tmpdir.join("gcc"))
with open(gcc, "w") as f:
f.write(
- """#!/bin/sh
+ f"""#!/bin/sh
if [ "$ENV_SET" = "1" ] && [ "$MODULE_LOADED" = "1" ]; then
- echo '"""
- + no_flag_output
- + """'
+ printf '{without_flag_output}'
fi
"""
)
@@ -273,11 +203,11 @@ fi
monkeypatch.setattr(spack.util.module_cmd, "module", module)
compiler = MockCompiler()
+ compiler.cc = gcc
compiler.environment = {"set": {"ENV_SET": "1"}}
compiler.modules = ["turn_on"]
- dirs = compiler._get_compiler_link_paths([gcc])
- assert dirs == no_flag_dirs
+ assert compiler._compile_dummy_c_source() == without_flag_output
# Get the desired flag from the specified compiler spec.
@@ -288,7 +218,7 @@ def flag_value(flag, spec):
else:
compiler_entry = copy(default_compiler_entry)
compiler_entry["spec"] = spec
- compiler = compilers.compiler_from_dict(compiler_entry)
+ compiler = spack.compilers.compiler_from_dict(compiler_entry)
return getattr(compiler, flag)
@@ -405,9 +335,18 @@ def test_clang_flags():
unsupported_flag_test("cxx17_flag", "clang@3.4")
supported_flag_test("cxx17_flag", "-std=c++1z", "clang@3.5")
supported_flag_test("cxx17_flag", "-std=c++17", "clang@5.0")
+ unsupported_flag_test("cxx20_flag", "clang@4.0")
+ supported_flag_test("cxx20_flag", "-std=c++2a", "clang@5.0")
+ supported_flag_test("cxx20_flag", "-std=c++20", "clang@11.0")
+ unsupported_flag_test("cxx23_flag", "clang@11.0")
+ supported_flag_test("cxx23_flag", "-std=c++2b", "clang@12.0")
+ supported_flag_test("cxx23_flag", "-std=c++23", "clang@17.0")
supported_flag_test("c99_flag", "-std=c99", "clang@3.3")
unsupported_flag_test("c11_flag", "clang@2.0")
supported_flag_test("c11_flag", "-std=c11", "clang@6.1.0")
+ unsupported_flag_test("c23_flag", "clang@8.0")
+ supported_flag_test("c23_flag", "-std=c2x", "clang@9.0")
+ supported_flag_test("c23_flag", "-std=c23", "clang@18.0")
supported_flag_test("cc_pic_flag", "-fPIC", "clang@3.3")
supported_flag_test("cxx_pic_flag", "-fPIC", "clang@3.3")
supported_flag_test("f77_pic_flag", "-fPIC", "clang@3.3")
@@ -528,9 +467,13 @@ def test_intel_flags():
unsupported_flag_test("cxx14_flag", "intel@=14.0")
supported_flag_test("cxx14_flag", "-std=c++1y", "intel@=15.0")
supported_flag_test("cxx14_flag", "-std=c++14", "intel@=15.0.2")
+ unsupported_flag_test("cxx17_flag", "intel@=18")
+ supported_flag_test("cxx17_flag", "-std=c++17", "intel@=19.0")
unsupported_flag_test("c99_flag", "intel@=11.0")
supported_flag_test("c99_flag", "-std=c99", "intel@=12.0")
unsupported_flag_test("c11_flag", "intel@=15.0")
+ supported_flag_test("c18_flag", "-std=c18", "intel@=21.5.0")
+ unsupported_flag_test("c18_flag", "intel@=21.4.0")
supported_flag_test("c11_flag", "-std=c1x", "intel@=16.0")
supported_flag_test("cc_pic_flag", "-fPIC", "intel@=1.0")
supported_flag_test("cxx_pic_flag", "-fPIC", "intel@=1.0")
@@ -594,22 +537,6 @@ def test_nvhpc_flags():
supported_flag_test("stdcxx_libs", ("-c++libs",), "nvhpc@=20.9")
-def test_pgi_flags():
- supported_flag_test("openmp_flag", "-mp", "pgi@=1.0")
- supported_flag_test("cxx11_flag", "-std=c++11", "pgi@=1.0")
- unsupported_flag_test("c99_flag", "pgi@=12.9")
- supported_flag_test("c99_flag", "-c99", "pgi@=12.10")
- unsupported_flag_test("c11_flag", "pgi@=15.2")
- supported_flag_test("c11_flag", "-c11", "pgi@=15.3")
- supported_flag_test("cc_pic_flag", "-fpic", "pgi@=1.0")
- supported_flag_test("cxx_pic_flag", "-fpic", "pgi@=1.0")
- supported_flag_test("f77_pic_flag", "-fpic", "pgi@=1.0")
- supported_flag_test("fc_pic_flag", "-fpic", "pgi@=1.0")
- supported_flag_test("stdcxx_libs", ("-pgc++libs",), "pgi@=1.0")
- supported_flag_test("debug_flags", ["-g", "-gopt"], "pgi@=1.0")
- supported_flag_test("opt_flags", ["-O", "-O0", "-O1", "-O2", "-O3", "-O4"], "pgi@=1.0")
-
-
def test_xl_flags():
supported_flag_test("openmp_flag", "-qsmp=omp", "xl@=1.0")
unsupported_flag_test("cxx11_flag", "xl@=13.0")
@@ -656,9 +583,28 @@ def test_xl_r_flags():
"compiler_spec,expected_result",
[("gcc@4.7.2", False), ("clang@3.3", False), ("clang@8.0.0", True)],
)
-def test_detecting_mixed_toolchains(compiler_spec, expected_result, config):
- compiler = compilers.compilers_for_spec(compiler_spec).pop()
- assert compilers.is_mixed_toolchain(compiler) is expected_result
+@pytest.mark.not_on_windows("GCC and LLVM currently not supported on the platform")
+def test_detecting_mixed_toolchains(
+ compiler_spec, expected_result, mutable_config, compiler_factory
+):
+ mixed_c = compiler_factory(spec="clang@8.0.0", operating_system="debian6")
+ mixed_c["compiler"]["paths"] = {
+ "cc": "/path/to/clang-8",
+ "cxx": "/path/to/clang++-8",
+ "f77": "/path/to/gfortran-9",
+ "fc": "/path/to/gfortran-9",
+ }
+ mutable_config.set(
+ "compilers",
+ [
+ compiler_factory(spec="gcc@4.7.2", operating_system="debian6"),
+ compiler_factory(spec="clang@3.3", operating_system="debian6"),
+ mixed_c,
+ ],
+ )
+
+ compiler = spack.compilers.compilers_for_spec(compiler_spec).pop()
+ assert spack.compilers.is_mixed_toolchain(compiler) is expected_result
@pytest.mark.regression("14798,13733")
@@ -685,12 +631,13 @@ def test_raising_if_compiler_target_is_over_specific(config):
]
arch_spec = spack.spec.ArchSpec(("linux", "ubuntu18.04", "haswell"))
with spack.config.override("compilers", compilers):
- cfg = spack.compilers.get_compiler_config()
+ cfg = spack.compilers.get_compiler_config(config)
with pytest.raises(ValueError):
spack.compilers.get_compilers(cfg, spack.spec.CompilerSpec("gcc@9.0.1"), arch_spec)
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
+@pytest.mark.enable_compiler_execution
def test_compiler_get_real_version(working_env, monkeypatch, tmpdir):
# Test variables
test_version = "2.2.2"
@@ -737,6 +684,50 @@ fi
assert version == test_version
+@pytest.mark.regression("42679")
+def test_get_compilers(config):
+ """Tests that we can select compilers whose versions differ only for a suffix."""
+ common = {
+ "flags": {},
+ "operating_system": "ubuntu23.10",
+ "target": "x86_64",
+ "modules": [],
+ "environment": {},
+ "extra_rpaths": [],
+ }
+ with_suffix = {
+ "spec": "gcc@13.2.0-suffix",
+ "paths": {
+ "cc": "/usr/bin/gcc-13.2.0-suffix",
+ "cxx": "/usr/bin/g++-13.2.0-suffix",
+ "f77": "/usr/bin/gfortran-13.2.0-suffix",
+ "fc": "/usr/bin/gfortran-13.2.0-suffix",
+ },
+ **common,
+ }
+ without_suffix = {
+ "spec": "gcc@13.2.0",
+ "paths": {
+ "cc": "/usr/bin/gcc-13.2.0",
+ "cxx": "/usr/bin/g++-13.2.0",
+ "f77": "/usr/bin/gfortran-13.2.0",
+ "fc": "/usr/bin/gfortran-13.2.0",
+ },
+ **common,
+ }
+
+ compilers = [{"compiler": without_suffix}, {"compiler": with_suffix}]
+
+ assert spack.compilers.get_compilers(
+ compilers, cspec=spack.spec.CompilerSpec("gcc@=13.2.0-suffix")
+ ) == [spack.compilers._compiler_from_config_entry(with_suffix)]
+
+ assert spack.compilers.get_compilers(
+ compilers, cspec=spack.spec.CompilerSpec("gcc@=13.2.0")
+ ) == [spack.compilers._compiler_from_config_entry(without_suffix)]
+
+
+@pytest.mark.enable_compiler_execution
def test_compiler_get_real_version_fails(working_env, monkeypatch, tmpdir):
# Test variables
test_version = "2.2.2"
@@ -779,21 +770,19 @@ fi
def _call(*args, **kwargs):
raise ProcessError("Failed intentionally")
- monkeypatch.setattr(spack.util.executable.Executable, "__call__", _call)
+ monkeypatch.setattr(Executable, "__call__", _call)
# Run and no change to environment
compilers = spack.compilers.get_compilers([compiler_dict])
assert len(compilers) == 1
compiler = compilers[0]
- try:
- _ = compiler.get_real_version()
- assert False
- except ProcessError:
- # Confirm environment does not change after failed call
- assert "SPACK_TEST_CMP_ON" not in os.environ
+ assert compiler.get_real_version() == "unknown"
+ # Confirm environment does not change after failed call
+ assert "SPACK_TEST_CMP_ON" not in os.environ
@pytest.mark.not_on_windows("Bash scripting unsupported on Windows (for now)")
+@pytest.mark.enable_compiler_execution
def test_compiler_flags_use_real_version(working_env, monkeypatch, tmpdir):
# Create compiler
gcc = str(tmpdir.join("gcc"))
@@ -854,3 +843,99 @@ def test_compiler_executable_verification_success(tmpdir):
# Test that null entries don't fail
compiler.cc = None
compiler.verify_executables()
+
+
+@pytest.mark.parametrize(
+ "compilers_extra_attributes,expected_length",
+ [
+ # If we detect a C compiler we expect the result to be valid
+ ({"c": "/usr/bin/clang-12", "cxx": "/usr/bin/clang-12"}, 1),
+ # If we detect only a C++ compiler we expect the result to be discarded
+ ({"cxx": "/usr/bin/clang-12"}, 0),
+ ],
+)
+def test_detection_requires_c_compiler(compilers_extra_attributes, expected_length):
+ """Tests that compilers automatically added to the configuration have
+ at least a C compiler.
+ """
+ packages_yaml = {
+ "llvm": {
+ "externals": [
+ {
+ "spec": "clang@12.0.0",
+ "prefix": "/usr",
+ "extra_attributes": {"compilers": compilers_extra_attributes},
+ }
+ ]
+ }
+ }
+ result = spack.compilers.CompilerConfigFactory.from_packages_yaml(packages_yaml)
+ assert len(result) == expected_length
+
+
+def test_compiler_environment(working_env):
+ """Test whether environment modifications from compilers are applied in compiler_environment"""
+ os.environ.pop("TEST", None)
+ compiler = Compiler(
+ "gcc@=13.2.0",
+ operating_system="ubuntu20.04",
+ target="x86_64",
+ paths=["/test/bin/gcc", "/test/bin/g++"],
+ environment={"set": {"TEST": "yes"}},
+ )
+ with compiler.compiler_environment():
+ assert os.environ["TEST"] == "yes"
+
+
+class MockCompilerWithoutExecutables(MockCompiler):
+ def __init__(self):
+ super().__init__()
+ self._compile_dummy_c_source_count = 0
+ self._get_real_version_count = 0
+
+ def _compile_dummy_c_source(self) -> Optional[str]:
+ self._compile_dummy_c_source_count += 1
+ return "gcc helloworld.c -o helloworld"
+
+ def get_real_version(self) -> str:
+ self._get_real_version_count += 1
+ return "1.0.0"
+
+
+def test_compiler_output_caching(tmp_path):
+ """Test that compiler output is cached on the filesystem."""
+ # The first call should trigger the cache to updated.
+ a = MockCompilerWithoutExecutables()
+ cache = spack.compiler.FileCompilerCache(FileCache(str(tmp_path)))
+ assert cache.get(a).c_compiler_output == "gcc helloworld.c -o helloworld"
+ assert cache.get(a).real_version == "1.0.0"
+ assert a._compile_dummy_c_source_count == 1
+ assert a._get_real_version_count == 1
+
+ # The second call on an equivalent but distinct object should not trigger compiler calls.
+ b = MockCompilerWithoutExecutables()
+ cache = spack.compiler.FileCompilerCache(FileCache(str(tmp_path)))
+ assert cache.get(b).c_compiler_output == "gcc helloworld.c -o helloworld"
+ assert cache.get(b).real_version == "1.0.0"
+ assert b._compile_dummy_c_source_count == 0
+ assert b._get_real_version_count == 0
+
+ # Cache schema change should be handled gracefully.
+ with open(cache.cache.cache_path(cache.name), "w") as f:
+ for k in cache._data:
+ cache._data[k] = "corrupted entry"
+ f.write(json.dumps(cache._data))
+
+ c = MockCompilerWithoutExecutables()
+ cache = spack.compiler.FileCompilerCache(FileCache(str(tmp_path)))
+ assert cache.get(c).c_compiler_output == "gcc helloworld.c -o helloworld"
+ assert cache.get(c).real_version == "1.0.0"
+
+ # Cache corruption should be handled gracefully.
+ with open(cache.cache.cache_path(cache.name), "w") as f:
+ f.write("corrupted cache")
+
+ d = MockCompilerWithoutExecutables()
+ cache = spack.compiler.FileCompilerCache(FileCache(str(tmp_path)))
+ assert cache.get(d).c_compiler_output == "gcc helloworld.c -o helloworld"
+ assert cache.get(d).real_version == "1.0.0"
diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py
deleted file mode 100644
index a30d1b8906..0000000000
--- a/lib/spack/spack/test/compilers/detection.py
+++ /dev/null
@@ -1,518 +0,0 @@
-# Copyright 2013-2024 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)
-"""Test detection of compiler version"""
-import os
-
-import pytest
-
-import llnl.util.filesystem as fs
-
-import spack.compilers.aocc
-import spack.compilers.arm
-import spack.compilers.cce
-import spack.compilers.clang
-import spack.compilers.fj
-import spack.compilers.gcc
-import spack.compilers.intel
-import spack.compilers.nag
-import spack.compilers.nvhpc
-import spack.compilers.oneapi
-import spack.compilers.pgi
-import spack.compilers.xl
-import spack.compilers.xl_r
-import spack.util.module_cmd
-from spack.operating_systems.cray_frontend import CrayFrontend
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- (
- "Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)\n"
- "Target: aarch64--linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir:\n"
- "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n",
- "19.0",
- ),
- (
- "Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)\n"
- "Target: aarch64--linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir:\n"
- "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n",
- "19.3.1",
- ),
- ],
-)
-def test_arm_version_detection(version_str, expected_version):
- version = spack.compilers.arm.Arm.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- ("Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39\n", "8.4.6"),
- ("Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:45\n", "8.4.6"),
- ("Cray clang Version 8.4.6 Mon Apr 15, 2019 12:13:45\n", "8.4.6"),
- ("Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:55\n", "8.4.6"),
- ],
-)
-def test_cce_version_detection(version_str, expected_version):
- version = spack.compilers.cce.Cce.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.regression("10191")
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # macOS clang
- (
- "Apple clang version 11.0.0 (clang-1100.0.33.8)\n"
- "Target: x86_64-apple-darwin18.7.0\n"
- "Thread model: posix\n"
- "InstalledDir: "
- "/Applications/Xcode.app/Contents/Developer/Toolchains/"
- "XcodeDefault.xctoolchain/usr/bin\n",
- "11.0.0",
- ),
- (
- "Apple LLVM version 7.0.2 (clang-700.1.81)\n"
- "Target: x86_64-apple-darwin15.2.0\n"
- "Thread model: posix\n",
- "7.0.2",
- ),
- ],
-)
-def test_apple_clang_version_detection(version_str, expected_version):
- cls = spack.compilers.class_for_compiler_name("apple-clang")
- version = cls.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.regression("10191")
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # LLVM Clang
- (
- "clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)\n"
- "Target: x86_64-pc-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /usr/bin\n",
- "6.0.1",
- ),
- (
- "clang version 3.1 (trunk 149096)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n",
- "3.1",
- ),
- (
- "clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n"
- "Target: x86_64-pc-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /usr/bin\n",
- "8.0.0",
- ),
- (
- "clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78\n"
- "Target: x86_64-pc-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /usr/bin\n",
- "9.0.1",
- ),
- (
- "clang version 8.0.0-3 (tags/RELEASE_800/final)\n"
- "Target: aarch64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /usr/bin\n",
- "8.0.0",
- ),
- (
- "clang version 11.0.0\n"
- "Target: aarch64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /usr/bin\n",
- "11.0.0",
- ),
- ],
-)
-def test_clang_version_detection(version_str, expected_version):
- version = spack.compilers.clang.Clang.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # C compiler
- (
- "fcc (FCC) 4.0.0a 20190314\n"
- "simulating gcc version 6.1\n"
- "Copyright FUJITSU LIMITED 2019",
- "4.0.0a",
- ),
- # C++ compiler
- (
- "FCC (FCC) 4.0.0a 20190314\n"
- "simulating gcc version 6.1\n"
- "Copyright FUJITSU LIMITED 2019",
- "4.0.0a",
- ),
- # Fortran compiler
- ("frt (FRT) 4.0.0a 20190314\n" "Copyright FUJITSU LIMITED 2019", "4.0.0a"),
- ],
-)
-def test_fj_version_detection(version_str, expected_version):
- version = spack.compilers.fj.Fj.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # Output of -dumpversion changed to return only major from GCC 7
- ("4.4.7\n", "4.4.7"),
- ("7\n", "7"),
- ],
-)
-def test_gcc_version_detection(version_str, expected_version):
- version = spack.compilers.gcc.Gcc.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- (
- "icpc (ICC) 12.1.5 20120612\n"
- "Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n",
- "12.1.5",
- ),
- (
- "ifort (IFORT) 12.1.5 20120612\n"
- "Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n",
- "12.1.5",
- ),
- ],
-)
-def test_intel_version_detection(version_str, expected_version):
- version = spack.compilers.intel.Intel.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- ( # ICX/ICPX
- "Intel(R) oneAPI DPC++ Compiler 2021.1.2 (2020.10.0.1214)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /made/up/path",
- "2021.1.2",
- ),
- ( # ICX/ICPX
- "Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /made/up/path",
- "2021.2.0",
- ),
- ( # ICX/ICPX
- "Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /made/up/path",
- "2021.3.0",
- ),
- ( # ICX/ICPX
- "Intel(R) oneAPI DPC++/C++ Compiler 2021.4.0 (2021.4.0.20210924)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n"
- "InstalledDir: /made/up/path",
- "2021.4.0",
- ),
- ( # IFX
- "ifx (IFORT) 2021.1.2 Beta 20201214\n"
- "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.",
- "2021.1.2",
- ),
- ( # IFX
- "ifx (IFORT) 2021.2.0 Beta 20210317\n"
- "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.",
- "2021.2.0",
- ),
- ( # IFX
- "ifx (IFORT) 2021.3.0 Beta 20210619\n"
- "Copyright (C) 1985-2020 Intel Corporation. All rights reserved.",
- "2021.3.0",
- ),
- ( # IFX
- "ifx (IFORT) 2021.4.0 Beta 20210924\n"
- "Copyright (C) 1985-2021 Intel Corporation. All rights reserved.",
- "2021.4.0",
- ),
- ( # IFX
- "ifx (IFORT) 2022.0.0 20211123\n"
- "Copyright (C) 1985-2021 Intel Corporation. All rights reserved.",
- "2022.0.0",
- ),
- ( # IFX
- "ifx (IFX) 2023.1.0 20230320\n"
- "Copyright (C) 1985-2023 Intel Corporation. All rights reserved.",
- "2023.1.0",
- ),
- ],
-)
-def test_oneapi_version_detection(version_str, expected_version):
- version = spack.compilers.oneapi.Oneapi.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- (
- "NAG Fortran Compiler Release 6.0(Hibiya) Build 1037\n"
- "Product NPL6A60NA for x86-64 Linux\n",
- "6.0.1037",
- )
- ],
-)
-def test_nag_version_detection(version_str, expected_version):
- version = spack.compilers.nag.Nag.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # C compiler on x86-64
- (
- "nvc 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # C++ compiler on x86-64
- (
- "nvc++ 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # Fortran compiler on x86-64
- (
- "nvfortran 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # C compiler on Power
- (
- "nvc 20.9-0 linuxpower target on Linuxpower\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # C++ compiler on Power
- (
- "nvc++ 20.9-0 linuxpower target on Linuxpower\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # Fortran compiler on Power
- (
- "nvfortran 20.9-0 linuxpower target on Linuxpower\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # C compiler on Arm
- (
- "nvc 20.9-0 linuxarm64 target on aarch64 Linux\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # C++ compiler on Arm
- (
- "nvc++ 20.9-0 linuxarm64 target on aarch64 Linux\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- # Fortran compiler on Arm
- (
- "nvfortran 20.9-0 linuxarm64 target on aarch64 Linux\n"
- "NVIDIA Compilers and Tools\n"
- "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.",
- "20.9",
- ),
- ],
-)
-def test_nvhpc_version_detection(version_str, expected_version):
- version = spack.compilers.nvhpc.Nvhpc.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # Output on x86-64
- (
- "pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge\n"
- "The Portland Group - PGI Compilers and Tools\n"
- "Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.\n",
- "15.10",
- ),
- # Output on PowerPC
- (
- "pgcc 17.4-0 linuxpower target on Linuxpower\n"
- "PGI Compilers and Tools\n"
- "Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.\n",
- "17.4",
- ),
- # Output when LLVM-enabled
- (
- "pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n"
- "PGI Compilers and Tools\n"
- "Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n",
- "18.4",
- ),
- ],
-)
-def test_pgi_version_detection(version_str, expected_version):
- version = spack.compilers.pgi.Pgi.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- ("IBM XL C/C++ for Linux, V11.1 (5724-X14)\n" "Version: 11.01.0000.0000\n", "11.1"),
- ("IBM XL Fortran for Linux, V13.1 (5724-X16)\n" "Version: 13.01.0000.0000\n", "13.1"),
- ("IBM XL C/C++ for AIX, V11.1 (5724-X13)\n" "Version: 11.01.0000.0009\n", "11.1"),
- (
- "IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0\n" "Version: 09.00.0000.0017\n",
- "9.0",
- ),
- ],
-)
-def test_xl_version_detection(version_str, expected_version):
- version = spack.compilers.xl.Xl.extract_version_from_output(version_str)
- assert version == expected_version
-
- version = spack.compilers.xl_r.XlR.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
-@pytest.mark.parametrize(
- "compiler,version",
- [
- ("gcc", "8.1.0"),
- ("gcc", "1.0.0-foo"),
- ("pgi", "19.1"),
- ("pgi", "19.1a"),
- ("intel", "9.0.0"),
- ("intel", "0.0.0-foobar")
- # ('oneapi', '2021.1'),
- # ('oneapi', '2021.1-foobar')
- ],
-)
-def test_cray_frontend_compiler_detection(compiler, version, tmpdir, monkeypatch, working_env):
- """Test that the Cray frontend properly finds compilers form modules"""
- # setup the fake compiler directory
- compiler_dir = tmpdir.join(compiler)
- compiler_exe = compiler_dir.join("cc").ensure()
- fs.set_executable(str(compiler_exe))
-
- # mock modules
- def _module(cmd, *args):
- module_name = "%s/%s" % (compiler, version)
- module_contents = "prepend-path PATH %s" % compiler_dir
- if cmd == "avail":
- return module_name if compiler in args[0] else ""
- if cmd == "show":
- return module_contents if module_name in args else ""
-
- monkeypatch.setattr(spack.operating_systems.cray_frontend, "module", _module)
-
- # remove PATH variable
- os.environ.pop("PATH", None)
-
- # get a CrayFrontend object
- cray_fe_os = CrayFrontend()
-
- paths = cray_fe_os.compiler_search_paths
- assert paths == [str(compiler_dir)]
-
-
-@pytest.mark.parametrize(
- "version_str,expected_version",
- [
- # This applies to C,C++ and FORTRAN compiler
- (
- "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)"
- "(based on LLVM Mirror.Version.12.0.0)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n",
- "3.1.0",
- ),
- (
- "AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#78 2020_12_10)"
- "(based on LLVM Mirror.Version.12.0.0)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n",
- "3.0.0",
- ),
- (
- "AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10)"
- "(based on LLVM Mirror.Version.11.0.0)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n",
- "2.3.0",
- ),
- (
- "AMD clang version 10.0.0 (CLANG: AOCC_2.2.0-Build#93 2020_06_25)"
- "(based on LLVM Mirror.Version.10.0.0)\n"
- "Target: x86_64-unknown-linux-gnu\n"
- "Thread model: posix\n",
- "2.2.0",
- ),
- ],
-)
-def test_aocc_version_detection(version_str, expected_version):
- version = spack.compilers.aocc.Aocc.extract_version_from_output(version_str)
- assert version == expected_version
-
-
-@pytest.mark.regression("33901")
-@pytest.mark.parametrize(
- "version_str",
- [
- (
- "Apple clang version 11.0.0 (clang-1100.0.33.8)\n"
- "Target: x86_64-apple-darwin18.7.0\n"
- "Thread model: posix\n"
- "InstalledDir: "
- "/Applications/Xcode.app/Contents/Developer/Toolchains/"
- "XcodeDefault.xctoolchain/usr/bin\n"
- ),
- (
- "Apple LLVM version 7.0.2 (clang-700.1.81)\n"
- "Target: x86_64-apple-darwin15.2.0\n"
- "Thread model: posix\n"
- ),
- ],
-)
-def test_apple_clang_not_detected_as_cce(version_str):
- version = spack.compilers.cce.Cce.extract_version_from_output(version_str)
- assert version == "unknown"
diff --git a/lib/spack/spack/test/concretization/compiler_runtimes.py b/lib/spack/spack/test/concretization/compiler_runtimes.py
new file mode 100644
index 0000000000..fefa262ca4
--- /dev/null
+++ b/lib/spack/spack/test/concretization/compiler_runtimes.py
@@ -0,0 +1,161 @@
+# Copyright 2013-2024 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 pytest
+
+import archspec.cpu
+
+import spack.config
+import spack.paths
+import spack.repo
+import spack.solver.asp
+import spack.spec
+from spack.environment.environment import ViewDescriptor
+from spack.version import Version
+
+pytestmark = [pytest.mark.usefixtures("enable_runtimes")]
+
+
+def _concretize_with_reuse(*, root_str, reused_str):
+ reused_spec = spack.spec.Spec(reused_str).concretized()
+ setup = spack.solver.asp.SpackSolverSetup(tests=False)
+ driver = spack.solver.asp.PyclingoDriver()
+ result, _, _ = driver.solve(setup, [spack.spec.Spec(f"{root_str}")], reuse=[reused_spec])
+ root = result.specs[0]
+ return root, reused_spec
+
+
+@pytest.fixture
+def runtime_repo(mutable_config):
+ repo = os.path.join(spack.paths.repos_path, "compiler_runtime.test")
+ with spack.repo.use_repositories(repo) as mock_repo:
+ yield mock_repo
+
+
+@pytest.fixture
+def enable_runtimes():
+ original = spack.solver.asp.WITH_RUNTIME
+ spack.solver.asp.WITH_RUNTIME = True
+ yield
+ spack.solver.asp.WITH_RUNTIME = original
+
+
+def test_correct_gcc_runtime_is_injected_as_dependency(runtime_repo):
+ s = spack.spec.Spec("pkg-a%gcc@10.2.1 ^pkg-b%gcc@9.4.0").concretized()
+ a, b = s["pkg-a"], s["pkg-b"]
+
+ # Both a and b should depend on the same gcc-runtime directly
+ assert a.dependencies("gcc-runtime") == b.dependencies("gcc-runtime")
+
+ # And the gcc-runtime version should be that of the newest gcc used in the dag.
+ assert a["gcc-runtime"].version == Version("10.2.1")
+
+
+@pytest.mark.regression("41972")
+def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_path):
+ """Tests that external nodes don't have runtime dependencies."""
+
+ packages_yaml = {"pkg-b": {"externals": [{"spec": "pkg-b@1.0", "prefix": f"{str(tmp_path)}"}]}}
+ spack.config.set("packages", packages_yaml)
+
+ s = spack.spec.Spec("pkg-a%gcc@10.2.1").concretized()
+
+ a, b = s["pkg-a"], s["pkg-b"]
+
+ # Since b is an external, it doesn't depend on gcc-runtime
+ assert a.dependencies("gcc-runtime")
+ assert a.dependencies("pkg-b")
+ assert not b.dependencies("gcc-runtime")
+
+
+@pytest.mark.parametrize(
+ "root_str,reused_str,expected,nruntime",
+ [
+ # The reused runtime is older than we need, thus we'll add a more recent one for a
+ (
+ "pkg-a%gcc@10.2.1",
+ "pkg-b%gcc@9.4.0",
+ {"pkg-a": "gcc-runtime@10.2.1", "pkg-b": "gcc-runtime@9.4.0"},
+ 2,
+ ),
+ # The root is compiled with an older compiler, thus we'll NOT reuse the runtime from b
+ (
+ "pkg-a%gcc@9.4.0",
+ "pkg-b%gcc@10.2.1",
+ {"pkg-a": "gcc-runtime@9.4.0", "pkg-b": "gcc-runtime@9.4.0"},
+ 1,
+ ),
+ # Same as before, but tests that we can reuse from a more generic target
+ pytest.param(
+ "pkg-a%gcc@9.4.0",
+ "pkg-b%gcc@10.2.1 target=x86_64",
+ {"pkg-a": "gcc-runtime@9.4.0", "pkg-b": "gcc-runtime@9.4.0"},
+ 1,
+ marks=pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
+ ),
+ ),
+ pytest.param(
+ "pkg-a%gcc@10.2.1",
+ "pkg-b%gcc@9.4.0 target=x86_64",
+ {
+ "pkg-a": "gcc-runtime@10.2.1 target=x86_64",
+ "pkg-b": "gcc-runtime@9.4.0 target=x86_64",
+ },
+ 2,
+ marks=pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
+ ),
+ ),
+ ],
+)
+@pytest.mark.regression("44444")
+def test_reusing_specs_with_gcc_runtime(root_str, reused_str, expected, nruntime, runtime_repo):
+ """Tests that we can reuse specs with a "gcc-runtime" leaf node. In particular, checks
+ that the semantic for gcc-runtimes versions accounts for reused packages too.
+
+ Reusable runtime versions should be lower, or equal, to that of parent nodes.
+ """
+ root, reused_spec = _concretize_with_reuse(root_str=root_str, reused_str=reused_str)
+
+ runtime_a = root.dependencies("gcc-runtime")[0]
+ assert runtime_a.satisfies(expected["pkg-a"])
+ runtime_b = root["pkg-b"].dependencies("gcc-runtime")[0]
+ assert runtime_b.satisfies(expected["pkg-b"])
+
+ runtimes = [x for x in root.traverse() if x.name == "gcc-runtime"]
+ assert len(runtimes) == nruntime
+
+
+@pytest.mark.parametrize(
+ "root_str,reused_str,expected,not_expected",
+ [
+ # Ensure that, whether we have multiple runtimes in the DAG or not,
+ # we always link only the latest version
+ ("pkg-a%gcc@10.2.1", "pkg-b%gcc@9.4.0", ["gcc-runtime@10.2.1"], ["gcc-runtime@9.4.0"])
+ ],
+)
+def test_views_can_handle_duplicate_runtime_nodes(
+ root_str, reused_str, expected, not_expected, runtime_repo, tmp_path, monkeypatch
+):
+ """Tests that an environment is able to select the latest version of a runtime node to be
+ linked in a view, in case more than one compatible version is in the DAG.
+ """
+ root, reused_spec = _concretize_with_reuse(root_str=root_str, reused_str=reused_str)
+
+ # Mock the installation status to allow selecting nodes for the view
+ monkeypatch.setattr(spack.spec.Spec, "installed", True)
+ nodes = list(root.traverse())
+
+ view = ViewDescriptor(str(tmp_path), str(tmp_path))
+ candidate_specs = view.specs_for_view(nodes)
+
+ for x in expected:
+ assert any(node.satisfies(x) for node in candidate_specs)
+
+ for x in not_expected:
+ assert all(not node.satisfies(x) for node in candidate_specs)
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretization/core.py
index 948cf5dd0f..8f136d46a4 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretization/core.py
@@ -13,6 +13,9 @@ import archspec.cpu
import llnl.util.lang
+import spack.binary_distribution
+import spack.cmd
+import spack.compiler
import spack.compilers
import spack.concretize
import spack.config
@@ -20,13 +23,19 @@ import spack.deptypes as dt
import spack.detection
import spack.error
import spack.hash_types as ht
+import spack.paths
import spack.platforms
+import spack.platforms.test
import spack.repo
import spack.solver.asp
+import spack.solver.version_order
+import spack.spec
+import spack.store
+import spack.util.file_cache
import spack.variant as vt
-from spack.concretize import find_spec
+from spack.installer import PackageInstaller
from spack.spec import CompilerSpec, Spec
-from spack.version import Version, ver
+from spack.version import Version, VersionList, ver
def check_spec(abstract, concrete):
@@ -45,7 +54,7 @@ def check_spec(abstract, concrete):
cflag = concrete.compiler_flags[flag]
assert set(aflag) <= set(cflag)
- for name in spack.repo.PATH.get_pkg_class(abstract.name).variants:
+ for name in spack.repo.PATH.get_pkg_class(abstract.name).variant_names():
assert name in concrete.variants
for flag in concrete.compiler_flags.valid_compiler_flags():
@@ -67,6 +76,24 @@ def check_concretize(abstract_spec):
return concrete
+@pytest.fixture(scope="function", autouse=True)
+def binary_compatibility(monkeypatch, request):
+ """Selects whether we use OS compatibility for binaries, or libc compatibility."""
+ if spack.platforms.real_host().name != "linux":
+ return
+
+ if "mock_packages" not in request.fixturenames:
+ # Only builtin.mock has a mock glibc package
+ return
+
+ if "database" in request.fixturenames or "mutable_database" in request.fixturenames:
+ # Databases have been created without glibc support
+ return
+
+ monkeypatch.setattr(spack.solver.asp, "using_libc_compatibility", lambda: True)
+ monkeypatch.setattr(spack.compiler.Compiler, "default_libc", Spec("glibc@=2.28"))
+
+
@pytest.fixture(
params=[
# no_deps
@@ -120,33 +147,49 @@ def current_host(request, monkeypatch):
# is_preference is not empty if we want to supply the
# preferred target via packages.yaml
cpu, _, is_preference = request.param.partition("-")
- target = archspec.cpu.TARGETS[cpu]
monkeypatch.setattr(spack.platforms.Test, "default", cpu)
monkeypatch.setattr(spack.platforms.Test, "front_end", cpu)
if not is_preference:
+ target = archspec.cpu.TARGETS[cpu]
monkeypatch.setattr(archspec.cpu, "host", lambda: target)
yield target
else:
+ target = archspec.cpu.TARGETS["sapphirerapids"]
+ monkeypatch.setattr(archspec.cpu, "host", lambda: target)
with spack.config.override("packages:all", {"target": [cpu]}):
yield target
+@pytest.fixture(scope="function", params=[True, False])
+def fuzz_dep_order(request, monkeypatch):
+ """Meta-function that tweaks the order of iteration over dependencies in a package."""
+
+ def reverser(pkg_name):
+ if request.param:
+ pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name)
+ reversed_dict = dict(reversed(list(pkg_cls.dependencies.items())))
+ monkeypatch.setattr(pkg_cls, "dependencies", reversed_dict)
+
+ return reverser
+
+
@pytest.fixture()
-def repo_with_changing_recipe(tmpdir_factory, mutable_mock_repo):
+def repo_with_changing_recipe(tmp_path_factory, mutable_mock_repo):
repo_namespace = "changing"
- repo_dir = tmpdir_factory.mktemp(repo_namespace)
+ repo_dir = tmp_path_factory.mktemp(repo_namespace)
- repo_dir.join("repo.yaml").write(
+ (repo_dir / "repo.yaml").write_text(
"""
repo:
namespace: changing
-""",
- ensure=True,
+"""
)
- packages_dir = repo_dir.ensure("packages", dir=True)
+ packages_dir = repo_dir / "packages"
root_pkg_str = """
+from spack.package import *
+
class Root(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/root-1.0.tar.gz"
@@ -156,9 +199,13 @@ class Root(Package):
conflicts("^changing~foo")
"""
- packages_dir.join("root", "package.py").write(root_pkg_str, ensure=True)
+ package_py = packages_dir / "root" / "package.py"
+ package_py.parent.mkdir(parents=True)
+ package_py.write_text(root_pkg_str)
changing_template = """
+from spack.package import *
+
class Changing(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/changing-1.0.tar.gz"
@@ -190,7 +237,9 @@ class Changing(Package):
def __init__(self, repo_directory):
self.repo_dir = repo_directory
- self.repo = spack.repo.Repo(str(repo_directory))
+ cache_dir = tmp_path_factory.mktemp("cache")
+ self.repo_cache = spack.util.file_cache.FileCache(str(cache_dir))
+ self.repo = spack.repo.Repo(str(repo_directory), cache=self.repo_cache)
def change(self, changes=None):
changes = changes or {}
@@ -211,10 +260,12 @@ class Changing(Package):
# Change the recipe
t = jinja2.Template(changing_template)
changing_pkg_str = t.render(**context)
- packages_dir.join("changing", "package.py").write(changing_pkg_str, ensure=True)
+ package_py = packages_dir / "changing" / "package.py"
+ package_py.parent.mkdir(parents=True, exist_ok=True)
+ package_py.write_text(changing_pkg_str)
# Re-add the repository
- self.repo = spack.repo.Repo(str(self.repo_dir))
+ self.repo = spack.repo.Repo(str(self.repo_dir), cache=self.repo_cache)
repository.put_first(self.repo)
_changing_pkg = _ChangingPackage(repo_dir)
@@ -224,10 +275,24 @@ class Changing(Package):
yield _changing_pkg
+@pytest.fixture()
+def clang12_with_flags(compiler_factory):
+ c = compiler_factory(spec="clang@12.2.0", operating_system="redhat6")
+ c["compiler"]["flags"] = {"cflags": "-O3", "cxxflags": "-O3"}
+ return c
+
+
+@pytest.fixture()
+def gcc11_with_flags(compiler_factory):
+ c = compiler_factory(spec="gcc@11.1.0", operating_system="redhat6")
+ c["compiler"]["flags"] = {"cflags": "-O0 -g", "cxxflags": "-O0 -g", "fflags": "-O0 -g"}
+ return c
+
+
# This must use the mutable_config fixture because the test
# adjusting_default_target_based_on_compiler uses the current_host fixture,
# which changes the config.
-@pytest.mark.usefixtures("mutable_config", "mock_packages")
+@pytest.mark.usefixtures("mutable_config", "mock_packages", "do_not_check_runtimes_on_reuse")
class TestConcretize:
def test_concretize(self, spec):
check_concretize(spec)
@@ -316,28 +381,38 @@ class TestConcretize:
assert Spec("builtin.mock.multi-provider-mpi@1.10.0") in providers
assert Spec("builtin.mock.multi-provider-mpi@1.8.8") in providers
- def test_different_compilers_get_different_flags(self):
+ def test_different_compilers_get_different_flags(
+ self, mutable_config, clang12_with_flags, gcc11_with_flags
+ ):
+ """Tests that nodes get the flags of the associated compiler."""
+ mutable_config.set("compilers", [clang12_with_flags, gcc11_with_flags])
client = Spec(
"cmake-client %gcc@11.1.0 platform=test os=fe target=fe"
- + " ^cmake %clang@12.2.0 platform=test os=fe target=fe"
- )
- client.concretize()
+ " ^cmake %clang@12.2.0 platform=test os=fe target=fe"
+ ).concretized()
cmake = client["cmake"]
- assert set(client.compiler_flags["cflags"]) == set(["-O0", "-g"])
- assert set(cmake.compiler_flags["cflags"]) == set(["-O3"])
- assert set(client.compiler_flags["fflags"]) == set(["-O0", "-g"])
+ assert set(client.compiler_flags["cflags"]) == {"-O0", "-g"}
+ assert set(cmake.compiler_flags["cflags"]) == {"-O3"}
+ assert set(client.compiler_flags["fflags"]) == {"-O0", "-g"}
assert not set(cmake.compiler_flags["fflags"])
- def test_compiler_flags_from_compiler_and_dependent(self):
- client = Spec("cmake-client %clang@12.2.0 platform=test os=fe target=fe cflags==-g")
- client.concretize()
- cmake = client["cmake"]
- for spec in [client, cmake]:
- assert spec.compiler_flags["cflags"] == ["-O3", "-g"]
+ @pytest.mark.regression("9908")
+ def test_spec_flags_maintain_order(self, mutable_config, gcc11_with_flags):
+ """Tests that Spack assembles flags in a consistent way (i.e. with the same ordering),
+ for successive concretizations.
+ """
+ mutable_config.set("compilers", [gcc11_with_flags])
+ spec_str = "libelf %gcc@11.1.0 os=redhat6"
+ for _ in range(3):
+ s = Spec(spec_str).concretized()
+ assert all(
+ s.compiler_flags[x] == ["-O0", "-g"] for x in ("cflags", "cxxflags", "fflags")
+ )
- def test_compiler_flags_differ_identical_compilers(self):
+ def test_compiler_flags_differ_identical_compilers(self, mutable_config, clang12_with_flags):
+ mutable_config.set("compilers", [clang12_with_flags])
# Correct arch to use test compiler that has flags
- spec = Spec("a %clang@12.2.0 platform=test os=fe target=fe")
+ spec = Spec("pkg-a %clang@12.2.0 platform=test os=fe target=fe")
# Get the compiler that matches the spec (
compiler = spack.compilers.compiler_for_spec("clang@=12.2.0", spec.architecture)
@@ -351,33 +426,45 @@ class TestConcretize:
spec.concretize()
assert spec.satisfies("cflags=-O2")
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
- )
- def test_concretize_compiler_flag_propagate(self):
- spec = Spec("hypre cflags=='-g' ^openblas")
- spec.concretize()
-
- assert spec.satisfies("^openblas cflags='-g'")
-
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
+ @pytest.mark.parametrize(
+ "spec_str,expected,not_expected",
+ [
+ # Simple flag propagation from the root
+ ("hypre cflags=='-g' ^openblas", ["hypre cflags='-g'", "^openblas cflags='-g'"], []),
+ (
+ "hypre cflags='-g' ^openblas",
+ ["hypre cflags='-g'", "^openblas"],
+ ["^openblas cflags='-g'"],
+ ),
+ # Setting a flag overrides propagation
+ (
+ "hypre cflags=='-g' ^openblas cflags='-O3'",
+ ["hypre cflags='-g'", "^openblas cflags='-O3'"],
+ ["^openblas cflags='-g'"],
+ ),
+ # Setting propagation on parent and dependency -> the
+ # dependency propagation flags override
+ (
+ "hypre cflags=='-g' ^openblas cflags=='-O3'",
+ ["hypre cflags='-g'", "^openblas cflags='-O3'"],
+ ["^openblas cflags='-g'"],
+ ),
+ # Propagation doesn't go across build dependencies
+ (
+ "cmake-client cflags=='-O2 -g'",
+ ["cmake-client cflags=='-O2 -g'", "^cmake"],
+ ["cmake cflags=='-O2 -g'"],
+ ),
+ ],
)
- def test_concretize_compiler_flag_does_not_propagate(self):
- spec = Spec("hypre cflags='-g' ^openblas")
- spec.concretize()
-
- assert not spec.satisfies("^openblas cflags='-g'")
+ def test_compiler_flag_propagation(self, spec_str, expected, not_expected):
+ root = Spec(spec_str).concretized()
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
- )
- def test_concretize_propagate_compiler_flag_not_passed_to_dependent(self):
- spec = Spec("hypre cflags=='-g' ^openblas cflags='-O3'")
- spec.concretize()
+ for constraint in expected:
+ assert root.satisfies(constraint)
- assert set(spec.compiler_flags["cflags"]) == set(["-g"])
- assert spec.satisfies("^openblas cflags='-O3'")
+ for constraint in not_expected:
+ assert not root.satisfies(constraint)
def test_mixing_compilers_only_affects_subdag(self):
spack.config.set("packages:all:compiler", ["clang", "gcc"])
@@ -390,28 +477,22 @@ class TestConcretize:
for dep in spec.traverse():
assert "%clang" in dep
- def test_architecture_inheritance(self):
- """test_architecture_inheritance is likely to fail with an
- UnavailableCompilerVersionError if the architecture is concretized
- incorrectly.
- """
- spec = Spec("cmake-client %gcc@11.1.0 os=fe ^ cmake")
- spec.concretize()
- assert spec["cmake"].architecture == spec.architecture
-
- @pytest.mark.only_clingo("Fixing the parser broke this test for the original concretizer")
- def test_architecture_deep_inheritance(self, mock_targets):
+ def test_architecture_deep_inheritance(self, mock_targets, compiler_factory):
"""Make sure that indirect dependencies receive architecture
information from the root even when partial architecture information
is provided by an intermediate dependency.
"""
- spec_str = "mpileaks %gcc@4.5.0 os=CNL target=nocona" " ^dyninst os=CNL ^callpath os=CNL"
- spec = Spec(spec_str).concretized()
- for s in spec.traverse(root=False):
- assert s.architecture.target == spec.architecture.target
+ cnl_compiler = compiler_factory(spec="gcc@4.5.0", operating_system="CNL")
+ # CNL compiler has no target attribute, and this is essential to make detection pass
+ del cnl_compiler["compiler"]["target"]
+ with spack.config.override("compilers", [cnl_compiler]):
+ spec_str = "mpileaks %gcc@4.5.0 os=CNL target=nocona ^dyninst os=CNL ^callpath os=CNL"
+ spec = Spec(spec_str).concretized()
+ for s in spec.traverse(root=False):
+ assert s.architecture.target == spec.architecture.target
def test_compiler_flags_from_user_are_grouped(self):
- spec = Spec('a%gcc cflags="-O -foo-flag foo-val" platform=test')
+ spec = Spec('pkg-a%gcc cflags="-O -foo-flag foo-val" platform=test')
spec.concretize()
cflags = spec.compiler_flags["cflags"]
assert any(x == "-foo-flag foo-val" for x in cflags)
@@ -460,27 +541,20 @@ class TestConcretize:
with pytest.raises(spack.error.SpackError):
s.concretize()
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
- )
@pytest.mark.parametrize(
"spec_str,expected_propagation",
[
- ("hypre~~shared ^openblas+shared", [("hypre", "~shared"), ("openblas", "+shared")]),
# Propagates past a node that doesn't have the variant
("hypre~~shared ^openblas", [("hypre", "~shared"), ("openblas", "~shared")]),
+ # Propagates from root node to all nodes
(
"ascent~~shared +adios2",
[("ascent", "~shared"), ("adios2", "~shared"), ("bzip2", "~shared")],
),
- # Propagates below a node that uses the other value explicitly
+ # Propagate from a node that is not the root node
(
- "ascent~~shared +adios2 ^adios2+shared",
- [("ascent", "~shared"), ("adios2", "+shared"), ("bzip2", "~shared")],
- ),
- (
- "ascent++shared +adios2 ^adios2~shared",
- [("ascent", "+shared"), ("adios2", "~shared"), ("bzip2", "+shared")],
+ "ascent +adios2 ^adios2~~shared",
+ [("ascent", "+shared"), ("adios2", "~shared"), ("bzip2", "~shared")],
),
],
)
@@ -490,49 +564,170 @@ class TestConcretize:
for key, expected_satisfies in expected_propagation:
spec[key].satisfies(expected_satisfies)
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
- )
- def test_concretize_propagated_variant_is_not_passed_to_dependent(self):
- """Test a package variant value was passed from its parent."""
- spec = Spec("ascent~~shared +adios2 ^adios2+shared")
+ def test_concretize_propagate_variant_not_dependencies(self):
+ """Test that when propagating a variant it is not propagated to dependencies that
+ do not have that variant"""
+ spec = Spec("quantum-espresso~~invino")
spec.concretize()
- assert spec.satisfies("^adios2+shared")
- assert spec.satisfies("^bzip2~shared")
+ for dep in spec.traverse(root=False):
+ assert "invino" not in dep.variants.keys()
+
+ def test_concretize_propagate_variant_exclude_dependency_fail(self):
+ """Tests that a propagating variant cannot be allowed to be excluded by any of
+ the source package's dependencies"""
+ spec = Spec("hypre ~~shared ^openblas +shared")
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
+
+ def test_concretize_propagate_same_variant_from_direct_dep_fail(self):
+ """Test that when propagating a variant from the source package and a direct
+ dependency also propagates the same variant with a different value. Raises error"""
+ spec = Spec("ascent +adios2 ++shared ^adios2 ~~shared")
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
+
+ def test_concretize_propagate_same_variant_in_dependency_fail(self):
+ """Test that when propagating a variant from the source package, none of it's
+ dependencies can propagate that variant with a different value. Raises error."""
+ spec = Spec("ascent +adios2 ++shared ^bzip2 ~~shared")
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
+
+ def test_concretize_propagate_same_variant_virtual_dependency_fail(self):
+ """Test that when propagating a variant from the source package and a direct
+ dependency (that is a virtual pkg) also propagates the same variant with a
+ different value. Raises error"""
+ spec = Spec("hypre ++shared ^openblas ~~shared")
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
+
+ def test_concretize_propagate_same_variant_multiple_sources_diamond_dep_fail(self):
+ """Test that fails when propagating the same variant with different values from multiple
+ sources that share a dependency"""
+ spec = Spec("parent-foo-bar ^dependency-foo-bar++bar ^direct-dep-foo-bar~~bar")
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
- @pytest.mark.only_clingo(
- "Optional compiler propagation isn't deprecated for original concretizer"
- )
def test_concretize_propagate_specified_variant(self):
"""Test that only the specified variant is propagated to the dependencies"""
spec = Spec("parent-foo-bar ~~foo")
spec.concretize()
- assert spec.satisfies("~foo") and spec.satisfies("^dependency-foo-bar~foo")
- assert spec.satisfies("+bar") and not spec.satisfies("^dependency-foo-bar+bar")
+ assert spec.satisfies("^dependency-foo-bar~foo")
+ assert spec.satisfies("^second-dependency-foo-bar-fee~foo")
+ assert spec.satisfies("^direct-dep-foo-bar~foo")
+
+ assert not spec.satisfies("^dependency-foo-bar+bar")
+ assert not spec.satisfies("^second-dependency-foo-bar-fee+bar")
+ assert not spec.satisfies("^direct-dep-foo-bar+bar")
+
+ def test_concretize_propagate_one_variant(self):
+ """Test that you can specify to propagate one variant and not all"""
+ spec = Spec("parent-foo-bar ++bar ~foo")
+ spec.concretize()
+
+ assert spec.satisfies("~foo") and not spec.satisfies("^dependency-foo-bar~foo")
+ assert spec.satisfies("+bar") and spec.satisfies("^dependency-foo-bar+bar")
+
+ def test_concretize_propagate_through_first_level_deps(self):
+ """Test that boolean valued variants can be propagated past first level
+ dependecies even if the first level dependency does have the variant"""
+ spec = Spec("parent-foo-bar-fee ++fee")
+ spec.concretize()
+
+ assert spec.satisfies("+fee") and not spec.satisfies("dependency-foo-bar+fee")
+ assert spec.satisfies("^second-dependency-foo-bar-fee+fee")
+
+ def test_concretize_propagate_multiple_variants(self):
+ """Test that multiple boolean valued variants can be propagated from
+ the same source package"""
+ spec = Spec("parent-foo-bar-fee ~~foo ++bar")
+ spec.concretize()
+
+ assert spec.satisfies("~foo") and spec.satisfies("+bar")
+ assert spec.satisfies("^dependency-foo-bar ~foo +bar")
+ assert spec.satisfies("^second-dependency-foo-bar-fee ~foo +bar")
+
+ def test_concretize_propagate_multiple_variants_mulitple_sources(self):
+ """Test the propagates multiple different variants for multiple sources
+ in a diamond dependency"""
+ spec = Spec("parent-foo-bar ^dependency-foo-bar++bar ^direct-dep-foo-bar~~foo")
+ spec.concretize()
+
+ assert spec.satisfies("^second-dependency-foo-bar-fee+bar")
+ assert spec.satisfies("^second-dependency-foo-bar-fee~foo")
+ assert not spec.satisfies("^dependency-foo-bar~foo")
+ assert not spec.satisfies("^direct-dep-foo-bar+bar")
+
+ def test_concretize_propagate_single_valued_variant(self):
+ """Test propagation for single valued variants"""
+ spec = Spec("multivalue-variant libs==static")
+ spec.concretize()
+
+ assert spec.satisfies("libs=static")
+ assert spec.satisfies("^pkg-a libs=static")
- @pytest.mark.only_clingo("Original concretizer is allowed to forego variant propagation")
def test_concretize_propagate_multivalue_variant(self):
"""Test that multivalue variants are propagating the specified value(s)
to their dependecies. The dependencies should not have the default value"""
spec = Spec("multivalue-variant foo==baz,fee")
spec.concretize()
- assert spec.satisfies("^a foo=baz,fee")
- assert spec.satisfies("^b foo=baz,fee")
- assert not spec.satisfies("^a foo=bar")
- assert not spec.satisfies("^b foo=bar")
+ assert spec.satisfies("^pkg-a foo=baz,fee")
+ assert spec.satisfies("^pkg-b foo=baz,fee")
+ assert not spec.satisfies("^pkg-a foo=bar")
+ assert not spec.satisfies("^pkg-b foo=bar")
+
+ def test_concretize_propagate_multiple_multivalue_variant(self):
+ """Tests propagating the same mulitvalued variant from different sources allows
+ the dependents to accept all propagated values"""
+ spec = Spec("multivalue-variant foo==bar ^pkg-a foo==baz")
+ spec.concretize()
+
+ assert spec.satisfies("multivalue-variant foo=bar")
+ assert spec.satisfies("^pkg-a foo=bar,baz")
+ assert spec.satisfies("^pkg-b foo=bar,baz")
+
+ def test_concretize_propagate_variant_not_in_source(self):
+ """Test that variant is still propagated even if the source pkg
+ doesn't have the variant"""
+ spec = Spec("callpath++debug")
+ spec.concretize()
+
+ assert spec.satisfies("^mpich+debug")
+ assert not spec.satisfies("callpath+debug")
+ assert not spec.satisfies("^dyninst+debug")
+
+ def test_concretize_propagate_variant_multiple_deps_not_in_source(self):
+ """Test that a variant can be propagated to multiple dependencies
+ when the variant is not in the source package"""
+ spec = Spec("netlib-lapack++shared")
+ spec.concretize()
+
+ assert spec.satisfies("^openblas+shared")
+ assert spec.satisfies("^perl+shared")
+ assert not spec.satisfies("netlib-lapack+shared")
+
+ def test_concretize_propagate_variant_second_level_dep_not_in_source(self):
+ """Test that a variant can be propagated past first level dependencies
+ when the variant is not in the source package or any of the first level
+ dependencies"""
+ spec = Spec("parent-foo-bar ++fee")
+ spec.concretize()
+
+ assert spec.satisfies("^second-dependency-foo-bar-fee +fee")
+ assert not spec.satisfies("parent-foo-bar +fee")
def test_no_matching_compiler_specs(self, mock_low_high_config):
# only relevant when not building compilers as needed
with spack.concretize.enable_compiler_existence_check():
- s = Spec("a %gcc@=0.0.0")
+ s = Spec("pkg-a %gcc@=0.0.0")
with pytest.raises(spack.concretize.UnavailableCompilerVersionError):
s.concretize()
def test_no_compilers_for_arch(self):
- s = Spec("a arch=linux-rhel0-x86_64")
+ s = Spec("pkg-a arch=linux-rhel0-x86_64")
with pytest.raises(spack.error.SpackError):
s.concretize()
@@ -569,12 +764,7 @@ class TestConcretize:
assert all(not d.dependencies(name="mpi") for d in spec.traverse())
assert all(x in spec for x in ("zmpi", "mpi"))
- def test_my_dep_depends_on_provider_of_my_virtual_dep(self):
- spec = Spec("indirect-mpich")
- spec.normalize()
- spec.concretize()
-
- @pytest.mark.parametrize("compiler_str", ["clang", "gcc", "gcc@10.2.1", "clang@:12.0.0"])
+ @pytest.mark.parametrize("compiler_str", ["clang", "gcc", "gcc@10.2.1", "clang@:15.0.0"])
def test_compiler_inheritance(self, compiler_str):
spec_str = "mpileaks %{0}".format(compiler_str)
spec = Spec(spec_str).concretized()
@@ -590,20 +780,6 @@ class TestConcretize:
assert "externalprereq" not in spec
assert spec["externaltool"].compiler.satisfies("gcc")
- def test_external_package_module(self):
- # No tcl modules on darwin/linux machines
- # and Windows does not (currently) allow for bash calls
- # TODO: improved way to check for this.
- platform = spack.platforms.real_host().name
- if platform == "darwin" or platform == "linux" or platform == "windows":
- return
-
- spec = Spec("externalmodule")
- spec.concretize()
- assert spec["externalmodule"].external_modules == ["external-module"]
- assert "externalprereq" not in spec
- assert spec["externalmodule"].compiler.satisfies("gcc")
-
def test_nobuild_package(self):
"""Test that a non-buildable package raise an error if no specs
in packages.yaml are compatible with the request.
@@ -612,7 +788,8 @@ class TestConcretize:
with pytest.raises(spack.error.SpecError):
spec.concretize()
- def test_external_and_virtual(self):
+ def test_external_and_virtual(self, mutable_config):
+ mutable_config.set("packages:stuff", {"buildable": False})
spec = Spec("externaltest")
spec.concretize()
assert spec["externaltool"].external_path == os.path.sep + os.path.join(
@@ -624,39 +801,6 @@ class TestConcretize:
assert spec["externaltool"].compiler.satisfies("gcc")
assert spec["stuff"].compiler.satisfies("gcc")
- def test_find_spec_parents(self):
- """Tests the spec finding logic used by concretization."""
- s = Spec.from_literal({"a +foo": {"b +foo": {"c": None, "d+foo": None}, "e +foo": None}})
-
- assert "a" == find_spec(s["b"], lambda s: "+foo" in s).name
-
- def test_find_spec_children(self):
- s = Spec.from_literal({"a": {"b +foo": {"c": None, "d+foo": None}, "e +foo": None}})
-
- assert "d" == find_spec(s["b"], lambda s: "+foo" in s).name
-
- s = Spec.from_literal({"a": {"b +foo": {"c+foo": None, "d": None}, "e +foo": None}})
-
- assert "c" == find_spec(s["b"], lambda s: "+foo" in s).name
-
- def test_find_spec_sibling(self):
- s = Spec.from_literal({"a": {"b +foo": {"c": None, "d": None}, "e +foo": None}})
-
- assert "e" == find_spec(s["b"], lambda s: "+foo" in s).name
- assert "b" == find_spec(s["e"], lambda s: "+foo" in s).name
-
- s = Spec.from_literal({"a": {"b +foo": {"c": None, "d": None}, "e": {"f +foo": None}}})
-
- assert "f" == find_spec(s["b"], lambda s: "+foo" in s).name
-
- def test_find_spec_self(self):
- s = Spec.from_literal({"a": {"b +foo": {"c": None, "d": None}, "e": None}})
- assert "b" == find_spec(s["b"], lambda s: "+foo" in s).name
-
- def test_find_spec_none(self):
- s = Spec.from_literal({"a": {"b": {"c": None, "d": None}, "e": None}})
- assert find_spec(s["b"], lambda s: "+foo" in s) is None
-
def test_compiler_child(self):
s = Spec("mpileaks%clang target=x86_64 ^dyninst%gcc")
s.concretize()
@@ -668,7 +812,6 @@ class TestConcretize:
with pytest.raises(spack.error.SpackError):
s.concretize()
- @pytest.mark.only_clingo("Testing debug statements specific to new concretizer")
def test_conflicts_show_cores(self, conflict_spec, monkeypatch):
s = Spec(conflict_spec)
with pytest.raises(spack.error.SpackError) as e:
@@ -717,15 +860,15 @@ class TestConcretize:
s = Spec("mpileaks")
s.concretize()
- assert llnl.util.lang.ObjectWrapper not in type(s).__mro__
+ assert llnl.util.lang.ObjectWrapper not in s.__class__.__mro__
# Spec wrapped in a build interface
build_interface = s["mpileaks"]
- assert llnl.util.lang.ObjectWrapper in type(build_interface).__mro__
+ assert llnl.util.lang.ObjectWrapper in build_interface.__class__.__mro__
# Mimics asking the build interface from a build interface
build_interface = s["mpileaks"]["mpileaks"]
- assert llnl.util.lang.ObjectWrapper in type(build_interface).__mro__
+ assert llnl.util.lang.ObjectWrapper in build_interface.__class__.__mro__
@pytest.mark.regression("7705")
def test_regression_issue_7705(self):
@@ -741,7 +884,7 @@ class TestConcretize:
# The string representation of a spec containing
# an explicit multi-valued variant and a dependency
# might be parsed differently than the originating spec
- s = Spec("a foobar=bar ^b")
+ s = Spec("pkg-a foobar=bar ^pkg-b")
t = Spec(str(s))
s.concretize()
@@ -766,7 +909,7 @@ class TestConcretize:
)
def test_simultaneous_concretization_of_specs(self, abstract_specs):
abstract_specs = [Spec(x) for x in abstract_specs]
- concrete_specs = spack.concretize.concretize_specs_together(*abstract_specs)
+ concrete_specs = spack.concretize.concretize_specs_together(abstract_specs)
# Check there's only one configuration of each package in the DAG
names = set(dep.name for spec in concrete_specs for dep in spec.traverse())
@@ -834,18 +977,20 @@ class TestConcretize:
@pytest.mark.parametrize(
"spec_str,expected_str",
[
- # Unconstrained versions select default compiler (gcc@4.5.0)
+ # Unconstrained versions select default compiler (gcc@10.2.1)
("bowtie@1.4.0", "%gcc@10.2.1"),
# Version with conflicts and no valid gcc select another compiler
- ("bowtie@1.3.0", "%clang@12.0.0"),
+ ("bowtie@1.3.0", "%clang@15.0.0"),
# If a higher gcc is available still prefer that
("bowtie@1.2.2 os=redhat6", "%gcc@11.1.0"),
],
)
- @pytest.mark.only_clingo("Original concretizer cannot work around conflicts")
- def test_compiler_conflicts_in_package_py(self, spec_str, expected_str):
- s = Spec(spec_str).concretized()
- assert s.satisfies(expected_str)
+ def test_compiler_conflicts_in_package_py(
+ self, spec_str, expected_str, clang12_with_flags, gcc11_with_flags
+ ):
+ with spack.config.override("compilers", [clang12_with_flags, gcc11_with_flags]):
+ s = Spec(spec_str).concretized()
+ assert s.satisfies(expected_str)
@pytest.mark.parametrize(
"spec_str,expected,unexpected",
@@ -882,7 +1027,9 @@ class TestConcretize:
],
)
def test_conditional_variants_fail(self, bad_spec):
- with pytest.raises((spack.error.UnsatisfiableSpecError, vt.InvalidVariantForSpecError)):
+ with pytest.raises(
+ (spack.error.UnsatisfiableSpecError, spack.spec.InvalidVariantForSpecError)
+ ):
_ = Spec("conditional-variant-pkg" + bad_spec).concretized()
@pytest.mark.parametrize(
@@ -895,7 +1042,15 @@ class TestConcretize:
("py-extension3@1.0 ^python@3.5.1", ["patchelf@0.10"], []),
],
)
- def test_conditional_dependencies(self, spec_str, expected, unexpected):
+ def test_conditional_dependencies(self, spec_str, expected, unexpected, fuzz_dep_order):
+ """Tests that conditional dependencies are correctly attached.
+
+ The original concretizer can be sensitive to the iteration order over the dependencies of
+ a package, so we use a fuzzer function to test concretization with dependencies iterated
+ forwards and backwards.
+ """
+ fuzz_dep_order("py-extension3") # test forwards and backwards
+
s = Spec(spec_str).concretized()
for dep in expected:
@@ -947,7 +1102,6 @@ class TestConcretize:
("quantum-espresso~veritas", ["^libelf@0.8.13"]),
],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_working_around_conflicting_defaults(self, spec_str, expected):
s = Spec(spec_str).concretized()
@@ -960,8 +1114,7 @@ class TestConcretize:
"spec_str,expected",
[("cmake", ["%clang"]), ("cmake %gcc", ["%gcc"]), ("cmake %clang", ["%clang"])],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
- def test_external_package_and_compiler_preferences(self, spec_str, expected):
+ def test_external_package_and_compiler_preferences(self, spec_str, expected, mutable_config):
packages_yaml = {
"all": {"compiler": ["clang", "gcc"]},
"cmake": {
@@ -969,7 +1122,7 @@ class TestConcretize:
"buildable": False,
},
}
- spack.config.set("packages", packages_yaml)
+ mutable_config.set("packages", packages_yaml)
s = Spec(spec_str).concretized()
assert s.external
@@ -977,7 +1130,6 @@ class TestConcretize:
assert s.satisfies(condition)
@pytest.mark.regression("5651")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_package_with_constraint_not_met_by_external(self):
"""Check that if we have an external package A at version X.Y in
packages.yaml, but our spec doesn't allow X.Y as a version, then
@@ -992,7 +1144,6 @@ class TestConcretize:
assert not s["libelf"].external
@pytest.mark.regression("9744")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_cumulative_version_ranges_with_different_length(self):
s = Spec("cumulative-vrange-root").concretized()
assert s.concrete
@@ -1020,7 +1171,6 @@ class TestConcretize:
@pytest.mark.parametrize(
"spec_str,expected", [("cmake %gcc", "%gcc"), ("cmake %clang", "%clang")]
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_compiler_constraint_with_external_package(self, spec_str, expected):
packages_yaml = {
"cmake": {"externals": [{"spec": "cmake@3.4.3", "prefix": "/usr"}], "buildable": False}
@@ -1065,37 +1215,25 @@ class TestConcretize:
spack.config.set("packages", packages_yaml)
s = Spec(spec_str).concretized()
- if xfailold and spack.config.get("config:concretizer") == "original":
- pytest.xfail("This only works on the ASP-based concretizer")
assert s.satisfies(expected)
assert "external-common-perl" not in [d.name for d in s.dependencies()]
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
- def test_external_packages_have_consistent_hash(self):
- s, t = Spec("externaltool"), Spec("externaltool")
- s._old_concretize(), t._new_concretize()
-
- assert s.dag_hash() == t.dag_hash()
-
def test_external_that_would_require_a_virtual_dependency(self):
s = Spec("requires-virtual").concretized()
assert s.external
assert "stuff" not in s
- def test_transitive_conditional_virtual_dependency(self):
+ def test_transitive_conditional_virtual_dependency(self, mutable_config):
+ """Test that an external is used as provider if the virtual is non-buildable"""
+ mutable_config.set("packages:stuff", {"buildable": False})
s = Spec("transitive-conditional-virtual-dependency").concretized()
- # The default for conditional-virtual-dependency is to have
- # +stuff~mpi, so check that these defaults are respected
- assert "+stuff" in s["conditional-virtual-dependency"]
- assert "~mpi" in s["conditional-virtual-dependency"]
-
- # 'stuff' is provided by an external package, so check it's present
- assert "externalvirtual" in s
+ # Test that the default +stuff~mpi is maintained, and the right provider is selected
+ assert s.satisfies("^conditional-virtual-dependency +stuff~mpi")
+ assert s.satisfies("^[virtuals=stuff] externalvirtual")
@pytest.mark.regression("20040")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_conditional_provides_or_depends_on(self):
# Check that we can concretize correctly a spec that can either
# provide a virtual or depend on it based on the value of a variant
@@ -1110,14 +1248,14 @@ class TestConcretize:
[
# Check that True is treated correctly and attaches test deps
# to all nodes in the DAG
- ("a", True, ["a"], []),
- ("a foobar=bar", True, ["a", "b"], []),
+ ("pkg-a", True, ["pkg-a"], []),
+ ("pkg-a foobar=bar", True, ["pkg-a", "pkg-b"], []),
# Check that a list of names activates the dependency only for
# packages in that list
- ("a foobar=bar", ["a"], ["a"], ["b"]),
- ("a foobar=bar", ["b"], ["b"], ["a"]),
+ ("pkg-a foobar=bar", ["pkg-a"], ["pkg-a"], ["pkg-b"]),
+ ("pkg-a foobar=bar", ["pkg-b"], ["pkg-b"], ["pkg-a"]),
# Check that False disregard test dependencies
- ("a foobar=bar", False, [], ["a", "b"]),
+ ("pkg-a foobar=bar", False, [], ["pkg-a", "pkg-b"]),
],
)
def test_activating_test_dependencies(self, spec_str, tests_arg, with_dep, without_dep):
@@ -1134,24 +1272,24 @@ class TestConcretize:
assert not node.dependencies(deptype="test"), msg.format(pkg_name)
@pytest.mark.regression("20019")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
- def test_compiler_match_is_preferred_to_newer_version(self):
+ def test_compiler_match_is_preferred_to_newer_version(self, compiler_factory):
# This spec depends on openblas. Openblas has a conflict
# that doesn't allow newer versions with gcc@4.4.0. Check
# that an old version of openblas is selected, rather than
# a different compiler for just that node.
- spec_str = "simple-inheritance+openblas %gcc@10.1.0 os=redhat6"
- s = Spec(spec_str).concretized()
-
- assert "openblas@0.2.15" in s
- assert s["openblas"].satisfies("%gcc@10.1.0")
+ with spack.config.override(
+ "compilers", [compiler_factory(spec="gcc@10.1.0", operating_system="redhat6")]
+ ):
+ spec_str = "simple-inheritance+openblas %gcc@10.1.0 os=redhat6"
+ s = Spec(spec_str).concretized()
+ assert "openblas@0.2.15" in s
+ assert s["openblas"].satisfies("%gcc@10.1.0")
@pytest.mark.regression("19981")
def test_target_ranges_in_conflicts(self):
with pytest.raises(spack.error.SpackError):
Spec("impossible-concretization").concretized()
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_target_compatibility(self):
with pytest.raises(spack.error.SpackError):
Spec("libdwarf target=x86_64 ^libelf target=x86_64_v2").concretized()
@@ -1168,9 +1306,12 @@ class TestConcretize:
assert "+foo+bar+baz" in d
@pytest.mark.regression("20055")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
- def test_custom_compiler_version(self):
- s = Spec("a %gcc@10foo os=redhat6").concretized()
+ def test_custom_compiler_version(self, mutable_config, compiler_factory, monkeypatch):
+ mutable_config.set(
+ "compilers", [compiler_factory(spec="gcc@10foo", operating_system="redhat6")]
+ )
+ monkeypatch.setattr(spack.compiler.Compiler, "real_version", "10.2.1")
+ s = Spec("pkg-a %gcc@10foo os=redhat6").concretized()
assert "%gcc@10foo" in s
def test_all_patches_applied(self):
@@ -1247,7 +1388,7 @@ class TestConcretize:
return [first_spec]
if mock_db:
- temporary_store.db.add(first_spec, None)
+ temporary_store.db.add(first_spec)
else:
monkeypatch.setattr(spack.binary_distribution, "update_cache_and_get_specs", mock_fn)
@@ -1265,14 +1406,16 @@ class TestConcretize:
{"add_variant": True, "delete_variant": True},
],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_reuse_installed_packages_when_package_def_changes(
self, context, mutable_database, repo_with_changing_recipe
):
+ # test applies only with reuse turned off in concretizer
+ spack.config.set("concretizer:reuse", False)
+
# Install a spec
root = Spec("root").concretized()
dependency = root["changing"].copy()
- root.package.do_install(fake=True, explicit=True)
+ PackageInstaller([root.package], fake=True, explicit=True).install()
# Modify package.py
repo_with_changing_recipe.change(context)
@@ -1292,13 +1435,27 @@ class TestConcretize:
# Structure and package hash will be different without reuse
assert root.dag_hash() != new_root_without_reuse.dag_hash()
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
+ @pytest.mark.regression("43663")
+ def test_no_reuse_when_variant_condition_does_not_hold(self, mutable_database, mock_packages):
+ spack.config.set("concretizer:reuse", True)
+
+ # Install a spec for which the `version_based` variant condition does not hold
+ old = Spec("conditional-variant-pkg @1").concretized()
+ PackageInstaller([old.package], fake=True, explicit=True).install()
+
+ # Then explicitly require a spec with `+version_based`, which shouldn't reuse previous spec
+ new1 = Spec("conditional-variant-pkg +version_based").concretized()
+ assert new1.satisfies("@2 +version_based")
+
+ new2 = Spec("conditional-variant-pkg +two_whens").concretized()
+ assert new2.satisfies("@2 +two_whens +version_based")
+
def test_reuse_with_flags(self, mutable_database, mutable_config):
spack.config.set("concretizer:reuse", True)
- spec = Spec("a cflags=-g cxxflags=-g").concretized()
- spack.store.STORE.db.add(spec, None)
+ spec = Spec("pkg-a cflags=-g cxxflags=-g").concretized()
+ PackageInstaller([spec.package], fake=True, explicit=True).install()
- testspec = Spec("a cflags=-g")
+ testspec = Spec("pkg-a cflags=-g")
testspec.concretize()
assert testspec == spec
@@ -1313,10 +1470,9 @@ class TestConcretize:
@pytest.mark.parametrize(
"spec_str", ["wrong-variant-in-conflicts", "wrong-variant-in-depends-on"]
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_error_message_for_inconsistent_variants(self, spec_str):
s = Spec(spec_str)
- with pytest.raises(RuntimeError, match="not found in package"):
+ with pytest.raises(vt.UnknownVariantError):
s.concretize()
@pytest.mark.regression("22533")
@@ -1369,16 +1525,23 @@ class TestConcretize:
("mpileaks%gcc@10.2.1 platform=test os=redhat6", "os=redhat6"),
],
)
- def test_os_selection_when_multiple_choices_are_possible(self, spec_str, expected_os):
- s = Spec(spec_str).concretized()
-
- for node in s.traverse():
- assert node.satisfies(expected_os)
+ def test_os_selection_when_multiple_choices_are_possible(
+ self, spec_str, expected_os, compiler_factory
+ ):
+ # GCC 10.2.1 is defined both for debian and for redhat
+ with spack.config.override(
+ "compilers", [compiler_factory(spec="gcc@10.2.1", operating_system="redhat6")]
+ ):
+ s = Spec(spec_str).concretized()
+ for node in s.traverse():
+ if node.name == "glibc":
+ continue
+ assert node.satisfies(expected_os)
@pytest.mark.regression("22718")
@pytest.mark.parametrize(
"spec_str,expected_compiler",
- [("mpileaks", "%gcc@10.2.1"), ("mpileaks ^mpich%clang@12.0.0", "%clang@12.0.0")],
+ [("mpileaks", "%gcc@10.2.1"), ("mpileaks ^mpich%clang@15.0.0", "%clang@15.0.0")],
)
def test_compiler_is_unique(self, spec_str, expected_compiler):
s = Spec(spec_str).concretized()
@@ -1411,7 +1574,6 @@ class TestConcretize:
("deprecated-versions@=1.1.0", "deprecated-versions@1.1.0"),
],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_deprecated_versions_not_selected(self, spec_str, expected):
with spack.config.override("config:deprecated", True):
s = Spec(spec_str).concretized()
@@ -1472,9 +1634,8 @@ class TestConcretize:
"spec_str,expect_installed",
[("mpich", True), ("mpich+debug", False), ("mpich~debug", True)],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_concrete_specs_are_not_modified_on_reuse(
- self, mutable_database, spec_str, expect_installed, config
+ self, mutable_database, spec_str, expect_installed
):
# Test the internal consistency of solve + DAG reconstruction
# when reused specs are added to the mix. This prevents things
@@ -1486,7 +1647,6 @@ class TestConcretize:
assert s.satisfies(spec_str)
@pytest.mark.regression("26721,19736")
- @pytest.mark.only_clingo("Original concretizer cannot use sticky variants")
def test_sticky_variant_in_package(self):
# Here we test that a sticky variant cannot be changed from its default value
# by the ASP solver if not set explicitly. The package used in the test needs
@@ -1501,7 +1661,29 @@ class TestConcretize:
s = Spec("sticky-variant %clang").concretized()
assert s.satisfies("%clang") and s.satisfies("~allow-gcc")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
+ @pytest.mark.regression("42172")
+ @pytest.mark.parametrize(
+ "spec,allow_gcc",
+ [
+ ("sticky-variant@1.0+allow-gcc", True),
+ ("sticky-variant@1.0~allow-gcc", False),
+ ("sticky-variant@1.0", False),
+ ],
+ )
+ def test_sticky_variant_in_external(self, spec, allow_gcc):
+ # setup external for sticky-variant+allow-gcc
+ config = {"externals": [{"spec": spec, "prefix": "/fake/path"}], "buildable": False}
+ spack.config.set("packages:sticky-variant", config)
+
+ maybe = llnl.util.lang.nullcontext if allow_gcc else pytest.raises
+ with maybe(spack.error.SpackError):
+ s = Spec("sticky-variant-dependent%gcc").concretized()
+
+ if allow_gcc:
+ assert s.satisfies("%gcc")
+ assert s["sticky-variant"].satisfies("+allow-gcc")
+ assert s["sticky-variant"].external
+
def test_do_not_invent_new_concrete_versions_unless_necessary(self):
# ensure we select a known satisfying version rather than creating
# a new '2.7' version.
@@ -1523,14 +1705,12 @@ class TestConcretize:
("conditional-values-in-variant foo=foo", True),
],
)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_conditional_values_in_variants(self, spec_str, valid):
s = Spec(spec_str)
raises = pytest.raises((RuntimeError, spack.error.UnsatisfiableSpecError))
with llnl.util.lang.nullcontext() if valid else raises:
s.concretize()
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_conditional_values_in_conditional_variant(self):
"""Test that conditional variants play well with conditional possible values"""
s = Spec("conditional-values-in-variant@1.50.0").concretized()
@@ -1539,7 +1719,6 @@ class TestConcretize:
s = Spec("conditional-values-in-variant@1.60.0").concretized()
assert "cxxstd" in s.variants
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_target_granularity(self):
# The test architecture uses core2 as the default target. Check that when
# we configure Spack for "generic" granularity we concretize for x86_64
@@ -1550,7 +1729,6 @@ class TestConcretize:
with spack.config.override("concretizer:targets", {"granularity": "generic"}):
assert s.concretized().satisfies("target=%s" % generic_target)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_host_compatible_concretization(self):
# Check that after setting "host_compatible" to false we cannot concretize.
# Here we use "k10" to set a target non-compatible with the current host
@@ -1563,7 +1741,6 @@ class TestConcretize:
with pytest.raises(spack.error.SpackError):
s.concretized()
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_add_microarchitectures_on_explicit_request(self):
# Check that if we consider only "generic" targets, we can still solve for
# specific microarchitectures on explicit requests
@@ -1572,13 +1749,12 @@ class TestConcretize:
assert s.satisfies("target=k10")
@pytest.mark.regression("29201")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_delete_version_and_reuse(self, mutable_database, repo_with_changing_recipe):
"""Test that we can reuse installed specs with versions not
declared in package.py
"""
root = Spec("root").concretized()
- root.package.do_install(fake=True, explicit=True)
+ PackageInstaller([root.package], fake=True, explicit=True).install()
repo_with_changing_recipe.change({"delete_version": True})
with spack.config.override("concretizer:reuse", True):
@@ -1587,7 +1763,6 @@ class TestConcretize:
assert root.dag_hash() == new_root.dag_hash()
@pytest.mark.regression("29201")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_installed_version_is_selected_only_for_reuse(
self, mutable_database, repo_with_changing_recipe
):
@@ -1597,7 +1772,7 @@ class TestConcretize:
# Install a dependency that cannot be reused with "root"
# because of a conflict in a variant, then delete its version
dependency = Spec("changing@1.0~foo").concretized()
- dependency.package.do_install(fake=True, explicit=True)
+ PackageInstaller([dependency.package], fake=True, explicit=True).install()
repo_with_changing_recipe.change({"delete_version": True})
with spack.config.override("concretizer:reuse", True):
@@ -1610,49 +1785,62 @@ class TestConcretize:
self, temporary_store, mock_custom_repository
):
with spack.repo.use_repositories(mock_custom_repository, override=False):
- s = Spec("c").concretized()
+ s = Spec("pkg-c").concretized()
assert s.namespace != "builtin.mock"
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
with spack.config.override("concretizer:reuse", True):
- s = Spec("c").concretized()
+ s = Spec("pkg-c").concretized()
assert s.namespace == "builtin.mock"
+ @pytest.mark.regression("45538")
+ def test_reuse_from_other_namespace_no_raise(self, tmpdir, temporary_store, monkeypatch):
+ myrepo = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo")
+ myrepo.add_package("zlib")
+
+ builtin = Spec("zlib").concretized()
+ PackageInstaller([builtin.package], fake=True, explicit=True).install()
+
+ with spack.repo.use_repositories(myrepo.root, override=False):
+ with spack.config.override("concretizer:reuse", True):
+ myrepo = Spec("myrepo.zlib").concretized()
+
+ assert myrepo.namespace == "myrepo"
+
@pytest.mark.regression("28259")
def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, monkeypatch):
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo")
- builder.add_package("c")
+ builder.add_package("pkg-c")
with spack.repo.use_repositories(builder.root, override=False):
- s = Spec("c").concretized()
+ s = Spec("pkg-c").concretized()
assert s.namespace == "myrepo"
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
- del sys.modules["spack.pkg.myrepo.c"]
+ del sys.modules["spack.pkg.myrepo.pkg-c"]
del sys.modules["spack.pkg.myrepo"]
- builder.remove("c")
+ builder.remove("pkg-c")
with spack.repo.use_repositories(builder.root, override=False) as repos:
# TODO (INJECT CONFIGURATION): unclear why the cache needs to be invalidated explicitly
repos.repos[0]._pkg_checker.invalidate()
with spack.config.override("concretizer:reuse", True):
- s = Spec("c").concretized()
+ s = Spec("pkg-c").concretized()
assert s.namespace == "builtin.mock"
@pytest.mark.parametrize(
- "specs,expected",
+ "specs,expected,libc_offset",
[
- (["libelf", "libelf@0.8.10"], 1),
- (["libdwarf%gcc", "libelf%clang"], 2),
- (["libdwarf%gcc", "libdwarf%clang"], 4),
- (["libdwarf^libelf@0.8.12", "libdwarf^libelf@0.8.13"], 4),
- (["hdf5", "zmpi"], 3),
- (["hdf5", "mpich"], 2),
- (["hdf5^zmpi", "mpich"], 4),
- (["mpi", "zmpi"], 2),
- (["mpi", "mpich"], 1),
+ (["libelf", "libelf@0.8.10"], 1, 1),
+ (["libdwarf%gcc", "libelf%clang"], 2, 1),
+ (["libdwarf%gcc", "libdwarf%clang"], 3, 1),
+ (["libdwarf^libelf@0.8.12", "libdwarf^libelf@0.8.13"], 4, 1),
+ (["hdf5", "zmpi"], 3, 1),
+ (["hdf5", "mpich"], 2, 1),
+ (["hdf5^zmpi", "mpich"], 4, 1),
+ (["mpi", "zmpi"], 2, 1),
+ (["mpi", "mpich"], 1, 1),
],
)
- @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds")
- def test_best_effort_coconcretize(self, specs, expected):
+ def test_best_effort_coconcretize(self, specs, expected, libc_offset):
specs = [Spec(s) for s in specs]
solver = spack.solver.asp.Solver()
solver.reuse = False
@@ -1661,7 +1849,10 @@ class TestConcretize:
for s in result.specs:
concrete_specs.update(s.traverse())
- assert len(concrete_specs) == expected
+ if not spack.solver.asp.using_libc_compatibility():
+ libc_offset = 0
+
+ assert len(concrete_specs) == expected + libc_offset
@pytest.mark.parametrize(
"specs,expected_spec,occurances",
@@ -1693,7 +1884,6 @@ class TestConcretize:
(["hdf5+mpi", "zmpi", "mpich"], "mpich", 2),
],
)
- @pytest.mark.only_clingo("Original concretizer cannot concretize in rounds")
def test_best_effort_coconcretize_preferences(self, specs, expected_spec, occurances):
"""Test package preferences during coconcretization."""
specs = [Spec(s) for s in specs]
@@ -1709,7 +1899,21 @@ class TestConcretize:
counter += 1
assert counter == occurances, concrete_specs
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
+ def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages):
+ specs = [Spec(x) for x in ["libdwarf%gcc", "libdwarf%clang"]]
+ solver = spack.solver.asp.Solver()
+ solver.reuse = False
+
+ simulate_unsolved_property = list((x, None) for x in specs)
+ monkeypatch.setattr(spack.solver.asp.Result, "unsolved_specs", simulate_unsolved_property)
+ monkeypatch.setattr(spack.solver.asp.Result, "specs", list())
+
+ with pytest.raises(
+ spack.solver.asp.InternalConcretizerError,
+ match="a subset of input specs could not be solved for",
+ ):
+ list(solver.solve_in_rounds(specs))
+
def test_coconcretize_reuse_and_virtuals(self):
reusable_specs = []
for s in ["mpileaks ^mpich", "zmpi"]:
@@ -1726,7 +1930,6 @@ class TestConcretize:
assert "zmpi" in spec
@pytest.mark.regression("30864")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_misleading_error_message_on_version(self, mutable_database):
# For this bug to be triggered we need a reusable dependency
# that is not optimal in terms of optimization scores.
@@ -1743,53 +1946,54 @@ class TestConcretize:
solver.driver.solve(setup, [root_spec], reuse=reusable_specs)
@pytest.mark.regression("31148")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_version_weight_and_provenance(self):
"""Test package preferences during coconcretization."""
- reusable_specs = [Spec(spec_str).concretized() for spec_str in ("b@0.9", "b@1.0")]
- root_spec = Spec("a foobar=bar")
+ reusable_specs = [Spec(spec_str).concretized() for spec_str in ("pkg-b@0.9", "pkg-b@1.0")]
+ root_spec = Spec("pkg-a foobar=bar")
with spack.config.override("concretizer:reuse", True):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(setup, [root_spec], reuse=reusable_specs)
- # The result here should have a single spec to build ('a')
- # and it should be using b@1.0 with a version badness of 2
+ # The result here should have a single spec to build ('pkg-a')
+ # and it should be using pkg-b@1.0 with a version badness of 2
# The provenance is:
- # version_declared("b","1.0",0,"package_py").
- # version_declared("b","0.9",1,"package_py").
- # version_declared("b","1.0",2,"installed").
- # version_declared("b","0.9",3,"installed").
+ # version_declared("pkg-b","1.0",0,"package_py").
+ # version_declared("pkg-b","0.9",1,"package_py").
+ # version_declared("pkg-b","1.0",2,"installed").
+ # version_declared("pkg-b","0.9",3,"installed").
#
# Depending on the target, it may also use gnuconfig
result_spec = result.specs[0]
num_specs = len(list(result_spec.traverse()))
+ libc_offset = 1 if spack.solver.asp.using_libc_compatibility() else 0
criteria = [
- (num_specs - 1, None, "number of packages to build (vs. reuse)"),
- (2, 0, "version badness"),
+ (num_specs - 1 - libc_offset, None, "number of packages to build (vs. reuse)"),
+ (2, 0, "version badness (non roots)"),
]
for criterion in criteria:
- assert criterion in result.criteria
- assert result_spec.satisfies("^b@1.0")
+ assert criterion in result.criteria, criterion
+ assert result_spec.satisfies("^pkg-b@1.0")
- @pytest.mark.regression("31169")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
- def test_not_reusing_incompatible_os_or_compiler(self):
- root_spec = Spec("b")
+ def test_reuse_succeeds_with_config_compatible_os(self):
+ root_spec = Spec("pkg-b")
s = root_spec.concretized()
- wrong_compiler, wrong_os = s.copy(), s.copy()
- wrong_compiler.compiler = spack.spec.CompilerSpec("gcc@12.1.0")
- wrong_os.architecture = spack.spec.ArchSpec("test-ubuntu2204-x86_64")
- reusable_specs = [wrong_compiler, wrong_os]
- with spack.config.override("concretizer:reuse", True):
+ other_os = s.copy()
+ mock_os = "ubuntu2204"
+ other_os.architecture = spack.spec.ArchSpec(
+ "test-{os}-{target}".format(os=mock_os, target=str(s.architecture.target))
+ )
+ reusable_specs = [other_os]
+ overrides = {"concretizer": {"reuse": True, "os_compatible": {s.os: [mock_os]}}}
+ custom_scope = spack.config.InternalConfigScope("concretize_override", overrides)
+ with spack.config.override(custom_scope):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(setup, [root_spec], reuse=reusable_specs)
concrete_spec = result.specs[0]
- assert concrete_spec.satisfies("%{}".format(s.compiler))
- assert concrete_spec.satisfies("os={}".format(s.architecture.os))
+ assert concrete_spec.satisfies("os={}".format(other_os.architecture.os))
def test_git_hash_assigned_version_is_preferred(self):
hash = "a" * 40
@@ -1798,7 +2002,6 @@ class TestConcretize:
assert hash in str(c)
@pytest.mark.parametrize("git_ref", ("a" * 40, "0.2.15", "main"))
- @pytest.mark.only_clingo("Original concretizer cannot account for git hashes")
def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref):
s = Spec("develop-branch-version@git.%s=develop" % git_ref)
c = s.concretized()
@@ -1808,7 +2011,6 @@ class TestConcretize:
assert s.satisfies("@0.1:")
@pytest.mark.parametrize("git_ref", ("a" * 40, "0.2.15", "fbranch"))
- @pytest.mark.only_clingo("Original concretizer cannot account for git hashes")
def test_git_ref_version_succeeds_with_unknown_version(self, git_ref):
# main is not defined in the package.py for this file
s = Spec("develop-branch-version@git.%s=main" % git_ref)
@@ -1816,7 +2018,6 @@ class TestConcretize:
assert s.satisfies("develop-branch-version@main")
@pytest.mark.regression("31484")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_installed_externals_are_reused(
self, mutable_database, repo_with_changing_recipe, tmp_path
):
@@ -1831,7 +2032,7 @@ class TestConcretize:
# Install the external spec
external1 = Spec("changing@1.0").concretized()
- external1.package.do_install(fake=True, explicit=True)
+ PackageInstaller([external1.package], fake=True, explicit=True).install()
assert external1.external
# Modify the package.py file
@@ -1848,7 +2049,6 @@ class TestConcretize:
assert external3.dag_hash() == external1.dag_hash()
@pytest.mark.regression("31484")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_user_can_select_externals_with_require(self, mutable_database, tmp_path):
"""Test that users have means to select an external even in presence of reusable specs."""
external_conf = {
@@ -1877,14 +2077,13 @@ class TestConcretize:
assert mpi_spec.name == "multi-provider-mpi"
@pytest.mark.regression("31484")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch):
"""Test that installed specs do not trigger conflicts. This covers for the rare case
where a conflict is added on a package after a spec matching the conflict was installed.
"""
# Add a conflict to "mpich" that match an already installed "mpich~debug"
pkg_cls = spack.repo.PATH.get_pkg_class("mpich")
- monkeypatch.setitem(pkg_cls.conflicts, "~debug", [(Spec(), None)])
+ monkeypatch.setitem(pkg_cls.conflicts, Spec(), [("~debug", None)])
# If we concretize with --fresh the conflict is taken into account
with spack.config.override("concretizer:reuse", False):
@@ -1898,7 +2097,6 @@ class TestConcretize:
assert s.satisfies("~debug"), s
@pytest.mark.regression("32471")
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_require_targets_are_allowed(self, mutable_database):
"""Test that users can set target constraints under the require attribute."""
# Configuration to be added to packages.yaml
@@ -1976,7 +2174,11 @@ class TestConcretize:
# install python external
python = Spec("python").concretized()
- monkeypatch.setattr(spack.store.STORE.db, "query", lambda x: [python])
+
+ def query(*args, **kwargs):
+ return [python]
+
+ monkeypatch.setattr(spack.store.STORE.db, "query", query)
# ensure that we can't be faking this by getting it from config
external_conf.pop("python")
@@ -1994,11 +2196,13 @@ class TestConcretize:
"""Test that python extensions have access to a python dependency
when python isn't otherwise in the DAG"""
- python_spec = Spec("python@=detected")
prefix = os.path.sep + "fake"
+ python_spec = Spec.from_detection("python@=detected", external_path=prefix)
def find_fake_python(classes, path_hints):
- return {"python": [spack.detection.DetectedPackage(python_spec, prefix=path_hints[0])]}
+ return {
+ "python": [Spec.from_detection("python@=detected", external_path=path_hints[0])]
+ }
monkeypatch.setattr(spack.detection, "by_path", find_fake_python)
external_conf = {
@@ -2013,7 +2217,8 @@ class TestConcretize:
assert "python" in spec["py-extension1"]
assert spec["python"].prefix == prefix
- assert spec["python"] == python_spec
+ assert spec["python"].external
+ assert spec["python"].satisfies(python_spec)
def test_external_python_extension_find_unified_python(self):
"""Test that python extensions use the same python as other specs in unified env"""
@@ -2026,7 +2231,7 @@ class TestConcretize:
spack.config.set("packages", external_conf)
abstract_specs = [Spec(s) for s in ["py-extension1", "python"]]
- specs = spack.concretize.concretize_specs_together(*abstract_specs)
+ specs = spack.concretize.concretize_specs_together(abstract_specs)
assert specs[0]["python"] == specs[1]["python"]
@pytest.mark.regression("36190")
@@ -2034,7 +2239,7 @@ class TestConcretize:
"specs",
[
["mpileaks^ callpath ^dyninst@8.1.1:8 ^mpich2@1.3:1"],
- ["multivalue-variant ^a@2:2"],
+ ["multivalue-variant ^pkg-a@2:2"],
["v1-consumer ^conditional-provider@1:1 +disable-v1"],
],
)
@@ -2048,7 +2253,33 @@ class TestConcretize:
result, _, _ = solver.driver.solve(setup, specs, reuse=[])
assert result.specs
- assert not result.unsolved_specs
+
+ @pytest.mark.regression("38664")
+ def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages):
+ """Check that the solver raises an exception when input specs are not
+ satisfied.
+ """
+ specs = [Spec("zlib")]
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+
+ simulate_unsolved_property = list((x, None) for x in specs)
+
+ monkeypatch.setattr(spack.solver.asp.Result, "unsolved_specs", simulate_unsolved_property)
+
+ with pytest.raises(
+ spack.solver.asp.InternalConcretizerError,
+ match="the solver completed but produced specs",
+ ):
+ solver.driver.solve(setup, specs, reuse=[])
+
+ @pytest.mark.regression("43141")
+ def test_clear_error_when_unknown_compiler_requested(self, mock_packages):
+ """Tests that the solver can report a case where the compiler cannot be set"""
+ with pytest.raises(
+ spack.error.UnsatisfiableSpecError, match="Cannot set the required compiler: pkg-a%foo"
+ ):
+ Spec("pkg-a %foo").concretized()
@pytest.mark.regression("36339")
def test_compiler_match_constraints_when_selected(self):
@@ -2084,11 +2315,12 @@ class TestConcretize:
},
]
spack.config.set("compilers", compiler_configuration)
- s = Spec("a %gcc@:11").concretized()
+ s = Spec("pkg-a %gcc@:11").concretized()
assert s.compiler.version == ver("=11.1.0"), s
@pytest.mark.regression("36339")
@pytest.mark.not_on_windows("Not supported on Windows")
+ @pytest.mark.enable_compiler_execution
def test_compiler_with_custom_non_numeric_version(self, mock_executable):
"""Test that, when a compiler has a completely made up version, we can use its
'real version' to detect targets and don't raise during concretization.
@@ -2105,7 +2337,7 @@ class TestConcretize:
}
]
spack.config.set("compilers", compiler_configuration)
- s = Spec("a %gcc@foo").concretized()
+ s = Spec("pkg-a %gcc@foo").concretized()
assert s.compiler.version == ver("=foo")
@pytest.mark.regression("36628")
@@ -2131,13 +2363,13 @@ class TestConcretize:
]
with spack.config.override("compilers", compiler_configuration):
- s = spack.spec.Spec("a").concretized()
+ s = Spec("pkg-a").concretized()
assert s.satisfies("%gcc@12.1.0")
@pytest.mark.parametrize("spec_str", ["mpileaks", "mpileaks ^mpich"])
- def test_virtuals_are_annotated_on_edges(self, spec_str, default_mock_concretization):
+ def test_virtuals_are_annotated_on_edges(self, spec_str):
"""Tests that information on virtuals is annotated on DAG edges"""
- spec = default_mock_concretization(spec_str)
+ spec = Spec(spec_str).concretized()
mpi_provider = spec["mpi"].name
edges = spec.edges_to_dependencies(name=mpi_provider)
@@ -2145,13 +2377,61 @@ class TestConcretize:
edges = spec.edges_to_dependencies(name="callpath")
assert len(edges) == 1 and edges[0].virtuals == ()
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
+ @pytest.mark.parametrize("transitive", [True, False])
+ def test_explicit_splices(
+ self, mutable_config, database_mutable_config, mock_packages, transitive, capfd
+ ):
+ mpich_spec = database_mutable_config.query("mpich")[0]
+ splice_info = {
+ "target": "mpi",
+ "replacement": f"/{mpich_spec.dag_hash()}",
+ "transitive": transitive,
+ }
+ spack.config.CONFIG.set("concretizer", {"splice": {"explicit": [splice_info]}})
+
+ spec = spack.spec.Spec("hdf5 ^zmpi").concretized()
+
+ assert spec.satisfies(f"^mpich@{mpich_spec.version}")
+ assert spec.build_spec.dependencies(name="zmpi", deptype="link")
+ assert spec["mpi"].build_spec.satisfies(mpich_spec)
+ assert not spec.build_spec.satisfies(f"^mpich/{mpich_spec.dag_hash()}")
+ assert not spec.dependencies(name="zmpi", deptype="link")
+
+ captured = capfd.readouterr()
+ assert "Warning: explicit splice configuration has caused" in captured.err
+ assert "hdf5 ^zmpi" in captured.err
+ assert str(spec) in captured.err
+
+ def test_explicit_splice_fails_nonexistent(mutable_config, mock_packages, mock_store):
+ splice_info = {"target": "mpi", "replacement": "mpich/doesnotexist"}
+ spack.config.CONFIG.set("concretizer", {"splice": {"explicit": [splice_info]}})
+
+ with pytest.raises(spack.spec.InvalidHashError):
+ _ = spack.spec.Spec("hdf5^zmpi").concretized()
+
+ def test_explicit_splice_fails_no_hash(mutable_config, mock_packages, mock_store):
+ splice_info = {"target": "mpi", "replacement": "mpich"}
+ spack.config.CONFIG.set("concretizer", {"splice": {"explicit": [splice_info]}})
+
+ with pytest.raises(spack.solver.asp.InvalidSpliceError, match="must be specified by hash"):
+ _ = spack.spec.Spec("hdf5^zmpi").concretized()
+
+ def test_explicit_splice_non_match_nonexistent_succeeds(
+ mutable_config, mock_packages, mock_store
+ ):
+ """When we have a nonexistent splice configured but are not using it, don't fail."""
+ splice_info = {"target": "will_not_match", "replacement": "nonexistent/doesnotexist"}
+ spack.config.CONFIG.set("concretizer", {"splice": {"explicit": [splice_info]}})
+ spec = spack.spec.Spec("zlib").concretized()
+ # the main test is that it does not raise
+ assert not spec.spliced
+
@pytest.mark.db
@pytest.mark.parametrize(
"spec_str,mpi_name",
[("mpileaks", "mpich"), ("mpileaks ^mpich2", "mpich2"), ("mpileaks ^zmpi", "zmpi")],
)
- def test_virtuals_are_reconstructed_on_reuse(self, spec_str, mpi_name, database):
+ def test_virtuals_are_reconstructed_on_reuse(self, spec_str, mpi_name, mutable_database):
"""Tests that when we reuse a spec, virtual on edges are reconstructed correctly"""
with spack.config.override("concretizer:reuse", True):
spec = Spec(spec_str).concretized()
@@ -2160,13 +2440,12 @@ class TestConcretize:
assert len(mpi_edges) == 1
assert "mpi" in mpi_edges[0].virtuals
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_dont_define_new_version_from_input_if_checksum_required(self, working_env):
os.environ["SPACK_CONCRETIZER_REQUIRE_CHECKSUM"] = "yes"
with pytest.raises(spack.error.UnsatisfiableSpecError):
# normally spack concretizes to @=3.0 if it's not defined in package.py, except
# when checksums are required
- Spec("a@=3.0").concretized()
+ Spec("pkg-a@=3.0").concretized()
@pytest.mark.regression("39570")
@pytest.mark.db
@@ -2176,7 +2455,7 @@ class TestConcretize:
"""
s = Spec("py-extension1").concretized()
python_hash = s["python"].dag_hash()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
with spack.config.override("concretizer:reuse", True):
with_reuse = Spec(f"py-extension2 ^/{python_hash}").concretized()
@@ -2186,6 +2465,256 @@ class TestConcretize:
assert with_reuse.dag_hash() == without_reuse.dag_hash()
+ @pytest.mark.regression("35536")
+ @pytest.mark.parametrize(
+ "spec_str,expected_namespaces",
+ [
+ # Single node with fully qualified namespace
+ ("builtin.mock.gmake", {"gmake": "builtin.mock"}),
+ # Dependency with fully qualified namespace
+ ("hdf5 ^builtin.mock.gmake", {"gmake": "builtin.mock", "hdf5": "duplicates.test"}),
+ ("hdf5 ^gmake", {"gmake": "duplicates.test", "hdf5": "duplicates.test"}),
+ ],
+ )
+ def test_select_lower_priority_package_from_repository_stack(
+ self, spec_str, expected_namespaces
+ ):
+ """Tests that a user can explicitly select a lower priority, fully qualified dependency
+ from cli.
+ """
+ # 'builtin.mock" and "duplicates.test" share a 'gmake' package
+ additional_repo = os.path.join(spack.paths.repos_path, "duplicates.test")
+ with spack.repo.use_repositories(additional_repo, override=False):
+ s = Spec(spec_str).concretized()
+
+ for name, namespace in expected_namespaces.items():
+ assert s[name].concrete
+ assert s[name].namespace == namespace
+
+ def test_reuse_specs_from_non_available_compilers(self, mutable_config, mutable_database):
+ """Tests that we can reuse specs with compilers that are not configured locally."""
+ # All the specs in the mutable DB have been compiled with %gcc@=10.2.1
+ specs = mutable_database.query_local()
+ assert all(s.satisfies("%gcc@=10.2.1") for s in specs)
+
+ spack.compilers.remove_compiler_from_config("gcc@=10.2.1")
+ assert not spack.compilers.compilers_for_spec("gcc@=10.2.1")
+ mutable_config.set("concretizer:reuse", True)
+
+ # mpileaks is in the database, it will be reused with gcc@=10.2.1
+ root = Spec("mpileaks").concretized()
+ for s in root.traverse():
+ assert s.satisfies("%gcc@10.2.1")
+
+ # fftw is not in the database, therefore the root will be compiled with gcc@=9.4.0,
+ # while the mpi is reused from the database and is compiled with gcc@=10.2.1
+ root = Spec("fftw").concretized()
+ assert root.satisfies("%gcc@=9.4.0")
+ for s in root.traverse(root=False):
+ assert s.satisfies("%gcc@10.2.1")
+
+ @pytest.mark.regression("43406")
+ def test_externals_with_platform_explicitly_set(self, tmp_path):
+ """Tests that users can specify platform=xxx in an external spec"""
+ external_conf = {
+ "mpich": {
+ "buildable": False,
+ "externals": [{"spec": "mpich@=2.0.0 platform=test", "prefix": str(tmp_path)}],
+ }
+ }
+ spack.config.set("packages", external_conf)
+ s = Spec("mpich").concretized()
+ assert s.external
+
+ @pytest.mark.regression("43267")
+ def test_spec_with_build_dep_from_json(self, tmp_path):
+ """Tests that we can correctly concretize a spec, when we express its dependency as a
+ concrete spec to be read from JSON.
+
+ The bug was triggered by missing virtuals on edges that were trimmed from pure build
+ dependencies.
+ """
+ build_dep = Spec("dttop").concretized()
+ json_file = tmp_path / "build.json"
+ json_file.write_text(build_dep.to_json())
+ s = Spec(f"dtuse ^{str(json_file)}").concretized()
+ assert s["dttop"].dag_hash() == build_dep.dag_hash()
+
+ @pytest.mark.regression("44040")
+ def test_exclude_specs_from_reuse(self, monkeypatch):
+ """Tests that we can exclude a spec from reuse when concretizing, and that the spec
+ is not added back to the solve as a dependency of another reusable spec.
+
+ The expected spec is:
+
+ o callpath@1.0
+ |\
+ | |\
+ o | | mpich@3.0.4
+ |/ /
+ | o dyninst@8.2
+ |/|
+ | |\
+ | | o libdwarf@20130729
+ | |/|
+ |/|/
+ | o libelf@0.8.13
+ |/
+ o glibc@2.31
+ """
+ # Prepare a mock mirror that returns an old version of dyninst
+ request_str = "callpath ^mpich"
+ reused = Spec(f"{request_str} ^dyninst@8.1.1").concretized()
+ monkeypatch.setattr(spack.solver.asp, "_specs_from_mirror", lambda: [reused])
+
+ # Exclude dyninst from reuse, so we expect that the old version is not taken into account
+ with spack.config.override(
+ "concretizer:reuse", {"from": [{"type": "buildcache", "exclude": ["dyninst"]}]}
+ ):
+ result = Spec(request_str).concretized()
+
+ assert result.dag_hash() != reused.dag_hash()
+ assert result["mpich"].dag_hash() == reused["mpich"].dag_hash()
+ assert result["dyninst"].dag_hash() != reused["dyninst"].dag_hash()
+ assert result["dyninst"].satisfies("@=8.2")
+ for dep in result["dyninst"].traverse(root=False):
+ assert dep.dag_hash() == reused[dep.name].dag_hash()
+
+ @pytest.mark.regression("44091")
+ @pytest.mark.parametrize(
+ "included_externals",
+ [
+ ["deprecated-versions"],
+ # Try the empty list, to ensure that in that case everything will be included
+ # since filtering should happen only when the list is non-empty
+ [],
+ ],
+ )
+ def test_include_specs_from_externals_and_libcs(
+ self, included_externals, mutable_config, tmp_path
+ ):
+ """Tests that when we include specs from externals, we always include libcs."""
+ mutable_config.set(
+ "packages",
+ {
+ "deprecated-versions": {
+ "externals": [{"spec": "deprecated-versions@1.1.0", "prefix": str(tmp_path)}]
+ }
+ },
+ )
+ request_str = "deprecated-client"
+
+ # When using the external the version is selected even if deprecated
+ with spack.config.override(
+ "concretizer:reuse", {"from": [{"type": "external", "include": included_externals}]}
+ ):
+ result = Spec(request_str).concretized()
+
+ assert result["deprecated-versions"].satisfies("@1.1.0")
+
+ # When excluding it, we pick the non-deprecated version
+ with spack.config.override(
+ "concretizer:reuse",
+ {"from": [{"type": "external", "exclude": ["deprecated-versions"]}]},
+ ):
+ result = Spec(request_str).concretized()
+
+ assert result["deprecated-versions"].satisfies("@1.0.0")
+
+ @pytest.mark.regression("44085")
+ def test_can_reuse_concrete_externals_for_dependents(self, mutable_config, tmp_path):
+ """Test that external specs that are in the DB can be reused. This means they are
+ preferred to concretizing another external from packages.yaml
+ """
+ packages_yaml = {
+ "externaltool": {"externals": [{"spec": "externaltool@2.0", "prefix": "/fake/path"}]}
+ }
+ mutable_config.set("packages", packages_yaml)
+ # Concretize with gcc@9 to get a suboptimal spec, since we have gcc@10 available
+ external_spec = Spec("externaltool@2 %gcc@9").concretized()
+ assert external_spec.external
+
+ root_specs = [Spec("sombrero")]
+ with spack.config.override("concretizer:reuse", True):
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+ result, _, _ = solver.driver.solve(setup, root_specs, reuse=[external_spec])
+
+ assert len(result.specs) == 1
+ sombrero = result.specs[0]
+ assert sombrero["externaltool"].dag_hash() == external_spec.dag_hash()
+
+ def test_cannot_reuse_host_incompatible_libc(self):
+ """Test whether reuse concretization correctly fails to reuse a spec with a host
+ incompatible libc."""
+ if not spack.solver.asp.using_libc_compatibility():
+ pytest.skip("This test requires libc nodes")
+
+ # We install b@1 ^glibc@2.30, and b@0 ^glibc@2.28. The former is not host compatible, the
+ # latter is.
+ fst = Spec("pkg-b@1").concretized()
+ fst._mark_concrete(False)
+ fst.dependencies("glibc")[0].versions = VersionList(["=2.30"])
+ fst._mark_concrete(True)
+ snd = Spec("pkg-b@0").concretized()
+
+ # The spec b@1 ^glibc@2.30 is "more optimal" than b@0 ^glibc@2.28, but due to glibc
+ # incompatibility, it should not be reused.
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+ result, _, _ = solver.driver.solve(setup, [Spec("pkg-b")], reuse=[fst, snd])
+ assert len(result.specs) == 1
+ assert result.specs[0] == snd
+
+ @pytest.mark.regression("45321")
+ @pytest.mark.parametrize(
+ "corrupted_str",
+ [
+ "cmake@3.4.3 foo=bar", # cmake has no variant "foo"
+ "mvdefaults@1.0 foo=a,d", # variant "foo" has no value "d"
+ "cmake %gcc", # spec has no version
+ ],
+ )
+ def test_corrupted_external_does_not_halt_concretization(self, corrupted_str, mutable_config):
+ """Tests that having a wrong variant in an external spec doesn't stop concretization"""
+ corrupted_spec = Spec(corrupted_str)
+ packages_yaml = {
+ f"{corrupted_spec.name}": {
+ "externals": [{"spec": corrupted_str, "prefix": "/dev/null"}]
+ }
+ }
+ mutable_config.set("packages", packages_yaml)
+ # Assert we don't raise due to the corrupted external entry above
+ s = Spec("pkg-a").concretized()
+ assert s.concrete
+
+ @pytest.mark.regression("44828")
+ @pytest.mark.not_on_windows("Tests use linux paths")
+ def test_correct_external_is_selected_from_packages_yaml(self, mutable_config):
+ """Tests that when filtering external specs, the correct external is selected to
+ reconstruct the prefix, and other external attributes.
+ """
+ packages_yaml = {
+ "cmake": {
+ "externals": [
+ {"spec": "cmake@3.23.1 %gcc", "prefix": "/tmp/prefix1"},
+ {"spec": "cmake@3.23.1 %clang", "prefix": "/tmp/prefix2"},
+ ]
+ }
+ }
+ concretizer_yaml = {
+ "reuse": {"roots": True, "from": [{"type": "external", "exclude": ["%gcc"]}]}
+ }
+ mutable_config.set("packages", packages_yaml)
+ mutable_config.set("concretizer", concretizer_yaml)
+
+ s = Spec("cmake").concretized()
+
+ # Check that we got the properties from the right external
+ assert s.external
+ assert s.satisfies("%clang")
+ assert s.prefix == "/tmp/prefix2"
+
@pytest.fixture()
def duplicates_test_repository():
@@ -2195,7 +2724,6 @@ def duplicates_test_repository():
@pytest.mark.usefixtures("mutable_config", "duplicates_test_repository")
-@pytest.mark.only_clingo("Not supported by the original concretizer")
class TestConcretizeSeparately:
"""Collects test on separate concretization"""
@@ -2324,6 +2852,29 @@ class TestConcretizeSeparately:
assert len(edges) == 1
assert edges[0].spec.satisfies("@=60")
+ @pytest.mark.regression("43647")
+ def test_specifying_different_versions_build_deps(self):
+ """Tests that we can concretize a spec with nodes using the same build
+ dependency pinned at different versions, when the constraint is specified
+ in the root spec.
+
+ o hdf5@1.0
+ |\
+ o | pinned-gmake@1.0
+ o | gmake@3.0
+ /
+ o gmake@4.1
+
+ """
+ hdf5_str = "hdf5@1.0 ^gmake@4.1"
+ pinned_str = "pinned-gmake@1.0 ^gmake@3.0"
+ input_specs = [Spec(hdf5_str), Spec(pinned_str)]
+ solver = spack.solver.asp.Solver()
+ result = solver.solve(input_specs)
+
+ assert any(x.satisfies(hdf5_str) for x in result.specs)
+ assert any(x.satisfies(pinned_str) for x in result.specs)
+
@pytest.mark.parametrize(
"v_str,v_opts,checksummed",
@@ -2364,7 +2915,9 @@ def test_drop_moving_targets(v_str, v_opts, checksummed):
class TestConcreteSpecsByHash:
"""Tests the container of concrete specs"""
- @pytest.mark.parametrize("input_specs", [["a"], ["a foobar=bar", "b"], ["a foobar=baz", "b"]])
+ @pytest.mark.parametrize(
+ "input_specs", [["pkg-a"], ["pkg-a foobar=bar", "pkg-b"], ["pkg-a foobar=baz", "pkg-b"]]
+ )
def test_adding_specs(self, input_specs, default_mock_concretization):
"""Tests that concrete specs in the container are equivalent, but stored as different
objects in memory.
@@ -2389,7 +2942,6 @@ def edges_test_repository():
@pytest.mark.usefixtures("mutable_config", "edges_test_repository")
-@pytest.mark.only_clingo("Edge properties not supported by the original concretizer")
class TestConcretizeEdges:
"""Collects tests on edge properties"""
@@ -2513,3 +3065,157 @@ def test_reusable_externals_different_spec(mock_packages, tmpdir):
{"mpich": {"externals": [{"spec": "mpich@4.1 +debug", "prefix": tmpdir.strpath}]}},
local=False,
)
+
+
+def test_concretization_version_order():
+ versions = [
+ (Version("develop"), {}),
+ (Version("1.0"), {}),
+ (Version("2.0"), {"deprecated": True}),
+ (Version("1.1"), {}),
+ (Version("1.1alpha1"), {}),
+ (Version("0.9"), {"preferred": True}),
+ ]
+ result = [
+ v
+ for v, _ in sorted(
+ versions, key=spack.solver.version_order.concretization_version_order, reverse=True
+ )
+ ]
+ assert result == [
+ Version("0.9"), # preferred
+ Version("1.1"), # latest non-deprecated final version
+ Version("1.0"), # latest non-deprecated final version
+ Version("1.1alpha1"), # prereleases
+ Version("develop"), # likely development version
+ Version("2.0"), # deprecated
+ ]
+
+
+@pytest.mark.parametrize(
+ "roots,reuse_yaml,expected,not_expected,expected_length",
+ [
+ (
+ ["mpileaks"],
+ {"roots": True, "include": ["^mpich"]},
+ ["^mpich"],
+ ["^mpich2", "^zmpi"],
+ 2,
+ ),
+ (
+ ["mpileaks"],
+ {"roots": True, "include": ["externaltest"]},
+ ["externaltest"],
+ ["^mpich", "^mpich2", "^zmpi"],
+ 1,
+ ),
+ ],
+)
+@pytest.mark.usefixtures("mutable_database", "mock_store")
+@pytest.mark.not_on_windows("Expected length is different on Windows")
+def test_filtering_reused_specs(
+ roots, reuse_yaml, expected, not_expected, expected_length, mutable_config, monkeypatch
+):
+ """Tests that we can select which specs are to be reused, using constraints as filters"""
+ # Assume all specs have a runtime dependency
+ monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", lambda x: True)
+ mutable_config.set("concretizer:reuse", reuse_yaml)
+ selector = spack.solver.asp.ReusableSpecsSelector(mutable_config)
+ specs = selector.reusable_specs(roots)
+
+ assert len(specs) == expected_length
+
+ for constraint in expected:
+ assert all(x.satisfies(constraint) for x in specs)
+
+ for constraint in not_expected:
+ assert all(not x.satisfies(constraint) for x in specs)
+
+
+@pytest.mark.usefixtures("mutable_database", "mock_store")
+@pytest.mark.parametrize(
+ "reuse_yaml,expected_length",
+ [({"from": [{"type": "local"}]}, 17), ({"from": [{"type": "buildcache"}]}, 0)],
+)
+@pytest.mark.not_on_windows("Expected length is different on Windows")
+def test_selecting_reused_sources(reuse_yaml, expected_length, mutable_config, monkeypatch):
+ """Tests that we can turn on/off sources of reusable specs"""
+ # Assume all specs have a runtime dependency
+ monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", lambda x: True)
+ mutable_config.set("concretizer:reuse", reuse_yaml)
+ selector = spack.solver.asp.ReusableSpecsSelector(mutable_config)
+ specs = selector.reusable_specs(["mpileaks"])
+ assert len(specs) == expected_length
+
+
+@pytest.mark.parametrize(
+ "specs,include,exclude,expected",
+ [
+ # "foo" discarded by include rules (everything compiled with GCC)
+ (["cmake@3.27.9 %gcc", "foo %clang"], ["%gcc"], [], ["cmake@3.27.9 %gcc"]),
+ # "cmake" discarded by exclude rules (everything compiled with GCC but cmake)
+ (["cmake@3.27.9 %gcc", "foo %gcc"], ["%gcc"], ["cmake"], ["foo %gcc"]),
+ ],
+)
+def test_spec_filters(specs, include, exclude, expected):
+ specs = [Spec(x) for x in specs]
+ expected = [Spec(x) for x in expected]
+ f = spack.solver.asp.SpecFilter(
+ factory=lambda: specs, is_usable=lambda x: True, include=include, exclude=exclude
+ )
+ assert f.selected_specs() == expected
+
+
+@pytest.mark.regression("38484")
+def test_git_ref_version_can_be_reused(install_mockery, do_not_check_runtimes_on_reuse):
+ first_spec = spack.spec.Spec("git-ref-package@git.2.1.5=2.1.5~opt").concretized()
+ PackageInstaller([first_spec.package], fake=True, explicit=True).install()
+
+ with spack.config.override("concretizer:reuse", True):
+ # reproducer of the issue is that spack will solve when there is a change to the base spec
+ second_spec = spack.spec.Spec("git-ref-package@git.2.1.5=2.1.5+opt").concretized()
+ assert second_spec.dag_hash() != first_spec.dag_hash()
+ # we also want to confirm that reuse actually works so leave variant off to
+ # let solver reuse
+ third_spec = spack.spec.Spec("git-ref-package@git.2.1.5=2.1.5")
+ assert first_spec.satisfies(third_spec)
+ third_spec.concretize()
+ assert third_spec.dag_hash() == first_spec.dag_hash()
+
+
+@pytest.mark.parametrize("standard_version", ["2.0.0", "2.1.5", "2.1.6"])
+def test_reuse_prefers_standard_over_git_versions(
+ standard_version, install_mockery, do_not_check_runtimes_on_reuse
+):
+ """
+ order matters in this test. typically reuse would pick the highest versioned installed match
+ but we want to prefer the standard version over git ref based versions
+ so install git ref last and ensure it is not picked up by reuse
+ """
+ standard_spec = spack.spec.Spec(f"git-ref-package@{standard_version}").concretized()
+ PackageInstaller([standard_spec.package], fake=True, explicit=True).install()
+
+ git_spec = spack.spec.Spec("git-ref-package@git.2.1.5=2.1.5").concretized()
+ PackageInstaller([git_spec.package], fake=True, explicit=True).install()
+
+ with spack.config.override("concretizer:reuse", True):
+ test_spec = spack.spec.Spec("git-ref-package@2").concretized()
+ assert git_spec.dag_hash() != test_spec.dag_hash()
+ assert standard_spec.dag_hash() == test_spec.dag_hash()
+
+
+@pytest.mark.parametrize("unify", [True, "when_possible", False])
+def test_spec_unification(unify, mutable_config, mock_packages):
+ spack.config.set("concretizer:unify", unify)
+ a = "pkg-a"
+ a_restricted = "pkg-a^pkg-b foo=baz"
+ b = "pkg-b foo=none"
+
+ unrestricted = spack.cmd.parse_specs([a, b], concretize=True)
+ a_concrete_unrestricted = [s for s in unrestricted if s.name == "pkg-a"][0]
+ b_concrete_unrestricted = [s for s in unrestricted if s.name == "pkg-b"][0]
+ assert (a_concrete_unrestricted["pkg-b"] == b_concrete_unrestricted) == (unify is not False)
+
+ maybe_fails = pytest.raises if unify is True else llnl.util.lang.nullcontext
+ with maybe_fails(spack.solver.asp.UnsatisfiableSpecError):
+ _ = spack.cmd.parse_specs([a_restricted, b], concretize=True)
diff --git a/lib/spack/spack/test/concretize_errors.py b/lib/spack/spack/test/concretization/errors.py
index 09ac4e3b93..0cb7a533c1 100644
--- a/lib/spack/spack/test/concretize_errors.py
+++ b/lib/spack/spack/test/concretization/errors.py
@@ -5,14 +5,10 @@
import pytest
+import spack.config
import spack.solver.asp
import spack.spec
-pytestmark = [
- pytest.mark.not_on_windows("Windows uses old concretizer"),
- pytest.mark.only_clingo("Original concretizer does not support configuration requirements"),
-]
-
version_error_messages = [
"Cannot satisfy 'fftw@:1.0' and 'fftw@1.1:",
" required because quantum-espresso depends on fftw@:1.0",
diff --git a/lib/spack/spack/test/concretization/flag_mixing.py b/lib/spack/spack/test/concretization/flag_mixing.py
new file mode 100644
index 0000000000..878c0c71ef
--- /dev/null
+++ b/lib/spack/spack/test/concretization/flag_mixing.py
@@ -0,0 +1,252 @@
+# Copyright 2013-2024 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 pathlib
+
+import pytest
+
+import spack.config
+import spack.environment as ev
+import spack.paths
+import spack.repo
+import spack.util.spack_yaml as syaml
+from spack.spec import Spec
+
+"""
+These tests include the following package DAGs:
+
+Firstly, w, x, y where w and x apply cflags to y.
+
+w
+|\
+x |
+|/
+y
+
+Secondly, v, y which where v does not apply cflags to y - this is for testing
+mixing with compiler flag propagation in the absence of compiler flags applied
+by dependents.
+
+v
+|
+y
+
+Finally, a diamond dag to check that the topological order is resolved into
+a total order:
+
+t
+|\
+u x
+|/
+y
+"""
+
+
+@pytest.fixture
+def test_repo(mutable_config, monkeypatch, mock_stage):
+ repo_dir = pathlib.Path(spack.paths.repos_path) / "flags.test"
+ with spack.repo.use_repositories(str(repo_dir)) as mock_repo_path:
+ yield mock_repo_path
+
+
+def update_concretize_scope(conf_str, section):
+ conf = syaml.load_config(conf_str)
+ spack.config.set(section, conf[section], scope="concretize")
+
+
+def test_mix_spec_and_requirements(concretize_scope, test_repo):
+ conf_str = """\
+packages:
+ y:
+ require: cflags="-c"
+"""
+ update_concretize_scope(conf_str, "packages")
+
+ s1 = Spec('y cflags="-a"').concretized()
+ assert s1.satisfies('cflags="-a -c"')
+
+
+def test_mix_spec_and_dependent(concretize_scope, test_repo):
+ s1 = Spec('x ^y cflags="-a"').concretized()
+ assert s1["y"].satisfies('cflags="-a -d1"')
+
+
+def _compiler_cfg_one_entry_with_cflags(cflags):
+ return f"""\
+compilers::
+- compiler:
+ spec: gcc@12.100.100
+ paths:
+ cc: /usr/bin/fake-gcc
+ cxx: /usr/bin/fake-g++
+ f77: null
+ fc: null
+ flags:
+ cflags: {cflags}
+ operating_system: debian6
+ modules: []
+"""
+
+
+def test_mix_spec_and_compiler_cfg(concretize_scope, test_repo):
+ conf_str = _compiler_cfg_one_entry_with_cflags("-Wall")
+ update_concretize_scope(conf_str, "compilers")
+
+ s1 = Spec('y %gcc@12.100.100 cflags="-O2"').concretized()
+ assert s1.satisfies('cflags="-Wall -O2"')
+
+
+@pytest.mark.parametrize(
+ "cmd_flags,req_flags,cmp_flags,dflags,expected_order",
+ [
+ ("-a -b", "-c", None, False, "-c -a -b"),
+ ("-x7 -x4", "-x5 -x6", None, False, "-x5 -x6 -x7 -x4"),
+ ("-x7 -x4", "-x5 -x6", "-x3 -x8", False, "-x3 -x8 -x5 -x6 -x7 -x4"),
+ ("-x7 -x4", "-x5 -x6", "-x3 -x8", True, "-x3 -x8 -d1 -d2 -x5 -x6 -x7 -x4"),
+ ("-x7 -x4", None, "-x3 -x8", False, "-x3 -x8 -x7 -x4"),
+ ("-x7 -x4", None, "-x3 -x8", True, "-x3 -x8 -d1 -d2 -x7 -x4"),
+ # The remaining test cover cases of intersection
+ ("-a -b", "-a -c", None, False, "-c -a -b"),
+ ("-a -b", None, "-a -c", False, "-c -a -b"),
+ ("-a -b", "-a -c", "-a -d", False, "-d -c -a -b"),
+ ("-a -d2 -d1", "-d2 -c", "-d1 -b", True, "-b -c -a -d2 -d1"),
+ ("-a", "-d0 -d2 -c", "-d1 -b", True, "-b -d1 -d0 -d2 -c -a"),
+ ],
+)
+def test_flag_order_and_grouping(
+ concretize_scope, test_repo, cmd_flags, req_flags, cmp_flags, dflags, expected_order
+):
+ """Check consistent flag ordering and grouping on a package "y"
+ with flags introduced from a variety of sources.
+
+ The ordering rules are explained in ``asp.SpecBuilder.reorder_flags``.
+ """
+ if req_flags:
+ conf_str = f"""\
+packages:
+ y:
+ require: cflags="{req_flags}"
+"""
+ update_concretize_scope(conf_str, "packages")
+
+ if cmp_flags:
+ conf_str = _compiler_cfg_one_entry_with_cflags(cmp_flags)
+ update_concretize_scope(conf_str, "compilers")
+
+ compiler_spec = ""
+ if cmp_flags:
+ compiler_spec = "%gcc@12.100.100"
+
+ if dflags:
+ spec_str = f"x+activatemultiflag {compiler_spec} ^y"
+ expected_dflags = "-d1 -d2"
+ else:
+ spec_str = f"y {compiler_spec}"
+ expected_dflags = None
+
+ if cmd_flags:
+ spec_str += f' cflags="{cmd_flags}"'
+
+ root_spec = Spec(spec_str).concretized()
+ spec = root_spec["y"]
+ satisfy_flags = " ".join(x for x in [cmd_flags, req_flags, cmp_flags, expected_dflags] if x)
+ assert spec.satisfies(f'cflags="{satisfy_flags}"')
+ assert spec.compiler_flags["cflags"] == expected_order.split()
+
+
+def test_two_dependents_flag_mixing(concretize_scope, test_repo):
+ root_spec1 = Spec("w~moveflaglater").concretized()
+ spec1 = root_spec1["y"]
+ assert spec1.compiler_flags["cflags"] == "-d0 -d1 -d2".split()
+
+ root_spec2 = Spec("w+moveflaglater").concretized()
+ spec2 = root_spec2["y"]
+ assert spec2.compiler_flags["cflags"] == "-d3 -d1 -d2".split()
+
+
+def test_propagate_and_compiler_cfg(concretize_scope, test_repo):
+ conf_str = _compiler_cfg_one_entry_with_cflags("-f2")
+ update_concretize_scope(conf_str, "compilers")
+
+ root_spec = Spec("v %gcc@12.100.100 cflags=='-f1'").concretized()
+ assert root_spec["y"].satisfies("cflags='-f1 -f2'")
+
+
+# Note: setting flags on a dependency overrides propagation, which
+# is tested in test/concretize.py:test_compiler_flag_propagation
+
+
+def test_propagate_and_pkg_dep(concretize_scope, test_repo):
+ root_spec1 = Spec("x ~activatemultiflag cflags=='-f1'").concretized()
+ assert root_spec1["y"].satisfies("cflags='-f1 -d1'")
+
+
+def test_propagate_and_require(concretize_scope, test_repo):
+ conf_str = """\
+packages:
+ y:
+ require: cflags="-f2"
+"""
+ update_concretize_scope(conf_str, "packages")
+
+ root_spec1 = Spec("v cflags=='-f1'").concretized()
+ assert root_spec1["y"].satisfies("cflags='-f1 -f2'")
+
+ # Next, check that a requirement does not "undo" a request for
+ # propagation from the command-line spec
+ conf_str = """\
+packages:
+ v:
+ require: cflags="-f1"
+"""
+ update_concretize_scope(conf_str, "packages")
+
+ root_spec2 = Spec("v cflags=='-f1'").concretized()
+ assert root_spec2["y"].satisfies("cflags='-f1'")
+
+ # Note: requirements cannot enforce propagation: any attempt to do
+ # so will generate a concretization error; this likely relates to
+ # the note about #37180 in concretize.lp
+
+
+def test_dev_mix_flags(tmp_path, concretize_scope, mutable_mock_env_path, test_repo):
+ src_dir = tmp_path / "x-src"
+
+ env_content = f"""\
+spack:
+ specs:
+ - y %gcc@12.100.100 cflags=='-fsanitize=address'
+ develop:
+ y:
+ spec: y cflags=='-fsanitize=address'
+ path: {src_dir}
+"""
+
+ conf_str = _compiler_cfg_one_entry_with_cflags("-f1")
+ update_concretize_scope(conf_str, "compilers")
+
+ manifest_file = tmp_path / ev.manifest_name
+ manifest_file.write_text(env_content)
+ e = ev.create("test", manifest_file)
+ with e:
+ e.concretize()
+ e.write()
+
+ (result,) = list(j for i, j in e.concretized_specs() if j.name == "y")
+
+ assert result["y"].satisfies("cflags='-fsanitize=address -f1'")
+
+
+def test_diamond_dep_flag_mixing(concretize_scope, test_repo):
+ """A diamond where each dependent applies flags to the bottom
+ dependency. The goal is to ensure that the flag ordering is
+ (a) topological and (b) repeatable for elements not subject to
+ this partial ordering (i.e. the flags for the left and right
+ nodes of the diamond always appear in the same order).
+ `Spec.traverse` is responsible for handling both of these needs.
+ """
+ root_spec1 = Spec("t").concretized()
+ spec1 = root_spec1["y"]
+ assert spec1.satisfies('cflags="-c1 -c2 -d1 -d2 -e1 -e2"')
+ assert spec1.compiler_flags["cflags"] == "-c1 -c2 -e1 -e2 -d1 -d2".split()
diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretization/preferences.py
index 74549599af..faf7b07fc0 100644
--- a/lib/spack/spack/test/concretize_preferences.py
+++ b/lib/spack/spack/test/concretization/preferences.py
@@ -11,8 +11,10 @@ import pytest
import spack.config
import spack.package_prefs
import spack.repo
+import spack.spec
+import spack.util.module_cmd
import spack.util.spack_yaml as syaml
-from spack.config import ConfigError
+from spack.error import ConfigError
from spack.spec import CompilerSpec, Spec
from spack.version import Version
@@ -105,7 +107,7 @@ class TestConcretizePreferences:
@pytest.mark.parametrize(
"compiler_str,spec_str",
- [("gcc@=4.5.0", "mpileaks"), ("clang@=12.0.0", "mpileaks"), ("gcc@=4.5.0", "openmpi")],
+ [("gcc@=9.4.0", "mpileaks"), ("clang@=15.0.0", "mpileaks"), ("gcc@=9.4.0", "openmpi")],
)
def test_preferred_compilers(self, compiler_str, spec_str):
"""Test preferred compilers are applied correctly"""
@@ -113,7 +115,6 @@ class TestConcretizePreferences:
spec = spack.spec.Spec(spec_str).concretized()
assert spec.compiler == CompilerSpec(compiler_str)
- @pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_preferred_target(self, mutable_mock_repo):
"""Test preferred targets are applied correctly"""
spec = concretize("mpich")
@@ -143,7 +144,6 @@ class TestConcretizePreferences:
spec = concretize("mpileaks")
assert spec.version == Version("2.2")
- @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer")
def test_preferred_versions_mixed_version_types(self):
update_packages("mixedversions", "version", ["=2.0"])
spec = concretize("mixedversions")
@@ -161,21 +161,24 @@ class TestConcretizePreferences:
spec = concretize("mpileaks")
assert "zmpi" in spec
- def test_config_set_pkg_property_url(self, mutable_mock_repo):
+ @pytest.mark.parametrize(
+ "update,expected",
+ [
+ (
+ {"url": "http://www.somewhereelse.com/mpileaks-1.0.tar.gz"},
+ "http://www.somewhereelse.com/mpileaks-2.3.tar.gz",
+ ),
+ ({}, "http://www.llnl.gov/mpileaks-2.3.tar.gz"),
+ ],
+ )
+ def test_config_set_pkg_property_url(self, update, expected, mock_repo_path):
"""Test setting an existing attribute in the package class"""
- update_packages(
- "mpileaks",
- "package_attributes",
- {"url": "http://www.somewhereelse.com/mpileaks-1.0.tar.gz"},
- )
- spec = concretize("mpileaks")
- assert spec.package.fetcher.url == "http://www.somewhereelse.com/mpileaks-2.3.tar.gz"
+ update_packages("mpileaks", "package_attributes", update)
+ with spack.repo.use_repositories(mock_repo_path):
+ spec = concretize("mpileaks")
+ assert spec.package.fetcher.url == expected
- update_packages("mpileaks", "package_attributes", {})
- spec = concretize("mpileaks")
- assert spec.package.fetcher.url == "http://www.llnl.gov/mpileaks-2.3.tar.gz"
-
- def test_config_set_pkg_property_new(self, mutable_mock_repo):
+ def test_config_set_pkg_property_new(self, mock_repo_path):
"""Test that you can set arbitrary attributes on the Package class"""
conf = syaml.load_config(
"""\
@@ -194,19 +197,20 @@ mpileaks:
"""
)
spack.config.set("packages", conf, scope="concretize")
-
- spec = concretize("mpileaks")
- assert spec.package.v1 == 1
- assert spec.package.v2 is True
- assert spec.package.v3 == "yesterday"
- assert spec.package.v4 == "true"
- assert dict(spec.package.v5) == {"x": 1, "y": 2}
- assert list(spec.package.v6) == [1, 2]
+ with spack.repo.use_repositories(mock_repo_path):
+ spec = concretize("mpileaks")
+ assert spec.package.v1 == 1
+ assert spec.package.v2 is True
+ assert spec.package.v3 == "yesterday"
+ assert spec.package.v4 == "true"
+ assert dict(spec.package.v5) == {"x": 1, "y": 2}
+ assert list(spec.package.v6) == [1, 2]
update_packages("mpileaks", "package_attributes", {})
- spec = concretize("mpileaks")
- with pytest.raises(AttributeError):
- spec.package.v1
+ with spack.repo.use_repositories(mock_repo_path):
+ spec = concretize("mpileaks")
+ with pytest.raises(AttributeError):
+ spec.package.v1
def test_preferred(self):
""" "Test packages with some version marked as preferred=True"""
@@ -221,15 +225,13 @@ mpileaks:
spec.concretize()
assert spec.version == Version("3.5.0")
- @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer")
def test_preferred_undefined_raises(self):
"""Preference should not specify an undefined version"""
update_packages("python", "version", ["3.5.0.1"])
spec = Spec("python")
- with pytest.raises(spack.config.ConfigError):
+ with pytest.raises(ConfigError):
spec.concretize()
- @pytest.mark.only_clingo("This behavior is not enforced for the old concretizer")
def test_preferred_truncated(self):
"""Versions without "=" are treated as version ranges: if there is
a satisfying version defined in the package.py, we should use that
@@ -506,11 +508,10 @@ mpich:
assert s.satisfies("%gcc") and s.satisfies("+allow-gcc")
@pytest.mark.regression("41134")
- @pytest.mark.only_clingo("Not backporting the fix to the old concretizer")
def test_default_preference_variant_different_type_does_not_error(self):
"""Tests that a different type for an existing variant in the 'all:' section of
packages.yaml doesn't fail with an error.
"""
with spack.config.override("packages:all", {"variants": "+foo"}):
- s = Spec("a").concretized()
+ s = Spec("pkg-a").concretized()
assert s.satisfies("foo=bar")
diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretization/requirements.py
index e1f546f7e1..9e703be51f 100644
--- a/lib/spack/spack/test/concretize_requirements.py
+++ b/lib/spack/spack/test/concretization/requirements.py
@@ -7,119 +7,33 @@ import pathlib
import pytest
-import spack.build_systems.generic
import spack.config
import spack.error
import spack.package_base
+import spack.paths
import spack.repo
+import spack.solver.asp
+import spack.store
import spack.util.spack_yaml as syaml
import spack.version
+from spack.installer import PackageInstaller
from spack.solver.asp import InternalConcretizerError, UnsatisfiableSpecError
from spack.spec import Spec
-from spack.test.conftest import create_test_repo
from spack.util.url import path_to_file_url
-pytestmark = [
- pytest.mark.not_on_windows("Windows uses old concretizer"),
- pytest.mark.only_clingo("Original concretizer does not support configuration requirements"),
-]
-
def update_packages_config(conf_str):
conf = syaml.load_config(conf_str)
spack.config.set("packages", conf["packages"], scope="concretize")
-_pkgx = (
- "x",
- """\
-class X(Package):
- version("1.1")
- version("1.0")
- version("0.9")
-
- variant("shared", default=True,
- description="Build shared libraries")
-
- depends_on("y")
-""",
-)
-
-
-_pkgy = (
- "y",
- """\
-class Y(Package):
- version("2.5")
- version("2.4")
- version("2.3", deprecated=True)
-
- variant("shared", default=True,
- description="Build shared libraries")
-""",
-)
-
-
-_pkgv = (
- "v",
- """\
-class V(Package):
- version("2.1")
- version("2.0")
-""",
-)
-
-
-_pkgt = (
- "t",
- """\
-class T(Package):
- version('2.1')
- version('2.0')
-
- depends_on('u', when='@2.1:')
-""",
-)
-
-
-_pkgu = (
- "u",
- """\
-class U(Package):
- version('1.1')
- version('1.0')
-""",
-)
-
-
@pytest.fixture
-def _create_test_repo(tmpdir, mutable_config):
- yield create_test_repo(tmpdir, [_pkgx, _pkgy, _pkgv, _pkgt, _pkgu])
-
-
-@pytest.fixture
-def test_repo(_create_test_repo, monkeypatch, mock_stage):
- with spack.repo.use_repositories(_create_test_repo) as mock_repo_path:
+def test_repo(mutable_config, monkeypatch, mock_stage):
+ repo_dir = pathlib.Path(spack.paths.repos_path) / "requirements.test"
+ with spack.repo.use_repositories(str(repo_dir)) as mock_repo_path:
yield mock_repo_path
-class MakeStage:
- def __init__(self, stage):
- self.stage = stage
-
- def __call__(self, *args, **kwargs):
- return self.stage
-
-
-@pytest.fixture
-def fake_installs(monkeypatch, tmpdir):
- stage_path = str(tmpdir.ensure("fake-stage", dir=True))
- universal_unused_stage = spack.stage.DIYStage(stage_path)
- monkeypatch.setattr(
- spack.build_systems.generic.Package, "_make_stage", MakeStage(universal_unused_stage)
- )
-
-
def test_one_package_multiple_reqs(concretize_scope, test_repo):
conf_str = """\
packages:
@@ -160,7 +74,7 @@ packages:
require: "@1.2"
"""
update_packages_config(conf_str)
- with pytest.raises(spack.config.ConfigError):
+ with pytest.raises(spack.error.ConfigError):
Spec("x").concretize()
@@ -514,23 +428,24 @@ packages:
assert s2.satisfies("@2.5")
-def test_reuse_oneof(concretize_scope, _create_test_repo, mutable_database, fake_installs):
+def test_reuse_oneof(concretize_scope, test_repo, tmp_path, mock_fetch):
conf_str = """\
packages:
y:
require:
- - one_of: ["@2.5", "%gcc"]
+ - one_of: ["@2.5", "~shared"]
"""
- with spack.repo.use_repositories(_create_test_repo):
- s1 = Spec("y@2.5%gcc").concretized()
- s1.package.do_install(fake=True, explicit=True)
+ store_dir = tmp_path / "store"
+ with spack.store.use_store(str(store_dir)):
+ s1 = Spec("y@2.5 ~shared").concretized()
+ PackageInstaller([s1.package], fake=True, explicit=True).install()
update_packages_config(conf_str)
with spack.config.override("concretizer:reuse", True):
s2 = Spec("y").concretized()
- assert not s2.satisfies("@2.5 %gcc")
+ assert not s2.satisfies("@2.5 ~shared")
@pytest.mark.parametrize(
@@ -569,13 +484,11 @@ packages:
@pytest.mark.parametrize("spec_str,requirement_str", [("x", "%gcc"), ("x", "%clang")])
def test_default_requirements_with_all(spec_str, requirement_str, concretize_scope, test_repo):
"""Test that default requirements are applied to all packages."""
- conf_str = """\
+ conf_str = f"""\
packages:
all:
- require: "{}"
-""".format(
- requirement_str
- )
+ require: "{requirement_str}"
+"""
update_packages_config(conf_str)
spec = Spec(spec_str).concretized()
@@ -596,15 +509,13 @@ def test_default_and_package_specific_requirements(
"""Test that specific package requirements override default package requirements."""
generic_req, specific_req = requirements
generic_exp, specific_exp = expectations
- conf_str = """\
+ conf_str = f"""\
packages:
all:
- require: "{}"
+ require: "{generic_req}"
x:
- require: "{}"
-""".format(
- generic_req, specific_req
- )
+ require: "{specific_req}"
+"""
update_packages_config(conf_str)
spec = Spec("x").concretized()
@@ -615,13 +526,11 @@ packages:
@pytest.mark.parametrize("mpi_requirement", ["mpich", "mpich2", "zmpi"])
def test_requirements_on_virtual(mpi_requirement, concretize_scope, mock_packages):
- conf_str = """\
+ conf_str = f"""\
packages:
mpi:
- require: "{}"
-""".format(
- mpi_requirement
- )
+ require: "{mpi_requirement}"
+"""
update_packages_config(conf_str)
spec = Spec("callpath").concretized()
@@ -636,15 +545,13 @@ packages:
def test_requirements_on_virtual_and_on_package(
mpi_requirement, specific_requirement, concretize_scope, mock_packages
):
- conf_str = """\
+ conf_str = f"""\
packages:
mpi:
- require: "{0}"
- {0}:
- require: "{1}"
-""".format(
- mpi_requirement, specific_requirement
- )
+ require: "{mpi_requirement}"
+ {mpi_requirement}:
+ require: "{specific_requirement}"
+"""
update_packages_config(conf_str)
spec = Spec("callpath").concretized()
@@ -856,6 +763,8 @@ def test_skip_requirement_when_default_requirement_condition_cannot_be_met(
def test_requires_directive(concretize_scope, mock_packages):
compilers_yaml = pathlib.Path(concretize_scope) / "compilers.yaml"
+
+ # NOTE: target is omitted here so that the test works on aarch64, as well.
compilers_yaml.write_text(
"""
compilers::
@@ -867,7 +776,6 @@ compilers::
f77: null
fc: null
operating_system: debian6
- target: x86_64
modules: []
"""
)
@@ -943,9 +851,9 @@ def test_default_requirements_semantic(packages_yaml, concretize_scope, mock_pac
Spec("zlib ~shared").concretized()
# A spec without the shared variant still concretize
- s = Spec("a").concretized()
- assert not s.satisfies("a +shared")
- assert not s.satisfies("a ~shared")
+ s = Spec("pkg-a").concretized()
+ assert not s.satisfies("pkg-a +shared")
+ assert not s.satisfies("pkg-a ~shared")
@pytest.mark.parametrize(
@@ -1011,3 +919,210 @@ def test_default_requirements_semantic_with_mv_variants(
for constraint in not_expected:
assert not s.satisfies(constraint), constraint
+
+
+@pytest.mark.regression("42084")
+def test_requiring_package_on_multiple_virtuals(concretize_scope, mock_packages):
+ update_packages_config(
+ """
+ packages:
+ all:
+ providers:
+ scalapack: [netlib-scalapack]
+ blas:
+ require: intel-parallel-studio
+ lapack:
+ require: intel-parallel-studio
+ scalapack:
+ require: intel-parallel-studio
+ """
+ )
+ s = Spec("dla-future").concretized()
+
+ assert s["blas"].name == "intel-parallel-studio"
+ assert s["lapack"].name == "intel-parallel-studio"
+ assert s["scalapack"].name == "intel-parallel-studio"
+
+
+@pytest.mark.parametrize(
+ "packages_yaml,spec_str,expected,not_expected",
+ [
+ (
+ """
+ packages:
+ all:
+ prefer:
+ - "%clang"
+ compiler: [gcc]
+ """,
+ "multivalue-variant",
+ ["%clang"],
+ ["%gcc"],
+ ),
+ (
+ """
+ packages:
+ all:
+ prefer:
+ - "%clang"
+ """,
+ "multivalue-variant %gcc",
+ ["%gcc"],
+ ["%clang"],
+ ),
+ # Test parsing objects instead of strings
+ (
+ """
+ packages:
+ all:
+ prefer:
+ - spec: "%clang"
+ compiler: [gcc]
+ """,
+ "multivalue-variant",
+ ["%clang"],
+ ["%gcc"],
+ ),
+ ],
+)
+def test_strong_preferences_packages_yaml(
+ packages_yaml, spec_str, expected, not_expected, concretize_scope, mock_packages
+):
+ """Tests that "preferred" specs are stronger than usual preferences, but can be overridden."""
+ update_packages_config(packages_yaml)
+ s = Spec(spec_str).concretized()
+
+ for constraint in expected:
+ assert s.satisfies(constraint), constraint
+
+ for constraint in not_expected:
+ assert not s.satisfies(constraint), constraint
+
+
+@pytest.mark.parametrize(
+ "packages_yaml,spec_str",
+ [
+ (
+ """
+ packages:
+ all:
+ conflict:
+ - "%clang"
+ """,
+ "multivalue-variant %clang",
+ ),
+ # Use an object instead of a string in configuration
+ (
+ """
+ packages:
+ all:
+ conflict:
+ - spec: "%clang"
+ message: "cannot use clang"
+ """,
+ "multivalue-variant %clang",
+ ),
+ (
+ """
+ packages:
+ multivalue-variant:
+ conflict:
+ - spec: "%clang"
+ when: "@2"
+ message: "cannot use clang with version 2"
+ """,
+ "multivalue-variant@=2.3 %clang",
+ ),
+ ],
+)
+def test_conflict_packages_yaml(packages_yaml, spec_str, concretize_scope, mock_packages):
+ """Tests conflicts that are specified from configuration files."""
+ update_packages_config(packages_yaml)
+ with pytest.raises(UnsatisfiableSpecError):
+ Spec(spec_str).concretized()
+
+
+@pytest.mark.parametrize(
+ "spec_str,expected,not_expected",
+ [
+ (
+ "forward-multi-value +cuda cuda_arch=10 ^dependency-mv~cuda",
+ ["cuda_arch=10", "^dependency-mv~cuda"],
+ ["cuda_arch=11", "^dependency-mv cuda_arch=10", "^dependency-mv cuda_arch=11"],
+ ),
+ (
+ "forward-multi-value +cuda cuda_arch=10 ^dependency-mv+cuda",
+ ["cuda_arch=10", "^dependency-mv cuda_arch=10"],
+ ["cuda_arch=11", "^dependency-mv cuda_arch=11"],
+ ),
+ (
+ "forward-multi-value +cuda cuda_arch=11 ^dependency-mv+cuda",
+ ["cuda_arch=11", "^dependency-mv cuda_arch=11"],
+ ["cuda_arch=10", "^dependency-mv cuda_arch=10"],
+ ),
+ (
+ "forward-multi-value +cuda cuda_arch=10,11 ^dependency-mv+cuda",
+ ["cuda_arch=10,11", "^dependency-mv cuda_arch=10,11"],
+ [],
+ ),
+ ],
+)
+def test_forward_multi_valued_variant_using_requires(
+ spec_str, expected, not_expected, config, mock_packages
+):
+ """Tests that a package can forward multivalue variants to dependencies, using
+ `requires` directives of the form:
+
+ for _val in ("shared", "static"):
+ requires(f"^some-virtual-mv libs={_val}", when=f"libs={_val} ^some-virtual-mv")
+ """
+ s = Spec(spec_str).concretized()
+
+ for constraint in expected:
+ assert s.satisfies(constraint)
+
+ for constraint in not_expected:
+ assert not s.satisfies(constraint)
+
+
+def test_strong_preferences_higher_priority_than_reuse(concretize_scope, mock_packages):
+ """Tests that strong preferences have a higher priority than reusing specs."""
+ reused_spec = Spec("adios2~bzip2").concretized()
+ reuse_nodes = list(reused_spec.traverse())
+ root_specs = [Spec("ascent+adios2")]
+
+ # Check that without further configuration adios2 is reused
+ with spack.config.override("concretizer:reuse", True):
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+ result, _, _ = solver.driver.solve(setup, root_specs, reuse=reuse_nodes)
+ ascent = result.specs[0]
+ assert ascent["adios2"].dag_hash() == reused_spec.dag_hash(), ascent
+
+ # If we stick a preference, adios2 is not reused
+ update_packages_config(
+ """
+ packages:
+ adios2:
+ prefer:
+ - "+bzip2"
+"""
+ )
+ with spack.config.override("concretizer:reuse", True):
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+ result, _, _ = solver.driver.solve(setup, root_specs, reuse=reuse_nodes)
+ ascent = result.specs[0]
+
+ assert ascent["adios2"].dag_hash() != reused_spec.dag_hash()
+ assert ascent["adios2"].satisfies("+bzip2")
+
+ # A preference is still preference, so we can override from input
+ with spack.config.override("concretizer:reuse", True):
+ solver = spack.solver.asp.Solver()
+ setup = spack.solver.asp.SpackSolverSetup()
+ result, _, _ = solver.driver.solve(
+ setup, [Spec("ascent+adios2 ^adios2~bzip2")], reuse=reuse_nodes
+ )
+ ascent = result.specs[0]
+ assert ascent["adios2"].dag_hash() == reused_spec.dag_hash(), ascent
diff --git a/lib/spack/spack/test/concretize_compiler_runtimes.py b/lib/spack/spack/test/concretize_compiler_runtimes.py
deleted file mode 100644
index 18eff16fe9..0000000000
--- a/lib/spack/spack/test/concretize_compiler_runtimes.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2013-2024 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 pytest
-
-import spack.paths
-import spack.repo
-import spack.solver.asp
-import spack.spec
-from spack.version import Version
-
-pytestmark = [pytest.mark.only_clingo("Original concretizer does not support compiler runtimes")]
-
-
-@pytest.fixture
-def runtime_repo(config):
- repo = os.path.join(spack.paths.repos_path, "compiler_runtime.test")
- with spack.repo.use_repositories(repo) as mock_repo:
- yield mock_repo
-
-
-@pytest.fixture
-def enable_runtimes():
- original = spack.solver.asp.WITH_RUNTIME
- spack.solver.asp.WITH_RUNTIME = True
- yield
- spack.solver.asp.WITH_RUNTIME = original
-
-
-def test_correct_gcc_runtime_is_injected_as_dependency(runtime_repo, enable_runtimes):
- s = spack.spec.Spec("a%gcc@10.2.1 ^b%gcc@4.5.0").concretized()
- a, b = s["a"], s["b"]
-
- # Both a and b should depend on the same gcc-runtime directly
- assert a.dependencies("gcc-runtime") == b.dependencies("gcc-runtime")
-
- # And the gcc-runtime version should be that of the newest gcc used in the dag.
- assert a["gcc-runtime"].version == Version("10.2.1")
diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py
index 491931da20..52e1cc9e04 100644
--- a/lib/spack/spack/test/config.py
+++ b/lib/spack/spack/test/config.py
@@ -13,21 +13,23 @@ from datetime import date
import pytest
import llnl.util.tty as tty
-from llnl.util.filesystem import getuid, join_path, mkdirp, touch, touchp
+from llnl.util.filesystem import join_path, touch, touchp
+import spack
import spack.config
import spack.directory_layout
import spack.environment as ev
-import spack.main
+import spack.error
import spack.package_base
import spack.paths
+import spack.platforms
import spack.repo
import spack.schema.compilers
import spack.schema.config
import spack.schema.env
import spack.schema.mirrors
-import spack.schema.packages
import spack.schema.repos
+import spack.spec
import spack.store
import spack.util.path as spack_path
import spack.util.spack_yaml as syaml
@@ -284,6 +286,13 @@ def test_add_config_path(mutable_config):
set_value = spack.config.get("config")["install_tree"]["projections"]["cmake"]
assert set_value == "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"
+ path = 'modules:default:tcl:all:environment:set:"{name}_ROOT":"{prefix}"'
+ spack.config.add(path)
+ set_value = spack.config.get("modules")["default"]["tcl"]["all"]["environment"]["set"]
+ assert r"{name}_ROOT" in set_value
+ assert set_value[r"{name}_ROOT"] == r"{prefix}"
+ assert spack.config.get('modules:default:tcl:all:environment:set:"{name}_ROOT"') == r"{prefix}"
+
# NOTE:
# The config path: "config:install_tree:root:<path>" is unique in that it can accept multiple
# schemas (such as a dropped "root" component) which is atypical and may lead to passing tests
@@ -299,14 +308,14 @@ def test_add_config_path(mutable_config):
@pytest.mark.regression("17543,23259")
def test_add_config_path_with_enumerated_type(mutable_config):
- spack.config.add("config:concretizer:clingo")
- assert spack.config.get("config")["concretizer"] == "clingo"
+ spack.config.add("config:flags:keep_werror:all")
+ assert spack.config.get("config")["flags"]["keep_werror"] == "all"
- spack.config.add("config:concretizer:original")
- assert spack.config.get("config")["concretizer"] == "original"
+ spack.config.add("config:flags:keep_werror:specific")
+ assert spack.config.get("config")["flags"]["keep_werror"] == "specific"
- with pytest.raises(spack.config.ConfigError):
- spack.config.add("config:concretizer:foo")
+ with pytest.raises(spack.error.ConfigError):
+ spack.config.add("config:flags:keep_werror:foo")
def test_add_config_filename(mock_low_high_config, tmpdir):
@@ -399,7 +408,7 @@ def test_substitute_config_variables(mock_low_high_config, monkeypatch):
) == os.path.abspath(os.path.join("foo", "test", "bar"))
host_target = spack.platforms.host().target("default_target")
- host_target_family = str(host_target.microarchitecture.family)
+ host_target_family = str(host_target.family)
assert spack_path.canonicalize_path(
os.path.join("foo", "$target_family", "bar")
) == os.path.abspath(os.path.join("foo", host_target_family, "bar"))
@@ -464,6 +473,13 @@ def test_substitute_date(mock_low_high_config):
assert date.today().strftime("%Y-%m-%d") in new_path
+def test_substitute_spack_version():
+ version = spack.spack_version_info
+ assert spack_path.canonicalize_path(
+ "spack$spack_short_version/test"
+ ) == spack_path.canonicalize_path(f"spack{version[0]}.{version[1]}/test")
+
+
PAD_STRING = spack_path.SPACK_PATH_PADDING_CHARS
MAX_PATH_LEN = spack_path.get_system_path_max()
MAX_PADDED_LEN = MAX_PATH_LEN - spack_path.SPACK_MAX_INSTALL_PATH_LENGTH
@@ -485,7 +501,7 @@ full_padded_string = os.path.join(os.sep + "path", os.sep.join(reps))[:MAX_PADDE
],
)
def test_parse_install_tree(config_settings, expected, mutable_config):
- expected_root = expected[0] or spack.store.DEFAULT_INSTALL_TREE_ROOT
+ expected_root = expected[0] or mutable_config.get("config:install_tree:root")
expected_unpadded_root = expected[1] or expected_root
expected_proj = expected[2] or spack.directory_layout.default_projections
@@ -568,7 +584,7 @@ def test_change_or_add(mutable_config, mock_packages):
],
)
def test_parse_install_tree_padded(config_settings, expected, mutable_config):
- expected_root = expected[0] or spack.store.DEFAULT_INSTALL_TREE_ROOT
+ expected_root = expected[0] or mutable_config.get("config:install_tree:root")
expected_unpadded_root = expected[1] or expected_root
expected_proj = expected[2] or spack.directory_layout.default_projections
@@ -754,25 +770,20 @@ def test_internal_config_from_data():
assert config.get("config:checksum", scope="higher") is True
-def test_keys_are_ordered():
+def test_keys_are_ordered(configuration_dir):
"""Test that keys in Spack YAML files retain their order from the file."""
expected_order = (
- "bin",
- "man",
- "share/man",
- "share/aclocal",
- "lib",
- "lib64",
- "include",
- "lib/pkgconfig",
- "lib64/pkgconfig",
- "share/pkgconfig",
- "",
+ "./bin",
+ "./man",
+ "./share/man",
+ "./share/aclocal",
+ "./lib/pkgconfig",
+ "./lib64/pkgconfig",
+ "./share/pkgconfig",
+ "./",
)
- config_scope = spack.config.ConfigScope(
- "modules", os.path.join(spack.paths.test_path, "data", "config")
- )
+ config_scope = spack.config.DirectoryConfigScope("modules", configuration_dir.join("site"))
data = config_scope.get_section("modules")
@@ -862,26 +873,18 @@ def test_bad_config_section(mock_low_high_config):
spack.config.get("foobar")
-@pytest.mark.not_on_windows("chmod not supported on Windows")
-@pytest.mark.skipif(getuid() == 0, reason="user is root")
-def test_bad_command_line_scopes(tmpdir, config):
+def test_bad_command_line_scopes(tmp_path, config):
cfg = spack.config.Configuration()
+ file_path = tmp_path / "file_instead_of_dir"
+ non_existing_path = tmp_path / "non_existing_dir"
- with tmpdir.as_cwd():
- with pytest.raises(spack.config.ConfigError):
- spack.config._add_command_line_scopes(cfg, ["bad_path"])
+ file_path.write_text("")
- touch("unreadable_file")
- with pytest.raises(spack.config.ConfigError):
- spack.config._add_command_line_scopes(cfg, ["unreadable_file"])
+ with pytest.raises(spack.error.ConfigError):
+ spack.config._add_command_line_scopes(cfg, [str(file_path)])
- mkdirp("unreadable_dir")
- with pytest.raises(spack.config.ConfigError):
- try:
- os.chmod("unreadable_dir", 0)
- spack.config._add_command_line_scopes(cfg, ["unreadable_dir"])
- finally:
- os.chmod("unreadable_dir", 0o700) # so tmpdir can be removed
+ with pytest.raises(spack.error.ConfigError):
+ spack.config._add_command_line_scopes(cfg, [str(non_existing_path)])
def test_add_command_line_scopes(tmpdir, mutable_config):
@@ -896,6 +899,45 @@ config:
)
spack.config._add_command_line_scopes(mutable_config, [str(tmpdir)])
+ assert mutable_config.get("config:verify_ssl") is False
+ assert mutable_config.get("config:dirty") is False
+
+
+def test_add_command_line_scope_env(tmp_path, mutable_mock_env_path):
+ """Test whether --config-scope <env> works, either by name or path."""
+ managed_env = ev.create("example").manifest_path
+
+ with open(managed_env, "w") as f:
+ f.write(
+ """\
+spack:
+ config:
+ install_tree:
+ root: /tmp/first
+"""
+ )
+
+ with open(tmp_path / "spack.yaml", "w") as f:
+ f.write(
+ """\
+spack:
+ config:
+ install_tree:
+ root: /tmp/second
+"""
+ )
+
+ config = spack.config.Configuration()
+ spack.config._add_command_line_scopes(config, ["example", str(tmp_path)])
+ assert len(config.scopes) == 2
+ assert config.get("config:install_tree:root") == "/tmp/second"
+
+ config = spack.config.Configuration()
+ spack.config._add_command_line_scopes(config, [str(tmp_path), "example"])
+ assert len(config.scopes) == 2
+ assert config.get("config:install_tree:root") == "/tmp/first"
+
+ assert ev.active_environment() is None # shouldn't cause an environment to be activated
def test_nested_override():
@@ -954,23 +996,25 @@ config:
root: dummy_tree_value
"""
)
- scope = spack.config.ImmutableConfigScope("test", str(tmpdir))
+ scope = spack.config.DirectoryConfigScope("test", str(tmpdir), writable=False)
data = scope.get_section("config")
assert data["config"]["install_tree"] == {"root": "dummy_tree_value"}
- with pytest.raises(spack.config.ConfigError):
+ with pytest.raises(spack.error.ConfigError):
scope._write_section("config")
def test_single_file_scope(config, env_yaml):
- scope = spack.config.SingleFileScope("env", env_yaml, spack.schema.env.schema, ["spack"])
+ scope = spack.config.SingleFileScope(
+ "env", env_yaml, spack.schema.env.schema, yaml_path=["spack"]
+ )
with spack.config.override(scope):
# from the single-file config
assert spack.config.get("config:verify_ssl") is False
assert spack.config.get("config:dirty") is False
- assert spack.config.get("packages:all:compiler") == ["gcc@4.5.3"]
+ assert spack.config.get("packages:all:compiler") == ["gcc@4.5.3", "gcc", "clang"]
# from the lower config scopes
assert spack.config.get("config:checksum") is True
@@ -1000,7 +1044,9 @@ spack:
"""
)
- scope = spack.config.SingleFileScope("env", env_yaml, spack.schema.env.schema, ["spack"])
+ scope = spack.config.SingleFileScope(
+ "env", env_yaml, spack.schema.env.schema, yaml_path=["spack"]
+ )
with spack.config.override(scope):
# from the single-file config
@@ -1016,7 +1062,7 @@ spack:
def test_write_empty_single_file_scope(tmpdir):
env_schema = spack.schema.env.schema
scope = spack.config.SingleFileScope(
- "test", str(tmpdir.ensure("config.yaml")), env_schema, ["spack"]
+ "test", str(tmpdir.ensure("config.yaml")), env_schema, yaml_path=["spack"]
)
scope._write_section("config")
# confirm we can write empty config
@@ -1188,7 +1234,7 @@ def test_set_dict_override(mock_low_high_config, write_config_file):
def test_set_bad_path(config):
- with pytest.raises(syaml.SpackYAMLError, match="Illegal leading"):
+ with pytest.raises(ValueError):
with spack.config.override(":bad:path", ""):
pass
@@ -1204,18 +1250,20 @@ def test_license_dir_config(mutable_config, mock_packages):
expected_dir = spack.paths.default_license_dir
assert spack.config.get("config:license_dir") == expected_dir
assert spack.package_base.PackageBase.global_license_dir == expected_dir
- assert spack.repo.PATH.get_pkg_class("a").global_license_dir == expected_dir
+ assert spack.repo.PATH.get_pkg_class("pkg-a").global_license_dir == expected_dir
rel_path = os.path.join(os.path.sep, "foo", "bar", "baz")
spack.config.set("config:license_dir", rel_path)
assert spack.config.get("config:license_dir") == rel_path
assert spack.package_base.PackageBase.global_license_dir == rel_path
- assert spack.repo.PATH.get_pkg_class("a").global_license_dir == rel_path
+ assert spack.repo.PATH.get_pkg_class("pkg-a").global_license_dir == rel_path
@pytest.mark.regression("22547")
def test_single_file_scope_cache_clearing(env_yaml):
- scope = spack.config.SingleFileScope("env", env_yaml, spack.schema.env.schema, ["spack"])
+ scope = spack.config.SingleFileScope(
+ "env", env_yaml, spack.schema.env.schema, yaml_path=["spack"]
+ )
# Check that we can retrieve data from the single file scope
before = scope.get_section("config")
assert before
@@ -1269,7 +1317,7 @@ def test_user_config_path_is_default_when_env_var_is_empty(working_env):
def test_default_install_tree(monkeypatch, default_config):
s = spack.spec.Spec("nonexistent@x.y.z %none@a.b.c arch=foo-bar-baz")
- monkeypatch.setattr(s, "dag_hash", lambda: "abc123")
+ monkeypatch.setattr(s, "dag_hash", lambda length: "abc123")
_, _, projections = spack.store.parse_install_tree(spack.config.get("config"))
assert s.format(projections["all"]) == "foo-bar-baz/none-a.b.c/nonexistent-x.y.z-abc123"
@@ -1462,3 +1510,26 @@ def test_config_file_read_invalid_yaml(tmpdir, mutable_empty_config):
with pytest.raises(spack.config.ConfigFileError, match="parsing YAML"):
spack.config.read_config_file(filename)
+
+
+@pytest.mark.parametrize(
+ "path,it_should_work,expected_parsed",
+ [
+ ("x:y:z", True, ["x:", "y:", "z"]),
+ ("x+::y:z", True, ["x+::", "y:", "z"]),
+ ('x:y:"{z}"', True, ["x:", "y:", '"{z}"']),
+ ('x:"y"+:z', True, ["x:", '"y"+:', "z"]),
+ ('x:"y"trail:z', False, None),
+ ("x:y:[1.0]", True, ["x:", "y:", "[1.0]"]),
+ ("x:y:['1.0']", True, ["x:", "y:", "['1.0']"]),
+ ("x:{y}:z", True, ["x:", "{y}:", "z"]),
+ ("x:'{y}':z", True, ["x:", "'{y}':", "z"]),
+ ("x:{y}", True, ["x:", "{y}"]),
+ ],
+)
+def test_config_path_dsl(path, it_should_work, expected_parsed):
+ if it_should_work:
+ assert spack.config.ConfigPath._validate(path) == expected_parsed
+ else:
+ with pytest.raises(ValueError):
+ spack.config.ConfigPath._validate(path)
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index 22f2e95a7c..b56d75c6fa 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -12,6 +12,7 @@ import itertools
import json
import os
import os.path
+import pathlib
import re
import shutil
import stat
@@ -22,6 +23,7 @@ import xml.etree.ElementTree
import py
import pytest
+import archspec.cpu
import archspec.cpu.microarchitecture
import archspec.cpu.schema
@@ -31,32 +33,46 @@ import llnl.util.tty as tty
from llnl.util.filesystem import copy_tree, mkdirp, remove_linked_tree, touchp, working_dir
import spack.binary_distribution
+import spack.bootstrap.core
import spack.caches
-import spack.cmd.buildcache
+import spack.compiler
import spack.compilers
import spack.config
-import spack.database
-import spack.directory_layout
+import spack.directives_meta
import spack.environment as ev
import spack.error
+import spack.modules.common
import spack.package_base
-import spack.package_prefs
import spack.paths
import spack.platforms
import spack.repo
import spack.solver.asp
+import spack.spec
import spack.stage
import spack.store
import spack.subprocess_context
-import spack.test.cray_manifest
import spack.util.executable
+import spack.util.file_cache
import spack.util.git
import spack.util.gpg
+import spack.util.parallel
import spack.util.spack_yaml as syaml
import spack.util.url as url_util
+import spack.util.web
+import spack.version
from spack.fetch_strategy import URLFetchStrategy
+from spack.installer import PackageInstaller
+from spack.main import SpackCommand
from spack.util.pattern import Bunch
+mirror_cmd = SpackCommand("mirror")
+
+
+@pytest.fixture(autouse=True)
+def check_config_fixture(request):
+ if "config" in request.fixturenames and "mutable_config" in request.fixturenames:
+ raise RuntimeError("'config' and 'mutable_config' are both requested")
+
def ensure_configuration_fixture_run_before(request):
"""Ensure that fixture mutating the configuration run before the one where
@@ -267,10 +283,6 @@ def clean_test_environment():
ev.deactivate()
-def _verify_executables_noop(*args):
- return None
-
-
def _host():
"""Mock archspec host so there is no inconsistency on the Windows platform
This function cannot be local as it needs to be pickleable"""
@@ -296,9 +308,7 @@ def mock_compiler_executable_verification(request, monkeypatch):
If a test is marked in that way this is a no-op."""
if "enable_compiler_verification" not in request.keywords:
- monkeypatch.setattr(
- spack.compiler.Compiler, "verify_executables", _verify_executables_noop
- )
+ monkeypatch.setattr(spack.compiler.Compiler, "verify_executables", _return_none)
# Hooks to add command line options or set other custom behaviors.
@@ -562,14 +572,14 @@ def _use_test_platform(test_platform):
#
@pytest.fixture(scope="session")
def mock_repo_path():
- yield spack.repo.Repo(spack.paths.mock_packages_path)
+ yield spack.repo.from_path(spack.paths.mock_packages_path)
def _pkg_install_fn(pkg, spec, prefix):
# sanity_check_prefix requires something in the install directory
mkdirp(prefix.bin)
- if not os.path.exists(spec.package.build_log_path):
- touchp(spec.package.build_log_path)
+ if not os.path.exists(spec.package.install_log_path):
+ touchp(spec.package.install_log_path)
@pytest.fixture
@@ -589,7 +599,7 @@ def mock_packages(mock_repo_path, mock_pkg_install, request):
def mutable_mock_repo(mock_repo_path, request):
"""Function-scoped mock packages, for tests that need to modify them."""
ensure_configuration_fixture_run_before(request)
- mock_repo = spack.repo.Repo(spack.paths.mock_packages_path)
+ mock_repo = spack.repo.from_path(spack.paths.mock_packages_path)
with spack.repo.use_repositories(mock_repo) as mock_repo_path:
yield mock_repo_path
@@ -598,7 +608,7 @@ def mutable_mock_repo(mock_repo_path, request):
def mock_custom_repository(tmpdir, mutable_mock_repo):
"""Create a custom repository with a single package "c" and return its path."""
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("myrepo"))
- builder.add_package("c")
+ builder.add_package("pkg-c")
return builder.root
@@ -685,34 +695,33 @@ def configuration_dir(tmpdir_factory, linux_os):
directory path.
"""
tmpdir = tmpdir_factory.mktemp("configurations")
+ install_tree_root = tmpdir_factory.mktemp("opt")
+ modules_root = tmpdir_factory.mktemp("share")
+ tcl_root = modules_root.ensure("modules", dir=True)
+ lmod_root = modules_root.ensure("lmod", dir=True)
# <test_path>/data/config has mock config yaml files in it
# copy these to the site config.
- test_config = py.path.local(spack.paths.test_path).join("data", "config")
- test_config.copy(tmpdir.join("site"))
+ test_config = pathlib.Path(spack.paths.test_path) / "data" / "config"
+ shutil.copytree(test_config, tmpdir.join("site"))
# Create temporary 'defaults', 'site' and 'user' folders
tmpdir.ensure("user", dir=True)
- # Slightly modify config.yaml and compilers.yaml
- if sys.platform == "win32":
- locks = False
- else:
- locks = True
+ # Fill out config.yaml, compilers.yaml and modules.yaml templates.
+ locks = sys.platform != "win32"
+ config = tmpdir.join("site", "config.yaml")
+ config_template = test_config / "config.yaml"
+ config.write(config_template.read_text().format(install_tree_root, locks))
- solver = os.environ.get("SPACK_TEST_SOLVER", "clingo")
- config_yaml = test_config.join("config.yaml")
- modules_root = tmpdir_factory.mktemp("share")
- tcl_root = modules_root.ensure("modules", dir=True)
- lmod_root = modules_root.ensure("lmod", dir=True)
- content = "".join(config_yaml.read()).format(solver, locks, str(tcl_root), str(lmod_root))
- t = tmpdir.join("site", "config.yaml")
- t.write(content)
-
- compilers_yaml = test_config.join("compilers.yaml")
- content = "".join(compilers_yaml.read()).format(linux_os)
- t = tmpdir.join("site", "compilers.yaml")
- t.write(content)
+ target = str(archspec.cpu.host().family)
+ compilers = tmpdir.join("site", "compilers.yaml")
+ compilers_template = test_config / "compilers.yaml"
+ compilers.write(compilers_template.read_text().format(linux_os=linux_os, target=target))
+
+ modules = tmpdir.join("site", "modules.yaml")
+ modules_template = test_config / "modules.yaml"
+ modules.write(modules_template.read_text().format(tcl_root, lmod_root))
yield tmpdir
@@ -720,9 +729,9 @@ def _create_mock_configuration_scopes(configuration_dir):
"""Create the configuration scopes used in `config` and `mutable_config`."""
return [
spack.config.InternalConfigScope("_builtin", spack.config.CONFIG_DEFAULTS),
- spack.config.ConfigScope("site", str(configuration_dir.join("site"))),
- spack.config.ConfigScope("system", str(configuration_dir.join("system"))),
- spack.config.ConfigScope("user", str(configuration_dir.join("user"))),
+ spack.config.DirectoryConfigScope("site", str(configuration_dir.join("site"))),
+ spack.config.DirectoryConfigScope("system", str(configuration_dir.join("system"))),
+ spack.config.DirectoryConfigScope("user", str(configuration_dir.join("user"))),
spack.config.InternalConfigScope("command_line"),
]
@@ -756,7 +765,7 @@ def mutable_empty_config(tmpdir_factory, configuration_dir):
"""Empty configuration that can be modified by the tests."""
mutable_dir = tmpdir_factory.mktemp("mutable_config").join("tmp")
scopes = [
- spack.config.ConfigScope(name, str(mutable_dir.join(name)))
+ spack.config.DirectoryConfigScope(name, str(mutable_dir.join(name)))
for name in ["site", "system", "user"]
]
@@ -764,12 +773,34 @@ def mutable_empty_config(tmpdir_factory, configuration_dir):
yield cfg
+# From https://github.com/pytest-dev/pytest/issues/363#issuecomment-1335631998
+# Current suggested implementation from issue compatible with pytest >= 6.2
+# this may be subject to change as new versions of Pytest are released
+# and update the suggested solution
+@pytest.fixture(scope="session")
+def monkeypatch_session():
+ with pytest.MonkeyPatch.context() as monkeypatch:
+ yield monkeypatch
+
+
+@pytest.fixture(scope="session", autouse=True)
+def mock_wsdk_externals(monkeypatch_session):
+ """Skip check for required external packages on Windows during testing
+ Note: In general this should cover this behavior for all tests,
+ however any session scoped fixture involving concretization should
+ include this fixture
+ """
+ monkeypatch_session.setattr(
+ spack.bootstrap.core, "ensure_winsdk_external_or_raise", _return_none
+ )
+
+
@pytest.fixture(scope="function")
def concretize_scope(mutable_config, tmpdir):
"""Adds a scope for concretization preferences"""
tmpdir.ensure_dir("concretize")
mutable_config.push_scope(
- spack.config.ConfigScope("concretize", str(tmpdir.join("concretize")))
+ spack.config.DirectoryConfigScope("concretize", str(tmpdir.join("concretize")))
)
yield str(tmpdir.join("concretize"))
@@ -781,18 +812,21 @@ def concretize_scope(mutable_config, tmpdir):
@pytest.fixture
def no_compilers_yaml(mutable_config):
"""Creates a temporary configuration without compilers.yaml"""
- for scope, local_config in mutable_config.scopes.items():
- if not local_config.path: # skip internal scopes
+ for local_config in mutable_config.scopes.values():
+ if not isinstance(local_config, spack.config.DirectoryConfigScope):
continue
- compilers_yaml = os.path.join(local_config.path, "compilers.yaml")
+ compilers_yaml = local_config.get_section_filename("compilers")
if os.path.exists(compilers_yaml):
os.remove(compilers_yaml)
+ return mutable_config
@pytest.fixture()
def mock_low_high_config(tmpdir):
"""Mocks two configuration scopes: 'low' and 'high'."""
- scopes = [spack.config.ConfigScope(name, str(tmpdir.join(name))) for name in ["low", "high"]]
+ scopes = [
+ spack.config.DirectoryConfigScope(name, str(tmpdir.join(name))) for name in ["low", "high"]
+ ]
with spack.config.use_configuration(*scopes) as config:
yield config
@@ -822,12 +856,12 @@ def _populate(mock_db):
def _install(spec):
s = spack.spec.Spec(spec).concretized()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
_install("mpileaks ^mpich")
_install("mpileaks ^mpich2")
_install("mpileaks ^zmpi")
- _install("externaltest")
+ _install("externaltest ^externalvirtual")
_install("trivial-smoke-test")
@@ -842,7 +876,13 @@ def _store_dir_and_cache(tmpdir_factory):
@pytest.fixture(scope="session")
-def mock_store(tmpdir_factory, mock_repo_path, mock_configuration_scopes, _store_dir_and_cache):
+def mock_store(
+ tmpdir_factory,
+ mock_wsdk_externals,
+ mock_repo_path,
+ mock_configuration_scopes,
+ _store_dir_and_cache,
+):
"""Creates a read-only mock database with some packages installed note
that the ref count for dyninst here will be 3, as it's recycled
across each install.
@@ -929,26 +969,30 @@ def dirs_with_libfiles(tmpdir_factory):
yield lib_to_dirs, all_dirs
-def _compiler_link_paths_noop(*args):
- return []
+def _return_none(*args):
+ return None
+
+
+def _compiler_output(self):
+ return ""
+
+
+def _get_real_version(self):
+ return str(self.version)
@pytest.fixture(scope="function", autouse=True)
def disable_compiler_execution(monkeypatch, request):
- """
- This fixture can be disabled for tests of the compiler link path
- functionality by::
+ """Disable compiler execution to determine implicit link paths and libc flavor and version.
+ To re-enable use `@pytest.mark.enable_compiler_execution`"""
+ if "enable_compiler_execution" not in request.keywords:
+ monkeypatch.setattr(spack.compiler.Compiler, "_compile_dummy_c_source", _compiler_output)
+ monkeypatch.setattr(spack.compiler.Compiler, "get_real_version", _get_real_version)
- @pytest.mark.enable_compiler_link_paths
- If a test is marked in that way this is a no-op."""
- if "enable_compiler_link_paths" not in request.keywords:
- # Compiler.determine_implicit_rpaths actually runs the compiler. So
- # replace that function with a noop that simulates finding no implicit
- # RPATHs
- monkeypatch.setattr(
- spack.compiler.Compiler, "_get_compiler_link_paths", _compiler_link_paths_noop
- )
+@pytest.fixture(autouse=True)
+def disable_compiler_output_cache(monkeypatch):
+ monkeypatch.setattr(spack.compiler, "COMPILER_CACHE", spack.compiler.CompilerCache())
@pytest.fixture(scope="function")
@@ -962,6 +1006,38 @@ def install_mockery(temporary_store: spack.store.Store, mutable_config, mock_pac
temporary_store.failure_tracker.clear_all()
+@pytest.fixture(scope="module")
+def temporary_mirror_dir(tmpdir_factory):
+ dir = tmpdir_factory.mktemp("mirror")
+ dir.ensure("build_cache", dir=True)
+ yield str(dir)
+ dir.join("build_cache").remove()
+
+
+@pytest.fixture(scope="function")
+def temporary_mirror(temporary_mirror_dir):
+ mirror_url = url_util.path_to_file_url(temporary_mirror_dir)
+ mirror_cmd("add", "--scope", "site", "test-mirror-func", mirror_url)
+ yield temporary_mirror_dir
+ mirror_cmd("rm", "--scope=site", "test-mirror-func")
+
+
+@pytest.fixture(scope="function")
+def mutable_temporary_mirror_dir(tmpdir_factory):
+ dir = tmpdir_factory.mktemp("mirror")
+ dir.ensure("build_cache", dir=True)
+ yield str(dir)
+ dir.join("build_cache").remove()
+
+
+@pytest.fixture(scope="function")
+def mutable_temporary_mirror(mutable_temporary_mirror_dir):
+ mirror_url = url_util.path_to_file_url(mutable_temporary_mirror_dir)
+ mirror_cmd("add", "--scope", "site", "test-mirror-func", mirror_url)
+ yield mutable_temporary_mirror_dir
+ mirror_cmd("rm", "--scope=site", "test-mirror-func")
+
+
@pytest.fixture(scope="function")
def temporary_store(tmpdir, request):
"""Hooks a temporary empty store for the test function."""
@@ -972,24 +1048,11 @@ def temporary_store(tmpdir, request):
temporary_store_path.remove()
-@pytest.fixture(scope="function")
-def install_mockery_mutable_config(temporary_store, mutable_config, mock_packages):
- """Hooks a fake install directory, DB, and stage directory into Spack.
-
- This is specifically for tests which want to use 'install_mockery' but
- also need to modify configuration (and hence would want to use
- 'mutable config'): 'install_mockery' does not support this.
- """
- # We use a fake package, so temporarily disable checksumming
- with spack.config.override("config:checksum", False):
- yield
-
-
@pytest.fixture()
def mock_fetch(mock_archive, monkeypatch):
"""Fake the URL for a package so it downloads from a file."""
monkeypatch.setattr(
- spack.package_base.PackageBase, "fetcher", URLFetchStrategy(mock_archive.url)
+ spack.package_base.PackageBase, "fetcher", URLFetchStrategy(url=mock_archive.url)
)
@@ -1404,6 +1467,24 @@ def mock_git_repository(git, tmpdir_factory):
r1 = rev_hash(branch)
r1_file = branch_file
+ multiple_directories_branch = "many_dirs"
+ num_dirs = 3
+ num_files = 2
+ dir_files = []
+ for i in range(num_dirs):
+ for j in range(num_files):
+ dir_files.append(f"dir{i}/file{j}")
+
+ git("checkout", "-b", multiple_directories_branch)
+ for f in dir_files:
+ repodir.ensure(f, file=True)
+ git("add", f)
+
+ git("-c", "commit.gpgsign=false", "commit", "-m", "many_dirs add files")
+
+ # restore default
+ git("checkout", default_branch)
+
# Map of version -> bunch. Each bunch includes; all the args
# that must be specified as part of a version() declaration (used to
# manufacture a version for the 'git-test' package); the associated
@@ -1423,6 +1504,11 @@ def mock_git_repository(git, tmpdir_factory):
"default-no-per-version-git": Bunch(
revision=default_branch, file=r0_file, args={"branch": default_branch}
),
+ "many-directories": Bunch(
+ revision=multiple_directories_branch,
+ file=dir_files[0],
+ args={"git": url, "branch": multiple_directories_branch},
+ ),
}
t = Bunch(
@@ -1436,6 +1522,15 @@ def mock_git_repository(git, tmpdir_factory):
yield t
+@pytest.fixture(scope="function")
+def mock_git_test_package(mock_git_repository, mutable_mock_repo, monkeypatch):
+ # install a fake git version in the package class
+ pkg_class = spack.repo.PATH.get_pkg_class("git-test")
+ monkeypatch.delattr(pkg_class, "git")
+ monkeypatch.setitem(pkg_class.versions, spack.version.Version("git"), mock_git_repository.url)
+ return pkg_class
+
+
@pytest.fixture(scope="session")
def mock_hg_repository(tmpdir_factory):
"""Creates a very simple hg repository with two commits."""
@@ -1659,7 +1754,7 @@ def clear_directive_functions():
# Make sure any directive functions overidden by tests are cleared before
# proceeding with subsequent tests that may depend on the original
# functions.
- spack.directives.DirectiveMeta._directives_to_be_executed = []
+ spack.directives_meta.DirectiveMeta._directives_to_be_executed = []
@pytest.fixture
@@ -1667,7 +1762,7 @@ def mock_executable(tmp_path):
"""Factory to create a mock executable in a temporary directory that
output a custom string when run.
"""
- shebang = "#!/bin/sh\n" if sys.platform != "win32" else "@ECHO OFF"
+ shebang = "#!/bin/sh\n" if sys.platform != "win32" else "@ECHO OFF\n"
def _factory(name, output, subdir=("bin",)):
executable_dir = tmp_path.joinpath(*subdir)
@@ -1675,7 +1770,7 @@ def mock_executable(tmp_path):
executable_path = executable_dir / name
if sys.platform == "win32":
executable_path = executable_dir / (name + ".bat")
- executable_path.write_text(f"{ shebang }{ output }\n")
+ executable_path.write_text(f"{shebang}{output}\n")
executable_path.chmod(0o755)
return executable_path
@@ -1790,12 +1885,7 @@ def mock_curl_configs(mock_config_data, monkeypatch):
tty.msg("curl: (22) The requested URL returned error: 404")
self.returncode = 22
- def mock_curl(*args):
- return MockCurl()
-
- monkeypatch.setattr(spack.util.web, "_curl", mock_curl)
-
- yield
+ monkeypatch.setattr(spack.util.web, "require_curl", MockCurl)
@pytest.fixture(scope="function")
@@ -1851,7 +1941,7 @@ def binary_with_rpaths(prefix_tmpdir):
paths are encoded with `$ORIGIN` prepended.
"""
- def _factory(rpaths, message="Hello world!"):
+ def _factory(rpaths, message="Hello world!", dynamic_linker="/lib64/ld-linux.so.2"):
source = prefix_tmpdir.join("main.c")
source.write(
"""
@@ -1867,10 +1957,10 @@ def binary_with_rpaths(prefix_tmpdir):
executable = source.dirpath("main.x")
# Encode relative RPATHs using `$ORIGIN` as the root prefix
rpaths = [x if os.path.isabs(x) else os.path.join("$ORIGIN", x) for x in rpaths]
- rpath_str = ":".join(rpaths)
opts = [
"-Wl,--disable-new-dtags",
- "-Wl,-rpath={0}".format(rpath_str),
+ f"-Wl,-rpath={':'.join(rpaths)}",
+ f"-Wl,--dynamic-linker,{dynamic_linker}",
str(source),
"-o",
str(executable),
@@ -1934,39 +2024,25 @@ def nullify_globals(request, monkeypatch):
def pytest_runtest_setup(item):
- # Skip tests if they are marked only clingo and are run with the original concretizer
- only_clingo_marker = item.get_closest_marker(name="only_clingo")
- if only_clingo_marker and os.environ.get("SPACK_TEST_SOLVER") == "original":
- pytest.skip(*only_clingo_marker.args)
-
- # Skip tests if they are marked only original and are run with clingo
- only_original_marker = item.get_closest_marker(name="only_original")
- if only_original_marker and os.environ.get("SPACK_TEST_SOLVER", "clingo") == "clingo":
- pytest.skip(*only_original_marker.args)
-
# Skip test marked "not_on_windows" if they're run on Windows
not_on_windows_marker = item.get_closest_marker(name="not_on_windows")
if not_on_windows_marker and sys.platform == "win32":
pytest.skip(*not_on_windows_marker.args)
+ # Skip items marked "only windows" if they're run anywhere but Windows
+ only_windows_marker = item.get_closest_marker(name="only_windows")
+ if only_windows_marker and sys.platform != "win32":
+ pytest.skip(*only_windows_marker.args)
-class MockPool:
- def map(self, func, args):
- return [func(a) for a in args]
-
- def starmap(self, func, args):
- return [func(*a) for a in args]
- def __enter__(self):
- return self
-
- def __exit__(self, *args):
- pass
+def _sequential_executor(*args, **kwargs):
+ return spack.util.parallel.SequentialExecutor()
-@pytest.fixture(scope="function")
+@pytest.fixture(autouse=True)
def disable_parallel_buildcache_push(monkeypatch):
- monkeypatch.setattr(spack.cmd.buildcache, "_make_pool", MockPool)
+ """Disable process pools in tests."""
+ monkeypatch.setattr(spack.util.parallel, "make_concurrent_executor", _sequential_executor)
def _root_path(x, y, *, path):
@@ -1980,17 +2056,24 @@ def mock_modules_root(tmp_path, monkeypatch):
monkeypatch.setattr(spack.modules.common, "root_path", fn)
+_repo_name_id = 0
+
+
def create_test_repo(tmpdir, pkg_name_content_tuples):
+ global _repo_name_id
+
repo_path = str(tmpdir)
repo_yaml = tmpdir.join("repo.yaml")
with open(str(repo_yaml), "w") as f:
f.write(
- """\
+ f"""\
repo:
- namespace: testcfgrequirements
+ namespace: testrepo{str(_repo_name_id)}
"""
)
+ _repo_name_id += 1
+
packages_dir = tmpdir.join("packages")
for pkg_name, pkg_str in pkg_name_content_tuples:
pkg_dir = packages_dir.ensure(pkg_name, dir=True)
@@ -1998,4 +2081,53 @@ repo:
with open(str(pkg_file), "w") as f:
f.write(pkg_str)
- return spack.repo.Repo(repo_path)
+ repo_cache = spack.util.file_cache.FileCache(str(tmpdir.join("cache")))
+ return spack.repo.Repo(repo_path, cache=repo_cache)
+
+
+@pytest.fixture()
+def compiler_factory():
+ """Factory for a compiler dict, taking a spec and an OS as arguments."""
+
+ def _factory(*, spec, operating_system):
+ return {
+ "compiler": {
+ "spec": spec,
+ "operating_system": operating_system,
+ "paths": {"cc": "/path/to/cc", "cxx": "/path/to/cxx", "f77": None, "fc": None},
+ "modules": [],
+ "target": str(archspec.cpu.host().family),
+ }
+ }
+
+ return _factory
+
+
+@pytest.fixture()
+def host_architecture_str():
+ """Returns the broad architecture family (x86_64, aarch64, etc.)"""
+ return str(archspec.cpu.host().family)
+
+
+def _true(x):
+ return True
+
+
+@pytest.fixture()
+def do_not_check_runtimes_on_reuse(monkeypatch):
+ monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", _true)
+
+
+@pytest.fixture(autouse=True, scope="session")
+def _c_compiler_always_exists():
+ fn = spack.solver.asp.c_compiler_runs
+ spack.solver.asp.c_compiler_runs = _true
+ yield
+ spack.solver.asp.c_compiler_runs = fn
+
+
+@pytest.fixture(scope="session")
+def mock_test_cache(tmp_path_factory):
+ cache_dir = tmp_path_factory.mktemp("cache")
+ print(cache_dir)
+ return spack.util.file_cache.FileCache(str(cache_dir))
diff --git a/lib/spack/spack/test/container/cli.py b/lib/spack/spack/test/container/cli.py
index bbd111b81e..5e1ecd58a7 100644
--- a/lib/spack/spack/test/container/cli.py
+++ b/lib/spack/spack/test/container/cli.py
@@ -8,7 +8,6 @@ import llnl.util.filesystem as fs
import spack.container.images
import spack.main
-import spack.platforms
containerize = spack.main.SpackCommand("containerize")
@@ -17,7 +16,7 @@ def test_command(default_config, container_config_dir, capsys):
with capsys.disabled():
with fs.working_dir(container_config_dir):
output = containerize()
- assert "FROM spack/ubuntu-bionic" in output
+ assert "FROM spack/ubuntu-jammy" in output
def test_listing_possible_os():
@@ -27,7 +26,6 @@ def test_listing_possible_os():
assert expected_os in output
-@pytest.mark.skipif(str(spack.platforms.host()) == "windows", reason="test unsupported on Windows")
@pytest.mark.maybeslow
@pytest.mark.requires_executables("git")
def test_bootstrap_phase(minimal_configuration, config_dumper, capsys):
diff --git a/lib/spack/spack/test/container/conftest.py b/lib/spack/spack/test/container/conftest.py
index 974fe4438b..95782365a9 100644
--- a/lib/spack/spack/test/container/conftest.py
+++ b/lib/spack/spack/test/container/conftest.py
@@ -14,7 +14,7 @@ def minimal_configuration():
"specs": ["gromacs", "mpich", "fftw precision=float"],
"container": {
"format": "docker",
- "images": {"os": "ubuntu:18.04", "spack": "develop"},
+ "images": {"os": "ubuntu:22.04", "spack": "develop"},
},
}
}
diff --git a/lib/spack/spack/test/container/docker.py b/lib/spack/spack/test/container/docker.py
index 3189e641ae..e631f6b486 100644
--- a/lib/spack/spack/test/container/docker.py
+++ b/lib/spack/spack/test/container/docker.py
@@ -21,11 +21,11 @@ def test_build_and_run_images(minimal_configuration):
# Test the output of run property
run = writer.run
- assert run.image == "ubuntu:18.04"
+ assert run.image == "ubuntu:22.04"
# Test the output of the build property
build = writer.build
- assert build.image == "spack/ubuntu-bionic:latest"
+ assert build.image == "spack/ubuntu-jammy:develop"
def test_packages(minimal_configuration):
diff --git a/lib/spack/spack/test/container/images.py b/lib/spack/spack/test/container/images.py
index eac0f1e1fa..1e5e9e0d70 100644
--- a/lib/spack/spack/test/container/images.py
+++ b/lib/spack/spack/test/container/images.py
@@ -7,13 +7,14 @@ import os.path
import pytest
import spack.container
+import spack.container.images
@pytest.mark.parametrize(
"image,spack_version,expected",
[
- ("ubuntu:18.04", "develop", ("spack/ubuntu-bionic", "latest")),
- ("ubuntu:18.04", "0.14.0", ("spack/ubuntu-bionic", "0.14.0")),
+ ("ubuntu:22.04", "develop", ("spack/ubuntu-jammy", "develop")),
+ ("ubuntu:22.04", "0.14.0", ("spack/ubuntu-jammy", "0.14.0")),
],
)
def test_build_info(image, spack_version, expected):
@@ -21,7 +22,7 @@ def test_build_info(image, spack_version, expected):
assert output == expected
-@pytest.mark.parametrize("image", ["ubuntu:18.04"])
+@pytest.mark.parametrize("image", ["ubuntu:22.04"])
def test_package_info(image):
pkg_manager = spack.container.images.os_package_manager_for(image)
update, install, clean = spack.container.images.commands_for(pkg_manager)
diff --git a/lib/spack/spack/test/cray_manifest.py b/lib/spack/spack/test/cray_manifest.py
index 3a00180da8..2a11b79a11 100644
--- a/lib/spack/spack/test/cray_manifest.py
+++ b/lib/spack/spack/test/cray_manifest.py
@@ -16,9 +16,11 @@ import pytest
import spack
import spack.cmd
+import spack.cmd.external
import spack.compilers
-import spack.config
import spack.cray_manifest as cray_manifest
+import spack.platforms
+import spack.platforms.test
import spack.solver.asp
import spack.spec
import spack.store
diff --git a/lib/spack/spack/test/data/compiler_verbose_output/pgcc-16.3.txt b/lib/spack/spack/test/data/compiler_verbose_output/pgcc-16.3.txt
deleted file mode 100644
index 9041322350..0000000000
--- a/lib/spack/spack/test/data/compiler_verbose_output/pgcc-16.3.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Export PGI=/usr/tce/packages/pgi/pgi-16.3
-
-/usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/bin/pgc test.c -opt 1 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp haswell -x 120 0x1000 -astype 0 -stdinc /usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/include-gcc48:/usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/include:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include:/usr/local/include:/usr/include -def unix -def __unix -def __unix__ -def linux -def __linux -def __linux__ -def __NO_MATH_INLINES -def __LP64__ -def __x86_64 -def __x86_64__ -def __LONG_MAX__=9223372036854775807L -def '__SIZE_TYPE__=unsigned long int' -def '__PTRDIFF_TYPE__=long int' -def __THROW= -def __extension__= -def __amd_64__amd64__ -def __k8 -def __k8__ -def __SSE__ -def __MMX__ -def __SSE2__ -def __SSE3__ -def __SSSE3__ -def __STDC_HOSTED__ -predicate '#machine(x86_64) #lint(off) #system(posix) #cpu(x86_64)' -cmdline '+pgcc test.c -v -o test.o' -x 123 0x80000000 -x 123 4 -x 2 0x400 -x 119 0x20 -def __pgnu_vsn=40805 -x 120 0x200000 -x 70 0x40000000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -asm /var/tmp/gamblin2/pgccL0MCVCOQsq6l.s
-PGC/x86-64 Linux 16.3-0: compilation successful
-
-/usr/bin/as /var/tmp/gamblin2/pgccL0MCVCOQsq6l.s -o /var/tmp/gamblin2/pgcc10MCFxmYXjgo.o
-
-/usr/tce/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/lib/trace_init.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o /usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/lib/initmp.o --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/lib/pgi.ld -L/usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 /var/tmp/gamblin2/pgcc10MCFxmYXjgo.o -rpath /usr/tce/packages/pgi/pgi-16.3/linux86-64/16.3/lib -o test.o -lpgmp -lnuma -lpthread -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib64/crtn.o
-Unlinking /var/tmp/gamblin2/pgccL0MCVCOQsq6l.s
-Unlinking /var/tmp/gamblin2/pgccn0MCNcmgIbh8.ll
-Unlinking /var/tmp/gamblin2/pgcc10MCFxmYXjgo.o
diff --git a/lib/spack/spack/test/data/config/bootstrap.yaml b/lib/spack/spack/test/data/config/bootstrap.yaml
index 4757b8729d..43c4405350 100644
--- a/lib/spack/spack/test/data/config/bootstrap.yaml
+++ b/lib/spack/spack/test/data/config/bootstrap.yaml
@@ -1,5 +1,5 @@
bootstrap:
sources:
- name: 'github-actions'
- metadata: $spack/share/spack/bootstrap/github-actions-v0.5
+ metadata: $spack/share/spack/bootstrap/github-actions-v0.6
trusted: {}
diff --git a/lib/spack/spack/test/data/config/compilers.yaml b/lib/spack/spack/test/data/config/compilers.yaml
index 6f36c13b59..0d5345130a 100644
--- a/lib/spack/spack/test/data/config/compilers.yaml
+++ b/lib/spack/spack/test/data/config/compilers.yaml
@@ -1,353 +1,41 @@
compilers:
- compiler:
- spec: clang@3.3
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@4.5.0
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@4.5.0
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@3.3
- operating_system: CNL
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
-- compiler:
- spec: clang@3.3
- operating_system: SuSE11
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@3.3
- operating_system: yosemite
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- operating_system: CNL
- spec: gcc@4.5.0
- modules: 'None'
-- compiler:
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- operating_system: SuSE11
- spec: gcc@4.5.0
- modules: 'None'
- target: x86_64
-- compiler:
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- operating_system: yosemite
- spec: gcc@4.5.0
- modules: 'None'
- target: x86_64
-- compiler:
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- operating_system: elcapitan
- spec: gcc@4.5.0
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@3.3
- operating_system: elcapitan
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@4.7.2
- operating_system: redhat6
- paths:
- cc: /path/to/gcc472
- cxx: /path/to/g++472
- f77: /path/to/gfortran472
- fc: /path/to/gfortran472
- flags:
- cflags: -O0 -g
- cxxflags: -O0 -g
- fflags: -O0 -g
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@4.4.0
- operating_system: redhat6
- paths:
- cc: /path/to/gcc440
- cxx: /path/to/g++440
- f77: /path/to/gfortran440
- fc: /path/to/gfortran440
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@3.5
- operating_system: redhat6
- paths:
- cc: /path/to/clang35
- cxx: /path/to/clang++35
- f77: None
- fc: None
- flags:
- cflags: -O3
- cxxflags: -O3
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@8.0.0
- operating_system: redhat7
- paths:
- cc: /path/to/clang-8
- cxx: /path/to/clang++-8
- f77: /path/to/gfortran-9
- fc: /path/to/gfortran-9
- flags:
- cflags: -O3
- cxxflags: -O3
- modules: 'None'
- target: x86_64
-- compiler:
- spec: apple-clang@9.1.0
- operating_system: elcapitan
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@10foo
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@4.4.0-special
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@12.0.0
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: aarch64
-- compiler:
- spec: gcc@10.2.1
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: aarch64
-- compiler:
- spec: clang@12.0.0
- operating_system: redhat6
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: aarch64
-- compiler:
- spec: gcc@10.2.1
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: aarch64
-- compiler:
- spec: gcc@10.1.0
- operating_system: redhat6
+ spec: gcc@=9.4.0
+ operating_system: {linux_os.name}{linux_os.version}
paths:
cc: /path/to/gcc
cxx: /path/to/g++
f77: None
fc: None
- modules: 'None'
- target: aarch64
+ modules: []
+ target: {target}
- compiler:
- spec: gcc@11.1.0
+ spec: gcc@=9.4.0
operating_system: redhat6
paths:
cc: /path/to/gcc
cxx: /path/to/g++
f77: None
fc: None
- flags:
- cflags: -O0 -g
- cxxflags: -O0 -g
- fflags: -O0 -g
- modules: 'None'
- target: aarch64
+ modules: []
+ target: {target}
- compiler:
- spec: clang@12.2.0
- operating_system: redhat6
- paths:
- cc: /path/to/clang35
- cxx: /path/to/clang++35
- f77: None
- fc: None
- flags:
- cflags: -O3
- cxxflags: -O3
- modules: 'None'
- target: aarch64
-- compiler:
- spec: gcc@10foo
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
- modules: 'None'
- target: aarch64
-- compiler:
- spec: clang@12.0.0
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@10.2.1
- operating_system: {0.name}{0.version}
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@12.0.0
- operating_system: redhat6
+ spec: clang@=15.0.0
+ operating_system: {linux_os.name}{linux_os.version}
paths:
cc: /path/to/clang
cxx: /path/to/clang++
f77: None
fc: None
- modules: 'None'
- target: x86_64
+ modules: []
+ target: {target}
- compiler:
- spec: gcc@10.2.1
- operating_system: redhat6
+ spec: gcc@=10.2.1
+ operating_system: {linux_os.name}{linux_os.version}
paths:
cc: /path/to/gcc
cxx: /path/to/g++
f77: None
fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@10.1.0
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- modules: 'None'
- target: x86_64
-- compiler:
- spec: gcc@11.1.0
- operating_system: redhat6
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: None
- fc: None
- flags:
- cflags: -O0 -g
- cxxflags: -O0 -g
- fflags: -O0 -g
- modules: 'None'
- target: x86_64
-- compiler:
- spec: clang@12.2.0
- operating_system: redhat6
- paths:
- cc: /path/to/clang35
- cxx: /path/to/clang++35
- f77: None
- fc: None
- flags:
- cflags: -O3
- cxxflags: -O3
- modules: 'None'
- target: x86_64
+ modules: []
+ target: {target}
diff --git a/lib/spack/spack/test/data/config/concretizer.yaml b/lib/spack/spack/test/data/config/concretizer.yaml
index 0dd810163d..a89a42a906 100644
--- a/lib/spack/spack/test/data/config/concretizer.yaml
+++ b/lib/spack/spack/test/data/config/concretizer.yaml
@@ -1,5 +1,5 @@
concretizer:
- # reuse is missing on purpose, see "test_concretizer_arguments"
+ reuse: true
targets:
granularity: microarchitectures
host_compatible: false
diff --git a/lib/spack/spack/test/data/config/config.yaml b/lib/spack/spack/test/data/config/config.yaml
index 0ae86957db..e6867adb3d 100644
--- a/lib/spack/spack/test/data/config/config.yaml
+++ b/lib/spack/spack/test/data/config/config.yaml
@@ -1,6 +1,6 @@
config:
install_tree:
- root: $spack/opt/spack
+ root: {0}
template_dirs:
- $spack/share/spack/templates
- $spack/lib/spack/spack/test/data/templates
@@ -10,7 +10,7 @@ config:
source_cache: $user_cache_path/source
misc_cache: $user_cache_path/cache
verify_ssl: true
+ ssl_certs: $SSL_CERT_FILE
checksum: true
dirty: false
- concretizer: {0}
locks: {1}
diff --git a/lib/spack/spack/test/data/config/modules.yaml b/lib/spack/spack/test/data/config/modules.yaml
index f217dd7eaf..bd19ca066a 100644
--- a/lib/spack/spack/test/data/config/modules.yaml
+++ b/lib/spack/spack/test/data/config/modules.yaml
@@ -14,29 +14,25 @@
# ~/.spack/modules.yaml
# -------------------------------------------------------------------------
modules:
- default: {}
prefix_inspections:
- bin:
- - PATH
- man:
- - MANPATH
- share/man:
- - MANPATH
- share/aclocal:
- - ACLOCAL_PATH
- lib:
- - LIBRARY_PATH
- - LD_LIBRARY_PATH
- lib64:
- - LIBRARY_PATH
- - LD_LIBRARY_PATH
- include:
- - CPATH
- lib/pkgconfig:
- - PKG_CONFIG_PATH
- lib64/pkgconfig:
- - PKG_CONFIG_PATH
- share/pkgconfig:
- - PKG_CONFIG_PATH
- '':
- - CMAKE_PREFIX_PATH
+ ./bin: [PATH]
+ ./man: [MANPATH]
+ ./share/man: [MANPATH]
+ ./share/aclocal: [ACLOCAL_PATH]
+ ./lib/pkgconfig: [PKG_CONFIG_PATH]
+ ./lib64/pkgconfig: [PKG_CONFIG_PATH]
+ ./share/pkgconfig: [PKG_CONFIG_PATH]
+ ./: [CMAKE_PREFIX_PATH]
+ default:
+ roots:
+ tcl: {0}
+ lmod: {1}
+ enable: []
+ tcl:
+ all:
+ autoload: direct
+ lmod:
+ all:
+ autoload: direct
+ hierarchy:
+ - mpi
diff --git a/lib/spack/spack/test/data/config/packages.yaml b/lib/spack/spack/test/data/config/packages.yaml
index c6ff731a7e..25fbe888c5 100644
--- a/lib/spack/spack/test/data/config/packages.yaml
+++ b/lib/spack/spack/test/data/config/packages.yaml
@@ -1,5 +1,6 @@
packages:
all:
+ compiler: [gcc, clang]
providers:
mpi: [openmpi, mpich, zmpi]
lapack: [openblas-with-lapack]
@@ -16,7 +17,7 @@ packages:
externalvirtual:
buildable: False
externals:
- - spec: externalvirtual@2.0%clang@12.0.0
+ - spec: externalvirtual@2.0%clang@15.0.0
prefix: /path/to/external_virtual_clang
- spec: externalvirtual@1.0%gcc@10.2.1
prefix: /path/to/external_virtual_gcc
diff --git a/lib/spack/spack/test/data/modules/lmod/complex_hierarchy.yaml b/lib/spack/spack/test/data/modules/lmod/complex_hierarchy.yaml
index 39515b3856..91adfd92e6 100644
--- a/lib/spack/spack/test/data/modules/lmod/complex_hierarchy.yaml
+++ b/lib/spack/spack/test/data/modules/lmod/complex_hierarchy.yaml
@@ -4,7 +4,7 @@ lmod:
hash_length: 0
core_compilers:
- - 'clang@12.0.0'
+ - 'clang@15.0.0'
core_specs:
- 'mpich@3.0.1'
diff --git a/lib/spack/spack/test/data/modules/lmod/core_compilers.yaml b/lib/spack/spack/test/data/modules/lmod/core_compilers.yaml
index 60d461d10a..0070f42bec 100644
--- a/lib/spack/spack/test/data/modules/lmod/core_compilers.yaml
+++ b/lib/spack/spack/test/data/modules/lmod/core_compilers.yaml
@@ -2,4 +2,4 @@ enable:
- lmod
lmod:
core_compilers:
- - 'clang@12.0.0'
+ - 'clang@15.0.0'
diff --git a/lib/spack/spack/test/data/modules/lmod/core_compilers_at_equal.yaml b/lib/spack/spack/test/data/modules/lmod/core_compilers_at_equal.yaml
index d4b22dccf1..5a69c98bb5 100644
--- a/lib/spack/spack/test/data/modules/lmod/core_compilers_at_equal.yaml
+++ b/lib/spack/spack/test/data/modules/lmod/core_compilers_at_equal.yaml
@@ -2,4 +2,4 @@ enable:
- lmod
lmod:
core_compilers:
- - 'clang@=12.0.0'
+ - 'clang@=15.0.0'
diff --git a/lib/spack/spack/test/data/modules/tcl/suffix-format.yaml b/lib/spack/spack/test/data/modules/tcl/suffix-format.yaml
new file mode 100644
index 0000000000..00328cb001
--- /dev/null
+++ b/lib/spack/spack/test/data/modules/tcl/suffix-format.yaml
@@ -0,0 +1,9 @@
+enable:
+ - tcl
+tcl:
+ all:
+ autoload: none
+ mpileaks:
+ suffixes:
+ mpileaks: 'debug={variants.debug.value}'
+ '^mpi': 'mpi={^mpi.name}-v{^mpi.version}'
diff --git a/lib/spack/spack/test/data/unparse/legion.txt b/lib/spack/spack/test/data/unparse/legion.txt
index d6b37e2c9a..788375d497 100644
--- a/lib/spack/spack/test/data/unparse/legion.txt
+++ b/lib/spack/spack/test/data/unparse/legion.txt
@@ -357,37 +357,28 @@ class Legion(CMakePackage):
install test subdirectory for use during `spack test run`."""
cache_extra_test_sources(self, [join_path('examples', 'local_function_tasks')])
- def run_local_function_tasks_test(self):
- """Run stand alone test: local_function_tasks"""
+ def test_run_local_function_tasks(self):
+ """Build and run external application example"""
- test_dir = join_path(self.test_suite.current_test_cache_dir,
- 'examples', 'local_function_tasks')
+ test_dir = join_path(
+ self.test_suite.current_test_cache_dir, "examples", "local_function_tasks"
+ )
if not os.path.exists(test_dir):
- print('Skipping local_function_tasks test')
- return
+ raise SkipTest(f"{test_dir} must exist")
- exe = 'local_function_tasks'
+ cmake_args = [
+ f"-DCMAKE_C_COMPILER={self.compiler.cc}",
+ f"-DCMAKE_CXX_COMPILER={self.compiler.cxx}",
+ f"-DLegion_DIR={join_path(self.prefix, 'share', 'Legion', 'cmake')}",
+ ]
- cmake_args = ['-DCMAKE_C_COMPILER={0}'.format(self.compiler.cc),
- '-DCMAKE_CXX_COMPILER={0}'.format(self.compiler.cxx),
- '-DLegion_DIR={0}'.format(join_path(self.prefix,
- 'share',
- 'Legion',
- 'cmake'))]
+ with working_dir(test_dir):
+ cmake = self.spec["cmake"].command
+ cmake(*cmake_args)
- self.run_test('cmake',
- options=cmake_args,
- purpose='test: generate makefile for {0} example'.format(exe),
- work_dir=test_dir)
+ make = which("make")
+ make()
- self.run_test('make',
- purpose='test: build {0} example'.format(exe),
- work_dir=test_dir)
-
- self.run_test(exe,
- purpose='test: run {0} example'.format(exe),
- work_dir=test_dir)
-
- def test(self):
- self.run_local_function_tasks_test()
+ exe = which("local_function_tasks")
+ exe()
diff --git a/lib/spack/spack/test/data/unparse/mfem.txt b/lib/spack/spack/test/data/unparse/mfem.txt
index 20dea06035..bdcb2e2615 100644
--- a/lib/spack/spack/test/data/unparse/mfem.txt
+++ b/lib/spack/spack/test/data/unparse/mfem.txt
@@ -816,40 +816,22 @@ class Mfem(Package, CudaPackage, ROCmPackage):
install test subdirectory for use during `spack test run`."""
cache_extra_test_sources(self, [self.examples_src_dir, self.examples_data_dir])
- def test(self):
- test_dir = join_path(
- self.test_suite.current_test_cache_dir,
- self.examples_src_dir
- )
-
+ def test_ex10(self):
+ """build and run ex10(p)"""
# MFEM has many examples to serve as a suitable smoke check. ex10
# was chosen arbitrarily among the examples that work both with
# MPI and without it
- test_exe = 'ex10p' if ('+mpi' in self.spec) else 'ex10'
- self.run_test(
- 'make',
- [
- 'CONFIG_MK={0}/share/mfem/config.mk'.format(self.prefix),
- test_exe,
- 'parallel=False'
- ],
- purpose='test: building {0}'.format(test_exe),
- skip_missing=False,
- work_dir=test_dir,
- )
-
- self.run_test(
- './{0}'.format(test_exe),
- [
- '--mesh',
- '../{0}/beam-quad.mesh'.format(self.examples_data_dir)
- ],
- [],
- installed=False,
- purpose='test: running {0}'.format(test_exe),
- skip_missing=False,
- work_dir=test_dir,
- )
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
+
+ mesh = join_path("..", self.examples_data_dir, "beam-quad.mesh")
+ test_exe = "ex10p" if ("+mpi" in self.spec) else "ex10"
+
+ with working_dir(test_dir):
+ make = which("make")
+ make(f"CONFIG_MK={self.config_mk}", test_exe, "parallel=False")
+
+ ex10 = which(test_exe)
+ ex10("--mesh", mesh)
# this patch is only needed for mfem 4.1, where a few
# released files include byte order marks
diff --git a/lib/spack/spack/test/data/unparse/py-torch.txt b/lib/spack/spack/test/data/unparse/py-torch.txt
index 441d1be914..05d2d59669 100644
--- a/lib/spack/spack/test/data/unparse/py-torch.txt
+++ b/lib/spack/spack/test/data/unparse/py-torch.txt
@@ -24,8 +24,6 @@ class PyTorch(PythonPackage, CudaPackage):
homepage = "https://pytorch.org/"
git = "https://github.com/pytorch/pytorch.git"
- maintainers("adamjstewart")
-
# Exact set of modules is version- and variant-specific, just attempt to import the
# core libraries to ensure that the package was successfully installed.
import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"]
diff --git a/lib/spack/spack/test/data/web/index_with_javascript.html b/lib/spack/spack/test/data/web/index_with_javascript.html
new file mode 100644
index 0000000000..89882ba431
--- /dev/null
+++ b/lib/spack/spack/test/data/web/index_with_javascript.html
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ This is the root page.
+ </head>
+ <body>
+ This is a page with a Vue javascript drop down with links as used in GitLab.
+
+ <div class="js-source-code-dropdown" data-css-class="" data-download-artifacts="[]" data-download-links="[{&quot;text&quot;:&quot;tar.gz&quot;,&quot;path&quot;:&quot;/foo-5.0.0.tar.gz&quot;}]"></div>
+ </body>
+</html>
diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py
index 299e908a76..07cbe3dd81 100644
--- a/lib/spack/spack/test/database.py
+++ b/lib/spack/spack/test/database.py
@@ -7,11 +7,14 @@ import datetime
import functools
import json
import os
+import re
import shutil
import sys
import pytest
+import spack.subprocess_context
+
try:
import uuid
@@ -31,6 +34,8 @@ import spack.repo
import spack.spec
import spack.store
import spack.version as vn
+from spack.enums import InstallRecordStatus
+from spack.installer import PackageInstaller
from spack.schema.database_index import schema
from spack.util.executable import Executable
@@ -40,41 +45,62 @@ pytestmark = pytest.mark.db
@pytest.fixture()
def upstream_and_downstream_db(tmpdir, gen_mock_layout):
mock_db_root = str(tmpdir.mkdir("mock_db_root"))
- upstream_write_db = spack.database.Database(mock_db_root)
- upstream_db = spack.database.Database(mock_db_root, is_upstream=True)
+ upstream_layout = gen_mock_layout("/a/")
+ upstream_write_db = spack.database.Database(mock_db_root, layout=upstream_layout)
+ upstream_db = spack.database.Database(mock_db_root, is_upstream=True, layout=upstream_layout)
# Generate initial DB file to avoid reindex
with open(upstream_write_db._index_path, "w") as db_file:
upstream_write_db._write_to_file(db_file)
- upstream_layout = gen_mock_layout("/a/")
downstream_db_root = str(tmpdir.mkdir("mock_downstream_db_root"))
- downstream_db = spack.database.Database(downstream_db_root, upstream_dbs=[upstream_db])
+ downstream_db = spack.database.Database(
+ downstream_db_root, upstream_dbs=[upstream_db], layout=gen_mock_layout("/b/")
+ )
with open(downstream_db._index_path, "w") as db_file:
downstream_db._write_to_file(db_file)
- downstream_layout = gen_mock_layout("/b/")
- yield upstream_write_db, upstream_db, upstream_layout, downstream_db, downstream_layout
+ yield upstream_write_db, upstream_db, downstream_db
+
+
+@pytest.mark.parametrize(
+ "install_tree,result",
+ [
+ ("all", ["pkg-b", "pkg-c"]),
+ ("upstream", ["pkg-c"]),
+ ("local", ["pkg-b"]),
+ ("{u}", ["pkg-c"]),
+ ("{d}", ["pkg-b"]),
+ ],
+)
+def test_query_by_install_tree(
+ install_tree, result, upstream_and_downstream_db, mock_packages, monkeypatch, config
+):
+ up_write_db, up_db, down_db = upstream_and_downstream_db
+
+ # Set the upstream DB to contain "pkg-c" and downstream to contain "pkg-b")
+ b = spack.spec.Spec("pkg-b").concretized()
+ c = spack.spec.Spec("pkg-c").concretized()
+ up_write_db.add(c)
+ up_db._read()
+ down_db.add(b)
+
+ specs = down_db.query(install_tree=install_tree.format(u=up_db.root, d=down_db.root))
+ assert [s.name for s in specs] == result
def test_spec_installed_upstream(
upstream_and_downstream_db, mock_custom_repository, config, monkeypatch
):
"""Test whether Spec.installed_upstream() works."""
- (
- upstream_write_db,
- upstream_db,
- upstream_layout,
- downstream_db,
- downstream_layout,
- ) = upstream_and_downstream_db
+ upstream_write_db, upstream_db, downstream_db = upstream_and_downstream_db
# a known installed spec should say that it's installed
with spack.repo.use_repositories(mock_custom_repository):
- spec = spack.spec.Spec("c").concretized()
+ spec = spack.spec.Spec("pkg-c").concretized()
assert not spec.installed
assert not spec.installed_upstream
- upstream_write_db.add(spec, upstream_layout)
+ upstream_write_db.add(spec)
upstream_db._read()
monkeypatch.setattr(spack.store.STORE, "db", downstream_db)
@@ -90,13 +116,7 @@ def test_spec_installed_upstream(
@pytest.mark.usefixtures("config")
def test_installed_upstream(upstream_and_downstream_db, tmpdir):
- (
- upstream_write_db,
- upstream_db,
- upstream_layout,
- downstream_db,
- downstream_layout,
- ) = upstream_and_downstream_db
+ upstream_write_db, upstream_db, downstream_db = upstream_and_downstream_db
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"))
builder.add_package("x")
@@ -107,7 +127,7 @@ def test_installed_upstream(upstream_and_downstream_db, tmpdir):
with spack.repo.use_repositories(builder.root):
spec = spack.spec.Spec("w").concretized()
for dep in spec.traverse(root=False):
- upstream_write_db.add(dep, upstream_layout)
+ upstream_write_db.add(dep)
upstream_db._read()
for dep in spec.traverse(root=False):
@@ -117,11 +137,11 @@ def test_installed_upstream(upstream_and_downstream_db, tmpdir):
upstream_db.get_by_hash(dep.dag_hash())
new_spec = spack.spec.Spec("w").concretized()
- downstream_db.add(new_spec, downstream_layout)
+ downstream_db.add(new_spec)
for dep in new_spec.traverse(root=False):
upstream, record = downstream_db.query_by_spec_hash(dep.dag_hash())
assert upstream
- assert record.path == upstream_layout.path_for_spec(dep)
+ assert record.path == upstream_db.layout.path_for_spec(dep)
upstream, record = downstream_db.query_by_spec_hash(new_spec.dag_hash())
assert not upstream
assert record.installed
@@ -130,36 +150,32 @@ def test_installed_upstream(upstream_and_downstream_db, tmpdir):
downstream_db._check_ref_counts()
-@pytest.mark.usefixtures("config")
-def test_removed_upstream_dep(upstream_and_downstream_db, tmpdir):
- (
- upstream_write_db,
- upstream_db,
- upstream_layout,
- downstream_db,
- downstream_layout,
- ) = upstream_and_downstream_db
+def test_removed_upstream_dep(upstream_and_downstream_db, tmpdir, capsys, config):
+ upstream_write_db, upstream_db, downstream_db = upstream_and_downstream_db
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"))
builder.add_package("z")
builder.add_package("y", dependencies=[("z", None, None)])
with spack.repo.use_repositories(builder):
- spec = spack.spec.Spec("y").concretized()
+ y = spack.spec.Spec("y").concretized()
+ z = y["z"]
- upstream_write_db.add(spec["z"], upstream_layout)
+ # add dependency to upstream, dependents to downstream
+ upstream_write_db.add(z)
upstream_db._read()
+ downstream_db.add(y)
- new_spec = spack.spec.Spec("y").concretized()
- downstream_db.add(new_spec, downstream_layout)
-
- upstream_write_db.remove(new_spec["z"])
+ # remove the dependency from the upstream DB
+ upstream_write_db.remove(z)
upstream_db._read()
- new_downstream = spack.database.Database(downstream_db.root, upstream_dbs=[upstream_db])
- new_downstream._fail_when_missing_deps = True
- with pytest.raises(spack.database.MissingDependenciesError):
- new_downstream._read()
+ # then rereading the downstream DB should warn about the missing dep
+ downstream_db._read_from_file(downstream_db._index_path)
+ assert (
+ f"Missing dependency not in database: y/{y.dag_hash(7)} needs z"
+ in capsys.readouterr().err
+ )
@pytest.mark.usefixtures("config")
@@ -168,13 +184,7 @@ def test_add_to_upstream_after_downstream(upstream_and_downstream_db, tmpdir):
DB. When a package is recorded as installed in both, the results should
refer to the downstream DB.
"""
- (
- upstream_write_db,
- upstream_db,
- upstream_layout,
- downstream_db,
- downstream_layout,
- ) = upstream_and_downstream_db
+ upstream_write_db, upstream_db, downstream_db = upstream_and_downstream_db
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"))
builder.add_package("x")
@@ -182,8 +192,8 @@ def test_add_to_upstream_after_downstream(upstream_and_downstream_db, tmpdir):
with spack.repo.use_repositories(builder.root):
spec = spack.spec.Spec("x").concretized()
- downstream_db.add(spec, downstream_layout)
- upstream_write_db.add(spec, upstream_layout)
+ downstream_db.add(spec)
+ upstream_write_db.add(spec)
upstream_db._read()
upstream, record = downstream_db.query_by_spec_hash(spec.dag_hash())
@@ -197,33 +207,22 @@ def test_add_to_upstream_after_downstream(upstream_and_downstream_db, tmpdir):
try:
orig_db = spack.store.STORE.db
spack.store.STORE.db = downstream_db
- assert queried_spec.prefix == downstream_layout.path_for_spec(spec)
+ assert queried_spec.prefix == downstream_db.layout.path_for_spec(spec)
finally:
spack.store.STORE.db = orig_db
-@pytest.mark.usefixtures("config", "temporary_store")
-def test_cannot_write_upstream(tmpdir, gen_mock_layout):
- roots = [str(tmpdir.mkdir(x)) for x in ["a", "b"]]
- layouts = [gen_mock_layout(x) for x in ["/ra/", "/rb/"]]
-
- builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"))
- builder.add_package("x")
-
+def test_cannot_write_upstream(tmp_path, mock_packages, config):
# Instantiate the database that will be used as the upstream DB and make
# sure it has an index file
- upstream_db_independent = spack.database.Database(roots[1])
- with upstream_db_independent.write_transaction():
+ with spack.database.Database(str(tmp_path)).write_transaction():
pass
- upstream_dbs = spack.store._construct_upstream_dbs_from_install_roots([roots[1]], _test=True)
+ # Create it as an upstream
+ db = spack.database.Database(str(tmp_path), is_upstream=True)
- with spack.repo.use_repositories(builder.root):
- spec = spack.spec.Spec("x")
- spec.concretize()
-
- with pytest.raises(spack.database.ForbiddenLockError):
- upstream_dbs[0].add(spec, layouts[1])
+ with pytest.raises(spack.database.ForbiddenLockError):
+ db.add(spack.spec.Spec("pkg-a").concretized())
@pytest.mark.usefixtures("config", "temporary_store")
@@ -238,17 +237,17 @@ def test_recursive_upstream_dbs(tmpdir, gen_mock_layout):
with spack.repo.use_repositories(builder.root):
spec = spack.spec.Spec("x").concretized()
- db_c = spack.database.Database(roots[2])
- db_c.add(spec["z"], layouts[2])
+ db_c = spack.database.Database(roots[2], layout=layouts[2])
+ db_c.add(spec["z"])
- db_b = spack.database.Database(roots[1], upstream_dbs=[db_c])
- db_b.add(spec["y"], layouts[1])
+ db_b = spack.database.Database(roots[1], upstream_dbs=[db_c], layout=layouts[1])
+ db_b.add(spec["y"])
- db_a = spack.database.Database(roots[0], upstream_dbs=[db_b, db_c])
- db_a.add(spec["x"], layouts[0])
+ db_a = spack.database.Database(roots[0], upstream_dbs=[db_b, db_c], layout=layouts[0])
+ db_a.add(spec["x"])
upstream_dbs_from_scratch = spack.store._construct_upstream_dbs_from_install_roots(
- [roots[1], roots[2]], _test=True
+ [roots[1], roots[2]]
)
db_a_from_scratch = spack.database.Database(
roots[0], upstream_dbs=upstream_dbs_from_scratch
@@ -294,7 +293,7 @@ def _print_ref_counts():
recs = []
def add_rec(spec):
- cspecs = spack.store.STORE.db.query(spec, installed=any)
+ cspecs = spack.store.STORE.db.query(spec, installed=InstallRecordStatus.ANY)
if not cspecs:
recs.append("[ %-7s ] %-20s-" % ("", spec))
@@ -326,7 +325,7 @@ def _print_ref_counts():
def _check_merkleiness():
"""Ensure the spack database is a valid merkle graph."""
- all_specs = spack.store.STORE.db.query(installed=any)
+ all_specs = spack.store.STORE.db.query(installed=InstallRecordStatus.ANY)
seen = {}
for spec in all_specs:
@@ -356,7 +355,7 @@ def _check_db_sanity(database):
_check_merkleiness()
-def _check_remove_and_add_package(database, spec):
+def _check_remove_and_add_package(database: spack.database.Database, spec):
"""Remove a spec from the DB, then add it and make sure everything's
still ok once it is added. This checks that it was
removed, that it's back when added again, and that ref
@@ -376,7 +375,7 @@ def _check_remove_and_add_package(database, spec):
assert concrete_spec not in remaining
# add it back and make sure everything is ok.
- database.add(concrete_spec, spack.store.STORE.layout)
+ database.add(concrete_spec)
installed = database.query()
assert concrete_spec in installed
assert installed == original
@@ -386,9 +385,9 @@ def _check_remove_and_add_package(database, spec):
database._check_ref_counts()
-def _mock_install(spec):
+def _mock_install(spec: str):
s = spack.spec.Spec(spec).concretized()
- s.package.do_install(fake=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
def _mock_remove(spec):
@@ -619,17 +618,17 @@ def test_080_root_ref_counts(mutable_database):
mutable_database.remove("mpileaks ^mpich")
# record no longer in DB
- assert mutable_database.query("mpileaks ^mpich", installed=any) == []
+ assert mutable_database.query("mpileaks ^mpich", installed=InstallRecordStatus.ANY) == []
# record's deps have updated ref_counts
assert mutable_database.get_record("callpath ^mpich").ref_count == 0
assert mutable_database.get_record("mpich").ref_count == 1
# Put the spec back
- mutable_database.add(rec.spec, spack.store.STORE.layout)
+ mutable_database.add(rec.spec)
# record is present again
- assert len(mutable_database.query("mpileaks ^mpich", installed=any)) == 1
+ assert len(mutable_database.query("mpileaks ^mpich", installed=InstallRecordStatus.ANY)) == 1
# dependencies have ref counts updated
assert mutable_database.get_record("callpath ^mpich").ref_count == 1
@@ -645,18 +644,21 @@ def test_090_non_root_ref_counts(mutable_database):
# record still in DB but marked uninstalled
assert mutable_database.query("callpath ^mpich", installed=True) == []
- assert len(mutable_database.query("callpath ^mpich", installed=any)) == 1
+ assert len(mutable_database.query("callpath ^mpich", installed=InstallRecordStatus.ANY)) == 1
# record and its deps have same ref_counts
- assert mutable_database.get_record("callpath ^mpich", installed=any).ref_count == 1
+ assert (
+ mutable_database.get_record("callpath ^mpich", installed=InstallRecordStatus.ANY).ref_count
+ == 1
+ )
assert mutable_database.get_record("mpich").ref_count == 2
# remove only dependent of uninstalled callpath record
mutable_database.remove("mpileaks ^mpich")
# record and parent are completely gone.
- assert mutable_database.query("mpileaks ^mpich", installed=any) == []
- assert mutable_database.query("callpath ^mpich", installed=any) == []
+ assert mutable_database.query("mpileaks ^mpich", installed=InstallRecordStatus.ANY) == []
+ assert mutable_database.query("callpath ^mpich", installed=InstallRecordStatus.ANY) == []
# mpich ref count updated properly.
mpich_rec = mutable_database.get_record("mpich")
@@ -670,14 +672,14 @@ def test_100_no_write_with_exception_on_remove(database):
raise Exception()
with database.read_transaction():
- assert len(database.query("mpileaks ^zmpi", installed=any)) == 1
+ assert len(database.query("mpileaks ^zmpi", installed=InstallRecordStatus.ANY)) == 1
with pytest.raises(Exception):
fail_while_writing()
# reload DB and make sure zmpi is still there.
with database.read_transaction():
- assert len(database.query("mpileaks ^zmpi", installed=any)) == 1
+ assert len(database.query("mpileaks ^zmpi", installed=InstallRecordStatus.ANY)) == 1
def test_110_no_write_with_exception_on_install(database):
@@ -687,14 +689,14 @@ def test_110_no_write_with_exception_on_install(database):
raise Exception()
with database.read_transaction():
- assert database.query("cmake", installed=any) == []
+ assert database.query("cmake", installed=InstallRecordStatus.ANY) == []
with pytest.raises(Exception):
fail_while_writing()
# reload DB and make sure cmake was not written.
with database.read_transaction():
- assert database.query("cmake", installed=any) == []
+ assert database.query("cmake", installed=InstallRecordStatus.ANY) == []
def test_115_reindex_with_packages_not_in_repo(mutable_database, tmpdir):
@@ -716,7 +718,7 @@ def test_external_entries_in_db(mutable_database):
assert not rec.spec.external_modules
assert rec.explicit is False
- rec.spec.package.do_install(fake=True, explicit=True)
+ PackageInstaller([rec.spec.package], fake=True, explicit=True).install()
rec = mutable_database.get_record("externaltool")
assert rec.spec.external_path == os.path.sep + os.path.join("path", "to", "external_tool")
assert not rec.spec.external_modules
@@ -727,14 +729,14 @@ def test_external_entries_in_db(mutable_database):
def test_regression_issue_8036(mutable_database, usr_folder_exists):
# The test ensures that the external package prefix is treated as
# existing. Even when the package prefix exists, the package should
- # not be considered installed until it is added to the database with
- # do_install.
+ # not be considered installed until it is added to the database by
+ # the installer with install().
s = spack.spec.Spec("externaltool@0.9")
s.concretize()
assert not s.installed
# Now install the external package and check again the `installed` property
- s.package.do_install(fake=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
assert s.installed
@@ -777,7 +779,7 @@ def test_query_unused_specs(mutable_database):
# This spec installs a fake cmake as a build only dependency
s = spack.spec.Spec("simple-inheritance")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
si = s.dag_hash()
ml_mpich = spack.store.STORE.db.query_one("mpileaks ^mpich").dag_hash()
@@ -820,7 +822,7 @@ def test_query_spec_with_conditional_dependency(mutable_database):
# conditional on a Boolean variant
s = spack.spec.Spec("hdf5~mpi")
s.concretize()
- s.package.do_install(fake=True, explicit=True)
+ PackageInstaller([s.package], fake=True, explicit=True).install()
results = spack.store.STORE.db.query_local("hdf5 ^mpich")
assert not results
@@ -844,7 +846,7 @@ def test_query_virtual_spec(database):
def test_failed_spec_path_error(database):
"""Ensure spec not concrete check is covered."""
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
with pytest.raises(AssertionError, match="concrete spec required"):
spack.store.STORE.failure_tracker.mark(s)
@@ -859,14 +861,14 @@ def test_clear_failure_keep(mutable_database, monkeypatch, capfd):
# Pretend the spec has been failure locked
monkeypatch.setattr(spack.database.FailureTracker, "lock_taken", _is)
- s = spack.spec.Spec("a").concretized()
+ s = spack.spec.Spec("pkg-a").concretized()
spack.store.STORE.failure_tracker.clear(s)
out = capfd.readouterr()[0]
assert "Retaining failure marking" in out
@pytest.mark.db
-def test_clear_failure_forced(default_mock_concretization, mutable_database, monkeypatch, capfd):
+def test_clear_failure_forced(mutable_database, monkeypatch, capfd):
"""Add test coverage for clear_failure operation when force."""
def _is(self, spec):
@@ -877,7 +879,7 @@ def test_clear_failure_forced(default_mock_concretization, mutable_database, mon
# Ensure raise OSError when try to remove the non-existent marking
monkeypatch.setattr(spack.database.FailureTracker, "persistent_mark", _is)
- s = default_mock_concretization("a")
+ s = spack.spec.Spec("pkg-a").concretized()
spack.store.STORE.failure_tracker.clear(s, force=True)
out = capfd.readouterr()[1]
assert "Removing failure marking despite lock" in out
@@ -885,30 +887,30 @@ def test_clear_failure_forced(default_mock_concretization, mutable_database, mon
@pytest.mark.db
-def test_mark_failed(default_mock_concretization, mutable_database, monkeypatch, tmpdir, capsys):
+def test_mark_failed(mutable_database, monkeypatch, tmpdir, capsys):
"""Add coverage to mark_failed."""
def _raise_exc(lock):
raise lk.LockTimeoutError("write", "/mock-lock", 1.234, 10)
- # Ensure attempt to acquire write lock on the mark raises the exception
- monkeypatch.setattr(lk.Lock, "acquire_write", _raise_exc)
-
with tmpdir.as_cwd():
- s = default_mock_concretization("a")
- spack.store.STORE.failure_tracker.mark(s)
+ s = spack.spec.Spec("pkg-a").concretized()
+
+ # Ensure attempt to acquire write lock on the mark raises the exception
+ monkeypatch.setattr(lk.Lock, "acquire_write", _raise_exc)
+ spack.store.STORE.failure_tracker.mark(s)
out = str(capsys.readouterr()[1])
- assert "Unable to mark a as failed" in out
+ assert "Unable to mark pkg-a as failed" in out
spack.store.STORE.failure_tracker.clear_all()
@pytest.mark.db
-def test_prefix_failed(default_mock_concretization, mutable_database, monkeypatch):
+def test_prefix_failed(mutable_database, monkeypatch):
"""Add coverage to failed operation."""
- s = default_mock_concretization("a")
+ s = spack.spec.Spec("pkg-a").concretized()
# Confirm the spec is not already marked as failed
assert not spack.store.STORE.failure_tracker.has_failed(s)
@@ -926,13 +928,13 @@ def test_prefix_failed(default_mock_concretization, mutable_database, monkeypatc
assert spack.store.STORE.failure_tracker.has_failed(s)
-def test_prefix_write_lock_error(default_mock_concretization, mutable_database, monkeypatch):
+def test_prefix_write_lock_error(mutable_database, monkeypatch):
"""Cover the prefix write lock exception."""
def _raise(db, spec):
raise lk.LockError("Mock lock error")
- s = default_mock_concretization("a")
+ s = spack.spec.Spec("pkg-a").concretized()
# Ensure subsequent lock operations fail
monkeypatch.setattr(lk.Lock, "acquire_write", _raise)
@@ -988,9 +990,12 @@ def test_reindex_removed_prefix_is_not_installed(mutable_database, mock_store, c
# Reindex should pick up libelf as a dependency of libdwarf
spack.store.STORE.reindex()
- # Reindexing should warn about libelf not being found on the filesystem
- err = capfd.readouterr()[1]
- assert "this directory does not contain an installation of the spec" in err
+ # Reindexing should warn about libelf not found on the filesystem
+ assert re.search(
+ "libelf@0.8.13.+ was marked installed in the database "
+ "but was not found on the file system",
+ capfd.readouterr().err,
+ )
# And we should still have libelf in the database, but not installed.
assert not mutable_database.query_one("libelf", installed=True)
@@ -1102,3 +1107,98 @@ def test_database_construction_doesnt_use_globals(tmpdir, config, nullify_global
lock_cfg = lock_cfg or spack.database.lock_configuration(config)
db = spack.database.Database(str(tmpdir), lock_cfg=lock_cfg)
assert os.path.exists(db.database_directory)
+
+
+def test_database_read_works_with_trailing_data(tmp_path, default_mock_concretization):
+ # Populate a database
+ root = str(tmp_path)
+ db = spack.database.Database(root, layout=None)
+ spec = default_mock_concretization("pkg-a")
+ db.add(spec)
+ specs_in_db = db.query_local()
+ assert spec in specs_in_db
+
+ # Append anything to the end of the database file
+ with open(db._index_path, "a") as f:
+ f.write(json.dumps({"hello": "world"}))
+
+ # Read the database and check that it ignores the trailing data
+ assert spack.database.Database(root).query_local() == specs_in_db
+
+
+def test_database_errors_with_just_a_version_key(tmp_path):
+ root = str(tmp_path)
+ db = spack.database.Database(root)
+ next_version = f"{spack.database._DB_VERSION}.next"
+ with open(db._index_path, "w") as f:
+ f.write(json.dumps({"database": {"version": next_version}}))
+
+ with pytest.raises(spack.database.InvalidDatabaseVersionError):
+ spack.database.Database(root).query_local()
+
+
+def test_reindex_with_upstreams(tmp_path, monkeypatch, mock_packages, config):
+ # Reindexing should not put install records of upstream entries into the local database. Here
+ # we install `mpileaks` locally with dependencies in the upstream. And we even install
+ # `mpileaks` with the same hash in the upstream. After reindexing, `mpileaks` should still be
+ # in the local db, and `callpath` should not.
+ mpileaks = spack.spec.Spec("mpileaks").concretized()
+ callpath = mpileaks.dependencies("callpath")[0]
+
+ upstream_store = spack.store.create(
+ {"config": {"install_tree": {"root": str(tmp_path / "upstream")}}}
+ )
+ monkeypatch.setattr(spack.store, "STORE", upstream_store)
+ PackageInstaller([callpath.package], fake=True, explicit=True).install()
+
+ local_store = spack.store.create(
+ {
+ "config": {"install_tree": {"root": str(tmp_path / "local")}},
+ "upstreams": {"my-upstream": {"install_tree": str(tmp_path / "upstream")}},
+ }
+ )
+ monkeypatch.setattr(spack.store, "STORE", local_store)
+ PackageInstaller([mpileaks.package], fake=True, explicit=True).install()
+
+ # Sanity check that callpath is from upstream.
+ assert not local_store.db.query_local("callpath")
+ assert local_store.db.query("callpath")
+
+ # Install mpileaks also upstream with the same hash to ensure that determining upstreamness
+ # checks local installs before upstream databases, even when the local database is being
+ # reindexed.
+ monkeypatch.setattr(spack.store, "STORE", upstream_store)
+ PackageInstaller([mpileaks.package], fake=True, explicit=True).install()
+
+ # Delete the local database
+ shutil.rmtree(local_store.db.database_directory)
+
+ # Create a new instance s.t. we don't have cached specs in memory
+ reindexed_local_store = spack.store.create(
+ {
+ "config": {"install_tree": {"root": str(tmp_path / "local")}},
+ "upstreams": {"my-upstream": {"install_tree": str(tmp_path / "upstream")}},
+ }
+ )
+ reindexed_local_store.db.reindex()
+
+ assert not reindexed_local_store.db.query_local("callpath")
+ assert reindexed_local_store.db.query("callpath") == [callpath]
+ assert reindexed_local_store.db.query_local("mpileaks") == [mpileaks]
+
+
+@pytest.mark.regression("47101")
+def test_query_with_predicate_fn(database):
+ all_specs = database.query()
+
+ # Name starts with a string
+ specs = database.query(predicate_fn=lambda x: x.spec.name.startswith("mpil"))
+ assert specs and all(x.name.startswith("mpil") for x in specs)
+ assert len(specs) < len(all_specs)
+
+ # Recipe is currently known/unknown
+ specs = database.query(predicate_fn=lambda x: spack.repo.PATH.exists(x.spec.name))
+ assert specs == all_specs
+
+ specs = database.query(predicate_fn=lambda x: not spack.repo.PATH.exists(x.spec.name))
+ assert not specs
diff --git a/lib/spack/spack/test/detection.py b/lib/spack/spack/test/detection.py
index b83562e4e5..4bad37fc91 100644
--- a/lib/spack/spack/test/detection.py
+++ b/lib/spack/spack/test/detection.py
@@ -4,18 +4,17 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
+import spack.config
import spack.detection
+import spack.detection.common
+import spack.detection.path
import spack.spec
def test_detection_update_config(mutable_config):
# mock detected package
detected_packages = collections.defaultdict(list)
- detected_packages["cmake"] = [
- spack.detection.common.DetectedPackage(
- spec=spack.spec.Spec("cmake@3.27.5"), prefix="/usr/bin"
- )
- ]
+ detected_packages["cmake"] = [spack.spec.Spec("cmake@3.27.5", external_path="/usr/bin")]
# update config for new package
spack.detection.common.update_configuration(detected_packages)
@@ -28,3 +27,28 @@ def test_detection_update_config(mutable_config):
external_gcc = externals[0]
assert external_gcc["spec"] == "cmake@3.27.5"
assert external_gcc["prefix"] == "/usr/bin"
+
+
+def test_dedupe_paths(tmp_path):
+ """Test that ``dedupe_paths`` deals with symlinked directories, retaining the target"""
+ x = tmp_path / "x"
+ y = tmp_path / "y"
+ z = tmp_path / "z"
+
+ x.mkdir()
+ y.mkdir()
+ z.symlink_to("x", target_is_directory=True)
+
+ # dedupe repeated dirs, should preserve order
+ assert spack.detection.path.dedupe_paths([str(x), str(y), str(x)]) == [str(x), str(y)]
+ assert spack.detection.path.dedupe_paths([str(y), str(x), str(y)]) == [str(y), str(x)]
+
+ # dedupe repeated symlinks
+ assert spack.detection.path.dedupe_paths([str(z), str(y), str(z)]) == [str(z), str(y)]
+ assert spack.detection.path.dedupe_paths([str(y), str(z), str(y)]) == [str(y), str(z)]
+
+ # when both symlink and target are present, only target is retained, and it comes at the
+ # priority of the first occurrence.
+ assert spack.detection.path.dedupe_paths([str(x), str(y), str(z)]) == [str(x), str(y)]
+ assert spack.detection.path.dedupe_paths([str(z), str(y), str(x)]) == [str(x), str(y)]
+ assert spack.detection.path.dedupe_paths([str(y), str(z), str(x)]) == [str(y), str(x)]
diff --git a/lib/spack/spack/test/directives.py b/lib/spack/spack/test/directives.py
index 69291f919e..6b38b282f4 100644
--- a/lib/spack/spack/test/directives.py
+++ b/lib/spack/spack/test/directives.py
@@ -10,6 +10,7 @@ import spack.directives
import spack.repo
import spack.spec
import spack.version
+from spack.test.conftest import create_test_repo
def test_false_directives_do_not_exist(mock_packages):
@@ -29,8 +30,8 @@ def test_true_directives_exist(mock_packages):
cls = spack.repo.PATH.get_pkg_class("when-directives-true")
assert cls.dependencies
- assert spack.spec.Spec() in cls.dependencies["extendee"]
- assert spack.spec.Spec() in cls.dependencies["b"]
+ assert "extendee" in cls.dependencies[spack.spec.Spec()]
+ assert "pkg-b" in cls.dependencies[spack.spec.Spec()]
assert cls.resources
assert spack.spec.Spec() in cls.resources
@@ -43,10 +44,10 @@ def test_constraints_from_context(mock_packages):
pkg_cls = spack.repo.PATH.get_pkg_class("with-constraint-met")
assert pkg_cls.dependencies
- assert spack.spec.Spec("@1.0") in pkg_cls.dependencies["b"]
+ assert "pkg-b" in pkg_cls.dependencies[spack.spec.Spec("@1.0")]
assert pkg_cls.conflicts
- assert (spack.spec.Spec("+foo@1.0"), None) in pkg_cls.conflicts["%gcc"]
+ assert (spack.spec.Spec("%gcc"), None) in pkg_cls.conflicts[spack.spec.Spec("+foo@1.0")]
@pytest.mark.regression("26656")
@@ -54,7 +55,7 @@ def test_constraints_from_context_are_merged(mock_packages):
pkg_cls = spack.repo.PATH.get_pkg_class("with-constraint-met")
assert pkg_cls.dependencies
- assert spack.spec.Spec("@0.14:15 ^b@3.8:4.0") in pkg_cls.dependencies["c"]
+ assert "pkg-c" in pkg_cls.dependencies[spack.spec.Spec("@0.14:15 ^pkg-b@3.8:4.0")]
@pytest.mark.regression("27754")
@@ -68,9 +69,9 @@ def test_extends_spec(config, mock_packages):
@pytest.mark.regression("34368")
def test_error_on_anonymous_dependency(config, mock_packages):
- pkg = spack.repo.PATH.get_pkg_class("a")
+ pkg = spack.repo.PATH.get_pkg_class("pkg-a")
with pytest.raises(spack.directives.DependencyError):
- spack.directives._depends_on(pkg, "@4.5")
+ spack.directives._depends_on(pkg, spack.spec.Spec("@4.5"))
@pytest.mark.regression("34879")
@@ -79,7 +80,7 @@ def test_error_on_anonymous_dependency(config, mock_packages):
[
("maintainers-1", ["user1", "user2"]),
# Extends PythonPackage
- ("py-extension1", ["adamjstewart", "user1", "user2"]),
+ ("py-extension1", ["user1", "user2"]),
# Extends maintainers-1
("maintainers-3", ["user0", "user1", "user2", "user3"]),
],
@@ -101,7 +102,7 @@ def test_license_directive(config, mock_packages, package_name, expected_license
def test_duplicate_exact_range_license():
package = namedtuple("package", ["licenses", "name"])
- package.licenses = {spack.directives.make_when_spec("+foo"): "Apache-2.0"}
+ package.licenses = {spack.spec.Spec("+foo"): "Apache-2.0"}
package.name = "test_package"
msg = (
@@ -115,7 +116,7 @@ def test_duplicate_exact_range_license():
def test_overlapping_duplicate_licenses():
package = namedtuple("package", ["licenses", "name"])
- package.licenses = {spack.directives.make_when_spec("+foo"): "Apache-2.0"}
+ package.licenses = {spack.spec.Spec("+foo"): "Apache-2.0"}
package.name = "test_package"
msg = (
@@ -142,3 +143,90 @@ def test_version_type_validation():
# Try passing a bogus type; it's just that we want a nice error message
with pytest.raises(spack.version.VersionError, match=msg):
spack.directives._execute_version(package(name="python"), {})
+
+
+_pkgx = (
+ "x",
+ """\
+from spack.package import *
+
+class X(Package):
+ version("1.3")
+ version("1.2")
+ version("1.1")
+ version("1.0")
+
+ variant("foo", default=False)
+
+ redistribute(binary=False, when="@1.1")
+ redistribute(binary=False, when="@1.0:1.2+foo")
+ redistribute(source=False, when="@1.0:1.2")
+""",
+)
+
+
+_pkgy = (
+ "y",
+ """\
+from spack.package import *
+
+class Y(Package):
+ version("2.1")
+ version("2.0")
+
+ variant("bar", default=False)
+
+ redistribute(binary=False, source=False)
+""",
+)
+
+
+@pytest.fixture
+def _create_test_repo(tmpdir, mutable_config):
+ yield create_test_repo(tmpdir, [_pkgx, _pkgy])
+
+
+@pytest.fixture
+def test_repo(_create_test_repo, monkeypatch, mock_stage):
+ with spack.repo.use_repositories(_create_test_repo) as mock_repo_path:
+ yield mock_repo_path
+
+
+@pytest.mark.parametrize(
+ "spec_str,distribute_src,distribute_bin",
+ [
+ ("x@1.1~foo", False, False),
+ ("x@1.2+foo", False, False),
+ ("x@1.2~foo", False, True),
+ ("x@1.0~foo", False, True),
+ ("x@1.3+foo", True, True),
+ ("y@2.0", False, False),
+ ("y@2.1+bar", False, False),
+ ],
+)
+def test_redistribute_directive(test_repo, spec_str, distribute_src, distribute_bin):
+ spec = spack.spec.Spec(spec_str)
+ assert spec.package_class.redistribute_source(spec) == distribute_src
+ concretized_spec = spec.concretized()
+ assert concretized_spec.package.redistribute_binary == distribute_bin
+
+
+def test_redistribute_override_when():
+ """Allow a user to call `redistribute` twice to separately disable
+ source and binary distribution for the same when spec.
+
+ The second call should not undo the effect of the first.
+ """
+
+ class MockPackage:
+ name = "mock"
+ disable_redistribute = {}
+
+ cls = MockPackage
+ spack.directives._execute_redistribute(cls, source=False, binary=None, when="@1.0")
+ spec_key = spack.directives._make_when_spec("@1.0")
+ assert not cls.disable_redistribute[spec_key].binary
+ assert cls.disable_redistribute[spec_key].source
+ spack.directives._execute_redistribute(cls, source=None, binary=False, when="@1.0")
+ assert cls.disable_redistribute[spec_key].binary
+ assert cls.disable_redistribute[spec_key].source
diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py
index 6f42281827..169c6a9c5e 100644
--- a/lib/spack/spack/test/directory_layout.py
+++ b/lib/spack/spack/test/directory_layout.py
@@ -14,8 +14,11 @@ import pytest
from llnl.path import path_to_os_path
+import spack.hash_types
import spack.paths
import spack.repo
+import spack.spec
+import spack.util.file_cache
from spack.directory_layout import DirectoryLayout, InvalidDirectoryLayoutParametersError
from spack.spec import Spec
@@ -146,7 +149,7 @@ def test_read_and_write_spec(temporary_store, config, mock_packages):
assert not os.path.exists(install_dir)
-def test_handle_unknown_package(temporary_store, config, mock_packages):
+def test_handle_unknown_package(temporary_store, config, mock_packages, tmp_path):
"""This test ensures that spack can at least do *some*
operations with packages that are installed but that it
does not know about. This is actually not such an uncommon
@@ -158,7 +161,9 @@ def test_handle_unknown_package(temporary_store, config, mock_packages):
or query them again if the package goes away.
"""
layout = temporary_store.layout
- mock_db = spack.repo.RepoPath(spack.paths.mock_packages_path)
+
+ repo_cache = spack.util.file_cache.FileCache(str(tmp_path / "cache"))
+ mock_db = spack.repo.RepoPath(spack.paths.mock_packages_path, cache=repo_cache)
not_in_mock = set.difference(
set(spack.repo.all_package_names()), set(mock_db.all_package_names())
diff --git a/lib/spack/spack/test/entry_points.py b/lib/spack/spack/test/entry_points.py
new file mode 100644
index 0000000000..3909903c0c
--- /dev/null
+++ b/lib/spack/spack/test/entry_points.py
@@ -0,0 +1,114 @@
+# Copyright 2013-2024 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 sys
+
+import pytest
+
+import llnl.util.lang
+
+import spack.config
+import spack.extensions
+
+
+class MockConfigEntryPoint:
+ def __init__(self, tmp_path):
+ self.dir = tmp_path
+ self.name = "mypackage_config"
+
+ def load(self):
+ etc_path = self.dir.joinpath("spack/etc")
+ etc_path.mkdir(exist_ok=True, parents=True)
+ f = self.dir / "spack/etc/config.yaml"
+ with open(f, "w") as fh:
+ fh.write("config:\n install_tree:\n root: /spam/opt\n")
+
+ def ep():
+ return self.dir / "spack/etc"
+
+ return ep
+
+
+class MockExtensionsEntryPoint:
+ def __init__(self, tmp_path):
+ self.dir = tmp_path
+ self.name = "mypackage_extensions"
+
+ def load(self):
+ cmd_path = self.dir.joinpath("spack/spack-myext/myext/cmd")
+ cmd_path.mkdir(exist_ok=True, parents=True)
+ f = self.dir / "spack/spack-myext/myext/cmd/spam.py"
+ with open(f, "w") as fh:
+ fh.write("description = 'hello world extension command'\n")
+ fh.write("section = 'test command'\n")
+ fh.write("level = 'long'\n")
+ fh.write("def setup_parser(subparser):\n pass\n")
+ fh.write("def spam(parser, args):\n print('spam for all!')\n")
+
+ def ep():
+ return self.dir / "spack/spack-myext"
+
+ return ep
+
+
+def entry_points_factory(tmp_path):
+ def entry_points(group=None):
+ if group == "spack.config":
+ return (MockConfigEntryPoint(tmp_path),)
+ elif group == "spack.extensions":
+ return (MockExtensionsEntryPoint(tmp_path),)
+ return ()
+
+ return entry_points
+
+
+@pytest.fixture()
+def mock_get_entry_points(tmp_path, monkeypatch):
+ entry_points = entry_points_factory(tmp_path)
+ monkeypatch.setattr(llnl.util.lang, "get_entry_points", entry_points)
+
+
+def test_spack_entry_point_config(tmp_path, mock_get_entry_points):
+ """Test config scope entry point"""
+ config_paths = dict(spack.config.config_paths_from_entry_points())
+ config_path = config_paths.get("plugin-mypackage_config")
+ my_config_path = tmp_path / "spack/etc"
+ if config_path is None:
+ raise ValueError("Did not find entry point config in %s" % str(config_paths))
+ else:
+ assert os.path.samefile(config_path, my_config_path)
+ config = spack.config.create()
+ assert config.get("config:install_tree:root", scope="plugin-mypackage_config") == "/spam/opt"
+
+
+def test_spack_entry_point_extension(tmp_path, mock_get_entry_points):
+ """Test config scope entry point"""
+ my_ext = tmp_path / "spack/spack-myext"
+ extensions = spack.extensions.get_extension_paths()
+ found = bool([ext for ext in extensions if os.path.samefile(ext, my_ext)])
+ if not found:
+ raise ValueError("Did not find extension in %s" % ", ".join(extensions))
+ extensions = spack.extensions.extension_paths_from_entry_points()
+ found = bool([ext for ext in extensions if os.path.samefile(ext, my_ext)])
+ if not found:
+ raise ValueError("Did not find extension in %s" % ", ".join(extensions))
+ root = spack.extensions.load_extension("myext")
+ assert os.path.samefile(root, my_ext)
+ module = spack.extensions.get_module("spam")
+ assert module is not None
+
+
+@pytest.mark.skipif(sys.version_info[:2] < (3, 8), reason="Python>=3.8 required")
+def test_llnl_util_lang_get_entry_points(tmp_path, monkeypatch):
+ import importlib.metadata # type: ignore # novermin
+
+ monkeypatch.setattr(importlib.metadata, "entry_points", entry_points_factory(tmp_path))
+
+ entry_points = list(llnl.util.lang.get_entry_points(group="spack.config"))
+ assert isinstance(entry_points[0], MockConfigEntryPoint)
+
+ entry_points = list(llnl.util.lang.get_entry_points(group="spack.extensions"))
+ assert isinstance(entry_points[0], MockExtensionsEntryPoint)
diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py
index 0d1a4b08fb..a542539899 100644
--- a/lib/spack/spack/test/env.py
+++ b/lib/spack/spack/test/env.py
@@ -11,7 +11,9 @@ import pytest
import llnl.util.filesystem as fs
+import spack.config
import spack.environment as ev
+import spack.solver.asp
import spack.spec
from spack.environment.environment import (
EnvironmentManifestFile,
@@ -96,7 +98,7 @@ spack:
"""
-def test_env_change_spec_in_definition(tmp_path, mock_packages, config, mutable_mock_env_path):
+def test_env_change_spec_in_definition(tmp_path, mock_packages, mutable_mock_env_path):
manifest_file = tmp_path / ev.manifest_name
manifest_file.write_text(_test_matrix_yaml)
e = ev.create("test", manifest_file)
@@ -108,13 +110,17 @@ def test_env_change_spec_in_definition(tmp_path, mock_packages, config, mutable_
e.change_existing_spec(spack.spec.Spec("mpileaks@2.2"), list_name="desired_specs")
e.write()
+ # Ensure changed specs are in memory
assert any(x.intersects("mpileaks@2.2%gcc") for x in e.user_specs)
assert not any(x.intersects("mpileaks@2.1%gcc") for x in e.user_specs)
+ # Now make sure the changes can be read from the modified config
+ e = ev.read("test")
+ assert any(x.intersects("mpileaks@2.2%gcc") for x in e.user_specs)
+ assert not any(x.intersects("mpileaks@2.1%gcc") for x in e.user_specs)
-def test_env_change_spec_in_matrix_raises_error(
- tmp_path, mock_packages, config, mutable_mock_env_path
-):
+
+def test_env_change_spec_in_matrix_raises_error(tmp_path, mock_packages, mutable_mock_env_path):
manifest_file = tmp_path / ev.manifest_name
manifest_file.write_text(_test_matrix_yaml)
e = ev.create("test", manifest_file)
@@ -249,7 +255,7 @@ def test_update_default_view(init_view, update_value, tmp_path, mock_packages, c
if isinstance(init_view, str) and update_value is True:
expected_value = init_view
- assert env.manifest.pristine_yaml_content["spack"]["view"] == expected_value
+ assert env.manifest.yaml_content["spack"]["view"] == expected_value
@pytest.mark.parametrize(
@@ -377,10 +383,10 @@ spack:
"""
)
env = ev.Environment(tmp_path)
- env.add("a")
+ env.add("pkg-a")
assert len(env.user_specs) == 1
- assert env.manifest.pristine_yaml_content["spack"]["specs"] == ["a"]
+ assert env.manifest.yaml_content["spack"]["specs"] == ["pkg-a"]
@pytest.mark.parametrize(
@@ -569,16 +575,13 @@ def test_conflicts_with_packages_that_are_not_dependencies(
"""Tests that we cannot concretize two specs together, if one conflicts with the other,
even though they don't have a dependency relation.
"""
- if spack.config.get("config:concretizer") == "original":
- pytest.xfail("Known failure of the original concretizer")
-
manifest = tmp_path / "spack.yaml"
manifest.write_text(
f"""\
spack:
specs:
- {spec_str}
- - b
+ - pkg-b
concretizer:
unify: true
"""
@@ -593,7 +596,6 @@ spack:
@pytest.mark.regression("39455")
-@pytest.mark.only_clingo("Known failure of the original concretizer")
@pytest.mark.parametrize(
"possible_mpi_spec,unify", [("mpich", False), ("mpich", True), ("zmpi", False), ("zmpi", True)]
)
@@ -694,7 +696,6 @@ def test_removing_spec_from_manifest_with_exact_duplicates(
@pytest.mark.regression("35298")
-@pytest.mark.only_clingo("Propagation not supported in the original concretizer")
def test_variant_propagation_with_unify_false(tmp_path, mock_packages, config):
"""Spack distributes concretizations to different processes, when unify:false is selected and
the number of roots is 2 or more. When that happens, the specs to be concretized need to be
@@ -706,7 +707,7 @@ def test_variant_propagation_with_unify_false(tmp_path, mock_packages, config):
spack:
specs:
- parent-foo ++foo
- - c
+ - pkg-c
concretizer:
unify: false
"""
@@ -791,10 +792,10 @@ def test_deconcretize_then_concretize_does_not_error(mutable_mock_env_path, mock
"""spack:
specs:
# These two specs concretize to the same hash
- - c
- - c@1.0
+ - pkg-c
+ - pkg-c@1.0
# Spec used to trigger the bug
- - a
+ - pkg-a
concretizer:
unify: true
"""
@@ -802,8 +803,121 @@ def test_deconcretize_then_concretize_does_not_error(mutable_mock_env_path, mock
e = ev.Environment(mutable_mock_env_path)
with e:
e.concretize()
- e.deconcretize(spack.spec.Spec("a"), concrete=False)
+ e.deconcretize(spack.spec.Spec("pkg-a"), concrete=False)
e.concretize()
assert len(e.concrete_roots()) == 3
- all_root_hashes = set(x.dag_hash() for x in e.concrete_roots())
+ all_root_hashes = {x.dag_hash() for x in e.concrete_roots()}
assert len(all_root_hashes) == 2
+
+
+@pytest.mark.regression("44216")
+def test_root_version_weights_for_old_versions(mutable_mock_env_path, mock_packages):
+ """Tests that, when we select two old versions of root specs that have the same version
+ optimization penalty, both are considered.
+ """
+ mutable_mock_env_path.mkdir()
+ spack_yaml = mutable_mock_env_path / ev.manifest_name
+ spack_yaml.write_text(
+ """spack:
+ specs:
+ # allow any version, but the most recent
+ - bowtie@:1.3
+ # allows only the third most recent, so penalty is 2
+ - gcc@1
+ concretizer:
+ unify: true
+ """
+ )
+ e = ev.Environment(mutable_mock_env_path)
+ with e:
+ e.concretize()
+
+ bowtie = [x for x in e.concrete_roots() if x.name == "bowtie"][0]
+ gcc = [x for x in e.concrete_roots() if x.name == "gcc"][0]
+
+ assert bowtie.satisfies("@=1.3.0")
+ assert gcc.satisfies("@=1.0")
+
+
+def test_env_view_on_empty_dir_is_fine(tmp_path, config, mock_packages, temporary_store):
+ """Tests that creating a view pointing to an empty dir is not an error."""
+ view_dir = tmp_path / "view"
+ view_dir.mkdir()
+ env = ev.create_in_dir(tmp_path, with_view="view")
+ env.add("mpileaks")
+ env.concretize()
+ env.install_all(fake=True)
+ env.regenerate_views()
+ assert view_dir.is_symlink()
+
+
+def test_env_view_on_non_empty_dir_errors(tmp_path, config, mock_packages, temporary_store):
+ """Tests that creating a view pointing to a non-empty dir errors."""
+ view_dir = tmp_path / "view"
+ view_dir.mkdir()
+ (view_dir / "file").write_text("")
+ env = ev.create_in_dir(tmp_path, with_view="view")
+ env.add("mpileaks")
+ env.concretize()
+ env.install_all(fake=True)
+ with pytest.raises(ev.SpackEnvironmentError, match="because it is a non-empty dir"):
+ env.regenerate_views()
+
+
+@pytest.mark.parametrize(
+ "matrix_line", [("^zmpi", "^mpich"), ("~shared", "+shared"), ("shared=False", "+shared-libs")]
+)
+@pytest.mark.regression("40791")
+def test_stack_enforcement_is_strict(tmp_path, matrix_line, config, mock_packages):
+ """Ensure that constraints in matrices are applied strictly after expansion, to avoid
+ inconsistencies between abstract user specs and concrete specs.
+ """
+ manifest = tmp_path / "spack.yaml"
+ manifest.write_text(
+ f"""\
+spack:
+ definitions:
+ - packages: [libelf, mpileaks]
+ - install:
+ - matrix:
+ - [$packages]
+ - [{", ".join(item for item in matrix_line)}]
+ specs:
+ - $install
+ concretizer:
+ unify: false
+"""
+ )
+ # Here we raise different exceptions depending on whether we solve serially or not
+ with pytest.raises(Exception):
+ with ev.Environment(tmp_path) as e:
+ e.concretize()
+
+
+def test_only_roots_are_explicitly_installed(tmp_path, mock_packages, config, temporary_store):
+ """When installing specific non-root specs from an environment, we continue to mark them
+ as implicitly installed. What makes installs explicit is that they are root of the env."""
+ env = ev.create_in_dir(tmp_path)
+ env.add("mpileaks")
+ env.concretize()
+ mpileaks = env.concrete_roots()[0]
+ callpath = mpileaks["callpath"]
+ env.install_specs([callpath], fake=True)
+ assert callpath in temporary_store.db.query(explicit=False)
+ env.install_specs([mpileaks], fake=True)
+ assert temporary_store.db.query(explicit=True) == [mpileaks]
+
+
+def test_environment_from_name_or_dir(mock_packages, mutable_mock_env_path, tmp_path):
+ test_env = ev.create("test")
+
+ name_env = ev.environment_from_name_or_dir(test_env.name)
+ assert name_env.name == test_env.name
+ assert name_env.path == test_env.path
+
+ dir_env = ev.environment_from_name_or_dir(test_env.path)
+ assert dir_env.name == test_env.name
+ assert dir_env.path == test_env.path
+
+ with pytest.raises(ev.SpackEnvironmentError, match="no such environment"):
+ _ = ev.environment_from_name_or_dir("fake-env")
diff --git a/lib/spack/spack/test/flag_handlers.py b/lib/spack/spack/test/flag_handlers.py
index d2b67d63bc..fd63de4b82 100644
--- a/lib/spack/spack/test/flag_handlers.py
+++ b/lib/spack/spack/test/flag_handlers.py
@@ -8,7 +8,6 @@ import os
import pytest
import spack.build_environment
-import spack.repo
import spack.spec
from spack.package import build_system_flags, env_flags, inject_flags
diff --git a/lib/spack/spack/test/gcs_fetch.py b/lib/spack/spack/test/gcs_fetch.py
index 3689e5780c..8e22624222 100644
--- a/lib/spack/spack/test/gcs_fetch.py
+++ b/lib/spack/spack/test/gcs_fetch.py
@@ -3,54 +3,19 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
-import pytest
-
-import spack.config
-import spack.error
import spack.fetch_strategy
import spack.stage
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_gcsfetchstrategy_without_url(_fetch_method):
- """Ensure constructor with no URL fails."""
- with spack.config.override("config:url_fetch_method", _fetch_method):
- with pytest.raises(ValueError):
- spack.fetch_strategy.GCSFetchStrategy(None)
-
-
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_gcsfetchstrategy_bad_url(tmpdir, _fetch_method):
- """Ensure fetch with bad URL fails as expected."""
- testpath = str(tmpdir)
-
- with spack.config.override("config:url_fetch_method", _fetch_method):
- fetcher = spack.fetch_strategy.GCSFetchStrategy(url="file:///does-not-exist")
- assert fetcher is not None
-
- with spack.stage.Stage(fetcher, path=testpath) as stage:
- assert stage is not None
- assert fetcher.archive_file is None
- with pytest.raises(spack.error.FetchError):
- fetcher.fetch()
-
-
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_gcsfetchstrategy_downloaded(tmpdir, _fetch_method):
+def test_gcsfetchstrategy_downloaded(tmp_path):
"""Ensure fetch with archive file already downloaded is a noop."""
- testpath = str(tmpdir)
- archive = os.path.join(testpath, "gcs.tar.gz")
-
- with spack.config.override("config:url_fetch_method", _fetch_method):
+ archive = tmp_path / "gcs.tar.gz"
- class Archived_GCSFS(spack.fetch_strategy.GCSFetchStrategy):
- @property
- def archive_file(self):
- return archive
+ class Archived_GCSFS(spack.fetch_strategy.GCSFetchStrategy):
+ @property
+ def archive_file(self):
+ return str(archive)
- url = "gcs:///{0}".format(archive)
- fetcher = Archived_GCSFS(url=url)
- with spack.stage.Stage(fetcher, path=testpath):
- fetcher.fetch()
+ fetcher = Archived_GCSFS(url="gs://example/gcs.tar.gz")
+ with spack.stage.Stage(fetcher, path=str(tmp_path)):
+ fetcher.fetch()
diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py
index a68eccb2a5..54ac9d8a1b 100644
--- a/lib/spack/spack/test/git_fetch.py
+++ b/lib/spack/spack/test/git_fetch.py
@@ -12,6 +12,9 @@ import pytest
from llnl.util.filesystem import mkdirp, touch, working_dir
import spack.config
+import spack.error
+import spack.fetch_strategy
+import spack.platforms
import spack.repo
from spack.fetch_strategy import GitFetchStrategy
from spack.spec import Spec
@@ -363,3 +366,65 @@ def test_gitsubmodules_delete(
assert not os.path.isdir(file_path)
file_path = os.path.join(s.package.stage.source_path, "third_party/submodule1")
assert not os.path.isdir(file_path)
+
+
+@pytest.mark.disable_clean_stage_check
+def test_gitsubmodules_falsey(
+ mock_git_repository, default_mock_concretization, mutable_mock_repo, monkeypatch
+):
+ """
+ Test GitFetchStrategy behavior when callable submodules returns Falsey
+ """
+
+ def submodules_callback(package):
+ return False
+
+ type_of_test = "tag-branch"
+ t = mock_git_repository.checks[type_of_test]
+
+ # Construct the package under test
+ s = default_mock_concretization("git-test")
+ args = copy.copy(t.args)
+ args["submodules"] = submodules_callback
+ monkeypatch.setitem(s.package.versions, Version("git"), args)
+ s.package.do_stage()
+ with working_dir(s.package.stage.source_path):
+ file_path = os.path.join(s.package.stage.source_path, "third_party/submodule0/r0_file_0")
+ assert not os.path.isfile(file_path)
+ file_path = os.path.join(s.package.stage.source_path, "third_party/submodule1/r0_file_1")
+ assert not os.path.isfile(file_path)
+
+
+@pytest.mark.disable_clean_stage_check
+def test_git_sparse_paths_partial_clone(
+ mock_git_repository, git_version, default_mock_concretization, mutable_mock_repo, monkeypatch
+):
+ """
+ Test partial clone of repository when using git_sparse_paths property
+ """
+ type_of_test = "many-directories"
+ sparse_paths = ["dir0"]
+ omitted_paths = ["dir1", "dir2"]
+ t = mock_git_repository.checks[type_of_test]
+ args = copy.copy(t.args)
+ args["git_sparse_paths"] = sparse_paths
+ s = default_mock_concretization("git-test")
+ monkeypatch.setitem(s.package.versions, Version("git"), args)
+ s.package.do_stage()
+ with working_dir(s.package.stage.source_path):
+ # top level directory files are cloned via sparse-checkout
+ assert os.path.isfile("r0_file")
+
+ for p in sparse_paths:
+ assert os.path.isdir(p)
+
+ if git_version < Version("2.26.0.0"):
+ # older versions of git should fall back to a full clone
+ for p in omitted_paths:
+ assert os.path.isdir(p)
+ else:
+ for p in omitted_paths:
+ assert not os.path.isdir(p)
+
+ # fixture file is in the sparse-path expansion tree
+ assert os.path.isfile(t.file)
diff --git a/lib/spack/spack/test/graph.py b/lib/spack/spack/test/graph.py
index 338690a72e..a622e855e5 100644
--- a/lib/spack/spack/test/graph.py
+++ b/lib/spack/spack/test/graph.py
@@ -5,37 +5,9 @@
import io
import spack.graph
-import spack.repo
import spack.spec
-def test_static_graph_mpileaks(config, mock_packages):
- """Test a static spack graph for a simple package."""
- s = spack.spec.Spec("mpileaks").normalized()
-
- stream = io.StringIO()
- spack.graph.static_graph_dot([s], out=stream)
-
- dot = stream.getvalue()
-
- assert ' "mpileaks" [label="mpileaks"]\n' in dot
- assert ' "dyninst" [label="dyninst"]\n' in dot
- assert ' "callpath" [label="callpath"]\n' in dot
- assert ' "libelf" [label="libelf"]\n' in dot
- assert ' "libdwarf" [label="libdwarf"]\n' in dot
-
- mpi_providers = spack.repo.PATH.providers_for("mpi")
- for spec in mpi_providers:
- assert ('"mpileaks" -> "%s"' % spec.name) in dot
- assert ('"callpath" -> "%s"' % spec.name) in dot
-
- assert ' "dyninst" -> "libdwarf"\n' in dot
- assert ' "callpath" -> "dyninst"\n' in dot
- assert ' "libdwarf" -> "libelf"\n' in dot
- assert ' "mpileaks" -> "callpath"\n' in dot
- assert ' "dyninst" -> "libelf"\n' in dot
-
-
def test_dynamic_dot_graph_mpileaks(default_mock_concretization):
"""Test dynamically graphing the mpileaks package."""
s = default_mock_concretization("mpileaks")
@@ -102,4 +74,17 @@ o | libdwarf
|/
o libelf
"""
+ or graph_str
+ == r"""o mpileaks
+|\
+| o callpath
+|/|
+| o dyninst
+| |\
+o | | mpich
+ / /
+| o libdwarf
+|/
+o libelf
+"""
)
diff --git a/lib/spack/spack/test/hg_fetch.py b/lib/spack/spack/test/hg_fetch.py
index 6d63f64dc8..f186ea1454 100644
--- a/lib/spack/spack/test/hg_fetch.py
+++ b/lib/spack/spack/test/hg_fetch.py
@@ -10,7 +10,6 @@ import pytest
from llnl.util.filesystem import mkdirp, touch, working_dir
import spack.config
-import spack.repo
from spack.fetch_strategy import HgFetchStrategy
from spack.spec import Spec
from spack.stage import Stage
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py
index e9403932c5..7b45b8969f 100644
--- a/lib/spack/spack/test/install.py
+++ b/lib/spack/spack/test/install.py
@@ -11,13 +11,22 @@ import pytest
import llnl.util.filesystem as fs
+import spack.build_environment
+import spack.config
+import spack.database
import spack.error
+import spack.installer
+import spack.mirrors.mirror
+import spack.mirrors.utils
+import spack.package_base
import spack.patch
import spack.repo
import spack.store
import spack.util.spack_json as sjson
+from spack import binary_distribution
+from spack.error import InstallError
+from spack.installer import PackageInstaller
from spack.package_base import (
- InstallError,
PackageBase,
PackageStillNeededError,
_spack_build_envfile,
@@ -35,7 +44,7 @@ def find_nothing(*args):
def test_install_and_uninstall(install_mockery, mock_fetch, monkeypatch):
spec = Spec("trivial-install-test-package").concretized()
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
assert spec.installed
spec.package.do_uninstall()
@@ -47,7 +56,7 @@ def test_uninstall_non_existing_package(install_mockery, mock_fetch, monkeypatch
"""Ensure that we can uninstall a package that has been deleted from the repo"""
spec = Spec("trivial-install-test-package").concretized()
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
assert spec.installed
# Mock deletion of the package
@@ -68,7 +77,7 @@ def test_pkg_attributes(install_mockery, mock_fetch, monkeypatch):
assert spec.concrete
pkg = spec.package
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
foo = "attributes-foo"
assert spec["bar"].prefix == spec[foo].prefix
assert spec["baz"].prefix == spec[foo].prefix
@@ -118,61 +127,28 @@ class RemovePrefixChecker:
self.wrapped_rm_prefix()
-class MockStage:
- def __init__(self, wrapped_stage):
- self.wrapped_stage = wrapped_stage
- self.test_destroyed = False
-
- def __enter__(self):
- self.create()
- return self
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if exc_type is None:
- self.destroy()
-
- def destroy(self):
- self.test_destroyed = True
- self.wrapped_stage.destroy()
-
- def create(self):
- self.wrapped_stage.create()
-
- def __getattr__(self, attr):
- if attr == "wrapped_stage":
- # This attribute may not be defined at some point during unpickling
- raise AttributeError()
- return getattr(self.wrapped_stage, attr)
-
-
def test_partial_install_delete_prefix_and_stage(install_mockery, mock_fetch, working_env):
s = Spec("canfail").concretized()
instance_rm_prefix = s.package.remove_prefix
- try:
- s.package.remove_prefix = mock_remove_prefix
- with pytest.raises(MockInstallError):
- s.package.do_install()
- assert os.path.isdir(s.package.prefix)
- rm_prefix_checker = RemovePrefixChecker(instance_rm_prefix)
- s.package.remove_prefix = rm_prefix_checker.remove_prefix
-
- # must clear failure markings for the package before re-installing it
- spack.store.STORE.failure_tracker.clear(s, True)
+ s.package.remove_prefix = mock_remove_prefix
+ with pytest.raises(MockInstallError):
+ PackageInstaller([s.package], explicit=True).install()
+ assert os.path.isdir(s.package.prefix)
+ rm_prefix_checker = RemovePrefixChecker(instance_rm_prefix)
+ s.package.remove_prefix = rm_prefix_checker.remove_prefix
- s.package.set_install_succeed()
- s.package.stage = MockStage(s.package.stage)
-
- s.package.do_install(restage=True)
- assert rm_prefix_checker.removed
- assert s.package.stage.test_destroyed
- assert s.package.spec.installed
+ # must clear failure markings for the package before re-installing it
+ spack.store.STORE.failure_tracker.clear(s, True)
- finally:
- s.package.remove_prefix = instance_rm_prefix
+ s.package.set_install_succeed()
+ PackageInstaller([s.package], explicit=True, restage=True).install()
+ assert rm_prefix_checker.removed
+ assert s.package.spec.installed
+@pytest.mark.not_on_windows("Fails spuriously on Windows")
@pytest.mark.disable_clean_stage_check
def test_failing_overwrite_install_should_keep_previous_installation(
mock_fetch, install_mockery, working_env
@@ -186,12 +162,12 @@ def test_failing_overwrite_install_should_keep_previous_installation(
s.package.set_install_succeed()
# Do a failing overwrite install
- s.package.do_install()
+ PackageInstaller([s.package], explicit=True).install()
s.package.set_install_fail()
kwargs = {"overwrite": [s.dag_hash()]}
with pytest.raises(Exception):
- s.package.do_install(**kwargs)
+ PackageInstaller([s.package], explicit=True, **kwargs).install()
assert s.package.spec.installed
assert os.path.exists(s.prefix)
@@ -200,7 +176,7 @@ def test_failing_overwrite_install_should_keep_previous_installation(
def test_dont_add_patches_to_installed_package(install_mockery, mock_fetch, monkeypatch):
dependency = Spec("dependency-install")
dependency.concretize()
- dependency.package.do_install()
+ PackageInstaller([dependency.package], explicit=True).install()
dependency_hash = dependency.dag_hash()
dependent = Spec("dependent-install ^/" + dependency_hash)
@@ -218,7 +194,7 @@ def test_dont_add_patches_to_installed_package(install_mockery, mock_fetch, monk
def test_installed_dependency_request_conflicts(install_mockery, mock_fetch, mutable_mock_repo):
dependency = Spec("dependency-install")
dependency.concretize()
- dependency.package.do_install()
+ PackageInstaller([dependency.package], explicit=True).install()
dependency_hash = dependency.dag_hash()
dependent = Spec("conflicting-dependent ^/" + dependency_hash)
@@ -231,7 +207,7 @@ def test_install_dependency_symlinks_pkg(install_mockery, mock_fetch, mutable_mo
spec = Spec("flatten-deps")
spec.concretize()
pkg = spec.package
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
# Ensure dependency directory exists after the installation.
dependency_dir = os.path.join(pkg.prefix, "dependency-install")
@@ -241,7 +217,7 @@ def test_install_dependency_symlinks_pkg(install_mockery, mock_fetch, mutable_mo
def test_install_times(install_mockery, mock_fetch, mutable_mock_repo):
"""Test install times added."""
spec = Spec("dev-build-test-install-phases").concretized()
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
# Ensure dependency directory exists after the installation.
install_times = os.path.join(spec.package.prefix, ".spack", spack_times_log)
@@ -264,7 +240,7 @@ def test_flatten_deps(install_mockery, mock_fetch, mutable_mock_repo):
spec = Spec("dependent-install")
spec.concretize()
pkg = spec.package
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
# Demonstrate that the directory does not appear under the spec
# prior to the flatten operation.
@@ -286,8 +262,8 @@ def install_upstream(tmpdir_factory, gen_mock_layout, install_mockery):
installs are using the upstream installs).
"""
mock_db_root = str(tmpdir_factory.mktemp("mock_db_root"))
- prepared_db = spack.database.Database(mock_db_root)
upstream_layout = gen_mock_layout("/a/")
+ prepared_db = spack.database.Database(mock_db_root, layout=upstream_layout)
spack.config.CONFIG.push_scope(
spack.config.InternalConfigScope(
name="install-upstream-fixture",
@@ -297,8 +273,7 @@ def install_upstream(tmpdir_factory, gen_mock_layout, install_mockery):
def _install_upstream(*specs):
for spec_str in specs:
- s = spack.spec.Spec(spec_str).concretized()
- prepared_db.add(s, upstream_layout)
+ prepared_db.add(Spec(spec_str).concretized())
downstream_root = str(tmpdir_factory.mktemp("mock_downstream_db_root"))
return downstream_root, upstream_layout
@@ -311,14 +286,14 @@ def test_installed_upstream_external(install_upstream, mock_fetch):
"""
store_root, _ = install_upstream("externaltool")
with spack.store.use_store(store_root):
- dependent = spack.spec.Spec("externaltest")
+ dependent = Spec("externaltest")
dependent.concretize()
new_dependency = dependent["externaltool"]
assert new_dependency.external
assert new_dependency.prefix == os.path.sep + os.path.join("path", "to", "external_tool")
- dependent.package.do_install()
+ PackageInstaller([dependent.package], explicit=True).install()
assert not os.path.exists(new_dependency.prefix)
assert os.path.exists(dependent.prefix)
@@ -330,14 +305,14 @@ def test_installed_upstream(install_upstream, mock_fetch):
"""
store_root, upstream_layout = install_upstream("dependency-install")
with spack.store.use_store(store_root):
- dependency = spack.spec.Spec("dependency-install").concretized()
- dependent = spack.spec.Spec("dependent-install").concretized()
+ dependency = Spec("dependency-install").concretized()
+ dependent = Spec("dependent-install").concretized()
new_dependency = dependent["dependency-install"]
assert new_dependency.installed_upstream
assert new_dependency.prefix == upstream_layout.path_for_spec(dependency)
- dependent.package.do_install()
+ PackageInstaller([dependent.package], explicit=True).install()
assert not os.path.exists(new_dependency.prefix)
assert os.path.exists(dependent.prefix)
@@ -350,17 +325,15 @@ def test_partial_install_keep_prefix(install_mockery, mock_fetch, monkeypatch, w
# If remove_prefix is called at any point in this test, that is an error
monkeypatch.setattr(spack.package_base.PackageBase, "remove_prefix", mock_remove_prefix)
with pytest.raises(spack.build_environment.ChildError):
- s.package.do_install(keep_prefix=True)
+ PackageInstaller([s.package], explicit=True, keep_prefix=True).install()
assert os.path.exists(s.package.prefix)
# must clear failure markings for the package before re-installing it
spack.store.STORE.failure_tracker.clear(s, True)
s.package.set_install_succeed()
- s.package.stage = MockStage(s.package.stage)
- s.package.do_install(keep_prefix=True)
+ PackageInstaller([s.package], explicit=True, keep_prefix=True).install()
assert s.package.spec.installed
- assert not s.package.stage.test_destroyed
def test_second_install_no_overwrite_first(install_mockery, mock_fetch, monkeypatch):
@@ -368,12 +341,12 @@ def test_second_install_no_overwrite_first(install_mockery, mock_fetch, monkeypa
monkeypatch.setattr(spack.package_base.PackageBase, "remove_prefix", mock_remove_prefix)
s.package.set_install_succeed()
- s.package.do_install()
+ PackageInstaller([s.package], explicit=True).install()
assert s.package.spec.installed
# If Package.install is called after this point, it will fail
s.package.set_install_fail()
- s.package.do_install()
+ PackageInstaller([s.package], explicit=True).install()
def test_install_prefix_collision_fails(config, mock_fetch, mock_packages, tmpdir):
@@ -381,21 +354,21 @@ def test_install_prefix_collision_fails(config, mock_fetch, mock_packages, tmpdi
Test that different specs with coinciding install prefixes will fail
to install.
"""
- projections = {"projections": {"all": "all-specs-project-to-this-prefix"}}
+ projections = {"projections": {"all": "one-prefix-per-package-{name}"}}
with spack.store.use_store(str(tmpdir), extra_data=projections):
with spack.config.override("config:checksum", False):
pkg_a = Spec("libelf@0.8.13").concretized().package
pkg_b = Spec("libelf@0.8.12").concretized().package
- pkg_a.do_install()
+ PackageInstaller([pkg_a], explicit=True, fake=True).install()
with pytest.raises(InstallError, match="Install prefix collision"):
- pkg_b.do_install()
+ PackageInstaller([pkg_b], explicit=True, fake=True).install()
def test_store(install_mockery, mock_fetch):
spec = Spec("cmake-client").concretized()
pkg = spec.package
- pkg.do_install()
+ PackageInstaller([pkg], fake=True, explicit=True).install()
@pytest.mark.disable_clean_stage_check
@@ -404,7 +377,7 @@ def test_failing_build(install_mockery, mock_fetch, capfd):
pkg = spec.package
with pytest.raises(spack.build_environment.ChildError, match="Expected failure"):
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
class MockInstallError(spack.error.SpackError):
@@ -433,7 +406,7 @@ def test_nosource_pkg_install(install_mockery, mock_fetch, mock_packages, capfd,
pkg = spec.package
# Make sure install works even though there is no associated code.
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
out = capfd.readouterr()
assert "Installing dependency-install" in out[0]
@@ -450,7 +423,7 @@ def test_nosource_bundle_pkg_install(
pkg = spec.package
# Make sure install works even though there is no associated code.
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
out = capfd.readouterr()
assert "Installing dependency-install" in out[0]
@@ -464,7 +437,7 @@ def test_nosource_pkg_install_post_install(install_mockery, mock_fetch, mock_pac
pkg = spec.package
# Make sure both the install and post-install package methods work.
- pkg.do_install()
+ PackageInstaller([pkg], explicit=True).install()
# Ensure the file created in the package's `install` method exists.
install_txt = os.path.join(spec.prefix, "install.txt")
@@ -478,41 +451,15 @@ def test_nosource_pkg_install_post_install(install_mockery, mock_fetch, mock_pac
def test_pkg_build_paths(install_mockery):
# Get a basic concrete spec for the trivial install package.
spec = Spec("trivial-install-test-package").concretized()
-
- log_path = spec.package.log_path
- assert log_path.endswith(_spack_build_logfile)
-
- env_path = spec.package.env_path
- assert env_path.endswith(_spack_build_envfile)
-
- # Backward compatibility checks
- log_dir = os.path.dirname(log_path)
- fs.mkdirp(log_dir)
- with fs.working_dir(log_dir):
- # Start with the older of the previous log filenames
- older_log = "spack-build.out"
- fs.touch(older_log)
- assert spec.package.log_path.endswith(older_log)
-
- # Now check the newer log filename
- last_log = "spack-build.txt"
- fs.rename(older_log, last_log)
- assert spec.package.log_path.endswith(last_log)
-
- # Check the old environment file
- last_env = "spack-build.env"
- fs.rename(last_log, last_env)
- assert spec.package.env_path.endswith(last_env)
-
- # Cleanup
- shutil.rmtree(log_dir)
+ assert spec.package.log_path.endswith(_spack_build_logfile)
+ assert spec.package.env_path.endswith(_spack_build_envfile)
def test_pkg_install_paths(install_mockery):
# Get a basic concrete spec for the trivial install package.
spec = Spec("trivial-install-test-package").concretized()
- log_path = os.path.join(spec.prefix, ".spack", _spack_build_logfile)
+ log_path = os.path.join(spec.prefix, ".spack", _spack_build_logfile + ".gz")
assert spec.package.install_log_path == log_path
env_path = os.path.join(spec.prefix, ".spack", _spack_build_envfile)
@@ -619,7 +566,7 @@ def test_unconcretized_install(install_mockery, mock_fetch, mock_packages):
pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
with pytest.raises(ValueError, match="must have a concrete spec"):
- pkg_cls(spec).do_install()
+ PackageInstaller([pkg_cls(spec)], explicit=True).install()
with pytest.raises(ValueError, match="only patch concrete packages"):
pkg_cls(spec).do_patch()
@@ -643,4 +590,52 @@ def test_empty_install_sanity_check_prefix(
"""Test empty install triggers sanity_check_prefix."""
spec = Spec("failing-empty-install").concretized()
with pytest.raises(spack.build_environment.ChildError, match="Nothing was installed"):
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
+
+
+def test_install_from_binary_with_missing_patch_succeeds(
+ temporary_store: spack.store.Store, mutable_config, tmp_path, mock_packages
+):
+ """If a patch is missing in the local package repository, but was present when building and
+ pushing the package to a binary cache, installation from that binary cache shouldn't error out
+ because of the missing patch."""
+ # Create a spec s with non-existing patches
+ s = Spec("trivial-install-test-package").concretized()
+ patches = ["a" * 64]
+ s_dict = s.to_dict()
+ s_dict["spec"]["nodes"][0]["patches"] = patches
+ s_dict["spec"]["nodes"][0]["parameters"]["patches"] = patches
+ s = Spec.from_dict(s_dict)
+
+ # Create an install dir for it
+ os.makedirs(os.path.join(s.prefix, ".spack"))
+ with open(os.path.join(s.prefix, ".spack", "spec.json"), "w") as f:
+ s.to_json(f)
+
+ # And register it in the database
+ temporary_store.db.add(s, explicit=True)
+
+ # Push it to a binary cache
+ mirror = spack.mirrors.mirror.Mirror.from_local_path(str(tmp_path / "my_build_cache"))
+ with binary_distribution.make_uploader(mirror=mirror) as uploader:
+ uploader.push_or_raise([s])
+
+ # Now re-install it.
+ s.package.do_uninstall()
+ assert not temporary_store.db.query_local_by_spec_hash(s.dag_hash())
+
+ # Source install: fails, we don't have the patch.
+ with pytest.raises(spack.error.SpecError, match="Couldn't find patch for package"):
+ PackageInstaller([s.package], explicit=True).install()
+
+ # Binary install: succeeds, we don't need the patch.
+ spack.mirrors.utils.add(mirror)
+ PackageInstaller(
+ [s.package],
+ explicit=True,
+ package_cache_only=True,
+ dependencies_cache_only=True,
+ unsigned=True,
+ ).install()
+
+ assert temporary_store.db.query_local_by_spec_hash(s.dag_hash())
diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py
index 9dc91ef323..38bc160982 100644
--- a/lib/spack/spack/test/installer.py
+++ b/lib/spack/spack/test/installer.py
@@ -7,6 +7,7 @@ import glob
import os
import shutil
import sys
+from typing import List, Optional, Union
import py
import pytest
@@ -16,11 +17,10 @@ import llnl.util.lock as ulk
import llnl.util.tty as tty
import spack.binary_distribution
-import spack.compilers
-import spack.concretize
-import spack.config
import spack.database
import spack.deptypes as dt
+import spack.error
+import spack.hooks
import spack.installer as inst
import spack.package_base
import spack.package_prefs as prefs
@@ -28,7 +28,8 @@ import spack.repo
import spack.spec
import spack.store
import spack.util.lock as lk
-import spack.version
+from spack.installer import PackageInstaller
+from spack.main import SpackCommand
def _mock_repo(root, namespace):
@@ -42,12 +43,10 @@ def _mock_repo(root, namespace):
repodir.ensure(spack.repo.packages_dir_name, dir=True)
yaml = repodir.join("repo.yaml")
yaml.write(
- """
+ f"""
repo:
- namespace: {0}
-""".format(
- namespace
- )
+ namespace: {namespace}
+"""
)
@@ -71,53 +70,21 @@ def _true(*args, **kwargs):
return True
-def create_build_task(pkg, install_args={}):
- """
- Create a built task for the given (concretized) package
-
- Args:
- pkg (spack.package_base.PackageBase): concretized package associated with
- the task
- install_args (dict): dictionary of kwargs (or install args)
-
- Return:
- (BuildTask) A basic package build task
- """
- request = inst.BuildRequest(pkg, install_args)
- return inst.BuildTask(pkg, request, False, 0, 0, inst.STATUS_ADDED, [])
-
-
-def create_installer(installer_args):
- """
- Create an installer using the concretized spec for each arg
-
- Args:
- installer_args (list): the list of (spec name, kwargs) tuples
-
- Return:
- spack.installer.PackageInstaller: the associated package installer
- """
- const_arg = [(spec.package, kwargs) for spec, kwargs in installer_args]
- return inst.PackageInstaller(const_arg)
-
-
-def installer_args(spec_names, kwargs={}):
- """Return a the installer argument with each spec paired with kwargs
+def create_build_task(
+ pkg: spack.package_base.PackageBase, install_args: Optional[dict] = None
+) -> inst.BuildTask:
+ request = inst.BuildRequest(pkg, {} if install_args is None else install_args)
+ return inst.BuildTask(pkg, request=request, status=inst.BuildStatus.QUEUED)
- Args:
- spec_names (list): list of spec names
- kwargs (dict or None): install arguments to apply to all of the specs
- Returns:
- list: list of (spec, kwargs), the installer constructor argument
- """
- arg = []
- for name in spec_names:
- spec = spack.spec.Spec(name)
- spec.concretize()
- assert spec.concrete
- arg.append((spec, kwargs))
- return arg
+def create_installer(
+ specs: Union[List[str], List[spack.spec.Spec]], install_args: Optional[dict] = None
+) -> inst.PackageInstaller:
+ """Create an installer instance for a list of specs or package names that will be
+ concretized."""
+ _specs = [spack.spec.Spec(s).concretized() if isinstance(s, str) else s for s in specs]
+ _install_args = {} if install_args is None else install_args
+ return inst.PackageInstaller([spec.package for spec in _specs], **_install_args)
@pytest.mark.parametrize(
@@ -130,11 +97,11 @@ def test_hms(sec, result):
def test_get_dependent_ids(install_mockery, mock_packages):
# Concretize the parent package, which handle dependency too
- spec = spack.spec.Spec("a")
+ spec = spack.spec.Spec("pkg-a")
spec.concretize()
assert spec.concrete
- pkg_id = inst.package_id(spec.package)
+ pkg_id = inst.package_id(spec)
# Grab the sole dependency of 'a', which is 'b'
dep = spec.dependencies()[0]
@@ -165,23 +132,23 @@ def test_install_msg(monkeypatch):
assert inst.install_msg(name, pid, None) == expected
-def test_install_from_cache_errors(install_mockery, capsys):
- """Test to ensure cover _install_from_cache errors."""
+def test_install_from_cache_errors(install_mockery):
+ """Test to ensure cover install from cache errors."""
spec = spack.spec.Spec("trivial-install-test-package")
spec.concretize()
assert spec.concrete
# Check with cache-only
- with pytest.raises(SystemExit):
- inst._install_from_cache(spec.package, True, True, False)
-
- captured = str(capsys.readouterr())
- assert "No binary" in captured
- assert "found when cache-only specified" in captured
+ with pytest.raises(
+ spack.error.InstallError, match="No binary found when cache-only was specified"
+ ):
+ PackageInstaller(
+ [spec.package], package_cache_only=True, dependencies_cache_only=True
+ ).install()
assert not spec.package.installed_from_binary_cache
# Check when don't expect to install only from binary cache
- assert not inst._install_from_cache(spec.package, False, True, False)
+ assert not inst._install_from_cache(spec.package, explicit=True, unsigned=False)
assert not spec.package.installed_from_binary_cache
@@ -192,7 +159,7 @@ def test_install_from_cache_ok(install_mockery, monkeypatch):
monkeypatch.setattr(inst, "_try_install_from_binary_cache", _true)
monkeypatch.setattr(spack.hooks, "post_install", _noop)
- assert inst._install_from_cache(spec.package, True, True, False)
+ assert inst._install_from_cache(spec.package, explicit=True, unsigned=False)
def test_process_external_package_module(install_mockery, monkeypatch, capfd):
@@ -225,11 +192,11 @@ def test_process_binary_cache_tarball_tar(install_mockery, monkeypatch, capfd):
# Skip database updates
monkeypatch.setattr(spack.database.Database, "add", _noop)
- spec = spack.spec.Spec("a").concretized()
+ spec = spack.spec.Spec("pkg-a").concretized()
assert inst._process_binary_cache_tarball(spec.package, explicit=False, unsigned=False)
out = capfd.readouterr()[0]
- assert "Extracting a" in out
+ assert "Extracting pkg-a" in out
assert "from binary cache" in out
@@ -242,8 +209,7 @@ def test_try_install_from_binary_cache(install_mockery, mock_packages, monkeypat
def test_installer_repr(install_mockery):
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"])
irep = installer.__repr__()
assert irep.startswith(installer.__class__.__name__)
@@ -252,8 +218,7 @@ def test_installer_repr(install_mockery):
def test_installer_str(install_mockery):
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"])
istr = str(installer)
assert "#tasks=0" in istr
@@ -280,7 +245,7 @@ def test_installer_prune_built_build_deps(install_mockery, monkeypatch, tmpdir):
@property
def _mock_installed(self):
- return self.name in ["c"]
+ return self.name == "pkg-c"
# Mock the installed property to say that (b) is installed
monkeypatch.setattr(spack.spec.Spec, "installed", _mock_installed)
@@ -288,24 +253,24 @@ def test_installer_prune_built_build_deps(install_mockery, monkeypatch, tmpdir):
# Create mock repository with packages (a), (b), (c), (d), and (e)
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock-repo"))
- builder.add_package("a", dependencies=[("b", "build", None), ("c", "build", None)])
- builder.add_package("b", dependencies=[("d", "build", None)])
+ builder.add_package("pkg-a", dependencies=[("pkg-b", "build", None), ("pkg-c", "build", None)])
+ builder.add_package("pkg-b", dependencies=[("pkg-d", "build", None)])
builder.add_package(
- "c", dependencies=[("d", "build", None), ("e", "all", None), ("f", "build", None)]
+ "pkg-c",
+ dependencies=[("pkg-d", "build", None), ("pkg-e", "all", None), ("pkg-f", "build", None)],
)
- builder.add_package("d")
- builder.add_package("e")
- builder.add_package("f")
+ builder.add_package("pkg-d")
+ builder.add_package("pkg-e")
+ builder.add_package("pkg-f")
with spack.repo.use_repositories(builder.root):
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"])
installer._init_queue()
# Assert that (c) is not in the build_pq
- result = set([task.pkg_id[0] for _, task in installer.build_pq])
- expected = set(["a", "b", "c", "d", "e"])
+ result = {task.pkg_id[:5] for _, task in installer.build_pq}
+ expected = {"pkg-a", "pkg-b", "pkg-c", "pkg-d", "pkg-e"}
assert result == expected
@@ -333,8 +298,7 @@ def test_check_last_phase_error(install_mockery):
def test_installer_ensure_ready_errors(install_mockery, monkeypatch):
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"])
spec = installer.build_requests[0].pkg.spec
fmt = r"cannot be installed locally.*{0}"
@@ -368,8 +332,7 @@ def test_ensure_locked_err(install_mockery, monkeypatch, tmpdir, capsys):
def _raise(lock, timeout=None):
raise RuntimeError(mock_err_msg)
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"])
spec = installer.build_requests[0].pkg.spec
monkeypatch.setattr(ulk.Lock, "acquire_read", _raise)
@@ -384,10 +347,9 @@ def test_ensure_locked_err(install_mockery, monkeypatch, tmpdir, capsys):
def test_ensure_locked_have(install_mockery, tmpdir, capsys):
"""Test _ensure_locked when already have lock."""
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"], {})
spec = installer.build_requests[0].pkg.spec
- pkg_id = inst.package_id(spec.package)
+ pkg_id = inst.package_id(spec)
with tmpdir.as_cwd():
# Test "downgrade" of a read lock (to a read lock)
@@ -420,9 +382,7 @@ def test_ensure_locked_have(install_mockery, tmpdir, capsys):
@pytest.mark.parametrize("lock_type,reads,writes", [("read", 1, 0), ("write", 0, 1)])
def test_ensure_locked_new_lock(install_mockery, tmpdir, lock_type, reads, writes):
- pkg_id = "a"
- const_arg = installer_args([pkg_id], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
spec = installer.build_requests[0].pkg.spec
with tmpdir.as_cwd():
ltype, lock = installer._ensure_locked(lock_type, spec.package)
@@ -440,9 +400,7 @@ def test_ensure_locked_new_warn(install_mockery, monkeypatch, tmpdir, capsys):
lock.default_timeout = 1e-9 if timeout is None else None
return lock
- pkg_id = "a"
- const_arg = installer_args([pkg_id], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
spec = installer.build_requests[0].pkg.spec
monkeypatch.setattr(spack.database.SpecLocker, "lock", _pl)
@@ -458,17 +416,15 @@ def test_ensure_locked_new_warn(install_mockery, monkeypatch, tmpdir, capsys):
def test_package_id_err(install_mockery):
s = spack.spec.Spec("trivial-install-test-package")
- pkg_cls = spack.repo.PATH.get_pkg_class(s.name)
with pytest.raises(ValueError, match="spec is not concretized"):
- inst.package_id(pkg_cls(s))
+ inst.package_id(s)
def test_package_id_ok(install_mockery):
spec = spack.spec.Spec("trivial-install-test-package")
spec.concretize()
assert spec.concrete
- pkg = spec.package
- assert pkg.name in inst.package_id(pkg)
+ assert spec.name in inst.package_id(spec)
def test_fake_install(install_mockery):
@@ -481,70 +437,6 @@ def test_fake_install(install_mockery):
assert os.path.isdir(pkg.prefix.lib)
-def test_packages_needed_to_bootstrap_compiler_none(install_mockery):
- spec = spack.spec.Spec("trivial-install-test-package")
- spec.concretize()
- assert spec.concrete
-
- packages = inst._packages_needed_to_bootstrap_compiler(
- spec.compiler, spec.architecture, [spec.package]
- )
- assert not packages
-
-
-@pytest.mark.xfail(reason="fails when assuming Spec.package can only be called on concrete specs")
-def test_packages_needed_to_bootstrap_compiler_packages(install_mockery, monkeypatch):
- spec = spack.spec.Spec("trivial-install-test-package")
- spec.concretize()
-
- def _conc_spec(compiler):
- return spack.spec.Spec("a").concretized()
-
- # Ensure we can get past functions that are precluding obtaining
- # packages.
- monkeypatch.setattr(spack.compilers, "compilers_for_spec", _none)
- monkeypatch.setattr(spack.compilers, "pkg_spec_for_compiler", _conc_spec)
- monkeypatch.setattr(spack.spec.Spec, "concretize", _noop)
-
- packages = inst._packages_needed_to_bootstrap_compiler(
- spec.compiler, spec.architecture, [spec.package]
- )
- assert packages
-
-
-def test_update_tasks_for_compiler_packages_as_compiler(mock_packages, config, monkeypatch):
- spec = spack.spec.Spec("trivial-install-test-package").concretized()
- installer = inst.PackageInstaller([(spec.package, {})])
-
- # Add a task to the queue
- installer._add_init_task(spec.package, installer.build_requests[0], False, {})
-
- # monkeypatch to make the list of compilers be what we test
- def fake_package_list(compiler, architecture, pkgs):
- return [(spec.package, True)]
-
- monkeypatch.setattr(inst, "_packages_needed_to_bootstrap_compiler", fake_package_list)
-
- installer._add_bootstrap_compilers("fake", "fake", "fake", None, {})
-
- # Check that the only task is now a compiler task
- assert len(installer.build_pq) == 1
- assert installer.build_pq[0][1].compiler
-
-
-def test_bootstrapping_compilers_with_different_names_from_spec(
- install_mockery, mutable_config, mock_fetch, archspec_host_is_spack_test_host
-):
- with spack.config.override("config:install_missing_compilers", True):
- with spack.concretize.disable_compiler_existence_check():
- spec = spack.spec.Spec("trivial-install-test-package%oneapi@=22.2.0").concretized()
- spec.package.do_install()
-
- assert (
- spack.spec.CompilerSpec("oneapi@=22.2.0") in spack.compilers.all_compiler_specs()
- )
-
-
def test_dump_packages_deps_ok(install_mockery, tmpdir, mock_packages):
"""Test happy path for dump_packages with dependencies."""
@@ -602,7 +494,7 @@ def test_clear_failures_success(tmpdir):
"""Test the clear_failures happy path."""
failures = spack.database.FailureTracker(str(tmpdir), default_timeout=0.1)
- spec = spack.spec.Spec("a")
+ spec = spack.spec.Spec("pkg-a")
spec._mark_concrete()
# Set up a test prefix failure lock
@@ -624,11 +516,11 @@ def test_clear_failures_success(tmpdir):
assert os.path.isfile(failures.locker.lock_path)
-@pytest.mark.xfail(sys.platform == "win32", reason="chmod does not prevent removal on Win")
+@pytest.mark.not_on_windows("chmod does not prevent removal on Win")
def test_clear_failures_errs(tmpdir, capsys):
"""Test the clear_failures exception paths."""
failures = spack.database.FailureTracker(str(tmpdir), default_timeout=0.1)
- spec = spack.spec.Spec("a")
+ spec = spack.spec.Spec("pkg-a")
spec._mark_concrete()
failures.mark(spec)
@@ -690,33 +582,30 @@ def test_check_deps_status_install_failure(install_mockery):
"""Tests that checking the dependency status on a request to install
'a' fails, if we mark the dependency as failed.
"""
- s = spack.spec.Spec("a").concretized()
+ s = spack.spec.Spec("pkg-a").concretized()
for dep in s.traverse(root=False):
spack.store.STORE.failure_tracker.mark(dep)
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
request = installer.build_requests[0]
- with pytest.raises(inst.InstallError, match="install failure"):
+ with pytest.raises(spack.error.InstallError, match="install failure"):
installer._check_deps_status(request)
def test_check_deps_status_write_locked(install_mockery, monkeypatch):
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
request = installer.build_requests[0]
# Ensure the lock is not acquired
monkeypatch.setattr(inst.PackageInstaller, "_ensure_locked", _not_locked)
- with pytest.raises(inst.InstallError, match="write locked by another"):
+ with pytest.raises(spack.error.InstallError, match="write locked by another"):
installer._check_deps_status(request)
def test_check_deps_status_external(install_mockery, monkeypatch):
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
request = installer.build_requests[0]
# Mock the dependencies as external so assumed to be installed
@@ -724,12 +613,11 @@ def test_check_deps_status_external(install_mockery, monkeypatch):
installer._check_deps_status(request)
for dep in request.spec.traverse(root=False):
- assert inst.package_id(dep.package) in installer.installed
+ assert inst.package_id(dep) in installer.installed
def test_check_deps_status_upstream(install_mockery, monkeypatch):
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
request = installer.build_requests[0]
# Mock the known dependencies as installed upstream
@@ -737,34 +625,12 @@ def test_check_deps_status_upstream(install_mockery, monkeypatch):
installer._check_deps_status(request)
for dep in request.spec.traverse(root=False):
- assert inst.package_id(dep.package) in installer.installed
-
-
-def test_add_bootstrap_compilers(install_mockery, monkeypatch):
- from collections import defaultdict
-
- def _pkgs(compiler, architecture, pkgs):
- spec = spack.spec.Spec("mpi").concretized()
- return [(spec.package, True)]
-
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
- request = installer.build_requests[0]
- all_deps = defaultdict(set)
-
- monkeypatch.setattr(inst, "_packages_needed_to_bootstrap_compiler", _pkgs)
- installer._add_bootstrap_compilers("fake", "fake", [request.pkg], request, all_deps)
-
- ids = list(installer.build_tasks)
- assert len(ids) == 1
- task = installer.build_tasks[ids[0]]
- assert task.compiler
+ assert inst.package_id(dep) in installer.installed
def test_prepare_for_install_on_installed(install_mockery, monkeypatch):
"""Test of _prepare_for_install's early return for installed task path."""
- const_arg = installer_args(["dependent-install"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["dependent-install"], {})
request = installer.build_requests[0]
install_args = {"keep_prefix": True, "keep_stage": True, "restage": False}
@@ -778,19 +644,86 @@ def test_prepare_for_install_on_installed(install_mockery, monkeypatch):
def test_installer_init_requests(install_mockery):
"""Test of installer initial requests."""
spec_name = "dependent-install"
- with spack.config.override("config:install_missing_compilers", True):
- const_arg = installer_args([spec_name], {})
- installer = create_installer(const_arg)
+ installer = create_installer([spec_name], {})
- # There is only one explicit request in this case
- assert len(installer.build_requests) == 1
- request = installer.build_requests[0]
- assert request.pkg.name == spec_name
+ # There is only one explicit request in this case
+ assert len(installer.build_requests) == 1
+ request = installer.build_requests[0]
+ assert request.pkg.name == spec_name
+
+
+@pytest.mark.parametrize("transitive", [True, False])
+def test_install_spliced(install_mockery, mock_fetch, monkeypatch, capsys, transitive):
+ """Test installing a spliced spec"""
+ spec = spack.spec.Spec("splice-t").concretized()
+ dep = spack.spec.Spec("splice-h+foo").concretized()
+
+ # Do the splice.
+ out = spec.splice(dep, transitive)
+ installer = create_installer([out], {"verbose": True, "fail_fast": True})
+ installer.install()
+ for node in out.traverse():
+ assert node.installed
+ assert node.build_spec.installed
+
+
+@pytest.mark.parametrize("transitive", [True, False])
+def test_install_spliced_build_spec_installed(install_mockery, capfd, mock_fetch, transitive):
+ """Test installing a spliced spec with the build spec already installed"""
+ spec = spack.spec.Spec("splice-t").concretized()
+ dep = spack.spec.Spec("splice-h+foo").concretized()
+
+ # Do the splice.
+ out = spec.splice(dep, transitive)
+ PackageInstaller([out.build_spec.package]).install()
+
+ installer = create_installer([out], {"verbose": True, "fail_fast": True})
+ installer._init_queue()
+ for _, task in installer.build_pq:
+ assert isinstance(task, inst.RewireTask if task.pkg.spec.spliced else inst.BuildTask)
+ installer.install()
+ for node in out.traverse():
+ assert node.installed
+ assert node.build_spec.installed
+
+
+@pytest.mark.not_on_windows("lacking windows support for binary installs")
+@pytest.mark.parametrize("transitive", [True, False])
+@pytest.mark.parametrize(
+ "root_str", ["splice-t^splice-h~foo", "splice-h~foo", "splice-vt^splice-a"]
+)
+def test_install_splice_root_from_binary(
+ install_mockery, mock_fetch, mutable_temporary_mirror, transitive, root_str
+):
+ """Test installing a spliced spec with the root available in binary cache"""
+ # Test splicing and rewiring a spec with the same name, different hash.
+ original_spec = spack.spec.Spec(root_str).concretized()
+ spec_to_splice = spack.spec.Spec("splice-h+foo").concretized()
+
+ PackageInstaller([original_spec.package, spec_to_splice.package]).install()
+
+ out = original_spec.splice(spec_to_splice, transitive)
+
+ buildcache = SpackCommand("buildcache")
+ buildcache(
+ "push",
+ "--unsigned",
+ "--update-index",
+ mutable_temporary_mirror,
+ str(original_spec),
+ str(spec_to_splice),
+ )
+
+ uninstall = SpackCommand("uninstall")
+ uninstall("-ay")
+
+ PackageInstaller([out.package], unsigned=True).install()
+
+ assert len(spack.store.STORE.db.query()) == len(list(out.traverse()))
def test_install_task_use_cache(install_mockery, monkeypatch):
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"], {})
request = installer.build_requests[0]
task = create_build_task(request.pkg)
@@ -799,34 +732,35 @@ def test_install_task_use_cache(install_mockery, monkeypatch):
assert request.pkg_id in installer.installed
-def test_install_task_add_compiler(install_mockery, monkeypatch, capfd):
- config_msg = "mock add_compilers_to_config"
+def test_install_task_requeue_build_specs(install_mockery, monkeypatch, capfd):
+ """Check that a missing build_spec spec is added by _install_task."""
- def _add(_compilers):
- tty.msg(config_msg)
+ # This test also ensures coverage of most of the new
+ # _requeue_with_build_spec_tasks method.
+ def _missing(*args, **kwargs):
+ return inst.ExecuteResult.MISSING_BUILD_SPEC
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
- task = create_build_task(installer.build_requests[0].pkg)
- task.compiler = True
+ # Set the configuration to ensure _requeue_with_build_spec_tasks actually
+ # does something.
+ installer = create_installer(["depb"], {})
+ installer._init_queue()
+ request = installer.build_requests[0]
+ task = create_build_task(request.pkg)
- # Preclude any meaningful side-effects
- monkeypatch.setattr(spack.package_base.PackageBase, "unit_test_check", _true)
- monkeypatch.setattr(inst.PackageInstaller, "_setup_install_dir", _noop)
- monkeypatch.setattr(spack.build_environment, "start_build_process", _noop)
- monkeypatch.setattr(spack.database.Database, "add", _noop)
- monkeypatch.setattr(spack.compilers, "add_compilers_to_config", _add)
+ # Drop one of the specs so its task is missing before _install_task
+ popped_task = installer._pop_task()
+ assert inst.package_id(popped_task.pkg.spec) not in installer.build_tasks
+ monkeypatch.setattr(task, "execute", _missing)
installer._install_task(task, None)
- out = capfd.readouterr()[0]
- assert config_msg in out
+ # Ensure the dropped task/spec was added back by _install_task
+ assert inst.package_id(popped_task.pkg.spec) in installer.build_tasks
def test_release_lock_write_n_exception(install_mockery, tmpdir, capsys):
"""Test _release_lock for supposed write lock with exception."""
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"], {})
pkg_id = "test"
with tmpdir.as_cwd():
@@ -843,8 +777,7 @@ def test_release_lock_write_n_exception(install_mockery, tmpdir, capsys):
@pytest.mark.parametrize("installed", [True, False])
def test_push_task_skip_processed(install_mockery, installed):
"""Test to ensure skip re-queueing a processed package."""
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
assert len(list(installer.build_tasks)) == 0
# Mark the package as installed OR failed
@@ -861,8 +794,7 @@ def test_push_task_skip_processed(install_mockery, installed):
def test_requeue_task(install_mockery, capfd):
"""Test to ensure cover _requeue_task."""
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
task = create_build_task(installer.build_requests[0].pkg)
# temporarily set tty debug messages on so we can test output
@@ -874,12 +806,12 @@ def test_requeue_task(install_mockery, capfd):
ids = list(installer.build_tasks)
assert len(ids) == 1
qtask = installer.build_tasks[ids[0]]
- assert qtask.status == inst.STATUS_INSTALLING
+ assert qtask.status == inst.BuildStatus.INSTALLING
assert qtask.sequence > task.sequence
assert qtask.attempts == task.attempts + 1
out = capfd.readouterr()[1]
- assert "Installing a" in out
+ assert "Installing pkg-a" in out
assert " in progress by another process" in out
@@ -892,17 +824,16 @@ def test_cleanup_all_tasks(install_mockery, monkeypatch):
def _rmtask(installer, pkg_id):
raise RuntimeError("Raise an exception to test except path")
- const_arg = installer_args(["a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {})
spec = installer.build_requests[0].pkg.spec
# Cover task removal happy path
- installer.build_tasks["a"] = _mktask(spec.package)
+ installer.build_tasks["pkg-a"] = _mktask(spec.package)
installer._cleanup_all_tasks()
assert len(installer.build_tasks) == 0
# Cover task removal exception path
- installer.build_tasks["a"] = _mktask(spec.package)
+ installer.build_tasks["pkg-a"] = _mktask(spec.package)
monkeypatch.setattr(inst.PackageInstaller, "_remove_task", _rmtask)
installer._cleanup_all_tasks()
assert len(installer.build_tasks) == 1
@@ -922,9 +853,10 @@ def test_setup_install_dir_grp(install_mockery, monkeypatch, capfd):
monkeypatch.setattr(prefs, "get_package_group", _get_group)
monkeypatch.setattr(fs, "chgrp", _chgrp)
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
- spec = installer.build_requests[0].pkg.spec
+ build_task = create_build_task(
+ spack.spec.Spec("trivial-install-test-package").concretized().package
+ )
+ spec = build_task.request.pkg.spec
fs.touchp(spec.prefix)
metadatadir = spack.store.STORE.layout.metadata_path(spec)
@@ -934,7 +866,7 @@ def test_setup_install_dir_grp(install_mockery, monkeypatch, capfd):
metadatadir = None
# Should fail with a "not a directory" error
with pytest.raises(OSError, match=metadatadir):
- installer._setup_install_dir(spec.package)
+ build_task._setup_install_dir(spec.package)
out = str(capfd.readouterr()[0])
@@ -949,8 +881,7 @@ def test_cleanup_failed_err(install_mockery, tmpdir, monkeypatch, capsys):
def _raise_except(lock):
raise RuntimeError(msg)
- const_arg = installer_args(["trivial-install-test-package"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["trivial-install-test-package"], {})
monkeypatch.setattr(lk.Lock, "release_write", _raise_except)
pkg_id = "test"
@@ -966,8 +897,7 @@ def test_cleanup_failed_err(install_mockery, tmpdir, monkeypatch, capsys):
def test_update_failed_no_dependent_task(install_mockery):
"""Test _update_failed with missing dependent build tasks."""
- const_arg = installer_args(["dependent-install"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["dependent-install"], {})
spec = installer.build_requests[0].pkg.spec
for dep in spec.traverse(root=False):
@@ -978,8 +908,7 @@ def test_update_failed_no_dependent_task(install_mockery):
def test_install_uninstalled_deps(install_mockery, monkeypatch, capsys):
"""Test install with uninstalled dependencies."""
- const_arg = installer_args(["dependent-install"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["dependent-install"], {})
# Skip the actual installation and any status updates
monkeypatch.setattr(inst.PackageInstaller, "_install_task", _noop)
@@ -987,7 +916,7 @@ def test_install_uninstalled_deps(install_mockery, monkeypatch, capsys):
monkeypatch.setattr(inst.PackageInstaller, "_update_failed", _noop)
msg = "Cannot proceed with dependent-install"
- with pytest.raises(inst.InstallError, match=msg):
+ with pytest.raises(spack.error.InstallError, match=msg):
installer.install()
out = str(capsys.readouterr())
@@ -996,13 +925,12 @@ def test_install_uninstalled_deps(install_mockery, monkeypatch, capsys):
def test_install_failed(install_mockery, monkeypatch, capsys):
"""Test install with failed install."""
- const_arg = installer_args(["b"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-b"], {})
# Make sure the package is identified as failed
monkeypatch.setattr(spack.database.FailureTracker, "has_failed", _true)
- with pytest.raises(inst.InstallError, match="request failed"):
+ with pytest.raises(spack.error.InstallError, match="request failed"):
installer.install()
out = str(capsys.readouterr())
@@ -1012,119 +940,106 @@ def test_install_failed(install_mockery, monkeypatch, capsys):
def test_install_failed_not_fast(install_mockery, monkeypatch, capsys):
"""Test install with failed install."""
- const_arg = installer_args(["a"], {"fail_fast": False})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {"fail_fast": False})
# Make sure the package is identified as failed
monkeypatch.setattr(spack.database.FailureTracker, "has_failed", _true)
- with pytest.raises(inst.InstallError, match="request failed"):
+ with pytest.raises(spack.error.InstallError, match="request failed"):
installer.install()
out = str(capsys.readouterr())
assert "failed to install" in out
- assert "Skipping build of a" in out
+ assert "Skipping build of pkg-a" in out
-def test_install_fail_on_interrupt(install_mockery, monkeypatch):
- """Test ctrl-c interrupted install."""
- spec_name = "a"
- err_msg = "mock keyboard interrupt for {0}".format(spec_name)
-
- def _interrupt(installer, task, install_status, **kwargs):
- if task.pkg.name == spec_name:
- raise KeyboardInterrupt(err_msg)
- else:
- installer.installed.add(task.pkg.name)
+def _interrupt(installer, task, install_status, **kwargs):
+ if task.pkg.name == "pkg-a":
+ raise KeyboardInterrupt("mock keyboard interrupt for pkg-a")
+ else:
+ return installer._real_install_task(task, None)
+ # installer.installed.add(task.pkg.name)
- const_arg = installer_args([spec_name], {})
- installer = create_installer(const_arg)
+def test_install_fail_on_interrupt(install_mockery, mock_fetch, monkeypatch):
+ """Test ctrl-c interrupted install."""
+ spec_name = "pkg-a"
+ err_msg = "mock keyboard interrupt for {0}".format(spec_name)
+ installer = create_installer([spec_name], {"fake": True})
+ setattr(inst.PackageInstaller, "_real_install_task", inst.PackageInstaller._install_task)
# Raise a KeyboardInterrupt error to trigger early termination
monkeypatch.setattr(inst.PackageInstaller, "_install_task", _interrupt)
with pytest.raises(KeyboardInterrupt, match=err_msg):
installer.install()
- assert "b" in installer.installed # ensure dependency of a is 'installed'
- assert spec_name not in installer.installed
+ assert not any(i.startswith("pkg-a-") for i in installer.installed)
+ assert any(
+ i.startswith("pkg-b-") for i in installer.installed
+ ) # ensure dependency of a is 'installed'
-def test_install_fail_single(install_mockery, monkeypatch):
- """Test expected results for failure of single package."""
- spec_name = "a"
- err_msg = "mock internal package build error for {0}".format(spec_name)
+class MyBuildException(Exception):
+ pass
- class MyBuildException(Exception):
- pass
- def _install(installer, task, install_status, **kwargs):
- if task.pkg.name == spec_name:
- raise MyBuildException(err_msg)
- else:
- installer.installed.add(task.pkg.name)
+def _install_fail_my_build_exception(installer, task, install_status, **kwargs):
+ print(task, task.pkg.name)
+ if task.pkg.name == "pkg-a":
+ raise MyBuildException("mock internal package build error for pkg-a")
+ else:
+ # No need for more complex logic here because no splices
+ task.execute(install_status)
+ installer._update_installed(task)
- const_arg = installer_args([spec_name], {})
- installer = create_installer(const_arg)
+
+def test_install_fail_single(install_mockery, mock_fetch, monkeypatch):
+ """Test expected results for failure of single package."""
+ installer = create_installer(["pkg-a"], {"fake": True})
# Raise a KeyboardInterrupt error to trigger early termination
- monkeypatch.setattr(inst.PackageInstaller, "_install_task", _install)
+ monkeypatch.setattr(inst.PackageInstaller, "_install_task", _install_fail_my_build_exception)
- with pytest.raises(MyBuildException, match=err_msg):
+ with pytest.raises(MyBuildException, match="mock internal package build error for pkg-a"):
installer.install()
- assert "b" in installer.installed # ensure dependency of a is 'installed'
- assert spec_name not in installer.installed
+ # ensure dependency of a is 'installed' and a is not
+ assert any(pkg_id.startswith("pkg-b-") for pkg_id in installer.installed)
+ assert not any(pkg_id.startswith("pkg-a-") for pkg_id in installer.installed)
-def test_install_fail_multi(install_mockery, monkeypatch):
+def test_install_fail_multi(install_mockery, mock_fetch, monkeypatch):
"""Test expected results for failure of multiple packages."""
- spec_name = "c"
- err_msg = "mock internal package build error"
-
- class MyBuildException(Exception):
- pass
-
- def _install(installer, task, install_status, **kwargs):
- if task.pkg.name == spec_name:
- raise MyBuildException(err_msg)
- else:
- installer.installed.add(task.pkg.name)
-
- const_arg = installer_args([spec_name, "a"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a", "pkg-c"], {"fake": True})
# Raise a KeyboardInterrupt error to trigger early termination
- monkeypatch.setattr(inst.PackageInstaller, "_install_task", _install)
+ monkeypatch.setattr(inst.PackageInstaller, "_install_task", _install_fail_my_build_exception)
- with pytest.raises(inst.InstallError, match="Installation request failed"):
+ with pytest.raises(spack.error.InstallError, match="Installation request failed"):
installer.install()
- assert "a" in installer.installed # ensure the the second spec installed
- assert spec_name not in installer.installed
+ # ensure the the second spec installed but not the first
+ assert any(pkg_id.startswith("pkg-c-") for pkg_id in installer.installed)
+ assert not any(pkg_id.startswith("pkg-a-") for pkg_id in installer.installed)
def test_install_fail_fast_on_detect(install_mockery, monkeypatch, capsys):
"""Test fail_fast install when an install failure is detected."""
- const_arg = installer_args(["b"], {"fail_fast": False})
- const_arg.extend(installer_args(["c"], {"fail_fast": True}))
- installer = create_installer(const_arg)
- pkg_ids = [inst.package_id(spec.package) for spec, _ in const_arg]
+ b, c = spack.spec.Spec("pkg-b").concretized(), spack.spec.Spec("pkg-c").concretized()
+ b_id, c_id = inst.package_id(b), inst.package_id(c)
+
+ installer = create_installer([b, c], {"fail_fast": True})
# Make sure all packages are identified as failed
- #
- # This will prevent b from installing, which will cause the build of a
- # to be skipped.
+ # This will prevent b from installing, which will cause the build of c to be skipped.
monkeypatch.setattr(spack.database.FailureTracker, "has_failed", _true)
- with pytest.raises(inst.InstallError, match="after first install failure"):
+ with pytest.raises(spack.error.InstallError, match="after first install failure"):
installer.install()
- assert pkg_ids[0] in installer.failed, "Expected b to be marked as failed"
- assert pkg_ids[1] not in installer.failed, "Expected no attempt to install c"
-
- out = capsys.readouterr()[1]
- assert "{0} failed to install".format(pkg_ids[0]) in out
+ assert b_id in installer.failed, "Expected b to be marked as failed"
+ assert c_id not in installer.failed, "Expected no attempt to install pkg-c"
+ assert f"{b_id} failed to install" in capsys.readouterr().err
def _test_install_fail_fast_on_except_patch(installer, **kwargs):
@@ -1137,8 +1052,7 @@ def _test_install_fail_fast_on_except_patch(installer, **kwargs):
@pytest.mark.disable_clean_stage_check
def test_install_fail_fast_on_except(install_mockery, monkeypatch, capsys):
"""Test fail_fast install when an install failure results from an error."""
- const_arg = installer_args(["a"], {"fail_fast": True})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-a"], {"fail_fast": True})
# Raise a non-KeyboardInterrupt exception to trigger fast failure.
#
@@ -1148,11 +1062,11 @@ def test_install_fail_fast_on_except(install_mockery, monkeypatch, capsys):
spack.package_base.PackageBase, "do_patch", _test_install_fail_fast_on_except_patch
)
- with pytest.raises(inst.InstallError, match="mock patch failure"):
+ with pytest.raises(spack.error.InstallError, match="mock patch failure"):
installer.install()
out = str(capsys.readouterr())
- assert "Skipping build of a" in out
+ assert "Skipping build of pkg-a" in out
def test_install_lock_failures(install_mockery, monkeypatch, capfd):
@@ -1161,8 +1075,7 @@ def test_install_lock_failures(install_mockery, monkeypatch, capfd):
def _requeued(installer, task, install_status):
tty.msg("requeued {0}".format(task.pkg.spec.name))
- const_arg = installer_args(["b"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-b"], {})
# Ensure never acquire a lock
monkeypatch.setattr(inst.PackageInstaller, "_ensure_locked", _not_locked)
@@ -1170,7 +1083,7 @@ def test_install_lock_failures(install_mockery, monkeypatch, capfd):
# Ensure don't continually requeue the task
monkeypatch.setattr(inst.PackageInstaller, "_requeue_task", _requeued)
- with pytest.raises(inst.InstallError, match="request failed"):
+ with pytest.raises(spack.error.InstallError, match="request failed"):
installer.install()
out = capfd.readouterr()[0]
@@ -1181,20 +1094,19 @@ def test_install_lock_failures(install_mockery, monkeypatch, capfd):
def test_install_lock_installed_requeue(install_mockery, monkeypatch, capfd):
"""Cover basic install handling for installed package."""
- const_arg = installer_args(["b"], {})
- b, _ = const_arg[0]
- installer = create_installer(const_arg)
- b_pkg_id = inst.package_id(b.package)
+ b = spack.spec.Spec("pkg-b").concretized()
+ b_pkg_id = inst.package_id(b)
+ installer = create_installer([b])
def _prep(installer, task):
installer.installed.add(b_pkg_id)
- tty.msg("{0} is installed".format(b_pkg_id))
+ tty.msg(f"{b_pkg_id} is installed")
# also do not allow the package to be locked again
monkeypatch.setattr(inst.PackageInstaller, "_ensure_locked", _not_locked)
def _requeued(installer, task, install_status):
- tty.msg("requeued {0}".format(inst.package_id(task.pkg)))
+ tty.msg(f"requeued {inst.package_id(task.pkg.spec)}")
# Flag the package as installed
monkeypatch.setattr(inst.PackageInstaller, "_prepare_for_install", _prep)
@@ -1202,14 +1114,13 @@ def test_install_lock_installed_requeue(install_mockery, monkeypatch, capfd):
# Ensure don't continually requeue the task
monkeypatch.setattr(inst.PackageInstaller, "_requeue_task", _requeued)
- with pytest.raises(inst.InstallError, match="request failed"):
+ with pytest.raises(spack.error.InstallError, match="request failed"):
installer.install()
assert b_pkg_id not in installer.installed
- out = capfd.readouterr()[0]
expected = ["is installed", "read locked", "requeued"]
- for exp, ln in zip(expected, out.split("\n")):
+ for exp, ln in zip(expected, capfd.readouterr().out.splitlines()):
assert exp in ln
@@ -1237,10 +1148,9 @@ def test_install_read_locked_requeue(install_mockery, monkeypatch, capfd):
# Ensure don't continually requeue the task
monkeypatch.setattr(inst.PackageInstaller, "_requeue_task", _requeued)
- const_arg = installer_args(["b"], {})
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-b"], {})
- with pytest.raises(inst.InstallError, match="request failed"):
+ with pytest.raises(spack.error.InstallError, match="request failed"):
installer.install()
assert "b" not in installer.installed
@@ -1253,25 +1163,19 @@ def test_install_read_locked_requeue(install_mockery, monkeypatch, capfd):
def test_install_skip_patch(install_mockery, mock_fetch):
"""Test the path skip_patch install path."""
- spec_name = "b"
- const_arg = installer_args([spec_name], {"fake": False, "skip_patch": True})
- installer = create_installer(const_arg)
-
+ installer = create_installer(["pkg-b"], {"fake": False, "skip_patch": True})
installer.install()
-
- spec, install_args = const_arg[0]
- assert inst.package_id(spec.package) in installer.installed
+ assert inst.package_id(installer.build_requests[0].pkg.spec) in installer.installed
def test_install_implicit(install_mockery, mock_fetch):
"""Test the path skip_patch install path."""
spec_name = "trivial-install-test-package"
- const_arg = installer_args([spec_name], {"fake": False})
- installer = create_installer(const_arg)
+ installer = create_installer([spec_name], {"fake": False})
pkg = installer.build_requests[0].pkg
- assert not create_build_task(pkg, {"explicit": False}).explicit
- assert create_build_task(pkg, {"explicit": True}).explicit
- assert create_build_task(pkg).explicit
+ assert not create_build_task(pkg, {"explicit": []}).explicit
+ assert create_build_task(pkg, {"explicit": [pkg.spec.dag_hash()]}).explicit
+ assert not create_build_task(pkg).explicit
def test_overwrite_install_backup_success(temporary_store, config, mock_packages, tmpdir):
@@ -1280,8 +1184,7 @@ def test_overwrite_install_backup_success(temporary_store, config, mock_packages
of the original prefix, and leave the original spec marked installed.
"""
# Get a build task. TODO: refactor this to avoid calling internal methods
- const_arg = installer_args(["b"])
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-b"])
installer._init_queue()
task = installer._pop_task()
@@ -1341,8 +1244,7 @@ def test_overwrite_install_backup_failure(temporary_store, config, mock_packages
self.called = True
# Get a build task. TODO: refactor this to avoid calling internal methods
- const_arg = installer_args(["b"])
- installer = create_installer(const_arg)
+ installer = create_installer(["pkg-b"])
installer._init_queue()
task = installer._pop_task()
@@ -1370,27 +1272,25 @@ def test_term_status_line():
# accept that. `with log_output(buf)` doesn't really work because it trims output
# and we actually want to test for escape sequences etc.
x = inst.TermStatusLine(enabled=True)
- x.add("a")
- x.add("b")
+ x.add("pkg-a")
+ x.add("pkg-b")
x.clear()
-@pytest.mark.parametrize(
- "explicit_args,is_explicit",
- [({"explicit": False}, False), ({"explicit": True}, True), ({}, True)],
-)
-def test_single_external_implicit_install(install_mockery, explicit_args, is_explicit):
+@pytest.mark.parametrize("explicit", [True, False])
+def test_single_external_implicit_install(install_mockery, explicit):
pkg = "trivial-install-test-package"
s = spack.spec.Spec(pkg).concretized()
s.external_path = "/usr"
- create_installer([(s, explicit_args)]).install()
- assert spack.store.STORE.db.get_record(pkg).explicit == is_explicit
+ args = {"explicit": [s.dag_hash()] if explicit else []}
+ create_installer([s], args).install()
+ assert spack.store.STORE.db.get_record(pkg).explicit == explicit
def test_overwrite_install_does_install_build_deps(install_mockery, mock_fetch):
"""When overwrite installing something from sources, build deps should be installed."""
s = spack.spec.Spec("dtrun3").concretized()
- create_installer([(s, {})]).install()
+ create_installer([s]).install()
# Verify there is a pure build dep
edge = s.edges_to_dependencies(name="dtbuild3").pop()
@@ -1401,7 +1301,7 @@ def test_overwrite_install_does_install_build_deps(install_mockery, mock_fetch):
build_dep.package.do_uninstall()
# Overwrite install the root dtrun3
- create_installer([(s, {"overwrite": [s.dag_hash()]})]).install()
+ create_installer([s], {"overwrite": [s.dag_hash()]}).install()
# Verify that the build dep was also installed.
assert build_dep.installed
diff --git a/lib/spack/spack/test/link_paths.py b/lib/spack/spack/test/link_paths.py
index 2d62c59de6..145203c1ad 100644
--- a/lib/spack/spack/test/link_paths.py
+++ b/lib/spack/spack/test/link_paths.py
@@ -69,17 +69,6 @@ def test_icc16_link_paths():
)
-def test_pgi_link_paths():
- check_link_paths(
- "pgcc-16.3.txt",
- [
- os.path.join(
- root, "usr", "tce", "packages", "pgi", "pgi-16.3", "linux86-64", "16.3", "lib"
- )
- ],
- )
-
-
def test_gcc7_link_paths():
check_link_paths("gcc-7.3.1.txt", [])
diff --git a/lib/spack/spack/test/llnl/url.py b/lib/spack/spack/test/llnl/url.py
index 1afee9c05c..ffe344fee2 100644
--- a/lib/spack/spack/test/llnl/url.py
+++ b/lib/spack/spack/test/llnl/url.py
@@ -84,14 +84,15 @@ def test_get_bad_extension():
("astyle_1.23_macosx", "astyle_1.23"),
("haxe-2.08-osx", "haxe-2.08"),
# PyPI - wheel
- ("entrypoints-0.2.2-py2.py3-none-any.whl", "entrypoints-0.2.2"),
+ ("wheel-1.2.3-py3-none-any", "wheel-1.2.3"),
+ ("wheel-1.2.3-py2.py3-none-any", "wheel-1.2.3"),
+ ("wheel-1.2.3-cp38-abi3-macosx_10_12_x86_64", "wheel-1.2.3"),
+ ("entrypoints-0.2.2-py2.py3-none-any", "entrypoints-0.2.2"),
(
"numpy-1.12.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel."
- "macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl",
+ "macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64",
"numpy-1.12.0",
),
- # PyPI - exe
- ("PyYAML-3.12.win-amd64-py3.5.exe", "PyYAML-3.12"),
# Combinations of multiple patterns - bin, release
("rocketmq-all-4.5.2-bin-release", "rocketmq-all-4.5.2"),
# Combinations of multiple patterns - all
@@ -148,6 +149,8 @@ def test_strip_compression_extension(archive_and_expected):
assert stripped == "Foo.zip"
stripped = llnl.url.strip_compression_extension(archive, "zip")
assert stripped == "Foo"
+ elif extension == "whl":
+ assert stripped == "Foo.whl"
elif (
extension.lower() == "tar"
or extension in llnl.url.CONTRACTION_MAP
diff --git a/lib/spack/spack/test/llnl/util/file_list.py b/lib/spack/spack/test/llnl/util/file_list.py
index 75ba3ae89d..e2ff5a8210 100644
--- a/lib/spack/spack/test/llnl/util/file_list.py
+++ b/lib/spack/spack/test/llnl/util/file_list.py
@@ -9,7 +9,7 @@ import sys
import pytest
-from llnl.util.filesystem import HeaderList, LibraryList, find, find_headers, find_libraries
+from llnl.util.filesystem import HeaderList, LibraryList, find_headers, find_libraries
import spack.paths
@@ -324,33 +324,3 @@ def test_searching_order(search_fn, search_list, root, kwargs):
# List should be empty here
assert len(rlist) == 0
-
-
-@pytest.mark.parametrize(
- "root,search_list,kwargs,expected",
- [
- (
- search_dir,
- "*/*bar.tx?",
- {"recursive": False},
- [
- os.path.join(search_dir, os.path.join("a", "foobar.txt")),
- os.path.join(search_dir, os.path.join("b", "bar.txp")),
- os.path.join(search_dir, os.path.join("c", "bar.txt")),
- ],
- ),
- (
- search_dir,
- "*/*bar.tx?",
- {"recursive": True},
- [
- os.path.join(search_dir, os.path.join("a", "foobar.txt")),
- os.path.join(search_dir, os.path.join("b", "bar.txp")),
- os.path.join(search_dir, os.path.join("c", "bar.txt")),
- ],
- ),
- ],
-)
-def test_find_with_globbing(root, search_list, kwargs, expected):
- matches = find(root, search_list, **kwargs)
- assert sorted(matches) == sorted(expected)
diff --git a/lib/spack/spack/test/llnl/util/filesystem.py b/lib/spack/spack/test/llnl/util/filesystem.py
index e9c8b758d9..8b512a2c5f 100644
--- a/lib/spack/spack/test/llnl/util/filesystem.py
+++ b/lib/spack/spack/test/llnl/util/filesystem.py
@@ -6,15 +6,17 @@
"""Tests for ``llnl/util/filesystem.py``"""
import filecmp
import os
+import pathlib
import shutil
import stat
import sys
+from contextlib import contextmanager
import pytest
import llnl.util.filesystem as fs
import llnl.util.symlink
-from llnl.util.symlink import SymlinkError, _windows_can_symlink, islink, symlink
+from llnl.util.symlink import _windows_can_symlink, islink, readlink, symlink
import spack.paths
@@ -181,7 +183,7 @@ class TestCopyTree:
assert os.path.exists("dest/a/b2")
with fs.working_dir("dest/a"):
- assert os.path.exists(os.readlink("b2"))
+ assert os.path.exists(readlink("b2"))
assert os.path.realpath("dest/f/2") == os.path.abspath("dest/a/b/2")
assert os.path.realpath("dest/2") == os.path.abspath("dest/1")
@@ -274,14 +276,14 @@ class TestInstallTree:
assert not os.path.islink("dest/2")
check_added_exe_permissions("source/2", "dest/2")
- @pytest.mark.skipif(sys.platform == "win32", reason="Broken symlinks not allowed on Windows")
+ @pytest.mark.not_on_windows("Broken symlinks not allowed on Windows")
def test_allow_broken_symlinks(self, stage):
"""Test installing with a broken symlink."""
with fs.working_dir(str(stage)):
- symlink("nonexistant.txt", "source/broken", allow_broken_symlinks=True)
- fs.install_tree("source", "dest", symlinks=True, allow_broken_symlinks=True)
+ symlink("nonexistant.txt", "source/broken")
+ fs.install_tree("source", "dest", symlinks=True)
assert os.path.islink("dest/broken")
- assert not os.path.exists(os.readlink("dest/broken"))
+ assert not os.path.exists(readlink("dest/broken"))
def test_glob_src(self, stage):
"""Test using a glob as the source."""
@@ -754,93 +756,6 @@ def test_is_nonsymlink_exe_with_shebang(tmpdir):
assert not fs.is_nonsymlink_exe_with_shebang("symlink_to_executable_script")
-@pytest.mark.skipif(sys.platform == "win32", reason="Unix-only test.")
-def test_lexists_islink_isdir(tmpdir):
- root = str(tmpdir)
-
- # Create a directory and a file, an a bunch of symlinks.
- dir = os.path.join(root, "dir")
- file = os.path.join(root, "file")
- nonexistent = os.path.join(root, "does_not_exist")
- symlink_to_dir = os.path.join(root, "symlink_to_dir")
- symlink_to_file = os.path.join(root, "symlink_to_file")
- dangling_symlink = os.path.join(root, "dangling_symlink")
- symlink_to_dangling_symlink = os.path.join(root, "symlink_to_dangling_symlink")
- symlink_to_symlink_to_dir = os.path.join(root, "symlink_to_symlink_to_dir")
- symlink_to_symlink_to_file = os.path.join(root, "symlink_to_symlink_to_file")
-
- os.mkdir(dir)
- with open(file, "wb") as f:
- f.write(b"file")
-
- symlink("dir", symlink_to_dir)
- symlink("file", symlink_to_file)
- symlink("does_not_exist", dangling_symlink)
- symlink("dangling_symlink", symlink_to_dangling_symlink)
- symlink("symlink_to_dir", symlink_to_symlink_to_dir)
- symlink("symlink_to_file", symlink_to_symlink_to_file)
-
- assert fs.lexists_islink_isdir(dir) == (True, False, True)
- assert fs.lexists_islink_isdir(file) == (True, False, False)
- assert fs.lexists_islink_isdir(nonexistent) == (False, False, False)
- assert fs.lexists_islink_isdir(symlink_to_dir) == (True, True, True)
- assert fs.lexists_islink_isdir(symlink_to_file) == (True, True, False)
- assert fs.lexists_islink_isdir(symlink_to_dangling_symlink) == (True, True, False)
- assert fs.lexists_islink_isdir(symlink_to_symlink_to_dir) == (True, True, True)
- assert fs.lexists_islink_isdir(symlink_to_symlink_to_file) == (True, True, False)
-
-
-@pytest.mark.skipif(sys.platform != "win32", reason="For Windows Only")
-@pytest.mark.parametrize("win_can_symlink", [True, False])
-def test_lexists_islink_isdir_windows(tmpdir, monkeypatch, win_can_symlink):
- """Run on windows without elevated privileges to test junctions and hard links which have
- different results from the lexists_islink_isdir method.
- """
- if win_can_symlink and not _windows_can_symlink():
- pytest.skip("Cannot test dev mode behavior without dev mode enabled.")
- with tmpdir.as_cwd():
- monkeypatch.setattr(llnl.util.symlink, "_windows_can_symlink", lambda: win_can_symlink)
- dir = str(tmpdir.join("dir"))
- file = str(tmpdir.join("file"))
- nonexistent = str(tmpdir.join("does_not_exist"))
- symlink_to_dir = str(tmpdir.join("symlink_to_dir"))
- symlink_to_file = str(tmpdir.join("symlink_to_file"))
- dangling_symlink = str(tmpdir.join("dangling_symlink"))
- symlink_to_dangling_symlink = str(tmpdir.join("symlink_to_dangling_symlink"))
- symlink_to_symlink_to_dir = str(tmpdir.join("symlink_to_symlink_to_dir"))
- symlink_to_symlink_to_file = str(tmpdir.join("symlink_to_symlink_to_file"))
-
- os.mkdir(dir)
- assert fs.lexists_islink_isdir(dir) == (True, False, True)
-
- symlink("dir", symlink_to_dir)
- assert fs.lexists_islink_isdir(dir) == (True, False, True)
- assert fs.lexists_islink_isdir(symlink_to_dir) == (True, True, True)
-
- with open(file, "wb") as f:
- f.write(b"file")
- assert fs.lexists_islink_isdir(file) == (True, False, False)
-
- symlink("file", symlink_to_file)
- if win_can_symlink:
- assert fs.lexists_islink_isdir(file) == (True, False, False)
- else:
- assert fs.lexists_islink_isdir(file) == (True, True, False)
- assert fs.lexists_islink_isdir(symlink_to_file) == (True, True, False)
-
- with pytest.raises(SymlinkError):
- symlink("does_not_exist", dangling_symlink)
- symlink("dangling_symlink", symlink_to_dangling_symlink)
-
- symlink("symlink_to_dir", symlink_to_symlink_to_dir)
- symlink("symlink_to_file", symlink_to_symlink_to_file)
-
- assert fs.lexists_islink_isdir(nonexistent) == (False, False, False)
- assert fs.lexists_islink_isdir(symlink_to_dangling_symlink) == (False, False, False)
- assert fs.lexists_islink_isdir(symlink_to_symlink_to_dir) == (True, True, True)
- assert fs.lexists_islink_isdir(symlink_to_symlink_to_file) == (True, True, False)
-
-
class RegisterVisitor(fs.BaseDirectoryVisitor):
"""A directory visitor that keeps track of all visited paths"""
@@ -996,3 +911,352 @@ def test_find_first_file(tmpdir, bfs_depth):
# Should find first dir
assert os.path.samefile(fs.find_first(root, "a", bfs_depth=bfs_depth), os.path.join(root, "a"))
+
+
+def test_rename_dest_exists(tmpdir):
+ @contextmanager
+ def setup_test_files():
+ a = tmpdir.join("a", "file1")
+ b = tmpdir.join("a", "file2")
+ fs.touchp(a)
+ fs.touchp(b)
+ with open(a, "w") as oa, open(b, "w") as ob:
+ oa.write("I am A")
+ ob.write("I am B")
+ yield a, b
+ shutil.rmtree(tmpdir.join("a"))
+
+ @contextmanager
+ def setup_test_dirs():
+ a = tmpdir.join("d", "a")
+ b = tmpdir.join("d", "b")
+ fs.mkdirp(a)
+ fs.mkdirp(b)
+ yield a, b
+ shutil.rmtree(tmpdir.join("d"))
+
+ # test standard behavior of rename
+ # smoke test
+ with setup_test_files() as files:
+ a, b = files
+ fs.rename(str(a), str(b))
+ assert os.path.exists(b)
+ assert not os.path.exists(a)
+ with open(b, "r") as ob:
+ content = ob.read()
+ assert content == "I am A"
+
+ # test relatitve paths
+ # another sanity check/smoke test
+ with setup_test_files() as files:
+ a, b = files
+ with fs.working_dir(str(tmpdir)):
+ fs.rename(os.path.join("a", "file1"), os.path.join("a", "file2"))
+ assert os.path.exists(b)
+ assert not os.path.exists(a)
+ with open(b, "r") as ob:
+ content = ob.read()
+ assert content == "I am A"
+
+ # Test rename symlinks to same file
+ c = tmpdir.join("a", "file1")
+ a = tmpdir.join("a", "link1")
+ b = tmpdir.join("a", "link2")
+ fs.touchp(c)
+ symlink(c, a)
+ symlink(c, b)
+ fs.rename(str(a), str(b))
+ assert os.path.exists(b)
+ assert not os.path.exists(a)
+ assert os.path.realpath(b) == c
+ shutil.rmtree(tmpdir.join("a"))
+
+ # test rename onto itself
+ a = tmpdir.join("a", "file1")
+ b = a
+ fs.touchp(a)
+ with open(a, "w") as oa:
+ oa.write("I am A")
+ fs.rename(str(a), str(b))
+ # check a, or b, doesn't matter, same file
+ assert os.path.exists(a)
+ # ensure original file was not duplicated
+ assert len(os.listdir(tmpdir.join("a"))) == 1
+ with open(a, "r") as oa:
+ assert oa.read()
+ shutil.rmtree(tmpdir.join("a"))
+
+ # test rename onto symlink
+ # to directory from symlink to directory
+ # (this is something spack does when regenerating views)
+ with setup_test_dirs() as dirs:
+ a, b = dirs
+ link1 = tmpdir.join("f", "link1")
+ link2 = tmpdir.join("f", "link2")
+ fs.mkdirp(tmpdir.join("f"))
+ symlink(a, link1)
+ symlink(b, link2)
+ fs.rename(str(link1), str(link2))
+ assert os.path.exists(link2)
+ assert os.path.realpath(link2) == a
+ shutil.rmtree(tmpdir.join("f"))
+
+
+@pytest.mark.only_windows("Test is for Windows specific behavior")
+def test_windows_sfn(tmpdir):
+ # first check some standard Windows locations
+ # we know require sfn names
+ # this is basically a smoke test
+ # ensure spaces are replaced + path abbreviated
+ assert fs.windows_sfn("C:\\Program Files (x86)") == "C:\\PROGRA~2"
+ # ensure path without spaces is still properly shortened
+ assert fs.windows_sfn("C:\\ProgramData") == "C:\\PROGRA~3"
+
+ # test user created paths
+ # ensure longer path with spaces is properly abbreviated
+ a = tmpdir.join("d", "this is a test", "a", "still test")
+ # ensure longer path is properly abbreviated
+ b = tmpdir.join("d", "long_path_with_no_spaces", "more_long_path")
+ # ensure path not in need of abbreviation is properly roundtripped
+ c = tmpdir.join("d", "this", "is", "short")
+ # ensure paths that are the same in the first six letters
+ # are incremented post tilde
+ d = tmpdir.join("d", "longerpath1")
+ e = tmpdir.join("d", "longerpath2")
+ fs.mkdirp(a)
+ fs.mkdirp(b)
+ fs.mkdirp(c)
+ fs.mkdirp(d)
+ fs.mkdirp(e)
+ # check only for path of path we can control,
+ # pytest prefix may or may not be mangled by windows_sfn
+ # based on user/pytest config
+ assert "d\\THISIS~1\\a\\STILLT~1" in fs.windows_sfn(a)
+ assert "d\\LONG_P~1\\MORE_L~1" in fs.windows_sfn(b)
+ assert "d\\this\\is\\short" in fs.windows_sfn(c)
+ assert "d\\LONGER~1" in fs.windows_sfn(d)
+ assert "d\\LONGER~2" in fs.windows_sfn(e)
+ shutil.rmtree(tmpdir.join("d"))
+
+
+@pytest.fixture
+def dir_structure_with_things_to_find(tmpdir):
+ """
+ <root>/
+ dir_one/
+ file_one
+ dir_two/
+ dir_three/
+ dir_four/
+ file_two
+ file_three
+ file_four
+ """
+ dir_one = tmpdir.join("dir_one").ensure(dir=True)
+ tmpdir.join("dir_two").ensure(dir=True)
+ dir_three = tmpdir.join("dir_three").ensure(dir=True)
+ dir_four = dir_three.join("dir_four").ensure(dir=True)
+
+ locations = {}
+ locations["file_one"] = str(dir_one.join("file_one").ensure())
+ locations["file_two"] = str(dir_four.join("file_two").ensure())
+ locations["file_three"] = str(dir_three.join("file_three").ensure())
+ locations["file_four"] = str(tmpdir.join("file_four").ensure())
+
+ return str(tmpdir), locations
+
+
+def test_find_path_glob_matches(dir_structure_with_things_to_find):
+ root, locations = dir_structure_with_things_to_find
+ # both file name and path match
+ assert (
+ fs.find(root, "file_two")
+ == fs.find(root, "*/*/file_two")
+ == fs.find(root, "dir_t*/*/*two")
+ == [locations["file_two"]]
+ )
+ # ensure that * does not match directory separators
+ assert fs.find(root, "dir*file_two") == []
+ # ensure that file name matches after / are matched from the start of the file name
+ assert fs.find(root, "*/ile_two") == []
+ # file name matches exist, but not with these paths
+ assert fs.find(root, "dir_one/*/*two") == fs.find(root, "*/*/*/*/file_two") == []
+
+
+def test_find_max_depth(dir_structure_with_things_to_find):
+ root, locations = dir_structure_with_things_to_find
+
+ # Make sure the paths we use to verify are absolute
+ assert os.path.isabs(locations["file_one"])
+
+ assert set(fs.find(root, "file_*", max_depth=0)) == {locations["file_four"]}
+ assert set(fs.find(root, "file_*", max_depth=1)) == {
+ locations["file_one"],
+ locations["file_three"],
+ locations["file_four"],
+ }
+ assert set(fs.find(root, "file_two", max_depth=2)) == {locations["file_two"]}
+ assert not set(fs.find(root, "file_two", max_depth=1))
+ assert set(fs.find(root, "file_two")) == {locations["file_two"]}
+ assert set(fs.find(root, "file_*")) == set(locations.values())
+
+
+def test_find_max_depth_relative(dir_structure_with_things_to_find):
+ """find_max_depth should return absolute paths even if the provided path is relative."""
+ root, locations = dir_structure_with_things_to_find
+ with fs.working_dir(root):
+ assert set(fs.find(".", "file_*", max_depth=0)) == {locations["file_four"]}
+ assert set(fs.find(".", "file_two", max_depth=2)) == {locations["file_two"]}
+
+
+@pytest.mark.parametrize("recursive,max_depth", [(False, -1), (False, 1)])
+def test_max_depth_and_recursive_errors(tmpdir, recursive, max_depth):
+ root = str(tmpdir)
+ error_str = "cannot be set if recursive is False"
+ with pytest.raises(ValueError, match=error_str):
+ fs.find(root, ["some_file"], recursive=recursive, max_depth=max_depth)
+
+ with pytest.raises(ValueError, match=error_str):
+ fs.find_libraries(["some_lib"], root, recursive=recursive, max_depth=max_depth)
+
+
+@pytest.fixture(params=[True, False])
+def complex_dir_structure(request, tmpdir):
+ """
+ "lx-dy" means "level x, directory y"
+ "lx-fy" means "level x, file y"
+ "lx-sy" means "level x, symlink y"
+
+ <root>/
+ l1-d1/
+ l2-d1/
+ l3-d2/
+ l4-f1
+ l3-d4/
+ l4-f2
+ l3-s1 -> l1-d2 # points to directory above l2-d1
+ l3-s3 -> l1-d1 # cyclic link
+ l1-d2/
+ l2-d2/
+ l3-f3
+ l2-f1
+ l2-s3 -> l2-d2
+ l1-s3 -> l3-d4 # a link that "skips" a directory level
+ l1-s4 -> l2-s3 # a link to a link to a dir
+ """
+ use_junctions = request.param
+ if sys.platform == "win32" and not use_junctions and not _windows_can_symlink():
+ pytest.skip("This Windows instance is not configured with symlink support")
+ elif sys.platform != "win32" and use_junctions:
+ pytest.skip("Junctions are a Windows-only feature")
+
+ l1_d1 = tmpdir.join("l1-d1").ensure(dir=True)
+ l2_d1 = l1_d1.join("l2-d1").ensure(dir=True)
+ l3_d2 = l2_d1.join("l3-d2").ensure(dir=True)
+ l3_d4 = l2_d1.join("l3-d4").ensure(dir=True)
+ l1_d2 = tmpdir.join("l1-d2").ensure(dir=True)
+ l2_d2 = l1_d2.join("l2-d2").ensure(dir=True)
+
+ if use_junctions:
+ link_fn = llnl.util.symlink._windows_create_junction
+ else:
+ link_fn = os.symlink
+
+ link_fn(l1_d2, pathlib.Path(l2_d1) / "l3-s1")
+ link_fn(l1_d1, pathlib.Path(l2_d1) / "l3-s3")
+ link_fn(l3_d4, pathlib.Path(tmpdir) / "l1-s3")
+ l2_s3 = pathlib.Path(l1_d2) / "l2-s3"
+ link_fn(l2_d2, l2_s3)
+ link_fn(l2_s3, pathlib.Path(tmpdir) / "l1-s4")
+
+ locations = {
+ "l4-f1": str(l3_d2.join("l4-f1").ensure()),
+ "l4-f2-full": str(l3_d4.join("l4-f2").ensure()),
+ "l4-f2-link": str(pathlib.Path(tmpdir) / "l1-s3" / "l4-f2"),
+ "l2-f1": str(l1_d2.join("l2-f1").ensure()),
+ "l2-f1-link": str(pathlib.Path(tmpdir) / "l1-d1" / "l2-d1" / "l3-s1" / "l2-f1"),
+ "l3-f3-full": str(l2_d2.join("l3-f3").ensure()),
+ "l3-f3-link-l1": str(pathlib.Path(tmpdir) / "l1-s4" / "l3-f3"),
+ }
+
+ return str(tmpdir), locations
+
+
+def test_find_max_depth_symlinks(complex_dir_structure):
+ root, locations = complex_dir_structure
+ root = pathlib.Path(root)
+ assert set(fs.find(root, "l4-f1")) == {locations["l4-f1"]}
+ assert set(fs.find(root / "l1-s3", "l4-f2", max_depth=0)) == {locations["l4-f2-link"]}
+ assert set(fs.find(root / "l1-d1", "l2-f1")) == {locations["l2-f1-link"]}
+ # File is accessible via symlink and subdir, the link path will be
+ # searched first, and the directory will not be searched again when
+ # it is encountered the second time (via not-link) in the traversal
+ assert set(fs.find(root, "l4-f2")) == {locations["l4-f2-link"]}
+ # File is accessible only via the dir, so the full file path should
+ # be reported
+ assert set(fs.find(root / "l1-d1", "l4-f2")) == {locations["l4-f2-full"]}
+ # Check following links to links
+ assert set(fs.find(root, "l3-f3")) == {locations["l3-f3-link-l1"]}
+
+
+def test_find_max_depth_multiple_and_repeated_entry_points(complex_dir_structure):
+ root, locations = complex_dir_structure
+
+ fst = str(pathlib.Path(root) / "l1-d1" / "l2-d1")
+ snd = str(pathlib.Path(root) / "l1-d2")
+ nonexistent = str(pathlib.Path(root) / "nonexistent")
+
+ assert set(fs.find([fst, snd, fst, snd, nonexistent], ["l*-f*"], max_depth=1)) == {
+ locations["l2-f1"],
+ locations["l4-f1"],
+ locations["l4-f2-full"],
+ locations["l3-f3-full"],
+ }
+
+
+def test_multiple_patterns(complex_dir_structure):
+ root, _ = complex_dir_structure
+ paths = fs.find(root, ["l2-f1", "l*-d*/l3-f3", "*-f*", "*/*-f*"])
+ # There shouldn't be duplicate results with multiple, overlapping patterns
+ assert len(set(paths)) == len(paths)
+ # All files should be found
+ filenames = [os.path.basename(p) for p in paths]
+ assert set(filenames) == {"l2-f1", "l3-f3", "l4-f1", "l4-f2"}
+ # They are ordered by first matching pattern (this is a bit of an implementation detail,
+ # and we could decide to change the exact order in the future)
+ assert filenames[0] == "l2-f1"
+ assert filenames[1] == "l3-f3"
+
+
+def test_find_input_types(tmp_path: pathlib.Path):
+ """test that find only accepts sequences and instances of pathlib.Path and str for root, and
+ only sequences and instances of str for patterns. In principle mypy catches these issues, but
+ it is not enabled on all call-sites."""
+ (tmp_path / "file.txt").write_text("")
+ assert (
+ fs.find(tmp_path, "file.txt")
+ == fs.find(str(tmp_path), "file.txt")
+ == fs.find([tmp_path, str(tmp_path)], "file.txt")
+ == fs.find((tmp_path, str(tmp_path)), "file.txt")
+ == fs.find(tmp_path, "file.txt")
+ == fs.find(tmp_path, ["file.txt"])
+ == fs.find(tmp_path, ("file.txt",))
+ == [str(tmp_path / "file.txt")]
+ )
+
+ with pytest.raises(TypeError):
+ fs.find(tmp_path, pathlib.Path("file.txt")) # type: ignore
+
+ with pytest.raises(TypeError):
+ fs.find(1, "file.txt") # type: ignore
+
+
+def test_edit_in_place_through_temporary_file(tmp_path):
+ (tmp_path / "example.txt").write_text("Hello")
+ current_ino = os.stat(tmp_path / "example.txt").st_ino
+ with fs.edit_in_place_through_temporary_file(tmp_path / "example.txt") as temporary:
+ os.unlink(temporary)
+ with open(temporary, "w") as f:
+ f.write("World")
+ assert (tmp_path / "example.txt").read_text() == "World"
+ assert os.stat(tmp_path / "example.txt").st_ino == current_ino
diff --git a/lib/spack/spack/test/llnl/util/lang.py b/lib/spack/spack/test/llnl/util/lang.py
index abf2c5b134..6926c50cd8 100644
--- a/lib/spack/spack/test/llnl/util/lang.py
+++ b/lib/spack/spack/test/llnl/util/lang.py
@@ -336,3 +336,56 @@ def test_grouped_exception_base_type():
message = h.grouped_message(with_tracebacks=False)
assert "catch-runtime-error" in message
assert "catch-value-error" not in message
+
+
+def test_class_level_constant_value():
+ """Tests that the Const descriptor does not allow overwriting the value from an instance"""
+
+ class _SomeClass:
+ CONST_VALUE = llnl.util.lang.Const(10)
+
+ with pytest.raises(TypeError, match="not support assignment"):
+ _SomeClass().CONST_VALUE = 11
+
+
+def test_deprecated_property():
+ """Tests the behavior of the DeprecatedProperty descriptor, which is can be used when
+ deprecating an attribute.
+ """
+
+ class _Deprecated(llnl.util.lang.DeprecatedProperty):
+ def factory(self, instance, owner):
+ return 46
+
+ class _SomeClass:
+ deprecated = _Deprecated("deprecated")
+
+ # Default behavior is to just return the deprecated value
+ s = _SomeClass()
+ assert s.deprecated == 46
+
+ # When setting error_level to 1 the attribute warns
+ _SomeClass.deprecated.error_lvl = 1
+ with pytest.warns(UserWarning):
+ assert s.deprecated == 46
+
+ # When setting error_level to 2 an exception is raised
+ _SomeClass.deprecated.error_lvl = 2
+ with pytest.raises(AttributeError):
+ _ = s.deprecated
+
+
+def test_fnmatch_multiple():
+ named_patterns = {"a": "libf*o.so", "b": "libb*r.so"}
+ regex = re.compile(llnl.util.lang.fnmatch_translate_multiple(named_patterns))
+
+ a = regex.match("libfoo.so")
+ assert a and a.group("a") == "libfoo.so"
+
+ b = regex.match("libbar.so")
+ assert b and b.group("b") == "libbar.so"
+
+ assert not regex.match("libfoo.so.1")
+ assert not regex.match("libbar.so.1")
+ assert not regex.match("libfoo.solibbar.so")
+ assert not regex.match("libbaz.so")
diff --git a/lib/spack/spack/test/llnl/util/link_tree.py b/lib/spack/spack/test/llnl/util/link_tree.py
index febad1d773..1d57922be2 100644
--- a/lib/spack/spack/test/llnl/util/link_tree.py
+++ b/lib/spack/spack/test/llnl/util/link_tree.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import pathlib
import sys
import pytest
@@ -339,3 +340,60 @@ def test_destination_merge_visitor_file_dir_clashes(tmpdir):
visit_directory_tree(str(tmpdir.join("a")), DestinationMergeVisitor(b_to_a))
assert b_to_a.fatal_conflicts
assert b_to_a.fatal_conflicts[0].dst == "example"
+
+
+def test_source_merge_visitor_does_not_register_identical_file_conflicts(tmp_path: pathlib.Path):
+ """Tests whether the SourceMergeVisitor does not register identical file conflicts.
+ but instead registers the file that triggers the potential conflict."""
+ (tmp_path / "dir_bottom").mkdir()
+ (tmp_path / "dir_bottom" / "file").write_bytes(b"hello")
+
+ (tmp_path / "dir_top").mkdir()
+ (tmp_path / "dir_top" / "file").symlink_to(tmp_path / "dir_bottom" / "file")
+ (tmp_path / "dir_top" / "zzzz").write_bytes(b"hello")
+
+ visitor = SourceMergeVisitor()
+ visitor.set_projection(str(tmp_path / "view"))
+
+ visit_directory_tree(str(tmp_path / "dir_top"), visitor)
+
+ # After visiting the top dir, we should have `file` and `zzzz` listed, in that order. Using
+ # .items() to test order.
+ assert list(visitor.files.items()) == [
+ (str(tmp_path / "view" / "file"), (str(tmp_path / "dir_top"), "file")),
+ (str(tmp_path / "view" / "zzzz"), (str(tmp_path / "dir_top"), "zzzz")),
+ ]
+
+ # Then after visiting the bottom dir, the "conflict" should be resolved, and `file` should
+ # come from the bottom dir.
+ visit_directory_tree(str(tmp_path / "dir_bottom"), visitor)
+ assert not visitor.file_conflicts
+ assert list(visitor.files.items()) == [
+ (str(tmp_path / "view" / "zzzz"), (str(tmp_path / "dir_top"), "zzzz")),
+ (str(tmp_path / "view" / "file"), (str(tmp_path / "dir_bottom"), "file")),
+ ]
+
+
+def test_source_merge_visitor_does_deals_with_dangling_symlinks(tmp_path: pathlib.Path):
+ """When a file and a dangling symlink conflict, this should be handled like a file conflict."""
+ (tmp_path / "dir_a").mkdir()
+ os.symlink("non-existent", str(tmp_path / "dir_a" / "file"))
+
+ (tmp_path / "dir_b").mkdir()
+ (tmp_path / "dir_b" / "file").write_bytes(b"data")
+
+ visitor = SourceMergeVisitor()
+ visitor.set_projection(str(tmp_path / "view"))
+
+ visit_directory_tree(str(tmp_path / "dir_a"), visitor)
+ visit_directory_tree(str(tmp_path / "dir_b"), visitor)
+
+ # Check that a conflict was registered.
+ assert len(visitor.file_conflicts) == 1
+ conflict = visitor.file_conflicts[0]
+ assert conflict.src_a == str(tmp_path / "dir_a" / "file")
+ assert conflict.src_b == str(tmp_path / "dir_b" / "file")
+ assert conflict.dst == str(tmp_path / "view" / "file")
+
+ # The first file encountered should be listed.
+ assert visitor.files == {str(tmp_path / "view" / "file"): (str(tmp_path / "dir_a"), "file")}
diff --git a/lib/spack/spack/test/llnl/util/symlink.py b/lib/spack/spack/test/llnl/util/symlink.py
index 6e34c97fc4..f4c1f16816 100644
--- a/lib/spack/spack/test/llnl/util/symlink.py
+++ b/lib/spack/spack/test/llnl/util/symlink.py
@@ -5,7 +5,6 @@
"""Tests for ``llnl/util/symlink.py``"""
import os
-import sys
import tempfile
import pytest
@@ -20,7 +19,7 @@ def test_symlink_file(tmpdir):
fd, real_file = tempfile.mkstemp(prefix="real", suffix=".txt", dir=test_dir)
link_file = str(tmpdir.join("link.txt"))
assert os.path.exists(link_file) is False
- symlink.symlink(source_path=real_file, link_path=link_file)
+ symlink.symlink(real_file, link_file)
assert os.path.exists(link_file)
assert symlink.islink(link_file)
@@ -32,11 +31,12 @@ def test_symlink_dir(tmpdir):
real_dir = os.path.join(test_dir, "real_dir")
link_dir = os.path.join(test_dir, "link_dir")
os.mkdir(real_dir)
- symlink.symlink(source_path=real_dir, link_path=link_dir)
+ symlink.symlink(real_dir, link_dir)
assert os.path.exists(link_dir)
assert symlink.islink(link_dir)
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_symlink_source_not_exists(tmpdir):
"""Test the symlink.symlink method for the case where a source path does not exist"""
with tmpdir.as_cwd():
@@ -44,7 +44,7 @@ def test_symlink_source_not_exists(tmpdir):
real_dir = os.path.join(test_dir, "real_dir")
link_dir = os.path.join(test_dir, "link_dir")
with pytest.raises(symlink.SymlinkError):
- symlink.symlink(source_path=real_dir, link_path=link_dir, allow_broken_symlinks=False)
+ symlink._windows_symlink(real_dir, link_dir)
def test_symlink_src_relative_to_link(tmpdir):
@@ -61,18 +61,16 @@ def test_symlink_src_relative_to_link(tmpdir):
fd, real_file = tempfile.mkstemp(prefix="real", suffix=".txt", dir=subdir_2)
link_file = os.path.join(subdir_1, "link.txt")
- symlink.symlink(
- source_path=f"b/{os.path.basename(real_file)}",
- link_path=f"a/{os.path.basename(link_file)}",
- )
+ symlink.symlink(f"b/{os.path.basename(real_file)}", f"a/{os.path.basename(link_file)}")
assert os.path.exists(link_file)
assert symlink.islink(link_file)
# Check dirs
assert not os.path.lexists(link_dir)
- symlink.symlink(source_path="b", link_path="a/c")
+ symlink.symlink("b", "a/c")
assert os.path.lexists(link_dir)
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_symlink_src_not_relative_to_link(tmpdir):
"""Test the symlink.symlink functionality where the source value does not exist relative to
the link and not relative to the cwd. NOTE that this symlink api call is EXPECTED to raise
@@ -88,19 +86,18 @@ def test_symlink_src_not_relative_to_link(tmpdir):
link_file = str(tmpdir.join("link.txt"))
# Expected SymlinkError because source path does not exist relative to link path
with pytest.raises(symlink.SymlinkError):
- symlink.symlink(
- source_path=f"d/{os.path.basename(real_file)}",
- link_path=f"a/{os.path.basename(link_file)}",
- allow_broken_symlinks=False,
+ symlink._windows_symlink(
+ f"d/{os.path.basename(real_file)}", f"a/{os.path.basename(link_file)}"
)
assert not os.path.exists(link_file)
# Check dirs
assert not os.path.lexists(link_dir)
with pytest.raises(symlink.SymlinkError):
- symlink.symlink(source_path="d", link_path="a/c", allow_broken_symlinks=False)
+ symlink._windows_symlink("d", "a/c")
assert not os.path.lexists(link_dir)
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_symlink_link_already_exists(tmpdir):
"""Test the symlink.symlink method for the case where a link already exists"""
with tmpdir.as_cwd():
@@ -108,21 +105,21 @@ def test_symlink_link_already_exists(tmpdir):
real_dir = os.path.join(test_dir, "real_dir")
link_dir = os.path.join(test_dir, "link_dir")
os.mkdir(real_dir)
- symlink.symlink(real_dir, link_dir, allow_broken_symlinks=False)
+ symlink._windows_symlink(real_dir, link_dir)
assert os.path.exists(link_dir)
with pytest.raises(symlink.SymlinkError):
- symlink.symlink(source_path=real_dir, link_path=link_dir, allow_broken_symlinks=False)
+ symlink._windows_symlink(real_dir, link_dir)
@pytest.mark.skipif(not symlink._windows_can_symlink(), reason="Test requires elevated privileges")
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_symlink_win_file(tmpdir):
"""Check that symlink.symlink makes a symlink file when run with elevated permissions"""
with tmpdir.as_cwd():
test_dir = str(tmpdir)
fd, real_file = tempfile.mkstemp(prefix="real", suffix=".txt", dir=test_dir)
link_file = str(tmpdir.join("link.txt"))
- symlink.symlink(source_path=real_file, link_path=link_file)
+ symlink.symlink(real_file, link_file)
# Verify that all expected conditions are met
assert os.path.exists(link_file)
assert symlink.islink(link_file)
@@ -132,7 +129,7 @@ def test_symlink_win_file(tmpdir):
@pytest.mark.skipif(not symlink._windows_can_symlink(), reason="Test requires elevated privileges")
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_symlink_win_dir(tmpdir):
"""Check that symlink.symlink makes a symlink dir when run with elevated permissions"""
with tmpdir.as_cwd():
@@ -140,7 +137,7 @@ def test_symlink_win_dir(tmpdir):
real_dir = os.path.join(test_dir, "real")
link_dir = os.path.join(test_dir, "link")
os.mkdir(real_dir)
- symlink.symlink(source_path=real_dir, link_path=link_dir)
+ symlink.symlink(real_dir, link_dir)
# Verify that all expected conditions are met
assert os.path.exists(link_dir)
assert symlink.islink(link_dir)
@@ -149,7 +146,7 @@ def test_symlink_win_dir(tmpdir):
assert not symlink._windows_is_junction(link_dir)
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_windows_create_junction(tmpdir):
"""Test the symlink._windows_create_junction method"""
with tmpdir.as_cwd():
@@ -165,7 +162,7 @@ def test_windows_create_junction(tmpdir):
assert not os.path.islink(junction_link_dir)
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_windows_create_hard_link(tmpdir):
"""Test the symlink._windows_create_hard_link method"""
with tmpdir.as_cwd():
@@ -181,7 +178,7 @@ def test_windows_create_hard_link(tmpdir):
assert not os.path.islink(link_file)
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_windows_create_link_dir(tmpdir):
"""Test the functionality of the windows_create_link method with a directory
which should result in making a junction.
@@ -200,7 +197,7 @@ def test_windows_create_link_dir(tmpdir):
assert not os.path.islink(link_dir)
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_windows_create_link_file(tmpdir):
"""Test the functionality of the windows_create_link method with a file
which should result in the creation of a hard link. It also tests the
@@ -217,7 +214,7 @@ def test_windows_create_link_file(tmpdir):
assert not symlink._windows_is_junction(link_file)
-@pytest.mark.skipif(sys.platform != "win32", reason="Test is only for Windows")
+@pytest.mark.only_windows("Test is for Windows specific behavior")
def test_windows_read_link(tmpdir):
"""Makes sure symlink.readlink can read the link source for hard links and
junctions on windows."""
diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py
index b2f8cd8a9e..61879fc410 100644
--- a/lib/spack/spack/test/llnl/util/tty/log.py
+++ b/lib/spack/spack/test/llnl/util/tty/log.py
@@ -4,19 +4,13 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
-import multiprocessing
-import os
-import signal
import sys
-import time
from types import ModuleType
from typing import Optional
import pytest
-import llnl.util.lang as lang
import llnl.util.tty.log as log
-import llnl.util.tty.pty as pty
from spack.util.executable import which
@@ -93,6 +87,21 @@ def test_log_python_output_and_echo_output(capfd, tmpdir):
assert capfd.readouterr()[0] == "force echo\n"
+def test_log_output_with_control_codes(capfd, tmpdir):
+ with tmpdir.as_cwd():
+ with log.log_output("foo.txt"):
+ # Print a sample of formatted GCC error output
+ # Line obtained from the file generated by running gcc on a nonexistent file:
+ # gcc -fdiagnostics-color=always ./test.cpp 2>test.log
+ csi = "\x1b["
+ print(
+ f"{csi}01m{csi}Kgcc:{csi}m{csi}K {csi}01;31m{csi}Kerror: {csi}m{csi}K./test.cpp:"
+ )
+
+ with open("foo.txt") as f:
+ assert f.read() == "gcc: error: ./test.cpp:\n"
+
+
def _log_filter_fn(string):
return string.replace("foo", "bar")
@@ -158,342 +167,3 @@ def test_log_subproc_and_echo_output_capfd(capfd, tmpdir):
print("logged")
assert capfd.readouterr()[0] == "echo\n"
-
-
-#
-# Tests below use a pseudoterminal to test llnl.util.tty.log
-#
-def simple_logger(**kwargs):
- """Mock logger (minion) process for testing log.keyboard_input."""
- running = [True]
-
- def handler(signum, frame):
- running[0] = False
-
- signal.signal(signal.SIGUSR1, handler)
-
- log_path = kwargs["log_path"]
- with log.log_output(log_path):
- while running[0]:
- print("line")
- time.sleep(1e-3)
-
-
-def mock_shell_fg(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.fg()
- ctl.status()
- ctl.wait_enabled()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_fg_no_termios(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.fg()
- ctl.status()
- ctl.wait_disabled_fg()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_bg(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.bg()
- ctl.status()
- ctl.wait_disabled()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_tstp_cont(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.tstp()
- ctl.wait_stopped()
-
- ctl.cont()
- ctl.wait_running()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_tstp_tstp_cont(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.tstp()
- ctl.wait_stopped()
-
- ctl.tstp()
- ctl.wait_stopped()
-
- ctl.cont()
- ctl.wait_running()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_tstp_tstp_cont_cont(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.tstp()
- ctl.wait_stopped()
-
- ctl.tstp()
- ctl.wait_stopped()
-
- ctl.cont()
- ctl.wait_running()
-
- ctl.cont()
- ctl.wait_running()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_bg_fg(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.bg()
- ctl.status()
- ctl.wait_disabled()
-
- ctl.fg()
- ctl.status()
- ctl.wait_enabled()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_bg_fg_no_termios(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.bg()
- ctl.status()
- ctl.wait_disabled()
-
- ctl.fg()
- ctl.status()
- ctl.wait_disabled_fg()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_fg_bg(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.fg()
- ctl.status()
- ctl.wait_enabled()
-
- ctl.bg()
- ctl.status()
- ctl.wait_disabled()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_fg_bg_no_termios(proc, ctl, **kwargs):
- """PseudoShell controller function for test_foreground_background."""
- ctl.fg()
- ctl.status()
- ctl.wait_disabled_fg()
-
- ctl.bg()
- ctl.status()
- ctl.wait_disabled()
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-@contextlib.contextmanager
-def no_termios():
- saved = log.termios
- log.termios = None
- try:
- yield
- finally:
- log.termios = saved
-
-
-@pytest.mark.skipif(not which("ps"), reason="requires ps utility")
-@pytest.mark.skipif(not termios, reason="requires termios support")
-@pytest.mark.parametrize(
- "test_fn,termios_on_or_off",
- [
- # tests with termios
- (mock_shell_fg, lang.nullcontext),
- (mock_shell_bg, lang.nullcontext),
- (mock_shell_bg_fg, lang.nullcontext),
- (mock_shell_fg_bg, lang.nullcontext),
- (mock_shell_tstp_cont, lang.nullcontext),
- (mock_shell_tstp_tstp_cont, lang.nullcontext),
- (mock_shell_tstp_tstp_cont_cont, lang.nullcontext),
- # tests without termios
- (mock_shell_fg_no_termios, no_termios),
- (mock_shell_bg, no_termios),
- (mock_shell_bg_fg_no_termios, no_termios),
- (mock_shell_fg_bg_no_termios, no_termios),
- (mock_shell_tstp_cont, no_termios),
- (mock_shell_tstp_tstp_cont, no_termios),
- (mock_shell_tstp_tstp_cont_cont, no_termios),
- ],
-)
-@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist")
-def test_foreground_background(test_fn, termios_on_or_off, tmpdir):
- """Functional tests for foregrounding and backgrounding a logged process.
-
- This ensures that things like SIGTTOU are not raised and that
- terminal settings are corrected on foreground/background and on
- process stop and start.
-
- """
- shell = pty.PseudoShell(test_fn, simple_logger)
- log_path = str(tmpdir.join("log.txt"))
-
- # run the shell test
- with termios_on_or_off():
- shell.start(log_path=log_path, debug=True)
- exitcode = shell.join()
-
- # processes completed successfully
- assert exitcode == 0
-
- # assert log was created
- assert os.path.exists(log_path)
-
-
-def synchronized_logger(**kwargs):
- """Mock logger (minion) process for testing log.keyboard_input.
-
- This logger synchronizes with the parent process to test that 'v' can
- toggle output. It is used in ``test_foreground_background_output`` below.
-
- """
- running = [True]
-
- def handler(signum, frame):
- running[0] = False
-
- signal.signal(signal.SIGUSR1, handler)
-
- log_path = kwargs["log_path"]
- write_lock = kwargs["write_lock"]
- v_lock = kwargs["v_lock"]
-
- sys.stderr.write(os.getcwd() + "\n")
- with log.log_output(log_path) as logger:
- with logger.force_echo():
- print("forced output")
-
- while running[0]:
- with write_lock:
- if v_lock.acquire(False): # non-blocking acquire
- print("off")
- v_lock.release()
- else:
- print("on") # lock held; v is toggled on
- time.sleep(1e-2)
-
-
-def mock_shell_v_v(proc, ctl, **kwargs):
- """Controller function for test_foreground_background_output."""
- write_lock = kwargs["write_lock"]
- v_lock = kwargs["v_lock"]
-
- ctl.fg()
- ctl.wait_enabled()
- time.sleep(0.1)
-
- write_lock.acquire() # suspend writing
- v_lock.acquire() # enable v lock
- ctl.write(b"v") # toggle v on stdin
- time.sleep(0.1)
- write_lock.release() # resume writing
-
- time.sleep(0.1)
-
- write_lock.acquire() # suspend writing
- ctl.write(b"v") # toggle v on stdin
- time.sleep(0.1)
- v_lock.release() # disable v lock
- write_lock.release() # resume writing
- time.sleep(0.1)
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-def mock_shell_v_v_no_termios(proc, ctl, **kwargs):
- """Controller function for test_foreground_background_output."""
- write_lock = kwargs["write_lock"]
- v_lock = kwargs["v_lock"]
-
- ctl.fg()
- ctl.wait_disabled_fg()
- time.sleep(0.1)
-
- write_lock.acquire() # suspend writing
- v_lock.acquire() # enable v lock
- ctl.write(b"v\n") # toggle v on stdin
- time.sleep(0.1)
- write_lock.release() # resume writing
-
- time.sleep(0.1)
-
- write_lock.acquire() # suspend writing
- ctl.write(b"v\n") # toggle v on stdin
- time.sleep(0.1)
- v_lock.release() # disable v lock
- write_lock.release() # resume writing
- time.sleep(0.1)
-
- os.kill(proc.pid, signal.SIGUSR1)
-
-
-@pytest.mark.skipif(not which("ps"), reason="requires ps utility")
-@pytest.mark.skipif(not termios, reason="requires termios support")
-@pytest.mark.parametrize(
- "test_fn,termios_on_or_off",
- [(mock_shell_v_v, lang.nullcontext), (mock_shell_v_v_no_termios, no_termios)],
-)
-@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist")
-def test_foreground_background_output(test_fn, capfd, termios_on_or_off, tmpdir):
- """Tests hitting 'v' toggles output, and that force_echo works."""
- if sys.version_info >= (3, 8) and sys.platform == "darwin" and termios_on_or_off == no_termios:
- return
-
- shell = pty.PseudoShell(test_fn, synchronized_logger)
- log_path = str(tmpdir.join("log.txt"))
-
- # Locks for synchronizing with minion
- write_lock = multiprocessing.Lock() # must be held by minion to write
- v_lock = multiprocessing.Lock() # held while controller is in v mode
-
- with termios_on_or_off():
- shell.start(write_lock=write_lock, v_lock=v_lock, debug=True, log_path=log_path)
-
- exitcode = shell.join()
- out, err = capfd.readouterr()
- print(err) # will be shown if something goes wrong
- print(out)
-
- # processes completed successfully
- assert exitcode == 0
-
- # split output into lines
- output = out.strip().split("\n")
-
- # also get lines of log file
- assert os.path.exists(log_path)
- with open(log_path) as logfile:
- log_data = logfile.read().strip().split("\n")
-
- # Controller and minion process coordinate with locks such that the
- # minion writes "off" when echo is off, and "on" when echo is on. The
- # output should contain mostly "on" lines, but may contain "off"
- # lines if the controller is slow. The important thing to observe
- # here is that we started seeing 'on' in the end.
- assert ["forced output", "on"] == lang.uniq(output) or [
- "forced output",
- "off",
- "on",
- ] == lang.uniq(output)
-
- # log should be off for a while, then on, then off
- assert ["forced output", "off", "on", "off"] == lang.uniq(log_data) and log_data.count(
- "off"
- ) > 2 # ensure some "off" lines were omitted
diff --git a/lib/spack/spack/test/main.py b/lib/spack/spack/test/main.py
index ed66df4c88..5c64865e56 100644
--- a/lib/spack/spack/test/main.py
+++ b/lib/spack/spack/test/main.py
@@ -8,10 +8,11 @@ import pytest
import llnl.util.filesystem as fs
+import spack
import spack.paths
import spack.util.executable as exe
import spack.util.git
-from spack.main import get_version, main
+from spack.main import main
pytestmark = pytest.mark.not_on_windows(
"Test functionality supported but tests are failing on Win"
@@ -29,7 +30,7 @@ echo --|not a hash|----
fs.set_executable(git)
monkeypatch.setattr(spack.util.git, "git", lambda: exe.which(git))
- assert spack.spack_version == get_version()
+ assert spack.spack_version == spack.get_version()
def test_version_git_fails(tmpdir, working_env, monkeypatch):
@@ -44,7 +45,7 @@ exit 1
fs.set_executable(git)
monkeypatch.setattr(spack.util.git, "git", lambda: exe.which(git))
- assert spack.spack_version == get_version()
+ assert spack.spack_version == spack.get_version()
def test_git_sha_output(tmpdir, working_env, monkeypatch):
@@ -62,17 +63,17 @@ echo {0}
monkeypatch.setattr(spack.util.git, "git", lambda: exe.which(git))
expected = "{0} ({1})".format(spack.spack_version, sha)
- assert expected == get_version()
+ assert expected == spack.get_version()
def test_get_version_no_repo(tmpdir, monkeypatch):
monkeypatch.setattr(spack.paths, "prefix", str(tmpdir))
- assert spack.spack_version == get_version()
+ assert spack.spack_version == spack.get_version()
def test_get_version_no_git(tmpdir, working_env, monkeypatch):
monkeypatch.setattr(spack.util.git, "git", lambda: None)
- assert spack.spack_version == get_version()
+ assert spack.spack_version == spack.get_version()
def test_main_calls_get_version(tmpdir, capsys, working_env, monkeypatch):
@@ -96,4 +97,4 @@ exit 1
fs.set_executable(bad_git)
monkeypatch.setattr(spack.util.git, "git", lambda: exe.which(bad_git))
- assert spack.spack_version == get_version()
+ assert spack.spack_version == spack.get_version()
diff --git a/lib/spack/spack/test/make_executable.py b/lib/spack/spack/test/make_executable.py
index 0dd0109e90..3090f7be5b 100644
--- a/lib/spack/spack/test/make_executable.py
+++ b/lib/spack/spack/test/make_executable.py
@@ -9,16 +9,13 @@ Tests for Spack's built-in parallel make support.
This just tests whether the right args are getting passed to make.
"""
import os
-import sys
import pytest
from spack.build_environment import MakeExecutable
from spack.util.environment import path_put_first
-pytestmark = pytest.mark.skipif(
- sys.platform == "win32", reason="MakeExecutable not supported on Windows"
-)
+pytestmark = pytest.mark.not_on_windows("MakeExecutable not supported on Windows")
@pytest.fixture(autouse=True)
diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py
index 5e855be00a..c44b96b3fc 100644
--- a/lib/spack/spack/test/mirror.py
+++ b/lib/spack/spack/test/mirror.py
@@ -8,22 +8,26 @@ import os
import pytest
+from llnl.util.filesystem import working_dir
from llnl.util.symlink import resolve_link_target_relative_to_the_link
-import spack.mirror
-import spack.repo
+import spack.caches
+import spack.config
+import spack.fetch_strategy
+import spack.mirrors.layout
+import spack.mirrors.mirror
+import spack.mirrors.utils
+import spack.patch
+import spack.stage
import spack.util.executable
import spack.util.spack_json as sjson
import spack.util.url as url_util
+from spack.cmd.common.arguments import mirror_name_or_url
from spack.spec import Spec
-from spack.stage import Stage
from spack.util.executable import which
from spack.util.spack_yaml import SpackYAMLError
-pytestmark = [
- pytest.mark.not_on_windows("does not run on windows"),
- pytest.mark.usefixtures("mutable_config", "mutable_mock_repo"),
-]
+pytestmark = [pytest.mark.usefixtures("mutable_config", "mutable_mock_repo")]
# paths in repos that shouldn't be in the mirror tarballs.
exclude = [".hg", ".git", ".svn"]
@@ -51,14 +55,14 @@ def set_up_package(name, repository, url_attr):
def check_mirror():
- with Stage("spack-mirror-test") as stage:
+ with spack.stage.Stage("spack-mirror-test") as stage:
mirror_root = os.path.join(stage.path, "test-mirror")
# register mirror with spack config
mirrors = {"spack-mirror-test": url_util.path_to_file_url(mirror_root)}
with spack.config.override("mirrors", mirrors):
with spack.config.override("config:checksum", False):
specs = [Spec(x).concretized() for x in repos]
- spack.mirror.create(mirror_root, specs)
+ spack.mirrors.utils.create(mirror_root, specs)
# Stage directory exists
assert os.path.isdir(mirror_root)
@@ -66,8 +70,10 @@ def check_mirror():
for spec in specs:
fetcher = spec.package.fetcher
per_package_ref = os.path.join(spec.name, "-".join([spec.name, str(spec.version)]))
- mirror_paths = spack.mirror.mirror_archive_paths(fetcher, per_package_ref)
- expected_path = os.path.join(mirror_root, mirror_paths.storage_path)
+ mirror_layout = spack.mirrors.layout.default_mirror_layout(
+ fetcher, per_package_ref
+ )
+ expected_path = os.path.join(mirror_root, mirror_layout.path)
assert os.path.exists(expected_path)
# Now try to fetch each package.
@@ -133,16 +139,16 @@ def test_all_mirror(mock_git_repository, mock_svn_repository, mock_hg_repository
@pytest.mark.parametrize(
"mirror",
[
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"fetch": "https://example.com/fetch", "push": "https://example.com/push"}
)
],
)
-def test_roundtrip_mirror(mirror: spack.mirror.Mirror):
+def test_roundtrip_mirror(mirror: spack.mirrors.mirror.Mirror):
mirror_yaml = mirror.to_yaml()
- assert spack.mirror.Mirror.from_yaml(mirror_yaml) == mirror
+ assert spack.mirrors.mirror.Mirror.from_yaml(mirror_yaml) == mirror
mirror_json = mirror.to_json()
- assert spack.mirror.Mirror.from_json(mirror_json) == mirror
+ assert spack.mirrors.mirror.Mirror.from_json(mirror_json) == mirror
@pytest.mark.parametrize(
@@ -150,14 +156,14 @@ def test_roundtrip_mirror(mirror: spack.mirror.Mirror):
)
def test_invalid_yaml_mirror(invalid_yaml):
with pytest.raises(SpackYAMLError, match="error parsing YAML") as e:
- spack.mirror.Mirror.from_yaml(invalid_yaml)
+ spack.mirrors.mirror.Mirror.from_yaml(invalid_yaml)
assert invalid_yaml in str(e.value)
@pytest.mark.parametrize("invalid_json, error_message", [("{13:", "Expecting property name")])
def test_invalid_json_mirror(invalid_json, error_message):
with pytest.raises(sjson.SpackJSONError) as e:
- spack.mirror.Mirror.from_json(invalid_json)
+ spack.mirrors.mirror.Mirror.from_json(invalid_json)
exc_msg = str(e.value)
assert exc_msg.startswith("error parsing JSON mirror:")
assert error_message in exc_msg
@@ -166,9 +172,9 @@ def test_invalid_json_mirror(invalid_json, error_message):
@pytest.mark.parametrize(
"mirror_collection",
[
- spack.mirror.MirrorCollection(
+ spack.mirrors.mirror.MirrorCollection(
mirrors={
- "example-mirror": spack.mirror.Mirror(
+ "example-mirror": spack.mirrors.mirror.Mirror(
"https://example.com/fetch", "https://example.com/push"
).to_dict()
}
@@ -177,9 +183,15 @@ def test_invalid_json_mirror(invalid_json, error_message):
)
def test_roundtrip_mirror_collection(mirror_collection):
mirror_collection_yaml = mirror_collection.to_yaml()
- assert spack.mirror.MirrorCollection.from_yaml(mirror_collection_yaml) == mirror_collection
+ assert (
+ spack.mirrors.mirror.MirrorCollection.from_yaml(mirror_collection_yaml)
+ == mirror_collection
+ )
mirror_collection_json = mirror_collection.to_json()
- assert spack.mirror.MirrorCollection.from_json(mirror_collection_json) == mirror_collection
+ assert (
+ spack.mirrors.mirror.MirrorCollection.from_json(mirror_collection_json)
+ == mirror_collection
+ )
@pytest.mark.parametrize(
@@ -187,29 +199,27 @@ def test_roundtrip_mirror_collection(mirror_collection):
)
def test_invalid_yaml_mirror_collection(invalid_yaml):
with pytest.raises(SpackYAMLError, match="error parsing YAML") as e:
- spack.mirror.MirrorCollection.from_yaml(invalid_yaml)
+ spack.mirrors.mirror.MirrorCollection.from_yaml(invalid_yaml)
assert invalid_yaml in str(e.value)
@pytest.mark.parametrize("invalid_json, error_message", [("{13:", "Expecting property name")])
def test_invalid_json_mirror_collection(invalid_json, error_message):
with pytest.raises(sjson.SpackJSONError) as e:
- spack.mirror.MirrorCollection.from_json(invalid_json)
+ spack.mirrors.mirror.MirrorCollection.from_json(invalid_json)
exc_msg = str(e.value)
assert exc_msg.startswith("error parsing JSON mirror collection:")
assert error_message in exc_msg
-def test_mirror_archive_paths_no_version(mock_packages, config, mock_archive):
+def test_mirror_archive_paths_no_version(mock_packages, mock_archive):
spec = Spec("trivial-install-test-package@=nonexistingversion").concretized()
- fetcher = spack.fetch_strategy.URLFetchStrategy(mock_archive.url)
- spack.mirror.mirror_archive_paths(fetcher, "per-package-ref", spec)
-
+ fetcher = spack.fetch_strategy.URLFetchStrategy(url=mock_archive.url)
+ spack.mirrors.layout.default_mirror_layout(fetcher, "per-package-ref", spec)
-def test_mirror_with_url_patches(mock_packages, config, monkeypatch):
- spec = Spec("patch-several-dependencies")
- spec.concretize()
+def test_mirror_with_url_patches(mock_packages, monkeypatch):
+ spec = Spec("patch-several-dependencies").concretized()
files_cached_in_mirror = set()
def record_store(_class, fetcher, relative_dst, cosmetic_path=None):
@@ -228,30 +238,27 @@ def test_mirror_with_url_patches(mock_packages, config, monkeypatch):
def successful_apply(*args, **kwargs):
pass
- def successful_symlink(*args, **kwargs):
+ def successful_make_alias(*args, **kwargs):
pass
- with Stage("spack-mirror-test") as stage:
+ with spack.stage.Stage("spack-mirror-test") as stage:
mirror_root = os.path.join(stage.path, "test-mirror")
monkeypatch.setattr(spack.fetch_strategy.URLFetchStrategy, "fetch", successful_fetch)
monkeypatch.setattr(spack.fetch_strategy.URLFetchStrategy, "expand", successful_expand)
monkeypatch.setattr(spack.patch, "apply_patch", successful_apply)
monkeypatch.setattr(spack.caches.MirrorCache, "store", record_store)
- monkeypatch.setattr(spack.caches.MirrorCache, "symlink", successful_symlink)
+ monkeypatch.setattr(
+ spack.mirrors.layout.DefaultLayout, "make_alias", successful_make_alias
+ )
with spack.config.override("config:checksum", False):
- spack.mirror.create(mirror_root, list(spec.traverse()))
-
- assert not (
- set(
- [
- "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
- "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd.gz",
- ]
- )
- - files_cached_in_mirror
- )
+ spack.mirrors.utils.create(mirror_root, list(spec.traverse()))
+
+ assert {
+ "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
+ "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd.gz",
+ }.issubset(files_cached_in_mirror)
class MockFetcher:
@@ -266,36 +273,34 @@ class MockFetcher:
@pytest.mark.regression("14067")
-def test_mirror_cache_symlinks(tmpdir):
+def test_mirror_layout_make_alias(tmpdir):
"""Confirm that the cosmetic symlink created in the mirror cache (which may
be relative) targets the storage path correctly.
"""
- cosmetic_path = "zlib/zlib-1.2.11.tar.gz"
- global_path = "_source-cache/archive/c3/c3e5.tar.gz"
- cache = spack.caches.MirrorCache(str(tmpdir), False)
- reference = spack.mirror.MirrorReference(cosmetic_path, global_path)
+ alias = os.path.join("zlib", "zlib-1.2.11.tar.gz")
+ path = os.path.join("_source-cache", "archive", "c3", "c3e5.tar.gz")
+ cache = spack.caches.MirrorCache(root=str(tmpdir), skip_unstable_versions=False)
+ layout = spack.mirrors.layout.DefaultLayout(alias, path)
- cache.store(MockFetcher(), reference.storage_path)
- cache.symlink(reference)
+ cache.store(MockFetcher(), layout.path)
+ layout.make_alias(cache.root)
- link_target = resolve_link_target_relative_to_the_link(
- os.path.join(cache.root, reference.cosmetic_path)
- )
+ link_target = resolve_link_target_relative_to_the_link(os.path.join(cache.root, layout.alias))
assert os.path.exists(link_target)
- assert os.path.normpath(link_target) == os.path.join(cache.root, reference.storage_path)
+ assert os.path.normpath(link_target) == os.path.join(cache.root, layout.path)
@pytest.mark.regression("31627")
@pytest.mark.parametrize(
"specs,expected_specs",
[
- (["a"], ["a@=1.0", "a@=2.0"]),
- (["a", "brillig"], ["a@=1.0", "a@=2.0", "brillig@=1.0.0", "brillig@=2.0.0"]),
+ (["pkg-a"], ["pkg-a@=1.0", "pkg-a@=2.0"]),
+ (["pkg-a", "brillig"], ["pkg-a@=1.0", "pkg-a@=2.0", "brillig@=1.0.0", "brillig@=2.0.0"]),
],
)
def test_get_all_versions(specs, expected_specs):
specs = [Spec(s) for s in specs]
- output_list = spack.mirror.get_all_versions(specs)
+ output_list = spack.mirrors.utils.get_all_versions(specs)
output_list = [str(x) for x in output_list]
# Compare sets since order is not important
assert set(output_list) == set(expected_specs)
@@ -303,14 +308,14 @@ def test_get_all_versions(specs, expected_specs):
def test_update_1():
# No change
- m = spack.mirror.Mirror("https://example.com")
+ m = spack.mirrors.mirror.Mirror("https://example.com")
assert not m.update({"url": "https://example.com"})
assert m.to_dict() == "https://example.com"
def test_update_2():
# Change URL, shouldn't expand to {"url": ...} dict.
- m = spack.mirror.Mirror("https://example.com")
+ m = spack.mirrors.mirror.Mirror("https://example.com")
assert m.update({"url": "https://example.org"})
assert m.to_dict() == "https://example.org"
assert m.fetch_url == "https://example.org"
@@ -319,7 +324,7 @@ def test_update_2():
def test_update_3():
# Change fetch url, ensure minimal config
- m = spack.mirror.Mirror("https://example.com")
+ m = spack.mirrors.mirror.Mirror("https://example.com")
assert m.update({"url": "https://example.org"}, "fetch")
assert m.to_dict() == {"url": "https://example.com", "fetch": "https://example.org"}
assert m.fetch_url == "https://example.org"
@@ -328,7 +333,7 @@ def test_update_3():
def test_update_4():
# Change push url, ensure minimal config
- m = spack.mirror.Mirror("https://example.com")
+ m = spack.mirrors.mirror.Mirror("https://example.com")
assert m.update({"url": "https://example.org"}, "push")
assert m.to_dict() == {"url": "https://example.com", "push": "https://example.org"}
assert m.push_url == "https://example.org"
@@ -336,9 +341,9 @@ def test_update_4():
@pytest.mark.parametrize("direction", ["fetch", "push"])
-def test_update_connection_params(direction):
+def test_update_connection_params(direction, tmpdir, monkeypatch):
"""Test whether new connection params expand the mirror config to a dict."""
- m = spack.mirror.Mirror("https://example.com")
+ m = spack.mirrors.mirror.Mirror("https://example.com", "example")
assert m.update(
{
@@ -361,8 +366,69 @@ def test_update_connection_params(direction):
"endpoint_url": "https://example.com",
},
}
-
- assert m.get_access_pair(direction) == ["username", "password"]
+ assert m.get_access_pair(direction) == ("username", "password")
assert m.get_access_token(direction) == "token"
assert m.get_profile(direction) == "profile"
assert m.get_endpoint_url(direction) == "https://example.com"
+
+ # Expand environment variables
+ os.environ["_SPACK_TEST_PAIR_USERNAME"] = "expanded_username"
+ os.environ["_SPACK_TEST_PAIR_PASSWORD"] = "expanded_password"
+ os.environ["_SPACK_TEST_TOKEN"] = "expanded_token"
+
+ assert m.update(
+ {
+ "access_pair": {
+ "id_variable": "_SPACK_TEST_PAIR_USERNAME",
+ "secret_variable": "_SPACK_TEST_PAIR_PASSWORD",
+ }
+ },
+ direction,
+ )
+
+ assert m.to_dict() == {
+ "url": "https://example.com",
+ direction: {
+ "url": "http://example.org",
+ "access_pair": {
+ "id_variable": "_SPACK_TEST_PAIR_USERNAME",
+ "secret_variable": "_SPACK_TEST_PAIR_PASSWORD",
+ },
+ "access_token": "token",
+ "profile": "profile",
+ "endpoint_url": "https://example.com",
+ },
+ }
+
+ assert m.get_access_pair(direction) == ("expanded_username", "expanded_password")
+
+ assert m.update(
+ {
+ "access_pair": {"id": "username", "secret_variable": "_SPACK_TEST_PAIR_PASSWORD"},
+ "access_token_variable": "_SPACK_TEST_TOKEN",
+ },
+ direction,
+ )
+
+ assert m.to_dict() == {
+ "url": "https://example.com",
+ direction: {
+ "url": "http://example.org",
+ "access_pair": {"id": "username", "secret_variable": "_SPACK_TEST_PAIR_PASSWORD"},
+ "access_token_variable": "_SPACK_TEST_TOKEN",
+ "profile": "profile",
+ "endpoint_url": "https://example.com",
+ },
+ }
+
+ assert m.get_access_pair(direction) == ("username", "expanded_password")
+ assert m.get_access_token(direction) == "expanded_token"
+
+
+def test_mirror_name_or_url_dir_parsing(tmp_path):
+ curdir = tmp_path / "mirror"
+ curdir.mkdir()
+
+ with working_dir(curdir):
+ assert mirror_name_or_url(".").fetch_url == curdir.as_uri()
+ assert mirror_name_or_url("..").fetch_url == tmp_path.as_uri()
diff --git a/lib/spack/spack/test/modules/common.py b/lib/spack/spack/test/modules/common.py
index 7586728a8b..c7f63f64b6 100644
--- a/lib/spack/spack/test/modules/common.py
+++ b/lib/spack/spack/test/modules/common.py
@@ -7,13 +7,19 @@ import stat
import pytest
+from llnl.util.symlink import readlink
+
import spack.cmd.modules
import spack.config
import spack.error
+import spack.modules
+import spack.modules.common
import spack.modules.tcl
import spack.package_base
-import spack.schema.modules
+import spack.package_prefs
+import spack.repo
import spack.spec
+from spack.installer import PackageInstaller
from spack.modules.common import UpstreamModuleIndex
from spack.spec import Spec
@@ -78,7 +84,7 @@ def test_modules_default_symlink(
link_path = os.path.join(os.path.dirname(mock_module_filename), "default")
assert os.path.islink(link_path)
- assert os.readlink(link_path) == mock_module_filename
+ assert readlink(link_path) == mock_module_filename
generator.remove()
assert not os.path.lexists(link_path)
@@ -166,7 +172,7 @@ module_index:
old_index = spack.modules.common.upstream_module_index
spack.modules.common.upstream_module_index = upstream_index
- m1_path = spack.modules.common.get_module("tcl", s1, True)
+ m1_path = spack.modules.get_module("tcl", s1, True)
assert m1_path == "/path/to/a"
finally:
spack.modules.common.upstream_module_index = old_index
@@ -176,7 +182,7 @@ module_index:
def test_load_installed_package_not_in_repo(install_mockery, mock_fetch, monkeypatch):
"""Test that installed packages that have been removed are still loadable"""
spec = Spec("trivial-install-test-package").concretized()
- spec.package.do_install()
+ PackageInstaller([spec.package], explicit=True).install()
spack.modules.module_types["tcl"](spec, "default", True).write()
def find_nothing(*args):
@@ -188,7 +194,7 @@ def test_load_installed_package_not_in_repo(install_mockery, mock_fetch, monkeyp
with pytest.raises(spack.repo.UnknownPackageError):
spec.package
- module_path = spack.modules.common.get_module("tcl", spec, True)
+ module_path = spack.modules.get_module("tcl", spec, True)
assert module_path
spack.package_base.PackageBase.uninstall_by_spec(spec)
@@ -214,8 +220,8 @@ def test_check_module_set_name(mutable_config):
# Invalid module set names
msg = "Valid module set names are"
- with pytest.raises(spack.config.ConfigError, match=msg):
+ with pytest.raises(spack.error.ConfigError, match=msg):
spack.cmd.modules.check_module_set_name("prefix_inspections")
- with pytest.raises(spack.config.ConfigError, match=msg):
+ with pytest.raises(spack.error.ConfigError, match=msg):
spack.cmd.modules.check_module_set_name("third")
diff --git a/lib/spack/spack/test/modules/conftest.py b/lib/spack/spack/test/modules/conftest.py
index 57396da426..1feee7adcb 100644
--- a/lib/spack/spack/test/modules/conftest.py
+++ b/lib/spack/spack/test/modules/conftest.py
@@ -6,11 +6,9 @@ import pathlib
import pytest
-import spack.config
-import spack.modules.common
-import spack.paths
+import spack.modules.lmod
+import spack.modules.tcl
import spack.spec
-import spack.util.path
@pytest.fixture()
@@ -18,8 +16,10 @@ def modulefile_content(request):
"""Returns a function that generates the content of a module file as a list of lines."""
writer_cls = getattr(request.module, "writer_cls")
- def _impl(spec_str, module_set_name="default", explicit=True):
- spec = spack.spec.Spec(spec_str).concretized()
+ def _impl(spec_like, module_set_name="default", explicit=True):
+ if isinstance(spec_like, str):
+ spec_like = spack.spec.Spec(spec_like)
+ spec = spec_like.concretized()
generator = writer_cls(spec, module_set_name, explicit)
generator.write(overwrite=True)
written_module = pathlib.Path(generator.layout.filename)
diff --git a/lib/spack/spack/test/modules/lmod.py b/lib/spack/spack/test/modules/lmod.py
index c6cf91cb66..a985cb1b7e 100644
--- a/lib/spack/spack/test/modules/lmod.py
+++ b/lib/spack/spack/test/modules/lmod.py
@@ -7,10 +7,15 @@ import os
import pytest
+import archspec.cpu
+
+import spack.config
import spack.environment as ev
import spack.main
+import spack.modules.common
import spack.modules.lmod
import spack.spec
+import spack.util.environment
mpich_spec_string = "mpich@3.0.4"
mpileaks_spec_string = "mpileaks"
@@ -27,7 +32,7 @@ pytestmark = [
]
-@pytest.fixture(params=["clang@=12.0.0", "gcc@=10.2.1"])
+@pytest.fixture(params=["clang@=15.0.0", "gcc@=10.2.1"])
def compiler(request):
return request.param
@@ -46,7 +51,7 @@ def provider(request):
return request.param
-@pytest.mark.usefixtures("config", "mock_packages")
+@pytest.mark.usefixtures("mutable_config", "mock_packages")
class TestLmod:
@pytest.mark.regression("37788")
@pytest.mark.parametrize("modules_config", ["core_compilers", "core_compilers_at_equal"])
@@ -57,7 +62,7 @@ class TestLmod:
we can use both ``compiler@version`` and ``compiler@=version`` to specify a core compiler.
"""
module_configuration(modules_config)
- module, spec = factory("libelf%clang@12.0.0")
+ module, spec = factory("libelf%clang@15.0.0")
assert "Core" in module.layout.available_path_parts
def test_file_layout(self, compiler, provider, factory, module_configuration):
@@ -76,7 +81,7 @@ class TestLmod:
# is transformed to r"Core" if the compiler is listed among core
# compilers
# Check that specs listed as core_specs are transformed to "Core"
- if compiler == "clang@=12.0.0" or spec_string == "mpich@3.0.1":
+ if compiler == "clang@=15.0.0" or spec_string == "mpich@3.0.1":
assert "Core" in layout.available_path_parts
else:
assert compiler.replace("@=", "/") in layout.available_path_parts
@@ -103,14 +108,19 @@ class TestLmod:
else:
assert repetitions == 1
- def test_compilers_provided_different_name(self, factory, module_configuration):
- module_configuration("complex_hierarchy")
- module, spec = factory("intel-oneapi-compilers%clang@3.3")
+ def test_compilers_provided_different_name(
+ self, factory, module_configuration, compiler_factory
+ ):
+ with spack.config.override(
+ "compilers", [compiler_factory(spec="clang@3.3", operating_system="debian6")]
+ ):
+ module_configuration("complex_hierarchy")
+ module, spec = factory("intel-oneapi-compilers%clang@3.3")
- provides = module.conf.provides
+ provides = module.conf.provides
- assert "compiler" in provides
- assert provides["compiler"] == spack.spec.CompilerSpec("oneapi@=3.0")
+ assert "compiler" in provides
+ assert provides["compiler"] == spack.spec.CompilerSpec("oneapi@=3.0")
def test_simple_case(self, modulefile_content, module_configuration):
"""Tests the generation of a simple Lua module file."""
@@ -210,6 +220,9 @@ class TestLmod:
assert len([x for x in content if 'setenv("FOO", "{{name}}, {name}, {{}}, {}")' in x]) == 1
+ @pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
+ )
def test_help_message(self, modulefile_content, module_configuration):
"""Tests the generation of module help message."""
@@ -333,17 +346,18 @@ class TestLmod:
assert "Override successful!" in content
- def test_override_template_in_modules_yaml(self, modulefile_content, module_configuration):
+ def test_override_template_in_modules_yaml(
+ self, modulefile_content, module_configuration, host_architecture_str
+ ):
"""Tests overriding a template from `modules.yaml`"""
module_configuration("override_template")
content = modulefile_content("override-module-templates")
assert "Override even better!" in content
- content = modulefile_content("mpileaks target=x86_64")
+ content = modulefile_content(f"mpileaks target={host_architecture_str}")
assert "Override even better!" in content
- @pytest.mark.usefixtures("config")
def test_external_configure_args(self, factory):
# If this package is detected as an external, its configure option line
# in the module file starts with 'unknown'
diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py
index 441e3f6e64..d2a8b18b67 100644
--- a/lib/spack/spack/test/modules/tcl.py
+++ b/lib/spack/spack/test/modules/tcl.py
@@ -7,6 +7,8 @@ import os
import pytest
+import archspec.cpu
+
import spack.modules.common
import spack.modules.tcl
import spack.spec
@@ -24,7 +26,7 @@ pytestmark = [
]
-@pytest.mark.usefixtures("config", "mock_packages", "mock_module_filename")
+@pytest.mark.usefixtures("mutable_config", "mock_packages", "mock_module_filename")
class TestTcl:
def test_simple_case(self, modulefile_content, module_configuration):
"""Tests the generation of a simple Tcl module file."""
@@ -92,19 +94,23 @@ class TestTcl:
assert len([x for x in content if "depends-on " in x]) == 2
assert len([x for x in content if "module load " in x]) == 2
- def test_prerequisites_direct(self, modulefile_content, module_configuration):
+ def test_prerequisites_direct(
+ self, modulefile_content, module_configuration, host_architecture_str
+ ):
"""Tests asking direct dependencies as prerequisites."""
module_configuration("prerequisites_direct")
- content = modulefile_content("mpileaks target=x86_64")
+ content = modulefile_content(f"mpileaks target={host_architecture_str}")
assert len([x for x in content if "prereq" in x]) == 2
- def test_prerequisites_all(self, modulefile_content, module_configuration):
+ def test_prerequisites_all(
+ self, modulefile_content, module_configuration, host_architecture_str
+ ):
"""Tests asking all dependencies as prerequisites."""
module_configuration("prerequisites_all")
- content = modulefile_content("mpileaks target=x86_64")
+ content = modulefile_content(f"mpileaks target={host_architecture_str}")
assert len([x for x in content if "prereq" in x]) == 5
@@ -180,6 +186,9 @@ class TestTcl:
assert len([x for x in content if "setenv FOO {{{name}}, {name}, {{}}, {}}" in x]) == 1
+ @pytest.mark.skipif(
+ str(archspec.cpu.host().family) != "x86_64", reason="test data is specific for x86_64"
+ )
def test_help_message(self, modulefile_content, module_configuration):
"""Tests the generation of module help message."""
@@ -222,7 +231,7 @@ class TestTcl:
)
assert help_msg in "".join(content)
- def test_exclude(self, modulefile_content, module_configuration):
+ def test_exclude(self, modulefile_content, module_configuration, host_architecture_str):
"""Tests excluding the generation of selected modules."""
module_configuration("exclude")
@@ -234,9 +243,9 @@ class TestTcl:
# and IOError on Python 2 or common bases like EnvironmentError
# which are not officially documented
with pytest.raises(Exception):
- modulefile_content("callpath target=x86_64")
+ modulefile_content(f"callpath target={host_architecture_str}")
- content = modulefile_content("zmpi target=x86_64")
+ content = modulefile_content(f"zmpi target={host_architecture_str}")
assert len([x for x in content if "module load " in x]) == 1
@@ -368,6 +377,14 @@ class TestTcl:
writer, spec = factory("mpileaks~debug+opt target=x86_64")
assert "baz-foo-bar" in writer.layout.use_name
+ def test_suffixes_format(self, module_configuration, factory):
+ """Tests adding suffixes as spec format string to module file name."""
+ module_configuration("suffix-format")
+
+ writer, spec = factory("mpileaks +debug target=x86_64 ^mpich@3.0.4")
+ assert "debug=True" in writer.layout.use_name
+ assert "mpi=mpich-v3.0.4" in writer.layout.use_name
+
def test_setup_environment(self, modulefile_content, module_configuration):
"""Tests the internal set-up of run-time environment."""
@@ -379,7 +396,7 @@ class TestTcl:
spec = spack.spec.Spec("mpileaks")
spec.concretize()
- content = modulefile_content(str(spec["callpath"]))
+ content = modulefile_content(spec["callpath"])
assert len([x for x in content if "setenv FOOBAR" in x]) == 1
assert len([x for x in content if "setenv FOOBAR {callpath}" in x]) == 1
@@ -406,14 +423,16 @@ class TestTcl:
assert "Override successful!" in content
- def test_override_template_in_modules_yaml(self, modulefile_content, module_configuration):
+ def test_override_template_in_modules_yaml(
+ self, modulefile_content, module_configuration, host_architecture_str
+ ):
"""Tests overriding a template from `modules.yaml`"""
module_configuration("override_template")
content = modulefile_content("override-module-templates")
assert "Override even better!" in content
- content = modulefile_content("mpileaks target=x86_64")
+ content = modulefile_content(f"mpileaks target={host_architecture_str}")
assert "Override even better!" in content
def test_extend_context(self, modulefile_content, module_configuration):
@@ -428,19 +447,19 @@ class TestTcl:
@pytest.mark.regression("4400")
@pytest.mark.db
- def test_hide_implicits_no_arg(self, module_configuration, database):
+ def test_hide_implicits_no_arg(self, module_configuration, mutable_database):
module_configuration("exclude_implicits")
# mpileaks has been installed explicitly when setting up
# the tests database
- mpileaks_specs = database.query("mpileaks")
+ mpileaks_specs = mutable_database.query("mpileaks")
for item in mpileaks_specs:
writer = writer_cls(item, "default")
assert not writer.conf.excluded
# callpath is a dependency of mpileaks, and has been pulled
# in implicitly
- callpath_specs = database.query("callpath")
+ callpath_specs = mutable_database.query("callpath")
for item in callpath_specs:
writer = writer_cls(item, "default")
assert writer.conf.excluded
@@ -462,8 +481,7 @@ class TestTcl:
assert writer.conf.excluded
@pytest.mark.regression("9624")
- @pytest.mark.db
- def test_autoload_with_constraints(self, modulefile_content, module_configuration, database):
+ def test_autoload_with_constraints(self, modulefile_content, module_configuration):
"""Tests the automatic loading of direct dependencies."""
module_configuration("autoload_with_constraints")
diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py
index e4546c5139..7e5231ee93 100644
--- a/lib/spack/spack/test/multimethod.py
+++ b/lib/spack/spack/test/multimethod.py
@@ -7,14 +7,13 @@
import pytest
+import spack.config
import spack.platforms
-import spack.repo
import spack.spec
from spack.multimethod import NoSuchMethodError
pytestmark = [
pytest.mark.usefixtures("mock_packages", "config"),
- pytest.mark.only_clingo("The original concretizer cannot concretize most of the specs"),
pytest.mark.not_on_windows("Not running on windows"),
]
@@ -69,9 +68,15 @@ def test_no_version_match(pkg_name):
("", "boolean_false_first", "True"),
],
)
-def test_multimethod_calls(pkg_name, constraint_str, method_name, expected_result):
- s = spack.spec.Spec(pkg_name + constraint_str).concretized()
- msg = "Method {0} from {1} is giving a wrong result".format(method_name, s)
+def test_multimethod_calls(
+ pkg_name, constraint_str, method_name, expected_result, compiler_factory
+):
+ # Add apple-clang, as it is required by one of the tests
+ with spack.config.override(
+ "compilers", [compiler_factory(spec="apple-clang@9.1.0", operating_system="elcapitan")]
+ ):
+ s = spack.spec.Spec(pkg_name + constraint_str).concretized()
+ msg = f"Method {method_name} from {s} is giving a wrong result"
assert getattr(s.package, method_name)() == expected_result, msg
diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py
index a2b1ac2f4f..98c1258cd2 100644
--- a/lib/spack/spack/test/oci/integration_test.py
+++ b/lib/spack/spack/test/oci/integration_test.py
@@ -9,15 +9,24 @@
import hashlib
import json
import os
+import pathlib
+import re
+import urllib.error
from contextlib import contextmanager
+import pytest
+
+import spack.binary_distribution
+import spack.database
import spack.environment as ev
+import spack.error
import spack.oci.opener
-from spack.binary_distribution import gzip_compressed_tarfile
+import spack.spec
from spack.main import SpackCommand
-from spack.oci.image import Digest, ImageReference, default_config, default_manifest
+from spack.oci.image import Digest, ImageReference, default_config, default_manifest, default_tag
from spack.oci.oci import blob_exists, get_manifest_and_config, upload_blob, upload_manifest
from spack.test.oci.mock_registry import DummyServer, InMemoryOCIRegistry, create_opener
+from spack.util.archive import gzip_compressed_tarfile
buildcache = SpackCommand("buildcache")
mirror = SpackCommand("mirror")
@@ -33,7 +42,7 @@ def oci_servers(*servers: DummyServer):
spack.oci.opener.urlopen = old_opener
-def test_buildcache_push_command(mutable_database, disable_parallel_buildcache_push):
+def test_buildcache_push_command(mutable_database):
with oci_servers(InMemoryOCIRegistry("example.com")):
mirror("add", "oci-test", "oci://example.com/image")
@@ -56,14 +65,12 @@ def test_buildcache_push_command(mutable_database, disable_parallel_buildcache_p
assert os.path.exists(os.path.join(spec.prefix, "bin", "mpileaks"))
-def test_buildcache_tag(
- install_mockery, mock_fetch, mutable_mock_env_path, disable_parallel_buildcache_push
-):
+def test_buildcache_tag(install_mockery, mock_fetch, mutable_mock_env_path):
"""Tests whether we can create an OCI image from a full environment with multiple roots."""
env("create", "test")
with ev.read("test"):
- install("--add", "libelf")
- install("--add", "trivial-install-test-package")
+ install("--fake", "--add", "libelf")
+ install("--fake", "--add", "trivial-install-test-package")
registry = InMemoryOCIRegistry("example.com")
@@ -76,7 +83,7 @@ def test_buildcache_tag(
name = ImageReference.from_string("example.com/image:full_env")
with ev.read("test") as e:
- specs = e.all_specs()
+ specs = [x for x in e.all_specs() if not x.external]
manifest, config = get_manifest_and_config(name)
@@ -93,12 +100,10 @@ def test_buildcache_tag(
name = ImageReference.from_string("example.com/image:single_spec")
manifest, config = get_manifest_and_config(name)
- assert len(manifest["layers"]) == 1
+ assert len(manifest["layers"]) == len([x for x in libelf.traverse() if not x.external])
-def test_buildcache_push_with_base_image_command(
- mutable_database, tmpdir, disable_parallel_buildcache_push
-):
+def test_buildcache_push_with_base_image_command(mutable_database, tmpdir):
"""Test that we can push a package with a base image to an OCI registry.
This test is a bit involved, cause we have to create a small base image."""
@@ -172,6 +177,12 @@ def test_buildcache_push_with_base_image_command(
dst_image = ImageReference.from_string(f"dst.example.com/image:{tag}")
retrieved_manifest, retrieved_config = get_manifest_and_config(dst_image)
+ # Check that the media type is OCI
+ assert retrieved_manifest["mediaType"] == "application/vnd.oci.image.manifest.v1+json"
+ assert (
+ retrieved_manifest["config"]["mediaType"] == "application/vnd.oci.image.config.v1+json"
+ )
+
# Check that the base image layer is first.
assert retrieved_manifest["layers"][0]["digest"] == str(tar_gz_digest)
assert retrieved_config["rootfs"]["diff_ids"][0] == str(tar_digest)
@@ -189,3 +200,177 @@ def test_buildcache_push_with_base_image_command(
# And verify that all layers including the base layer are present
for layer in retrieved_manifest["layers"]:
assert blob_exists(dst_image, digest=Digest.from_string(layer["digest"]))
+ assert layer["mediaType"] == "application/vnd.oci.image.layer.v1.tar+gzip"
+
+
+def test_uploading_with_base_image_in_docker_image_manifest_v2_format(
+ tmp_path: pathlib.Path, mutable_database
+):
+ """If the base image uses an old manifest schema, Spack should also use that.
+ That is necessary for container images to work with Apptainer, which is rather strict about
+ mismatching manifest/layer types."""
+
+ registry_src = InMemoryOCIRegistry("src.example.com")
+ registry_dst = InMemoryOCIRegistry("dst.example.com")
+
+ base_image = ImageReference.from_string("src.example.com/my-base-image:latest")
+
+ with oci_servers(registry_src, registry_dst):
+ mirror("add", "oci-test", "oci://dst.example.com/image")
+
+ # Create a dummy base image (blob, config, manifest) in registry A in the Docker Image
+ # Manifest V2 format.
+ rootfs = tmp_path / "rootfs"
+ (rootfs / "bin").mkdir(parents=True)
+ (rootfs / "bin" / "sh").write_text("hello world")
+ tarball = tmp_path / "base.tar.gz"
+ with gzip_compressed_tarfile(tarball) as (tar, tar_gz_checksum, tar_checksum):
+ tar.add(rootfs, arcname=".")
+ tar_gz_digest = Digest.from_sha256(tar_gz_checksum.hexdigest())
+ tar_digest = Digest.from_sha256(tar_checksum.hexdigest())
+ upload_blob(base_image, str(tarball), tar_gz_digest)
+ config = {
+ "created": "2015-10-31T22:22:56.015925234Z",
+ "author": "Foo <example@example.com>",
+ "architecture": "amd64",
+ "os": "linux",
+ "config": {
+ "User": "foo",
+ "Memory": 2048,
+ "MemorySwap": 4096,
+ "CpuShares": 8,
+ "ExposedPorts": {"8080/tcp": {}},
+ "Env": ["PATH=/usr/bin:/bin"],
+ "Entrypoint": ["/bin/sh"],
+ "Cmd": ["-c", "'echo hello world'"],
+ "Volumes": {"/x": {}},
+ "WorkingDir": "/",
+ },
+ "rootfs": {"diff_ids": [str(tar_digest)], "type": "layers"},
+ "history": [
+ {
+ "created": "2015-10-31T22:22:54.690851953Z",
+ "created_by": "/bin/sh -c #(nop) ADD file:a3bc1e842b69636f9df5256c49c5374fb4eef1e281fe3f282c65fb853ee171c5 in /",
+ }
+ ],
+ }
+ config_file = tmp_path / "config.json"
+ config_file.write_text(json.dumps(config))
+ config_digest = Digest.from_sha256(hashlib.sha256(config_file.read_bytes()).hexdigest())
+ upload_blob(base_image, str(config_file), config_digest)
+ manifest = {
+ "schemaVersion": 2,
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "config": {
+ "mediaType": "application/vnd.docker.container.image.v1+json",
+ "size": config_file.stat().st_size,
+ "digest": str(config_digest),
+ },
+ "layers": [
+ {
+ "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
+ "size": tarball.stat().st_size,
+ "digest": str(tar_gz_digest),
+ }
+ ],
+ }
+ upload_manifest(base_image, manifest)
+
+ # Finally upload some package to registry B with registry A's image as base
+ buildcache("push", "--base-image", str(base_image), "oci-test", "mpileaks^mpich")
+
+ # Should have some manifests uploaded to registry B now.
+ assert registry_dst.manifests
+
+ # Verify that all manifest are in the Docker Image Manifest V2 format, not OCI.
+ # And also check that we're not using annotations, which is an OCI-only "feature".
+ for m in registry_dst.manifests.values():
+ assert m["mediaType"] == "application/vnd.docker.distribution.manifest.v2+json"
+ assert m["config"]["mediaType"] == "application/vnd.docker.container.image.v1+json"
+ for layer in m["layers"]:
+ assert layer["mediaType"] == "application/vnd.docker.image.rootfs.diff.tar.gzip"
+ assert "annotations" not in m
+
+
+def test_best_effort_upload(mutable_database: spack.database.Database, monkeypatch):
+ """Failure to upload a blob or manifest should not prevent others from being uploaded -- it
+ should be a best-effort operation. If any runtime dep fails to upload, it results in a missing
+ layer for dependents. But we do still create manifests for dependents, so that the build cache
+ is maximally useful. (The downside is that container images are not runnable)."""
+
+ _push_blob = spack.binary_distribution._oci_push_pkg_blob
+ _push_manifest = spack.binary_distribution._oci_put_manifest
+
+ def push_blob(image_ref, spec, tmpdir):
+ # fail to upload the blob of mpich
+ if spec.name == "mpich":
+ raise Exception("Blob Server Error")
+ return _push_blob(image_ref, spec, tmpdir)
+
+ def put_manifest(base_images, checksums, image_ref, tmpdir, extra_config, annotations, *specs):
+ # fail to upload the manifest of libdwarf
+ if "libdwarf" in (s.name for s in specs):
+ raise Exception("Manifest Server Error")
+ return _push_manifest(
+ base_images, checksums, image_ref, tmpdir, extra_config, annotations, *specs
+ )
+
+ monkeypatch.setattr(spack.binary_distribution, "_oci_push_pkg_blob", push_blob)
+ monkeypatch.setattr(spack.binary_distribution, "_oci_put_manifest", put_manifest)
+
+ mirror("add", "oci-test", "oci://example.com/image")
+ registry = InMemoryOCIRegistry("example.com")
+ image = ImageReference.from_string("example.com/image")
+
+ with oci_servers(registry):
+ with pytest.raises(spack.error.SpackError, match="The following 2 errors occurred") as e:
+ buildcache("push", "--update-index", "oci-test", "mpileaks^mpich")
+
+ # mpich's blob failed to upload and libdwarf's manifest failed to upload
+ assert re.search("mpich.+: Exception: Blob Server Error", e.value)
+ assert re.search("libdwarf.+: Exception: Manifest Server Error", e.value)
+
+ mpileaks: spack.spec.Spec = mutable_database.query_local("mpileaks^mpich")[0]
+
+ without_manifest = ("mpich", "libdwarf")
+
+ # Verify that manifests of mpich/libdwarf are missing due to upload failure.
+ for name in without_manifest:
+ tagged_img = image.with_tag(default_tag(mpileaks[name]))
+ with pytest.raises(urllib.error.HTTPError, match="404"):
+ get_manifest_and_config(tagged_img)
+
+ # Collect the layer digests of successfully uploaded packages. Every package should refer
+ # to its own tarballs and those of its runtime deps that were uploaded.
+ pkg_to_all_digests = {}
+ pkg_to_own_digest = {}
+ for s in mpileaks.traverse():
+ if s.name in without_manifest:
+ continue
+
+ if s.external:
+ continue
+
+ # This should not raise a 404.
+ manifest, _ = get_manifest_and_config(image.with_tag(default_tag(s)))
+
+ # Collect layer digests
+ pkg_to_all_digests[s.name] = {layer["digest"] for layer in manifest["layers"]}
+ pkg_to_own_digest[s.name] = manifest["layers"][-1]["digest"]
+
+ # Verify that all packages reference blobs of their runtime deps that uploaded fine.
+ for s in mpileaks.traverse():
+ if s.name in without_manifest:
+ continue
+
+ if s.external:
+ continue
+
+ expected_digests = {
+ pkg_to_own_digest[t.name]
+ for t in s.traverse(deptype=("link", "run"), root=True)
+ if t.name not in without_manifest
+ }
+
+ # Test with issubset, cause we don't have the blob of libdwarf as it has no manifest.
+ assert expected_digests and expected_digests.issubset(pkg_to_all_digests[s.name])
diff --git a/lib/spack/spack/test/oci/mock_registry.py b/lib/spack/spack/test/oci/mock_registry.py
index 1bdf33a5d8..288598089d 100644
--- a/lib/spack/spack/test/oci/mock_registry.py
+++ b/lib/spack/spack/test/oci/mock_registry.py
@@ -17,6 +17,7 @@ import uuid
from typing import Callable, Dict, List, Optional, Pattern, Tuple
from urllib.request import Request
+import spack.oci.oci
from spack.oci.image import Digest
from spack.oci.opener import OCIAuthHandler
@@ -150,7 +151,9 @@ class InMemoryOCIRegistry(DummyServer):
A third option is to use the chunked upload, but this is not implemented here, because
it's typically a major performance hit in upload speed, so we're not using it in Spack."""
- def __init__(self, domain: str, allow_single_post: bool = True) -> None:
+ def __init__(
+ self, domain: str, allow_single_post: bool = True, tags_per_page: int = 100
+ ) -> None:
super().__init__(domain)
self.router.register("GET", r"/v2/", self.index)
self.router.register("HEAD", r"/v2/(?P<name>.+)/blobs/(?P<digest>.+)", self.head_blob)
@@ -164,6 +167,9 @@ class InMemoryOCIRegistry(DummyServer):
# If True, allow single POST upload, not all registries support this
self.allow_single_post = allow_single_post
+ # How many tags are returned in a single request
+ self.tags_per_page = tags_per_page
+
# Used for POST + PUT upload. This is a map from session ID to image name
self.sessions: Dict[str, str] = {}
@@ -171,7 +177,7 @@ class InMemoryOCIRegistry(DummyServer):
self.blobs: Dict[str, bytes] = {}
# Map from (name, tag) to manifest
- self.manifests: Dict[Tuple[str, str], Dict] = {}
+ self.manifests: Dict[Tuple[str, str], dict] = {}
def index(self, req: Request):
return MockHTTPResponse.with_json(200, "OK", body={})
@@ -225,15 +231,12 @@ class InMemoryOCIRegistry(DummyServer):
def put_manifest(self, req: Request, name: str, ref: str):
# In requests, Python runs header.capitalize().
content_type = req.get_header("Content-type")
- assert content_type in (
- "application/vnd.oci.image.manifest.v1+json",
- "application/vnd.oci.image.index.v1+json",
- )
+ assert content_type in spack.oci.oci.all_content_type
index_or_manifest = json.loads(self._require_data(req))
# Verify that we have all blobs (layers for manifest, manifests for index)
- if content_type == "application/vnd.oci.image.manifest.v1+json":
+ if content_type in spack.oci.oci.manifest_content_type:
for layer in index_or_manifest["layers"]:
assert layer["digest"] in self.blobs, "Missing blob while uploading manifest"
@@ -282,10 +285,34 @@ class InMemoryOCIRegistry(DummyServer):
return MockHTTPResponse(201, "Created", headers={"Location": f"/v2/{name}/blobs/{digest}"})
def list_tags(self, req: Request, name: str):
+ # Paginate using Link headers, this was added to the spec in the following commit:
+ # https://github.com/opencontainers/distribution-spec/commit/2ed79d930ecec11dd755dc8190409a3b10f01ca9
+
# List all tags, exclude digests.
- tags = [_tag for _name, _tag in self.manifests.keys() if _name == name and ":" not in _tag]
- tags.sort()
- return MockHTTPResponse.with_json(200, "OK", body={"tags": tags})
+ all_tags = sorted(
+ _tag for _name, _tag in self.manifests.keys() if _name == name and ":" not in _tag
+ )
+
+ query = urllib.parse.parse_qs(urllib.parse.urlparse(req.full_url).query)
+
+ n = int(query["n"][0]) if "n" in query else self.tags_per_page
+
+ if "last" in query:
+ try:
+ offset = all_tags.index(query["last"][0]) + 1
+ except ValueError:
+ return MockHTTPResponse(404, "Not found")
+ else:
+ offset = 0
+
+ tags = all_tags[offset : offset + n]
+
+ if offset + n < len(all_tags):
+ headers = {"Link": f'</v2/{name}/tags/list?last={tags[-1]}&n={n}>; rel="next"'}
+ else:
+ headers = None
+
+ return MockHTTPResponse.with_json(200, "OK", headers=headers, body={"tags": tags})
class DummyServerUrllibHandler(urllib.request.BaseHandler):
diff --git a/lib/spack/spack/test/oci/urlopen.py b/lib/spack/spack/test/oci/urlopen.py
index 78d713f7e8..2d82ea5d09 100644
--- a/lib/spack/spack/test/oci/urlopen.py
+++ b/lib/spack/spack/test/oci/urlopen.py
@@ -6,6 +6,7 @@
import hashlib
import json
+import random
import urllib.error
import urllib.parse
import urllib.request
@@ -13,12 +14,13 @@ from urllib.request import Request
import pytest
-import spack.mirror
+import spack.mirrors.mirror
from spack.oci.image import Digest, ImageReference, default_config, default_manifest
from spack.oci.oci import (
copy_missing_layers,
get_manifest_and_config,
image_from_mirror,
+ list_tags,
upload_blob,
upload_manifest,
)
@@ -472,7 +474,7 @@ def test_copy_missing_layers(tmpdir, config):
def test_image_from_mirror():
- mirror = spack.mirror.Mirror("oci://example.com/image")
+ mirror = spack.mirrors.mirror.Mirror("oci://example.com/image")
assert image_from_mirror(mirror) == ImageReference.from_string("example.com/image")
@@ -509,25 +511,25 @@ def test_default_credentials_provider():
mirrors = [
# OCI mirror with push credentials
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"url": "oci://a.example.com/image", "push": {"access_pair": ["user.a", "pass.a"]}}
),
# Not an OCI mirror
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"url": "https://b.example.com/image", "access_pair": ["user.b", "pass.b"]}
),
# No credentials
- spack.mirror.Mirror("oci://c.example.com/image"),
+ spack.mirrors.mirror.Mirror("oci://c.example.com/image"),
# Top-level credentials
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"url": "oci://d.example.com/image", "access_pair": ["user.d", "pass.d"]}
),
# Dockerhub short reference
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"url": "oci://user/image", "access_pair": ["dockerhub_user", "dockerhub_pass"]}
),
# Localhost (not a dockerhub short reference)
- spack.mirror.Mirror(
+ spack.mirrors.mirror.Mirror(
{"url": "oci://localhost/image", "access_pair": ["user.localhost", "pass.localhost"]}
),
]
@@ -670,3 +672,31 @@ def test_retry(url, max_retries, expect_failure, expect_requests):
assert len(server.requests) == expect_requests
assert sleep_time == [2**i for i in range(expect_requests - 1)]
+
+
+def test_list_tags():
+ # Follows a relatively new rewording of the OCI distribution spec, which is not yet tagged.
+ # https://github.com/opencontainers/distribution-spec/commit/2ed79d930ecec11dd755dc8190409a3b10f01ca9
+ N = 20
+ urlopen = create_opener(InMemoryOCIRegistry("example.com", tags_per_page=5)).open
+ image = ImageReference.from_string("example.com/image")
+ to_tag = lambda i: f"tag-{i:02}"
+
+ # Create N tags in arbitrary order
+ _tags_to_create = [to_tag(i) for i in range(N)]
+ random.shuffle(_tags_to_create)
+ for tag in _tags_to_create:
+ upload_manifest(image.with_tag(tag), default_manifest(), tag=True, _urlopen=urlopen)
+
+ # list_tags should return all tags from all pages in order
+ tags = list_tags(image, urlopen)
+ assert len(tags) == N
+ assert [to_tag(i) for i in range(N)] == tags
+
+ # Test a single request, which should give the first 5 tags
+ assert json.loads(urlopen(image.tags_url()).read())["tags"] == [to_tag(i) for i in range(5)]
+
+ # Test response at an offset, which should exclude the `last` tag.
+ assert json.loads(urlopen(image.tags_url() + f"?last={to_tag(N - 3)}").read())["tags"] == [
+ to_tag(i) for i in range(N - 2, N)
+ ]
diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py
deleted file mode 100644
index 79c7e828da..0000000000
--- a/lib/spack/spack/test/operating_system.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 2013-2024 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 spack.operating_systems.cray_backend as cray_backend
-
-
-def test_read_cle_release_file(tmpdir, monkeypatch):
- """test reading the Cray cle-release file"""
- cle_release_path = tmpdir.join("cle-release")
- with cle_release_path.open("w") as f:
- f.write(
- """\
-RELEASE=6.0.UP07
-BUILD=6.0.7424
-DATE=20190611
-ARCH=noarch
-NETWORK=ari
-PATCHSET=35-201906112304
-DUMMY=foo=bar
-"""
- )
-
- monkeypatch.setattr(cray_backend, "_cle_release_file", str(cle_release_path))
- attrs = cray_backend.read_cle_release_file()
-
- assert attrs["RELEASE"] == "6.0.UP07"
- assert attrs["BUILD"] == "6.0.7424"
- assert attrs["DATE"] == "20190611"
- assert attrs["ARCH"] == "noarch"
- assert attrs["NETWORK"] == "ari"
- assert attrs["PATCHSET"] == "35-201906112304"
- assert attrs["DUMMY"] == "foo=bar"
-
- assert cray_backend.CrayBackend._detect_crayos_version() == 6
-
-
-def test_read_clerelease_file(tmpdir, monkeypatch):
- """test reading the Cray clerelease file"""
- clerelease_path = tmpdir.join("clerelease")
- with clerelease_path.open("w") as f:
- f.write("5.2.UP04\n")
-
- monkeypatch.setattr(cray_backend, "_clerelease_file", str(clerelease_path))
- v = cray_backend.read_clerelease_file()
-
- assert v == "5.2.UP04"
-
- assert cray_backend.CrayBackend._detect_crayos_version() == 5
-
-
-def test_cle_release_precedence(tmpdir, monkeypatch):
- """test that cle-release file takes precedence over clerelease file."""
- cle_release_path = tmpdir.join("cle-release")
- clerelease_path = tmpdir.join("clerelease")
-
- with cle_release_path.open("w") as f:
- f.write(
- """\
-RELEASE=6.0.UP07
-BUILD=6.0.7424
-DATE=20190611
-ARCH=noarch
-NETWORK=ari
-PATCHSET=35-201906112304
-DUMMY=foo=bar
-"""
- )
-
- with clerelease_path.open("w") as f:
- f.write("5.2.UP04\n")
-
- monkeypatch.setattr(cray_backend, "_clerelease_file", str(clerelease_path))
- monkeypatch.setattr(cray_backend, "_cle_release_file", str(cle_release_path))
-
- assert cray_backend.CrayBackend._detect_crayos_version() == 6
diff --git a/lib/spack/spack/test/optional_deps.py b/lib/spack/spack/test/optional_deps.py
index 8d1c7e37e8..18fab35065 100644
--- a/lib/spack/spack/test/optional_deps.py
+++ b/lib/spack/spack/test/optional_deps.py
@@ -13,28 +13,44 @@ from spack.spec import Spec
# Normalize simple conditionals
("optional-dep-test", {"optional-dep-test": None}),
("optional-dep-test~a", {"optional-dep-test~a": None}),
- ("optional-dep-test+a", {"optional-dep-test+a": {"a": None}}),
- ("optional-dep-test a=true", {"optional-dep-test a=true": {"a": None}}),
- ("optional-dep-test a=true", {"optional-dep-test+a": {"a": None}}),
- ("optional-dep-test@1.1", {"optional-dep-test@1.1": {"b": None}}),
- ("optional-dep-test%intel", {"optional-dep-test%intel": {"c": None}}),
- ("optional-dep-test%intel@64.1", {"optional-dep-test%intel@64.1": {"c": None, "d": None}}),
+ ("optional-dep-test+a", {"optional-dep-test+a": {"pkg-a": None}}),
+ ("optional-dep-test a=true", {"optional-dep-test a=true": {"pkg-a": None}}),
+ ("optional-dep-test a=true", {"optional-dep-test+a": {"pkg-a": None}}),
+ ("optional-dep-test@1.1", {"optional-dep-test@1.1": {"pkg-b": None}}),
+ ("optional-dep-test%intel", {"optional-dep-test%intel": {"pkg-c": None}}),
+ (
+ "optional-dep-test%intel@64.1",
+ {"optional-dep-test%intel@64.1": {"pkg-c": None, "pkg-d": None}},
+ ),
(
"optional-dep-test%intel@64.1.2",
- {"optional-dep-test%intel@64.1.2": {"c": None, "d": None}},
+ {"optional-dep-test%intel@64.1.2": {"pkg-c": None, "pkg-d": None}},
),
- ("optional-dep-test%clang@35", {"optional-dep-test%clang@35": {"e": None}}),
+ ("optional-dep-test%clang@35", {"optional-dep-test%clang@35": {"pkg-e": None}}),
# Normalize multiple conditionals
- ("optional-dep-test+a@1.1", {"optional-dep-test+a@1.1": {"a": None, "b": None}}),
- ("optional-dep-test+a%intel", {"optional-dep-test+a%intel": {"a": None, "c": None}}),
- ("optional-dep-test@1.1%intel", {"optional-dep-test@1.1%intel": {"b": None, "c": None}}),
+ ("optional-dep-test+a@1.1", {"optional-dep-test+a@1.1": {"pkg-a": None, "pkg-b": None}}),
+ (
+ "optional-dep-test+a%intel",
+ {"optional-dep-test+a%intel": {"pkg-a": None, "pkg-c": None}},
+ ),
+ (
+ "optional-dep-test@1.1%intel",
+ {"optional-dep-test@1.1%intel": {"pkg-b": None, "pkg-c": None}},
+ ),
(
"optional-dep-test@1.1%intel@64.1.2+a",
- {"optional-dep-test@1.1%intel@64.1.2+a": {"a": None, "b": None, "c": None, "d": None}},
+ {
+ "optional-dep-test@1.1%intel@64.1.2+a": {
+ "pkg-a": None,
+ "pkg-b": None,
+ "pkg-c": None,
+ "pkg-d": None,
+ }
+ },
),
(
"optional-dep-test@1.1%clang@36.5+a",
- {"optional-dep-test@1.1%clang@36.5+a": {"b": None, "a": None, "e": None}},
+ {"optional-dep-test@1.1%clang@36.5+a": {"pkg-b": None, "pkg-a": None, "pkg-e": None}},
),
# Chained MPI
(
@@ -44,7 +60,10 @@ from spack.spec import Spec
# Each of these dependencies comes from a conditional
# dependency on another. This requires iterating to evaluate
# the whole chain.
- ("optional-dep-test+f", {"optional-dep-test+f": {"f": None, "g": None, "mpi": None}}),
+ (
+ "optional-dep-test+f",
+ {"optional-dep-test+f": {"pkg-f": None, "pkg-g": None, "mpi": None}},
+ ),
]
)
def spec_and_expected(request):
@@ -53,22 +72,15 @@ def spec_and_expected(request):
return spec, Spec.from_literal(d)
-def test_normalize(spec_and_expected, config, mock_packages):
- spec, expected = spec_and_expected
- spec = Spec(spec)
- spec.normalize()
- assert spec.eq_dag(expected, deptypes=False)
-
-
def test_default_variant(config, mock_packages):
spec = Spec("optional-dep-test-3")
spec.concretize()
- assert "a" in spec
+ assert "pkg-a" in spec
spec = Spec("optional-dep-test-3~var")
spec.concretize()
- assert "a" in spec
+ assert "pkg-a" in spec
spec = Spec("optional-dep-test-3+var")
spec.concretize()
- assert "b" in spec
+ assert "pkg-b" in spec
diff --git a/lib/spack/spack/test/package_class.py b/lib/spack/spack/test/package_class.py
index 46fd560185..72eaa1f739 100644
--- a/lib/spack/spack/test/package_class.py
+++ b/lib/spack/spack/test/package_class.py
@@ -5,7 +5,7 @@
"""Test class methods on Package objects.
-This doesn't include methods on package *instances* (like do_install(),
+This doesn't include methods on package *instances* (like do_patch(),
etc.). Only methods like ``possible_dependencies()`` that deal with the
static DSL metadata for packages.
"""
@@ -17,12 +17,16 @@ import pytest
import llnl.util.filesystem as fs
+import spack.compilers
import spack.deptypes as dt
+import spack.error
import spack.install_test
+import spack.package
import spack.package_base
import spack.repo
+import spack.spec
from spack.build_systems.generic import Package
-from spack.installer import InstallError
+from spack.error import InstallError
@pytest.fixture(scope="module")
@@ -71,7 +75,8 @@ def test_possible_direct_dependencies(mock_packages, mpileaks_possible_deps):
def test_possible_dependencies_virtual(mock_packages, mpi_names):
expected = dict(
- (name, set(spack.repo.PATH.get_pkg_class(name).dependencies)) for name in mpi_names
+ (name, set(dep for dep in spack.repo.PATH.get_pkg_class(name).dependencies_by_name()))
+ for name in mpi_names
)
# only one mock MPI has a dependency
@@ -141,19 +146,19 @@ def setup_install_test(source_paths, test_root):
"spec,sources,extras,expect",
[
(
- "a",
+ "pkg-a",
["example/a.c"], # Source(s)
["example/a.c"], # Extra test source
["example/a.c"],
), # Test install dir source(s)
(
- "b",
+ "pkg-b",
["test/b.cpp", "test/b.hpp", "example/b.txt"], # Source(s)
["test"], # Extra test source
["test/b.cpp", "test/b.hpp"],
), # Test install dir source
(
- "c",
+ "pkg-c",
["examples/a.py", "examples/b.py", "examples/c.py", "tests/d.py"],
["examples/b.py", "tests"],
["examples/b.py", "tests/d.py"],
@@ -201,7 +206,7 @@ def test_cache_extra_sources(install_mockery, spec, sources, extras, expect):
def test_cache_extra_sources_fails(install_mockery):
- s = spack.spec.Spec("a").concretized()
+ s = spack.spec.Spec("pkg-a").concretized()
s.package.spec.concretize()
with pytest.raises(InstallError) as exc_info:
@@ -225,7 +230,7 @@ def test_package_url_and_urls():
url = "https://www.example.com/url-package-1.0.tgz"
urls = ["https://www.example.com/archive"]
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
with pytest.raises(ValueError, match="defines both"):
URLsPackage(s)
@@ -235,7 +240,7 @@ def test_package_license():
extendees = None # currently a required attribute for is_extension()
license_files = None
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = LicensedPackage(s)
assert pkg.global_license_file is None
@@ -248,96 +253,36 @@ class BaseTestPackage(Package):
def test_package_version_fails():
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = BaseTestPackage(s)
with pytest.raises(ValueError, match="does not have a concrete version"):
pkg.version()
def test_package_tester_fails():
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = BaseTestPackage(s)
with pytest.raises(ValueError, match="without concrete version"):
pkg.tester()
def test_package_fetcher_fails():
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = BaseTestPackage(s)
with pytest.raises(ValueError, match="without concrete version"):
pkg.fetcher
-def test_package_no_extendees():
- s = spack.spec.Spec("a")
- pkg = BaseTestPackage(s)
- assert pkg.extendee_args is None
-
-
def test_package_test_no_compilers(mock_packages, monkeypatch, capfd):
def compilers(compiler, arch_spec):
return None
monkeypatch.setattr(spack.compilers, "compilers_for_spec", compilers)
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = BaseTestPackage(s)
pkg.test_requires_compiler = True
pkg.do_test()
error = capfd.readouterr()[1]
assert "Skipping tests for package" in error
assert "test requires missing compiler" in error
-
-
-# TODO (post-34236): Remove when remove deprecated run_test(), etc.
-@pytest.mark.parametrize(
- "msg,installed,purpose,expected",
- [
- ("do-nothing", False, "test: echo", "do-nothing"),
- ("not installed", True, "test: echo not installed", "expected in prefix"),
- ],
-)
-def test_package_run_test_install(
- install_mockery_mutable_config, mock_fetch, capfd, msg, installed, purpose, expected
-):
- """Confirm expected outputs from run_test for installed/not installed exe."""
- s = spack.spec.Spec("trivial-smoke-test").concretized()
- pkg = s.package
-
- pkg.run_test(
- "echo", msg, expected=[expected], installed=installed, purpose=purpose, work_dir="."
- )
- output = capfd.readouterr()[0]
- assert expected in output
-
-
-# TODO (post-34236): Remove when remove deprecated run_test(), etc.
-@pytest.mark.parametrize(
- "skip,failures,status",
- [
- (True, 0, str(spack.install_test.TestStatus.SKIPPED)),
- (False, 1, str(spack.install_test.TestStatus.FAILED)),
- ],
-)
-def test_package_run_test_missing(
- install_mockery_mutable_config, mock_fetch, capfd, skip, failures, status
-):
- """Confirm expected results from run_test for missing exe when skip or not."""
- s = spack.spec.Spec("trivial-smoke-test").concretized()
- pkg = s.package
-
- pkg.run_test("no-possible-program", skip_missing=skip)
- output = capfd.readouterr()[0]
- assert len(pkg.tester.test_failures) == failures
- assert status in output
-
-
-# TODO (post-34236): Remove when remove deprecated run_test(), etc.
-def test_package_run_test_fail_fast(install_mockery_mutable_config, mock_fetch):
- """Confirm expected exception when run_test with fail_fast enabled."""
- s = spack.spec.Spec("trivial-smoke-test").concretized()
- pkg = s.package
-
- with spack.config.override("config:fail_fast", True):
- with pytest.raises(spack.install_test.TestFailure, match="Failed to find executable"):
- pkg.run_test("no-possible-program")
diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py
index 49066b309f..ad4c797cf9 100644
--- a/lib/spack/spack/test/packages.py
+++ b/lib/spack/spack/test/packages.py
@@ -7,8 +7,11 @@ import os
import pytest
+import spack.build_systems.cmake as cmake
import spack.directives
+import spack.error
import spack.fetch_strategy
+import spack.package_base
import spack.repo
from spack.paths import mock_packages_path
from spack.spec import Spec
@@ -32,12 +35,12 @@ class TestPackage:
assert pkg_cls.name == "mpich"
def test_package_filename(self):
- repo = spack.repo.Repo(mock_packages_path)
+ repo = spack.repo.from_path(mock_packages_path)
filename = repo.filename_for_package_name("mpich")
assert filename == os.path.join(mock_packages_path, "packages", "mpich", "package.py")
def test_nonexisting_package_filename(self):
- repo = spack.repo.Repo(mock_packages_path)
+ repo = spack.repo.from_path(mock_packages_path)
filename = repo.filename_for_package_name("some-nonexisting-package")
assert filename == os.path.join(
mock_packages_path, "packages", "some-nonexisting-package", "package.py"
@@ -61,14 +64,15 @@ class TestPackage:
import spack.pkg.builtin.mock.mpich as mp # noqa: F401
from spack.pkg.builtin import mock # noqa: F401
- def test_inheritance_of_diretives(self):
+ def test_inheritance_of_directives(self):
pkg_cls = spack.repo.PATH.get_pkg_class("simple-inheritance")
# Check dictionaries that should have been filled by directives
- assert len(pkg_cls.dependencies) == 3
- assert "cmake" in pkg_cls.dependencies
- assert "openblas" in pkg_cls.dependencies
- assert "mpi" in pkg_cls.dependencies
+ dependencies = pkg_cls.dependencies_by_name()
+ assert len(dependencies) == 3
+ assert "cmake" in dependencies
+ assert "openblas" in dependencies
+ assert "mpi" in dependencies
assert len(pkg_cls.provided) == 2
# Check that Spec instantiation behaves as we expect
@@ -126,17 +130,17 @@ def test_urls_for_versions(mock_packages, config):
def test_url_for_version_with_no_urls(mock_packages, config):
spec = Spec("git-test")
pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
- with pytest.raises(spack.package_base.NoURLError):
+ with pytest.raises(spack.error.NoURLError):
pkg_cls(spec).url_for_version("1.0")
- with pytest.raises(spack.package_base.NoURLError):
+ with pytest.raises(spack.error.NoURLError):
pkg_cls(spec).url_for_version("1.1")
def test_custom_cmake_prefix_path(mock_packages, config):
spec = Spec("depends-on-define-cmake-prefix-paths").concretized()
- assert spack.build_environment.get_cmake_prefix_path(spec.package) == [
+ assert cmake.get_cmake_prefix_path(spec.package) == [
spec["define-cmake-prefix-paths"].prefix.test
]
@@ -258,6 +262,7 @@ def test_git_url_top_level_git_versions(version_str, tag, commit, branch):
assert fetcher.tag == tag
assert fetcher.commit == commit
assert fetcher.branch == branch
+ assert fetcher.url == pkg_factory("git-url-top-level").git
@pytest.mark.usefixtures("mock_packages", "config")
@@ -318,3 +323,14 @@ def test_package_deprecated_version(mock_packages, mock_fetch, mock_stage):
assert spack.package_base.deprecated_version(pkg_cls, "1.1.0")
assert not spack.package_base.deprecated_version(pkg_cls, "1.0.0")
+
+
+def test_package_can_have_sparse_checkout_properties(mock_packages, mock_fetch, mock_stage):
+ spec = Spec("git-sparsepaths-pkg")
+ pkg_cls = spack.repo.PATH.get_pkg_class(spec.name)
+ assert hasattr(pkg_cls, "git_sparse_paths")
+
+ fetcher = spack.fetch_strategy.for_package_version(pkg_cls(spec), "1.0")
+ assert isinstance(fetcher, spack.fetch_strategy.GitFetchStrategy)
+ assert hasattr(fetcher, "git_sparse_paths")
+ assert fetcher.git_sparse_paths == pkg_cls.git_sparse_paths
diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py
index 92ff4f6961..1732c3e990 100644
--- a/lib/spack/spack/test/packaging.py
+++ b/lib/spack/spack/test/packaging.py
@@ -11,22 +11,26 @@ import os
import pathlib
import platform
import shutil
+import urllib.error
from collections import OrderedDict
import pytest
from llnl.util import filesystem as fs
-from llnl.util.symlink import symlink
+from llnl.util.symlink import readlink, symlink
import spack.binary_distribution as bindist
import spack.cmd.buildcache as buildcache
+import spack.config
import spack.error
+import spack.fetch_strategy
+import spack.mirrors.utils
import spack.package_base
-import spack.repo
-import spack.store
+import spack.stage
import spack.util.gpg
import spack.util.url as url_util
from spack.fetch_strategy import URLFetchStrategy
+from spack.installer import PackageInstaller
from spack.paths import mock_gpg_keys_path
from spack.relocate import (
macho_find_paths,
@@ -46,8 +50,8 @@ pytestmark = pytest.mark.not_on_windows("does not run on windows")
def test_buildcache(mock_archive, tmp_path, monkeypatch, mutable_config):
# Install a test package
spec = Spec("trivial-install-test-package").concretized()
- monkeypatch.setattr(spec.package, "fetcher", URLFetchStrategy(mock_archive.url))
- spec.package.do_install()
+ monkeypatch.setattr(spec.package, "fetcher", URLFetchStrategy(url=mock_archive.url))
+ PackageInstaller([spec.package], explicit=True).install()
pkghash = "/" + str(spec.dag_hash(7))
# Put some non-relocatable file in there
@@ -60,7 +64,7 @@ def test_buildcache(mock_archive, tmp_path, monkeypatch, mutable_config):
# Create the build cache and put it directly into the mirror
mirror_path = str(tmp_path / "test-mirror")
- spack.mirror.create(mirror_path, specs=[])
+ spack.mirrors.utils.create(mirror_path, specs=[])
# register mirror with spack config
mirrors = {"spack-mirror-test": url_util.path_to_file_url(mirror_path)}
@@ -181,12 +185,12 @@ def test_relocate_links(tmpdir):
relocate_links(["to_self", "to_dependency", "to_system"], prefix_to_prefix)
# These two are relocated
- assert os.readlink("to_self") == str(tmpdir.join("new_prefix_a", "file"))
- assert os.readlink("to_dependency") == str(tmpdir.join("new_prefix_b", "file"))
+ assert readlink("to_self") == str(tmpdir.join("new_prefix_a", "file"))
+ assert readlink("to_dependency") == str(tmpdir.join("new_prefix_b", "file"))
# These two are not.
- assert os.readlink("to_system") == system_path
- assert os.readlink("to_self_but_relative") == "relative"
+ assert readlink("to_system") == system_path
+ assert readlink("to_self_but_relative") == "relative"
def test_needs_relocation():
@@ -478,7 +482,7 @@ def test_macho_make_paths():
@pytest.fixture()
-def mock_download():
+def mock_download(monkeypatch):
"""Mock a failing download strategy."""
class FailedDownloadStrategy(spack.fetch_strategy.FetchStrategy):
@@ -487,28 +491,21 @@ def mock_download():
def fetch(self):
raise spack.fetch_strategy.FailedDownloadError(
- "<non-existent URL>", "This FetchStrategy always fails"
+ urllib.error.URLError("This FetchStrategy always fails")
)
- fetcher = FailedDownloadStrategy()
-
@property
def fake_fn(self):
- return fetcher
+ return FailedDownloadStrategy()
- orig_fn = spack.package_base.PackageBase.fetcher
- spack.package_base.PackageBase.fetcher = fake_fn
- yield
- spack.package_base.PackageBase.fetcher = orig_fn
+ monkeypatch.setattr(spack.package_base.PackageBase, "fetcher", fake_fn)
@pytest.mark.parametrize(
"manual,instr", [(False, False), (False, True), (True, False), (True, True)]
)
@pytest.mark.disable_clean_stage_check
-def test_manual_download(
- install_mockery, mock_download, default_mock_concretization, monkeypatch, manual, instr
-):
+def test_manual_download(mock_download, default_mock_concretization, monkeypatch, manual, instr):
"""
Ensure expected fetcher fail message based on manual download and instr.
"""
@@ -517,7 +514,7 @@ def test_manual_download(
def _instr(pkg):
return f"Download instructions for {pkg.spec.name}"
- spec = default_mock_concretization("a")
+ spec = default_mock_concretization("pkg-a")
spec.package.manual_download = manual
if instr:
monkeypatch.setattr(spack.package_base.PackageBase, "download_instr", _instr)
@@ -539,20 +536,48 @@ def fetching_not_allowed(monkeypatch):
monkeypatch.setattr(spack.package_base.PackageBase, "fetcher", FetchingNotAllowed())
-def test_fetch_without_code_is_noop(
- default_mock_concretization, install_mockery, fetching_not_allowed
-):
+def test_fetch_without_code_is_noop(default_mock_concretization, fetching_not_allowed):
"""do_fetch for packages without code should be a no-op"""
- pkg = default_mock_concretization("a").package
+ pkg = default_mock_concretization("pkg-a").package
pkg.has_code = False
pkg.do_fetch()
-def test_fetch_external_package_is_noop(
- default_mock_concretization, install_mockery, fetching_not_allowed
-):
+def test_fetch_external_package_is_noop(default_mock_concretization, fetching_not_allowed):
"""do_fetch for packages without code should be a no-op"""
- spec = default_mock_concretization("a")
+ spec = default_mock_concretization("pkg-a")
spec.external_path = "/some/where"
assert spec.external
spec.package.do_fetch()
+
+
+@pytest.mark.parametrize(
+ "relocation_dict",
+ [
+ {"/foo/bar/baz": "/a/b/c", "/foo/bar": "/a/b"},
+ # Ensure correctness does not depend on the ordering of the dict
+ {"/foo/bar": "/a/b", "/foo/bar/baz": "/a/b/c"},
+ ],
+)
+def test_macho_relocation_with_changing_projection(relocation_dict):
+ """Tests that prefix relocation is computed correctly when the prefixes to be relocated
+ contain a directory and its subdirectories.
+
+ This happens when relocating to a new place AND changing the store projection. In that case we
+ might have a relocation dict like:
+
+ /foo/bar/baz/ -> /a/b/c
+ /foo/bar -> /a/b
+
+ What we need to check is that we don't end up in situations where we relocate to a mixture of
+ the two schemes, like /a/b/baz.
+ """
+ original_rpath = "/foo/bar/baz/abcdef"
+ result = macho_find_paths(
+ [original_rpath],
+ deps=[],
+ idpath=None,
+ old_layout_root="/foo",
+ prefix_to_prefix=relocation_dict,
+ )
+ assert result[original_rpath] == "/a/b/c/abcdef"
diff --git a/lib/spack/spack/test/patch.py b/lib/spack/spack/test/patch.py
index bad8f2403d..4b5f31b904 100644
--- a/lib/spack/spack/test/patch.py
+++ b/lib/spack/spack/test/patch.py
@@ -6,16 +6,20 @@
import collections
import filecmp
import os
+import shutil
import sys
import pytest
from llnl.util.filesystem import mkdirp, touch, working_dir
+import spack.error
+import spack.fetch_strategy
import spack.patch
import spack.paths
import spack.repo
-import spack.util.compression
+import spack.spec
+import spack.stage
import spack.util.url as url_util
from spack.spec import Spec
from spack.stage import Stage
@@ -89,7 +93,6 @@ def test_url_patch(mock_patch_stage, filename, sha256, archive_sha256, config):
# Make a patch object
url = url_util.path_to_file_url(filename)
s = Spec("patch").concretized()
- patch = spack.patch.UrlPatch(s.package, url, sha256=sha256, archive_sha256=archive_sha256)
# make a stage
with Stage(url) as stage: # TODO: url isn't used; maybe refactor Stage
@@ -105,6 +108,8 @@ first line
second line
"""
)
+ # save it for later comparison
+ shutil.copyfile("foo.txt", "foo-original.txt")
# write the expected result of patching.
with open("foo-expected.txt", "w") as f:
f.write(
@@ -115,6 +120,7 @@ third line
"""
)
# apply the patch and compare files
+ patch = spack.patch.UrlPatch(s.package, url, sha256=sha256, archive_sha256=archive_sha256)
with patch.stage:
patch.stage.create()
patch.stage.fetch()
@@ -124,6 +130,19 @@ third line
with working_dir(stage.source_path):
assert filecmp.cmp("foo.txt", "foo-expected.txt")
+ # apply the patch in reverse and compare files
+ patch = spack.patch.UrlPatch(
+ s.package, url, sha256=sha256, archive_sha256=archive_sha256, reverse=True
+ )
+ with patch.stage:
+ patch.stage.create()
+ patch.stage.fetch()
+ patch.stage.expand_archive()
+ patch.apply(stage)
+
+ with working_dir(stage.source_path):
+ assert filecmp.cmp("foo.txt", "foo-original.txt")
+
def test_patch_in_spec(mock_packages, config):
"""Test whether patches in a package appear in the spec."""
@@ -196,22 +215,24 @@ def test_nested_directives(mock_packages):
# this ensures that results of dependency patches were properly added
# to Dependency objects.
- libelf_dep = next(iter(patcher.dependencies["libelf"].values()))
+ deps_by_name = patcher.dependencies_by_name()
+
+ libelf_dep = deps_by_name["libelf"][0]
assert len(libelf_dep.patches) == 1
assert len(libelf_dep.patches[Spec()]) == 1
- libdwarf_dep = next(iter(patcher.dependencies["libdwarf"].values()))
+ libdwarf_dep = deps_by_name["libdwarf"][0]
assert len(libdwarf_dep.patches) == 2
assert len(libdwarf_dep.patches[Spec()]) == 1
assert len(libdwarf_dep.patches[Spec("@20111030")]) == 1
- fake_dep = next(iter(patcher.dependencies["fake"].values()))
+ fake_dep = deps_by_name["fake"][0]
assert len(fake_dep.patches) == 1
assert len(fake_dep.patches[Spec()]) == 2
@pytest.mark.not_on_windows("Test requires Autotools")
-def test_patched_dependency(mock_packages, config, install_mockery, mock_fetch):
+def test_patched_dependency(mock_packages, install_mockery, mock_fetch):
"""Test whether patched dependencies work."""
spec = Spec("patch-a-dependency")
spec.concretize()
@@ -250,14 +271,11 @@ def trigger_bad_patch(pkg):
def test_patch_failure_develop_spec_exits_gracefully(
- mock_packages, config, install_mockery, mock_fetch, tmpdir
+ mock_packages, install_mockery, mock_fetch, tmpdir, mock_stage
):
- """
- ensure that a failing patch does not trigger exceptions
- for develop specs
- """
+ """ensure that a failing patch does not trigger exceptions for develop specs"""
- spec = Spec("patch-a-dependency " "^libelf dev_path=%s" % str(tmpdir))
+ spec = Spec(f"patch-a-dependency ^libelf dev_path={tmpdir}")
spec.concretize()
libelf = spec["libelf"]
assert "patches" in list(libelf.variants.keys())
@@ -269,7 +287,7 @@ def test_patch_failure_develop_spec_exits_gracefully(
# success if no exceptions raised
-def test_patch_failure_restages(mock_packages, config, install_mockery, mock_fetch):
+def test_patch_failure_restages(mock_packages, install_mockery, mock_fetch):
"""
ensure that a failing patch does not trigger exceptions
for non-develop specs and the source gets restaged
@@ -419,10 +437,23 @@ def test_patch_no_file():
patch = spack.patch.Patch(fp, "nonexistent_file", 0, "")
patch.path = "test"
- with pytest.raises(spack.patch.NoSuchPatchError, match="No such patch:"):
+ with pytest.raises(spack.error.NoSuchPatchError, match="No such patch:"):
patch.apply("")
+def test_patch_no_sha256():
+ # Give it the attributes we need to construct the error message
+ FakePackage = collections.namedtuple("FakePackage", ["name", "namespace", "fullname"])
+ fp = FakePackage("fake-package", "test", "fake-package")
+ url = url_util.path_to_file_url("foo.tgz")
+ match = "Compressed patches require 'archive_sha256' and patch 'sha256' attributes: file://"
+ with pytest.raises(spack.error.PatchDirectiveError, match=match):
+ spack.patch.UrlPatch(fp, url, sha256="", archive_sha256="")
+ match = "URL patches require a sha256 checksum"
+ with pytest.raises(spack.error.PatchDirectiveError, match=match):
+ spack.patch.UrlPatch(fp, url, sha256="", archive_sha256="abc")
+
+
@pytest.mark.parametrize("level", [-1, 0.0, "1"])
def test_invalid_level(level):
# Give it the attributes we need to construct the error message
@@ -430,3 +461,41 @@ def test_invalid_level(level):
fp = FakePackage("fake-package", "test")
with pytest.raises(ValueError, match="Patch level needs to be a non-negative integer."):
spack.patch.Patch(fp, "nonexistent_file", level, "")
+
+
+def test_equality():
+ FakePackage = collections.namedtuple("FakePackage", ["name", "namespace", "fullname"])
+ fp = FakePackage("fake-package", "test", "fake-package")
+ patch1 = spack.patch.UrlPatch(fp, "nonexistent_url1", sha256="abc")
+ patch2 = spack.patch.UrlPatch(fp, "nonexistent_url2", sha256="def")
+ assert patch1 == patch1
+ assert patch1 != patch2
+ assert patch1 != "not a patch"
+
+
+def test_sha256_setter(mock_patch_stage, config):
+ path = os.path.join(data_path, "foo.patch")
+ s = Spec("patch").concretized()
+ patch = spack.patch.FilePatch(s.package, path, level=1, working_dir=".")
+ patch.sha256 = "abc"
+
+
+def test_invalid_from_dict(mock_packages, config):
+ dictionary = {}
+ with pytest.raises(ValueError, match="Invalid patch dictionary:"):
+ spack.patch.from_dict(dictionary)
+
+ dictionary = {"owner": "patch"}
+ with pytest.raises(ValueError, match="Invalid patch dictionary:"):
+ spack.patch.from_dict(dictionary)
+
+ dictionary = {
+ "owner": "patch",
+ "relative_path": "foo.patch",
+ "level": 1,
+ "working_dir": ".",
+ "reverse": False,
+ "sha256": bar_sha256,
+ }
+ with pytest.raises(spack.fetch_strategy.ChecksumError, match="sha256 checksum failed for"):
+ spack.patch.from_dict(dictionary)
diff --git a/lib/spack/spack/test/projections.py b/lib/spack/spack/test/projections.py
new file mode 100644
index 0000000000..c01b48440a
--- /dev/null
+++ b/lib/spack/spack/test/projections.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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 datetime import date
+
+import spack.projections
+import spack.spec
+
+
+def test_projection_expansion(mock_packages, monkeypatch):
+ """Test that env variables and spack config variables are expanded in projections"""
+
+ monkeypatch.setenv("FOO_ENV_VAR", "test-string")
+ projections = {"all": "{name}-{version}/$FOO_ENV_VAR/$date"}
+ spec = spack.spec.Spec("fake@1.0")
+ projection = spack.projections.get_projection(projections, spec)
+ assert "{name}-{version}/test-string/%s" % date.today().strftime("%Y-%m-%d") == projection
diff --git a/lib/spack/spack/test/relocate.py b/lib/spack/spack/test/relocate.py
index 6c8c0b1594..bceddbe728 100644
--- a/lib/spack/spack/test/relocate.py
+++ b/lib/spack/spack/test/relocate.py
@@ -9,14 +9,10 @@ import shutil
import pytest
-import spack.concretize
-import spack.paths
import spack.platforms
import spack.relocate
import spack.relocate_text as relocate_text
-import spack.spec
-import spack.store
-import spack.tengine
+import spack.repo
import spack.util.executable
pytestmark = pytest.mark.not_on_windows("Tests fail on Windows")
@@ -47,14 +43,6 @@ def text_in_bin(text, binary):
@pytest.fixture()
-def mock_patchelf(tmpdir, mock_executable):
- def _factory(output):
- return mock_executable("patchelf", output=output)
-
- return _factory
-
-
-@pytest.fixture()
def make_dylib(tmpdir_factory):
"""Create a shared library with unfriendly qualities.
@@ -291,6 +279,14 @@ def test_relocate_text_bin_raise_if_new_prefix_is_longer(tmpdir):
@pytest.mark.requires_executables("install_name_tool", "file", "cc")
def test_fixup_macos_rpaths(make_dylib, make_object_file):
+ compiler_cls = spack.repo.PATH.get_pkg_class("apple-clang")
+ compiler_version = compiler_cls.determine_version("cc")
+ try:
+ # See https://forums.swift.org/t/xcode-ships-llvm-15-but-swift-builds-llvm-16/67377
+ xcode_major_version = int(compiler_version.split(".")[0])
+ except IndexError:
+ pytest.xfail("cannot determine the major version of XCode")
+
# For each of these tests except for the "correct" case, the first fixup
# should make changes, and the second fixup should be a null-op.
fixup_rpath = spack.relocate.fixup_macos_rpath
@@ -301,7 +297,9 @@ def test_fixup_macos_rpaths(make_dylib, make_object_file):
# Non-relocatable library id and duplicate rpaths
(root, filename) = make_dylib("abs", duplicate_rpaths)
- assert fixup_rpath(root, filename)
+ # XCode 15 ships a new linker that takes care of deduplication
+ if xcode_major_version < 15:
+ assert fixup_rpath(root, filename)
assert not fixup_rpath(root, filename)
# Hardcoded but relocatable library id (but we do NOT relocate)
@@ -310,7 +308,9 @@ def test_fixup_macos_rpaths(make_dylib, make_object_file):
# Library id uses rpath but there are extra duplicate rpaths
(root, filename) = make_dylib("rpath", duplicate_rpaths)
- assert fixup_rpath(root, filename)
+ # XCode 15 ships a new linker that takes care of deduplication
+ if xcode_major_version < 15:
+ assert fixup_rpath(root, filename)
assert not fixup_rpath(root, filename)
# Shared library was constructed with relocatable id from the get-go
@@ -333,7 +333,9 @@ def test_fixup_macos_rpaths(make_dylib, make_object_file):
# Duplicate nonexistent rpath will need *two* passes
(root, filename) = make_dylib("rpath", bad_rpath * 2)
assert fixup_rpath(root, filename)
- assert fixup_rpath(root, filename)
+ # XCode 15 ships a new linker that takes care of deduplication
+ if xcode_major_version < 15:
+ assert fixup_rpath(root, filename)
assert not fixup_rpath(root, filename)
# Test on an object file, which *also* has type 'application/x-mach-binary'
diff --git a/lib/spack/spack/test/repo.py b/lib/spack/spack/test/repo.py
index 877b4af243..a013078a82 100644
--- a/lib/spack/spack/test/repo.py
+++ b/lib/spack/spack/test/repo.py
@@ -3,52 +3,62 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import pathlib
import pytest
import spack.package_base
import spack.paths
import spack.repo
+import spack.spec
+import spack.util.file_cache
@pytest.fixture(params=["packages", "", "foo"])
-def extra_repo(tmpdir_factory, request):
+def extra_repo(tmp_path_factory, request):
repo_namespace = "extra_test_repo"
- repo_dir = tmpdir_factory.mktemp(repo_namespace)
- repo_dir.ensure(request.param, dir=True)
-
- with open(str(repo_dir.join("repo.yaml")), "w") as f:
- f.write(
+ repo_dir = tmp_path_factory.mktemp(repo_namespace)
+ cache_dir = tmp_path_factory.mktemp("cache")
+ (repo_dir / request.param).mkdir(parents=True, exist_ok=True)
+ if request.param == "packages":
+ (repo_dir / "repo.yaml").write_text(
"""
repo:
namespace: extra_test_repo
"""
)
- if request.param != "packages":
- f.write(f" subdirectory: '{request.param}'")
- return (spack.repo.Repo(str(repo_dir)), request.param)
+ else:
+ (repo_dir / "repo.yaml").write_text(
+ f"""
+repo:
+ namespace: extra_test_repo
+ subdirectory: '{request.param}'
+"""
+ )
+ repo_cache = spack.util.file_cache.FileCache(str(cache_dir))
+ return spack.repo.Repo(str(repo_dir), cache=repo_cache), request.param
def test_repo_getpkg(mutable_mock_repo):
- mutable_mock_repo.get_pkg_class("a")
- mutable_mock_repo.get_pkg_class("builtin.mock.a")
+ mutable_mock_repo.get_pkg_class("pkg-a")
+ mutable_mock_repo.get_pkg_class("builtin.mock.pkg-a")
def test_repo_multi_getpkg(mutable_mock_repo, extra_repo):
mutable_mock_repo.put_first(extra_repo[0])
- mutable_mock_repo.get_pkg_class("a")
- mutable_mock_repo.get_pkg_class("builtin.mock.a")
+ mutable_mock_repo.get_pkg_class("pkg-a")
+ mutable_mock_repo.get_pkg_class("builtin.mock.pkg-a")
def test_repo_multi_getpkgclass(mutable_mock_repo, extra_repo):
mutable_mock_repo.put_first(extra_repo[0])
- mutable_mock_repo.get_pkg_class("a")
- mutable_mock_repo.get_pkg_class("builtin.mock.a")
+ mutable_mock_repo.get_pkg_class("pkg-a")
+ mutable_mock_repo.get_pkg_class("builtin.mock.pkg-a")
def test_repo_pkg_with_unknown_namespace(mutable_mock_repo):
with pytest.raises(spack.repo.UnknownNamespaceError):
- mutable_mock_repo.get_pkg_class("unknown.a")
+ mutable_mock_repo.get_pkg_class("unknown.pkg-a")
def test_repo_unknown_pkg(mutable_mock_repo):
@@ -121,19 +131,6 @@ def test_relative_import_spack_packages_as_python_modules(mock_packages):
assert issubclass(Mpileaks, spack.package_base.PackageBase)
-def test_all_virtual_packages_have_default_providers():
- """All virtual packages must have a default provider explicitly set."""
- configuration = spack.config.create()
- defaults = configuration.get("packages", scope="defaults")
- default_providers = defaults["all"]["providers"]
- providers = spack.repo.PATH.provider_index.providers
- default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages")
- for provider in providers:
- assert provider in default_providers, (
- "all providers must have a default in %s" % default_providers_filename
- )
-
-
def test_get_all_mock_packages(mock_packages):
"""Get the mock packages once each too."""
for name in mock_packages.all_package_names():
@@ -142,14 +139,14 @@ def test_get_all_mock_packages(mock_packages):
def test_repo_path_handles_package_removal(tmpdir, mock_packages):
builder = spack.repo.MockRepositoryBuilder(tmpdir, namespace="removal")
- builder.add_package("c")
+ builder.add_package("pkg-c")
with spack.repo.use_repositories(builder.root, override=False) as repos:
- r = repos.repo_for_pkg("c")
+ r = repos.repo_for_pkg("pkg-c")
assert r.namespace == "removal"
- builder.remove("c")
+ builder.remove("pkg-c")
with spack.repo.use_repositories(builder.root, override=False) as repos:
- r = repos.repo_for_pkg("c")
+ r = repos.repo_for_pkg("pkg-c")
assert r.namespace == "builtin.mock"
@@ -177,8 +174,11 @@ def test_repo_dump_virtuals(tmpdir, mutable_mock_repo, mock_packages, ensure_deb
([spack.paths.mock_packages_path, spack.paths.packages_path], ["builtin.mock", "builtin"]),
],
)
-def test_repository_construction_doesnt_use_globals(nullify_globals, repo_paths, namespaces):
- repo_path = spack.repo.RepoPath(*repo_paths)
+def test_repository_construction_doesnt_use_globals(
+ nullify_globals, tmp_path, repo_paths, namespaces
+):
+ repo_cache = spack.util.file_cache.FileCache(str(tmp_path / "cache"))
+ repo_path = spack.repo.RepoPath(*repo_paths, cache=repo_cache)
assert len(repo_path.repos) == len(namespaces)
assert [x.namespace for x in repo_path.repos] == namespaces
@@ -188,8 +188,117 @@ def test_path_computation_with_names(method_name, mock_repo_path):
"""Tests that repositories can compute the correct paths when using both fully qualified
names and unqualified names.
"""
- repo_path = spack.repo.RepoPath(mock_repo_path)
+ repo_path = spack.repo.RepoPath(mock_repo_path, cache=None)
method = getattr(repo_path, method_name)
unqualified = method("mpileaks")
qualified = method("builtin.mock.mpileaks")
assert qualified == unqualified
+
+
+def test_use_repositories_and_import():
+ """Tests that use_repositories changes the import search too"""
+ import spack.paths
+
+ repo_dir = pathlib.Path(spack.paths.repos_path)
+ with spack.repo.use_repositories(str(repo_dir / "compiler_runtime.test")):
+ import spack.pkg.compiler_runtime.test.gcc_runtime
+
+ with spack.repo.use_repositories(str(repo_dir / "builtin.mock")):
+ import spack.pkg.builtin.mock.cmake
+
+
+@pytest.mark.usefixtures("nullify_globals")
+class TestRepo:
+ """Test that the Repo class work correctly, and does not depend on globals,
+ except the REPOS_FINDER.
+ """
+
+ def test_creation(self, mock_test_cache):
+ repo = spack.repo.Repo(spack.paths.mock_packages_path, cache=mock_test_cache)
+ assert repo.config_file.endswith("repo.yaml")
+ assert repo.namespace == "builtin.mock"
+
+ @pytest.mark.parametrize(
+ "name,expected", [("mpi", True), ("mpich", False), ("mpileaks", False)]
+ )
+ @pytest.mark.parametrize("repo_cls", [spack.repo.Repo, spack.repo.RepoPath])
+ def test_is_virtual(self, repo_cls, name, expected, mock_test_cache):
+ repo = repo_cls(spack.paths.mock_packages_path, cache=mock_test_cache)
+ assert repo.is_virtual(name) is expected
+ assert repo.is_virtual_safe(name) is expected
+
+ @pytest.mark.parametrize(
+ "module_name,expected",
+ [
+ ("dla_future", "dla-future"),
+ ("num7zip", "7zip"),
+ # If no package is there, None is returned
+ ("unknown", None),
+ ],
+ )
+ def test_real_name(self, module_name, expected, mock_test_cache):
+ """Test that we can correctly compute the 'real' name of a package, from the one
+ used to import the Python module.
+ """
+ repo = spack.repo.Repo(spack.paths.mock_packages_path, cache=mock_test_cache)
+ assert repo.real_name(module_name) == expected
+
+ @pytest.mark.parametrize("name", ["mpileaks", "7zip", "dla-future"])
+ def test_get(self, name, mock_test_cache):
+ repo = spack.repo.Repo(spack.paths.mock_packages_path, cache=mock_test_cache)
+ mock_spec = spack.spec.Spec(name)
+ mock_spec._mark_concrete()
+ pkg = repo.get(mock_spec)
+ assert pkg.__class__ == repo.get_pkg_class(name)
+
+ @pytest.mark.parametrize("virtual_name,expected", [("mpi", ["mpich", "zmpi"])])
+ def test_providers(self, virtual_name, expected, mock_test_cache):
+ repo = spack.repo.Repo(spack.paths.mock_packages_path, cache=mock_test_cache)
+ provider_names = {x.name for x in repo.providers_for(virtual_name)}
+ assert provider_names.issuperset(expected)
+
+ @pytest.mark.parametrize(
+ "extended,expected",
+ [("python", ["py-extension1", "python-venv"]), ("perl", ["perl-extension"])],
+ )
+ @pytest.mark.parametrize("repo_cls", [spack.repo.Repo, spack.repo.RepoPath])
+ def test_extensions(self, repo_cls, extended, expected, mock_test_cache):
+ repo = repo_cls(spack.paths.mock_packages_path, cache=mock_test_cache)
+ provider_names = {x.name for x in repo.extensions_for(extended)}
+ assert provider_names.issuperset(expected)
+
+ @pytest.mark.parametrize("repo_cls", [spack.repo.Repo, spack.repo.RepoPath])
+ def test_all_package_names(self, repo_cls, mock_test_cache):
+ repo = repo_cls(spack.paths.mock_packages_path, cache=mock_test_cache)
+ all_names = repo.all_package_names(include_virtuals=True)
+ real_names = repo.all_package_names(include_virtuals=False)
+ assert set(all_names).issuperset(real_names)
+ for name in set(all_names) - set(real_names):
+ assert repo.is_virtual(name)
+ assert repo.is_virtual_safe(name)
+
+ @pytest.mark.parametrize("repo_cls", [spack.repo.Repo, spack.repo.RepoPath])
+ def test_packages_with_tags(self, repo_cls, mock_test_cache):
+ repo = repo_cls(spack.paths.mock_packages_path, cache=mock_test_cache)
+ r1 = repo.packages_with_tags("tag1")
+ r2 = repo.packages_with_tags("tag1", "tag2")
+ assert "mpich" in r1 and "mpich" in r2
+ assert "mpich2" in r1 and "mpich2" not in r2
+ assert set(r2).issubset(r1)
+
+
+@pytest.mark.usefixtures("nullify_globals")
+class TestRepoPath:
+ def test_creation_from_string(self, mock_test_cache):
+ repo = spack.repo.RepoPath(spack.paths.mock_packages_path, cache=mock_test_cache)
+ assert len(repo.repos) == 1
+ assert repo.repos[0]._finder is repo
+ assert repo.by_namespace["spack.pkg.builtin.mock"] is repo.repos[0]
+
+ def test_get_repo(self, mock_test_cache):
+ repo = spack.repo.RepoPath(spack.paths.mock_packages_path, cache=mock_test_cache)
+ # builtin.mock is there
+ assert repo.get_repo("builtin.mock") is repo.repos[0]
+ # foo is not there, raise
+ with pytest.raises(spack.repo.UnknownNamespaceError):
+ repo.get_repo("foo")
diff --git a/lib/spack/spack/test/reporters.py b/lib/spack/spack/test/reporters.py
index d1a78f6d7e..55ab019a8a 100644
--- a/lib/spack/spack/test/reporters.py
+++ b/lib/spack/spack/test/reporters.py
@@ -10,7 +10,6 @@ import llnl.util.filesystem as fs
import llnl.util.tty as tty
import spack.reporters.extract
-import spack.spec
from spack.install_test import TestStatus
from spack.reporters import CDash, CDashConfiguration
@@ -121,26 +120,6 @@ def test_reporters_extract_missing_desc():
assert parts[2]["command"] == "exe1 1; exe2 2"
-# TODO (post-34236): Remove this test when removing deprecated run_test(), etc.
-def test_reporters_extract_xfail():
- fake_bin = fs.join_path(fake_install_prefix, "bin", "fake-app")
- outputs = """
-==> Testing package fake-1.0-abcdefg
-==> [2022-02-15-18:44:21.250165] test: test_fake: Checking fake imports
-==> [2022-02-15-18:44:21.250175] Expecting return code in [3]
-==> [2022-02-15-18:44:21.250200] '{0}'
-{1}
-""".format(
- fake_bin, str(TestStatus.PASSED)
- ).splitlines()
-
- parts = spack.reporters.extract.extract_test_parts("fake", outputs)
-
- assert len(parts) == 1
- parts[0]["command"] == fake_bin
- parts[0]["completed"] == "Expected to fail"
-
-
@pytest.mark.parametrize("state", [("not installed"), ("external")])
def test_reporters_extract_skipped(state):
expected = "Skipped {0} package".format(state)
@@ -157,34 +136,6 @@ def test_reporters_extract_skipped(state):
parts[0]["completed"] == expected
-# TODO (post-34236): Remove this test when removing deprecated run_test(), etc.
-def test_reporters_skip():
- # This test ticks 3 boxes:
- # 1) covers an as yet uncovered skip messages
- # 2) covers debug timestamps
- # 3) unrecognized output
- fake_bin = fs.join_path(fake_install_prefix, "bin", "fake")
- unknown_message = "missing timestamp"
- outputs = """
-==> Testing package fake-1.0-abcdefg
-==> [2022-02-15-18:44:21.250165, 123456] Detected the following modules: fake1
-==> {0}
-==> [2022-02-15-18:44:21.250175, 123456] test: test_fake: running fake program
-==> [2022-02-15-18:44:21.250200, 123456] '{1}'
-INVALID
-Results for test suite abcdefghijklmn
-""".format(
- unknown_message, fake_bin
- ).splitlines()
-
- parts = spack.reporters.extract.extract_test_parts("fake", outputs)
-
- assert len(parts) == 1
- assert fake_bin in parts[0]["command"]
- assert parts[0]["loglines"] == ["INVALID"]
- assert parts[0]["elapsed"] == 0.0
-
-
def test_reporters_skip_new():
outputs = """
==> [2023-04-06-15:55:13.094025] test: test_skip:
diff --git a/lib/spack/spack/test/rewiring.py b/lib/spack/spack/test/rewiring.py
index f082b1b153..9cf16ce6c2 100644
--- a/lib/spack/spack/test/rewiring.py
+++ b/lib/spack/spack/test/rewiring.py
@@ -9,8 +9,10 @@ import sys
import pytest
+import spack.deptypes as dt
import spack.rewiring
import spack.store
+from spack.installer import PackageInstaller
from spack.spec import Spec
from spack.test.relocate import text_in_bin
@@ -21,14 +23,25 @@ else:
args.extend(["g++", "patchelf"])
+def check_spliced_spec_prefixes(spliced_spec):
+ """check the file in the prefix has the correct paths"""
+ for node in spliced_spec.traverse(root=True):
+ text_file_path = os.path.join(node.prefix, node.name)
+ with open(text_file_path, "r") as f:
+ text = f.read()
+ print(text)
+ for modded_spec in node.traverse(root=True, deptype=dt.ALL & ~dt.BUILD):
+ print(modded_spec)
+ assert modded_spec.prefix in text
+
+
@pytest.mark.requires_executables(*args)
@pytest.mark.parametrize("transitive", [True, False])
def test_rewire_db(mock_fetch, install_mockery, transitive):
"""Tests basic rewiring without binary executables."""
spec = Spec("splice-t^splice-h~foo").concretized()
dep = Spec("splice-h+foo").concretized()
- spec.package.do_install()
- dep.package.do_install()
+ PackageInstaller([spec.package, dep.package], explicit=True).install()
spliced_spec = spec.splice(dep, transitive=transitive)
assert spec.dag_hash() != spliced_spec.dag_hash()
@@ -42,13 +55,8 @@ def test_rewire_db(mock_fetch, install_mockery, transitive):
installed_in_db = rec.installed if rec else False
assert installed_in_db
- # check the file in the prefix has the correct paths
- for node in spliced_spec.traverse(root=True):
- text_file_path = os.path.join(node.prefix, node.name)
- with open(text_file_path, "r") as f:
- text = f.read()
- for modded_spec in node.traverse(root=True):
- assert modded_spec.prefix in text
+ # check for correct prefix paths
+ check_spliced_spec_prefixes(spliced_spec)
@pytest.mark.requires_executables(*args)
@@ -57,9 +65,9 @@ def test_rewire_bin(mock_fetch, install_mockery, transitive):
"""Tests basic rewiring with binary executables."""
spec = Spec("quux").concretized()
dep = Spec("garply cflags=-g").concretized()
- spec.package.do_install()
- dep.package.do_install()
+ PackageInstaller([spec.package, dep.package], explicit=True).install()
spliced_spec = spec.splice(dep, transitive=transitive)
+
assert spec.dag_hash() != spliced_spec.dag_hash()
spack.rewiring.rewire(spliced_spec)
@@ -86,8 +94,7 @@ def test_rewire_writes_new_metadata(mock_fetch, install_mockery):
Accuracy of metadata is left to other tests."""
spec = Spec("quux").concretized()
dep = Spec("garply cflags=-g").concretized()
- spec.package.do_install()
- dep.package.do_install()
+ PackageInstaller([spec.package, dep.package], explicit=True).install()
spliced_spec = spec.splice(dep, transitive=True)
spack.rewiring.rewire(spliced_spec)
@@ -101,6 +108,8 @@ def test_rewire_writes_new_metadata(mock_fetch, install_mockery):
)
assert os.path.exists(manifest_file_path)
orig_node = spec[node.name]
+ if node == orig_node:
+ continue
orig_manifest_file_path = os.path.join(
orig_node.prefix,
spack.store.STORE.layout.metadata_dir,
@@ -129,8 +138,7 @@ def test_uninstall_rewired_spec(mock_fetch, install_mockery, transitive):
"""Test that rewired packages can be uninstalled as normal."""
spec = Spec("quux").concretized()
dep = Spec("garply cflags=-g").concretized()
- spec.package.do_install()
- dep.package.do_install()
+ PackageInstaller([spec.package, dep.package], explicit=True).install()
spliced_spec = spec.splice(dep, transitive=transitive)
spack.rewiring.rewire(spliced_spec)
spliced_spec.package.do_uninstall()
@@ -150,3 +158,26 @@ def test_rewire_not_installed_fails(mock_fetch, install_mockery):
match="failed due to missing install of build spec",
):
spack.rewiring.rewire(spliced_spec)
+
+
+def test_rewire_virtual(mock_fetch, install_mockery):
+ """Check installed package can successfully splice an alternate virtual implementation"""
+ dep = "splice-a"
+ alt_dep = "splice-h"
+
+ spec = Spec(f"splice-vt^{dep}").concretized()
+ alt_spec = Spec(alt_dep).concretized()
+
+ PackageInstaller([spec.package, alt_spec.package]).install()
+
+ spliced_spec = spec.splice(alt_spec, True)
+ spack.rewiring.rewire(spliced_spec)
+
+ # Confirm the original spec still has the original virtual implementation.
+ assert spec.satisfies(f"^{dep}")
+
+ # Confirm the spliced spec uses the new virtual implementation.
+ assert spliced_spec.satisfies(f"^{alt_dep}")
+
+ # check for correct prefix paths
+ check_spliced_spec_prefixes(spliced_spec)
diff --git a/lib/spack/spack/test/s3_fetch.py b/lib/spack/spack/test/s3_fetch.py
index 66c4cd7bc4..5177c3f90d 100644
--- a/lib/spack/spack/test/s3_fetch.py
+++ b/lib/spack/spack/test/s3_fetch.py
@@ -3,54 +3,19 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
-import pytest
-
-import spack.config as spack_config
-import spack.error
import spack.fetch_strategy as spack_fs
import spack.stage as spack_stage
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_s3fetchstrategy_sans_url(_fetch_method):
- """Ensure constructor with no URL fails."""
- with spack_config.override("config:url_fetch_method", _fetch_method):
- with pytest.raises(ValueError):
- spack_fs.S3FetchStrategy(None)
-
-
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_s3fetchstrategy_bad_url(tmpdir, _fetch_method):
- """Ensure fetch with bad URL fails as expected."""
- testpath = str(tmpdir)
-
- with spack_config.override("config:url_fetch_method", _fetch_method):
- fetcher = spack_fs.S3FetchStrategy(url="file:///does-not-exist")
- assert fetcher is not None
-
- with spack_stage.Stage(fetcher, path=testpath) as stage:
- assert stage is not None
- assert fetcher.archive_file is None
- with pytest.raises(spack.error.FetchError):
- fetcher.fetch()
-
-
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_s3fetchstrategy_downloaded(tmpdir, _fetch_method):
+def test_s3fetchstrategy_downloaded(tmp_path):
"""Ensure fetch with archive file already downloaded is a noop."""
- testpath = str(tmpdir)
- archive = os.path.join(testpath, "s3.tar.gz")
-
- with spack_config.override("config:url_fetch_method", _fetch_method):
+ archive = tmp_path / "s3.tar.gz"
- class Archived_S3FS(spack_fs.S3FetchStrategy):
- @property
- def archive_file(self):
- return archive
+ class Archived_S3FS(spack_fs.S3FetchStrategy):
+ @property
+ def archive_file(self):
+ return archive
- url = "s3:///{0}".format(archive)
- fetcher = Archived_S3FS(url=url)
- with spack_stage.Stage(fetcher, path=testpath):
- fetcher.fetch()
+ fetcher = Archived_S3FS(url="s3://example/s3.tar.gz")
+ with spack_stage.Stage(fetcher, path=str(tmp_path)):
+ fetcher.fetch()
diff --git a/lib/spack/spack/test/sbang.py b/lib/spack/spack/test/sbang.py
index e409f49c61..d3c5ef2da4 100644
--- a/lib/spack/spack/test/sbang.py
+++ b/lib/spack/spack/test/sbang.py
@@ -17,8 +17,8 @@ import pytest
import llnl.util.filesystem as fs
+import spack.config
import spack.hooks.sbang as sbang
-import spack.paths
import spack.store
import spack.util.spack_yaml as syaml
from spack.util.executable import which
diff --git a/lib/spack/spack/test/schema.py b/lib/spack/spack/test/schema.py
index 2bf18f9195..509bfd331a 100644
--- a/lib/spack/spack/test/schema.py
+++ b/lib/spack/spack/test/schema.py
@@ -105,25 +105,21 @@ def test_schema_validation(meta_schema, config_name):
def test_deprecated_properties(module_suffixes_schema):
# Test that an error is reported when 'error: True'
- msg_fmt = r"deprecated properties detected [properties={properties}]"
- module_suffixes_schema["deprecatedProperties"] = {
- "properties": ["tcl"],
- "message": msg_fmt,
- "error": True,
- }
+ msg_fmt = r"{name} is deprecated"
+ module_suffixes_schema["deprecatedProperties"] = [
+ {"names": ["tcl"], "message": msg_fmt, "error": True}
+ ]
v = spack.schema.Validator(module_suffixes_schema)
data = {"tcl": {"all": {"suffixes": {"^python": "py"}}}}
- expected_match = "deprecated properties detected"
+ expected_match = "tcl is deprecated"
with pytest.raises(jsonschema.ValidationError, match=expected_match):
v.validate(data)
# Test that just a warning is reported when 'error: False'
- module_suffixes_schema["deprecatedProperties"] = {
- "properties": ["tcl"],
- "message": msg_fmt,
- "error": False,
- }
+ module_suffixes_schema["deprecatedProperties"] = [
+ {"names": ["tcl"], "message": msg_fmt, "error": False}
+ ]
v = spack.schema.Validator(module_suffixes_schema)
data = {"tcl": {"all": {"suffixes": {"^python": "py"}}}}
# The next validation doesn't raise anymore
diff --git a/lib/spack/spack/test/solver/intermediate.py b/lib/spack/spack/test/solver/intermediate.py
new file mode 100644
index 0000000000..f3d624cbd3
--- /dev/null
+++ b/lib/spack/spack/test/solver/intermediate.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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)
+"""Unit tests for objects turning configuration into an intermediate format used by the solver."""
+import pytest
+
+import spack.compilers
+import spack.spec
+from spack.concretize import UnavailableCompilerVersionError
+from spack.solver import asp
+
+
+class TestCompilerParser:
+ def test_expected_order_mock_config(self, config):
+ """Tests the expected preference order in the mock compiler configuration"""
+ parser = asp.CompilerParser(config)
+ expected_order = ["gcc@=10.2.1", "gcc@=9.4.0", "gcc@=9.4.0", "clang@=15.0.0"]
+ for c, expected in zip(parser.possible_compilers(), expected_order):
+ assert c.spec.satisfies(expected)
+
+ @pytest.mark.parametrize("spec_str", ["a %gcc@=13.2.0", "a ^b %gcc@=13.2.0"])
+ def test_compiler_from_input_raise(self, spec_str, config):
+ """Tests that having an unknown compiler in the input spec raises an exception, if we
+ don't allow bootstrapping missing compilers.
+ """
+ spec = spack.spec.Spec(spec_str)
+ with pytest.raises(UnavailableCompilerVersionError):
+ asp.CompilerParser(config).with_input_specs([spec])
+
+ def test_compilers_inferred_from_concrete_specs(self, mutable_config, mutable_database):
+ """Test that compilers inferred from concrete specs, that are not in the local
+ configuration too, are last in the preference order.
+ """
+ spack.compilers.remove_compiler_from_config("gcc@=10.2.1")
+ assert not spack.compilers.compilers_for_spec("gcc@=10.2.1")
+
+ parser = asp.CompilerParser(mutable_config)
+ for reuse_spec in mutable_database.query():
+ parser.add_compiler_from_concrete_spec(reuse_spec)
+
+ expected_order = [
+ ("gcc@=9.4.0", True),
+ ("gcc@=9.4.0", True),
+ ("clang@=15.0.0", True),
+ ("gcc@=10.2.1", False),
+ ]
+ for c, (expected, available) in zip(parser.possible_compilers(), expected_order):
+ assert c.spec.satisfies(expected)
+ assert c.available is available
diff --git a/lib/spack/spack/test/spack_yaml.py b/lib/spack/spack/test/spack_yaml.py
index 4f3c035724..738d5f91b8 100644
--- a/lib/spack/spack/test/spack_yaml.py
+++ b/lib/spack/spack/test/spack_yaml.py
@@ -2,10 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
"""Test Spack's custom YAML format."""
import io
-import sys
import pytest
@@ -126,7 +124,7 @@ def test_yaml_aliases():
),
],
)
-@pytest.mark.xfail(sys.platform == "win32", reason="fails on Windows")
+@pytest.mark.not_on_windows(reason="fails on Windows")
def test_round_trip_configuration(initial_content, expected_final_content, tmp_path):
"""Test that configuration can be loaded and dumped without too many changes"""
file = tmp_path / "test.yaml"
diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py
index eecae4282d..05cc15f3da 100644
--- a/lib/spack/spack/test/spec_dag.py
+++ b/lib/spack/spack/test/spec_dag.py
@@ -9,10 +9,9 @@ import pytest
import spack.deptypes as dt
import spack.error
-import spack.package_base
-import spack.parser
import spack.repo
import spack.util.hash as hashutil
+import spack.version
from spack.dependency import Dependency
from spack.spec import Spec
@@ -51,7 +50,7 @@ def set_dependency(saved_deps, monkeypatch):
cond = Spec(pkg_cls.name)
dependency = Dependency(pkg_cls, spec)
- monkeypatch.setitem(pkg_cls.dependencies, spec.name, {cond: dependency})
+ monkeypatch.setitem(pkg_cls.dependencies, cond, {spec.name: dependency})
return _mock
@@ -82,7 +81,6 @@ def test_test_deptype(tmpdir):
@pytest.mark.usefixtures("config")
-@pytest.mark.only_clingo("fails with the original concretizer and full hashes")
def test_installed_deps(monkeypatch, mock_packages):
"""Ensure that concrete specs and their build deps don't constrain solves.
@@ -138,19 +136,19 @@ def test_specify_preinstalled_dep(tmpdir, monkeypatch):
transitive dependency that is only supplied by the preinstalled package.
"""
builder = spack.repo.MockRepositoryBuilder(tmpdir)
- builder.add_package("c")
- builder.add_package("b", dependencies=[("c", None, None)])
- builder.add_package("a", dependencies=[("b", None, None)])
+ builder.add_package("pkg-c")
+ builder.add_package("pkg-b", dependencies=[("pkg-c", None, None)])
+ builder.add_package("pkg-a", dependencies=[("pkg-b", None, None)])
with spack.repo.use_repositories(builder.root):
- b_spec = Spec("b").concretized()
- monkeypatch.setattr(Spec, "installed", property(lambda x: x.name != "a"))
+ b_spec = Spec("pkg-b").concretized()
+ monkeypatch.setattr(Spec, "installed", property(lambda x: x.name != "pkg-a"))
- a_spec = Spec("a")
+ a_spec = Spec("pkg-a")
a_spec._add_dependency(b_spec, depflag=dt.BUILD | dt.LINK, virtuals=())
a_spec.concretize()
- assert set(x.name for x in a_spec.traverse()) == set(["a", "b", "c"])
+ assert {x.name for x in a_spec.traverse()} == {"pkg-a", "pkg-b", "pkg-c"}
@pytest.mark.usefixtures("config")
@@ -183,14 +181,11 @@ class TestSpecDag:
spec = Spec("mpileaks ^mpich ^callpath ^dyninst ^libelf ^libdwarf")
- # TODO: try to do something to show that the issue was with
- # TODO: the user's input or with package inconsistencies.
- with pytest.raises(spack.spec.UnsatisfiableVersionSpecError):
- spec.normalize()
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ spec.concretize()
def test_preorder_node_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = ["mpileaks", "callpath", "dyninst", "libdwarf", "libelf", "zmpi", "fake"]
pairs = list(zip([0, 1, 2, 3, 4, 2, 3], names))
@@ -202,8 +197,7 @@ class TestSpecDag:
assert [(x, y.name) for x, y in traversal] == pairs
def test_preorder_edge_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = [
"mpileaks",
@@ -225,8 +219,7 @@ class TestSpecDag:
assert [(x, y.name) for x, y in traversal] == pairs
def test_preorder_path_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = [
"mpileaks",
@@ -249,8 +242,7 @@ class TestSpecDag:
assert [(x, y.name) for x, y in traversal] == pairs
def test_postorder_node_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = ["libelf", "libdwarf", "dyninst", "fake", "zmpi", "callpath", "mpileaks"]
pairs = list(zip([4, 3, 2, 3, 2, 1, 0], names))
@@ -262,8 +254,7 @@ class TestSpecDag:
assert [(x, y.name) for x, y in traversal] == pairs
def test_postorder_edge_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = [
"libelf",
@@ -285,8 +276,7 @@ class TestSpecDag:
assert [(x, y.name) for x, y in traversal] == pairs
def test_postorder_path_traversal(self):
- dag = Spec("mpileaks ^zmpi")
- dag.normalize()
+ dag = Spec("mpileaks ^zmpi").concretized()
names = [
"libelf",
@@ -308,63 +298,6 @@ class TestSpecDag:
traversal = dag.traverse(cover="paths", depth=True, order="post")
assert [(x, y.name) for x, y in traversal] == pairs
- def test_conflicting_spec_constraints(self):
- mpileaks = Spec("mpileaks ^mpich ^callpath ^dyninst ^libelf ^libdwarf")
-
- # Normalize then add conflicting constraints to the DAG (this is an
- # extremely unlikely scenario, but we test for it anyway)
- mpileaks.normalize()
-
- mpileaks.edges_to_dependencies(name="mpich")[0].spec = Spec("mpich@1.0")
-
- mpileaks.edges_to_dependencies(name="callpath")[0].spec.edges_to_dependencies(
- name="mpich"
- )[0].spec = Spec("mpich@2.0")
-
- with pytest.raises(spack.spec.InconsistentSpecError):
- mpileaks.flat_dependencies(copy=False)
-
- def test_normalize_twice(self):
- """Make sure normalize can be run twice on the same spec,
- and that it is idempotent."""
- spec = Spec("mpileaks")
- spec.normalize()
- n1 = spec.copy()
-
- spec.normalize()
- assert n1 == spec
-
- def test_normalize_a_lot(self):
- spec = Spec("mpileaks")
- spec.normalize()
- spec.normalize()
- spec.normalize()
- spec.normalize()
-
- def test_normalize_with_virtual_spec(self):
- dag = Spec.from_literal(
- {
- "mpileaks": {
- "callpath": {
- "dyninst": {"libdwarf": {"libelf": None}, "libelf": None},
- "mpi": None,
- },
- "mpi": None,
- }
- }
- )
- dag.normalize()
-
- # make sure nothing with the same name occurs twice
- counts = {}
- for spec in dag.traverse(key=id):
- if spec.name not in counts:
- counts[spec.name] = 0
- counts[spec.name] += 1
-
- for name in counts:
- assert counts[name] == 1
-
def test_dependents_and_dependencies_are_correct(self):
spec = Spec.from_literal(
{
@@ -377,36 +310,26 @@ class TestSpecDag:
}
}
)
-
check_links(spec)
- spec.normalize()
+ spec.concretize()
check_links(spec)
- def test_unsatisfiable_version(self, set_dependency):
- set_dependency("mpileaks", "mpich@1.0")
- spec = Spec("mpileaks ^mpich@2.0 ^callpath ^dyninst ^libelf ^libdwarf")
- with pytest.raises(spack.spec.UnsatisfiableVersionSpecError):
- spec.normalize()
-
- def test_unsatisfiable_compiler(self, set_dependency):
- set_dependency("mpileaks", "mpich%gcc")
- spec = Spec("mpileaks ^mpich%intel ^callpath ^dyninst ^libelf" " ^libdwarf")
- with pytest.raises(spack.spec.UnsatisfiableCompilerSpecError):
- spec.normalize()
-
- def test_unsatisfiable_compiler_version(self, set_dependency):
- set_dependency("mpileaks", "mpich%gcc@4.6")
- spec = Spec("mpileaks ^mpich%gcc@4.5 ^callpath ^dyninst ^libelf" " ^libdwarf")
- with pytest.raises(spack.spec.UnsatisfiableCompilerSpecError):
- spec.normalize()
-
- def test_unsatisfiable_architecture(self, set_dependency):
- set_dependency("mpileaks", "mpich platform=test target=be")
- spec = Spec(
- "mpileaks ^mpich platform=test target=fe ^callpath" " ^dyninst ^libelf ^libdwarf"
- )
- with pytest.raises(spack.spec.UnsatisfiableArchitectureSpecError):
- spec.normalize()
+ @pytest.mark.parametrize(
+ "constraint_str,spec_str",
+ [
+ ("mpich@1.0", "mpileaks ^mpich@2.0"),
+ ("mpich%gcc", "mpileaks ^mpich%intel"),
+ ("mpich%gcc@4.6", "mpileaks ^mpich%gcc@4.5"),
+ ("mpich platform=test target=be", "mpileaks ^mpich platform=test target=fe"),
+ ],
+ )
+ def test_unsatisfiable_cases(self, set_dependency, constraint_str, spec_str):
+ """Tests that synthetic cases of conflicting requirements raise an UnsatisfiableSpecError
+ when concretizing.
+ """
+ set_dependency("mpileaks", constraint_str)
+ with pytest.raises(spack.error.UnsatisfiableSpecError):
+ Spec(spec_str).concretize()
@pytest.mark.parametrize(
"spec_str", ["libelf ^mpich", "libelf ^libdwarf", "mpich ^dyninst ^libelf"]
@@ -451,106 +374,6 @@ class TestSpecDag:
assert not flip_flat.eq_dag(flip_dag)
assert not dag.eq_dag(flip_dag)
- def test_normalize_mpileaks(self):
- # Spec parsed in from a string
- spec = Spec.from_literal(
- {"mpileaks ^mpich ^callpath ^dyninst ^libelf@1.8.11 ^libdwarf": None}
- )
-
- # What that spec should look like after parsing
- expected_flat = Spec.from_literal(
- {
- "mpileaks": {
- "mpich": None,
- "callpath": None,
- "dyninst": None,
- "libelf@1.8.11": None,
- "libdwarf": None,
- }
- }
- )
-
- # What it should look like after normalization
- mpich = Spec("mpich")
- libelf = Spec("libelf@1.8.11")
- expected_normalized = Spec.from_literal(
- {
- "mpileaks": {
- "callpath": {
- "dyninst": {"libdwarf": {libelf: None}, libelf: None},
- mpich: None,
- },
- mpich: None,
- }
- }
- )
-
- # Similar to normalized spec, but now with copies of the same
- # libelf node. Normalization should result in a single unique
- # node for each package, so this is the wrong DAG.
- non_unique_nodes = Spec.from_literal(
- {
- "mpileaks": {
- "callpath": {
- "dyninst": {"libdwarf": {"libelf@1.8.11": None}, "libelf@1.8.11": None},
- mpich: None,
- },
- mpich: None,
- }
- },
- normal=False,
- )
-
- # All specs here should be equal under regular equality
- specs = (spec, expected_flat, expected_normalized, non_unique_nodes)
- for lhs, rhs in zip(specs, specs):
- assert lhs == rhs
- assert str(lhs) == str(rhs)
-
- # Test that equal and equal_dag are doing the right thing
- assert spec == expected_flat
- assert spec.eq_dag(expected_flat)
-
- # Normalized has different DAG structure, so NOT equal.
- assert spec != expected_normalized
- assert not spec.eq_dag(expected_normalized)
-
- # Again, different DAG structure so not equal.
- assert spec != non_unique_nodes
- assert not spec.eq_dag(non_unique_nodes)
-
- spec.normalize()
-
- # After normalizing, spec_dag_equal should match the normalized spec.
- assert spec != expected_flat
- assert not spec.eq_dag(expected_flat)
-
- # verify DAG structure without deptypes.
- assert spec.eq_dag(expected_normalized, deptypes=False)
- assert not spec.eq_dag(non_unique_nodes, deptypes=False)
-
- assert not spec.eq_dag(expected_normalized, deptypes=True)
- assert not spec.eq_dag(non_unique_nodes, deptypes=True)
-
- @pytest.mark.xfail(reason="String representation changed")
- def test_normalize_with_virtual_package(self):
- spec = Spec("mpileaks ^mpi ^libelf@1.8.11 ^libdwarf")
- spec.normalize()
-
- expected_normalized = Spec.from_literal(
- {
- "mpileaks": {
- "callpath": {
- "dyninst": {"libdwarf": {"libelf@1.8.11": None}, "libelf@1.8.11": None},
- "mpi": None,
- },
- "mpi": None,
- }
- }
- )
-
- assert str(spec) == str(expected_normalized)
-
def test_contains(self):
spec = Spec("mpileaks ^mpi ^libelf@1.8.11 ^libdwarf")
assert Spec("mpi") in spec
@@ -576,20 +399,6 @@ class TestSpecDag:
copy_ids = set(id(s) for s in copy.traverse())
assert not orig_ids.intersection(copy_ids)
- def test_copy_normalized(self):
- orig = Spec("mpileaks")
- orig.normalize()
- copy = orig.copy()
- check_links(copy)
-
- assert orig == copy
- assert orig.eq_dag(copy)
-
- # ensure no shared nodes bt/w orig and copy.
- orig_ids = set(id(s) for s in orig.traverse())
- copy_ids = set(id(s) for s in copy.traverse())
- assert not orig_ids.intersection(copy_ids)
-
def test_copy_concretized(self):
orig = Spec("mpileaks")
orig.concretize()
@@ -650,63 +459,53 @@ class TestSpecDag:
run3 -b-> build3
"""
- def test_deptype_traversal(self):
- dag = Spec("dtuse")
- dag.normalize()
-
- names = [
- "dtuse",
- "dttop",
- "dtbuild1",
- "dtbuild2",
- "dtlink2",
- "dtlink1",
- "dtlink3",
- "dtlink4",
- ]
-
- traversal = dag.traverse(deptype=("build", "link"))
- assert [x.name for x in traversal] == names
-
- def test_deptype_traversal_with_builddeps(self):
- dag = Spec("dttop")
- dag.normalize()
-
- names = ["dttop", "dtbuild1", "dtbuild2", "dtlink2", "dtlink1", "dtlink3", "dtlink4"]
-
- traversal = dag.traverse(deptype=("build", "link"))
- assert [x.name for x in traversal] == names
-
- def test_deptype_traversal_full(self):
- dag = Spec("dttop")
- dag.normalize()
-
- names = [
- "dttop",
- "dtbuild1",
- "dtbuild2",
- "dtlink2",
- "dtrun2",
- "dtlink1",
- "dtlink3",
- "dtlink4",
- "dtrun1",
- "dtlink5",
- "dtrun3",
- "dtbuild3",
- ]
-
- traversal = dag.traverse(deptype=all)
- assert [x.name for x in traversal] == names
-
- def test_deptype_traversal_run(self):
- dag = Spec("dttop")
- dag.normalize()
-
- names = ["dttop", "dtrun1", "dtrun3"]
-
- traversal = dag.traverse(deptype="run")
- assert [x.name for x in traversal] == names
+ @pytest.mark.parametrize(
+ "spec_str,deptypes,expected",
+ [
+ (
+ "dtuse",
+ ("build", "link"),
+ [
+ "dtuse",
+ "dttop",
+ "dtbuild1",
+ "dtbuild2",
+ "dtlink2",
+ "dtlink1",
+ "dtlink3",
+ "dtlink4",
+ ],
+ ),
+ (
+ "dttop",
+ ("build", "link"),
+ ["dttop", "dtbuild1", "dtbuild2", "dtlink2", "dtlink1", "dtlink3", "dtlink4"],
+ ),
+ (
+ "dttop",
+ all,
+ [
+ "dttop",
+ "dtbuild1",
+ "dtbuild2",
+ "dtlink2",
+ "dtrun2",
+ "dtlink1",
+ "dtlink3",
+ "dtlink4",
+ "dtrun1",
+ "dtlink5",
+ "dtrun3",
+ "dtbuild3",
+ ],
+ ),
+ ("dttop", "run", ["dttop", "dtrun1", "dtrun3"]),
+ ],
+ )
+ def test_deptype_traversal(self, spec_str, deptypes, expected):
+ dag = Spec(spec_str).concretized()
+ traversal = dag.traverse(deptype=deptypes)
+ assert [x.name for x in traversal] == expected
def test_hash_bits(self):
"""Ensure getting first n bits of a base32-encoded DAG hash works."""
@@ -834,15 +633,6 @@ class TestSpecDag:
assert spec.eq_dag(dag)
- def test_normalize_diamond_deptypes(self):
- """Ensure that dependency types are preserved even if the same thing is
- depended on in two different ways."""
- s = Spec("dt-diamond")
- s.normalize()
-
- self.check_diamond_deptypes(s)
- self.check_diamond_normalized_dag(s)
-
def test_concretize_deptypes(self):
"""Ensure that dependency types are preserved after concretization."""
s = Spec("dt-diamond")
@@ -851,22 +641,11 @@ class TestSpecDag:
def test_copy_deptypes(self):
"""Ensure that dependency types are preserved by spec copy."""
- s1 = Spec("dt-diamond")
- s1.normalize()
+ s1 = Spec("dt-diamond").concretized()
self.check_diamond_deptypes(s1)
- self.check_diamond_normalized_dag(s1)
-
s2 = s1.copy()
- self.check_diamond_normalized_dag(s2)
self.check_diamond_deptypes(s2)
- s3 = Spec("dt-diamond")
- s3.concretize()
- self.check_diamond_deptypes(s3)
-
- s4 = s3.copy()
- self.check_diamond_deptypes(s4)
-
def test_getitem_query(self):
s = Spec("mpileaks")
s.concretize()
@@ -962,7 +741,7 @@ class TestSpecDag:
def test_invalid_literal_spec(self):
# Can't give type 'build' to a top-level spec
- with pytest.raises(spack.parser.SpecSyntaxError):
+ with pytest.raises(spack.error.SpecSyntaxError):
Spec.from_literal({"foo:build": None})
# Can't use more than one ':' separator
@@ -977,20 +756,87 @@ class TestSpecDag:
out = s.tree(deptypes=("link", "run"))
assert "version-test-pkg" not in out
+ @pytest.mark.parametrize(
+ "query,expected_length,expected_satisfies",
+ [
+ ({"virtuals": ["mpi"]}, 1, ["mpich", "mpi"]),
+ ({"depflag": dt.BUILD}, 2, ["mpich", "mpi", "callpath"]),
+ ({"depflag": dt.BUILD, "virtuals": ["mpi"]}, 1, ["mpich", "mpi"]),
+ ({"depflag": dt.LINK}, 2, ["mpich", "mpi", "callpath"]),
+ ({"depflag": dt.BUILD | dt.LINK}, 2, ["mpich", "mpi", "callpath"]),
+ ({"virtuals": ["lapack"]}, 0, []),
+ ],
+ )
+ def test_query_dependency_edges(
+ self, default_mock_concretization, query, expected_length, expected_satisfies
+ ):
+ """Tests querying edges to dependencies on the following DAG:
+
+ [ ] mpileaks@=2.3
+ [bl ] ^callpath@=1.0
+ [bl ] ^dyninst@=8.2
+ [bl ] ^libdwarf@=20130729
+ [bl ] ^libelf@=0.8.13
+ [bl ] ^mpich@=3.0.4
+ """
+ mpileaks = default_mock_concretization("mpileaks")
+ edges = mpileaks.edges_to_dependencies(**query)
+ assert len(edges) == expected_length
+ for constraint in expected_satisfies:
+ assert any(x.spec.satisfies(constraint) for x in edges)
+
+ def test_query_dependents_edges(self, default_mock_concretization):
+ """Tests querying edges from dependents"""
+ mpileaks = default_mock_concretization("mpileaks")
+ mpich = mpileaks["mpich"]
+
+ # Recover the root with 2 different queries
+ edges_of_link_type = mpich.edges_from_dependents(depflag=dt.LINK)
+ edges_with_mpi = mpich.edges_from_dependents(virtuals=["mpi"])
+ assert edges_with_mpi == edges_of_link_type
+
+ # Check a node dependend upon by 2 parents
+ assert len(mpileaks["libelf"].edges_from_dependents(depflag=dt.LINK)) == 2
+
+
+def test_tree_cover_nodes_reduce_deptype():
+ """Test that tree output with deptypes sticks to the sub-dag of interest, instead of looking
+ at in-edges from nodes not reachable from the root."""
+ a, b, c, d = Spec("a"), Spec("b"), Spec("c"), Spec("d")
+ a.add_dependency_edge(d, depflag=dt.BUILD, virtuals=())
+ a.add_dependency_edge(b, depflag=dt.LINK, virtuals=())
+ b.add_dependency_edge(d, depflag=dt.LINK, virtuals=())
+ c.add_dependency_edge(d, depflag=dt.RUN | dt.TEST, virtuals=())
+ assert (
+ a.tree(cover="nodes", show_types=True)
+ == """\
+[ ] a
+[ l ] ^b
+[bl ] ^d
+"""
+ )
+ assert (
+ c.tree(cover="nodes", show_types=True)
+ == """\
+[ ] c
+[ rt] ^d
+"""
+ )
+
def test_synthetic_construction_of_split_dependencies_from_same_package(mock_packages, config):
# Construct in a synthetic way (i.e. without using the solver)
# the following spec:
#
- # b
+ # pkg-b
# build / \ link,run
- # c@2.0 c@1.0
+ # pkg-c@2.0 pkg-c@1.0
#
# To demonstrate that a spec can now hold two direct
# dependencies from the same package
- root = Spec("b").concretized()
- link_run_spec = Spec("c@=1.0").concretized()
- build_spec = Spec("c@=2.0").concretized()
+ root = Spec("pkg-b").concretized()
+ link_run_spec = Spec("pkg-c@=1.0").concretized()
+ build_spec = Spec("pkg-c@=2.0").concretized()
root.add_dependency_edge(link_run_spec, depflag=dt.LINK, virtuals=())
root.add_dependency_edge(link_run_spec, depflag=dt.RUN, virtuals=())
@@ -998,10 +844,10 @@ def test_synthetic_construction_of_split_dependencies_from_same_package(mock_pac
# Check dependencies from the perspective of root
assert len(root.dependencies()) == 2
- assert all(x.name == "c" for x in root.dependencies())
+ assert all(x.name == "pkg-c" for x in root.dependencies())
- assert "@2.0" in root.dependencies(name="c", deptype=dt.BUILD)[0]
- assert "@1.0" in root.dependencies(name="c", deptype=dt.LINK | dt.RUN)[0]
+ assert "@2.0" in root.dependencies(name="pkg-c", deptype=dt.BUILD)[0]
+ assert "@1.0" in root.dependencies(name="pkg-c", deptype=dt.LINK | dt.RUN)[0]
# Check parent from the perspective of the dependencies
assert len(build_spec.dependents()) == 1
@@ -1013,30 +859,30 @@ def test_synthetic_construction_of_split_dependencies_from_same_package(mock_pac
def test_synthetic_construction_bootstrapping(mock_packages, config):
# Construct the following spec:
#
- # b@2.0
+ # pkg-b@2.0
# | build
- # b@1.0
+ # pkg-b@1.0
#
- root = Spec("b@=2.0").concretized()
- bootstrap = Spec("b@=1.0").concretized()
+ root = Spec("pkg-b@=2.0").concretized()
+ bootstrap = Spec("pkg-b@=1.0").concretized()
root.add_dependency_edge(bootstrap, depflag=dt.BUILD, virtuals=())
assert len(root.dependencies()) == 1
- assert root.dependencies()[0].name == "b"
- assert root.name == "b"
+ assert root.dependencies()[0].name == "pkg-b"
+ assert root.name == "pkg-b"
def test_addition_of_different_deptypes_in_multiple_calls(mock_packages, config):
# Construct the following spec:
#
- # b@2.0
+ # pkg-b@2.0
# | build,link,run
- # b@1.0
+ # pkg-b@1.0
#
# with three calls and check we always have a single edge
- root = Spec("b@=2.0").concretized()
- bootstrap = Spec("b@=1.0").concretized()
+ root = Spec("pkg-b@=2.0").concretized()
+ bootstrap = Spec("pkg-b@=1.0").concretized()
for current_depflag in (dt.BUILD, dt.LINK, dt.RUN):
root.add_dependency_edge(bootstrap, depflag=current_depflag, virtuals=())
@@ -1063,9 +909,9 @@ def test_addition_of_different_deptypes_in_multiple_calls(mock_packages, config)
def test_adding_same_deptype_with_the_same_name_raises(
mock_packages, config, c1_depflag, c2_depflag
):
- p = Spec("b@=2.0").concretized()
- c1 = Spec("b@=1.0").concretized()
- c2 = Spec("b@=2.0").concretized()
+ p = Spec("pkg-b@=2.0").concretized()
+ c1 = Spec("pkg-b@=1.0").concretized()
+ c2 = Spec("pkg-b@=2.0").concretized()
p.add_dependency_edge(c1, depflag=c1_depflag, virtuals=())
with pytest.raises(spack.error.SpackError):
@@ -1105,3 +951,23 @@ def test_indexing_prefers_direct_or_transitive_link_deps():
# Ensure that the full DAG is still searched
assert root["a2"]
+
+
+def test_getitem_sticks_to_subdag():
+ """Test that indexing on Spec by virtual does not traverse outside the dag, which happens in
+ the unlikely case someone would rewrite __getitem__ in terms of edges_from_dependents instead
+ of edges_to_dependencies."""
+ x, y, z = Spec("x"), Spec("y"), Spec("z")
+ x.add_dependency_edge(z, depflag=dt.LINK, virtuals=("virtual",))
+ y.add_dependency_edge(z, depflag=dt.LINK, virtuals=())
+ assert x["virtual"].name == "z"
+ with pytest.raises(KeyError):
+ y["virtual"]
+
+
+def test_getitem_finds_transitive_virtual():
+ x, y, z = Spec("x"), Spec("y"), Spec("z")
+ x.add_dependency_edge(z, depflag=dt.LINK, virtuals=())
+ x.add_dependency_edge(y, depflag=dt.LINK, virtuals=())
+ y.add_dependency_edge(z, depflag=dt.LINK, virtuals=("virtual",))
+ assert x["virtual"].name == "z"
diff --git a/lib/spack/spack/test/spec_list.py b/lib/spack/spack/test/spec_list.py
index db31146df7..295665ecfb 100644
--- a/lib/spack/spack/test/spec_list.py
+++ b/lib/spack/spack/test/spec_list.py
@@ -6,6 +6,7 @@ import itertools
import pytest
+from spack.installer import PackageInstaller
from spack.spec import Spec
from spack.spec_list import SpecList
@@ -196,21 +197,28 @@ class TestSpecList:
speclist = SpecList("specs", matrix)
assert len(speclist.specs) == 1
- @pytest.mark.regression("22991")
- def test_spec_list_constraints_with_structure(
- self, mock_packages, mock_fetch, install_mockery
- ):
- # Setup by getting hash and installing package with dep
- libdwarf_spec = Spec("libdwarf").concretized()
- libdwarf_spec.package.do_install()
-
- # Create matrix
- matrix = {
- "matrix": [["mpileaks"], ["^callpath"], ["^libdwarf/%s" % libdwarf_spec.dag_hash()]]
- }
+ def test_spec_list_exclude_with_abstract_hashes(self, mock_packages, install_mockery):
+ # Put mpich in the database so it can be referred to by hash.
+ mpich_1 = Spec("mpich+debug").concretized()
+ mpich_2 = Spec("mpich~debug").concretized()
+ PackageInstaller([mpich_1.package, mpich_2.package], explicit=True, fake=True).install()
+
+ # Create matrix and exclude +debug, which excludes the first mpich after its abstract hash
+ # is resolved.
+ speclist = SpecList(
+ "specs",
+ [
+ {
+ "matrix": [
+ ["mpileaks"],
+ ["^callpath"],
+ [f"^mpich/{mpich_1.dag_hash(5)}", f"^mpich/{mpich_2.dag_hash(5)}"],
+ ],
+ "exclude": ["^mpich+debug"],
+ }
+ ],
+ )
- # ensure the concrete spec was retained in the matrix entry of which
- # it is a dependency
- speclist = SpecList("specs", [matrix])
+ # Ensure that only mpich~debug is selected, and that the assembled spec remains abstract.
assert len(speclist.specs) == 1
- assert libdwarf_spec in speclist.specs[0]
+ assert speclist.specs[0] == Spec(f"mpileaks ^callpath ^mpich/{mpich_2.dag_hash(5)}")
diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index 7964ed3184..6fcdcded15 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -7,8 +7,16 @@ import pathlib
import pytest
+import spack.deptypes as dt
import spack.directives
import spack.error
+import spack.parser
+import spack.paths
+import spack.solver.asp
+import spack.spec
+import spack.store
+import spack.variant
+import spack.version as vn
from spack.error import SpecError, UnsatisfiableSpecError
from spack.spec import (
ArchSpec,
@@ -26,6 +34,95 @@ from spack.variant import (
)
+@pytest.fixture()
+def setup_complex_splice(monkeypatch):
+ r"""Fixture to set up splicing for two complex specs.
+
+ a_red is a spec in which every node has the variant color=red
+ c_blue is a spec in which every node has the variant color=blue
+
+ a_red structure:
+ a -
+ / \ \
+ b c \
+ /|\ / \ |
+ e | d g@2
+ \|/
+ g@1
+
+ c_blue structure:
+ c
+ /|\
+ d f \
+ / |\ \
+ g@2 e \ \
+ \| /
+ g@3
+
+ This is not intended for use in tests that use virtuals, so ``_splice_match`` is monkeypatched
+ to avoid needing package files for each spec.
+ """
+
+ def splice_match(self, other, self_root, other_root):
+ return self.name == other.name
+
+ def virtuals_provided(self, root):
+ return []
+
+ monkeypatch.setattr(Spec, "_splice_match", splice_match)
+ monkeypatch.setattr(Spec, "_virtuals_provided", virtuals_provided)
+
+ g1_red = Spec("pkg-g color=red")
+ g1_red.versions = vn.VersionList([vn.Version("1")])
+ g2_red = Spec("pkg-g color=red")
+ g2_red.versions = vn.VersionList([vn.Version("2")])
+ g2_blue = Spec("pkg-g color=blue")
+ g2_blue.versions = vn.VersionList([vn.Version("2")])
+ g3_blue = Spec("pkg-g color=blue")
+ g3_blue.versions = vn.VersionList([vn.Version("3")])
+
+ depflag = dt.LINK | dt.BUILD
+ e_red = Spec("pkg-e color=red")
+ e_red._add_dependency(g1_red, depflag=depflag, virtuals=())
+ e_blue = Spec("pkg-e color=blue")
+ e_blue._add_dependency(g3_blue, depflag=depflag, virtuals=())
+
+ d_red = Spec("pkg-d color=red")
+ d_red._add_dependency(g1_red, depflag=depflag, virtuals=())
+ d_blue = Spec("pkg-d color=blue")
+ d_blue._add_dependency(g2_blue, depflag=depflag, virtuals=())
+
+ b_red = Spec("pkg-b color=red")
+ b_red._add_dependency(e_red, depflag=depflag, virtuals=())
+ b_red._add_dependency(d_red, depflag=depflag, virtuals=())
+ b_red._add_dependency(g1_red, depflag=depflag, virtuals=())
+
+ f_blue = Spec("pkg-f color=blue")
+ f_blue._add_dependency(e_blue, depflag=depflag, virtuals=())
+ f_blue._add_dependency(g3_blue, depflag=depflag, virtuals=())
+
+ c_red = Spec("pkg-c color=red")
+ c_red._add_dependency(d_red, depflag=depflag, virtuals=())
+ c_red._add_dependency(g2_red, depflag=depflag, virtuals=())
+ c_blue = Spec("pkg-c color=blue")
+ c_blue._add_dependency(d_blue, depflag=depflag, virtuals=())
+ c_blue._add_dependency(f_blue, depflag=depflag, virtuals=())
+ c_blue._add_dependency(g3_blue, depflag=depflag, virtuals=())
+
+ a_red = Spec("pkg-a color=red")
+ a_red._add_dependency(b_red, depflag=depflag, virtuals=())
+ a_red._add_dependency(c_red, depflag=depflag, virtuals=())
+ a_red._add_dependency(g2_red, depflag=depflag, virtuals=())
+
+ for spec in [e_red, e_blue, d_red, d_blue, b_red, f_blue, c_red, c_blue, a_red]:
+ spec.versions = vn.VersionList([vn.Version("1")])
+
+ a_red._mark_concrete()
+ c_blue._mark_concrete()
+
+ return a_red, c_blue
+
+
@pytest.mark.usefixtures("config", "mock_packages")
class TestSpecSemantics:
"""Test satisfies(), intersects(), constrain() and other semantic operations on specs."""
@@ -62,8 +159,8 @@ class TestSpecSemantics:
("foo%intel", "%intel", "foo%intel"),
("foo%gcc", "%gcc@4.7.2", "foo%gcc@4.7.2"),
("foo%intel", "%intel@4.7.2", "foo%intel@4.7.2"),
- ("foo%pgi@4.5", "%pgi@4.4:4.6", "foo%pgi@4.5"),
- ("foo@2.0%pgi@4.5", "@1:3%pgi@4.4:4.6", "foo@2.0%pgi@4.5"),
+ ("foo%gcc@4.5", "%gcc@4.4:4.6", "foo%gcc@4.5"),
+ ("foo@2.0%gcc@4.5", "@1:3%gcc@4.4:4.6", "foo@2.0%gcc@4.5"),
("foo %gcc@4.7.3", "%gcc@4.7", "foo %gcc@4.7.3"),
("libelf %gcc@4.4.7", "libelf %gcc@4.4.7", "libelf %gcc@4.4.7"),
("libelf", "libelf %gcc@4.4.7", "libelf %gcc@4.4.7"),
@@ -134,7 +231,7 @@ class TestSpecSemantics:
("mpich+foo", "mpich foo=True", "mpich+foo"),
("mpich++foo", "mpich foo=True", "mpich+foo"),
("mpich foo=true", "mpich+foo", "mpich+foo"),
- ("mpich foo==true", "mpich++foo", "mpich+foo"),
+ ("mpich foo==true", "mpich++foo", "mpich++foo"),
("mpich~foo", "mpich foo=FALSE", "mpich~foo"),
("mpich~~foo", "mpich foo=FALSE", "mpich~foo"),
("mpich foo=False", "mpich~foo", "mpich~foo"),
@@ -174,17 +271,17 @@ class TestSpecSemantics:
("mpich+foo", "mpich", "mpich+foo"),
("mpich~foo", "mpich", "mpich~foo"),
("mpich foo=1", "mpich", "mpich foo=1"),
- ("mpich", "mpich++foo", "mpich+foo"),
+ ("mpich", "mpich++foo", "mpich++foo"),
("libelf+debug", "libelf+foo", "libelf+debug+foo"),
("libelf+debug", "libelf+debug+foo", "libelf+debug+foo"),
("libelf debug=2", "libelf foo=1", "libelf debug=2 foo=1"),
("libelf debug=2", "libelf debug=2 foo=1", "libelf debug=2 foo=1"),
("libelf+debug", "libelf~foo", "libelf+debug~foo"),
("libelf+debug", "libelf+debug~foo", "libelf+debug~foo"),
- ("libelf++debug", "libelf+debug+foo", "libelf++debug++foo"),
- ("libelf debug==2", "libelf foo=1", "libelf debug==2 foo==1"),
- ("libelf debug==2", "libelf debug=2 foo=1", "libelf debug==2 foo==1"),
- ("libelf++debug", "libelf++debug~foo", "libelf++debug~~foo"),
+ ("libelf++debug", "libelf+debug+foo", "libelf+debug+foo"),
+ ("libelf debug==2", "libelf foo=1", "libelf debug==2 foo=1"),
+ ("libelf debug==2", "libelf debug=2 foo=1", "libelf debug=2 foo=1"),
+ ("libelf++debug", "libelf++debug~foo", "libelf++debug~foo"),
("libelf foo=bar,baz", "libelf foo=*", "libelf foo=bar,baz"),
("libelf foo=*", "libelf foo=bar,baz", "libelf foo=bar,baz"),
(
@@ -197,6 +294,9 @@ class TestSpecSemantics:
'multivalue-variant foo="baz"',
'multivalue-variant foo="bar,baz,barbaz"',
),
+ # Namespace (special case, but like variants
+ ("builtin.libelf", "namespace=builtin", "builtin.libelf"),
+ ("libelf", "namespace=builtin", "builtin.libelf"),
# Flags
("mpich ", 'mpich cppflags="-O3"', 'mpich cppflags="-O3"'),
(
@@ -225,6 +325,16 @@ class TestSpecSemantics:
'libelf cflags="-O3" cppflags="-Wall"',
'libelf cflags="-O3" cppflags="-Wall"',
),
+ (
+ "libelf patches=ba5e334fe247335f3a116decfb5284100791dc302b5571ff5e664d8f9a6806c2",
+ "libelf patches=ba5e3", # constrain by a patch sha256 prefix
+ # TODO: the result below is not ideal. Prefix satisfies() works for patches, but
+ # constrain() isn't similarly special-cased to do the same thing
+ (
+ "libelf patches=ba5e3,"
+ "ba5e334fe247335f3a116decfb5284100791dc302b5571ff5e664d8f9a6806c2"
+ ),
+ ),
],
)
def test_abstract_specs_can_constrain_each_other(self, lhs, rhs, expected):
@@ -242,6 +352,70 @@ class TestSpecSemantics:
assert c1 == c2
assert c1 == expected
+ @pytest.mark.parametrize(
+ "lhs,rhs,expected_lhs,expected_rhs,propagated_lhs,propagated_rhs",
+ [
+ (
+ 'mpich cppflags="-O3"',
+ 'mpich cppflags="-O2"',
+ 'mpich cppflags="-O3 -O2"',
+ 'mpich cppflags="-O2 -O3"',
+ [],
+ [],
+ ),
+ (
+ 'mpich cflags="-O3 -g"',
+ 'mpich cflags=="-O3"',
+ 'mpich cflags="-O3 -g"',
+ 'mpich cflags="-O3 -g"',
+ [],
+ [],
+ ),
+ (
+ 'mpich cflags=="-O3 -g"',
+ 'mpich cflags=="-O3"',
+ 'mpich cflags=="-O3 -g"',
+ 'mpich cflags=="-O3 -g"',
+ [("cflags", "-O3"), ("cflags", "-g")],
+ [("cflags", "-O3"), ("cflags", "-g")],
+ ),
+ ],
+ )
+ def test_constrain_compiler_flags(
+ self, lhs, rhs, expected_lhs, expected_rhs, propagated_lhs, propagated_rhs
+ ):
+ """Constraining is asymmetric for compiler flags."""
+ lhs, rhs, expected_lhs, expected_rhs = (
+ Spec(lhs),
+ Spec(rhs),
+ Spec(expected_lhs),
+ Spec(expected_rhs),
+ )
+
+ assert lhs.intersects(rhs)
+ assert rhs.intersects(lhs)
+
+ c1, c2 = lhs.copy(), rhs.copy()
+ c1.constrain(rhs)
+ c2.constrain(lhs)
+
+ assert c1 == expected_lhs
+ assert c2 == expected_rhs
+ for x in [c1, c2]:
+ assert x.satisfies(lhs)
+ assert x.satisfies(rhs)
+
+ def _propagated_flags(_spec):
+ result = set()
+ for flagtype in _spec.compiler_flags:
+ for flag in _spec.compiler_flags[flagtype]:
+ if flag.propagate:
+ result.add((flagtype, flag))
+ return result
+
+ assert set(propagated_lhs) <= _propagated_flags(c1)
+ assert set(propagated_rhs) <= _propagated_flags(c2)
+
def test_constrain_specs_by_hash(self, default_mock_concretization, database):
"""Test that Specs specified only by their hashes can constrain eachother."""
mpich_dag_hash = "/" + database.query_one("mpich").dag_hash()
@@ -288,10 +462,10 @@ class TestSpecSemantics:
("foo target=x86_64", "platform=test os=redhat6 target=x86"),
("foo arch=test-frontend-frontend", "platform=test os=frontend target=backend"),
("foo%intel", "%gcc"),
- ("foo%intel", "%pgi"),
- ("foo%pgi@4.3", "%pgi@4.4:4.6"),
- ("foo@4.0%pgi", "@1:3%pgi"),
- ("foo@4.0%pgi@4.5", "@1:3%pgi@4.4:4.6"),
+ ("foo%intel", "%gcc"),
+ ("foo%gcc@4.3", "%gcc@4.4:4.6"),
+ ("foo@4.0%gcc", "@1:3%gcc"),
+ ("foo@4.0%gcc@4.5", "@1:3%gcc@4.4:4.6"),
("builtin.mock.mpich", "builtin.mpich"),
("mpileaks ^builtin.mock.mpich", "^builtin.mpich"),
("mpileaks^mpich@1.2", "^mpich@2.0"),
@@ -308,15 +482,13 @@ class TestSpecSemantics:
("mpich~~foo", "mpich++foo"),
("mpich++foo", "mpich~~foo"),
("mpich foo==True", "mpich foo==False"),
- ('mpich cppflags="-O3"', 'mpich cppflags="-O2"'),
- ('mpich cppflags="-O3"', 'mpich cppflags=="-O3"'),
("libelf@0:2.0", "libelf@2.1:3"),
("libelf@0:2.5%gcc@4.8:4.9", "libelf@2.1:3%gcc@4.5:4.7"),
("libelf+debug", "libelf~debug"),
("libelf+debug~foo", "libelf+debug+foo"),
("libelf debug=True", "libelf debug=False"),
- ('libelf cppflags="-O3"', 'libelf cppflags="-O2"'),
("libelf platform=test target=be os=be", "libelf target=fe os=fe"),
+ ("namespace=builtin.mock", "namespace=builtin"),
],
)
def test_constraining_abstract_specs_with_empty_intersection(self, lhs, rhs):
@@ -340,13 +512,6 @@ class TestSpecSemantics:
("mpich", "mpich +foo"),
("mpich", "mpich~foo"),
("mpich", "mpich foo=1"),
- ("mpich", "mpich++foo"),
- ("mpich", "mpich~~foo"),
- ("mpich", "mpich foo==1"),
- # Flags semantics is currently different from other variant
- ("mpich", 'mpich cflags="-O3"'),
- ("mpich cflags=-O3", 'mpich cflags="-O3 -Ofast"'),
- ("mpich cflags=-O2", 'mpich cflags="-O3"'),
("multivalue-variant foo=bar", "multivalue-variant +foo"),
("multivalue-variant foo=bar", "multivalue-variant ~foo"),
("multivalue-variant fee=bar", "multivalue-variant fee=baz"),
@@ -368,12 +533,64 @@ class TestSpecSemantics:
with pytest.raises(UnsatisfiableSpecError):
assert rhs.constrain(lhs)
+ @pytest.mark.parametrize(
+ "lhs,rhs", [("mpich", "mpich++foo"), ("mpich", "mpich~~foo"), ("mpich", "mpich foo==1")]
+ )
+ def test_concrete_specs_which_satisfy_abstract(self, lhs, rhs, default_mock_concretization):
+ lhs, rhs = default_mock_concretization(lhs), Spec(rhs)
+
+ assert lhs.intersects(rhs)
+ assert rhs.intersects(lhs)
+ assert lhs.satisfies(rhs)
+
+ s1 = lhs.copy()
+ s1.constrain(rhs)
+ assert s1 == lhs and s1.satisfies(lhs)
+
+ s2 = rhs.copy()
+ s2.constrain(lhs)
+ assert s2 == lhs and s2.satisfies(lhs)
+
+ @pytest.mark.parametrize(
+ "lhs,rhs,expected,constrained",
+ [
+ # hdf5++mpi satisfies hdf5, and vice versa, because of the non-contradiction semantic
+ ("hdf5++mpi", "hdf5", True, "hdf5++mpi"),
+ ("hdf5", "hdf5++mpi", True, "hdf5++mpi"),
+ # Same holds true for arbitrary propagated variants
+ ("hdf5++mpi", "hdf5++shared", True, "hdf5++mpi++shared"),
+ # Here hdf5+mpi satisfies hdf5++mpi but not vice versa
+ ("hdf5++mpi", "hdf5+mpi", False, "hdf5+mpi"),
+ ("hdf5+mpi", "hdf5++mpi", True, "hdf5+mpi"),
+ # Non contradiction is violated
+ ("hdf5 ^foo~mpi", "hdf5++mpi", False, "hdf5++mpi ^foo~mpi"),
+ ("hdf5++mpi", "hdf5 ^foo~mpi", False, "hdf5++mpi ^foo~mpi"),
+ ],
+ )
+ def test_abstract_specs_with_propagation(self, lhs, rhs, expected, constrained):
+ """Tests (and documents) behavior of variant propagation on abstract specs.
+
+ Propagated variants do not comply with subset semantic, making it difficult to give
+ precise definitions. Here we document the behavior that has been decided for the
+ practical cases we face.
+ """
+ lhs, rhs, constrained = Spec(lhs), Spec(rhs), Spec(constrained)
+ assert lhs.satisfies(rhs) is expected
+
+ c = lhs.copy()
+ c.constrain(rhs)
+ assert c == constrained
+
+ c = rhs.copy()
+ c.constrain(lhs)
+ assert c == constrained
+
def test_satisfies_single_valued_variant(self):
"""Tests that the case reported in
https://github.com/spack/spack/pull/2386#issuecomment-282147639
is handled correctly.
"""
- a = Spec("a foobar=bar")
+ a = Spec("pkg-a foobar=bar")
a.concretize()
assert a.satisfies("foobar=bar")
@@ -390,21 +607,40 @@ class TestSpecSemantics:
assert "foo=bar" in a
# Check that conditional dependencies are treated correctly
- assert "^b" in a
+ assert "^pkg-b" in a
def test_unsatisfied_single_valued_variant(self):
- a = Spec("a foobar=baz")
+ a = Spec("pkg-a foobar=baz")
a.concretize()
- assert "^b" not in a
+ assert "^pkg-b" not in a
mv = Spec("multivalue-variant")
mv.concretize()
- assert "a@1.0" not in mv
+ assert "pkg-a@1.0" not in mv
def test_indirect_unsatisfied_single_valued_variant(self):
spec = Spec("singlevalue-variant-dependent")
spec.concretize()
- assert "a@1.0" not in spec
+ assert "pkg-a@1.0" not in spec
+
+ def test_satisfied_namespace(self):
+ spec = Spec("zlib").concretized()
+ assert spec.satisfies("namespace=builtin.mock")
+ assert not spec.satisfies("namespace=builtin")
+
+ @pytest.mark.parametrize(
+ "spec_string",
+ [
+ "tcl namespace==foobar",
+ "tcl arch==foobar",
+ "tcl os==foobar",
+ "tcl patches==foobar",
+ "tcl dev_path==foobar",
+ ],
+ )
+ def test_propagate_reserved_variant_names(self, spec_string):
+ with pytest.raises(spack.parser.SpecParsingError, match="Propagation"):
+ Spec(spec_string)
def test_unsatisfiable_multi_value_variant(self, default_mock_concretization):
# Semantics for a multi-valued variant is different
@@ -514,27 +750,20 @@ class TestSpecSemantics:
s = Spec("callpath")
assert s["callpath"] == s
- def test_dep_index(self):
- s = Spec("callpath")
- s.normalize()
+ def test_dep_index(self, default_mock_concretization):
+ """Tests __getitem__ and __contains__ for specs."""
+ s = default_mock_concretization("callpath")
assert s["callpath"] == s
- assert isinstance(s["dyninst"], Spec)
- assert isinstance(s["libdwarf"], Spec)
- assert isinstance(s["libelf"], Spec)
- assert isinstance(s["mpi"], Spec)
- assert s["dyninst"].name == "dyninst"
- assert s["libdwarf"].name == "libdwarf"
- assert s["libelf"].name == "libelf"
- assert s["mpi"].name == "mpi"
+ # Real dependencies
+ for key in ("dyninst", "libdwarf", "libelf"):
+ assert isinstance(s[key], Spec)
+ assert s[key].name == key
+ assert key in s
- def test_spec_contains_deps(self):
- s = Spec("callpath")
- s.normalize()
- assert "dyninst" in s
- assert "libdwarf" in s
- assert "libelf" in s
+ # Virtual dependencies
+ assert s["mpi"].name == "mpich"
assert "mpi" in s
@pytest.mark.usefixtures("config")
@@ -631,13 +860,6 @@ class TestSpecSemantics:
def test_spec_formatting(self, default_mock_concretization):
spec = default_mock_concretization("multivalue-variant cflags=-O2")
- # Since the default is the full spec see if the string rep of
- # spec is the same as the output of spec.format()
- # ignoring whitespace (though should we?) and ignoring dependencies
- spec_string = str(spec)
- idx = spec_string.index(" ^")
- assert spec_string[:idx] == spec.format().strip()
-
# Testing named strings ie {string} and whether we get
# the correct component
# Mixed case intentional to test both
@@ -656,6 +878,7 @@ class TestSpecSemantics:
("{@VERSIONS}", "@", "versions", lambda spec: spec),
("{%compiler}", "%", "compiler", lambda spec: spec),
("{arch=architecture}", "arch=", "architecture", lambda spec: spec),
+ ("{namespace=namespace}", "namespace=", "namespace", lambda spec: spec),
("{compiler.name}", "", "name", lambda spec: spec.compiler),
("{compiler.version}", "", "version", lambda spec: spec.compiler),
("{%compiler.name}", "%", "name", lambda spec: spec.compiler),
@@ -672,6 +895,13 @@ class TestSpecSemantics:
("{/hash}", "/", lambda s: "/" + s.dag_hash()),
]
+ variants_segments = [
+ ("{variants.debug}", spec, "debug"),
+ ("{variants.foo}", spec, "foo"),
+ ("{^pkg-a.variants.bvv}", spec["pkg-a"], "bvv"),
+ ("{^pkg-a.variants.foo}", spec["pkg-a"], "foo"),
+ ]
+
other_segments = [
("{spack_root}", spack.paths.spack_root),
("{spack_install}", spack.store.STORE.layout.root),
@@ -699,26 +929,62 @@ class TestSpecSemantics:
callpath, fmt_str = depify("callpath", named_str, sigil)
assert spec.format(fmt_str) == getter(callpath)
+ for named_str, test_spec, variant_name in variants_segments:
+ assert test_spec.format(named_str) == str(test_spec.variants[variant_name])
+ assert test_spec.format(named_str[:-1] + ".value}") == str(
+ test_spec.variants[variant_name].value
+ )
+
for named_str, expected in other_segments:
actual = spec.format(named_str)
assert expected == actual
- def test_spec_formatting_escapes(self, default_mock_concretization):
+ @pytest.mark.parametrize(
+ "fmt_str",
+ [
+ "{name}",
+ "{version}",
+ "{@version}",
+ "{%compiler}",
+ "{namespace}",
+ "{ namespace=namespace}",
+ "{ namespace =namespace}",
+ "{ name space =namespace}",
+ "{arch}",
+ "{architecture}",
+ "{arch=architecture}",
+ "{ arch=architecture}",
+ "{ arch =architecture}",
+ ],
+ )
+ def test_spec_format_null_attributes(self, fmt_str):
+ """Ensure that attributes format to empty strings when their values are null."""
+ spec = spack.spec.Spec()
+ assert spec.format(fmt_str) == ""
+
+ def test_spec_formatting_spaces_in_key(self, default_mock_concretization):
spec = default_mock_concretization("multivalue-variant cflags=-O2")
- sigil_mismatches = [
- "{@name}",
- "{@version.concrete}",
- "{%compiler.version}",
- "{/hashd}",
- "{arch=architecture.os}",
- ]
+ # test that spaces are preserved, if they come after some other text, otherwise
+ # they are trimmed.
+ # TODO: should we be trimming whitespace from formats? Probably not.
+ assert spec.format("x{ arch=architecture}") == f"x arch={spec.architecture}"
+ assert spec.format("x{ namespace=namespace}") == f"x namespace={spec.namespace}"
+ assert spec.format("x{ name space =namespace}") == f"x name space ={spec.namespace}"
+ assert spec.format("x{ os =os}") == f"x os ={spec.os}"
+
+ @pytest.mark.parametrize(
+ "fmt_str", ["{@name}", "{@version.concrete}", "{%compiler.version}", "{/hashd}"]
+ )
+ def test_spec_formatting_sigil_mismatches(self, default_mock_concretization, fmt_str):
+ spec = default_mock_concretization("multivalue-variant cflags=-O2")
- for fmt_str in sigil_mismatches:
- with pytest.raises(SpecFormatSigilError):
- spec.format(fmt_str)
+ with pytest.raises(SpecFormatSigilError):
+ spec.format(fmt_str)
- bad_formats = [
+ @pytest.mark.parametrize(
+ "fmt_str",
+ [
r"{}",
r"name}",
r"\{name}",
@@ -728,31 +994,21 @@ class TestSpecSemantics:
r"{dag_hash}",
r"{foo}",
r"{+variants.debug}",
- ]
-
- for fmt_str in bad_formats:
- with pytest.raises(SpecFormatStringError):
- spec.format(fmt_str)
-
- @pytest.mark.regression("9908")
- def test_spec_flags_maintain_order(self):
- # Spack was assembling flags in a manner that could result in
- # different orderings for repeated concretizations of the same
- # spec and config
- spec_str = "libelf %gcc@11.1.0 os=redhat6"
- for _ in range(3):
- s = Spec(spec_str).concretized()
- assert all(
- s.compiler_flags[x] == ["-O0", "-g"] for x in ("cflags", "cxxflags", "fflags")
- )
+ r"{variants.this_variant_does_not_exist}",
+ ],
+ )
+ def test_spec_formatting_bad_formats(self, default_mock_concretization, fmt_str):
+ spec = default_mock_concretization("multivalue-variant cflags=-O2")
+ with pytest.raises(SpecFormatStringError):
+ spec.format(fmt_str)
def test_combination_of_wildcard_or_none(self):
# Test that using 'none' and another value raises
- with pytest.raises(spack.variant.InvalidVariantValueCombinationError):
+ with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"):
Spec("multivalue-variant foo=none,bar")
# Test that using wildcard and another value raises
- with pytest.raises(spack.variant.InvalidVariantValueCombinationError):
+ with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"):
Spec("multivalue-variant foo=*,bar")
def test_errors_in_variant_directive(self):
@@ -848,6 +1104,154 @@ class TestSpecSemantics:
# Finally, the spec should know it's been spliced:
assert out.spliced
+ def test_splice_intransitive_complex(self, setup_complex_splice):
+ a_red, c_blue = setup_complex_splice
+
+ spliced = a_red.splice(c_blue, transitive=False)
+ assert spliced.satisfies(
+ "pkg-a color=red ^pkg-b color=red ^pkg-c color=blue "
+ "^pkg-d color=red ^pkg-e color=red ^pkg-f color=blue ^pkg-g@2 color=red"
+ )
+ assert set(spliced.dependencies(deptype=dt.BUILD)) == set()
+ assert spliced.build_spec == a_red
+
+ # We cannot check spliced["b"].build_spec is spliced["b"] because Spec.__getitem__ creates
+ # a new wrapper object on each invocation. So we select once and check on that object
+ # For the rest of the unchanged specs we will just check the s._build_spec is None.
+ b = spliced["pkg-b"]
+ assert b == a_red["pkg-b"]
+ assert b.build_spec is b
+ assert set(b.dependents()) == {spliced}
+
+ assert spliced["pkg-c"].satisfies(
+ "pkg-c color=blue ^pkg-d color=red ^pkg-e color=red "
+ "^pkg-f color=blue ^pkg-g@2 color=red"
+ )
+ assert set(spliced["pkg-c"].dependencies(deptype=dt.BUILD)) == set()
+ assert spliced["pkg-c"].build_spec == c_blue
+ assert set(spliced["pkg-c"].dependents()) == {spliced}
+
+ assert spliced["pkg-d"] == a_red["pkg-d"]
+ assert spliced["pkg-d"]._build_spec is None
+ # Since D had a parent changed, it has a split edge for link vs build dependent
+ # note: spliced["b"] == b_red, referenced differently to preserve logic
+ assert set(spliced["pkg-d"].dependents()) == {
+ spliced["pkg-b"],
+ spliced["pkg-c"],
+ a_red["pkg-c"],
+ }
+ assert set(spliced["pkg-d"].dependents(deptype=dt.BUILD)) == {
+ a_red["pkg-b"],
+ a_red["pkg-c"],
+ }
+
+ assert spliced["pkg-e"] == a_red["pkg-e"]
+ assert spliced["pkg-e"]._build_spec is None
+ # Because a copy of e is used, it does not have dependnets in the original specs
+ assert set(spliced["pkg-e"].dependents()) == {spliced["pkg-b"], spliced["pkg-f"]}
+ # Build dependent edge to f because f originally dependended on the e this was copied from
+ assert set(spliced["pkg-e"].dependents(deptype=dt.BUILD)) == {spliced["pkg-b"]}
+
+ assert spliced["pkg-f"].satisfies("pkg-f color=blue ^pkg-e color=red ^pkg-g@2 color=red")
+ assert set(spliced["pkg-f"].dependencies(deptype=dt.BUILD)) == set()
+ assert spliced["pkg-f"].build_spec == c_blue["pkg-f"]
+ assert set(spliced["pkg-f"].dependents()) == {spliced["pkg-c"]}
+
+ # spliced["pkg-g"] is g2, but spliced["pkg-b"]["pkg-g"] is g1
+ assert spliced["pkg-g"] == a_red["pkg-g"]
+ assert spliced["pkg-g"]._build_spec is None
+ assert set(spliced["pkg-g"].dependents(deptype=dt.LINK)) == {
+ spliced,
+ spliced["pkg-c"],
+ spliced["pkg-f"],
+ a_red["pkg-c"],
+ }
+
+ assert spliced["pkg-b"]["pkg-g"] == a_red["pkg-b"]["pkg-g"]
+ assert spliced["pkg-b"]["pkg-g"]._build_spec is None
+ assert set(spliced["pkg-b"]["pkg-g"].dependents()) == {
+ spliced["pkg-b"],
+ spliced["pkg-d"],
+ spliced["pkg-e"],
+ }
+
+ for edge in spliced.traverse_edges(cover="edges", deptype=dt.LINK | dt.RUN):
+ # traverse_edges creates a synthetic edge with no deptypes to the root
+ if edge.depflag:
+ depflag = dt.LINK
+ if not edge.parent.spliced:
+ depflag |= dt.BUILD
+ assert edge.depflag == depflag
+
+ def test_splice_transitive_complex(self, setup_complex_splice):
+ a_red, c_blue = setup_complex_splice
+
+ spliced = a_red.splice(c_blue, transitive=True)
+ assert spliced.satisfies(
+ "pkg-a color=red ^pkg-b color=red ^pkg-c color=blue ^pkg-d color=blue "
+ "^pkg-e color=blue ^pkg-f color=blue ^pkg-g@3 color=blue"
+ )
+ assert set(spliced.dependencies(deptype=dt.BUILD)) == set()
+ assert spliced.build_spec == a_red
+
+ assert spliced["pkg-b"].satisfies(
+ "pkg-b color=red ^pkg-d color=blue ^pkg-e color=blue ^pkg-g@2 color=blue"
+ )
+ assert set(spliced["pkg-b"].dependencies(deptype=dt.BUILD)) == set()
+ assert spliced["pkg-b"].build_spec == a_red["pkg-b"]
+ assert set(spliced["pkg-b"].dependents()) == {spliced}
+
+ # We cannot check spliced["c"].build_spec is spliced["c"] because Spec.__getitem__ creates
+ # a new wrapper object on each invocation. So we select once and check on that object
+ # For the rest of the unchanged specs we will just check the s._build_spec is None.
+ c = spliced["pkg-c"]
+ assert c == c_blue
+ assert c.build_spec is c
+ assert set(c.dependents()) == {spliced}
+
+ assert spliced["pkg-d"] == c_blue["pkg-d"]
+ assert spliced["pkg-d"]._build_spec is None
+ assert set(spliced["pkg-d"].dependents()) == {spliced["pkg-b"], spliced["pkg-c"]}
+
+ assert spliced["pkg-e"] == c_blue["pkg-e"]
+ assert spliced["pkg-e"]._build_spec is None
+ assert set(spliced["pkg-e"].dependents()) == {spliced["pkg-b"], spliced["pkg-f"]}
+
+ assert spliced["pkg-f"] == c_blue["pkg-f"]
+ assert spliced["pkg-f"]._build_spec is None
+ assert set(spliced["pkg-f"].dependents()) == {spliced["pkg-c"]}
+
+ # spliced["g"] is g3, but spliced["d"]["g"] is g1
+ assert spliced["pkg-g"] == c_blue["pkg-g"]
+ assert spliced["pkg-g"]._build_spec is None
+ assert set(spliced["pkg-g"].dependents(deptype=dt.LINK)) == {
+ spliced,
+ spliced["pkg-b"],
+ spliced["pkg-c"],
+ spliced["pkg-e"],
+ spliced["pkg-f"],
+ }
+ # Because a copy of g3 is used, it does not have dependents in the original specs
+ # It has build dependents on these spliced specs because it is an unchanged dependency
+ # for them
+ assert set(spliced["pkg-g"].dependents(deptype=dt.BUILD)) == {
+ spliced["pkg-c"],
+ spliced["pkg-e"],
+ spliced["pkg-f"],
+ }
+
+ assert spliced["pkg-d"]["pkg-g"] == c_blue["pkg-d"]["pkg-g"]
+ assert spliced["pkg-d"]["pkg-g"]._build_spec is None
+ assert set(spliced["pkg-d"]["pkg-g"].dependents()) == {spliced["pkg-d"]}
+
+ for edge in spliced.traverse_edges(cover="edges", deptype=dt.LINK | dt.RUN):
+ # traverse_edges creates a synthetic edge with no deptypes to the root
+ if edge.depflag:
+ depflag = dt.LINK
+ if not edge.parent.spliced:
+ depflag |= dt.BUILD
+ assert edge.depflag == depflag
+
@pytest.mark.parametrize("transitive", [True, False])
def test_splice_with_cached_hashes(self, default_mock_concretization, transitive):
spec = default_mock_concretization("splice-t")
@@ -968,7 +1372,7 @@ class TestSpecSemantics:
@pytest.mark.regression("13124")
def test_error_message_unknown_variant(self):
s = Spec("mpileaks +unknown")
- with pytest.raises(UnknownVariantError, match=r"package has no such"):
+ with pytest.raises(UnknownVariantError):
s.concretize()
@pytest.mark.regression("18527")
@@ -980,7 +1384,7 @@ class TestSpecSemantics:
@pytest.mark.parametrize("transitive", [True, False])
def test_splice_swap_names(self, default_mock_concretization, transitive):
- spec = default_mock_concretization("splice-t")
+ spec = default_mock_concretization("splice-vt")
dep = default_mock_concretization("splice-a+foo")
out = spec.splice(dep, transitive)
assert dep.name in out
@@ -988,14 +1392,14 @@ class TestSpecSemantics:
@pytest.mark.parametrize("transitive", [True, False])
def test_splice_swap_names_mismatch_virtuals(self, default_mock_concretization, transitive):
- spec = default_mock_concretization("splice-t")
- dep = default_mock_concretization("splice-vh+foo")
- with pytest.raises(spack.spec.SpliceError, match="will not provide the same virtuals."):
- spec.splice(dep, transitive)
+ vt = default_mock_concretization("splice-vt")
+ vh = default_mock_concretization("splice-vh+foo")
+ with pytest.raises(spack.spec.SpliceError, match="virtual"):
+ vt.splice(vh, transitive)
def test_spec_override(self):
- init_spec = Spec("a foo=baz foobar=baz cflags=-O3 cxxflags=-O1")
- change_spec = Spec("a foo=fee cflags=-O2")
+ init_spec = Spec("pkg-a foo=baz foobar=baz cflags=-O3 cxxflags=-O1")
+ change_spec = Spec("pkg-a foo=fee cflags=-O2")
new_spec = Spec.override(init_spec, change_spec)
new_spec.concretize()
assert "foo=fee" in new_spec
@@ -1007,6 +1411,20 @@ class TestSpecSemantics:
assert new_spec.compiler_flags["cflags"] == ["-O2"]
assert new_spec.compiler_flags["cxxflags"] == ["-O1"]
+ def test_spec_override_with_nonexisting_variant(self):
+ init_spec = Spec("pkg-a foo=baz foobar=baz cflags=-O3 cxxflags=-O1")
+ change_spec = Spec("pkg-a baz=fee")
+ with pytest.raises(ValueError):
+ Spec.override(init_spec, change_spec)
+
+ def test_spec_override_with_variant_not_in_init_spec(self):
+ init_spec = Spec("pkg-a foo=baz foobar=baz cflags=-O3 cxxflags=-O1")
+ change_spec = Spec("pkg-a +bvv ~lorem_ipsum")
+ new_spec = Spec.override(init_spec, change_spec)
+ new_spec.concretize()
+ assert "+bvv" in new_spec
+ assert "~lorem_ipsum" in new_spec
+
@pytest.mark.parametrize(
"spec_str,specs_in_dag",
[
@@ -1080,9 +1498,6 @@ class TestSpecSemantics:
],
)
def test_virtual_deps_bindings(self, default_mock_concretization, spec_str, specs_in_dag):
- if spack.config.get("config:concretizer") == "original":
- pytest.skip("Use case not supported by the original concretizer")
-
s = default_mock_concretization(spec_str)
for label, expected in specs_in_dag:
assert label in s
@@ -1098,9 +1513,6 @@ class TestSpecSemantics:
],
)
def test_unsatisfiable_virtual_deps_bindings(self, spec_str):
- if spack.config.get("config:concretizer") == "original":
- pytest.skip("Use case not supported by the original concretizer")
-
with pytest.raises(spack.solver.asp.UnsatisfiableSpecError):
Spec(spec_str).concretized()
@@ -1108,22 +1520,22 @@ class TestSpecSemantics:
@pytest.mark.parametrize(
"spec_str,format_str,expected",
[
- ("zlib@git.foo/bar", "{name}-{version}", str(pathlib.Path("zlib-git.foo_bar"))),
- ("zlib@git.foo/bar", "{name}-{version}-{/hash}", None),
- ("zlib@git.foo/bar", "{name}/{version}", str(pathlib.Path("zlib", "git.foo_bar"))),
+ ("git-test@git.foo/bar", "{name}-{version}", str(pathlib.Path("git-test-git.foo_bar"))),
+ ("git-test@git.foo/bar", "{name}-{version}-{/hash}", None),
+ ("git-test@git.foo/bar", "{name}/{version}", str(pathlib.Path("git-test", "git.foo_bar"))),
(
- "zlib@{0}=1.0%gcc".format("a" * 40),
+ "git-test@{0}=1.0%gcc".format("a" * 40),
"{name}/{version}/{compiler}",
- str(pathlib.Path("zlib", "{0}_1.0".format("a" * 40), "gcc")),
+ str(pathlib.Path("git-test", "{0}_1.0".format("a" * 40), "gcc")),
),
(
- "zlib@git.foo/bar=1.0%gcc",
+ "git-test@git.foo/bar=1.0%gcc",
"{name}/{version}/{compiler}",
- str(pathlib.Path("zlib", "git.foo_bar_1.0", "gcc")),
+ str(pathlib.Path("git-test", "git.foo_bar_1.0", "gcc")),
),
],
)
-def test_spec_format_path(spec_str, format_str, expected):
+def test_spec_format_path(spec_str, format_str, expected, mock_git_test_package):
_check_spec_format_path(spec_str, format_str, expected)
@@ -1141,45 +1553,57 @@ def _check_spec_format_path(spec_str, format_str, expected, path_ctor=None):
"spec_str,format_str,expected",
[
(
- "zlib@git.foo/bar",
+ "git-test@git.foo/bar",
r"C:\\installroot\{name}\{version}",
- r"C:\installroot\zlib\git.foo_bar",
+ r"C:\installroot\git-test\git.foo_bar",
),
(
- "zlib@git.foo/bar",
+ "git-test@git.foo/bar",
r"\\hostname\sharename\{name}\{version}",
- r"\\hostname\sharename\zlib\git.foo_bar",
+ r"\\hostname\sharename\git-test\git.foo_bar",
+ ),
+ # leading '/' is preserved on windows but converted to '\'
+ # note that it's still not "absolute" -- absolute windows paths start with a drive.
+ (
+ "git-test@git.foo/bar",
+ r"/installroot/{name}/{version}",
+ r"\installroot\git-test\git.foo_bar",
),
- # Windows doesn't attribute any significance to a leading
- # "/" so it is discarded
- ("zlib@git.foo/bar", r"/installroot/{name}/{version}", r"installroot\zlib\git.foo_bar"),
],
)
-def test_spec_format_path_windows(spec_str, format_str, expected):
+def test_spec_format_path_windows(spec_str, format_str, expected, mock_git_test_package):
_check_spec_format_path(spec_str, format_str, expected, path_ctor=pathlib.PureWindowsPath)
@pytest.mark.parametrize(
"spec_str,format_str,expected",
[
- ("zlib@git.foo/bar", r"/installroot/{name}/{version}", "/installroot/zlib/git.foo_bar"),
- ("zlib@git.foo/bar", r"//installroot/{name}/{version}", "//installroot/zlib/git.foo_bar"),
+ (
+ "git-test@git.foo/bar",
+ r"/installroot/{name}/{version}",
+ "/installroot/git-test/git.foo_bar",
+ ),
+ (
+ "git-test@git.foo/bar",
+ r"//installroot/{name}/{version}",
+ "//installroot/git-test/git.foo_bar",
+ ),
# This is likely unintentional on Linux: Firstly, "\" is not a
# path separator for POSIX, so this is treated as a single path
# component (containing literal "\" characters); secondly,
# Spec.format treats "\" as an escape character, so is
# discarded (unless directly following another "\")
(
- "zlib@git.foo/bar",
+ "git-test@git.foo/bar",
r"C:\\installroot\package-{name}-{version}",
- r"C__installrootpackage-zlib-git.foo_bar",
+ r"C__installrootpackage-git-test-git.foo_bar",
),
# "\" is not a POSIX separator, and Spec.format treats "\{" as a literal
# "{", which means that the resulting format string is invalid
- ("zlib@git.foo/bar", r"package\{name}\{version}", None),
+ ("git-test@git.foo/bar", r"package\{name}\{version}", None),
],
)
-def test_spec_format_path_posix(spec_str, format_str, expected):
+def test_spec_format_path_posix(spec_str, format_str, expected, mock_git_test_package):
_check_spec_format_path(spec_str, format_str, expected, path_ctor=pathlib.PurePosixPath)
@@ -1265,15 +1689,15 @@ def test_spec_installed(default_mock_concretization, database):
spec = Spec("not-a-real-package")
assert not spec.installed
- # 'a' is not in the mock DB and is not installed
- spec = default_mock_concretization("a")
+ # pkg-a is not in the mock DB and is not installed
+ spec = default_mock_concretization("pkg-a")
assert not spec.installed
@pytest.mark.regression("30678")
def test_call_dag_hash_on_old_dag_hash_spec(mock_packages, default_mock_concretization):
# create a concrete spec
- a = default_mock_concretization("a")
+ a = default_mock_concretization("pkg-a")
dag_hashes = {spec.name: spec.dag_hash() for spec in a.traverse()}
# make it look like an old DAG hash spec with no package hash on the spec.
@@ -1332,15 +1756,15 @@ def test_unsupported_compiler():
def test_package_hash_affects_dunder_and_dag_hash(mock_packages, default_mock_concretization):
- a1 = default_mock_concretization("a")
- a2 = default_mock_concretization("a")
+ a1 = default_mock_concretization("pkg-a")
+ a2 = default_mock_concretization("pkg-a")
assert hash(a1) == hash(a2)
assert a1.dag_hash() == a2.dag_hash()
assert a1.process_hash() == a2.process_hash()
- a1.clear_cached_hashes()
- a2.clear_cached_hashes()
+ a1.clear_caches()
+ a2.clear_caches()
# tweak the dag hash of one of these specs
new_hash = "00000000000000000000000000000000"
@@ -1357,8 +1781,8 @@ def test_intersects_and_satisfies_on_concretized_spec(default_mock_concretizatio
"""Test that a spec obtained by concretizing an abstract spec, satisfies the abstract spec
but not vice-versa.
"""
- a1 = default_mock_concretization("a@1.0")
- a2 = Spec("a@1.0")
+ a1 = default_mock_concretization("pkg-a@1.0")
+ a2 = Spec("pkg-a@1.0")
assert a1.intersects(a2)
assert a2.intersects(a1)
@@ -1409,8 +1833,8 @@ def test_abstract_contains_semantic(lhs, rhs, expected, mock_packages):
(CompilerSpec, "gcc@5", "gcc@5-tag", (True, False, True)),
# Flags (flags are a map, so for convenience we initialize a full Spec)
# Note: the semantic is that of sv variants, not mv variants
- (Spec, "cppflags=-foo", "cppflags=-bar", (False, False, False)),
- (Spec, "cppflags='-bar -foo'", "cppflags=-bar", (False, False, False)),
+ (Spec, "cppflags=-foo", "cppflags=-bar", (True, False, False)),
+ (Spec, "cppflags='-bar -foo'", "cppflags=-bar", (True, True, False)),
(Spec, "cppflags=-foo", "cppflags=-foo", (True, True, True)),
(Spec, "cppflags=-foo", "cflags=-foo", (True, False, False)),
# Versions
@@ -1484,17 +1908,17 @@ def test_constrain(factory, lhs_str, rhs_str, result, constrained_str):
def test_abstract_hash_intersects_and_satisfies(default_mock_concretization):
- concrete: Spec = default_mock_concretization("a")
+ concrete: Spec = default_mock_concretization("pkg-a")
hash = concrete.dag_hash()
hash_5 = hash[:5]
hash_6 = hash[:6]
# abstract hash that doesn't have a common prefix with the others.
hash_other = f"{'a' if hash_5[0] == 'b' else 'b'}{hash_5[1:]}"
- abstract_5 = Spec(f"a/{hash_5}")
- abstract_6 = Spec(f"a/{hash_6}")
- abstract_none = Spec(f"a/{hash_other}")
- abstract = Spec("a")
+ abstract_5 = Spec(f"pkg-a/{hash_5}")
+ abstract_6 = Spec(f"pkg-a/{hash_6}")
+ abstract_none = Spec(f"pkg-a/{hash_other}")
+ abstract = Spec("pkg-a")
def assert_subset(a: Spec, b: Spec):
assert a.intersects(b) and b.intersects(a) and a.satisfies(b) and not b.satisfies(a)
@@ -1528,3 +1952,30 @@ def test_edge_equality_does_not_depend_on_virtual_order():
assert edge1 == edge2
assert tuple(sorted(edge1.virtuals)) == edge1.virtuals
assert tuple(sorted(edge2.virtuals)) == edge1.virtuals
+
+
+def test_old_format_strings_trigger_error(default_mock_concretization):
+ s = Spec("pkg-a").concretized()
+ with pytest.raises(SpecFormatStringError):
+ s.format("${PACKAGE}-${VERSION}-${HASH}")
+
+
+@pytest.mark.regression("47362")
+@pytest.mark.parametrize(
+ "lhs,rhs",
+ [
+ ("hdf5 +mpi", "hdf5++mpi"),
+ ("hdf5 cflags==-g", "hdf5 cflags=-g"),
+ ("hdf5 +mpi ++shared", "hdf5+mpi +shared"),
+ ("hdf5 +mpi cflags==-g", "hdf5++mpi cflag=-g"),
+ ],
+)
+def test_equality_discriminate_on_propagation(lhs, rhs):
+ """Tests that == can discriminate abstract specs based on their 'propagation' status"""
+ s, t = Spec(lhs), Spec(rhs)
+ assert s != t
+ assert len({s, t}) == 2
+
+
+def test_comparison_multivalued_variants():
+ assert Spec("x=a") < Spec("x=a,b") < Spec("x==a,b") < Spec("x==a,b,c")
diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py
index c421494ce8..22942862eb 100644
--- a/lib/spack/spack/test/spec_syntax.py
+++ b/lib/spack/spack/test/spec_syntax.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import itertools
import os
import re
@@ -10,10 +9,12 @@ import sys
import pytest
+import spack.binary_distribution
import spack.cmd
+import spack.parser
import spack.platforms.test
+import spack.repo
import spack.spec
-import spack.variant
from spack.parser import (
UNIX_FILENAME,
WINDOWS_FILENAME,
@@ -523,6 +524,23 @@ def specfile_for(default_mock_concretization):
],
"^[virtuals=mpi] openmpi",
),
+ # Allow merging attributes, if deptypes match
+ (
+ "^[virtuals=mpi] openmpi+foo ^[virtuals=lapack] openmpi+bar",
+ [
+ Token(TokenType.START_EDGE_PROPERTIES, value="^["),
+ Token(TokenType.KEY_VALUE_PAIR, value="virtuals=mpi"),
+ Token(TokenType.END_EDGE_PROPERTIES, value="]"),
+ Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="openmpi"),
+ Token(TokenType.BOOL_VARIANT, value="+foo"),
+ Token(TokenType.START_EDGE_PROPERTIES, value="^["),
+ Token(TokenType.KEY_VALUE_PAIR, value="virtuals=lapack"),
+ Token(TokenType.END_EDGE_PROPERTIES, value="]"),
+ Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="openmpi"),
+ Token(TokenType.BOOL_VARIANT, value="+bar"),
+ ],
+ "^[virtuals=lapack,mpi] openmpi+bar+foo",
+ ),
(
"^[deptypes=link,build] zlib",
[
@@ -534,12 +552,26 @@ def specfile_for(default_mock_concretization):
"^[deptypes=build,link] zlib",
),
(
- "zlib@git.foo/bar",
+ "^[deptypes=link] zlib ^[deptypes=build] zlib",
[
- Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "zlib"),
+ Token(TokenType.START_EDGE_PROPERTIES, value="^["),
+ Token(TokenType.KEY_VALUE_PAIR, value="deptypes=link"),
+ Token(TokenType.END_EDGE_PROPERTIES, value="]"),
+ Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="zlib"),
+ Token(TokenType.START_EDGE_PROPERTIES, value="^["),
+ Token(TokenType.KEY_VALUE_PAIR, value="deptypes=build"),
+ Token(TokenType.END_EDGE_PROPERTIES, value="]"),
+ Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="zlib"),
+ ],
+ "^[deptypes=link] zlib ^[deptypes=build] zlib",
+ ),
+ (
+ "git-test@git.foo/bar",
+ [
+ Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "git-test"),
Token(TokenType.GIT_VERSION, "@git.foo/bar"),
],
- "zlib@git.foo/bar",
+ "git-test@git.foo/bar",
),
# Variant propagation
(
@@ -568,7 +600,7 @@ def specfile_for(default_mock_concretization):
),
],
)
-def test_parse_single_spec(spec_str, tokens, expected_roundtrip):
+def test_parse_single_spec(spec_str, tokens, expected_roundtrip, mock_git_test_package):
parser = SpecParser(spec_str)
assert tokens == parser.tokens()
assert expected_roundtrip == str(parser.next_spec())
@@ -683,7 +715,7 @@ def test_parse_multiple_specs(text, tokens, expected_specs):
],
)
def test_cli_spec_roundtrip(args, expected):
- if inspect.isclass(expected) and issubclass(expected, BaseException):
+ if isinstance(expected, type) and issubclass(expected, BaseException):
with pytest.raises(expected):
spack.cmd.parse_specs(args)
return
@@ -742,7 +774,7 @@ def test_spec_by_hash_tokens(text, tokens):
@pytest.mark.db
def test_spec_by_hash(database, monkeypatch, config):
mpileaks = database.query_one("mpileaks ^zmpi")
- b = spack.spec.Spec("b").concretized()
+ b = spack.spec.Spec("pkg-b").concretized()
monkeypatch.setattr(spack.binary_distribution, "update_cache_and_get_specs", lambda: [b])
hash_str = f"/{mpileaks.dag_hash()}"
@@ -834,12 +866,12 @@ def test_multiple_specs_with_hash(database, config):
@pytest.mark.db
-def test_ambiguous_hash(mutable_database, default_mock_concretization, config):
+def test_ambiguous_hash(mutable_database):
"""Test that abstract hash ambiguity is delayed until concretization.
In the past this ambiguity error would happen during parse time."""
# This is a very sketchy as manually setting hashes easily breaks invariants
- x1 = default_mock_concretization("a")
+ x1 = spack.spec.Spec("pkg-a").concretized()
x2 = x1.copy()
x1._hash = "xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
x1._process_hash = "xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
@@ -848,8 +880,8 @@ def test_ambiguous_hash(mutable_database, default_mock_concretization, config):
assert x1 != x2 # doesn't hold when only the dag hash is modified.
- mutable_database.add(x1, directory_layout=None)
- mutable_database.add(x2, directory_layout=None)
+ mutable_database.add(x1)
+ mutable_database.add(x2)
# ambiguity in first hash character
s1 = SpecParser("/x").next_spec()
@@ -857,7 +889,7 @@ def test_ambiguous_hash(mutable_database, default_mock_concretization, config):
s1.lookup_hash()
# ambiguity in first hash character AND spec name
- s2 = SpecParser("a/x").next_spec()
+ s2 = SpecParser("pkg-a/x").next_spec()
with pytest.raises(spack.spec.AmbiguousHashError):
s2.lookup_hash()
@@ -935,64 +967,62 @@ def test_disambiguate_hash_by_spec(spec1, spec2, constraint, mock_packages, monk
@pytest.mark.parametrize(
- "text,exc_cls",
+ "text,match_string",
[
# Duplicate variants
- ("x@1.2+debug+debug", spack.variant.DuplicateVariantError),
- ("x ^y@1.2+debug debug=true", spack.variant.DuplicateVariantError),
- ("x ^y@1.2 debug=false debug=true", spack.variant.DuplicateVariantError),
- ("x ^y@1.2 debug=false ~debug", spack.variant.DuplicateVariantError),
+ ("x@1.2+debug+debug", "variant"),
+ ("x ^y@1.2+debug debug=true", "variant"),
+ ("x ^y@1.2 debug=false debug=true", "variant"),
+ ("x ^y@1.2 debug=false ~debug", "variant"),
# Multiple versions
- ("x@1.2@2.3", spack.spec.MultipleVersionError),
- ("x@1.2:2.3@1.4", spack.spec.MultipleVersionError),
- ("x@1.2@2.3:2.4", spack.spec.MultipleVersionError),
- ("x@1.2@2.3,2.4", spack.spec.MultipleVersionError),
- ("x@1.2 +foo~bar @2.3", spack.spec.MultipleVersionError),
- ("x@1.2%y@1.2@2.3:2.4", spack.spec.MultipleVersionError),
+ ("x@1.2@2.3", "version"),
+ ("x@1.2:2.3@1.4", "version"),
+ ("x@1.2@2.3:2.4", "version"),
+ ("x@1.2@2.3,2.4", "version"),
+ ("x@1.2 +foo~bar @2.3", "version"),
+ ("x@1.2%y@1.2@2.3:2.4", "version"),
# Duplicate dependency
- ("x ^y@1 ^y@2", spack.spec.DuplicateDependencyError),
+ ("x ^y@1 ^y@2", "Cannot depend on incompatible specs"),
# Duplicate compiler
- ("x%intel%intel", spack.spec.DuplicateCompilerSpecError),
- ("x%intel%gcc", spack.spec.DuplicateCompilerSpecError),
- ("x%gcc%intel", spack.spec.DuplicateCompilerSpecError),
- ("x ^y%intel%intel", spack.spec.DuplicateCompilerSpecError),
- ("x ^y%intel%gcc", spack.spec.DuplicateCompilerSpecError),
- ("x ^y%gcc%intel", spack.spec.DuplicateCompilerSpecError),
+ ("x%intel%intel", "compiler"),
+ ("x%intel%gcc", "compiler"),
+ ("x%gcc%intel", "compiler"),
+ ("x ^y%intel%intel", "compiler"),
+ ("x ^y%intel%gcc", "compiler"),
+ ("x ^y%gcc%intel", "compiler"),
# Duplicate Architectures
- (
- "x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64",
- spack.spec.DuplicateArchitectureError,
- ),
- (
- "x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le",
- spack.spec.DuplicateArchitectureError,
- ),
- (
- "x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64",
- spack.spec.DuplicateArchitectureError,
- ),
- (
- "y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64",
- spack.spec.DuplicateArchitectureError,
- ),
- (
- "y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le",
- spack.spec.DuplicateArchitectureError,
- ),
- ("x os=fe os=fe", spack.spec.DuplicateArchitectureError),
- ("x os=fe os=be", spack.spec.DuplicateArchitectureError),
- ("x target=fe target=fe", spack.spec.DuplicateArchitectureError),
- ("x target=fe target=be", spack.spec.DuplicateArchitectureError),
- ("x platform=test platform=test", spack.spec.DuplicateArchitectureError),
- ("x os=fe platform=test target=fe os=fe", spack.spec.DuplicateArchitectureError),
- ("x target=be platform=test os=be os=fe", spack.spec.DuplicateArchitectureError),
- ("^[@foo] zlib", spack.parser.SpecParsingError),
+ ("x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"),
+ ("x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"),
+ ("x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64", "two architectures"),
+ ("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"),
+ ("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"),
+ ("x os=fe os=fe", "'os'"),
+ ("x os=fe os=be", "'os'"),
+ ("x target=fe target=fe", "'target'"),
+ ("x target=fe target=be", "'target'"),
+ ("x platform=test platform=test", "'platform'"),
+ # TODO: these two seem wrong: need to change how arch is initialized (should fail on os)
+ ("x os=fe platform=test target=fe os=fe", "'platform'"),
+ ("x target=be platform=test os=be os=fe", "'platform'"),
+ # Dependencies
+ ("^[@foo] zlib", "edge attributes"),
+ ("x ^[deptypes=link]foo ^[deptypes=run]foo", "conflicting dependency types"),
+ ("x ^[deptypes=build,link]foo ^[deptypes=link]foo", "conflicting dependency types"),
# TODO: Remove this as soon as use variants are added and we can parse custom attributes
- ("^[foo=bar] zlib", spack.parser.SpecParsingError),
+ ("^[foo=bar] zlib", "edge attributes"),
+ # Propagating reserved names generates a parse error
+ ("x namespace==foo.bar.baz", "Propagation"),
+ ("x arch==linux-rhel9-x86_64", "Propagation"),
+ ("x architecture==linux-rhel9-x86_64", "Propagation"),
+ ("x os==rhel9", "Propagation"),
+ ("x operating_system==rhel9", "Propagation"),
+ ("x target==x86_64", "Propagation"),
+ ("x dev_path==/foo/bar/baz", "Propagation"),
+ ("x patches==abcde12345,12345abcde", "Propagation"),
],
)
-def test_error_conditions(text, exc_cls):
- with pytest.raises(exc_cls):
+def test_error_conditions(text, match_string):
+ with pytest.raises(spack.parser.SpecParsingError, match=match_string):
SpecParser(text).next_spec()
diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py
index 5dd854628a..79f128e948 100644
--- a/lib/spack/spack/test/spec_yaml.py
+++ b/lib/spack/spack/test/spec_yaml.py
@@ -13,10 +13,13 @@ import collections
import collections.abc
import gzip
import inspect
+import io
import json
import os
+import pickle
import pytest
+import ruamel.yaml
import spack.hash_types as ht
import spack.paths
@@ -115,8 +118,9 @@ def test_yaml_subdag(config, mock_packages):
assert spec[dep].eq_dag(json_spec[dep])
-def test_using_ordered_dict(mock_packages):
- """Checks that dicts are ordered
+@pytest.mark.parametrize("spec_str", ["mpileaks ^zmpi", "dttop", "dtuse"])
+def test_using_ordered_dict(default_mock_concretization, spec_str):
+ """Checks that we use syaml_dicts for spec serialization.
Necessary to make sure that dag_hash is stable across python
versions and processes.
@@ -134,14 +138,10 @@ def test_using_ordered_dict(mock_packages):
max_level = nlevel
return max_level
- specs = ["mpileaks ^zmpi", "dttop", "dtuse"]
- for spec in specs:
- dag = Spec(spec)
- dag.normalize()
- level = descend_and_check(dag.to_node_dict())
-
- # level just makes sure we are doing something here
- assert level >= 5
+ s = default_mock_concretization(spec_str)
+ level = descend_and_check(s.to_node_dict())
+ # level just makes sure we are doing something here
+ assert level >= 5
def test_ordered_read_not_required_for_consistent_dag_hash(config, mock_packages):
@@ -314,23 +314,23 @@ def test_save_dependency_spec_jsons_subset(tmpdir, config):
output_path = str(tmpdir.mkdir("spec_jsons"))
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock-repo"))
- builder.add_package("g")
- builder.add_package("f")
- builder.add_package("e")
- builder.add_package("d", dependencies=[("f", None, None), ("g", None, None)])
- builder.add_package("c")
- builder.add_package("b", dependencies=[("d", None, None), ("e", None, None)])
- builder.add_package("a", dependencies=[("b", None, None), ("c", None, None)])
+ builder.add_package("pkg-g")
+ builder.add_package("pkg-f")
+ builder.add_package("pkg-e")
+ builder.add_package("pkg-d", dependencies=[("pkg-f", None, None), ("pkg-g", None, None)])
+ builder.add_package("pkg-c")
+ builder.add_package("pkg-b", dependencies=[("pkg-d", None, None), ("pkg-e", None, None)])
+ builder.add_package("pkg-a", dependencies=[("pkg-b", None, None), ("pkg-c", None, None)])
with spack.repo.use_repositories(builder.root):
- spec_a = Spec("a").concretized()
- b_spec = spec_a["b"]
- c_spec = spec_a["c"]
+ spec_a = Spec("pkg-a").concretized()
+ b_spec = spec_a["pkg-b"]
+ c_spec = spec_a["pkg-c"]
- save_dependency_specfiles(spec_a, output_path, [Spec("b"), Spec("c")])
+ save_dependency_specfiles(spec_a, output_path, [Spec("pkg-b"), Spec("pkg-c")])
- assert check_specs_equal(b_spec, os.path.join(output_path, "b.json"))
- assert check_specs_equal(c_spec, os.path.join(output_path, "c.json"))
+ assert check_specs_equal(b_spec, os.path.join(output_path, "pkg-b.json"))
+ assert check_specs_equal(c_spec, os.path.join(output_path, "pkg-c.json"))
def test_legacy_yaml(tmpdir, install_mockery, mock_packages):
@@ -505,3 +505,73 @@ def test_load_json_specfiles(specfile, expected_hash, reader_cls):
# JSON or YAML file, not a list
for edge in s2.traverse_edges():
assert isinstance(edge.virtuals, tuple), edge
+
+
+def test_anchorify_1():
+ """Test that anchorify replaces duplicate values with references to a single instance, and
+ that that results in anchors in the output YAML."""
+ before = {"a": [1, 2, 3], "b": [1, 2, 3]}
+ after = {"a": [1, 2, 3], "b": [1, 2, 3]}
+ syaml.anchorify(after)
+ assert before == after
+ assert after["a"] is after["b"]
+
+ # Check if anchors are used
+ out = io.StringIO()
+ ruamel.yaml.YAML().dump(after, out)
+ assert (
+ out.getvalue()
+ == """\
+a: &id001
+- 1
+- 2
+- 3
+b: *id001
+"""
+ )
+
+
+def test_anchorify_2():
+ before = {"a": {"b": {"c": True}}, "d": {"b": {"c": True}}, "e": {"c": True}}
+ after = {"a": {"b": {"c": True}}, "d": {"b": {"c": True}}, "e": {"c": True}}
+ syaml.anchorify(after)
+ assert before == after
+ assert after["a"] is after["d"]
+ assert after["a"]["b"] is after["e"]
+
+ # Check if anchors are used
+ out = io.StringIO()
+ ruamel.yaml.YAML().dump(after, out)
+ assert (
+ out.getvalue()
+ == """\
+a: &id001
+ b: &id002
+ c: true
+d: *id001
+e: *id002
+"""
+ )
+
+
+@pytest.mark.parametrize(
+ "spec_str",
+ [
+ "hdf5 ++mpi",
+ "hdf5 cflags==-g",
+ "hdf5 foo==bar",
+ "hdf5~~mpi++shared",
+ "hdf5 cflags==-g foo==bar cxxflags==-O3",
+ "hdf5 cflags=-g foo==bar cxxflags==-O3",
+ ],
+)
+def test_pickle_roundtrip_for_abstract_specs(spec_str):
+ """Tests that abstract specs correctly round trip when pickled.
+
+ This test compares both spec objects and their string representation, due to some
+ inconsistencies in how `Spec.__eq__` is implemented.
+ """
+ s = spack.spec.Spec(spec_str)
+ t = pickle.loads(pickle.dumps(s))
+ assert s == t
+ assert str(s) == str(t)
diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py
index f6bd267090..36a9e2eef2 100644
--- a/lib/spack/spack/test/stage.py
+++ b/lib/spack/spack/test/stage.py
@@ -15,14 +15,16 @@ import sys
import pytest
from llnl.util.filesystem import getuid, mkdirp, partition_path, touch, working_dir
+from llnl.util.symlink import readlink
+import spack.config
import spack.error
-import spack.paths
+import spack.fetch_strategy
import spack.stage
import spack.util.executable
import spack.util.url as url_util
from spack.resource import Resource
-from spack.stage import DIYStage, ResourceStage, Stage, StageComposite
+from spack.stage import DevelopStage, ResourceStage, Stage, StageComposite
from spack.util.path import canonicalize_path
# The following values are used for common fetch and stage mocking fixtures:
@@ -145,9 +147,8 @@ def check_destroy(stage, stage_name):
assert not os.path.exists(stage_path)
# tmp stage needs to remove tmp dir too.
- if not stage.managed_by_spack:
- target = os.path.realpath(stage_path)
- assert not os.path.exists(target)
+ target = os.path.realpath(stage_path)
+ assert not os.path.exists(target)
def check_setup(stage, stage_name, archive):
@@ -323,17 +324,11 @@ def failing_search_fn():
return _mock
-@pytest.fixture
-def failing_fetch_strategy():
- """Returns a fetch strategy that fails."""
-
- class FailingFetchStrategy(spack.fetch_strategy.FetchStrategy):
- def fetch(self):
- raise spack.fetch_strategy.FailedDownloadError(
- "<non-existent URL>", "This implementation of FetchStrategy always fails"
- )
-
- return FailingFetchStrategy()
+class FailingFetchStrategy(spack.fetch_strategy.FetchStrategy):
+ def fetch(self):
+ raise spack.fetch_strategy.FailedDownloadError(
+ "<non-existent URL>", "This implementation of FetchStrategy always fails"
+ )
@pytest.fixture
@@ -444,12 +439,9 @@ class TestStage:
@pytest.mark.disable_clean_stage_check
def test_composite_stage_with_expand_resource(self, composite_stage_with_expanding_resource):
- (
- composite_stage,
- root_stage,
- resource_stage,
- mock_resource,
- ) = composite_stage_with_expanding_resource
+ (composite_stage, root_stage, resource_stage, mock_resource) = (
+ composite_stage_with_expanding_resource
+ )
composite_stage.create()
composite_stage.fetch()
@@ -474,12 +466,9 @@ class TestStage:
directory.
"""
- (
- composite_stage,
- root_stage,
- resource_stage,
- mock_resource,
- ) = composite_stage_with_expanding_resource
+ (composite_stage, root_stage, resource_stage, mock_resource) = (
+ composite_stage_with_expanding_resource
+ )
resource_stage.resource.placement = None
@@ -517,8 +506,8 @@ class TestStage:
stage.fetch()
check_destroy(stage, self.stage_name)
- def test_no_search_mirror_only(self, failing_fetch_strategy, failing_search_fn):
- stage = Stage(failing_fetch_strategy, name=self.stage_name, search_fn=failing_search_fn)
+ def test_no_search_mirror_only(self, failing_search_fn):
+ stage = Stage(FailingFetchStrategy(), name=self.stage_name, search_fn=failing_search_fn)
with stage:
try:
stage.fetch(mirror_only=True)
@@ -533,8 +522,8 @@ class TestStage:
(None, "All fetchers failed"),
],
)
- def test_search_if_default_fails(self, failing_fetch_strategy, search_fn, err_msg, expected):
- stage = Stage(failing_fetch_strategy, name=self.stage_name, search_fn=search_fn)
+ def test_search_if_default_fails(self, search_fn, err_msg, expected):
+ stage = Stage(FailingFetchStrategy(), name=self.stage_name, search_fn=search_fn)
with stage:
with pytest.raises(spack.error.FetchError, match=expected):
@@ -806,61 +795,74 @@ class TestStage:
with Stage("file:///does-not-exist", path=testpath) as stage:
assert stage.path == testpath
- def test_diystage_path_none(self):
- """Ensure DIYStage for path=None behaves as expected."""
- with pytest.raises(ValueError):
- DIYStage(None)
-
- def test_diystage_path_invalid(self):
- """Ensure DIYStage for an invalid path behaves as expected."""
- with pytest.raises(spack.stage.StagePathError):
- DIYStage("/path/does/not/exist")
-
- def test_diystage_path_valid(self, tmpdir):
- """Ensure DIYStage for a valid path behaves as expected."""
- path = str(tmpdir)
- stage = DIYStage(path)
- assert stage.path == path
- assert stage.source_path == path
-
- # Order doesn't really matter for DIYStage since they are
- # basically NOOPs; however, call each since they are part
- # of the normal stage usage and to ensure full test coverage.
- stage.create() # Only sets the flag value
- assert stage.created
-
- stage.cache_local() # Only outputs a message
- stage.fetch() # Only outputs a message
- stage.check() # Only outputs a message
- stage.expand_archive() # Only outputs a message
-
- assert stage.expanded # The path/source_path does exist
-
- with pytest.raises(spack.stage.RestageError):
- stage.restage()
-
- stage.destroy() # A no-op
- assert stage.path == path # Ensure can still access attributes
- assert os.path.exists(stage.source_path) # Ensure path still exists
- def test_diystage_preserve_file(self, tmpdir):
- """Ensure DIYStage preserves an existing file."""
- # Write a file to the temporary directory
- fn = tmpdir.join(_readme_fn)
- fn.write(_readme_contents)
-
- # Instantiate the DIYStage and ensure the above file is unchanged.
- path = str(tmpdir)
- stage = DIYStage(path)
- assert os.path.isdir(path)
- assert os.path.isfile(str(fn))
+def _create_files_from_tree(base, tree):
+ for name, content in tree.items():
+ sub_base = os.path.join(base, name)
+ if isinstance(content, dict):
+ os.mkdir(sub_base)
+ _create_files_from_tree(sub_base, content)
+ else:
+ assert (content is None) or (isinstance(content, str))
+ with open(sub_base, "w") as f:
+ if content:
+ f.write(content)
+
+
+def _create_tree_from_dir_recursive(path):
+ if os.path.islink(path):
+ return readlink(path)
+ elif os.path.isdir(path):
+ tree = {}
+ for name in os.listdir(path):
+ sub_path = os.path.join(path, name)
+ tree[name] = _create_tree_from_dir_recursive(sub_path)
+ return tree
+ else:
+ with open(path, "r") as f:
+ content = f.read() or None
+ return content
- stage.create() # Only sets the flag value
- readmefn = str(fn)
- assert os.path.isfile(readmefn)
- with open(readmefn) as _file:
- _file.read() == _readme_contents
+@pytest.fixture
+def develop_path(tmpdir):
+ dir_structure = {"a1": {"b1": None, "b2": "b1content"}, "a2": None}
+ srcdir = str(tmpdir.join("test-src"))
+ os.mkdir(srcdir)
+ _create_files_from_tree(srcdir, dir_structure)
+ yield dir_structure, srcdir
+
+
+class TestDevelopStage:
+ def test_sanity_check_develop_path(self, develop_path):
+ _, srcdir = develop_path
+ with open(os.path.join(srcdir, "a1", "b2")) as f:
+ assert f.read() == "b1content"
+
+ assert os.path.exists(os.path.join(srcdir, "a2"))
+
+ def test_develop_stage(self, develop_path, tmp_build_stage_dir):
+ """Check that (a) develop stages update the given
+ `dev_path` with a symlink that points to the stage dir and
+ (b) that destroying the stage does not destroy `dev_path`
+ """
+ devtree, srcdir = develop_path
+ stage = DevelopStage("test-stage", srcdir, reference_link="link-to-stage")
+ assert not os.path.exists(stage.reference_link)
+ stage.create()
+ assert os.path.exists(stage.reference_link)
+ srctree1 = _create_tree_from_dir_recursive(stage.source_path)
+ assert os.path.samefile(srctree1["link-to-stage"], stage.path)
+ del srctree1["link-to-stage"]
+ assert srctree1 == devtree
+
+ stage.destroy()
+ assert not os.path.exists(stage.reference_link)
+ # Make sure destroying the stage doesn't change anything
+ # about the path
+ assert not os.path.exists(stage.path)
+ srctree2 = _create_tree_from_dir_recursive(srcdir)
+ assert srctree2 == devtree
def test_stage_create_replace_path(tmp_build_stage_dir):
diff --git a/lib/spack/spack/test/svn_fetch.py b/lib/spack/spack/test/svn_fetch.py
index 0b37500014..de47864fc2 100644
--- a/lib/spack/spack/test/svn_fetch.py
+++ b/lib/spack/spack/test/svn_fetch.py
@@ -10,7 +10,6 @@ import pytest
from llnl.util.filesystem import mkdirp, touch, working_dir
import spack.config
-import spack.repo
from spack.fetch_strategy import SvnFetchStrategy
from spack.spec import Spec
from spack.stage import Stage
diff --git a/lib/spack/spack/test/tag.py b/lib/spack/spack/test/tag.py
index 1f5affc549..e429b9f457 100644
--- a/lib/spack/spack/test/tag.py
+++ b/lib/spack/spack/test/tag.py
@@ -7,7 +7,7 @@ import io
import pytest
-import spack.cmd.install
+import spack.repo
import spack.tag
from spack.main import SpackCommand
@@ -153,7 +153,7 @@ def test_tag_no_tags(mock_packages):
def test_tag_update_package(mock_packages):
- mock_index = spack.repo.PATH.tag_index
+ mock_index = mock_packages.tag_index
index = spack.tag.TagIndex(repository=mock_packages)
for name in spack.repo.all_package_names():
index.update_package(name)
diff --git a/lib/spack/spack/test/test_suite.py b/lib/spack/spack/test/test_suite.py
index 6af98b6f2f..3ed4e30d42 100644
--- a/lib/spack/spack/test/test_suite.py
+++ b/lib/spack/spack/test/test_suite.py
@@ -4,13 +4,16 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import os
+import sys
import pytest
from llnl.util.filesystem import join_path, mkdirp, touch
+import spack.config
import spack.install_test
import spack.spec
+import spack.util.executable
from spack.install_test import TestStatus
from spack.util.executable import which
@@ -291,7 +294,7 @@ def test_process_test_parts(mock_packages):
assert "test suite is missing" in str(exc_info)
-def test_test_part_fail(tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage):
+def test_test_part_fail(tmpdir, install_mockery, mock_fetch, mock_test_stage):
"""Confirm test_part with a ProcessError results in FAILED status."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -307,7 +310,7 @@ def test_test_part_fail(tmpdir, install_mockery_mutable_config, mock_fetch, mock
assert status == TestStatus.FAILED
-def test_test_part_pass(install_mockery_mutable_config, mock_fetch, mock_test_stage):
+def test_test_part_pass(install_mockery, mock_fetch, mock_test_stage):
"""Confirm test_part that succeeds results in PASSED status."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -315,15 +318,18 @@ def test_test_part_pass(install_mockery_mutable_config, mock_fetch, mock_test_st
name = "test_echo"
msg = "nothing"
with spack.install_test.test_part(pkg, name, "echo"):
- echo = which("echo")
- echo(msg)
+ if sys.platform == "win32":
+ print(msg)
+ else:
+ echo = which("echo")
+ echo(msg)
for part_name, status in pkg.tester.test_parts.items():
assert part_name.endswith(name)
assert status == TestStatus.PASSED
-def test_test_part_skip(install_mockery_mutable_config, mock_fetch, mock_test_stage):
+def test_test_part_skip(install_mockery, mock_fetch, mock_test_stage):
"""Confirm test_part that raises SkipTest results in test status SKIPPED."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -337,9 +343,7 @@ def test_test_part_skip(install_mockery_mutable_config, mock_fetch, mock_test_st
assert status == TestStatus.SKIPPED
-def test_test_part_missing_exe_fail_fast(
- tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage
-):
+def test_test_part_missing_exe_fail_fast(tmpdir, install_mockery, mock_fetch, mock_test_stage):
"""Confirm test_part with fail fast enabled raises exception."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -360,9 +364,7 @@ def test_test_part_missing_exe_fail_fast(
assert status == TestStatus.FAILED
-def test_test_part_missing_exe(
- tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage
-):
+def test_test_part_missing_exe(tmpdir, install_mockery, mock_fetch, mock_test_stage):
"""Confirm test_part with missing executable fails."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -396,7 +398,7 @@ def test_test_part_missing_exe(
],
)
def test_embedded_test_part_status(
- install_mockery_mutable_config, mock_fetch, mock_test_stage, current, substatuses, expected
+ install_mockery, mock_fetch, mock_test_stage, current, substatuses, expected
):
"""Check to ensure the status of the enclosing test part reflects summary of embedded parts."""
@@ -424,7 +426,7 @@ def test_embedded_test_part_status(
],
)
def test_write_tested_status(
- tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage, statuses, expected
+ tmpdir, install_mockery, mock_fetch, mock_test_stage, statuses, expected
):
"""Check to ensure the status of the enclosing test part reflects summary of embedded parts."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
@@ -441,9 +443,7 @@ def test_write_tested_status(
@pytest.mark.regression("37840")
-def test_write_tested_status_no_repeats(
- tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage
-):
+def test_write_tested_status_no_repeats(tmpdir, install_mockery, mock_fetch, mock_test_stage):
"""Emulate re-running the same stand-alone tests a second time."""
s = spack.spec.Spec("trivial-smoke-test").concretized()
pkg = s.package
@@ -501,25 +501,27 @@ def test_find_required_file(tmpdir):
# First just find a single path
results = spack.install_test.find_required_file(
- tmpdir.join("c"), filename, expected=1, recursive=True
+ str(tmpdir.join("c")), filename, expected=1, recursive=True
)
assert isinstance(results, str)
# Ensure none file if do not recursively search that directory
with pytest.raises(spack.install_test.SkipTest, match="Expected 1"):
spack.install_test.find_required_file(
- tmpdir.join("c"), filename, expected=1, recursive=False
+ str(tmpdir.join("c")), filename, expected=1, recursive=False
)
# Now make sure we get all of the files
- results = spack.install_test.find_required_file(tmpdir, filename, expected=3, recursive=True)
+ results = spack.install_test.find_required_file(
+ str(tmpdir), filename, expected=3, recursive=True
+ )
assert isinstance(results, list) and len(results) == 3
def test_packagetest_fails(mock_packages):
MyPackage = collections.namedtuple("MyPackage", ["spec"])
- s = spack.spec.Spec("a")
+ s = spack.spec.Spec("pkg-a")
pkg = MyPackage(s)
with pytest.raises(ValueError, match="require a concrete package"):
spack.install_test.PackageTest(pkg)
diff --git a/lib/spack/spack/test/traverse.py b/lib/spack/spack/test/traverse.py
index 8e440f93fb..79aae6eb55 100644
--- a/lib/spack/spack/test/traverse.py
+++ b/lib/spack/spack/test/traverse.py
@@ -20,9 +20,8 @@ def create_dag(nodes, edges):
"""
specs = {name: Spec(name) for name in nodes}
for parent, child, deptypes in edges:
- specs[parent].add_dependency_edge(
- specs[child], depflag=dt.canonicalize(deptypes), virtuals=()
- )
+ depflag = deptypes if isinstance(deptypes, dt.DepFlag) else dt.canonicalize(deptypes)
+ specs[parent].add_dependency_edge(specs[child], depflag=depflag, virtuals=())
return specs
@@ -272,6 +271,29 @@ def test_breadth_first_versus_depth_first_tree(abstract_specs_chain):
]
+@pytest.mark.parametrize("cover", ["nodes", "edges"])
+@pytest.mark.parametrize("depth_first", [True, False])
+def test_tree_traversal_with_key(cover, depth_first, abstract_specs_chain):
+ """Compare two multisource traversals of the same DAG. In one case the DAG consists of unique
+ Spec instances, in the second case there are identical copies of nodes and edges. Traversal
+ should be equivalent when nodes are identified by dag_hash."""
+ a = abstract_specs_chain["chain-a"]
+ c = abstract_specs_chain["chain-c"]
+ kwargs = {"cover": cover, "depth_first": depth_first}
+ dag_hash = lambda s: s.dag_hash()
+
+ # Traverse DAG spanned by a unique set of Spec instances
+ first = traverse.traverse_tree([a, c], key=id, **kwargs)
+
+ # Traverse equivalent DAG with copies of Spec instances included, keyed by dag hash.
+ second = traverse.traverse_tree([a, c.copy()], key=dag_hash, **kwargs)
+
+ # Check that the same nodes are discovered at the same depth
+ node_at_depth_first = [(depth, dag_hash(edge.spec)) for (depth, edge) in first]
+ node_at_depth_second = [(depth, dag_hash(edge.spec)) for (depth, edge) in second]
+ assert node_at_depth_first == node_at_depth_second
+
+
def test_breadth_first_versus_depth_first_printing(abstract_specs_chain):
"""Test breadth-first versus depth-first tree printing."""
s = abstract_specs_chain["chain-a"]
@@ -395,3 +417,97 @@ def test_traverse_edges_topo(abstract_specs_toposort):
out_edge_indices = [i for (i, (parent, child)) in enumerate(edges) if node == parent]
if in_edge_indices and out_edge_indices:
assert max(in_edge_indices) < min(out_edge_indices)
+
+
+def test_traverse_nodes_no_deps(abstract_specs_dtuse):
+ """Traversing nodes without deps should be the same as deduplicating the input specs. This may
+ not look useful, but can be used to avoid a branch on the call site in which it's otherwise
+ easy to forget to deduplicate input specs."""
+ inputs = [
+ abstract_specs_dtuse["dtuse"],
+ abstract_specs_dtuse["dtlink5"],
+ abstract_specs_dtuse["dtuse"], # <- duplicate
+ ]
+ outputs = [x for x in traverse.traverse_nodes(inputs, deptype=dt.NONE)]
+ assert outputs == [abstract_specs_dtuse["dtuse"], abstract_specs_dtuse["dtlink5"]]
+
+
+@pytest.mark.parametrize("cover", ["nodes", "edges"])
+def test_topo_is_bfs_for_trees(cover):
+ """For trees, both DFS and BFS produce a topological order, but BFS is the most sensible for
+ our applications, where we typically want to avoid that transitive dependencies shadow direct
+ depenencies in global search paths, etc. This test ensures that for trees, the default topo
+ order coincides with BFS."""
+ binary_tree = create_dag(
+ nodes=["A", "B", "C", "D", "E", "F", "G"],
+ edges=(
+ ("A", "B", "all"),
+ ("A", "C", "all"),
+ ("B", "D", "all"),
+ ("B", "E", "all"),
+ ("C", "F", "all"),
+ ("C", "G", "all"),
+ ),
+ )
+
+ assert list(traverse.traverse_nodes([binary_tree["A"]], order="topo", cover=cover)) == list(
+ traverse.traverse_nodes([binary_tree["A"]], order="breadth", cover=cover)
+ )
+
+
+@pytest.mark.parametrize("roots", [["A"], ["A", "B"], ["B", "A"], ["A", "B", "A"]])
+@pytest.mark.parametrize("order", ["breadth", "post", "pre"])
+@pytest.mark.parametrize("include_root", [True, False])
+def test_mixed_depth_visitor(roots, order, include_root):
+ """Test that the MixedDepthVisitor lists unique edges that are reachable either directly from
+ roots through build type edges, or transitively through link type edges. The tests ensures that
+ unique edges are listed exactly once."""
+ my_graph = create_dag(
+ nodes=["A", "B", "C", "D", "E", "F", "G", "H", "I"],
+ edges=(
+ ("A", "B", dt.LINK | dt.RUN),
+ ("A", "C", dt.BUILD),
+ ("A", "D", dt.BUILD | dt.RUN),
+ ("A", "H", dt.LINK),
+ ("A", "I", dt.RUN),
+ ("B", "D", dt.BUILD | dt.LINK),
+ ("C", "E", dt.BUILD | dt.LINK | dt.RUN),
+ ("D", "F", dt.LINK),
+ ("D", "G", dt.BUILD | dt.RUN),
+ ("H", "B", dt.LINK),
+ ),
+ )
+ starting_points = traverse.with_artificial_edges([my_graph[root] for root in roots])
+ visitor = traverse.MixedDepthVisitor(direct=dt.BUILD, transitive=dt.LINK)
+
+ if order == "pre":
+ edges = traverse.traverse_depth_first_edges_generator(
+ starting_points, visitor, post_order=False, root=include_root
+ )
+ elif order == "post":
+ edges = traverse.traverse_depth_first_edges_generator(
+ starting_points, visitor, post_order=True, root=include_root
+ )
+ elif order == "breadth":
+ edges = traverse.traverse_breadth_first_edges_generator(
+ starting_points, visitor, root=include_root
+ )
+
+ artificial_edges = [(None, root) for root in roots] if include_root else []
+ simple_edges = [
+ (None if edge.parent is None else edge.parent.name, edge.spec.name) for edge in edges
+ ]
+
+ # make sure that every edge is listed exactly once and that the right edges are listed
+ assert len(simple_edges) == len(set(simple_edges))
+ assert set(simple_edges) == {
+ # the roots
+ *artificial_edges,
+ ("A", "B"),
+ ("A", "C"),
+ ("A", "D"),
+ ("A", "H"),
+ ("B", "D"),
+ ("D", "F"),
+ ("H", "B"),
+ }
diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py
index 406344ebfb..f103244a10 100644
--- a/lib/spack/spack/test/url_fetch.py
+++ b/lib/spack/spack/test/url_fetch.py
@@ -4,8 +4,10 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
+import filecmp
import os
import sys
+import urllib.error
import pytest
@@ -15,15 +17,24 @@ from llnl.util.filesystem import is_exe, working_dir
import spack.config
import spack.error
import spack.fetch_strategy as fs
-import spack.repo
+import spack.url
import spack.util.crypto as crypto
import spack.util.executable
import spack.util.web as web_util
+import spack.version
from spack.spec import Spec
from spack.stage import Stage
from spack.util.executable import which
+@pytest.fixture
+def missing_curl(monkeypatch):
+ def require_curl():
+ raise spack.error.FetchError("curl is required but not found")
+
+ monkeypatch.setattr(web_util, "require_curl", require_curl)
+
+
@pytest.fixture(params=list(crypto.hashes.keys()))
def checksum_type(request):
return request.param
@@ -66,66 +77,56 @@ def pkg_factory():
return factory
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_urlfetchstrategy_sans_url(_fetch_method):
- """Ensure constructor with no URL fails."""
- with spack.config.override("config:url_fetch_method", _fetch_method):
- with pytest.raises(ValueError):
- with fs.URLFetchStrategy(None):
- pass
+@pytest.mark.parametrize("method", ["curl", "urllib"])
+def test_urlfetchstrategy_bad_url(tmp_path, mutable_config, method):
+ """Ensure fetch with bad URL fails as expected."""
+ mutable_config.set("config:url_fetch_method", method)
+ fetcher = fs.URLFetchStrategy(url=(tmp_path / "does-not-exist").as_uri())
+ with Stage(fetcher, path=str(tmp_path / "stage")):
+ with pytest.raises(fs.FailedDownloadError) as exc:
+ fetcher.fetch()
-@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_urlfetchstrategy_bad_url(tmpdir, _fetch_method):
- """Ensure fetch with bad URL fails as expected."""
- testpath = str(tmpdir)
- with spack.config.override("config:url_fetch_method", _fetch_method):
- with pytest.raises(fs.FailedDownloadError):
- fetcher = fs.URLFetchStrategy(url="file:///does-not-exist")
- assert fetcher is not None
+ assert len(exc.value.exceptions) == 1
+ exception = exc.value.exceptions[0]
- with Stage(fetcher, path=testpath) as stage:
- assert stage is not None
- assert fetcher.archive_file is None
- fetcher.fetch()
+ if method == "curl":
+ assert isinstance(exception, spack.error.FetchError)
+ assert "Curl failed with error 37" in str(exception) # FILE_COULDNT_READ_FILE
+ elif method == "urllib":
+ assert isinstance(exception, urllib.error.URLError)
+ assert isinstance(exception.reason, FileNotFoundError)
-def test_fetch_options(tmpdir, mock_archive):
- testpath = str(tmpdir)
+def test_fetch_options(tmp_path, mock_archive):
with spack.config.override("config:url_fetch_method", "curl"):
fetcher = fs.URLFetchStrategy(
url=mock_archive.url, fetch_options={"cookie": "True", "timeout": 10}
)
- assert fetcher is not None
- with Stage(fetcher, path=testpath) as stage:
- assert stage is not None
+ with Stage(fetcher, path=str(tmp_path)):
assert fetcher.archive_file is None
fetcher.fetch()
+ assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file)
@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_archive_file_errors(tmpdir, mock_archive, _fetch_method):
+def test_archive_file_errors(tmp_path, mutable_config, mock_archive, _fetch_method):
"""Ensure FetchStrategy commands may only be used as intended"""
- testpath = str(tmpdir)
with spack.config.override("config:url_fetch_method", _fetch_method):
fetcher = fs.URLFetchStrategy(url=mock_archive.url)
- assert fetcher is not None
- with pytest.raises(fs.FailedDownloadError):
- with Stage(fetcher, path=testpath) as stage:
- assert stage is not None
- assert fetcher.archive_file is None
- with pytest.raises(fs.NoArchiveFileError):
- fetcher.archive(testpath)
- with pytest.raises(fs.NoArchiveFileError):
- fetcher.expand()
- with pytest.raises(fs.NoArchiveFileError):
- fetcher.reset()
- stage.fetch()
- with pytest.raises(fs.NoDigestError):
- fetcher.check()
- assert fetcher.archive_file is not None
- fetcher._fetch_from_url("file:///does-not-exist")
+ with Stage(fetcher, path=str(tmp_path)) as stage:
+ assert fetcher.archive_file is None
+ with pytest.raises(fs.NoArchiveFileError):
+ fetcher.archive(str(tmp_path))
+ with pytest.raises(fs.NoArchiveFileError):
+ fetcher.expand()
+ with pytest.raises(fs.NoArchiveFileError):
+ fetcher.reset()
+ stage.fetch()
+ with pytest.raises(fs.NoDigestError):
+ fetcher.check()
+ assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file)
files = [(".tar.gz", "z"), (".tgz", "z")]
@@ -173,8 +174,6 @@ def test_fetch(
assert "echo Building..." in contents
-# TODO-27021
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
@pytest.mark.parametrize(
"spec,url,digest",
[
@@ -205,30 +204,22 @@ def test_from_list_url(mock_packages, config, spec, url, digest, _fetch_method):
assert fetch_strategy.extra_options == {"timeout": 60}
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
@pytest.mark.parametrize(
"requested_version,tarball,digest",
[
- # This version is in the web data path (test/data/web/4.html), but not in the
+ # These versions are in the web data path (test/data/web/4.html), but not in the
# url-list-test package. We expect Spack to generate a URL with the new version.
("=4.5.0", "foo-4.5.0.tar.gz", None),
- # This version is in web data path and not in the package file, BUT the 2.0.0b2
- # version in the package file satisfies 2.0.0, so Spack will use the known version.
- # TODO: this is *probably* not what the user wants, but it's here as an example
- # TODO: for that reason. We can't express "exactly 2.0.0" right now, and we don't
- # TODO: have special cases that would make 2.0.0b2 less than 2.0.0. We should
- # TODO: probably revisit this in our versioning scheme.
- ("2.0.0", "foo-2.0.0b2.tar.gz", "000000000000000000000000000200b2"),
+ ("=2.0.0", "foo-2.0.0.tar.gz", None),
],
)
-@pytest.mark.only_clingo("Original concretizer doesn't resolve concrete versions to known ones")
def test_new_version_from_list_url(
mock_packages, config, _fetch_method, requested_version, tarball, digest
):
"""Test non-specific URLs from the url-list-test package."""
with spack.config.override("config:url_fetch_method", _fetch_method):
- s = Spec("url-list-test @%s" % requested_version).concretized()
+ s = Spec(f"url-list-test @{requested_version}").concretized()
fetch_strategy = fs.from_list_url(s.package)
assert isinstance(fetch_strategy, fs.URLFetchStrategy)
@@ -271,7 +262,7 @@ def test_url_with_status_bar(tmpdir, mock_archive, monkeypatch, capfd):
monkeypatch.setattr(sys.stdout, "isatty", is_true)
monkeypatch.setattr(tty, "msg_enabled", is_true)
with spack.config.override("config:url_fetch_method", "curl"):
- fetcher = fs.URLFetchStrategy(mock_archive.url)
+ fetcher = fs.URLFetchStrategy(url=mock_archive.url)
with Stage(fetcher, path=testpath) as stage:
assert fetcher.archive_file is None
stage.fetch()
@@ -281,16 +272,15 @@ def test_url_with_status_bar(tmpdir, mock_archive, monkeypatch, capfd):
@pytest.mark.parametrize("_fetch_method", ["curl", "urllib"])
-def test_url_extra_fetch(tmpdir, mock_archive, _fetch_method):
+def test_url_extra_fetch(tmp_path, mutable_config, mock_archive, _fetch_method):
"""Ensure a fetch after downloading is effectively a no-op."""
- with spack.config.override("config:url_fetch_method", _fetch_method):
- testpath = str(tmpdir)
- fetcher = fs.URLFetchStrategy(mock_archive.url)
- with Stage(fetcher, path=testpath) as stage:
- assert fetcher.archive_file is None
- stage.fetch()
- assert fetcher.archive_file is not None
- fetcher.fetch()
+ mutable_config.set("config:url_fetch_method", _fetch_method)
+ fetcher = fs.URLFetchStrategy(url=mock_archive.url)
+ with Stage(fetcher, path=str(tmp_path)) as stage:
+ assert fetcher.archive_file is None
+ stage.fetch()
+ assert filecmp.cmp(fetcher.archive_file, mock_archive.archive_file)
+ fetcher.fetch()
@pytest.mark.parametrize(
@@ -326,49 +316,25 @@ def test_candidate_urls(pkg_factory, url, urls, version, expected, _fetch_method
@pytest.mark.regression("19673")
-def test_missing_curl(tmpdir, monkeypatch):
+def test_missing_curl(tmp_path, missing_curl, mutable_config, monkeypatch):
"""Ensure a fetch involving missing curl package reports the error."""
- err_fmt = "No such command {0}"
-
- def _which(*args, **kwargs):
- err_msg = err_fmt.format(args[0])
- raise spack.util.executable.CommandNotFoundError(err_msg)
-
- # Patching the 'which' symbol imported by fetch_strategy needed due
- # to 'from spack.util.executable import which' in this module.
- monkeypatch.setattr(fs, "which", _which)
-
- testpath = str(tmpdir)
- url = "http://github.com/spack/spack"
- with spack.config.override("config:url_fetch_method", "curl"):
- fetcher = fs.URLFetchStrategy(url=url)
- assert fetcher is not None
- with pytest.raises(TypeError, match="object is not callable"):
- with Stage(fetcher, path=testpath) as stage:
- out = stage.fetch()
- assert err_fmt.format("curl") in out
+ mutable_config.set("config:url_fetch_method", "curl")
+ fetcher = fs.URLFetchStrategy(url="http://example.com/file.tar.gz")
+ with pytest.raises(spack.error.FetchError, match="curl is required but not found"):
+ with Stage(fetcher, path=str(tmp_path)) as stage:
+ stage.fetch()
-def test_url_fetch_text_without_url(tmpdir):
+def test_url_fetch_text_without_url():
with pytest.raises(spack.error.FetchError, match="URL is required"):
web_util.fetch_url_text(None)
-def test_url_fetch_text_curl_failures(tmpdir, monkeypatch):
+def test_url_fetch_text_curl_failures(mutable_config, missing_curl, monkeypatch):
"""Check fetch_url_text if URL's curl is missing."""
- err_fmt = "No such command {0}"
-
- def _which(*args, **kwargs):
- err_msg = err_fmt.format(args[0])
- raise spack.util.executable.CommandNotFoundError(err_msg)
-
- # Patching the 'which' symbol imported by spack.util.web needed due
- # to 'from spack.util.executable import which' in this module.
- monkeypatch.setattr(spack.util.web, "which", _which)
-
- with spack.config.override("config:url_fetch_method", "curl"):
- with pytest.raises(spack.error.FetchError, match="Missing required curl"):
- web_util.fetch_url_text("https://github.com/")
+ mutable_config.set("config:url_fetch_method", "curl")
+ with pytest.raises(spack.error.FetchError, match="curl is required but not found"):
+ web_util.fetch_url_text("https://example.com/")
def test_url_check_curl_errors():
@@ -382,24 +348,14 @@ def test_url_check_curl_errors():
web_util.check_curl_code(60)
-def test_url_missing_curl(tmpdir, monkeypatch):
+def test_url_missing_curl(mutable_config, missing_curl, monkeypatch):
"""Check url_exists failures if URL's curl is missing."""
- err_fmt = "No such command {0}"
-
- def _which(*args, **kwargs):
- err_msg = err_fmt.format(args[0])
- raise spack.util.executable.CommandNotFoundError(err_msg)
-
- # Patching the 'which' symbol imported by spack.util.web needed due
- # to 'from spack.util.executable import which' in this module.
- monkeypatch.setattr(spack.util.web, "which", _which)
-
- with spack.config.override("config:url_fetch_method", "curl"):
- with pytest.raises(spack.error.FetchError, match="Missing required curl"):
- web_util.url_exists("https://github.com/")
+ mutable_config.set("config:url_fetch_method", "curl")
+ with pytest.raises(spack.error.FetchError, match="curl is required but not found"):
+ web_util.url_exists("https://example.com/")
-def test_url_fetch_text_urllib_bad_returncode(tmpdir, monkeypatch):
+def test_url_fetch_text_urllib_bad_returncode(mutable_config, monkeypatch):
class response:
def getcode(self):
return 404
@@ -407,19 +363,19 @@ def test_url_fetch_text_urllib_bad_returncode(tmpdir, monkeypatch):
def _read_from_url(*args, **kwargs):
return None, None, response()
- monkeypatch.setattr(spack.util.web, "read_from_url", _read_from_url)
+ monkeypatch.setattr(web_util, "read_from_url", _read_from_url)
+ mutable_config.set("config:url_fetch_method", "urllib")
- with spack.config.override("config:url_fetch_method", "urllib"):
- with pytest.raises(spack.error.FetchError, match="failed with error code"):
- web_util.fetch_url_text("https://github.com/")
+ with pytest.raises(spack.error.FetchError, match="failed with error code"):
+ web_util.fetch_url_text("https://example.com/")
-def test_url_fetch_text_urllib_web_error(tmpdir, monkeypatch):
+def test_url_fetch_text_urllib_web_error(mutable_config, monkeypatch):
def _raise_web_error(*args, **kwargs):
raise web_util.SpackWebError("bad url")
- monkeypatch.setattr(spack.util.web, "read_from_url", _raise_web_error)
+ monkeypatch.setattr(web_util, "read_from_url", _raise_web_error)
+ mutable_config.set("config:url_fetch_method", "urllib")
- with spack.config.override("config:url_fetch_method", "urllib"):
- with pytest.raises(spack.error.FetchError, match="fetch failed to verify"):
- web_util.fetch_url_text("https://github.com/")
+ with pytest.raises(spack.error.FetchError, match="fetch failed to verify"):
+ web_util.fetch_url_text("https://example.com/")
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 2a3e3e7e72..00591b2f37 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -87,6 +87,13 @@ def test_url_strip_name_suffixes(url, version, expected):
59,
"https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow",
),
+ (
+ "hpcviewer",
+ 30,
+ "2024.02",
+ 51,
+ "https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz",
+ ),
# Version in stem
("zlib", 24, "1.2.10", 29, "http://zlib.net/fossils/zlib-1.2.10.tar.gz"),
(
diff --git a/lib/spack/spack/test/util/archive.py b/lib/spack/spack/test/util/archive.py
new file mode 100644
index 0000000000..191de25143
--- /dev/null
+++ b/lib/spack/spack/test/util/archive.py
@@ -0,0 +1,157 @@
+# Copyright 2013-2024 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 gzip
+import hashlib
+import os
+import shutil
+import tarfile
+from pathlib import Path, PurePath
+
+import spack.util.crypto
+from spack.util.archive import gzip_compressed_tarfile, reproducible_tarfile_from_prefix
+
+
+def test_gzip_compressed_tarball_is_reproducible(tmpdir):
+ """Test gzip_compressed_tarfile and reproducible_tarfile_from_prefix for reproducibility"""
+
+ with tmpdir.as_cwd():
+ # Create a few directories
+ root = Path("root")
+ dir_a = root / "a"
+ dir_b = root / "b"
+ root.mkdir(mode=0o777)
+ dir_a.mkdir(mode=0o777)
+ dir_b.mkdir(mode=0o777)
+
+ (root / "y").touch()
+ (root / "x").touch()
+
+ (dir_a / "executable").touch(mode=0o777)
+ (dir_a / "data").touch(mode=0o666)
+ (dir_a / "symlink_file").symlink_to("data")
+ (dir_a / "symlink_dir").symlink_to(PurePath("..", "b"))
+ try:
+ os.link(dir_a / "executable", dir_a / "hardlink")
+ hardlink_support = True
+ except OSError:
+ hardlink_support = False
+
+ (dir_b / "executable").touch(mode=0o777)
+ (dir_b / "data").touch(mode=0o666)
+ (dir_b / "symlink_file").symlink_to("data")
+ (dir_b / "symlink_dir").symlink_to(PurePath("..", "a"))
+
+ # Create the first tarball
+ with gzip_compressed_tarfile("fst.tar.gz") as (tar, gzip_checksum_1, tarfile_checksum_1):
+ reproducible_tarfile_from_prefix(tar, "root")
+
+ # Expected mode for non-dirs is 644 if not executable, 755 if executable. Better to compute
+ # that as we don't know the umask of the user running the test.
+ expected_mode = lambda name: (
+ 0o755 if Path(*name.split("/")).lstat().st_mode & 0o100 else 0o644
+ )
+
+ # Verify the tarball contents
+ with tarfile.open("fst.tar.gz", "r:gz") as tar:
+ # Directories (mode is always 755)
+ for dir in ("root", "root/a", "root/b"):
+ m = tar.getmember(dir)
+ assert m.isdir()
+ assert m.mode == 0o755
+ assert m.uid == m.gid == 0
+ assert m.uname == m.gname == ""
+
+ # Non-executable regular files
+ for file in (
+ "root/x",
+ "root/y",
+ "root/a/data",
+ "root/b/data",
+ "root/a/executable",
+ "root/b/executable",
+ ):
+ m = tar.getmember(file)
+ assert m.isreg()
+ assert m.mode == expected_mode(file)
+ assert m.uid == m.gid == 0
+ assert m.uname == m.gname == ""
+
+ # Symlinks
+ for file in (
+ "root/a/symlink_file",
+ "root/a/symlink_dir",
+ "root/b/symlink_file",
+ "root/b/symlink_dir",
+ ):
+ m = tar.getmember(file)
+ assert m.issym()
+ assert m.mode == 0o755
+ assert m.uid == m.gid == m.mtime == 0
+ assert m.uname == m.gname == ""
+
+ # Verify the symlink targets. Notice that symlink targets are copied verbatim. That
+ # means the value is platform specific for relative symlinks within the current prefix,
+ # as on Windows they'd be ..\a and ..\b instead of ../a and ../b. So, reproducilility
+ # is only guaranteed per-platform currently.
+ assert PurePath(tar.getmember("root/a/symlink_file").linkname) == PurePath("data")
+ assert PurePath(tar.getmember("root/b/symlink_file").linkname) == PurePath("data")
+ assert PurePath(tar.getmember("root/a/symlink_dir").linkname) == PurePath("..", "b")
+ assert PurePath(tar.getmember("root/b/symlink_dir").linkname) == PurePath("..", "a")
+
+ # Check hardlink if supported
+ if hardlink_support:
+ m = tar.getmember("root/a/hardlink")
+ assert m.islnk()
+ assert m.mode == expected_mode("root/a/hardlink")
+ assert m.uid == m.gid == 0
+ assert m.uname == m.gname == ""
+ # Hardlink targets are always in posix format, as they reference a file that exists
+ # in the tarball.
+ assert m.linkname == "root/a/executable"
+
+ # Finally verify if entries are ordered by (is_dir, name)
+ assert [t.name for t in tar.getmembers()] == [
+ "root",
+ "root/x",
+ "root/y",
+ "root/a",
+ "root/a/data",
+ "root/a/executable",
+ *(["root/a/hardlink"] if hardlink_support else []),
+ "root/a/symlink_dir",
+ "root/a/symlink_file",
+ "root/b",
+ "root/b/data",
+ "root/b/executable",
+ "root/b/symlink_dir",
+ "root/b/symlink_file",
+ ]
+
+ # Delete the current root dir, extract the first tarball, create a second
+ shutil.rmtree(root)
+ with tarfile.open("fst.tar.gz", "r:gz") as tar:
+ tar.extractall()
+
+ # Create the second tarball
+ with gzip_compressed_tarfile("snd.tar.gz") as (tar, gzip_checksum_2, tarfile_checksum_2):
+ reproducible_tarfile_from_prefix(tar, "root")
+
+ # Verify the .tar.gz checksums are identical and correct
+ assert (
+ gzip_checksum_1.hexdigest()
+ == gzip_checksum_2.hexdigest()
+ == spack.util.crypto.checksum(hashlib.sha256, "fst.tar.gz")
+ == spack.util.crypto.checksum(hashlib.sha256, "snd.tar.gz")
+ )
+
+ # Verify the .tar checksums are identical and correct
+ with gzip.open("fst.tar.gz", "rb") as f, gzip.open("snd.tar.gz", "rb") as g:
+ assert (
+ tarfile_checksum_1.hexdigest()
+ == tarfile_checksum_2.hexdigest()
+ == spack.util.crypto.checksum_stream(hashlib.sha256, f)
+ == spack.util.crypto.checksum_stream(hashlib.sha256, g)
+ )
diff --git a/lib/spack/spack/test/util/compression.py b/lib/spack/spack/test/util/compression.py
index b3f5c15861..f3660e4dda 100644
--- a/lib/spack/spack/test/util/compression.py
+++ b/lib/spack/spack/test/util/compression.py
@@ -4,8 +4,10 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import io
import os
import shutil
+import tarfile
from itertools import product
import pytest
@@ -14,7 +16,7 @@ import llnl.url
from llnl.util.filesystem import working_dir
from spack.paths import spack_root
-from spack.util import compression as scomp
+from spack.util import compression
from spack.util.executable import CommandNotFoundError
datadir = os.path.join(spack_root, "lib", "spack", "spack", "test", "data", "compression")
@@ -27,18 +29,16 @@ ext_archive = {}
]
# Spack does not use Python native handling for tarballs or zip
# Don't test tarballs or zip in native test
-native_archive_list = [key for key in ext_archive.keys() if "tar" not in key and "zip" not in key]
-
-
-def support_stub():
- return False
+native_archive_list = [
+ key for key in ext_archive.keys() if "tar" not in key and "zip" not in key and "whl" not in key
+]
@pytest.fixture
def compr_support_check(monkeypatch):
- monkeypatch.setattr(scomp, "is_lzma_supported", support_stub)
- monkeypatch.setattr(scomp, "is_gzip_supported", support_stub)
- monkeypatch.setattr(scomp, "is_bz2_supported", support_stub)
+ monkeypatch.setattr(compression, "LZMA_SUPPORTED", False)
+ monkeypatch.setattr(compression, "GZIP_SUPPORTED", False)
+ monkeypatch.setattr(compression, "BZ2_SUPPORTED", False)
@pytest.fixture
@@ -59,7 +59,7 @@ def archive_file_and_extension(tmpdir_factory, request):
)
def test_native_unpacking(tmpdir_factory, archive_file_and_extension):
archive_file, extension = archive_file_and_extension
- util = scomp.decompressor_for(archive_file, extension)
+ util = compression.decompressor_for(archive_file, extension)
tmpdir = tmpdir_factory.mktemp("comp_test")
with working_dir(str(tmpdir)):
assert not os.listdir(os.getcwd())
@@ -73,12 +73,14 @@ def test_native_unpacking(tmpdir_factory, archive_file_and_extension):
@pytest.mark.not_on_windows("Only Python unpacking available on Windows")
@pytest.mark.parametrize(
- "archive_file_and_extension", [(ext, True) for ext in ext_archive.keys()], indirect=True
+ "archive_file_and_extension",
+ [(ext, True) for ext in ext_archive.keys() if "whl" not in ext],
+ indirect=True,
)
def test_system_unpacking(tmpdir_factory, archive_file_and_extension, compr_support_check):
# actually run test
archive_file, _ = archive_file_and_extension
- util = scomp.decompressor_for(archive_file)
+ util = compression.decompressor_for(archive_file)
tmpdir = tmpdir_factory.mktemp("system_comp_test")
with working_dir(str(tmpdir)):
assert not os.listdir(os.getcwd())
@@ -95,4 +97,25 @@ def test_unallowed_extension():
# are picked up by the linter and break style checks
bad_ext_archive = "Foo.cxx"
with pytest.raises(CommandNotFoundError):
- scomp.decompressor_for(bad_ext_archive)
+ compression.decompressor_for(bad_ext_archive)
+
+
+@pytest.mark.parametrize("ext", ["gz", "bz2", "xz"])
+def test_file_type_check_does_not_advance_stream(tmp_path, ext):
+ # Create a tarball compressed with the given format
+ path = str(tmp_path / "compressed_tarball")
+
+ try:
+ with tarfile.open(path, f"w:{ext}") as tar:
+ tar.addfile(tarfile.TarInfo("test.txt"), fileobj=io.BytesIO(b"test"))
+ except tarfile.CompressionError:
+ pytest.skip(f"Cannot create tar.{ext} files")
+
+ # Classify the file from its magic bytes, and check that the stream is not advanced
+ with open(path, "rb") as f:
+ computed_ext = compression.extension_from_magic_numbers_by_stream(f, decompress=False)
+ assert computed_ext == ext
+ assert f.tell() == 0
+ computed_ext = compression.extension_from_magic_numbers_by_stream(f, decompress=True)
+ assert computed_ext == f"tar.{ext}"
+ assert f.tell() == 0
diff --git a/lib/spack/spack/test/util/elf.py b/lib/spack/spack/test/util/elf.py
index b337c00073..a77d7ab637 100644
--- a/lib/spack/spack/test/util/elf.py
+++ b/lib/spack/spack/test/util/elf.py
@@ -5,7 +5,6 @@
import io
-from collections import OrderedDict
import pytest
@@ -137,45 +136,46 @@ def test_only_header():
@pytest.mark.requires_executables("gcc")
@skip_unless_linux
-def test_elf_get_and_replace_rpaths(binary_with_rpaths):
- long_rpaths = ["/very/long/prefix-a/x", "/very/long/prefix-b/y"]
- executable = str(binary_with_rpaths(rpaths=long_rpaths))
+def test_elf_get_and_replace_rpaths_and_pt_interp(binary_with_rpaths):
+ long_paths = ["/very/long/prefix-a/x", "/very/long/prefix-b/y"]
+ executable = str(
+ binary_with_rpaths(rpaths=long_paths, dynamic_linker="/very/long/prefix-b/lib/ld.so")
+ )
# Before
- assert elf.get_rpaths(executable) == long_rpaths
-
- replacements = OrderedDict(
- [
- (b"/very/long/prefix-a", b"/short-a"),
- (b"/very/long/prefix-b", b"/short-b"),
- (b"/very/long", b"/dont"),
- ]
- )
+ assert elf.get_rpaths(executable) == long_paths
+
+ replacements = {
+ b"/very/long/prefix-a": b"/short-a",
+ b"/very/long/prefix-b": b"/short-b",
+ b"/very/long": b"/dont",
+ }
# Replace once: should modify the file.
- assert elf.replace_rpath_in_place_or_raise(executable, replacements)
+ assert elf.substitute_rpath_and_pt_interp_in_place_or_raise(executable, replacements)
# Replace twice: nothing to be done.
- assert not elf.replace_rpath_in_place_or_raise(executable, replacements)
+ assert not elf.substitute_rpath_and_pt_interp_in_place_or_raise(executable, replacements)
# Verify the rpaths were modified correctly
assert elf.get_rpaths(executable) == ["/short-a/x", "/short-b/y"]
+ assert elf.get_interpreter(executable) == "/short-b/lib/ld.so"
# Going back to long rpaths should fail, since we've added trailing \0
# bytes, and replacement can't assume it can write back in repeated null
# bytes -- it may correspond to zero-length strings for example.
- with pytest.raises(
- elf.ElfDynamicSectionUpdateFailed,
- match="New rpath /very/long/prefix-a/x:/very/long/prefix-b/y is "
- "longer than old rpath /short-a/x:/short-b/y",
- ):
- elf.replace_rpath_in_place_or_raise(
- executable,
- OrderedDict(
- [(b"/short-a", b"/very/long/prefix-a"), (b"/short-b", b"/very/long/prefix-b")]
- ),
+ with pytest.raises(elf.ElfCStringUpdatesFailed) as info:
+ elf.substitute_rpath_and_pt_interp_in_place_or_raise(
+ executable, {b"/short-a": b"/very/long/prefix-a", b"/short-b": b"/very/long/prefix-b"}
)
+ assert info.value.rpath is not None
+ assert info.value.pt_interp is not None
+ assert info.value.rpath.old_value == b"/short-a/x:/short-b/y"
+ assert info.value.rpath.new_value == b"/very/long/prefix-a/x:/very/long/prefix-b/y"
+ assert info.value.pt_interp.old_value == b"/short-b/lib/ld.so"
+ assert info.value.pt_interp.new_value == b"/very/long/prefix-b/lib/ld.so"
+
@pytest.mark.requires_executables("gcc")
@skip_unless_linux
diff --git a/lib/spack/spack/test/util/environment.py b/lib/spack/spack/test/util/environment.py
index ef7c151fee..adf82aa83f 100644
--- a/lib/spack/spack/test/util/environment.py
+++ b/lib/spack/spack/test/util/environment.py
@@ -160,22 +160,13 @@ def test_reverse_environment_modifications(working_env):
assert os.environ == start_env
-def test_escape_double_quotes_in_shell_modifications():
- to_validate = envutil.EnvironmentModifications()
-
- to_validate.set("VAR", "$PATH")
- to_validate.append_path("VAR", "$ANOTHER_PATH")
-
- to_validate.set("QUOTED_VAR", '"MY_VAL"')
-
- if sys.platform == "win32":
- cmds = to_validate.shell_modifications(shell="bat")
- assert r'set "VAR=$PATH;$ANOTHER_PATH"' in cmds
- assert r'set "QUOTED_VAR="MY_VAL"' in cmds
- cmds = to_validate.shell_modifications(shell="pwsh")
- assert "$Env:VAR='$PATH;$ANOTHER_PATH'" in cmds
- assert "$Env:QUOTED_VAR='\"MY_VAL\"'" in cmds
- else:
- cmds = to_validate.shell_modifications()
- assert 'export VAR="$PATH:$ANOTHER_PATH"' in cmds
- assert r'export QUOTED_VAR="\"MY_VAL\""' in cmds
+def test_shell_modifications_are_properly_escaped():
+ """Test that variable values are properly escaped so that they can safely be eval'd."""
+ changes = envutil.EnvironmentModifications()
+ changes.set("VAR", "$PATH")
+ changes.append_path("VAR", "$ANOTHER_PATH")
+ changes.set("RM_RF", "$(rm -rf /)")
+
+ script = changes.shell_modifications(shell="sh")
+ assert f"export VAR='$PATH{os.pathsep}$ANOTHER_PATH'" in script
+ assert "export RM_RF='$(rm -rf /)'" in script
diff --git a/lib/spack/spack/test/util/executable.py b/lib/spack/spack/test/util/executable.py
index d854ec426e..9b0536eba9 100644
--- a/lib/spack/spack/test/util/executable.py
+++ b/lib/spack/spack/test/util/executable.py
@@ -12,6 +12,7 @@ import pytest
import llnl.util.filesystem as fs
import spack
+import spack.main
import spack.util.executable as ex
from spack.hooks.sbang import filter_shebangs_in_directory
diff --git a/lib/spack/spack/test/util/file_cache.py b/lib/spack/spack/test/util/file_cache.py
index cd9ce1c5b8..4af8a1ed03 100644
--- a/lib/spack/spack/test/util/file_cache.py
+++ b/lib/spack/spack/test/util/file_cache.py
@@ -31,6 +31,11 @@ def test_write_and_read_cache_file(file_cache):
assert text == "foobar\n"
+def test_read_before_init(file_cache):
+ with file_cache.read_transaction("test.yaml") as stream:
+ assert stream is None
+
+
@pytest.mark.not_on_windows("Locks not supported on Windows")
def test_failed_write_and_read_cache_file(file_cache):
"""Test failing to write then attempting to read a cached file."""
@@ -46,11 +51,6 @@ def test_failed_write_and_read_cache_file(file_cache):
# File does not exist
assert not file_cache.init_entry("test.yaml")
- # Attempting to read will cause a FileNotFoundError
- with pytest.raises(FileNotFoundError, match=r"test\.yaml"):
- with file_cache.read_transaction("test.yaml"):
- pass
-
def test_write_and_remove_cache_file(file_cache):
"""Test two write transactions on a cached file. Then try to remove an
diff --git a/lib/spack/spack/test/util/libc.py b/lib/spack/spack/test/util/libc.py
new file mode 100644
index 0000000000..f0ccc27a51
--- /dev/null
+++ b/lib/spack/spack/test/util/libc.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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
+
+from spack.util import libc
+
+
+@pytest.mark.parametrize(
+ "libc_prefix,startfile_prefix,expected",
+ [
+ # Ubuntu
+ ("/usr", "/usr/lib/x86_64-linux-gnu", "/usr/include/x86_64-linux-gnu"),
+ ("/usr", "/usr/lib/x86_64-linux-musl", "/usr/include/x86_64-linux-musl"),
+ ("/usr", "/usr/lib/aarch64-linux-gnu", "/usr/include/aarch64-linux-gnu"),
+ ("/usr", "/usr/lib/aarch64-linux-musl", "/usr/include/aarch64-linux-musl"),
+ # rhel-like
+ ("/usr", "/usr/lib64", "/usr/include"),
+ ("/usr", "/usr/lib", "/usr/include"),
+ ],
+)
+@pytest.mark.not_on_windows("The unit test deals with unix-like paths")
+def test_header_dir_computation(libc_prefix, startfile_prefix, expected):
+ """Tests that we compute the correct header directory from the prefix of the libc startfiles"""
+ assert libc.libc_include_dir_from_startfile_prefix(libc_prefix, startfile_prefix) == expected
diff --git a/lib/spack/spack/test/util/package_hash.py b/lib/spack/spack/test/util/package_hash.py
index b613c6630d..cfadae40be 100644
--- a/lib/spack/spack/test/util/package_hash.py
+++ b/lib/spack/spack/test/util/package_hash.py
@@ -9,6 +9,7 @@ import os
import pytest
import spack.directives
+import spack.directives_meta
import spack.paths
import spack.repo
import spack.util.package_hash as ph
@@ -211,13 +212,13 @@ class HasManyDirectives:
{directives}
""".format(
- directives="\n".join(" %s()" % name for name in spack.directives.directive_names)
+ directives="\n".join(" %s()" % name for name in spack.directives_meta.directive_names)
)
def test_remove_all_directives():
"""Ensure all directives are removed from packages before hashing."""
- for name in spack.directives.directive_names:
+ for name in spack.directives_meta.directive_names:
assert name in many_directives
tree = ast.parse(many_directives)
@@ -225,7 +226,7 @@ def test_remove_all_directives():
tree = ph.RemoveDirectives(spec).visit(tree)
unparsed = unparse(tree, py_ver_consistent=True)
- for name in spack.directives.directive_names:
+ for name in spack.directives_meta.directive_names:
assert name not in unparsed
@@ -337,15 +338,15 @@ def test_remove_complex_package_logic_filtered():
("grads", "rrlmwml3f2frdnqavmro3ias66h5b2ce"),
("llvm", "nufffum5dabmaf4l5tpfcblnbfjknvd3"),
# has @when("@4.1.0") and raw unicode literals
- ("mfem", "lbhr43gm5zdye2yhqznucxb4sg6vhryl"),
- ("mfem@4.0.0", "lbhr43gm5zdye2yhqznucxb4sg6vhryl"),
- ("mfem@4.1.0", "vjdjdgjt6nyo7ited2seki5epggw5gza"),
+ ("mfem", "whwftpqbjvzncmb52oz6izkanbha2uji"),
+ ("mfem@4.0.0", "whwftpqbjvzncmb52oz6izkanbha2uji"),
+ ("mfem@4.1.0", "bpi7of3xelo7fr3ta2lm6bmiruijnxcg"),
# has @when("@1.5.0:")
("py-torch", "qs7djgqn7dy7r3ps4g7hv2pjvjk4qkhd"),
("py-torch@1.0", "qs7djgqn7dy7r3ps4g7hv2pjvjk4qkhd"),
("py-torch@1.6", "p4ine4hc6f2ik2f2wyuwieslqbozll5w"),
# has a print with multiple arguments
- ("legion", "efpfd2c4pzhsbyc3o7plqcmtwm6b57yh"),
+ ("legion", "bq2etsik5l6pbryxmbhfhzynci56ruy4"),
# has nested `with when()` blocks and loops
("trilinos", "vqrgscjrla4hi7bllink7v6v6dwxgc2p"),
],
diff --git a/lib/spack/spack/test/util/path.py b/lib/spack/spack/test/util/path.py
index 9d7f66c60b..951502d647 100644
--- a/lib/spack/spack/test/util/path.py
+++ b/lib/spack/spack/test/util/path.py
@@ -18,6 +18,7 @@ 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
+ "rm -f /Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder___/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.a", # noqa: E501
]
@@ -26,6 +27,7 @@ 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
+ "rm -f /Users/gamblin2/padding-log-test/opt/[padded-to-91-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.a", # noqa: E501
]
@@ -107,6 +109,15 @@ class TestPathPadding:
out, err = capfd.readouterr()
assert padding_string not in out
+ def test_pad_on_path_sep_boundary(self):
+ """Ensure that padded paths do not end with path separator."""
+ pad_length = len(sup.SPACK_PATH_PADDING_CHARS)
+ padded_length = 128
+ remainder = padded_length % (pad_length + 1)
+ path = "a" * (remainder - 1)
+ result = sup.add_padding(path, padded_length)
+ assert 128 == len(result) and not result.endswith(os.path.sep)
+
@pytest.mark.parametrize("debug", [1, 2])
def test_path_debug_padded_filter(debug, monkeypatch):
diff --git a/lib/spack/spack/test/util/spack_lock_wrapper.py b/lib/spack/spack/test/util/spack_lock_wrapper.py
index 9838324a03..bf162627f5 100644
--- a/lib/spack/spack/test/util/spack_lock_wrapper.py
+++ b/lib/spack/spack/test/util/spack_lock_wrapper.py
@@ -10,7 +10,7 @@ import pytest
from llnl.util.filesystem import getuid, group_ids
-import spack.config
+import spack.error
import spack.util.lock as lk
diff --git a/lib/spack/spack/test/util/util_url.py b/lib/spack/spack/test/util/util_url.py
index e2b403f82e..ed34a79152 100644
--- a/lib/spack/spack/test/util/util_url.py
+++ b/lib/spack/spack/test/util/util_url.py
@@ -8,6 +8,8 @@ import os
import os.path
import urllib.parse
+import pytest
+
import spack.util.path
import spack.util.url as url_util
@@ -45,155 +47,63 @@ def test_relative_path_to_file_url(tmpdir):
assert os.path.samefile(roundtrip, path)
-def test_url_join_local_paths():
- # Resolve local link against page URL
-
- # wrong:
- assert (
- url_util.join("s3://bucket/index.html", "../other-bucket/document.txt")
- == "s3://bucket/other-bucket/document.txt"
- )
-
- # correct - need to specify resolve_href=True:
- assert (
- url_util.join("s3://bucket/index.html", "../other-bucket/document.txt", resolve_href=True)
- == "s3://other-bucket/document.txt"
- )
-
- # same as above: make sure several components are joined together correctly
- assert (
- url_util.join(
- # with resolve_href=True, first arg is the base url; can not be
- # broken up
- "s3://bucket/index.html",
- # with resolve_href=True, remaining arguments are the components of
- # the local href that needs to be resolved
- "..",
- "other-bucket",
- "document.txt",
- resolve_href=True,
- )
- == "s3://other-bucket/document.txt"
- )
-
- # Append local path components to prefix URL
-
- # wrong:
- assert (
- url_util.join("https://mirror.spack.io/build_cache", "my-package", resolve_href=True)
- == "https://mirror.spack.io/my-package"
- )
-
- # correct - Need to specify resolve_href=False:
- assert (
- url_util.join("https://mirror.spack.io/build_cache", "my-package", resolve_href=False)
- == "https://mirror.spack.io/build_cache/my-package"
- )
-
- # same as above; make sure resolve_href=False is default
- assert (
- url_util.join("https://mirror.spack.io/build_cache", "my-package")
- == "https://mirror.spack.io/build_cache/my-package"
- )
-
- # same as above: make sure several components are joined together correctly
- assert (
- url_util.join(
- # with resolve_href=False, first arg is just a prefix. No
- # resolution is done. So, there should be no difference between
- # join('/a/b/c', 'd/e'),
- # join('/a/b', 'c', 'd/e'),
- # join('/a', 'b/c', 'd', 'e'), etc.
- "https://mirror.spack.io",
- "build_cache",
- "my-package",
- )
- == "https://mirror.spack.io/build_cache/my-package"
- )
-
- # For s3:// URLs, the "netloc" (bucket) is considered part of the path.
- # Make sure join() can cross bucket boundaries in this case.
- args = ["s3://bucket/a/b", "new-bucket", "c"]
- assert url_util.join(*args) == "s3://bucket/a/b/new-bucket/c"
-
- args.insert(1, "..")
- assert url_util.join(*args) == "s3://bucket/a/new-bucket/c"
-
- args.insert(1, "..")
- assert url_util.join(*args) == "s3://bucket/new-bucket/c"
-
- # new-bucket is now the "netloc" (bucket name)
- args.insert(1, "..")
- assert url_util.join(*args) == "s3://new-bucket/c"
-
-
-def test_url_join_absolute_paths():
- # Handling absolute path components is a little tricky. To this end, we
- # distinguish "absolute path components", from the more-familiar concept of
- # "absolute paths" as they are understood for local filesystem paths.
- #
- # - All absolute paths are absolute path components. Joining a URL with
- # these components has the effect of completely replacing the path of the
- # URL with the absolute path. These components do not specify a URL
- # scheme, so the scheme of the URL procuced when joining them depend on
- # those provided by components that came before it (file:// assumed if no
- # such scheme is provided).
-
- # For eaxmple:
- p = "/path/to/resource"
- # ...is an absolute path
-
- # http:// URL
- assert url_util.join("http://example.com/a/b/c", p) == "http://example.com/path/to/resource"
-
- # s3:// URL
- # also notice how the netloc is treated as part of the path for s3:// URLs
- assert url_util.join("s3://example.com/a/b/c", p) == "s3://path/to/resource"
-
- # - URL components that specify a scheme are always absolute path
- # components. Joining a base URL with these components effectively
- # discards the base URL and "resets" the joining logic starting at the
- # component in question and using it as the new base URL.
-
- # For eaxmple:
- p = "http://example.com/path/to"
- # ...is an http:// URL
-
- join_result = url_util.join(p, "resource")
- assert join_result == "http://example.com/path/to/resource"
-
- # works as if everything before the http:// URL was left out
- assert url_util.join("literally", "does", "not", "matter", p, "resource") == join_result
-
- assert url_util.join("file:///a/b/c", "./d") == "file:///a/b/c/d"
-
- # Finally, resolve_href should have no effect for how absolute path
- # components are handled because local hrefs can not be absolute path
- # components.
- args = [
- "s3://does",
- "not",
- "matter",
- "http://example.com",
- "also",
- "does",
- "not",
- "matter",
- "/path",
- ]
-
- expected = "http://example.com/path"
- assert url_util.join(*args, resolve_href=True) == expected
- assert url_util.join(*args, resolve_href=False) == expected
-
- # resolve_href only matters for the local path components at the end of the
- # argument list.
- args[-1] = "/path/to/page"
- args.extend(("..", "..", "resource"))
-
- assert url_util.join(*args, resolve_href=True) == "http://example.com/resource"
-
- assert url_util.join(*args, resolve_href=False) == "http://example.com/path/resource"
+@pytest.mark.parametrize("resolve_href", [True, False])
+@pytest.mark.parametrize("scheme", ["http", "s3", "gs", "file", "oci"])
+def test_url_join_absolute(scheme, resolve_href):
+ """Test that joining a URL with an absolute path works the same for schemes we care about, and
+ whether we work in web browser mode or not."""
+ netloc = "" if scheme == "file" else "example.com"
+ a1 = url_util.join(f"{scheme}://{netloc}/a/b/c", "/d/e/f", resolve_href=resolve_href)
+ a2 = url_util.join(f"{scheme}://{netloc}/a/b/c", "/d", "e", "f", resolve_href=resolve_href)
+ assert a1 == a2 == f"{scheme}://{netloc}/d/e/f"
+
+ b1 = url_util.join(f"{scheme}://{netloc}/a", "https://b.com/b", resolve_href=resolve_href)
+ b2 = url_util.join(f"{scheme}://{netloc}/a", "https://b.com", "b", resolve_href=resolve_href)
+ assert b1 == b2 == "https://b.com/b"
+
+
+@pytest.mark.parametrize("scheme", ["http", "s3", "gs"])
+def test_url_join_up(scheme):
+ """Test that the netloc component is preserved when going .. up in the path."""
+ a1 = url_util.join(f"{scheme}://netloc/a/b.html", "c", resolve_href=True)
+ assert a1 == f"{scheme}://netloc/a/c"
+ b1 = url_util.join(f"{scheme}://netloc/a/b.html", "../c", resolve_href=True)
+ b2 = url_util.join(f"{scheme}://netloc/a/b.html", "..", "c", resolve_href=True)
+ assert b1 == b2 == f"{scheme}://netloc/c"
+ c1 = url_util.join(f"{scheme}://netloc/a/b.html", "../../c", resolve_href=True)
+ c2 = url_util.join(f"{scheme}://netloc/a/b.html", "..", "..", "c", resolve_href=True)
+ assert c1 == c2 == f"{scheme}://netloc/c"
+
+ d1 = url_util.join(f"{scheme}://netloc/a/b", "c", resolve_href=False)
+ assert d1 == f"{scheme}://netloc/a/b/c"
+ d2 = url_util.join(f"{scheme}://netloc/a/b", "../c", resolve_href=False)
+ d3 = url_util.join(f"{scheme}://netloc/a/b", "..", "c", resolve_href=False)
+ assert d2 == d3 == f"{scheme}://netloc/a/c"
+ e1 = url_util.join(f"{scheme}://netloc/a/b", "../../c", resolve_href=False)
+ e2 = url_util.join(f"{scheme}://netloc/a/b", "..", "..", "c", resolve_href=False)
+ assert e1 == e2 == f"{scheme}://netloc/c"
+ f1 = url_util.join(f"{scheme}://netloc/a/b", "../../../c", resolve_href=False)
+ f2 = url_util.join(f"{scheme}://netloc/a/b", "..", "..", "..", "c", resolve_href=False)
+ assert f1 == f2 == f"{scheme}://netloc/c"
+
+
+@pytest.mark.parametrize("scheme", ["http", "https", "ftp", "s3", "gs", "file"])
+def test_url_join_resolve_href(scheme):
+ """test that `resolve_href=True` behaves like a web browser at the base page, and
+ `resolve_href=False` behaves like joining paths in a file system at the base directory."""
+ # these are equivalent because of the trailing /
+ netloc = "" if scheme == "file" else "netloc"
+ a1 = url_util.join(f"{scheme}://{netloc}/my/path/", "other/path", resolve_href=True)
+ a2 = url_util.join(f"{scheme}://{netloc}/my/path/", "other", "path", resolve_href=True)
+ assert a1 == a2 == f"{scheme}://{netloc}/my/path/other/path"
+ b1 = url_util.join(f"{scheme}://{netloc}/my/path", "other/path", resolve_href=False)
+ b2 = url_util.join(f"{scheme}://{netloc}/my/path", "other", "path", resolve_href=False)
+ assert b1 == b2 == f"{scheme}://{netloc}/my/path/other/path"
+
+ # this is like a web browser: relative to /my.
+ c1 = url_util.join(f"{scheme}://{netloc}/my/path", "other/path", resolve_href=True)
+ c2 = url_util.join(f"{scheme}://{netloc}/my/path", "other", "path", resolve_href=True)
+ assert c1 == c2 == f"{scheme}://{netloc}/my/other/path"
def test_default_download_name():
@@ -207,3 +117,29 @@ def test_default_download_name_dot_dot():
assert url_util.default_download_filename("https://example.com/.") == "_"
assert url_util.default_download_filename("https://example.com/..") == "_."
assert url_util.default_download_filename("https://example.com/.abcdef") == "_abcdef"
+
+
+def test_parse_link_rel_next():
+ parse = url_util.parse_link_rel_next
+ assert parse(r'</abc>; rel="next"') == "/abc"
+ assert parse(r'</abc>; x=y; rel="next", </def>; x=y; rel="prev"') == "/abc"
+ assert parse(r'</abc>; rel="prev"; x=y, </def>; x=y; rel="next"') == "/def"
+
+ # example from RFC5988
+ assert (
+ parse(
+ r"""</TheBook/chapter2>; title*=UTF-8'de'letztes%20Kapitel; rel="previous","""
+ r"""</TheBook/chapter4>; title*=UTF-8'de'n%c3%a4chstes%20Kapitel; rel="next" """
+ )
+ == "/TheBook/chapter4"
+ )
+
+ assert (
+ parse(r"""<https://example.com/example>; key=";a=b, </c/d>; e=f"; rel="next" """)
+ == "https://example.com/example"
+ )
+
+ assert parse("https://example.com/example") is None
+ assert parse("<https://example.com/example; broken=broken") is None
+ assert parse("https://example.com/example; rel=prev") is None
+ assert parse("https://example.com/example; a=b; c=d; g=h") is None
diff --git a/lib/spack/spack/test/utilities.py b/lib/spack/spack/test/utilities.py
new file mode 100644
index 0000000000..5e83db9da2
--- /dev/null
+++ b/lib/spack/spack/test/utilities.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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)
+
+"""Non-fixture utilities for test code. Must be imported.
+"""
+from spack.main import make_argument_parser
+
+
+class SpackCommandArgs:
+ """Use this to get an Args object like what is passed into
+ a command.
+
+ Useful for emulating args in unit tests that want to check
+ helper functions in Spack commands. Ensures that you get all
+ the default arg values established by the parser.
+
+ Example usage::
+
+ install_args = SpackCommandArgs("install")("-v", "mpich")
+ """
+
+ def __init__(self, command_name):
+ self.parser = make_argument_parser()
+ self.command_name = command_name
+
+ def __call__(self, *argv, **kwargs):
+ self.parser.add_command(self.command_name)
+ prepend = kwargs["global_args"] if "global_args" in kwargs else []
+ args, unknown = self.parser.parse_known_args(prepend + [self.command_name] + list(argv))
+ return args
diff --git a/lib/spack/spack/test/variant.py b/lib/spack/spack/test/variant.py
index 0dad484ed9..518110d525 100644
--- a/lib/spack/spack/test/variant.py
+++ b/lib/spack/spack/test/variant.py
@@ -7,8 +7,12 @@ import numbers
import pytest
import spack.error
+import spack.repo
+import spack.spec
import spack.variant
+from spack.spec import Spec, VariantMap
from spack.variant import (
+ AbstractVariant,
BoolValuedVariant,
DuplicateVariantError,
InconsistentValidationError,
@@ -18,7 +22,6 @@ from spack.variant import (
SingleValuedVariant,
UnsatisfiableVariantSpecError,
Variant,
- VariantMap,
disjoint_sets,
)
@@ -541,7 +544,7 @@ class TestVariant:
)
# Valid vspec, shouldn't raise
vspec = a.make_variant("bar")
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
# Multiple values are not allowed
with pytest.raises(MultipleValuesInExclusiveVariantError):
@@ -550,16 +553,16 @@ class TestVariant:
# Inconsistent vspec
vspec.name = "FOO"
with pytest.raises(InconsistentValidationError):
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
# Valid multi-value vspec
a.multi = True
vspec = a.make_variant("bar,baz")
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
# Add an invalid value
vspec.value = "bar,baz,barbaz"
with pytest.raises(InvalidVariantValueError):
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
def test_callable_validator(self):
def validator(x):
@@ -570,12 +573,12 @@ class TestVariant:
a = Variant("foo", default=1024, description="", values=validator, multi=False)
vspec = a.make_default()
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
vspec.value = 2056
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
vspec.value = "foo"
with pytest.raises(InvalidVariantValueError):
- a.validate_or_raise(vspec)
+ a.validate_or_raise(vspec, "test-package")
def test_representation(self):
a = Variant(
@@ -583,11 +586,22 @@ class TestVariant:
)
assert a.allowed_values == "bar, baz, foobar"
+ def test_str(self):
+ string = str(
+ Variant(
+ "foo", default="", description="", values=("bar", "baz", "foobar"), multi=False
+ )
+ )
+ assert "'foo'" in string
+ assert "default=''" in string
+ assert "description=''" in string
+ assert "values=('foo', 'bar', 'baz') in string"
+
class TestVariantMapTest:
- def test_invalid_values(self):
+ def test_invalid_values(self) -> None:
# Value with invalid type
- a = VariantMap(None)
+ a = VariantMap(Spec())
with pytest.raises(TypeError):
a["foo"] = 2
@@ -606,17 +620,17 @@ class TestVariantMapTest:
with pytest.raises(KeyError):
a["bar"] = MultiValuedVariant("foo", "bar")
- def test_set_item(self):
+ def test_set_item(self) -> None:
# Check that all the three types of variants are accepted
- a = VariantMap(None)
+ a = VariantMap(Spec())
a["foo"] = BoolValuedVariant("foo", True)
a["bar"] = SingleValuedVariant("bar", "baz")
a["foobar"] = MultiValuedVariant("foobar", "a, b, c, d, e")
- def test_substitute(self):
+ def test_substitute(self) -> None:
# Check substitution of a key that exists
- a = VariantMap(None)
+ a = VariantMap(Spec())
a["foo"] = BoolValuedVariant("foo", True)
a.substitute(SingleValuedVariant("foo", "bar"))
@@ -625,15 +639,15 @@ class TestVariantMapTest:
with pytest.raises(KeyError):
a.substitute(BoolValuedVariant("bar", True))
- def test_satisfies_and_constrain(self):
+ def test_satisfies_and_constrain(self) -> None:
# foo=bar foobar=fee feebar=foo
- a = VariantMap(None)
+ a = VariantMap(Spec())
a["foo"] = MultiValuedVariant("foo", "bar")
a["foobar"] = SingleValuedVariant("foobar", "fee")
a["feebar"] = SingleValuedVariant("feebar", "foo")
# foo=bar,baz foobar=fee shared=True
- b = VariantMap(None)
+ b = VariantMap(Spec())
b["foo"] = MultiValuedVariant("foo", "bar, baz")
b["foobar"] = SingleValuedVariant("foobar", "fee")
b["shared"] = BoolValuedVariant("shared", True)
@@ -645,7 +659,7 @@ class TestVariantMapTest:
assert not b.satisfies(a)
# foo=bar,baz foobar=fee feebar=foo shared=True
- c = VariantMap(None)
+ c = VariantMap(Spec())
c["foo"] = MultiValuedVariant("foo", "bar, baz")
c["foobar"] = SingleValuedVariant("foobar", "fee")
c["feebar"] = SingleValuedVariant("feebar", "foo")
@@ -654,8 +668,8 @@ class TestVariantMapTest:
assert a.constrain(b)
assert a == c
- def test_copy(self):
- a = VariantMap(None)
+ def test_copy(self) -> None:
+ a = VariantMap(Spec())
a["foo"] = BoolValuedVariant("foo", True)
a["bar"] = SingleValuedVariant("bar", "baz")
a["foobar"] = MultiValuedVariant("foobar", "a, b, c, d, e")
@@ -663,14 +677,31 @@ class TestVariantMapTest:
c = a.copy()
assert a == c
- def test_str(self):
- c = VariantMap(None)
+ def test_str(self) -> None:
+ c = VariantMap(Spec())
c["foo"] = MultiValuedVariant("foo", "bar, baz")
c["foobar"] = SingleValuedVariant("foobar", "fee")
c["feebar"] = SingleValuedVariant("feebar", "foo")
c["shared"] = BoolValuedVariant("shared", True)
assert str(c) == "+shared feebar=foo foo=bar,baz foobar=fee"
+ def test_concrete(self, mock_packages, config) -> None:
+ spec = Spec("pkg-a")
+ vm = VariantMap(spec)
+ assert not vm.concrete
+
+ # concrete if associated spec is concrete
+ spec.concretize()
+ assert vm.concrete
+
+ # concrete if all variants are present (even if spec not concrete)
+ spec._mark_concrete(False)
+ assert spec.variants.concrete
+
+ # remove a variant to test the condition
+ del spec.variants["foo"]
+ assert not spec.variants.concrete
+
def test_disjoint_set_initialization_errors():
# Constructing from non-disjoint sets should raise an exception
@@ -731,7 +762,7 @@ def test_disjoint_set_fluent_methods():
@pytest.mark.regression("32694")
@pytest.mark.parametrize("other", [True, False])
def test_conditional_value_comparable_to_bool(other):
- value = spack.variant.Value("98", when="@1.0")
+ value = spack.variant.ConditionalValue("98", when=Spec("@1.0"))
comparison = value == other
assert comparison is False
@@ -765,9 +796,154 @@ def test_wild_card_valued_variants_equivalent_to_str():
several_arbitrary_values = ("doe", "re", "mi")
# "*" case
wild_output = wild_var.make_variant(several_arbitrary_values)
- wild_var.validate_or_raise(wild_output)
+ wild_var.validate_or_raise(wild_output, "test-package")
# str case
str_output = str_var.make_variant(several_arbitrary_values)
- str_var.validate_or_raise(str_output)
+ str_var.validate_or_raise(str_output, "test-package")
# equivalence each instance already validated
assert str_output.value == wild_output.value
+
+
+def test_variant_definitions(mock_packages):
+ pkg = spack.repo.PATH.get_pkg_class("variant-values")
+
+ # two variant names
+ assert len(pkg.variant_names()) == 2
+ assert "build_system" in pkg.variant_names()
+ assert "v" in pkg.variant_names()
+
+ # this name doesn't exist
+ assert len(pkg.variant_definitions("no-such-variant")) == 0
+
+ # there are 4 definitions but one is completely shadowed by another
+ assert len(pkg.variants) == 4
+
+ # variant_items ignores the shadowed definition
+ assert len(list(pkg.variant_items())) == 3
+
+ # variant_definitions also ignores the shadowed definition
+ defs = [vdef for _, vdef in pkg.variant_definitions("v")]
+ assert len(defs) == 2
+ assert defs[0].default == "foo"
+ assert defs[0].values == ("foo",)
+
+ assert defs[1].default == "bar"
+ assert defs[1].values == ("foo", "bar")
+
+
+@pytest.mark.parametrize(
+ "pkg_name,value,spec,def_ids",
+ [
+ ("variant-values", "foo", "", [0, 1]),
+ ("variant-values", "bar", "", [1]),
+ ("variant-values", "foo", "@1.0", [0]),
+ ("variant-values", "foo", "@2.0", [1]),
+ ("variant-values", "foo", "@3.0", [1]),
+ ("variant-values", "foo", "@4.0", []),
+ ("variant-values", "bar", "@2.0", [1]),
+ ("variant-values", "bar", "@3.0", [1]),
+ ("variant-values", "bar", "@4.0", []),
+ # now with a global override
+ ("variant-values-override", "bar", "", [0]),
+ ("variant-values-override", "bar", "@1.0", [0]),
+ ("variant-values-override", "bar", "@2.0", [0]),
+ ("variant-values-override", "bar", "@3.0", [0]),
+ ("variant-values-override", "bar", "@4.0", [0]),
+ ("variant-values-override", "baz", "", [0]),
+ ("variant-values-override", "baz", "@2.0", [0]),
+ ("variant-values-override", "baz", "@3.0", [0]),
+ ("variant-values-override", "baz", "@4.0", [0]),
+ ],
+)
+def test_prevalidate_variant_value(mock_packages, pkg_name, value, spec, def_ids):
+ pkg = spack.repo.PATH.get_pkg_class(pkg_name)
+
+ all_defs = [vdef for _, vdef in pkg.variant_definitions("v")]
+
+ valid_defs = spack.variant.prevalidate_variant_value(
+ pkg, SingleValuedVariant("v", value), spack.spec.Spec(spec)
+ )
+ assert len(valid_defs) == len(def_ids)
+
+ for vdef, i in zip(valid_defs, def_ids):
+ assert vdef is all_defs[i]
+
+
+@pytest.mark.parametrize(
+ "pkg_name,value,spec",
+ [
+ ("variant-values", "baz", ""),
+ ("variant-values", "bar", "@1.0"),
+ ("variant-values", "bar", "@4.0"),
+ ("variant-values", "baz", "@3.0"),
+ ("variant-values", "baz", "@4.0"),
+ # and with override
+ ("variant-values-override", "foo", ""),
+ ("variant-values-override", "foo", "@1.0"),
+ ("variant-values-override", "foo", "@2.0"),
+ ("variant-values-override", "foo", "@3.0"),
+ ("variant-values-override", "foo", "@4.0"),
+ ],
+)
+def test_strict_invalid_variant_values(mock_packages, pkg_name, value, spec):
+ pkg = spack.repo.PATH.get_pkg_class(pkg_name)
+
+ with pytest.raises(spack.variant.InvalidVariantValueError):
+ spack.variant.prevalidate_variant_value(
+ pkg, SingleValuedVariant("v", value), spack.spec.Spec(spec), strict=True
+ )
+
+
+@pytest.mark.parametrize(
+ "pkg_name,spec,satisfies,def_id",
+ [
+ ("variant-values", "@1.0", "v=foo", 0),
+ ("variant-values", "@2.0", "v=bar", 1),
+ ("variant-values", "@3.0", "v=bar", 1),
+ ("variant-values-override", "@1.0", "v=baz", 0),
+ ("variant-values-override", "@2.0", "v=baz", 0),
+ ("variant-values-override", "@3.0", "v=baz", 0),
+ ],
+)
+def test_concretize_variant_default_with_multiple_defs(
+ mock_packages, config, pkg_name, spec, satisfies, def_id
+):
+ pkg = spack.repo.PATH.get_pkg_class(pkg_name)
+ pkg_defs = [vdef for _, vdef in pkg.variant_definitions("v")]
+
+ spec = spack.spec.Spec(f"{pkg_name}{spec}").concretized()
+ assert spec.satisfies(satisfies)
+ assert spec.package.get_variant("v") is pkg_defs[def_id]
+
+
+@pytest.mark.parametrize(
+ "spec,variant_name,after",
+ [
+ # dev_path is a special case
+ ("foo dev_path=/path/to/source", "dev_path", SingleValuedVariant),
+ # reserved name: won't be touched
+ ("foo patches=2349dc44", "patches", AbstractVariant),
+ # simple case -- one definition applies
+ ("variant-values@1.0 v=foo", "v", SingleValuedVariant),
+ # simple, but with bool valued variant
+ ("pkg-a bvv=true", "bvv", BoolValuedVariant),
+ # variant doesn't exist at version
+ ("variant-values@4.0 v=bar", "v", spack.spec.InvalidVariantForSpecError),
+ # multiple definitions, so not yet knowable
+ ("variant-values@2.0 v=bar", "v", AbstractVariant),
+ ],
+)
+def test_substitute_abstract_variants(mock_packages, spec, variant_name, after):
+ spec = Spec(spec)
+
+ # all variants start out as AbstractVariant
+ assert isinstance(spec.variants[variant_name], AbstractVariant)
+
+ if issubclass(after, Exception):
+ # if we're checking for an error, use pytest.raises
+ with pytest.raises(after):
+ spack.spec.substitute_abstract_variants(spec)
+ else:
+ # ensure that the type of the variant on the spec has been narrowed (or not)
+ spack.spec.substitute_abstract_variants(spec)
+ assert isinstance(spec.variants[variant_name], after)
diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py
index 6ee18d76b0..4c5081e8d1 100644
--- a/lib/spack/spack/test/versions.py
+++ b/lib/spack/spack/test/versions.py
@@ -16,6 +16,7 @@ from llnl.util.filesystem import working_dir
import spack.package_base
import spack.spec
+import spack.version
from spack.version import (
EmptyRangeError,
GitVersion,
@@ -213,12 +214,24 @@ def test_nums_and_patch():
assert_ver_gt("=6.5p1", "=5.6p1")
-def test_rc_versions():
- assert_ver_gt("=6.0.rc1", "=6.0")
- assert_ver_lt("=6.0", "=6.0.rc1")
+def test_prereleases():
+ # pre-releases are special: they are less than final releases
+ assert_ver_lt("=6.0alpha", "=6.0alpha0")
+ assert_ver_lt("=6.0alpha0", "=6.0alpha1")
+ assert_ver_lt("=6.0alpha1", "=6.0alpha2")
+ assert_ver_lt("=6.0alpha2", "=6.0beta")
+ assert_ver_lt("=6.0beta", "=6.0beta0")
+ assert_ver_lt("=6.0beta0", "=6.0beta1")
+ assert_ver_lt("=6.0beta1", "=6.0beta2")
+ assert_ver_lt("=6.0beta2", "=6.0rc")
+ assert_ver_lt("=6.0rc", "=6.0rc0")
+ assert_ver_lt("=6.0rc0", "=6.0rc1")
+ assert_ver_lt("=6.0rc1", "=6.0rc2")
+ assert_ver_lt("=6.0rc2", "=6.0")
def test_alpha_beta():
+ # these are not pre-releases, but ordinary string components.
assert_ver_gt("=10b2", "=10a1")
assert_ver_lt("=10a2", "=10b2")
@@ -277,6 +290,39 @@ def test_version_ranges():
assert_ver_gt("1.5:1.6", "1.2:1.4")
+def test_version_range_with_prereleases():
+ # 1.2.1: means from the 1.2.1 release onwards
+ assert_does_not_satisfy("1.2.1alpha1", "1.2.1:")
+ assert_does_not_satisfy("1.2.1beta2", "1.2.1:")
+ assert_does_not_satisfy("1.2.1rc3", "1.2.1:")
+
+ # Pre-releases of 1.2.1 are included in the 1.2.0: range
+ assert_satisfies("1.2.1alpha1", "1.2.0:")
+ assert_satisfies("1.2.1beta1", "1.2.0:")
+ assert_satisfies("1.2.1rc3", "1.2.0:")
+
+ # In Spack 1.2 and 1.2.0 are distinct with 1.2 < 1.2.0. So a lowerbound on 1.2 includes
+ # pre-releases of 1.2.0 as well.
+ assert_satisfies("1.2.0alpha1", "1.2:")
+ assert_satisfies("1.2.0beta2", "1.2:")
+ assert_satisfies("1.2.0rc3", "1.2:")
+
+ # An upperbound :1.1 does not include 1.2.0 pre-releases
+ assert_does_not_satisfy("1.2.0alpha1", ":1.1")
+ assert_does_not_satisfy("1.2.0beta2", ":1.1")
+ assert_does_not_satisfy("1.2.0rc3", ":1.1")
+
+ assert_satisfies("1.2.0alpha1", ":1.2")
+ assert_satisfies("1.2.0beta2", ":1.2")
+ assert_satisfies("1.2.0rc3", ":1.2")
+
+ # You can also construct ranges from prereleases
+ assert_satisfies("1.2.0alpha2:1.2.0beta1", "1.2.0alpha1:1.2.0beta2")
+ assert_satisfies("1.2.0", "1.2.0alpha1:")
+ assert_satisfies("=1.2.0", "1.2.0alpha1:")
+ assert_does_not_satisfy("=1.2.0", ":1.2.0rc345")
+
+
def test_contains():
assert_in("=1.3", "1.2:1.4")
assert_in("=1.2.5", "1.2:1.4")
@@ -417,12 +463,12 @@ def test_basic_version_satisfaction():
assert_satisfies("4.7.3", "4.7.3")
assert_satisfies("4.7.3", "4.7")
- assert_satisfies("4.7.3b2", "4.7")
- assert_satisfies("4.7b6", "4.7")
+ assert_satisfies("4.7.3v2", "4.7")
+ assert_satisfies("4.7v6", "4.7")
assert_satisfies("4.7.3", "4")
- assert_satisfies("4.7.3b2", "4")
- assert_satisfies("4.7b6", "4")
+ assert_satisfies("4.7.3v2", "4")
+ assert_satisfies("4.7v6", "4")
assert_does_not_satisfy("4.8.0", "4.9")
assert_does_not_satisfy("4.8", "4.9")
@@ -433,12 +479,12 @@ def test_basic_version_satisfaction_in_lists():
assert_satisfies(["4.7.3"], ["4.7.3"])
assert_satisfies(["4.7.3"], ["4.7"])
- assert_satisfies(["4.7.3b2"], ["4.7"])
- assert_satisfies(["4.7b6"], ["4.7"])
+ assert_satisfies(["4.7.3v2"], ["4.7"])
+ assert_satisfies(["4.7v6"], ["4.7"])
assert_satisfies(["4.7.3"], ["4"])
- assert_satisfies(["4.7.3b2"], ["4"])
- assert_satisfies(["4.7b6"], ["4"])
+ assert_satisfies(["4.7.3v2"], ["4"])
+ assert_satisfies(["4.7v6"], ["4"])
assert_does_not_satisfy(["4.8.0"], ["4.9"])
assert_does_not_satisfy(["4.8"], ["4.9"])
@@ -507,6 +553,11 @@ def test_formatted_strings():
assert v.dotted.joined.string == "123b"
+def test_dotted_numeric_string():
+ assert Version("1a2b3").dotted_numeric_string == "1.0.2.0.3"
+ assert Version("1a2b3alpha4").dotted_numeric_string == "1.0.2.0.3.0.4"
+
+
def test_up_to():
v = Version("1.23-4_5b")
@@ -548,9 +599,21 @@ def test_repr_and_str():
check_repr_and_str("R2016a.2-3_4")
+@pytest.mark.parametrize(
+ "version_str", ["1.2string3", "1.2-3xyz_4-alpha.5", "1.2beta", "1_x_rc-4"]
+)
+def test_stringify_version(version_str):
+ v = Version(version_str)
+ v.string = None
+ assert str(v) == version_str
+
+ v.string = None
+ assert v.string == version_str
+
+
def test_len():
a = Version("1.2.3.4")
- assert len(a) == len(a.version)
+ assert len(a) == len(a.version[0])
assert len(a) == 4
b = Version("2018.0")
assert len(b) == 2
@@ -906,6 +969,13 @@ def test_version_list_normalization():
assert ver("1.0:2.0,=1.0,ref=1.0") == ver(["1.0:2.0"])
+def test_version_list_connected_union_of_disjoint_ranges():
+ # Make sure that we also simplify lists of ranges if their intersection is empty, but their
+ # union is connected.
+ assert ver("1.0:2.0,2.1,2.2:3,4:6") == ver(["1.0:6"])
+ assert ver("1.0:1.2,1.3:2") == ver("1.0:1.5,1.6:2")
+
+
@pytest.mark.parametrize("version", ["=1.2", "git.ref=1.2", "1.2"])
def test_version_comparison_with_list_fails(version):
vlist = VersionList(["=1.3"])
diff --git a/lib/spack/spack/test/views.py b/lib/spack/spack/test/views.py
index 68fb286f9c..2a62d04312 100644
--- a/lib/spack/spack/test/views.py
+++ b/lib/spack/spack/test/views.py
@@ -9,16 +9,16 @@ import pytest
from spack.directory_layout import DirectoryLayout
from spack.filesystem_view import SimpleFilesystemView, YamlFilesystemView
+from spack.installer import PackageInstaller
from spack.spec import Spec
-@pytest.mark.not_on_windows("Not supported on Windows (yet)")
def test_remove_extensions_ordered(install_mockery, mock_fetch, tmpdir):
view_dir = str(tmpdir.join("view"))
layout = DirectoryLayout(view_dir)
view = YamlFilesystemView(view_dir, layout)
e2 = Spec("extension2").concretized()
- e2.package.do_install()
+ PackageInstaller([e2.package], explicit=True).install()
view.add_specs(e2)
e1 = e2["extension1"]
@@ -33,8 +33,8 @@ def test_view_with_spec_not_contributing_files(mock_packages, tmpdir):
layout = DirectoryLayout(view_dir)
view = SimpleFilesystemView(view_dir, layout)
- a = Spec("a")
- b = Spec("b")
+ a = Spec("pkg-a")
+ b = Spec("pkg-b")
a.prefix = os.path.join(tmpdir, "a")
b.prefix = os.path.join(tmpdir, "b")
a._mark_concrete()
diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py
index b7312e2186..19dcd78840 100644
--- a/lib/spack/spack/test/web.py
+++ b/lib/spack/spack/test/web.py
@@ -6,6 +6,7 @@ import collections
import email.message
import os
import pickle
+import ssl
import urllib.request
import pytest
@@ -13,10 +14,9 @@ import pytest
import llnl.util.tty as tty
import spack.config
-import spack.mirror
+import spack.mirrors.mirror
import spack.paths
import spack.url
-import spack.util.path
import spack.util.s3
import spack.util.url as url_util
import spack.util.web
@@ -36,6 +36,7 @@ page_3 = _create_url("3.html")
page_4 = _create_url("4.html")
root_with_fragment = _create_url("index_with_fragment.html")
+root_with_javascript = _create_url("index_with_javascript.html")
@pytest.mark.parametrize(
@@ -147,6 +148,11 @@ def test_find_versions_of_archive_with_fragment():
assert Version("5.0.0") in versions
+def test_find_versions_of_archive_with_javascript():
+ versions = spack.url.find_versions_of_archive(root_tarball, root_with_javascript, list_depth=0)
+ assert Version("5.0.0") in versions
+
+
def test_get_header():
headers = {"Content-type": "text/plain"}
@@ -270,7 +276,7 @@ class MockS3Client:
def test_gather_s3_information(monkeypatch, capfd):
- mirror = spack.mirror.Mirror(
+ mirror = spack.mirrors.mirror.Mirror(
{
"fetch": {
"access_token": "AAAAAAA",
@@ -363,3 +369,81 @@ def test_detailed_http_error_pickle(tmpdir):
assert deserialized.reason == "Not Found"
assert str(deserialized.info()) == str(headers)
assert str(deserialized) == str(error)
+
+
+@pytest.fixture()
+def ssl_scrubbed_env(mutable_config, monkeypatch):
+ """clear out environment variables that could give false positives for SSL Cert tests"""
+ monkeypatch.delenv("SSL_CERT_FILE", raising=False)
+ monkeypatch.delenv("SSL_CERT_DIR", raising=False)
+ monkeypatch.delenv("CURL_CA_BUNDLE", raising=False)
+ spack.config.set("config:verify_ssl", True)
+
+
+@pytest.mark.parametrize(
+ "cert_path,cert_creator",
+ [
+ pytest.param(
+ lambda base_path: os.path.join(base_path, "mock_cert.crt"),
+ lambda cert_path: open(cert_path, "w").close(),
+ id="cert_file",
+ ),
+ pytest.param(
+ lambda base_path: os.path.join(base_path, "mock_cert"),
+ lambda cert_path: os.mkdir(cert_path),
+ id="cert_directory",
+ ),
+ ],
+)
+def test_ssl_urllib(
+ cert_path, cert_creator, tmpdir, ssl_scrubbed_env, mutable_config, monkeypatch
+):
+ """
+ create a proposed cert type and then verify that they exist inside ssl's checks
+ """
+ spack.config.set("config:url_fetch_method", "urllib")
+
+ def mock_verify_locations(self, cafile, capath, cadata):
+ """overwrite ssl's verification to simply check for valid file/path"""
+ assert cafile or capath
+ if cafile:
+ assert os.path.isfile(cafile)
+ if capath:
+ assert os.path.isdir(capath)
+
+ monkeypatch.setattr(ssl.SSLContext, "load_verify_locations", mock_verify_locations)
+
+ with tmpdir.as_cwd():
+ mock_cert = cert_path(tmpdir.strpath)
+ cert_creator(mock_cert)
+ spack.config.set("config:ssl_certs", mock_cert)
+
+ assert mock_cert == spack.config.get("config:ssl_certs", None)
+
+ ssl_context = spack.util.web.ssl_create_default_context()
+ assert ssl_context.verify_mode == ssl.CERT_REQUIRED
+
+
+@pytest.mark.parametrize("cert_exists", [True, False], ids=["exists", "missing"])
+def test_ssl_curl_cert_file(cert_exists, tmpdir, ssl_scrubbed_env, mutable_config, monkeypatch):
+ """
+ Assure that if a valid cert file is specified curl executes
+ with CURL_CA_BUNDLE in the env
+ """
+ spack.config.set("config:url_fetch_method", "curl")
+ with tmpdir.as_cwd():
+ mock_cert = str(tmpdir.join("mock_cert.crt"))
+ spack.config.set("config:ssl_certs", mock_cert)
+ if cert_exists:
+ open(mock_cert, "w").close()
+ assert os.path.isfile(mock_cert)
+ curl = spack.util.web.require_curl()
+
+ # arbitrary call to query the run env
+ dump_env = {}
+ curl("--help", output=str, _dump_env=dump_env)
+
+ if cert_exists:
+ assert dump_env["CURL_CA_BUNDLE"] == mock_cert
+ else:
+ assert "CURL_CA_BUNDLE" not in dump_env
diff --git a/lib/spack/spack/traverse.py b/lib/spack/spack/traverse.py
index 3ac2bfe24c..880d7f71fa 100644
--- a/lib/spack/spack/traverse.py
+++ b/lib/spack/spack/traverse.py
@@ -3,8 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from collections import defaultdict, namedtuple
-from typing import Union
+from collections import defaultdict
+from typing import Any, Callable, List, NamedTuple, Set, Union
import spack.deptypes as dt
import spack.spec
@@ -12,11 +12,14 @@ import spack.spec
# Export only the high-level API.
__all__ = ["traverse_edges", "traverse_nodes", "traverse_tree"]
+
#: Data class that stores a directed edge together with depth at
#: which the target vertex was found. It is passed to ``accept``
#: and ``neighbors`` of visitors, so they can decide whether to
#: follow the edge or not.
-EdgeAndDepth = namedtuple("EdgeAndDepth", ["edge", "depth"])
+class EdgeAndDepth(NamedTuple):
+ edge: "spack.spec.DependencySpec"
+ depth: int
def sort_edges(edges):
@@ -112,68 +115,62 @@ class CoverEdgesVisitor:
return self.visitor.neighbors(item)
-class TopoVisitor:
- """Visitor that can be used in :py:func:`depth-first traversal
- <spack.traverse.traverse_depth_first_with_visitor>` to generate
- a topologically ordered list of specs.
-
- Algorithm based on "Section 22.4: Topological sort", Introduction to Algorithms
- (2001, 2nd edition) by Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.;
- Stein, Clifford.
-
- Summary of the algorithm: prepend each vertex to a list in depth-first post-order,
- not following edges to nodes already seen. This ensures all descendants occur after
- their parent, yielding a topological order.
-
- Note: in this particular implementation we collect the *edges* through which the
- vertices are discovered, meaning that a topological order of *vertices* is obtained
- by taking the specs pointed to: ``map(lambda edge: edge.spec, visitor.edges)``.
- Lastly, ``all_edges=True`` can be used to retrieve a list of all reachable
- edges, with the property that for each vertex all in-edges precede all out-edges.
- """
-
- def __init__(self, visitor, key=id, root=True, all_edges=False):
- """
- Arguments:
- visitor: visitor that implements accept(), pre(), post() and neighbors()
- key: uniqueness key for nodes
- root (bool): Whether to include the root node.
- all_edges (bool): when ``False`` (default): Each node is reached once,
- and ``map(lambda edge: edge.spec, visitor.edges)`` is topologically
- ordered. When ``True``, every edge is listed, ordered such that for
- each node all in-edges precede all out-edges.
- """
- self.visited = set()
- self.visitor = visitor
+class MixedDepthVisitor:
+ """Visits all unique edges of the sub-DAG induced by direct dependencies of type ``direct``
+ and transitive dependencies of type ``transitive``. An example use for this is traversing build
+ type dependencies non-recursively, and link dependencies recursively."""
+
+ def __init__(
+ self,
+ *,
+ direct: dt.DepFlag,
+ transitive: dt.DepFlag,
+ key: Callable[["spack.spec.Spec"], Any] = id,
+ ) -> None:
+ self.direct_type = direct
+ self.transitive_type = transitive
self.key = key
- self.root = root
- self.reverse_order = []
- self.all_edges = all_edges
+ self.seen: Set[Any] = set()
+ self.seen_roots: Set[Any] = set()
+
+ def accept(self, item: EdgeAndDepth) -> bool:
+ # Do not accept duplicate root nodes. This only happens if the user starts iterating from
+ # multiple roots and lists one of the roots multiple times.
+ if item.edge.parent is None:
+ node_id = self.key(item.edge.spec)
+ if node_id in self.seen_roots:
+ return False
+ self.seen_roots.add(node_id)
+ return True
- def accept(self, item):
- if self.key(item.edge.spec) not in self.visited:
- return True
- if self.all_edges and (self.root or item.depth > 0):
- self.reverse_order.append(item.edge)
- return False
-
- def pre(self, item):
- # You could add a temporary marker for cycle detection
- # that's cleared in `post`, but we assume no cycles.
- pass
-
- def post(self, item):
- self.visited.add(self.key(item.edge.spec))
- if self.root or item.depth > 0:
- self.reverse_order.append(item.edge)
+ def neighbors(self, item: EdgeAndDepth) -> List[EdgeAndDepth]:
+ # If we're here through an artificial source node, it's a root, and we return all
+ # direct_type and transitive_type edges. If we're here through a transitive_type edge, we
+ # return all transitive_type edges. To avoid returning the same edge twice:
+ # 1. If we had already encountered the current node through a transitive_type edge, we
+ # don't need to return transitive_type edges again.
+ # 2. If we encounter the current node through a direct_type edge, and we had already seen
+ # it through a transitive_type edge, only return the non-transitive_type, direct_type
+ # edges.
+ node_id = self.key(item.edge.spec)
+ seen = node_id in self.seen
+ is_root = item.edge.parent is None
+ follow_transitive = is_root or bool(item.edge.depflag & self.transitive_type)
+ follow = self.direct_type if is_root else dt.NONE
+
+ if follow_transitive and not seen:
+ follow |= self.transitive_type
+ self.seen.add(node_id)
+ elif follow == dt.NONE:
+ return []
- def neighbors(self, item):
- return self.visitor.neighbors(item)
+ edges = item.edge.spec.edges_to_dependencies(depflag=follow)
+
+ # filter direct_type edges already followed before becuase they were also transitive_type.
+ if seen:
+ edges = [edge for edge in edges if not edge.depflag & self.transitive_type]
- @property
- def edges(self):
- """Return edges in topological order (in-edges precede out-edges)."""
- return list(reversed(self.reverse_order))
+ return sort_edges(edges)
def get_visitor_from_args(
@@ -378,39 +375,52 @@ def traverse_breadth_first_tree_nodes(parent_id, edges, key=id, depth=0):
yield item
-# Topologic order
-def traverse_edges_topo(
- specs,
- direction="children",
- deptype: Union[dt.DepFlag, dt.DepTypes] = "all",
- key=id,
- root=True,
- all_edges=False,
-):
+def traverse_topo_edges_generator(edges, visitor, key=id, root=True, all_edges=False):
"""
- Returns a list of edges in topological order, in the sense that all in-edges of a
- vertex appear before all out-edges. By default with direction=children edges are
- directed from dependent to dependency. With directions=parents, the edges are
- directed from dependency to dependent.
+ Returns a list of edges in topological order, in the sense that all in-edges of a vertex appear
+ before all out-edges.
Arguments:
- specs (list): List of root specs (considered to be depth 0)
- direction (str): ``children`` (edges are directed from dependent to dependency)
- or ``parents`` (edges are flipped / directed from dependency to dependent)
- deptype: allowed dependency types
+ edges (list): List of EdgeAndDepth instances
+ visitor: visitor instance that defines the sub-DAG to traverse
key: function that takes a spec and outputs a key for uniqueness test.
root (bool): Yield the root nodes themselves
all_edges (bool): When ``False`` only one in-edge per node is returned, when
``True`` all reachable edges are returned.
"""
- if not isinstance(deptype, dt.DepFlag):
- deptype = dt.canonicalize(deptype)
- visitor: Union[BaseVisitor, ReverseVisitor, TopoVisitor] = BaseVisitor(deptype)
- if direction == "parents":
- visitor = ReverseVisitor(visitor, deptype)
- visitor = TopoVisitor(visitor, key=key, root=root, all_edges=all_edges)
- traverse_depth_first_with_visitor(with_artificial_edges(specs), visitor)
- return visitor.edges
+ # Topo order used to be implemented using a DFS visitor, which was relatively efficient in that
+ # it would visit nodes only once, and it was composable. In practice however it would yield a
+ # DFS order on DAGs that are trees, which is undesirable in many cases. For example, a list of
+ # search paths for trees is better in BFS order, so that direct dependencies are listed first.
+ # That way a transitive dependency cannot shadow a direct one. So, here we collect the sub-DAG
+ # of interest and then compute a topological order that is the most breadth-first possible.
+
+ # maps node identifier to the number of remaining in-edges
+ in_edge_count = defaultdict(int)
+ # maps parent identifier to a list of edges, where None is a special identifier
+ # for the artificial root/source.
+ node_to_edges = defaultdict(list)
+ for edge in traverse_breadth_first_edges_generator(edges, visitor, root=True, depth=False):
+ in_edge_count[key(edge.spec)] += 1
+ parent_id = key(edge.parent) if edge.parent is not None else None
+ node_to_edges[parent_id].append(edge)
+
+ queue = [None]
+
+ while queue:
+ for edge in node_to_edges[queue.pop(0)]:
+ child_id = key(edge.spec)
+ in_edge_count[child_id] -= 1
+
+ should_yield = root or edge.parent is not None
+
+ if all_edges and should_yield:
+ yield edge
+
+ if in_edge_count[child_id] == 0:
+ if not all_edges and should_yield:
+ yield edge
+ queue.append(key(edge.spec))
# High-level API: traverse_edges, traverse_nodes, traverse_tree.
@@ -459,20 +469,20 @@ def traverse_edges(
A generator that yields ``DependencySpec`` if depth is ``False``
or a tuple of ``(depth, DependencySpec)`` if depth is ``True``.
"""
-
+ # validate input
if order == "topo":
if cover == "paths":
raise ValueError("cover=paths not supported for order=topo")
- # TODO: There is no known need for topological ordering of traversals (edge or node)
- # with an initialized "visited" set. Revisit if needed.
if visited is not None:
raise ValueError("visited set not implemented for order=topo")
- return traverse_edges_topo(
- specs, direction, deptype, key, root, all_edges=cover == "edges"
- )
+ elif order not in ("post", "pre", "breadth"):
+ raise ValueError(f"Unknown order {order}")
+ # In topo traversal we need to construct a sub-DAG including all unique edges even if we are
+ # yielding a subset of them, hence "edges".
+ _cover = "edges" if order == "topo" else cover
+ visitor = get_visitor_from_args(_cover, direction, deptype, key, visited)
root_edges = with_artificial_edges(specs)
- visitor = get_visitor_from_args(cover, direction, deptype, key, visited)
# Depth-first
if order in ("pre", "post"):
@@ -481,8 +491,10 @@ def traverse_edges(
)
elif order == "breadth":
return traverse_breadth_first_edges_generator(root_edges, visitor, root, depth)
-
- raise ValueError("Unknown order {}".format(order))
+ elif order == "topo":
+ return traverse_topo_edges_generator(
+ root_edges, visitor, key, root, all_edges=cover == "edges"
+ )
def traverse_nodes(
@@ -563,10 +575,10 @@ def traverse_tree(
# identical to DFS, which is much more efficient then.
if not depth_first and cover == "edges":
edges, parents = breadth_first_to_tree_edges(specs, deptype, key)
- return traverse_breadth_first_tree_edges(None, edges, parents)
+ return traverse_breadth_first_tree_edges(None, edges, parents, key)
elif not depth_first and cover == "nodes":
edges = breadth_first_to_tree_nodes(specs, deptype, key)
- return traverse_breadth_first_tree_nodes(None, edges)
+ return traverse_breadth_first_tree_nodes(None, edges, key)
return traverse_edges(specs, order="pre", cover=cover, deptype=deptype, key=key, depth=True)
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index 6a84ddca2e..e81eca22f7 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -29,6 +29,7 @@ import io
import os
import pathlib
import re
+from typing import Any, Dict, Optional, Sequence, Union
import llnl.url
from llnl.path import convert_to_posix_path
@@ -257,7 +258,9 @@ def parse_version_offset(path):
# 9th Pass: Version in path
# github.com/repo/name/releases/download/vver/name
# e.g. https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow
+ # e.g. https://gitlab.com/hpctoolkit/hpcviewer/-/releases/2024.02/downloads/hpcviewer.tgz
(r"github\.com/[^/]+/[^/]+/releases/download/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/", path),
+ (r"gitlab\.com/[^/]+/.+/-/releases/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/downloads/", path),
# e.g. ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/ncbi.tar.gz
(r"(\d[\da-zA-Z._-]*)/[^/]+$", path),
]
@@ -284,20 +287,19 @@ def parse_version_offset(path):
raise UndetectableVersionError(original_path)
-def parse_version(path):
+def parse_version(path: str) -> spack.version.StandardVersion:
"""Try to extract a version string from a filename or URL.
Args:
- path (str): The filename or URL for the package
+ path: The filename or URL for the package
- Returns:
- spack.version.Version: The version of the package
+ Returns: The version of the package
Raises:
UndetectableVersionError: If the URL does not match any regexes
"""
version, start, length, i, regex = parse_version_offset(path)
- return spack.version.Version(version)
+ return spack.version.StandardVersion.from_string(version)
def parse_name_offset(path, v=None):
@@ -604,8 +606,12 @@ def color_url(path, **kwargs):
def find_versions_of_archive(
- archive_urls, list_url=None, list_depth=0, concurrency=32, reference_package=None
-):
+ archive_urls: Union[str, Sequence[str]],
+ list_url: Optional[str] = None,
+ list_depth: int = 0,
+ concurrency: Optional[int] = 32,
+ reference_package: Optional[Any] = None,
+) -> Dict[spack.version.StandardVersion, str]:
"""Scrape web pages for new versions of a tarball. This function prefers URLs in the
following order: links found on the scraped page that match a url generated by the
reference package, found and in the archive_urls list, found and derived from those
@@ -613,22 +619,18 @@ def find_versions_of_archive(
archive_urls list is included for the version.
Args:
- archive_urls (str or list or tuple): URL or sequence of URLs for
- different versions of a package. Typically these are just the
- tarballs from the package file itself. By default, this searches
- the parent directories of archives.
- list_url (str or None): URL for a listing of archives.
- Spack will scrape these pages for download links that look
- like the archive URL.
- list_depth (int): max depth to follow links on list_url pages.
- Defaults to 0.
- concurrency (int): maximum number of concurrent requests
- reference_package (spack.package_base.PackageBase or None): a spack package
- used as a reference for url detection. Uses the url_for_version
- method on the package to produce reference urls which, if found,
- are preferred.
+ archive_urls: URL or sequence of URLs for different versions of a package. Typically these
+ are just the tarballs from the package file itself. By default, this searches the
+ parent directories of archives.
+ list_url: URL for a listing of archives. Spack will scrape these pages for download links
+ that look like the archive URL.
+ list_depth: max depth to follow links on list_url pages. Defaults to 0.
+ concurrency: maximum number of concurrent requests
+ reference_package: a spack package used as a reference for url detection. Uses the
+ url_for_version method on the package to produce reference urls which, if found, are
+ preferred.
"""
- if not isinstance(archive_urls, (list, tuple)):
+ if isinstance(archive_urls, str):
archive_urls = [archive_urls]
# Generate a list of list_urls based on archive urls and any
@@ -689,7 +691,7 @@ def find_versions_of_archive(
# Build a dict version -> URL from any links that match the wildcards.
# Walk through archive_url links first.
# Any conflicting versions will be overwritten by the list_url links.
- versions = {}
+ versions: Dict[spack.version.StandardVersion, str] = {}
matched = set()
for url in sorted(links):
url = convert_to_posix_path(url)
diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py
index 32f3c809c1..b5b455fad6 100644
--- a/lib/spack/spack/user_environment.py
+++ b/lib/spack/spack/user_environment.py
@@ -8,7 +8,6 @@ import sys
import spack.build_environment
import spack.config
-import spack.error
import spack.spec
import spack.util.environment as environment
from spack import traverse
@@ -66,6 +65,20 @@ def unconditional_environment_modifications(view):
return env
+def project_env_mods(
+ *specs: spack.spec.Spec, view, env: environment.EnvironmentModifications
+) -> None:
+ """Given a list of environment modifications, project paths changes to the view."""
+ prefix_to_prefix = {s.prefix: view.get_projection_for_spec(s) for s in specs if not s.external}
+ # Avoid empty regex if all external
+ if not prefix_to_prefix:
+ return
+ prefix_regex = re.compile("|".join(re.escape(p) for p in prefix_to_prefix.keys()))
+ for mod in env.env_modifications:
+ if isinstance(mod, environment.NameValueModifier):
+ mod.value = prefix_regex.sub(lambda m: prefix_to_prefix[m.group(0)], mod.value)
+
+
def environment_modifications_for_specs(
*specs: spack.spec.Spec, view=None, set_package_py_globals: bool = True
):
@@ -101,17 +114,6 @@ def environment_modifications_for_specs(
# Apply view projections if any.
if view:
- prefix_to_prefix = {
- s.prefix: view.get_projection_for_spec(s)
- for s in reversed(topo_ordered)
- if not s.external
- }
- # Avoid empty regex if all external
- if not prefix_to_prefix:
- return env
- prefix_regex = re.compile("|".join(re.escape(p) for p in prefix_to_prefix.keys()))
- for mod in env.env_modifications:
- if isinstance(mod, environment.NameValueModifier):
- mod.value = prefix_regex.sub(lambda m: prefix_to_prefix[m.group(0)], mod.value)
+ project_env_mods(*topo_ordered, view=view, env=env)
return env
diff --git a/lib/spack/spack/util/archive.py b/lib/spack/spack/util/archive.py
new file mode 100644
index 0000000000..950405887a
--- /dev/null
+++ b/lib/spack/spack/util/archive.py
@@ -0,0 +1,230 @@
+# Copyright 2013-2024 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 errno
+import hashlib
+import io
+import os
+import pathlib
+import tarfile
+from contextlib import closing, contextmanager
+from gzip import GzipFile
+from typing import Callable, Dict, Tuple
+
+from llnl.util.symlink import readlink
+
+
+class ChecksumWriter(io.BufferedIOBase):
+ """Checksum writer computes a checksum while writing to a file."""
+
+ myfileobj = None
+
+ def __init__(self, fileobj, algorithm=hashlib.sha256):
+ self.fileobj = fileobj
+ self.hasher = algorithm()
+ self.length = 0
+
+ def hexdigest(self):
+ return self.hasher.hexdigest()
+
+ def write(self, data):
+ if isinstance(data, (bytes, bytearray)):
+ length = len(data)
+ else:
+ data = memoryview(data)
+ length = data.nbytes
+
+ if length > 0:
+ self.fileobj.write(data)
+ self.hasher.update(data)
+
+ self.length += length
+
+ return length
+
+ def read(self, size=-1):
+ raise OSError(errno.EBADF, "read() on write-only object")
+
+ def read1(self, size=-1):
+ raise OSError(errno.EBADF, "read1() on write-only object")
+
+ def peek(self, n):
+ raise OSError(errno.EBADF, "peek() on write-only object")
+
+ @property
+ def closed(self):
+ return self.fileobj is None
+
+ def close(self):
+ fileobj = self.fileobj
+ if fileobj is None:
+ return
+ self.fileobj.close()
+ self.fileobj = None
+
+ def flush(self):
+ self.fileobj.flush()
+
+ def fileno(self):
+ return self.fileobj.fileno()
+
+ def rewind(self):
+ raise OSError("Can't rewind while computing checksum")
+
+ def readable(self):
+ return False
+
+ def writable(self):
+ return True
+
+ def seekable(self):
+ return True
+
+ def tell(self):
+ return self.fileobj.tell()
+
+ def seek(self, offset, whence=io.SEEK_SET):
+ # In principle forward seek is possible with b"0" padding,
+ # but this is not implemented.
+ if offset == 0 and whence == io.SEEK_CUR:
+ return
+ raise OSError("Can't seek while computing checksum")
+
+ def readline(self, size=-1):
+ raise OSError(errno.EBADF, "readline() on write-only object")
+
+
+@contextmanager
+def gzip_compressed_tarfile(path):
+ """Create a reproducible, gzip compressed tarfile, and keep track of shasums of both the
+ compressed and uncompressed tarfile. Reproduciblity is achived by normalizing the gzip header
+ (no file name and zero mtime).
+
+ Yields a tuple of the following:
+ tarfile.TarFile: tarfile object
+ ChecksumWriter: checksum of the gzip compressed tarfile
+ ChecksumWriter: checksum of the uncompressed tarfile
+ """
+ # Create gzip compressed tarball of the install prefix
+ # 1) Use explicit empty filename and mtime 0 for gzip header reproducibility.
+ # If the filename="" is dropped, Python will use fileobj.name instead.
+ # This should effectively mimick `gzip --no-name`.
+ # 2) On AMD Ryzen 3700X and an SSD disk, we have the following on compression speed:
+ # compresslevel=6 gzip default: llvm takes 4mins, roughly 2.1GB
+ # compresslevel=9 python default: llvm takes 12mins, roughly 2.1GB
+ # So we follow gzip.
+ with open(path, "wb") as f, ChecksumWriter(f) as gzip_checksum, closing(
+ GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=gzip_checksum)
+ ) as gzip_file, ChecksumWriter(gzip_file) as tarfile_checksum, tarfile.TarFile(
+ name="", mode="w", fileobj=tarfile_checksum
+ ) as tar:
+ yield tar, gzip_checksum, tarfile_checksum
+
+
+def default_path_to_name(path: str) -> str:
+ """Converts a path to a tarfile name, which uses posix path separators."""
+ p = pathlib.PurePath(path)
+ # Drop the leading slash on posix and the drive letter on windows, and always format as a
+ # posix path.
+ return pathlib.PurePath(*p.parts[1:]).as_posix() if p.is_absolute() else p.as_posix()
+
+
+def reproducible_tarfile_from_prefix(
+ tar: tarfile.TarFile,
+ prefix: str,
+ *,
+ include_parent_directories: bool = False,
+ skip: Callable[[os.DirEntry], bool] = lambda entry: False,
+ path_to_name: Callable[[str], str] = default_path_to_name,
+) -> None:
+ """Create a tarball from a given directory. Only adds regular files, symlinks and dirs.
+ Skips devices, fifos. Preserves hardlinks. Normalizes permissions like git. Tar entries are
+ added in depth-first pre-order, with dir entries partitioned by file | dir, and sorted
+ lexicographically, for reproducibility. Partitioning ensures only one dir is in memory at a
+ time, and sorting improves compression.
+
+ Args:
+ tar: tarfile object opened in write mode
+ prefix: path to directory to tar (either absolute or relative)
+ include_parent_directories: whether to include every directory leading up to ``prefix`` in
+ the tarball
+ skip: function that receives a DirEntry and returns True if the entry should be skipped,
+ whether it is a file or directory. Default implementation does not skip anything.
+ path_to_name: function that converts a path string to a tarfile entry name, which should be
+ in posix format. Not only is it necessary to transform paths in certain cases, such as
+ windows path to posix format, but it can also be used to prepend a directory to each
+ entry even if it does not exist on the filesystem. The default implementation drops the
+ leading slash on posix and the drive letter on windows for absolute paths, and formats
+ as a posix."""
+
+ hardlink_to_tarinfo_name: Dict[Tuple[int, int], str] = dict()
+
+ if include_parent_directories:
+ parent_dirs = reversed(pathlib.Path(prefix).parents)
+ next(parent_dirs) # skip the root: slices are supported from python 3.10
+ for parent_dir in parent_dirs:
+ dir_info = tarfile.TarInfo(path_to_name(str(parent_dir)))
+ dir_info.type = tarfile.DIRTYPE
+ dir_info.mode = 0o755
+ tar.addfile(dir_info)
+
+ dir_stack = [prefix]
+ while dir_stack:
+ dir = dir_stack.pop()
+
+ # Add the dir before its contents
+ dir_info = tarfile.TarInfo(path_to_name(dir))
+ dir_info.type = tarfile.DIRTYPE
+ dir_info.mode = 0o755
+ tar.addfile(dir_info)
+
+ # Sort by name: reproducible & improves compression
+ with os.scandir(dir) as it:
+ entries = sorted(it, key=lambda entry: entry.name)
+
+ new_dirs = []
+ for entry in entries:
+ if skip(entry):
+ continue
+
+ if entry.is_dir(follow_symlinks=False):
+ new_dirs.append(entry.path)
+ continue
+
+ file_info = tarfile.TarInfo(path_to_name(entry.path))
+
+ if entry.is_symlink():
+ file_info.type = tarfile.SYMTYPE
+ file_info.linkname = readlink(entry.path)
+ # According to POSIX: "the value of the file mode bits returned in the
+ # st_mode field of the stat structure is unspecified." So we set it to
+ # something sensible without lstat'ing the link.
+ file_info.mode = 0o755
+ tar.addfile(file_info)
+
+ elif entry.is_file(follow_symlinks=False):
+ # entry.stat has zero (st_ino, st_dev, st_nlink) on Windows: use lstat.
+ s = os.lstat(entry.path)
+
+ # Normalize permissions like git
+ file_info.mode = 0o755 if s.st_mode & 0o100 else 0o644
+
+ # Deduplicate hardlinks
+ if s.st_nlink > 1:
+ ident = (s.st_dev, s.st_ino)
+ if ident in hardlink_to_tarinfo_name:
+ file_info.type = tarfile.LNKTYPE
+ file_info.linkname = hardlink_to_tarinfo_name[ident]
+ tar.addfile(file_info)
+ continue
+ hardlink_to_tarinfo_name[ident] = file_info.name
+
+ # If file not yet seen, copy it
+ file_info.type = tarfile.REGTYPE
+ file_info.size = s.st_size
+
+ with open(entry.path, "rb") as f:
+ tar.addfile(file_info, f)
+
+ dir_stack.extend(reversed(new_dirs)) # we pop, so reverse to stay alphabetical
diff --git a/lib/spack/spack/util/classes.py b/lib/spack/spack/util/classes.py
deleted file mode 100644
index 5e0b373ef8..0000000000
--- a/lib/spack/spack/util/classes.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2013-2024 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 llnl.util.tty as tty
-from llnl.util.lang import list_modules, memoized
-
-from spack.util.naming import mod_to_class
-
-__all__ = ["list_classes"]
-
-
-@memoized
-def list_classes(parent_module, mod_path):
- """Given a parent path (e.g., spack.platforms or spack.analyzers),
- use list_modules to derive the module names, and then mod_to_class
- to derive class names. Import the classes and return them in a list
- """
- classes = []
-
- for name in list_modules(mod_path):
- mod_name = "%s.%s" % (parent_module, name)
- class_name = mod_to_class(name)
- mod = __import__(mod_name, fromlist=[class_name])
- if not hasattr(mod, class_name):
- tty.die("No class %s defined in %s" % (class_name, mod_name))
- cls = getattr(mod, class_name)
- if not inspect.isclass(cls):
- tty.die("%s.%s is not a class" % (mod_name, class_name))
-
- classes.append(cls)
-
- return classes
diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py
index 1e66b3e205..08edc1949a 100644
--- a/lib/spack/spack/util/compression.py
+++ b/lib/spack/spack/util/compression.py
@@ -3,12 +3,13 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import errno
import inspect
import io
import os
-import re
import shutil
import sys
+from typing import Any, BinaryIO, Callable, Dict, List, Optional
import llnl.url
from llnl.util import tty
@@ -19,42 +20,29 @@ from spack.util.executable import CommandNotFoundError, which
try:
import bz2 # noqa
- _bz2_support = True
+ BZ2_SUPPORTED = True
except ImportError:
- _bz2_support = False
+ BZ2_SUPPORTED = False
try:
import gzip # noqa
- _gzip_support = True
+ GZIP_SUPPORTED = True
except ImportError:
- _gzip_support = False
+ GZIP_SUPPORTED = False
try:
import lzma # noqa # novermin
- _lzma_support = True
+ LZMA_SUPPORTED = True
except ImportError:
- _lzma_support = False
+ LZMA_SUPPORTED = False
-def is_lzma_supported():
- return _lzma_support
-
-
-def is_gzip_supported():
- return _gzip_support
-
-
-def is_bz2_supported():
- return _bz2_support
-
-
-def _system_untar(archive_file, remove_archive_file=False):
- """Returns path to unarchived tar file.
- Untars archive via system tar.
+def _system_untar(archive_file: str, remove_archive_file: bool = False) -> str:
+ """Returns path to unarchived tar file. Untars archive via system tar.
Args:
archive_file (str): absolute path to the archive to be extracted.
@@ -69,6 +57,11 @@ def _system_untar(archive_file, remove_archive_file=False):
archive_file = archive_file_no_ext + "-input"
shutil.move(archive_file_no_ext, archive_file)
tar = which("tar", required=True)
+ # GNU tar's --no-same-owner is not as portable, -o works for BSD tar too. This flag is relevant
+ # when extracting archives as root, where tar attempts to set original ownership of files. This
+ # is redundant when distributing tarballs, as the tarballs are created on different systems
+ # than where they are extracted. In certain cases like rootless containers, setting original
+ # ownership is known to fail, so we need to disable it.
tar.add_default_arg("-oxf")
tar(archive_file)
if remove_archive_file:
@@ -79,21 +72,21 @@ def _system_untar(archive_file, remove_archive_file=False):
return outfile
-def _bunzip2(archive_file):
+def _bunzip2(archive_file: str) -> str:
"""Returns path to decompressed file.
Uses Python's bz2 module to decompress bz2 compressed archives
Fall back to system utility failing to find Python module `bz2`
Args:
- archive_file (str): absolute path to the bz2 archive to be decompressed
+ archive_file: absolute path to the bz2 archive to be decompressed
"""
- if is_bz2_supported():
+ if BZ2_SUPPORTED:
return _py_bunzip(archive_file)
else:
return _system_bunzip(archive_file)
-def _py_bunzip(archive_file):
+def _py_bunzip(archive_file: str) -> str:
"""Returns path to decompressed file.
Decompresses bz2 compressed archives/files via python's bz2 module"""
decompressed_file = os.path.basename(llnl.url.strip_compression_extension(archive_file, "bz2"))
@@ -106,7 +99,7 @@ def _py_bunzip(archive_file):
return archive_out
-def _system_bunzip(archive_file):
+def _system_bunzip(archive_file: str) -> str:
"""Returns path to decompressed file.
Decompresses bz2 compressed archives/files via system bzip2 utility"""
compressed_file_name = os.path.basename(archive_file)
@@ -121,25 +114,20 @@ def _system_bunzip(archive_file):
return archive_out
-def _gunzip(archive_file):
- """Returns path to gunzip'd file
- Decompresses `.gz` extensions. Prefer native Python `gzip` module.
- Failing back to system utility gunzip.
- Like gunzip, but extracts in the current working directory
- instead of in-place.
+def _gunzip(archive_file: str) -> str:
+ """Returns path to gunzip'd file. Decompresses `.gz` extensions. Prefer native Python
+ `gzip` module. Falling back to system utility gunzip. Like gunzip, but extracts in the current
+ working directory instead of in-place.
Args:
- archive_file (str): absolute path of the file to be decompressed
+ archive_file: absolute path of the file to be decompressed
"""
- if is_gzip_supported():
- return _py_gunzip(archive_file)
- else:
- return _system_gunzip(archive_file)
+ return _py_gunzip(archive_file) if GZIP_SUPPORTED else _system_gunzip(archive_file)
-def _py_gunzip(archive_file):
- """Returns path to gunzip'd file
- Decompresses `.gz` compressed archvies via python gzip module"""
+def _py_gunzip(archive_file: str) -> str:
+ """Returns path to gunzip'd file. Decompresses `.gz` compressed archvies via python gzip
+ module"""
decompressed_file = os.path.basename(llnl.url.strip_compression_extension(archive_file, "gz"))
working_dir = os.getcwd()
destination_abspath = os.path.join(working_dir, decompressed_file)
@@ -150,9 +138,8 @@ def _py_gunzip(archive_file):
return destination_abspath
-def _system_gunzip(archive_file):
- """Returns path to gunzip'd file
- Decompresses `.gz` compressed files via system gzip"""
+def _system_gunzip(archive_file: str) -> str:
+ """Returns path to gunzip'd file. Decompresses `.gz` compressed files via system gzip"""
archive_file_no_ext = llnl.url.strip_compression_extension(archive_file)
if archive_file_no_ext == archive_file:
# the zip file has no extension. On Unix gunzip cannot unzip onto itself
@@ -170,50 +157,42 @@ def _system_gunzip(archive_file):
return destination_abspath
-def _unzip(archive_file):
- """Returns path to extracted zip archive
- Extract Zipfile, searching for unzip system executable
- If unavailable, search for 'tar' executable on system and use instead
+def _do_nothing(archive_file: str) -> None:
+ return None
+
+
+def _unzip(archive_file: str) -> str:
+ """Returns path to extracted zip archive. Extract Zipfile, searching for unzip system
+ executable. If unavailable, search for 'tar' executable on system and use instead.
Args:
- archive_file (str): absolute path of the file to be decompressed
+ archive_file: absolute path of the file to be decompressed
"""
- extracted_file = os.path.basename(llnl.url.strip_extension(archive_file, extension="zip"))
if sys.platform == "win32":
return _system_untar(archive_file)
- else:
- exe = "unzip"
- arg = "-q"
- unzip = which(exe, required=True)
- unzip.add_default_arg(arg)
- unzip(archive_file)
- return extracted_file
+ unzip = which("unzip", required=True)
+ unzip.add_default_arg("-q")
+ unzip(archive_file)
+ return os.path.basename(llnl.url.strip_extension(archive_file, extension="zip"))
-def _system_unZ(archive_file):
+def _system_unZ(archive_file: str) -> str:
"""Returns path to decompressed file
Decompress UNIX compress style compression
Utilizes gunzip on unix and 7zip on Windows
"""
if sys.platform == "win32":
- result = _system_7zip(archive_file)
- else:
- result = _system_gunzip(archive_file)
- return result
+ return _system_7zip(archive_file)
+ return _system_gunzip(archive_file)
def _lzma_decomp(archive_file):
- """Returns path to decompressed xz file.
- Decompress lzma compressed files. Prefer Python native
- lzma module, but fall back on command line xz tooling
- to find available Python support."""
- if is_lzma_supported():
- return _py_lzma(archive_file)
- else:
- return _xz(archive_file)
+ """Returns path to decompressed xz file. Decompress lzma compressed files. Prefer Python native
+ lzma module, but fall back on command line xz tooling to find available Python support."""
+ return _py_lzma(archive_file) if LZMA_SUPPORTED else _xz(archive_file)
-def _win_compressed_tarball_handler(decompressor):
+def _win_compressed_tarball_handler(decompressor: Callable[[str], str]) -> Callable[[str], str]:
"""Returns function pointer to two stage decompression
and extraction method
Decompress and extract compressed tarballs on Windows.
@@ -227,7 +206,7 @@ def _win_compressed_tarball_handler(decompressor):
can be installed manually or via spack
"""
- def unarchive(archive_file):
+ def unarchive(archive_file: str):
# perform intermediate extraction step
# record name of new archive so we can extract
decomped_tarball = decompressor(archive_file)
@@ -238,9 +217,9 @@ def _win_compressed_tarball_handler(decompressor):
return unarchive
-def _py_lzma(archive_file):
- """Returns path to decompressed .xz files
- Decompress lzma compressed .xz files via python lzma module"""
+def _py_lzma(archive_file: str) -> str:
+ """Returns path to decompressed .xz files. Decompress lzma compressed .xz files via Python
+ lzma module."""
decompressed_file = os.path.basename(llnl.url.strip_compression_extension(archive_file, "xz"))
archive_out = os.path.join(os.getcwd(), decompressed_file)
with open(archive_out, "wb") as ar:
@@ -250,10 +229,8 @@ def _py_lzma(archive_file):
def _xz(archive_file):
- """Returns path to decompressed xz files
- Decompress lzma compressed .xz files via xz command line
- tool.
- """
+ """Returns path to decompressed xz files. Decompress lzma compressed .xz files via xz command
+ line tool."""
decompressed_file = os.path.basename(llnl.url.strip_extension(archive_file, extension="xz"))
working_dir = os.getcwd()
destination_abspath = os.path.join(working_dir, decompressed_file)
@@ -292,19 +269,17 @@ unable to extract %s files. 7z can be installed via Spack"
return outfile
-def decompressor_for(path, extension=None):
+def decompressor_for(path: str, extension: Optional[str] = None):
"""Returns appropriate decompression/extraction algorithm function pointer
for provided extension. If extension is none, it is computed
from the `path` and the decompression function is derived
from that information."""
if not extension:
- extension = extension_from_file(path, decompress=True)
+ extension = extension_from_magic_numbers(path, decompress=True)
- if not llnl.url.allowed_archive(extension):
+ if not extension or not llnl.url.allowed_archive(extension):
raise CommandNotFoundError(
- "Cannot extract archive, \
-unrecognized file extension: '%s'"
- % extension
+ f"Cannot extract {path}, unrecognized file extension: '{extension}'"
)
if sys.platform == "win32":
return decompressor_for_win(extension)
@@ -312,58 +287,38 @@ unrecognized file extension: '%s'"
return decompressor_for_nix(extension)
-def decompressor_for_nix(extension):
- """Returns a function pointer to appropriate decompression
- algorithm based on extension type and unix specific considerations
- i.e. a reasonable expectation system utils like gzip, bzip2, and xz are
- available
+def decompressor_for_nix(extension: str) -> Callable[[str], Any]:
+ """Returns a function pointer to appropriate decompression algorithm based on extension type
+ and unix specific considerations i.e. a reasonable expectation system utils like gzip, bzip2,
+ and xz are available
Args:
- path (str): path of the archive file requiring decompression
+ extension: path of the archive file requiring decompression
"""
- if re.match(r"zip$", extension):
- return _unzip
-
- if re.match(r"gz$", extension):
- return _gunzip
-
- if re.match(r"bz2$", extension):
- return _bunzip2
-
- # Python does not have native support
- # of any kind for .Z files. In these cases,
- # we rely on external tools such as tar,
- # 7z, or uncompressZ
- if re.match(r"Z$", extension):
- return _system_unZ
+ extension_to_decompressor: Dict[str, Callable[[str], Any]] = {
+ "zip": _unzip,
+ "gz": _gunzip,
+ "bz2": _bunzip2,
+ "Z": _system_unZ, # no builtin support for .Z files
+ "xz": _lzma_decomp,
+ "whl": _do_nothing,
+ }
- # Python and platform may not have support for lzma
- # compression. If no lzma support, use tools available on systems
- if re.match(r"xz$", extension):
- return _lzma_decomp
+ return extension_to_decompressor.get(extension, _system_untar)
- return _system_untar
-
-def _determine_py_decomp_archive_strategy(extension):
+def _determine_py_decomp_archive_strategy(extension: str) -> Optional[Callable[[str], Any]]:
"""Returns appropriate python based decompression strategy
based on extension type"""
- # Only rely on Python decompression support for gz
- if re.match(r"gz$", extension):
- return _py_gunzip
-
- # Only rely on Python decompression support for bzip2
- if re.match(r"bz2$", extension):
- return _py_bunzip
-
- # Only rely on Python decompression support for xz
- if re.match(r"xz$", extension):
- return _py_lzma
-
- return None
+ extension_to_decompressor: Dict[str, Callable[[str], str]] = {
+ "gz": _py_gunzip,
+ "bz2": _py_bunzip,
+ "xz": _py_lzma,
+ }
+ return extension_to_decompressor.get(extension, None)
-def decompressor_for_win(extension):
+def decompressor_for_win(extension: str) -> Callable[[str], Any]:
"""Returns a function pointer to appropriate decompression
algorithm based on extension type and Windows specific considerations
@@ -371,34 +326,33 @@ def decompressor_for_win(extension):
So we must rely exclusively on Python module support for all compression
operations, tar for tarballs and zip files, and 7zip for Z compressed archives
and files as Python does not provide support for the UNIX compress algorithm
-
- Args:
- path (str): path of the archive file requiring decompression
- extension (str): extension
"""
extension = llnl.url.expand_contracted_extension(extension)
- # Windows native tar can handle .zip extensions, use standard
- # unzip method
- if re.match(r"zip$", extension):
- return _unzip
-
- # if extension is standard tarball, invoke Windows native tar
- if re.match(r"tar$", extension):
- return _system_untar
-
- # Python does not have native support
- # of any kind for .Z files. In these cases,
- # we rely on 7zip, which must be installed outside
- # of spack and added to the PATH or externally detected
- if re.match(r"Z$", extension):
- return _system_unZ
-
- # Windows vendors no native decompression tools, attempt to derive
- # python based decompression strategy
- # Expand extension from contracted extension i.e. tar.gz from .tgz
- # no-op on non contracted extensions
+ extension_to_decompressor: Dict[str, Callable[[str], Any]] = {
+ # Windows native tar can handle .zip extensions, use standard unzip method
+ "zip": _unzip,
+ # if extension is standard tarball, invoke Windows native tar
+ "tar": _system_untar,
+ # Python does not have native support of any kind for .Z files. In these cases, we rely on
+ # 7zip, which must be installed outside of Spack and added to the PATH or externally
+ # detected
+ "Z": _system_unZ,
+ "xz": _lzma_decomp,
+ "whl": _do_nothing,
+ }
+
+ decompressor = extension_to_decompressor.get(extension)
+ if decompressor:
+ return decompressor
+
+ # Windows vendors no native decompression tools, attempt to derive Python based decompression
+ # strategy. Expand extension from abbreviated ones, i.e. tar.gz from .tgz
compression_extension = llnl.url.compression_ext_from_compressed_archive(extension)
- decompressor = _determine_py_decomp_archive_strategy(compression_extension)
+ decompressor = (
+ _determine_py_decomp_archive_strategy(compression_extension)
+ if compression_extension
+ else None
+ )
if not decompressor:
raise SpackError(
"Spack was unable to determine a proper decompression strategy for"
@@ -412,103 +366,75 @@ def decompressor_for_win(extension):
class FileTypeInterface:
- """
- Base interface class for describing and querying file type information.
- FileType describes information about a single file type
- such as extension, and byte header properties, and provides an interface
- to check a given file against said type based on magic number.
-
- This class should be subclassed each time a new type is to be
- described.
-
- Note: This class should not be used directly as it does not define any specific
- file. Attempts to directly use this class will fail, as it does not define
- a magic number or extension string.
-
- Subclasses should each describe a different
- type of file. In order to do so, they must define
- the extension string, magic number, and header offset (if non zero).
- If a class has multiple magic numbers, it will need to
- override the method describin that file types magic numbers and
- the method that checks a types magic numbers against a given file's.
- """
+ """Base interface class for describing and querying file type information. FileType describes
+ information about a single file type such as typical extension and byte header properties,
+ and provides an interface to check a given file against said type based on magic number.
- OFFSET = 0
- compressed = False
+ This class should be subclassed each time a new type is to be described.
- @staticmethod
- def name():
- raise NotImplementedError
+ Subclasses should each describe a different type of file. In order to do so, they must define
+ the extension string, magic number, and header offset (if non zero). If a class has multiple
+ magic numbers, it will need to override the method describing that file type's magic numbers
+ and the method that checks a types magic numbers against a given file's."""
+
+ OFFSET = 0
+ extension: str
+ name: str
@classmethod
- def magic_number(cls):
+ def magic_numbers(cls) -> List[bytes]:
"""Return a list of all potential magic numbers for a filetype"""
- return [x[1] for x in inspect.getmembers(cls) if x[0].startswith("_MAGIC_NUMBER")]
+ return [
+ value for name, value in inspect.getmembers(cls) if name.startswith("_MAGIC_NUMBER")
+ ]
@classmethod
- def header_size(cls):
+ def header_size(cls) -> int:
"""Return size of largest magic number associated with file type"""
- return max([len(x) for x in cls.magic_number()])
+ return max(len(x) for x in cls.magic_numbers())
- @classmethod
- def _bytes_check(cls, magic_bytes):
- for magic in cls.magic_number():
- if magic_bytes.startswith(magic):
- return True
- return False
-
- @classmethod
- def is_file_of_type(cls, iostream):
- """Query byte stream for appropriate magic number
+ def matches_magic(self, stream: BinaryIO) -> bool:
+ """Returns true if the stream matches the current file type by any of its magic numbers.
+ Resets stream to original position.
Args:
- iostream: file byte stream
-
- Returns:
- Bool denoting whether file is of class file type
- based on magic number
+ stream: file byte stream
"""
- if not iostream:
- return False
# move to location of magic bytes
- iostream.seek(cls.OFFSET)
- magic_bytes = iostream.read(cls.header_size())
- # return to beginning of file
- iostream.seek(0)
- if cls._bytes_check(magic_bytes):
- return True
- return False
+ offset = stream.tell()
+ stream.seek(self.OFFSET)
+ magic_bytes = stream.read(self.header_size())
+ stream.seek(offset)
+ return any(magic_bytes.startswith(magic) for magic in self.magic_numbers())
class CompressedFileTypeInterface(FileTypeInterface):
"""Interface class for FileTypes that include compression information"""
- compressed = True
+ def peek(self, stream: BinaryIO, num_bytes: int) -> Optional[io.BytesIO]:
+ """This method returns the first num_bytes of a decompressed stream. Returns None if no
+ builtin support for decompression."""
+ return None
+
- @staticmethod
- def decomp_in_memory(stream):
- """This method decompresses and loads the first 200 or so bytes of a compressed file
- to check for compressed archives. This does not decompress the entire file and should
- not be used for direct expansion of archives/compressed files
- """
- raise NotImplementedError("Implementation by compression subclass required")
+def _decompressed_peek(
+ decompressed_stream: io.BufferedIOBase, stream: BinaryIO, num_bytes: int
+) -> io.BytesIO:
+ # Read the first num_bytes of the decompressed stream, do not advance the stream position.
+ pos = stream.tell()
+ data = decompressed_stream.read(num_bytes)
+ stream.seek(pos)
+ return io.BytesIO(data)
class BZipFileType(CompressedFileTypeInterface):
_MAGIC_NUMBER = b"\x42\x5a\x68"
extension = "bz2"
+ name = "bzip2 compressed data"
- @staticmethod
- def name():
- return "bzip2 compressed data"
-
- @staticmethod
- def decomp_in_memory(stream):
- if is_bz2_supported():
- # checking for underlying archive, only decomp as many bytes
- # as is absolutely neccesary for largest archive header (tar)
- comp_stream = stream.read(TarFileType.OFFSET + TarFileType.header_size())
- return io.BytesIO(initial_bytes=bz2.BZ2Decompressor().decompress(comp_stream))
+ def peek(self, stream: BinaryIO, num_bytes: int) -> Optional[io.BytesIO]:
+ if BZ2_SUPPORTED:
+ return _decompressed_peek(bz2.BZ2File(stream), stream, num_bytes)
return None
@@ -516,57 +442,28 @@ class ZCompressedFileType(CompressedFileTypeInterface):
_MAGIC_NUMBER_LZW = b"\x1f\x9d"
_MAGIC_NUMBER_LZH = b"\x1f\xa0"
extension = "Z"
-
- @staticmethod
- def name():
- return "compress'd data"
-
- @staticmethod
- def decomp_in_memory(stream):
- # python has no method of decompressing `.Z` files in memory
- return None
+ name = "compress'd data"
class GZipFileType(CompressedFileTypeInterface):
_MAGIC_NUMBER = b"\x1f\x8b\x08"
extension = "gz"
+ name = "gzip compressed data"
- @staticmethod
- def name():
- return "gzip compressed data"
-
- @staticmethod
- def decomp_in_memory(stream):
- if is_gzip_supported():
- # checking for underlying archive, only decomp as many bytes
- # as is absolutely neccesary for largest archive header (tar)
- return io.BytesIO(
- initial_bytes=gzip.GzipFile(fileobj=stream).read(
- TarFileType.OFFSET + TarFileType.header_size()
- )
- )
+ def peek(self, stream: BinaryIO, num_bytes: int) -> Optional[io.BytesIO]:
+ if GZIP_SUPPORTED:
+ return _decompressed_peek(gzip.GzipFile(fileobj=stream), stream, num_bytes)
return None
class LzmaFileType(CompressedFileTypeInterface):
_MAGIC_NUMBER = b"\xfd7zXZ"
extension = "xz"
+ name = "xz compressed data"
- @staticmethod
- def name():
- return "xz compressed data"
-
- @staticmethod
- def decomp_in_memory(stream):
- if is_lzma_supported():
- # checking for underlying archive, only decomp as many bytes
- # as is absolutely neccesary for largest archive header (tar)
- max_size = TarFileType.OFFSET + TarFileType.header_size()
- return io.BytesIO(
- initial_bytes=lzma.LZMADecompressor().decompress(
- stream.read(max_size), max_length=max_size
- )
- )
+ def peek(self, stream: BinaryIO, num_bytes: int) -> Optional[io.BytesIO]:
+ if LZMA_SUPPORTED:
+ return _decompressed_peek(lzma.LZMAFile(stream), stream, num_bytes)
return None
@@ -575,111 +472,111 @@ class TarFileType(FileTypeInterface):
_MAGIC_NUMBER_GNU = b"ustar \0"
_MAGIC_NUMBER_POSIX = b"ustar\x0000"
extension = "tar"
-
- @staticmethod
- def name():
- return "tar archive"
+ name = "tar archive"
class ZipFleType(FileTypeInterface):
_MAGIC_NUMBER = b"PK\003\004"
extension = "zip"
+ name = "Zip archive data"
- @staticmethod
- def name():
- return "Zip archive data"
+#: Maximum number of bytes to read from a file to determine any archive type. Tar is the largest.
+MAX_BYTES_ARCHIVE_HEADER = TarFileType.OFFSET + TarFileType.header_size()
-# collection of valid Spack recognized archive and compression
-# file type identifier classes.
-VALID_FILETYPES = [
- BZipFileType,
- ZCompressedFileType,
- GZipFileType,
- LzmaFileType,
- TarFileType,
- ZipFleType,
+#: Collection of supported archive and compression file type identifier classes.
+SUPPORTED_FILETYPES: List[FileTypeInterface] = [
+ BZipFileType(),
+ ZCompressedFileType(),
+ GZipFileType(),
+ LzmaFileType(),
+ TarFileType(),
+ ZipFleType(),
]
-def extension_from_stream(stream, decompress=False):
- """Return extension represented by stream corresponding to archive file
- If stream does not represent an archive type recongized by Spack
- (see `spack.util.compression.ALLOWED_ARCHIVE_TYPES`) method will return None
+def _extension_of_compressed_file(
+ file_type: CompressedFileTypeInterface, stream: BinaryIO
+) -> Optional[str]:
+ """Retrieves the extension of a file after decompression from its magic numbers, if it can be
+ decompressed."""
+ # To classify the file we only need to decompress the first so many bytes.
+ decompressed_magic = file_type.peek(stream, MAX_BYTES_ARCHIVE_HEADER)
- Extension type is derived by searching for identifying bytes
- in file stream.
+ if not decompressed_magic:
+ return None
- Args:
- stream : stream representing a file on system
- decompress (bool) : if True, compressed files are checked
- for archive types beneath compression i.e. tar.gz
- default is False, otherwise, return top level type i.e. gz
+ return extension_from_magic_numbers_by_stream(decompressed_magic, decompress=False)
- Return:
- A string represting corresponding archive extension
- or None as relevant.
- """
- for arc_type in VALID_FILETYPES:
- if arc_type.is_file_of_type(stream):
- suffix_ext = arc_type.extension
- prefix_ext = ""
- if arc_type.compressed and decompress:
- # stream represents compressed file
- # get decompressed stream (if possible)
- decomp_stream = arc_type.decomp_in_memory(stream)
- prefix_ext = extension_from_stream(decomp_stream, decompress=decompress)
- if not prefix_ext:
- # We were unable to decompress or unable to derive
- # a nested extension from decompressed file.
- # Try to use filename parsing to check for
- # potential nested extensions if there are any
- tty.debug(
- "Cannot derive file extension from magic number;"
- " falling back to regex path parsing."
- )
- return llnl.url.extension_from_path(stream.name)
- resultant_ext = suffix_ext if not prefix_ext else ".".join([prefix_ext, suffix_ext])
- tty.debug("File extension %s successfully derived by magic number." % resultant_ext)
- return resultant_ext
+def extension_from_magic_numbers_by_stream(
+ stream: BinaryIO, decompress: bool = False
+) -> Optional[str]:
+ """Returns the typical extension for the opened file, without leading ``.``, based on its magic
+ numbers.
+
+ If the stream does not represent file type recongized by Spack (see
+ :py:data:`SUPPORTED_FILETYPES`), the method will return None
+
+ Args:
+ stream: stream representing a file on system
+ decompress: if True, compressed files are checked for archive types beneath compression.
+ For example tar.gz if True versus only gz if False."""
+ for file_type in SUPPORTED_FILETYPES:
+ if not file_type.matches_magic(stream):
+ continue
+ ext = file_type.extension
+ if decompress and isinstance(file_type, CompressedFileTypeInterface):
+ uncompressed_ext = _extension_of_compressed_file(file_type, stream)
+ if not uncompressed_ext:
+ tty.debug(
+ "Cannot derive file extension from magic number;"
+ " falling back to original file name."
+ )
+ return llnl.url.extension_from_path(stream.name)
+ ext = f"{uncompressed_ext}.{ext}"
+ tty.debug(f"File extension {ext} successfully derived by magic number.")
+ return ext
return None
-def extension_from_file(file, decompress=False):
- """Return extension from archive file path
- Extension is derived based on magic number parsing similar
- to the `file` utility. Attempts to return abbreviated file extensions
- whenever a file has an abbreviated extension such as `.tgz` or `.txz`.
- This distinction in abbreivated extension names is accomplished
- by string parsing.
+def _maybe_abbreviate_extension(path: str, extension: str) -> str:
+ """If the file is a compressed tar archive, return the abbreviated extension t[xz|gz|bz2|bz]
+ instead of tar.[xz|gz|bz2|bz] if the file's original name also has an abbreviated extension."""
+ if not extension.startswith("tar."):
+ return extension
+ abbr = f"t{extension[4:]}"
+ return abbr if llnl.url.has_extension(path, abbr) else extension
+
+
+def extension_from_magic_numbers(path: str, decompress: bool = False) -> Optional[str]:
+ """Return typical extension without leading ``.`` of a compressed file or archive at the given
+ path, based on its magic numbers, similar to the `file` utility. Notice that the extension
+ returned from this function may not coincide with the file's given extension.
Args:
- file (os.PathLike): path descibing file on system for which ext
- will be determined.
- decompress (bool): If True, method will peek into compressed
- files to check for archive file types. default is False.
- If false, method will be unable to distinguish `.tar.gz` from `.gz`
- or similar.
- Return:
- Spack recognized archive file extension as determined by file's magic number and
- file name. If file is not on system or is of an type not recognized by Spack as
- an archive or compression type, None is returned.
+ path: file to determine extension of
+ decompress: If True, method will peek into decompressed file to check for archive file
+ types. If False, the method will return only the top-level extension (for example
+ ``gz`` and not ``tar.gz``).
+ Returns:
+ Spack recognized archive file extension as determined by file's magic number and file name.
+ If file is not on system or is of a type not recognized by Spack as an archive or
+ compression type, None is returned. If the file is classified as a compressed tarball, the
+ extension is abbreviated (for instance ``tgz`` not ``tar.gz``) if that matches the file's
+ given extension.
"""
- if os.path.exists(file):
- with open(file, "rb") as f:
- ext = extension_from_stream(f, decompress)
- # based on magic number, file is compressed
- # tar archive. Check to see if file is abbreviated as
- # t[xz|gz|bz2|bz]
- if ext and ext.startswith("tar."):
- suf = ext.split(".")[1]
- abbr = "t" + suf
- if llnl.url.has_extension(file, abbr):
- return abbr
- if not ext:
- # If unable to parse extension from stream,
- # attempt to fall back to string parsing
- ext = llnl.url.extension_from_path(file)
- return ext
- return None
+ try:
+ with open(path, "rb") as f:
+ ext = extension_from_magic_numbers_by_stream(f, decompress)
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ return None
+ raise
+
+ # Return the extension derived from the magic number if possible.
+ if ext:
+ return _maybe_abbreviate_extension(path, ext)
+
+ # Otherwise, use the extension from the file name.
+ return llnl.url.extension_from_path(path)
diff --git a/lib/spack/spack/util/cpus.py b/lib/spack/spack/util/cpus.py
index 9c98656830..5cf09c3e82 100644
--- a/lib/spack/spack/util/cpus.py
+++ b/lib/spack/spack/util/cpus.py
@@ -5,9 +5,6 @@
import multiprocessing
import os
-from typing import Optional
-
-import spack.config
def cpus_available():
@@ -21,36 +18,3 @@ def cpus_available():
return len(os.sched_getaffinity(0)) # novermin
except Exception:
return multiprocessing.cpu_count()
-
-
-def determine_number_of_jobs(
- *,
- parallel: bool = False,
- max_cpus: int = cpus_available(),
- config: Optional["spack.config.Configuration"] = None,
-) -> int:
- """
- Packages that require sequential builds need 1 job. Otherwise we use the
- number of jobs set on the command line. If not set, then we use the config
- defaults (which is usually set through the builtin config scope), but we
- cap to the number of CPUs available to avoid oversubscription.
-
- Parameters:
- parallel: true when package supports parallel builds
- max_cpus: maximum number of CPUs to use (defaults to cpus_available())
- config: configuration object (defaults to global config)
- """
- if not parallel:
- return 1
-
- cfg = config or spack.config.CONFIG
-
- # Command line overrides all
- try:
- command_line = cfg.get("config:build_jobs", default=None, scope="command_line")
- if command_line is not None:
- return command_line
- except ValueError:
- pass
-
- return min(max_cpus, cfg.get("config:build_jobs", 16))
diff --git a/lib/spack/spack/util/elf.py b/lib/spack/spack/util/elf.py
index d04d7ca16c..86a4e141c0 100644
--- a/lib/spack/spack/util/elf.py
+++ b/lib/spack/spack/util/elf.py
@@ -6,53 +6,59 @@
import bisect
import re
import struct
-from collections import namedtuple
from struct import calcsize, unpack, unpack_from
-
-ElfHeader = namedtuple(
- "ElfHeader",
- [
- "e_type",
- "e_machine",
- "e_version",
- "e_entry",
- "e_phoff",
- "e_shoff",
- "e_flags",
- "e_ehsize",
- "e_phentsize",
- "e_phnum",
- "e_shentsize",
- "e_shnum",
- "e_shstrndx",
- ],
-)
-
-SectionHeader = namedtuple(
- "SectionHeader",
- [
- "sh_name",
- "sh_type",
- "sh_flags",
- "sh_addr",
- "sh_offset",
- "sh_size",
- "sh_link",
- "sh_info",
- "sh_addralign",
- "sh_entsize",
- ],
-)
-
-ProgramHeader32 = namedtuple(
- "ProgramHeader32",
- ["p_type", "p_offset", "p_vaddr", "p_paddr", "p_filesz", "p_memsz", "p_flags", "p_align"],
-)
-
-ProgramHeader64 = namedtuple(
- "ProgramHeader64",
- ["p_type", "p_flags", "p_offset", "p_vaddr", "p_paddr", "p_filesz", "p_memsz", "p_align"],
-)
+from typing import BinaryIO, Callable, Dict, List, NamedTuple, Optional, Pattern, Tuple
+
+
+class ElfHeader(NamedTuple):
+ e_type: int
+ e_machine: int
+ e_version: int
+ e_entry: int
+ e_phoff: int
+ e_shoff: int
+ e_flags: int
+ e_ehsize: int
+ e_phentsize: int
+ e_phnum: int
+ e_shentsize: int
+ e_shnum: int
+ e_shstrndx: int
+
+
+class SectionHeader(NamedTuple):
+ sh_name: int
+ sh_type: int
+ sh_flags: int
+ sh_addr: int
+ sh_offset: int
+ sh_size: int
+ sh_link: int
+ sh_info: int
+ sh_addralign: int
+ sh_entsize: int
+
+
+class ProgramHeader32(NamedTuple):
+ p_type: int
+ p_offset: int
+ p_vaddr: int
+ p_paddr: int
+ p_filesz: int
+ p_memsz: int
+ p_flags: int
+ p_align: int
+
+
+class ProgramHeader64(NamedTuple):
+ p_type: int
+ p_flags: int
+ p_offset: int
+ p_vaddr: int
+ p_paddr: int
+ p_filesz: int
+ p_memsz: int
+ p_align: int
class ELF_CONSTANTS:
@@ -78,6 +84,31 @@ class ELF_CONSTANTS:
class ElfFile:
"""Parsed ELF file."""
+ is_64_bit: bool
+ is_little_endian: bool
+ byte_order: str
+ elf_hdr: ElfHeader
+ pt_load: List[Tuple[int, int]]
+ has_pt_interp: bool
+ pt_interp_p_offset: int
+ pt_interp_p_filesz: int
+ pt_interp_str: bytes
+ has_pt_dynamic: bool
+ pt_dynamic_p_offset: int
+ pt_dynamic_p_filesz: int
+ pt_dynamic_strtab_offset: int
+ has_rpath: bool
+ dt_rpath_offset: int
+ dt_rpath_str: bytes
+ rpath_strtab_offset: int
+ is_runpath: bool
+ has_needed: bool
+ dt_needed_strtab_offsets: List[int]
+ dt_needed_strs: List[bytes]
+ has_soname: bool
+ dt_soname_strtab_offset: int
+ dt_soname_str: bytes
+
__slots__ = [
"is_64_bit",
"is_little_endian",
@@ -120,13 +151,13 @@ class ElfFile:
self.has_pt_interp = False
-def parse_c_string(byte_string, start=0):
+def parse_c_string(byte_string: bytes, start: int = 0) -> bytes:
"""
Retrieve a C-string at a given offset in a byte string
Arguments:
- byte_string (bytes): String
- start (int): Offset into the string
+ byte_string: String
+ start: Offset into the string
Returns:
bytes: A copy of the C-string excluding the terminating null byte
@@ -137,15 +168,15 @@ def parse_c_string(byte_string, start=0):
return byte_string[start:str_end]
-def read_exactly(f, num_bytes, msg):
+def read_exactly(f: BinaryIO, num_bytes: int, msg: str) -> bytes:
"""
Read exactly num_bytes at the current offset, otherwise raise
a parsing error with the given error message.
Arguments:
f: file handle
- num_bytes (int): Number of bytes to read
- msg (str): Error to show when bytes cannot be read
+ num_bytes: Number of bytes to read
+ msg: Error to show when bytes cannot be read
Returns:
bytes: the ``num_bytes`` bytes that were read.
@@ -156,19 +187,18 @@ def read_exactly(f, num_bytes, msg):
return data
-def parse_program_headers(f, elf):
+def parse_program_headers(f: BinaryIO, elf: ElfFile) -> None:
"""
Parse program headers
Arguments:
f: file handle
- elf (ElfFile): ELF file parser data
+ elf: ELF file parser data
"""
# Forward to the program header
f.seek(elf.elf_hdr.e_phoff)
# Here we have to make a mapping from virtual address to offset in the file.
- ProgramHeader = ProgramHeader64 if elf.is_64_bit else ProgramHeader32
ph_fmt = elf.byte_order + ("LLQQQQQQ" if elf.is_64_bit else "LLLLLLLL")
ph_size = calcsize(ph_fmt)
ph_num = elf.elf_hdr.e_phnum
@@ -176,28 +206,31 @@ def parse_program_headers(f, elf):
# Read all program headers in one go
data = read_exactly(f, ph_num * ph_size, "Malformed program header")
+ ProgramHeader = ProgramHeader64 if elf.is_64_bit else ProgramHeader32
+
for i in range(ph_num):
- ph = ProgramHeader._make(unpack_from(ph_fmt, data, i * ph_size))
+ # mypy currently does not understand the union of two named tuples with equal fields
+ ph = ProgramHeader(*unpack_from(ph_fmt, data, i * ph_size))
# Skip segments of size 0; we don't distinguish between missing segment and
# empty segments. I've see an empty PT_DYNAMIC section for an ELF file that
# contained debug data.
- if ph.p_filesz == 0:
+ if ph.p_filesz == 0: # type: ignore
continue
# For PT_LOAD entries: Save offsets and virtual addrs of the loaded ELF segments
# This way we can map offsets by virtual address to offsets in the file.
- if ph.p_type == ELF_CONSTANTS.PT_LOAD:
- elf.pt_load.append((ph.p_offset, ph.p_vaddr))
+ if ph.p_type == ELF_CONSTANTS.PT_LOAD: # type: ignore
+ elf.pt_load.append((ph.p_offset, ph.p_vaddr)) # type: ignore
- elif ph.p_type == ELF_CONSTANTS.PT_INTERP:
- elf.pt_interp_p_offset = ph.p_offset
- elf.pt_interp_p_filesz = ph.p_filesz
+ elif ph.p_type == ELF_CONSTANTS.PT_INTERP: # type: ignore
+ elf.pt_interp_p_offset = ph.p_offset # type: ignore
+ elf.pt_interp_p_filesz = ph.p_filesz # type: ignore
elf.has_pt_interp = True
- elif ph.p_type == ELF_CONSTANTS.PT_DYNAMIC:
- elf.pt_dynamic_p_offset = ph.p_offset
- elf.pt_dynamic_p_filesz = ph.p_filesz
+ elif ph.p_type == ELF_CONSTANTS.PT_DYNAMIC: # type: ignore
+ elf.pt_dynamic_p_offset = ph.p_offset # type: ignore
+ elf.pt_dynamic_p_filesz = ph.p_filesz # type: ignore
elf.has_pt_dynamic = True
# The linker sorts PT_LOAD segments by vaddr, but let's do it just to be sure, since
@@ -205,27 +238,27 @@ def parse_program_headers(f, elf):
elf.pt_load.sort(key=lambda x: x[1])
-def parse_pt_interp(f, elf):
+def parse_pt_interp(f: BinaryIO, elf: ElfFile) -> None:
"""
Parse the interpreter (i.e. absolute path to the dynamic linker)
Arguments:
f: file handle
- elf (ElfFile): ELF file parser data
+ elf: ELF file parser data
"""
f.seek(elf.pt_interp_p_offset)
data = read_exactly(f, elf.pt_interp_p_filesz, "Malformed PT_INTERP entry")
elf.pt_interp_str = parse_c_string(data)
-def find_strtab_size_at_offset(f, elf, offset):
+def find_strtab_size_at_offset(f: BinaryIO, elf: ElfFile, offset: int) -> int:
"""
Retrieve the size of a string table section at a particular known offset
Arguments:
f: file handle
- elf (ElfFile): ELF file parser data
- offset (int): offset of the section in the file (i.e. ``sh_offset``)
+ elf: ELF file parser data
+ offset: offset of the section in the file (i.e. ``sh_offset``)
Returns:
int: the size of the string table in bytes
@@ -235,50 +268,49 @@ def find_strtab_size_at_offset(f, elf, offset):
f.seek(elf.elf_hdr.e_shoff)
for _ in range(elf.elf_hdr.e_shnum):
data = read_exactly(f, section_hdr_size, "Malformed section header")
- sh = SectionHeader._make(unpack(section_hdr_fmt, data))
+ sh = SectionHeader(*unpack(section_hdr_fmt, data))
if sh.sh_type == ELF_CONSTANTS.SHT_STRTAB and sh.sh_offset == offset:
return sh.sh_size
raise ElfParsingError("Could not determine strtab size")
-def retrieve_strtab(f, elf, offset):
+def retrieve_strtab(f: BinaryIO, elf: ElfFile, offset: int) -> bytes:
"""
Read a full string table at the given offset, which
requires looking it up in the section headers.
Arguments:
- elf (ElfFile): ELF file parser data
- vaddr (int): virtual address
+ elf: ELF file parser data
+ vaddr: virtual address
- Returns:
- bytes: file offset
+ Returns: file offset
"""
size = find_strtab_size_at_offset(f, elf, offset)
f.seek(offset)
return read_exactly(f, size, "Could not read string table")
-def vaddr_to_offset(elf, vaddr):
+def vaddr_to_offset(elf: ElfFile, vaddr: int) -> int:
"""
Given a virtual address, find the corresponding offset in the ELF file itself.
Arguments:
- elf (ElfFile): ELF file parser data
- vaddr (int): virtual address
+ elf: ELF file parser data
+ vaddr: virtual address
"""
idx = bisect.bisect_right([p_vaddr for (p_offset, p_vaddr) in elf.pt_load], vaddr) - 1
p_offset, p_vaddr = elf.pt_load[idx]
return p_offset - p_vaddr + vaddr
-def parse_pt_dynamic(f, elf):
+def parse_pt_dynamic(f: BinaryIO, elf: ElfFile) -> None:
"""
Parse the dynamic section of an ELF file
Arguments:
f: file handle
- elf (ElfFile): ELF file parse data
+ elf: ELF file parse data
"""
dynamic_array_fmt = elf.byte_order + ("qQ" if elf.is_64_bit else "lL")
dynamic_array_size = calcsize(dynamic_array_fmt)
@@ -347,7 +379,7 @@ def parse_pt_dynamic(f, elf):
elf.dt_rpath_str = parse_c_string(string_table, elf.rpath_strtab_offset)
-def parse_header(f, elf):
+def parse_header(f: BinaryIO, elf: ElfFile) -> None:
# Read the 32/64 bit class independent part of the header and validate
e_ident = f.read(16)
@@ -374,10 +406,12 @@ def parse_header(f, elf):
elf_header_fmt = elf.byte_order + ("HHLQQQLHHHHHH" if elf.is_64_bit else "HHLLLLLHHHHHH")
hdr_size = calcsize(elf_header_fmt)
data = read_exactly(f, hdr_size, "ELF header malformed")
- elf.elf_hdr = ElfHeader._make(unpack(elf_header_fmt, data))
+ elf.elf_hdr = ElfHeader(*unpack(elf_header_fmt, data))
-def _do_parse_elf(f, interpreter=True, dynamic_section=True, only_header=False):
+def _do_parse_elf(
+ f: BinaryIO, interpreter: bool = True, dynamic_section: bool = True, only_header: bool = False
+) -> ElfFile:
# We don't (yet?) allow parsing ELF files at a nonzero offset, we just
# jump to absolute offsets as they are specified in the ELF file.
if f.tell() != 0:
@@ -406,7 +440,12 @@ def _do_parse_elf(f, interpreter=True, dynamic_section=True, only_header=False):
return elf
-def parse_elf(f, interpreter=False, dynamic_section=False, only_header=False):
+def parse_elf(
+ f: BinaryIO,
+ interpreter: bool = False,
+ dynamic_section: bool = False,
+ only_header: bool = False,
+) -> ElfFile:
"""Given a file handle f for an ELF file opened in binary mode, return an ElfFile
object that is stores data about rpaths"""
try:
@@ -417,28 +456,55 @@ def parse_elf(f, interpreter=False, dynamic_section=False, only_header=False):
raise ElfParsingError("Malformed ELF file")
-def get_rpaths(path):
- """Returns list of rpaths of the given file as UTF-8 strings, or None if the file
- does not have any rpaths."""
+def get_rpaths(path: str) -> Optional[List[str]]:
+ """Returns list of rpaths of the given file as UTF-8 strings, or None if not set."""
try:
with open(path, "rb") as f:
elf = parse_elf(f, interpreter=False, dynamic_section=True)
+ return elf.dt_rpath_str.decode("utf-8").split(":") if elf.has_rpath else None
except ElfParsingError:
return None
- if not elf.has_rpath:
+
+def get_interpreter(path: str) -> Optional[str]:
+ """Returns the interpreter of the given file as UTF-8 string, or None if not set."""
+ try:
+ with open(path, "rb") as f:
+ elf = parse_elf(f, interpreter=True, dynamic_section=False)
+ return elf.pt_interp_str.decode("utf-8") if elf.has_pt_interp else None
+ except ElfParsingError:
return None
- # If it does, split the string in components
- rpath = elf.dt_rpath_str
- rpath = rpath.decode("utf-8")
- return rpath.split(":")
+def _delete_dynamic_array_entry(
+ f: BinaryIO, elf: ElfFile, should_delete: Callable[[int, int], bool]
+) -> None:
+ f.seek(elf.pt_dynamic_p_offset)
+ dynamic_array_fmt = elf.byte_order + ("qQ" if elf.is_64_bit else "lL")
+ dynamic_array_size = calcsize(dynamic_array_fmt)
+ new_offset = elf.pt_dynamic_p_offset # points to the new dynamic array
+ old_offset = elf.pt_dynamic_p_offset # points to the current dynamic array
+ for _ in range(elf.pt_dynamic_p_filesz // dynamic_array_size):
+ data = read_exactly(f, dynamic_array_size, "Malformed dynamic array entry")
+ tag, val = unpack(dynamic_array_fmt, data)
+
+ if tag == ELF_CONSTANTS.DT_NULL or not should_delete(tag, val):
+ if new_offset != old_offset:
+ f.seek(new_offset)
+ f.write(data)
+ f.seek(old_offset + dynamic_array_size)
+ new_offset += dynamic_array_size
+
+ if tag == ELF_CONSTANTS.DT_NULL:
+ break
+
+ old_offset += dynamic_array_size
-def delete_rpath(path):
- """Modifies a binary to remove the rpath. It zeros out the rpath string
- and also drops the DT_R(UN)PATH entry from the dynamic section, so it doesn't
- show up in 'readelf -d file', nor in 'strings file'."""
+
+def delete_rpath(path: str) -> None:
+ """Modifies a binary to remove the rpath. It zeros out the rpath string and also drops the
+ DT_R(UN)PATH entry from the dynamic section, so it doesn't show up in 'readelf -d file', nor
+ in 'strings file'."""
with open(path, "rb+") as f:
elf = parse_elf(f, interpreter=False, dynamic_section=True)
@@ -451,100 +517,178 @@ def delete_rpath(path):
f.seek(rpath_offset)
f.write(new_rpath_string)
- # Next update the dynamic array
- f.seek(elf.pt_dynamic_p_offset)
- dynamic_array_fmt = elf.byte_order + ("qQ" if elf.is_64_bit else "lL")
- dynamic_array_size = calcsize(dynamic_array_fmt)
- new_offset = elf.pt_dynamic_p_offset # points to the new dynamic array
- old_offset = elf.pt_dynamic_p_offset # points to the current dynamic array
- for _ in range(elf.pt_dynamic_p_filesz // dynamic_array_size):
- data = read_exactly(f, dynamic_array_size, "Malformed dynamic array entry")
- tag, _ = unpack(dynamic_array_fmt, data)
+ # Delete DT_RPATH / DT_RUNPATH entries from the dynamic section
+ _delete_dynamic_array_entry(
+ f, elf, lambda tag, _: tag == ELF_CONSTANTS.DT_RPATH or tag == ELF_CONSTANTS.DT_RUNPATH
+ )
- # Overwrite any entry that is not DT_RPATH or DT_RUNPATH, including DT_NULL
- if tag != ELF_CONSTANTS.DT_RPATH and tag != ELF_CONSTANTS.DT_RUNPATH:
- if new_offset != old_offset:
- f.seek(new_offset)
- f.write(data)
- f.seek(old_offset + dynamic_array_size)
- new_offset += dynamic_array_size
- # End of the dynamic array
- if tag == ELF_CONSTANTS.DT_NULL:
- break
+def delete_needed_from_elf(f: BinaryIO, elf: ElfFile, needed: bytes) -> None:
+ """Delete a needed library from the dynamic section of an ELF file"""
+ if not elf.has_needed or needed not in elf.dt_needed_strs:
+ return
- old_offset += dynamic_array_size
+ offset = elf.dt_needed_strtab_offsets[elf.dt_needed_strs.index(needed)]
+ _delete_dynamic_array_entry(
+ f, elf, lambda tag, val: tag == ELF_CONSTANTS.DT_NEEDED and val == offset
+ )
-def replace_rpath_in_place_or_raise(path, substitutions):
- regex = re.compile(b"|".join(re.escape(p) for p in substitutions.keys()))
- try:
- with open(path, "rb+") as f:
- elf = parse_elf(f, interpreter=False, dynamic_section=True)
+class CStringType:
+ PT_INTERP = 1
+ RPATH = 2
- # If there's no RPATH, then there's no need to replace anything.
- if not elf.has_rpath:
- return False
- # Get the non-empty rpaths. Sometimes there's a bunch of trailing
- # colons ::::: used for padding, we don't add them back to make it
- # more likely that the string doesn't grow.
- rpaths = list(filter(len, elf.dt_rpath_str.split(b":")))
+class UpdateCStringAction:
+ def __init__(self, old_value: bytes, new_value: bytes, offset: int):
+ self.old_value = old_value
+ self.new_value = new_value
+ self.offset = offset
- num_rpaths = len(rpaths)
+ @property
+ def inplace(self) -> bool:
+ return len(self.new_value) <= len(self.old_value)
- if num_rpaths == 0:
- return False
+ def apply(self, f: BinaryIO) -> None:
+ assert self.inplace
- changed = False
- for i in range(num_rpaths):
- old_rpath = rpaths[i]
- match = regex.match(old_rpath)
- if match:
- changed = True
- rpaths[i] = substitutions[match.group()] + old_rpath[match.end() :]
+ f.seek(self.offset)
+ f.write(self.new_value)
+
+ # We zero out the bits we shortened because (a) it should be a
+ # C-string and (b) it's nice not to have spurious parts of old
+ # paths in the output of `strings file`. Note that we're all
+ # good when pad == 0; the original terminating null is used.
+ f.write(b"\x00" * (len(self.old_value) - len(self.new_value)))
+
+
+def _get_rpath_substitution(
+ elf: ElfFile, regex: Pattern, substitutions: Dict[bytes, bytes]
+) -> Optional[UpdateCStringAction]:
+ """Make rpath substitutions in-place."""
+ # If there's no RPATH, then there's no need to replace anything.
+ if not elf.has_rpath:
+ return None
+
+ # Get the non-empty rpaths. Sometimes there's a bunch of trailing
+ # colons ::::: used for padding, we don't add them back to make it
+ # more likely that the string doesn't grow.
+ rpaths = list(filter(len, elf.dt_rpath_str.split(b":")))
+
+ num_rpaths = len(rpaths)
+
+ if num_rpaths == 0:
+ return None
+
+ changed = False
+ for i in range(num_rpaths):
+ old_rpath = rpaths[i]
+ match = regex.match(old_rpath)
+ if match:
+ changed = True
+ rpaths[i] = substitutions[match.group()] + old_rpath[match.end() :]
+
+ # Nothing to replace!
+ if not changed:
+ return None
+
+ return UpdateCStringAction(
+ old_value=elf.dt_rpath_str,
+ new_value=b":".join(rpaths),
+ # The rpath is at a given offset in the string table used by the dynamic section.
+ offset=elf.pt_dynamic_strtab_offset + elf.rpath_strtab_offset,
+ )
+
+
+def _get_pt_interp_substitution(
+ elf: ElfFile, regex: Pattern, substitutions: Dict[bytes, bytes]
+) -> Optional[UpdateCStringAction]:
+ """Make interpreter substitutions in-place."""
+ if not elf.has_pt_interp:
+ return None
+
+ match = regex.match(elf.pt_interp_str)
+ if not match:
+ return None
+
+ return UpdateCStringAction(
+ old_value=elf.pt_interp_str,
+ new_value=substitutions[match.group()] + elf.pt_interp_str[match.end() :],
+ offset=elf.pt_interp_p_offset,
+ )
- # Nothing to replace!
- if not changed:
- return False
- new_rpath_string = b":".join(rpaths)
+def substitute_rpath_and_pt_interp_in_place_or_raise(
+ path: str, substitutions: Dict[bytes, bytes]
+) -> bool:
+ """Returns true if the rpath and interpreter were modified, false if there was nothing to do.
+ Raises ElfCStringUpdatesFailed if the ELF file cannot be updated in-place. This exception
+ contains a list of actions to perform with other tools. The file is left untouched in this
+ case."""
+ regex = re.compile(b"|".join(re.escape(p) for p in substitutions.keys()))
- pad = len(elf.dt_rpath_str) - len(new_rpath_string)
+ try:
+ with open(path, "rb+") as f:
+ elf = parse_elf(f, interpreter=True, dynamic_section=True)
- if pad < 0:
- raise ElfDynamicSectionUpdateFailed(elf.dt_rpath_str, new_rpath_string)
+ # Get the actions to perform.
+ rpath = _get_rpath_substitution(elf, regex, substitutions)
+ pt_interp = _get_pt_interp_substitution(elf, regex, substitutions)
+
+ # Nothing to do.
+ if not rpath and not pt_interp:
+ return False
- # We zero out the bits we shortened because (a) it should be a
- # C-string and (b) it's nice not to have spurious parts of old
- # paths in the output of `strings file`. Note that we're all
- # good when pad == 0; the original terminating null is used.
- new_rpath_string += b"\x00" * pad
+ # If we can't update in-place, leave it to other tools, don't do partial updates.
+ if rpath and not rpath.inplace or pt_interp and not pt_interp.inplace:
+ raise ElfCStringUpdatesFailed(rpath, pt_interp)
- # The rpath is at a given offset in the string table used by the
- # dynamic section.
- rpath_offset = elf.pt_dynamic_strtab_offset + elf.rpath_strtab_offset
+ # Otherwise, apply the updates.
+ if rpath:
+ rpath.apply(f)
+
+ if pt_interp:
+ pt_interp.apply(f)
- f.seek(rpath_offset)
- f.write(new_rpath_string)
return True
except ElfParsingError:
- # This just means the file wasnt an elf file, so there's no point
+ # This just means the file wasn't an elf file, so there's no point
# in updating its rpath anyways; ignore this problem.
return False
-class ElfDynamicSectionUpdateFailed(Exception):
- def __init__(self, old, new):
- self.old = old
- self.new = new
- super().__init__(
- "New rpath {} is longer than old rpath {}".format(
- new.decode("utf-8"), old.decode("utf-8")
- )
- )
+def pt_interp(path: str) -> Optional[str]:
+ """Retrieve the interpreter of an executable at `path`."""
+ try:
+ with open(path, "rb") as f:
+ elf = parse_elf(f, interpreter=True)
+ except (OSError, ElfParsingError):
+ return None
+
+ if not elf.has_pt_interp:
+ return None
+
+ return elf.pt_interp_str.decode("utf-8")
+
+
+def get_elf_compat(path):
+ """Get a triplet (EI_CLASS, EI_DATA, e_machine) from an ELF file, which can be used to see if
+ two ELF files are compatible."""
+ # On ELF platforms supporting, we try to be a bit smarter when it comes to shared
+ # libraries, by dropping those that are not host compatible.
+ with open(path, "rb") as f:
+ elf = parse_elf(f, only_header=True)
+ return (elf.is_64_bit, elf.is_little_endian, elf.elf_hdr.e_machine)
+
+
+class ElfCStringUpdatesFailed(Exception):
+ def __init__(
+ self, rpath: Optional[UpdateCStringAction], pt_interp: Optional[UpdateCStringAction]
+ ):
+ self.rpath = rpath
+ self.pt_interp = pt_interp
class ElfParsingError(Exception):
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index d2f56dd4a7..8db0211e4e 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -11,16 +11,16 @@ import os
import os.path
import pickle
import re
+import shlex
+import subprocess
import sys
from functools import wraps
-from typing import Any, Callable, Dict, List, MutableMapping, Optional, Tuple, Union
+from typing import Any, Callable, Dict, Iterable, List, MutableMapping, Optional, Tuple, Union
from llnl.path import path_to_os_path, system_path_filter
from llnl.util import tty
from llnl.util.lang import dedupe
-from .executable import Executable, which
-
if sys.platform == "win32":
SYSTEM_PATHS = [
"C:\\",
@@ -36,6 +36,8 @@ else:
SYSTEM_DIRS = [os.path.join(p, s) for s in SUFFIXES for p in SYSTEM_PATHS] + SYSTEM_PATHS
+#: used in the compiler wrapper's `/usr/lib|/usr/lib64|...)` case entry
+SYSTEM_DIR_CASE_ENTRY = "|".join(sorted(f'"{d}{suff}"' for d in SYSTEM_DIRS for suff in ("", "/")))
_SHELL_SET_STRINGS = {
"sh": "export {0}={1};\n",
@@ -61,26 +63,6 @@ Path = str
ModificationList = List[Union["NameModifier", "NameValueModifier"]]
-_find_unsafe = re.compile(r"[^\w@%+=:,./-]", re.ASCII).search
-
-
-def double_quote_escape(s):
- """Return a shell-escaped version of the string *s*.
-
- This is similar to how shlex.quote works, but it escapes with double quotes
- instead of single quotes, to allow environment variable expansion within
- quoted strings.
- """
- if not s:
- return '""'
- if _find_unsafe(s) is None:
- return s
-
- # use double quotes, and escape double quotes in the string
- # the string $"b is then quoted as "$\"b"
- return '"' + s.replace('"', r"\"") + '"'
-
-
def system_env_normalize(func):
"""Decorator wrapping calls to system env modifications,
converting all env variable names to all upper case on Windows, no-op
@@ -108,7 +90,7 @@ def is_system_path(path: Path) -> bool:
return bool(path) and (os.path.normpath(path) in SYSTEM_DIRS)
-def filter_system_paths(paths: List[Path]) -> List[Path]:
+def filter_system_paths(paths: Iterable[Path]) -> List[Path]:
"""Returns a copy of the input where system paths are filtered out."""
return [p for p in paths if not is_system_path(p)]
@@ -180,7 +162,7 @@ def _nix_env_var_to_source_line(var: str, val: str) -> str:
fname=BASH_FUNCTION_FINDER.sub(r"\1", var), decl=val
)
else:
- source_line = f"{var}={double_quote_escape(val)}; export {var}"
+ source_line = f"{var}={shlex.quote(val)}; export {var}"
return source_line
@@ -642,8 +624,8 @@ class EnvironmentModifications:
elif isinstance(envmod, AppendFlagsEnv):
rev.remove_flags(envmod.name, envmod.value)
else:
- tty.warn(
- f"Skipping reversal of unreversable operation {type(envmod)} {envmod.name}"
+ tty.debug(
+ f"Skipping reversal of irreversible operation {type(envmod)} {envmod.name}"
)
return rev
@@ -677,8 +659,8 @@ class EnvironmentModifications:
for modifier in actions:
modifier.execute(new_env)
- if "MANPATH" in new_env and not new_env["MANPATH"].endswith(":"):
- new_env["MANPATH"] += ":"
+ if "MANPATH" in new_env and not new_env["MANPATH"].endswith(os.pathsep):
+ new_env["MANPATH"] += os.pathsep
cmds = ""
@@ -689,11 +671,10 @@ class EnvironmentModifications:
if new is None:
cmds += _SHELL_UNSET_STRINGS[shell].format(name)
else:
- if sys.platform != "win32":
- new_env_name = double_quote_escape(new_env[name])
- else:
- new_env_name = new_env[name]
- cmd = _SHELL_SET_STRINGS[shell].format(name, new_env_name)
+ value = new_env[name]
+ if shell not in ("bat", "pwsh"):
+ value = shlex.quote(value)
+ cmd = _SHELL_SET_STRINGS[shell].format(name, value)
cmds += cmd
return cmds
@@ -716,9 +697,9 @@ class EnvironmentModifications:
(default: ``&> /dev/null``)
concatenate_on_success (str): operator used to execute a command
only when the previous command succeeds (default: ``&&``)
- exclude ([str or re]): ignore any modifications of these
+ exclude ([str or re.Pattern[str]]): ignore any modifications of these
variables (default: [])
- include ([str or re]): always respect modifications of these
+ include ([str or re.Pattern[str]]): always respect modifications of these
variables (default: []). Supersedes any excluded variables.
clean (bool): in addition to removing empty entries,
also remove duplicate entries (default: False).
@@ -1052,8 +1033,6 @@ def environment_after_sourcing_files(
source_command = kwargs.get("source_command", "source")
concatenate_on_success = kwargs.get("concatenate_on_success", "&&")
- shell = Executable(shell_cmd)
-
def _source_single_file(file_and_args, environment):
shell_options_list = shell_options.split()
@@ -1061,26 +1040,21 @@ def environment_after_sourcing_files(
source_file.extend(x for x in file_and_args)
source_file = " ".join(source_file)
- # If the environment contains 'python' use it, if not
- # go with sys.executable. Below we just need a working
- # Python interpreter, not necessarily sys.executable.
- python_cmd = which("python3", "python", "python2")
- python_cmd = python_cmd.path if python_cmd else sys.executable
-
dump_cmd = "import os, json; print(json.dumps(dict(os.environ)))"
- dump_environment_cmd = python_cmd + f' -E -c "{dump_cmd}"'
+ dump_environment_cmd = sys.executable + f' -E -c "{dump_cmd}"'
# Try to source the file
source_file_arguments = " ".join(
[source_file, suppress_output, concatenate_on_success, dump_environment_cmd]
)
- output = shell(
- *shell_options_list,
- source_file_arguments,
- output=str,
+
+ with subprocess.Popen(
+ [shell_cmd, *shell_options_list, source_file_arguments],
env=environment,
- ignore_quotes=True,
- )
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ ) as shell:
+ output, _ = shell.communicate()
return json.loads(output)
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index f160051674..83534f8000 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -12,8 +12,9 @@ from pathlib import Path, PurePath
import llnl.util.tty as tty
import spack.error
+import spack.util.environment
-__all__ = ["Executable", "which", "ProcessError"]
+__all__ = ["Executable", "which", "which_string", "ProcessError"]
class Executable:
@@ -27,10 +28,10 @@ class Executable:
self.exe = [file_path]
self.default_env = {}
- from spack.util.environment import EnvironmentModifications # no cycle
- self.default_envmod = EnvironmentModifications()
+ self.default_envmod = spack.util.environment.EnvironmentModifications()
self.returncode = None
+ self.ignore_quotes = False
if not self.exe:
raise ProcessError("Cannot construct executable for '%s'" % name)
@@ -39,6 +40,20 @@ class Executable:
"""Add default argument(s) to the command."""
self.exe.extend(args)
+ def with_default_args(self, *args):
+ """Same as add_default_arg, but returns a copy of the executable."""
+ new = self.copy()
+ new.add_default_arg(*args)
+ return new
+
+ def copy(self):
+ """Return a copy of this Executable."""
+ new = Executable(self.exe[0])
+ new.exe[:] = self.exe
+ new.default_env.update(self.default_env)
+ new.default_envmod.extend(self.default_envmod)
+ return new
+
def add_default_env(self, key, value):
"""Set an environment variable when the command is run.
@@ -153,17 +168,15 @@ class Executable:
self.default_envmod.apply_modifications(env)
env.update(self.default_env)
- from spack.util.environment import EnvironmentModifications # no cycle
-
# Apply env argument
- if isinstance(env_arg, EnvironmentModifications):
+ if isinstance(env_arg, spack.util.environment.EnvironmentModifications):
env_arg.apply_modifications(env)
elif env_arg:
env.update(env_arg)
# Apply extra env
extra_env = kwargs.get("extra_env", {})
- if isinstance(extra_env, EnvironmentModifications):
+ if isinstance(extra_env, spack.util.environment.EnvironmentModifications):
extra_env.apply_modifications(env)
else:
env.update(extra_env)
@@ -174,7 +187,7 @@ class Executable:
fail_on_error = kwargs.pop("fail_on_error", True)
ignore_errors = kwargs.pop("ignore_errors", ())
- ignore_quotes = kwargs.pop("ignore_quotes", False)
+ ignore_quotes = kwargs.pop("ignore_quotes", self.ignore_quotes)
timeout = kwargs.pop("timeout", None)
# If they just want to ignore one error code, make it a tuple.
@@ -260,9 +273,9 @@ class Executable:
long_msg = cmd_line_string + f"\n{result}"
if fail_on_error:
raise ProcessTimeoutError(
- f"\nProcess timed out after {timeout}s"
- f"We expected the following command to run quickly but\
-it did not, please report this as an issue: {long_msg}",
+ f"\nProcess timed out after {timeout}s. "
+ "We expected the following command to run quickly but it did not, "
+ f"please report this as an issue: {long_msg}",
long_message=long_msg,
) from te
diff --git a/lib/spack/spack/util/file_cache.py b/lib/spack/spack/util/file_cache.py
index bc75704d75..e72d431f97 100644
--- a/lib/spack/spack/util/file_cache.py
+++ b/lib/spack/spack/util/file_cache.py
@@ -7,6 +7,7 @@ import errno
import math
import os
import shutil
+from typing import IO, Optional, Tuple
from llnl.util.filesystem import mkdirp, rename
@@ -14,6 +15,51 @@ from spack.error import SpackError
from spack.util.lock import Lock, ReadTransaction, WriteTransaction
+def _maybe_open(path: str) -> Optional[IO[str]]:
+ try:
+ return open(path, "r")
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ return None
+
+
+class ReadContextManager:
+ def __init__(self, path: str) -> None:
+ self.path = path
+
+ def __enter__(self) -> Optional[IO[str]]:
+ """Return a file object for the cache if it exists."""
+ self.cache_file = _maybe_open(self.path)
+ return self.cache_file
+
+ def __exit__(self, type, value, traceback):
+ if self.cache_file:
+ self.cache_file.close()
+
+
+class WriteContextManager:
+ def __init__(self, path: str) -> None:
+ self.path = path
+ self.tmp_path = f"{self.path}.tmp"
+
+ def __enter__(self) -> Tuple[Optional[IO[str]], IO[str]]:
+ """Return (old_file, new_file) file objects, where old_file is optional."""
+ self.old_file = _maybe_open(self.path)
+ self.new_file = open(self.tmp_path, "w")
+ return self.old_file, self.new_file
+
+ def __exit__(self, type, value, traceback):
+ if self.old_file:
+ self.old_file.close()
+ self.new_file.close()
+
+ if value:
+ os.remove(self.tmp_path)
+ else:
+ rename(self.tmp_path, self.path)
+
+
class FileCache:
"""This class manages cached data in the filesystem.
@@ -107,7 +153,8 @@ class FileCache:
cache_file.read()
"""
- return ReadTransaction(self._get_lock(key), acquire=lambda: open(self.cache_path(key)))
+ path = self.cache_path(key)
+ return ReadTransaction(self._get_lock(key), acquire=lambda: ReadContextManager(path))
def write_transaction(self, key):
"""Get a write transaction on a file cache item.
@@ -117,40 +164,11 @@ class FileCache:
moves the file into place on top of the old file atomically.
"""
- filename = self.cache_path(key)
- if os.path.exists(filename) and not os.access(filename, os.W_OK):
- raise CacheError(
- "Insufficient permissions to write to file cache at {0}".format(filename)
- )
-
- # TODO: this nested context manager adds a lot of complexity and
- # TODO: is pretty hard to reason about in llnl.util.lock. At some
- # TODO: point we should just replace it with functions and simplify
- # TODO: the locking code.
- class WriteContextManager:
- def __enter__(cm):
- cm.orig_filename = self.cache_path(key)
- cm.orig_file = None
- if os.path.exists(cm.orig_filename):
- cm.orig_file = open(cm.orig_filename, "r")
-
- cm.tmp_filename = self.cache_path(key) + ".tmp"
- cm.tmp_file = open(cm.tmp_filename, "w")
-
- return cm.orig_file, cm.tmp_file
-
- def __exit__(cm, type, value, traceback):
- if cm.orig_file:
- cm.orig_file.close()
- cm.tmp_file.close()
-
- if value:
- os.remove(cm.tmp_filename)
-
- else:
- rename(cm.tmp_filename, cm.orig_filename)
-
- return WriteTransaction(self._get_lock(key), acquire=WriteContextManager)
+ path = self.cache_path(key)
+ if os.path.exists(path) and not os.access(path, os.W_OK):
+ raise CacheError(f"Insufficient permissions to write to file cache at {path}")
+
+ return WriteTransaction(self._get_lock(key), acquire=lambda: WriteContextManager(path))
def mtime(self, key) -> float:
"""Return modification time of cache file, or -inf if it does not exist.
diff --git a/lib/spack/spack/util/filesystem.py b/lib/spack/spack/util/filesystem.py
new file mode 100644
index 0000000000..eac5c58918
--- /dev/null
+++ b/lib/spack/spack/util/filesystem.py
@@ -0,0 +1,104 @@
+# Copyright 2013-2024 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)
+
+"""
+Utilities for interacting with files,
+like those in llnl.util.filesystem, but which require logic from spack.util
+"""
+
+import glob
+import os
+import sys
+
+from llnl.util import tty
+from llnl.util.filesystem import edit_in_place_through_temporary_file
+from llnl.util.lang import memoized
+
+from spack.util.executable import Executable, which
+
+
+def _ensure_file_on_win():
+ """Ensures the file command is available on Windows
+ If not, it is bootstrapped.
+ No-op on all other platforms"""
+ if sys.platform != "win32":
+ return
+ import spack.bootstrap
+
+ with spack.bootstrap.ensure_bootstrap_configuration():
+ spack.bootstrap.ensure_file_in_path_or_raise()
+
+
+@memoized
+def file_command(*args):
+ """Creates entry point to `file` system command with provided arguments"""
+ _ensure_file_on_win()
+ file_cmd = which("file", required=True)
+ for arg in args:
+ file_cmd.add_default_arg(arg)
+ return file_cmd
+
+
+@memoized
+def _get_mime_type():
+ """Generate method to call `file` system command to aquire mime type
+ for a specified path
+ """
+ if sys.platform == "win32":
+ # -h option (no-dereference) does not exist in Windows
+ return file_command("-b", "--mime-type")
+ else:
+ return file_command("-b", "-h", "--mime-type")
+
+
+def mime_type(filename):
+ """Returns the mime type and subtype of a file.
+
+ Args:
+ filename: file to be analyzed
+
+ Returns:
+ Tuple containing the MIME type and subtype
+ """
+ output = _get_mime_type()(filename, output=str, error=str).strip()
+ tty.debug("==> " + output)
+ type, _, subtype = output.partition("/")
+ return type, subtype
+
+
+def fix_darwin_install_name(path):
+ """Fix install name of dynamic libraries on Darwin to have full path.
+
+ There are two parts of this task:
+
+ 1. Use ``install_name('-id', ...)`` to change install name of a single lib
+ 2. Use ``install_name('-change', ...)`` to change the cross linking between
+ libs. The function assumes that all libraries are in one folder and
+ currently won't follow subfolders.
+
+ Parameters:
+ path (str): directory in which .dylib files are located
+ """
+ libs = glob.glob(os.path.join(path, "*.dylib"))
+ install_name_tool = Executable("install_name_tool")
+ otool = Executable("otool")
+ for lib in libs:
+ args = ["-id", lib]
+ long_deps = otool("-L", lib, output=str).split("\n")
+ deps = [dep.partition(" ")[0][1::] for dep in long_deps[2:-1]]
+ # fix all dependencies:
+ for dep in deps:
+ for loc in libs:
+ # We really want to check for either
+ # dep == os.path.basename(loc) or
+ # dep == join_path(builddir, os.path.basename(loc)),
+ # but we don't know builddir (nor how symbolic links look
+ # in builddir). We thus only compare the basenames.
+ if os.path.basename(dep) == os.path.basename(loc):
+ args.extend(("-change", dep, loc))
+ break
+
+ with edit_in_place_through_temporary_file(lib) as tmp:
+ install_name_tool(*args, tmp)
diff --git a/lib/spack/spack/util/format.py b/lib/spack/spack/util/format.py
index c42597a8c3..acbf6f7a24 100644
--- a/lib/spack/spack/util/format.py
+++ b/lib/spack/spack/util/format.py
@@ -21,16 +21,6 @@ def get_version_lines(version_hashes_dict: dict, url_dict: Optional[dict] = None
version_lines = []
for v, h in version_hashes_dict.items():
- expand_arg = ""
-
- # Extract the url for a version if url_dict is provided.
- url = ""
- if url_dict is not None and v in url_dict:
- url = url_dict[v]
-
- # Add expand_arg since wheels should not be expanded during stanging
- if url.endswith(".whl") or ".whl#" in url:
- expand_arg = ", expand=False"
- version_lines.append(f' version("{v}", sha256="{h}"{expand_arg})')
+ version_lines.append(f' version("{v}", sha256="{h}")')
return "\n".join(version_lines)
diff --git a/lib/spack/spack/util/gpg.py b/lib/spack/spack/util/gpg.py
index f29b4b5c28..99263d22d5 100644
--- a/lib/spack/spack/util/gpg.py
+++ b/lib/spack/spack/util/gpg.py
@@ -7,6 +7,9 @@ import errno
import functools
import os
import re
+from typing import List
+
+import llnl.util.filesystem
import spack.error
import spack.paths
@@ -60,7 +63,7 @@ def init(gnupghome=None, force=False):
# Set the executable objects for "gpg" and "gpgconf"
with spack.bootstrap.ensure_bootstrap_configuration():
- spack.bootstrap.ensure_core_dependencies()
+ spack.bootstrap.ensure_gpg_in_path_or_raise()
GPG, GPGCONF = _gpg(), _gpgconf()
GPG.add_default_env("GNUPGHOME", GNUPGHOME)
@@ -122,8 +125,8 @@ def gnupghome_override(dir):
SOCKET_DIR, GNUPGHOME = _SOCKET_DIR, _GNUPGHOME
-def _parse_secret_keys_output(output):
- keys = []
+def _parse_secret_keys_output(output: str) -> List[str]:
+ keys: List[str] = []
found_sec = False
for line in output.split("\n"):
if found_sec:
@@ -193,9 +196,10 @@ Expire-Date: %(expires)s
@_autoinit
-def signing_keys(*args):
+def signing_keys(*args) -> List[str]:
"""Return the keys that can be used to sign binaries."""
- output = GPG("--list-secret-keys", "--with-colons", "--fingerprint", *args, output=str)
+ assert GPG
+ output: str = GPG("--list-secret-keys", "--with-colons", "--fingerprint", *args, output=str)
return _parse_secret_keys_output(output)
@@ -334,7 +338,7 @@ def _verify_exe_or_raise(exe):
raise SpackGPGError(msg)
output = exe("--version", output=str)
- match = re.search(r"^gpg(conf)? \(GnuPG\) (.*)$", output, re.M)
+ match = re.search(r"^gpg(conf)? \(GnuPG(?:/MacGPG2)?\) (.*)$", output, re.M)
if not match:
raise SpackGPGError('Could not determine "{0}" version'.format(exe.name))
@@ -385,7 +389,7 @@ def _socket_dir(gpgconf):
os.mkdir(var_run_user)
os.chmod(var_run_user, 0o777)
- user_dir = os.path.join(var_run_user, str(os.getuid()))
+ user_dir = os.path.join(var_run_user, str(llnl.util.filesystem.getuid()))
if not os.path.exists(user_dir):
os.mkdir(user_dir)
diff --git a/lib/spack/spack/util/libc.py b/lib/spack/spack/util/libc.py
new file mode 100644
index 0000000000..d842cd1022
--- /dev/null
+++ b/lib/spack/spack/util/libc.py
@@ -0,0 +1,214 @@
+# Copyright 2013-2024 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 os.path
+import re
+import shlex
+import sys
+from subprocess import PIPE, run
+from typing import Dict, List, Optional
+
+from llnl.util.lang import memoized
+
+import spack.spec
+import spack.util.elf
+
+#: Pattern to distinguish glibc from other libc implementations
+GLIBC_PATTERN = r"\b(?:Free Software Foundation|Roland McGrath|Ulrich Depper)\b"
+
+
+def _env() -> Dict[str, str]:
+ """Currently only set LC_ALL=C without clearing further environment variables"""
+ return {**os.environ, "LC_ALL": "C"}
+
+
+def _libc_from_ldd(ldd: str) -> Optional["spack.spec.Spec"]:
+ try:
+ result = run([ldd, "--version"], stdout=PIPE, stderr=PIPE, check=False, env=_env())
+ stdout = result.stdout.decode("utf-8")
+ except Exception:
+ return None
+
+ # The string "Free Software Foundation" is sometimes translated and not detected, but the names
+ # of the authors are typically present.
+ if not re.search(GLIBC_PATTERN, stdout):
+ return None
+
+ version_str = re.match(r".+\(.+\) (.+)", stdout)
+ if not version_str:
+ return None
+ try:
+ return spack.spec.Spec(f"glibc@={version_str.group(1)}")
+ except Exception:
+ return None
+
+
+def default_search_paths_from_dynamic_linker(dynamic_linker: str) -> List[str]:
+ """If the dynamic linker is glibc at a certain version, we can query the hard-coded library
+ search paths"""
+ try:
+ result = run([dynamic_linker, "--help"], stdout=PIPE, stderr=PIPE, check=False, env=_env())
+ assert result.returncode == 0
+ out = result.stdout.decode("utf-8")
+ except Exception:
+ return []
+
+ return [
+ match.group(1).strip()
+ for match in re.finditer(r"^ (/.+) \(system search path\)$", out, re.MULTILINE)
+ ]
+
+
+def libc_from_dynamic_linker(dynamic_linker: str) -> Optional["spack.spec.Spec"]:
+ maybe_spec = _libc_from_dynamic_linker(dynamic_linker)
+ if maybe_spec:
+ return maybe_spec.copy()
+ return None
+
+
+@memoized
+def _libc_from_dynamic_linker(dynamic_linker: str) -> Optional["spack.spec.Spec"]:
+ if not os.path.exists(dynamic_linker):
+ return None
+
+ # The dynamic linker is usually installed in the same /lib(64)?/ld-*.so path across all
+ # distros. The rest of libc is elsewhere, e.g. /usr. Typically the dynamic linker is then
+ # a symlink into /usr/lib, which we use to for determining the actual install prefix of
+ # libc.
+ realpath = os.path.realpath(dynamic_linker)
+
+ prefix = os.path.dirname(realpath)
+ # Remove the multiarch suffix if it exists
+ if os.path.basename(prefix) not in ("lib", "lib64"):
+ prefix = os.path.dirname(prefix)
+
+ # Non-standard install layout -- just bail.
+ if os.path.basename(prefix) not in ("lib", "lib64"):
+ return None
+
+ prefix = os.path.dirname(prefix)
+
+ # Now try to figure out if glibc or musl, which is the only ones we support.
+ # In recent glibc we can simply execute the dynamic loader. In musl that's always the case.
+ try:
+ result = run(
+ [dynamic_linker, "--version"], stdout=PIPE, stderr=PIPE, check=False, env=_env()
+ )
+ stdout = result.stdout.decode("utf-8")
+ stderr = result.stderr.decode("utf-8")
+ except Exception:
+ return None
+
+ # musl prints to stderr
+ if stderr.startswith("musl libc"):
+ version_str = re.search(r"^Version (.+)$", stderr, re.MULTILINE)
+ if not version_str:
+ return None
+ try:
+ spec = spack.spec.Spec(f"musl@={version_str.group(1)}")
+ spec.external_path = prefix
+ return spec
+ except Exception:
+ return None
+ elif re.search(GLIBC_PATTERN, stdout):
+ # output is like "ld.so (...) stable release version 2.33."
+ match = re.search(r"version (\d+\.\d+(?:\.\d+)?)", stdout)
+ if not match:
+ return None
+ try:
+ version = match.group(1)
+ spec = spack.spec.Spec(f"glibc@={version}")
+ spec.external_path = prefix
+ return spec
+ except Exception:
+ return None
+ else:
+ # Could not get the version by running the dynamic linker directly. Instead locate `ldd`
+ # relative to the dynamic linker.
+ ldd = os.path.join(prefix, "bin", "ldd")
+ if not os.path.exists(ldd):
+ # If `/lib64/ld.so` was not a symlink to `/usr/lib/ld.so` we can try to use /usr as
+ # prefix. This is the case on ubuntu 18.04 where /lib != /usr/lib.
+ if prefix != "/":
+ return None
+ prefix = "/usr"
+ ldd = os.path.join(prefix, "bin", "ldd")
+ if not os.path.exists(ldd):
+ return None
+ maybe_spec = _libc_from_ldd(ldd)
+ if not maybe_spec:
+ return None
+ maybe_spec.external_path = prefix
+ return maybe_spec
+
+
+def libc_from_current_python_process() -> Optional["spack.spec.Spec"]:
+ if not sys.executable:
+ return None
+
+ dynamic_linker = spack.util.elf.pt_interp(sys.executable)
+
+ if not dynamic_linker:
+ return None
+
+ return libc_from_dynamic_linker(dynamic_linker)
+
+
+def startfile_prefix(prefix: str, compatible_with: str = sys.executable) -> Optional[str]:
+ # Search for crt1.o at max depth 2 compatible with the ELF file provided in compatible_with.
+ # This is useful for finding external libc startfiles on a multiarch system.
+ try:
+ compat = spack.util.elf.get_elf_compat(compatible_with)
+ accept = lambda path: spack.util.elf.get_elf_compat(path) == compat
+ except Exception:
+ accept = lambda path: True
+
+ stack = [(0, prefix)]
+ while stack:
+ depth, path = stack.pop()
+ try:
+ iterator = os.scandir(path)
+ except OSError:
+ continue
+ with iterator:
+ for entry in iterator:
+ try:
+ if entry.is_dir(follow_symlinks=True):
+ if depth < 2:
+ stack.append((depth + 1, entry.path))
+ elif entry.name == "crt1.o" and accept(entry.path):
+ return path
+ except Exception:
+ continue
+ return None
+
+
+def parse_dynamic_linker(output: str):
+ """Parse -dynamic-linker /path/to/ld.so from compiler output"""
+ for line in reversed(output.splitlines()):
+ if "-dynamic-linker" not in line:
+ continue
+ args = shlex.split(line)
+
+ for idx in reversed(range(1, len(args))):
+ arg = args[idx]
+ if arg == "-dynamic-linker" or args == "--dynamic-linker":
+ return args[idx + 1]
+ elif arg.startswith("--dynamic-linker=") or arg.startswith("-dynamic-linker="):
+ return arg.split("=", 1)[1]
+
+
+def libc_include_dir_from_startfile_prefix(
+ libc_prefix: str, startfile_prefix: str
+) -> Optional[str]:
+ """Heuristic to determine the glibc include directory from the startfile prefix. Replaces
+ $libc_prefix/lib*/<multiarch> with $libc_prefix/include/<multiarch>. This function does not
+ check if the include directory actually exists or is correct."""
+ parts = os.path.relpath(startfile_prefix, libc_prefix).split(os.path.sep)
+ if parts[0] not in ("lib", "lib64", "libx32", "lib32"):
+ return None
+ parts[0] = "include"
+ return os.path.join(libc_prefix, *parts)
diff --git a/lib/spack/spack/util/lock.py b/lib/spack/spack/util/lock.py
index 3f6480b26a..f96145518b 100644
--- a/lib/spack/spack/util/lock.py
+++ b/lib/spack/spack/util/lock.py
@@ -19,7 +19,6 @@ from llnl.util.lock import ReadTransaction # noqa: F401
from llnl.util.lock import WriteTransaction # noqa: F401
import spack.error
-import spack.paths
class Lock(llnl.util.lock.Lock):
diff --git a/lib/spack/spack/util/package_hash.py b/lib/spack/spack/util/package_hash.py
index a0552b13cc..ab10d561ab 100644
--- a/lib/spack/spack/util/package_hash.py
+++ b/lib/spack/spack/util/package_hash.py
@@ -5,13 +5,13 @@
import ast
-import spack.directives
+import spack.directives_meta
import spack.error
+import spack.fetch_strategy
import spack.package_base
import spack.repo
import spack.spec
import spack.util.hash
-import spack.util.naming
from spack.util.unparse import unparse
@@ -82,7 +82,7 @@ class RemoveDirectives(ast.NodeTransformer):
node.value
and isinstance(node.value, ast.Call)
and isinstance(node.value.func, ast.Name)
- and node.value.func.id in spack.directives.directive_names
+ and node.value.func.id in spack.directives_meta.directive_names
)
else node
)
diff --git a/lib/spack/spack/util/parallel.py b/lib/spack/spack/util/parallel.py
index 9c0ff1ab8e..b16adb8858 100644
--- a/lib/spack/spack/util/parallel.py
+++ b/lib/spack/spack/util/parallel.py
@@ -2,12 +2,15 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import concurrent.futures
import multiprocessing
import os
import sys
import traceback
from typing import Optional
+import spack.config
+
class ErrorFromWorker:
"""Wrapper class to report an error from a worker process"""
@@ -80,3 +83,29 @@ def imap_unordered(
if isinstance(result, ErrorFromWorker):
raise RuntimeError(result.stacktrace if debug else str(result))
yield result
+
+
+class SequentialExecutor(concurrent.futures.Executor):
+ """Executor that runs tasks sequentially in the current thread."""
+
+ def submit(self, fn, *args, **kwargs):
+ """Submit a function to be executed."""
+ future = concurrent.futures.Future()
+ try:
+ future.set_result(fn(*args, **kwargs))
+ except Exception as e:
+ future.set_exception(e)
+ return future
+
+
+def make_concurrent_executor(
+ jobs: Optional[int] = None, *, require_fork: bool = True
+) -> concurrent.futures.Executor:
+ """Create a concurrent executor. If require_fork is True, then the executor is sequential
+ if the platform does not enable forking as the default start method. Effectively
+ require_fork=True makes the executor sequential in the current process on Windows, macOS, and
+ Linux from Python 3.14+ (which changes defaults)"""
+ if require_fork and multiprocessing.get_start_method() != "fork":
+ return SequentialExecutor()
+ jobs = jobs or spack.config.determine_number_of_jobs(parallel=True)
+ return concurrent.futures.ProcessPoolExecutor(jobs)
diff --git a/lib/spack/spack/util/path.py b/lib/spack/spack/util/path.py
index e0fa29dbcc..5967c595b4 100644
--- a/lib/spack/spack/util/path.py
+++ b/lib/spack/spack/util/path.py
@@ -55,6 +55,7 @@ NOMATCH = object()
# Substitutions to perform
def replacements():
# break circular imports
+ import spack
import spack.environment as ev
import spack.paths
@@ -71,9 +72,10 @@ def replacements():
"operating_system": lambda: arch.os,
"os": lambda: arch.os,
"target": lambda: arch.target,
- "target_family": lambda: arch.target.microarchitecture.family,
+ "target_family": lambda: arch.target.family,
"date": lambda: date.today().strftime("%Y-%m-%d"),
"env": lambda: ev.active_environment().path if ev.active_environment() else NOMATCH,
+ "spack_short_version": lambda: spack.get_short_version(),
}
@@ -96,6 +98,11 @@ SPACK_MAX_INSTALL_PATH_LENGTH = 300
#: include some other component of the intallation path.
SPACK_PATH_PADDING_CHARS = "__spack_path_placeholder__"
+#: Special padding char if the padded string would otherwise end with a path
+#: separator (since the path separator would otherwise get collapsed out,
+#: causing inconsistent padding).
+SPACK_PATH_PADDING_EXTRA_CHAR = "_"
+
def win_exe_ext():
return r"(?:\.bat|\.exe)"
@@ -149,19 +156,20 @@ def substitute_config_variables(path):
Spack allows paths in configs to have some placeholders, as follows:
- - $env The active Spack environment.
- - $spack The Spack instance's prefix
- - $tempdir Default temporary directory returned by tempfile.gettempdir()
- - $user The current user's username
- - $user_cache_path The user cache directory (~/.spack, unless overridden)
- - $architecture The spack architecture triple for the current system
- - $arch The spack architecture triple for the current system
- - $platform The spack platform for the current system
- - $os The OS of the current system
- - $operating_system The OS of the current system
- - $target The ISA target detected for the system
- - $target_family The family of the target detected for the system
- - $date The current date (YYYY-MM-DD)
+ - $env The active Spack environment.
+ - $spack The Spack instance's prefix
+ - $tempdir Default temporary directory returned by tempfile.gettempdir()
+ - $user The current user's username
+ - $user_cache_path The user cache directory (~/.spack, unless overridden)
+ - $architecture The spack architecture triple for the current system
+ - $arch The spack architecture triple for the current system
+ - $platform The spack platform for the current system
+ - $os The OS of the current system
+ - $operating_system The OS of the current system
+ - $target The ISA target detected for the system
+ - $target_family The family of the target detected for the system
+ - $date The current date (YYYY-MM-DD)
+ - $spack_short_version The spack short version
These are substituted case-insensitively into the path, and users can
use either ``$var`` or ``${var}`` syntax for the variables. $env is only
@@ -195,7 +203,10 @@ def _get_padding_string(length):
extra_chars = length % (spack_path_padding_size + 1)
reps_list = [SPACK_PATH_PADDING_CHARS for i in range(num_reps)]
reps_list.append(SPACK_PATH_PADDING_CHARS[:extra_chars])
- return os.path.sep.join(reps_list)
+ padding = os.path.sep.join(reps_list)
+ if padding.endswith(os.path.sep):
+ padding = padding[: len(padding) - 1] + SPACK_PATH_PADDING_EXTRA_CHAR
+ return padding
def add_padding(path, length):
@@ -313,10 +324,15 @@ def padding_filter(string):
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
+ # trailing prefix of padding as path component
+ r"(/{longest_prefix}|/{longest_prefix}{extra_pad_character})?(?=/)"
)
regex = regex.replace("/", re.escape(os.sep))
- regex = regex.format(pad=pad, longest_prefix=longest_prefix)
+ regex = regex.format(
+ pad=pad,
+ extra_pad_character=SPACK_PATH_PADDING_EXTRA_CHAR,
+ longest_prefix=longest_prefix,
+ )
_filter_re = re.compile(regex)
def replacer(match):
diff --git a/lib/spack/spack/util/s3.py b/lib/spack/spack/util/s3.py
index 5457abdca5..60c466f689 100644
--- a/lib/spack/spack/util/s3.py
+++ b/lib/spack/spack/util/s3.py
@@ -25,7 +25,7 @@ def get_s3_session(url, method="fetch"):
from botocore.exceptions import ClientError
# Circular dependency
- from spack.mirror import MirrorCollection
+ from spack.mirrors.mirror import MirrorCollection
global s3_client_cache
@@ -87,27 +87,24 @@ def _parse_s3_endpoint_url(endpoint_url):
def get_mirror_s3_connection_info(mirror, method):
"""Create s3 config for session/client from a Mirror instance (or just set defaults
when no mirror is given.)"""
- from spack.mirror import Mirror
+ from spack.mirrors.mirror import Mirror
s3_connection = {}
s3_client_args = {"use_ssl": spack.config.get("config:verify_ssl")}
# access token
if isinstance(mirror, Mirror):
- access_token = mirror.get_access_token(method)
- if access_token:
- s3_connection["aws_session_token"] = access_token
-
- # access pair
- access_pair = mirror.get_access_pair(method)
- if access_pair and access_pair[0] and access_pair[1]:
- s3_connection["aws_access_key_id"] = access_pair[0]
- s3_connection["aws_secret_access_key"] = access_pair[1]
-
- # profile
- profile = mirror.get_profile(method)
- if profile:
- s3_connection["profile_name"] = profile
+ credentials = mirror.get_credentials(method)
+ if credentials:
+ if "access_token" in credentials:
+ s3_connection["aws_session_token"] = credentials["access_token"]
+
+ if "access_pair" in credentials:
+ s3_connection["aws_access_key_id"] = credentials["access_pair"][0]
+ s3_connection["aws_secret_access_key"] = credentials["access_pair"][1]
+
+ if "profile" in credentials:
+ s3_connection["profile_name"] = credentials["profile"]
# endpoint url
endpoint_url = mirror.get_endpoint_url(method) or os.environ.get("S3_ENDPOINT_URL")
diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py
index f4bec63f5c..d53f26350e 100644
--- a/lib/spack/spack/util/spack_yaml.py
+++ b/lib/spack/spack/util/spack_yaml.py
@@ -14,13 +14,12 @@
"""
import collections
import collections.abc
-import copy
import ctypes
import enum
import functools
import io
import re
-from typing import IO, List, Optional
+from typing import IO, Any, Callable, Dict, List, Optional, Union
import ruamel.yaml
from ruamel.yaml import comments, constructor, emitter, error, representer
@@ -233,8 +232,8 @@ def return_string_when_no_stream(func):
@return_string_when_no_stream
def dump(data, stream=None, default_flow_style=False):
handler = ConfigYAML(yaml_type=YAMLType.GENERIC_YAML)
- handler.default_flow_style = default_flow_style
- handler.width = maxint
+ handler.yaml.default_flow_style = default_flow_style
+ handler.yaml.width = maxint
return handler.dump(data, stream=stream)
@@ -296,8 +295,8 @@ class LineAnnotationEmitter(emitter.Emitter):
if marked(self.event.value):
self.saved = self.event.value
- def write_line_break(self):
- super().write_line_break()
+ def write_line_break(self, data=None):
+ super().write_line_break(data)
if self.saved is None:
_ANNOTATIONS.append(colorize("@K{---}"))
return
@@ -400,20 +399,6 @@ class ConfigYAML:
return result.getvalue()
-def deepcopy(data):
- """Returns a deepcopy of the input YAML data."""
- result = copy.deepcopy(data)
-
- if isinstance(result, comments.CommentedMap):
- # HACK to fully copy ruamel CommentedMap that doesn't provide copy
- # method. Especially necessary for environments
- extracted_comments = extract_comments(data)
- if extracted_comments:
- set_comments(result, data_comments=extracted_comments)
-
- return result
-
-
def load_config(str_or_file):
"""Load but modify the loader instance so that it will add __line__
attributes to the returned object."""
@@ -493,6 +478,29 @@ def name_mark(name):
return error.StringMark(name, None, None, None, None, None)
+def anchorify(data: Union[dict, list], identifier: Callable[[Any], str] = repr) -> None:
+ """Replace identical dict/list branches in tree with references to earlier instances. The YAML
+ serializer generate anchors for them, resulting in small yaml files."""
+ anchors: Dict[str, Union[dict, list]] = {}
+ stack: List[Union[dict, list]] = [data]
+
+ while stack:
+ item = stack.pop()
+
+ for key, value in item.items() if isinstance(item, dict) else enumerate(item):
+ if not isinstance(value, (dict, list)):
+ continue
+
+ id = identifier(value)
+ anchor = anchors.get(id)
+
+ if anchor is None:
+ anchors[id] = value
+ stack.append(value)
+ else:
+ item[key] = anchor # replace with reference
+
+
class SpackYAMLError(spack.error.SpackError):
"""Raised when there are issues with YAML parsing."""
diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py
index 8ca4cd57a3..13da43aa98 100644
--- a/lib/spack/spack/util/unparse/unparser.py
+++ b/lib/spack/spack/util/unparse/unparser.py
@@ -554,9 +554,7 @@ class Unparser:
def _fstring_JoinedStr(self, node, write):
for value in node.values:
- print(" ", value)
meth = getattr(self, "_fstring_" + type(value).__name__)
- print(meth)
meth(value, write)
def _fstring_Str(self, node, write):
diff --git a/lib/spack/spack/util/url.py b/lib/spack/spack/util/url.py
index db84b03c3f..9054c7ad3f 100644
--- a/lib/spack/spack/util/url.py
+++ b/lib/spack/spack/util/url.py
@@ -7,14 +7,12 @@
Utility functions for parsing, formatting, and manipulating URLs.
"""
-import itertools
import os
import posixpath
-import sys
+import re
import urllib.parse
import urllib.request
-
-from llnl.path import convert_to_posix_path
+from typing import Optional
from spack.util.path import sanitize_filename
@@ -27,26 +25,6 @@ def validate_scheme(scheme):
return scheme in ("file", "http", "https", "ftp", "s3", "gs", "ssh", "git")
-def _split_all(path):
- """Split path into its atomic components.
-
- Returns the shortest list, L, of strings such that posixpath.join(*L) ==
- path and posixpath.split(element) == ('', element) for every element in L
- except possibly the first. This first element may possibly have the value
- of '/'.
- """
- result = []
- a = path
- old_a = None
- while a != old_a:
- (old_a, (a, b)) = a, posixpath.split(a)
-
- if a or b:
- result.insert(0, b or "/")
-
- return result
-
-
def local_file_path(url):
"""Get a local file path from a url.
@@ -76,14 +54,7 @@ def is_path_instead_of_url(path_or_url):
"""Historically some config files and spack commands used paths
where urls should be used. This utility can be used to validate
and promote paths to urls."""
- scheme = urllib.parse.urlparse(path_or_url).scheme
-
- # On non-Windows, no scheme means it's likely a path
- if not sys.platform == "win32":
- return not scheme
-
- # On Windows, we may have drive letters.
- return "A" <= scheme <= "Z"
+ return not validate_scheme(urllib.parse.urlparse(path_or_url).scheme)
def format(parsed_url):
@@ -97,151 +68,31 @@ def format(parsed_url):
return parsed_url.geturl()
-def join(base_url, path, *extra, **kwargs):
- """Joins a base URL with one or more local URL path components
-
- If resolve_href is True, treat the base URL as though it where the locator
- of a web page, and the remaining URL path components as though they formed
- a relative URL to be resolved against it (i.e.: as in posixpath.join(...)).
- The result is an absolute URL to the resource to which a user's browser
- would navigate if they clicked on a link with an "href" attribute equal to
- the relative URL.
-
- If resolve_href is False (default), then the URL path components are joined
- as in posixpath.join().
-
- Note: file:// URL path components are not canonicalized as part of this
- operation. To canonicalize, pass the joined url to format().
-
- Examples:
- base_url = 's3://bucket/index.html'
- body = fetch_body(prefix)
- link = get_href(body) # link == '../other-bucket/document.txt'
-
- # wrong - link is a local URL that needs to be resolved against base_url
- spack.util.url.join(base_url, link)
- 's3://bucket/other_bucket/document.txt'
-
- # correct - resolve local URL against base_url
- spack.util.url.join(base_url, link, resolve_href=True)
- 's3://other_bucket/document.txt'
-
- prefix = 'https://mirror.spack.io/build_cache'
-
- # wrong - prefix is just a URL prefix
- spack.util.url.join(prefix, 'my-package', resolve_href=True)
- 'https://mirror.spack.io/my-package'
-
- # correct - simply append additional URL path components
- spack.util.url.join(prefix, 'my-package', resolve_href=False) # default
- 'https://mirror.spack.io/build_cache/my-package'
-
- # For canonicalizing file:// URLs, take care to explicitly differentiate
- # between absolute and relative join components.
- """
- paths = [
- (x) if isinstance(x, str) else x.geturl() for x in itertools.chain((base_url, path), extra)
- ]
-
- paths = [convert_to_posix_path(x) for x in paths]
- n = len(paths)
- last_abs_component = None
- scheme = ""
- for i in range(n - 1, -1, -1):
- obj = urllib.parse.urlparse(paths[i], scheme="", allow_fragments=False)
-
- scheme = obj.scheme
-
- # in either case the component is absolute
- if scheme or obj.path.startswith("/"):
- if not scheme:
- # Without a scheme, we have to go back looking for the
- # next-last component that specifies a scheme.
- for j in range(i - 1, -1, -1):
- obj = urllib.parse.urlparse(paths[j], scheme="", allow_fragments=False)
-
- if obj.scheme:
- paths[i] = "{SM}://{NL}{PATH}".format(
- SM=obj.scheme,
- NL=((obj.netloc + "/") if obj.scheme != "s3" else ""),
- PATH=paths[i][1:],
- )
- break
-
- last_abs_component = i
- break
-
- if last_abs_component is not None:
- paths = paths[last_abs_component:]
- if len(paths) == 1:
- result = urllib.parse.urlparse(paths[0], scheme="file", allow_fragments=False)
-
- # another subtlety: If the last argument to join() is an absolute
- # file:// URL component with a relative path, the relative path
- # needs to be resolved.
- if result.scheme == "file" and result.netloc:
- result = urllib.parse.ParseResult(
- scheme=result.scheme,
- netloc="",
- path=posixpath.abspath(result.netloc + result.path),
- params=result.params,
- query=result.query,
- fragment=None,
- )
-
- return result.geturl()
-
- return _join(*paths, **kwargs)
-
-
-def _join(base_url, path, *extra, **kwargs):
- base_url = urllib.parse.urlparse(base_url)
- resolve_href = kwargs.get("resolve_href", False)
-
- (scheme, netloc, base_path, params, query, _) = base_url
- scheme = scheme.lower()
-
- path_tokens = [
- part
- for part in itertools.chain(
- _split_all(path),
- itertools.chain.from_iterable(_split_all(extra_path) for extra_path in extra),
- )
- if part and part != "/"
- ]
-
- base_path_args = ["/fake-root"]
- if scheme == "s3":
- if netloc:
- base_path_args.append(netloc)
-
- if base_path.startswith("/"):
- base_path = base_path[1:]
-
- base_path_args.append(base_path)
-
- if resolve_href:
- new_base_path, _ = posixpath.split(posixpath.join(*base_path_args))
- base_path_args = [new_base_path]
-
- base_path_args.extend(path_tokens)
- base_path = posixpath.relpath(posixpath.join(*base_path_args), "/fake-root")
-
- if scheme == "s3":
- path_tokens = [part for part in _split_all(base_path) if part and part != "/"]
-
- if path_tokens:
- netloc = path_tokens.pop(0)
- base_path = posixpath.join("", *path_tokens)
-
- if sys.platform == "win32":
- base_path = convert_to_posix_path(base_path)
-
- return format(
- urllib.parse.ParseResult(
- scheme=scheme, netloc=netloc, path=base_path, params=params, query=query, fragment=None
- )
- )
+def join(base: str, *components: str, resolve_href: bool = False, **kwargs) -> str:
+ """Convenience wrapper around ``urllib.parse.urljoin``, with a few differences:
+ 1. By default resolve_href=False, which makes the function like os.path.join: for example
+ https://example.com/a/b + c/d = https://example.com/a/b/c/d. If resolve_href=True, the
+ behavior is how a browser would resolve the URL: https://example.com/a/c/d.
+ 2. s3://, gs://, oci:// URLs are joined like http:// URLs.
+ 3. It accepts multiple components for convenience. Note that components[1:] are treated as
+ literal path components and appended to components[0] separated by slashes."""
+ # Ensure a trailing slash in the path component of the base URL to get os.path.join-like
+ # behavior instead of web browser behavior.
+ if not resolve_href:
+ parsed = urllib.parse.urlparse(base)
+ if not parsed.path.endswith("/"):
+ base = parsed._replace(path=f"{parsed.path}/").geturl()
+ uses_netloc = urllib.parse.uses_netloc
+ uses_relative = urllib.parse.uses_relative
+ try:
+ # NOTE: we temporarily modify urllib internals so s3 and gs schemes are treated like http.
+ # This is non-portable, and may be forward incompatible with future cpython versions.
+ urllib.parse.uses_netloc = [*uses_netloc, "s3", "gs", "oci"]
+ urllib.parse.uses_relative = [*uses_relative, "s3", "gs", "oci"]
+ return urllib.parse.urljoin(base, "/".join(components), **kwargs)
+ finally:
+ urllib.parse.uses_netloc = uses_netloc
+ urllib.parse.uses_relative = uses_relative
def default_download_filename(url: str) -> str:
@@ -261,3 +112,43 @@ def default_download_filename(url: str) -> str:
valid_name = "_" + valid_name[1:]
return valid_name
+
+
+def parse_link_rel_next(link_value: str) -> Optional[str]:
+ """Return the next link from a Link header value, if any."""
+
+ # Relaxed version of RFC5988
+ uri = re.compile(r"\s*<([^>]+)>\s*")
+ param_key = r"[^;=\s]+"
+ quoted_string = r"\"([^\"]+)\""
+ unquoted_param_value = r"([^;,\s]+)"
+ param = re.compile(rf";\s*({param_key})\s*=\s*(?:{quoted_string}|{unquoted_param_value})\s*")
+
+ data = link_value
+
+ # Parse a list of <url>; key=value; key=value, <url>; key=value; key=value, ... links.
+ while True:
+ uri_match = re.match(uri, data)
+ if not uri_match:
+ break
+ uri_reference = uri_match.group(1)
+ data = data[uri_match.end() :]
+
+ # Parse parameter list
+ while True:
+ param_match = re.match(param, data)
+ if not param_match:
+ break
+ key, quoted_value, unquoted_value = param_match.groups()
+ value = quoted_value or unquoted_value
+ data = data[param_match.end() :]
+
+ if key == "rel" and value == "next":
+ return uri_reference
+
+ if not data.startswith(","):
+ break
+
+ data = data[1:]
+
+ return None
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 6196cb66bd..7175629254 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -4,20 +4,21 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import codecs
-import concurrent.futures
import email.message
import errno
+import json
import os
import os.path
import re
import shutil
import ssl
+import stat
import sys
import traceback
import urllib.parse
from html.parser import HTMLParser
from pathlib import Path, PurePosixPath
-from typing import IO, Dict, List, Optional, Set, Union
+from typing import IO, Dict, Iterable, List, Optional, Set, Tuple, Union
from urllib.error import HTTPError, URLError
from urllib.request import HTTPSHandler, Request, build_opener
@@ -25,11 +26,15 @@ import llnl.url
from llnl.util import lang, tty
from llnl.util.filesystem import mkdirp, rename, working_dir
+import spack
import spack.config
import spack.error
+import spack.util.executable
+import spack.util.parallel
+import spack.util.path
import spack.util.url as url_util
-from .executable import CommandNotFoundError, which
+from .executable import CommandNotFoundError, Executable
from .gcs import GCSBlob, GCSBucket, GCSHandler
from .s3 import UrllibS3Handler, get_s3_session
@@ -59,6 +64,58 @@ class SpackHTTPDefaultErrorHandler(urllib.request.HTTPDefaultErrorHandler):
raise DetailedHTTPError(req, code, msg, hdrs, fp)
+def custom_ssl_certs() -> Optional[Tuple[bool, str]]:
+ """Returns a tuple (is_file, path) if custom SSL certifates are configured and valid."""
+ ssl_certs = spack.config.get("config:ssl_certs")
+ if not ssl_certs:
+ return None
+ path = spack.util.path.substitute_path_variables(ssl_certs)
+ if not os.path.isabs(path):
+ tty.debug(f"certs: relative path not allowed: {path}")
+ return None
+ try:
+ st = os.stat(path)
+ except OSError as e:
+ tty.debug(f"certs: error checking path {path}: {e}")
+ return None
+
+ file_type = stat.S_IFMT(st.st_mode)
+
+ if file_type != stat.S_IFREG and file_type != stat.S_IFDIR:
+ tty.debug(f"certs: not a file or directory: {path}")
+ return None
+
+ return (file_type == stat.S_IFREG, path)
+
+
+def ssl_create_default_context():
+ """Create the default SSL context for urllib with custom certificates if configured."""
+ certs = custom_ssl_certs()
+ if certs is None:
+ return ssl.create_default_context()
+ is_file, path = certs
+ if is_file:
+ tty.debug(f"urllib: certs: using cafile {path}")
+ return ssl.create_default_context(cafile=path)
+ else:
+ tty.debug(f"urllib: certs: using capath {path}")
+ return ssl.create_default_context(capath=path)
+
+
+def set_curl_env_for_ssl_certs(curl: Executable) -> None:
+ """configure curl to use custom certs in a file at runtime. See:
+ https://curl.se/docs/sslcerts.html item 4"""
+ certs = custom_ssl_certs()
+ if certs is None:
+ return
+ is_file, path = certs
+ if not is_file:
+ tty.debug(f"curl: {path} is not a file: default certs will be used.")
+ return
+ tty.debug(f"curl: using CURL_CA_BUNDLE={path}")
+ curl.add_default_env("CURL_CA_BUNDLE", path)
+
+
def _urlopen():
s3 = UrllibS3Handler()
gcs = GCSHandler()
@@ -66,7 +123,7 @@ def _urlopen():
# One opener with HTTPS ssl enabled
with_ssl = build_opener(
- s3, gcs, HTTPSHandler(context=ssl.create_default_context()), error_handler
+ s3, gcs, HTTPSHandler(context=ssl_create_default_context()), error_handler
)
# One opener with HTTPS ssl disabled
@@ -97,7 +154,8 @@ class HTMLParseError(Exception):
class LinkParser(HTMLParser):
"""This parser just takes an HTML page and strips out the hrefs on the
- links. Good enough for a really simple spider."""
+ links, as well as some javascript tags used on GitLab servers.
+ Good enough for a really simple spider."""
def __init__(self):
super().__init__()
@@ -105,9 +163,18 @@ class LinkParser(HTMLParser):
def handle_starttag(self, tag, attrs):
if tag == "a":
- for attr, val in attrs:
- if attr == "href":
- self.links.append(val)
+ self.links.extend(val for key, val in attrs if key == "href")
+
+ # GitLab uses a javascript function to place dropdown links:
+ # <div class="js-source-code-dropdown" ...
+ # data-download-links="[{"path":"/graphviz/graphviz/-/archive/12.0.0/graphviz-12.0.0.zip",...},...]"/>
+ if tag == "div" and ("class", "js-source-code-dropdown") in attrs:
+ try:
+ links_str = next(val for key, val in attrs if key == "data-download-links")
+ links = json.loads(links_str)
+ self.links.extend(x["path"] for x in links)
+ except Exception:
+ pass
class ExtractMetadataParser(HTMLParser):
@@ -143,8 +210,8 @@ def read_from_url(url, accept_content_type=None):
try:
response = urlopen(request)
- except URLError as err:
- raise SpackWebError("Download failed: {}".format(str(err)))
+ except (TimeoutError, URLError) as e:
+ raise SpackWebError(f"Download of {url.geturl()} failed: {e.__class__.__name__}: {e}")
if accept_content_type:
try:
@@ -206,9 +273,7 @@ def push_to_url(local_file_path, remote_path, keep_original=True, extra_args=Non
os.remove(local_file_path)
else:
- raise NotImplementedError(
- "Unrecognized URL scheme: {SCHEME}".format(SCHEME=remote_url.scheme)
- )
+ raise NotImplementedError(f"Unrecognized URL scheme: {remote_url.scheme}")
def base_curl_fetch_args(url, timeout=0):
@@ -255,44 +320,44 @@ def base_curl_fetch_args(url, timeout=0):
return curl_args
-def check_curl_code(returncode):
+def check_curl_code(returncode: int) -> None:
"""Check standard return code failures for provided arguments.
Arguments:
- returncode (int): curl return code
+ returncode: curl return code
Raises FetchError if the curl returncode indicates failure
"""
- if returncode != 0:
- if returncode == 22:
- # This is a 404. Curl will print the error.
- raise spack.error.FetchError("URL was not found!")
-
- if returncode == 60:
- # This is a certificate error. Suggest spack -k
- raise spack.error.FetchError(
- "Curl was unable to fetch due to invalid certificate. "
- "This is either an attack, or your cluster's SSL "
- "configuration is bad. If you believe your SSL "
- "configuration is bad, you can try running spack -k, "
- "which will not check SSL certificates."
- "Use this at your own risk."
- )
+ if returncode == 0:
+ return
+ elif returncode == 22:
+ # This is a 404. Curl will print the error.
+ raise spack.error.FetchError("URL was not found!")
+ elif returncode == 60:
+ # This is a certificate error. Suggest spack -k
+ raise spack.error.FetchError(
+ "Curl was unable to fetch due to invalid certificate. "
+ "This is either an attack, or your cluster's SSL "
+ "configuration is bad. If you believe your SSL "
+ "configuration is bad, you can try running spack -k, "
+ "which will not check SSL certificates."
+ "Use this at your own risk."
+ )
- raise spack.error.FetchError("Curl failed with error {0}".format(returncode))
+ raise spack.error.FetchError(f"Curl failed with error {returncode}")
-def _curl(curl=None):
- if not curl:
- try:
- curl = which("curl", required=True)
- except CommandNotFoundError as exc:
- tty.error(str(exc))
- raise spack.error.FetchError("Missing required curl fetch method")
+def require_curl() -> Executable:
+ try:
+ path = spack.util.executable.which_string("curl", required=True)
+ except CommandNotFoundError as e:
+ raise spack.error.FetchError(f"curl is required but not found: {e}") from e
+ curl = spack.util.executable.Executable(path)
+ set_curl_env_for_ssl_certs(curl)
return curl
-def fetch_url_text(url, curl=None, dest_dir="."):
+def fetch_url_text(url, curl: Optional[Executable] = None, dest_dir="."):
"""Retrieves text-only URL content using the configured fetch method.
It determines the fetch method from:
@@ -326,10 +391,7 @@ def fetch_url_text(url, curl=None, dest_dir="."):
fetch_method = spack.config.get("config:url_fetch_method")
tty.debug("Using '{0}' to fetch {1} into {2}".format(fetch_method, url, path))
if fetch_method == "curl":
- curl_exe = _curl(curl)
- if not curl_exe:
- raise spack.error.FetchError("Missing required fetch method (curl)")
-
+ curl_exe = curl or require_curl()
curl_args = ["-O"]
curl_args.extend(base_curl_fetch_args(url))
@@ -386,9 +448,7 @@ def url_exists(url, curl=None):
"config:url_fetch_method", "urllib"
) == "curl" and url_result.scheme not in ("gs", "s3")
if use_curl:
- curl_exe = _curl(curl)
- if not curl_exe:
- return False
+ curl_exe = curl or require_curl()
# Telling curl to fetch the first byte (-r 0-0) is supposed to be
# portable.
@@ -405,8 +465,8 @@ def url_exists(url, curl=None):
timeout=spack.config.get("config:connect_timeout", 10),
)
return True
- except URLError as e:
- tty.debug("Failure reading URL: " + str(e))
+ except (TimeoutError, URLError) as e:
+ tty.debug(f"Failure reading {url}: {e}")
return False
@@ -535,7 +595,7 @@ def list_url(url, recursive=False):
if local_path:
if recursive:
# convert backslash to forward slash as required for URLs
- return [str(PurePosixPath(Path(p))) for p in list(_iter_local_prefix(local_path))]
+ return [str(PurePosixPath(Path(p))) for p in _iter_local_prefix(local_path)]
return [
subpath
for subpath in os.listdir(local_path)
@@ -554,7 +614,9 @@ def list_url(url, recursive=False):
return gcs.get_all_blobs(recursive=recursive)
-def spider(root_urls: Union[str, List[str]], depth: int = 0, concurrency: Optional[int] = None):
+def spider(
+ root_urls: Union[str, Iterable[str]], depth: int = 0, concurrency: Optional[int] = None
+):
"""Get web pages from root URLs.
If depth is specified (e.g., depth=2), then this will also follow up to <depth> levels
@@ -580,7 +642,7 @@ def spider(root_urls: Union[str, List[str]], depth: int = 0, concurrency: Option
root = urllib.parse.urlparse(root_str)
spider_args.append((root, go_deeper, _visited))
- with concurrent.futures.ProcessPoolExecutor(max_workers=concurrency) as tp:
+ with spack.util.parallel.make_concurrent_executor(concurrency, require_fork=False) as tp:
while current_depth <= depth:
tty.debug(
f"SPIDER: [depth={current_depth}, max_depth={depth}, urls={len(spider_args)}]"
@@ -645,6 +707,7 @@ def _spider(url: urllib.parse.ParseResult, collect_nested: bool, _visited: Set[s
raw_link = metadata_parser.fragments.pop()
abs_link = url_util.join(response_url, raw_link.strip(), resolve_href=True)
+ fragment_response_url = None
try:
# This seems to be text/html, though text/fragment+html is also used
fragment_response_url, _, fragment_response = read_from_url(abs_link, "text/html")
@@ -684,10 +747,10 @@ def _spider(url: urllib.parse.ParseResult, collect_nested: bool, _visited: Set[s
subcalls.append(abs_link)
_visited.add(abs_link)
- except URLError as e:
+ except (TimeoutError, URLError) as e:
tty.debug(f"[SPIDER] Unable to read: {url}")
tty.debug(str(e), level=2)
- if hasattr(e, "reason") and isinstance(e.reason, ssl.SSLError):
+ if isinstance(e, URLError) and isinstance(e.reason, ssl.SSLError):
tty.warn(
"Spack was unable to fetch url list due to a "
"certificate verification problem. You can try "
diff --git a/lib/spack/spack/util/windows_registry.py b/lib/spack/spack/util/windows_registry.py
index c9f2a98285..02403197a9 100644
--- a/lib/spack/spack/util/windows_registry.py
+++ b/lib/spack/spack/util/windows_registry.py
@@ -59,6 +59,60 @@ class RegistryKey:
def hkey(self):
return self._handle
+ @contextmanager
+ def winreg_error_handler(self, name, *args, **kwargs):
+ try:
+ yield
+ except OSError as err:
+ # Expected errors that occur on occasion, these are easily
+ # debug-able and have sufficiently verbose reporting and obvious cause
+ # [WinError 2]: the system cannot find the file specified - lookup item does
+ # not exist
+ # [WinError 5]: Access is denied - user not in key's ACL
+ if hasattr(err, "winerror") and err.winerror in (5, 2):
+ raise err
+ # Other OS errors are more difficult to diagnose, so we wrap them in some extra
+ # reporting
+ raise InvalidRegistryOperation(name, err, *args, **kwargs) from err
+
+ def OpenKeyEx(self, subname, **kwargs):
+ """Convenience wrapper around winreg.OpenKeyEx"""
+ tty.debug(
+ f"[WINREG ACCESS] Accessing Reg Key {self.path}/{subname} with"
+ f" {kwargs.get('access', 'default')} access"
+ )
+ with self.winreg_error_handler("OpenKeyEx", subname, **kwargs):
+ return winreg.OpenKeyEx(self.hkey, subname, **kwargs)
+
+ def QueryInfoKey(self):
+ """Convenience wrapper around winreg.QueryInfoKey"""
+ tty.debug(f"[WINREG ACCESS] Obtaining key,value information from key {self.path}")
+ with self.winreg_error_handler("QueryInfoKey"):
+ return winreg.QueryInfoKey(self.hkey)
+
+ def EnumKey(self, index):
+ """Convenience wrapper around winreg.EnumKey"""
+ tty.debug(
+ "[WINREG ACCESS] Obtaining name of subkey at index "
+ f"{index} from registry key {self.path}"
+ )
+ with self.winreg_error_handler("EnumKey", index):
+ return winreg.EnumKey(self.hkey, index)
+
+ def EnumValue(self, index):
+ """Convenience wrapper around winreg.EnumValue"""
+ tty.debug(
+ f"[WINREG ACCESS] Obtaining value at index {index} from registry key {self.path}"
+ )
+ with self.winreg_error_handler("EnumValue", index):
+ return winreg.EnumValue(self.hkey, index)
+
+ def QueryValueEx(self, name, **kwargs):
+ """Convenience wrapper around winreg.QueryValueEx"""
+ tty.debug(f"[WINREG ACCESS] Obtaining value {name} from registry key {self.path}")
+ with self.winreg_error_handler("QueryValueEx", name, **kwargs):
+ return winreg.QueryValueEx(self.hkey, name, **kwargs)
+
def __str__(self):
return self.name
@@ -66,20 +120,17 @@ class RegistryKey:
"""Composes all subkeys into a list for access"""
if self._keys:
return
- sub_keys, _, _ = winreg.QueryInfoKey(self.hkey)
+ sub_keys, _, _ = self.QueryInfoKey()
for i in range(sub_keys):
- sub_name = winreg.EnumKey(self.hkey, i)
+ sub_name = self.EnumKey(i)
try:
- sub_handle = winreg.OpenKeyEx(self.hkey, sub_name, access=winreg.KEY_READ)
+ sub_handle = self.OpenKeyEx(sub_name, access=winreg.KEY_READ)
self._keys.append(RegistryKey(os.path.join(self.path, sub_name), sub_handle))
except OSError as e:
- if hasattr(e, "winerror"):
- if e.winerror == 5:
- # This is a permission error, we can't read this key
- # move on
- pass
- else:
- raise
+ if hasattr(e, "winerror") and e.winerror == 5:
+ # This is a permission error, we can't read this key
+ # move on
+ pass
else:
raise
@@ -87,21 +138,20 @@ class RegistryKey:
"""Compose all values for this key into a dict of form value name: RegistryValue Object"""
if self._values:
return
- _, values, _ = winreg.QueryInfoKey(self.hkey)
+ _, values, _ = self.QueryInfoKey()
for i in range(values):
- value_name, value_data, _ = winreg.EnumValue(self.hkey, i)
- self._values[value_name] = RegistryValue(value_name, value_data, self.hkey)
+ value_name, value_data, _ = self.EnumValue(i)
+ self._values[value_name] = RegistryValue(value_name, value_data, self)
def get_subkey(self, sub_key):
"""Returns subkey of name sub_key in a RegistryKey objects"""
return RegistryKey(
- os.path.join(self.path, sub_key),
- winreg.OpenKeyEx(self.hkey, sub_key, access=winreg.KEY_READ),
+ os.path.join(self.path, sub_key), self.OpenKeyEx(sub_key, access=winreg.KEY_READ)
)
def get_value(self, val_name):
"""Returns value associated with this key in RegistryValue object"""
- return RegistryValue(val_name, winreg.QueryValueEx(self.hkey, val_name)[0], self.hkey)
+ return RegistryValue(val_name, self.QueryValueEx(val_name)[0], self)
class _HKEY_CONSTANT(RegistryKey):
@@ -197,10 +247,7 @@ class WindowsRegistryView:
def _load_key(self):
try:
- self._reg = RegistryKey(
- os.path.join(str(self.root), self.key),
- winreg.OpenKeyEx(self.root.hkey, self.key, access=winreg.KEY_READ),
- )
+ self._reg = self.root.get_subkey(self.key)
except FileNotFoundError as e:
if sys.platform == "win32" and e.winerror == 2:
self._reg = -1
@@ -210,7 +257,7 @@ class WindowsRegistryView:
def _valid_reg_check(self):
if self.reg == -1:
- tty.debug("Cannot perform operation for nonexistent key %s" % self.key)
+ tty.debug(f"[WINREG ACCESS] Cannot perform operation for nonexistent key {self.key}")
return False
return True
@@ -227,19 +274,19 @@ class WindowsRegistryView:
def get_value(self, value_name):
"""Return registry value corresponding to provided argument (if it exists)"""
if not self._valid_reg_check():
- raise RegistryError("Cannot query value from invalid key %s" % self.key)
+ raise RegistryError(f"Cannot query value from invalid key {self.key}")
with self.invalid_reg_ref_error_handler():
return self.reg.get_value(value_name)
def get_subkey(self, subkey_name):
if not self._valid_reg_check():
- raise RegistryError("Cannot query subkey from invalid key %s" % self.key)
+ raise RegistryError(f"Cannot query subkey from invalid key {self.key}")
with self.invalid_reg_ref_error_handler():
return self.reg.get_subkey(subkey_name)
def get_subkeys(self):
if not self._valid_reg_check():
- raise RegistryError("Cannot query subkeys from invalid key %s" % self.key)
+ raise RegistryError(f"Cannot query subkeys from invalid key {self.key}")
with self.invalid_reg_ref_error_handler():
return self.reg.subkeys
@@ -252,11 +299,11 @@ class WindowsRegistryView:
def get_values(self):
if not self._valid_reg_check():
- raise RegistryError("Cannot query values from invalid key %s" % self.key)
+ raise RegistryError(f"Cannot query values from invalid key {self.key}")
with self.invalid_reg_ref_error_handler():
return self.reg.values
- def _traverse_subkeys(self, stop_condition, collect_all_matching=False):
+ def _traverse_subkeys(self, stop_condition, collect_all_matching=False, recursive=True):
"""Perform simple BFS of subkeys, returning the key
that successfully triggers the stop condition.
Args:
@@ -266,12 +313,13 @@ class WindowsRegistryView:
all keys meeting stop condition. If false, once stop
condition is met, the key that triggered the condition '
is returned.
+ recusrive: boolean value, if True perform a recursive search of subkeys
Return:
the key if stop_condition is triggered, or None if not
"""
collection = []
if not self._valid_reg_check():
- raise RegistryError("Cannot query values from invalid key %s" % self.key)
+ raise InvalidKeyError(self.key)
with self.invalid_reg_ref_error_handler():
queue = self.reg.subkeys
for key in queue:
@@ -280,55 +328,39 @@ class WindowsRegistryView:
collection.append(key)
else:
return key
- queue.extend(key.subkeys)
+ if recursive:
+ queue.extend(key.subkeys)
return collection if collection else None
- def _find_subkey_s(self, search_key, collect_all_matching=False):
- """Retrieve one or more keys regex matching `search_key`.
- One key will be returned unless `collect_all_matching` is enabled,
- in which case call matches are returned.
-
- Args:
- search_key (str): regex string represeting a subkey name structure
- to be matched against.
- Cannot be provided alongside `direct_subkey`
- collect_all_matching (bool): No-op if `direct_subkey` is specified
- Return:
- the desired subkey as a RegistryKey object, or none
- """
- return self._traverse_subkeys(search_key, collect_all_matching=collect_all_matching)
-
- def find_subkey(self, subkey_name):
+ def find_subkey(self, subkey_name, recursive=True):
"""Perform a BFS of subkeys until desired key is found
Returns None or RegistryKey object corresponding to requested key name
Args:
- subkey_name (str)
+ subkey_name (str): subkey to be searched for
+ recursive (bool): perform a recursive search
Return:
the desired subkey as a RegistryKey object, or none
-
- For more details, see the WindowsRegistryView._find_subkey_s method docstring
"""
- return self._find_subkey_s(
- WindowsRegistryView.KeyMatchConditions.name_matcher(subkey_name)
+ return self._traverse_subkeys(
+ WindowsRegistryView.KeyMatchConditions.name_matcher(subkey_name), recursive=recursive
)
- def find_matching_subkey(self, subkey_name):
+ def find_matching_subkey(self, subkey_name, recursive=True):
"""Perform a BFS of subkeys until a key matching subkey name regex is found
Returns None or the first RegistryKey object corresponding to requested key name
Args:
- subkey_name (str)
+ subkey_name (str): subkey to be searched for
+ recursive (bool): perform a recursive search
Return:
the desired subkey as a RegistryKey object, or none
-
- For more details, see the WindowsRegistryView._find_subkey_s method docstring
"""
- return self._find_subkey_s(
- WindowsRegistryView.KeyMatchConditions.regex_matcher(subkey_name)
+ return self._traverse_subkeys(
+ WindowsRegistryView.KeyMatchConditions.regex_matcher(subkey_name), recursive=recursive
)
- def find_subkeys(self, subkey_name):
+ def find_subkeys(self, subkey_name, recursive=True):
"""Exactly the same as find_subkey, except this function tries to match
a regex to multiple keys
@@ -336,11 +368,9 @@ class WindowsRegistryView:
subkey_name (str)
Return:
the desired subkeys as a list of RegistryKey object, or none
-
- For more details, see the WindowsRegistryView._find_subkey_s method docstring
"""
- kwargs = {"collect_all_matching": True}
- return self._find_subkey_s(
+ kwargs = {"collect_all_matching": True, "recursive": recursive}
+ return self._traverse_subkeys(
WindowsRegistryView.KeyMatchConditions.regex_matcher(subkey_name), **kwargs
)
@@ -366,5 +396,28 @@ class WindowsRegistryView:
return key.values[val_name]
-class RegistryError(RuntimeError):
+class RegistryError(Exception):
+ """RunTime Error concerning the Windows Registry"""
+
+
+class InvalidKeyError(RegistryError):
"""Runtime Error describing issue with invalid key access to Windows registry"""
+
+ def __init__(self, key):
+ message = f"Cannot query invalid key: {key}"
+ super().__init__(message)
+
+
+class InvalidRegistryOperation(RegistryError):
+ """A Runtime Error ecountered when a registry operation is invalid for
+ an indeterminate reason"""
+
+ def __init__(self, name, e, *args, **kwargs):
+ message = (
+ f"Windows registry operations: {name} encountered error: {str(e)}"
+ "\nMethod invoked with parameters:\n"
+ )
+ message += "\n\t".join([f"{k}:{v}" for k, v in kwargs.items()])
+ message += "\n"
+ message += "\n\t".join(args)
+ super().__init__(self, message)
diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py
index 07aafe8945..0dc82b2ff7 100644
--- a/lib/spack/spack/variant.py
+++ b/lib/spack/spack/variant.py
@@ -7,53 +7,98 @@
variants both in packages and in specs.
"""
import collections.abc
+import enum
import functools
import inspect
-import io
import itertools
import re
+from typing import Any, Callable, Collection, Iterable, List, Optional, Tuple, Type, Union
import llnl.util.lang as lang
import llnl.util.tty.color
-from llnl.string import comma_or
-import spack.directives
import spack.error as error
import spack.parser
+import spack.spec
+
+#: These are variant names used by Spack internally; packages can't use them
+reserved_names = [
+ "arch",
+ "architecture",
+ "dev_path",
+ "namespace",
+ "operating_system",
+ "os",
+ "patches",
+ "platform",
+ "target",
+]
special_variant_values = [None, "none", "*"]
+class VariantType(enum.Enum):
+ """Enum representing the three concrete variant types."""
+
+ MULTI = "multi"
+ BOOL = "bool"
+ SINGLE = "single"
+
+ @property
+ def variant_class(self) -> Type:
+ if self is self.MULTI:
+ return MultiValuedVariant
+ elif self is self.BOOL:
+ return BoolValuedVariant
+ else:
+ return SingleValuedVariant
+
+
class Variant:
- """Represents a variant in a package, as declared in the
- variant directive.
+ """Represents a variant definition, created by the ``variant()`` directive.
+
+ There can be multiple definitions of the same variant, and they are given precedence
+ by order of appearance in the package. Later definitions have higher precedence.
+ Similarly, definitions in derived classes have higher precedence than those in their
+ superclasses.
+
"""
+ name: str
+ default: Any
+ description: str
+ values: Optional[Collection] #: if None, valid values are defined only by validators
+ multi: bool
+ single_value_validator: Callable
+ group_validator: Optional[Callable]
+ sticky: bool
+ precedence: int
+
def __init__(
self,
- name,
- default,
- description,
- values=(True, False),
- multi=False,
- validator=None,
- sticky=False,
+ name: str,
+ *,
+ default: Any,
+ description: str,
+ values: Union[Collection, Callable] = (True, False),
+ multi: bool = False,
+ validator: Optional[Callable] = None,
+ sticky: bool = False,
+ precedence: int = 0,
):
"""Initialize a package variant.
Args:
- name (str): name of the variant
- default (str): default value for the variant in case
- nothing has been specified
- description (str): purpose of the variant
- values (sequence): sequence of allowed values or a callable
- accepting a single value as argument and returning True if the
- value is good, False otherwise
- multi (bool): whether multiple CSV are allowed
- validator (callable): optional callable used to enforce
- additional logic on the set of values being validated
- sticky (bool): if true the variant is set to the default value at
- concretization time
+ name: name of the variant
+ default: default value for the variant, used when nothing is explicitly specified
+ description: purpose of the variant
+ values: sequence of allowed values or a callable accepting a single value as argument
+ and returning True if the value is good, False otherwise
+ multi: whether multiple values are allowed
+ validator: optional callable that can be used to perform additional validation
+ sticky: if true the variant is set to the default value at concretization time
+ precedence: int indicating precedence of this variant definition in the solve
+ (definition with highest precedence is used when multiple definitions are possible)
"""
self.name = name
self.default = default
@@ -62,7 +107,7 @@ class Variant:
self.values = None
if values == "*":
# wildcard is a special case to make it easy to say any value is ok
- self.single_value_validator = lambda x: True
+ self.single_value_validator = lambda v: True
elif isinstance(values, type):
# supplying a type means any value *of that type*
@@ -81,21 +126,22 @@ class Variant:
self.single_value_validator = values
else:
# Otherwise, assume values is the set of allowed explicit values
- self.values = _flatten(values)
- self.single_value_validator = lambda x: x in tuple(self.values)
+ values = _flatten(values)
+ self.values = values
+ self.single_value_validator = lambda v: v in values
self.multi = multi
self.group_validator = validator
self.sticky = sticky
+ self.precedence = precedence
- def validate_or_raise(self, vspec, pkg_cls=None):
+ def validate_or_raise(self, vspec: "AbstractVariant", pkg_name: str):
"""Validate a variant spec against this package variant. Raises an
exception if any error is found.
Args:
- vspec (Variant): instance to be validated
- pkg_cls (spack.package_base.PackageBase): the package class
- that required the validation, if available
+ vspec: variant spec to be validated
+ pkg_name: the name of the package class that required this validation (for errors)
Raises:
InconsistentValidationError: if ``vspec.name != self.name``
@@ -110,25 +156,23 @@ class Variant:
if self.name != vspec.name:
raise InconsistentValidationError(vspec, self)
- # Check the values of the variant spec
- value = vspec.value
- if isinstance(vspec.value, (bool, str)):
- value = (vspec.value,)
-
# If the value is exclusive there must be at most one
+ value = vspec.value_as_tuple
if not self.multi and len(value) != 1:
- raise MultipleValuesInExclusiveVariantError(vspec, pkg_cls)
+ raise MultipleValuesInExclusiveVariantError(vspec, pkg_name)
# Check and record the values that are not allowed
- not_allowed_values = [
- x for x in value if x != "*" and self.single_value_validator(x) is False
- ]
- if not_allowed_values:
- raise InvalidVariantValueError(self, not_allowed_values, pkg_cls)
+ invalid_vals = ", ".join(
+ f"'{v}'" for v in value if v != "*" and self.single_value_validator(v) is False
+ )
+ if invalid_vals:
+ raise InvalidVariantValueError(
+ f"invalid values for variant '{self.name}' in package {pkg_name}: {invalid_vals}\n"
+ )
# Validate the group of values if needed
if self.group_validator is not None and value != ("*",):
- self.group_validator(pkg_cls.name, self.name, value)
+ self.group_validator(pkg_name, self.name, value)
@property
def allowed_values(self):
@@ -157,7 +201,7 @@ class Variant:
"""
return self.make_variant(self.default)
- def make_variant(self, value):
+ def make_variant(self, value) -> "AbstractVariant":
"""Factory that creates a variant holding the value passed as
a parameter.
@@ -168,30 +212,31 @@ class Variant:
MultiValuedVariant or SingleValuedVariant or BoolValuedVariant:
instance of the proper variant
"""
- return self.variant_cls(self.name, value)
+ return self.variant_type.variant_class(self.name, value)
@property
- def variant_cls(self):
- """Proper variant class to be used for this configuration."""
+ def variant_type(self) -> VariantType:
+ """String representation of the type of this variant (single/multi/bool)"""
if self.multi:
- return MultiValuedVariant
+ return VariantType.MULTI
elif self.values == (True, False):
- return BoolValuedVariant
- return SingleValuedVariant
+ return VariantType.BOOL
+ else:
+ return VariantType.SINGLE
- def __eq__(self, other):
+ def __str__(self):
return (
- self.name == other.name
- and self.default == other.default
- and self.values == other.values
- and self.multi == other.multi
- and self.single_value_validator == other.single_value_validator
- and self.group_validator == other.group_validator
+ f"Variant('{self.name}', "
+ f"default='{self.default}', "
+ f"description='{self.description}', "
+ f"values={self.values}, "
+ f"multi={self.multi}, "
+ f"single_value_validator={self.single_value_validator}, "
+ f"group_validator={self.group_validator}, "
+ f"sticky={self.sticky}, "
+ f"precedence={self.precedence})"
)
- def __ne__(self, other):
- return not self == other
-
def implicit_variant_conversion(method):
"""Converts other to type(self) and calls method(self, other)
@@ -206,7 +251,7 @@ def implicit_variant_conversion(method):
def convert(self, other):
# We don't care if types are different as long as I can convert other to type(self)
try:
- other = type(self)(other.name, other._original_value)
+ other = type(self)(other.name, other._original_value, propagate=other.propagate)
except (error.SpecError, ValueError):
return False
return method(self, other)
@@ -214,14 +259,14 @@ def implicit_variant_conversion(method):
return convert
-def _flatten(values):
+def _flatten(values) -> Collection:
"""Flatten instances of _ConditionalVariantValues for internal representation"""
if isinstance(values, DisjointSetsOfValues):
return values
- flattened = []
+ flattened: List = []
for item in values:
- if isinstance(item, _ConditionalVariantValues):
+ if isinstance(item, ConditionalVariantValues):
flattened.extend(item)
else:
flattened.append(item)
@@ -230,6 +275,13 @@ def _flatten(values):
return tuple(flattened)
+#: Type for value of a variant
+ValueType = Union[str, bool, Tuple[Union[str, bool], ...]]
+
+#: Type of variant value when output for JSON, YAML, etc.
+SerializedValueType = Union[str, bool, List[Union[str, bool]]]
+
+
@lang.lazy_lexicographic_ordering
class AbstractVariant:
"""A variant that has not yet decided who it wants to be. It behaves like
@@ -242,43 +294,55 @@ class AbstractVariant:
values.
"""
- def __init__(self, name, value, propagate=False):
+ name: str
+ propagate: bool
+ _value: ValueType
+ _original_value: Any
+
+ def __init__(self, name: str, value: Any, propagate: bool = False):
self.name = name
self.propagate = propagate
- # Stores 'value' after a bit of massaging
- # done by the property setter
- self._value = None
- self._original_value = None
-
# Invokes property setter
self.value = value
@staticmethod
- def from_node_dict(name, value):
+ def from_node_dict(
+ name: str, value: Union[str, List[str]], *, propagate: bool = False
+ ) -> "AbstractVariant":
"""Reconstruct a variant from a node dict."""
if isinstance(value, list):
# read multi-value variants in and be faithful to the YAML
- mvar = MultiValuedVariant(name, ())
+ mvar = MultiValuedVariant(name, (), propagate=propagate)
mvar._value = tuple(value)
mvar._original_value = mvar._value
return mvar
elif str(value).upper() == "TRUE" or str(value).upper() == "FALSE":
- return BoolValuedVariant(name, value)
+ return BoolValuedVariant(name, value, propagate=propagate)
- return SingleValuedVariant(name, value)
+ return SingleValuedVariant(name, value, propagate=propagate)
- def yaml_entry(self):
+ def yaml_entry(self) -> Tuple[str, SerializedValueType]:
"""Returns a key, value tuple suitable to be an entry in a yaml dict.
Returns:
tuple: (name, value_representation)
"""
- return self.name, list(self.value)
+ return self.name, list(self.value_as_tuple)
@property
- def value(self):
+ def value_as_tuple(self) -> Tuple[Union[bool, str], ...]:
+ """Getter for self.value that always returns a Tuple (even for single valued variants).
+
+ This makes it easy to iterate over possible values.
+ """
+ if isinstance(self._value, (bool, str)):
+ return (self._value,)
+ return self._value
+
+ @property
+ def value(self) -> ValueType:
"""Returns a tuple of strings containing the values stored in
the variant.
@@ -288,10 +352,10 @@ class AbstractVariant:
return self._value
@value.setter
- def value(self, value):
+ def value(self, value: ValueType) -> None:
self._value_setter(value)
- def _value_setter(self, value):
+ def _value_setter(self, value: ValueType) -> None:
# Store the original value
self._original_value = value
@@ -299,7 +363,7 @@ class AbstractVariant:
# Store a tuple of CSV string representations
# Tuple is necessary here instead of list because the
# values need to be hashed
- value = re.split(r"\s*,\s*", str(value))
+ value = tuple(re.split(r"\s*,\s*", str(value)))
for val in special_variant_values:
if val in value and len(value) > 1:
@@ -312,16 +376,12 @@ class AbstractVariant:
# to a set
self._value = tuple(sorted(set(value)))
- def _cmp_iter(self):
+ def _cmp_iter(self) -> Iterable:
yield self.name
+ yield self.propagate
+ yield from (str(v) for v in self.value_as_tuple)
- value = self._value
- if not isinstance(value, tuple):
- value = (value,)
- value = tuple(str(x) for x in value)
- yield value
-
- def copy(self):
+ def copy(self) -> "AbstractVariant":
"""Returns an instance of a variant equivalent to self
Returns:
@@ -335,7 +395,7 @@ class AbstractVariant:
return type(self)(self.name, self._original_value, self.propagate)
@implicit_variant_conversion
- def satisfies(self, other):
+ def satisfies(self, other: "AbstractVariant") -> bool:
"""Returns true if ``other.name == self.name``, because any value that
other holds and is not in self yet **could** be added.
@@ -349,13 +409,13 @@ class AbstractVariant:
# (`foo=bar` will never satisfy `baz=bar`)
return other.name == self.name
- def intersects(self, other):
+ def intersects(self, other: "AbstractVariant") -> bool:
"""Returns True if there are variant matching both self and other, False otherwise."""
if isinstance(other, (SingleValuedVariant, BoolValuedVariant)):
return other.intersects(self)
return other.name == self.name
- def compatible(self, other):
+ def compatible(self, other: "AbstractVariant") -> bool:
"""Returns True if self and other are compatible, False otherwise.
As there is no semantic check, two VariantSpec are compatible if
@@ -372,7 +432,7 @@ class AbstractVariant:
return self.intersects(other)
@implicit_variant_conversion
- def constrain(self, other):
+ def constrain(self, other: "AbstractVariant") -> bool:
"""Modify self to match all the constraints for other if both
instances are multi-valued. Returns True if self changed,
False otherwise.
@@ -388,23 +448,24 @@ class AbstractVariant:
old_value = self.value
- values = list(sorted(set(self.value + other.value)))
+ values = list(sorted(set(self.value_as_tuple + other.value_as_tuple)))
# If we constraint wildcard by another value, just take value
if "*" in values and len(values) > 1:
values.remove("*")
- self.value = ",".join(values)
+ self._value_setter(",".join(str(v) for v in values))
+ self.propagate = self.propagate and other.propagate
return old_value != self.value
- def __contains__(self, item):
- return item in self._value
+ def __contains__(self, item: Union[str, bool]) -> bool:
+ return item in self.value_as_tuple
- def __repr__(self):
+ def __repr__(self) -> str:
return f"{type(self).__name__}({repr(self.name)}, {repr(self._original_value)})"
- def __str__(self):
+ def __str__(self) -> str:
delim = "==" if self.propagate else "="
- values = spack.parser.quote_if_needed(",".join(str(v) for v in self.value))
+ values = spack.parser.quote_if_needed(",".join(str(v) for v in self.value_as_tuple))
return f"{self.name}{delim}{values}"
@@ -412,7 +473,7 @@ class MultiValuedVariant(AbstractVariant):
"""A variant that can hold multiple values at once."""
@implicit_variant_conversion
- def satisfies(self, other):
+ def satisfies(self, other: AbstractVariant) -> bool:
"""Returns true if ``other.name == self.name`` and ``other.value`` is
a strict subset of self. Does not try to validate.
@@ -432,22 +493,25 @@ class MultiValuedVariant(AbstractVariant):
# allow prefix find on patches
if self.name == "patches":
- return all(any(w.startswith(v) for w in self.value) for v in other.value)
+ return all(
+ any(str(w).startswith(str(v)) for w in self.value_as_tuple)
+ for v in other.value_as_tuple
+ )
# Otherwise we want all the values in `other` to be also in `self`
- return all(v in self.value for v in other.value)
+ return all(v in self for v in other.value_as_tuple)
- def append(self, value):
+ def append(self, value: Union[str, bool]) -> None:
"""Add another value to this multi-valued variant."""
- self._value = tuple(sorted((value,) + self._value))
- self._original_value = ",".join(self._value)
+ self._value = tuple(sorted((value,) + self.value_as_tuple))
+ self._original_value = ",".join(str(v) for v in self._value)
- def __str__(self):
+ def __str__(self) -> str:
# Special-case patches to not print the full 64 character sha256
if self.name == "patches":
- values_str = ",".join(x[:7] for x in self.value)
+ values_str = ",".join(str(x)[:7] for x in self.value_as_tuple)
else:
- values_str = ",".join(str(x) for x in self.value)
+ values_str = ",".join(str(x) for x in self.value_as_tuple)
delim = "==" if self.propagate else "="
return f"{self.name}{delim}{spack.parser.quote_if_needed(values_str)}"
@@ -456,35 +520,33 @@ class MultiValuedVariant(AbstractVariant):
class SingleValuedVariant(AbstractVariant):
"""A variant that can hold multiple values, but one at a time."""
- def _value_setter(self, value):
+ def _value_setter(self, value: ValueType) -> None:
# Treat the value as a multi-valued variant
super()._value_setter(value)
# Then check if there's only a single value
- if len(self._value) != 1:
- raise MultipleValuesInExclusiveVariantError(self, None)
- self._value = str(self._value[0])
+ values = self.value_as_tuple
+ if len(values) != 1:
+ raise MultipleValuesInExclusiveVariantError(self)
- def __str__(self):
- delim = "==" if self.propagate else "="
- return f"{self.name}{delim}{spack.parser.quote_if_needed(self.value)}"
+ self._value = values[0]
@implicit_variant_conversion
- def satisfies(self, other):
+ def satisfies(self, other: "AbstractVariant") -> bool:
abstract_sat = super().satisfies(other)
return abstract_sat and (
self.value == other.value or other.value == "*" or self.value == "*"
)
- def intersects(self, other):
+ def intersects(self, other: "AbstractVariant") -> bool:
return self.satisfies(other)
- def compatible(self, other):
+ def compatible(self, other: "AbstractVariant") -> bool:
return self.satisfies(other)
@implicit_variant_conversion
- def constrain(self, other):
+ def constrain(self, other: "AbstractVariant") -> bool:
if self.name != other.name:
raise ValueError("variants must have the same name")
@@ -497,14 +559,20 @@ class SingleValuedVariant(AbstractVariant):
if self.value != other.value:
raise UnsatisfiableVariantSpecError(other.value, self.value)
+ self.propagate = self.propagate and other.propagate
return False
- def __contains__(self, item):
+ def __contains__(self, item: ValueType) -> bool:
return item == self.value
- def yaml_entry(self):
+ def yaml_entry(self) -> Tuple[str, SerializedValueType]:
+ assert isinstance(self.value, (bool, str))
return self.name, self.value
+ def __str__(self) -> str:
+ delim = "==" if self.propagate else "="
+ return f"{self.name}{delim}{spack.parser.quote_if_needed(str(self.value))}"
+
class BoolValuedVariant(SingleValuedVariant):
"""A variant that can hold either True or False.
@@ -512,7 +580,7 @@ class BoolValuedVariant(SingleValuedVariant):
BoolValuedVariant can also hold the value '*', for coerced
comparisons between ``foo=*`` and ``+foo`` or ``~foo``."""
- def _value_setter(self, value):
+ def _value_setter(self, value: ValueType) -> None:
# Check the string representation of the value and turn
# it to a boolean
if str(value).upper() == "TRUE":
@@ -529,169 +597,14 @@ class BoolValuedVariant(SingleValuedVariant):
msg += "a value that does not represent a bool"
raise ValueError(msg.format(self.name))
- def __contains__(self, item):
+ def __contains__(self, item: ValueType) -> bool:
return item is self.value
- def __str__(self):
+ def __str__(self) -> str:
+ sigil = "+" if self.value else "~"
if self.propagate:
- return "{0}{1}".format("++" if self.value else "~~", self.name)
- return "{0}{1}".format("+" if self.value else "~", self.name)
-
-
-class VariantMap(lang.HashableMap):
- """Map containing variant instances. New values can be added only
- if the key is not already present.
- """
-
- def __init__(self, spec):
- super().__init__()
- self.spec = spec
-
- def __setitem__(self, name, vspec):
- # Raise a TypeError if vspec is not of the right type
- if not isinstance(vspec, AbstractVariant):
- msg = "VariantMap accepts only values of variant types"
- msg += " [got {0} instead]".format(type(vspec).__name__)
- raise TypeError(msg)
-
- # Raise an error if the variant was already in this map
- if name in self.dict:
- msg = 'Cannot specify variant "{0}" twice'.format(name)
- raise DuplicateVariantError(msg)
-
- # Raise an error if name and vspec.name don't match
- if name != vspec.name:
- msg = 'Inconsistent key "{0}", must be "{1}" to match VariantSpec'
- raise KeyError(msg.format(name, vspec.name))
-
- # Set the item
- super().__setitem__(name, vspec)
-
- def substitute(self, vspec):
- """Substitutes the entry under ``vspec.name`` with ``vspec``.
-
- Args:
- vspec: variant spec to be substituted
- """
- if vspec.name not in self:
- msg = "cannot substitute a key that does not exist [{0}]"
- raise KeyError(msg.format(vspec.name))
-
- # Set the item
- super().__setitem__(vspec.name, vspec)
-
- def satisfies(self, other):
- return all(k in self and self[k].satisfies(other[k]) for k in other)
-
- def intersects(self, other):
- return all(self[k].intersects(other[k]) for k in other if k in self)
-
- def constrain(self, other):
- """Add all variants in other that aren't in self to self. Also
- constrain all multi-valued variants that are already present.
- Return True if self changed, False otherwise
-
- Args:
- other (VariantMap): instance against which we constrain self
-
- Returns:
- bool: True or False
- """
- if other.spec is not None and other.spec._concrete:
- for k in self:
- if k not in other:
- raise UnsatisfiableVariantSpecError(self[k], "<absent>")
-
- changed = False
- for k in other:
- if k in self:
- # If they are not compatible raise an error
- if not self[k].compatible(other[k]):
- raise UnsatisfiableVariantSpecError(self[k], other[k])
- # If they are compatible merge them
- changed |= self[k].constrain(other[k])
- else:
- # If it is not present copy it straight away
- self[k] = other[k].copy()
- changed = True
-
- return changed
-
- @property
- def concrete(self):
- """Returns True if the spec is concrete in terms of variants.
-
- Returns:
- bool: True or False
- """
- return self.spec._concrete or all(v in self for v in self.spec.package_class.variants)
-
- def copy(self):
- """Return an instance of VariantMap equivalent to self.
-
- Returns:
- VariantMap: a copy of self
- """
- clone = VariantMap(self.spec)
- for name, variant in self.items():
- clone[name] = variant.copy()
- return clone
-
- def __str__(self):
- # print keys in order
- sorted_keys = sorted(self.keys())
-
- # Separate boolean variants from key-value pairs as they print
- # differently. All booleans go first to avoid ' ~foo' strings that
- # break spec reuse in zsh.
- bool_keys = []
- kv_keys = []
- for key in sorted_keys:
- bool_keys.append(key) if isinstance(self[key].value, bool) else kv_keys.append(key)
-
- # add spaces before and after key/value variants.
- string = io.StringIO()
-
- for key in bool_keys:
- string.write(str(self[key]))
-
- for key in kv_keys:
- string.write(" ")
- string.write(str(self[key]))
-
- return string.getvalue()
-
-
-def substitute_abstract_variants(spec):
- """Uses the information in `spec.package` to turn any variant that needs
- it into a SingleValuedVariant.
-
- This method is best effort. All variants that can be substituted will be
- substituted before any error is raised.
-
- Args:
- spec: spec on which to operate the substitution
- """
- # This method needs to be best effort so that it works in matrix exlusion
- # in $spack/lib/spack/spack/spec_list.py
- failed = []
- for name, v in spec.variants.items():
- if name in spack.directives.reserved_names:
- if name == "dev_path":
- new_variant = SingleValuedVariant(name, v._original_value)
- spec.variants.substitute(new_variant)
- continue
- if name not in spec.package_class.variants:
- failed.append(name)
- continue
- pkg_variant, _ = spec.package_class.variants[name]
- new_variant = pkg_variant.make_variant(v._original_value)
- pkg_variant.validate_or_raise(new_variant, spec.package_class)
- spec.variants.substitute(new_variant)
-
- # Raise all errors at once
- if failed:
- raise UnknownVariantError(spec, failed)
+ sigil *= 2
+ return f"{sigil}{self.name}"
# The class below inherit from Sequence to disguise as a tuple and comply
@@ -862,15 +775,21 @@ def disjoint_sets(*sets):
@functools.total_ordering
-class Value:
- """Conditional value that might be used in variants."""
+class ConditionalValue:
+ """Conditional value for a variant."""
+
+ value: Any
+
+ # optional because statically disabled values (when=False) are set to None
+ # when=True results in spack.spec.Spec()
+ when: Optional["spack.spec.Spec"]
- def __init__(self, value, when):
+ def __init__(self, value: Any, when: Optional["spack.spec.Spec"]):
self.value = value
self.when = when
def __repr__(self):
- return "Value({0.value}, when={0.when})".format(self)
+ return f"ConditionalValue({self.value}, when={self.when})"
def __str__(self):
return str(self.value)
@@ -890,16 +809,86 @@ class Value:
return self.value < other.value
-class _ConditionalVariantValues(lang.TypedMutableSequence):
- """A list, just with a different type"""
+def prevalidate_variant_value(
+ pkg_cls: "Type[spack.package_base.PackageBase]",
+ variant: AbstractVariant,
+ spec: Optional["spack.spec.Spec"] = None,
+ strict: bool = False,
+) -> List[Variant]:
+ """Do as much validation of a variant value as is possible before concretization.
+
+ This checks that the variant value is valid for *some* definition of the variant, and
+ it raises if we know *before* concretization that the value cannot occur. On success
+ it returns the variant definitions for which the variant is valid.
+
+ Arguments:
+ pkg_cls: package in which variant is (potentially multiply) defined
+ variant: variant spec with value to validate
+ spec: optionally restrict validation only to variants defined for this spec
+ strict: if True, raise an exception if no variant definition is valid for any
+ constraint on the spec.
+
+ Return:
+ list of variant definitions that will accept the given value. List will be empty
+ only if the variant is a reserved variant.
+ """
+ # don't validate wildcards or variants with reserved names
+ if variant.value == ("*",) or variant.name in reserved_names or variant.propagate:
+ return []
+
+ # raise if there is no definition at all
+ if not pkg_cls.has_variant(variant.name):
+ raise UnknownVariantError(
+ f"No such variant '{variant.name}' in package {pkg_cls.name}", [variant.name]
+ )
+ # do as much prevalidation as we can -- check only those
+ # variants whose when constraint intersects this spec
+ errors = []
+ possible_definitions = []
+ valid_definitions = []
-def conditional(*values, **kwargs):
- """Conditional values that can be used in variant declarations."""
- if len(kwargs) != 1 and "when" not in kwargs:
- raise ValueError('conditional statement expects a "when=" parameter only')
- when = kwargs["when"]
- return _ConditionalVariantValues([Value(x, when=when) for x in values])
+ for when, pkg_variant_def in pkg_cls.variant_definitions(variant.name):
+ if spec and not spec.intersects(when):
+ continue
+ possible_definitions.append(pkg_variant_def)
+
+ try:
+ pkg_variant_def.validate_or_raise(variant, pkg_cls.name)
+ valid_definitions.append(pkg_variant_def)
+ except spack.error.SpecError as e:
+ errors.append(e)
+
+ # value is valid for at least one definition -- return them all
+ if valid_definitions:
+ return valid_definitions
+
+ # no when spec intersected, so no possible definition for the variant in this configuration
+ if strict and not possible_definitions:
+ when_clause = f" when {spec}" if spec else ""
+ raise InvalidVariantValueError(
+ f"variant '{variant.name}' does not exist for '{pkg_cls.name}'{when_clause}"
+ )
+
+ # There are only no errors if we're not strict and there are no possible_definitions.
+ # We are strict for audits but not for specs on the CLI or elsewhere. Being strict
+ # in these cases would violate our rule of being able to *talk* about any configuration,
+ # regardless of what the package.py currently says.
+ if not errors:
+ return []
+
+ # if there is just one error, raise the specific error
+ if len(errors) == 1:
+ raise errors[0]
+
+ # otherwise combine all the errors and raise them together
+ raise InvalidVariantValueError(
+ "multiple variant issues:", "\n".join(e.message for e in errors)
+ )
+
+
+class ConditionalVariantValues(lang.TypedMutableSequence):
+ """A list, just with a different type"""
class DuplicateVariantError(error.SpecError):
@@ -909,15 +898,9 @@ class DuplicateVariantError(error.SpecError):
class UnknownVariantError(error.SpecError):
"""Raised when an unknown variant occurs in a spec."""
- def __init__(self, spec, variants):
- self.unknown_variants = variants
- variant_str = "variant" if len(variants) == 1 else "variants"
- msg = (
- 'trying to set {0} "{1}" in package "{2}", but the package'
- " has no such {0} [happened when validating '{3}']"
- )
- msg = msg.format(variant_str, comma_or(variants), spec.name, spec.root)
+ def __init__(self, msg: str, unknown_variants: List[str]):
super().__init__(msg)
+ self.unknown_variants = unknown_variants
class InconsistentValidationError(error.SpecError):
@@ -933,11 +916,10 @@ class MultipleValuesInExclusiveVariantError(error.SpecError, ValueError):
only one.
"""
- def __init__(self, variant, pkg):
- msg = 'multiple values are not allowed for variant "{0.name}"{1}'
- pkg_info = ""
- if pkg is not None:
- pkg_info = ' in package "{0}"'.format(pkg.name)
+ def __init__(self, variant: AbstractVariant, pkg_name: Optional[str] = None):
+ pkg_info = "" if pkg_name is None else f" in package '{pkg_name}'"
+ msg = f"multiple values are not allowed for variant '{variant.name}'{pkg_info}"
+
super().__init__(msg.format(variant, pkg_info))
@@ -946,23 +928,7 @@ class InvalidVariantValueCombinationError(error.SpecError):
class InvalidVariantValueError(error.SpecError):
- """Raised when a valid variant has at least an invalid value."""
-
- def __init__(self, variant, invalid_values, pkg):
- msg = 'invalid values for variant "{0.name}"{2}: {1}\n'
- pkg_info = ""
- if pkg is not None:
- pkg_info = ' in package "{0}"'.format(pkg.name)
- super().__init__(msg.format(variant, invalid_values, pkg_info))
-
-
-class InvalidVariantForSpecError(error.SpecError):
- """Raised when an invalid conditional variant is specified."""
-
- def __init__(self, variant, when, spec):
- msg = "Invalid variant {0} for spec {1}.\n"
- msg += "{0} is only available for {1.name} when satisfying one of {2}."
- super().__init__(msg.format(variant, spec, when))
+ """Raised when variants have invalid values."""
class UnsatisfiableVariantSpecError(error.UnsatisfiableSpecError):
diff --git a/lib/spack/spack/verify.py b/lib/spack/spack/verify.py
index 10d6f91da0..9854e8906f 100644
--- a/lib/spack/spack/verify.py
+++ b/lib/spack/spack/verify.py
@@ -9,8 +9,8 @@ import stat
from typing import Any, Dict
import llnl.util.tty as tty
+from llnl.util.symlink import readlink
-import spack.filesystem_view
import spack.store
import spack.util.file_permissions as fp
import spack.util.spack_json as sjson
@@ -38,7 +38,7 @@ def create_manifest_entry(path: str) -> Dict[str, Any]:
data: Dict[str, Any] = {"mode": s.st_mode, "owner": s.st_uid, "group": s.st_gid}
if stat.S_ISLNK(s.st_mode):
- data["dest"] = os.readlink(path)
+ data["dest"] = readlink(path)
elif stat.S_ISREG(s.st_mode):
data["hash"] = compute_hash(path)
@@ -90,7 +90,7 @@ def check_entry(path, data):
# instead of `lstat(...).st_mode`. So, ignore mode errors for symlinks.
if not stat.S_ISLNK(s.st_mode) and s.st_mode != data["mode"]:
res.add_error(path, "mode")
- elif stat.S_ISLNK(s.st_mode) and os.readlink(path) != data.get("dest"):
+ elif stat.S_ISLNK(s.st_mode) and readlink(path) != data.get("dest"):
res.add_error(path, "link")
elif stat.S_ISREG(s.st_mode):
# Check file contents against hash and listed as file
diff --git a/lib/spack/spack/version/__init__.py b/lib/spack/spack/version/__init__.py
index 30dd71ea62..a94f641cff 100644
--- a/lib/spack/spack/version/__init__.py
+++ b/lib/spack/spack/version/__init__.py
@@ -25,14 +25,16 @@ from .common import (
)
from .version_types import (
ClosedOpenRange,
+ ConcreteVersion,
GitVersion,
StandardVersion,
Version,
VersionList,
VersionRange,
+ VersionType,
+ _next_version,
+ _prev_version,
from_string,
- next_version,
- prev_version,
ver,
)
@@ -40,21 +42,23 @@ from .version_types import (
any_version: VersionList = VersionList([":"])
__all__ = [
- "Version",
- "VersionRange",
- "ver",
- "from_string",
- "is_git_version",
- "infinity_versions",
- "prev_version",
- "next_version",
- "VersionList",
"ClosedOpenRange",
- "StandardVersion",
+ "ConcreteVersion",
+ "EmptyRangeError",
"GitVersion",
- "VersionError",
+ "StandardVersion",
+ "Version",
"VersionChecksumError",
+ "VersionError",
+ "VersionList",
"VersionLookupError",
- "EmptyRangeError",
+ "VersionRange",
+ "VersionType",
+ "_next_version",
+ "_prev_version",
"any_version",
+ "from_string",
+ "infinity_versions",
+ "is_git_version",
+ "ver",
]
diff --git a/lib/spack/spack/version/common.py b/lib/spack/spack/version/common.py
index 3afa218d4d..89434d3930 100644
--- a/lib/spack/spack/version/common.py
+++ b/lib/spack/spack/version/common.py
@@ -15,6 +15,14 @@ infinity_versions = ["stable", "trunk", "head", "master", "main", "develop"]
iv_min_len = min(len(s) for s in infinity_versions)
+ALPHA = 0
+BETA = 1
+RC = 2
+FINAL = 3
+
+PRERELEASE_TO_STRING = ["alpha", "beta", "rc"]
+STRING_TO_PRERELEASE = {"alpha": ALPHA, "beta": BETA, "rc": RC, "final": FINAL}
+
def is_git_version(string: str) -> bool:
return (
diff --git a/lib/spack/spack/version/git_ref_lookup.py b/lib/spack/spack/version/git_ref_lookup.py
index e6c47194fe..e7a3b02ce8 100644
--- a/lib/spack/spack/version/git_ref_lookup.py
+++ b/lib/spack/spack/version/git_ref_lookup.py
@@ -17,7 +17,6 @@ import spack.repo
import spack.util.executable
import spack.util.hash
import spack.util.spack_json as sjson
-import spack.version
from .common import VersionLookupError
from .lookup import AbstractRefLookup
@@ -138,7 +137,7 @@ class GitRefLookup(AbstractRefLookup):
# Only clone if we don't have it!
if not os.path.exists(dest):
- self.fetcher.clone(dest, bare=True)
+ self.fetcher.bare_clone(dest)
# Lookup commit info
with working_dir(dest):
diff --git a/lib/spack/spack/version/version_types.py b/lib/spack/spack/version/version_types.py
index 35e826c219..4c7a9606f4 100644
--- a/lib/spack/spack/version/version_types.py
+++ b/lib/spack/spack/version/version_types.py
@@ -3,15 +3,18 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import numbers
import re
from bisect import bisect_left
-from typing import List, Optional, Tuple, Union
+from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union
from spack.util.spack_yaml import syaml_dict
from .common import (
+ ALPHA,
COMMIT_VERSION,
+ FINAL,
+ PRERELEASE_TO_STRING,
+ STRING_TO_PRERELEASE,
EmptyRangeError,
VersionLookupError,
infinity_versions,
@@ -28,26 +31,44 @@ SEGMENT_REGEX = re.compile(r"(?:(?P<num>[0-9]+)|(?P<str>[a-zA-Z]+))(?P<sep>[_.-]
class VersionStrComponent:
+ """Internal representation of the string (non-integer) components of Spack versions.
+
+ Versions comprise string and integer components (see ``SEGMENT_REGEX`` above).
+
+ This represents a string component, which is either some component consisting only
+ of alphabetical characters, *or* a special "infinity version" like ``main``,
+ ``develop``, ``master``, etc.
+
+ For speed, Spack versions are designed to map to Python tuples, so that we can use
+ Python's fast lexicographic tuple comparison on them. ``VersionStrComponent`` is
+ designed to work as a component in these version tuples, and as such must compare
+ directly with ``int`` or other ``VersionStrComponent`` objects.
+
+ """
+
__slots__ = ["data"]
- def __init__(self, data):
+ data: Union[int, str]
+
+ def __init__(self, data: Union[int, str]):
# int for infinity index, str for literal.
- self.data: Union[int, str] = data
+ self.data = data
@staticmethod
- def from_string(string):
+ def from_string(string: str) -> "VersionStrComponent":
+ value: Union[int, str] = string
if len(string) >= iv_min_len:
try:
- string = infinity_versions.index(string)
+ value = infinity_versions.index(string)
except ValueError:
pass
- return VersionStrComponent(string)
+ return VersionStrComponent(value)
- def __hash__(self):
+ def __hash__(self) -> int:
return hash(self.data)
- def __str__(self):
+ def __str__(self) -> str:
return (
("infinity" if self.data >= len(infinity_versions) else infinity_versions[self.data])
if isinstance(self.data, int)
@@ -57,82 +78,221 @@ class VersionStrComponent:
def __repr__(self) -> str:
return f'VersionStrComponent("{self}")'
- def __eq__(self, other):
+ def __eq__(self, other: object) -> bool:
return isinstance(other, VersionStrComponent) and self.data == other.data
- def __lt__(self, other):
- lhs_inf = isinstance(self.data, int)
+ # ignore typing for certain parts of these methods b/c a) they are performance-critical, and
+ # b) mypy isn't smart enough to figure out that if l_inf and r_inf are the same, comparing
+ # self.data and other.data is type safe.
+ def __lt__(self, other: object) -> bool:
+ l_inf = isinstance(self.data, int)
if isinstance(other, int):
- return not lhs_inf
- rhs_inf = isinstance(other.data, int)
- return (not lhs_inf and rhs_inf) if lhs_inf ^ rhs_inf else self.data < other.data
+ return not l_inf
+ r_inf = isinstance(other.data, int) # type: ignore
+ return (not l_inf and r_inf) if l_inf ^ r_inf else self.data < other.data # type: ignore
- def __le__(self, other):
- return self < other or self == other
-
- def __gt__(self, other):
- lhs_inf = isinstance(self.data, int)
+ def __gt__(self, other: object) -> bool:
+ l_inf = isinstance(self.data, int)
if isinstance(other, int):
- return lhs_inf
- rhs_inf = isinstance(other.data, int)
- return (lhs_inf and not rhs_inf) if lhs_inf ^ rhs_inf else self.data > other.data
+ return l_inf
+ r_inf = isinstance(other.data, int) # type: ignore
+ return (l_inf and not r_inf) if l_inf ^ r_inf else self.data > other.data # type: ignore
- def __ge__(self, other):
+ def __le__(self, other: object) -> bool:
+ return self < other or self == other
+
+ def __ge__(self, other: object) -> bool:
return self > other or self == other
-def parse_string_components(string: str) -> Tuple[tuple, tuple]:
+# Tuple types that make up the internal representation of StandardVersion.
+# We use Tuples so that Python can quickly compare versions.
+
+#: Version components are integers for numeric parts, VersionStrComponents for string parts.
+VersionComponentTuple = Tuple[Union[int, VersionStrComponent], ...]
+
+#: A Prerelease identifier is a constant for alpha/beta/rc/final and one optional number.
+#: Most versions will have this set to ``(FINAL,)``. Prereleases will have some other
+#: initial constant followed by a number, e.g. ``(RC, 1)``.
+PrereleaseTuple = Tuple[int, ...]
+
+#: Actual version tuple, including the split version number itself and the prerelease,
+#: all represented as tuples.
+VersionTuple = Tuple[VersionComponentTuple, PrereleaseTuple]
+
+#: Separators from a parsed version.
+SeparatorTuple = Tuple[str, ...]
+
+
+def parse_string_components(string: str) -> Tuple[VersionTuple, SeparatorTuple]:
+ """Parse a string into a ``VersionTuple`` and ``SeparatorTuple``."""
string = string.strip()
if string and not VALID_VERSION.match(string):
raise ValueError("Bad characters in version string: %s" % string)
segments = SEGMENT_REGEX.findall(string)
- version = tuple(int(m[0]) if m[0] else VersionStrComponent.from_string(m[1]) for m in segments)
- separators = tuple(m[2] for m in segments)
- return version, separators
+ separators: Tuple[str] = tuple(m[2] for m in segments)
+ prerelease: Tuple[int, ...]
+
+ # <version>(alpha|beta|rc)<number>
+ if len(segments) >= 3 and segments[-2][1] in STRING_TO_PRERELEASE and segments[-1][0]:
+ prerelease = (STRING_TO_PRERELEASE[segments[-2][1]], int(segments[-1][0]))
+ segments = segments[:-2]
+
+ # <version>(alpha|beta|rc)
+ elif len(segments) >= 2 and segments[-1][1] in STRING_TO_PRERELEASE:
+ prerelease = (STRING_TO_PRERELEASE[segments[-1][1]],)
+ segments = segments[:-1]
+
+ # <version>
+ else:
+ prerelease = (FINAL,)
+
+ release: VersionComponentTuple = tuple(
+ int(m[0]) if m[0] else VersionStrComponent.from_string(m[1]) for m in segments
+ )
+
+ return (release, prerelease), separators
+
+
+class VersionType:
+ """Base type for all versions in Spack (ranges, lists, regular versions, and git versions).
+
+ Versions in Spack behave like sets, and support some basic set operations. There are
+ four subclasses of ``VersionType``:
+
+ * ``StandardVersion``: a single, concrete version, e.g. 3.4.5 or 5.4b0.
+ * ``GitVersion``: subclass of ``StandardVersion`` for handling git repositories.
+ * ``ClosedOpenRange``: an inclusive version range, closed or open, e.g. ``3.0:5.0``,
+ ``3.0:``, or ``:5.0``
+ * ``VersionList``: An ordered list of any of the above types.
+
+ Notably, when Spack parses a version, it's always a range *unless* specified with
+ ``@=`` to make it concrete.
+ """
+
+ def intersection(self, other: "VersionType") -> "VersionType":
+ """Any versions contained in both self and other, or empty VersionList if no overlap."""
+ raise NotImplementedError
+
+ def intersects(self, other: "VersionType") -> bool:
+ """Whether self and other overlap."""
+ raise NotImplementedError
+
+ def overlaps(self, other: "VersionType") -> bool:
+ """Whether self and other overlap (same as ``intersects()``)."""
+ return self.intersects(other)
+
+ def satisfies(self, other: "VersionType") -> bool:
+ """Whether self is entirely contained in other."""
+ raise NotImplementedError
+
+ def union(self, other: "VersionType") -> "VersionType":
+ """Return a VersionType containing self and other."""
+ raise NotImplementedError
+
+ # We can use SupportsRichComparisonT in Python 3.8 or later, but alas in 3.6 we need
+ # to write all the operators out
+ def __eq__(self, other: object) -> bool:
+ raise NotImplementedError
+
+ def __lt__(self, other: object) -> bool:
+ raise NotImplementedError
+
+ def __gt__(self, other: object) -> bool:
+ raise NotImplementedError
+
+ def __ge__(self, other: object) -> bool:
+ raise NotImplementedError
+
+ def __le__(self, other: object) -> bool:
+ raise NotImplementedError
+
+ def __hash__(self) -> int:
+ raise NotImplementedError
+
+
+class ConcreteVersion(VersionType):
+ """Base type for versions that represents a single (non-range or list) version."""
+
+
+def _stringify_version(versions: VersionTuple, separators: Tuple[str, ...]) -> str:
+ """Create a string representation from version components."""
+ release, prerelease = versions
+
+ components = [f"{rel}{sep}" for rel, sep in zip(release, separators)]
+ if prerelease[0] != FINAL:
+ components.append(PRERELEASE_TO_STRING[prerelease[0]])
+ if len(prerelease) > 1:
+ components.append(separators[len(release)])
+ components.append(str(prerelease[1]))
-class ConcreteVersion:
- pass
+ return "".join(components)
class StandardVersion(ConcreteVersion):
"""Class to represent versions"""
- __slots__ = ["version", "string", "separators"]
+ __slots__ = ["version", "_string", "separators"]
- def __init__(self, string: Optional[str], version: tuple, separators: tuple):
- self.string = string
+ _string: str
+ version: VersionTuple
+ separators: Tuple[str, ...]
+
+ def __init__(self, string: str, version: VersionTuple, separators: Tuple[str, ...]):
+ """Create a StandardVersion from a string and parsed version components.
+
+ Arguments:
+ string: The original version string, or ``""`` if the it is not available.
+ version: A tuple as returned by ``parse_string_components()``. Contains two tuples:
+ one with alpha or numeric components and another with prerelease components.
+ separators: separators parsed from the original version string.
+
+ If constructed with ``string=""``, the string will be lazily constructed from components
+ when ``str()`` is called.
+ """
+ self._string = string
self.version = version
self.separators = separators
@staticmethod
- def from_string(string: str):
+ def from_string(string: str) -> "StandardVersion":
return StandardVersion(string, *parse_string_components(string))
@staticmethod
- def typemin():
- return StandardVersion("", (), ())
+ def typemin() -> "StandardVersion":
+ return _STANDARD_VERSION_TYPEMIN
@staticmethod
- def typemax():
- return StandardVersion("infinity", (VersionStrComponent(len(infinity_versions)),), ())
+ def typemax() -> "StandardVersion":
+ return _STANDARD_VERSION_TYPEMAX
- def __bool__(self):
+ @property
+ def string(self) -> str:
+ if not self._string:
+ self._string = _stringify_version(self.version, self.separators)
+ return self._string
+
+ @string.setter
+ def string(self, string) -> None:
+ self._string = string
+
+ def __bool__(self) -> bool:
return True
- def __eq__(self, other):
+ def __eq__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version == other.version
return False
- def __ne__(self, other):
+ def __ne__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version != other.version
return True
- def __lt__(self, other):
+ def __lt__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version < other.version
if isinstance(other, ClosedOpenRange):
@@ -140,7 +300,7 @@ class StandardVersion(ConcreteVersion):
return self <= other.lo
return NotImplemented
- def __le__(self, other):
+ def __le__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version <= other.version
if isinstance(other, ClosedOpenRange):
@@ -148,7 +308,7 @@ class StandardVersion(ConcreteVersion):
return self <= other.lo
return NotImplemented
- def __ge__(self, other):
+ def __ge__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version >= other.version
if isinstance(other, ClosedOpenRange):
@@ -156,77 +316,69 @@ class StandardVersion(ConcreteVersion):
return self > other.lo
return NotImplemented
- def __gt__(self, other):
+ def __gt__(self, other: object) -> bool:
if isinstance(other, StandardVersion):
return self.version > other.version
if isinstance(other, ClosedOpenRange):
return self > other.lo
return NotImplemented
- def __iter__(self):
- return iter(self.version)
+ def __iter__(self) -> Iterator:
+ return iter(self.version[0])
- def __len__(self):
- return len(self.version)
+ def __len__(self) -> int:
+ return len(self.version[0])
- def __getitem__(self, idx):
+ def __getitem__(self, idx: Union[int, slice]):
cls = type(self)
- if isinstance(idx, numbers.Integral):
- return self.version[idx]
+ release = self.version[0]
+
+ if isinstance(idx, int):
+ return release[idx]
elif isinstance(idx, slice):
string_arg = []
- pairs = zip(self.version[idx], self.separators[idx])
+ pairs = zip(release[idx], self.separators[idx])
for token, sep in pairs:
string_arg.append(str(token))
string_arg.append(str(sep))
if string_arg:
string_arg.pop() # We don't need the last separator
- string_arg = "".join(string_arg)
- return cls.from_string(string_arg)
+ return cls.from_string("".join(string_arg))
else:
return StandardVersion.from_string("")
- message = "{cls.__name__} indices must be integers"
- raise TypeError(message.format(cls=cls))
+ raise TypeError(f"{cls.__name__} indices must be integers or slices")
- def __str__(self):
- return (
- self.string
- if isinstance(self.string, str)
- else ".".join((str(c) for c in self.version))
- )
+ def __str__(self) -> str:
+ return self.string
def __repr__(self) -> str:
# Print indirect repr through Version(...)
return f'Version("{str(self)}")'
- def __hash__(self):
- return hash(self.version)
+ def __hash__(self) -> int:
+ # If this is a final release, do not hash the prerelease part for backward compat.
+ return hash(self.version if self.is_prerelease() else self.version[0])
- def __contains__(rhs, lhs):
+ def __contains__(rhs, lhs) -> bool:
# We should probably get rid of `x in y` for versions, since
# versions still have a dual interpretation as singleton sets
# or elements. x in y should be: is the lhs-element in the
# rhs-set. Instead this function also does subset checks.
- if isinstance(lhs, (StandardVersion, ClosedOpenRange, VersionList)):
+ if isinstance(lhs, VersionType):
return lhs.satisfies(rhs)
- raise ValueError(lhs)
+ raise TypeError(f"'in' not supported for instances of {type(lhs)}")
- def intersects(self, other: Union["StandardVersion", "GitVersion", "ClosedOpenRange"]) -> bool:
+ def intersects(self, other: VersionType) -> bool:
if isinstance(other, StandardVersion):
return self == other
return other.intersects(self)
- def overlaps(self, other) -> bool:
- return self.intersects(other)
-
- def satisfies(
- self, other: Union["ClosedOpenRange", "StandardVersion", "GitVersion", "VersionList"]
- ) -> bool:
+ def satisfies(self, other: VersionType) -> bool:
if isinstance(other, GitVersion):
return False
@@ -239,26 +391,40 @@ class StandardVersion(ConcreteVersion):
if isinstance(other, VersionList):
return other.intersects(self)
- return NotImplemented
+ raise NotImplementedError
- def union(self, other: Union["ClosedOpenRange", "StandardVersion"]):
+ def union(self, other: VersionType) -> VersionType:
if isinstance(other, StandardVersion):
return self if self == other else VersionList([self, other])
return other.union(self)
- def intersection(self, other: Union["ClosedOpenRange", "StandardVersion"]):
+ def intersection(self, other: VersionType) -> VersionType:
if isinstance(other, StandardVersion):
return self if self == other else VersionList()
return other.intersection(self)
- def isdevelop(self):
+ def isdevelop(self) -> bool:
"""Triggers on the special case of the `@develop-like` version."""
return any(
- isinstance(p, VersionStrComponent) and isinstance(p.data, int) for p in self.version
+ isinstance(p, VersionStrComponent) and isinstance(p.data, int) for p in self.version[0]
)
+ def is_prerelease(self) -> bool:
+ return self.version[1][0] != FINAL
+
+ @property
+ def dotted_numeric_string(self) -> str:
+ """Replaces all non-numeric components of the version with 0.
+
+ This can be used to pass Spack versions to libraries that have stricter version schema.
+ """
+ numeric = tuple(0 if isinstance(v, VersionStrComponent) else v for v in self.version[0])
+ if self.is_prerelease():
+ numeric += (0, *self.version[1][1:])
+ return ".".join(str(v) for v in numeric)
+
@property
- def dotted(self):
+ def dotted(self) -> "StandardVersion":
"""The dotted representation of the version.
Example:
@@ -272,7 +438,7 @@ class StandardVersion(ConcreteVersion):
return type(self).from_string(self.string.replace("-", ".").replace("_", "."))
@property
- def underscored(self):
+ def underscored(self) -> "StandardVersion":
"""The underscored representation of the version.
Example:
@@ -287,7 +453,7 @@ class StandardVersion(ConcreteVersion):
return type(self).from_string(self.string.replace(".", "_").replace("-", "_"))
@property
- def dashed(self):
+ def dashed(self) -> "StandardVersion":
"""The dashed representation of the version.
Example:
@@ -301,7 +467,7 @@ class StandardVersion(ConcreteVersion):
return type(self).from_string(self.string.replace(".", "-").replace("_", "-"))
@property
- def joined(self):
+ def joined(self) -> "StandardVersion":
"""The joined representation of the version.
Example:
@@ -316,7 +482,7 @@ class StandardVersion(ConcreteVersion):
self.string.replace(".", "").replace("-", "").replace("_", "")
)
- def up_to(self, index):
+ def up_to(self, index: int) -> "StandardVersion":
"""The version up to the specified component.
Examples:
@@ -342,6 +508,13 @@ class StandardVersion(ConcreteVersion):
return self[:index]
+_STANDARD_VERSION_TYPEMIN = StandardVersion("", ((), (ALPHA,)), ("",))
+
+_STANDARD_VERSION_TYPEMAX = StandardVersion(
+ "infinity", ((VersionStrComponent(len(infinity_versions)),), (FINAL,)), ("",)
+)
+
+
class GitVersion(ConcreteVersion):
"""Class to represent versions interpreted from git refs.
@@ -429,7 +602,7 @@ class GitVersion(ConcreteVersion):
)
return self._ref_version
- def intersects(self, other):
+ def intersects(self, other: VersionType) -> bool:
# For concrete things intersects = satisfies = equality
if isinstance(other, GitVersion):
return self == other
@@ -439,19 +612,14 @@ class GitVersion(ConcreteVersion):
return self.ref_version.intersects(other)
if isinstance(other, VersionList):
return any(self.intersects(rhs) for rhs in other)
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'intersects()' not supported for instances of {type(other)}")
- def intersection(self, other):
+ def intersection(self, other: VersionType) -> VersionType:
if isinstance(other, ConcreteVersion):
return self if self == other else VersionList()
return other.intersection(self)
- def overlaps(self, other) -> bool:
- return self.intersects(other)
-
- def satisfies(
- self, other: Union["GitVersion", StandardVersion, "ClosedOpenRange", "VersionList"]
- ):
+ def satisfies(self, other: VersionType) -> bool:
# Concrete versions mean we have to do an equality check
if isinstance(other, GitVersion):
return self == other
@@ -461,9 +629,9 @@ class GitVersion(ConcreteVersion):
return self.ref_version.satisfies(other)
if isinstance(other, VersionList):
return any(self.satisfies(rhs) for rhs in other)
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'satisfies()' not supported for instances of {type(other)}")
- def __str__(self):
+ def __str__(self) -> str:
s = f"git.{self.ref}" if self.has_git_prefix else self.ref
# Note: the solver actually depends on str(...) to produce the effective version.
# So when a lookup is attached, we require the resolved version to be printed.
@@ -481,7 +649,7 @@ class GitVersion(ConcreteVersion):
def __bool__(self):
return True
- def __eq__(self, other):
+ def __eq__(self, other: object) -> bool:
# GitVersion cannot be equal to StandardVersion, otherwise == is not transitive
return (
isinstance(other, GitVersion)
@@ -489,10 +657,10 @@ class GitVersion(ConcreteVersion):
and self.ref_version == other.ref_version
)
- def __ne__(self, other):
+ def __ne__(self, other: object) -> bool:
return not self == other
- def __lt__(self, other):
+ def __lt__(self, other: object) -> bool:
if isinstance(other, GitVersion):
return (self.ref_version, self.ref) < (other.ref_version, other.ref)
if isinstance(other, StandardVersion):
@@ -500,9 +668,9 @@ class GitVersion(ConcreteVersion):
return self.ref_version < other
if isinstance(other, ClosedOpenRange):
return self.ref_version < other
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'<' not supported between instances of {type(self)} and {type(other)}")
- def __le__(self, other):
+ def __le__(self, other: object) -> bool:
if isinstance(other, GitVersion):
return (self.ref_version, self.ref) <= (other.ref_version, other.ref)
if isinstance(other, StandardVersion):
@@ -511,9 +679,9 @@ class GitVersion(ConcreteVersion):
if isinstance(other, ClosedOpenRange):
# Equality is not a thing
return self.ref_version < other
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'<=' not supported between instances of {type(self)} and {type(other)}")
- def __ge__(self, other):
+ def __ge__(self, other: object) -> bool:
if isinstance(other, GitVersion):
return (self.ref_version, self.ref) >= (other.ref_version, other.ref)
if isinstance(other, StandardVersion):
@@ -521,9 +689,9 @@ class GitVersion(ConcreteVersion):
return self.ref_version >= other
if isinstance(other, ClosedOpenRange):
return self.ref_version > other
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'>=' not supported between instances of {type(self)} and {type(other)}")
- def __gt__(self, other):
+ def __gt__(self, other: object) -> bool:
if isinstance(other, GitVersion):
return (self.ref_version, self.ref) > (other.ref_version, other.ref)
if isinstance(other, StandardVersion):
@@ -531,14 +699,14 @@ class GitVersion(ConcreteVersion):
return self.ref_version >= other
if isinstance(other, ClosedOpenRange):
return self.ref_version > other
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'>' not supported between instances of {type(self)} and {type(other)}")
def __hash__(self):
# hashing should not cause version lookup
return hash(self.ref)
- def __contains__(self, other):
- raise Exception("Not implemented yet")
+ def __contains__(self, other: object) -> bool:
+ raise NotImplementedError
@property
def ref_lookup(self):
@@ -573,6 +741,9 @@ class GitVersion(ConcreteVersion):
def isdevelop(self):
return self.ref_version.isdevelop()
+ def is_prerelease(self) -> bool:
+ return self.ref_version.is_prerelease()
+
@property
def dotted(self) -> StandardVersion:
return self.ref_version.dotted
@@ -593,7 +764,7 @@ class GitVersion(ConcreteVersion):
return self.ref_version.up_to(index)
-class ClosedOpenRange:
+class ClosedOpenRange(VersionType):
def __init__(self, lo: StandardVersion, hi: StandardVersion):
if hi < lo:
raise EmptyRangeError(f"{lo}..{hi} is an empty range")
@@ -601,17 +772,17 @@ class ClosedOpenRange:
self.hi: StandardVersion = hi
@classmethod
- def from_version_range(cls, lo: StandardVersion, hi: StandardVersion):
+ def from_version_range(cls, lo: StandardVersion, hi: StandardVersion) -> "ClosedOpenRange":
"""Construct ClosedOpenRange from lo:hi range."""
try:
- return ClosedOpenRange(lo, next_version(hi))
+ return ClosedOpenRange(lo, _next_version(hi))
except EmptyRangeError as e:
raise EmptyRangeError(f"{lo}:{hi} is an empty range") from e
- def __str__(self):
+ def __str__(self) -> str:
# This simplifies 3.1:<3.2 to 3.1:3.1 to 3.1
# 3:3 -> 3
- hi_prev = prev_version(self.hi)
+ hi_prev = _prev_version(self.hi)
if self.lo != StandardVersion.typemin() and self.lo == hi_prev:
return str(self.lo)
lhs = "" if self.lo == StandardVersion.typemin() else str(self.lo)
@@ -623,7 +794,7 @@ class ClosedOpenRange:
def __hash__(self):
# prev_version for backward compat.
- return hash((self.lo, prev_version(self.hi)))
+ return hash((self.lo, _prev_version(self.hi)))
def __eq__(self, other):
if isinstance(other, StandardVersion):
@@ -670,9 +841,9 @@ class ClosedOpenRange:
def __contains__(rhs, lhs):
if isinstance(lhs, (ConcreteVersion, ClosedOpenRange, VersionList)):
return lhs.satisfies(rhs)
- raise ValueError(f"Unexpected type {type(lhs)}")
+ raise TypeError(f"'in' not supported between instances of {type(rhs)} and {type(lhs)}")
- def intersects(self, other: Union[ConcreteVersion, "ClosedOpenRange", "VersionList"]):
+ def intersects(self, other: VersionType) -> bool:
if isinstance(other, StandardVersion):
return self.lo <= other < self.hi
if isinstance(other, GitVersion):
@@ -681,70 +852,91 @@ class ClosedOpenRange:
return (self.lo < other.hi) and (other.lo < self.hi)
if isinstance(other, VersionList):
return any(self.intersects(rhs) for rhs in other)
- raise ValueError(f"Unexpected type {type(other)}")
+ raise TypeError(f"'intersects' not supported for instances of {type(other)}")
- def satisfies(self, other: Union["ClosedOpenRange", ConcreteVersion, "VersionList"]):
+ def satisfies(self, other: VersionType) -> bool:
if isinstance(other, ConcreteVersion):
return False
if isinstance(other, ClosedOpenRange):
return not (self.lo < other.lo or other.hi < self.hi)
if isinstance(other, VersionList):
return any(self.satisfies(rhs) for rhs in other)
- raise ValueError(other)
-
- def overlaps(self, other: Union["ClosedOpenRange", ConcreteVersion, "VersionList"]) -> bool:
- return self.intersects(other)
+ raise TypeError(f"'satisfies()' not supported for instances of {type(other)}")
- def union(self, other: Union["ClosedOpenRange", ConcreteVersion, "VersionList"]):
+ def _union_if_not_disjoint(self, other: VersionType) -> Optional["ClosedOpenRange"]:
+ """Same as union, but returns None when the union is not connected. This function is not
+ implemented for version lists as right-hand side, as that makes little sense."""
if isinstance(other, StandardVersion):
- return self if self.lo <= other < self.hi else VersionList([self, other])
+ return self if self.lo <= other < self.hi else None
if isinstance(other, GitVersion):
- return self if self.lo <= other.ref_version < self.hi else VersionList([self, other])
+ return self if self.lo <= other.ref_version < self.hi else None
if isinstance(other, ClosedOpenRange):
# Notice <= cause we want union(1:2, 3:4) = 1:4.
- if self.lo <= other.hi and other.lo <= self.hi:
- return ClosedOpenRange(min(self.lo, other.lo), max(self.hi, other.hi))
+ return (
+ ClosedOpenRange(min(self.lo, other.lo), max(self.hi, other.hi))
+ if self.lo <= other.hi and other.lo <= self.hi
+ else None
+ )
- return VersionList([self, other])
+ raise TypeError(f"'union()' not supported for instances of {type(other)}")
+ def union(self, other: VersionType) -> VersionType:
if isinstance(other, VersionList):
v = other.copy()
v.add(self)
return v
- raise ValueError(f"Unexpected type {type(other)}")
+ result = self._union_if_not_disjoint(other)
+ return result if result is not None else VersionList([self, other])
- def intersection(self, other: Union["ClosedOpenRange", ConcreteVersion]):
+ def intersection(self, other: VersionType) -> VersionType:
# range - version -> singleton or nothing.
+ if isinstance(other, ClosedOpenRange):
+ # range - range -> range or nothing.
+ max_lo = max(self.lo, other.lo)
+ min_hi = min(self.hi, other.hi)
+ return ClosedOpenRange(max_lo, min_hi) if max_lo < min_hi else VersionList()
+
if isinstance(other, ConcreteVersion):
return other if self.intersects(other) else VersionList()
- # range - range -> range or nothing.
- max_lo = max(self.lo, other.lo)
- min_hi = min(self.hi, other.hi)
- return ClosedOpenRange(max_lo, min_hi) if max_lo < min_hi else VersionList()
+ raise TypeError(f"'intersection()' not supported for instances of {type(other)}")
-class VersionList:
+class VersionList(VersionType):
"""Sorted, non-redundant list of Version and ClosedOpenRange elements."""
- def __init__(self, vlist=None):
- self.versions: List[StandardVersion, GitVersion, ClosedOpenRange] = []
- if vlist is not None:
- if isinstance(vlist, str):
- vlist = from_string(vlist)
- if isinstance(vlist, VersionList):
- self.versions = vlist.versions
- else:
- self.versions = [vlist]
+ versions: List[VersionType]
+
+ def __init__(self, vlist: Optional[Union[str, VersionType, Iterable]] = None):
+ if vlist is None:
+ self.versions = []
+
+ elif isinstance(vlist, str):
+ vlist = from_string(vlist)
+ if isinstance(vlist, VersionList):
+ self.versions = vlist.versions
else:
- for v in vlist:
- self.add(ver(v))
+ self.versions = [vlist]
+
+ elif isinstance(vlist, (ConcreteVersion, ClosedOpenRange)):
+ self.versions = [vlist]
+
+ elif isinstance(vlist, VersionList):
+ self.versions = vlist[:]
- def add(self, item):
- if isinstance(item, ConcreteVersion):
+ elif isinstance(vlist, Iterable):
+ self.versions = []
+ for v in vlist:
+ self.add(ver(v))
+
+ else:
+ raise TypeError(f"Cannot construct VersionList from {type(vlist)}")
+
+ def add(self, item: VersionType) -> None:
+ if isinstance(item, (StandardVersion, GitVersion)):
i = bisect_left(self, item)
# Only insert when prev and next are not intersected.
if (i == 0 or not item.intersects(self[i - 1])) and (
@@ -755,16 +947,22 @@ class VersionList:
elif isinstance(item, ClosedOpenRange):
i = bisect_left(self, item)
- # Note: can span multiple concrete versions to the left,
- # For instance insert 1.2: into [1.2, hash=1.2, 1.3]
- # would bisect to i = 1.
- while i > 0 and item.intersects(self[i - 1]):
- item = item.union(self[i - 1])
+ # Note: can span multiple concrete versions to the left (as well as to the right).
+ # For instance insert 1.2: into [1.2, hash=1.2, 1.3, 1.4:1.5]
+ # would bisect at i = 1 and merge i = 0 too.
+ while i > 0:
+ union = item._union_if_not_disjoint(self[i - 1])
+ if union is None: # disjoint
+ break
+ item = union
del self.versions[i - 1]
i -= 1
- while i < len(self) and item.intersects(self[i]):
- item = item.union(self[i])
+ while i < len(self):
+ union = item._union_if_not_disjoint(self[i])
+ if union is None:
+ break
+ item = union
del self.versions[i]
self.versions.insert(i, item)
@@ -789,31 +987,35 @@ class VersionList:
v = self[0]
if isinstance(v, ConcreteVersion):
return v
- if isinstance(v, ClosedOpenRange) and next_version(v.lo) == v.hi:
+ if isinstance(v, ClosedOpenRange) and _next_version(v.lo) == v.hi:
return v.lo
return None
- def copy(self):
+ def copy(self) -> "VersionList":
return VersionList(self)
def lowest(self) -> Optional[StandardVersion]:
"""Get the lowest version in the list."""
- return None if not self else self[0]
+ return next((v for v in self.versions if isinstance(v, StandardVersion)), None)
def highest(self) -> Optional[StandardVersion]:
"""Get the highest version in the list."""
- return None if not self else self[-1]
+ return next((v for v in reversed(self.versions) if isinstance(v, StandardVersion)), None)
def highest_numeric(self) -> Optional[StandardVersion]:
"""Get the highest numeric version in the list."""
- numeric_versions = list(filter(lambda v: str(v) not in infinity_versions, self.versions))
- return None if not any(numeric_versions) else numeric_versions[-1]
+ numeric = (
+ v
+ for v in reversed(self.versions)
+ if isinstance(v, StandardVersion) and not v.isdevelop()
+ )
+ return next(numeric, None)
def preferred(self) -> Optional[StandardVersion]:
"""Get the preferred (latest) version in the list."""
return self.highest_numeric() or self.highest()
- def satisfies(self, other) -> bool:
+ def satisfies(self, other: VersionType) -> bool:
# This exploits the fact that version lists are "reduced" and normalized, so we can
# never have a list like [1:3, 2:4] since that would be normalized to [1:4]
if isinstance(other, VersionList):
@@ -822,9 +1024,9 @@ class VersionList:
if isinstance(other, (ConcreteVersion, ClosedOpenRange)):
return all(lhs.satisfies(other) for lhs in self)
- raise ValueError(f"Unsupported type {type(other)}")
+ raise TypeError(f"'satisfies()' not supported for instances of {type(other)}")
- def intersects(self, other):
+ def intersects(self, other: VersionType) -> bool:
if isinstance(other, VersionList):
s = o = 0
while s < len(self) and o < len(other):
@@ -839,19 +1041,16 @@ class VersionList:
if isinstance(other, (ClosedOpenRange, StandardVersion)):
return any(v.intersects(other) for v in self)
- raise ValueError(f"Unsupported type {type(other)}")
-
- def overlaps(self, other) -> bool:
- return self.intersects(other)
+ raise TypeError(f"'intersects()' not supported for instances of {type(other)}")
- def to_dict(self):
+ def to_dict(self) -> Dict:
"""Generate human-readable dict for YAML."""
if self.concrete:
return syaml_dict([("version", str(self[0]))])
return syaml_dict([("versions", [str(v) for v in self])])
@staticmethod
- def from_dict(dictionary):
+ def from_dict(dictionary) -> "VersionList":
"""Parse dict from to_dict."""
if "versions" in dictionary:
return VersionList(dictionary["versions"])
@@ -859,27 +1058,29 @@ class VersionList:
return VersionList([Version(dictionary["version"])])
raise ValueError("Dict must have 'version' or 'versions' in it.")
- def update(self, other: "VersionList"):
- for v in other.versions:
- self.add(v)
+ def update(self, other: "VersionList") -> None:
+ self.add(other)
- def union(self, other: "VersionList"):
+ def union(self, other: VersionType) -> VersionType:
result = self.copy()
- result.update(other)
+ result.add(other)
return result
- def intersection(self, other: "VersionList") -> "VersionList":
+ def intersection(self, other: VersionType) -> "VersionList":
result = VersionList()
- for lhs, rhs in ((self, other), (other, self)):
- for x in lhs:
- i = bisect_left(rhs.versions, x)
- if i > 0:
- result.add(rhs[i - 1].intersection(x))
- if i < len(rhs):
- result.add(rhs[i].intersection(x))
- return result
+ if isinstance(other, VersionList):
+ for lhs, rhs in ((self, other), (other, self)):
+ for x in lhs:
+ i = bisect_left(rhs.versions, x)
+ if i > 0:
+ result.add(rhs[i - 1].intersection(x))
+ if i < len(rhs):
+ result.add(rhs[i].intersection(x))
+ return result
+ else:
+ return self.intersection(VersionList(other))
- def intersect(self, other) -> bool:
+ def intersect(self, other: VersionType) -> bool:
"""Intersect this spec's list with other.
Return True if the spec changed as a result; False otherwise
@@ -889,6 +1090,7 @@ class VersionList:
self.versions = isection.versions
return changed
+ # typing this and getitem are a pain in Python 3.6
def __contains__(self, other):
if isinstance(other, (ClosedOpenRange, StandardVersion)):
i = bisect_left(self, other)
@@ -902,61 +1104,64 @@ class VersionList:
def __getitem__(self, index):
return self.versions[index]
- def __iter__(self):
+ def __iter__(self) -> Iterator:
return iter(self.versions)
- def __reversed__(self):
+ def __reversed__(self) -> Iterator:
return reversed(self.versions)
- def __len__(self):
+ def __len__(self) -> int:
return len(self.versions)
- def __bool__(self):
+ def __bool__(self) -> bool:
return bool(self.versions)
- def __eq__(self, other):
+ def __eq__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions == other.versions
return False
- def __ne__(self, other):
+ def __ne__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions != other.versions
return False
- def __lt__(self, other):
+ def __lt__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions < other.versions
return NotImplemented
- def __le__(self, other):
+ def __le__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions <= other.versions
return NotImplemented
- def __ge__(self, other):
+ def __ge__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions >= other.versions
return NotImplemented
- def __gt__(self, other):
+ def __gt__(self, other) -> bool:
if isinstance(other, VersionList):
return self.versions > other.versions
return NotImplemented
- def __hash__(self):
+ def __hash__(self) -> int:
return hash(tuple(self.versions))
- def __str__(self):
+ def __str__(self) -> str:
+ if not self.versions:
+ return ""
+
return ",".join(
f"={v}" if isinstance(v, StandardVersion) else str(v) for v in self.versions
)
- def __repr__(self):
+ def __repr__(self) -> str:
return str(self.versions)
-def next_str(s: str) -> str:
+def _next_str(s: str) -> str:
"""Produce the next string of A-Z and a-z characters"""
return (
(s + "A")
@@ -965,7 +1170,7 @@ def next_str(s: str) -> str:
)
-def prev_str(s: str) -> str:
+def _prev_str(s: str) -> str:
"""Produce the previous string of A-Z and a-z characters"""
return (
s[:-1]
@@ -974,7 +1179,7 @@ def prev_str(s: str) -> str:
)
-def next_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
+def _next_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
"""
Produce the next VersionStrComponent, where
masteq -> mastes
@@ -987,14 +1192,14 @@ def next_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
# Find the next non-infinity string.
while True:
- data = next_str(data)
+ data = _next_str(data)
if data not in infinity_versions:
break
return VersionStrComponent(data)
-def prev_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
+def _prev_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
"""
Produce the previous VersionStrComponent, where
mastes -> masteq
@@ -1007,52 +1212,57 @@ def prev_version_str_component(v: VersionStrComponent) -> VersionStrComponent:
# Find the next string.
while True:
- data = prev_str(data)
+ data = _prev_str(data)
if data not in infinity_versions:
break
return VersionStrComponent(data)
-def next_version(v: StandardVersion) -> StandardVersion:
- if len(v.version) == 0:
- nxt = VersionStrComponent("A")
- elif isinstance(v.version[-1], VersionStrComponent):
- nxt = next_version_str_component(v.version[-1])
+def _next_version(v: StandardVersion) -> StandardVersion:
+ release, prerelease = v.version
+ separators = v.separators
+ prerelease_type = prerelease[0]
+ if prerelease_type != FINAL:
+ prerelease = (prerelease_type, prerelease[1] + 1 if len(prerelease) > 1 else 0)
+ elif len(release) == 0:
+ release = (VersionStrComponent("A"),)
+ separators = ("",)
+ elif isinstance(release[-1], VersionStrComponent):
+ release = release[:-1] + (_next_version_str_component(release[-1]),)
else:
- nxt = v.version[-1] + 1
-
- # Construct a string-version for printing
- string_components = []
- for part, sep in zip(v.version[:-1], v.separators):
- string_components.append(str(part))
- string_components.append(str(sep))
- string_components.append(str(nxt))
-
- return StandardVersion("".join(string_components), v.version[:-1] + (nxt,), v.separators)
-
-
-def prev_version(v: StandardVersion) -> StandardVersion:
- if len(v.version) == 0:
+ release = release[:-1] + (release[-1] + 1,)
+
+ # Avoid constructing a string here for performance. Instead, pass "" to
+ # StandardVersion to lazily stringify.
+ return StandardVersion("", (release, prerelease), separators)
+
+
+def _prev_version(v: StandardVersion) -> StandardVersion:
+ # this function does not deal with underflow, because it's always called as
+ # _prev_version(_next_version(v)).
+ release, prerelease = v.version
+ separators = v.separators
+ prerelease_type = prerelease[0]
+ if prerelease_type != FINAL:
+ prerelease = (
+ (prerelease_type,) if prerelease[1] == 0 else (prerelease_type, prerelease[1] - 1)
+ )
+ elif len(release) == 0:
return v
- elif isinstance(v.version[-1], VersionStrComponent):
- prev = prev_version_str_component(v.version[-1])
+ elif isinstance(release[-1], VersionStrComponent):
+ release = release[:-1] + (_prev_version_str_component(release[-1]),)
else:
- prev = v.version[-1] - 1
-
- # Construct a string-version for printing
- string_components = []
- for part, sep in zip(v.version[:-1], v.separators):
- string_components.append(str(part))
- string_components.append(str(sep))
- string_components.append(str(prev))
+ release = release[:-1] + (release[-1] - 1,)
- return StandardVersion("".join(string_components), v.version[:-1] + (prev,), v.separators)
+ # Avoid constructing a string here for performance. Instead, pass "" to
+ # StandardVersion to lazily stringify.
+ return StandardVersion("", (release, prerelease), separators)
-def Version(string: Union[str, int]) -> Union[GitVersion, StandardVersion]:
+def Version(string: Union[str, int]) -> ConcreteVersion:
if not isinstance(string, (str, int)):
- raise ValueError(f"Cannot construct a version from {type(string)}")
+ raise TypeError(f"Cannot construct a version from {type(string)}")
string = str(string)
if is_git_version(string):
return GitVersion(string)
@@ -1065,7 +1275,7 @@ def VersionRange(lo: Union[str, StandardVersion], hi: Union[str, StandardVersion
return ClosedOpenRange.from_version_range(lo, hi)
-def from_string(string) -> Union[VersionList, ClosedOpenRange, StandardVersion, GitVersion]:
+def from_string(string: str) -> VersionType:
"""Converts a string to a version object. This is private. Client code should use ver()."""
string = string.replace(" ", "")
@@ -1094,17 +1304,17 @@ def from_string(string) -> Union[VersionList, ClosedOpenRange, StandardVersion,
return VersionRange(v, v)
-def ver(obj) -> Union[VersionList, ClosedOpenRange, StandardVersion, GitVersion]:
+def ver(obj: Union[VersionType, str, list, tuple, int, float]) -> VersionType:
"""Parses a Version, VersionRange, or VersionList from a string
or list of strings.
"""
- if isinstance(obj, (list, tuple)):
- return VersionList(obj)
+ if isinstance(obj, VersionType):
+ return obj
elif isinstance(obj, str):
return from_string(obj)
+ elif isinstance(obj, (list, tuple)):
+ return VersionList(obj)
elif isinstance(obj, (int, float)):
return from_string(str(obj))
- elif isinstance(obj, (StandardVersion, GitVersion, ClosedOpenRange, VersionList)):
- return obj
else:
raise TypeError("ver() can't convert %s to version!" % type(obj))
diff --git a/pyproject.toml b/pyproject.toml
index d33b27a99c..be97f0421e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -70,17 +70,8 @@ features = [
[tool.black]
line-length = 99
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
-include = '''
- \.pyi?$
-'''
-extend-exclude = '''
-/(
- \.git
- | \.mypy_cache
- | ^lib/spack/external/
- | ^opt/
-)/
-'''
+include = '(lib/spack|var/spack/repos)/.*\.pyi?$|bin/spack$'
+extend-exclude = 'lib/spack/external'
skip_magic_trailing_comma = true
[tool.isort]
@@ -154,11 +145,13 @@ ignore_missing_imports = true
'boto3',
'botocore',
'distro',
+ 'importlib.metadata',
'jinja2',
'jsonschema',
'macholib',
'markupsafe',
'numpy',
+ 'pkg_resources',
'pyristent',
'pytest',
'ruamel.yaml',
@@ -171,7 +164,7 @@ ignore_missing_imports = true
useLibraryCodeForTypes = true
reportMissingImports = true
reportWildcardImportFromLibrary = false
-include = ['lib/spack']
+include = ['lib/spack', 'var/spack/repos']
ignore = ['lib/spack/external']
extraPaths = ['lib/spack', 'lib/spack/external']
@@ -210,6 +203,14 @@ exclude_lines = [
]
ignore_errors = true
+[tool.coverage.paths]
+source = [
+ ".",
+ "/Users/runner/work/spack/spack",
+ "/System/Volumes/Data/home/runner/work/spack/spack",
+ "D:\\a\\spack\\spack",
+]
+
[tool.coverage.html]
directory = "htmlcov"
diff --git a/pytest.ini b/pytest.ini
index 617881d77b..79d187fa70 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -12,8 +12,7 @@ markers =
requires_executables: tests that requires certain executables in PATH to run
nomockstage: use a stage area specifically created for this test, instead of relying on a common mock stage
enable_compiler_verification: enable compiler verification within unit tests
- enable_compiler_link_paths: verifies compiler link paths within unit tests
+ enable_compiler_execution: enable compiler execution to detect link paths and libc
disable_clean_stage_check: avoid failing tests if there are leftover files in the stage area
- only_clingo: mark unit tests that run only with clingo
- only_original: mark unit tests that are specific to the original concretizer
not_on_windows: mark tests that are skipped on Windows
+ only_windows: mark tests that are skipped everywhere but Windows
diff --git a/share/spack/bootstrap/github-actions-v0.4/clingo.json b/share/spack/bootstrap/github-actions-v0.4/clingo.json
deleted file mode 100644
index 1fa83eef1c..0000000000
--- a/share/spack/bootstrap/github-actions-v0.4/clingo.json
+++ /dev/null
@@ -1,334 +0,0 @@
-{
- "verified": [
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "fk6k6buvgbwhwtigvpvi3266gllv7z2o",
- "003eb7b2c62debc0bac4a7f3a3933d6a955520199b37e00c8c0761036d8dc63a"
- ]
- ],
- "python": "python@3.10",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "2ezozohyngzmq74eeclsjupcawg6slse",
- "bf3c559d655d5f04a2b080c640996086db2bb6bbf49f4139eed225a77b574923"
- ]
- ],
- "python": "python@3.11",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "okjsfmgareef7laq432tdtgyu7bshmv2",
- "7beed9fe21b52df6b56d8242b79becab7ed953af16612d6e09c595ef39591ac3"
- ]
- ],
- "python": "python@3.6",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "cv7nf5ti72ywciapdy6mn7cemqv766zy",
- "6af9e548044e4849794ee85008c8b19539b63857510c6fff544de7ccb6e53ee8"
- ]
- ],
- "python": "python@3.7",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "ing4swsz5bj7guqffc277zitcky4uhu4",
- "4d9008372c73797fc0bd47c92c922f810e1b3fd44dc373682a7a0780b711058c"
- ]
- ],
- "python": "python@3.8",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "p2cyqcsow6k6prfryoqb7usv27hhofuq",
- "5e4fd1fc552d815ce8db8b8917d9089c7782a92269754f8ca5d4f01a9406244d"
- ]
- ],
- "python": "python@3.9",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "5bfjmclf6sktj4drclxe7rdwdthlkxw3",
- "b811e62f82b564e9cd5e12fc3cdb19b3d4e5f2bdb98985e1bbe3d1bbd5dd3d5c"
- ]
- ],
- "python": "python@3.10",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "bwmaj7wyyiivvkq5j72mholmhmytb2fl",
- "468da2198479514bbbf66f4268716bce38cace1004a612bc669d21d97c596f85"
- ]
- ],
- "python": "python@3.11",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "ewhsk7bcohduujp5t7hljb5uk2mfbk7k",
- "919cbfc82bbb08da207e22bec4d8047c34042b90d58b9c6b438b5dcef0046e39"
- ]
- ],
- "python": "python@3.6",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "263aqtzhrgzmzgpfekda7uk6wdqez76j",
- "b9e579ee2a848f7287a8b625459ac5b8ce19e9e6858a86b53effaa4ae712d1b6"
- ]
- ],
- "python": "python@3.7",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "yqqiddbmi2pyxgu757qfvts6hlt6525q",
- "254ab94d48543472ad8a32f598dc869c49051a0b890951d7de8425c7549caa26"
- ]
- ],
- "python": "python@3.8",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "plv3woz7rwmixdo42ew27imtqqjqnnv5",
- "ec494e7043433fac6f8f404e023eea397197ff0928bf1c3f3cc0bc62d549334c"
- ]
- ],
- "python": "python@3.9",
- "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "domcqyr4qx2yl3433l5dycnehastl7zc",
- "fbfc1fc14f27bbabe36a438dd70515067dbd7e0873bc748b9f34d576d5400cb4"
- ]
- ],
- "python": "python@3.10",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "b5m7ectjiuucgaoyry24hhop44edjvg7",
- "5412e2b3f45d251acd976c12d238549e0c324e6481bf328f9547fafc0e810daf"
- ]
- ],
- "python": "python@3.11",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "h2uxdiwlbvrfsz5mlt2s2xvnefbuk7qx",
- "4cf26cd903fe0034522e1d8a712ab7a6ae936961c1c010473ff15566665cef6b"
- ]
- ],
- "python": "python@3.6",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "4ksotxknsesu4mv2bio5ndtilo423cpy",
- "9281ca638e2ec5c0b6d3ae050827a1c3696251a6274e96f3a8a89a1fdf7f0ba2"
- ]
- ],
- "python": "python@3.7",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "ho7jg4bl7degmnnnj6x6fatbcno37kqo",
- "0e78a555839fbd3752473ed80c76be9007b6ce3f152fa69d8014b172e339b92f"
- ]
- ],
- "python": "python@3.8",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "oztu77xbgiige4pp2epmbqrmxt4vwnla",
- "5271b271a2f6ae26838614477b2b8e5f230bceda7e0eb63f2cc36b18da3ba53d"
- ]
- ],
- "python": "python@3.9",
- "spec": "clingo-bootstrap%gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "33qaxq2adjrlv6ttxbu6bmueundhns2w",
- "5fa731b84e354b8108ac4b7205d40e8c1a74cb2dfd590dd2d648d744a8556a1d"
- ]
- ],
- "python": "python@3.10",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "vwhszkap6e2zbzb74ywgyggflkmtavwz",
- "09eed0c9b98681173f512385675f44d070cb5ebc3e08aac659a12ea1ec41d05a"
- ]
- ],
- "python": "python@3.11",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "3pst4dqux2clmm3mpjj4jkowv3s2ixv6",
- "f9d9ade557ed426f55308dd14b43c59e1b51b8f40c9847d00994a3a89182a846"
- ]
- ],
- "python": "python@3.6",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "6wk7qj2hdglt2sjtec4mv7ibsvhw53ge",
- "e06a3190e60b1d0c4d4b8f01b7a2ade9d2d3d8fdaf84757cc9741e81a5ad59a3"
- ]
- ],
- "python": "python@3.7",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "k2kch7a6j7ilikuklhyffkqhdqb46yt5",
- "2547727ce0b8295594dfa56b711631b8ab221a19c4cbd19341539b929693b0cb"
- ]
- ],
- "python": "python@3.8",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "ivzizagt74uqxrp2mri5lbqiqkhab77p",
- "2ddd5daeeabfc3b2a211f7efb3cc700991c5817b08b19c2d315084198f7d2bc8"
- ]
- ],
- "python": "python@3.9",
- "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "idkenmhnscjlu5gjqhpcqa4h7o2a7aow",
- "44c88094abb239dd33b75c02c24fefe7f4f5646c2371f50a5bfb47b23805760b"
- ]
- ],
- "python": "python@3.10",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "cizcjj3tx4irs3uzoktrgybq73sz545f",
- "d8c8d4accece4e10a4339b263ff42f0f0adc77b3fbeea1010b3d7fc48aead5b3"
- ]
- ],
- "python": "python@3.11",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "prqkzynv2nwko5mktitebgkeumuxkveu",
- "3059fb60ff3b2dd5b36a46af37972b479fbfad348c30ec2e6b59729d93f07eed"
- ]
- ],
- "python": "python@3.6",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "axtxtavfahxuazw2wueu3tjwwu6ttdfo",
- "281cf24d0a8f2372b348bb1a38a9bfd1516063f597ffdecfde6e8e3aa4e2139f"
- ]
- ],
- "python": "python@3.7",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "ba5ijauisd3uuixtmactc36vps7yfsrl",
- "ea5960f47f48daeb62e6ebf7d8574ceb4bfccff6e2bae17571b0857bfd7a0bbc"
- ]
- ],
- "python": "python@3.8",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- },
- {
- "binaries": [
- [
- "clingo-bootstrap",
- "gqcctd2ejbgvyvyt4umqpetfoogfycwu",
- "8358d72dd5de00a1b7a7ffb88ba366a01ce9b700245d2940eae7395fec0e6fda"
- ]
- ],
- "python": "python@3.9",
- "spec": "clingo-bootstrap%gcc platform=linux target=x86_64"
- }
- ]
-} \ No newline at end of file
diff --git a/share/spack/bootstrap/github-actions-v0.4/gnupg.json b/share/spack/bootstrap/github-actions-v0.4/gnupg.json
deleted file mode 100644
index 5237d8729a..0000000000
--- a/share/spack/bootstrap/github-actions-v0.4/gnupg.json
+++ /dev/null
@@ -1,254 +0,0 @@
-{
- "verified": [
- {
- "binaries": [
- [
- "zlib",
- "azrxnl6yp7xeapfy7nljiopucaelofuh",
- "c3f28571947a41d3c9fb0da0b340b51bdef6b9e05a59e6df7c9bc5838bacd81a"
- ],
- [
- "libiconv",
- "id44zneq3nh4grvtekqoefl24okct4ak",
- "8cf48050c8d58dc0e1d11c8b3b9d970586e1f62933f8655982f4312d1e4426ea"
- ],
- [
- "npth",
- "lp7fobvpwlk3xugo7th2kmcnrvqqxb3b",
- "ec4dda80a2485e0eda5b1ef09e6b8b020283b00ab6252981722979af04ce2ba8"
- ],
- [
- "libassuan",
- "trhqsquxpocecfgkeif5bh2dwgu4njbp",
- "33f15821d6e41238de58f2237d3e1be46b657e3337cbe73f87973fe970ab36fd"
- ],
- [
- "libgcrypt",
- "eadvdhou2xjdhf47x3q5x2ypa4qhfqjy",
- "f0d1d6b3cef5794933b78df3446ac71bdd0cc79b81a26fc33153ef13819e6b09"
- ],
- [
- "libgpg-error",
- "yg67vozcaac75p3dnhd6c3cjpa5nsfjo",
- "fe907bce097dec72a92a1973d73253d9e4ce4bd78ed14f8d6e647dd8e77eef15"
- ],
- [
- "libksba",
- "m7o6qwsu2gxvlka2jbd5puzwj3z553ob",
- "69d324a77b550a6c7a201f3f39835df4f14534fcf5fa28628c14039bfdb39dda"
- ],
- [
- "pinentry",
- "6m36xv6ft3yterimp6xoozz66ych5eew",
- "0b82a4b52a6bc5e6fd4913f585455ea703e0fa5c85fd9f4bb1eb5819af5084e1"
- ],
- [
- "gnupg",
- "pyrfgqkgltgfk4yljfw2myxn6vqen2j6",
- "3c41b0cf2db01ad2675f27d51edb4cf7f798be9ca0e3ac781990ff8b462cd8f6"
- ]
- ],
- "spec": "gnupg@2.3: %apple-clang platform=darwin target=aarch64"
- },
- {
- "binaries": [
- [
- "libiconv",
- "f6om5cmewxrhzpowei3m2g2qnijvlep4",
- "ab891ac21bc9cf44723993232ce3fff6fe75d003dfb88077dea630e532db123f"
- ],
- [
- "npth",
- "tvebgs23dhejixfe36dufivhkwnyxh3t",
- "95b9852c2e69f18fb8eff3dc6fc2bb9efe38821314cac6c310523da89c8346a2"
- ],
- [
- "zlib",
- "rlzphstv75due7yzcicuu7nfos5zuk2q",
- "e5ee87fab6e51b46ab1fb1cedafc4edee380a810947d52e669a185b52636aa37"
- ],
- [
- "libassuan",
- "ow5h7we5zrgoknsvss3yjjs4g3aci4b2",
- "44cf47134b4e4cbad30b8f4ef5ac1e7e25ead1d4dc64bd44fe807a4f173977ad"
- ],
- [
- "libgcrypt",
- "nuy3jjihjlktwggpwdrert2q5xoqk4ic",
- "ebb85da4d0b4ea93e073b8faf11e4ec955752a589b0ee47cd46b825ef685e536"
- ],
- [
- "libgpg-error",
- "w7xfbrbfdnssbfoxrsz4emt6aildxsfy",
- "6973cd597db96830822a8111fe3b3cff271e8cedc26fb0cb48443c2de2cc50ad"
- ],
- [
- "libksba",
- "74h62c57ojgmqqp6xrrrzmzgftmcv22c",
- "73afeb0bfdf57623d694ea16b52e1d73bfca61954583d6737f4ab6ab05c92ca8"
- ],
- [
- "pinentry",
- "dv7sj3xesjfhqbrcxorvbzoxzlqpac4e",
- "509d6881145a33b7de69db63af84fe887e7c995ffd4e89003a25fafa45b5874b"
- ],
- [
- "gnupg",
- "hrv7rjtbvuxkt4trjdnzovegwutciunv",
- "bf39c84047508556e142b9a9808007bbcc9aa80b2b9936a3598530f5acc7c75a"
- ]
- ],
- "spec": "gnupg@2.3: %apple-clang platform=darwin target=x86_64"
- },
- {
- "binaries": [
- [
- "zlib",
- "mrdyh4e34orgypetqhru6romj6wlvyxm",
- "ecd344c5dcae7377d8b20f14248a73d1fe350e54364f2f1e70aa4fccf1c219ed"
- ],
- [
- "libiconv",
- "iuparzfnzuwmmhj5ytlhaobn4nz3cct4",
- "58ef399a4bd8794a00314440e02de8c685c9c02d1b02a751923ae669556a1a91"
- ],
- [
- "npth",
- "eltd4b6tq4gsnboeidmr7mykezykcho5",
- "89b3e0c7f573009d4816b219413a07a9917758836befdfeb6c33a9e87d846b6f"
- ],
- [
- "libassuan",
- "xfaguxawrc6z73draba5fccjxtxjvzmz",
- "59ebe715532a2671cde9783aceebb1448062e7adb7307da30b0d6245529d897f"
- ],
- [
- "libgcrypt",
- "ntb2fzwckdgb77eubdcvvj2xm5eilavw",
- "92fb1ef0d57c98b16e172c6afbc995dd163f0bac1484eb11eef5305f434a5cd1"
- ],
- [
- "libgpg-error",
- "utzxfplsbueqmj7ksxaykk6tk3xi5dmr",
- "74aa95bc48c42eab0a8ca0afab51074811bf79477271123af13398029ac7394f"
- ],
- [
- "libksba",
- "jzxmzebonsgrw5e6ij446azzocvko2vi",
- "bfc11401fc94d3f6d3176fa4b95dd866ad355c0b77b9c5787acbfdffe42915b9"
- ],
- [
- "pinentry",
- "wsjzc3l5zgieowd24p2paccrporun5cv",
- "db3e475b2113ad9587017a76c9df57fc537d2dd6c5d3323119c30723b5b51330"
- ],
- [
- "gnupg",
- "zigabpppmz5ctktqwdj5ueaxjuvm6syh",
- "fd8a681dfa919d8faff256fabafe1f08238cc75c74cbcfc44acce23cf0afb34c"
- ]
- ],
- "spec": "gnupg@2.3: %gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "zlib",
- "c4kbhgxjlko6a367d3zl6b5qcm5swiew",
- "49747756dea8dd15fc3ea8f73d03b24724fa6b22103f04b557152db59c17f799"
- ],
- [
- "libiconv",
- "5l5cq7de7iwagndyyphpdmvdvp3pepe6",
- "a46d2a89cab00d8196e6226f3831bc3ff8b7f728844d6d29013cc8999d7b7f78"
- ],
- [
- "npth",
- "b6ifa47mma7n7mxl36yg73uwjqezbde5",
- "1b16e28e692ca91a096da4976f7df451df5e3ea9aa2f03cc2d39f62646a9399b"
- ],
- [
- "libassuan",
- "phds2cjgeo3sbluuvdj6ebdkuom6un6p",
- "482bf3a4975e21e03b7d34ff69031071a2822fb182774421f648ed7ccc99f24d"
- ],
- [
- "libgcrypt",
- "7hgqgoekgh4jiml2u55rg2zec3ouyq7z",
- "edfa277010de9f060bbcb11c2011dd66fb6e714c28a189d7cd7ef2d825e85180"
- ],
- [
- "libgpg-error",
- "th2tzwwoz7ddrygkjrxzzv4yvznxglmx",
- "e7c645287270ae2ac08ff5d400bf44b2e79203e752c3ff32aed07200638a6fe0"
- ],
- [
- "libksba",
- "ex5gt36shiwt54jg7mbgxysnwu7jjy6a",
- "8cf350544821bfec19e2b52a47896ca9258fc56680e4bb0d12715416169ead4a"
- ],
- [
- "pinentry",
- "aowc7abd6kvohdohxz4j225q2hh743cq",
- "ad336a7eee41eebd6b8e667e7ef673b64088c0553492567245653ac6c07fdb46"
- ],
- [
- "gnupg",
- "7i7j24llnlzwpwrfumulorq6ucx2ku2f",
- "a743ffd0698db5329a8231d25fa2e13b88f63cf85198664794a91df7a2c48632"
- ]
- ],
- "spec": "gnupg@2.3: %gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "libiconv",
- "vyvyow3bnokashj3wntl7pgm5nc4h7vw",
- "4fb8c1a563975f339b2e98e4c5c6cd98d629bc94fcf57b8e92beedae17a4584d"
- ],
- [
- "npth",
- "opncvl75zv6njawkgtxgt4yhii65f5nx",
- "24b442a6f2cc28176a4f742d961807e5ffd853d2f9d65175944b6aa8b47d91e2"
- ],
- [
- "zlib",
- "dcixs2nytw7vlthk55mwvog7veypnuor",
- "6ab7018b621783c971192e46b6a3e2764b638b5ab5c2f3c62af24afd5a9039e0"
- ],
- [
- "libassuan",
- "yk2555moxgj3dro6edznumguezecriso",
- "ebde470fee06e5ad7527dca0eb3689ae13b7299229b51e64f97ff87b9daf9160"
- ],
- [
- "libgcrypt",
- "imws5ss7coeeo45zr6w54xnwjfjm4cc6",
- "ad20c2974c90717efa8a4c27781e5f4c14d60527dc1c224fd2e113fe52d3e958"
- ],
- [
- "libgpg-error",
- "nbhvf75esgtjeu6nh57gu6mnikiazmjt",
- "ec9f59c684dc4054706217952b8ddf610e4277ec8031c92640f086959dcf756e"
- ],
- [
- "libksba",
- "cx425tk5tnod3523zj4izloqibr44frz",
- "b2465fecbca3d022cf068766a9c01c72f6a68f9b58e78375f687b1273f6c683c"
- ],
- [
- "pinentry",
- "pto3uq53xwl7dtbvycdp4qccacrrzs3r",
- "bd9ae21dff99c34165baa680df4b4b36339e207fec2ac4fcc80103d774a1dd84"
- ],
- [
- "gnupg",
- "5mhxefklns5hpdai3jn3rsf23kz4nol6",
- "8a21155078dc51fdee7990326335e9f99192da0eb4b3490260a7399e30f20243"
- ]
- ],
- "spec": "gnupg@2.3: %gcc platform=linux target=x86_64"
- }
- ]
-} \ No newline at end of file
diff --git a/share/spack/bootstrap/github-actions-v0.4/patchelf.json b/share/spack/bootstrap/github-actions-v0.4/patchelf.json
deleted file mode 100644
index cab4285108..0000000000
--- a/share/spack/bootstrap/github-actions-v0.4/patchelf.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "verified": [
- {
- "binaries": [
- [
- "patchelf",
- "kjmrsrd7akfwzlejzsdyoun7fwgmvjgk",
- "2c1975adb6fbd42bdb960b67fa6b32bc2846a28e5d293d2ca7b44a38f49ecf4f"
- ]
- ],
- "spec": "patchelf@0.13: %gcc platform=linux target=aarch64"
- },
- {
- "binaries": [
- [
- "patchelf",
- "gxxogiws7fmzkbdc26k24id3aplly6wi",
- "d45ac6b9045d510861fda0cfaa5c04d71f316df5784376f2d2915ab134619c1b"
- ]
- ],
- "spec": "patchelf@0.13: %gcc platform=linux target=ppc64le"
- },
- {
- "binaries": [
- [
- "patchelf",
- "p72zyan5wrzuabtmzq7isa5mzyh6ahdp",
- "ed7ebae3399d96c8d2f4b38ce6f2da52d8b73b312c73babae880ed3467b464b4"
- ]
- ],
- "spec": "patchelf@0.13: %gcc platform=linux target=x86_64"
- }
- ]
-} \ No newline at end of file
diff --git a/share/spack/bootstrap/github-actions-v0.6/clingo.json b/share/spack/bootstrap/github-actions-v0.6/clingo.json
new file mode 100644
index 0000000000..6db902e1bc
--- /dev/null
+++ b/share/spack/bootstrap/github-actions-v0.6/clingo.json
@@ -0,0 +1,384 @@
+{
+ "verified": [
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "54jmcv6ecepywqv7bdpbfm2mrsarrjio",
+ "ff7f45db1645d1d857a315bf8d63c31447330552528bdf1fccdcf50735e62166"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.10"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "i2cye2tc752emxaeovjnrljbcz4gjr7j",
+ "e7491ac297cbb3f45c80aaf4ca5102e2b655b731e7b6ce7682807d302cb61f1c"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.11"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "5bsjop6yb3oqfi2mopjaufprqy5xaqtv",
+ "91214626a86c21fc0d76918884ec819050d4d52b4f78df7cc9769a83fbee2f71"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.12"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "unriyx5k5mu2o6nqwtaj254heazbiwyk",
+ "db596d9e6d8970d659f4be4cb510f9ba5dc2ec4ea42ecf2aed1325ec5ad72b45"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.13"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "6ikikftldgnbrirhbo27v4flseuo34j3",
+ "a7ed91aee1f8d5cfe2ca5ef2e3e74215953ffd2d8b5c722a670f2c303610e90c"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.8"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "pl5t4qtmufwrvek37mrorllf6ivnwztc",
+ "c856a98f92b9fa218377cea9272dffa736e93251d987b6386e6abf40058333dc"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=aarch64 ^python@3.9"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "cvxik6sx7niravyolfrrxayo2jywhv5p",
+ "d74cc0b44faa69473816dca16a3806123790e6eb9a59f611b1d80da7843f474a"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.10"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "chkx4n66gfa7ocewytj4bdqafp2czdwm",
+ "2cb12477504ca8e112522b6d56325ce32024c9466de5b8427fd70a1a81b15020"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.11"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "agrdoajzabs2am6q36lcrquihfb4d5xv",
+ "4e73426599fa61df1a4faceafa38ade170a3dec45b6d8f333e6c2b6bfe697724"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.12"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "56am5pmigql665hjjc2rnvtqd6dteni6",
+ "4309b42e5642bc5c83ede90759b1a0b5d66fffa8991b6213208577626b588cde"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.13"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "s727fhuqz2vgtlhmgviyihlqcm3vbgkx",
+ "1feeab9e1a81ca56de838ccc234d60957e9ab14da038e38b6687732b7bae1ff6"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.6"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "zo56jqvyt4y3udj6tsksbpm7bqoxob5g",
+ "1149ab7d5f1c82d8de53f048af8aa5c5dbf0d21da4e4780c06e54b8ee902085b"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.7"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "zkox3jrbdmbpu7j52ftcvqctjmymgp5j",
+ "d6aeae2dbd7fa3c1d1c62f840a5c01f8e71b64afe2bdc9c90d4087694f7d3443"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.8"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "scm5ujivfo5tt2dzurxcjf6qbme6dvol",
+ "81ef2beef78f46979965e5e69cd92b68ff4d2a59dbae1331c648d18b6ded1444"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%apple-clang platform=darwin target=x86_64 ^python@3.9"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "7utceuvi4eofoi2qr5vizbiv27fqewgi",
+ "3d0830654f9e327fd7ec6dab214050295dbf0832f493937c0c133e516dd2a95a"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.10"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "tipiheccz3kpqwmcmqdc6jwuedv4z4ip",
+ "941b93cd89d5271c740d1b1c870e85f32e5970f9f7b842ad99870399215a93db"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.11"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "jxz7beqjkrpd6d2fcbsxh6etf42e5jmu",
+ "8ca78e345da732643e3d1b077d8156ce89863c25095e4958d4ac6d1a458ae74b"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.12"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "qy5ak2wdmlepkuoygweyzbh42njy6yhc",
+ "f6ced988b515494d86a1069f13ae9030caeb40fe951c2460f532123c80399154"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.13"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "klvkzwpf5dzfa3s47zabngev6wehsnvw",
+ "c00855b5cda99639b87c3912ee9c734c0b609dfe7d2c47ea947738c32bab6f03"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.6"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "udskqrr4z7wden3yimui65ulo47j6ytf",
+ "aa861cfdf6001fc2da6e83eecc9ad35df424d86d71f6d73e480818942405ce4e"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.7"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "4oeblhznejucmsdqpqa4uyh7txgyqxol",
+ "cb7807cd31fc5e0efe2acc1de1f74c7cef962bcadfc656b09ff853bc33c11bd0"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.8"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "a5mztd53ktxnhvzkr3lqaceuw2tmi3bv",
+ "36e5efb6b15b431b661e9e272904ab3c29ae7b87bf6250c158d545ccefc2f424"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=aarch64 ^python@3.9"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "kavipyeuasn4om6jokka3kcdhgdtrhvi",
+ "bd492c078b2cdaf327148eee5b0abd5b068dbb3ffa5dae0ec5d53257f471f7f7"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.10"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "5v5c245vawyuc6urmp3roehey2kubd6h",
+ "0ebe5e05246c33fc8529e90e21529b29742b5dd6756dbc07534577a90394c0e6"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.11"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "whdxnb2jug463enpge2hevrjwhv7hbhg",
+ "9f97d3bf78b7642a775f12feb43781d46110793f58a7e69b0b68ac4fff47655c"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.12"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "6enkeu44ymdslkubguw4qyfvreg57j42",
+ "e7295bb4bcb11a936f39665632ce68c751c9f6cddc44904392a1b33a5290bbbe"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.13"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "rvr5ybhzcowbbjeyxlmkltdxxaua6ffh",
+ "c44e7fbf721383aa8ee57d2305f41377e64a42ab8e02a9d3d6fc792d9b29ad08"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.6"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "u5hxe3p62gynloaxhw2mjjgyvdgbrxvb",
+ "965ba5c1a42f436001162a3f3a0d1715424f2ec8f65c42d6b66efcd4f4566b77"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.7"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "vhj724hodvecmzic5us422o5gc4vlkuc",
+ "c8d31089d8f91718a5bde9c6b28cc67bdbadab401c8fdd07b296d588ece4ddfe"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.8"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "l2il7xee3xm5x7xpzz7mnslw7kcxcmk6",
+ "ef3f05d30333a39fd18714b87ee22605679f52fda97f5e592764d1591527bbf3"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=ppc64le ^python@3.9"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "4pi6zqqe2vm6ehc7qb4se3ql53m6relx",
+ "a4abec667660307ad5cff0a616d6651e187cc7b1386fd8cd4b6b288a01614076"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.10"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "4ojfyzobwptp3numvphbxpgp3okdolur",
+ "a572ab6db954f4a850d1292bb1ef6d6055916784a894d149d657996fa98d0367"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.11"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "et3twemsecqryfzl23e3cmsbca534dlo",
+ "97f8ea17f3df3fb38904450114cbef9b4b0ea9c94da9de7a49b70b707012277a"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.12"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "adriuktssyp63nfzum5e33vpu645oq4m",
+ "6599ac06ade0cb3e80695f36492ea94a306f8bde0537482521510076c5981aa0"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.13"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "a4oyom2bc4go3floq7jlymc2l745w7vl",
+ "90b7cf4dd98e26c58578ad8604738cc32dfbb228cfb981bdfe103c99d0e7b5dd"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.6"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "nzya47loljbytn5utgbeaa2zmcvnfc6o",
+ "dc5dbfd9c05b43c4992bf6666638ae96cee5548921e94eb793ba85727b25ec59"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.7"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "hnnz6aop244yvwkx6vahauz3wprb26s3",
+ "e8518de25baff7a74bdb42193e6e4b0496e7d0688434c42ce4bdc92fe4293a09"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.8"
+ },
+ {
+ "binaries": [
+ [
+ "clingo-bootstrap",
+ "fs2aukvaiwysb3ob4zosvuwnkmfwxyoq",
+ "0c5831932608e7b4084fc6ce60e2b67b77dab76e5515303a049d4d30cd772321"
+ ]
+ ],
+ "spec": "clingo-bootstrap@spack%gcc platform=linux target=x86_64 ^python@3.9"
+ }
+ ]
+} \ No newline at end of file
diff --git a/share/spack/bootstrap/github-actions-v0.6/gnupg.json b/share/spack/bootstrap/github-actions-v0.6/gnupg.json
new file mode 100644
index 0000000000..c6e5808dab
--- /dev/null
+++ b/share/spack/bootstrap/github-actions-v0.6/gnupg.json
@@ -0,0 +1,269 @@
+{
+ "verified": [
+ {
+ "binaries": [
+ [
+ "libgpg-error",
+ "lwnk6k2j2pthv4zq3bl6cu2rbr5lqkp7",
+ "221b34bd62482f8afa64daa95466a61300674c81ed31aebb7f870f4e516407a1"
+ ],
+ [
+ "libassuan",
+ "gknfboyunz7tbc5j3nbdwft2s77tzmv2",
+ "47c742a837ff2d6e920a89a1e2556f996c3c22a1e098f9b0e0f7cc3f9e675222"
+ ],
+ [
+ "libgcrypt",
+ "2zniebgjgx44waicsbfmh2ywz72gw2hi",
+ "6eaed68c849c65d3f5351b67fd8c323a51caddc52918281b71706c472f281b26"
+ ],
+ [
+ "libiconv",
+ "l6yjt5xint3rspq7yytsl7iwvn5tuey3",
+ "26ceaa73955e9f335bbbfd8aafc043605475154eb98d8118992224ed6696c1ad"
+ ],
+ [
+ "libksba",
+ "xh7k7t5lqz6vjfugrpd4pjfdsom75trx",
+ "e3f617fcf144639b8fb3cd1e4d32f7fcdb38d345ab26ffc920732d731b991625"
+ ],
+ [
+ "npth",
+ "pbgogmpojgqzgpzzci7gk7hloorinxew",
+ "3c3b6a2f008b5eec639382e384735203675600d06b4de89d58c36428016e4465"
+ ],
+ [
+ "pinentry",
+ "66hrxsdpjdqt6wmnpmi5mh5ifeyb7cgg",
+ "d9843ab0324bea08d83455b6117a6fe82a6dcaa2106ba305e72c25c3bb26a17e"
+ ],
+ [
+ "zlib-ng",
+ "cjfe7flqc6o2bfacxxwgqx4lpgqsv55e",
+ "7c02ff1bbac5dc24863cea28f15d06772c5434ee99a85a31a3475ae3c4f2d4b0"
+ ],
+ [
+ "gnupg",
+ "eoavahhxqjlexz4wr3aanix724gamayu",
+ "61bcb83dc3fc2ae06fde30b9f79c2596bd0457cf56b4d339c8c562a38ca1c31f"
+ ]
+ ],
+ "spec": "gnupg@2.4.5%apple-clang platform=darwin target=aarch64"
+ },
+ {
+ "binaries": [
+ [
+ "libgpg-error",
+ "op3m3ketzr2qqzazpoe35uc3c53tceqo",
+ "9345e8709a34591cb8ed70441ff5b95fd0de62f5038b3ff72aa21efeea882c14"
+ ],
+ [
+ "libassuan",
+ "x7mrkmkxj3x5mcajpk36xroktc2vqhbb",
+ "60a19ab82bbd3b69bcd53287621617e0223bfefa7568572e247f3dfbac863717"
+ ],
+ [
+ "libgcrypt",
+ "at6lwhcuxttxx2erckiwee4fb7txsupd",
+ "88d2ff68b041ca4d3923c1d657a670115f88735ef99a48d2bb1ea47420a183c1"
+ ],
+ [
+ "libiconv",
+ "clwajtbwgb23uzaci26bcisj64jas33d",
+ "d5af1715ca62225765980389e79cae4a1347bd7e8a9e0ad29f53a2ff1e3fba7a"
+ ],
+ [
+ "libksba",
+ "x3h5xtrsmdhcv5rwsbrn6cwdt7kynxkl",
+ "be0748d370f38a55ccb458e43a95739b0494d1755189a87a062d99508ca4c756"
+ ],
+ [
+ "npth",
+ "c3yv6do52jtfeqtxbcdssxslbwh2l67c",
+ "c19dab06efd6ef9476e299b009d41bbe0d0c3df634d4bc55db18c78f3036afde"
+ ],
+ [
+ "pinentry",
+ "a25ckvveduyxqrrmaybwnn65dh35eusc",
+ "fc1af850dcc056c14aba5595ccb2d48ccc4d14ddedbc85cf20928ef2805b213e"
+ ],
+ [
+ "zlib-ng",
+ "uum7mskvdekjxwozkmdqk3joy6hnan3g",
+ "de2faff7c427305a00a62d66bba39393591841044a2feb861045c7961595d0fc"
+ ],
+ [
+ "gnupg",
+ "7bmrigo4rsorm5d6byrcgxqerxofugoj",
+ "3d36bce8bbd06134445aa3cefa00a80068317b6d082d2b43bb1e3be81ede5849"
+ ]
+ ],
+ "spec": "gnupg@2.4.5%apple-clang platform=darwin target=x86_64"
+ },
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "vytidi6v26yjvwdbycga2asyx5363kf3",
+ "8c0b786bed22505e2360fb0eaf1f38f9cdd8a96ff19a9bea84e4acbbad1e32f6"
+ ],
+ [
+ "libgpg-error",
+ "cuagrnba4umsm33umta5rmjpkazt2i5u",
+ "794fed3932cee4e0b48e27cf2d8627135b88c0961730b384e10af1b484db0e6d"
+ ],
+ [
+ "libassuan",
+ "uuxij4hqsvuv5h54iaofcr3tpv44thks",
+ "72c9cfccf2d01ad9fb495da573de49a08673e751ba059d20c8e519f9aa83ef20"
+ ],
+ [
+ "libgcrypt",
+ "lfy732fms7q3j2fpvr3g2gg5lxmgs6jg",
+ "dae98b98735a10c8ef83fc03e0e878a157775c23d5d985266ddca6208cc988ca"
+ ],
+ [
+ "libiconv",
+ "fcsxxmy4hiu3x6hjeh7y3mp4qxmvbcrh",
+ "29084a2aae8e11df683baf12203804d16aba6fd5dff02725654e6ee617bd2994"
+ ],
+ [
+ "libksba",
+ "7kbtasg2faihsxceqpp4jpaf4ec7cgq7",
+ "35065817952b1114ffd9b6ccdd4095c1141eccdd481c4ac5a5f878ba0191ec33"
+ ],
+ [
+ "npth",
+ "jsvxvvflvljwkewvxbebmoc3asos54f5",
+ "79b07e334e9b6d135be42a5b4cf0eb1bf5dcde98b8c3ce6c154bfa4e11abfb95"
+ ],
+ [
+ "pinentry",
+ "erpvp4zmkqmeatet3fxwkrugwjp4nyxc",
+ "91fa16a16ca995ab663b1551f172e5aa91ed15853e37aa7776ce40d08a2fc3e9"
+ ],
+ [
+ "zlib-ng",
+ "j3puqviz7nl3qr3sqwrg7vdb3i4ulqff",
+ "b8190c6af8fda6d5aeaff40e7d0ce11e80f412269706b68e1cf04c97f34b9e83"
+ ],
+ [
+ "gnupg",
+ "iwnwfoopb5rtn45dbsecwoe3w6fsjv6d",
+ "8398592ab0812d8c76a21deca06da4277d05f4db784e129ead7535bb8988faa2"
+ ]
+ ],
+ "spec": "gnupg@2.4.5%gcc platform=linux target=aarch64"
+ },
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "o6nx7ce6pg2fzah2fbwbpbwb6rkhdwc2",
+ "c942c0fb5d4ae8d875b036c1ab6bc09077dad6f2b43fe0621dee84fd47fcdec3"
+ ],
+ [
+ "libgpg-error",
+ "pxc5a72op7zaahwquririwlea5lcowd2",
+ "56dc827ee7db3e1b0a0f2673165d9694d35df82b09e8984a03a21f6a275fb25c"
+ ],
+ [
+ "libassuan",
+ "wjypew3o5cmejlrhsj24kkkh3jxrn35z",
+ "32f056147ca5c240ad10ffd8f36f60d84106bba46f4503a28d0649611f485381"
+ ],
+ [
+ "libgcrypt",
+ "aaodehivfgu6ggtzf3r4vk6do5gt7qg2",
+ "af22cdf4b3ffca0b14c00849a2ad35e2f5c60024214ccc1f733481c7d1535d13"
+ ],
+ [
+ "libiconv",
+ "bv2plgtibp6l6g5eqwupejoaihwjqk3z",
+ "c43ae303cbbc769ea4eb9740728970726fa87fe4e482ca7feb7b909ecba217ab"
+ ],
+ [
+ "libksba",
+ "4zm4wcxegjycsez4jxgfdeyyne6xqb4t",
+ "2623edd57b13b98f83b7bf6a3419bbd29c7574bb72a99c948ff32d9a6b95d6f8"
+ ],
+ [
+ "npth",
+ "4mdvxsguwekd4nus4lczdmcdwo4xpm7h",
+ "1c150c7e99a06cfad733b60c776a06c537ce925234cc567657f3ca79bf668010"
+ ],
+ [
+ "pinentry",
+ "jli5etdru7erjbneygpiinlgbu6hqyiw",
+ "be2f63bb8a6d87a2d6e65699a688200939406f42b93a74e55ae4437b9936d75b"
+ ],
+ [
+ "zlib-ng",
+ "olulf6vptgcleno3kfc3qbfqss4p6dcv",
+ "248e8295fc8af4ced8383846c292c2298248ee7afd20a36195891cfdc3d75363"
+ ],
+ [
+ "gnupg",
+ "5ntq7qgiciy4lwhhqekglg7c7qjlfum6",
+ "cc7e4833af58913fa4ab2b7ce3fdb86d214594d54327c7e4eb4ca3f0784c046f"
+ ]
+ ],
+ "spec": "gnupg@2.4.5%gcc platform=linux target=ppc64le"
+ },
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "7rv2b76tgxqmkwtmngiamwac632cjjba",
+ "b76a4eaef54b24d0ea9b8dfa9392f7ab519f918ae7e1a8bb919539d9adeddbcb"
+ ],
+ [
+ "libgpg-error",
+ "t6pohmnim5vwnysjzc6c2x5xrq34arav",
+ "89976fae1b4d47325d03e6a4b37872b141ac2da77dc8a531afc7d207d86b3dc9"
+ ],
+ [
+ "libassuan",
+ "urbnck3somrr5pmrhf4ifkfxcxgzrq4f",
+ "8feaab6bb0802d799e8e572ea7c903f5827a8af807010e288bbe043ec0b88779"
+ ],
+ [
+ "libgcrypt",
+ "52zd4jcxeilrmlu4tugwkxqd6h6znbj6",
+ "50bb10f9e0317637dcb6f17de59c8c644d259ac15529c8355b9477e323e45cc6"
+ ],
+ [
+ "libiconv",
+ "dy5pmiqcwlvb6yzozs5ajqtox3cfygif",
+ "385fa3a46f1c588aab24bcea3dfc5221dfa143808a2a731aef87a923c2cf05df"
+ ],
+ [
+ "libksba",
+ "dls4psvcy54plnficveje3pisbznkznt",
+ "b565c5439feefe4e40694dfa2f98332a3f16f00d57bb355ad9ffde7c911b23de"
+ ],
+ [
+ "npth",
+ "mldfiqqsswoo4l3ln7vkwpekgji4zwl4",
+ "cb4a08118709bd4cd4f0833f64e143914f0b81e8ae24c0d8a1bdf3a58a768b59"
+ ],
+ [
+ "pinentry",
+ "2ayqizbaee43awjxjdpzmrangyklffp2",
+ "8fe10eddb2bf9cdda7329d098c42c2443d31b041416192eec5fec547d3cb8b84"
+ ],
+ [
+ "zlib-ng",
+ "qodit36c7pa2afqavjguuuyxmur4tels",
+ "d90039074ce13e7ba1708d645bc48a832af78cfb5a197818ff53a45cec628855"
+ ],
+ [
+ "gnupg",
+ "ielaznyuce3qu77r34nwnfjqkk5p3fdz",
+ "418b582f84547504b6464913fba5ba196482e86258081bdeb21af519fe8a2933"
+ ]
+ ],
+ "spec": "gnupg@2.4.5%gcc platform=linux target=x86_64"
+ }
+ ]
+} \ No newline at end of file
diff --git a/share/spack/bootstrap/github-actions-v0.4/metadata.yaml b/share/spack/bootstrap/github-actions-v0.6/metadata.yaml
index 0b483b547b..ca2e9db88f 100644
--- a/share/spack/bootstrap/github-actions-v0.4/metadata.yaml
+++ b/share/spack/bootstrap/github-actions-v0.6/metadata.yaml
@@ -1,8 +1,8 @@
type: buildcache
description: |
- Buildcache generated from a public workflow using Github Actions.
+ Buildcache generated from a public workflow using GitHub Actions hosted on GitHub Packages.
The sha256 checksum of binaries is checked before installation.
info:
- url: https://mirror.spack.io/bootstrap/github-actions/v0.4
+ url: oci://ghcr.io/spack/bootstrap-buildcache-v1
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
diff --git a/share/spack/bootstrap/github-actions-v0.6/patchelf.json b/share/spack/bootstrap/github-actions-v0.6/patchelf.json
new file mode 100644
index 0000000000..4d61766f23
--- /dev/null
+++ b/share/spack/bootstrap/github-actions-v0.6/patchelf.json
@@ -0,0 +1,49 @@
+{
+ "verified": [
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "vytidi6v26yjvwdbycga2asyx5363kf3",
+ "8c0b786bed22505e2360fb0eaf1f38f9cdd8a96ff19a9bea84e4acbbad1e32f6"
+ ],
+ [
+ "patchelf",
+ "mabcw7ya2bjav54wiknzyoftwtkkx2s3",
+ "820b8013b0b918ad85caa953740497e6c31c09d812bd34d087fc57128bfbdacb"
+ ]
+ ],
+ "spec": "patchelf@0.17.2%gcc platform=linux target=aarch64"
+ },
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "o6nx7ce6pg2fzah2fbwbpbwb6rkhdwc2",
+ "c942c0fb5d4ae8d875b036c1ab6bc09077dad6f2b43fe0621dee84fd47fcdec3"
+ ],
+ [
+ "patchelf",
+ "hz6j4rmzm65wov77f7t335tbywy5ebnq",
+ "1569df037ea1ea316a50e89f5a0cafa0ce8e20629bbd07fcc3846d9fecd2451c"
+ ]
+ ],
+ "spec": "patchelf@0.17.2%gcc platform=linux target=ppc64le"
+ },
+ {
+ "binaries": [
+ [
+ "gcc-runtime",
+ "7rv2b76tgxqmkwtmngiamwac632cjjba",
+ "b76a4eaef54b24d0ea9b8dfa9392f7ab519f918ae7e1a8bb919539d9adeddbcb"
+ ],
+ [
+ "patchelf",
+ "o6soxsz4hwdhzzbu4j56zwcclqhram25",
+ "79dfb7064e7993a97474c5f6b7560254fe19465a6c4cfc44569852e5a6ab542b"
+ ]
+ ],
+ "spec": "patchelf@0.17.2%gcc platform=linux target=x86_64"
+ }
+ ]
+} \ No newline at end of file
diff --git a/share/spack/csh/pathadd.csh b/share/spack/csh/pathadd.csh
index 5033df65ca..df46b00f3f 100644
--- a/share/spack/csh/pathadd.csh
+++ b/share/spack/csh/pathadd.csh
@@ -25,8 +25,8 @@ if ($_pa_set == 1) then
eval set _pa_old_value='$'$_pa_varname
endif
-# Do the actual prepending here, if it is a dir and not already in the path
-if ( -d $_pa_new_path && \:$_pa_old_value\: !~ *\:$_pa_new_path\:* ) then
+# Do the actual prepending here, if it is a dir and not first in the path
+if ( -d $_pa_new_path && $_pa_old_value\: !~ $_pa_new_path\:* ) then
if ("x$_pa_old_value" == "x") then
setenv $_pa_varname $_pa_new_path
else
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
index 0c770ee872..07fd16c88b 100644
--- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
+++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-stages: [ "generate", "build", "publish" ]
+stages: [ "generate", "build" ]
variables:
SPACK_DISABLE_LOCAL_CONFIG: "1"
@@ -39,25 +39,20 @@ default:
SPACK_TARGET_PLATFORM: "linux"
SPACK_TARGET_ARCH: "x86_64_v3"
-.linux_skylake:
+.linux_x86_64_v4:
variables:
SPACK_TARGET_PLATFORM: "linux"
- SPACK_TARGET_ARCH: "skylake_avx512"
+ SPACK_TARGET_ARCH: "x86_64_v4"
-.linux_icelake:
- variables:
- SPACK_TARGET_PLATFORM: "linux"
- SPACK_TARGET_ARCH: "icelake"
-
-.linux_neoverse_n1:
+.linux_neoverse_v1:
variables:
SPACK_TARGET_PLATFORM: "linux"
- SPACK_TARGET_ARCH: "neoverse_n1"
+ SPACK_TARGET_ARCH: "neoverse_v1"
-.linux_neoverse_v1:
+.linux_neoverse_v2:
variables:
SPACK_TARGET_PLATFORM: "linux"
- SPACK_TARGET_ARCH: "neoverse_v1"
+ SPACK_TARGET_ARCH: "neoverse_v2"
.linux_aarch64:
variables:
@@ -69,37 +64,32 @@ default:
SPACK_TARGET_PLATFORM: "linux"
SPACK_TARGET_ARCH: "ppc64le"
+.win64-msvc2019:
+ variables:
+ SPACK_TARGET_PLATFORM: "win64"
+ SPACK_TARGET_ARCH: "x86_64"
+
########################################
# Job templates
########################################
.base-job:
variables:
PIPELINE_MIRROR_TEMPLATE: "single-src-protected-mirrors.yaml.in"
- # TODO: We can remove this when we drop the "deprecated" stack
- PUSH_BUILDCACHE_DEPRECATED: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
+ SPACK_CI_CONFIG_ROOT: "${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/configs"
+ SPACK_CI_SCRIPTS_ROOT: "${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts"
rules:
- - if: $CI_COMMIT_REF_NAME == "develop"
- # Pipelines on develop only rebuild what is missing from the mirror
+ - if: $SPACK_CI_DISABLE_STACKS =~ /.+/ && $SPACK_CI_STACK_NAME =~ $SPACK_CI_DISABLE_STACKS
+ when: never
+ - if: $SPACK_CI_ENABLE_STACKS =~ /.+/ && $SPACK_CI_STACK_NAME !~ $SPACK_CI_ENABLE_STACKS
+ when: never
+ - if: $CI_COMMIT_REF_NAME == "develop" || $CI_COMMIT_REF_NAME =~ /^releases\/v.*/
+ # Pipelines on develop/release branches only rebuild what is missing from the mirror
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_protected_branch"
SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}"
SPACK_REQUIRE_SIGNING: "True"
- AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
- OIDC_TOKEN_AUDIENCE: "protected_binary_mirror"
- - if: $CI_COMMIT_REF_NAME =~ /^releases\/v.*/
- # Pipelines on release branches always rebuild everything
- when: always
- variables:
- SPACK_PIPELINE_TYPE: "spack_protected_branch"
- SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}"
- SPACK_PRUNE_UNTOUCHED: "False"
- SPACK_PRUNE_UP_TO_DATE: "False"
- SPACK_REQUIRE_SIGNING: "True"
- AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
OIDC_TOKEN_AUDIENCE: "protected_binary_mirror"
- if: $CI_COMMIT_TAG =~ /^develop-[\d]{4}-[\d]{2}-[\d]{2}$/ || $CI_COMMIT_TAG =~ /^v.*/
# Pipelines on tags (release or dev snapshots) only copy binaries from one mirror to another
@@ -108,16 +98,12 @@ default:
SPACK_PIPELINE_TYPE: "spack_copy_only"
SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}"
PIPELINE_MIRROR_TEMPLATE: "copy-only-protected-mirrors.yaml.in"
- AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
OIDC_TOKEN_AUDIENCE: "protected_binary_mirror"
- if: $CI_COMMIT_REF_NAME =~ /^pr[\d]+_.*$/
# Pipelines on PR branches rebuild only what's missing, and do extra pruning
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_pull_request"
- # TODO: We can remove this when we drop the "deprecated" stack
- PUSH_BUILDCACHE_DEPRECATED: "${PR_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
SPACK_PRUNE_UNTOUCHED: "True"
SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH: "1"
# TODO: Change sync script to include target in branch name. Then we could
@@ -126,50 +112,48 @@ default:
# TODO: far gitlab doesn't support that.
PR_TARGET_REF_NAME: "develop"
PIPELINE_MIRROR_TEMPLATE: "multi-src-mirrors.yaml.in"
- AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY}
OIDC_TOKEN_AUDIENCE: "pr_binary_mirror"
.generate-common:
stage: generate
script:
- - uname -a || true
- - grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
- - nproc || true
- - . "./share/spack/setup-env.sh"
- spack --version
- - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
- - spack env activate --without-view .
- - export SPACK_CI_CONFIG_ROOT="${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/configs"
+ - spack env activate --without-view share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
- spack
--config-scope "${SPACK_CI_CONFIG_ROOT}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}"
${CI_STACK_CONFIG_SCOPES}
compiler find
- - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))"
- < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml"
+ - spack
+ --config-scope "${SPACK_CI_CONFIG_ROOT}"
+ --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"
+ --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}"
+ audit configs
+ # Command below needs to be `spack python` due to naming differences accross platforms
+ - spack python ${SPACK_CI_SCRIPTS_ROOT}/common/expand_vars.py
+ "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}"
+ "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml"
- spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml"
- - mkdir -p "${CI_PROJECT_DIR}/jobs_scratch_dir"
+ - mkdir "${CI_PROJECT_DIR}/jobs_scratch_dir"
- spack
--config-scope "${SPACK_CI_CONFIG_ROOT}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}"
- ${CI_STACK_CONFIG_SCOPES}
config blame > "${CI_PROJECT_DIR}/jobs_scratch_dir/spack.yaml.blame"
- spack -v --color=always
--config-scope "${SPACK_CI_CONFIG_ROOT}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}"
--config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}"
- ${CI_STACK_CONFIG_SCOPES}
ci generate --check-index-only
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
- after_script:
- - cat /proc/loadavg || true
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
+ - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/patches"
+ - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/providers"
+ - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/tags"
variables:
KUBERNETES_CPU_REQUEST: 4000m
KUBERNETES_MEMORY_REQUEST: 16G
@@ -186,10 +170,21 @@ default:
# Generate without tags for cases using external runners
.generate-base:
extends: [ ".base-job", ".generate-common" ]
+ before_script:
+ - uname -a || true
+ - grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
+ - nproc || true
+ - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
+ - . "./share/spack/setup-env.sh"
+ - spack arch
+ after_script:
+ - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
.generate-x86_64:
extends: [ ".generate-base" ]
- tags: ["spack", "public", "medium", "x86_64"]
+ tags: ["spack", "public", "medium", "x86_64_v3"]
.generate-aarch64:
extends: [ ".generate-base" ]
@@ -199,74 +194,33 @@ default:
extends: [ ".generate-base" ]
tags: ["spack", "public", "medium", "aarch64", "graviton3"]
-.generate-deprecated:
- extends: [ ".base-job" ]
- stage: generate
- script:
- - uname -a || true
- - grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
- - nproc || true
- - . "./share/spack/setup-env.sh"
- - spack --version
- - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
- - spack env activate --without-view .
- - spack -v --color=always
- ci generate --check-index-only
- --buildcache-destination "${PUSH_BUILDCACHE_DEPRECATED}"
- --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
- --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
+.generate-neoverse-v2:
+ extends: [ ".generate-base" ]
+ tags: ["spack", "public", "medium", "neoverse_v2"]
+
+.generate-win64:
+ extends: [ ".base-job", ".generate-common" ]
+ before_script:
+ - $ErrorActionOld=$ErrorActionPreference
+ - $ErrorActionPreference="SilentlyContinue"
+ - python -c"import psutil;print(psutil.getloadavg())"
+ - (Get-WmiObject Win32_PhysicalMemory | measure-object Capacity -sum).sum/1kb
+ - $ErrorActionPreference=$ErrorActionOld
+ - . .\share\spack\setup-env.ps1
after_script:
- - cat /proc/loadavg || true
- artifacts:
- paths:
- - "${CI_PROJECT_DIR}/jobs_scratch_dir"
- variables:
- KUBERNETES_CPU_REQUEST: 4000m
- KUBERNETES_MEMORY_REQUEST: 16G
- interruptible: true
- timeout: 60 minutes
- retry:
- max: 2
- when:
- - always
- tags: ["spack", "public", "medium", "x86_64"]
+ - $ErrorActionOld=$ErrorActionPreference
+ - $ErrorActionPreference="SilentlyContinue"
+ - python -c"import psutil;print(psutil.getloadavg())"
+ - (Get-WmiObject Win32_PhysicalMemory | measure-object Capacity -sum).sum/1kb
+ - $ErrorActionPreference=$ErrorActionOld
+
+ tags: ["spack", "public", "medium", "x86_64-win"]
+ image: "ghcr.io/johnwparent/windows-server21h2:sha-1c12b61"
.build:
extends: [ ".base-job" ]
stage: build
-protected-publish:
- # Copy binaries from stack-specific mirrors to a root mirror
- stage: publish
- only:
- - /^develop$/
- - /^releases\/v.*/
- - /^v.*/
- - /^develop-[\d]{4}-[\d]{2}-[\d]{2}$/
- image: "ghcr.io/spack/python-aws-bash:0.0.1"
- tags: ["spack", "public", "medium", "aws", "x86_64"]
- retry:
- max: 2
- when: ["runner_system_failure", "stuck_or_timeout_failure"]
- variables:
- SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}"
- SPACK_PIPELINE_TYPE: "spack_protected_branch"
- AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
- KUBERNETES_CPU_REQUEST: 4000m
- KUBERNETES_MEMORY_REQUEST: 16G
- script:
- - . "./share/spack/setup-env.sh"
- - spack --version
- - export COPY_SPECS_DIR=${CI_PROJECT_DIR}/jobs_scratch_dir/specs_to_copy
- - spack buildcache sync --manifest-glob "${COPY_SPECS_DIR}/*.json"
- - curl -fLsS https://spack.github.io/keys/spack-public-binary-key.pub -o /tmp/spack-public-binary-key.pub
- - aws s3 cp /tmp/spack-public-binary-key.pub "${SPACK_COPY_BUILDCACHE}/build_cache/_pgp/spack-public-binary-key.pub"
- - spack buildcache update-index --keys "${SPACK_COPY_BUILDCACHE}"
- id_tokens:
- GITLAB_OIDC_TOKEN:
- aud: "protected_binary_mirror"
-
########################################
# TEMPLATE FOR ADDING ANOTHER PIPELINE
########################################
@@ -315,7 +269,7 @@ protected-publish:
e4s-generate:
extends: [ ".e4s", ".generate-x86_64"]
- image: ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01
e4s-build:
extends: [ ".e4s", ".build" ]
@@ -329,6 +283,29 @@ e4s-build:
job: e4s-generate
########################################
+# E4S Neoverse V2
+########################################
+.e4s-neoverse-v2:
+ extends: [ ".linux_neoverse_v2" ]
+ variables:
+ SPACK_CI_STACK_NAME: e4s-neoverse-v2
+
+e4s-neoverse-v2-generate:
+ extends: [ ".e4s-neoverse-v2", ".generate-neoverse-v2" ]
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01
+
+e4s-neoverse-v2-build:
+ extends: [ ".e4s-neoverse-v2", ".build" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: e4s-neoverse-v2-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: e4s-neoverse-v2-generate
+
+########################################
# E4S Neoverse V1 pipeline
########################################
.e4s-neoverse_v1:
@@ -338,7 +315,7 @@ e4s-build:
e4s-neoverse_v1-generate:
extends: [ ".e4s-neoverse_v1", ".generate-neoverse_v1" ]
- image: ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01
e4s-neoverse_v1-build:
extends: [ ".e4s-neoverse_v1", ".build" ]
@@ -361,7 +338,7 @@ e4s-neoverse_v1-build:
e4s-rocm-external-generate:
extends: [ ".e4s-rocm-external", ".generate-x86_64"]
- image: ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.1:2024.10.08
e4s-rocm-external-build:
extends: [ ".e4s-rocm-external", ".build" ]
@@ -407,7 +384,7 @@ e4s-rocm-external-build:
e4s-oneapi-generate:
extends: [ ".e4s-oneapi", ".generate-x86_64"]
- image: ghcr.io/spack/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06
e4s-oneapi-build:
extends: [ ".e4s-oneapi", ".build" ]
@@ -470,25 +447,51 @@ build_systems-build:
###########################################
# Build tests for different developer tools
+# manylinux2014
###########################################
-.developer-tools:
+.developer-tools-manylinux2014:
extends: [ ".linux_x86_64_v3" ]
variables:
- SPACK_CI_STACK_NAME: developer-tools
+ SPACK_CI_STACK_NAME: developer-tools-manylinux2014
-developer-tools-generate:
- extends: [ ".developer-tools", ".generate-x86_64"]
+developer-tools-manylinux2014-generate:
+ extends: [ ".developer-tools-manylinux2014", ".generate-x86_64"]
+ image: ghcr.io/spack/spack/manylinux2014:2024.03.28
-developer-tools-build:
- extends: [ ".developer-tools", ".build" ]
+developer-tools-manylinux2014-build:
+ extends: [ ".developer-tools-manylinux2014", ".build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
- job: developer-tools-generate
+ job: developer-tools-manylinux2014-generate
strategy: depend
needs:
- artifacts: True
- job: developer-tools-generate
+ job: developer-tools-manylinux2014-generate
+
+###########################################
+# Build tests for different developer tools
+# darwin
+###########################################
+.developer-tools-darwin:
+ extends: [ ".darwin_aarch64" ]
+ variables:
+ SPACK_CI_STACK_NAME: developer-tools-darwin
+
+developer-tools-darwin-generate:
+ tags: [ "macos-ventura", "apple-clang-15", "aarch64-macos" ]
+ extends: [ ".developer-tools-darwin", ".generate-base"]
+
+developer-tools-darwin-build:
+ extends: [ ".developer-tools-darwin", ".build" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: developer-tools-darwin-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: developer-tools-darwin-generate
#########################################
# RADIUSS
@@ -673,7 +676,7 @@ tutorial-build:
ml-linux-x86_64-cpu-generate:
extends: [ ".generate-x86_64", .ml-linux-x86_64-cpu, ".tags-x86_64_v4" ]
- image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
ml-linux-x86_64-cpu-build:
extends: [ ".build", ".ml-linux-x86_64-cpu" ]
@@ -696,7 +699,7 @@ ml-linux-x86_64-cpu-build:
ml-linux-x86_64-cuda-generate:
extends: [ ".generate-x86_64", .ml-linux-x86_64-cuda, ".tags-x86_64_v4" ]
- image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
ml-linux-x86_64-cuda-build:
extends: [ ".build", ".ml-linux-x86_64-cuda" ]
@@ -719,7 +722,7 @@ ml-linux-x86_64-cuda-build:
ml-linux-x86_64-rocm-generate:
extends: [ ".generate-x86_64", .ml-linux-x86_64-rocm, ".tags-x86_64_v4" ]
- image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
ml-linux-x86_64-rocm-build:
extends: [ ".build", ".ml-linux-x86_64-rocm" ]
@@ -733,8 +736,54 @@ ml-linux-x86_64-rocm-build:
job: ml-linux-x86_64-rocm-generate
########################################
-# Machine Learning - Darwin aarch64 (MPS)
+# Machine Learning - Linux aarch64 (CPU)
########################################
+.ml-linux-aarch64-cpu:
+ extends: [ ".linux_aarch64" ]
+ variables:
+ SPACK_CI_STACK_NAME: ml-linux-aarch64-cpu
+
+ml-linux-aarch64-cpu-generate:
+ extends: [ ".generate-aarch64", .ml-linux-aarch64-cpu ]
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+
+ml-linux-aarch64-cpu-build:
+ extends: [ ".build", ".ml-linux-aarch64-cpu" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: ml-linux-aarch64-cpu-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: ml-linux-aarch64-cpu-generate
+
+#########################################
+# Machine Learning - Linux aarch64 (CUDA)
+#########################################
+.ml-linux-aarch64-cuda:
+ extends: [ ".linux_aarch64" ]
+ variables:
+ SPACK_CI_STACK_NAME: ml-linux-aarch64-cuda
+
+ml-linux-aarch64-cuda-generate:
+ extends: [ ".generate-aarch64", .ml-linux-aarch64-cuda ]
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+
+ml-linux-aarch64-cuda-build:
+ extends: [ ".build", ".ml-linux-aarch64-cuda" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: ml-linux-aarch64-cuda-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: ml-linux-aarch64-cuda-generate
+
+#########################################
+# Machine Learning - Darwin aarch64 (MPS)
+#########################################
.ml-darwin-aarch64-mps:
extends: [".darwin_aarch64"]
variables:
@@ -756,125 +805,58 @@ ml-darwin-aarch64-mps-build:
job: ml-darwin-aarch64-mps-generate
########################################
-# Deprecated CI testing
+# AWS ParallelCluster
########################################
-.deprecated-ci:
+
+.aws-pcluster-generate:
+ image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] }
+ before_script:
+ # Use gcc from pre-installed spack store
+ - - . "./share/spack/setup-env.sh"
+ - . "/etc/profile.d/modules.sh"
+ - diff -q "/bootstrap/cloud_pipelines-config.yaml" "share/spack/gitlab/cloud_pipelines/configs/config.yaml" || echo "WARNING Install tree might have changed. You need to rebuild the pcluster-amazonlinux-2 container in spack/gitlab-runners."
+ - cp "share/spack/gitlab/cloud_pipelines/configs/config.yaml" "etc/spack/"
+ - /bin/bash "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh"
+ - rm "etc/spack/config.yaml"
+
+# X86_64_V4 (one pipeline per target)
+.aws-pcluster-x86_64_v4:
variables:
- SPACK_CI_STACK_NAME: deprecated
+ SPACK_CI_STACK_NAME: aws-pcluster-x86_64_v4
-deprecated-ci-generate:
- extends: [ ".generate-deprecated", ".deprecated-ci" ]
+aws-pcluster-generate-x86_64_v4:
+ extends: [ ".linux_x86_64_v4", ".aws-pcluster-x86_64_v4", ".generate-base", ".tags-x86_64_v4", ".aws-pcluster-generate"]
-deprecated-ci-build:
- extends: [ ".build", ".deprecated-ci" ]
+aws-pcluster-build-x86_64_v4:
+ extends: [ ".linux_x86_64_v4", ".aws-pcluster-x86_64_v4", ".build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
- job: deprecated-ci-generate
+ job: aws-pcluster-generate-x86_64_v4
strategy: depend
needs:
- artifacts: True
- job: deprecated-ci-generate
-
-########################################
-# AWS PCLUSTER
-########################################
-
-.aws-pcluster-generate-image:
- image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] }
-
-.aws-pcluster-generate:
- before_script:
- # Use gcc from local container buildcache
- - - . "./share/spack/setup-env.sh"
- - . /etc/profile.d/modules.sh
- - spack buildcache rebuild-index /bootstrap/local-cache/
- - spack mirror add local-cache /bootstrap/local-cache
- - spack gpg trust /bootstrap/public-key
- - cd "${CI_PROJECT_DIR}" && curl -sOL https://raw.githubusercontent.com/spack/spack-configs/main/AWS/parallelcluster/postinstall.sh
- - sed -i -e "s/spack arch -t/echo ${SPACK_TARGET_ARCH}/g" postinstall.sh
- - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ postinstall.sh
- - diff postinstall.sh postinstall.sh.bkp || echo Done
- - /bin/bash postinstall.sh -fg
- - spack config --scope site add "packages:all:target:[${SPACK_TARGET_ARCH}]"
- after_script:
- - - mv "${CI_PROJECT_DIR}/postinstall.sh" "${CI_PROJECT_DIR}/jobs_scratch_dir/"
-
-# Icelake (one pipeline per target)
-.aws-pcluster-icelake:
- variables:
- SPACK_CI_STACK_NAME: aws-pcluster-icelake
-
-# aws-pcluster-generate-icelake:
-# extends: [ ".linux_icelake", ".aws-pcluster-icelake", ".generate-x86_64", ".tags-x86_64_v4", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
-
-# aws-pcluster-build-icelake:
-# extends: [ ".linux_icelake", ".aws-pcluster-icelake", ".build" ]
-# trigger:
-# include:
-# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
-# job: aws-pcluster-generate-icelake
-# strategy: depend
-# needs:
-# - artifacts: True
-# job: aws-pcluster-generate-icelake
-
-# Skylake_avx512 (one pipeline per target)
-.aws-pcluster-skylake:
- variables:
- SPACK_CI_STACK_NAME: aws-pcluster-skylake
-
-# aws-pcluster-generate-skylake:
-# extends: [ ".linux_skylake", ".aws-pcluster-skylake", ".generate-x86_64", ".tags-x86_64_v4", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
-
-# aws-pcluster-build-skylake:
-# extends: [ ".linux_skylake", ".aws-pcluster-skylake", ".build" ]
-# trigger:
-# include:
-# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
-# job: aws-pcluster-generate-skylake
-# strategy: depend
-# needs:
-# - artifacts: True
-# job: aws-pcluster-generate-skylake
-
-# Neoverse_n1 (one pipeline per target)
-.aws-pcluster-neoverse_n1:
- variables:
- SPACK_CI_STACK_NAME: aws-pcluster-neoverse_n1
-
-# aws-pcluster-generate-neoverse_n1:
-# extends: [ ".linux_neoverse_n1", ".aws-pcluster-neoverse_n1", ".generate-aarch64", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
-
-# aws-pcluster-build-neoverse_n1:
-# extends: [ ".linux_neoverse_n1", ".aws-pcluster-neoverse_n1", ".build" ]
-# trigger:
-# include:
-# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
-# job: aws-pcluster-generate-neoverse_n1
-# strategy: depend
-# needs:
-# - artifacts: True
-# job: aws-pcluster-generate-neoverse_n1
+ job: aws-pcluster-generate-x86_64_v4
# Neoverse_v1 (one pipeline per target)
.aws-pcluster-neoverse_v1:
variables:
SPACK_CI_STACK_NAME: aws-pcluster-neoverse_v1
-# aws-pcluster-generate-neoverse_v1:
-# extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".generate-aarch64", ".aws-pcluster-generate", ".aws-pcluster-generate-image" ]
+aws-pcluster-generate-neoverse_v1:
+ # TODO: Use updated runner tags: https://github.com/spack/spack-infrastructure/pull/694/files
+ extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".generate-neoverse_v1", ".aws-pcluster-generate"]
-# aws-pcluster-build-neoverse_v1:
-# extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".build" ]
-# trigger:
-# include:
-# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
-# job: aws-pcluster-generate-neoverse_v1
-# strategy: depend
-# needs:
-# - artifacts: True
-# job: aws-pcluster-generate-neoverse_v1
+aws-pcluster-build-neoverse_v1:
+ extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".build" ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: aws-pcluster-generate-neoverse_v1
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: aws-pcluster-generate-neoverse_v1
# Cray definitions
.generate-cray:
@@ -883,6 +865,15 @@ deprecated-ci-build:
- echo $PATH
- module avail
- module list
+ - uname -a || true
+ - grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
+ - nproc || true
+ - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
+ - . "./share/spack/setup-env.sh"
+ after_script:
+ - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
.generate-cray-rhel:
tags: [ "cray-rhel-zen4", "public" ]
@@ -905,6 +896,7 @@ e4s-cray-rhel-generate:
extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ]
e4s-cray-rhel-build:
+ allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-rhel" ]
trigger:
include:
@@ -927,6 +919,7 @@ e4s-cray-sles-generate:
extends: [ ".generate-cray-sles", ".e4s-cray-sles" ]
e4s-cray-sles-build:
+ allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-sles" ]
trigger:
include:
@@ -936,3 +929,71 @@ e4s-cray-sles-build:
needs:
- artifacts: True
job: e4s-cray-sles-generate
+
+#######################################
+# Windows Visualization Tools
+#######################################
+.windows-vis:
+ extends: [".win64-msvc2019"]
+ variables:
+ SPACK_CI_STACK_NAME: windows-vis
+
+windows-vis-generate:
+ extends: [ ".generate-win64", ".windows-vis" ]
+
+windows-vis-build:
+ extends: [ ".build", ".windows-vis"]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: windows-vis-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: windows-vis-generate
+
+#######################################
+# Bootstrap x86_64-linux-gnu
+#######################################
+.bootstrap-x86_64-linux-gnu:
+ extends: [ ".linux_x86_64_v3" ]
+ variables:
+ SPACK_CI_STACK_NAME: bootstrap-x86_64-linux-gnu
+
+bootstrap-x86_64-linux-gnu-generate:
+ extends: [ .generate-x86_64, .bootstrap-x86_64-linux-gnu ]
+ image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+
+bootstrap-x86_64-linux-gnu-build:
+ extends: [ .build, .bootstrap-x86_64-linux-gnu ]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: bootstrap-x86_64-linux-gnu-generate
+ strategy: depend
+ needs:
+ - artifacts: True
+ job: bootstrap-x86_64-linux-gnu-generate
+
+#######################################
+# Bootstrap aarch64-darwin
+#######################################
+.bootstrap-aarch64-darwin:
+ extends: [.darwin_aarch64]
+ variables:
+ SPACK_CI_STACK_NAME: bootstrap-aarch64-darwin
+
+bootstrap-aarch64-darwin-generate:
+ tags: [macos-ventura, apple-clang-15, aarch64-macos]
+ extends: [.bootstrap-aarch64-darwin, .generate-base]
+
+bootstrap-aarch64-darwin-build:
+ extends: [.bootstrap-aarch64-darwin, .build]
+ trigger:
+ include:
+ - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
+ job: bootstrap-aarch64-darwin-generate
+ strategy: depend
+ needs:
+ - artifacts: true
+ job: bootstrap-aarch64-darwin-generate
diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
index c27065b3be..10eb7459a7 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
@@ -2,7 +2,6 @@ ci:
target: gitlab
broken-tests-packages:
- - gptune
- superlu-dist # srun -n 4 hangs
- papyrus
@@ -11,7 +10,9 @@ ci:
pipeline-gen:
- build-job:
before_script-:
- - - spack list --count # ensure that spack's cache is populated
+ - - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
+ - - touch ${SPACK_USER_CACHE_PATH}/cache/*/* # bump mtime of cache so it is not invalidated
- - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
- spack compiler list
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi
@@ -24,12 +25,13 @@ ci:
script::
- - spack config blame mirrors
- spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
- - - spack python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
- --prefix /home/software/spack:${CI_PROJECT_DIR}/opt/spack
- --log install_times.json
- ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json
after_script:
- - cat /proc/loadavg || true
+ - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
+ - - time ./bin/spack python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
+ --prefix /home/software/spack:${CI_PROJECT_DIR}/opt/spack
+ --log install_times.json
+ ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json || true
variables:
CI_JOB_SIZE: "default"
CI_GPG_KEY_ROOT: /mnt/key
@@ -104,10 +106,15 @@ ci:
- noop-job:
tags: ["service"]
+ image: busybox:latest
variables:
+ CI_OIDC_REQUIRED: 0
+ GIT_STRATEGY: "none"
CI_JOB_SIZE: "small"
- KUBERNETES_CPU_REQUEST: "500m"
- KUBERNETES_MEMORY_REQUEST: "500M"
+ KUBERNETES_CPU_REQUEST: "100m"
+ KUBERNETES_MEMORY_REQUEST: "5M"
+ before_script:: []
+ after_script:: []
- any-job:
tags: ["spack"]
@@ -116,7 +123,7 @@ ci:
# Disable local configs to avoid issues on shell runners
SPACK_DISABLE_LOCAL_CONFIG: "1"
before_script:
- - - export SPACK_USER_CACHE_PATH="${CI_PROJECT_DIR}/_user_cache/"
+ - - export SPACK_USER_CACHE_PATH="${CI_PROJECT_DIR}/tmp/_user_cache/"
- - uname -a || true
- grep -E "vendor|model name" /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
- nproc || true
diff --git a/share/spack/gitlab/cloud_pipelines/configs/concretizer.yaml b/share/spack/gitlab/cloud_pipelines/configs/concretizer.yaml
index 3e98ced6fd..9006e2ec56 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/concretizer.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/concretizer.yaml
@@ -1,4 +1,3 @@
concretizer:
reuse: false
unify: false
-
diff --git a/share/spack/gitlab/cloud_pipelines/configs/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/config.yaml
index 9ed4118e3e..fef23ade4b 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/config.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/config.yaml
@@ -1,5 +1,4 @@
config:
- concretizer: clingo
db_lock_timeout: 120
install_tree:
root: /home/software/spack
diff --git a/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml
index 6cf3846bdd..893ff7e11a 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/cray-rhel/config.yaml
@@ -1,5 +1,4 @@
config:
- concretizer: clingo
db_lock_timeout: 120
install_tree:
root: $spack/opt/spack
diff --git a/share/spack/gitlab/cloud_pipelines/configs/darwin/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/darwin/ci.yaml
index 8dfb169a3e..c826c0ea3d 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/darwin/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/darwin/ci.yaml
@@ -1,4 +1,4 @@
ci:
pipeline-gen:
- build-job-remove:
- image: macos-run-on-metal
+ image:: macos-run-on-metal
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml
index 986277bfdd..b6e41a9af0 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/ci.yaml
@@ -8,77 +8,120 @@ ci:
- match_behavior: first
submapping:
- match:
- - hipblas
- - llvm
- - llvm-amdgpu
- - pango
- - paraview
- - py-tensorflow
- py-torch
- - qt
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 48G
+
+ - match:
+ - rust
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 35G
+
+ - match:
+ - py-tensorflow
+ - py-torchaudio
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 32G
+
+ - match:
+ - py-jaxlib
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 29G
+
+ - match:
+ - nvhpc
+ - paraview
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 24G
+
+ - match:
+ - llvm
+ build-job:
+ tags: [ "spack", "huge" ]
+ variables:
+ CI_JOB_SIZE: huge
+ SPACK_BUILD_JOBS: "12"
+ KUBERNETES_CPU_REQUEST: 12000m
+ KUBERNETES_MEMORY_REQUEST: 21G
+
+ - match:
+ - dealii
- rocblas
- - visit
build-job:
tags: [ "spack", "huge" ]
variables:
CI_JOB_SIZE: huge
SPACK_BUILD_JOBS: "12"
KUBERNETES_CPU_REQUEST: 12000m
- KUBERNETES_MEMORY_REQUEST: 42G
+ KUBERNETES_MEMORY_REQUEST: 19G
+
+ - match:
+ - ecp-data-vis-sdk
+ - intel-tbb
+ - llvm-amdgpu
+ - salmon
+ - trilinos
+ build-job:
+ tags: [ "spack", "large" ]
+ variables:
+ CI_JOB_SIZE: large
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: 8000m
+ KUBERNETES_MEMORY_REQUEST: 15G
- match:
- ascent
- - atk
- axom
- cistem
- - cmake
- - ctffind
- cuda
- - dealii
- dray
- - dyninst
- ecp-data-vis-sdk
- gcc
- ginkgo
- hdf5
- - hpx
- kokkos-kernels
- - kokkos-nvcc-wrapper
- - lbann
- - magma
- - mesa
- mfem
- mpich
- netlib-lapack
- - nvhpc
- - oce
- openblas
- openfoam
- openturns
- - parallelio
- - plumed
- - precice
- #- py-tensorflow
- #- qt
- raja
- relion
- #- rocblas
- - rocfft
- rocsolver
- rocsparse
- - rust
- - slate
- strumpack
- sundials
- trilinos
- - umpire
- #- visit
+ - visit
- vtk
- vtk-h
- vtk-m
- - warpx
- - wrf
- - wxwidgets
build-job:
tags: [ "spack", "large" ]
variables:
@@ -88,14 +131,82 @@ ci:
KUBERNETES_MEMORY_REQUEST: 12G
- match:
+ - hpx
+ - slate
+ - warpx
+ build-job:
+ tags: [ "spack", "large" ]
+ variables:
+ CI_JOB_SIZE: "large"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "9G"
+
+ - match:
+ - hipblas
+ - rocfft
+ - umpire
+ build-job:
+ tags: [ "spack", "large" ]
+ variables:
+ CI_JOB_SIZE: "large"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "8G"
+
+ - match:
+ - lbann
+ - magma
+ - mesa
+ - qt
+ build-job:
+ tags: [ "spack", "large" ]
+ variables:
+ CI_JOB_SIZE: "large"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "7G"
+
+ - match:
+ - dyninst
+ - precice
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "6G"
+
+ - match:
+ - cmake
+ - plumed
+ - wrf
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "5G"
+
+ - match:
+ - parallelio
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "3G"
+
+ - match:
- adios2
- amrex
- archer
- ascent
- autoconf-archive
- axom
- - binutils
- - blaspp
- blt
- boost
- butterflypack
@@ -106,15 +217,10 @@ ci:
- conduit
- curl
- datatransferkit
- - double-conversion
- dray
- - eigen
- faodel
- - ffmpeg
- - fftw
- fortrilinos
- gettext
- - gperftools
- gptune
- hdf5
- heffte
@@ -126,7 +232,6 @@ ci:
- lammps
- lapackpp
- legion
- - libtool
- libxml2
- libzmq
- llvm-openmp-ompt
@@ -134,18 +239,14 @@ ci:
- mfem
- mpich
- mvapich2
- - nasm
- netlib-scalapack
- omega-h
- - openblas
- openjpeg
- openmpi
- openpmd-api
- pagmo2
- papyrus
- parsec
- - pdt
- - pegtl
- petsc
- pumi
- py-beniget
@@ -157,9 +258,7 @@ ci:
- py-scipy
- py-statsmodels
- py-warlock
- - py-warpx
- raja
- - samrai
- slepc
- slurm
- sqlite
@@ -172,6 +271,7 @@ ci:
- vtk
- vtk-h
- vtk-m
+ - warpx +python
- zfp
build-job:
tags: [ "spack", "medium" ]
@@ -182,6 +282,56 @@ ci:
KUBERNETES_MEMORY_REQUEST: "4G"
- match:
+ - oce
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "3G"
+
+ - match:
+ - binutils
+ - blaspp
+ - double-conversion
+ - eigen
+ - fftw
+ - libtool
+ - nasm
+ - pegtl
+ - pdt
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "2"
+ KUBERNETES_CPU_REQUEST: "2000m"
+ KUBERNETES_MEMORY_REQUEST: "2G"
+
+ - match:
+ - kokkos-nvcc-wrapper
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "8"
+ KUBERNETES_CPU_REQUEST: "8000m"
+ KUBERNETES_MEMORY_REQUEST: "1G"
+
+ - match:
+ - ffmpeg
+ - gperftools
+ - samrai
+ build-job:
+ tags: [ "spack", "medium" ]
+ variables:
+ CI_JOB_SIZE: "medium"
+ SPACK_BUILD_JOBS: "2"
+ KUBERNETES_CPU_REQUEST: "2000m"
+ KUBERNETES_MEMORY_REQUEST: "1G"
+
+ - match:
- alsa-lib
- ant
- antlr
@@ -243,7 +393,6 @@ ci:
- ncurses
- ninja
- numactl
- - openblas
- openjdk
- openssh
- openssl
@@ -280,7 +429,6 @@ ci:
- tar
- tcl
- texinfo
- - tut
- unzip
- util-linux-uuid
- util-macros
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_n1/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_n1/ci.yaml
deleted file mode 100644
index 9ba2680702..0000000000
--- a/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_n1/ci.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-ci:
- pipeline-gen:
- - any-job:
- variables:
- SPACK_TARGET_ARCH: neoverse_n1
- - build-job:
- tags: ["aarch64", "graviton2"]
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v1/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v1/ci.yaml
index e874fc6522..82aa1eae7b 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v1/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v1/ci.yaml
@@ -1,7 +1,4 @@
ci:
pipeline-gen:
- - any-job:
- variables:
- SPACK_TARGET_ARCH: neoverse_v1
- build-job:
tags: ["aarch64", "graviton3"]
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v2/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v2/ci.yaml
new file mode 100644
index 0000000000..b5136835b2
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/neoverse_v2/ci.yaml
@@ -0,0 +1,7 @@
+ci:
+ pipeline-gen:
+ - any-job:
+ variables:
+ SPACK_TARGET_ARCH: neoverse_v2
+ - build-job:
+ tags: ["neoverse_v2"]
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/ppc64le/concretizer.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/ppc64le/concretizer.yaml
new file mode 100644
index 0000000000..3050c32a17
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/ppc64le/concretizer.yaml
@@ -0,0 +1,3 @@
+concretizer:
+ targets:
+ granularity: generic
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/skylake_avx512/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/skylake_avx512/ci.yaml
deleted file mode 100644
index 0a7bbb6f19..0000000000
--- a/share/spack/gitlab/cloud_pipelines/configs/linux/skylake_avx512/ci.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-ci:
- pipeline-gen:
- - any-job:
- variables:
- SPACK_TARGET_ARCH: skylake_avx512
- - build-job:
- before_script:
- - - curl -LfsS "https://github.com/JuliaBinaryWrappers/GNUMake_jll.jl/releases/download/GNUMake-v4.3.0+1/GNUMake.v4.3.0.x86_64-linux-gnu.tar.gz" -o gmake.tar.gz
- - printf "fef1f59e56d2d11e6d700ba22d3444b6e583c663d6883fd0a4f63ab8bd280f0f gmake.tar.gz" | sha256sum --check --strict --quiet
- - tar -xzf gmake.tar.gz -C /usr bin/make 2> /dev/null
- tags: ["x86_64_v4"]
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v3/concretizer.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v3/concretizer.yaml
new file mode 100644
index 0000000000..3050c32a17
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v3/concretizer.yaml
@@ -0,0 +1,3 @@
+concretizer:
+ targets:
+ granularity: generic
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/icelake/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/ci.yaml
index 036a441946..ae14967dd5 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/linux/icelake/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/ci.yaml
@@ -1,8 +1,5 @@
ci:
pipeline-gen:
- - any-job:
- variables:
- SPACK_TARGET_ARCH: icelake
- build-job:
before_script:
- - curl -LfsS "https://github.com/JuliaBinaryWrappers/GNUMake_jll.jl/releases/download/GNUMake-v4.3.0+1/GNUMake.v4.3.0.x86_64-linux-gnu.tar.gz" -o gmake.tar.gz
diff --git a/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/concretizer.yaml b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/concretizer.yaml
new file mode 100644
index 0000000000..3050c32a17
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/linux/x86_64_v4/concretizer.yaml
@@ -0,0 +1,3 @@
+concretizer:
+ targets:
+ granularity: generic
diff --git a/share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml
new file mode 100644
index 0000000000..2d8aedf6d4
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/win64/ci.yaml
@@ -0,0 +1,18 @@
+ci:
+ pipeline-gen:
+ - build-job:
+ after_script::
+ - Write-Output "Done"
+
+ before_script::
+ - fsutil 8dot3name set C:\ 0
+ - . .\share\spack\setup-env.ps1
+ - If (Test-Path -path C:\\key\intermediate_ci_signing_key.gpg) { spack.ps1 gpg trust C:\\key\intermediate_ci_signing_key.gpg }
+ - If (Test-Path -path C:\\key\spack_public_key.gpg) { spack.ps1 gpg trust C:\\key\spack_public_key.gpg }
+
+ script::
+ - spack.ps1 env activate --without-view ${SPACK_CONCRETE_ENV_DIR}
+ - spack.ps1 config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{hash}'"
+ - mkdir ${SPACK_ARTIFACTS_ROOT}/user_data
+ - spack.ps1 --backtrace ci rebuild | Tee-Object -FilePath "${env:SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt" 2>&1 | Tee-Object -FilePath "${env:SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt"
+ image: "ghcr.io/johnwparent/windows-server21h2:sha-1c12b61"
diff --git a/share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml b/share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml
new file mode 100644
index 0000000000..dcabcb2c8a
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml
@@ -0,0 +1,10 @@
+config:
+ build_stage::
+ - 'C:/spack stage'
+ install_tree:
+ root: "C:/spack install"
+ # Path lengths on windows doesn't support much padding
+ padded_length: 0
+ # Reduce the projections to only including the hash to avoid path length issues
+ projections:
+ all: '{hash}'
diff --git a/share/spack/gitlab/cloud_pipelines/configs/win64/packages.yaml b/share/spack/gitlab/cloud_pipelines/configs/win64/packages.yaml
new file mode 100644
index 0000000000..b6d0089c5a
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/win64/packages.yaml
@@ -0,0 +1,25 @@
+packages:
+ all:
+ target: [x86_64]
+ tbb:
+ require: "intel-tbb"
+ cmake:
+ externals:
+ - spec: cmake@3.28.0-msvc1
+ prefix: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake"
+ buildable: False
+ ninja:
+ externals:
+ - spec: ninja@1.11.0
+ prefix: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\Ninja"
+ buildable: False
+ wgl:
+ externals:
+ - spec: wgl@10.0.22621 plat=x64
+ prefix: "C:\\Program Files (x86)\\Windows Kits\\10"
+ buildable: False
+ win-sdk:
+ externals:
+ - spec: win-sdk@10.0.22621 plat=x64
+ prefix: "C:\\Program Files (x86)\\Windows Kits\\10"
+ buildable: False
diff --git a/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/ci.yaml
new file mode 100644
index 0000000000..8e3b45c336
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/ci.yaml
@@ -0,0 +1,4 @@
+ci:
+ pipeline-gen:
+ - build-job:
+ tags: [x86_64-win]
diff --git a/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/packages.yaml b/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/packages.yaml
new file mode 100644
index 0000000000..a08b7cdcfb
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/packages.yaml
@@ -0,0 +1,3 @@
+packages:
+ all:
+ target: [x86_64]
diff --git a/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py b/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
index ec40c4c230..d27d1656ba 100644
--- a/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
+++ b/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
@@ -37,10 +37,14 @@ if __name__ == "__main__":
# Look in the list of prefixes for logs
for prefix in prefixes:
- logs = find_logs(prefix, args.log)
+ print(f"Walking {prefix}")
+ logs = [log for log in find_logs(prefix, args.log)]
+ print(f" * found {len(logs)} logs")
for log in logs:
+ print(f" * appending data for {log}")
with open(log) as fd:
data.append(json.load(fd))
+ print(f"Writing {args.output_file}")
with open(args.output_file, "w") as fd:
json.dump(data, fd)
diff --git a/share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py b/share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py
new file mode 100644
index 0000000000..7806e10201
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py
@@ -0,0 +1,10 @@
+import argparse
+import os
+
+parser = argparse.ArgumentParser()
+parser.add_argument("input", type=argparse.FileType("r"))
+parser.add_argument("out", type=argparse.FileType("w"))
+
+args = parser.parse_args()
+
+args.out.write(os.path.expandvars(args.input.read()))
diff --git a/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh b/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh
new file mode 100755
index 0000000000..fc77f56e76
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh
@@ -0,0 +1,112 @@
+#!/usr/bin/env bash
+#
+# Copyright 2013-2023 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)
+set -e
+
+set_pcluster_defaults() {
+ # Set versions of pre-installed software in packages.yaml
+ [ -z "${SLURM_ROOT}" ] && ls /etc/systemd/system/slurm* &>/dev/null && \
+ SLURM_ROOT=$(dirname $(dirname "$(awk '/ExecStart=/ {print $1}' /etc/systemd/system/slurm* | sed -e 's?^.*=??1' | head -n1)"))
+ # Fallback to default location if SLURM not in systemd
+ [ -z "${SLURM_ROOT}" ] && [ -d "/opt/slurm" ] && SLURM_ROOT=/opt/slurm
+ [ -z "${SLURM_VERSION}" ] && SLURM_VERSION=$(strings "${SLURM_ROOT}"/lib/libslurm.so | grep -e '^VERSION' | awk '{print $2}' | sed -e 's?"??g')
+ [ -z "${LIBFABRIC_VERSION}" ] && LIBFABRIC_VERSION=$(awk '/Version:/{print $2}' "$(find /opt/amazon/efa/ -name libfabric.pc | head -n1)" | sed -e 's?~??g' -e 's?amzn.*??g')
+ export SLURM_ROOT SLURM_VERSION LIBFABRIC_VERSION
+
+ envsubst < "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}/packages.yaml" > "${SPACK_ROOT}"/etc/spack/packages.yaml
+}
+
+patch_compilers_yaml() {
+ # Graceful exit if package not found by spack
+ set -o pipefail
+ compilers_yaml="${SPACK_ROOT}/etc/spack/compilers.yaml"
+ [ -f "${compilers_yaml}" ] || {
+ echo "Cannot find ${compilers_yaml}, compiler setup might now be optimal."
+ return
+ }
+
+ # System ld is too old for amzn linux2
+ spack_gcc_version=$(spack find --format '{version}' gcc)
+ binutils_path=$(spack find -p binutils | awk '/binutils/ {print $2}' | head -n1)
+ if [ -d "${binutils_path}" ] && [ -n "${spack_gcc_version}" ]; then python3 <<EOF
+import yaml
+
+with open("${compilers_yaml}",'r') as f:
+ compilers=yaml.safe_load(f)
+
+for c in compilers["compilers"]:
+ if "arm" in c["compiler"]["spec"] or "intel" in c["compiler"]["spec"] or "oneapi" in c["compiler"]["spec"] \
+ or "${spack_gcc_version}" in c["compiler"]["spec"]:
+ compilers["compilers"][compilers["compilers"].index(c)]["compiler"]["environment"] = {"prepend_path":{"PATH":"${binutils_path}/bin"}}
+
+with open("${compilers_yaml}",'w') as f:
+ yaml.dump(compilers, f)
+EOF
+ fi
+ # Oneapi needs extra_rpath to gcc libstdc++.so.6
+ if [ "x86_64" == "$(arch)" ] && oneapi_gcc_version=$(spack find --format '{compiler}' intel-oneapi-compilers | sed -e 's/=//g') && \
+ [ -n "${oneapi_gcc_version}" ] && oneapi_gcc_path=$(spack find -p "${oneapi_gcc_version}" | grep "${oneapi_gcc_version}" | awk '{print $2}' | head -n1) && \
+ [ -d "${oneapi_gcc_path}" ]; then python3 <<EOF
+import yaml
+
+with open("${compilers_yaml}",'r') as f:
+ compilers=yaml.safe_load(f)
+
+for c in compilers["compilers"]:
+ if "oneapi" in c["compiler"]["spec"]:
+ compilers["compilers"][compilers["compilers"].index(c)]["compiler"]["extra_rpaths"] = ["${oneapi_gcc_path}/lib64"]
+
+with open("${compilers_yaml}",'w') as f:
+ yaml.dump(compilers, f)
+EOF
+ fi
+}
+
+install_compilers() {
+ # Install Intel compilers through a static spack version such that the compiler's hash does not change.
+ # The compilers needs to be in the same install tree as the rest of the software such that the path
+ # relocation works correctly. This holds the danger that this part will fail when the current spack gets
+ # incompatible with the one in $spack_intel_compiler_commit. Therefore, we make intel installations optional
+ # in packages.yaml files and add a fallback `%gcc` version for each application.
+ if [ -f "/bootstrap-compilers/spack/etc/spack/compilers.yaml" ]; then
+ # Running inside a gitlab CI container
+ # Intel and gcc@12 compiler are pre-installed and their location is known in
+ cp /bootstrap-compilers/spack/etc/spack/compilers.yaml "${SPACK_ROOT}"/etc/spack/
+ else
+ spack compiler add --scope site
+ # We need to treat compilers as essentially external, i.e. their installation location
+ # (including hash) must not change when any changes are pushed to spack. The reason is that
+ # changes in the compilers are not reflected in the package hashes built in the CI. Hence, those
+ # packages will reference a wrong compiler path once the path changes.
+
+ # `gcc@12.4.0%gcc@7.3.1` is created as part of building the pipeline containers.
+ # `ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07` produced the following hashes.
+ if [ "x86_64" == "$(arch)" ]; then
+ gcc_hash="pttzchh7o54nhmycj4wgzw5mic6rk2nb"
+ else
+ gcc_hash="v6wxye6ijzrxnzxftcwnpu3psohsjl2b"
+ fi
+
+ spack install /${gcc_hash}
+ (
+ spack load gcc
+ spack compiler add --scope site
+ )
+
+ if [ "x86_64" == "$(arch)" ]; then
+ # 2024.1.0 is the last oneapi compiler that works on AL2 and is the one used to compile packages in the build cache.
+ spack install intel-oneapi-compilers@2024.1.0
+ (
+ . "$(spack location -i intel-oneapi-compilers)"/setvars.sh; spack compiler add --scope site \
+ || true
+ )
+ fi
+ fi
+}
+
+set_pcluster_defaults
+install_compilers
+patch_compilers_yaml
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml
index abd8f4d024..86385c90d4 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml
@@ -4,24 +4,24 @@ spack:
all:
providers:
blas:
- - openblas
+ - openblas
mkl:
- - intel-oneapi-mkl
+ - intel-oneapi-mkl
mpi:
- - openmpi
- - mpich
+ - openmpi
+ - mpich
variants: +mpi
tbb:
- require: "intel-tbb"
+ require: intel-tbb
binutils:
variants: +ld +gold +headers +libiberty ~nls
version:
- - 2.36.1
+ - 2.36.1
doxygen:
version:
- - 1.8.20
+ - 1.8.20
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
hdf5:
variants: +fortran +hl +shared
libfabric:
@@ -30,8 +30,6 @@ spack:
variants: +pic +xz
mesa:
variants: ~llvm
- mesa18:
- variants: ~llvm
mpich:
variants: ~wrapperrpath netmod=ofi device=ch4
ncurses:
@@ -41,13 +39,17 @@ spack:
openmpi:
variants: fabrics=ofi +legacylaunchers
openturns:
- version: [1.18]
+ version:
+ - '1.18'
relion:
variants: ~mklfft
# texlive:
# version: [20210325]
trilinos:
- variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
+ variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
xz:
variants: +pic
@@ -81,7 +83,7 @@ spack:
- openfoam
- osu-micro-benchmarks
- parallel
- - paraview
+ # - paraview
- picard
- quantum-espresso
- raja
@@ -110,8 +112,8 @@ spack:
- '%gcc@7.3.1'
- target:
- - 'target=aarch64'
- - 'target=neoverse_n1'
+ - target=aarch64
+ - target=neoverse_n1
specs:
@@ -134,7 +136,7 @@ spack:
ci:
pipeline-gen:
- build-job:
- image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2023-03-09", "entrypoint": [""] }
+ image: {name: ghcr.io/spack/e4s-amazonlinux-2:v2023-03-09, entrypoint: ['']}
cdash:
build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml
index 038761ac18..2da054256c 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml
@@ -4,24 +4,24 @@ spack:
all:
providers:
blas:
- - openblas
+ - openblas
mkl:
- - intel-oneapi-mkl
+ - intel-oneapi-mkl
mpi:
- - openmpi
- - mpich
+ - openmpi
+ - mpich
variants: +mpi
tbb:
- require: "intel-tbb"
+ require: intel-tbb
binutils:
variants: +ld +gold +headers +libiberty ~nls
version:
- - 2.36.1
+ - 2.36.1
doxygen:
version:
- - 1.8.20
+ - 1.8.20
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
hdf5:
variants: +fortran +hl +shared
libfabric:
@@ -30,8 +30,6 @@ spack:
variants: +pic +xz
mesa:
variants: ~llvm
- mesa18:
- variants: ~llvm
mpich:
variants: ~wrapperrpath netmod=ofi device=ch4
ncurses:
@@ -41,13 +39,17 @@ spack:
openmpi:
variants: fabrics=ofi +legacylaunchers
openturns:
- version: [1.18]
+ version:
+ - '1.18'
relion:
variants: ~mklfft
# texlive:
# version: [20210325]
trilinos:
- variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
+ variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
xz:
variants: +pic
@@ -87,7 +89,7 @@ spack:
- openfoam
- osu-micro-benchmarks
- parallel
- - paraview
+ # - paraview
- picard
- quantum-espresso
# Build broken for gcc@7.3.1 x86_64_v4 (error: '_mm512_loadu_epi32' was not declared in this scope)
@@ -117,7 +119,7 @@ spack:
- '%gcc@7.3.1'
- target:
- - 'target=x86_64_v3'
+ - target=x86_64_v3
specs:
@@ -145,7 +147,7 @@ spack:
ci:
pipeline-gen:
- build-job:
- image: { "name": "ghcr.io/spack/e4s-amazonlinux-2:v2023-03-09", "entrypoint": [""] }
+ image: {name: ghcr.io/spack/e4s-amazonlinux-2:v2023-03-09, entrypoint: ['']}
cdash:
build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml
deleted file mode 100644
index 85cf766068..0000000000
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
-spack:
- view: false
-
- definitions:
- - compiler_specs:
- - gcc
- - gettext
-
- - compiler_target:
- - '%gcc@7.3.1 target=x86_64_v3'
-
- - optimized_configs:
- # - gromacs
- - lammps
- # - mpas-model
- - openfoam
- # - palace
- # - py-devito
- # - quantum-espresso
- # - wrf
-
- - optimized_libs:
- - mpich
- - openmpi
-
- specs:
- - matrix:
- - - $compiler_specs
- - - $compiler_target
- - $optimized_configs
- # - $optimized_libs
-
- ci:
- pipeline-gen:
- - build-job:
- image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] }
- before_script:
- - - . "./share/spack/setup-env.sh"
- - . /etc/profile.d/modules.sh
- - spack --version
- - spack arch
- # Use gcc from local container buildcache
- - - spack buildcache rebuild-index /bootstrap/local-cache/
- - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
- - spack mirror add local-cache /bootstrap/local-cache
- - spack gpg trust /bootstrap/public-key
- - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- - spack config --scope site add "packages:all:target:[${SPACK_TARGET_ARCH}]"
- - signing-job:
- before_script:
- # Do not distribute Intel & ARM binaries
- - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- cdash:
- build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml
deleted file mode 100644
index 50ba40992a..0000000000
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
-spack:
- view: false
-
- definitions:
- - compiler_specs:
- - gcc
- - gettext
-
- - compiler_target:
- - '%gcc@7.3.1 target=aarch64'
-
- - optimized_configs:
- - gromacs
- # - lammps
- # - mpas-model
- - openfoam
- - palace
- # - py-devito
- # - quantum-espresso
- # - wrf
-
- - optimized_libs:
- - mpich
- - openmpi
-
- specs:
- - matrix:
- - - $compiler_specs
- - - $compiler_target
- - $optimized_configs
- - $optimized_libs
-
- ci:
- pipeline-gen:
- - build-job:
- image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] }
- tags: ["aarch64"]
- before_script:
- - - . "./share/spack/setup-env.sh"
- - . /etc/profile.d/modules.sh
- - spack --version
- - spack arch
- # Use gcc from local container buildcache
- - - spack buildcache rebuild-index /bootstrap/local-cache/
- - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
- - spack mirror add local-cache /bootstrap/local-cache
- - spack gpg trust /bootstrap/public-key
- - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- - spack config --scope site add "packages:all:target:[${SPACK_TARGET_ARCH}]"
- - signing-job:
- before_script:
- # Do not distribute Intel & ARM binaries
- - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
-
- cdash:
- build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml
new file mode 100644
index 0000000000..7cad892b4b
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml
@@ -0,0 +1,67 @@
+--- # Neoverse N1 / V1 packages
+packages:
+ acfl:
+ require:
+ - one_of: ["%gcc target=aarch64"]
+ message: "Clang based compilers need GCC libraries and they should be made available for the wide range of CPUs they actually support.
+ Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default."
+ gromacs:
+ require:
+ - one_of:
+ - "gromacs@2024.3 %arm ^fftw ^openmpi"
+ - "gromacs@2024.3 %gcc ^armpl-gcc ^openmpi"
+ libfabric:
+ buildable: true
+ externals:
+ - prefix: /opt/amazon/efa/
+ spec: libfabric@${LIBFABRIC_VERSION}
+ require: ['fabrics=shm,efa']
+ llvm:
+ variants: ~lldb
+ mpas-model:
+ require:
+ - one_of:
+ - "precision=single make_target=llvm %arm ^parallelio+pnetcdf"
+ - "precision=single %gcc ^parallelio+pnetcdf"
+ mpich:
+ require: "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm"
+ nvhpc:
+ require:
+ - one_of:
+ - "nvhpc %gcc target=aarch64"
+ message: "NVHPC should be built with GCC and should be made available for the wide range of CPUs they actually support.
+ Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default."
+ openfoam:
+ require: "openfoam %gcc ^scotch@6.0.9"
+ openmpi:
+ variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm
+ require: '@4:'
+ # Palace does not build correctly with armpl until https://github.com/awslabs/palace/pull/207 is merged into a version.
+ # palace:
+ # require:
+ # - one_of: ["palace cxxflags=\"-include cstdint\" ^fmt@9.1.0"]
+ pmix:
+ require: "pmix@3:"
+ quantum-espresso:
+ require: "quantum-espresso@6.6 %gcc ^armpl-gcc"
+ slurm:
+ buildable: false
+ externals:
+ - prefix: ${SLURM_ROOT}
+ spec: slurm@${SLURM_VERSION} +pmix
+ wrf:
+ require:
+ - one_of:
+ - "wrf%arm"
+ - "wrf%gcc"
+ all:
+ compiler: [gcc, arm, nvhpc, clang]
+ providers:
+ blas: [armpl-gcc, openblas]
+ fftw-api: [armpl-gcc, fftw]
+ lapack: [armpl-gcc, openblas]
+ mpi: [openmpi, mpich]
+ scalapack: [netlib-scalapack]
+ permissions:
+ read: world
+ write: user
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
index 50ba40992a..f4080b1e65 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml
@@ -2,52 +2,36 @@ spack:
view: false
definitions:
- - compiler_specs:
- - gcc
- - gettext
-
- - compiler_target:
- - '%gcc@7.3.1 target=aarch64'
-
- - optimized_configs:
+ - apps:
- gromacs
- # - lammps
- # - mpas-model
+ - mpas-model
+ - mpich
- openfoam
- - palace
- # - py-devito
- # - quantum-espresso
- # - wrf
+ - quantum-espresso
+ - wrf
- - optimized_libs:
- - mpich
- - openmpi
+ - targets:
+ - 'target=neoverse_v1'
+ - 'target=neoverse_n1'
specs:
- matrix:
- - - $compiler_specs
- - - $compiler_target
- - $optimized_configs
- - $optimized_libs
-
+ - [$apps]
+ - [$targets]
ci:
pipeline-gen:
- build-job:
- image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] }
+ image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] }
tags: ["aarch64"]
before_script:
- - . "./share/spack/setup-env.sh"
- . /etc/profile.d/modules.sh
- spack --version
- spack arch
- # Use gcc from local container buildcache
- - - spack buildcache rebuild-index /bootstrap/local-cache/
- - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
- - spack mirror add local-cache /bootstrap/local-cache
- - spack gpg trust /bootstrap/public-key
- - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- - spack config --scope site add "packages:all:target:[${SPACK_TARGET_ARCH}]"
+ # Use gcc from pre-installed spack store
+ - - cp share/spack/gitlab/cloud_pipelines/configs/config.yaml etc/spack/
+ - /bin/bash "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh"
+ - rm etc/spack/config.yaml
- signing-job:
before_script:
# Do not distribute Intel & ARM binaries
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml
deleted file mode 100644
index 85cf766068..0000000000
--- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
-spack:
- view: false
-
- definitions:
- - compiler_specs:
- - gcc
- - gettext
-
- - compiler_target:
- - '%gcc@7.3.1 target=x86_64_v3'
-
- - optimized_configs:
- # - gromacs
- - lammps
- # - mpas-model
- - openfoam
- # - palace
- # - py-devito
- # - quantum-espresso
- # - wrf
-
- - optimized_libs:
- - mpich
- - openmpi
-
- specs:
- - matrix:
- - - $compiler_specs
- - - $compiler_target
- - $optimized_configs
- # - $optimized_libs
-
- ci:
- pipeline-gen:
- - build-job:
- image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] }
- before_script:
- - - . "./share/spack/setup-env.sh"
- - . /etc/profile.d/modules.sh
- - spack --version
- - spack arch
- # Use gcc from local container buildcache
- - - spack buildcache rebuild-index /bootstrap/local-cache/
- - sed -i.bkp s/"spack install gcc"/"spack install --cache-only --reuse gcc"/ /bootstrap/postinstall.sh
- - spack mirror add local-cache /bootstrap/local-cache
- - spack gpg trust /bootstrap/public-key
- - diff /bootstrap/postinstall.sh /bootstrap/postinstall.sh.bkp || echo Done
- - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg
- - spack config --scope site add "packages:all:target:[${SPACK_TARGET_ARCH}]"
- - signing-job:
- before_script:
- # Do not distribute Intel & ARM binaries
- - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
- cdash:
- build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/packages.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/packages.yaml
new file mode 100644
index 0000000000..eafcd37e58
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/packages.yaml
@@ -0,0 +1,143 @@
+--- # x86_64_v4 packages (ice/skylake) & x86_64_v3 packages (zen2/3)
+packages:
+ cpio:
+ require:
+ - one_of:
+ - "cflags=-std=c18 target=x86_64_v4"
+ - "cflags=-std=c18 target=x86_64_v3"
+ when: "%intel"
+ gettext:
+ # Newer gettext cannot build with gcc@12 and old AL2 glibc headers
+ # Older gettext versions do not build correctly with oneapi.
+ require:
+ - one_of:
+ - '@:0.20'
+ - '%oneapi'
+ gromacs:
+ require:
+ - one_of:
+ - "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v4"
+ - "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v3"
+ when: "%intel"
+ - one_of:
+ - "+intel_provided_gcc target=x86_64_v4 ^intel-oneapi-mkl"
+ - "+intel_provided_gcc target=x86_64_v3 ^intel-oneapi-mkl"
+ when: "%oneapi"
+ intel-oneapi-compilers:
+ require: "intel-oneapi-compilers %gcc target=x86_64_v3"
+ intel-oneapi-mpi:
+ variants: +external-libfabric generic-names=True
+ lammps:
+ require:
+ - one_of:
+ - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4"
+ - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3"
+ when: "%intel"
+ - one_of:
+ - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4"
+ - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3"
+ when: "%oneapi"
+ libidn2:
+ require:
+ - one_of:
+ - "cflags=-std=c18 target=x86_64_v4"
+ - "cflags=-std=c18 target=x86_64_v3"
+ when: "%intel"
+ libfabric:
+ buildable: true
+ externals:
+ - prefix: /opt/amazon/efa/
+ spec: libfabric@${LIBFABRIC_VERSION}
+ require: ['fabrics=shm,efa']
+ libunistring:
+ require:
+ - one_of:
+ - "cflags=-std=c18 target=x86_64_v4"
+ - "cflags=-std=c18 target=x86_64_v3"
+ when: "%intel"
+ mpas-model:
+ require:
+ - one_of:
+ - "precision=single ^parallelio+pnetcdf target=x86_64_v4"
+ - "precision=single ^parallelio+pnetcdf target=x86_64_v3"
+ when: "%intel"
+ - one_of:
+ - "precision=single ^parallelio+pnetcdf target=x86_64_v4"
+ - "precision=single ^parallelio+pnetcdf target=x86_64_v3"
+ when: "%oneapi"
+ mpich:
+ require:
+ - one_of:
+ - "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v4"
+ - "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v3"
+ openfoam:
+ require:
+ - one_of:
+ - "openfoam %gcc ^scotch@6.0.9 target=x86_64_v4"
+ - "openfoam %gcc ^scotch@6.0.9 target=x86_64_v3"
+ openmpi:
+ variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm
+ require:
+ - one_of:
+ - "openmpi @4: target=x86_64_v4"
+ - "openmpi @4: target=x86_64_v3"
+ palace:
+ require:
+ - one_of:
+ - "palace ^fmt@9.1.0 target=x86_64_v4"
+ - "palace ^fmt@9.1.0 target=x86_64_v3"
+ when: "%oneapi"
+ - one_of:
+ - "palace ^fmt@9.1.0"
+ when: "%gcc"
+ pmix:
+ require:
+ - one_of:
+ - "pmix@3: target=x86_64_v4"
+ - "pmix@3: target=x86_64_v3"
+ quantum-espresso:
+ require:
+ - one_of:
+ - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4"
+ - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3"
+ when: "%intel"
+ - one_of:
+ - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4"
+ - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3"
+ when: "%oneapi"
+ slurm:
+ buildable: false
+ externals:
+ - prefix: ${SLURM_ROOT}
+ spec: slurm@${SLURM_VERSION} +pmix
+ wrf:
+ require:
+ - one_of:
+ - "wrf@4 build_type=dm+sm target=x86_64_v4"
+ - "wrf@4 build_type=dm+sm target=x86_64_v3"
+ - "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3"
+ when: "%intel"
+ - one_of:
+ - "wrf@4 build_type=dm+sm target=x86_64_v4"
+ - "wrf@4 build_type=dm+sm target=x86_64_v3"
+ - "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3"
+ when: "%oneapi"
+
+ all:
+ compiler: [oneapi, gcc]
+ permissions:
+ read: world
+ write: user
+ providers:
+ blas: [intel-oneapi-mkl]
+ daal: [intel-oneapi-dal]
+ fftw-api: [intel-oneapi-mkl]
+ ipp: [intel-oneapi-ipp]
+ lapack: [intel-oneapi-mkl]
+ mkl: [intel-oneapi-mkl]
+ mpi: [intel-oneapi-mpi, openmpi, mpich]
+ tbb: [intel-oneapi-tbb, intel-tbb]
+ scalapack: [intel-oneapi-mkl]
+
+
+
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml
new file mode 100644
index 0000000000..f81bbf2537
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml
@@ -0,0 +1,45 @@
+spack:
+ view: false
+
+ definitions:
+ - apps:
+ - gromacs %oneapi
+ - lammps %oneapi
+ # earliest oneapi version with fix does not run on AmazonLinux2, see https://github.com/spack/spack/pull/46457
+ # - mpas-model %oneapi
+ - openfoam %gcc
+ - palace %oneapi ^superlu-dist%oneapi # hack: force fortran-rt provider through superlu-dist
+ # TODO: Find out how to make +ipo cmake flag work.
+ # - quantum-espresso %oneapi
+ - openmpi %oneapi
+ - wrf %oneapi
+
+ - targets:
+ - 'target=x86_64_v4'
+ - 'target=x86_64_v3'
+
+ specs:
+ - matrix:
+ - [$apps]
+ - [$targets]
+ ci:
+ pipeline-gen:
+ - build-job:
+ image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] }
+ before_script:
+ - - . "./share/spack/setup-env.sh"
+ - . /etc/profile.d/modules.sh
+ - spack --version
+ - spack arch
+ # Use gcc from pre-installed spack store
+ - - cp share/spack/gitlab/cloud_pipelines/configs/config.yaml etc/spack/
+ - /bin/bash "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh"
+ - rm etc/spack/config.yaml
+ - signing-job:
+ before_script:
+ # Do not distribute Intel & ARM binaries
+ - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
+ - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done
+
+ cdash:
+ build-group: AWS Packages
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml
new file mode 100644
index 0000000000..d267db430e
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml
@@ -0,0 +1,33 @@
+spack:
+ view: false
+
+ packages:
+ all:
+ require: target=aarch64
+
+ config:
+ deprecated: true # allow old python versions
+
+ specs:
+ - clingo-bootstrap +optimized ^python@3.13
+ - clingo-bootstrap +optimized ^python@3.12
+ - clingo-bootstrap +optimized ^python@3.11
+ - clingo-bootstrap +optimized ^python@3.10
+ - clingo-bootstrap +optimized ^python@3.9
+ - clingo-bootstrap +optimized ^python@3.8
+
+ - clingo-bootstrap@spack +optimized ^python@3.13
+ - clingo-bootstrap@spack +optimized ^python@3.12
+ - clingo-bootstrap@spack +optimized ^python@3.11
+ - clingo-bootstrap@spack +optimized ^python@3.10
+ - clingo-bootstrap@spack +optimized ^python@3.9
+ - clingo-bootstrap@spack +optimized ^python@3.8
+
+ ci:
+ pipeline-gen:
+ - build-job-remove:
+ tags: [spack, public]
+ - build-job:
+ variables:
+ CI_GPG_KEY_ROOT: /etc/protected-runner
+ tags: [macos-ventura, apple-clang-15, aarch64-macos]
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml
new file mode 100644
index 0000000000..67d5b20fa3
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml
@@ -0,0 +1,35 @@
+spack:
+ view: false
+
+ packages:
+ all:
+ require: target=x86_64_v3
+
+ config:
+ deprecated: true # allow old python versions
+
+ specs:
+ - clingo-bootstrap +optimized ^python@3.13
+ - clingo-bootstrap +optimized ^python@3.12
+ - clingo-bootstrap +optimized ^python@3.11
+ - clingo-bootstrap +optimized ^python@3.10
+ - clingo-bootstrap +optimized ^python@3.9
+ - clingo-bootstrap +optimized ^python@3.8
+ - clingo-bootstrap +optimized ^python@3.7
+ - clingo-bootstrap +optimized ^python@3.6
+
+ - clingo-bootstrap@spack +optimized ^python@3.13
+ - clingo-bootstrap@spack +optimized ^python@3.12
+ - clingo-bootstrap@spack +optimized ^python@3.11
+ - clingo-bootstrap@spack +optimized ^python@3.10
+ - clingo-bootstrap@spack +optimized ^python@3.9
+ - clingo-bootstrap@spack +optimized ^python@3.8
+ - clingo-bootstrap@spack +optimized ^python@3.7
+ - clingo-bootstrap@spack +optimized ^python@3.6
+
+ ci:
+ pipeline-gen:
+ - build-job:
+ image:
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+ entrypoint: ['']
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml
index bf298d606d..02594f3b61 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml
@@ -1,42 +1,50 @@
spack:
view: false
packages:
+ all:
+ require: target=x86_64_v3
cmake:
variants: ~ownlibs
ecp-data-vis-sdk:
- require: "+ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf +sensei +sz +unifyfs +veloc +vtkm +zfp"
+ require:
+ - "+ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf +sensei +sz +unifyfs +veloc +vtkm +zfp"
hdf5:
require:
- - one_of: ['@1.14', '@1.12']
+ - "@1.14"
mesa:
- require: "+glx +osmesa +opengl ~opengles +llvm"
- libosmesa:
- require: "mesa +osmesa"
+ require:
+ - "+glx +osmesa +opengl ~opengles +llvm"
libglx:
require: "mesa +glx"
ospray:
- require: '@2.8.0 +denoiser +mpi'
+ require:
+ - "@2.8.0"
+ - "+denoiser +mpi"
llvm:
- require: '@14:'
+ require: ["@14:"]
# Minimize LLVM
variants: ~lldb~lld~libomptarget~polly~gold libunwind=none compiler-rt=none
- all:
- require: target=x86_64_v3
+ libllvm:
+ require: ["^llvm"]
+ visit:
+ require: ["@3.4.1"]
+
+ concretizer:
+ unify: when_possible
definitions:
- paraview_specs:
- matrix:
- - - paraview +raytracing
- - - +qt~osmesa # GUI Support w/ GLX Rendering
- - ~qt~osmesa # GLX Rendering
- - ~qt+osmesa # OSMesa Rendering
+ - - paraview +raytracing +adios2 +fides
+ - - +qt ^[virtuals=gl] glx # GUI Support w/ GLX Rendering
+ - ~qt ^[virtuals=gl] glx # GLX Rendering
+ - ^[virtuals=gl] osmesa # OSMesa Rendering
- visit_specs:
- matrix:
- - visit
- - - ~gui~osmesa # GLX Rendering
- - ~gui+osmesa # OSMesa Rendering
- # VisIt GUI does not work with Qt 5.14.2
- # - +gui~osmesa # GUI Support w/ GLX Rendering
+ - - ~gui ^[virtuals=gl] glx
+ - ~gui ^[virtuals=gl] osmesa
+ - +gui ^[virtuals=gl] glx # GUI Support w/ GLX Rendering
- sdk_base_spec:
- matrix:
- - ecp-data-vis-sdk +ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml
deleted file mode 100644
index 0c6bf0b05b..0000000000
--- a/share/spack/gitlab/cloud_pipelines/stacks/deprecated/spack.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-###
-# Spack pipeline for testing deprecated gitlab-ci configuration
-###
-spack:
- view: false
- concretizer:
- reuse: false
- unify: false
- config:
- concretizer: clingo
- db_lock_timeout: 120
- install_tree:
- padded_length: 256
- projections:
- all: '{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'
- deprecated: true
- packages:
- all:
- require: target=x86_64
- specs:
- - readline
-
- mirrors:
- mirror: s3://spack-binaries/develop/deprecated
- gitlab-ci:
- broken-tests-packages:
- - gptune
- broken-specs-url: s3://spack-binaries/broken-specs
- image: ghcr.io/spack/tutorial-ubuntu-18.04:v2021-11-02
- before_script:
- - uname -a || true
- - grep -E "vendor|model name" /proc/cpuinfo 2>/dev/null | sort -u || head -n10
- /proc/cpuinfo 2>/dev/null || true
- - nproc
- - . "./share/spack/setup-env.sh"
- - spack --version
- - spack arch
- script:
- - spack compiler find
- - cd ${SPACK_CONCRETE_ENV_DIR}
- - spack env activate --without-view .
- - if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS";
- fi
- - spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- - mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
- # AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification)
- - if [[ -r /mnt/key/e4s.gpg ]]; then spack gpg trust /mnt/key/e4s.gpg; fi
- # UO runners mount intermediate ci public key (verification), AWS runners mount public/private (signing/verification)
- - if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg;
- fi
- - if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg;
- fi
- - spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt)
- 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
- after_script:
- - cat /proc/loadavg || true
- match_behavior: first
- mappings:
- - match:
- - '@:'
- runner-attributes:
- tags: [spack, public, small, x86_64]
- variables:
- CI_JOB_SIZE: small
- SPACK_BUILD_JOBS: '1'
- KUBERNETES_CPU_REQUEST: 500m
- KUBERNETES_MEMORY_REQUEST: 500M
- signing-job-attributes:
- image: {name: 'ghcr.io/spack/notary:latest', entrypoint: ['']}
- tags: [aws]
- script:
- - aws s3 sync --exclude "*" --include "*spec.json*" ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache
- /tmp
- - /sign.sh
- - aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache
- - aws s3 cp /tmp/public_keys ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/_pgp
- --recursive --exclude "*" --include "*.pub"
-
- service-job-attributes:
- image: ghcr.io/spack/tutorial-ubuntu-18.04:v2021-11-02
- before_script:
- - . "./share/spack/setup-env.sh"
- - spack --version
- tags: [spack, public, x86_64]
- cdash:
- build-group: Spack Deprecated CI
- url: https://cdash.spack.io
- project: Spack Testing
- site: Cloud Gitlab Infrastructure
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-darwin/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-darwin/spack.yaml
new file mode 100644
index 0000000000..48ab265a51
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-darwin/spack.yaml
@@ -0,0 +1,75 @@
+spack:
+ view: false
+ packages:
+ all:
+ require:
+ - target=aarch64
+ concretizer:
+ unify: true
+ reuse: false
+ specs:
+ # editors
+ - neovim~no_luajit
+ - py-pynvim
+ - emacs+json~native+treesitter # TODO native not supported until gcc builds on darwin
+ # - tree-sitter is a dep, should also have cli but no package
+ - nano # just in case
+ # tags and scope search helpers
+ - universal-ctags # only maintained ctags, works better with c++
+ - direnv
+ # runtimes and compilers
+ - python
+ - llvm+link_llvm_dylib+lld~lldb~polly+python build_type=MinSizeRel # for clangd, clang-format
+ - node-js # for editor plugins etc., pyright language server
+ - npm
+ - cmake
+ - libtool
+ - go # to build fzf, gh, hub
+ - rust+dev # fd, ripgrep, hyperfine, exa, rust-analyzer
+ # styling and lints
+ - astyle
+ - cppcheck
+ - uncrustify
+ - py-fprettify
+ - py-fortran-language-server
+ - py-python-lsp-server
+ # cli dev tools
+ - ripgrep
+ - gh
+ - fd
+ # - bfs # liburing: /usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
+ - fzf
+ - tree
+ - jq
+ - py-yq
+ - hub
+ - ncdu
+ - eza
+ - lsd
+ - hyperfine
+ - htop
+ - tmux
+ - ccache
+ # ensure we can use a jobserver build and do this fast
+ - gmake
+ - ninja # should be @kitware, can't be because of meson requirement
+ - libtree
+ - sed
+ - which
+ - flex
+ - graphviz
+ - doxygen
+ - meson
+ - lima
+
+ ci:
+ pipeline-gen:
+ - build-job-remove:
+ tags: [ spack, public ]
+ - build-job:
+ variables:
+ CI_GPG_KEY_ROOT: /etc/protected-runner
+ tags: [ "macos-ventura", "apple-clang-15", "aarch64-macos" ]
+
+ cdash:
+ build-group: Developer Tools Darwin
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml
new file mode 100644
index 0000000000..e2a3c0bf5e
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools-manylinux2014/spack.yaml
@@ -0,0 +1,100 @@
+spack:
+ view: false
+ packages:
+ all:
+ require: target=x86_64_v3
+ concretizer:
+ unify: true
+ reuse: false
+ definitions:
+ - default_specs:
+ # editors
+ - neovim~no_luajit
+ - py-pynvim
+ - emacs+json+native+treesitter # note, pulls in gcc
+ # - tree-sitter is a dep, should also have cli but no package
+ - nano # just in case
+ # tags and scope search helpers
+ - universal-ctags # only maintained ctags, works better with c++
+ - direnv
+ # runtimes and compilers
+ - python
+ - llvm+link_llvm_dylib~lld~lldb~polly+python build_type=MinSizeRel # for clangd, clang-format
+ - node-js # for editor plugins etc., pyright language server
+ - npm
+ - cmake
+ - libtool
+ - go # to build fzf, gh, hub
+ - rust+dev # fd, ripgrep, hyperfine, exa, rust-analyzer
+ - binutils+ld+gold+plugins # support linking with built gcc
+ # styling and lints
+ - astyle
+ - cppcheck
+ - uncrustify
+ - py-fprettify
+ - py-fortran-language-server
+ - py-python-lsp-server
+ # cli dev tools
+ - ripgrep
+ - gh
+ - fd
+ # - bfs # liburing: /usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
+ - fzf
+ - tree
+ - jq
+ - py-yq
+ - hub
+ - ncdu
+ - eza
+ - lsd
+ - hyperfine
+ - htop
+ - tmux
+ - ccache
+ # ensure we can use a jobserver build and do this fast
+ - gmake
+ - ninja # should be @kitware, can't be because of meson requirement
+ - openssl certs=system # must be this, system external does not work
+ - libtree
+ - patchelf
+ - sed
+ - which
+ - elfutils
+ - fontconfig
+ - font-util
+ - gdb
+ - flex
+ - graphviz
+ - doxygen
+ - meson
+
+ - arch:
+ - '%gcc target=x86_64_v3'
+
+ specs:
+ - matrix:
+ - - $default_specs
+ - - $arch
+
+ compilers:
+ - compiler:
+ spec: gcc@=10.2.1
+ paths:
+ cc: /opt/rh/devtoolset-10/root/usr/bin/gcc
+ cxx: /opt/rh/devtoolset-10/root/usr/bin/g++
+ f77: /opt/rh/devtoolset-10/root/usr/bin/gfortran
+ fc: /opt/rh/devtoolset-10/root/usr/bin/gfortran
+ flags: {}
+ operating_system: centos7
+ target: x86_64
+ modules: []
+ environment: {}
+ extra_rpaths: []
+
+ ci:
+ pipeline-gen:
+ - build-job:
+ image: ghcr.io/spack/spack/manylinux2014:2024.03.28
+
+ cdash:
+ build-group: Developer Tools Manylinux2014
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/developer-tools/spack.yaml
deleted file mode 100644
index cc4c27261f..0000000000
--- a/share/spack/gitlab/cloud_pipelines/stacks/developer-tools/spack.yaml
+++ /dev/null
@@ -1,69 +0,0 @@
-spack:
- view: false
- packages:
- all:
- require: target=x86_64_v3
- concretizer:
- unify: true
- definitions:
- - default_specs:
- # editors
- - neovim~no_luajit
- - py-pynvim
- - emacs@29.1+json+native+treesitter # note, pulls in gcc
- # - tree-sitter is a dep, should also have cli but no package
- - nano # just in case
- # tags and scope search helpers
- - universal-ctags # only maintained ctags, works better with c++
- - direnv
- # runtimes and compilers
- - python
- - llvm+link_llvm_dylib~lld~lldb~polly+python build_type=MinSizeRel # for clangd, clang-format
- - node-js # for editor plugins etc., pyright language server
- - npm
- - go # to build fzf, gh, hub
- - rust+analysis # fd, ripgrep, hyperfine, exa, rust-analyzer
- - binutils+ld+gold+plugins # support linking with built gcc
- # styling and lints
- - astyle
- - cppcheck
- - uncrustify
- - py-fprettify
- - py-fortran-language-server
- - py-python-lsp-server
- # cli dev tools
- - ripgrep
- - gh
- - fd
- - bfs
- - fzf
- - tree
- - jq
- - py-yq
- - hub
- - ncdu
- - eza
- - lsd
- - hyperfine
- - htop
- - tmux
- - ccache
- # ensure we can use a jobserver build and do this fast
- - gmake
- - ninja # should be @kitware, can't be because of meson requirement
- - "openssl certs=system" # must be this, system external does not work
- - arch:
- - '%gcc target=x86_64_v3'
-
- specs:
- - matrix:
- - - $default_specs
- - - $arch
-
- ci:
- pipeline-gen:
- - build-job:
- image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01"
-
- cdash:
- build-group: Developer Tools
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
index 5cd3178d66..1f4e526dca 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
@@ -10,8 +10,8 @@ spack:
packages:
all:
- require:
- - any_of: ["%cce", "@:"] # cce as a strong preference; not all packages support it
+ prefer:
+ - "%cce"
compiler: [cce]
providers:
blas: [cray-libsci]
@@ -31,7 +31,7 @@ spack:
cuda:
version: [11.7.0]
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
require: "%gcc"
gcc-runtime:
require: "%gcc"
@@ -41,13 +41,16 @@ spack:
variants: fabrics=sockets,tcp,udp,rxm
libunwind:
variants: +pic +xz
+ mgard:
+ require:
+ - "@2023-01-10:"
mpich:
variants: ~wrapperrpath
ncurses:
variants: +termlib
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
- require: "@5.11 ~qt+osmesa"
+ require: "@5.11 ~qt ^[virtuals=gl] osmesa"
python:
version: [3.8.13]
trilinos:
@@ -78,9 +81,10 @@ spack:
- boost +python +filesystem +iostreams +system
- cabana
- caliper
- - chai ~benchmarks ~tests
+ - chai
- charliecloud
- conduit
+ # - cp2k +mpi # libxsmm: ftn-78 ftn: ERROR in command linel; The -f option has an invalid argument, "tree-vectorize".
- datatransferkit
- flecsi
- flit
@@ -102,14 +106,13 @@ spack:
- lammps
- legion
- libnrm
- - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed
- +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +mgard
+ #- libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +mgard # mgard:
- libquo
- libunwind
- mercury
- metall
- mfem
- - mgard +serial +openmp +timing +unstructured ~cuda
+ # - mgard +serial +openmp +timing +unstructured ~cuda # mgard
- mpark-variant
- mpifileutils ~xattr
- nccmp
@@ -117,7 +120,7 @@ spack:
- netlib-scalapack
- omega-h
- openmpi
- - openpmd-api
+ - openpmd-api ^adios2~mgard
- papi
- papyrus
- pdt
@@ -151,7 +154,6 @@ spack:
# - alquimia # pflotran: petsc-3.19.4-c6pmpdtpzarytxo434zf76jqdkhdyn37/lib/petsc/conf/rules:169: material_aux.o] Error 1: fortran errors
# - amrex # disabled temporarily pending resolution of unreproducible CI failure
- # - archer # subsumed by llvm +omp_tsan
# - axom # axom: CMake Error at axom/sidre/cmake_install.cmake:154 (file): file INSTALL cannot find "/tmp/gitlab-runner-2/spack-stage/spack-stage-axom-0.8.1-jvol6riu34vuyqvrd5ft2gyhrxdqvf63/spack-build-jvol6ri/lib/fortran/axom_spio.mod": No such file or directory.
# - bricks # bricks: clang-15: error: clang frontend command failed with exit code 134 (use -v to see invocation)
# - dealii # llvm@14.0.6: ?; intel-tbb@2020.3: clang-15: error: unknown argument: '-flifetime-dse=1'; assimp@5.2.5: clang-15: error: clang frontend command failed with exit code 134 (use -v to see invocation)
@@ -167,13 +169,13 @@ spack:
# - phist # fortran_bindings/CMakeFiles/phist_fort.dir/phist_testing.F90.o: ftn-78 ftn: ERROR in command line. The -f option has an invalid argument, "no-math-errno".
# - plasma # %cce conflict
# - py-jupyterhub # rust: ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC'; defined in /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o, referenced by /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o:(__no_mmap_for_malloc)
- # - py-warpx # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
# - quantum-espresso # quantum-espresso: CMake Error at cmake/FindSCALAPACK.cmake:503 (message): A required library with SCALAPACK API not found. Please specify library
# - scr # scr: make[2]: *** [examples/CMakeFiles/test_ckpt_F.dir/build.make:112: examples/test_ckpt_F] Error 1: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/mpich/8.1.25/ofi/cray/10.0/lib/libmpi_cray.so: undefined reference to `PMI_Barrier'
# - strumpack ~slate # strumpack: [test/CMakeFiles/test_HSS_seq.dir/build.make:117: test/test_HSS_seq] Error 1: ld.lld: error: undefined reference due to --no-allow-shlib-undefined: mpi_abort_
# - upcxx # upcxx: configure error: User requested --enable-ofi but I don't know how to build ofi programs for your system
# - variorum # variorum: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/lib64/libpals.so.0: undefined reference to `json_array_append_new@@libjansson.so.4'
# - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # openblas: ftn-2307 ftn: ERROR in command line: The "-m" option must be followed by 0, 1, 2, 3 or 4.; make[2]: *** [<builtin>: spotrf2.o] Error 1; make[1]: *** [Makefile:27: lapacklib] Error 2; make: *** [Makefile:250: netlib] Error 2
+ # - warpx +python # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
cdash:
build-group: E4S Cray
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml
index c141cd9bf9..d7ca80212a 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml
@@ -29,7 +29,7 @@ spack:
cuda:
version: [11.7.0]
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
require: "%gcc"
hdf5:
variants: +fortran +hl +shared
@@ -43,7 +43,7 @@ spack:
variants: +termlib
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
- require: "@5.11 ~qt+osmesa"
+ require: "@5.11 ~qt ^[virtuals=gl] osmesa"
python:
version: [3.8.13]
trilinos:
@@ -71,8 +71,9 @@ spack:
- butterflypack
- boost +python +filesystem +iostreams +system
- cabana
- - chai ~benchmarks ~tests
+ - chai
- conduit
+ # - cp2k +mpi # cp2k: Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/COMPLEX(4)).
- datatransferkit
- flecsi
- fortrilinos
@@ -147,7 +148,6 @@ spack:
# HOLDING THESE BACK UNTIL CRAY SLES CAPACITY IS EXPANDED AT UO
# - alquimia
# - amrex
- # - archer
# - axom
# - bricks
# - dealii
@@ -163,13 +163,13 @@ spack:
# - phist
# - plasma
# - py-jupyterhub
- # - py-warpx
# - quantum-espresso
# - scr
# - strumpack ~slate
# - upcxx
# - variorum
# - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu
+ # - warpx +python
cdash:
build-group: E4S Cray SLES
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml
new file mode 100644
index 0000000000..1eb61ec5e9
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse-v2/spack.yaml
@@ -0,0 +1,235 @@
+spack:
+ view: false
+
+ concretizer:
+ reuse: false
+ unify: false
+
+ packages:
+ all:
+ require: '%gcc target=neoverse_v2'
+ providers:
+ blas: [openblas]
+ mpi: [mpich]
+ variants: +mpi
+ binutils:
+ variants: +ld +gold +headers +libiberty ~nls
+ hdf5:
+ variants: +fortran +hl +shared
+ libfabric:
+ variants: fabrics=sockets,tcp,udp,rxm
+ openblas:
+ variants: threads=openmp
+ trilinos:
+ variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
+ mpi:
+ require: mpich
+ mpich:
+ require: '~wrapperrpath ~hwloc %gcc target=neoverse_v2'
+ tbb:
+ require: intel-tbb
+ vtk-m:
+ require: "+examples %gcc target=neoverse_v2"
+ paraview:
+ require: "+examples %gcc target=neoverse_v2"
+
+ specs:
+ # CPU
+ # - adios
+ # - alquimia
+ # - aml
+ - amrex
+ - arborx
+ # - argobots
+ - ascent # ecp dav
+ - axom
+ # - bolt
+ # - boost
+ - butterflypack
+ - cabana
+ - caliper
+ - chai
+ # - charliecloud
+ - conduit
+ - cp2k +mpi
+ - datatransferkit
+ - dyninst
+ - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 ~paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
+ - exaworks
+ - fftx
+ - flecsi
+ # - flit
+ # - flux-core
+ - fortrilinos
+ # - gasnet
+ - ginkgo
+ # - globalarrays
+ # - gmp
+ # - gotcha
+ # - gptune ~mpispawn
+ - gromacs +cp2k ^cp2k +mpi +dlaf build_system=cmake
+ - h5bench
+ - hdf5-vol-async
+ - hdf5-vol-cache
+ - hdf5-vol-log
+ - heffte +fftw
+ - hpctoolkit
+ - hpx networking=mpi
+ - hypre
+ - kokkos +openmp
+ - kokkos-kernels +openmp
+ - lammps
+ - lbann
+ - legion
+ - libnrm
+ - libquo
+ - libunwind
+ - loki
+ - mercury
+ - metall
+ - mfem
+ - mgard +serial +openmp +timing +unstructured ~cuda
+ - mpark-variant
+ - mpifileutils ~xattr
+ - nccmp
+ - nco
+ - netlib-scalapack
+ - nrm
+ # - nvhpc
+ - nwchem
+ - omega-h
+ - openfoam
+ # - openmpi
+ - openpmd-api
+ - papi
+ - papyrus
+ - parsec ~cuda
+ - pdt
+ - petsc
+ - phist
+ - plasma
+ - plumed
+ - precice
+ - pruners-ninja
+ - pumi
+ - py-amrex
+ - py-h5py
+ - py-jupyterhub
+ - py-libensemble
+ - py-petsc4py
+ - qthreads scheduler=distrib
+ - quantum-espresso
+ - raja
+ - rempi
+ - scr
+ - slate ~cuda
+ - slepc
+ - stc
+ - strumpack ~slate
+ - sundials
+ - superlu
+ - superlu-dist
+ # - swig@4.0.2-fortran
+ - sz3
+ - tasmanian
+ - tau +mpi +python +syscall
+ - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
+ - turbine
+ # - umap
+ - umpire
+ - upcxx
+ # - veloc
+ - wannier90
+ - warpx +python
+ - xyce +mpi +shared +pymi +pymi_static_tpls
+ # INCLUDED IN ECP DAV CPU
+ # - adios2
+ # - darshan-runtime
+ # - darshan-util
+ # - faodel
+ # - hdf5
+ # - libcatalyst
+ # - parallel-netcdf
+ # - paraview
+ # - py-cinemasci
+ # - sz
+ # - unifyfs
+ # - visit # silo: https://github.com/spack/spack/issues/39538
+ # - vtk-m
+ # - zfp
+ # --
+ - laghos
+ # - bricks ~cuda # not respecting target=aarch64?
+ # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
+ # - geopm # geopm: https://github.com/spack/spack/issues/38795
+ # - glvis # glvis: https://github.com/spack/spack/issues/42839
+ # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs@0.7.3: gcc: error: unrecognized command-line option '-mno-sse2'
+ # - variorum # variorum: https://github.com/spack/spack/issues/38786
+
+ # CUDA NOARCH
+ - flux-core +cuda
+ - hpctoolkit +cuda
+ - papi +cuda
+ - tau +mpi +cuda +syscall
+ # --
+ # - bricks +cuda # not respecting target=aarch64?
+ # - legion +cuda # legion: needs NVIDIA driver
+
+ # CUDA 90
+ - amrex +cuda cuda_arch=90
+ - arborx +cuda cuda_arch=90 ^kokkos +wrapper
+ - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
+ - caliper +cuda cuda_arch=90
+ - chai +cuda cuda_arch=90 ^umpire ~shared
+ - fftx +cuda cuda_arch=90
+ - flecsi +cuda cuda_arch=90
+ - ginkgo +cuda cuda_arch=90
+ - gromacs +cuda cuda_arch=90
+ - heffte +cuda cuda_arch=90
+ - hpx +cuda cuda_arch=90
+ - kokkos +wrapper +cuda cuda_arch=90
+ - kokkos-kernels +cuda cuda_arch=90 ^kokkos +wrapper +cuda cuda_arch=90
+ - magma +cuda cuda_arch=90
+ - mfem +cuda cuda_arch=90
+ - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=90
+ - parsec +cuda cuda_arch=90
+ - petsc +cuda cuda_arch=90
+ - raja +cuda cuda_arch=90
+ - slate +cuda cuda_arch=90
+ - strumpack ~slate +cuda cuda_arch=90
+ - sundials +cuda cuda_arch=90
+ - superlu-dist +cuda cuda_arch=90
+ - trilinos +cuda cuda_arch=90
+ - umpire ~shared +cuda cuda_arch=90
+ # INCLUDED IN ECP DAV CUDA
+ - adios2 +cuda cuda_arch=90
+ # - ascent +cuda cuda_arch=90 # ascent: https://github.com/spack/spack/issues/38045
+ # - paraview +cuda cuda_arch=90 # paraview: InstallError: Incompatible cuda_arch=90
+ - vtk-m +cuda cuda_arch=90
+ - zfp +cuda cuda_arch=90
+ # --
+ # - axom +cuda cuda_arch=90 # axom: https://github.com/spack/spack/issues/29520
+ # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
+ # - cusz +cuda cuda_arch=90 # cusz: https://github.com/spack/spack/issues/38787
+ # - dealii +cuda cuda_arch=90 # dealii: https://github.com/spack/spack/issues/39532
+ # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # embree: https://github.com/spack/spack/issues/39534
+ # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12:
+ # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver
+ # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann"
+ # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=90 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787
+ # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535
+ # - py-torch +cuda cuda_arch=90 # skipped, installed by other means
+ # - slepc +cuda cuda_arch=90 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
+ # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12
+ # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver
+
+ ci:
+ pipeline-gen:
+ - build-job:
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01
+
+ cdash:
+ build-group: E4S ARM Neoverse V2
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml
index 82a1f07c8d..886699b54a 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml
@@ -7,21 +7,17 @@ spack:
packages:
all:
- require: '%gcc@11.4.0 target=neoverse_v1'
+ require: '%gcc target=neoverse_v1'
providers:
blas: [openblas]
mpi: [mpich]
variants: +mpi
binutils:
variants: +ld +gold +headers +libiberty ~nls
- elfutils:
- variants: +bzip2 ~nls +xz
hdf5:
variants: +fortran +hl +shared
libfabric:
variants: fabrics=sockets,tcp,udp,rxm
- libunwind:
- variants: +pic +xz
openblas:
variants: threads=openmp
trilinos:
@@ -29,30 +25,16 @@ spack:
+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 +superlu-dist gotype=long_long
- xz:
- variants: +pic
- mesa:
- version: [21.3.8]
mpi:
require: mpich
mpich:
- require: '~wrapperrpath ~hwloc'
- ncurses:
- require: '@6.3 +termlib'
+ require: '~wrapperrpath ~hwloc %gcc target=neoverse_v1'
tbb:
require: intel-tbb
- boost:
- version: [1.79.0]
- variants: +atomic +chrono +container +date_time +exception +filesystem +graph
- +iostreams +locale +log +math +mpi +multithreaded +program_options +random
- +regex +serialization +shared +signals +stacktrace +system +test +thread +timer
- cxxstd=17 visibility=global
- libffi:
- require: "@3.4.4"
vtk-m:
- require: "+examples"
- cuda:
- version: [11.8.0]
+ require: "+examples %gcc target=neoverse_v1"
+ paraview:
+ require: "+examples %gcc target=neoverse_v1"
specs:
# CPU
@@ -62,20 +44,22 @@ spack:
- amrex
- arborx
- argobots
- - ascent # ecp dav
- axom
- bolt
- boost
- butterflypack
- cabana
- caliper
- - chai ~benchmarks ~tests
+ - chai
+ - chapel ~cuda ~rocm
- charliecloud
- conduit
+ - cp2k +mpi
- datatransferkit
- dyninst
- - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
+ - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
- exaworks
+ - fftx
- flecsi
- flit
- flux-core
@@ -86,7 +70,7 @@ spack:
- gmp
- gotcha
- gptune ~mpispawn
- - gromacs +cp2k ^cp2k build_system=cmake
+ - gromacs +cp2k ^cp2k +mpi +dlaf build_system=cmake
- h5bench
- hdf5-vol-async
- hdf5-vol-cache
@@ -97,6 +81,7 @@ spack:
- hypre
- kokkos +openmp
- kokkos-kernels +openmp
+ - laghos
- lammps
- lbann
- legion
@@ -115,6 +100,7 @@ spack:
- netlib-scalapack
- nrm
- nvhpc
+ - nwchem
- omega-h
- openfoam
- openmpi
@@ -130,11 +116,11 @@ spack:
- precice
- pruners-ninja
- pumi
+ - py-amrex
- py-h5py
- py-jupyterhub
- py-libensemble
- py-petsc4py
- - py-warpx
- qthreads scheduler=distrib
- quantum-espresso
- raja
@@ -157,9 +143,13 @@ spack:
- umpire
- upcxx
- wannier90
+ - warpx +python
+ - wps
+ - wrf
- xyce +mpi +shared +pymi +pymi_static_tpls
# INCLUDED IN ECP DAV CPU
- adios2
+ - ascent
- darshan-runtime
- darshan-util
- faodel
@@ -171,16 +161,37 @@ spack:
- sz
- unifyfs
- veloc
- # - visit # silo: https://github.com/spack/spack/issues/39538
+ # - visit # silo: https://github.com/spack/spack/issues/39538
- vtk-m
- zfp
# --
- # - archer # part of llvm +omp_tsan
- # - bricks ~cuda # not respecting target=aarch64?
- # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - geopm # geopm: https://github.com/spack/spack/issues/38795
+ # - bricks ~cuda # not respecting target=aarch64?
+ # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
+ # - geopm # geopm: https://github.com/spack/spack/issues/38795
+ # - glvis # glvis: https://github.com/spack/spack/issues/42839
# - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs@0.7.3: gcc: error: unrecognized command-line option '-mno-sse2'
- # - variorum # variorum: https://github.com/spack/spack/issues/38786
+ # - variorum # variorum: https://github.com/spack/spack/issues/38786
+
+ # PYTHON PACKAGES
+ - opencv +python3
+ - py-horovod
+ - py-jax
+ - py-jupyterlab
+ - py-matplotlib
+ - py-mpi4py
+ - py-notebook
+ - py-numba
+ - py-numpy
+ - py-openai
+ - py-pandas
+ - py-plotly
+ - py-pooch
+ - py-pytest
+ - py-scikit-learn
+ - py-scipy
+ - py-seaborn
+ - py-tensorflow
+ - py-torch
# CUDA NOARCH
- flux-core +cuda
@@ -188,17 +199,23 @@ spack:
- papi +cuda
- tau +mpi +cuda +syscall
# --
- # - bricks +cuda # not respecting target=aarch64?
- # - legion +cuda # legion: needs NVIDIA driver
+ # - bricks +cuda # not respecting target=aarch64?
+ # - legion +cuda # legion: needs NVIDIA driver
# CUDA 75
- amrex +cuda cuda_arch=75
- arborx +cuda cuda_arch=75 ^kokkos +wrapper
+ - axom +cuda cuda_arch=75
- cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75
- caliper +cuda cuda_arch=75
- - chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared
+ - chai +cuda cuda_arch=75 ^umpire ~shared
+ - chapel +cuda cuda_arch=75
+ - cusz +cuda cuda_arch=75
+ - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=75 # # +paraview: job killed oom?
+ - fftx +cuda cuda_arch=75
- flecsi +cuda cuda_arch=75
- ginkgo +cuda cuda_arch=75
+ - gromacs +cuda cuda_arch=75
- heffte +cuda cuda_arch=75
- hpx +cuda cuda_arch=75
- hypre +cuda cuda_arch=75
@@ -210,8 +227,10 @@ spack:
- omega-h +cuda cuda_arch=75
- parsec +cuda cuda_arch=75
- petsc +cuda cuda_arch=75
+ - py-torch +cuda cuda_arch=75
- raja +cuda cuda_arch=75
- slate +cuda cuda_arch=75
+ - slepc +cuda cuda_arch=75
- strumpack ~slate +cuda cuda_arch=75
- sundials +cuda cuda_arch=75
- superlu-dist +cuda cuda_arch=75
@@ -220,30 +239,32 @@ spack:
- umpire ~shared +cuda cuda_arch=75
# INCLUDED IN ECP DAV CUDA
- adios2 +cuda cuda_arch=75
- - paraview +cuda cuda_arch=75
+ # - ascent +cuda cuda_arch=75 # ascent: https://github.com/spack/spack/issues/38045
- vtk-m +cuda cuda_arch=75
- zfp +cuda cuda_arch=75
# --
- # - ascent +cuda cuda_arch=75 # ascent: https://github.com/spack/spack/issues/38045
- # - axom +cuda cuda_arch=75 # axom: https://github.com/spack/spack/issues/29520
- # - cusz +cuda cuda_arch=75 # cusz: https://github.com/spack/spack/issues/38787
- # - dealii +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=75 # embree: https://github.com/spack/spack/issues/39534
- # - lammps +cuda cuda_arch=75 # lammps: needs NVIDIA driver
- # - lbann +cuda cuda_arch=75 # lbann: https://github.com/spack/spack/issues/38788
+ # - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
+ # - dealii +cuda cuda_arch=75 ~vtk # include/deal.II/base/vectorization.h(1498): error: identifier "vaddvq_f32" is undefined; +vtk: https://github.com/spack/spack/pull/45554#issuecomment-2457255720
+ # - lammps +cuda cuda_arch=75 # lammps: needs NVIDIA driver
+ # - lbann +cuda cuda_arch=75 # aluminum: include/aluminum/base.hpp:53: multiple definition of `cub::CUB_200400___CUDA_ARCH_LIST___NS::Debug(cudaError,char const*, int)'; lbann: https://github.com/spack/spack/issues/38788
# - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=75 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787
- # - py-torch +cuda cuda_arch=75 # skipped, installed by other means
- # - slepc +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - upcxx +cuda cuda_arch=75 # upcxx: needs NVIDIA driver
+ # - paraview +cuda cuda_arch=75 # paraview: killed oom?
+ # - upcxx +cuda cuda_arch=75 # upcxx: needs NVIDIA driver
# CUDA 80
- amrex +cuda cuda_arch=80
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
+ - axom +cuda cuda_arch=80
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
- caliper +cuda cuda_arch=80
- - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
+ - chai +cuda cuda_arch=80 ^umpire ~shared
+ - chapel +cuda cuda_arch=80
+ - cusz +cuda cuda_arch=80
+ - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=80 # +paraview: job killed oom?
+ - fftx +cuda cuda_arch=80
- flecsi +cuda cuda_arch=80
- ginkgo +cuda cuda_arch=80
+ - gromacs +cuda cuda_arch=80
- heffte +cuda cuda_arch=80
- hpx +cuda cuda_arch=80
- hypre +cuda cuda_arch=80
@@ -255,8 +276,10 @@ spack:
- omega-h +cuda cuda_arch=80
- parsec +cuda cuda_arch=80
- petsc +cuda cuda_arch=80
+ - py-torch +cuda cuda_arch=80
- raja +cuda cuda_arch=80
- slate +cuda cuda_arch=80
+ - slepc +cuda cuda_arch=80
- strumpack ~slate +cuda cuda_arch=80
- sundials +cuda cuda_arch=80
- superlu-dist +cuda cuda_arch=80
@@ -264,33 +287,35 @@ spack:
- trilinos +cuda cuda_arch=80
- umpire ~shared +cuda cuda_arch=80
# INCLUDED IN ECP DAV CUDA
+ # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045
- adios2 +cuda cuda_arch=80
- - paraview +cuda cuda_arch=80
- vtk-m +cuda cuda_arch=80
- zfp +cuda cuda_arch=80
# --
- # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045
- # - axom +cuda cuda_arch=80 # axom: https://github.com/spack/spack/issues/29520
- # - cusz +cuda cuda_arch=80 # cusz: https://github.com/spack/spack/issues/38787
- # - dealii +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # embree: https://github.com/spack/spack/issues/39534
- # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver
- # - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788
+ # - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file'
+ # - dealii +cuda cuda_arch=80 ~vtk # include/deal.II/base/vectorization.h(1498): error: identifier "vaddvq_f32" is undefined; +vtk: https://github.com/spack/spack/pull/45554#issuecomment-2457255720
+ # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver
+ # - lbann +cuda cuda_arch=80 # aluminum: include/aluminum/base.hpp:53: multiple definition of `cub::CUB_200400___CUDA_ARCH_LIST___NS::Debug(cudaError,char const*, int)'; lbann: https://github.com/spack/spack/issues/38788
# - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=80 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787
- # - py-torch +cuda cuda_arch=80 # skipped, installed by other means
- # - slepc +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver
+ # - paraview +cuda cuda_arch=80 # paraview: killed oom?
+ # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver
# CUDA 90
- amrex +cuda cuda_arch=90
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
+ - axom +cuda cuda_arch=90
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
- caliper +cuda cuda_arch=90
- - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
+ - chai +cuda cuda_arch=90 ^umpire ~shared
+ - chapel +cuda cuda_arch=90
+ - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=90 # +paraview: vtkm/exec/cuda/internal/ThrustPatches.h(213): error: this declaration has no storage class or type specifier
+ - fftx +cuda cuda_arch=90
- flecsi +cuda cuda_arch=90
- ginkgo +cuda cuda_arch=90
+ - gromacs +cuda cuda_arch=90
- heffte +cuda cuda_arch=90
- hpx +cuda cuda_arch=90
+ - hypre +cuda cuda_arch=90
- kokkos +wrapper +cuda cuda_arch=90
- kokkos-kernels +cuda cuda_arch=90 ^kokkos +wrapper +cuda cuda_arch=90
- magma +cuda cuda_arch=90
@@ -298,38 +323,36 @@ spack:
- mgard +serial +openmp +timing +unstructured +cuda cuda_arch=90
- parsec +cuda cuda_arch=90
- petsc +cuda cuda_arch=90
+ - py-torch +cuda cuda_arch=90
- raja +cuda cuda_arch=90
- slate +cuda cuda_arch=90
+ - slepc +cuda cuda_arch=90
- strumpack ~slate +cuda cuda_arch=90
- sundials +cuda cuda_arch=90
- superlu-dist +cuda cuda_arch=90
+ - tasmanian +cuda cuda_arch=90
- trilinos +cuda cuda_arch=90
- umpire ~shared +cuda cuda_arch=90
# INCLUDED IN ECP DAV CUDA
- adios2 +cuda cuda_arch=90
- # - paraview +cuda cuda_arch=90 # paraview: InstallError: Incompatible cuda_arch=90
+ # - paraview +cuda cuda_arch=90 # paraview: InstallError: Incompatible cuda_arch=90
- vtk-m +cuda cuda_arch=90
- zfp +cuda cuda_arch=90
# --
- # - ascent +cuda cuda_arch=90 # ascent: https://github.com/spack/spack/issues/38045
- # - axom +cuda cuda_arch=90 # axom: https://github.com/spack/spack/issues/29520
- # - cusz +cuda cuda_arch=90 # cusz: https://github.com/spack/spack/issues/38787
- # - dealii +cuda cuda_arch=90 # dealii: https://github.com/spack/spack/issues/39532
- # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # embree: https://github.com/spack/spack/issues/39534
- # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12:
- # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver
- # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann"
+ # - ascent +cuda cuda_arch=90 # ascent: https://github.com/spack/spack/issues/38045
+ # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
+ # - cusz +cuda cuda_arch=90 # cusz: cuda-12.5.1-pil77yk7gsseyqitybr47qmhdtszbcwa/targets/sbsa-linux/include/cub/util_device.cuh:160:63: error: 'blockIdx' was not declared in this scope
+ # - dealii +cuda cuda_arch=90 # dealii: concretize conflict + https://github.com/spack/spack/issues/39532
+ # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver
+ # - lbann +cuda cuda_arch=90 # aluminum: include/aluminum/base.hpp:53: multiple definition of `cub::CUB_200400___CUDA_ARCH_LIST___NS::Debug(cudaError,char const*, int)';
# - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=90 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787
- # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535
- # - py-torch +cuda cuda_arch=90 # skipped, installed by other means
- # - slepc +cuda cuda_arch=90 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
- # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12
- # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver
+ # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535
+ # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver
ci:
pipeline-gen:
- build-job:
- image: "ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01"
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-arm64-gcc-11.4:2024.03.01
cdash:
build-group: E4S ARM Neoverse V1
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
index 75e11a695e..0095fd3ec1 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
@@ -8,19 +8,19 @@ spack:
packages:
all:
require:
- - any_of: ["%oneapi", "@:"] # oneapi as a strong preference; not all packages support it
- "target=x86_64_v3"
+ - "%oneapi"
providers:
blas: [openblas]
- mpi: [mpich]
tbb: [intel-tbb]
variants: +mpi
+ gl:
+ require: osmesa
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
gcc-runtime:
- require: "%gcc"
+ require: "%gcc target=x86_64_v3"
hdf5:
- require: "%gcc"
variants: +fortran +hl +shared
libfabric:
variants: fabrics=sockets,tcp,udp,rxm
@@ -37,44 +37,38 @@ spack:
+teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
xz:
variants: +pic
- mesa:
- version: [21.3.8]
mpi:
- require: 'mpich@4:'
+ require: 'mpich@4: target=x86_64_v3'
mpich:
- require: '~wrapperrpath ~hwloc'
- py-cryptography:
- require: '@38.0.1'
+ require: '~wrapperrpath ~hwloc target=x86_64_v3'
unzip:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
binutils:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
variants: +ld +gold +headers +libiberty ~nls
llvm:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
ruby:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
rust:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
krb5:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
papi:
- require: '%gcc'
+ require: '%gcc target=x86_64_v3'
openssh:
- require: '%gcc'
- libffi:
- require: "@3.4.4"
+ require: '%gcc target=x86_64_v3'
dyninst:
- require: "%gcc"
+ require: "%gcc target=x86_64_v3"
bison:
- require: '%gcc'
- # sycl abi change means you need 2024 compiler to use 2024 mkl
- intel-oneapi-mkl:
- require: "@2023"
+ require: '%gcc target=x86_64_v3'
+ paraview:
+ require: "+examples %oneapi target=x86_64_v3"
specs:
# CPU
- adios
+ - alquimia
- aml
- amrex
- arborx
@@ -86,11 +80,14 @@ spack:
- butterflypack
- cabana
- caliper
- - chai ~benchmarks ~tests
+ - chai
- charliecloud
- conduit
- datatransferkit
+ - dealii ~vtk ~taskflow cflags=-O0 cxxflags=-O0 # +vtk +taskflow: ^taskflow: CMake Error at CMakeLists.txt:81 (message): Taskflow currently supports the following compilers: g++ v7.0 or above, clang++ v6.0 or above; use -O0 to work around compiler failure
- drishti
+ - dxt-explorer
+ - ecp-data-vis-sdk ~cuda ~rocm +adios2 ~ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +ascent: fides: fides/xgc/XGCCommon.cxx:233:10: error: no member named 'iota' in namespace 'std'; +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *'
- exaworks
- flecsi
- flit
@@ -99,9 +96,11 @@ spack:
- gasnet
- ginkgo
- globalarrays
+ - glvis ^llvm
- gmp
- gotcha
- gptune ~mpispawn
+ - gromacs
- h5bench
- hdf5-vol-async
- hdf5-vol-cache
@@ -111,8 +110,8 @@ spack:
- hypre
- kokkos +openmp
- kokkos-kernels +openmp
+ - laghos
- lammps
- - lbann
- legion
- libnrm
- libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp
@@ -122,32 +121,34 @@ spack:
- mercury
- metall
- mfem
+ - mgard +serial +openmp +timing +unstructured ~cuda
- mpark-variant
- mpifileutils ~xattr
- nccmp
- nco
- netlib-scalapack
- nrm
+ - nwchem
- omega-h
+ - openfoam
- openmpi
+ - openpmd-api
- papi
- papyrus
- parsec ~cuda
- pdt
- petsc
- phist
- - plasma
- plumed
- precice
- pruners-ninja
- pumi
+ - py-amrex ~ipo # oneAPI 2024.2.0 builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it
- py-h5py
- py-jupyterhub
- py-libensemble
- py-petsc4py
- - py-warpx
- qthreads scheduler=distrib
- - quantum-espresso
- raja
- rempi
- scr
@@ -158,6 +159,7 @@ spack:
- sundials
- superlu
- superlu-dist
+ - swig@4.0.2-fortran
- sz3
- tasmanian
- tau +mpi +python +syscall
@@ -165,11 +167,13 @@ spack:
- turbine
- umap
- umpire
+ - upcxx
- variorum
- wannier90
+ - wrf
- xyce +mpi +shared +pymi +pymi_static_tpls
# INCLUDED IN ECP DAV CPU
- - adios2 # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing]
+ - adios2
- ascent
- darshan-runtime
- darshan-util
@@ -177,27 +181,46 @@ spack:
- hdf5
- libcatalyst
- parallel-netcdf
- # - paraview # paraview: VTK/ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c:2002:23: error: incompatible function pointer types passing 'herr_t (hid_t, const char *, const H5L_info1_t *, void *)' (aka 'int (long, const char *, const H5L_info1_t *, void *)') to parameter of type 'H5L_iterate2_t' (aka 'int (*)(long, const char *,const H5L_info2_t *, void *)') [-Wincompatible-function-pointer-types]
+ - paraview
- py-cinemasci
- sz
- unifyfs
- veloc
- # - visit # silo: https://github.com/spack/spack/issues/39538
- - vtk-m ~openmp # https://github.com/spack/spack/issues/31830
+ # - visit # visit: +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *'
+ - vtk-m ~openmp
+ - warpx +python ~python_ipo ^py-amrex ~ipo # oneAPI 2024.2.0 builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it
- zfp
# --
- # - alquimia # pflotran: https://github.com/spack/spack/issues/39474
- # - archer # subsumed under llvm +libomp_tsan
- # - dealii # dealii: https://github.com/spack/spack/issues/39482
- # - dxt-explorer # r: https://github.com/spack/spack/issues/40257
- # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # embree: CMake Error at CMakeLists.txt:215 (MESSAGE): Unsupported compiler: IntelLLVM; qt: qtbase/src/corelib/global/qendian.h:333:54: error: incomplete type 'std::numeric_limits' used in nested name specifier
- # - geopm # geopm issue: https://github.com/spack/spack/issues/38795
- # - hpctoolkit # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
- # - mgard +serial +openmp +timing +unstructured ~cuda # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing]
- # - openfoam # cgal: https://github.com/spack/spack/issues/39481
- # - openpmd-api # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing]
- # - swig@4.0.2-fortran # ?
- # - upcxx # upcxx: /opt/intel/oneapi/mpi/2021.10.0//libfabric/bin/fi_info: error while loading shared libraries: libfabric.so.1: cannot open shared object file: No such file or directory
+ # - chapel ~cuda ~rocm # llvm: closures.c:(.text+0x305e): undefined reference to `_intel_fast_memset'
+ # - cp2k +mpi # dbcsr: dbcsr_api.F(973): #error: incomplete macro call DBCSR_ABORT.
+ # - fftx # fftx: https://github.com/spack/spack/issues/47048
+ # - geopm-runtime # libelf: configure: error: installation or configuration problem: C compiler cannot create executables.
+ # - hpctoolkit # dyninst@13.0.0%gcc: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'
+ # - lbann # 2024.2 internal compiler error
+ # - plasma # 2024.2 internal compiler error
+ # - quantum-espresso # quantum-espresso: external/mbd/src/mbd_c_api.F90(392): error #6645: The name of the module procedure conflicts with a name in the encompassing scoping unit. [F_C_STRING]
+ # - wps # wps: InstallError: Compiler not recognized nor supported.
+
+ # PYTHON PACKAGES
+ - opencv +python3
+ - py-jupyterlab
+ - py-mpi4py
+ - py-notebook
+ - py-numba
+ - py-numpy
+ - py-openai
+ - py-pandas
+ - py-plotly
+ - py-pooch
+ - py-pytest
+ - py-scikit-learn
+ - py-scipy
+ - py-seaborn
+ # - py-horovod # error
+ # - py-jax # error
+ # - py-matplotlib # error
+ # - py-tensorflow # error
+ # - py-torch # error
# GPU
- aml +ze
@@ -209,20 +232,19 @@ spack:
- kokkos +sycl +openmp cxxstd=17 +examples
- kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +examples
- petsc +sycl
- - slate +sycl
- sundials +sycl cxxstd=17 +examples-install
- - tau +mpi +opencl +level_zero ~pdt +syscall # tau: requires libdrm.so to be installed
+ - tau +mpi +opencl +level_zero ~pdt +syscall # requires libdrm.so to be installed
- upcxx +level_zero
+ - warpx ~qed +python ~python_ipo compute=sycl ^py-amrex ~ipo # qed for https://github.com/ECP-WarpX/picsar/pull/53 prior to 24.09 release; ~ipo for oneAPI 2024.2.0 GPU builds do not support IPO/LTO says CMake, even though pybind11 strongly encourages it
# --
- # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
- # - warpx compute=sycl # warpx: spack-build-wzp6vvo/_deps/fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found
+ # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
+ # - slate +sycl # slate: ifx: error #10426: option '-fopenmp-targets' requires '-fiopenmp'
- - py-scipy
ci:
pipeline-gen:
- build-job:
- image: ghcr.io/spack/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-oneapi-2024.2:2024.09.06
cdash:
build-group: E4S OneAPI
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml
index 511f48e745..a770b0a299 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml
@@ -15,14 +15,10 @@ spack:
variants: +mpi cuda_arch=70
binutils:
variants: +ld +gold +headers +libiberty ~nls
- elfutils:
- variants: +bzip2 ~nls +xz
hdf5:
variants: +fortran +hl +shared
libfabric:
variants: fabrics=sockets,tcp,udp,rxm
- libunwind:
- variants: +pic +xz
openblas:
variants: threads=openmp
trilinos:
@@ -32,24 +28,22 @@ spack:
+teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
xz:
variants: +pic
- mesa:
- version: [21.3.8]
mpi:
require: mpich
mpich:
- require: '~wrapperrpath ~hwloc'
+ require: '~wrapperrpath ~hwloc %gcc@9.4.0 target=ppc64le'
ncurses:
- require: '@6.3 +termlib'
+ require: '@6.3 +termlib %gcc@9.4.0 target=ppc64le'
faodel:
- require: "~tcmalloc"
+ require: "~tcmalloc %gcc@9.4.0 target=ppc64le"
tbb:
require: intel-tbb
- libffi:
- require: "@3.4.4"
vtk-m:
- require: "+examples"
+ require: "+examples %gcc@9.4.0 target=ppc64le"
cuda:
- require: "@11.4.4"
+ require: "@11.4.4 %gcc@9.4.0 target=ppc64le"
+ paraview:
+ require: "+examples %gcc@9.4.0 target=ppc64le"
specs:
@@ -67,15 +61,17 @@ spack:
- butterflypack
- cabana
- caliper
- - chai ~benchmarks ~tests
+ - chai
+ - chapel ~rocm ~cuda
- charliecloud
- conduit
+ - cp2k +mpi
- datatransferkit
- drishti
- dxt-explorer
- dyninst
- # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 ~paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo
- exaworks
+ - fftx
- flecsi
- flit
- flux-core
@@ -86,7 +82,7 @@ spack:
- gmp
- gotcha
- gptune
- - gromacs +cp2k ^cp2k build_system=cmake
+ - gromacs +cp2k ^cp2k +mpi build_system=cmake
- h5bench
- hdf5-vol-async
- hdf5-vol-cache
@@ -97,6 +93,7 @@ spack:
- hypre
- kokkos +openmp
- kokkos-kernels +openmp
+ - laghos
- lammps
- lbann
- legion
@@ -115,6 +112,7 @@ spack:
- netlib-scalapack
- nrm
- nvhpc
+ - nwchem
- omega-h
- openfoam
- openmpi
@@ -130,11 +128,11 @@ spack:
- precice
- pruners-ninja
- pumi
+ - py-amrex
- py-h5py
- py-jupyterhub
- py-libensemble
- py-petsc4py
- - py-warpx
- qthreads scheduler=distrib
- quantum-espresso
- raja
@@ -157,6 +155,9 @@ spack:
- umpire
- upcxx
- wannier90
+ - warpx +python
+ - wps
+ - wrf
- xyce +mpi +shared +pymi +pymi_static_tpls
# INCLUDED IN ECP DAV CPU
- adios2
@@ -167,7 +168,6 @@ spack:
- hdf5
- libcatalyst
- parallel-netcdf
- - paraview
- py-cinemasci
- sz
- unifyfs
@@ -175,21 +175,43 @@ spack:
# - visit # libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo
- vtk-m
- zfp
+ # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 ~paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo
# --
- # - archer # part of llvm +omp_tsan
# - dealii # fltk: https://github.com/spack/spack/issues/38791
- # - geopm # geopm: https://github.com/spack/spack/issues/38798
+ # - geopm-runtime # cairo: *** No autoreconf found, please install it ***
+ # - glvis # glvis: https://github.com/spack/spack/issues/42839
# - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs: gcc: error: unrecognized command line option '-mno-sse2'; did you mean '-mno-isel'? gcc: error: unrecognized command line option '-mno-avx2'
# - phist +mpi # ghost@develop: gcc-9: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'?
# - variorum # variorum: https://github.com/spack/spack/issues/38786
+ # PYTHON PACKAGES
+ - opencv +python3
+ - py-jax
+ - py-jupyterlab
+ - py-matplotlib
+ - py-mpi4py
+ - py-notebook
+ - py-numba
+ - py-numpy
+ - py-openai
+ - py-pandas
+ - py-plotly
+ - py-pooch
+ - py-pytest
+ - py-scikit-learn
+ - py-scipy
+ - py-seaborn
+ # - py-horovod # py-torch, py-tensorflow
+ # - py-tensorflow # error
+ # - py-torch # error
+
# CUDA NOARCH
- bricks +cuda
- cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=70
- flux-core +cuda
- hpctoolkit +cuda
- papi +cuda
- - tau +mpi +cuda # tau: has issue with `spack env depfile` build
+ - tau +mpi +cuda
# --
# - legion +cuda # legion: needs NVIDIA driver
@@ -197,11 +219,12 @@ spack:
- amrex +cuda cuda_arch=70
- arborx +cuda cuda_arch=70 ^kokkos +wrapper
- caliper +cuda cuda_arch=70
- - chai ~benchmarks ~tests +cuda cuda_arch=70 ^umpire ~shared
+ - chai +cuda cuda_arch=70 ^umpire ~shared
- ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=70
- exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=70 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=70 #^raja@0.14.0
- flecsi +cuda cuda_arch=70
- ginkgo +cuda cuda_arch=70
+ - gromacs +cuda cuda_arch=70
- heffte +cuda cuda_arch=70
- hpx +cuda cuda_arch=70
- hypre +cuda cuda_arch=70
@@ -229,6 +252,7 @@ spack:
- zfp +cuda cuda_arch=70
# --
# - axom +cuda cuda_arch=70 # axom: https://github.com/spack/spack/issues/29520
+ # - cp2k +mpi +cuda cuda_arch=70 # dbcsr
# - cusz +cuda cuda_arch=70 # cusz: https://github.com/spack/spack/issues/38787
# - dealii +cuda cuda_arch=70 # fltk: https://github.com/spack/spack/issues/38791
# - lammps +cuda cuda_arch=70 # lammps: needs NVIDIA driver
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
index 8f902aa6a8..2098645d1b 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
@@ -10,237 +10,208 @@ spack:
require: '%gcc target=x86_64_v3'
providers:
blas: [openblas]
- mpi: [mpich]
variants: +mpi
- binutils:
- variants: +ld +gold +headers +libiberty ~nls
- elfutils:
- variants: +bzip2 ~nls +xz
- hdf5:
- variants: +fortran +hl +shared
- libfabric:
- variants: fabrics=sockets,tcp,udp,rxm
- libunwind:
- variants: +pic +xz
- openblas:
- variants: threads=openmp
- trilinos:
- variants: +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long
- xz:
- variants: +pic
- mesa:
- version: [21.3.8]
+ tbb:
+ require: intel-tbb
mpi:
require: mpich
mpich:
- require: '~wrapperrpath ~hwloc'
- ncurses:
- require: '@6.3 +termlib'
- tbb:
- require: intel-tbb
- boost:
- version: [1.79.0]
- variants: +atomic +chrono +container +date_time +exception +filesystem +graph
- +iostreams +locale +log +math +mpi +multithreaded +program_options +random
- +regex +serialization +shared +signals +stacktrace +system +test +thread +timer
- cxxstd=17 visibility=global
- libffi:
- require: "@3.4.4"
- vtk-m:
- require: "+examples"
- cuda:
- version: [11.8.0]
+ require: '~wrapperrpath ~hwloc %gcc target=x86_64_v3'
+ openblas:
+ variants: threads=openmp
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
- require: "@5.11 ~qt+osmesa"
+ require: "@5.11 +examples ~qt ^[virtuals=gl] osmesa %gcc target=x86_64_v3"
- # ROCm 5.4.3
+ # ROCm
comgr:
buildable: false
externals:
- - spec: comgr@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: comgr@6.2.1
+ prefix: /opt/rocm-6.2.1/
hip-rocclr:
buildable: false
externals:
- - spec: hip-rocclr@5.4.3
- prefix: /opt/rocm-5.4.3/hip
+ - spec: hip-rocclr@6.2.1
+ prefix: /opt/rocm-6.2.1/hip
hipblas:
buildable: false
externals:
- - spec: hipblas@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hipblas@6.2.1
+ prefix: /opt/rocm-6.2.1/
hipcub:
buildable: false
externals:
- - spec: hipcub@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hipcub@6.2.1
+ prefix: /opt/rocm-6.2.1/
hipfft:
buildable: false
externals:
- - spec: hipfft@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hipfft@6.2.1
+ prefix: /opt/rocm-6.2.1/
hipsparse:
buildable: false
externals:
- - spec: hipsparse@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hipsparse@6.2.1
+ prefix: /opt/rocm-6.2.1/
miopen-hip:
buildable: false
externals:
- - spec: hip-rocclr@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: miopen-hip@6.2.1
+ prefix: /opt/rocm-6.2.1/
miopengemm:
buildable: false
externals:
- - spec: miopengemm@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: miopengemm@6.2.1
+ prefix: /opt/rocm-6.2.1/
rccl:
buildable: false
externals:
- - spec: rccl@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rccl@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocblas:
buildable: false
externals:
- - spec: rocblas@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocblas@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocfft:
buildable: false
externals:
- - spec: rocfft@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocfft@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-clang-ocl:
buildable: false
externals:
- - spec: rocm-clang-ocl@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-clang-ocl@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-cmake:
buildable: false
externals:
- - spec: rocm-cmake@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-cmake@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-dbgapi:
buildable: false
externals:
- - spec: rocm-dbgapi@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-dbgapi@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-debug-agent:
buildable: false
externals:
- - spec: rocm-debug-agent@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-debug-agent@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-device-libs:
buildable: false
externals:
- - spec: rocm-device-libs@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-device-libs@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-gdb:
buildable: false
externals:
- - spec: rocm-gdb@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-gdb@6.2.1
+ prefix: /opt/rocm-6.2.1/
rocm-opencl:
buildable: false
externals:
- - spec: rocm-opencl@5.4.3
- prefix: /opt/rocm-5.4.3/opencl
+ - spec: rocm-opencl@6.2.1
+ prefix: /opt/rocm-6.2.1/opencl
rocm-smi-lib:
buildable: false
externals:
- - spec: rocm-smi-lib@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: rocm-smi-lib@6.2.1
+ prefix: /opt/rocm-6.2.1/
hip:
buildable: false
externals:
- - spec: hip@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: hip@6.2.1
+ prefix: /opt/rocm-6.2.1
extra_attributes:
compilers:
- c: /opt/rocm-5.4.3/llvm/bin/clang++
- c++: /opt/rocm-5.4.3/llvm/bin/clang++
- hip: /opt/rocm-5.4.3/hip/bin/hipcc
+ c: /opt/rocm-6.2.1/llvm/bin/clang++
+ c++: /opt/rocm-6.2.1/llvm/bin/clang++
+ hip: /opt/rocm-6.2.1/hip/bin/hipcc
hipify-clang:
buildable: false
externals:
- - spec: hipify-clang@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: hipify-clang@6.2.1
+ prefix: /opt/rocm-6.2.1
llvm-amdgpu:
buildable: false
externals:
- - spec: llvm-amdgpu@5.4.3
- prefix: /opt/rocm-5.4.3/llvm
+ - spec: llvm-amdgpu@6.2.1
+ prefix: /opt/rocm-6.2.1/llvm
extra_attributes:
compilers:
- c: /opt/rocm-5.4.3/llvm/bin/clang++
- cxx: /opt/rocm-5.4.3/llvm/bin/clang++
+ c: /opt/rocm-6.2.1/llvm/bin/clang++
+ cxx: /opt/rocm-6.2.1/llvm/bin/clang++
hsakmt-roct:
buildable: false
externals:
- - spec: hsakmt-roct@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hsakmt-roct@6.2.1
+ prefix: /opt/rocm-6.2.1/
hsa-rocr-dev:
buildable: false
externals:
- - spec: hsa-rocr-dev@5.4.3
- prefix: /opt/rocm-5.4.3/
+ - spec: hsa-rocr-dev@6.2.1
+ prefix: /opt/rocm-6.2.1/
extra_atributes:
compilers:
- c: /opt/rocm-5.4.3/llvm/bin/clang++
- cxx: /opt/rocm-5.4.3/llvm/bin/clang++
+ c: /opt/rocm-6.2.1/llvm/bin/clang++
+ cxx: /opt/rocm-6.2.1/llvm/bin/clang++
roctracer-dev-api:
buildable: false
externals:
- - spec: roctracer-dev-api@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: roctracer-dev-api@6.2.1
+ prefix: /opt/rocm-6.2.1
roctracer-dev:
buildable: false
externals:
- spec: roctracer-dev@4.5.3
- prefix: /opt/rocm-5.4.3
+ prefix: /opt/rocm-6.2.1
rocprim:
buildable: false
externals:
- - spec: rocprim@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocprim@6.2.1
+ prefix: /opt/rocm-6.2.1
rocrand:
buildable: false
externals:
- - spec: rocrand@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocrand@6.2.1
+ prefix: /opt/rocm-6.2.1
hipsolver:
buildable: false
externals:
- - spec: hipsolver@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: hipsolver@6.2.1
+ prefix: /opt/rocm-6.2.1
rocsolver:
buildable: false
externals:
- - spec: rocsolver@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocsolver@6.2.1
+ prefix: /opt/rocm-6.2.1
rocsparse:
buildable: false
externals:
- - spec: rocsparse@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocsparse@6.2.1
+ prefix: /opt/rocm-6.2.1
rocthrust:
buildable: false
externals:
- - spec: rocthrust@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocthrust@6.2.1
+ prefix: /opt/rocm-6.2.1
rocprofiler-dev:
buildable: false
externals:
- - spec: rocprofiler-dev@5.4.3
- prefix: /opt/rocm-5.4.3
+ - spec: rocprofiler-dev@6.2.1
+ prefix: /opt/rocm-6.2.1
+ rocm-core:
+ buildable: false
+ externals:
+ - spec: rocm-core@6.2.1
+ prefix: /opt/rocm-6.2.1
specs:
# ROCM NOARCH
- hpctoolkit +rocm
- - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build
+ - tau +mpi +rocm +syscall
# ROCM 908
- adios2 +kokkos +rocm amdgpu_target=gfx908
@@ -248,9 +219,9 @@ spack:
- arborx +rocm amdgpu_target=gfx908
- cabana +rocm amdgpu_target=gfx908
- caliper +rocm amdgpu_target=gfx908
- - chai ~benchmarks +rocm amdgpu_target=gfx908
+ - chai +rocm amdgpu_target=gfx908
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
- - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908
+ - fftx +rocm amdgpu_target=gfx908
- gasnet +rocm amdgpu_target=gfx908
- ginkgo +rocm amdgpu_target=gfx908
- heffte +rocm amdgpu_target=gfx908
@@ -260,12 +231,8 @@ spack:
- legion +rocm amdgpu_target=gfx908
- magma ~cuda +rocm amdgpu_target=gfx908
- mfem +rocm amdgpu_target=gfx908
- - petsc +rocm amdgpu_target=gfx908
- raja ~openmp +rocm amdgpu_target=gfx908
- - slate +rocm amdgpu_target=gfx908
- - slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908
- strumpack ~slate +rocm amdgpu_target=gfx908
- - sundials +rocm amdgpu_target=gfx908
- superlu-dist +rocm amdgpu_target=gfx908
- tasmanian ~openmp +rocm amdgpu_target=gfx908
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx908
@@ -277,11 +244,18 @@ spack:
# - hdf5-vol-cache
# - hdf5-vol-log
# - libcatalyst
- - paraview +rocm amdgpu_target=gfx908
+ # - paraview +rocm amdgpu_target=gfx908 # mesa: https://github.com/spack/spack/issues/44745
# - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268
# --
+ # - chapel +rocm amdgpu_target=gfx908 # chapel: need chapel >= 2.2 to support ROCm >5.4
+ # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
+ # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # raja: https://github.com/spack/spack/issues/44593
# - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807
# - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898
+ # - petsc +rocm amdgpu_target=gfx908 # petsc: https://github.com/spack/spack/issues/44600
+ # - slate +rocm amdgpu_target=gfx908 # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
+ # - slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908 # petsc: https://github.com/spack/spack/issues/44600
+ # - sundials +rocm amdgpu_target=gfx908 # sundials: https://github.com/spack/spack/issues/44601
# ROCM 90a
- adios2 +kokkos +rocm amdgpu_target=gfx90a
@@ -289,9 +263,9 @@ spack:
- arborx +rocm amdgpu_target=gfx90a
- cabana +rocm amdgpu_target=gfx90a
- caliper +rocm amdgpu_target=gfx90a
- - chai ~benchmarks +rocm amdgpu_target=gfx90a
+ - chai +rocm amdgpu_target=gfx90a
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
- - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a
+ - fftx +rocm amdgpu_target=gfx90a
- gasnet +rocm amdgpu_target=gfx90a
- ginkgo +rocm amdgpu_target=gfx90a
- heffte +rocm amdgpu_target=gfx90a
@@ -301,12 +275,8 @@ spack:
- legion +rocm amdgpu_target=gfx90a
- magma ~cuda +rocm amdgpu_target=gfx90a
- mfem +rocm amdgpu_target=gfx90a
- - petsc +rocm amdgpu_target=gfx90a
- raja ~openmp +rocm amdgpu_target=gfx90a
- - slate +rocm amdgpu_target=gfx90a
- - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a
- strumpack ~slate +rocm amdgpu_target=gfx90a
- - sundials +rocm amdgpu_target=gfx90a
- superlu-dist +rocm amdgpu_target=gfx90a
- tasmanian ~openmp +rocm amdgpu_target=gfx90a
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx90a
@@ -318,16 +288,23 @@ spack:
# - hdf5-vol-cache
# - hdf5-vol-log
# - libcatalyst
- - paraview +rocm amdgpu_target=gfx90a
+ # - paraview +rocm amdgpu_target=gfx90a # mesa: https://github.com/spack/spack/issues/44745
# - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268
# --
+ # - chapel +rocm amdgpu_target=gfx9a # chapel: need chapel >= 2.2 to support ROCm >5.4
+ # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
+ # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # raja: https://github.com/spack/spack/issues/44593
# - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807
# - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898
+ # - petsc +rocm amdgpu_target=gfx90a # petsc: https://github.com/spack/spack/issues/44600
+ # - slate +rocm amdgpu_target=gfx90a # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
+ # - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a # petsc: https://github.com/spack/spack/issues/44600
+ # - sundials +rocm amdgpu_target=gfx90a # sundials: https://github.com/spack/spack/issues/44601
ci:
pipeline-gen:
- build-job:
- image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01"
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4-rocm6.2.1:2024.10.08
cdash:
build-group: E4S ROCm External
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
index 70fff7c477..29d5f63a16 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
@@ -14,8 +14,6 @@ spack:
variants: +mpi
binutils:
variants: +ld +gold +headers +libiberty ~nls
- elfutils:
- variants: +bzip2 ~nls +xz
hdf5:
variants: +fortran +hl +shared
libfabric:
@@ -29,35 +27,19 @@ spack:
+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 +superlu-dist gotype=long_long
- xz:
- variants: +pic
- mesa:
- version: [21.3.8]
mpi:
require: mpich
mpich:
- require: '~wrapperrpath ~hwloc'
- ncurses:
- require: '@6.3 +termlib'
+ require: '~wrapperrpath ~hwloc target=x86_64_v3'
tbb:
require: intel-tbb
- boost:
- version: [1.79.0]
- variants: +atomic +chrono +container +date_time +exception +filesystem +graph
- +iostreams +locale +log +math +mpi +multithreaded +program_options +random
- +regex +serialization +shared +signals +stacktrace +system +test +thread +timer
- cxxstd=17 visibility=global
- libffi:
- require: "@3.4.4"
vtk-m:
- require: "+examples"
+ require: "+examples target=x86_64_v3"
visit:
- require: "~gui"
- cuda:
- version: [11.8.0]
+ require: "~gui target=x86_64_v3"
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
- require: "@5.11 ~qt+osmesa"
+ require: "@5.11 +examples ~qt ^[virtuals=gl] osmesa target=x86_64_v3"
specs:
# CPU
@@ -74,27 +56,33 @@ spack:
- butterflypack
- cabana
- caliper
- - chai ~benchmarks ~tests
+ - chai
+ - chapel ~rocm ~cuda
- charliecloud
- conduit
+ - cp2k +mpi
- datatransferkit
- - dealii
+ - dealii ~vtk # https://github.com/spack/spack/pull/45554#issuecomment-2457255720
- drishti
- dxt-explorer
- dyninst
- - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
+ - e4s-cl
+ - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
- exaworks
+ - fftx
- flecsi
- flit
- flux-core
- fortrilinos
+ - fpm
- gasnet
+ - geopm-runtime
- ginkgo
- globalarrays
- gmp
- gotcha
- gptune ~mpispawn
- - gromacs +cp2k ^cp2k build_system=cmake
+ - gromacs +cp2k ^cp2k +dlaf build_system=cmake
- h5bench
- hdf5-vol-async
- hdf5-vol-cache
@@ -106,7 +94,8 @@ spack:
- julia ^llvm ~clang ~gold ~polly targets=amdgpu,bpf,nvptx,webassembly
- kokkos +openmp
- kokkos-kernels +openmp
- - lammps
+ - laghos
+ - lammps +amoeba +asphere +bocs +body +bpm +brownian +cg-dna +cg-spica +class2 +colloid +colvars +compress +coreshell +dielectric +diffraction +dipole +dpd-basic +dpd-meso +dpd-react +dpd-smooth +drude +eff +electrode +extra-compute +extra-dump +extra-fix +extra-molecule +extra-pair +fep +granular +interlayer +kspace +lepton +machdyn +manybody +mc +meam +mesont +misc +ml-iap +ml-pod +ml-snap +mofff +molecule +openmp-package +opt +orient +peri +phonon +plugin +poems +qeq +reaction +reaxff +replica +rigid +shock +sph +spin +srd +tally +uef +voronoi +yaff
- lbann
- legion
- libnrm
@@ -122,9 +111,12 @@ spack:
- mpifileutils ~xattr
- nccmp
- nco
+ - nekbone +mpi
+ - netcdf-fortran
- netlib-scalapack
- nrm
- nvhpc
+ - nwchem
- omega-h
- openfoam
- openmpi
@@ -140,11 +132,11 @@ spack:
- precice
- pruners-ninja
- pumi
+ - py-amrex
- py-h5py
- py-jupyterhub
- py-libensemble
- py-petsc4py
- - py-warpx
- qthreads scheduler=distrib
- quantum-espresso
- raja
@@ -168,6 +160,8 @@ spack:
- upcxx
- variorum
- wannier90
+ - wps
+ - wrf
- xyce +mpi +shared +pymi +pymi_static_tpls
# INCLUDED IN ECP DAV CPU
- adios2
@@ -183,12 +177,35 @@ spack:
- sz
- unifyfs
- veloc
- # - visit # silo: https://github.com/spack/spack/issues/39538
+ - visit # silo: https://github.com/spack/spack/issues/39538
- vtk-m
+ - warpx +python
- zfp
# --
- # - archer # submerged into llvm +libomp_tsan
- # - geopm # geopm: https://github.com/spack/spack/issues/38795
+ - glvis # glvis: https://github.com/spack/spack/issues/42839
+ # - nek5000 +mpi +visit # nek5000: Error: AttributeError: 'str' object has no attribute 'propagate': 'VISIT_INSTALL="' + spec["visit"].prefix.bin + '"',
+
+ # PYTHON PACKAGES
+ - opencv +python3
+ - py-horovod
+ - py-jax
+ - py-jupyterlab
+ - py-matplotlib
+ - py-mpi4py
+ - py-notebook
+ - py-numba
+ - py-numpy
+ - py-openai
+ - py-pandas
+ - py-plotly
+ - py-pooch
+ - py-pytest
+ - py-scikit-learn
+ - py-scipy
+ - py-seaborn
+ - py-tensorflow
+ - py-torch
+ - py-deephyper
# CUDA NOARCH
- bricks +cuda
@@ -202,15 +219,18 @@ spack:
# CUDA 80
- amrex +cuda cuda_arch=80
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
+ - axom +cuda cuda_arch=80
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
- caliper +cuda cuda_arch=80
- - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
+ - chai +cuda cuda_arch=80 ^umpire ~shared
+ - chapel +cuda cuda_arch=80
- cusz +cuda cuda_arch=80
- - dealii +cuda cuda_arch=80
- ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error
- exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=80 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=80 #^raja@0.14.0
+ - fftx +cuda cuda_arch=80
- flecsi +cuda cuda_arch=80
- ginkgo +cuda cuda_arch=80
+ - gromacs +cuda cuda_arch=80
- heffte +cuda cuda_arch=80
- hpx +cuda cuda_arch=80
- hypre +cuda cuda_arch=80
@@ -219,7 +239,6 @@ spack:
- libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=80 ^cusz +cuda cuda_arch=80
- magma +cuda cuda_arch=80
- mfem +cuda cuda_arch=80
- - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=80
- omega-h +cuda cuda_arch=80
- parsec +cuda cuda_arch=80
- petsc +cuda cuda_arch=80
@@ -234,43 +253,47 @@ spack:
- trilinos +cuda cuda_arch=80
- umpire ~shared +cuda cuda_arch=80
# INCLUDED IN ECP DAV CUDA
- # - adios2 +cuda cuda_arch=80
- # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045
- # - paraview +cuda cuda_arch=80
- # - vtk-m +cuda cuda_arch=80
- # - zfp +cuda cuda_arch=80
+ - adios2 +cuda cuda_arch=80
+ # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045
+ - paraview +cuda cuda_arch=80
+ - vtk-m +cuda cuda_arch=80
+ - zfp +cuda cuda_arch=80
# --
- # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver
- # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver
- # - axom +cuda cuda_arch=80 # axom: https://github.com/spack/spack/issues/29520
- # - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788
+ # - dealii +cuda cuda_arch=80 # dealii: conflicts with '+cuda ^cuda@12:'
+ # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver
+ # - lbann +cuda cuda_arch=80 # lbann: layers/transform/cereal_registration/../permute/cutensor_support.hpp:95:18: error: 'cutensorInit' was not declared in this scope; did you mean 'cutensorPlan_t'?
+ # - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=80 # mgard: https://github.com/spack/spack/issues/44833
+ # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver
# CUDA 90
- amrex +cuda cuda_arch=90
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
+ - axom +cuda cuda_arch=90
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
- caliper +cuda cuda_arch=90
- - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
- - cusz +cuda cuda_arch=90
+ - chai +cuda cuda_arch=90 ^umpire ~shared
+ - chapel +cuda cuda_arch=90
+ - fftx +cuda cuda_arch=90
- flecsi +cuda cuda_arch=90
- ginkgo +cuda cuda_arch=90
+ - gromacs +cuda cuda_arch=90
- heffte +cuda cuda_arch=90
- hpx +cuda cuda_arch=90
+ - hypre +cuda cuda_arch=90
- kokkos +wrapper +cuda cuda_arch=90
- kokkos-kernels +cuda cuda_arch=90 ^kokkos +wrapper +cuda cuda_arch=90
- - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=90 ^cusz +cuda cuda_arch=90
- magma +cuda cuda_arch=90
- mfem +cuda cuda_arch=90
- mgard +serial +openmp +timing +unstructured +cuda cuda_arch=90
- parsec +cuda cuda_arch=90
- petsc +cuda cuda_arch=90
- - py-torch +cuda cuda_arch=90
- raja +cuda cuda_arch=90
- slate +cuda cuda_arch=90
- slepc +cuda cuda_arch=90
- strumpack ~slate +cuda cuda_arch=90
- sundials +cuda cuda_arch=90
- superlu-dist +cuda cuda_arch=90
+ - tasmanian +cuda cuda_arch=90
- trilinos +cuda cuda_arch=90
- umpire ~shared +cuda cuda_arch=90
# INCLUDED IN ECP DAV CUDA
@@ -280,82 +303,34 @@ spack:
- vtk-m +cuda cuda_arch=90
- zfp +cuda cuda_arch=90
# --
- # - axom +cuda cuda_arch=90 # axom: https://github.com/spack/spack/issues/29520
- # - dealii +cuda cuda_arch=90 # dealii: https://github.com/spack/spack/issues/39532
- # - ecp-data-vis-sdk ~rocm +adios2 +ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # paraview: incompatible cuda_arch; vtk-m: CMake Error at CMake/VTKmWrappers.cmake:413 (message): vtkm_cont needs to be built STATIC as CUDA doesn't support virtual methods across dynamic library boundaries. You need to set the CMake opt ion BUILD_SHARED_LIBS to `OFF` or (better) turn VTKm_NO_DEPRECATED_VIRTUAL to `ON`.
- # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12:
+ # - cusz +cuda cuda_arch=90 # cusz: cuda-12.5.0-ndrzb7undvancjdj3fi6bhthdxdo7gr5/targets/x86_64-linux/include/cub/util_device.cuh:202:50: error: 'blockDim' was not declared in this scope
+ # - dealii +cuda cuda_arch=90 # dealii: conflicts with '+cuda ^cuda@12:'; dealii: https://github.com/spack/spack/issues/39532
+ # - ecp-data-vis-sdk ~rocm +adios2 +ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # +ascent: # ascent: https://github.com/spack/spack/issues/38045; +paraview: VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ExecutionPolicy.h(121): error: namespace "thrust" has no member "sort"
# - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver
- # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann"
+ # - lbann +cuda cuda_arch=90 # aluminum: /usr/include/c++/11/bits/basic_string.h:1260: multiple definition of `cub::CUB_200400___CUDA_ARCH_LIST___NS::Debug(cudaError, char const*, int)';
+ # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=90 ^cusz +cuda cuda_arch=90 # cusz: cuda-12.5.0-e3rny44pq5z5x3nnoljynbsq5on5fnl3/targets/x86_64-linux/include/cub/util_device.cuh:202:50: error: 'blockDim' was not declared in this scope
# - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535
- # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12
+ # - py-torch +cuda cuda_arch=90 # py-torch: FAILED: caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/transformers/cuda/flash_attn/kernels/flash_bwd_hdim256_bf16_sm80.cu.o
# - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver
# ROCM NOARCH
- hpctoolkit +rocm
- - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build
-
- # ROCM 908
- - adios2 +kokkos +rocm amdgpu_target=gfx908
- - amrex +rocm amdgpu_target=gfx908
- - arborx +rocm amdgpu_target=gfx908
- - cabana +rocm amdgpu_target=gfx908
- - caliper +rocm amdgpu_target=gfx908
- - chai ~benchmarks +rocm amdgpu_target=gfx908
- - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
- - gasnet +rocm amdgpu_target=gfx908
- - ginkgo +rocm amdgpu_target=gfx908
- - heffte +rocm amdgpu_target=gfx908
- - hpx +rocm amdgpu_target=gfx908
- - hypre +rocm amdgpu_target=gfx908
- - kokkos +rocm amdgpu_target=gfx908
- - legion +rocm amdgpu_target=gfx908
- - magma ~cuda +rocm amdgpu_target=gfx908
- - mfem +rocm amdgpu_target=gfx908
- - petsc +rocm amdgpu_target=gfx908
- - raja ~openmp +rocm amdgpu_target=gfx908
- - slate +rocm amdgpu_target=gfx908
- - slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908
- - strumpack ~slate +rocm amdgpu_target=gfx908
- - sundials +rocm amdgpu_target=gfx908
- - superlu-dist +rocm amdgpu_target=gfx908
- - tasmanian ~openmp +rocm amdgpu_target=gfx908
- - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +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 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx908
- - umpire +rocm amdgpu_target=gfx908
- - upcxx +rocm amdgpu_target=gfx908
- # INCLUDED IN ECP DAV ROCM
- # - hdf5
- # - hdf5-vol-async
- # - hdf5-vol-cache
- # - hdf5-vol-log
- # - libcatalyst
- - paraview +rocm amdgpu_target=gfx908
- # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268
- # --
- # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # hiop: CMake Error at cmake/FindHiopHipLibraries.cmake:23 (find_package)
- # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807
- # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898
+ - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build
# ROCM 90a
- - adios2 +kokkos +rocm amdgpu_target=gfx90a
- amrex +rocm amdgpu_target=gfx90a
- - arborx +rocm amdgpu_target=gfx90a
- - cabana +rocm amdgpu_target=gfx90a
- caliper +rocm amdgpu_target=gfx90a
- - chai ~benchmarks +rocm amdgpu_target=gfx90a
+ - chai +rocm amdgpu_target=gfx90a
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
- gasnet +rocm amdgpu_target=gfx90a
- ginkgo +rocm amdgpu_target=gfx90a
- heffte +rocm amdgpu_target=gfx90a
- hpx +rocm amdgpu_target=gfx90a
- hypre +rocm amdgpu_target=gfx90a
- - kokkos +rocm amdgpu_target=gfx90a
- - legion +rocm amdgpu_target=gfx90a
- magma ~cuda +rocm amdgpu_target=gfx90a
- mfem +rocm amdgpu_target=gfx90a
- - petsc +rocm amdgpu_target=gfx90a
- raja ~openmp +rocm amdgpu_target=gfx90a
- slate +rocm amdgpu_target=gfx90a
- - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a
- strumpack ~slate +rocm amdgpu_target=gfx90a
- sundials +rocm amdgpu_target=gfx90a
- superlu-dist +rocm amdgpu_target=gfx90a
@@ -372,14 +347,28 @@ spack:
- paraview +rocm amdgpu_target=gfx90a
# - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268
# --
+ # - adios2 +kokkos +rocm amdgpu_target=gfx90a # +kokkos: https://github.com/spack/spack/issues/44832
+ # - arborx +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832
+ # - cabana +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832
+ # - chapel +rocm amdgpu_target=gfx90a # chapel: need chapel >= 2.2 to support ROCm >5.4
# - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # hiop: CMake Error at cmake/FindHiopHipLibraries.cmake:23 (find_package)
+ # - fftx +rocm amdgpu_target=gfx90a # fftx: https://github.com/spack/spack/issues/47034
+ # - kokkos +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832
# - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807
+ # - legion +rocm amdgpu_target=gfx90a # kokkos: https://github.com/spack/spack/issues/44832
# - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898
+ # - petsc +rocm amdgpu_target=gfx90a # petsc: https://github.com/spack/spack/issues/44600
+ # - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a # petsc: https://github.com/spack/spack/issues/44600
+
+ # - cp2k +mpi +cuda cuda_arch=80 # cp2k: spack-stage-libxsmm-1.17-r2zqxa24bhufaj5i3ili5se25cw7tioo/spack-src/./src/libxsmm_gemm.c:238: undefined reference to `sgemv_'
+ # - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
+ # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: "-L{}".format(spec["rocm"].libs.directories[0]),
+ # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: "-L{}".format(spec["rocm"].libs.directories[0]),
ci:
pipeline-gen:
- build-job:
- image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01"
+ image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01
cdash:
build-group: E4S
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml
index 263d8e29b3..986ffa2f46 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml
@@ -16,7 +16,7 @@ spack:
boost:
variants: +python +filesystem +iostreams +system
elfutils:
- variants: +bzip2 ~nls +xz
+ variants: ~nls
hdf5:
variants: +fortran +hl +shared
libfabric:
@@ -31,7 +31,7 @@ spack:
variants: threads=openmp
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
- require: "@5.11 ~qt+osmesa"
+ require: "@5.11 ~qt ^[virtuals=gl] osmesa"
trilinos:
require: +amesos +amesos2 +anasazi +aztec +boost +epetra +epetraext
+ifpack +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml
index 0526a4a12f..d3eb74a366 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml
@@ -3,8 +3,11 @@ spack:
packages:
all:
- require: target=aarch64
- variants: +mps~cuda~rocm
+ require:
+ - target=aarch64
+ - +mps
+ - ~cuda
+ - ~rocm
mpi:
require: openmpi
openblas:
@@ -31,9 +34,6 @@ spack:
- py-keras-preprocessing
- py-keras2onnx
- # MXNet not supported on darwin aarch64 yet
- # - mxnet
-
# PyTorch
- py-botorch
- py-efficientnet-pytorch
@@ -81,8 +81,6 @@ spack:
# XGBoost
- py-xgboost
- # - r-xgboost
- - xgboost
ci:
pipeline-gen:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cpu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cpu/spack.yaml
new file mode 100644
index 0000000000..23ed6aa665
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cpu/spack.yaml
@@ -0,0 +1,85 @@
+spack:
+ view: false
+ packages:
+ all:
+ require:
+ - target=aarch64
+ - ~cuda
+ - ~rocm
+ mpi:
+ require: openmpi
+
+ specs:
+ # Horovod
+ - py-horovod
+
+ # Hugging Face
+ - py-transformers
+
+ # JAX
+ - py-jax
+ - py-jaxlib
+
+ # Keras
+ - py-keras backend=tensorflow
+ - py-keras backend=jax
+ - py-keras backend=torch
+ - py-keras-applications
+ - py-keras-preprocessing
+ - py-keras2onnx
+
+ # PyTorch
+ - py-botorch
+ - py-efficientnet-pytorch
+ - py-gpytorch
+ - py-kornia
+ - py-lightning
+ - py-pytorch-gradual-warmup-lr
+ - py-pytorch-lightning
+ - py-segmentation-models-pytorch
+ - py-timm
+ - py-torch
+ - py-torch-cluster
+ - py-torch-geometric
+ - py-torch-nvidia-apex
+ - py-torch-scatter
+ - py-torch-sparse
+ - py-torch-spline-conv
+ - py-torchaudio
+ - py-torchdata
+ - py-torchfile
+ - py-torchgeo
+ - py-torchmetrics
+ - py-torchtext
+ - py-torchvision
+ - py-vector-quantize-pytorch
+
+ # scikit-learn
+ - py-scikit-learn
+ - py-scikit-learn-extra
+
+ # TensorBoard
+ - py-tensorboard
+ - py-tensorboard-data-server
+ - py-tensorboard-plugin-wit
+ - py-tensorboardx
+
+ # TensorFlow
+ - py-tensorflow
+ - py-tensorflow-datasets
+ - py-tensorflow-hub
+ - py-tensorflow-metadata
+ - py-tensorflow-probability
+
+ # XGBoost
+ - py-xgboost
+
+ ci:
+ pipeline-gen:
+ - build-job:
+ image:
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+ entrypoint: ['']
+
+ cdash:
+ build-group: Machine Learning
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cuda/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cuda/spack.yaml
new file mode 100644
index 0000000000..47f4eda0f1
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-aarch64-cuda/spack.yaml
@@ -0,0 +1,91 @@
+spack:
+ view: false
+ packages:
+ all:
+ require:
+ - target=aarch64
+ - ~rocm
+ - +cuda
+ - cuda_arch=80
+ llvm:
+ # https://github.com/spack/spack/issues/27999
+ require: ~cuda
+ mpi:
+ require: openmpi
+
+ specs:
+ # Horovod
+ - py-horovod
+
+ # Hugging Face
+ - py-transformers
+
+ # JAX
+ - py-jax
+ - py-jaxlib
+
+ # Keras
+ - py-keras backend=tensorflow
+ - py-keras backend=jax
+ - py-keras backend=torch
+ - py-keras-applications
+ - py-keras-preprocessing
+ - py-keras2onnx
+
+ # PyTorch
+ - py-botorch
+ - py-efficientnet-pytorch
+ - py-gpytorch
+ - py-kornia
+ - py-lightning
+ - py-pytorch-gradual-warmup-lr
+ - py-pytorch-lightning
+ - py-segmentation-models-pytorch
+ - py-timm
+ - py-torch
+ - py-torch-cluster
+ - py-torch-geometric
+ - py-torch-nvidia-apex
+ - py-torch-scatter
+ - py-torch-sparse
+ - py-torch-spline-conv
+ - py-torchaudio
+ - py-torchdata
+ - py-torchfile
+ - py-torchgeo
+ - py-torchmetrics
+ # torchtext requires older pytorch, which requires older cuda, which doesn't support newer GCC
+ # - py-torchtext
+ - py-torchvision
+ - py-vector-quantize-pytorch
+
+ # scikit-learn
+ - py-scikit-learn
+ - py-scikit-learn-extra
+
+ # TensorBoard
+ - py-tensorboard
+ - py-tensorboard-data-server
+ - py-tensorboard-plugin-wit
+ - py-tensorboardx
+
+ # TensorFlow
+ - py-tensorflow
+ - py-tensorflow-datasets
+ - py-tensorflow-hub
+ - py-tensorflow-metadata
+ - py-tensorflow-probability
+
+ # XGBoost
+ # xgboost requires older cuda, which doesn't support newer GCC
+ # - py-xgboost
+
+ ci:
+ pipeline-gen:
+ - build-job:
+ image:
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
+ entrypoint: ['']
+
+ cdash:
+ build-group: Machine Learning
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml
index fdce7f9bb4..31ca52dd39 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml
@@ -2,8 +2,10 @@ spack:
view: false
packages:
all:
- require: target=x86_64_v3
- variants: ~cuda~rocm
+ require:
+ - target=x86_64_v3
+ - ~cuda
+ - ~rocm
mpi:
require: openmpi
@@ -19,16 +21,13 @@ spack:
- py-jaxlib
# Keras
- # - py-keras backend=tensorflow
+ - py-keras backend=tensorflow
- py-keras backend=jax
- py-keras backend=torch
- py-keras-applications
- py-keras-preprocessing
- py-keras2onnx
- # MXNet
- - mxnet
-
# PyTorch
- py-botorch
- py-efficientnet-pytorch
@@ -68,21 +67,18 @@ spack:
# TensorFlow
- py-tensorflow
- py-tensorflow-datasets
- - py-tensorflow-estimator
- py-tensorflow-hub
- py-tensorflow-metadata
- py-tensorflow-probability
# XGBoost
- py-xgboost
- # - r-xgboost
- - xgboost
ci:
pipeline-gen:
- build-job:
image:
- name: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
entrypoint: ['']
cdash:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml
index 1a64d83811..05b570f8f9 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml
@@ -2,8 +2,11 @@ spack:
view: false
packages:
all:
- require: target=x86_64_v3
- variants: ~rocm+cuda cuda_arch=80
+ require:
+ - target=x86_64_v3
+ - ~rocm
+ - +cuda
+ - cuda_arch=80
llvm:
# https://github.com/spack/spack/issues/27999
require: ~cuda
@@ -22,16 +25,13 @@ spack:
- py-jaxlib
# Keras
- # - py-keras backend=tensorflow
+ - py-keras backend=tensorflow
- py-keras backend=jax
- py-keras backend=torch
- py-keras-applications
- py-keras-preprocessing
- py-keras2onnx
- # MXNet
- - mxnet
-
# PyTorch
- py-botorch
- py-efficientnet-pytorch
@@ -54,7 +54,8 @@ spack:
- py-torchfile
- py-torchgeo
- py-torchmetrics
- - py-torchtext
+ # torchtext requires older pytorch, which requires older cuda, which doesn't support newer GCC
+ # - py-torchtext
- py-torchvision
- py-vector-quantize-pytorch
@@ -71,21 +72,19 @@ spack:
# TensorFlow
- py-tensorflow
- py-tensorflow-datasets
- - py-tensorflow-estimator
- py-tensorflow-hub
- py-tensorflow-metadata
- py-tensorflow-probability
# XGBoost
- - py-xgboost
- # - r-xgboost
- - xgboost
+ # xgboost requires older cuda, which doesn't support newer GCC
+ # - py-xgboost
ci:
pipeline-gen:
- build-job:
image:
- name: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
entrypoint: ['']
cdash:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml
index 5633d9846a..4b66256255 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml
@@ -2,40 +2,38 @@ spack:
view: false
packages:
all:
- require: target=x86_64_v3
- variants: ~cuda+rocm amdgpu_target=gfx90a
+ require:
+ - target=x86_64_v3
+ - ~cuda
+ - +rocm
+ - amdgpu_target=gfx90a
gl:
require: "osmesa"
- py-torch:
- # Does not yet support Spack-installed ROCm
- require: ~rocm
mpi:
require: openmpi
specs:
# Horovod
- - py-horovod
+ # - py-horovod
# Hugging Face
- py-transformers
# JAX
- - py-jax
- - py-jaxlib
+ # Does not yet support Spack-installed ROCm
+ # - py-jax
+ # - py-jaxlib
# Keras
- # - py-keras backend=tensorflow
- - py-keras backend=jax
+ - py-keras backend=tensorflow
+ # - py-keras backend=jax
# - py-keras backend=torch
- py-keras-applications
- py-keras-preprocessing
- py-keras2onnx
- # MXNet
- - mxnet
-
# PyTorch
- # Does not yet support Spack-install ROCm
+ # Does not yet support Spack-installed ROCm
# - py-botorch
# - py-efficientnet-pytorch
# - py-gpytorch
@@ -74,21 +72,19 @@ spack:
# TensorFlow
- py-tensorflow
- py-tensorflow-datasets
- - py-tensorflow-estimator
- py-tensorflow-hub
- py-tensorflow-metadata
- py-tensorflow-probability
# XGBoost
- - py-xgboost
- # - r-xgboost
- - xgboost
+ # Does not yet support Spack-installed ROCm
+ # - py-xgboost
ci:
pipeline-gen:
- build-job:
image:
- name: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:v2023-07-01
+ name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2
entrypoint: ['']
cdash:
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml
index ca8e1a9905..3aea6fc48a 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml
@@ -17,12 +17,11 @@ spack:
- axom
- blt
- caliper
- #- care ## ~benchmarks ~examples ~tests
- #- chai ## ~benchmarks ~examples ~tests
+ - care # ~benchmarks ~examples ~tests
+ - chai # ~examples
- conduit # ^hdf5+shared
- flux-core
#- flux-sched
- #- glvis # ^mesa-glu@9.0.0 ^mesa18~llvm # same issue w/chai
- hypre
- lbann
- lvarray ~tests # per Spack issue #23192 # ~examples
@@ -32,6 +31,7 @@ spack:
- py-merlin
- py-shroud
- raja # ~examples # ~tests
+ - raja-perf
- samrai
- scr
- sundials
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml
index c320442cbe..9917841db5 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml
@@ -23,6 +23,8 @@ spack:
- lmod@8.7.18
- environment-modules
- macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran
+ - julia@1.9 ^llvm ~clang ~gold ~lldb ~lua ~polly compiler-rt=none libcxx=none libunwind=none targets=x86 ^openblas threads=openmp
+ - vim
- ['%gcc@11']
- gcc_old_packages:
- zlib-ng%gcc@10
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml
new file mode 100644
index 0000000000..1d2546b698
--- /dev/null
+++ b/share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml
@@ -0,0 +1,12 @@
+# Windows Visualization Stack
+# maintainers:
+# - John Parent (@johnwparent)
+# - Ryan Krattiger (@kwryankrattiger)
+
+spack:
+ view: false
+ specs:
+ - vtk~mpi
+
+ cdash:
+ build-group: Windows Visualization (Kitware)
diff --git a/share/spack/gitlab/nersc_pipeline.yml b/share/spack/gitlab/nersc_pipeline.yml
deleted file mode 100644
index 5edcb70c78..0000000000
--- a/share/spack/gitlab/nersc_pipeline.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-merge_pipeline:
- only:
- - develop
- variables:
- SPACK_REPO: ${CI_PROJECT_URL}
- SPACK_REF: ${CI_COMMIT_SHA}
- trigger:
- project: ecp/e4s/e4s
- strategy: depend
diff --git a/share/spack/qa/bootstrap-file.py b/share/spack/qa/bootstrap-file.py
new file mode 100644
index 0000000000..720bd99bbc
--- /dev/null
+++ b/share/spack/qa/bootstrap-file.py
@@ -0,0 +1,4 @@
+from spack.util.filesystem import file_command
+
+if __name__ == "__main__":
+ file_command()
diff --git a/share/spack/qa/config_state.py b/share/spack/qa/config_state.py
new file mode 100644
index 0000000000..0c77c31cc6
--- /dev/null
+++ b/share/spack/qa/config_state.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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)
+"""Used to test correct application of config line scopes in various cases.
+
+The option `config:cache` is supposed to be False, and overridden to True
+from the command line.
+"""
+import multiprocessing as mp
+
+import spack.config
+import spack.subprocess_context
+
+
+def show_config(serialized_state):
+ _ = serialized_state.restore()
+ result = spack.config.CONFIG.get("config:ccache")
+ if result is not True:
+ raise RuntimeError(f"Expected config:ccache:true, but got {result}")
+
+
+if __name__ == "__main__":
+ print("Testing spawn")
+ ctx = mp.get_context("spawn")
+ serialized_state = spack.subprocess_context.PackageInstallContext(None, ctx=ctx)
+ p = ctx.Process(target=show_config, args=(serialized_state,))
+ p.start()
+ p.join()
+
+ print("Testing fork")
+ ctx = mp.get_context("fork")
+ serialized_state = spack.subprocess_context.PackageInstallContext(None, ctx=ctx)
+ p = ctx.Process(target=show_config, args=(serialized_state,))
+ p.start()
+ p.join()
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 6808e18bdb..71d2979ead 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -46,18 +46,13 @@ $coverage_run $(which spack) python -c "import spack.pkg.builtin.mpileaks; repr(
#-----------------------------------------------------------
# Run unit tests with code coverage
#-----------------------------------------------------------
-if [[ "$SPACK_TEST_SOLVER" == "original" ]]; then
- echo "ORIGINAL CONCRETIZER [skipping slow unit tests]"
- export PYTEST_ADDOPTS='-m "not maybeslow"'
-fi
-
# Check if xdist is available
-if python -m pytest --trace-config 2>&1 | grep xdist; then
+if [[ "$UNIT_TEST_COVERAGE" != "true" ]] && python -m pytest -VV 2>&1 | grep xdist; then
export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'"
fi
# We are running pytest-cov after the addition of pytest-xdist, since it integrates
-# other pugins for pytest automatically. We still need to use "coverage" explicitly
+# other plugins for pytest automatically. We still need to use "coverage" explicitly
# for the commands above.
#
# There is a need to pass the configuration file explicitly due to a bug:
@@ -66,9 +61,9 @@ fi
# where it seems that otherwise the configuration file might not be located by subprocesses
# in some, not better specified, cases.
if [[ "$UNIT_TEST_COVERAGE" == "true" ]]; then
- $(which spack) unit-test -x --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml
+ "$(which spack)" unit-test -x --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml
else
- $(which spack) unit-test -x --verbose
+ "$(which spack)" unit-test -x --verbose
fi
diff --git a/share/spack/qa/setup-env-test.sh b/share/spack/qa/setup-env-test.sh
index ec24166d52..734835e07a 100755
--- a/share/spack/qa/setup-env-test.sh
+++ b/share/spack/qa/setup-env-test.sh
@@ -207,3 +207,20 @@ fails spack env deactivate
echo "Correct error exit codes for unit-test when it fails"
fails spack unit-test fail
+
+title "Testing config override from command line, outside of an environment"
+contains 'True' spack -c config:ccache:true python -c "import spack.config;print(spack.config.CONFIG.get('config:ccache'))"
+contains 'True' spack -C "$SHARE_DIR/qa/configuration" python -c "import spack.config;print(spack.config.CONFIG.get('config:ccache'))"
+succeeds spack -c config:ccache:true python "$SHARE_DIR/qa/config_state.py"
+succeeds spack -C "$SHARE_DIR/qa/configuration" python "$SHARE_DIR/qa/config_state.py"
+
+title "Testing config override from command line, inside an environment"
+spack env activate --temp
+spack config add "config:ccache:false"
+
+contains 'True' spack -c config:ccache:true python -c "import spack.config;print(spack.config.CONFIG.get('config:ccache'))"
+contains 'True' spack -C "$SHARE_DIR/qa/configuration" python -c "import spack.config;print(spack.config.CONFIG.get('config:ccache'))"
+succeeds spack -c config:ccache:true python "$SHARE_DIR/qa/config_state.py"
+succeeds spack -C "$SHARE_DIR/qa/configuration" python "$SHARE_DIR/qa/config_state.py"
+
+spack env deactivate
diff --git a/share/spack/qa/validate_last_exit.ps1 b/share/spack/qa/validate_last_exit.ps1
index c8a9f7f5be..565968b2b1 100644
--- a/share/spack/qa/validate_last_exit.ps1
+++ b/share/spack/qa/validate_last_exit.ps1
@@ -1,3 +1,3 @@
if ($LASTEXITCODE -ne 0){
- throw "Unit Tests have failed"
+ throw "Tests have failed"
} \ No newline at end of file
diff --git a/share/spack/setup-env.bat b/share/spack/setup-env.bat
new file mode 100644
index 0000000000..c3b91ece1f
--- /dev/null
+++ b/share/spack/setup-env.bat
@@ -0,0 +1,77 @@
+@ECHO OFF
+setlocal EnableDelayedExpansion
+:: (c) 2021 Lawrence Livermore National Laboratory
+:: To use this file independently of Spack's installer, execute this script in its directory, or add the
+:: associated bin directory to your PATH. Invoke to launch Spack Shell.
+::
+:: source_dir/spack/bin/spack_cmd.bat
+::
+pushd %~dp0..\..
+set SPACK_ROOT=%CD%
+pushd %CD%\..
+set spackinstdir=%CD%
+popd
+
+
+:: Check if Python is on the PATH
+if not defined python_pf_ver (
+(for /f "delims=" %%F in ('where python.exe') do (
+ set "python_pf_ver=%%F"
+ goto :found_python
+ ) ) 2> NUL
+)
+:found_python
+if not defined python_pf_ver (
+ :: If not, look for Python from the Spack installer
+ :get_builtin
+ (for /f "tokens=*" %%g in ('dir /b /a:d "!spackinstdir!\Python*"') do (
+ set "python_ver=%%g")) 2> NUL
+
+ if not defined python_ver (
+ echo Python was not found on your system.
+ echo Please install Python or add Python to your PATH.
+ ) else (
+ set "py_path=!spackinstdir!\!python_ver!"
+ set "py_exe=!py_path!\python.exe"
+ )
+ goto :exitpoint
+) else (
+ :: Python is already on the path
+ set "py_exe=!python_pf_ver!"
+ (for /F "tokens=* USEBACKQ" %%F in (
+ `"!py_exe!" --version`) do (set "output=%%F")) 2>NUL
+ if not "!output:Microsoft Store=!"=="!output!" goto :get_builtin
+ goto :exitpoint
+)
+:exitpoint
+endlocal & (
+ set "SPACK_ROOT=%SPACK_ROOT%"
+ set "spackinstdir=%spackinstdir%"
+ set "py_path=%py_path%"
+ set "py_exe=%py_exe%"
+)
+
+set "PATH=%SPACK_ROOT%\bin\;%PATH%"
+if defined py_path (
+ set "PATH=%py_path%;%PATH%"
+)
+
+if defined py_exe (
+ "%py_exe%" "%SPACK_ROOT%\bin\haspywin.py"
+)
+
+if not defined EDITOR (
+ set EDITOR=notepad
+)
+
+@echo **********************************************************************
+@echo ** Spack Package Manager
+@echo **********************************************************************
+
+IF "%1"=="" GOTO CONTINUE
+set
+GOTO:EOF
+
+:continue
+title Spack
+set PROMPT=[spack] %PROMPT%
diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh
index d18a4c72b7..d091caf8dd 100755..100644
--- a/share/spack/setup-env.csh
+++ b/share/spack/setup-env.csh
@@ -17,38 +17,37 @@ if ($?_sp_initializing) then
endif
setenv _sp_initializing true
-# If SPACK_ROOT is not set, we'll try to find it ourselves.
+# find SPACK_ROOT.
# csh/tcsh don't have a built-in way to do this, but both keep files
# they are sourcing open. We use /proc on linux and lsof on macs to
# find this script's full path in the current process's open files.
-if (! $?SPACK_ROOT) then
- # figure out a command to list open files
- if (-d /proc/$$/fd) then
- set _sp_lsof = "ls -l /proc/$$/fd"
- else
- which lsof > /dev/null
- if ($? == 0) then
- set _sp_lsof = "lsof -p $$"
- endif
- endif
- # filter this script out of list of open files
- if ( $?_sp_lsof ) then
- set _sp_source_file = `$_sp_lsof | sed -e 's/^[^/]*//' | grep "/setup-env.csh"`
+# figure out a command to list open files
+if (-d /proc/$$/fd) then
+ set _sp_lsof = "ls -l /proc/$$/fd"
+else
+ which lsof > /dev/null
+ if ($? == 0) then
+ set _sp_lsof = "lsof -p $$"
endif
+endif
- # This script is in $SPACK_ROOT/share/spack; get the root with dirname
- if ($?_sp_source_file) then
- set _sp_share_spack = `dirname "$_sp_source_file"`
- set _sp_share = `dirname "$_sp_share_spack"`
- setenv SPACK_ROOT `dirname "$_sp_share"`
- endif
+# filter this script out of list of open files
+if ( $?_sp_lsof ) then
+ set _sp_source_file = `$_sp_lsof | sed -e 's/^[^/]*//' | grep "/setup-env.csh"`
+endif
- if (! $?SPACK_ROOT) then
- echo "==> Error: setup-env.csh couldn't figure out where spack lives."
- echo " Set SPACK_ROOT to the root of your spack installation and try again."
- exit 1
- endif
+# This script is in $SPACK_ROOT/share/spack; get the root with dirname
+if ($?_sp_source_file) then
+ set _sp_share_spack = `dirname "$_sp_source_file"`
+ set _sp_share = `dirname "$_sp_share_spack"`
+ setenv SPACK_ROOT `dirname "$_sp_share"`
+endif
+
+if (! $?SPACK_ROOT) then
+ echo "==> Error: setup-env.csh couldn't figure out where spack lives."
+ echo " Set SPACK_ROOT to the root of your spack installation and try again."
+ exit 1
endif
# Command aliases point at separate source files
@@ -63,9 +62,9 @@ if (! $?SPACK_PYTHON) then
setenv SPACK_PYTHON ""
endif
foreach cmd ("$SPACK_PYTHON" python3 python python2)
- command -v "$cmd" >& /dev/null
+ set status=`which "$cmd" >& /dev/null; echo $?`
if ($status == 0) then
- setenv SPACK_PYTHON `command -v "$cmd"`
+ setenv SPACK_PYTHON `which "$cmd"`
break
endif
end
diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish
index 7239e4cbee..a7aac67430 100755..100644
--- a/share/spack/setup-env.fish
+++ b/share/spack/setup-env.fish
@@ -648,10 +648,10 @@ function spack_pathadd -d "Add path to specified variable (defaults to PATH)"
# passed to regular expression matching (`string match -r`)
set -l _a "$pa_oldvalue"
- # skip path if it is already contained in the variable
+ # skip path if it is already the first in the variable
# note spaces in regular expression: we're matching to a space delimited
# list of paths
- if not echo $_a | string match -q -r " *$pa_new_path *"
+ if not echo $_a | string match -q -r "^$pa_new_path *"
if test -n "$pa_oldvalue"
set $pa_varname $pa_new_path $pa_oldvalue
else
diff --git a/share/spack/setup-env.ps1 b/share/spack/setup-env.ps1
index d67e39f85b..88f91f261d 100644
--- a/share/spack/setup-env.ps1
+++ b/share/spack/setup-env.ps1
@@ -60,5 +60,6 @@ function global:prompt
$pth = $(Convert-Path $(Get-Location)) | Split-Path -leaf
"[spack] PS $pth>"
}
+[system.console]::title = "Spack"
Pop-Location
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index d7317818c9..f3e87fe514 100755..100644
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -214,9 +214,9 @@ _spack_pathadd() {
# Do the actual prepending here.
eval "_pa_oldvalue=\${${_pa_varname}:-}"
- _pa_canonical=":$_pa_oldvalue:"
+ _pa_canonical="$_pa_oldvalue:"
if [ -d "$_pa_new_path" ] && \
- [ "${_pa_canonical#*:${_pa_new_path}:}" = "${_pa_canonical}" ];
+ [ "${_pa_canonical#$_pa_new_path:}" = "$_pa_canonical" ];
then
if [ -n "$_pa_oldvalue" ]; then
eval "export $_pa_varname=\"$_pa_new_path:$_pa_oldvalue\""
diff --git a/share/spack/setup-tutorial-env.sh b/share/spack/setup-tutorial-env.sh
index 6979da5329..6979da5329 100755..100644
--- a/share/spack/setup-tutorial-env.sh
+++ b/share/spack/setup-tutorial-env.sh
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 6193982774..b9b4fd2d7a 100755..100644
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -399,9 +399,9 @@ SPACK_ALIASES="concretise:concretize;containerise:containerize;rm:remove"
_spack() {
if $list_options
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 -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace --backtrace -V --version --print-shell-vars"
+ 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 -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace -t --backtrace -V --version --print-shell-vars"
else
- SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize concretise config containerize containerise create debug deconcretize dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
+ SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize concretise config containerize containerise create debug deconcretize dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse logs maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
fi
}
@@ -415,7 +415,7 @@ _spack_add() {
}
_spack_arch() {
- SPACK_COMPREPLY="-h --help -g --generic-target --known-targets -p --platform -o --operating-system -t --target -f --frontend -b --backend"
+ SPACK_COMPREPLY="-h --help -g --generic-target --known-targets --family --generic -p --platform -o --operating-system -t --target -f --frontend -b --backend"
}
_spack_audit() {
@@ -553,7 +553,7 @@ _spack_bootstrap_mirror() {
_spack_build_env() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --clean --dirty -U --fresh --reuse --reuse-deps --dump --pickle"
+ SPACK_COMPREPLY="-h --help --clean --dirty -U --fresh --reuse --fresh-roots --reuse-deps --deprecated --dump --pickle"
else
_all_packages
fi
@@ -564,14 +564,14 @@ _spack_buildcache() {
then
SPACK_COMPREPLY="-h --help"
else
- SPACK_COMPREPLY="push create install list keys preview check download get-buildcache-name save-specfile sync update-index rebuild-index"
+ SPACK_COMPREPLY="push create install list keys check download get-buildcache-name save-specfile sync update-index rebuild-index"
fi
}
_spack_buildcache_push() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t -j --jobs"
+ SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --with-build-dependencies --without-build-dependencies --fail-fast --base-image --tag -t --private -j --jobs"
else
_mirrors
fi
@@ -580,7 +580,7 @@ _spack_buildcache_push() {
_spack_buildcache_create() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image --tag -t -j --jobs"
+ SPACK_COMPREPLY="-h --help -f --force --unsigned -u --signed --key -k --update-index --rebuild-index --spec-file --only --with-build-dependencies --without-build-dependencies --fail-fast --base-image --tag -t --private -j --jobs"
else
_mirrors
fi
@@ -608,15 +608,6 @@ _spack_buildcache_keys() {
SPACK_COMPREPLY="-h --help -i --install -t --trust -f --force"
}
-_spack_buildcache_preview() {
- if $list_options
- then
- SPACK_COMPREPLY="-h --help"
- else
- _installed_packages
- fi
-}
-
_spack_buildcache_check() {
if $list_options
then
@@ -668,7 +659,7 @@ _spack_buildcache_rebuild_index() {
_spack_cd() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -m --module-dir -r --spack-root -i --install-dir -p --package-dir -P --packages -s --stage-dir -S --stages --source-dir -b --build-dir -e --env --first"
+ SPACK_COMPREPLY="-h --help -m --module-dir -r --spack-root -i --install-dir -p --package-dir -P --packages -s --stage-dir -S --stages -c --source-dir -b --build-dir -e --env --first"
else
_all_packages
fi
@@ -702,7 +693,7 @@ _spack_ci() {
}
_spack_ci_generate() {
- SPACK_COMPREPLY="-h --help --output-file --copy-to --optimize --dependencies --buildcache-destination --prune-dag --no-prune-dag --check-index-only --artifacts-root"
+ SPACK_COMPREPLY="-h --help --output-file --optimize --dependencies --prune-dag --no-prune-dag --check-index-only --artifacts-root"
}
_spack_ci_rebuild_index() {
@@ -761,7 +752,7 @@ _spack_compiler() {
_spack_compiler_find() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope"
+ SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope -j --jobs"
else
SPACK_COMPREPLY=""
fi
@@ -770,7 +761,7 @@ _spack_compiler_find() {
_spack_compiler_add() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope"
+ SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope -j --jobs"
else
SPACK_COMPREPLY=""
fi
@@ -812,11 +803,11 @@ _spack_compilers() {
}
_spack_concretize() {
- SPACK_COMPREPLY="-h --help -f --force --test -q --quiet -U --fresh --reuse --reuse-deps -j --jobs"
+ SPACK_COMPREPLY="-h --help -f --force --test -q --quiet -U --fresh --reuse --fresh-roots --reuse-deps --deprecated -j --jobs"
}
_spack_concretise() {
- SPACK_COMPREPLY="-h --help -f --force --test -q --quiet -U --fresh --reuse --reuse-deps -j --jobs"
+ SPACK_COMPREPLY="-h --help -f --force --test -q --quiet -U --fresh --reuse --fresh-roots --reuse-deps --deprecated -j --jobs"
}
_spack_config() {
@@ -824,7 +815,7 @@ _spack_config() {
then
SPACK_COMPREPLY="-h --help --scope"
else
- SPACK_COMPREPLY="get blame edit list add prefer-upstream remove rm update revert"
+ SPACK_COMPREPLY="get blame edit list add change prefer-upstream remove rm update revert"
fi
}
@@ -868,6 +859,15 @@ _spack_config_add() {
fi
}
+_spack_config_change() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help --match-spec"
+ else
+ SPACK_COMPREPLY=""
+ fi
+}
+
_spack_config_prefer_upstream() {
SPACK_COMPREPLY="-h --help --local"
}
@@ -981,7 +981,7 @@ _spack_deprecate() {
_spack_dev_build() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -j --jobs -d --source-path -i --ignore-dependencies -n --no-checksum --deprecated --keep-prefix --skip-patch -q --quiet --drop-in --test -b --before -u --until --clean --dirty -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help -j --jobs -n --no-checksum -d --source-path -i --ignore-dependencies --keep-prefix --skip-patch -q --quiet --drop-in --test -b --before -u --until --clean --dirty -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -990,7 +990,7 @@ _spack_dev_build() {
_spack_develop() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -p --path --no-clone --clone -f --force"
+ SPACK_COMPREPLY="-h --help -p --path -b --build-directory --no-clone --clone -f --force"
else
_all_packages
fi
@@ -1023,14 +1023,14 @@ _spack_env() {
then
SPACK_COMPREPLY="-h --help"
else
- SPACK_COMPREPLY="activate deactivate create remove rm list ls status st loads view update revert depfile"
+ SPACK_COMPREPLY="activate deactivate create remove rm rename mv list ls status st loads view update revert depfile track untrack"
fi
}
_spack_env_activate() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --with-view -v --without-view -V -p --prompt --temp -d --dir"
+ SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh -v --with-view -V --without-view -p --prompt --temp --create --envfile --keep-relative -d --dir"
else
_environments
fi
@@ -1043,7 +1043,7 @@ _spack_env_deactivate() {
_spack_env_create() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -d --dir --keep-relative --without-view --with-view"
+ SPACK_COMPREPLY="-h --help -d --dir --keep-relative --without-view --with-view --include-concrete"
else
_environments
fi
@@ -1052,7 +1052,7 @@ _spack_env_create() {
_spack_env_remove() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -y --yes-to-all"
+ SPACK_COMPREPLY="-h --help -y --yes-to-all -f --force"
else
_environments
fi
@@ -1061,12 +1061,30 @@ _spack_env_remove() {
_spack_env_rm() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -y --yes-to-all"
+ SPACK_COMPREPLY="-h --help -y --yes-to-all -f --force"
else
_environments
fi
}
+_spack_env_rename() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -d --dir -f --force"
+ else
+ SPACK_COMPREPLY=""
+ fi
+}
+
+_spack_env_mv() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -d --dir -f --force"
+ else
+ SPACK_COMPREPLY=""
+ fi
+}
+
_spack_env_list() {
SPACK_COMPREPLY="-h --help"
}
@@ -1123,6 +1141,24 @@ _spack_env_depfile() {
fi
}
+_spack_env_track() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -n --name -y --yes-to-all"
+ else
+ SPACK_COMPREPLY=""
+ fi
+}
+
+_spack_env_untrack() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -f --force -y --yes-to-all"
+ else
+ _environments
+ fi
+}
+
_spack_extensions() {
if $list_options
then
@@ -1161,7 +1197,7 @@ _spack_external_read_cray_manifest() {
_spack_fetch() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -n --no-checksum --deprecated -m --missing -D --dependencies"
+ SPACK_COMPREPLY="-h --help -n --no-checksum -m --missing -D --dependencies -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1170,14 +1206,19 @@ _spack_fetch() {
_spack_find() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --format -H --hashes --json -d --deps -p --paths --groups --no-groups -l --long -L --very-long -t --tag -N --namespaces -c --show-concretized -f --show-flags --show-full-compiler -x --explicit -X --implicit -u --unknown -m --missing -v --variants --loaded -M --only-missing --deprecated --only-deprecated --start-date --end-date"
+ SPACK_COMPREPLY="-h --help --format -H --hashes --json -I --install-status -d --deps -p --paths --groups --no-groups -l --long -L --very-long -t --tag -N --namespaces -r --only-roots -c --show-concretized -f --show-flags --show-full-compiler -x --explicit -X --implicit -u --unknown -m --missing -v --variants --loaded -M --only-missing --only-deprecated --deprecated --install-tree --start-date --end-date"
else
_installed_packages
fi
}
_spack_gc() {
- SPACK_COMPREPLY="-h --help -E --except-any-environment -e --except-environment -b --keep-build-dependencies -y --yes-to-all"
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -E --except-any-environment -e --except-environment -b --keep-build-dependencies -y --yes-to-all"
+ else
+ _installed_packages
+ fi
}
_spack_gpg() {
@@ -1254,7 +1295,7 @@ _spack_gpg_export() {
_spack_gpg_publish() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -d --directory -m --mirror-name --mirror-url --rebuild-index"
+ SPACK_COMPREPLY="-h --help -d --directory -m --mirror-name --mirror-url --update-index --rebuild-index"
else
_keys
fi
@@ -1281,7 +1322,7 @@ _spack_help() {
_spack_info() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -a --all --detectable --maintainers --no-dependencies --no-variants --no-versions --phases --tags --tests --virtuals --variants-by-name"
+ SPACK_COMPREPLY="-h --help -a --all --detectable --maintainers --namespace --no-dependencies --no-variants --no-versions --phases --tags --tests --virtuals --variants-by-name"
else
_all_packages
fi
@@ -1290,7 +1331,7 @@ _spack_info() {
_spack_install() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --only -u --until -j --jobs --overwrite --fail-fast --keep-prefix --keep-stage --dont-restage --use-cache --no-cache --cache-only --use-buildcache --include-build-deps --no-check-signature --show-log-on-error --source -n --no-checksum --deprecated -v --verbose --fake --only-concrete --add --no-add -f --file --clean --dirty --test --log-format --log-file --help-cdash --cdash-upload-url --cdash-build --cdash-site --cdash-track --cdash-buildstamp -y --yes-to-all -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help --only -u --until -j --jobs --overwrite --fail-fast --keep-prefix --keep-stage --dont-restage --use-cache --no-cache --cache-only --use-buildcache --include-build-deps --no-check-signature --show-log-on-error --source -n --no-checksum -v --verbose --fake --only-concrete --add --no-add -f --file --clean --dirty --test --log-format --log-file --help-cdash --cdash-upload-url --cdash-build --cdash-site --cdash-track --cdash-buildstamp -y --yes-to-all -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1320,7 +1361,7 @@ _spack_license_update_copyright_year() {
_spack_list() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -d --search-description --format -v --virtuals -t --tag --count --update"
+ SPACK_COMPREPLY="-h --help -r --repo -N --namespace -d --search-description --format -v --virtuals -t --tag --count --update"
else
_all_packages
fi
@@ -1329,7 +1370,7 @@ _spack_list() {
_spack_load() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --first --only --list"
+ SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --first --list"
else
_installed_packages
fi
@@ -1338,7 +1379,7 @@ _spack_load() {
_spack_location() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -m --module-dir -r --spack-root -i --install-dir -p --package-dir -P --packages -s --stage-dir -S --stages --source-dir -b --build-dir -e --env --first"
+ SPACK_COMPREPLY="-h --help -m --module-dir -r --spack-root -i --install-dir -p --package-dir -P --packages -s --stage-dir -S --stages -c --source-dir -b --build-dir -e --env --first"
else
_all_packages
fi
@@ -1353,6 +1394,15 @@ _spack_log_parse() {
fi
}
+_spack_logs() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help"
+ else
+ _all_packages
+ fi
+}
+
_spack_maintainers() {
if $list_options
then
@@ -1383,7 +1433,7 @@ _spack_mark() {
_spack_mirror() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -n --no-checksum --deprecated"
+ SPACK_COMPREPLY="-h --help -n --no-checksum"
else
SPACK_COMPREPLY="create destroy add remove rm set-url set list"
fi
@@ -1392,7 +1442,7 @@ _spack_mirror() {
_spack_mirror_create() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -d --directory -a --all -f --file --exclude-file --exclude-specs --skip-unstable-versions -D --dependencies -n --versions-per-spec"
+ SPACK_COMPREPLY="-h --help -d --directory -a --all -f --file --exclude-file --exclude-specs --skip-unstable-versions -D --dependencies -n --versions-per-spec --private -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1405,7 +1455,7 @@ _spack_mirror_destroy() {
_spack_mirror_add() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --scope --type --unsigned --signed --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password"
+ SPACK_COMPREPLY="-h --help --scope --type --autopush --unsigned --signed --s3-access-key-id --s3-access-key-id-variable --s3-access-key-secret --s3-access-key-secret-variable --s3-access-token --s3-access-token-variable --s3-profile --s3-endpoint-url --oci-username --oci-username-variable --oci-password --oci-password-variable"
else
_mirrors
fi
@@ -1432,7 +1482,7 @@ _spack_mirror_rm() {
_spack_mirror_set_url() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --push --fetch --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password"
+ SPACK_COMPREPLY="-h --help --push --fetch --scope --s3-access-key-id --s3-access-key-id-variable --s3-access-key-secret --s3-access-key-secret-variable --s3-access-token --s3-access-token-variable --s3-profile --s3-endpoint-url --oci-username --oci-username-variable --oci-password --oci-password-variable"
else
_mirrors
fi
@@ -1441,7 +1491,7 @@ _spack_mirror_set_url() {
_spack_mirror_set() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --push --fetch --type --url --unsigned --signed --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password"
+ SPACK_COMPREPLY="-h --help --push --fetch --type --url --autopush --no-autopush --unsigned --signed --scope --s3-access-key-id --s3-access-key-id-variable --s3-access-key-secret --s3-access-key-secret-variable --s3-access-token --s3-access-token-variable --s3-profile --s3-endpoint-url --oci-username --oci-username-variable --oci-password --oci-password-variable"
else
_mirrors
fi
@@ -1571,7 +1621,7 @@ _spack_module_tcl_setdefault() {
_spack_patch() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -n --no-checksum --deprecated -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help -n --no-checksum -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1799,7 +1849,7 @@ _spack_restage() {
_spack_solve() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --show -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json -c --cover -t --types --timers --stats -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help --show --timers --stats -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json --format -c --cover -t --types -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1808,7 +1858,7 @@ _spack_solve() {
_spack_spec() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json --format -c --cover -t --types -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help -l --long -L --very-long -N --namespaces -I --install-status --no-install-status -y --yaml -j --json --format -c --cover -t --types -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1817,7 +1867,7 @@ _spack_spec() {
_spack_stage() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -n --no-checksum --deprecated -p --path -U --fresh --reuse --reuse-deps"
+ SPACK_COMPREPLY="-h --help -n --no-checksum -p --path -U --fresh --reuse --fresh-roots --reuse-deps --deprecated"
else
_all_packages
fi
@@ -1907,7 +1957,7 @@ _spack_test_remove() {
_spack_test_env() {
if $list_options
then
- SPACK_COMPREPLY="-h --help --clean --dirty -U --fresh --reuse --reuse-deps --dump --pickle"
+ SPACK_COMPREPLY="-h --help --clean --dirty -U --fresh --reuse --fresh-roots --reuse-deps --deprecated --dump --pickle"
else
_all_packages
fi
@@ -1938,7 +1988,7 @@ _spack_uninstall() {
_spack_unit_test() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -H --pytest-help -l --list -L --list-long -N --list-names --extension -s -k --showlocals"
+ SPACK_COMPREPLY="-h --help -H --pytest-help -n --numprocesses -l --list -L --list-long -N --list-names --extension -s -k --showlocals"
else
_unit_tests
fi
@@ -1995,7 +2045,7 @@ _spack_verify() {
_spack_versions() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -s --safe --safe-only -r --remote -n --new -j --jobs"
+ SPACK_COMPREPLY="-h --help -s --safe -r --remote -n --new -j --jobs"
else
_all_packages
fi
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish
index 31aba0aa7d..7d1e996c3f 100755..100644
--- a/share/spack/spack-completion.fish
+++ b/share/spack/spack-completion.fish
@@ -347,13 +347,13 @@ complete -c spack --erase
# Everything below here is auto-generated.
# spack
-set -g __fish_spack_optspecs_spack 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 b/bootstrap p/profile sorted-profile= lines= v/verbose stacktrace backtrace V/version print-shell-vars=
+set -g __fish_spack_optspecs_spack 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 b/bootstrap p/profile sorted-profile= lines= v/verbose stacktrace t/backtrace V/version print-shell-vars=
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a add -d 'add a spec to an environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a arch -d 'print architecture information about this machine'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a audit -d 'audit configuration files, packages, etc.'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a blame -d 'show contributors to packages'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a bootstrap -d 'manage bootstrap configuration'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a build-env -d 'run a command in a spec\'s install environment, or dump its environment to screen or file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a build-env -d 'run a command in a spec'"'"'s install environment, or dump its environment to screen or file'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a buildcache -d 'create, download and install binary packages'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a cd -d 'cd to spack directories in the shell'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a change -d 'change an existing spec in an environment'
@@ -376,7 +376,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependencies -d '
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependents -d 'show packages that depend on another'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a deprecate -d 'replace one package with another via symlinks'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dev-build -d 'developer build: build from code in current working directory'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a develop -d 'add a spec to an environment\'s dev-build information'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a develop -d 'add a spec to an environment'"'"'s dev-build information'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a diff -d 'compare two specs'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a docs -d 'open spack documentation in a web browser'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a edit -d 'open package files in $EDITOR'
@@ -396,6 +396,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a list -d 'list and
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a load -d 'add package to the user environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a location -d 'print out locations of packages and spack directories'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a log-parse -d 'filter errors and warnings from build logs'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a logs -d 'print out logs for packages'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a maintainers -d 'get information about package maintainers'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a make-installer -d 'generate Windows installer'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a mark -d 'mark packages as explicitly or implicitly installed'
@@ -406,7 +407,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a pkg -d 'query pac
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a providers -d 'list packages that provide a particular virtual package'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a pydoc -d 'run pydoc from within spack'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a python -d 'launch an interpreter as spack would launch a command'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a reindex -d 'rebuild Spack\'s package database'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a reindex -d 'rebuild Spack'"'"'s package database'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a remove -d 'remove specs from an environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a rm -d 'remove specs from an environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a repo -d 'manage package source repositories'
@@ -417,12 +418,12 @@ complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a spec -d 'show wha
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a stage -d 'expand downloaded archive in preparation for install'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a style -d 'runs source code style checks on spack'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a tags -d 'show package tags and associated packages'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test -d 'run spack\'s tests for an install'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test-env -d 'run a command in a spec\'s test environment, or dump its environment to screen or file'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test -d 'run spack'"'"'s tests for an install'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a test-env -d 'run a command in a spec'"'"'s test environment, or dump its environment to screen or file'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a tutorial -d 'set up spack for our tutorial (WARNING: modifies config!)'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a undevelop -d 'remove specs from an environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a uninstall -d 'remove installed packages'
-complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a unit-test -d 'run spack\'s unit tests (wrapper around pytest)'
+complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a unit-test -d 'run spack'"'"'s unit tests (wrapper around pytest)'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a unload -d 'remove package from the user environment'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a url -d 'debugging tool for url parsing'
complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a verify -d 'check that all spack packages are on disk as installed'
@@ -437,7 +438,7 @@ complete -c spack -n '__fish_spack_using_command ' -l color -r -d 'when to color
complete -c spack -n '__fish_spack_using_command ' -s c -l config -r -f -a config_vars
complete -c spack -n '__fish_spack_using_command ' -s c -l config -r -d 'add one or more custom, one off config settings'
complete -c spack -n '__fish_spack_using_command ' -s C -l config-scope -r -f -a config_scopes
-complete -c spack -n '__fish_spack_using_command ' -s C -l config-scope -r -d 'add a custom configuration scope'
+complete -c spack -n '__fish_spack_using_command ' -s C -l config-scope -r -d 'add directory or environment as read-only configuration scope, without activating the environment.'
complete -c spack -n '__fish_spack_using_command ' -s d -l debug -f -a debug
complete -c spack -n '__fish_spack_using_command ' -s d -l debug -d 'write out debug messages'
complete -c spack -n '__fish_spack_using_command ' -l timestamp -f -a timestamp
@@ -467,13 +468,13 @@ complete -c spack -n '__fish_spack_using_command ' -s p -l profile -d 'profile e
complete -c spack -n '__fish_spack_using_command ' -l sorted-profile -r -f -a sorted_profile
complete -c spack -n '__fish_spack_using_command ' -l sorted-profile -r -d 'profile and sort'
complete -c spack -n '__fish_spack_using_command ' -l lines -r -f -a lines
-complete -c spack -n '__fish_spack_using_command ' -l lines -r -d 'lines of profile output or \'all\' (default: 20)'
+complete -c spack -n '__fish_spack_using_command ' -l lines -r -d 'lines of profile output or '"'"'all'"'"' (default: 20)'
complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -f -a verbose
complete -c spack -n '__fish_spack_using_command ' -s v -l verbose -d 'print additional output during builds'
complete -c spack -n '__fish_spack_using_command ' -l stacktrace -f -a stacktrace
complete -c spack -n '__fish_spack_using_command ' -l stacktrace -d 'add stacktraces to all printed statements'
-complete -c spack -n '__fish_spack_using_command ' -l backtrace -f -a backtrace
-complete -c spack -n '__fish_spack_using_command ' -l backtrace -d 'always show backtraces for exceptions'
+complete -c spack -n '__fish_spack_using_command ' -s t -l backtrace -f -a backtrace
+complete -c spack -n '__fish_spack_using_command ' -s t -l backtrace -d 'always show backtraces for exceptions'
complete -c spack -n '__fish_spack_using_command ' -s V -l version -f -a version
complete -c spack -n '__fish_spack_using_command ' -s V -l version -d 'show version number and exit'
complete -c spack -n '__fish_spack_using_command ' -l print-shell-vars -r -f -a print_shell_vars
@@ -488,13 +489,17 @@ complete -c spack -n '__fish_spack_using_command add' -s l -l list-name -r -f -a
complete -c spack -n '__fish_spack_using_command add' -s l -l list-name -r -d 'name of the list to add specs to'
# spack arch
-set -g __fish_spack_optspecs_spack_arch h/help g/generic-target known-targets p/platform o/operating-system t/target f/frontend b/backend
+set -g __fish_spack_optspecs_spack_arch h/help g/generic-target known-targets family generic p/platform o/operating-system t/target f/frontend b/backend
complete -c spack -n '__fish_spack_using_command arch' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command arch' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command arch' -s g -l generic-target -f -a generic_target
-complete -c spack -n '__fish_spack_using_command arch' -s g -l generic-target -d 'show the best generic target'
+complete -c spack -n '__fish_spack_using_command arch' -s g -l generic-target -d 'show the best generic target (deprecated)'
complete -c spack -n '__fish_spack_using_command arch' -l known-targets -f -a known_targets
complete -c spack -n '__fish_spack_using_command arch' -l known-targets -d 'show a list of all known targets and exit'
+complete -c spack -n '__fish_spack_using_command arch' -l family -f -a family
+complete -c spack -n '__fish_spack_using_command arch' -l family -d 'print generic ISA (x86_64, aarch64, ppc64le, ...)'
+complete -c spack -n '__fish_spack_using_command arch' -l generic -f -a generic
+complete -c spack -n '__fish_spack_using_command arch' -l generic -d 'print feature level (x86_64_v3, armv8.4a, ...)'
complete -c spack -n '__fish_spack_using_command arch' -s p -l platform -f -a platform
complete -c spack -n '__fish_spack_using_command arch' -s p -l platform -d 'print only the platform'
complete -c spack -n '__fish_spack_using_command arch' -s o -l operating-system -f -a operating_system
@@ -659,20 +664,22 @@ complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l dev -f -a
complete -c spack -n '__fish_spack_using_command bootstrap mirror' -l dev -d 'download dev dependencies too'
# spack build-env
-set -g __fish_spack_optspecs_spack_build_env h/help clean dirty U/fresh reuse reuse-deps dump= pickle=
+set -g __fish_spack_optspecs_spack_build_env h/help clean dirty U/fresh reuse fresh-roots deprecated dump= pickle=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 build-env' -f -a '(__fish_spack_build_env_spec)'
complete -c spack -n '__fish_spack_using_command build-env' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command build-env' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command build-env' -l clean -f -a dirty
complete -c spack -n '__fish_spack_using_command build-env' -l clean -d 'unset harmful variables in the build environment (default)'
complete -c spack -n '__fish_spack_using_command build-env' -l dirty -f -a dirty
-complete -c spack -n '__fish_spack_using_command build-env' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command build-env' -l dirty -d 'preserve user environment in spack'"'"'s build environment (danger!)'
complete -c spack -n '__fish_spack_using_command build-env' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command build-env' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command build-env' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command build-env' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command build-env' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command build-env' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command build-env' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command build-env' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command build-env' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command build-env' -l deprecated -d 'allow concretizer to select deprecated versions'
complete -c spack -n '__fish_spack_using_command build-env' -l dump -r -f -a dump
complete -c spack -n '__fish_spack_using_command build-env' -l dump -r -d 'dump a source-able environment to FILE'
complete -c spack -n '__fish_spack_using_command build-env' -l pickle -r -f -a pickle
@@ -685,7 +692,6 @@ complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a create
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a install -d 'install from a binary package'
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a list -d 'list binary packages available from mirrors'
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a keys -d 'get public keys available on mirrors'
-complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a preview -d 'analyze an installed spec and reports whether executables and libraries are relocatable'
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a check -d 'check specs against remote binary mirror(s) to see if any need to be rebuilt'
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a download -d 'download buildcache entry from a remote mirror to local folder'
complete -c spack -n '__fish_spack_using_command_pos 0 buildcache' -f -a get-buildcache-name -d 'get name (prefix) of buildcache entries for this spec'
@@ -697,14 +703,12 @@ complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -f -a
complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -d 'show this help message and exit'
# spack buildcache push
-set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force a/allow-root u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= j/jobs=
+set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force u/unsigned signed k/key= update-index spec-file= only= with-build-dependencies without-build-dependencies fail-fast base-image= t/tag= private j/jobs=
complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache push' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -f -a force
complete -c spack -n '__fish_spack_using_command buildcache push' -s f -l force -d 'overwrite tarball if it exists'
-complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -f -a allow_root
-complete -c spack -n '__fish_spack_using_command buildcache push' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution'
complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -f -a signed
complete -c spack -n '__fish_spack_using_command buildcache push' -l unsigned -s u -d 'push unsigned buildcache tarballs'
complete -c spack -n '__fish_spack_using_command buildcache push' -l signed -f -a signed
@@ -717,24 +721,28 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file -
complete -c spack -n '__fish_spack_using_command buildcache push' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file'
complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -f -a 'package dependencies'
complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l with-build-dependencies -f -a with_build_dependencies
+complete -c spack -n '__fish_spack_using_command buildcache push' -l with-build-dependencies -d 'include build dependencies in the buildcache'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l without-build-dependencies -f -a without_build_dependencies
+complete -c spack -n '__fish_spack_using_command buildcache push' -l without-build-dependencies -d 'exclude build dependencies from the buildcache'
complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -f -a fail_fast
complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -d 'stop pushing on first failure (default is best effort)'
complete -c spack -n '__fish_spack_using_command buildcache push' -l base-image -r -f -a base_image
complete -c spack -n '__fish_spack_using_command buildcache push' -l base-image -r -d 'specify the base image for the buildcache'
complete -c spack -n '__fish_spack_using_command buildcache push' -l tag -s t -r -f -a tag
complete -c spack -n '__fish_spack_using_command buildcache push' -l tag -s t -r -d 'when pushing to an OCI registry, tag an image containing all root specs and their runtime dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache push' -l private -f -a private
+complete -c spack -n '__fish_spack_using_command buildcache push' -l private -d 'for a private mirror, include non-redistributable packages'
complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
# spack buildcache create
-set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force a/allow-root u/unsigned signed k/key= update-index spec-file= only= fail-fast base-image= t/tag= j/jobs=
+set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force u/unsigned signed k/key= update-index spec-file= only= with-build-dependencies without-build-dependencies fail-fast base-image= t/tag= private j/jobs=
complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache create' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -f -a force
complete -c spack -n '__fish_spack_using_command buildcache create' -s f -l force -d 'overwrite tarball if it exists'
-complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -f -a allow_root
-complete -c spack -n '__fish_spack_using_command buildcache create' -l allow-root -s a -d 'allow install root string in binary files after RPATH substitution'
complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -f -a signed
complete -c spack -n '__fish_spack_using_command buildcache create' -l unsigned -s u -d 'push unsigned buildcache tarballs'
complete -c spack -n '__fish_spack_using_command buildcache create' -l signed -f -a signed
@@ -747,12 +755,18 @@ complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file
complete -c spack -n '__fish_spack_using_command buildcache create' -l spec-file -r -d 'create buildcache entry for spec from json or yaml file'
complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -f -a 'package dependencies'
complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l with-build-dependencies -f -a with_build_dependencies
+complete -c spack -n '__fish_spack_using_command buildcache create' -l with-build-dependencies -d 'include build dependencies in the buildcache'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l without-build-dependencies -f -a without_build_dependencies
+complete -c spack -n '__fish_spack_using_command buildcache create' -l without-build-dependencies -d 'exclude build dependencies from the buildcache'
complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -f -a fail_fast
complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -d 'stop pushing on first failure (default is best effort)'
complete -c spack -n '__fish_spack_using_command buildcache create' -l base-image -r -f -a base_image
complete -c spack -n '__fish_spack_using_command buildcache create' -l base-image -r -d 'specify the base image for the buildcache'
complete -c spack -n '__fish_spack_using_command buildcache create' -l tag -s t -r -f -a tag
complete -c spack -n '__fish_spack_using_command buildcache create' -l tag -s t -r -d 'when pushing to an OCI registry, tag an image containing all root specs and their runtime dependencies'
+complete -c spack -n '__fish_spack_using_command buildcache create' -l private -f -a private
+complete -c spack -n '__fish_spack_using_command buildcache create' -l private -d 'for a private mirror, include non-redistributable packages'
complete -c spack -n '__fish_spack_using_command buildcache create' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command buildcache create' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
@@ -797,12 +811,6 @@ complete -c spack -n '__fish_spack_using_command buildcache keys' -s t -l trust
complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -f -a force
complete -c spack -n '__fish_spack_using_command buildcache keys' -s f -l force -d 'force new download of keys'
-# spack buildcache preview
-set -g __fish_spack_optspecs_spack_buildcache_preview h/help
-complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache preview' -f -a '(__fish_spack_installed_specs)'
-complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -f -a help
-complete -c spack -n '__fish_spack_using_command buildcache preview' -s h -l help -d 'show this help message and exit'
-
# spack buildcache check
set -g __fish_spack_optspecs_spack_buildcache_check h/help m/mirror-url= o/output-file= scope= s/spec= spec-file=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 buildcache check' -f -k -a '(__fish_spack_specs)'
@@ -858,7 +866,7 @@ set -g __fish_spack_optspecs_spack_buildcache_sync h/help manifest-glob=
complete -c spack -n '__fish_spack_using_command buildcache sync' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command buildcache sync' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command buildcache sync' -l manifest-glob -r -f -a manifest_glob
-complete -c spack -n '__fish_spack_using_command buildcache sync' -l manifest-glob -r -d 'a quoted glob pattern identifying copy manifest files'
+complete -c spack -n '__fish_spack_using_command buildcache sync' -l manifest-glob -r -d 'a quoted glob pattern identifying CI rebuild manifest files'
# spack buildcache update-index
set -g __fish_spack_optspecs_spack_buildcache_update_index h/help k/keys
@@ -877,7 +885,7 @@ complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s k
complete -c spack -n '__fish_spack_using_command buildcache rebuild-index' -s k -l keys -d 'if provided, key index will be updated as well as package index'
# spack cd
-set -g __fish_spack_optspecs_spack_cd h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages source-dir b/build-dir e/env= first
+set -g __fish_spack_optspecs_spack_cd h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages c/source-dir b/build-dir e/env= first
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 cd' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command cd' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command cd' -s h -l help -d 'show this help message and exit'
@@ -888,15 +896,15 @@ complete -c spack -n '__fish_spack_using_command cd' -s r -l spack-root -d 'spac
complete -c spack -n '__fish_spack_using_command cd' -s i -l install-dir -f -a install_dir
complete -c spack -n '__fish_spack_using_command cd' -s i -l install-dir -d 'install prefix for spec (spec need not be installed)'
complete -c spack -n '__fish_spack_using_command cd' -s p -l package-dir -f -a package_dir
-complete -c spack -n '__fish_spack_using_command cd' -s p -l package-dir -d 'directory enclosing a spec\'s package.py file'
+complete -c spack -n '__fish_spack_using_command cd' -s p -l package-dir -d 'directory enclosing a spec'"'"'s package.py file'
complete -c spack -n '__fish_spack_using_command cd' -s P -l packages -f -a packages
complete -c spack -n '__fish_spack_using_command cd' -s P -l packages -d 'top-level packages directory for Spack'
complete -c spack -n '__fish_spack_using_command cd' -s s -l stage-dir -f -a stage_dir
complete -c spack -n '__fish_spack_using_command cd' -s s -l stage-dir -d 'stage directory for a spec'
complete -c spack -n '__fish_spack_using_command cd' -s S -l stages -f -a stages
complete -c spack -n '__fish_spack_using_command cd' -s S -l stages -d 'top level stage directory'
-complete -c spack -n '__fish_spack_using_command cd' -l source-dir -f -a source_dir
-complete -c spack -n '__fish_spack_using_command cd' -l source-dir -d 'source directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command cd' -s c -l source-dir -f -a source_dir
+complete -c spack -n '__fish_spack_using_command cd' -s c -l source-dir -d 'source directory for a spec (requires it to be staged first)'
complete -c spack -n '__fish_spack_using_command cd' -s b -l build-dir -f -a build_dir
complete -c spack -n '__fish_spack_using_command cd' -s b -l build-dir -d 'build directory for a spec (requires it to be staged first)'
complete -c spack -n '__fish_spack_using_command cd' -s e -l env -r -f -a location_env
@@ -923,9 +931,9 @@ complete -c spack -n '__fish_spack_using_command_pos_remainder 1 checksum' -f -a
complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -f -a keep_stage
-complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -d 'don\'t clean up staging area when command completes'
+complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -d 'don'"'"'t clean up staging area when command completes'
complete -c spack -n '__fish_spack_using_command checksum' -l batch -s b -f -a batch
-complete -c spack -n '__fish_spack_using_command checksum' -l batch -s b -d 'don\'t ask which versions to checksum'
+complete -c spack -n '__fish_spack_using_command checksum' -l batch -s b -d 'don'"'"'t ask which versions to checksum'
complete -c spack -n '__fish_spack_using_command checksum' -l latest -s l -f -a latest
complete -c spack -n '__fish_spack_using_command checksum' -l latest -s l -d 'checksum the latest available version'
complete -c spack -n '__fish_spack_using_command checksum' -l preferred -s p -f -a preferred
@@ -947,19 +955,15 @@ complete -c spack -n '__fish_spack_using_command ci' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command ci' -s h -l help -d 'show this help message and exit'
# spack ci generate
-set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= copy-to= optimize dependencies buildcache-destination= prune-dag no-prune-dag check-index-only artifacts-root=
+set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= optimize dependencies prune-dag no-prune-dag check-index-only artifacts-root=
complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -f -a output_file
complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -d 'pathname for the generated gitlab ci yaml file'
-complete -c spack -n '__fish_spack_using_command ci generate' -l copy-to -r -f -a copy_to
-complete -c spack -n '__fish_spack_using_command ci generate' -l copy-to -r -d 'path to additional directory for job files'
complete -c spack -n '__fish_spack_using_command ci generate' -l optimize -f -a optimize
-complete -c spack -n '__fish_spack_using_command ci generate' -l optimize -d '(experimental) optimize the gitlab yaml file for size'
+complete -c spack -n '__fish_spack_using_command ci generate' -l optimize -d '(DEPRECATED) optimize the gitlab yaml file for size'
complete -c spack -n '__fish_spack_using_command ci generate' -l dependencies -f -a dependencies
-complete -c spack -n '__fish_spack_using_command ci generate' -l dependencies -d '(experimental) disable DAG scheduling (use \'plain\' dependencies)'
-complete -c spack -n '__fish_spack_using_command ci generate' -l buildcache-destination -r -f -a buildcache_destination
-complete -c spack -n '__fish_spack_using_command ci generate' -l buildcache-destination -r -d 'override the mirror configured in the environment'
+complete -c spack -n '__fish_spack_using_command ci generate' -l dependencies -d '(DEPRECATED) disable DAG scheduling (use '"'"'plain'"'"' dependencies)'
complete -c spack -n '__fish_spack_using_command ci generate' -l prune-dag -f -a prune_dag
complete -c spack -n '__fish_spack_using_command ci generate' -l prune-dag -d 'skip up-to-date specs'
complete -c spack -n '__fish_spack_using_command ci generate' -l no-prune-dag -f -a prune_dag
@@ -1033,7 +1037,7 @@ set -g __fish_spack_optspecs_spack_commands h/help update-completion a/aliases f
complete -c spack -n '__fish_spack_using_command commands' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command commands' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command commands' -l update-completion -f -a update_completion
-complete -c spack -n '__fish_spack_using_command commands' -l update-completion -d 'regenerate spack\'s tab completion scripts'
+complete -c spack -n '__fish_spack_using_command commands' -l update-completion -d 'regenerate spack'"'"'s tab completion scripts'
complete -c spack -n '__fish_spack_using_command commands' -s a -l aliases -f -a aliases
complete -c spack -n '__fish_spack_using_command commands' -s a -l aliases -d 'include command aliases'
complete -c spack -n '__fish_spack_using_command commands' -l format -r -f -a 'subcommands rst names bash fish'
@@ -1055,7 +1059,7 @@ complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -f -a he
complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -d 'show this help message and exit'
# spack compiler find
-set -g __fish_spack_optspecs_spack_compiler_find h/help mixed-toolchain no-mixed-toolchain scope=
+set -g __fish_spack_optspecs_spack_compiler_find h/help mixed-toolchain no-mixed-toolchain scope= j/jobs=
complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -d 'show this help message and exit'
@@ -1065,9 +1069,11 @@ complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-tool
complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)'
complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -f -a '_builtin defaults system site user command_line'
complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command compiler find' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command compiler find' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
# spack compiler add
-set -g __fish_spack_optspecs_spack_compiler_add h/help mixed-toolchain no-mixed-toolchain scope=
+set -g __fish_spack_optspecs_spack_compiler_add h/help mixed-toolchain no-mixed-toolchain scope= j/jobs=
complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -d 'show this help message and exit'
@@ -1077,6 +1083,8 @@ complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolc
complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)'
complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -f -a '_builtin defaults system site user command_line'
complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -d 'configuration scope to modify'
+complete -c spack -n '__fish_spack_using_command compiler add' -s j -l jobs -r -f -a jobs
+complete -c spack -n '__fish_spack_using_command compiler add' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
# spack compiler remove
set -g __fish_spack_optspecs_spack_compiler_remove h/help a/all scope=
@@ -1121,7 +1129,7 @@ complete -c spack -n '__fish_spack_using_command compilers' -l scope -r -f -a '_
complete -c spack -n '__fish_spack_using_command compilers' -l scope -r -d 'configuration scope to read/modify'
# spack concretize
-set -g __fish_spack_optspecs_spack_concretize h/help f/force test= q/quiet U/fresh reuse reuse-deps j/jobs=
+set -g __fish_spack_optspecs_spack_concretize h/help f/force test= q/quiet U/fresh reuse fresh-roots deprecated j/jobs=
complete -c spack -n '__fish_spack_using_command concretize' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command concretize' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command concretize' -s f -l force -f -a force
@@ -1129,18 +1137,20 @@ complete -c spack -n '__fish_spack_using_command concretize' -s f -l force -d 'r
complete -c spack -n '__fish_spack_using_command concretize' -l test -r -f -a 'root all'
complete -c spack -n '__fish_spack_using_command concretize' -l test -r -d 'concretize with test dependencies of only root packages or all packages'
complete -c spack -n '__fish_spack_using_command concretize' -s q -l quiet -f -a quiet
-complete -c spack -n '__fish_spack_using_command concretize' -s q -l quiet -d 'don\'t print concretized specs'
+complete -c spack -n '__fish_spack_using_command concretize' -s q -l quiet -d 'don'"'"'t print concretized specs'
complete -c spack -n '__fish_spack_using_command concretize' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command concretize' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command concretize' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command concretize' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command concretize' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command concretize' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command concretize' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command concretize' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command concretize' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command concretize' -l deprecated -d 'allow concretizer to select deprecated versions'
complete -c spack -n '__fish_spack_using_command concretize' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command concretize' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
# spack concretise
-set -g __fish_spack_optspecs_spack_concretise h/help f/force test= q/quiet U/fresh reuse reuse-deps j/jobs=
+set -g __fish_spack_optspecs_spack_concretise h/help f/force test= q/quiet U/fresh reuse fresh-roots deprecated j/jobs=
complete -c spack -n '__fish_spack_using_command concretise' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command concretise' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command concretise' -s f -l force -f -a force
@@ -1148,13 +1158,15 @@ complete -c spack -n '__fish_spack_using_command concretise' -s f -l force -d 'r
complete -c spack -n '__fish_spack_using_command concretise' -l test -r -f -a 'root all'
complete -c spack -n '__fish_spack_using_command concretise' -l test -r -d 'concretize with test dependencies of only root packages or all packages'
complete -c spack -n '__fish_spack_using_command concretise' -s q -l quiet -f -a quiet
-complete -c spack -n '__fish_spack_using_command concretise' -s q -l quiet -d 'don\'t print concretized specs'
+complete -c spack -n '__fish_spack_using_command concretise' -s q -l quiet -d 'don'"'"'t print concretized specs'
complete -c spack -n '__fish_spack_using_command concretise' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command concretise' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command concretise' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command concretise' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command concretise' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command concretise' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command concretise' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command concretise' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command concretise' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command concretise' -l deprecated -d 'allow concretizer to select deprecated versions'
complete -c spack -n '__fish_spack_using_command concretise' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command concretise' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
@@ -1165,6 +1177,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a blame -d 'p
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a edit -d 'edit configuration file'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a list -d 'list configuration sections'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a add -d 'add configuration parameters'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a change -d 'swap variants etc. on specs in config'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a prefer-upstream -d 'set package preferences from upstream'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a remove -d 'remove configuration parameters'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a rm -d 'remove configuration parameters'
@@ -1177,19 +1190,19 @@ complete -c spack -n '__fish_spack_using_command config' -l scope -r -d 'configu
# spack config get
set -g __fish_spack_optspecs_spack_config_get h/help
-complete -c spack -n '__fish_spack_using_command_pos 0 config get' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command_pos 0 config get' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams view'
complete -c spack -n '__fish_spack_using_command config get' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command config get' -s h -l help -d 'show this help message and exit'
# spack config blame
set -g __fish_spack_optspecs_spack_config_blame h/help
-complete -c spack -n '__fish_spack_using_command_pos 0 config blame' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command_pos 0 config blame' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams view'
complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -d 'show this help message and exit'
# spack config edit
set -g __fish_spack_optspecs_spack_config_edit h/help print-file
-complete -c spack -n '__fish_spack_using_command_pos 0 config edit' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams'
+complete -c spack -n '__fish_spack_using_command_pos 0 config edit' -f -a 'bootstrap cdash ci compilers concretizer config definitions develop mirrors modules packages repos upstreams view'
complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command config edit' -l print-file -f -a print_file
@@ -1208,6 +1221,14 @@ complete -c spack -n '__fish_spack_using_command config add' -s h -l help -d 'sh
complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -f -a file
complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -d 'file from which to set all config values'
+# spack config change
+set -g __fish_spack_optspecs_spack_config_change h/help match-spec=
+complete -c spack -n '__fish_spack_using_command_pos 0 config change' -f -a '(__fish_spack_colon_path)'
+complete -c spack -n '__fish_spack_using_command config change' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config change' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config change' -l match-spec -r -f -a match_spec
+complete -c spack -n '__fish_spack_using_command config change' -l match-spec -r -d 'only change constraints that match this'
+
# spack config prefer-upstream
set -g __fish_spack_optspecs_spack_config_prefer_upstream h/help local
complete -c spack -n '__fish_spack_using_command config prefer-upstream' -s h -l help -f -a help
@@ -1267,7 +1288,7 @@ set -g __fish_spack_optspecs_spack_create h/help keep-stage n/name= t/template=
complete -c spack -n '__fish_spack_using_command create' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command create' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command create' -l keep-stage -f -a keep_stage
-complete -c spack -n '__fish_spack_using_command create' -l keep-stage -d 'don\'t clean up staging area when command completes'
+complete -c spack -n '__fish_spack_using_command create' -l keep-stage -d 'don'"'"'t clean up staging area when command completes'
complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -f -a name
complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -d 'name of the package to create'
complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cargo cmake generic go intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf'
@@ -1281,11 +1302,11 @@ complete -c spack -n '__fish_spack_using_command create' -s f -l force -d 'overw
complete -c spack -n '__fish_spack_using_command create' -l skip-editor -f -a skip_editor
complete -c spack -n '__fish_spack_using_command create' -l skip-editor -d 'skip the edit session for the package (e.g., automation)'
complete -c spack -n '__fish_spack_using_command create' -s b -l batch -f -a batch
-complete -c spack -n '__fish_spack_using_command create' -s b -l batch -d 'don\'t ask which versions to checksum'
+complete -c spack -n '__fish_spack_using_command create' -s b -l batch -d 'don'"'"'t ask which versions to checksum'
# spack debug
set -g __fish_spack_optspecs_spack_debug h/help
-complete -c spack -n '__fish_spack_using_command_pos 0 debug' -f -a create-db-tarball -d 'create a tarball of Spack\'s installation metadata'
+complete -c spack -n '__fish_spack_using_command_pos 0 debug' -f -a create-db-tarball -d 'create a tarball of Spack'"'"'s installation metadata'
complete -c spack -n '__fish_spack_using_command_pos 0 debug' -f -a report -d 'print information useful for bug reports'
complete -c spack -n '__fish_spack_using_command debug' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command debug' -s h -l help -d 'show this help message and exit'
@@ -1352,23 +1373,21 @@ complete -c spack -n '__fish_spack_using_command deprecate' -s i -l install-depr
complete -c spack -n '__fish_spack_using_command deprecate' -s I -l no-install-deprecator -f -a install
complete -c spack -n '__fish_spack_using_command deprecate' -s I -l no-install-deprecator -d 'deprecator spec must already be installed (default)'
complete -c spack -n '__fish_spack_using_command deprecate' -s l -l link-type -r -f -a 'soft hard'
-complete -c spack -n '__fish_spack_using_command deprecate' -s l -l link-type -r -d 'type of filesystem link to use for deprecation (default soft)'
+complete -c spack -n '__fish_spack_using_command deprecate' -s l -l link-type -r -d '(deprecated)'
# spack dev-build
-set -g __fish_spack_optspecs_spack_dev_build h/help j/jobs= d/source-path= i/ignore-dependencies n/no-checksum deprecated keep-prefix skip-patch q/quiet drop-in= test= b/before= u/until= clean dirty U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_dev_build h/help j/jobs= n/no-checksum d/source-path= i/ignore-dependencies keep-prefix skip-patch q/quiet drop-in= test= b/before= u/until= clean dirty U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 dev-build' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command dev-build' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command dev-build' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command dev-build' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command dev-build' -s j -l jobs -r -d 'explicitly set number of parallel jobs'
+complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -f -a no_checksum
+complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
complete -c spack -n '__fish_spack_using_command dev-build' -s d -l source-path -r -f -a source_path
complete -c spack -n '__fish_spack_using_command dev-build' -s d -l source-path -r -d 'path to source directory (defaults to the current directory)'
complete -c spack -n '__fish_spack_using_command dev-build' -s i -l ignore-dependencies -f -a ignore_deps
complete -c spack -n '__fish_spack_using_command dev-build' -s i -l ignore-dependencies -d 'do not try to install dependencies of requested packages'
-complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -f -a no_checksum
-complete -c spack -n '__fish_spack_using_command dev-build' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -d 'fetch deprecated versions without warning'
complete -c spack -n '__fish_spack_using_command dev-build' -l keep-prefix -f -a keep_prefix
complete -c spack -n '__fish_spack_using_command dev-build' -l keep-prefix -d 'do not remove the install prefix if installation fails'
complete -c spack -n '__fish_spack_using_command dev-build' -l skip-patch -f -a skip_patch
@@ -1386,21 +1405,25 @@ complete -c spack -n '__fish_spack_using_command dev-build' -s u -l until -r -d
complete -c spack -n '__fish_spack_using_command dev-build' -l clean -f -a dirty
complete -c spack -n '__fish_spack_using_command dev-build' -l clean -d 'unset harmful variables in the build environment (default)'
complete -c spack -n '__fish_spack_using_command dev-build' -l dirty -f -a dirty
-complete -c spack -n '__fish_spack_using_command dev-build' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command dev-build' -l dirty -d 'preserve user environment in spack'"'"'s build environment (danger!)'
complete -c spack -n '__fish_spack_using_command dev-build' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command dev-build' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command dev-build' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command dev-build' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command dev-build' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command dev-build' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command dev-build' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command dev-build' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command dev-build' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack develop
-set -g __fish_spack_optspecs_spack_develop h/help p/path= no-clone clone f/force=
+set -g __fish_spack_optspecs_spack_develop h/help p/path= b/build-directory= no-clone clone f/force=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 develop' -f -k -a '(__fish_spack_specs_or_id)'
complete -c spack -n '__fish_spack_using_command develop' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command develop' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command develop' -s p -l path -r -f -a path
complete -c spack -n '__fish_spack_using_command develop' -s p -l path -r -d 'source location of package'
+complete -c spack -n '__fish_spack_using_command develop' -s b -l build-directory -r -f -a build_directory
+complete -c spack -n '__fish_spack_using_command develop' -s b -l build-directory -r -d 'build directory for the package'
complete -c spack -n '__fish_spack_using_command develop' -l no-clone -f -a clone
complete -c spack -n '__fish_spack_using_command develop' -l no-clone -d 'do not clone, the package already exists at the source path'
complete -c spack -n '__fish_spack_using_command develop' -l clone -f -a clone
@@ -1429,7 +1452,7 @@ complete -c spack -n '__fish_spack_using_command docs' -s h -l help -d 'show thi
# spack edit
set -g __fish_spack_optspecs_spack_edit h/help b/build-system c/command d/docs t/test m/module r/repo= N/namespace=
-complete -c spack -n '__fish_spack_using_command_pos 0 edit' -f -a '(__fish_spack_packages)'
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 edit' -f -a '(__fish_spack_packages)'
complete -c spack -n '__fish_spack_using_command edit' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command edit' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command edit' -s b -l build-system -f -a path
@@ -1449,25 +1472,29 @@ complete -c spack -n '__fish_spack_using_command edit' -s N -l namespace -r -d '
# spack env
set -g __fish_spack_optspecs_spack_env h/help
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a activate -d 'set the current environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a deactivate -d 'deactivate any active environment in the shell'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a activate -d 'set the active environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a deactivate -d 'deactivate the active environment'
complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a create -d 'create a new environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a remove -d 'remove an existing environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a rm -d 'remove an existing environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a list -d 'list available environments'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a ls -d 'list available environments'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a status -d 'print whether there is an active environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a st -d 'print whether there is an active environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a loads -d 'list modules for an installed environment \'(see spack module loads)\''
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a view -d 'manage a view associated with the environment'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a update -d 'update environments to the latest format'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a revert -d 'restore environments to their state before update'
-complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a depfile -d 'generate a depfile from the concrete environment specs'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a remove -d 'remove managed environment(s)'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a rm -d 'remove managed environment(s)'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a rename -d 'rename an existing environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a mv -d 'rename an existing environment'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a list -d 'list all managed environments'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a ls -d 'list all managed environments'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a status -d 'print active environment status'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a st -d 'print active environment status'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a loads -d 'list modules for an installed environment '"'"'(see spack module loads)'"'"''
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a view -d 'manage the environment'"'"'s view'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a update -d 'update the environment manifest to the latest schema format'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a revert -d 'restore the environment manifest to its previous format'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a depfile -d 'generate a depfile to exploit parallel builds across specs'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a track -d 'track an environment from a directory in Spack'
+complete -c spack -n '__fish_spack_using_command_pos 0 env' -f -a untrack -d 'track an environment from a directory in Spack'
complete -c spack -n '__fish_spack_using_command env' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env' -s h -l help -d 'show this help message and exit'
# spack env activate
-set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view= V/without-view p/prompt temp d/dir=
+set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view= V/without-view p/prompt temp create envfile= keep-relative d/dir
complete -c spack -n '__fish_spack_using_command_pos 0 env activate' -f -a '(__fish_spack_environments)'
complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -d 'show this help message and exit'
@@ -1481,16 +1508,22 @@ complete -c spack -n '__fish_spack_using_command env activate' -l bat -f -a shel
complete -c spack -n '__fish_spack_using_command env activate' -l bat -d 'print bat commands to activate the environment'
complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -f -a shell
complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -d 'print powershell commands to activate environment'
-complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -f -a with_view
-complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -d 'set runtime environment variables for specific view'
-complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -f -a without_view
-complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -d 'do not set runtime environment variables for any view'
+complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -r -f -a with_view
+complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -r -d 'set runtime environment variables for the named view'
+complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -f -a without_view
+complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -d 'do not set runtime environment variables for any view'
complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -f -a prompt
-complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -d 'decorate the command line prompt when activating'
+complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -d 'add the active environment to the command line prompt'
complete -c spack -n '__fish_spack_using_command env activate' -l temp -f -a temp
-complete -c spack -n '__fish_spack_using_command env activate' -l temp -d 'create and activate an environment in a temporary directory'
-complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -f -a dir
-complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -d 'activate the environment in this directory'
+complete -c spack -n '__fish_spack_using_command env activate' -l temp -d 'create and activate in a temporary directory'
+complete -c spack -n '__fish_spack_using_command env activate' -l create -f -a create
+complete -c spack -n '__fish_spack_using_command env activate' -l create -d 'create and activate the environment if it doesn'"'"'t exist'
+complete -c spack -n '__fish_spack_using_command env activate' -l envfile -r -f -a envfile
+complete -c spack -n '__fish_spack_using_command env activate' -l envfile -r -d 'manifest or lock file (ends with '"'"'.json'"'"' or '"'"'.lock'"'"')'
+complete -c spack -n '__fish_spack_using_command env activate' -l keep-relative -f -a keep_relative
+complete -c spack -n '__fish_spack_using_command env activate' -l keep-relative -d 'copy envfile'"'"'s relative develop paths verbatim when create'
+complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -f -a dir
+complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -d 'activate environment based on the directory supplied'
# spack env deactivate
set -g __fish_spack_optspecs_spack_env_deactivate h/help sh csh fish bat pwsh
@@ -1508,34 +1541,60 @@ complete -c spack -n '__fish_spack_using_command env deactivate' -l pwsh -f -a s
complete -c spack -n '__fish_spack_using_command env deactivate' -l pwsh -d 'print pwsh commands to activate the environment'
# spack env create
-set -g __fish_spack_optspecs_spack_env_create h/help d/dir keep-relative without-view with-view=
+set -g __fish_spack_optspecs_spack_env_create h/help d/dir keep-relative without-view with-view= include-concrete=
complete -c spack -n '__fish_spack_using_command_pos 0 env create' -f -a '(__fish_spack_environments)'
complete -c spack -n '__fish_spack_using_command env create' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env create' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command env create' -s d -l dir -f -a dir
complete -c spack -n '__fish_spack_using_command env create' -s d -l dir -d 'create an environment in a specific directory'
complete -c spack -n '__fish_spack_using_command env create' -l keep-relative -f -a keep_relative
-complete -c spack -n '__fish_spack_using_command env create' -l keep-relative -d 'copy relative develop paths verbatim into the new environment when initializing from envfile'
+complete -c spack -n '__fish_spack_using_command env create' -l keep-relative -d 'copy envfile'"'"'s relative develop paths verbatim'
complete -c spack -n '__fish_spack_using_command env create' -l without-view -f -a without_view
complete -c spack -n '__fish_spack_using_command env create' -l without-view -d 'do not maintain a view for this environment'
complete -c spack -n '__fish_spack_using_command env create' -l with-view -r -f -a with_view
-complete -c spack -n '__fish_spack_using_command env create' -l with-view -r -d 'specify that this environment should maintain a view at the specified path (by default the view is maintained in the environment directory)'
+complete -c spack -n '__fish_spack_using_command env create' -l with-view -r -d 'maintain view at WITH_VIEW (vs. environment'"'"'s directory)'
+complete -c spack -n '__fish_spack_using_command env create' -l include-concrete -r -f -a include_concrete
+complete -c spack -n '__fish_spack_using_command env create' -l include-concrete -r -d 'copy concrete specs from INCLUDE_CONCRETE'"'"'s environment'
# spack env remove
-set -g __fish_spack_optspecs_spack_env_remove h/help y/yes-to-all
+set -g __fish_spack_optspecs_spack_env_remove h/help y/yes-to-all f/force
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env remove' -f -a '(__fish_spack_environments)'
complete -c spack -n '__fish_spack_using_command env remove' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env remove' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command env remove' -s y -l yes-to-all -f -a yes_to_all
complete -c spack -n '__fish_spack_using_command env remove' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+complete -c spack -n '__fish_spack_using_command env remove' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command env remove' -s f -l force -d 'force removal even when included in other environment(s)'
# spack env rm
-set -g __fish_spack_optspecs_spack_env_rm h/help y/yes-to-all
+set -g __fish_spack_optspecs_spack_env_rm h/help y/yes-to-all f/force
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env rm' -f -a '(__fish_spack_environments)'
complete -c spack -n '__fish_spack_using_command env rm' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env rm' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command env rm' -s y -l yes-to-all -f -a yes_to_all
complete -c spack -n '__fish_spack_using_command env rm' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+complete -c spack -n '__fish_spack_using_command env rm' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command env rm' -s f -l force -d 'force removal even when included in other environment(s)'
+
+# spack env rename
+set -g __fish_spack_optspecs_spack_env_rename h/help d/dir f/force
+
+complete -c spack -n '__fish_spack_using_command env rename' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env rename' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env rename' -s d -l dir -f -a dir
+complete -c spack -n '__fish_spack_using_command env rename' -s d -l dir -d 'positional arguments are environment directory paths'
+complete -c spack -n '__fish_spack_using_command env rename' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command env rename' -s f -l force -d 'force renaming even if overwriting an existing environment'
+
+# spack env mv
+set -g __fish_spack_optspecs_spack_env_mv h/help d/dir f/force
+
+complete -c spack -n '__fish_spack_using_command env mv' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env mv' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env mv' -s d -l dir -f -a dir
+complete -c spack -n '__fish_spack_using_command env mv' -s d -l dir -d 'positional arguments are environment directory paths'
+complete -c spack -n '__fish_spack_using_command env mv' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command env mv' -s f -l force -d 'force renaming even if overwriting an existing environment'
# spack env list
set -g __fish_spack_optspecs_spack_env_list h/help
@@ -1602,15 +1661,35 @@ complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env depfile' -f
complete -c spack -n '__fish_spack_using_command env depfile' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command env depfile' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -f -a make_prefix
-complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -d 'prefix Makefile targets (and variables) with <TARGET>/<name>'
+complete -c spack -n '__fish_spack_using_command env depfile' -l make-prefix -l make-target-prefix -r -d 'prefix Makefile targets/variables with <TARGET>/<name>,'
complete -c spack -n '__fish_spack_using_command env depfile' -l make-disable-jobserver -f -a jobserver
complete -c spack -n '__fish_spack_using_command env depfile' -l make-disable-jobserver -d 'disable POSIX jobserver support'
complete -c spack -n '__fish_spack_using_command env depfile' -l use-buildcache -r -f -a use_buildcache
-complete -c spack -n '__fish_spack_using_command env depfile' -l use-buildcache -r -d 'when using `only`, redundant build dependencies are pruned from the DAG'
+complete -c spack -n '__fish_spack_using_command env depfile' -l use-buildcache -r -d 'use `only` to prune redundant build dependencies'
complete -c spack -n '__fish_spack_using_command env depfile' -s o -l output -r -f -a output
complete -c spack -n '__fish_spack_using_command env depfile' -s o -l output -r -d 'write the depfile to FILE rather than to stdout'
complete -c spack -n '__fish_spack_using_command env depfile' -s G -l generator -r -f -a make
-complete -c spack -n '__fish_spack_using_command env depfile' -s G -l generator -r -d 'specify the depfile type'
+complete -c spack -n '__fish_spack_using_command env depfile' -s G -l generator -r -d 'specify the depfile type (only supports `make`)'
+
+# spack env track
+set -g __fish_spack_optspecs_spack_env_track h/help n/name= y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos 0 env track' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env track' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env track' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env track' -s n -l name -r -f -a name
+complete -c spack -n '__fish_spack_using_command env track' -s n -l name -r -d 'custom environment name'
+complete -c spack -n '__fish_spack_using_command env track' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env track' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
+
+# spack env untrack
+set -g __fish_spack_optspecs_spack_env_untrack h/help f/force y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 env untrack' -f -a '(__fish_spack_environments)'
+complete -c spack -n '__fish_spack_using_command env untrack' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command env untrack' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command env untrack' -s f -l force -f -a force
+complete -c spack -n '__fish_spack_using_command env untrack' -s f -l force -d 'force unlink even when environment is active'
+complete -c spack -n '__fish_spack_using_command env untrack' -s y -l yes-to-all -f -a yes_to_all
+complete -c spack -n '__fish_spack_using_command env untrack' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
# spack extensions
set -g __fish_spack_optspecs_spack_extensions h/help l/long L/very-long d/deps p/paths s/show=
@@ -1642,7 +1721,7 @@ set -g __fish_spack_optspecs_spack_external_find h/help not-buildable exclude= p
complete -c spack -n '__fish_spack_using_command external find' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command external find' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command external find' -l not-buildable -f -a not_buildable
-complete -c spack -n '__fish_spack_using_command external find' -l not-buildable -d 'packages with detected externals won\'t be built with Spack'
+complete -c spack -n '__fish_spack_using_command external find' -l not-buildable -d 'packages with detected externals won'"'"'t be built with Spack'
complete -c spack -n '__fish_spack_using_command external find' -l exclude -r -f -a exclude
complete -c spack -n '__fish_spack_using_command external find' -l exclude -r -d 'packages to exclude from search'
complete -c spack -n '__fish_spack_using_command external find' -s p -l path -r -f -a path
@@ -1672,35 +1751,43 @@ complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l
complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l ignore-default-dir -f -a ignore_default_dir
complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l ignore-default-dir -d 'ignore the default directory of manifest files'
complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l dry-run -f -a dry_run
-complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l dry-run -d 'don\'t modify DB with files that are read'
+complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l dry-run -d 'don'"'"'t modify DB with files that are read'
complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l fail-on-error -f -a fail_on_error
complete -c spack -n '__fish_spack_using_command external read-cray-manifest' -l fail-on-error -d 'if a manifest file cannot be parsed, fail and report the full stack trace'
# spack fetch
-set -g __fish_spack_optspecs_spack_fetch h/help n/no-checksum deprecated m/missing D/dependencies
+set -g __fish_spack_optspecs_spack_fetch h/help n/no-checksum m/missing D/dependencies U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 fetch' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command fetch' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command fetch' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command fetch' -s n -l no-checksum -f -a no_checksum
complete -c spack -n '__fish_spack_using_command fetch' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -d 'fetch deprecated versions without warning'
complete -c spack -n '__fish_spack_using_command fetch' -s m -l missing -f -a missing
complete -c spack -n '__fish_spack_using_command fetch' -s m -l missing -d 'fetch only missing (not yet installed) dependencies'
complete -c spack -n '__fish_spack_using_command fetch' -s D -l dependencies -f -a dependencies
complete -c spack -n '__fish_spack_using_command fetch' -s D -l dependencies -d 'also fetch all dependencies'
+complete -c spack -n '__fish_spack_using_command fetch' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command fetch' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command fetch' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command fetch' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command fetch' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command fetch' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command fetch' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack find
-set -g __fish_spack_optspecs_spack_find h/help format= H/hashes json d/deps p/paths groups no-groups l/long L/very-long t/tag= N/namespaces c/show-concretized f/show-flags show-full-compiler x/explicit X/implicit u/unknown m/missing v/variants loaded M/only-missing deprecated only-deprecated start-date= end-date=
+set -g __fish_spack_optspecs_spack_find h/help format= H/hashes json I/install-status d/deps p/paths groups no-groups l/long L/very-long t/tag= N/namespaces r/only-roots c/show-concretized f/show-flags show-full-compiler x/explicit X/implicit u/unknown m/missing v/variants loaded M/only-missing only-deprecated deprecated install-tree= start-date= end-date=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 find' -f -a '(__fish_spack_installed_specs)'
complete -c spack -n '__fish_spack_using_command find' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command find' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command find' -l format -r -f -a format
complete -c spack -n '__fish_spack_using_command find' -l format -r -d 'output specs with the specified format string'
complete -c spack -n '__fish_spack_using_command find' -s H -l hashes -f -a format
-complete -c spack -n '__fish_spack_using_command find' -s H -l hashes -d 'same as \'--format {/hash}\'; use with xargs or $()'
+complete -c spack -n '__fish_spack_using_command find' -s H -l hashes -d 'same as '"'"'--format {/hash}'"'"'; use with xargs or $()'
complete -c spack -n '__fish_spack_using_command find' -l json -f -a json
complete -c spack -n '__fish_spack_using_command find' -l json -d 'output specs as machine-readable json records'
+complete -c spack -n '__fish_spack_using_command find' -s I -l install-status -f -a install_status
+complete -c spack -n '__fish_spack_using_command find' -s I -l install-status -d 'show install status of packages'
complete -c spack -n '__fish_spack_using_command find' -s d -l deps -f -a deps
complete -c spack -n '__fish_spack_using_command find' -s d -l deps -d 'output dependencies along with found specs'
complete -c spack -n '__fish_spack_using_command find' -s p -l paths -f -a paths
@@ -1717,6 +1804,8 @@ complete -c spack -n '__fish_spack_using_command find' -s t -l tag -r -f -a tags
complete -c spack -n '__fish_spack_using_command find' -s t -l tag -r -d 'filter a package query by tag (multiple use allowed)'
complete -c spack -n '__fish_spack_using_command find' -s N -l namespaces -f -a namespaces
complete -c spack -n '__fish_spack_using_command find' -s N -l namespaces -d 'show fully qualified package names'
+complete -c spack -n '__fish_spack_using_command find' -s r -l only-roots -f -a only_roots
+complete -c spack -n '__fish_spack_using_command find' -s r -l only-roots -d 'don'"'"'t show full list of installed specs in an environment'
complete -c spack -n '__fish_spack_using_command find' -s c -l show-concretized -f -a show_concretized
complete -c spack -n '__fish_spack_using_command find' -s c -l show-concretized -d 'show concretized specs in an environment'
complete -c spack -n '__fish_spack_using_command find' -s f -l show-flags -f -a show_flags
@@ -1737,10 +1826,12 @@ complete -c spack -n '__fish_spack_using_command find' -l loaded -f -a loaded
complete -c spack -n '__fish_spack_using_command find' -l loaded -d 'show only packages loaded in the user environment'
complete -c spack -n '__fish_spack_using_command find' -s M -l only-missing -f -a only_missing
complete -c spack -n '__fish_spack_using_command find' -s M -l only-missing -d 'show only missing dependencies'
-complete -c spack -n '__fish_spack_using_command find' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command find' -l deprecated -d 'show deprecated packages as well as installed specs'
complete -c spack -n '__fish_spack_using_command find' -l only-deprecated -f -a only_deprecated
complete -c spack -n '__fish_spack_using_command find' -l only-deprecated -d 'show only deprecated packages'
+complete -c spack -n '__fish_spack_using_command find' -l deprecated -f -a deprecated
+complete -c spack -n '__fish_spack_using_command find' -l deprecated -d 'show deprecated packages as well as installed specs'
+complete -c spack -n '__fish_spack_using_command find' -l install-tree -r -f -a install_tree
+complete -c spack -n '__fish_spack_using_command find' -l install-tree -r -d 'Install trees to query: '"'"'all'"'"' (default), '"'"'local'"'"', '"'"'upstream'"'"', upstream name or path'
complete -c spack -n '__fish_spack_using_command find' -l start-date -r -f -a start_date
complete -c spack -n '__fish_spack_using_command find' -l start-date -r -d 'earliest date of installation [YYYY-MM-DD]'
complete -c spack -n '__fish_spack_using_command find' -l end-date -r -f -a end_date
@@ -1748,6 +1839,7 @@ complete -c spack -n '__fish_spack_using_command find' -l end-date -r -d 'latest
# spack gc
set -g __fish_spack_optspecs_spack_gc h/help E/except-any-environment e/except-environment= b/keep-build-dependencies y/yes-to-all
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gc' -f -a '(__fish_spack_installed_specs)'
complete -c spack -n '__fish_spack_using_command gc' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command gc' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command gc' -s E -l except-any-environment -f -a except_any_environment
@@ -1843,7 +1935,7 @@ complete -c spack -n '__fish_spack_using_command gpg export' -l secret -f -a sec
complete -c spack -n '__fish_spack_using_command gpg export' -l secret -d 'export secret keys'
# spack gpg publish
-set -g __fish_spack_optspecs_spack_gpg_publish h/help d/directory= m/mirror-name= mirror-url= rebuild-index
+set -g __fish_spack_optspecs_spack_gpg_publish h/help d/directory= m/mirror-name= mirror-url= update-index
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gpg publish' -f -a '(__fish_spack_gpg_keys)'
complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command gpg publish' -s h -l help -d 'show this help message and exit'
@@ -1853,8 +1945,8 @@ complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-nam
complete -c spack -n '__fish_spack_using_command gpg publish' -s m -l mirror-name -r -d 'name of the mirror where keys will be published'
complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -f -a mirror_url
complete -c spack -n '__fish_spack_using_command gpg publish' -l mirror-url -r -d 'URL of the mirror where keys will be published'
-complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -f -a rebuild_index
-complete -c spack -n '__fish_spack_using_command gpg publish' -l rebuild-index -d 'regenerate buildcache key index after publishing key(s)'
+complete -c spack -n '__fish_spack_using_command gpg publish' -l update-index -l rebuild-index -f -a update_index
+complete -c spack -n '__fish_spack_using_command gpg publish' -l update-index -l rebuild-index -d 'regenerate buildcache key index after publishing key(s)'
# spack graph
set -g __fish_spack_optspecs_spack_graph h/help a/ascii d/dot s/static c/color i/installed deptype=
@@ -1866,11 +1958,11 @@ complete -c spack -n '__fish_spack_using_command graph' -s a -l ascii -d 'draw g
complete -c spack -n '__fish_spack_using_command graph' -s d -l dot -f -a dot
complete -c spack -n '__fish_spack_using_command graph' -s d -l dot -d 'generate graph in dot format and print to stdout'
complete -c spack -n '__fish_spack_using_command graph' -s s -l static -f -a static
-complete -c spack -n '__fish_spack_using_command graph' -s s -l static -d 'graph static (possible) deps, don\'t concretize (implies --dot)'
+complete -c spack -n '__fish_spack_using_command graph' -s s -l static -d 'graph static (possible) deps, don'"'"'t concretize (implies --dot)'
complete -c spack -n '__fish_spack_using_command graph' -s c -l color -f -a color
complete -c spack -n '__fish_spack_using_command graph' -s c -l color -d 'use different colors for different dependency types'
complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -f -a installed
-complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -d 'graph installed specs, or specs in the active env (implies --dot)'
+complete -c spack -n '__fish_spack_using_command graph' -s i -l installed -d 'graph specs from the DB'
complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -f -a deptype
complete -c spack -n '__fish_spack_using_command graph' -l deptype -r -d 'comma-separated list of deptypes to traverse (default=build,link,run,test)'
@@ -1885,7 +1977,7 @@ complete -c spack -n '__fish_spack_using_command help' -l spec -f -a guide
complete -c spack -n '__fish_spack_using_command help' -l spec -d 'help on the package specification syntax'
# spack info
-set -g __fish_spack_optspecs_spack_info h/help a/all detectable maintainers no-dependencies no-variants no-versions phases tags tests virtuals variants-by-name
+set -g __fish_spack_optspecs_spack_info h/help a/all detectable maintainers namespace no-dependencies no-variants no-versions phases tags tests virtuals variants-by-name
complete -c spack -n '__fish_spack_using_command_pos 0 info' -f -a '(__fish_spack_packages)'
complete -c spack -n '__fish_spack_using_command info' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command info' -s h -l help -d 'show this help message and exit'
@@ -1895,6 +1987,8 @@ complete -c spack -n '__fish_spack_using_command info' -l detectable -f -a detec
complete -c spack -n '__fish_spack_using_command info' -l detectable -d 'output information on external detection'
complete -c spack -n '__fish_spack_using_command info' -l maintainers -f -a maintainers
complete -c spack -n '__fish_spack_using_command info' -l maintainers -d 'output package maintainers'
+complete -c spack -n '__fish_spack_using_command info' -l namespace -f -a namespace
+complete -c spack -n '__fish_spack_using_command info' -l namespace -d 'output package namespace'
complete -c spack -n '__fish_spack_using_command info' -l no-dependencies -f -a no_dependencies
complete -c spack -n '__fish_spack_using_command info' -l no-dependencies -d 'do not output build, link, and run package dependencies'
complete -c spack -n '__fish_spack_using_command info' -l no-variants -f -a no_variants
@@ -1910,10 +2004,10 @@ complete -c spack -n '__fish_spack_using_command info' -l tests -d 'output relev
complete -c spack -n '__fish_spack_using_command info' -l virtuals -f -a virtuals
complete -c spack -n '__fish_spack_using_command info' -l virtuals -d 'output virtual packages'
complete -c spack -n '__fish_spack_using_command info' -l variants-by-name -f -a variants_by_name
-complete -c spack -n '__fish_spack_using_command info' -l variants-by-name -d 'list variants in strict name order; don\'t group by condition'
+complete -c spack -n '__fish_spack_using_command info' -l variants-by-name -d 'list variants in strict name order; don'"'"'t group by condition'
# spack install
-set -g __fish_spack_optspecs_spack_install h/help only= u/until= j/jobs= overwrite fail-fast keep-prefix keep-stage dont-restage use-cache no-cache cache-only use-buildcache= include-build-deps no-check-signature show-log-on-error source n/no-checksum deprecated v/verbose fake only-concrete add no-add f/file= clean dirty test= log-format= log-file= help-cdash cdash-upload-url= cdash-build= cdash-site= cdash-track= cdash-buildstamp= y/yes-to-all U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_install h/help only= u/until= j/jobs= overwrite fail-fast keep-prefix keep-stage dont-restage use-cache no-cache cache-only use-buildcache= include-build-deps no-check-signature show-log-on-error source n/no-checksum v/verbose fake only-concrete add no-add f/file= clean dirty test= log-format= log-file= help-cdash cdash-upload-url= cdash-build= cdash-site= cdash-track= cdash-buildstamp= y/yes-to-all U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 install' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command install' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command install' -s h -l help -d 'show this help message and exit'
@@ -1928,11 +2022,11 @@ complete -c spack -n '__fish_spack_using_command install' -l overwrite -d 'reins
complete -c spack -n '__fish_spack_using_command install' -l fail-fast -f -a fail_fast
complete -c spack -n '__fish_spack_using_command install' -l fail-fast -d 'stop all builds if any build fails (default is best effort)'
complete -c spack -n '__fish_spack_using_command install' -l keep-prefix -f -a keep_prefix
-complete -c spack -n '__fish_spack_using_command install' -l keep-prefix -d 'don\'t remove the install prefix if installation fails'
+complete -c spack -n '__fish_spack_using_command install' -l keep-prefix -d 'don'"'"'t remove the install prefix if installation fails'
complete -c spack -n '__fish_spack_using_command install' -l keep-stage -f -a keep_stage
-complete -c spack -n '__fish_spack_using_command install' -l keep-stage -d 'don\'t remove the build stage if installation succeeds'
+complete -c spack -n '__fish_spack_using_command install' -l keep-stage -d 'don'"'"'t remove the build stage if installation succeeds'
complete -c spack -n '__fish_spack_using_command install' -l dont-restage -f -a dont_restage
-complete -c spack -n '__fish_spack_using_command install' -l dont-restage -d 'if a partial install is detected, don\'t delete prior state'
+complete -c spack -n '__fish_spack_using_command install' -l dont-restage -d 'if a partial install is detected, don'"'"'t delete prior state'
complete -c spack -n '__fish_spack_using_command install' -l use-cache -f -a use_cache
complete -c spack -n '__fish_spack_using_command install' -l use-cache -d 'check for pre-built Spack packages in mirrors (default)'
complete -c spack -n '__fish_spack_using_command install' -l no-cache -f -a use_cache
@@ -1940,7 +2034,7 @@ complete -c spack -n '__fish_spack_using_command install' -l no-cache -d 'do not
complete -c spack -n '__fish_spack_using_command install' -l cache-only -f -a cache_only
complete -c spack -n '__fish_spack_using_command install' -l cache-only -d 'only install package from binary mirrors'
complete -c spack -n '__fish_spack_using_command install' -l use-buildcache -r -f -a use_buildcache
-complete -c spack -n '__fish_spack_using_command install' -l use-buildcache -r -d 'select the mode of buildcache for the \'package\' and \'dependencies\''
+complete -c spack -n '__fish_spack_using_command install' -l use-buildcache -r -d 'select the mode of buildcache for the '"'"'package'"'"' and '"'"'dependencies'"'"''
complete -c spack -n '__fish_spack_using_command install' -l include-build-deps -f -a include_build_deps
complete -c spack -n '__fish_spack_using_command install' -l include-build-deps -d 'include build deps when installing from cache, useful for CI pipeline troubleshooting'
complete -c spack -n '__fish_spack_using_command install' -l no-check-signature -f -a unsigned
@@ -1951,8 +2045,6 @@ complete -c spack -n '__fish_spack_using_command install' -l source -f -a instal
complete -c spack -n '__fish_spack_using_command install' -l source -d 'install source files in prefix'
complete -c spack -n '__fish_spack_using_command install' -s n -l no-checksum -f -a no_checksum
complete -c spack -n '__fish_spack_using_command install' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command install' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command install' -l deprecated -d 'fetch deprecated versions without warning'
complete -c spack -n '__fish_spack_using_command install' -s v -l verbose -f -a install_verbose
complete -c spack -n '__fish_spack_using_command install' -s v -l verbose -d 'display verbose build output while installing'
complete -c spack -n '__fish_spack_using_command install' -l fake -f -a fake
@@ -1968,7 +2060,7 @@ complete -c spack -n '__fish_spack_using_command install' -s f -l file -r -d 're
complete -c spack -n '__fish_spack_using_command install' -l clean -f -a dirty
complete -c spack -n '__fish_spack_using_command install' -l clean -d 'unset harmful variables in the build environment (default)'
complete -c spack -n '__fish_spack_using_command install' -l dirty -f -a dirty
-complete -c spack -n '__fish_spack_using_command install' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command install' -l dirty -d 'preserve user environment in spack'"'"'s build environment (danger!)'
complete -c spack -n '__fish_spack_using_command install' -l test -r -f -a 'root all'
complete -c spack -n '__fish_spack_using_command install' -l test -r -d 'run tests on only root packages or all packages'
complete -c spack -n '__fish_spack_using_command install' -l log-format -r -f -a 'junit cdash'
@@ -1988,8 +2080,10 @@ complete -c spack -n '__fish_spack_using_command install' -s U -l fresh -f -a co
complete -c spack -n '__fish_spack_using_command install' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command install' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command install' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command install' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command install' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command install' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command install' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command install' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command install' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack license
set -g __fish_spack_optspecs_spack_license h/help root=
@@ -2017,10 +2111,12 @@ complete -c spack -n '__fish_spack_using_command license update-copyright-year'
complete -c spack -n '__fish_spack_using_command license update-copyright-year' -s h -l help -d 'show this help message and exit'
# spack list
-set -g __fish_spack_optspecs_spack_list h/help d/search-description format= v/virtuals t/tag= count update=
+set -g __fish_spack_optspecs_spack_list h/help r/repo= d/search-description format= v/virtuals t/tag= count update=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 list' -f -a '(__fish_spack_packages)'
complete -c spack -n '__fish_spack_using_command list' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command list' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command list' -s r -l repo -s N -l namespace -r -f -a repos
+complete -c spack -n '__fish_spack_using_command list' -s r -l repo -s N -l namespace -r -d 'only list packages from the specified repo/namespace'
complete -c spack -n '__fish_spack_using_command list' -s d -l search-description -f -a search_description
complete -c spack -n '__fish_spack_using_command list' -s d -l search-description -d 'filtering will also search the description for a match'
complete -c spack -n '__fish_spack_using_command list' -l format -r -f -a 'name_only version_json html'
@@ -2035,7 +2131,7 @@ complete -c spack -n '__fish_spack_using_command list' -l update -r -f -a update
complete -c spack -n '__fish_spack_using_command list' -l update -r -d 'write output to the specified file, if any package is newer'
# spack load
-set -g __fish_spack_optspecs_spack_load h/help sh csh fish bat pwsh first only= list
+set -g __fish_spack_optspecs_spack_load h/help sh csh fish bat pwsh first list
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 load' -f -a '(__fish_spack_installed_specs)'
complete -c spack -n '__fish_spack_using_command load' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command load' -s h -l help -d 'show this help message and exit'
@@ -2051,13 +2147,11 @@ complete -c spack -n '__fish_spack_using_command load' -l pwsh -f -a shell
complete -c spack -n '__fish_spack_using_command load' -l pwsh -d 'print pwsh commands to load the package'
complete -c spack -n '__fish_spack_using_command load' -l first -f -a load_first
complete -c spack -n '__fish_spack_using_command load' -l first -d 'load the first match if multiple packages match the spec'
-complete -c spack -n '__fish_spack_using_command load' -l only -r -f -a 'package dependencies'
-complete -c spack -n '__fish_spack_using_command load' -l only -r -d 'select whether to load the package and its dependencies'
complete -c spack -n '__fish_spack_using_command load' -l list -f -a list
complete -c spack -n '__fish_spack_using_command load' -l list -d 'show loaded packages: same as `spack find --loaded`'
# spack location
-set -g __fish_spack_optspecs_spack_location h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages source-dir b/build-dir e/env= first
+set -g __fish_spack_optspecs_spack_location h/help m/module-dir r/spack-root i/install-dir p/package-dir P/packages s/stage-dir S/stages c/source-dir b/build-dir e/env= first
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 location' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command location' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command location' -s h -l help -d 'show this help message and exit'
@@ -2068,15 +2162,15 @@ complete -c spack -n '__fish_spack_using_command location' -s r -l spack-root -d
complete -c spack -n '__fish_spack_using_command location' -s i -l install-dir -f -a install_dir
complete -c spack -n '__fish_spack_using_command location' -s i -l install-dir -d 'install prefix for spec (spec need not be installed)'
complete -c spack -n '__fish_spack_using_command location' -s p -l package-dir -f -a package_dir
-complete -c spack -n '__fish_spack_using_command location' -s p -l package-dir -d 'directory enclosing a spec\'s package.py file'
+complete -c spack -n '__fish_spack_using_command location' -s p -l package-dir -d 'directory enclosing a spec'"'"'s package.py file'
complete -c spack -n '__fish_spack_using_command location' -s P -l packages -f -a packages
complete -c spack -n '__fish_spack_using_command location' -s P -l packages -d 'top-level packages directory for Spack'
complete -c spack -n '__fish_spack_using_command location' -s s -l stage-dir -f -a stage_dir
complete -c spack -n '__fish_spack_using_command location' -s s -l stage-dir -d 'stage directory for a spec'
complete -c spack -n '__fish_spack_using_command location' -s S -l stages -f -a stages
complete -c spack -n '__fish_spack_using_command location' -s S -l stages -d 'top level stage directory'
-complete -c spack -n '__fish_spack_using_command location' -l source-dir -f -a source_dir
-complete -c spack -n '__fish_spack_using_command location' -l source-dir -d 'source directory for a spec (requires it to be staged first)'
+complete -c spack -n '__fish_spack_using_command location' -s c -l source-dir -f -a source_dir
+complete -c spack -n '__fish_spack_using_command location' -s c -l source-dir -d 'source directory for a spec (requires it to be staged first)'
complete -c spack -n '__fish_spack_using_command location' -s b -l build-dir -f -a build_dir
complete -c spack -n '__fish_spack_using_command location' -s b -l build-dir -d 'build directory for a spec (requires it to be staged first)'
complete -c spack -n '__fish_spack_using_command location' -s e -l env -r -f -a location_env
@@ -2100,6 +2194,12 @@ complete -c spack -n '__fish_spack_using_command log-parse' -s w -l width -r -d
complete -c spack -n '__fish_spack_using_command log-parse' -s j -l jobs -r -f -a jobs
complete -c spack -n '__fish_spack_using_command log-parse' -s j -l jobs -r -d 'number of jobs to parse log file (default: 1 for short logs, ncpus for long logs)'
+# spack logs
+set -g __fish_spack_optspecs_spack_logs h/help
+complete -c spack -n '__fish_spack_using_command_pos_remainder 0 logs' -f -k -a '(__fish_spack_specs)'
+complete -c spack -n '__fish_spack_using_command logs' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command logs' -s h -l help -d 'show this help message and exit'
+
# spack maintainers
set -g __fish_spack_optspecs_spack_maintainers h/help maintained unmaintained a/all by-user
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 maintainers' -f -a '(__fish_spack_packages)'
@@ -2139,7 +2239,7 @@ complete -c spack -n '__fish_spack_using_command mark' -s i -l implicit -f -a im
complete -c spack -n '__fish_spack_using_command mark' -s i -l implicit -d 'mark packages as implicitly installed'
# spack mirror
-set -g __fish_spack_optspecs_spack_mirror h/help n/no-checksum deprecated
+set -g __fish_spack_optspecs_spack_mirror h/help n/no-checksum
complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a create -d 'create a directory to be used as a spack mirror, and fill it with package archives'
complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a destroy -d 'given a url, recursively delete everything under it'
complete -c spack -n '__fish_spack_using_command_pos 0 mirror' -f -a add -d 'add a mirror to Spack'
@@ -2152,11 +2252,9 @@ complete -c spack -n '__fish_spack_using_command mirror' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command mirror' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command mirror' -s n -l no-checksum -f -a no_checksum
complete -c spack -n '__fish_spack_using_command mirror' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command mirror' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command mirror' -l deprecated -d 'fetch deprecated versions without warning'
# spack mirror create
-set -g __fish_spack_optspecs_spack_mirror_create h/help d/directory= a/all f/file= exclude-file= exclude-specs= skip-unstable-versions D/dependencies n/versions-per-spec=
+set -g __fish_spack_optspecs_spack_mirror_create h/help d/directory= a/all f/file= exclude-file= exclude-specs= skip-unstable-versions D/dependencies n/versions-per-spec= private U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 mirror create' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command mirror create' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command mirror create' -s h -l help -d 'show this help message and exit'
@@ -2171,11 +2269,21 @@ complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-file
complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-specs -r -f -a exclude_specs
complete -c spack -n '__fish_spack_using_command mirror create' -l exclude-specs -r -d 'specs which Spack should not try to add to a mirror (specified on command line)'
complete -c spack -n '__fish_spack_using_command mirror create' -l skip-unstable-versions -f -a skip_unstable_versions
-complete -c spack -n '__fish_spack_using_command mirror create' -l skip-unstable-versions -d 'don\'t cache versions unless they identify a stable (unchanging) source code'
+complete -c spack -n '__fish_spack_using_command mirror create' -l skip-unstable-versions -d 'don'"'"'t cache versions unless they identify a stable (unchanging) source code'
complete -c spack -n '__fish_spack_using_command mirror create' -s D -l dependencies -f -a dependencies
complete -c spack -n '__fish_spack_using_command mirror create' -s D -l dependencies -d 'also fetch all dependencies'
complete -c spack -n '__fish_spack_using_command mirror create' -s n -l versions-per-spec -r -f -a versions_per_spec
-complete -c spack -n '__fish_spack_using_command mirror create' -s n -l versions-per-spec -r -d 'the number of versions to fetch for each spec, choose \'all\' to retrieve all versions of each package'
+complete -c spack -n '__fish_spack_using_command mirror create' -s n -l versions-per-spec -r -d 'the number of versions to fetch for each spec, choose '"'"'all'"'"' to retrieve all versions of each package'
+complete -c spack -n '__fish_spack_using_command mirror create' -l private -f -a private
+complete -c spack -n '__fish_spack_using_command mirror create' -l private -d 'for a private mirror, include non-redistributable packages'
+complete -c spack -n '__fish_spack_using_command mirror create' -s U -l fresh -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command mirror create' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
+complete -c spack -n '__fish_spack_using_command mirror create' -l reuse -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command mirror create' -l reuse -d 'reuse installed packages/buildcaches when possible'
+complete -c spack -n '__fish_spack_using_command mirror create' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command mirror create' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command mirror create' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command mirror create' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack mirror destroy
set -g __fish_spack_optspecs_spack_mirror_destroy h/help m/mirror-name= mirror-url=
@@ -2187,7 +2295,7 @@ complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url -
complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url -r -d 'find mirror to destroy by url'
# spack mirror add
-set -g __fish_spack_optspecs_spack_mirror_add h/help scope= type= unsigned signed s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password=
+set -g __fish_spack_optspecs_spack_mirror_add h/help scope= type= autopush unsigned signed s3-access-key-id= s3-access-key-id-variable= s3-access-key-secret= s3-access-key-secret-variable= s3-access-token= s3-access-token-variable= s3-profile= s3-endpoint-url= oci-username= oci-username-variable= oci-password= oci-password-variable=
complete -c spack -n '__fish_spack_using_command_pos 0 mirror add' -f
complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -d 'show this help message and exit'
@@ -2195,24 +2303,36 @@ complete -c spack -n '__fish_spack_using_command mirror add' -l scope -r -f -a '
complete -c spack -n '__fish_spack_using_command mirror add' -l scope -r -d 'configuration scope to modify'
complete -c spack -n '__fish_spack_using_command mirror add' -l type -r -f -a 'binary source'
complete -c spack -n '__fish_spack_using_command mirror add' -l type -r -d 'specify the mirror type: for both binary and source use `--type binary --type source` (default)'
+complete -c spack -n '__fish_spack_using_command mirror add' -l autopush -f -a autopush
+complete -c spack -n '__fish_spack_using_command mirror add' -l autopush -d 'set mirror to push automatically after installation'
complete -c spack -n '__fish_spack_using_command mirror add' -l unsigned -f -a signed
complete -c spack -n '__fish_spack_using_command mirror add' -l unsigned -d 'do not require signing and signature verification when pushing and installing from this build cache'
complete -c spack -n '__fish_spack_using_command mirror add' -l signed -f -a signed
complete -c spack -n '__fish_spack_using_command mirror add' -l signed -d 'require signing and signature verification when pushing and installing from this build cache'
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id -r -f -a s3_access_key_id
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id-variable -r -f -a s3_access_key_id_variable
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-id-variable -r -d 'environment variable containing ID string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret -r -f -a s3_access_key_secret
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret-variable -r -f -a s3_access_key_secret_variable
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-key-secret-variable -r -d 'environment variable containing secret string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token -r -f -a s3_access_token
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token-variable -r -f -a s3_access_token_variable
+complete -c spack -n '__fish_spack_using_command mirror add' -l s3-access-token-variable -r -d 'environment variable containing access token to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -f -a s3_profile
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -f -a s3_endpoint_url
complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username -r -f -a oci_username
complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username -r -d 'username to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username-variable -r -f -a oci_username_variable
+complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username-variable -r -d 'environment variable containing username to use to connect to this OCI mirror'
complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password -r -f -a oci_password
complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password -r -d 'password to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password-variable -r -f -a oci_password_variable
+complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password-variable -r -d 'environment variable containing password to use to connect to this OCI mirror'
# spack mirror remove
set -g __fish_spack_optspecs_spack_mirror_remove h/help scope=
@@ -2231,7 +2351,7 @@ complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -f -a '_
complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -d 'configuration scope to modify'
# spack mirror set-url
-set -g __fish_spack_optspecs_spack_mirror_set_url h/help push fetch scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password=
+set -g __fish_spack_optspecs_spack_mirror_set_url h/help push fetch scope= s3-access-key-id= s3-access-key-id-variable= s3-access-key-secret= s3-access-key-secret-variable= s3-access-token= s3-access-token-variable= s3-profile= s3-endpoint-url= oci-username= oci-username-variable= oci-password= oci-password-variable=
complete -c spack -n '__fish_spack_using_command_pos 0 mirror set-url' -f -a '(__fish_spack_mirrors)'
complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -d 'show this help message and exit'
@@ -2243,21 +2363,31 @@ complete -c spack -n '__fish_spack_using_command mirror set-url' -l scope -r -f
complete -c spack -n '__fish_spack_using_command mirror set-url' -l scope -r -d 'configuration scope to modify'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id -r -f -a s3_access_key_id
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id-variable -r -f -a s3_access_key_id_variable
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-id-variable -r -d 'environment variable containing ID string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret -r -f -a s3_access_key_secret
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret-variable -r -f -a s3_access_key_secret_variable
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-key-secret-variable -r -d 'environment variable containing secret string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token -r -f -a s3_access_token
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token-variable -r -f -a s3_access_token_variable
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-access-token-variable -r -d 'environment variable containing access token to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile -r -f -a s3_profile
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -f -a s3_endpoint_url
complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username -r -f -a oci_username
complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username -r -d 'username to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username-variable -r -f -a oci_username_variable
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username-variable -r -d 'environment variable containing username to use to connect to this OCI mirror'
complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password -r -f -a oci_password
complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password -r -d 'password to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password-variable -r -f -a oci_password_variable
+complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password-variable -r -d 'environment variable containing password to use to connect to this OCI mirror'
# spack mirror set
-set -g __fish_spack_optspecs_spack_mirror_set h/help push fetch type= url= unsigned signed scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password=
+set -g __fish_spack_optspecs_spack_mirror_set h/help push fetch type= url= autopush no-autopush unsigned signed scope= s3-access-key-id= s3-access-key-id-variable= s3-access-key-secret= s3-access-key-secret-variable= s3-access-token= s3-access-token-variable= s3-profile= s3-endpoint-url= oci-username= oci-username-variable= oci-password= oci-password-variable=
complete -c spack -n '__fish_spack_using_command_pos 0 mirror set' -f -a '(__fish_spack_mirrors)'
complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -d 'show this help message and exit'
@@ -2268,7 +2398,11 @@ complete -c spack -n '__fish_spack_using_command mirror set' -l fetch -d 'modify
complete -c spack -n '__fish_spack_using_command mirror set' -l type -r -f -a 'binary source'
complete -c spack -n '__fish_spack_using_command mirror set' -l type -r -d 'specify the mirror type: for both binary and source use `--type binary --type source`'
complete -c spack -n '__fish_spack_using_command mirror set' -l url -r -f -a url
-complete -c spack -n '__fish_spack_using_command mirror set' -l url -r -d 'url of mirror directory from \'spack mirror create\''
+complete -c spack -n '__fish_spack_using_command mirror set' -l url -r -d 'url of mirror directory from '"'"'spack mirror create'"'"''
+complete -c spack -n '__fish_spack_using_command mirror set' -l autopush -f -a autopush
+complete -c spack -n '__fish_spack_using_command mirror set' -l autopush -d 'set mirror to push automatically after installation'
+complete -c spack -n '__fish_spack_using_command mirror set' -l no-autopush -f -a autopush
+complete -c spack -n '__fish_spack_using_command mirror set' -l no-autopush -d 'set mirror to not push automatically after installation'
complete -c spack -n '__fish_spack_using_command mirror set' -l unsigned -f -a signed
complete -c spack -n '__fish_spack_using_command mirror set' -l unsigned -d 'do not require signing and signature verification when pushing and installing from this build cache'
complete -c spack -n '__fish_spack_using_command mirror set' -l signed -f -a signed
@@ -2277,18 +2411,28 @@ complete -c spack -n '__fish_spack_using_command mirror set' -l scope -r -f -a '
complete -c spack -n '__fish_spack_using_command mirror set' -l scope -r -d 'configuration scope to modify'
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id -r -f -a s3_access_key_id
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id -r -d 'ID string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id-variable -r -f -a s3_access_key_id_variable
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-id-variable -r -d 'environment variable containing ID string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret -r -f -a s3_access_key_secret
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret -r -d 'secret string to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret-variable -r -f -a s3_access_key_secret_variable
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-key-secret-variable -r -d 'environment variable containing secret string to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token -r -f -a s3_access_token
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token -r -d 'access token to use to connect to this S3 mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token-variable -r -f -a s3_access_token_variable
+complete -c spack -n '__fish_spack_using_command mirror set' -l s3-access-token-variable -r -d 'environment variable containing access token to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -f -a s3_profile
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -f -a s3_endpoint_url
complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username -r -f -a oci_username
complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username -r -d 'username to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username-variable -r -f -a oci_username_variable
+complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username-variable -r -d 'environment variable containing username to use to connect to this OCI mirror'
complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password -r -f -a oci_password
complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password -r -d 'password to use to connect to this OCI mirror'
+complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password-variable -r -f -a oci_password_variable
+complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password-variable -r -d 'environment variable containing password to use to connect to this OCI mirror'
# spack mirror list
set -g __fish_spack_optspecs_spack_mirror_list h/help scope=
@@ -2429,20 +2573,20 @@ complete -c spack -n '__fish_spack_using_command module tcl setdefault' -s h -l
complete -c spack -n '__fish_spack_using_command module tcl setdefault' -s h -l help -d 'show this help message and exit'
# spack patch
-set -g __fish_spack_optspecs_spack_patch h/help n/no-checksum deprecated U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_patch h/help n/no-checksum U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 patch' -f -k -a '(__fish_spack_specs)'
complete -c spack -n '__fish_spack_using_command patch' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command patch' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command patch' -s n -l no-checksum -f -a no_checksum
complete -c spack -n '__fish_spack_using_command patch' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command patch' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command patch' -l deprecated -d 'fetch deprecated versions without warning'
complete -c spack -n '__fish_spack_using_command patch' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command patch' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command patch' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command patch' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command patch' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command patch' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command patch' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command patch' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command patch' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command patch' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack pkg
set -g __fish_spack_optspecs_spack_pkg h/help
@@ -2491,7 +2635,7 @@ complete -c spack -n '__fish_spack_using_command_pos 1 pkg changed' -f -a '(__fi
complete -c spack -n '__fish_spack_using_command pkg changed' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command pkg changed' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command pkg changed' -s t -l type -r -f -a type
-complete -c spack -n '__fish_spack_using_command pkg changed' -s t -l type -r -d 'types of changes to show (A: added, R: removed, C: changed); default is \'C\''
+complete -c spack -n '__fish_spack_using_command pkg changed' -s t -l type -r -d 'types of changes to show (A: added, R: removed, C: changed); default is '"'"'C'"'"''
# spack pkg removed
set -g __fish_spack_optspecs_spack_pkg_removed h/help
@@ -2583,9 +2727,9 @@ complete -c spack -n '__fish_spack_using_command rm' -s f -l force -d 'remove co
set -g __fish_spack_optspecs_spack_repo h/help
complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a create -d 'create a new package repository'
complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a list -d 'show registered repositories and their namespaces'
-complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a add -d 'add a package source to Spack\'s configuration'
-complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a remove -d 'remove a repository from Spack\'s configuration'
-complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a rm -d 'remove a repository from Spack\'s configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a add -d 'add a package source to Spack'"'"'s configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a remove -d 'remove a repository from Spack'"'"'s configuration'
+complete -c spack -n '__fish_spack_using_command_pos 0 repo' -f -a rm -d 'remove a repository from Spack'"'"'s configuration'
complete -c spack -n '__fish_spack_using_command repo' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command repo' -s h -l help -d 'show this help message and exit'
@@ -2655,12 +2799,16 @@ complete -c spack -n '__fish_spack_using_command restage' -s h -l help -f -a hel
complete -c spack -n '__fish_spack_using_command restage' -s h -l help -d 'show this help message and exit'
# spack solve
-set -g __fish_spack_optspecs_spack_solve h/help show= l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json c/cover= t/types timers stats U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_solve h/help show= timers stats l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json format= c/cover= t/types U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 solve' -f -k -a '(__fish_spack_specs_or_id)'
complete -c spack -n '__fish_spack_using_command solve' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command solve' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command solve' -l show -r -f -a show
complete -c spack -n '__fish_spack_using_command solve' -l show -r -d 'select outputs'
+complete -c spack -n '__fish_spack_using_command solve' -l timers -f -a timers
+complete -c spack -n '__fish_spack_using_command solve' -l timers -d 'print out timers for different solve phases'
+complete -c spack -n '__fish_spack_using_command solve' -l stats -f -a stats
+complete -c spack -n '__fish_spack_using_command solve' -l stats -d 'print out statistics from clingo'
complete -c spack -n '__fish_spack_using_command solve' -s l -l long -f -a long
complete -c spack -n '__fish_spack_using_command solve' -s l -l long -d 'show dependency hashes as well as versions'
complete -c spack -n '__fish_spack_using_command solve' -s L -l very-long -f -a very_long
@@ -2672,26 +2820,26 @@ complete -c spack -n '__fish_spack_using_command solve' -s I -l install-status -
complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -f -a install_status
complete -c spack -n '__fish_spack_using_command solve' -l no-install-status -d 'do not show install status annotations'
complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -f -a format
-complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -d 'print concrete spec as yaml'
+complete -c spack -n '__fish_spack_using_command solve' -s y -l yaml -d 'print concrete spec as YAML'
complete -c spack -n '__fish_spack_using_command solve' -s j -l json -f -a format
-complete -c spack -n '__fish_spack_using_command solve' -s j -l json -d 'print concrete spec as json'
+complete -c spack -n '__fish_spack_using_command solve' -s j -l json -d 'print concrete spec as JSON'
+complete -c spack -n '__fish_spack_using_command solve' -l format -r -f -a format
+complete -c spack -n '__fish_spack_using_command solve' -l format -r -d 'print concrete spec with the specified format string'
complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -f -a 'nodes edges paths'
complete -c spack -n '__fish_spack_using_command solve' -s c -l cover -r -d 'how extensively to traverse the DAG (default: nodes)'
complete -c spack -n '__fish_spack_using_command solve' -s t -l types -f -a types
complete -c spack -n '__fish_spack_using_command solve' -s t -l types -d 'show dependency types'
-complete -c spack -n '__fish_spack_using_command solve' -l timers -f -a timers
-complete -c spack -n '__fish_spack_using_command solve' -l timers -d 'print out timers for different solve phases'
-complete -c spack -n '__fish_spack_using_command solve' -l stats -f -a stats
-complete -c spack -n '__fish_spack_using_command solve' -l stats -d 'print out statistics from clingo'
complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command solve' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command solve' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command solve' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command solve' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command solve' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command solve' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command solve' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command solve' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command solve' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack spec
-set -g __fish_spack_optspecs_spack_spec h/help l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json format= c/cover= t/types U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_spec h/help l/long L/very-long N/namespaces I/install-status no-install-status y/yaml j/json format= c/cover= t/types U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 spec' -f -k -a '(__fish_spack_specs_or_id)'
complete -c spack -n '__fish_spack_using_command spec' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command spec' -s h -l help -d 'show this help message and exit'
@@ -2719,26 +2867,28 @@ complete -c spack -n '__fish_spack_using_command spec' -s U -l fresh -f -a concr
complete -c spack -n '__fish_spack_using_command spec' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command spec' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command spec' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command spec' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command spec' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command spec' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command spec' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command spec' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command spec' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack stage
-set -g __fish_spack_optspecs_spack_stage h/help n/no-checksum deprecated p/path= U/fresh reuse reuse-deps
+set -g __fish_spack_optspecs_spack_stage h/help n/no-checksum p/path= U/fresh reuse fresh-roots deprecated
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 stage' -f -k -a '(__fish_spack_specs_or_id)'
complete -c spack -n '__fish_spack_using_command stage' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command stage' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command stage' -s n -l no-checksum -f -a no_checksum
complete -c spack -n '__fish_spack_using_command stage' -s n -l no-checksum -d 'do not use checksums to verify downloaded files (unsafe)'
-complete -c spack -n '__fish_spack_using_command stage' -l deprecated -f -a deprecated
-complete -c spack -n '__fish_spack_using_command stage' -l deprecated -d 'fetch deprecated versions without warning'
complete -c spack -n '__fish_spack_using_command stage' -s p -l path -r -f -a path
complete -c spack -n '__fish_spack_using_command stage' -s p -l path -r -d 'path to stage package, does not add to spack tree'
complete -c spack -n '__fish_spack_using_command stage' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command stage' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command stage' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command stage' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command stage' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command stage' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command stage' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command stage' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command stage' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command stage' -l deprecated -d 'allow concretizer to select deprecated versions'
# spack style
set -g __fish_spack_optspecs_spack_style h/help b/base= a/all r/root-relative U/no-untracked f/fix root= t/tool= s/skip=
@@ -2758,9 +2908,9 @@ complete -c spack -n '__fish_spack_using_command style' -s f -l fix -d 'format a
complete -c spack -n '__fish_spack_using_command style' -l root -r -f -a root
complete -c spack -n '__fish_spack_using_command style' -l root -r -d 'style check a different spack instance'
complete -c spack -n '__fish_spack_using_command style' -s t -l tool -r -f -a tool
-complete -c spack -n '__fish_spack_using_command style' -s t -l tool -r -d 'specify which tools to run (default: isort,black,flake8,mypy)'
+complete -c spack -n '__fish_spack_using_command style' -s t -l tool -r -d 'specify which tools to run (default: import, isort, black, flake8, mypy)'
complete -c spack -n '__fish_spack_using_command style' -s s -l skip -r -f -a skip
-complete -c spack -n '__fish_spack_using_command style' -s s -l skip -r -d 'specify tools to skip (choose from isort,black,flake8,mypy)'
+complete -c spack -n '__fish_spack_using_command style' -s s -l skip -r -d 'specify tools to skip (choose from import, isort, black, flake8, mypy)'
# spack tags
set -g __fish_spack_optspecs_spack_tags h/help i/installed a/all
@@ -2814,7 +2964,7 @@ complete -c spack -n '__fish_spack_using_command test run' -l help-cdash -d 'sho
complete -c spack -n '__fish_spack_using_command test run' -l clean -f -a dirty
complete -c spack -n '__fish_spack_using_command test run' -l clean -d 'unset harmful variables in the build environment (default)'
complete -c spack -n '__fish_spack_using_command test run' -l dirty -f -a dirty
-complete -c spack -n '__fish_spack_using_command test run' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command test run' -l dirty -d 'preserve user environment in spack'"'"'s build environment (danger!)'
# spack test list
set -g __fish_spack_optspecs_spack_test_list h/help a/all
@@ -2855,20 +3005,22 @@ complete -c spack -n '__fish_spack_using_command test remove' -s y -l yes-to-all
complete -c spack -n '__fish_spack_using_command test remove' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request'
# spack test-env
-set -g __fish_spack_optspecs_spack_test_env h/help clean dirty U/fresh reuse reuse-deps dump= pickle=
+set -g __fish_spack_optspecs_spack_test_env h/help clean dirty U/fresh reuse fresh-roots deprecated dump= pickle=
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 test-env' -f -a '(__fish_spack_build_env_spec)'
complete -c spack -n '__fish_spack_using_command test-env' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command test-env' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command test-env' -l clean -f -a dirty
complete -c spack -n '__fish_spack_using_command test-env' -l clean -d 'unset harmful variables in the build environment (default)'
complete -c spack -n '__fish_spack_using_command test-env' -l dirty -f -a dirty
-complete -c spack -n '__fish_spack_using_command test-env' -l dirty -d 'preserve user environment in spack\'s build environment (danger!)'
+complete -c spack -n '__fish_spack_using_command test-env' -l dirty -d 'preserve user environment in spack'"'"'s build environment (danger!)'
complete -c spack -n '__fish_spack_using_command test-env' -s U -l fresh -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command test-env' -s U -l fresh -d 'do not reuse installed deps; build newest configuration'
complete -c spack -n '__fish_spack_using_command test-env' -l reuse -f -a concretizer_reuse
complete -c spack -n '__fish_spack_using_command test-env' -l reuse -d 'reuse installed packages/buildcaches when possible'
-complete -c spack -n '__fish_spack_using_command test-env' -l reuse-deps -f -a concretizer_reuse
-complete -c spack -n '__fish_spack_using_command test-env' -l reuse-deps -d 'reuse installed dependencies only'
+complete -c spack -n '__fish_spack_using_command test-env' -l fresh-roots -l reuse-deps -f -a concretizer_reuse
+complete -c spack -n '__fish_spack_using_command test-env' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies'
+complete -c spack -n '__fish_spack_using_command test-env' -l deprecated -f -a config_deprecated
+complete -c spack -n '__fish_spack_using_command test-env' -l deprecated -d 'allow concretizer to select deprecated versions'
complete -c spack -n '__fish_spack_using_command test-env' -l dump -r -f -a dump
complete -c spack -n '__fish_spack_using_command test-env' -l dump -r -d 'dump a source-able environment to FILE'
complete -c spack -n '__fish_spack_using_command test-env' -l pickle -r -f -a pickle
@@ -2908,12 +3060,14 @@ complete -c spack -n '__fish_spack_using_command uninstall' -l origin -r -f -a o
complete -c spack -n '__fish_spack_using_command uninstall' -l origin -r -d 'only remove DB records with the specified origin'
# spack unit-test
-set -g __fish_spack_optspecs_spack_unit_test h/help H/pytest-help l/list L/list-long N/list-names extension= s/ k/= showlocals
+set -g __fish_spack_optspecs_spack_unit_test h/help H/pytest-help n/numprocesses= l/list L/list-long N/list-names extension= s/ k/= showlocals
complete -c spack -n '__fish_spack_using_command_pos_remainder 0 unit-test' -f -a '(__fish_spack_unit_tests)'
complete -c spack -n '__fish_spack_using_command unit-test' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command unit-test' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command unit-test' -s H -l pytest-help -f -a pytest_help
complete -c spack -n '__fish_spack_using_command unit-test' -s H -l pytest-help -d 'show full pytest help, with advanced options'
+complete -c spack -n '__fish_spack_using_command unit-test' -s n -l numprocesses -r -f -a numprocesses
+complete -c spack -n '__fish_spack_using_command unit-test' -s n -l numprocesses -r -d 'run tests in parallel up to this wide, default 1 for sequential'
complete -c spack -n '__fish_spack_using_command unit-test' -s l -l list -f -a list
complete -c spack -n '__fish_spack_using_command unit-test' -s l -l list -d 'list test filenames'
complete -c spack -n '__fish_spack_using_command unit-test' -s L -l list-long -f -a list
@@ -3010,14 +3164,12 @@ complete -c spack -n '__fish_spack_using_command verify' -s f -l files -f -a typ
complete -c spack -n '__fish_spack_using_command verify' -s f -l files -d 'treat entries as absolute filenames'
# spack versions
-set -g __fish_spack_optspecs_spack_versions h/help s/safe safe-only r/remote n/new j/jobs=
+set -g __fish_spack_optspecs_spack_versions h/help s/safe r/remote n/new j/jobs=
complete -c spack -n '__fish_spack_using_command_pos 0 versions' -f -a '(__fish_spack_packages)'
complete -c spack -n '__fish_spack_using_command versions' -s h -l help -f -a help
complete -c spack -n '__fish_spack_using_command versions' -s h -l help -d 'show this help message and exit'
complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -f -a safe
complete -c spack -n '__fish_spack_using_command versions' -s s -l safe -d 'only list safe versions of the package'
-complete -c spack -n '__fish_spack_using_command versions' -l safe-only -f -a safe_only
-complete -c spack -n '__fish_spack_using_command versions' -l safe-only -d '[deprecated] only list safe versions of the package'
complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -f -a remote
complete -c spack -n '__fish_spack_using_command versions' -s r -l remote -d 'only list remote versions of the package'
complete -c spack -n '__fish_spack_using_command versions' -s n -l new -f -a new
diff --git a/share/spack/templates/container/Dockerfile b/share/spack/templates/container/Dockerfile
index 2fad37affb..35dc270a22 100644
--- a/share/spack/templates/container/Dockerfile
+++ b/share/spack/templates/container/Dockerfile
@@ -4,7 +4,7 @@
{% endif %}
{% if render_phase.build %}
# Build stage with Spack pre-installed and ready to be used
-FROM {{ build.image }} as builder
+FROM {{ build.image }} AS builder
{% block build_stage %}
{% if os_packages_build %}
@@ -16,7 +16,8 @@ RUN {% if os_package_update %}{{ os_packages_build.update }} \
# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
-RUN mkdir {{ paths.environment }} \
+RUN mkdir -p {{ paths.environment }} && \
+set -o noclobber \
{{ manifest }} > {{ paths.environment }}/spack.yaml
# Install the software, remove unnecessary deps
diff --git a/share/spack/templates/container/bootstrap-base.dockerfile b/share/spack/templates/container/bootstrap-base.dockerfile
index 38de6c8849..a8310a982a 100644
--- a/share/spack/templates/container/bootstrap-base.dockerfile
+++ b/share/spack/templates/container/bootstrap-base.dockerfile
@@ -1,4 +1,4 @@
-FROM {{ bootstrap.image }} as bootstrap
+FROM {{ bootstrap.image }} AS bootstrap
{% block env_vars %}
ENV SPACK_ROOT=/opt/spack \
diff --git a/share/spack/templates/container/centos_7.dockerfile b/share/spack/templates/container/centos_7.dockerfile
deleted file mode 100644
index 2d99ecad91..0000000000
--- a/share/spack/templates/container/centos_7.dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-{% extends "container/bootstrap-base.dockerfile" %}
-{% block install_os_packages %}
-RUN yum update -y \
- && yum install -y epel-release \
- && yum update -y \
- && yum --enablerepo epel groupinstall -y "Development Tools" \
- && yum --enablerepo epel install -y \
- curl \
- findutils \
- gcc-c++ \
- gcc \
- gcc-gfortran \
- git \
- gnupg2 \
- hostname \
- hg \
- iproute \
- make \
- patch \
- python3 \
- python3-pip \
- python3-setuptools \
- unzip \
- zstd \
- && pip3 install boto3 \
- && rm -rf /var/cache/yum \
- && yum clean all
-{% endblock %}
diff --git a/share/spack/templates/container/centos_stream.dockerfile b/share/spack/templates/container/centos_stream9.dockerfile
index c11a658fc7..e62c64364f 100644
--- a/share/spack/templates/container/centos_stream.dockerfile
+++ b/share/spack/templates/container/centos_stream9.dockerfile
@@ -1,14 +1,14 @@
{% extends "container/bootstrap-base.dockerfile" %}
{% block install_os_packages %}
RUN dnf update -y \
- # See https://fedoraproject.org/wiki/EPEL#Quickstart for powertools
+ # See https://fedoraproject.org/wiki/EPEL#Quickstart for crb
&& dnf install -y dnf-plugins-core \
- && dnf config-manager --set-enabled powertools \
+ && dnf config-manager --set-enabled crb \
&& dnf install -y epel-release \
&& dnf update -y \
&& dnf --enablerepo epel groupinstall -y "Development Tools" \
&& dnf --enablerepo epel install -y \
- curl \
+ curl-minimal \
findutils \
gcc-c++ \
gcc \
diff --git a/share/spack/templates/container/fedora_38.dockerfile b/share/spack/templates/container/fedora.dockerfile
index 4856ad2197..4856ad2197 100644
--- a/share/spack/templates/container/fedora_38.dockerfile
+++ b/share/spack/templates/container/fedora.dockerfile
diff --git a/share/spack/templates/container/fedora_37.dockerfile b/share/spack/templates/container/fedora_37.dockerfile
deleted file mode 100644
index 6cea1e0cd3..0000000000
--- a/share/spack/templates/container/fedora_37.dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends "container/bootstrap-base.dockerfile" %}
-{% block install_os_packages %}
-RUN dnf update -y \
- && dnf install -y \
- bzip2 \
- curl \
- file \
- findutils \
- gcc-c++ \
- gcc \
- gcc-gfortran \
- git \
- gnupg2 \
- hg \
- hostname \
- iproute \
- make \
- patch \
- python3 \
- python3-pip \
- python3-setuptools \
- svn \
- unzip \
- zstd \
- xz \
- && pip3 install boto3 \
- && rm -rf /var/cache/dnf \
- && dnf clean all
-{% endblock %}
diff --git a/share/spack/templates/container/ubuntu_2404.dockerfile b/share/spack/templates/container/ubuntu_2404.dockerfile
new file mode 100644
index 0000000000..1cf4cfb101
--- /dev/null
+++ b/share/spack/templates/container/ubuntu_2404.dockerfile
@@ -0,0 +1,33 @@
+{% extends "container/bootstrap-base.dockerfile" %}
+{% block env_vars %}
+{{ super() }}
+ENV DEBIAN_FRONTEND=noninteractive \
+ LANGUAGE=en_US.UTF-8 \
+ LANG=en_US.UTF-8 \
+ LC_ALL=en_US.UTF-8
+{% endblock %}
+{% block install_os_packages %}
+RUN apt-get -yqq update \
+ && apt-get -yqq upgrade \
+ && apt-get -yqq install --no-install-recommends \
+ build-essential \
+ ca-certificates \
+ curl \
+ file \
+ g++ \
+ gcc \
+ gfortran \
+ git \
+ gnupg2 \
+ iproute2 \
+ locales \
+ make \
+ mercurial \
+ subversion \
+ python3 \
+ python3-boto3 \
+ unzip \
+ zstd \
+ && locale-gen en_US.UTF-8 \
+ && rm -rf /var/lib/apt/lists/*
+{% endblock %}
diff --git a/share/spack/templates/depfile/Makefile b/share/spack/templates/depfile/Makefile
index 4b76475267..cd9df1491c 100644
--- a/share/spack/templates/depfile/Makefile
+++ b/share/spack/templates/depfile/Makefile
@@ -1,4 +1,4 @@
-SPACK ?= spack -c config:install_status:false
+SPACK ?= {{ spack_script }} -c config:install_status:false
SPACK_INSTALL_FLAGS ?=
# This variable can be used to add post install hooks
diff --git a/share/spack/templates/mock-repository/package.pyt b/share/spack/templates/mock-repository/package.pyt
index 82bd50bd05..a4a52ec700 100644
--- a/share/spack/templates/mock-repository/package.pyt
+++ b/share/spack/templates/mock-repository/package.pyt
@@ -1,3 +1,5 @@
+from spack.package import *
+
class {{ cls_name }}(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/root-1.0.tar.gz"
diff --git a/share/spack/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl
index d1593b8828..b162e3f62e 100644
--- a/share/spack/templates/modules/modulefile.tcl
+++ b/share/spack/templates/modules/modulefile.tcl
@@ -4,7 +4,7 @@
## {{ spec.short_spec }}
##
{% if configure_options %}
-## Configure options: {{ configure_options }}
+## Configure options: {{ configure_options | wordwrap(8192 - 23, True, "\n## ", 0) }}
##
{% endif %}
diff --git a/var/spack/repos/builder.test/packages/builder-and-mixins/package.py b/var/spack/repos/builder.test/packages/builder-and-mixins/package.py
new file mode 100644
index 0000000000..354f1bcd1a
--- /dev/null
+++ b/var/spack/repos/builder.test/packages/builder-and-mixins/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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 spack.phase_callbacks
+from spack.build_systems import generic
+from spack.package import *
+
+
+class BuilderAndMixins(Package):
+ """This package defines a mixin for its builder"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ version("2.0", md5="abcdef0123456789abcdef0123456789")
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+
+class BuilderMixin(metaclass=spack.phase_callbacks.PhaseCallbacksMeta):
+ @run_before("install")
+ def before_install(self):
+ pass
+
+ @run_after("install")
+ def after_install(self):
+ pass
+
+
+class GenericBuilder(BuilderMixin, generic.GenericBuilder):
+ def install(self, pkg, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/7zip/package.py b/var/spack/repos/builtin.mock/packages/7zip/package.py
new file mode 100644
index 0000000000..e052e02b93
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/7zip/package.py
@@ -0,0 +1,14 @@
+# Copyright 2013-2024 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.package import *
+
+
+class _7zip(AutotoolsPackage):
+ """Simple package with a name starting with a digit"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
diff --git a/var/spack/repos/builtin.mock/packages/attributes-foo/package.py b/var/spack/repos/builtin.mock/packages/attributes-foo/package.py
index 31c88f4b08..b882fc9b65 100644
--- a/var/spack/repos/builtin.mock/packages/attributes-foo/package.py
+++ b/var/spack/repos/builtin.mock/packages/attributes-foo/package.py
@@ -44,7 +44,7 @@ class AttributesFoo(BundlePackage):
# Header provided by the bar virutal package
@property
def bar_headers(self):
- return find_headers("bar/bar", root=self.home.include, recursive=False)
+ return find_headers("bar", root=self.home.include, recursive=True)
# Libary provided by the bar virtual package
@property
@@ -59,7 +59,7 @@ class AttributesFoo(BundlePackage):
# Header provided by the baz virtual package
@property
def baz_headers(self):
- return find_headers("baz/baz", root=self.baz_home.include, recursive=False)
+ return find_headers("baz", root=self.baz_home.include, recursive=True)
# Library provided by the baz virtual package
@property
diff --git a/var/spack/repos/builtin.mock/packages/depb/package.py b/var/spack/repos/builtin.mock/packages/depb/package.py
index 7022e3472b..82661560b4 100644
--- a/var/spack/repos/builtin.mock/packages/depb/package.py
+++ b/var/spack/repos/builtin.mock/packages/depb/package.py
@@ -14,7 +14,7 @@ class Depb(AutotoolsPackage):
version("1.0", md5="0123456789abcdef0123456789abcdef")
- depends_on("b")
+ depends_on("pkg-b")
def install(self, spec, prefix):
# sanity_check_prefix requires something in the install directory
diff --git a/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py b/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py
index 5d7f5e9817..9a8646baec 100644
--- a/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py
+++ b/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py
@@ -18,3 +18,5 @@ class DependencyFooBar(Package):
variant("foo", default=True, description="")
variant("bar", default=False, description="")
+
+ depends_on("second-dependency-foo-bar-fee")
diff --git a/var/spack/repos/builtin.mock/packages/dependency-mv/package.py b/var/spack/repos/builtin.mock/packages/dependency-mv/package.py
new file mode 100644
index 0000000000..ed2cc5408a
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dependency-mv/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DependencyMv(Package):
+ """Package providing a virtual dependency and with a multivalued variant."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/foo-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ variant("cuda", default=False, description="Build with CUDA")
+ variant("cuda_arch", values=any_combination_of("10", "11"), when="+cuda")
diff --git a/var/spack/repos/builtin.mock/packages/depends-on-manyvariants/package.py b/var/spack/repos/builtin.mock/packages/depends-on-manyvariants/package.py
new file mode 100644
index 0000000000..f1314471f9
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/depends-on-manyvariants/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DependsOnManyvariants(Package):
+ """
+ A package with a dependency on `manyvariants`, so that `manyvariants` can
+ be spliced in tests.
+ """
+
+ homepage = "https://www.test.com"
+ has_code = False
+
+ version("1.0")
+ version("2.0")
+
+ depends_on("manyvariants@1.0", when="@1.0")
+ depends_on("manyvariants@2.0", when="@2.0")
+
+ def install(self, spec, prefix):
+ touch(prefix.bar)
diff --git a/var/spack/repos/builtin.mock/packages/depends-on-virtual-with-abi/package.py b/var/spack/repos/builtin.mock/packages/depends-on-virtual-with-abi/package.py
new file mode 100644
index 0000000000..9f281f337b
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/depends-on-virtual-with-abi/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DependsOnVirtualWithAbi(Package):
+ """
+ This has a virtual dependency on `virtual-with-abi`, mostly for testing
+ automatic splicing of providers.
+ """
+
+ homepage = "https://www.example.com"
+ has_code = False
+
+ version("1.0")
+ depends_on("virtual-with-abi")
diff --git a/var/spack/repos/builtin.mock/packages/deprecated-client/package.py b/var/spack/repos/builtin.mock/packages/deprecated-client/package.py
new file mode 100644
index 0000000000..9806871d81
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/deprecated-client/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DeprecatedClient(Package):
+ """A package depending on another which has deprecated versions."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/c-1.0.tar.gz"
+
+ version("1.1.0", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890")
+
+ depends_on("deprecated-versions")
diff --git a/var/spack/repos/builtin.mock/packages/deprecated-versions/package.py b/var/spack/repos/builtin.mock/packages/deprecated-versions/package.py
index 627b6e9fac..909da5c026 100644
--- a/var/spack/repos/builtin.mock/packages/deprecated-versions/package.py
+++ b/var/spack/repos/builtin.mock/packages/deprecated-versions/package.py
@@ -11,5 +11,9 @@ class DeprecatedVersions(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/c-1.0.tar.gz"
- version("1.1.0", md5="0123456789abcdef0123456789abcdef", deprecated=True)
- version("1.0.0", md5="0123456789abcdef0123456789abcdef")
+ version(
+ "1.1.0",
+ sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
+ deprecated=True,
+ )
+ version("1.0.0", sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890")
diff --git a/var/spack/repos/builtin.mock/packages/direct-dep-foo-bar/package.py b/var/spack/repos/builtin.mock/packages/direct-dep-foo-bar/package.py
new file mode 100644
index 0000000000..9f4fc5d803
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/direct-dep-foo-bar/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DirectDepFooBar(Package):
+ """This package has a variant "bar", which is False by default, and
+ variant "foo" which is True by default.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/direct-dep-foo-bar-1.0.tar.gz"
+
+ version("1.0", md5="567890abcdefg12345678900987654321")
+
+ variant("foo", default=True, description="")
+ variant("bar", default=False, description="")
+
+ depends_on("second-dependency-foo-bar-fee")
diff --git a/var/spack/repos/builtin.mock/packages/dla-future/package.py b/var/spack/repos/builtin.mock/packages/dla-future/package.py
new file mode 100644
index 0000000000..03a22544de
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dla-future/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class DlaFuture(Package):
+ """A package that depends on 3 different virtuals, that might or might not be provided
+ by the same node.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dla-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("scalapack")
diff --git a/var/spack/repos/builtin.mock/packages/dtbuild1/package.py b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py
index 0f9c6e2e99..cb83bbc9f1 100644
--- a/var/spack/repos/builtin.mock/packages/dtbuild1/package.py
+++ b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py
@@ -16,6 +16,6 @@ class Dtbuild1(Package):
version("1.0", md5="0123456789abcdef0123456789abcdef")
version("0.5", md5="fedcba9876543210fedcba9876543210")
- depends_on("dtbuild2", type="build")
+ depends_on("vdtbuild2", type="build")
depends_on("dtlink2")
depends_on("dtrun2", type="run")
diff --git a/var/spack/repos/builtin.mock/packages/dtbuild2/package.py b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py
index 7aae2109ce..59316434f8 100644
--- a/var/spack/repos/builtin.mock/packages/dtbuild2/package.py
+++ b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py
@@ -13,3 +13,5 @@ class Dtbuild2(Package):
url = "http://www.example.com/dtbuild2-1.0.tar.gz"
version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ provides("vdtbuild2")
diff --git a/var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py b/var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py
index 1ec1561a67..28421bad1a 100644
--- a/var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py
+++ b/var/spack/repos/builtin.mock/packages/external-buildable-with-variant/package.py
@@ -15,4 +15,4 @@ class ExternalBuildableWithVariant(Package):
variant("baz", default=False, description="nope")
- depends_on("c@1.0", when="@0.9")
+ depends_on("pkg-c@1.0", when="@0.9")
diff --git a/var/spack/repos/builtin.mock/packages/fail-test-audit-deprecated/package.py b/var/spack/repos/builtin.mock/packages/fail-test-audit-deprecated/package.py
new file mode 100644
index 0000000000..7c4181b7b7
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/fail-test-audit-deprecated/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class FailTestAuditDeprecated(MakefilePackage):
+ """Simple package attempting to implement and use deprecated stand-alone test methods."""
+
+ homepage = "http://github.com/dummy/fail-test-audit-deprecated"
+ url = "https://github.com/dummy/fail-test-audit-deprecated/archive/v1.0.tar.gz"
+
+ version("2.0", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
+ version("1.0", sha256="abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234")
+
+ @run_after("install")
+ def copy_test_files(self):
+ """test that uses the deprecated install_test_root method"""
+ self.cache_extra_test_sources(".")
+
+ def test(self):
+ """this is a deprecated reserved method for stand-alone testing"""
+ pass
+
+ def test_use_install_test_root(self):
+ """use the deprecated install_test_root method"""
+ print(f"install test root = {self.install_test_root()}")
+
+ def test_run_test(self):
+ """use the deprecated run_test method"""
+ self.run_test("which", ["make"])
diff --git a/var/spack/repos/builtin.mock/packages/fail-test-audit-docstring/package.py b/var/spack/repos/builtin.mock/packages/fail-test-audit-docstring/package.py
new file mode 100644
index 0000000000..3f0da784ae
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/fail-test-audit-docstring/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class FailTestAuditDocstring(MakefilePackage):
+ """Simple package with a stand-alone test that is missing its docstring."""
+
+ homepage = "http://github.com/dummy/fail-test-audit-docstring"
+ url = "https://github.com/dummy/fail-test-audit-docstring/archive/v1.0.tar.gz"
+
+ version("2.0", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
+ version("1.0", sha256="abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234")
+
+ # The required docstring is missing.
+ def test_missing_docstring(self):
+ print("Ran test_missing_docstring")
+
+ # The required docstring is effectively empty.
+ def test_empty_docstring(self):
+ """ """
+ print("Ran test_empty_docstring")
diff --git a/var/spack/repos/builtin.mock/packages/fail-test-audit-impl/package.py b/var/spack/repos/builtin.mock/packages/fail-test-audit-impl/package.py
new file mode 100644
index 0000000000..886f426706
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/fail-test-audit-impl/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class FailTestAuditImpl(MakefilePackage):
+ """Simple package that is missing the stand-alone test implementation."""
+
+ homepage = "http://github.com/dummy/fail-test-audit-impl"
+ url = "https://github.com/dummy/fail-test-audit-impl/archive/v1.0.tar.gz"
+
+ version("2.0", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
+ version("1.0", sha256="abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234")
+
+ # The test method has not been implemented.
+ def test_no_impl(self):
+ """test sans implementation"""
+ # this comment should not matter
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/fail-test-audit/package.py b/var/spack/repos/builtin.mock/packages/fail-test-audit/package.py
index 54b63ed79b..dd94c37427 100644
--- a/var/spack/repos/builtin.mock/packages/fail-test-audit/package.py
+++ b/var/spack/repos/builtin.mock/packages/fail-test-audit/package.py
@@ -6,16 +6,17 @@ from spack.package import *
class FailTestAudit(MakefilePackage):
- """Simple package with one optional dependency"""
+ """Simple package attempting to re-use stand-alone test method as a build check."""
- homepage = "http://www.example.com"
- url = "http://www.example.com/a-1.0.tar.gz"
+ homepage = "http://github.com/dummy/fail-test-audit"
+ url = "https://github.com/dummy/fail-test-audit/archive/v1.0.tar.gz"
- version("1.0", md5="0123456789abcdef0123456789abcdef")
- version("2.0", md5="abcdef0123456789abcdef0123456789")
+ version("2.0", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
+ version("1.0", sha256="abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234")
+ # Stand-alone test methods cannot be included in build_time_test_callbacks
build_time_test_callbacks = ["test_build_callbacks"]
def test_build_callbacks(self):
- """test build time test callbacks"""
- print("test-build-callbacks")
+ """test build time test callbacks failure"""
+ print("test_build_callbacks")
diff --git a/var/spack/repos/builtin.mock/packages/find-externals1/package.py b/var/spack/repos/builtin.mock/packages/find-externals1/package.py
index 2a82fad9b5..d6ddb320f9 100644
--- a/var/spack/repos/builtin.mock/packages/find-externals1/package.py
+++ b/var/spack/repos/builtin.mock/packages/find-externals1/package.py
@@ -5,7 +5,6 @@
import os
import re
-import spack.package_base
from spack.package import *
@@ -17,15 +16,19 @@ class FindExternals1(AutotoolsPackage):
version("1.0", md5="abcdef1234567890abcdef1234567890")
@classmethod
+ def determine_version(cls, exe):
+ return "1.0"
+
+ @classmethod
def determine_spec_details(cls, prefix, exes_in_prefix):
exe_to_path = dict((os.path.basename(p), p) for p in exes_in_prefix)
exes = [x for x in exe_to_path.keys() if "find-externals1-exe" in x]
if not exes:
return
- exe = spack.util.executable.Executable(exe_to_path[exes[0]])
+ exe = Executable(exe_to_path[exes[0]])
output = exe("--version", output=str)
if output:
match = re.search(r"find-externals1.*version\s+(\S+)", output)
if match:
version_str = match.group(1)
- return Spec.from_detection("find-externals1@{0}".format(version_str))
+ return Spec.from_detection(f"find-externals1@{version_str}", external_path=prefix)
diff --git a/var/spack/repos/builtin.mock/packages/forward-multi-value/package.py b/var/spack/repos/builtin.mock/packages/forward-multi-value/package.py
new file mode 100644
index 0000000000..1bdd696c4e
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/forward-multi-value/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ForwardMultiValue(Package):
+ """A package that forwards the value of a multi-valued variant to a dependency"""
+
+ homepage = "http://www.llnl.gov"
+ url = "http://www.llnl.gov/mpileaks-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ variant("cuda", default=False, description="Build with CUDA")
+ variant("cuda_arch", values=any_combination_of("10", "11"), when="+cuda")
+
+ depends_on("dependency-mv")
+
+ requires("^dependency-mv cuda_arch=10", when="+cuda cuda_arch=10 ^dependency-mv+cuda")
+ requires("^dependency-mv cuda_arch=11", when="+cuda cuda_arch=11 ^dependency-mv+cuda")
diff --git a/var/spack/repos/builtin.mock/packages/gcc/package.py b/var/spack/repos/builtin.mock/packages/gcc/package.py
index 31f7c95b53..fa2b0309ff 100644
--- a/var/spack/repos/builtin.mock/packages/gcc/package.py
+++ b/var/spack/repos/builtin.mock/packages/gcc/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Gcc(Package):
+class Gcc(CompilerPackage, Package):
"""Simple compiler package."""
homepage = "http://www.example.com"
@@ -16,8 +16,24 @@ class Gcc(Package):
version("2.0", md5="abcdef0123456789abcdef0123456789")
version("3.0", md5="def0123456789abcdef0123456789abc")
+ variant(
+ "languages",
+ default="c,c++,fortran",
+ values=("c", "c++", "fortran"),
+ multi=True,
+ description="Compilers and runtime libraries to build",
+ )
+
depends_on("conflict", when="@3.0")
+ c_names = ["gcc"]
+ cxx_names = ["g++"]
+ fortran_names = ["gfortran"]
+ compiler_prefixes = [r"\w+-\w+-\w+-"]
+ compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"]
+ compiler_version_regex = r"(?<!clang version)\s?([0-9.]+)"
+ compiler_version_argument = ("-dumpfullversion", "-dumpversion")
+
def install(self, spec, prefix):
# Create the minimal compiler that will fool `spack compiler find`
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin.mock/packages/git-ref-package/package.py b/var/spack/repos/builtin.mock/packages/git-ref-package/package.py
new file mode 100644
index 0000000000..21fe10e818
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/git-ref-package/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GitRefPackage(AutotoolsPackage):
+ """
+ dummy package copied from zlib-ng
+ """
+
+ homepage = "https://github.com/dummy/dummy"
+ url = "https://github.com/dummy/dummy/archive/2.0.0.tar.gz"
+ git = "https://github.com/dummy/dummy.git"
+
+ version("2.1.6", sha256="a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2")
+ version("2.1.5", sha256="3f6576971397b379d4205ae5451ff5a68edf6c103b2f03c4188ed7075fbb5f04")
+ version("2.1.4", sha256="a0293475e6a44a3f6c045229fe50f69dc0eebc62a42405a51f19d46a5541e77a")
+ version(
+ "2.1.3",
+ sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a",
+ deprecated=True,
+ )
+ version(
+ "2.1.2",
+ sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33",
+ deprecated=True,
+ )
+ version("2.0.7", sha256="6c0853bb27738b811f2b4d4af095323c3d5ce36ceed6b50e5f773204fb8f7200")
+ version("2.0.0", sha256="86993903527d9b12fc543335c19c1d33a93797b3d4d37648b5addae83679ecd8")
+
+ variant("compat", default=True, description="Enable compatibility API")
+ variant("opt", default=True, description="Enable optimizations")
+ variant("shared", default=True, description="Build shared library")
+ variant("pic", default=True, description="Enable position-independent code (PIC)")
+
+ conflicts("+shared~pic")
+
+ variant("new_strategies", default=True, description="Enable new deflate strategies")
diff --git a/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py b/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py
new file mode 100644
index 0000000000..b37aba8660
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/git-sparsepaths-pkg/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GitSparsepathsPkg(Package):
+ """Mock package with git_sparse_paths attribute"""
+
+ homepage = "http://www.git-fetch-example.com"
+ git = "https://a/really.com/big/repo.git"
+
+ version("1.0", tag="v1.0")
+
+ git_sparse_paths = ["foo", "bar", "bing/bang"]
diff --git a/var/spack/repos/builtin.mock/packages/glibc/package.py b/var/spack/repos/builtin.mock/packages/glibc/package.py
new file mode 100644
index 0000000000..17c5087dc7
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/glibc/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Glibc(AutotoolsPackage, GNUMirrorPackage):
+ """The GNU C Library provides many of the low-level components used
+ directly by programs written in the C or C++ languages.
+ """
+
+ homepage = "https://www.gnu.org/software/libc/"
+ gnu_mirror_path = "libc/glibc-2.33.tar.gz"
+ git = "https://sourceware.org/git/glibc.git"
+
+ tags = ["runtime"]
+
+ provides("libc")
+
+ version("2.39", sha256="97f84f3b7588cd54093a6f6389b0c1a81e70d99708d74963a2e3eab7c7dc942d")
diff --git a/var/spack/repos/builtin.mock/packages/gmake/package.py b/var/spack/repos/builtin.mock/packages/gmake/package.py
index 5fc2748dee..4ab856a3ad 100644
--- a/var/spack/repos/builtin.mock/packages/gmake/package.py
+++ b/var/spack/repos/builtin.mock/packages/gmake/package.py
@@ -13,6 +13,7 @@ class Gmake(Package):
url = "https://ftpmirror.gnu.org/make/make-4.4.tar.gz"
version("4.4", sha256="ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed")
+ version("3.0", sha256="ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed")
def do_stage(self):
mkdirp(self.stage.source_path)
diff --git a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
index f7c7dd67e5..892a09f7dc 100644
--- a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
+++ b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
@@ -8,7 +8,7 @@ import sys
from spack.package import *
-class IntelOneapiCompilers(Package):
+class IntelOneapiCompilers(Package, CompilerPackage):
"""Simple compiler package."""
homepage = "http://www.example.com"
@@ -18,6 +18,15 @@ class IntelOneapiCompilers(Package):
version("2.0", md5="abcdef0123456789abcdef0123456789")
version("3.0", md5="def0123456789abcdef0123456789abc")
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["icx"]
+ cxx_names = ["icpx"]
+ fortran_names = ["ifx"]
+ compiler_version_argument = "--version"
+ compiler_version_regex = (
+ r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
+ )
+
@property
def compiler_search_prefix(self):
return self.prefix.foo.bar.baz.bin
@@ -28,9 +37,9 @@ class IntelOneapiCompilers(Package):
comp = self.compiler_search_prefix.icx
if sys.platform == "win32":
comp = comp + ".bat"
- comp_string = "@echo off\necho oneAPI DPC++ Compiler %s" % str(spec.version)
+ comp_string = f"@echo off\necho oneAPI DPC++ Compiler {str(spec.version)}"
else:
- comp_string = '#!/bin/bash\necho "oneAPI DPC++ Compiler %s"' % str(spec.version)
+ comp_string = f'#!/bin/bash\necho "oneAPI DPC++ Compiler {str(spec.version)}"'
with open(comp, "w") as f:
f.write(comp_string)
set_executable(comp)
diff --git a/var/spack/repos/builtin.mock/packages/invalid-github-pull-commits-patch-url/package.py b/var/spack/repos/builtin.mock/packages/invalid-github-pull-commits-patch-url/package.py
new file mode 100644
index 0000000000..6038864c37
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/invalid-github-pull-commits-patch-url/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class InvalidGithubPullCommitsPatchUrl(Package):
+ """Package that has a GitHub pull request commit patch URL that fails auditing."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/patch-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ patch(
+ "https://github.com/spack/spack/pull/1/commits/b4da28f71e2cef84c6e289afe89aa4bdf7936048.patch?full_index=1",
+ sha256="eae9035b832792549fac00680db5f180a88ff79feb7d7a535b4fd71f9d885e73",
+ )
diff --git a/var/spack/repos/builtin.mock/packages/llvm/package.py b/var/spack/repos/builtin.mock/packages/llvm/package.py
new file mode 100644
index 0000000000..135ae5ebfa
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/llvm/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Llvm(Package, CompilerPackage):
+ """Simple compiler package."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/gcc-1.0.tar.gz"
+
+ version("18.1.8", md5="0123456789abcdef0123456789abcdef")
+
+ variant(
+ "clang", default=True, description="Build the LLVM C/C++/Objective-C compiler frontend"
+ )
+
+ c_names = ["clang"]
+ cxx_names = ["clang++"]
+ fortran_names = ["flang"]
+
+ def install(self, spec, prefix):
+ # Create the minimal compiler that will fool `spack compiler find`
+ mkdirp(prefix.bin)
+ with open(prefix.bin.gcc, "w") as f:
+ f.write('#!/bin/bash\necho "%s"' % str(spec.version))
+ set_executable(prefix.bin.gcc)
diff --git a/var/spack/repos/builtin.mock/packages/manyvariants/package.py b/var/spack/repos/builtin.mock/packages/manyvariants/package.py
new file mode 100644
index 0000000000..4747fab53f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/manyvariants/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Manyvariants(Package):
+ """
+ A package with 4 different variants of different arities to test the
+ `match_variants` argument to `can_splice`
+ """
+
+ homepage = "https://www.test.com"
+ has_code = False
+
+ version("2.0.1")
+ version("2.0.0")
+ version("1.0.1")
+ version("1.0.0")
+
+ variant("a", default=True)
+ variant("b", default=False)
+ variant("c", values=("v1", "v2", "v3"), multi=False, default="v1")
+ variant("d", values=("v1", "v2", "v3"), multi=False, default="v1")
+
+ can_splice("manyvariants@1.0.0", when="@1.0.1", match_variants="*")
+ can_splice("manyvariants@2.0.0+a~b", when="@2.0.1~a+b", match_variants=["c", "d"])
+ can_splice("manyvariants@2.0.0 c=v1 d=v1", when="@2.0.1+a+b")
+
+ def install(self, spec, prefix):
+ touch(prefix.bar)
diff --git a/var/spack/repos/builtin.mock/packages/missing-dependency/package.py b/var/spack/repos/builtin.mock/packages/missing-dependency/package.py
index 043ab79813..630e32927f 100644
--- a/var/spack/repos/builtin.mock/packages/missing-dependency/package.py
+++ b/var/spack/repos/builtin.mock/packages/missing-dependency/package.py
@@ -18,4 +18,4 @@ class MissingDependency(Package):
depends_on("this-is-a-missing-dependency")
# this one is a "real" mock dependency
- depends_on("a")
+ depends_on("pkg-a")
diff --git a/var/spack/repos/builtin.mock/packages/mpich/package.py b/var/spack/repos/builtin.mock/packages/mpich/package.py
index 08338033a9..4c87d6932f 100644
--- a/var/spack/repos/builtin.mock/packages/mpich/package.py
+++ b/var/spack/repos/builtin.mock/packages/mpich/package.py
@@ -16,6 +16,7 @@ class Mpich(Package):
variant("debug", default=False, description="Compile MPICH with debug flags.")
+ version("main", branch="main", git="https://github.com/pmodels/mpich")
version("3.0.4", md5="9c5d5d4fe1e17dd12153f40bc5b6dbc0")
version("3.0.3", md5="0123456789abcdef0123456789abcdef")
version("3.0.2", md5="0123456789abcdef0123456789abcdef")
diff --git a/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py b/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py
index 1921cfd810..70ab8306a3 100644
--- a/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py
+++ b/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py
@@ -40,5 +40,5 @@ class MultivalueVariant(Package):
depends_on("mpi")
depends_on("callpath")
- depends_on("a")
- depends_on("a@1.0", when="fee=barbaz")
+ depends_on("pkg-a")
+ depends_on("pkg-a@1.0", when="fee=barbaz")
diff --git a/var/spack/repos/builtin.mock/packages/no-redistribute-dependent/package.py b/var/spack/repos/builtin.mock/packages/no-redistribute-dependent/package.py
new file mode 100644
index 0000000000..a362b84ab8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/no-redistribute-dependent/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NoRedistributeDependent(AutotoolsPackage):
+ """Package with one dependency on a package that should not be
+ redistributed"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/no-redistribute-dependent-1.0.tar.gz"
+
+ version("1.0", "0123456789abcdef0123456789abcdef")
+
+ depends_on("no-redistribute")
+
+ def install(self, spec, prefix):
+ # sanity_check_prefix requires something in the install directory
+ # Test requires overriding the one provided by `AutotoolsPackage`
+ mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin.mock/packages/no-redistribute/package.py b/var/spack/repos/builtin.mock/packages/no-redistribute/package.py
new file mode 100644
index 0000000000..b9dfd5fae3
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/no-redistribute/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NoRedistribute(Package):
+ """Package which has source code that should not be added to a public
+ mirror"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/no-redistribute-1.0.tar.gz"
+
+ redistribute(source=False, binary=False)
+
+ version("1.0", "0123456789abcdef0123456789abcdef")
+
+ def install(self, spec, prefix):
+ # sanity_check_prefix requires something in the install directory
+ # Test requires overriding the one provided by `AutotoolsPackage`
+ mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin.mock/packages/openblas/package.py b/var/spack/repos/builtin.mock/packages/openblas/package.py
index db288b9a3b..d6ecb25019 100644
--- a/var/spack/repos/builtin.mock/packages/openblas/package.py
+++ b/var/spack/repos/builtin.mock/packages/openblas/package.py
@@ -25,4 +25,6 @@ class Openblas(Package):
# To ensure test works with newer gcc versions
conflicts("%gcc@:10.1", when="@0.2.16:")
+ depends_on("perl")
+
provides("blas")
diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py
index 48fa846fdd..1e77b601f0 100644
--- a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py
+++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py
@@ -16,5 +16,5 @@ class OptionalDepTest3(Package):
variant("var", default=False)
- depends_on("a", when="~var")
- depends_on("b", when="+var")
+ depends_on("pkg-a", when="~var")
+ depends_on("pkg-b", when="+var")
diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py
index ae80765046..b7f87f490f 100644
--- a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py
+++ b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py
@@ -19,14 +19,14 @@ class OptionalDepTest(Package):
variant("f", default=False)
variant("mpi", default=False)
- depends_on("a", when="+a")
- depends_on("b", when="@1.1")
- depends_on("c", when="%intel")
- depends_on("d", when="%intel@64.1")
- depends_on("e", when="%clang@34:40")
-
- depends_on("f", when="+f")
- depends_on("g", when="^f")
- depends_on("mpi", when="^g")
+ depends_on("pkg-a", when="+a")
+ depends_on("pkg-b", when="@1.1")
+ depends_on("pkg-c", when="%intel")
+ depends_on("pkg-d", when="%intel@64.1")
+ depends_on("pkg-e", when="%clang@34:40")
+
+ depends_on("pkg-f", when="+f")
+ depends_on("pkg-g", when="^pkg-f")
+ depends_on("mpi", when="^pkg-g")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin.mock/packages/parent-foo-bar-fee/package.py b/var/spack/repos/builtin.mock/packages/parent-foo-bar-fee/package.py
new file mode 100644
index 0000000000..32636df6ab
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/parent-foo-bar-fee/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ParentFooBarFee(Package):
+ """This package has a variant "bar", which is True by default, and depends on another
+ package which has the same variant defaulting to False.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/parent-foo-bar-fee-1.0.tar.gz"
+
+ version("1.0", md5="abcdefg01234567890123abcdefghfed")
+
+ variant("foo", default=True, description="")
+ variant("bar", default=True, description="")
+ variant("fee", default=False, description="")
+
+ depends_on("dependency-foo-bar")
diff --git a/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py b/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py
index 064c574057..a03d09da2f 100644
--- a/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py
+++ b/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py
@@ -19,4 +19,5 @@ class ParentFooBar(Package):
variant("foo", default=True, description="")
variant("bar", default=True, description="")
+ depends_on("direct-dep-foo-bar")
depends_on("dependency-foo-bar")
diff --git a/var/spack/repos/builtin.mock/packages/perl/package.py b/var/spack/repos/builtin.mock/packages/perl/package.py
index 8d86dec8f3..2c3f810e03 100644
--- a/var/spack/repos/builtin.mock/packages/perl/package.py
+++ b/var/spack/repos/builtin.mock/packages/perl/package.py
@@ -14,3 +14,5 @@ class Perl(Package):
extendable = True
version("0.0.0", md5="abcdef1234567890abcdef1234567890")
+
+ variant("shared", default=True, description="Build shared libraries")
diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/pkg-a/package.py
index 3cc2144610..646172b778 100644
--- a/var/spack/repos/builtin.mock/packages/a/package.py
+++ b/var/spack/repos/builtin.mock/packages/pkg-a/package.py
@@ -6,7 +6,7 @@ import spack.build_systems.autotools
from spack.package import *
-class A(AutotoolsPackage):
+class PkgA(AutotoolsPackage):
"""Simple package with one optional dependency"""
homepage = "http://www.example.com"
@@ -25,7 +25,15 @@ class A(AutotoolsPackage):
variant("bvv", default=True, description="The good old BV variant")
- depends_on("b", when="foobar=bar")
+ variant(
+ "libs",
+ default="shared",
+ values=("shared", "static"),
+ multi=True,
+ description="Type of libraries to install",
+ )
+
+ depends_on("pkg-b", when="foobar=bar")
depends_on("test-dependency", type="test")
parallel = False
diff --git a/var/spack/repos/builtin.mock/packages/b/package.py b/var/spack/repos/builtin.mock/packages/pkg-b/package.py
index f5d212d3d4..bc20950ebc 100644
--- a/var/spack/repos/builtin.mock/packages/b/package.py
+++ b/var/spack/repos/builtin.mock/packages/pkg-b/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class B(Package):
+class PkgB(Package):
"""Simple package with no dependencies"""
homepage = "http://www.example.com"
diff --git a/var/spack/repos/builtin.mock/packages/c/package.py b/var/spack/repos/builtin.mock/packages/pkg-c/package.py
index 2e066242af..2c76f1ea51 100644
--- a/var/spack/repos/builtin.mock/packages/c/package.py
+++ b/var/spack/repos/builtin.mock/packages/pkg-c/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class C(Package):
+class PkgC(Package):
"""Simple package with no dependencies"""
homepage = "http://www.example.com"
diff --git a/var/spack/repos/builtin.mock/packages/e/package.py b/var/spack/repos/builtin.mock/packages/pkg-e/package.py
index eb0fb0e2ce..d49de9e6fb 100644
--- a/var/spack/repos/builtin.mock/packages/e/package.py
+++ b/var/spack/repos/builtin.mock/packages/pkg-e/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class E(Package):
+class PkgE(Package):
"""Simple package with no dependencies"""
homepage = "http://www.example.com"
diff --git a/var/spack/repos/builtin.mock/packages/preferred-test/package.py b/var/spack/repos/builtin.mock/packages/preferred-test/package.py
index f0d66a4c11..e63ed3016d 100644
--- a/var/spack/repos/builtin.mock/packages/preferred-test/package.py
+++ b/var/spack/repos/builtin.mock/packages/preferred-test/package.py
@@ -15,6 +15,6 @@ class PreferredTest(Package):
version("develop", git="https://github.com/LLNL/mpileaks.git")
version(
"1.0",
- sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825",
+ sha256="abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
preferred=True,
)
diff --git a/var/spack/repos/builtin.mock/packages/py-test-callback/package.py b/var/spack/repos/builtin.mock/packages/py-test-callback/package.py
index 46a16a465f..74744e0f16 100644
--- a/var/spack/repos/builtin.mock/packages/py-test-callback/package.py
+++ b/var/spack/repos/builtin.mock/packages/py-test-callback/package.py
@@ -3,7 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.builder
import spack.pkg.builtin.mock.python as mp
+from spack.build_systems._checks import BuilderWithDefaults, execute_install_time_tests
from spack.package import *
@@ -13,8 +15,11 @@ class PyTestCallback(mp.Python):
homepage = "http://www.example.com"
url = "http://www.example.com/test-callback-1.0.tar.gz"
- # TODO (post-34236): "test" -> "test_callback" once remove "test" support
- install_time_test_callbacks = ["test"]
+ #: This attribute is used in UI queries that need to know the build
+ #: system base class
+ build_system_class = "PyTestCallback"
+
+ build_system("testcallback")
version("1.0", "00000000000000000000000000000110")
version("2.0", "00000000000000000000000000000120")
@@ -22,8 +27,21 @@ class PyTestCallback(mp.Python):
def install(self, spec, prefix):
mkdirp(prefix.bin)
- # TODO (post-34236): "test" -> "test_callback" once remove "test" support
- def test(self):
- super().test()
-
+ def test_callback(self):
print("PyTestCallback test")
+
+
+@spack.builder.builder("testcallback")
+class MyBuilder(BuilderWithDefaults):
+ phases = ("install",)
+
+ #: Callback names for install-time test
+ install_time_test_callbacks = ["test_callback"]
+
+ def install(self, pkg, spec, prefix):
+ pkg.install(spec, prefix)
+
+ run_after("install")(execute_install_time_tests)
+
+ def test_callback(self):
+ self.pkg.test_callback()
diff --git a/var/spack/repos/builtin.mock/packages/python-venv/package.py b/var/spack/repos/builtin.mock/packages/python-venv/package.py
new file mode 100644
index 0000000000..741fc3c627
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/python-venv/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PythonVenv(Package):
+ """A Spack managed Python virtual environment"""
+
+ homepage = "https://docs.python.org/3/library/venv.html"
+ has_code = False
+
+ version("1.0")
+
+ extends("python")
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/quux/package.py b/var/spack/repos/builtin.mock/packages/quux/package.py
index 61ae0283c7..c1575c907d 100644
--- a/var/spack/repos/builtin.mock/packages/quux/package.py
+++ b/var/spack/repos/builtin.mock/packages/quux/package.py
@@ -142,7 +142,7 @@ const int quux_version_minor = %s;
"-o",
"libquux.dylib",
"-install_name",
- "@rpath/libcorge.dylib",
+ "@rpath/libquux.dylib",
"quux.cc.o",
"-Wl,-rpath,%s" % prefix.lib64,
"-Wl,-rpath,%s" % spec["garply"].prefix.lib64,
diff --git a/var/spack/repos/builtin.mock/packages/second-dependency-foo-bar-fee/package.py b/var/spack/repos/builtin.mock/packages/second-dependency-foo-bar-fee/package.py
new file mode 100644
index 0000000000..4439639bf0
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/second-dependency-foo-bar-fee/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class SecondDependencyFooBarFee(Package):
+ """This package has a variant "foo", which is True by default, a variant "bar" which
+ is False by default, and variant "foo" which is True by default.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/second-dependency-foo-bar-fee-1.0.tar.gz"
+
+ version("1.0", md5="2101234567890abcdefg1234567890abc")
+
+ variant("foo", default=True, description="")
+ variant("bar", default=False, description="")
+ variant("fee", default=False, description="")
diff --git a/var/spack/repos/builtin.mock/packages/sombrero/package.py b/var/spack/repos/builtin.mock/packages/sombrero/package.py
new file mode 100644
index 0000000000..452274cb9c
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/sombrero/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Sombrero(Package):
+ """Simple package with a dependency on an external spec."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/b-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+ depends_on("externaltool")
diff --git a/var/spack/repos/builtin.mock/packages/splice-depends-on-t/package.py b/var/spack/repos/builtin.mock/packages/splice-depends-on-t/package.py
new file mode 100644
index 0000000000..9f38da0daa
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/splice-depends-on-t/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class SpliceDependsOnT(Package):
+ """Package that depends on splice-t"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/splice-depends-on-t-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ depends_on("splice-t")
+
+ def install(self, spec, prefix):
+ with open(prefix.join("splice-depends-on-t"), "w") as f:
+ f.write("splice-depends-on-t: {0}".format(prefix))
+ f.write("splice-t: {0}".format(spec["splice-t"].prefix))
diff --git a/var/spack/repos/builtin.mock/packages/splice-h/package.py b/var/spack/repos/builtin.mock/packages/splice-h/package.py
index a54f1e7f7d..6f86f09f92 100644
--- a/var/spack/repos/builtin.mock/packages/splice-h/package.py
+++ b/var/spack/repos/builtin.mock/packages/splice-h/package.py
@@ -12,17 +12,24 @@ class SpliceH(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/splice-h-1.0.tar.gz"
- version("1.0", md5="0123456789abcdef0123456789abcdef")
+ version("1.0.2")
+ version("1.0.1")
+ version("1.0.0")
variant("foo", default=False, description="nope")
variant("bar", default=False, description="nope")
variant("baz", default=False, description="nope")
+ variant("compat", default=True, description="nope")
depends_on("splice-z")
depends_on("splice-z+foo", when="+foo")
provides("something")
provides("somethingelse")
+ provides("virtual-abi")
+
+ can_splice("splice-h@1.0.0 +compat", when="@1.0.1 +compat")
+ can_splice("splice-h@1.0.0:1.0.1 +compat", when="@1.0.2 +compat")
def install(self, spec, prefix):
with open(prefix.join("splice-h"), "w") as f:
diff --git a/var/spack/repos/builtin.mock/packages/splice-vt/package.py b/var/spack/repos/builtin.mock/packages/splice-vt/package.py
new file mode 100644
index 0000000000..7e470cf281
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/splice-vt/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class SpliceVt(Package):
+ """Simple package with one optional dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/splice-t-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ depends_on("somethingelse")
+ depends_on("splice-z")
+
+ def install(self, spec, prefix):
+ with open(prefix.join("splice-vt"), "w") as f:
+ f.write("splice-vt: {0}".format(prefix))
+ f.write("splice-h: {0}".format(spec["somethingelse"].prefix))
+ f.write("splice-z: {0}".format(spec["splice-z"].prefix))
diff --git a/var/spack/repos/builtin.mock/packages/splice-z/package.py b/var/spack/repos/builtin.mock/packages/splice-z/package.py
index ff73fbaa03..bac33be600 100644
--- a/var/spack/repos/builtin.mock/packages/splice-z/package.py
+++ b/var/spack/repos/builtin.mock/packages/splice-z/package.py
@@ -12,10 +12,16 @@ class SpliceZ(Package):
homepage = "http://www.example.com"
url = "http://www.example.com/splice-z-1.0.tar.gz"
- version("1.0", md5="0123456789abcdef0123456789abcdef")
+ version("1.0.2")
+ version("1.0.1")
+ version("1.0.0")
variant("foo", default=False, description="nope")
variant("bar", default=False, description="nope")
+ variant("compat", default=True, description="nope")
+
+ can_splice("splice-z@1.0.0 +compat", when="@1.0.1 +compat")
+ can_splice("splice-z@1.0.0:1.0.1 +compat", when="@1.0.2 +compat")
def install(self, spec, prefix):
with open(prefix.join("splice-z"), "w") as f:
diff --git a/var/spack/repos/builtin.mock/packages/sticky-variant-dependent/package.py b/var/spack/repos/builtin.mock/packages/sticky-variant-dependent/package.py
new file mode 100644
index 0000000000..2036a31b28
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/sticky-variant-dependent/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class StickyVariantDependent(AutotoolsPackage):
+ """Package with a sticky variant and a conflict"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ depends_on("sticky-variant")
+ conflicts("%gcc", when="^sticky-variant~allow-gcc")
diff --git a/var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py b/var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py
index bcea98c529..a34e504bab 100644
--- a/var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py
+++ b/var/spack/repos/builtin.mock/packages/test-dep-with-imposed-conditions/package.py
@@ -14,4 +14,4 @@ class TestDepWithImposedConditions(Package):
version("1.0", md5="0123456789abcdef0123456789abcdef")
- depends_on("c@1.0", type="test")
+ depends_on("pkg-c@1.0", type="test")
diff --git a/var/spack/repos/builtin.mock/packages/trivial-smoke-test/package.py b/var/spack/repos/builtin.mock/packages/trivial-smoke-test/package.py
index 9b877c5ef4..a4c3af3002 100644
--- a/var/spack/repos/builtin.mock/packages/trivial-smoke-test/package.py
+++ b/var/spack/repos/builtin.mock/packages/trivial-smoke-test/package.py
@@ -21,9 +21,9 @@ class TrivialSmokeTest(Package):
@run_before("install")
def create_extra_test_source(self):
- mkdirp(self.install_test_root)
- touch(join_path(self.install_test_root, self.test_source_filename))
+ mkdirp(install_test_root(self))
+ touch(join_path(install_test_root(self), self.test_source_filename))
@run_after("install")
def copy_test_sources(self):
- self.cache_extra_test_sources([self.test_source_filename])
+ cache_extra_test_sources(self, [self.test_source_filename])
diff --git a/var/spack/repos/builtin.mock/packages/url-list-test/package.py b/var/spack/repos/builtin.mock/packages/url-list-test/package.py
index 0beae47abc..416451293f 100644
--- a/var/spack/repos/builtin.mock/packages/url-list-test/package.py
+++ b/var/spack/repos/builtin.mock/packages/url-list-test/package.py
@@ -5,6 +5,7 @@
import spack.paths
from spack.package import *
+from spack.util.url import path_to_file_url
class UrlListTest(Package):
@@ -13,8 +14,8 @@ class UrlListTest(Package):
homepage = "http://www.url-list-example.com"
web_data_path = join_path(spack.paths.test_path, "data", "web")
- url = "file://" + web_data_path + "/foo-0.0.0.tar.gz"
- list_url = "file://" + web_data_path + "/index.html"
+ url = path_to_file_url(join_path(spack.paths.test_path, "data", "web") + "/foo-0.0.0.tar.gz")
+ list_url = path_to_file_url(join_path(spack.paths.test_path, "data", "web") + "/index.html")
list_depth = 3
version("0.0.0", md5="00000000000000000000000000000000")
diff --git a/var/spack/repos/builtin.mock/packages/variant-values-override/package.py b/var/spack/repos/builtin.mock/packages/variant-values-override/package.py
new file mode 100644
index 0000000000..253ae3829e
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/variant-values-override/package.py
@@ -0,0 +1,12 @@
+# Copyright 2013-2024 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.package import *
+from spack.pkg.builtin.mock.variant_values import VariantValues
+
+
+class VariantValuesOverride(VariantValues):
+ """Test variant value validation with multiple definitions."""
+
+ variant("v", default="baz", values=["bar", "baz"])
diff --git a/var/spack/repos/builtin.mock/packages/variant-values/package.py b/var/spack/repos/builtin.mock/packages/variant-values/package.py
new file mode 100644
index 0000000000..533cb186f5
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/variant-values/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VariantValues(Package):
+ """Test variant value validation with multiple definitions."""
+
+ homepage = "https://www.example.org"
+ url = "https://example.org/files/v3.4/cmake-3.4.3.tar.gz"
+
+ version("1.0", md5="4cb3ff35b2472aae70f542116d616e63")
+ version("2.0", md5="b2472aae70f542116d616e634cb3ff35")
+ version("3.0", md5="d616e634cb3ff35b2472aae70f542116")
+
+ variant("v", default="foo", values=["foo"], when="@1.0")
+
+ variant("v", default="foo", values=["foo", "bar"], when="@2.0")
+
+ # this overrides the prior definition entirely
+ variant("v", default="bar", values=["foo", "bar"], when="@2.0:3.0")
diff --git a/var/spack/repos/builtin.mock/packages/vendorsb/package.py b/var/spack/repos/builtin.mock/packages/vendorsb/package.py
index ebf9c92e55..4ad440a10e 100644
--- a/var/spack/repos/builtin.mock/packages/vendorsb/package.py
+++ b/var/spack/repos/builtin.mock/packages/vendorsb/package.py
@@ -15,5 +15,5 @@ class Vendorsb(Package):
version("1.1", md5="0123456789abcdef0123456789abcdef")
version("1.0", md5="0123456789abcdef0123456789abcdef")
- # b is not a dependency
- conflicts("b", when="@=1.1")
+ # pkg-b is not a dependency
+ conflicts("pkg-b", when="@=1.1")
diff --git a/var/spack/repos/builtin.mock/packages/view-dir-dir/package.py b/var/spack/repos/builtin.mock/packages/view-dir/package.py
index 545735cec5..9bc13aa639 100644
--- a/var/spack/repos/builtin.mock/packages/view-dir-dir/package.py
+++ b/var/spack/repos/builtin.mock/packages/view-dir/package.py
@@ -8,11 +8,9 @@ import os
from spack.package import *
-class ViewDirDir(Package):
- """Installs a <prefix>/bin/x where x is a dir, in contrast to view-dir-file."""
+class ViewDir(Package):
+ """Installs a <prefix>/bin/x where x is a dir, in contrast to view-file."""
- homepage = "http://www.spack.org"
- url = "http://www.spack.org/downloads/aml-1.0.tar.gz"
has_code = False
version("0.1.0")
diff --git a/var/spack/repos/builtin.mock/packages/view-dir-file/package.py b/var/spack/repos/builtin.mock/packages/view-file/package.py
index 55e94ac498..ee9f4c7134 100644
--- a/var/spack/repos/builtin.mock/packages/view-dir-file/package.py
+++ b/var/spack/repos/builtin.mock/packages/view-file/package.py
@@ -8,11 +8,9 @@ import os
from spack.package import *
-class ViewDirFile(Package):
- """Installs a <prefix>/bin/x where x is a file, in contrast to view-dir-dir"""
+class ViewFile(Package):
+ """Installs a <prefix>/bin/x where x is a file, in contrast to view-dir"""
- homepage = "http://www.spack.org"
- url = "http://www.spack.org/downloads/aml-1.0.tar.gz"
has_code = False
version("0.1.0")
diff --git a/var/spack/repos/builtin.mock/packages/view-ignore-conflict/package.py b/var/spack/repos/builtin.mock/packages/view-ignore-conflict/package.py
new file mode 100644
index 0000000000..7830d35aec
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/view-ignore-conflict/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ViewIgnoreConflict(Package):
+ """Installs a file in <prefix>/bin/x, conflicting with the file <dep>/bin/x in a view. In
+ a view, we should find this package's file, not the dependency's file."""
+
+ has_code = False
+
+ version("0.1.0")
+ depends_on("view-file")
+
+ def install(self, spec, prefix):
+ os.mkdir(os.path.join(prefix, "bin"))
+ with open(os.path.join(prefix, "bin", "x"), "wb") as f:
+ f.write(b"file")
diff --git a/var/spack/repos/builtin.mock/packages/view-resolve-conflict-middle/package.py b/var/spack/repos/builtin.mock/packages/view-resolve-conflict-middle/package.py
new file mode 100644
index 0000000000..c32762acf7
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/view-resolve-conflict-middle/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ViewResolveConflictMiddle(Package):
+ """See view-resolve-conflict-top"""
+
+ has_code = False
+
+ version("0.1.0")
+ depends_on("view-file")
+
+ def install(self, spec, prefix):
+ bottom = spec["view-file"].prefix
+ os.mkdir(os.path.join(prefix, "bin"))
+ os.symlink(os.path.join(bottom, "bin", "x"), os.path.join(prefix, "bin", "x"))
+ os.symlink(os.path.join(bottom, "bin", "x"), os.path.join(prefix, "bin", "y"))
diff --git a/var/spack/repos/builtin.mock/packages/view-resolve-conflict-top/package.py b/var/spack/repos/builtin.mock/packages/view-resolve-conflict-top/package.py
new file mode 100644
index 0000000000..22ddde633b
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/view-resolve-conflict-top/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ViewResolveConflictTop(Package):
+ """Package for testing edge cases for views, such as spec ordering and clashing files referring
+ to the same file on disk. See test_env_view_resolves_identical_file_conflicts."""
+
+ has_code = False
+
+ version("0.1.0")
+ depends_on("view-file")
+ depends_on("view-resolve-conflict-middle")
+
+ def install(self, spec, prefix):
+ middle = spec["view-resolve-conflict-middle"].prefix
+ bottom = spec["view-file"].prefix
+ os.mkdir(os.path.join(prefix, "bin"))
+ os.symlink(os.path.join(bottom, "bin", "x"), os.path.join(prefix, "bin", "x"))
+ os.symlink(os.path.join(middle, "bin", "y"), os.path.join(prefix, "bin", "y"))
diff --git a/var/spack/repos/builtin.mock/packages/view-dir-symlinked-dir/package.py b/var/spack/repos/builtin.mock/packages/view-symlinked-dir/package.py
index 249e776606..ef92e89ceb 100644
--- a/var/spack/repos/builtin.mock/packages/view-dir-symlinked-dir/package.py
+++ b/var/spack/repos/builtin.mock/packages/view-symlinked-dir/package.py
@@ -8,12 +8,10 @@ import os
from spack.package import *
-class ViewDirSymlinkedDir(Package):
+class ViewSymlinkedDir(Package):
"""Installs <prefix>/bin/x/file_in_symlinked_dir where x -> y is a symlinked dir.
- This should be mergeable with view-dir-dir, but not with view-dir-file."""
+ This should be mergeable with view-dir, but not with view-file."""
- homepage = "http://www.spack.org"
- url = "http://www.spack.org/downloads/aml-1.0.tar.gz"
has_code = False
version("0.1.0")
diff --git a/var/spack/repos/builtin.mock/packages/virtual-abi-1/package.py b/var/spack/repos/builtin.mock/packages/virtual-abi-1/package.py
new file mode 100644
index 0000000000..60a4c64f9e
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/virtual-abi-1/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VirtualAbi1(Package):
+ """
+ This package provides `virtual-with-abi` and is conditionally ABI
+ compatible with `virtual-abi-multi`
+ """
+
+ homepage = "https://www.example.com"
+ has_code = False
+
+ version("1.0")
+
+ provides("virtual-with-abi")
+
+ can_splice("virtual-abi-multi@1.0 abi=one", when="@1.0")
+
+ def install(self, spec, prefix):
+ touch(prefix.foo)
diff --git a/var/spack/repos/builtin.mock/packages/virtual-abi-2/package.py b/var/spack/repos/builtin.mock/packages/virtual-abi-2/package.py
new file mode 100644
index 0000000000..5725bf504c
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/virtual-abi-2/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VirtualAbi2(Package):
+ """
+ This package provides `virtual-with-abi` and is conditionally ABI
+ compatible with `virtual-abi-multi`
+ """
+
+ homepage = "https://www.example.com"
+ has_code = False
+
+ version("1.0")
+
+ provides("virtual-with-abi")
+
+ can_splice("virtual-abi-multi@1.0 abi=two", when="@1.0")
+
+ def install(self, spec, prefix):
+ touch(prefix.foo)
diff --git a/var/spack/repos/builtin.mock/packages/virtual-abi-multi/package.py b/var/spack/repos/builtin.mock/packages/virtual-abi-multi/package.py
new file mode 100644
index 0000000000..87cfd31544
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/virtual-abi-multi/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VirtualAbiMulti(Package):
+ """
+ This package provides `virtual-with-abi` is ABI compatible with either
+ `virtual-abi-1` or `virtual-abi-2` depending on the value of its `abi`
+ variant
+ """
+
+ homepage = "https://www.example.com"
+ has_code = False
+
+ version("1.0")
+
+ variant("abi", default="custom", multi=False, values=("one", "two", "custom"))
+
+ provides("virtual-with-abi")
+
+ can_splice("virtual-abi-1@1.0", when="@1.0 abi=one")
+ can_splice("virtual-abi-2@1.0", when="@1.0 abi=two")
+
+ def install(self, spec, prefix):
+ touch(prefix.foo)
diff --git a/var/spack/repos/builtin.mock/packages/virtual-with-abi/package.py b/var/spack/repos/builtin.mock/packages/virtual-with-abi/package.py
new file mode 100644
index 0000000000..1147efd202
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/virtual-with-abi/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VirtualWithAbi(Package):
+ """Virtual package for mocking an interface with stable ABI ."""
+
+ homepage = "https://www.abi.org/"
+ virtual = True
+
+ def test_hello(self):
+ print("Hello there!")
diff --git a/var/spack/repos/builtin.mock/packages/when-directives-false/package.py b/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
index d29d9d83a7..5f094b3da9 100644
--- a/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
+++ b/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
@@ -20,7 +20,7 @@ class WhenDirectivesFalse(Package):
when=False,
)
extends("extendee", when=False)
- depends_on("b", when=False)
+ depends_on("pkg-b", when=False)
conflicts("@1.0", when=False)
resource(
url="http://www.example.com/example-1.0-resource.tar.gz",
diff --git a/var/spack/repos/builtin.mock/packages/when-directives-true/package.py b/var/spack/repos/builtin.mock/packages/when-directives-true/package.py
index 3681b02687..83119b9124 100644
--- a/var/spack/repos/builtin.mock/packages/when-directives-true/package.py
+++ b/var/spack/repos/builtin.mock/packages/when-directives-true/package.py
@@ -20,7 +20,7 @@ class WhenDirectivesTrue(Package):
when=True,
)
extends("extendee", when=True)
- depends_on("b", when=True)
+ depends_on("pkg-b", when=True)
conflicts("@1.0", when=True)
resource(
url="http://www.example.com/example-1.0-resource.tar.gz",
diff --git a/var/spack/repos/builtin.mock/packages/with-constraint-met/package.py b/var/spack/repos/builtin.mock/packages/with-constraint-met/package.py
index a4f6e916bb..e300a0fd36 100644
--- a/var/spack/repos/builtin.mock/packages/with-constraint-met/package.py
+++ b/var/spack/repos/builtin.mock/packages/with-constraint-met/package.py
@@ -16,8 +16,8 @@ class WithConstraintMet(Package):
version("1.0", md5="0123456789abcdef0123456789abcdef")
with when("@1.0"):
- depends_on("b")
+ depends_on("pkg-b")
conflicts("%gcc", when="+foo")
- with when("@0.14: ^b@:4.0"):
- depends_on("c", when="@:15 ^b@3.8:")
+ with when("@0.14: ^pkg-b@:4.0"):
+ depends_on("pkg-c", when="@:15 ^pkg-b@3.8:")
diff --git a/var/spack/repos/builtin.mock/packages/wrong-variant-in-depends-on/package.py b/var/spack/repos/builtin.mock/packages/wrong-variant-in-depends-on/package.py
index cef5aafe47..98fb4a95c0 100644
--- a/var/spack/repos/builtin.mock/packages/wrong-variant-in-depends-on/package.py
+++ b/var/spack/repos/builtin.mock/packages/wrong-variant-in-depends-on/package.py
@@ -13,4 +13,4 @@ class WrongVariantInDependsOn(Package):
version("1.0", md5="0123456789abcdef0123456789abcdef")
- depends_on("b+doesnotexist")
+ depends_on("pkg-b+doesnotexist")
diff --git a/var/spack/repos/builtin/packages/3dtk/package.py b/var/spack/repos/builtin/packages/3dtk/package.py
index d606757286..027b7e0bd2 100644
--- a/var/spack/repos/builtin/packages/3dtk/package.py
+++ b/var/spack/repos/builtin/packages/3dtk/package.py
@@ -15,7 +15,7 @@ class _3dtk(CMakePackage):
plane extraction software, etc. Several file formats for the point clouds
are natively supported, new formats can be implemented easily."""
- homepage = "http://slam6d.sourceforge.net/"
+ homepage = "https://slam6d.sourceforge.net/"
# Repo seems to be in the process of switching to git:
# https://github.com/3DTK/3DTK
diff --git a/var/spack/repos/builtin/packages/3proxy/package.py b/var/spack/repos/builtin/packages/3proxy/package.py
index ed6f196094..38d69f2ed5 100644
--- a/var/spack/repos/builtin/packages/3proxy/package.py
+++ b/var/spack/repos/builtin/packages/3proxy/package.py
@@ -18,15 +18,17 @@ class _3proxy(MakefilePackage):
version("0.8.12", sha256="c2ad3798b4f0df06cfcc7b49f658304e451d60e4834e2705ef83ddb85a03f849")
version("0.8.11", sha256="fc4295e1a462baa61977fcc21747db7861c4e3d0dcca86cbaa3e06017e5c66c9")
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
- depends_on("m4", type="build")
+ depends_on("c", type="build")
def build(self, spec, prefix):
- make("-f", f"Makefile.{platform.system()}", f"CC={spack_cc}")
+ make("-f", f"Makefile.{platform.system()}", f"CC={spack_cc}", f"LN={spack_cc}")
def install(self, spec, prefix):
make(
- "-f", f"Makefile.{platform.system()}", f"prefix={prefix}", f"CC={spack_cc}", "install"
+ "-f",
+ f"Makefile.{platform.system()}",
+ f"prefix={prefix}",
+ f"CC={spack_cc}",
+ f"LN={spack_cc}",
+ "install",
)
diff --git a/var/spack/repos/builtin/packages/7zip/package.py b/var/spack/repos/builtin/packages/7zip/package.py
index d404510a3f..9ffc2a2d7d 100644
--- a/var/spack/repos/builtin/packages/7zip/package.py
+++ b/var/spack/repos/builtin/packages/7zip/package.py
@@ -15,7 +15,7 @@ from spack.package import *
class _7zip(SourceforgePackage, Package):
"""7-Zip is a file archiver for Windows"""
- homepage = "https://sourceforge.net/projects/sevenzip"
+ homepage = "https://sourceforge.net/projects/sevenzip/"
sourceforge_mirror_path = "sevenzip/files/7z2107-src.tar.xz"
tags = ["windows"]
@@ -25,6 +25,9 @@ class _7zip(SourceforgePackage, Package):
version("21.07", sha256="213d594407cb8efcba36610b152ca4921eda14163310b43903d13e68313e1e39")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"link_type",
default="shared",
@@ -37,7 +40,6 @@ class _7zip(SourceforgePackage, Package):
conflicts("platform=linux")
conflicts("platform=darwin")
- conflicts("platform=cray")
# TODO: Patch on WinSDK version 10.0.20348.0 when SDK is introduced to Spack
# This patch solves a known bug in that SDK version on the 7zip side
diff --git a/var/spack/repos/builtin/packages/abacus/package.py b/var/spack/repos/builtin/packages/abacus/package.py
index 68cfbfea75..c44cfb0676 100644
--- a/var/spack/repos/builtin/packages/abacus/package.py
+++ b/var/spack/repos/builtin/packages/abacus/package.py
@@ -29,6 +29,9 @@ class Abacus(MakefilePackage):
version("2.2.1", sha256="14feca1d8d1ce025d3f263b85ebfbebc1a1efff704b6490e95b07603c55c1d63")
version("2.2.0", sha256="09d4a2508d903121d29813a85791eeb3a905acbe1c5664b8a88903f8eda64b8f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Enable OpenMP support")
depends_on("elpa+openmp", when="+openmp")
@@ -43,7 +46,7 @@ class Abacus(MakefilePackage):
build_directory = "source"
def edit(self, spec, prefix):
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
inc_var = "_openmp-"
system_var = "ELPA_LIB = -L${ELPA_LIB_DIR} -lelpa_openmp -Wl, -rpath=${ELPA_LIB_DIR}"
else:
diff --git a/var/spack/repos/builtin/packages/abduco/package.py b/var/spack/repos/builtin/packages/abduco/package.py
index 21a075e0f5..dc4a1b9c3b 100644
--- a/var/spack/repos/builtin/packages/abduco/package.py
+++ b/var/spack/repos/builtin/packages/abduco/package.py
@@ -22,5 +22,7 @@ class Abduco(MakefilePackage):
version("0.5", sha256="bf22226a4488355a7001a5dabbd1e8e3b7e7645efd1519274b956fcb8bcff086")
version("0.4", sha256="bda3729df116ce41f9a087188d71d934da2693ffb1ebcf33b803055eb478bcbb")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make(f"PREFIX={prefix}", "install")
diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py
index fbd0162514..b93ab7798f 100644
--- a/var/spack/repos/builtin/packages/abinit/package.py
+++ b/var/spack/repos/builtin/packages/abinit/package.py
@@ -24,12 +24,14 @@ class Abinit(AutotoolsPackage):
programs are provided.
"""
- homepage = "https://www.abinit.org/"
- url = "https://www.abinit.org/sites/default/files/packages/abinit-8.6.3.tar.gz"
-
+ homepage = "https://abinit.github.io/abinit_web/"
+ url = "https://forge.abinit.org/abinit-10.0.9.tar.gz"
license("Apache-2.0")
maintainers("downloadico")
+ version("10.0.9", sha256="17650580295e07895f6c3c4b1f3f0fe0e0f3fea9bab5fd8ce7035b16a62f8e5e")
+ version("10.0.7", sha256="a9fc044b33861b7defd50fafd19a73eb6f225e18ae30b23bc731d9c8009c881c")
+ version("9.10.5", sha256="a9e0f0e058baa6088ea93d26ada369ccf0fe52dc9d4a865b1c38c20620148cd5")
version("9.10.3", sha256="3f2a9aebbf1fee9855a09dd687f88d2317b8b8e04f97b2628ab96fb898dce49b")
version("9.8.4", sha256="a086d5045f0093b432e6a044d5f71f7edf5a41a62d67b3677cb0751d330c564a")
version("9.8.3", sha256="de823878aea2c20098f177524fbb4b60de9b1b5971b2e835ec244dfa3724589b")
@@ -40,8 +42,10 @@ class Abinit(AutotoolsPackage):
version("8.8.2", sha256="15216703bd56a799a249a112b336d07d733627d3756487a4b1cb48ebb625c3e7")
version("8.6.3", sha256="82e8d071088ab8dc1b3a24380e30b68c544685678314df1213180b449c84ca65")
version("8.2.2", sha256="e43544a178d758b0deff3011c51ef7c957d7f2df2ce8543366d68016af9f3ea1")
- # Versions before 8.0.8b are not supported.
- version("8.0.8b", sha256="37ad5f0f215d2a36e596383cb6e54de3313842a0390ce8d6b48a423d3ee25af2")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("mpi", default=True, description="Builds with MPI support. Requires MPI2+")
variant("openmp", default=False, description="Enables OpenMP threads. Use threaded FFTW3")
@@ -126,7 +130,7 @@ class Abinit(AutotoolsPackage):
)
patch("rm_march_settings.patch", when="@:8")
- patch("rm_march_settings_v9.patch", when="@9:")
+ patch("rm_march_settings_v9.patch", when="@9")
# Fix detection of Fujitsu compiler
# Fix configure not to collect the option that causes an error
@@ -141,12 +145,12 @@ class Abinit(AutotoolsPackage):
options += self.with_or_without("libxml2")
oapp = options.append
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp(f"--enable-optim={self.spec.variants['optimization-flavor'].value}")
else:
oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}")
- if "+wannier90" in spec:
+ if spec.satisfies("+wannier90"):
if spec.satisfies("@:8"):
oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm")
oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}")
@@ -164,64 +168,72 @@ class Abinit(AutotoolsPackage):
options.extend(
[
f"WANNIER90_CPPFLAGS=-I{spec['wannier90'].prefix.modules}",
- f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib}"
+ f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib}",
"WANNIER90_LDFLAGS=-lwannier",
]
)
else:
- if "@:9.8" in spec:
+ if spec.satisfies("@:9.8"):
oapp(f"--with-fftw={spec['fftw-api'].prefix}")
oapp(f"--with-hdf5={spec['hdf5'].prefix}")
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp("--with-dft-flavor=atompaw+libxc")
else:
"--without-wannier90",
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
oapp(f"CC={spec['mpi'].mpicc}")
oapp(f"CXX={spec['mpi'].mpicxx}")
+ oapp(f"FC={spec['mpi'].mpifc}")
if spec.satisfies("@9.8:"):
oapp(f"F90={spec['mpi'].mpifc}")
- else:
- oapp(f"FC={spec['mpi'].mpifc}")
# MPI version:
# let the configure script auto-detect MPI support from mpi_prefix
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp("--enable-mpi=yes")
else:
oapp("--with-mpi")
else:
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp("--enable-mpi=no")
else:
oapp("--without-mpi")
# Activate OpenMP in Abinit Fortran code.
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
oapp("--enable-openmp=yes")
else:
oapp("--enable-openmp=no")
# BLAS/LAPACK/SCALAPACK-ELPA
linalg = spec["lapack"].libs + spec["blas"].libs
+
+ # linalg_flavor is selected using the virtual lapack provider
is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES
+
+ # These *must* be elifs, otherwise spack's lapack provider is ignored
+ # linalg_flavor ends up as "custom", which is not supported by abinit@9.10.3:
if is_using_intel_libraries:
linalg_flavor = "mkl"
- elif "@9:" in spec and "^openblas" in spec:
- linalg_flavor = "openblas"
- elif "@9:" in spec and "^fujitsu-ssl2" in spec:
+ # Else, if spack's virtual "lapack" provider is openblas, use it:
+ elif spec.satisfies("@9:") and (
+ spec["lapack"].name == "openblas" or spec.satisfies("^fujitsu-ssl2")
+ ):
linalg_flavor = "openblas"
else:
+ # If you need to force custom (and not have it as fallback, like now)
+ # you should likely implement a variant to force it, but it seems that
+ # newer versions do not have it, so it should likely be a fallback:
linalg_flavor = "custom"
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
linalg = spec["scalapack"].libs + linalg
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
linalg_flavor = f"scalapack+{linalg_flavor}"
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp(f"--with-linalg-libs={linalg.ld_flags}")
else:
oapp(f"LINALG_LIBS={linalg.ld_flags}")
@@ -231,14 +243,14 @@ class Abinit(AutotoolsPackage):
if is_using_intel_libraries:
fftflavor = "dfti"
else:
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
fftflavor, fftlibs = "fftw3-threads", "-lfftw3_omp -lfftw3 -lfftw3f"
else:
fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f"
oapp(f"--with-fft-flavor={fftflavor}")
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
if is_using_intel_libraries:
oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}")
oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}")
@@ -267,7 +279,7 @@ class Abinit(AutotoolsPackage):
# LibXC library
libxc = spec["libxc:fortran"]
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
options.extend(
[
f"--with-libxc-incs={libxc.headers.cpp_flags}",
@@ -281,7 +293,7 @@ class Abinit(AutotoolsPackage):
hdf5 = spec["hdf5:hl"]
netcdfc = spec["netcdf-c"]
netcdff = spec["netcdf-fortran:shared"]
- if "@:8" in spec:
+ if spec.satisfies("@:8"):
oapp("--with-trio-flavor=netcdf")
# Since version 8, Abinit started to use netcdf4 + hdf5 and we have
# to link with the high level HDF5 library
@@ -314,10 +326,20 @@ class Abinit(AutotoolsPackage):
# 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:
+ if self.spec.satisfies("~mpi"):
make("tests_in")
+ # Abinit assumes the *old* behavior of HDF5 where the library flags to link
+ # to the library were stored in the lib/libhdf5.settings file.
+ # Spack already knows how to link to HDF5, disable this check in configure
+ def patch(self):
+ filter_file(
+ r"sd_hdf5_libs_extra=.*",
+ "sd_hdf5_libs_extra=%s" % self.spec["hdf5"].libs.ld_flags,
+ "configure",
+ )
+
def install(self, spec, prefix):
make("install")
- if "+install-tests" in spec:
+ if spec.satisfies("+install-tests"):
install_tree("tests", spec.prefix.tests)
diff --git a/var/spack/repos/builtin/packages/abseil-cpp/package.py b/var/spack/repos/builtin/packages/abseil-cpp/package.py
index 1bc0955a0f..f099c8f7bb 100644
--- a/var/spack/repos/builtin/packages/abseil-cpp/package.py
+++ b/var/spack/repos/builtin/packages/abseil-cpp/package.py
@@ -15,9 +15,18 @@ class AbseilCpp(CMakePackage):
maintainers("jcftang")
tags = ["windows"]
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
version(
+ "20240722.0", sha256="f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3"
+ )
+ version(
+ "20240116.2", sha256="733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc"
+ )
+ version(
+ "20240116.1", sha256="3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a"
+ )
+ version(
"20230802.1", sha256="987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed"
)
version(
@@ -60,6 +69,15 @@ class AbseilCpp(CMakePackage):
version("20181200", sha256="e2b53bfb685f5d4130b84c4f3050c81bf48c497614dc85d91dbd3ed9129bce6d")
version("20180600", sha256="794d483dd9a19c43dc1fbbe284ce8956eb7f2600ef350dac4c602f9b4eb26e90")
+ depends_on("cxx", type="build") # generated
+
+ # Avoid export of testonly target absl::test_allocator in CMake builds
+ patch(
+ "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5.patch?full_index=1",
+ sha256="14ad7abbc20b10d57e00d0940e8338f69fd69f58d8285214848998e8687688cc",
+ when="@20240116",
+ )
+
variant("shared", default=True, description="Build shared instead of static libraries")
conflicts("+shared", when="@:20190808")
@@ -71,13 +89,20 @@ class AbseilCpp(CMakePackage):
description="C++ standard used during compilation",
)
- depends_on("cmake@3.10:", when="@2023:", type="build")
- depends_on("cmake@3.5:", when="@2019:", type="build")
+ depends_on("cmake@3.16:", when="@20240722:", type="build")
+ depends_on("cmake@3.10:", when="@20220907:", type="build")
+ depends_on("cmake@3.5:", when="@20190312:", type="build")
depends_on("cmake@3.1:", type="build")
+ depends_on("googletest", type="build", when="@20220623:")
+
def cmake_args(self):
+ run_tests = self.run_tests and self.spec.satisfies("@20220623:")
return [
- self.define("BUILD_TESTING", False),
+ self.define("BUILD_TESTING", run_tests),
+ self.define("ABSL_BUILD_TESTING", run_tests),
+ self.define("ABSL_USE_EXTERNAL_GOOGLETEST", run_tests),
+ self.define("ABSL_FIND_GOOGLETEST", run_tests),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
]
diff --git a/var/spack/repos/builtin/packages/abyss/package.py b/var/spack/repos/builtin/packages/abyss/package.py
index ec7af42fad..5d52353b10 100644
--- a/var/spack/repos/builtin/packages/abyss/package.py
+++ b/var/spack/repos/builtin/packages/abyss/package.py
@@ -27,6 +27,7 @@ class Abyss(AutotoolsPackage):
homepage = "https://www.bcgsc.ca/platform/bioinfo/software/abyss"
url = "https://github.com/bcgsc/abyss/releases/download/2.3.1/abyss-2.3.1.tar.gz"
+ version("2.3.7", sha256="ba37780e79ec3aa359b6003e383caef13479a87f4d0022af01b86398f9ffca1f")
version("2.3.5", sha256="5455f7708531681ee15ec4fd5620526a53c86d28f959e630dc495f526b7d40f7")
version("2.3.1", sha256="664045e7903e9732411effc38edb9ebb1a0c1b7636c64b3a14a681f465f43677")
version("2.3.0", sha256="3df923b0699187fb27948cae43293eeb5745161d5dc484b9befbe2ca8efb6ad7")
@@ -35,6 +36,9 @@ class Abyss(AutotoolsPackage):
version("2.0.2", sha256="d87b76edeac3a6fb48f24a1d63f243d8278a324c9a5eb29027b640f7089422df")
version("1.5.2", sha256="8a52387f963afb7b63db4c9b81c053ed83956ea0a3981edcad554a895adf84b1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"maxk", default=128, values=is_multiple_32, description="set the maximum k-mer length."
)
diff --git a/var/spack/repos/builtin/packages/accfft/package.py b/var/spack/repos/builtin/packages/accfft/package.py
index d3a4b91c03..45ffad796c 100644
--- a/var/spack/repos/builtin/packages/accfft/package.py
+++ b/var/spack/repos/builtin/packages/accfft/package.py
@@ -18,6 +18,8 @@ class Accfft(CMakePackage, CudaPackage):
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("pnetcdf", default=True, description="Add support for parallel NetCDF")
variant("shared", default=True, description="Enables the build of shared libraries")
@@ -40,7 +42,7 @@ class Accfft(CMakePackage, CudaPackage):
self.define("BUILD_SHARED", str(spec.satisfies("+shared")).lower()),
]
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch = [x for x in spec.variants["cuda_arch"].value if x]
if cuda_arch:
args.append(f"-DCUDA_NVCC_FLAGS={' '.join(self.cuda_flags(cuda_arch))}")
diff --git a/var/spack/repos/builtin/packages/acct/package.py b/var/spack/repos/builtin/packages/acct/package.py
index 2f0181bd08..906f9b34f3 100644
--- a/var/spack/repos/builtin/packages/acct/package.py
+++ b/var/spack/repos/builtin/packages/acct/package.py
@@ -18,6 +18,9 @@ class Acct(AutotoolsPackage):
version("6.6.3", sha256="5eae79323bf1ce403704d2b70483c46e7c853276ee7b5ad561ec3ccae9fca093")
version("6.6.2", sha256="8ed47b2f893b08f0d67720880adbb48b835a826c314fa52fd52af1cee6870101")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/accumulo/package.py b/var/spack/repos/builtin/packages/accumulo/package.py
index dea471e673..6b1a915271 100644
--- a/var/spack/repos/builtin/packages/accumulo/package.py
+++ b/var/spack/repos/builtin/packages/accumulo/package.py
@@ -21,5 +21,8 @@ class Accumulo(MavenPackage):
version("1.9.3", sha256="d9548d5b9cf9f494f027f0fe59d5d6d45d09064359d7761cade62991ce2a5d0c")
version("1.9.2", sha256="11ab028143ad6313cd5fc701b36b4c35e46a4a3fa2ce663869860b9f6bf5ee4d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("java@8:", type=("build", "run"))
depends_on("maven@3.5.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/ace/package.py b/var/spack/repos/builtin/packages/ace/package.py
index 3ca7cbf6d1..89a2158420 100644
--- a/var/spack/repos/builtin/packages/ace/package.py
+++ b/var/spack/repos/builtin/packages/ace/package.py
@@ -18,12 +18,17 @@ class Ace(MakefilePackage):
license("DOC")
+ version("7.1.4", sha256="a2bc358401178dd8175f4d826e60d23d901bfe38bc2fa0ac9275d01d7fda34bc")
+ version("7.1.3", sha256="4cb82d8daf83f3abe50ac460b4fac9a8da2512f08d8efb4d327dcacd0b3929b3")
version("7.1.0", sha256="d78d9f3f2dee6ccb46a8c296367369349054fd475dff3c5b36e2dff3dee0bf8f")
version("6.5.12", sha256="de96c68a6262d6b9ba76b5057c02c7e6964c070b1328a63bf70259e9530a7996")
version("6.5.6", sha256="7717cad84d4a9c3d6b2c47963eb555d96de0be657870bcab6fcef4c0423af0de")
version("6.5.1", sha256="1f318adadb19da23c9be570a9c600a330056b18950fe0bf0eb1cf5cac8b72a32")
version("6.5.0", sha256="b6f9ec922fbdcecb4348e16d851d0d1f135df1836dfe77d2e0b64295ddb83066")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def edit(self, spec, prefix):
# Dictionary mapping: compiler-name : ACE config-label
supported = {"intel": "_icc", "gcc": ""}
diff --git a/var/spack/repos/builtin/packages/acfl/detection_test.yaml b/var/spack/repos/builtin/packages/acfl/detection_test.yaml
new file mode 100644
index 0000000000..23fc1930f2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/acfl/detection_test.yaml
@@ -0,0 +1,83 @@
+paths:
+- layout:
+ - executables:
+ - "bin/armclang"
+ - "bin/armclang++"
+ - "bin/armflang"
+ script: |
+ echo "Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)"
+ echo "Target: aarch64--linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir:"
+ echo "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin"
+ platforms: [linux]
+ results:
+ - spec: acfl@19.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/armclang"
+ cxx: ".*/bin/armclang[+][+]"
+ fortran: ".*/bin/armflang"
+- layout:
+ - executables:
+ - "bin/armclang"
+ - "bin/armclang++"
+ script: |
+ echo "Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)"
+ echo "Target: aarch64--linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir:"
+ echo "/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin"
+ platforms: [linux]
+ results:
+ - spec: acfl@19.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/armclang"
+ cxx: ".*/bin/armclang[+][+]"
+- layout:
+ - executables:
+ - "bin/armclang"
+ - "bin/armclang++"
+ - "bin/armflang"
+ script: |
+ echo "Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)"
+ echo "Target: aarch64--linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir:"
+ echo "/opt/arm/arm-hpc-compiler-19.3.5_Generic-AArch64_RHEL-7_aarch64-linux/bin"
+ - executables:
+ - "bin/armclang-18"
+ - "bin/armclang++-18"
+ - "bin/armflang-18"
+ script: |
+ echo "Arm C/C++/Fortran Compiler version 18.0 (build number 27) (based on LLVM 7.0.0)"
+ echo "Target: aarch64--linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir:"
+ echo "/opt/arm/arm-hpc-compiler-19_Generic-AArch64_RHEL-7_aarch64-linux/bin"
+ platforms: [linux]
+ results:
+ - spec: acfl@19.3.1
+ extra_attributes:
+ compilers:
+ c: ".*/bin/armclang$"
+ cxx: ".*/bin/armclang[+][+]$"
+ fortran: ".*/bin/armflang$"
+ - spec: acfl@18.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/armclang-18"
+ cxx: ".*/bin/armclang[+][+]-18"
+ fortran: ".*/bin/armflang-18"
+- layout: # does not detect upstream clang
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "clang version 8.0.0 (tags/RELEASE_800/final"
+ echo "Target: x86_64-unknown-linux-gnu\n"
+ echo "Thread model: posix\n"
+ echo "InstalledDir: /usr/bin"
+ platforms: [linux]
+ results: []
diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py
index 6a7b128f36..6e1d9fa618 100644
--- a/var/spack/repos/builtin/packages/acfl/package.py
+++ b/var/spack/repos/builtin/packages/acfl/package.py
@@ -3,8 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-import re
+import spack.platforms
from spack.package import *
_os_map_before_23 = {
@@ -24,10 +24,9 @@ _os_map_before_23 = {
_os_map = {
"ubuntu20.04": "Ubuntu-20.04",
"ubuntu22.04": "Ubuntu-22.04",
+ "debian12": "Ubuntu-22.04",
"sles15": "SLES-15",
- "centos7": "RHEL-7",
"centos8": "RHEL-8",
- "rhel7": "RHEL-7",
"rhel8": "RHEL-8",
"rhel9": "RHEL-9",
"rocky8": "RHEL-8",
@@ -37,6 +36,100 @@ _os_map = {
}
_versions = {
+ "24.10.1": {
+ "RHEL-8": (
+ "0e894ce2a9d7af8fabe21368a44e9f71d25bda80413fb8dd22f389c3c5e36100",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_RHEL-8_aarch64.tar",
+ ),
+ "RHEL-9": (
+ "5c2cd9c6f505050a39012f180a5c739065f140fe45b9c3039f3e6e6b7c911002",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_RHEL-9_aarch64.tar",
+ ),
+ "SLES-15": (
+ "3b33b397b253a14994b6341f219ed6af5cf79ba8fc5acb99fa028deb4344fbaf",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_SLES-15_aarch64.tar",
+ ),
+ "Ubuntu-20.04": (
+ "5a5e47cbb1a28f633961a418ff990f72bdd76c2854da80aa3dcf7619bb0fcc8c",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_Ubuntu-20.04_aarch64.tar",
+ ),
+ "Ubuntu-22.04": (
+ "d1da0469a0c6df62911edd2bbe49525aa56fffe9a9f419aa19e9aaa9a8bd0295",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_Ubuntu-22.04_aarch64.tar",
+ ),
+ "AmazonLinux-2": (
+ "bfcb0de00be5b65a37d41473a9f85ac49b29ccb83e0338e57910fa0a9ffef79d",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_AmazonLinux-2_aarch64.tar",
+ ),
+ "AmazonLinux-2023": (
+ "56a292dd2283c842d5bcfbeaa9bdb81d28f30f7500a7fd113487ecc456652fe9",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10.1/arm-compiler-for-linux_24.10.1_AmazonLinux-2023_aarch64.tar",
+ ),
+ },
+ "24.10": {
+ "RHEL-8": (
+ "7c685c5393345baff573dc53ea3bb84e6293f9e51808e168ececcf51efb45813",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_RHEL-8_aarch64.tar",
+ ),
+ "RHEL-9": (
+ "52767ec236098aec410b1d9899c4ba2c3dc2bcc3c2b500dbf2f4b7b3cfacf16d",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_RHEL-9_aarch64.tar",
+ ),
+ "SLES-15": (
+ "ab118af1150931d59e7ec89f9c235a89bf604700ace53f549d3898677e7e76a4",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_SLES-15_aarch64.tar",
+ ),
+ "Ubuntu-20.04": (
+ "defe9b8bd31d28aba1c8b8026295b6e277f221d1e387b16d8d86f4dea9b75c27",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_Ubuntu-20.04_aarch64.tar",
+ ),
+ "Ubuntu-22.04": (
+ "10c0fad1ff3628f505ada90359c68b046676a4c6cab1131d76ae0429d3694415",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_Ubuntu-22.04_aarch64.tar",
+ ),
+ "AmazonLinux-2": (
+ "8abd35c455adb94812aaa55853f72ac55e142940e775e985eeedbbbe17902d8f",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_AmazonLinux-2_aarch64.tar",
+ ),
+ "AmazonLinux-2023": (
+ "6b1cf34240af15ae9a7c767d7f484f2fa79c4633571b613e3d65e20b8d3ba65a",
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Compiler-for-Linux/Version_24.10/arm-compiler-for-linux_24.10_AmazonLinux-2023_aarch64.tar",
+ ),
+ },
+ "24.04": {
+ "RHEL-7": (
+ "064c3ecfd71cba3d8bf639448e899388f58eb7faef4b38f3c1aace625ace8b1e",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-7_aarch64.tar",
+ ),
+ "RHEL-8": (
+ "38f46a3549667d0fbccd947653d3a1a56b630d3bbb1251888c674c463f00dac3",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-8_aarch64.tar",
+ ),
+ "RHEL-9": (
+ "d335db82c8310e1d79c96dc09a19e4d509c5ab17eb6027214bb79cfc75d8229e",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-9_aarch64.tar",
+ ),
+ "SLES-15": (
+ "6f2e090efcd8da2cbeaf63272fac5917f637713f1e86d73cde2ad7268e3a05a2",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_SLES-15_aarch64.tar",
+ ),
+ "Ubuntu-20.04": (
+ "0d782e6a69a11f90bf3b392313c885a2376c5761f227bf2f68e34e9848ec8e97",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_Ubuntu-20.04_aarch64.tar",
+ ),
+ "Ubuntu-22.04": (
+ "0bab2e89f0a2359746f89a01251dca763305c5b0dee95cf47b0968dd1cb5f6f6",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_Ubuntu-22.04_aarch64.tar",
+ ),
+ "AmazonLinux-2": (
+ "cf0bebe2d7123749c919a5f4e36100ad21f08ffbad3b53e477205c08ae973a2d",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_AmazonLinux-2_aarch64.tar",
+ ),
+ "AmazonLinux-2023": (
+ "035dae8c41a1ac86c8885837978cb712306aa75dc5d26d17aca843b84eaee9f4",
+ "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_AmazonLinux-2023_aarch64.tar",
+ ),
+ },
"23.10": {
"RHEL-7": (
"c3bd4df3e5f6c97369237b0067e0a421dceb9c167d73f22f3da87f5025258314",
@@ -176,68 +269,65 @@ _versions = {
def get_os(ver):
spack_os = spack.platforms.host().default_os
- if ver.startswith("22."):
+ if ver.startswith("22"):
return _os_map_before_23.get(spack_os, "")
- else:
- return _os_map.get(spack_os, "RHEL-7")
+ if ver.startswith("23") or ver == "24.04":
+ return {**_os_map, "centos7": "RHEL-7", "rhel7": "RHEL-7"}.get(spack_os, "RHEL-7")
+ return _os_map.get(spack_os, "RHEL-8")
def get_armpl_version_to_3(spec):
"""Return version string with 3 numbers"""
- version = spec.version.up_to(3)
- version_len = len(version)
+ version_len = len(spec.version)
assert version_len == 2 or version_len == 3
if version_len == 2:
- return version.string + ".0"
+ return spec.version.string + ".0"
elif version_len == 3:
- return version.string
+ return spec.version.string
def get_armpl_prefix(spec):
+ ver = get_armpl_version_to_3(spec)
+ os = get_os(spec.version.string)
if spec.version.string.startswith("22."):
- return join_path(
- spec.prefix,
- "armpl-{}_AArch64_{}_arm-linux-compiler_aarch64-linux".format(
- get_armpl_version_to_3(spec), get_os(spec.version.string)
- ),
- )
+ return join_path(spec.prefix, f"armpl-{ver}_AArch64_{os}_arm-linux-compiler_aarch64-linux")
else:
- return join_path(
- spec.prefix,
- "armpl-{}_{}_arm-linux-compiler".format(
- get_armpl_version_to_3(spec), get_os(spec.version.string)
- ),
- )
+ return join_path(spec.prefix, f"armpl-{ver}_{os}_arm-linux-compiler")
+
+
+def get_gcc_prefix(spec):
+ dirlist = next(os.walk(spec.prefix))[1]
+ return join_path(spec.prefix, next(dir for dir in dirlist if dir.startswith("gcc")))
def get_acfl_prefix(spec):
+ os = get_os(spec.version.string)
if spec.version.string.startswith("22."):
return join_path(
- spec.prefix,
- "arm-linux-compiler-{0}_Generic-AArch64_{1}_aarch64-linux".format(
- spec.version, get_os(spec.version.string)
- ),
+ spec.prefix, f"arm-linux-compiler-{spec.version}_Generic-AArch64_{os}_aarch64-linux"
)
else:
- return join_path(
- spec.prefix, f"arm-linux-compiler-{spec.version}_{get_os(spec.version.string)}"
- )
+ return join_path(spec.prefix, f"arm-linux-compiler-{spec.version}_{os}")
-def get_gcc_prefix(spec):
- dirlist = next(os.walk(spec.prefix))[1]
- return join_path(spec.prefix, next(dir for dir in dirlist if dir.startswith("gcc")))
+def get_armpl_suffix(spec):
+ suffix = ""
+ if spec.satisfies("@24:"):
+ suffix += "_ilp64" if spec.satisfies("+ilp64") else "_lp64"
+ else:
+ suffix += "_ilp64" if spec.satisfies("+ilp64") else ""
+ suffix += "_mp" if spec.satisfies("threads=openmp") else ""
+ return suffix
-class Acfl(Package):
+class Acfl(Package, CompilerPackage):
"""Arm Compiler combines the optimized tools and libraries from Arm
with a modern LLVM-based compiler framework.
"""
homepage = "https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Linux"
- url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar"
- maintainers("annop-w")
+ maintainers("paolotricerri")
# Build Versions
for ver, packages in _versions.items():
@@ -276,33 +366,15 @@ class Acfl(Package):
)
exe("--accept", "--force", "--install-to", prefix)
- @classmethod
- def determine_version(cls, exe):
- regex_str = r"Arm C\/C\+\+\/Fortran Compiler version ([\d\.]+) " r"\(build number (\d+)\) "
- version_regex = re.compile(regex_str)
- try:
- output = spack.compiler.get_compiler_version_output(exe, "--version")
- match = version_regex.search(output)
- if match:
- if match.group(1).count(".") == 1:
- return match.group(1) + ".0." + match.group(2)
- return match.group(1) + "." + match.group(2)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(e)
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- compilers = {}
- for exe in exes:
- if "armclang" in exe:
- compilers["c"] = exe
- if "armclang++" in exe:
- compilers["cxx"] = exe
- if "armflang" in exe:
- compilers["fortran"] = exe
- return "", {"compilers": compilers}
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["armclang"]
+ cxx_names = ["armclang++"]
+ fortran_names = ["armflang"]
+
+ compiler_version_argument = "--version"
+ compiler_version_regex = (
+ r"Arm C\/C\+\+\/Fortran Compiler version ([\d\.]+) \(build number \d+\) "
+ )
@property
def cc(self):
@@ -330,10 +402,7 @@ class Acfl(Package):
@property
def lib_suffix(self):
- suffix = ""
- suffix += "_ilp64" if self.spec.satisfies("+ilp64") else ""
- suffix += "_mp" if self.spec.satisfies("threads=openmp") else ""
- return suffix
+ return get_armpl_suffix(self.spec)
@property
def blas_libs(self):
@@ -369,7 +438,10 @@ class Acfl(Package):
def headers(self):
armpl_dir = get_armpl_prefix(self.spec)
- suffix = "include" + self.lib_suffix
+ if self.spec.satisfies("@24:"):
+ suffix = "include"
+ else:
+ suffix = "include" + self.lib_suffix
incdir = join_path(armpl_dir, suffix)
@@ -380,7 +452,6 @@ class Acfl(Package):
def setup_run_environment(self, env):
arm_dir = get_acfl_prefix(self.spec)
armpl_dir = get_armpl_prefix(self.spec)
- gcc_dir = get_gcc_prefix(self.spec)
env.set("ARM_LINUX_COMPILER_DIR", arm_dir)
env.set("ARM_LINUX_COMPILER_INCLUDES", join_path(arm_dir, "includes"))
@@ -392,25 +463,13 @@ class Acfl(Package):
env.prepend_path("LIBRARY_PATH", join_path(arm_dir, "lib"))
env.prepend_path("MANPATH", join_path(arm_dir, "share", "man"))
- env.set("GCC_DIR", gcc_dir)
- env.set("GCC_INCLUDES", join_path(gcc_dir, "include"))
- env.append_path("GCC_LIBRARIES", join_path(gcc_dir, "lib"))
- env.append_path("GCC_LIBRARIES", join_path(gcc_dir, "lib64"))
- env.set("COMPILER_PATH", gcc_dir)
- env.prepend_path("PATH", join_path(gcc_dir, "binutils_bin"))
- env.prepend_path("CPATH", join_path(gcc_dir, "include"))
- env.prepend_path("LD_LIBRARY_PATH", join_path(gcc_dir, "lib"))
- env.prepend_path("LD_LIBRARY_PATH", join_path(gcc_dir, "lib64"))
- env.prepend_path("LIBRARY_PATH", join_path(gcc_dir, "lib"))
- env.prepend_path("LIBRARY_PATH", join_path(gcc_dir, "lib64"))
- env.prepend_path("MANPATH", join_path(gcc_dir, "share", "man"))
-
@run_after("install")
def check_install(self):
arm_dir = get_acfl_prefix(self.spec)
armpl_dir = get_armpl_prefix(self.spec)
gcc_dir = get_gcc_prefix(self.spec)
- armpl_example_dir = join_path(armpl_dir, "examples")
+ suffix = get_armpl_suffix(self.spec)
+ armpl_example_dir = join_path(armpl_dir, f"examples{suffix}")
# run example makefile
make(
"-C",
@@ -419,6 +478,7 @@ class Acfl(Package):
"F90=" + self.fortran,
"CPATH=" + join_path(arm_dir, "include"),
"COMPILER_PATH=" + gcc_dir,
+ "ARMPL_DIR=" + armpl_dir,
)
# clean up
make("-C", armpl_example_dir, "clean")
diff --git a/var/spack/repos/builtin/packages/acl/package.py b/var/spack/repos/builtin/packages/acl/package.py
index ba30afbf22..c15e07a0c0 100644
--- a/var/spack/repos/builtin/packages/acl/package.py
+++ b/var/spack/repos/builtin/packages/acl/package.py
@@ -21,6 +21,8 @@ class Acl(AutotoolsPackage):
version("2.2.49", sha256="c6e01460cac4e47673dd60a7f57b970b49f6998bb564eff141cca129aa8940d1")
version("2.2.48", sha256="877eaeccc1500baec58391935b46ac7dfc5ffd8c54fbc0385ccd8b2b18ac3fa6")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/acpica-tools/package.py b/var/spack/repos/builtin/packages/acpica-tools/package.py
index 5c0dc14847..090ccd70e1 100644
--- a/var/spack/repos/builtin/packages/acpica-tools/package.py
+++ b/var/spack/repos/builtin/packages/acpica-tools/package.py
@@ -15,6 +15,8 @@ class AcpicaTools(MakefilePackage):
version("20200528", sha256="07cd3e370b695ab787d25a7165e37eb7b150dca7908f047a6a6486d216cf05a8")
version("20200430", sha256="e3118583bf6e4bb4745d642a863cce1b4fcfdf67558e4ae53df367b7e26b89ac")
+ depends_on("c", type="build") # generated
+
depends_on("flex", type="build")
depends_on("bison", type="build")
diff --git a/var/spack/repos/builtin/packages/acpid/package.py b/var/spack/repos/builtin/packages/acpid/package.py
index 00af2a543e..3e224a39c6 100644
--- a/var/spack/repos/builtin/packages/acpid/package.py
+++ b/var/spack/repos/builtin/packages/acpid/package.py
@@ -24,6 +24,8 @@ class Acpid(AutotoolsPackage):
version("2.0.25", sha256="947d2e4f9b2d61a728ce5d6139901f1b666dcef5e2a48833cb33d82895e261cf")
version("2.0.24", sha256="05903901369c4ebea1d24e445b4a1d516dd3b07e7864cc752a2d09b4147e1985")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py
index caaaafa585..d9954d44d2 100644
--- a/var/spack/repos/builtin/packages/activeharmony/package.py
+++ b/var/spack/repos/builtin/packages/activeharmony/package.py
@@ -10,13 +10,13 @@ class Activeharmony(MakefilePackage):
"""Active Harmony: a framework for auto-tuning (the automated search for
values to improve the performance of a target application)."""
- homepage = "https://www.dyninst.org/harmony"
- url = "https://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz"
+ homepage = "https://github.com/ActiveHarmony/harmony"
+ url = "https://github.com/ActiveHarmony/harmony/archive/refs/tags/v4.5.tar.gz"
license("LGPL-3.0-only")
- version("4.6.0", sha256="9ce5009cfd8e2f4cf5f3536e1fea9993414fc25920fc90d0a2cb56f044787dbb")
- version("4.5", sha256="31d9990c8dd36724d336707d260aa4d976e11eaa899c4c7cc11f80a56cdac684")
+ version("4.6.0", sha256="01011c0c455fca31e5806b03743e27a12161c152253370894876f851242ccd51")
+ version("4.5", sha256="74bde94f6c4f710a5003b0111f27fe3ba98161505e0155a87e94dd209b586951")
patch(
"fix_logical_bug_in_slave_list_parsing.patch",
diff --git a/var/spack/repos/builtin/packages/activemq/package.py b/var/spack/repos/builtin/packages/activemq/package.py
index 7b1add648a..0521ad4fd3 100644
--- a/var/spack/repos/builtin/packages/activemq/package.py
+++ b/var/spack/repos/builtin/packages/activemq/package.py
@@ -17,8 +17,15 @@ class Activemq(Package):
license("Apache-2.0")
- version("5.17.3", sha256="a4cc4c3a2f136707c2c696f3bb3ee2a86dbeff1b9eb5e237b14edc0c5e5a328f")
+ version("6.1.3", sha256="cad14e816e990f1312709ebfc228f42895d8c54c652d3cd56f0b5145635dc794")
+ version("5.18.6", sha256="b1363696e4e014423f6ab22f1ece4bf14ee32b80bfa5bdbae7dd4026a47ff03a")
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-46604
+ version(
+ "5.17.3",
+ sha256="a4cc4c3a2f136707c2c696f3bb3ee2a86dbeff1b9eb5e237b14edc0c5e5a328f",
+ deprecated=True,
+ )
# https://nvd.nist.gov/vuln/detail/CVE-2018-11775
version(
"5.14.0",
@@ -26,7 +33,12 @@ class Activemq(Package):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("java")
+ depends_on("java@8:", when="@5.15:")
+ depends_on("java@11:", when="@5.17:")
+ depends_on("java@17:", when="@6:")
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py b/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py
new file mode 100644
index 0000000000..6de001e545
--- /dev/null
+++ b/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py
@@ -0,0 +1,69 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ActsAlgebraPlugins(CMakePackage):
+ """A portable linear algebra library with multiple backends that is part of
+ the Acts ecosystem."""
+
+ homepage = "https://github.com/acts-project/algebra-plugins"
+ url = "https://github.com/acts-project/algebra-plugins/archive/refs/tags/v0.24.0.tar.gz"
+
+ maintainers("stephenswat", "wdconinc")
+
+ license("MPL-2.0", checked_by="stephenswat")
+
+ version("0.25.0", sha256="bb0cba6e37558689d780a6de8f749abb3b96f8cd9e0c8851474eb4532e1e98b8")
+ version("0.24.0", sha256="f44753e62b1ba29c28ab86b282ab67ac6028a0f9fe41e599b7fc6fc50b586b62")
+
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "cxxstd",
+ default="17",
+ values=("17", "20", "23"),
+ multi=False,
+ description="C++ standard used",
+ )
+ variant("eigen", default=False, description="Enables the Eigen plugin")
+ variant("smatrix", default=False, description="Enables the SMatrix plugin")
+ variant("vecmem", default=False, description="Enables the vecmem plugin")
+ variant("vc", default=False, description="Enables the Vc plugin")
+ variant("fastor", default=False, description="Enables the Fastor plugin")
+
+ depends_on("cmake@3.14:", type="build")
+ depends_on("vecmem@1.5.0:", when="+vecmem")
+ depends_on("eigen@3.4.0:", when="+eigen")
+ depends_on("vc@1.4.3:", when="+vc")
+ depends_on("root@6.18.0:", when="+smatrix")
+ depends_on("fastor@0.6.4:", when="+fastor")
+
+ with when("+smatrix"):
+ depends_on("root cxxstd=17", when="cxxstd=17")
+ depends_on("root cxxstd=20", when="cxxstd=20")
+ conflicts("cxxstd=23")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
+ self.define("ALGEBRA_PLUGINS_USE_SYSTEM_LIBS", True),
+ self.define_from_variant("ALGEBRA_PLUGINS_INCLUDE_EIGEN", "eigen"),
+ self.define_from_variant("ALGEBRA_PLUGINS_SETUP_EIGEN3", "eigen"),
+ self.define_from_variant("ALGEBRA_PLUGINS_INCLUDE_SMATRIX", "smatrix"),
+ self.define_from_variant("ALGEBRA_PLUGINS_INCLUDE_VC", "vc"),
+ self.define_from_variant("ALGEBRA_PLUGINS_SETUP_VC", "vc"),
+ self.define_from_variant("ALGEBRA_PLUGINS_INCLUDE_VECMEM", "vecmem"),
+ self.define_from_variant("ALGEBRA_PLUGINS_SETUP_VECMEM", "vecmem"),
+ self.define_from_variant("ALGEBRA_PLUGINS_INCLUDE_FASTOR", "fastor"),
+ self.define_from_variant("ALGEBRA_PLUGINS_SETUP_FASTOR", "fastor"),
+ self.define("ALGEBRA_PLUGINS_BUILD_TESTING", False),
+ self.define("ALGEBRA_PLUGINS_SETUP_GOOGLETEST", False),
+ self.define("ALGEBRA_PLUGINS_SETUP_BENCHMARK", False),
+ self.define("ALGEBRA_PLUGINS_BUILD_BENCHMARKS", False),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/acts-dd4hep/package.py b/var/spack/repos/builtin/packages/acts-dd4hep/package.py
index 5aa29c7c20..173a9f283e 100644
--- a/var/spack/repos/builtin/packages/acts-dd4hep/package.py
+++ b/var/spack/repos/builtin/packages/acts-dd4hep/package.py
@@ -12,9 +12,11 @@ class ActsDd4hep(CMakePackage):
homepage = "https://github.com/acts-project/acts-dd4hep"
url = "https://github.com/acts-project/acts-dd4hep/archive/refs/tags/v1.0.0.tar.gz"
- maintainers("HadrienG2", "wdconinc")
+ maintainers("wdconinc")
version("1.0.1", sha256="e40f34ebc30b3c33a6802c9d94136e65072d8dcee0b7db57a645f08a64ea5334")
version("1.0.0", sha256="991f996944c88efa837880f919239e50d12c5c9361e220bc9422438dd608308c")
+ depends_on("cxx", type="build") # generated
+
depends_on("dd4hep@1.11: +dddetectors")
diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py
index b3eef6dfa6..f2784fb772 100644
--- a/var/spack/repos/builtin/packages/acts/package.py
+++ b/var/spack/repos/builtin/packages/acts/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.variant import _ConditionalVariantValues
class Acts(CMakePackage, CudaPackage):
@@ -33,7 +32,7 @@ class Acts(CMakePackage, CudaPackage):
homepage = "https://acts.web.cern.ch/ACTS/"
git = "https://github.com/acts-project/acts.git"
list_url = "https://github.com/acts-project/acts/releases/"
- maintainers("HadrienG2")
+ maintainers("wdconinc", "stephenswat")
tags = ["hep"]
@@ -42,6 +41,30 @@ class Acts(CMakePackage, CudaPackage):
# Supported Acts versions
version("main", branch="main")
version("master", branch="main", deprecated=True) # For compatibility
+ version("38.0.0", commit="0a6b5155e29e3b755bf351b8a76067fff9b4214b", submodules=True)
+ version("37.4.0", commit="4ae9a44f54c854599d1d753222ec36e0b5b4e9c7", submodules=True)
+ version("37.3.0", commit="b3e856d4dadcda7d1a88a9b846ce5a7acd8410c4", submodules=True)
+ version("37.2.0", commit="821144dc40d35b44aee0d7857a0bd1c99e4a3932", submodules=True)
+ version("37.1.0", commit="fa6ad4d52e0bd09cf8c78507fcbb18e9ac2c87a3", submodules=True)
+ version("37.0.1", commit="998b9c9dd42d5160c2540f8fa820505869bfdb79", submodules=True)
+ version("37.0.0", commit="117feaaadc7a2336755274e0cd70ba58a047a1de", submodules=True)
+ version("36.3.2", commit="01e124d253a3c9c9b9f5d2fde16682ce9d4599cd", submodules=True)
+ version("36.3.1", commit="b58e5b0c33fb8423ce60a6a45f333edd0d178acd", submodules=True)
+ version("36.3.0", commit="3b875cebabdd10462e224279558429f49ed75945", submodules=True)
+ version("36.2.0", commit="e2fb53da911dc481969e56d635898a46b8d78df9", submodules=True)
+ version("36.1.0", commit="3f19d1a0eec1d11937d66d0ef603f0b25b9b4e96", submodules=True)
+ version("36.0.0", commit="6eca77c45b136861272694edbb61bb77200948a5", submodules=True)
+ version("35.2.0", commit="b3b09f46d064c43050dd3d21cdf51d7a412134fc", submodules=True)
+ version("35.1.0", commit="9dfb47b8edeb8b9c75115462079bcb003dd3f031", submodules=True)
+ version("35.0.0", commit="352b423ec31934f825deb9897780246d60ffc44e", submodules=True)
+ version("34.1.0", commit="8e1b7a659d912cd98db9d700906ff59e708da574", submodules=True)
+ version("34.0.0", commit="daafd83adf0ce50f9667f3c9d4791a459e39fd1b", submodules=True)
+ version("33.1.0", commit="00591a593a648430820e980b031301d25c18f1c7", submodules=True)
+ version("33.0.0", commit="f6ed9013e76120137ae456583a04b554d88d9452", submodules=True)
+ version("32.1.0", commit="5333c67b49b4bfcd45558090e4ba37b4f86b82db", submodules=True)
+ version("32.0.2", commit="3d23e16a2d0ba68ce5a596ced16883f90de1fae4", submodules=True)
+ version("32.0.1", commit="6317634ec16eb40e52ca85445a014e378c9a4829", submodules=True)
+ version("32.0.0", commit="9385e36691bb2687437c39ad02ddb2ac21acccdc", submodules=True)
version("31.2.0", commit="1d2e90f534ff2c9bf1c40914980b426f4b5d3096", submodules=True)
version("31.1.0", commit="95c3ceef79a7b68fcfc7fd558c3134d0c7529dac", submodules=True)
version("31.0.0", commit="2cf3fe0254d2bf9434899fdcfbe316366a970956", submodules=True)
@@ -169,18 +192,24 @@ class Acts(CMakePackage, CudaPackage):
version("0.08.1", commit="289bdcc320f0b3ff1d792e29e462ec2d3ea15df6")
version("0.08.0", commit="99eedb38f305e3a1cd99d9b4473241b7cd641fa9")
+ depends_on("cxx", type="build") # generated
+
# Variants that affect the core Acts library
variant(
"benchmarks", default=False, description="Build the performance benchmarks", when="@0.16:"
)
- _cxxstd_values = (conditional("14", when="@:0.8.1"), "17", conditional("20", when="@24:"))
- variant(
- "cxxstd",
- default="17",
- values=_cxxstd_values,
- multi=False,
- description="Use the specified C++ standard when building.",
+ _cxxstd_values = (
+ conditional("14", when="@:0.8.1"),
+ conditional("17", when="@:35"),
+ conditional("20", when="@24:"),
)
+ _cxxstd_common = {
+ "values": _cxxstd_values,
+ "multi": False,
+ "description": "Use the specified C++ standard when building.",
+ }
+ variant("cxxstd", default="17", when="@:35", **_cxxstd_common)
+ variant("cxxstd", default="20", when="@36:", **_cxxstd_common)
variant(
"examples",
default=False,
@@ -191,7 +220,13 @@ class Acts(CMakePackage, CudaPackage):
"examples",
default=False,
description="Build the examples",
- when="@17: +fatras +identification +json +tgeo",
+ when="@17:34 +fatras +identification +json +tgeo",
+ )
+ variant(
+ "examples",
+ default=False,
+ description="Build the examples",
+ when="@35: +fatras +json +tgeo",
)
variant("integration_tests", default=False, description="Build the integration tests")
variant("unit_tests", default=False, description="Build the unit tests")
@@ -200,6 +235,15 @@ class Acts(CMakePackage, CudaPackage):
default="MAX",
description="Log level above which examples should auto-crash",
)
+ _scalar_values = ["float", "double"]
+ variant(
+ "scalar",
+ default="double",
+ values=_scalar_values,
+ multi=False,
+ sticky=True,
+ description="Scalar type to use throughout Acts.",
+ )
# Variants that enable / disable Acts plugins
variant("alignment", default=False, description="Build the alignment package", when="@13:")
@@ -207,7 +251,7 @@ class Acts(CMakePackage, CudaPackage):
"autodiff",
default=False,
description="Build the auto-differentiation plugin",
- when="@1.2:",
+ when="@1.2:32",
)
variant("dd4hep", default=False, description="Build the DD4hep plugin", when="+tgeo")
variant(
@@ -225,10 +269,13 @@ class Acts(CMakePackage, CudaPackage):
when="@0.16:",
)
variant("fatras_geant4", default=False, description="Build Geant4 Fatras package")
- variant("identification", default=False, description="Build the Identification plugin")
+ variant("geomodel", default=False, description="Build GeoModel plugin", when="@33:")
+ variant(
+ "identification", default=False, description="Build the Identification plugin", when="@:34"
+ )
variant("json", default=False, description="Build the Json plugin")
variant("legacy", default=False, description="Build the Legacy package")
- variant("mlpack", default=False, description="Build MLpack plugin", when="@25:")
+ variant("mlpack", default=False, description="Build MLpack plugin", when="@25:31")
variant("onnx", default=False, description="Build ONNX plugin")
variant("odd", default=False, description="Build the Open Data Detector", when="@19.1:")
variant("podio", default=False, description="Build Podio plugin", when="@30.3:")
@@ -244,12 +291,19 @@ class Acts(CMakePackage, CudaPackage):
description="Enable memory profiling using gperftools",
when="@19.3:",
)
- variant("sycl", default=False, description="Build the SyCL plugin", when="@1:")
- variant("tgeo", default=False, description="Build the TGeo plugin", when="+identification")
+ variant("sycl", default=False, description="Build the SyCL plugin", when="@1:34")
+ variant(
+ "tgeo", default=False, description="Build the TGeo plugin", when="@:34 +identification"
+ )
+ variant("tgeo", default=False, description="Build the TGeo plugin", when="@35:")
+ variant("traccc", default=False, description="Build the Traccc plugin", when="@35.1:")
# Variants that only affect Acts examples for now
variant(
- "binaries", default=False, description="Build the examples binaries", when="@23: +examples"
+ "binaries",
+ default=False,
+ description="Build the examples binaries",
+ when="@23:32 +examples",
)
variant(
"edm4hep",
@@ -286,73 +340,95 @@ class Acts(CMakePackage, CudaPackage):
"tbb",
default=True,
description="Build the examples with Threading Building Blocks library",
- when="@19.8:19,20.1: +examples",
+ when="@19.8:19,20.1:37.2 +examples",
)
variant("analysis", default=False, description="Build analysis applications in the examples")
# Build dependencies
depends_on("acts-dd4hep", when="@19 +dd4hep")
- depends_on("actsvg@0.4.20:", when="@20.1: +svg")
- depends_on("actsvg@0.4.28:", when="@23.2: +svg")
- depends_on("actsvg@0.4.29:", when="@23.4: +svg")
- depends_on("actsvg@0.4.30:", when="@23.5: +svg")
- depends_on("actsvg@0.4.33:", when="@25:27 +svg")
- depends_on("actsvg@0.4.35:", when="@28: +svg")
+ with when("+svg"):
+ depends_on("actsvg@0.4.20:", when="@20.1:")
+ depends_on("actsvg@0.4.28:", when="@23.2:")
+ depends_on("actsvg@0.4.29:", when="@23.4:")
+ depends_on("actsvg@0.4.30:", when="@23.5:")
+ depends_on("actsvg@0.4.33:", when="@25:27")
+ depends_on("actsvg@0.4.35:", when="@28:")
+ depends_on("actsvg@0.4.39:", when="@32:")
+ depends_on("actsvg@0.4.40:", when="@32.1:")
+ depends_on("actsvg@0.4.50:", when="@37:")
+ depends_on("acts-algebra-plugins @0.24:", when="+traccc")
depends_on("autodiff @0.6:", when="@17: +autodiff")
depends_on("autodiff @0.5.11:0.5.99", when="@1.2:16 +autodiff")
depends_on("boost @1.62:1.69 +program_options +test", when="@:0.10.3")
depends_on("boost @1.71: +filesystem +program_options +test", when="@0.10.4:")
depends_on("cmake @3.14:", type="build")
+ depends_on("covfie @0.10:", when="+traccc")
+ depends_on("cuda @12:", when="+traccc")
depends_on("dd4hep @1.11: +dddetectors +ddrec", when="+dd4hep")
depends_on("dd4hep @1.21: +dddetectors +ddrec", when="@20: +dd4hep")
depends_on("dd4hep +ddg4", when="+dd4hep +geant4 +examples")
+ depends_on("detray @0.72.1:", when="+traccc")
+ depends_on("detray @0.75.3:", when="@37: +traccc")
depends_on("edm4hep @0.4.1:", when="+edm4hep")
depends_on("edm4hep @0.7:", when="@25: +edm4hep")
depends_on("eigen @3.3.7:", when="@15.1:")
depends_on("eigen @3.3.7:3.3.99", when="@:15.0")
+ depends_on("eigen @3.4:", when="@36.1:")
depends_on("geant4", when="+fatras_geant4")
depends_on("geant4", when="+geant4")
+ depends_on("geomodel +geomodelg4", when="+geomodel")
+ depends_on("geomodel @4.6.0:", when="+geomodel")
+ depends_on("geomodel @6.3.0:", when="+geomodel @36.1:")
depends_on("git-lfs", when="@12.0.0:")
depends_on("gperftools", when="+profilecpu")
depends_on("gperftools", when="+profilemem")
depends_on("hepmc3 @3.2.1:", when="+hepmc3")
depends_on("heppdt", when="+hepmc3 @:4.0")
depends_on("intel-tbb @2020.1:", when="+examples +tbb")
+ depends_on("intel-tbb @2020.1:", when="+examples @37.3:")
depends_on("mlpack@3.1.1:", when="+mlpack")
depends_on("nlohmann-json @3.9.1:", when="@0.14: +json")
+ depends_on("nlohmann-json @3.10.5:", when="@37: +json")
depends_on("podio @0.6:", when="@25: +edm4hep")
depends_on("podio @0.16:", when="@30.3: +edm4hep")
+ depends_on("podio @:0", when="@:35 +edm4hep")
depends_on("podio @0.16:", when="+podio")
+ depends_on("podio @:0", when="@:35 +podio")
depends_on("pythia8", when="+pythia8")
depends_on("python", when="+python")
depends_on("python@3.8:", when="+python @19.11:19")
depends_on("python@3.8:", when="+python @21:")
depends_on("py-onnxruntime@:1.12", when="+onnx @:23.2")
- # FIXME py-onnxruntime@1.12: required but not yet available
- # Ref: https://github.com/spack/spack/pull/37064
- # depends_on("py-onnxruntime@1.12:", when="+onnx @23.3:")
- conflicts("+onnx", when="@23.3:", msg="py-onnxruntime@1.12: required but not yet available")
+ depends_on("py-onnxruntime@1.12:", when="+onnx @23.3:")
depends_on("py-pybind11 @2.6.2:", when="+python @18:")
+ depends_on("py-pybind11 @2.13.1:", when="+python @36:")
depends_on("py-pytest", when="+python +unit_tests")
- depends_on("root @6.10:", when="+tgeo @:0.8.0")
- depends_on("root @6.20:", when="+tgeo @0.8.1:")
+
+ with when("+tgeo"):
+ depends_on("root @6.10:")
+ depends_on("root @6.20:", when="@0.8.1:")
+
depends_on("sycl", when="+sycl")
depends_on("vecmem@0.4: +sycl", when="+sycl")
# ACTS imposes requirements on the C++ standard values used by ROOT
for _cxxstd in _cxxstd_values:
- if isinstance(_cxxstd, _ConditionalVariantValues):
- for _v in _cxxstd:
- depends_on(
- f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^geant4"
- )
- depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^root")
- else:
- depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^geant4")
- depends_on(f"root cxxstd={_cxxstd}", when=f"cxxstd={_cxxstd} ^root")
+ for _v in _cxxstd:
+ depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} +geant4")
+ depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} +fatras_geant4")
+ depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} +tgeo")
+
+ # When the traccc plugin is enabled, detray should match the Acts scalars
+ with when("+traccc"):
+ for _scalar in _scalar_values:
+ depends_on(f"detray scalar={_scalar}", when=f"scalar={_scalar}")
# ACTS has been using C++17 for a while, which precludes use of old GCC
conflicts("%gcc@:7", when="@0.23:")
+ # When using C++20, disable gcc 9 and lower.
+ conflicts("%gcc@:9", when="cxxstd=20")
+ # See https://github.com/acts-project/acts/pull/3512
+ conflicts("^boost@1.85.0")
def cmake_args(self):
spec = self.spec
@@ -404,6 +480,7 @@ class Acts(CMakePackage, CudaPackage):
cmake_variant("FATRAS_GEANT4", "fatras_geant4"),
example_cmake_variant("GEANT4", "geant4"),
plugin_cmake_variant("GEANT4", "geant4"),
+ plugin_cmake_variant("GEOMODEL", "geomodel"),
example_cmake_variant("HEPMC3", "hepmc3"),
plugin_cmake_variant("IDENTIFICATION", "identification"),
cmake_variant(integration_tests_label, "integration_tests"),
@@ -417,10 +494,12 @@ class Acts(CMakePackage, CudaPackage):
plugin_cmake_variant("PODIO", "podio"),
example_cmake_variant("PYTHIA8", "pythia8"),
example_cmake_variant("PYTHON_BINDINGS", "python"),
+ self.define_from_variant("ACTS_CUSTOM_SCALARTYPE", "scalar"),
plugin_cmake_variant("ACTSVG", "svg"),
plugin_cmake_variant("SYCL", "sycl"),
plugin_cmake_variant("TGEO", "tgeo"),
example_cmake_variant("TBB", "tbb", "USE"),
+ plugin_cmake_variant("TRACCC", "traccc"),
cmake_variant(unit_tests_label, "unit_tests"),
]
@@ -453,14 +532,12 @@ class Acts(CMakePackage, CudaPackage):
if spec.satisfies("@14: +vecmem"):
args.append("-DACTS_USE_SYSTEM_VECMEM=ON")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch = spec.variants["cuda_arch"].value
if cuda_arch != "none":
args.append(f"-DCUDA_FLAGS=-arch=sm_{cuda_arch[0]}")
-
- if "+python" in spec:
- python = spec["python"].command.path
- args.append(f"-DPython_EXECUTABLE={python}")
+ arch_str = ";".join(self.spec.variants["cuda_arch"].value)
+ args.append(self.define("CMAKE_CUDA_ARCHITECTURES", arch_str))
args.append(self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"))
diff --git a/var/spack/repos/builtin/packages/actsvg/package.py b/var/spack/repos/builtin/packages/actsvg/package.py
index fee0726a5c..beaf832209 100644
--- a/var/spack/repos/builtin/packages/actsvg/package.py
+++ b/var/spack/repos/builtin/packages/actsvg/package.py
@@ -16,10 +16,21 @@ class Actsvg(CMakePackage):
list_url = "https://github.com/acts-project/actsvg/tags"
git = "https://github.com/acts-project/actsvg.git"
- maintainers("HadrienG2", "wdconinc")
+ maintainers("wdconinc", "stephenswat")
license("MPL-2.0")
+ version("0.4.50", sha256="c97fb1cc75cbf23caebd3c6fb8716354bdbd0a77ad39dc43dae963692f3256e1")
+ version("0.4.48", sha256="0f230c31c64b939e4d311afd997dbaa87a375454cf1595661a449b97943412c9")
+ version("0.4.47", sha256="11924fddbdd01f6337875797dc3a97b62be565688e678485e992bcfc9bfb142f")
+ version("0.4.46", sha256="0b75e91de240aeac8b91cd4fb8e314d0ab2a4b220048fb373dee9352d571b792")
+ version("0.4.45", sha256="402ca863e453055e5abc65a37908f44b03b15f90c694807d78627d7800d2e39c")
+ version("0.4.44", sha256="6eda7306b8b863e1860e090f328ac6e7982dc2d3b3d674db2799c13007ffd07f")
+ version("0.4.43", sha256="e2aef32185db37cfdc023282b25c003e63dc974a11118ab2040bd30b2d346147")
+ version("0.4.42", sha256="a8439d50b469ccc4428973507db1adf56aa68b34900ce0c6077ddb92a133a4f2")
+ version("0.4.41", sha256="c675795e74efcf42c3015d6efc8d7a1848b677f1d4efe6dcaa4fb490b46268ff")
+ version("0.4.40", sha256="e24f51e70cff57c74d3b5f51c08f6ea1f409ef85ef7b4bad4a29520ecda032a6")
+ version("0.4.39", sha256="2d9605ecf8c9975d600cafb6d076969d77c634fa92844bd9586c38066da31739")
version("0.4.35", sha256="693a4cc0e702842072a478c913895ed3596350ffdfa87f5d296ddd6ea36b61c6")
version("0.4.33", sha256="25c93b8382bdb1864b4d8de64b146fe8ea86eec84048d594c375700d2fff1d1d")
version("0.4.30", sha256="f7ffea39b3132914fcbb0fac6ab7395bef295cd6078dfd1c2509fd2d9aab0acb")
@@ -30,15 +41,22 @@ class Actsvg(CMakePackage):
variant("examples", default=False, description="Build the example applications")
variant("meta", default=True, description="Build the meta level interface")
+ variant("python", default=True, when="@0.4.39:", description="Build the python bindings")
+ variant(
+ "web", default=True, when="@0.4.36:", description="Build the webpage builder interface"
+ )
depends_on("boost +program_options", type="test")
depends_on("boost +program_options", when="+examples")
depends_on("googletest", when="+examples")
+ depends_on("python@3.8:", when="+python")
def cmake_args(self):
args = [
self.define_from_variant("ACTSVG_BUILD_EXAMPLES", "examples"),
self.define_from_variant("ACTSVG_BUILD_META", "meta"),
+ self.define_from_variant("ACTSVG_BUILD_PYTHON_BINDINGS", "python"),
+ self.define_from_variant("ACTSVG_BUILD_WEB", "web"),
self.define("ACTSVG_BUILD_TESTING", self.run_tests),
]
return args
diff --git a/var/spack/repos/builtin/packages/additivefoam/package.py b/var/spack/repos/builtin/packages/additivefoam/package.py
index 7e7d3735ef..3fed737361 100644
--- a/var/spack/repos/builtin/packages/additivefoam/package.py
+++ b/var/spack/repos/builtin/packages/additivefoam/package.py
@@ -25,6 +25,8 @@ class Additivefoam(Package):
version("main", branch="main")
version("1.0.0", sha256="abbdf1b0230cd2f26f526be76e973f508978611f404fe8ec4ecdd7d5df88724c")
+ depends_on("cxx", type="build") # generated
+
depends_on("openfoam-org@10")
common = ["spack-derived-Allwmake"]
diff --git a/var/spack/repos/builtin/packages/addrwatch/package.py b/var/spack/repos/builtin/packages/addrwatch/package.py
index e04575b2e2..1db0d0af4a 100644
--- a/var/spack/repos/builtin/packages/addrwatch/package.py
+++ b/var/spack/repos/builtin/packages/addrwatch/package.py
@@ -18,5 +18,7 @@ class Addrwatch(AutotoolsPackage):
version("1.0.2", sha256="f04e143da881cd63c299125b592cfb85e4812abbd146f419a1894c00f2ae6208")
version("1.0.1", sha256="f772b62b1c6570b577473e7c98614dad1124352b377324cbebb36360d8f4ce5a")
+ depends_on("c", type="build") # generated
+
depends_on("libevent")
depends_on("libpcap")
diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py
index 5a542e3ab8..921b09076b 100644
--- a/var/spack/repos/builtin/packages/adept-utils/package.py
+++ b/var/spack/repos/builtin/packages/adept-utils/package.py
@@ -15,6 +15,9 @@ class AdeptUtils(CMakePackage):
version("1.0.1", sha256="259f777aeb368ede3583d3617bb779f0fde778319bf2122fdd216bdf223c015e")
version("1.0", sha256="fed29366c9bcf5f3799220ae3b351d2cb338e2aa42133d61584ea650aa8d6ff7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@:1.72.0")
depends_on("mpi")
depends_on("cmake@2.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/adept/package.py b/var/spack/repos/builtin/packages/adept/package.py
new file mode 100644
index 0000000000..55aa3a6f44
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adept/package.py
@@ -0,0 +1,48 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Adept(AutotoolsPackage):
+ """Combined array and automatic differentiation library in C++."""
+
+ homepage = "https://www.met.reading.ac.uk/clouds/adept/"
+ url = "https://www.met.reading.ac.uk/clouds/adept/adept-2.1.1.tar.gz"
+
+ maintainers("jehicken")
+
+ license("Apache-2.0", checked_by="jehicken")
+
+ version("2.1.1", sha256="0cef334e82df4526d3761bdd8319a63e7582c96b2f1cc88391729018b4825c47")
+
+ variant("blas", default=False, description="Enable Adept's native arrays using Openblas")
+ variant("lapack", default=False, description="Enable Adept's native arrays using Lapack")
+
+ depends_on("cxx", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("openblas", when="+blas")
+ depends_on("netlib-lapack", when="+lapack")
+
+ def autoreconf(self, spec, prefix):
+ autoreconf("--install", "--verbose", "--force")
+
+ def configure_args(self):
+ args = []
+
+ if self.spec.satisfies("+blas"):
+ blas_prefix = self.spec["openblas"].prefix
+ args.append(f"--with-blas={blas_prefix}")
+
+ if self.spec.satisfies("+lapack"):
+ lapack_prefix = self.spec["netlib-lapack"].prefix
+ args.append(f"--with-lapack={lapack_prefix}")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/adiak/package.py b/var/spack/repos/builtin/packages/adiak/package.py
index c9640c586e..66aaa0a18c 100644
--- a/var/spack/repos/builtin/packages/adiak/package.py
+++ b/var/spack/repos/builtin/packages/adiak/package.py
@@ -22,8 +22,9 @@ class Adiak(CMakePackage):
license("MIT")
version(
- "0.4.0", commit="7e8b7233f8a148b402128ed46b2f0c643e3b397e", submodules=True, preferred=True
+ "0.4.1", commit="7ac997111785bee6d9391664b1d18ebc2b3c557b", submodules=True, preferred=True
)
+ version("0.4.0", commit="7e8b7233f8a148b402128ed46b2f0c643e3b397e", submodules=True)
version("0.2.2", commit="3aedd494c81c01df1183af28bc09bade2fabfcd3", submodules=True)
version(
"0.3.0-alpha",
@@ -34,6 +35,10 @@ class Adiak(CMakePackage):
version("0.2.1", commit="950e3bfb91519ecb7b7ee7fa3063bfab23c0e2c9", submodules=True)
version("0.1.1", sha256="438e4652e15e206cd0019423d829fd4f2329323ff0c8861d9586bae051d9624b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi", when="+mpi")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py
index 3b5e3bcbe1..0b77cfd327 100644
--- a/var/spack/repos/builtin/packages/adios/package.py
+++ b/var/spack/repos/builtin/packages/adios/package.py
@@ -28,6 +28,10 @@ class Adios(AutotoolsPackage):
version("1.10.0", sha256="6713069259ee7bfd4d03f47640bf841874e9114bab24e7b0c58e310c42a0ec48")
version("1.9.0", sha256="23b2bb70540d51ab0855af0b205ca484fd1bd963c39580c29e3133f9e6fffd46")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
variant("fortran", default=False, description="Enable Fortran bindings support")
@@ -140,14 +144,14 @@ class Adios(AutotoolsPackage):
extra_args += self.enable_or_disable("shared")
extra_args += self.enable_or_disable("fortran")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env["MPICC"] = spec["mpi"].mpicc
env["MPICXX"] = spec["mpi"].mpicxx
extra_args += self.with_or_without("mpi", activation_value="prefix")
extra_args += self.with_or_without("infiniband")
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
extra_args.append(f"--with-zlib={spec['zlib-api'].prefix}")
else:
extra_args.append("--without-zlib")
diff --git a/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch b/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch
new file mode 100644
index 0000000000..abd69a9d99
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adios2/2.10-enable-rocm6.patch
@@ -0,0 +1,28 @@
+From c718e99a9e226b7327ab41396823873999206e38 Mon Sep 17 00:00:00 2001
+From: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
+Date: Thu, 27 Jun 2024 18:25:58 -0400
+Subject: [PATCH] kokkos: support ROCM >=6
+
+---
+ source/adios2/helper/kokkos/adiosKokkos.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/source/adios2/helper/kokkos/adiosKokkos.cpp b/source/adios2/helper/kokkos/adiosKokkos.cpp
+index e0599944e..d2619f0d4 100644
+--- a/source/adios2/helper/kokkos/adiosKokkos.cpp
++++ b/source/adios2/helper/kokkos/adiosKokkos.cpp
+@@ -85,7 +85,11 @@ bool IsGPUbuffer(const void *ptr)
+ hipError_t ret;
+ hipPointerAttribute_t attr;
+ ret = hipPointerGetAttributes(&attr, ptr);
++#if defined(ROCM_VERSION_MAJOR) && ROCM_VERSION_MAJOR < 6
+ if (ret == hipSuccess && attr.memoryType == hipMemoryTypeDevice)
++#else
++ if (ret == hipSuccess && attr.type == hipMemoryTypeDevice)
++#endif
+ {
+ return true;
+ }
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/adios2/2.7-fix-missing-cstdint-include.patch b/var/spack/repos/builtin/packages/adios2/2.7-fix-missing-cstdint-include.patch
new file mode 100644
index 0000000000..6b90d21005
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adios2/2.7-fix-missing-cstdint-include.patch
@@ -0,0 +1,24 @@
+From abbe0f81d78403a62444b1a76222b9a226fd17c6 Mon Sep 17 00:00:00 2001
+From: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
+Date: Mon, 22 Apr 2024 20:52:49 -0700
+Subject: [PATCH] fix py11bind stdint dep
+
+---
+ thirdparty/pybind11/pybind11/include/pybind11/pybind11.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h
+index fa98f7c18..6992c3d55 100644
+--- a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h
++++ b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h
+@@ -47,6 +47,7 @@
+ #include "detail/class.h"
+ #include "detail/init.h"
+
++#include <cstdint>
+ #include <memory>
+ #include <vector>
+ #include <string>
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py
index 98dbe189a6..8d9a0425fa 100644
--- a/var/spack/repos/builtin/packages/adios2/package.py
+++ b/var/spack/repos/builtin/packages/adios2/package.py
@@ -6,6 +6,7 @@
import os
import tempfile
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -26,10 +27,13 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version(
- "2.9.2",
- sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979",
+ "2.10.2",
+ sha256="14cf0bcd94772194bce0f2c0e74dba187965d1cffd12d45f801c32929158579e",
preferred=True,
)
+ version("2.10.1", sha256="ce776f3a451994f4979c6bd6d946917a749290a37b7433c0254759b02695ad85")
+ version("2.10.0", sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4")
+ version("2.9.2", sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979")
version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9")
version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1")
version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f")
@@ -37,11 +41,14 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
version("2.8.1", sha256="3f515b442bbd52e3189866b121613fe3b59edb8845692ea86fad83d1eba35d93")
version("2.8.0", sha256="5af3d950e616989133955c2430bd09bcf6bad3a04cf62317b401eaf6e7c2d479")
version("2.7.1", sha256="c8e237fd51f49d8a62a0660db12b72ea5067512aa7970f3fcf80b70e3f87ca3e")
- version("2.7.0", sha256="4b5df1a1f92d7ff380416dec7511cfcfe3dc44da27e486ed63c3e6cffb173924")
- version("2.6.0", sha256="45b41889065f8b840725928db092848b8a8b8d1bfae1b92e72f8868d1c76216c")
- version("2.5.0", sha256="7c8ff3bf5441dd662806df9650c56a669359cb0185ea232ecb3578de7b065329")
- version("2.4.0", sha256="50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2")
- version("2.3.1", sha256="3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893")
+ with default_args(deprecated=True):
+ version("2.7.0", sha256="4b5df1a1f92d7ff380416dec7511cfcfe3dc44da27e486ed63c3e6cffb173924")
+ version("2.6.0", sha256="45b41889065f8b840725928db092848b8a8b8d1bfae1b92e72f8868d1c76216c")
+ version("2.5.0", sha256="7c8ff3bf5441dd662806df9650c56a669359cb0185ea232ecb3578de7b065329")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
# There's not really any consistency about how static and shared libs are
# implemented across spack. What we're trying to support is specifically three
@@ -70,7 +77,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
variant("bzip2", default=True, when="@2.4:", description="Enable BZip2 compression")
variant("zfp", default=True, description="Enable ZFP compression")
variant("png", default=True, when="@2.4:", description="Enable PNG compression")
- variant("sz", default=True, description="Enable SZ compression")
+ variant("sz", default=True, when="@2.6:", description="Enable SZ compression")
variant("mgard", default=True, when="@2.8:", description="Enable MGARD compression")
# Rransport engines
@@ -81,6 +88,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
when="+shared",
description="Enable the DataMan engine for WAN transports",
)
+ variant("campaign", default=False, when="@2.10:", description="Enable campaign management")
variant("dataspaces", default=False, when="@2.5:", description="Enable support for DATASPACES")
variant("ssc", default=True, when="@:2.7", description="Enable the SSC staging engine")
variant("hdf5", default=False, description="Enable the HDF5 engine")
@@ -106,7 +114,6 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
# Requires mature C++11 implementations
conflicts("%gcc@:4.7")
conflicts("%intel@:15")
- conflicts("%pgi@:14")
# ifx does not support submodules in separate files
conflicts("%oneapi@:2022.1.0", when="+fortran")
@@ -117,9 +124,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cuda", when="+cuda ~kokkos")
# Kokkos support
- depends_on("kokkos@3.7: +cuda +wrapper", when="+kokkos +cuda")
- depends_on("kokkos@3.7: +rocm", when="+kokkos +rocm")
- depends_on("kokkos@3.7: +sycl", when="+kokkos +sycl")
+ with when("+kokkos"):
+ depends_on("kokkos@3.7:")
+ depends_on("kokkos +cuda +wrapper", when="+cuda")
+ depends_on("kokkos +rocm", when="+rocm")
+ depends_on("kokkos +sycl", when="+sycl")
# Propagate CUDA target to kokkos for +cuda
for cuda_arch in CudaPackage.cuda_arch_values:
@@ -144,7 +153,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+rocm", when="~kokkos", msg="ADIOS2 does not support HIP without Kokkos")
conflicts("+sycl", when="~kokkos", msg="ADIOS2 does not support SYCL without Kokkos")
- for _platform in ["linux", "darwin", "cray"]:
+ for _platform in ["linux", "darwin"]:
depends_on("pkgconfig", type="build", when=f"platform={_platform}")
variant(
"pic",
@@ -170,6 +179,8 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
depends_on("hdf5~mpi", when="+hdf5~mpi")
depends_on("hdf5+mpi", when="+hdf5+mpi")
+ depends_on("sqlite@3", when="+campaign")
+
depends_on("libpressio", when="+libpressio")
depends_on("c-blosc", when="+blosc")
depends_on("c-blosc2", when="+blosc2")
@@ -177,18 +188,26 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
depends_on("libpng@1.6:", when="+png")
depends_on("zfp@0.5.1:0.5", when="+zfp")
depends_on("sz@2.0.2.0:", when="+sz")
- depends_on("mgard", when="+mgard")
+ depends_on("mgard@2022-11-18:", when="+mgard")
+ depends_on("mgard@2023-01-10:", when="@2.9: +mgard")
extends("python", when="+python")
- depends_on("python@2.7:2.8,3.5:", when="@:2.4.0 +python", type=("build", "run"))
- depends_on("python@2.7:2.8,3.5:", when="@:2.4.0", type="test")
- depends_on("python@3.5:", when="@2.5.0: +python", type=("build", "run"))
- depends_on("python@3.5:", when="@2.5.0:", type="test")
+ depends_on("python", when="+python", type=("build", "run"))
+ depends_on("python@2.7:2.8,3.5:3.10", when="@:2.4.0 +python", type=("build", "run"))
+ depends_on("python@3.5:3.10", when="@2.5.0:2.7 +python", type=("build", "run"))
+
+ depends_on("python", type="test")
+ depends_on("python@2.7:2.8,3.5:3.10", when="@:2.4.0", type="test")
+ depends_on("python@3.5:3.10", when="@2.5.0:2.7", type="test")
+
depends_on("py-numpy@1.6.1:", when="+python", type=("build", "run"))
depends_on("py-mpi4py@2.0.0:", when="+mpi +python", type=("build", "run"))
depends_on("aws-sdk-cpp", when="+aws")
depends_on("libcatalyst@2", when="+libcatalyst")
+ # error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
+ conflicts("^python@3.11:", when="@:2.7")
+
# Fix findmpi when called by dependees
# See https://github.com/ornladios/ADIOS2/pull/1632
patch("cmake-update-findmpi.patch", when="@2.4.0")
@@ -200,17 +219,20 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
# Fix an unnecessary python dependency when testing is disabled
# See https://github.com/ornladios/ADIOS2/pull/2596
- patch("2.7-fix-python-test-deps.patch", when="@2.5.0:2.7.0")
+ patch("2.7-fix-python-test-deps.patch", when="@2.7.0")
# Fix unresolved symbols when built with gcc10.
# See https://github.com/ornladios/ADIOS2/pull/2714
patch("2.6-fix-gcc10-symbols.patch", when="@2.6.0")
+ # add missing include <cstdint>
+ patch("2.7-fix-missing-cstdint-include.patch", when="@2.7")
+
# Add missing include <memory>
# https://github.com/ornladios/adios2/pull/2710
patch(
"https://github.com/ornladios/adios2/pull/2710.patch?full_index=1",
- when="@:2.7.1",
+ when="@2.5:2.7.1",
sha256="8221073d1b2f8944395a88a5d60a15c7370646b62f5fc6309867bbb6a8c2096c",
)
@@ -220,7 +242,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
# cmake: find threads package first
# https://github.com/ornladios/ADIOS2/pull/3893
- patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9.2:")
+ patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9")
+
+ # ROCM: enable support for rocm >= 6
+ # https://github.com/ornladios/ADIOS2/pull/4214
+ patch("2.10-enable-rocm6.patch", when="@2.9.1:2.10.1")
@when("%fj")
def patch(self):
@@ -248,10 +274,12 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
from_variant("ADIOS2_USE_Blosc", "blosc"),
from_variant("ADIOS2_USE_Blosc2", "blosc2"),
from_variant("ADIOS2_USE_BZip2", "bzip2"),
+ from_variant("ADIOS2_USE_Campaign", "campaign"),
from_variant("ADIOS2_USE_DataMan", "dataman"),
from_variant("ADIOS2_USE_DataSpaces", "dataspaces"),
from_variant("ADIOS2_USE_Fortran", "fortran"),
from_variant("ADIOS2_USE_HDF5", "hdf5"),
+ from_variant("ADIOS2_USE_MGARD", "mgard"),
from_variant("ADIOS2_USE_MPI", "mpi"),
from_variant("ADIOS2_USE_PNG", "png"),
from_variant("ADIOS2_USE_Python", "python"),
@@ -270,10 +298,9 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
self.define("ADIOS2_BUILD_EXAMPLES", False),
self.define("ADIOS2_USE_Endian_Reverse", True),
self.define("ADIOS2_USE_IME", False),
- self.define("ADIOS2_USE_MGARD", False),
]
- if "+sst" in spec:
+ if spec.satisfies("+sst"):
args.extend(
[
# Broken dependency package
@@ -286,20 +313,16 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
]
)
- if "%fj" in spec:
+ if spec.satisfies("%fj"):
args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."])
- if "+python" in spec or self.run_tests:
- args.append(f"-DPYTHON_EXECUTABLE:FILEPATH={spec['python'].command.path}")
- args.append(f"-DPython_EXECUTABLE:FILEPATH={spec['python'].command.path}")
-
# hip support
- if "+cuda" in spec:
- args.append(self.builder.define_cuda_architectures(self))
+ if spec.satisfies("+cuda"):
+ args.append(CMakeBuilder.define_cuda_architectures(self))
# hip support
- if "+rocm" in spec:
- args.append(self.builder.define_hip_architectures(self))
+ if spec.satisfies("+rocm"):
+ args.append(CMakeBuilder.define_hip_architectures(self))
return args
@@ -308,18 +331,18 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
libs_to_seek = set()
- if "@2.6:" in spec:
+ if spec.satisfies("@2.6:"):
libs_to_seek.add("libadios2_core")
libs_to_seek.add("libadios2_c")
libs_to_seek.add("libadios2_cxx11")
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
libs_to_seek.add("libadios2_core_mpi")
libs_to_seek.add("libadios2_c_mpi")
libs_to_seek.add("libadios2_cxx11_mpi")
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran_mpi")
if "@2.7: +shared+hdf5" in spec and "@1.12:" in spec["hdf5"]:
@@ -327,7 +350,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
else:
libs_to_seek.add("libadios2")
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran")
return find_libraries(
@@ -349,7 +372,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
install test subdirectory for use during `spack test run`.
"""
extra_install_tests = [join_path("testing", "install", "C")]
- self.cache_extra_test_sources(extra_install_tests)
+ cache_extra_test_sources(self, extra_install_tests)
def test_run_executables(self):
"""Run installed adios2 executables"""
@@ -376,7 +399,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
std_cmake_args = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
mpi_exec = join_path(self.spec["mpi"].prefix, "bin", "mpiexec")
std_cmake_args.append(f"-DMPIEXEC_EXECUTABLE={mpi_exec}")
diff --git a/var/spack/repos/builtin/packages/adlbx/package.py b/var/spack/repos/builtin/packages/adlbx/package.py
index 8e8bddbfd8..b8d45aa586 100644
--- a/var/spack/repos/builtin/packages/adlbx/package.py
+++ b/var/spack/repos/builtin/packages/adlbx/package.py
@@ -19,6 +19,8 @@ class Adlbx(AutotoolsPackage):
version("0.9.2", sha256="524902d648001b689a98492402d754a607b8c1d0734699154063c1a4f3410d4a")
version("0.9.1", sha256="8913493fe0c097ff13c721ab057514e5bdb55f6318d4e3512692ab739c3190b3")
+ depends_on("c", type="build") # generated
+
depends_on("exmcutils@master", when="@master")
depends_on("exmcutils@:0.5.7", when="@:0.9.2")
depends_on("exmcutils", when="@0.9.1:")
diff --git a/var/spack/repos/builtin/packages/admixtools/package.py b/var/spack/repos/builtin/packages/admixtools/package.py
index 434ee26ecf..396c553977 100644
--- a/var/spack/repos/builtin/packages/admixtools/package.py
+++ b/var/spack/repos/builtin/packages/admixtools/package.py
@@ -23,6 +23,8 @@ class Admixtools(MakefilePackage):
version("1.0.1", sha256="ef3afff161e6a24c0857678373138edb1251c24d7b5308a07f10bdb0dedd44d0")
version("1.0", sha256="cf0d6950285e801e8a99c2a0b3dbbbc941a78e867af1767b1d002ec3f5803c4b")
+ depends_on("c", type="build") # generated
+
depends_on("lapack")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/adms/package.py b/var/spack/repos/builtin/packages/adms/package.py
index fac47fa602..e76aac4aa7 100644
--- a/var/spack/repos/builtin/packages/adms/package.py
+++ b/var/spack/repos/builtin/packages/adms/package.py
@@ -23,6 +23,8 @@ class Adms(AutotoolsPackage):
version("master", branch="master")
version("2.3.7", sha256="3a78e1283ecdc3f356410474b3ff44c4dcc82cb89772087fd3bbde8a1038ce08")
+ depends_on("c", type="build") # generated
+
depends_on("bison@2.5:", type="build")
depends_on("flex", type="build")
depends_on("perl-xml-libxml", type="build")
diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py
index 749adc5e3e..05528c665e 100644
--- a/var/spack/repos/builtin/packages/adol-c/package.py
+++ b/var/spack/repos/builtin/packages/adol-c/package.py
@@ -30,6 +30,9 @@ class AdolC(AutotoolsPackage):
version("2.5.1", sha256="dedb93c3bb291366d799014b04b6d1ec63ca4e7216edf16167776c07961e3b4a")
version("2.5.0", sha256="9d51c426d831884aac8f418be410c001eb62f3a11cb8f30c66af0b842edffb96")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"advanced_branching",
default=False,
@@ -84,12 +87,12 @@ class AdolC(AutotoolsPackage):
configure_args = []
- if "+boost" in spec:
+ if spec.satisfies("+boost"):
configure_args.append(f"--with-boost={spec['boost'].prefix}")
else:
configure_args.append("--with-boost=no")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
configure_args.append(f"--with-openmp-flag={self.compiler.openmp_flag}")
configure_args.extend(
@@ -104,14 +107,14 @@ class AdolC(AutotoolsPackage):
# We can simply use the bundled examples to check
# whether Adol-C works as expected
- if "+examples" in spec:
+ if spec.satisfies("+examples"):
configure_args.extend(
[
"--enable-docexa", # Documented examples
"--enable-addexa", # Additional examples
]
)
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
configure_args.append("--enable-parexa") # Parallel examples
return configure_args
@@ -127,11 +130,11 @@ class AdolC(AutotoolsPackage):
install(config_h, join_path(prefix.include, "adolc"))
# Install documentation to {prefix}/share
- if "+doc" in spec:
+ if spec.satisfies("+doc"):
install_tree(join_path("ADOL-C", "doc"), join_path(prefix.share, "doc"))
# Install examples to {prefix}/share
- if "+examples" in spec:
+ if spec.satisfies("+examples"):
install_tree(join_path("ADOL-C", "examples"), join_path(prefix.share, "examples"))
# Run some examples that don't require user input
@@ -145,8 +148,13 @@ class AdolC(AutotoolsPackage):
):
Executable("./checkpointing/checkpointing")()
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
with working_dir(
join_path(source_directory, "ADOL-C", "examples", "additional_examples")
):
Executable("./checkpointing/checkpointing")()
+
+ @property
+ def libs(self):
+ """The name of the library differs from the package name => own libs handling."""
+ return find_libraries(["libadolc"], root=self.prefix, shared=True, recursive=True)
diff --git a/var/spack/repos/builtin/packages/advancecomp/package.py b/var/spack/repos/builtin/packages/advancecomp/package.py
index 362de3ab52..7d28e0bd2c 100644
--- a/var/spack/repos/builtin/packages/advancecomp/package.py
+++ b/var/spack/repos/builtin/packages/advancecomp/package.py
@@ -15,12 +15,16 @@ class Advancecomp(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("2.6", sha256="799397b10d087d0147d6af117a5a473120f1369f0a3a3d68bf953abc0b749b75")
version("2.5", sha256="b6b4333453f028565896dd3547bc930f062df82832d7992cc130ca951c2890a1")
version("2.1", sha256="6113c2b6272334af710ba486e8312faa3cee5bd6dc8ca422d00437725e2b602a")
version("2.0", sha256="caa63332cd141db17988eb89c662cf76bdde72f60d4de7cb0fe8c7e51eb40eb7")
version("1.23", sha256="fe89d6ab382efc6b6be536b8d58113f36b83d82783d5215c261c14374cba800a")
version("1.22", sha256="b8c482027a5f78d9a7f871cbba19cc896ed61653d1d93034c9dbe55484952605")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/aegean/package.py b/var/spack/repos/builtin/packages/aegean/package.py
index 90d89a635f..3ba9b90233 100644
--- a/var/spack/repos/builtin/packages/aegean/package.py
+++ b/var/spack/repos/builtin/packages/aegean/package.py
@@ -17,8 +17,11 @@ class Aegean(MakefilePackage):
license("0BSD")
+ version("0.16.0", sha256="c6303ec58289f6c7bc4dd0edcd0e6c0bce4d95b21e25386f314f2b5e2f835812")
version("0.15.2", sha256="734c9dd23ab3415c3966083bfde5fb72c81e6ace84e08ee3fe0d4c338331d975")
+ depends_on("c", type="build") # generated
+
depends_on("genometools")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/aeskeyfind/package.py b/var/spack/repos/builtin/packages/aeskeyfind/package.py
index 5b8912c52d..a0d6373792 100644
--- a/var/spack/repos/builtin/packages/aeskeyfind/package.py
+++ b/var/spack/repos/builtin/packages/aeskeyfind/package.py
@@ -15,6 +15,8 @@ class Aeskeyfind(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("aeskeyfind", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/aespipe/package.py b/var/spack/repos/builtin/packages/aespipe/package.py
index 66580750f0..3c7cfa415b 100644
--- a/var/spack/repos/builtin/packages/aespipe/package.py
+++ b/var/spack/repos/builtin/packages/aespipe/package.py
@@ -10,7 +10,7 @@ class Aespipe(AutotoolsPackage):
"""aespipe program is AES encrypting or decrypting pipe. It reads from
standard input and writes to standard output."""
- homepage = "http://loop-aes.sourceforge.net/"
+ homepage = "https://sourceforge.net/projects/loop-aes/"
url = "https://sourceforge.net/projects/loop-aes/files/aespipe/v2.4f/aespipe-v2.4f.tar.bz2"
license("Intel")
@@ -22,3 +22,5 @@ class Aespipe(AutotoolsPackage):
version("2.4b", sha256="4f08611966998f66266f03d40d0597f94096164393c8f303b2dfd565e9d9b59d")
version("2.3e", sha256="4e63a5709fdd0bffdb555582f9fd7a0bd1842e429420159accaf7f60c5d3c70f")
version("2.3d", sha256="70330cd0710446c9ddf8148a7713fd73f1dc5e0b13fc4d3c75590305b2e3f008")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/agile/package.py b/var/spack/repos/builtin/packages/agile/package.py
index e2f31ed2a4..25fb024eca 100644
--- a/var/spack/repos/builtin/packages/agile/package.py
+++ b/var/spack/repos/builtin/packages/agile/package.py
@@ -21,6 +21,10 @@ class Agile(AutotoolsPackage):
version("1.5.1", sha256="e38536300060e4b845ccaaed824c7495944f9117a0d7e4ee74a18bf278e2012f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("hepmc")
depends_on("boost")
diff --git a/var/spack/repos/builtin/packages/agrep/package.py b/var/spack/repos/builtin/packages/agrep/package.py
index 505a248f11..ef87118313 100644
--- a/var/spack/repos/builtin/packages/agrep/package.py
+++ b/var/spack/repos/builtin/packages/agrep/package.py
@@ -20,6 +20,8 @@ class Agrep(MakefilePackage):
version("3.41", sha256="0508eafaf9725fc67cc955eb6d32ba4f50138443a4fea4275508d2c3f67a234e")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("agrep", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/akantu/package.py b/var/spack/repos/builtin/packages/akantu/package.py
index 46ebb5cec1..51addfaa10 100644
--- a/var/spack/repos/builtin/packages/akantu/package.py
+++ b/var/spack/repos/builtin/packages/akantu/package.py
@@ -26,6 +26,9 @@ class Akantu(CMakePackage):
version("master", branch="master")
version("3.0.0", sha256="7e8f64e25956eba44def1b2d891f6db8ba824e4a82ff0d51d6b585b60ab465db")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"external_solvers",
values=any_combination_of("mumps", "petsc"),
diff --git a/var/spack/repos/builtin/packages/albany/package.py b/var/spack/repos/builtin/packages/albany/package.py
index db7e3dbb02..dc8ea6dec0 100644
--- a/var/spack/repos/builtin/packages/albany/package.py
+++ b/var/spack/repos/builtin/packages/albany/package.py
@@ -14,13 +14,15 @@ class Albany(CMakePackage):
including fluid mechanics, solid mechanics (elasticity and plasticity),
ice-sheet flow, quantum device modeling, and many other applications."""
- homepage = "http://gahansen.github.io/Albany"
+ homepage = "https://gahansen.github.io/Albany"
git = "https://github.com/gahansen/Albany.git"
maintainers("gahansen")
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("lcm", default=True, description="Enable LCM")
variant("aeras", default=False, description="Enable AERAS")
variant("qcad", default=False, description="Enable QCAD")
diff --git a/var/spack/repos/builtin/packages/albert/package.py b/var/spack/repos/builtin/packages/albert/package.py
index 796a45fdf3..9d27edeb6f 100644
--- a/var/spack/repos/builtin/packages/albert/package.py
+++ b/var/spack/repos/builtin/packages/albert/package.py
@@ -16,6 +16,8 @@ class Albert(MakefilePackage):
version("4.0a_opt4", sha256="80b9ee774789c9cd123072523cfb693c443c3624708a58a5af177a51f36b2c79")
version("4.0a", sha256="caf49e24fb9bf2a09053d9bf022c4737ffe61d62ce9c6bc32aa03dded2a14913")
+ depends_on("cxx", type="build") # generated
+
depends_on("readline")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/alembic/package.py b/var/spack/repos/builtin/packages/alembic/package.py
index 4b081a988d..fd1ff6fe78 100644
--- a/var/spack/repos/builtin/packages/alembic/package.py
+++ b/var/spack/repos/builtin/packages/alembic/package.py
@@ -17,9 +17,12 @@ class Alembic(CMakePackage):
license("BSD-3-Clause")
+ version("1.8.6", sha256="c572ebdea3a5f0ce13774dd1fceb5b5815265cd1b29d142cf8c144b03c131c8c")
version("1.8.5", sha256="180a12f08d391cd89f021f279dbe3b5423b1db751a9898540c8059a45825c2e9")
version("1.7.16", sha256="2529586c89459af34d27a36ab114ad1d43dafd44061e65cfcfc73b7457379e7c")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Python support")
variant("hdf5", default=False, description="HDF5 support")
diff --git a/var/spack/repos/builtin/packages/alglib/package.py b/var/spack/repos/builtin/packages/alglib/package.py
index 2b2c39698d..5d830bf43a 100644
--- a/var/spack/repos/builtin/packages/alglib/package.py
+++ b/var/spack/repos/builtin/packages/alglib/package.py
@@ -16,10 +16,13 @@ class Alglib(MakefilePackage):
homepage = "https://www.alglib.net/"
url = "https://www.alglib.net/translator/re/alglib-3.11.0.cpp.gpl.tgz"
+ version("4.01.0", sha256="95e8ea41b32c92346f49a694759e786c5f3a1087b401a9259ef592c0eea4befb")
version("4.00.0", sha256="827b5f559713a3e8c7c1452ed1ffd5227adb9622d1a165ceb70c117c8ed3ccb4")
version("3.20.0", sha256="e7357f0f894313ff1b640ec9cb5e8b63f06d2d3411c2143a374aa0e9740da8a9")
version("3.11.0", sha256="34e391594aac89fb354bdaf58c42849489cd1199197398ba98bb69961f42bdb0")
+ depends_on("cxx", type="build") # generated
+
build_directory = "src"
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/all-library/package.py b/var/spack/repos/builtin/packages/all-library/package.py
new file mode 100644
index 0000000000..f9b3728928
--- /dev/null
+++ b/var/spack/repos/builtin/packages/all-library/package.py
@@ -0,0 +1,58 @@
+# Copyright 2013-2024 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.package import *
+
+
+class AllLibrary(CMakePackage):
+ """A Load Balancing Library (ALL)
+
+ The library aims to provide an easy way to include dynamic domain-based
+ load balancing into particle based simulation codes.
+ """
+
+ homepage = "http://slms.pages.jsc.fz-juelich.de/websites/all-website/"
+ url = "https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing/-/archive/v0.9.2/loadbalancing-v0.9.2.tar.gz"
+ git = "https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing.git"
+
+ maintainers("junghans")
+
+ license("BSD-3-Clause", checked_by="junghans")
+
+ version("master", branch="master")
+ version("0.9.2", sha256="2b4ef52c604c3c0c467712d0912a33c82177610b67edc14df1e034779c6ddb71")
+
+ variant("fortran", default=False, description="Build with fortran support")
+ variant("shared", default=True, description="Build shared libraries")
+ variant("vtk", default=False, description="Build with vtk support")
+ variant(
+ "voronoi",
+ default=False,
+ description="Enable voronoi-based loadbalancing scheme",
+ when="@0.9.3:",
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+ depends_on("vtk", when="+vtk")
+ depends_on("voropp", when="+voronoi")
+
+ depends_on("mpi")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CM_ALL_FORTRAN", "fortran"),
+ self.define_from_variant("CM_ALL_USE_F08", "fortran"),
+ self.define_from_variant("CM_ALL_VTK_OUTPUT", "vtk"),
+ self.define_from_variant("CM_ALL_VORONOI", "voronoi"),
+ ]
+
+ if self.run_tests:
+ args.append("-DCM_ALL_TESTS=ON")
+ args.append("-DCM_ALL_TESTS_INTEGRATION=ON")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/allpaths-lg/package.py b/var/spack/repos/builtin/packages/allpaths-lg/package.py
index f3be71e7a1..337ea8b7ac 100644
--- a/var/spack/repos/builtin/packages/allpaths-lg/package.py
+++ b/var/spack/repos/builtin/packages/allpaths-lg/package.py
@@ -15,6 +15,8 @@ class AllpathsLg(AutotoolsPackage):
version("52488", sha256="035b49cb21b871a6b111976757d7aee9c2513dd51af04678f33375e620998542")
+ depends_on("cxx", type="build") # generated
+
# compiles with gcc 4.7.0 to 4.9.4)
conflicts("%gcc@:4.6.4,5.1.0:")
conflicts("%cce")
@@ -22,6 +24,5 @@ class AllpathsLg(AutotoolsPackage):
conflicts("%clang")
conflicts("%intel")
conflicts("%nag")
- conflicts("%pgi")
conflicts("%xl")
conflicts("%xl_r")
diff --git a/var/spack/repos/builtin/packages/alluxio/package.py b/var/spack/repos/builtin/packages/alluxio/package.py
index dd266b9a6b..f946cab1c2 100644
--- a/var/spack/repos/builtin/packages/alluxio/package.py
+++ b/var/spack/repos/builtin/packages/alluxio/package.py
@@ -19,6 +19,7 @@ class Alluxio(Package):
license("CC0-1.0")
+ version("309", sha256="50e031ebc4de257f5676eb8b33029c3017a2c7d6864a0f5fbc68210963a8c3e1")
version("2.9.3", sha256="c71abc5e852d37cfd6b1dea076f056c6997e3f60fbb940bf005acb3a6354a369")
version("2.9.1", sha256="e9456db7a08488af22dee3a44e4135bc03a0444e31c7753bf00f72465f68ffb9")
diff --git a/var/spack/repos/builtin/packages/alpaka/package.py b/var/spack/repos/builtin/packages/alpaka/package.py
index 7a4b22c420..85eaea4f38 100644
--- a/var/spack/repos/builtin/packages/alpaka/package.py
+++ b/var/spack/repos/builtin/packages/alpaka/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class Alpaka(CMakePackage, CudaPackage):
"""Abstraction Library for Parallel Kernel Acceleration."""
- homepage = "https://alpaka.readthedocs.io"
+ homepage = "https://github.com/alpaka-group/alpaka"
url = "https://github.com/alpaka-group/alpaka/archive/refs/tags/0.6.0.tar.gz"
git = "https://github.com/alpaka-group/alpaka.git"
@@ -19,11 +19,37 @@ class Alpaka(CMakePackage, CudaPackage):
license("MPL-2.0-no-copyleft-exception")
version("develop", branch="develop")
- version("0.8.0", sha256="e01bc377a7657d9a3e0c5f8d3f83dffbd7d0b830283c59efcbc1fb98cf88de43")
- version("0.7.0", sha256="4b61119a7b3b073f281ba15b63430db98b77dbd9420bc290a114f80121fbdd97")
- version("0.6.0", sha256="7424ecaee3af15e587b327e983998410fa379c61d987bfe923c7e95d65db11a3")
- version("0.5.0", sha256="0ba08ea19961dd986160219ba00d6162fe7758980d88a606eff6494d7b3a6cd1")
- version("0.4.0", sha256="ad7905b13c22abcee4344ba225a65078e3f452ad45a9eda907e7d27c08315e46")
+ version("1.2.0", sha256="069ea68ac950b17cffb3a3e790973aa5115f07ab23c0247a167e815b3c6e6fa2")
+ version("1.1.0", sha256="95a8f1b706105d8a213116b6ba00e27bd904855c377f5a22a04aa0b86054dc35")
+ version("1.0.0", sha256="38223dc1ca5bcf3916ff91f8825fb8caab7047430877222847e0ceb93bffecc9")
+ version("0.9.0", sha256="3b2a5631366619fab5f3ceaf860219362f35db6c1148a601a3779a836cf29363")
+ version(
+ "0.8.0",
+ sha256="e01bc377a7657d9a3e0c5f8d3f83dffbd7d0b830283c59efcbc1fb98cf88de43",
+ deprecated=True,
+ )
+ version(
+ "0.7.0",
+ sha256="4b61119a7b3b073f281ba15b63430db98b77dbd9420bc290a114f80121fbdd97",
+ deprecated=True,
+ )
+ version(
+ "0.6.0",
+ sha256="7424ecaee3af15e587b327e983998410fa379c61d987bfe923c7e95d65db11a3",
+ deprecated=True,
+ )
+ version(
+ "0.5.0",
+ sha256="0ba08ea19961dd986160219ba00d6162fe7758980d88a606eff6494d7b3a6cd1",
+ deprecated=True,
+ )
+ version(
+ "0.4.0",
+ sha256="ad7905b13c22abcee4344ba225a65078e3f452ad45a9eda907e7d27c08315e46",
+ deprecated=True,
+ )
+
+ depends_on("cxx", type="build") # generated
variant(
"backend",
@@ -31,16 +57,16 @@ class Alpaka(CMakePackage, CudaPackage):
values=(
"serial",
"threads",
- "fiber",
"tbb",
"omp2_gridblock",
"omp2_blockthread",
- "omp5",
- "oacc",
"cuda",
"cuda_only",
"hip",
"hip_only",
+ "sycl_cpu",
+ "sycl_gpu",
+ "sycl_fpga",
),
description="Backends to enable",
default="serial",
@@ -48,28 +74,33 @@ class Alpaka(CMakePackage, CudaPackage):
variant("examples", default=False, description="Build alpaka examples")
- depends_on("boost")
- depends_on("boost+fiber", when="backend=fiber")
- depends_on("cmake@3.18:", when="@0.7.0:")
+ depends_on("boost@1.65.1:", when="@0.4.0:0.8.0")
+ depends_on("boost@1.74:", when="@0.9.0:")
+
+ depends_on("cmake@3.11.4:", when="@0.4.0")
+ depends_on("cmake@3.15:", when="@0.5.0:0.7.0")
+ depends_on("cmake@3.18:", when="@0.8.0:0.9.0")
+ depends_on("cmake@3.22:", when="@1.0.0:")
# make sure no other backend is enabled if using cuda_only or hip_only
for v in (
"serial",
"threads",
- "fiber",
"tbb",
- "oacc",
"omp2_gridblock",
"omp2_blockthread",
- "omp5",
"cuda",
"hip",
+ "sycl_cpu",
+ "sycl_gpu",
+ "sycl_fpga",
):
conflicts("backend=cuda_only,%s" % v)
conflicts("backend=hip_only,%s" % v)
conflicts("backend=cuda_only,hip_only")
- for v in ("omp2_blockthread", "omp2_blockthread", "omp5"):
- conflicts("backend=oacc,%s" % v)
+
+ for v in ("sycl_cpu", "sycl_gpu", "sycl_fpga"):
+ conflicts("backend=%s" % v, when="@0.9.0:")
# todo: add conflict between cuda 11.3 and gcc 10.3.0
# see https://github.com/alpaka-group/alpaka/issues/1297
@@ -77,32 +108,36 @@ class Alpaka(CMakePackage, CudaPackage):
def cmake_args(self):
spec = self.spec
args = []
- if "backend=serial" in spec:
+ if spec.satisfies("backend=serial"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE", True))
- if "backend=threads" in self.spec:
+ if self.spec.satisfies("backend=threads"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE", True))
- if "backend=fiber" in spec:
- args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE", True))
- if "backend=tbb" in spec:
+ if spec.satisfies("backend=tbb"):
args.append(self.define("ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE", True))
- if "backend=omp2_gridblock" in spec:
+ if spec.satisfies("backend=omp2_gridblock"):
args.append(self.define("ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE", True))
- if "backend=omp2_blockthread" in spec:
+ if spec.satisfies("backend=omp2_blockthread"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE", True))
- if "backend=omp5" in spec:
- args.append(self.define("ALPAKA_ACC_ANY_BT_OMP5_ENABLE", True))
- if "backend=oacc" in spec:
- args.append(self.define("ALPAKA_ACC_ANY_BT_OACC_ENABLE", True))
- if "backend=cuda" in spec:
+ if spec.satisfies("backend=cuda"):
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True))
- if "backend=cuda_only" in spec:
+ if spec.satisfies("backend=cuda_only"):
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True))
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ONLY_MODE", True))
- if "backend=hip" in spec:
+ if spec.satisfies("backend=hip"):
args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True))
- if "backend=hip_only" in spec:
+ if spec.satisfies("backend=hip_only"):
args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True))
args.append(self.define("ALPAKA_ACC_GPU_HIP_ONLY_MODE", True))
+ if spec.satisfies("backend=sycl_cpu"):
+ args.append(self.define("ALPAKA_ACC_SYCL_ENABLE", True))
+ args.append(self.define("ALPAKA_SYCL_ONEAPI_CPU", True))
+ if spec.satisfies("backend=sycl_gpu"):
+ args.append(self.define("ALPAKA_ACC_SYCL_ENABLE", True))
+ args.append(self.define("ALPAKA_SYCL_ONEAPI_GPU", True))
+ args.append(self.define("ALPAKA_SYCL_ONEAPI_GPU_DEVICES", "spir64"))
+ if spec.satisfies("backend=sycl_fpga"):
+ args.append(self.define("ALPAKA_ACC_SYCL_ENABLE", True))
+ args.append(self.define("ALPAKA_SYCL_ONEAPI_FPGA", True))
args.append(self.define_from_variant("alpaka_BUILD_EXAMPLES", "examples"))
# need to define, as it is explicitly declared as an option by alpaka:
diff --git a/var/spack/repos/builtin/packages/alquimia/package.py b/var/spack/repos/builtin/packages/alquimia/package.py
index 5fb67270a8..a1a525135e 100644
--- a/var/spack/repos/builtin/packages/alquimia/package.py
+++ b/var/spack/repos/builtin/packages/alquimia/package.py
@@ -21,8 +21,10 @@ class Alquimia(CMakePackage):
version("1.1.0", commit="211931c3e76b1ae7cdb48c46885b248412d6fe3d") # tag v1.1.0
version("1.0.10", commit="b2c11b6cde321f4a495ef9fcf267cb4c7a9858a0") # tag v.1.0.10
version("1.0.9", commit="2ee3bcfacc63f685864bcac2b6868b48ad235225") # tag v.1.0.9
- version("xsdk-0.6.0", commit="9a0aedd3a927d4d5e837f8fd18b74ad5a78c3821")
- version("xsdk-0.5.0", commit="8397c3b00a09534c5473ff3ab21f0e32bb159380")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("shared", default=True, description="Enables the build of shared libraries")
@@ -31,8 +33,6 @@ class Alquimia(CMakePackage):
depends_on("pflotran@5.0.0", when="@1.1.0")
depends_on("pflotran@4.0.1", when="@1.0.10")
depends_on("pflotran@3.0.2", when="@1.0.9")
- depends_on("pflotran@xsdk-0.6.0", when="@xsdk-0.6.0")
- depends_on("pflotran@xsdk-0.5.0", when="@xsdk-0.5.0")
depends_on("pflotran@develop", when="@develop")
depends_on("petsc@3.10:", when="@develop")
diff --git a/var/spack/repos/builtin/packages/alsa-lib/package.py b/var/spack/repos/builtin/packages/alsa-lib/package.py
index d9624e0dd4..e13b3c30d1 100644
--- a/var/spack/repos/builtin/packages/alsa-lib/package.py
+++ b/var/spack/repos/builtin/packages/alsa-lib/package.py
@@ -20,6 +20,8 @@ class AlsaLib(AutotoolsPackage):
version("1.2.2", sha256="d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec")
version("1.1.4.1", sha256="91bb870c14d1c7c269213285eeed874fa3d28112077db061a3af8010d0885b76")
+ depends_on("c", type="build") # generated
+
variant("python", default=False, description="enable python")
patch("python.patch", when="@1.1.4:1.1.5 +python")
diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py
index 63275c66ed..b5ca6aa3f5 100644
--- a/var/spack/repos/builtin/packages/aluminum/package.py
+++ b/var/spack/repos/builtin/packages/aluminum/package.py
@@ -33,6 +33,8 @@ class Aluminum(CachedCMakePackage, CudaPackage, ROCmPackage):
version("1.3.0", sha256="d0442efbebfdfb89eec793ae65eceb8f1ba65afa9f2e48df009f81985a4c27e3")
version("1.2.3", sha256="9b214bdf30f9b7e8e017f83e6615db6be2631f5be3dd186205dbe3aa62f4018a")
+ depends_on("cxx", type="build") # generated
+
# Library capabilities
variant(
"cuda_rma",
@@ -86,7 +88,6 @@ class Aluminum(CachedCMakePackage, CudaPackage, ROCmPackage):
# FIXME: Do we want to expose tuning parameters to the Spack
# recipe? Some are numeric values, some are on/off switches.
- conflicts("~cuda", when="+cuda_rma", msg="CUDA RMA support requires CUDA")
conflicts("+cuda", when="+rocm", msg="CUDA and ROCm support are mutually exclusive")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/amber/package.py b/var/spack/repos/builtin/packages/amber/package.py
index f72ce9bc4d..1eb8ca557d 100644
--- a/var/spack/repos/builtin/packages/amber/package.py
+++ b/var/spack/repos/builtin/packages/amber/package.py
@@ -148,7 +148,6 @@ class Amber(Package, CudaPackage):
conflicts(
"+openmp", when="%apple-clang", msg="OpenMP not available for the Apple clang compiler"
)
- conflicts("+openmp", when="%pgi", msg="OpenMP not available for the pgi compiler")
def url_for_version(self, version):
url = "file://{0}/Amber{1}.tar.bz2".format(os.getcwd(), version)
@@ -182,8 +181,6 @@ class Amber(Package, CudaPackage):
compiler = "gnu"
elif self.spec.satisfies("%intel"):
compiler = "intel"
- elif self.spec.satisfies("%pgi"):
- compiler = "pgi"
elif self.spec.satisfies("%nvhpc"):
compiler = "pgi"
elif self.spec.satisfies("%clang"):
diff --git a/var/spack/repos/builtin/packages/ambertools/package.py b/var/spack/repos/builtin/packages/ambertools/package.py
new file mode 100644
index 0000000000..f680b43ce6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ambertools/package.py
@@ -0,0 +1,88 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Ambertools(CMakePackage):
+ """AmberTools is a free, useful standalone package and a prerequisite
+ for installing Amber itself. The AmberTools suite is free of charge,
+ and its components are mostly released under the GNU General Public
+ License (GPL). A few components are included that are in the public
+ domain or which have other, open-source, licenses. The libsander and
+ libpbsa libraries use the LGPL license."""
+
+ homepage = "https://ambermd.org/AmberTools.php"
+ url = "https://ambermd.org/downloads/AmberTools22jlmrcc.tar.bz2"
+
+ maintainers("d-beltran")
+
+ version("22jlmrcc", sha256="1571d4e0f7d45b2a71dce5999fa875aea8c90ee219eb218d7916bf30ea229121")
+
+ depends_on("flex", type="build")
+ depends_on("bison", type="build")
+ depends_on("tcsh", type="build")
+ depends_on("zlib", type=("build", "run"))
+ depends_on("bzip2", type=("build", "run"))
+ depends_on("blas", type=("build", "run"))
+ depends_on("lapack", type=("build", "run"))
+ depends_on("arpack-ng", type=("build", "run"))
+ depends_on("netcdf-c", type=("build", "run"))
+ depends_on("netcdf-fortran", type=("build", "run"))
+ depends_on("fftw", type=("build", "run"))
+ depends_on("readline", type=("build", "run"))
+ depends_on("netlib-xblas~plain_blas", type=("build", "run"))
+ # Specific variants needed for boost according to build logs
+ depends_on(
+ "boost+thread+system+program_options+iostreams+regex+timer+chrono+filesystem+graph",
+ type=("build", "run"),
+ )
+ # Python dependencies
+ depends_on("python@3.8:3.10 +tkinter", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+
+ def cmake_args(self):
+ # Translated from ambertools build/run_cmake script
+ # We also add the TRUST_SYSTEM_LIBS argument mentioned in the ambertools guide
+ # https://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Guide-to-Options
+ args = [
+ self.define("COMPILER", "GNU"),
+ self.define("MPI", False),
+ self.define("CUDA", False),
+ self.define("INSTALL_TESTS", True),
+ self.define("DOWNLOAD_MINICONDA", False),
+ self.define("TRUST_SYSTEM_LIBS", True),
+ # This is to avoid the x11 (X11_Xext_LIB) error
+ # It is equivalent to the "-noX11" flag accoridng to the docs:
+ # https://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Common-Options
+ self.define("BUILD_GUI", False),
+ ]
+ return args
+
+ def setup_run_environment(self, env):
+ env.set("AMBER_PREFIX", self.prefix)
+ env.set("AMBERHOME", self.prefix)
+
+ def setup_build_environment(self, env):
+ env.set("AMBER_PREFIX", self.prefix)
+ env.set("AMBERHOME", self.prefix)
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check_install(self):
+ make("test.serial")
+
+ # Temporarily copy netcdf.h header file to netcdf-fortran/include to pass the Ambertools
+ # cmake check (quickest fix, will probably cause problems, needs to change)
+ @run_before("cmake")
+ def fix_check(self):
+ cp = Executable("cp")
+ cp(
+ self.spec["netcdf-c"].headers.directories[0] + "/netcdf.h",
+ self.spec["netcdf-fortran"].headers.directories[0],
+ )
diff --git a/var/spack/repos/builtin/packages/amd-aocl/package.py b/var/spack/repos/builtin/packages/amd-aocl/package.py
index b37da1b9cb..85f7148c81 100644
--- a/var/spack/repos/builtin/packages/amd-aocl/package.py
+++ b/var/spack/repos/builtin/packages/amd-aocl/package.py
@@ -24,6 +24,8 @@ class AmdAocl(BundlePackage):
maintainers("amd-toolchain-support")
+ version("5.0", preferred=True)
+ version("4.2")
version("4.1")
version("4.0")
version("3.2")
@@ -37,17 +39,32 @@ class AmdAocl(BundlePackage):
depends_on("amdblis threads=openmp")
depends_on("amdfftw +openmp")
depends_on("amdlibflame threads=openmp")
+ depends_on("aocl-sparse +openmp")
+ depends_on("aocl-da +openmp")
+ depends_on("aocl-compression +openmp")
with when("~openmp"):
depends_on("amdblis threads=none")
depends_on("amdfftw ~openmp")
depends_on("amdlibflame threads=none")
+ depends_on("aocl-sparse ~openmp")
+ depends_on("aocl-da ~openmp")
+ depends_on("aocl-compression ~openmp")
- for vers in ("2.2", "3.0", "3.1", "3.2", "4.0", "4.1"):
- with when(f"@{vers}"):
- depends_on(f"amdblis@{vers}")
- depends_on(f"amdfftw@{vers}")
- depends_on(f"amdlibflame@{vers}")
- depends_on(f"amdlibm@{vers}")
- depends_on(f"amdscalapack@{vers}")
- depends_on(f"aocl-sparse@{vers}")
+ for vers in ["2.2", "3.0", "3.1", "3.2", "4.0", "4.1", "4.2", "5.0"]:
+ with when(f"@={vers}"):
+ depends_on(f"amdblis@={vers}")
+ depends_on(f"amdfftw@={vers}")
+ depends_on(f"amdlibflame@={vers}")
+ depends_on("amdlibflame ^[virtuals=blas] amdblis")
+ depends_on(f"amdlibm@={vers}")
+ depends_on(f"amdscalapack@={vers}")
+ depends_on("amdscalapack ^[virtuals=blas] amdblis")
+ depends_on("amdscalapack ^[virtuals=lapack] amdlibflame")
+ depends_on(f"aocl-sparse@={vers}")
+ if Version(vers) >= Version("4.2"):
+ depends_on(f"aocl-compression@={vers}")
+ depends_on(f"aocl-crypto@={vers}")
+ depends_on(f"aocl-libmem@={vers}")
+ if Version(vers) >= Version("5.0"):
+ depends_on(f"aocl-da@={vers}")
diff --git a/var/spack/repos/builtin/packages/amdblis/blis-4.0_gcc_clang_znver4.patch b/var/spack/repos/builtin/packages/amdblis/blis-4.0_gcc_clang_znver4.patch
new file mode 100644
index 0000000000..31f71bf8c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdblis/blis-4.0_gcc_clang_znver4.patch
@@ -0,0 +1,55 @@
+diff -Naur a/config/zen4/make_defs.mk b/config/zen4/make_defs.mk
+--- a/config/zen4/make_defs.mk 2022-11-12 13:05:45.000000000 +0000
++++ b/config/zen4/make_defs.mk 2023-05-12 14:40:10.848359434 +0000
+@@ -73,6 +73,15 @@
+
+
+ # gcc 11.0 or later:
++ifeq ($(shell test $(GCC_VERSION) -ge 13; echo $$?),0)
++ifneq ($(DEBUG_TYPE),noopt)
++CKOPTFLAGS := -O2 -fgcse-after-reload -fipa-cp-clone -floop-interchange -floop-unroll-and-jam -fpeel-loops -fpredictive-commoning -fsplit-loops -fsplit-paths -ftree-loop-distribution -funswitch-loops -fvect-cost-model=dynamic -fversion-loops-for-strides -fomit-frame-pointer
++endif
++
++CKVECFLAGS += -march=znver4 -mfpmath=sse
++CRVECFLAGS += -march=znver4
++
++else
+ ifeq ($(shell test $(GCC_VERSION) -ge 11; echo $$?),0)
+ # Update CKOPTFLAGS for gcc 11+ to use O3 optimization without
+ # -ftree-partial-pre flag. This flag results in suboptimal code
+@@ -100,6 +109,7 @@
+ endif # GCC 8
+ endif # GCC 9
+ endif # GCC 11
++endif # GCC 13
+ else
+ ifeq ($(CC_VENDOR),clang)
+
+@@ -132,6 +142,16 @@
+ #if compiling with clang
+ VENDOR_STRING := $(strip $(shell ${CC_VENDOR} --version | egrep -o '[0-9]+\.[0-9]+\.?[0-9]*'))
+ CC_MAJOR := $(shell (echo ${VENDOR_STRING} | cut -d. -f1))
++#clang 16 or later:
++ifeq ($(shell test $(CC_MAJOR) -ge 16; echo $$?),0)
++CKVECFLAGS += -march=znver4
++CRVECFLAGS += -march=znver4
++else
++#clang 12 or later:
++ifeq ($(shell test $(CC_MAJOR) -ge 12; echo $$?),0)
++CKVECFLAGS += -march=znver3 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mavx512bf16 -mfpmath=sse -falign-loops=64
++CRVECFLAGS += -march=znver3
++else
+ #clang 9.0 or later:
+ ifeq ($(shell test $(CC_MAJOR) -ge 9; echo $$?),0)
+ CKVECFLAGS += -march=znver2
+@@ -139,7 +159,9 @@
+ else
+ CKVECFLAGS += -march=znver1
+ CRVECFLAGS += -march=znver1
+-endif # ge 9
++endif # clang 9
++endif # clang 12
++endif # clang 16
+ endif # aocc 2
+ endif # aocc 3
+ endif # aocc 4
diff --git a/var/spack/repos/builtin/packages/amdblis/package.py b/var/spack/repos/builtin/packages/amdblis/package.py
index 5492f54b4b..85264dcf35 100644
--- a/var/spack/repos/builtin/packages/amdblis/package.py
+++ b/var/spack/repos/builtin/packages/amdblis/package.py
@@ -5,8 +5,6 @@
import os
-from llnl.util import tty
-
from spack.package import *
from spack.pkg.builtin.blis import BlisBase
@@ -23,7 +21,7 @@ class Amdblis(BlisBase):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-BLIS license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/dense/eula/blas-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/dense/eula/blas-4-2-eula.html
https://www.amd.com/en/developer/aocl/dense/eula/blas-eula.html
"""
@@ -38,6 +36,12 @@ class Amdblis(BlisBase):
license("BSD-3-Clause")
+ version(
+ "5.0",
+ sha256="5abb34972b88b2839709d0af8785662bc651c7806ccfa41d386d93c900169bc2",
+ preferred=True,
+ )
+ version("4.2", sha256="0e1baf850ba0e6f99e79f64bbb0a59fcb838ddb5028e24527f52b407c3c62963")
version("4.1", sha256="a05c6c7d359232580d1d599696053ad0beeedf50f3b88d5d22ee7d34375ab577")
version("4.0", sha256="cddd31176834a932753ac0fc4c76332868feab3e9ac607fa197d8b44c1e74a41")
version("3.2", sha256="5a400ee4fc324e224e12f73cc37b915a00f92b400443b15ce3350278ad46fff6")
@@ -46,26 +50,21 @@ class Amdblis(BlisBase):
version("3.0", sha256="ac848c040cd6c3550fe49148dbdf109216cad72d3235763ee7ee8134e1528517")
version("2.2", sha256="e1feb60ac919cf6d233c43c424f6a8a11eab2c62c2c6e3f2652c15ee9063c0c9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("ilp64", default=False, when="@3.0.1:", description="ILP64 support")
variant("aocl_gemm", default=False, when="@4.1:", description="aocl_gemm support")
variant("suphandling", default=True, description="Small Unpacked Kernel handling")
+ variant("logging", default=False, description="Enable AOCL DTL Logging")
+ variant("tracing", default=False, description="Enable AOCL DTL Tracing")
+
def configure_args(self):
spec = self.spec
args = super().configure_args()
- if not (
- spec.satisfies(r"%aocc@3.2:4.1")
- or spec.satisfies(r"%gcc@12.2:13.1")
- or spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
-
if spec.satisfies("+ilp64"):
args.append("--blas-int-size=64")
@@ -87,9 +86,23 @@ class Amdblis(BlisBase):
elif spec.satisfies("@3.0.1: %aocc"):
args.append("--complex-return=intel")
- if spec.satisfies("@3.1:"):
+ if spec.satisfies("@3.1"):
args.append("--disable-aocl-dynamic")
+ if spec.satisfies("+logging"):
+ filter_file(
+ "#define AOCL_DTL_LOG_ENABLE 0",
+ "#define AOCL_DTL_LOG_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
+ if spec.satisfies("+tracing"):
+ filter_file(
+ "#define AOCL_DTL_TRACE_ENABLE 0",
+ "#define AOCL_DTL_TRACE_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
return args
@run_after("install")
@@ -99,3 +112,12 @@ class Amdblis(BlisBase):
os.symlink("libblis-mt.a", "libblis.a")
if os.path.isfile("libblis-mt.so"):
os.symlink("libblis-mt.so", "libblis.so")
+
+ @property
+ def libs(self):
+ return find_libraries(
+ ["libblis"] if self.spec.satisfies("threads=none") else ["libblis-mt"],
+ root=self.prefix,
+ shared=self.spec.satisfies("libs=shared"),
+ recursive=True,
+ )
diff --git a/var/spack/repos/builtin/packages/amdfftw/amdfftw40-clang.patch b/var/spack/repos/builtin/packages/amdfftw/amdfftw40-clang.patch
new file mode 100644
index 0000000000..b475027a33
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdfftw/amdfftw40-clang.patch
@@ -0,0 +1,11 @@
+diff -Nur amd-fftw-4.0/kernel/cpy2d-pair.c amd-fftw-4.0-new/kernel/cpy2d-pair.c
+--- amd-fftw-4.0/kernel/cpy2d-pair.c 2022-11-11 16:52:26.000000000 +0530
++++ amd-fftw-4.0-new/kernel/cpy2d-pair.c 2023-05-12 00:09:10.408511128 +0530
+@@ -21,6 +21,7 @@
+
+ /* out of place copy routines for pairs of isomorphic 2D arrays */
+ #include "kernel/ifftw.h"
++#include <string.h>
+
+ #ifdef AMD_OPT_ALL
+ #include "immintrin.h"
diff --git a/var/spack/repos/builtin/packages/amdfftw/package.py b/var/spack/repos/builtin/packages/amdfftw/package.py
index 93ca30265d..56089c214b 100644
--- a/var/spack/repos/builtin/packages/amdfftw/package.py
+++ b/var/spack/repos/builtin/packages/amdfftw/package.py
@@ -5,8 +5,7 @@
import os
-from llnl.util import tty
-
+from spack.build_environment import optimization_flags
from spack.package import *
from spack.pkg.builtin.fftw import FftwBase
@@ -28,7 +27,7 @@ class Amdfftw(FftwBase):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-FFTW license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/fftw/eula/fftw-libraries-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/fftw/eula/fftw-libraries-4-2-eula.html
https://www.amd.com/en/developer/aocl/fftw/eula/fftw-libraries-eula.html
"""
@@ -41,6 +40,12 @@ class Amdfftw(FftwBase):
license("GPL-2.0-only")
+ version(
+ "5.0",
+ sha256="bead6c08309a206f8a6258971272affcca07f11eb57b5ecd8496e2e7e3ead877",
+ preferred=True,
+ )
+ version("4.2", sha256="391ef7d933e696762e3547a35b58ab18d22a6cf3e199c74889bcf25a1d1fc89b")
version("4.1", sha256="f1cfecfcc0729f96a5bd61c6b26f3fa43bb0662d3fff370d4f73490c60cf4e59")
version("4.0", sha256="5f02cb05f224bd86bd88ec6272b294c26dba3b1d22c7fb298745fd7b9d2271c0")
version("3.2", sha256="31cab17a93e03b5b606e88dd6116a1055b8f49542d7d0890dbfcca057087b8d0")
@@ -49,6 +54,9 @@ class Amdfftw(FftwBase):
version("3.0", sha256="a69deaf45478a59a69f77c4f7e9872967f1cfe996592dd12beb6318f18ea0bcd")
version("2.2", sha256="de9d777236fb290c335860b458131678f75aa0799c641490c644c843f0e246f8")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
variant("openmp", default=True, description="Enable OpenMP support")
variant("threads", default=False, description="Enable SMP threads support")
@@ -103,7 +111,7 @@ class Amdfftw(FftwBase):
depends_on("texinfo")
- provides("fftw-api@3", when="@2:")
+ provides("fftw-api@3")
conflicts(
"precision=quad",
@@ -149,6 +157,13 @@ class Amdfftw(FftwBase):
requires("target=x86_64:", msg="AMD FFTW available only on x86_64")
+ def flag_handler(self, name, flags):
+ (flags, _, _) = super().flag_handler(name, flags)
+ if name == "cflags":
+ if self.spec.satisfies("%gcc@14:"):
+ flags.append("-Wno-incompatible-pointer-types")
+ return (flags, None, None)
+
def configure(self, spec, prefix):
"""Configure function"""
# Base options
@@ -157,31 +172,19 @@ class Amdfftw(FftwBase):
# Dynamic dispatcher builds a single portable optimized library
# that can execute on different x86 CPU architectures.
# It is supported for GCC compiler and Linux based systems only.
- if "+amd-dynamic-dispatcher" in spec:
+ if spec.satisfies("+amd-dynamic-dispatcher"):
options.append("--enable-dynamic-dispatcher")
# Check if compiler is AOCC
- if "%aocc" in spec:
+ if spec.satisfies("%aocc"):
options.append("CC={0}".format(os.path.basename(spack_cc)))
options.append("FC={0}".format(os.path.basename(spack_fc)))
options.append("F77={0}".format(os.path.basename(spack_fc)))
- if not (
- spec.satisfies(r"%aocc@3.2:4.1")
- or spec.satisfies(r"%gcc@12.2:13.1")
- or spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
-
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
options.append("--enable-debug")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.append("--enable-mpi")
options.append("--enable-amd-mpifft")
else:
@@ -205,17 +208,14 @@ class Amdfftw(FftwBase):
# variable to set AMD_ARCH configure option.
# Spack user can not directly use AMD_ARCH for this purpose but should
# use target variable to set appropriate -march option in AMD_ARCH.
- arch = spec.architecture
- options.append(
- "AMD_ARCH={0}".format(arch.target.optimization_flags(spec.compiler).split("=")[-1])
- )
+ options.append(f"AMD_ARCH={optimization_flags(self.compiler, spec.target)}")
# Specific SIMD support.
# float and double precisions are supported
simd_features = ["sse2", "avx", "avx2", "avx512"]
# "avx512" is supported from amdfftw 4.0 version onwards
- if "@2.2:3.2" in self.spec:
+ if self.spec.satisfies("@2.2:3.2"):
simd_features.remove("avx512")
simd_options = []
diff --git a/var/spack/repos/builtin/packages/amdlibflame/libflame-pkgconfig.patch b/var/spack/repos/builtin/packages/amdlibflame/libflame-pkgconfig.patch
new file mode 100644
index 0000000000..579d2e6720
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdlibflame/libflame-pkgconfig.patch
@@ -0,0 +1,29 @@
+diff -Naru a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2024-02-26 18:26:37.000000000 +0000
++++ b/CMakeLists.txt 2024-03-19 20:48:44.099094687 +0000
+@@ -1197,3 +1197,12 @@
+ PROPERTY ADDITIONAL_CLEAN_FILES
+ ${CMAKE_SOURCE_DIR}/build/FLA_config.h ${CMAKE_SOURCE_DIR}/include/
+ )
++
++# pkgconfig file
++set (prefix ${CMAKE_INSTALL_PREFIX})
++set (VERSION 4.2)
++configure_file (flame.pc.in flame.pc @ONLY)
++install (FILES
++ ${CMAKE_CURRENT_BINARY_DIR}/flame.pc
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig
++ COMPONENT Development)
+diff -Naru a/flame.pc.in b/flame.pc.in
+--- a/flame.pc.in 1970-01-01 00:00:00.000000000 +0000
++++ b/flame.pc.in 2024-03-19 20:48:51.112058421 +0000
+@@ -0,0 +1,9 @@
++prefix=@prefix@
++libdir=${prefix}/lib
++includedir=${prefix}/include
++
++Name: libFLAME
++Description: AMD-optimized libFLAME library
++Version: @VERSION@
++Libs: -L${libdir} -lflame
++Cflags: -I${includedir}
diff --git a/var/spack/repos/builtin/packages/amdlibflame/package.py b/var/spack/repos/builtin/packages/amdlibflame/package.py
index 8dd7aa57f2..d74fc4be91 100644
--- a/var/spack/repos/builtin/packages/amdlibflame/package.py
+++ b/var/spack/repos/builtin/packages/amdlibflame/package.py
@@ -3,15 +3,14 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# ----------------------------------------------------------------------------\
-import os
-
-from llnl.util import tty
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
from spack.pkg.builtin.libflame import LibflameBase
-class Amdlibflame(LibflameBase):
+class Amdlibflame(CMakePackage, LibflameBase):
"""libFLAME (AMD Optimized version) is a portable library for
dense matrix computations, providing much of the functionality
present in Linear Algebra Package (LAPACK). It includes a
@@ -36,7 +35,7 @@ class Amdlibflame(LibflameBase):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-libFLAME license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/dense/eula-libflame/libflame-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/dense/eula-libflame/libflame-4-2-eula.html
https://www.amd.com/en/developer/aocl/dense/eula-libflame/libflame-eula.html
"""
@@ -49,6 +48,12 @@ class Amdlibflame(LibflameBase):
license("BSD-3-Clause")
+ version(
+ "5.0",
+ sha256="3bee3712459a8c5bd728a521d8a4c8f46735730bf35d48c878d2fc45fc000918",
+ preferred=True,
+ )
+ version("4.2", sha256="93a433c169528ffba74a99df0ba3ce3d5b1fab9bf06ce8d2fd72ee84768ed84c")
version("4.1", sha256="8aed69c60d11cc17e058cabcb8a931cee4f343064ade3e73d3392b7214624b61")
version("4.0", sha256="bcb05763aa1df1e88f0da5e43ff86d956826cbea1d9c5ff591d78a3e091c66a4")
version("3.2", sha256="6b5337fb668b82d0ed0a4ab4b5af4e2f72e4cedbeeb4a8b6eb9a3ef057fb749a")
@@ -57,9 +62,33 @@ class Amdlibflame(LibflameBase):
version("3.0", sha256="d94e08b688539748571e6d4c1ec1ce42732eac18bd75de989234983c33f01ced")
version("2.2", sha256="12b9c1f92d2c2fa637305aaa15cf706652406f210eaa5cbc17aaea9fcfa576dc")
- variant("ilp64", default=False, description="Build with ILP64 support")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("ilp64", default=False, when="@3.0.1: ", description="Build with ILP64 support")
+ variant(
+ "vectorization",
+ default="auto",
+ when="@4.2:",
+ values=("auto", "avx2", "avx512", "none"),
+ multi=False,
+ description="Use hardware vectorization support",
+ )
+
+ variant("logging", default="False", description="Enable AOCL DTL Logging")
+ variant("tracing", default="False", description="Enable AOCL DTL Tracing")
+
+ # Build system
+ build_system(
+ conditional("cmake", when="@4.2:"), conditional("autotools", when="@:4.1"), default="cmake"
+ )
+
+ # Required dependencies
+ with when("build_system=cmake"):
+ generator("make")
+ depends_on("cmake@3.22:", type="build")
- conflicts("+ilp64", when="@:3.0.0", msg="ILP64 is supported from 3.0.1 onwards")
conflicts("threads=pthreads", msg="pthread is not supported")
conflicts("threads=openmp", when="@:3", msg="openmp is not supported by amdlibflame < 4.0")
requires("target=x86_64:", msg="AMD libflame available only on x86_64")
@@ -67,12 +96,16 @@ class Amdlibflame(LibflameBase):
patch("aocc-2.2.0.patch", when="@:2", level=1)
patch("cray-compiler-wrapper.patch", when="@:3.0.0", level=1)
patch("supermat.patch", when="@4.0:4.1", level=1)
+ patch("libflame-pkgconfig.patch", when="@4.2")
provides("flame@5.2", when="@2:")
depends_on("python+pythoncmd", type="build")
depends_on("gmake@4:", when="@3.0.1,3.1:", type="build")
- depends_on("aocl-utils", type=("build"), when="@4.1: ")
+
+ for vers in ["4.1", "4.2", "5.0"]:
+ with when(f"@{vers}"):
+ depends_on(f"aocl-utils@{vers}")
@property
def lapack_libs(self):
@@ -90,66 +123,117 @@ class Amdlibflame(LibflameBase):
def flag_handler(self, name, flags):
if name == "cflags":
+ if (
+ self.spec.satisfies("%clang@16:")
+ or self.spec.satisfies("%aocc@4.1.0:")
+ or self.spec.satisfies("%gcc@14:")
+ ):
+ flags.append("-Wno-implicit-function-declaration")
if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%aocc@4.1.0:"):
flags.append("-Wno-error=incompatible-function-pointer-types")
- flags.append("-Wno-implicit-function-declaration")
flags.append("-Wno-sometimes-uninitialized")
+ if name == "ldflags":
+ if self.spec.satisfies("^aocl-utils~shared"):
+ flags.append("-lstdc++")
return (flags, None, None)
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ spec = self.spec
+ args = [self.define("LIBAOCLUTILS_INCLUDE_PATH", spec["aocl-utils"].prefix.include)]
+ aocl_utils_lib_path = spec["aocl-utils"].libs
+ args.append("-DLIBAOCLUTILS_LIBRARY_PATH={0}".format(aocl_utils_lib_path))
+ # From 3.2 version, amd optimized flags are encapsulated under:
+ # ENABLE_AMD_AOCC_FLAGS for AOCC compiler
+ # ENABLE_AMD_FLAGS for all other compilers
+ if spec.satisfies("@3.2:"):
+ if spec.satisfies("%aocc"):
+ args.append(self.define("ENABLE_AMD_AOCC_FLAGS", True))
+ else:
+ args.append(self.define("ENABLE_AMD_FLAGS", True))
+
+ if spec.satisfies("threads=none"):
+ args.append(self.define("ENABLE_MULTITHREADING", False))
+
+ if spec.satisfies("@3.0.1: +ilp64"):
+ args.append(self.define("ENABLE_ILP64", True))
+
+ if spec.satisfies("@4.2: ^[virtuals=blas] amdblis"):
+ args.append(self.define("ENABLE_AOCL_BLAS", True))
+ args.append("-DAOCL_ROOT:PATH={0}".format(spec["blas"].prefix))
+
+ if spec.variants["vectorization"].value == "auto":
+ if spec.satisfies("target=avx512"):
+ args.append("-DLF_ISA_CONFIG=avx512")
+ elif spec.satisfies("target=avx2"):
+ args.append("-DLF_ISA_CONFIG=avx2")
+ else:
+ args.append("-DLF_ISA_CONFIG=none")
+ else:
+ args.append(self.define("LF_ISA_CONFIG", spec.variants["vectorization"].value))
+
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+
+ return args
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
"""configure_args function"""
- args = super().configure_args()
-
- if not (
- self.spec.satisfies(r"%aocc@3.2:4.1")
- or self.spec.satisfies(r"%gcc@12.2:13.1")
- or self.spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
+ args = self.pkg.configure_args()
+ spec = self.spec
# From 3.2 version, amd optimized flags are encapsulated under:
# enable-amd-aocc-flags for AOCC compiler
# enable-amd-flags for all other compilers
- if "@3.2:" in self.spec:
- if "%aocc" in self.spec:
+ if spec.satisfies("@3.2: "):
+ if spec.satisfies("%aocc"):
args.append("--enable-amd-aocc-flags")
else:
args.append("--enable-amd-flags")
- if "@:3.1" in self.spec:
+ if spec.satisfies("@:3.1"):
args.append("--enable-external-lapack-interfaces")
- if "@3.1" in self.spec:
+ if spec.satisfies("@3.1"):
args.append("--enable-blas-ext-gemmt")
- if "@3.1 %aocc" in self.spec:
+ if spec.satisfies("@3.1 %aocc"):
args.append("--enable-void-return-complex")
- if "@3.0:3.1 %aocc" in self.spec:
+ if spec.satisfies("@3.0:3.1 %aocc"):
"""To enabled Fortran to C calling convention for
complex types when compiling with aocc flang"""
args.append("--enable-f2c-dotc")
- if "@3.0.1: +ilp64" in self.spec:
+ if spec.satisfies("@3.0.1: +ilp64"):
args.append("--enable-ilp64")
- if "@4.1:" in self.spec:
- args.append("CFLAGS=-I{0}".format(self.spec["aocl-utils"].prefix.include))
- aocl_utils_lib_path = os.path.join(
- self.spec["aocl-utils"].prefix.lib, "libaoclutils.a"
- )
+ if spec.satisfies("@4.1:"):
+ args.append("CFLAGS=-I{0}".format(spec["aocl-utils"].prefix.include))
+ aocl_utils_lib_path = spec["aocl-utils"].libs
args.append("LIBAOCLUTILS_LIBRARY_PATH={0}".format(aocl_utils_lib_path))
+ if spec.satisfies("+tracing"):
+ filter_file(
+ "#define AOCL_DTL_TRACE_ENABLE 0",
+ "#define AOCL_DTL_TRACE_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
+ if spec.satisfies("+logging"):
+ filter_file(
+ "#define AOCL_DTL_LOG_ENABLE 0",
+ "#define AOCL_DTL_LOG_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
return args
@when("@4.1:")
- def build(self, spec, prefix):
- aocl_utils_lib_path = os.path.join(self.spec["aocl-utils"].prefix.lib, "libaoclutils.a")
+ def build(self, pkg, spec, prefix):
+ aocl_utils_lib_path = spec["aocl-utils"].libs
make("all", "LIBAOCLUTILS_LIBRARY_PATH={0}".format(aocl_utils_lib_path))
@run_after("build")
@@ -162,7 +246,11 @@ class Amdlibflame(LibflameBase):
else:
make("check", "LIBBLAS = {0}".format(blas_flags), parallel=False)
- def install(self, spec, prefix):
+ def install(self, pkg, spec, prefix):
"""make install function"""
# make install in parallel fails with message 'File already exists'
make("install", parallel=False)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ if self.spec.external:
+ env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/amdlibm/libm-ose-SconsSpack.patch b/var/spack/repos/builtin/packages/amdlibm/libm-ose-SconsSpack.patch
new file mode 100644
index 0000000000..e90653d491
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdlibm/libm-ose-SconsSpack.patch
@@ -0,0 +1,10 @@
+--- a/scripts/site_scons/alm/env.py 2024-04-30 14:30:40.936684295 -0500
++++ b/scripts/site_scons/alm/env.py 2024-04-30 14:31:10.901423863 -0500
+@@ -72,6 +72,7 @@
+ 'SPACK_LINKER_ARG',
+ 'SPACK_SHORT_SPEC',
+ 'SPACK_SYSTEM_DIRS',
++ 'SPACK_MANAGED_DIRS',
+ ]
+
+ # add these keys to mydict if they exist in environ
diff --git a/var/spack/repos/builtin/packages/amdlibm/package.py b/var/spack/repos/builtin/packages/amdlibm/package.py
index 05b3788336..f1d194f535 100644
--- a/var/spack/repos/builtin/packages/amdlibm/package.py
+++ b/var/spack/repos/builtin/packages/amdlibm/package.py
@@ -5,8 +5,6 @@
import os
-from llnl.util import tty
-
from spack.package import *
@@ -21,18 +19,24 @@ class Amdlibm(SConsPackage):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-FFTW license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/libm/eula/libm-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/libm/eula/libm-4-2-eula.html
https://www.amd.com/en/developer/aocl/libm/libm-eula.html
"""
_name = "amdlibm"
homepage = "https://www.amd.com/en/developer/aocl/libm.html"
git = "https://github.com/amd/aocl-libm-ose.git"
- url = "https://github.com/amd/aocl-libm-ose/archive/refs/tags/3.0.tar.gz"
+ url = "https://github.com/amd/aocl-libm-ose/archive/3.0.tar.gz"
maintainers("amd-toolchain-support")
license("BSD-3-Clause")
+ version(
+ "5.0",
+ sha256="ba1d50c068938c9a927e37e5630f683b6149d7d5a95efffeb76e7c9a8bcb2b5e",
+ preferred=True,
+ )
+ version("4.2", sha256="58847b942e998b3f52eb41ae26403c7392d244fcafa707cbf23165aac24edd9e")
version("4.1", sha256="5bbbbc6bc721d9a775822eab60fbc11eb245e77d9f105b4fcb26a54d01456122")
version("4.0", sha256="038c1eab544be77598eccda791b26553d3b9e2ee4ab3f5ad85fdd2a77d015a7d")
version("3.2", sha256="c75b287c38a3ce997066af1f5c8d2b19fc460d5e56678ea81f3ac33eb79ec890")
@@ -40,41 +44,42 @@ class Amdlibm(SConsPackage):
version("3.0", sha256="eb26b5e174f43ce083928d0d8748a6d6d74853333bba37d50057aac2bef7c7aa")
version("2.2", commit="4033e022da428125747e118ccd6fdd9cee21c470")
- variant("verbose", default=False, description="Building with verbosity")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("verbose", default=False, description="Building with verbosity", when="@:4.1")
# Mandatory dependencies
depends_on("python@3.6.1:", type=("build", "run"))
depends_on("scons@3.1.2:", type=("build"))
- depends_on("aocl-utils", type=("build"), when="@4.1: ")
depends_on("mpfr", type=("link"))
+ for vers in ["4.1", "4.2", "5.0"]:
+ with when(f"@{vers}"):
+ depends_on(f"aocl-utils@{vers}")
patch("0001-libm-ose-Scripts-cleanup-pyc-files.patch", when="@2.2")
patch("0002-libm-ose-prevent-log-v3.c-from-building.patch", when="@2.2")
+ # Patch to update the SCons environment with
+ # the newly introduced 'SPACK_MANAGED_DIRS'
+ # build environment variable.
+ patch("libm-ose-SconsSpack.patch", when="@3.1:4.2")
conflicts("%gcc@:9.1.0", msg="Minimum supported GCC version is 9.2.0")
- conflicts("%gcc@13.2.0:", msg="Maximum supported GCC version is 13.1.0")
- conflicts("%clang@9.0:16.0", msg="supported Clang version is from 9 to 16")
+ conflicts("%clang@:9.0", msg="Minimum supported Clang version is 9")
+ conflicts("%clang@17.0.0:", msg="Maximum supported Clang version is 17.0.0")
+ conflicts("%gcc@14.3.0:", msg="Maximum supported GCC version is 14.2.0")
conflicts("%aocc@3.2.0", msg="dependency on python@3.6.2")
+ def patch(self):
+ filter_file("14.1", "14.2", "scripts/site_scons/alm/check.py")
+
def build_args(self, spec, prefix):
"""Setting build arguments for amdlibm"""
- args = ["--prefix={0}".format(prefix)]
+ args = [f"-j{determine_number_of_jobs(parallel=True)}", f"--prefix={prefix}"]
if self.spec.satisfies("@4.1: "):
args.append("--aocl_utils_install_path={0}".format(self.spec["aocl-utils"].prefix))
- if not (
- self.spec.satisfies(r"%aocc@3.2:4.1")
- or self.spec.satisfies(r"%gcc@12.2:13.1")
- or self.spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
-
# we are circumventing the use of
# Spacks compiler wrappers because
# SCons wipes out all environment variables.
@@ -85,10 +90,8 @@ class Amdlibm(SConsPackage):
args.append("{0}CC={1}".format(var_prefix, self.compiler.cc))
args.append("{0}CXX={1}".format(var_prefix, self.compiler.cxx))
- if "+verbose" in self.spec:
- args.append("--verbose=1")
- else:
- args.append("--verbose=0")
+ # Always build verbose
+ args.append("--verbose=1")
return args
diff --git a/var/spack/repos/builtin/packages/amdscalapack/clang-hollerith.patch b/var/spack/repos/builtin/packages/amdscalapack/clang-hollerith.patch
new file mode 100644
index 0000000000..c442a0a22b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amdscalapack/clang-hollerith.patch
@@ -0,0 +1,1459 @@
+diff -urN aocl-scalapack-4.0/PBLAS/TESTING/pcblastst.f aocl-scalapack-4.0.a/PBLAS/TESTING/pcblastst.f
+--- aocl-scalapack-4.0/PBLAS/TESTING/pcblastst.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/PBLAS/TESTING/pcblastst.f 2023-05-13 12:32:33.101012202 -0500
+@@ -3530,7 +3530,7 @@
+ *
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+ *
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -3561,7 +3561,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 40 CONTINUE
++ 40 END DO
+ *
+ JJ = JJ + JB
+ *
+@@ -3574,7 +3574,7 @@
+ DO 90 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+- DO 80 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 )*DESCA( MB_ ) + IB
+@@ -3606,7 +3606,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 80 CONTINUE
++ 80 END DO
+ *
+ JJ = JJ + JB
+ END IF
+@@ -9586,7 +9586,7 @@
+ $ JB = ( (-JB) / DESCA( NB_ ) + 1 ) * DESCA( NB_ ) + JB
+ JB = MIN( JB, N )
+ JN = JA+JB-1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9656,7 +9656,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -9668,7 +9668,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ )-IA+1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9738,7 +9738,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/PBLAS/TESTING/pdblastst.f aocl-scalapack-4.0.a/PBLAS/TESTING/pdblastst.f
+--- aocl-scalapack-4.0/PBLAS/TESTING/pdblastst.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/PBLAS/TESTING/pdblastst.f 2023-05-13 12:33:15.052873951 -0500
+@@ -3524,7 +3524,7 @@
+ *
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+ *
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -3555,7 +3555,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 40 CONTINUE
++ 40 END DO
+ *
+ JJ = JJ + JB
+ *
+@@ -3568,7 +3568,7 @@
+ DO 90 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+- DO 80 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 )*DESCA( MB_ ) + IB
+@@ -3600,7 +3600,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 80 CONTINUE
++ 80 END DO
+ *
+ JJ = JJ + JB
+ END IF
+@@ -8918,7 +8918,7 @@
+ $ JB = ( (-JB) / DESCA( NB_ ) + 1 ) * DESCA( NB_ ) + JB
+ JB = MIN( JB, N )
+ JN = JA+JB-1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -8982,7 +8982,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -8994,7 +8994,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ )-IA+1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9058,7 +9058,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/PBLAS/TESTING/psblastst.f aocl-scalapack-4.0.a/PBLAS/TESTING/psblastst.f
+--- aocl-scalapack-4.0/PBLAS/TESTING/psblastst.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/PBLAS/TESTING/psblastst.f 2023-05-13 12:33:56.413724041 -0500
+@@ -3524,7 +3524,7 @@
+ *
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+ *
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -3555,7 +3555,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 40 CONTINUE
++ 40 END DO
+ *
+ JJ = JJ + JB
+ *
+@@ -3568,7 +3568,7 @@
+ DO 90 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+- DO 80 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 )*DESCA( MB_ ) + IB
+@@ -3600,7 +3600,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 80 CONTINUE
++ 80 END DO
+ *
+ JJ = JJ + JB
+ END IF
+@@ -8920,7 +8920,7 @@
+ $ JB = ( (-JB) / DESCA( NB_ ) + 1 ) * DESCA( NB_ ) + JB
+ JB = MIN( JB, N )
+ JN = JA+JB-1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -8984,7 +8984,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -8996,7 +8996,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ )-IA+1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9060,7 +9060,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/PBLAS/TESTING/pzblastst.f aocl-scalapack-4.0.a/PBLAS/TESTING/pzblastst.f
+--- aocl-scalapack-4.0/PBLAS/TESTING/pzblastst.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/PBLAS/TESTING/pzblastst.f 2023-05-13 12:34:31.725450989 -0500
+@@ -3530,7 +3530,7 @@
+ *
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+ *
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -3561,7 +3561,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 40 CONTINUE
++ 40 END DO
+ *
+ JJ = JJ + JB
+ *
+@@ -3574,7 +3574,7 @@
+ DO 90 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+ IF( MYCOL.EQ.ICURCOL .OR. COLREP ) THEN
+- DO 80 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( ( -IB ) / DESCA( MB_ ) + 1 )*DESCA( MB_ ) + IB
+@@ -3606,7 +3606,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 80 CONTINUE
++ 80 END DO
+ *
+ JJ = JJ + JB
+ END IF
+@@ -9588,7 +9588,7 @@
+ $ JB = ( (-JB) / DESCA( NB_ ) + 1 ) * DESCA( NB_ ) + JB
+ JB = MIN( JB, N )
+ JN = JA+JB-1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ ) - IA + 1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9658,7 +9658,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -9670,7 +9670,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IB = DESCA( IMB_ )-IA+1
+ IF( IB.LE.0 )
+ $ IB = ( (-IB) / DESCA( MB_ ) + 1 ) * DESCA( MB_ ) + IB
+@@ -9740,7 +9740,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/SRC/CMakeLists.txt aocl-scalapack-4.0.a/SRC/CMakeLists.txt
+--- aocl-scalapack-4.0/SRC/CMakeLists.txt 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/SRC/CMakeLists.txt 2023-05-13 13:04:13.525220791 -0500
+@@ -99,8 +99,8 @@
+ pdgelq2.f pdgelqf.f pdgels.f pdgeql2.f pdgeqlf.f pdgeqpf.f pdgeqr2.f
+ pdgeqrf.f pdgerfs.f pdgerq2.f pdgerqf.f
+ pdgesv.f pdgesvd.f pdgesvx.f pdgetf2.f pdgetrf.f pdgetri.f pdgetrs.f
+- pdggqrf.f pdggrqf.f pdlabrd.f pdgetf2K.f pdupdate.f pdgetrf0.f
+- pdgetrfla.f pdgetf2_comm.f icopypv.f
++ pdggqrf.f pdggrqf.f pdlabrd.f pdgetrf0.f
++ pdgetf2_comm.f icopypv.f
+ pdlacon.f pdlacp2.f pdlacpy.f pdlahrd.f pdlange.f pdlanhs.f pdlansy.f
+ pdlantr.f pdlapiv.f pdlapv2.f pdlaqge.f pdlaqsy.f pdlarf.f pdlarfb.f
+ pdlarfg.f pdlarft.f pdlase2.f pdlaset.f pdlascl.f pdlassq.f pdlaswp.f
+diff -urN aocl-scalapack-4.0/SRC/icopypv.f aocl-scalapack-4.0.a/SRC/icopypv.f
+--- aocl-scalapack-4.0/SRC/icopypv.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/SRC/icopypv.f 2023-05-13 13:00:35.204701618 -0500
+@@ -75,7 +75,7 @@
+ * .. Parameters ..
+ INTEGER I, IACOL, IAROW, ICTXT,
+ $ J, MN, MYCOL, MYROW, NPCOL, NPROW
+- PARAMETER ( CTXT_ = 2 )
++ INTEGER,PARAMETER :: CTXT_ = 2
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_ABORT, BLACS_GRIDINFO, CHK1MAT, IGEBR2D,
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcdbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcdbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcdbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcdbdriver.f 2023-05-13 13:09:30.282786496 -0500
+@@ -552,7 +552,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -876,7 +876,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcdtdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcdtdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcdtdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcdtdriver.f 2023-05-13 13:09:43.763067570 -0500
+@@ -545,7 +545,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -877,7 +877,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcgbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcgbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcgbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcgbdriver.f 2023-05-13 13:09:57.636356839 -0500
+@@ -564,7 +564,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -888,7 +888,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pclltdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pclltdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pclltdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pclltdriver.f 2023-05-13 13:10:07.068553508 -0500
+@@ -487,7 +487,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -843,7 +843,7 @@
+ *
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK .AND. SRESID.GT.THRESH ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pclsdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pclsdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pclsdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pclsdriver.f 2023-05-13 13:10:34.924134319 -0500
+@@ -374,7 +374,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 40 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -1038,7 +1038,7 @@
+ $ TMFLOPS, PASSED
+ END IF
+ 30 CONTINUE
+- 40 CONTINUE
++ 40 END DO
+ 50 CONTINUE
+ 60 CONTINUE
+ 70 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcludriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcludriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcludriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcludriver.f 2023-05-13 13:10:48.332413896 -0500
+@@ -614,7 +614,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -990,7 +990,7 @@
+ $ PASSED
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK.AND.( SRESID.GT.THRESH ) ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcpbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcpbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcpbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcpbdriver.f 2023-05-13 13:10:59.963656414 -0500
+@@ -531,7 +531,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -834,7 +834,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pcptdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pcptdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pcptdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pcptdriver.f 2023-05-13 13:19:00.445674845 -0500
+@@ -505,10 +505,10 @@
+ * For SPD Tridiagonal complex matrices, diagonal is stored
+ * as a real. Thus, compact D into half the space
+ *
+- DO 10 H=1, NUMROC(N,NB,MYCOL,0,NPCOL)/2
++ DO H=1, NUMROC(N,NB,MYCOL,0,NPCOL)/2
+ MEM( IPA+INT_TEMP+H-1 ) = MEM( IPA+INT_TEMP+2*H-2 )
+ $ +MEM( IPA+INT_TEMP+2*H-1 )*( 0.0E+0, 1.0E+0 )
+- 10 CONTINUE
++ 10 END DO
+ IF( 2*(NUMROC(N,NB,MYCOL,0,NPCOL)/2).NE.
+ $ NUMROC(N,NB,MYCOL,0,NPCOL) ) THEN
+ H=NUMROC(N,NB,MYCOL,0,NPCOL)/2+1
+@@ -550,7 +550,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -860,7 +860,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pddbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pddbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pddbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pddbdriver.f 2023-05-13 13:08:04.798008071 -0500
+@@ -544,7 +544,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -860,7 +860,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pddtdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pddtdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pddtdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pddtdriver.f 2023-05-13 13:11:20.509084801 -0500
+@@ -542,7 +542,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -866,7 +866,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdgbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdgbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdgbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdgbdriver.f 2023-05-13 13:11:33.069346692 -0500
+@@ -562,7 +562,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -878,7 +878,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdlltdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdlltdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdlltdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdlltdriver.f 2023-05-13 13:11:44.660588379 -0500
+@@ -487,7 +487,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -843,7 +843,7 @@
+ *
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK .AND. SRESID.GT.THRESH ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdlsdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdlsdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdlsdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdlsdriver.f 2023-05-13 13:11:56.287830817 -0500
+@@ -371,7 +371,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 40 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -1033,7 +1033,7 @@
+ $ TMFLOPS, PASSED
+ END IF
+ 30 CONTINUE
+- 40 CONTINUE
++ 40 END DO
+ 50 CONTINUE
+ 60 CONTINUE
+ 70 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdludriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdludriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdludriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdludriver.f 2023-05-13 13:12:07.670068146 -0500
+@@ -615,7 +615,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -991,7 +991,7 @@
+ $ PASSED
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK.AND.( SRESID.GT.THRESH ) ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdpbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdpbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdpbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdpbdriver.f 2023-05-13 13:12:17.111265004 -0500
+@@ -528,7 +528,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -827,7 +827,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pdptdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pdptdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pdptdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pdptdriver.f 2023-05-13 13:12:27.001471220 -0500
+@@ -533,7 +533,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -839,7 +839,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/psdbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/psdbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/psdbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/psdbdriver.f 2023-05-13 13:12:36.062660154 -0500
+@@ -543,7 +543,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -859,7 +859,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/psdtdriver.f aocl-scalapack-4.0.a/TESTING/LIN/psdtdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/psdtdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/psdtdriver.f 2023-05-13 13:12:44.822842810 -0500
+@@ -541,7 +541,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -865,7 +865,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/psgbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/psgbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/psgbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/psgbdriver.f 2023-05-13 13:12:54.198038291 -0500
+@@ -561,7 +561,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -877,7 +877,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pslltdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pslltdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pslltdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pslltdriver.f 2023-05-13 13:13:05.375271347 -0500
+@@ -487,7 +487,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -843,7 +843,7 @@
+ *
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK .AND. SRESID.GT.THRESH ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pslsdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pslsdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pslsdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pslsdriver.f 2023-05-13 13:13:16.854510696 -0500
+@@ -370,7 +370,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 40 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -1032,7 +1032,7 @@
+ $ TMFLOPS, PASSED
+ END IF
+ 30 CONTINUE
+- 40 CONTINUE
++ 40 END DO
+ 50 CONTINUE
+ 60 CONTINUE
+ 70 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/psludriver.f aocl-scalapack-4.0.a/TESTING/LIN/psludriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/psludriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/psludriver.f 2023-05-13 13:13:50.751217470 -0500
+@@ -604,7 +604,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -980,7 +980,7 @@
+ $ PASSED
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK.AND.( SRESID.GT.THRESH ) ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pspbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pspbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pspbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pspbdriver.f 2023-05-13 13:14:00.485420435 -0500
+@@ -527,7 +527,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -826,7 +826,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/psptdriver.f aocl-scalapack-4.0.a/TESTING/LIN/psptdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/psptdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/psptdriver.f 2023-05-13 13:14:10.085620608 -0500
+@@ -532,7 +532,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -838,7 +838,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzdbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzdbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzdbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzdbdriver.f 2023-05-13 13:14:20.446836646 -0500
+@@ -547,7 +547,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -871,7 +871,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzdtdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzdtdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzdtdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzdtdriver.f 2023-05-13 13:14:30.888054354 -0500
+@@ -545,7 +545,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -877,7 +877,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzgbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzgbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzgbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzgbdriver.f 2023-05-13 13:14:42.399294375 -0500
+@@ -565,7 +565,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -889,7 +889,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzlltdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzlltdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzlltdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzlltdriver.f 2023-05-13 13:14:52.103496713 -0500
+@@ -485,7 +485,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -841,7 +841,7 @@
+ *
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK .AND. SRESID.GT.THRESH ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzlsdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzlsdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzlsdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzlsdriver.f 2023-05-13 13:15:03.839741423 -0500
+@@ -373,7 +373,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 40 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -1037,7 +1037,7 @@
+ $ TMFLOPS, PASSED
+ END IF
+ 30 CONTINUE
+- 40 CONTINUE
++ 40 END DO
+ 50 CONTINUE
+ 60 CONTINUE
+ 70 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzludriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzludriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzludriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzludriver.f 2023-05-13 13:15:16.529006006 -0500
+@@ -612,7 +612,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ NRHS = NRVAL( HH )
+ *
+@@ -988,7 +988,7 @@
+ $ PASSED
+ END IF
+ 10 CONTINUE
+- 20 CONTINUE
++ 20 END DO
+ *
+ IF( CHECK.AND.( SRESID.GT.THRESH ) ) THEN
+ *
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzpbdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzpbdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzpbdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzpbdriver.f 2023-05-13 13:15:26.328210325 -0500
+@@ -531,7 +531,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -834,7 +834,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TESTING/LIN/pzptdriver.f aocl-scalapack-4.0.a/TESTING/LIN/pzptdriver.f
+--- aocl-scalapack-4.0/TESTING/LIN/pzptdriver.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TESTING/LIN/pzptdriver.f 2023-05-13 13:19:09.725868346 -0500
+@@ -504,10 +504,10 @@
+ * For SPD Tridiagonal complex matrices, diagonal is stored
+ * as a real. Thus, compact D into half the space
+ *
+- DO 10 H=1, NUMROC(N,NB,MYCOL,0,NPCOL)/2
++ DO H=1, NUMROC(N,NB,MYCOL,0,NPCOL)/2
+ MEM( IPA+INT_TEMP+H-1 ) = MEM( IPA+INT_TEMP+2*H-2 )
+ $ +MEM( IPA+INT_TEMP+2*H-1 )*( 0.0D+0, 1.0D+0 )
+- 10 CONTINUE
++ 10 END DO
+ IF( 2*(NUMROC(N,NB,MYCOL,0,NPCOL)/2).NE.
+ $ NUMROC(N,NB,MYCOL,0,NPCOL) ) THEN
+ H=NUMROC(N,NB,MYCOL,0,NPCOL)/2+1
+@@ -549,7 +549,7 @@
+ *
+ * Loop over the different values for NRHS
+ *
+- DO 20 HH = 1, NNR
++ DO HH = 1, NNR
+ *
+ IERR( 1 ) = 0
+ *
+@@ -859,7 +859,7 @@
+ $ TMFLOPS2, PASSED
+ *
+ END IF
+- 20 CONTINUE
++ 20 END DO
+ *
+ *
+ 30 CONTINUE
+diff -urN aocl-scalapack-4.0/TOOLS/pclaprnt.f aocl-scalapack-4.0.a/TOOLS/pclaprnt.f
+--- aocl-scalapack-4.0/TOOLS/pclaprnt.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pclaprnt.f 2023-05-13 12:34:57.291977317 -0500
+@@ -162,7 +162,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -228,7 +228,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -239,7 +239,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -305,7 +305,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pclaread.f aocl-scalapack-4.0.a/TOOLS/pclaread.f
+--- aocl-scalapack-4.0/TOOLS/pclaread.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pclaread.f 2023-05-13 12:35:16.251367625 -0500
+@@ -95,7 +95,7 @@
+ *
+ DO 50 J = 1, N, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), N-J+1 )
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ *
+ * Loop over block of rows
+ *
+@@ -128,7 +128,7 @@
+ *
+ II = 1
+ ICURROW = DESCA( RSRC_ )
+- 40 CONTINUE
++ 40 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pclawrite.f aocl-scalapack-4.0.a/TOOLS/pclawrite.f
+--- aocl-scalapack-4.0/TOOLS/pclawrite.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pclawrite.f 2023-05-13 12:35:35.428762427 -0500
+@@ -77,7 +77,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -137,7 +137,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -148,7 +148,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -210,7 +210,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pdlaprnt.f aocl-scalapack-4.0.a/TOOLS/pdlaprnt.f
+--- aocl-scalapack-4.0/TOOLS/pdlaprnt.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pdlaprnt.f 2023-05-13 12:35:56.637199031 -0500
+@@ -162,7 +162,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -222,7 +222,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -233,7 +233,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -293,7 +293,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pdlaread.f aocl-scalapack-4.0.a/TOOLS/pdlaread.f
+--- aocl-scalapack-4.0/TOOLS/pdlaread.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pdlaread.f 2023-05-13 12:36:07.683426435 -0500
+@@ -94,7 +94,7 @@
+ *
+ DO 50 J = 1, N, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), N-J+1 )
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ *
+ * Loop over block of rows
+ *
+@@ -125,7 +125,7 @@
+ *
+ II = 1
+ ICURROW = DESCA( RSRC_ )
+- 40 CONTINUE
++ 40 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pdlawrite.f aocl-scalapack-4.0.a/TOOLS/pdlawrite.f
+--- aocl-scalapack-4.0/TOOLS/pdlawrite.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pdlawrite.f 2023-05-13 12:36:25.980803115 -0500
+@@ -77,7 +77,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -133,7 +133,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -144,7 +144,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -200,7 +200,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pilaprnt.f aocl-scalapack-4.0.a/TOOLS/pilaprnt.f
+--- aocl-scalapack-4.0/TOOLS/pilaprnt.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pilaprnt.f 2023-05-13 12:22:11.627246250 -0500
+@@ -162,7 +162,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -222,7 +222,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -233,7 +233,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -293,7 +293,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pslaprnt.f aocl-scalapack-4.0.a/TOOLS/pslaprnt.f
+--- aocl-scalapack-4.0/TOOLS/pslaprnt.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pslaprnt.f 2023-05-13 12:36:44.549185377 -0500
+@@ -162,7 +162,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -222,7 +222,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -233,7 +233,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -293,7 +293,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pslaread.f aocl-scalapack-4.0.a/TOOLS/pslaread.f
+--- aocl-scalapack-4.0/TOOLS/pslaread.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pslaread.f 2023-05-13 12:36:55.734415640 -0500
+@@ -94,7 +94,7 @@
+ *
+ DO 50 J = 1, N, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), N-J+1 )
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ *
+ * Loop over block of rows
+ *
+@@ -125,7 +125,7 @@
+ *
+ II = 1
+ ICURROW = DESCA( RSRC_ )
+- 40 CONTINUE
++ 40 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pslawrite.f aocl-scalapack-4.0.a/TOOLS/pslawrite.f
+--- aocl-scalapack-4.0/TOOLS/pslawrite.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pslawrite.f 2023-05-13 12:37:18.124876586 -0500
+@@ -77,7 +77,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -133,7 +133,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -144,7 +144,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -200,7 +200,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pzlaprnt.f aocl-scalapack-4.0.a/TOOLS/pzlaprnt.f
+--- aocl-scalapack-4.0/TOOLS/pzlaprnt.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pzlaprnt.f 2023-05-13 12:37:37.150268256 -0500
+@@ -162,7 +162,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -228,7 +228,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -239,7 +239,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRPRNT .AND. ICURCOL.EQ.ICPRNT ) THEN
+@@ -305,7 +305,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pzlaread.f aocl-scalapack-4.0.a/TOOLS/pzlaread.f
+--- aocl-scalapack-4.0/TOOLS/pzlaread.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pzlaread.f 2023-05-13 12:37:46.765466199 -0500
+@@ -95,7 +95,7 @@
+ *
+ DO 50 J = 1, N, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), N-J+1 )
+- DO 40 H = 0, JB-1
++ DO H = 0, JB-1
+ *
+ * Loop over block of rows
+ *
+@@ -128,7 +128,7 @@
+ *
+ II = 1
+ ICURROW = DESCA( RSRC_ )
+- 40 CONTINUE
++ 40 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+diff -urN aocl-scalapack-4.0/TOOLS/pzlawrite.f aocl-scalapack-4.0.a/TOOLS/pzlawrite.f
+--- aocl-scalapack-4.0/TOOLS/pzlawrite.f 2022-11-13 09:31:10.000000000 -0600
++++ aocl-scalapack-4.0.a/TOOLS/pzlawrite.f 2023-05-13 12:38:12.069987133 -0500
+@@ -77,7 +77,7 @@
+ *
+ JN = MIN( ICEIL( JA, DESCA( NB_ ) ) * DESCA( NB_ ), JA+N-1 )
+ JB = JN-JA+1
+- DO 60 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -137,7 +137,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 60 CONTINUE
++ 60 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
+@@ -148,7 +148,7 @@
+ *
+ DO 130 J = JN+1, JA+N-1, DESCA( NB_ )
+ JB = MIN( DESCA( NB_ ), JA+N-J )
+- DO 120 H = 0, JB-1
++ DO H = 0, JB-1
+ IN = MIN( ICEIL( IA, DESCA( MB_ ) ) * DESCA( MB_ ), IA+M-1 )
+ IB = IN-IA+1
+ IF( ICURROW.EQ.IRWRIT .AND. ICURCOL.EQ.ICWRIT ) THEN
+@@ -210,7 +210,7 @@
+ *
+ II = IIA
+ ICURROW = IAROW
+- 120 CONTINUE
++ 120 END DO
+ *
+ IF( MYCOL.EQ.ICURCOL )
+ $ JJ = JJ + JB
diff --git a/var/spack/repos/builtin/packages/amdscalapack/package.py b/var/spack/repos/builtin/packages/amdscalapack/package.py
index 3ccf226089..52736eb2fa 100644
--- a/var/spack/repos/builtin/packages/amdscalapack/package.py
+++ b/var/spack/repos/builtin/packages/amdscalapack/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from llnl.util import tty
-
from spack.package import *
from spack.pkg.builtin.netlib_scalapack import ScalapackBase
@@ -22,7 +20,7 @@ class Amdscalapack(ScalapackBase):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-ScaLAPACK license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/scalapack/eula/scalapack-libraries-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/scalapack/eula/scalapack-libraries-4-2-eula.html
https://www.amd.com/en/developer/aocl/scalapack/eula/scalapack-libraries-eula.html
"""
@@ -33,7 +31,12 @@ class Amdscalapack(ScalapackBase):
maintainers("amd-toolchain-support")
license("BSD-3-Clause-Open-MPI")
-
+ version(
+ "5.0",
+ sha256="a33cf16c51cfd65c7acb5fbdb8884a5c147cdefea73931b07863c56d54f812cc",
+ preferred=True,
+ )
+ version("4.2", sha256="c6e9a846c05cdc05252b0b5f264164329812800bf13f9d97c77114dc138e6ccb")
version("4.1", sha256="b2e51c3604e5869d1faaef2e52c92071fcb3de1345aebb2ea172206622067ad9")
version("4.0", sha256="f02913b5984597b22cdb9a36198ed61039a1bf130308e778dc31b2a7eb88b33b")
version("3.2", sha256="9e00979bb1be39d627bdacb01774bc043029840d542fafc934d16fec3e3b0892")
@@ -41,11 +44,30 @@ class Amdscalapack(ScalapackBase):
version("3.0", sha256="6e6f3578f44a8e64518d276e7580530599ecfa8729f568303ed2590688e7096f")
version("2.2", sha256="2d64926864fc6d12157b86e3f88eb1a5205e7fc157bf67e7577d0f18b9a7484c")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+ depends_on("amdblis", when="^[virtuals=blas] amdblis")
+ depends_on("amdlibflame", when="^[virtuals=lapack] amdlibflame")
+
variant("ilp64", default=False, description="Build with ILP64 support")
conflicts("+ilp64", when="@:3.0", msg="ILP64 is supported from 3.1 onwards")
requires("target=x86_64:", msg="AMD scalapack available only on x86_64")
+ patch("clang-hollerith.patch", when="@=4.0 %clang@16:")
+
+ def patch(self):
+ # Flang-New gets confused and thinks it finds Hollerith constants
+ if self.spec.satisfies("%clang@16:"):
+ filter_file("-cpp", "", "CMakeLists.txt")
+ # remove the C-style comments in header file that cause issues with flang
+ if self.spec.satisfies("@4.2: %clang@18:"):
+ which("sed")(
+ "-i",
+ "1,23d",
+ join_path(self.stage.source_path, "FRAMEWORK", "SL_Context_fortran_include.h"),
+ )
+
def url_for_version(self, version):
vers = "https://github.com/amd/{0}/archive/{1}.tar.gz"
if version >= Version("3.1"):
@@ -53,28 +75,29 @@ class Amdscalapack(ScalapackBase):
else:
return vers.format("scalapack", version)
+ def flag_handler(self, name, flags):
+ (flags, _, _) = super().flag_handler(name, flags)
+ # remove a flag set in ScalapackBase that is not working
+ if self.spec.satisfies("%gcc@14:"):
+ if "-std=gnu89" in flags:
+ flags.remove("-std=gnu89")
+ return (flags, None, None)
+
def cmake_args(self):
"""cmake_args function"""
args = super().cmake_args()
spec = self.spec
- if not (
- spec.satisfies(r"%aocc@3.2:4.1")
- or spec.satisfies(r"%gcc@12.2:13.1")
- or spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
-
if spec.satisfies("%gcc@10:"):
args.extend(["-DCMAKE_Fortran_FLAGS={0}".format("-fallow-argument-mismatch")])
if spec.satisfies("%clang@16:"):
- args.extend(["-DCMAKE_Fortran_FLAGS={0}".format("-cpp -fno-implicit-none")])
+ flags = "-cpp -fno-implicit-none"
+ if spec.satisfies("%clang@18"):
+ flags += " -flang-experimental-polymorphism"
+ if spec.satisfies("%clang@18:"):
+ flags += " -I{0}".format(join_path(self.stage.source_path, "FRAMEWORK"))
+ args.extend(["-DCMAKE_Fortran_FLAGS={0}".format(flags)])
if spec.satisfies("@2.2"):
args.extend(
@@ -96,6 +119,8 @@ class Amdscalapack(ScalapackBase):
c_flags.append("-Wno-deprecated-non-prototype")
c_flags.append("-Wno-incompatible-pointer-types")
args.append(self.define("CMAKE_C_FLAGS", " ".join(c_flags)))
+ elif self.spec.satisfies("%gcc@14:"):
+ args.append(self.define("CMAKE_C_FLAGS", "-Wno-incompatible-pointer-types"))
# link libflame library
args.extend(["-DLAPACK_LIBRARIES={0}".format(self.spec["lapack"].libs)])
@@ -103,9 +128,14 @@ class Amdscalapack(ScalapackBase):
args.extend(
[
"-DLAPACK_FOUND=true",
+ "-DUSE_OPTIMIZED_LAPACK_BLAS=true",
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
"-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
]
)
return args
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ if self.spec.external:
+ env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/amdsmi/package.py b/var/spack/repos/builtin/packages/amdsmi/package.py
index ecd2ca1f1d..64f1402cb3 100644
--- a/var/spack/repos/builtin/packages/amdsmi/package.py
+++ b/var/spack/repos/builtin/packages/amdsmi/package.py
@@ -12,24 +12,32 @@ class Amdsmi(CMakePackage):
is a C library for Linux that provides a user space interface for
applications to monitor and control AMD device."""
- homepage = "https://github.com/RadeonOpenCompute/amdsmi"
- url = "https://github.com/RadeonOpenCompute/amdsmi/archive/refs/tags/rocm-5.6.0.tar.gz"
+ homepage = "https://github.com/ROCm/amdsmi"
+ url = "https://github.com/ROCm/amdsmi/archive/refs/tags/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["libamd_smi"]
license("MIT")
-
+ version("6.2.4", sha256="5ebe8d0f176bf4a73b0e7000d9c47cb7f65ecca47011d3f9b08b93047dcf7ac5")
+ version("6.2.1", sha256="136941e3f13e0d373ee3698bd60d4fc36353a2df6406e5a50b6ac78f1b639698")
+ version("6.2.0", sha256="49e4b15af62bf9800c02a24c75c6cd99dc8b146d69cc7f00ecbbcd60f6106315")
+ version("6.1.2", sha256="4583ea9bc71d55e987db4a42f9b3b730def22892953d30bca64ca29ac844e058")
+ version("6.1.1", sha256="10ece6b1ca8bb36ab3ae987fc512838f30a92ab788a2200410e9c1707fe0166b")
+ version("6.1.0", sha256="5bd1f150a2191b1703ff2670e40f6fed730f59f155623d6e43b7f64c39ae0967")
+ version("6.0.2", sha256="aeadf07750def0325a0eaa29e767530b2ec94f3d45dc3b7452fd7a2493769428")
+ version("6.0.0", sha256="2626e3af9d60dec245c61af255525a0c0841a73fb7ec2836477c0ce5793de39c")
version("5.7.0", sha256="144391d537710dafa9ef69571dd76203e56db6142ab61a1375346b5733137e23")
version("5.6.0", sha256="595c9d6d79d9071290b2f19ab4ef9222c8d2983b4322b3143fcd9d0b1ce0f6d8")
version("5.5.1", sha256="b794c7fd562fd92f2c9f2bbdc2d5dded7486101fcd4598f2e8c3484c9a939281")
version("5.5.0", sha256="dcfbd96e93afcf86b1261464e008e9ef7e521670871a1885e6eaffc7cdc8f555")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.11:")
depends_on("python@3.6:")
depends_on("py-virtualenv")
- depends_on("llvm@14:")
depends_on("pkgconfig")
depends_on("libdrm")
depends_on("py-pyyaml")
diff --git a/var/spack/repos/builtin/packages/amduprof/package.py b/var/spack/repos/builtin/packages/amduprof/package.py
new file mode 100644
index 0000000000..dc9f4b7e9d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amduprof/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Amduprof(Package):
+ """AMD uProf ("MICRO-prof") is a software profiling analysis tool for x86
+ applications running on Windows, Linux and FreeBSD operating systems and
+ provides event information unique to the AMD "Zen"-based processors and AMD
+ Instinct(tm) MI Series accelerators. AMD uProf enables the developer to better
+ understand the limiters of application performance and evaluate
+ improvements."""
+
+ homepage = "https://www.amd.com/en/developer/uprof.html"
+ manual_download = True
+
+ maintainers("amd-toolchain-support")
+
+ version(
+ "5.0.1479",
+ sha256="065d24d9b84d2ef94ae8a360bf55c74a0f3fe9250b01cc7fb2642495028130d5",
+ url="file://{0}/AMDuProf_Linux_x64_5.0.1479.tar.bz2".format(os.getcwd()),
+ preferred=True,
+ )
+ version(
+ "4.2.850",
+ sha256="f2d7c4eb9ec9c32845ff8f19874c1e6bcb0fa8ab2c12e73addcbf23a6d1bd623",
+ url="file://{0}/AMDuProf_Linux_x64_4.2.850.tar.bz2".format(os.getcwd()),
+ )
+
+ depends_on("binutils@2.27:", type="run")
+
+ # Licensing
+ license_required = True
+ license_url = "https://www.amd.com/en/developer/uprof/uprof-eula.html"
+
+ conflicts("platform=darwin")
+ requires("target=x86_64:", msg="AMD uProf available only on x86_64")
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/amg2013/package.py b/var/spack/repos/builtin/packages/amg2013/package.py
index dbb5ded532..b09a82400f 100644
--- a/var/spack/repos/builtin/packages/amg2013/package.py
+++ b/var/spack/repos/builtin/packages/amg2013/package.py
@@ -24,6 +24,8 @@ class Amg2013(MakefilePackage):
version("1.1", tag="1.1", commit="09fe8a78baf6ba5eaef7d2804f7b653885d60fee")
version("1.0", tag="1.0", commit="f5b864708ca3ef48a86e1e46fcb812cbbfa80c51")
+ depends_on("c", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP support")
variant("optflags", default=False, description="Additional optimizations")
variant("int64", default=False, description="Use 64-bit integers for global variables")
@@ -37,15 +39,15 @@ class Amg2013(MakefilePackage):
include_cflags = ["-DTIMER_USE_MPI"]
include_lflags = ["-lm"]
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
include_cflags.append("-DHYPRE_USING_OPENMP")
include_cflags.append(self.compiler.openmp_flag)
include_lflags.append(self.compiler.openmp_flag)
- if "+optflags" in self.spec:
+ if self.spec.satisfies("+optflags"):
include_cflags.append("-DHYPRE_USING_PERSISTENT_COMM")
include_cflags.append("-DHYPRE_HOPSCOTCH")
- if "+int64" in self.spec:
+ if self.spec.satisfies("+int64"):
include_cflags.append("-DHYPRE_BIGINT")
targets.append(f"INCLUDE_CFLAGS={' '.join(include_cflags)}")
diff --git a/var/spack/repos/builtin/packages/amg2023/package.py b/var/spack/repos/builtin/packages/amg2023/package.py
index 60bf0f337d..cb46c9df3f 100644
--- a/var/spack/repos/builtin/packages/amg2023/package.py
+++ b/var/spack/repos/builtin/packages/amg2023/package.py
@@ -21,6 +21,8 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="main")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=False, description="Enable OpenMP support")
variant("caliper", default=False, description="Enable Caliper monitoring")
diff --git a/var/spack/repos/builtin/packages/amgx/package.py b/var/spack/repos/builtin/packages/amgx/package.py
index 1e91250708..cf71a11353 100644
--- a/var/spack/repos/builtin/packages/amgx/package.py
+++ b/var/spack/repos/builtin/packages/amgx/package.py
@@ -29,6 +29,9 @@ class Amgx(CMakePackage, CudaPackage):
version("2.0.1", sha256="6f9991f1836fbf4ba2114ce9f49febd0edc069a24f533bd94fd9aa9be72435a7")
version("2.0.0", sha256="8ec7ea8412be3de216fcf7243c4e2a8bcf76878e6865468e4238630a082a431b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with CUDA")
variant("mpi", default=True, description="Enable MPI support")
variant("mkl", default=False, description="Enable MKL support")
@@ -42,7 +45,7 @@ class Amgx(CMakePackage, CudaPackage):
args = []
args.append("-DCMAKE_NO_MPI={0}".format("1" if "+mpi" not in self.spec else "0"))
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("-DWITH_CUDA=ON")
cuda_arch = self.spec.variants["cuda_arch"].value
if cuda_arch != "none":
@@ -50,10 +53,10 @@ class Amgx(CMakePackage, CudaPackage):
else:
args.append("-DWITH_CUDA=OFF")
- if "+mkl" in self.spec:
+ if self.spec.satisfies("+mkl"):
args.append("-DMKL_ROOT_DIR={0}".format(self.spec["mkl"].prefix))
- if "+magma" in self.spec:
+ if self.spec.satisfies("+magma"):
args.append("-DMAGMA_ROOT_DIR={0}".format(self.spec["magma"].prefix))
return args
diff --git a/var/spack/repos/builtin/packages/aml/package.py b/var/spack/repos/builtin/packages/aml/package.py
index dee1c1ca0e..cdf45388e6 100644
--- a/var/spack/repos/builtin/packages/aml/package.py
+++ b/var/spack/repos/builtin/packages/aml/package.py
@@ -41,6 +41,8 @@ class Aml(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
# Generate possible variants.
#############################
@@ -113,7 +115,7 @@ class Aml(AutotoolsPackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(self.smoke_test_src)
+ cache_extra_test_sources(self, self.smoke_test_src)
def test_check_tutorial(self):
"""Compile and run the tutorial tests as install checks"""
diff --git a/var/spack/repos/builtin/packages/amp/package.py b/var/spack/repos/builtin/packages/amp/package.py
index 340b473bac..1ef74a1aef 100644
--- a/var/spack/repos/builtin/packages/amp/package.py
+++ b/var/spack/repos/builtin/packages/amp/package.py
@@ -70,7 +70,7 @@ class Amp(CMakePackage):
self.define("USE_MPI", "0"),
]
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.extend(
[
self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc),
@@ -101,7 +101,7 @@ class Amp(CMakePackage):
]
)
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
tpl_list.append("ZLIB")
options.append(self.define("TPL_ZLIB_INSTALL_DIR", spec["zlib-api"].prefix))
@@ -119,7 +119,7 @@ class Amp(CMakePackage):
tpl_list.append(vname.upper())
options.append(self.define(f"TPL_{vname.upper()}_INSTALL_DIR", spec[vname].prefix))
- if "+netcdf" in spec:
+ if spec.satisfies("+netcdf"):
tpl_list.append("NETCDF")
options.append(self.define("TPL_NETCDF_INSTALL_DIR", spec["netcdf-c"].prefix))
diff --git a/var/spack/repos/builtin/packages/ampliconnoise/package.py b/var/spack/repos/builtin/packages/ampliconnoise/package.py
index 0bc5e2cc19..5984a13b28 100644
--- a/var/spack/repos/builtin/packages/ampliconnoise/package.py
+++ b/var/spack/repos/builtin/packages/ampliconnoise/package.py
@@ -17,6 +17,8 @@ class Ampliconnoise(MakefilePackage):
version("1.29", sha256="0bf946806d77ecaf0994ad8ebf9a5e98ad33c809f6def5c9340a16c367918167")
+ depends_on("c", type="build") # generated
+
depends_on("mpi@2:")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/ampt/package.py b/var/spack/repos/builtin/packages/ampt/package.py
index bbbbf33e9d..e4d083251a 100644
--- a/var/spack/repos/builtin/packages/ampt/package.py
+++ b/var/spack/repos/builtin/packages/ampt/package.py
@@ -11,8 +11,8 @@ class Ampt(MakefilePackage):
"""A Multi-Phase Transport (AMPT) model is a Monte Carlo transport model for
nuclear collisions at relativistic energies."""
- homepage = "http://myweb.ecu.edu/linz/ampt/"
- url = "http://myweb.ecu.edu/linz/ampt/ampt-v1.26t9b-v2.26t9b.zip"
+ homepage = "https://myweb.ecu.edu/linz/ampt/"
+ url = "https://myweb.ecu.edu/linz/ampt/ampt-v1.26t9b-v2.26t9b.zip"
maintainers("vvolkl")
diff --git a/var/spack/repos/builtin/packages/amqp-cpp/package.py b/var/spack/repos/builtin/packages/amqp-cpp/package.py
index 714169e1d6..4123c2fab9 100644
--- a/var/spack/repos/builtin/packages/amqp-cpp/package.py
+++ b/var/spack/repos/builtin/packages/amqp-cpp/package.py
@@ -22,6 +22,8 @@ class AmqpCpp(CMakePackage):
version("4.3.24", sha256="c3312f8af813cacabf6c257dfaf41bf9e66606bbf7d62d085a9b7da695355245")
version("4.3.19", sha256="ca29bb349c498948576a4604bed5fd3c27d87240b271a4441ccf04ba3797b31d")
+ depends_on("cxx", type="build") # generated
+
variant(
"tcp",
default=False,
diff --git a/var/spack/repos/builtin/packages/amr-wind/package.py b/var/spack/repos/builtin/packages/amr-wind/package.py
index cdd0167946..c2b96b163b 100644
--- a/var/spack/repos/builtin/packages/amr-wind/package.py
+++ b/var/spack/repos/builtin/packages/amr-wind/package.py
@@ -11,6 +11,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
incompressible flow sover for wind turbine and wind farm simulations."""
homepage = "https://github.com/Exawind/amr-wind"
+ url = "https://github.com/Exawind/amr-wind/archive/refs/tags/v1.3.0.tar.gz"
git = "https://github.com/Exawind/amr-wind.git"
maintainers("jrood-nrel", "psakievich")
@@ -20,50 +21,109 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("main", branch="main", submodules=True)
-
- variant("hypre", default=True, description="Enable Hypre integration")
+ version("3.2.0", tag="v3.2.0", submodules=True)
+ version("3.1.7", tag="v3.1.7", submodules=True)
+ version("3.1.6", tag="v3.1.6", submodules=True)
+ version("3.1.5", tag="v3.1.5", submodules=True)
+ version("3.1.4", tag="v3.1.4", submodules=True)
+ version("3.1.3", tag="v3.1.3", submodules=True)
+ version("3.1.2", tag="v3.1.2", submodules=True)
+ version("3.1.1", tag="v3.1.1", submodules=True)
+ version("3.1.0", tag="v3.1.0", submodules=True)
+ version("3.0.2", tag="v3.0.2", submodules=True)
+ version("3.0.1", tag="v3.0.1", submodules=True)
+ version("3.0.0", tag="v3.0.0", submodules=True)
+ version("2.6.0", tag="v2.6.0", submodules=True)
+ version("2.5.0", tag="v2.5.0", submodules=True)
+ version("2.4.3", tag="v2.4.3", submodules=True)
+ version("2.4.2", tag="v2.4.2", submodules=True)
+ version("2.4.1", tag="v2.4.1", submodules=True)
+ version("2.4.0", tag="v2.4.0", submodules=True)
+ version("2.3.2", tag="v2.3.2", submodules=True)
+ version("2.3.1", tag="v2.3.1", submodules=True)
+ version("2.3.0", tag="v2.3.0", submodules=True)
+ version("2.2.1", tag="v2.2.1", submodules=True)
+ version("2.2.0", tag="v2.2.0", submodules=True)
+ version("2.1.0", tag="v2.1.0", submodules=True)
+ version("2.0.0", tag="v2.0.0", submodules=True)
+ version("1.4.0", tag="v1.4.0", submodules=True)
+ version("1.3.1", tag="v1.3.1", submodules=True)
+ version("1.3.0", tag="v1.3.0", submodules=True)
+ version("1.2.1", tag="v1.2.1", submodules=True)
+ version("1.2.0", tag="v1.2.0", submodules=True)
+ version("1.1.0", tag="v1.1.0", submodules=True)
+ version("1.0.1", tag="v1.0.1", submodules=True)
+ version("1.0.0", tag="v1.0.0", submodules=True)
+ version("0.9.0", tag="v0.9.0", submodules=True)
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("hypre", default=False, description="Enable Hypre integration")
variant("ascent", default=False, description="Enable Ascent integration")
variant("masa", default=False, description="Enable MASA integration")
variant("mpi", default=True, description="Enable MPI support")
- variant("netcdf", default=True, description="Enable NetCDF support")
+ variant("netcdf", default=False, description="Enable NetCDF support")
variant("openfast", default=False, description="Enable OpenFAST integration")
variant("openmp", default=False, description="Enable OpenMP for CPU builds")
variant("shared", default=True, description="Build shared libraries")
variant("tests", default=True, description="Activate regression tests")
variant("tiny_profile", default=False, description="Activate tiny profile")
+ variant("hdf5", default=False, description="Enable HDF5 plots with ZFP compression")
+ variant("umpire", default=False, description="Enable UMPIRE memory pooling")
+ variant("sycl", default=False, description="Enable SYCL backend")
+ variant("gpu-aware-mpi", default=False, description="Enable GPU aware MPI")
+ variant("helics", default=False, description="Enable HELICS support for control interface")
+ variant(
+ "waves2amr", default=False, description="Enable Waves2AMR support for ocean wave input"
+ )
+ depends_on("mpi", when="+mpi")
+ depends_on("hdf5~mpi", when="+hdf5~mpi")
+ depends_on("hdf5+mpi", when="+hdf5+mpi")
+ depends_on("h5z-zfp", when="+hdf5")
+ depends_on("zfp", when="+hdf5")
depends_on("hypre~int64@2.20.0:", when="+hypre")
depends_on("hypre+mpi", when="+hypre+mpi")
+ depends_on("hypre+umpire", when="+hypre+umpire")
+ depends_on("hypre+sycl", when="+hypre+sycl")
+ depends_on("hypre+gpu-aware-mpi", when="+hypre+gpu-aware-mpi")
+ depends_on("hypre@2.29.0:", when="@0.9.0:+hypre")
+ depends_on("masa", when="+masa")
+ depends_on("ascent~mpi", when="+ascent~mpi")
+ depends_on("ascent+mpi", when="+ascent+mpi")
+ depends_on("netcdf-c", when="+netcdf")
+ depends_on("py-matplotlib", when="+masa")
+ depends_on("py-pandas", when="+masa")
+ depends_on("openfast+cxx", when="+openfast")
+ depends_on("openfast+netcdf", when="+openfast+netcdf")
+ depends_on("openfast@2.6.0:3.4.1", when="@0.9.0:1 +openfast")
+ depends_on("openfast@3.5:", when="@2: +openfast")
+ depends_on("helics@:3.3.2", when="+helics")
+ depends_on("helics@:3.3.2+mpi", when="+helics+mpi")
+ depends_on("fftw", when="@2.1: +waves2amr")
+
for arch in CudaPackage.cuda_arch_values:
depends_on("hypre+cuda cuda_arch=%s" % arch, when="+cuda+hypre cuda_arch=%s" % arch)
for arch in ROCmPackage.amdgpu_targets:
depends_on(
"hypre+rocm amdgpu_target=%s" % arch, when="+rocm+hypre amdgpu_target=%s" % arch
)
- depends_on("masa", when="+masa")
-
- # propagate variants to ascent
- depends_on("ascent~mpi", when="+ascent~mpi")
- depends_on("ascent+mpi", when="+ascent+mpi")
for arch in CudaPackage.cuda_arch_values:
depends_on("ascent+cuda cuda_arch=%s" % arch, when="+ascent+cuda cuda_arch=%s" % arch)
- depends_on("mpi", when="+mpi")
- depends_on("netcdf-c", when="+netcdf")
- depends_on("openfast+cxx@2.6.0:", when="+openfast")
- depends_on("py-matplotlib", when="+masa")
- depends_on("py-pandas", when="+masa")
-
conflicts("+openmp", when="+cuda")
conflicts("+shared", when="+cuda")
+ conflicts("@:2.0", when="+waves2amr")
def setup_build_environment(self, env):
# Avoid compile errors with Intel interprocedural optimization
- if "%intel" in self.spec:
+ if self.spec.satisfies("%intel"):
env.append_flags("CXXFLAGS", "-no-ipo")
def cmake_args(self):
define = self.define
+ spec = self.spec
vs = [
"mpi",
@@ -85,19 +145,46 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
]
- if "+mpi" in self.spec:
- args.append(define("MPI_HOME", self.spec["mpi"].prefix))
+ if spec.satisfies("+mpi"):
+ args.append(define("MPI_HOME", spec["mpi"].prefix))
- if "+cuda" in self.spec:
- amrex_arch = [
- "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value
- ]
- if amrex_arch:
- args.append(define("AMReX_CUDA_ARCH", amrex_arch))
+ if spec.satisfies("+hdf5"):
+ args.append(define("AMR_WIND_ENABLE_HDF5", True))
+ args.append(define("AMR_WIND_ENABLE_HDF5_ZFP", True))
+ # Help AMReX understand if HDF5 is parallel or not.
+ # Building HDF5 with CMake as Spack does, causes this inspection to break.
+ args.append(define("HDF5_IS_PARALLEL", spec.satisfies("+mpi")))
- if "+rocm" in self.spec:
- args.append(define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
- targets = self.spec.variants["amdgpu_target"].value
+ if spec.satisfies("+cuda"):
+ args.append(define("CMAKE_CUDA_ARCHITECTURES", spec.variants["cuda_arch"].value))
+
+ if spec.satisfies("+rocm"):
+ args.append(define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+ targets = spec.variants["amdgpu_target"].value
args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets))
+ if spec.satisfies("+umpire"):
+ args.append(self.define_from_variant("AMR_WIND_ENABLE_UMPIRE", "umpire"))
+ args.append(define("UMPIRE_DIR", spec["umpire"].prefix))
+
+ if spec.satisfies("+helics"):
+ args.append(self.define_from_variant("AMR_WIND_ENABLE_HELICS", "helics"))
+ args.append(define("HELICS_DIR", spec["helics"].prefix))
+
+ if spec.satisfies("+waves2amr"):
+ args.append(self.define_from_variant("AMR_WIND_ENABLE_W2A", "waves2amr"))
+ args.append(define("FFTW_DIR", spec["fftw"].prefix))
+
+ if spec.satisfies("+sycl"):
+ args.append(define("AMR_WIND_ENABLE_SYCL", True))
+ requires(
+ "%dpcpp",
+ "%oneapi",
+ policy="one_of",
+ msg=(
+ "AMReX's SYCL GPU Backend requires DPC++ (dpcpp) "
+ "or the oneAPI CXX (icpx) compiler."
+ ),
+ )
+
return args
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index 2c18dbf86d..0845a08ac2 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -26,6 +26,17 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("develop", branch="development")
+ version("24.12", sha256="ca4b41ac73fabb9cf3600b530c9823eb3625f337d9b7b9699c1089e81c67fc67")
+ version("24.11", sha256="31cc37b39f15e02252875815f6066046fc56a479bf459362b9889b0d6a202df6")
+ version("24.10", sha256="a2d15e417bd7c41963749338e884d939c80c5f2fcae3279fe3f1b463e3e4208a")
+ version("24.09", sha256="a1435d16532d04a1facce9a9ae35d68a57f7cd21a5f22a6590bde3c265ea1449")
+ version("24.08", sha256="e09623e715887a19a1f86ed6fdb8335022fd6c03f19372d8f13b55cdeeadf5de")
+ version("24.07", sha256="6baf76c1377d765e94020a9bd89dd1bf1485d0440d41cce2ba35d4dfee562580")
+ version("24.06", sha256="103a97163d81716165fcff1af56df61741608b56f90730a725e9e4eb797bebf0")
+ version("24.05", sha256="f3db5ea2b81973e3e244c5cf39d5a5383a98f297f56ed91c8dcdd2e24f7b750e")
+ version("24.04", sha256="77a91e75ad0106324a44ca514e1e8abc54f2fc2d453406441c871075726a8167")
+ version("24.03", sha256="024876fe65838d1021fcbf8530b992bff8d9be1d3f08a1723c4e2e5f7c28b427")
+ version("24.02", sha256="286cc3ca29daa69c8eafc1cd7a572662dec9eb78631ac3d33a1260868fdc6996")
version("24.01", sha256="83dbd4dad6dc51fa4a80aad0347b15ee5a6d816cf4abcd87f7b0e2987d8131b7")
version("23.12", sha256="90e00410833d7a82bf6d9e71a70ce85d2bfb89770da7e34d0dda940f2bf5384a")
version("23.11", sha256="49b9fea10cd2a2b6cb0fedf7eac8f7889eacc68a05ae5ac7c5702bc0eb1b3848")
@@ -81,6 +92,10 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
version("18.10", sha256="298eba03ef03d617c346079433af1089d38076d6fab2c34476c687740c1f4234")
version("18.09.1", sha256="a065ee4d1d98324b6c492ae20ea63ba12a4a4e23432bf5b3fe9788d44aa4398e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Config options
variant(
"dimensions",
@@ -107,7 +122,21 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
description="Real precision (double/single)",
values=("single", "double"),
)
- variant("eb", default=False, description="Build Embedded Boundary classes")
+ variant("ascent", default=False, description="Enable Ascent in situ visualization")
+ variant(
+ "catalyst",
+ default=False,
+ description="Enable Catalyst2 in situ visualization",
+ when="@24.09:",
+ )
+ variant(
+ "conduit",
+ default=False,
+ description="Enable Conduit for data exchange (in situ visualization)",
+ )
+ variant("eb", default=True, description="Build Embedded Boundary classes", when="@24.10:")
+ variant("eb", default=False, description="Build Embedded Boundary classes", when="@:24.09")
+ variant("fft", default=False, description="Build FFT support", when="@24.11:")
variant("fortran", default=False, description="Build Fortran API")
variant("linear_solvers", default=True, description="Build linear solvers")
variant("amrdata", default=False, description="Build data services")
@@ -123,9 +152,23 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
# Build dependencies
depends_on("mpi", when="+mpi")
- depends_on("sundials@4.0.0:4.1.0 +ARKODE +CVODE", when="@19.08:20.11 +sundials")
- depends_on("sundials@5.7.0: +ARKODE +CVODE", when="@21.07:22.04 +sundials")
- depends_on("sundials@6.0.0: +ARKODE +CVODE", when="@22.05: +sundials")
+ with when("+fft"):
+ depends_on("rocfft", when="+rocm")
+ depends_on("fftw@3", when="~cuda ~rocm ~sycl")
+ with when("+ascent"):
+ depends_on("ascent")
+ depends_on("ascent +cuda", when="+cuda")
+ depends_on("ascent +mpi", when="+mpi")
+ with when("+conduit"):
+ depends_on("conduit")
+ depends_on("conduit +mpi", when="+mpi")
+ with when("+catalyst"):
+ depends_on("libcatalyst@2.0: +conduit")
+ depends_on("libcatalyst +mpi", when="+mpi")
+ with when("+sundials"):
+ depends_on("sundials@4.0.0:4.1.0 +ARKODE +CVODE", when="@19.08:20.11")
+ depends_on("sundials@5.7.0: +ARKODE +CVODE", when="@21.07:22.04")
+ depends_on("sundials@6.0.0: +ARKODE +CVODE", when="@22.05:")
for arch in CudaPackage.cuda_arch_values:
depends_on(
"sundials@5.7.0: +ARKODE +CVODE +cuda cuda_arch=%s" % arch,
@@ -145,9 +188,10 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
when="@22.05: +sundials +rocm amdgpu_target=%s" % tgt,
)
- depends_on("cuda@9.0.0:", when="@:22.04 +cuda")
- depends_on("cuda@10.0.0:", when="@22.05: +cuda")
- depends_on("cuda@11.0.0:", when="@22.12: +cuda")
+ with when("+cuda"):
+ depends_on("cuda@9.0.0:", when="@:22.04")
+ depends_on("cuda@10.0.0:", when="@22.05:")
+ depends_on("cuda@11.0.0:", when="@22.12:")
depends_on("python@2.7:", type="build", when="@:20.04")
depends_on("cmake@3.5:", type="build", when="@:18.10")
depends_on("cmake@3.13:", type="build", when="@18.11:19.03")
@@ -162,9 +206,10 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
depends_on("rocrand", type="build", when="+rocm")
depends_on("hiprand", type="build", when="+rocm")
depends_on("rocprim", type="build", when="@21.05: +rocm")
- depends_on("hypre@2.18.2:", type="link", when="@:21.02 +hypre")
- depends_on("hypre@2.19.0:", type="link", when="@21.03: ~cuda +hypre")
- depends_on("hypre@2.20.0:", type="link", when="@21.03: +cuda +hypre")
+ with when("+hypre"):
+ depends_on("hypre@2.18.2:", type="link", when="@:21.02")
+ depends_on("hypre@2.19.0:", type="link", when="@21.03: ~cuda")
+ depends_on("hypre@2.20.0:", type="link", when="@21.03: +cuda")
depends_on("petsc", type="link", when="+petsc")
depends_on("intel-oneapi-mkl", type=("build", "link"), when="+sycl")
@@ -175,6 +220,14 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
# Check options compatibility
conflicts(
+ "+ascent", when="~conduit", msg="AMReX Ascent support needs Conduit interfaces (+conduit)"
+ )
+ conflicts(
+ "+catalyst",
+ when="~conduit",
+ msg="AMReX Catalyst2 support needs Conduit interfaces (+conduit)",
+ )
+ conflicts(
"+sundials",
when="@19.08:20.11 ~fortran",
msg="AMReX SUNDIALS support needs AMReX Fortran API (+fortran)",
@@ -261,6 +314,9 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
"-DUSE_XSDK_DEFAULTS=ON",
self.define_from_variant("AMReX_SPACEDIM", "dimensions"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("AMReX_ASCENT", "ascent"),
+ self.define_from_variant("AMReX_CATALYST", "catalyst"),
+ self.define_from_variant("AMReX_CONDUIT", "conduit"),
self.define_from_variant("AMReX_MPI", "mpi"),
self.define_from_variant("AMReX_OMP", "openmp"),
"-DXSDK_PRECISION:STRING=%s" % self.spec.variants["precision"].value.upper(),
@@ -279,30 +335,32 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("AMReX_PIC", "pic"),
]
+ if self.spec.satisfies("+fft"):
+ args.append("-DAMReX_FFT=ON")
+
if self.spec.satisfies("%fj"):
args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("-DAMReX_GPU_BACKEND=CUDA")
args.append("-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON")
args.append("-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON")
cuda_arch = self.spec.variants["cuda_arch"].value
args.append("-DAMReX_CUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch))
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
args.append("-DAMReX_GPU_BACKEND=HIP")
targets = self.spec.variants["amdgpu_target"].value
args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets))
- if "+sycl" in self.spec:
+ if self.spec.satisfies("+sycl"):
args.append("-DAMReX_GPU_BACKEND=SYCL")
# SYCL GPU backend only supported with Intel's oneAPI or DPC++ compilers
- sycl_compatible_compilers = ["dpcpp", "icpx"]
+ sycl_compatible_compilers = ["icpx"]
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
raise InstallError(
- "AMReX's SYCL GPU Backend requires DPC++ (dpcpp)"
- + " or the oneAPI CXX (icpx) compiler."
+ "AMReX's SYCL GPU Backend requires the oneAPI CXX (icpx) compiler."
)
return args
@@ -335,7 +393,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
if self.spec.satisfies("%fj"):
args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
args.append("-DCUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch))
@@ -347,7 +405,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
if self.spec.satisfies("@:21.11"):
return
- self.cache_extra_test_sources(["Tests"])
+ cache_extra_test_sources(self, ["Tests"])
def test_run_install_test(self):
"""build and run AmrCore test"""
@@ -356,11 +414,11 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
args = ["-S{0}".format(join_path(".", "cache", "amrex", "Tests", "SpackSmokeTest"))]
args.append("-DAMReX_ROOT=" + self.prefix)
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc)
args.append("-DMPI_CXX_COMPILER=" + self.spec["mpi"].mpicxx)
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("-DCMAKE_CUDA_COMPILER=" + join_path(self.spec["cuda"].prefix.bin, "nvcc"))
args.extend(self.cmake_args())
diff --git a/var/spack/repos/builtin/packages/amrfinder/package.py b/var/spack/repos/builtin/packages/amrfinder/package.py
index bca43c520c..091e57753c 100644
--- a/var/spack/repos/builtin/packages/amrfinder/package.py
+++ b/var/spack/repos/builtin/packages/amrfinder/package.py
@@ -18,11 +18,14 @@ class Amrfinder(MakefilePackage):
homepage = "https://github.com/ncbi/amr/wiki"
url = "https://github.com/ncbi/amr/archive/refs/tags/amrfinder_v3.10.30.tar.gz"
+ version("3.12.8", sha256="a199bc332877bad9033a7620bc5e8e849db1f19a9ba8b7357ec5451a6a283aa0")
version("3.11.8", sha256="8aac87595f28d0ba54ed3e97a1c033f9769a9b03e0aba78bc29cf6aff0cf45d1")
version("3.10.42", sha256="97254f8d6217a4618b7f29c05acbcfe0240ee5e98458f8da7df3840b4be39c1b")
version("3.10.30", sha256="2f1e30b86935a27cee740bd7229a41fbce278f2f60b33b8e51592bab8bdf23f1")
version("3.10.24", sha256="fce299c980cda740dcc4f53f9b2dc9061c856213e5bdbc2c339185a5fb7dcf6a")
+ depends_on("cxx", type="build") # generated
+
depends_on("blast-plus")
depends_on("hmmer")
depends_on("curl")
diff --git a/var/spack/repos/builtin/packages/amrvis/package.py b/var/spack/repos/builtin/packages/amrvis/package.py
index 16bfd5a732..8ca075cda5 100644
--- a/var/spack/repos/builtin/packages/amrvis/package.py
+++ b/var/spack/repos/builtin/packages/amrvis/package.py
@@ -20,6 +20,8 @@ class Amrvis(MakefilePackage):
version("main", branch="main")
+ depends_on("cxx", type="build") # generated
+
variant(
"dims",
default="3",
@@ -55,7 +57,7 @@ class Amrvis(MakefilePackage):
# Only doing gcc and clang at the moment.
# Intel currently fails searching for mpiicc, mpiicpc, etc.
- for comp in ["%intel", "%cce", "%nag", "%pgi", "%xl", "%xl_r"]:
+ for comp in ["%intel", "%cce", "%nag", "%xl", "%xl_r"]:
conflicts(comp, msg="Amrvis currently only builds with gcc and clang")
# Need to clone AMReX into Amrvis because Amrvis uses AMReX's source
@@ -146,7 +148,7 @@ class Amrvis(MakefilePackage):
# We don't want an AMREX_HOME the user may have set already
env.unset("AMREX_HOME")
# Help force Amrvis to not pick up random system compilers
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
env.set("MPI_HOME", self.spec["mpi"].prefix)
env.set("CC", self.spec["mpi"].mpicc)
env.set("CXX", self.spec["mpi"].mpicxx)
diff --git a/var/spack/repos/builtin/packages/ams/package.py b/var/spack/repos/builtin/packages/ams/package.py
index 4cf123a848..4f62c16454 100644
--- a/var/spack/repos/builtin/packages/ams/package.py
+++ b/var/spack/repos/builtin/packages/ams/package.py
@@ -10,7 +10,7 @@ class Ams(CMakePackage, CudaPackage):
"""AMS Autonomous Multiscale Framework."""
homepage = "https://github.com/LLNL/AMS"
- git = "git@github.com:LLNL/AMS.git"
+ git = "https://github.com/LLNL/AMS.git"
maintainers("koparasy", "lpottier")
@@ -28,6 +28,9 @@ class Ams(CMakePackage, CudaPackage):
submodules=False,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"faiss",
default=False,
@@ -111,31 +114,31 @@ class Ams(CMakePackage, CudaPackage):
)
)
- if "+verbose" in spec:
+ if spec.satisfies("+verbose"):
args.append("-DWITH_AMS_DEBUG=On")
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
args.append("-DWITH_HDF5=On")
args.append("-DHDF5_Dir={0}".format(spec["hdf5"].prefix))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("-DWITH_CUDA=On")
cuda_arch = spec.variants["cuda_arch"].value[0]
args.append("-DAMS_CUDA_ARCH={0}".format(cuda_arch))
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
args.append("-DWITH_CALIPER=On")
args.append("-DCALIPER_DIR={0}/share/cmake/caliper".format(spec["caliper"].prefix))
else:
args.append("-DWITH_CALIPER=Off")
- if "+faiss" in spec:
+ if spec.satisfies("+faiss"):
args.append("-DWITH_FAISS=On")
args.append("-DFAISS_DIR={0}".format(spec["faiss"].prefix))
else:
args.append("-DWITH_FAISS=Off")
- if "+torch" in spec:
+ if spec.satisfies("+torch"):
args.append("-DWITH_TORCH=On")
args.append(
"-DTorch_DIR={0}/lib/python{1}/site-packages"
@@ -144,15 +147,15 @@ class Ams(CMakePackage, CudaPackage):
)
)
- if "+redis" in spec:
+ if spec.satisfies("+redis"):
args.append("-DWITH_REDIS=On")
args.append("-DREDIS_PLUS_PLUS_DIR={0}".format(spec["redis-plus-plus"].prefix))
- if "+rabbitmq" in spec:
+ if spec.satisfies("+rabbitmq"):
args.append("-DWITH_RMQ=On")
args.append("-Damqpcpp_DIR={0}/cmake".format(spec["amqp-cpp"].prefix))
- if "+examples" in spec:
+ if spec.satisfies("+examples"):
args.append("-DWITH_EXAMPLES=On")
args.append("-DMFEM_DIR={0}".format(spec["mfem"].prefix))
diff --git a/var/spack/repos/builtin/packages/andi/package.py b/var/spack/repos/builtin/packages/andi/package.py
index e7a2052c75..ce8956db29 100644
--- a/var/spack/repos/builtin/packages/andi/package.py
+++ b/var/spack/repos/builtin/packages/andi/package.py
@@ -19,6 +19,9 @@ class Andi(AutotoolsPackage):
version("0.14", sha256="2c9e11524f38e74fe3f981e6acd9527c1a1ca30994a30c5e86808ba5165a25b7")
version("0.10", sha256="1ff371de0b6db4080e402ded2687947dc2d6913e28626edec21dcf5149489ee8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("m4", type="build")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/angsd/package.py b/var/spack/repos/builtin/packages/angsd/package.py
index a682aaf4dc..98ce30c1ba 100644
--- a/var/spack/repos/builtin/packages/angsd/package.py
+++ b/var/spack/repos/builtin/packages/angsd/package.py
@@ -22,6 +22,9 @@ class Angsd(MakefilePackage):
version("0.921", sha256="8892d279ce1804f9e17fe2fc65a47e5498e78fc1c1cb84d2ca2527fd5c198772")
version("0.919", sha256="c2ea718ca5a5427109f4c3415e963dcb4da9afa1b856034e25c59c003d21822a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("r", default=True, description="Enable R dependency")
depends_on("htslib")
diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py
index 5a5d1fa6f6..9f0bf7d37c 100644
--- a/var/spack/repos/builtin/packages/ant/package.py
+++ b/var/spack/repos/builtin/packages/ant/package.py
@@ -17,6 +17,7 @@ class Ant(Package):
license("Apache-2.0")
+ version("1.10.14", sha256="9a5fe31f44d1eb62590cbe38e4fab25b25e2f68643b38a54b66498e0bf621b54")
version("1.10.13", sha256="da006f4c888d41d0f3f213565e48aeff73e4d8a6196e494121d8da1e567a8406")
# https://nvd.nist.gov/vuln/detail/CVE-2020-1945
diff --git a/var/spack/repos/builtin/packages/antimony/package.py b/var/spack/repos/builtin/packages/antimony/package.py
index dfcc478f93..021aea6fd1 100644
--- a/var/spack/repos/builtin/packages/antimony/package.py
+++ b/var/spack/repos/builtin/packages/antimony/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Antimony(CMakePackage):
"""Human readable language for modifying sbml"""
- homepage = "http://antimony.sourceforge.net/"
+ homepage = "https://antimony.sourceforge.net/"
url = "antimony"
maintainers("rblake-llnl")
diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py
index 87cab3ca5b..baf2b4b717 100644
--- a/var/spack/repos/builtin/packages/antlr/package.py
+++ b/var/spack/repos/builtin/packages/antlr/package.py
@@ -14,12 +14,15 @@ class Antlr(AutotoolsPackage):
walk parse trees."""
homepage = "https://www.antlr2.org/"
- url = "http://www.antlr2.org/download/antlr-2.7.7.tar.gz"
+ url = "https://www.antlr2.org/download/antlr-2.7.7.tar.gz"
license("ANTLR-PD")
version("2.7.7", sha256="853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Fixes build with recent versions of GCC
patch("gcc.patch")
diff --git a/var/spack/repos/builtin/packages/antlr4-complete/package.py b/var/spack/repos/builtin/packages/antlr4-complete/package.py
new file mode 100644
index 0000000000..ed4c92b94d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/antlr4-complete/package.py
@@ -0,0 +1,63 @@
+# Copyright 2013-2024 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 glob
+
+from spack.package import *
+
+
+class Antlr4Complete(Package):
+ """
+ This package provides complete ANTLR tool, Java runtime and ST,
+ which lets you run the tool and the generated code by
+ version 4 of ANTLR (ANother Tool for Language Recognition).
+ """
+
+ homepage = "https://www.antlr.org"
+ url = "https://www.antlr.org/download/antlr-4.13.1-complete.jar"
+
+ version(
+ "4.13.1",
+ sha256="bc13a9c57a8dd7d5196888211e5ede657cb64a3ce968608697e4f668251a8487",
+ expand=False,
+ )
+ version(
+ "4.12.0",
+ sha256="88f18a2bfac0dde1009eda5c7dce358a52877faef7868f56223a5bcc15329e43",
+ expand=False,
+ )
+ version(
+ "4.11.1",
+ sha256="62975e192b4af2622b72b5f0131553ee3cbce97f76dc2a41632dcc55e25473e1",
+ expand=False,
+ )
+ version(
+ "4.10.1",
+ sha256="41949d41f20d31d5b8277187735dd755108df52b38db6c865108d3382040f918",
+ expand=False,
+ )
+ version(
+ "4.9.3",
+ sha256="afcd40946d3de4d81e28d7c88d467289e0587285d27adb172aecc5494a17df36",
+ expand=False,
+ )
+ version(
+ "4.7.2",
+ sha256="6852386d7975eff29171dae002cc223251510d35f291ae277948f381a7b380b4",
+ expand=False,
+ )
+
+ depends_on("java@8.0:", type="run", when="@4.10.0:")
+ depends_on("java@7.0:", type="run", when="@:4.9.3")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ rename(glob.glob("antlr-*-complete.jar")[0], "antlr-complete.jar")
+ install("antlr-complete.jar", prefix.bin)
+
+ def setup_run_environment(self, env):
+ env.set("ANTLR4_JAR_LOCATION", join_path(self.prefix.bin, "antlr-complete.jar"))
+ env.set("ANTLR_JAR_LOCATION", join_path(self.prefix.bin, "antlr-complete.jar"))
+ env.set("ANTLR_EXECUTABLE", join_path(self.prefix.bin, "antlr-complete.jar"))
diff --git a/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py b/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py
new file mode 100644
index 0000000000..e8b12cc36c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/antlr4-cpp-runtime/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Antlr4CppRuntime(CMakePackage):
+ """
+ This package provides runtime libraries required to use parsers
+ generated for the Cpp language by version 4 of ANTLR (ANother Tool
+ for Language Recognition).
+ """
+
+ homepage = "https://www.antlr.org"
+ url = "https://www.antlr.org/download/antlr4-cpp-runtime-4.13.1-source.zip"
+ version("4.13.1", sha256="d350e09917a633b738c68e1d6dc7d7710e91f4d6543e154a78bb964cfd8eb4de")
+ version("4.12.0", sha256="642d59854ddc0cebb5b23b2233ad0a8723eef20e66ef78b5b898d0a67556893b")
+ version("4.11.1", sha256="8018c335316e61bb768e5bd4a743a9303070af4e1a8577fa902cd053c17249da")
+ version("4.10.1", sha256="2a6e602fd593e0a65d8d310c0952bbdfff34ef361362ae87b2a850b62d36f0b6")
+ version("4.9.3", sha256="5f0af6efd81f476c3e775c486eb0a71c25d6bbc14373e88a64690e2738d68e03")
+ version("4.7.2", sha256="8631a39116684638168663d295a969ad544cead3e6089605a44fea34ec01f31a")
+
+ variant(
+ "clanglibcpp", default=False, description="Compile with clang libc++ instead of libstdc++"
+ )
+
+ depends_on("uuid", type=["build", "link"], when="@:4.10.1")
+ depends_on("git", type=["build"])
+ depends_on("pkgconfig", type=["build"])
+
+ def cmake_args(self):
+ args = [
+ self.define("ANTLR4_INSTALL", "On"),
+ self.define("ANTLR_BUILD_CPP_TESTS", "Off"),
+ self.define("WITH_DEMO", "Off"),
+ self.define("WITH_LIBCXX", "On" if "+clanglibcpp" in self.spec else "Off"),
+ self.define("WITH_STATIC_CRT", "Off"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/ants/package.py b/var/spack/repos/builtin/packages/ants/package.py
index 7903536777..6dcded9621 100644
--- a/var/spack/repos/builtin/packages/ants/package.py
+++ b/var/spack/repos/builtin/packages/ants/package.py
@@ -19,12 +19,15 @@ class Ants(CMakePackage):
git = "https://github.com/ANTsX/ANTs.git"
url = "https://github.com/ANTsX/ANTs/archive/v2.2.0.tar.gz"
+ version("2.5.1", sha256="8e3a7c0d3dab05883cba466aff262d78d832f679491318b94ce49b606565cebe")
version("2.4.3", sha256="13ba78917aca0b20e69f4c43da607f8fe8c810edba23b6f5fd64fbd81b70a79a")
version("2.4.0", sha256="a8ff78f4d2b16e495f340c9b0647f56c92cc4fc40b6ae04a60b941e5e239f9be")
version("20220205", commit="6f07ac55569d0d085d2adf7888d1c7a2bd563bfe", deprecated=True)
version("2.3.5", sha256="2fddfd5f274a47f1c383e734a7e763b627c4a8383d2d3b9971561f335016bb0a")
version("2.2.0", sha256="62f8f9ae141cb45025f4bb59277c053acf658d4a3ba868c9e0f609af72e66b4a")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
variant("minc", default=True, description="Build ITK with MINC support")
diff --git a/var/spack/repos/builtin/packages/aocc/detection_test.yaml b/var/spack/repos/builtin/packages/aocc/detection_test.yaml
new file mode 100644
index 0000000000..b1949ed155
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocc/detection_test.yaml
@@ -0,0 +1,75 @@
+paths:
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ - "bin/flang"
+ script: |
+ echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ platforms: [linux]
+ results:
+ - spec: aocc@3.1.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang"
+ cxx: ".*/bin/clang[+][+]"
+ fortran: ".*/bin/flang"
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)(based on LLVM Mirror.Version.12.0.0)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ platforms: [linux]
+ results:
+ - spec: aocc@3.1.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang"
+ cxx: ".*/bin/clang[+][+]"
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ - "bin/flang"
+ script: |
+ echo "AMD clang version 12.0.0 (CLANG: AOCC_3_0_0-Build#78 2020_12_10)(based on LLVM Mirror.Version.12.0.0)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ - executables:
+ - "bin/clang-11"
+ - "bin/clang++-11"
+ - "bin/flang-11"
+ script: |
+ echo "AMD clang version 11.0.0 (CLANG: AOCC_2_3_0-Build#85 2020_11_10)(based on LLVM Mirror.Version.11.0.0)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ platforms: [linux]
+ results:
+ - spec: aocc@3.0.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang$"
+ cxx: ".*/bin/clang[+][+]$"
+ fortran: ".*/bin/flang$"
+ - spec: aocc@2.3.0
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-11"
+ cxx: ".*/bin/clang[+][+]-11"
+ fortran: ".*/bin/flang-11"
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "clang version 8.0.0 (tags/RELEASE_800/final)"
+ echo "Target: x86_64-unknown-linux-gnu\n"
+ echo "Thread model: posix\n"
+ echo "InstalledDir: /usr/bin"
+ platforms: [linux]
+ results: []
diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py
index 8514400ae7..0366bbe971 100644
--- a/var/spack/repos/builtin/packages/aocc/package.py
+++ b/var/spack/repos/builtin/packages/aocc/package.py
@@ -6,9 +6,10 @@
from llnl.util import tty
from spack.package import *
+from spack.pkg.builtin.llvm import LlvmDetection
-class Aocc(Package):
+class Aocc(Package, LlvmDetection, CompilerPackage):
"""
The AOCC compiler system is a high performance, production quality code
generation tool. The AOCC environment provides various options to developers
@@ -28,12 +29,22 @@ class Aocc(Package):
"""
_name = "aocc"
- family = "compiler"
homepage = "https://www.amd.com/en/developer/aocc.html"
maintainers("amd-toolchain-support")
version(
+ ver="5.0.0",
+ sha256="966fac2d2c759e9de6e969c10ada7a7b306c113f7f1e07ea376829ec86380daa",
+ url="https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar",
+ preferred=True,
+ )
+ version(
+ ver="4.2.0",
+ sha256="ed5a560ec745b24dc0685ccdcbde914843fb2f2dfbfce1ba592de4ffbce1ccab",
+ url="https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar",
+ )
+ version(
ver="4.1.0",
sha256="5b04bfdb751c68dfb9470b34235d76efa80a6b662a123c3375b255982cb52acd",
url="https://download.amd.com/developer/eula/aocc/aocc-4-1/aocc-compiler-4.1.0.tar",
@@ -49,6 +60,8 @@ class Aocc(Package):
url="https://download.amd.com/developer/eula/aocc-compiler/aocc-compiler-3.2.0.tar",
)
+ depends_on("c", type="build") # generated
+
# Licensing
license_url = "https://www.amd.com/en/developer/aocc/aocc-compiler/eula.html"
@@ -56,7 +69,6 @@ class Aocc(Package):
depends_on("zlib-api")
depends_on("ncurses")
depends_on("libtool")
- depends_on("texinfo")
variant(
"license-agreed",
@@ -75,7 +87,7 @@ class Aocc(Package):
@run_before("install")
def license_reminder(self):
- if "+license-agreed" in self.spec:
+ if self.spec.satisfies("+license-agreed"):
tty.msg(
"Reminder: by setting +license-agreed you are confirming you agree to the terms "
"of the {0} EULA (found at {1})".format(self.spec.name, self.license_url)
@@ -101,3 +113,6 @@ class Aocc(Package):
for compiler in ["clang", "clang++"]:
with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f:
f.write(compiler_options)
+
+ compiler_version_regex = r"AOCC_(\d+[._]\d+[._]\d+)"
+ fortran_names = ["flang"]
diff --git a/var/spack/repos/builtin/packages/aocl-compression/package.py b/var/spack/repos/builtin/packages/aocl-compression/package.py
new file mode 100644
index 0000000000..eb0d1c6c9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-compression/package.py
@@ -0,0 +1,109 @@
+# Copyright 2013-2024 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.package import *
+
+
+class AoclCompression(CMakePackage):
+ """
+ AOCL-Compression is a software framework of various lossless compression
+ and decompression methods tuned and optimized for AMD Zen based CPUs.
+ This framework offers a single set of unified APIs for all the supported
+ compression and decompression methods which facilitate the applications
+ to easily integrate and use them.
+ AOCL-Compression supports lz4, zlib/deflate, lzma, zstd, bzip2, snappy,
+ and lz4hc based compression and decompression methods along with their
+ native APIs.
+ The library offers openMP based multi-threaded implementation of lz4, zlib,
+ zstd and snappy compression methods. It supports the dynamic dispatcher
+ feature that executes the most optimal function variant implemented using
+ Function Multi-versioning thereby offering a single optimized library
+ portable across different x86 CPU architectures.
+ AOCL-Compression framework is developed in C for UNIX® and Windows® based
+ systems. A test suite is provided for the validation and performance
+ benchmarking of the supported compression and decompression methods.
+ This suite also supports the benchmarking of IPP compression methods, such
+ as, lz4, lz4hc, zlib and bzip2. The library build framework offers CTest
+ based testing of the test cases implemented using GTest and the library
+ test suite.
+
+ LICENSING INFORMATION: By downloading, installing and using this software,
+ you agree to the terms and conditions of the AMD AOCL-Compression license
+ agreement. You may obtain a copy of this license agreement from
+ https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-eulas/compression-elua-4-2.pdf
+ """
+
+ _name = "aocl-compression"
+ homepage = "https://www.amd.com/en/developer/aocl/compression.html"
+ git = "https://github.com/amd/aocl-compression.git"
+ url = "https://github.com/amd/aocl-compression/archive/4.2.tar.gz"
+
+ maintainers("amd-toolchain-support")
+
+ version(
+ "5.0",
+ sha256="50bfb2c4a4738b96ed6d45627062b17bb9d0e1787c7d83ead2841da520327fa4",
+ preferred=True,
+ )
+ version("4.2", sha256="a18b3e7f64a8105c1500dda7b4c343e974b5e26bfe3dd838a1c1acf82a969c6f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("shared", default=True, description="Build shared library")
+ variant("zlib", default=True, description="Build zlib library")
+ variant("bzip2", default=True, description="Build bzip2 library")
+ variant("snappy", default=True, description="Build snappy library")
+ variant("zstd", default=True, description="Build zstd library")
+ variant("lzma", default=True, description="Build lzma library")
+ variant("lz4", default=True, description="Build lz4 library")
+ variant("lz4hc", default=True, description="Build lz4hc library")
+ variant(
+ "openmp",
+ default=False,
+ description="openmp based multi-threaded compression and decompression",
+ )
+ variant(
+ "decompress_fast",
+ default="OFF",
+ values=("OFF", "1", "2"),
+ description="Enable fast decompression modes",
+ multi=False,
+ )
+ variant("enable_fast_math", default=False, description="Enable fast-math optimizations")
+
+ depends_on("cmake@3.22:", type="build")
+
+ def cmake_args(self):
+ """Runs ``cmake`` in the build directory"""
+ spec = self.spec
+ args = []
+
+ args = [
+ self.define_from_variant("AOCL_ENABLE_THREADS", "openmp"),
+ self.define_from_variant("ENABLE_FAST_MATH", "enable_fast_math"),
+ "-DLZ4_FRAME_FORMAT_SUPPORT=ON",
+ "-DAOCL_LZ4HC_DISABLE_PATTERN_ANALYSIS=ON",
+ ]
+ if spec.satisfies("~shared"):
+ args.append("-DBUILD_STATIC_LIBS=ON")
+ if spec.satisfies("~zlib"):
+ args.append("-DAOCL_EXCLUDE_ZLIB=ON")
+ if spec.satisfies("~bzip2"):
+ args.append("-DAOCL_EXCLUDE_BZIP2=ON")
+ if spec.satisfies("~snappy"):
+ args.append("-DAOCL_EXCLUDE_SNAPPY=ON")
+ if spec.satisfies("~zstd"):
+ args.append("-DAOCL_EXCLUDE_ZSTD=ON")
+ if spec.satisfies("~lzma"):
+ args.append("-DAOCL_EXCLUDE_LZMA=ON")
+ if spec.satisfies("~lz4"):
+ args.append("-DAOCL_EXCLUDE_LZ4=ON")
+ if spec.satisfies("~lz4hc"):
+ args.append("-DAOCL_EXCLUDE_LZ4HC=ON")
+
+ args.append("-DAOCL_DECOMPRESS_FAST={}".format(spec.variants["decompress_fast"].value))
+ return args
diff --git a/var/spack/repos/builtin/packages/aocl-crypto/lsb_release.patch b/var/spack/repos/builtin/packages/aocl-crypto/lsb_release.patch
new file mode 100644
index 0000000000..6043876c41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-crypto/lsb_release.patch
@@ -0,0 +1,153 @@
+diff --git a/cmake/CompilerLinux.cmake b/cmake/CompilerLinux.cmake
+index f54bea37..8541e343 100644
+--- a/cmake/CompilerLinux.cmake
++++ b/cmake/CompilerLinux.cmake
+@@ -32,22 +32,11 @@ function(alcp_get_build_environment)
+ set (ALCP_BUILD_COMPILER "Clang_v${CMAKE_CXX_COMPILER_VERSION}")
+ endif()
+
+- # uses lsb_release utility on linux, as cmake doesnt have a variable which has the Linux flavor information
+- find_program(LSB_RELEASE_EXEC lsb_release)
+- if(NOT LSB_RELEASE_EXEC)
+- MESSAGE(FATAL_ERROR "LSB Release is missing from the machine, please install lsb_release!")
+- endif()
+- execute_process(COMMAND ${LSB_RELEASE_EXEC} -r -s
+- OUTPUT_VARIABLE OS_VERSION
+- OUTPUT_STRIP_TRAILING_WHITESPACE
+- )
+- execute_process(COMMAND ${LSB_RELEASE_EXEC} -i -s
+- OUTPUT_VARIABLE OS_VENDOR
+- OUTPUT_STRIP_TRAILING_WHITESPACE
+- )
+-
++ cmake_host_system_information(RESULT OS_VERSION QUERY DISTRIB_PRETTY_NAME)
++ message(STATUS "OS Information: ${OS_VERSION}")
++
+ # final build env string will contain compiler and system environment details where the binary was created
+- set (ALCP_BUILD_ENV ${ALCP_BUILD_COMPILER}_${OS_VENDOR}_${OS_VERSION} PARENT_SCOPE)
++ set (ALCP_BUILD_ENV ${ALCP_BUILD_COMPILER}_${OS_VERSION} PARENT_SCOPE)
+ endfunction(alcp_get_build_environment)
+
+
+diff --git a/docs/resources/Quick_Start.md b/docs/resources/Quick_Start.md
+index 17bc025a..278a3d1f 100644
+--- a/docs/resources/Quick_Start.md
++++ b/docs/resources/Quick_Start.md
+@@ -141,47 +141,6 @@ AOCL_CRYPTO_REPO="https://github.com/amd/aocl-crypto.git"
+ AOCL_UTILS_REPO="https://github.com/amd/aocl-utils.git"
+ AOCL_BRANCH="amd-main"
+
+-# Function to check if lsb_release is installed
+-ensure_lsb_release(){
+- if ! type "lsb_release" > /dev/null; then
+- if type "apt" > /dev/null; then
+- if type "sudo" > /dev/null; then
+- sudo apt update
+- sudo apt install lsb-release
+- else
+- echo "lsb-release not found, cannot install! missing \"sudo\" binary"
+- exit -1; # We cannot do anything anymore
+- fi
+- else
+- echo "lsb-release not found, cannot install! missing \"apt\" binary"
+- fi
+- fi
+-
+- type lsb_release > /dev/null
+- if [ $? -ne 0 ]; then
+- echo "lsb_release not found!"
+- exit -1;
+- else
+- echo "lsb_release found"
+- fi
+-}
+-
+-# Function to check if OS is ubuntu with a specific version
+-detect_ubuntu(){
+-
+- lsb_release --id | grep "Ubuntu" > /dev/null
+- if [ $? -eq 0 ]; then
+- # Detected Ubuntu
+- echo "Detected Ubuntu"
+- lsb_release --release | grep $1 > /dev/null
+- if [ $? -eq 0 ]; then
+- echo "Detected OS Release Version $1"
+- return 0
+- fi
+- fi
+- return 1 # Return error
+-}
+-
+ # Function to exit with an error if some execution failed
+ quit_if_status_not_zero(){
+ if [ $1 -ne 0 ]; then
+@@ -338,8 +297,6 @@ run_example_cfb(){
+
+ # Make sure we dont destroy anything
+ ensure_no_directory_conflict
+-# Make sure we can detect the OS
+-ensure_lsb_release
+ # Make sure all the needed packages (dependancies) are installed
+ ensure_packages
+ # Clone Utils and Crypto
+diff --git a/scripts/Clone_Build.sh b/scripts/Clone_Build.sh
+index 89a7cd2f..1ed2f3cf 100755
+--- a/scripts/Clone_Build.sh
++++ b/scripts/Clone_Build.sh
+@@ -36,47 +36,6 @@ AOCL_CRYPTO_REPO="git@er.github.amd.com:AOCL/aocl-crypto"
+ AOCL_UTILS_REPO="git@github.amd.com:AOCL/aocl-utils"
+ AOCL_BRANCH="amd-main"
+
+-# Function to check if lsb_release is installed
+-ensure_lsb_release(){
+- if ! type "lsb_release" > /dev/null; then
+- if type "apt" > /dev/null; then
+- if type "sudo" > /dev/null; then
+- sudo apt update
+- sudo apt install lsb-release
+- else
+- echo "lsb-release not found, cannot install! missing \"sudo\" binary"
+- exit -1; # We cannot do anything anymore
+- fi
+- else
+- echo "lsb-release not found, cannot install! missing \"apt\" binary"
+- fi
+- fi
+-
+- type lsb_release > /dev/null
+- if [ $? -ne 0 ]; then
+- echo "lsb_release not found!"
+- exit -1;
+- else
+- echo "lsb_release found"
+- fi
+-}
+-
+-# Function to check if OS is ubuntu with a specific version
+-detect_ubuntu(){
+-
+- lsb_release --id | grep "Ubuntu" > /dev/null
+- if [ $? -eq 0 ]; then
+- # Detected Ubuntu
+- echo "Detected Ubuntu"
+- lsb_release --release | grep $1 > /dev/null
+- if [ $? -eq 0 ]; then
+- echo "Detected OS Release Version $1"
+- return 0
+- fi
+- fi
+- return 1 # Return error
+-}
+-
+ # Function to exit with an error if some execution failed
+ quit_if_status_not_zero(){
+ if [ $1 -ne 0 ]; then
+@@ -233,8 +192,6 @@ run_example_cfb(){
+
+ # Make sure we dont destroy anything
+ ensure_no_directory_conflict
+-# Make sure we can detect the OS
+-ensure_lsb_release
+ # Make sure all the needed packages (dependancies) are installed
+ ensure_packages
+ # Clone Utils and Crypto
diff --git a/var/spack/repos/builtin/packages/aocl-crypto/package.py b/var/spack/repos/builtin/packages/aocl-crypto/package.py
new file mode 100644
index 0000000000..4de7a3a439
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-crypto/package.py
@@ -0,0 +1,104 @@
+# Copyright 2013-2024 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.package import *
+
+
+class AoclCrypto(CMakePackage):
+ """
+ AOCL-Crypto is a library consisting of basic cryptographic functions
+ optimized and tuned for AMD Zenâ„¢ based microarchitecture.
+
+ This library provides a unified solution for Cryptographic routines such
+ as AES (Advanced Encryption Standard) encryption/decryption routines
+ (CFB, CTR, CBC, CCM, GCM, OFB, SIV, XTS), SHA (Secure Hash Algorithms)
+ routines (SHA2, SHA3, SHAKE), Message Authentication Code (CMAC, HMAC),
+ ECDH (Elliptic-curve Diffie–Hellman) and RSA (Rivest, Shamir, and Adleman)
+ key generation functions, etc. AOCL Crypto supports a dynamic dispatcher
+ feature that executes the most optimal function variant implemented using
+ Function Multi-versioning thereby offering a single optimized library
+ portable across different x86 CPU architectures.
+
+ AOCL Crypto framework is developed in C / C++ for Unix and Windows based
+ systems.
+
+ LICENSING INFORMATION: By downloading, installing and using this software,
+ you agree to the terms and conditions of the AMD AOCL-Cryptography license
+ agreement. You may obtain a copy of this license agreement from
+ https://www.amd.com/en/developer/aocl/cryptography/eula/cryptography-4-2-eula.html
+ """
+
+ _name = "aocl-crypto"
+ homepage = "https://www.amd.com/en/developer/aocl/cryptography.html"
+ url = "https://github.com/amd/aocl-crypto/archive/4.2.tar.gz"
+ git = "https://github.com/amd/aocl-crypto/"
+
+ maintainers("amd-toolchain-support")
+
+ version(
+ "5.0",
+ sha256="b15e609943f9977e13f2d5839195bb7411c843839a09f0ad47f78f57e8821c23",
+ preferred=True,
+ )
+ version("4.2", sha256="2bdbedd8ab1b28632cadff237f4abd776e809940ad3633ad90fc52ce225911fe")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ variant("examples", default=False, description="Build examples")
+ variant("ipp", default=False, description="Build Intel IPP library")
+
+ # Removed dependency on lsb_release
+ patch(
+ "lsb_release.patch",
+ sha256="b61d6d2518276c56d37e8c64d18488081af70f29a62f315ecbd23664e0e440b9",
+ when="@5.0",
+ )
+
+ depends_on("cmake@3.22:", type="build")
+ depends_on("openssl@3.1.5:")
+ depends_on("intel-oneapi-ippcp@2021.12.0:", when="+ipp")
+ depends_on("p7zip", type="build")
+ for vers in ["4.2", "5.0"]:
+ with when(f"@={vers}"):
+ depends_on(f"aocl-utils@={vers}")
+
+ @property
+ def build_directory(self):
+ """Returns the directory to use when building the package
+
+ :return: directory where to build the package
+ """
+
+ build_directory = self.stage.source_path
+
+ if self.spec.variants["build_type"].value == "Debug":
+ build_directory = join_path(build_directory, "build", "debug")
+ else:
+ build_directory = join_path(build_directory, "build", "release")
+
+ return build_directory
+
+ def cmake_args(self):
+ """Runs ``cmake`` in the build directory"""
+ spec = self.spec
+
+ args = [
+ self.define_from_variant("ALCP_ENABLE_EXAMPLES", "examples"),
+ self.define("ENABLE_AOCL_UTILS", True),
+ self.define("AOCL_UTILS_INSTALL_DIR", spec["aocl-utils"].prefix),
+ self.define("CMAKE_INSTALL_LIBDIR", "lib"),
+ self.define("ALCP_ENABLE_DYNAMIC_COMPILER_PICK", False),
+ ]
+
+ compat_libs = ["openssl"]
+ args.append(self.define("OPENSSL_INSTALL_DIR", spec["openssl"].prefix))
+
+ if "+ipp" in spec:
+ compat_libs.append("ipp")
+ args.append(self.define("IPP_INSTALL_DIR", spec["intel-oneapi-ippcp"].prefix))
+
+ args.append(self.define("AOCL_COMPAT_LIBS", ",".join(compat_libs)))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/aocl-da/0001-Fix-to-enable-cmake-to-be-configured-with-examples-o.patch b/var/spack/repos/builtin/packages/aocl-da/0001-Fix-to-enable-cmake-to-be-configured-with-examples-o.patch
new file mode 100644
index 0000000000..95fbe82b44
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-da/0001-Fix-to-enable-cmake-to-be-configured-with-examples-o.patch
@@ -0,0 +1,27 @@
+From 961ce9edbba7e18eca97cf3725515e627bbe39e1 Mon Sep 17 00:00:00 2001
+From: Edvin Hopkins <edvin.hopkins@amd.com>
+Date: Wed, 16 Oct 2024 11:38:28 +0100
+Subject: [PATCH] Fix to enable cmake to be configured with examples off but
+ gtests on
+
+---
+ tests/unit_tests/CMakeLists.txt | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt
+index e5e05c6..e479c7d 100644
+--- a/tests/unit_tests/CMakeLists.txt
++++ b/tests/unit_tests/CMakeLists.txt
+@@ -107,9 +107,6 @@ add_executable(kmeans_tests kmeans_tests.cpp)
+ add_executable(nlls_tests nlls_tests.cpp)
+
+ add_executable(pca_tests pca_tests.cpp)
+-target_compile_definitions(
+- pca
+- PRIVATE DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../data/factorization_data/")
+ target_link_libraries(pca_tests PRIVATE ${BLAS})
+
+ add_executable(data data_tests.cpp)
+--
+2.34.1
+
diff --git a/var/spack/repos/builtin/packages/aocl-da/package.py b/var/spack/repos/builtin/packages/aocl-da/package.py
new file mode 100644
index 0000000000..067cb8d03d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-da/package.py
@@ -0,0 +1,130 @@
+# Copyright 2013-2024 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.package import *
+from spack.util.environment import EnvironmentModifications
+
+
+class AoclDa(CMakePackage):
+ """
+ The AOCL Data Analytics Library (AOCL-DA) is a data analytics library
+ providing optimized building blocks for data analysis. It is written with a
+ C-compatible interface to make it as seamless as possible to integrate
+ with the library from whichever programming language you are using.
+ The intended workflow for using the library is as follows:
+ • load data from memory by reading CSV files or using the in-built
+ da_datastore object
+ • preprocess the data by removing missing values, standardizing, and
+ selecting certain subsets of the data, before extracting contiguous
+ arrays of data from the da_datastore objects
+ • data processing (e.g. principal component analysis, linear model
+ fitting, etc.)
+ C++ example programs can be found in the examples folder of your
+ installation.
+ """
+
+ _name = "aocl-da"
+ homepage = "https://www.amd.com/en/developer/aocl/data-analytics.html"
+ git = "https://github.com/amd/aocl-data-analytics"
+ url = "https://github.com/amd/aocl-data-analytics/archive/5.0.tar.gz"
+
+ maintainers("amd-toolchain-support")
+
+ version("5.0", sha256="3458adc7be39c78a08232c887f32838633149df0a69ccea024327c3edc5a5c1d")
+
+ variant("examples", default=True, description="Build examples")
+ variant("gtest", default=False, description="Build and install Googletest")
+ variant("ilp64", default=False, description="Build with ILP64 support")
+ variant(
+ "openmp",
+ default=True,
+ description="Build using OpenMP and link to threaded BLAS and LAPACK",
+ )
+ variant("shared", default=True, description="Build shared libraries")
+ variant("python", default=True, description="Build with Python bindings")
+
+ # Fix to enable cmake to be configured with examples off but gtest on
+ patch(
+ "0001-Fix-to-enable-cmake-to-be-configured-with-examples-o.patch",
+ sha256="65be59e99d52816cb77d3e887cd4816870576b46748b53073658caa9ca07d127",
+ when="@5.0",
+ )
+
+ depends_on("cmake@3.22:", type="build")
+ for vers in ["5.0"]:
+ with when(f"@={vers}"):
+ depends_on(f"aocl-utils@={vers} +shared", when="+shared")
+ depends_on(f"aocl-utils@={vers} ~shared", when="~shared")
+ depends_on(f"amdblis@={vers} libs=shared", when="+shared")
+ depends_on(f"amdblis@={vers} libs=static", when="~shared")
+ depends_on(f"amdlibflame@={vers} +shared", when="+shared")
+ depends_on(f"amdlibflame@={vers} ~shared", when="~shared")
+ depends_on(f"aocl-sparse@={vers} +shared", when="+shared")
+ depends_on(f"aocl-sparse@={vers} ~shared", when="~shared")
+
+ depends_on("amdblis threads=openmp", when="+openmp")
+ depends_on("amdlibflame threads=openmp", when="+openmp")
+ depends_on("amdblis threads=none", when="~openmp")
+ depends_on("amdlibflame threads=none", when="~openmp")
+ depends_on("aocl-sparse +openmp", when="+openmp")
+ depends_on("aocl-sparse ~openmp", when="~openmp")
+
+ with when("+python"):
+ depends_on("python", type=("build", "run"))
+ depends_on("py-wheel", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-pybind11", type=("build", "link", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-pip", type=("build", "run"))
+ depends_on("patchelf", type="build")
+ depends_on("py-pytest", type="test")
+ depends_on("py-scikit-learn", type=("test", "run"))
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("%aocc"):
+ cc = self.compiler.cc
+ compiler_install_dir = os.path.dirname(os.path.dirname(cc))
+ env.append_path("LD_LIBRARY_PATH", join_path(compiler_install_dir, "lib"))
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PYTHONPATH", join_path(self.prefix, "python_package"))
+
+ def cmake_args(self):
+ """Runs ``cmake`` in the build directory"""
+ spec = self.spec
+ args = []
+ args.append(f"-DUTILS_LIB={spec['aocl-utils'].libs}")
+ args.append(f"-DUTILS_CPUID_LIB={spec['aocl-utils'].libs}")
+ args.append(f"-DUTILS_CORE_LIB={spec['aocl-utils'].libs}")
+ args.append(f"-DBLAS_LIB={spec['amdblis'].libs}")
+ args.append("-DBLAS_INCLUDE_DIR={0}/blis".format(spec["amdblis"].prefix.include))
+ args.append(f"-DLAPACK_LIB={spec['amdlibflame'].libs}")
+ args.append("-DLAPACK_INCLUDE_DIR={0}".format(spec["amdlibflame"].prefix.include))
+ args.append(f"-DSPARSE_LIB={spec['aocl-sparse'].libs}")
+ args.append("-DSPARSE_INCLUDE_DIR={0}".format(spec["aocl-sparse"].prefix.include))
+ args.append(self.define_from_variant("BUILD_EXAMPLES", "examples"))
+ args.append(self.define_from_variant("BUILD_GTEST", "gtest"))
+ args.append(self.define_from_variant("BUILD_ILP64", "ilp64"))
+ args.append(self.define_from_variant("BUILD_SMP", "openmp"))
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+ args.append(self.define_from_variant("BUILD_PYTHON", "python"))
+
+ return args
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def test_python(self):
+ """Perform smoke tests on the installed package."""
+ pytest = which("pytest")
+ envmod = EnvironmentModifications()
+ envmod.append_path("PYTHONPATH", join_path(self.prefix, "python_package"))
+ pytest.add_default_envmod(envmod)
+ pytest(
+ join_path(
+ install_test_root(self), join_path(self.stage.source_path, "python_interface")
+ )
+ )
diff --git a/var/spack/repos/builtin/packages/aocl-libmem/cmake.patch b/var/spack/repos/builtin/packages/aocl-libmem/cmake.patch
new file mode 100644
index 0000000000..733ef7c048
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-libmem/cmake.patch
@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74b7bd8..d787a7d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,7 +32,7 @@ endif()
+ # set the project name and version
+ set(LIBMEM_VERSION_STRING 5.0)
+
+-project(aocl-libmem VERSION ${LIBMEM_VERSION_STRING} LANGUAGES C DESCRIPTION
++project(aocl-libmem VERSION ${LIBMEM_VERSION_STRING} LANGUAGES C CXX DESCRIPTION
+ "Library of AMD optimized string/memory functions")
+
+ string(TIMESTAMP BUILD_DATE "%Y%m%d")
+@@ -45,7 +45,7 @@ add_definitions(-DLIBMEM_BUILD_VERSION="${LIBMEM_BUILD_VERSION_STR}")
+ set(DEFAULT_BUILD_TYPE "Release")
+
+ set(CMAKE_C_STANDARD 99)
+-
++set(CMAKE_CXX_STANDARD 17)
+ option(ENABLE_LOGGING "Enable Logger" OFF)
+
+ option(ENABLE_TUNABLES "Enable user input" OFF)
+@@ -100,6 +100,22 @@ endif ()
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+ # let the build system know the tools directory
+-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools)
++include(CheckCXXSourceRuns)
++check_cxx_source_runs("
++#include <cpuid.h>
++int main() {
++ unsigned int eax, ebx, ecx, edx;
++ if (__get_cpuid(0, &eax, &ebx, &ecx, &edx)) {
++ // The 'AuthenticAMD' string is EBX, EDX, ECX after calling cpuid with eax=0
++ if (ebx == 0x68747541 && edx == 0x69746E65 && ecx == 0x444D4163) {
++ return 0; // AMD CPU detected
++ }
++ }
++ return 1; // Non-AMD CPU
++}
++" AMD_Tools)
++if(AMD_Tools)
++ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools)
++endif()
+
+ file(WRITE ${CMAKE_BINARY_DIR}/version.h ${LIBMEM_BUILD_VERSION_STR})
diff --git a/var/spack/repos/builtin/packages/aocl-libmem/package.py b/var/spack/repos/builtin/packages/aocl-libmem/package.py
new file mode 100644
index 0000000000..d016936225
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aocl-libmem/package.py
@@ -0,0 +1,90 @@
+# Copyright 2013-2024 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.package import *
+
+
+class AoclLibmem(CMakePackage):
+ """
+ AOCL-LibMem is a Linux library of data movement and manipulation
+ functions (such as memcpy and strcpy) highly optimized for AMD Zen
+ micro-architecture.
+
+ This library has multiple implementations of each function that can be
+ chosen based on the application requirements as per alignments, instruction
+ choice, threshold values, and tunable parameters.
+
+ By default, this library will choose the best fit implementation based on
+ the underlying micro-architectural support for CPU features and instructions.
+
+ LICENSING INFORMATION: By downloading, installing and using this software,
+ you agree to the terms and conditions of the AMD AOCL-LibMem license
+ agreement. You may obtain a copy of this license agreement from
+ https://www.amd.com/en/developer/aocl/libmem/eula/libmem-4-2-eula.html
+ """
+
+ _name = "aocl-libmem"
+ homepage = "https://www.amd.com/en/developer/aocl/libmem.html"
+ git = "https://github.com/amd/aocl-libmem"
+ url = "https://github.com/amd/aocl-libmem/archive/4.2.tar.gz"
+
+ maintainers("amd-toolchain-support")
+
+ version(
+ "5.0",
+ sha256="d3148db1a57fec4f3468332c775cade356e8133bf88385991964edd7534b7e22",
+ preferred=True,
+ )
+ version("4.2", sha256="4ff5bd8002e94cc2029ef1aeda72e7cf944b797c7f07383656caa93bcb447569")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("logging", default=False, description="Enable/Disable logger")
+ variant("tunables", default=False, description="Enable/Disable user input")
+ variant("shared", default=True, description="build shared library")
+ variant(
+ "vectorization",
+ default="auto",
+ description="Use hardware vectorization support",
+ values=("avx2", "avx512", "auto"),
+ multi=False,
+ )
+
+ # validator needs to be built only for AuthenticAMD targets
+ patch(
+ "cmake.patch",
+ sha256="43453a83f322de7c89264439b2e9cbde855e50f550e13ebc884d13d959002092",
+ when="@5.0",
+ )
+
+ depends_on("cmake@3.22:", type="build")
+
+ @property
+ def libs(self):
+ """find libmem libs function"""
+ shared = "+shared" in self.spec
+ return find_libraries("libaocl-libmem", root=self.prefix, recursive=True, shared=shared)
+
+ def cmake_args(self):
+ """Runs ``cmake`` in the build directory"""
+ spec = self.spec
+
+ args = []
+ args.append(self.define_from_variant("ENABLE_LOGGING", "logging"))
+ args.append(self.define_from_variant("ENABLE_TUNABLES", "tunables"))
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+
+ if spec.satisfies("vectorisation=auto"):
+ if "avx512" in self.spec.target:
+ args.append("-ALMEM_ARCH=avx512")
+ elif "avx2" in self.spec.target:
+ args.append("-ALMEM_ARCH=avx2")
+ else:
+ args.append("-ALMEM_ARCH=none")
+ else:
+ args.append(self.define("ALMEM_ARCH", spec.variants["vectorization"].value))
+ return args
diff --git a/var/spack/repos/builtin/packages/aocl-sparse/package.py b/var/spack/repos/builtin/packages/aocl-sparse/package.py
index a3f82377dd..eb438a130c 100644
--- a/var/spack/repos/builtin/packages/aocl-sparse/package.py
+++ b/var/spack/repos/builtin/packages/aocl-sparse/package.py
@@ -5,8 +5,6 @@
import os
-from llnl.util import tty
-
from spack.package import *
@@ -19,19 +17,25 @@ class AoclSparse(CMakePackage):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-Sparse license agreement.
You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/sparse/eula/sparse-libraries-4-1-eula.html
+ https://www.amd.com/en/developer/aocl/sparse/eula/sparse-libraries-4-2-eula.html
https://www.amd.com/en/developer/aocl/sparse/eula/sparse-libraries-eula.html
"""
_name = "aocl-sparse"
homepage = "https://www.amd.com/en/developer/aocl/sparse.html"
- url = "https://github.com/amd/aocl-sparse/archive/3.0.tar.gz"
git = "https://github.com/amd/aocl-sparse"
+ url = "https://github.com/amd/aocl-sparse/archive/3.0.tar.gz"
maintainers("amd-toolchain-support")
license("MIT")
+ version(
+ "5.0",
+ sha256="7528970f41ae60563df9fe1f8cc74a435be1566c01868a603ab894e9956c3c94",
+ preferred=True,
+ )
+ version("4.2", sha256="03cd67adcfea4a574fece98b60b4aba0a6e5a9c8f608ff1ccc1fb324a7185538")
version("4.1", sha256="35ef437210bc25fdd802b462eaca830bfd928f962569b91b592f2866033ef2bb")
version("4.0", sha256="68524e441fdc7bb923333b98151005bed39154d9f4b5e8310b5c37de1d69c2c3")
version("3.2", sha256="db7d681a8697d6ef49acf3e97e8bec35b048ce0ad74549c3b738bbdff496618f")
@@ -39,6 +43,9 @@ class AoclSparse(CMakePackage):
version("3.0", sha256="1d04ba16e04c065051af916b1ed9afce50296edfa9b1513211a7378e1d6b952e")
version("2.2", sha256="33c2ed6622cda61d2613ee63ff12c116a6cd209c62e54307b8fde986cd65f664")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared library")
variant("ilp64", default=False, description="Build with ILP64 support")
variant("examples", default=False, description="Build sparse examples")
@@ -50,12 +57,29 @@ class AoclSparse(CMakePackage):
when="@4.0: target=zen4:",
description="Enable experimental AVX512 support",
)
-
- depends_on("amdblis", when="@4.1:")
- depends_on("amdlibflame", when="@4.1:")
+ variant("openmp", default=True, when="@4.2:", description="Enable OpenMP support")
+
+ for vers in ["4.1", "4.2", "5.0"]:
+ with when(f"@={vers}"):
+ depends_on(f"amdblis@={vers}")
+ depends_on(f"amdlibflame@={vers}")
+ if Version(vers) >= Version("4.2"):
+ depends_on(f"aocl-utils@={vers}")
+
+ depends_on("amdblis threads=openmp", when="+openmp")
+ depends_on("amdlibflame threads=openmp", when="+openmp")
+ depends_on("amdblis threads=none", when="~openmp")
+ depends_on("amdlibflame threads=none", when="~openmp")
depends_on("boost", when="+benchmarks")
depends_on("boost", when="@2.2")
- depends_on("cmake@3.11:", type="build")
+ depends_on("cmake@3.22:", type="build")
+
+ @property
+ def libs(self):
+ """find libaoclsparse libs function"""
+ return find_libraries(
+ "libaoclsparse", root=self.prefix, shared="+shared" in self.spec, recursive=True
+ )
@property
def build_directory(self):
@@ -77,18 +101,6 @@ class AoclSparse(CMakePackage):
"""Runs ``cmake`` in the build directory"""
spec = self.spec
- if not (
- spec.satisfies(r"%aocc@3.2:4.1")
- or spec.satisfies(r"%gcc@12.2:13.1")
- or spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
-
args = []
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
args.append(self.define_from_variant("BUILD_CLIENTS_SAMPLES", "examples"))
@@ -99,16 +111,20 @@ class AoclSparse(CMakePackage):
if spec.satisfies("@3.0:"):
args.append(self.define_from_variant("BUILD_ILP64", "ilp64"))
- if self.spec.satisfies("@4.0:"):
- args.append("-DAOCL_BLIS_LIB=" + str(self.spec["amdblis"].libs))
+ if spec.satisfies("@4.0:"):
+ args.append(f"-DAOCL_BLIS_LIB={self.spec['amdblis'].libs}")
+ args.append("-DAOCL_BLIS_INCLUDE_DIR={0}/blis".format(spec["amdblis"].prefix.include))
+ args.append(f"-DAOCL_LIBFLAME={spec['amdlibflame'].libs}")
args.append(
- "-DAOCL_BLIS_INCLUDE_DIR={0}/blis".format(self.spec["amdblis"].prefix.include)
- )
- args.append("-DAOCL_LIBFLAME=" + str(self.spec["amdlibflame"].libs))
- args.append(
- "-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include)
+ "-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(spec["amdlibflame"].prefix.include)
)
+ if spec.satisfies("@4.2:"):
+ args.append(f"-DAOCL_UTILS_LIB={spec['aocl-utils'].libs}")
+ args.append("-DAOCL_UTILS_INCLUDE_DIR={0}".format(spec["aocl-utils"].prefix.include))
+
+ args.append(self.define_from_variant("SUPPORT_OMP", "openmp"))
+
return args
@run_after("build")
diff --git a/var/spack/repos/builtin/packages/aocl-utils/package.py b/var/spack/repos/builtin/packages/aocl-utils/package.py
index 7b279e8e47..343b4eb11e 100644
--- a/var/spack/repos/builtin/packages/aocl-utils/package.py
+++ b/var/spack/repos/builtin/packages/aocl-utils/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from llnl.util import tty
-
from spack.package import *
@@ -25,7 +23,7 @@ class AoclUtils(CMakePackage):
LICENSING INFORMATION: By downloading, installing and using this software,
you agree to the terms and conditions of the AMD AOCL-Utils license
agreement. You may obtain a copy of this license agreement from
- https://www.amd.com/en/developer/aocl/utils/utils-eula/utils-eula-4-1.html
+ https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-eulas/utils-elua-4-2.pdf
"""
_name = "aocl-utils"
@@ -37,30 +35,51 @@ class AoclUtils(CMakePackage):
license("BSD-3-Clause")
- version("4.1", sha256="a2f271f5eef07da366dae421af3c89286ebb6239047a31a46451758d4a06bc85")
+ version(
+ "5.0",
+ sha256="ee2e5d47f33a3f673b3b6fcb88a7ef1a28648f407485ad07b6e9bf1b86159c59",
+ preferred=True,
+ )
+ version("4.2", sha256="1294cdf275de44d3a22fea6fc4cd5bf66260d0a19abb2e488b898aaf632486bd")
+ version("4.1", sha256="660746e7770dd195059ec25e124759b126ee9f060f43302d13354560ca76c02c")
+
+ depends_on("cxx", type="build") # generated
variant("doc", default=False, description="enable documentation")
variant("tests", default=False, description="enable testing")
+ variant("shared", default=True, when="@4.2:", description="build shared library")
variant("examples", default=False, description="enable examples")
+ depends_on("cmake@3.22:", type="build")
depends_on("doxygen", when="+doc")
+ @property
+ def libs(self):
+ """find aocl-utils libs function"""
+ shared = "+shared" in self.spec
+ return find_libraries("libaoclutils", root=self.prefix, recursive=True, shared=shared)
+
def cmake_args(self):
- if not (
- self.spec.satisfies(r"%aocc@3.2:4.1")
- or self.spec.satisfies(r"%gcc@12.2:13.1")
- or self.spec.satisfies(r"%clang@15:16")
- ):
- tty.warn(
- "AOCL has been tested to work with the following compilers\
- versions - gcc@12.2:13.1, aocc@3.2:4.1, and clang@15:16\
- see the following aocl userguide for details: \
- https://www.amd.com/content/dam/amd/en/documents/developer/version-4-1-documents/aocl/aocl-4-1-user-guide.pdf"
- )
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define("CMAKE_INSTALL_LIBDIR", "lib"),
+ ]
- args = []
- args.append(self.define_from_variant("ALCI_DOCS", "doc"))
- args.append(self.define_from_variant("ALCI_TESTS", "tests"))
- args.append(self.define_from_variant("ALCI_EXAMPLES", "examples"))
+ if self.spec.satisfies("@5.0:"):
+ args.extend(
+ [
+ self.define_from_variant("AU_BUILD_DOCS", "doc"),
+ self.define_from_variant("AU_BUILD_TESTS", "tests"),
+ self.define_from_variant("AU_BUILD_EXAMPLES", "examples"),
+ ]
+ )
+ else:
+ args.extend(
+ [
+ self.define_from_variant("ALCI_DOCS", "doc"),
+ self.define_from_variant("ALCI_TESTS", "tests"),
+ self.define_from_variant("ALCI_EXAMPLES", "examples"),
+ ]
+ )
return args
diff --git a/var/spack/repos/builtin/packages/aoflagger/package.py b/var/spack/repos/builtin/packages/aoflagger/package.py
index 66309bf9fd..5dfc09e722 100644
--- a/var/spack/repos/builtin/packages/aoflagger/package.py
+++ b/var/spack/repos/builtin/packages/aoflagger/package.py
@@ -18,6 +18,8 @@ class Aoflagger(CMakePackage):
version("2.10.0", sha256="3ec1188d37101acf2029575ebc09c50b19c158c88a12b55ac5d25a96bd8fc18d")
+ depends_on("cxx", type="build") # generated
+
depends_on("casacore+python~fftpack@1.10:")
depends_on("fftw~mpi@3.0:")
depends_on("boost+python@:1.66.99")
diff --git a/var/spack/repos/builtin/packages/aom/package.py b/var/spack/repos/builtin/packages/aom/package.py
index 2862b40edc..55c78e9f35 100644
--- a/var/spack/repos/builtin/packages/aom/package.py
+++ b/var/spack/repos/builtin/packages/aom/package.py
@@ -15,6 +15,9 @@ class Aom(CMakePackage):
license("BSD-2-Clause AND AOM-Patent-License-1.0", checked_by="tgamblin")
version("v1.0.0-errata1", commit="29d8ce4836630df5cc7ab58f1afc4836765fc212")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("yasm")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch b/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch
deleted file mode 100644
index 9b27aee6a7..0000000000
--- a/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From eb1e1351da41a0da25aa056636932acd8a4f955f Mon Sep 17 00:00:00 2001
-From: Ethan Stewart <ethan.stewart@amd.com>
-Date: Fri, 25 Sep 2020 09:53:42 -0500
-Subject: [PATCH] Add amdgcn to devicelibs bitcode names 3.8
-
----
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-index 25d3db59d44..1bb9d993bf7 100644
---- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-+++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-@@ -148,21 +148,21 @@ const char *AMDGCN::OpenMPLinker::constructOmpExtraCmds(
- llvm::StringRef WaveFrontSizeBC;
- std::string GFXVersion = SubArchName.drop_front(3).str();
- if (stoi(GFXVersion) < 1000)
-- WaveFrontSizeBC = "oclc_wavefrontsize64_on.bc";
-+ WaveFrontSizeBC = "oclc_wavefrontsize64_on.amdgcn.bc";
- else
-- WaveFrontSizeBC = "oclc_wavefrontsize64_off.bc";
-+ WaveFrontSizeBC = "oclc_wavefrontsize64_off.amdgcn.bc";
-
- // FIXME: remove double link of hip aompextras, ockl, and WaveFrontSizeBC
- if (Args.hasArg(options::OPT_cuda_device_only))
- BCLibs.append(
- {Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
-- "hip.bc", "ockl.bc",
-+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
- std::string(WaveFrontSizeBC)});
- else {
- BCLibs.append(
- {Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
- Args.MakeArgString("libaompextras-amdgcn-" + SubArchName + ".bc"),
-- "hip.bc", "ockl.bc",
-+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
- Args.MakeArgString("libbc-hostrpc-amdgcn.a"),
- std::string(WaveFrontSizeBC)});
-
---
-2.17.1
diff --git a/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names.patch b/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names.patch
deleted file mode 100644
index c4976a2b22..0000000000
--- a/var/spack/repos/builtin/packages/aomp/0001-Add-amdgcn-to-devicelibs-bitcode-names.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2414b9faee9c264ce4b92b4d709375313df03344 Mon Sep 17 00:00:00 2001
-From: Ethan Stewart <ethan.stewart@amd.com>
-Date: Tue, 22 Sep 2020 13:39:22 -0500
-Subject: [PATCH] Add amdgcn to devicelibs bitcode names
-
----
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-index cc9b4f1caba..d22609fbe62 100644
---- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-+++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
-@@ -148,21 +148,21 @@ const char *AMDGCN::OpenMPLinker::constructOmpExtraCmds(
- llvm::StringRef WaveFrontSizeBC;
- std::string GFXVersion = SubArchName.drop_front(3).str();
- if (stoi(GFXVersion) < 1000)
-- WaveFrontSizeBC = "oclc_wavefrontsize64_on.bc";
-+ WaveFrontSizeBC = "oclc_wavefrontsize64_on.amdgcn.bc";
- else
-- WaveFrontSizeBC = "oclc_wavefrontsize64_off.bc";
-+ WaveFrontSizeBC = "oclc_wavefrontsize64_off.amdgcn.bc";
-
- // FIXME: remove double link of hip aompextras, ockl, and WaveFrontSizeBC
- if (Args.hasArg(options::OPT_cuda_device_only))
- BCLibs.append(
- {Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
-- "hip.bc", "ockl.bc",
-+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
- std::string(WaveFrontSizeBC)});
- else {
- BCLibs.append(
- {Args.MakeArgString("libomptarget-amdgcn-" + SubArchName + ".bc"),
- Args.MakeArgString("libaompextras-amdgcn-" + SubArchName + ".bc"),
-- "hip.bc", "ockl.bc",
-+ "hip.amdgcn.bc", "ockl.amdgcn.bc",
- Args.MakeArgString("libbc-hostrpc-amdgcn.a"),
- std::string(WaveFrontSizeBC)});
-
---
-2.17.1
diff --git a/var/spack/repos/builtin/packages/aomp/0001-Add-cmake-option-for-copying-source-for-debugging.patch b/var/spack/repos/builtin/packages/aomp/0001-Add-cmake-option-for-copying-source-for-debugging.patch
deleted file mode 100644
index b586e04b56..0000000000
--- a/var/spack/repos/builtin/packages/aomp/0001-Add-cmake-option-for-copying-source-for-debugging.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 526efe86427a4d49da38773534d84025dd4246c3 Mon Sep 17 00:00:00 2001
-From: Ethan Stewart <ethan.stewart@amd.com>
-Date: Tue, 10 Nov 2020 15:32:59 -0600
-Subject: [PATCH] Add cmake option for copying source for debugging.
-
----
- openmp/CMakeLists.txt | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
-index a86e83c50212..51962b561a3b 100644
---- a/openmp/CMakeLists.txt
-+++ b/openmp/CMakeLists.txt
-@@ -103,3 +103,11 @@ endif()
-
- # Now that we have seen all testsuites, create the check-openmp target.
- construct_check_openmp_target()
-+
-+option(DEBUG_COPY_SOURCE "Enable source code copy for openmp debug build."
-+ ${ENABLE_SOURCE_COPY})
-+if (${ENABLE_SOURCE_COPY})
-+ install(DIRECTORY runtime/src DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/runtime)
-+ install(DIRECTORY libomptarget/src libomptarget/plugins DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/libomptarget)
-+ install(DIRECTORY libompd/src DESTINATION ${OPENMP_INSTALL_LIBDIR}/src/openmp/libompd)
-+endif()
---
-2.17.1
-
diff --git a/var/spack/repos/builtin/packages/aomp/package.py b/var/spack/repos/builtin/packages/aomp/package.py
deleted file mode 100644
index e32dc705e3..0000000000
--- a/var/spack/repos/builtin/packages/aomp/package.py
+++ /dev/null
@@ -1,528 +0,0 @@
-# Copyright 2013-2024 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 re
-
-from spack.package import *
-
-tools_url = "https://github.com/ROCm-Developer-Tools"
-compute_url = "https://github.com/RadeonOpenCompute"
-
-
-aomp = [
- "e4526489833896bbc47ba865e0d115fab278ce269789a8c99a97f444595f5f6a",
- "970374c3acb9dda8b9a17d7a579dbaab48fac731db8fdce566a65abee37e5ed3",
- "86f90d6505eccdb2840069cadf57f7111d4685653c4974cf65fb22b172e55478",
- "14fc6867af0b17e3bff8cb42cb36f509c95a29b7a933a106bf6778de21f6c123",
- "ce29cead5391a4a13f2c567e2e059de9291888d24985460725e43a91b740be7a",
-]
-
-devlib = [
- "dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378",
- "b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d",
- "e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574",
- "c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
- "bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
-]
-
-llvm = [
- "b4fd7305dc57887eec17cce77bbf42215db46a4a3d14d8e517ab92f4e200b29d",
- "89b967de5e79f6df7c62fdc12529671fa30989ae7b634d5a7c7996629ec1140e",
- "98deabedb6cb3067ee960a643099631902507f236e4d9dc65b3e0f8d659eb55c",
- "f0a0b9fec0626878340a15742e73a56f155090011716461edcb069dcf05e6b30",
- "3ff18a8bd31d5b55232327e574dfa3556cf26787e105d0ba99411c5687325a8d",
-]
-
-flang = [
- "cc27f8bfb49257b7a4f0b03f4ba5e06a28dcb6c337065c4201b6075dd2d5bc48",
- "1fe07a0da20eb66a2a2aa8d354bf95c6f216ec38cc4a051e98041e0d13c34b36",
- "54cc6a9706dba6d7808258632ed40fa6493838edb309709d3b25e0f9b02507f8",
- "43d57bcc87fab092ac242e36da62588a87b6fa91f9e81fdb330159497afdecb3",
- "81674bf3c9d8fd9b16fb3e5c66a870537c25ff8302fc1b162ab9e95944167163",
-]
-
-extras = [
- "5dbf27f58b8114318208b97ba99a90483b78eebbcad4117cac6881441977e855",
- "adaf7670b2497ff3ac09636e0dd30f666a5a5b742ecdcb8551d722102dcfbd85",
- "4460a4f4b03022947f536221483e85dcd9b07064a54516ec103a1939c3f587b5",
- "014fca1fba54997c6db0e84822df274fb6807698b6856da4f737f38f10ab0e5d",
- "ee146cff4b9ee7aae90d7bb1d6b4957839232be0e7dab1865e0ae39832f8f795",
-]
-
-# Used only for 3.5.0
-hip = ["86eb7749ff6f6c5f6851cd6c528504d42f9286967324a50dd0dd54a6a74cacc7"]
-
-vdi = ["b21866c7c23dc536356db139b88b6beb3c97f58658836974a7fc167feb31ad7f"]
-
-opencl = ["8963fcd5a167583b3db8b94363778d4df4593bfce8141e1d3c32a59fb64a0cf6"]
-
-versions = ["3.5.0", "3.7.0", "3.8.0", "3.9.0", "3.10.0"]
-versions_dict = dict() # type: Dict[str, Dict[str, str]]
-hashes = [aomp, devlib, llvm, flang, extras]
-hashes_35 = [aomp, devlib, llvm, flang, extras, hip, vdi, opencl]
-components = ["aomp", "devlib", "llvm", "flang", "extras"]
-components_35 = ["aomp", "devlib", "llvm", "flang", "extras", "hip", "vdi", "opencl"]
-
-for outer_index, item in enumerate(versions):
- if item == "3.5.0":
- use_components = components_35
- use_hashes = hashes_35
- else:
- use_components = components
- use_hashes = hashes
- for inner_index, component in enumerate(use_hashes):
- versions_dict.setdefault(item, {})[use_components[inner_index]] = use_hashes[inner_index][
- outer_index
- ]
-
-
-class Aomp(Package):
- """llvm openmp compiler from AMD."""
-
- homepage = tools_url + "/aomp"
- url = tools_url + "/aomp/archive/rocm-3.10.0.tar.gz"
-
- maintainers("srekolam", "arjun-raj-kuppala", "estewart08")
-
- tags = ["e4s"]
-
- version("3.10.0", sha256=versions_dict["3.10.0"]["aomp"])
- version("3.9.0", sha256=versions_dict["3.9.0"]["aomp"])
-
- # Cmake above 3.18 would fail the build on 3.5.0
- depends_on("cmake@3:", type="build")
- depends_on("cmake@3:3.17", when="@3.5.0", type="build")
-
- depends_on("python@3:", type="build", when="@3.9.0:")
- depends_on("py-setuptools", when="@3.9.0:", type="build")
-
- depends_on("gl@4.5:", type=("build", "link"))
- depends_on("py-pip", when="@3.8.0:", type="build")
- depends_on("py-wheel", when="@3.8.0:", type=("build", "run"))
- depends_on("perl-data-dumper", type="build")
- depends_on("awk", type="build")
- depends_on("elfutils", type=("build", "link"))
- depends_on("libffi", type=("build", "link"))
-
- for ver in ["3.5.0", "3.7.0", "3.8.0", "3.9.0", "3.10.0"]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, type="build", when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("rocm-device-libs@" + ver, when="@" + ver)
-
- if ver != "3.5.0":
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("hip-rocclr@" + ver, when="@" + ver)
-
- if ver == "3.9.0" or ver == "3.10.0":
- depends_on("rocm-gdb@" + ver, when="@" + ver)
-
- resource(
- name="rocm-device-libs",
- url=compute_url + "/ROCm-Device-Libs/archive/rocm-" + ver + ".tar.gz",
- sha256=versions_dict[ver]["devlib"],
- expand=True,
- destination="aomp-dir",
- placement="rocm-device-libs",
- when="@" + ver,
- )
-
- resource(
- name="amd-llvm-project",
- url=tools_url + "/amd-llvm-project/archive/rocm-" + ver + ".tar.gz",
- sha256=versions_dict[ver]["llvm"],
- expand=True,
- destination="aomp-dir",
- placement="amd-llvm-project",
- when="@" + ver,
- )
-
- resource(
- name="flang",
- url=tools_url + "/flang/archive/rocm-" + ver + ".tar.gz",
- sha256=versions_dict[ver]["flang"],
- expand=True,
- destination="aomp-dir",
- placement="flang",
- when="@" + ver,
- )
-
- resource(
- name="aomp-extras",
- url=tools_url + "/aomp-extras/archive/rocm-" + ver + ".tar.gz",
- sha256=versions_dict[ver]["extras"],
- expand=True,
- destination="aomp-dir",
- placement="aomp-extras",
- when="@" + ver,
- )
-
- if ver == "3.5.0":
- resource(
- name="hip-on-vdi",
- url=tools_url + "/hip/archive/aomp-3.5.0.tar.gz",
- sha256=versions_dict["3.5.0"]["hip"],
- expand=True,
- destination="aomp-dir",
- placement="hip-on-vdi",
- when="@3.5.0",
- )
-
- resource(
- name="vdi",
- url=tools_url + "/rocclr/archive/aomp-3.5.0.tar.gz",
- sha256=versions_dict["3.5.0"]["vdi"],
- expand=True,
- destination="aomp-dir",
- placement="vdi",
- when="@3.5.0",
- )
-
- resource(
- name="opencl-on-vdi",
- sha256=versions_dict["3.5.0"]["opencl"],
- url=compute_url + "/ROCm-OpenCL-Runtime/archive/aomp-3.5.0.tar.gz",
- expand=True,
- destination="aomp-dir",
- placement="opencl-on-vdi",
- when="@3.5.0",
- )
-
- # Copy source files over for debug build in 3.9.0
- patch(
- "0001-Add-cmake-option-for-copying-source-for-debugging.patch",
- working_dir="aomp-dir/amd-llvm-project",
- when="@3.9.0:",
- )
-
- # Revert back to .amdgcn.bc naming scheme for 3.8.0
- patch(
- "0001-Add-amdgcn-to-devicelibs-bitcode-names-3.8.patch",
- working_dir="aomp-dir/amd-llvm-project",
- when="@3.8.0",
- )
-
- # Revert back to .amdgcn.bc naming scheme for 3.7.0
- patch(
- "0001-Add-amdgcn-to-devicelibs-bitcode-names.patch",
- working_dir="aomp-dir/amd-llvm-project",
- when="@3.7.0",
- )
-
- def patch(self):
- # Make sure python2.7 is used for the generation of hip header
- if self.spec.version == Version("3.5.0"):
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
- with working_dir("aomp-dir/hip-on-vdi"):
- match = "^#!/usr/bin/python"
- python = self.spec["python"].command.path
- substitute = "#!{python}".format(python=python)
- files = ["hip_prof_gen.py", "vdi/hip_prof_gen.py"]
- filter_file(match, substitute, *files, **kwargs)
- src = self.stage.source_path
- libomptarget = "{0}/aomp-dir/amd-llvm-project/openmp/libomptarget"
- aomp_extras = "{0}/aomp-dir/aomp-extras/aomp-device-libs"
- flang = "{0}/aomp-dir/flang/"
-
- if self.spec.version >= Version("3.9.0"):
- filter_file(
- "ADDITIONAL_VERSIONS 2.7",
- "ADDITIONAL_VERSIONS 3",
- flang.format(src) + "CMakeLists.txt",
- )
-
- if self.spec.version >= Version("3.8.0"):
- filter_file(
- "{CMAKE_INSTALL_PREFIX}",
- "{HSA_INCLUDE}",
- libomptarget.format(src) + "/hostrpc/services/CMakeLists.txt",
- )
-
- filter_file(
- "CONFIG",
- "CONFIG PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH",
- libomptarget.format(src) + "/../libompd/test/CMakeLists.txt",
- )
-
- if self.spec.version != Version("3.5.0"):
- filter_file(
- "{ROCM_DIR}/aomp/amdgcn/bitcode",
- "{DEVICE_LIBS_DIR}",
- libomptarget.format(src) + "/hostrpc/CMakeLists.txt",
- libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
- )
-
- if self.spec.version == Version("3.5.0"):
- filter_file(
- "{ROCM_DIR}/lib/bitcode",
- "{DEVICE_LIBS_DIR}",
- libomptarget.format(src) + "/deviceRTLs/hostcall/CMakeLists.txt",
- )
-
- filter_file(
- "{ROCM_DIR}/lib/bitcode",
- "{DEVICE_LIBS_DIR}",
- aomp_extras.format(src) + "/aompextras/CMakeLists.txt",
- aomp_extras.format(src) + "/libm/CMakeLists.txt",
- libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
- string=True,
- )
-
- filter_file(
- r"${ROCM_DIR}/hsa/include ${ROCM_DIR}/hsa/include/hsa",
- "${HSA_INCLUDE}/hsa/include ${HSA_INCLUDE}/hsa/include/hsa",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- string=True,
- )
-
- filter_file(
- "{ROCM_DIR}/hsa/lib",
- "{HSA_LIB}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- )
-
- filter_file(
- r"{ROCM_DIR}/lib\)",
- "{HSAKMT_LIB})\nset(HSAKMT_LIB64 ${HSAKMT_LIB64})",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- )
-
- filter_file(
- r"-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
- "-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS} -L${HSAKMT_LIB64}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- string=True,
- )
-
- filter_file(
- r"-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
- "-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}" + ",-rpath,${HSAKMT_LIB64}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- string=True,
- )
-
- filter_file(
- "{ROCM_DIR}/include",
- "{COMGR_INCLUDE}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- )
-
- filter_file(
- "{ROCM_DIR}/include",
- "{COMGR_INCLUDE}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- )
-
- filter_file(
- r"-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
- "-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX} -L${COMGR_LIB}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- string=True,
- )
-
- filter_file(
- r"rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
- "rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}" + "-Wl,-rpath,${COMGR_LIB}",
- libomptarget.format(src) + "/plugins/hsa/CMakeLists.txt",
- string=True,
- )
-
- def setup_run_environment(self, env):
- devlibs_prefix = self.spec["rocm-device-libs"].prefix
- aomp_prefix = self.spec["aomp"].prefix
- env.set("HIP_DEVICE_LIB_PATH", "{0}/amdgcn/bitcode".format(format(devlibs_prefix)))
- env.set("AOMP", "{0}".format(format(aomp_prefix)))
-
- def setup_build_environment(self, env):
- aomp_prefix = self.spec["aomp"].prefix
- env.set("AOMP", "{0}".format(format(aomp_prefix)))
- env.set("FC", "{0}/bin/flang".format(format(aomp_prefix)))
- env.set("GFXLIST", "gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908")
-
- def install(self, spec, prefix):
- src = self.stage.source_path
- gfx_list = "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906;gfx908"
- aomp_prefix = self.spec["aomp"].prefix
- devlibs_prefix = self.spec["rocm-device-libs"].prefix
- hsa_prefix = self.spec["hsa-rocr-dev"].prefix
- hsakmt_prefix = self.spec["hsakmt-roct"].prefix
- comgr_prefix = self.spec["comgr"].prefix
- opencl_src = "/aomp-dir/opencl-on-vdi/api/opencl"
- omp_src = "/aomp-dir/amd-llvm-project/openmp"
- debug_map_format = "-fdebug-prefix-map={0}{1}={2}".format(src, omp_src, aomp_prefix)
-
- if self.spec.version >= Version("3.9.0"):
- bitcode_dir = "/amdgcn/bitcode"
- else:
- bitcode_dir = "/lib"
-
- components = dict()
- components["amd-llvm-project"] = [
- "../aomp-dir/amd-llvm-project/llvm",
- "-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt",
- "-DCMAKE_BUILD_TYPE=release",
- "-DLLVM_ENABLE_ASSERTIONS=ON",
- "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86",
- "-DCMAKE_C_COMPILER={0}".format(self.compiler.cc),
- "-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx),
- "-DCMAKE_ASM_COMPILER={0}".format(self.compiler.cc),
- "-DBUG_REPORT_URL=https://github.com/ROCm-Developer-Tools/aomp",
- "-DLLVM_ENABLE_BINDINGS=OFF",
- "-DLLVM_INCLUDE_BENCHMARKS=OFF",
- "-DLLVM_BUILD_TESTS=OFF",
- "-DLLVM_INCLUDE_TESTS=OFF",
- "-DCLANG_INCLUDE_TESTS=OFF",
- "-DCMAKE_VERBOSE_MAKEFILE=1",
- "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE",
- ]
-
- if self.spec.version == Version("3.5.0"):
- components["vdi"] = [
- "../aomp-dir/vdi",
- "-DUSE_COMGR_LIBRARY=yes",
- "-DOPENCL_DIR={0}{1}".format(src, opencl_src),
- ]
-
- components["hip-on-vdi"] = [
- "../aomp-dir/hip-on-vdi",
- "-DVDI_ROOT={0}/aomp-dir/vdi".format(src),
- "-DHIP_COMPILER=clang",
- "-DHIP_PLATFORM=vdi",
- "-DVDI_DIR={0}/aomp-dir/vdi".format(src),
- "-DHSA_PATH={0}".format(hsa_prefix),
- "-DLIBVDI_STATIC_DIR={0}/spack-build-vdi".format(src),
- "-DCMAKE_CXX_FLAGS=-Wno-ignored-attributes",
- ]
-
- components["aomp-extras"] = [
- "../aomp-dir/aomp-extras",
- "-DROCM_PATH=$ROCM_DIR ",
- "-DDEVICE_LIBS_DIR={0}{1}".format(devlibs_prefix, bitcode_dir),
- "-DAOMP_STANDALONE_BUILD=0",
- "-DDEVICELIBS_ROOT={0}/aomp-dir/rocm-device-libs".format(src),
- "-DCMAKE_VERBOSE_MAKEFILE=1",
- ]
-
- openmp_common_args = [
- "-DROCM_DIR={0}".format(hsa_prefix),
- "-DDEVICE_LIBS_DIR={0}{1}".format(devlibs_prefix, bitcode_dir),
- "-DAOMP_STANDALONE_BUILD=0",
- "-DDEVICELIBS_ROOT={0}/aomp-dir/rocm-device-libs".format(src),
- "-DOPENMP_TEST_C_COMPILER={0}/bin/clang".format(aomp_prefix),
- "-DOPENMP_TEST_CXX_COMPILER={0}/bin/clang++".format(aomp_prefix),
- "-DLIBOMPTARGET_AMDGCN_GFXLIST={0}".format(gfx_list),
- "-DLIBOMP_COPY_EXPORTS=OFF",
- "-DHSA_INCLUDE={0}".format(hsa_prefix),
- "-DHSA_LIB={0}/lib".format(hsa_prefix),
- "-DHSAKMT_LIB={0}/lib".format(hsakmt_prefix),
- "-DHSAKMT_LIB64={0}/lib64".format(hsakmt_prefix),
- "-DCOMGR_INCLUDE={0}/include".format(comgr_prefix),
- "-DCOMGR_LIB={0}/lib".format(comgr_prefix),
- "-DOPENMP_ENABLE_LIBOMPTARGET=1",
- "-DOPENMP_ENABLE_LIBOMPTARGET_HSA=1",
- ]
-
- components["openmp"] = ["../aomp-dir/amd-llvm-project/openmp"]
- components["openmp"] += openmp_common_args
-
- components["openmp-debug"] = [
- "../aomp-dir/amd-llvm-project/openmp",
- "-DLIBOMPTARGET_NVPTX_DEBUG=ON",
- "-DOPENMP_ENABLE_LIBOMPTARGET=1",
- "-DOPENMP_ENABLE_LIBOMPTARGET_HSA=1" "-DCMAKE_CXX_FLAGS=-g",
- "-DCMAKE_C_FLAGS=-g",
- ]
-
- if self.spec.version >= Version("3.9.0"):
- components["openmp-debug"] += [
- "-DENABLE_SOURCE_COPY=ON",
- "-DOPENMP_SOURCE_DEBUG_MAP={0}".format(debug_map_format),
- ]
-
- if self.spec.version >= Version("3.8.0"):
- components["openmp-debug"] += [
- "-DLIBOMP_ARCH=x86_64",
- "-DLIBOMP_OMP_VERSION=50",
- "-DLIBOMP_OMPT_SUPPORT=ON",
- "-DLIBOMP_USE_DEBUGGER=ON",
- "-DLIBOMP_CFLAGS=-O0",
- "-DLIBOMP_CPPFLAGS=-O0",
- "-DLIBOMP_OMPD_ENABLED=ON",
- "-DLIBOMP_OMPD_SUPPORT=ON",
- "-DLIBOMP_OMPT_DEBUG=ON",
- ]
-
- components["openmp-debug"] += openmp_common_args
-
- flang_common_args = [
- "-DLLVM_ENABLE_ASSERTIONS=ON",
- "-DLLVM_CONFIG={0}/bin/llvm-config".format(aomp_prefix),
- "-DCMAKE_CXX_COMPILER={0}/bin/clang++".format(aomp_prefix),
- "-DCMAKE_C_COMPILER={0}/bin/clang".format(aomp_prefix),
- "-DCMAKE_Fortran_COMPILER={0}/bin/flang".format(aomp_prefix),
- "-DLLVM_TARGETS_TO_BUILD=AMDGPU;x86",
- ]
-
- components["pgmath"] = ["../aomp-dir/flang/runtime/libpgmath"]
- components["pgmath"] += flang_common_args
-
- components["flang"] = [
- "../aomp-dir/flang",
- "-DFLANG_OPENMP_GPU_AMD=ON",
- "-DFLANG_OPENMP_GPU_NVIDIA=ON",
- ]
-
- components["flang"] += flang_common_args
-
- components["flang-runtime"] = [
- "../aomp-dir/flang",
- "-DLLVM_INSTALL_RUNTIME=ON",
- "-DFLANG_BUILD_RUNTIME=ON",
- "-DOPENMP_BUILD_DIR={0}/spack-build-openmp/runtime/src".format(src),
- ]
-
- components["flang-runtime"] += flang_common_args
-
- if self.spec.version != Version("3.5.0"):
- build_order = [
- "amd-llvm-project",
- "aomp-extras",
- "openmp",
- "openmp-debug",
- "pgmath",
- "flang",
- "flang-runtime",
- ]
- elif self.spec.version == Version("3.5.0"):
- build_order = [
- "amd-llvm-project",
- "vdi",
- "hip-on-vdi",
- "aomp-extras",
- "openmp",
- "openmp-debug",
- "pgmath",
- "flang",
- "flang-runtime",
- ]
-
- # Override standard CMAKE_BUILD_TYPE
- for arg in std_cmake_args:
- found = re.search("CMAKE_BUILD_TYPE", arg)
- if found:
- std_cmake_args.remove(arg)
-
- for component in build_order:
- with working_dir("spack-build-{0}".format(component), create=True):
- cmake_args = components[component]
- cmake_args.extend(std_cmake_args)
- # OpenMP build needs to be run twice(Release, Debug)
- if component == "openmp-debug":
- cmake_args.append("-DCMAKE_BUILD_TYPE=Debug")
- else:
- cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
- cmake(*cmake_args)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/apache-tvm/package.py b/var/spack/repos/builtin/packages/apache-tvm/package.py
new file mode 100644
index 0000000000..2d3301f63a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/apache-tvm/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ApacheTvm(CMakePackage, CudaPackage):
+ """Apache TVM is an open source machine learning compiler framework for
+ CPUs, GPUs, and machine learning accelerators. It aims to enable machine
+ learning engineers to optimize and run computations efficiently on any
+ hardware backend."""
+
+ homepage = "https://tvm.apache.org/"
+ url = "https://dlcdn.apache.org/tvm/tvm-v0.16.0/apache-tvm-src-v0.16.0.tar.gz"
+
+ license("Apache-2.0", checked_by="alex391")
+
+ version("0.16.0", sha256="55e2629c39248ef3b1ee280e34a960182bd17bea7ae0d0fa132bbdaaf5aba1ac")
+
+ variant("llvm", default=True, description="Build with llvm for CPU codegen")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.18:", type="build")
+ depends_on("python@3.7:3.8", type=("build", "run"))
+ depends_on("zlib-api", type=("link", "run"))
+ depends_on("ncurses", type=("link", "run"))
+ depends_on("llvm@4:18.1.8", type="build", when="+llvm")
+ depends_on("cuda@8:", when="+cuda")
+
+ def cmake_args(self):
+ return [
+ self.define_from_variant("USE_CUDA", "cuda"),
+ self.define_from_variant("USE_LLVM", "llvm"),
+ ]
diff --git a/var/spack/repos/builtin/packages/apachetop/package.py b/var/spack/repos/builtin/packages/apachetop/package.py
index 060c5e1f87..b1e72cee7a 100644
--- a/var/spack/repos/builtin/packages/apachetop/package.py
+++ b/var/spack/repos/builtin/packages/apachetop/package.py
@@ -21,6 +21,8 @@ class Apachetop(AutotoolsPackage):
version("0.17.4", sha256="892ed3b83b45eb38811e74d068089b1e8c34707787f240ce133d8c93198d7ff0")
version("0.15.6", sha256="7343caeb1adab795439b7be9cf47ce6049751ae948537d5f27251c075264801a")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/apcomp/package.py b/var/spack/repos/builtin/packages/apcomp/package.py
index b98f324b77..87e1a8c16f 100644
--- a/var/spack/repos/builtin/packages/apcomp/package.py
+++ b/var/spack/repos/builtin/packages/apcomp/package.py
@@ -9,6 +9,7 @@ import socket
import llnl.util.tty as tty
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -36,11 +37,15 @@ class Apcomp(Package):
maintainers("cyrush")
- version("master", branch="master", submodules="True")
- version("0.0.4", sha256="061876dd55e443de91a40d10662496f6bb58b0a3835aec78f5710f5a737d0494")
- version("0.0.3", sha256="07e8c1d6a23205f4cc66d0a030e65a69e8344545f4d56213d968b67a410adc6e")
- version("0.0.2", sha256="cb2e2c4524889408de2dd3d29665512c99763db13e6f5e35c3b55e52948c649c")
- version("0.0.1", sha256="cbf85fe58d5d5bc2f468d081386cc8b79861046b3bb7e966edfa3f8e95b998b2")
+ with default_args(deprecated=True): # part of ascent
+ version("master", branch="master", submodules="True")
+ version("0.0.4", sha256="061876dd55e443de91a40d10662496f6bb58b0a3835aec78f5710f5a737d0494")
+ version("0.0.3", sha256="07e8c1d6a23205f4cc66d0a030e65a69e8344545f4d56213d968b67a410adc6e")
+ version("0.0.2", sha256="cb2e2c4524889408de2dd3d29665512c99763db13e6f5e35c3b55e52948c649c")
+ version("0.0.1", sha256="cbf85fe58d5d5bc2f468d081386cc8b79861046b3bb7e966edfa3f8e95b998b2")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("openmp", default=True, description="Build with openmp support")
variant("mpi", default=True, description="Build with MPI support")
@@ -60,19 +65,8 @@ class Apcomp(Package):
"""
with working_dir("spack-build", create=True):
host_cfg_fname = self.create_host_config(spec, prefix)
- cmake_args = []
- # if we have a static build, we need to avoid any of
- # spack's default cmake settings related to rpaths
- # (see: https://github.com/LLNL/spack/issues/2658)
- if "+shared" in spec:
- cmake_args.extend(std_cmake_args)
- else:
- for arg in std_cmake_args:
- if arg.count("RPATH") == 0:
- cmake_args.append(arg)
- cmake_args.extend(["-C", host_cfg_fname, "../src"])
print("Configuring APComp...")
- cmake(*cmake_args)
+ cmake(*CMakeBuilder.std_args(self), "-C", host_cfg_fname, "../src")
print("Building APComp...")
make()
print("Installing APComp...")
@@ -106,7 +100,7 @@ class Apcomp(Package):
# Find and record what CMake is used
##############################################
- if "+cmake" in spec:
+ if spec.satisfies("+cmake"):
cmake_exe = spec["cmake"].command.path
else:
cmake_exe = which("cmake")
@@ -140,17 +134,17 @@ class Apcomp(Package):
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
# shared vs static libs
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF"))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
# if we are using compiler wrappers on cray systems
@@ -163,7 +157,7 @@ class Apcomp(Package):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
- if "+blt_find_mpi" in spec:
+ if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))
diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py
index 0164ef29f1..44f98545aa 100644
--- a/var/spack/repos/builtin/packages/ape/package.py
+++ b/var/spack/repos/builtin/packages/ape/package.py
@@ -11,9 +11,9 @@ class Ape(Package):
Theory framework"""
homepage = "https://www.tddft.org/programs/APE/"
- url = "http://www.tddft.org/programs/APE/sites/default/files/ape-2.2.1.tar.gz"
+ url = "https://gitlab.com/ape/ape/-/archive/2.2.1/ape-2.2.1.tar.gz"
- version("2.2.1", sha256="1bdb7f987fde81f8a5f335da6b59fa884e6d185d4a0995c90fde7c04376ce9e3")
+ version("2.2.1", sha256="3f5125182e308ab49338cad791e175ce158526a56c6ca88ac6582c1e5d7435d4")
depends_on("gsl")
depends_on("libxc@:4", when="@2.3.0:")
diff --git a/var/spack/repos/builtin/packages/aperture-photometry/package.py b/var/spack/repos/builtin/packages/aperture-photometry/package.py
index cb32ba52a7..0a53de6437 100644
--- a/var/spack/repos/builtin/packages/aperture-photometry/package.py
+++ b/var/spack/repos/builtin/packages/aperture-photometry/package.py
@@ -11,7 +11,7 @@ from spack.package import *
class AperturePhotometry(Package):
"""Aperture Photometry Tool APT is software for astronomical research"""
- homepage = "http://www.aperturephotometry.org/"
+ homepage = "https://www.aperturephotometry.org/"
url = "https://web.ipac.caltech.edu/staff/laher/apt/APT_v2.8.4.tar.gz"
maintainers("snehring")
diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py
index 8012c3e56b..0fec0eead5 100644
--- a/var/spack/repos/builtin/packages/apex/package.py
+++ b/var/spack/repos/builtin/packages/apex/package.py
@@ -13,11 +13,14 @@ class Apex(CMakePackage):
maintainers("khuck")
homepage = "https://uo-oaciss.github.io/apex"
- url = "https://github.com/UO-OACISS/apex/archive/v2.6.2.tar.gz"
+ url = "https://github.com/UO-OACISS/apex/archive/v2.6.4.tar.gz"
git = "https://github.com/UO-OACISS/apex"
version("develop", branch="develop")
version("master", branch="master")
+ version("2.7.0", sha256="81cd7e8dbea35cec2360d6404e20f7527f66410614f06a73c8c782ac2cfdb0b0")
+ version("2.6.5", sha256="2ba29a1198c904ac209fc6bc02962304a1416443b249f34ef96889aff39644ce")
+ version("2.6.4", sha256="281a673f447762a488577beaa60e48d88cb6354f220457cf8f05c1de2e1fce70")
version("2.6.3", sha256="7fef12937d3bd1271a01abe44cb931b1d63823fb5c74287a332f3012ed7297d5")
version("2.6.2", sha256="0c3ec26631db7925f50cf4e8920a778b57d11913f239a0eb964081f925129725")
version("2.6.1", sha256="511dbab0af541489052a3d6379c48f9577e51654491d3b2c8545020e9d29fb29")
@@ -63,13 +66,17 @@ class Apex(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Disable some default dependencies on Darwin/OSX
darwin_default = False
if sys.platform != "darwin":
darwin_default = True
# Enable by default
- variant("activeharmony", default=True, description="Enables Active Harmony support")
+ variant("activeharmony", default=False, description="Enables Active Harmony support")
variant("plugins", default=True, description="Enables Policy Plugin support")
variant("binutils", default=darwin_default, description="Enables Binutils support")
variant("otf2", default=True, description="Enables OTF2 support")
@@ -80,21 +87,23 @@ class Apex(CMakePackage):
)
variant("openmp", default=darwin_default, description="Enables OpenMP support")
variant("papi", default=darwin_default, description="Enables PAPI support")
+ variant("kokkos", default=True, description="Enables Kokkos support")
# Disable by default
variant("cuda", default=False, description="Enables CUDA support")
variant("hip", default=False, description="Enables ROCm/HIP support")
variant("sycl", default=False, description="Enables Intel SYCL support (Level0)")
- variant("boost", default=False, description="Enables Boost support")
variant("jemalloc", default=False, description="Enables JEMalloc support")
variant("lmsensors", default=False, description="Enables LM-Sensors support")
variant("mpi", default=False, description="Enables MPI support")
+ variant("starpu", default=False, description="Enables StarPU support")
variant("tests", default=False, description="Build Unit Tests")
variant("examples", default=False, description="Build Examples")
# Dependencies
depends_on("zlib-api")
depends_on("cmake@3.10.0:", type="build")
+ depends_on("kokkos", type="build", when="+kokkos")
depends_on("binutils@2.33:+libiberty+headers", when="+binutils")
depends_on("gettext", when="+binutils ^binutils+nls")
depends_on("activeharmony@4.6:", when="+activeharmony")
@@ -110,15 +119,22 @@ class Apex(CMakePackage):
depends_on("sycl", when="+sycl")
depends_on("roctracer-dev", when="+hip")
depends_on("rocm-smi-lib", when="+hip")
- depends_on("boost@1.54: +exception+chrono+system+atomic+container+regex+thread", when="+boost")
# Conflicts
conflicts("+jemalloc", when="+gperftools")
conflicts("+plugins", when="~activeharmony")
+ # Compatibility fixed in 2.6.0 with
+ # https://github.com/UO-OACISS/apex/commit/4a7bdbb93367c3b1172ccb978825c67316f8bf4a
+ conflicts("^otf2@3:", when="@:2.5")
# https://github.com/UO-OACISS/apex/pull/177#issuecomment-1726322959
conflicts("+openmp", when="%gcc")
+ # Up to 2.6.3 Kokkos support is always enabled. In 2.6.4 and 2.6.5 there is
+ # a CMake option to disable Kokkos support but it doesn't work:
+ # https://github.com/UO-OACISS/apex/issues/180.
+ conflicts("~kokkos", when="@:2.6.5")
+
# Patches
# This patch ensures that the missing dependency_tree.hpp header is
@@ -131,7 +147,7 @@ class Apex(CMakePackage):
# CMake variables were updated in version 2.3.0, to make
prefix = "APEX_WITH"
test_prefix = "APEX_"
- if "@2.2.0" in spec:
+ if spec.satisfies("@2.2.0"):
prefix = "USE"
test_prefix = ""
@@ -148,35 +164,33 @@ class Apex(CMakePackage):
args.append(self.define_from_variant(prefix + "_LM_SENSORS", "lmsensors"))
args.append(self.define_from_variant(prefix + "_TCMALLOC", "gperftools"))
args.append(self.define_from_variant(prefix + "_JEMALLOC", "jemalloc"))
+ args.append(self.define_from_variant(prefix + "_KOKKOS", "kokkos"))
args.append(self.define_from_variant(test_prefix + "BUILD_TESTS", "tests"))
args.append(self.define_from_variant(test_prefix + "BUILD_EXAMPLES", "examples"))
- if "+activeharmony" in spec:
+ if spec.satisfies("+activeharmony"):
args.append("-DACTIVEHARMONY_ROOT={0}".format(spec["activeharmony"].prefix))
- if "+binutils" in spec:
+ if spec.satisfies("+binutils"):
args.append("-DBFD_ROOT={0}".format(spec["binutils"].prefix))
- if "+binutils ^binutils+nls" in spec:
+ if spec.satisfies("+binutils ^binutils+nls"):
if "intl" in self.spec["gettext"].libs.names:
args.append("-DCMAKE_SHARED_LINKER_FLAGS=-lintl")
- if "+otf2" in spec:
+ if spec.satisfies("+otf2"):
args.append("-DOTF2_ROOT={0}".format(spec["otf2"].prefix))
- if "+papi" in spec:
+ if spec.satisfies("+papi"):
args.append("-DPAPI_ROOT={0}".format(spec["papi"].prefix))
- if "+gperftools" in spec:
+ if spec.satisfies("+gperftools"):
args.append("-DGPERFTOOLS_ROOT={0}".format(spec["gperftools"].prefix))
- if "+jemalloc" in spec:
+ if spec.satisfies("+jemalloc"):
args.append("-DJEMALLOC_ROOT={0}".format(spec["jemalloc"].prefix))
- if "+boost" in spec:
- args.append("-DBOOST_ROOT={0}".format(spec["boost"].prefix))
-
- if "+hip" in spec:
+ if spec.satisfies("+hip"):
args.append("-DROCM_ROOT={0}".format(spec["hip"].prefix))
args.append("-DROCTRACER_ROOT={0}".format(spec["roctracer-dev"].prefix))
args.append("-DROCTX_ROOT={0}".format(spec["roctracer-dev"].prefix))
diff --git a/var/spack/repos/builtin/packages/apfel/package.py b/var/spack/repos/builtin/packages/apfel/package.py
index e5a797024e..790f0c97b8 100644
--- a/var/spack/repos/builtin/packages/apfel/package.py
+++ b/var/spack/repos/builtin/packages/apfel/package.py
@@ -3,10 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import autotools, cmake
from spack.package import *
-class Apfel(AutotoolsPackage):
+class Apfel(AutotoolsPackage, CMakePackage):
"""APFEL is a library able to perform DGLAP evolution up to NNLO in QCD and
to NLO in QED, both with pole and MSbar masses. The coupled DGLAP
QCD+QED evolution equations are solved in x-space by means of higher
@@ -19,22 +20,44 @@ class Apfel(AutotoolsPackage):
license("GPL-3.0-or-later")
+ build_system(
+ conditional("autotools", when="@:3.0"), conditional("cmake", when="@3.1:"), default="cmake"
+ )
+
+ version("3.1.1", sha256="9006b2a9544e504e8f6b5047f665054151870c3c3a4a05db3d4fb46f21908d4b")
version("3.0.6", sha256="7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61")
version("3.0.4", sha256="c7bfae7fe2dc0185981850f2fe6ae4842749339d064c25bf525b4ef412bbb224")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
+ with when("build_system=cmake"):
+ depends_on("cmake@03.15:")
+
+ extends("python", when="+python")
depends_on("swig", when="+python")
- depends_on("python", type=("build", "run"))
+ depends_on("python", when="+python", type=("build", "run"))
depends_on("lhapdf", when="+lhapdf", type=("build", "run"))
variant("python", description="Build python wrapper", default=False)
variant("lhapdf", description="Link to LHAPDF", default=False)
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("APFEL_ENABLE_PYTHON", "python"),
+ self.define_from_variant("APFEL_ENABLE_LHAPDF", "lhapdf"),
+ ]
+ # ensure installation of python module under CMAKE_INSTALL_PREFIX
+ if self.spec.satisfies("+python"):
+ args.append(self.define("APFEL_Python_SITEARCH", "autoprefix"))
+ return args
+
+
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
args = []
- if self.spec.satisfies("~python"):
- args.append("--disable-pywrap")
- else:
- args.append("--enable-pywrap")
-
+ args += self.enable_or_disable("pywrap", variant="python")
args += self.enable_or_disable("lhapdf")
return args
diff --git a/var/spack/repos/builtin/packages/apple-clang/detection_test.yaml b/var/spack/repos/builtin/packages/apple-clang/detection_test.yaml
index dc5b7106ec..1e52329116 100644
--- a/var/spack/repos/builtin/packages/apple-clang/detection_test.yaml
+++ b/var/spack/repos/builtin/packages/apple-clang/detection_test.yaml
@@ -1,35 +1,48 @@
paths:
- # Apple Clang on MacBook Pro (Catalina)
- - layout:
- - executables:
- - "bin/clang"
- - "bin/clang++"
- script: |
- echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
- echo "Target: x86_64-apple-darwin19.5.0"
- echo "Thread model: posix"
- echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
- results:
- - spec: 'apple-clang@11.0.0'
- # Apple Clang on Apple M1 (Ventura)
- - layout:
- - executables:
- - "bin/clang"
- - "bin/clang++"
- script: |
- echo "Apple clang version 15.0.0 (clang-1500.0.40.1)"
- echo "Target: arm64-apple-darwin22.6.0"
- echo "Thread model: posix"
- echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
- results:
- - spec: 'apple-clang@15.0.0'
- # Test that missing a compiler prevents the package from being detected
- - layout:
- - executables:
- - "bin/clang"
- script: |
- echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
- echo "Target: x86_64-apple-darwin19.5.0"
- echo "Thread model: posix"
- echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
- results: [ ]
+# Apple Clang on MacBook Pro (Catalina)
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
+ echo "Target: x86_64-apple-darwin19.5.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ platforms: ["darwin"]
+ results:
+ - spec: 'apple-clang@11.0.0'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang"
+ cxx: ".*/bin/clang[+][+]"
+
+# Apple Clang on Apple M1 (Ventura)
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "Apple clang version 15.0.0 (clang-1500.0.40.1)"
+ echo "Target: arm64-apple-darwin22.6.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ platforms: ["darwin"]
+ results:
+ - spec: 'apple-clang@15.0.0'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang"
+ cxx: ".*/bin/clang[+][+]"
+
+# Test that missing a compiler prevents the package from being detected
+- layout:
+ - executables:
+ - "bin/clang"
+ script: |
+ echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
+ echo "Target: x86_64-apple-darwin19.5.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ platforms: ["darwin"]
+ results: []
diff --git a/var/spack/repos/builtin/packages/apple-clang/package.py b/var/spack/repos/builtin/packages/apple-clang/package.py
index 634aedf4eb..ba87604cd2 100644
--- a/var/spack/repos/builtin/packages/apple-clang/package.py
+++ b/var/spack/repos/builtin/packages/apple-clang/package.py
@@ -2,12 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import re
-
from spack.package import *
+from spack.pkg.builtin.llvm import LlvmDetection
-class AppleClang(BundlePackage):
+class AppleClang(BundlePackage, LlvmDetection, CompilerPackage):
"""Apple's Clang compiler"""
homepage = "https://developer.apple.com/videos/developer-tools/compiler-and-llvm"
@@ -15,44 +14,8 @@ class AppleClang(BundlePackage):
maintainers("alalazo")
- executables = ["^clang$", r"^clang\+\+$", "^ld.lld$", "^lldb$"]
-
- @classmethod
- def determine_version(cls, exe):
- version_regex = re.compile(
- # Apple's LLVM compiler has its own versions, which are
- # different from vanilla LLVM
- r"^Apple (?:LLVM|clang) version ([^ )]+)",
- # Multi-line, since 'Apple clang' may not be on the first line
- # in particular, when run as gcc, it seems to output
- # "Configured with: --prefix=..." as the first line
- re.M,
- )
- try:
- compiler = Executable(exe)
- output = compiler("--version", output=str, error=str)
- match = version_regex.search(output)
- if match:
- return match.group(match.lastindex)
- except Exception:
- pass
-
- return None
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- compilers = {}
- for exe in exes:
- if "clang++" in exe:
- compilers["cxx"] = exe
- elif "clang" in exe:
- compilers["c"] = exe
- elif "ld.lld" in exe:
- compilers["ld"] = exe
- elif "lldb" in exe:
- compilers["lldb"] = exe
-
- return "", {"compilers": compilers}
+ compiler_languages = ["c", "cxx"]
+ compiler_version_regex = r"^Apple (?:LLVM|clang) version ([^ )]+)"
@classmethod
def validate_detected_spec(cls, spec, extra_attributes):
diff --git a/var/spack/repos/builtin/packages/apple-gl/package.py b/var/spack/repos/builtin/packages/apple-gl/package.py
index f0140bc2d7..61e7076f5d 100644
--- a/var/spack/repos/builtin/packages/apple-gl/package.py
+++ b/var/spack/repos/builtin/packages/apple-gl/package.py
@@ -2,34 +2,14 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
from spack.package import *
-class AppleGl(Package):
- """Shim package for the core OpenGL library from Apple"""
-
+class AppleGlBase(BundlePackage):
homepage = "https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html"
maintainers("aphecetche")
- has_code = False
-
- version("4.1.0")
-
- provides("gl@4.1")
-
- # Only supported on 'platform=darwin' and compiler=apple-clang
- conflicts("platform=linux")
- conflicts("platform=cray")
- conflicts("platform=windows")
- conflicts("%gcc")
- conflicts("%clang")
- conflicts("%msvc")
-
- phases = []
-
def setup_dependent_build_environment(self, env, dependent_spec):
# we try to setup a build environment with enough hints
# for the build system to pick up on the Apple framework version
@@ -50,3 +30,16 @@ class AppleGl(Package):
@property
def libs(self):
return LibraryList(join_path(self.prefix, "System/Library/Frameworks/OpenGL.framework"))
+
+
+class AppleGl(AppleGlBase):
+ """Shim package for the core OpenGL library from Apple"""
+
+ version("4.1.0")
+
+ provides("gl@4.1")
+
+ requires(
+ "%apple-clang platform=darwin",
+ msg="Apple-GL is only available on Darwin, when using Apple Clang",
+ )
diff --git a/var/spack/repos/builtin/packages/apple-glu/package.py b/var/spack/repos/builtin/packages/apple-glu/package.py
index 2ccf686cf9..f94fba6664 100644
--- a/var/spack/repos/builtin/packages/apple-glu/package.py
+++ b/var/spack/repos/builtin/packages/apple-glu/package.py
@@ -2,49 +2,18 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
from spack.package import *
+from spack.pkg.builtin.apple_gl import AppleGlBase
-class AppleGlu(Package):
+class AppleGlu(AppleGlBase):
"""Shim package for Apple implementation of OpenGL Utility Libray (GLU)"""
- homepage = "https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html"
-
- maintainers("aphecetche")
-
- has_code = False
-
version("1.3.0")
provides("glu@1.3")
- # Only supported on 'platform=darwin' and compiler=apple-clang
- conflicts("platform=linux")
- conflicts("platform=cray")
- conflicts("%gcc")
- conflicts("%clang")
-
- phases = []
-
- def setup_dependent_build_environment(self, env, dependent_spec):
- # we try to setup a build environment with enough hints
- # for the build system to pick up on the Apple framework version
- # of OpenGL.
- # - for a cmake build we actually needs nothing at all as
- # find_package(OpenGL) will do the right thing
- # - for the rest of the build systems we'll assume that
- # setting the C_INCLUDE_PATH will be enough for the compilation phase
- # and *** for the link phase.
- env.prepend_path("C_INCLUDE_PATH", self.prefix[:-4])
-
- @property
- def headers(self):
- return HeaderList(
- join_path(self.prefix, "System/Library/Frameworks/OpenGL.framework/Headers")
- )
-
- @property
- def libs(self):
- return LibraryList(join_path(self.prefix, "System/Library/Frameworks/OpenGL.framework"))
+ requires(
+ "%apple-clang platform=darwin",
+ msg="Apple-GLU is only available on Darwin, when using Apple Clang",
+ )
diff --git a/var/spack/repos/builtin/packages/apple-libunwind/package.py b/var/spack/repos/builtin/packages/apple-libunwind/package.py
index d549ddab36..1c989ad984 100644
--- a/var/spack/repos/builtin/packages/apple-libunwind/package.py
+++ b/var/spack/repos/builtin/packages/apple-libunwind/package.py
@@ -19,7 +19,6 @@ class AppleLibunwind(Package):
# Darwin must be expressed by listing a conflict with every
# platform that isn't Darwin/macOS
conflicts("platform=linux")
- conflicts("platform=cray")
# Override the fetcher method to throw a useful error message;
# avoids GitHub issue (#7061) in which the opengl placeholder
diff --git a/var/spack/repos/builtin/packages/apple-libuuid/package.py b/var/spack/repos/builtin/packages/apple-libuuid/package.py
index 612f1c6f42..94e42bc0ee 100644
--- a/var/spack/repos/builtin/packages/apple-libuuid/package.py
+++ b/var/spack/repos/builtin/packages/apple-libuuid/package.py
@@ -17,7 +17,6 @@ class AppleLibuuid(BundlePackage):
# Only supported on 'platform=darwin'
conflicts("platform=linux")
- conflicts("platform=cray")
conflicts("platform=windows")
@property
diff --git a/var/spack/repos/builtin/packages/appres/package.py b/var/spack/repos/builtin/packages/appres/package.py
index 588af73fbb..45719d7662 100644
--- a/var/spack/repos/builtin/packages/appres/package.py
+++ b/var/spack/repos/builtin/packages/appres/package.py
@@ -12,15 +12,17 @@ class Appres(AutotoolsPackage, XorgPackage):
names. It can be used to determine which resources a particular
program will load."""
- homepage = "https://cgit.freedesktop.org/xorg/app/appres"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/appres"
xorg_mirror_path = "app/appres-1.0.4.tar.gz"
version("1.0.6", sha256="848f383ff429612fb9df840d79e97dc193dc72dbbf53d3217a8d1e90a5aa1e26")
version("1.0.4", sha256="22cb6f639c891ffdbb5371bc50a88278185789eae6907d05e9e0bd1086a80803")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxt")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/apptainer/package.py b/var/spack/repos/builtin/packages/apptainer/package.py
index 2fbe795b77..6502849d71 100644
--- a/var/spack/repos/builtin/packages/apptainer/package.py
+++ b/var/spack/repos/builtin/packages/apptainer/package.py
@@ -4,6 +4,9 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from glob import glob
+from os.path import basename
+
from spack.package import *
from spack.pkg.builtin.singularityce import SingularityBase
@@ -33,6 +36,12 @@ class Apptainer(SingularityBase):
)
version("main", branch="main")
+ version("1.3.4", sha256="c6ccfdd7c967e5c36dde8711f369c4ac669a16632b79fa0dcaf7e772b7a47397")
+ version("1.3.3", sha256="94a274ab4898cdb131f4e3867c4e15f7e16bc2823303d2afcbafee0242f0838d")
+ version("1.3.2", sha256="483910727e1a15843b93d9f2db1fc87e27804de9c74da13cc32cd4bd0d35e079")
+ # version "1.3.1" has security vulnerability CVE-2024-3727
+ # see also https://github.com/advisories/GHSA-6wvf-f2vw-3425
+ version("1.2.5", sha256="606b67ef97683e1420401718687d258b1034fdf2edae72eeacd0828dffbfc2c2")
version("1.1.9", sha256="c615777539154288542cf393d3fd44c04ccb3260bc6330dc324d4e4ebe902bfa")
version("1.1.7", sha256="e6d3956a26c3965703402e17f153ba07f59bf710068806462b314d2d04e825e7")
version("1.1.6", sha256="5f32d305279a51ce8bdbe69e733c4ac12b1efdcb77758fab8ec9463e96a8fd82")
@@ -41,8 +50,17 @@ class Apptainer(SingularityBase):
version("1.1.3", sha256="c7bf7f4d5955e1868739627928238d02f94ca9fd0caf110b0243d65548427899")
version("1.0.2", sha256="2d7a9d0a76d5574459d249c3415e21423980d9154ce85e8c34b0600782a7dfd3")
+ depends_on("c", type="build") # generated
+
+ depends_on("e2fsprogs@1.47:+fuse2fs", type="run")
depends_on("go@1.17.5:", when="@1.1.0:")
+ depends_on("go@1.19:", when="@1.2:")
+ depends_on("go@1.20:", when="@1.3:")
+ depends_on("gocryptfs@2.4:", type="run", when="@1.3:")
depends_on("squashfuse", type="run")
+ depends_on("squashfuse@0.5.1:", type="run", when="@1.3:")
+ depends_on("fuse-overlayfs", type="run")
+ depends_on("fuse-overlayfs@1.13:", type="run", when="@1.3:")
singularity_org = "apptainer"
singularity_name = "apptainer"
@@ -64,3 +82,19 @@ class Apptainer(SingularityBase):
# Certain go modules this build pulls in cannot be built with anything
# other than -O0. Best to just discard any injected flags.
return (None, flags, None)
+
+ # They started vendoring the fuse bits and assume they'll be in the
+ # libexec/apptainer prefix as a result. When singularity is run with
+ # suid it doesn't search the user's $PATH for security reasons.
+ # Since we don't use the vendored deps and instead install them in
+ # their own prefixes they are not found by default.
+ # This is likely only relevant for 1.3:, but it should be fine everywhere
+ @run_after("install")
+ def fix_binary_path(self):
+ for i in [
+ s for s in ["e2fsprogs", "gocryptfs", "squashfuse", "fuse-overlayfs"] if s in self.spec
+ ]:
+ for binary in glob(join_path(self.spec[i].prefix.bin, "*")):
+ symlink(
+ binary, join_path(self.spec.prefix.libexec.apptainer.bin, basename(binary))
+ )
diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py
index 8638f880c0..4fba7209e4 100644
--- a/var/spack/repos/builtin/packages/apr-util/package.py
+++ b/var/spack/repos/builtin/packages/apr-util/package.py
@@ -19,6 +19,8 @@ class AprUtil(AutotoolsPackage):
version("1.6.0", sha256="483ef4d59e6ac9a36c7d3fd87ad7b9db7ad8ae29c06b9dd8ff22dda1cc416389")
version("1.5.4", sha256="976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19")
+ depends_on("c", type="build") # generated
+
variant("crypto", default=True, description="Enable crypto support")
variant("gdbm", default=False, description="Enable GDBM support")
variant("pgsql", default=False, description="Enable PostgreSQL support")
@@ -56,22 +58,22 @@ class AprUtil(AutotoolsPackage):
"--without-oracle",
]
- if "+crypto" in spec:
+ if spec.satisfies("+crypto"):
args.extend(["--with-crypto", f"--with-openssl={spec['openssl'].prefix}"])
else:
args.append("--without-crypto")
- if "+gdbm" in spec:
+ if spec.satisfies("+gdbm"):
args.append(f"--with-gdbm={spec['gdbm'].prefix}")
else:
args.append("--without-gdbm")
- if "+pgsql" in spec:
+ if spec.satisfies("+pgsql"):
args.append(f"--with-pgsql={spec['postgresql'].prefix}")
else:
args.append("--without-pgsql")
- if "+sqlite" in spec:
+ if spec.satisfies("+sqlite"):
if spec.satisfies("^sqlite@3.0:3"):
args.extend([f"--with-sqlite3={spec['sqlite'].prefix}", "--without-sqlite2"])
elif spec.satisfies("^sqlite@2.0:2"):
@@ -79,7 +81,7 @@ class AprUtil(AutotoolsPackage):
else:
args.extend(["--without-sqlite2", "--without-sqlite3"])
- if "+odbc" in spec:
+ if spec.satisfies("+odbc"):
args.append(f"--with-odbc={spec['unixodbc'].prefix}")
else:
args.append("--without-odbc")
diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py
index c56f4eb7a1..6b1eac1282 100644
--- a/var/spack/repos/builtin/packages/apr/package.py
+++ b/var/spack/repos/builtin/packages/apr/package.py
@@ -12,14 +12,20 @@ class Apr(AutotoolsPackage):
homepage = "https://apr.apache.org/"
url = "https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz"
- license("Apache-2.0")
-
- version("1.7.4", sha256="a4137dd82a185076fa50ba54232d920a17c6469c30b0876569e1c2a05ff311d9")
- version("1.7.3", sha256="af9bfd5b8a04425d6b419673f3e0a7656fade226aae78180d93f8a6f2d3d1c09")
- version("1.7.2", sha256="3d8999b216f7b6235343a4e3d456ce9379aa9a380ffb308512f133f0c5eb2db9")
- version("1.7.0", sha256="48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2")
- version("1.6.2", sha256="4fc24506c968c5faf57614f5d0aebe0e9d0b90afa47a883e1a1ca94f15f4a42e")
- version("1.5.2", sha256="1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.7.5", sha256="3375fa365d67bcf945e52b52cba07abea57ef530f40b281ffbe977a9251361db")
+
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-49582
+ with default_args(deprecated=True):
+ version("1.7.4", sha256="a4137dd82a185076fa50ba54232d920a17c6469c30b0876569e1c2a05ff311d9")
+ version("1.7.3", sha256="af9bfd5b8a04425d6b419673f3e0a7656fade226aae78180d93f8a6f2d3d1c09")
+ version("1.7.2", sha256="3d8999b216f7b6235343a4e3d456ce9379aa9a380ffb308512f133f0c5eb2db9")
+ version("1.7.0", sha256="48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2")
+ version("1.6.2", sha256="4fc24506c968c5faf57614f5d0aebe0e9d0b90afa47a883e1a1ca94f15f4a42e")
+ version("1.5.2", sha256="1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb")
+
+ depends_on("c", type="build")
patch("missing_includes.patch", when="@1.7.0")
diff --git a/var/spack/repos/builtin/packages/aqlprofile/package.py b/var/spack/repos/builtin/packages/aqlprofile/package.py
new file mode 100644
index 0000000000..f697525685
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aqlprofile/package.py
@@ -0,0 +1,267 @@
+# Copyright 2013-2024 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 spack.platforms
+from spack.package import *
+
+_versions = {
+ "6.2.4": {
+ "apt": (
+ "614ad0c01b7f18eaa9e8a33fb73b9d8445c8785841ed41b406e129101dea854d",
+ "https://repo.radeon.com/rocm/apt/6.2.4/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60204.60204-139~20.04_amd64.deb",
+ ),
+ "yum": (
+ "fe499f5f0f4dac3652913d4009ff802d2136725341a8346c797af790700b5f31",
+ "https://repo.radeon.com/rocm/yum/6.2.4/main/hsa-amd-aqlprofile-1.0.0.60204.60204-139.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "7109118f0edce2f85e5554330ce6f6c6519d45558d8912940c9f7ee9c01fc4dd",
+ "https://repo.radeon.com/rocm/zyp/6.2.4/main/hsa-amd-aqlprofile-1.0.0.60204.60204-sles155.139.x86_64.rpm",
+ ),
+ },
+ "6.2.1": {
+ "apt": (
+ "a196698d39c567aef39734b4a47e0daa1596c86945868b4b0cffc6fcb0904dea",
+ "https://repo.radeon.com/rocm/apt/6.2.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60201.60201-112~20.04_amd64.deb",
+ ),
+ "yum": (
+ "771782e92156a25a775cb324a5ae4288d419659b963132688e9ed79eed22e421",
+ "https://repo.radeon.com/rocm/yum/6.2.1/main/hsa-amd-aqlprofile-1.0.0.60201.60201-112.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "bb70b54754638c4eb707ae82f4dc02fe9e8fc2e56618e478172169b839851d4d",
+ "https://repo.radeon.com/rocm/zyp/6.2.1/main/hsa-amd-aqlprofile-1.0.0.60201.60201-sles155.112.x86_64.rpm",
+ ),
+ },
+ "6.2.0": {
+ "apt": (
+ "75f4417477abb80f6a453f836d1ac44c8a3d24447b21cfa4b29787a73725ef4e",
+ "https://repo.radeon.com/rocm/apt/6.2/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60200.60200-66~20.04_amd64.deb",
+ ),
+ "yum": (
+ "d8ec6ceffe366c041d4dda11c418da53ca3b2234e8a57d4c4af9fdec936349ed",
+ "https://repo.radeon.com/rocm/yum/6.2/main/hsa-amd-aqlprofile-1.0.0.60200.60200-66.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "e7b34e800e4da6542261379e00b4f3a0e3ebc15e80925bf056ce495aff0b25e9",
+ "https://repo.radeon.com/rocm/zyp/6.2/main/hsa-amd-aqlprofile-1.0.0.60200.60200-sles155.66.x86_64.rpm",
+ ),
+ },
+ "6.1.2": {
+ "apt": (
+ "93faa8a0d702bc1623d2346e07a9a1c9134d99c0d3f9de62903e7394e0eedf47",
+ "https://repo.radeon.com/rocm/apt/6.1.2/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60102.60102-119~20.04_amd64.deb",
+ ),
+ "yum": (
+ "b8c6a8c8fad6b07c87f99a95126b982aeb39a3e4943d05df090d2221f4aef779",
+ "https://repo.radeon.com/rocm/yum/6.1.2/main/hsa-amd-aqlprofile-1.0.0.60102.60102-119.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "132dde13aa550376ac39d57a51b42b803574cd0c57d2bd1346f36bf8d7efa4c4",
+ "https://repo.radeon.com/rocm/zyp/6.1.2/main/hsa-amd-aqlprofile-1.0.0.60102.60102-sles154.119.x86_64.rpm",
+ ),
+ },
+ "6.1.1": {
+ "apt": (
+ "faa5dae914fc63f0c8d0c2be28b7ec502db487004bdff0fe88dd15432efc5401",
+ "https://repo.radeon.com/rocm/apt/6.1.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60101.60101-90~20.04_amd64.deb",
+ ),
+ "yum": (
+ "cc247e15ceff625c94d6c7104ffea3990a4acbcd2f9114914ab7ab829fae4aeb",
+ "https://repo.radeon.com/rocm/yum/6.1.1/main/hsa-amd-aqlprofile-1.0.0.60101.60101-90.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "9af82841be1765d6334b06a463583570653b6a36d0de29cfc00c5c4b6560b956",
+ "https://repo.radeon.com/rocm/zyp/6.1.1/main/hsa-amd-aqlprofile-1.0.0.60101.60101-sles154.90.x86_64.rpm",
+ ),
+ },
+ "6.1.0": {
+ "apt": (
+ "0ef862503245f12721384443f8347528f3d5c2c7762289c770521f3235ba36c9",
+ "https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60100.60100-82~20.04_amd64.deb",
+ ),
+ "yum": (
+ "bb08ec49987ef821278e24b9669ccea613a1475af4aedfcc3ac77146e6fbf229",
+ "https://repo.radeon.com/rocm/yum/6.1/main/hsa-amd-aqlprofile-1.0.0.60100.60100-82.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "6a20c8933a878dc3476fa5a45936d3d230d5c2c417e914a6460c2f576a3d6e35",
+ "https://repo.radeon.com/rocm/zyp/6.1/main/hsa-amd-aqlprofile-1.0.0.60100.60100-sles154.82.x86_64.rpm",
+ ),
+ },
+ "6.0.2": {
+ "apt": (
+ "57efc4e8380d941fc9e3ba8353bc724913cd5b5be2c53fed016e92da63e31b2f",
+ "https://repo.radeon.com/rocm/apt/6.0.2/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60002.60002-115~20.04_amd64.deb",
+ ),
+ "yum": (
+ "eb9099e86c3574124dfeec257217781b716f72c51cc5c11ed857d16cb0924467",
+ "https://repo.radeon.com/rocm/yum/6.0.2/main/hsa-amd-aqlprofile-1.0.0.60002.60002-115.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "b752eb18eed98226bf0cffa492363d452b318432fd5ae01ad86172c4ce132bef",
+ "https://repo.radeon.com/rocm/zyp/6.0.2/main/hsa-amd-aqlprofile-1.0.0.60002.60002-sles154.115.x86_64.rpm",
+ ),
+ },
+ "6.0.0": {
+ "apt": (
+ "e120268933eab5eff25d1b7d0646b0785a13a9fb2dce2bdaca7ac2a19482339c",
+ "https://repo.radeon.com/rocm/apt/6.0/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60000.60000-91~20.04_amd64.deb",
+ ),
+ "yum": (
+ "431be1e9996a465e1305a312e238e9bc7de3991fa2488968a36195108ed7f7b5",
+ "https://repo.radeon.com/rocm/yum/6.0/main/hsa-amd-aqlprofile-1.0.0.60000.60000-91.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "e64f3c0642b209753e2ede374eee80c36827db9de348c754a4385139f7203487",
+ "https://repo.radeon.com/rocm/zyp/6.0/main/hsa-amd-aqlprofile-1.0.0.60000.60000-sles154.91.x86_64.rpm",
+ ),
+ },
+ "5.7.1": {
+ "apt": (
+ "9f00713062005624231dac5fd3e92481b8d1547b3301c3b8a07298d4548037b8",
+ "https://repo.radeon.com/rocm/apt/5.7.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50701.50701-98~20.04_amd64.deb",
+ ),
+ "yum": (
+ "ea69d9deb604fdc0415070a9e3d8dbe90feecfc71533b92dd7507e2b8d2770de",
+ "https://repo.radeon.com/rocm/yum/5.7.1/main/hsa-amd-aqlprofile-1.0.0.50701.50701-98.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "d83ca93e280764afc20e2eca01b8cc1c047e2a4db0131b4df58ec19f0ddc2a07",
+ "https://repo.radeon.com/rocm/zyp/5.7.1/main/hsa-amd-aqlprofile-1.0.0.50701.50701-sles154.98.x86_64.rpm",
+ ),
+ },
+ "5.7.0": {
+ "apt": (
+ "131e2d699eb24ff19cba54a9721b83c362196c91a8380b5e4b4ba3583311df21",
+ "https://repo.radeon.com/rocm/apt/5.7/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50700.50700-63~20.04_amd64.deb",
+ ),
+ "yum": (
+ "4f6eef63bb586c290b22234b3d849b382bcb4ddc0f28ed93b3232ca7f6914759",
+ "https://repo.radeon.com/rocm/yum/5.7/main/hsa-amd-aqlprofile-1.0.0.50700.50700-63.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "61b7ba9022cdf2903dd476811d39f294cdb0fd4bd385785bcba9abe575e9b63c",
+ "https://repo.radeon.com/rocm/zyp/5.7/main/hsa-amd-aqlprofile-1.0.0.50700.50700-sles154.63.x86_64.rpm",
+ ),
+ },
+ "5.6.1": {
+ "apt": (
+ "ddb231dc4c8ca45e586ba68cae86273c3bc109f5ec172855815fce1ea6aff172",
+ "https://repo.radeon.com/rocm/apt/5.6.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50601-93~20.04_amd64.deb",
+ ),
+ "yum": (
+ "3c67b2e3cfbe71441d4c504dee2c55c9010a15ad7c973f1f858a052fb60524a6",
+ "https://repo.radeon.com/rocm/yum/5.6.1/main/hsa-amd-aqlprofile-1.0.0.50601-93.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "956382a085356211a35cb24210764c4f5575ce4d3d842439e39cc94287004176",
+ "https://repo.radeon.com/rocm/zyp/5.6.1/main/hsa-amd-aqlprofile-1.0.0.50601-sles154.93.x86_64.rpm",
+ ),
+ },
+ "5.6.0": {
+ "apt": (
+ "67273e8513c0efdef6d52fb211a0cf4b7e117b1c5e737f8763946699324a9d7d",
+ "https://repo.radeon.com/rocm/apt/5.6/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50600-67~20.04_amd64.deb",
+ ),
+ "yum": (
+ "0aefd5f0eca5c1bcb55f5c80e946e252685533cbb3c936417abd44fe94c1f28e",
+ "https://repo.radeon.com/rocm/yum/5.6/main/hsa-amd-aqlprofile-1.0.0.50600-67.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "b752eb18eed98226bf0cffa492363d452b318432fd5ae01ad86172c4ce132bef",
+ "https://repo.radeon.com/rocm/zyp/5.6/main/hsa-amd-aqlprofile-1.0.0.50600-sles154.67.x86_64.rpm",
+ ),
+ },
+ "5.5.1": {
+ "apt": (
+ "67b957abe5ea872abd3ec6b98eb83ef66fe07668001392e695dd77ab1b6d8890",
+ "https://repo.radeon.com/rocm/apt/5.5.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50501-74~20.04_amd64.deb",
+ ),
+ "yum": (
+ "2e6ae5a417d3a14a6b522b2daccbccea0a192ffe689b5e1817300ec2b65b60c2",
+ "https://repo.radeon.com/rocm/yum/5.5.1/main/hsa-amd-aqlprofile-1.0.0.50501-74.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "3ad17b1628c308396d39f61c12f7403800468f54eb3f7b3ed4b47e076ea1b821",
+ "https://repo.radeon.com/rocm/zyp/5.5.1/main/hsa-amd-aqlprofile-1.0.0.50501-sles153.74.x86_64.rpm",
+ ),
+ },
+ "5.5.0": {
+ "apt": (
+ "fbe08a39a36499959198fa7678338cf2d7888dc2aafb4694072d1f37b24e599f",
+ "https://repo.radeon.com/rocm/apt/5.5/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50500-63~20.04_amd64.deb",
+ ),
+ "yum": (
+ "fde2d38174d25af9d780ef2a1e91eb75b0de5943711f20930367b9f28f77a8bd",
+ "https://repo.radeon.com/rocm/yum/5.5/main/hsa-amd-aqlprofile-1.0.0.50500-63.el7.x86_64.rpm",
+ ),
+ "zyp": (
+ "eec9dc39ddbb0fc1f18e0b62a238252b3e0968152792c5b4948b3d001b07a53f",
+ "https://repo.radeon.com/rocm/zyp/5.5/main/hsa-amd-aqlprofile-1.0.0.50500-sles153.63.x86_64.rpm",
+ ),
+ },
+}
+
+
+class Aqlprofile(Package):
+ """
+ HSA extension AMD AQL profile library.
+ Provides AQL packets helper methods for perfcounters (PMC) and SQ threadtraces (SQTT).
+ """
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ spack_os = spack.platforms.host().default_os
+ if "rhel" in spack_os or "centos" in spack_os:
+ pkg_type = "yum"
+ elif "sles" in spack_os:
+ pkg_type = "zyp"
+ else:
+ pkg_type = "apt"
+
+ for ver, packages in _versions.items():
+ pkg = packages.get(pkg_type)
+ if pkg:
+ version(ver, sha256=pkg[0], url=pkg[1], expand=False)
+
+ depends_on("cpio")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+
+ def install(self, spec, prefix):
+ # find deb or rpm pkg and extract files
+ for file in os.listdir("."):
+ if file.endswith(".rpm"):
+ os.system(f"rpm2cpio {file} | cpio -idmv")
+ break
+ if file.endswith(".deb"):
+ os.system(f"ar vx {file}")
+ os.system("tar xvf data.tar.gz")
+ break
+
+ install_tree(f"opt/rocm-{spec.version}/share/", prefix.share)
+ install_tree(f"opt/rocm-{spec.version}/lib/", prefix.lib)
+
+ def setup_run_environment(self, env):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib)
diff --git a/var/spack/repos/builtin/packages/arbor/package.py b/var/spack/repos/builtin/packages/arbor/package.py
index c212d0247e..415914b7ba 100644
--- a/var/spack/repos/builtin/packages/arbor/package.py
+++ b/var/spack/repos/builtin/packages/arbor/package.py
@@ -2,7 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
+from spack.build_environment import optimization_flags
from spack.package import *
@@ -13,8 +13,8 @@ class Arbor(CMakePackage, CudaPackage):
homepage = "https://arbor-sim.org"
git = "https://github.com/arbor-sim/arbor.git"
url = "https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz"
- maintainers = ["thorstenhater", "brenthuisman"]
+ maintainers("thorstenhater", "brenthuisman")
license("BSD-3-Clause")
version("master", branch="master")
@@ -50,6 +50,9 @@ class Arbor(CMakePackage, CudaPackage):
url="https://github.com/arbor-sim/arbor/releases/download/v0.5.2/arbor-v0.5.2-full.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("assertions", default=False, description="Enable arb_assert() assertions in code.")
variant("doc", default=False, description="Build documentation.")
variant("mpi", default=False, description="Enable MPI support")
@@ -107,23 +110,23 @@ class Arbor(CMakePackage, CudaPackage):
return ["all", "html"] if "+doc" in self.spec else ["all"]
def cmake_args(self):
+ spec = self.spec
args = [
self.define_from_variant("ARB_WITH_ASSERTIONS", "assertions"),
self.define_from_variant("ARB_WITH_MPI", "mpi"),
self.define_from_variant("ARB_WITH_PYTHON", "python"),
self.define_from_variant("ARB_VECTORIZE", "vectorize"),
+ self.define("ARB_ARCH", "none"),
+ self.define("ARB_CXX_FLAGS_TARGET", optimization_flags(self.compiler, spec.target)),
]
- if "+cuda" in self.spec:
- args.append("-DARB_GPU=cuda")
- args.append(self.define_from_variant("ARB_USE_GPU_RNG", "gpu_rng"))
-
- # query spack for the architecture-specific compiler flags set by its wrapper
- args.append("-DARB_ARCH=none")
- opt_flags = self.spec.target.optimization_flags(
- self.spec.compiler.name, self.spec.compiler.version
- )
- args.append("-DARB_CXX_FLAGS_TARGET=" + opt_flags)
+ if self.spec.satisfies("+cuda"):
+ args.extend(
+ [
+ self.define("ARB_GPU", "cuda"),
+ self.define_from_variant("ARB_USE_GPU_RNG", "gpu_rng"),
+ ]
+ )
return args
diff --git a/var/spack/repos/builtin/packages/arborx/0001-update-major-version-required-for-rocm-6.0.patch b/var/spack/repos/builtin/packages/arborx/0001-update-major-version-required-for-rocm-6.0.patch
new file mode 100644
index 0000000000..009a40f984
--- /dev/null
+++ b/var/spack/repos/builtin/packages/arborx/0001-update-major-version-required-for-rocm-6.0.patch
@@ -0,0 +1,24 @@
+From a31d3766f5a7a3a3e20d5bc0c315ad6295a82298 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <afzal.patel@amd.com>
+Date: Wed, 17 Jan 2024 11:50:18 -0800
+Subject: [PATCH] Changed required version of rocthrust to 3 for rocm 6.0
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8c3c99a..1af6d13 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,7 @@ if(Kokkos_ENABLE_HIP AND ARBORX_ENABLE_ROCTHRUST)
+ # Require at least rocThrust-2.10.5 (that comes with ROCm 3.9) because
+ # rocPRIM dependency is not set properly in exported configuration for
+ # earlier versions
+- find_package(rocthrust 2.10.5 REQUIRED CONFIG)
++ find_package(rocthrust 3 REQUIRED CONFIG)
+ target_link_libraries(ArborX INTERFACE roc::rocthrust)
+ endif()
+
+--
+2.25.1
diff --git a/var/spack/repos/builtin/packages/arborx/package.py b/var/spack/repos/builtin/packages/arborx/package.py
index 6eb003252c..c3f2864ded 100644
--- a/var/spack/repos/builtin/packages/arborx/package.py
+++ b/var/spack/repos/builtin/packages/arborx/package.py
@@ -23,6 +23,8 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("1.7", sha256="e3d9a57a1d7c1ad62f6bbb43fd29a366506f3a16cbbe801c04d10f5fb0dec201")
+ version("1.6", sha256="c2230de185d62f1999d36c6b8b92825f19ab9fbf30bdae90595cab04e76561a4")
version("1.5", sha256="c26f23c17e749ccf3e2d353a68969aa54d31b8e720dbfdbc2cef16c5d8477e9e")
version("1.4.1", sha256="2ca828ef6615859654b233a7df17017e7cfd904982b80026ec7409eb46b77a95")
version("1.4", sha256="803a1018a6305cf3fea161172b3ada49537f59261279d91c2abbcce9492ee7af")
@@ -36,6 +38,8 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
deprecated=True,
)
+ depends_on("cxx", type="build")
+
# Allowed C++ standard
variant(
"cxxstd",
@@ -59,59 +63,69 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
for backend in kokkos_backends:
deflt, descr = kokkos_backends[backend]
variant(backend.lower(), default=deflt, description=descr)
- variant("trilinos", default=False, description="use Kokkos from Trilinos")
+ variant("trilinos", default=False, when="@:1.5", description="use Kokkos from Trilinos")
depends_on("cmake@3.12:", type="build")
depends_on("cmake@3.16:", type="build", when="@1.0:")
depends_on("mpi", when="+mpi")
depends_on("rocthrust", when="+rocm")
+ patch("0001-update-major-version-required-for-rocm-6.0.patch", when="@:1.5+rocm ^hip@6.0:")
# Standalone Kokkos
depends_on("kokkos@3.1.00:", when="~trilinos")
depends_on("kokkos@3.4.00:", when="@1.2~trilinos")
depends_on("kokkos@3.6.00:", when="@1.3~trilinos")
- depends_on("kokkos@3.7.01:", when="@1.4:~trilinos")
- depends_on("kokkos@4.0.00:", when="@1.5:~trilinos")
+ depends_on("kokkos@3.7.01:", when="@1.4:1.4.1~trilinos")
+ depends_on("kokkos@4.0.00:", when="@1.5~trilinos")
+ depends_on("kokkos@4.1.00:", when="@1.6")
+ depends_on("kokkos@4.2.00:", when="@1.7:")
for backend in kokkos_backends:
depends_on("kokkos+%s" % backend.lower(), when="~trilinos+%s" % backend.lower())
for arch in CudaPackage.cuda_arch_values:
- cuda_dep = "+cuda cuda_arch={0}".format(arch)
- depends_on("kokkos {0}".format(cuda_dep), when=cuda_dep)
+ cuda_dep = f"+cuda cuda_arch={arch}"
+ depends_on(f"kokkos {cuda_dep}", when=f"~trilinos {cuda_dep}")
+ depends_on(f"trilinos {cuda_dep}", when=f"+trilinos {cuda_dep}")
for arch in ROCmPackage.amdgpu_targets:
- rocm_dep = "+rocm amdgpu_target={0}".format(arch)
- depends_on("kokkos {0}".format(rocm_dep), when=rocm_dep)
+ rocm_dep = f"+rocm amdgpu_target={arch}"
+ depends_on(f"kokkos {rocm_dep}", when=f"~trilinos {rocm_dep}")
+ depends_on(f"trilinos {rocm_dep}", when=f"+trilinos {rocm_dep}")
conflicts("+cuda", when="cuda_arch=none")
+ conflicts("^kokkos", when="+trilinos")
depends_on("kokkos+cuda_lambda", when="~trilinos+cuda")
- # Trilinos/Kokkos
+ # Trilinos with internal Kokkos
# Notes:
+ # - starting with Trilinos 14.4, Trilinos' spack package uses external Kokkos
# - current version of Trilinos package does not allow disabling Serial
# - current version of Trilinos package does not allow enabling CUDA
depends_on("trilinos+kokkos", when="+trilinos")
depends_on("trilinos+openmp", when="+trilinos+openmp")
depends_on("trilinos@13.2.0:", when="@1.2+trilinos")
depends_on("trilinos@13.4.0:", when="@1.3+trilinos")
- depends_on("trilinos@14.0.0:", when="@1.4:+trilinos")
+ depends_on("trilinos@14.0.0:", when="@1.4:1.4.1+trilinos")
+ depends_on("trilinos@14.2.0:", when="@1.5+trilinos")
patch("trilinos14.0-kokkos-major-version.patch", when="@1.4+trilinos ^trilinos@14.0.0")
conflicts("~serial", when="+trilinos")
- conflicts("+cuda", when="+trilinos")
def cmake_args(self):
spec = self.spec
+ if "+trilinos" in spec:
+ kokkos_spec = spec["trilinos"]
+ else:
+ kokkos_spec = spec["kokkos"]
+
options = [
- "-DKokkos_ROOT=%s"
- % (spec["kokkos"].prefix if "~trilinos" in spec else spec["trilinos"].prefix),
+ f"-DKokkos_ROOT={kokkos_spec.prefix}",
self.define_from_variant("ARBORX_ENABLE_MPI", "mpi"),
]
- if "+cuda" in spec:
- # Only Kokkos allows '+cuda' for now
- options.append("-DCMAKE_CXX_COMPILER=%s" % spec["kokkos"].kokkos_cxx)
- if "+rocm" in spec:
+ if spec.satisfies("+cuda"):
+ options.append(f"-DCMAKE_CXX_COMPILER={kokkos_spec.kokkos_cxx}")
+ if spec.satisfies("+rocm"):
options.append("-DCMAKE_CXX_COMPILER=%s" % spec["hip"].hipcc)
return options
@@ -122,7 +136,7 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
def setup_build_tests(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
@property
def cached_tests_work_dir(self):
@@ -131,23 +145,22 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
def test_run_ctest(self):
"""run ctest tests on the installed package"""
-
- arborx_dir = self.spec["arborx"].prefix
- cmake_prefix_path = f"-DCMAKE_PREFIX_PATH={arborx_dir}"
- if "+mpi" in self.spec:
- cmake_prefix_path += f";{self.spec['mpi'].prefix}"
-
cmake_args = [
".",
cmake_prefix_path,
f"-DCMAKE_CXX_COMPILER={os.environ['CXX']}",
self.define(
"Kokkos_ROOT",
- self.spec["kokkos"].prefix
- if "~trilinos" in self.spec
- else self.spec["trilinos"].prefix,
+ (
+ self.spec["kokkos"].prefix
+ if "~trilinos" in self.spec
+ else self.spec["trilinos"].prefix
+ ),
),
+ self.define("ArborX_ROOT", self.spec["arborx".prefix]),
]
+ if self.spec.satisfies("+mpi"):
+ cmake_args.append(self.define("MPI_HOME", self.spec["mpi"].prefix))
cmake = which(self.spec["cmake"].prefix.bin.cmake)
make = which("make")
ctest = which("ctest")
diff --git a/var/spack/repos/builtin/packages/arc/package.py b/var/spack/repos/builtin/packages/arc/package.py
index afcad0a0be..b14e81ca13 100644
--- a/var/spack/repos/builtin/packages/arc/package.py
+++ b/var/spack/repos/builtin/packages/arc/package.py
@@ -23,6 +23,8 @@ class Arc(CMakePackage):
version("master", branch="master")
version("2021-12-01", commit="49d4a5df53a082f15a6959aef434224fd7b9beac")
+ depends_on("c", type="build") # generated
+
depends_on("libpressio+sz+zfp", when="+examples")
variant("examples", description="build examples", default=False)
diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py
index 731d318365..87bd4ea79d 100644
--- a/var/spack/repos/builtin/packages/archer/package.py
+++ b/var/spack/repos/builtin/packages/archer/package.py
@@ -21,6 +21,9 @@ class Archer(CMakePackage):
version("2.0.0", sha256="3241cadb0078403368b69166b27f815e12c350486d4ceb3fb33147895b9ebde8")
version("1.0.0", sha256="df814a475606b83c659932caa30a68bed1c62e713386b375c1b78eb8d60e0d15")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.4.3:", type="build")
depends_on("llvm@:8.0.0")
depends_on("ninja@1.5:", type="build")
@@ -47,7 +50,7 @@ class Archer(CMakePackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(["test"])
+ cache_extra_test_sources(self, ["test"])
def test_run_parallel_example(self):
"""build and run parallel-simple"""
diff --git a/var/spack/repos/builtin/packages/argobots/package.py b/var/spack/repos/builtin/packages/argobots/package.py
index 7fc6695530..b91ab5d565 100644
--- a/var/spack/repos/builtin/packages/argobots/package.py
+++ b/var/spack/repos/builtin/packages/argobots/package.py
@@ -16,17 +16,20 @@ class Argobots(AutotoolsPackage):
execution model and a memory model."""
homepage = "https://www.argobots.org/"
- url = "https://github.com/pmodels/argobots/releases/download/v1.0b1/argobots-1.0b1.tar.gz"
+ url = "https://github.com/pmodels/argobots/releases/download/v1.2/argobots-1.2.tar.gz"
git = "https://github.com/pmodels/argobots.git"
- maintainers("shintaro-iwasaki")
+ maintainers("yfguo")
tags = ["e4s"]
version("main", branch="main")
+ version("1.2", sha256="1c056429d9c0a27c041d4734f6318b801fc2ec671854e42c35251c4c7d0d43e1")
version("1.1", sha256="f0f971196fc8354881681c2282a2f2adb6d48ff5e84cf820ca657daad1549005")
version("1.0.1", sha256="fa05a02d7f8f74d845647636609219ee02f6adf628ebcbf40393f829987d9036")
version("1.0", sha256="36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def")
+ depends_on("c", type="build") # generated
+
variant("perf", default=True, description="Add performance optimization flags")
variant("valgrind", default=False, description="Enable Valgrind")
variant("debug", default=False, description="Compiled with debugging symbols")
@@ -50,20 +53,20 @@ class Argobots(AutotoolsPackage):
def configure_args(self):
args = []
- if "+perf" in self.spec:
+ if self.spec.satisfies("+perf"):
args.append("--enable-perf-opt")
- if "+valgrind" in self.spec:
+ if self.spec.satisfies("+valgrind"):
args.append("--enable-valgrind")
else:
args.append("--disable-valgrind")
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
args.append("--enable-debug=yes")
else:
args.append("--disable-debug")
- if "+stackunwind" in self.spec:
+ if self.spec.satisfies("+stackunwind"):
args.append("--enable-stack-unwind")
args.append("--with-libunwind={0}".format(self.spec["libunwind"].prefix))
@@ -71,10 +74,10 @@ class Argobots(AutotoolsPackage):
if stackguard != "none":
args.append("--enable-stack-overflow-check={0}".format(stackguard))
- if "+tool" in self.spec:
+ if self.spec.satisfies("+tool"):
args.append("--enable-tool")
- if "+affinity" in self.spec:
+ if self.spec.satisfies("+affinity"):
args.append("--enable-affinity")
return args
diff --git a/var/spack/repos/builtin/packages/argon2/package.py b/var/spack/repos/builtin/packages/argon2/package.py
index 4484e1eb52..f9227c9957 100644
--- a/var/spack/repos/builtin/packages/argon2/package.py
+++ b/var/spack/repos/builtin/packages/argon2/package.py
@@ -21,5 +21,7 @@ class Argon2(MakefilePackage):
version("20171227", sha256="eaea0172c1f4ee4550d1b6c9ce01aab8d1ab66b4207776aa67991eb5872fdcd8")
version("20161029", sha256="fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make(f"PREFIX={prefix}", "install", "LIBRARY_REL=lib")
diff --git a/var/spack/repos/builtin/packages/argp-standalone/package.py b/var/spack/repos/builtin/packages/argp-standalone/package.py
index 9cdfdc8138..3b5fe1efdc 100644
--- a/var/spack/repos/builtin/packages/argp-standalone/package.py
+++ b/var/spack/repos/builtin/packages/argp-standalone/package.py
@@ -18,6 +18,8 @@ class ArgpStandalone(AutotoolsPackage):
version("1.3", sha256="dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be")
+ depends_on("c", type="build") # generated
+
# Homebrew (https://github.com/Homebrew/homebrew-core) patches
# argp-standalone to work on Darwin; the patchfile below was taken
# from
diff --git a/var/spack/repos/builtin/packages/args/package.py b/var/spack/repos/builtin/packages/args/package.py
index 27c739b168..907cdb9370 100644
--- a/var/spack/repos/builtin/packages/args/package.py
+++ b/var/spack/repos/builtin/packages/args/package.py
@@ -21,3 +21,5 @@ class Args(CMakePackage):
version("6.2.3", sha256="c202d15fc4b30519a08bae7df9e6f4fdc40ac2434ba65d83a108ebbf6e4822c2")
version("6.2.2", sha256="8016fb0fc079d746433be3df9cf662e3e931e730aaf9f69f2287eac79ac643c1")
version("6.2.1", sha256="699b91fae4509b09974274838e2038612da24eeae89e62d0bc580457a9e261b0")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/argtable/package.py b/var/spack/repos/builtin/packages/argtable/package.py
index 88604bbe50..2e93563505 100644
--- a/var/spack/repos/builtin/packages/argtable/package.py
+++ b/var/spack/repos/builtin/packages/argtable/package.py
@@ -11,9 +11,11 @@ class Argtable(AutotoolsPackage):
options with a minimum of fuss.
"""
- homepage = "http://argtable.sourceforge.net/"
+ homepage = "https://argtable.sourceforge.net/"
url = "https://sourceforge.net/projects/argtable/files/argtable/argtable-2.13/argtable2-13.tar.gz/download"
license("LGPL-2.0-or-later")
version("2-13", sha256="8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/aria2/package.py b/var/spack/repos/builtin/packages/aria2/package.py
index a1bcca28e7..83bc44605a 100644
--- a/var/spack/repos/builtin/packages/aria2/package.py
+++ b/var/spack/repos/builtin/packages/aria2/package.py
@@ -15,10 +15,14 @@ class Aria2(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("1.37.0", sha256="8e7021c6d5e8f8240c9cc19482e0c8589540836747744724d86bf8af5a21f0e8")
version("1.36.0", sha256="b593b2fd382489909c96c62c6e180054c3332b950be3d73e0cb0d21ea8afb3c5")
version("1.35.0", sha256="fd85589416f8246cefc4e6ba2fa52da54fdf11fd5602a2db4b6749f7c33b5b2d")
version("1.34.0", sha256="ec4866985760b506aa36dc9021dbdc69551c1a647823cae328c30a4f3affaa6c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libxml2")
depends_on("libssh2")
depends_on("libgcrypt")
diff --git a/var/spack/repos/builtin/packages/arm-forge/package.py b/var/spack/repos/builtin/packages/arm-forge/package.py
index 74dbbe5563..6d205f2209 100644
--- a/var/spack/repos/builtin/packages/arm-forge/package.py
+++ b/var/spack/repos/builtin/packages/arm-forge/package.py
@@ -22,6 +22,8 @@ class ArmForge(Package):
# TODO: this mess should be fixed as soon as a way to parametrize/constrain
# versions (and checksums) based on the target platform shows up
+ skip_version_audit = ["platform=windows"]
+
if platform.machine() in ["aarch64", "arm64"]:
version(
"22.1.3", sha256="131884f998b82673e885a7b42cc883210e3a0229b50af374092140cdfd42a408"
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
index 194b75d383..cd71d93656 100644
--- a/var/spack/repos/builtin/packages/armadillo/package.py
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -11,11 +11,18 @@ class Armadillo(CMakePackage):
for the C++ language, aiming towards a good balance between speed and
ease of use."""
- homepage = "http://arma.sourceforge.net/"
+ homepage = "https://arma.sourceforge.net/"
url = "http://sourceforge.net/projects/arma/files/armadillo-8.100.1.tar.xz"
+ git = "https://gitlab.com/conradsnicta/armadillo-code.git"
license("Apache-2.0")
+ version("14.0.3", sha256="ebd6215eeb01ee412fed078c8a9f7f87d4e1f6187ebcdc1bc09f46095a4f4003")
+ version("14.0.2", sha256="248e2535fc092add6cb7dea94fc86ae1c463bda39e46fd82d2a7165c1c197dff")
+ version("12.8.4", sha256="558fe526b990a1663678eff3af6ec93f79ee128c81a4c8aef27ad328fae61138")
+ version("12.8.3", sha256="2922589f6387796504b340da6bb954bef3d87574c298515893289edd2d890151")
+ version("12.8.2", sha256="03b62f8c09e4f5d74643b478520741b8e27b55e7e4525978fcae2f5d791ac3bf")
+ version("12.8.1", sha256="2781dd3a6cc5f9a49c91a4519dde2b1c24335a5bfe0cc1c9881b6363142452b4")
version("12.4.0", sha256="9905282781ced3f99769b0e45a705ecb50192ca1622300707b3302ea167dc883")
version("12.2.0", sha256="b0dce042297e865add3351dad77f78c2c7638d6632f58357b015e50edcbd2186")
version("12.0.1", sha256="230a5c75daad52dc47e1adce8f5a50f9aa4e4354e0f1bb18ea84efa2e70e20df")
@@ -24,9 +31,13 @@ class Armadillo(CMakePackage):
version("8.100.1", sha256="54773f7d828bd3885c598f90122b530ded65d9b195c9034e082baea737cd138d")
version("7.950.1", sha256="a32da32a0ea420b8397a53e4b40ed279c1a5fc791dd492a2ced81ffb14ad0d1b")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("hdf5", default=False, description="Include HDF5 support")
depends_on("cmake@2.8.12:", type="build")
+ depends_on("cmake@3.5:", type="build", when="@14:")
depends_on("arpack-ng") # old arpack causes undefined symbols
depends_on("blas")
depends_on("lapack")
@@ -78,4 +89,9 @@ class Armadillo(CMakePackage):
self.define("SuperLU_LIBRARY", spec["superlu"].libs.joined(";")),
# HDF5 support
self.define("DETECT_HDF5", "ON" if spec.satisfies("+hdf5") else "OFF"),
+ # disable flexiblas support because armadillo will possibly detect system
+ # flexiblas which causes problems. If this is removed, then SuperLU and ARPACK must
+ # also link with Flexiblas. As this does not seem to be needed with the spack
+ # blas and lapack, it is easier to disable
+ self.define("ALLOW_FLEXIBLAS_LINUX", "OFF"),
]
diff --git a/var/spack/repos/builtin/packages/armcimpi/package.py b/var/spack/repos/builtin/packages/armcimpi/package.py
new file mode 100644
index 0000000000..eed186a5ce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/armcimpi/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Armcimpi(AutotoolsPackage):
+ """ARMCI-MPI is an implementation of the ARMCI library used by Global Arrays.
+ MPI-3 one-sided communication is used to implement ARMCI.
+ """
+
+ homepage = "https://github.com/pmodels/armci-mpi"
+ url = "https://github.com/pmodels/armci-mpi/archive/refs/tags/v0.4.tar.gz"
+
+ maintainers("jeffhammond")
+
+ license("BSD-3-Clause", checked_by="jeffhammond")
+
+ version("0.4", sha256="bcc3bb189b23bf653dcc69bc469eb86eae5ebc5ad94ab5f83e52ddbdbbebf1b1")
+ version(
+ "0.3.1-beta", sha256="f3eaa8f365fb55123ecd9ced401086b0732e37e4df592b27916d71a67ab34fe9"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("shared", default=True, description="Builds a shared version of the library")
+ variant("progress", default=False, description="Enable asynchronous progress")
+
+ provides("armci")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("mpi")
+
+ def autoreconf(self, spec, prefix):
+ autoreconf("--install", "--verbose", "--force")
+
+ def configure_args(self):
+ args = ["--enable-g"]
+ args.extend(self.enable_or_disable("shared"))
+ args.extend(self.with_or_without("progress"))
+ return args
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set("ARMCIMPI_DIR", self.prefix)
diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py
index 880f1267d7..3da17ef3e4 100644
--- a/var/spack/repos/builtin/packages/armpl-gcc/package.py
+++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py
@@ -5,6 +5,8 @@
import os
+import spack.error
+import spack.platforms
from spack.package import *
_os_map_before_23 = {
@@ -21,9 +23,10 @@ _os_map_before_23 = {
"amzn2023": "RHEL-7",
}
-_os_map = {
+_os_map_before_24 = {
"ubuntu20.04": "Ubuntu-20.04",
"ubuntu22.04": "Ubuntu-22.04",
+ "debian12": "Ubuntu-22.04",
"sles15": "SLES-15",
"centos7": "RHEL-7",
"centos8": "RHEL-8",
@@ -36,7 +39,33 @@ _os_map = {
"amzn2023": "AmazonLinux-2023",
}
+_os_pkg_map = {
+ "ubuntu20.04": "deb",
+ "ubuntu22.04": "deb",
+ "debian12": "deb",
+ "sles15": "rpm",
+ "centos7": "rpm",
+ "centos8": "rpm",
+ "rhel7": "rpm",
+ "rhel8": "rpm",
+ "rhel9": "rpm",
+ "rocky8": "rpm",
+ "rocky9": "rpm",
+ "amzn2": "rpm",
+ "amzn2023": "rpm",
+}
+
_versions = {
+ "24.10": {
+ "deb": ("2be772d41c0e8646e24c4f57e188e96f2dd8934966ae560c74fa905cbde5e1bc"),
+ "macOS": ("04e794409867e6042ed0f487bbaf47cc6edd527dc6ddad67160f1dba83906969"),
+ "rpm": ("055d4b3c63d990942d453a8720d029be7e604646218ffc3262321683f51f23aa"),
+ },
+ "24.04": {
+ "deb": ("a323074cd08af82f4d79988cc66088b18e47dea4b93323b1b8a0f994f769f2f0"),
+ "macOS": ("228bf3a2c25dbd45c2f89c78f455ee3c7dfb25e121c20d2765138b5174e688dc"),
+ "rpm": ("d3917523034cf5a35e4f31f9a8bf4e53e7cc97892e89739d5757cb65ce40dc2e"),
+ },
"23.10_gcc-12.2": {
"RHEL-7": ("e5e2c69ad281a676f2a06c835fbf31d4f9fdf46aa3f3f7c8aafff46985f64902"),
"RHEL-8": ("cc0f3572ead93d1e31797b7a39a40cff3414878df9bd24a452bf4877dc35ca4c"),
@@ -227,28 +256,33 @@ _versions = {
}
-def get_os(ver):
+def get_os_or_pkg_manager(ver):
platform = spack.platforms.host()
if platform.name == "darwin":
return "macOS"
if ver.startswith("22."):
return _os_map_before_23.get(platform.default_os, "")
+ elif ver.startswith("23."):
+ return _os_map_before_24.get(platform.default_os, "RHEL-7")
else:
- return _os_map.get(platform.default_os, "RHEL-7")
+ return _os_pkg_map.get(platform.default_os, "rpm")
-def get_package_url(version):
- base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/"
+def get_package_url_before_24(version):
+ base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries"
armpl_version = version.split("_")[0]
armpl_version_dashed = armpl_version.replace(".", "-")
compiler_version = version.split("_", 1)[1]
- os = get_os(armpl_version)
+ os = get_os_or_pkg_manager(armpl_version)
if os == "macOS":
if armpl_version.startswith("23.06"):
- return f"{base_url}{armpl_version_dashed}/armpl_{armpl_version}_{compiler_version}.dmg"
+ return (
+ f"{base_url}/{armpl_version_dashed}/"
+ f"armpl_{armpl_version}_{compiler_version}.dmg"
+ )
else:
filename = f"arm-performance-libraries_{armpl_version}_macOS.dmg"
- return f"{base_url}{armpl_version_dashed}/macos/{filename}"
+ return f"{base_url}/{armpl_version_dashed}/macos/{filename}"
filename = f"arm-performance-libraries_{armpl_version}_{os}_{compiler_version}.tar"
os_short = ""
if armpl_version.startswith("22.0."):
@@ -257,11 +291,51 @@ def get_package_url(version):
os_short = os.split(".")[0].lower()
if "amazonlinux" in os_short:
os_short = os_short.replace("amazonlinux", "al")
- return f"{base_url}{armpl_version_dashed}/{os_short}/{filename}"
+ return f"{base_url}/{armpl_version_dashed}/{os_short}/{filename}"
+
+
+def get_package_url_from_24(version):
+ base_url = (
+ "https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version"
+ )
+ pkg_system = get_os_or_pkg_manager(version)
+
+ extension = "tgz" if pkg_system == "macOS" else "tar"
+
+ full_name_library = f"arm-performance-libraries_{version}_{pkg_system}"
+
+ if pkg_system != "macOS":
+ full_name_library = f"{full_name_library}_gcc"
+ file_name = f"{full_name_library}.{extension}"
+
+ url_parts = f"{base_url}_{version}/{file_name}"
+ return url_parts
+
+
+def get_package_url(version):
+ if version[:2] >= "24":
+ return get_package_url_from_24(version)
+ else:
+ return get_package_url_before_24(version)
def get_armpl_prefix(spec):
- return os.path.join(spec.prefix, "armpl_" + spec.version.string)
+ armpl_dir = [
+ d
+ for d in os.listdir(spec.prefix)
+ if os.path.isdir(os.path.join(spec.prefix, d)) and d.startswith("armpl_")
+ ][0]
+ return os.path.join(spec.prefix, armpl_dir)
+
+
+def get_armpl_suffix(spec):
+ suffix = ""
+ if spec.satisfies("@24:"):
+ suffix += "_ilp64" if spec.satisfies("+ilp64") else "_lp64"
+ else:
+ suffix += "_ilp64" if spec.satisfies("+ilp64") else ""
+ suffix += "_mp" if spec.satisfies("threads=openmp") else ""
+ return suffix
class ArmplGcc(Package):
@@ -269,12 +343,10 @@ class ArmplGcc(Package):
high-performance computing applications on Arm processors."""
homepage = "https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries"
- url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/23-04-1/ubuntu-22/arm-performance-libraries_23.04.1_Ubuntu-22.04_gcc-12.2.tar"
-
- maintainers("annop-w")
+ maintainers("paolotricerri")
for ver, packages in _versions.items():
- key = get_os(ver)
+ key = get_os_or_pkg_manager(ver)
sha256sum = packages.get(key)
url = get_package_url(ver)
if sha256sum:
@@ -319,6 +391,8 @@ class ArmplGcc(Package):
conflicts("%gcc@:7", when="@22.0.1_gcc-8.2")
conflicts("%gcc@:6", when="@22.0.1_gcc-7.5")
+ conflicts("%msvc", msg="Not compatible with MSVC compiler.")
+
variant("ilp64", default=False, description="use ilp64 specific Armpl library")
variant("shared", default=True, description="enable shared libs")
variant(
@@ -339,10 +413,17 @@ class ArmplGcc(Package):
hdiutil = which("hdiutil")
# Mount image
mountpoint = os.path.join(self.stage.path, "mount")
- hdiutil("attach", "-mountpoint", mountpoint, self.stage.archive_file)
+ if spec.satisfies("@:23"):
+ dmg_file = self.stage.archive_file
+ else:
+ # The archive file only extracts to one .dmg file
+ dmg_file = os.path.join(
+ self.stage.source_path, os.listdir(self.stage.source_path)[0]
+ )
+ hdiutil("attach", "-mountpoint", mountpoint, dmg_file)
try:
# Run installer
- exe_name = f"armpl_{spec.version.string}_install.sh"
+ exe_name = [f for f in os.listdir(mountpoint) if f.endswith(".sh")][0]
installer = Executable(os.path.join(mountpoint, exe_name))
installer("-y", f"--install_dir={prefix}")
finally:
@@ -357,15 +438,15 @@ class ArmplGcc(Package):
with when("@23:"):
armpl_version = spec.version.string.split("_")[0]
- exe = Executable(f"./arm-performance-libraries_{armpl_version}_{get_os(armpl_version)}.sh")
+ exe = Executable(
+ f"./arm-performance-libraries_{armpl_version}_"
+ f"{get_os_or_pkg_manager(armpl_version)}.sh"
+ )
exe("--accept", "--force", "--install-to", prefix)
@property
def lib_suffix(self):
- suffix = ""
- suffix += "_ilp64" if self.spec.satisfies("+ilp64") else ""
- suffix += "_mp" if self.spec.satisfies("threads=openmp") else ""
- return suffix
+ return get_armpl_suffix(self.spec)
@property
def blas_libs(self):
@@ -401,7 +482,10 @@ class ArmplGcc(Package):
def headers(self):
armpl_dir = get_armpl_prefix(self.spec)
- suffix = "include" + self.lib_suffix
+ if self.spec.satisfies("@24:"):
+ suffix = "include"
+ else:
+ suffix = "include" + self.lib_suffix
incdir = join_path(armpl_dir, suffix)
@@ -419,7 +503,9 @@ class ArmplGcc(Package):
@run_after("install")
def check_install(self):
armpl_dir = get_armpl_prefix(self.spec)
- armpl_example_dir = join_path(armpl_dir, "examples")
+ suffix = get_armpl_suffix(self.spec)
+ armpl_example_dir = join_path(armpl_dir, f"examples{suffix}")
+
# run example makefile
if self.spec.platform == "darwin":
# Fortran examples on MacOS requires flang-new which is
diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py
index df345e65a7..564c684e38 100644
--- a/var/spack/repos/builtin/packages/arpack-ng/package.py
+++ b/var/spack/repos/builtin/packages/arpack-ng/package.py
@@ -56,6 +56,10 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("mpi", default=True, description="Activates MPI support")
variant("icb", default=False, when="@3.6:", description="Activates iso_c_binding support")
@@ -89,16 +93,15 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
def flag_handler(self, name, flags):
spec = self.spec
- iflags = []
if name == "cflags":
if spec.satisfies("%oneapi"):
- iflags.append("-Wno-error=implicit-function-declaration")
+ flags.append("-Wno-error=implicit-function-declaration")
if name == "fflags":
if self.spec.satisfies("%cce"):
- iflags.append("-hnopattern")
+ flags.append("-hnopattern")
- return (iflags, None, None)
+ return (flags, None, None)
@property
def libs(self):
@@ -106,7 +109,7 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
# query_parameters = self.spec.last_query.extra_parameters
libraries = ["libarpack"]
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
libraries = ["libparpack"] + libraries
return find_libraries(libraries, root=self.prefix, shared=True, recursive=True)
@@ -156,7 +159,7 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+ self.enable_or_disable("shared")
)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.append(f"F77={spec['mpi'].mpif77}")
return options
diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py
index 23f7ad63e8..2e67af18d1 100644
--- a/var/spack/repos/builtin/packages/arrayfire/package.py
+++ b/var/spack/repos/builtin/packages/arrayfire/package.py
@@ -29,6 +29,9 @@ class Arrayfire(CMakePackage, CudaPackage):
"3.7.0", commit="fbea2aeb6f7f2d277dcb0ab425a77bb18ed22291", submodules=True, tag="v3.7.0"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("forge", default=False, description="Enable graphics library")
variant("opencl", default=False, description="Enable OpenCL backend")
@@ -77,7 +80,7 @@ class Arrayfire(CMakePackage, CudaPackage):
]
)
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
arch_list = [
"{}.{}".format(arch[:-1], arch[-1])
for arch in self.spec.variants["cuda_arch"].value
diff --git a/var/spack/repos/builtin/packages/arrow/package.py b/var/spack/repos/builtin/packages/arrow/package.py
index c9544e3f0a..31abcd7023 100644
--- a/var/spack/repos/builtin/packages/arrow/package.py
+++ b/var/spack/repos/builtin/packages/arrow/package.py
@@ -17,6 +17,10 @@ class Arrow(CMakePackage, CudaPackage):
license("Apache-2.0")
+ version("18.0.0", sha256="9c473f2c9914c59ab571761c9497cf0e5cfd3ea335f7782ccc6121f5cb99ae9b")
+ version("16.1.0", sha256="9762d9ecc13d09de2a03f9c625a74db0d645cb012de1e9a10dfed0b4ddc09524")
+ version("15.0.2", sha256="4735b349845bff1fe95ed11abbfed204eb092cabc37523aa13a80cb830fe5b5e")
+ version("14.0.2", sha256="07cdb4da6795487c800526b2865c150ab7d80b8512a31793e6a7147c8ccd270f")
version("14.0.1", sha256="a48e54a09d58168bc04d86b13e7dab04f0aaba18a6f7e4dadf3e9c7bb835c8f1")
version("14.0.0", sha256="39e3388bbaba23faa7a5e8a82ebba7fe4c38ace2c394d6a3f26559715b30f401")
version("13.0.0", sha256="99c27e6a517c750f29c3e6b264836e31251bb8e978dbbf11316680ca3eb8ebda")
@@ -38,13 +42,24 @@ class Arrow(CMakePackage, CudaPackage):
version("0.9.0", sha256="65f89a3910b6df02ac71e4d4283db9b02c5b3f1e627346c7b6a5982ae994af91")
version("0.8.0", sha256="c61a60c298c30546fc0b418a35be66ef330fb81b06c49928acca7f1a34671d54")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.60: +filesystem +system")
+ depends_on("brotli", when="+brotli")
+ depends_on("bzip2", when="+bz2")
depends_on("cmake@3.2.0:", type="build")
depends_on("flatbuffers")
+ conflicts("%gcc@14", when="@:15.0.1") # https://github.com/apache/arrow/issues/40009
depends_on("llvm@:11 +clang", when="+gandiva @:3", type="build")
depends_on("llvm@:12 +clang", when="+gandiva @:4", type="build")
depends_on("llvm@:13 +clang", when="+gandiva @:7", type="build")
- depends_on("llvm@:14 +clang", when="+gandiva @8:", type="build")
+ depends_on("llvm@:14 +clang", when="+gandiva @:9", type="build")
+ depends_on("llvm@:15 +clang", when="+gandiva @:11", type="build")
+ depends_on("llvm@:16 +clang", when="+gandiva @:13", type="build")
+ depends_on("llvm@:17 +clang", when="+gandiva @:15.0.1", type="build")
+ depends_on("llvm@:18.1 +clang", when="+gandiva @:16.0.1", type="build")
+ depends_on("llvm@:19.1 +clang", when="+gandiva", type="build")
depends_on("lz4", when="+lz4")
depends_on("ninja", type="build")
depends_on("openssl", when="+gandiva @6.0.0:")
@@ -71,6 +86,7 @@ class Arrow(CMakePackage, CudaPackage):
depends_on("zstd", when="@:8")
variant("brotli", default=False, description="Build support for Brotli compression")
+ variant("bz2", default=False, description="Build support for bzip2 compression")
variant(
"build_type",
default="Release",
@@ -151,6 +167,7 @@ class Arrow(CMakePackage, CudaPackage):
args.append(self.define_from_variant("ARROW_PYTHON", "python"))
args.append(self.define_from_variant("ARROW_TENSORFLOW", "tensorflow"))
args.append(self.define_from_variant("ARROW_WITH_BROTLI", "brotli"))
+ args.append(self.define_from_variant("ARROW_WITH_BZ2", "bz2"))
args.append(self.define_from_variant("ARROW_WITH_LZ4", "lz4"))
args.append(self.define_from_variant("ARROW_WITH_SNAPPY", "snappy"))
args.append(self.define_from_variant("ARROW_WITH_ZLIB", "zlib"))
diff --git a/var/spack/repos/builtin/packages/asagi/package.py b/var/spack/repos/builtin/packages/asagi/package.py
index 603cd0ad19..17080d6103 100644
--- a/var/spack/repos/builtin/packages/asagi/package.py
+++ b/var/spack/repos/builtin/packages/asagi/package.py
@@ -24,6 +24,10 @@ class Asagi(CMakePackage):
# is preferred to satisfy internal-dependencies
version("1.0", commit="f67250798b435c308b9a1e7516f916f7855534ec", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"link_type",
default="shared",
diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py
index 5512859fb8..247705a956 100644
--- a/var/spack/repos/builtin/packages/ascent/package.py
+++ b/var/spack/repos/builtin/packages/ascent/package.py
@@ -55,14 +55,18 @@ class Ascent(CMakePackage, CudaPackage):
version("develop", branch="develop", submodules=True)
version(
- "0.9.2",
- tag="v0.9.2",
- commit="b842516d12640e4a0d9433a18c7249440ef6fc3d",
+ "0.9.3",
+ tag="v0.9.3",
+ commit="e69d6ec77938846caae8fea7ed988b1151ac9b81",
submodules=True,
preferred=True,
)
version(
+ "0.9.2", tag="v0.9.2", commit="b842516d12640e4a0d9433a18c7249440ef6fc3d", submodules=True
+ )
+
+ version(
"0.9.1", tag="v0.9.1", commit="027a2fe184f65a4923817a8cdfed0b0c61c2c75a", submodules=True
)
@@ -86,6 +90,10 @@ class Ascent(CMakePackage, CudaPackage):
"0.6.0", tag="v0.6.0", commit="9ade37b0a9ea495e45adb25cda7498c0bf9465c5", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
###########################################################################
# package variants
###########################################################################
@@ -155,6 +163,7 @@ class Ascent(CMakePackage, CudaPackage):
depends_on("conduit@:0.7.2", when="@:0.7.1")
depends_on("conduit@0.8.2:", when="@0.8:")
depends_on("conduit@0.8.6:", when="@0.9:")
+ depends_on("conduit@0.9.1:", when="@0.9.3:")
depends_on("conduit+python", when="+python")
depends_on("conduit~python", when="~python")
depends_on("conduit+mpi", when="+mpi")
@@ -183,9 +192,18 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# RAJA and Umpire
+ # Note: Let RAJA/Umpire handle the Camp version constraints
#######################
- depends_on("raja", when="+raja")
- depends_on("umpire", when="+umpire")
+ with when("+raja"):
+ depends_on("raja")
+ depends_on("raja@2024.02.1:2024.02.99", when="@0.9.3:")
+ depends_on("raja+openmp", when="+openmp")
+ depends_on("raja~openmp", when="~openmp")
+
+ with when("+umpire"):
+ depends_on("umpire")
+ depends_on("umpire@:2023.06.0", when="@:0.9.2")
+ depends_on("umpire@2024.02.1:2024.02.99", when="@0.9.3:")
#######################
# BabelFlow
@@ -196,37 +214,44 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# VTK-m
#######################
- depends_on("vtk-m@2.0:", when="@0.9.2: +vtkh")
- depends_on("vtk-m@1.9:1.9", when="@0.9.0: +vtkh")
-
- depends_on("vtk-m~tbb", when="@0.9.0: +vtkh")
- depends_on("vtk-m+openmp", when="@0.9.0: +vtkh+openmp")
- depends_on("vtk-m~openmp", when="@0.9.0: +vtkh~openmp")
- depends_on("vtk-m~cuda", when="@0.9.0: +vtkh~cuda")
- depends_on("vtk-m+cuda", when="@0.9.0: +vtkh+cuda")
- depends_on("vtk-m+fpic", when="@0.8.0: +vtkh")
- depends_on("vtk-m~shared+fpic", when="@0.8.0: +vtkh~shared")
- # Ascent defaults to C++11
- depends_on("kokkos cxxstd=11", when="+vtkh ^vtk-m +kokkos")
+ with when("+vtkh"):
+ depends_on("vtk-m +doubleprecision ~64bitids")
+ depends_on("vtk-m@2.1:", when="@0.9.3:")
+ depends_on("vtk-m@2.0:", when="@0.9.2:")
+ # 2.1 support needs commit e52b7bb8c9fd131f2fd49edf58037cc5ef77a166
+ depends_on("vtk-m@:2.0", when="@:0.9.2")
+ depends_on("vtk-m@1.9", when="@0.9.0:0.9.1")
+
+ depends_on("vtk-m~tbb", when="@0.9.0:")
+ depends_on("vtk-m+openmp", when="@0.9.0: +openmp")
+ depends_on("vtk-m~openmp", when="@0.9.0: ~openmp")
+ depends_on("vtk-m~cuda", when="@0.9.0: ~cuda")
+ depends_on("vtk-m+cuda", when="@0.9.0: +cuda")
+ depends_on("vtk-m+fpic", when="@0.8.0:")
+ depends_on("vtk-m~shared+fpic", when="@0.8.0: ~shared")
+ # Ascent defaults to C++11
+ depends_on("kokkos cxxstd=11", when="+vtkh ^vtk-m +kokkos")
+ depends_on("kokkos@3.7.02", when="@0.9.3: +vtkh ^vtk-m +kokkos")
+
+ #######################
+ # VTK-h
+ #######################
+ # Ascent 0.9.0 includes VTK-h, prior to 0.9.0
+ # VTK-h was developed externally
+ depends_on("vtk-h@:0.7", when="@:0.7")
+ depends_on("vtk-h@0.8.1:", when="@0.8:0.8")
+ # propagate relevant variants to vtk-h
+ depends_on("vtk-h+openmp", when="@:0.8.0 +openmp")
+ depends_on("vtk-h~openmp", when="@:0.8.0 ~openmp")
+ depends_on("vtk-h+cuda", when="@:0.8.0 +cuda")
+ depends_on("vtk-h~cuda", when="@:0.8.0 ~cuda")
+ depends_on("vtk-h+shared", when="@:0.8.0 +shared")
+ depends_on("vtk-h~shared", when="@:0.8.0 ~shared")
+ # When using VTK-h ascent also needs VTK-m
+ depends_on("vtk-m@:1.7", when="@:0.8.0")
+ depends_on("vtk-m+testlib", when="@:0.8.0 +test")
- #######################
- # VTK-h
- #######################
- # Ascent 0.9.0 includes VTK-h, prior to 0.9.0
- # VTK-h was developed externally
- depends_on("vtk-h@:0.7", when="@:0.7 +vtkh")
- depends_on("vtk-h@0.8.1:", when="@0.8:0.8 +vtkh")
- # propagate relevent variants to vtk-h
- depends_on("vtk-h+openmp", when="@:0.8.0 +vtkh+openmp")
- depends_on("vtk-h~openmp", when="@:0.8.0 +vtkh~openmp")
- depends_on("vtk-h+cuda", when="@:0.8.0 +vtkh+cuda")
- depends_on("vtk-h~cuda", when="@:0.8.0 +vtkh~cuda")
propagate_cuda_arch("vtk-h", "@:0.8.0 +vtkh")
- depends_on("vtk-h+shared", when="@:0.8.0 +vtkh+shared")
- depends_on("vtk-h~shared", when="@:0.8.0 +vtkh~shared")
- # When using VTK-h ascent also needs VTK-m
- depends_on("vtk-m@:1.7", when="@:0.8.0 +vtkh")
- depends_on("vtk-m+testlib", when="@:0.8.0 +vtkh+test^vtk-m")
# mfem
depends_on("mfem~threadsafe~openmp+conduit", when="+mfem")
@@ -372,7 +397,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
c_compiler = env["SPACK_CC"]
cpp_compiler = env["SPACK_CXX"]
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
f_compiler = env["SPACK_FC"]
else:
f_compiler = None
@@ -390,7 +415,7 @@ class Ascent(CMakePackage, CudaPackage):
# Find and record what CMake is used
##############################################
- if "+cmake" in spec:
+ if spec.satisfies("+cmake"):
cmake_exe = spec["cmake"].command.path
else:
cmake_exe = which("cmake")
@@ -425,14 +450,14 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
cfg.write("# fortran compiler used by spack\n")
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", f_compiler))
else:
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
# shared vs static libs
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
@@ -457,7 +482,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# Unit Tests
#######################
- if "+test" in spec:
+ if spec.satisfies("+test"):
cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_TESTS", "OFF"))
@@ -487,7 +512,7 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write("# Enable python module builds\n")
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "ON"))
cfg.write("# python from spack \n")
- cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE", spec["python"].command.path))
+ cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE", python.path))
try:
cfg.write("# python module install dir\n")
cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX", python_platlib))
@@ -510,7 +535,7 @@ class Ascent(CMakePackage, CudaPackage):
# Serial
#######################
- if "+serial" in spec:
+ if spec.satisfies("+serial"):
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF"))
@@ -521,7 +546,7 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write("# MPI Support\n")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
mpifc_path = spec["mpi"].mpifc if "+fortran" in spec else None
@@ -536,7 +561,7 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path))
mpiexe_bin = join_path(spec["mpi"].prefix.bin, "mpiexec")
if os.path.isfile(mpiexe_bin):
@@ -547,14 +572,14 @@ class Ascent(CMakePackage, CudaPackage):
else:
cfg.write(cmake_cache_entry("MPIEXEC", mpiexe_bin))
- if "+blt_find_mpi" in spec:
+ if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))
###################################
# BABELFLOW (also depends on mpi)
###################################
- if "+babelflow" in spec:
+ if spec.satisfies("+babelflow"):
cfg.write(cmake_cache_entry("ENABLE_BABELFLOW", "ON"))
cfg.write(cmake_cache_entry("BabelFlow_DIR", spec["babelflow"].prefix))
cfg.write(cmake_cache_entry("PMT_DIR", spec["parallelmergetree"].prefix))
@@ -567,12 +592,12 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write("# CUDA Support\n")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cfg.write(cmake_cache_entry("ENABLE_CUDA", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_CUDA", "OFF"))
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF"))
@@ -582,7 +607,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
cfg.write("# vtk-h support \n")
- if "+vtkh" in spec:
+ if spec.satisfies("+vtkh"):
cfg.write("# vtk-h\n")
if self.spec.satisfies("@0.8.1:"):
cfg.write(cmake_cache_entry("ENABLE_VTKH", "ON"))
@@ -592,7 +617,7 @@ class Ascent(CMakePackage, CudaPackage):
cfg.write("# vtk-m from spack\n")
cfg.write(cmake_cache_entry("VTKM_DIR", spec["vtk-m"].prefix))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cfg.write(cmake_cache_entry("VTKm_ENABLE_CUDA", "ON"))
cfg.write(cmake_cache_entry("CMAKE_CUDA_HOST_COMPILER", env["SPACK_CXX"]))
else:
@@ -608,7 +633,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# RAJA
#######################
- if "+raja" in spec:
+ if spec.satisfies("+raja"):
cfg.write("# RAJA from spack \n")
cfg.write(cmake_cache_entry("RAJA_DIR", spec["raja"].prefix))
else:
@@ -617,7 +642,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# Umpire
#######################
- if "+umpire" in spec:
+ if spec.satisfies("+umpire"):
cfg.write("# umpire from spack \n")
cfg.write(cmake_cache_entry("UMPIRE_DIR", spec["umpire"].prefix))
else:
@@ -635,7 +660,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# MFEM
#######################
- if "+mfem" in spec:
+ if spec.satisfies("+mfem"):
cfg.write("# mfem from spack \n")
cfg.write(cmake_cache_entry("MFEM_DIR", spec["mfem"].prefix))
else:
@@ -644,7 +669,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# OCCA
#######################
- if "+occa" in spec:
+ if spec.satisfies("+occa"):
cfg.write("# occa from spack \n")
cfg.write(cmake_cache_entry("OCCA_DIR", spec["occa"].prefix))
else:
@@ -653,7 +678,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
# Devil Ray
#######################
- if "+dray" in spec:
+ if spec.satisfies("+dray"):
cfg.write("# devil ray\n")
if self.spec.satisfies("@0.8.1:"):
cfg.write(cmake_cache_entry("ENABLE_DRAY", "ON"))
@@ -674,7 +699,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
cfg.write("# adios2 support\n")
- if "+adios2" in spec:
+ if spec.satisfies("+adios2"):
cfg.write(cmake_cache_entry("ADIOS2_DIR", spec["adios2"].prefix))
else:
cfg.write("# adios2 not built by spack \n")
@@ -684,7 +709,7 @@ class Ascent(CMakePackage, CudaPackage):
#######################
cfg.write("# Fides support\n")
- if "+fides" in spec:
+ if spec.satisfies("+fides"):
cfg.write(cmake_cache_entry("FIDES_DIR", spec["fides"].prefix))
else:
cfg.write("# fides not built by spack \n")
@@ -693,7 +718,7 @@ class Ascent(CMakePackage, CudaPackage):
# Caliper
#######################
cfg.write("# caliper from spack \n")
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
cfg.write(cmake_cache_entry("CALIPER_DIR", spec["caliper"].prefix))
cfg.write(cmake_cache_entry("ADIAK_DIR", spec["adiak"].prefix))
else:
diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py
index 2492052f57..80f8e6bd97 100644
--- a/var/spack/repos/builtin/packages/asciidoc/package.py
+++ b/var/spack/repos/builtin/packages/asciidoc/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Asciidoc(AutotoolsPackage):
+class Asciidoc(AutotoolsPackage, PythonPackage):
"""A presentable text document format for writing articles, UNIX man
pages and other small to medium sized documents."""
@@ -17,7 +17,14 @@ class Asciidoc(AutotoolsPackage):
license("GPL-2.0-only", checked_by="tgamblin")
+ build_system(
+ conditional("autotools", when="@:9"),
+ conditional("python_pip", when="@10:"),
+ default="python_pip",
+ )
+
version("master", branch="master")
+ version("10.2.0", sha256="684ea53c1f5b71d6d1ac6086bbc96906b1f709ecc7ab536615b0f0c9e1baa3cc")
version("9.1.0", sha256="5056c20157349f8dc74f005b6e88ccbf1078c4e26068876f13ca3d1d7d045fe7")
version("9.0.5", sha256="edc8328c3682a8568172656f6fc309b189f65219a49517966c7ea144cb25f8b2")
version("9.0.4", sha256="fb0e683ae6a4baf34a8969c3af764ca729526196576729ee9275b9f39fd8b79c")
@@ -30,6 +37,9 @@ class Asciidoc(AutotoolsPackage):
depends_on("docbook-xml", type=("build", "run"))
depends_on("docbook-xsl", type=("build", "run"))
depends_on("python@3.5:", type=("build", "run"))
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
+ with when("build_system=python_pip"):
+ depends_on("py-setuptools", type="build")
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/asdcplib/package.py b/var/spack/repos/builtin/packages/asdcplib/package.py
index d0c37005d1..1379229232 100644
--- a/var/spack/repos/builtin/packages/asdcplib/package.py
+++ b/var/spack/repos/builtin/packages/asdcplib/package.py
@@ -20,6 +20,9 @@ class Asdcplib(AutotoolsPackage):
version("2_10_33", sha256="16fafb5da3d46b0f44570ef9780c85dd82cca60106a9e005e538809ea1a95373")
version("2_10_32", sha256="fe5123c49980ee3fa25dea876286f2ac974d203bfcc6c77fc288a59025dee3ee")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/asdf-cxx/package.py b/var/spack/repos/builtin/packages/asdf-cxx/package.py
index b2d15a9814..069d3c7635 100644
--- a/var/spack/repos/builtin/packages/asdf-cxx/package.py
+++ b/var/spack/repos/builtin/packages/asdf-cxx/package.py
@@ -38,6 +38,8 @@ class AsdfCxx(CMakePackage):
version("1.1.0", sha256="3e23b9cd16254f5adbf878145e320f56b4d3ad75de23d2c761eb7f04150926c5")
version("1.0.0", sha256="0b63594a1dec27cc85d25adbf900b6e936b5015f579b9b892b983151bec96775")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Enable Python support")
depends_on("bzip2")
diff --git a/var/spack/repos/builtin/packages/asio/package.py b/var/spack/repos/builtin/packages/asio/package.py
index c3b52d02cc..c5e89f5b03 100644
--- a/var/spack/repos/builtin/packages/asio/package.py
+++ b/var/spack/repos/builtin/packages/asio/package.py
@@ -19,6 +19,11 @@ class Asio(AutotoolsPackage):
license("BSL-1.0")
# As uneven minor versions of asio are not considered stable, they wont be added anymore
+ version("1.30.2", sha256="755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8")
+ version("1.30.1", sha256="94b121cc2016680f2314ef58eadf169c2d34fff97fba01df325a192d502d3a58")
+ version("1.30.0", sha256="df6674bd790842b3a7422e9cc4c5d3212ac268cebdb5d38f3e783e4918313c7b")
+ version("1.28.2", sha256="5705a0e403017eba276625107160498518838064a6dd7fd8b00b2e30c0ffbdee")
+ version("1.28.1", sha256="5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce")
version("1.28.0", sha256="226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328")
version("1.26.0", sha256="935583f86825b7b212479277d03543e0f419a55677fa8cb73a79a927b858a72d")
version("1.24.0", sha256="cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5b")
@@ -57,6 +62,9 @@ class Asio(AutotoolsPackage):
version("1.16.1", sha256="e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35")
version("1.16.0", sha256="c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("m4", type="build")
@@ -83,13 +91,11 @@ class Asio(AutotoolsPackage):
variant("separate_compilation", default=False, description="Compile Asio sources separately")
variant("boost_coroutine", default=False, description="Enable support for Boost.Coroutine.")
- depends_on("boost +context +coroutine", when="+boost_coroutine")
-
variant("boost_regex", default=False, description="Enable support for Boost.Regex.")
- depends_on("boost +regex", when="+boost_regex")
for std in stds:
- depends_on("boost cxxstd=" + std, when="cxxstd={0} ^boost".format(std))
+ depends_on(f"boost +regex cxxstd={std}", when=f"cxxstd={std} +boost_regex")
+ depends_on(f"boost +context+coroutine cxxstd={std}", when=f"cxxstd={std} +boost_coroutine")
def configure_args(self):
variants = self.spec.variants
diff --git a/var/spack/repos/builtin/packages/aspa/package.py b/var/spack/repos/builtin/packages/aspa/package.py
index 2356a09bd6..0e56447380 100644
--- a/var/spack/repos/builtin/packages/aspa/package.py
+++ b/var/spack/repos/builtin/packages/aspa/package.py
@@ -21,6 +21,8 @@ class Aspa(MakefilePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI Support")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/aspcud/package.py b/var/spack/repos/builtin/packages/aspcud/package.py
index fcd2675ac3..6d6d50546a 100644
--- a/var/spack/repos/builtin/packages/aspcud/package.py
+++ b/var/spack/repos/builtin/packages/aspcud/package.py
@@ -24,6 +24,9 @@ class Aspcud(CMakePackage):
version("1.9.5", sha256="9cd3a9490d377163d87b16fa1a10cc7254bc2dbb9f60e846961ac8233f3835cf")
version("1.9.4", sha256="3645f08b079e1cc80e24cd2d7ae5172a52476d84e3ec5e6a6c0034492a6ea885")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.74:+exception+serialization+container", type=("build"), when="@1.9.5:")
depends_on("cmake", type=("build"))
depends_on("re2c", type=("build"))
diff --git a/var/spack/repos/builtin/packages/aspect/package.py b/var/spack/repos/builtin/packages/aspect/package.py
index 914869a2e5..1f62749873 100644
--- a/var/spack/repos/builtin/packages/aspect/package.py
+++ b/var/spack/repos/builtin/packages/aspect/package.py
@@ -25,6 +25,10 @@ class Aspect(CMakePackage):
version("2.0.1", sha256="0bf5600c42afce9d39c1d285b0654ecfdeb0f30e9f3421651c95f54ca01ac165")
version("2.0.0", sha256="d485c07f54248e824bdfa35f3eec8971b65e8b7114552ffa2c771bc0dede8cc0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/aspell/package.py b/var/spack/repos/builtin/packages/aspell/package.py
index 2cda1b9ac0..75f1b2aef5 100644
--- a/var/spack/repos/builtin/packages/aspell/package.py
+++ b/var/spack/repos/builtin/packages/aspell/package.py
@@ -18,8 +18,21 @@ class Aspell(AutotoolsPackage, GNUMirrorPackage):
license("LGPL-2.1-or-later")
+ version("0.60.8.1", sha256="d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b")
version("0.60.8", sha256="f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2")
version("0.60.6.1", sha256="f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("fix_cpp.patch")
patch("issue-519.patch", when="@:0.60.6.1")
+
+ # workaround due to https://github.com/GNUAspell/aspell/issues/591
+ @run_after("configure", when="@0.60.8:")
+ def make_missing_files(self):
+ make("gen/dirs.h")
+ make("gen/static_filters.src.cpp")
+
+ def setup_run_environment(self, env):
+ env.set("ASPELL_CONF", f"prefix {self.prefix}")
diff --git a/var/spack/repos/builtin/packages/aspell6-de/package.py b/var/spack/repos/builtin/packages/aspell6-de/package.py
index 4bb759b519..3714c69653 100644
--- a/var/spack/repos/builtin/packages/aspell6-de/package.py
+++ b/var/spack/repos/builtin/packages/aspell6-de/package.py
@@ -15,6 +15,10 @@ class Aspell6De(AspellDictPackage, GNUMirrorPackage):
license("GPL-2.0-or-later")
version(
+ "6-de-20161207-7-0",
+ sha256="c2125d1fafb1d4effbe6c88d4e9127db59da9ed92639c7cbaeae1b7337655571",
+ )
+ version(
"6-de-20030222-1",
sha256="ba6c94e11bc2e0e6e43ce0f7822c5bba5ca5ac77129ef90c190b33632416e906",
)
diff --git a/var/spack/repos/builtin/packages/aspell6-en/package.py b/var/spack/repos/builtin/packages/aspell6-en/package.py
index afd3bdbfb6..34b018b776 100644
--- a/var/spack/repos/builtin/packages/aspell6-en/package.py
+++ b/var/spack/repos/builtin/packages/aspell6-en/package.py
@@ -13,5 +13,8 @@ class Aspell6En(AspellDictPackage, GNUMirrorPackage):
gnu_mirror_path = "aspell/dict/en/aspell6-en-2017.01.22-0.tar.bz2"
version(
+ "2020.12.07-0", sha256="4c8f734a28a088b88bb6481fcf972d0b2c3dc8da944f7673283ce487eac49fb3"
+ )
+ version(
"2017.01.22-0", sha256="93c73fae3eab5ea3ca6db3cea8770715a820f1b7d6ea2b932dd66a17f8fd55e1"
)
diff --git a/var/spack/repos/builtin/packages/assimp/package.py b/var/spack/repos/builtin/packages/assimp/package.py
index d8eb67bc57..ec8f239e4c 100644
--- a/var/spack/repos/builtin/packages/assimp/package.py
+++ b/var/spack/repos/builtin/packages/assimp/package.py
@@ -16,9 +16,12 @@ class Assimp(CMakePackage):
maintainers("wdconinc")
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
version("master", branch="master")
+ version("5.4.3", sha256="66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb")
+ version("5.4.2", sha256="7414861a7b038e407b510e8b8c9e58d5bf8ca76c9dfe07a01d20af388ec5086a")
+ version("5.4.0", sha256="a90f77b0269addb2f381b00c09ad47710f2aab6b1d904f5e9a29953c30104d3f")
version("5.3.1", sha256="a07666be71afe1ad4bc008c2336b7c688aca391271188eb9108d0c6db1be53f1")
version("5.2.5", sha256="b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a")
version("5.2.4", sha256="6a4ff75dc727821f75ef529cea1c4fc0a7b5fc2e0a0b2ff2f6b7993fe6cb54ba")
@@ -38,6 +41,12 @@ class Assimp(CMakePackage):
variant("shared", default=True, description="Enables the build of shared libraries")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.10:", type="build", when="@5.1:")
+ depends_on("cmake@3.22:", type="build", when="@5.4:")
+
depends_on("pkgconfig", type="build")
depends_on("zlib-api")
@@ -46,10 +55,10 @@ class Assimp(CMakePackage):
def cmake_args(self):
args = [
- "-DASSIMP_HUNTER_ENABLED=OFF",
- "-DASSIMP_BUILD_ZLIB=OFF",
- "-DASSIMP_BUILD_MINIZIP=OFF",
- "-DASSIMP_BUILD_TESTS=OFF",
+ self.define("ASSIMP_HUNTER_ENABLED", False),
+ self.define("ASSIMP_BUILD_ZLIB", False),
+ self.define("ASSIMP_BUILD_MINIZIP", False),
+ self.define("ASSIMP_BUILD_TESTS", self.run_tests),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
]
return args
@@ -59,3 +68,12 @@ class Assimp(CMakePackage):
if name == "cxxflags":
flags.append(self.compiler.cxx11_flag)
return (None, None, flags)
+
+ def check(self):
+ unit = Executable(join_path(self.build_directory, "bin", "unit"))
+ skipped_tests = [
+ "AssimpAPITest_aiMatrix3x3.aiMatrix3FromToTest",
+ "AssimpAPITest_aiMatrix4x4.aiMatrix4FromToTest",
+ "AssimpAPITest_aiQuaternion.aiQuaternionFromNormalizedQuaternionTest",
+ ]
+ unit(f"--gtest_filter=-{':'.join(skipped_tests)}")
diff --git a/var/spack/repos/builtin/packages/astral/package.py b/var/spack/repos/builtin/packages/astral/package.py
index 4a06d3658a..a430bda03c 100644
--- a/var/spack/repos/builtin/packages/astral/package.py
+++ b/var/spack/repos/builtin/packages/astral/package.py
@@ -25,7 +25,7 @@ class Astral(Package):
)
version("4.10.7", sha256="314b49e0129ec06a7c78a1b60d590259ede6a5e75253407031e108d8048fcc79")
- depends_on("java", type=("build", "run"))
+ depends_on("java@11", type=("build", "run"))
depends_on("zip", type="build")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py
index 8c0e6a11cc..ca55f48483 100644
--- a/var/spack/repos/builtin/packages/astyle/package.py
+++ b/var/spack/repos/builtin/packages/astyle/package.py
@@ -3,34 +3,57 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import makefile
from spack.package import *
-class Astyle(MakefilePackage):
+class Astyle(CMakePackage, MakefilePackage):
"""A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI,
Objective-C, C#, and Java Source Code.
"""
- homepage = "http://astyle.sourceforge.net/"
- url = "https://sourceforge.net/projects/astyle/files/astyle/astyle%203.0.1/astyle_3.0.1_linux.tar.gz"
- # Gentoo alternative
- # url = "https://distfiles.gentoo.org/distfiles/astyle_3.0.1_linux.tar.gz"
+ homepage = "https://astyle.sourceforge.net/"
+ url = "https://sourceforge.net/projects/astyle/files/astyle/astyle%204.1.11/astyle-4.1.11.tar.bz2"
+ list_url = "https://sourceforge.net/projects/astyle/files/astyle"
+ list_depth = 1
+
+ maintainers("cessenat")
license("MIT")
+ version("3.4.11", sha256="15b22bc6cbc038ccd8cef3804efec02f35c6f2538b75c93bc7f76e4de98aba92")
+ version("3.3.1", sha256="246979db8ba82948d2925f823293321617e4a51dcac8719b370b670782e9c57d")
+ version("3.2.1", sha256="191576fbd1f4abe55a25769c176da78294ec590f96f27037a4746bda0f84fe60")
version("3.1", sha256="cbcc4cf996294534bb56f025d6f199ebfde81aa4c271ccbd5ee1c1a3192745d7")
version("3.0.1", sha256="6c3ab029e0e4a75e2e603d449014374aa8269218fdd03a4aaa46ab743b1912fd")
version("2.06", sha256="3b7212210dc139e8f648e004b758c0be1b3ceb1694b22a879202d2b833db7c7e")
version("2.05.1", sha256="fbdfc6f1966a972d19a215927266c76d4183eee235ed1e2bd7ec551c2a270eac")
version("2.04", sha256="70b37f4853c418d1e2632612967eebf1bdb93dfbe558c51d7d013c9b4e116b60")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.8.0:", type="build", when="@3.2.0:")
+
+ build_system(conditional("cmake", when="@3.2.0:"), "makefile", default="cmake")
+
parallel = False
+ conflicts("%oneapi", when="@:3.1.99")
+
+ def url_for_version(self, version):
+ root = self.url.rsplit("/", 2)[0]
+ url = f"{root}/astyle%20{version.up_to(2)}/astyle-{version}.tar.bz2"
+ if version < Version("3.2.0"):
+ url = f"{root}/astyle%20{version.up_to(2)}/astyle_{version}_linux.tar.gz"
+ return url
+
+
+class MakefileBuilder(makefile.MakefileBuilder):
@property
def build_directory(self):
- return join_path(self.stage.source_path, "build", self.compiler.name)
+ return join_path(self.stage.source_path, "build", self.pkg.compiler.name)
- def edit(self, spec, prefix):
+ def edit(self, pkg, spec, prefix):
makefile = join_path(self.build_directory, "Makefile")
filter_file(r"^CXX\s*=.*", f"CXX={spack_cxx}", makefile)
# If the group is not a user account, the installation will fail,
diff --git a/var/spack/repos/builtin/packages/at-spi2-atk/package.py b/var/spack/repos/builtin/packages/at-spi2-atk/package.py
index 5d42147758..584d008a5d 100644
--- a/var/spack/repos/builtin/packages/at-spi2-atk/package.py
+++ b/var/spack/repos/builtin/packages/at-spi2-atk/package.py
@@ -22,8 +22,10 @@ class AtSpi2Atk(MesonPackage):
version("2.26.2", sha256="61891f0abae1689f6617a963105a3f1dcdab5970c4a36ded9c79a7a544b16a6e")
version("2.26.1", sha256="b4f0c27b61dbffba7a5b5ba2ff88c8cee10ff8dac774fa5b79ce906853623b75")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
- depends_on("at-spi2-core@2.28.0:")
+ depends_on("at-spi2-core@2.28.0:2.45.1")
depends_on("atk@2.28.1:")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/at-spi2-core/package.py b/var/spack/repos/builtin/packages/at-spi2-core/package.py
index 911e05085a..e779c0003f 100644
--- a/var/spack/repos/builtin/packages/at-spi2-core/package.py
+++ b/var/spack/repos/builtin/packages/at-spi2-core/package.py
@@ -18,6 +18,9 @@ class AtSpi2Core(MesonPackage):
license("LGPL-2.1-or-later")
+ version("2.54.0", sha256="d7eee7e75beddcc272cedc2b60535600f3aae6e481589ebc667afc437c0a6079")
+ version("2.52.0", sha256="0ac3fc8320c8d01fa147c272ba7fa03806389c6b03d3c406d0823e30e35ff5ab")
+ version("2.51.91", sha256="1344bd5c1732b55fcf3df9e3b87569f60984ae83ce75881b5a057c69f8d73e34")
version("2.48.3", sha256="37316df43ca9989ce539d54cf429a768c28bb38a0b34950beadd0421827edf55")
version("2.48.0", sha256="905a5b6f1790b68ee803bffa9f5fab4ceb591fb4fae0b2f8c612c54f1d4e8a30")
version("2.47.90", sha256="71189c21af7bd084a12ab85b229c2d798936470b12fb0c3f177e37181fb6c00c")
@@ -26,9 +29,13 @@ class AtSpi2Core(MesonPackage):
version("2.36.0", sha256="88da57de0a7e3c60bc341a974a80fdba091612db3547c410d6deab039ca5c05a")
version("2.28.0", sha256="42a2487ab11ce43c288e73b2668ef8b1ab40a0e2b4f94e80fca04ad27b6f1c87")
+ depends_on("c", type="build") # generated
+
depends_on("meson@0.46.0:", type="build")
depends_on("glib@2.56.1:")
+ depends_on("glib@2.68.1:", when="@2.51.91:")
depends_on("dbus@1.12.8:")
+ depends_on("dbus@1.12.20:", when="@2.51.91:")
depends_on("gettext")
depends_on("libx11")
depends_on("libxi")
@@ -39,6 +46,7 @@ class AtSpi2Core(MesonPackage):
depends_on("pkgconfig", type="build")
depends_on("python", type="build")
depends_on("gobject-introspection")
+ depends_on("gobject-introspection@1.68.0:", when="@2.51.91:")
@when("@2.40.1:")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/atf/package.py b/var/spack/repos/builtin/packages/atf/package.py
index a0916aec82..979211cab3 100644
--- a/var/spack/repos/builtin/packages/atf/package.py
+++ b/var/spack/repos/builtin/packages/atf/package.py
@@ -19,6 +19,9 @@ class Atf(AutotoolsPackage):
version("0.20", sha256="3677cf957d7f574835b8bdd385984ba928d5695b3ff28f958e4227f810483ab7")
version("0.19", sha256="f9b1d76dad7c34ae61a75638edc517fc05b10fa4c8f97b1d13d739bffee79b16")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/athena/package.py b/var/spack/repos/builtin/packages/athena/package.py
index cf4da42d09..dad789c8da 100644
--- a/var/spack/repos/builtin/packages/athena/package.py
+++ b/var/spack/repos/builtin/packages/athena/package.py
@@ -18,6 +18,8 @@ class Athena(AutotoolsPackage):
version("master", branch="master")
version("4.2", sha256="6334848d7f1325aa44859418feac8ce223b56793ae8907103000af5b27f50e7e")
+ depends_on("c", type="build") # generated
+
# PHYSICS "packages":
variant(
"problem",
@@ -183,7 +185,7 @@ class Athena(AutotoolsPackage):
env.set("OPT", "-O3")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env.set("CC", spec["mpi"].mpicc)
env.set("LDR", spec["mpi"].mpicc)
env.set("MPILIB", spec["mpi"].libs.ld_flags)
@@ -192,7 +194,7 @@ class Athena(AutotoolsPackage):
env.set("CC", spack_cc)
env.set("LDR", spack_cc)
- if "+fft" in spec:
+ if spec.satisfies("+fft"):
env.set("FFTWLIB", spec["fftw"].libs.ld_flags)
env.set("FFTWINC", spec["fftw"].headers.include_flags)
@@ -200,82 +202,82 @@ class Athena(AutotoolsPackage):
spec = self.spec
args = []
- if "+conduction" in spec:
+ if spec.satisfies("+conduction"):
args.append("--enable-conduction")
else:
args.append("--disable-conduction")
- if "+resistivity" in spec:
+ if spec.satisfies("+resistivity"):
args.append("--enable-resistivity")
else:
args.append("--disable-resistivity")
- if "+special_relativity" in spec:
+ if spec.satisfies("+special_relativity"):
args.append("--enable-special-relativity")
else:
args.append("--disable-special-relativity")
- if "+viscosity" in spec:
+ if spec.satisfies("+viscosity"):
args.append("--enable-viscosity")
else:
args.append("--disable-viscosity")
- if "+single" in spec:
+ if spec.satisfies("+single"):
args.append("--enable-single")
else:
args.append("--disable-single")
- if "+ghost" in spec:
+ if spec.satisfies("+ghost"):
args.append("--enable-ghost")
else:
args.append("--disable-ghost")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append("--enable-mpi")
else:
args.append("--disable-mpi")
- if "+h_correction" in spec:
+ if spec.satisfies("+h_correction"):
args.append("--enable-h-correction")
else:
args.append("--disable-h-correction")
- if "+fft" in spec:
+ if spec.satisfies("+fft"):
args.append("--enable-fft")
else:
args.append("--disable-fft")
- if "+shearing_box" in spec:
+ if spec.satisfies("+shearing_box"):
args.append("--enable-shearing-box")
else:
args.append("--disable-shearing-box")
- if "+fargo" in spec:
+ if spec.satisfies("+fargo"):
args.append("--enable-fargo")
else:
args.append("--disable-fargo")
- if "+sts" in spec:
+ if spec.satisfies("+sts"):
args.append("--enable-sts")
else:
args.append("--disable-sts")
- if "+smr" in spec:
+ if spec.satisfies("+smr"):
args.append("--enable-smr")
else:
args.append("--disable-smr")
- if "+fofc" in spec:
+ if spec.satisfies("+fofc"):
args.append("--enable-fofc")
else:
args.append("--disable-fofc")
- if "+rotating_frame" in spec:
+ if spec.satisfies("+rotating_frame"):
args.append("--enable-rotating_frame")
else:
args.append("--disable-rotating_frame")
- if "+l1_inflow" in spec:
+ if spec.satisfies("+l1_inflow"):
args.append("--enable-l1_inflow")
else:
args.append("--disable-l1_inflow")
diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py
index bcb6425b08..50fb042771 100644
--- a/var/spack/repos/builtin/packages/atk/package.py
+++ b/var/spack/repos/builtin/packages/atk/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Atk(Package):
+class Atk(MesonPackage):
"""ATK provides the set of accessibility interfaces that are
implemented by other toolkits and applications. Using the ATK
interfaces, accessibility tools have full access to view and
@@ -23,18 +23,10 @@ class Atk(Package):
version("2.36.0", sha256="fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788")
version("2.30.0", sha256="dd4d90d4217f2a0c1fee708a555596c2c19d26fef0952e1ead1938ab632c027b")
version("2.28.1", sha256="cd3a1ea6ecc268a2497f0cd018e970860de24a6d42086919d6bf6c8e8d53f4fc")
- version(
- "2.20.0",
- sha256="493a50f6c4a025f588d380a551ec277e070b28a82e63ef8e3c06b3ee7c1238f0",
- deprecated=True,
- )
- version(
- "2.14.0",
- sha256="2875cc0b32bfb173c066c22a337f79793e0c99d2cc5e81c4dac0d5a523b8fbad",
- deprecated=True,
- )
- depends_on("meson@0.40.1:", type="build", when="@2.28:")
+ depends_on("c", type="build")
+
+ depends_on("meson@0.40.1:", type="build")
depends_on("meson@0.46.0:", type="build", when="@2.29:")
depends_on("glib")
depends_on("gettext")
@@ -43,33 +35,15 @@ class Atk(Package):
depends_on("libffi")
def url_for_version(self, version):
- """Handle gnome's version-based custom URLs."""
- url = "http://ftp.gnome.org/pub/gnome/sources/atk"
- return url + f"/{version.up_to(2)}/atk-{version}.tar.xz"
+ return (
+ f"http://ftp.gnome.org/pub/gnome/sources/atk/"
+ f"{version.up_to(2)}/atk-{version}.tar.xz"
+ )
def setup_run_environment(self, env):
- env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
-
- def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
- def setup_dependent_run_environment(self, env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
-
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- meson("..", *std_meson_args)
- ninja("-v")
- ninja("install")
-
- @when("@:2.27")
- def install(self, spec, prefix):
- configure(f"--prefix={prefix}")
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py
index 89e65bc878..207f67c250 100644
--- a/var/spack/repos/builtin/packages/atlas/package.py
+++ b/var/spack/repos/builtin/packages/atlas/package.py
@@ -17,7 +17,7 @@ class Atlas(Package):
(BLAS), and a subset of the linear algebra routines in the LAPACK library.
"""
- homepage = "http://math-atlas.sourceforge.net/"
+ homepage = "https://math-atlas.sourceforge.net/"
license("Apache-2.0")
@@ -34,6 +34,9 @@ class Atlas(Package):
)
version("3.10.2", sha256="3aab139b118bf3fcdb4956fbd71676158d713ab0d3bccb2ae1dc3769db22102f")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# not all packages (e.g. Trilinos@12.6.3) stopped using deprecated in 3.6.0
# Lapack routines. Stick with 3.5.0 until this is fixed.
resource(
@@ -61,6 +64,12 @@ class Atlas(Package):
description="Number of threads to tune to, " "-1 for autodetect, 0 for no threading",
)
+ conflicts(
+ "platform=windows",
+ msg="Atlas requires cygwin to build on Windows, which is unsupported by Spack. "
+ "See https://math-atlas.sourceforge.net/atlas_install/node55.html",
+ )
+
provides("blas")
provides("lapack")
provides("lapack@3.6.1")
@@ -91,7 +100,7 @@ class Atlas(Package):
# https://github.com/macports/macports-ports/blob/master/math/atlas/Portfile
# https://github.com/Homebrew/homebrew-science/pull/3571
options = []
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
options.extend(["--shared"])
# TODO: for non GNU add '-Fa', 'alg', '-fPIC' ?
@@ -120,7 +129,7 @@ class Atlas(Package):
make("check")
make("ptcheck")
make("time")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
with working_dir("lib"):
make("shared_all")
@@ -134,7 +143,7 @@ class Atlas(Package):
# serial BLAS), and all ATLAS symbols needed to support them. Whereas
# libtatlas.[so,dylib,dll ] is parallel (multithreaded) version.
is_threaded = self.spec.satisfies("threads=pthreads")
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
to_find = ["libtatlas"] if is_threaded else ["libsatlas"]
shared = True
else:
diff --git a/var/spack/repos/builtin/packages/atmi/0001-Remove-relative-link-paths-to-external-libraries.patch b/var/spack/repos/builtin/packages/atmi/0001-Remove-relative-link-paths-to-external-libraries.patch
deleted file mode 100644
index 193cfab620..0000000000
--- a/var/spack/repos/builtin/packages/atmi/0001-Remove-relative-link-paths-to-external-libraries.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7445b29108ea2f0b3f28f947a1ca627575173292 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Fri, 7 Aug 2020 13:24:00 +0200
-Subject: [PATCH] Remove relative link paths to external libraries
-
----
- src/runtime/core/CMakeLists.txt | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/src/runtime/core/CMakeLists.txt b/src/runtime/core/CMakeLists.txt
-index 29abffb..f2cd4b4 100644
---- a/src/runtime/core/CMakeLists.txt
-+++ b/src/runtime/core/CMakeLists.txt
-@@ -109,12 +109,6 @@ target_link_libraries(
- ${amd_comgr_LIBRARIES}
- ${LIBELF_LIBRARIES}
- ${ROCM_LIBRARIES}
-- -L${ROCM_LIBRARIES_DIR}/../hsa/lib
-- -L${ROCM_LIBRARIES_DIR}
-- -Wl,--enable-new-dtags
-- -Wl,-rpath,\$ORIGIN
-- -Wl,-rpath,\$ORIGIN/../../hsa/lib
-- -Wl,-rpath,\$ORIGIN/../../lib
- )
-
- # set output dir for .h files
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/atmi/0002-Remove-usr-bin-rsync-reference.patch b/var/spack/repos/builtin/packages/atmi/0002-Remove-usr-bin-rsync-reference.patch
deleted file mode 100644
index e23687b3b7..0000000000
--- a/var/spack/repos/builtin/packages/atmi/0002-Remove-usr-bin-rsync-reference.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index ab4533a..9249de2 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -64,7 +64,7 @@ add_subdirectory(device_runtime)
- # make examples available in local build
- add_custom_command(
- OUTPUT examples
-- COMMAND /usr/bin/rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../examples .
-+ COMMAND rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../examples .
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../examples/*
- )
- add_custom_target(example ALL DEPENDS examples)
-@@ -72,7 +72,7 @@ add_custom_target(example ALL DEPENDS examples)
- # make bin available in local build
- add_custom_command(
- OUTPUT bin
-- COMMAND /usr/bin/rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../bin .
-+ COMMAND rsync -rl ${CMAKE_CURRENT_SOURCE_DIR}/../bin .
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../bin/*
- )
- add_custom_target(script ALL DEPENDS bin)
-diff --git a/src/device_runtime/CMakeLists.txt b/src/device_runtime/CMakeLists.txt
-index 20e15a8..333cb47 100644
---- a/src/device_runtime/CMakeLists.txt
-+++ b/src/device_runtime/CMakeLists.txt
-@@ -108,7 +108,7 @@ set (OUTPUT_INC_DIRECTORY ${ATMI_RUNTIME_PATH}/include)
- execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
- add_custom_command(
- OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
-- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../include/atmi_kl.h ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
-+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../include/atmi_kl.h ${OUTPUT_INC_DIRECTORY}/atmi_kl.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/*.h
- )
- add_custom_target(device_header ALL DEPENDS ${OUTPUT_INC_DIRECTORY}/atmi_kl.h)
-diff --git a/src/runtime/core/CMakeLists.txt b/src/runtime/core/CMakeLists.txt
-index 132a2f6..034a728 100644
---- a/src/runtime/core/CMakeLists.txt
-+++ b/src/runtime/core/CMakeLists.txt
-@@ -128,13 +128,13 @@ execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
-
- add_custom_command(
- OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi.h
-- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi.h ${OUTPUT_INC_DIRECTORY}/atmi.h
-+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi.h ${OUTPUT_INC_DIRECTORY}/atmi.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h
- )
-
- add_custom_command(
- OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
-- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi_runtime.h ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
-+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/atmi_runtime.h ${OUTPUT_INC_DIRECTORY}/atmi_runtime.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/*.h
- )
-
-diff --git a/src/runtime/interop/hsa/CMakeLists.txt b/src/runtime/interop/hsa/CMakeLists.txt
-index f868972..97d8ae8 100644
---- a/src/runtime/interop/hsa/CMakeLists.txt
-+++ b/src/runtime/interop/hsa/CMakeLists.txt
-@@ -22,7 +22,7 @@ execute_process(COMMAND "/bin/mkdir" "-p" "${OUTPUT_INC_DIRECTORY}")
-
- add_custom_command(
- OUTPUT ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
-- COMMAND /usr/bin/rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/atmi_interop_hsa.h ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
-+ COMMAND rsync ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/atmi_interop_hsa.h ${OUTPUT_INC_DIRECTORY}/atmi_interop_hsa.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/*.h
- )
-
diff --git a/var/spack/repos/builtin/packages/atmi/package.py b/var/spack/repos/builtin/packages/atmi/package.py
index 98fc5999f5..439f2c2779 100644
--- a/var/spack/repos/builtin/packages/atmi/package.py
+++ b/var/spack/repos/builtin/packages/atmi/package.py
@@ -13,9 +13,9 @@ class Atmi(CMakePackage):
consistent, declarative API to create task graphs on CPUs and GPUs
(integrated and discrete)."""
- homepage = "https://github.com/RadeonOpenCompute/atmi"
- git = "https://github.com/RadeonOpenCompute/atmi.git"
- url = "https://github.com/RadeonOpenCompute/atmi/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/atmi"
+ git = "https://github.com/ROCm/atmi.git"
+ url = "https://github.com/ROCm/atmi/archive/rocm-6.0.0.tar.gz"
tags = ["rocm"]
license("MIT")
@@ -23,130 +23,27 @@ class Atmi(CMakePackage):
maintainers("srekolam", "renjithravindrankannath")
version("5.5.1", sha256="6b3ee68433506315b55d093a4b47463916874fb6f3f602098eaff2ec283e69ab")
version("5.5.0", sha256="b8bfd32e5c386f5169da62172964343f9b7fad207e0e74dd1093c7acf06d9811")
- version("5.4.3", sha256="243aae6614e5bd136a099102957a6d65a01434b620291349613ad63701868ef8")
- version("5.4.0", sha256="b5cce10d7099fecbb40a0d9c2f29a7675315471fe145212b375e37e4c8ba5618")
- version("5.3.3", sha256="cc1144e4939cea2944f6c72a21406b9dc5b56d933696494074c280df7469834a")
- version("5.3.0", sha256="dffc0eb0bc1617843e7f728dbd6c8b12326c5c8baa34369aa267aab40f5deb6a")
- version("5.2.3", sha256="5f66c59e668cf968e86b556a0a52ee0202d1b370d8406e291a874cbfd200ee17")
- version("5.2.1", sha256="6b33445aa67444c038cd756f855a58a72dd35db57e7b63da37fe78a8585b982b")
- version("5.2.0", sha256="33e77905a607734157d46c736c924c7c50b6b13f2b2ddbf711cb08e37f2efa4f")
- version("5.1.3", sha256="a43448d77705b2b07e1758ffe8035aa6ba146abc2167984e8cb0f1615797b341")
- version("5.1.0", sha256="6a758f5a8332e6774cd8e14a4e5ce05e43b1e05298d817b4068c35fa1793d333")
- version(
- "5.0.2",
- sha256="3aea040f5a246539ab118f2183cf3e802a21e0e6215a53025eda77f382341747",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="208c1773170722b60b74357e264e698df5871e9d9d490d64011e6ea76750d9cf",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="c235cfb8bdd89deafecf9123264217b8cc5577a5469e3e1f24587fa820d0792e",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="64eeb0244cedae99db7dfdb365e0ad624106cc1090a531f94885ae81e254aabf",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="4497fa6d33547b946e2a51619f2777ec36e9cff1b07fd534eb8a5ef0d8e30650",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="1cbe0e9258ce7cce7b7ccc288335dffbac821ceb745c4f3fd48e2a258abada89",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="c1c89c00d2dc3e764c63b2e51ff7fd5c06d5881ed56aed0adf639582d3389585",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="b31849f86c79f90466a9d67f0a28a93c1675181e38e2a5f571ffc963e4b06f5f",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="8a2e5789ee7165aff0f0669eecd23ac0a5c8a5bfbc1acd9380fe9a8ed5bffe3a",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="387e87c622ec334d3ba7a2f4f015ea9a219712722f4c56c1ef572203d0d072ea",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="0a305e85bab210dd9a0410aa01d46227e00b59141e4675c50d731ad1232ab828",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="039f0c2b369d0dbc01000754893d9210828f4cb9b36c3e70da8c3819b131c933",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="8df08489a10ee04cea911811393e0e7d91bd437fc1fd81a23a4e7ab924a974f3",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="3fb57d2e583fab82bd0582d0c2bccff059ca91122c18ac49a7770a8bb041a37b",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="243aae6614e5bd136a099102957a6d65a01434b620291349613ad63701868ef8")
+ version("5.4.0", sha256="b5cce10d7099fecbb40a0d9c2f29a7675315471fe145212b375e37e4c8ba5618")
+ version("5.3.3", sha256="cc1144e4939cea2944f6c72a21406b9dc5b56d933696494074c280df7469834a")
+ version("5.3.0", sha256="dffc0eb0bc1617843e7f728dbd6c8b12326c5c8baa34369aa267aab40f5deb6a")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("rsync")
-
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- ]:
- depends_on("comgr@" + ver, type="link", when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver)
- depends_on("elf", type="link", when="@" + ver)
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
+ depends_on(f"comgr@{ver}", type="link", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", type="link", when=f"@{ver}")
+ depends_on("elf", type="link", when=f"@{ver}")
for ver in ["5.5.0", "5.5.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
root_cmakelists_dir = "src"
- patch("0001-Remove-relative-link-paths-to-external-libraries.patch", when="@3.5.0")
- # Removing direct reference to /usr/bin/rysnc for rsync command.
- patch("0002-Remove-usr-bin-rsync-reference.patch", when="@4.0.0:5.0.0")
- # Reset the installation path and remove direct reference to rsync.
- patch("0002-Remove-usr-bin-rsync-reference-5.2.0.patch", when="@5.0.2:5.2.0")
# Remove direct reference to /usr/bin/rsync path for rsync command
patch(
"0002-Remove-direct-reference-to-usr-bin-rysnc-for-rsync-cmd-5.2.1.patch", when="@5.2.1:"
diff --git a/var/spack/repos/builtin/packages/atompaw/package.py b/var/spack/repos/builtin/packages/atompaw/package.py
index 2028645bd8..cf062ef3ae 100644
--- a/var/spack/repos/builtin/packages/atompaw/package.py
+++ b/var/spack/repos/builtin/packages/atompaw/package.py
@@ -21,6 +21,7 @@ class Atompaw(AutotoolsPackage):
license("GPL-3.0-only")
+ version("4.2.0.3", sha256="9fd4f9b60e793eee10aead4296e89f0bd6e8612b729a15e2401bbd90e4e9dd2d")
version("4.2.0.2", sha256="c16648611f5798b8e1781fb2229854c54fa63f085bd11440fdc4ecacbf0ad93e")
version("4.2.0.1", sha256="d3476a5aa5f80f9430b81f28273c2c2a9b6e7d9c3d08c65544247bb76cd5a114")
version("4.2.0.0", sha256="9ab4f4ab78a720fbcd95bbbc1403e8ff348d15570e7c694932a56be15985e93d")
@@ -28,6 +29,10 @@ class Atompaw(AutotoolsPackage):
version("4.0.0.13", sha256="cbd73f11f3e9cc3ff2e5f3ec87498aeaf439555903d0b95a72f3b0a021902020")
version("3.1.0.3", sha256="15fe9a0369bdcc366370a0ecaa67e803ae54534b479ad63c4c7494a04fa3ea78")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("lapack")
depends_on("blas")
diff --git a/var/spack/repos/builtin/packages/atop/package.py b/var/spack/repos/builtin/packages/atop/package.py
index f87d6c0c6a..1136b5741b 100644
--- a/var/spack/repos/builtin/packages/atop/package.py
+++ b/var/spack/repos/builtin/packages/atop/package.py
@@ -20,6 +20,8 @@ class Atop(Package):
version("2.2.6", sha256="d0386840ee4df36e5d0ad55f144661b434d9ad35d94deadc0405b514485db615")
version("2.2-3", sha256="c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/attr/package.py b/var/spack/repos/builtin/packages/attr/package.py
index 3ab1244986..d865970849 100644
--- a/var/spack/repos/builtin/packages/attr/package.py
+++ b/var/spack/repos/builtin/packages/attr/package.py
@@ -18,6 +18,8 @@ class Attr(AutotoolsPackage):
version("2.4.47", sha256="25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859")
version("2.4.46", sha256="dcd69bdca7ff166bc45141eddbcf21967999a6b66b0544be12a1cc2fd6340e1f")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
if version >= Version("2.4.48"):
url = "http://download.savannah.gnu.org/releases/attr/attr-{0}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/audacious/package.py b/var/spack/repos/builtin/packages/audacious/package.py
index d6737186f5..2ee953de77 100644
--- a/var/spack/repos/builtin/packages/audacious/package.py
+++ b/var/spack/repos/builtin/packages/audacious/package.py
@@ -19,6 +19,9 @@ class Audacious(AutotoolsPackage):
version("3.10.1", sha256="c478939b4bcf6704c26eee87d48cab26547e92a83741f437711178c433373fa1")
version("3.10", sha256="82710d6ac90931c2cc4a0f0fcb6380ac21ed42a7a50856d16a67d3179a96e9ae")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/audacity/package.py b/var/spack/repos/builtin/packages/audacity/package.py
index 9e3332032c..aae305611d 100644
--- a/var/spack/repos/builtin/packages/audacity/package.py
+++ b/var/spack/repos/builtin/packages/audacity/package.py
@@ -13,7 +13,7 @@ class Audacity(CMakePackage):
should need, and unlimited undo. The GUI was built with wxWidgets
and the audio I/O supports PulseAudio, OSS and ALSA under Linux."""
- homepage = "http://audacity.sourceforge.net"
+ homepage = "https://audacity.sourceforge.net"
url = "https://github.com/audacity/audacity/archive/Audacity-2.4.2.tar.gz"
license("GPL-3.0-or-later")
@@ -22,4 +22,7 @@ class Audacity(CMakePackage):
version("2.4.1", sha256="50240f07471373a7e5c2df65cc26eeeaaced9a0850ad1f95cb795f171ea3009f")
version("2.4.0", sha256="5d1c096d7b04ff8d5dbca3dca5b9d9f8e62093b5ea6e57ae5f821ae3132dc88f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("wxwidgets")
diff --git a/var/spack/repos/builtin/packages/audit-userspace/package.py b/var/spack/repos/builtin/packages/audit-userspace/package.py
index b38e3aee29..105c692eca 100644
--- a/var/spack/repos/builtin/packages/audit-userspace/package.py
+++ b/var/spack/repos/builtin/packages/audit-userspace/package.py
@@ -14,15 +14,25 @@ class AuditUserspace(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("4.0.1", sha256="f964610dc0c1e68075d5ae4b14d6280d1164b6eca3a4a13721d1a711681403d9")
+ version("3.1.2", sha256="4516dbfd1bea0eea10a30f907e50f17087673a536ec6322a2a568dff4ebe50f4")
version("3.1.1", sha256="6a97cc472920639d736e9927353be05e323f351067fcf6e5d34439cafa0e9006")
version("2.8.5", sha256="835ffdd65056ba0c26509dbf48882713b00dbe70e1d8cf25d538501136c2e3e9")
version("2.8.4", sha256="089dfdceb38edf056202a6de4892fd0c9aaa964c08bd7806c5d0c7c33f09e18d")
version("2.8.3", sha256="c239e3813b84bc264aaf2f796c131c1fe02960244f789ec2bd8d88aad4561b29")
version("2.8.2", sha256="0a312a8487190d97715d46abb30aa2abd464b55f21d5c2d24428baa320ee4ce2")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("openldap")
depends_on("swig")
+
+ patch(
+ "https://github.com/linux-audit/audit-userspace/commit/28a74a445d54932e1450b60d6148912344615b44.patch?full_index=1",
+ sha256="63d4644c7037be21bcafa913f4c96fbaa37f388c170cf0344869a0dc2449fd65",
+ when="@4.0.1",
+ )
diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py
index a80de62d02..fe979ec5b9 100644
--- a/var/spack/repos/builtin/packages/augustus/package.py
+++ b/var/spack/repos/builtin/packages/augustus/package.py
@@ -38,6 +38,9 @@ class Augustus(MakefilePackage):
url="https://bioinf.uni-greifswald.de/augustus/binaries/old/augustus-3.2.3.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("python", when="@3.3.1:", type=("build", "run"))
depends_on("bamtools")
@@ -66,7 +69,7 @@ class Augustus(MakefilePackage):
def edit(self, spec, prefix):
# Set compile commands for each compiler and
# Fix for using 'boost' on Spack. (only after ver.3.3.1-tag1)
- if "@3.3.1-tag1:3.4.0" in spec:
+ if spec.satisfies("@3.3.1-tag1:3.4.0"):
with working_dir(join_path("auxprogs", "utrrnaseq", "Debug")):
filter_file("g++", spack_cxx, "makefile", string=True)
filter_file(
@@ -105,22 +108,22 @@ class Augustus(MakefilePackage):
makefile = FileFilter("Makefile")
makefile.filter("BAMTOOLS = .*", f"BAMTOOLS = {bamtools}")
makefile.filter("INCLUDES = *", "INCLUDES = -I$(BAMTOOLS)/include/bamtools ")
- if "bamtools@2.5:" in spec:
+ if spec.satisfies("bamtools@2.5:"):
makefile.filter(
"LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib64" "/libbamtools.a -lz"
)
- if "bamtools@:2.4" in spec:
+ if spec.satisfies("bamtools@:2.4"):
makefile.filter(
"LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib/bamtools" "/libbamtools.a -lz"
)
with working_dir(join_path("auxprogs", "bam2hints")):
makefile = FileFilter("Makefile")
makefile.filter("/usr/include/bamtools", f"{bamtools}/include/bamtools")
- if "bamtools@2.5:" in spec:
+ if spec.satisfies("bamtools@2.5:"):
makefile.filter(
"LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib64/libbamtools.a -lz"
)
- if "bamtools@:2.4" in spec:
+ if spec.satisfies("bamtools@:2.4"):
makefile.filter(
"LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib/bamtools/libbamtools.a -lz"
)
@@ -148,7 +151,7 @@ class Augustus(MakefilePackage):
with working_dir("src"):
makefile = FileFilter("Makefile")
makefile.filter(r"/usr/include/mysql\+\+", f"{mysqlpp}/include/mysql++")
- if "^mariadb-c-client" in spec:
+ if spec.satisfies("^mariadb-c-client"):
makefile.filter("/usr/include/mysql", f"{mysql}/include/mariadb")
else:
makefile.filter("/usr/include/mysql", f"{mysql}/include/mysql")
@@ -165,22 +168,20 @@ class Augustus(MakefilePackage):
pattern = "^#!.*"
repl = f"#!{self.spec['perl'].command.path}"
files = glob.glob("*.pl")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
repl = f"#!{self.spec['python'].command.path}"
files = glob.glob("*.py")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
def setup_build_environment(self, env):
htslib = self.spec["htslib"].prefix
bamtools = self.spec["bamtools"].prefix
- if "@3.4.0" in self.spec:
+ if self.spec.satisfies("@3.4.0"):
env.set("HTSLIBDIR", htslib)
- if "@3.5.0:" in self.spec:
+ if self.spec.satisfies("@3.5.0:"):
env.set("HTSLIB_INSTALL_DIR", htslib)
env.set("BAMTOOLS_INSTALL_DIR", bamtools)
diff --git a/var/spack/repos/builtin/packages/authd/package.py b/var/spack/repos/builtin/packages/authd/package.py
index 230d32196e..fa02a85c18 100644
--- a/var/spack/repos/builtin/packages/authd/package.py
+++ b/var/spack/repos/builtin/packages/authd/package.py
@@ -18,6 +18,8 @@ class Authd(MakefilePackage):
version("1.4.4", sha256="71ee3d1c3e107c93e082148f75ee460c949b203c861dd20d48f7c5cfdc272bf8")
+ depends_on("c", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/authselect/package.py b/var/spack/repos/builtin/packages/authselect/package.py
index fb61a06610..9bdd979206 100644
--- a/var/spack/repos/builtin/packages/authselect/package.py
+++ b/var/spack/repos/builtin/packages/authselect/package.py
@@ -18,6 +18,8 @@ class Authselect(AutotoolsPackage):
version("1.2", sha256="c354c87a0115612cb51b09b5157f151569e16384cdd69f32b8515209036531b4")
version("1.1", sha256="39b888575980c1ecac7022dfe5a5452eef59cef850b8544ed5f928e2e8a335dd")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 44a1e98d4e..939f394b9e 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -33,27 +33,27 @@ class Autoconf(AutotoolsPackage, GNUMirrorPackage):
# Apply long-time released and already in-use upstream patches to fix test cases:
# tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the older `quote'
patch(
- "http://mirrors.mit.edu/gentoo-portage/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch",
+ "https://mirrors.mit.edu/gentoo-portage/dev-build/autoconf/files/autoconf-2.69-fix-libtool-test.patch",
sha256="7793209b33013dc0f81208718c68440c5aae80e7a1c4b8d336e382525af791a7",
when="@2.69",
)
# Fix bin/autoscan.in for current perl releases (reported already in January 2013)
patch(
- "http://mirrors.mit.edu/gentoo-portage/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch",
+ "https://mirrors.mit.edu/gentoo-portage/dev-build/autoconf/files/autoconf-2.69-perl-5.26.patch",
sha256="35c449281546376449766f92d49fc121ca50e330e60fefcfc9be2af3253082c2",
when="@2.62:2.69 ^perl@5.17:",
)
# Fix bin/autoheader.in for current perl relases not having "." in @INC:
patch(
- "http://mirrors.mit.edu/gentoo-portage/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch",
+ "https://mirrors.mit.edu/gentoo-portage/dev-build/autoconf/files/autoconf-2.69-perl-5.26-2.patch",
sha256="a49dd5bac3b62daa0ff688ab4d508d71dbd2f4f8d7e2a02321926346161bf3ee",
when="@2.62:2.69 ^perl@5.17:",
)
# Note: m4 is not a pure build-time dependency of autoconf. m4 is
# needed when autoconf runs, not only when autoconf is built.
- depends_on("m4@1.4.8:", type=("build", "run"), when="@1.72:")
- depends_on("m4@1.4.6:", type=("build", "run"), when="@:1.71")
+ depends_on("m4@1.4.8:", type=("build", "run"), when="@2.72:")
+ depends_on("m4@1.4.6:", type=("build", "run"), when="@:2.71")
depends_on("perl", type=("build", "run"))
build_directory = "spack-build"
@@ -84,7 +84,7 @@ class Autoconf(AutotoolsPackage, GNUMirrorPackage):
# We save and restore the modification timestamp of the file to prevent
# regeneration of the respective man page:
with keep_modification_time(patched_file):
- if "@2.70:" in self.spec:
+ if self.spec.satisfies("@2.70:"):
shebang_string = "^#! @PERL@"
else:
shebang_string = "^#! @PERL@ -w"
@@ -104,7 +104,7 @@ class Autoconf(AutotoolsPackage, GNUMirrorPackage):
# target will try to rebuild the binaries (filter_file updates the
# timestamps)
- if "@2.70:" in self.spec:
+ if self.spec.satisfies("@2.70:"):
shebang_string = "#! {0}"
else:
shebang_string = "#! {0} -w"
diff --git a/var/spack/repos/builtin/packages/autodiff/package.py b/var/spack/repos/builtin/packages/autodiff/package.py
index ac7b50477e..42d4b5b1f9 100644
--- a/var/spack/repos/builtin/packages/autodiff/package.py
+++ b/var/spack/repos/builtin/packages/autodiff/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Autodiff(CMakePackage):
+class Autodiff(CMakePackage, CudaPackage):
"""autodiff is automatic differentiation made easier for C++."""
homepage = "https://autodiff.github.io"
@@ -14,10 +14,15 @@ class Autodiff(CMakePackage):
list_url = "https://github.com/autodiff/autodiff/tags"
git = "https://github.com/autodiff/autodiff.git"
- maintainers("wdconinc", "HadrienG2")
+ maintainers("wdconinc")
- license("MIT")
+ license("MIT", checked_by="wdconinc")
+ version("1.1.2", sha256="86f68aabdae1eed214bfbf0ddaa182c78ea1bb99e4df404efb7b94d30e06b744")
+ version("1.1.1", sha256="05aa2a432c83db079efeca1c407166a3f3d190645bd3202da3b6357fb30fc9e1")
+ version("1.1.0", sha256="a5489bb546c460af52de8ead447439b3c97429184df28b4d142ce7dcfd62b82c")
+ version("1.0.3", sha256="21b57ce60864857913cacb856c3973ae10f7539b6bb00bcc04f85b2f00db0ce2")
+ version("1.0.2", sha256="a3289aed937a39a817f76e6befa0d071a3e70a5b0b125ec62d1acf1d389e2197")
version("1.0.1", sha256="63f2c8aaf940fbb1d1e7098b1d6c08794da0194eec3faf773f3123dc7233838c")
version("1.0.0", sha256="112c6f5740071786b3f212c96896abc2089a74bca16b57bb46ebf4cec79dca43")
version("0.6.12", sha256="3e9d667b81bba8e43bbe240a0321e25f4be248d1761097718664445306882dcc")
@@ -31,6 +36,8 @@ class Autodiff(CMakePackage):
version("0.6.4", sha256="cfe0bb7c0de10979caff9d9bfdad7e6267faea2b8d875027397486b47a7edd75")
version("0.5.13", sha256="a73dc571bcaad6b44f74865fed51af375f5a877db44321b5568d94a4358b77a1")
+ depends_on("cxx", type="build")
+
variant("python", default=False, description="Enable the compilation of the python bindings.")
variant("examples", default=False, description="Enable the compilation of the example files.")
@@ -42,6 +49,8 @@ class Autodiff(CMakePackage):
depends_on("catch2", type="test")
depends_on("catch2@3:", when="@0.6.12:", type="test")
+ conflicts("+cuda", when="@:1.0", msg="CUDA support was added in 1.1.0")
+
def cmake_args(self):
args = [
self.define("AUTODIFF_BUILD_TESTS", self.run_tests),
diff --git a/var/spack/repos/builtin/packages/autodock-gpu/package.py b/var/spack/repos/builtin/packages/autodock-gpu/package.py
index a3e5a4c329..f37859b13f 100644
--- a/var/spack/repos/builtin/packages/autodock-gpu/package.py
+++ b/var/spack/repos/builtin/packages/autodock-gpu/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class AutodockGpu(MakefilePackage):
+class AutodockGpu(MakefilePackage, CudaPackage):
"""AutoDock-GPU: AutoDock for GPUs and other accelerators.
OpenCL and Cuda accelerated version of AutoDock 4.2.6. It
leverages its embarrasingly parallelizable LGA by processing
@@ -22,6 +22,8 @@ class AutodockGpu(MakefilePackage):
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
variant(
"device",
default="cuda",
@@ -30,14 +32,19 @@ class AutodockGpu(MakefilePackage):
multi=False,
)
variant("overlap", default=False, description="Overlap CPU and GPU operations")
+ variant("cuda", default=True, description="Build with CUDA")
depends_on("cuda")
+ conflicts("~cuda") # the cuda variant is mandatory
+ conflicts("+cuda", when="cuda_arch=none")
+
@property
def build_targets(self):
spec = self.spec
return [
"DEVICE={0}".format(spec.variants["device"].value.upper()),
+ "TARGETS={0}".format(" ".join(spec.variants["cuda_arch"].value)),
"GPU_INCLUDE_PATH={0}".format(spec["cuda"].prefix.include),
"GPU_LIBRARY_PATH={0}".format(spec["cuda"].libs.directories[0]),
"OVERLAP={0}".format("ON" if "+overlap" in spec else "OFF"),
diff --git a/var/spack/repos/builtin/packages/autodock-vina/package.py b/var/spack/repos/builtin/packages/autodock-vina/package.py
index f1cfa5694c..b4104e9937 100644
--- a/var/spack/repos/builtin/packages/autodock-vina/package.py
+++ b/var/spack/repos/builtin/packages/autodock-vina/package.py
@@ -27,6 +27,8 @@ class AutodockVina(MakefilePackage):
url="https://github.com/ccsb-scripps/AutoDock-Vina/archive/refs/tags/v1.1.2-boost-new.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
depends_on(
"boost@1.50.0:1.75.0 +filesystem +program_options +serialization +system +thread",
when="@1.1.2",
diff --git a/var/spack/repos/builtin/packages/autogen/package.py b/var/spack/repos/builtin/packages/autogen/package.py
index 895970b374..2266205e22 100644
--- a/var/spack/repos/builtin/packages/autogen/package.py
+++ b/var/spack/repos/builtin/packages/autogen/package.py
@@ -21,6 +21,8 @@ class Autogen(AutotoolsPackage, GNUMirrorPackage):
version("5.18.12", sha256="805c20182f3cb0ebf1571d3b01972851c56fb34348dfdc38799fd0ec3b2badbe")
+ depends_on("c", type="build") # generated
+
variant("xml", default=True, description="Enable XML support")
depends_on("pkgconfig", type="build")
@@ -37,7 +39,7 @@ class Autogen(AutotoolsPackage, GNUMirrorPackage):
"--disable-nls"
]
- if "+xml" in spec:
+ if spec.satisfies("+xml"):
args.append(f"--with-libxml2={spec['libxml2'].prefix}")
else:
args.append("--without-libxml2")
diff --git a/var/spack/repos/builtin/packages/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py
index bd488830d0..4006fbaf88 100644
--- a/var/spack/repos/builtin/packages/automaded/package.py
+++ b/var/spack/repos/builtin/packages/automaded/package.py
@@ -24,6 +24,8 @@ class Automaded(CMakePackage):
version("1.0", sha256="600740cdd594cc6968c7bcb285d0829eb0ddbd5597c32c06c6ae5d9929a2625d")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py
index d0ae1456ed..4d5943de06 100644
--- a/var/spack/repos/builtin/packages/automake/package.py
+++ b/var/spack/repos/builtin/packages/automake/package.py
@@ -25,6 +25,8 @@ class Automake(AutotoolsPackage, GNUMirrorPackage):
version("1.13.4", sha256="4c93abc0bff54b296f41f92dd3aa1e73e554265a6f719df465574983ef6f878c")
version("1.11.6", sha256="53dbf1945401c43f4ce19c1971baecdbf8bc32e0f37fa3f49fe7b6992d0d2030")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("perl+threads", type=("build", "run"))
@@ -43,10 +45,10 @@ class Automake(AutotoolsPackage, GNUMirrorPackage):
def patch(self):
# The full perl shebang might be too long
files_to_be_patched_fmt = "bin/{0}.in"
- if "@:1.15.1" in self.spec:
+ if self.spec.satisfies("@:1.15.1"):
files_to_be_patched_fmt = "t/wrap/{0}.in"
- if "@1.16.3:" in self.spec:
+ if self.spec.satisfies("@1.16.3:"):
shebang_string = "^#!@PERL@"
else:
shebang_string = "^#!@PERL@ -w"
diff --git a/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py b/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py
index d064393199..d4d2ea6dd0 100644
--- a/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py
+++ b/var/spack/repos/builtin/packages/aws-ofi-nccl/package.py
@@ -12,12 +12,30 @@ class AwsOfiNccl(AutotoolsPackage):
applications."""
homepage = "https://github.com/aws/aws-ofi-nccl"
+ url = "https://github.com/aws/aws-ofi-nccl/archive/v0.0.0.tar.gz"
git = "https://github.com/aws/aws-ofi-nccl.git"
- url = "https://github.com/aws/aws-ofi-nccl.git"
maintainers("bvanessen")
version("master", branch="master")
+ version("1.13.0", sha256="50dd231a0a99cec29300df46b8e828139ced15322a3c3c41b1d22dcc9a62ec02")
+ version("1.12.1", sha256="821f0929c016e5448785bbc6795af5096559ecfc6c9479eb3818cafa61424576")
+ version("1.12.0", sha256="93029207103b75f4dc15f023b3b8692851202b52b7e2824723dd5d328f0ea65b")
+ version("1.11.1", sha256="a300e620e03ba3cc0915f9d466232ff0bf6c84edf4e2cd93592d53cf2a62741b")
+ version("1.11.0", sha256="45d935133b183c945c16b70d8428d676a554faf5bd922b7909e9f1ec55ba6168")
+ version("1.10.0", sha256="ed63f627b42c7b0f7312ce2916a3c4dfeb5145f78b492c0d1e0d0a6828a0474c")
+ version("1.9.2", sha256="f763771e511ae3bc7bb708795f9802867a4a2bc4e4df6a265c7f6a033e9a8b9a")
+ version("1.9.1", sha256="3ee01258674e70d6966eb6d319461f9b882afae618e217e0ae7ec03d26169b35")
+ version("1.9.0", sha256="8d6d0469110a89b5431836d263860fb60fde7beccb26f553de41dca1feb61b51")
+ version("1.8.1", sha256="beb59959be0f60b891f9549f4df51b394e97e739416c88c3436e75516fe067c8")
+ version("1.8.0", sha256="a2f1750d4908924985335e513186353d0c4d9a5d27b1a759f6aa31a10e74c06d")
+ version("1.7.4", sha256="472bbc977ce37d0cf9239b8e366f4f247226a984eb8c487aadd884af53f00e13")
+ version("1.7.3", sha256="7a49b530eb0fa5e262c1fcf3412289bc1d538c15290435c579d5e7f08d806fd4")
+ version("1.7.2", sha256="c89bbe5fa49a7036eb873c01c8fdc5693238ae010ddcaf10b10fdc88aec6e56a")
+ version("1.7.1", sha256="d50a160c7aba76445e5c895fba0f3dbfdec51f702d218168a5e5017806cf0fb0")
+ version("1.6.0", sha256="19a6fc91afe9a317fd3154c897fa219eab48fcdddefa66d881f1843c1165f7ee")
+
+ depends_on("c", type="build") # generated
variant("trace", default=False, description="Enable printing trace messages")
variant("tests", default=False, description="Build tests")
@@ -26,10 +44,17 @@ class AwsOfiNccl(AutotoolsPackage):
depends_on("cuda")
depends_on("nccl")
depends_on("mpi")
+ depends_on("hwloc", when="@1.7:")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ def url_for_version(self, version):
+ if version < Version("1.7.0"):
+ return super().url_for_version(version)
+ url_fmt = "https://github.com/aws/aws-ofi-nccl/archive/v{0}-aws.tar.gz"
+ return url_fmt.format(version)
+
# To enable this plug-in to work with NCCL add it to the LD_LIBRARY_PATH
def setup_run_environment(self, env):
aws_ofi_nccl_home = self.spec.prefix
@@ -54,6 +79,8 @@ class AwsOfiNccl(AutotoolsPackage):
"--with-mpi={0}".format(spec["mpi"].prefix),
]
)
+ if spec.satisfies("@1.7:"):
+ args.extend(["--with-hwloc={0}".format(spec["hwloc"].prefix)])
args.extend(self.enable_or_disable("trace"))
args.extend(self.enable_or_disable("tests"))
diff --git a/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py b/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py
index 28045fd8ef..abb83477a4 100644
--- a/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py
+++ b/var/spack/repos/builtin/packages/aws-ofi-rccl/package.py
@@ -11,9 +11,9 @@ class AwsOfiRccl(AutotoolsPackage):
libfabric as a network provider while running AMD's RCCL based
applications."""
- homepage = "https://github.com/ROCmSoftwarePlatform/aws-ofi-rccl"
- git = "https://github.com/ROCmSoftwarePlatform/aws-ofi-rccl.git"
- url = "https://github.com/ROCmSoftwarePlatform/aws-ofi-rccl.git"
+ homepage = "https://github.com/ROCm/aws-ofi-rccl"
+ git = "https://github.com/ROCm/aws-ofi-rccl.git"
+ url = "https://github.com/ROCm/aws-ofi-rccl.git"
tags = ["rocm"]
maintainers("bvanessen")
@@ -23,6 +23,8 @@ class AwsOfiRccl(AutotoolsPackage):
version("cxi", branch="cxi", preferred=True)
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
variant("trace", default=False, description="Enable printing trace messages")
variant("tests", default=False, description="Build tests")
diff --git a/var/spack/repos/builtin/packages/aws-sdk-cpp/package.py b/var/spack/repos/builtin/packages/aws-sdk-cpp/package.py
index cdea77da7e..82227f0a6f 100644
--- a/var/spack/repos/builtin/packages/aws-sdk-cpp/package.py
+++ b/var/spack/repos/builtin/packages/aws-sdk-cpp/package.py
@@ -51,6 +51,9 @@ class AwsSdkCpp(CMakePackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("zlib-api")
depends_on("curl")
diff --git a/var/spack/repos/builtin/packages/awscli-v2/package.py b/var/spack/repos/builtin/packages/awscli-v2/package.py
index 821321e622..51b8038894 100644
--- a/var/spack/repos/builtin/packages/awscli-v2/package.py
+++ b/var/spack/repos/builtin/packages/awscli-v2/package.py
@@ -11,21 +11,41 @@ class AwscliV2(PythonPackage):
homepage = "https://docs.aws.amazon.com/cli"
url = "https://github.com/aws/aws-cli/archive/refs/tags/2.13.22.tar.gz"
+ list_url = "https://github.com/aws/aws-cli/tags"
- maintainers("climbfuji")
+ maintainers("climbfuji", "teaguesterling")
+ version("2.22.4", sha256="56c6170f3be830afef2dea60fc3fd7ed14cf2ca2efba055c085fe6a7c4de358e")
+ version("2.15.53", sha256="a4f5fd4e09b8f2fb3d2049d0610c7b0993f9aafaf427f299439f05643b25eb4b")
version("2.13.22", sha256="dd731a2ba5973f3219f24c8b332a223a29d959493c8a8e93746d65877d02afc1")
- depends_on("python@3.8:", type=("build", "run"))
- depends_on("py-flit-core@3.7.1:3.8.0", type=("build"))
- depends_on("py-colorama@0.2.5:0.4.6", type=("build", "run"))
- depends_on("py-docutils@0.10:0.19", type=("build", "run"))
- depends_on("py-cryptography@3.3.2:40.0.1", type=("build", "run"))
- depends_on("py-ruamel-yaml@0.15:0.17.21", type=("build", "run"))
- depends_on("py-ruamel-yaml-clib@0.2:0.2.7", type=("build", "run"))
- depends_on("py-prompt-toolkit@3.0.24:3.0.38", type=("build", "run"))
- depends_on("py-distro@1.5:1.8", type=("build", "run"))
- depends_on("py-awscrt@0.16.4:0.16.16", type=("build", "run"))
- depends_on("py-python-dateutil@2.1:2", type=("build", "run"))
- depends_on("py-jmespath@0.7.1:1.0", type=("build", "run"))
- depends_on("py-urllib3@1.25.4:1.26", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-flit-core@3.7.1:3.9.0", when="@2.22:")
+ depends_on("py-flit-core@3.7.1:3.8.0", when="@:2.15")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-colorama@0.2.5:0.4.6")
+ depends_on("py-docutils@0.10:0.19")
+ depends_on("py-cryptography@40:43.0.1", when="@2.22:")
+ depends_on("py-cryptography@3.3.2:40.0.1", when="@:2.15")
+ depends_on("py-ruamel-yaml@0.15:0.17.21")
+ depends_on("py-ruamel-yaml-clib@0.2:", when="@2.22:")
+ # Upper bound relaxed for Python 3.13 support
+ # depends_on("py-ruamel-yaml-clib@0.2:0.2.8", when="@2.22:")
+ depends_on("py-ruamel-yaml-clib@0.2:0.2.7", when="@:2.15")
+ depends_on("py-prompt-toolkit@3.0.24:3.0.38")
+ depends_on("py-distro@1.5:1.8")
+ depends_on("py-awscrt@0.19.18:0.22.0", when="@2.22:")
+ depends_on("py-awscrt@0.19.18:0.19.19", when="@2.15")
+ depends_on("py-awscrt@0.16.4:0.16.16", when="@2.13")
+ depends_on("py-python-dateutil@2.1:2.9.0", when="@2.22:")
+ depends_on("py-python-dateutil@2.1:2.8.2", when="@:2.15")
+ depends_on("py-jmespath@0.7.1:1.0")
+ depends_on("py-urllib3@1.25.4:1.26")
+
+ variant("examples", default=True, description="Install code examples")
+
+ @run_after("install", when="~examples")
+ def post_install(self):
+ examples_dir = join_path(python_purelib, "awscli", "examples")
+ remove_directory_contents(examples_dir)
diff --git a/var/spack/repos/builtin/packages/axel/package.py b/var/spack/repos/builtin/packages/axel/package.py
index e25ab8f192..93cf396253 100644
--- a/var/spack/repos/builtin/packages/axel/package.py
+++ b/var/spack/repos/builtin/packages/axel/package.py
@@ -14,13 +14,23 @@ class Axel(AutotoolsPackage):
license("GPL-2.0-or-later WITH OpenSSL-Exception")
+ version("2.17.14", sha256="73f3aeafcb00b8101b212fcf47969a4962e7a1b50843306178b527a9942d8785")
+ version("2.17.13", sha256="aedd5e0f22d6eda23eece483ce89be4adfdf1e16ba18d54fd6b743da9d49911b")
version("2.17.10", sha256="c0d26eba6b94945cd98c5b69ca6df2744639d17bfd49047ef51a8a48f067de10")
version("2.16.1", sha256="763066efc61e4f7be2eb59afa049bdbc520837e01c95a78f403e542ad82f2719")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
+
# For systems not providing libintl APU in the system libc (glibc integrated it)
depends_on("gettext")
depends_on("openssl")
- def installcheck(self):
- Executable(self.prefix.bin.axel)("--version")
+ # check if we can run axel
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check_version(self):
+ with working_dir(self.stage.source_path):
+ axel = Executable(self.prefix.bin.axel)
+ axel("--version")
diff --git a/var/spack/repos/builtin/packages/axl/package.py b/var/spack/repos/builtin/packages/axl/package.py
index 381d47578b..ebf05863f8 100644
--- a/var/spack/repos/builtin/packages/axl/package.py
+++ b/var/spack/repos/builtin/packages/axl/package.py
@@ -27,6 +27,7 @@ class Axl(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.9.0", sha256="da2d74092fb230754a63db3cd5ba72a233ee8153dec28cc604fa8465280299ba")
version("0.8.0", sha256="9fcd4eae143a67ff02622feda2a541b85e9a108749c039faeb473cbbc2330459")
version("0.7.1", sha256="526a055c072c85cc989beca656717e06b128f148fda8eb19d1d9b43a3325b399")
version("0.7.0", sha256="840ef61eadc9aa277d128df08db4cdf6cfa46b8fcf47b0eee0972582a61fbc50")
@@ -45,6 +46,9 @@ class Axl(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("kvtree")
depends_on("zlib-api", type="link")
@@ -62,6 +66,9 @@ class Axl(CMakePackage):
validator=async_api_validator,
)
+ variant("mpi", default=True, description="Build with MPI support", when="@0.7.1:")
+ depends_on("mpi", when="@0.7.1: +mpi")
+
variant("pthreads", default=True, description="Enable Pthread support", when="@0.6:")
variant("bbapi", default=True, description="Enable IBM BBAPI support")
@@ -84,6 +91,10 @@ class Axl(CMakePackage):
args = []
args.append(self.define("WITH_KVTREE_PREFIX", spec["kvtree"].prefix))
+ args.append(self.define_from_variant("MPI"))
+ if spec.satisfies("+mpi"):
+ args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
+
if spec.satisfies("@:0.3.0"):
apis = list(spec.variants["async_api"].value)
if "daemon" in apis:
@@ -100,9 +111,6 @@ class Axl(CMakePackage):
args.append(self.define_from_variant("ENABLE_IBM_BBAPI", "bbapi"))
args.append(self.define_from_variant("ENABLE_CRAY_DW", "dw"))
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("AXL_LINK_STATIC", True))
if spec.satisfies("@0.6.0:"):
args.append(self.define_from_variant("ENABLE_PTHREADS", "pthreads"))
diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py
index 100f8cb5d3..23e29fa32f 100644
--- a/var/spack/repos/builtin/packages/axom/package.py
+++ b/var/spack/repos/builtin/packages/axom/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import shutil
import socket
from os.path import join as pjoin
@@ -38,10 +39,13 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/axom.git"
tags = ["radiuss"]
+ test_requires_compiler = True
+
license("BSD-3-Clause")
version("main", branch="main")
version("develop", branch="develop")
+ version("0.9.0", tag="v0.9.0", commit="5f531595d941d16fa3b8583bfc347a845d9feb6d")
version("0.8.1", tag="v0.8.1", commit="0da8a5b1be596887158ac2fcd321524ba5259e15")
version("0.8.0", tag="v0.8.0", commit="71fab3262eb7e1aa44a04c21d072b77f06362f7b")
version("0.7.0", tag="v0.7.0", commit="ea5158191181c137117ae37959879bdc8b107f35")
@@ -55,10 +59,15 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
version("0.3.0", tag="v0.3.0", commit="20068ccab4b4f70055918b4f17960ec3ed6dbce8")
version("0.2.9", tag="v0.2.9", commit="9e9a54ede3326817c05f35922738516e43b5ec3d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# https://github.com/spack/spack/issues/31829
patch("examples-oneapi.patch", when="@0.6.1 +examples %oneapi")
patch("scr_examples_gtest.patch", when="@0.6.0:0.6.1")
+ patch("umpire_camp_blt_targets.patch", when="@=0.8.0 ^umpire@2023.06.0")
root_cmakelists_dir = "src"
@@ -80,6 +89,13 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
variant("mpi", default=True, description="Build MPI support")
variant("openmp", default=True, description="Turn on OpenMP support.")
+ variant(
+ "profiling",
+ default=False,
+ when="@develop",
+ description="Build with hooks for Adiak/Caliper performance analysis",
+ )
+
variant("mfem", default=False, description="Build with mfem")
variant("hdf5", default=True, description="Build with hdf5")
variant("lua", default=True, description="Build with Lua")
@@ -96,10 +112,12 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
# -----------------------------------------------------------------------
# Basics
depends_on("cmake@3.14:", type="build")
+ depends_on("cmake@3.18:", type="build", when="@0.7.0:")
depends_on("cmake@3.21:", type="build", when="+rocm")
depends_on("blt", type="build")
- depends_on("blt@0.5.1:", type="build", when="@0.6.2:")
+ depends_on("blt@0.5.1:0.5.3", type="build", when="@0.6.1:0.8")
+ depends_on("blt@0.6.2:", type="build", when="@0.9:")
depends_on("mpi", when="+mpi")
@@ -117,44 +135,73 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("scr~fortran", when="+scr~fortran")
with when("+umpire"):
- depends_on("umpire@2022.03.0:", when="@0.7.0:")
+ depends_on("umpire")
+ depends_on("umpire@2024.02.0:", when="@0.9:")
+ depends_on("umpire@2022.03.0:2023.06", when="@0.7.0:0.8")
depends_on("umpire@6.0.0", when="@0.6.0")
depends_on("umpire@5:5.0.1", when="@:0.5.0")
- depends_on("umpire +openmp", when="+openmp")
+ depends_on("umpire+openmp", when="+openmp")
with when("+raja"):
- depends_on("raja@2022.03.0:", when="@0.7.0:")
+ depends_on("raja")
+ depends_on("raja@2024.02.0:", when="@0.9:")
+ depends_on("raja@2022.03.0:2023.06", when="@0.7.0:0.8")
depends_on("raja@0.14.0", when="@0.6.0")
depends_on("raja@:0.13.0", when="@:0.5.0")
depends_on("raja~openmp", when="~openmp")
depends_on("raja+openmp", when="+openmp")
+ with when("+profiling"):
+ depends_on("adiak")
+ depends_on("caliper+adiak~papi")
+
+ depends_on("caliper+cuda", when="+cuda")
+ depends_on("caliper~cuda", when="~cuda")
+
+ depends_on("caliper+rocm", when="+rocm")
+ depends_on("caliper~rocm", when="~rocm")
+
+ for dep in ["adiak", "caliper"]:
+ depends_on(f"{dep}+mpi", when="+mpi")
+ depends_on(f"{dep}~mpi", when="~mpi")
+ depends_on(f"{dep}+shared", when="+shared")
+ depends_on(f"{dep}~shared", when="~shared")
+
for val in CudaPackage.cuda_arch_values:
- raja_cuda = "raja +cuda cuda_arch={0}".format(val)
- umpire_cuda = "umpire +cuda cuda_arch={0}".format(val)
- depends_on(raja_cuda, when="+{0}".format(raja_cuda))
- depends_on(umpire_cuda, when="+{0}".format(umpire_cuda))
+ ext_cuda_dep = f"+cuda cuda_arch={val}"
+ depends_on(f"raja {ext_cuda_dep}", when=f"+raja {ext_cuda_dep}")
+ depends_on(f"umpire {ext_cuda_dep}", when=f"+umpire {ext_cuda_dep}")
+ depends_on(f"caliper {ext_cuda_dep}", when=f"+profiling {ext_cuda_dep}")
for val in ROCmPackage.amdgpu_targets:
- raja_rocm = "raja +rocm amdgpu_target={0}".format(val)
- umpire_rocm = "umpire +rocm amdgpu_target={0}".format(val)
- depends_on(raja_rocm, when="+{0}".format(raja_rocm))
- depends_on(umpire_rocm, when="+{0}".format(umpire_rocm))
+ ext_rocm_dep = f"+rocm amdgpu_target={val}"
+ depends_on(f"raja {ext_rocm_dep}", when=f"+raja {ext_rocm_dep}")
+ depends_on(f"umpire {ext_rocm_dep}", when=f"+umpire {ext_rocm_dep}")
+ depends_on(f"caliper {ext_rocm_dep}", when=f"+profiling {ext_rocm_dep}")
- depends_on("mfem", when="+mfem")
- depends_on("mfem~mpi", when="+mfem~mpi")
+ depends_on("rocprim", when="+rocm")
+
+ with when("+mfem"):
+ depends_on("mfem+mpi", when="+mpi")
+ depends_on("mfem~mpi", when="~mpi")
+ depends_on("mfem@4.5.0:", when="@0.7.0:")
depends_on("python", when="+python")
# Devtools
- depends_on("cppcheck", when="+devtools")
- depends_on("doxygen", when="+devtools")
- depends_on("graphviz", when="+devtools")
- depends_on("python", when="+devtools")
- depends_on("py-sphinx", when="+devtools")
- depends_on("py-shroud", when="+devtools")
- depends_on("llvm+clang@10.0.0", when="+devtools", type="build")
+ with when("+devtools"):
+ depends_on("cppcheck")
+ depends_on("doxygen")
+ depends_on("graphviz")
+ depends_on("python")
+ depends_on("py-sphinx")
+ depends_on("py-shroud")
+ depends_on("py-jsonschema")
+ depends_on("llvm+clang@10.0.0", type="build")
+ # -----------------------------------------------------------------------
+ # Conflicts
+ # -----------------------------------------------------------------------
# Hard requirement after Axom 0.6.1
conflicts("~cpp14", when="@0.6.2:")
@@ -196,11 +243,11 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
# Are we on a LLNL system then strip node number
hostname = hostname.rstrip("1234567890")
special_case = ""
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
special_case += "_cuda"
- if "~fortran" in self.spec:
+ if self.spec.satisfies("~fortran"):
special_case += "_nofortran"
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
special_case += "_hip"
return "{0}-{1}-{2}@{3}{4}.cmake".format(
hostname,
@@ -214,14 +261,17 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super().initconfig_compiler_entries()
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
entries.append(cmake_cache_option("ENABLE_FORTRAN", True))
if self.is_fortran_compiler("gfortran") and "clang" in self.compiler.cxx:
libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.cxx)), "lib")
flags = ""
for _libpath in [libdir, libdir + "64"]:
if os.path.exists(_libpath):
- flags += " -Wl,-rpath,{0}".format(_libpath)
+ if spec.satisfies("^cuda"):
+ flags += " -Xlinker -rpath -Xlinker {0}".format(_libpath)
+ else:
+ flags += " -Wl,-rpath,{0}".format(_libpath)
description = "Adds a missing libstdc++ rpath"
if flags:
entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", flags, description))
@@ -231,42 +281,41 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
if "+cpp14" in spec and spec.satisfies("@:0.6.1"):
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", ""))
+ # Add optimization flag workaround for Debug builds with cray compiler or newer HIP
+ if spec.satisfies("+rocm"):
+ entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG"))
+
return entries
def initconfig_hardware_entries(self):
spec = self.spec
entries = super().initconfig_hardware_entries()
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
entries.append(cmake_cache_option("ENABLE_CUDA", True))
- entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
-
- entries.append(cmake_cache_option("AXOM_ENABLE_ANNOTATIONS", True))
+ entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
# CUDA_FLAGS
- cudaflags = "-restrict --expt-extended-lambda "
+ cudaflags = "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda "
- if not spec.satisfies("cuda_arch=none"):
- cuda_arch = spec.variants["cuda_arch"].value[0]
- entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_arch))
- cudaflags += "-arch sm_${CMAKE_CUDA_ARCHITECTURES} "
- else:
- entries.append("# cuda_arch could not be determined\n\n")
+ # Pass through any cxxflags to the host compiler via nvcc's Xcompiler flag
+ host_cxx_flags = spec.compiler_flags["cxxflags"]
+ cudaflags += " ".join(["-Xcompiler=%s " % flag for flag in host_cxx_flags])
- if spec.satisfies("^blt@:0.6.1"):
+ if spec.satisfies("^blt@:0.5.1"):
# This is handled internally by BLT now
- if "+cpp14" in spec:
+ if spec.satisfies("+cpp14"):
cudaflags += " -std=c++14"
else:
cudaflags += " -std=c++11"
- entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags))
+ entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags, force=True))
entries.append("# nvcc does not like gtest's 'pthreads' flag\n")
entries.append(cmake_cache_option("gtest_disable_pthreads", True))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
entries.append("#------------------{0}\n".format("-" * 60))
- entries.append("# HIP\n")
+ entries.append("# Axom ROCm specifics\n")
entries.append("#------------------{0}\n\n".format("-" * 60))
entries.append(cmake_cache_option("ENABLE_HIP", True))
@@ -274,13 +323,20 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
hip_root = spec["hip"].prefix
rocm_root = hip_root + "/.."
- entries.append(cmake_cache_string("HIP_ROOT_DIR", hip_root))
- entries.append(cmake_cache_string("HIP_CLANG_PATH", rocm_root + "/llvm/bin"))
-
- archs = self.spec.variants["amdgpu_target"].value
- if archs != "none":
- arch_str = ",".join(archs)
- entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str))
+ # Fix blt_hip getting HIP_CLANG_INCLUDE_PATH-NOTFOUND bad include directory
+ # TODO: verify that this is still needed and is indeed specific to LC
+ if (
+ self.spec.satisfies("%cce") or self.spec.satisfies("%clang")
+ ) and "toss_4" in self._get_sys_type(spec):
+ # Set the patch version to 0 if not already
+ clang_version = str(self.compiler.version)[:-1] + "0"
+ hip_clang_include_path = (
+ rocm_root + "/llvm/lib/clang/" + clang_version + "/include"
+ )
+ if os.path.isdir(hip_clang_include_path):
+ entries.append(
+ cmake_cache_path("HIP_CLANG_INCLUDE_PATH", hip_clang_include_path)
+ )
# Fixes for mpi for rocm until wrapper paths are fixed
# These flags are already part of the wrapped compilers on TOSS4 systems
@@ -291,9 +347,16 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
hip_link_flags += "-Wl,-rpath,{0}/../llvm/lib:{0}/lib ".format(hip_root)
hip_link_flags += "-lpgmath -lflang -lflangrti -lompstub -lamdhip64 "
+ # Remove extra link library for crayftn
+ if "+fortran" in spec and self.is_fortran_compiler("crayftn"):
+ entries.append(
+ cmake_cache_string("BLT_CMAKE_IMPLICIT_LINK_LIBRARIES_EXCLUDE", "unwind")
+ )
+
# Additional libraries for TOSS4
hip_link_flags += " -L{0}/../lib64 -Wl,-rpath,{0}/../lib64 ".format(hip_root)
- hip_link_flags += "-lhsakmt -lamd_comgr "
+ hip_link_flags += " -L{0}/../lib -Wl,-rpath,{0}/../lib ".format(hip_root)
+ hip_link_flags += "-lamd_comgr -lhsa-runtime64 "
entries.append(cmake_cache_string("CMAKE_EXE_LINKER_FLAGS", hip_link_flags))
@@ -322,19 +385,36 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," + libdir
entries.append(
cmake_cache_string("CMAKE_SHARED_LINKER_FLAGS", linker_flags, description)
)
- description = "Converts C-style comments to Fortran style " "in preprocessed files"
+ description = "Converts C-style comments to Fortran style in preprocessed files"
entries.append(
cmake_cache_string(
"BLT_FORTRAN_FLAGS", "-WF,-C! -qxlf2003=polymorphic", description
)
)
+ if (
+ "+openmp" in spec
+ and "clang" in self.compiler.cxx
+ and "+fortran" in spec
+ and self.is_fortran_compiler("xlf")
+ ):
+ openmp_gen_exp = (
+ "$<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:"
+ "-fopenmp=libomp>;$<$<COMPILE_LANGUAGE:"
+ "Fortran>:-qsmp=omp>"
+ )
+
+ description = "Different OpenMP linker flag between CXX and Fortran"
+ entries.append(
+ cmake_cache_string("BLT_OPENMP_LINK_FLAGS", openmp_gen_exp, description)
+ )
+
if spec.satisfies("target=ppc64le:"):
# Fix for working around CMake adding implicit link directories
# returned by the BlueOS compilers to link executables with
@@ -360,35 +440,50 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super().initconfig_mpi_entries()
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
entries.append(cmake_cache_option("ENABLE_MPI", True))
if spec["mpi"].name == "spectrum-mpi":
entries.append(cmake_cache_string("BLT_MPI_COMMAND_APPEND", "mpibind"))
+
+ # Replace /usr/bin/srun path with srun flux wrapper path on TOSS 4
+ # TODO: Remove this logic by adding `using_flux` case in
+ # spack/lib/spack/spack/build_systems/cached_cmake.py:196 and remove hard-coded
+ # path to srun in same file.
+ if "toss_4" in self._get_sys_type(spec):
+ srun_wrapper = which_string("srun")
+ mpi_exec_index = [
+ index for index, entry in enumerate(entries) if "MPIEXEC_EXECUTABLE" in entry
+ ]
+ del entries[mpi_exec_index[0]]
+ entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper))
else:
entries.append(cmake_cache_option("ENABLE_MPI", False))
return entries
+ def find_path_replacement(self, path1, path2, path_replacements, name, entries):
+ root = os.path.commonprefix([path1, path2])
+ if root.endswith(os.path.sep):
+ root = root[: -len(os.path.sep)]
+ if root:
+ path_replacements[root] = "${" + name + "}"
+ entries.append(cmake_cache_path(name, root))
+
def initconfig_package_entries(self):
spec = self.spec
entries = []
+ path_replacements = {}
# TPL locations
entries.append("#------------------{0}".format("-" * 60))
entries.append("# TPLs")
entries.append("#------------------{0}\n".format("-" * 60))
- # Try to find the common prefix of the TPL directory, including the
- # compiler. If found, we will use this in the TPL paths
- compiler_str = str(spec.compiler).replace("@", "-")
- prefix_paths = prefix.split(compiler_str)
- path_replacements = {}
-
- if len(prefix_paths) == 2:
- tpl_root = os.path.realpath(pjoin(prefix_paths[0], compiler_str))
- path_replacements[tpl_root] = "${TPL_ROOT}"
- entries.append("# Root directory for generated TPLs\n")
- entries.append(cmake_cache_path("TPL_ROOT", tpl_root))
+ # Try to find the common prefix of the TPL directory.
+ # If found, we will use this in the TPL paths
+ path1 = os.path.realpath(spec["conduit"].prefix)
+ path2 = os.path.realpath(self.prefix)
+ self.find_path_replacement(path1, path2, path_replacements, "TPL_ROOT", entries)
conduit_dir = get_spec_path(spec, "conduit", path_replacements)
entries.append(cmake_cache_path("CONDUIT_DIR", conduit_dir))
@@ -401,12 +496,19 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
else:
entries.append("# %s not built\n" % dep.upper())
+ if spec.satisfies("+profiling"):
+ dep_dir = get_spec_path(spec, "adiak", path_replacements)
+ entries.append(cmake_cache_path("ADIAK_DIR", dep_dir))
+
+ dep_dir = get_spec_path(spec, "caliper", path_replacements)
+ entries.append(cmake_cache_path("CALIPER_DIR", dep_dir))
+
if "+umpire" in spec and spec.satisfies("^camp"):
dep_dir = get_spec_path(spec, "camp", path_replacements)
entries.append(cmake_cache_path("CAMP_DIR", dep_dir))
# SCR does not export it's targets so we need to pull in its dependencies
- if "+scr" in spec:
+ if spec.satisfies("+scr"):
dep_dir = get_spec_path(spec, "scr", path_replacements)
entries.append(cmake_cache_path("SCR_DIR", dep_dir))
@@ -439,21 +541,17 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append("#------------------{0}\n".format("-" * 60))
# Add common prefix to path replacement list
- if "+devtools" in spec:
+ if spec.satisfies("+devtools"):
# Grab common devtools root and strip the trailing slash
path1 = os.path.realpath(spec["cppcheck"].prefix)
path2 = os.path.realpath(spec["doxygen"].prefix)
- devtools_root = os.path.commonprefix([path1, path2])[:-1]
- path_replacements[devtools_root] = "${DEVTOOLS_ROOT}"
- entries.append("# Root directory for generated developer tools\n")
- entries.append(cmake_cache_path("DEVTOOLS_ROOT", devtools_root))
+ self.find_path_replacement(path1, path2, path_replacements, "DEVTOOLS_ROOT", entries)
- if "+devtools" in spec and "toss_4" not in self._get_sys_type(spec):
- # Only turn on clangformat support if devtools is on and not TOSS4
+ if "+devtools" in spec and spec.satisfies("^llvm"):
clang_fmt_path = spec["llvm"].prefix.bin.join("clang-format")
entries.append(cmake_cache_path("CLANGFORMAT_EXECUTABLE", clang_fmt_path))
else:
- entries.append("# ClangFormat disabled due to disabled devtools\n")
+ entries.append("# ClangFormat disabled due to llvm and devtools not in spec\n")
entries.append(cmake_cache_option("ENABLE_CLANGFORMAT", False))
if "+python" in spec or "+devtools" in spec:
@@ -462,6 +560,11 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
python_path = python_path.replace(key, path_replacements[key])
entries.append(cmake_cache_path("PYTHON_EXECUTABLE", python_path))
+ if spec.satisfies("^py-jsonschema"):
+ jsonschema_dir = get_spec_path(spec, "py-jsonschema", path_replacements, use_bin=True)
+ jsonschema_path = os.path.join(jsonschema_dir, "jsonschema")
+ entries.append(cmake_cache_path("JSONSCHEMA_EXECUTABLE", jsonschema_path))
+
enable_docs = spec.satisfies("^doxygen") or spec.satisfies("^py-sphinx")
entries.append(cmake_cache_option("ENABLE_DOCS", enable_docs))
@@ -507,3 +610,39 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
'PROPERTIES LINKER_LANGUAGE CXX \n LINK_FLAGS "-fopenmp"',
"src/axom/quest/examples/CMakeLists.txt",
)
+
+ @run_after("build")
+ @on_package_attributes(run_tests=True)
+ def build_test(self):
+ with working_dir(self.build_directory):
+ print("Running Axom Unit Tests...")
+ make("test")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def test_install_using_cmake(self):
+ """build example with cmake and run"""
+ example_src_dir = join_path(self.prefix.examples.axom, "using-with-cmake")
+ example_stage_dir = "./cmake"
+ shutil.copytree(example_src_dir, example_stage_dir)
+ with working_dir(join_path(example_stage_dir, "build"), create=True):
+ cmake_args = ["-C ../host-config.cmake", example_src_dir]
+ cmake = self.spec["cmake"].command
+ cmake(*cmake_args)
+ make()
+ example = Executable("./example")
+ example()
+ make("clean")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def test_install_using_make(self):
+ """build example with make and run"""
+ example_src_dir = join_path(self.prefix.examples.axom, "using-with-make")
+ example_stage_dir = "./make"
+ shutil.copytree(example_src_dir, example_stage_dir)
+ with working_dir(example_stage_dir, create=True):
+ make(f"AXOM_DIR={self.prefix}")
+ example = Executable("./example")
+ example()
+ make("clean")
diff --git a/var/spack/repos/builtin/packages/axom/umpire_camp_blt_targets.patch b/var/spack/repos/builtin/packages/axom/umpire_camp_blt_targets.patch
new file mode 100644
index 0000000000..c82c53168c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/axom/umpire_camp_blt_targets.patch
@@ -0,0 +1,38 @@
+diff --git a/src/cmake/thirdparty/SetupAxomThirdParty.cmake b/src/cmake/thirdparty/SetupAxomThirdParty.cmake
+index d4d25d50e..a7ba6e59d 100644
+--- a/src/cmake/thirdparty/SetupAxomThirdParty.cmake
++++ b/src/cmake/thirdparty/SetupAxomThirdParty.cmake
+@@ -32,31 +32,8 @@ if ((RAJA_DIR OR UMPIRE_DIR) AND NOT CAMP_DIR)
+ message(FATAL_ERROR "CAMP_DIR is required if RAJA_DIR or UMPIRE_DIR is provided.")
+ endif()
+
+-if (CAMP_DIR)
+- if (NOT EXISTS "${CAMP_DIR}")
+- message(FATAL_ERROR "Given CAMP_DIR does not exist: ${CAMP_DIR}")
+- endif()
+-
+- if (NOT IS_DIRECTORY "${CAMP_DIR}")
+- message(FATAL_ERROR "Given CAMP_DIR is not a directory: ${CAMP_DIR}")
+- endif()
+-
+- find_package(camp REQUIRED PATHS ${CAMP_DIR})
+-
+- message(STATUS "Checking for expected Camp target 'camp'")
+- if (NOT TARGET camp)
+- message(FATAL_ERROR "Camp failed to load: ${CAMP_DIR}")
+- else()
+- message(STATUS "Camp loaded: ${CAMP_DIR}")
+- set(CAMP_FOUND TRUE CACHE BOOL "")
+- endif()
+-
+- # Note: camp sets a compile feature that is not available on XL
+- set_target_properties(camp PROPERTIES INTERFACE_COMPILE_FEATURES "")
+-else()
+- message(STATUS "Camp support is OFF")
+- set(CAMP_FOUND FALSE CACHE BOOL "")
+-endif()
++# Note: Let Umpire find Camp via camp_DIR, don't find it ourselves
++set(camp_DIR ${CAMP_DIR})
+
+ #------------------------------------------------------------------------------
+ # UMPIRE
diff --git a/var/spack/repos/builtin/packages/babelflow/package.py b/var/spack/repos/builtin/packages/babelflow/package.py
index 7be4ce4d72..ccaacb0421 100644
--- a/var/spack/repos/builtin/packages/babelflow/package.py
+++ b/var/spack/repos/builtin/packages/babelflow/package.py
@@ -23,6 +23,8 @@ class Babelflow(CMakePackage):
version("1.0.1", sha256="b7817870b7a1d7ae7ae2eff1a1acec2824675fb856f666d5dc95c41ce453ae91")
version("1.0.0", sha256="4c4d7ddf60e25e8d3550c07875dba3e46e7c9e61b309cc47a409461b7ffa405e")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
variant("shared", default=True, description="Build Babelflow as shared libs")
diff --git a/var/spack/repos/builtin/packages/babelstream/package.py b/var/spack/repos/builtin/packages/babelstream/package.py
index 0d09e2f5d1..d4d94d078e 100644
--- a/var/spack/repos/builtin/packages/babelstream/package.py
+++ b/var/spack/repos/builtin/packages/babelstream/package.py
@@ -3,63 +3,107 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import re # To get the variant name after (+)
-
+import spack.build_systems.cmake
+import spack.build_systems.makefile
from spack.package import *
-def find_model_flag(str):
- res = re.findall(r"\+(\w+)", str)
- if not res:
- return ""
- return res
-
-
-class Babelstream(CMakePackage, CudaPackage, ROCmPackage):
+class Babelstream(CMakePackage, CudaPackage, ROCmPackage, MakefilePackage):
"""Measure memory transfer rates to/from global device memory on GPUs.
This benchmark is similar in spirit, and based on, the STREAM benchmark for CPUs."""
homepage = "https://github.com/UoB-HPC/BabelStream"
- url = "https://github.com/UoB-HPC/BabelStream/archive/refs/tags/v4.0.tar.gz"
+ url = "https://github.com/UoB-HPC/BabelStream/archive/refs/tags/v5.0.tar.gz"
git = "https://github.com/UoB-HPC/BabelStream.git"
+ version("5.0", sha256="1a418203fbfd95595bdc66047e2e39d8f1bba95a49725c9ecb907caf1af2521f")
version("4.0", sha256="a9cd39277fb15d977d468435eb9b894f79f468233f0131509aa540ffda4f5953")
+ version("3.4", sha256="e34ee9d5ccdead019e3ea478333bcb7886117d600e5da8579a626f6ee34209cf")
+ version("3.3", sha256="4c89c805b277d52776feeb7a8eef7985a0d9295ce3e0bb2333bf715f724723cf")
+ version("3.2", sha256="20309b27ddd09ea37406bcc6f46fd32e9372bf3d145757e55938d19d69cdc49d")
+ version("3.1", sha256="be69e6085e8966e12aa2df897eea6254b172e5adfa03de0adbb89bc3065f4fbe")
+ version("3.0", sha256="776219c72e0fdc36f134e6975b68c7ab25f38206f8f8af84a6f9630648c24800")
+ version("1.0", sha256="3cfb9e45601f1f249878355c72baa6e6a61f6c811f8716d60b83c7fb544e1d5c")
version("main", branch="main")
- version("develop", branch="develop")
-
- maintainers("tomdeakin", "kaanolgu", "tom91136", "robj0nes")
-
+ maintainers("tomdeakin", "kaanolgu", "tom91136")
+ # Previous maintainers: "robj0nes"
+ depends_on("cxx", type="build", when="languages=cxx")
+ depends_on("fortran", type="build", when="languages=fortran")
# Languages
- # Also supported variants are cuda and rocm (for HIP)
- variant("sycl", default=False, description="Enable SYCL support")
- variant("sycl2020", default=False, description="Enable SYCL support")
- variant("omp", default=False, description="Enable OpenMP support")
- variant("ocl", default=False, description="Enable OpenCL support")
- variant("tbb", default=False, description="Enable TBB support")
- variant("acc", default=False, description="Enable OpenACC support")
- variant("thrust", default=False, description="Enable THRUST support")
- variant("raja", default=False, description="Enable RAJA support")
- variant("stddata", default=False, description="Enable STD-data support")
- variant("stdindices", default=False, description="Enable STD-indices support")
- variant("stdranges", default=False, description="Enable STD-ranges support")
+ # in the future it could be possible to add other languages too
+ variant(
+ "languages",
+ default="cxx",
+ values=("cxx", "fortran"),
+ description="Languages Babelstream Spack Package Support",
+ )
+ # Build System
+ build_system(
+ conditional("cmake", when="languages=cxx"),
+ conditional("makefile", when="languages=fortran"),
+ default="cmake",
+ )
+ with when("languages=cxx"):
+ # Also supported variants are cuda and rocm (for HIP)
+ # not included here because they are supplied via respective packages
+ variant("sycl", default=False, description="Enable SYCL support")
+ variant("sycl2020", default=False, description="Enable SYCL support")
+ variant("omp", default=False, description="Enable OpenMP support")
+ variant("ocl", default=False, description="Enable OpenCL support")
+ variant("tbb", default=False, description="Enable TBB support")
+ variant("acc", default=False, description="Enable OpenACC support")
+ variant("hip", default=False, description="Enable HIP support")
+ variant("thrust", default=False, description="Enable THRUST support")
+ variant("raja", default=False, description="Enable RAJA support")
+ variant("std", default=False, description="Enable STD support")
# Some models need to have the programming model abstraction downloaded -
# this variant enables a path to be provided.
variant("dir", values=str, default="none", description="Enable Directory support")
+ variant(
+ "sycl2020_submodel",
+ values=("usm", "acc"),
+ when="+sycl2020",
+ default="usm",
+ description="SYCL2020 -> choose between usm and acc methods",
+ )
+ variant(
+ "std_submodel",
+ values=("data", "indices", "ranges"),
+ when="+std",
+ default="data",
+ description="STD -> choose between data, indices and ranges models",
+ )
- # Kokkos conflict and variant
- conflicts(
- "dir=none", when="+kokkos", msg="KOKKKOS requires architecture to be specfied by dir="
+ variant(
+ "sycl2020_offload",
+ values=("nvidia", "intel"),
+ default="intel",
+ when="+sycl2020",
+ description="Offloading to NVIDIA GPU or not",
+ )
+
+ variant(
+ "thrust_submodel",
+ values=("cuda", "rocm"),
+ default="cuda",
+ when="+thrust",
+ description="Which THRUST implementation to use, supported options include option= \
+ - CUDA (via https://github.com/NVIDIA/thrust)\
+ - ROCM (via https://github.com/ROCmSoftwarePlatform/rocThrust)",
+ )
+ variant(
+ "thrust_backend",
+ values=("cuda", "omp", "tbb"),
+ default="cuda",
+ when="+thrust",
+ description="Which THRUST implementation to use, supported options include option",
)
- variant("kokkos", default=False, description="Enable KOKKOS support")
- # ACC conflict
- variant("cpu_arch", values=str, default="none", description="Enable CPU Target for ACC")
- variant("target", values=str, default="none", description="Enable CPU Target for ACC")
+ # Kokkos variant
+ variant("kokkos", default=False, description="Enable KOKKOS support")
# STD conflicts
- conflicts("+stddata", when="%gcc@:10.1.0", msg="STD-data requires newer version of GCC")
- conflicts("+stdindices", when="%gcc@:10.1.0", msg="STD-indices requires newer version of GCC")
- conflicts("+stdranges", when="%gcc@:10.1.0", msg="STD-ranges requires newer version of GCC")
+ conflicts("+std", when="%gcc@:10.1.0", msg="STD requires newer version of GCC")
# CUDA conflict
conflicts(
@@ -67,350 +111,760 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage):
when="+cuda",
msg="CUDA requires architecture to be specfied by cuda_arch=",
)
- variant("mem", values=str, default="DEFAULT", description="Enable MEM Target for CUDA")
- # Raja Conflict
variant(
- "offload", values=str, default="none", description="Enable RAJA Target [CPU or NVIDIA]"
- )
- conflicts(
- "offload=none",
- when="+raja",
- msg="RAJA requires architecture to be specfied by target=[CPU,NVIDIA]",
+ "cuda_memory_mode",
+ values=("default", "managed", "pagefault"),
+ default="default",
+ when="+cuda",
+ description="Enable MEM Target for CUDA",
)
- # download raja from https://github.com/LLNL/RAJA
+ # OMP offload
+ variant("omp_offload", default=False, when="+omp", description="Enable OpenMP Target")
+ variant(
+ "omp_flags",
+ values=str,
+ default="none",
+ when="+omp",
+ description="If OFFLOAD is enabled, this *overrides* the default offload flags",
+ )
conflicts(
- "dir=none",
+ "omp_flags=none",
+ when="+omp_offload",
+ msg="OpenMP requires offload flags to be specfied by omp_flags=",
+ )
+ # Raja offload
+ variant(
+ "raja_offload",
+ values=("cpu", "nvidia"),
+ default="cpu",
when="+raja",
- msg="RAJA implementation requires architecture to be specfied by dir=",
+ description="Enable RAJA Target [CPU or NVIDIA] / Offload with custom settings for OpenMP",
+ )
+ # std-* offload
+ variant(
+ "std_offload",
+ values=("nvhpc", "none"),
+ default="none",
+ when="+std",
+ description="Enable offloading support (via the non-standard `-stdpar`)\
+ for the new NVHPC SDK",
+ )
+ variant(
+ "std_onedpl_backend",
+ values=("openmp", "tbb", "dpcpp", "none"),
+ default="none",
+ when="+std",
+ description="Implements policies using OpenMP,TBB or dpc++",
+ )
+ variant(
+ "std_use_tbb",
+ values=(True, False),
+ default=False,
+ when="+std",
+ description="No-op if ONE_TBB_DIR is set. Link against an in-tree oneTBB\
+ via FetchContent_Declare, see top level CMakeLists.txt for details",
+ )
+ variant(
+ "std_use_onedpl",
+ values=(True, False),
+ default=False,
+ when="+std",
+ description="Link oneDPL which implements C++17 executor policies\
+ (via execution_policy_tag) for different backends",
+ )
+ # hip memory mode
+ variant(
+ "hip_mem_mode",
+ values=("default", "managed", "pagefault"),
+ default="default",
+ when="+hip",
+ description="Enable MEM Target for HIP",
+ )
+ # tbb use vector
+ variant(
+ "tbb_use_vector",
+ values=(True, False),
+ default=False,
+ when="+tbb",
+ description="Whether to use std::vector<T> for storage or use aligned_alloc. \
+ C++ vectors are *zero* initialised where as aligned_alloc is \
+ uninitialised before first use.",
)
# Thrust Conflict
- # conflicts("~cuda", when="+thrust", msg="Thrust requires +cuda variant")
depends_on("thrust", when="+thrust")
- depends_on("rocthrust", when="+thrust implementation=rocm")
-
+ depends_on("cuda", when="thrust_submodel=cuda")
+ depends_on("cuda", when="+raja raja_offload=nvidia")
+ depends_on("hip", when="+hip")
+ depends_on("rocthrust", when="thrust_submodel=rocm")
+ depends_on("intel-tbb", when="+std +std_use_tbb")
+ depends_on("intel-oneapi-dpl", when="+std +std_use_onedpl")
+ depends_on("intel-tbb", when="+std +std_use_onedpl")
# TBB Dependency
- depends_on("intel-oneapi-tbb", when="+tbb")
- partitioner_vals = ["auto", "affinity", "static", "simple"]
+ depends_on("intel-tbb", when="+tbb")
+
variant(
- "partitioner",
- values=partitioner_vals,
+ "tbb_partitioner",
+ values=("auto", "affinity", "static", "simple"),
default="auto",
+ when="+tbb",
description="Partitioner specifies how a loop template should partition its work among threads.\
Possible values are:\
AUTO - Optimize range subdivision based on work-stealing events.\
AFFINITY - Proportional splitting that optimizes for cache affinity.\
STATIC - Distribute work uniformly with no additional load balancing.\
SIMPLE - Recursively split its range until it cannot be further subdivided.\
- See https://spec.oneapi.com/versions/latest/elements/oneTBB/source/algorithms.html#partitioners for more details.",
+ See https://spec.oneapi.com/versions/latest/elements/oneTBB/source/algorithms.html#partitioners",
)
- # Kokkos Dependency
- depends_on("kokkos@3.7.1", when="+kokkos")
+ # Kokkos & RAJA Dependency
+ cuda_archs = CudaPackage.cuda_arch_values
+ for sm_ in cuda_archs:
+ depends_on(
+ "kokkos +cuda +wrapper cuda_arch={0}".format(sm_),
+ when="kokkos_backend=cuda cuda_arch={0}".format(sm_),
+ )
+ depends_on(
+ "raja +cuda cuda_arch={0}".format(sm_),
+ when="raja_offload=nvidia cuda_arch={0}".format(sm_),
+ )
+ depends_on("kokkos +openmp", when="kokkos_backend=omp")
+ depends_on("raja +openmp", when="raja_offload=cpu")
# OpenCL Dependency
-
- backends = {
- "ocl": [
- ("amd", "rocm-opencl", "enable ROCM backend"),
- ("cuda", "cuda", "enable Cuda backend"),
- ("intel", "intel-oneapi-compilers", "enable Intel backend"),
- ("pocl", "pocl@1.5", "enable POCL backend"),
- ],
- "kokkos": [
- ("cuda", "cuda", "enable Cuda backend"),
- ("omp", "none", "enable Cuda backend"),
- ],
- }
- backend_vals = ["none"]
- for lang in backends:
- for item in backends[lang]:
- backend, dpdncy, descr = item
- backend_vals.append(backend.lower())
-
- variant("backend", values=backend_vals, default="none", description="Enable backend support")
-
- for lang in backends:
- for item in backends[lang]:
- backend, dpdncy, descr = item
- if dpdncy.lower() != "none":
- depends_on("%s" % dpdncy.lower(), when="backend=%s" % backend.lower())
- # this flag could be used in all required languages
- variant("flags", values=str, default="none", description="Additional CXX flags to be provided")
-
- # comp_impl_vals=["ONEAPI-DPCPP","DPCPP","HIPSYCL","COMPUTECPP"]
variant(
- "implementation",
- values=str,
+ "ocl_backend",
+ values=("amd", "cuda", "intel", "pocl", "none"),
default="none",
- description="Compile using the specified SYCL compiler option",
+ when="+ocl",
+ description="Enable Backend Target for OpenCL",
)
-
- conflicts(
- "implementation=none",
- when="+sycl",
- msg="SYCL requires compiler implementation to be specified by option=",
+ variant(
+ "kokkos_backend",
+ values=("cuda", "omp", "none"),
+ default="none",
+ when="+kokkos",
+ description="Enable Backend Target for kokkos",
)
conflicts(
- "implementation=none",
- when="+thrust",
- msg="Which Thrust implementation to use, supported options include:\
- - CUDA (via https://github.com/NVIDIA/thrust)\
- - ROCM (via https://github.com/ROCmSoftwarePlatform/rocThrust)",
+ "ocl_backend=none",
+ when="+ocl",
+ msg="OpenCL implementation requires backend to be specfied by ocl_backend=",
)
+ # depends_on("rocm-opencl@6.0.2", when="+ocl ocl_backend=amd")
+ depends_on("cuda", when="+ocl ocl_backend=cuda")
+ depends_on("cuda", when="+sycl2020 sycl2020_offload=nvidia")
+ depends_on("intel-oneapi-compilers", when="+ocl ocl_backend=intel")
+ depends_on("pocl@1.5", when="+ocl ocl_backend=pocl")
+
+ variant(
+ "cuda_extra_flags",
+ values=str,
+ default="none",
+ description="Additional CUDA Compiler flags to be provided",
+ )
+
+ # CMake specific dependency
+ with when("build_system=cmake"):
+ depends_on("cmake@3.14.0:", type="build")
# This applies to all
- depends_on("cmake@3.14.0:", type="build")
depends_on("opencl-c-headers", when="+ocl")
+ # Fortran related configurations
+ with when("languages=fortran"):
+ implementation_vals = [
+ "DoConcurrent",
+ "Array",
+ "OpenMP",
+ "OpenMPWorkshare",
+ "OpenMPTarget",
+ "OpenMPTargetLoop",
+ "OpenMPTaskloop",
+ "OpenACC",
+ "OpenACCArray",
+ "CUDA",
+ "CUDAKernel",
+ "Sequential",
+ ]
+ variant(
+ "foption",
+ values=implementation_vals,
+ default="Sequential",
+ description="Implementation",
+ )
+ # The fortran Makefile is inside the src/fortran so we need to address this
+ build_directory = "src/fortran"
+ build_name = ""
+ variant(
+ "fortran_flags",
+ values=str,
+ default="none",
+ description="Additional Fortran flags to be provided",
+ )
+
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
- # convert spec to string to work on it
- spec_string = str(self.spec)
-
- # take only the first portion of the spec until space
- spec_string_truncate = spec_string.split(" ", 1)[0]
- model_list = find_model_flag(spec_string_truncate) # Prints out ['cuda', 'thrust']
-
- if len(model_list) > 1:
- ignore_list = ["cuda"] # if +acc is provided ignore the cuda model
- model = list(set(model_list) - set(ignore_list))
- # We choose 'thrust' from the list of ['cuda', 'thrust']
- args = ["-DMODEL=" + model[0]]
+ model_list = [
+ "sycl",
+ "sycl2020",
+ "omp",
+ "cuda",
+ "ocl",
+ "tbb",
+ "acc",
+ "hip",
+ "thrust",
+ "raja",
+ "std",
+ "kokkos",
+ ]
+ # for +acc and +thrust the CudaPackage appends +cuda variant too so we need
+ # to filter cuda from list e.g. we choose 'thrust'
+ # from the list of ['cuda', 'thrust']
+ model_names = [name for name in model_list if f"+{name}" in self.spec]
+ print("model names : ", model_names)
+ if len(model_names) > 1:
+ model_names = [elem for elem in model_names if (elem != "cuda" and elem != "rocm")]
+ if "std" in model_names[0]:
+ args = ["-DMODEL=" + "std-" + self.spec.variants["std_submodel"].value]
+ elif "sycl2020" in model_names[0]: # this is for nvidia offload
+ args = ["-DMODEL=" + "sycl2020-" + self.spec.variants["sycl2020_submodel"].value]
+ else:
+ args = ["-DMODEL=" + model_names[0]]
else:
- # if it is +stddata,indices etc. we need to pass it
- # as std-data to the CMake compiler
- # do some alterations here
- if "std" in model_list[0]:
- args = ["-DMODEL=" + "std-" + model_list[0].split("d", 1)[1]]
+ # do some alterations here to append sub models too
+ if "std" in model_names[0]:
+ args = ["-DMODEL=" + "std-" + self.spec.variants["std_submodel"].value]
+ elif "sycl2020" in model_names[0]:
+ args = ["-DMODEL=" + "sycl2020-" + self.spec.variants["sycl2020_submodel"].value]
+ print(args)
+ elif "rocm" in model_names[0]:
+ args = ["-DMODEL=hip"]
else:
- args = ["-DMODEL=" + model_list[0]]
+ args = ["-DMODEL=" + model_names[0]]
+ if model_names[0] != "tbb" and model_names[0] != "thrust":
+ args.append("-DCMAKE_CXX_COMPILER=" + spack_cxx)
# ===================================
# ACC
# ===================================
- if ("+acc" in self.spec) and ("~cuda" in self.spec):
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
+ """
+ register_flag_optional(TARGET_DEVICE
+ "[PGI/NVHPC only] This sets the `-target` flag, possible values are:
+ gpu - Globally set the target device to an NVIDIA GPU
+ multicore - Globally set the target device to the host CPU
+ Refer to `nvc++ --help` for the full list"
+ register_flag_optional(CUDA_ARCH
+ "[PGI/NVHPC only] Only applicable if `TARGET_DEVICE` is set to `gpu`.
+ Nvidia architecture in ccXY format, for example, sm_70 becomes cc70,
+ will be passed in via `-gpu=` (e.g `cc70`)
+ Possible values are:
+ cc35 - Compile for compute capability 3.5
+ cc50 - Compile for compute capability 5.0
+ cc60 - Compile for compute capability 6.0
+ cc62 - Compile for compute capability 6.2
+ cc70 - Compile for compute capability 7.0
+ cc72 - Compile for compute capability 7.2
+ cc75 - Compile for compute capability 7.5
+ cc80 - Compile for compute capability 8.0
+ ccall - Compile for all supported compute capabilities
+ Refer to `nvc++ --help` for the full list"
+ "")
+
+register_flag_optional(TARGET_PROCESSOR
+ "[PGI/NVHPC only] This sets the `-tp` (target processor) flag, possible values are:
+ px - Generic x86 Processor
+ bulldozer - AMD Bulldozer processor
+ piledriver - AMD Piledriver processor
+ zen - AMD Zen architecture (Epyc, Ryzen)
+ zen2 - AMD Zen 2 architecture (Ryzen 2)
+ sandybridge - Intel SandyBridge processor
+ haswell - Intel Haswell processor
+ knl - Intel Knights Landing processor
+ skylake - Intel Skylake Xeon processor
+ host - Link native version of HPC SDK cpu math library
+ native - Alias for -tp host
+ Refer to `nvc++ --help` for the full list"
+ "")
+ """
+ if self.spec.satisfies("+acc~kokkos~raja %nvhpc"):
+ target_device = "gpu" if "cuda_arch" in self.spec.variants else "multicore"
if "cuda_arch" in self.spec.variants:
cuda_arch_list = self.spec.variants["cuda_arch"].value
- # the architecture value is only number so append sm_ to the name
+ # the architecture value is only number so append cc_ to the name
cuda_arch = "cc" + cuda_arch_list[0]
- args.append("-DTARGET_DEVICE=gpu")
+ # args.append(
+ # "-DCXX_EXTRA_FLAGS=" + "-target=" + target_device + "-gpu=" + cuda_arch
+ # )
args.append("-DCUDA_ARCH=" + cuda_arch)
- elif "cpu_arch" in self.spec.variants:
- cpu_arch_list = self.spec.variants["cpu_arch"].value
- # the architecture value is only number so append sm_ to the name
- cpu_arch = cpu_arch_list[0]
- args.append("-DTARGET_DEVICE=multicore")
- args.append("-DTARGET_PROCESSOR=" + cpu_arch)
-
+ else:
+ # get the cpu architecture value from user
+ target_processor = str(self.spec.target) # self.spec.variants["cpu_arch"].value[0]
+ args.append("-DTARGET_PROCESSOR=" + target_processor)
+ # args.append(
+ # "-DCXX_EXTRA_FLAGS="
+ # + "-target="
+ # + target_device
+ # + "-tp="
+ # + target_processor
+ # )
+ args.append("-DTARGET_DEVICE=" + target_device)
# ===================================
# STDdata,STDindices,STDranges
# ===================================
- std_list = ["+stddata", "+stdindices", "+stdranges"]
- if spec_string.startswith(tuple(std_list)):
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
+
+ if "+std" in self.spec:
+ if self.spec.satisfies("+std_use_tbb"):
+ args.append("-DCXX_EXTRA_FLAGS=-ltbb")
+ if self.spec.satisfies("+std_use_onedpl"):
+ # args.append("-DCXX_EXTRA_FLAGS=-ltbb")
+ # args.append("-DCXX_EXTRA_FLAGS=-loneDPL")
+ args.append(
+ "-DUSE_ONEDPL=" + self.spec.variants["std_onedpl_backend"].value.upper()
+ )
+ if self.spec.variants["std_offload"].value != "none":
+ # the architecture value is only number so append cc_ to the name
+ cuda_arch = "cc" + self.spec.variants["cuda_arch"].value[0]
+ args.append("-DNVHPC_OFFLOAD=" + cuda_arch)
# ===================================
# CUDA
# ===================================
-
- if ("+cuda" in self.spec) and ("~kokkos" in self.spec) and ("~acc" in self.spec):
+ if self.spec.satisfies("+cuda~kokkos~acc~omp~thrust~raja"):
# Set up the cuda macros needed by the build
cuda_arch_list = self.spec.variants["cuda_arch"].value
+ # "-DCUDA_ARCH" requires sm_
# the architecture value is only number so append sm_ to the name
cuda_arch = "sm_" + cuda_arch_list[0]
args.append("-DCUDA_ARCH=" + cuda_arch)
cuda_dir = self.spec["cuda"].prefix
cuda_comp = cuda_dir + "/bin/nvcc"
args.append("-DCMAKE_CUDA_COMPILER=" + cuda_comp)
- args.append("-DMEM=" + self.spec.variants["mem"].value)
- if self.spec.variants["flags"].value != "none":
- args.append("-DCUDA_EXTRA_FLAGS=" + self.spec.variants["flags"].value)
+ args.append("-DMEM=" + self.spec.variants["cuda_memory_mode"].value.upper())
+ if self.spec.variants["cuda_extra_flags"].value != "none":
+ args.append("-DCUDA_EXTRA_FLAGS=" + self.spec.variants["cuda_extra_flags"].value)
# ===================================
# OMP
# ===================================
# `~kokkos` option is there to prevent +kokkos +omp setting to use omp directly from here
# Same applies for raja
- if ("+omp" in self.spec) and ("~kokkos" in self.spec) and ("~raja" in self.spec):
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
- if "cuda_arch" in self.spec.variants:
- cuda_arch_list = self.spec.variants["cuda_arch"].value
- # the architecture value is only number so append sm_ to the name
- cuda_arch = "sm_" + cuda_arch_list[0]
- args.append("-DOFFLOAD= " + "NVIDIA:" + cuda_arch)
- elif "amdgpu_target" in self.spec.variants:
- rocm_arch = self.spec.variants["amdgpu_target"].value
- # the architecture value is only number so append sm_ to the name
- args.append("-DOFFLOAD=" + " AMD:" + rocm_arch)
+ if self.spec.satisfies("+omp~kokkos~raja"):
+ args.append("-DCMAKE_C_COMPILER=" + spack_cc)
+ if self.spec.satisfies("~omp_offload"):
+ args.append("-DOFFLOAD=" + "OFF")
+ # Check if the omp_flags variant is not set to "none"
+ args.append(
+ "-DCMAKE_CXX_FLAGS="
+ + self.pkg.compiler.openmp_flag
+ + " "
+ + (
+ self.spec.variants["omp_flags"].value
+ if self.spec.variants["omp_flags"].value != "none"
+ else ""
+ )
+ )
else:
- args.append("-DOFFLOAD=" + "INTEL")
+ offload_args = ""
+ args.append("-DOFFLOAD=ON")
+ if "cuda_arch" in self.spec.variants:
+ if self.spec.satisfies("%nvhpc"):
+ cuda_arch = "cc" + self.spec.variants["cuda_arch"].value[0]
+ offload_args = " -mp=gpu;" + "-gpu=" + cuda_arch + " "
+ if self.spec.satisfies("%clang"):
+ cuda_arch = "sm_" + self.spec.variants["cuda_arch"].value[0]
+ offload_args = "-fopenmp;--offload-arch=" + cuda_arch
+ elif ("amdgpu_target" in self.spec.variants) and (
+ self.spec.variants["amdgpu_target"].value != "none"
+ ):
+ offload_args = (
+ ";--offload-arch=" + self.spec.variants["amdgpu_target"].value[0]
+ )
+
+ args.append(
+ "-DOFFLOAD_FLAGS="
+ + self.pkg.compiler.openmp_flag
+ + ";"
+ + offload_args
+ + ";"
+ + self.spec.variants["omp_flags"].value
+ )
# ===================================
- # SYCL
+ # SYCL
# ===================================
if "+sycl" in self.spec:
- args.append("-DSYCL_COMPILER=" + self.spec.variants["implementation"].value.upper())
- if self.spec.variants["implementation"].value.upper() != "ONEAPI-DPCPP":
- args.append(
- "-DSYCL_COMPILER_DIR=" + self.spec.variants["implementation"].value.upper()
- )
- if self.spec.variants["implementation"].value.upper() == "COMPUTE-CPP":
- args.append("-DOpenCL_LIBRARY=")
+ if self.spec.satisfies("%oneapi"):
+ # -fsycl flag is required for setting up sycl/sycl.hpp seems like
+ # it doesn't get it from the CMake file
+ args.append("-DSYCL_COMPILER=ONEAPI-ICPX")
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
+ elif self.spec.satisfies("%clang"):
+ # this requires the clang inside oneapi installation
+ args.append("-DSYCL_COMPILER=ONEAPI-Clang")
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
+ else:
+ args.append("-DSYCL_COMPILER=HIPSYCL")
+ args.append("-DSYCL_COMPILER_DIR=" + self.spec.variants["dir"].value)
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
# ===================================
- # SYCL 2020
+ # SYCL 2020
# ===================================
if "+sycl2020" in self.spec:
if self.spec.satisfies("%oneapi"):
# -fsycl flag is required for setting up sycl/sycl.hpp seems like
# it doesn't get it from the CMake file
- args.append("-DCXX_EXTRA_FLAGS= -fsycl -O3")
- # this is required to enable -DCMAKE_CXX_COMPILER=icpx flag from CMake
args.append("-DSYCL_COMPILER=ONEAPI-ICPX")
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
+ elif self.spec.satisfies("%clang"):
+ # this requires the clang inside oneapi installation
+ args.append("-DSYCL_COMPILER=ONEAPI-Clang")
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
else:
+ args.append("-DSYCL_COMPILER=HIPSYCL")
+ args.append("-DSYCL_COMPILER_DIR=" + self.spec.variants["dir"].value)
+ args.append("-DCXX_EXTRA_FLAGS= -fsycl")
+ # if self.spec.variants["flags"].value != "none":
+ if self.spec.variants["sycl2020_offload"].value == "nvidia":
+ cuda_dir = self.spec["cuda"].prefix
+ cuda_arch = "sm_" + self.spec.variants["cuda_arch"].value[0]
args.append(
- "-DSYCL_COMPILER=" + self.spec.variants["implementation"].value.upper()
- )
- if self.spec.variants["implementation"].value.upper() != "ONEAPI-DPCPP":
- args.append(
- "-DSYCL_COMPILER_DIR=" + self.spec.variants["implementation"].value.upper()
+ "-DCXX_EXTRA_FLAGS="
+ + "-fsycl;-fsycl-targets=nvptx64-nvidia-cuda;"
+ + self.spec.target.optimization_flags(
+ self.spec.compiler.name, str(self.spec.compiler.version)
)
- if self.spec.variants["implementation"].value.upper() == "COMPUTE-CPP":
- args.append("-DOpenCL_LIBRARY=")
+ + " --cuda-path="
+ + cuda_dir
+ )
# ===================================
# HIP(ROCM)
# ===================================
- if "+rocm" in self.spec:
- hip_comp = self.spec["rocm"].prefix + "/bin/hipcc"
+ if "+hip" in self.spec:
+ hip_comp = self.spec["hip"].prefix + "/bin/hipcc"
+ offload_arch = str(self.spec.variants["amdgpu_target"].value[0])
+
args.append("-DCMAKE_CXX_COMPILER=" + hip_comp)
- args.append(
- "-DCXX_EXTRA_FLAGS= --offload-arch="
- + self.spec.variants["amdgpu_target"].value
- + " "
- + self.spec.variants["flags"].value
- + " -O3"
- )
+ args.append(f"-DCXX_EXTRA_FLAGS=--offload-arch={offload_arch} -O3")
+ if str(self.spec.variants["hip_mem_mode"].value) != "none":
+ args.append("-DMEM=" + self.spec.variants["hip_mem_mode"].value.upper())
# ===================================
# TBB
# ===================================
if "+tbb" in self.spec:
- args.append("-DONE_TBB_DIR=" + self.spec["tbb"].prefix + "/tbb/latest/")
- args.append("-DPARTITIONER=" + self.spec.variants["partitioner"].value.upper())
+ args.append("-DONE_TBB_DIR=" + self.spec["intel-tbb"].prefix + "/tbb/latest/")
+ args.append("-DCXX_EXTRA_FLAGS=-ltbb")
+ args.append("-DPARTITIONER=" + self.spec.variants["tbb_partitioner"].value.upper())
+ if self.spec.satisfies("+tbb_use_vector"):
+ args.append("-DUSE_VECTOR=ON")
# ===================================
# OpenCL (ocl)
# ===================================
+
if "+ocl" in self.spec:
- if "backend" in self.spec.variants:
- if "cuda" in self.spec.variants["backend"].value:
- cuda_dir = self.spec["cuda"].prefix
- args.append("-DOpenCL_LIBRARY=" + cuda_dir + "/lib64/libOpenCL.so")
- elif "amd" in self.spec.variants["backend"].value:
- rocm_dir = self.spec["rocm-opencl"].prefix
- args.append("-DOpenCL_LIBRARY=" + rocm_dir + "/lib64/libOpenCL.so")
- elif "intel" in self.spec.variants["backend"].value:
- intel_lib = (
- self.spec["intel-oneapi-compilers"].prefix
- + "/compiler/2023.0.0/linux/lib/libOpenCL.so"
- )
- args.append("-DOpenCL_LIBRARY=" + intel_lib)
- elif "pocl" in self.spec.variants["backend"].value:
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
- pocl_lib = self.spec["pocl"].prefix + "/lib64/libOpenCL.so"
- args.append("-DOpenCL_LIBRARY=" + pocl_lib)
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
+ if "cuda" in self.spec.variants["ocl_backend"].value:
+ cuda_dir = self.spec["cuda"].prefix
+ args.append("-DOpenCL_LIBRARY=" + cuda_dir + "/lib64/libOpenCL.so")
+ elif "amd" in self.spec.variants["ocl_backend"].value:
+ rocm_dir = self.spec["rocm-opencl"].prefix
+ args.append("-DOpenCL_LIBRARY=" + rocm_dir + "/lib64/libOpenCL.so")
+ elif "intel" in self.spec.variants["ocl_backend"].value:
+ intel_lib = (
+ self.spec["intel-oneapi-compilers"].prefix
+ + "/compiler/"
+ + str(self.spec["intel-oneapi-compilers"].version)
+ + "/linux/lib/libOpenCL.so"
+ )
+ args.append("-DOpenCL_LIBRARY=" + intel_lib)
+ elif "pocl" in self.spec.variants["ocl_backend"].value:
+ pocl_lib = self.spec["pocl"].prefix + "/lib64/libOpenCL.so"
+ args.append("-DOpenCL_LIBRARY=" + pocl_lib)
# ===================================
# RAJA
# ===================================
+
if "+raja" in self.spec:
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
- args.append("-DRAJA_IN_TREE=" + self.spec.variants["dir"].value)
- if "offload" in self.spec.variants:
- if "nvidia" in self.spec.variants["offload"].value:
- cuda_dir = self.spec["cuda"].prefix
- cuda_comp = cuda_dir + "/bin/nvcc"
- args.append("-DCMAKE_CUDA_COMPILER=" + cuda_comp)
- args.append("-DTARGET=NVIDIA")
- cuda_arch_list = self.spec.variants["cuda_arch"].value
- int_cuda_arch = int(cuda_arch_list[0])
- cuda_arch = "sm_" + cuda_arch_list[0]
- args.append("-DCUDA_ARCH=" + cuda_arch)
-
- args.append("DCUDA_TOOLKIT_ROOT_DIR=" + self.spec["cuda"].prefix)
- if self.spec.variants["flags"].value != "none":
- args.append("-DCUDA_EXTRA_FLAGS=" + self.spec.variants["flags"].value)
- # if("cpu" in self.spec.variants['offload'].value):
-
- if "omp" in self.spec.variants["backend"].value:
- args.append("-DENABLE_OPENMP=ON")
- if "cuda" in self.spec.variants["backend"].value:
+ args.append("-DCMAKE_C_COMPILER=" + spack_cc)
+ args.append("-DRAJA_IN_PACKAGE=" + self.spec["raja"].prefix)
+ if "nvidia" in self.spec.variants["raja_offload"].value:
+ cuda_comp = self.spec["cuda"].prefix + "/bin/nvcc"
+ args.append("-DTARGET=NVIDIA")
+ cuda_arch = "sm_" + self.spec.variants["cuda_arch"].value[0]
+ args.append("-DCUDA_ARCH=" + cuda_arch)
+
args.append("-DENABLE_CUDA=ON")
+ args.append("-DCUDA_TOOLKIT_ROOT_DIR=" + self.spec["cuda"].prefix)
+ if self.spec.variants["cuda_extra_flags"].value != "none":
+ args.append(
+ "-DCMAKE_CUDA_FLAGS=" + self.spec.variants["cuda_extra_flags"].value
+ )
# ===================================
# THRUST
# ===================================
+
if "+thrust" in self.spec:
- if "cuda" in self.spec.variants["implementation"].value:
- args.append("-DTHRUST_IMPL=" + self.spec.variants["implementation"].value.upper())
+ if "cuda" in self.spec.variants["thrust_submodel"].value:
+ args.append("-DTHRUST_IMPL=" + self.spec.variants["thrust_submodel"].value.upper())
+
args.append("-SDK_DIR=" + self.spec["thrust"].prefix + "/include")
- cuda_arch_list = self.spec.variants["cuda_arch"].value
- # the architecture value is only number so append sm_ to the name
- cuda_arch = "sm_" + cuda_arch_list[0]
- args.append("-DCUDA_ARCH=" + cuda_arch)
+ # this model uses CMAKE_CUDA_ARCHITECTURES which only requires number of cuda_arch
+ # no need to append sm_ or cc_
+ args.append("-DCUDA_ARCH=" + self.spec.variants["cuda_arch"].value[0])
cuda_dir = self.spec["cuda"].prefix
cuda_comp = cuda_dir + "/bin/nvcc"
args.append("-DCMAKE_CUDA_COMPILER=" + cuda_comp)
- args.append("-DBACKEND=" + self.spec.variants["backend"].value.upper())
- if self.spec.variants["flags"].value != "none":
- args.append("-DCUDA_EXTRA_FLAGS=" + self.spec.variants["flags"].value)
-
- if "rocm" in self.spec.variants["implementation"].value:
- args.append("-DTHRUST_IMPL=" + self.spec.variants["implementation"].value.upper())
+ # args.append("-DCMAKE_CUDA_COMPILER=" + spack_cxx)
+ # args.append("-DCMAKE_CUDA_FLAGS=-ccbin " + spack_cc)
+ args.append("-DBACKEND=" + self.spec.variants["thrust_backend"].value.upper())
+ if self.spec.variants["cuda_extra_flags"].value != "none":
+ args.append(
+ "-DCUDA_EXTRA_FLAGS=" + self.spec.variants["cuda_extra_flags"].value
+ )
+ if "rocm" in self.spec.variants["thrust_submodel"].value:
+ args.append("-DCMAKE_CXX_COMPILER=" + self.spec["hip"].hipcc)
+ args.append("-DTHRUST_IMPL=" + self.spec.variants["thrust_submodel"].value.upper())
args.append("-SDK_DIR=" + self.spec["rocthrust"].prefix)
- args.append("-DBACKEND=" + self.spec.variants["backend"].value.upper())
# ===================================
# kokkos
# ===================================
# kokkos implementation is versatile and it could use cuda or omp architectures as backend
- # The usage should be spack install babelstream +kokkos +cuda [or +omp]
+
+ # The usage should be spack install babelstream +kokkos backend=[cuda or omp or none]
if "+kokkos" in self.spec:
- args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
- args.append("-DKOKKOS_IN_TREE=" + self.spec.variants["dir"].value)
- # args.append("-DKOKKOS_IN_PACKAGE=" + self.spec["kokkos"].prefix)
- if "backend" in self.spec.variants:
- if "cuda" in self.spec.variants["backend"].value:
- args.append("-DKokkos_ENABLE_CUDA=ON")
- cuda_arch_list = self.spec.variants["cuda_arch"].value
- int_cuda_arch = int(cuda_arch_list[0])
- # arhitecture kepler optimisations
- if int_cuda_arch in (30, 32, 35, 37):
- args.append("-D" + "Kokkos_ARCH_KEPLER" + str(int_cuda_arch) + "=ON")
- # arhitecture maxwell optimisations
- if int_cuda_arch in (50, 52, 53):
- args.append("-D" + "Kokkos_ARCH_MAXWELL" + str(int_cuda_arch) + "=ON")
- # arhitecture pascal optimisations
- if int_cuda_arch in (60, 61):
- args.append("-D" + "Kokkos_ARCH_PASCAL" + str(int_cuda_arch) + "=ON")
- # architecture volta optimisations
- if int_cuda_arch in (70, 72):
- args.append("-D" + "Kokkos_ARCH_VOLTA" + str(int_cuda_arch) + "=ON")
- if int_cuda_arch == 75:
- args.append("-DKokkos_ARCH_TURING75=ON")
- if "omp" in self.spec.variants["backend"].value:
- args.append("-DKokkos_ENABLE_OPENMP=ON")
+ args.append("-DCMAKE_C_COMPILER=" + spack_cc)
+ args.append("-DKOKKOS_IN_PACKAGE=" + self.spec["kokkos"].prefix)
+ if "cuda" in self.spec.variants["kokkos_backend"].value:
+ # args.append("-DCMAKE_CXX_COMPILER=" + self.spec["cuda"].nvcc)
+ args.append("-DCMAKE_CXX_COMPILER=" + spack_cxx)
+ args.append("-DKokkos_ENABLE_CUDA=ON")
+ int_cuda_arch = int(self.spec.variants["cuda_arch"].value[0])
+ # arhitecture kepler optimisations
+ if int_cuda_arch in (30, 32, 35, 37):
+ args.append("-D" + "Kokkos_ARCH_KEPLER" + str(int_cuda_arch) + "=ON")
+ # arhitecture maxwell optimisations
+ if int_cuda_arch in (50, 52, 53):
+ args.append("-D" + "Kokkos_ARCH_MAXWELL" + str(int_cuda_arch) + "=ON")
+ # arhitecture pascal optimisations
+ if int_cuda_arch in (60, 61):
+ args.append("-D" + "Kokkos_ARCH_PASCAL" + str(int_cuda_arch) + "=ON")
+ # architecture volta optimisations
+ if int_cuda_arch in (70, 72):
+ args.append("-D" + "Kokkos_ARCH_VOLTA" + str(int_cuda_arch) + "=ON")
+ if int_cuda_arch == 75:
+ args.append("-DKokkos_ARCH_TURING75=ON")
+ if int_cuda_arch == 80:
+ args.append("-DKokkos_ARCH_AMPERE80=ON")
+ if "omp" in self.spec.variants["kokkos_backend"].value:
+ args.append("-DKokkos_ENABLE_OPENMP=ON")
# not in ["kokkos", "raja", "acc", "hip"] then compiler forced true
if set(model_list).intersection(["kokkos", "raja", "acc", "hip"]) is True:
args.append("-DCMAKE_CXX_COMPILER_FORCED=True")
return args
+
+
+class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
+ build_directory = "src/fortran"
+
+ # Generate Compiler Specific includes
+ def edit(self, pkg, spec, prefix):
+ config = {
+ "FC": pkg.compiler.fc,
+ "FCFLAGS": "",
+ "ARCH": spec.target.family,
+ "DOCONCURRENT_FLAG": "",
+ "ARRAY_FLAG": "",
+ "OPENMP_FLAG": "",
+ "OPENACC_FLAG": "",
+ "CUDA_FLAG": "",
+ "SEQUENTIAL_FLAG": "",
+ }
+ # Dictionary mapping compiler names to unsupported options
+ unsupported_options = {
+ "arm": ["CUDA", "CUDAKernel", "OpenACC", "OpenACCArray"],
+ "aocc": ["CUDA", "CUDAKernel"],
+ "cce": ["CUDA", "CUDAKernel"],
+ "gcc": ["CUDA", "CUDAKernel"],
+ "nvhpc": ["OpenMPTaskloop"],
+ "oneapi": ["CUDA", "CUDAKernel", "OpenACC", "OpenACCArray"],
+ "fj": ["CUDA", "CUDAKernel", "OpenACC"],
+ }
+
+ # Check if spec.compiler.name is in the unsupported_options dictionary
+ unsupported_value = self.spec.variants["foption"].value
+ compiler_name = spec.compiler.name
+ unsupported = any(
+ unsupported_value in options
+ for options in unsupported_options.get(compiler_name, [])
+ if options == unsupported_value
+ )
+ if unsupported:
+ raise InstallError(
+ f"{unsupported_value} is not supported by the {compiler_name} compiler"
+ )
+ # ===================================
+ # ARM
+ # ===================================
+ if spec.compiler.name == "arm":
+ fortran_flags = (
+ "-std=f2018 " + pkg.compiler.opt_flags[4] + " -Wall -Wno-unused-variable"
+ )
+ fortran_flags += self.spec.target.optimization_flags(
+ self.spec.compiler.name, str(self.spec.compiler.version)
+ )
+
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["ARRAY_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["OPENMP_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["OPENACC_FLAG"] = "-fopenacc"
+
+ # ===================================
+ # AMD
+ # ===================================
+ if spec.compiler.name == "aocc":
+ fortran_flags = (
+ "-std=f2018 " + pkg.compiler.opt_flags[3] + " -Wall -Wno-unused-variable"
+ )
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["ARRAY_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["OPENMP_FLAG"] = pkg.compiler.openmp_flag # libomp.so required
+ config["OPENACC_FLAG"] = "-fopenacc"
+
+ # ===================================
+ # CRAY
+ # ===================================
+ if spec.compiler.name == "cce":
+ fortran_flags = "-e F -O3"
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = "-h thread_do_concurrent -DCRAY_THREAD_DOCONCURRENT"
+ config["ARRAY_FLAG"] = "-h autothread"
+ config["OPENMP_FLAG"] = pkg.compiler.openmp_flag
+ config["OPENACC_FLAG"] = "-h acc" # for cpu only -h omp
+
+ # ===================================
+ # GCC
+ # ===================================
+ if spec.compiler.name == "gcc":
+ fortran_flags = "-std=f2018 -O3 "
+ fortran_flags += "-Wall -Wno-unused-dummy-argument -Wno-unused-variable "
+ fortran_flags += self.spec.target.optimization_flags(
+ self.spec.compiler.name, str(self.spec.compiler.version)
+ )
+
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = "-ftree-parallelize-loops=4"
+ config["OPENMP_FLAG"] = pkg.compiler.openmp_flag
+ config["OPENACC_FLAG"] = "-fopenacc"
+
+ # ===================================
+ # NVHPC
+ # ===================================
+ if spec.compiler.name == "nvhpc":
+ fortran_flags = pkg.compiler.opt_flags[4] # for -O3
+ # FCFLAGS := -O3 -Minform=inform -Minfo=all
+ fortran_flags += " -Minform=warn "
+ TARGET = "gpu" # target = "multicore"
+ config["TARGET"] = TARGET
+ if "cuda_arch" in self.spec.variants:
+ cuda_arch_list = self.spec.variants["cuda_arch"].value
+ # the architecture value is only number so append sm_ to the name
+ cuda_arch = "cc" + cuda_arch_list[0]
+ GPUFLAG = " -gpu=" + cuda_arch
+ fortran_flags += "-tp=" + str(spec.target)
+ # this is to allow apples-to-apples comparison with DC in non-DC GPU impls
+ # set exactly one of these pairs!
+ # MANAGED = "-DUSE_MANAGED -gpu=managed"
+ # DEVICE=""
+ # ------------
+ DEVICE = "-DUSE_DEVICE -cuda -gpu=nomanaged"
+ MANAGED = ""
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = GPUFLAG + " -stdpar=" + TARGET + " " + DEVICE
+ config["ARRAY_FLAG"] = GPUFLAG + " -stdpar=" + TARGET + " " + MANAGED
+ config["OPENMP_FLAG"] = GPUFLAG + " -mp=" + TARGET + " " + MANAGED
+ config["OPENACC_FLAG"] = GPUFLAG + " -acc=" + TARGET + " " + MANAGED
+ config["CUDA_FLAG"] = GPUFLAG + " -cuda -acc=gpu" + " " + MANAGED
+
+ # ===================================
+ # ONEAPI
+ # ===================================
+ if spec.compiler.name == "oneapi":
+ fortran_flags = "-std18 -Ofast -xHOST -qopt-zmm-usage=low"
+ if config["FC"] == "ifort":
+ fortran_flags += "-qopt-streaming-stores=always"
+
+ config["DOCONCURRENT_FLAG"] = "-qopenmp" + (
+ "-parallel" if config["FC"] == "ifort" else ""
+ )
+ config["ARRAY_FLAG"] = "-qopenmp" + ("-parallel" if config["FC"] == "ifort" else "")
+ config["OPENMP_FLAG"] = "-qopenmp" + (
+ "-fopenmp-targets=spir64 -DUSE_FLOAT=1" if config["FC"] == "ifx" else ""
+ )
+ config["FCFLAGS"] = fortran_flags
+
+ # ===================================
+ # FJ
+ # ===================================
+ if spec.compiler.name == "fj":
+ fortran_flags = "-X08 -Kfast -KA64FX -KSVE -KARMV8_3_A -Kzfill=100 "
+ fortran_flags += "-Kprefetch_sequential=soft "
+ fortran_flags += "-Kprefetch_line=8 -Kprefetch_line_L2=16 -Koptmsg=2 "
+ # FJ Fortran system_clock is low resolution
+ fortran_flags += "-Keval -DUSE_OMP_GET_WTIME=1 "
+
+ config["FCFLAGS"] = fortran_flags
+ config["DOCONCURRENT_FLAG"] = "-Kparallel,reduction -DNOTSHARED"
+ config["ARRAY_FLAG"] = "-Kparallel,reduction"
+ config["OPENMP_FLAG"] = pkg.compiler.openmp_flag
+
+ with open(self.build_directory + "/make.inc." + spec.compiler.name, "w+") as inc:
+ for key in config:
+ inc.write("{0} = {1}\n".format(key, config[key]))
+
+ def setup_build_environment(self, env):
+ ######################################
+ # Build and Installation Directories #
+ ######################################
+
+ # The environment variable ESMF_DIR must be set to the full pathname
+ # of the top level ESMF directory before building the framework.
+ env.set("COMPILER", self.spec.compiler.name)
+ env.set("IMPLEMENTATION", self.spec.variants["foption"].value)
+ # DEBUG
+ # print(self.spec.variants["foption"].value)
+ # print(self.spec.compiler.version)
+ # print(platform.machine())
+ # This creates a testing tree (if one doesn't already exist) and
+ # copies the binaries from `src/fortran` to `SpackPackage/bin`.
+ # This allows you to use the testing tree independently of the
+ # source tree in the future.
+ # print(pkg.compiler.cc_pic_flag)
+
+ @property
+ def build_name(self):
+ compiler_prefix = self.spec.compiler.name
+ implementation_prefix = self.spec.variants["foption"].value
+ return "{}.{}.{}".format("BabelStream", compiler_prefix, implementation_prefix)
+
+ def install(self, pkg, spec, prefix):
+ mkdir(prefix.bin)
+ install(self.build_directory + "/" + self.build_name, prefix.bin)
+ # To check the make.inc file generated
+ install_tree(self.build_directory, prefix.lib)
diff --git a/var/spack/repos/builtin/packages/babeltrace/package.py b/var/spack/repos/builtin/packages/babeltrace/package.py
index af0552d6a0..59e565b545 100644
--- a/var/spack/repos/builtin/packages/babeltrace/package.py
+++ b/var/spack/repos/builtin/packages/babeltrace/package.py
@@ -16,8 +16,12 @@ class Babeltrace(AutotoolsPackage):
license("MIT")
+ version("1.5.11", sha256="67b43aaaef5c951fa7af1a557cf7201a11fe89876b7c22ba0a03cbc316db5a9c")
version("1.2.4", sha256="666e3a1ad2dc7d5703059963056e7800f0eab59c8eeb6be2efe4f3acc5209eb1")
+ depends_on("c", type="build") # generated
+
+ depends_on("pkgconfig", type="build")
depends_on("glib@2.22:", type=("build", "link"))
depends_on("uuid")
depends_on("popt")
diff --git a/var/spack/repos/builtin/packages/babl/package.py b/var/spack/repos/builtin/packages/babl/package.py
index dc9b480eae..f4ce9d3be4 100644
--- a/var/spack/repos/builtin/packages/babl/package.py
+++ b/var/spack/repos/builtin/packages/babl/package.py
@@ -15,12 +15,13 @@ class Babl(MesonPackage):
component permutations."""
homepage = "https://gegl.org/babl"
- url = "https://download.gimp.org/babl/0.1/babl-0.1.98.tar.xz"
+ url = "https://download.gimp.org/babl/0.1/babl-0.1.108.tar.xz"
maintainers("benkirk")
license("LGPL-3.0-or-later")
+ version("0.1.108", sha256="26defe9deaab7ac4d0e076cab49c2a0d6ebd0df0c31fd209925a5f07edee1475")
version("0.1.106", sha256="d325135d3304f088c134cc620013acf035de2e5d125a50a2d91054e7377c415f")
version("0.1.102", sha256="a88bb28506575f95158c8c89df6e23686e50c8b9fea412bf49fe8b80002d84f0")
version("0.1.98", sha256="f3b222f84e462735de63fa9c3651942f2b78fd314c73a22e05ff7c73afd23af1")
@@ -29,7 +30,10 @@ class Babl(MesonPackage):
version("0.1.92", sha256="f667735028944b6375ad18f160a64ceb93f5c7dccaa9d8751de359777488a2c1")
version("0.1.90", sha256="6e2ebb636f37581588e3d02499b3d2f69f9ac73e34a262f42911d7f5906a9243")
+ depends_on("c", type="build")
+
depends_on("cmake@3.4:", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("lcms")
depends_on("gobject-introspection")
diff --git a/var/spack/repos/builtin/packages/bacio/package.py b/var/spack/repos/builtin/packages/bacio/package.py
index fba81bb118..18a80fdcd3 100644
--- a/var/spack/repos/builtin/packages/bacio/package.py
+++ b/var/spack/repos/builtin/packages/bacio/package.py
@@ -7,7 +7,7 @@ from spack.package import *
class Bacio(CMakePackage):
- """The bacio ibrary performs binary I/O for the NCEP models, processing
+ """The bacio library performs binary I/O for the NCEP models, processing
unformatted byte-addressable data records, and transforming the little
endian files and big endian files."""
@@ -15,21 +15,15 @@ class Bacio(CMakePackage):
url = "https://github.com/NOAA-EMC/NCEPLIBS-bacio/archive/refs/tags/v2.4.1.tar.gz"
git = "https://github.com/NOAA-EMC/NCEPLIBS-bacio"
- maintainers("t-brown", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
+ maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
version("develop", branch="develop")
version("2.6.0", sha256="03fef581e1bd3710fb8d2f2659a6c3e01a0437c1350ba53958d2ff1ffef47bcb")
version("2.5.0", sha256="540a0ed73941d70dbf5d7b21d5d0a441e76fad2bfe37dfdfea0db3e98fc0fbfb")
+ version("2.4.1", sha256="7b9b6ba0a288f438bfba6a08b6e47f8133f7dba472a74ac56a5454e2260a7200")
- # Prefer version 2.4.1 because the library and include directory
- # names changed in verion 2.5.0 (dropping the "_4" they used to
- # contain.) We need some time to let all the using packages adjust
- # to the new names.
- version(
- "2.4.1",
- sha256="7b9b6ba0a288f438bfba6a08b6e47f8133f7dba472a74ac56a5454e2260a7200",
- preferred=True,
- )
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
variant("pic", default=True, description="Build with position-independent-code")
variant("shared", default=False, description="Build shared library", when="@2.6.0:")
@@ -43,3 +37,7 @@ class Bacio(CMakePackage):
def patch(self):
if self.spec.satisfies("@2.4.1"):
filter_file(".+", "2.4.1", "VERSION")
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/backward-cpp/package.py b/var/spack/repos/builtin/packages/backward-cpp/package.py
new file mode 100644
index 0000000000..7905f6682a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/backward-cpp/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2023 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.package import *
+
+
+class BackwardCpp(CMakePackage):
+ """A beautiful stack trace pretty printer for C++."""
+
+ homepage = "https://github.com/bombela/backward-cpp"
+ git = "https://github.com/bombela/backward-cpp.git"
+ url = "https://github.com/bombela/backward-cpp/archive/refs/tags/v1.6.tar.gz"
+
+ license("MIT")
+
+ version("master", branch="master")
+ version("1.6", sha256="c654d0923d43f1cea23d086729673498e4741fb2457e806cfaeaea7b20c97c10")
+ version("1.5", sha256="faf7d4fe7ca65117ed4fe7be9bff9628927bd95b49f71df63d5f99af233d1915")
+ version("1.4", sha256="ad73be31c5cfcbffbde7d34dba18158a42043a109e7f41946f0b0abd589ed55e")
+ version("1.3", sha256="4bf3fb7029ff551acda6578d9d8e13d438ebdd82a787a82b157728e3af6b5dec")
+ version("1.2", sha256="0a44fdad126cf2c53f93c33fd6418abaf99672048c98a5a57e2a2e43a38d5f84")
+ version("1.1", sha256="36139e98b8b6a8ff84b28c50fd6443054ccee93cf63231fdd1db0036093553c4")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("dwarf", default=False, description="Use libdwarf/libelf to read debug info")
+
+ depends_on("libdwarf", when="+dwarf")
+
+ def cmake_args(self):
+ return ["-DBACKWARD_SHARED=ON"]
diff --git a/var/spack/repos/builtin/packages/bam-readcount/package.py b/var/spack/repos/builtin/packages/bam-readcount/package.py
index 3a5bb85905..e7373d4cdc 100644
--- a/var/spack/repos/builtin/packages/bam-readcount/package.py
+++ b/var/spack/repos/builtin/packages/bam-readcount/package.py
@@ -17,5 +17,7 @@ class BamReadcount(CMakePackage):
version("1.0.1", sha256="8ebf84d9efee0f2d3b43f0452dbf16b27337c960e25128f6a7173119e62588b8")
version("0.8.0", sha256="4f4dd558e3c6bfb24d6a57ec441568f7524be6639b24f13ea6f2bb350c7ea65f")
+ depends_on("cxx", type="build") # generated
+
def setup_build_environment(self, env):
env.append_flags("CFLAGS", self.compiler.cc_pic_flag)
diff --git a/var/spack/repos/builtin/packages/bamaddrg/package.py b/var/spack/repos/builtin/packages/bamaddrg/package.py
index ae30012e3a..fe0f4c5184 100644
--- a/var/spack/repos/builtin/packages/bamaddrg/package.py
+++ b/var/spack/repos/builtin/packages/bamaddrg/package.py
@@ -16,6 +16,8 @@ class Bamaddrg(MakefilePackage):
version("0.1", sha256="725a689d8326d72f865837b231005a9211d6c70a25b7a3a754df4f90d2996355")
+ depends_on("cxx", type="build") # generated
+
depends_on("bamtools", type="build")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/bamdst/package.py b/var/spack/repos/builtin/packages/bamdst/package.py
index 9080d471e2..e89438222a 100644
--- a/var/spack/repos/builtin/packages/bamdst/package.py
+++ b/var/spack/repos/builtin/packages/bamdst/package.py
@@ -14,6 +14,8 @@ class Bamdst(MakefilePackage):
version("master", git="https://github.com/shiquan/bamdst.git")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
parallel = False
diff --git a/var/spack/repos/builtin/packages/bamtools/package.py b/var/spack/repos/builtin/packages/bamtools/package.py
index f6007ae761..cb26f3b686 100644
--- a/var/spack/repos/builtin/packages/bamtools/package.py
+++ b/var/spack/repos/builtin/packages/bamtools/package.py
@@ -24,6 +24,8 @@ class Bamtools(CMakePackage):
version("2.3.0", sha256="288046e6d5d41afdc5fce8608c5641cf2b8e670644587c1315b90bbe92f039af")
version("2.2.3", sha256="92ddef44801a1f8f01ce1a397f83e0f8b5e1ae8ad92c620f2dafaaf8d54cf178")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
depends_on("jsoncpp")
diff --git a/var/spack/repos/builtin/packages/bamutil/package.py b/var/spack/repos/builtin/packages/bamutil/package.py
index b568cb8385..975bf32529 100644
--- a/var/spack/repos/builtin/packages/bamutil/package.py
+++ b/var/spack/repos/builtin/packages/bamutil/package.py
@@ -24,6 +24,8 @@ class Bamutil(MakefilePackage):
url="https://genome.sph.umich.edu/w/images/7/70/BamUtilLibStatGen.1.0.13.tgz",
)
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("git", type="build", when="@1.0.15:")
diff --git a/var/spack/repos/builtin/packages/banner/package.py b/var/spack/repos/builtin/packages/banner/package.py
index c997b5a18c..fa230b1e35 100644
--- a/var/spack/repos/builtin/packages/banner/package.py
+++ b/var/spack/repos/builtin/packages/banner/package.py
@@ -21,6 +21,8 @@ class Banner(AutotoolsPackage):
version("1.3.5", sha256="fb21c42620a0a668334b5732a6216b23b3990ca5d87cf3b15f0689dc617e7fdc")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
return "https://github.com/pronovic/banner/archive/refs/tags/BANNER_V{0}.tar.gz".format(
version
diff --git a/var/spack/repos/builtin/packages/bannergrab/package.py b/var/spack/repos/builtin/packages/bannergrab/package.py
index 7bd7abbb4d..7a60ff04e6 100644
--- a/var/spack/repos/builtin/packages/bannergrab/package.py
+++ b/var/spack/repos/builtin/packages/bannergrab/package.py
@@ -19,6 +19,8 @@ class Bannergrab(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
mkdirp(prefix.man1)
diff --git a/var/spack/repos/builtin/packages/bart/package.py b/var/spack/repos/builtin/packages/bart/package.py
index d392073434..03895d2444 100644
--- a/var/spack/repos/builtin/packages/bart/package.py
+++ b/var/spack/repos/builtin/packages/bart/package.py
@@ -18,6 +18,9 @@ class Bart(MakefilePackage, CudaPackage):
version("0.6.00", sha256="dbbd33d1e3ed3324fe21f90a3b62cb51765fe369f21df100b46a32004928f18d")
version("0.5.00", sha256="30eedcda0f0ef3808157542e0d67df5be49ee41e4f41487af5c850632788f643")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# patch to fix build with MKL
patch(
"https://github.com/mrirecon/bart/commit/b62ca4972d5ac41a44217a5c27123c15daae74db.patch?full_index=1",
@@ -59,7 +62,7 @@ class Bart(MakefilePackage, CudaPackage):
if "^netlib-lapack+lapacke" not in spec:
env["NOLAPACKE"] = "1"
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
env["CUDA"] = "1"
env["CUDA_BASE"] = spec["cuda"].prefix
@@ -76,7 +79,7 @@ class Bart(MakefilePackage, CudaPackage):
install("python/cfl.py", python_platlib)
install("python/wslsupport.py", python_platlib)
- if "^python@3:" in spec:
+ if spec.satisfies("^python@3:"):
install("python/bartview3.py", join_path(prefix.bin, "bartview"))
filter_file(r"#!/usr/bin/python3", "#!/usr/bin/env python", prefix.bin.bartview)
else:
diff --git a/var/spack/repos/builtin/packages/barvinok/package.py b/var/spack/repos/builtin/packages/barvinok/package.py
index 867025f02c..3be94ae144 100644
--- a/var/spack/repos/builtin/packages/barvinok/package.py
+++ b/var/spack/repos/builtin/packages/barvinok/package.py
@@ -33,6 +33,6 @@ class Barvinok(AutotoolsPackage):
spec = self.spec
args = ["--with-gmp-prefix={0}".format(self.spec["gmp"].prefix)]
- if "+pet" in spec:
+ if spec.satisfies("+pet"):
args.append("--with-pet=bundled")
return args
diff --git a/var/spack/repos/builtin/packages/bash-completion/package.py b/var/spack/repos/builtin/packages/bash-completion/package.py
index 1943a45342..5d835d2aa4 100644
--- a/var/spack/repos/builtin/packages/bash-completion/package.py
+++ b/var/spack/repos/builtin/packages/bash-completion/package.py
@@ -16,9 +16,12 @@ class BashCompletion(AutotoolsPackage):
license("GPL-2.0-or-later")
version("develop", branch="master")
+ version("2.12.0", sha256="5277d347481cb5a05399629f00b7deb4475fe71b8b4f8a219c360213e2113752")
version("2.7", sha256="dba2b88c363178622b61258f35d82df64dc8d279359f599e3b93eac0375a416c")
version("2.3", sha256="d92fcef5f6e3bbc68a84f0a7b063a1cd07b4000cc6e275cd1ff83863ab3b322a")
+ depends_on("c", type="build") # generated
+
# Build dependencies
depends_on("automake", type="build")
depends_on("autoconf", type="build")
@@ -41,7 +44,7 @@ class BashCompletion(AutotoolsPackage):
print("include the following lines in your ~/.bash_profile :")
print("")
print("# Use bash-completion, if available")
- print("[[ $PS1 && -f %s/share/bash-completion/bash_completion ]] && \\" % prefix)
- print(" . %s/share/bash-completion/bash_completion" % prefix)
+ print(f"[[ $PS1 && -f {prefix}/share/bash-completion/bash_completion ]] && \\")
+ print(f" . {prefix}/share/bash-completion/bash_completion")
print("")
print("=====================================================")
diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py
index 52a55e26bf..4af7b56e98 100644
--- a/var/spack/repos/builtin/packages/bash/package.py
+++ b/var/spack/repos/builtin/packages/bash/package.py
@@ -6,7 +6,6 @@
import re
from spack.package import *
-from spack.util.environment import is_system_path
class Bash(AutotoolsPackage, GNUMirrorPackage):
@@ -23,6 +22,8 @@ class Bash(AutotoolsPackage, GNUMirrorPackage):
version("4.4", sha256="d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb")
version("4.3", sha256="afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("readline@8.2:", when="@5.2:")
depends_on("readline@5.0:")
@@ -45,6 +46,17 @@ class Bash(AutotoolsPackage, GNUMirrorPackage):
("5.2", "013", "094b4fd81bc488a26febba5d799689b64d52a5505b63e8ee854f48d356bc7ce6"),
("5.2", "014", "3ef9246f2906ef1e487a0a3f4c647ae1c289cbd8459caa7db5ce118ef136e624"),
("5.2", "015", "ef73905169db67399a728e238a9413e0d689462cb9b72ab17a05dba51221358a"),
+ ("5.2", "016", "155853bc5bd10e40a9bea369fb6f50a203a7d0358e9e32321be0d9fa21585915"),
+ ("5.2", "017", "1c48cecbc9b7b4217990580203b7e1de19c4979d0bd2c0e310167df748df2c89"),
+ ("5.2", "018", "4641dd49dd923b454dd0a346277907090410f5d60a29a2de3b82c98e49aaaa80"),
+ ("5.2", "019", "325c26860ad4bba8558356c4ab914ac57e7b415dac6f5aae86b9b05ccb7ed282"),
+ ("5.2", "020", "b6fc252aeb95ce67c9b017d29d81e8a5e285db4bf20d4ec8cdca35892be5c01d"),
+ ("5.2", "021", "8334b88117ad047598f23581aeb0c66c0248cdd77abc3b4e259133aa307650cd"),
+ ("5.2", "022", "78b5230a49594ec30811e72dcd0f56d1089710ec7828621022d08507aa57e470"),
+ ("5.2", "023", "af905502e2106c8510ba2085aa2b56e64830fc0fdf6ee67ebb459ac11696dcd3"),
+ ("5.2", "024", "971534490117eb05d97d7fd81f5f9d8daf927b4d581231844ffae485651b02c3"),
+ ("5.2", "025", "5138f487e7cf71a6323dc81d22419906f1535b89835cc2ff68847e1a35613075"),
+ ("5.2", "026", "96ee1f549aa0b530521e36bdc0ba7661602cfaee409f7023cac744dd42852eac"),
("5.1", "001", "ebb07b3dbadd98598f078125d0ae0d699295978a5cdaef6282fe19adef45b5fa"),
("5.1", "002", "15ea6121a801e48e658ceee712ea9b88d4ded022046a6147550790caf04f5dbe"),
("5.1", "003", "22f2cc262f056b22966281babf4b0a2f84cb7dd2223422e5dcd013c3dcbab6b1"),
@@ -187,10 +199,13 @@ class Bash(AutotoolsPackage, GNUMirrorPackage):
"--enable-readline",
"--with-installed-readline",
]
- if spec["iconv"].name == "libc":
+ if spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
+ # bash malloc relies on sbrk which fails intentionally in musl
+ if spec.satisfies("^[virtuals=libc] musl"):
+ args.append("--without-bash-malloc")
return args
def check(self):
diff --git a/var/spack/repos/builtin/packages/bat/package.py b/var/spack/repos/builtin/packages/bat/package.py
index 13c908acc7..2af4dd2eee 100644
--- a/var/spack/repos/builtin/packages/bat/package.py
+++ b/var/spack/repos/builtin/packages/bat/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Bat(Package):
+class Bat(CargoPackage):
"""A cat(1) clone with wings."""
homepage = "https://github.com/sharkdp/bat"
@@ -14,13 +14,12 @@ class Bat(Package):
license("Apache-2.0")
+ version("0.24.0", sha256="907554a9eff239f256ee8fe05a922aad84febe4fe10a499def72a4557e9eedfb")
version("0.23.0", sha256="30b6256bea0143caebd08256e0a605280afbbc5eef7ce692f84621eb232a9b31")
version("0.21.0", sha256="3dff1e52d577d0a105f4afe3fe7722a4a2b8bb2eb3e7a6a5284ac7add586a3ee")
version("0.13.0", sha256="f4aee370013e2a3bc84c405738ed0ab6e334d3a9f22c18031a7ea008cd5abd2a")
version("0.12.1", sha256="1dd184ddc9e5228ba94d19afc0b8b440bfc1819fef8133fe331e2c0ec9e3f8e2")
- depends_on("rust")
-
- def install(self, spec, prefix):
- cargo = which("cargo")
- cargo("install", "--root", prefix, "--path", ".")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/batchedblas/package.py b/var/spack/repos/builtin/packages/batchedblas/package.py
index 283e7e23a3..fa3e79a2a9 100644
--- a/var/spack/repos/builtin/packages/batchedblas/package.py
+++ b/var/spack/repos/builtin/packages/batchedblas/package.py
@@ -18,6 +18,8 @@ class Batchedblas(MakefilePackage):
version("1.0", sha256="798ae4e7cc4ad5c3d5f3479f3d001da566d7d5205779103aaf10cd5b956ba433")
+ depends_on("c", type="build") # generated
+
depends_on("blas")
patch("AVX2.patch")
diff --git a/var/spack/repos/builtin/packages/batctl/package.py b/var/spack/repos/builtin/packages/batctl/package.py
index 84a5cb3aa3..5c69f5263b 100644
--- a/var/spack/repos/builtin/packages/batctl/package.py
+++ b/var/spack/repos/builtin/packages/batctl/package.py
@@ -19,6 +19,8 @@ class Batctl(MakefilePackage):
version("2019.3", sha256="2bd93fa14925a8dc63a67e64266c8ccd2fa3ac44b10253d93e6f8a630350070c")
version("2019.2", sha256="fb656208ff7d4cd8b1b422f60c9e6d8747302a347cbf6c199d7afa9b80f80ea3")
+ depends_on("c", type="build") # generated
+
depends_on("libnl")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/baurmc/package.py b/var/spack/repos/builtin/packages/baurmc/package.py
index 3fff20bcb0..a3a711ac0e 100644
--- a/var/spack/repos/builtin/packages/baurmc/package.py
+++ b/var/spack/repos/builtin/packages/baurmc/package.py
@@ -22,6 +22,8 @@ class Baurmc(AutotoolsPackage):
version("1.0", sha256="de5027ed2e66028bed890760bee9d869e1e330ac7f7112ee5cb25868cea5c35b")
+ depends_on("fortran", type="build") # generated
+
@property
def configure_directory(self):
return os.path.join(self.stage.source_path, str(self.spec.version))
diff --git a/var/spack/repos/builtin/packages/bazel/cppcompileaction-7.0.0.patch b/var/spack/repos/builtin/packages/bazel/cppcompileaction-7.0.0.patch
new file mode 100644
index 0000000000..b182f98f82
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/cppcompileaction-7.0.0.patch
@@ -0,0 +1,12 @@
+diff --color=auto --color=auto -Naur a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java
+--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 1980-01-01 00:00:00
++++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2024-02-15 13:36:37
+@@ -143,7 +143,7 @@
+ LabelConstants.EXPERIMENTAL_EXTERNAL_PATH_PREFIX.getRelative(
+ execPath.relativeTo(execRoot.getParentDirectory()));
+ } else {
+- absolutePathProblems.add(execPathFragment.getPathString());
++ // absolutePathProblems.add(execPathFragment.getPathString());
+ continue;
+ }
+ }
diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py
index 4f76e8e7bb..32bcd23f9e 100644
--- a/var/spack/repos/builtin/packages/bazel/package.py
+++ b/var/spack/repos/builtin/packages/bazel/package.py
@@ -18,10 +18,23 @@ class Bazel(Package):
homepage = "https://bazel.build/"
url = "https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-dist.zip"
+ maintainers("LydDeb")
+
tags = ["build-tools"]
license("Apache-2.0")
+ version("7.0.2", sha256="dea2b90575d43ef3e41c402f64c2481844ecbf0b40f8548b75a204a4d504e035")
+ version("7.0.1", sha256="596b13e071d27c43343ec8f5d263cb5312fafe7ef8702401f7ed492f182f4e6c")
+ version("7.0.0", sha256="477e54f6374001f439a9471ba1de9d7824daf129db95510849ecc5e19ce88170")
+ version("6.5.0", sha256="fc89da919415289f29e4ff18a5e01270ece9a6fe83cb60967218bac4a3bb3ed2")
+ version("6.4.0", sha256="bd88ff602c8bbb29ee82ba2a6b12ad092d51ec668c6577f9628f18e48ff4e51e")
+ version("6.3.2", sha256="8cd7feac58193be2bcba451ba6688a46824d37ca6359ff58e0d44eb98f042948")
+ version("6.3.1", sha256="2676319e86c5aeab142dccd42434364a33aa330a091c13562b7de87a10e68775")
+ version("6.3.0", sha256="902198981b1d26112fc05913e79f1b3e9772c3f95594caf85619d041ba06ede0")
+ version("6.2.1", sha256="4cf4d264bff388ee0012735728630d23832d3c9d021383b2fadceadb0775dd6b")
+ version("6.2.0", sha256="f1e8f788637ac574d471d619d2096baaca04a19b57a034399e079633db441945")
+ version("6.1.2", sha256="6fb3ee22fe9fa86d82e173572d504c089f10825d749725592626e090b38c9679")
version("6.1.1", sha256="6b900f26d676c7eca1d2e7dff9b71890dabd3ff59cab2a2d2178bc8a0395342a")
version("6.1.0", sha256="c4b85675541cf66ee7cb71514097fdd6c5fc0e02527243617a4f20ca6b4f2932")
version("6.0.0", sha256="7bc0c5145c19a56d82a08fce6908c5e1a0e75e4fbfb3b6f12b4deae7f4b38cbc")
@@ -33,6 +46,7 @@ class Bazel(Package):
version("5.1.1", sha256="7f5d3bc1d344692b2400f3765fd4b5c0b636eb4e7a8a7b17923095c7b56a4f78")
version("5.1.0", sha256="4de301f509fc6d0cbc697b2017384ecdc94df8f36245bbcbedc7ea6780acc9f5")
version("5.0.0", sha256="072dd62d237dbc11e0bac02e118d8c2db4d0ba3ba09f1a0eb1e2a460fb8419db")
+ version("4.2.4", sha256="d5ba2ef28da5275f22e832aaa7f9319c61ea5db9b6a3e23b28a6a64ad03078f3")
version("4.2.3", sha256="b0e84d0538f3ec2b95a49bae31a5066f0967281a3ca99965016fbe178acd2d3d")
version("4.2.2", sha256="9981d0d53a356c4e87962847750a97c9e8054e460854748006c80f0d7e2b2d33")
version("4.2.1", sha256="12ea7aa11e2bdb12de1dceb9939a22e96f5a480437cb17c123379d8e0fdf5e82")
@@ -66,7 +80,6 @@ class Bazel(Package):
)
# https://bazel.build/install/compile-source#bootstrap-unix-prereq
- depends_on("java", type=("build", "run"))
depends_on("java@11", when="@5.3:", type=("build", "run"))
depends_on("java@8,11", when="@3.3:5.2", type=("build", "run"))
depends_on("java@8", when="@0.6:3.2", type=("build", "run"))
@@ -84,10 +97,11 @@ class Bazel(Package):
patch("compile-0.29.patch")
# Disable dependency search
- patch("cppcompileaction-0.3.2.patch", when="+nodepfail")
+ patch("cppcompileaction-7.0.0.patch", when="@7: +nodepfail")
+ patch("cppcompileaction-0.3.2.patch", when="@:6 +nodepfail")
# https://github.com/bazelbuild/bazel/issues/17956
- patch("apple-clang-14.0.3.patch", when="@:5.4.0,6.0:6.1")
+ patch("apple-clang-14.0.3.patch", when="@:4.2.3,5:6.1.1")
# https://github.com/bazelbuild/bazel/issues/17958
patch(
@@ -106,6 +120,14 @@ class Bazel(Package):
# https://blog.bazel.build/2021/05/21/bazel-4-1.html
conflicts("platform=darwin target=aarch64:", when="@:4.0")
+ # https://github.com/bazelbuild/bazel/issues/18642
+ patch(
+ "https://github.com/bazelbuild/bazel/pull/20785.patch?full_index=1",
+ sha256="85dde31d129bbd31e004c5c87f23cdda9295fbb22946dc6d362f23d83bae1fd8",
+ when="@6.0:6.4",
+ )
+ conflicts("%gcc@13:", when="@:5")
+
# Patches for compiling various older bazels which had ICWYU violations revealed by
# (but not unique to) GCC 11 header changes. These are derived from
# https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29084/
@@ -118,8 +140,49 @@ class Bazel(Package):
# Newer versions of grpc and abseil dependencies are needed but are not in bazel-4.0.0
conflicts("@4.0.0", when="%gcc@11:")
+ # https://github.com/bazelbuild/bazel/pull/23667
+ conflicts("%apple-clang@16:", when="@:7.3")
+
executables = ["^bazel$"]
+ # Download resources to perform offline build with bazel.
+ # The following URLs and sha256 are in the file distdir_deps.bzl at the root of bazel sources.
+ resource_dictionary = {}
+ resource_dictionary["bazel_skylib"] = {
+ "url": "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.1/bazel-skylib-1.0.1.tar.gz",
+ "sha256": "f1c8360c01fcf276778d3519394805dc2a71a64274a3a0908bc9edff7b5aebc8",
+ "when": "@4:6",
+ }
+ resource_dictionary["com_google_absl"] = {
+ "url": "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz",
+ "sha256": "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5",
+ "when": "@6.0:6.4",
+ }
+ resource_dictionary["zulu_11_56_19"] = {
+ "url": "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.56.19-ca-jdk11.0.15-linux_x64.tar.gz",
+ "sha256": "e064b61d93304012351242bf0823c6a2e41d9e28add7ea7f05378b7243d34247",
+ "when": "@6",
+ }
+ resource_dictionary["zulu_11_50_19"] = {
+ "url": "https://mirror.bazel.build/openjdk/azul-zulu11.50.19-ca-jdk11.0.12/zulu11.50.19-ca-jdk11.0.12-linux_x64.tar.gz",
+ "sha256": "b8e8a63b79bc312aa90f3558edbea59e71495ef1a9c340e38900dd28a1c579f3",
+ "when": "@5",
+ }
+ resource_dictionary["zulu_11_37_17"] = {
+ "url": "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz",
+ "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+ "when": "@4",
+ }
+ for resource_name in resource_dictionary.keys():
+ resource(
+ when=resource_dictionary[resource_name]["when"],
+ name=resource_name,
+ url=resource_dictionary[resource_name]["url"],
+ sha256=resource_dictionary[resource_name]["sha256"],
+ destination="archive",
+ expand=False,
+ )
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("version", output=str, error=str)
@@ -132,14 +195,24 @@ class Bazel(Package):
env.set("BAZEL_LINKOPTS", "")
env.set("BAZEL_LINKLIBS", "-lstdc++")
- env.set(
- "EXTRA_BAZEL_ARGS",
- # Spack's logs don't handle colored output well
- "--color=no --host_javabase=@local_jdk//:jdk"
- # Enable verbose output for failures
- " --verbose_failures --jobs={0}".format(make_jobs),
+ # .WARNING: Option 'host_javabase' is deprecated
+ # Use local java installation
+ args = "--color=no --define=ABSOLUTE_JAVABASE={0} --verbose_failures --jobs={1}".format(
+ self.spec["java"].prefix, make_jobs
)
+ resource_stages = self.stage[1:]
+ for _resource in resource_stages:
+ try:
+ resource_name = _resource.resource.name
+ if self.spec.satisfies(self.resource_dictionary[resource_name]["when"]):
+ archive_path = _resource.source_path
+ args += " --distdir={0}".format(archive_path)
+ except AttributeError:
+ continue
+
+ env.set("EXTRA_BAZEL_ARGS", args)
+
@run_before("install")
def bootstrap(self):
bash = which("bash")
diff --git a/var/spack/repos/builtin/packages/bbmap/package.py b/var/spack/repos/builtin/packages/bbmap/package.py
index f45c473e02..4404eb7256 100644
--- a/var/spack/repos/builtin/packages/bbmap/package.py
+++ b/var/spack/repos/builtin/packages/bbmap/package.py
@@ -19,6 +19,8 @@ class Bbmap(Package, SourceforgePackage):
version("37.78", sha256="f2da19f64d2bfb7db4c0392212668b425c96a27c77bd9d88d8f0aea90a193509")
version("37.36", sha256="befe76d7d6f3d0f0cd79b8a01004a2283bdc0b5ab21b0743e9dbde7c7d79e8a9")
+ depends_on("c", type="build") # generated
+
depends_on("java")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/bc/package.py b/var/spack/repos/builtin/packages/bc/package.py
index 7ab944d91e..a756baa783 100644
--- a/var/spack/repos/builtin/packages/bc/package.py
+++ b/var/spack/repos/builtin/packages/bc/package.py
@@ -19,6 +19,8 @@ class Bc(AutotoolsPackage, GNUMirrorPackage):
version("1.07.1", sha256="62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a")
version("1.07", sha256="55cf1fc33a728d7c3d386cc7b0cb556eb5bacf8e0cb5a3fcca7f109fc61205ad")
+ depends_on("c", type="build") # generated
+
depends_on("ed", type="build")
depends_on("texinfo", type="build")
diff --git a/var/spack/repos/builtin/packages/bcache/package.py b/var/spack/repos/builtin/packages/bcache/package.py
index 598c50f09e..21d850f040 100644
--- a/var/spack/repos/builtin/packages/bcache/package.py
+++ b/var/spack/repos/builtin/packages/bcache/package.py
@@ -21,6 +21,8 @@ class Bcache(MakefilePackage):
version("1.0.5", sha256="1449294ef545b3dc6f715f7b063bc2c8656984ad73bcd81a0dc048cbba416ea9")
version("1.0.4", sha256="102ffc3a8389180f4b491188c3520f8a4b1a84e5a7ca26d2bd6de1821f4d913d")
+ depends_on("c", type="build") # generated
+
depends_on("uuid")
depends_on("util-linux")
depends_on("gettext")
diff --git a/var/spack/repos/builtin/packages/bcftools/package.py b/var/spack/repos/builtin/packages/bcftools/package.py
index e1867c3ceb..4dd8f74c5e 100644
--- a/var/spack/repos/builtin/packages/bcftools/package.py
+++ b/var/spack/repos/builtin/packages/bcftools/package.py
@@ -37,6 +37,9 @@ class Bcftools(AutotoolsPackage):
version("1.3.1", sha256="12c37a4054cbf1980223e2b3a80a7fdb3fd850324a4ba6832e38fdba91f1b924")
version("1.2", sha256="53c628339020dd45334a007c9cefdaf1cba3f1032492ec813b116379fa684fd6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"libgsl",
default=False,
@@ -52,6 +55,7 @@ class Bcftools(AutotoolsPackage):
depends_on("gsl", when="+libgsl")
depends_on("py-matplotlib", when="@1.6:", type="run")
+ depends_on("py-gffutils", when="@1.9:", type="run")
depends_on("perl", when="@1.8:~perl-filters", type="run")
depends_on("perl", when="@1.8:+perl-filters", type=("build", "run"))
@@ -97,7 +101,7 @@ class Bcftools(AutotoolsPackage):
options.append("prefix={0}".format(self.prefix))
options.append("HTSDIR={0}".format(self.spec["htslib"].prefix))
- if "+libgsl" in self.spec:
+ if self.spec.satisfies("+libgsl"):
options.append("USE_GPL=1")
return options
diff --git a/var/spack/repos/builtin/packages/bdftopcf/package.py b/var/spack/repos/builtin/packages/bdftopcf/package.py
index bd190c5e46..36e731cd78 100644
--- a/var/spack/repos/builtin/packages/bdftopcf/package.py
+++ b/var/spack/repos/builtin/packages/bdftopcf/package.py
@@ -14,17 +14,25 @@ class Bdftopcf(AutotoolsPackage, XorgPackage):
appropriate machine, but the files are still portable (but read more
slowly) on other machines."""
- homepage = "https://cgit.freedesktop.org/xorg/app/bdftopcf"
- xorg_mirror_path = "app/bdftopcf-1.0.5.tar.gz"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/bdftopcf"
+ xorg_mirror_path = "util/bdftopcf-1.0.5.tar.gz"
license("MIT")
+ version("1.1.1", sha256="3291df9910c006a0345f3eac485e2a5734bbb79a0d97bf1f2b4cddad48fb1bc4")
version("1.1", sha256="699d1a62012035b1461c7f8e3f05a51c8bd6f28f348983249fb89bbff7309b47")
version("1.0.5", sha256="78a5ec945de1d33e6812167b1383554fda36e38576849e74a9039dc7364ff2c3")
+ # note: url_for_version can only return a single url, no mirrors
+ @when("@:1.1.0")
+ def url_for_version(self, version):
+ return self.urls[0].replace("util", "app")
+
+ depends_on("c", type="build")
+
depends_on("libxfont")
depends_on("pkgconfig", type="build")
- depends_on("xproto")
- depends_on("fontsproto")
+ depends_on("xproto", type="build")
+ depends_on("fontsproto", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/bdsim/c++-standard.patch b/var/spack/repos/builtin/packages/bdsim/c++-standard.patch
new file mode 100644
index 0000000000..58dabf5cb2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bdsim/c++-standard.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4750d9a..7b10b57 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,7 +5,7 @@ if (CMAKE_VERSION VERSION_LESS 3.9.0)
+ cmake_policy(SET CMP0042 OLD)
+ endif()
+
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 11 CACHE STRING "")
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+ include(GenerateExportHeader)
diff --git a/var/spack/repos/builtin/packages/bdsim/package.py b/var/spack/repos/builtin/packages/bdsim/package.py
index 61eddbc92d..cf007073b4 100644
--- a/var/spack/repos/builtin/packages/bdsim/package.py
+++ b/var/spack/repos/builtin/packages/bdsim/package.py
@@ -22,9 +22,13 @@ class Bdsim(CMakePackage):
license("GPL-3.0-or-later")
- version("develop", branch="develop")
+ version("master", branch="master")
+ version("1.7.6", sha256="92f53aa0a9fbd3cafd218f9e58ae4d1e7115733e641191c1658243fefb436600")
+ version("1.7.0", sha256="713ce3c9d94f340ca774ce1803e0c4f992b904dbc28ce4129713abe883e98683")
version("1.6.0", sha256="e3241d2d097cb4e22249e315c1474da9b3657b9c6893232d9f9e543a5323f717")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake")
depends_on("geant4")
depends_on("geant4@:10.7.3", when="@:1.6.0")
@@ -32,3 +36,10 @@ class Bdsim(CMakePackage):
depends_on("clhep")
depends_on("flex")
depends_on("bison")
+
+ patch("c++-standard.patch", when="@:1.7.6")
+
+ def cmake_args(self):
+ args = []
+ args.append(f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}")
+ return args
diff --git a/var/spack/repos/builtin/packages/bdw-gc/package.py b/var/spack/repos/builtin/packages/bdw-gc/package.py
index 07565c4e67..6c80aac4e2 100644
--- a/var/spack/repos/builtin/packages/bdw-gc/package.py
+++ b/var/spack/repos/builtin/packages/bdw-gc/package.py
@@ -11,10 +11,12 @@ class BdwGc(AutotoolsPackage):
collecting replacement for C malloc or C++ new."""
homepage = "https://www.hboehm.info/gc/"
- url = "https://github.com/ivmai/bdwgc/releases/download/v8.2.4/gc-8.2.4.tar.gz"
+ url = "https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz"
license("Xerox")
+ version("8.2.8", sha256="7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160")
+ version("8.2.6", sha256="b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc")
version("8.2.4", sha256="3d0d3cdbe077403d3106bb40f0cbb563413d6efdbb2a7e1cd6886595dec48fc2")
version("8.2.2", sha256="f30107bcb062e0920a790ffffa56d9512348546859364c23a14be264b38836a0")
version("8.0.6", sha256="3b4914abc9fa76593596773e4da671d7ed4d5390e3d46fbf2e5f155e121bea11")
@@ -30,6 +32,9 @@ class BdwGc(AutotoolsPackage):
url="http://www.hboehm.info/gc/gc_source/gc-7.4.4.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("libatomic-ops", default=True, description="Use external libatomic-ops")
variant(
"threads",
diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py
index a5d98cc024..b58df4beab 100644
--- a/var/spack/repos/builtin/packages/bear/package.py
+++ b/var/spack/repos/builtin/packages/bear/package.py
@@ -17,22 +17,40 @@ class Bear(CMakePackage):
license("GPL-3.0-or-later")
+ version("3.1.3", sha256="8314438428069ffeca15e2644eaa51284f884b7a1b2ddfdafe12152581b13398")
+ version("3.1.2", sha256="5f94e98480bd8576a64cd1d59649f34b09b4e02a81f1d983c92af1113e061fc3")
+ version("3.1.1", sha256="52f8ee68ee490e5f2714eebad9e1288e89c82b9fd7bf756f600cff03de63a119")
+ version("3.1.0", sha256="33c1f4663d94508f11cbd999dd5571359be7d15b0f473f7cfbea2c0b3190a891")
+ version("3.0.21", sha256="0c949a6a907bc61a1284661f8d9dab1788a62770c265f6142602669b6e5c389d")
version("3.0.20", sha256="45cfcdab07f824f6c06c9776701156f7a04b23eadd25ecbc88c188789a447cc7")
version("3.0.19", sha256="2fcfe2c6e029182cfc54ed26b3505c0ef12b0f43df03fb587f335afdc2ca9431")
version("3.0.18", sha256="ae94047c79b4f48462b66981f66a67b6a833d75d4c40e7afead491b1865f1142")
+ version("3.0.17", sha256="107f94e045d930e88f5f5b4b484c8df1bf4834722943525765c271e0b5b34b78")
+ version("3.0.16", sha256="877ee5e89e8445f74df95f2f3896597f04b86a4e5d0dbbca07ac71027dcb362d")
version("3.0.0", sha256="7b68aad69e887d945ad20f8e9f3a8c33cf2d59cc80da7e52d931d8c685fe2f79")
version("2.2.0", sha256="6bd61a6d64a24a61eab17e7f2950e688820c72635e1cf7ea8ea7bf9482f3b612")
version("2.0.4", sha256="33ea117b09068aa2cd59c0f0f7535ad82c5ee473133779f1cc20f6f99793a63e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", when="@3:")
depends_on("fmt@8", when="@3.0.0:")
depends_on("grpc +shared", when="@3.0.0:")
depends_on("nlohmann-json", when="@3.0.0:")
- depends_on("spdlog +fmt_external", when="@3.0.0:")
- depends_on("cmake@2.8:", type="build")
+ depends_on("spdlog", when="@3.0.0:")
+ depends_on("cmake@2.8:", when="@2.0.4:", type="build")
+ depends_on("cmake@3.12:", when="@3.0.0:", type="build")
depends_on("python", type="build")
depends_on("googletest", type="test", when="@3:")
+ # specific version constraints
+ conflicts("@3.0.0", when="%apple-clang@15", msg="Problems with nlohmann-json integration")
+ conflicts("@3.0.0", when="%clang@13.0.1", msg="Problems with std::optional")
+
+ # general version constraints
+ conflicts("@3:", when="%gcc@:8.9", msg="Bear requires GCC with full std::filesystem support")
+
patch("rpath-handling-3.0.20.patch", when="@3.0.20:")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/beast-tracer/package.py b/var/spack/repos/builtin/packages/beast-tracer/package.py
index 1ed549a8a0..bb3c6d0aa6 100644
--- a/var/spack/repos/builtin/packages/beast-tracer/package.py
+++ b/var/spack/repos/builtin/packages/beast-tracer/package.py
@@ -18,6 +18,8 @@ class BeastTracer(Package):
version("1.7.2", sha256="fd891e2244445fef71ab8010d8fab924abff2e5436e035bb335834e7c2e6d83b")
version("1.7.1", sha256="947d51c5afa52354099b9b182ba6036e352356bd62df94031f33cdcb7e8effd3")
+ depends_on("c", type="build") # generated
+
depends_on("ant", type="build")
depends_on("java", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/beast1/package.py b/var/spack/repos/builtin/packages/beast1/package.py
index 9e557fde3a..ba4c933122 100644
--- a/var/spack/repos/builtin/packages/beast1/package.py
+++ b/var/spack/repos/builtin/packages/beast1/package.py
@@ -15,6 +15,8 @@ class Beast1(Package):
version("1.10.4", sha256="be652c4d55953f7c6c7a9d3eb3de203c77dc380e81ad81cfe0492408990c36a8")
version("1.8.4", sha256="c14e93976008463108aefa34ecc23287ab70703caccf4962e36e295207120d78")
+ depends_on("c", type="build") # generated
+
variant("beagle", default=True, description="Build with libbeagle support")
depends_on("java", type="run")
diff --git a/var/spack/repos/builtin/packages/beatnik/package.py b/var/spack/repos/builtin/packages/beatnik/package.py
index d16ec01a24..8d75a590db 100644
--- a/var/spack/repos/builtin/packages/beatnik/package.py
+++ b/var/spack/repos/builtin/packages/beatnik/package.py
@@ -16,9 +16,12 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
+ version("1.1", commit="7d5a6fa588bcb7065fc53c3e8ae52d4d7f13b6f1", submodules=True)
version("1.0", commit="ae31ef9cb44678d5ace77994b45b0778defa3d2f")
- version("develop", branch="develop")
- version("main", branch="main")
+ version("develop", branch="develop", submodules=True)
+ version("main", branch="main", submodules=True)
+
+ depends_on("cxx", type="build") # generated
# Variants are primarily backends to build on GPU systems and pass the right
# informtion to the packages we depend on
@@ -45,13 +48,17 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage):
depends_on("kokkos +wrapper", when="%gcc+cuda")
# Cabana dependencies
- depends_on("cabana @0.6.0 +grid +heffte +silo +hdf5 +mpi")
+ depends_on("cabana @0.7.0 +grid +heffte +silo +hdf5 +mpi +arborx", when="@1.1")
+ depends_on("cabana @0.7.0 +grid +heffte +silo +hdf5 +mpi +arborx", when="@1.0")
+ depends_on("cabana @master +grid +heffte +silo +hdf5 +mpi +arborx", when="@develop")
+ depends_on("cabana @0.7.0 +grid +heffte +silo +hdf5 +mpi +arborx", when="@main")
depends_on("cabana +cuda", when="+cuda")
depends_on("cabana +rocm", when="+rocm")
# Silo dependencies
depends_on("silo @4.11:")
- depends_on("silo @4.11.1:", when="%cce") # Eariler silo versions have trouble cce
+ depends_on("silo @4.11.1 +fpzip+hzip~python", when="%cce")
+ # Eariler silo versions have trouble with cce
# Heffte dependencies - We always require FFTW so that there's a host
# backend even when we're compiling for GPUs
@@ -82,7 +89,7 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage):
# Use hipcc as the c compiler if we are compiling for rocm. Doing it this way
# keeps the wrapper insted of changeing CMAKE_CXX_COMPILER keeps the spack wrapper
# and the rpaths it sets for us from the underlying spec.
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
env["SPACK_CXX"] = self.spec["hip"].hipcc
# If we're building with cray mpich, we need to make sure we get the GTL library for
diff --git a/var/spack/repos/builtin/packages/bedops/package.py b/var/spack/repos/builtin/packages/bedops/package.py
index 9d49dfd649..a1e29fa2f4 100644
--- a/var/spack/repos/builtin/packages/bedops/package.py
+++ b/var/spack/repos/builtin/packages/bedops/package.py
@@ -26,6 +26,9 @@ class Bedops(MakefilePackage):
version("2.4.34", sha256="533a62a403130c048d3378e6a975b73ea88d156d4869556a6b6f58d90c52ed95")
version("2.4.30", sha256="218e0e367aa79747b2f90341d640776eea17befc0fdc35b0cec3c6184098d462")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
@property
def build_targets(self):
# avoid static linking with glibc for all invocations
diff --git a/var/spack/repos/builtin/packages/bedtools2/package.py b/var/spack/repos/builtin/packages/bedtools2/package.py
index 472cfa4bb9..7a13dc7641 100644
--- a/var/spack/repos/builtin/packages/bedtools2/package.py
+++ b/var/spack/repos/builtin/packages/bedtools2/package.py
@@ -17,6 +17,7 @@ class Bedtools2(Package):
license("MIT")
+ version("2.31.1", sha256="79a1ba318d309f4e74bfa74258b73ef578dccb1045e270998d7fe9da9f43a50e")
version("2.31.0", sha256="183cf9a96aabc50ef4bd557a53fd01557a123c05a0dc87651371878f357439ec")
version("2.30.0", sha256="c575861ec746322961cd15d8c0b532bb2a19333f1cf167bbff73230a7d67302f")
version("2.29.2", sha256="bc2f36b5d4fc9890c69f607d54da873032628462e88c545dd633d2c787a544a5")
@@ -26,12 +27,15 @@ class Bedtools2(Package):
version("2.25.0", sha256="159122afb9978015f7ec85d7b17739b01415a5738086b20a48147eeefcf08cfb")
version("2.23.0", sha256="9dacaa561d11ce9835d1d51e5aeb092bcbe117b7119663ec9a671abac6a36056")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("bzip2", when="@2.29:")
depends_on("xz", when="@2.29:")
depends_on("python", type="build")
- patch("bedtools-gcc13.patch", level=1, when="@2.27:%gcc@13:")
+ patch("bedtools-gcc13.patch", level=1, when="@2.27:2.31.0%gcc@13:")
def install(self, spec, prefix):
make("prefix=%s" % prefix, "install")
diff --git a/var/spack/repos/builtin/packages/beforelight/package.py b/var/spack/repos/builtin/packages/beforelight/package.py
index 321805e4b6..ac5e68ea95 100644
--- a/var/spack/repos/builtin/packages/beforelight/package.py
+++ b/var/spack/repos/builtin/packages/beforelight/package.py
@@ -20,6 +20,8 @@ class Beforelight(AutotoolsPackage, XorgPackage):
version("1.0.6", sha256="735579a7671a9f9de16b7211cf0ba39027183bdc3e82a937fbccfdd893e64a2e")
version("1.0.5", sha256="93bb3c457d6d5e8def3180fdee07bc84d1b7f0e5378a95812e2193cd51455cdc")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxscrnsaver")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/benchmark/package.py b/var/spack/repos/builtin/packages/benchmark/package.py
index 31b0ee915b..34e1eadda6 100644
--- a/var/spack/repos/builtin/packages/benchmark/package.py
+++ b/var/spack/repos/builtin/packages/benchmark/package.py
@@ -14,10 +14,15 @@ class Benchmark(CMakePackage):
git = "https://github.com/google/benchmark.git"
license("Apache-2.0")
+ maintainers("stephenswat")
# first properly installed CMake config packages in
# 1.2.0 release: https://github.com/google/benchmark/issues/363
version("main", branch="main")
+ version("1.9.1", sha256="32131c08ee31eeff2c8968d7e874f3cb648034377dfc32a4c377fa8796d84981")
+ version("1.9.0", sha256="35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994")
+ version("1.8.5", sha256="d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a")
+ version("1.8.4", sha256="3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45")
version("1.8.3", sha256="6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce")
version("1.8.2", sha256="2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93")
version("1.8.1", sha256="e9ff65cecfed4f60c893a1e8a1ba94221fad3b27075f2f80f47eb424b0f8c9bd")
@@ -38,20 +43,36 @@ class Benchmark(CMakePackage):
version("1.1.0", sha256="e7334dd254434c6668e33a54c8f839194c7c61840d52f4b6258eee28e9f3b20e")
version("1.0.0", sha256="d2206c263fc1a7803d4b10e164e0c225f6bcf0d5e5f20b87929f137dee247b54")
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
description="The build type to build",
values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel", "Coverage"),
)
+ variant(
+ "performance_counters",
+ default=True,
+ when="@1.5.4:",
+ description="Enable performance counters provided by libpfm",
+ )
+ variant(
+ "shared", default=True, sticky=True, description="Build the libraries as shared objects"
+ )
depends_on("cmake@2.8.11:", type="build", when="@:1.1.0")
depends_on("cmake@2.8.12:", type="build", when="@1.2.0:1.4")
depends_on("cmake@3.5.1:", type="build", when="@1.5.0:")
+ depends_on("libpfm4", type=("build", "link"), when="+performance_counters")
def cmake_args(self):
# No need for testing for the install
- args = ["-DBENCHMARK_ENABLE_TESTING=OFF"]
+ args = [
+ self.define("BENCHMARK_ENABLE_TESTING", False),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("BENCHMARK_ENABLE_LIBPFM", "performance_counters"),
+ ]
return args
def patch(self):
diff --git a/var/spack/repos/builtin/packages/berkeley-db/package.py b/var/spack/repos/builtin/packages/berkeley-db/package.py
index c549ed24b9..acce6ce336 100644
--- a/var/spack/repos/builtin/packages/berkeley-db/package.py
+++ b/var/spack/repos/builtin/packages/berkeley-db/package.py
@@ -34,6 +34,9 @@ class BerkeleyDb(AutotoolsPackage):
)
version("5.3.28", sha256="e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Build documentation")
variant("cxx", default=True, description="Build with C++ API")
variant("stl", default=True, description="Build with C++ STL API")
diff --git a/var/spack/repos/builtin/packages/berkeleygw/package.py b/var/spack/repos/builtin/packages/berkeleygw/package.py
index 28895615a6..2c7f433c18 100644
--- a/var/spack/repos/builtin/packages/berkeleygw/package.py
+++ b/var/spack/repos/builtin/packages/berkeleygw/package.py
@@ -17,24 +17,40 @@ class Berkeleygw(MakefilePackage):
maintainers("migueldiascosta")
version(
+ "4.0",
+ sha256="1a85b03b83b339056f65124bfa96832ca61152236d9bb1cb372e3040fc686a49",
+ url="https://app.box.com/shared/static/22edl07muvhfnd900tnctsjjftbtcqc4.gz",
+ expand=False,
+ )
+ version(
+ "3.1.0",
+ sha256="7e890a5faa5a6bb601aa665c73903b3af30df7bdd13ee09362b69793bbefa6d2",
+ url="https://app.box.com/shared/static/2bik75lrs85zt281ydbup2xa7i5594gy.gz",
+ expand=False,
+ )
+ version(
"3.0.1",
sha256="7d8c2cc1ee679afb48efbdd676689d4d537226b50e13a049dbcb052aaaf3654f",
- url="https://berkeley.box.com/shared/static/m1dgnhiemo47lhxczrn6si71bwxoxor8.gz",
+ url="https://app.box.com/shared/static/m1dgnhiemo47lhxczrn6si71bwxoxor8.gz",
expand=False,
)
version(
"3.0",
sha256="ab411acead5e979fd42b8d298dbb0a12ce152e7be9eee0bb87e9e5a06a638e2a",
- url="https://berkeley.box.com/shared/static/lp6hj4kxr459l5a6t05qfuzl2ucyo03q.gz",
+ url="https://app.box.com/shared/static/lp6hj4kxr459l5a6t05qfuzl2ucyo03q.gz",
expand=False,
)
version(
"2.1",
sha256="31f3b643dd937350c3866338321d675d4a1b1f54c730b43ad74ae67e75a9e6f2",
- url="https://berkeley.box.com/shared/static/ze3azi5vlyw7hpwvl9i5f82kaiid6g0x.gz",
+ url="https://app.box.com/shared/static/ze3azi5vlyw7hpwvl9i5f82kaiid6g0x.gz",
expand=False,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# For parallel computing support, enable +mpi. It uses MPI and ScaLAPACK
# which are inter-dependent in the berkeleygw code(they need each other):
# https://github.com/spack/spack/pull/33948#issuecomment-1323805817
@@ -95,10 +111,8 @@ class Berkeleygw(MakefilePackage):
# Force openmp propagation on some providers of blas / fftw-api
with when("+openmp"):
- depends_on("fftw+openmp", when="^fftw")
- depends_on("amdfftw+openmp", when="^amdfftw")
- depends_on("openblas threads=openmp", when="^openblas")
- depends_on("amdblis threads=openmp", when="^amdblis")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
+ depends_on("amdblis threads=openmp", when="^[virtuals=blas] amdblis")
parallel = False
@@ -108,7 +122,7 @@ class Berkeleygw(MakefilePackage):
tar("-x", "-f", self.stage.archive_file, "--strip-components=1")
# get generic arch.mk template
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
copy(join_path(self.stage.source_path, "config", "generic.mpi.linux.mk"), "arch.mk")
else:
copy(join_path(self.stage.source_path, "config", "generic.serial.linux.mk"), "arch.mk")
@@ -144,11 +158,20 @@ class Berkeleygw(MakefilePackage):
si_epm_tests.append("Si_hdf5")
for test in si_epm_tests:
filter_file(
+ "Precision : 5e-12",
+ "Precision : 6e-12",
+ join_path("testsuite", "Si-EPM", test + ".test"),
+ )
+ filter_file(
"Precision : 6e-15",
"Precision : 7e-15",
join_path("testsuite", "Si-EPM", test + ".test"),
)
- for test in ["Si_subspace", "Si_subspace_cplx", "Si_subspace_cplx_spin"]:
+
+ si_epm_subspace_tests = ["Si_subspace", "Si_subspace_cplx_spin"]
+ if self.version < Version("4.0"):
+ si_epm_subspace_tests.append("Si_subspace_cplx")
+ for test in si_epm_subspace_tests:
filter_file(
"Precision : 6e-15",
"Precision : 7e-15",
@@ -156,31 +179,37 @@ class Berkeleygw(MakefilePackage):
)
filter_file("Precision : 8e-15", "Precision : 9e-15", "testsuite/GaAs-EPM/GaAs.test")
+ if self.version < Version("3.1.0"):
+ # np.int alias was removed from numpy
+ filter_file(
+ r"astype\(np.int\)", "astype(int)", "testsuite/Si2-SAPO/analyze_dotproduct.py"
+ )
+
def build(self, spec, prefix):
buildopts = []
paraflags = []
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
paraflags.append("-DMPI")
# We need to copy fflags in case we append to it (#34019):
fflags = spec.compiler_flags["fflags"][:]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
paraflags.append("-DOMP")
fflags.append(self.compiler.openmp_flag)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
buildopts.append("C_PARAFLAG=-DPARA")
buildopts.append("PARAFLAG=%s" % " ".join(paraflags))
debugflag = ""
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
debugflag += "-DDEBUG "
- if "+verbose" in spec:
+ if spec.satisfies("+verbose"):
debugflag += "-DVERBOSE "
buildopts.append("DEBUGFLAG=%s" % debugflag)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
buildopts.append("LINK=%s" % spec["mpi"].mpifc)
buildopts.append("C_LINK=%s" % spec["mpi"].mpicxx)
else:
@@ -199,7 +228,7 @@ class Berkeleygw(MakefilePackage):
buildopts.append("LAPACKLIB=%s" % spec["lapack"].libs.ld_flags)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mathflags.append("-DUSESCALAPACK")
buildopts.append("SCALAPACKLIB=%s" % spec["scalapack"].libs.ld_flags)
@@ -207,7 +236,7 @@ class Berkeleygw(MakefilePackage):
buildopts.append("COMPFLAG=-DINTEL")
buildopts.append("MOD_OPT=-module ")
buildopts.append("FCPP=cpp -C -P -ffreestanding")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
buildopts.append("F90free=%s -free" % spec["mpi"].mpifc)
buildopts.append("C_COMP=%s" % spec["mpi"].mpicc)
buildopts.append("CC_COMP=%s" % spec["mpi"].mpicxx)
@@ -228,8 +257,12 @@ class Berkeleygw(MakefilePackage):
f90_flags += " -fallow-argument-mismatch"
buildopts.append("COMPFLAG=-DGNU")
buildopts.append("MOD_OPT=-J ")
- buildopts.append("FCPP=cpp -C -nostdinc")
- if "+mpi" in spec:
+ # std c11 prevents problems with linebreaks and fortran comments
+ # containing // (which is interpreted as C++ style comment)
+ buildopts.append(
+ "FCPP=%s -C -nostdinc -std=c11" % join_path(self.compiler.prefix, "bin", "cpp")
+ )
+ if spec.satisfies("+mpi"):
buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags))
buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags))
buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags))
@@ -245,7 +278,7 @@ class Berkeleygw(MakefilePackage):
buildopts.append("COMPFLAG=")
buildopts.append("MOD_OPT=-module ")
buildopts.append("FCPP=cpp -C -nostdinc")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags))
buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags))
buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags))
@@ -260,16 +293,16 @@ class Berkeleygw(MakefilePackage):
"BerkeleyGW with compiler %s" % spec.compiler
)
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
mathflags.append("-DHDF5")
buildopts.append("HDF5INCLUDE=%s" % spec["hdf5"].prefix.include)
buildopts.append("HDF5LIB=%s" % spec["hdf5:hl,fortran"].libs.ld_flags)
- if "+elpa" in spec:
+ if spec.satisfies("+elpa"):
mathflags.append("-DUSEELPA")
elpa = spec["elpa"]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
elpa_suffix = "_openmp"
else:
elpa_suffix = ""
diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py
index 68b52246a8..d74608455c 100644
--- a/var/spack/repos/builtin/packages/bertini/package.py
+++ b/var/spack/repos/builtin/packages/bertini/package.py
@@ -18,6 +18,8 @@ class Bertini(AutotoolsPackage):
version("1.5", sha256="a9a68a96e180fe6a93ba1bc1d61f522784c9a053b049b2cbd98008b5b6deec3c")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Compile in parallel")
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/bfs/package.py b/var/spack/repos/builtin/packages/bfs/package.py
index 5b6e87845e..105b698be4 100644
--- a/var/spack/repos/builtin/packages/bfs/package.py
+++ b/var/spack/repos/builtin/packages/bfs/package.py
@@ -16,14 +16,31 @@ class Bfs(MakefilePackage):
license("0BSD")
+ version("4.0.4", sha256="209da9e9f43d8fe30fd689c189ea529e9d6b5358ce84a63a44721003aea3e1ca")
+ version("4.0.1", sha256="8117b76b0a967887278a11470cbfa9e7aeae98f11a7eeb136f456ac462e5ba23")
+ version("3.1.1", sha256="d73f345c1021e0630e0db930a3fa68dd1f968833037d8471ee1096e5040bf91b")
+ version("3.1", sha256="aa6a94231915d3d37e5dd62d194cb58a575a8f45270020f2bdd5ab41e31d1492")
version("3.0.4", sha256="7196f5a624871c91ad051752ea21043c198a875189e08c70ab3167567a72889d")
version("3.0.2", sha256="d3456a9aeecc031064db0dbe012e55a11eb97be88d0ab33a90e570fe66457f92")
version("3.0.1", sha256="a38bb704201ed29f4e0b989fb2ab3791ca51c3eff90acfc31fff424579bbf962")
+ depends_on("c", type="build")
+
depends_on("acl", when="platform=linux")
depends_on("attr", when="platform=linux")
depends_on("libcap", when="platform=linux")
+ depends_on("liburing", when="platform=linux @3.1:")
depends_on("oniguruma")
+ @run_before("build", when="@4:")
+ def configure(self):
+ args = ["--enable-release", f"--prefix={self.prefix}"]
+
+ configure_exe = Executable("./configure")
+ configure_exe(*args)
+
def install(self, spec, prefix):
- make("install", f"PREFIX={prefix}")
+ if spec.satisfies("@:3"):
+ make("install", f"PREFIX={prefix}")
+ else:
+ make("install")
diff --git a/var/spack/repos/builtin/packages/bgen/package.py b/var/spack/repos/builtin/packages/bgen/package.py
new file mode 100644
index 0000000000..f71d04d472
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bgen/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Bgen(WafPackage):
+ """This repository contains a reference implementation of the BGEN format, written
+ in C++. The library can be used as the basis for BGEN support in other software,
+ or as a reference for developers writing their own implementations of the BGEN format.
+
+ If you make use of the BGEN library, its tools or example programs, please cite:
+
+ Band, G. and Marchini, J., "BGEN: a binary file format for imputed genotype and
+ haplotype data", bioArxiv 308296; doi: https://doi.org/10.1101/308296."""
+
+ homepage = "https://enkre.net/cgi-bin/code/bgen"
+
+ license("BSL-1.0")
+
+ version(
+ "1.1.7",
+ sha256="121f5956f04ad174bc410fa7deed59e2ebff0ec818a3c66cf5d667357dddfb62",
+ url="https://enkre.net/cgi-bin/code/bgen/tarball/6ac2d582f9/BGEN-6ac2d582f9.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/bgpdump/package.py b/var/spack/repos/builtin/packages/bgpdump/package.py
index 334769aca1..c83bded263 100644
--- a/var/spack/repos/builtin/packages/bgpdump/package.py
+++ b/var/spack/repos/builtin/packages/bgpdump/package.py
@@ -14,6 +14,8 @@ class Bgpdump(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/bigdft-atlab/package.py b/var/spack/repos/builtin/packages/bigdft-atlab/package.py
index a3955589e1..0c023efc9e 100644
--- a/var/spack/repos/builtin/packages/bigdft-atlab/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-atlab/package.py
@@ -14,13 +14,23 @@ class BigdftAtlab(AutotoolsPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant("openbabel", default=False, description="Enable detection of openbabel compilation")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -29,8 +39,8 @@ class BigdftAtlab(AutotoolsPackage):
depends_on("mpi", when="+mpi")
depends_on("openbabel", when="+openbabel")
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
configure_directory = "atlab"
@@ -39,39 +49,50 @@ class BigdftAtlab(AutotoolsPackage):
prefix = self.prefix
fcflags = []
- if "+openmp" in spec:
+ cflags = []
+ cxxflags = []
+
+ if spec.satisfies("+openmp"):
fcflags.append(self.compiler.openmp_flag)
+ if spec.satisfies("+shared"):
+ fcflags.append("-fPIC")
+ cflags.append("-fPIC")
+ cxxflags.append("-fPIC")
if self.spec.satisfies("%gcc@10:"):
fcflags.append("-fallow-argument-mismatch")
args = [
- "FCFLAGS=%s" % " ".join(fcflags),
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags + "/futile",
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(fcflags)}",
+ f"CFLAGS={' '.join(cflags)}",
+ f"CXXFLAGS={' '.join(cxxflags)}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}/futile",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
"--without-etsf-io",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- if "+openbabel" in spec:
+ if spec.satisfies("+openbabel"):
args.append("--enable-openbabel")
- args.append("--with-openbabel-libs=%s" % spec["openbabel"].prefix.lib)
- args.append("--with-openbabel-incs=%s" % spec["openbabel"].prefix.include)
+ args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}")
+ args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}")
return args
diff --git a/var/spack/repos/builtin/packages/bigdft-chess/package.py b/var/spack/repos/builtin/packages/bigdft-chess/package.py
index 361e3e6587..d407d6f1c3 100644
--- a/var/spack/repos/builtin/packages/bigdft-chess/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-chess/package.py
@@ -15,19 +15,30 @@ class BigdftChess(AutotoolsPackage, CudaPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant("scalapack", default=True, description="Enable SCALAPACK support")
- variant("ntpoly", default=False, description="Option to use NTPoly")
+ variant("ntpoly", default=True, description="Option to use NTPoly")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
# variant('minpack', default=False, description='Give the link-line for MINPACK')
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))
@@ -36,12 +47,13 @@ class BigdftChess(AutotoolsPackage, CudaPackage):
depends_on("py-pyyaml")
depends_on("mpi", when="+mpi")
depends_on("scalapack", when="+scalapack")
- depends_on("ntpoly", when="+ntpoly")
- # depends_on('netlib-minpack', when='+minpack')
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-atlab@{0}".format(vers), when="@{0}".format(vers))
+ depends_on("ntpoly@:2", when="@:1.9.3")
+ depends_on("ntpoly@3:", when="@1.9.4:")
+
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}")
configure_directory = "chess"
@@ -50,55 +62,57 @@ class BigdftChess(AutotoolsPackage, CudaPackage):
prefix = self.prefix
python_version = spec["python"].version.up_to(2)
- pyyaml = join_path(spec["py-pyyaml"].prefix.lib, "python{0}".format(python_version))
+ pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
args = [
- "FCFLAGS=%s" % " ".join(openmp_flag),
- "LDFLAGS=%s" % " ".join(linalg),
- "--with-ext-linalg=%s" % " ".join(linalg),
- "--with-pyyaml-path=%s" % pyyaml,
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags,
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"LDFLAGS={' '.join(linalg)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-pyyaml-path={pyyaml}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
"--without-etsf-io",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- args.append("--with-atlab-libs=%s" % spec["bigdft-atlab"].prefix.lib)
+ args.append(f"--with-atlab-libs={spec['bigdft-atlab'].prefix.lib}")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--enable-cuda-gpu")
- args.append("--with-cuda-path=%s" % spec["cuda"].prefix)
- args.append("--with-cuda-libs=%s" % spec["cuda"].libs.link_flags)
+ args.append(f"--with-cuda-path={spec['cuda'].prefix}")
+ args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
- if "+minpack" in spec:
+ if spec.satisfies("+minpack"):
args.append("--with-minpack")
- if "+ntpoly" in spec:
+ if spec.satisfies("+ntpoly"):
args.append("--enable-ntpoly")
return args
diff --git a/var/spack/repos/builtin/packages/bigdft-core/package.py b/var/spack/repos/builtin/packages/bigdft-core/package.py
index e29ab9a2ac..2c885fafc2 100644
--- a/var/spack/repos/builtin/packages/bigdft-core/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-core/package.py
@@ -15,18 +15,29 @@ class BigdftCore(AutotoolsPackage, CudaPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ # version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") # broken
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant("scalapack", default=True, description="Enable SCALAPACK support")
variant("openbabel", default=False, description="Enable detection of openbabel compilation")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))
@@ -41,11 +52,14 @@ class BigdftCore(AutotoolsPackage, CudaPackage):
depends_on("libxc@:4.3.4", when="@1.9.2:")
depends_on("libxc@:4.3.4", when="@develop")
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-chess@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-psolver@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-libabinit@{0}".format(vers), when="@{0}".format(vers))
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-chess@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-psolver@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-libabinit@{vers}", when=f"@{vers}")
+
+ for vers in ["1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-liborbs@{vers}", when=f"@{vers}")
configure_directory = "bigdft"
@@ -54,65 +68,66 @@ class BigdftCore(AutotoolsPackage, CudaPackage):
prefix = self.prefix
python_version = spec["python"].version.up_to(2)
- pyyaml = join_path(spec["py-pyyaml"].prefix.lib, "python{0}".format(python_version))
+ pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
args = [
- "FCFLAGS=%s" % " ".join(openmp_flag),
- "--with-ext-linalg=%s" % " ".join(linalg),
- "--with-pyyaml-path=%s" % pyyaml,
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags,
- "--with-chess-libs=%s" % spec["bigdft-chess"].libs.ld_flags,
- "--with-chess-incs=%s" % spec["bigdft-chess"].headers.include_flags,
- "--with-psolver-libs=%s" % spec["bigdft-psolver"].libs.ld_flags,
- "--with-psolver-incs=%s" % spec["bigdft-psolver"].headers.include_flags,
- "--with-libABINIT-libs=%s" % spec["bigdft-libabinit"].libs.ld_flags,
- "--with-libABINIT-incs=%s" % spec["bigdft-libabinit"].headers.include_flags,
- "--with-libgain-libs=%s" % spec["libgain"].libs.ld_flags,
- "--with-libgain-incs=%s" % spec["libgain"].headers.include_flags,
- "--with-libxc-libs=%s %s"
- % (spec["libxc"].libs.ld_flags, spec["libxc"].libs.ld_flags + "f90"),
- "--with-libxc-incs=%s" % spec["libxc"].headers.include_flags,
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-pyyaml-path={pyyaml}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}",
+ f"--with-chess-libs={spec['bigdft-chess'].libs.ld_flags}",
+ f"--with-chess-incs={spec['bigdft-chess'].headers.include_flags}",
+ f"--with-psolver-libs={spec['bigdft-psolver'].libs.ld_flags}",
+ f"--with-psolver-incs={spec['bigdft-psolver'].headers.include_flags}",
+ f"--with-libABINIT-libs={spec['bigdft-libabinit'].libs.ld_flags}",
+ f"--with-libABINIT-incs={spec['bigdft-libabinit'].headers.include_flags}",
+ f"--with-libgain-libs={spec['libgain'].libs.ld_flags}",
+ f"--with-libgain-incs={spec['libgain'].headers.include_flags}",
+ f"--with-libxc-libs={spec['libxc'].libs.ld_flags} {spec['libxc'].libs.ld_flags}f90",
+ f"--with-libxc-incs={spec['libxc'].headers.include_flags}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
"--without-etsf-io",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--enable-opencl")
- args.append("--with-ocl-path=%s" % spec["cuda"].prefix)
+ args.append(f"--with-ocl-path={spec['cuda'].prefix}")
args.append("--enable-cuda-gpu")
- args.append("--with-cuda-path=%s" % spec["cuda"].prefix)
- args.append("--with-cuda-libs=%s" % spec["cuda"].libs.link_flags)
+ args.append(f"--with-cuda-path={spec['cuda'].prefix}")
+ args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
- if "+openbabel" in spec:
+ if spec.satisfies("+openbabel"):
args.append("--enable-openbabel")
- args.append("--with-openbabel-libs=%s" % spec["openbabel"].prefix.lib)
- args.append("--with-openbabel-incs=%s" % spec["openbabel"].prefix.include)
+ args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}")
+ args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}")
return args
diff --git a/var/spack/repos/builtin/packages/bigdft-futile/package.py b/var/spack/repos/builtin/packages/bigdft-futile/package.py
index 3bce94cd52..99bf739a1d 100644
--- a/var/spack/repos/builtin/packages/bigdft-futile/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-futile/package.py
@@ -18,12 +18,22 @@ class BigdftFutile(AutotoolsPackage, CudaPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -39,6 +49,14 @@ class BigdftFutile(AutotoolsPackage, CudaPackage):
configure_directory = "futile"
+ # missing MPI_BOTTOM in fake mpif.h (generated when compiling without MPI support)
+ # similar issue (maybe others) also in 1.9.4 but this patch does not work for 1.9.4
+ patch(
+ "https://gitlab.com/l_sim/bigdft-suite/-/commit/ec7419011fa9fd815de77bfca8642973091fb64b.diff",
+ sha256="66c493e37fe7f7f9800ae7f49bb0172a5b2372a2ce0ee4c3bcb7ff5c59a3925c",
+ when="@1.9.5~mpi",
+ )
+
def configure_args(self):
spec = self.spec
prefix = self.prefix
@@ -46,39 +64,41 @@ class BigdftFutile(AutotoolsPackage, CudaPackage):
linalg = [spec["blas"].libs.ld_flags, spec["lapack"].libs.ld_flags]
python_version = spec["python"].version.up_to(2)
- pyyaml = join_path(spec["py-pyyaml"].prefix.lib, "python{0}".format(python_version))
+ pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
args = [
- "FCFLAGS=%s" % " ".join(openmp_flag),
- "--with-ext-linalg=%s" % " ".join(linalg),
- "--with-yaml-path=%s" % spec["libyaml"].prefix,
- "--with-pyyaml-path=%s" % pyyaml,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-yaml-path={spec['libyaml'].prefix}",
+ f"--with-pyyaml-path={pyyaml}",
+ f"--prefix={prefix}",
]
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--enable-opencl")
- args.append("--with-ocl-path=%s" % spec["cuda"].prefix)
+ args.append(f"--with-ocl-path={spec['cuda'].prefix}")
args.append("--enable-cuda-gpu")
- args.append("--with-cuda-path=%s" % spec["cuda"].prefix)
+ args.append(f"--with-cuda-path={spec['cuda'].prefix}")
return args
diff --git a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py
index 6d14ea46f4..33e6363d84 100644
--- a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py
@@ -17,15 +17,25 @@ class BigdftLibabinit(AutotoolsPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
variant("mpi", default=True, description="Enable MPI support")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
depends_on("python@3.0:", type=("build", "run"))
@@ -33,8 +43,8 @@ class BigdftLibabinit(AutotoolsPackage):
depends_on("libxc@:2.2.2", when="@:1.9.1")
depends_on("libxc@:4.3.4", when="@1.9.1:")
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
configure_directory = "libABINIT"
@@ -47,22 +57,28 @@ class BigdftLibabinit(AutotoolsPackage):
fcflags.append("-fallow-argument-mismatch")
args = [
- "FCFLAGS=%s" % " ".join(fcflags),
- "--with-libxc-libs=%s %s"
- % (spec["libxc"].libs.ld_flags, spec["libxc"].libs.ld_flags + "f90"),
- "--with-libxc-incs=%s" % spec["libxc"].headers.include_flags,
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags,
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(fcflags)}",
+ f"--with-libxc-libs={spec['libxc'].libs.ld_flags} "
+ f"{spec['libxc'].libs.ld_flags + 'f90'}",
+ f"--with-libxc-incs={spec['libxc'].headers.include_flags}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.extend(
+ [
+ f"CC={spec['mpi'].mpicc}",
+ f"CXX={spec['mpi'].mpicxx}",
+ f"FC={spec['mpi'].mpifc}",
+ f"F90={spec['mpi'].mpifc}",
+ f"F77={spec['mpi'].mpif77}",
+ ]
+ )
else:
args.append("--disable-mpi")
diff --git a/var/spack/repos/builtin/packages/bigdft-liborbs/package.py b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py
new file mode 100644
index 0000000000..80545c7db5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py
@@ -0,0 +1,93 @@
+# Copyright 2013-2024 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.package import *
+
+
+class BigdftLiborbs(AutotoolsPackage, CudaPackage):
+ """BigDFT-liborbs: a library for orbital treatments in DFT."""
+
+ homepage = "https://bigdft.org/"
+ url = "https://gitlab.com/l_sim/bigdft-suite/-/archive/1.9.5/bigdft-suite-1.9.5.tar.gz"
+ git = "https://gitlab.com/l_sim/bigdft-suite.git"
+
+ version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
+
+ variant("mpi", default=True, description="Enable MPI support")
+ variant("openmp", default=True, description="Enable OpenMP support")
+ variant("scalapack", default=True, description="Enable SCALAPACK support")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("mpi", when="+mpi")
+ depends_on("scalapack", when="+scalapack")
+
+ for vers in ["1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}")
+
+ configure_directory = "liborbs"
+
+ def configure_args(self):
+ spec = self.spec
+ prefix = self.prefix
+
+ openmp_flag = []
+ if "+openmp" in spec:
+ openmp_flag.append(self.compiler.openmp_flag)
+
+ linalg = []
+ if "+scalapack" in spec:
+ linalg.append(spec["scalapack"].libs.ld_flags)
+ linalg.append(spec["lapack"].libs.ld_flags)
+ linalg.append(spec["blas"].libs.ld_flags)
+
+ args = [
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
+ ]
+
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if "+mpi" in spec:
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
+ else:
+ args.append("--disable-mpi")
+
+ if "+openmp" in spec:
+ args.append("--with-openmp")
+ else:
+ args.append("--without-openmp")
+
+ if "+cuda" in spec:
+ args.append("--enable-opencl")
+ args.append(f"--with-ocl-path={spec['cuda'].prefix}")
+ args.append("--enable-cuda-gpu")
+ args.append(f"--with-cuda-path={spec['cuda'].prefix}")
+ args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
+
+ return args
+
+ @property
+ def libs(self):
+ shared = "+shared" in self.spec
+ return find_libraries("libbigdft-*", root=self.prefix, shared=shared, recursive=True)
diff --git a/var/spack/repos/builtin/packages/bigdft-psolver/package.py b/var/spack/repos/builtin/packages/bigdft-psolver/package.py
index 4655c754b2..570622ab3a 100644
--- a/var/spack/repos/builtin/packages/bigdft-psolver/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-psolver/package.py
@@ -12,21 +12,31 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage):
of BigDFT code, and it can also be used separately and linked to other codes."""
homepage = "https://bigdft.org/"
- url = "https://gitlab.com/l_sim/bigdft-suite/-/archive/1.9.2/bigdft-suite-1.9.2.tar.gz"
+ url = "https://gitlab.com/l_sim/bigdft-suite/-/archive/1.9.5/bigdft-suite-1.9.5.tar.gz"
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant("scalapack", default=True, description="Enable SCALAPACK support")
+ # Not default in bigdft, but is typically the default expectation:
+ variant("shared", default=True, description="Build shared libraries")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ depends_on("pkg-config", type="build")
depends_on("python@3.0:", type=("build", "run"))
@@ -36,9 +46,9 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage):
depends_on("mpi", when="+mpi")
depends_on("scalapack", when="+scalapack")
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-atlab@{0}".format(vers), when="@{0}".format(vers))
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-atlab@{vers}", when=f"@{vers}")
configure_directory = "psolver"
@@ -47,49 +57,51 @@ class BigdftPsolver(AutotoolsPackage, CudaPackage):
prefix = self.prefix
python_version = spec["python"].version.up_to(2)
- pyyaml = join_path(spec["py-pyyaml"].prefix.lib, "python{0}".format(python_version))
+ pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
args = [
- "FCFLAGS=%s" % " ".join(openmp_flag),
- "--with-ext-linalg=%s" % " ".join(linalg),
- "--with-pyyaml-path=%s" % pyyaml,
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags,
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-pyyaml-path={pyyaml}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
"--without-etsf-io",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- args.append("--with-atlab-libs=%s" % spec["bigdft-atlab"].prefix.lib)
+ args.append(f"--with-atlab-libs={spec['bigdft-atlab'].libs.ld_flags}")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--enable-cuda-gpu")
- args.append("--with-cuda-path=%s" % spec["cuda"].prefix)
- args.append("--with-cuda-libs=%s" % spec["cuda"].libs.link_flags)
+ args.append(f"--with-cuda-path={spec['cuda'].prefix}")
+ args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
return args
diff --git a/var/spack/repos/builtin/packages/bigdft-spred/package.py b/var/spack/repos/builtin/packages/bigdft-spred/package.py
index c95da03a98..796c10d98e 100644
--- a/var/spack/repos/builtin/packages/bigdft-spred/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-spred/package.py
@@ -15,17 +15,28 @@ class BigdftSpred(AutotoolsPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ # version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489") # bigdft-core broken
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ depends_on("pkg-config", type="build")
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant("scalapack", default=True, description="Enable SCALAPACK support")
+ variant(
+ "shared", default=True, description="Build shared libraries"
+ ) # Not default in bigdft, but is typically the default expectation
depends_on("python@3.0:", type=("build", "run"))
@@ -35,10 +46,10 @@ class BigdftSpred(AutotoolsPackage):
depends_on("mpi", when="+mpi")
depends_on("scalapack", when="+scalapack")
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
- depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-psolver@{0}".format(vers), when="@{0}".format(vers))
- depends_on("bigdft-core@{0}".format(vers), when="@{0}".format(vers))
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]:
+ depends_on(f"bigdft-futile@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-psolver@{vers}", when=f"@{vers}")
+ depends_on(f"bigdft-core@{vers}", when=f"@{vers}")
configure_directory = "spred"
@@ -47,42 +58,44 @@ class BigdftSpred(AutotoolsPackage):
prefix = self.prefix
python_version = spec["python"].version.up_to(2)
- pyyaml = join_path(spec["py-pyyaml"].prefix.lib, "python{0}".format(python_version))
+ pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
args = [
- "FCFLAGS=%s" % " ".join(openmp_flag),
- "--with-ext-linalg=%s" % " ".join(linalg),
- "--with-pyyaml-path=%s" % pyyaml,
- "--with-futile-libs=%s" % spec["bigdft-futile"].libs.ld_flags,
- "--with-futile-incs=%s" % spec["bigdft-futile"].headers.include_flags,
- "--with-psolver-libs=%s" % spec["bigdft-psolver"].prefix.lib,
- "--with-psolver-incs=%s" % spec["bigdft-psolver"].headers.include_flags,
- "--with-core-libs=%s" % spec["bigdft-core"].prefix.lib,
- "--with-core-incs=%s" % spec["bigdft-core"].headers.include_flags,
- "--with-moduledir=%s" % prefix.include,
- "--prefix=%s" % prefix,
+ f"FCFLAGS={' '.join(openmp_flag)}",
+ f"--with-ext-linalg={' '.join(linalg)}",
+ f"--with-pyyaml-path={pyyaml}",
+ f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",
+ f"--with-futile-incs={spec['bigdft-futile'].headers.include_flags}",
+ f"--with-psolver-libs={spec['bigdft-psolver'].prefix.lib}",
+ f"--with-psolver-incs={spec['bigdft-psolver'].headers.include_flags}",
+ f"--with-core-libs={spec['bigdft-core'].prefix.lib}",
+ f"--with-core-incs={spec['bigdft-core'].headers.include_flags}",
+ f"--with-moduledir={prefix.include}",
+ f"--prefix={prefix}",
]
-
- if "+mpi" in spec:
- args.append("CC=%s" % spec["mpi"].mpicc)
- args.append("CXX=%s" % spec["mpi"].mpicxx)
- args.append("FC=%s" % spec["mpi"].mpifc)
- args.append("F90=%s" % spec["mpi"].mpifc)
- args.append("F77=%s" % spec["mpi"].mpif77)
+ if spec.satisfies("+shared"):
+ args.append("--enable-dynamic-libraries")
+
+ if spec.satisfies("+mpi"):
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ args.append(f"FC={spec['mpi'].mpifc}")
+ args.append(f"F90={spec['mpi'].mpifc}")
+ args.append(f"F77={spec['mpi'].mpif77}")
else:
args.append("--disable-mpi")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
diff --git a/var/spack/repos/builtin/packages/bigdft-suite/package.py b/var/spack/repos/builtin/packages/bigdft-suite/package.py
index 7c2abb0c43..7658e885ac 100644
--- a/var/spack/repos/builtin/packages/bigdft-suite/package.py
+++ b/var/spack/repos/builtin/packages/bigdft-suite/package.py
@@ -15,13 +15,16 @@ class BigdftSuite(BundlePackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5")
+ version("1.9.4")
+ # version("1.9.3") # bigdft-core broken
version("1.9.2")
version("1.9.1")
version("1.9.0")
depends_on("python@3.0:", type=("run"))
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.4", "1.9.5", "develop"]:
depends_on("bigdft-futile@{0}".format(vers), when="@{0}".format(vers))
depends_on("bigdft-psolver@{0}".format(vers), when="@{0}".format(vers))
depends_on("bigdft-libabinit@{0}".format(vers), when="@{0}".format(vers))
diff --git a/var/spack/repos/builtin/packages/bind9/package.py b/var/spack/repos/builtin/packages/bind9/package.py
index c80109971b..ca6b6a995d 100644
--- a/var/spack/repos/builtin/packages/bind9/package.py
+++ b/var/spack/repos/builtin/packages/bind9/package.py
@@ -11,22 +11,24 @@ class Bind9(AutotoolsPackage):
BIND 9 has evolved to be a very flexible, full-featured DNS system.
"""
- homepage = "https://github.com/isc-projects/bind9"
- url = "https://github.com/isc-projects/bind9/archive/v9_14_6.tar.gz"
+ homepage = "https://www.isc.org"
+ url = "https://downloads.isc.org/isc/bind9/9.18.28/bind-9.18.28.tar.xz"
+ list_url = "https://downloads.isc.org/isc/bind9/"
+ git = "https://gitlab.isc.org/isc-projects/bind9"
- license("Apache-2.0")
+ license("MPL-2.0", checked_by="wdconinc")
- version("9_14_6", sha256="98be7a7b6d614b519f6c8d6ec7a8a39759ae9604d87228d9dc7c034471e5433e")
+ # Only even minor releases are stable
+ version("9.20.0", sha256="cc580998017b51f273964058e8cb3aa5482bc785243dea71e5556ec565a13347")
+ version("9.18.28", sha256="e7cce9a165f7b619eefc4832f0a8dc16b005d29e3890aed6008c506ea286a5e7")
- depends_on("libuv", type="link")
depends_on("pkgconfig", type="build")
- depends_on("openssl", type="link")
- depends_on("iconv", type="link")
+
+ depends_on("libuv@1.34,1.37:", type="link")
+ depends_on("openssl@1.1.1:", type="link")
+ depends_on("libcap", type="link")
+ depends_on("liburcu@0.14:", type="link", when="@9.20:")
def configure_args(self):
- args = [
- "--without-python",
- "--disable-linux-caps",
- "--with-openssl={0}".format(self.spec["openssl"].prefix),
- ]
+ args = ["--without-python", "--disable-doh"]
return args
diff --git a/var/spack/repos/builtin/packages/binder/llvm_dir.patch b/var/spack/repos/builtin/packages/binder/llvm_dir.patch
new file mode 100644
index 0000000000..dbd38b2e80
--- /dev/null
+++ b/var/spack/repos/builtin/packages/binder/llvm_dir.patch
@@ -0,0 +1,12 @@
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 06a0353..32678eb 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -107,7 +107,6 @@ if(USE_EXTERNAL_LLVM)
+ else()
+ target_link_libraries(binder
+ PRIVATE
+- ${lib_llvm_path}
+ clang
+ clang-cpp
+ )
diff --git a/var/spack/repos/builtin/packages/binder/package.py b/var/spack/repos/builtin/packages/binder/package.py
index 0b08dd0c29..34bd725180 100644
--- a/var/spack/repos/builtin/packages/binder/package.py
+++ b/var/spack/repos/builtin/packages/binder/package.py
@@ -24,13 +24,19 @@ class Binder(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("1.4.2", tag="v1.4.2", commit="b9f309e0513e745a7465571321e87595fa33d195")
version("1.3.0", tag="v1.3.0", commit="e9b55985af297ca161d615058e4a5da07c22bc77")
version("1.2.0", tag="v1.2.0", commit="90cf5b31b6f4ecad3fe87518ca2b949dc9e8ed1a")
version("1.1.0", tag="v1.0.0", commit="3de7949343197295250f988716d511a264b21324")
version("1.0.0", tag="v1.0.0", commit="3de7949343197295250f988716d511a264b21324")
+ depends_on("cxx", type="build") # generated
+
# Add dependencies
- depends_on("llvm+clang+llvm_dylib@7.0:9")
+ depends_on("llvm+clang+llvm_dylib@7.0:9", when="@:1.3.0")
+ depends_on("llvm+clang+llvm_dylib@7.0:", when="@1.4.2:")
+
+ patch("llvm_dir.patch", when="@1.4.2:")
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch b/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch
new file mode 100644
index 0000000000..b11a5fe8c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch
@@ -0,0 +1,12 @@
+diff --git a/gold/merge.cc b/gold/merge.cc
+index ca15149..a270bc0 100644
+--- a/gold/merge.cc
++++ b/gold/merge.cc
+@@ -24,6 +24,7 @@
+
+ #include <cstdlib>
+ #include <algorithm>
++#include <uchar.h>
+
+ #include "merge.h"
+ #include "compressed_output.h"
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index f71ebf8366..18bece43ac 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import pathlib
import re
import spack.build_systems.autotools
@@ -26,6 +27,9 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
checked_by="tgamblin",
)
+ version("2.43.1", sha256="becaac5d295e037587b63a42fad57fe3d9d7b83f478eb24b67f9eec5d0f1872f")
+ version("2.43", sha256="fed3c3077f0df7a4a1aa47b080b8c53277593ccbb4e5e78b73ffb4e3f265e750")
+ version("2.42", sha256="aa54850ebda5064c72cd4ec2d9b056c294252991486350d9a97ab2a6dfdfaf12")
version("2.41", sha256="a4c4bec052f7b8370024e60389e194377f3f48b56618418ea51067f67aaab30b")
version("2.40", sha256="f8298eb153a4b37d112e945aa5cb2850040bcf26a3ea65b5a715c83afe05e48a")
version("2.39", sha256="da24a84fef220102dd24042df06fdea851c2614a5377f86effa28f33b7b16148")
@@ -86,6 +90,9 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("plugins", default=True, description="enable plugins, needed for gold linker")
# When you build ld.gold you automatically get ld, even when you add the
# --disable-ld flag
@@ -125,6 +132,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
# 2.36 is missing some dependencies, this patch allows a parallel build.
# https://sourceware.org/bugzilla/show_bug.cgi?id=27482
patch("parallel-build-2.36.patch", when="@2.36")
+ patch("gold-gcc4.patch", when="@2.42 %gcc@:4.8.5")
# compression libs for debug symbols.
# pkg-config is used to find zstd in gas/configure
@@ -175,6 +183,20 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
match = re.search(r"GNU (nm|readelf).* (\S+)", output)
return Version(match.group(2)).dotted.up_to(3) if match else None
+ @classmethod
+ def determine_variants(cls, exes, version_str):
+ bin_dir = pathlib.Path(exes[0]).parent
+ include_dir = bin_dir.parent / "include"
+ plugin_h = include_dir / "plugin-api.h"
+
+ variants = "+gold" if find(str(bin_dir), "gold", recursive=False) else "~gold"
+ if find(str(include_dir), str(plugin_h), recursive=False):
+ variants += "+headers"
+ else:
+ variants += "~headers"
+
+ return variants
+
def flag_handler(self, name, flags):
spec = self.spec
@@ -202,6 +224,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
return (iflags, None, flags)
def test_binaries(self):
+ """check versions reported by binaries"""
binaries = [
"ar",
"c++filt",
@@ -236,7 +259,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
known_targets = {"x86_64": "x86_64", "aarch64": "aarch64", "ppc64le": "powerpc"}
- known_platforms = {"linux": "linux-gnu", "cray": "linux-gnu", "darwin": "apple-darwin"}
+ known_platforms = {"linux": "linux-gnu", "darwin": "apple-darwin"}
family = str(self.spec.target.family)
platform = self.spec.platform
@@ -266,7 +289,7 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
args += self.enable_or_disable("lto")
args += self.enable_or_disable("nls")
args += self.enable_or_disable("plugins")
- if "+pgo" in self.spec:
+ if self.spec.satisfies("+pgo"):
args.append("--enable-pgo-build=lto")
else:
args.append("--disable-pgo-build")
diff --git a/var/spack/repos/builtin/packages/biobambam2/package.py b/var/spack/repos/builtin/packages/biobambam2/package.py
index 83f0293a2d..1b5acd3253 100644
--- a/var/spack/repos/builtin/packages/biobambam2/package.py
+++ b/var/spack/repos/builtin/packages/biobambam2/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -18,6 +20,8 @@ class Biobambam2(AutotoolsPackage):
url="https://gitlab.com/german.tischler/biobambam2/-/archive/2.0.177-release-20201112105453/biobambam2-2.0.177-release-20201112105453.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -27,14 +31,20 @@ class Biobambam2(AutotoolsPackage):
test_src_dir = "test"
def configure_args(self):
- args = ["--with-libmaus2={0}".format(self.spec["libmaus2"].prefix)]
+ args = [f"--with-libmaus2={self.spec['libmaus2'].prefix}"]
return args
@run_after("install")
def cache_test_sources(self):
"""Copy the test source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(self.test_src_dir)
+ cache_extra_test_sources(self, self.test_src_dir)
+
+ # Fix test scripts to run installed binaries
+ scripts_dir = join_path(install_test_root(self), self.test_src_dir)
+ for path in os.listdir(scripts_dir):
+ if path.endswith(".sh"):
+ filter_file(r"../src/", r"", join_path(scripts_dir, path))
def test_short_sort(self):
"""run testshortsort.sh to check alignments sorted by coordinate"""
diff --git a/var/spack/repos/builtin/packages/biobloom/package.py b/var/spack/repos/builtin/packages/biobloom/package.py
index e89488f9ef..8559f7504a 100644
--- a/var/spack/repos/builtin/packages/biobloom/package.py
+++ b/var/spack/repos/builtin/packages/biobloom/package.py
@@ -16,6 +16,9 @@ class Biobloom(AutotoolsPackage):
version("2.3.5", sha256="03fbc0d0fc867f76d64f756d556598e5fe5f015363df8f97fbed4cfd541c6749")
version("2.2.0", sha256="5d09f8690f0b6402f967ac09c5b0f769961f3fe3791000f8f73af6af7324f02c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost+exception+math+serialization+container")
depends_on("sdsl-lite")
depends_on("sparsehash")
diff --git a/var/spack/repos/builtin/packages/biopieces/package.py b/var/spack/repos/builtin/packages/biopieces/package.py
index 3b36ee0b58..d84bce1f09 100644
--- a/var/spack/repos/builtin/packages/biopieces/package.py
+++ b/var/spack/repos/builtin/packages/biopieces/package.py
@@ -18,6 +18,8 @@ class Biopieces(Package):
version("2016-04-12", commit="982f80f7c55e2cae67737d80fe35a4e784762856", submodules=True)
+ depends_on("c", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("perl-module-build", type=("build", "run"))
depends_on("perl-bit-vector", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/bird/package.py b/var/spack/repos/builtin/packages/bird/package.py
index b9ed84e0c3..7706f59e67 100644
--- a/var/spack/repos/builtin/packages/bird/package.py
+++ b/var/spack/repos/builtin/packages/bird/package.py
@@ -14,13 +14,42 @@ class Bird(AutotoolsPackage):
systems and distributed under the GNU General Public License."""
homepage = "https://bird.network.cz/"
- url = "https://github.com/BIRD/bird/archive/v2.0.2.tar.gz"
+ url = "https://gitlab.nic.cz/labs/bird/-/archive/v2.0.2/bird-v2.0.2.tar.gz"
- license("GPL-2.0-or-later")
+ license("GPL-2.0-or-later", checked_by="wdconinc")
- version("2.0.2", sha256="bd42d48fbcc2c0046d544f1183cd98193ff15b792d332ff45f386b0180b09335")
- version("2.0.1", sha256="cd6ea4a39ca97ad16d364bf80f919f0e75eba02dd7fe46be40f55d78d022244a")
+ version("2.15.1", sha256="5a4cf55c4767192aa57880ac5f6763e5b8c26f688ab5934df96e3615c4b0a1e1")
+ version("2.15", sha256="485b731ed0668b0da4f5110ba8ea98d248e10b25421820feca5dcdd94ab98a29")
+ version("2.14", sha256="22823b20d31096fcfded6773ecc7d9ee6da0339ede805422647c04127c67472f")
+ version("2.13.1", sha256="4a55c469f5d2984b62eef929343815b75a7b19132b8c3f40b41f8f66e27d3078")
+ version("2.13", sha256="db3df5dd84de98c2a61f8415c9812876578d6ba159038d853b211700e43dbae1")
+ version("2.0.12", sha256="70ef51cbf2b7711db484225da5bdf0344ba31629a167148bfe294f61f07573f6")
+ version("2.0.11", sha256="a2a1163166def10e014c6f832d6552b00ab46714024613c76cd6ebc3cd3e51c4")
+ version("2.0.10", sha256="8e053a64ed3e2c681fcee33ee31e61c7a5df32f94644799f283d294108e83722")
+ version("2.0.9", sha256="912d5c1bbefffd6198b10688ef6e16d0b9dfb2886944f481fc38b4d869ffd2c4")
+ version("2.0.8", sha256="4d0eeea762dcd4422e1e276e2ed123cfed630cf1cce017b50463d79fcf2fff0c")
+ version("2.0.7", sha256="d0c6aeaaef3217d6210261a49751fc662838b55fec92f576e20938917dbf89ab")
+ version("2.0.6", sha256="61518120c76bbfe0b52eff614e7580a1d973e66907df5aeac83fe344aa30595a")
+ version("2.0.5", sha256="f20dc822fc95aa580759c9b83bfd6c7c2e8504d8d0602cee118db1447054f5d0")
+ version("2.0.4", sha256="8c191b87524db3ff587253f46f94524ad2a89efdec8a12c800544a5fb01a2861")
+ version("2.0.3", sha256="54ec151518564f87e81de4ac19376689e5ba8dd9129f1e9a79086db3df0931f8")
+ version("2.0.2", sha256="e1e9ac92faf5893890c478386fdbd3c391ec2e9b911b1dfccec7b7fa825e9820")
+ version("2.0.1", sha256="c222968bb017e6b77d14f4e778f437b84f4ccae686355a3ad8e88799285e7636")
+ # fix multiple definitions with extern rta_dest_names
+ patch(
+ "https://gitlab.nic.cz/labs/bird/-/commit/4bbc10614f3431c37e6352f5a6ea5c693c31021e.diff",
+ sha256="ab891b10dab2fa17a3047cd48e082cccc14f958f4255dcae771deab1330da7c8",
+ when="@:2.0.7",
+ )
+ # fix linker errors due to undefined behavior on signals
+ patch(
+ "https://gitlab.nic.cz/labs/bird/-/commit/24493e9169d3058958ab3ec4d2b02c5753954981.diff",
+ sha256="ea49dea1c503836feea127c605b99352b1e353df490d63873af09973cf2b3d14",
+ when="@:2.0.6",
+ )
+
+ depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py
index 838dd47a3f..5ca28a2a2b 100644
--- a/var/spack/repos/builtin/packages/bison/package.py
+++ b/var/spack/repos/builtin/packages/bison/package.py
@@ -50,17 +50,20 @@ class Bison(AutotoolsPackage, GNUMirrorPackage):
version("3.0.4", sha256="b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e")
version("2.7", sha256="19bbe7374fd602f7a6654c131c21a15aebdc06cc89493e8ff250cb7f9ed0a831")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("color", default=False, description="Enable experimental colored output", when="@3.4:")
+
# https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00008.html
patch("parallel.patch", when="@3.4.2")
provides("yacc")
- depends_on("gettext", when="@3.4:")
+ depends_on("gettext", when="+color")
+ depends_on("m4@1.4.6:", type=("build", "run"))
depends_on("diffutils", type="build")
- depends_on("m4", type=("build", "run"))
- depends_on("perl", type="build")
- patch("pgi.patch", when="@3.0.4")
# The NVIDIA compilers do not currently support some GNU builtins.
# Detect this case and use the fallback path.
patch("nvhpc-3.6.patch", when="@3.6.0:3.6 %nvhpc")
diff --git a/var/spack/repos/builtin/packages/bison/pgi.patch b/var/spack/repos/builtin/packages/bison/pgi.patch
deleted file mode 100644
index 8aeaa96a51..0000000000
--- a/var/spack/repos/builtin/packages/bison/pgi.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/lib/config.in.h
-+++ b/lib/config.in.h
-@@ -2182,6 +2182,7 @@
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : (199901L <= __STDC_VERSION__ \
- && !defined __HP_cc \
-+ && !defined __PGI \
- && !(defined __SUNPRO_C && __STDC__))) \
- && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
- # define _GL_INLINE inline
diff --git a/var/spack/repos/builtin/packages/bitgroomingz/package.py b/var/spack/repos/builtin/packages/bitgroomingz/package.py
index ec6fdfd17f..f618da822b 100644
--- a/var/spack/repos/builtin/packages/bitgroomingz/package.py
+++ b/var/spack/repos/builtin/packages/bitgroomingz/package.py
@@ -17,14 +17,12 @@ class Bitgroomingz(CMakePackage):
version("master", branch="master")
version("2022-10-14", commit="a018b20cca9f7d6a5396ab36230e4be6ae1cb25b")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="build shared libs")
depends_on("zlib-api")
def cmake_args(self):
- args = []
- if "+shared" in self.spec:
- args.append("-DBUILD_SHARED_LIBS=ON")
- else:
- args.append("-DBUILD_SHARED_LIBS=OFF")
- return args
+ return [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
diff --git a/var/spack/repos/builtin/packages/bitlbee/package.py b/var/spack/repos/builtin/packages/bitlbee/package.py
index 1ffdd1b9b5..56f5e9d5bf 100644
--- a/var/spack/repos/builtin/packages/bitlbee/package.py
+++ b/var/spack/repos/builtin/packages/bitlbee/package.py
@@ -18,6 +18,8 @@ class Bitlbee(AutotoolsPackage):
version("3.6", sha256="6ec3a1054eaa98eaaabe6159cb4912cfd6286f71adcfa970419b273b38fdfe0c")
version("3.5-2", sha256="cdcf3ed829d1905b73687b6aa189bbfaf9194f886d9fc7156646827dc0384fdb")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("gnutls")
depends_on("libgcrypt")
diff --git a/var/spack/repos/builtin/packages/bitmap/package.py b/var/spack/repos/builtin/packages/bitmap/package.py
index 095bac8af0..5e704b4fdb 100644
--- a/var/spack/repos/builtin/packages/bitmap/package.py
+++ b/var/spack/repos/builtin/packages/bitmap/package.py
@@ -9,12 +9,15 @@ from spack.package import *
class Bitmap(AutotoolsPackage, XorgPackage):
"""bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities."""
- homepage = "https://cgit.freedesktop.org/xorg/app/bitmap"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/bitmap"
xorg_mirror_path = "app/bitmap-1.0.8.tar.gz"
+ version("1.1.1", sha256="86928020ece030435eb5ae795a5f22c5ca0886a6c589187886d1b6d14d9eec81")
version("1.1.0", sha256="60ca941e8e38e1f8f9c61d3e86c098878113fd11eac4e07177c111f0bf00779e")
version("1.0.8", sha256="1a2fbd10a2ca5cd93f7b77bbb0555b86d8b35e0fc18d036b1607c761755006fc")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxmu")
depends_on("libxaw")
@@ -22,6 +25,6 @@ class Bitmap(AutotoolsPackage, XorgPackage):
depends_on("libxt")
depends_on("xbitmaps")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/bitsery/package.py b/var/spack/repos/builtin/packages/bitsery/package.py
index f3695651b6..078fe1fcb1 100644
--- a/var/spack/repos/builtin/packages/bitsery/package.py
+++ b/var/spack/repos/builtin/packages/bitsery/package.py
@@ -16,3 +16,5 @@ class Bitsery(CMakePackage):
license("MIT")
version("5.1.0", sha256="8f46667db5d0b62fdaab33612108498bcbcbe9cfa48d2cd220b2129734440a8d")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/blackhat/package.py b/var/spack/repos/builtin/packages/blackhat/package.py
index 6ed4a4a42c..5d6563cf51 100644
--- a/var/spack/repos/builtin/packages/blackhat/package.py
+++ b/var/spack/repos/builtin/packages/blackhat/package.py
@@ -14,6 +14,9 @@ class Blackhat(AutotoolsPackage):
version("0.9.9", branch="cms/v0.9.9")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("qd")
depends_on("python")
extends("python")
diff --git a/var/spack/repos/builtin/packages/blake3/package.py b/var/spack/repos/builtin/packages/blake3/package.py
new file mode 100644
index 0000000000..923d5a0fcd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/blake3/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Blake3(CMakePackage):
+ """BLAKE3 is a cryptographic hash function"""
+
+ homepage = "https://github.com/BLAKE3-team/BLAKE3"
+ url = "https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/1.5.1.tar.gz"
+
+ root_cmakelists_dir = "c"
+
+ maintainers("haampie")
+
+ version("1.5.1", sha256="822cd37f70152e5985433d2c50c8f6b2ec83aaf11aa31be9fe71486a91744f37")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("cmake@3.9:", type="build")
diff --git a/var/spack/repos/builtin/packages/blaspp/0001-fix-blaspp-build-error-with-rocm-6.0.0.patch b/var/spack/repos/builtin/packages/blaspp/0001-fix-blaspp-build-error-with-rocm-6.0.0.patch
new file mode 100644
index 0000000000..3ce15f0859
--- /dev/null
+++ b/var/spack/repos/builtin/packages/blaspp/0001-fix-blaspp-build-error-with-rocm-6.0.0.patch
@@ -0,0 +1,50 @@
+From a75f399bfa77680e7736d126ef3e5a520e1a1702 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Wed, 17 Jan 2024 12:55:06 +0000
+Subject: [PATCH] fix build error with rocm-6.0.0 by adding extra parameters
+ for rocblas function calls rocblas_ztrmm() ,rocblas_strmm(),
+ rocblas_ctrmm(),rocblas_dtrmm()
+
+---
+ src/rocblas_wrappers.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/rocblas_wrappers.cc b/src/rocblas_wrappers.cc
+index 0e01a95..44ab150 100644
+--- a/src/rocblas_wrappers.cc
++++ b/src/rocblas_wrappers.cc
+@@ -667,6 +667,7 @@ void trmm(
+ m, n,
+ &alpha,
+ dA, ldda,
++ dB, lddb,
+ dB, lddb ) );
+ }
+
+@@ -686,6 +687,7 @@ void trmm(
+ m, n,
+ &alpha,
+ dA, ldda,
++ dB, lddb,
+ dB, lddb ) );
+ }
+
+@@ -705,6 +707,7 @@ void trmm(
+ m, n,
+ (rocblas_float_complex*) &alpha,
+ (rocblas_float_complex*) dA, ldda,
++ (rocblas_float_complex*) dB, lddb,
+ (rocblas_float_complex*) dB, lddb ) );
+ }
+
+@@ -724,6 +727,7 @@ void trmm(
+ m, n,
+ (rocblas_double_complex*) &alpha,
+ (rocblas_double_complex*) dA, ldda,
++ (rocblas_double_complex*) dB, lddb,
+ (rocblas_double_complex*) dB, lddb ) );
+ }
+
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py
index e0de779540..9974e1d397 100644
--- a/var/spack/repos/builtin/packages/blaspp/package.py
+++ b/var/spack/repos/builtin/packages/blaspp/package.py
@@ -22,6 +22,15 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version(
+ "2024.10.26", sha256="c15ae19dbed1be35e8258048a044d3104da59e7e52b4fe7fe7ea5032708a8d2c"
+ )
+ version(
+ "2024.05.31", sha256="24f325d2e1c2cc4275324bd88406555688379480877d19553656a0328287927a"
+ )
+ version(
+ "2023.11.05", sha256="62dfc03ec07c0826e0466dc2c204b460caa929d53ad4f050cb132d92670be7ce"
+ )
+ version(
"2023.08.25", sha256="1d9c7227a6d8776944aa866592142b7b51c6e4ba5529d168eb8ae2b329c47401"
)
version(
@@ -46,6 +55,8 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage):
"2020.10.00", sha256="ce148cfe397428d507c72d7d9eba5e9d3f55ad4cd842e6e873c670183dcb7795"
)
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP internally.")
variant("shared", default=True, description="Build shared libraries")
variant("sycl", default=False, description="Build support for the SYCL backend")
@@ -76,16 +87,18 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage):
requires("%oneapi", when="+sycl", msg="blaspp+sycl must be compiled with %oneapi")
+ patch("0001-fix-blaspp-build-error-with-rocm-6.0.0.patch", when="@2023.06.00: ^hip@6.0 +rocm")
+
def cmake_args(self):
spec = self.spec
backend_config = "-Duse_cuda=%s" % ("+cuda" in spec)
if self.version >= Version("2021.04.01"):
backend = "none"
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
backend = "cuda"
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
backend = "hip"
- if "+sycl" in spec:
+ if spec.satisfies("+sycl"):
backend = "sycl"
backend_config = "-Dgpu_backend=%s" % backend
@@ -104,8 +117,8 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage):
def check(self):
# If the tester fails to build, ensure that the check() fails.
- if os.path.isfile(join_path(self.builder.build_directory, "test", "tester")):
- with working_dir(self.builder.build_directory):
+ if os.path.isfile(join_path(self.build_directory, "test", "tester")):
+ with working_dir(self.build_directory):
make("check")
else:
raise Exception("The tester was not built!")
diff --git a/var/spack/repos/builtin/packages/blast-legacy/package.py b/var/spack/repos/builtin/packages/blast-legacy/package.py
index bad9bdd269..f85bdac580 100644
--- a/var/spack/repos/builtin/packages/blast-legacy/package.py
+++ b/var/spack/repos/builtin/packages/blast-legacy/package.py
@@ -21,6 +21,9 @@ class BlastLegacy(Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("tcsh", type="build")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py
index 0506a41883..ffc98650cd 100644
--- a/var/spack/repos/builtin/packages/blast-plus/package.py
+++ b/var/spack/repos/builtin/packages/blast-plus/package.py
@@ -14,6 +14,8 @@ class BlastPlus(AutotoolsPackage):
maintainers("weijianwen")
+ version("2.16.0", sha256="17c93cf009721023e5aecf5753f9c6a255d157561638b91b3ad7276fd6950c2b")
+ version("2.15.0", sha256="6918c370524c8d44e028bf491e8f245a895e07c66c77b261ce3b38d6058216e0")
version("2.14.1", sha256="712c2dbdf0fb13cc1c2d4f4ef5dd1ce4b06c3b57e96dfea8f23e6e99f5b1650e")
version("2.13.0", sha256="89553714d133daf28c477f83d333794b3c62e4148408c072a1b4620e5ec4feb2")
version("2.12.0", sha256="fda3c9c9d488cad6c1880a98a236d842bcf3610e3e702af61f7a48cf0a714b88")
@@ -24,6 +26,9 @@ class BlastPlus(AutotoolsPackage):
version("2.6.0", sha256="0510e1d607d0fb4389eca50d434d5a0be787423b6850b3a4f315abc2ef19c996")
version("2.2.30", sha256="26f72d51c81b9497f33b7274109565c36692572faef4d72377f79b7e59910e40")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# homebrew sez: Fixed upstream in future version > 2.6
# But this bug sez that it will be fixed in 2.6
# https://github.com/Homebrew/homebrew-science/pull/4740
@@ -89,7 +94,7 @@ class BlastPlus(AutotoolsPackage):
if spec.target.family != "aarch64":
config_args.append("--with-64")
- if "+static" in spec:
+ if spec.satisfies("+static"):
config_args.append("--with-static")
# FIXME
# args << "--with-static-exe" unless OS.linux?
@@ -97,17 +102,17 @@ class BlastPlus(AutotoolsPackage):
else:
config_args.extend(["--with-dll", "--without-static", "--without-static-exe"])
- if "+jpeg" in spec:
+ if spec.satisfies("+jpeg"):
config_args.append("--with-jpeg={0}".format(self.spec["jpeg"].prefix))
else:
config_args.append("--without-jpeg")
- if "+png" in spec:
+ if spec.satisfies("+png"):
config_args.append("--with-png={0}".format(self.spec["libpng"].prefix))
else:
config_args.append("--without-png")
- if "+freetype" in spec:
+ if spec.satisfies("+freetype"):
config_args.append("--with-freetype={0}".format(self.spec["freetype"].prefix))
else:
config_args.append("--without-freetype")
@@ -121,42 +126,42 @@ class BlastPlus(AutotoolsPackage):
# else:
# config_args.append('--without-hdf5')
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
config_args.append("--with-z={0}".format(self.spec["zlib-api"].prefix))
else:
config_args.append("--without-z")
- if "+bzip2" in spec:
+ if spec.satisfies("+bzip2"):
config_args.append("--with-bz2={0}".format(self.spec["bzip2"].prefix))
else:
config_args.append("--without-bz2")
- if "+lzo" in spec:
+ if spec.satisfies("+lzo"):
config_args.append("--with-lzo={0}".format(self.spec["lzo"].prefix))
else:
config_args.append("--without-lzo")
- if "+gnutls" in spec:
+ if spec.satisfies("+gnutls"):
config_args.append("--with-gnutls={0}".format(self.spec["gnutls"].prefix))
else:
config_args.append("--without-gnutls")
- if "+openssl" in spec:
+ if spec.satisfies("+openssl"):
config_args.append("--with-openssl={0}".format(self.spec["openssl"].prefix))
else:
config_args.append("--without-openssl")
- if "+pcre" in spec:
+ if spec.satisfies("+pcre"):
config_args.append("--with-pcre={0}".format(self.spec["pcre"].prefix))
else:
config_args.append("--without-pcre")
- if "+python" in spec:
+ if spec.satisfies("+python"):
config_args.append("--with-python={0}".format(self.spec["python"].home))
else:
config_args.append("--without-python")
- if "+perl" in spec:
+ if spec.satisfies("+perl"):
config_args.append("--with-perl={0}".format(self.spec["perl"].prefix))
else:
config_args.append("--without-python")
diff --git a/var/spack/repos/builtin/packages/blat/package.py b/var/spack/repos/builtin/packages/blat/package.py
index 5246c0eee7..4f258d206a 100644
--- a/var/spack/repos/builtin/packages/blat/package.py
+++ b/var/spack/repos/builtin/packages/blat/package.py
@@ -18,7 +18,7 @@ class Blat(Package):
version("35", sha256="06d9bcf114ec4a4b21fef0540a0532556b6602322a5a2b33f159dc939ae53620")
depends_on("libpng")
- depends_on("libuuid", when="@37:")
+ depends_on("uuid", when="@37:")
depends_on("mysql-client", when="@37:")
@when("@37")
diff --git a/var/spack/repos/builtin/packages/blaze/package.py b/var/spack/repos/builtin/packages/blaze/package.py
index e2762147f5..3826610462 100644
--- a/var/spack/repos/builtin/packages/blaze/package.py
+++ b/var/spack/repos/builtin/packages/blaze/package.py
@@ -22,6 +22,8 @@ class Blaze(CMakePackage):
maintainers("nilsvu")
version("master", branch="master")
+ version("3.8.2", sha256="4c4e1915971efbedab95790e4c5cf017d8448057fa8f8c62c46e1643bf72cbb1")
+ version("3.8.1", sha256="a084c6d1acc75e742a1cdcddf93d0cda0d9e3cc4014c246d997a064fa2196d39")
version("3.8", sha256="dfaae1a3a9fea0b3cc92e78c9858dcc6c93301d59f67de5d388a3a41c8a629ae")
version("3.7", sha256="ef3cbc5db7d62dcdde0af88d3c951051254afd750d26773406fddb6afc5ad890")
version("3.6", sha256="2ebbadacaf3f066e27352c1e413ead127b7ced8a3b202ae45f39c8f5f12324cc")
@@ -45,6 +47,8 @@ class Blaze(CMakePackage):
version("1.1", sha256="6add20eb9c176ea9f8091c49b101f46d1a1a6bd9c31553a6eff5e53603f0527f")
version("1.0", sha256="ee13cfd467c1a4b0fe7cc58b61b846eae862167a90dd2e60559626a30418b5a3")
+ depends_on("cxx", type="build") # generated
+
# These configuration options set defaults for dependent packages and
# control Blaze dependencies. They can also be enabled or disabled with
# compiler flags later by dependent packages, since Blaze is a header-only
diff --git a/var/spack/repos/builtin/packages/blis/package.py b/var/spack/repos/builtin/packages/blis/package.py
index da25f4e2c3..e7fdec6acb 100644
--- a/var/spack/repos/builtin/packages/blis/package.py
+++ b/var/spack/repos/builtin/packages/blis/package.py
@@ -16,6 +16,8 @@ class BlisBase(MakefilePackage):
of the library in the 'amdblis' package.
"""
+ maintainers("jeffhammond")
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
variant(
@@ -26,6 +28,7 @@ class BlisBase(MakefilePackage):
multi=False,
)
+ variant("ilp64", default=False, description="Force 64-bit Fortran native integers")
variant("blas", default=True, description="BLAS compatibility")
variant("cblas", default=True, description="CBLAS compatibility")
variant(
@@ -46,18 +49,22 @@ class BlisBase(MakefilePackage):
provides("blas", when="+cblas")
conflicts("%nvhpc")
- conflicts("%pgi")
def configure_args(self):
spec = self.spec
config_args = ["--enable-threading={0}".format(spec.variants["threads"].value)]
- if "+cblas" in spec:
+ if spec.satisfies("+ilp64"):
+ config_args.append("--blas-int-size=64")
+ else:
+ config_args.append("--blas-int-size=32")
+
+ if spec.satisfies("+cblas"):
config_args.append("--enable-cblas")
else:
config_args.append("--disable-cblas")
- if "+blas" in spec:
+ if spec.satisfies("+blas"):
config_args.append("--enable-blas")
else:
config_args.append("--disable-blas")
@@ -116,6 +123,7 @@ class Blis(BlisBase):
license("BSD-3-Clause")
version("master", branch="master")
+ version("1.0", sha256="9c12972aa1e50f64ca61684eba6828f2f3dd509384b1e41a1e8a9aedea4b16a6")
version("0.9.0", sha256="1135f664be7355427b91025075562805cdc6cc730d3173f83533b2c5dcc2f308")
version("0.8.1", sha256="729694128719801e82fae7b5f2489ab73e4a467f46271beff09588c9265a697b")
version("0.8.0", sha256="5e05868c4a6cf5032a7492f8861653e939a8f907a4fa524bbb6e14394e170a3d")
@@ -129,6 +137,10 @@ class Blis(BlisBase):
version("0.3.0", sha256="d34d17df7bdc2be8771fe0b7f867109fd10437ac91e2a29000a4a23164c7f0da")
version("0.2.2", sha256="4a7ecb56034fb20e9d1d8b16e2ef587abbc3d30cb728e70629ca7e795a7998e8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Problems with permissions on installed libraries:
# https://github.com/flame/blis/issues/343
patch("Makefile_0.6.0.patch", when="@0.4.0:0.6.0")
diff --git a/var/spack/repos/builtin/packages/blitz/fujitsu_compiler_specfic_header.patch b/var/spack/repos/builtin/packages/blitz/fujitsu_compiler_specfic_header.patch
new file mode 100644
index 0000000000..5ab4bf490b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/blitz/fujitsu_compiler_specfic_header.patch
@@ -0,0 +1,37 @@
+diff -Nur spack-src.org/blitz/bzconfig.h spack-src/blitz/bzconfig.h
+--- spack-src.org/blitz/bzconfig.h 2019-10-02 07:50:17.000000000 +0900
++++ spack-src/blitz/bzconfig.h 2023-05-25 15:13:47.000000000 +0900
+@@ -77,6 +77,10 @@
+ /* Pathscale pathCC compiler */
+ #include <blitz/pathscale/bzconfig.h>
+
++#elif defined(__FUJITSU)
++/* Fujitsu FCC compiler */
++#include <blitz/fujitsu/bzconfig.h>
++
+ #elif defined(__clang__)
+ /* clang compiler */
+ #include <blitz/llvm/bzconfig.h>
+@@ -93,10 +97,6 @@
+ /* KAI KCC compiler */
+ #include <blitz/kai/bzconfig.h>
+
+-#elif defined(__FUJITSU)
+-/* Fujitsu FCC compiler */
+-#include <blitz/fujitsu/bzconfig.h>
+-
+ /* Add other compilers here */
+
+ #else
+diff -Nur spack-src.org/m4/ac_compiler_specific_header.m4 spack-src/m4/ac_compiler_specific_header.m4
+--- spack-src.org/m4/ac_compiler_specific_header.m4 2019-10-02 07:50:17.000000000 +0900
++++ spack-src/m4/ac_compiler_specific_header.m4 2023-05-25 15:13:06.000000000 +0900
+@@ -21,7 +21,7 @@
+ [COMPILER_VENDOR="gnu"])],
+ [*KCC*], [COMPILER_VENDOR="kai"],
+ [*pgCC*], [COMPILER_VENDOR="pgi"],
+-dnl [*FCC*], [COMPILER_VENDOR="fujitsu"],
++ [*FCC*], [COMPILER_VENDOR="fujitsu"],
+ [*pathCC*], [COMPILER_VENDOR="pathscale"],
+ [*CC*], [AS_CASE([$target],
+ [*sgi*], [COMPILER_VENDOR="sgi"],
diff --git a/var/spack/repos/builtin/packages/blitz/package.py b/var/spack/repos/builtin/packages/blitz/package.py
index 5cba944af7..617af332db 100644
--- a/var/spack/repos/builtin/packages/blitz/package.py
+++ b/var/spack/repos/builtin/packages/blitz/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Blitz(AutotoolsPackage):
+class Blitz(CMakePackage):
"""N-dimensional arrays for C++"""
homepage = "https://github.com/blitzpp/blitz"
@@ -16,10 +16,10 @@ class Blitz(AutotoolsPackage):
version("1.0.2", sha256="500db9c3b2617e1f03d0e548977aec10d36811ba1c43bb5ef250c0e3853ae1c2")
- depends_on("python@3:", type="build")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
- build_targets = ["lib"]
+ depends_on("python@3:", type="build")
- def check(self):
- make("check-testsuite")
- make("check-examples")
+ # Fix makefile and include to build with Fujitsu compiler
+ patch("fujitsu_compiler_specfic_header.patch", when="%fj")
diff --git a/var/spack/repos/builtin/packages/blktrace/package.py b/var/spack/repos/builtin/packages/blktrace/package.py
index 99cbdd7725..f6ef57e5d5 100644
--- a/var/spack/repos/builtin/packages/blktrace/package.py
+++ b/var/spack/repos/builtin/packages/blktrace/package.py
@@ -28,6 +28,8 @@ class Blktrace(MakefilePackage):
version("1.0.3", sha256="78c6825212fe6700039fab77d53bc02e6b324e712caea718fff190e4e034cfa8")
version("1.0.2", sha256="15f01e2a952919ba3c7b90f8bd891d1a98c454626501094030df632666786343")
+ depends_on("c", type="build") # generated
+
depends_on("libaio")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/bloaty/package.py b/var/spack/repos/builtin/packages/bloaty/package.py
index ed940950b2..0774b107fe 100644
--- a/var/spack/repos/builtin/packages/bloaty/package.py
+++ b/var/spack/repos/builtin/packages/bloaty/package.py
@@ -17,3 +17,6 @@ class Bloaty(CMakePackage):
license("Apache-2.0")
version("1.1", sha256="a308d8369d5812aba45982e55e7c3db2ea4780b7496a5455792fb3dcba9abd6f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/blogbench/package.py b/var/spack/repos/builtin/packages/blogbench/package.py
index 3f03391b15..e827a2ca7d 100644
--- a/var/spack/repos/builtin/packages/blogbench/package.py
+++ b/var/spack/repos/builtin/packages/blogbench/package.py
@@ -15,3 +15,5 @@ class Blogbench(AutotoolsPackage):
version("1.2", sha256="1eabdb1ac0ad8ff6f5b9de36b2ef9b684a35b6e40aea0424e3dd4d6cd923c1af")
version("1.1", sha256="8cded059bfdbccb7be35bb6a2272ecfdbe3fbea43d53c92ba5572ac24f26c4df")
version("1.0", sha256="dc29261a19064a8fb64d39b27607f19d3b33ce3795908e717404167687ef33be")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/blt/package.py b/var/spack/repos/builtin/packages/blt/package.py
index 09331a9c03..4202ca559c 100644
--- a/var/spack/repos/builtin/packages/blt/package.py
+++ b/var/spack/repos/builtin/packages/blt/package.py
@@ -3,9 +3,57 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+import re
+
from spack.package import *
+def spec_uses_toolchain(spec):
+ gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
+ using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
+ return using_toolchain
+
+
+def spec_uses_gccname(spec):
+ gcc_name_regex = re.compile(".*gcc-name.*")
+ using_gcc_name = list(filter(gcc_name_regex.match, spec.compiler_flags["cxxflags"]))
+ return using_gcc_name
+
+
+def llnl_link_helpers(options, spec, compiler):
+ # From local package:
+ if compiler.fc:
+ fortran_compilers = ["gfortran", "xlf"]
+ if any(f_comp in compiler.fc for f_comp in fortran_compilers) and (
+ "clang" in compiler.cxx
+ ):
+ # Pass fortran compiler lib as rpath to find missing libstdc++
+ libdir = os.path.join(os.path.dirname(os.path.dirname(compiler.fc)), "lib")
+ flags = ""
+ for _libpath in [libdir, libdir + "64"]:
+ if os.path.exists(_libpath):
+ flags += " -Wl,-rpath,{0}".format(_libpath)
+ description = "Adds a missing libstdc++ rpath"
+ if flags:
+ options.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", flags, description))
+
+ if "cce" in compiler.cxx:
+ description = "Adds a missing rpath for libraries " "associated with the fortran compiler"
+ # Here is where to find libs that work for fortran
+ libdir = "/opt/cray/pe/cce/{0}/cce-clang/x86_64/lib".format(compiler.version)
+ linker_flags = "${{BLT_EXE_LINKER_FLAGS}} -Wl,-rpath,{0}".format(libdir)
+
+ version = "{0}".format(compiler.version)
+
+ if version == "16.0.0" or version == "16.0.1":
+ # Here is another directory added by cce@16.0.0 and cce@16.0.1
+ libdir = os.path.join(libdir, "x86_64-unknown-linux-gnu")
+ linker_flags += " -Wl,-rpath,{0}".format(libdir)
+
+ options.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description))
+
+
class Blt(Package):
"""BLT is a streamlined CMake-based foundation for Building, Linking and
Testing large-scale high performance computing (HPC) applications."""
@@ -25,6 +73,9 @@ class Blt(Package):
# 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.6.2", sha256="84b663162957c1fe0e896ac8e94cbf2b6def4a152ccfa12a293db14fb25191c8")
+ version("0.6.1", sha256="205540b704b8da5a967475be9e8f2d1a5e77009b950e7fbf01c0edabc4315906")
+ version("0.6.0", sha256="ede355e85f7b11d7c8442b51e4f7871c152093818606e00b1e1cf30f67ebdb23")
version("0.5.3", sha256="75d17caac98e78432ce25371c50d45ad3e7053820976bc5ed210bbef998f1732")
version("0.5.2", sha256="95b924cfbb2bddd9b1a92e96603b2fd485a19721d59ddf8ff50baefc1714d7ea")
version("0.5.1", sha256="ff7e87eefc48704a0721b66174612b945955adaa0a56aa69dd0473074fa4badf")
@@ -37,6 +88,10 @@ class Blt(Package):
version("0.2.5", sha256="3a000f60194e47b3e5623cc528cbcaf88f7fea4d9620b3c7446ff6658dc582a5")
version("0.2.0", sha256="c0cadf1269c2feb189e398a356e3c49170bc832df95e5564e32bdbb1eb0fa1b3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake", type="run")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/bmake/package.py b/var/spack/repos/builtin/packages/bmake/package.py
index 9555824460..3ae19ae9a7 100644
--- a/var/spack/repos/builtin/packages/bmake/package.py
+++ b/var/spack/repos/builtin/packages/bmake/package.py
@@ -20,6 +20,8 @@ class Bmake(Package):
version("20180512", sha256="ac3cd262065fcc20c1dec7c95f06306c8138b3e17025b949343a06a8980a5508")
version("20171207", sha256="1703667e53a0498c0903b20612ebcbb41b886a94b238624cfeadd91a4111d39a")
+ depends_on("c", type="build") # generated
+
def patch(self):
# Do not pre-roff cat pages
filter_file("MANTARGET?", "MANTARGET", "mk/man.mk", string=True)
diff --git a/var/spack/repos/builtin/packages/bmi/package.py b/var/spack/repos/builtin/packages/bmi/package.py
index 5ae430148c..ff2be55bf5 100644
--- a/var/spack/repos/builtin/packages/bmi/package.py
+++ b/var/spack/repos/builtin/packages/bmi/package.py
@@ -20,6 +20,8 @@ class Bmi(AutotoolsPackage):
version("main", branch="main")
version("2.8.1", sha256="28aa4341f0456cf20ee762f712d7c749ab8f864003329f9327c18ea03fc7ffdb")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/bml/package.py b/var/spack/repos/builtin/packages/bml/package.py
index 2822968fc6..5eb36f7063 100644
--- a/var/spack/repos/builtin/packages/bml/package.py
+++ b/var/spack/repos/builtin/packages/bml/package.py
@@ -32,6 +32,10 @@ class Bml(CMakePackage):
version("1.2.2", sha256="babc2fd0229397e418be00f3691277e86f549b5a23cadbcee66078595e9176a0")
version("1.1.0", sha256="a90ede19d80ed870f0bf1588875a9f371484d89006a7296010d8d791da3eac33")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build shared libs")
variant("mpi", default=True, description="Build with MPI Support")
@@ -45,7 +49,7 @@ class Bml(CMakePackage):
def cmake_args(self):
args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
spec = self.spec
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append("-DBML_MPI=True")
args.append("-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc)
args.append("-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
diff --git a/var/spack/repos/builtin/packages/bohrium/package.py b/var/spack/repos/builtin/packages/bohrium/package.py
index ec77b88633..a49e30b439 100644
--- a/var/spack/repos/builtin/packages/bohrium/package.py
+++ b/var/spack/repos/builtin/packages/bohrium/package.py
@@ -30,6 +30,9 @@ class Bohrium(CMakePackage, CudaPackage):
version("0.9.1", sha256="a8675db35ea4587ef12d5885a1aa19b59fd9c3f1366e239059de8b0f3cf51e04")
version("0.9.0", sha256="6f6379f1555de5a6a19138beac891a470df7df1fc9594e2b9404cf01b6e17d93")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
#
# Variants
#
@@ -119,8 +122,6 @@ class Bohrium(CMakePackage, CudaPackage):
# different hosts.
args = [
- # Choose a particular python version
- "-DPYTHON_EXECUTABLE:FILEPATH=" + spec["python"].command.path,
#
# Hard-disable Jupyter, since this would override a config
# file in the user's home directory in some cases during
@@ -147,7 +148,7 @@ class Bohrium(CMakePackage, CudaPackage):
#
args += ["-DVE_OPENCL=" + str("+opencl" in spec), "-DVE_CUDA=" + str("+cuda" in spec)]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args += [
"-DVE_OPENMP=ON",
"-DOPENMP_FOUND=True",
@@ -159,7 +160,7 @@ class Bohrium(CMakePackage, CudaPackage):
#
# Extension methods
#
- if "+blas" in spec:
+ if spec.satisfies("+blas"):
args += [
"-DEXT_BLAS=ON",
"-DCBLAS_FOUND=True",
@@ -169,7 +170,7 @@ class Bohrium(CMakePackage, CudaPackage):
else:
args += ["-DEXT_BLAS=OFF", "-DDCBLAS_FOUND=False"]
- if "+lapack" in spec:
+ if spec.satisfies("+lapack"):
args += [
"-DEXT_LAPACK=ON",
"-DLAPACKE_FOUND=True",
@@ -179,7 +180,7 @@ class Bohrium(CMakePackage, CudaPackage):
else:
args += ["-DEXT_LAPACK=OFF", "-DLAPACKE_FOUND=False"]
- if "+opencv" in spec:
+ if spec.satisfies("+opencv"):
args += [
"-DEXT_OPENCV=ON",
"-DOpenCV_FOUND=True",
@@ -233,11 +234,11 @@ class Bohrium(CMakePackage, CudaPackage):
# Collect the stacks which should be available:
stacks = ["default"]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
stacks.append("openmp")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
stacks.append("cuda")
- if "+opencl" in spec:
+ if spec.satisfies("+opencl"):
stacks.append("opencl")
# C++ compiler and compiler flags
@@ -258,10 +259,6 @@ class Bohrium(CMakePackage, CudaPackage):
cxx("-o", "test_cxxadd", file_cxxadd, *cxx_flags)
test_cxxadd = Executable("./test_cxxadd")
- # Build python test commandline
- file_pyadd = join_path(os.path.dirname(self.module.__file__), "pyadd.py")
- test_pyadd = Executable(spec["python"].command.path + " " + file_pyadd)
-
# Run tests for each available stack
for bh_stack in stacks:
tty.info("Testing with bohrium stack '" + bh_stack + "'")
@@ -271,6 +268,7 @@ class Bohrium(CMakePackage, CudaPackage):
compare_output(cpp_output, "Success!\n")
# Python test (if +python)
- if "+python" in spec:
- py_output = test_pyadd(output=str, env=test_env)
+ if spec.satisfies("+python"):
+ file_pyadd = join_path(os.path.dirname(self.module.__file__), "pyadd.py")
+ py_output = python(file_pyadd, output=str, env=test_env)
compare_output(py_output, "Success!\n")
diff --git a/var/spack/repos/builtin/packages/boinc-client/package.py b/var/spack/repos/builtin/packages/boinc-client/package.py
index 4b4ec8d7c3..b58a1ef7c1 100644
--- a/var/spack/repos/builtin/packages/boinc-client/package.py
+++ b/var/spack/repos/builtin/packages/boinc-client/package.py
@@ -21,6 +21,9 @@ class BoincClient(AutotoolsPackage):
version("7.16.5", sha256="33db60991b253e717c6124cce4750ae7729eaab4e54ec718b9e37f87012d668a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("manager", default=False, description="Builds the client manager")
variant("graphics", default=False, description="Graphic apps support")
@@ -57,7 +60,7 @@ class BoincClient(AutotoolsPackage):
args.append("--disable-server")
args.append("--enable-client")
- if "+manager" in spec:
+ if spec.satisfies("+manager"):
args.append("--enable-manager")
else:
args.append("--disable-manager")
diff --git a/var/spack/repos/builtin/packages/bolt/package.py b/var/spack/repos/builtin/packages/bolt/package.py
index 0c37acc553..ab1be415be 100644
--- a/var/spack/repos/builtin/packages/bolt/package.py
+++ b/var/spack/repos/builtin/packages/bolt/package.py
@@ -35,6 +35,9 @@ class Bolt(CMakePackage):
version("1.0.1", sha256="769e30dfc4042cee7ebbdadd23cf08796c03bcd8b335f516dc8cbc3f8adfa597")
version("1.0", sha256="1c0d2f75597485ca36335d313a73736594e75c8a36123c5a6f54d01b5ba5c384")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("argobots")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -53,7 +56,7 @@ class Bolt(CMakePackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(["examples"])
+ cache_extra_test_sources(self, ["examples"])
def test_sample_nested_example(self):
"""build and run sample_nested"""
diff --git a/var/spack/repos/builtin/packages/bonniepp/package.py b/var/spack/repos/builtin/packages/bonniepp/package.py
index 55dba48278..ae4a2817da 100644
--- a/var/spack/repos/builtin/packages/bonniepp/package.py
+++ b/var/spack/repos/builtin/packages/bonniepp/package.py
@@ -15,6 +15,8 @@ class Bonniepp(AutotoolsPackage):
version("1.98", sha256="6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04")
+ depends_on("cxx", type="build") # generated
+
def configure_args(self):
configure_args = []
configure_args.append("--enable-debug")
diff --git a/var/spack/repos/builtin/packages/bookleaf-cpp/package.py b/var/spack/repos/builtin/packages/bookleaf-cpp/package.py
index 6a145c30de..54611870df 100644
--- a/var/spack/repos/builtin/packages/bookleaf-cpp/package.py
+++ b/var/spack/repos/builtin/packages/bookleaf-cpp/package.py
@@ -21,6 +21,8 @@ class BookleafCpp(CMakePackage):
version("2.0.1", sha256="1286f916f59d1f3bf325041854e8c203894e293c5e26d5b19b9362ee02082983")
version("2.0", sha256="3c14344c31385bec9e089f9babf815566c4fcf98a47822f663afa2cefb0e90e1")
+ depends_on("cxx", type="build") # generated
+
variant("typhon", default=True, description="Use Typhon")
variant("parmetis", default=False, description="Use ParMETIS")
variant("silo", default=False, description="Use Silo")
@@ -37,16 +39,16 @@ class BookleafCpp(CMakePackage):
spec = self.spec
cmake_args = []
- if "+typhon" in spec:
+ if spec.satisfies("+typhon"):
cmake_args.append("-DENABLE_TYPHON=ON")
- if "+parmetis" in spec:
+ if spec.satisfies("+parmetis"):
cmake_args.append("-DENABLE_PARMETIS=ON")
- if "+silo" in spec:
+ if spec.satisfies("+silo"):
cmake_args.append("-DENABLE_SILO=ON")
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
cmake_args.append("-DENABLE_CALIPER=ON")
return cmake_args
diff --git a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch
deleted file mode 100644
index 925592e321..0000000000
--- a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-diff -uNr boost_1_63_0/boost/mpl/assert.hpp boost_1_63_0/boost/mpl/assert.hpp
---- boost_1_63_0/boost/mpl/assert.hpp 2016-12-22 07:33:17.000000000 -0500
-+++ boost_1_63_0/boost/mpl/assert.hpp 2017-05-31 20:09:43.704689605 -0400
-@@ -56,7 +56,7 @@
- // and GCC (which issues "unused variable" warnings when static constants are used
- // at a function scope)
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
-- || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)
-+ || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
- # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
- #else
- # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
-diff -uNr boost_1_63_0/boost/type_traits/is_floating_point.hpp boost_1_63_0/boost/type_traits/is_floating_point.hpp
---- boost_1_63_0/boost/type_traits/is_floating_point.hpp 2016-12-22 07:33:20.000000000 -0500
-+++ boost_1_63_0/boost/type_traits/is_floating_point.hpp 2017-05-31 20:12:50.187001957 -0400
-@@ -20,8 +20,9 @@
- template<> struct is_floating_point<float> : public true_type{};
- template<> struct is_floating_point<double> : public true_type{};
- template<> struct is_floating_point<long double> : public true_type{};
--
--#if defined(BOOST_HAS_FLOAT128)
-+
-+// In PGI compiler, __float128 is a typedef, not its own type.
-+#if defined(BOOST_HAS_FLOAT128) && !defined(__PGI)
- template<> struct is_floating_point<__float128> : public true_type{};
- #endif
-
-diff -uNr boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp
---- boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp 2016-12-22 07:33:20.000000000 -0500
-+++ boost_1_63_0/boost/spirit/home/lex/lexer/lexertl/functor.hpp 2017-05-31 20:11:12.365788989 -0400
-@@ -98,11 +98,7 @@
- };
-
- public:
-- functor()
--#if defined(__PGI)
-- : eof()
--#endif
-- {}
-+ functor() {}
-
- #if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- // somehow VC7.1 needs this (meaningless) assignment operator
-diff -uNr boost_1_63_0/boost/cstdint.hpp boost_1_63_0/boost/cstdint.hpp
---- boost_1_63_0/boost/cstdint.hpp 2016-12-22 07:33:14.000000000 -0500
-+++ boost_1_63_0/boost/cstdint.hpp 2017-05-31 20:04:52.821068853 -0400
-@@ -367,9 +367,6 @@
- #include <stddef.h>
- #endif
-
--// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config.
--#if !defined(__PGIC__)
--
- #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \
- || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
- || defined(__CYGWIN__) \
-@@ -393,8 +390,6 @@
-
- #endif
-
--#endif // !defined(__PGIC__)
--
- #endif // BOOST_CSTDINT_HPP
-
-
-diff -uNr boost_1_63_0/libs/filesystem/src/operations.cpp boost_1_63_0/libs/filesystem/src/operations.cpp
---- boost_1_63_0/libs/filesystem/src/operations.cpp 2016-12-22 07:33:15.000000000 -0500
-+++ boost_1_63_0/libs/filesystem/src/operations.cpp 2017-05-31 20:06:26.492231150 -0400
-@@ -2051,10 +2051,6 @@
- return ok;
- }
-
--#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
--#define dirent dirent64
--#endif
--
- error_code dir_itr_first(void *& handle, void *& buffer,
- const char* dir, string& target,
- fs::file_status &, fs::file_status &)
-diff -uNr boost_1_63_0/tools/build/src/engine/boehm_gc/configure boost_1_63_0/tools/build/src/engine/boehm_gc/configure
---- boost_1_63_0/tools/build/src/engine/boehm_gc/configure 2016-12-22 07:33:21.000000000 -0500
-+++ boost_1_63_0/tools/build/src/engine/boehm_gc/configure 2017-05-31 13:02:25.089265415 -0400
-@@ -9286,7 +9286,7 @@
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95*)
-+ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
-@@ -9722,7 +9722,7 @@
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | pgc++*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-@@ -13421,7 +13421,7 @@
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
-- pgCC*)
-+ pgc++*)
- # Portland Group C++ compiler
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-@@ -14098,7 +14098,7 @@
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
-- pgCC*)
-+ pgc++*)
- # Portland Group C++ compiler.
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fpic'
-@@ -15812,7 +15812,7 @@
- lt_prog_compiler_pic_F77='-KPIC'
- lt_prog_compiler_static_F77='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95*)
-+ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl_F77='-Wl,'
-@@ -16248,7 +16248,7 @@
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | pgc++*) # Portland Group C compiler
- whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-@@ -18386,7 +18386,7 @@
- lt_prog_compiler_pic_GCJ='-KPIC'
- lt_prog_compiler_static_GCJ='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95*)
-+ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl_GCJ='-Wl,'
-@@ -18822,7 +18822,7 @@
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | pgc++*) # Portland Group C compiler
- whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-diff -uNr boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4
---- boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 2016-12-22 07:33:21.000000000 -0500
-+++ boost_1_63_0/tools/build/src/engine/boehm_gc/libtool.m4 2017-05-31 13:02:56.629643895 -0400
-@@ -3325,7 +3325,7 @@
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
-- pgCC*)
-+ pgc++*)
- # Portland Group C++ compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-@@ -4977,7 +4977,7 @@
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
-- pgCC*)
-+ pgc++*)
- # Portland Group C++ compiler.
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-@@ -5225,7 +5225,7 @@
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95*)
-+ pgcc* | pgc++* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-diff -uNr boost_1_63_0/tools/build/src/tools/pgi.jam boost_1_63_0/tools/build/src/tools/pgi.jam
---- boost_1_63_0/tools/build/src/tools/pgi.jam 2016-12-22 07:33:21.000000000 -0500
-+++ boost_1_63_0/tools/build/src/tools/pgi.jam 2017-05-31 20:25:19.726296130 -0400
-@@ -25,7 +25,7 @@
- {
- local condition = [ common.check-init-parameters pgi : version $(version) ] ;
-
-- local l_command = [ common.get-invocation-command pgi : pgCC : $(command) ] ;
-+ local l_command = [ common.get-invocation-command pgi : pgc++ : $(command) ] ;
-
- common.handle-options pgi : $(condition) : $(l_command) : $(options) ;
-
-@@ -36,17 +36,10 @@
- flags pgi.compile DEFINES $(condition) :
- [ feature.get-values <define> : $(options) ] : unchecked ;
-
-- # IOV_MAX support
-- flags pgi.compile DEFINES $(condition) : __need_IOV_MAX : unchecked ;
--
- # set link flags
- flags pgi.link FINDLIBS-ST : [
- feature.get-values <find-static-library> : $(options) ] : unchecked ;
-
-- # always link lib rt to resolve clock_gettime()
-- flags pgi.link FINDLIBS-SA : rt [
-- feature.get-values <find-shared-library> : $(options) ] : unchecked ;
--
- gcc.init-link-flags pgi gnu $(condition) ;
- }
-
-@@ -56,18 +49,19 @@
- generators.register-fortran-compiler pgi.compile.fortran : FORTRAN : OBJ : <toolset>pgi ;
-
- # Declare flags and actions for compilation
--flags pgi.compile OPTIONS : -Kieee ;
--flags pgi.compile OPTIONS <link>shared : -fpic -fPIC ;
-+flags pgi.compile OPTIONS <link>shared : -fpic ;
- flags pgi.compile OPTIONS <debug-symbols>on : -gopt ;
--flags pgi.compile OPTIONS <profiling>on : -xprofile=tcov ;
--flags pgi.compile OPTIONS <optimization>speed : -fast -Mx,8,0x10000000 ;
--flags pgi.compile OPTIONS <optimization>space : -xO2 -xspace ;
--# flags pgi.compile OPTIONS <threading>multi : -mt ;
-+flags pgi.compile OPTIONS <optimization>off : -O0 ;
-+flags pgi.compile OPTIONS <optimization>speed : -fast ;
-+flags pgi.compile OPTIONS <optimization>space : -fast ;
-
- flags pgi.compile OPTIONS <warnings>off : -Minform=severe ;
- flags pgi.compile OPTIONS <warnings>on : -Minform=warn ;
-+flags pgi.compile OPTIONS <warnings-as-errors>on : -Werror ;
-
- flags pgi.compile.c++ OPTIONS <inlining>off : -INLINE:none ;
-+flags pgi.compile.c++ OPTIONS <rtti>off : --no_rtti ;
-+flags pgi.compile.c++ OPTIONS <exception-handling>off : --no_exceptions ;
-
- flags pgi.compile OPTIONS <cflags> ;
- flags pgi.compile.c++ OPTIONS <cxxflags> ;
-@@ -95,9 +89,8 @@
- flags pgi.link OPTIONS <debug-symbols>on : -gopt ;
- # Strip the binary when no debugging is needed
- flags pgi.link OPTIONS <debug-symbols>off : -s ;
--flags pgi.link OPTIONS <profiling>on : -xprofile=tcov ;
- flags pgi.link OPTIONS <linkflags> ;
--flags pgi.link OPTIONS <link>shared : -fpic -fPIC ;
-+flags pgi.link OPTIONS <link>shared : -fpic ;
- flags pgi.link LINKPATH <library-path> ;
- flags pgi.link FINDLIBS-ST <find-static-library> ;
- flags pgi.link FINDLIBS-SA <find-shared-library> ;
-@@ -107,24 +100,14 @@
- flags pgi.link LINK-RUNTIME <runtime-link>shared : dynamic ;
- flags pgi.link RPATH <dll-path> ;
-
--# On gcc, there are separate options for dll path at runtime and
--# link time. On Solaris, there's only one: -R, so we have to use
--# it, even though it's bad idea.
--flags pgi.link RPATH <xdll-path> ;
--
- rule link ( targets * : sources * : properties * )
- {
- SPACE on $(targets) = " " ;
- }
-
--# reddish can only link statically and, somehow, the presence of -Bdynamic on the link line
--# marks the executable as a dynamically linked exec even though no dynamic libraries are supplied.
--# Yod on redstorm refuses to load an executable that is dynamically linked.
--# removing the dynamic link options should get us where we need to be on redstorm.
--# "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
- actions link bind LIBRARIES
- {
-- "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bstatic -l$(FINDLIBS-ST) -Bdynamic -l$(FINDLIBS-SA) -B$(LINK-RUNTIME)
-+ "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
- }
-
- # Slight mods for dlls
-@@ -133,11 +116,10 @@
- SPACE on $(targets) = " " ;
- }
-
--# "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" -h$(<[1]:D=) -G "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
-
- actions link.dll bind LIBRARIES
- {
-- "$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" -Wl,-h -Wl,$(<[1]:D=) "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
-+ "$(CONFIG_COMMAND)" $(OPTIONS) -shared -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
- }
-
- actions updated together piecemeal pgi.archive
diff --git a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch b/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch
deleted file mode 100644
index 3bfb989f80..0000000000
--- a/var/spack/repos/builtin/packages/boost/boost_1.63.0_pgi_17.4_workaround.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-diff -uNr boost_1_63_0/boost/archive/archive_exception.hpp boost_1_63_0/boost/archive/archive_exception.hpp
---- boost_1_63_0/boost/archive/archive_exception.hpp 2016-12-22 07:33:19.000000000 -0500
-+++ boost_1_63_0/boost/archive/archive_exception.hpp 2017-06-01 22:07:26.013983567 -0400
-@@ -42,13 +42,6 @@
- class BOOST_SYMBOL_VISIBLE archive_exception :
- public virtual std::exception
- {
--private:
-- char m_buffer[128];
--protected:
-- BOOST_ARCHIVE_DECL unsigned int
-- append(unsigned int l, const char * a);
-- BOOST_ARCHIVE_DECL
-- archive_exception() BOOST_NOEXCEPT;
- public:
- typedef enum {
- no_exception, // initialized without code
-@@ -90,6 +83,15 @@
- BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ;
- virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
- virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ;
-+protected:
-+ BOOST_ARCHIVE_DECL unsigned int
-+ append(unsigned int l, const char * a);
-+ BOOST_ARCHIVE_DECL
-+ archive_exception() BOOST_NOEXCEPT;
-+private:
-+ char m_buffer[128];
-+ BOOST_ARCHIVE_DECL void
-+ pgi_bug_workaround_init(archive_exception *, const char *, const char *);
- };
-
- }// namespace archive
-diff -uNr boost_1_63_0/boost/archive/xml_archive_exception.hpp boost_1_63_0/boost/archive/xml_archive_exception.hpp
---- boost_1_63_0/boost/archive/xml_archive_exception.hpp 2016-12-22 07:33:19.000000000 -0500
-+++ boost_1_63_0/boost/archive/xml_archive_exception.hpp 2017-05-31 21:02:03.373700156 -0400
-@@ -47,6 +47,9 @@
- );
- BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ;
- virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
-+private:
-+ BOOST_ARCHIVE_DECL void
-+ pgi_bug_workaround_init_xml(xml_archive_exception *, exception_code, const char *, const char *);
- };
-
- }// namespace archive
-diff -uNr boost_1_63_0/libs/serialization/src/archive_exception.cpp boost_1_63_0/libs/serialization/src/archive_exception.cpp
---- boost_1_63_0/libs/serialization/src/archive_exception.cpp 2016-12-22 07:33:19.000000000 -0500
-+++ boost_1_63_0/libs/serialization/src/archive_exception.cpp 2017-06-01 22:06:14.193128909 -0400
-@@ -37,83 +37,90 @@
- }
-
- BOOST_ARCHIVE_DECL
--archive_exception::archive_exception(
-- exception_code c,
-- const char * e1,
-- const char * e2
--) BOOST_NOEXCEPT :
-- code(c)
-+void
-+archive_exception::pgi_bug_workaround_init(archive_exception *new_object, const char *e1, const char *e2)
- {
- unsigned int length = 0;
-- switch(code){
-+ switch(new_object->code){
- case no_exception:
-- length = append(length, "uninitialized exception");
-+ length = new_object->append(length, "uninitialized exception");
- break;
-- case unregistered_class:
-- length = append(length, "unregistered class");
-+ case archive_exception::unregistered_class:
-+ length = new_object->append(length, "unregistered class");
- if(NULL != e1){
-- length = append(length, " - ");
-- length = append(length, e1);
-+ length = new_object->append(length, " - ");
-+ length = new_object->append(length, e1);
- }
- break;
- case invalid_signature:
-- length = append(length, "invalid signature");
-+ length = new_object->append(length, "invalid signature");
- break;
- case unsupported_version:
-- length = append(length, "unsupported version");
-+ length = new_object->append(length, "unsupported version");
- break;
- case pointer_conflict:
-- length = append(length, "pointer conflict");
-+ length = new_object->append(length, "pointer conflict");
- break;
- case incompatible_native_format:
-- length = append(length, "incompatible native format");
-+ length = new_object->append(length, "incompatible native format");
- if(NULL != e1){
-- length = append(length, " - ");
-- length = append(length, e1);
-+ length = new_object->append(length, " - ");
-+ length = new_object->append(length, e1);
- }
- break;
- case array_size_too_short:
-- length = append(length, "array size too short");
-+ length = new_object->append(length, "array size too short");
- break;
- case input_stream_error:
-- length = append(length, "input stream error");
-+ length = new_object->append(length, "input stream error");
- break;
- case invalid_class_name:
-- length = append(length, "class name too long");
-+ length = new_object->append(length, "class name too long");
- break;
- case unregistered_cast:
-- length = append(length, "unregistered void cast ");
-- length = append(length, (NULL != e1) ? e1 : "?");
-- length = append(length, "<-");
-- length = append(length, (NULL != e2) ? e2 : "?");
-+ length = new_object->append(length, "unregistered void cast ");
-+ length = new_object->append(length, (NULL != e1) ? e1 : "?");
-+ length = new_object->append(length, "<-");
-+ length = new_object->append(length, (NULL != e2) ? e2 : "?");
- break;
- case unsupported_class_version:
-- length = append(length, "class version ");
-- length = append(length, (NULL != e1) ? e1 : "<unknown class>");
-+ length = new_object->append(length, "class version ");
-+ length = new_object->append(length, (NULL != e1) ? e1 : "<unknown class>");
- break;
- case other_exception:
- // if get here - it indicates a derived exception
- // was sliced by passing by value in catch
-- length = append(length, "unknown derived exception");
-+ length = new_object->append(length, "unknown derived exception");
- break;
- case multiple_code_instantiation:
-- length = append(length, "code instantiated in more than one module");
-+ length = new_object->append(length, "code instantiated in more than one module");
- if(NULL != e1){
-- length = append(length, " - ");
-- length = append(length, e1);
-+ length = new_object->append(length, " - ");
-+ length = new_object->append(length, e1);
- }
- break;
- case output_stream_error:
-- length = append(length, "output stream error");
-+ length = new_object->append(length, "output stream error");
- break;
- default:
- BOOST_ASSERT(false);
-- length = append(length, "programming error");
-+ length = new_object->append(length, "programming error");
- break;
- }
- }
-
- BOOST_ARCHIVE_DECL
-+archive_exception::archive_exception(
-+ exception_code c,
-+ const char * e1,
-+ const char * e2
-+) BOOST_NOEXCEPT :
-+ code(c)
-+{
-+ pgi_bug_workaround_init(this, e1, e2);
-+}
-+
-+BOOST_ARCHIVE_DECL
- archive_exception::archive_exception(archive_exception const & oth) BOOST_NOEXCEPT :
- std::exception(oth),
- code(oth.code)
-diff -uNr boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp
---- boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp 2016-12-22 07:33:19.000000000 -0500
-+++ boost_1_63_0/libs/serialization/src/xml_archive_exception.cpp 2017-05-31 20:58:15.650876427 -0400
-@@ -26,41 +26,48 @@
- namespace archive {
-
- BOOST_ARCHIVE_DECL
-+void
-+xml_archive_exception::pgi_bug_workaround_init_xml(xml_archive_exception *new_object, exception_code c, const char *e1, const char *e2)
-+{
-+ switch(c){
-+ case xml_archive_parsing_error:
-+ new_object->append(0, "unrecognized XML syntax");
-+ break;
-+ case xml_archive_tag_mismatch:{
-+ unsigned int l;
-+ l = new_object->append(0, "XML start/end tag mismatch");
-+ if(NULL != e1){
-+ l = new_object->append(l, " - ");
-+ new_object->append(l, e1);
-+ }
-+ break;
-+ }
-+ case xml_archive_tag_name_error:
-+ new_object->append(0, "Invalid XML tag name");
-+ break;
-+ default:
-+ BOOST_ASSERT(false);
-+ new_object->append(0, "programming error");
-+ break;
-+ }
-+}
-+
-+BOOST_ARCHIVE_DECL
- xml_archive_exception::xml_archive_exception(
- exception_code c,
- const char * e1,
- const char * e2
- ) :
- archive_exception(other_exception, e1, e2)
-- {
-- switch(c){
-- case xml_archive_parsing_error:
-- archive_exception::append(0, "unrecognized XML syntax");
-- break;
-- case xml_archive_tag_mismatch:{
-- unsigned int l;
-- l = archive_exception::append(0, "XML start/end tag mismatch");
-- if(NULL != e1){
-- l = archive_exception::append(l, " - ");
-- archive_exception::append(l, e1);
-- }
-- break;
-- }
-- case xml_archive_tag_name_error:
-- archive_exception::append(0, "Invalid XML tag name");
-- break;
-- default:
-- BOOST_ASSERT(false);
-- archive_exception::append(0, "programming error");
-- break;
-- }
-- }
-+{
-+ pgi_bug_workaround_init_xml(this, c, e1, e2);
-+}
-
- BOOST_ARCHIVE_DECL
- xml_archive_exception::xml_archive_exception(xml_archive_exception const & oth) :
- archive_exception(oth)
-- {
-- }
-+{
-+}
-
- BOOST_ARCHIVE_DECL xml_archive_exception::~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
-
diff --git a/var/spack/repos/builtin/packages/boost/boost_1.67.0_pgi.patch b/var/spack/repos/builtin/packages/boost/boost_1.67.0_pgi.patch
deleted file mode 100644
index b2c7acaf6b..0000000000
--- a/var/spack/repos/builtin/packages/boost/boost_1.67.0_pgi.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/libs/filesystem/src/operations.cpp
-+++ b/libs/filesystem/src/operations.cpp
-@@ -2056,10 +2056,6 @@
- return ok;
- }
-
--#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
--#define dirent dirent64
--#endif
--
- error_code dir_itr_first(void *& handle, void *& buffer,
- const char* dir, string& target,
- fs::file_status &, fs::file_status &)
diff --git a/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch b/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch
new file mode 100644
index 0000000000..8a328796ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch
@@ -0,0 +1,61 @@
+--- a/boost/mpl/quote.hpp 2022-09-29 11:47:28.395587000 -0600
++++ b/boost/mpl/quote.hpp 2022-09-29 11:47:35.363536000 -0600
+@@ -119,7 +119,7 @@
+ #define i_ BOOST_PP_FRAME_ITERATION(1)
+
+ template<
+- template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F
++ template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F
+ , typename Tag = void_
+ >
+ struct BOOST_PP_CAT(quote,i_)
+
+--- a/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:39:47.776457000 -0600
++++ b/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:40:15.807044000 -0600
+@@ -24,7 +24,7 @@
+ };
+
+ template<
+- template< typename P1 > class F
++ template< typename T1 > class F
+ , typename Tag = void_
+ >
+ struct quote1
+@@ -41,7 +41,7 @@
+ };
+
+ template<
+- template< typename P1, typename P2 > class F
++ template< typename T1, typename T2 > class F
+ , typename Tag = void_
+ >
+ struct quote2
+@@ -58,7 +58,7 @@
+ };
+
+ template<
+- template< typename P1, typename P2, typename P3 > class F
++ template< typename T1, typename T2, typename T3 > class F
+ , typename Tag = void_
+ >
+ struct quote3
+@@ -75,7 +75,7 @@
+ };
+
+ template<
+- template< typename P1, typename P2, typename P3, typename P4 > class F
++ template< typename T1, typename T2, typename T3, typename T4 > class F
+ , typename Tag = void_
+ >
+ struct quote4
+@@ -96,8 +96,8 @@
+
+ template<
+ template<
+- typename P1, typename P2, typename P3, typename P4
+- , typename P5
++ typename T1, typename T2, typename T3, typename T4
++ , typename T5
+ >
+ class F
+ , typename Tag = void_
diff --git a/var/spack/repos/builtin/packages/boost/bootstrap-path.patch b/var/spack/repos/builtin/packages/boost/bootstrap-path.patch
deleted file mode 100644
index 06cebe0d1e..0000000000
--- a/var/spack/repos/builtin/packages/boost/bootstrap-path.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Remove the spack wrapper directories from PATH for the bootstrap step.
-This was breaking the build for Cray (and other cross-compile) because
-bjam was built for the BE and died on SIGILL on the FE. See issue
-#9613.
-
-This only affects building bjam. The boost libraries are still built
-the normal spack way with the spack wrappers.
-
-
-diff -Naurb boost_1_66_0.orig/bootstrap.sh boost_1_66_0/bootstrap.sh
---- boost_1_66_0.orig/bootstrap.sh 2017-12-13 17:56:35.000000000 -0600
-+++ boost_1_66_0/bootstrap.sh 2019-01-09 13:51:56.407553214 -0600
-@@ -7,6 +7,20 @@
-
- # boostinspect:notab - Tabs are required for the Makefile.
-
-+NEWPATH=
-+OLDIFS="$IFS"
-+IFS=:
-+
-+for dir in $PATH ; do
-+ case "x$dir" in
-+ *lib*spack*env* ) ;;
-+ * ) NEWPATH="${NEWPATH}:${dir}" ;;
-+ esac
-+done
-+
-+IFS="$OLDIFS"
-+PATH="$NEWPATH"
-+
- BJAM=""
- TOOLSET=""
- BJAM_CONFIG=""
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index a8aaa567e7..ecc493a3b0 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -5,6 +5,7 @@
import os
import sys
+from pathlib import Path
from spack.package import *
@@ -20,7 +21,7 @@ class Boost(Package):
"""
homepage = "https://www.boost.org"
- url = "http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2"
+ url = "https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2"
git = "https://github.com/boostorg/boost.git"
list_url = "https://sourceforge.net/projects/boost/files/boost/"
list_depth = 1
@@ -29,6 +30,9 @@ class Boost(Package):
license("BSL-1.0")
version("develop", branch="develop", submodules=True)
+ version("1.86.0", sha256="1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b")
+ version("1.85.0", sha256="7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617")
+ version("1.84.0", sha256="cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454")
version("1.83.0", sha256="6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e")
version("1.82.0", sha256="a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6")
version("1.81.0", sha256="71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa")
@@ -77,6 +81,9 @@ class Boost(Package):
version("1.40.0", sha256="36cf4a239b587067a4923fdf6e290525a14c3af29829524fa73f3dec6841530c")
version("1.39.0", sha256="44785eae8c6cce61a29a8a51f9b737e57b34d66baa7c0bcd4af188832b8018fd")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
with_default_variants = "boost" + "".join(
[
"+atomic",
@@ -111,7 +118,9 @@ class Boost(Package):
# support. The header-only library is installed when no variant is given.
all_libs = [
"atomic",
+ "charconv",
"chrono",
+ "cobalt",
"container",
"context",
"contract",
@@ -141,11 +150,16 @@ class Boost(Package):
"thread",
"timer",
"type_erasure",
+ "url",
"wave",
]
+ # Add any extra requirements for specific
+ all_libs_opts = {"charconv": {"when": "@1.85.0:"}, "cobalt": {"when": "@1.84.0:"}}
+
for lib in all_libs:
- variant(lib, default=False, description="Compile with {0} library".format(lib))
+ lib_opts = all_libs_opts.get(lib, {})
+ variant(lib, default=False, description="Compile with {0} library".format(lib), **lib_opts)
@property
def libs(self):
@@ -171,7 +185,7 @@ class Boost(Package):
variant(
"cxxstd",
- default="98",
+ default="11",
values=(
"98",
"11",
@@ -187,6 +201,10 @@ class Boost(Package):
multi=False,
description="Use the specified C++ standard when building.",
)
+
+ # 1.84.0 dropped support for 98/03
+ conflicts("cxxstd=98", when="@1.84.0:")
+
variant("debug", default=False, description="Switch to the debug version of Boost")
variant("shared", default=True, description="Additionally build shared libraries")
variant(
@@ -228,6 +246,7 @@ class Boost(Package):
depends_on("icu4c cxxstd=14", when="+icu cxxstd=14")
depends_on("icu4c cxxstd=17", when="+icu cxxstd=17")
conflicts("cxxstd=98", when="+icu") # Requires c++11 at least
+ conflicts("+locale ~icu") # Boost.Locale "strongly recommends" icu, so enforce it
depends_on("python", when="+python")
# https://github.com/boostorg/python/commit/cbd2d9f033c61d29d0a1df14951f4ec91e7d05cd
@@ -239,6 +258,8 @@ class Boost(Package):
depends_on("zstd", when="+iostreams")
depends_on("xz", when="+iostreams")
depends_on("py-numpy", when="+numpy", type=("build", "run"))
+ # https://github.com/boostorg/python/issues/431
+ depends_on("py-numpy@:1", when="@:1.86+numpy", type=("build", "run"))
# Improve the error message when the context-impl variant is conflicting
conflicts("context-impl=fcontext", when="@:1.65.0")
@@ -282,6 +303,18 @@ class Boost(Package):
# (https://github.com/spack/spack/pull/32879#issuecomment-1265933265)
conflicts("%oneapi", when="@1.80")
+ # Boost 1.85.0 stacktrace added a hard compilation error that has to
+ # explicitly be suppressed on some platforms:
+ # https://github.com/boostorg/stacktrace/pull/150. This conflict could be
+ # turned into a variant that allows users to opt-in when they know it is
+ # safe to do so on affected platforms.
+ conflicts("+clanglibcpp", when="@1.85: +stacktrace")
+
+ # On Windows, the signals variant is required when building any of
+ # the all_libs variants.
+ for lib in all_libs:
+ requires("+signals", when=f"+{lib} platform=windows")
+
# Patch fix from https://svn.boost.org/trac/boost/ticket/11856
patch("boost_11856.patch", when="@1.60.0%gcc@4.4.7")
@@ -297,11 +330,6 @@ class Boost(Package):
# Patch fix from https://svn.boost.org/trac/boost/ticket/10125
patch("call_once_variadic.patch", when="@1.54.0:1.55%gcc@5.0:")
- # Patch fix for PGI compiler
- patch("boost_1.67.0_pgi.patch", when="@1.67.0:1.68%pgi")
- patch("boost_1.63.0_pgi.patch", when="@1.63.0%pgi")
- patch("boost_1.63.0_pgi_17.4_workaround.patch", when="@1.63.0%pgi@17.4")
-
# Patch to override the PGI toolset when using the NVIDIA compilers
patch("nvhpc-1.74.patch", when="@1.74.0:1.75%nvhpc")
patch("nvhpc-1.76.patch", when="@1.76.0:1.76%nvhpc")
@@ -309,6 +337,9 @@ class Boost(Package):
# Patch to workaround compiler bug
patch("nvhpc-find_address.patch", when="@1.75.0:1.76%nvhpc")
+ # Patch to workaround gcc-8.3 compiler issue https://github.com/boostorg/mpl/issues/44
+ patch("boost_gcc83_cpp17_fix.patch", when="@1.69:%gcc@8.3")
+
# Fix for version comparison on newer Clang on darwin
# See: https://github.com/boostorg/build/issues/440
# See: https://github.com/macports/macports-ports/pull/6726
@@ -326,9 +357,6 @@ class Boost(Package):
# Patch: https://github.com/boostorg/process/commit/6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0.patch
patch("1.72_boost_process.patch", level=2, when="@1.72.0")
- # Fix the bootstrap/bjam build for Cray
- patch("bootstrap-path.patch", when="@1.39.0: platform=cray")
-
# Patch fix for warnings from commits 2d37749, af1dc84, c705bab, and
# 0134441 on https://github.com/boostorg/system.
patch("system-non-virtual-dtor-include.patch", when="@1.69.0", level=2)
@@ -420,7 +448,6 @@ class Boost(Package):
filter_file("<define>BOOST_LOG_USE_AVX2", "", "libs/log/build/Jamfile.v2")
filter_file("dump_ssse3", "", "libs/log/build/Jamfile.v2")
filter_file("<define>BOOST_LOG_USE_SSSE3", "", "libs/log/build/Jamfile.v2")
-
filter_file("-fast", "-O1", "tools/build/src/tools/pgi.jam")
filter_file("-fast", "-O1", "tools/build/src/engine/build.sh")
@@ -430,9 +457,9 @@ class Boost(Package):
def url_for_version(self, version):
if version >= Version("1.63.0"):
- url = "https://boostorg.jfrog.io/artifactory/main/release/{0}/source/boost_{1}.tar.bz2"
+ url = "https://archives.boost.io/release/{0}/source/boost_{1}.tar.bz2"
else:
- url = "http://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2"
+ url = "https://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2"
return url.format(version.dotted, version.underscored)
@@ -444,24 +471,23 @@ class Boost(Package):
def determine_toolset(self, spec):
toolsets = {
- "g++": "gcc",
- "icpc": "intel",
- "icpx": "intel",
- "clang++": "clang",
- "armclang++": "clang",
- "xlc++": "xlcpp",
- "xlc++_r": "xlcpp",
- "pgc++": "pgi",
- "nvc++": "pgi",
- "FCC": "clang",
+ "%gcc": "gcc",
+ "%intel": "intel",
+ "%oneapi": "intel",
+ "%clang": "clang",
+ "%arm": "clang",
+ "%xl": "xlcpp",
+ "%xl_r": "xlcpp",
+ "%nvhpc": "pgi",
+ "%fj": "clang",
}
if spec.satisfies("@1.47:"):
- toolsets["icpc"] += "-linux"
- toolsets["icpx"] += "-linux"
+ toolsets["%intel"] += "-linux"
+ toolsets["%oneapi"] += "-linux"
for cc, toolset in toolsets.items():
- if cc in self.compiler.cxx_names:
+ if self.spec.satisfies(cc):
return toolset
# fallback to gcc if no toolset found
@@ -474,9 +500,9 @@ class Boost(Package):
return "using python : {0} : {1} : {2} : {3} ;\n".format(
spec["python"].version.up_to(2),
- spec["python"].command.path,
- spec["python"].headers.directories[0],
- spec["python"].libs[0],
+ Path(spec["python"].command.path).as_posix(),
+ Path(spec["python"].headers.directories[0]).as_posix(),
+ Path(spec["python"].libs[0]).parent.as_posix(),
)
def determine_bootstrap_options(self, spec, with_libs, options):
@@ -487,16 +513,22 @@ class Boost(Package):
options.append("--with-toolset=gcc")
else:
options.append("--with-toolset=%s" % boost_toolset_id)
- options.append("--with-libraries=%s" % ",".join(with_libs))
+ if with_libs:
+ options.append("--with-libraries=%s" % ",".join(sorted(with_libs)))
+ else:
+ options.append("--with-libraries=headers")
- if "+python" in spec:
+ if spec.satisfies("+python"):
options.append("--with-python=%s" % spec["python"].command.path)
- if "+icu" in spec:
+ if spec.satisfies("+icu"):
options.append("--with-icu")
else:
options.append("--without-icu")
+ self.write_jam_file(spec, boost_toolset_id)
+
+ def write_jam_file(self, spec, boost_toolset_id=None):
with open("user-config.jam", "w") as f:
# Boost may end up using gcc even though clang+gfortran is set in
# compilers.yaml. Make sure this does not happen:
@@ -504,35 +536,31 @@ class Boost(Package):
# Skip this on Windows since we don't have a cl.exe wrapper in spack
f.write("using {0} : : {1} ;\n".format(boost_toolset_id, spack_cxx))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
# Use the correct mpi compiler. If the compiler options are
# empty or undefined, Boost will attempt to figure out the
# correct options by running "${mpicxx} -show" or something
# similar, but that doesn't work with the Cray compiler
# wrappers. Since Boost doesn't use the MPI C++ bindings,
# that can be used as a compiler option instead.
- mpi_line = "using mpi : %s" % spec["mpi"].mpicxx
-
- if "platform=cray" in spec:
- mpi_line += " : <define>MPICH_SKIP_MPICXX"
-
+ mpi_line = "using mpi : %s" % Path(spec["mpi"].mpicxx).as_posix()
f.write(mpi_line + " ;\n")
- if "+python" in spec:
+ if spec.satisfies("+python"):
f.write(self.bjam_python_line(spec))
def determine_b2_options(self, spec, options):
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
options.append("variant=debug")
else:
options.append("variant=release")
- if "+icu" in spec:
+ if spec.satisfies("+icu"):
options.extend(["-s", "ICU_PATH=%s" % spec["icu4c"].prefix])
else:
options.append("--disable-icu")
- if "+iostreams" in spec:
+ if spec.satisfies("+iostreams"):
options.extend(
[
"-s",
@@ -554,17 +582,17 @@ class Boost(Package):
]
)
# At least with older Xcode, _lzma_cputhreads is missing (#33998)
- if "platform=darwin" in self.spec:
+ if self.spec.satisfies("platform=darwin"):
options.extend(["-s", "NO_LZMA=1"])
link_types = ["static"]
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
link_types.append("shared")
threading_opts = []
- if "+multithreaded" in spec:
+ if spec.satisfies("+multithreaded"):
threading_opts.append("multi")
- if "+singlethreaded" in spec:
+ if spec.satisfies("+singlethreaded"):
threading_opts.append("single")
if not threading_opts:
raise RuntimeError(
@@ -575,9 +603,9 @@ class Boost(Package):
if "+context" in spec and "context-impl" in spec.variants:
options.extend(["context-impl=%s" % spec.variants["context-impl"].value])
- if "+taggedlayout" in spec:
+ if spec.satisfies("+taggedlayout"):
layout = "tagged"
- elif "+versionedlayout" in spec:
+ elif spec.satisfies("+versionedlayout"):
layout = "versioned"
else:
if len(threading_opts) > 1:
@@ -588,6 +616,20 @@ class Boost(Package):
options.extend(["link=%s" % ",".join(link_types), "--layout=%s" % layout])
+ if spec.satisfies("platform=windows"):
+ # The runtime link must either be shared or static, not both.
+ if "+shared" in spec:
+ options.append("runtime-link=shared")
+ else:
+ options.append("runtime-link=static")
+
+ # Any lib that is in self.all_libs AND in the variants dictionary
+ # AND is set to False should be added to options in a --without flag
+ for lib in self.all_libs:
+ if lib not in self.spec.variants.dict or self.spec.satisfies(f"+{lib}"):
+ continue
+ options.append(f"--without-{lib}")
+
if not spec.satisfies("@:1.75 %intel") and not spec.satisfies("platform=windows"):
# When building any version >= 1.76, the toolset must be specified.
# Earlier versions could not specify Intel as the toolset
@@ -609,7 +651,7 @@ class Boost(Package):
if flag:
cxxflags.append(flag)
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
cxxflags.append(self.compiler.cxx_pic_flag)
# clang is not officially supported for pre-compiled headers
@@ -618,7 +660,7 @@ class Boost(Package):
# https://svn.boost.org/trac/boost/ticket/12496
if spec.satisfies("%apple-clang") or spec.satisfies("%clang") or spec.satisfies("%fj"):
options.extend(["pch=off"])
- if "+clanglibcpp" in spec:
+ if spec.satisfies("+clanglibcpp"):
cxxflags.append("-stdlib=libc++")
options.extend(["toolset=clang", 'linkflags="-stdlib=libc++"'])
elif spec.satisfies("%xl") or spec.satisfies("%xl_r"):
@@ -628,6 +670,13 @@ class Boost(Package):
if spec.variants["cxxstd"].value == "11":
cxxflags.append("-std=c++11")
+ # See conflict above and
+ # https://github.com/boostorg/stacktrace/pull/150. This suppresses a
+ # compilation error that must be explicitly suppressed. Because of the
+ # conflict we can suppress the error without input from a user.
+ if spec.satisfies("@1.85: +stacktrace"):
+ cxxflags.append("-DBOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK")
+
if cxxflags:
options.append('cxxflags="{0}"'.format(" ".join(cxxflags)))
@@ -644,6 +693,23 @@ class Boost(Package):
prefix, remainder = lib.split(".", 1)
symlink(lib, "%s-mt.%s" % (prefix, remainder))
+ def bootstrap_windows(self):
+ """Run the Windows-specific bootstrap.bat. The only bootstrapping command
+ line option that is accepted by the bootstrap.bat script is the compiler
+ information: either the vc version (e.g. MSVC 14.3.x would be vc143)
+ or gcc or clang.
+ """
+ bootstrap_options = list()
+ if self.spec.satisfies("%msvc"):
+ bootstrap_options.append(f"vc{self.compiler.platform_toolset_ver}")
+ elif self.spec.satisfies("%gcc"):
+ bootstrap_options.append("gcc")
+ elif self.spec.satisfies("%clang"):
+ bootstrap_options.append("clang")
+
+ bootstrap = Executable("cmd.exe")
+ bootstrap("/c", ".\\bootstrap.bat", *bootstrap_options)
+
def install(self, spec, prefix):
# On Darwin, Boost expects the Darwin libtool. However, one of the
# dependencies may have pulled in Spack's GNU libtool, and these two
@@ -655,49 +721,41 @@ class Boost(Package):
force_symlink("/usr/bin/libtool", join_path(newdir, "libtool"))
env["PATH"] = newdir + ":" + env["PATH"]
- with_libs = list()
- for lib in Boost.all_libs:
- if "+{0}".format(lib) in spec:
- with_libs.append(lib)
+ with_libs = {f"{lib}" for lib in Boost.all_libs if f"+{lib}" in spec}
# Remove libraries that the release version does not support
- if spec.satisfies("@1.69.0:") and "signals" in with_libs:
- with_libs.remove("signals")
- if not spec.satisfies("@1.54.0:") and "log" in with_libs:
- with_libs.remove("log")
- if not spec.satisfies("@1.53.0:") and "atomic" in with_libs:
- with_libs.remove("atomic")
- if not spec.satisfies("@1.48.0:") and "locale" in with_libs:
- with_libs.remove("locale")
- if not spec.satisfies("@1.47.0:") and "chrono" in with_libs:
- with_libs.remove("chrono")
- if not spec.satisfies("@1.43.0:") and "random" in with_libs:
- with_libs.remove("random")
- if not spec.satisfies("@1.39.0:") and "exception" in with_libs:
- with_libs.remove("exception")
- if "+graph" in spec and "+mpi" in spec:
- with_libs.append("graph_parallel")
-
- if not with_libs:
- # if no libraries are specified for compilation, then you dont have
- # to configure/build anything, just copy over to the prefix
- # directory.
- src = join_path(self.stage.source_path, "boost")
- mkdirp(join_path(prefix, "include"))
- dst = join_path(prefix, "include", "boost")
- install_tree(src, dst)
- return
-
- # to make Boost find the user-config.jam
- env["BOOST_BUILD_PATH"] = self.stage.source_path
-
- bootstrap_options = ["--prefix=%s" % prefix]
- self.determine_bootstrap_options(spec, with_libs, bootstrap_options)
+ if not spec.satisfies("@1.85.0:"):
+ with_libs.discard("charconv")
+ if not spec.satisfies("@1.84.0:"):
+ with_libs.discard("cobalt")
+ if not spec.satisfies("@1.81.0:"):
+ with_libs.discard("url")
+ if not spec.satisfies("@1.75.0:"):
+ with_libs.discard("json")
+ if spec.satisfies("@1.69.0:"):
+ with_libs.discard("signals")
+ if not spec.satisfies("@1.54.0:"):
+ with_libs.discard("log")
+ if not spec.satisfies("@1.53.0:"):
+ with_libs.discard("atomic")
+ if not spec.satisfies("@1.48.0:"):
+ with_libs.discard("locale")
+ if not spec.satisfies("@1.47.0:"):
+ with_libs.discard("chrono")
+ if not spec.satisfies("@1.43.0:"):
+ with_libs.discard("random")
+ if not spec.satisfies("@1.39.0:"):
+ with_libs.discard("exception")
+ if spec.satisfies("+graph") and spec.satisfies("+mpi"):
+ with_libs.add("graph_parallel")
if self.spec.satisfies("platform=windows"):
- bootstrap = Executable("cmd.exe")
- bootstrap("/c", ".\\bootstrap.bat", *bootstrap_options)
+ self.bootstrap_windows()
else:
+ # to make Boost find the user-config.jam
+ env["BOOST_BUILD_PATH"] = self.stage.source_path
+ bootstrap_options = ["--prefix=%s" % prefix]
+ self.determine_bootstrap_options(spec, with_libs, bootstrap_options)
bootstrap = Executable("./bootstrap.sh")
bootstrap(*bootstrap_options)
@@ -720,19 +778,28 @@ class Boost(Package):
if jobs > 64 and spec.satisfies("@:1.58"):
jobs = 64
- # Windows just wants a b2 call with no args
- b2_options = []
- if not self.spec.satisfies("platform=windows"):
- path_to_config = "--user-config=%s" % os.path.join(
- self.stage.source_path, "user-config.jam"
- )
- b2_options = ["-j", "%s" % jobs]
- b2_options.append(path_to_config)
+ if self.spec.satisfies("platform=windows"):
+ def is_64bit():
+ # TODO: This method should be abstracted to a more general location
+ # as it is repeated in many places (msmpi.py for one)
+ return "64" in str(self.spec.target.family)
+
+ b2_options = [f"--prefix={self.prefix}", f"address-model={64 if is_64bit() else 32}"]
+ if not self.spec.satisfies("+python"):
+ b2_options.append("--without-python")
+
+ self.write_jam_file(self.spec)
+ else:
+ b2_options = ["-j", "%s" % jobs]
+ path_to_config = "--user-config=%s" % os.path.join(
+ self.stage.source_path, "user-config.jam"
+ )
+ b2_options.append(path_to_config)
threading_opts = self.determine_b2_options(spec, b2_options)
# Create headers if building from a git checkout
- if "@develop" in spec:
+ if spec.satisfies("@develop"):
b2("headers", *b2_options)
b2("--clean", *b2_options)
@@ -745,7 +812,7 @@ class Boost(Package):
else:
b2("install", *b2_options)
- if "+multithreaded" in spec and "~taggedlayout" in spec:
+ if spec.satisfies("+multithreaded") and spec.satisfies("~taggedlayout"):
self.add_buildopt_symlinks(prefix)
# The shared libraries are not installed correctly
@@ -756,18 +823,6 @@ class Boost(Package):
def setup_run_environment(self, env):
env.set("BOOST_ROOT", self.prefix)
- def setup_dependent_package(self, module, dependent_spec):
- # Disable find package's config mode for versions of Boost that
- # didn't provide it. See https://github.com/spack/spack/issues/20169
- # and https://cmake.org/cmake/help/latest/module/FindBoost.html
- if self.spec.satisfies("boost@:1.69.0") and dependent_spec.satisfies("build_system=cmake"):
- args_fn = type(dependent_spec.package.builder).cmake_args
-
- def _cmake_args(self):
- return ["-DBoost_NO_BOOST_CMAKE=ON"] + args_fn(self)
-
- type(dependent_spec.package.builder).cmake_args = _cmake_args
-
def setup_dependent_build_environment(self, env, dependent_spec):
if "+context" in self.spec and "context-impl" in self.spec.variants:
context_impl = self.spec.variants["context-impl"].value
diff --git a/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py b/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py
index e940d648b3..c66b1ca6a5 100644
--- a/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py
+++ b/var/spack/repos/builtin/packages/boostmplcartesianproduct/package.py
@@ -17,5 +17,7 @@ class Boostmplcartesianproduct(Package):
version("20161205", sha256="1fa8e367e4dc545b34016bf57d802858ce38baf40aff20f7c93b329895a18572")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree("boost/mpl", join_path(prefix.include, "boost", "mpl"))
diff --git a/var/spack/repos/builtin/packages/botan/package.py b/var/spack/repos/builtin/packages/botan/package.py
index e768fa7395..c9dd90fbf0 100644
--- a/var/spack/repos/builtin/packages/botan/package.py
+++ b/var/spack/repos/builtin/packages/botan/package.py
@@ -16,10 +16,13 @@ class Botan(MakefilePackage):
license("BSD-2-Clause")
+ version("3.4.0", sha256="71843afcc0a2c585f8f33fa304f0b58ae4b9c5d8306f894667b3746044277557")
+ version("3.3.0", sha256="368f11f426f1205aedb9e9e32368a16535dc11bd60351066e6f6664ec36b85b9")
version("3.2.0", sha256="049c847835fcf6ef3a9e206b33de05dd38999c325e247482772a5598d9e5ece3")
version("3.1.1", sha256="30c84fe919936a98fef5331f246c62aa2c0e4d2085b2d4511207f6a20afa3a6b")
version("3.1.0", sha256="4e18e755a8bbc6bf96fac916fbf072ecd06740c72a72017c27162e4c0b4725fe")
version("3.0.0", sha256="5da552e00fa1c047a90c22eb5f0247ec27e7432b68b78e10a7ce0955269ccad7")
+ version("2.19.4", sha256="5a3a88ef6433e97bcab0efa1ed60c6197e4ada9d9d30bc1c47437bf89b97f276")
version("2.19.3", sha256="dae047f399c5a47f087db5d3d9d9e8f11ae4985d14c928d71da1aff801802d55")
version("2.19.2", sha256="3af5f17615c6b5cd8b832d269fb6cb4d54ec64f9eb09ddbf1add5093941b4d75")
version("2.19.1", sha256="e26e00cfefda64082afdd540d3c537924f645d6a674afed2cd171005deff5560")
@@ -39,6 +42,8 @@ class Botan(MakefilePackage):
version("2.12.0", sha256="1eaefd459d52f27de1805cff8c68792e0610919648ee98e101980e94edb90a63")
version("2.11.0", sha256="f7874da2aeb8c018fd77df40b2137879bf90b66f5589490c991e83fb3e8094be")
+ depends_on("cxx", type="build") # generated
+
variant("doc", default=False, description="Build documentation")
executables = ["^botan$"]
@@ -55,7 +60,7 @@ class Botan(MakefilePackage):
def configure_args(self):
spec = self.spec
args = ["--prefix={0}".format(self.prefix)]
- if "+doc" in spec:
+ if spec.satisfies("+doc"):
args.append("--with-documentation")
else:
args.append("--without-documentation")
diff --git a/var/spack/repos/builtin/packages/bowtie/package.py b/var/spack/repos/builtin/packages/bowtie/package.py
index 2df7606216..593ae4adef 100644
--- a/var/spack/repos/builtin/packages/bowtie/package.py
+++ b/var/spack/repos/builtin/packages/bowtie/package.py
@@ -42,6 +42,9 @@ class Bowtie(MakefilePackage):
url="https://downloads.sourceforge.net/project/bowtie-bio/bowtie/1.2.0/bowtie-1.2-source.zip",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# 1.2.2 and 1.2.2_p1 fail to build with %gcc@8.3.0
# with and without issue-87 patch
conflicts("%gcc@8:", when="@1.2.2")
@@ -71,7 +74,7 @@ class Bowtie(MakefilePackage):
makefile.filter("CXX = .*", "CPP = " + env["CXX"])
def build(self, spec, prefix):
- if "+tbb" in spec:
+ if spec.satisfies("+tbb"):
make()
else:
make("NO_TBB=1")
diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py
index a17d6749ab..33a1e28cc2 100644
--- a/var/spack/repos/builtin/packages/bowtie2/package.py
+++ b/var/spack/repos/builtin/packages/bowtie2/package.py
@@ -11,8 +11,8 @@ class Bowtie2(MakefilePackage):
"""Bowtie 2 is an ultrafast and memory-efficient tool for aligning
sequencing reads to long reference sequences"""
- homepage = "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml"
- url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip"
+ homepage = "https://bowtie-bio.sourceforge.net/bowtie2/index.shtml"
+ url = "https://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip"
license("GPL-3.0-or-later")
diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py
index 4d67b338e2..2fc461baec 100644
--- a/var/spack/repos/builtin/packages/boxlib/package.py
+++ b/var/spack/repos/builtin/packages/boxlib/package.py
@@ -17,6 +17,10 @@ class Boxlib(CMakePackage):
version("16.12.2", sha256="e87faeccfcb14b3436d36c45fcd9f46ea20f65298d35c6db2a80d6332b036dd2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
variant(
diff --git a/var/spack/repos/builtin/packages/bpp-core/package.py b/var/spack/repos/builtin/packages/bpp-core/package.py
index c1bd5c19d9..c56ce4afa8 100644
--- a/var/spack/repos/builtin/packages/bpp-core/package.py
+++ b/var/spack/repos/builtin/packages/bpp-core/package.py
@@ -23,6 +23,8 @@ class BppCore(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
# Clarify isnan's namespace, because Fujitsu compiler can't
diff --git a/var/spack/repos/builtin/packages/bpp-phyl-omics/package.py b/var/spack/repos/builtin/packages/bpp-phyl-omics/package.py
index bdcd4c186b..f5ae9825ac 100644
--- a/var/spack/repos/builtin/packages/bpp-phyl-omics/package.py
+++ b/var/spack/repos/builtin/packages/bpp-phyl-omics/package.py
@@ -20,6 +20,8 @@ class BppPhylOmics(CMakePackage):
version("2.3.1", sha256="f4853b99bf0baacf96c9ba567a5875242283cba5fb6f066d74716c6f7d84bd34")
version("2.3.0", sha256="c4dc3aa39826c50bd8fe7ee4c56a92c8eb9922edc143864a0e2da34481036009")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("bpp-core")
depends_on("bpp-phyl")
diff --git a/var/spack/repos/builtin/packages/bpp-phyl/package.py b/var/spack/repos/builtin/packages/bpp-phyl/package.py
index 78c9d3aab9..c078bd520a 100644
--- a/var/spack/repos/builtin/packages/bpp-phyl/package.py
+++ b/var/spack/repos/builtin/packages/bpp-phyl/package.py
@@ -23,6 +23,8 @@ class BppPhyl(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("bpp-core")
depends_on("bpp-seq")
diff --git a/var/spack/repos/builtin/packages/bpp-popgen/package.py b/var/spack/repos/builtin/packages/bpp-popgen/package.py
index 6aa6a9a2ca..ffd4a73c8b 100644
--- a/var/spack/repos/builtin/packages/bpp-popgen/package.py
+++ b/var/spack/repos/builtin/packages/bpp-popgen/package.py
@@ -18,4 +18,6 @@ class BppPopgen(CMakePackage):
version("2.4.1", sha256="03b57d71a63c8fa7f11c085e531d0d691fc1d40d4ea541070dabde0ab3baf413")
+ depends_on("cxx", type="build") # generated
+
depends_on("bpp-seq")
diff --git a/var/spack/repos/builtin/packages/bpp-seq-omics/package.py b/var/spack/repos/builtin/packages/bpp-seq-omics/package.py
index 5051043206..c1b10ce51c 100644
--- a/var/spack/repos/builtin/packages/bpp-seq-omics/package.py
+++ b/var/spack/repos/builtin/packages/bpp-seq-omics/package.py
@@ -20,5 +20,7 @@ class BppSeqOmics(CMakePackage):
version("2.3.1", sha256="3217b35fa98e94824e19e5e2765f4561cb5d5ec0f93f5f4e7fc213e6b5b59e83")
version("2.3.0", sha256="be0c8c593e48cd94a2a878e8635609788dfa806179f7844ecf8243e548bfe0fa")
+ depends_on("cxx", type="build") # generated
+
depends_on("bpp-core")
depends_on("bpp-seq")
diff --git a/var/spack/repos/builtin/packages/bpp-seq/package.py b/var/spack/repos/builtin/packages/bpp-seq/package.py
index 9d6351508e..880b036079 100644
--- a/var/spack/repos/builtin/packages/bpp-seq/package.py
+++ b/var/spack/repos/builtin/packages/bpp-seq/package.py
@@ -23,6 +23,8 @@ class BppSeq(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("bpp-core")
diff --git a/var/spack/repos/builtin/packages/bpp-suite/package.py b/var/spack/repos/builtin/packages/bpp-suite/package.py
index 81e213fd05..7c9d2c69a0 100644
--- a/var/spack/repos/builtin/packages/bpp-suite/package.py
+++ b/var/spack/repos/builtin/packages/bpp-suite/package.py
@@ -24,6 +24,8 @@ class BppSuite(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("texinfo", type="build")
depends_on("bpp-core")
diff --git a/var/spack/repos/builtin/packages/bracken/package.py b/var/spack/repos/builtin/packages/bracken/package.py
index e265fa3188..7f18cafec1 100644
--- a/var/spack/repos/builtin/packages/bracken/package.py
+++ b/var/spack/repos/builtin/packages/bracken/package.py
@@ -18,9 +18,12 @@ class Bracken(Package):
license("GPL-3.0-only")
+ version("2.9", sha256="b8fd43fc396a2184d9351fb4a459f95ae9bb5865b195a18e22436f643044c788")
version("2.8", sha256="b0c8a803cc020b7d1cbca47b53e71e874d9688b836911e4a4b71b0e4b826b61a")
version("2.7", sha256="1795ecd9f9e5582f37549795ba68854780936110a2f6f285c3e626d448cd1532")
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type="run")
depends_on("kraken2", type="run")
diff --git a/var/spack/repos/builtin/packages/brahma/package.py b/var/spack/repos/builtin/packages/brahma/package.py
index 738c17ca95..224e4e1108 100644
--- a/var/spack/repos/builtin/packages/brahma/package.py
+++ b/var/spack/repos/builtin/packages/brahma/package.py
@@ -15,19 +15,29 @@ class Brahma(CMakePackage):
license("MIT")
- version("develop", branch="dev")
+ version("develop", branch="develop")
version("master", branch="master")
- version("0.0.2", tag="v0.0.2", commit="bac58d5aa8962a5c902d401fbf8021aff9104d3c")
+ version("0.0.5", tag="v0.0.5", commit="219198c653cc4add845a644872e7b963a8de0fe2")
+ version("0.0.4", tag="v0.0.4", commit="8f41cc885dd8e31a1f134cbbcbaaab7e5d84331e")
+ version("0.0.3", tag="v0.0.3", commit="fd201c653e8fa00d4ba6197a56a513f740e3014e")
+ version("0.0.2", tag="v0.0.2", commit="4a36d5c08787d41c939fa1b987344b69d9ef97a6")
version("0.0.1", tag="v0.0.1", commit="15156036f14e36511dfc3f3751dc953540526a2b")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI support")
depends_on("cpp-logger@0.0.1", when="@:0.0.1")
- depends_on("cpp-logger@0.0.2", when="@0.0.2:")
+ depends_on("cpp-logger@0.0.2", when="@0.0.2:0.0.3")
+ depends_on("cpp-logger@0.0.3", when="@0.0.4")
+ depends_on("cpp-logger@0.0.4", when="@0.0.5:")
depends_on("gotcha@1.0.4", when="@:0.0.1")
- depends_on("gotcha@1.0.5", when="@0.0.2:")
- depends_on("catch2@3.0.1")
+ depends_on("gotcha@1.0.5", when="@0.0.2:0.0.3")
+ depends_on("gotcha@1.0.6", when="@0.0.4")
+ depends_on("gotcha@1.0.7", when="@0.0.5:")
+ depends_on("catch2@3.0.1:")
depends_on("mpi", when="+mpi")
def cmake_args(self):
- return [self.define_from_variant("BUILD_WITH_MPI", "mpi")]
+ prefix = "BRAHMA_" if self.spec.satisfies("@0.0.4:") else ""
+ return [self.define_from_variant(f"{prefix}BUILD_WITH_MPI", "mpi")]
diff --git a/var/spack/repos/builtin/packages/braker/package.py b/var/spack/repos/builtin/packages/braker/package.py
index d9db186884..6180c1895b 100644
--- a/var/spack/repos/builtin/packages/braker/package.py
+++ b/var/spack/repos/builtin/packages/braker/package.py
@@ -63,8 +63,7 @@ class Braker(Package):
pattern = "^#!.*/usr/bin/env perl"
repl = "#!{0}".format(self.spec["perl"].command.path)
files = glob.iglob("*.pl")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
def setup_run_environment(self, env):
env.prepend_path("PERL5LIB", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/branson/package.py b/var/spack/repos/builtin/packages/branson/package.py
index 327a8d9c16..70f4ad0b90 100644
--- a/var/spack/repos/builtin/packages/branson/package.py
+++ b/var/spack/repos/builtin/packages/branson/package.py
@@ -22,6 +22,7 @@ class Branson(CMakePackage):
version("develop", branch="develop")
+ version("1.01", sha256="90208eaec4f6d64a4fd81cd838e30b5e7207246cb7f407e482965f23bbcee848")
version(
"0.82",
sha256="7d83d41d0c7ab9c1c906a902165af31182da4604dd0b69aec28d709fe4d7a6ec",
@@ -30,6 +31,8 @@ class Branson(CMakePackage):
version("0.81", sha256="493f720904791f06b49ff48c17a681532c6a4d9fa59636522cf3f9700e77efe4")
version("0.8", sha256="85ffee110f89be00c37798700508b66b0d15de1d98c54328b6d02a9eb2cf1cb8")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi@2:")
# TODO: replace this with an explicit list of components of Boost,
@@ -44,9 +47,9 @@ class Branson(CMakePackage):
def cmake_args(self):
spec = self.spec
args = []
- args.append("-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc)
- args.append("-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
- args.append("-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc)
+ args.append(f"-DCMAKE_C_COMPILER={spec['mpi'].mpicc}")
+ args.append(f"-DCMAKE_CXX_COMPILER={spec['mpi'].mpicxx}")
+ args.append(f"-DCMAKE_Fortran_COMPILER={spec['mpi'].mpifc}")
return args
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/breakdancer/package.py b/var/spack/repos/builtin/packages/breakdancer/package.py
index 3b5d414726..4686129c33 100644
--- a/var/spack/repos/builtin/packages/breakdancer/package.py
+++ b/var/spack/repos/builtin/packages/breakdancer/package.py
@@ -28,6 +28,8 @@ class Breakdancer(CMakePackage):
preferred=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("ncurses", type="link")
diff --git a/var/spack/repos/builtin/packages/breseq/package.py b/var/spack/repos/builtin/packages/breseq/package.py
index acf0bb71bc..397a60dc20 100644
--- a/var/spack/repos/builtin/packages/breseq/package.py
+++ b/var/spack/repos/builtin/packages/breseq/package.py
@@ -21,6 +21,9 @@ class Breseq(AutotoolsPackage):
version("0.33.1", sha256="e24a50e254ad026c519747313b9e42bbeb32bd766a6a06ed369bd5b9dc50e84d")
version("0.31.1", sha256="ffc8a7f40a5ad918234e465e9d4cdf74be02fd29091b13720c2cab1dc238cf5c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/bricks/package.py b/var/spack/repos/builtin/packages/bricks/package.py
index af1bfa1c04..d74bebb55a 100644
--- a/var/spack/repos/builtin/packages/bricks/package.py
+++ b/var/spack/repos/builtin/packages/bricks/package.py
@@ -9,7 +9,6 @@ from spack.package import *
class Bricks(CMakePackage):
-
"""Bricks is a data layout and code generation framework,
enabling performance-portable stencil computations across
a multitude of architectures."""
@@ -28,6 +27,9 @@ class Bricks(CMakePackage):
version("r0.1", branch="r0.1")
version("2023.08.25", commit="d81725055c117c4b63a1b3835c6b634768b5bea7") # no official release
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=False, description="Build bricks with CUDA enabled")
# Building a variant of cmake without openssl is to match how the
@@ -45,7 +47,7 @@ class Bricks(CMakePackage):
def cmake_args(self):
"""CMake arguments for configure stage"""
args = [self.define_from_variant("BRICK_USE_OPENCL", "cuda")]
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append(f"-DOCL_ROOT:STRING={self.spec['opencl-clhpp'].prefix}")
return args
@@ -74,7 +76,7 @@ class Bricks(CMakePackage):
join_path("examples", "external", "main.cpp"),
join_path("examples", "external", "7pt.py"),
]
- self.cache_extra_test_sources(srcs)
+ cache_extra_test_sources(self, srcs)
def test_bricklib_example(self):
"""build and run pre-built example"""
diff --git a/var/spack/repos/builtin/packages/bridger/package.py b/var/spack/repos/builtin/packages/bridger/package.py
index d1c607238f..47077a7393 100644
--- a/var/spack/repos/builtin/packages/bridger/package.py
+++ b/var/spack/repos/builtin/packages/bridger/package.py
@@ -20,6 +20,9 @@ class Bridger(MakefilePackage, SourceforgePackage):
version(
"2014-12-01", sha256="8fbec8603ea8ad2162cbd0c658e4e0a4af6453bdb53310b4b7e0d112e40b5737"
)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("boost + exception + filesystem + system + serialization + graph")
depends_on("ncurses~termlib")
depends_on("perl", type="run")
diff --git a/var/spack/repos/builtin/packages/brigand/package.py b/var/spack/repos/builtin/packages/brigand/package.py
index 0bb8f27abf..50c91a3c52 100644
--- a/var/spack/repos/builtin/packages/brigand/package.py
+++ b/var/spack/repos/builtin/packages/brigand/package.py
@@ -24,6 +24,8 @@ class Brigand(CMakePackage):
version("1.1.0", sha256="afdcc6909ebff6994269d3039c31698c2b511a70280072f73382b26855221f64")
version("1.0.0", sha256="8daf7686ff39792f851ef1977323808b80aab31c5f38ef0ba4e6a8faae491f8d")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
args = [self.define("BUILD_TESTING", self.run_tests)]
return args
diff --git a/var/spack/repos/builtin/packages/brltty/package.py b/var/spack/repos/builtin/packages/brltty/package.py
index 4e94ef3651..40c74e58c3 100644
--- a/var/spack/repos/builtin/packages/brltty/package.py
+++ b/var/spack/repos/builtin/packages/brltty/package.py
@@ -21,6 +21,8 @@ class Brltty(AutotoolsPackage):
version("5.5", sha256="cd80a0d225f13779791dc3a72d7f137c06c48e5f2c9600e80a565d2378422207")
version("5.4", sha256="9ad5a540d29438a755f8b8f1f1534e0eba601c604f3d8223fa00b802959ec636")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/brotli/package.py b/var/spack/repos/builtin/packages/brotli/package.py
index 6b78c6c964..799f8133bb 100644
--- a/var/spack/repos/builtin/packages/brotli/package.py
+++ b/var/spack/repos/builtin/packages/brotli/package.py
@@ -14,9 +14,12 @@ class Brotli(CMakePackage):
license("MIT")
+ version("1.1.0", sha256="e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff")
version("1.0.9", sha256="f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46")
version("1.0.7", sha256="4c61bfb0faca87219ea587326c467b95acb25555b53d1a421ffa3c8a9296ee2c")
+ depends_on("c", type="build") # generated
+
@run_after("install")
def darwin_fix(self):
# The shared library is not installed correctly on Darwin; fix this
diff --git a/var/spack/repos/builtin/packages/brpc/package.py b/var/spack/repos/builtin/packages/brpc/package.py
index 299622b7df..3d7f00c922 100644
--- a/var/spack/repos/builtin/packages/brpc/package.py
+++ b/var/spack/repos/builtin/packages/brpc/package.py
@@ -17,10 +17,14 @@ class Brpc(CMakePackage):
license("BSL-1.0")
+ version("1.9.0", sha256="85856da0216773e1296834116f69f9e80007b7ff421db3be5c9d1890ecfaea74")
version("0.9.7", sha256="722cd342baf3b05189ca78ecf6c56ea6ffec22e62fc2938335e4e5bab545a49c")
version("0.9.6", sha256="b872ca844999e0ba768acd823b409761f126590fb34cb0183da915a595161446")
version("0.9.5", sha256="11ca8942242a4c542c11345b7463a4aea33a11ca33e91d9a2f64f126df8c70e9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gflags")
depends_on("protobuf")
depends_on("leveldb")
diff --git a/var/spack/repos/builtin/packages/brunsli/package.py b/var/spack/repos/builtin/packages/brunsli/package.py
index c0ce3de05d..528ebc70ef 100644
--- a/var/spack/repos/builtin/packages/brunsli/package.py
+++ b/var/spack/repos/builtin/packages/brunsli/package.py
@@ -16,6 +16,9 @@ class Brunsli(CMakePackage):
version("0.1", tag="v0.1", commit="8a0e9b8ca2e3e089731c95a1da7ce8a3180e667c", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
@property
diff --git a/var/spack/repos/builtin/packages/brynet/package.py b/var/spack/repos/builtin/packages/brynet/package.py
index a6a81363b5..be055a7db4 100644
--- a/var/spack/repos/builtin/packages/brynet/package.py
+++ b/var/spack/repos/builtin/packages/brynet/package.py
@@ -21,6 +21,8 @@ class Brynet(CMakePackage):
version("1.0.7", sha256="60116fccff108d03f3ff0a3d5c1fb5ad442bad7ef155bf1a3c7819ffc9d57524")
version("1.0.6", sha256="5e94b5b64fbdfbcb4e33b11fb7832cf0ca3898ab6b6461867182598bab7ca65f")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
args = []
args.append("-Dbrynet_BUILD_EXAMPLES=ON")
diff --git a/var/spack/repos/builtin/packages/btop/link-dl.patch b/var/spack/repos/builtin/packages/btop/link-dl.patch
new file mode 100644
index 0000000000..ff4d56949e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/btop/link-dl.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt 2024-01-07 15:23:01.000000000 +0100
++++ b/CMakeLists.txt 2024-01-18 10:55:06.245357111 +0100
+@@ -150,6 +150,9 @@
+
+ target_link_libraries(btop ROCm)
+ endif()
++ if(NOT BTOP_STATIC)
++ target_link_libraries(btop ${CMAKE_DL_LIBS})
++ endif()
+ endif()
+
+ if(BTOP_USE_MOLD)
diff --git a/var/spack/repos/builtin/packages/btop/package.py b/var/spack/repos/builtin/packages/btop/package.py
index 26fc2de151..b388a6daac 100644
--- a/var/spack/repos/builtin/packages/btop/package.py
+++ b/var/spack/repos/builtin/packages/btop/package.py
@@ -2,10 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import cmake, makefile
from spack.package import *
-class Btop(MakefilePackage):
+class Btop(MakefilePackage, CMakePackage):
"""Resource monitor that shows usage and stats for processor,
memory, disks, network and processes.
"""
@@ -17,12 +18,32 @@ class Btop(MakefilePackage):
license("Apache-2.0")
+ version("1.3.2", sha256="331d18488b1dc7f06cfa12cff909230816a24c57790ba3e8224b117e3f0ae03e")
+ version("1.3.0", sha256="375e078ce2091969f0cd14030620bd1a94987451cf7a73859127a786006a32cf")
version("1.2.13", sha256="668dc4782432564c35ad0d32748f972248cc5c5448c9009faeb3445282920e02")
- conflicts("%gcc@:9", msg="C++ 20 is required")
+ depends_on("cxx", type="build") # generated
+ build_system("makefile", conditional("cmake", when="@1.3.0:"), default="cmake")
+
+ variant("gpu", default=False, description="Enable GPU support", when="build_system=cmake")
+
+ depends_on("cmake@3.24:", type="build", when="@1.3.0: build_system=cmake")
+
+ # Fix linking GPU support, by adding an explicit "target_link_libraries" to ${CMAKE_DL_LIBS}
+ patch("link-dl.patch", when="+gpu")
+
+ requires("%gcc@10:", "%clang@16:", policy="one_of", msg="C++ 20 is required")
+
+
+class MakefileBuilder(makefile.MakefileBuilder):
build_targets = ["STATIC=true", "VERBOSE=true"]
@property
def install_targets(self):
return [f"PREFIX={self.prefix}", "install"]
+
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [self.define_from_variant("BTOP_GPU", "gpu")]
diff --git a/var/spack/repos/builtin/packages/bubblewrap/package.py b/var/spack/repos/builtin/packages/bubblewrap/package.py
index 5925aee4de..6811eda3be 100644
--- a/var/spack/repos/builtin/packages/bubblewrap/package.py
+++ b/var/spack/repos/builtin/packages/bubblewrap/package.py
@@ -28,6 +28,8 @@ class Bubblewrap(AutotoolsPackage):
version("0.3.3", sha256="c6a45f51794a908b76833b132471397a7413f07620af08e76c273d9f7b364dff")
version("0.3.1", sha256="deca6b608c54df4be0669b8bb6d254858924588e9f86e116eb04656a3b6d4bf8")
+ depends_on("c", type="build") # generated
+
def configure_args(self):
return ["--disable-sudo", "--disable-man", "--without-bash-completion-dir"]
diff --git a/var/spack/repos/builtin/packages/buddy/package.py b/var/spack/repos/builtin/packages/buddy/package.py
index 3a9a6982f2..49b77e8e2d 100644
--- a/var/spack/repos/builtin/packages/buddy/package.py
+++ b/var/spack/repos/builtin/packages/buddy/package.py
@@ -18,6 +18,9 @@ class Buddy(AutotoolsPackage):
version("2.4", sha256="d3df80a6a669d9ae408cb46012ff17bd33d855529d20f3a7e563d0d913358836")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def configure_args(self):
if platform.machine() == "aarch64":
config_args = ["--build=aarch64-unknown-linux-gnu"]
diff --git a/var/spack/repos/builtin/packages/bueno/package.py b/var/spack/repos/builtin/packages/bueno/package.py
index f08d719ef8..f571fd6938 100644
--- a/var/spack/repos/builtin/packages/bueno/package.py
+++ b/var/spack/repos/builtin/packages/bueno/package.py
@@ -19,6 +19,8 @@ class Bueno(PythonPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/bufr-query/package.py b/var/spack/repos/builtin/packages/bufr-query/package.py
new file mode 100644
index 0000000000..f6557eb9b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bufr-query/package.py
@@ -0,0 +1,60 @@
+# Copyright 2013-2024 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.package import *
+
+
+class BufrQuery(CMakePackage, PythonExtension):
+ """The NOAA bufr-query Library can be used to read NCEP and WMO formated BUFR
+ files using a simple interface that does not require the user to know the
+ details of the BUFR format. Detailed documentation for the BUFR Library can
+ be found at https://bufr-query.readthedocs.io/en/latest/index.html"""
+
+ homepage = "https://github.com/NOAA-EMC/bufr-query"
+ url = "https://github.com/NOAA-EMC/bufr-query/archive/refs/tags/v0.0.1.tar.gz"
+ maintainers("srherbener", "rmclaren")
+
+ license("Apache-2.0", checked_by="srherbener")
+
+ version("0.0.4", sha256="cc21a298c03ee3a8938823301606e91c7b321005da284ebf2c9b25044bfcbad8")
+ version("0.0.3", sha256="f2952a190cc1d7714a3bfe481fb1545459639ba304fc31b941062b471dea1d41")
+ version("0.0.2", sha256="b87a128246e79e3c76e3158d89823e2ae38e9ee1a5a81b6f7b423837bdb93a1f")
+ version("0.0.1", sha256="001990d864533c101b93d1c351edf50cf8b5ccc575e442d174735f6c332d3d03")
+
+ # Required dependencies
+ depends_on("ecbuild", type=("build"))
+ depends_on("llvm-openmp", when="%apple-clang", type=("build", "run"))
+ depends_on("mpi", type=("build", "run"))
+ depends_on("eckit@1.24.4:", type=("build", "run"))
+ depends_on("eigen@3:", type=("build", "run"))
+ depends_on("gsl-lite", type=("build", "run"))
+ depends_on("netcdf-c", type=("build", "run"))
+ depends_on("netcdf-cxx4", type=("build", "run"))
+ depends_on("bufr", type=("build", "run"))
+
+ # Optional dependencies
+ variant("python", default=True, description="Enable Python interface")
+
+ with when("+python"):
+ extends("python")
+ depends_on("py-pybind11", type="build")
+
+ # Patches
+ patch(
+ "https://github.com/NOAA-EMC/bufr-query/pull/20.patch?full_index=1",
+ sha256="3acf11082c9e76e64dbbda4f62ac0cbc234dca7e60c85a275e778417cfd65001",
+ when="+python @:0.0.2",
+ )
+
+ # CMake configuration
+ def cmake_args(self):
+ args = [self.define_from_variant("BUILD_PYTHON_BINDINGS", "python")]
+
+ # provide path to netcdf-c include files
+ nc_include_dir = Executable("nc-config")("--includedir", output=str).strip()
+ args.append("-DCMAKE_C_FLAGS=-I" + nc_include_dir)
+ args.append("-DCMAKE_CXX_FLAGS=-I" + nc_include_dir)
+
+ return args
diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py
index 6339c727df..1d74b9aaf6 100644
--- a/var/spack/repos/builtin/packages/bufr/package.py
+++ b/var/spack/repos/builtin/packages/bufr/package.py
@@ -17,12 +17,13 @@ class Bufr(CMakePackage):
"""
homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr"
- url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v11.5.0.tar.gz"
+ url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.1.0.tar.gz"
git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr"
maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit")
version("develop", branch="develop")
+ version("12.1.0", sha256="b5eae61b50d4132b2933b6e6dfc607e5392727cdc4f46ec7a94a19109d91dcf3")
version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708")
version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75")
version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8")
@@ -31,6 +32,9 @@ class Bufr(CMakePackage):
version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43")
version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
# Patch to not add "-c" to ranlib flags when using llvm-ranlib on Apple systems
patch("cmakelists-apple-llvm-ranlib.patch", when="@11.5.0:11.6.0")
# C test does not explicity link to -lm causing DSO error when building shared libs
@@ -38,8 +42,10 @@ class Bufr(CMakePackage):
# Patch to identify Python version correctly
patch("python-version.patch", when="@11.5:12.0.0 +python")
- variant("python", default=False, description="Enable Python interface?")
+ variant("python", default=False, description="Enable Python interface")
variant("shared", default=True, description="Build shared libraries", when="@11.5:")
+ variant("test_files", default="none", description="Path to test files")
+ variant("utils", default=True, description="Build utilities", when="@12.1:")
extends("python", when="+python")
@@ -49,6 +55,8 @@ class Bufr(CMakePackage):
depends_on("py-pip", type="build", when="+python")
depends_on("py-wheel", type="build", when="+python")
+ conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later")
+
def url_for_version(self, version):
pre = "bufr_" if version < Version("12.0.1") else ""
return (
@@ -65,8 +73,13 @@ class Bufr(CMakePackage):
self.define_from_variant("ENABLE_PYTHON", "python"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("BUILD_TESTS", self.run_tests),
+ self.define("BUILD_TESTING", self.run_tests),
+ self.define_from_variant("BUILD_UTILS", "utils"),
]
+ if not self.spec.satisfies("test_files=none"):
+ args.append(self.define_from_variant("TEST_FILE_DIR", "test_files"))
+
return args
def flag_handler(self, name, flags):
@@ -116,6 +129,5 @@ class Bufr(CMakePackage):
self._setup_bufr_environment(env, suffix)
def check(self):
- if self.spec.satisfies("~python"):
- with working_dir(self.builder.build_directory):
- make("test")
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/busybox/package.py b/var/spack/repos/builtin/packages/busybox/package.py
index d65a74730c..3b7add98bc 100644
--- a/var/spack/repos/builtin/packages/busybox/package.py
+++ b/var/spack/repos/builtin/packages/busybox/package.py
@@ -16,16 +16,21 @@ class Busybox(MakefilePackage):
license("GPL-2.0-only")
+ version("1.37.0", sha256="3311dff32e746499f4df0d5df04d7eb396382d7e108bb9250e7b519b837043a4")
+ version("1.36.1", sha256="b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314")
version("1.36.0", sha256="542750c8af7cb2630e201780b4f99f3dcceeb06f505b479ec68241c1e6af61a5")
version("1.31.1", sha256="d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998")
version("1.31.0", sha256="0e4925392fd9f3743cc517e031b68b012b24a63b0cf6c1ff03cce7bb3846cc99")
version("1.30.1", sha256="3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc")
version("1.30.0", sha256="9553da068c0a30b1b8b72479908c1ba58672e2be7b535363a88de5e0f7bc04ce")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
make("defconfig")
- make("CC={0}".format(spack_cc))
+ make(f"CC={spack_cc}")
def install(self, spec, prefix):
- make("install", "CC={0}".format(spack_cc))
+ make("install", f"CC={spack_cc}")
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py
index 048b0a0243..c36d1d3a4b 100644
--- a/var/spack/repos/builtin/packages/butterflypack/package.py
+++ b/var/spack/repos/builtin/packages/butterflypack/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from platform import machine
-
from spack.package import *
@@ -30,6 +28,7 @@ class Butterflypack(CMakePackage):
license("BSD-3-Clause-LBNL")
version("master", branch="master")
+ version("3.2.0", sha256="0f1570947f0a7c0e130bbec3abbb2fa275ae453dc3f428e7a3a2265fecafe1ae")
version("2.4.0", sha256="12d04e7101b2c8292b5c62d9f42b5cd1e8a3c5af639d2665596e3e4255fd0804")
version("2.2.2", sha256="73f67073e4291877f1eee19483a8a7b3c761eaf79a75805d52105ceedead85ea")
version("2.2.1", sha256="4cedc2896a6b368773ce4f9003aa2c0230baf56a4464a6b899a155e01406a232")
@@ -44,6 +43,10 @@ class Butterflypack(CMakePackage):
version("1.0.1", sha256="e8ada37466a19f49e13456b150700d4c3afaad2ddbe3678f4e933f9d556a24a5")
version("1.0.0", sha256="86c5eb09a18522367d63ce2bacf67ca1c9813ef351a1443baaab3c53f0d77232")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("openmp", default=True, description="add OpenMP support")
@@ -59,9 +62,9 @@ class Butterflypack(CMakePackage):
# https://github.com/spack/spack/issues/31818
patch("qopenmp-for-oneapi.patch", when="@2.1.1 %oneapi")
- patch("longline.patch", when="%fj")
- patch("fjfortran.patch", when="%fj")
- patch("isnan.patch", when="%fj")
+ patch("longline.patch", when="@1.2.0 %fj")
+ patch("fjfortran.patch", when="@1.2.0 %fj")
+ patch("isnan.patch", when="@1.2.0 %fj")
def cmake_args(self):
spec = self.spec
@@ -77,9 +80,15 @@ class Butterflypack(CMakePackage):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
]
args.append("-Denable_openmp=%s" % ("ON" if "+openmp" in spec else "OFF"))
- if "%cce" in spec:
+ if spec.satisfies("%cce"):
# Assume the proper Cray CCE module (cce) is loaded:
- craylibs_path = env["CRAYLIBS_" + machine().upper()]
+ craylibs_var = "CRAYLIBS_" + str(spec.target.family).upper()
+ craylibs_path = env.get(craylibs_var, None)
+ if not craylibs_path:
+ raise InstallError(
+ f"The environment variable {craylibs_var} is not defined.\n"
+ "\tMake sure the 'cce' module is in the compiler spec."
+ )
env.setdefault("LDFLAGS", "")
env["LDFLAGS"] += " -Wl,-rpath," + craylibs_path
diff --git a/var/spack/repos/builtin/packages/bwa/package.py b/var/spack/repos/builtin/packages/bwa/package.py
index ad00328299..1c1aea9268 100644
--- a/var/spack/repos/builtin/packages/bwa/package.py
+++ b/var/spack/repos/builtin/packages/bwa/package.py
@@ -25,6 +25,8 @@ class Bwa(Package):
url="https://github.com/lh3/bwa/archive/0.7.12.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/bwtool/package.py b/var/spack/repos/builtin/packages/bwtool/package.py
index a966b41a34..a9b249070e 100644
--- a/var/spack/repos/builtin/packages/bwtool/package.py
+++ b/var/spack/repos/builtin/packages/bwtool/package.py
@@ -14,4 +14,6 @@ class Bwtool(AutotoolsPackage):
version("1.0", sha256="2e177573602c129e1d37e07288bdc04bef14d2c25c39636aea8c9a359400594a")
+ depends_on("c", type="build") # generated
+
depends_on("libbeato")
diff --git a/var/spack/repos/builtin/packages/byfl/package.py b/var/spack/repos/builtin/packages/byfl/package.py
new file mode 100644
index 0000000000..ac8275f24c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/byfl/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Byfl(CMakePackage):
+ """Compiler-based Application Analysis"""
+
+ homepage = "https://github.com/lanl/Byfl"
+ url = "https://github.com/lanl/Byfl/archive/refs/tags/v1.8.0.tar.gz"
+
+ maintainers("spakin", "ltang85")
+
+ license("BSD-3-Clause")
+
+ version("1.8.0", sha256="45a9640ba2d77153a425c72349c18b124754123b30c411707b71abd217bbfce0")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # llvm-13 builds, but doesn’t work
+ depends_on("llvm@:12.9999")
diff --git a/var/spack/repos/builtin/packages/byte-lite/package.py b/var/spack/repos/builtin/packages/byte-lite/package.py
new file mode 100644
index 0000000000..44dfe3b641
--- /dev/null
+++ b/var/spack/repos/builtin/packages/byte-lite/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ByteLite(CMakePackage):
+ """byte lite - A C++17-like byte type for C++98, C++11 and later
+ in a single-file header-only library"""
+
+ homepage = "https://github.com/martinmoene/byte-lite"
+ url = "https://github.com/martinmoene/byte-lite/archive/refs/tags/v0.3.0.tar.gz"
+
+ license("BSL-1.0", checked_by="pranav-sivaraman")
+
+ version("0.3.0", sha256="1a19e237b12bb098297232b0a74ec08c18ac07ac5ac6e659c1d5d8a4ed0e4813")
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.5:", type="build")
+
+ conflicts("%gcc@:4.7")
+ conflicts("%clang@:3.4")
+ conflicts("%apple-clang@:5")
+ conflicts("%mvsc@:5")
+
+ def cmake_args(self):
+ return [self.define("BYTE_LITE_OPT_BUILD_TESTS", self.run_tests)]
diff --git a/var/spack/repos/builtin/packages/byte-unixbench/package.py b/var/spack/repos/builtin/packages/byte-unixbench/package.py
index f9332bf853..6dc0b50d93 100644
--- a/var/spack/repos/builtin/packages/byte-unixbench/package.py
+++ b/var/spack/repos/builtin/packages/byte-unixbench/package.py
@@ -14,6 +14,8 @@ class ByteUnixbench(MakefilePackage):
version("5.1.3", sha256="3a6bb00f270a5329682dff20fd2c1ab5332ef046eb54a96a0d7bd371005d31a3")
+ depends_on("c", type="build") # generated
+
build_directory = "UnixBench"
@property
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py
index e9d56f124f..f71c2bd0c5 100644
--- a/var/spack/repos/builtin/packages/bzip2/package.py
+++ b/var/spack/repos/builtin/packages/bzip2/package.py
@@ -28,6 +28,8 @@ class Bzip2(Package, SourcewarePackage):
version("1.0.7", sha256="e768a87c5b1a79511499beb41500bcc4caf203726fff46a6f5f9ad27fe08ab2b")
version("1.0.6", sha256="a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd")
+ depends_on("c", type="build") # generated
+
variant(
"shared",
default=(sys.platform != "win32"),
@@ -47,7 +49,6 @@ class Bzip2(Package, SourcewarePackage):
depends_on("diffutils", type="build")
depends_on("gmake", type="build", when="platform=linux")
- depends_on("gmake", type="build", when="platform=cray")
depends_on("gmake", type="build", when="platform=darwin")
@classmethod
@@ -64,9 +65,9 @@ class Bzip2(Package, SourcewarePackage):
def flag_handler(self, name, flags):
if name == "cflags":
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
flags.append(self.compiler.cc_pic_flag)
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
flags.append("-g")
return (flags, None, None)
@@ -83,7 +84,7 @@ class Bzip2(Package, SourcewarePackage):
filter_file(r"^CC=gcc", "CC={0}".format(spack_cc), "Makefile-libbz2_so")
# The Makefiles use GCC flags that are incompatible with PGI
- if self.spec.satisfies("%pgi") or self.spec.satisfies("%nvhpc@:20.11"):
+ if self.spec.satisfies("%nvhpc@:20.11"):
filter_file("-Wall -Winline", "-Minform=inform", "Makefile")
filter_file("-Wall -Winline", "-Minform=inform", "Makefile-libbz2_so")
@@ -122,7 +123,7 @@ class Bzip2(Package, SourcewarePackage):
def install(self, spec, prefix):
# Build the dynamic library first
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
make("-f", "Makefile-libbz2_so")
# Build the static library and everything else
@@ -144,7 +145,7 @@ class Bzip2(Package, SourcewarePackage):
make()
make("install", "PREFIX={0}".format(prefix))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
install("bzip2-shared", join_path(prefix.bin, "bzip2"))
v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3))
diff --git a/var/spack/repos/builtin/packages/c-ares/package.py b/var/spack/repos/builtin/packages/c-ares/package.py
index ec3d832848..51fb1dc9da 100644
--- a/var/spack/repos/builtin/packages/c-ares/package.py
+++ b/var/spack/repos/builtin/packages/c-ares/package.py
@@ -16,9 +16,14 @@ class CAres(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("1.28.1", sha256="e520d971415e48e607819c2f4b377b0aa69044ef6619160bb41bdba15ab4d545")
+ version("1.27.0", sha256="de6a839d47b93174ba260187a084027ea681a91ffe12f2d5f20645652eae246c")
version("1.15.0", sha256="7deb7872cbd876c29036d5f37e30c4cbc3cc068d59d8b749ef85bb0736649f04")
version("1.13.0", sha256="7c48c57706a38691041920e705d2a04426ad9c68d40edd600685323f214b2d57")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://github.com/c-ares/c-ares/archive/cares-{0}.tar.gz"
return url.format(version.underscored)
diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py
index ba6381f317..28919db066 100644
--- a/var/spack/repos/builtin/packages/c-blosc/package.py
+++ b/var/spack/repos/builtin/packages/c-blosc/package.py
@@ -33,6 +33,9 @@ class CBlosc(CMakePackage):
version("1.8.1", sha256="1abf048634c37aeca53eeb6a9248ea235074077028d12b3560eccf1dff7143b8")
version("1.8.0", sha256="e0f8b9e12e86776a1b037385826c55006da6e2ae4973dac5b5ad3cfcf01e9043")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("avx2", default=True, description="Enable AVX2 support")
depends_on("cmake@2.8.10:", type="build")
@@ -51,7 +54,7 @@ class CBlosc(CMakePackage):
def cmake_args(self):
args = []
- if "+avx2" in self.spec:
+ if self.spec.satisfies("+avx2"):
args.append("-DDEACTIVATE_AVX2=OFF")
else:
args.append("-DDEACTIVATE_AVX2=ON")
diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py
index b90382cc12..6de7e4b018 100644
--- a/var/spack/repos/builtin/packages/c-blosc2/package.py
+++ b/var/spack/repos/builtin/packages/c-blosc2/package.py
@@ -11,7 +11,7 @@ class CBlosc2(CMakePackage):
other bells and whistles"""
homepage = "https://www.blosc.org/"
- url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.10.2.tar.gz"
+ url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.15.1.tar.gz"
git = "https://github.com/Blosc/c-blosc2.git"
maintainers("ax3l", "robert-mijakovic")
@@ -19,6 +19,7 @@ class CBlosc2(CMakePackage):
license("BSD-3-Clause")
version("develop", branch="master")
+ version("2.15.1", sha256="6cf32fcfc615542b9ba35e021635c8ab9fd3d328fd99d5bf04b7eebc80f1fae2")
version("2.11.1", sha256="1e9923e0f026eb6e6caee608b4b9a523837806076fc79409055a6386cf5de1ea")
version("2.10.5", sha256="a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d")
# 2.10.2+ fixes regressions with external dependencies
@@ -34,6 +35,8 @@ class CBlosc2(CMakePackage):
version("2.0.2", sha256="fba51ba601610441eea6046e384284b2d8d7884922060cf15369d01d713b9b77")
version("2.0.1", sha256="35b93dfed479b1dfd9372d41d7843b60254ed1d71792577b95e489c28705874f")
+ depends_on("c", type="build") # generated
+
variant("avx2", default=True, description="Enable AVX2 support")
variant("lizard", default=True, description="support for LIZARD (LZ5)")
@@ -69,6 +72,7 @@ class CBlosc2(CMakePackage):
self.define("BUILD_TESTS", self.run_tests),
self.define("BUILD_BENCHMARKS", self.run_tests),
self.define("BUILD_EXAMPLES", self.run_tests),
+ self.define("BUILD_FUZZERS", self.run_tests),
]
return args
diff --git a/var/spack/repos/builtin/packages/c-lime/package.py b/var/spack/repos/builtin/packages/c-lime/package.py
index b4b2ee31ad..cb0d8b6cf5 100644
--- a/var/spack/repos/builtin/packages/c-lime/package.py
+++ b/var/spack/repos/builtin/packages/c-lime/package.py
@@ -18,3 +18,5 @@ class CLime(AutotoolsPackage):
license("GPL-2.0-or-later")
version("2-3-9", sha256="7b9aeadd4dfec50e24da3e7e729f56abf95c9192612c41515fe27b2158773aac")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/c-raft/package.py b/var/spack/repos/builtin/packages/c-raft/package.py
index 4e4480ba9c..e9f5238313 100644
--- a/var/spack/repos/builtin/packages/c-raft/package.py
+++ b/var/spack/repos/builtin/packages/c-raft/package.py
@@ -19,6 +19,8 @@ class CRaft(AutotoolsPackage):
version("master", branch="master")
version("0.17.1", sha256="e31c7fafbdd5f94913161c5d64341a203364e512524b47295c97a91e83c4198b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/c/package.py b/var/spack/repos/builtin/packages/c/package.py
index d36fbd9ffe..5f1c33c80a 100644
--- a/var/spack/repos/builtin/packages/c/package.py
+++ b/var/spack/repos/builtin/packages/c/package.py
@@ -14,17 +14,17 @@ class C(Package):
homepage = "http://open-std.org/JTC1/SC22/WG14/www/standards"
virtual = True
- def test(self):
- test_source = self.test_suite.current_test_data_dir
+ def test_c(self):
+ """build and run C examples"""
+ cc = which(os.environ["CC"])
+ expected = ["Hello world", "YES!"]
+ test_source = self.test_suite.current_test_data_dir
for test in os.listdir(test_source):
- filepath = test_source.join(test)
- exe_name = "%s.exe" % test
-
- cc_exe = os.environ["CC"]
- cc_opts = ["-o", exe_name, filepath]
- compiled = self.run_test(cc_exe, options=cc_opts, installed=True)
-
- if compiled:
- expected = ["Hello world", "YES!"]
- self.run_test(exe_name, expected=expected)
+ exe_name = f"{test}.exe"
+ with test_part(self, f"test_c_{test}", f"build and run {exe_name}"):
+ filepath = join_path(test_source, test)
+ cc("-o", exe_name, filepath)
+ exe = which(exe_name)
+ out = exe(output=str.split, error=str.split)
+ check_outputs(expected, out)
diff --git a/var/spack/repos/builtin/packages/c3d/package.py b/var/spack/repos/builtin/packages/c3d/package.py
index ab4b2872ec..e69588e7ba 100644
--- a/var/spack/repos/builtin/packages/c3d/package.py
+++ b/var/spack/repos/builtin/packages/c3d/package.py
@@ -17,6 +17,9 @@ class C3d(CMakePackage):
version("1.3.0", sha256="bd45482247fa4ac5ab98b3a775b5438390671e3e224a42f73967904b3895050d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("itk")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/cabana/package.py b/var/spack/repos/builtin/packages/cabana/package.py
index 2327939bbb..3905b30b29 100644
--- a/var/spack/repos/builtin/packages/cabana/package.py
+++ b/var/spack/repos/builtin/packages/cabana/package.py
@@ -12,13 +12,15 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://github.com/ECP-copa/Cabana"
git = "https://github.com/ECP-copa/Cabana.git"
- url = "https://github.com/ECP-copa/Cabana/archive/0.6.0.tar.gz"
+ url = "https://github.com/ECP-copa/Cabana/archive/0.7.0.tar.gz"
maintainers("junghans", "streeve", "sslattery")
tags = ["e4s", "ecp"]
version("master", branch="master")
+ version("0.7.0", sha256="3d46532144ea9a3f36429a65cccb7562d1244f1389dd8aff0d253708d1ec9838")
+ version("0.6.1", sha256="fea381069fe707921831756550a665280da59032ea7914f7ce2a01ed467198bc")
version("0.6.0", sha256="a88a3f80215998169cdbd37661c0c0af57e344af74306dcd2b61983d7c69e6e5")
version("0.5.0", sha256="b7579d44e106d764d82b0539285385d28f7bbb911a572efd05c711b28b85d8b1")
version("0.4.0", sha256="c347d23dc4a5204f9cc5906ccf3454f0b0b1612351bbe0d1c58b14cddde81e85")
@@ -27,6 +29,9 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
version("0.1.0", sha256="3280712facf6932b9d1aff375b24c932abb9f60a8addb0c0a1950afd0cb9b9cf")
version("0.1.0-rc0", sha256="73754d38aaa0c2a1e012be6959787108fec142294774c23f70292f59c1bdc6c5")
+ depends_on("c", type="build", when="+mpi")
+ depends_on("cxx", type="build")
+
_kokkos_backends = Kokkos.devices_variants
for _backend in _kokkos_backends:
_deflt, _descr = _kokkos_backends[_backend]
@@ -34,6 +39,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
variant("shared", default=True, description="Build shared libraries")
variant("mpi", default=True, description="Build with mpi support")
+ variant("all", default=False, description="Build with ALL support")
variant("arborx", default=False, description="Build with ArborX support")
variant("heffte", default=False, description="Build with heFFTe support")
variant("hypre", default=False, description="Build with HYPRE support")
@@ -48,7 +54,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cmake@3.9:", type="build", when="@:0.4.0")
depends_on("cmake@3.16:", type="build", when="@0.5.0:")
- depends_on("googletest", type="test", when="+testing")
+ depends_on("googletest", type="build", when="+testing")
_versions = {":0.2": "-legacy", "0.3:": "@3.1:", "0.4:": "@3.2:", "0.6:": "@3.7:"}
for _version in _versions:
_kk_version = _versions[_version]
@@ -82,9 +88,12 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+cuda", when="cuda_arch=none")
conflicts("+rocm", when="amdgpu_target=none")
- depends_on("kokkos+cuda_lambda", when="+cuda")
+ # https://github.com/ECP-copa/Cabana/releases/tag/0.7.0
+ depends_on("kokkos+cuda_lambda@3.7:", when="+cuda")
+ depends_on("kokkos+cuda_lambda@4.1:", when="+cuda@0.7:")
# Dependencies for subpackages
+ depends_on("all-library", when="@0.5.0:+all")
depends_on("arborx", when="@0.3.0:+arborx")
depends_on("hypre-cmake@2.22.0:", when="@0.4.0:+hypre")
depends_on("hypre-cmake@2.22.1:", when="@0.5.0:+hypre")
@@ -95,25 +104,35 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
depends_on("hdf5", when="@0.6.0:+hdf5")
depends_on("mpi", when="+mpi")
- # Cabana automatically builds HDF5 support with newer cmake versions
- # in version 0.6.0. This is fixed post-0.6
- conflicts("~hdf5", when="@0.6.0 ^cmake@:3.26")
+ # CMakeLists.txt of Cabana>=0.6 always enables HDF5 with CMake >= 3.26 (not changed post-0.6):
+ conflicts("~hdf5", when="@0.6.0: ^cmake@3.26:")
+
+ # Cabana HDF5 support requires MPI.
+ conflicts("+hdf5 ~mpi")
# Cajita support requires MPI
conflicts("+cajita ~mpi")
conflicts("+grid ~mpi")
+ # The +grid does not support gcc>=13 (missing iostream/cstdint includes):
+ conflicts("+grid", when="@:0.6 %gcc@13:")
+
# Conflict variants only available in newer versions of cabana
conflicts("+rocm", when="@:0.2.0")
conflicts("+sycl", when="@:0.3.0")
conflicts("+silo", when="@:0.3.0")
conflicts("+hdf5", when="@:0.5.0")
+ @when("+mpi")
+ def patch(self):
+ # CMakeLists.txt tries to enable C when MPI is requsted, but too late:
+ filter_file("LANGUAGES CXX", "LANGUAGES C CXX", "CMakeLists.txt")
+
def cmake_args(self):
options = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
enable = ["CAJITA", "TESTING", "EXAMPLES", "PERFORMANCE_TESTING"]
- require = ["ARBORX", "HEFFTE", "HYPRE", "SILO", "HDF5"]
+ require = ["ALL", "ARBORX", "HEFFTE", "HYPRE", "SILO", "HDF5"]
# These variables were removed in 0.3.0 (where backends are
# automatically used from Kokkos)
@@ -134,15 +153,13 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage):
cbn_option = "Cabana_{0}_{1}".format(cname, var)
options.append(self.define_from_variant(cbn_option, var.lower()))
- # Only enable user-requested options.
+ # Attempt to disable find_package() calls for disabled options(if option supports it):
for var in require:
- enabled_var = "+{0}".format(var.lower())
- if enabled_var not in self.spec:
- cbn_disable = "CMAKE_DISABLE_FIND_PACKAGE_{0}".format(var)
- options.append(self.define(cbn_disable, "ON"))
+ if not self.spec.satisfies("+" + var.lower()):
+ options.append(self.define("CMAKE_DISABLE_FIND_PACKAGE_" + var, "ON"))
# Use hipcc for HIP.
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
return options
diff --git a/var/spack/repos/builtin/packages/cachefilesd/package.py b/var/spack/repos/builtin/packages/cachefilesd/package.py
index d92ae8d680..9f193722c1 100644
--- a/var/spack/repos/builtin/packages/cachefilesd/package.py
+++ b/var/spack/repos/builtin/packages/cachefilesd/package.py
@@ -20,6 +20,8 @@ class Cachefilesd(MakefilePackage):
version("0.10.6", sha256="aaaaea887a5850c6fa01d09c80946e987411f6b550261f83967c671c65af959d")
version("0.10.5", sha256="125ea4f6aef4bf8e936a7cc747b59e074537a8aed74cd1bab3f05d7fbc47287f")
+ depends_on("c", type="build") # generated
+
@when("target=aarch64:")
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py
index 5103368b1f..ee8a65d94d 100644
--- a/var/spack/repos/builtin/packages/caffe/package.py
+++ b/var/spack/repos/builtin/packages/caffe/package.py
@@ -23,6 +23,8 @@ class Caffe(CMakePackage, CudaPackage):
version("rc3", sha256="0884207bfba0fbc8b263b87d30f9304f7094eec3a48f975177d142f8c72b6e3b")
version("rc2", sha256="55c9c20870b30ce398e19e4f1a62ade1eff08fce51e28fa5604035b711978eec")
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=False, description="Builds with support for GPUs via CUDA and cuDNN")
variant("opencv", default=True, description="Build with OpenCV support")
variant("leveldb", default=True, description="Build with levelDB")
@@ -90,7 +92,7 @@ class Caffe(CMakePackage, CudaPackage):
]
)
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
if spec.variants["cuda_arch"].value[0] != "none":
cuda_arch = spec.variants["cuda_arch"].value
args.append(self.define("CUDA_ARCH_NAME", "Manual"))
diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py
index e38fa1ff1b..52af9c58bf 100644
--- a/var/spack/repos/builtin/packages/cairo/package.py
+++ b/var/spack/repos/builtin/packages/cairo/package.py
@@ -15,6 +15,7 @@ class Cairo(AutotoolsPackage):
license("LGPL-2.1-or-later OR MPL-1.1", checked_by="tgamblin")
+ version("1.18.0", sha256="243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64")
version(
"1.17.4",
sha256="74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705",
@@ -34,13 +35,16 @@ class Cairo(AutotoolsPackage):
version("1.14.8", sha256="d1f2d98ae9a4111564f6de4e013d639cf77155baf2556582295a0f00a9bc5e20")
version("1.14.0", sha256="2cf5f81432e77ea4359af9dcd0f4faf37d015934501391c311bfd2d19a0134b7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("X", default=False, description="Build with X11 support")
variant("pdf", default=False, description="Enable cairo's PDF surface backend feature")
variant("gobject", default=False, description="Enable cairo's gobject functions feature")
variant("ft", default=False, description="Enable cairo's FreeType font backend feature")
variant("fc", default=False, description="Enable cairo's Fontconfig font backend feature")
variant("png", default=False, description="Enable cairo's PNG functions feature")
- variant("svg", default=False, description="Enable cairo's SVN functions feature")
+ variant("svg", default=False, description="Enable cairo's SVG functions feature")
variant("shared", default=True, description="Build shared libraries")
variant("pic", default=True, description="Enable position-independent code (PIC)")
@@ -50,7 +54,6 @@ class Cairo(AutotoolsPackage):
depends_on("libxcb", when="+X")
depends_on("python", when="+X", type="build")
depends_on("libpng", when="+png")
- depends_on("librsvg", when="+svg")
depends_on("glib")
depends_on("pixman@0.36.0:", when="@1.17.2:")
depends_on("pixman")
@@ -58,7 +61,7 @@ class Cairo(AutotoolsPackage):
depends_on("autoconf", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("freetype", when="+ft")
+ depends_on("freetype build_system=autotools", when="+ft")
depends_on("pkgconfig", type="build")
depends_on("fontconfig@2.10.91:", when="+fc") # Require newer version of fontconfig.
depends_on("which", type="build")
@@ -80,7 +83,7 @@ class Cairo(AutotoolsPackage):
def configure_args(self):
args = ["--disable-trace", "--enable-tee"] # can cause problems with libiberty
- if "+X" in self.spec:
+ if self.spec.satisfies("+X"):
args.extend(["--enable-xlib", "--enable-xcb"])
else:
args.extend(["--disable-xlib", "--disable-xcb"])
diff --git a/var/spack/repos/builtin/packages/cairomm/package.py b/var/spack/repos/builtin/packages/cairomm/package.py
index 8812da63e6..c4d9f0c8c0 100644
--- a/var/spack/repos/builtin/packages/cairomm/package.py
+++ b/var/spack/repos/builtin/packages/cairomm/package.py
@@ -17,6 +17,8 @@ class Cairomm(AutotoolsPackage):
version("1.6.4", sha256="3cb2c898d0ceb94ad2deb722b50a3a6ee46abdda741ecd6e5a40517c85ecea4c")
version("1.6.2", sha256="068edc1743d92ff1d102141ba7597ba02a47379f9cb97799b0c3310848b56eff")
+ depends_on("cxx", type="build") # generated
+
depends_on("cairo")
depends_on("libsigcpp")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py
index e66fa57146..5cf3376f0d 100644
--- a/var/spack/repos/builtin/packages/caliper/package.py
+++ b/var/spack/repos/builtin/packages/caliper/package.py
@@ -9,7 +9,7 @@ import sys
from spack.package import *
-class Caliper(CMakePackage, CudaPackage, ROCmPackage):
+class Caliper(CachedCMakePackage, CudaPackage, ROCmPackage):
"""Caliper is a program instrumentation and performance measurement
framework. It is designed as a performance analysis toolbox in a
library, allowing one to bake performance analysis capabilities
@@ -18,16 +18,17 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://github.com/LLNL/Caliper"
git = "https://github.com/LLNL/Caliper.git"
- url = "https://github.com/LLNL/Caliper/archive/v2.10.0.tar.gz"
+ url = "https://github.com/LLNL/Caliper/archive/v2.11.0.tar.gz"
tags = ["e4s", "radiuss"]
- maintainers("daboehme")
+ maintainers("daboehme", "adrienbernede")
test_requires_compiler = True
license("BSD-3-Clause")
version("master", branch="master")
+ version("2.11.0", sha256="b86b733cbb73495d5f3fe06e6a9885ec77365c8aa9195e7654581180adc2217c")
version("2.10.0", sha256="14c4fb5edd5e67808d581523b4f8f05ace8549698c0e90d84b53171a77f58565")
version("2.9.1", sha256="4771d630de505eff9227e0ec498d0da33ae6f9c34df23cb201b56181b8759e9e")
version("2.9.0", sha256="507ea74be64a2dfd111b292c24c4f55f459257528ba51a5242313fa50978371f")
@@ -75,10 +76,14 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
"1.7.0", tag="v1.7.0", commit="898277c93d884d4e7ca1ffcf3bbea81d22364f26", deprecated=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
is_linux = sys.platform.startswith("linux")
variant("shared", default=True, description="Build shared libraries")
variant("adiak", default=True, description="Enable Adiak support")
- variant("mpi", default=True, description="Enable MPI wrappers")
+ variant("mpi", default=True, description="Enable MPI support")
# libunwind has some issues on Mac
variant(
"libunwind", default=sys.platform != "darwin", description="Enable stack unwind support"
@@ -93,12 +98,19 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
variant("sosflow", default=False, description="Enable SOSflow support")
variant("fortran", default=False, description="Enable Fortran support")
variant("variorum", default=False, description="Enable Variorum support")
+ variant("vtune", default=False, description="Enable Intel Vtune support")
variant("kokkos", default=True, when="@2.3.0:", description="Enable Kokkos profiling support")
+ variant("tests", default=False, description="Enable tests")
+ variant("tools", default=True, description="Enable tools")
+
+ # TODO change the 'when' argument for the next release of Caliper
+ variant("python", default=False, when="@master", description="Build Python bindings")
- depends_on("adiak@0.1:0", when="@2.2: +adiak")
+ depends_on("adiak@0.1:0", when="@2.2:2.10 +adiak")
+ depends_on("adiak@0.4:0", when="@2.11: +adiak")
depends_on("papi@5.3:5", when="@:2.2 +papi")
- depends_on("papi@5.3:6", when="@2.3: +papi")
+ depends_on("papi@5.3:", when="@2.3: +papi")
depends_on("libpfm4@4.8:4", when="+libpfm")
@@ -106,14 +118,18 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
depends_on("unwind@1.2:1", when="+libunwind")
depends_on("elfutils", when="+libdw")
depends_on("variorum", when="+variorum")
+ depends_on("intel-oneapi-vtune", when="+vtune")
depends_on("sosflow@spack", when="@1.0:1+sosflow")
depends_on("cmake", type="build")
depends_on("python", type="build")
+ depends_on("python@3", when="+python", type=("build", "link", "run"))
+ depends_on("py-pybind11", when="+python", type=("build", "link", "run"))
+
# sosflow support not yet in 2.0
- conflicts("+sosflow", "@2.0.0:2.9")
+ conflicts("+sosflow", "@2.0.0:2.11")
conflicts("+adiak", "@:2.1")
conflicts("+libdw", "@:2.4")
conflicts("+rocm", "@:2.7")
@@ -125,71 +141,122 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
when="@2.9.0:2.9.1 +libunwind +sampler",
)
- def cmake_args(self):
+ def _get_sys_type(self, spec):
+ sys_type = spec.architecture
+ if "SYS_TYPE" in env:
+ sys_type = env["SYS_TYPE"]
+ return sys_type
+
+ def initconfig_compiler_entries(self):
spec = self.spec
+ entries = super().initconfig_compiler_entries()
- args = [
- ("-DPYTHON_EXECUTABLE=%s" % spec["python"].command.path),
- "-DBUILD_TESTING=Off",
- "-DBUILD_DOCS=Off",
- self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
- self.define_from_variant("WITH_ADIAK", "adiak"),
- self.define_from_variant("WITH_GOTCHA", "gotcha"),
- self.define_from_variant("WITH_PAPI", "papi"),
- self.define_from_variant("WITH_LIBDW", "libdw"),
- self.define_from_variant("WITH_LIBPFM", "libpfm"),
- self.define_from_variant("WITH_SOSFLOW", "sosflow"),
- self.define_from_variant("WITH_SAMPLER", "sampler"),
- self.define_from_variant("WITH_MPI", "mpi"),
- self.define_from_variant("WITH_FORTRAN", "fortran"),
- self.define_from_variant("WITH_CUPTI", "cuda"),
- self.define_from_variant("WITH_NVTX", "cuda"),
- self.define_from_variant("WITH_ROCTRACER", "rocm"),
- self.define_from_variant("WITH_ROCTX", "rocm"),
- self.define_from_variant("WITH_VARIORUM", "variorum"),
- self.define_from_variant("WITH_KOKKOS", "kokkos"),
- ]
-
- if "+papi" in spec:
- args.append("-DPAPI_PREFIX=%s" % spec["papi"].prefix)
- if "+libdw" in spec:
- args.append("-DLIBDW_PREFIX=%s" % spec["elfutils"].prefix)
- if "+libpfm" in spec:
- args.append("-DLIBPFM_INSTALL=%s" % spec["libpfm4"].prefix)
- if "+sosflow" in spec:
- args.append("-DSOS_PREFIX=%s" % spec["sosflow"].prefix)
- if "+variorum" in spec:
- args.append("-DVARIORUM_PREFIX=%s" % spec["variorum"].prefix)
+ if spec.satisfies("+rocm"):
+ entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
- # -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
- callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH"
- if "+libunwind" in spec:
- args.append("-DLIBUNWIND_PREFIX=%s" % spec["unwind"].prefix)
- args.append("-DWITH_%s=On" % callpath_flag)
+ entries.append(cmake_cache_option("WITH_FORTRAN", spec.satisfies("+fortran")))
+
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
+ entries.append(cmake_cache_option("BUILD_TESTING", spec.satisfies("+tests")))
+ entries.append(cmake_cache_option("WITH_TOOLS", spec.satisfies("+tools")))
+ entries.append(cmake_cache_option("BUILD_DOCS", False))
+ entries.append(cmake_cache_path("PYTHON_EXECUTABLE", spec["python"].command.path))
+
+ return entries
+
+ def initconfig_hardware_entries(self):
+ spec = self.spec
+ entries = super().initconfig_hardware_entries()
+
+ if spec.satisfies("+cuda"):
+ entries.append(cmake_cache_option("WITH_CUPTI", True))
+ entries.append(cmake_cache_option("WITH_NVTX", True))
+ entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix))
+ entries.append(cmake_cache_path("CUPTI_PREFIX", spec["cuda"].prefix))
else:
- args.append("-DWITH_%s=Off" % callpath_flag)
+ entries.append(cmake_cache_option("WITH_CUPTI", False))
+ entries.append(cmake_cache_option("WITH_NVTX", False))
- if "+mpi" in spec:
- args.append("-DMPI_C_COMPILER=%s" % spec["mpi"].mpicc)
- args.append("-DMPI_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
+ if spec.satisfies("+rocm"):
+ entries.append(cmake_cache_option("WITH_ROCTRACER", True))
+ entries.append(cmake_cache_option("WITH_ROCTX", True))
+ else:
+ entries.append(cmake_cache_option("WITH_ROCTRACER", False))
+ entries.append(cmake_cache_option("WITH_ROCTX", False))
+
+ return entries
+
+ def initconfig_mpi_entries(self):
+ spec = self.spec
+ entries = super().initconfig_mpi_entries()
+
+ entries.append(cmake_cache_option("WITH_MPI", spec.satisfies("+mpi")))
+
+ return entries
- if "+cuda" in spec:
- args.append("-DCUDA_TOOLKIT_ROOT_DIR=%s" % spec["cuda"].prefix)
- # technically only works with cuda 10.2+, otherwise cupti is in
- # ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI
- args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix)
+ def initconfig_package_entries(self):
+ spec = self.spec
+ entries = []
+
+ # TPL locations
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# TPLs")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ if spec.satisfies("+adiak"):
+ entries.append(cmake_cache_path("adiak_DIR", spec["adiak"].prefix))
+ if spec.satisfies("+papi"):
+ entries.append(cmake_cache_path("PAPI_PREFIX", spec["papi"].prefix))
+ if spec.satisfies("+libdw"):
+ entries.append(cmake_cache_path("LIBDW_PREFIX", spec["elfutils"].prefix))
+ if spec.satisfies("+libpfm"):
+ entries.append(cmake_cache_path("LIBPFM_INSTALL", spec["libpfm4"].prefix))
+ if spec.satisfies("+sosflow"):
+ entries.append(cmake_cache_path("SOS_PREFIX", spec["sosflow"].prefix))
+ if spec.satisfies("+variorum"):
+ entries.append(cmake_cache_path("VARIORUM_PREFIX", spec["variorum"].prefix))
+ if spec.satisfies("+vtune"):
+ itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
+ entries.append(cmake_cache_path("ITT_PREFIX", itt_dir))
+ if spec.satisfies("+libunwind"):
+ entries.append(cmake_cache_path("LIBUNWIND_PREFIX", spec["unwind"].prefix))
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_option("WITH_ADIAK", spec.satisfies("+adiak")))
+ entries.append(cmake_cache_option("WITH_GOTCHA", spec.satisfies("+gotcha")))
+ entries.append(cmake_cache_option("WITH_SAMPLER", spec.satisfies("+sampler")))
+ entries.append(cmake_cache_option("WITH_PAPI", spec.satisfies("+papi")))
+ entries.append(cmake_cache_option("WITH_LIBDW", spec.satisfies("+libdw")))
+ entries.append(cmake_cache_option("WITH_LIBPFM", spec.satisfies("+libpfm")))
+ entries.append(cmake_cache_option("WITH_SOSFLOW", spec.satisfies("+sosflow")))
+ entries.append(cmake_cache_option("WITH_KOKKOS", spec.satisfies("+kokkos")))
+ entries.append(cmake_cache_option("WITH_VARIORUM", spec.satisfies("+variorum")))
+ entries.append(cmake_cache_option("WITH_VTUNE", spec.satisfies("+vtune")))
+ entries.append(cmake_cache_option("WITH_PYTHON_BINDINGS", spec.satisfies("+python")))
+
+ # -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
+ callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH"
+ entries.append(cmake_cache_option("WITH_%s" % callpath_flag, spec.satisfies("+libunwind")))
+
+ return entries
- if "+rocm" in spec:
- args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc))
- args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix)
+ def cmake_args(self):
+ return []
- return args
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+python"):
+ env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_platlib))
+ env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_purelib))
@run_after("install")
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([join_path("examples", "apps")])
+ cache_extra_test_sources(self, [join_path("examples", "apps")])
def test_cxx_example(self):
"""build and run cxx-example"""
diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py
index 29566c512f..2044889336 100644
--- a/var/spack/repos/builtin/packages/callpath/package.py
+++ b/var/spack/repos/builtin/packages/callpath/package.py
@@ -17,6 +17,9 @@ class Callpath(CMakePackage):
version("1.0.2", sha256="cbe42bba8b9dda259dcbe7e16ebd7ecd005eabf7e9ccf169535b03110df75c84")
version("1.0.1", sha256="9bd9723126f80d0b518c28e5298ad0fa8d8dbc6a3f03fee5ae5449cf4c9a550f")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("elf", type="link")
depends_on("libdwarf")
depends_on("dyninst")
diff --git a/var/spack/repos/builtin/packages/camellia/package.py b/var/spack/repos/builtin/packages/camellia/package.py
index e9a80de93b..2e0c0fbb02 100644
--- a/var/spack/repos/builtin/packages/camellia/package.py
+++ b/var/spack/repos/builtin/packages/camellia/package.py
@@ -18,6 +18,8 @@ class Camellia(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant(
"moab",
default=True,
@@ -47,7 +49,7 @@ class Camellia(CMakePackage):
"-DBUILD_FOR_INSTALL:BOOL=ON",
]
- if "+moab" in spec:
+ if spec.satisfies("+moab"):
options.extend(["-DENABLE_MOAB:BOOL=ON", "-DMOAB_PATH:PATH=%s" % spec["moab"].prefix])
else:
options.append("-DENABLE_MOAB:BOOL=OFF")
diff --git a/var/spack/repos/builtin/packages/camp/camp-rocm6.patch b/var/spack/repos/builtin/packages/camp/camp-rocm6.patch
new file mode 100644
index 0000000000..dbb3fa0220
--- /dev/null
+++ b/var/spack/repos/builtin/packages/camp/camp-rocm6.patch
@@ -0,0 +1,15 @@
+diff -ruN spack-src/include/camp/resource/hip.hpp spack-src-patched/include/camp/resource/hip.hpp
+--- spack-src/include/camp/resource/hip.hpp 2021-08-20 23:38:39.000000000 +0000
++++ spack-src-patched/include/camp/resource/hip.hpp 2024-06-06 21:34:25.174477941 +0000
+@@ -111,7 +111,11 @@
+ hipPointerAttribute_t a;
+ hipError_t status = hipPointerGetAttributes(&a, p);
+ if (status == hipSuccess) {
++#if (HIP_VERSION_MAJOR >= 6)
++ switch (a.type) {
++#else
+ switch (a.memoryType) {
++#endif
+ case hipMemoryTypeHost:
+ return MemoryAccess::Pinned;
+ case hipMemoryTypeDevice:
diff --git a/var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch b/var/spack/repos/builtin/packages/camp/libstdc++-13-missing-header.patch
index d3c642abe6..d3c642abe6 100644
--- a/var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch
+++ b/var/spack/repos/builtin/packages/camp/libstdc++-13-missing-header.patch
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py
index ec2f741173..71327292e6 100644
--- a/var/spack/repos/builtin/packages/camp/package.py
+++ b/var/spack/repos/builtin/packages/camp/package.py
@@ -3,29 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import glob
-
from spack.package import *
-def hip_repair_options(options, spec):
- # there is only one dir like this, but the version component is unknown
- options.append(
- "-DHIP_CLANG_INCLUDE_PATH="
- + glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0]
- )
-
-
-def hip_repair_cache(options, spec):
- # there is only one dir like this, but the version component is unknown
- options.append(
- cmake_cache_path(
- "HIP_CLANG_INCLUDE_PATH",
- glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0],
- )
- )
-
-
class Camp(CMakePackage, CudaPackage, ROCmPackage):
"""
Compiler agnostic metaprogramming library providing concepts,
@@ -36,12 +16,37 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/camp.git"
url = "https://github.com/LLNL/camp/archive/v0.1.0.tar.gz"
- maintainers("trws")
+ maintainers("trws", "adrienbernede")
license("BSD-3-Clause")
- version("main", branch="main", submodules="True")
+ version("main", branch="main", submodules=False)
+ version(
+ "2024.07.0",
+ tag="v2024.07.0",
+ commit="0f07de4240c42e0b38a8d872a20440cb4b33d9f5",
+ submodules=False,
+ )
+ version(
+ "2024.02.1",
+ tag="v2024.02.1",
+ commit="79c320fa09db987923b56884afdc9f82f4b70fc4",
+ submodules=False,
+ )
+ version(
+ "2024.02.0",
+ tag="v2024.02.0",
+ commit="03c80a6c6ab4f97e76a52639563daec71435a277",
+ submodules=False,
+ )
+ version(
+ "2023.06.0",
+ tag="v2023.06.0",
+ commit="ac34c25b722a06b138bc045d38bfa5e8fa3ec9c5",
+ submodules=False,
+ )
version("2022.10.1", sha256="2d12f1a46f5a6d01880fc075cfbd332e2cf296816a7c1aa12d4ee5644d386f02")
+ version("2022.10.0", sha256="3561c3ef00bbcb61fe3183c53d49b110e54910f47e7fc689ad9ccce57e55d6b8")
version("2022.03.2", sha256="bc4aaeacfe8f2912e28f7a36fc731ab9e481bee15f2c6daf0cb208eed3f201eb")
version("2022.03.0", sha256="e9090d5ee191ea3a8e36b47a8fe78f3ac95d51804f1d986d931e85b8f8dad721")
version("0.3.0", sha256="129431a049ca5825443038ad5a37a86ba6d09b2618d5fe65d35f83136575afdb")
@@ -49,18 +54,38 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
version("0.2.2", sha256="194d38b57e50e3494482a7f94940b27f37a2bee8291f2574d64db342b981d819")
version("0.1.0", sha256="fd4f0f2a60b82a12a1d9f943f8893dc6fe770db493f8fae5ef6f7d0c439bebcc")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# TODO: figure out gtest dependency and then set this default True.
variant("tests", default=False, description="Build tests")
- variant("openmp", default=False, description="Build OpenMP support")
+ variant("openmp", default=False, description="Build with OpenMP support")
+ variant("omptarget", default=False, description="Build with OpenMP Target support")
+ variant("sycl", default=False, description="Build with Sycl support")
depends_on("cub", when="+cuda")
depends_on("blt", type="build")
+ depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
+ depends_on("blt@0.6.1", type="build", when="@2024.02.0")
+ depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:2023.06.0")
+
+ patch("libstdc++-13-missing-header.patch", when="@:2022.10")
- patch("gcc-13-missing-header.patch", when="@:2022.10 %gcc@13:")
+ patch("camp-rocm6.patch", when="@0.2.3 +rocm ^hip@6:")
conflicts("^blt@:0.3.6", when="+rocm")
+ conflicts("+omptarget +rocm")
+ conflicts("+sycl +omptarget")
+ conflicts("+sycl +rocm")
+ conflicts(
+ "+sycl",
+ when="@:2024.02.99",
+ msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
+ "please use a newer release.",
+ )
+
def cmake_args(self):
spec = self.spec
@@ -68,11 +93,9 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix))
- options.append("-DENABLE_OPENMP=" + ("On" if "+openmp" in spec else "Off"))
- if "+cuda" in spec:
- options.extend(
- ["-DENABLE_CUDA=ON", "-DCUDA_TOOLKIT_ROOT_DIR=%s" % (spec["cuda"].prefix)]
- )
+ options.append(self.define_from_variant("ENABLE_CUDA", "cuda"))
+ if spec.satisfies("+cuda"):
+ options.append("-DCUDA_TOOLKIT_ROOT_DIR={0}".format(spec["cuda"].prefix))
if not spec.satisfies("cuda_arch=none"):
cuda_arch = spec.variants["cuda_arch"].value
@@ -80,21 +103,22 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
options.append("-DCUDA_ARCH=sm_{0}".format(cuda_arch[0]))
flag = "-arch sm_{0}".format(cuda_arch[0])
options.append("-DCMAKE_CUDA_FLAGS:STRING={0}".format(flag))
- else:
- options.append("-DENABLE_CUDA=OFF")
- if "+rocm" in spec:
- options.extend(["-DENABLE_HIP=ON", "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)])
-
- hip_repair_options(options, spec)
+ options.append(self.define_from_variant("ENABLE_HIP", "rocm"))
+ if spec.satisfies("+rocm"):
+ options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix))
archs = self.spec.variants["amdgpu_target"].value
- if archs != "none":
- arch_str = ",".join(archs)
- options.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(arch_str))
- else:
- options.append("-DENABLE_HIP=OFF")
+ options.append("-DCMAKE_HIP_ARCHITECTURES={0}".format(archs))
+ options.append("-DGPU_TARGETS={0}".format(archs))
+ options.append("-DAMDGPU_TARGETS={0}".format(archs))
+
+ if spec.satisfies("+omptarget"):
+ options.append(cmake_cache_string("RAJA_DATA_ALIGN", 64))
options.append(self.define_from_variant("ENABLE_TESTS", "tests"))
+ options.append(self.define_from_variant("ENABLE_OPENMP", "openmp"))
+ options.append(self.define_from_variant("CAMP_ENABLE_TARGET_OPENMP", "omptarget"))
+ options.append(self.define_from_variant("ENABLE_SYCL", "sycl"))
return options
diff --git a/var/spack/repos/builtin/packages/camx/package.py b/var/spack/repos/builtin/packages/camx/package.py
index 92b995dd73..3f4b285cfc 100644
--- a/var/spack/repos/builtin/packages/camx/package.py
+++ b/var/spack/repos/builtin/packages/camx/package.py
@@ -18,13 +18,13 @@ class Camx(MakefilePackage):
version(
"6.50",
- url="http://www.camx.com/getmedia/caaf7983-616b-4207-bd10-c2b404bda78d/CAMx_v6-50-src-180430.tgz",
+ url="https://www.camx.com/getmedia/caaf7983-616b-4207-bd10-c2b404bda78d/CAMx_v6-50-src-180430.tgz",
sha256="4a53f78e0722d85a9c7d8ed6732aff55163a4ce06f69b6bbc9e00a3bf36a756c",
)
resource(
when="@6.50",
name="user_manual",
- url="http://www.camx.com/files/camxusersguide_v6-50.pdf",
+ url="https://www.camx.com/files/camxusersguide_v6-50.pdf",
sha256="b02d9826d59f22f9daa5955bb7b9fd3e0ca86eb73017c5845896d40391c64588",
expand=False,
placement="doc",
@@ -32,7 +32,7 @@ class Camx(MakefilePackage):
resource(
when="@6.50",
name="input_data",
- url="http://www.camx.com/getmedia/77ad8028-9388-4f5d-bcab-a418e15dde68/v6-50-specific-inputs-180430.tgz",
+ url="https://www.camx.com/getmedia/77ad8028-9388-4f5d-bcab-a418e15dde68/v6-50-specific-inputs-180430.tgz",
sha256="89b58283e37b8e2bd550a8ec62208f241be72c78dc26da9c42ad63c34f54ebfb",
placement="data",
)
@@ -92,7 +92,7 @@ else ifneq (, $(findstring $(MPI),openmpi openMPI OPENMPI))""",
)
makefile.filter("OPENMPI MVAPICH", "OPENMPI MVAPICH IntelMPI", string=True)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
# Substitute CC, FC.
makefile.filter("CC = .*", "CC = " + spec["mpi"].mpicc)
makefile.filter("FC = .*", "FC = " + spec["mpi"].mpifc)
@@ -122,7 +122,7 @@ parlib :
compiler = os.path.basename(env["FC"]) + omp
args = ["COMPILER={0}".format(compiler)]
# Set MPI.
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
mpi = self.spec["mpi"]
args += ["MPI={0}".format(mpi.name), "MPI_INST={0}".format(mpi.prefix)]
return args
diff --git a/var/spack/repos/builtin/packages/candle-benchmarks/package.py b/var/spack/repos/builtin/packages/candle-benchmarks/package.py
deleted file mode 100644
index 87ebe30b18..0000000000
--- a/var/spack/repos/builtin/packages/candle-benchmarks/package.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class CandleBenchmarks(Package):
- """ECP-CANDLE Benchmarks"""
-
- homepage = "https://github.com/ECP-CANDLE/Benchmarks"
- url = "https://github.com/ECP-CANDLE/Benchmarks/archive/v0.1.tar.gz"
-
- tags = ["proxy-app", "ecp-proxy-app"]
-
- license("MIT")
-
- version("0.1", sha256="767f74f43ee3a5d4e0f26750f2a96b8433e25a9cd4f2d29938ac8acf263ab58d")
- version("0.0", sha256="faa0d24355071de0e375d72ed1a39dcf30006602210cf8cf09db568b5d0b679f")
-
- variant("mpi", default=True, description="Build with MPI support")
-
- extends("python")
- depends_on("python@2.7:")
- depends_on("py-theano +cuda", type=("build", "run"))
- depends_on("py-keras", type=("build", "run"))
- depends_on("py-matplotlib +image@:2.2.3", type=("build", "run"))
- depends_on("py-tqdm", type=("build", "run"))
- depends_on("py-scikit-learn", type=("build", "run"))
- depends_on("opencv@3.2.0: +highgui +imgproc +jpeg +png +tiff ~dnn ~eigen ~gtk")
- depends_on("py-mdanalysis", type=("build", "run"))
- depends_on("py-mpi4py", when="+mpi", type=("build", "run"))
- depends_on("py-h5py~mpi", when="~mpi", type=("build", "run"))
- depends_on("py-h5py+mpi", when="+mpi", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
-
- # see #3244, but use external for now
- # depends_on('tensorflow')
-
- def install(self, spec, prefix):
- install_tree(self.stage.source_path, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cans/package.py b/var/spack/repos/builtin/packages/cans/package.py
index 8827ff9d6a..8c8472a84d 100644
--- a/var/spack/repos/builtin/packages/cans/package.py
+++ b/var/spack/repos/builtin/packages/cans/package.py
@@ -15,8 +15,8 @@ class Cans(MakefilePackage):
finite-difference Poisson equation
in a 3D Cartesian grid."""
- homepage = "https://github.com/p-costa/CaNS"
- url = "https://github.com/p-costa/CaNS/archive/refs/tags/v1.1.4.tar.gz"
+ homepage = "https://github.com/CaNS-World/CaNS"
+ url = "https://github.com/CaNS-World/CaNS/archive/refs/tags/v1.1.4.tar.gz"
maintainers("lhxone", "p-costa", "nscapin", "GabrieleBoga")
@@ -27,6 +27,8 @@ class Cans(MakefilePackage):
version("1.1.2", sha256="31c8d6c1f619fb60b7919922c7a3a64dd614a1a2f89f38560184f75ed0526171")
version("1.1.0", sha256="e3fd84902e18715c6476fe780e2395ca04db9e6b0c830b55a7aa9204b1fd0886")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("fftw")
diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
index efb9d7fcbe..2be36b1d91 100644
--- a/var/spack/repos/builtin/packages/cantera/package.py
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -21,6 +21,10 @@ class Cantera(SConsPackage):
version("2.3.0", sha256="06624f0f06bdd2acc9c0dba13443d945323ba40f68a9d422d95247c02e539b57")
version("2.2.1", sha256="c7bca241848f541466f56e479402521c618410168e8983e2b54ae48888480e1e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("python", default=False, description="Build the Cantera Python module")
variant("matlab", default=False, description="Build the Cantera Matlab toolbox")
variant("sundials", default=True, description="Build with Sundials")
@@ -114,7 +118,7 @@ class Cantera(SConsPackage):
)
# Sundials support
- if "+sundials" in spec:
+ if spec.satisfies("+sundials"):
if spec.satisfies("@2.3.0:"):
args.append("system_sundials=y")
else:
@@ -133,14 +137,10 @@ class Cantera(SConsPackage):
)
# Python module
- if "+python" in spec:
- args.extend(
- ["python_package=full", "python_cmd={0}".format(spec["python"].command.path)]
- )
+ if spec.satisfies("+python"):
+ args.extend(["python_package=full", "python_cmd={0}".format(python.path)])
if spec["python"].satisfies("@3:"):
- args.extend(
- ["python3_package=y", "python3_cmd={0}".format(spec["python"].command.path)]
- )
+ args.extend(["python3_package=y", "python3_cmd={0}".format(python.path)])
else:
args.append("python3_package=n")
else:
@@ -148,7 +148,7 @@ class Cantera(SConsPackage):
args.append("python3_package=n")
# Matlab toolbox
- if "+matlab" in spec:
+ if spec.satisfies("+matlab"):
args.extend(["matlab_toolbox=y", "matlab_path={0}".format(spec["matlab"].prefix)])
else:
args.append("matlab_toolbox=n")
@@ -156,7 +156,7 @@ class Cantera(SConsPackage):
return args
def build_test(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
# Tests will always fail if Python dependencies aren't built
# In addition, 3 of the tests fail when run in parallel
scons("test", parallel=False)
diff --git a/var/spack/repos/builtin/packages/canu/package.py b/var/spack/repos/builtin/packages/canu/package.py
index 75094e70f0..a6f18fcde7 100644
--- a/var/spack/repos/builtin/packages/canu/package.py
+++ b/var/spack/repos/builtin/packages/canu/package.py
@@ -26,6 +26,9 @@ class Canu(MakefilePackage):
version("1.7", sha256="c5be54b0ad20729093413e7e722a19637d32e966dc8ecd2b579ba3e4958d378a")
version("1.5", sha256="06e2c6d7b9f6d325b3b468e9c1a5de65e4689aed41154f2cee5ccd2cef0d5cf6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("git@2.12:", type="build", when="@2.2:")
depends_on("gnuplot", type="run")
depends_on("java", type="run")
diff --git a/var/spack/repos/builtin/packages/capnproto/package.py b/var/spack/repos/builtin/packages/capnproto/package.py
index 8552fbd9b4..dfa56ac9f1 100644
--- a/var/spack/repos/builtin/packages/capnproto/package.py
+++ b/var/spack/repos/builtin/packages/capnproto/package.py
@@ -36,6 +36,8 @@ class Capnproto(AutotoolsPackage):
version("0.5.1.1", sha256="caf308e92683b278bc6c568d4fb5558eca78180cac1eb4a3db15d435bf25116f")
version("0.4.1.2", sha256="6376c1910e9bc9d09dc46d53b063c5bdcb5cdf066a8210e9fffe299fb863f0d9")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", when="+zlib")
depends_on("openssl", when="+tls")
@@ -51,12 +53,12 @@ class Capnproto(AutotoolsPackage):
def configure_args(self):
args = []
- if "+tls" in self.spec:
+ if self.spec.satisfies("+tls"):
args.append("--with-openssl")
else:
args.append("--without-openssl")
- if "+zlib" in self.spec:
+ if self.spec.satisfies("+zlib"):
args.append("--with-zlib")
else:
args.append("--without-zlib")
diff --git a/var/spack/repos/builtin/packages/capstone/package.py b/var/spack/repos/builtin/packages/capstone/package.py
index cfb392da1b..d64ea3d471 100644
--- a/var/spack/repos/builtin/packages/capstone/package.py
+++ b/var/spack/repos/builtin/packages/capstone/package.py
@@ -17,5 +17,12 @@ class Capstone(CMakePackage):
license("BSD-3-Clause-Clear")
version("next", branch="next")
+ version("5.0.1", sha256="2b9c66915923fdc42e0e32e2a9d7d83d3534a45bb235e163a70047951890c01a")
version("4.0.2", sha256="7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a")
version("4.0.1", sha256="79bbea8dbe466bd7d051e037db5961fdb34f67c9fac5c3471dd105cfb1e05dc7")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ def cmake_args(self):
+ return ["-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE"]
diff --git a/var/spack/repos/builtin/packages/cardioid/package.py b/var/spack/repos/builtin/packages/cardioid/package.py
index f14aa1c9c4..0f0bc8b31d 100644
--- a/var/spack/repos/builtin/packages/cardioid/package.py
+++ b/var/spack/repos/builtin/packages/cardioid/package.py
@@ -18,6 +18,10 @@ class Cardioid(CMakePackage):
version("develop", branch="master")
version("elecfem", branch="elec-fem")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("cuda", default=False, description="Build with cuda support")
variant("mfem", default=False, description="Build with mfem support")
@@ -44,12 +48,12 @@ class Cardioid(CMakePackage):
"-DCMAKE_CXX_COMPILER:STRING=" + spec["mpi"].mpicxx,
]
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("-DENABLE_CUDA:BOOL=ON")
args.append("-DCUDA_TOOLKIT_ROOT:PATH=" + spec["cuda"].prefix)
else:
args.append("-DENABLE_CUDA:BOOL=OFF")
- if "+mfem" in self.spec:
+ if self.spec.satisfies("+mfem"):
args.append("-DMFEM_DIR:PATH=" + spec["mfem"].prefix)
return args
diff --git a/var/spack/repos/builtin/packages/care/package.py b/var/spack/repos/builtin/packages/care/package.py
index 01b11ed3ac..f6465bb4ca 100644
--- a/var/spack/repos/builtin/packages/care/package.py
+++ b/var/spack/repos/builtin/packages/care/package.py
@@ -3,22 +3,59 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import socket
+
from spack.package import *
+from .blt import llnl_link_helpers
+
-class Care(CMakePackage, CudaPackage, ROCmPackage):
+class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
"""
- Algorithms for chai managed arrays.
+ CHAI and RAJA extensions (includes data structures and algorithms).
"""
homepage = "https://github.com/LLNL/CARE"
git = "https://github.com/LLNL/CARE.git"
tags = ["radiuss"]
- license("GPL-2.0-or-later")
+ license("BSD-3-Clause")
- version("develop", branch="develop", submodules="True")
- version("master", branch="main", submodules="True")
+ maintainers("adayton1", "adrienbernede")
+
+ version("develop", branch="develop", submodules=False)
+ version("master", branch="master", submodules=False)
+ version(
+ "0.13.3",
+ tag="v0.13.3",
+ commit="93853696b452647278eae9311b835ad206236522",
+ submodules=False,
+ )
+ version(
+ "0.13.2",
+ tag="v0.13.2",
+ commit="b25dcd2a35683a68db1c25173e849be69833ed4f",
+ submodules=False,
+ )
+ version(
+ "0.13.1",
+ tag="v0.13.1",
+ commit="0fd0d47aaaa57076f26caad88e667fbc01ff7214",
+ submodules=False,
+ )
+ version(
+ "0.13.0",
+ tag="v0.13.0",
+ commit="2b288e2c557c3b14befeebc8e14a7d48348bd857",
+ submodules=False,
+ )
+ version(
+ "0.12.0",
+ tag="v0.12.0",
+ commit="a9978083035eb00a090451bd36d7987bc935204d",
+ submodules=False,
+ )
+ version("0.10.0", tag="v0.10.0", submodules="True")
version(
"0.3.0", tag="v0.3.0", commit="5e2b69b2836c9f2215207ca9a36a690cb77eea33", submodules="True"
)
@@ -26,117 +63,223 @@ class Care(CMakePackage, CudaPackage, ROCmPackage):
"0.2.0", tag="v0.2.0", commit="30135e03b14b1dc753634e9147dafede0663906f", submodules="True"
)
- variant("openmp", default=False, description="Build Shared Libs")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("openmp", default=False, description="Build with OpenMP support")
+ variant("mpi", default=False, description="Enable MPI support")
variant(
"implicit_conversions",
- default=True,
+ default=False,
description="Enable implicit" "conversions to/from raw pointers",
)
- variant("benchmarks", default=True, description="Build benchmarks.")
- variant("examples", default=True, description="Build examples.")
- variant("docs", default=False, description="Build documentation")
variant("tests", default=False, description="Build tests")
+ variant("benchmarks", default=False, description="Build benchmarks.")
+ variant("examples", default=False, description="Build examples.")
+ variant("docs", default=False, description="Build documentation")
variant("loop_fuser", default=False, description="Enable loop fusion capability")
- depends_on("blt@0.4.0:", type="build", when="@0.3.1:")
+ depends_on("cmake", type="build")
+ depends_on("cmake@3.23:", type="build", when="@0.13.2:")
+ depends_on("cmake@3.21:", type="build", when="@0.12.0:+rocm")
+ depends_on("cmake@3.18:", type="build", when="@0.12.0:")
+ depends_on("cmake@3.14:", type="build", when="@0.10.0:")
+ depends_on("cmake@3.9:", type="build", when="+cuda")
+ depends_on("cmake@3.8:", type="build")
+
+ depends_on("blt", type="build")
+ depends_on("blt@0.6.2:", type="build", when="@0.13.0:")
+ depends_on("blt@0.6.1:", type="build", when="@0.12.0:")
+ depends_on("blt@0.5.2:", type="build", when="@0.10.0:")
+ depends_on("blt@0.4.1:", type="build", when="@0.3.1:")
depends_on("blt@:0.3.6", type="build", when="@:0.3.0")
conflicts("^blt@:0.3.6", when="+rocm")
- depends_on("camp")
- depends_on("umpire@develop")
- depends_on("raja@develop")
- depends_on("chai@develop+enable_pick~benchmarks")
-
- # WARNING: this package currently only supports an internal cub
- # package. This will cause a race condition if compiled with another
- # package that uses cub. TODO: have all packages point to the same external
- # cub package.
- depends_on("camp+cuda", when="+cuda")
- depends_on("umpire+cuda~shared", when="+cuda")
- depends_on("cub", when="+cuda")
- depends_on("raja+cuda~openmp", when="+cuda")
- depends_on("chai+cuda~shared", when="+cuda")
-
- # variants +rocm and amdgpu_targets are not automatically passed to
- # dependencies, so do it manually.
- depends_on("camp+rocm", when="+rocm")
- depends_on("umpire+rocm", when="+rocm")
- depends_on("raja+rocm~openmp", when="+rocm")
- depends_on("chai+rocm", when="+rocm")
- for val in ROCmPackage.amdgpu_targets:
- depends_on("camp amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
- depends_on("umpire amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
- depends_on("raja amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
- depends_on("chai amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
+ depends_on("camp", when="@:0.11.1")
+
+ depends_on("umpire")
+ depends_on("umpire+mpi", when="+mpi")
+ depends_on("umpire@2024.07.0:", when="@0.13.2:")
+ depends_on("umpire@2024.02.1:", when="@0.13.0:")
+ depends_on("umpire@2024.02.0:", when="@0.12.0:")
+ depends_on("umpire@2022.10.0:", when="@0.10.0:")
+
+ depends_on("raja")
+ depends_on("raja@2024.07.0:", when="@0.13.2:")
+ depends_on("raja@2024.02.2:", when="@0.13.1:")
+ depends_on("raja@2024.02.1:", when="@0.13.0:")
+ depends_on("raja@2024.02.0:", when="@0.12.0:")
+ depends_on("raja@2022.10.5:", when="@0.10.0:")
+
+ # TODO: Add an enable_pick variant
+ depends_on("chai+enable_pick+raja")
+ depends_on("chai@2024.07.0:", when="@0.13.2:")
+ depends_on("chai@2024.02.2:", when="@0.13.1:")
+ depends_on("chai@2024.02.1:", when="@0.13.0:")
+ depends_on("chai@2024.02.0:", when="@0.12.0:")
+ depends_on("chai@2022.10.0:", when="@0.10.0:")
conflicts("+openmp", when="+rocm")
conflicts("+openmp", when="+cuda")
+ conflicts("~tests", when="+benchmarks")
- def cmake_args(self):
- spec = self.spec
- from_variant = self.define_from_variant
-
- options = []
- options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix))
-
- if "+cuda" in spec:
- options.extend(
- [
- "-DENABLE_CUDA=ON",
- "-DCUDA_TOOLKIT_ROOT_DIR=" + spec["cuda"].prefix,
- "-DNVTOOLSEXT_DIR=" + spec["cuda"].prefix,
- "-DCUB_DIR=" + spec["cub"].prefix,
- ]
+ with when("+openmp"):
+ depends_on("umpire+openmp")
+ depends_on("raja+openmp")
+ depends_on("chai+openmp")
+
+ with when("+cuda"):
+ # WARNING: this package currently only supports an internal cub
+ # package. This will cause a race condition if compiled with another
+ # package that uses cub. TODO: have all packages point to the same external
+ # cub package.
+ depends_on("cub")
+
+ depends_on("umpire+cuda")
+ depends_on("raja+cuda")
+ depends_on("chai+cuda")
+
+ for sm_ in CudaPackage.cuda_arch_values:
+ depends_on("umpire+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+ depends_on("raja+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+ depends_on("chai+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+
+ with when("+rocm"):
+ depends_on("umpire+rocm")
+ depends_on("raja+rocm")
+ depends_on("chai+rocm")
+
+ for arch_ in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "umpire+rocm amdgpu_target={0}".format(arch_),
+ when="amdgpu_target={0}".format(arch_),
+ )
+ depends_on(
+ "raja+rocm amdgpu_target={0}".format(arch_), when="amdgpu_target={0}".format(arch_)
+ )
+ depends_on(
+ "chai+rocm amdgpu_target={0}".format(arch_), when="amdgpu_target={0}".format(arch_)
)
- if not spec.satisfies("cuda_arch=none"):
- cuda_arch = spec.variants["cuda_arch"].value
- # Please note that within care, CUDA_ARCH is assigned to -code
- # and likewise CUDA_CODE is assigned to -arch, so these are
- # intentionally flipped here.
- options.append("-DCUDA_ARCH=sm_{0}".format(cuda_arch[0]))
- options.append("-DCUDA_CODE=compute_{0}".format(cuda_arch[0]))
- else:
- options.append("-DENABLE_CUDA=OFF")
+ def _get_sys_type(self, spec):
+ sys_type = spec.architecture
+ if "SYS_TYPE" in env:
+ sys_type = env["SYS_TYPE"]
+ return sys_type
- if "+rocm" in spec:
- options.extend(["-DENABLE_HIP=ON", "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)])
+ @property
+ def cache_name(self):
+ hostname = socket.gethostname()
+ if "SYS_TYPE" in env:
+ hostname = hostname.rstrip("1234567890")
+ return "{0}-{1}-{2}@{3}-{4}.cmake".format(
+ hostname,
+ self._get_sys_type(self.spec),
+ self.spec.compiler.name,
+ self.spec.compiler.version,
+ self.spec.dag_hash(8),
+ )
+
+ def initconfig_compiler_entries(self):
+ spec = self.spec
+ compiler = self.compiler
+ entries = super().initconfig_compiler_entries()
+
+ if spec.satisfies("+rocm"):
+ entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+
+ llnl_link_helpers(entries, spec, compiler)
+
+ return entries
+
+ def initconfig_hardware_entries(self):
+ spec = self.spec
+ entries = super().initconfig_hardware_entries()
+
+ entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
+
+ if spec.satisfies("+cuda"):
+ entries.append(cmake_cache_option("ENABLE_CUDA", True))
+ entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
+ entries.append(cmake_cache_string("NVTOOLSEXT_DIR", spec["cuda"].prefix))
+ entries.append(cmake_cache_string("CUB_DIR", spec["cub"].prefix))
+ else:
+ entries.append(cmake_cache_option("ENABLE_CUDA", False))
+
+ if spec.satisfies("+rocm"):
+ entries.append(cmake_cache_option("ENABLE_HIP", True))
archs = self.spec.variants["amdgpu_target"].value
if archs != "none":
arch_str = ",".join(archs)
- options.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(arch_str))
+ entries.append(
+ cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
+ )
else:
- options.append("-DENABLE_HIP=OFF")
-
- options.extend(
- [
- from_variant("CARE_ENABLE_IMPLICIT_CONVERSIONS", "implicit_conversions"),
- from_variant("CARE_ENABLE_LOOP_FUSER", "loop_fuser"),
- self.define("CAMP_DIR", spec["camp"].prefix.share.camp.cmake),
- self.define("UMPIRE_DIR", spec["umpire"].prefix.share.umpire.cmake),
- self.define("RAJA_DIR", spec["raja"].prefix.share.raja.cmake),
- self.define("CHAI_DIR", spec["chai"].prefix.share.chai.cmake),
- from_variant("CARE_ENABLE_TESTS", "tests"),
- ]
- )
+ entries.append(cmake_cache_option("ENABLE_HIP", False))
+
+ return entries
+
+ def initconfig_mpi_entries(self):
+ spec = self.spec
+
+ entries = super(Care, self).initconfig_mpi_entries()
+ entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
+
+ return entries
+
+ def initconfig_package_entries(self):
+ spec = self.spec
+ entries = []
+
+ # TPL locations
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# TPLs")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
+ entries.append(cmake_cache_path("CAMP_DIR", spec["camp"].prefix))
+ entries.append(cmake_cache_path("UMPIRE_DIR", spec["umpire"].prefix))
+ entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix))
+ entries.append(cmake_cache_path("CHAI_DIR", spec["chai"].prefix))
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+ entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
+
+ entries.append(cmake_cache_option("ENABLE_TESTS", spec.satisfies("+tests")))
+ entries.append(cmake_cache_option("CARE_ENABLE_TESTS", spec.satisfies("+tests")))
# For tests to work, we also need BLT_ENABLE_TESTS to be on.
# This will take care of the gtest dependency. CARE developers should
# consider consolidating these flags in the future.
- options.append(from_variant("BLT_ENABLE_TESTS", "tests"))
+ entries.append(cmake_cache_option("BLT_ENABLE_TESTS", spec.satisfies("+tests")))
# There are both CARE_ENABLE_* and ENABLE_* variables in here because
# one controls the BLT infrastructure and the other controls the CARE
# infrastructure. The goal is to just be able to use the CARE_ENABLE_*
# variables, but CARE isn't set up correctly for that yet.
- options.append(from_variant("ENABLE_BENCHMARKS", "benchmarks"))
- options.append(from_variant("CARE_ENABLE_BENCHMARKS", "benchmarks"))
+ entries.append(cmake_cache_option("ENABLE_BENCHMARKS", spec.satisfies("+benchmarks")))
+ entries.append(cmake_cache_option("CARE_ENABLE_BENCHMARKS", spec.satisfies("+benchmarks")))
+
+ entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
+ entries.append(cmake_cache_option("CARE_ENABLE_EXAMPLES", spec.satisfies("+examples")))
- options.append(from_variant("ENABLE_EXAMPLES", "examples"))
- options.append(from_variant("CARE_ENABLE_EXAMPLES", "examples"))
+ entries.append(cmake_cache_option("ENABLE_DOCS", spec.satisfies("+docs")))
+ entries.append(cmake_cache_option("CARE_ENABLE_DOCS", spec.satisfies("+docs")))
- options.append(from_variant("ENABLE_DOCS", "docs"))
- options.append(from_variant("CARE_ENABLE_DOCS", "docs"))
+ entries.append(
+ cmake_cache_option(
+ "CARE_ENABLE_IMPLICIT_CONVERSIONS", spec.satisfies("+implicit_conversions")
+ )
+ )
- return options
+ entries.append(cmake_cache_option("CARE_ENABLE_LOOP_FUSER", spec.satisfies("+loop_fuser")))
+
+ return entries
+
+ def cmake_args(self):
+ return []
diff --git a/var/spack/repos/builtin/packages/cargs/package.py b/var/spack/repos/builtin/packages/cargs/package.py
index abd30b1d92..45a3a7a9f5 100644
--- a/var/spack/repos/builtin/packages/cargs/package.py
+++ b/var/spack/repos/builtin/packages/cargs/package.py
@@ -17,6 +17,9 @@ class Cargs(CMakePackage):
license("MIT")
+ version("1.1.0", sha256="87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca")
version("1.0.3", sha256="ddba25bd35e9c6c75bc706c126001b8ce8e084d40ef37050e6aa6963e836eb8b")
+ depends_on("c", type="build") # generated
+
depends_on("cmake@3.14.7:", type=("build"))
diff --git a/var/spack/repos/builtin/packages/casacore-measures/package.py b/var/spack/repos/builtin/packages/casacore-measures/package.py
new file mode 100644
index 0000000000..fac747fa15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/casacore-measures/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class CasacoreMeasures(Package):
+ """Install casacore measures tables, and a tool to maintain them."""
+
+ homepage = "https://gitlab.com/dsa-2000/rcp/casacore-measures"
+ url = "https://gitlab.com/dsa-2000/rcp/casacore-measures/-/archive/v1.0.0/casacore-measures-v1.0.0.tar.gz"
+ git = "https://gitlab.com/dsa-2000/rcp/casacore-measures.git"
+
+ maintainers("mpokorny")
+
+ license("AGPL-3.0-or-later", checked_by="mpokorny")
+
+ version("main", branch="main")
+ version("1.0.0", sha256="2bcd891bc0bd67749d93ec5b0fe92d8c1cbb73253465dd0410a3ab5493b3cee5")
+
+ depends_on("wget", type=("build", "run"))
+
+ def install(self, spec, prefix):
+ mkdirp(self.prefix.bin)
+ install("bin/update_measures", self.prefix.bin)
+ mkdirp(self.prefix.share.data)
+ update = Executable(self.prefix.bin.update_measures)
+ update()
diff --git a/var/spack/repos/builtin/packages/casacore/package.py b/var/spack/repos/builtin/packages/casacore/package.py
index 870146b258..ea73223f67 100644
--- a/var/spack/repos/builtin/packages/casacore/package.py
+++ b/var/spack/repos/builtin/packages/casacore/package.py
@@ -18,9 +18,12 @@ class Casacore(CMakePackage):
license("LGPL-2.0-only")
+ version("3.6.1", sha256="480d3340fa17e9ba67f18efbaff4bbb272a01d1f400d2295c0b6c86eb7abcf82")
+ version("3.6.0", sha256="c88075aa73c2139b323b71a7f5d56cec5a6a0de649efd11e2d00ca033be5a0d7")
version("3.5.0", sha256="63f1c8eff932b0fcbd38c598a5811e6e5397b72835b637d6f426105a183b3f91")
version("3.4.0", sha256="31f02ad2e26f29bab4a47a2a69e049d7bc511084a0b8263360e6157356f92ae1")
version("3.3.0", sha256="3a714644b908ef6e81489b792cc9b80f6d8267a275e15d38a42a6a5137d39d3d")
+ version("3.2.1", sha256="f87ce81d2b42ec5401cff8317baeeb9a3b408b716bb791ef252ad97af6e235ad")
version("3.2.0", sha256="ae5d3786cb6dfdd7ebc5eecc0c724ff02bbf6929720bc23be43a027978e79a5f")
version("3.1.2", sha256="ac94f4246412eb45d503f1019cabe2bb04e3861e1f3254b832d9b1164ea5f281")
version("3.1.1", sha256="85d2b17d856592fb206b17e0a344a29330650a4269c80b87f8abb3eaf3dadad4")
@@ -28,6 +31,10 @@ class Casacore(CMakePackage):
version("3.0.0", sha256="6f0e68fd77b5c96299f7583a03a53a90980ec347bff9dfb4c0abb0e2933e6bcb")
version("2.4.1", sha256="58eccc875053b2c6fe44fe53b6463030ef169597ec29926936f18d27b5087d63")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
depends_on("cmake@3.7.1:", type="build")
variant("adios2", default=False, description="Build ADIOS2 support")
@@ -59,15 +66,18 @@ class Casacore(CMakePackage):
depends_on("fftw@3.0.0: precision=float,double", when="~fftpack")
depends_on("sofa-c", type="test")
depends_on("hdf5", when="+hdf5")
- depends_on("adios2+mpi", when="+adios2")
+ depends_on("adios2@2.6.0:", when="+adios2")
+ depends_on("adios2+mpi", when="+adios2+mpi")
+ depends_on("adios2~mpi", when="+adios2~mpi")
depends_on("mpi", when="+mpi")
- depends_on("python@2.6:", when="+python")
+ depends_on("python@2.6:", when="@:3.5.0 +python")
+ depends_on("python@3:", when="@3.6.0: +python")
depends_on("boost +python", when="+python")
depends_on("boost +system +filesystem", when="+dysco")
- depends_on("py-numpy", when="+python")
+ depends_on("py-numpy@:1", when="@:3.6.0 +python")
+ depends_on("py-numpy", when="@3.6.1: +python")
depends_on("gsl", when="+dysco")
- conflicts("~mpi", when="+adios2")
conflicts("+tablelocking", when="+mpi")
conflicts("~threads", when="+openmp")
@@ -93,19 +103,27 @@ class Casacore(CMakePackage):
# FFTPack can be selected.
if spec.satisfies("@3.4.0:"):
if spec.satisfies("+fftpack"):
- args.append("-DBUILD_FFTPACK_DEPRECATED=YES")
+ args.append(self.define("BUILD_FFTPACK_DEPRECATED", True))
else:
args.append(self.define("USE_FFTW3", spec.satisfies("~fftpack")))
# Python2 and Python3 binding
if spec.satisfies("~python"):
- args.extend(["-DBUILD_PYTHON=NO", "-DBUILD_PYTHON3=NO"])
+ args.extend([self.define("BUILD_PYTHON", False), self.define("BUILD_PYTHON3", False)])
elif spec.satisfies("^python@3.0.0:"):
- args.extend(["-DBUILD_PYTHON=NO", "-DBUILD_PYTHON3=YES"])
+ args.extend([self.define("BUILD_PYTHON", False), self.define("BUILD_PYTHON3", True)])
else:
- args.extend(["-DBUILD_PYTHON=YES", "-DBUILD_PYTHON3=NO"])
+ args.extend([self.define("BUILD_PYTHON", True), self.define("BUILD_PYTHON3", False)])
+ if spec.satisfies("@3.6.0:"):
+ args.append(self.define("USE_PCH", True))
+
+ # tests won't pass unless measures data are installed, which
+ # we don't do in this package, and for which we don't yet
+ # provide any way of specifying at build time
+ #
+ # args.append(self.define('BUILD_TESTING', self.run_tests))
+ args.append(self.define("BUILD_TESTING", False))
- args.append("-DBUILD_TESTING=OFF")
return args
def patch(self):
diff --git a/var/spack/repos/builtin/packages/casper/package.py b/var/spack/repos/builtin/packages/casper/package.py
index ff4c4e7f12..9d2bd90237 100644
--- a/var/spack/repos/builtin/packages/casper/package.py
+++ b/var/spack/repos/builtin/packages/casper/package.py
@@ -23,6 +23,8 @@ class Casper(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("jellyfish@2.2.3:")
depends_on("boost+exception")
diff --git a/var/spack/repos/builtin/packages/cassandra/package.py b/var/spack/repos/builtin/packages/cassandra/package.py
index 36f89c148d..7464bef4bd 100644
--- a/var/spack/repos/builtin/packages/cassandra/package.py
+++ b/var/spack/repos/builtin/packages/cassandra/package.py
@@ -12,25 +12,30 @@ class Cassandra(Package):
organized into tables with a required primary key.
"""
- homepage = "https://github.com/apache/cassandra"
+ homepage = "https://cassandra.apache.org/"
url = "https://archive.apache.org/dist/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz"
- license("Apache-2.0")
-
- version("4.0.1", sha256="ed7022e30d9b77d9ce1072f8de95ab01ef7c5c6ed30f304e413dd5a3f92a52f8")
- version("3.11.11", sha256="a5639af781005410995a96f512d505c1def7b70cf5bbbec52e7cd5ff31b6cea3")
- version(
- "3.11.6",
- sha256="ce34edebd1b6bb35216ae97bd06d3efc338c05b273b78267556a99f85d30e45b",
- deprecated=True,
- )
- version(
- "3.11.5",
- sha256="a765adcaa42a6c881f5e79d030854d082900992cc11da40eee413bb235970a6a",
- deprecated=True,
- )
- version("2.2.19", sha256="5496c0254a66b6d50bde7999d1bab9129b0406b71ad3318558f4d7dbfbed0ab9")
-
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("5.0.1", sha256="73f4c807b0aa4036500d5dc54e30ef82bcf549ab1917eff2bbc7189b0337ea84")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2021-44521
+ version("4.0.1", sha256="ed7022e30d9b77d9ce1072f8de95ab01ef7c5c6ed30f304e413dd5a3f92a52f8")
+ version(
+ "3.11.11", sha256="a5639af781005410995a96f512d505c1def7b70cf5bbbec52e7cd5ff31b6cea3"
+ )
+ version(
+ "3.11.6", sha256="ce34edebd1b6bb35216ae97bd06d3efc338c05b273b78267556a99f85d30e45b"
+ )
+ version(
+ "3.11.5", sha256="a765adcaa42a6c881f5e79d030854d082900992cc11da40eee413bb235970a6a"
+ )
+ # https://nvd.nist.gov/vuln/detail/CVE-2020-17516
+ version(
+ "2.2.19", sha256="5496c0254a66b6d50bde7999d1bab9129b0406b71ad3318558f4d7dbfbed0ab9"
+ )
+
+ depends_on("java@11:", type=("build", "run"), when="@5:")
depends_on("java@9:", type=("build", "run"), when="@4.0.0:")
depends_on("java@:8", type=("build", "run"), when="@:3.11.11")
diff --git a/var/spack/repos/builtin/packages/castep/package.py b/var/spack/repos/builtin/packages/castep/package.py
new file mode 100644
index 0000000000..5024935173
--- /dev/null
+++ b/var/spack/repos/builtin/packages/castep/package.py
@@ -0,0 +1,95 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Castep(MakefilePackage):
+ """
+ CASTEP is a leading code for calculating the
+ properties of materials from first principles.
+ Using density functional theory, it can simulate
+ a wide range of properties of materials
+ proprieties including energetics, structure at
+ the atomic level, vibrational properties,
+ electronic response properties etc.
+ """
+
+ homepage = "http://castep.org"
+ url = f"file://{os.getcwd()}/CASTEP-21.11.tar.gz"
+ manual_download = True
+
+ version("21.11", sha256="d909936a51dd3dff7a0847c2597175b05c8d0018d5afe416737499408914728f")
+ version(
+ "19.1.1.rc2", sha256="1fce21dc604774e11b5194d5f30df8a0510afddc16daf3f8b9bbb3f62748f86a"
+ )
+
+ variant("mpi", default=True, description="Enable MPI build")
+ depends_on("rsync", type="build")
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("fftw-api")
+ depends_on("mpi", type=("build", "link", "run"), when="+mpi")
+
+ parallel = True
+
+ def edit(self, spec, prefix):
+ if spec.satisfies("%gcc"):
+ dlmakefile = FileFilter("LibSource/dl_mg-2.0.3/platforms/castep.inc")
+ dlmakefile.filter(r"MPIFLAGS = -DMPI", "MPIFLAGS = -fallow-argument-mismatch -DMPI")
+ if self.spec.satisfies("@20:"):
+ platfile = FileFilter("obj/platforms/linux_x86_64_gfortran.mk")
+ else:
+ platfile = FileFilter("obj/platforms/linux_x86_64_gfortran9.0.mk")
+ platfile.filter(r"^\s*OPT_CPU\s*=.*", "OPT_CPU = ")
+ platfile.filter(r"^\s*FFLAGS_E\s*=.*", "FFLAGS_E = -fallow-argument-mismatch ")
+ elif spec.satisfies("%intel"):
+ if self.spec.satisfies("@20:"):
+ platfile = FileFilter("obj/platforms/linux_x86_64_ifort.mk")
+ else:
+ platfile = FileFilter("obj/platforms/linux_x86_64_ifort19.mk")
+ platfile.filter(r"^\s*OPT_CPU\s*=.*", "OPT_CPU = ")
+
+ @property
+ def build_targets(self):
+ spec = self.spec
+ targetlist = [f"PWD={self.stage.source_path}"]
+
+ if spec.satisfies("+mpi"):
+ targetlist.append("COMMS_ARCH=mpi")
+
+ targetlist.append(f"FFTLIBDIR={spec['fftw-api'].prefix.lib}")
+ targetlist.append(f"MATHLIBDIR={spec['blas'].prefix.lib}")
+
+ if spec.satisfies("^mkl"):
+ targetlist.append("FFT=mkl")
+ if self.spec.satisfies("@20:"):
+ targetlist.append("MATHLIBS=mkl")
+ else:
+ targetlist.append("MATHLIBS=mkl10")
+ else:
+ targetlist.append("FFT=fftw3")
+ targetlist.append("MATHLIBS=openblas")
+
+ if spec.satisfies("target=x86_64:"):
+ if spec.satisfies("platform=linux"):
+ if spec.satisfies("%gcc"):
+ if self.spec.satisfies("@20:"):
+ targetlist.append("ARCH=linux_x86_64_gfortran")
+ else:
+ targetlist.append("ARCH=linux_x86_64_gfortran9.0")
+ if spec.satisfies("%intel"):
+ if self.spec.satisfies("@20:"):
+ targetlist.append("ARCH=linux_x86_64_ifort")
+ else:
+ targetlist.append("ARCH=linux_x86_64_ifort19")
+
+ return targetlist
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ make("install", "install-tools", *self.build_targets, "INSTALL_DIR={0}".format(prefix.bin))
diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py
index 148b5c3ffc..7886df2697 100644
--- a/var/spack/repos/builtin/packages/catch2/package.py
+++ b/var/spack/repos/builtin/packages/catch2/package.py
@@ -22,6 +22,9 @@ class Catch2(CMakePackage):
version("develop", branch="devel")
# Releases
+ version("3.7.1", sha256="c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c")
+ version("3.6.0", sha256="485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356")
+ version("3.5.4", sha256="b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb")
version("3.4.0", sha256="122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb")
version("3.3.2", sha256="8361907f4d9bff3ae7c1edb027f813659f793053c99b67837a0c0375f065bae2")
version("3.3.1", sha256="d90351cdc55421f640c553cfc0875a8c834428679444e8062e9187d05b18aace")
@@ -32,10 +35,14 @@ class Catch2(CMakePackage):
version("3.1.0", sha256="c252b2d9537e18046d8b82535069d2567f77043f8e644acf9a9fffc22ea6e6f7")
version("3.0.1", sha256="8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7")
version(
- "3.0.0-preview4", sha256="2458d47d923b65ab611656cb7669d1810bcc4faa62e4c054a7405b1914cd4aee"
+ "3.0.0-preview4",
+ sha256="2458d47d923b65ab611656cb7669d1810bcc4faa62e4c054a7405b1914cd4aee",
+ deprecated=True,
)
version(
- "3.0.0-preview3", sha256="06a4f903858f21c553e988f8b76c9c6915d1f95f95512d6a58c421e02a2c4975"
+ "3.0.0-preview3",
+ sha256="06a4f903858f21c553e988f8b76c9c6915d1f95f95512d6a58c421e02a2c4975",
+ deprecated=True,
)
version("2.13.10", sha256="d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943")
version("2.13.9", sha256="06dbc7620e3b96c2b69d57bf337028bf245a211b3cddb843835bfe258f427a52")
@@ -108,6 +115,8 @@ class Catch2(CMakePackage):
version("1.3.5", sha256="f15730d81b4173fb860ce3561768de7d41bbefb67dc031d7d1f5ae2c07f0a472")
version("1.3.0", sha256="245f6ee73e2fea66311afa1da59e5087ddab8b37ce64994ad88506e8af28c6ac")
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
when="@3:",
@@ -122,6 +131,7 @@ class Catch2(CMakePackage):
)
variant("shared", when="@3:", default=False, description="Build shared library")
+ @when("@3:")
def patch(self):
filter_file(
r"#include \<catch2",
diff --git a/var/spack/repos/builtin/packages/cbc/package.py b/var/spack/repos/builtin/packages/cbc/package.py
index 191310a756..79c1e48fcd 100644
--- a/var/spack/repos/builtin/packages/cbc/package.py
+++ b/var/spack/repos/builtin/packages/cbc/package.py
@@ -14,14 +14,18 @@ class Cbc(AutotoolsPackage):
homepage = "https://projects.coin-or.org/Cbc"
url = "https://github.com/coin-or/Cbc/archive/releases/2.10.5.tar.gz"
- depends_on("coinutils")
- depends_on("osi")
- depends_on("cgl")
-
license("EPL-2.0")
+ version("2.10.11", sha256="1fb591dd88336fdaf096b8e42e46111e41671a5eb85d4ee36e45baff1678bd33")
version("2.10.9", sha256="96d02593b01fd1460d421f002734384e4eb1e93ebe1fb3570dc2b7600f20a27e")
version("2.10.8", sha256="8525abb541ee1b8e6ff03b00411b66e98bbc58f95be1aefd49d2bca571be2eaf")
version("2.10.5", sha256="cc44c1950ff4615e7791d7e03ea34318ca001d3cac6dc3f7f5ee392459ce6719")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("coinutils")
+ depends_on("osi")
+ depends_on("cgl")
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/cbench/package.py b/var/spack/repos/builtin/packages/cbench/package.py
index 609e5bba54..1668faa104 100644
--- a/var/spack/repos/builtin/packages/cbench/package.py
+++ b/var/spack/repos/builtin/packages/cbench/package.py
@@ -19,6 +19,10 @@ class Cbench(MakefilePackage):
version("1.3.0", sha256="b40fdafd14869b86819e5906a107b0735290a1e58bae229d8166514a72f58732")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
@@ -43,7 +47,7 @@ class Cbench(MakefilePackage):
env.set("MPIHOME", self.spec["mpi"].prefix)
# Pick the compiler collection/chain you want to compile with.
- # Examples include: intel, gcc, pgi.
+ # Examples include: intel, gcc.
env.set("COMPILERCOLLECTION", self.compiler.name)
# Linking flags for BLAS/LAPACK and FFTW
diff --git a/var/spack/repos/builtin/packages/cbflib/package.py b/var/spack/repos/builtin/packages/cbflib/package.py
index 7e313acece..5277b3a124 100644
--- a/var/spack/repos/builtin/packages/cbflib/package.py
+++ b/var/spack/repos/builtin/packages/cbflib/package.py
@@ -22,6 +22,10 @@ class Cbflib(MakefilePackage):
version("0.9.2", sha256="367e37e1908a65d5472e921150291332823a751206804866e752b793bca17afc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("m4", type="build")
patch("cbf_f16.patch")
@@ -45,8 +49,7 @@ class Cbflib(MakefilePackage):
mf.filter(r"^C\+\+.+", "C++ = {0}".format(spack_cxx))
mf.filter("gfortran", spack_fc)
mf.filter(r"^INSTALLDIR .+", "INSTALLDIR = {0}".format(prefix))
- real_version = Version(self.compiler.get_real_version())
- if real_version >= Version("10"):
+ if self.spec.satisfies("%gcc@10:"):
mf.filter(r"^F90FLAGS[ \t]*=[ \t]*(.+)", "F90FLAGS = \\1 -fallow-invalid-boz")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cbindgen/package.py b/var/spack/repos/builtin/packages/cbindgen/package.py
new file mode 100644
index 0000000000..62571e30ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cbindgen/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cbindgen(CargoPackage):
+ """A project for generating C bindings from Rust code."""
+
+ homepage = "https://github.com/mozilla/cbindgen"
+ url = "https://github.com/mozilla/cbindgen/archive/refs/tags/v0.26.0.tar.gz"
+
+ license("MPL", checked_by="teaguesterling")
+
+ version("0.26.0", sha256="b45e1a64875b615702a86ac3084ef69ae32926241cd2b687a30c12474be15105")
+ version("0.25.0", sha256="363ac6317a5788de8f2b0104a472a747883d4b9126fa119c681879509dbdbc28")
+ version("0.24.3", sha256="5d693ab54acc085b9f2dbafbcf0a1f089737f7e0cb1686fa338c2aaa05dc7705")
+ version("0.24.2", sha256="87ec3c355d08107b72c7b330c54aa2531eac0db754659a98bd58a93516ec9d4c")
+ version("0.24.1", sha256="7a7098a7659e8dd166e170ebaf3dcd0a8a30119ef230100ff66041a6b4fc76ba")
+ version("0.24.0", sha256="5cbbf8195b3e5bcee6044697b07b54e7701f047e40d7c86190be385736734cd7")
+ version("0.23.0", sha256="d7b82a7a4bfe7fc61c6f7c1b848bf586fef4057c84960739484b4f743bf0bab6")
+ version("0.22.0", sha256="f129b453df9d84e6d098a446f928961241b2a0edc29f827addca154049dcc434")
+ version("0.21.0", sha256="c254a68039a85fe17c63781e67d09b0bfabc32446615d7c63cd805052ac5b155")
+ version("0.20.0", sha256="70f810d2b9e5a2db570431872c26377813fb27a63d817cb16b2d69fa3741d066")
+
+ depends_on("rust@1.70:")
+
+ depends_on("rust-clap@4.3:")
+
+ # The following dependencies need more work for spack but are handled by Cargo
+ # They are included for reference and as a TODO once the Cargo packaging system
+ # improves its support for more complex packages.
+ # depends_on("rust-heck@0.4:")
+ # depends_on("rust-toml@0.8.8:")
+ # depends_on("rust-log@0.4:")
+ # depends_on("rust-serde@1.0.103+derive")
+ # depends_on("rust-serde-json@1.0:")
+ # depends_on("rust-proc-macro2@1.0.60")
+ # depends_on("rust-indexmap@2.1.0:")
diff --git a/var/spack/repos/builtin/packages/cblas/package.py b/var/spack/repos/builtin/packages/cblas/package.py
index 86b50b7c5e..d3d5634535 100644
--- a/var/spack/repos/builtin/packages/cblas/package.py
+++ b/var/spack/repos/builtin/packages/cblas/package.py
@@ -20,6 +20,9 @@ class Cblas(Package):
url="https://www.netlib.org/blas/blast-forum/cblas.tgz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("blas")
parallel = False
diff --git a/var/spack/repos/builtin/packages/cbqn/package.py b/var/spack/repos/builtin/packages/cbqn/package.py
new file mode 100644
index 0000000000..7dd69d90d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cbqn/package.py
@@ -0,0 +1,62 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cbqn(MakefilePackage):
+ """A BQN implementation in C"""
+
+ # Alternative homepage not specific to this implementation:
+ # https://mlochbaum.github.io/BQN/index.html
+ homepage = "https://github.com/dzaima/CBQN"
+ git = "https://github.com/dzaima/CBQN"
+
+ maintainers("ashermancinelli")
+
+ # Licenses listed in the order they appear in the repo's licensing section
+ # https://github.com/dzaima/CBQN/tree/master#licensing
+ license(
+ "MIT AND Apache-2.0 AND BSL-1.0 AND LGPL-3.0-only AND GPL-3.0-only AND MPL-2.0",
+ checked_by="ashermancinelli",
+ )
+
+ version("master", branch="master")
+ version("develop", branch="develop")
+ version("0.7.0", tag="v0.7.0")
+
+ depends_on("c", type="build")
+
+ variant("repl", default=True, description="Enable built-in REPL")
+ variant("ffi", default=True, description="Enable FFI support")
+ variant(
+ "build_type",
+ values=("o3n", "o3", "o3g", "c", "shared-o3", "debug", "static-bin", "static-lib"),
+ default="o3",
+ multi=False,
+ description="Make target to use.",
+ )
+
+ depends_on("cxx", when="+repl", type="build")
+ depends_on("libffi", when="+ffi")
+
+ def build(self, spec, prefix):
+ make_args = []
+ make_args.append("FFI={0}".format(int(spec.satisfies("+ffi"))))
+ make_args.append("REPLXX={0}".format(int(spec.satisfies("+repl"))))
+
+ # Makes logs easier to read
+ make_args.append("notui=1")
+
+ # The build types map directly to the make target
+ make_args.append(spec.variants["build_type"].value)
+
+ if spec.version not in ("develop", "master"):
+ make_args.append("version={0}".format(spec.version))
+
+ make(*make_args)
+
+ def install(self, spec, prefix):
+ make("PREFIX={0}".format(prefix), "install")
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py
index 36549c6063..841a61e0fe 100644
--- a/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py
@@ -22,6 +22,8 @@ class CbtfArgonavisGui(QMakePackage):
version("develop", branch="master")
version("1.3.0.0", branch="1.3.0.0")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0.2:", type="build")
depends_on("qt@5.10.0:")
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
index 96b3679b18..a4d1ae6543 100644
--- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
@@ -22,6 +22,9 @@ class CbtfArgonavis(CMakePackage):
version("1.9.4", branch="1.9.4")
version("1.9.3", branch="1.9.3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"crayfe",
default=False,
diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py
index 3196840a93..4c731a1e8d 100644
--- a/var/spack/repos/builtin/packages/cbtf-krell/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py
@@ -25,6 +25,9 @@ class CbtfKrell(CMakePackage):
version("1.9.4", branch="1.9.4")
version("1.9.3", branch="1.9.3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# MPI variants
variant(
"openmpi", default=False, description="Build mpi experiment collector for openmpi MPI.."
diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
index 371c1dd638..69882e9b2a 100644
--- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
@@ -20,6 +20,8 @@ class CbtfLanl(CMakePackage):
version("1.9.4", branch="1.9.4")
version("1.9.3", branch="1.9.3")
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py
index 92166c5286..7daccff498 100644
--- a/var/spack/repos/builtin/packages/cbtf/package.py
+++ b/var/spack/repos/builtin/packages/cbtf/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.pkg.builtin.boost import Boost
class Cbtf(CMakePackage):
@@ -27,6 +26,8 @@ class Cbtf(CMakePackage):
version("1.9.4", branch="1.9.4")
version("1.9.3", branch="1.9.3")
+ depends_on("cxx", type="build") # generated
+
variant(
"runtime", default=False, description="build only the runtime libraries and collectors."
)
@@ -46,12 +47,7 @@ class Cbtf(CMakePackage):
# for rpc
depends_on("libtirpc", type="link")
- depends_on("boost@1.70.0:")
-
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants)
+ depends_on("boost@1.70.0:1.84.0+date_time+filesystem+test+thread")
# For MRNet
depends_on("mrnet@5.0.1-3:+lwthreads", when="@develop")
diff --git a/var/spack/repos/builtin/packages/cc65/package.py b/var/spack/repos/builtin/packages/cc65/package.py
index 1f4998ed54..cebbf6a3d4 100644
--- a/var/spack/repos/builtin/packages/cc65/package.py
+++ b/var/spack/repos/builtin/packages/cc65/package.py
@@ -22,5 +22,7 @@ class Cc65(MakefilePackage):
version("2.15", sha256="adeac1a4b04183dd77fba1d69e56bbf4a6d358e0b253ee43ef4cac2391ba848a")
version("2.14", sha256="128bda63490eb43ad25fd3615adee4c819c0b7da4b9b8f1801df36bd19e3bdf8")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("PREFIX={0}".format(prefix), "install")
diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py
index c785ca663c..5c334f5e23 100644
--- a/var/spack/repos/builtin/packages/ccache/package.py
+++ b/var/spack/repos/builtin/packages/ccache/package.py
@@ -23,6 +23,9 @@ class Ccache(CMakePackage):
license("GPL-3.0-or-later")
+ version("4.10.2", sha256="108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87")
+ version("4.9.1", sha256="12834ecaaaf2db069dda1d1d991f91c19e3274cc04a471af5b64195def17e90f")
+ version("4.8.3", sha256="d59dd569ad2bbc826c0bc335c8ebd73e78ed0f2f40ba6b30069347e63585d9ef")
version("4.8.2", sha256="75eef15b8b9da48db9c91e1d0ff58b3645fc70c0e4ca2ef1b6825a12f21f217d")
version("4.8.1", sha256="869903c1891beb8bee87f1ec94d8a0dad18c2add4072c456acbc85cdfc23ca63")
version("4.8", sha256="ac4b01748fd59cfe07e070c34432b91bdd0fd8640e1e653a80b01d6a523186b0")
@@ -54,6 +57,9 @@ class Ccache(CMakePackage):
version("3.3", sha256="b220fce435fe3d86b8b90097e986a17f6c1f971e0841283dd816adb238c5fd6a")
version("3.2.9", sha256="1e13961b83a3d215c4013469c149414a79312a22d3c7bf9f946abac9ee33e63f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("redis", default=True, description="Enable Redis secondary storage")
depends_on("cmake@3.15:", when="@4.7:", type="build")
@@ -74,10 +80,12 @@ class Ccache(CMakePackage):
conflicts("%clang@:7", when="@4.7:")
conflicts("%clang@:4", when="@4.4:")
- patch("fix-gcc-12.patch", when="%gcc@12")
+ patch("fix-gcc-12.patch", when="@4.8:4.8.2 %gcc@12")
def cmake_args(self):
return [
+ # The test suite does not support the compiler being a wrapper script
+ # https://github.com/ccache/ccache/issues/914#issuecomment-922521690
self.define("ENABLE_TESTING", False),
self.define("ENABLE_DOCUMENTATION", False),
self.define_from_variant("REDIS_STORAGE_BACKEND", "redis"),
diff --git a/var/spack/repos/builtin/packages/cce/detection_test.yaml b/var/spack/repos/builtin/packages/cce/detection_test.yaml
new file mode 100644
index 0000000000..284dee70ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cce/detection_test.yaml
@@ -0,0 +1,57 @@
+paths:
+- layout:
+ - executables:
+ - "bin/craycc"
+ script: |
+ echo "Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39"
+ - executables:
+ - "bin/crayCC"
+ script: |
+ echo "Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:39"
+ - executables:
+ - "bin/crayftn"
+ script: |
+ echo "Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:39"
+ platforms: [linux]
+ results:
+ - spec: cce@8.4.6
+ extra_attributes:
+ compilers:
+ c: ".*/bin/craycc"
+ cxx: ".*/bin/crayCC"
+ fortran: ".*/bin/crayftn"
+- layout:
+ - executables:
+ - "bin/craycc"
+ - "bin/crayCC"
+ script: |
+ echo "Cray clang version 17.0.1 (5ec9405551a8c8845cf14e81dc28bff7aa3935cb)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/cray/pe/cce/17.0.1/cce-clang/x86_64/share/../bin"
+ echo "Configuration file: /opt/cray/pe/cce/17.0.1/cce-clang/x86_64/bin/clang.cfg"
+ - executables:
+ - "bin/crayftn"
+ script: |
+ echo "Cray Fortran : Version 17.0.1"
+ platforms: [linux]
+ results:
+ - spec: cce@17.0.1
+ extra_attributes:
+ compilers:
+ c: ".*/bin/craycc"
+ cxx: ".*/bin/crayCC"
+ fortran: ".*/bin/crayftn"
+
+# Apple Clang should not be detected
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
+ echo "Target: x86_64-apple-darwin19.5.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ platforms: ["darwin"]
+ results: []
diff --git a/var/spack/repos/builtin/packages/cce/package.py b/var/spack/repos/builtin/packages/cce/package.py
new file mode 100644
index 0000000000..0772be6ab1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cce/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Cce(Package, CompilerPackage):
+ """Stub package for external detection of the Cray compiler package."""
+
+ homepage = "https://cpe.ext.hpe.com/docs/cce/index.html"
+ url = "https://cpe.ext.hpe.com/docs/cce/index.html"
+
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["craycc"]
+ cxx_names = ["crayCC"]
+ fortran_names = ["crayftn"]
+
+ compiler_version_argument = "--version"
+ compiler_version_regex = (
+ r"[Cc]ray (?:clang|C :|C\+\+ :|Fortran :) [Vv]ersion.*?(\d+(?:\.\d+)+)"
+ )
+
+ # notify when the package is updated.
+ maintainers("becker33")
+
+ version("16.0.0")
+
+ def install(self, spec, prefix):
+ raise NotImplementedError("cray compiler must be configured as external")
diff --git a/var/spack/repos/builtin/packages/ccfits/package.py b/var/spack/repos/builtin/packages/ccfits/package.py
index 1b2a98f868..13e2701a69 100644
--- a/var/spack/repos/builtin/packages/ccfits/package.py
+++ b/var/spack/repos/builtin/packages/ccfits/package.py
@@ -20,4 +20,6 @@ class Ccfits(AutotoolsPackage):
version("2.5", sha256="938ecd25239e65f519b8d2b50702416edc723de5f0a5387cceea8c4004a44740")
version("2.4", sha256="ba6c5012b260adf7633f92581279ea582e331343d8c973981aa7de07242bd7f8")
+ depends_on("cxx", type="build") # generated
+
depends_on("cfitsio")
diff --git a/var/spack/repos/builtin/packages/ccls/package.py b/var/spack/repos/builtin/packages/ccls/package.py
index 08f5a5059a..7d05aa4e80 100644
--- a/var/spack/repos/builtin/packages/ccls/package.py
+++ b/var/spack/repos/builtin/packages/ccls/package.py
@@ -18,6 +18,12 @@ class Ccls(CMakePackage):
license("Apache-2.0")
version(
+ "0.20240202", sha256="355ff7f5eb5f24d278dda05cccd9157e89583272d0559d6b382630171f142d86"
+ )
+ version(
+ "0.20230717", sha256="118e84cc17172b1deef0f9c50767b7a2015198fd44adac7966614eb399867af8"
+ )
+ version(
"0.20220729", sha256="af19be36597c2a38b526ce7138c72a64c7fb63827830c4cff92256151fc7a6f4"
)
version(
@@ -27,6 +33,8 @@ class Ccls(CMakePackage):
"0.20201025", sha256="1470797b2c1a466e2d8a069efd807aac6fefdef8a556e1edf2d44f370c949221"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.8:", type="build")
depends_on("llvm@7:")
depends_on("rapidjson")
diff --git a/var/spack/repos/builtin/packages/ccs-qcd/package.py b/var/spack/repos/builtin/packages/ccs-qcd/package.py
index bd404445cc..49125e3049 100644
--- a/var/spack/repos/builtin/packages/ccs-qcd/package.py
+++ b/var/spack/repos/builtin/packages/ccs-qcd/package.py
@@ -40,6 +40,10 @@ class CcsQcd(MakefilePackage):
version("master", branch="master")
version("1.2.1", commit="d7c6b6923f35a824e997ba8db5bd12dc20dda45c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"class",
default=1,
@@ -65,7 +69,7 @@ class CcsQcd(MakefilePackage):
chgopt,
join_path(self.stage.source_path, "src", "make.gfortran.inc"),
)
- if "%fj" in spec:
+ if spec.satisfies("%fj"):
filter_file(
"mpifrtpx",
spec["mpi"].mpifc,
@@ -91,7 +95,7 @@ class CcsQcd(MakefilePackage):
def build(self, spec, prefix):
ccs_class = "CLASS=" + spec.variants["class"].value
with working_dir("src"):
- if "%fj" in spec:
+ if spec.satisfies("%fj"):
make("MAKE_INC=make.fx10.inc", ccs_class)
else:
make("MAKE_INC=make.gfortran.inc", ccs_class)
diff --git a/var/spack/repos/builtin/packages/cctools/package.py b/var/spack/repos/builtin/packages/cctools/package.py
index d3244d76b6..85f35f7b8c 100644
--- a/var/spack/repos/builtin/packages/cctools/package.py
+++ b/var/spack/repos/builtin/packages/cctools/package.py
@@ -32,6 +32,9 @@ class Cctools(AutotoolsPackage):
version("7.0.18", sha256="5b6f3c87ae68dd247534a5c073eb68cb1a60176a7f04d82699fbc05e649a91c2")
version("6.1.1", sha256="97f073350c970d6157f80891b3bf6d4f3eedb5f031fea386dc33e22f22b8af9d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openssl")
depends_on("perl+shared", type=("build", "run"))
depends_on("python", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/cdbfasta/package.py b/var/spack/repos/builtin/packages/cdbfasta/package.py
index 24ab2790e6..bb4fb47a1f 100644
--- a/var/spack/repos/builtin/packages/cdbfasta/package.py
+++ b/var/spack/repos/builtin/packages/cdbfasta/package.py
@@ -16,6 +16,8 @@ class Cdbfasta(MakefilePackage):
version("2017-03-16", commit="b3e481fe02dfbc767a3842bcb1b687c60376a5e8")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cdd/package.py b/var/spack/repos/builtin/packages/cdd/package.py
index 8a1940261f..bfdf84ca7a 100644
--- a/var/spack/repos/builtin/packages/cdd/package.py
+++ b/var/spack/repos/builtin/packages/cdd/package.py
@@ -21,16 +21,18 @@ class Cdd(Package):
version("0.61a", sha256="637a1909bbd8aa4d32667da08f9e9ac687bf7d3ef1b8af5bd227e91a3cd4019b")
+ depends_on("c", type="build") # generated
+
depends_on("libtool", type="build")
patch("Makefile.spack.patch")
def url_for_version(self, version):
- url = "http://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-{0}.tar.gz"
+ url = "https://www.cs.mcgill.ca/~fukuda/download/cdd/cdd-{0}.tar.gz"
return url.format(version.joined)
def install(self, spec, prefix):
# The Makefile isn't portable; use our own instead
- makeargs = ["-f", "Makefile.spack", "PREFIX=%s" % prefix]
+ makeargs = ["-f", "Makefile.spack", f"PREFIX={prefix}"]
make(*makeargs)
make("install", *makeargs)
diff --git a/var/spack/repos/builtin/packages/cddlib/package.py b/var/spack/repos/builtin/packages/cddlib/package.py
index fbf3e0b33b..ef8cdb560f 100644
--- a/var/spack/repos/builtin/packages/cddlib/package.py
+++ b/var/spack/repos/builtin/packages/cddlib/package.py
@@ -22,6 +22,8 @@ class Cddlib(AutotoolsPackage):
version("0.94m", sha256="70dffdb3369b8704dc75428a1b3c42ab9047b81ce039f12f427e2eb2b1b0dee2")
version("0.94h", sha256="7382782c3834214b022c8b2898ed775a7bf915f2cb2acb73fa045d6fd9a3de33")
+ depends_on("c", type="build") # generated
+
depends_on("gmp", when="@0.94h")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/cdecimal/package.py b/var/spack/repos/builtin/packages/cdecimal/package.py
index a725b726ca..a02ec04244 100644
--- a/var/spack/repos/builtin/packages/cdecimal/package.py
+++ b/var/spack/repos/builtin/packages/cdecimal/package.py
@@ -17,4 +17,6 @@ class Cdecimal(AutotoolsPackage):
version("2.3", sha256="d737cbe43ed1f6ad9874fb86c3db1e9bbe20c0c750868fde5be3f379ade83d8b")
+ depends_on("c", type="build") # generated
+
patch("darwin_install_name.patch", when="platform=darwin")
diff --git a/var/spack/repos/builtin/packages/cdhit/package.py b/var/spack/repos/builtin/packages/cdhit/package.py
index 1d6bdf304b..1816717dc2 100644
--- a/var/spack/repos/builtin/packages/cdhit/package.py
+++ b/var/spack/repos/builtin/packages/cdhit/package.py
@@ -20,6 +20,8 @@ class Cdhit(MakefilePackage):
version("4.8.1", sha256="f8bc3cdd7aebb432fcd35eed0093e7a6413f1e36bbd2a837ebc06e57cdb20b70")
version("4.6.8", sha256="37d685e4aa849314401805fe4d4db707e1d06070368475e313d6f3cb8fb65949")
+ depends_on("cxx", type="build") # generated
+
maintainers("snehring")
variant("openmp", default=True, description="Compile with multi-threading support")
@@ -36,9 +38,9 @@ class Cdhit(MakefilePackage):
def build(self, spec, prefix):
mkdirp(prefix.bin)
make_args = []
- if "~openmp" in spec:
+ if spec.satisfies("~openmp"):
make_args.append("openmp=no")
- if "~zlib" in spec:
+ if spec.satisfies("~zlib"):
make_args.append("zlib=no")
make(*make_args)
diff --git a/var/spack/repos/builtin/packages/cdi/package.py b/var/spack/repos/builtin/packages/cdi/package.py
new file mode 100644
index 0000000000..67ced0fa8a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdi/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cdi(AutotoolsPackage):
+ """
+ CDI is a C and Fortran Interface to access Climate and NWP model Data.
+ Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG.
+ """
+
+ homepage = "https://code.mpimet.mpg.de/projects/cdi"
+ url = "https://code.mpimet.mpg.de/attachments/download/29309/cdi-2.4.0.tar.gz"
+
+ version("2.4.0", sha256="91fca015b04c6841b9eab8b49e7726d35e35b9ec4350922072ec6e9d5eb174ef")
+
+ variant(
+ "netcdf", default=True, description="This is needed to read/write NetCDF files with CDI"
+ )
+
+ depends_on("netcdf-c", when="+netcdf")
+
+ def configure_args(self):
+ args = []
+ if "+netcdf" in self.spec:
+ args.append("--with-netcdf=" + self.spec["netcdf-c"].prefix)
+ return args
diff --git a/var/spack/repos/builtin/packages/cdo/add_algorithm_header.patch b/var/spack/repos/builtin/packages/cdo/add_algorithm_header.patch
new file mode 100644
index 0000000000..2e9e6803ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdo/add_algorithm_header.patch
@@ -0,0 +1,22 @@
+diff --git a/src/cdo_module.cc b/src/cdo_module_patched.cc
+index dc408d9..f50c2d3 100644
+--- a/src/cdo_module.cc
++++ b/src/cdo_module_patched.cc
+@@ -1,4 +1,5 @@
+ #include "cdo_module.h"
++#include <algorithm>
+
+ oper_t::oper_t() : help(default_help) {}
+
+diff --git a/src/cdo_options.cc b/src/cdo_options_patched.cc
+index 465f1f9..0684e78 100644
+--- a/src/cdo_options.cc
++++ b/src/cdo_options_patched.cc
+@@ -12,6 +12,7 @@
+ #include "cdo_output.h"
+
+ #include <cstring>
++#include <algorithm>
+
+ namespace cdo
+ {
diff --git a/var/spack/repos/builtin/packages/cdo/add_algorithm_header_222.patch b/var/spack/repos/builtin/packages/cdo/add_algorithm_header_222.patch
new file mode 100644
index 0000000000..319e140ef4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdo/add_algorithm_header_222.patch
@@ -0,0 +1,23 @@
+diff --git a/src/cdo_options.cc b/src/cdo_options_patched.cc
+index 465f1f9..0684e78 100644
+--- a/src/cdo_options.cc
++++ b/src/cdo_options_patched.cc
+@@ -12,6 +12,7 @@
+ #include "cdo_output.h"
+
+ #include <cstring>
++#include <algorithm>
+
+ namespace cdo
+ {
+diff -u src/cdo_options.h src/cdo_options_patched.h
+--- a/src/cdo_options.h
++++ b/src/cdo_options_patched.h
+@@ -3,6 +3,7 @@
+
+ #include <vector>
+ #include <string>
++#include <algorithm>
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h" /* _FILE_OFFSET_BITS influence off_t */
diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py
index 2019f703b5..dc4721214e 100644
--- a/var/spack/repos/builtin/packages/cdo/package.py
+++ b/var/spack/repos/builtin/packages/cdo/package.py
@@ -21,6 +21,31 @@ class Cdo(AutotoolsPackage):
maintainers("skosukhin", "Try2Code")
version(
+ "2.4.4",
+ sha256="49f50bd18dacd585e9518cfd4f55548f692426edfb3b27ddcd1c653eab53d063",
+ url="https://code.mpimet.mpg.de/attachments/download/29649/cdo-2.4.4.tar.gz",
+ )
+ version(
+ "2.4.3",
+ sha256="4a608b70ee1907b45e149ad44033bb47d35b7da96096553193bd362ca9d445eb",
+ url="https://code.mpimet.mpg.de/attachments/download/29616/cdo-2.4.3.tar.gz",
+ )
+ version(
+ "2.4.2",
+ sha256="4df1fe2b8f92f54c27eb9f399edfab40d9322005a6732ca1524ef5c1627ac4e7",
+ url="https://code.mpimet.mpg.de/attachments/download/29481/cdo-2.4.2.tar.gz",
+ )
+ version(
+ "2.4.1",
+ sha256="9144d82b8ab7e73f4cb7a94cc4b884f64dff1a0455c4eb6c93ce4b568007aabf",
+ url="https://code.mpimet.mpg.de/attachments/download/29421/cdo-2.4.1.tar.gz",
+ )
+ version(
+ "2.4.0",
+ sha256="a4790fb8cc07f353b11f9bbe49218b8e4be8e5ae56aade8420bad390510b4d2c",
+ url="https://code.mpimet.mpg.de/attachments/download/29313/cdo-2.4.0.tar.gz",
+ )
+ version(
"2.3.0",
sha256="10c878227baf718a6917837527d4426c2d0022cfac4457c65155b9c57f091f6b",
url="https://code.mpimet.mpg.de/attachments/download/29019/cdo-2.3.0.tar.gz",
@@ -146,6 +171,24 @@ class Cdo(AutotoolsPackage):
url="https://code.mpimet.mpg.de/attachments/download/12760/cdo-1.7.2.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # patches
+ # see https://code.mpimet.mpg.de/boards/1/topics/15594
+ patch(
+ "add_algorithm_header.patch",
+ when="@2.4.0:2.4.2 %gcc@14:",
+ sha256="0bc20d2fcb14d8e4010d4222297f259eb7b4220effd97555ed3f027e63cf8b30",
+ )
+ patch(
+ "add_algorithm_header_222.patch",
+ when="@2.2.2:2.3.0 %gcc@14:",
+ sha256="db0d9bd32bbee01d914c1dbebd751403e9c918fafd540fd6ecc6a2f27e0900cf",
+ )
+ conflicts("%gcc@14:", when="@:2.2.0", msg="Compilation with gcc@14: requires cdo@2.2.2:")
+
variant("netcdf", default=True, description="Enable NetCDF support")
variant(
"grib2",
@@ -209,7 +252,7 @@ class Cdo(AutotoolsPackage):
prefix = self.spec[spec_name].prefix
return "yes" if is_system_path(prefix) else prefix
- if "+netcdf" in self.spec:
+ if self.spec.satisfies("+netcdf"):
config_args.append("--with-netcdf=" + yes_or_prefix("netcdf-c"))
# We need to make sure that the libtool script of libcdi - the
# internal library of CDO - finds the correct version of hdf5.
@@ -242,12 +285,12 @@ class Cdo(AutotoolsPackage):
if self.spec.satisfies("@1.9:"):
config_args.append("--without-eccodes")
- if "+external-grib1" in self.spec:
+ if self.spec.satisfies("+external-grib1"):
config_args.append("--disable-cgribex")
else:
config_args.append("--enable-cgribex")
- if "+szip" in self.spec:
+ if self.spec.satisfies("+szip"):
config_args.append("--with-szlib=" + yes_or_prefix("szip"))
else:
config_args.append("--without-szlib")
@@ -258,7 +301,7 @@ class Cdo(AutotoolsPackage):
"udunits2", activation_value=lambda x: yes_or_prefix("udunits")
)
- if "+libxml2" in self.spec:
+ if self.spec.satisfies("+libxml2"):
libxml2_spec = self.spec["libxml2"]
if is_system_path(libxml2_spec.prefix):
config_args.append("--with-libxml2=yes")
diff --git a/var/spack/repos/builtin/packages/cdt/package.py b/var/spack/repos/builtin/packages/cdt/package.py
index 4e73a05286..01730fdcda 100644
--- a/var/spack/repos/builtin/packages/cdt/package.py
+++ b/var/spack/repos/builtin/packages/cdt/package.py
@@ -16,10 +16,13 @@ class Cdt(CMakePackage):
license("MPL-2.0-no-copyleft-exception")
+ version("1.4.1", sha256="86df99eb5f02a73eeb8c6ea45765eed0d7f206e8d4d9f6479f77e3c590ae5bb3")
version("1.4.0", sha256="cb5a95a39b417f5a4d170c7ebe97232d0ed36ea64069339b14964dd52dea95ab")
version("1.3.6", sha256="15881e4c451f3b7cceade9b11884b3813ff674dff3edae4fb7c440634f8d4c33")
version("1.3.0", sha256="7e8feadf9534cf79f9bf188365510fd6bc68ea997758e1c68d1569f98da924da")
+ depends_on("cxx", type="build") # generated
+
variant(
"boost",
default=False,
diff --git a/var/spack/repos/builtin/packages/ceed/package.py b/var/spack/repos/builtin/packages/ceed/package.py
index fd72aa1301..7eaf041118 100644
--- a/var/spack/repos/builtin/packages/ceed/package.py
+++ b/var/spack/repos/builtin/packages/ceed/package.py
@@ -201,10 +201,6 @@ class Ceed(BundlePackage, CudaPackage, ROCmPackage):
# and +mumps:
depends_on("petsc@3.11.1+mpi+hypre+suite-sparse+mumps+double~int64", when="@2.0.0+petsc+mfem")
depends_on("hpgmg@0.4+fe", when="@2.0.0+petsc")
- # ceed-1.0
- # The mfem petsc examples need the petsc variants +hypre, +suite-sparse,
- # and +mumps:
- depends_on("hpgmg@a0a5510df23b+fe", when="@1.0.0+petsc")
# MAGMA
# ceed 5.0
@@ -244,7 +240,7 @@ class Ceed(BundlePackage, CudaPackage, ROCmPackage):
# Omega_h
# ceed-5.0
- depends_on("omega-h@scorec.10.1.0", when="@5.0.0+omega-h")
+ depends_on("omega-h@10.1.0", when="@5.0.0+omega-h")
depends_on("omega-h~trilinos", when="@5.0.0+omega-h+quickbuild")
# MFEM, Laghos, Remhos
@@ -313,8 +309,8 @@ class Ceed(BundlePackage, CudaPackage, ROCmPackage):
depends_on("suite-sparse@:5.1.0", when="@2.0.0%gcc@:4.8+mfem+petsc")
# ceed-1.0
- depends_on("mfem@3.3.2+mpi+examples+miniapps", when="@1.0.0+mfem~petsc")
- depends_on("mfem@3.3.2+mpi+petsc+examples+miniapps", when="@1.0.0+mfem+petsc")
+ depends_on("mfem@3.3.2+mpi+examples+miniapps", when="@1.0.0+mfem")
+ depends_on("mfem@3.3.2+mpi+petsc+examples+miniapps", when="@1.0.0+mfem")
depends_on("laghos@1.0", when="@1.0.0+mfem")
# The next line seems to be necessary because the concretizer somehow
# decides that mfem requires 'hypre+internal-superlu' even though the mfem
@@ -324,4 +320,4 @@ class Ceed(BundlePackage, CudaPackage, ROCmPackage):
depends_on("hypre~internal-superlu", when="@1.0.0+mfem")
# If using gcc version <= 4.8 build suite-sparse version <= 5.1.0
- depends_on("suite-sparse@:5.1.0", when="@1.0.0%gcc@:4.8+mfem+petsc")
+ depends_on("suite-sparse@:5.1.0", when="@1.0.0%gcc@:4.8+mfem")
diff --git a/var/spack/repos/builtin/packages/celeritas/package.py b/var/spack/repos/builtin/packages/celeritas/package.py
index 89b273e296..b0e605ffc3 100644
--- a/var/spack/repos/builtin/packages/celeritas/package.py
+++ b/var/spack/repos/builtin/packages/celeritas/package.py
@@ -19,62 +19,36 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
license("Apache-2.0")
- version("0.4.1", sha256="24e5c15eb9eec45f52d94a6719ae3505388b49d409cb7e26c875c70ac409bd2c")
+ version("0.5.0", sha256="4a8834224d96fd01897e5872ac109f60d91ef0bd7b63fac05a73dcdb61a5530e")
version(
- "0.4.0",
- sha256="8b8eaef84641eeca0fc40321d358205fc9d51e3c6dc7bd1bf03218c1919c774e",
- deprecated=True,
- )
- version("0.3.2", sha256="65a33de2518716638375df259d9dfc4d68b821ba1110f56b24c823ef5c5df249")
- version(
- "0.3.1",
- sha256="0f1effab306856d66f5079e8cadcb63e8c1f8a79245b94bf44b89251b3fb0cf0",
- deprecated=True,
- )
- version(
- "0.3.0",
- sha256="f9620b6bcd8c9b5324ef215f8e44461f915c3fff47bf85ae442c9dafacaa79ac",
- deprecated=True,
- )
- version("0.2.2", sha256="ba5e341d636e00e3d7dbac13a2016b97014917489f46b8b387a2adf9d9563872")
- version(
- "0.2.1",
- sha256="b3717b43f70dd0da848139da4171ca7a887bb6777908845b6d953d47b1f4db41",
+ "0.4.4",
+ sha256="8b5ae63aa2d50c2ecf48d752424e4a33c50c07d9f0f5ca5448246de3286fd836",
deprecated=True,
)
version(
- "0.2.0",
- sha256="12af28fda0e482a9eba89781b4ead445cf6f170bc1b8d88cc814e49b1ec09e9f",
+ "0.4.3",
+ sha256="b4f603dce1dc9c4894ea4c86f6574026ea8536714982e7dc6dff7472c925c892",
deprecated=True,
)
- version("0.1.5", sha256="5e63b9ce7fcfe34a8938565b84453bce51fa6639d1ede13bb59d41de6431cef4")
version(
- "0.1.4",
- sha256="ea82a03fc750a2a805f87afd9ac944109dd7537edb5c0c370f93d332d4cd47db",
+ "0.4.2",
+ sha256="eeca9705413f5e16e0fb81154e042600c8df125af7049912757feb01d43730e2",
deprecated=True,
)
version(
- "0.1.3",
- sha256="992c49a48adba884fe3933c9624da5bf480ef0694809430ae98903f2c28cc881",
+ "0.4.1",
+ sha256="24e5c15eb9eec45f52d94a6719ae3505388b49d409cb7e26c875c70ac409bd2c",
deprecated=True,
)
version(
- "0.1.2",
- sha256="d123ea2e34267adba387d46bae8c9a1146a2e047f87f2ea5f823878c1684678d",
- deprecated=True,
- )
- version(
- "0.1.1",
- sha256="a1d58e29226e89a2330d69c40049d61e7c885cf991824e60ff8c9ccc95fc5ec6",
- deprecated=True,
- )
- version(
- "0.1.0",
- sha256="46692977b9b31d73662252cc122d7f016f94139475788bca7fdcb97279b93af8",
+ "0.4.0",
+ sha256="8b8eaef84641eeca0fc40321d358205fc9d51e3c6dc7bd1bf03218c1919c774e",
deprecated=True,
)
- _cxxstd_values = ("14", "17")
+ depends_on("cxx", type="build")
+
+ _cxxstd_values = ("17", "20")
# Note: cuda and rocm variants are defined by mixin classes
variant(
@@ -86,12 +60,12 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
)
variant("debug", default=False, description="Enable runtime debug assertions")
variant("doc", default=False, description="Build and install documentation")
- variant("geant4", default=True, description="Use Geant4 data")
+ variant("geant4", default=True, description="Enable Geant4 integration")
variant("hepmc3", default=True, description="Use HepMC3 I/O interfaces")
variant("openmp", default=False, description="Use OpenMP multithreading")
variant("root", default=False, description="Use ROOT I/O")
variant("shared", default=True, description="Build shared libraries")
- variant("swig", default=False, description="Generate SWIG Python bindings")
+ variant("swig", default=False, when="@:0.4", description="Generate SWIG Python bindings")
variant("vecgeom", default=True, description="Use VecGeom geometry")
depends_on("cmake@3.13:", type="build")
@@ -99,14 +73,12 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cmake@3.22:", type="build", when="+rocm")
depends_on("nlohmann-json")
- depends_on("geant4@10.5:", when="@0.3.1: +geant4")
- depends_on("geant4@10.6:", when="@0.3.0 +geant4")
- depends_on("geant4@10.6:11.0", when="@0.2.1:0.2 +geant4")
- depends_on("geant4@10.7:11.0", when="@:0.2.0 +geant4")
+ depends_on("geant4@10.5:", when="@0.4.2: +geant4")
+ depends_on("geant4@10.5:11.1", when="@0.3.1:0.4.1 +geant4")
depends_on("hepmc3", when="+hepmc3")
depends_on("root", when="+root")
depends_on("swig@4.1:", when="+swig")
- depends_on("vecgeom", when="+vecgeom")
+ depends_on("vecgeom@1.2.5:", when="+vecgeom")
depends_on("python", type="build")
depends_on("doxygen", type="build", when="+doc")
@@ -118,20 +90,11 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
depends_on("root cxxstd=" + _std, when="+root cxxstd=" + _std)
depends_on("vecgeom cxxstd=" + _std, when="+vecgeom cxxstd=" + _std)
- depends_on("vecgeom@1.2.5:", when="+vecgeom @0.4:")
- depends_on("vecgeom +gdml@1.1.17:1", when="+vecgeom @:0.3")
- depends_on("vecgeom +cuda", when="+vecgeom +cuda")
+ for _arch in CudaPackage.cuda_arch_values:
+ depends_on("vecgeom+cuda cuda_arch=" + _arch, when="+vecgeom +cuda cuda_arch=" + _arch)
- conflicts("cxxstd=14", when="@0.3:")
conflicts("+rocm", when="+cuda", msg="AMD and NVIDIA accelerators are incompatible")
conflicts("+rocm", when="+vecgeom", msg="HIP support is only available with ORANGE")
- conflicts("^vecgeom+shared@1.2.0", when="+vecgeom +cuda")
-
- patch(
- "https://patch-diff.githubusercontent.com/raw/celeritas-project/celeritas/pull/830.patch?full_index=1",
- sha256="9ac1929a95170b497aaac76f62146f313e4b31aea7271acac354270550d0d685",
- when="@0.3.0 ^geant4@10",
- )
def cmake_args(self):
define = self.define
diff --git a/var/spack/repos/builtin/packages/cellpose/package.py b/var/spack/repos/builtin/packages/cellpose/package.py
new file mode 100644
index 0000000000..046bd70370
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cellpose/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cellpose(PythonPackage):
+ """A generalist algorithm for cell and nucleus segmentation that can be optimized for
+ your own data"""
+
+ homepage = "https://cellpose.readthedocs.io/"
+ pypi = "cellpose/cellpose-2.2.3.tar.gz"
+
+ license("BSD-3-Clause", checked_by="A-N-Other")
+
+ version("2.2.3", sha256="7ff63cb60a154ce3c0a17ff05ed27d2aaaa1a24a4c7a8160c0a4c15443366618")
+
+ variant("gui", default=False, description="Build the GUI")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-pytest-runner", type="build")
+
+ depends_on("py-numpy@1.20.0:", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-natsort", type=("build", "run"))
+ depends_on("py-tifffile", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-numba@0.53.0:", type=("build", "run"))
+ depends_on("py-llvmlite", type=("build", "run"))
+ depends_on("py-torch@1.6:", type=("build", "run"))
+ # `copencv` provides `cv2` in place of opencv-python-headless specified in setup.py
+ # +ximgproc is required from the contrib modules
+ depends_on("opencv +python3+ximgproc", type=("build", "run"))
+ depends_on("py-fastremap", type=("build", "run"))
+ depends_on("py-imagecodecs", type=("build", "run"))
+ depends_on("py-roifile", type=("build", "run"))
+
+ depends_on("py-pyqtgraph@0.11.0:", type=("build", "run"), when="+gui")
+ depends_on("py-pyqt6", type=("build", "run"), when="+gui")
+ depends_on("py-pyqt6-sip", type=("build", "run"), when="+gui")
+ depends_on("py-qtpy", type=("build", "run"), when="+gui")
+ depends_on("py-superqt", type=("build", "run"), when="+gui")
+ depends_on("py-google-cloud-storage", type=("build", "run"), when="+gui")
diff --git a/var/spack/repos/builtin/packages/cellranger/package.py b/var/spack/repos/builtin/packages/cellranger/package.py
new file mode 100644
index 0000000000..31dded75e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cellranger/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cellranger(Package):
+ """Cellranger is a set of analysis pipelines that process Chromium single cell data to
+ align reads, generate feature-barcode matrices, perform clustering and other secondary
+ analysis, and more.
+
+ This package requires the user to accept a license and to download the tarball manually.
+ Once downloaded, the file should be placed within a manual mirror or within the current
+ directory. For instructions on making a manual mirror, see
+ https://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.10xgenomics.com/support/software/cell-ranger/latest"
+ manual_download = True
+ license_url = "support.10xgenomics.com/license"
+
+ version("7.2.0", sha256="b092bd4e3ab585ad051a231fbdd8f3f0f5cbcd10f657eeab86bec98cd594502c")
+ version("7.1.0", sha256="5c4f9b142e3c30ad10ae15d25868df2b4fd05bdb3bbd47da0c83a7cc649b577e")
+
+ # cellranger is distributed as precompiled binaries that are not compatible with
+ # processors without the avx instruction set ...
+ conflicts("target=:k10") # last AMD processor not to support avx
+ conflicts("target=:westmere") # last Intel processor not to support avx
+ conflicts("target=:x86_64_v2") # last generic architecture not to support avx
+
+ def url_for_version(self, version):
+ return "file://{0}/cellranger-{1}.tar.gz".format(os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/centrifuge/package.py b/var/spack/repos/builtin/packages/centrifuge/package.py
new file mode 100644
index 0000000000..ce7fea5f4a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/centrifuge/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Centrifuge(MakefilePackage):
+ """Classifier for metagenomic sequences."""
+
+ homepage = "https://ccb.jhu.edu/software/centrifuge/index.shtml"
+ url = "https://github.com/DaehwanKimLab/centrifuge/archive/refs/tags/v1.0.4.tar.gz"
+
+ version("1.0.4.1", sha256="638cc6701688bfdf81173d65fa95332139e11b215b2d25c030f8ae873c34e5cc")
+ version("1.0.4", sha256="929daed0f84739f7636cc1ea2757527e83373f107107ffeb5937a403ba5201bc")
+
+ depends_on("cxx", type="build") # generated
+
+ def build(self, spec, prefix):
+ make()
+
+ def install(self, spec, prefix):
+ make("install", "prefix=" + prefix)
diff --git a/var/spack/repos/builtin/packages/cepgen/package.py b/var/spack/repos/builtin/packages/cepgen/package.py
index c6a79f3fcb..061cfab7e5 100644
--- a/var/spack/repos/builtin/packages/cepgen/package.py
+++ b/var/spack/repos/builtin/packages/cepgen/package.py
@@ -21,6 +21,9 @@ class Cepgen(CMakePackage):
"1.0.2patch1", sha256="333bba0cb1965a98dec127e00c150eab1a515cd348a90f7b1d66d5cd8d206d21"
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
generator("ninja")
depends_on("cmake@3.5:", type="build", when="@1.0:")
diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py
index d7a5cc9aa1..4a0be30b46 100644
--- a/var/spack/repos/builtin/packages/cereal/package.py
+++ b/var/spack/repos/builtin/packages/cereal/package.py
@@ -33,6 +33,9 @@ class Cereal(CMakePackage):
version("1.0.0", sha256="51c31c84d4c9e410e56d8bfc3424076b3234f11aa349ac8cda3db9f18118c125")
version("0.9.1", sha256="2a99722df9c3d0f75267f732808a4d7e564cb5a35318a3d1c00086e2ef139385")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
patch("Boost.patch", when="@:1.3.0")
patch("Boost2.patch", when="@1.2.2:1.3.0")
patch("pointers.patch")
diff --git a/var/spack/repos/builtin/packages/ceres-solver/package.py b/var/spack/repos/builtin/packages/ceres-solver/package.py
index 5a8ac5db62..7c7af49a4b 100644
--- a/var/spack/repos/builtin/packages/ceres-solver/package.py
+++ b/var/spack/repos/builtin/packages/ceres-solver/package.py
@@ -24,6 +24,9 @@ class CeresSolver(CMakePackage):
version("1.14.0", sha256="4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e")
version("1.12.0", sha256="745bfed55111e086954126b748eb9efe20e30be5b825c6dec3c525cf20afc895")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("suitesparse", default=False, description="Build with SuiteSparse")
variant("shared", default=True, description="Build shared libraries")
variant("examples", default=False, description="Build examples")
@@ -49,17 +52,17 @@ class CeresSolver(CMakePackage):
]
)
- if "+suitesparse" in self.spec:
+ if self.spec.satisfies("+suitesparse"):
args.append("-DSUITESPARSE=ON")
else:
args.append("-DSUITESPARSE=OFF")
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
else:
args.append("-DBUILD_SHARED_LIBS=OFF")
- if "+examples" in self.spec:
+ if self.spec.satisfies("+examples"):
args.append("-DBUILD_EXAMPLES=ON")
else:
args.append("-DBUILD_EXAMPLES=OFF")
diff --git a/var/spack/repos/builtin/packages/cernlib/package.py b/var/spack/repos/builtin/packages/cernlib/package.py
index 8e69d753c7..8e7b812929 100644
--- a/var/spack/repos/builtin/packages/cernlib/package.py
+++ b/var/spack/repos/builtin/packages/cernlib/package.py
@@ -11,14 +11,21 @@ class Cernlib(CMakePackage):
"""CERN Library"""
homepage = "https://cernlib.web.cern.ch"
- url = "https://cernlib.web.cern.ch/cernlib/download/2022_source/tar/cernlib-2022.11.08.0-free.tar.gz"
+ url = "https://cernlib.web.cern.ch/download/2023_source/tar/cernlib-2023.08.14.0-free.tar.gz"
maintainers("andriish")
-
version(
"2022.11.08.0-free",
sha256="733d148415ef78012ff81f21922d3bf641be7514b0242348dd0200cf1b003e46",
)
+ version(
+ "2023.08.14.0-free",
+ sha256="7006475d9c38254cb94ce75e556a319fea3b3155087780ea522003103771474e",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("shared", default=True, description="Build shared libraries")
@@ -30,11 +37,17 @@ class Cernlib(CMakePackage):
depends_on("libxt")
depends_on("libxcrypt")
+ depends_on("xbae", when="@2023:")
+
depends_on("openssl", when="platform=linux")
- @when("@2022.11.08.0-free")
def patch(self):
- filter_file("crypto", "crypt", "packlib/CMakeLists.txt")
+ if self.spec.satisfies("@:2023.08.14.0-free"):
+ filter_file("crypto", "crypt", "packlib/CMakeLists.txt")
+ if self.spec.satisfies("@2023.08.14.0-free"):
+ filter_file(
+ r"\${MOTIF_LIBRARIES} \${Xbae}", "${Xbae} ${MOTIF_LIBRARIES}", "CMakeLists.txt"
+ )
def cmake_args(self):
args = [self.define_from_variant("CERNLIB_BUILD_SHARED", "shared")]
diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py
index e8d89e46ae..c8bc0ba5b7 100644
--- a/var/spack/repos/builtin/packages/cfitsio/package.py
+++ b/var/spack/repos/builtin/packages/cfitsio/package.py
@@ -16,6 +16,7 @@ class Cfitsio(AutotoolsPackage):
license("custom")
+ version("4.4.0", sha256="95900cf95ae760839e7cb9678a7b2fad0858d6ac12234f934bd1cb6bfc246ba9")
version("4.3.0", sha256="fdadc01d09cf9f54253802c5ec87eb10de51ce4130411415ae88c30940621b8b")
version("4.2.0", sha256="eba53d1b3f6e345632bb09a7b752ec7ced3d63ec5153a848380f3880c5d61889")
version("4.1.0", sha256="b367c695d2831958e7166921c3b356d5dfa51b1ecee505b97416ba39d1b6c17a")
@@ -28,6 +29,9 @@ class Cfitsio(AutotoolsPackage):
version("3.41", sha256="a556ac7ea1965545dcb4d41cfef8e4915eeb8c0faa1b52f7ff70870f8bb5734c")
version("3.37", sha256="092897c6dae4dfe42d91d35a738e45e8236aa3d8f9b3ffc7f0e6545b8319c63a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("bzip2", default=True, description="Enable bzip2 support")
variant("shared", default=True, description="Build shared libraries")
@@ -44,8 +48,8 @@ class Cfitsio(AutotoolsPackage):
def configure_args(self):
spec = self.spec
extra_args = []
- if "+bzip2" in spec:
- extra_args.append("--with-bzip2=%s" % spec["bzip2"].prefix),
+ if spec.satisfies("+bzip2"):
+ extra_args.append(f"--with-bzip2={spec['bzip2'].prefix}"),
return extra_args
@property
@@ -53,7 +57,7 @@ class Cfitsio(AutotoolsPackage):
targets = ["all"]
# Build shared if variant is set.
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
targets += ["shared"]
return targets
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
index 1a46f784af..1e1f61afa3 100644
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -17,8 +17,12 @@ class Cgal(CMakePackage):
homepage = "https://www.cgal.org/"
url = "https://github.com/CGAL/cgal/releases/download/v5.4.1/CGAL-5.4.1.tar.xz"
+ version("6.0.1", sha256="0acdfbf317c556630dd526f3253780f29b6ec9713ee92903e81b5c93c0f59b7f")
+ version("5.6", sha256="dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f")
+ version("5.5.3", sha256="0a04f662693256328b05babfabb5e3a5b7db2f5a58d52e3c520df9d0828ddd73")
version("5.5.2", sha256="b2b05d5616ecc69facdc24417cce0b04fb4321491d107db45103add520e3d8c3")
version("5.4.1", sha256="4c3dd7ee4d36d237111a4d72b6e14170093271595d5b695148532daa95323d76")
+ version("5.3.2", sha256="af917dbc550388ebcb206f774e610fbdb914d95a4b2932fa952279129103852b")
version("5.1.5", sha256="b1bb8a6053aa12baa5981aef20a542cd3e617a86826963fb8fb6852b1a0da97c")
version("5.0.3", sha256="e5a3672e35e5e92e3c1b4452cd3c1d554f3177dc512bd98b29edf21866a4288c")
version("5.0", sha256="e1e7e932988c5d149aa471c1afd69915b7603b5b31b9b317a0debb20ecd42dcc")
@@ -30,14 +34,24 @@ class Cgal(CMakePackage):
version("4.7", sha256="50bd0a1cad7a8957b09012f831eebaf7d670e2a3467e8f365ec0c71fa5436369")
version("4.6.3", sha256="e338027b8767c0a7a6e4fd8679182d1b83b5b1a0da0a1fe4546e7c0ca094fc21")
- variant("shared", default=True, description="Enables the build of shared libraries")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # @5: is header only and doesn't build shared libs
+ variant(
+ "shared", default=True, description="Enables the build of shared libraries", when="@:4.14"
+ )
+
variant(
"build_type",
default="Release",
description="The build type to build",
values=("Debug", "Release"),
)
- variant("header_only", default=False, description="Install in header only mode")
+
+ # header only is the default and only option for 5+
+ # https://doc.cgal.org/latest/Manual/installation.html
+ variant("header_only", default=False, description="Install in header only mode", when="@:4.13")
# ---- See "7 CGAL Libraries" at:
# https://doc.cgal.org/latest/Manual/installation.html
@@ -47,16 +61,32 @@ class Cgal(CMakePackage):
# https://cs.nyu.edu/exact/core_pages/svn-core.html
variant("core", default=False, description="Build the CORE library for algebraic numbers")
variant("imageio", default=False, description="Build utilities to read/write image files")
- variant("demos", default=False, description="Build CGAL demos")
+ variant("demos", default=False, description="Build CGAL demos", when="@:5")
variant("eigen", default=True, description="Build with Eigen support")
- depends_on("cmake@2.8.11:", type="build")
+ # Starting with cgal 6, GMP/MPFR are no longer mandatory and Core library
+ # is based on on Boost.Multiprecision. However, either GMP backend or Boost
+ # backend can be used. Downstream cmake users must also set -DCGAL_DISABLE_GMP=1
+ # or the macro CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND if GMP is disabled.
+ # This variant doesn't change how cgal is installed, but it does change spack to
+ # not depend on gmp & mpfr.
+ # More details here https://github.com/CGAL/cgal/issues/8606
+ variant("gmp", default=True, description="Enable the GMP backend", when="@6:")
+
+ # Upper bound follows CGAL's @6: CMakeLists.txt
+ depends_on("cmake@3.12:3.29", type="build", when="@6:")
+ depends_on("cmake@2.8.11:", type="build", when="@:5")
# Essential Third Party Libraries
depends_on("boost+exception+math+random+container", when="@5.0:")
+ depends_on("boost@1.72.0:+exception+math+random+container", when="@6:")
depends_on("boost+thread+system", when="@:5.0")
- depends_on("gmp")
- depends_on("mpfr")
+
+ depends_on("gmp", when="@:5")
+ depends_on("mpfr", when="@:5")
+
+ depends_on("gmp", when="@6: +gmp")
+ depends_on("mpfr", when="@6: +gmp")
# Required for CGAL_ImageIO
# depends_on('opengl', when='+imageio') # not yet in Spack
@@ -64,7 +94,10 @@ class Cgal(CMakePackage):
# Optional to build CGAL_Qt5 (demos)
# depends_on('opengl', when='+demos') # not yet in Spack
- depends_on("qt@5:", when="+demos")
+ depends_on("qt@5:", when="@:5 +demos")
+
+ # Demos are now based on qt6, but at the moment qt6 is not in spack
+ # depends_on("qt@6:", when="@6: +demos")
# Optional Third Party Libraries
depends_on("eigen", when="+eigen")
@@ -78,6 +111,24 @@ class Cgal(CMakePackage):
# depends_on('esbtl')
# depends_on('intel-tbb')
+ # @6: requires C++17 or later. The table gives tested
+ # compilers, so use the lwoer limit of that as the bounds
+ # https://www.cgal.org/2024/10/22/cgal601/
+ with when("@6:"):
+ # Gnu g++ 11.4.0 or later (on Linux or macOS)
+ conflicts("%gcc @:11.3.0", when="platform=darwin")
+ conflicts("%gcc @:11.3.0", when="platform=linux")
+
+ # LLVM Clang version 15.0.7 or later (on Linux)
+ conflicts("%clang @:15.0.6", when="platform=linux")
+
+ # Apple Clang compiler versions 10.0.1, 12.0.5, and 15.0.0 (on macOS)
+ # (10+ has C++17 support)
+ conflicts("%apple-clang @:10.0.0", when="platform=darwin")
+
+ # Visual C++ 15.9 or later
+ conflicts("%msvc @:15.8", when="platform=windows")
+
conflicts(
"~header_only",
when="@:4.9",
@@ -99,7 +150,7 @@ class Cgal(CMakePackage):
env.set("BOOST_INCLUDEDIR", spec["boost"].headers.directories[0])
env.set("BOOST_LIBRARYDIR", spec["boost"].libs.directories[0])
- if "+eigen" in spec:
+ if spec.satisfies("+eigen"):
env.set("EIGEN3_INC_DIR", spec["eigen"].headers.directories[0])
def cmake_args(self):
@@ -114,7 +165,13 @@ class Cgal(CMakePackage):
cmake_args.append("-DWITH_CGAL_ImageIO:BOOL=%s" % variant_bool("+imageio"))
cmake_args.append("-DWITH_CGAL_Qt5:BOOL=%s" % variant_bool("+demos"))
+ if spec.satisfies("@6:"):
+ cmake_args.append("-DCXX_STANDARD=17")
+
if spec.satisfies("@4.9:"):
cmake_args.append("-DCGAL_HEADER_ONLY:BOOL=%s" % variant_bool("+header_only"))
+ if spec.satisfies("~gmp"):
+ cmake_args.append("-DCGAL_DISABLE_GMP:BOOL=1")
+
return cmake_args
diff --git a/var/spack/repos/builtin/packages/cgdb/package.py b/var/spack/repos/builtin/packages/cgdb/package.py
index 73a8ff07ea..0118b6d6ec 100644
--- a/var/spack/repos/builtin/packages/cgdb/package.py
+++ b/var/spack/repos/builtin/packages/cgdb/package.py
@@ -20,6 +20,9 @@ class Cgdb(AutotoolsPackage):
version("0.7.1", sha256="bb723be58ec68cb59a598b8e24a31d10ef31e0e9c277a4de07b2f457fe7de198")
version("0.7.0", sha256="bf7a9264668db3f9342591b08b2cc3bbb08e235ba2372877b4650b70c6fb5423")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Required dependency
depends_on("gdb", type="run")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/cgdcbxd/package.py b/var/spack/repos/builtin/packages/cgdcbxd/package.py
index c372afeed1..e86d1e3bdb 100644
--- a/var/spack/repos/builtin/packages/cgdcbxd/package.py
+++ b/var/spack/repos/builtin/packages/cgdcbxd/package.py
@@ -19,6 +19,8 @@ class Cgdcbxd(AutotoolsPackage):
version("1.0.2", sha256="ef626c60e27005d3cae1e19a60d0133be0d1f0a012b695f7f1f6ad5a2afa4166")
version("1.0.1", sha256="663b87a5ab4a760e2446e479fec36f6300d53e6113af1408efc156325219900c")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/cgl/package.py b/var/spack/repos/builtin/packages/cgl/package.py
index 75a1f586c3..5e417aa77a 100644
--- a/var/spack/repos/builtin/packages/cgl/package.py
+++ b/var/spack/repos/builtin/packages/cgl/package.py
@@ -17,14 +17,17 @@ class Cgl(AutotoolsPackage):
homepage = "https://projects.coin-or.org/Cgl"
url = "https://github.com/coin-or/Cgl/archive/releases/0.60.3.tar.gz"
- depends_on("coinutils")
- depends_on("osi")
- depends_on("clp")
-
license("EPL-2.0")
+ version("0.60.8", sha256="1482ba38afb783d124df8d5392337f79fdd507716e9f1fb6b98fc090acd1ad96")
version("0.60.7", sha256="93b30a80b5d2880c2e72d5877c64bdeaf4d7c1928b3194ea2f88b1aa4517fb1b")
version("0.60.6", sha256="9e2c51ffad816ab408763d6b931e2a3060482ee4bf1983148969de96d4b2c9ce")
version("0.60.3", sha256="cfeeedd68feab7c0ce377eb9c7b61715120478f12c4dd0064b05ad640e20f3fb")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("coinutils")
+ depends_on("osi")
+ depends_on("clp")
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py
index 88d9335db6..d3cfeff804 100644
--- a/var/spack/repos/builtin/packages/cgm/package.py
+++ b/var/spack/repos/builtin/packages/cgm/package.py
@@ -19,6 +19,8 @@ class Cgm(AutotoolsPackage):
version("13.1.0", sha256="c81bead4b919bd0cea9dbc61b219e316718d940bd3dc70825c58efbf0a0acdc3")
version("13.1", sha256="985aa6c5db4257999af6f2bdfcb24f2bce74191cdcd98e937700db7fd9f6b549")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="enable mpi support")
variant("oce", default=False, description="enable oce geometry kernel")
variant("debug", default=False, description="enable debug symbols")
@@ -31,7 +33,7 @@ class Cgm(AutotoolsPackage):
spec = self.spec
args = []
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.extend(
[
"--with-mpi",
@@ -42,15 +44,15 @@ class Cgm(AutotoolsPackage):
else:
args.append("--without-mpi")
- if "+oce" in spec:
+ if spec.satisfies("+oce"):
args.append("--with-occ={0}".format(spec["oce"].prefix))
else:
args.append("--without-occ")
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
args.append("--enable-debug")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
args.append("--enable-shared")
return args
diff --git a/var/spack/repos/builtin/packages/cgns/gcc14.patch b/var/spack/repos/builtin/packages/cgns/gcc14.patch
new file mode 100644
index 0000000000..62f9bd2e1f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cgns/gcc14.patch
@@ -0,0 +1,50 @@
+From: Mickael Philit <mickey.phy@gmail.com>
+Date: Sun, 3 Mar 2024 20:54:39 +0100
+Subject: [PATCH] backport gcc14 fedora patch
+
+---
+ src/cgnstools/tkogl/gencyl.c | 4 ++--
+ src/cgnstools/tkogl/tkogl.c | 8 +++++++-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cgnstools/tkogl/gencyl.c b/src/cgnstools/tkogl/gencyl.c
+index cc36c4ba6..b64d777f4 100644
+--- a/src/cgnstools/tkogl/gencyl.c
++++ b/src/cgnstools/tkogl/gencyl.c
+@@ -682,8 +682,8 @@ RenderModel (Model* model)
+ Vector normal;
+ GLdouble v [3];
+ obj = gluNewTess();
+- gluTessCallback(obj, GLU_BEGIN, glBegin);
+- gluTessCallback(obj, GLU_VERTEX, glVertex3fv);
++ gluTessCallback(obj, GLU_BEGIN, (_GLUfuncptr)glBegin);
++ gluTessCallback(obj, GLU_VERTEX, (_GLUfuncptr)glVertex3fv);
+ gluTessCallback(obj, GLU_END, glEnd);
+ if (flags&CLOSE_FIRST) {
+ CrossSection *a = model->cross [0];
+diff --git a/src/cgnstools/tkogl/tkogl.c b/src/cgnstools/tkogl/tkogl.c
+index e697e735e..506599d54 100644
+--- a/src/cgnstools/tkogl/tkogl.c
++++ b/src/cgnstools/tkogl/tkogl.c
+@@ -22,6 +22,12 @@
+ #include "printstr.h"
+ #include "feedback.h"
+
++#if ! defined(__WIN32__) && ! defined(_WIN32)
++/* For TkWmAddToColormapWindows. */
++#define _TKPORT /* Typical installations cannot find tkPort.h. */
++#include <tkInt.h>
++#endif
++
+ #ifndef CONST
+ # define CONST
+ #endif
+@@ -599,7 +605,7 @@ OGLwinCmd(clientData, interp, argc, argv)
+
+ if ((Tk_Parent(tkwin) != NULL) &&
+ (Tk_Colormap(tkwin) != Tk_Colormap (Tk_Parent(tkwin)))) {
+- TkWmAddToColormapWindows(tkwin);
++ TkWmAddToColormapWindows((TkWindow *)tkwin);
+ }
+
+ /* See if this window will share display lists with another */
diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py
index 2036a78098..b2eabeb52c 100644
--- a/var/spack/repos/builtin/packages/cgns/package.py
+++ b/var/spack/repos/builtin/packages/cgns/package.py
@@ -7,6 +7,8 @@ import sys
from spack.package import *
+is_windows = sys.platform == "win32"
+
class Cgns(CMakePackage):
"""The CFD General Notation System (CGNS) provides a general, portable,
@@ -36,6 +38,9 @@ class Cgns(CMakePackage):
version("3.3.1", sha256="81093693b2e21a99c5640b82b267a495625b663d7b8125d5f1e9e7aaa1f8d469")
version("3.3.0", sha256="8422c67994f8dc6a2f201523a14f6c7d7e16313bdd404c460c16079dbeafc662")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
variant("hdf5", default=True, description="Enable HDF5 interface")
variant("fortran", default=False, description="Enable Fortran interface")
variant("base_scope", default=False, description="Enable base scope")
@@ -71,6 +76,11 @@ class Cgns(CMakePackage):
# https://bugs.gentoo.org/662210
patch("no-matherr.patch", when="@:3.3.1 +tools")
+ # patch for gcc14 due to using internal tk type/function,
+ # copied from https://github.com/CGNS/CGNS/pull/757
+ # (adjusted an include from tk-private/generic/tkInt.h to tkInt.h)
+ patch("gcc14.patch", when="@:4.4.0 %gcc@14:")
+
def cmake_args(self):
spec = self.spec
options = []
@@ -93,17 +103,17 @@ class Cgns(CMakePackage):
]
)
- if "+mpi" in spec:
+ if "+mpi" in spec and not is_windows:
options.extend(
[
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
"-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
]
)
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
options.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc))
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
options.extend(
[
"-DCGNS_ENABLE_HDF5:BOOL=ON",
@@ -112,7 +122,7 @@ class Cgns(CMakePackage):
"-DHDF5_LIBRARY_DIR:PATH=%s" % spec["hdf5"].prefix.lib,
]
)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.extend(["-DHDF5_NEED_MPI:BOOL=ON", "-DHDF5_ENABLE_PARALLEL:BOOL=ON"])
else:
options.extend(["-DCGNS_ENABLE_HDF5=OFF"])
diff --git a/var/spack/repos/builtin/packages/cgsi-gsoap/package.py b/var/spack/repos/builtin/packages/cgsi-gsoap/package.py
new file mode 100644
index 0000000000..954659e771
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cgsi-gsoap/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class CgsiGsoap(CMakePackage):
+ """Client and server side library to secure gSOAP
+ using the Globus Security Infrastructure."""
+
+ homepage = "https://github.com/cern-fts/cgsi-gsoap"
+ url = "https://github.com/cern-fts/cgsi-gsoap/archive/refs/tags/v1.3.12.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.3.12", sha256="ebb141ea7fe6d883ebeca031b4f2e3697895efb8fde55ee214128d5ca37e13e4")
+
+ depends_on("c", type="build")
+
+ depends_on("pkg-config", type="build")
+ depends_on("gsoap")
+ depends_on("voms")
+ depends_on("globus-common")
+ depends_on("globus-gssapi-gsi")
+ depends_on("globus-gss-assist")
+ depends_on("globus-gsi-cert-utils")
+ depends_on("globus-gsi-credential")
+ depends_on("globus-openssl-module")
diff --git a/var/spack/repos/builtin/packages/chaco/package.py b/var/spack/repos/builtin/packages/chaco/package.py
index 08f4ade013..e1b76a7ce0 100644
--- a/var/spack/repos/builtin/packages/chaco/package.py
+++ b/var/spack/repos/builtin/packages/chaco/package.py
@@ -19,6 +19,9 @@ class Chaco(CMakePackage):
version("develop", branch="truchas")
version("2020-07-16", commit="92a877b381933d12b02507413897f696d81b4682", preferred=True)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="build shared library")
depends_on("cmake@3.16:", type="build")
diff --git a/var/spack/repos/builtin/packages/chai/change_mpi_target_name_umpire_patch.patch b/var/spack/repos/builtin/packages/chai/change_mpi_target_name_umpire_patch.patch
new file mode 100644
index 0000000000..ca866408aa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/chai/change_mpi_target_name_umpire_patch.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/thirdparty/SetupChaiThirdparty.cmake b/cmake/thirdparty/SetupChaiThirdparty.cmake
+index d0be864..a8b33f0 100644
+--- a/cmake/thirdparty/SetupChaiThirdparty.cmake
++++ b/cmake/thirdparty/SetupChaiThirdparty.cmake
+@@ -12,7 +12,7 @@ if (NOT TARGET umpire)
+ find_package(umpire REQUIRED)
+
+ if (ENABLE_MPI)
+- set(UMPIRE_DEPENDS mpi)
++ set(UMPIRE_DEPENDS MPI::MPI_CXX)
+ else()
+ set(UMPIRE_DEPENDS)
+ endif()
diff --git a/var/spack/repos/builtin/packages/chai/package.py b/var/spack/repos/builtin/packages/chai/package.py
index 58ae1fca15..9529daaca5 100644
--- a/var/spack/repos/builtin/packages/chai/package.py
+++ b/var/spack/repos/builtin/packages/chai/package.py
@@ -7,6 +7,8 @@ import socket
from spack.package import *
+from .blt import llnl_link_helpers
+
class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
"""
@@ -17,12 +19,47 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/CHAI.git"
tags = ["ecp", "e4s", "radiuss"]
- maintainers("davidbeckingsale")
+ maintainers("davidbeckingsale", "adayton1", "adrienbernede")
license("BSD-3-Clause")
version("develop", branch="develop", submodules=False)
- version("main", branch="main", submodules=False)
+ version(
+ "2024.07.0",
+ tag="v2024.07.0",
+ commit="df7741f1dbbdc5fff5f7d626151fdf1904e62b19",
+ submodules=False,
+ )
+ version(
+ "2024.02.2",
+ tag="v2024.02.2",
+ commit="5ba0944d862513f600432c34b009824875df27e5",
+ submodules=False,
+ )
+ version(
+ "2024.02.1",
+ tag="v2024.02.1",
+ commit="7597134729bd3a38b45b67b4dfbf7f199d8106f3",
+ submodules=False,
+ )
+ version(
+ "2024.02.0",
+ tag="v2024.02.0",
+ commit="31773a2f0d30f3f64c82939f60fc4da32cf33261",
+ submodules=False,
+ )
+ version(
+ "2023.06.0",
+ tag="v2023.06.0",
+ commit="6fe3470ad020303530af2f3dbbfe18826bd3319b",
+ submodules=False,
+ )
+ version(
+ "2022.10.0",
+ tag="v2022.10.0",
+ commit="9510efd33b06e4443b15447eebb7dad761822654",
+ submodules=False,
+ )
version(
"2022.03.0",
tag="v2022.03.0",
@@ -61,36 +98,68 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
)
version("1.0", tag="v1.0", commit="501a098ad879dc8deb4a74fcfe8c08c283a10627", submodules=True)
+ depends_on("cxx", type="build") # generated
+
+ # Patching Umpire for dual BLT targets import changed MPI target name in Umpire link interface
+ # We propagate the patch here.
+ patch("change_mpi_target_name_umpire_patch.patch", when="@2022.10.0:2023.06.0")
+
variant("enable_pick", default=False, description="Enable pick method")
+ variant(
+ "separable_compilation",
+ default=True,
+ description="Build with CUDA_SEPARABLE_COMPILATION flag on ",
+ )
variant("shared", default=True, description="Build Shared Libs")
+ variant("mpi", default=False, description="Enable MPI support")
variant("raja", default=False, description="Build plugin for RAJA")
- variant("benchmarks", default=False, description="Build benchmarks.")
variant("examples", default=True, description="Build examples.")
variant("openmp", default=False, description="Build using OpenMP")
# TODO: figure out gtest dependency and then set this default True
# and remove the +tests conflict below.
- variant("tests", default=False, description="Build tests")
+ variant(
+ "tests",
+ default="none",
+ values=("none", "basic", "benchmarks"),
+ multi=False,
+ description="Tests to run",
+ )
- depends_on("cmake@3.8:", type="build")
+ depends_on("cmake", type="build")
+ depends_on("cmake@3.23:", type="build", when="@2024.07.0:")
+ depends_on("cmake@3.14:", type="build", when="@2022.03.0:2024.2")
depends_on("cmake@3.9:", type="build", when="+cuda")
- depends_on("cmake@3.14:", when="@2022.03.0:")
+ depends_on("cmake@3.8:", type="build")
- depends_on("blt@0.5.0:", type="build", when="@2022.03.0:")
- depends_on("blt@0.4.1:", type="build", when="@2.4.0:")
- depends_on("blt@0.4.0:", type="build", when="@2.3.0")
- depends_on("blt@0.3.6:", type="build", when="@:2.2.2")
+ depends_on("blt", type="build")
+ depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
+ depends_on("blt@0.6.1", type="build", when="@2024.02.0")
+ depends_on("blt@0.5.3", type="build", when="@2023.06.0")
+ depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.0")
+ depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0")
+ depends_on("blt@0.4.1:0.5.3", type="build", when="@2.4.0")
+ depends_on("blt@0.4.0:0.5.3", type="build", when="@2.3.0")
+ depends_on("blt@0.3.6:0.5.3", type="build", when="@:2.2.2")
conflicts("^blt@:0.3.6", when="+rocm")
depends_on("umpire")
- depends_on("umpire@2022.03.0:", when="@2022.03.0:")
+ depends_on("umpire@2024.07.0:", when="@2024.07.0:")
+ depends_on("umpire@2024.02.1", when="@2024.02.1")
+ depends_on("umpire@2024.02.0", when="@2024.02.0")
+ depends_on("umpire@2023.06.0", when="@2023.06.0")
+ depends_on("umpire@2022.10.0:2023.06.0", when="@2022.10.0")
+ depends_on("umpire@2022.03.0:2023.06.0", when="@2022.03.0")
depends_on("umpire@6.0.0", when="@2.4.0")
depends_on("umpire@4.1.2", when="@2.2.0:2.3.0")
- depends_on("umpire@main", when="@main")
+
+ depends_on("umpire+mpi", when="+mpi")
with when("+cuda"):
depends_on("umpire+cuda")
for sm_ in CudaPackage.cuda_arch_values:
depends_on("umpire+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+ with when("@2024.02.0:"):
+ depends_on("umpire~fmt_header_only")
with when("+rocm"):
depends_on("umpire+rocm")
@@ -102,11 +171,16 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
with when("+raja"):
depends_on("raja~openmp", when="~openmp")
depends_on("raja+openmp", when="+openmp")
+ depends_on("raja@2024.07.0:", when="@2024.07.0:")
+ depends_on("raja@2024.02.2", when="@2024.02.2")
+ depends_on("raja@2024.02.1", when="@2024.02.1")
+ depends_on("raja@2024.02.0", when="@2024.02.0")
+ depends_on("raja@2023.06.0", when="@2023.06.0")
+ depends_on("raja@2022.10.0:2023.06.0", when="@2022.10.0")
+ depends_on("raja@2022.03.0:2023.06.0", when="@2022.03.0")
depends_on("raja@0.14.0", when="@2.4.0")
depends_on("raja@0.13.0", when="@2.3.0")
depends_on("raja@0.12.0", when="@2.2.0:2.2.2")
- depends_on("raja@2022.03.0:", when="@2022.03.0:")
- depends_on("raja@main", when="@main")
with when("+cuda"):
depends_on("raja+cuda")
@@ -120,7 +194,7 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
when="amdgpu_target={0}".format(arch),
)
- conflicts("+benchmarks", when="~tests")
+ depends_on("mpi", when="+mpi")
def _get_sys_type(self, spec):
sys_type = spec.architecture
@@ -133,79 +207,109 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
hostname = socket.gethostname()
if "SYS_TYPE" in env:
hostname = hostname.rstrip("1234567890")
- return "{0}-{1}-{2}@{3}.cmake".format(
+ return "{0}-{1}-{2}@{3}-{4}.cmake".format(
hostname,
self._get_sys_type(self.spec),
self.spec.compiler.name,
self.spec.compiler.version,
+ self.spec.dag_hash(8),
)
def initconfig_compiler_entries(self):
spec = self.spec
+ compiler = self.compiler
+ # Default entries are already defined in CachedCMakePackage, inherit them:
entries = super().initconfig_compiler_entries()
- if "+rocm" in spec:
+
+ if spec.satisfies("+rocm"):
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+
+ llnl_link_helpers(entries, spec, compiler)
+
return entries
def initconfig_hardware_entries(self):
spec = self.spec
entries = super().initconfig_hardware_entries()
- entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
+ entries.append("#------------------{0}".format("-" * 30))
+ entries.append("# Package custom hardware settings")
+ entries.append("#------------------{0}\n".format("-" * 30))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
entries.append(cmake_cache_option("ENABLE_CUDA", True))
- entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
- entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
-
- if not spec.satisfies("cuda_arch=none"):
- cuda_arch = spec.variants["cuda_arch"].value
- entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0])))
- entries.append(
- cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0]))
- )
- flag = "-arch sm_{0}".format(cuda_arch[0])
- entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", "{0}".format(flag)))
+ if spec.satisfies("+separable_compilation"):
+ entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
+ entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
else:
entries.append(cmake_cache_option("ENABLE_CUDA", False))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
entries.append(cmake_cache_option("ENABLE_HIP", True))
- entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
- archs = self.spec.variants["amdgpu_target"].value
- if archs != "none":
- arch_str = ",".join(archs)
- entries.append(
- cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
- )
else:
entries.append(cmake_cache_option("ENABLE_HIP", False))
return entries
+ def initconfig_mpi_entries(self):
+ spec = self.spec
+
+ entries = super(Chai, self).initconfig_mpi_entries()
+ entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
+
+ return entries
+
def initconfig_package_entries(self):
spec = self.spec
entries = []
option_prefix = "CHAI_" if spec.satisfies("@2022.03.0:") else ""
+ # TPL locations
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# TPLs")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ # - BLT
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
- if "+raja" in spec:
+
+ # - RAJA
+ if spec.satisfies("+raja"):
entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), True))
entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix))
+ else:
+ entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), False))
+
+ # - Umpire
+ entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix))
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
+
+ # Generic options that have a prefixed equivalent in CHAI CMake
+ entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
+ entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
+ entries.append(cmake_cache_option("ENABLE_DOCS", False))
+ if spec.satisfies("tests=benchmarks"):
+ # BLT requires ENABLE_TESTS=True to enable benchmarks
+ entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True))
+ entries.append(cmake_cache_option("ENABLE_TESTS", True))
+ else:
+ entries.append(cmake_cache_option("ENABLE_TESTS", not spec.satisfies("tests=none")))
+
+ # Prefixed options that used to be name without one
entries.append(
- cmake_cache_option("{}ENABLE_PICK".format(option_prefix), "+enable_pick" in spec)
- )
- entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix.share.umpire.cmake))
- entries.append(cmake_cache_option("ENABLE_TESTS", "+tests" in spec))
- entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "+benchmarks" in spec))
- entries.append(
- cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
+ cmake_cache_option(
+ "{}ENABLE_PICK".format(option_prefix), spec.satisfies("+enable_pick")
+ )
)
- entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
return entries
def cmake_args(self):
- options = []
- return options
+ return []
diff --git a/var/spack/repos/builtin/packages/chameleon/package.py b/var/spack/repos/builtin/packages/chameleon/package.py
index 5f9c8451ab..a6af23d186 100644
--- a/var/spack/repos/builtin/packages/chameleon/package.py
+++ b/var/spack/repos/builtin/packages/chameleon/package.py
@@ -19,6 +19,10 @@ class Chameleon(CMakePackage, CudaPackage):
version("1.2.0", sha256="b8988ecbff19c603ae9f61441653c21bba18d040bee9bb83f7fc9077043e50b4")
version("1.1.0", sha256="e64d0438dfaf5effb3740e53f3ab017d12744b85a138b2ef702a81df559126df")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# cmake's specific
variant("shared", default=True, description="Build chameleon as a shared library")
@@ -110,14 +114,14 @@ class Chameleon(CMakePackage, CudaPackage):
)
if spec.satisfies("~simgrid"):
- if "^intel-mkl" in spec or "^intel-parallel-studio+mkl" in spec:
- if "threads=none" in spec:
+ if spec.satisfies("^intel-mkl") or spec.satisfies("^intel-parallel-studio+mkl"):
+ if spec.satisfies("threads=none"):
args.extend([self.define("BLA_VENDOR", "Intel10_64lp_seq")])
else:
args.extend([self.define("BLA_VENDOR", "Intel10_64lp")])
- elif "^netlib-lapack" in spec:
+ elif spec.satisfies("^netlib-lapack"):
args.extend([self.define("BLA_VENDOR", "Generic")])
- elif "^openblas" in spec:
+ elif spec.satisfies("^openblas"):
args.extend([self.define("BLA_VENDOR", "OpenBLAS")])
return args
diff --git a/var/spack/repos/builtin/packages/changa/fix_makefile.patch b/var/spack/repos/builtin/packages/changa/fix_makefile.patch
new file mode 100644
index 0000000000..40235f21bf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/changa/fix_makefile.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in 2024-07-17 19:21:06.292521857 +0200
++++ b/Makefile.in 2024-07-17 19:29:45.896742764 +0200
+@@ -236,7 +236,7 @@
+ $(compile-c)
+
+ $(build_dir)/cha_commitid.c: force
+- $(quiet) VER=`cd $(source_dir) && git describe --long --always` && \
++ $(quiet) VER="3.5" && \
+ echo "const char * const Cha_CommitID = \"$$VER\";" > $(build_dir)/cha_commitid.c
+
+ $(ci_files): $(build_dir)/settings
diff --git a/var/spack/repos/builtin/packages/changa/package.py b/var/spack/repos/builtin/packages/changa/package.py
index 43b55a6a85..f3cce60c0b 100644
--- a/var/spack/repos/builtin/packages/changa/package.py
+++ b/var/spack/repos/builtin/packages/changa/package.py
@@ -6,15 +6,10 @@
from spack.package import *
-class Changa(AutotoolsPackage):
+class Changa(AutotoolsPackage, CudaPackage):
"""ChaNGa (Charm N-body GrAvity solver) is a code to perform collisionless
- N-body simulations. It can perform cosmological simulations with periodic
- boundary conditions in comoving coordinates or simulations of isolated
- stellar systems. It also can include hydrodynamics using the Smooth
- Particle Hydrodynamics (SPH) technique. It uses a Barnes-Hut tree to
- calculate gravity, with hexadecapole expansion of nodes and
- Ewald summation for periodic forces. Timestepping is done with a leapfrog
- integrator with individual timesteps for each particle."""
+ N-body simulations.
+ """
homepage = "https://faculty.washington.edu/trq/hpcc/tools/changa.html"
url = "https://github.com/N-BodyShop/changa/archive/v3.4.tar.gz"
@@ -23,21 +18,50 @@ class Changa(AutotoolsPackage):
license("GPL-2.0-or-later")
version("master", branch="master")
+ version("3.5", sha256="8c49ab5b540a8adb23d3eaa80942621e5ac83244918e66c87886c9d3fb463d39")
version("3.4", sha256="c2bceb6ac00025dfd704bb6960bc17c6df7c746872185845d1e75f47e6ce2a94")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
patch("fix_configure_path.patch")
+ # Version 3.5 assumes to have a git repository available to compute the current version
+ # using `git describe ...` Since we are installing from the release tarball, hardcode
+ # the version to 3.5
+ patch("fix_makefile.patch", when="@3.5")
resource(
name="utility",
url="https://github.com/N-BodyShop/utility/archive/v3.4.tar.gz",
sha256="19f9f09023ce9d642e848a36948788fb29cd7deb8e9346cdaac4c945f1416667",
placement="utility",
+ when="@3.4",
+ )
+
+ resource(
+ name="utility",
+ git="https://github.com/N-BodyShop/utility.git",
+ commit="f947639f78162a68d697195e6963328f2665bf44",
+ placement="utility",
+ when="@3.5",
)
depends_on("charmpp build-target=ChaNGa")
+ depends_on("charmpp +cuda", when="+cuda")
+ depends_on("libjpeg")
+ depends_on("zlib-api")
+
+ parallel = False
+
+ def setup_build_environment(self, env):
+ env.set("CHARM_DIR", self.spec["charmpp"].prefix)
def configure_args(self):
- args = []
- args.append("STRUCT_DIR={0}/utility/structures".format(self.stage.source_path))
+ args = [f"STRUCT_DIR={self.stage.source_path}/utility/structures"]
+ if "avx" in self.spec.target:
+ args.append("--enable-arch=avx")
+ if self.spec.satisfies("+cuda"):
+ args.append(f"--with-cuda={self.spec['cuda'].prefix}")
return args
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/channelflow/package.py b/var/spack/repos/builtin/packages/channelflow/package.py
index 1f0cb9fa89..ca802875cd 100644
--- a/var/spack/repos/builtin/packages/channelflow/package.py
+++ b/var/spack/repos/builtin/packages/channelflow/package.py
@@ -19,6 +19,8 @@ class Channelflow(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libs")
variant("mpi", default=True, description="Enable MPI parallelism")
variant("hdf5", default=True, description="Enable support for HDF5 I/O")
@@ -74,7 +76,7 @@ class Channelflow(CMakePackage):
args.append("-DWITH_NETCDF:STRING={0}".format(netcdf_str[spec.variants["netcdf"].value]))
# Set an MPI compiler for parallel builds
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append("-DCMAKE_CXX_COMPILER:PATH={0}".format(spec["mpi"].mpicxx))
return args
diff --git a/var/spack/repos/builtin/packages/chaparral/package.py b/var/spack/repos/builtin/packages/chaparral/package.py
index 050ca651d4..ff55533b11 100644
--- a/var/spack/repos/builtin/packages/chaparral/package.py
+++ b/var/spack/repos/builtin/packages/chaparral/package.py
@@ -19,6 +19,8 @@ class Chaparral(CMakePackage):
version("develop", branch="truchas")
version("2020-08-28", commit="c8a190bb74ef33ad8b2f7b67d20590f393fde32a", preferred=True)
+ depends_on("c", type="build") # generated
+
variant("shared", default=True, description="Build shared library")
variant("mpi", default=True, description="Build parallel library")
diff --git a/var/spack/repos/builtin/packages/chapel/fix_spack_cc_wrapper_in_cray_prgenv.patch b/var/spack/repos/builtin/packages/chapel/fix_spack_cc_wrapper_in_cray_prgenv.patch
new file mode 100644
index 0000000000..b53b7f2c26
--- /dev/null
+++ b/var/spack/repos/builtin/packages/chapel/fix_spack_cc_wrapper_in_cray_prgenv.patch
@@ -0,0 +1,22 @@
+diff --git a/util/chplenv/chpl_llvm.py b/util/chplenv/chpl_llvm.py
+index f0fd495f28..95dc9c3f67 100755
+--- a/util/chplenv/chpl_llvm.py
++++ b/util/chplenv/chpl_llvm.py
+@@ -866,13 +866,14 @@ def get_clang_prgenv_args():
+ os.environ['PE_CHAPEL_PKGCONFIG_LIBS'] = gather_pe_chpl_pkgconfig_libs()
+
+ # Use cc --cray-print-opts=... to get arguments from compiler driver
+-
++ # find the actual cc in case something like spack has wrapped it
++ real_cc = os.path.join(os.environ["CRAYPE_DIR"], "bin", "cc")
+ # Get compilation arguments
+- opts = run_command(['cc', '--cray-print-opts=cflags'])
++ opts = run_command([real_cc, '--cray-print-opts=cflags'])
+ comp_args.extend(opts.split())
+
+ # Get link arguments
+- opts = run_command(['cc', '--cray-print-opts=libs'])
++ opts = run_command([real_cc, '--cray-print-opts=libs'])
+ link_args.extend(opts.split())
+
+ return (comp_args, link_args)
diff --git a/var/spack/repos/builtin/packages/chapel/package.py b/var/spack/repos/builtin/packages/chapel/package.py
index feedd735d1..3e8693c787 100644
--- a/var/spack/repos/builtin/packages/chapel/package.py
+++ b/var/spack/repos/builtin/packages/chapel/package.py
@@ -3,24 +3,898 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+import subprocess
+
+import llnl.util.lang
+
+import spack.platforms
+import spack.platforms.cray
from spack.package import *
+from spack.util.environment import is_system_path, set_env
+
+
+@llnl.util.lang.memoized
+def is_CrayEX():
+ # Credit to upcxx package for this hpe-cray-ex detection function
+ if spack.platforms.host().name == "linux":
+ target = os.environ.get("CRAYPE_NETWORK_TARGET")
+ if target in ["ofi", "ucx"]: # normal case
+ return True
+ elif target is None: # but some systems lack Cray PrgEnv
+ fi_info = which("fi_info")
+ if (
+ fi_info
+ and fi_info("-l", output=str, error=str, fail_on_error=False).find("cxi") >= 0
+ ):
+ return True
+ return False
-class Chapel(AutotoolsPackage):
+class Chapel(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Chapel is a modern programming language that is parallel, productive,
- portable, scalable and open-source."""
+ portable, scalable and open-source. The Chapel package comes with many
+ options in the form of variants, most of which can be left unset to allow
+ Chapel's built-in scripts to determine the proper values based on the environment."""
homepage = "https://chapel-lang.org/"
- url = "https://github.com/chapel-lang/chapel/releases/download/1.24.1/chapel-1.24.1.tar.gz"
+ url = "https://github.com/chapel-lang/chapel/archive/refs/tags/2.2.0.tar.gz"
+ git = "https://github.com/chapel-lang/chapel.git"
+
+ test_requires_compiler = True
+
+ # TODO: Re-enable these once we add determine_version and determine_variants
+ # executables = ["^chpl$", "^chpldoc$"]
+
+ # A list of GitHub accounts to notify when the package is updated.
+ # TODO: add chapel-project github account
+ maintainers("arezaii", "bonachea")
+
+ tags = ["e4s"]
+
+ # See https://spdx.org/licenses/ for a list.
license("Apache-2.0")
- version("1.24.1", sha256="f898f266fccaa34d937b38730a361d42efb20753ba43a95e5682816e008ce5e4")
- version("1.24.0", sha256="77c6087f3e0837268470915f2ad260d49cf7ac4adf16f5b44862ae624c1be801")
- version("1.23.0", sha256="7ae2c8f17a7b98ac68378e94a842cf16d4ab0bcfeabc0fee5ab4aaa07b205661")
- version("1.22.1", sha256="8235eb0869c9b04256f2e5ce3ac4f9eff558401582fba0eba05f254449a24989")
- version("1.22.0", sha256="57ba6ee5dfc36efcd66854ecb4307e1c054700ea201eff73012bd8b4572c2ce6")
- version("1.21.0", sha256="886f7ba0e0e86c86dba99417e3165f90b1d3eca59c8cd5a7f645ce28cb5d82a0")
- version("1.20.0", sha256="08bc86df13e4ad56d0447f52628b0f8e36b0476db4e19a90eeb2bd5f260baece")
- version("1.19.0", sha256="c2b68a20d87cc382c2f73dd1ecc6a4f42fb2f590b0b10fbc577382dd35c9e9bd")
- version("1.18.0", sha256="68471e1f398b074edcc28cae0be26a481078adc3edea4df663f01c6bd3b6ae0d")
+ version("main", branch="main")
+
+ version("2.2.0", sha256="9b0ce16ed0b1c777647c3aa852d8d8cacea2c3d8a952548a238f07c0f357a0f9")
+ version("2.1.0", sha256="8e164d9a9e705e6b816857e84833b0922ce0bde6a36a9f3a29734830aac168ef")
+ version("2.0.1", sha256="47e1f3789478ea870bd4ecdf52acbe469d171b89b663309325431f3da7c75008")
+ version("2.0.0", sha256="a8cab99fd034c7b7229be8d4626ec95cf02072646fb148c74b4f48c460c6059c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ patch("fix_spack_cc_wrapper_in_cray_prgenv.patch", when="@2.0.0:")
+
+ launcher_names = (
+ "amudprun",
+ "aprun",
+ "gasnetrun_ibv",
+ "gasnetrun_mpi",
+ "mpirun4ofi",
+ "lsf-gasnetrun_ibv",
+ "pals",
+ "pbs-aprun",
+ "pbs-gasnetrun_ibv",
+ "slurm-gasnetrun_ibv",
+ "slurm-gasnetrun_mpi",
+ "slurm-gasnetrun_ofi",
+ "slurm-srun",
+ "smp",
+ "none",
+ "unset",
+ )
+
+ # TODO: revise this list of mappings, probably need more logic for cce, see upc++
+ compiler_map = {
+ "aocc": "clang",
+ "apple-clang": "clang",
+ "arm": "clang",
+ "clang": "clang",
+ "cce": "cray-prgenv-cray",
+ "dpcpp": "intel",
+ "gcc": "gnu",
+ "intel": "intel",
+ "llvm": "llvm",
+ "oneapi": "intel",
+ "rocmcc": "clang",
+ "unset": "unset",
+ }
+
+ cpu_options = (
+ "native",
+ "none",
+ "unknown",
+ "unset",
+ "aarch64",
+ "barcelona",
+ "bdver1",
+ "bdver2",
+ "bdver3",
+ "bdver4",
+ "broadwell",
+ "core2",
+ "haswell",
+ "ivybridge",
+ "k8",
+ "k8sse3",
+ "nehalem",
+ "sandybridge",
+ "skylake",
+ "thunderx",
+ "thunderx2t99",
+ "westmere",
+ )
+
+ # TODO: add other package dependencies
+ package_module_dict = {
+ "curl": "curl",
+ "hdf5": "hdf5+hl~mpi",
+ "libevent": "libevent",
+ "protobuf": "py-protobuf",
+ "ssl": "openssl",
+ "yaml": "libyaml@0.1",
+ "zmq": "libzmq",
+ }
+
+ platform_opts = (
+ "cray-cs",
+ "cray-xc",
+ "cygwin32",
+ "cygwin64",
+ "darwin",
+ "hpe-apollo",
+ "hpe-cray-ex",
+ "linux32",
+ "linux64",
+ "netbsd32",
+ "netbsd64",
+ "pwr6",
+ "unset",
+ )
+
+ variant(
+ "atomics",
+ values=("unset", "cstdlib", "intrinsics", "locks"),
+ default="unset",
+ description="Select atomics implementation",
+ multi=False,
+ )
+
+ # TODO: refactor this somehow, this is a separate documentation tool, not a variant of chapel
+ variant("chpldoc", default=False, description="Build chpldoc in addition to chpl")
+
+ variant("developer", default=False, description="Enable Chapel developer mode")
+
+ variant(
+ "comm",
+ default="none",
+ description="Build Chapel with multi-locale support",
+ values=("gasnet", "none", "ofi", "ugni"),
+ )
+
+ variant(
+ "comm_substrate",
+ default="unset",
+ description="Build Chapel with GASNet multi-locale support using the "
+ "supplied CHPL_COMM_SUBSTRATE",
+ values=("ibv", "ofi", "udp", "smp", "unset"),
+ multi=False,
+ sticky=True, # never allow the concretizer to choose this
+ when="comm=gasnet",
+ )
+
+ variant(
+ "pshm",
+ default=False,
+ description="Build Chapel with fast shared-memory comms between co-locales",
+ when="comm=gasnet",
+ )
+
+ # Chapel depends on GASNet whenever comm=gasnet.
+ # The default (and recommendation) is to use the embedded copy of GASNet.
+ # This variant allows overriding with a particular version of GASNet sources,
+ # although this is not officially supported and some combinations might be rejected.
+ variant(
+ "gasnet",
+ description="Control the GASNet library version used",
+ default="bundled",
+ values=("bundled", "spack"),
+ multi=False,
+ when="comm=gasnet",
+ )
+
+ variant(
+ "gasnet_segment",
+ default="unset",
+ description="Build Chapel with multi-locale support using the "
+ "supplied CHPL_GASNET_SEGMENT",
+ values=("everything", "fast", "large", "unset"),
+ multi=False,
+ when="comm=gasnet",
+ )
+
+ variant(
+ "gmp",
+ description="Build with gmp support",
+ default="spack",
+ values=("bundled", "none", "spack"),
+ multi=False,
+ )
+
+ variant(
+ "gpu_mem_strategy",
+ description="The memory allocation strategy for GPU data",
+ values=("array_on_device", "unified_memory"),
+ default="array_on_device",
+ multi=False,
+ )
+
+ variant(
+ "host_arch",
+ description="Host architecture of the build machine",
+ values=("x86_64", "aarch64", "arm64", "unset"),
+ default="unset",
+ multi=False,
+ )
+
+ variant(
+ "host_jemalloc",
+ values=("bundled", "none", "spack", "unset"),
+ default="unset",
+ multi=False,
+ description="Selects between no jemalloc, bundled jemalloc, or spack supplied jemalloc",
+ )
+
+ variant(
+ "host_mem",
+ values=("cstdlib", "jemalloc"),
+ default="jemalloc",
+ description="Memory management layer for the chpl compiler",
+ multi=False,
+ )
+
+ variant(
+ "host_platform",
+ description="Host platform",
+ default="unset",
+ values=platform_opts,
+ multi=False,
+ )
+
+ variant(
+ "hwloc",
+ description="Build with hwloc support",
+ default="bundled",
+ values=(
+ "bundled",
+ "none",
+ # CHPL_HWLOC=system existed back to at least 2017,
+ # but it was buggy and unsupported until version 2.1
+ conditional("spack", when="@2.1:"),
+ ),
+ multi=False,
+ )
+
+ variant(
+ "launcher",
+ values=launcher_names,
+ default="unset",
+ description="Launcher to use for running Chapel programs",
+ multi=False,
+ )
+
+ variant(
+ "lib_pic",
+ values=("none", "pic"),
+ default="none",
+ description="Build position-independent code suitable for shared libraries",
+ )
+
+ variant(
+ "libfabric",
+ default="unset",
+ description="Control the libfabric version used for multi-locale communication",
+ values=("bundled", "spack", "unset"),
+ multi=False,
+ when="comm=ofi",
+ )
+
+ variant(
+ "libfabric",
+ default="unset",
+ description="Control the libfabric version used for multi-locale communication",
+ values=("bundled", "spack", "unset"),
+ multi=False,
+ when="comm=gasnet comm_substrate=ofi",
+ )
+
+ requires(
+ "^libfabric" + (" fabrics=cxi" if spack.platforms.cray.slingshot_network() else ""),
+ when="libfabric=spack",
+ msg="libfabric requires cxi fabric provider on HPE-Cray EX machines",
+ )
+
+ variant(
+ "llvm",
+ default="spack",
+ description="LLVM backend type. The 'spack' value can use an external "
+ "source of LLVM or let spack build a version if no LLVM installs were "
+ "previously detected by 'spack external find'",
+ values=("bundled", "none", "spack"),
+ )
+
+ variant(
+ "re2",
+ description="Build with re2 support",
+ default="bundled",
+ values=("bundled", "none"),
+ multi=False,
+ )
+
+ variant(
+ "target_arch",
+ description="Target architecture for cross compilation",
+ default="unset",
+ values=("x86_64", "aarch64", "arm64", "unset"),
+ multi=False,
+ )
+
+ variant(
+ "target_cpu",
+ values=cpu_options,
+ description="Indicate that the target executable should be specialized "
+ "to the given architecture when using --specialize (and --fast).",
+ default="unset",
+ multi=False,
+ )
+
+ variant(
+ "target_platform",
+ description="Target platform for cross compilation",
+ default="unset",
+ values=platform_opts,
+ multi=False,
+ )
+
+ variant(
+ "tasks",
+ description="Select tasking layer for intra-locale parallelism",
+ default="qthreads",
+ values=("fifo", "qthreads"),
+ multi=False,
+ )
+
+ variant(
+ "timers",
+ description="Select timers implementation",
+ default="unset",
+ values=("generic", "unset"),
+ multi=False,
+ )
+
+ variant(
+ "unwind",
+ description="Build with unwind library for stack tracing",
+ default="none",
+ values=("bundled", "none", "spack"),
+ multi=False,
+ )
+
+ # Add dependencies for package modules
+ for variant_name, dep in package_module_dict.items():
+ variant(
+ variant_name,
+ description="Build with support for the Chapel {0} package module".format(
+ variant_name
+ ),
+ default=True,
+ )
+ depends_on(dep, when="+{0}".format(variant_name), type=("build", "link", "run", "test"))
+
+ # TODO: for CHPL_X_CC and CHPL_X_CXX, can we capture an arbitrary path, possibly
+ # with arguments?
+ chpl_env_vars = [
+ "CHPL_ATOMICS",
+ "CHPL_AUX_FILESYS",
+ "CHPL_COMM",
+ "CHPL_COMM_SUBSTRATE",
+ "CHPL_DEVELOPER",
+ "CHPL_GASNET_SEGMENT",
+ "CHPL_GMP",
+ "CHPL_GPU",
+ "CHPL_GPU_ARCH",
+ "CHPL_GPU_MEM_STRATEGY",
+ "CHPL_HOST_ARCH",
+ # "CHPL_HOST_CC",
+ "CHPL_HOST_COMPILER",
+ # "CHPL_HOST_CXX",
+ "CHPL_HOST_JEMALLOC",
+ "CHPL_HOST_MEM",
+ "CHPL_HOST_PLATFORM",
+ "CHPL_HWLOC",
+ "CHPL_LAUNCHER",
+ "CHPL_LIB_PIC",
+ "CHPL_LIBFABRIC",
+ "CHPL_LLVM",
+ "CHPL_LLVM_CONFIG",
+ "CHPL_LLVM_SUPPORT",
+ "CHPL_LLVM_VERSION",
+ "CHPL_LOCALE_MODEL",
+ "CHPL_MEM",
+ "CHPL_RE2",
+ "CHPL_SANITIZE",
+ "CHPL_SANITIZE_EXE",
+ "CHPL_TARGET_ARCH",
+ # "CHPL_TARGET_CC",
+ "CHPL_TARGET_COMPILER",
+ "CHPL_TARGET_CPU",
+ # "CHPL_TARGET_CXX",
+ "CHPL_TARGET_PLATFORM",
+ "CHPL_TASKS",
+ "CHPL_TIMERS",
+ "CHPL_UNWIND",
+ ]
+
+ conflicts("platform=windows") # Support for windows is through WSL only
+
+ # Ensure GPU support is Sticky: never allow the concretizer to choose this
+ variant("rocm", default=False, sticky=True, description="Enable AMD ROCm GPU support")
+ variant("cuda", default=False, sticky=True, description="Enable Nvidia CUDA GPU support")
+
+ conflicts("+rocm", when="+cuda", msg="Chapel must be built with either CUDA or ROCm, not both")
+ conflicts("+rocm", when="@:1", msg="ROCm support in spack requires Chapel 2.0.0 or later")
+ # Chapel restricts the allowable ROCm versions
+ with when("@2:2.1 +rocm"):
+ depends_on("hsa-rocr-dev@4:5.4")
+ depends_on("hip@4:5.4")
+ with when("@2.2: +rocm"):
+ depends_on("hsa-rocr-dev@4:5.4,6.0:6.2")
+ depends_on("hip@4:5.4,6.0:6.2")
+ depends_on("llvm-amdgpu@4:5.4", when="+rocm llvm=spack")
+ requires("llvm=bundled", when="+rocm ^hip@6.0:6.2", msg="ROCm 6 support requires llvm=bundled")
+
+ conflicts(
+ "comm_substrate=unset",
+ when="comm=gasnet",
+ msg="comm=gasnet requires you to also set comm_substrate= to the appropriate network",
+ )
+
+ conflicts(
+ "gasnet_segment=everything",
+ when="+pshm",
+ msg="gasnet_segment=everything does not support +pshm",
+ )
+
+ # comm_substrate=udp gasnet_segment=unset defaults to everything,
+ # which is incompatible with +pshm
+ requires("gasnet_segment=fast", when="+pshm comm_substrate=udp")
+
+ conflicts(
+ "^python@3.12:",
+ when="@:2.0",
+ msg="Chapel versions prior to 2.1.0 may produce SyntaxWarnings with Python >= 3.12",
+ )
+
+ conflicts(
+ "host_jemalloc=spack",
+ when="platform=linux",
+ msg="Only bundled jemalloc may be used on Linux systems, see "
+ "https://chapel-lang.org/docs/usingchapel/chplenv.html#chpl-host-jemalloc",
+ )
+
+ conflicts(
+ "host_jemalloc=bundled",
+ when="platform=darwin",
+ msg="Only system jemalloc may be used on Darwin (MacOS) systems, see "
+ "https://chapel-lang.org/docs/usingchapel/chplenv.html#chpl-host-jemalloc",
+ )
+
+ with when("llvm=none"):
+ conflicts("+cuda", msg="Cuda support requires building with LLVM")
+ conflicts("+rocm", msg="ROCm support requires building with LLVM")
+
+ # Add dependencies
+
+ depends_on("doxygen@1.8.17:", when="+chpldoc")
+
+ # TODO: keep up to date with util/chplenv/chpl_llvm.py
+ with when("llvm=spack ~rocm"):
+ depends_on("llvm@11:17", when="@:2.0.1")
+ depends_on("llvm@11:18", when="@2.1.0:")
+
+ # Based on docs https://chapel-lang.org/docs/technotes/gpu.html#requirements
+ depends_on("llvm@16:", when="llvm=spack +cuda ^cuda@12:")
+ requires(
+ "^llvm targets=all",
+ msg="llvm=spack +cuda requires LLVM support the nvptx target",
+ when="llvm=spack +cuda",
+ )
+
+ # This is because certain systems have binutils installed as a system package
+ # but do not include the headers. Spack incorrectly supplies those external
+ # packages as proper dependencies for LLVM, but then LLVM will fail to build
+ # with an error about missing plugin-api.h
+ depends_on("binutils+gold+ld+plugins+headers", when="llvm=bundled")
+
+ depends_on("m4", when="gmp=bundled")
+
+ # Runtime dependencies:
+ # Note here "run" is run of the Chapel compiler built by this package,
+ # but many of these are ALSO run-time dependencies of the executable
+ # application built by that Chapel compiler from user-provided sources.
+ with default_args(type=("build", "link", "run", "test")):
+ depends_on("cuda@11:", when="+cuda")
+ depends_on("gmp", when="gmp=spack")
+ depends_on("hwloc", when="hwloc=spack")
+ depends_on("libfabric", when="libfabric=spack")
+ depends_on("libunwind", when="unwind=spack")
+ depends_on("jemalloc", when="host_jemalloc=spack")
+
+ depends_on("gasnet conduits=none", when="gasnet=spack")
+ depends_on("gasnet@2024.5.0: conduits=none", when="@2.1.0: gasnet=spack")
+
+ depends_on("python@3.7:")
+ depends_on("cmake@3.16:")
+
+ # ensure we can map the spack compiler name to one of the ones we recognize
+ requires(
+ "%aocc",
+ "%apple-clang",
+ "%arm",
+ "%clang",
+ "%cce",
+ "%cray-prgenv-cray",
+ "%cray-prgenv-gnu",
+ "%cray-prgenv-intel",
+ "%cray-prgenv-pgi",
+ "%dpcpp",
+ "%gcc",
+ "%intel",
+ "%llvm",
+ "%oneapi",
+ "%rocmcc",
+ policy="one_of",
+ )
+
+ def unset_chpl_env_vars(self, env):
+ # Clean the environment from any pre-set CHPL_ variables that affect the build
+ for var in self.chpl_env_vars:
+ env.unset(var)
+
+ def build(self, spec, prefix):
+ make()
+ if spec.variants["chpldoc"].value:
+ make("chpldoc")
+
+ def setup_chpl_platform(self, env):
+ if self.spec.variants["host_platform"].value == "unset":
+ if is_CrayEX():
+ env.set("CHPL_HOST_PLATFORM", "hpe-cray-ex")
+
+ def setup_chpl_compilers(self, env):
+ env.set("CHPL_HOST_COMPILER", self.compiler_map[self.spec.compiler.name])
+ if (
+ self.spec.satisfies("+rocm")
+ or self.spec.satisfies("+cuda")
+ or self.spec.satisfies("llvm=spack")
+ ):
+ env.set("CHPL_TARGET_COMPILER", "llvm")
+ else:
+ env.set("CHPL_TARGET_COMPILER", self.compiler_map[self.spec.compiler.name])
+
+ # Undo spack compiler wrappers:
+ # the C/C++ compilers must work post-install
+ if self.spec.satisfies("+rocm llvm=spack"):
+ env.set(
+ "CHPL_LLVM_CONFIG",
+ join_path(self.spec["llvm-amdgpu"].prefix, "bin", "llvm-config"),
+ )
+ real_cc = join_path(self.spec["llvm-amdgpu"].prefix, "bin", "clang")
+ real_cxx = join_path(self.spec["llvm-amdgpu"].prefix, "bin", "clang++")
+
+ # +rocm appears to also require a matching LLVM host compiler to guarantee linkage
+ env.set("CHPL_HOST_COMPILER", "llvm")
+ env.set("CHPL_HOST_CC", real_cc)
+ env.set("CHPL_HOST_CXX", real_cxx)
+
+ elif self.spec.satisfies("llvm=spack"):
+ env.set("CHPL_LLVM_CONFIG", join_path(self.spec["llvm"].prefix, "bin", "llvm-config"))
+ real_cc = join_path(self.spec["llvm"].prefix, "bin", "clang")
+ real_cxx = join_path(self.spec["llvm"].prefix, "bin", "clang++")
+ else:
+ real_cc = self.compiler.cc
+ real_cxx = self.compiler.cxx
+
+ if self.spec.satisfies("llvm=spack") or self.spec.satisfies("llvm=none"):
+ env.set("CHPL_TARGET_CC", real_cc)
+ env.set("CHPL_TARGET_CXX", real_cxx)
+
+ def setup_chpl_comm(self, env, spec):
+ env.set("CHPL_COMM", spec.variants["comm"].value)
+
+ if self.spec.satisfies("+pshm"):
+ env.set("CHPL_GASNET_MORE_CFG_OPTIONS", "--enable-pshm")
+
+ @run_before("configure", when="gasnet=spack")
+ def setup_gasnet(self):
+ dst = join_path(self.stage.source_path, "third-party", "gasnet", "gasnet-src")
+ remove_directory_contents(dst)
+ os.rmdir(dst)
+ symlink(self.spec["gasnet"].prefix.src, dst)
+
+ def setup_if_not_unset(self, env, var, value):
+ if value != "unset" and var in self.chpl_env_vars:
+ if value == "spack":
+ value = "system"
+ env.set(var, value)
+
+ def prepend_cpath_include(self, env, prefix):
+ if not is_system_path(prefix):
+ env.prepend_path("CPATH", prefix.include)
+
+ def update_lib_path(self, env, prefix):
+ if not is_system_path(prefix):
+ env.prepend_path("LD_LIBRARY_PATH", prefix.lib)
+ env.prepend_path("LIBRARY_PATH", prefix.lib)
+ if prefix.lib.pkgconfig is not None:
+ env.prepend_path("PKG_CONFIG_PATH", prefix.lib.pkgconfig)
+
+ def setup_env_vars(self, env):
+ # variants that appear unused by Spack typically correspond directly to
+ # a CHPL_<variant> variable which will be used by the Chapel build system
+ for v in self.spec.variants.keys():
+ self.setup_if_not_unset(env, "CHPL_" + v.upper(), str(self.spec.variants[v].value))
+ self.setup_chpl_compilers(env)
+ self.setup_chpl_platform(env)
+
+ # TODO: a function to set defaults for things where we removed variants
+ # We'll set to GPU later if +rocm or +cuda requested
+ env.set("CHPL_LOCALE_MODEL", "flat")
+
+ if self.spec.satisfies("+developer"):
+ env.set("CHPL_DEVELOPER", "true")
+
+ if not self.spec.satisfies("llvm=none"):
+ # workaround Spack issue #44746:
+ # Chapel does not directly utilize lua, but many of its
+ # launchers depend on system installs of batch schedulers
+ # (notably Slurm on Cray EX) which depend on a system Lua.
+ # LLVM includes lua as a dependency, but a barebones lua
+ # install lacks many packages provided by a system Lua,
+ # which are often required by system services like Slurm.
+ # Disable the incomplete Spack lua package directory to
+ # allow the system one to function.
+ env.unset("LUA_PATH")
+ env.unset("LUA_CPATH")
+
+ if self.spec.variants["gmp"].value == "spack":
+ # TODO: why must we add to CPATH to find gmp.h
+ # TODO: why must we add to LIBRARY_PATH to find lgmp
+ self.prepend_cpath_include(env, self.spec["gmp"].prefix)
+ self.update_lib_path(env, self.spec["gmp"].prefix)
+
+ if self.spec.variants["hwloc"].value == "spack":
+ self.update_lib_path(env, self.spec["hwloc"].prefix)
+ # Need this for the test env, where it does not appear automatic:
+ env.prepend_path("PKG_CONFIG_PATH", self.spec["libpciaccess"].prefix.lib.pkgconfig)
+
+ # TODO: unwind builds but resulting binaries fail to run, producing linker errors
+ if self.spec.variants["unwind"].value == "spack":
+ # chapel package would not build without cpath, missing libunwind.h
+ self.prepend_cpath_include(env, self.spec["libunwind"].prefix)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libunwind"].prefix.lib)
+
+ if self.spec.satisfies("+yaml"):
+ self.prepend_cpath_include(env, self.spec["libyaml"].prefix)
+ # could not compile test/library/packages/Yaml/writeAndParse.chpl without this
+ self.update_lib_path(env, self.spec["libyaml"].prefix)
+
+ if self.spec.satisfies("+zmq"):
+ self.prepend_cpath_include(env, self.spec["libzmq"].prefix)
+ # could not compile test/library/packages/ZMQ/hello.chpl without this
+ self.update_lib_path(env, self.spec["libzmq"].prefix)
+ env.prepend_path("PKG_CONFIG_PATH", self.spec["libsodium"].prefix.lib.pkgconfig)
+
+ if self.spec.satisfies("+curl"):
+ self.prepend_cpath_include(env, self.spec["curl"].prefix)
+ # could not compile test/library/packages/Curl/check-http.chpl without this
+ self.update_lib_path(env, self.spec["curl"].prefix)
+
+ if self.spec.satisfies("+cuda"):
+ # TODO: why must we add to LD_LIBRARY_PATH to find libcudart?
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["cuda"].prefix.lib64)
+ env.set("CHPL_CUDA_PATH", self.spec["cuda"].prefix)
+ env.set("CHPL_LOCALE_MODEL", "gpu")
+ env.set("CHPL_GPU", "nvidia")
+
+ if self.spec.satisfies("+rocm"):
+ env.set("CHPL_LOCALE_MODEL", "gpu")
+ env.set("CHPL_GPU", "amd")
+ env.set("CHPL_GPU_ARCH", self.spec.variants["amdgpu_target"].value[0])
+ self.prepend_cpath_include(env, self.spec["hip"].prefix)
+ env.set("CHPL_ROCM_PATH", self.spec["hip"].prefix)
+ self.update_lib_path(env, self.spec["hip"].prefix)
+ self.update_lib_path(env, self.spec["hsa-rocr-dev"].prefix)
+ self.setup_chpl_comm(env, self.spec)
+
+ def setup_build_environment(self, env):
+ self.unset_chpl_env_vars(env)
+ self.setup_env_vars(env)
+
+ def setup_run_environment(self, env):
+ self.setup_env_vars(env)
+ env.prepend_path(
+ "PATH", join_path(self.prefix.share, "chapel", self._output_version_short, "util")
+ )
+
+ @property
+ @llnl.util.lang.memoized
+ def _output_version_long(self):
+ if str(self.spec.version).lower() == "main":
+ return "2.3.0"
+ spec_vers_str = str(self.spec.version.up_to(3))
+ return spec_vers_str
+
+ @property
+ @llnl.util.lang.memoized
+ def _output_version_short(self):
+ if str(self.spec.version).lower() == "main":
+ return "2.3"
+ spec_vers_str = str(self.spec.version.up_to(2))
+ return spec_vers_str
+
+ def test_version(self):
+ """Perform version checks on selected installed package binaries."""
+ expected = f"version {self._output_version_long}"
+ exes = ["chpl"]
+
+ if self.spec.satisfies("+chpldoc"):
+ exes.append("chpldoc")
+
+ for exe in exes:
+ reason = f"ensure version of {exe} is {self._output_version_long}"
+ with test_part(self, f"test_version_{exe}", purpose=reason):
+ path = join_path(self.prefix.bin, exe)
+ if not os.path.isfile(path):
+ raise SkipTest(f"{path} is not installed")
+ prog = which(path)
+ if prog is None:
+ raise RuntimeError(f"Could not find {path}")
+ output = prog("--version", output=str.split, error=str.split)
+ assert expected in output
+
+ def check(self):
+ # TODO: we skip the self-check because it's ran by default but:
+ # - make check doesn't work at build time b/c the PATH isn't yet updated
+ # - make test is a long running operation
+ pass
+
+ def check_chpl_install_gasnet(self):
+ """Setup env to run self-test after installing the package with gasnet"""
+ with set_env(
+ GASNET_SPAWNFN="L",
+ GASNET_QUIET="yes",
+ GASNET_ROUTE_OUTPUT="0",
+ QT_AFFINITY="no",
+ CHPL_QTHREAD_ENABLE_OVERSUBSCRIPTION="1",
+ CHPL_RT_MASTERIP="127.0.0.1",
+ CHPL_RT_WORKERIP="127.0.0.0",
+ CHPL_LAUNCHER="",
+ ):
+ return subprocess.run(["util/test/checkChplInstall"])
+
+ def check_chpl_install(self):
+ if self.spec.variants["comm"].value != "none":
+ return self.check_chpl_install_gasnet()
+ else:
+ return subprocess.run(["util/test/checkChplInstall"])
+
+ def test_hello(self):
+ """Run the hello world test"""
+ with working_dir(self.test_suite.current_test_cache_dir):
+ with set_env(CHPL_CHECK_HOME=self.test_suite.current_test_cache_dir):
+ with test_part(self, "test_hello", purpose="test hello world"):
+ if self.spec.satisfies("+cuda") or self.spec.satisfies("+rocm"):
+ with set_env(COMP_FLAGS="--no-checks --no-compiler-driver"):
+ res = self.check_chpl_install()
+ assert res and res.returncode == 0
+ else:
+ res = self.check_chpl_install()
+ assert res and res.returncode == 0
+
+ # TODO: This is a pain because the checkChplDoc script doesn't have the same
+ # support for CHPL_CHECK_HOME and chpldoc is finicky about CHPL_HOME
+ def test_chpldoc(self):
+ """Run the chpldoc test"""
+ if not self.spec.satisfies("+chpldoc"):
+ print("Skipping chpldoc test as chpldoc variant is not set")
+ return
+ else:
+ # TODO: Need to update checkChplDoc to work in the spack testing environment
+ pass
+
+ # TODO: In order to run these tests, there's a lot of infrastructure to copy
+ # from the Chapel test suite and there are conflicts with CHPL_HOME needing
+ # to match the compiler's directory and the test suite's directory
+ # def test_package_modules(self):
+ # """Test that the package modules are available"""
+ # # if not self.spec.satisfies("+module_tests"):
+ # # print("Skipping module tests as module_tests variant is not set")
+ # # return
+ # tests_to_run = []
+ # with working_dir(self.test_suite.current_test_cache_dir):
+ # with set_env(CHPL_HOME=join_path(self.spec.prefix.share,
+ # "chapel", self._output_version_short)):
+ # with test_part(self, "test_package_modules", purpose="test package modules"):
+ # if self.spec.satisfies("+yaml"):
+ # tests_to_run.append("test/library/packages/Yaml/writeAndParse.chpl")
+ # if self.spec.satisfies("+zmq"):
+ # tests_to_run.append("test/library/packages/ZMQ/weather.chpl")
+ # if self.spec.satisfies("+ssl"):
+ # tests_to_run.append("test/library/packages/Crypto/")
+ # # TODO: These tests fail with llvm, unable to find C variable CURLPAUSE_CONT
+ # if (
+ # self.spec.satisfies("+curl")
+ # and self.spec.variants["llvm"].value == "none"
+ # ):
+ # with set_env(CHPL_NIGHTLY_TEST_CONFIG_NAME="networking-packages"):
+ # print("Running package module test for package 'curl'")
+ # res = subprocess.run(
+ # ["util/start_test", "test/library/packages/Curl/"]
+ # )
+ # assert res.returncode == 0
+ # print("Running package module test for package 'url'")
+ # res = subprocess.run(["util/start_test",
+ # "test/library/packages/URL/"])
+ # assert res.returncode == 0
+ # if self.spec.satisfies("+hdf5"):
+ # tests_to_run.append("test/library/packages/HDF5/")
+ # if self.spec.satisfies("+protobuf"):
+ # tests_to_run.append("test/library/packages/ProtobufProtocolSupport/")
+ # if len(tests_to_run) > 0:
+ # with set_env(CHPL_HOME=self.test_suite.current_test_cache_dir):
+ # compiler = join_path(self.spec.prefix.bin,'chpl')
+ # print("Running package module tests for packages...")
+ # print(f" command to run: util/start_test --compiler {compiler}")
+ # tests_to_run.insert(0, "util/start_test")
+ # tests_to_run.insert(1, "--compiler")
+ # tests_to_run.insert(2, compiler)
+ # res = subprocess.run([t for t in tests_to_run])
+ # assert res.returncode == 0
+
+ @run_after("install")
+ def copy_test_files(self):
+ """Copy test files to the install directory"""
+ test_files = [
+ "test/release/examples",
+ "util/start_test",
+ "util/test",
+ "util/chplenv",
+ "util/config",
+ "util/printchplenv",
+ # "test/library/packages/Curl",
+ # "test/library/packages/URL/",
+ # "test/library/packages/ProtobufProtocolSupport/",
+ # "test/library/packages/Crypto/",
+ # "test/library/packages/Yaml/",
+ # "test/library/packages/ZMQ/",
+ # "test/library/packages/HDF5/",
+ "chplconfig",
+ "make",
+ "third-party/chpl-venv/",
+ ]
+ cache_extra_test_sources(self, test_files)
+
+ # @run_after("install")
+ # @on_package_attributes(run_tests=True)
+ # def self_check(self):
+ # """Run the self-check after installing the package"""
+ # path_put_first("PATH", [self.prefix.bin])
+ # self.test_version()
+ # self.test_hello()
+ # if self.spec.satisfies("+chpldoc"):
+ # make("check-chpldoc")
+ # self.test_package_modules()
diff --git a/var/spack/repos/builtin/packages/chaplin/package.py b/var/spack/repos/builtin/packages/chaplin/package.py
index 7824480243..32a4f3629b 100644
--- a/var/spack/repos/builtin/packages/chaplin/package.py
+++ b/var/spack/repos/builtin/packages/chaplin/package.py
@@ -20,3 +20,5 @@ class Chaplin(AutotoolsPackage):
maintainers("vvolkl")
version("1.2", sha256="f17c2d985fd4e4ce36cede945450416d3fa940af68945c91fa5d3ca1d76d4b49")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/charliecloud/package.py b/var/spack/repos/builtin/packages/charliecloud/package.py
index 0e8f983545..3d2b4dabc3 100644
--- a/var/spack/repos/builtin/packages/charliecloud/package.py
+++ b/var/spack/repos/builtin/packages/charliecloud/package.py
@@ -19,6 +19,9 @@ class Charliecloud(AutotoolsPackage):
license("Apache-2.0")
version("master", branch="master")
+ version("0.38", sha256="1a3766d57ff4db9c65fd5c561bbaac52476c9a19fa10c1554190912a03429b7a")
+ version("0.37", sha256="1fd8e7cd1dd09a001aead5e105e3234792c1a1e9e30417f495ab3f422ade7397")
+ version("0.36", sha256="b6b1a085d8ff82abc6d625ab990af3925c84fa08ec837828b383f329bd0b8e72")
version("0.35", sha256="042f5be5ed8eda95f45230b4647510780142a50adb4e748be57e8dd8926b310e")
version(
"0.34",
@@ -100,8 +103,10 @@ class Charliecloud(AutotoolsPackage):
deprecated=True,
sha256="15ce63353afe1fc6bcc10979496a54fcd5628f997cb13c827c9fc7afb795bdc5",
)
+
+ depends_on("c", type="build") # generated
variant("docs", default=False, description="Build man pages and html docs")
- variant("squashfuse", default=False, description="Build with squashfuse support")
+ variant("squashfuse", default=True, description="Build with squashfuse support", when="@0.32:")
# Autoconf.
depends_on("m4", type="build")
@@ -109,6 +114,9 @@ class Charliecloud(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ # pkg-config is required for 0.36 regardless of variant.
+ depends_on("pkgconfig", type="build", when="@0.36")
+
# Image manipulation.
depends_on("python@3.6:", type="run")
depends_on("py-requests", type="run")
@@ -121,7 +129,8 @@ class Charliecloud(AutotoolsPackage):
depends_on("py-sphinx-rtd-theme", type="build", when="+docs")
# Bash automated testing harness (bats).
- depends_on("bats@0.4.0", type="test")
+ depends_on("bats@0.4.0", when="@:0.32")
+ depends_on("bats@1.10.0:", when="@0.33:")
# Require pip and wheel for git checkout builds (master).
depends_on("py-pip@21.1.2:", type="build", when="@master")
@@ -130,9 +139,20 @@ class Charliecloud(AutotoolsPackage):
# See https://github.com/spack/spack/pull/16049.
conflicts("platform=darwin", msg="This package does not build on macOS")
- # Squashfuse support
- depends_on("squashfuse@0.1.105:", when="+squashfuse")
- depends_on("squashfs", type="run", when="+squashfuse")
+ # Squashfuse support. For why this is so messy, see:
+ # https://github.com/hpc/charliecloud/issues/1696
+ # https://github.com/hpc/charliecloud/pull/1697
+ # https://github.com/hpc/charliecloud/pull/1784
+ #
+ # FIXME: the current variant and dependencies reflect
+ # Charliecloud's automatic mount/un-mounting requirements. A more manual
+ # approach with squashfuse could implemented in a different variant.
+ with when("+squashfuse"):
+ depends_on("libfuse@3:", type=("build", "run", "link"), when="@0.32:")
+ depends_on("pkgconfig", type="build", when="@0.37:")
+ depends_on("squashfuse@0.1.105:0.2.0,0.4.0:", type="link", when="@0.36:")
+ depends_on("squashfuse@0.1.105:0.2.0,0.4.0", type="link", when="@0.35")
+ depends_on("squashfuse@0.1.105", type="link", when="@0.32:0.34")
def autoreconf(self, spec, prefix):
which("bash")("autogen.sh")
@@ -142,14 +162,14 @@ class Charliecloud(AutotoolsPackage):
py_path = self.spec["python"].command.path
args.append("--with-python={0}".format(py_path))
- if "+docs" in self.spec:
+ if self.spec.satisfies("+docs"):
sphinx_bin = "{0}".format(self.spec["py-sphinx"].prefix.bin)
args.append("--enable-html")
args.append("--with-sphinx-build={0}".format(sphinx_bin.join("sphinx-build")))
else:
args.append("--disable-html")
- if "+squashfuse" in self.spec:
+ if self.spec.satisfies("+squashfuse"):
squashfuse_prefix = "{0}".format(self.spec["squashfuse"].prefix)
args.append("--with-libsquashfuse={0}".format(squashfuse_prefix))
diff --git a/var/spack/repos/builtin/packages/charmpp/ofi-crayshasta-arm.patch b/var/spack/repos/builtin/packages/charmpp/ofi-crayshasta-arm.patch
new file mode 100644
index 0000000000..ce21509fb5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/charmpp/ofi-crayshasta-arm.patch
@@ -0,0 +1,13 @@
+diff --git a/src/arch/ofi-crayshasta/conv-mach.h b/src/arch/ofi-crayshasta/conv-mach.h
+index 61d295df3..9e15fd2a9 100644
+--- a/src/arch/ofi-crayshasta/conv-mach.h
++++ b/src/arch/ofi-crayshasta/conv-mach.h
+@@ -74,7 +74,7 @@
+ #define CMK_LBDB_ON 1
+
+ #define CMK_64BIT 1
+-#define CMK_AMD64 1
++#define CMK_ARM 1
+
+ /* Other possible definitions:
+
diff --git a/var/spack/repos/builtin/packages/charmpp/package.py b/var/spack/repos/builtin/packages/charmpp/package.py
index 637b111dac..02ce131961 100644
--- a/var/spack/repos/builtin/packages/charmpp/package.py
+++ b/var/spack/repos/builtin/packages/charmpp/package.py
@@ -26,6 +26,11 @@ class Charmpp(Package):
version("main", branch="main")
+ version(
+ "8.0.0",
+ sha256="e30fc1e921e5cbf3406e792d5b0ca5f211c5d8ffbfc56e56d5501d8118abcaf6",
+ url="https://github.com/charmplusplus/charm/archive/refs/tags/v8.0.0.tar.gz",
+ )
version("7.0.0", sha256="9c247b421bb157bdf9bc0ced3e25738c7a1dc1f7ec57b7943a7faf97f7e4fb2e")
version("6.10.2", sha256="7abb4cace8aebdfbb8006eac03eb766897c009cfb919da0d0a33f74c3b4e6deb")
version("6.10.1", sha256="ab96198105daabbb8c8bdf370f87b0523521ce502c656cb6cd5b89f69a2c70a8")
@@ -40,6 +45,10 @@ class Charmpp(Package):
version("6.6.0", sha256="c916010f2d4cc2c6bd30ea19764839d0298fb56d1696d8ff08d9fa9a61dfb1c9")
version("6.5.1", sha256="68aa43e2a6e476e116a7e80e385c25c6ac6497807348025505ba8bfa256ed34a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Support OpenMPI; see
# <https://github.com/UIUC-PPL/charm/issues/1206>
# Patch is no longer needed in versions 6.8.0+
@@ -58,6 +67,9 @@ class Charmpp(Package):
# Ignore compiler warnings while configuring
patch("strictpass.patch", when="@:6.8.2")
+ # Support Cray Shasta with ARM
+ patch("ofi-crayshasta-arm.patch", when="backend=ofi pmi=cray-pmi target=aarch64:")
+
# Build targets
# "target" is reserved, so we have to use something else.
variant(
@@ -86,7 +98,7 @@ class Charmpp(Package):
variant(
"pmi",
default="none",
- values=("none", "simplepmi", "slurmpmi", "slurmpmi2", "pmix"),
+ values=("none", "simplepmi", "slurmpmi", "slurmpmi2", "pmix", "cray-pmi"),
description="The ucx/ofi/gni backends need PMI to run!",
)
@@ -112,6 +124,7 @@ class Charmpp(Package):
depends_on("cuda", when="+cuda")
depends_on("ucx", when="backend=ucx")
+ depends_on("libfabric", when="backend=ofi")
depends_on("slurm@:17-11-9-2", when="pmi=slurmpmi")
depends_on("slurm@17-11-9-2:", when="pmi=slurmpmi2")
@@ -123,6 +136,7 @@ class Charmpp(Package):
depends_on("mpi", when="pmi=simplepmi")
depends_on("mpi", when="pmi=slurmpmi")
depends_on("mpi", when="pmi=slurmpmi2")
+ depends_on("cray-mpich", when="pmi=cray-pmi")
# Git versions of Charm++ require automake and autoconf
depends_on("automake", when="@develop")
@@ -180,7 +194,6 @@ class Charmpp(Package):
("linux", "x86_64", "netlrts"): "netlrts-linux-x86_64",
("linux", "x86_64", "verbs"): "verbs-linux-x86_64",
("linux", "x86_64", "ofi"): "ofi-linux-x86_64",
- ("linux", "x86_64", "ucx"): "ucx-linux-x86_64",
("linux", "ppc", "mpi"): "mpi-linux-ppc",
("linux", "ppc", "multicore"): "multicore-linux-ppc",
("linux", "ppc", "netlrts"): "netlrts-linux-ppc",
@@ -195,29 +208,56 @@ class Charmpp(Package):
("cnl", "x86_64", "mpi"): "mpi-crayxc",
}
+ if self.spec.satisfies("@6.10:"):
+ versions.update(
+ {
+ ("linux", "x86_64", "ucx"): "ucx-linux-x86_64",
+ ("linux", "aarch64", "ucx"): "ucx-linux-arm8",
+ }
+ )
+
# Some versions were renamed/removed in 6.11
if self.spec.version < Version("6.11.0"):
- versions.update({("linux", "i386", "mpi"): "mpi-linux"})
- versions.update({("linux", "i386", "multicore"): "multicore-linux"})
- versions.update({("linux", "i386", "netlrts"): "netlrts-linux"})
- versions.update({("linux", "i386", "uth"): "uth-linux"})
versions.update(
{
+ ("linux", "i386", "mpi"): "mpi-linux",
+ ("linux", "i386", "multicore"): "multicore-linux",
+ ("linux", "i386", "netlrts"): "netlrts-linux",
+ ("linux", "i386", "uth"): "uth-linux",
("linux", "arm", "multicore"): "multicore-arm7",
("linux", "aarch64", "multicore"): "multicore-arm8",
}
)
else:
- versions.update({("linux", "i386", "mpi"): "mpi-linux-i386"})
- versions.update({("linux", "i386", "multicore"): "multicore-linux-i386"})
- versions.update({("linux", "i386", "netlrts"): "netlrts-linux-i386"})
versions.update(
{
+ ("linux", "i386", "mpi"): "mpi-linux-i386",
+ ("linux", "i386", "multicore"): "multicore-linux-i386",
+ ("linux", "i386", "netlrts"): "netlrts-linux-i386",
("linux", "arm", "multicore"): "multicore-linux-arm7",
("linux", "aarch64", "multicore"): "multicore-linux-arm8",
}
)
+ if self.spec.satisfies("@7:"):
+ versions.update(
+ {
+ ("linux", "arm", "mpi"): "mpi-linux-arm7",
+ ("linux", "aarch64", "mpi"): "mpi-linux-arm8",
+ ("darwin", "arm", "multicore"): "multicore-darwin-arm8",
+ ("darwin", "arm", "netlrts"): "netlrts-darwin-arm8",
+ ("darwin", "arm", "mpi"): "mpi-darwin-arm8",
+ }
+ )
+
+ if self.spec.satisfies("backend=ofi pmi=cray-pmi"):
+ versions.update(
+ {
+ ("linux", "x86_64", "ofi"): "ofi-crayshasta",
+ ("linux", "aarch64", "ofi"): "ofi-crayshasta",
+ }
+ )
+
if (plat, mach, comm) not in versions:
raise InstallError(
"The communication mechanism %s is not supported "
@@ -237,7 +277,7 @@ class Charmpp(Package):
def install(self, spec, prefix):
if not ("backend=mpi" in self.spec) or not ("backend=netlrts" in self.spec):
- if "+pthreads" in self.spec:
+ if self.spec.satisfies("+pthreads"):
raise InstallError(
"The pthreads option is only\
available on the Netlrts and MPI \
@@ -249,7 +289,7 @@ class Charmpp(Package):
or ("backend=ofi" in self.spec)
or ("backend=gni" in self.spec)
):
- if "pmi=none" in self.spec:
+ if self.spec.satisfies("pmi=none"):
raise InstallError(
"The UCX/OFI/GNI backends need \
PMI to run. Please add pmi=... \
@@ -262,7 +302,7 @@ class Charmpp(Package):
or ("pmi=slurmpmi" in self.spec)
or ("pmi=slurmpmi2" in self.spec)
):
- if "^openmpi" in self.spec:
+ if self.spec.satisfies("^openmpi"):
raise InstallError(
"To use any process management \
interface other than PMIx, \
@@ -284,15 +324,15 @@ class Charmpp(Package):
options.append("-j%d" % make_jobs)
options.append("--destination=%s" % builddir)
- if "pmi=slurmpmi" in spec:
+ if spec.satisfies("pmi=slurmpmi"):
options.append("slurmpmi")
- if "pmi=slurmpmi2" in spec:
+ if spec.satisfies("pmi=slurmpmi2"):
options.append("slurmpmi2")
- if "pmi=pmix" in spec:
+ if spec.satisfies("pmi=pmix"):
options.append("ompipmix")
options.extend(["--basedir=%s" % spec["openmpi"].prefix])
- if "backend=mpi" in spec:
+ if spec.satisfies("backend=mpi"):
# in intelmpi <prefix>/include and <prefix>/lib fails so --basedir
# cannot be used
options.extend(
@@ -302,9 +342,9 @@ class Charmpp(Package):
["--libdir={0}".format(libdir) for libdir in spec["mpi"].libs.directories]
)
- if "backend=ucx" in spec:
+ if spec.satisfies("backend=ucx"):
options.extend(["--basedir=%s" % spec["ucx"].prefix])
- if "+papi" in spec:
+ if spec.satisfies("+papi"):
options.extend(["papi", "--basedir=%s" % spec["papi"].prefix])
if "+smp" in spec and "backend=multicore" not in spec:
# The 'multicore' backend always uses SMP, so we don't have to
@@ -312,7 +352,7 @@ class Charmpp(Package):
# of Charm++ v7.0.0 it is actually a build error to append 'smp'
# with the 'multicore' backend.
options.append("smp")
- if "+tcp" in spec:
+ if spec.satisfies("+tcp"):
if "backend=netlrts" not in spec:
# This is a Charm++ limitation; it would lead to a
# build error
@@ -320,20 +360,27 @@ class Charmpp(Package):
"The +tcp variant requires " "the backend=netlrts communication mechanism"
)
options.append("tcp")
- if "+omp" in spec:
+ if spec.satisfies("+omp"):
options.append("omp")
- if "+pthreads" in spec:
+ if spec.satisfies("+pthreads"):
options.append("pthreads")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
options.append("cuda")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
options.append("--build-shared")
- if "+production" in spec:
+ if spec.satisfies("+production"):
options.append("--with-production")
- if "+tracing" in spec:
+ if spec.satisfies("+tracing"):
options.append("--enable-tracing")
+ # charmpp build was failing with clang based compilers for -DNETWORK=mpi as discussed in
+ # https://github.com/charmplusplus/charm/issues/3645
+ # Fix was suggested in https://github.com/charmplusplus/charm/pull/3646 and the same has
+ # been implemented in v8.0.0
+ if self.spec.satisfies("@8.0.0: %aocc"):
+ options.append("--disable-fortran")
+
# Call "make" via the build script
# Note: This builds Charm++ in the "tmp" subdirectory of the
# install directory. Maybe we could set up a symbolic link
@@ -394,4 +441,4 @@ class Charmpp(Package):
self.spec.mpicxx = self.prefix.bin.ampicxx
self.spec.mpifc = self.prefix.bin.ampif90
self.spec.mpif77 = self.prefix.bin.ampif77
- self.spec.charmarch = self.charmarch
+ self.spec.charmarch = self.charmarch + "-smp" if self.spec.satisfies("+smp") else ""
diff --git a/var/spack/repos/builtin/packages/chatterbug/package.py b/var/spack/repos/builtin/packages/chatterbug/package.py
index eddb9e3a9b..2ce3a2c7f9 100644
--- a/var/spack/repos/builtin/packages/chatterbug/package.py
+++ b/var/spack/repos/builtin/packages/chatterbug/package.py
@@ -15,14 +15,16 @@ class Chatterbug(MakefilePackage):
tags = ["proxy-app"]
- homepage = "https://chatterbug.readthedocs.io"
- git = "https://github.com/LLNL/chatterbug.git"
+ homepage = "https://github.com/hpcgroup/chatterbug"
+ git = "https://github.com/hpcgroup/chatterbug.git"
license("MIT")
version("develop", branch="master")
version("1.0", tag="v1.0", commit="ee1b13c634943dbe32ac22f5e2154b00eab8c574")
+ depends_on("cxx", type="build") # generated
+
variant("scorep", default=False, description="Build with Score-P tracing")
depends_on("mpi")
@@ -37,13 +39,13 @@ class Chatterbug(MakefilePackage):
return targets
def build(self, spec, prefix):
- if "+scorep" in spec:
+ if spec.satisfies("+scorep"):
make("WITH_OTF2=YES")
else:
make()
def install(self, spec, prefix):
- if "+scorep" in spec:
+ if spec.satisfies("+scorep"):
make("WITH_OTF2=YES", "PREFIX=" + spec.prefix, "install")
else:
make("PREFIX=" + spec.prefix, "install")
diff --git a/var/spack/repos/builtin/packages/check/package.py b/var/spack/repos/builtin/packages/check/package.py
index b2c2900fd7..e256b0008a 100644
--- a/var/spack/repos/builtin/packages/check/package.py
+++ b/var/spack/repos/builtin/packages/check/package.py
@@ -23,3 +23,5 @@ class Check(AutotoolsPackage):
version("0.12.0", sha256="464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234")
version("0.11.0", sha256="24f7a48aae6b74755bcbe964ce8bc7240f6ced2141f8d9cf480bc3b3de0d5616")
version("0.10.0", sha256="f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/chemfiles/package.py b/var/spack/repos/builtin/packages/chemfiles/package.py
index 148e806d6a..e098a4f2d1 100644
--- a/var/spack/repos/builtin/packages/chemfiles/package.py
+++ b/var/spack/repos/builtin/packages/chemfiles/package.py
@@ -21,6 +21,9 @@ class Chemfiles(CMakePackage):
version("0.10.4", sha256="b8232ddaae2953538274982838aa6c2df87d300f7e2f80e92c171581e06325ba")
version("0.10.3", sha256="5f53d87a668a85bebf04e0e8ace0f1db984573de1c54891ba7d37d31cced0408")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=False, description="Build shared libraries")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/chgcentre/package.py b/var/spack/repos/builtin/packages/chgcentre/package.py
index 4ad3cbffa3..19da180cae 100644
--- a/var/spack/repos/builtin/packages/chgcentre/package.py
+++ b/var/spack/repos/builtin/packages/chgcentre/package.py
@@ -16,6 +16,8 @@ class Chgcentre(CMakePackage):
version("1.6", sha256="5b14f9f56b900072c42dab2a8217cd399fb1bb50aae20f9e3b6ff30ec5b12008")
+ depends_on("cxx", type="build") # generated
+
depends_on("casacore")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/chombo/package.py b/var/spack/repos/builtin/packages/chombo/package.py
index f28606aad3..0f50baf3d5 100644
--- a/var/spack/repos/builtin/packages/chombo/package.py
+++ b/var/spack/repos/builtin/packages/chombo/package.py
@@ -25,6 +25,10 @@ class Chombo(MakefilePackage):
version("3.2", commit="71d856c2f469e96755a606db1e5151067da0f54a")
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
variant("hdf5", default=True, description="Enable HDF5 support")
variant(
@@ -80,7 +84,7 @@ class Chombo(MakefilePackage):
# Compilers and Compiler flags
defs_file.filter(r"^#\s*CXX\s*=.*", "CXX = %s" % spack_cxx)
defs_file.filter(r"^#\s*FC\s*=.*", "FC = %s" % spack_fc)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
defs_file.filter(r"^#\s*MPICXX\s*=.*", "MPICXX = %s" % self.spec["mpi"].mpicxx)
# Conditionally determined settings
@@ -88,7 +92,7 @@ class Chombo(MakefilePackage):
defs_file.filter(r"^#\s*DIM\s*=.*", "DIM = %s" % spec.variants["dims"].value)
# HDF5 settings
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
defs_file.filter(r"^#\s*USE_HDF5\s*=.*", "USE_HDF5 = TRUE")
defs_file.filter(
r"^#\s*HDFINCFLAGS\s*=.*", "HDFINCFLAGS = -I%s" % spec["hdf5"].prefix.include
@@ -96,7 +100,7 @@ class Chombo(MakefilePackage):
defs_file.filter(
r"^#\s*HDFLIBFLAGS\s*=.*", "HDFLIBFLAGS = %s" % spec["hdf5"].libs.ld_flags
)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
defs_file.filter(
r"^#\s*HDFMPIINCFLAGS\s*=.*",
"HDFMPIINCFLAGS = -I%s" % spec["hdf5"].prefix.include,
diff --git a/var/spack/repos/builtin/packages/chrony/package.py b/var/spack/repos/builtin/packages/chrony/package.py
index 1219b0c0cb..c50f87a2b2 100644
--- a/var/spack/repos/builtin/packages/chrony/package.py
+++ b/var/spack/repos/builtin/packages/chrony/package.py
@@ -22,6 +22,8 @@ class Chrony(AutotoolsPackage):
version("3.4", sha256="85fbe433f5a3ee961a20c47a72367760b074448587a9e2d3a6788a95750ed77e")
version("3.3", sha256="0dd7323b5ed9e3208236c1b39fcabf2ad03469fa07ac516ba9c682206133f66d")
+ depends_on("c", type="build") # generated
+
depends_on("ruby-asciidoctor")
depends_on("bison", type="build")
diff --git a/var/spack/repos/builtin/packages/chrpath/package.py b/var/spack/repos/builtin/packages/chrpath/package.py
index fe0c081d7f..0010c2377d 100644
--- a/var/spack/repos/builtin/packages/chrpath/package.py
+++ b/var/spack/repos/builtin/packages/chrpath/package.py
@@ -16,3 +16,5 @@ class Chrpath(AutotoolsPackage):
license("GPL-2.0-or-later")
version("0.16", sha256="bb0d4c54bac2990e1bdf8132f2c9477ae752859d523e141e72b3b11a12c26e7b")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/circe2/package.py b/var/spack/repos/builtin/packages/circe2/package.py
index 5b42f60d60..eb7067e0b3 100644
--- a/var/spack/repos/builtin/packages/circe2/package.py
+++ b/var/spack/repos/builtin/packages/circe2/package.py
@@ -24,6 +24,8 @@ class Circe2(AutotoolsPackage):
version("3.1.2.1", sha256="8bb09e6f566adefcf7b5b1cf9d9fe4536dd3dd11ed3674861de29e177ee0bb04")
+ depends_on("fortran", type="build") # generated
+
variant("doc", default=False, description="Create the latex documentation")
depends_on("ocaml@4.05:")
diff --git a/var/spack/repos/builtin/packages/citcoms/package.py b/var/spack/repos/builtin/packages/citcoms/package.py
index 0e83ec33cd..c697d05a02 100644
--- a/var/spack/repos/builtin/packages/citcoms/package.py
+++ b/var/spack/repos/builtin/packages/citcoms/package.py
@@ -22,6 +22,9 @@ class Citcoms(AutotoolsPackage):
version("3.3.1", sha256="e3520e0a933e4699d31e86fe309b8c154ea6ecb0f42a1cf6f25e8d13d825a4b3")
version("3.2.0", sha256="773a14d91ecbb4a4d1e04317635fab79819d83c57b47f19380ff30b9b19cb07a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("ggrd", default=False, description="use GGRD file support")
variant("cuda", default=False, description="use CUDA")
variant("hdf5", default=False, description="add HDF5 support")
@@ -40,7 +43,7 @@ class Citcoms(AutotoolsPackage):
depends_on("hdf5+mpi", when="+hdf5")
def setup_build_environment(self, env):
- if "+ggrd" in self.spec:
+ if self.spec.satisfies("+ggrd"):
env.set("HC_HOME", self.spec["hc"].prefix)
def configure_args(self):
@@ -51,17 +54,17 @@ class Citcoms(AutotoolsPackage):
args.append("--without-pyre")
args.append("--without-exchanger")
- if "+ggrd" in self.spec:
+ if self.spec.satisfies("+ggrd"):
args.append("--with-ggrd")
else:
args.append("--without-ggrd")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("--with-cuda")
else:
args.append("--without-cuda")
- if "+hdf5" in self.spec:
+ if self.spec.satisfies("+hdf5"):
args.extend(
[
"--with-hdf5",
diff --git a/var/spack/repos/builtin/packages/cityhash/package.py b/var/spack/repos/builtin/packages/cityhash/package.py
index 2929bf0977..efa2b2227d 100644
--- a/var/spack/repos/builtin/packages/cityhash/package.py
+++ b/var/spack/repos/builtin/packages/cityhash/package.py
@@ -15,5 +15,7 @@ class Cityhash(AutotoolsPackage):
version("master", branch="master")
version("2013-07-31", commit="8af9b8c2b889d80c22d6bc26ba0df1afb79a30db")
+ depends_on("cxx", type="build") # generated
+
def configure_args(self):
return ["--enable-sse4.2"]
diff --git a/var/spack/repos/builtin/packages/cjson/package.py b/var/spack/repos/builtin/packages/cjson/package.py
index 937044baa5..589a3f4762 100644
--- a/var/spack/repos/builtin/packages/cjson/package.py
+++ b/var/spack/repos/builtin/packages/cjson/package.py
@@ -15,4 +15,6 @@ class Cjson(CMakePackage):
license("MIT")
+ version("1.7.18", sha256="cc6d93cc3b659037c34193ecc7be5a874a18c2ac67b24efe82db6a759b486b5d")
+ version("1.7.17", sha256="51f3b07aece8d1786e74b951fd92556506586cb36670741b6bfb79bf5d484216")
version("1.7.15", sha256="c55519316d940757ef93a779f1db1ca809dbf979c551861f339d35aaea1c907c")
diff --git a/var/spack/repos/builtin/packages/clamav/package.py b/var/spack/repos/builtin/packages/clamav/package.py
index 14e3b0c11b..337152762e 100644
--- a/var/spack/repos/builtin/packages/clamav/package.py
+++ b/var/spack/repos/builtin/packages/clamav/package.py
@@ -17,6 +17,9 @@ class Clamav(AutotoolsPackage):
version("0.101.2", sha256="0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("json-c")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/clamr/package.py b/var/spack/repos/builtin/packages/clamr/package.py
index cba0c2cab8..84ae3108a4 100644
--- a/var/spack/repos/builtin/packages/clamr/package.py
+++ b/var/spack/repos/builtin/packages/clamr/package.py
@@ -20,6 +20,10 @@ class Clamr(CMakePackage):
version("master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"graphics",
default="opengl",
@@ -40,16 +44,16 @@ class Clamr(CMakePackage):
def cmake_args(self):
spec = self.spec
cmake_args = []
- if "graphics=none" in spec:
+ if spec.satisfies("graphics=none"):
cmake_args.append("-DGRAPHICS_TYPE=None")
- elif "graphics=mpe" in spec:
+ elif spec.satisfies("graphics=mpe"):
cmake_args.append("-DGRAPHICS_TYPE=MPE")
else:
cmake_args.append("-DGRAPHICS_TYPE=OpenGL")
- if "precision=full" in spec:
+ if spec.satisfies("precision=full"):
cmake_args.append("-DPRECISION_TYPE=full_precision")
- elif "precision=single" in spec:
+ elif spec.satisfies("precision=single"):
cmake_args.append("-DPRECISION_TYPE=minimum_precision")
else:
cmake_args.append("-DPRECISION_TYPE=mixed_precision")
diff --git a/var/spack/repos/builtin/packages/clapack/package.py b/var/spack/repos/builtin/packages/clapack/package.py
index 10e1ce2652..2f774f8d94 100644
--- a/var/spack/repos/builtin/packages/clapack/package.py
+++ b/var/spack/repos/builtin/packages/clapack/package.py
@@ -22,13 +22,15 @@ class Clapack(MakefilePackage):
version("3.2.1", sha256="6dc4c382164beec8aaed8fd2acc36ad24232c406eda6db462bd4c41d5e455fac")
+ depends_on("c", type="build") # generated
+
variant("external-blas", default=True, description="Build with external BLAS (ATLAS here).")
depends_on("atlas", when="+external-blas")
def edit(self, spec, prefix):
copy("make.inc.example", "make.inc")
- if "+external-blas" in spec:
+ if spec.satisfies("+external-blas"):
make_inc = FileFilter("make.inc")
make_inc.filter(r"^BLASLIB.*", "BLASLIB = ../../libcblaswr.a -lcblas -latlas")
makefile = FileFilter("Makefile")
diff --git a/var/spack/repos/builtin/packages/clara/package.py b/var/spack/repos/builtin/packages/clara/package.py
index 812ec40305..fd021efff6 100644
--- a/var/spack/repos/builtin/packages/clara/package.py
+++ b/var/spack/repos/builtin/packages/clara/package.py
@@ -33,6 +33,8 @@ class Clara(CMakePackage, Package):
version("1.1.1", sha256="10915a49a94d371f05af360d40e9cc9615ab86f200d261edf196a8ddd7efa7f8")
version("1.1.0", sha256="29ca29d843150aabad702356f79009f5b30dda05ac9674a064362b7edcba5477")
+ depends_on("cxx", type="build") # generated
+
class GenericBuilder(spack.build_systems.generic.GenericBuilder):
def install(self, pkg, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/claw/package.py b/var/spack/repos/builtin/packages/claw/package.py
index 025f216a44..481745cb90 100644
--- a/var/spack/repos/builtin/packages/claw/package.py
+++ b/var/spack/repos/builtin/packages/claw/package.py
@@ -5,6 +5,8 @@
import os
+import spack.compilers
+import spack.spec
from spack.package import *
@@ -45,6 +47,10 @@ class Claw(CMakePackage):
"1.1.0", tag="v1.1.0", commit="16b165a443b11b025a77cad830b1280b8c9bcf01", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.0:", type="build")
depends_on("ant@1.9:", type="build")
depends_on("bison", type="build")
diff --git a/var/spack/repos/builtin/packages/cleverleaf/package.py b/var/spack/repos/builtin/packages/cleverleaf/package.py
index 8f16ba94d2..1f0b821b94 100644
--- a/var/spack/repos/builtin/packages/cleverleaf/package.py
+++ b/var/spack/repos/builtin/packages/cleverleaf/package.py
@@ -22,6 +22,9 @@ class Cleverleaf(CMakePackage):
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("samrai@3.8.0:")
depends_on("hdf5+mpi")
diff --git a/var/spack/repos/builtin/packages/clfft/package.py b/var/spack/repos/builtin/packages/clfft/package.py
index 38deb524c7..c9cdbb03c7 100644
--- a/var/spack/repos/builtin/packages/clfft/package.py
+++ b/var/spack/repos/builtin/packages/clfft/package.py
@@ -17,6 +17,9 @@ class Clfft(CMakePackage):
version("2.12.2", sha256="e7348c146ad48c6a3e6997b7702202ad3ee3b5df99edf7ef00bbacc21e897b12")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("client", default=True, description="build client and callback client")
depends_on("opencl@1.2:")
@@ -35,6 +38,12 @@ class Clfft(CMakePackage):
root_cmakelists_dir = "src"
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ # https://github.com/clMathLibraries/clFFT/issues/237
+ flags.append("-fpermissive")
+ return (flags, None, None)
+
def cmake_args(self):
args = [
self.define_from_variant("BUILD_CLIENT", "client"),
diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py
index 56796d9433..6328b09c67 100644
--- a/var/spack/repos/builtin/packages/clhep/package.py
+++ b/var/spack/repos/builtin/packages/clhep/package.py
@@ -53,6 +53,8 @@ class Clhep(CMakePackage):
version("2.2.0.4", sha256="9bf7fcd9892313c8d1436bc4a4a285a016c4f8e81e1fc65bdf6783207ae57550")
version("2.1.2.3", sha256="4353231be09c134507092161cd3ced27a065ca0ebb31ee0256e60a8163c47c3b")
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default="11",
diff --git a/var/spack/repos/builtin/packages/cli11/package.py b/var/spack/repos/builtin/packages/cli11/package.py
index f909bd0e58..a7cbf17c19 100644
--- a/var/spack/repos/builtin/packages/cli11/package.py
+++ b/var/spack/repos/builtin/packages/cli11/package.py
@@ -14,8 +14,10 @@ class Cli11(CMakePackage):
url = "https://github.com/CLIUtils/CLI11/archive/v1.9.1.tar.gz"
maintainers("nightlark")
- license("BitTorrent-1.0")
+ license("BSD-3-Clause")
+ version("2.4.2", sha256="f2d893a65c3b1324c50d4e682c0cdc021dd0477ae2c048544f39eed6654b699a")
+ version("2.4.1", sha256="73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58")
version("2.3.2", sha256="aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22")
version("2.3.1", sha256="378da73d2d1d9a7b82ad6ed2b5bda3e7bc7093c4034a1d680a2e009eb067e7b2")
version("2.1.1", sha256="d69023d1d0ab6a22be86b4f59d449422bc5efd9121868f4e284d6042e52f682e")
@@ -23,8 +25,16 @@ class Cli11(CMakePackage):
version("2.0.0", sha256="2c672f17bf56e8e6223a3bfb74055a946fa7b1ff376510371902adb9cb0ab6a3")
version("1.9.1", sha256="c780cf8cf3ba5ec2648a7eeb20a47e274493258f38a9b417628e0576f473a50b")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.4:", type="build")
+ depends_on("cmake@3.5:", type="build", when="@2.4:")
def cmake_args(self):
- args = ["-DCLI11_BUILD_EXAMPLES=OFF", "-DCLI11_BUILD_DOCS=OFF", "-DCLI11_BUILD_TESTS=OFF"]
+ args = [
+ self.define("CLI11_BUILD_EXAMPLES", False),
+ self.define("CLI11_BUILD_DOCS", False),
+ self.define("CLI11_BUILD_TESTS", False),
+ self.define("CLI11_PRECOMPILED", True),
+ ]
return args
diff --git a/var/spack/repos/builtin/packages/clinfo/package.py b/var/spack/repos/builtin/packages/clinfo/package.py
index 8dc7876d0f..08087611bd 100644
--- a/var/spack/repos/builtin/packages/clinfo/package.py
+++ b/var/spack/repos/builtin/packages/clinfo/package.py
@@ -19,6 +19,9 @@ class Clinfo(MakefilePackage):
license("CC0-1.0")
version(
+ "3.0.23.01.25", sha256="6dcdada6c115873db78c7ffc62b9fc1ee7a2d08854a3bccea396df312e7331e3"
+ )
+ version(
"3.0.21.02.21", sha256="e52f5c374a10364999d57a1be30219b47fb0b4f090e418f2ca19a0c037c1e694"
)
version(
@@ -28,6 +31,8 @@ class Clinfo(MakefilePackage):
"2.2.18.04.06", sha256="f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c"
)
+ depends_on("c", type="build") # generated
+
depends_on("opencl")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py
index a11ff0a048..1725808203 100644
--- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py
@@ -32,13 +32,6 @@ class ClingoBootstrap(Clingo):
description="Enable a series of Spack-specific optimizations (PGO, LTO, mimalloc)",
)
- variant(
- "force_setuptools",
- default=False,
- description="Force a dependency on setuptools to help the old concretizer",
- )
- depends_on("py-setuptools", type="build", when="+force_setuptools")
-
# Enable LTO
conflicts("~ipo", when="+optimized")
@@ -51,7 +44,8 @@ class ClingoBootstrap(Clingo):
patch("mimalloc.patch", when="@5.5.0:")
patch("mimalloc-pre-5.5.0.patch", when="@:5.4")
# ensure we hide libstdc++ with custom operator new/delete symbols
- patch("version-script.patch")
+ patch("version-script.patch", when="@spack,5.5:5.6")
+ patch("version-script-5.4.patch", when="@5.2:5.4")
# CMake at version 3.16.0 or higher has the possibility to force the
# Python interpreter, which is crucial to build against external Python
@@ -65,12 +59,6 @@ class ClingoBootstrap(Clingo):
when="platform=linux",
msg="GCC or clang are required to bootstrap clingo on Linux",
)
- requires(
- "%gcc",
- "%clang",
- when="platform=cray",
- msg="GCC or clang are required to bootstrap clingo on Cray",
- )
conflicts("%gcc@:5", msg="C++14 support is required to bootstrap clingo")
# On Darwin we bootstrap with Apple Clang
@@ -88,15 +76,13 @@ class ClingoBootstrap(Clingo):
return self.define("CLINGO_BUILD_PY_SHARED", "OFF")
def cmake_args(self):
- args = super().cmake_args()
- args.append(self.define("CLINGO_BUILD_APPS", False))
- return args
+ return [*super().cmake_args(), self.define("CLINGO_BUILD_APPS", False)]
@run_before("cmake", when="+optimized")
def pgo_train(self):
- if self.spec.compiler.name == "clang":
+ if self.spec.satisfies("%clang"):
llvm_profdata = which("llvm-profdata", required=True)
- elif self.spec.compiler.name == "apple-clang":
+ elif self.spec.satisfies("%apple-clang"):
llvm_profdata = Executable(
Executable("xcrun")("-find", "llvm-profdata", output=str).strip()
)
@@ -127,14 +113,12 @@ class ClingoBootstrap(Clingo):
)
python_runtime_env.unset("SPACK_ENV")
python_runtime_env.unset("SPACK_PYTHON")
- self.spec["python"].command(
- spack.paths.spack_script, "solve", "--fresh", "hdf5", extra_env=python_runtime_env
- )
+ python(spack.paths.spack_script, "solve", "--fresh", "hdf5", extra_env=python_runtime_env)
# Clean the build dir.
rmtree(self.build_directory, ignore_errors=True)
- if self.spec.compiler.name in ("clang", "apple-clang"):
+ if self.spec.satisfies("%clang") or self.spec.satisfies("apple-clang"):
# merge reports
use_report = join_path(reports, "merged.prof")
raw_files = glob.glob(join_path(reports, "*.profraw"))
@@ -151,9 +135,7 @@ class ClingoBootstrap(Clingo):
cmake.add_default_envmod(use_mods)
def setup_build_environment(self, env):
- if "%apple-clang" in self.spec:
- env.append_flags("CFLAGS", "-mmacosx-version-min=10.13")
- env.append_flags("CXXFLAGS", "-mmacosx-version-min=10.13")
- env.append_flags("LDFLAGS", "-mmacosx-version-min=10.13")
- elif self.spec.compiler.name in ("gcc", "clang") and "+static_libstdcpp" in self.spec:
+ if (
+ self.spec.satisfies("%gcc") or self.spec.satisfies("%clang")
+ ) and "+static_libstdcpp" in self.spec:
env.append_flags("LDFLAGS", "-static-libstdc++ -static-libgcc -Wl,--exclude-libs,ALL")
diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch
new file mode 100644
index 0000000000..60be38ee1a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch
@@ -0,0 +1,35 @@
+diff --git a/libclingo/CMakeLists.txt b/libclingo/CMakeLists.txt
+index 041fd6f0..e8c4caf6 100644
+--- a/libclingo/CMakeLists.txt
++++ b/libclingo/CMakeLists.txt
+@@ -50,6 +50,19 @@ target_include_directories(libclingo
+ PRIVATE
+ "$<BUILD_INTERFACE:${CLASP_SOURCE_DIR}/app>")
+ target_compile_definitions(libclingo PRIVATE CLINGO_BUILD_LIBRARY)
++
++# Hide private symbols on Linux.
++include(CheckCSourceCompiles)
++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version.map" "{ global: f; local: *;};")
++set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/version.map'")
++check_c_source_compiles("void f(void) {} int main(void) {return 0;}" HAVE_LD_VERSION_SCRIPT)
++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
++file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/version.map")
++if(HAVE_LD_VERSION_SCRIPT)
++set_target_properties(libclingo PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_SOURCE_DIR}/clingo.map'")
++endif()
++
+ if (NOT CLINGO_BUILD_SHARED)
+ target_compile_definitions(libclingo PUBLIC CLINGO_NO_VISIBILITY)
+ else()
+diff --git a/libclingo/clingo.map b/libclingo/clingo.map
+new file mode 100644
+index 00000000..a665456c
+--- /dev/null
++++ b/libclingo/clingo.map
+@@ -0,0 +1,4 @@
++{
++ global: clingo_*; gringo_*; g_clingo_*;
++ local: *;
++};
+\ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py
index 46b3f5278b..73ff2b1769 100644
--- a/var/spack/repos/builtin/packages/clingo/package.py
+++ b/var/spack/repos/builtin/packages/clingo/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.compiler import UnsupportedCompilerFlag
from spack.package import *
@@ -29,6 +27,9 @@ class Clingo(CMakePackage):
version("master", branch="master", submodules=True)
version("spack", commit="2a025667090d71b2c9dce60fe924feb6bde8f667", submodules=True)
+
+ version("5.7.1", sha256="544b76779676075bb4f557f05a015cbdbfbd0df4b2cc925ad976e86870154d81")
+ version("5.7.0", sha256="ed5401bda54315184697fd69ff0f15389c62779e812058a5f296ba587ed9c10b")
version("5.6.2", sha256="81eb7b14977ac57c97c905bd570f30be2859eabc7fe534da3cdc65eaca44f5be")
version("5.5.2", sha256="a2a0a590485e26dce18860ac002576232d70accc5bfcb11c0c22e66beb23baa6")
version("5.5.1", sha256="b9cf2ba2001f8241b8b1d369b6f353e628582e2a00f13566e51c03c4dd61f67e")
@@ -38,13 +39,15 @@ class Clingo(CMakePackage):
version("5.3.0", sha256="b0d406d2809352caef7fccf69e8864d55e81ee84f4888b0744894977f703f976")
version("5.2.2", sha256="da1ef8142e75c5a6f23c9403b90d4f40b9f862969ba71e2aaee9a257d058bfcf")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="build documentation with Doxygen")
variant("python", default=True, description="build with python bindings")
# See https://github.com/potassco/clingo/blob/v5.5.2/INSTALL.md
depends_on("cmake@3.1:", type="build")
depends_on("cmake@3.18:", type="build", when="@5.5:")
- depends_on("py-setuptools", when="@5.6.2:", type="build")
depends_on("doxygen", type="build", when="+docs")
@@ -53,7 +56,6 @@ class Clingo(CMakePackage):
depends_on("bison@2.5:", type="build", when="platform=linux")
depends_on("bison@2.5:", type="build", when="platform=darwin")
depends_on("bison@2.5:", type="build", when="platform=freebsd")
- depends_on("bison@2.5:", type="build", when="platform=cray")
with when("platform=windows"):
depends_on("re2c@0.13:", type="build")
@@ -67,23 +69,25 @@ class Clingo(CMakePackage):
depends_on("py-cffi", type=("build", "run"), when="@5.5.0: platform=linux")
depends_on("py-cffi", type=("build", "run"), when="@5.5.0: platform=darwin")
depends_on("py-cffi", type=("build", "run"), when="@5.5.0: platform=freebsd")
- depends_on("py-cffi", type=("build", "run"), when="@5.5.0: platform=cray")
patch("python38.patch", when="@5.3:5.4.0")
patch("size-t.patch", when="%msvc")
patch("vs2022.patch", when="%msvc@19.30:")
- patch("clingo_msc_1938_native_handle.patch", when="%msvc@19.38:")
-
- # TODO: Simplify this after Spack 0.21 release. The old concretizer has problems with
- # py-setuptools ^python@3.6, so we only apply the distutils -> setuptools patch for Python 3.12
- with when("@:5.6.1 ^python@3.12:"):
- patch("setuptools-2.patch")
- depends_on("py-setuptools", type="build")
+ patch("clingo_msc_1938_native_handle.patch", when="@:5.7.0 %msvc@19.38:")
def patch(self):
+ # In bootstrap/prototypes/*.json we don't want to have specs that work for any python
+ # version, so this conditional patch lives here instead of being its own directive.
+ if self.spec.satisfies("@spack,5.3:5.4 ^python@3.9:"):
+ filter_file(
+ "if (!PyEval_ThreadsInitialized()) { PyEval_InitThreads(); }",
+ "",
+ "libpyclingo/pyclingo.cc",
+ string=True,
+ )
# Doxygen is optional but can't be disabled with a -D, so patch
# it out if it's really supposed to be disabled
- if "+docs" not in self.spec:
+ if self.spec.satisfies("~docs"):
filter_file(
r"find_package\(Doxygen\)",
'message("Doxygen disabled for Spack build.")',
@@ -92,22 +96,6 @@ class Clingo(CMakePackage):
)
@property
- def cmake_python_hints(self):
- """Return standard CMake defines to ensure that the
- current spec is the one found by CMake find_package(Python, ...)
- """
- python = self.spec["python"]
- return [
- self.define("Python_EXECUTABLE", python.command.path),
- self.define("Python_INCLUDE_DIR", python.headers.directories[0]),
- self.define("Python_LIBRARIES", python.libs[0]),
- # XCode command line tools on macOS has no python-config executable, and
- # CMake assumes you have python 2 if it does not find a python-config,
- # so we set the version explicitly so that it's passed to FindPython.
- self.define("CLINGO_PYTHON_VERSION", python.version.up_to(2)),
- ]
-
- @property
def cmake_py_shared(self):
return self.define("CLINGO_BUILD_PY_SHARED", "ON")
@@ -117,30 +105,30 @@ class Clingo(CMakePackage):
except UnsupportedCompilerFlag:
InstallError("clingo requires a C++14-compliant C++ compiler")
- args = ["-DCLINGO_BUILD_WITH_LUA=OFF"]
+ args = [self.define("CLINGO_BUILD_WITH_LUA", False)]
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
+ suffix = python(
+ "-c", "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))", output=str
+ ).strip()
args += [
- "-DCLINGO_REQUIRE_PYTHON=ON",
- "-DCLINGO_BUILD_WITH_PYTHON=ON",
- "-DPYCLINGO_USER_INSTALL=OFF",
- "-DPYCLINGO_USE_INSTALL_PREFIX=ON",
+ self.define("CLINGO_REQUIRE_PYTHON", True),
+ self.define("CLINGO_BUILD_WITH_PYTHON", True),
+ self.define("PYCLINGO_USER_INSTALL", False),
+ self.define("PYCLINGO_USE_INSTALL_PREFIX", True),
+ self.define("PYCLINGO_INSTALL_DIR", python_platlib),
+ self.define("PYCLINGO_SUFFIX", suffix),
self.cmake_py_shared,
]
- if self.spec["cmake"].satisfies("@3.16.0:"):
- args += self.cmake_python_hints
else:
- args += ["-DCLINGO_BUILD_WITH_PYTHON=OFF"]
+ args += [self.define("CLINGO_BUILD_WITH_PYTHON", False)]
# Use LTO also for non-Intel compilers please. This can be removed when they
# bump cmake_minimum_required to VERSION 3.9.
- if "+ipo" in self.spec:
- args.append("-DCMAKE_POLICY_DEFAULT_CMP0069=NEW")
+ if self.spec.satisfies("+ipo"):
+ args.append(self.define("CMAKE_POLICY_DEFAULT_CMP0069", "NEW"))
return args
def win_add_library_dependent(self):
- if "+python" in self.spec:
- return [os.path.join(self.prefix, self.spec["python"].package.platlib)]
- else:
- return []
+ return [python_platlib] if "+python" in self.spec else []
diff --git a/var/spack/repos/builtin/packages/clingo/setuptools-2.patch b/var/spack/repos/builtin/packages/clingo/setuptools-2.patch
deleted file mode 100644
index 6c6377936f..0000000000
--- a/var/spack/repos/builtin/packages/clingo/setuptools-2.patch
+++ /dev/null
@@ -1,8 +0,0 @@
-diff --git a/cmake/python-site.py b/cmake/python-site.py
---- a/cmake/python-site.py
-+++ b/cmake/python-site.py
-@@ -1,3 +1,4 @@
-+import setuptools # makes import distutils work
- from distutils.sysconfig import get_python_lib, get_config_vars
- import sys
- if sys.argv[1] == "prefix": \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/cln/package.py b/var/spack/repos/builtin/packages/cln/package.py
index b5ce6793e9..bb03afc7f2 100644
--- a/var/spack/repos/builtin/packages/cln/package.py
+++ b/var/spack/repos/builtin/packages/cln/package.py
@@ -16,12 +16,14 @@ class Cln(AutotoolsPackage):
more."""
homepage = "https://www.ginac.de/CLN/"
- url = "https://www.ginac.de/CLN/cln-1.3.6.tar.bz2"
+ url = "https://www.ginac.de/CLN/cln-1.3.7.tar.bz2"
git = "git://www.ginac.de/cln.git"
+ maintainers("prudhomm")
license("GPL-2.0-or-later")
version("master", branch="master")
+ version("1.3.7", commit="bc36e1e941c9296f37198c3125ac7f2b2ca4f48b")
version("1.3.6", commit="d4ba1cc869be2c647c4ab48ac571b1fc9c2021a9")
version("1.3.5", commit="b221c033c082b462455502b7e63702a9c466aede")
version("1.3.4", commit="9b86a7fc69feb1b288469982001af565f73057eb")
@@ -33,6 +35,9 @@ class Cln(AutotoolsPackage):
version("1.2.1", commit="567378ab4cbfd443c3d82d810599860c769251fe")
version("1.2.0", commit="679a0a8927f011fb32411f8a31070c77a9901094")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("gmp", default=True, description="Enable GMP multiprecision library")
depends_on("autoconf", type="build")
@@ -73,7 +78,7 @@ class Cln(AutotoolsPackage):
configure_args = []
- if "+gmp" in spec:
+ if spec.satisfies("+gmp"):
configure_args.append("--with-gmp={0}".format(spec["gmp"].prefix))
else:
configure_args.append("--without-gmp")
diff --git a/var/spack/repos/builtin/packages/cloc/package.py b/var/spack/repos/builtin/packages/cloc/package.py
index ea565a768e..ce99e6b880 100644
--- a/var/spack/repos/builtin/packages/cloc/package.py
+++ b/var/spack/repos/builtin/packages/cloc/package.py
@@ -14,12 +14,19 @@ class Cloc(Package):
homepage = "https://github.com/AlDanial/cloc/"
url = "https://github.com/AlDanial/cloc/archive/v1.90.tar.gz"
+ license("GPL-2.0")
+
+ version("2.00", sha256="ed2422fb5d35b65379d0e63875d78a9f6037e711de47db806d4cb204dddfcc9c")
version("1.96.1", sha256="f0551d98dcce9ca2e78b984adf8e8cc7c6002037a1155e5294338c435e4a1af1")
version("1.90", sha256="60b429dd2aa5cd65707b359dcbcbeb710c8e4db880886528ced0962c67e52548")
version("1.84", sha256="c3f0a6bd2319110418ccb3e55a7a1b6d0edfd7528bfd2ae5d530938abe90f254")
version("1.80", sha256="082f53530eee3f9ee84ec449eca59a77ff114250cd7daf9519679537b5b21d67")
version("1.74", sha256="55ac423d5766c74236700a47838ed66bea47ba42e1d594fdd894074ba3eb0567")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("perl")
def install(self, spec, prefix):
@@ -32,5 +39,5 @@ class Cloc(Package):
mkdirp(prefix.bin)
install("cloc", join_path(prefix.bin, "cloc"))
install("sqlite_formatter", join_path(prefix.bin, "sqlite_formatter"))
- install("./LICENSE", "%s" % prefix)
- install("./README.md", "%s" % prefix)
+ install("./LICENSE", f"{prefix}")
+ install("./README.md", f"{prefix}")
diff --git a/var/spack/repos/builtin/packages/cloog/package.py b/var/spack/repos/builtin/packages/cloog/package.py
index f18ba78ebc..191ea89fe5 100644
--- a/var/spack/repos/builtin/packages/cloog/package.py
+++ b/var/spack/repos/builtin/packages/cloog/package.py
@@ -21,6 +21,9 @@ class Cloog(Package):
version("0.18.0", sha256="1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228")
version("0.17.0", sha256="f265f5069830c03d2919a7673c0963495437d6d79a8cbd3474cde2d4e3291e04")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("gmp")
depends_on("isl")
diff --git a/var/spack/repos/builtin/packages/cloverleaf-ref/package.py b/var/spack/repos/builtin/packages/cloverleaf-ref/package.py
index 77456edb16..4028e319e2 100644
--- a/var/spack/repos/builtin/packages/cloverleaf-ref/package.py
+++ b/var/spack/repos/builtin/packages/cloverleaf-ref/package.py
@@ -26,6 +26,9 @@ class CloverleafRef(MakefilePackage):
"1.1", sha256="0ac87accf81d85b959e5da839e6b0659afb3a2840a13f5da113a1c34eeb87942"
) # commit "5667c3a"
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"ieee", default=False, description="Build with IEEE754 compliant floating point operations"
)
@@ -42,9 +45,9 @@ class CloverleafRef(MakefilePackage):
targets.append("MPI_COMPILER={0}".format(self.spec["mpi"].mpifc))
targets.append("C_MPI_COMPILER={0}".format(self.spec["mpi"].mpicc))
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
targets.append("DEBUG=1")
- if "+ieee" in self.spec:
+ if self.spec.satisfies("+ieee"):
targets.append("IEEE=1")
# Work around for bug in Makefiles for versions 1.3 and 1.1 (mis-defined as -openmp)
@@ -94,15 +97,9 @@ class CloverleafRef(MakefilePackage):
targets.append("COMPILER=CRAY")
targets.append("OMP_CRAY=-fopenmp")
- elif self.spec.satisfies("%pgi"):
- targets.append("COMPILER=PGI")
-
elif self.spec.satisfies("%xl"):
targets.append("COMPILER=XLF")
- else:
- raise ValueError("Compiler {} not supported".format(self.spec.compiler.name))
-
return targets
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cloverleaf/package.py b/var/spack/repos/builtin/packages/cloverleaf/package.py
index 4848130837..042733a9e0 100644
--- a/var/spack/repos/builtin/packages/cloverleaf/package.py
+++ b/var/spack/repos/builtin/packages/cloverleaf/package.py
@@ -24,6 +24,10 @@ class Cloverleaf(MakefilePackage):
version("master", branch="master", submodules=True)
version("1.1", sha256="de87f7ee6b917e6b3d243ccbbe620370c62df890e3ef7bdbab46569b57be132f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build",
default="ref",
@@ -54,15 +58,15 @@ class Cloverleaf(MakefilePackage):
def type_of_build(self):
build = "ref"
- if "build=cuda" in self.spec:
+ if self.spec.satisfies("build=cuda"):
build = "CUDA"
- elif "build=mpi_only" in self.spec:
+ elif self.spec.satisfies("build=mpi_only"):
build = "MPI"
- elif "build=openacc_cray" in self.spec:
+ elif self.spec.satisfies("build=openacc_cray"):
build = "OpenACC_CRAY"
- elif "build=openmp_only" in self.spec:
+ elif self.spec.satisfies("build=openmp_only"):
build = "OpenMP"
- elif "build=serial" in self.spec:
+ elif self.spec.satisfies("build=serial"):
build = "Serial"
return build
@@ -71,42 +75,38 @@ class Cloverleaf(MakefilePackage):
def build_targets(self):
targets = ["--directory=CloverLeaf_{0}".format(self.type_of_build)]
- if "mpi" in self.spec:
+ if self.spec.satisfies("^mpi"):
targets.append("MPI_COMPILER={0}".format(self.spec["mpi"].mpifc))
targets.append("C_MPI_COMPILER={0}".format(self.spec["mpi"].mpicc))
else:
targets.append("MPI_COMPILER=f90")
targets.append("C_MPI_COMPILER=cc")
- if "%gcc" in self.spec:
+ if self.spec.satisfies("%gcc"):
targets.append("COMPILER=GNU")
targets.append("FLAGS_GNU=")
targets.append("CFLAGS_GNU=")
- elif "%cce" in self.spec:
+ elif self.spec.satisfies("%cce"):
targets.append("COMPILER=CRAY")
targets.append("FLAGS_CRAY=")
targets.append("CFLAGS_CRAY=")
- elif "%intel" in self.spec:
+ elif self.spec.satisfies("%intel"):
targets.append("COMPILER=INTEL")
targets.append("FLAGS_INTEL=")
targets.append("CFLAGS_INTEL=")
- elif "%aocc" in self.spec:
+ elif self.spec.satisfies("%aocc"):
targets.append("COMPILER=AOCC")
- elif "%pgi" in self.spec:
- targets.append("COMPILER=PGI")
- targets.append("FLAGS_PGI=")
- targets.append("CFLAGS_PGI=")
- elif "%xl" in self.spec:
+ elif self.spec.satisfies("%xl"):
targets.append("COMPILER=XLF")
targets.append("FLAGS_XLF=")
targets.append("CFLAGS_XLF=")
# Explicit mention of else clause is not working as expected
# So, not mentioning them
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
targets.append("DEBUG=1")
- if "+ieee" in self.spec:
+ if self.spec.satisfies("+ieee"):
targets.append("IEEE=1")
return targets
diff --git a/var/spack/repos/builtin/packages/cloverleaf3d/package.py b/var/spack/repos/builtin/packages/cloverleaf3d/package.py
index 5eb8bcef88..f52e3df2db 100644
--- a/var/spack/repos/builtin/packages/cloverleaf3d/package.py
+++ b/var/spack/repos/builtin/packages/cloverleaf3d/package.py
@@ -25,6 +25,10 @@ class Cloverleaf3d(MakefilePackage):
version("1.0", sha256="78d591728c61bdfd6175b3930df7652e09ed04fbcd01b3fc86fb2aa0f237a8ef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("opencl", default=False, description="Enable OpenCL Support")
variant("openacc", default=False, description="Enable OpenACC Support")
@@ -35,9 +39,9 @@ class Cloverleaf3d(MakefilePackage):
def type_of_build(self):
build = "ref"
- if "+opencl" in self.spec:
+ if self.spec.satisfies("+opencl"):
build = "OpenCL"
- elif "+openacc" in self.spec:
+ elif self.spec.satisfies("+openacc"):
build = "OpenACC"
return build
@@ -50,33 +54,29 @@ class Cloverleaf3d(MakefilePackage):
"--directory=CloverLeaf3D_{0}".format(self.type_of_build),
]
- if "%gcc" in self.spec:
+ if self.spec.satisfies("%gcc"):
targets.append("COMPILER=GNU")
targets.append("FLAGS_GNU=-O3 -funroll-loops")
targets.append("CFLAGS_GNU=-O3 -funroll-loops")
targets.append("OMP_GNU=-fopenmp")
- elif "%cce" in self.spec:
+ elif self.spec.satisfies("%cce"):
targets.append("COMPILER=CRAY")
targets.append("FLAGS_CRAY=")
targets.append("CFLAGS_CRAY=")
- elif "%intel" in self.spec:
+ elif self.spec.satisfies("%intel"):
targets.append("COMPILER=INTEL")
targets.append("FLAGS_INTEL=")
targets.append("CFLAGS_INTEL=")
- elif "%pgi" in self.spec:
- targets.append("COMPILER=PGI")
- targets.append("FLAGS_PGI=")
- targets.append("CFLAGS_PGI=")
- elif "%xl" in self.spec:
+ elif self.spec.satisfies("%xl"):
targets.append("COMPILER=XLF")
targets.append("FLAGS_XLF=")
targets.append("CFLAGS_XLF=")
- elif "%arm" in self.spec:
+ elif self.spec.satisfies("%arm"):
targets.append("COMPILER=ARM")
targets.append("FLAGS_ARM=-O3 -funroll-loops")
targets.append("CFLAGS_ARM=-O3 -funroll-loops")
targets.append("OMP_ARM=-fopenmp")
- elif "%nvhpc" in self.spec:
+ elif self.spec.satisfies("%nvhpc"):
targets.append("COMPILER=NVHPC")
targets.append("FLAGS_NVHPC=-O3 -fast")
targets.append("CFLAGS_NVHPC=-O3 -fast")
diff --git a/var/spack/repos/builtin/packages/clp/package.py b/var/spack/repos/builtin/packages/clp/package.py
index f245a38657..a60c6e56b5 100644
--- a/var/spack/repos/builtin/packages/clp/package.py
+++ b/var/spack/repos/builtin/packages/clp/package.py
@@ -13,16 +13,20 @@ class Clp(AutotoolsPackage):
homepage = "https://projects.coin-or.org/Clp"
url = "https://github.com/coin-or/Clp/archive/releases/1.17.6.tar.gz"
- depends_on("pkgconfig", type="build")
- depends_on("coinutils")
- depends_on("osi")
- depends_on("pkgconfig", type="build")
-
license("EPL-2.0")
+ version("1.17.9", sha256="b02109be54e2c9c6babc9480c242b2c3c7499368cfca8c0430f74782a694a49f")
version("1.17.7", sha256="c4c2c0e014220ce8b6294f3be0f3a595a37bef58a14bf9bac406016e9e73b0f5")
version("1.17.6", sha256="afff465b1620cfcbb7b7c17b5d331d412039650ff471c4160c7eb24ae01284c9")
version("1.17.4", sha256="ef412cde00cb1313d9041115a700d8d59d4b8b8b5e4dde43e9deb5108fcfbea8")
version("1.16.11", sha256="b525451423a9a09a043e6a13d9436e13e3ee7a7049f558ad41a110742fa65f39")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("pkgconfig", type="build")
+ depends_on("coinutils")
+ depends_on("osi")
+ depends_on("pkgconfig", type="build")
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/clustal-omega/package.py b/var/spack/repos/builtin/packages/clustal-omega/package.py
index 3cafd307e6..caf7e1e6e5 100644
--- a/var/spack/repos/builtin/packages/clustal-omega/package.py
+++ b/var/spack/repos/builtin/packages/clustal-omega/package.py
@@ -16,4 +16,7 @@ class ClustalOmega(AutotoolsPackage):
version("1.2.4", sha256="8683d2286d663a46412c12a0c789e755e7fd77088fb3bc0342bb71667f05a3ee")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("argtable")
diff --git a/var/spack/repos/builtin/packages/clustalw/package.py b/var/spack/repos/builtin/packages/clustalw/package.py
index ece7896b68..adf5b8d79b 100644
--- a/var/spack/repos/builtin/packages/clustalw/package.py
+++ b/var/spack/repos/builtin/packages/clustalw/package.py
@@ -15,3 +15,5 @@ class Clustalw(AutotoolsPackage):
license("LGPL-3.0-only")
version("2.1", sha256="e052059b87abfd8c9e695c280bfba86a65899138c82abccd5b00478a80f49486")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cmake/mr-9623.patch b/var/spack/repos/builtin/packages/cmake/mr-9623.patch
new file mode 100644
index 0000000000..c36e22c59f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cmake/mr-9623.patch
@@ -0,0 +1,67 @@
+diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
+index a71e5f1280..003f47b439 100644
+--- a/Source/cmELF.cxx
++++ b/Source/cmELF.cxx
+@@ -112,6 +112,9 @@ public:
+ virtual bool IsMips() const = 0;
+ virtual void PrintInfo(std::ostream& os) const = 0;
+
++ /** Returns true if the ELF file has a dynamic section **/
++ bool HasDynamicSection() const { return this->DynamicSectionIndex >= 0; }
++
+ // Lookup the SONAME in the DYNAMIC section.
+ StringEntry const* GetSOName()
+ {
+@@ -461,7 +464,7 @@ template <class Types>
+ bool cmELFInternalImpl<Types>::LoadDynamicSection()
+ {
+ // If there is no dynamic section we are done.
+- if (this->DynamicSectionIndex < 0) {
++ if (!this->HasDynamicSection()) {
+ return false;
+ }
+
+@@ -772,6 +775,11 @@ std::vector<char> cmELF::EncodeDynamicEntries(
+ return std::vector<char>();
+ }
+
++bool cmELF::HasDynamicSection() const
++{
++ return this->Valid() && this->Internal->HasDynamicSection();
++}
++
+ bool cmELF::GetSOName(std::string& soname)
+ {
+ if (StringEntry const* se = this->GetSOName()) {
+diff --git a/Source/cmELF.h b/Source/cmELF.h
+index ce8bd7fb92..dd37c65302 100644
+--- a/Source/cmELF.h
++++ b/Source/cmELF.h
+@@ -88,6 +88,9 @@ public:
+ std::vector<char> EncodeDynamicEntries(
+ const DynamicEntryList& entries) const;
+
++ /** Returns true if the ELF file has a dynamic section **/
++ bool HasDynamicSection() const;
++
+ /** Get the SONAME field if any. */
+ bool GetSOName(std::string& soname);
+ StringEntry const* GetSOName();
+diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
+index 093a18b82b..3affef0394 100644
+--- a/Source/cmSystemTools.cxx
++++ b/Source/cmSystemTools.cxx
+@@ -2817,6 +2817,10 @@ cm::optional<bool> AdjustRPathELF(std::string const& file,
+ return cm::nullopt; // Not a valid ELF file.
+ }
+
++ if (!elf.HasDynamicSection()) {
++ return true; // No dynamic section to update.
++ }
++
+ // Get the RPATH and RUNPATH entries from it.
+ int se_count = 0;
+ cmELF::StringEntry const* se[2] = { nullptr, nullptr };
+--
+2.40.1
+
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index b9460331cc..ba0b028bc1 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -4,10 +4,12 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import pathlib
import re
import sys
import spack.build_environment
+from spack.build_systems.cmake import get_cmake_prefix_path
from spack.package import *
@@ -29,147 +31,88 @@ class Cmake(Package):
license("BSD-3-Clause")
version("master", branch="master")
+ version("3.31.0", sha256="300b71db6d69dcc1ab7c5aae61cbc1aa2778a3e00cbd918bc720203e311468c3")
+ version("3.30.5", sha256="9f55e1a40508f2f29b7e065fa08c29f82c402fa0402da839fffe64a25755a86d")
+ version("3.30.4", sha256="c759c97274f1e7aaaafcb1f0d261f9de9bf3a5d6ecb7e2df616324a46fe704b2")
+ version("3.30.3", sha256="6d5de15b6715091df7f5441007425264bdd477809f80333fdf95f846aaff88e4")
+ version("3.30.2", sha256="46074c781eccebc433e98f0bbfa265ca3fd4381f245ca3b140e7711531d60db2")
+ version("3.30.1", sha256="df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1")
+ version("3.30.0", sha256="157e5be6055c154c34f580795fe5832f260246506d32954a971300ed7899f579")
+ version("3.29.6", sha256="1391313003b83d48e2ab115a8b525a557f78d8c1544618b48d1d90184a10f0af")
+ version("3.29.5", sha256="dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e")
+ version("3.29.4", sha256="b1b48d7100bdff0b46e8c8f6a3c86476dbe872c8df39c42b8d104298b3d56a2c")
+ version("3.28.6", sha256="c39c733900affc4eb0e9688b4d1a45435a732105d9bf9cc1e75dd2b9b81a36bb")
version("3.27.9", sha256="609a9b98572a6a5ea477f912cffb973109ed4d0a6a6b3f9e2353d2cdc048708e")
- version("3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc")
- version("3.27.7", sha256="08f71a106036bf051f692760ef9558c0577c42ac39e96ba097e7662bd4158d8e")
- version("3.27.6", sha256="ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb")
- version("3.27.4", sha256="0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af")
- version("3.27.3", sha256="66afdc0f181461b70b6fedcde9ecc4226c5cd184e7203617c83b7d8e47f49521")
- version("3.27.2", sha256="798e50085d423816fe96c9ef8bee5e50002c9eca09fed13e300de8a91d35c211")
- version("3.27.1", sha256="b1a6b0135fa11b94476e90f5b32c4c8fad480bf91cf22d0ded98ce22c5132004")
- version("3.27.0", sha256="aaeddb6b28b993d0a6e32c88123d728a17561336ab90e0bf45032383564d3cb8")
version("3.26.6", sha256="070b9a2422e666d2c1437e2dab239a236e8a63622d0a8d0ffe9e389613d2b76a")
- version("3.26.5", sha256="c0970b1e44a7fbca4322997ce05dac521b04748fe424922152faf22d20782bf9")
- version("3.26.4", sha256="313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208")
- version("3.26.3", sha256="bbd8d39217509d163cb544a40d6428ac666ddc83e22905d3e52c925781f0f659")
- version("3.26.2", sha256="d54f25707300064308ef01d4d21b0f98f508f52dda5d527d882b9d88379f89a8")
- version("3.26.1", sha256="f29964290ad3ced782a1e58ca9fda394a82406a647e24d6afd4e6c32e42c412f")
- version("3.26.0", sha256="4256613188857e95700621f7cdaaeb954f3546a9249e942bc2f9b3c26e381365")
version("3.25.3", sha256="cc995701d590ca6debc4245e9989939099ca52827dd46b5d3592f093afe1901c")
- version("3.25.2", sha256="c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c")
- version("3.25.1", sha256="1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8")
- version("3.25.0", sha256="306463f541555da0942e6f5a0736560f70c487178b9d94a5ae7f34d0538cdd48")
version("3.24.4", sha256="32c9e499510eff7070d3f0adfbabe0afea2058608c5fa93e231beb49fbfa2296")
- version("3.24.3", sha256="b53aa10fa82bff84ccdb59065927b72d3bee49f4d86261249fc0984b3b367291")
- version("3.24.2", sha256="0d9020f06f3ddf17fb537dc228e1a56c927ee506b486f55fe2dc19f69bf0c8db")
- version("3.24.1", sha256="4931e277a4db1a805f13baa7013a7757a0cbfe5b7932882925c7061d9d1fa82b")
- version("3.24.0", sha256="c2b61f7cdecb1576cad25f918a8f42b8685d88a832fd4b62b9e0fa32e915a658")
version("3.23.5", sha256="f2944cde7a140b992ba5ccea2009a987a92413762250de22ebbace2319a0f47d")
- version("3.23.4", sha256="aa8b6c17a5adf04de06e42c06adc7e25b21e4fe8378f44f703a861e5f6ac59c7")
- version("3.23.3", sha256="06fefaf0ad94989724b56f733093c2623f6f84356e5beb955957f9ce3ee28809")
- version("3.23.2", sha256="f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa")
- version("3.23.1", sha256="33fd10a8ec687a4d0d5b42473f10459bb92b3ae7def2b745dc10b192760869f3")
- version("3.23.0", sha256="5ab0a12f702f44013be7e19534cd9094d65cc9fe7b2cd0f8c9e5318e0fe4ac82")
version("3.22.6", sha256="73933163670ea4ea95c231549007b0c7243282293506a2cf4443714826ad5ec3")
- version("3.22.5", sha256="d3987c3f7759fa0a401c5fcd5076be44a19613bfaa8baee1b5d1835750dc5375")
- version("3.22.4", sha256="5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47")
- version("3.22.3", sha256="9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0")
- version("3.22.2", sha256="3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced")
- version("3.22.1", sha256="0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0")
- version("3.22.0", sha256="998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e")
version("3.21.7", sha256="3523c4a5afc61ac3d7c92835301cdf092129c9b672a6ee17e68c92e928c1375a")
- version("3.21.6", sha256="b7c3ac35ca7ed3cce8c192c9c873e6061aaecc8b2bc564290e629b10bff59f3c")
- version("3.21.5", sha256="c73587b5ab827d56c09f0a1e256b12743ff200495e31fc9686f2b9dc8a28897f")
- version("3.21.4", sha256="d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978")
- version("3.21.3", sha256="d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f")
- version("3.21.2", sha256="94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659")
- version("3.21.1", sha256="fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4")
- version("3.21.0", sha256="4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab")
version("3.20.6", sha256="a0bd485e1a38dd13c0baec89d5f4adbf61c7fd32fddb38eabc69a75bc0b65d72")
- version("3.20.5", sha256="12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0")
- version("3.20.4", sha256="87a4060298f2c6bb09d479de1400bc78195a5b55a65622a7dceeb3d1090a1b16")
- version("3.20.3", sha256="4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8")
- version("3.20.2", sha256="aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e")
- version("3.20.1", sha256="3f1808b9b00281df06c91dd7a021d7f52f724101000da7985a401678dfe035b0")
- version("3.20.0", sha256="9c06b2ddf7c337e31d8201f6ebcd3bba86a9a033976a9aee207fe0c6971f4755")
version("3.19.8", sha256="09b4fa4837aae55c75fb170f6a6e2b44818deba48335d1969deddfbb34e30369")
- version("3.19.7", sha256="58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e")
- version("3.19.6", sha256="ec87ab67c45f47c4285f204280c5cde48e1c920cfcfed1555b27fb3b1a1d20ba")
- version("3.19.5", sha256="c432296eb5dec6d71eae15d140f6297d63df44e9ffe3e453628d1dc8fc4201ce")
- version("3.19.4", sha256="7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1")
- version("3.19.3", sha256="3faca7c131494a1e34d66e9f8972ff5369e48d419ea8ceaa3dc15b4c11367732")
- version("3.19.2", sha256="e3e0fd3b23b7fb13e1a856581078e0776ffa2df4e9d3164039c36d3315e0c7f0")
- version("3.19.1", sha256="1d266ea3a76ef650cdcf16c782a317cb4a7aa461617ee941e389cb48738a3aba")
- version("3.19.0", sha256="fdda688155aa7e72b7c63ef6f559fca4b6c07382ea6dca0beb5f45aececaf493")
version("3.18.6", sha256="124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600")
- version("3.18.5", sha256="080bf24b0f73f4bf3ec368d2be1aa59369b9bb1cd693deeb6f18fe553ca74ab4")
- version("3.18.4", sha256="597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77")
- version("3.18.3", sha256="2c89f4e30af4914fd6fb5d00f863629812ada848eee4e2d29ec7e456d7fa32e5")
- version("3.18.2", sha256="5d4e40fc775d3d828c72e5c45906b4d9b59003c9433ff1b36a1cb552bbd51d7e")
- version("3.18.1", sha256="c0e3338bd37e67155b9d1e9526fec326b5c541f74857771b7ffed0c46ad62508")
- version("3.18.0", sha256="83b4ffcb9482a73961521d2bafe4a16df0168f03f56e6624c419c461e5317e29")
version("3.17.5", sha256="8c3083d98fd93c1228d5e4e40dbff2dd88f4f7b73b9fa24a2938627b8bc28f1a")
- version("3.17.4", sha256="86985d73d0a63ec99c236aab5287316e252164f33d7c4cb160954a980c71f36f")
- version("3.17.3", sha256="0bd60d512275dc9f6ef2a2865426a184642ceb3761794e6b65bff233b91d8c40")
- version("3.17.1", sha256="3aa9114485da39cbd9665a0bfe986894a282d5f0882b1dea960a739496620727")
- version("3.17.0", sha256="b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847")
version("3.16.9", sha256="1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f")
- version("3.16.8", sha256="177434021132686cb901fea7db9fa2345efe48d566b998961594d5cc346ac588")
- version("3.16.7", sha256="5f49c95a2933b1800f14840f3a389f4cef0b19093985a35053b43f38ec21358f")
- version("3.16.6", sha256="6f6ff1a197851b0fa8412ff5de602e6717a4eb9509b2c385b08589c4e7a16b62")
- version("3.16.5", sha256="5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc")
- version("3.16.4", sha256="9bcc8c114d9da603af9512083ed7d4a39911d16105466beba165ba8fe939ac2c")
- version("3.16.3", sha256="e54f16df9b53dac30fd626415833a6e75b0e47915393843da1825b096ee60668")
- version("3.16.2", sha256="8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9")
- version("3.16.1", sha256="a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd")
- version("3.16.0", sha256="6da56556c63cab6e9a3e1656e8763ed4a841ac9859fefb63cbe79472e67e8c5f")
version("3.15.7", sha256="71999d8a14c9b51708847371250a61533439a7331eb7702ac105cfb3cb1be54b")
- version("3.15.6", sha256="3fa17992ac97d3fc856ffba5d3b10578744ea5b4736818f01e6067f0253b2db5")
- version("3.15.5", sha256="fbdd7cef15c0ced06bb13024bfda0ecc0dedbcaaaa6b8a5d368c75255243beb4")
- version("3.15.4", sha256="8a211589ea21374e49b25fc1fc170e2d5c7462b795f1b29c84dd0e984301ed7a")
- version("3.15.3", sha256="13958243a01365b05652fa01b21d40fa834f70a9e30efa69c02604e64f58b8f5")
- version("3.15.2", sha256="539088cb29a68e6d6a8fba5c00951e5e5b1a92c68fa38a83e1ed2f355933f768")
- version("3.15.1", sha256="18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7")
- version("3.15.0", sha256="0678d74a45832cacaea053d85a5685f3ed8352475e6ddf9fcb742ffca00199b5")
version("3.14.7", sha256="9221993e0af3e6d10124d840ff24f5b2f3b884416fca04d3312cb0388dec1385")
- version("3.14.6", sha256="4e8ea11cabe459308671b476469eace1622e770317a15951d7b55a82ccaaccb9")
- version("3.14.5", sha256="505ae49ebe3c63c595fa5f814975d8b72848447ee13b6613b0f8b96ebda18c06")
- version("3.14.4", sha256="00b4dc9b0066079d10f16eed32ec592963a44e7967371d2f5077fd1670ff36d9")
- version("3.14.3", sha256="215d0b64e81307182b29b63e562edf30b3875b834efdad09b3fcb5a7d2f4b632")
- version("3.14.2", sha256="a3cbf562b99270c0ff192f692139e98c605f292bfdbc04d70da0309a5358e71e")
- version("3.14.1", sha256="7321be640406338fc12590609c42b0fae7ea12980855c1be363d25dcd76bb25f")
- version("3.14.0", sha256="aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502")
version("3.13.5", sha256="526db6a4b47772d1943b2f86de693e712f9dacf3d7c13b19197c9bef133766a5")
- version("3.13.4", sha256="fdd928fee35f472920071d1c7f1a6a2b72c9b25e04f7a37b409349aef3f20e9b")
- version("3.13.3", sha256="665f905036b1f731a2a16f83fb298b1fb9d0f98c382625d023097151ad016b25")
- version("3.13.2", sha256="c925e7d2c5ba511a69f43543ed7b4182a7d446c274c7480d0e42cd933076ae25")
- version("3.13.1", sha256="befe1ce6d672f2881350e94d4e3cc809697dd2c09e5b708b76c1dae74e1b2210")
- version("3.13.0", sha256="4058b2f1a53c026564e8936698d56c3b352d90df067b195cb749a97a3d273c90")
version("3.12.4", sha256="5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194")
- version("3.12.3", sha256="acbf13af31a741794106b76e5d22448b004a66485fc99f6d7df4d22e99da164a")
- version("3.12.2", sha256="0f97485799e51a7070cc11494f3e02349b0fc3a24cc12b082e737bf67a0581a4")
- version("3.12.1", sha256="c53d5c2ce81d7a957ee83e3e635c8cda5dfe20c9d501a4828ee28e1615e57ab2")
- version("3.12.0", sha256="d0781a90f6cdb9049d104ac16a150f9350b693498b9dea8a0331e799db6b9d69")
version("3.11.4", sha256="8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5")
- version("3.11.3", sha256="287135b6beb7ffc1ccd02707271080bbf14c21d80c067ae2c0040e5f3508c39a")
- version("3.11.2", sha256="5ebc22bbcf2b4c7a20c4190d42c084cf38680a85b1a7980a2f1d5b4a52bf5248")
- version("3.11.1", sha256="57bebc6ca4d1d42c6385249d148d9216087e0fda57a47dc5c858790a70217d0c")
- version("3.11.0", sha256="c313bee371d4d255be2b4e96fd59b11d58bc550a7c78c021444ae565709a656b")
version("3.10.3", sha256="0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8")
- version("3.10.2", sha256="80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b")
- version("3.10.1", sha256="7be36ee24b0f5928251b644d29f5ff268330a916944ef4a75e23ba01e7573284")
- version("3.10.0", sha256="b3345c17609ea0f039960ef470aa099de9942135990930a57c14575aae884987")
version("3.9.6", sha256="7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218")
- version("3.9.4", sha256="b5d86f12ae0072db520fdbdad67405f799eb728b610ed66043c20a92b4906ca1")
- version("3.9.2", sha256="954a5801a456ee48e76f01107c9a4961677dd0f3e115275bbd18410dc22ba3c1")
- version("3.9.0", sha256="167701525183dbb722b9ffe69fb525aa2b81798cf12f5ce1c020c93394dfae0f")
version("3.8.2", sha256="da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d")
- version("3.8.1", sha256="ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228")
- version("3.8.0", sha256="cab99162e648257343a20f61bcd0b287f5e88e36fcb2f1d77959da60b7f35969")
version("3.7.2", sha256="dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0")
- version("3.7.1", sha256="449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1")
version("3.6.1", sha256="28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11")
- version("3.6.0", sha256="fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670")
version("3.5.2", sha256="92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a")
- version("3.5.1", sha256="93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8")
- version("3.5.0", sha256="92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa")
version("3.4.3", sha256="b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa")
- version("3.4.0", sha256="a5b82bf6ace6c481cdb911fd5d372a302740cbefd387e05297cb37f7468d1cea")
version("3.3.1", sha256="cd65022c6a0707f1c7112f99e9c981677fdd5518f7ddfa0f778d4cee7113e3d6")
version("3.1.0", sha256="8bdc3fa3f2da81bc10c772a6b64cc9052acc2901d42e1e1b2588b40df224aad9")
version("3.0.2", sha256="6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e")
version("2.8.10.2", sha256="ce524fb39da06ee6d47534bbcec6e0b50422e18b62abc4781a4ba72ea2910eb1")
+ with default_args(deprecated=True):
+ version(
+ "3.29.3", sha256="252aee1448d49caa04954fd5e27d189dd51570557313e7b281636716a238bccb"
+ )
+ version(
+ "3.29.2", sha256="36db4b6926aab741ba6e4b2ea2d99c9193222132308b4dc824d4123cb730352e"
+ )
+ version(
+ "3.29.1", sha256="7fb02e8f57b62b39aa6b4cf71e820148ba1a23724888494735021e32ab0eefcc"
+ )
+ version(
+ "3.29.0", sha256="a0669630aae7baa4a8228048bf30b622f9e9fd8ee8cedb941754e9e38686c778"
+ )
+ version(
+ "3.28.4", sha256="eb9c787e078848dc493f4f83f8a4bbec857cd1f38ab6425ce8d2776a9f6aa6fb"
+ )
+ version(
+ "3.28.3", sha256="72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1"
+ )
+ version(
+ "3.28.2", sha256="1466f872dc1c226f373cf8fba4230ed216a8f108bd54b477b5ccdfd9ea2d124a"
+ )
+ version(
+ "3.28.1", sha256="15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad"
+ )
+ version(
+ "3.28.0", sha256="e1dcf9c817ae306e73a45c2ba6d280c65cf4ec00dd958eb144adaf117fb58e71"
+ )
+ # used in py-cmake, to be removed in Spack 0.23
+ version(
+ "3.22.2", sha256="3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced"
+ )
+ version(
+ "3.21.4", sha256="d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978"
+ )
+ version(
+ "3.18.0", sha256="83b4ffcb9482a73961521d2bafe4a16df0168f03f56e6624c419c461e5317e29"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant(
"build_type",
default="Release",
@@ -177,6 +120,23 @@ class Cmake(Package):
values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"),
)
+ # We default ownlibs to true because it greatly speeds up the CMake
+ # build, and CMake is built frequently. Also, CMake is almost always
+ # a build dependency, and its libs will not interfere with others in
+ # the build.
+ variant("ownlibs", default=True, description="Use CMake-provided third-party libraries")
+ variant(
+ "doc",
+ default=False,
+ description="Enables the generation of html and man page documentation",
+ )
+ variant(
+ "ncurses",
+ default=sys.platform != "win32",
+ description="Enables the build of the ncurses gui",
+ )
+ variant("qtgui", default=False, description="Enables the build of the Qt GUI")
+
# Revert the change that introduced a regression when parsing mpi link
# flags, see: https://gitlab.kitware.com/cmake/cmake/issues/19516
patch("cmake-revert-findmpi-link-flag-list.patch", when="@3.15.0")
@@ -193,23 +153,22 @@ class Cmake(Package):
when="@3.15.5",
)
- depends_on("ninja", when="platform=windows")
+ # Statically linked binaries error on install when CMAKE_INSTALL_RPATH is set
+ # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9623
+ patch("mr-9623.patch", when="@3.22.0:3.30")
- # We default ownlibs to true because it greatly speeds up the CMake
- # build, and CMake is built frequently. Also, CMake is almost always
- # a build dependency, and its libs will not interfere with others in
- # the build.
- variant("ownlibs", default=True, description="Use CMake-provided third-party libraries")
- variant(
- "doc",
- default=False,
- description="Enables the generation of html and man page documentation",
- )
- variant(
- "ncurses",
- default=sys.platform != "win32",
- description="Enables the build of the ncurses gui",
- )
+ depends_on("ninja", when="platform=windows")
+ depends_on("gmake", when="platform=linux")
+ depends_on("gmake", when="platform=darwin")
+ depends_on("gmake", when="platform=freebsd")
+
+ depends_on("qt", when="+qtgui")
+ # Qt depends on libmng, which is a CMake package;
+ # ensure we build using a non CMake build system
+ # when libmng is build as a transitive dependency of CMake
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ depends_on("libmng build_system=autotools", when="+qtgui")
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21135
conflicts(
@@ -239,7 +198,7 @@ class Cmake(Package):
with when("~ownlibs"):
depends_on("expat")
# expat/zlib are used in CMake/CTest, so why not require them in libarchive.
- for plat in ["darwin", "cray", "linux"]:
+ for plat in ["darwin", "linux", "freebsd"]:
with when("platform=%s" % plat):
depends_on("libarchive@3.1.0: xar=expat compression=zlib")
depends_on("libarchive@3.3.3:", when="@3.15.0:")
@@ -276,7 +235,7 @@ class Cmake(Package):
patch("fujitsu_add_linker_option.patch", when="%fj")
# Remove -A from the C++ flags we use when CXX_EXTENSIONS is OFF
- # Should be fixed in 3.19.
+ # Should be fixed in 3.19. This patch is needed also for nvhpc.
# https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5025
patch("pgi-cxx-ansi.patch", when="@3.15:3.18")
@@ -354,7 +313,7 @@ class Cmake(Package):
if jobs is not None:
args.append("--parallel={0}".format(jobs))
- if "+ownlibs" in spec:
+ if spec.satisfies("+ownlibs"):
# Build and link to the CMake-provided third-party libraries
args.append("--no-system-libs")
else:
@@ -367,17 +326,28 @@ class Cmake(Package):
# Whatever +/~ownlibs, use system curl.
args.append("--system-curl")
- args.append("--no-qt-gui")
- if "+doc" in spec:
+ if spec.satisfies("+doc"):
args.append("--sphinx-html")
args.append("--sphinx-man")
+ if spec.satisfies("+qtgui"):
+ args.append("--qt-gui")
+ else:
+ args.append("--no-qt-gui")
+
# Now for CMake arguments to pass after the initial bootstrap
args.append("--")
else:
args.append("-DCMAKE_INSTALL_PREFIX=%s" % self.prefix)
+ # Make CMake find its own dependencies.
+ prefixes = get_cmake_prefix_path(self)
+ rpaths = [
+ pathlib.Path(self.prefix, "lib").as_posix(),
+ pathlib.Path(self.prefix, "lib64").as_posix(),
+ ]
+
args.extend(
[
f"-DCMAKE_BUILD_TYPE={self.spec.variants['build_type'].value}",
@@ -385,17 +355,10 @@ class Cmake(Package):
# inside a ctest environment
"-DCMake_TEST_INSTALL=OFF",
f"-DBUILD_CursesDialog={'ON' if '+ncurses' in spec else 'OFF'}",
- ]
- )
-
- # Make CMake find its own dependencies.
- rpaths = spack.build_environment.get_rpaths(self)
- prefixes = spack.build_environment.get_cmake_prefix_path(self)
- args.extend(
- [
+ f"-DBUILD_QtDialog={'ON' if spec.satisfies('+qtgui') else 'OFF'}",
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON",
- "-DCMAKE_INSTALL_RPATH={0}".format(";".join(str(v) for v in rpaths)),
- "-DCMAKE_PREFIX_PATH={0}".format(";".join(str(v) for v in prefixes)),
+ f"-DCMAKE_INSTALL_RPATH={';'.join(rpaths)}",
+ f"-DCMAKE_PREFIX_PATH={';'.join(str(v) for v in prefixes)}",
]
)
diff --git a/var/spack/repos/builtin/packages/cmaq/package.py b/var/spack/repos/builtin/packages/cmaq/package.py
index 911fa28894..fe53a9f446 100644
--- a/var/spack/repos/builtin/packages/cmaq/package.py
+++ b/var/spack/repos/builtin/packages/cmaq/package.py
@@ -26,5 +26,8 @@ class Cmaq(Package):
url="https://github.com/USEPA/CMAQ/archive/CMAQv5.3_27Aug2019.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/cmark/package.py b/var/spack/repos/builtin/packages/cmark/package.py
index dbfed121ba..80bd320351 100644
--- a/var/spack/repos/builtin/packages/cmark/package.py
+++ b/var/spack/repos/builtin/packages/cmark/package.py
@@ -15,9 +15,13 @@ class Cmark(CMakePackage):
license("BSD-2-Clause")
+ version("0.31.0", sha256="bbcb8f8c03b5af33fcfcf11a74e9499f20a9043200b8552f78a6e8ba76e04d11")
version("0.29.0", sha256="2558ace3cbeff85610de3bda32858f722b359acdadf0c4691851865bb84924a6")
version("0.28.3", sha256="acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc")
version("0.28.2", sha256="fe4b04fcccb2dc72641096de02a8eefb53059e85f9dd904f0386dc86326cc414")
version("0.28.1", sha256="dda7b8b5974815b7cbc8f12f509ad419250571f258ee697db2efe3deae01aaf8")
version("0.28.0", sha256="68cf191f4a78494a43b7e1663506635e370f0ba4c67c9ee9518e295685bbfe0e")
version("0.27.1", sha256="669b4c19355e8cb90139fdd03b02283b97130e92ea99a104552a2976751446b5")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cmdlime/package.py b/var/spack/repos/builtin/packages/cmdlime/package.py
index 853d997b80..16718fdd66 100644
--- a/var/spack/repos/builtin/packages/cmdlime/package.py
+++ b/var/spack/repos/builtin/packages/cmdlime/package.py
@@ -16,3 +16,5 @@ class Cmdlime(CMakePackage):
license("MS-PL")
version("2.5.0", sha256="d5188d7f075142fcb546099a4ee2a967f8248109c0bee8c084e0e00f37603481")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cmdstan/package.py b/var/spack/repos/builtin/packages/cmdstan/package.py
index ad2e799d21..98a3f82fad 100644
--- a/var/spack/repos/builtin/packages/cmdstan/package.py
+++ b/var/spack/repos/builtin/packages/cmdstan/package.py
@@ -16,6 +16,10 @@ class Cmdstan(MakefilePackage):
version("2.30.1", sha256="bab76dcefa7f4c955595c0bf0496770507fc6ab0df5896e8cf8c2db0a17eedb9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("threads", default=True, description="enable thread support")
variant("opencl", default=False, description="enable OpenCl support")
variant("mpi", default=False, description="enable MPI support")
@@ -28,12 +32,12 @@ class Cmdstan(MakefilePackage):
filter_compiler_wrappers("local", relative_root="make")
def edit(self, spec, prefix):
- if spec.compiler.name == "intel":
+ if spec.satisfies("%intel"):
cxx_type = "icc"
else:
cxx_type = spec.compiler.name
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
cxx = spec["mpi"].mpicxx
else:
cxx = spack_cxx
@@ -49,13 +53,13 @@ class Cmdstan(MakefilePackage):
"TBB_CXX_TYPE={0}\n".format(cxx_type),
]
- if "+threads" in spec:
+ if spec.satisfies("+threads"):
make_options.append("STAN_THREADS=true\n")
- if "+opencl" in spec:
+ if spec.satisfies("+opencl"):
make_options.append("STAN_OPENCL=true\n")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
make_options.append("STAN_MPI=true\n")
filepath = join_path(self.stage.source_path, "make", "local")
diff --git a/var/spack/repos/builtin/packages/cminpack/package.py b/var/spack/repos/builtin/packages/cminpack/package.py
index 735a39fbea..ac9d099f88 100644
--- a/var/spack/repos/builtin/packages/cminpack/package.py
+++ b/var/spack/repos/builtin/packages/cminpack/package.py
@@ -19,6 +19,9 @@ class Cminpack(CMakePackage):
version("master", branch="master")
version("1.3.6", sha256="3c07fd21308c96477a2c900032e21d937739c233ee273b4347a0d4a84a32d09f")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=False, description="Build shared libraries")
variant("blas", default=True, description="Compile with BLAS")
diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py
index 2046ada5d7..a7fd47b85a 100644
--- a/var/spack/repos/builtin/packages/cmocka/package.py
+++ b/var/spack/repos/builtin/packages/cmocka/package.py
@@ -18,6 +18,8 @@ class Cmocka(CMakePackage):
version("1.1.1", sha256="f02ef48a7039aa77191d525c5b1aee3f13286b77a13615d11bc1148753fc0389")
version("1.1.0", sha256="e960d3bf1be618634a4b924f18bb4d6f20a825c109a8ad6d1af03913ba421330")
+ depends_on("c", type="build") # generated
+
depends_on("cmake@2.6.0:", type="build")
parallel = False
diff --git a/var/spack/repos/builtin/packages/cmockery/package.py b/var/spack/repos/builtin/packages/cmockery/package.py
index 55c531a980..cae17ca932 100644
--- a/var/spack/repos/builtin/packages/cmockery/package.py
+++ b/var/spack/repos/builtin/packages/cmockery/package.py
@@ -19,6 +19,8 @@ class Cmockery(AutotoolsPackage):
version("0.1.1", sha256="a801d17976f781fff6dc49042ff109e55ca4ebe8efb13757fa1a511ca52316be")
version("0.1.0", sha256="9e017d48e56ab9d2ebcf5286fa54e37d42fe308d3c01fbc367793da2b9ad95e7")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/cmor/package.py b/var/spack/repos/builtin/packages/cmor/package.py
index bb6e6b9689..817ffbe9a1 100644
--- a/var/spack/repos/builtin/packages/cmor/package.py
+++ b/var/spack/repos/builtin/packages/cmor/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -17,6 +18,7 @@ class Cmor(AutotoolsPackage):
license("BSD-3-Clause")
+ version("3.8.0", sha256="5f5a44e660104916dd0a3d0d942234db375d2a4ffb4f4113ec88cfdd93f99ef4")
version("3.7.2", sha256="5e19a9be8e6a8bd18a2035772732c34b87b3448319bf0b8fa12ccd4a351b8e86")
version("3.6.1", sha256="991035a41424f72ea6f0f85653fc13730eb035e63c7dff6ca740aa7a70976fb4")
version("3.6.0", sha256="1608904a35106e83d365f27522209c325bd4bfc19d022b1a8abfb12cdf85fe20")
@@ -26,6 +28,9 @@ class Cmor(AutotoolsPackage):
version("3.2.0", sha256="8d49899549dd4c08197739300d507e6fc2b4a5cfe2bfd3e6b44e8e3eaf79b132")
version("3.1.2", sha256="ee58b6d405f081e4e0633af931b7992f1a570953b71ece17c01ab9e15889211a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enable Fortran API")
variant("python", default=False, description="Enable PYTHON support", when="@3.4:")
@@ -46,22 +51,23 @@ class Cmor(AutotoolsPackage):
@run_before("configure")
def validate(self):
- if "+fortran" in self.spec and not self.compiler.fc:
+ if self.spec.satisfies("+fortran") and not self.compiler.fc:
msg = "cannot build a fortran variant without a fortran compiler"
raise RuntimeError(msg)
def configure_args(self):
- extra_args = ["--disable-debug"]
+ spec = self.spec
+ args = ["--disable-debug"]
- if "+fortran" in self.spec:
- extra_args.append("--enable-fortran")
+ if spec.satisfies("+fortran"):
+ args.append("--enable-fortran")
else:
- extra_args.append("--disable-fortran")
+ args.append("--disable-fortran")
- if "+python" in self.spec:
- extra_args.append("--with-python={0}".format(self.spec["python"].prefix))
+ if spec.satisfies("+python"):
+ args.append(f"--with-python={self.spec['python'].prefix}")
- return extra_args
+ return args
def check(self):
"""tests need downloaded files, testcases have manual instructions for that."""
@@ -70,6 +76,5 @@ class Cmor(AutotoolsPackage):
def install(self, spec, prefix):
make("install")
- if "+python" in spec:
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ if spec.satisfies("+python"):
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/cni-plugins/package.py b/var/spack/repos/builtin/packages/cni-plugins/package.py
index baaec3a7a7..e6236b0c85 100644
--- a/var/spack/repos/builtin/packages/cni-plugins/package.py
+++ b/var/spack/repos/builtin/packages/cni-plugins/package.py
@@ -20,6 +20,8 @@ class CniPlugins(Package):
version("1.1.1", sha256="c86c44877c47f69cd23611e22029ab26b613f620195b76b3ec20f589367a7962")
version("1.0.1", sha256="2ba3cd9f341a7190885b60d363f6f23c6d20d975a7a0ab579dd516f8c6117619")
+ depends_on("c", type="build") # generated
+
depends_on("go", type="build")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py
index 16d2066fc5..42adb5e100 100644
--- a/var/spack/repos/builtin/packages/cnmem/package.py
+++ b/var/spack/repos/builtin/packages/cnmem/package.py
@@ -16,4 +16,6 @@ class Cnmem(CMakePackage):
version("git", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/cnpy/package.py b/var/spack/repos/builtin/packages/cnpy/package.py
index b49556c659..860755f22b 100644
--- a/var/spack/repos/builtin/packages/cnpy/package.py
+++ b/var/spack/repos/builtin/packages/cnpy/package.py
@@ -18,6 +18,8 @@ class Cnpy(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/cntk/package.py b/var/spack/repos/builtin/packages/cntk/package.py
index 03130fa0b4..0af3911b28 100644
--- a/var/spack/repos/builtin/packages/cntk/package.py
+++ b/var/spack/repos/builtin/packages/cntk/package.py
@@ -22,6 +22,8 @@ class Cntk(Package):
version("master", branch="master")
version("2.0", sha256="3adee17f166e2a682dfb551ca017ae5c3836ca9772c0af14215a7e76254f201c")
+ depends_on("cxx", type="build") # generated
+
variant("opencv", default=False, description="Enable OpenCV support.")
variant("kaldi", default=False, description="Enable Kaldi support.")
variant("asgd", default=True, description="Enable DataParallelASGD powered by Multiverso.")
@@ -80,29 +82,29 @@ class Cntk(Package):
args.append("--with-boost=" + spec["boost"].prefix)
args.append("--with-protobuf=" + spec["protobuf"].prefix)
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
args.append("--with-buildtype=debug")
else:
args.append("--with-buildtype=release")
- if "+1bitsgd" in spec:
+ if spec.satisfies("+1bitsgd"):
args.append("--1bitsgd=yes")
args.append("--with-1bitsgd={0}/include".format(spec["cntk1bitsgd"].prefix))
- if "+asgd" in spec:
+ if spec.satisfies("+asgd"):
args.append("--asgd=yes")
args.append("--with-multiverso={0}".format(spec["multiverso"].prefix))
else:
args.append("--asgd=no")
- if "+opencv" in spec:
+ if spec.satisfies("+opencv"):
args.append("--with-opencv=" + spec["opencv"].prefix)
- if "+kaldi" in spec:
+ if spec.satisfies("+kaldi"):
args.append("--with-kaldi=" + spec["kaldi"].prefix)
args.append("--with-openfst=" + spec["openfst"].prefix)
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--cuda=yes")
args.append("--with-cuda={0}".format(spec["cuda"].prefix))
args.append("--with-cub={0}".format(spec["cub"].prefix.include))
diff --git a/var/spack/repos/builtin/packages/cnvnator/package.py b/var/spack/repos/builtin/packages/cnvnator/package.py
index e4348104db..55081c0d0d 100644
--- a/var/spack/repos/builtin/packages/cnvnator/package.py
+++ b/var/spack/repos/builtin/packages/cnvnator/package.py
@@ -15,6 +15,8 @@ class Cnvnator(MakefilePackage):
version("0.3.3", sha256="58c5acf61f9a1e5febf546c196f8917a5e084b729e5c4cfd3eba83471b3fe5c1")
+ depends_on("cxx", type="build") # generated
+
depends_on("samtools@:1.13")
depends_on("htslib")
depends_on("root")
diff --git a/var/spack/repos/builtin/packages/codar-cheetah/package.py b/var/spack/repos/builtin/packages/codar-cheetah/package.py
index f1a97d842b..5cbdd9d384 100644
--- a/var/spack/repos/builtin/packages/codar-cheetah/package.py
+++ b/var/spack/repos/builtin/packages/codar-cheetah/package.py
@@ -22,5 +22,7 @@ class CodarCheetah(PythonPackage):
version("1.0.0", sha256="1f935fbc1475a654f3b6d2140d8b2a6079a65c8701655e544ba1fab3a7c1bc19")
version("0.5", sha256="f37a554741eff4bb8407a68f799dd042dfc4df525e84896cad70fccbd6aca6ee")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/code-server/package.py b/var/spack/repos/builtin/packages/code-server/package.py
index e208405387..bc7da6afcc 100644
--- a/var/spack/repos/builtin/packages/code-server/package.py
+++ b/var/spack/repos/builtin/packages/code-server/package.py
@@ -52,6 +52,9 @@ class CodeServer(Package):
version("3.1.0", sha256="5ef85c8f280ce781a176a8b77386b333efe892755a5c325a1782e4eac6016e59")
version("3.0.2", sha256="04367cfeb23991f3dc3f1ef8e3dfe5e9d683bb50c9e1fa69e3c21757facfd7ee")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version <= Version("3.2.0"):
return "https://github.com/coder/code-server/releases/download/{0}/code-server-{0}-linux-x86_64.tar.gz".format(
diff --git a/var/spack/repos/builtin/packages/codec2/package.py b/var/spack/repos/builtin/packages/codec2/package.py
index 5639ee6d5d..227de4f3b7 100644
--- a/var/spack/repos/builtin/packages/codec2/package.py
+++ b/var/spack/repos/builtin/packages/codec2/package.py
@@ -12,10 +12,20 @@ class Codec2(CMakePackage):
HF/VHF digital radio."""
homepage = "https://www.rowetel.com/?page_id=452"
- url = "https://github.com/drowe67/codec2/archive/v0.9.2.tar.gz"
+ url = "https://github.com/drowe67/codec2/archive/refs/tags/1.2.0.tar.gz"
license("LGPL-2.1-or-later")
+ version("1.2.0", sha256="cbccae52b2c2ecc5d2757e407da567eb681241ff8dadce39d779a7219dbcf449")
version("1.1.0", sha256="d56ba661008a780b823d576a5a2742c94d0b0507574643a7d4f54c76134826a3")
version("1.0.5", sha256="cd9a065dd1c3477f6172a0156294f767688847e4d170103d1f08b3a075f82826")
version("0.9.2", sha256="19181a446f4df3e6d616b50cabdac4485abb9cd3242cf312a0785f892ed4c76c")
+
+ depends_on("c", type="build")
+
+ def url_for_version(self, version):
+ # Release 1.2.0 started with shallow git clone "to reduce repo size"
+ if version < Version("1.2.0"):
+ return f"https://github.com/drowe67/codec2-dev/archive/refs/tags/v{version}.tar.gz"
+ else:
+ return f"https://github.com/drowe67/codec2/archive/refs/tags/{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/codes/package.py b/var/spack/repos/builtin/packages/codes/package.py
index 1614166e28..455ad130be 100644
--- a/var/spack/repos/builtin/packages/codes/package.py
+++ b/var/spack/repos/builtin/packages/codes/package.py
@@ -45,7 +45,7 @@ class Codes(AutotoolsPackage):
"PKG_CONFIG_PATH=%s/pkgconfig" % spec["ross"].prefix.lib,
]
- if "+dumpi" in spec:
+ if spec.satisfies("+dumpi"):
config_args.extend(["--with-dumpi=%s" % spec["sst-dumpi"].prefix])
return config_args
diff --git a/var/spack/repos/builtin/packages/codipack/package.py b/var/spack/repos/builtin/packages/codipack/package.py
new file mode 100644
index 0000000000..4c2fe3886b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/codipack/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2023 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 spack.build_systems.generic
+from spack.package import *
+
+
+class Codipack(CMakePackage, Package):
+ """CoDiPack is a C++-library that enables the computation of gradients in computer programs
+ using Algorithmic Differentiation. It is based on the Operator Overloading approach and uses
+ static polymorphism and expression templates, resulting in an extremely fast evaluation of
+ adjoints or forward derivatives. It is specifically designed with HPC applications in mind."""
+
+ homepage = "https://www.scicomp.uni-kl.de/software/codi/"
+ url = "https://github.com/SciCompKL/CoDiPack/archive/refs/tags/v2.1.0.tar.gz"
+ git = "https://github.com/SciCompKL/CoDiPack.git"
+
+ version("2.2.0", sha256="24e9129829588fd8965620f275e40ae3a0be3b24015bc7d7280fa5ad551c10ac")
+ version("2.1.0", sha256="c8d07eb01eaa056175902d5b153b8606b05d208ff0a541d15284f4d9ff6e87c2")
+ version("2.0.2", sha256="c6eecfdbf5818daf80871461f23f8a29b5b72e314d2034047d0b0fcd44744339")
+ version("1.9.3", sha256="27dd92d0b5132de37b431989c0c3d5bd829821a6a2e31e0529137e427421f06e")
+ version("openmp", branch="experimentalOpenMPSupport")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.12:", type="build", when="@2.1.0:")
+
+ build_system(
+ conditional("cmake", when="@2.1.0:"),
+ conditional("generic", when="@:2.0.2"),
+ default="cmake",
+ )
+
+
+class GenericBuilder(spack.build_systems.generic.GenericBuilder):
+ def install(self, pkg, spec, prefix):
+ mkdirp(join_path(prefix, "include"))
+ install_tree(join_path(self.stage.source_path, "include"), join_path(prefix, "include"))
diff --git a/var/spack/repos/builtin/packages/coevp/package.py b/var/spack/repos/builtin/packages/coevp/package.py
index 589a9253a3..c44e42e6ae 100644
--- a/var/spack/repos/builtin/packages/coevp/package.py
+++ b/var/spack/repos/builtin/packages/coevp/package.py
@@ -24,6 +24,10 @@ class Coevp(MakefilePackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI Support")
variant("silo", default=False, description="Build with silo Support")
variant("flann", default=False, description="Build with flann Support")
@@ -38,11 +42,11 @@ class Coevp(MakefilePackage):
@property
def build_targets(self):
targets = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
targets.append("COEVP_MPI=yes")
else:
targets.append("COEVP_MPI=no")
- if "+flann" in self.spec:
+ if self.spec.satisfies("+flann"):
targets.append("FLANN=yes")
targets.append("FLANN_TARGET=")
targets.append(
@@ -51,7 +55,7 @@ class Coevp(MakefilePackage):
else:
targets.append("FLANN=no")
targets.append("REDIS=no")
- if "+silo" in self.spec:
+ if self.spec.satisfies("+silo"):
targets.append("SILO=yes")
targets.append("SILO_TARGET=")
targets.append("SILO_LOC={0}".format(self.spec["silo"].prefix))
diff --git a/var/spack/repos/builtin/packages/cohmm/package.py b/var/spack/repos/builtin/packages/cohmm/package.py
index feb7881e3f..6cf71a9eb3 100644
--- a/var/spack/repos/builtin/packages/cohmm/package.py
+++ b/var/spack/repos/builtin/packages/cohmm/package.py
@@ -21,14 +21,16 @@ class Cohmm(MakefilePackage):
version("develop", branch="sad")
+ depends_on("c", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP Support")
variant("gnuplot", default=False, description="Enable gnu plot Support")
depends_on("gnuplot", when="+gnuplot")
def edit(self, spec, prefix):
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
filter_file("DO_OPENMP = O.*", "DO_OPENMP = ON", "Makefile")
- if "+gnuplot" in spec:
+ if spec.satisfies("+gnuplot"):
filter_file("DO_GNUPLOT = O.*", "DO_GNUPLOT = ON", "Makefile")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/coin3d/package.py b/var/spack/repos/builtin/packages/coin3d/package.py
index a184e68e2c..571c843cb0 100644
--- a/var/spack/repos/builtin/packages/coin3d/package.py
+++ b/var/spack/repos/builtin/packages/coin3d/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
from spack.pkg.builtin.boost import Boost
@@ -21,6 +23,9 @@ class Coin3d(AutotoolsPackage, CMakePackage):
version("3.0.0", sha256="d5c2eb0ecaa5c83d93daf0e9e275e58a6a8dfadc74c873d51b0c939011f81bfa")
version("2.0.0", sha256="6d26435aa962d085b7accd306a0b478069a7de1bc5ca24e22344971852dd097c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("cmake", when="@4.0.0:"),
conditional("autotools", when="@:3.1.0"),
diff --git a/var/spack/repos/builtin/packages/coinhsl/package.py b/var/spack/repos/builtin/packages/coinhsl/package.py
index 9c27063181..0fe8da7c2e 100644
--- a/var/spack/repos/builtin/packages/coinhsl/package.py
+++ b/var/spack/repos/builtin/packages/coinhsl/package.py
@@ -8,7 +8,7 @@ import os
from spack.package import *
-class Coinhsl(AutotoolsPackage):
+class Coinhsl(MesonPackage, AutotoolsPackage):
"""CoinHSL is a collection of linear algebra libraries (KB22, MA27,
MA28, MA54, MA57, MA64, MA77, MA86, MA97, MC19, MC34, MC64, MC68,
MC69, MC78, MC80, OF01, ZB01, ZB11) bundled for use with IPOPT and
@@ -21,60 +21,85 @@ class Coinhsl(AutotoolsPackage):
that Spack can find it. For instructions on how to set up a
mirror, see https://spack.readthedocs.io/en/latest/mirrors.html"""
- # NOTE(oxberry1@llnl.gov): an HTTPS version of the URL below does not
- # exist
+ build_system(
+ conditional("autotools", when="@b:2019.05.21"),
+ conditional("meson", when="@2023:,:b"),
+ default="meson",
+ )
+
homepage = "https://www.hsl.rl.ac.uk/ipopt/"
- url = "file://{0}/coinhsl-archive-2014.01.17.tar.gz".format(os.getcwd())
+ url = f"file://{os.getcwd()}/coinhsl-2023.11.17.tar.gz"
manual_download = True
- # CoinHSL has a few versions that vary with respect to stability/features
- # and licensing terms.
+ maintainers("AndrewLister-STFC")
- # Version 2019.05.21 is a full-featured "release candidate"
- # version available via an "academic license" that can be used for
- # personal teaching and research purposes only. For a full list of
- # conditions, see https://www.hsl.rl.ac.uk/academic.html.
+ # Meson builds
version(
- "2019.05.21", sha256="95ce1160f0b013151a3e25d40337775c760a8f3a79d801a1d190598bf4e4c0c3"
+ "2024.05.15",
+ sha256="2534807b4f6a4a69661c82dc0da7094f685f0fce6443a9147ee90a21caba9e63",
+ preferred=True,
)
-
- # Version 2015.06.23 is a full-featured "stable"
- # version available via an "academic license" that can be used for
- # personal teaching and research purposes only. For a full list of
- # conditions, see https://www.hsl.rl.ac.uk/academic.html.
version(
- "2015.06.23",
- sha256="3e955a2072f669b8f357ae746531b37aea921552e415dc219a5dd13577575fb3",
- preferred=True,
+ "archive-2024.05.15",
+ sha256="1d907ce5d84331ce8f78125d5fc766184f0fce9a7b340db7f3c4821a7f4b7c4c",
)
- # Version 2014.01.17 is a full-featured "stable" version available
- # via an "academic license" that can be used for personal teaching
- # and research purposes only.
+ with when("build_system=meson @2023:"):
+ depends_on("blas")
+ depends_on("lapack")
+ variant("metis", default=True, description="Build with Metis support.")
+ depends_on("metis", when="+metis")
+
+ def meson_args(self):
+ spec = self.spec
+ args = []
+ if spec.satisfies("@:b"):
+ return []
+
+ blas = spec["blas"].libs.names[0]
+ blas_paths = [sf[2:] for sf in spec["blas"].libs.search_flags.split()]
+ lapack = spec["lapack"].libs.names[0]
+ lapack_paths = [sf[2:] for sf in spec["lapack"].libs.search_flags.split()]
+ args.append(f"-Dlibblas={blas}")
+ args.extend([f"-Dlibblas_path={p}" for p in blas_paths])
+ args.append(f"-Dliblapack={lapack}")
+ args.extend([f"-Dlibblas_path={p}" for p in lapack_paths])
+ if spec.satisfies("+metis"):
+ metis = spec["metis"]
+ if metis.satisfies("@5"):
+ args.append("-Dlibmetis_version=5")
+ else:
+ args.append("-Dlibmetis_version=4")
+ args.extend(
+ [
+ f"-Dlibmetis_include={metis.prefix.include}",
+ f"-Dlibmetis_path={metis.prefix.lib}",
+ ]
+ )
+ return args
+
+ # Autotools builds
+ version(
+ "2019.05.21", sha256="95ce1160f0b013151a3e25d40337775c760a8f3a79d801a1d190598bf4e4c0c3"
+ )
+ version(
+ "2015.06.23", sha256="3e955a2072f669b8f357ae746531b37aea921552e415dc219a5dd13577575fb3"
+ )
version(
"2014.01.17", sha256="ed49fea62692c5d2f928d4007988930da9ff9a2e944e4c559d028671d122437b"
)
-
- # Version 2014.01.10 only has MA27, MA28, and MC19, and is
- # available as a "personal license" that is free to all, and
- # permits commercial use, but *not redistribution* (emphasis from
- # original source).
version(
"2014.01.10", sha256="7c2be60a3913b406904c66ee83acdbd0709f229b652c4e39ee5d0876f6b2e907"
)
- # CoinHSL fails to build in parallel
- parallel = False
-
- variant("blas", default=False, description="Link to external BLAS library")
-
- depends_on("blas", when="+blas")
+ with when("build_system=autotools"):
+ parallel = False
+ variant("blas", default=False, description="Link to external BLAS library")
+ depends_on("blas", when="+blas")
def configure_args(self):
spec = self.spec
args = []
-
if spec.satisfies("+blas"):
- args.append("--with-blas={0}".format(spec["blas"].libs.ld_flags))
-
+ args.append(f"--with-blas={spec['blas'].libs.ld_flags}")
return args
diff --git a/var/spack/repos/builtin/packages/coinutils/package.py b/var/spack/repos/builtin/packages/coinutils/package.py
index 8635fc11bb..b7295633ee 100644
--- a/var/spack/repos/builtin/packages/coinutils/package.py
+++ b/var/spack/repos/builtin/packages/coinutils/package.py
@@ -16,8 +16,11 @@ class Coinutils(AutotoolsPackage):
license("EPL-2.0")
+ version("2.11.10", sha256="80c7c215262df8d6bd2ba171617c5df844445871e9891ec6372df12ccbe5bcfd")
version("2.11.9", sha256="15d572ace4cd3b7c8ce117081b65a2bd5b5a4ebaba54fadc99c7a244160f88b8")
version("2.11.6", sha256="6ea31d5214f7eb27fa3ffb2bdad7ec96499dd2aaaeb4a7d0abd90ef852fc79ca")
version("2.11.4", sha256="d4effff4452e73356eed9f889efd9c44fe9cd68bd37b608a5ebb2c58bd45ef81")
+ depends_on("cxx", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/collectd/package.py b/var/spack/repos/builtin/packages/collectd/package.py
index 50c4b1fa51..1365bb8404 100644
--- a/var/spack/repos/builtin/packages/collectd/package.py
+++ b/var/spack/repos/builtin/packages/collectd/package.py
@@ -18,4 +18,7 @@ class Collectd(AutotoolsPackage):
version("5.11.0", sha256="37b10a806e34aa8570c1cafa6006c604796fae13cc2e1b3e630d33dcba9e5db2")
version("5.10.0", sha256="a03359f563023e744c2dc743008a00a848f4cd506e072621d86b6d8313c0375b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("valgrind", type="test")
diff --git a/var/spack/repos/builtin/packages/collier/package.py b/var/spack/repos/builtin/packages/collier/package.py
index a15ee75b9c..3475d40f4b 100644
--- a/var/spack/repos/builtin/packages/collier/package.py
+++ b/var/spack/repos/builtin/packages/collier/package.py
@@ -32,6 +32,8 @@ class Collier(CMakePackage):
version("1.1", sha256="80fd54e2c30029d3d7d646738ae9469ad3a6f5ea7aa1179b951030df048e36bc")
version("1.0", sha256="54f40c1ed07a6829230af400abfe48791e74e56eac2709c0947cec3410a4473d")
+ depends_on("fortran", type="build") # generated
+
@property
def parallel(self):
return not self.spec.satisfies("@:1.2.4")
diff --git a/var/spack/repos/builtin/packages/colm/package.py b/var/spack/repos/builtin/packages/colm/package.py
index 500337d3bd..dcea9ae152 100644
--- a/var/spack/repos/builtin/packages/colm/package.py
+++ b/var/spack/repos/builtin/packages/colm/package.py
@@ -19,3 +19,6 @@ class Colm(AutotoolsPackage):
license("GPL-2.0-only")
version("0.12.0", sha256="7b545d74bd139f5c622975d243c575310af1e4985059a1427b6fdbb1fb8d6e4d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/comd/package.py b/var/spack/repos/builtin/packages/comd/package.py
index f6c8463259..5d2e050a13 100644
--- a/var/spack/repos/builtin/packages/comd/package.py
+++ b/var/spack/repos/builtin/packages/comd/package.py
@@ -25,6 +25,8 @@ class Comd(MakefilePackage):
version("develop", branch="master")
version("1.1", sha256="4e85f86f043681a1ef72940fc24a4c71356a36afa45446f7cfe776abad6aa252")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=False, description="Build with OpenMP support")
variant("precision", default=True, description="Toggle Precesion Options")
@@ -48,11 +50,11 @@ class Comd(MakefilePackage):
comd_variant = "CoMD"
cc = spack_cc
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
targets.append("--directory=src-openmp")
comd_variant += "-openmp"
cflags += " -fopenmp "
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
comd_variant += "-mpi"
targets.append("CC = {0}".format(self.spec["mpi"].mpicc))
else:
@@ -60,17 +62,17 @@ class Comd(MakefilePackage):
else:
targets.append("--directory=src-mpi")
- if "~mpi" in self.spec:
+ if self.spec.satisfies("~mpi"):
comd_variant += "-serial"
targets.append("CC = {0}".format(cc))
else:
comd_variant += "-mpi"
targets.append("CC = {0}".format(self.spec["mpi"].mpicc))
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
cflags += "-DDO_MPI"
targets.append("INCLUDES = {0}".format(self.spec["mpi"].prefix.include))
- if "+precision" in self.spec:
+ if self.spec.satisfies("+precision"):
cflags += " -DDOUBLE "
else:
cflags += " -DSINGLE "
diff --git a/var/spack/repos/builtin/packages/comgr/package.py b/var/spack/repos/builtin/packages/comgr/package.py
index f713ccba6d..135be5d24b 100644
--- a/var/spack/repos/builtin/packages/comgr/package.py
+++ b/var/spack/repos/builtin/packages/comgr/package.py
@@ -12,9 +12,16 @@ class Comgr(CMakePackage):
"""This provides various Lightning Compiler related services. It currently
contains one library, the Code Object Manager (Comgr)"""
- homepage = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
- git = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git"
- url = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCm-CompilerSupport"
+ git = "https://github.com/ROCm/ROCm-CompilerSupport.git"
+
+ def url_for_version(self, version):
+ if version <= Version("6.0.2"):
+ url = "https://github.com/ROCm/ROCm-CompilerSupport/archive/rocm-{0}.tar.gz"
+ else:
+ url = "https://github.com/ROCm/llvm-project/archive/rocm-{0}.tar.gz"
+ return url.format(version)
+
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "haampie")
@@ -23,98 +30,37 @@ class Comgr(CMakePackage):
license("NCSA")
version("master", branch="amd-stg-open")
+ version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528")
+ version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7")
+ version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200")
+ version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097")
+ version("6.1.1", sha256="f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d")
+ version("6.1.0", sha256="6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34")
+ version("6.0.2", sha256="737b110d9402509db200ee413fb139a78369cf517453395b96bda52d0aa362b9")
+ version("6.0.0", sha256="04353d27a512642a5e5339532a39d0aabe44e0964985de37b150a2550385800a")
version("5.7.1", sha256="3b9433b4a0527167c3e9dfc37a3c54e0550744b8d4a8e1be298c8d4bcedfee7c")
version("5.7.0", sha256="e234bcb93d602377cfaaacb59aeac5796edcd842a618162867b7e670c3a2c42c")
version("5.6.1", sha256="0a85d84619f98be26ca7a32c71f94ed3c4e9866133789eabb451be64ce739300")
version("5.6.0", sha256="9396a7238b547ee68146c669b10b9d5de8f1d76527c649133c75d8076a185a72")
version("5.5.1", sha256="0fbb15fe5a95c2e141ccd360bc413e1feda283334781540a6e5095ab27fd8019")
version("5.5.0", sha256="97dfff03226ce0902b9d5d1c8c7bebb7a15978a81b6e9c750bf2d2473890bd42")
- version("5.4.3", sha256="8af18035550977fe0aa9cca8dfacbe65fe292e971de5a0e160710bafda05a81f")
- version("5.4.0", sha256="f4b83b27ff6195679d695c3f41fa25456e9c50bae6d978f46d3541b472aef757")
- version("5.3.3", sha256="6a4ef69e672a077b5909977248445f0eedf5e124af9812993a4d444be030c78b")
- version("5.3.0", sha256="072f849d79476d87d31d62b962e368762368d540a9da02ee2675963dc4942b2c")
- version("5.2.3", sha256="36d67dbe791d08ad0a02f0f3aedd46059848a0a232c5f999670103b0410c89dc")
- version("5.2.1", sha256="ebeaea8e653fc2b9d67d3271be44690ac7876ee679baa01d47863e75362b8c85")
- version("5.2.0", sha256="5f63fa93739ee9230756ef93c53019474b6cdddea3b588492d785dae1b08c087")
- version("5.1.3", sha256="3078c10e9a852fe8357712a263ad775b15944e083f93a879935c877511066ac9")
- version("5.1.0", sha256="1cdcfe5acb768ef50fb0026d4ee7ba01e615251ad3c27bb2593cdcf8c070a894")
- version(
- "5.0.2",
- sha256="20d733f70d8edb573d8c92707f663d7d46dcaff08026cd6addbb83266679f92a",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="da1bbc694bd930a504406eb0a0018c2e317d8b2c136fb2cab8de426870efe9a8",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="e45f387fb6635fc1713714d09364204cd28fea97655b313c857beb1f8524e593",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="03c5880e0922fcff31306f7da2eb9d3a3709d9b5b75b3524dcfae85f4b181678",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="f1d99550383ed7b3a01d304eedc3d86a8e45b271aa5a80b1dd099c22fda3f745",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="f77b505abb474078374701dfc49e651ad3eeec5349ce6edda54549943a3775ee",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="40a1ea50d2aea0cf75c4d17cdd6a7fe44ae999bf0147d24a756ca4675ce24e36",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="ffb625978555c63582aa46857672431793261166aa31761eff4fe5c2cab661ae",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="f389601fb70b2d9a60d0e2798919af9ddf7b8376a2e460141507fe50073dfb31",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="b44ee5805a6236213d758fa4b612bb859d8f774b9b4bdc3a2699bb009dd631bc",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="6600e144d72dadb6d893a3388b42af103b9443755ce556f4e9e205ccd8ec0c83",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="62a35480dfabaa98883d91ed0f7c490daa9bbd424af37e07e5d85a6e8030b146",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="73e56ec3c63dade24ad351e9340e2f8e127694028c1fb7cec5035376bf098432",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="25c963b46a82d76d55b2302e0e18aac8175362656a465549999ad13d07b689b9",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="8af18035550977fe0aa9cca8dfacbe65fe292e971de5a0e160710bafda05a81f")
+ version("5.4.0", sha256="f4b83b27ff6195679d695c3f41fa25456e9c50bae6d978f46d3541b472aef757")
+ version("5.3.3", sha256="6a4ef69e672a077b5909977248445f0eedf5e124af9812993a4d444be030c78b")
+ version("5.3.0", sha256="072f849d79476d87d31d62b962e368762368d540a9da02ee2675963dc4942b2c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
# Disable the hip compile tests. Spack should not be using
# /opt/rocm, and this breaks the build when /opt/rocm exists.
patch("hip-tests.patch", when="@:4.2.0")
- depends_on("cmake@3.2.0:", type="build", when="@:3.8")
- depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
+ depends_on("cmake@3.13.4:", type="build")
depends_on("zlib-api", type="link")
depends_on("z3", type="link")
@@ -123,25 +69,6 @@ class Comgr(CMakePackage):
depends_on("rocm-cmake@3.5.0:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -152,26 +79,54 @@ class Comgr(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
# llvm libs are linked statically, so this *could* be a build dep
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
# aomp may not build rocm-device-libs as part of llvm-amdgpu, so make
# that a conditional dependency
- depends_on(
- "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
- )
+ depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
- root_cmakelists_dir = join_path("lib", "comgr")
+ @property
+ def root_cmakelists_dir(self):
+ if self.spec.satisfies("@:6.0"):
+ return join_path("lib", "comgr")
+ else:
+ return join_path("amd", "comgr")
def cmake_args(self):
args = [self.define("BUILD_TESTING", self.run_tests)]
if self.spec.satisfies("@5.4.3:"):
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ if self.spec.satisfies("@5.7:"):
+ args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
return args
@classmethod
diff --git a/var/spack/repos/builtin/packages/commons-lang3/package.py b/var/spack/repos/builtin/packages/commons-lang3/package.py
index ef05a2e854..0b3d0ba2fb 100644
--- a/var/spack/repos/builtin/packages/commons-lang3/package.py
+++ b/var/spack/repos/builtin/packages/commons-lang3/package.py
@@ -23,6 +23,7 @@ class CommonsLang3(Package):
license("Apache-2.0")
+ version("3.14.0", sha256="317c3e3fcd5fcca3781a7996ff1e0c50c13244ee961e94e5f6f6d84b84733b16")
version("3.12.0", sha256="33012465dfcb7f790aca333e09ebf105e2a5fb95c2c638b3df790d3efa908e28")
version("3.7", sha256="94dc8289ce90b77b507d9257784d9a43b402786de40c164f6e3990e221a2a4d2")
@@ -30,4 +31,4 @@ class CommonsLang3(Package):
depends_on("java@7:", type="run")
def install(self, spec, prefix):
- install("commons-lang3-{0}.jar".format(self.version), prefix)
+ install(f"commons-lang3-{self.version}.jar", prefix)
diff --git a/var/spack/repos/builtin/packages/commons-logging/package.py b/var/spack/repos/builtin/packages/commons-logging/package.py
index fcca2ba178..a29bbb3bf0 100644
--- a/var/spack/repos/builtin/packages/commons-logging/package.py
+++ b/var/spack/repos/builtin/packages/commons-logging/package.py
@@ -23,6 +23,7 @@ class CommonsLogging(Package):
license("Apache-2.0")
+ version("1.3.0", sha256="8a3ea33a2d58fe243ff47b78d672ad98e7590af7f436636c7851b1069caad5f8")
version("1.2", sha256="3f758805c7290d9c6d22d1451587c9f7232744aef4c984e88aa683cdea0587bd")
version("1.1.3", sha256="9e7093c93529792563b5c19ab5cccb73ef4ca7d82b886bdec6d0af182ba9908a")
version("1.1.1", sha256="88c721d66f570a87f710a2449f0e3bffea86489d9dd2fa70b805104c4f8d69e6")
@@ -31,4 +32,4 @@ class CommonsLogging(Package):
depends_on("java", type="run")
def install(self, spec, prefix):
- install("commons-logging-{0}.jar".format(self.version), prefix)
+ install(f"commons-logging-{self.version}.jar", prefix)
diff --git a/var/spack/repos/builtin/packages/compadre/package.py b/var/spack/repos/builtin/packages/compadre/package.py
index 9897f7958a..19c99e217b 100644
--- a/var/spack/repos/builtin/packages/compadre/package.py
+++ b/var/spack/repos/builtin/packages/compadre/package.py
@@ -25,12 +25,18 @@ class Compadre(CMakePackage):
version("1.4.1", sha256="2e1e7d8e30953f76b6dc3a4c86ec8103d4b29447194cb5d5abb74b8e4099bdd9")
version("1.3.0", sha256="f711a840fd921e84660451ded408023ec3bcfc98fd0a7dc4a299bfae6ab489c2")
- depends_on("kokkos-kernels@3.3.01:3.6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("kokkos-kernels@3.3.01:4")
depends_on("cmake@3.13:", type="build")
variant("mpi", default=False, description="Enable MPI support")
depends_on("mpi", when="+mpi")
+ variant("tests", default=True, description="Enable tests and examples")
+
# fixes duplicate symbol issue with static library build
patch(
"https://patch-diff.githubusercontent.com/raw/sandialabs/Compadre/pull/286.patch?full_index=1",
@@ -53,10 +59,14 @@ class Compadre(CMakePackage):
]
)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.append("-DCompadre_USE_MPI:BOOL=ON")
- if "+shared" in spec:
+ if spec.satisfies("~tests"):
+ options.append("-DCompadre_EXAMPLES:BOOL=OFF")
+ options.append("-DCompadre_TESTS:BOOL=OFF")
+
+ if spec.satisfies("+shared"):
options.append("-DBUILD_SHARED_LIBS:BOOL=ON")
else:
options.append("-DBUILD_SHARED_LIBS:BOOL=OFF")
diff --git a/var/spack/repos/builtin/packages/compiz/package.py b/var/spack/repos/builtin/packages/compiz/package.py
index a6805d0748..08a26f9dd5 100644
--- a/var/spack/repos/builtin/packages/compiz/package.py
+++ b/var/spack/repos/builtin/packages/compiz/package.py
@@ -21,6 +21,9 @@ class Compiz(AutotoolsPackage, XorgPackage):
version("0.7.8", sha256="b46f52b776cc78e85357a07688d04b36ec19c65eadeaf6f6cfcca7b8515e6503")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libxcb")
depends_on("libxcomposite")
depends_on("libxfixes")
diff --git a/var/spack/repos/builtin/packages/composable-kernel/0001-mark-kernels-maybe-unused.patch b/var/spack/repos/builtin/packages/composable-kernel/0001-mark-kernels-maybe-unused.patch
new file mode 100644
index 0000000000..f2fbc24f61
--- /dev/null
+++ b/var/spack/repos/builtin/packages/composable-kernel/0001-mark-kernels-maybe-unused.patch
@@ -0,0 +1,88 @@
+diff --git a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp
+index f4f496fc10..d9e300b737 100644
+--- a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp
++++ b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_bwd_weight_two_stage_xdl_cshuffle.hpp
+@@ -47,12 +47,12 @@ __global__ void
+ #endif
+ kernel_grouped_conv_bwd_weight_xdl_cshuffle_v3(
+ typename GridwiseGemm::Argument karg,
+- const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
+- const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
+- const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
++ [[maybe_unused]] const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
++ [[maybe_unused]] const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
++ [[maybe_unused]] const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
+ c_grid_desc_mblock_mperblock_nblock_nperblock,
+- const ComputePtrOffsetOfBatch compute_ptr_offset_of_batch,
+- const index_t num_k_per_block)
++ [[maybe_unused]] const ComputePtrOffsetOfBatch compute_ptr_offset_of_batch,
++ [[maybe_unused]] const index_t num_k_per_block)
+ {
+ #if(!defined(__HIP_DEVICE_COMPILE__) || defined(__gfx908__) || defined(__gfx90a__) || \
+ defined(__gfx94__))
+@@ -103,12 +103,12 @@ __global__ void
+ #endif
+ kernel_grouped_conv_bwd_weight_xdl_cshuffle_v3_2lds(
+ typename GridwiseGemm::Argument karg,
+- const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
+- const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
+- const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
++ [[maybe_unused]] const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
++ [[maybe_unused]] const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
++ [[maybe_unused]] const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
+ c_grid_desc_mblock_mperblock_nblock_nperblock,
+- const ComputePtrOffsetOfBatch compute_ptr_offset_of_batch,
+- const index_t num_k_per_block)
++ [[maybe_unused]] const ComputePtrOffsetOfBatch compute_ptr_offset_of_batch,
++ [[maybe_unused]] const index_t num_k_per_block)
+ {
+ #if(!defined(__HIP_DEVICE_COMPILE__) || defined(__gfx908__) || defined(__gfx90a__) || \
+ defined(__gfx940__) || defined(__gfx941__) || defined(__gfx942__))
+diff --git a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_multiple_abd_xdl_cshuffle_v3.hpp b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_multiple_abd_xdl_cshuffle_v3.hpp
+index 415ae3d496..a4d4a01a01 100644
+--- a/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_multiple_abd_xdl_cshuffle_v3.hpp
++++ b/include/ck/tensor_operation/gpu/device/impl/device_grouped_conv_fwd_multiple_abd_xdl_cshuffle_v3.hpp
+@@ -69,14 +69,15 @@ __global__ void
+ #if CK_USE_LAUNCH_BOUNDS
+ __launch_bounds__(CK_MAX_THREAD_PER_BLOCK, MinimumOccupancy)
+ #endif
+- kernel_grouped_conv_fwd_xdl_cshuffle_v3(typename GridwiseGemm::Argument karg,
+- const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
+- const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
+- const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
+- c_grid_desc_mblock_mperblock_nblock_nperblock,
+- const ComputePtrOffset compute_ptr_offset_of_groups,
+- const ComputePtrOffset compute_ptr_offset_of_n,
+- const index_t groups_count)
++ kernel_grouped_conv_fwd_xdl_cshuffle_v3(
++ typename GridwiseGemm::Argument karg,
++ [[maybe_unused]] const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
++ [[maybe_unused]] const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
++ [[maybe_unused]] const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
++ c_grid_desc_mblock_mperblock_nblock_nperblock,
++ [[maybe_unused]] const ComputePtrOffset compute_ptr_offset_of_groups,
++ [[maybe_unused]] const ComputePtrOffset compute_ptr_offset_of_n,
++ [[maybe_unused]] const index_t groups_count)
+ {
+ #if(!defined(__HIP_DEVICE_COMPILE__) || defined(__gfx9__))
+ // offset base pointer for each work-group
+@@ -132,13 +133,13 @@ __global__ void
+ #endif
+ kernel_grouped_conv_fwd_xdl_cshuffle_v3_2lds(
+ typename GridwiseGemm::Argument karg,
+- const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
+- const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
+- const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
++ [[maybe_unused]] const AGridDesc_AK0_M_K1 a_grid_desc_ak0_m_ak1,
++ [[maybe_unused]] const BGridDesc_BK0_N_K1 b_grid_desc_bk0_n_bk1,
++ [[maybe_unused]] const CGridDesc_MBlock_MPerBlock_NBlock_NPerBlock
+ c_grid_desc_mblock_mperblock_nblock_nperblock,
+- const ComputePtrOffset compute_ptr_offset_of_groups,
+- const ComputePtrOffset compute_ptr_offset_of_n,
+- const index_t groups_count)
++ [[maybe_unused]] const ComputePtrOffset compute_ptr_offset_of_groups,
++ [[maybe_unused]] const ComputePtrOffset compute_ptr_offset_of_n,
++ [[maybe_unused]] const index_t groups_count)
+ {
+ #if(!defined(__HIP_DEVICE_COMPILE__) || defined(__gfx9__))
+ // offset base pointer for each work-group
diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py
index afbb86f01f..5ccaaf205c 100644
--- a/var/spack/repos/builtin/packages/composable-kernel/package.py
+++ b/var/spack/repos/builtin/packages/composable-kernel/package.py
@@ -11,22 +11,33 @@ class ComposableKernel(CMakePackage):
"""Composable Kernel: Performance Portable Programming Model
for Machine Learning Tensor Operators."""
- homepage = "https://github.com/ROCmSoftwarePlatform/composable_kernel"
- git = "https://github.com/ROCmSoftwarePlatform/composable_kernel.git"
- url = "https://github.com/ROCmSoftwarePlatform/composable_kernel/archive/refs/tags/rocm-5.7.1.tar.gz"
+ homepage = "https://github.com/ROCm/composable_kernel"
+ git = "https://github.com/ROCm/composable_kernel.git"
+ url = "https://github.com/ROCm/composable_kernel/archive/refs/tags/rocm-6.1.2.tar.gz"
maintainers("srekolam", "afzpatel")
license("MIT")
version("master", branch="develop")
+ version("6.2.4", sha256="5598aea4bce57dc95b60f2029831edfdade80b30a56e635412cc02b2a6729aa6")
+ version("6.2.1", sha256="708ff25218dc5fa977af4a37105b380d7612a70c830fa7977b40b3df8b8d3162")
+ version("6.2.0", sha256="4a3024f4f93c080db99d560a607ad758745cd2362a90d0e8f215331686a6bc64")
+ version("6.1.2", sha256="54db801e1c14239f574cf94dd764a2f986b4abcc223393d55c49e4b276e738c9")
+ version("6.1.1", sha256="f55643c6eee0878e8f2d14a382c33c8b84af0bdf8f31b37b6092b377f7a9c6b5")
+ version("6.1.0", sha256="355a4514b96b56aa9edf78198a3e22067e7397857cfe29d9a64d9c5557b9f83d")
+ version("6.0.2", sha256="f648a99388045948b7d5fbf8eb8da6a1803c79008b54d406830b7f9119e1dcf6")
+ version("6.0.0", sha256="a8f736f2f2a8afa4cddd06301205be27774d85f545429049b4a2bbbe6fcd67df")
version("5.7.1", sha256="75f66e023c2e31948e91fa26366eaeac72d871fc2e5188361d4465179f13876e")
version("5.7.0", sha256="d9624dbaef04e0138f9f73596c49b4fe9ded69974bae7236354baa32649bf21a")
version("5.6.1", commit="f5ec04f091fa5c48c67d7bacec36a414d0be06a5")
version("5.6.0", commit="f5ec04f091fa5c48c67d7bacec36a414d0be06a5")
version("5.5.1", commit="ac9e01e2cc3721be24619807adc444e1f59a9d25")
version("5.5.0", commit="8b76b832420a3d69708401de6607a033163edcce")
- version("5.4.3", commit="bb3d9546f186e39cefedc3e7f01d88924ba20168")
- version("5.4.0", commit="236bd148b98c7f1ec61ee850fcc0c5d433576305")
+ with default_args(deprecated=True):
+ version("5.4.3", commit="bb3d9546f186e39cefedc3e7f01d88924ba20168")
+ version("5.4.0", commit="236bd148b98c7f1ec61ee850fcc0c5d433576305")
+
+ depends_on("cxx", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
variant(
@@ -46,11 +57,33 @@ class ComposableKernel(CMakePackage):
depends_on("pkgconfig", type="build")
depends_on("cmake@3.16:", type="build")
- for ver in ["master", "5.7.1", "5.7.0", "5.6.1", "5.6.0", "5.5.1", "5.5.0", "5.4.3", "5.4.0"]:
+ for ver in [
+ "master",
+ "6.2.4",
+ "6.2.1",
+ "6.2.0",
+ "6.1.2",
+ "6.1.1",
+ "6.1.0",
+ "6.0.2",
+ "6.0.0",
+ "5.7.1",
+ "5.7.0",
+ "5.6.1",
+ "5.6.0",
+ "5.5.1",
+ "5.5.0",
+ "5.4.3",
+ "5.4.0",
+ ]:
depends_on("hip@" + ver, when="@" + ver)
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
depends_on("rocm-cmake@" + ver, when="@" + ver, type="build")
+ # Build is breaking on warning, -Werror, -Wunused-parameter. The patch is part of:
+ # https://github.com/ROCm/composable_kernel/commit/959073842c0db839d45d565eb260fd018c996ce4
+ patch("0001-mark-kernels-maybe-unused.patch", when="@6.2")
+
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
@@ -61,15 +94,21 @@ class ComposableKernel(CMakePackage):
"CMAKE_CXX_COMPILER", "{0}/bin/clang++".format(spec["llvm-amdgpu"].prefix)
),
self.define("CMAKE_C_COMPILER", "{0}/bin/clang".format(spec["llvm-amdgpu"].prefix)),
- self.define("HIP_PATH", spec["hip"].prefix),
- self.define("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)),
- self.define("CMAKE_CXX_FLAGS", "-O3"),
self.define("CMAKE_BUILD_TYPE", "Release"),
]
if "auto" not in self.spec.variants["amdgpu_target"]:
- args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
- if self.spec.satisfies("@5.6.0:"):
+ args.append(self.define_from_variant("GPU_TARGETS", "amdgpu_target"))
+ else:
args.append(self.define("INSTANCES_ONLY", "ON"))
+ if self.spec.satisfies("@5.6.0:"):
+ if self.run_tests:
+ args.append(self.define("BUILD_TESTING", "ON"))
+ args.append(self.define("CK_BUILD_JIT_LIB", "ON"))
+ args.append(self.define("CMAKE_POSITION_INDEPENDENT_CODE", "ON"))
+ if self.spec.satisfies("@:5.7"):
+ args.append(self.define("CMAKE_CXX_FLAGS", "-O3"))
+ if self.spec.satisfies("@6.2:"):
+ args.append(self.define("BUILD_DEV", "OFF"))
return args
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/composyx/package.py b/var/spack/repos/builtin/packages/composyx/package.py
new file mode 100644
index 0000000000..d177bee5b2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/composyx/package.py
@@ -0,0 +1,70 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Composyx(CMakePackage):
+ """a Massively Parallel Hybrid Solver in C++"""
+
+ homepage = "https://gitlab.inria.fr/composyx/composyx"
+ git = "https://gitlab.inria.fr/composyx/composyx.git"
+ url = "https://gitlab.inria.fr/api/v4/projects/52455/packages/generic/source/v1.0.1/composyx-1.0.1.tar.gz"
+ maintainers("fpruvost")
+
+ version("main", branch="main", submodules=True)
+ version("1.0.1", sha256="d97936e3b297fde435c165cbe29cb39e5d88ae368be451b1c45b8ee51486782c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # User options
+ variant("armadillo", default=False, description="Enable Armadillo interface")
+ variant("arpack-ng", default=True, description="Enable arpack eigen/singular value solvers")
+ variant("eigen", default=True, description="Enable Eigen interface")
+ variant("fabulous", default=True, description="Enable Fabulous Iterative Block Krylov solvers")
+ variant("paddle", default=True, description="Enable Paddle for matrix partitioning")
+ variant("pastix", default=True, description="Enable Pastix sparse direct solver")
+
+ # Executables to compile
+ variant("examples", default=True, description="Compile examples")
+ variant("tests", default=False, description="Compile tests")
+
+ # Required dependencies
+ depends_on("pkgconfig", type="build")
+ depends_on("blaspp")
+ depends_on("lapackpp")
+ depends_on("mpi")
+
+ # Optional dependencies
+ depends_on("armadillo", when="+armadillo")
+ depends_on("arpack-ng+icb", when="+arpack-ng")
+ depends_on("eigen", when="+eigen")
+ depends_on("fabulous", when="+fabulous")
+ depends_on("paddle", when="+paddle")
+ depends_on("pastix+mpi", when="+pastix")
+
+ def cmake_args(self):
+ args = [
+ self.define("BUILD_SHARED_LIBS", True),
+ self.define("COMPOSYX_C_DRIVER", True),
+ self.define("COMPOSYX_Fortran_DRIVER", True),
+ self.define("COMPOSYX_COMPILE_BENCH", False),
+ self.define("COMPOSYX_USE_MUMPS", False),
+ self.define("COMPOSYX_USE_QRMUMPS", False),
+ self.define("COMPOSYX_USE_SZ_COMPRESSOR", False),
+ self.define_from_variant("COMPOSYX_COMPILE_EXAMPLES", "examples"),
+ self.define_from_variant("COMPOSYX_COMPILE_TESTS", "tests"),
+ self.define_from_variant("COMPOSYX_USE_ARMADILLO", "armadillo"),
+ self.define_from_variant("COMPOSYX_USE_ARPACK", "arpack-ng"),
+ self.define_from_variant("COMPOSYX_USE_EIGEN", "eigen"),
+ self.define_from_variant("COMPOSYX_USE_FABULOUS", "fabulous"),
+ self.define_from_variant("COMPOSYX_USE_PADDLE", "paddle"),
+ self.define_from_variant("COMPOSYX_USE_PASTIX", "pastix"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py
index 05f7d663b0..978298f597 100644
--- a/var/spack/repos/builtin/packages/conduit/package.py
+++ b/var/spack/repos/builtin/packages/conduit/package.py
@@ -14,7 +14,7 @@ import llnl.util.tty as tty
from spack.package import *
-def cmake_cache_entry(name, value, vtype=None):
+def cmake_cache_entry(name, value, vtype=None, force=False):
"""
Helper that creates CMake cache entry strings used in
'host-config' files.
@@ -24,7 +24,8 @@ def cmake_cache_entry(name, value, vtype=None):
vtype = "BOOL"
else:
vtype = "PATH"
- return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
+ force_str = " FORCE" if force else ""
+ return 'set({0} "{1}" CACHE {2} ""{3})\n\n'.format(name, value, vtype, force_str)
class Conduit(CMakePackage):
@@ -45,6 +46,9 @@ class Conduit(CMakePackage):
# is to bridge any spack dependencies that are still using the name master
version("master", branch="develop", submodules=True)
# note: 2021-05-05 latest tagged release is now preferred instead of develop
+ version("0.9.2", sha256="45d5a4eccd0fc978d153d29c440c53c483b8f29dfcf78ddcc9aa15c59b257177")
+ version("0.9.1", sha256="a3f1168738dcf72f8ebf83299850301aaf56e803f40618fc1230a755d0d05363")
+ version("0.9.0", sha256="844e012400ab820967eef6cec15e1aa9a68cb05119d0c1f292d3c01630111a58")
version("0.8.8", sha256="99811e9c464b6f841f52fcd47e982ae47cbb01cba334cff43eabe13eea58c0df")
version("0.8.7", sha256="f3bf44d860783f4e0d61517c5e280c88144af37414569f4cf86e2d29b3ba5293")
version("0.8.6", sha256="8ca5d37033143ed7181c7286dd25a3f6126ba0358889066f13a2b32f68fc647e")
@@ -67,8 +71,14 @@ class Conduit(CMakePackage):
version("0.2.1", sha256="796576b9c69717c52f0035542c260eb7567aa351ee892d3fbe3521c38f1520c4")
version("0.2.0", sha256="31eff8dbc654a4b235cfcbc326a319e1752728684296721535c7ca1c9b463061")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
maintainers("cyrush")
+ root_cmakelists_dir = "src"
+
###########################################################################
# package variants
###########################################################################
@@ -115,10 +125,18 @@ class Conduit(CMakePackage):
###########################################################################
#######################
+ # BLT
+ #######################
+ depends_on("blt", type="build")
+ depends_on("blt@0.6.2:", type="build", when="@0.9:")
+
+ #######################
# CMake
#######################
- # cmake 3.14.1 or newer
+ # cmake 3.14.1 or newer basic requirement
depends_on("cmake@3.14.1:", type="build")
+ # cmake 3.21.0 or newer for conduit 0.9.0
+ depends_on("cmake@3.21.0:", type="build", when="@0.9.0:")
#######################
# Python
@@ -127,6 +145,7 @@ class Conduit(CMakePackage):
extends("python", when="+python")
depends_on("py-numpy", when="+python", type=("build", "run"))
depends_on("py-mpi4py", when="+python+mpi", type=("build", "run"))
+ depends_on("py-pip", when="+python", type="build")
#######################
# I/O Packages
@@ -235,7 +254,7 @@ class Conduit(CMakePackage):
def cmake_args(self):
host_config = self._get_host_config_path(self.spec)
options = []
- options.extend(["-C", host_config, "../spack-src/src/"])
+ options.extend(["-C", host_config])
return options
@run_after("build")
@@ -245,6 +264,13 @@ class Conduit(CMakePackage):
print("Running Conduit Unit Tests...")
make("test")
+ # Copy the generated host-config to install directory for downstream use
+ @run_before("install")
+ def copy_host_config(self):
+ src = self._get_host_config_path(self.spec)
+ dst = join_path(self.spec.prefix, os.path.basename(src))
+ copy(src, dst)
+
@run_after("install")
@on_package_attributes(run_tests=True)
def check_install(self):
@@ -281,7 +307,8 @@ class Conduit(CMakePackage):
host_config_path = "{0}-{1}-{2}-conduit-{3}.cmake".format(
socket.gethostname(), sys_type, spec.compiler, spec.dag_hash()
)
- dest_dir = spec.prefix
+
+ dest_dir = self.stage.source_path
host_config_path = os.path.abspath(join_path(dest_dir, host_config_path))
return host_config_path
@@ -303,7 +330,7 @@ class Conduit(CMakePackage):
#######################
c_compiler = env["SPACK_CC"]
cpp_compiler = env["SPACK_CXX"]
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
f_compiler = env["SPACK_FC"]
else:
f_compiler = None
@@ -354,13 +381,13 @@ class Conduit(CMakePackage):
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
cfg.write("# fortran compiler used by spack\n")
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", f_compiler))
else:
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
@@ -382,25 +409,41 @@ class Conduit(CMakePackage):
if fflags:
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
+ # Add various rpath linker flags
+ rpaths = []
+ if self.compiler.extra_rpaths:
+ rpaths += self.compiler.extra_rpaths
+
+ # Note: This is not needed if we add `extra_rpaths` to this compiler spec case
if (f_compiler is not None) and ("gfortran" in f_compiler) and ("clang" in cpp_compiler):
libdir = os.path.join(os.path.dirname(os.path.dirname(f_compiler)), "lib")
- flags = ""
for _libpath in [libdir, libdir + "64"]:
if os.path.exists(_libpath):
- flags += " -Wl,-rpath,{0}".format(_libpath)
- description = "Adds a missing libstdc++ rpath"
- if flags:
- cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, description))
+ rpaths.append(_libpath)
+
+ linkerflags = ""
+ for rpath in rpaths:
+ linkerflags += "-Wl,-rpath,{} ".format(rpath)
+ cfg.write(cmake_cache_entry("CMAKE_EXE_LINKER_FLAGS", linkerflags))
+ if spec.satisfies("+shared"):
+ cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", linkerflags))
+ else:
+ cfg.write(cmake_cache_entry("CMAKE_STATIC_LINKER_FLAGS", linkerflags))
+
+ #######################
+ # BLT
+ #######################
+ cfg.write(cmake_cache_entry("BLT_SOURCE_DIR", spec["blt"].prefix))
#######################
# Examples/Utilities
#######################
- if "+examples" in spec:
+ if spec.satisfies("+examples"):
cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_EXAMPLES", "OFF"))
- if "+utilities" in spec:
+ if spec.satisfies("+utilities"):
cfg.write(cmake_cache_entry("ENABLE_UTILS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_UTILS", "OFF"))
@@ -408,7 +451,7 @@ class Conduit(CMakePackage):
#######################
# Unit Tests
#######################
- if "+test" in spec:
+ if spec.satisfies("+test"):
cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_TESTS", "OFF"))
@@ -424,9 +467,9 @@ class Conduit(CMakePackage):
flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ " + rpaths
cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
flags = "${CMAKE_SHARED_LINKER_FLAGS} " + rpaths
- cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", flags))
+ cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", flags, force=True))
#######################
# Python
@@ -434,11 +477,11 @@ class Conduit(CMakePackage):
cfg.write("# Python Support\n")
- if "+python" in spec:
+ if spec.satisfies("+python"):
cfg.write("# Enable python module builds\n")
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "ON"))
cfg.write("# python from spack \n")
- cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE", spec["python"].command.path))
+ cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE", python.path))
try:
cfg.write("# python module install dir\n")
cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX", python_platlib))
@@ -448,14 +491,14 @@ class Conduit(CMakePackage):
else:
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "OFF"))
- if "+doc" in spec:
- if "+python" in spec:
+ if spec.satisfies("+doc"):
+ if spec.satisfies("+python"):
cfg.write(cmake_cache_entry("ENABLE_DOCS", "ON"))
cfg.write("# sphinx from spack \n")
sphinx_build_exe = join_path(spec["py-sphinx"].prefix.bin, "sphinx-build")
cfg.write(cmake_cache_entry("SPHINX_EXECUTABLE", sphinx_build_exe))
- if "+doxygen" in spec:
+ if spec.satisfies("+doxygen"):
cfg.write("# doxygen from uberenv\n")
doxygen_exe = spec["doxygen"].command.path
cfg.write(cmake_cache_entry("DOXYGEN_EXECUTABLE", doxygen_exe))
@@ -468,7 +511,7 @@ class Conduit(CMakePackage):
cfg.write("# MPI Support\n")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
mpifc_path = spec["mpi"].mpifc if "+fortran" in spec else None
@@ -483,11 +526,11 @@ class Conduit(CMakePackage):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
- if "+blt_find_mpi" in spec:
+ if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path))
mpiexe_bin = join_path(spec["mpi"].prefix.bin, "mpiexec")
@@ -505,7 +548,7 @@ class Conduit(CMakePackage):
# ZFP
#######################
cfg.write("# zfp from spack \n")
- if "+zfp" in spec:
+ if spec.satisfies("+zfp"):
cfg.write(cmake_cache_entry("ZFP_DIR", spec["zfp"].prefix))
else:
cfg.write("# zfp not built by spack \n")
@@ -514,7 +557,7 @@ class Conduit(CMakePackage):
# Caliper
#######################
cfg.write("# caliper from spack \n")
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
cfg.write(cmake_cache_entry("CALIPER_DIR", spec["caliper"].prefix))
cfg.write(cmake_cache_entry("ADIAK_DIR", spec["adiak"].prefix))
else:
@@ -532,9 +575,9 @@ class Conduit(CMakePackage):
cfg.write("# hdf5 from spack \n")
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
cfg.write(cmake_cache_entry("HDF5_DIR", spec["hdf5"].prefix))
- if "zlib-api" in spec:
+ if spec.satisfies("^zlib-api"):
# HDF5 depends on zlib
cfg.write(cmake_cache_entry("ZLIB_DIR", spec["zlib-api"].prefix))
else:
@@ -546,7 +589,7 @@ class Conduit(CMakePackage):
cfg.write("# h5z-zfp from spack \n")
- if "+hdf5+zfp" in spec:
+ if spec.satisfies("+hdf5+zfp"):
cfg.write(cmake_cache_entry("H5ZZFP_DIR", spec["h5z-zfp"].prefix))
else:
cfg.write("# h5z-zfp not built by spack \n")
@@ -557,7 +600,7 @@ class Conduit(CMakePackage):
cfg.write("# silo from spack \n")
- if "+silo" in spec:
+ if spec.satisfies("+silo"):
cfg.write(cmake_cache_entry("SILO_DIR", spec["silo"].prefix))
else:
cfg.write("# silo not built by spack \n")
@@ -568,7 +611,7 @@ class Conduit(CMakePackage):
cfg.write("# ADIOS from spack \n")
- if "+adios" in spec:
+ if spec.satisfies("+adios"):
cfg.write(cmake_cache_entry("ADIOS_DIR", spec["adios"].prefix))
else:
cfg.write("# adios not built by spack \n")
@@ -579,7 +622,7 @@ class Conduit(CMakePackage):
cfg.write("# parmetis from spack \n")
- if "+parmetis" in spec:
+ if spec.satisfies("+parmetis"):
cfg.write(cmake_cache_entry("METIS_DIR", spec["metis"].prefix))
cfg.write(cmake_cache_entry("PARMETIS_DIR", spec["parmetis"].prefix))
else:
diff --git a/var/spack/repos/builtin/packages/conmon/package.py b/var/spack/repos/builtin/packages/conmon/package.py
index f15f3affbd..f7bac7bbdc 100644
--- a/var/spack/repos/builtin/packages/conmon/package.py
+++ b/var/spack/repos/builtin/packages/conmon/package.py
@@ -15,10 +15,13 @@ class Conmon(MakefilePackage):
license("Apache-2.0")
+ version("2.1.12", sha256="842f0b5614281f7e35eec2a4e35f9f7b9834819aa58ecdad8d0ff6a84f6796a6")
version("2.1.7", sha256="7d0f9a2f7cb8a76c51990128ac837aaf0cc89950b6ef9972e94417aa9cf901fe")
version("2.1.5", sha256="ee3179ee2b9a9107acec00eb546062cf7deb847f135a3b81503d22b0d226b3ed")
version("2.0.30", sha256="4b0a98fbe8a63c42f60edac25c19aa6606caa7b1e4fe7846fc7f7de0b566ba25")
+ depends_on("c", type="build") # generated
+
depends_on("go", type="build")
depends_on("go-md2man", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/conquest/package.py b/var/spack/repos/builtin/packages/conquest/package.py
index 32ab7d7779..b3f1816a24 100644
--- a/var/spack/repos/builtin/packages/conquest/package.py
+++ b/var/spack/repos/builtin/packages/conquest/package.py
@@ -24,6 +24,8 @@ class Conquest(MakefilePackage):
version("master", branch="master")
version("develop", branch="develop")
+ depends_on("fortran", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
depends_on("scalapack")
@@ -64,7 +66,7 @@ class Conquest(MakefilePackage):
fflags = "-O3 -fallow-argument-mismatch"
ldflags = ""
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
fflags += " " + self.compiler.openmp_flag
ldflags += " " + self.compiler.openmp_flag
@@ -92,7 +94,7 @@ class Conquest(MakefilePackage):
defs_file.filter(".*FFT_LIB=.*", f"FFT_LIB={fftw_ld}")
defs_file.filter(".*XC_LIB=.*", f"XC_LIB={libxc_ld} -lxcf90 -lxc")
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
defs_file.filter("OMP_DUMMY = DUMMY", "OMP_DUMMY = ")
if self.spec.variants["mult_kern"].value != "default":
diff --git a/var/spack/repos/builtin/packages/conserver/package.py b/var/spack/repos/builtin/packages/conserver/package.py
index 599104957c..0b3d75d9f1 100644
--- a/var/spack/repos/builtin/packages/conserver/package.py
+++ b/var/spack/repos/builtin/packages/conserver/package.py
@@ -22,5 +22,7 @@ class Conserver(AutotoolsPackage):
version("8.2.2", sha256="05ea1693bf92b42ad2f0a9389c60352ccd35c2ea93c8fc8e618d0153362a7d81")
version("8.2.1", sha256="251ae01997e8f3ee75106a5b84ec6f2a8eb5ff2f8092438eba34384a615153d0")
+ depends_on("c", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/console-bridge/package.py b/var/spack/repos/builtin/packages/console-bridge/package.py
index bff4b72b4e..a6b17ed44f 100644
--- a/var/spack/repos/builtin/packages/console-bridge/package.py
+++ b/var/spack/repos/builtin/packages/console-bridge/package.py
@@ -24,3 +24,5 @@ class ConsoleBridge(CMakePackage):
version("0.5.0", sha256="1cecdf232b1eb883b41cc50d1d38443b2163fdc0497072dc1aa6e7ba30696060")
version("0.4.4", sha256="1147af6ad6477fcfd640c543684e17ee540e434aa70d6f31c1d137bc86fb937c")
version("0.4.3", sha256="9f024a38f0947ed9fa67f58829980c2d90d84740e6de20d75cb00866f07a7a0b")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/constype/package.py b/var/spack/repos/builtin/packages/constype/package.py
index 0ed38e8235..2f11a8cae0 100644
--- a/var/spack/repos/builtin/packages/constype/package.py
+++ b/var/spack/repos/builtin/packages/constype/package.py
@@ -19,5 +19,7 @@ class Constype(AutotoolsPackage, XorgPackage):
version("1.0.5", sha256="ec7d07204dd5abf8d21d0a89408be17ab316a017838c88b087b127082f02c051")
version("1.0.4", sha256="ec09aff369cf1d527fd5b8075fb4dd0ecf89d905190cf1a0a0145d5e523f913d")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/converge/package.py b/var/spack/repos/builtin/packages/converge/package.py
index 1ae48070c1..f056d23437 100644
--- a/var/spack/repos/builtin/packages/converge/package.py
+++ b/var/spack/repos/builtin/packages/converge/package.py
@@ -69,21 +69,13 @@ class Converge(Package):
depends_on("mpi", when="+mpi")
- # FIXME: Concretization is currently broken, so this causes:
- # $ spack spec converge
- # to crash. You must explicitly state what MPI version you want:
- # $ spack spec converge@2.4.10 +mpi ^openmpi@:1.10
- #
# TODO: Add version ranges for other MPI libraries
- depends_on("openmpi@1.10.0:1.10", when="@2.4.0:2.4+mpi^openmpi")
- depends_on("openmpi@1.5:1.8", when="@2.2:2.3+mpi^openmpi")
- depends_on("openmpi@:1.4", when="@:2.1+mpi^openmpi")
+ depends_on("openmpi@1.10.0:1.10", when="@2.4.0:2.4+mpi^[virtuals=mpi] openmpi")
+ depends_on("openmpi@1.5:1.8", when="@2.2:2.3+mpi^[virtuals=mpi] openmpi")
+ depends_on("openmpi@:1.4", when="@:2.1+mpi^[virtuals=mpi] openmpi")
- # TODO: Add packages for hp-mpi and platform-mpi
- # conflicts('^hp-mpi', when='@2.4:')
conflicts("^intel-mpi", when="@:2.3")
conflicts("^intel-parallel-studio+mpi", when="@:2.3")
- # conflicts('^platform-mpi', when='@:2.1')
conflicts("^spectrum-mpi")
# Licensing
@@ -154,29 +146,29 @@ class Converge(Package):
# The CONVERGE tarball comes with binaries for several MPI libraries.
# Only install the binary that matches the MPI we are building with.
with working_dir("l_x86_64/bin"):
- if "~mpi" in spec:
+ if spec.satisfies("~mpi"):
converge = glob.glob("converge-*-serial*")
post_convert = glob.glob("post_convert_serial*")
- elif "hp-mpi" in spec:
+ elif spec.satisfies("^hp-mpi"):
converge = glob.glob("converge-*-hpmpi*")
# No HP-MPI version of post_convert
post_convert = glob.glob("post_convert_serial*")
- elif "intel-mpi" in spec or "intel-parallel-studio+mpi" in spec:
+ elif spec.satisfies("intel-mpi") or spec.satisfies("intel-parallel-studio+mpi"):
converge = glob.glob("converge-*-intel*")
# No Intel MPI version of post_convert
post_convert = glob.glob("post_convert_serial*")
- elif "mpich" in spec:
+ elif spec.satisfies("^mpich"):
converge = glob.glob("converge-*-mpich*")
post_convert = glob.glob("post_convert_mpich*")
- elif "mvapich2" in spec:
+ elif spec.satisfies("^mvapich2"):
converge = glob.glob("converge-*-mvapich*")
# MVAPICH2 hasn't been supported since CONVERGE
# came with a single serial post_convert
post_convert = glob.glob("post_convert")
- elif "openmpi" in spec:
+ elif spec.satisfies("^openmpi"):
converge = glob.glob("converge-*-o*mpi*")
post_convert = glob.glob("post_convert_o*mpi*")
- elif "platform-mpi" in spec:
+ elif spec.satisfies("^platform-mpi"):
converge = glob.glob("converge-*-pmpi*")
post_convert = glob.glob("post_convert_pmpi*")
else:
diff --git a/var/spack/repos/builtin/packages/cool/package.py b/var/spack/repos/builtin/packages/cool/package.py
index c849e48149..07a1ebae6e 100644
--- a/var/spack/repos/builtin/packages/cool/package.py
+++ b/var/spack/repos/builtin/packages/cool/package.py
@@ -21,6 +21,8 @@ class Cool(CMakePackage):
version("3.3.4", tag="COOL_3_3_4", commit="c3f9f780e0949fc78277c05d21d06fd7ddc6ea48")
version("3.3.3", tag="COOL_3_3_3", commit="42137f0ecd5028c41a46a99f0b95b56e105ef4e3")
+ depends_on("cxx", type="build") # generated
+
# Spack-specific patches:
# * Create python/PyCool/_internal directory
# (only necessary for Spack builds, for some reason)
diff --git a/var/spack/repos/builtin/packages/coordgen/package.py b/var/spack/repos/builtin/packages/coordgen/package.py
index b0a6f70675..45fc4c08a5 100644
--- a/var/spack/repos/builtin/packages/coordgen/package.py
+++ b/var/spack/repos/builtin/packages/coordgen/package.py
@@ -18,6 +18,8 @@ class Coordgen(CMakePackage):
version("3.0.2", sha256="f67697434f7fec03bca150a6d84ea0e8409f6ec49d5aab43badc5833098ff4e3")
+ depends_on("cxx", type="build") # generated
+
variant("maeparser", default=True, description="Use MAE parser")
variant("example", default=False, description="Build sample executable")
variant("shared", default=True, description="Build as shared library")
diff --git a/var/spack/repos/builtin/packages/coral/package.py b/var/spack/repos/builtin/packages/coral/package.py
index 56e20a0639..7d55cfbc88 100644
--- a/var/spack/repos/builtin/packages/coral/package.py
+++ b/var/spack/repos/builtin/packages/coral/package.py
@@ -18,6 +18,8 @@ class Coral(CMakePackage):
version("3.3.10", tag="CORAL_3_3_10", commit="d79c4d94f74e8eaf518841e70c70c1d9b2f816fe")
version("3.3.3", tag="CORAL_3_3_3", commit="1c0393b2aa8d03748208ce564070d96f1bbd0c29")
+
+ depends_on("cxx", type="build") # generated
variant("binary_tag", default="auto", description="Build type")
depends_on("ninja")
diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py
index c2f416d01c..e1b5f1c0d2 100644
--- a/var/spack/repos/builtin/packages/coreutils/package.py
+++ b/var/spack/repos/builtin/packages/coreutils/package.py
@@ -24,6 +24,8 @@ class Coreutils(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("9.5", sha256="cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a")
+ version("9.4", sha256="ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52")
version("9.3", sha256="adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa")
version("9.2", sha256="6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3")
version("9.1", sha256="61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423")
@@ -35,6 +37,8 @@ class Coreutils(AutotoolsPackage, GNUMirrorPackage):
version("8.26", sha256="155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e")
version("8.23", sha256="ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d")
+ depends_on("c", type="build") # generated
+
variant(
"gprefix",
default=False,
@@ -56,7 +60,7 @@ class Coreutils(AutotoolsPackage, GNUMirrorPackage):
spec = self.spec
configure_args = []
if spec.satisfies("platform=darwin"):
- if "+gprefix" in self.spec:
+ if self.spec.satisfies("+gprefix"):
configure_args.append("--program-prefix=g")
configure_args.append("--without-gmp")
configure_args.append("gl_cv_func_ftello_works=yes")
diff --git a/var/spack/repos/builtin/packages/cosign/package.py b/var/spack/repos/builtin/packages/cosign/package.py
index 5320ab9fb0..ef834f703d 100644
--- a/var/spack/repos/builtin/packages/cosign/package.py
+++ b/var/spack/repos/builtin/packages/cosign/package.py
@@ -21,6 +21,7 @@ class Cosign(Package):
license("Apache-2.0")
version("main", branch="main")
+ version("2.2.4", sha256="2e31e8638de1869514cb0478796d2b55b455552fbd03c3b7ba0edf27b0b5b944")
version("1.3.1", sha256="7f7e0af52ee8d795440e66dcc1a7a25783e22d30935f4f957779628b348f38af")
depends_on("go", type="build")
diff --git a/var/spack/repos/builtin/packages/cosma/fj-ssl2.patch b/var/spack/repos/builtin/packages/cosma/fj-ssl2.patch
new file mode 100644
index 0000000000..3e09383d67
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cosma/fj-ssl2.patch
@@ -0,0 +1,104 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1fd1e55..41a041b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,7 +19,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "YES") # always write compile_commands.json
+
+ set(COSMA_GPU_BACKENDS_LIST "CUDA" "ROCM")
+ set(COSMA_SCALAPACK_LIST "OFF" "MKL" "CRAY_LIBSCI" "CUSTOM")
+-set(COSMA_BLAS_LIST "auto" "MKL" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF")
++set(COSMA_BLAS_LIST "auto" "MKL" "SSL2" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF")
+ option(COSMA_WITH_TESTS "Generate the test target." ON)
+ option(COSMA_WITH_APPS "Generate the miniapp targets." ON)
+ option(COSMA_WITH_BENCHMARKS "Generate the benchmark targets." ON)
+@@ -45,7 +45,7 @@ if (COSMA_BLAS MATCHES "CUDA|ROCM")
+ set(COSMA_GPU_BACKEND ${COSMA_BLAS})
+ else()
+ if(COSMA_BLAS STREQUAL "OFF")
+- message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS")
++ message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, SSL2, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS")
+ else()
+ set(COSMA_BLAS_VENDOR ${COSMA_BLAS})
+ endif()
+@@ -190,6 +190,7 @@ install(FILES "${cosma_BINARY_DIR}/cosmaConfig.cmake"
+ "${cosma_BINARY_DIR}/cosmaConfigVersion.cmake"
+ "${cosma_BINARY_DIR}/cosmaConfigVersion.cmake"
+ "${cosma_SOURCE_DIR}/cmake/FindMKL.cmake"
++ "${cosma_SOURCE_DIR}/cmake/FindSSL2.cmake"
+ "${cosma_SOURCE_DIR}/cmake/FindBlas.cmake"
+ "${cosma_SOURCE_DIR}/cmake/FindSCALAPACK.cmake"
+ "${cosma_SOURCE_DIR}/cmake/FindOPENBLAS.cmake"
+diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake
+index aef956c..3c47561 100644
+--- a/cmake/FindBlas.cmake
++++ b/cmake/FindBlas.cmake
+@@ -14,6 +14,7 @@ endif()
+ set(COSMA_BLAS_VENDOR_LIST
+ "auto"
+ "MKL"
++ "SSL2"
+ "OPENBLAS"
+ "FLEXIBLAS"
+ "ARMPL"
+diff --git a/cmake/FindSSL2.cmake b/cmake/FindSSL2.cmake
+new file mode 100644
+index 0000000..f0e11bf
+--- /dev/null
++++ b/cmake/FindSSL2.cmake
+@@ -0,0 +1,56 @@
++#.rst:
++# FindSSL2
++# -----------
++#
++# This module tries to find the SSL2 library.
++#
++# The following variables are set
++#
++# ::
++#
++# SSL2_FOUND - True if ssl2 is found
++# SSL2_LIBRARIES - The required libraries
++# SSL2_INCLUDE_DIRS - The required include directory
++#
++# The following import target is created
++#
++# ::
++#
++# SSL2::ssl2
++
++#set paths to look for library from ROOT variables.If new policy is set, find_library() automatically uses them.
++# if(NOT POLICY CMP0074)
++set(_SSL2_PATHS ${SSL2_ROOT}
++ $ENV{SSL2_ROOT}
++ $ENV{SSL2ROOT}
++ $ENV{SSL2_DIR}
++ $ENV{SSL2DIR})
++# endif()
++
++find_library(
++ COSMA_SSL2_LINK_LIBRARIES
++ NAMES "fjlapackex"
++ HINTS ${_SSL2_PATHS}
++ PATH_SUFFIXES "lib64"
++)
++find_path(
++ COSMA_SSL2_INCLUDE_DIRS
++ NAMES "cblas.h"
++ HINTS ${_SSL2_PATHS}
++ PATH_SUFFIXES "include"
++)
++
++# check if found
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(SSL2 REQUIRED_VARS COSMA_SSL2_INCLUDE_DIRS COSMA_SSL2_LINK_LIBRARIES)
++
++# add target to link against
++if(NOT TARGET cosma::BLAS::SSL2::ssl2)
++ add_library(cosma::BLAS::SSL2::ssl2 INTERFACE IMPORTED)
++ add_library(cosma::BLAS::SSL2::blas ALIAS cosma::BLAS::SSL2::ssl2)
++endif()
++set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_LINK_LIBRARIES ${COSMA_SSL2_LINK_LIBRARIES})
++set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${COSMA_SSL2_INCLUDE_DIRS})
++
++# prevent clutter in cache
++MARK_AS_ADVANCED(SSL2_FOUND SSL2_LIBRARIES SSL2_INCLUDE_DIRS)
diff --git a/var/spack/repos/builtin/packages/cosma/package.py b/var/spack/repos/builtin/packages/cosma/package.py
index b3e8f48986..6e62f716cf 100644
--- a/var/spack/repos/builtin/packages/cosma/package.py
+++ b/var/spack/repos/builtin/packages/cosma/package.py
@@ -25,7 +25,7 @@ class Cosma(CMakePackage):
version("2.6.6", sha256="1604be101e77192fbcc5551236bc87888d336e402f5409bbdd9dea900401cc37")
version("2.6.5", sha256="10d9b7ecc1ce44ec5b9e0c0bf89278a63029912ec3ea99661be8576b553ececf")
version("2.6.4", sha256="6d7bd5e3005874af9542a329c93e7ccd29ca1a5573dae27618fac2704fa2b6ab")
- version("2.6.3", sha256="8ca96ca41458f1e9d0da70d524c5a03c677dba7238d23a578f852163b6d45ac9")
+ version("2.6.3", sha256="c2a3735ea8f860930bea6706d968497d72a1be0498c689b5bc4a951ffc2d1146")
version("2.6.2", sha256="2debb5123cc35aeebc5fd2f8a46cfd6356d1e27618c9bb57129ecd09aa400940")
version("2.6.1", sha256="69aa6634a030674f0d9be61e7b0bf0dc17acf0fc9e7a90b40e3179e2254c8d67")
version("2.5.1", sha256="085b7787597374244bbb1eb89bc69bf58c35f6c85be805e881e1c0b25166c3ce")
@@ -36,12 +36,14 @@ class Cosma(CMakePackage):
version("2.0.7", sha256="8d70bfcbda6239b6a8fbeaca138790bbe58c0c3aa576879480d2632d4936cf7e")
version("2.0.2", sha256="4f3354828bc718f3eef2f0098c3bdca3499297497a220da32db1acd57920c68d")
+ depends_on("cxx", type="build") # generated
+
# We just need the libraries of cuda and rocm, so no need to extend
# CudaPackage or ROCmPackage.
variant("cuda", default=False, description="Build with cuBLAS support")
variant("rocm", default=False, description="Build with rocBLAS support")
variant("scalapack", default=False, description="Build with ScaLAPACK API")
- variant("shared", default=False, description="Build the shared library version")
+ variant("shared", default=True, description="Build the shared library version")
variant("tests", default=False, description="Build tests")
variant("apps", default=False, description="Build miniapp")
variant("profiling", default=False, description="Enable profiling")
@@ -59,6 +61,8 @@ class Cosma(CMakePackage):
depends_on("scalapack", when="+scalapack")
depends_on("cuda", when="+cuda")
depends_on("rocblas", when="+rocm")
+ depends_on("nccl", when="+nccl")
+ depends_on("rccl", when="+rccl")
with when("@2.6.3:"):
depends_on("tiled-mm@2.2:+cuda", when="+cuda")
@@ -76,8 +80,10 @@ class Cosma(CMakePackage):
depends_on("semiprof", when="+profiling")
depends_on("costa+profiling", when="+profiling")
+ patch("fj-ssl2.patch", when="^fujitsu-ssl2")
+
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
env.set("CUDA_PATH", self.spec["cuda"].prefix)
def cosma_blas_cmake_arg(self):
@@ -89,6 +95,7 @@ class Cosma(CMakePackage):
("^cray-libsci", "CRAY_LIBSCI"),
("^netlib-lapack", "CUSTOM"),
("^openblas", "OPENBLAS"),
+ ("^fujitsu-ssl2", "SSL2"),
]
if self.version >= Version("2.4.0"):
@@ -105,11 +112,11 @@ class Cosma(CMakePackage):
def cosma_scalapack_cmake_arg(self):
spec = self.spec
- if "~scalapack" in spec:
+ if spec.satisfies("~scalapack"):
return "OFF"
- elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec:
+ elif spec.satisfies("^intel-mkl") or spec.satisfies("^intel-oneapi-mkl"):
return "MKL"
- elif "^cray-libsci" in spec:
+ elif spec.satisfies("^cray-libsci"):
return "CRAY_LIBSCI"
return "CUSTOM"
diff --git a/var/spack/repos/builtin/packages/cosmoflow-benchmark/package.py b/var/spack/repos/builtin/packages/cosmoflow-benchmark/package.py
index e9b69678ed..40117462a3 100644
--- a/var/spack/repos/builtin/packages/cosmoflow-benchmark/package.py
+++ b/var/spack/repos/builtin/packages/cosmoflow-benchmark/package.py
@@ -30,7 +30,7 @@ class CosmoflowBenchmark(Package, CudaPackage):
depends_on("py-tensorflow+cuda", when="+cuda", type=("build", "run"))
depends_on("py-tensorflow~cuda~nccl", when="~cuda", type=("build", "run"))
depends_on("py-torch+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch~cuda~cudnn~nccl", when="~cuda", type=("build", "run"))
+ depends_on("py-torch~cuda~nccl", when="~cuda", type=("build", "run"))
depends_on("py-horovod tensor_ops=mpi", when="~cuda", type=("build", "run"))
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cosmomc/package.py b/var/spack/repos/builtin/packages/cosmomc/package.py
index 9e66b8938a..93749619af 100644
--- a/var/spack/repos/builtin/packages/cosmomc/package.py
+++ b/var/spack/repos/builtin/packages/cosmomc/package.py
@@ -23,6 +23,9 @@ class Cosmomc(Package):
version("2016.11", sha256="b83edbf043ff83a4dde9bc14c56a09737dbc41ffe247a8e9c9a26892ed8745ba")
version("2016.06", sha256="23fa23eef40846c17d3740be63a7fefde13880cbb81545a44d14034277d9ffc0")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def url_for_version(self, version):
names = {"2016.11": "Nov2016", "2016.06": "June2016"}
return "https://github.com/cmbant/CosmoMC/archive/%s.tar.gz" % names[str(version)]
@@ -63,7 +66,7 @@ class Cosmomc(Package):
os.remove(clikdir)
except OSError:
pass
- if "+planck" in spec:
+ if spec.satisfies("+planck"):
os.symlink(join_path(os.environ["CLIK_DATA"], "plc_2.0"), clikdir)
else:
os.environ.pop("CLIK_DATA", "")
@@ -90,7 +93,7 @@ class Cosmomc(Package):
raise InstallError("Only GCC and Intel compilers are supported")
# Configure MPI
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
wantmpi = "BUILD=MPI"
mpif90 = "MPIF90C=%s" % spec["mpi"].mpifc
else:
@@ -135,7 +138,7 @@ class Cosmomc(Package):
"test_planck.ini",
"tests",
]
- if "+python" in spec:
+ if spec.satisfies("+python"):
entries += ["python"]
for entry in entries:
if os.path.isfile(entry):
@@ -168,7 +171,7 @@ class Cosmomc(Package):
exe = spec["cosmomc"].command.path
args = []
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
# Add mpirun prefix
args = ["-np", "1", exe]
exe = join_path(spec["mpi"].prefix.bin, "mpiexec")
@@ -178,6 +181,6 @@ class Cosmomc(Package):
os.symlink(join_path(prefix.share, "cosmomc", entry), entry)
inifile = join_path(prefix.share, "cosmomc", "test.ini")
cosmomc(*(args + [inifile]))
- if "+planck" in spec:
+ if spec.satisfies("+planck"):
inifile = join_path(prefix.share, "cosmomc", "test_planck.ini")
cosmomc(*(args + [inifile]))
diff --git a/var/spack/repos/builtin/packages/cosp2/package.py b/var/spack/repos/builtin/packages/cosp2/package.py
index d16466bad6..a5a78a27b0 100644
--- a/var/spack/repos/builtin/packages/cosp2/package.py
+++ b/var/spack/repos/builtin/packages/cosp2/package.py
@@ -21,6 +21,8 @@ class Cosp2(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
variant("double", default=True, description="Build with double precision.")
variant("mpi", default=True, description="Build with MPI Support")
@@ -31,14 +33,14 @@ class Cosp2(MakefilePackage):
def edit(self, spec, prefix):
cc = spack_cc
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
cc = spec["mpi"].mpicc
with working_dir(self.build_directory):
makefile = FileFilter("Makefile.vanilla")
makefile.filter(r"^CC\s*=.*", "CC = {0}".format(cc))
- if "+double" in spec:
+ if spec.satisfies("+double"):
filter_file("DOUBLE_PRECISION = O.*", "DOUBLE_PRECISION = OFF", "Makefile.vanilla")
copy("Makefile.vanilla", "Makefile")
diff --git a/var/spack/repos/builtin/packages/costa/package.py b/var/spack/repos/builtin/packages/costa/package.py
index a9a84a37d1..427c846801 100644
--- a/var/spack/repos/builtin/packages/costa/package.py
+++ b/var/spack/repos/builtin/packages/costa/package.py
@@ -28,8 +28,10 @@ class Costa(CMakePackage):
version("2.1", sha256="c1e86452415083f7470b292d93ec60708b7c8dbafc2bac383636bb4b28135866")
version("2.0", sha256="de250197f31f7d23226c6956a687c3ff46fb0ff6c621a932428236c3f7925fe4")
+ depends_on("cxx", type="build") # generated
+
variant("scalapack", default=False, description="Build with ScaLAPACK API")
- variant("shared", default=False, description="Build shared libraries")
+ variant("shared", default=True, description="Build shared libraries")
variant("profiling", default=False, description="Enable profiling")
variant("tests", default=False, description="Enable tests")
variant("apps", default=False, description="Enable miniapp")
@@ -55,11 +57,11 @@ class Costa(CMakePackage):
def costa_scalapack_cmake_arg(self):
spec = self.spec
- if "~scalapack" in spec:
+ if spec.satisfies("~scalapack"):
return "OFF"
- elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec:
+ elif spec.satisfies("^intel-mkl") or spec.satisfies("^intel-oneapi-mkl"):
return "MKL"
- elif "^cray-libsci" in spec:
+ elif spec.satisfies("^cray-libsci"):
return "CRAY_LIBSCI"
return "CUSTOM"
diff --git a/var/spack/repos/builtin/packages/costo/package.py b/var/spack/repos/builtin/packages/costo/package.py
new file mode 100644
index 0000000000..179de45e02
--- /dev/null
+++ b/var/spack/repos/builtin/packages/costo/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Costo(CMakePackage):
+ """costo stand for COSimulation TOols.
+ Its a layer above MPI to share data between meshes.
+ """
+
+ homepage = "https://gitlab.com/Te_ch/costo"
+ git = "https://gitlab.com/Te_ch/costo.git"
+
+ maintainers("tech-91")
+
+ license("LGPL-3.0-or-later")
+
+ version("0.0.8", tag="v0.0.8", preferred=True)
+ version("0.0.5", tag="v0.0.5")
+ version("develop", branch="devel")
+ version("main", branch="main", deprecated=True)
+
+ variant("shared", default=True, description="Build shared library")
+ variant("tests", default=False, description="Enable testing")
+
+ depends_on("mpi", type=all)
+ depends_on("python@3.10:", type=all)
+
+ depends_on("py-non-regression-test-tools", type="build")
+ depends_on("py-pyvista", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "link", "run"))
+ depends_on("py-mpi4py", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-mgmetis", type=("build", "run"))
+ depends_on("py-colorama", type=("build", "run"))
+ depends_on("py-pip", type="build")
+
+ def cmake_args(self):
+ args = [
+ # self.define("COSTO_ENABLE_TESTS", "OFF"),
+ self.define("COSTO_ENABLE_PYTHON_BINDINGS", "OFF"),
+ self.define("WITH_PYTHON_MODULE", "ON"),
+ self.define_from_variant("WITH_SHARED_LIBS", "shared"),
+ self.define_from_variant("WITH_TESTS", "tests"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/cotter/package.py b/var/spack/repos/builtin/packages/cotter/package.py
index c38d5352e7..f1ab277344 100644
--- a/var/spack/repos/builtin/packages/cotter/package.py
+++ b/var/spack/repos/builtin/packages/cotter/package.py
@@ -15,6 +15,8 @@ class Cotter(CMakePackage):
version("master", branch="master")
version("20190205", commit="b7b07f3298a8d57b9dfff0b72fc21e68b23a42da")
+ depends_on("cxx", type="build") # generated
+
depends_on("erfa")
depends_on("pal")
depends_on("aoflagger")
diff --git a/var/spack/repos/builtin/packages/countdown/package.py b/var/spack/repos/builtin/packages/countdown/package.py
new file mode 100644
index 0000000000..c3aa9a9db1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/countdown/package.py
@@ -0,0 +1,89 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Countdown(CMakePackage, CudaPackage):
+ """COUNTDOWN is a tool for identifying and automatically reducing the power
+ consumption of the computing elements, during communication and
+ synchronization primitives, filtering out phases which would detriment the
+ time to solution of the application."""
+
+ homepage = "https://github.com/EEESlab/countdown"
+ url = "https://github.com/EEESlab/countdown/archive/refs/tags/v1.1.1.tar.gz"
+
+ license("BSD-3-Clause")
+
+ maintainers("f-tesser", "danielecesarini")
+
+ version("1.1.1", sha256="ee7f00ffc047f000a21a7a71f6ea6f4049afb1a8407608adc04993929ceba917")
+
+ depends_on("c", type="build") # generated
+
+ variant(
+ "acc_mpi",
+ default=True,
+ description="Enable the instrumentation of all accessory MPI functions",
+ )
+ variant(
+ "coll_mpi",
+ default=True,
+ description="Enable the instrumentation of all collective MPI functions",
+ )
+ variant("debug_mpi", default=False, description="Enable the debug prints on MPI functions")
+ variant(
+ "excl_all_mpi",
+ default=False,
+ description="Disable the instrumentation of all MPI functions, "
+ "except for initialization and finalization",
+ )
+ variant("hwp_auto_discovery", default=True, description="Autodiscovery of hwp-states")
+ variant("mosquitto", default=False, description="Enable MQTT message passing")
+ variant("no_profiling", default=False, description="Disable MPI profiling")
+ variant("use_cpufreq", default=True, description="Manual set of cpufreq interface")
+ variant("use_hwp", default=False, description="Manual set if hwp-states are available")
+ variant(
+ "p2p_mpi",
+ default=True,
+ description="Enable the instrumentation of all point-to-point MPI functions",
+ )
+ variant("shared", default=True, description="Build shared libraries")
+
+ conflicts("+acc_mpi", when="+excl_all_mpi")
+ conflicts("+coll_mpi", when="+excl_all_mpi")
+ conflicts("+p2p_mpi", when="+excl_all_mpi")
+ conflicts("+excl_all_mpi", when="+acc_mpi")
+ conflicts("+excl_all_mpi", when="+coll_mpi")
+ conflicts("+excl_all_mpi", when="+p2p_mpi")
+ conflicts("+hwp_auto_discovery", when="+use_cpufreq")
+ conflicts("+hwp_auto_discovery", when="+use_hwp")
+ conflicts("+use_cpufreq", when="+hwp_auto_discovery")
+ conflicts("+use_cpufreq", when="+use_hwp")
+ conflicts("+use_hwp", when="+hwp_auto_discovery")
+ conflicts("+use_hwp", when="+use_cpufreq")
+
+ depends_on("cmake@3.0.0:", type="build")
+ depends_on("hwloc", type="link")
+ depends_on("mpi@3.0.0:", type="link")
+ depends_on("mosquitto", when="+mosquitto", type="link")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("CNTD_ENABLE_CUDA", "cuda"),
+ self.define_from_variant("CNTD_DISABLE_ACCESSORY_MPI", "acc_mpi"),
+ self.define_from_variant("CNTD_ENABLE_COLLECTIVE_MPI", "coll_mpi"),
+ self.define_from_variant("CNTD_ENABLE_DEBUG_MPI", "debug_mpi"),
+ self.define_from_variant("CNTD_DISABLE_ALL_MPI_EXCEPT_INI_FIN", "excl_all_mpi"),
+ self.define_from_variant("CNTD_HWP_AUTO_DISCOVER", "hwp_auto_discovery"),
+ self.define_from_variant("CNTD_ENABLE_MOSQUITTO", "mosquitto"),
+ self.define_from_variant("CNTD_DISABLE_PROFILING_MPI", "no_profiling"),
+ self.define_from_variant("CNTD_USE_CPUFREQ", "use_cpufreq"),
+ self.define_from_variant("CNTD_HWP_DISCOVERED", "use_hwp"),
+ self.define_from_variant("CNTD_ENABLE_P2P_MPI", "p2p_mpi"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/covfie/package.py b/var/spack/repos/builtin/packages/covfie/package.py
new file mode 100644
index 0000000000..2b88af03d1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/covfie/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Covfie(CMakePackage, CudaPackage):
+ """
+ Covfie is a library for compositional descriptions of storage methods for
+ vector fields and other structured multi-dimensional data.
+ """
+
+ homepage = "https://github.com/acts-project/covfie"
+ url = "https://github.com/acts-project/covfie/archive/refs/tags/v0.1.0.tar.gz"
+ list_url = "https://github.com/acts-project/covfie/tags"
+
+ license("MPL-2.0")
+
+ maintainers("stephenswat")
+
+ version("0.10.0", sha256="d44142b302ffc193ad2229f1d2cc6d8d720dd9da8c37989ada4f23018f86c964")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("concepts", default=False, description="Enforce C++20 concepts")
+
+ depends_on("cmake@3.18:", type="build")
+
+ def cmake_args(self):
+ args = [
+ self.define("COVFIE_PLATFORM_CPU", True),
+ self.define_from_variant("COVFIE_PLATFORM_CUDA", "cuda"),
+ self.define_from_variant("COVFIE_REQUIRE_CXX20", "concepts"),
+ self.define("COVFIE_QUIET", True),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/cp2k/cmake-relwithdebinfo-2024.1.patch b/var/spack/repos/builtin/packages/cp2k/cmake-relwithdebinfo-2024.1.patch
new file mode 100644
index 0000000000..b974527b8c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cp2k/cmake-relwithdebinfo-2024.1.patch
@@ -0,0 +1,23 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4526160ad..8218a7a3d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -63,6 +63,18 @@ string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+ string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
+ string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_RELEASE
+ ${CMAKE_Fortran_FLAGS_RELEASE})
++string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO
++ ${CMAKE_C_FLAGS_RELWITHDEBINFO})
++string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO
++ ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
++string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_RELWITHDEBINFO
++ ${CMAKE_Fortran_FLAGS_RELWITHDEBINFO})
++string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_MINSIZEREL
++ ${CMAKE_C_FLAGS_MINSIZEREL})
++string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_MINSIZEREL
++ ${CMAKE_CXX_FLAGS_MINSIZEREL})
++string(REPLACE "-DNDEBUG" "" CMAKE_Fortran_FLAGS_MINSIZEREL
++ ${CMAKE_Fortran_FLAGS_MINSIZEREL})
+
+ find_package(PkgConfig)
+
diff --git a/var/spack/repos/builtin/packages/cp2k/d4-dispersion-bugfix-2024.3.patch b/var/spack/repos/builtin/packages/cp2k/d4-dispersion-bugfix-2024.3.patch
new file mode 100644
index 0000000000..36613ab6dd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cp2k/d4-dispersion-bugfix-2024.3.patch
@@ -0,0 +1,56 @@
+diff --git a/src/qs_dispersion_d4.F b/src/qs_dispersion_d4.F
+index 74df989b4..e513ed435 100644
+--- a/src/qs_dispersion_d4.F
++++ b/src/qs_dispersion_d4.F
+@@ -26,6 +26,7 @@ MODULE qs_dispersion_d4
+ #endif
+ USE kinds, ONLY: dp
+ USE particle_types, ONLY: particle_type
++ USE periodic_table, ONLY: get_ptable_info, ptable
+ USE qs_dispersion_types, ONLY: qs_dispersion_type
+ USE qs_force_types, ONLY: qs_force_type
+ USE message_passing, ONLY: mp_para_env_type
+@@ -76,7 +77,8 @@ CONTAINS
+ TYPE(structure_type) :: mol
+ TYPE(realspace_cutoff) :: cutoff
+
+- INTEGER :: iatom, natom, ind_atom
++ LOGICAL :: found
++ INTEGER :: iatom, natom, ind_atom, zatom
+ INTEGER, ALLOCATABLE, DIMENSION(:) :: el_num
+ REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: gradient, xyz
+ REAL(KIND=dp), DIMENSION(3, 3) :: stress
+@@ -94,7 +96,9 @@ CONTAINS
+ DO iatom = 1, natom
+ xyz(:, iatom) = particle_set(iatom)%r(:)
+ CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
+- el_num(iatom) = ikind
++ CALL get_ptable_info(particle_set(iatom)%atomic_kind%element_symbol, &
++ ielement=zatom, found=found)
++ el_num(iatom) = zatom
+ END DO
+
+ !get information about cell / lattice
+@@ -125,7 +129,7 @@ CONTAINS
+ IF (para_env%num_pe > 1 .AND. para_env%mepos > 0) virial = 0.00_dp
+ END IF
+ DO iatom = 1, natom
+- ikind = el_num(iatom)
++ CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
+ ind_atom = atom_of_kind(iatom)
+ force(ikind)%dispersion(:, ind_atom) = force(ikind)%dispersion(:, ind_atom) + gradient(:, iatom)
+ END DO
+diff --git a/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES b/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
+index 047421204..c817677df 100644
+--- a/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
++++ b/tests/QS/regtest-dft-vdw-corr-4/TEST_FILES
+@@ -3,7 +3,7 @@
+ # e.g. 0 means do not compare anything, running is enough
+ # 1 compares the last total energy in the file
+ # for details see cp2k/tools/do_regtest
+-pbe_dftd4.inp 33 1.0E-14 -0.00141644869634
++pbe_dftd4.inp 33 1.0E-14 -0.00283102230260
+ pbe_dftd4_force.inp 72 1.0E-07 0.00007217
+-pbe_dftd4_stress.inp 31 1.0E-07 -5.16289312880E-03
++pbe_dftd4_stress.inp 31 1.0E-07 -2.14003785359E-02
+ #EOF
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 942b7313cd..5a478ea985 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -7,20 +7,33 @@ import os
import os.path
import sys
-import spack.platforms
import spack.util.environment
-import spack.util.executable
from spack.build_environment import dso_suffix
+from spack.build_systems import cmake, makefile
from spack.package import *
-
-class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
+GPU_MAP = {
+ "35": "K40",
+ "37": "K80",
+ "60": "P100",
+ "70": "V100",
+ "80": "A100",
+ "90": "H100",
+ "gfx906": "Mi50",
+ "gfx908": "Mi100",
+ "gfx90a": "Mi250",
+ "gfx90a:xnack-": "Mi250",
+ "gfx90a:xnack+": "Mi250",
+}
+
+
+class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
"""CP2K is a quantum chemistry and solid state physics software package
that can perform atomistic simulations of solid state, liquid, molecular,
periodic, material, crystal, and biological systems
"""
- build_system(conditional("cmake", when="@2023.2:"), "makefile", default="makefile")
+ build_system(conditional("cmake", when="@2023.2:"), "makefile", default="cmake")
homepage = "https://www.cp2k.org"
url = "https://github.com/cp2k/cp2k/releases/download/v3.0.0/cp2k-3.0.tar.bz2"
@@ -31,6 +44,9 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
license("GPL-2.0-or-later")
+ version("2024.3", sha256="a6eeee773b6b1fb417def576e4049a89a08a0ed5feffcd7f0b33c7d7b48f19ba")
+ version("2024.2", sha256="cc3e56c971dee9e89b705a1103765aba57bf41ad39a11c89d3de04c8b8cdf473")
+ version("2024.1", sha256="a7abf149a278dfd5283dc592a2c4ae803b37d040df25d62a5e35af5c4557668f")
version("2023.2", sha256="adbcc903c1a78cba98f49fe6905a62b49f12e3dfd7cedea00616d1a5f50550db")
version("2023.1", sha256="dff343b4a80c3a79363b805429bdb3320d3e1db48e0ff7d20a3dfd1c946a51ce")
version("2022.2", sha256="1a473dea512fe264bb45419f83de432d441f90404f829d89cbc3a03f723b8354")
@@ -39,28 +55,12 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
version("8.2", sha256="2e24768720efed1a5a4a58e83e2aca502cd8b95544c21695eb0de71ed652f20a")
version("8.1", sha256="7f37aead120730234a60b2989d0547ae5e5498d93b1e9b5eb548c041ee8e7772")
version("7.1", sha256="ccd711a09a426145440e666310dd01cc5772ab103493c4ae6a3470898cd0addb")
- version(
- "6.1",
- sha256="af803558e0a6b9e9d9ce8a3ab955ba32bacd179922455424e061c82c9fefa34b",
- deprecated=True,
- )
- version(
- "5.1",
- sha256="e23613b593354fa82e0b8410e17d94c607a0b8c6d9b5d843528403ab09904412",
- deprecated=True,
- )
- version(
- "4.1",
- sha256="4a3e4a101d8a35ebd80a9e9ecb02697fb8256364f1eccdbe4e5a85d31fe21343",
- deprecated=True,
- )
- version(
- "3.0",
- sha256="1acfacef643141045b7cbade7006f9b7538476d861eeecd9658c9e468dc61151",
- deprecated=True,
- )
version("master", branch="master", submodules="True")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
variant(
@@ -78,30 +78,33 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
"pexsi",
default=False,
description="Enable the alternative PEXSI method for density matrix evaluation",
+ when="+mpi",
)
variant(
"elpa",
default=False,
description="Enable optimised diagonalisation routines from ELPA",
- when="@6.1:",
+ when="+mpi",
)
variant(
"dlaf",
default=False,
description="Enable DLA-Future eigensolver and Cholesky decomposition",
- # TODO: Pin version when integrated in a release
- when="@master build_system=cmake",
+ when="@2024.1: build_system=cmake +mpi",
)
+ # sirius support was introduced in 7, but effectively usable starting from CP2K 9
variant(
"sirius",
default=False,
description="Enable planewave electronic structure calculations via SIRIUS",
+ when="@9: +mpi",
)
- variant("cosma", default=False, description="Use COSMA for p?gemm")
+ variant("cosma", default=False, description="Use COSMA for p?gemm", when="@8: +mpi")
variant(
"libvori",
default=False,
description="Enable support for Voronoi integration and BQB compression",
+ when="@8:",
)
variant("spglib", default=False, description="Enable support for spglib")
variant(
@@ -133,15 +136,13 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
),
)
variant(
- "cuda_fft",
- default=False,
- description=("Use CUDA also for FFTs in the PW part of CP2K"),
+ "cuda_fft", default=False, description="Use CUDA also for FFTs in the PW part of CP2K"
)
variant(
"cuda_blas",
default=False,
when="@:7", # req in CP2K v8+
- description=("Use CUBLAS for general matrix operations in DBCSR"),
+ description="Use CUBLAS for general matrix operations in DBCSR",
)
HFX_LMAX_RANGE = range(4, 8)
@@ -154,8 +155,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
multi=False,
)
- depends_on("python", type="build")
- depends_on("python@3:", when="@8:", type="build")
+ depends_on("python@3", type="build")
depends_on("blas")
depends_on("lapack")
@@ -163,47 +163,43 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# Force openmp propagation on some providers of blas / fftw-api
with when("+openmp"):
- depends_on("fftw+openmp", when="^fftw")
- depends_on("amdfftw+openmp", when="^amdfftw")
- depends_on("cray-fftw+openmp", when="^cray-fftw")
- depends_on("armpl-gcc threads=openmp", when="^armpl-gcc")
- depends_on("openblas threads=openmp", when="^openblas")
+ depends_on("fftw+openmp", when="^[virtuals=fftw-api] fftw")
+ depends_on("amdfftw+openmp", when="^[virtuals=fftw-api] amdfftw")
+ depends_on("cray-fftw+openmp", when="^[virtuals=fftw-api] cray-fftw")
+ depends_on("armpl-gcc threads=openmp", when="^[virtuals=blas] armpl-gcc")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
# The Cray compiler wrappers will automatically add libsci_mp with
# -fopenmp. Since CP2K unconditionally links blas/lapack/scalapack
# we have to be consistent.
- depends_on("cray-libsci+openmp", when="^cray-libsci")
+ depends_on("cray-libsci+openmp", when="^[virtuals=blas] cray-libsci")
with when("smm=libxsmm"):
- depends_on("libxsmm@1.17:~header-only", when="@9.1:")
+ depends_on("libxsmm~header-only")
# require libxsmm-1.11+ since 1.10 can leak file descriptors in Fortran
- depends_on("libxsmm@1.11:~header-only", when="@:8.9")
+ depends_on("libxsmm@1.11:")
+ depends_on("libxsmm@1.17:", when="@9.1:")
+ # build needs to be fixed for libxsmm@2 once it is released
+ depends_on("libxsmm@:1")
# use pkg-config (support added in libxsmm-1.10) to link to libxsmm
depends_on("pkgconfig", type="build")
- # please set variants: smm=blas by configuring packages.yaml or install
- # cp2k with option smm=blas on aarch64
- conflicts("target=aarch64:", msg="libxsmm is not available on arm")
with when("+libint"):
- # ... and in CP2K 7.0+ for linking to libint2
depends_on("pkgconfig", type="build", when="@7.0:")
- # libint & libxc are always statically linked
- depends_on("libint@1.1.4:1.2", when="@3.0:6.9")
for lmax in HFX_LMAX_RANGE:
- # libint2 can be linked dynamically again
+ depends_on(f"libint@2.6.0:+fortran tune=cp2k-lmax-{lmax}", when=f"@7.0: lmax={lmax}")
+ # AOCC only works with libint@2.6.0
depends_on(
- "libint@2.6.0:+fortran tune=cp2k-lmax-{0}".format(lmax),
- when="@7.0: lmax={0}".format(lmax),
+ f"libint@=2.6.0+fortran tune=cp2k-lmax-{lmax}", when=f"@7.0: lmax={lmax} %aocc"
)
with when("+libxc"):
- depends_on("pkgconfig", when="@7.0:")
- depends_on("libxc@2.2.2:3", when="@:5")
- depends_on("libxc@4.0.3:4", when="@6.0:6.9")
+ depends_on("pkgconfig", type="build", when="@7.0:")
depends_on("libxc@4.0.3:4", when="@7.0:8.1")
depends_on("libxc@5.1.3:5.1", when="@8.2:8")
depends_on("libxc@5.1.7:5.1", when="@9:2022.2")
depends_on("libxc@6.1:", when="@2023.1:")
depends_on("libxc@6.2:", when="@2023.2:")
+ depends_on("libxc@:6", when="@:2024.3")
with when("+spla"):
depends_on("spla+cuda+fortran", when="+cuda")
@@ -213,8 +209,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("mpi@2:")
depends_on("mpi@3:", when="@2023.1:")
depends_on("scalapack")
- depends_on("mpich+fortran", when="^mpich")
-
+ depends_on("mpich+fortran", when="^[virtuals=mpi] mpich")
conflicts("~mpi_f08", when="^mpich@4.1:")
with when("+cosma"):
@@ -223,12 +218,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("cosma@2.6.3:", when="@2023.2:")
depends_on("cosma+cuda", when="+cuda")
depends_on("cosma+rocm", when="+rocm")
- conflicts("~mpi")
- # COSMA support was introduced in 8+
- conflicts("@:7")
with when("+elpa"):
- conflicts("~mpi", msg="elpa requires MPI")
depends_on("elpa+openmp", when="+openmp")
depends_on("elpa~openmp", when="~openmp")
depends_on("elpa+cuda", when="+cuda")
@@ -240,15 +231,29 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("elpa@2023.05.001:", when="@2023.2:")
with when("+dlaf"):
- conflicts(
- "~mpi", msg="DLA-Future requires MPI. Only the distributed eigensolver is available."
- )
- depends_on("dla-future@0.2.1: +scalapack")
- depends_on("dla-future ~cuda", when="~cuda")
- depends_on("dla-future ~rocm", when="~rocm")
- depends_on("dla-future +cuda", when="+cuda")
- depends_on("dla-future +rocm", when="+rocm")
+ with when("@:2024.1"):
+ depends_on("dla-future@0.2.1: +scalapack")
+ depends_on("dla-future ~cuda", when="~cuda")
+ depends_on("dla-future ~rocm", when="~rocm")
+ depends_on("dla-future +cuda", when="+cuda")
+ depends_on("dla-future +rocm", when="+rocm")
+
+ with when("@2024.2:"):
+ depends_on("dla-future-fortran@0.1.0:")
+
+ # Use a direct dependency on dla-future so that constraints can be expressed
+ # WARN: In the concretizer output, dla-future will appear as dependency of CP2K
+ # instead of dla-future-fortran
+ depends_on("dla-future ~cuda", when="~cuda")
+ depends_on("dla-future ~rocm", when="~rocm")
+ depends_on("dla-future +cuda", when="+cuda")
+ depends_on("dla-future +rocm", when="+rocm")
+ conflicts(
+ "+plumed",
+ when="@:2024.1 build_system=cmake",
+ msg="PLUMED support is broken in cp2k@:2024.1 with CMake",
+ )
with when("+plumed"):
depends_on("plumed+shared")
depends_on("plumed+mpi", when="+mpi")
@@ -256,10 +261,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# while we link statically against PEXSI, its own deps may be linked in
# dynamically, therefore can't set this as pure build-type dependency.
- with when("+pexsi"):
- conflicts("~mpi", msg="pexsi requires MPI")
- depends_on("pexsi+fortran@0.9.0:0.9", when="@:4")
- depends_on("pexsi+fortran@0.10.0:", when="@5.0:")
+ depends_on("pexsi+fortran@0.10.0:", when="+pexsi")
# only OpenMP should be consistently used, all other common things
# like ELPA, SCALAPACK are independent and Spack will ensure that
@@ -270,21 +272,14 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("sirius+rocm", when="+rocm")
depends_on("sirius+openmp", when="+openmp")
depends_on("sirius~openmp", when="~openmp")
- depends_on("sirius@7.0.0:7.0", when="@8:8.2")
- depends_on("sirius@7.2", when="@8.3:8.9")
depends_on("sirius@7.3:", when="@9.1")
depends_on("sirius@7.4:7.5", when="@2023.2")
- depends_on("sirius@7.5:", when="@master")
- conflicts("~mpi", msg="SIRIUS requires MPI")
- # sirius support was introduced in 7, but effectively usable starting from CP2K 9
- conflicts("@:8")
-
+ depends_on("sirius@7.5:", when="@2024.1:")
+ depends_on("sirius@7.6: +pugixml", when="@2024.2:")
with when("+libvori"):
depends_on("libvori@201219:", when="@8.1")
depends_on("libvori@210412:", when="@8.2:")
depends_on("libvori@220621:", when="@2023.1:")
- # libvori support was introduced in 8+
- conflicts("@:7")
# the bundled libcusmm uses numpy in the parameter prediction (v7+)
# which is written using Python 3
@@ -294,24 +289,25 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
depends_on("spglib", when="+spglib")
- # Apparently cp2k@4.1 needs an "experimental" version of libwannier.a
- # which is only available contacting the developer directly. See INSTALL
- # in the stage of cp2k@4.1
- depends_on("wannier90", when="@3.0+mpi")
-
with when("build_system=cmake"):
depends_on("cmake@3.22:", type="build")
# DBCSR as external dependency
- depends_on("dbcsr@2.6:")
+ depends_on("dbcsr@2.6: ~examples")
depends_on("dbcsr+openmp", when="+openmp")
+ depends_on("dbcsr+mpi", when="+mpi")
depends_on("dbcsr+cuda", when="+cuda")
depends_on("dbcsr+rocm", when="+rocm")
+ depends_on("dbcsr smm=libxsmm", when="smm=libxsmm")
+ depends_on("dbcsr smm=blas", when="smm=blas")
with when("@2022: +rocm"):
depends_on("hipblas")
depends_on("hipfft")
+ # The CMake build system and AOCC are not compatible as of AOCC 5
+ requires("build_system=makefile", when="%aocc")
+
# CP2K needs compiler specific compilation flags, e.g. optflags
conflicts("%apple-clang")
conflicts("%clang")
@@ -328,20 +324,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# from the parent class, since the parent class defines constraints for all
# versions. Instead just mark all unsupported cuda archs as conflicting.
- supported_cuda_arch_list = ("35", "37", "60", "70", "80")
+ supported_cuda_arch_list = ("35", "37", "60", "70", "80", "90")
supported_rocm_arch_list = ("gfx906", "gfx908", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+")
- gpu_map = {
- "35": "K40",
- "37": "K80",
- "60": "P100",
- "70": "V100",
- "80": "A100",
- "gfx906": "Mi50",
- "gfx908": "Mi100",
- "gfx90a": "Mi250",
- "gfx90a:xnack-": "Mi250",
- "gfx90a:xnack+": "Mi250",
- }
cuda_msg = "cp2k only supports cuda_arch {0}".format(supported_cuda_arch_list)
rocm_msg = "cp2k only supports amdgpu_target {0}".format(supported_rocm_arch_list)
@@ -381,43 +365,59 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# These patches backport 2023.x fixes to previous versions
patch("backport_avoid_null_2022.x.patch", when="@2022.1:2022.2 %aocc@:4.0")
patch("backport_avoid_null_9.1.patch", when="@9.1 %aocc@:4.0")
+
patch("cmake-fixes-2023.2.patch", when="@2023.2 build_system=cmake")
- # Patch for an undefined constant due to incompatible changes in ELPA
- @when("@9.1:2022.2 +elpa")
+ # Allow compilation with build_type=RelWithDebInfo and build_type=MinSizeRel
+ # after NDEBUG support was dropped in https://github.com/cp2k/cp2k/pull/3172
+ # The patch applies https://github.com/cp2k/cp2k/pull/3251 to version 2024.1
+ patch("cmake-relwithdebinfo-2024.1.patch", when="@2024.1 build_system=cmake")
+
+ # Bugfix for D4 dispersion correction in CP2K 2024.3
+ # https://github.com/cp2k/cp2k/issues/3688
+ patch("d4-dispersion-bugfix-2024.3.patch", when="@2024.3")
+
+ # Fix segmentation faults caused by accessing unallocated arrays
+ # https://github.com/cp2k/cp2k/pull/3733
+ patch(
+ "https://github.com/cp2k/cp2k/commit/7a99649828ecf7d5dc53d952a1bf7be6970deabe.patch?full_index=1",
+ sha256="37f4f1a76634ff4a5617fe0c670e6acfe2afa2b2cfc5b2875e438a54baa4525e",
+ when="@2024.2:2024.3",
+ )
+
def patch(self):
- if self.spec["elpa"].satisfies("@2022.05.001:"):
- filter_file(
- r"ELPA_2STAGE_REAL_INTEL_GPU",
- "ELPA_2STAGE_REAL_INTEL_GPU_SYCL",
- "src/fm/cp_fm_elpa.F",
- )
+ # Patch for an undefined constant due to incompatible changes in ELPA
+ if self.spec.satisfies("@9.1:2022.2 +elpa"):
+ if self.spec["elpa"].satisfies("@2022.05.001:"):
+ filter_file(
+ r"ELPA_2STAGE_REAL_INTEL_GPU",
+ "ELPA_2STAGE_REAL_INTEL_GPU_SYCL",
+ "src/fm/cp_fm_elpa.F",
+ )
+
+ # Patch for resolving .mod file conflicts in ROCm by implementing 'USE, INTRINSIC'
+ if self.spec.satisfies("+rocm"):
+ for directory, subdirectory, files in os.walk(os.getcwd()):
+ for i in files:
+ file_path = os.path.join(directory, i)
+ filter_file("USE ISO_C_BINDING", "USE,INTRINSIC :: ISO_C_BINDING", file_path)
+ filter_file(
+ "USE ISO_FORTRAN_ENV", "USE,INTRINSIC :: ISO_FORTRAN_ENV", file_path
+ )
+ filter_file("USE omp_lib", "USE,INTRINSIC :: omp_lib", file_path)
+ filter_file("USE OMP_LIB", "USE,INTRINSIC :: OMP_LIB", file_path)
+ filter_file("USE iso_c_binding", "USE,INTRINSIC :: iso_c_binding", file_path)
+ filter_file(
+ "USE iso_fortran_env", "USE,INTRINSIC :: iso_fortran_env", file_path
+ )
def url_for_version(self, version):
url = "https://github.com/cp2k/cp2k/releases/download/v{0}/cp2k-{0}.tar.bz2"
return url.format(version)
- @property
- def makefile_architecture(self):
- return "{0.architecture}-{0.compiler.name}".format(self.spec)
- @property
- def makefile_version(self):
- return "{prefix}{suffix}".format(
- prefix="p" if "+mpi" in self.spec else "s",
- suffix="smp" if "+openmp" in self.spec else "opt",
- )
-
- @property
- def makefile(self):
- makefile_basename = ".".join([self.makefile_architecture, self.makefile_version])
- return join_path("arch", makefile_basename)
-
- @property
- def archive_files(self):
- return [join_path(self.stage.source_path, self.makefile)]
-
- def edit(self, spec, prefix):
+class MakefileBuilder(makefile.MakefileBuilder):
+ def edit(self, pkg, spec, prefix):
pkgconf = which("pkg-config")
fftw = spec["fftw-api:openmp" if "+openmp" in spec else "fftw-api"]
@@ -432,27 +432,30 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
optimization_flags = {
"gcc": ["-O2", "-funroll-loops", "-ftree-vectorize"],
"intel": ["-O2", "-pc64", "-unroll"],
- "pgi": ["-fast"],
"nvhpc": ["-fast"],
"cce": ["-O2"],
"xl": ["-O3"],
"aocc": ["-O2"],
+ "rocmcc": ["-O1"],
}
- dflags = ["-DNDEBUG"]
- cppflags = ["-D__FFTW3", "-I{0}".format(fftw_header_dir)]
+ dflags = ["-DNDEBUG"] if spec.satisfies("@:2023.2") else []
+ if fftw.name in ("intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"):
+ cppflags = ["-D__FFTW3_MKL", "-I{0}".format(fftw_header_dir)]
+ else:
+ cppflags = ["-D__FFTW3", "-I{0}".format(fftw_header_dir)]
# CP2K requires MPI 3 starting at version 2023.1
# and __MPI_VERSION is not supported anymore.
- if "@:2022.2" in spec:
- if "^mpi@3:" in spec:
+ if spec.satisfies("@:2022.2"):
+ if spec.satisfies("^mpi@3:"):
cppflags.append("-D__MPI_VERSION=3")
- elif "^mpi@2:" in spec:
+ elif spec.satisfies("^mpi@2:"):
cppflags.append("-D__MPI_VERSION=2")
- cflags = optimization_flags[self.spec.compiler.name][:]
- cxxflags = optimization_flags[self.spec.compiler.name][:]
- fcflags = optimization_flags[self.spec.compiler.name][:]
+ cflags = optimization_flags[spec.compiler.name][:]
+ cxxflags = optimization_flags[spec.compiler.name][:]
+ fcflags = optimization_flags[spec.compiler.name][:]
nvflags = ["-O3"]
ldflags = []
libs = []
@@ -460,28 +463,28 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# CP2K Makefile doesn't set C standard
if spec.satisfies("@2023.2:"):
# Use of DBL_DECIMAL_DIG
- cflags.append(self.compiler.c11_flag)
+ cflags.append(pkg.compiler.c11_flag)
else:
# C99-style for-loops with inline definition of iterating variable.
- cflags.append(self.compiler.c99_flag)
+ cflags.append(pkg.compiler.c99_flag)
- if "%intel" in spec:
+ if spec.satisfies("%intel"):
cflags.append("-fp-model precise")
cxxflags.append("-fp-model precise")
fcflags += ["-fp-model precise", "-heap-arrays 64", "-g", "-traceback"]
- elif "%gcc" in spec:
+ elif spec.satisfies("%gcc"):
fcflags += [
"-ffree-form",
"-ffree-line-length-none",
"-ggdb", # make sure we get proper Fortran backtraces
]
- elif "%aocc" in spec:
+ elif spec.satisfies("%aocc") or spec.satisfies("%rocmcc"):
fcflags += ["-ffree-form", "-Mbackslash"]
- elif "%pgi" in spec or "%nvhpc" in spec:
+ elif spec.satisfies("%nvhpc"):
fcflags += ["-Mfreeform", "-Mextend"]
- elif "%cce" in spec:
+ elif spec.satisfies("%cce"):
fcflags += ["-emf", "-ffree", "-hflex_mp=strict"]
- elif "%xl" in spec:
+ elif spec.satisfies("%xl"):
fcflags += ["-qpreprocess", "-qstrict", "-q64"]
ldflags += ["-Wl,--allow-multiple-definition"]
@@ -492,105 +495,31 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
if spec.satisfies("@7.1%gcc@13:"):
fcflags.append("-fallow-argument-mismatch")
- if "+openmp" in spec:
- cflags.append(self.compiler.openmp_flag)
- cxxflags.append(self.compiler.openmp_flag)
- fcflags.append(self.compiler.openmp_flag)
- ldflags.append(self.compiler.openmp_flag)
- nvflags.append('-Xcompiler="{0}"'.format(self.compiler.openmp_flag))
- elif "%cce" in spec: # Cray enables OpenMP by default
+ if spec.satisfies("+openmp"):
+ cflags.append(pkg.compiler.openmp_flag)
+ cxxflags.append(pkg.compiler.openmp_flag)
+ fcflags.append(pkg.compiler.openmp_flag)
+ ldflags.append(pkg.compiler.openmp_flag)
+ nvflags.append('-Xcompiler="{0}"'.format(pkg.compiler.openmp_flag))
+ elif spec.satisfies("%cce"): # Cray enables OpenMP by default
cflags += ["-hnoomp"]
cxxflags += ["-hnoomp"]
fcflags += ["-hnoomp"]
ldflags += ["-hnoomp"]
- if "@7:" in spec: # recent versions of CP2K use C++14 CUDA code
- cxxflags.append(self.compiler.cxx14_flag)
- nvflags.append(self.compiler.cxx14_flag)
+ if spec.satisfies("@7:"): # recent versions of CP2K use C++14 CUDA code
+ cxxflags.append(pkg.compiler.cxx14_flag)
+ nvflags.append(pkg.compiler.cxx14_flag)
ldflags.append(fftw.libs.search_flags)
- if "superlu-dist@4.3" in spec:
+ if spec.satisfies("^superlu-dist@4.3"):
ldflags.insert(0, "-Wl,--allow-multiple-definition")
- if "+plumed" in self.spec:
- dflags.extend(["-D__PLUMED2"])
- cppflags.extend(["-D__PLUMED2"])
- libs.extend(
- [join_path(self.spec["plumed"].prefix.lib, "libplumed.{0}".format(dso_suffix))]
- )
-
- cc = spack_cc if "~mpi" in spec else spec["mpi"].mpicc
- cxx = spack_cxx if "~mpi" in spec else spec["mpi"].mpicxx
- fc = spack_fc if "~mpi" in spec else spec["mpi"].mpifc
-
- # Intel
- if "%intel" in spec:
- cppflags.extend(["-D__INTEL", "-D__HAS_ISO_C_BINDING", "-D__USE_CP2K_TRACE"])
- fcflags.extend(["-diag-disable 8290,8291,10010,10212,11060", "-free", "-fpp"])
-
- # FFTW, LAPACK, BLAS
- lapack = spec["lapack"].libs
- blas = spec["blas"].libs
- ldflags.append((lapack + blas).search_flags)
- libs.extend([str(x) for x in (fftw.libs, lapack, blas)])
-
- if self.spec.satisfies("platform=darwin"):
- cppflags.extend(["-D__NO_STATM_ACCESS"])
-
- if spec["blas"].name in ("intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"):
- cppflags += ["-D__MKL"]
- elif spec["blas"].name == "accelerate":
- cppflags += ["-D__ACCELERATE"]
-
- if "+cosma" in spec:
- # add before ScaLAPACK to override the p?gemm symbols
- cosma = spec["cosma"].libs
- ldflags.append(cosma.search_flags)
- libs.extend(cosma)
-
- # MPI
- if "+mpi" in spec:
- cppflags.extend(["-D__parallel", "-D__SCALAPACK"])
-
- if spec["mpi"].name == "intel-oneapi-mpi":
- mpi = [join_path(spec["intel-oneapi-mpi"].libs.directories[0], "libmpi.so")]
- else:
- mpi = spec["mpi:cxx"].libs
-
- # while intel-mkl has a mpi variant and adds the scalapack
- # libs to its libs, intel-oneapi-mkl does not.
- if spec["scalapack"].name == "intel-oneapi-mkl":
- mpi_impl = "openmpi" if spec["mpi"] == "openmpi" else "intelmpi"
- scalapack = [
- join_path(
- spec["intel-oneapi-mkl"].libs.directories[0], "libmkl_scalapack_lp64.so"
- ),
- join_path(
- spec["intel-oneapi-mkl"].libs.directories[0],
- "libmkl_blacs_{0}_lp64.so".format(mpi_impl),
- ),
- ]
- else:
- scalapack = spec["scalapack"].libs
- ldflags.append(scalapack.search_flags)
-
- libs.extend(scalapack)
- libs.extend(mpi)
- libs.extend(self.compiler.stdcxx_libs)
-
- if "+mpi_f08" in spec:
- cppflags.append("-D__MPI_F08")
-
- if "wannier90" in spec:
- cppflags.append("-D__WANNIER90")
- wannier = join_path(spec["wannier90"].libs.directories[0], "libwannier.a")
- libs.append(wannier)
-
- if "+libint" in spec:
+ if spec.satisfies("+libint"):
cppflags += ["-D__LIBINT"]
- if "@:6.9" in spec:
+ if spec.satisfies("@:6.9"):
cppflags += ["-D__LIBINT_MAX_AM=6", "-D__LIBDERIV_MAX_AM1=5"]
# libint-1.x.y has to be linked statically to work around
@@ -598,20 +527,19 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# (short-int vs int) which otherwise causes segfaults at
# runtime due to wrong offsets into the shared library
# symbols.
- libs.extend(
- [
- join_path(spec["libint"].libs.directories[0], "libderiv.a"),
- join_path(spec["libint"].libs.directories[0], "libint.a"),
- ]
- )
+ libs += [
+ join_path(spec["libint"].libs.directories[0], "libderiv.a"),
+ join_path(spec["libint"].libs.directories[0], "libint.a"),
+ ]
+
else:
fcflags += pkgconf("--cflags", "libint2", output=str).split()
libs += pkgconf("--libs", "libint2", output=str).split()
- if "+libxc" in spec:
+ if spec.satisfies("+libxc"):
cppflags += ["-D__LIBXC"]
- if "@:6.9" in spec:
+ if spec.satisfies("@:6.9"):
libxc = spec["libxc:fortran,static"]
cppflags += [libxc.headers.cpp_flags]
ldflags.append(libxc.libs.search_flags)
@@ -623,23 +551,19 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
# requiring `-lxc` to be present in addition to `-lxcf03`
libs += pkgconf("--libs", "libxcf03", "libxc", output=str).split()
- if "+pexsi" in spec:
+ if spec.satisfies("+pexsi"):
cppflags.append("-D__LIBPEXSI")
fcflags.append("-I" + join_path(spec["pexsi"].prefix, "fortran"))
- libs.extend(
- [
- join_path(spec["pexsi"].libs.directories[0], "libpexsi.a"),
- join_path(spec["superlu-dist"].libs.directories[0], "libsuperlu_dist.a"),
- join_path(
- spec["parmetis"].libs.directories[0], "libparmetis.{0}".format(dso_suffix)
- ),
- join_path(
- spec["metis"].libs.directories[0], "libmetis.{0}".format(dso_suffix)
- ),
- ]
- )
+ libs += [
+ join_path(spec["pexsi"].libs.directories[0], "libpexsi.a"),
+ join_path(spec["superlu-dist"].libs.directories[0], "libsuperlu_dist.a"),
+ join_path(
+ spec["parmetis"].libs.directories[0], "libparmetis.{0}".format(dso_suffix)
+ ),
+ join_path(spec["metis"].libs.directories[0], "libmetis.{0}".format(dso_suffix)),
+ ]
- if "+elpa" in spec:
+ if spec.satisfies("+elpa"):
elpa = spec["elpa"]
elpa_suffix = "_openmp" if "+openmp" in elpa else ""
elpa_incdir = elpa.headers.directories[0]
@@ -647,23 +571,14 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
fcflags += ["-I{0}".format(join_path(elpa_incdir, "modules"))]
# Currently AOCC support only static libraries of ELPA
- if "%aocc" in spec:
+ if spec.satisfies("%aocc"):
libs.append(
join_path(
elpa.prefix.lib, ("libelpa{elpa_suffix}.a".format(elpa_suffix=elpa_suffix))
)
)
else:
- libs.append(
- join_path(
- elpa.libs.directories[0],
- (
- "libelpa{elpa_suffix}.{dso_suffix}".format(
- elpa_suffix=elpa_suffix, dso_suffix=dso_suffix
- )
- ),
- )
- )
+ libs.append(elpa.libs.ld_flags)
if spec.satisfies("@:4"):
if elpa.satisfies("@:2014.5"):
@@ -687,6 +602,91 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
fcflags += ["-I{0}".format(sirius.prefix.include.sirius)]
libs += list(sirius.libs)
+ if spec.satisfies("+plumed"):
+ dflags.extend(["-D__PLUMED2"])
+ cppflags.extend(["-D__PLUMED2"])
+ libs += [join_path(spec["plumed"].prefix.lib, "libplumed.{0}".format(dso_suffix))]
+
+ if spec.satisfies("+libvori"):
+ cppflags += ["-D__LIBVORI"]
+ libvori = spec["libvori"].libs
+ ldflags += [libvori.search_flags]
+ libs.append(libvori.ld_flags)
+ libs += ["-lstdc++"]
+
+ if spec.satisfies("+spglib"):
+ cppflags += ["-D__SPGLIB"]
+ spglib = spec["spglib"].libs
+ ldflags += [spglib.search_flags]
+ libs.append(spglib.ld_flags)
+
+ cc = spack_cc if "~mpi" in spec else spec["mpi"].mpicc
+ cxx = spack_cxx if "~mpi" in spec else spec["mpi"].mpicxx
+ fc = spack_fc if "~mpi" in spec else spec["mpi"].mpifc
+
+ # Intel
+ if spec.satisfies("%intel"):
+ cppflags.extend(["-D__INTEL", "-D__HAS_ISO_C_BINDING", "-D__USE_CP2K_TRACE"])
+ fcflags.extend(["-diag-disable 8290,8291,10010,10212,11060", "-free", "-fpp"])
+
+ # FFTW, LAPACK, BLAS
+ lapack = spec["lapack"].libs
+ blas = spec["blas"].libs
+ ldflags.append((lapack + blas).search_flags)
+ libs += [str(x) for x in (fftw.libs, lapack, blas)]
+
+ if spec.satisfies("platform=darwin"):
+ cppflags.extend(["-D__NO_STATM_ACCESS"])
+
+ if spec["blas"].name in ("intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"):
+ cppflags += ["-D__MKL"]
+ elif spec["blas"].name == "accelerate":
+ cppflags += ["-D__ACCELERATE"]
+
+ if spec.satisfies("+cosma"):
+ # add before ScaLAPACK to override the p?gemm symbols
+ cosma = spec["cosma"].libs
+ ldflags.append(cosma.search_flags)
+ libs += cosma
+
+ # MPI
+ if spec.satisfies("+mpi"):
+ cppflags.extend(["-D__parallel", "-D__SCALAPACK"])
+
+ if spec["mpi"].name == "intel-oneapi-mpi":
+ mpi = [join_path(spec["intel-oneapi-mpi"].libs.directories[0], "libmpi.so")]
+ else:
+ mpi = spec["mpi:cxx"].libs
+
+ # while intel-mkl has a mpi variant and adds the scalapack
+ # libs to its libs, intel-oneapi-mkl does not.
+ if spec["scalapack"].name == "intel-oneapi-mkl":
+ mpi_impl = "openmpi" if spec["mpi"].name in ["openmpi", "hpcx-mpi"] else "intelmpi"
+ scalapack = [
+ join_path(
+ spec["intel-oneapi-mkl"].libs.directories[0], "libmkl_scalapack_lp64.so"
+ ),
+ join_path(
+ spec["intel-oneapi-mkl"].libs.directories[0],
+ "libmkl_blacs_{0}_lp64.so".format(mpi_impl),
+ ),
+ ]
+ else:
+ scalapack = spec["scalapack"].libs
+ ldflags.append(scalapack.search_flags)
+
+ libs += scalapack
+ libs += mpi
+ libs += pkg.compiler.stdcxx_libs
+
+ if spec.satisfies("+mpi_f08"):
+ cppflags.append("-D__MPI_F08")
+
+ if spec.satisfies("^wannier90"):
+ cppflags.append("-D__WANNIER90")
+ wannier = join_path(spec["wannier90"].libs.directories[0], "libwannier.a")
+ libs.append(wannier)
+
gpuver = ""
if spec.satisfies("+cuda"):
libs += [
@@ -730,27 +730,29 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
libs += ["-lcufft", "-lcublas"]
cuda_arch = spec.variants["cuda_arch"].value[0]
- gpuver = gpu_map[cuda_arch]
+ gpuver = GPU_MAP[cuda_arch]
if cuda_arch == "35" and spec.satisfies("+cuda_arch_35_k20x"):
gpuver = "K20X"
- if "@2022: +rocm" in spec:
+ if spec.satisfies("@2022: +rocm"):
libs += [
- "-L{}".format(spec["rocm"].libs.directories[0]),
- "-L{}/stubs".format(spec["rocm"].libs.directories[0]),
+ "-L{}".format(spec["hip"].prefix.lib),
+ "-lamdhip64",
"-lhipblas",
"-lhipfft",
"-lstdc++",
]
- cppflags += ["-D__OFFLOAD_HIP"]
acc_compiler_var = "hipcc"
acc_flags_var = "NVFLAGS"
cppflags += ["-D__ACC"]
cppflags += ["-D__DBCSR_ACC"]
- gpuver = gpu_map[spec.variants["amdgpu_target"].value[0]]
+ cppflags += ["-D__HIP_PLATFORM_AMD__"]
+ cppflags += ["-D__GRID_HIP"]
- if "smm=libsmm" in spec:
+ gpuver = GPU_MAP[spec.variants["amdgpu_target"].value[0]]
+
+ if spec.satisfies("smm=libsmm"):
lib_dir = join_path("lib", self.makefile_architecture, self.makefile_version)
mkdirp(lib_dir)
try:
@@ -768,25 +770,12 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
cppflags.extend(["-D__HAS_smm_dnn", "-D__HAS_smm_vec"])
libs.append("-lsmm")
- elif "smm=libxsmm" in spec:
+ elif spec.satisfies("smm=libxsmm"):
cppflags += ["-D__LIBXSMM"]
cppflags += pkgconf("--cflags-only-other", "libxsmmf", output=str).split()
fcflags += pkgconf("--cflags-only-I", "libxsmmf", output=str).split()
libs += pkgconf("--libs", "libxsmmf", output=str).split()
- if "+libvori" in spec:
- cppflags += ["-D__LIBVORI"]
- libvori = spec["libvori"].libs
- ldflags += [libvori.search_flags]
- libs += libvori
- libs += ["-lstdc++"]
-
- if "+spglib" in spec:
- cppflags += ["-D__SPGLIB"]
- spglib = spec["spglib"].libs
- ldflags += [spglib.search_flags]
- libs += spglib
-
dflags.extend(cppflags)
cflags.extend(cppflags)
cxxflags.extend(cppflags)
@@ -794,7 +783,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
nvflags.extend(cppflags)
with open(self.makefile, "w") as mkf:
- if "+plumed" in spec:
+ if spec.satisfies("+plumed"):
mkf.write(
"# include Plumed.inc as recommended by"
"PLUMED to include libraries and flags"
@@ -806,8 +795,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
"FC = {0}\n" "CC = {1}\n" "CXX = {2}\n" "LD = {3}\n".format(fc, cc, cxx, fc)
)
- if "%intel" in spec:
- intel_bin_dir = ancestor(self.compiler.cc)
+ if spec.satisfies("%intel"):
+ intel_bin_dir = ancestor(pkg.compiler.cc)
# CPP is a commented command in Intel arch of CP2K
# This is the hack through which cp2k developers avoid doing :
#
@@ -820,7 +809,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
mkf.write("CPP = # {0} -E\n".format(spack_cc))
mkf.write("AR = ar -qs\n") # r = qs is a GNU extension
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
mkf.write(
"{0} = {1}\n".format(
acc_compiler_var, join_path(spec["cuda"].prefix, "bin", "nvcc")
@@ -836,22 +825,54 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
mkf.write(fflags("CPPFLAGS", cppflags))
mkf.write(fflags("CFLAGS", cflags))
mkf.write(fflags("CXXFLAGS", cxxflags))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
mkf.write(fflags(acc_flags_var, nvflags))
+ if "+rocm" in spec:
+ mkf.write("OFFLOAD_TARGET = hip\n")
+
mkf.write(fflags("FCFLAGS", fcflags))
mkf.write(fflags("LDFLAGS", ldflags))
mkf.write(fflags("LIBS", libs))
- if "%intel" in spec:
+ if spec.satisfies("%intel"):
mkf.write(fflags("LDFLAGS_C", ldflags + ["-nofor-main"]))
+ if spec.satisfies("%aocc@5:"):
+ # ensure C based applications can be build properly
+ mkf.write(fflags("LDFLAGS_C", ldflags + ["-fno-fortran-main"]))
+ # This flag is required for the correct runtime behaviour of the code with aocc@5.0
+ mkf.write(fflags("FCFLAGS", fcflags + ["-mllvm -enable-newgvn=true"]))
+
mkf.write("# CP2K-specific flags\n\n")
mkf.write("GPUVER = {0}\n".format(gpuver))
- mkf.write("DATA_DIR = {0}\n".format(self.prefix.share.data))
+ mkf.write("DATA_DIR = {0}\n".format(prefix.share.data))
+
+ def build(self, pkg, spec, prefix):
+ if "+cuda" in spec and len(spec.variants["cuda_arch"].value) > 1:
+ raise InstallError("cp2k supports only one cuda_arch at a time")
+
+ # Apparently the Makefile bases its paths on PWD
+ # so we need to set PWD = self.build_directory
+ with spack.util.environment.set_env(PWD=self.build_directory):
+ super().build(pkg, spec, prefix)
+
+ with working_dir(self.build_directory):
+ make("libcp2k", *self.build_targets)
+
+ def install(self, pkg, spec, prefix):
+ exe_dir = join_path("exe", self.makefile_architecture)
+ lib_dir = join_path("lib", self.makefile_architecture, self.makefile_version)
+
+ install_tree(exe_dir, self.prefix.bin)
+ install_tree("data", self.prefix.share.data)
+ install_tree(lib_dir, self.prefix.lib)
+
+ mkdirp(self.prefix.include)
+ install("src/start/libcp2k.h", join_path(self.prefix.include, "libcp2k.h"))
@property
def build_directory(self):
- build_dir = self.stage.source_path
+ build_dir = self.pkg.stage.source_path
if self.spec.satisfies("@:6"):
# prior to version 7.1 was the Makefile located in makefiles/
@@ -866,30 +887,36 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
"VERSION={0}".format(self.makefile_version),
]
- def build(self, spec, prefix):
- if "+cuda" in spec and len(spec.variants["cuda_arch"].value) > 1:
- raise InstallError("cp2k supports only one cuda_arch at a time")
+ @property
+ def makefile(self):
+ makefile_basename = ".".join([self.makefile_architecture, self.makefile_version])
+ return join_path("arch", makefile_basename)
- # Apparently the Makefile bases its paths on PWD
- # so we need to set PWD = self.build_directory
- with spack.util.environment.set_env(PWD=self.build_directory):
- super().build(spec, prefix)
+ @property
+ def makefile_architecture(self):
+ return "{0.architecture}-{0.compiler.name}".format(self.spec)
- with working_dir(self.build_directory):
- make("libcp2k", *self.build_targets)
+ @property
+ def makefile_version(self):
+ return "{prefix}{suffix}".format(
+ prefix="p" if "+mpi" in self.spec else "s",
+ suffix="smp" if "+openmp" in self.spec else "opt",
+ )
- def install(self, spec, prefix):
- exe_dir = join_path("exe", self.makefile_architecture)
- lib_dir = join_path("lib", self.makefile_architecture, self.makefile_version)
+ @property
+ def archive_files(self):
+ return [join_path(self.pkg.stage.source_path, self.makefile)]
- install_tree(exe_dir, self.prefix.bin)
- install_tree("data", self.prefix.share.data)
- install_tree(lib_dir, self.prefix.lib)
+ def check(self):
+ data_dir = join_path(self.pkg.stage.source_path, "data")
- mkdirp(self.prefix.include)
- install("src/start/libcp2k.h", join_path(self.prefix.include, "libcp2k.h"))
+ # CP2K < 7 still uses $PWD to detect the current working dir
+ # and Makefile is in a subdir, account for both facts here:
+ with spack.util.environment.set_env(CP2K_DATA_DIR=data_dir, PWD=self.build_directory):
+ with working_dir(self.build_directory):
+ make("test", *self.build_targets)
- @run_after("install")
+ @run_after("install", when="@9.1:")
def fix_package_config(self):
"""
Default build procedure generates libcp2k.pc with invalid paths,
@@ -903,71 +930,47 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
In case such approach causes issues in the future, it might be necessary
to generate and override entire libcp2k.pc.
"""
- if self.spec.satisfies("@9.1:"):
- pkgconfig_file = join_path(self.prefix.lib.pkgconfig, "libcp2k.pc")
- filter_file(r"(^includedir=).*", r"\1{0}".format(self.prefix.include), pkgconfig_file)
- filter_file(r"(^libdir=).*", r"\1{0}".format(self.prefix.lib), pkgconfig_file)
-
- with open(pkgconfig_file, "r+") as handle:
- content = handle.read().rstrip()
+ pkgconfig_file = join_path(self.prefix.lib.pkgconfig, "libcp2k.pc")
+ filter_file(r"(^includedir=).*", r"\1{0}".format(self.prefix.include), pkgconfig_file)
+ filter_file(r"(^libdir=).*", r"\1{0}".format(self.prefix.lib), pkgconfig_file)
- content += " " + self.spec["blas"].libs.ld_flags
- content += " " + self.spec["lapack"].libs.ld_flags
- content += " " + self.spec["fftw-api"].libs.ld_flags
+ with open(pkgconfig_file, "r+") as handle:
+ content = handle.read().rstrip()
- if (self.spec["fftw-api"].name == "fftw") and ("+openmp" in self.spec["fftw"]):
- content += " -lfftw3_omp"
+ content += " " + self.spec["blas"].libs.ld_flags
+ content += " " + self.spec["lapack"].libs.ld_flags
+ content += " " + self.spec["fftw-api"].libs.ld_flags
- content += "\n"
+ fftw = self.spec["fftw-api"]
+ if fftw.name in ["fftw", "amdfftw", "cray-fftw"] and fftw.satisfies("+openmp"):
+ content += " -lfftw3_omp"
- handle.seek(0)
- handle.write(content)
-
- def check(self):
- data_dir = join_path(self.stage.source_path, "data")
-
- # CP2K < 7 still uses $PWD to detect the current working dir
- # and Makefile is in a subdir, account for both facts here:
- with spack.util.environment.set_env(CP2K_DATA_DIR=data_dir, PWD=self.build_directory):
- with working_dir(self.build_directory):
- make("test", *self.build_targets)
+ content += "\n"
+ handle.seek(0)
+ handle.write(content)
-class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
- """Use the new CMake build system to build CP2K."""
+class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
spec = self.spec
args = []
- gpu_map = {
- "35": "K40",
- "37": "K80",
- "60": "P100",
- "70": "V100",
- "80": "A100",
- "gfx906": "Mi50",
- "gfx908": "Mi100",
- "gfx90a": "Mi250",
- "gfx90a:xnack-": "Mi250",
- "gfx90a:xnack+": "Mi250",
- }
-
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
if (len(spec.variants["cuda_arch"].value) > 1) or spec.satisfies("cuda_arch=none"):
raise InstallError("CP2K supports only one cuda_arch at a time.")
else:
- gpu_ver = gpu_map[spec.variants["cuda_arch"].value[0]]
+ gpu_ver = GPU_MAP[spec.variants["cuda_arch"].value[0]]
args += [
self.define("CP2K_USE_ACCEL", "CUDA"),
self.define("CP2K_WITH_GPU", gpu_ver),
]
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
if len(spec.variants["amdgpu_target"].value) > 1:
raise InstallError("CP2K supports only one amdgpu_target at a time.")
else:
- gpu_ver = gpu_map[spec.variants["amdgpu_target"].value[0]]
+ gpu_ver = GPU_MAP[spec.variants["amdgpu_target"].value[0]]
args += [
self.define("CP2K_USE_ACCEL", "HIP"),
self.define("CP2K_WITH_GPU", gpu_ver),
@@ -1044,5 +1047,3 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
)
return args
-
- pass
diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py
index 0ae7ac0220..be381e52c5 100644
--- a/var/spack/repos/builtin/packages/cpio/package.py
+++ b/var/spack/repos/builtin/packages/cpio/package.py
@@ -20,9 +20,12 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("2.15", sha256="efa50ef983137eefc0a02fdb51509d624b5e3295c980aa127ceee4183455499e")
version("2.14", sha256="145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454")
version("2.13", sha256="e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
def patch(self):
@@ -39,10 +42,10 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
spec = self.spec
if name == "cflags":
- if "%intel@:17" in spec:
+ if spec.satisfies("%intel@:17"):
flags.append("-no-gcc")
- elif "%clang" in spec or "%fj" in spec:
+ elif spec.satisfies("%clang") or spec.satisfies("%fj"):
flags.append("--rtlib=compiler-rt")
return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/cpmd/package.py b/var/spack/repos/builtin/packages/cpmd/package.py
index 61977a3706..42fb0a49f2 100644
--- a/var/spack/repos/builtin/packages/cpmd/package.py
+++ b/var/spack/repos/builtin/packages/cpmd/package.py
@@ -18,6 +18,9 @@ class Cpmd(MakefilePackage):
version("4.3", sha256="e0290f9da0d255f90a612e60662b14a97ca53003f89073c6af84fa7bc8739f65")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("omp", description="Enables the use of OMP instructions", default=False)
variant("mpi", description="Build with MPI support", default=False)
@@ -75,6 +78,7 @@ class Cpmd(MakefilePackage):
install_tree(".", prefix)
def test_cpmd(self):
+ """check cpmd.x outputs"""
test_dir = self.test_suite.current_test_data_dir
test_file = join_path(test_dir, "1-h2o-pbc-geoopt.inp")
opts = []
diff --git a/var/spack/repos/builtin/packages/cpp-argparse/package.py b/var/spack/repos/builtin/packages/cpp-argparse/package.py
index 509724a3fc..e50ff93c49 100644
--- a/var/spack/repos/builtin/packages/cpp-argparse/package.py
+++ b/var/spack/repos/builtin/packages/cpp-argparse/package.py
@@ -16,5 +16,8 @@ class CppArgparse(CMakePackage):
license("MIT")
+ version("3.1", sha256="d01733552ca4a18ab501ae8b8be878131baa32e89090fafdeef018ebfa4c6e46")
version("2.9", sha256="cd563293580b9dc592254df35b49cf8a19b4870ff5f611c7584cf967d9e6031e")
version("2.2", sha256="f0fc6ab7e70ac24856c160f44ebb0dd79dc1f7f4a614ee2810d42bb73799872b")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cpp-httplib/package.py b/var/spack/repos/builtin/packages/cpp-httplib/package.py
index 04874b3a9e..1fa77baa28 100644
--- a/var/spack/repos/builtin/packages/cpp-httplib/package.py
+++ b/var/spack/repos/builtin/packages/cpp-httplib/package.py
@@ -14,6 +14,7 @@ class CppHttplib(CMakePackage):
license("MIT")
+ version("0.15.3", sha256="2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e")
version("0.12.5", sha256="b488f3fa9c6bf35608c3d9a5b69be52e016bbf2fbfe67e5ee684eadb2655493e")
version("0.12.3", sha256="175ced3c9cdaf221e9edf210297568d8f7d402a41d6db01254ac9e0b25487c54")
version("0.5.9", sha256="c9e7aef3b0d4e80ee533d10413508d8a6e09a67d0d59646c43111f3993de006e")
@@ -29,3 +30,5 @@ class CppHttplib(CMakePackage):
version("0.3.3", sha256="476471c6fcd4b39fc79a5dd6ad343a2428cb69b4d528557abb6a0b7bf8186e34")
version("0.2.6", sha256="8678afc0e69bc198edcb8fe0066e46a87373221232ebabde2d78c237f31d3c3d")
version("0.2.1", sha256="94a6ddd25088b66b7b9e57b9d0ea138c984967e91b21395401642027bf279438")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cpp-logger/package.py b/var/spack/repos/builtin/packages/cpp-logger/package.py
index 2784ea219e..eb79d36a35 100644
--- a/var/spack/repos/builtin/packages/cpp-logger/package.py
+++ b/var/spack/repos/builtin/packages/cpp-logger/package.py
@@ -17,5 +17,9 @@ class CppLogger(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
- version("0.0.1", tag="v0.0.1", commit="d48b38ab14477bb7c53f8189b8b4be2ea214c28a")
+ version("0.0.4", tag="v0.0.4", commit="2231deee4b74fb1ddae3dae0618baaead4fecf75")
+ version("0.0.3", tag="v0.0.3", commit="398e6fa1eb4442cba94d46ecacfa47a426474387")
version("0.0.2", tag="v0.0.2", commit="329a48401033d2d2a1f1196141763cab029220ae")
+ version("0.0.1", tag="v0.0.1", commit="d48b38ab14477bb7c53f8189b8b4be2ea214c28a")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cpp-termcolor/package.py b/var/spack/repos/builtin/packages/cpp-termcolor/package.py
index 93954c23c9..c99e233fc1 100644
--- a/var/spack/repos/builtin/packages/cpp-termcolor/package.py
+++ b/var/spack/repos/builtin/packages/cpp-termcolor/package.py
@@ -19,6 +19,8 @@ class CppTermcolor(CMakePackage):
version("2.0.0", sha256="4a73a77053822ca1ed6d4a2af416d31028ec992fb0ffa794af95bd6216bb6a20")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/cppad/package.py b/var/spack/repos/builtin/packages/cppad/package.py
index dcc9e14cf9..6ca15a825e 100644
--- a/var/spack/repos/builtin/packages/cppad/package.py
+++ b/var/spack/repos/builtin/packages/cppad/package.py
@@ -9,14 +9,42 @@ from spack.package import *
class Cppad(CMakePackage):
"""A Package for Differentiation of C++ Algorithms."""
- homepage = "https://www.coin-or.org/CppAD/"
- url = "http://www.coin-or.org/download/source/CppAD/cppad-20170114.gpl.tgz"
+ homepage = "https://github.com/coin-or/CppAD"
+ url = "https://github.com/coin-or/CppAD/archive/refs/tags/20240000.4.tar.gz"
git = "https://github.com/coin-or/CppAD.git"
- version("develop", branch="master")
- version("20170114", sha256="fa3980a882be2a668a7522146273a1b4f1d8dabe66ad4aafa8964c8c1fd6f957")
+ maintainers("whart222")
+
+ version("master", branch="master")
+ version(
+ "20240000.4", sha256="0dfc1e30b32d5dd3086ee3adb6d2746a019e9d670b644c4d5ec1df3c35dd1fe5"
+ )
+ version(
+ "20220000.5", sha256="9fb4562f6169855eadcd86ac4671593d1c0edf97bb6ce7cbb28e19af2bfc165e"
+ )
+ version(
+ "20180000.0",
+ sha256="a5226e4c5aa2ad6d95668f987b39939315bf134a0a793231984e6d42d6488cca",
+ deprecated=True,
+ )
+ version(
+ "20170114",
+ sha256="fa3980a882be2a668a7522146273a1b4f1d8dabe66ad4aafa8964c8c1fd6f957",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
def cmake_args(self):
- # This package does not obey CMAKE_INSTALL_PREFIX
- args = ["-Dcppad_prefix=%s" % (self.prefix), "-Dcmake_install_docdir=share/cppad/doc"]
+ # NOTE: This package does not obey CMAKE_INSTALL_PREFIX
+ args = [
+ self.define("cppad_prefix", self.prefix),
+ self.define("CMAKE_BUILD_TYPE", "Release"),
+ #
+ # Installing documents sometimes fails.
+ #
+ # self.define("cmake_install_docdir", "share/cppad/doc"),
+ ]
+
return args
diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py
index fbda439345..61f9266eef 100644
--- a/var/spack/repos/builtin/packages/cppcheck/package.py
+++ b/var/spack/repos/builtin/packages/cppcheck/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Cppcheck(CMakePackage):
"""A tool for static C/C++ code analysis."""
- homepage = "http://cppcheck.sourceforge.net/"
+ homepage = "https://cppcheck.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/cppcheck/cppcheck/1.78/cppcheck-1.78.tar.bz2"
maintainers("white238")
@@ -30,6 +30,9 @@ class Cppcheck(CMakePackage):
version("1.72", sha256="9460b184ff2d8dd15344f3e2f42f634c86e4dd3303e1e9b3f13dc67536aab420")
version("1.68", sha256="add6e5e12b05ca02b356cd0ec7420ae0dcafddeaef183b4dfbdef59c617349b1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("rules", default=False, description="Enable rules (requires PCRE)")
variant("htmlreport", default=False, description="Install cppcheck-htmlreport")
diff --git a/var/spack/repos/builtin/packages/cppcodec/package.py b/var/spack/repos/builtin/packages/cppcodec/package.py
index 1cee1f9ad1..29f342bd95 100644
--- a/var/spack/repos/builtin/packages/cppcodec/package.py
+++ b/var/spack/repos/builtin/packages/cppcodec/package.py
@@ -19,4 +19,6 @@ class Cppcodec(CMakePackage):
version("0.2", sha256="0edaea2a9d9709d456aa99a1c3e17812ed130f9ef2b5c2d152c230a5cbc5c482")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/cppcoro/package.py b/var/spack/repos/builtin/packages/cppcoro/package.py
index ac998ace01..f928c954d8 100644
--- a/var/spack/repos/builtin/packages/cppcoro/package.py
+++ b/var/spack/repos/builtin/packages/cppcoro/package.py
@@ -19,4 +19,6 @@ class Cppcoro(CMakePackage):
version("develop", branch="master")
version("2021-01-13", commit="7cc9433436fe8f2482138019cfaafce8e1d7a896")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.12:", type="build")
diff --git a/var/spack/repos/builtin/packages/cppgsl/package.py b/var/spack/repos/builtin/packages/cppgsl/package.py
index a797e6eefc..9f63fbb132 100644
--- a/var/spack/repos/builtin/packages/cppgsl/package.py
+++ b/var/spack/repos/builtin/packages/cppgsl/package.py
@@ -22,6 +22,8 @@ class Cppgsl(CMakePackage):
version("2.0.0", sha256="6cce6fb16b651e62711a4f58e484931013c33979b795d1b1f7646f640cfa9c8e")
version("1.0.0", sha256="9694b04cd78e5b1a769868f19fdd9eea2002de3d4c3a81a1b769209364543c36")
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default="14",
diff --git a/var/spack/repos/builtin/packages/cpprestsdk/package.py b/var/spack/repos/builtin/packages/cpprestsdk/package.py
index 403e8bc42e..94ac694297 100644
--- a/var/spack/repos/builtin/packages/cpprestsdk/package.py
+++ b/var/spack/repos/builtin/packages/cpprestsdk/package.py
@@ -25,6 +25,9 @@ class Cpprestsdk(CMakePackage):
)
version("2.9.1", sha256="537358760acd782f4d2ed3a85d92247b4fc423aff9c85347dc31dbb0ab9bab16")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on(
"boost@1.69.0: +random+chrono+locale+filesystem+system+exception+regex+thread+date_time"
)
diff --git a/var/spack/repos/builtin/packages/cppunit/package.py b/var/spack/repos/builtin/packages/cppunit/package.py
index 1fdba0c399..d960486c96 100644
--- a/var/spack/repos/builtin/packages/cppunit/package.py
+++ b/var/spack/repos/builtin/packages/cppunit/package.py
@@ -16,16 +16,16 @@ class Cppunit(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("master", branch="master")
- version("1.15_20220904", commit="78e64f0edb4f3271a6ddbcdf9cba05138597bfca")
- version(
- "1.14.0",
- sha256="3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780",
- preferred=True,
- )
+ version("1.15.1", sha256="89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7")
+ version("1.15_20220904", commit="78e64f0edb4f3271a6ddbcdf9cba05138597bfca", deprecated=True)
+ version("1.14.0", sha256="3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780")
version("1.13.2", sha256="3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f")
+ depends_on("cxx", type="build")
+
# https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_12_6_X/master/cppunit-1.14-defaulted-function-deleted.patch
- patch("cppunit-1.14-defaulted-function-deleted.patch", when="@1.15:")
+ # https://cgit.freedesktop.org/libreoffice/cppunit/commit/?h=cppunit-1.15.1&id=834f3a287387bd6230c98b0c5375aff568c75e02
+ patch("cppunit-1.14-defaulted-function-deleted.patch", when="@1.15_20220904")
variant(
"cxxstd",
@@ -43,9 +43,9 @@ class Cppunit(AutotoolsPackage):
description="Build shared libs, static libs or both",
)
- depends_on("autoconf", type="build", when="@1.15_20220904")
- depends_on("automake", type="build", when="@1.15_20220904")
- depends_on("libtool", type="build", when="@1.15_20220904")
+ depends_on("autoconf", type="build", when="@master,1.15_20220904")
+ depends_on("automake", type="build", when="@master,1.15_20220904")
+ depends_on("libtool", type="build", when="@master,1.15_20220904")
def setup_build_environment(self, env):
cxxstd = self.spec.variants["cxxstd"].value
diff --git a/var/spack/repos/builtin/packages/cppzmq/package.py b/var/spack/repos/builtin/packages/cppzmq/package.py
index 84ebbcf535..669a95e707 100644
--- a/var/spack/repos/builtin/packages/cppzmq/package.py
+++ b/var/spack/repos/builtin/packages/cppzmq/package.py
@@ -18,6 +18,7 @@ class Cppzmq(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("4.10.0", sha256="c81c81bba8a7644c84932225f018b5088743a22999c6d82a2b5f5cd1e6942b74")
version("4.9.0", sha256="3fdf5b100206953f674c94d40599bdb3ea255244dcc42fab0d75855ee3645581")
version("4.8.1", sha256="7a23639a45f3a0049e11a188e29aaedd10b2f4845f0000cf3e22d6774ebde0af")
version("4.7.1", sha256="9853e0437d834cbed5d3c223bf1d755cadee70e7c964c6e42c4c6783dee5d02c")
@@ -29,6 +30,8 @@ class Cppzmq(CMakePackage):
version("4.2.3", sha256="3e6b57bf49115f4ae893b1ff7848ead7267013087dc7be1ab27636a97144d373")
version("4.2.2", sha256="3ef50070ac5877c06c6bb25091028465020e181bbfd08f110294ed6bc419737d")
+ depends_on("cxx", type="build") # generated
+
variant("drafts", default=False, description="Build and install draft classes and methods")
depends_on("cmake@3.0.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py
index 93cff509b4..0f6daf03e4 100644
--- a/var/spack/repos/builtin/packages/cpr/package.py
+++ b/var/spack/repos/builtin/packages/cpr/package.py
@@ -12,13 +12,19 @@ class Cpr(CMakePackage):
homepage = "https://docs.libcpr.org/"
url = "https://github.com/libcpr/cpr/archive/refs/tags/1.10.4.tar.gz"
- maintainers("sethrj")
-
+ maintainers("prudhomm")
license("MIT")
+ version("1.11.0", sha256="fdafa3e3a87448b5ddbd9c7a16e7276a78f28bbe84a3fc6edcfef85eca977784")
+ version("1.10.5", sha256="c8590568996cea918d7cf7ec6845d954b9b95ab2c4980b365f582a665dea08d8")
version("1.10.4", sha256="88462d059cd3df22c4d39ae04483ed50dfd2c808b3effddb65ac3b9aa60b542d")
version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31")
+ variant("pic", default=True, description="Position independent code")
+ variant("shared", default=True, description="Build shared library")
+
+ depends_on("cxx", type="build")
+
depends_on("curl")
depends_on("git", type="build")
@@ -29,4 +35,6 @@ class Cpr(CMakePackage):
self.define("CPR_USE_SYSTEM_GTEST", True),
self.define(f"CPR{_force}_USE_SYSTEM_CURL", True),
self.define("CPR_ENABLE_SSL", True),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
diff --git a/var/spack/repos/builtin/packages/cprnc/install_rpath.patch b/var/spack/repos/builtin/packages/cprnc/install_rpath.patch
new file mode 100644
index 0000000000..92888468f8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cprnc/install_rpath.patch
@@ -0,0 +1,18 @@
+--- a/CMakeLists.txt 2023-12-04 07:01:57.000000000 -0700
++++ b/CMakeLists.txt 2024-11-08 06:53:55.090900241 -0700
+@@ -21,6 +21,7 @@
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+ set(CMAKE_MACOSX_RPATH 1)
++SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+ # Compiler-specific compile options
+ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
+@@ -79,6 +80,7 @@
+ get_filename_component(netcdf_c_lib_location ${netcdf_c_lib} DIRECTORY)
+ #message (STATUS "netcdf_c_lib_location == ${netcdf_c_lib_location}")
+
++SET(CMAKE_INSTALL_RPATH "${netcdf_fortran_lib_location};${netcdf_c_lib_location}")
+ list(APPEND CMAKE_BUILD_RPATH ${netcdf_fortran_lib_location} ${netcdf_c_lib_location})
+ #message("CMAKE_BUILD_RPATH is ${CMAKE_BUILD_RPATH}")
+ add_executable (cprnc ${CPRNC_Fortran_SRCS} ${CPRNC_GenF90_SRCS})
diff --git a/var/spack/repos/builtin/packages/cprnc/package.py b/var/spack/repos/builtin/packages/cprnc/package.py
index 8083d44eb5..c1bb841ad9 100644
--- a/var/spack/repos/builtin/packages/cprnc/package.py
+++ b/var/spack/repos/builtin/packages/cprnc/package.py
@@ -15,10 +15,29 @@ class Cprnc(CMakePackage):
maintainers("jedwards4b", "billsacks")
+ version("1.0.8", sha256="94ee3b4e724bc06161e576d45f34401f1452acf738803528cb80726eed230cae")
version("1.0.3", sha256="3e7400f9a13d5de01964d7dd95151d08e6e30818d2a1efa9a9c7896cf6646d69")
version("1.0.2", sha256="02edfa8050135ac0dc4a74aea05d19b0823d769b22cafa88b9352e29723d4179")
version("1.0.1", sha256="b8a8fd4ad7e2716968dfa60f677217c55636580807b1309276f4c062ee432ccd")
version("1.0.0", sha256="70ff75bbf01a0cef885db3074c78f39a8890949ca505530c0407398b8803552c")
+ depends_on("fortran", type="build") # generated
+
depends_on("netcdf-fortran")
depends_on("cmake@3:", type="build")
+
+ patch("install_rpath.patch", when="@:1.0.7")
+
+ resource(
+ name="genf90",
+ git="https://github.com/PARALLELIO/genf90",
+ tag="genf90_200608",
+ destination="genf90-resource",
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define("GENF90_PATH", join_path(self.stage.source_path, "genf90-resource/genf90"))
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/cpu-features/package.py b/var/spack/repos/builtin/packages/cpu-features/package.py
index c0cb8bbfc9..1e4e0c246f 100644
--- a/var/spack/repos/builtin/packages/cpu-features/package.py
+++ b/var/spack/repos/builtin/packages/cpu-features/package.py
@@ -17,8 +17,12 @@ class CpuFeatures(CMakePackage):
version("main", branch="main")
version("develop", branch="main", deprecated=True)
+ version("0.9.0", sha256="bdb3484de8297c49b59955c3b22dba834401bc2df984ef5cfc17acbe69c5018e")
version("0.7.0", sha256="df80d9439abf741c7d2fdcdfd2d26528b136e6c52976be8bd0cd5e45a27262c0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", description="Build shared libraries", default=False)
depends_on("cmake@3.0.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/cpuinfo/package.py b/var/spack/repos/builtin/packages/cpuinfo/package.py
index bfae3aa494..2a3e905be0 100644
--- a/var/spack/repos/builtin/packages/cpuinfo/package.py
+++ b/var/spack/repos/builtin/packages/cpuinfo/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -17,7 +19,11 @@ class Cpuinfo(CMakePackage):
license("BSD-2-Clause")
version("main", branch="main")
- version("2022-08-19", commit="8ec7bd91ad0470e61cf38f618cc1f270dede599c") # py-torch@1.13
+ version("2024-09-06", commit="094fc30b9256f54dad5ad23bcbfb5de74781422f") # py-torch@2.5.1:
+ version("2024-08-30", commit="fa1c679da8d19e1d87f20175ae1ec10995cd3dd3") # py-torch@2.5.0
+ version("2023-11-04", commit="d6860c477c99f1fce9e28eb206891af3c0e1a1d7") # py-torch@2.3:2.4
+ version("2023-01-13", commit="6481e8bef08f606ddd627e4d3be89f64d62e1b8a") # py-torch@2.1:2.2
+ version("2022-08-19", commit="8ec7bd91ad0470e61cf38f618cc1f270dede599c") # py-torch@1.13:2.0
version("2020-12-17", commit="5916273f79a21551890fd3d56fc5375a78d1598d") # py-torch@1.8:1.12
version("2020-06-11", commit="63b254577ed77a8004a9be6ac707f3dccc4e1fd9") # py-torch@1.6:1.7
version("2020-01-21", commit="0e6bde92b343c5fbcfe34ecd41abf9515d54b4a7") # py-torch@1.5
@@ -26,13 +32,23 @@ class Cpuinfo(CMakePackage):
version("2018-05-13", commit="1e6c8c99d27f2b5eb9d2e6231055c6a4115b85e5") # py-torch@0.4.1
version("2018-04-04", commit="831dc28341b5f20d13e840caf87eaba644d82643") # py-torch@:0.4.0
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
def cmake_args(self):
+ # cpuinfo cannot produce a shared build with MSVC because it does not export
+ # any symbols
+ # cpuinfo CI builds "default" on Windows platform
+ build_type = "default" if sys.platform == "win32" else "shared"
+ # https://salsa.debian.org/deeplearning-team/cpuinfo/-/blob/master/debian/rules
return [
- self.define("BUILD_SHARED_LIBS", True),
self.define("CPUINFO_BUILD_UNIT_TESTS", False),
self.define("CPUINFO_BUILD_MOCK_TESTS", False),
self.define("CPUINFO_BUILD_BENCHMARKS", False),
+ self.define("CPUINFO_LIBRARY_TYPE", build_type),
+ self.define("CPUINFO_LOG_LEVEL", "error"),
+ self.define("CMAKE_SKIP_RPATH", True),
]
diff --git a/var/spack/repos/builtin/packages/cqrlib/Makefile.patch b/var/spack/repos/builtin/packages/cqrlib/Makefile.patch
new file mode 100644
index 0000000000..222da4cef1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cqrlib/Makefile.patch
@@ -0,0 +1,29 @@
+--- a/Makefile
++++ b/Makefile
+@@ -87,16 +87,16 @@ else
+ INCLUDES = -I$(INC)
+ endif
+
+-COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -rpath $(INSTALLDIR)/lib
+-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -dynamic -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
+-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
+-CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(INCLUDES) $(WARNINGS) -c
+-CPPLIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CXX) -version-info $(VERSION) -rpath $(INSTALLDIR)/lib
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) $(CPPFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_DYNAMIC= $(LIBTOOL) --mode=link $(CXX) $(CPPFLAGS) -dynamic -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
+-CPPBUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CXX) $(CPPFLAGS) -static -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
++COMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link --tag=CC $(CC) -version-info $(VERSION) -rpath $(INSTALLDIR)/lib
++BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(INCLUDES)
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -dynamic -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
++BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -static -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CPPFLAGS) $(INCLUDES) $(WARNINGS) -c
++CPPLIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link --tag=CXX $(CXX) -version-info $(VERSION) -rpath $(INSTALLDIR)/lib
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(CPPFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_DYNAMIC= $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(CPPFLAGS) -dynamic -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
++CPPBUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(CPPFLAGS) -static -I $(INSTALLDIR)/include -L$(INSTALLDIR)/lib
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
+
diff --git a/var/spack/repos/builtin/packages/cqrlib/package.py b/var/spack/repos/builtin/packages/cqrlib/package.py
index aaaf226479..6d2e644b93 100644
--- a/var/spack/repos/builtin/packages/cqrlib/package.py
+++ b/var/spack/repos/builtin/packages/cqrlib/package.py
@@ -9,18 +9,24 @@ from spack.package import *
class Cqrlib(MakefilePackage):
"""CQRlib -- ANSI C API for Quaternion Rotations"""
- homepage = "http://cqrlib.sourceforge.net/"
- url = (
- "https://downloads.sourceforge.net/project/cqrlib/cqrlib/CQRlib-1.1.2/CQRlib-1.1.2.tar.gz"
- )
+ homepage = "https://cqrlib.sourceforge.net/"
license("LGPL-2.1-or-later")
+ version("1.1.3", sha256="90ecd9aabfb72e55e56957c7b233910d18b8c2bb522a8e59eddbcc4618c72d0e")
version("1.1.2", sha256="af3cf2402974579f3c6efc6a6174a5da52786db4bfee9d38d504d93bc42410fd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libtool", type="build")
- patch("cqr.patch")
+ patch("cqr.patch", when="@1.1.2")
+ patch("Makefile.patch", when="@1.1.2:")
+
+ def url_for_version(self, version):
+ full_vers = str(version)
+ return f"https://downloads.sourceforge.net/project/cqrlib/cqrlib/CQRlib-{full_vers}/CQRlib-{full_vers}.tar.gz"
def edit(self, spec, prefix):
mf = FileFilter("Makefile")
diff --git a/var/spack/repos/builtin/packages/cquery/package.py b/var/spack/repos/builtin/packages/cquery/package.py
index a00e3ea62c..58c918c6fc 100644
--- a/var/spack/repos/builtin/packages/cquery/package.py
+++ b/var/spack/repos/builtin/packages/cquery/package.py
@@ -16,6 +16,9 @@ class Cquery(CMakePackage):
version("2018-08-23", commit="70c755b2e390d3edfb594a84a7531beb26b2bc07", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("llvm")
# trivial patch (missing header) by mueller@kip.uni-heidelberg.de
diff --git a/var/spack/repos/builtin/packages/cracklib/package.py b/var/spack/repos/builtin/packages/cracklib/package.py
index b46217e554..564ae8a0f3 100644
--- a/var/spack/repos/builtin/packages/cracklib/package.py
+++ b/var/spack/repos/builtin/packages/cracklib/package.py
@@ -16,11 +16,14 @@ class Cracklib(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("2.9.11", sha256="23837f80d65bf67e2679cd246d810c8851630860f27620205b957b3b5f88ee88")
version("2.9.9", sha256="0a3fd72163512088c6f2add0f6cd6e34954ca0fa3f333ff9cced478b04e73ce1")
version("2.9.7", sha256="ff4e6c3f86494c93719f5e4186e2c3ea9e265f41972ec21f7b87852aced704e6")
version("2.9.6", sha256="7cd2c01365f199c466b490ad2585beccbe0108ccd606c1bcc6c1e52800e627fe")
version("2.9.5", sha256="b3fcf3fba2f4566f8eb2b79502d1a66198a71c557d2ab1011c78001489f0fe26")
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "run"))
depends_on("gettext")
depends_on("fmt")
diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py
index 2aceaad214..71b49c2e24 100644
--- a/var/spack/repos/builtin/packages/cram/package.py
+++ b/var/spack/repos/builtin/packages/cram/package.py
@@ -10,10 +10,13 @@ class Cram(CMakePackage):
"""Cram runs many small MPI jobs inside one large MPI job."""
homepage = "https://github.com/llnl/cram"
- url = "http://github.com/llnl/cram/archive/v1.0.1.tar.gz"
+ url = "https://github.com/llnl/cram/archive/v1.0.1.tar.gz"
version("1.0.1", sha256="985888018f6481c3e9ab4f1d1788e25725d8b92a1cf52b1366ee93793614709a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
extends("python")
depends_on("python@2.7:")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/cray-fftw/package.py b/var/spack/repos/builtin/packages/cray-fftw/package.py
index 13526ecc61..4035ad3973 100644
--- a/var/spack/repos/builtin/packages/cray-fftw/package.py
+++ b/var/spack/repos/builtin/packages/cray-fftw/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import llnl.util.lang
+
from spack.package import *
diff --git a/var/spack/repos/builtin/packages/cray-libsci/package.py b/var/spack/repos/builtin/packages/cray-libsci/package.py
index e653aadc52..42df5aa358 100644
--- a/var/spack/repos/builtin/packages/cray-libsci/package.py
+++ b/var/spack/repos/builtin/packages/cray-libsci/package.py
@@ -13,6 +13,8 @@ class CrayLibsci(Package):
homepage = "https://docs.nersc.gov/development/libraries/libsci/"
has_code = False # Skip attempts to fetch source that is not available
+ version("23.02.1.1")
+ version("22.11.1.2")
version("21.08.1.2")
version("20.06.1")
version("20.03.1")
@@ -25,6 +27,9 @@ class CrayLibsci(Package):
version("16.06.1")
version("16.03.1")
+ conflicts("platform=windows")
+ conflicts("platform=darwin")
+
variant("shared", default=True, description="enable shared libs")
variant("openmp", default=False, description="link with openmp")
variant("mpi", default=False, description="link with mpi libs")
@@ -61,11 +66,11 @@ class CrayLibsci(Package):
compiler = self.spec.compiler.name
lib = []
- if "+openmp" in self.spec and "+mpi" in self.spec:
+ if self.spec.satisfies("+openmp") and self.spec.satisfies("+mpi"):
lib = ["libsci_{0}_mpi_mp", "libsci_{0}_mp"]
- elif "+openmp" in self.spec:
+ elif self.spec.satisfies("+openmp"):
lib = ["libsci_{0}_mp"]
- elif "+mpi" in self.spec:
+ elif self.spec.satisfies("+mpi"):
lib = ["libsci_{0}_mpi", "libsci_{0}"]
else:
lib = ["libsci_{0}"]
diff --git a/var/spack/repos/builtin/packages/cray-mpich/package.py b/var/spack/repos/builtin/packages/cray-mpich/package.py
index 66a75a874a..d0dd2005c9 100644
--- a/var/spack/repos/builtin/packages/cray-mpich/package.py
+++ b/var/spack/repos/builtin/packages/cray-mpich/package.py
@@ -18,6 +18,10 @@ class CrayMpich(Package):
maintainers("haampie")
+ version("8.1.25")
+ version("8.1.24")
+ version("8.1.21")
+ version("8.1.14")
version("8.1.7")
version("8.1.0")
version("8.0.16")
@@ -32,6 +36,8 @@ class CrayMpich(Package):
depends_on("cray-pmi")
depends_on("libfabric")
+ requires("platform=linux", msg="Cray MPICH is only available on Cray")
+
# cray-mpich 8.1.7: features MPI compiler wrappers
variant("wrappers", default=True, when="@8.1.7:", description="enable MPI wrappers")
@@ -65,33 +71,33 @@ class CrayMpich(Package):
return os.path.dirname(os.path.normpath(libdir))
def setup_run_environment(self, env):
- if "+wrappers" in self.spec:
+ if self.spec.satisfies("+wrappers"):
env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
- else:
+ elif spack_cc is not None:
env.set("MPICC", spack_cc)
env.set("MPICXX", spack_cxx)
env.set("MPIF77", spack_fc)
env.set("MPIF90", spack_fc)
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
- if "+wrappers" in spec:
+ if spec.satisfies("+wrappers"):
spec.mpicc = join_path(self.prefix.bin, "mpicc")
spec.mpicxx = join_path(self.prefix.bin, "mpicxx")
spec.mpifc = join_path(self.prefix.bin, "mpif90")
spec.mpif77 = join_path(self.prefix.bin, "mpif77")
- else:
+ elif spack_cc is not None:
spec.mpicc = spack_cc
spec.mpicxx = spack_cxx
spec.mpifc = spack_fc
diff --git a/var/spack/repos/builtin/packages/cray-mvapich2/package.py b/var/spack/repos/builtin/packages/cray-mvapich2/package.py
index e2c6bdab1f..03ad2d0516 100644
--- a/var/spack/repos/builtin/packages/cray-mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/cray-mvapich2/package.py
@@ -26,27 +26,32 @@ class CrayMvapich2(Package):
provides("mpi@3")
+ requires("platform=linux", msg="Cray MVAPICH2 is only available on Cray")
+
def setup_run_environment(self, env):
+ if spack_cc is None:
+ return
+
env.set("MPICC", spack_cc)
env.set("MPICXX", spack_cxx)
env.set("MPIF77", spack_fc)
env.set("MPIF90", spack_fc)
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
- spec.mpicc = spack_cc
- spec.mpicxx = spack_cxx
- spec.mpifc = spack_fc
- spec.mpif77 = spack_f77
+ dependent_module = dependent_spec.package.module
+ spec.mpicc = dependent_module.spack_cc
+ spec.mpicxx = dependent_module.spack_cxx
+ spec.mpifc = dependent_module.spack_fc
+ spec.mpif77 = dependent_module.spack_f77
spec.mpicxx_shared_libs = [
join_path(self.prefix.lib, "libmpicxx.{0}".format(dso_suffix)),
diff --git a/var/spack/repos/builtin/packages/creduce/package.py b/var/spack/repos/builtin/packages/creduce/package.py
index d06a171995..cac9da7e6d 100644
--- a/var/spack/repos/builtin/packages/creduce/package.py
+++ b/var/spack/repos/builtin/packages/creduce/package.py
@@ -20,6 +20,9 @@ class Creduce(CMakePackage):
version("develop", branch="master")
version("2.10.0", tag="creduce-2.10.0", commit="fb91843c547794f165e5764a003166191e6c6643")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("flex")
depends_on("libxml2")
depends_on("llvm")
diff --git a/var/spack/repos/builtin/packages/crmc/package.py b/var/spack/repos/builtin/packages/crmc/package.py
index 0edb7bf18b..3f4d4b7767 100644
--- a/var/spack/repos/builtin/packages/crmc/package.py
+++ b/var/spack/repos/builtin/packages/crmc/package.py
@@ -23,6 +23,10 @@ class Crmc(CMakePackage):
version("1.5.7", sha256="ec7456c08b60a40665e9ff31d6029e0151b0cdf2ca98bd09a8b570b1e33f6053")
version("1.5.6", sha256="a546a9352dcbdb8a1df3d63530eacf16f8b64a190e224b72afd434f78388a8a0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("hepmc")
depends_on("boost+filesystem+iostreams+system+program_options")
depends_on("root")
diff --git a/var/spack/repos/builtin/packages/cronie/package.py b/var/spack/repos/builtin/packages/cronie/package.py
index d4caf6bee8..d9ac89f90c 100644
--- a/var/spack/repos/builtin/packages/cronie/package.py
+++ b/var/spack/repos/builtin/packages/cronie/package.py
@@ -15,9 +15,12 @@ class Cronie(AutotoolsPackage):
license("ISC")
+ version("1.7.1", sha256="535b96894c52e679085e1d8b36794308c162b1e8dac29031c02f678effc523e1")
version("1.6.1", sha256="1ddbc8f8d07dfe1d45998b0a0cbd9a216cd4d7bc64d1626b2bc8b3a69e4641d1")
version("1.5.5", sha256="22c2a2b22577c0f776c1268d0e0f305c5c041e10155022a345b43b665da0ffe9")
+ depends_on("c", type="build") # generated
+
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./autogen.sh")
diff --git a/var/spack/repos/builtin/packages/crosstool-ng/package.py b/var/spack/repos/builtin/packages/crosstool-ng/package.py
index 4c9865b359..bb5c0b3f12 100644
--- a/var/spack/repos/builtin/packages/crosstool-ng/package.py
+++ b/var/spack/repos/builtin/packages/crosstool-ng/package.py
@@ -20,6 +20,8 @@ class CrosstoolNg(AutotoolsPackage):
version("1.26.0", sha256="e8ce69c5c8ca8d904e6923ccf86c53576761b9cf219e2e69235b139c8e1b74fc")
version("1.25.0", sha256="68162f342243cd4189ed7c1f4e3bb1302caa3f2cbbf8331879bd01fe06c60cd3")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("bash", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/crtm-fix/package.py b/var/spack/repos/builtin/packages/crtm-fix/package.py
index ef46e99df0..6dd0242c3a 100644
--- a/var/spack/repos/builtin/packages/crtm-fix/package.py
+++ b/var/spack/repos/builtin/packages/crtm-fix/package.py
@@ -18,6 +18,9 @@ class CrtmFix(Package):
"BenjaminTJohnson", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA", "climbfuji"
)
+ version(
+ "2.4.0.1_emc", sha256="6e4005b780435c8e280d6bfa23808d8f12609dfd72f77717d046d4795cac0457"
+ )
version("2.4.0_emc", sha256="d0f1b2ae2905457f4c3731746892aaa8f6b84ee0691f6228dfbe48917df1e85e")
version("2.3.0_emc", sha256="1452af2d1d11d57ef3c57b6b861646541e7042a9b0f3c230f9a82854d7e90924")
@@ -28,20 +31,23 @@ class CrtmFix(Package):
conflicts("+big_endian", when="+little_endian", msg="big_endian and little_endian conflict")
def url_for_version(self, version):
- url = "ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-{}.tgz"
- return url.format(version)
+ if version == Version("2.4.0.1_emc"):
+ url = "ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-2.4.0_emc_07112023.tgz"
+ else:
+ url = f"ftp://ftp.ssec.wisc.edu/pub/s4/CRTM/fix_REL-{version}.tgz"
+ return url
def install(self, spec, prefix):
spec = self.spec
mkdir(self.prefix.fix)
endian_dirs = []
- if "+big_endian" in spec:
+ if spec.satisfies("+big_endian"):
endian_dirs.append("Big_Endian")
- elif "+little_endian" in spec:
+ elif spec.satisfies("+little_endian"):
endian_dirs.append("Little_Endian")
- if "+netcdf" in spec:
+ if spec.satisfies("+netcdf"):
endian_dirs.extend(["netcdf", "netCDF"])
fix_files = []
@@ -52,23 +58,27 @@ class CrtmFix(Package):
# Little_Endian amsua_metop-c_v2.SpcCoeff.bin is what it's supposed to be.
# Remove the incorrect file, and install it as noACC,, then install
# correct file under new name.
- if "+big_endian" in spec and spec.version == Version("2.4.0_emc"):
- remove_path = join_path(
- os.getcwd(), "fix", "SpcCoeff", "Big_Endian", "amsua_metop-c.SpcCoeff.bin"
+ if "+big_endian" in spec and (
+ spec.version in [Version("2.4.0_emc"), Version("2.4.0.1_emc")]
+ ):
+ amc_sc_path = join_path("SpcCoeff", "Big_Endian", "amsua_metop-c.SpcCoeff.bin")
+ amc_sc_v2_path = join_path(
+ "SpcCoeff", "Little_Endian", "amsua_metop-c_v2.SpcCoeff.bin"
)
+ # In 2.4.0_emc, the path is prefixed by 'fix/'
+ if spec.version == Version("2.4.0_emc"):
+ amc_sc_path = join_path("fix", amc_sc_path)
+ amc_sc_v2_path = join_path("fix", amc_sc_v2_path)
+
+ remove_path = join_path(os.getcwd(), amc_sc_path)
+
fix_files.remove(remove_path)
# This file is incorrect, install it as a different name.
- install(
- join_path("fix", "SpcCoeff", "Big_Endian", "amsua_metop-c.SpcCoeff.bin"),
- join_path(self.prefix.fix, "amsua_metop-c.SpcCoeff.noACC.bin"),
- )
+ install(amc_sc_path, join_path(self.prefix.fix, "amsua_metop-c.SpcCoeff.noACC.bin"))
# This "Little_Endian" file is actually the correct one.
- install(
- join_path("fix", "SpcCoeff", "Little_Endian", "amsua_metop-c_v2.SpcCoeff.bin"),
- join_path(self.prefix.fix, "amsua_metop-c.SpcCoeff.bin"),
- )
+ install(amc_sc_v2_path, join_path(self.prefix.fix, "amsua_metop-c.SpcCoeff.bin"))
for f in fix_files:
install(f, self.prefix.fix)
diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py
index c4626d09a2..d876a245dd 100644
--- a/var/spack/repos/builtin/packages/crtm/package.py
+++ b/var/spack/repos/builtin/packages/crtm/package.py
@@ -28,33 +28,71 @@ class Crtm(CMakePackage):
variant(
"fix", default=False, description='Download CRTM coeffecient or "fix" files (several GBs).'
)
- depends_on("cmake@3.15:")
+
+ depends_on("cmake@3.15:", type="build")
depends_on("git-lfs")
depends_on("netcdf-fortran", when="@2.4.0:")
depends_on("netcdf-fortran", when="@v2.3-jedi.4")
depends_on("netcdf-fortran", when="@v2.4-jedi.1")
depends_on("netcdf-fortran", when="@v2.4-jedi.2")
+ depends_on("netcdf-fortran", when="@v2.4.1-jedi")
+ depends_on("netcdf-fortran", when="@v3")
depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix")
- depends_on("crtm-fix@2.4.0_emc", when="@2.4.0 +fix")
+ depends_on("crtm-fix@2.4.0_emc", when="@=2.4.0 +fix")
+ depends_on("crtm-fix@2.4.0.1_emc", when="@2.4.0.1 +fix")
depends_on("ecbuild", type=("build"), when="@v2.3-jedi.4")
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.1")
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.2")
-
- # ecbuild release v2.4.0 is broken
- # add ecbuild dependency for next release with fix
- # depends_on("ecbuild", when="@2.4.0:", type=("build"))
+ depends_on("ecbuild", type=("build"), when="@v2.4.1-jedi")
+ depends_on("ecbuild", type=("build"), when="@v3.0")
+ depends_on("ecbuild", type=("build"), when="@v3.1.0-skylabv7")
license("CC0-1.0")
+ version(
+ "v3.1.0-skylabv8",
+ sha256="a475c8a444072aef1e8c2babba3d12f13ab0fb6c7ecab88edad57130839e29ff",
+ )
+ version(
+ "v3.1.0-skylabv7",
+ sha256="3ac45c49562ab41c3baf443ce382e3a6bcb7226831b54146d9f73995be165ec7",
+ )
+ version(
+ "v3.0.0-skylabv6",
+ sha256="780fbc4e0f3b0414fbade4b595832bb35d9c5d3e7c3b25ad128ca94f71bea2b8",
+ )
+ version(
+ "v3.0.0-skylabv5",
+ sha256="4fa5dd2d65b4d4ff77d50992e8e0c02a59584b35599f424085fccdc2174d7bd2",
+ )
+ version(
+ "v2.4.1-jedi", sha256="fd8bf4db4f2a3b420b4186de84483ba2a36660519dffcb1e0ff14bfe8c6f6a14"
+ )
+ version("v2.4-jedi.2", commit="62831cbb6c1ffcbb219eeec60e1b1c422526f597")
+ version("v2.4-jedi.1", commit="82223419fdb479d76c2f2109c2b704e1d9618f22")
+ version("2.4.0.1", tag="v2.4.0_emc.3", commit="7ecad4866c400d7d0db1413348ee225cfa99ff36")
# REL-2.4.0_emc (v2.4.0 ecbuild does not work)
version("2.4.0", commit="5ddd0d6b0138284764065feda73b5adf599082a2")
# Uses the tip of REL-2.3.0_emc branch
version("2.3.0", commit="99760e693ce3b90a3b3b0e97d80972b4dfb61196")
- # JEDI applications so far use these versions
- # Branch release/crtm_jedi
- version("v2.3-jedi.4", commit="bfede42adc6149213f28f58bf4e02fa8f7cb0198")
- # Branch release/crtm_jedi_v2.4.0
- version("v2.4-jedi.1", commit="82223419fdb479d76c2f2109c2b704e1d9618f22")
- version("v2.4-jedi.2", commit="62831cbb6c1ffcbb219eeec60e1b1c422526f597")
+
+ depends_on("fortran", type="build") # generated
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@v3") or version >= Version("3.0.0"):
+ return f"https://github.com/JCSDA/crtmv3/archive/refs/tags/{version}.tar.gz"
+ else:
+ return f"https://github.com/JCSDA/crtm/archive/refs/tags/{version}.tar.gz"
+
+ # https://github.com/JCSDA/spack-stack/issues/1088
+ patch("v3.1.0-skylabv8.installprefix.patch", when="@v3.1.0-skylabv8")
+
+ @when("@2.4.0.1")
+ def patch(self):
+ if self.compiler.name in ["gcc", "clang", "apple-clang"]:
+ # Line lengths in RSS_Emissivity_Model.f90 are too long for gfortran default limit
+ filter_file(
+ "-fbacktrace", "-fbacktrace -ffree-line-length-none", "libsrc/CMakeLists.txt"
+ )
diff --git a/var/spack/repos/builtin/packages/crtm/v3.1.0-skylabv8.installprefix.patch b/var/spack/repos/builtin/packages/crtm/v3.1.0-skylabv8.installprefix.patch
new file mode 100644
index 0000000000..a1116de6d4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/crtm/v3.1.0-skylabv8.installprefix.patch
@@ -0,0 +1,14 @@
+--- a/CMakeLists.txt 2024-04-22 08:25:42.000000000 -0600
++++ b/CMakeLists.txt 2024-04-22 08:25:54.000000000 -0600
+@@ -6,8 +6,9 @@
+
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ set(CMAKE_DIRECTORY_LABELS ${PROJECT_NAME})
+-set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "default install path" FORCE)
+-message("CMAKE_INSTALL_PREFIX set to ${CMAKE_INSTALL_PREFIX}")
++# https://github.com/JCSDA/spack-stack/issues/1088
++#set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "default install path" FORCE)
++#message("CMAKE_INSTALL_PREFIX set to ${CMAKE_INSTALL_PREFIX}")
+
+ ## Configuration options
+ include(${PROJECT_NAME}_compiler_flags)
diff --git a/var/spack/repos/builtin/packages/crunch/package.py b/var/spack/repos/builtin/packages/crunch/package.py
index 35c0195ef5..bc9406bdd7 100644
--- a/var/spack/repos/builtin/packages/crunch/package.py
+++ b/var/spack/repos/builtin/packages/crunch/package.py
@@ -21,6 +21,8 @@ class Crunch(CMakePackage):
# No stable releases since 2012
version("master", branch="build_fixes")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
conflicts("platform=darwin")
diff --git a/var/spack/repos/builtin/packages/cryodrgn/package.py b/var/spack/repos/builtin/packages/cryodrgn/package.py
new file mode 100644
index 0000000000..317f1ddd97
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cryodrgn/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cryodrgn(PythonPackage):
+ """CryoDRGN is a neural network based algorithm for heterogeneous cryo-EM reconstruction.
+ In particular, the method models a continuous distribution over 3D structures by using a
+ neural network based representation for the volume"""
+
+ homepage = "https://cryodrgn.cs.princeton.edu/"
+ pypi = "cryodrgn/cryodrgn-2.3.0.tar.gz"
+
+ license("GPL-3.0-only", checked_by="A-N-Other")
+
+ version("2.3.0", sha256="9dd75967fddfa56d6b2fbfc56933c50c9fb994326112513f223e8296adbf0afc")
+
+ depends_on("python@3.7:", type=("build", "run"))
+
+ depends_on("py-setuptools@61:", type="build")
+ depends_on("py-setuptools-scm@6.2:", type="build")
+
+ depends_on("py-torch@1:", type=("build", "run"))
+ depends_on("py-pandas@:1", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-scipy@1.3.1:", type=("build", "run"))
+ depends_on("py-scikit-learn", type=("build", "run"))
+ depends_on("py-seaborn@:0.11", type=("build", "run"))
+ depends_on("py-cufflinks", type=("build", "run"))
+ depends_on("py-jupyterlab", type=("build", "run"))
+ depends_on("py-umap-learn", type=("build", "run"))
+ depends_on("py-ipywidgets@:7", type=("build", "run"))
+ depends_on("py-healpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py
index b065474038..49b1df6e53 100644
--- a/var/spack/repos/builtin/packages/cryptopp/package.py
+++ b/var/spack/repos/builtin/packages/cryptopp/package.py
@@ -13,11 +13,15 @@ class Cryptopp(MakefilePackage):
public-key encryption (RSA, DSA), and a few obsolete/historical encryption
algorithms (MD5, Panama)."""
- homepage = "https://www.cryptopp.com"
- url = "https://www.cryptopp.com/cryptopp700.zip"
+ homepage = "https://github.com/weidai11/cryptopp"
+ urls = [
+ "https://github.com/weidai11/cryptopp/releases/download/CRYPTOPP_8_9_0/cryptopp890.zip",
+ "https://www.cryptopp.com/cryptopp700.zip",
+ ]
license("BSL-1.0")
+ version("8.9.0", sha256="4cc0ccc324625b80b695fcd3dee63a66f1a460d3e51b71640cdbfc4cd1a3779c")
version("8.7.0", sha256="d0d3a28fcb5a1f6ed66b3adf57ecfaed234a7e194e42be465c2ba70c744538dd")
version("7.0.0", sha256="a4bc939910edd3d29fb819a6fc0dfdc293f686fa62326f61c56d72d0a366ceb0")
version("6.1.0", sha256="21289d2511101a9350c87c8eb1f4982d4a266e8037b19dab79a32cc13ea108c7")
@@ -33,13 +37,12 @@ class Cryptopp(MakefilePackage):
depends_on("gmake", type="build")
def url_for_version(self, version):
- url = "{0}/{1}{2}.zip"
- return url.format(self.homepage, self.name, version.joined)
+ return f"https://github.com/weidai11/cryptopp/releases/download/CRYPTOPP_{version.underscored}/cryptopp{version.joined}.zip"
def build(self, spec, prefix):
cxx_flags = []
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
cxx_flags.append(self.compiler.cxx_pic_flag)
target = self.spec.target
@@ -51,7 +54,7 @@ class Cryptopp(MakefilePackage):
cxx_flags.append("-DCRYPTOPP_DISABLE_SSE2")
make_target = "dynamic" if "+shared" in spec else "static"
- make(make_target, "CXXFLAGS={0}".format(" ".join(cxx_flags)))
+ make(make_target, f"CXXFLAGS={' '.join(cxx_flags)}")
def install(self, spec, prefix):
- make("install", "PREFIX={0}".format(prefix))
+ make("install", f"PREFIX={prefix}")
diff --git a/var/spack/repos/builtin/packages/cryptsetup/package.py b/var/spack/repos/builtin/packages/cryptsetup/package.py
index 223726dc1e..7c6a7bc814 100644
--- a/var/spack/repos/builtin/packages/cryptsetup/package.py
+++ b/var/spack/repos/builtin/packages/cryptsetup/package.py
@@ -23,6 +23,8 @@ class Cryptsetup(AutotoolsPackage):
version("2.2.2", sha256="2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46")
version("2.2.1", sha256="94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61")
+ depends_on("c", type="build") # generated
+
depends_on("uuid", type=("build", "link"))
depends_on("lvm2", type=("build", "link"))
depends_on("popt", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/csa-c/package.py b/var/spack/repos/builtin/packages/csa-c/package.py
index ec189e26f9..f5fd07a959 100644
--- a/var/spack/repos/builtin/packages/csa-c/package.py
+++ b/var/spack/repos/builtin/packages/csa-c/package.py
@@ -16,4 +16,6 @@ class CsaC(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
configure_directory = "csa"
diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py
index 6b6ebfd0f5..2de4b7313e 100644
--- a/var/spack/repos/builtin/packages/cscope/package.py
+++ b/var/spack/repos/builtin/packages/cscope/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Cscope(AutotoolsPackage):
"""Cscope is a developer's tool for browsing source code."""
- homepage = "http://cscope.sourceforge.net/"
+ homepage = "https://cscope.sourceforge.net/"
url = "https://sourceforge.net/projects/cscope/files/cscope/v15.9/cscope-15.9.tar.gz"
license("BSD-3-Clause")
@@ -17,6 +17,8 @@ class Cscope(AutotoolsPackage):
version("15.9", sha256="c5505ae075a871a9cd8d9801859b0ff1c09782075df281c72c23e72115d9f159")
version("15.8b", sha256="4889d091f05aa0845384b1e4965aa31d2b20911fb2c001b2cdcffbcb7212d3af")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/csdp/package.py b/var/spack/repos/builtin/packages/csdp/package.py
index 22333049dd..128f6977c1 100644
--- a/var/spack/repos/builtin/packages/csdp/package.py
+++ b/var/spack/repos/builtin/packages/csdp/package.py
@@ -18,6 +18,8 @@ class Csdp(MakefilePackage):
version("6.1.1", sha256="0558a46ac534e846bf866b76a9a44e8a854d84558efa50988ffc092f99a138b9")
+ depends_on("c", type="build") # generated
+
depends_on("atlas")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ctffind/package.py b/var/spack/repos/builtin/packages/ctffind/package.py
index 0cf000dfa2..03199ede88 100644
--- a/var/spack/repos/builtin/packages/ctffind/package.py
+++ b/var/spack/repos/builtin/packages/ctffind/package.py
@@ -25,6 +25,8 @@ class Ctffind(AutotoolsPackage):
extension="tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://grigoriefflab.umassmed.edu/system/tdf?path=ctffind-{0}.tar.gz&file=1&type=node&id=26"
return url.format(version)
diff --git a/var/spack/repos/builtin/packages/ctpl/package.py b/var/spack/repos/builtin/packages/ctpl/package.py
index 0971f1decb..d44984013b 100644
--- a/var/spack/repos/builtin/packages/ctpl/package.py
+++ b/var/spack/repos/builtin/packages/ctpl/package.py
@@ -17,6 +17,8 @@ class Ctpl(AutotoolsPackage):
version("0.3", sha256="034875ba8e1ce87b7ee85bc7146a6a2b2a6ac0518482b36d65eb67dd09c03d0a")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ctre/package.py b/var/spack/repos/builtin/packages/ctre/package.py
index 65e85edcfa..7c1760fdd8 100644
--- a/var/spack/repos/builtin/packages/ctre/package.py
+++ b/var/spack/repos/builtin/packages/ctre/package.py
@@ -15,6 +15,7 @@ class Ctre(CMakePackage):
license("Apache-2.0")
version("master", branch="master")
+ version("3.8.1", sha256="0ce8760d43b3b97b43364cd32ee663e5c8b8b4bfd58e7890042eff6ac52db605")
version("2.8.4", sha256="99b981857f1b66cab5e71161ae74deca268ed39a96ec6507def92d4f445cadd6")
version("2.8.3", sha256="5833a9d0fbce39ee39bd6e29df2f7fcafc82e41c373e8675ed0774bcf76fdc7a")
version("2.8.2", sha256="f89494f52ec31e5854fff3d2c5825474201476636c5d82a9365dad5188396314")
@@ -25,3 +26,5 @@ class Ctre(CMakePackage):
version("2.6.3", sha256="bdf668b02f0b986dfc0fbc6066f446e2d0a9faa3347f00f53b19131297c84c4a")
version("2.6.2", sha256="e82c87aeb0fc3f21ae8a2d3ffce2b1ef970fbea9c3e846ef1a6e5f81790f2946")
version("2.6.1", sha256="58c623d9ea1cb7890aaa63c1a87f1a60a8acf31dbd4061ab672bea287ed689ac")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cuba/package.py b/var/spack/repos/builtin/packages/cuba/package.py
index b70f294614..04a03e3087 100644
--- a/var/spack/repos/builtin/packages/cuba/package.py
+++ b/var/spack/repos/builtin/packages/cuba/package.py
@@ -20,4 +20,8 @@ class Cuba(AutotoolsPackage):
version("4.2.2", sha256="8d9f532fd2b9561da2272c156ef7be5f3960953e4519c638759f1b52fe03ed52")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
parallel = False
diff --git a/var/spack/repos/builtin/packages/cubature/package.py b/var/spack/repos/builtin/packages/cubature/package.py
new file mode 100644
index 0000000000..75560cbea9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cubature/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Cubature(CMakePackage):
+ """multi-dimensional adaptive integration (cubature) in C"""
+
+ url = "https://github.com/stevengj/cubature/archive/refs/tags/v1.0.4.tar.gz"
+ git = "https://github.com/stevengj/cubature"
+
+ license("GPL-2")
+
+ version("1.0.4", sha256="cd4899de0b047a9d220cfb751a8bdbb8fd0c97c1c894d07523b75168e6426f60")
diff --git a/var/spack/repos/builtin/packages/cube-blade/package.py b/var/spack/repos/builtin/packages/cube-blade/package.py
index 7e1c8ae00c..910148019a 100644
--- a/var/spack/repos/builtin/packages/cube-blade/package.py
+++ b/var/spack/repos/builtin/packages/cube-blade/package.py
@@ -16,6 +16,8 @@ class CubeBlade(AutotoolsPackage):
version("0.2", sha256="ab3c5bbca79e2ec599166e75b3c96a8f6a18b3064414fc39e56f78aaae9c165c")
+ depends_on("cxx", type="build") # generated
+
depends_on("cube@4.5:")
depends_on("cubelib@4.5:")
depends_on("qt@5.9.1:")
diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py
index be57134282..6b1f619db3 100644
--- a/var/spack/repos/builtin/packages/cube/package.py
+++ b/var/spack/repos/builtin/packages/cube/package.py
@@ -34,6 +34,9 @@ class Cube(AutotoolsPackage):
version("4.3.3", sha256="ce8e1bff5a208fe5700a0194170be85bbd8f554e1aa1514b4afc5129326c7f83")
version("4.2.3", sha256="b30c6998bcc54f795bcd6de3cfbef9c3cec094f782820174b533f628b0e60765")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("gui", default=True, description="Build Cube GUI")
patch("qt-version.patch", when="@4.3.0:4.3 +gui")
diff --git a/var/spack/repos/builtin/packages/cubelib/package.py b/var/spack/repos/builtin/packages/cubelib/package.py
index 6c6f4036b3..059f03c532 100644
--- a/var/spack/repos/builtin/packages/cubelib/package.py
+++ b/var/spack/repos/builtin/packages/cubelib/package.py
@@ -11,7 +11,8 @@ class Cubelib(AutotoolsPackage):
homepage = "https://www.scalasca.org/software/cube-4.x/download.html"
url = "https://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubelib-4.4.tar.gz"
- maintainers = ("swat-jsc", "wrwilliams")
+
+ maintainers("swat-jsc", "wrwilliams")
version("4.8.2", sha256="d6fdef57b1bc9594f1450ba46cf08f431dd0d4ae595c47e2f3454e17e4ae74f4")
version("4.8.1", sha256="e4d974248963edab48c5d0fc5831146d391b0ae4632cccafe840bf5f12cd80a9")
@@ -45,6 +46,9 @@ class Cubelib(AutotoolsPackage):
deprecated="true",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/cubew/package.py b/var/spack/repos/builtin/packages/cubew/package.py
index 34a7fccbef..0fe52ca975 100644
--- a/var/spack/repos/builtin/packages/cubew/package.py
+++ b/var/spack/repos/builtin/packages/cubew/package.py
@@ -11,7 +11,8 @@ class Cubew(AutotoolsPackage):
homepage = "https://www.scalasca.org/software/cube-4.x/download.html"
url = "https://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubew-4.4.tar.gz"
- maintainers = ("swat-jsc", "wrwilliams")
+
+ maintainers("swat-jsc", "wrwilliams")
version("4.8.2", sha256="4f3bcf0622c2429b8972b5eb3f14d79ec89b8161e3c1cc5862ceda417d7975d2")
version("4.8.1", sha256="42cbd743d87c16e805c8e28e79292ab33de259f2cfba46f2682cb35c1bc032d6")
@@ -45,6 +46,9 @@ class Cubew(AutotoolsPackage):
deprecated="true",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/cubist/package.py b/var/spack/repos/builtin/packages/cubist/package.py
index bd6fbc94bb..cbc74c6436 100644
--- a/var/spack/repos/builtin/packages/cubist/package.py
+++ b/var/spack/repos/builtin/packages/cubist/package.py
@@ -23,6 +23,8 @@ class Cubist(MakefilePackage):
version("2.07", sha256="f2b20807cd3275e775c42263a4efd3f50df6e495a8b6dc8989ea2d41b973ac1a")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter("SHELL .*", "SHELL = /bin/bash")
diff --git a/var/spack/repos/builtin/packages/cuda-memtest/package.py b/var/spack/repos/builtin/packages/cuda-memtest/package.py
index 90e218b126..5bc671c661 100644
--- a/var/spack/repos/builtin/packages/cuda-memtest/package.py
+++ b/var/spack/repos/builtin/packages/cuda-memtest/package.py
@@ -24,6 +24,8 @@ class CudaMemtest(CMakePackage):
version("master", branch="dev")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.5:", type="build")
# depends_on('nvml', when='+nvml')
depends_on("cuda@5.0:")
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index fbb99d47ad..ea7b314418 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -23,8 +23,123 @@ from spack.package import *
# - package key must be in the form '{os}-{arch}' where 'os' is in the
# format returned by platform.system() and 'arch' by platform.machine()
-preferred_ver = "11.8.0"
_versions = {
+ "12.6.3": {
+ "Linux-aarch64": (
+ "213ea63a6357020978a8b0a79a8c9d12a2a5941afa1cdc69d5a3f933fa8bed04",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "81d60e48044796d7883aa8a049afe6501b843f2c45639b3703b2378de30d55d3",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run",
+ ),
+ },
+ "12.6.2": {
+ "Linux-aarch64": (
+ "2249408848b705c18b9eadfb5161b52e4e36fcc5753647329cce93db141e5466",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "3729a89cb58f7ca6a46719cff110d6292aec7577585a8d71340f0dbac54fb237",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run",
+ ),
+ },
+ "12.6.1": {
+ "Linux-aarch64": (
+ "b39ac88184798e8c313e6ced23dd128f13ab30c199b96bd9c0bee07dbdd31400",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "73acce7243519625f259509f5dcff6dc8fbd23dca53b852aa9ce382009e92e9d",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run",
+ ),
+ },
+ "12.6.0": {
+ "Linux-aarch64": (
+ "398db7baca17d51ad5035c606714c96380c965fd1742478c743bc6bbb1d8f63c",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "31ab04394e69b14dd8656e2b44c2877db1a0e898dff8a7546a4c628438101b94",
+ "https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run",
+ ),
+ },
+ "12.5.1": {
+ "Linux-aarch64": (
+ "353e8abc52ca80adf05002b775c7b3a2d2feefcf1c25ae13f8757f9a11efba3e",
+ "https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.42.06_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "b5e0a779e089c86610051141c4cf498beef431858ec63398107391727ecbdb04",
+ "https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda_12.5.1_555.42.06_linux.run",
+ ),
+ },
+ "12.5.0": {
+ "Linux-aarch64": (
+ "e7b864c9ae27cef77cafc78614ec33cbb0a27606af9375deffa09c4269a07f04",
+ "https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "90fcc7df48226434065ff12a4372136b40b9a4cbf0c8602bb763b745f22b7a99",
+ "https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.42.02_linux.run",
+ ),
+ },
+ "12.4.1": {
+ "Linux-aarch64": (
+ "b0fbc77effa225498974625b6b08b3f6eff4a37e379f5b60f1d3827b215ad19b",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "367d2299b3a4588ab487a6d27276ca5d9ead6e394904f18bccb9e12433b9c4fb",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run",
+ ),
+ "Linux-ppc64le": (
+ "677f44da10dd81396cb53a32c4e26eccdc24912063cb2e3beb3bbcb1658ef451",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux_ppc64le.run",
+ ),
+ },
+ "12.4.0": {
+ "Linux-aarch64": (
+ "b12bfe6c36d32ecf009a6efb0024325c5fc389fca1143f5f377ae2555936e803",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "e6a842f4eca9490575cdb68b6b1bb78d47b95a897de48dee292c431892e57d17",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run",
+ ),
+ "Linux-ppc64le": (
+ "ef9a712daccf2805b4422f2301ff0eaa5c3ad41ef5d64b8626773bce7d1f41fe",
+ "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux_ppc64le.run",
+ ),
+ },
+ "12.3.2": {
+ "Linux-aarch64": (
+ "761b84e292b94c4d330f445d36326dfff90a418e909fb0baf3d6f03e24106d08",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "24b2afc9f770d8cf43d6fa7adc2ebfd47c4084db01bdda1ce3ce0a4d493ba65b",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run",
+ ),
+ "Linux-ppc64le": (
+ "b876936fc80de10653523eadd846065db346b38ba6296f2d365772259cb2f198",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux_ppc64le.run",
+ ),
+ },
+ "12.3.1": {
+ "Linux-aarch64": (
+ "bce6bb8b293c33c3ed0c1b65120c70587cc29e1b94ea8679ebb14c32b3858b5e",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "b73d18ccd5ff85bbae32b425dfb82729612ede65b07a37cd5e2b574190614038",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux.run",
+ ),
+ "Linux-ppc64le": (
+ "9da7e6e2beadc933aab73de79a84e133ddf03226371d3d7af83502748a978568",
+ "https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_545.23.08_linux_ppc64le.run",
+ ),
+ },
"12.3.0": {
"Linux-aarch64": (
"9a8fb8acf46b88faf0d711bda3149e1706efbbae02fcb40ab72addfd0e9ce5df",
@@ -39,6 +154,20 @@ _versions = {
"https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_ppc64le.run",
),
},
+ "12.2.2": {
+ "Linux-aarch64": (
+ "4113a15e6b27a02638c72edeb5f89de4c9ea312febba12fc4cefff2edc882268",
+ "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux_sbsa.run",
+ ),
+ "Linux-x86_64": (
+ "2b39aae3e7618d9f59a3c8fa1f1bc61f29c0b0e0df75fb05076badb352952ef2",
+ "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run",
+ ),
+ "Linux-ppc64le": (
+ "18848278e7f2bd4b4481f5665633d7e3d46e9a562d175d5ff278218188b01342",
+ "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux_ppc64le.run",
+ ),
+ },
"12.2.1": {
"Linux-aarch64": (
"a9ae6bd02684c7acfb229484368bf2691d592767ce1aed10ae9aed92c81b9f09",
@@ -533,19 +662,15 @@ class Cuda(Package):
homepage = "https://developer.nvidia.com/cuda-zone"
- maintainers("ax3l", "Rombur")
+ maintainers("ax3l", "Rombur", "pauleonix")
executables = ["^nvcc$"]
- skip_version_audit = ["platform=darwin"]
+ skip_version_audit = ["platform=darwin", "platform=windows"]
for ver, packages in _versions.items():
- key = "{0}-{1}".format(platform.system(), platform.machine())
- pkg = packages.get(key)
+ pkg = packages.get(f"{platform.system()}-{platform.machine()}")
if pkg:
- if ver == preferred_ver:
- version(ver, sha256=pkg[0], url=pkg[1], expand=False, preferred=True)
- else:
- version(ver, sha256=pkg[0], url=pkg[1], expand=False)
+ version(ver, sha256=pkg[0], url=pkg[1], expand=False)
# macOS Mojave drops NVIDIA graphics card support -- official NVIDIA
# drivers do not exist for Mojave. See
diff --git a/var/spack/repos/builtin/packages/cudd/package.py b/var/spack/repos/builtin/packages/cudd/package.py
index 8c89391f65..c060514c47 100644
--- a/var/spack/repos/builtin/packages/cudd/package.py
+++ b/var/spack/repos/builtin/packages/cudd/package.py
@@ -19,3 +19,6 @@ class Cudd(AutotoolsPackage):
maintainers("davekeeshan")
version("3.0.0", sha256="b8e966b4562c96a03e7fbea239729587d7b395d53cadcc39a7203b49cf7eeb69")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py
index 99fa5ab887..2d1a7b3b95 100644
--- a/var/spack/repos/builtin/packages/cudnn/package.py
+++ b/var/spack/repos/builtin/packages/cudnn/package.py
@@ -9,6 +9,14 @@ import platform
from spack.package import *
_versions = {
+ # cuDNN 9.2.0
+ "9.2.0.82-12": {
+ "Linux-x86_64": "1362b4d437e37e92c9814c3b4065db5106c2e03268e22275a5869e968cee7aa8",
+ "Linux-aarch64": "24cc2a0308dfe412c02c7d41d4b07ec12dacb021ebf8c719de38eb77d22f68c1",
+ },
+ "9.2.0.82-11": {
+ "Linux-x86_64": "99dcb3fa2bf7eed7f35b0f8e58e7d1f04d9a52e01e382efc1de16fed230d3b26"
+ },
# cuDNN 8.9.7
"8.9.7.29-12": {
"Linux-x86_64": "475333625c7e42a7af3ca0b2f7506a106e30c93b1aa0081cd9c13efb6e21e3bb",
@@ -298,7 +306,7 @@ class Cudnn(Package):
# need to use modified URLs like in url_for_version.
maintainers("adamjstewart", "bvanessen")
- skip_version_audit = ["platform=darwin"]
+ skip_version_audit = ["platform=darwin", "platform=windows"]
license("MIT")
@@ -378,19 +386,13 @@ class Cudnn(Package):
# Package is not compiled, and does not work unless LD_LIBRARY_PATH is set
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
- if "target=ppc64le: platform=linux" in self.spec:
+ if self.spec.satisfies("target=ppc64le: platform=linux"):
env.set("cuDNN_ROOT", os.path.join(self.prefix, "targets", "ppc64le-linux"))
- def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
- def setup_dependent_run_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
def install(self, spec, prefix):
install_tree(".", prefix)
- if "target=ppc64le: platform=linux" in spec:
+ if spec.satisfies("target=ppc64le: platform=linux"):
target_lib = os.path.join(prefix, "targets", "ppc64le-linux", "lib")
if os.path.isdir(target_lib) and not os.path.isdir(prefix.lib):
symlink(target_lib, prefix.lib)
diff --git a/var/spack/repos/builtin/packages/cunit/package.py b/var/spack/repos/builtin/packages/cunit/package.py
index c1e7eec160..ab75d9f13c 100644
--- a/var/spack/repos/builtin/packages/cunit/package.py
+++ b/var/spack/repos/builtin/packages/cunit/package.py
@@ -16,6 +16,9 @@ class Cunit(AutotoolsPackage):
version("2.1-3", sha256="f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/cupla/package.py b/var/spack/repos/builtin/packages/cupla/package.py
index abfd480d5f..b9db779b01 100644
--- a/var/spack/repos/builtin/packages/cupla/package.py
+++ b/var/spack/repos/builtin/packages/cupla/package.py
@@ -20,6 +20,8 @@ class Cupla(Package):
version("master", branch="master")
version("0.3.0", sha256="035512517167967697e73544c788453de5e3f0bc4e8d4864b41b2e287365cbaf")
+ depends_on("cxx", type="build") # generated
+
depends_on("alpaka@0.6.0:0.7")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/cups/package.py b/var/spack/repos/builtin/packages/cups/package.py
index 6d4bf76626..34c5fdd80b 100644
--- a/var/spack/repos/builtin/packages/cups/package.py
+++ b/var/spack/repos/builtin/packages/cups/package.py
@@ -14,16 +14,29 @@ class Cups(AutotoolsPackage):
install."""
homepage = "https://www.cups.org/"
- url = "https://github.com/apple/cups/releases/download/v2.2.3/cups-2.2.3-source.tar.gz"
+ url = (
+ "https://github.com/OpenPrinting/cups/releases/download/v2.4.10/cups-2.4.10-source.tar.gz"
+ )
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
- version("2.3.3", sha256="261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee")
- version("2.2.3", sha256="66701fe15838f2c892052c913bde1ba106bbee2e0a953c955a62ecacce76885f")
+ version("2.4.11", sha256="9a88fe1da3a29a917c3fc67ce6eb3178399d68e1a548c6d86c70d9b13651fd71")
+ version("2.4.10", sha256="d75757c2bc0f7a28b02ee4d52ca9e4b1aa1ba2affe16b985854f5336940e5ad7")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-4504
+ version("2.3.3", sha256="261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee")
+ version("2.2.3", sha256="66701fe15838f2c892052c913bde1ba106bbee2e0a953c955a62ecacce76885f")
- depends_on("gnutls")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("pkgconfig", type="build")
+ depends_on("gnutls")
+
+ def url_for_version(self, version):
+ org = "apple" if version < Version("2.4") else "OpenPrinting"
+ return f"https://github.com/{org}/cups/releases/download/v{version}/cups-{version}-source.tar.gz"
+
def configure_args(self):
args = ["--enable-gnutls", "--with-components=core"]
return args
diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py
index 121b7db5fc..ab040906c1 100644
--- a/var/spack/repos/builtin/packages/curl/package.py
+++ b/var/spack/repos/builtin/packages/curl/package.py
@@ -8,18 +8,21 @@ import os
import re
import sys
+from llnl.util.filesystem import windows_sfn
+
from spack.build_systems.autotools import AutotoolsBuilder
from spack.build_systems.nmake import NMakeBuilder
from spack.package import *
+is_windows = sys.platform == "win32"
+
class Curl(NMakePackage, AutotoolsPackage):
"""cURL is an open source command line tool and library for
transferring data with URL syntax"""
homepage = "https://curl.se/"
- # URL must remain http:// so Spack can bootstrap curl
- url = "http://curl.haxx.se/download/curl-7.78.0.tar.bz2"
+ url = "https://curl.haxx.se/download/curl-7.78.0.tar.bz2"
executables = ["^curl$"]
tags = ["build-tools", "windows"]
@@ -28,218 +31,54 @@ class Curl(NMakePackage, AutotoolsPackage):
license("curl")
- version("8.4.0", sha256="e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6")
+ version("8.10.1", sha256="3763cd97aae41dcf41950d23e87ae23b2edb2ce3a5b0cf678af058c391b6ae31")
# Deprecated versions due to CVEs
- # CVE-2023-38545
- version(
- "8.1.2",
- sha256="b54974d32fd610acace92e3df1f643144015ac65847f0a041fdc17db6f43f243",
- deprecated=True,
- )
- version(
- "8.0.1",
- sha256="9b6b1e96b748d04b968786b6bdf407aa5c75ab53a3d37c1c8c81cdb736555ccf",
- deprecated=True,
- )
- version(
- "7.88.1",
- sha256="8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907",
- deprecated=True,
- )
- # https://nvd.nist.gov/vuln/detail/CVE-2022-43551
- version(
- "7.87.0",
- sha256="5d6e128761b7110946d1276aff6f0f266f2b726f5e619f7e0a057a474155f307",
- deprecated=True,
- )
- # https://nvd.nist.gov/vuln/detail/CVE-2022-32221
- version(
- "7.86.0",
- sha256="f5ca69db03eea17fa8705bdfb1a9f58d76a46c9010518109bb38f313137e0a28",
- deprecated=True,
- )
- version(
- "7.85.0",
- sha256="21a7e83628ee96164ac2b36ff6bf99d467c7b0b621c1f7e317d8f0d96011539c",
- deprecated=True,
- )
- version(
- "7.84.0",
- sha256="702fb26e73190a3bd77071aa146f507b9817cc4dfce218d2ab87f00cd3bc059d",
- deprecated=True,
- )
- # https://nvd.nist.gov/vuln/detail/CVE-2022-32206
- version(
- "7.83.0",
- sha256="247c7ec7521c4258e65634e529270d214fe32969971cccb72845e7aa46831f96",
- deprecated=True,
- )
- version(
- "7.82.0",
- sha256="46d9a0400a33408fd992770b04a44a7434b3036f2e8089ac28b57573d59d371f",
- deprecated=True,
- )
- version(
- "7.81.0",
- sha256="1e7a38d7018ec060f1f16df839854f0889e94e122c4cfa5d3a37c2dc56f1e258",
- deprecated=True,
- )
- version(
- "7.80.0",
- sha256="dd0d150e49cd950aff35e16b628edf04927f0289df42883750cf952bb858189c",
- deprecated=True,
- )
- version(
- "7.79.1",
- sha256="de62c4ab9a9316393962e8b94777a570bb9f71feb580fb4475e412f2f9387851",
- deprecated=True,
- )
- version(
- "7.79.0",
- sha256="d607a677f473f79f96c964100327125a6204a39d835dc00dab7fc0129b959f42",
- deprecated=True,
- )
version(
- "7.78.0",
- sha256="98530b317dc95ccb324bbe4f834f07bb642fbc393b794ddf3434f246a71ea44a",
+ "8.8.0",
+ sha256="40d3792d38cfa244d8f692974a567e9a5f3387c547579f1124e95ea2a1020d0d",
deprecated=True,
)
version(
- "7.77.0",
- sha256="6c0c28868cb82593859fc43b9c8fdb769314c855c05cf1b56b023acf855df8ea",
+ "8.7.1",
+ sha256="05bbd2b698e9cfbab477c33aa5e99b4975501835a41b7ca6ca71de03d8849e76",
deprecated=True,
)
version(
- "7.76.1",
- sha256="7a8e184d7d31312c4ebf6a8cb59cd757e61b2b2833a9ed4f9bf708066e7695e9",
+ "8.6.0",
+ sha256="b4785f2d8877fa92c0e45d7155cf8cc6750dbda961f4b1a45bcbec990cf2fa9b",
deprecated=True,
)
version(
- "7.76.0",
- sha256="e29bfe3633701590d75b0071bbb649ee5ca4ca73f00649268bd389639531c49a",
+ "8.4.0",
+ sha256="e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6",
deprecated=True,
)
version(
- "7.75.0",
- sha256="50552d4501c178e4cc68baaecc487f466a3d6d19bbf4e50a01869effb316d026",
- deprecated=True,
- )
- version(
- "7.74.0",
- sha256="0f4d63e6681636539dc88fa8e929f934cd3a840c46e0bf28c73be11e521b77a5",
- deprecated=True,
- )
- version(
- "7.73.0",
- sha256="cf34fe0b07b800f1c01a499a6e8b2af548f6d0e044dca4a29d88a4bee146d131",
- deprecated=True,
- )
- version(
- "7.72.0",
- sha256="ad91970864102a59765e20ce16216efc9d6ad381471f7accceceab7d905703ef",
- deprecated=True,
- )
- version(
- "7.71.0",
- sha256="600f00ac2481a89548a4141ddf983fd9386165e1960bac91d0a1c81dca5dd341",
+ "8.1.2",
+ sha256="b54974d32fd610acace92e3df1f643144015ac65847f0a041fdc17db6f43f243",
deprecated=True,
)
version(
- "7.68.0",
- sha256="207f54917dd6a2dc733065ccf18d61bb5bebeaceb5df49cd9445483e8623eeb9",
+ "8.0.1",
+ sha256="9b6b1e96b748d04b968786b6bdf407aa5c75ab53a3d37c1c8c81cdb736555ccf",
deprecated=True,
)
+ # needed by r@:4.2
version(
- "7.64.0",
- sha256="d573ba1c2d1cf9d8533fadcce480d778417964e8d04ccddcc76e591d544cf2eb",
+ "7.88.1",
+ sha256="8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907",
deprecated=True,
)
+ # needed by old r-curl
version(
"7.63.0",
sha256="9bab7ed4ecff77020a312d84cc5fb7eb02d58419d218f267477a724a17fd8dd8",
deprecated=True,
)
- version(
- "7.60.0",
- sha256="897dfb2204bd99be328279f88f55b7c61592216b0542fcbe995c60aa92871e9b",
- deprecated=True,
- )
- version(
- "7.59.0",
- sha256="b5920ffd6a8c95585fb95070e0ced38322790cb335c39d0dab852d12e157b5a0",
- deprecated=True,
- )
- version(
- "7.56.0",
- sha256="de60a4725a3d461c70aa571d7d69c788f1816d9d1a8a2ef05f864ce8f01279df",
- deprecated=True,
- )
- version(
- "7.54.0",
- sha256="f50ebaf43c507fa7cc32be4b8108fa8bbd0f5022e90794388f3c7694a302ff06",
- deprecated=True,
- )
- version(
- "7.53.1",
- sha256="1c7207c06d75e9136a944a2e0528337ce76f15b9ec9ae4bb30d703b59bf530e8",
- deprecated=True,
- )
- version(
- "7.52.1",
- sha256="d16185a767cb2c1ba3d5b9096ec54e5ec198b213f45864a38b3bda4bbf87389b",
- deprecated=True,
- )
- version(
- "7.50.3",
- sha256="7b7347d976661d02c84a1f4d6daf40dee377efdc45b9e2c77dedb8acf140d8ec",
- deprecated=True,
- )
- version(
- "7.50.2",
- sha256="0c72105df4e9575d68bcf43aea1751056c1d29b1040df6194a49c5ac08f8e233",
- deprecated=True,
- )
- version(
- "7.50.1",
- sha256="3c12c5f54ccaa1d40abc65d672107dcc75d3e1fcb38c267484334280096e5156",
- deprecated=True,
- )
- version(
- "7.49.1",
- sha256="eb63cec4bef692eab9db459033f409533e6d10e20942f4b060b32819e81885f1",
- deprecated=True,
- )
- version(
- "7.47.1",
- sha256="ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f",
- deprecated=True,
- )
- version(
- "7.46.0",
- sha256="b7d726cdd8ed4b6db0fa1b474a3c59ebbbe4dcd4c61ac5e7ade0e0270d3195ad",
- deprecated=True,
- )
- version(
- "7.45.0",
- sha256="65154e66b9f8a442b57c436904639507b4ac37ec13d6f8a48248f1b4012b98ea",
- deprecated=True,
- )
- version(
- "7.44.0",
- sha256="1e2541bae6582bb697c0fbae49e1d3e6fad5d05d5aa80dbd6f072e0a44341814",
- deprecated=True,
- )
- version(
- "7.43.0",
- sha256="baa654a1122530483ccc1c58cc112fec3724a82c11c6a389f1e6a37dc8858df9",
- deprecated=True,
- )
- version(
- "7.42.1",
- sha256="e2905973391ec2dfd7743a8034ad10eeb58dab8b3a297e7892a41a7999cac887",
- deprecated=True,
- )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
default_tls = "openssl"
if sys.platform == "darwin":
@@ -275,24 +114,29 @@ class Curl(NMakePackage, AutotoolsPackage):
variant("librtmp", default=False, description="enable Rtmp support")
variant("ldap", default=False, description="enable ldap support")
variant("libidn2", default=False, description="enable libidn2 support")
- for plat in ["darwin", "cray", "linux"]:
- with when("platform=%s" % plat):
- variant(
- "libs",
- default="shared,static",
- values=("shared", "static"),
- multi=True,
- description="Build shared libs, static libs or both",
- )
- # curl queries pkgconfig for openssl compilation flags
- depends_on("pkgconfig", type="build")
-
- conflicts("platform=cray", when="tls=secure_transport", msg="Only supported on macOS")
+ variant(
+ "libs",
+ default="shared,static" if not is_windows else "shared",
+ values=("shared", "static"),
+ multi=not is_windows,
+ description="Build shared libs, static libs or both",
+ )
+
conflicts("platform=linux", when="tls=secure_transport", msg="Only supported on macOS")
+ depends_on("pkgconfig", type="build", when="platform=darwin")
+ depends_on("pkgconfig", type="build", when="platform=linux")
+ depends_on("pkgconfig", type="build", when="platform=freebsd")
+
depends_on("gnutls", when="tls=gnutls")
- depends_on("mbedtls@2: +pic", when="@7.79: tls=mbedtls")
- depends_on("mbedtls@:2 +pic", when="@:7.78 tls=mbedtls")
+
+ with when("tls=mbedtls"):
+ depends_on("mbedtls +pic")
+ depends_on("mbedtls@:2", when="@:7.78")
+ depends_on("mbedtls@:3.5", when="@:8.7")
+ depends_on("mbedtls@2:", when="@7.79:")
+ depends_on("mbedtls@3.2:", when="@8.8") # https://github.com/curl/curl/issues/13748
+
depends_on("nss", when="tls=nss")
with when("tls=openssl"):
@@ -309,6 +153,10 @@ class Curl(NMakePackage, AutotoolsPackage):
depends_on("krb5", when="+gssapi")
depends_on("rtmpdump", when="+librtmp")
+ # https://github.com/curl/curl/issues/12832
+ # https://github.com/curl/curl/issues/13508
+ depends_on("perl", type="build", when="@8.6:8.7.1")
+
# https://github.com/curl/curl/pull/9054
patch("easy-lock-sched-header.patch", when="@7.84.0")
@@ -349,11 +197,19 @@ class Curl(NMakePackage, AutotoolsPackage):
def flag_handler(self, name, flags):
build_system_flags = []
- if name == "cflags" and self.spec.compiler.name in ["intel", "oneapi"]:
+ spec = self.spec
+ if name == "cflags" and (spec.satisfies("%intel") or spec.satisfies("%oneapi")):
build_system_flags = ["-we147"]
return flags, None, build_system_flags
+class BuildEnvironment:
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ if self.spec.satisfies("libs=static"):
+ env.append_flags("CFLAGS", "-DCURL_STATICLIB")
+ env.append_flags("CXXFLAGS", "-DCURL_STATICLIB")
+
+
class AutotoolsBuilder(AutotoolsBuilder):
def configure_args(self):
spec = self.spec
@@ -440,36 +296,37 @@ class AutotoolsBuilder(AutotoolsBuilder):
return "--without-darwinssl"
-class NMakeBuilder(NMakeBuilder):
+class NMakeBuilder(BuildEnvironment, NMakeBuilder):
phases = ["install"]
def nmake_args(self):
args = []
- mode = "dll" if "libs=dll" in self.spec else "static"
+ mode = "dll" if self.spec.satisfies("libs=shared") else "static"
args.append("mode=%s" % mode)
args.append("WITH_ZLIB=%s" % mode)
args.append("ZLIB_PATH=%s" % self.spec["zlib-api"].prefix)
- if "+libssh" in self.spec:
+ if self.spec.satisfies("+libssh"):
args.append("WITH_SSH=%s" % mode)
- if "+libssh2" in self.spec:
+ if self.spec.satisfies("+libssh2"):
args.append("WITH_SSH2=%s" % mode)
args.append("SSH2_PATH=%s" % self.spec["libssh2"].prefix)
- if "+nghttp2" in self.spec:
+ if self.spec.satisfies("+nghttp2"):
args.append("WITH_NGHTTP2=%s" % mode)
args.append("NGHTTP2=%s" % self.spec["nghttp2"].prefix)
- if "tls=openssl" in self.spec:
+ if self.spec.satisfies("tls=openssl"):
args.append("WITH_SSL=%s" % mode)
args.append("SSL_PATH=%s" % self.spec["openssl"].prefix)
- elif "tls=mbedtls" in self.spec:
+ elif self.spec.satisfies("tls=mbedtls"):
args.append("WITH_MBEDTLS=%s" % mode)
args.append("MBEDTLS_PATH=%s" % self.spec["mbedtls"].prefix)
- elif "tls=sspi" in self.spec:
+ elif self.spec.satisfies("tls=sspi"):
args.append("ENABLE_SSPI=%s" % mode)
# The trailing path seperator is REQUIRED for cURL to install
# otherwise cURLs build system will interpret the path as a file
# and the install will fail with ambiguous errors
- args.append("WITH_PREFIX=%s" % self.prefix + "\\")
+ inst_prefix = self.prefix + "\\"
+ args.append(f"WITH_PREFIX={windows_sfn(inst_prefix)}")
return args
def install(self, pkg, spec, prefix):
@@ -484,8 +341,18 @@ class NMakeBuilder(NMakeBuilder):
env["CC"] = ""
env["CXX"] = ""
winbuild_dir = os.path.join(self.stage.source_path, "winbuild")
+ winbuild_dir = windows_sfn(winbuild_dir)
with working_dir(winbuild_dir):
nmake("/f", "Makefile.vc", *self.nmake_args(), ignore_quotes=True)
with working_dir(os.path.join(self.stage.source_path, "builds")):
install_dir = glob.glob("libcurl-**")[0]
install_tree(install_dir, self.prefix)
+ if spec.satisfies("libs=static"):
+ # curl is named libcurl_a when static on Windows
+ # Consumers look for just libcurl
+ # make a symlink to make consumers happy
+ libcurl_a = os.path.join(prefix.lib, "libcurl_a.lib")
+ libcurl = os.path.join(self.prefix.lib, "libcurl.lib")
+ # safeguard against future curl releases that do this for us
+ if os.path.exists(libcurl_a) and not os.path.exists(libcurl):
+ symlink(libcurl_a, libcurl)
diff --git a/var/spack/repos/builtin/packages/cusz/package.py b/var/spack/repos/builtin/packages/cusz/package.py
index 666aec3f33..c6a939d186 100644
--- a/var/spack/repos/builtin/packages/cusz/package.py
+++ b/var/spack/repos/builtin/packages/cusz/package.py
@@ -20,9 +20,13 @@ class Cusz(CMakePackage, CudaPackage):
conflicts("cuda_arch=none", when="+cuda")
version("develop", branch="develop")
+ version("0.6.0", commit="cafed521dc338fe2159ebb5b09a36fc318524bf7")
version("0.3.1", commit="02be3cbd07db467decaf45ec9eb593ba6173c809")
version("0.3", sha256="0feb4f7fd64879fe147624dd5ad164adf3983f79b2e0383d35724f8d185dcb11")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# these version of Cuda provide the CUB headers, but not CUB cmake configuration that we use.
conflicts("^cuda@11.0.2:11.2.2")
diff --git a/var/spack/repos/builtin/packages/cutensor/package.py b/var/spack/repos/builtin/packages/cutensor/package.py
index d80a8df332..df5ad01f7c 100644
--- a/var/spack/repos/builtin/packages/cutensor/package.py
+++ b/var/spack/repos/builtin/packages/cutensor/package.py
@@ -13,7 +13,12 @@ _versions = {
"Linux-x86_64": "4fdebe94f0ba3933a422cff3dd05a0ef7a18552ca274dd12564056993f55471d",
"Linux-ppc64le": "ad736acc94e88673b04a3156d7d3a408937cac32d083acdfbd8435582cbe15db",
"Linux-aarch64": "5b9ac479b1dadaf40464ff3076e45f2ec92581c07df1258a155b5bcd142f6090",
- }
+ },
+ "2.0.1.2": {
+ "Linux-x86_64": "ededa12ca622baad706ea0a500a358ea51146535466afabd96e558265dc586a2",
+ "Linux-ppc64le": "7176083a4dad44cb0176771be6efb3775748ad30a39292bf7b4584510f1dd811",
+ "Linux-aarch64": "4214a0f7b44747c738f2b643be06b2b24826bd1bae6af27f29f3c6dec131bdeb",
+ },
}
@@ -27,7 +32,7 @@ class Cutensor(Package):
maintainers("bvanessen")
url = "cutensor"
- skip_version_audit = ["platform=darwin"]
+ skip_version_audit = ["platform=darwin", "platform=windows"]
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())
diff --git a/var/spack/repos/builtin/packages/cutlang/package.py b/var/spack/repos/builtin/packages/cutlang/package.py
deleted file mode 100644
index 4a675143ad..0000000000
--- a/var/spack/repos/builtin/packages/cutlang/package.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Cutlang(Package):
- """CutLang is a domain specific language that aims to provide a clear,
- human readable way to define analyses in high energy particle physics (HEP)
- along with an interpretation framework of that language."""
-
- homepage = "https://github.com/unelg/CutLang"
- url = "https://github.com/unelg/CutLang/archive/refs/tags/v2.12.10.tar.gz"
- maintainers("unelg", "ssekmen", "sabrivatansever")
-
- version(
- "2.12.10",
- sha256="999a2b9fdb4b7d241a6fc21c03d92deadf80ad4682f8ce677ee0fa3b24169bfd",
- preferred=True,
- )
- version("2.12.9", sha256="56bfb16f8ed683775fbadbca306cc09bbd65f58f42fa16d98f6d6868e8585b45")
- version("2.12.8", sha256="d776198fca3c2dcb612cf3bd98f27c069187aa970b80594fdb6681e0643f5e91")
- version("2.12.7", sha256="f20704abf0f4e04891eb0651f059782eb0f2652661c2c66c70c1bb6d58900380")
- version("2.12.6", sha256="0fb787457466610d37d1a3f047b68e73ace81e708bd2db76eb84af5a1406377e")
- version("2.12.5", sha256="eeb31be584551364569bdef8567b4910fd20be4c00bf7dcf07c8c8cbdaa2419c")
- version("2.12.4", sha256="cc941c358772ada5f66bc768f71bf7841ba2c495dd2bdf132df72a509d5ccb8b")
- version("2.12.3", sha256="a181fc739d13a7b187a94555b12f0b064e900b1cb69b880c69a9f2877bc5de4c")
- version("2.12.2", sha256="c2dc8b841bddd58b4e41b104c72c31bb00c750f7fe07672a30c15746dea6734c")
- version("2.12.1", sha256="7bd7d2e894fdc8465c89970d0011aeaaeae6ec02b4c45d6e2b9111b278ca18a9")
- depends_on("root", type="build")
- depends_on("flex", type="build")
- depends_on("bison", type="build")
-
- def install(self, spec, prefix):
- cmake("..", *std_cmake_args)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/cutlass/package.py b/var/spack/repos/builtin/packages/cutlass/package.py
index 847ea97bc6..28f38b9517 100644
--- a/var/spack/repos/builtin/packages/cutlass/package.py
+++ b/var/spack/repos/builtin/packages/cutlass/package.py
@@ -11,11 +11,41 @@ class Cutlass(CMakePackage, CudaPackage):
homepage = "https://github.com/NVIDIA/cutlass"
git = homepage + ".git"
- url = "https://github.com/NVIDIA/cutlass/archive/refs/tags/v2.9.0.tar.gz"
+ url = "https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.3.0.tar.gz"
+ version("main", branch="main")
version("master", branch="master")
+ version("3.4.1", sha256="aebd4f9088bdf2fd640d65835de30788a6c7d3615532fcbdbc626ec3754becd4")
+ version("3.4.0", sha256="49f4b854acc2a520126ceefe4f701cfe8c2b039045873e311b1f10a8ca5d5de1")
+ version("3.3.0", sha256="99876de94a04d0b9cdee81d4f29659bde1426b416926aef4d9a3a3a7869511a3")
+ version("3.2.2", sha256="aaa9719eb806b168695b34893faf4854bb6bc9e09f63f2d36772aaf35a8516e5")
+ version("3.2.1", sha256="da4081210d6699a547dbbe3d7cc18b4527df835518a3d0d3c85a373927c3a9b1")
+ version("3.2.0", sha256="9637961560a9d63a6bb3f407faf457c7dbc4246d3afb54ac7dc1e014dd7f172f")
+ version("3.1.0", sha256="821aa2e5b709a2e5d3922dcf2c5d445b4898a6ef8bac683cfb00125eafbca029")
+ version("3.0.0", sha256="ade959981d0937a26c758979dbc97c4df152a511176573ba2d976604de78a3e3")
+ version("2.11.0", sha256="b4394f1e080b63cfc54163069334096324c1262dfc66e67099880005d51b8af9")
+ version("2.10.0", sha256="8f56727c0c7ca59f67f6904972958a6e7e925f72e112056e6df7bb3fdeacefd7")
version("2.9.1", sha256="2d6474576c08ee21d7f4f3a10fd1a47234fd9fd638efc8a2e0e64bb367f09bc1")
version("2.9.0", sha256="ccca4685739a3185e3e518682845314b07a5d4e16d898b10a3c3a490fd742fb4")
+ version("2.8.0", sha256="1938f0e739646370a59ba1f5e365be4c701e8d9e0b9b725d306622e9aafa6b2a")
+ version("2.7.0", sha256="3f44d057d6f453f2ff320eb0b544b17b8ee72dbbda33823a6d600dd3859cd37e")
+ version("2.6.1", sha256="a3627869e36796a7b60b07a31305e344449ea8c1fb4f76e2573fea43398454ac")
+ version("2.6.0", sha256="2d9b977e5e8a0d0d96c117b5260497dba4f54032fd22f07fdc3ae80278262d01")
+ version("2.5.0", sha256="d499fc9c9429cf8dee017072312e350077f27d75187e5a83dbfaad26788f5f45")
+ version("2.4.0", sha256="28794a523420457e624e3054dea95d7f5834529c9f9794eb9745d4a3f0a1bc15")
+ version("2.3.0", sha256="62cb62f034d688ac586b92e381620fc940ef1bd43664b064ead5d59de5aace9e")
+ version("2.2.0", sha256="2d853378b186f85c952072f78f5e9533185a274fb7b2d10718527f15e12bfc7d")
+ version("2.1.0", sha256="c0b1cdd95703b07209fe14cd4d2bc28fa8d1ca3d6caa3a433ad1ba3438c83f5b")
+ version("2.0.0", sha256="92d5b1ac41738939902c2d16f44c42f6b4c996ab84e03c26159e70ace7048299")
+ version("1.3.3", sha256="12d5b4c913063625154019b0a03a253c5b9339c969939454b81f6baaf82b34ca")
+ version("1.3.2", sha256="b0223806a75a7aa4e5f404d08ee7a612f511e4fb1aad740be19ce8429c4cbe2e")
+ version("1.3.0", sha256="998657c88917ece065d2f9fc2ec977dbb5c117436b989721fc9a8b147e906ff3")
+ version("1.2.0", sha256="eb8fd9c3abdcd404003cf72087cabec668162a33de4fdbc34d6b2d59d24d98ad")
+ version("1.1.0", sha256="7ae0da2257efa7f4ad9c224bce0d10cb1a5580df6b7010d832cf0a11def4627d")
+ version("1.0.1", sha256="2adec90497141893ca53ac945b88d5881610ed3347166b36be4f72449b5342a0")
+ version("1.0.0", sha256="c7a16d349e11d85891cb91ece97d5bdbc4b140f614a0265732c2dc81a806bd98")
+
+ depends_on("cxx", type="build") # generated
variant("cuda", default=True, description="Build with CUDA")
conflicts("~cuda", msg="Cutlass requires CUDA")
conflicts(
diff --git a/var/spack/repos/builtin/packages/cvector/Makefile.patch b/var/spack/repos/builtin/packages/cvector/Makefile.patch
new file mode 100644
index 0000000000..e6169769e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cvector/Makefile.patch
@@ -0,0 +1,19 @@
+--- a/Makefile
++++ b/Makefile
+@@ -89,11 +89,11 @@ else
+ INCLUDES = -I$(INC)
+ endif
+
+-COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/lib
+-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -dynamic -I $(INSTALL_PREFIX)/include
+-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static -I $(INSTALL_PREFIX)/include
++COMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link --tag=CC $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(INCLUDES)
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -dynamic -I $(INSTALL_PREFIX)/include
++BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -static -I $(INSTALL_PREFIX)/include
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
+
diff --git a/var/spack/repos/builtin/packages/cvector/package.py b/var/spack/repos/builtin/packages/cvector/package.py
index 9a65d39edf..9ca644ab29 100644
--- a/var/spack/repos/builtin/packages/cvector/package.py
+++ b/var/spack/repos/builtin/packages/cvector/package.py
@@ -3,21 +3,37 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+
from spack.package import *
class Cvector(MakefilePackage):
"""CVector -- ANSI C API for Dynamic Arrays"""
- homepage = "http://cvector.sourceforge.net/"
- url = "https://downloads.sourceforge.net/project/cvector/cvector/CVector-1.0.3/CVector-1.0.3.tar.gz"
+ homepage = "https://cvector.sourceforge.net/"
license("LGPL-2.1-or-later")
- version("1.0.3", sha256="d3fa92de3cd5ba8697abdbb52080248b2c252a81cf40a8ec639be301518d0ce3")
+ version("1.0.3.1", sha256="6492b2beb26c3179cdd19abc90dc47a685be471c594d5ab664283e1d3586acdc")
+ version(
+ "1.0.3",
+ sha256="d3fa92de3cd5ba8697abdbb52080248b2c252a81cf40a8ec639be301518d0ce3",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
depends_on("libtool", type="build")
+ patch("Makefile.patch", when="@1.0.3.1")
+
+ def url_for_version(self, version):
+ pattern = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+")
+ full_vers = str(version)
+ cropped_vers = pattern.search(full_vers).group()
+ return f"https://downloads.sourceforge.net/project/cvector/cvector/CVector-{cropped_vers}/CVector-{full_vers}.tar.gz"
+
def edit(self, spec, prefix):
mf = FileFilter("Makefile")
mf.filter(r"^CC.+", "CC = {0}".format(spack_cc))
diff --git a/var/spack/repos/builtin/packages/cvise/package.py b/var/spack/repos/builtin/packages/cvise/package.py
index 5a4e2f7b7e..3b04c5d61f 100644
--- a/var/spack/repos/builtin/packages/cvise/package.py
+++ b/var/spack/repos/builtin/packages/cvise/package.py
@@ -17,12 +17,17 @@ class Cvise(CMakePackage):
license("NCSA")
version("master", branch="master")
+ version("2.10.0", tag="v2.10.0", commit="c8606497e354ddab273745cf823823bdd3e86bd8")
version("2.7.0", tag="v2.7.0", commit="d9e4a50514d9931b2a1293755a7e96e0f9520032")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("pytest", default=False, description="Add py-pytest as dependency")
variant("colordiff", default=False, description="Add colordiff support")
- depends_on("cmake", type="build")
+ depends_on("cmake@2.8.12:", type="build")
+ depends_on("cmake@3.14:", when="@2.9:", type="build")
depends_on("flex", type=("build", "run"))
depends_on("llvm@9.0.0:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"))
@@ -34,5 +39,7 @@ class Cvise(CMakePackage):
depends_on("py-pytest", when="+pytest", type=("build", "run"))
depends_on("colordiff", when="+colordiff", type=("build", "run"))
- def cmake_args(self):
- return ["-DPYTHON_EXECUTABLE=" + self.spec["python"].command.path]
+ # C-Vise doesn't directly depend on ncurses, but LLVM does. However, LLVM
+ # doesn't provide correctly export terminfo CMake targets that it depends on
+ # and C-Vise fails during configuration with ncurses +termlib.
+ depends_on("ncurses ~termlib", when="^llvm +lldb")
diff --git a/var/spack/repos/builtin/packages/cvs/package.py b/var/spack/repos/builtin/packages/cvs/package.py
index 867da62789..1e4da0d450 100644
--- a/var/spack/repos/builtin/packages/cvs/package.py
+++ b/var/spack/repos/builtin/packages/cvs/package.py
@@ -18,6 +18,9 @@ class Cvs(AutotoolsPackage, GNUMirrorPackage):
version("1.12.13", sha256="78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# To avoid the problem: The use of %n in format strings in writable memory
# may crash the program on glibc2 systems from 2004-10-18 or newer.
patch(
diff --git a/var/spack/repos/builtin/packages/cxx/package.py b/var/spack/repos/builtin/packages/cxx/package.py
index c34e8af7bb..ac5c5cc5a6 100644
--- a/var/spack/repos/builtin/packages/cxx/package.py
+++ b/var/spack/repos/builtin/packages/cxx/package.py
@@ -5,6 +5,8 @@
import os
+import spack.compilers
+import spack.spec
from spack.package import *
@@ -14,28 +16,27 @@ class Cxx(Package):
homepage = "https://isocpp.org/std/the-standard"
virtual = True
- def test(self):
- test_source = self.test_suite.current_test_data_dir
+ def test_cxx(self):
+ """Compile and run 'Hello World'"""
+ cxx = which(os.environ["CXX"])
+ expected = ["Hello world", "YES!"]
+ test_source = self.test_suite.current_test_data_dir
for test in os.listdir(test_source):
- filepath = os.path.join(test_source, test)
- exe_name = "%s.exe" % test
-
- cxx_exe = os.environ["CXX"]
-
- # standard options
- # Hack to get compiler attributes
- # TODO: remove this when compilers are dependencies
- c_name = clang if self.spec.satisfies("llvm+clang") else self.name
- c_spec = spack.spec.CompilerSpec(c_name, self.spec.version)
- c_cls = spack.compilers.class_for_compiler_name(c_name)
- compiler = c_cls(c_spec, None, None, ["fakecc", "fakecxx"])
-
- cxx_opts = [compiler.cxx11_flag] if "c++11" in test else []
-
- cxx_opts += ["-o", exe_name, filepath]
- compiled = self.run_test(cxx_exe, options=cxx_opts, installed=True)
-
- if compiled:
- expected = ["Hello world", "YES!"]
- self.run_test(exe_name, expected=expected)
+ exe_name = f"{test}.exe"
+ filepath = test_source.join(test)
+ with test_part(self, f"test_cxx_{test}", f"build and run {exe_name}"):
+ # standard options
+ # Hack to get compiler attributes
+ # TODO: remove this when compilers are dependencies
+ c_name = clang if self.spec.satisfies("llvm+clang") else self.name
+ c_spec = spack.spec.CompilerSpec(c_name, self.spec.version)
+ c_cls = spack.compilers.class_for_compiler_name(c_name)
+ compiler = c_cls(c_spec, None, None, ["fakecc", "fakecxx"])
+ cxx_opts = [compiler.cxx11_flag] if "c++11" in test else []
+ cxx_opts += ["-o", exe_name, filepath]
+
+ cxx(*cxx_opts)
+ exe = which(exe_name)
+ out = exe(output=str.split, error=str.split)
+ check_outputs(expected, out)
diff --git a/var/spack/repos/builtin/packages/cxxopts/package.py b/var/spack/repos/builtin/packages/cxxopts/package.py
index be93b9631f..2f9bb7ba0d 100644
--- a/var/spack/repos/builtin/packages/cxxopts/package.py
+++ b/var/spack/repos/builtin/packages/cxxopts/package.py
@@ -15,6 +15,7 @@ class Cxxopts(CMakePackage):
license("MIT")
+ version("3.2.0", sha256="9f43fa972532e5df6c5fd5ad0f5bac606cdec541ccaf1732463d8070bbb7f03b")
version("3.1.1", sha256="523175f792eb0ff04f9e653c90746c12655f10cb70f1d5e6d6d9491420298a08")
version("3.0.0", sha256="36f41fa2a46b3c1466613b63f3fa73dc24d912bc90d667147f1e43215a8c6d00")
version("2.2.1", sha256="984aa3c8917d649b14d7f6277104ce38dd142ce378a9198ec926f03302399681")
@@ -29,6 +30,8 @@ class Cxxopts(CMakePackage):
version("1.4.1", sha256="c5ccfe99bd3db0604d077c968b39a42d61333a64d171fe84d7037d6c0dcc996d")
version("1.4.0", sha256="60d4a482ec603ef4efa2603978596716884b33e24d39af6ddca52b4a30f7107b")
+ depends_on("cxx", type="build") # generated
+
variant("unicode", default=False, description="Enables unicode support using the ICU library.")
depends_on("cmake@3.1.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/cxxtest/package.py b/var/spack/repos/builtin/packages/cxxtest/package.py
index 162d854326..386894276a 100644
--- a/var/spack/repos/builtin/packages/cxxtest/package.py
+++ b/var/spack/repos/builtin/packages/cxxtest/package.py
@@ -16,5 +16,8 @@ class Cxxtest(Package):
version("4.4", sha256="1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree(self.stage.source_path, prefix)
diff --git a/var/spack/repos/builtin/packages/cyrus-sasl/package.py b/var/spack/repos/builtin/packages/cyrus-sasl/package.py
index a464055d49..afc7bd68e8 100644
--- a/var/spack/repos/builtin/packages/cyrus-sasl/package.py
+++ b/var/spack/repos/builtin/packages/cyrus-sasl/package.py
@@ -23,6 +23,16 @@ class CyrusSasl(AutotoolsPackage):
version("2.1.24", sha256="1df15c492f7ecb90be49531a347b3df21b041c2e0325dcc4fc5a6e98384c40dd")
version("2.1.23", sha256="b1ec43f62d68446a6a5879925c63d94e26089c5a46cd83e061dd685d014c7d1f")
+ # ensure include time.h, https://github.com/cyrusimap/cyrus-sasl/pull/709
+ patch(
+ "https://github.com/cyrusimap/cyrus-sasl/commit/266f0acf7f5e029afbb3e263437039e50cd6c262.patch?full_index=1",
+ sha256="819342fe68475ac1690136ff4ce9b73c028f433ae150898add36f724a8e2274b",
+ when="@2.1.27:2.1.28",
+ )
+ conflicts("%gcc@14:", when="@:2.1.26")
+
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py
index a26df39416..7206bbe28e 100644
--- a/var/spack/repos/builtin/packages/czmq/package.py
+++ b/var/spack/repos/builtin/packages/czmq/package.py
@@ -14,10 +14,14 @@ class Czmq(AutotoolsPackage):
license("MPL-2.0")
+ version("4.2.1", sha256="83457cd32a2c2615b8d7ebcf91b198cb0d8df383a2072b96835ab250164d8a83")
version("4.1.1", sha256="b7623433547aa4b6e79722796c27ebc7c0470fea4204e920fd05e717c648f889")
version("4.0.2", sha256="794f80af7392ec8d361ad69646fc20aaa284d23fef92951334009771a732c810")
version("3.0.2", sha256="e56f8498daf70310b31c42669b2f9b753c5e747eafaff6d4fdac26d72a474b27")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libtool", type="build")
depends_on("automake", type="build")
depends_on("autoconf", type="build")
@@ -28,12 +32,11 @@ class Czmq(AutotoolsPackage):
depends_on("libzmq")
def flag_handler(self, name, flags):
- iflags = []
if name == "cflags":
if self.spec.satisfies("%oneapi@2022.2.0:"):
- iflags.append("-Wno-error=gnu-null-pointer-arithmetic")
- iflags.append("-Wno-error=strict-prototypes")
- return (iflags, None, None)
+ flags.append("-Wno-error=gnu-null-pointer-arithmetic")
+ flags.append("-Wno-error=strict-prototypes")
+ return (flags, None, None)
def autoreconf(self, spec, prefix):
autogen = Executable("./autogen.sh")
diff --git a/var/spack/repos/builtin/packages/daemonize/package.py b/var/spack/repos/builtin/packages/daemonize/package.py
index 05aefdc1e6..bee632b9f8 100644
--- a/var/spack/repos/builtin/packages/daemonize/package.py
+++ b/var/spack/repos/builtin/packages/daemonize/package.py
@@ -18,6 +18,8 @@ class Daemonize(Package):
version("master", branch="master")
version("1.7.8", sha256="20c4fc9925371d1ddf1b57947f8fb93e2036eb9ccc3b43a1e3678ea8471c4c60")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
configure("--prefix={0}".format(prefix))
make()
diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py
index b8c46953a2..35eb19168c 100644
--- a/var/spack/repos/builtin/packages/dakota/package.py
+++ b/var/spack/repos/builtin/packages/dakota/package.py
@@ -43,6 +43,18 @@ class Dakota(CMakePackage):
license("LGPL-2.1-or-later")
version(
+ "6.20.0",
+ tag="v6.20.0",
+ commit="494027b37264ec9268f2de8649d071de0232c534",
+ submodules=submodules,
+ )
+ version(
+ "6.19.0",
+ tag="v6.19.0",
+ commit="603f448b916a8f629d258922e26e7e40dcaaf8ce",
+ submodules=submodules,
+ )
+ version(
"6.18",
tag="v6.18.0",
commit="f6cb33b517bb304795e1e14d3673fe289df2ec9b",
@@ -52,8 +64,13 @@ class Dakota(CMakePackage):
version("6.9", sha256="989b689278964b96496e3058b8ef5c2724d74bcd232f898fe450c51eba7fe0c2")
version("6.3", sha256="0fbc310105860d77bb5c96de0e8813d75441fca1a5e6dfaf732aa095c4488d52")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("mpi", default=True, description="Activates MPI support")
+ variant("python", default=True, description="Add Python dependency for dakota.interfacing API")
# Generic 'lapack' provider won't work, dakota searches for
# 'LAPACKConfig.cmake' or 'lapack-config.cmake' on the path
@@ -62,10 +79,11 @@ class Dakota(CMakePackage):
depends_on("blas")
depends_on("mpi", when="+mpi")
- depends_on("python")
+ depends_on("python", when="+python")
depends_on("perl-data-dumper", type="build", when="@6.12:")
depends_on("boost@:1.68.0", when="@:6.12")
- depends_on("boost@1.69.0:", when="@6.18:")
+ depends_on("boost@1.69.0:1.84.0", when="@6.18:6.20")
+ depends_on("boost +filesystem +program_options +regex +serialization +system")
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
@@ -74,12 +92,28 @@ class Dakota(CMakePackage):
depends_on("cmake@2.8.9:", type="build")
depends_on("cmake@3.17:", type="build", when="@6.18:")
+ # dakota@:6.20 don't compile with gcc@13, and it is currently the latest version:
+ conflicts("%gcc@13:")
+ # dakota@:6.12 don't compile with gcc@12:
+ conflicts("%gcc@12:", when="@:6.12")
+ # dakota@:6.9 don't compile with gcc@11:
+ conflicts("%gcc@11:", when="@:6.9")
+
+ def flag_handler(self, name, flags):
+ # from gcc@10, dakota@:6.12 need an extra flag
+ if self.spec.satisfies("@:6.12 %gcc@10:") and name == "fflags":
+ flags.append("-fallow-argument-mismatch")
+ return (flags, None, None)
+
def cmake_args(self):
spec = self.spec
- args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("DAKOTA_PYTHON", "python"),
+ ]
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.extend(
[
"-DDAKOTA_HAVE_MPI:BOOL=ON",
diff --git a/var/spack/repos/builtin/packages/daligner/package.py b/var/spack/repos/builtin/packages/daligner/package.py
index d7763a0a0c..1f4ff5ddbd 100644
--- a/var/spack/repos/builtin/packages/daligner/package.py
+++ b/var/spack/repos/builtin/packages/daligner/package.py
@@ -14,6 +14,8 @@ class Daligner(MakefilePackage):
version("1.0", sha256="2fb03616f0d60df767fbba7c8f0021ec940c8d822ab2011cf58bd56a8b9fb414")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
kwargs = {"ignore_absent": False, "backup": False, "string": True}
diff --git a/var/spack/repos/builtin/packages/dalton/package.py b/var/spack/repos/builtin/packages/dalton/package.py
index a911d5e18c..a4fb67b8bf 100644
--- a/var/spack/repos/builtin/packages/dalton/package.py
+++ b/var/spack/repos/builtin/packages/dalton/package.py
@@ -27,6 +27,10 @@ class Dalton(CMakePackage):
"2018.2", tag="2018.2", commit="4aa945ecd235fbf67ed0c1609617c553ef40be89", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="Release",
@@ -75,7 +79,7 @@ class Dalton(CMakePackage):
def cmake_args(self):
math_libs = self.spec["lapack"].libs + self.spec["blas"].libs
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
env["CC"] = self.spec["mpi"].mpicc
env["CXX"] = self.spec["mpi"].mpicxx
env["F77"] = self.spec["mpi"].mpif77
diff --git a/var/spack/repos/builtin/packages/damaris/package.py b/var/spack/repos/builtin/packages/damaris/package.py
index f85d1df76c..3d1221dd50 100644
--- a/var/spack/repos/builtin/packages/damaris/package.py
+++ b/var/spack/repos/builtin/packages/damaris/package.py
@@ -18,6 +18,8 @@ class Damaris(CMakePackage):
license("LGPL-3.0-or-later")
version("master", branch="master")
+ version("1.11.0", tag="v1.11.0", commit="1aee2a8971584712d81323d77f9805448fe54947")
+ version("1.10.0", tag="v1.10.0", commit="4e6b2641be1f7ded379312a8e7f4644ebe009ec9")
version("1.9.2", tag="v1.9.2", commit="22c146b4b4ca047d4d36fd904d248e0280b3c0ea")
version("1.9.1", tag="v1.9.1", commit="2fe83f587837b7ad0b5c187b8ff453f7d3ad2c18")
version("1.9.0", tag="v1.9.0", commit="23cac3a8ade9f9c20499081a8ed10b3e51801428")
@@ -42,6 +44,10 @@ class Damaris(CMakePackage):
"1.3.1", tag="v1.3.1", commit="6cee3690fa7d387acc8f5f650a7b019e13b90284", deprecated=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enables Fortran support")
variant("hdf5", default=False, description="Enables the HDF5 storage plugin")
variant("static", default=False, description="Builds a static version of the library")
diff --git a/var/spack/repos/builtin/packages/damask-grid/package.py b/var/spack/repos/builtin/packages/damask-grid/package.py
index 68a973b09e..35398ebf77 100644
--- a/var/spack/repos/builtin/packages/damask-grid/package.py
+++ b/var/spack/repos/builtin/packages/damask-grid/package.py
@@ -10,13 +10,21 @@ from spack.package import *
class DamaskGrid(CMakePackage):
"""Grid solver for DAMASK"""
- homepage = "https://damask.mpie.de"
- url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
+ homepage = "https://damask-multiphysics.org"
+ url = "https://damask-multiphysics.org/download/damask-3.0.0.tar.xz"
maintainers("MarDiehl")
license("AGPL-3.0-or-later")
+ version("3.0.1", sha256="3db1231f6763356e71b3bb91f66f1abb4fdae2721ce85754fc468446f3d74882")
+ version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
+ version(
+ "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
+ )
+ version(
+ "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
+ )
version(
"3.0.0-alpha8", sha256="f62c38123213d1c1fe2eb8910b0ffbdc1cac56273c2520f3b64a553363190b9d"
)
@@ -33,7 +41,13 @@ class DamaskGrid(CMakePackage):
"3.0.0-alpha4", sha256="0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493"
)
- depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("petsc@3.21:3.22", when="@3.0.1:")
+ depends_on("petsc@3.21", when="@3.0.0-beta2:")
+ depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta")
+ depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8")
depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7")
depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6")
depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5")
@@ -48,7 +62,7 @@ class DamaskGrid(CMakePackage):
# proper initialization of temperature to avoid segmentation fault. created by @MarDiehl
patch("T-init.patch", when="@3.0.0-alpha7")
- # relax Fortran sourc limit to 132 char to enable PETSc macro expansion. created by @MarDiehl
+ # relax Fortran source limit to 132 char to enable PETSc macro expansion. created by @MarDiehl
patch("long-lines.patch", when="@3.0.0-alpha7")
patch("CMakeDebugRelease.patch", when="@3.0.0-alpha4")
diff --git a/var/spack/repos/builtin/packages/damask-mesh/package.py b/var/spack/repos/builtin/packages/damask-mesh/package.py
index 2e537477a2..c7e13df783 100644
--- a/var/spack/repos/builtin/packages/damask-mesh/package.py
+++ b/var/spack/repos/builtin/packages/damask-mesh/package.py
@@ -10,13 +10,21 @@ from spack.package import *
class DamaskMesh(CMakePackage):
"""Mesh solver for DAMASK"""
- homepage = "https://damask.mpie.de"
- url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
+ homepage = "https://damask-multiphysics.org"
+ url = "https://damask-multiphysics.org/download/damask-3.0.0.tar.xz"
maintainers("MarDiehl")
license("AGPL-3.0-or-later")
+ version("3.0.1", sha256="3db1231f6763356e71b3bb91f66f1abb4fdae2721ce85754fc468446f3d74882")
+ version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
+ version(
+ "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
+ )
+ version(
+ "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
+ )
version(
"3.0.0-alpha8", sha256="f62c38123213d1c1fe2eb8910b0ffbdc1cac56273c2520f3b64a553363190b9d"
)
@@ -33,7 +41,13 @@ class DamaskMesh(CMakePackage):
"3.0.0-alpha4", sha256="0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493"
)
- depends_on("petsc@3.20.2:3.21", when="@3.0.0-alpha8")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("petsc@3.21:3.22", when="@3.0.1:")
+ depends_on("petsc@3.21", when="@3.0.0-beta2:")
+ depends_on("petsc@3.20.3:3.20", when="@3.0.0-beta")
+ depends_on("petsc@3.20.2:3.20", when="@3.0.0-alpha8")
depends_on("petsc@3.17.1:3.18", when="@3.0.0-alpha7")
depends_on("petsc@3.16.5:3.16", when="@3.0.0-alpha6")
depends_on("petsc@3.14.0:3.14,3.15.1:3.16", when="@3.0.0-alpha5")
@@ -45,7 +59,7 @@ class DamaskMesh(CMakePackage):
depends_on("hdf5@1.10:+mpi+fortran")
depends_on("libfyaml", when="@3.0.0-alpha7:")
- # relax Fortran sourc limit to 132 char to enable PETSc macro expansion. created by @MarDiehl
+ # relax Fortran source limit to 132 char to enable PETSc macro expansion. created by @MarDiehl
patch("long-lines.patch", when="@3.0.0-alpha7")
patch("CMakeDebugRelease.patch", when="@3.0.0-alpha4")
diff --git a/var/spack/repos/builtin/packages/damask/package.py b/var/spack/repos/builtin/packages/damask/package.py
index 84bf0caff5..91c39a4e27 100644
--- a/var/spack/repos/builtin/packages/damask/package.py
+++ b/var/spack/repos/builtin/packages/damask/package.py
@@ -24,16 +24,36 @@ class Damask(BundlePackage):
"""
- homepage = "https://damask.mpie.de"
+ homepage = "https://damask-multiphysics.org"
maintainers("MarDiehl")
+ version("3.0.1")
+ version("3.0.0")
+ version("3.0.0-beta2")
+ version("3.0.0-beta")
version("3.0.0-alpha8")
version("3.0.0-alpha7")
version("3.0.0-alpha6")
version("3.0.0-alpha5")
version("3.0.0-alpha4")
+ depends_on("damask-grid@3.0.1", when="@3.0.1", type="run")
+ depends_on("damask-mesh@3.0.1", when="@3.0.1", type="run")
+ depends_on("py-damask@3.0.1", when="@3.0.1", type="run")
+
+ depends_on("damask-grid@3.0.0", when="@3.0.0", type="run")
+ depends_on("damask-mesh@3.0.0", when="@3.0.0", type="run")
+ depends_on("py-damask@3.0.0", when="@3.0.0", type="run")
+
+ depends_on("damask-grid@3.0.0-beta2", when="@3.0.0-beta2", type="run")
+ depends_on("damask-mesh@3.0.0-beta2", when="@3.0.0-beta2", type="run")
+ depends_on("py-damask@3.0.0-beta2", when="@3.0.0-beta2", type="run")
+
+ depends_on("damask-grid@3.0.0-beta", when="@3.0.0-beta", type="run")
+ depends_on("damask-mesh@3.0.0-beta", when="@3.0.0-beta", type="run")
+ depends_on("py-damask@3.0.0-beta", when="@3.0.0-beta", type="run")
+
depends_on("damask-grid@3.0.0-alpha8", when="@3.0.0-alpha8", type="run")
depends_on("damask-mesh@3.0.0-alpha8", when="@3.0.0-alpha8", type="run")
depends_on("py-damask@3.0.0-alpha8", when="@3.0.0-alpha8", type="run")
diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py
index 74b8a078ad..bccbeda6c8 100644
--- a/var/spack/repos/builtin/packages/damselfly/package.py
+++ b/var/spack/repos/builtin/packages/damselfly/package.py
@@ -14,5 +14,8 @@ class Damselfly(CMakePackage):
version("1.0", sha256="560e1b800c9036766396a1033c00914bd8d181b911e87140c3ac8879baf6545a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/daos/package.py b/var/spack/repos/builtin/packages/daos/package.py
index 87bbfe8662..f0b7ed25f1 100644
--- a/var/spack/repos/builtin/packages/daos/package.py
+++ b/var/spack/repos/builtin/packages/daos/package.py
@@ -21,6 +21,9 @@ class Daos(SConsPackage):
version(
"2.2.0", tag="v2.2.0", commit="d2a1f2790c946659c9398926254e6203fd957b7c", submodules=True
)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant(
"debug", default=False, description="Enable debugging info and strict compile warnings"
)
@@ -36,7 +39,7 @@ class Daos(SConsPackage):
depends_on("isa-l-crypto@2.23.0:")
depends_on("libfabric@1.15.1:")
depends_on("libfuse@3.6.1:")
- depends_on("libuuid")
+ depends_on("uuid")
depends_on("libunwind")
depends_on("libyaml")
depends_on("mercury@2.2.0:+boostsys")
@@ -52,7 +55,7 @@ class Daos(SConsPackage):
def build_args(self, spec, prefix):
args = ["PREFIX={0}".format(prefix), "USE_INSTALLED=all"]
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
args.append("--debug=explain,findlibs,includes")
# Construct ALT_PREFIX and make sure that '/usr' is last.
diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py
index 5fee8c6801..25f67b55f9 100644
--- a/var/spack/repos/builtin/packages/darshan-runtime/package.py
+++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py
@@ -16,7 +16,7 @@ class DarshanRuntime(AutotoolsPackage):
systems where you intend to instrument MPI applications."""
homepage = "https://www.mcs.anl.gov/research/projects/darshan/"
- url = "https://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz"
+ url = "https://web.cels.anl.gov/projects/darshan/releases/darshan-3.4.0.tar.gz"
git = "https://github.com/darshan-hpc/darshan.git"
maintainers("shanedsnyder", "carns")
@@ -25,6 +25,8 @@ class DarshanRuntime(AutotoolsPackage):
test_requires_compiler = True
version("main", branch="main", submodules=True)
+ version("3.4.6", sha256="092b35e7af859af903dce0c51bcb5d3901dd0d9ad79d1b2f3282692407f032ee")
+ version("3.4.5", sha256="1c017ac635fab5ee0e87a6b52c5c7273962813569495cb1dd3b7cfa6e19f6ed0")
version("3.4.4", sha256="d9c9df5aca94dc5ca3d56fd763bec2f74771d35126d61cb897373d2166ccd867")
version("3.4.3", sha256="dca5f9f9b0ead55a8724b218071ecbb5c4f2ef6027eaade3a6477256930ccc2c")
version("3.4.2", sha256="b095c3b7c059a8eba4beb03ec092b60708780a3cae3fc830424f6f9ada811c6b")
@@ -49,10 +51,15 @@ class DarshanRuntime(AutotoolsPackage):
version("3.1.0", sha256="b847047c76759054577823fbe21075cfabb478cdafad341d480274fb1cef861c")
version("3.0.0", sha256="95232710f5631bbf665964c0650df729c48104494e887442596128d189da43e0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi", when="+mpi")
depends_on("zlib-api")
depends_on("hdf5", when="+hdf5")
depends_on("parallel-netcdf", when="+parallel-netcdf")
+ depends_on("lustre", when="+lustre")
depends_on("papi", when="+apxc")
depends_on("autoconf", type="build", when="@main")
depends_on("automake", type="build", when="@main")
@@ -71,6 +78,7 @@ class DarshanRuntime(AutotoolsPackage):
description="Compile with Parallel NetCDF module",
when="@3.4.1:",
)
+ variant("lustre", default=False, description="Compile with Lustre module", when="@3.1:")
variant("apmpi", default=False, description="Compile with AutoPerf MPI module", when="@3.3:")
variant(
"apmpi_sync",
@@ -82,10 +90,18 @@ class DarshanRuntime(AutotoolsPackage):
variant(
"scheduler",
default="NONE",
- description="queue system scheduler JOB ID",
+ description="Queue system scheduler JOB ID",
values=("NONE", "cobalt", "pbs", "sge", "slurm"),
multi=False,
)
+ variant(
+ "log_path",
+ values=str,
+ default="none",
+ description="Path to centralized, formatted Darshan log directory",
+ )
+ variant("mmap_logs", default=False, description="Use mmap to store Darshan log data")
+ variant("group_readable_logs", default=False, description="Write group-readable logs")
@property
def configure_directory(self):
@@ -96,46 +112,56 @@ class DarshanRuntime(AutotoolsPackage):
extra_args = []
job_id = "NONE"
- if "+slurm" in spec:
+ if spec.satisfies("scheduler=slurm"):
job_id = "SLURM_JOBID"
- if "+cobalt" in spec:
+ elif spec.satisfies("scheduler=cobalt"):
job_id = "COBALT_JOBID"
- if "+pbs" in spec:
+ elif spec.satisfies("scheduler=pbs"):
job_id = "PBS_JOBID"
- if "+sge" in spec:
+ elif spec.satisfies("scheduler=sge"):
job_id = "JOB_ID"
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
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 "+parallel-netcdf" in spec:
+ if spec.satisfies("+parallel-netcdf"):
extra_args.append("--enable-pnetcdf-mod")
- if "+apmpi" in spec:
+ if spec.satisfies("+lustre"):
+ extra_args.append("--enable-lustre-mod")
+ else:
+ extra_args.append("--disable-lustre-mod")
+ if spec.satisfies("+apmpi"):
extra_args.append("--enable-apmpi-mod")
- if "+apmpi_sync" in spec:
+ if spec.satisfies("+apmpi_sync"):
extra_args.extend(["--enable-apmpi-mod", "--enable-apmpi-coll-sync"])
- if "+apxc" in spec:
+ if spec.satisfies("+apxc"):
extra_args.append("--enable-apxc-mod")
+ if spec.satisfies("+group_readable_logs"):
+ extra_args.append("--enable-group-readable-logs")
+ if spec.satisfies("+mmap_logs"):
+ extra_args.append("--enable-mmap-logs")
+ log_path = self.spec.variants["log_path"].value
+ if log_path != "none":
+ extra_args.append("--with-log-path=" + log_path)
+ else:
+ extra_args.append("--with-log-path-by-env=DARSHAN_LOG_DIR_PATH")
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-api"].prefix)
- if "+mpi" in spec:
- extra_args.append("CC=%s" % self.spec["mpi"].mpicc)
- else:
- extra_args.append("CC=%s" % self.compiler.cc)
+ if "+mpi" not in spec:
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
- darshan_log_dir = os.environ["HOME"]
- env.set("DARSHAN_LOG_DIR_PATH", darshan_log_dir)
+ if self.spec.variants["log_path"].value == "none":
+ # set a default path for log file that can be overrode by user
+ darshan_log_dir = os.environ["HOME"]
+ env.set("DARSHAN_LOG_DIR_PATH", darshan_log_dir)
@property
def basepath(self):
@@ -144,7 +170,7 @@ class DarshanRuntime(AutotoolsPackage):
@run_after("install")
def _copy_test_inputs(self):
test_inputs = [join_path(self.basepath, "mpi-io-test.c")]
- self.cache_extra_test_sources(test_inputs)
+ cache_extra_test_sources(self, test_inputs)
def test_mpi_io_test(self):
"""build, run, and check outputs"""
diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py
index d83cbd2fbb..38a9195c7a 100644
--- a/var/spack/repos/builtin/packages/darshan-util/package.py
+++ b/var/spack/repos/builtin/packages/darshan-util/package.py
@@ -13,7 +13,7 @@ class DarshanUtil(AutotoolsPackage):
log files produced by Darshan (runtime)."""
homepage = "https://www.mcs.anl.gov/research/projects/darshan/"
- url = "https://ftp.mcs.anl.gov/pub/darshan/releases/darshan-3.1.0.tar.gz"
+ url = "https://web.cels.anl.gov/projects/darshan/releases/darshan-3.4.0.tar.gz"
git = "https://github.com/darshan-hpc/darshan.git"
maintainers("shanedsnyder", "carns")
@@ -21,6 +21,8 @@ class DarshanUtil(AutotoolsPackage):
tags = ["e4s"]
version("main", branch="main", submodules="True")
+ version("3.4.6", sha256="092b35e7af859af903dce0c51bcb5d3901dd0d9ad79d1b2f3282692407f032ee")
+ version("3.4.5", sha256="1c017ac635fab5ee0e87a6b52c5c7273962813569495cb1dd3b7cfa6e19f6ed0")
version("3.4.4", sha256="d9c9df5aca94dc5ca3d56fd763bec2f74771d35126d61cb897373d2166ccd867")
version("3.4.3", sha256="dca5f9f9b0ead55a8724b218071ecbb5c4f2ef6027eaade3a6477256930ccc2c")
version("3.4.2", sha256="b095c3b7c059a8eba4beb03ec092b60708780a3cae3fc830424f6f9ada811c6b")
@@ -45,6 +47,10 @@ class DarshanUtil(AutotoolsPackage):
version("3.1.0", sha256="b847047c76759054577823fbe21075cfabb478cdafad341d480274fb1cef861c")
version("3.0.0", sha256="95232710f5631bbf665964c0650df729c48104494e887442596128d189da43e0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("bzip2", default=False, description="Enable bzip2 compression")
variant(
"apmpi",
@@ -77,14 +83,13 @@ class DarshanUtil(AutotoolsPackage):
spec = self.spec
extra_args = []
- extra_args.append("CC=%s" % self.compiler.cc)
extra_args.append("--with-zlib=%s" % spec["zlib-api"].prefix)
- if "+apmpi" in spec:
+ if spec.satisfies("+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:
+ if spec.satisfies("+apxc"):
if self.version < Version("3.3.2"):
extra_args.append("--enable-autoperf-apxc")
else:
@@ -108,7 +113,7 @@ class DarshanUtil(AutotoolsPackage):
@run_after("install")
def _copy_test_inputs(self):
test_inputs = [self.tests_log_path]
- self.cache_extra_test_sources(test_inputs)
+ cache_extra_test_sources(self, test_inputs)
def test_parser(self):
"""process example log and check counters"""
diff --git a/var/spack/repos/builtin/packages/dash/package.py b/var/spack/repos/builtin/packages/dash/package.py
index b5fe8a7cd1..791bfc7f75 100644
--- a/var/spack/repos/builtin/packages/dash/package.py
+++ b/var/spack/repos/builtin/packages/dash/package.py
@@ -18,6 +18,8 @@ class Dash(AutotoolsPackage):
version("0.5.12", sha256="0d632f6b945058d84809cac7805326775bd60cb4a316907d0bd4228ff7107154")
version("0.5.9.1", sha256="3f747013a20a3a9d2932be1a6dd1b002ca5649849b649be0af8a8da80bd8a918")
+ depends_on("c", type="build") # generated
+
depends_on("libedit", type="link")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/datamash/package.py b/var/spack/repos/builtin/packages/datamash/package.py
index c36f9e83e6..dec03d20f2 100644
--- a/var/spack/repos/builtin/packages/datamash/package.py
+++ b/var/spack/repos/builtin/packages/datamash/package.py
@@ -23,4 +23,6 @@ class Datamash(AutotoolsPackage, GNUMirrorPackage):
version("1.0.6", sha256="0154c25c45b5506b6d618ca8e18d0ef093dac47946ac0df464fb21e77b504118")
version("1.0.5", sha256="cb7c0b7bf654eea5bb80f10c1710c8dffab8106549fd6b4341cba140e15a9938")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/dataspaces/package.py b/var/spack/repos/builtin/packages/dataspaces/package.py
index a62d8eec05..ed064f7014 100644
--- a/var/spack/repos/builtin/packages/dataspaces/package.py
+++ b/var/spack/repos/builtin/packages/dataspaces/package.py
@@ -52,7 +52,7 @@ class Dataspaces(AutotoolsPackage):
env.set("CFLAGS", self.compiler.cc_pic_flag)
- if "%gcc@10:" in self.spec:
+ if self.spec.satisfies("%gcc@10:"):
env.set("FCFLAGS", "-fallow-argument-mismatch")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/datatransferkit/package.py b/var/spack/repos/builtin/packages/datatransferkit/package.py
index 7f29a80ddf..8ee50449a3 100644
--- a/var/spack/repos/builtin/packages/datatransferkit/package.py
+++ b/var/spack/repos/builtin/packages/datatransferkit/package.py
@@ -26,6 +26,10 @@ class Datatransferkit(CMakePackage):
version("3.1-rc3", commit="691d5a1540f7cd42141a3b3d2a7c8370cbc3560a", submodules=True)
version("3.1-rc2", commit="1abc1a43b33dffc7a16d7497b4185d09d865e36a", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"external-arborx",
default=False,
@@ -35,6 +39,7 @@ class Datatransferkit(CMakePackage):
variant("serial", default=True, description="enable Serial backend (default)")
variant("shared", default=True, description="enable the build of shared lib")
+ depends_on("mpi")
depends_on("arborx@1.0:", when="+external-arborx")
depends_on("boost")
depends_on("cmake", type="build")
@@ -42,7 +47,7 @@ class Datatransferkit(CMakePackage):
depends_on("trilinos+openmp", when="+openmp")
depends_on("trilinos+stratimikos+belos", when="@master")
depends_on("trilinos@13:13.4.1", when="@3.1-rc2:3.1-rc3")
- depends_on("trilinos@14:", when="@3.1.0:")
+ depends_on("trilinos@14.2:", when="@3.1.0:")
def cmake_args(self):
spec = self.spec
@@ -56,9 +61,13 @@ class Datatransferkit(CMakePackage):
"-DDataTransferKit_ENABLE_EXAMPLES=OFF",
"-DCMAKE_CXX_EXTENSIONS=OFF",
"-DCMAKE_CXX_STANDARD=14",
+ "-DCMAKE_C_COMPILER=" + spec["mpi"].mpicc,
+ "-DCMAKE_CXX_COMPILER=" + spec["mpi"].mpicxx,
+ "-DCMAKE_Fortran_COMPILER=" + spec["mpi"].mpifc,
+ "-DMPI_BASE_DIR=" + spec["mpi"].prefix,
]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
options.append("-DDataTransferKit_ENABLE_OpenMP=ON")
return options
diff --git a/var/spack/repos/builtin/packages/dateutils/package.py b/var/spack/repos/builtin/packages/dateutils/package.py
index a6dff40a25..2da01bf79f 100644
--- a/var/spack/repos/builtin/packages/dateutils/package.py
+++ b/var/spack/repos/builtin/packages/dateutils/package.py
@@ -15,8 +15,11 @@ class Dateutils(AutotoolsPackage):
license("BSD-3-Clause")
+ version("0.4.11", sha256="b8fea0b09714bbadf202b9b3434cce6b59c282e7869268d0c08b85880fdbb446")
version("0.4.7", sha256="49725457f5bef45ea424baade8999a6e54496e357f64280474ff7134a54f599a")
version("0.4.6", sha256="26a071317ae5710f226a3e6ba9a54d3764cd9efe3965aecc18e75372088757cd")
version("0.4.5", sha256="16d6a0fe7b7d49ddbb303f33538dd7304a0d4af5a0369bcbf275db6a5060cbde")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/dav-sdk/package.py b/var/spack/repos/builtin/packages/dav-sdk/package.py
new file mode 100644
index 0000000000..cb247efb0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dav-sdk/package.py
@@ -0,0 +1,177 @@
+# Copyright 2013-2024 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.package import *
+
+
+# Wrapper around depends_on to propagate dependency variants
+def dav_sdk_depends_on(spec, when=None, propagate=None):
+ # Do the basic depends_on
+ depends_on(spec, when=when)
+
+ # Strip spec string to just the base spec name
+ # ie. A +c ~b -> A
+ spec = Spec(spec).name
+
+ # If the package is in the spec tree then it must be enabled in the SDK.
+ if "+" in when:
+ _when_variants = when.strip("+").split("+")
+ if any(tok in when for tok in ["~", "="]):
+ tty.error("Bad token in when clause, only positive boolean tokens allowed")
+
+ for variant in _when_variants:
+ conflicts("~" + variant, when="^" + spec)
+
+ # Skip if there is nothing to propagate
+ if not propagate:
+ return
+
+ # Map the propagated variants to the dependency variant. Some packages may need
+ # overrides to propagate a dependency as something else, e.g., {"visit": "libsim"}.
+ # Most call-sites will just use a list.
+ if not type(propagate) is dict:
+ propagate = dict([(v, v) for v in propagate])
+
+ # Determine the base variant
+ base_variant = ""
+ if when:
+ base_variant = when
+
+ def is_boolean(variant):
+ return "=" not in variant
+
+ # Propagate variants to dependecy
+ for v_when, v_then in propagate.items():
+ if is_boolean(v_when):
+ depends_on(
+ "{0} +{1}".format(spec, v_then), when="{0} +{1}".format(base_variant, v_when)
+ )
+ depends_on(
+ "{0} ~{1}".format(spec, v_then), when="{0} ~{1}".format(base_variant, v_when)
+ )
+ else:
+ depends_on("{0} {1}".format(spec, v_then), when="{0} {1}".format(base_variant, v_when))
+
+
+def exclude_variants(variants, exclude):
+ return [variant for variant in variants if variant not in exclude]
+
+
+class DavSdk(BundlePackage, CudaPackage, ROCmPackage):
+ """Data & Vis SDK
+
+ ** This package is a post-ECP port from the ECP Data & Vis SDK **
+ """
+
+ homepage = "https://dav-sdk.github.io/"
+
+ tags = ["peso", "oasis", "sdk"]
+ maintainers("kwryankrattiger", "vicentebolea")
+
+ version("1.0")
+
+ ############################################################
+ # Variants
+ ############################################################
+
+ # Data
+ variant("adios2", default=False, description="Enable ADIOS2")
+ variant("hdf5", default=False, description="Enable HDF5")
+ variant("pnetcdf", default=False, description="Enable PNetCDF")
+ variant("diy", default=False, description="Enable DIY")
+
+ # Vis
+ variant("ascent", default=False, description="Enable Ascent")
+ variant("paraview", default=False, description="Enable ParaView")
+ variant("visit", default=False, description="Enable VisIt")
+ variant("vtkm", default=False, description="Enable VTK-m")
+ variant("zfp", default=False, description="Enable ZFP")
+
+ # Language Options
+ variant("fortran", default=True, sticky=True, description="Enable fortran language features.")
+
+ ############################################################
+ # Dependencies
+ ############################################################
+ cuda_arch_variants = ["cuda_arch={0}".format(x) for x in CudaPackage.cuda_arch_values]
+ amdgpu_target_variants = ["amdgpu_target={0}".format(x) for x in ROCmPackage.amdgpu_targets]
+
+ dav_sdk_depends_on(
+ "adios2+shared+mpi+python+sst+dataman",
+ when="+adios2",
+ propagate=["cuda", "hdf5", "zfp", "fortran"] + cuda_arch_variants,
+ )
+
+ # HDF5 1.14 is a soft requirement for the ECP Data and Vis SDK.
+ # When building with VisIt and CinemaSci in the same SDK environment there is a conflict
+ # in the build dependency of py-setuptools which prevents building a py-h5py that is
+ # compatible with 'hdf5@1.14:'. Until there is a version of VisIt with an updated VTK or Spack
+ # allows the concretization of multiple versions of the same build only dependency
+ # concretization with VisIt and Cinema variants will not allow building VOLs.
+ dav_sdk_depends_on("hdf5@1.12: +shared+mpi", when="+hdf5", propagate=["fortran"])
+
+ # HDF5 VOL Adapters require hdf5@1.14:
+
+ # hdf5-vfd-gds needs cuda@11.7.1 or later, only enable when 11.7.1+ available.
+ depends_on("hdf5-vfd-gds@1.0.2:", when="+cuda+hdf5 ^cuda@11.7.1: ^hdf5@1.14:")
+ for cuda_arch in cuda_arch_variants:
+ depends_on(
+ "hdf5-vfd-gds@1.0.2: {0}".format(cuda_arch),
+ when="+cuda+hdf5 {0} ^cuda@11.7.1: ^hdf5@1.14:".format(cuda_arch),
+ )
+ conflicts("~cuda", when="^hdf5-vfd-gds@1.0.2:")
+ conflicts("~hdf5", when="^hdf5-vfd-gds@1.0.2:")
+ conflicts("~hdf5", when="^hdf5-vol-async")
+ conflicts("~hdf5", when="^hdf5-vol-cache")
+ conflicts("~hdf5", when="^hdf5-vol-log")
+ depends_on("hdf5-vol-async", when="+hdf5 ^hdf5@1.14:")
+ depends_on("hdf5-vol-cache", when="+hdf5 ^hdf5@1.14:")
+ depends_on("hdf5-vol-log", when="+hdf5 ^hdf5@1.14:")
+
+ dav_sdk_depends_on("parallel-netcdf+shared", when="+pnetcdf", propagate=["fortran"])
+
+ # Fortran support with ascent is problematic on some Cray platforms so the
+ # SDK is explicitly disabling it until the issues are resolved.
+ dav_sdk_depends_on(
+ "ascent+mpi~fortran+python+shared+vtkh+dray~test",
+ when="+ascent",
+ propagate=["adios2", "cuda"] + cuda_arch_variants,
+ )
+ depends_on("ascent+openmp", when="~rocm+ascent")
+ depends_on("ascent~openmp", when="+rocm+ascent")
+
+ # Need to explicitly turn off conduit hdf5_compat in order to build
+ # hdf5@1.12 which is required for SDK
+ depends_on("conduit ~hdf5_compat", when="+ascent +hdf5")
+ # Disable configuring with @develop. This should be removed after ascent
+ # releases 0.8 and ascent can build with conduit@0.8: and vtk-m@1.7:
+ conflicts("^ascent@develop", when="+ascent")
+
+ dav_sdk_depends_on("diy@3:", when="+diy")
+
+ # ParaView needs @5.11: in order to use CUDA/ROCM, therefore it is the minimum
+ # required version since GPU capability is desired for ECP
+ dav_sdk_depends_on(
+ "paraview@5.11:+mpi+openpmd+python+kits+shared+catalyst+libcatalyst" " use_vtkm=on",
+ when="+paraview",
+ propagate=["adios2", "cuda", "hdf5", "rocm"] + amdgpu_target_variants + cuda_arch_variants,
+ )
+ dav_sdk_depends_on("libcatalyst@2:+mpi", when="+paraview")
+ conflicts("^paraview@master", when="+paraview")
+
+ dav_sdk_depends_on("visit+mpi+python+silo", when="+visit", propagate=["hdf5", "adios2"])
+
+ dav_sdk_depends_on(
+ "vtk-m@1.7:+shared+mpi+rendering",
+ when="+vtkm",
+ propagate=["cuda", "rocm"] + cuda_arch_variants + amdgpu_target_variants,
+ )
+ # TODO: When Ascent is updated to use VTK-m >= 1.8 move examples to
+ # the main spec.
+ conflicts("^vtk-m~examples", when="+vtkm ^vtk-m@1.8:")
+ depends_on("vtk-m+openmp", when="~rocm+vtkm")
+ depends_on("vtk-m~openmp", when="+rocm+vtkm")
+
+ dav_sdk_depends_on("zfp", when="+zfp", propagate=["cuda"] + cuda_arch_variants)
diff --git a/var/spack/repos/builtin/packages/davix/package.py b/var/spack/repos/builtin/packages/davix/package.py
index 75dca8c251..c22c7c45ce 100644
--- a/var/spack/repos/builtin/packages/davix/package.py
+++ b/var/spack/repos/builtin/packages/davix/package.py
@@ -10,19 +10,45 @@ class Davix(CMakePackage):
"""High-performance file management over WebDAV/HTTP."""
homepage = "https://davix.web.cern.ch/davix/docs/devel/index.html"
- url = "https://github.com/cern-fts/davix/releases/download/R_0_8_1/davix-0.8.1.tar.gz"
+ url = "https://github.com/cern-fts/davix/releases/download/R_0_8_7/davix-0.8.7.tar.gz"
maintainers("gartung", "greenc-FNAL", "marcmengel", "vitodb")
license("LGPL-2.1-or-later")
- version("0.8.1", sha256="3f42f4eadaf560ab80984535ffa096d3e88287d631960b2193e84cf29a5fe3a6")
- version("0.8.0", sha256="2f108da0408a83fb5b9f0c68150d360ba733e4b3a0fe298d45b0d32d28ab7124")
+ version("0.8.7", sha256="78c24e14edd7e4e560392d67147ec8658c2aa0d3640415bdf6bc513afcf695e6")
+ version("0.8.6", sha256="7383b6f6595c77a9dc8c03c5483c67dc32bd6d23751e956cf9c174768e7eeb5b")
+ version("0.8.5", sha256="f9ce21bcc2ed248f7825059d17577876616258c35177d74fad8f854a818a87f9")
+ version("0.8.4", sha256="519d56f746e86ea3fd615bc49e559b520df07e051e1ca3d8c092067958f3b2b7")
+ version("0.8.3", sha256="7e30b5541e08d32dbf5ae03c6bcabeaec063aec10a6647787822227b4541ae3e")
+ version("0.8.2", sha256="8817a24c23f1309b9de233b9a882455f457c42edc2a649dc70fe2524cf76d94c")
+ version(
+ "0.8.1",
+ sha256="582e407a8192265f81d88870bfc99bf63effa1ba49913b4837aeafa4251134a6",
+ url="https://github.com/cern-fts/davix/releases/download/R_0_8_1-1/davix-0.8.1.tar.gz",
+ )
+ version(
+ "0.8.0",
+ sha256="215f6d5e5ac172164bf0fd18f2e536c610784960152736b8859215bf30bc539a",
+ url="https://github.com/cern-fts/davix/releases/download/R_0_8_0-1/davix-0.8.0.tar.gz",
+ )
version("0.7.6", sha256="a2e7fdff29f7ba247a3bcdb08ab1db6d6ed745de2d3971b46526986caf360673")
version("0.7.5", sha256="d920ca976846875d83af4dc50c99280bb3741fcf8351d5733453e70fa5fe6fc8")
- version("0.7.3", sha256="cd46276e72c6a0da1e2ad30eb66ec509a4c023687767c62a66713fa8c23d328a")
- version("0.6.9", sha256="fbd97eb5fdf82ca48770d06bf8e2805b35f23255478aa381a9d25a49eb98e348")
- version("0.6.8", sha256="e1820f4cc3fc44858ae97197a3922cce2a1130ff553b080ba19e06eb8383ddf7")
+ version(
+ "0.7.3",
+ sha256="cd46276e72c6a0da1e2ad30eb66ec509a4c023687767c62a66713fa8c23d328a",
+ deprecated=True,
+ )
+ version(
+ "0.6.9",
+ sha256="fbd97eb5fdf82ca48770d06bf8e2805b35f23255478aa381a9d25a49eb98e348",
+ deprecated=True,
+ )
+ version(
+ "0.6.8",
+ sha256="e1820f4cc3fc44858ae97197a3922cce2a1130ff553b080ba19e06eb8383ddf7",
+ deprecated=True,
+ )
variant(
"cxxstd",
@@ -36,6 +62,8 @@ class Davix(CMakePackage):
depends_on("libxml2")
depends_on("uuid")
depends_on("openssl")
+ depends_on("curl")
+ depends_on("rapidjson", when="@0.8.7:")
variant("thirdparty", default=False, description="Build vendored libraries")
depends_on("gsoap", when="+thirdparty")
@@ -46,6 +74,9 @@ class Davix(CMakePackage):
self.define_from_variant("ENABLE_THIRD_PARTY_COPY", variant="thirdparty"),
]
+ # Disable the use of embedded packages; use Spack to fetch them instead.
+ cmake_args.append("-DEMBEDDED_LIBCURL=OFF")
+
if "darwin" in self.spec.architecture:
cmake_args.append("-DCMAKE_MACOSX_RPATH=ON")
return cmake_args
diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py
index f8561aabc1..351ab179dd 100644
--- a/var/spack/repos/builtin/packages/dbcsr/package.py
+++ b/var/spack/repos/builtin/packages/dbcsr/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -19,6 +21,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
license("GPL-2.0-or-later")
version("develop", branch="develop")
+ version("2.7.0", sha256="25c367b49fb108c5230bcfb127f05fc16deff2bb467f437023dfa6045aff66f6")
version("2.6.0", sha256="c67b02ff9abc7c1f529af446a9f01f3ef9e5b0574f220259128da8d5ca7e9dc6")
version("2.5.0", sha256="91fda9b2502e5d0a2a6cdd5a73ef096253cc7e75bd01ba5189a4726ad86aef08")
version("2.4.1", sha256="b3d5ae62ca582b72707a2c932e8074a4f2f61d61085d97bd374213c70b8dbdcf")
@@ -28,6 +31,10 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
version("2.1.0", sha256="9e58fd998f224632f356e479d18b5032570d00d87b86736b6a6ac2d03f8d4b3c")
version("2.0.1", sha256="61d5531b661e1dab043353a1d67939ddcde3893d3dc7b0ab3d05074d448b485c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Compile with MPI")
variant("openmp", default=False, description="Build with OpenMP support")
variant("shared", default=True, description="Build shared library")
@@ -46,14 +53,21 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
" with cuda_arch=35 for a K20x instead of a K40"
),
)
+ variant("examples", default=True, description="Build examples")
variant("opencl", default=False, description="Enable OpenCL backend")
variant("mpi_f08", default=False, when="@2.6:", description="Use mpi F08 module")
+ variant("g2g", default=False, description="GPU-aware MPI with CUDA/HIP")
+ conflicts("+g2g", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm")
+
depends_on("blas")
depends_on("lapack")
depends_on("mpi", when="+mpi")
- depends_on("libxsmm@1.11:~header-only", when="smm=libxsmm")
+
+ with when("smm=libxsmm"):
+ depends_on("libxsmm~header-only")
+ depends_on("libxsmm@1.11:1")
depends_on("cmake@3.10:", type="build")
depends_on("cmake@3.12:", type="build", when="@2.1:")
@@ -69,11 +83,14 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
depends_on("opencl", when="+opencl")
+ # All examples require MPI
+ conflicts("+examples", when="~mpi", msg="Examples require MPI")
+
# We only support specific gpu archs for which we have parameter files
# for optimal kernels. Note that we don't override the parent class arch
# properties, since the parent class defines constraints for different archs
# Instead just mark all unsupported cuda archs as conflicting.
- dbcsr_cuda_archs = ("35", "37", "60", "70", "80")
+ dbcsr_cuda_archs = ("35", "37", "60", "70", "80", "90")
cuda_msg = "dbcsr only supports cuda_arch {0}".format(dbcsr_cuda_archs)
for arch in CudaPackage.cuda_arch_values:
@@ -82,8 +99,8 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+cuda", when="cuda_arch=none", msg=cuda_msg)
- dbcsr_amdgpu_targets = {"gfx906", "gfx910", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+"}
- amd_msg = "DBCSR only supports amdgpu_target {0}".format(dbcsr_amdgpu_targets)
+ dbcsr_amdgpu_targets = ("gfx906", "gfx910", "gfx90a", "gfx90a:xnack-", "gfx90a:xnack+")
+ amd_msg = f"DBCSR supports these AMD gpu targets: {', '.join(dbcsr_amdgpu_targets)}"
for arch in ROCmPackage.amdgpu_targets:
if arch not in dbcsr_amdgpu_targets:
@@ -106,11 +123,23 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
# to INTEGER(8)
conflicts("^mpich@4.1:", when="@:2.5")
conflicts("~mpi_f08", when="^mpich@4.1:")
- depends_on("mpich+fortran", when="^mpich")
+ depends_on("mpich+fortran", when="^[virtuals=mpi] mpich")
generator("ninja")
depends_on("ninja@1.10:", type="build")
+ @when("+rocm")
+ def patch(self):
+ for directory, subdirectory, files in os.walk(os.getcwd()):
+ for i in files:
+ file_path = os.path.join(directory, i)
+ filter_file("USE ISO_C_BINDING", "USE,INTRINSIC :: ISO_C_BINDING", file_path)
+ filter_file("USE ISO_FORTRAN_ENV", "USE,INTRINSIC :: ISO_FORTRAN_ENV", file_path)
+ filter_file("USE omp_lib", "USE,INTRINSIC :: omp_lib", file_path)
+ filter_file("USE OMP_LIB", "USE,INTRINSIC :: OMP_LIB", file_path)
+ filter_file("USE iso_c_binding", "USE,INTRINSIC :: iso_c_binding", file_path)
+ filter_file("USE iso_fortran_env", "USE,INTRINSIC :: iso_fortran_env", file_path)
+
def cmake_args(self):
spec = self.spec
@@ -131,16 +160,25 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
"-DLAPACK_FOUND=true",
"-DLAPACK_LIBRARIES=%s" % (spec["lapack"].libs.joined(";")),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("WITH_EXAMPLES", "examples"),
+ self.define_from_variant("WITH_G2G", "g2g"),
]
# Switch necessary as a result of a bug.
- if "@2.1:2.2" in spec:
+ if spec.satisfies("@2.1:2.2"):
args += ["-DBUILD_TESTING=ON"]
if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value[0]
- gpu_map = {"35": "K40", "37": "K80", "60": "P100", "70": "V100", "80": "A100"}
+ gpu_map = {
+ "35": "K40",
+ "37": "K80",
+ "60": "P100",
+ "70": "V100",
+ "80": "A100",
+ "90": "H100",
+ }
gpuver = gpu_map[cuda_arch]
if cuda_arch == "35" and self.spec.satisfies("+cuda_arch_35_k20x"):
diff --git a/var/spack/repos/builtin/packages/dbow2/package.py b/var/spack/repos/builtin/packages/dbow2/package.py
index 08af93657b..ab9bdaa0cb 100644
--- a/var/spack/repos/builtin/packages/dbow2/package.py
+++ b/var/spack/repos/builtin/packages/dbow2/package.py
@@ -18,6 +18,8 @@ class Dbow2(CMakePackage):
version("master", branch="master")
version("shinsumicco", git="https://github.com/shinsumicco/DBoW2.git", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0:", type="build")
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
diff --git a/var/spack/repos/builtin/packages/dbus-glib/package.py b/var/spack/repos/builtin/packages/dbus-glib/package.py
index cbee80b7ed..d9086972b8 100644
--- a/var/spack/repos/builtin/packages/dbus-glib/package.py
+++ b/var/spack/repos/builtin/packages/dbus-glib/package.py
@@ -18,6 +18,8 @@ class DbusGlib(AutotoolsPackage):
version("0.112", sha256="7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a")
version("0.110", sha256="7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("expat")
depends_on("glib")
diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py
index 1d7ec8fc8e..c200b357a7 100644
--- a/var/spack/repos/builtin/packages/dbus/package.py
+++ b/var/spack/repos/builtin/packages/dbus/package.py
@@ -3,10 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Dbus(AutotoolsPackage):
+class Dbus(AutotoolsPackage, MesonPackage):
"""D-Bus is a message bus system, a simple way for applications to
talk to one another. D-Bus supplies both a system daemon (for
events such new hardware device printer queue ) and a
@@ -17,10 +19,25 @@ class Dbus(AutotoolsPackage):
through the message bus daemon)."""
homepage = "https://dbus.freedesktop.org/"
- url = "https://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz"
+ url = "https://dbus.freedesktop.org/releases/dbus/dbus-1.14.10.tar.xz"
+ git = "https://gitlab.freedesktop.org/dbus/dbus"
- license("AFL-2.1 OR GPL-2.0-or-later")
+ license("AFL-2.1 OR GPL-2.0-or-later", checked_by="wdconinc")
+ build_system(
+ conditional("autotools", when="@:1.15.8"),
+ conditional("meson", when="@1.15:"),
+ default="meson",
+ )
+
+ # Note: odd minor versions are unstable, keep last stable version preferred
+ version("1.15.12", sha256="0589c9c707dd593e31f0709caefa5828e69c668c887a7c0d2e5ba445a86bae4d")
+ version("1.15.10", sha256="f700f2f1d0473f11e52f3f3e179f577f31b85419f9ae1972af8c3db0bcfde178")
+ version(
+ "1.14.10",
+ sha256="ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f",
+ preferred=True,
+ )
version("1.13.6", sha256="b533693232d36d608a09f70c15440c1816319bac3055433300d88019166c1ae4")
version("1.12.8", sha256="e2dc99e7338303393b6663a98320aba6a63421bcdaaf571c8022f815e5896eb3")
version("1.11.2", sha256="5abc4c57686fa82669ad0039830788f9b03fdc4fff487f0ccf6c9d56ba2645c9")
@@ -33,6 +50,8 @@ class Dbus(AutotoolsPackage):
variant("xml_docs", default=False, description="Build XML documentation")
variant("system-socket", default="default", description="Location for the DBus system socket")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build", when="platform=windows")
depends_on("pkgconfig", type="build")
depends_on("docbook-xml", type="build")
depends_on("docbook-xsl", type="build")
@@ -41,16 +60,32 @@ class Dbus(AutotoolsPackage):
depends_on("libsm")
depends_on("xmlto", when="+xml_docs", type="build")
+ def url_for_version(self, version):
+ ext = "gz" if version < Version("1.15") else "xz"
+ return f"https://dbus.freedesktop.org/releases/dbus/dbus-{version}.tar.{ext}"
+
+ @run_after("install")
+ def generate_uuid(self):
+ # dbus needs a machine id generated after install
+ dbus_uuidgen = Executable(self.prefix.bin.join("dbus-uuidgen"))
+ dbus_uuidgen("--ensure")
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
- args = ["--disable-systemd", "--disable-launchd"]
+ args = ["--disable-systemd", "--disable-launchd", "--disable-qt-help"]
args += self.enable_or_disable("xml-docs", variant="xml_docs")
socket = self.spec.variants["system-socket"].value
if socket != "default":
args += ["--with-system-socket={0}".format(socket)]
return args
- @run_after("install")
- def generate_uuid(self):
- # dbus needs a machine id generated after install
- dbus_uuidgen = Executable(self.prefix.bin.join("dbus-uuidgen"))
- dbus_uuidgen("--ensure")
+
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+ def meson_args(self):
+ args = ["-Dsystemd=disabled", "-Dlaunchd=disabled", "-Dqt_help=disabled"]
+ args += [f"-Dxml_docs={'enabled' if self.spec.satisfies('+xml_docs') else 'disabled'}"]
+ socket = self.spec.variants["system-socket"].value
+ if socket != "default":
+ args += [f"-Dsystem_socket={socket}"]
+ return args
diff --git a/var/spack/repos/builtin/packages/dbxtool/package.py b/var/spack/repos/builtin/packages/dbxtool/package.py
index 94e9cb8b4d..6d361a1e5d 100644
--- a/var/spack/repos/builtin/packages/dbxtool/package.py
+++ b/var/spack/repos/builtin/packages/dbxtool/package.py
@@ -17,6 +17,8 @@ class Dbxtool(MakefilePackage):
version("8", sha256="196d9475f7cf3aa52d8e0c29c20affb7c903512e13895edb6296caf02d4a983b")
version("7", sha256="486b8a7cf4e149ab9630783e5259d6af70a7022209e1e48fbee9b54c48535c5e")
+ depends_on("c", type="build") # generated
+
depends_on("efivar")
depends_on("popt")
diff --git a/var/spack/repos/builtin/packages/dcap/package.py b/var/spack/repos/builtin/packages/dcap/package.py
index 87c25a443d..735f74c01d 100644
--- a/var/spack/repos/builtin/packages/dcap/package.py
+++ b/var/spack/repos/builtin/packages/dcap/package.py
@@ -16,6 +16,8 @@ class Dcap(AutotoolsPackage):
version("2.47.12", sha256="050a8d20c241abf358d5d72586f9abc43940e61d9ec9480040ac7da52ec804ac")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/dcm2niix/package.py b/var/spack/repos/builtin/packages/dcm2niix/package.py
index 97bf5a422e..530a58678e 100644
--- a/var/spack/repos/builtin/packages/dcm2niix/package.py
+++ b/var/spack/repos/builtin/packages/dcm2niix/package.py
@@ -16,8 +16,14 @@ class Dcm2niix(CMakePackage):
license("Zlib")
version(
+ "1.0.20240202", sha256="ad8e4a5b97a682c32ef1d88283c15c7cb767c4092cb1754119f8e8b3d940fe91"
+ )
+ version(
"1.0.20220720", sha256="a095545d6d70c5ce2efd90dcd58aebe536f135410c12165a9f231532ddab8991"
)
version(
"1.0.20210317", sha256="42fb22458ebfe44036c3d6145dacc6c1dc577ebbb067bedc190ed06f546ee05a"
)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/dcmtk/package.py b/var/spack/repos/builtin/packages/dcmtk/package.py
index f6c14c642e..df554558da 100644
--- a/var/spack/repos/builtin/packages/dcmtk/package.py
+++ b/var/spack/repos/builtin/packages/dcmtk/package.py
@@ -13,8 +13,9 @@ class Dcmtk(CMakePackage):
homepage = "https://dicom.offis.de"
url = "https://github.com/DCMTK/dcmtk/archive/DCMTK-3.6.3.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("3.6.8", sha256="fca429a215739702fe8d96178964036246a35e2ea8adb12da33851e2be8e9a07")
version("3.6.7", sha256="17705dcdb2047d1266bb4e92dbf4aa6d4967819e8e3e94f39b7df697661b4860")
version("3.6.6", sha256="117097da6d50ddbad0e48bb1e6cdc61468e82ba1d32001dd8e2366b445133a8c")
version("3.6.5", sha256="37dad355d5513b4de4a86b5b7b0c3e9ec059860d88781b80916bba2a04e6d5b8")
@@ -22,6 +23,9 @@ class Dcmtk(CMakePackage):
version("3.6.3", sha256="57f4f71ee4af9114be6408ff6fcafc441c349e4c2954e17c9c22c8ce0fb065bf")
version("3.6.2", sha256="e9bf6e8805bbcf8a25274566541798785fd4e73bd046045ef27a0109ab520924")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("ssl", default=True, description="Suuport DICOM Security Enhancements one")
depends_on("openssl", type=("build", "link"), when="+ssl")
@@ -50,6 +54,8 @@ class Dcmtk(CMakePackage):
conflicts("platform=darwin target=aarch64:", when="@:3.6.6")
+ patch("tiff-3.6.7.patch", when="@3.6.7:3.6.8")
+
def patch(self):
# Backport 3.6.4
if self.spec.satisfies("@:3.6.3 %fj"):
diff --git a/var/spack/repos/builtin/packages/dcmtk/tiff-3.6.7.patch b/var/spack/repos/builtin/packages/dcmtk/tiff-3.6.7.patch
new file mode 100644
index 0000000000..53df4e75eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dcmtk/tiff-3.6.7.patch
@@ -0,0 +1,12 @@
+diff --color=auto --color=never -Naur a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake
+--- a/CMake/3rdparty.cmake 2022-04-28 15:47:25
++++ b/CMake/3rdparty.cmake 2024-07-12 15:04:19
+@@ -38,7 +38,7 @@
+ message(STATUS "Info: DCMTK TIFF support will be enabled")
+ include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
+ endif()
+- set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY})
++ set(LIBTIFF_LIBS ${TIFF_LIBRARIES} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARIES})
+ endif()
+ endif()
+
diff --git a/var/spack/repos/builtin/packages/dctz/package.py b/var/spack/repos/builtin/packages/dctz/package.py
new file mode 100755
index 0000000000..df77705d62
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dctz/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Dctz(CMakePackage):
+ """DCTZ is a compressor based on FFTs"""
+
+ homepage = "https://github.com/swson/DCTZ"
+ url = "https://github.com/robertu94/DCTZ/archive/refs/tags/0.2.2.tar.gz"
+ git = "https://github.com/robertu94/DCTZ"
+
+ maintainers("robertu94")
+
+ license("MIT", checked_by="robertu94")
+
+ version("0.2.2", sha256="5d270199b93e81704292ad87787ce961b458865c6a60ef7da59d5073513f6cff")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("shared", description="build a shared library", default=True)
+ variant("libpressio", description="use libpressio support", default=True)
+
+ depends_on("pkgconfig", type="build")
+ depends_on("zlib")
+ depends_on("fftw@3:")
+ depends_on("libpressio@0.0.99:", when="+libpressio")
+ depends_on("libstdcompat@0.0.21:", when="+libpressio")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("DCTZ_HAVE_LIBPRESSIO", "libpressio"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py
index 0f6965fdb9..aadaa4651d 100644
--- a/var/spack/repos/builtin/packages/dd4hep/package.py
+++ b/var/spack/repos/builtin/packages/dd4hep/package.py
@@ -26,6 +26,10 @@ class Dd4hep(CMakePackage):
license("LGPL-3.0-or-later")
version("master", branch="master")
+ version("1.30", sha256="02de46151e945eff58cffd84b4b86d35051f4436608199c3efb4d2e1183889fe")
+ version("1.29", sha256="435d25a7ef093d8bf660f288b5a89b98556b4c1c293c55b93bf641fb4cba77e9")
+ version("1.28", sha256="b28d671eda0154073873a044a384486e66f1f200065deca99537aa84f07328ad")
+ version("1.27.2", sha256="09d8acd743d010274562b856d39e2a88aeaf89cf287a4148f52223b0cd960ab2")
version("1.27.1", sha256="e66ae726c0a9a55e5603024a7f8a48ffbc5613ea36e5f892e9a90d87833f92e0")
version("1.27", sha256="51fbd0f91f2511261d9b01e4b3528c658bea1ea1b5d67b25b6812615e782a902")
version("1.26", sha256="de2cc8d8e99217e23fdf0a55b879d3fd3a864690d6660e7808f1ff99eb47f384")
@@ -42,76 +46,11 @@ class Dd4hep(CMakePackage):
version("1.18", sha256="1e909a42b969dfd966224fa8ab1eca5aa05136baf3c00a140f2f6d812b497152")
version("1.17", sha256="036a9908aaf1e13eaf5f2f43b6f5f4a8bdda8183ddc5befa77a4448dbb485826")
version("1.16.1", sha256="c8b1312aa88283986f89cc008d317b3476027fd146fdb586f9f1fbbb47763f1a")
- # versions older than 1.16.1 are no longer supported
- # (they need several patches like https://github.com/AIDASoft/DD4hep/pull/796)
- version(
- "1.16",
- sha256="ea9755cd255cf1b058e0e3cd743101ca9ca5ff79f4c60be89f9ba72b1ae5ec69",
- deprecated=True,
- )
- version(
- "1.15",
- sha256="992a24bd4b3dfaffecec9d1c09e8cde2c7f89d38756879a47b23208242f4e352",
- deprecated=True,
- )
- version(
- "1.14.1",
- sha256="5b5742f1e23c2b36d3174cca95f810ce909c0eb66f3d6d7acb0ba657819e6717",
- deprecated=True,
- )
- version(
- "1.14",
- sha256="b603aa3c0db8dda392253aa71fa4a0f0c3c9715d47df0b895d45c1e8849f4895",
- deprecated=True,
- )
- version(
- "1.13.1",
- sha256="83fa70cd74ce93b2f52f098388dff58d179f05ace5b50aea3f408bb8abf7cb73",
- deprecated=True,
- )
- version(
- "1.13",
- sha256="0b1f9d902ebe21a9178c1e41204c066b29f68c8836fd1d03a9ce979811ddb295",
- deprecated=True,
- )
- version(
- "1.12.1",
- sha256="85e8c775ec03c499ce10911e228342e757c81ce9ef2a9195cb253b85175a2e93",
- deprecated=True,
- )
- # these version won't build with +ddcad as the subpackage doesn't exit yet
- version(
- "1.12",
- sha256="133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398",
- deprecated=True,
- )
- version(
- "1.11.2",
- sha256="96a53dd26cb8df11c6dae54669fbc9cc3c90dd47c67e07b24be9a1341c95abc4",
- deprecated=True,
- )
- version(
- "1.11.1",
- sha256="d7902dd7f6744bbda92f6e303ad5a3410eec4a0d2195cdc86f6c1167e72893f0",
- deprecated=True,
- )
- version(
- "1.11",
- sha256="25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6",
- deprecated=True,
- )
- version(
- "1.10",
- sha256="1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95",
- deprecated=True,
- )
+
+ depends_on("cxx", type="build") # generated
generator("ninja")
- # Workarounds for various TBB issues in DD4hep v1.11
- # See https://github.com/AIDASoft/DD4hep/pull/613 .
- patch("tbb-workarounds.patch", when="@1.11")
- patch("tbb2.patch", when="@1.12.1")
# Workaround for failing build file generation in some cases
# See https://github.com/spack/spack/issues/24232
patch("cmake_language.patch", when="@:1.17")
@@ -159,10 +98,13 @@ class Dd4hep(CMakePackage):
depends_on("boost +iostreams", when="+ddg4")
depends_on("boost +system +filesystem", when="%gcc@:7")
depends_on("root @6.08: +gdml +math +python")
+ depends_on("root @6.12.2: +root7", when="@1.26:") # DDCoreGraphics needs ROOT::ROOTHistDraw
with when("+ddeve"):
depends_on("root @6.08: +x +opengl")
- depends_on("root +webgui", when="^root@6.28:")
depends_on("root @:6.27", when="@:1.23")
+ conflicts("^root ~webgui", when="^root@6.28:")
+ # For DD4hep >= 1.24, DDEve_Interface needs ROOT::ROOTGeomViewer only if ROOT >= 6.27
+ requires("^root +root7 +webgui", when="@1.24: ^root @6.27:")
depends_on("root @6.08: +gdml +math +python +x +opengl", when="+utilityapps")
extends("python")
@@ -182,12 +124,13 @@ class Dd4hep(CMakePackage):
depends_on("podio@:0.16.03", when="@:1.23 +edm4hep")
depends_on("podio@0.16:", when="@1.24: +edm4hep")
depends_on("podio@0.16.3:", when="@1.26: +edm4hep")
+ depends_on("podio@:0", when="@:1.29 +edm4hep")
depends_on("py-pytest", type=("build", "test"))
# See https://github.com/AIDASoft/DD4hep/pull/771 and https://github.com/AIDASoft/DD4hep/pull/876
conflicts(
"^cmake@3.16:3.17.2",
- when="@1.15:1.18",
+ when="@:1.18",
msg="cmake version with buggy FindPython breaks dd4hep cmake config",
)
conflicts("~ddrec+dddetectors", msg="Need to enable +ddrec to build +dddetectors.")
@@ -198,6 +141,9 @@ class Dd4hep(CMakePackage):
# See https://github.com/AIDASoft/DD4hep/pull/1191
conflicts("^geant4 cxxstd=11", when="+ddg4")
+ # See https://github.com/AIDASoft/DD4hep/issues/1210
+ conflicts("^root@6.31.1:", when="@:1.27")
+
@property
def libs(self):
# We need to override libs here, because we don't build a libdd4hep so
@@ -232,7 +178,6 @@ class Dd4hep(CMakePackage):
"-DBUILD_TESTING={0}".format(self.run_tests),
"-DBOOST_ROOT={0}".format(spec["boost"].prefix),
"-DBoost_NO_BOOST_CMAKE=ON",
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path),
]
subpackages = []
if spec.satisfies("+ddg4"):
diff --git a/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch b/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch
deleted file mode 100644
index 6592329774..0000000000
--- a/var/spack/repos/builtin/packages/dd4hep/tbb-workarounds.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt
-index e6fb1096..88eb5c92 100644
---- a/DDDigi/CMakeLists.txt
-+++ b/DDDigi/CMakeLists.txt
-@@ -34,12 +34,10 @@ target_include_directories(DDDigi
-
- FIND_PACKAGE(TBB QUIET)
- if(TBB_FOUND)
-- dd4hep_print( "|++> TBB_INCLUDE_DIR --> ${TBB_INCLUDE_DIR}")
-- dd4hep_print( "|++> TBB_LIBRARY --> ${TBB_LIBRARY}")
-+ dd4hep_print( "|++> TBB_IMPORTED_TARGETS --> ${TBB_IMPORTED_TARGETS}")
- dd4hep_print( "|++> TBB found. DDDigi will run multi threaded.")
- target_compile_definitions(DDDigi PUBLIC DD4HEP_USE_TBB)
-- target_link_libraries(DDDigi ${TBB_LIBRARY})
-- target_include_directories(DDDigi ${TBB_INCLUDE_DIRS})
-+ target_link_libraries(DDDigi PUBLIC ${TBB_IMPORTED_TARGETS})
- else()
- dd4hep_print( "|++> TBB not found. DDDigi will only work single threaded.")
- endif()
-diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
-index d62c6694..f2c2e86c 100644
---- a/DDDigi/src/DigiKernel.cpp
-+++ b/DDDigi/src/DigiKernel.cpp
-@@ -91,7 +91,7 @@ public:
- DigiEventAction* action = 0;
- Wrapper(DigiContext& c, DigiEventAction* a)
- : context(c), action(a) {}
-- Wrapper(Wrapper&& copy) = delete;
-+ Wrapper(Wrapper&& copy) = default;
- Wrapper(const Wrapper& copy) = default;
- Wrapper& operator=(Wrapper&& copy) = delete;
- Wrapper& operator=(const Wrapper& copy) = delete;
-@@ -111,7 +111,7 @@ class DigiKernel::Processor {
- DigiKernel& kernel;
- public:
- Processor(DigiKernel& k) : kernel(k) {}
-- Processor(Processor&& l) = delete;
-+ Processor(Processor&& l) = default;
- Processor(const Processor& l) = default;
- void operator()() const {
- int todo = 1;
diff --git a/var/spack/repos/builtin/packages/dd4hep/tbb2.patch b/var/spack/repos/builtin/packages/dd4hep/tbb2.patch
deleted file mode 100644
index 932458001c..0000000000
--- a/var/spack/repos/builtin/packages/dd4hep/tbb2.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
-index f2c2e86c..f168ef9b 100644
---- a/DDDigi/src/DigiKernel.cpp
-+++ b/DDDigi/src/DigiKernel.cpp
-@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors<DigiEventAction>& actions, Digi
- if ( parallel ) {
- tbb::task_group que;
- for ( auto* i : actions )
-- que.run(Wrapper(context, *i));
-+ que.run(Wrapper(context, i));
- que.wait();
- goto print_stamp;
- }
-
diff --git a/var/spack/repos/builtin/packages/ddt/package.py b/var/spack/repos/builtin/packages/ddt/package.py
index 11dd8fb2c9..2988892c2a 100644
--- a/var/spack/repos/builtin/packages/ddt/package.py
+++ b/var/spack/repos/builtin/packages/ddt/package.py
@@ -14,15 +14,40 @@ class Ddt(Package):
behavior to achieve lightning-fast performance at all scales."""
homepage = "https://arm.com"
- url = "http://content.allinea.com/downloads/arm-forge-22.0.2-linux-x86_64.tar"
+ url = "https://downloads.linaroforge.com/22.1.3/linaro-forge-22.1.3-linux-x86_64.tar"
+ list_url = "https://www.linaroforge.com/download-documentation"
maintainers("robgics")
license_required = True
license_files = ["./licences/ddt.lic"]
- # Versions before 22.0 have a security vulnerability. Do not install them.
- version("22.0.2", sha256="3db0c3993d1db617f850c48d25c9239f06a018c895ea305786a7ad836a44496d")
+ with default_args(deprecated=True):
+ # All versions are deprecated; the package linaro-forge is preferred
+ version(
+ "24.0.3", sha256="1796559fb86220d5e17777215d3820f4b04aba271782276b81601d5065284526"
+ )
+ version(
+ "23.1.2", sha256="675d2d8e4510afefa0405eecb46ac8bf440ff35a5a40d5507dc12d29678a22bf"
+ )
+ version(
+ "23.0.4", sha256="41a81840a273ea9a232efb4f031149867c5eff7a6381d787e18195f1171caac4"
+ )
+ version(
+ "22.1.3", sha256="4f8a8b1df6ad712e89c82eedf4bd85b93b57b3c8d5b37d13480ff058fa8f4467"
+ )
+ version(
+ "22.0.2", sha256="3db0c3993d1db617f850c48d25c9239f06a018c895ea305786a7ad836a44496d"
+ )
+ # Versions before 22.0 have a security vulnerability. Do not install them.
+
+ def url_for_version(self, version):
+ if version <= Version("22.1.3"):
+ return (
+ f"https://downloads.linaroforge.com/{version}/arm-forge-{version}-linux-x86_64.tar"
+ )
+ else:
+ return f"https://downloads.linaroforge.com/{version}/linaro-forge-{version}-linux-x86_64.tar"
def setup_run_environment(self, env):
env.prepend_path("PATH", join_path(self.prefix, "bin"))
diff --git a/var/spack/repos/builtin/packages/dealii-parameter-gui/package.py b/var/spack/repos/builtin/packages/dealii-parameter-gui/package.py
index fd5ebcf4e0..7e3b90521b 100644
--- a/var/spack/repos/builtin/packages/dealii-parameter-gui/package.py
+++ b/var/spack/repos/builtin/packages/dealii-parameter-gui/package.py
@@ -17,6 +17,8 @@ class DealiiParameterGui(CMakePackage):
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt")
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index ee181553a3..e9ed50ac7a 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -28,6 +28,8 @@ class Dealii(CMakePackage, CudaPackage):
generator("make")
version("master", branch="master")
+ version("9.6.0", sha256="675323f0eb8eed2cfc93e2ced07a0ec5727c6a566ff9e7786c01a2ddcde17bed")
+ version("9.5.2", sha256="7930e5218a9807d60cc05c300a3b70f36f4af22c3551a2cd1141fbab013bbaf1")
version("9.5.1", sha256="a818b535e6488d3aef7853311657c7b4fadc29a9abe91b7b202b131aad630f5e")
version("9.5.0", sha256="a81f41565f0d3a22d491ee687957dd48053225da72e8d6d628d210358f4a0464")
version("9.4.2", sha256="45a76cb400bfcff25cc2d9093d9a5c91545c8367985e6798811c5e9d2a6a6fd4")
@@ -51,6 +53,10 @@ class Dealii(CMakePackage, CudaPackage):
version("8.2.1", sha256="d75674e45fe63cd9fa294460fe45228904d51a68f744dbb99cd7b60720f3b2a0")
version("8.1.0", sha256="d666bbda2a17b41b80221d7029468246f2658051b8c00d9c5907cd6434c4df99")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Configuration variants
variant(
"build_type",
@@ -74,7 +80,10 @@ class Dealii(CMakePackage, CudaPackage):
values=("default", "11", "14", "17"),
)
variant("doc", default=False, description="Compile with documentation")
- variant("examples", default=True, description="Compile and install tutorial programs")
+ variant("examples", default=True, description="Install source files of tutorial programs")
+ variant(
+ "examples_compile", default=True, description="Install binary files of tutorial programs"
+ )
variant("int64", default=False, description="Compile with 64 bit indices support")
variant("mpi", default=True, description="Compile with MPI")
variant("optflags", default=False, description="Compile using additional optimization flags")
@@ -87,6 +96,9 @@ class Dealii(CMakePackage, CudaPackage):
variant("arpack", default=True, description="Compile with Arpack and PArpack (only with MPI)")
variant("adol-c", default=True, description="Compile with ADOL-C")
variant("cgal", default=True, when="@9.4:~cuda", description="Compile with CGAL")
+ variant(
+ "complex", default=False, when="@9.1.0:", description="Compile with complex value support"
+ )
variant("ginkgo", default=True, description="Compile with Ginkgo")
variant("gmsh", default=True, description="Compile with GMSH")
variant("gsl", default=True, description="Compile with GSL")
@@ -96,7 +108,8 @@ class Dealii(CMakePackage, CudaPackage):
variant("muparser", default=True, description="Compile with muParser")
variant("nanoflann", default=False, description="Compile with Nanoflann")
variant("netcdf", default=False, description="Compile with Netcdf (only with MPI)")
- variant("oce", default=True, description="Compile with OCE")
+ variant("oce", default=False, description="Compile with OCE")
+ variant("opencascade", default=True, description="Compile with OPENCASCADE")
variant("p4est", default=True, description="Compile with P4est (only with MPI)")
variant("petsc", default=True, description="Compile with Petsc (only with MPI)")
variant("scalapack", default=True, description="Compile with ScaLAPACK (only with MPI)")
@@ -128,7 +141,7 @@ class Dealii(CMakePackage, CudaPackage):
# dealii does not build with Boost 1.80.0
# (https://github.com/spack/spack/pull/32879#issuecomment-1265933265)
depends_on(
- "boost@1.59.0:1.63,1.65.1,1.67.0:1.79+thread+system+serialization+iostreams",
+ "boost@1.59.0:1.63,1.65.1,1.67.0:1.79,1.83:+thread+system+serialization+iostreams",
patches=[
patch("boost_1.65.1_singleton.patch", level=1, when="@1.65.1"),
patch("boost_1.68.0.patch", level=1, when="@1.68.0"),
@@ -176,18 +189,25 @@ class Dealii(CMakePackage, CudaPackage):
depends_on("arborx+trilinos", when="@9.3:+arborx+trilinos")
depends_on("arpack-ng+mpi", when="+arpack+mpi")
depends_on("assimp", when="@9.0:+assimp")
- depends_on("cgal", when="@9.4:+cgal")
+ # cgal 6 not yet supported: https://github.com/spack/spack/pull/47285#issuecomment-2455403447
+ depends_on("cgal@:5", when="@9.4:+cgal")
+ depends_on("cgal@5", when="@9.5:+cgal")
depends_on("doxygen+graphviz", when="+doc")
depends_on("graphviz", when="+doc")
depends_on("ginkgo", when="@9.1:+ginkgo")
depends_on("ginkgo@1.4.0:", when="@9.4:+ginkgo")
- depends_on("gmsh+tetgen+netgen+oce", when="@9.0:+gmsh", type=("build", "run"))
+ depends_on("gmsh+oce", when="@9.0:+gmsh+oce", type=("build", "run"))
+ depends_on("gmsh+opencascade", when="@9.0:+gmsh+opencascade", type=("build", "run"))
+ depends_on("gmsh", when="@9.0:+gmsh~opencascade~oce", type=("build", "run"))
depends_on("gsl", when="@8.5.0:+gsl")
# TODO: next line fixes concretization with petsc
depends_on("hdf5+mpi+hl+fortran", when="+hdf5+mpi+petsc")
depends_on("hdf5+mpi+hl", when="+hdf5+mpi~petsc")
depends_on("kokkos@3.7:", when="@9.5:+kokkos~trilinos")
- depends_on("kokkos@3.7:+cuda+cuda_lambda+wrapper", when="@9.5:+kokkos~trilinos+cuda")
+ depends_on("kokkos@3.7:+cuda+cuda_lambda+wrapper", when="@9.5:9.5.99+kokkos~trilinos+cuda")
+ depends_on(
+ "kokkos@3.7:+cuda+cuda_lambda+cuda_constexpr+wrapper", when="@9.6:+kokkos~trilinos+cuda"
+ )
# TODO: concretizer bug. The two lines mimic what comes from PETSc
# but we should not need it
depends_on("metis@5:+int64", when="+metis+int64")
@@ -198,6 +218,7 @@ class Dealii(CMakePackage, CudaPackage):
depends_on("netcdf-c+mpi", when="+netcdf+mpi")
depends_on("netcdf-cxx", when="+netcdf+mpi")
depends_on("oce", when="+oce")
+ depends_on("opencascade", when="+opencascade")
depends_on("p4est", when="+p4est+mpi")
depends_on("petsc+mpi~int64", when="+petsc+mpi~int64")
depends_on("petsc+mpi+int64", when="+petsc+mpi+int64")
@@ -206,9 +227,10 @@ class Dealii(CMakePackage, CudaPackage):
depends_on("slepc~arpack", when="+slepc+petsc+mpi+int64")
depends_on("sundials@:3~pthread", when="@9.0:9.2+sundials")
depends_on("sundials@5:5.8", when="@9.3:9.3.3+sundials")
- depends_on("sundials@5:", when="@9.3.4:+sundials")
+ depends_on("sundials@5:6.7", when="@9.3.4:+sundials")
depends_on("taskflow@3.4:", when="@9.6:+taskflow")
depends_on("trilinos gotype=int", when="+trilinos@12.18.1:")
+ depends_on("trilinos+cuda+cuda_constexpr", when="@9.6:+trilinos+cuda")
# TODO: next line fixes concretization with trilinos and adol-c
depends_on("trilinos~exodus", when="@9.0:+adol-c+trilinos")
# Both Trilinos and SymEngine bundle the Teuchos RCP library.
@@ -289,6 +311,9 @@ class Dealii(CMakePackage, CudaPackage):
when="@:9.4 +ginkgo ^ginkgo@1.5.0:",
)
+ # deal.II's own CUDA backend does not support CUDA version 12.0 or newer.
+ conflicts("+cuda ^cuda@12:")
+
# Check for sufficiently modern versions
conflicts("cxxstd=11", when="@9.3:")
@@ -310,6 +335,8 @@ class Dealii(CMakePackage, CudaPackage):
msg="Deal.II 9.6 onwards requires the C++ standard to be set to 17 or later.",
)
+ conflicts("oce", when="+opencascade", msg="Only one among OCE or OPENCASCADE can be selected.")
+
# Interfaces added in 8.5.0:
for _package in ["gsl", "python"]:
conflicts(
@@ -350,16 +377,6 @@ class Dealii(CMakePackage, CudaPackage):
"via ~{0}".format(_package),
)
- # interfaces added after 9.5.0:
- for _package in ["vtk", "taskflow"]:
- conflicts(
- "+{0}".format(_package),
- when="@:9.5",
- msg="The interface to {0} is supported from version 9.6.0 "
- "onwards. Please explicitly disable this variant "
- "via ~{0}".format(_package),
- )
-
# Interfaces removed in 9.3.0:
conflicts(
"+nanoflann",
@@ -467,7 +484,7 @@ class Dealii(CMakePackage, CudaPackage):
# Examples / tutorial programs
options.append(self.define_from_variant("DEAL_II_COMPONENT_EXAMPLES", "examples"))
- options.append(self.define_from_variant("DEAL_II_COMPILE_EXAMPLES", "examples"))
+ options.append(self.define_from_variant("DEAL_II_COMPILE_EXAMPLES", "examples_compile"))
# Enforce the specified C++ standard
if spec.variants["cxxstd"].value != "default":
@@ -496,7 +513,7 @@ class Dealii(CMakePackage, CudaPackage):
# CUDA
options.append(self.define_from_variant("DEAL_II_WITH_CUDA", "cuda"))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
if not spec.satisfies("^cuda@9:"):
options.append("-DDEAL_II_WITH_CXX14=OFF")
cuda_arch = spec.variants["cuda_arch"].value
@@ -511,7 +528,7 @@ class Dealii(CMakePackage, CudaPackage):
# MPI
options.append(self.define_from_variant("DEAL_II_WITH_MPI", "mpi"))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.extend(
[
self.define("MPI_C_COMPILER", spec["mpi"].mpicc),
@@ -521,9 +538,9 @@ class Dealii(CMakePackage, CudaPackage):
)
# FIXME: Fix issues with undefined references in MPI. e.g,
# libmpi.so: undefined reference to `opal_memchecker_base_isaddressable'
- if "^openmpi" in spec:
+ if spec.satisfies("^openmpi"):
options.extend([self.define("MPI_CXX_LINK_FLAGS", "-lopen-pal")])
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
options.extend(
[
self.define(
@@ -533,23 +550,15 @@ class Dealii(CMakePackage, CudaPackage):
]
)
# Make sure we use the same compiler that Trilinos uses
- if "+trilinos" in spec:
+ if spec.satisfies("+trilinos"):
options.extend([self.define("CMAKE_CXX_COMPILER", spec["trilinos"].kokkos_cxx)])
+ # Complex support
+ options.append(self.define_from_variant("DEAL_II_WITH_COMPLEX_VALUES", "complex"))
+
# Python bindings
if spec.satisfies("@8.5.0:"):
options.append(self.define_from_variant("DEAL_II_COMPONENT_PYTHON_BINDINGS", "python"))
- if "+python" in spec:
- python_exe = spec["python"].command.path
- python_library = spec["python"].libs[0]
- python_include = spec["python"].headers.directories[0]
- options.extend(
- [
- self.define("PYTHON_EXECUTABLE", python_exe),
- self.define("PYTHON_INCLUDE_DIR", python_include),
- self.define("PYTHON_LIBRARY", python_library),
- ]
- )
# Simplex support (no longer experimental)
if spec.satisfies("@9.3.0:9.4.0"):
@@ -560,7 +569,7 @@ class Dealii(CMakePackage, CudaPackage):
options.append(self.define_from_variant("DEAL_II_WITH_TBB", "threads"))
else:
options.append(self.define_from_variant("DEAL_II_WITH_THREADS", "threads"))
- if "+threads" in spec:
+ if spec.satisfies("+threads"):
if spec.satisfies("^intel-parallel-studio+tbb"):
# deal.II/cmake will have hard time picking up TBB from Intel.
tbb_ver = ".".join(("%s" % spec["tbb"].version).split(".")[1:])
@@ -608,12 +617,12 @@ class Dealii(CMakePackage, CudaPackage):
# Optional dependencies that do not fit the above pattern:
# ADOL-C
options.append(self.define_from_variant("DEAL_II_WITH_ADOLC", "adol-c"))
- if "+adol-c" in spec:
+ if spec.satisfies("+adol-c"):
options.append(self.define("ADOLC_DIR", spec["adol-c"].prefix))
# ARPACK
options.append(self.define_from_variant("DEAL_II_WITH_ARPACK", "arpack"))
- if "+arpack" in spec and "+mpi" in spec:
+ if spec.satisfies("+arpack") and spec.satisfies("+mpi"):
options.extend(
[
self.define("ARPACK_DIR", spec["arpack-ng"].prefix),
@@ -623,7 +632,7 @@ class Dealii(CMakePackage, CudaPackage):
# NetCDF
# since Netcdf is spread among two, need to do it by hand:
- if "+netcdf" in spec and "+mpi" in spec:
+ if spec.satisfies("+netcdf") and spec.satisfies("+mpi"):
netcdf_libs = spec["netcdf-cxx"].libs + spec["netcdf-c"].libs
options.extend(
[
@@ -642,7 +651,7 @@ class Dealii(CMakePackage, CudaPackage):
# ScaLAPACK
options.append(self.define_from_variant("DEAL_II_WITH_SCALAPACK", "scalapack"))
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
scalapack_libs = spec["scalapack"].libs
options.extend(
[
@@ -655,11 +664,16 @@ class Dealii(CMakePackage, CudaPackage):
]
)
- # Open Cascade
- options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "oce"))
+ # Open Cascade -- OCE
if "+oce" in spec:
+ options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "oce"))
options.append(self.define("OPENCASCADE_DIR", spec["oce"].prefix))
+ # Open Cascade -- OpenCascade
+ if "+opencascade" in spec:
+ options.append(self.define_from_variant("DEAL_II_WITH_OPENCASCADE", "opencascade"))
+ options.append(self.define("OPENCASCADE_DIR", spec["opencascade"].prefix))
+
# As a final step, collect CXX flags that may have been
# added anywhere above:
if len(cxx_flags_release) > 0 and "+optflags" in spec:
@@ -673,7 +687,7 @@ class Dealii(CMakePackage, CudaPackage):
options.append(self.define("DEAL_II_CXX_FLAGS", os.environ["SPACK_TARGET_ARGS"]))
# platform introspection - needs to be disabled in some environments
- if "+platform-introspection" in spec:
+ if spec.satisfies("+platform-introspection"):
options.append(self.define("DEAL_II_ALLOW_PLATFORM_INTROSPECTION", True))
else:
options.append(self.define("DEAL_II_ALLOW_PLATFORM_INTROSPECTION", False))
@@ -685,5 +699,5 @@ class Dealii(CMakePackage, CudaPackage):
def setup_build_environment(self, env):
spec = self.spec
- if "+cuda" in spec and "+mpi" in spec:
+ if spec.satisfies("+cuda") and spec.satisfies("+mpi"):
env.set("CUDAHOSTCXX", spec["mpi"].mpicxx)
diff --git a/var/spack/repos/builtin/packages/debugedit/package.py b/var/spack/repos/builtin/packages/debugedit/package.py
index 1c258d9fce..5bfa199736 100644
--- a/var/spack/repos/builtin/packages/debugedit/package.py
+++ b/var/spack/repos/builtin/packages/debugedit/package.py
@@ -23,6 +23,8 @@ class Debugedit(AutotoolsPackage):
version("develop", branch="main")
version("0.2", sha256="b78258240bb7ec5bbff109495092dcc111aa0393f135f2d2a4b43887ba26a942")
+ depends_on("c", type="build") # generated
+
depends_on("help2man", type="build")
depends_on("pkgconfig", type="build")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/decentralized-internet/package.py b/var/spack/repos/builtin/packages/decentralized-internet/package.py
index 63eace559f..395a992967 100644
--- a/var/spack/repos/builtin/packages/decentralized-internet/package.py
+++ b/var/spack/repos/builtin/packages/decentralized-internet/package.py
@@ -16,3 +16,5 @@ class DecentralizedInternet(MakefilePackage):
maintainers("Lonero-Team", "Mentors4edu")
version("4.2.3", sha256="2922b9128b411ece2f04d07942a453f1e772548aa27b3936c9f9bcfbc0737058")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/deconseq-standalone/package.py b/var/spack/repos/builtin/packages/deconseq-standalone/package.py
index 47314ef952..c015f1b316 100644
--- a/var/spack/repos/builtin/packages/deconseq-standalone/package.py
+++ b/var/spack/repos/builtin/packages/deconseq-standalone/package.py
@@ -10,13 +10,15 @@ class DeconseqStandalone(Package):
"""The DeconSeq tool can be used to automatically detect and efficiently
remove sequence contaminations from genomic and metagenomic datasets."""
- homepage = "http://deconseq.sourceforge.net"
+ homepage = "https://deconseq.sourceforge.net"
url = "https://sourceforge.net/projects/deconseq/files/standalone/deconseq-standalone-0.4.3.tar.gz"
license("GPL-3.0-only")
version("0.4.3", sha256="fb4050418c26a5203220f6396263da554326657590cffd65053eb8adc465ac65")
+ depends_on("c", type="build") # generated
+
depends_on("perl@5:")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/dedisp/package.py b/var/spack/repos/builtin/packages/dedisp/package.py
new file mode 100644
index 0000000000..7634ba306c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dedisp/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Dedisp(MakefilePackage, CudaPackage):
+ """GPU-based dedispersion package."""
+
+ homepage = "https://github.com/ajameson/dedisp"
+ git = "https://github.com/ajameson/dedisp.git"
+
+ maintainers("aweaver1fandm")
+
+ version("master", branch="master", preferred=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ conflicts("~cuda", msg="You must specify +cuda")
+ conflicts("cuda@11.8")
+ conflicts("cuda_arch=none", msg="You must specify the CUDA architecture")
+
+ depends_on("cuda", type="build")
+
+ def edit(self, spec, prefix):
+ # Build process required some edits to Makefile.inc instead of using command-line flags
+ makefile = FileFilter("Makefile.inc")
+
+ makefile.filter(r"^\s*CUDA_PATH\s*\?=.*", "CUDA_PATH ?= " + spec["cuda"].prefix)
+ makefile.filter(
+ r"^\s*GPU_ARCH\s*\?=.*", "GPU_ARCH ?= sm_" + spec.variants["cuda_arch"].value[0]
+ )
+ makefile.filter(r"^\s*INSTALL_DIR\s*\?=.*", "INSTALL_DIR ?= " + prefix)
+
+ @run_before("install")
+ def preinstall(self):
+ # The $PREFIX/dedisp/include and $PREFIX/dedisp/lib directories don't seem
+ # to be created automatically by the software's Makefile so manually create them
+ libdir = join_path(self.prefix, "lib")
+ incdir = join_path(self.prefix, "include")
+ mkdirp(libdir)
+ mkdirp(incdir)
diff --git a/var/spack/repos/builtin/packages/dejagnu/package.py b/var/spack/repos/builtin/packages/dejagnu/package.py
index 94d808fd36..5f9baa0fb2 100644
--- a/var/spack/repos/builtin/packages/dejagnu/package.py
+++ b/var/spack/repos/builtin/packages/dejagnu/package.py
@@ -19,6 +19,9 @@ class Dejagnu(AutotoolsPackage, GNUMirrorPackage):
version("1.6", sha256="00b64a618e2b6b581b16eb9131ee80f721baa2669fa0cdee93c500d1a652d763")
version("1.4.4", sha256="d0fbedef20fb0843318d60551023631176b27ceb1e11de7468a971770d0e048d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("expect", type=("run", "link", "build"))
# DejaGnu 1.4.4 cannot be built in parallel
diff --git a/var/spack/repos/builtin/packages/delly2/package.py b/var/spack/repos/builtin/packages/delly2/package.py
index 2b86dabc5d..11112be094 100644
--- a/var/spack/repos/builtin/packages/delly2/package.py
+++ b/var/spack/repos/builtin/packages/delly2/package.py
@@ -19,10 +19,14 @@ class Delly2(MakefilePackage):
license("BSD-3-Clause")
+ version("1.2.6", sha256="1a71fcc5f2a55649c2104086f3f7163ed58c5868eaf040a25e45c777b0e1abb7")
+ version("1.1.8", sha256="f72a1143dc71449fc277fc8b3e337a4d35b2fe736f3693a14b1986efa8da4889")
version("1.1.6", sha256="08961e9c81431eb486476fa71eea94941ad24ec1970b71e5a7720623a39bfd2a")
version("0.9.1", tag="v0.9.1", commit="ef1cd626a85cfd1c1b7acfca2b5fd5957f2a05f1")
version("2017-08-03", commit="e32a9cd55c7e3df5a6ae4a91f31a0deb354529fc", deprecated=True)
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=False, description="Build with openmp support")
depends_on("htslib", type=("build", "link"))
@@ -39,7 +43,7 @@ class Delly2(MakefilePackage):
depends_on("bcftools", type="run")
def edit(self, spec, prefix):
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
env["PARALLEL"] = "1"
# Only want to build delly source, not submodules. Build fails
# using provided submodules, succeeds with existing spack recipes.
diff --git a/var/spack/repos/builtin/packages/delphes/package.py b/var/spack/repos/builtin/packages/delphes/package.py
index 40e790d61f..a35a678405 100644
--- a/var/spack/repos/builtin/packages/delphes/package.py
+++ b/var/spack/repos/builtin/packages/delphes/package.py
@@ -43,25 +43,18 @@ class Delphes(CMakePackage):
version("3.0.6", sha256="9e225731d57d2a76d35886841f8eff121bb3a45560b16077bd8c351151581d88")
version("3.0.5", sha256="ab64ec6d2476fbfa40562e7edb510a8ab4c4fe5be77a4353ebf315c2af181a80")
- variant("pythia8", default=True, description="build with pythia8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
- variant(
- "cxxstd",
- default="17",
- values=("14", "17"),
- multi=False,
- description="Use the specified C++ standard when building.",
- )
+ variant("pythia8", default=True, description="build with pythia8")
depends_on("cmake", type="build")
- depends_on("root cxxstd=14", when="cxxstd=14")
- depends_on("root cxxstd=17", when="cxxstd=17")
+ depends_on("root")
depends_on("pythia8", when="+pythia8")
def cmake_args(self):
args = []
- # C++ Standard
- args.append("-DCMAKE_CXX_STANDARD=%s" % self.spec.variants["cxxstd"].value)
+ args.append(f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}")
return args
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/demuxlet/package.py b/var/spack/repos/builtin/packages/demuxlet/package.py
index d0724e204e..6c98a2ca01 100644
--- a/var/spack/repos/builtin/packages/demuxlet/package.py
+++ b/var/spack/repos/builtin/packages/demuxlet/package.py
@@ -19,6 +19,8 @@ class Demuxlet(AutotoolsPackage):
version("20210211", commit="f5044eb9ed5c6678aa3a80a8f2be7db7748ee732")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/denovogear/package.py b/var/spack/repos/builtin/packages/denovogear/package.py
index b679b51cb0..e378af69a4 100644
--- a/var/spack/repos/builtin/packages/denovogear/package.py
+++ b/var/spack/repos/builtin/packages/denovogear/package.py
@@ -20,6 +20,9 @@ class Denovogear(CMakePackage):
version("1.1.1", sha256="799fe99193e9cf12320893cf020a3251022f60a49de8677a1c5a18c578fe4be2")
version("1.1.0", sha256="f818f80cd67183294c8aae312cad8311e6a9abede1f687567bb079d29f79c005")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type=("build"))
depends_on(
"boost@1.47:1.60"
diff --git a/var/spack/repos/builtin/packages/detray/package.py b/var/spack/repos/builtin/packages/detray/package.py
new file mode 100644
index 0000000000..310772e79f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/detray/package.py
@@ -0,0 +1,113 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Detray(CMakePackage):
+ """Detray is a description library for high energy physics experiments that
+ works entirely without polymorphism, making it exceptionally suitable for
+ use on GPU platforms."""
+
+ homepage = "https://github.com/acts-project/detray"
+ url = "https://github.com/acts-project/detray/archive/refs/tags/v0.67.0.tar.gz"
+
+ tags = ["hep"]
+
+ maintainers("stephenswat")
+
+ license("MPL-2.0", checked_by="stephenswat")
+
+ version("0.83.0", sha256="c870a0459d1f9284750f6afbb97c759392e636b56d107f32b9bc891df717a0fe")
+ version("0.82.0", sha256="48794d37496dd5013b755d5d401da7b9d1023fadff86b2a454e5c21e2aaf8c60")
+ version("0.81.0", sha256="821313a7e3ea90fcf5c92153d28bba1f85844e03d7c6b6b98d0b3407adb86357")
+ version("0.80.0", sha256="a12f3e333778ddd20a568b5c8df5b2375f9a4d74caf921822c1864b07b3f8ab7")
+ version("0.79.0", sha256="3b9f18cb003e59795a0e4b1414069ac8558b975714626449293a71bc4398a380")
+ version("0.78.0", sha256="ca3a348f4e12ed690c3106197e107b9c393b6902224b2543b00382050864bcf3")
+ version("0.77.0", sha256="c2c72f65a7ff2426335b850c0b3cfbbbf666208612b2458c97a534ecf8029cb8")
+ version("0.76.1", sha256="54d9abee395e9faf0f56b5d9c137a9990f23712fbcc88fd90af20643bcae635e")
+ version("0.76.0", sha256="affa0e28ca96d168e377ba33642e0b626aacdc79f9436233f5561006018f9b9e")
+ version("0.75.3", sha256="1249d7398d1e534bd36b6f5a7d06a5e67adf6adeb8bca188d7e35490a675de7a")
+ version("0.75.2", sha256="249066c138eac4114032e8d558f3a05885140a809332a347c7667978dbff54ee")
+ version("0.74.2", sha256="9fd14cf1ec30477d33c530670e9fed86b07db083912fe51dac64bf2453b321e8")
+ version("0.73.0", sha256="f574016bc7515a34a675b577e93316e18cf753f1ab7581dcf1c8271a28cb7406")
+ version("0.72.1", sha256="6cc8d34bc0d801338e9ab142c4a9884d19d9c02555dbb56972fab86b98d0f75b")
+ version("0.71.0", sha256="2be2b3dac6f77aa8cea033eba841378dc3703ff93c99e4d05ea03df685e6d508")
+ version("0.70.0", sha256="14fa1d478d44d5d987caea6f4b365bce870aa8e140c21b802c527afa3a5db869")
+ version("0.69.1", sha256="7100ec86a47458a35f5943cd6c7da07c68b8c1c2f62d36d13b8bb50568d0abe5")
+ version("0.68.0", sha256="6d57835f22ced9243fbcc29b84ea4c01878a46bfa5910e320c933e9bf8e96612")
+ version("0.67.0", sha256="87b1b29f333c955ea6160f9dda89628490d85a9e5186c2f35f57b322bbe27e18")
+
+ variant("csv", default=True, description="Enable the CSV IO plugin")
+ _cxxstd_values = (
+ conditional("17", when="@:0.72.1"),
+ conditional("20", when="@0.67.0:"),
+ conditional("23", when="@0.67.0:"),
+ )
+ _cxxstd_common = {
+ "values": _cxxstd_values,
+ "multi": False,
+ "description": "C++ standard used.",
+ }
+ variant("cxxstd", default="17", when="@:0.72.1", **_cxxstd_common)
+ variant("cxxstd", default="20", when="@0.73.0:", **_cxxstd_common)
+ variant("json", default=True, description="Enable the JSON IO plugin")
+ variant(
+ "scalar",
+ default="float",
+ values=("float", "double"),
+ multi=False,
+ description="Scalar type to use by default",
+ )
+ variant("eigen", default=True, description="Enable the Eigen math plugin")
+ variant("smatrix", default=False, description="Enable the SMatrix math plugin")
+ variant("vc", default=True, description="Enable the Vc math plugin")
+
+ depends_on("cmake@3.11:", type="build")
+ depends_on("vecmem@1.6.0:")
+ depends_on("vecmem@1.8.0:", when="@0.76:")
+ depends_on("covfie@0.10.0:")
+ depends_on("nlohmann-json@3.11.0:", when="+json")
+ depends_on("dfelibs@20211029:")
+ depends_on("acts-algebra-plugins@0.18.0: +vecmem")
+ depends_on("acts-algebra-plugins +vc", when="+vc")
+ depends_on("acts-algebra-plugins +eigen", when="+eigen")
+ depends_on("acts-algebra-plugins +smatrix", when="+smatrix")
+
+ # Detray imposes requirements on the C++ standard values used by Algebra
+ # Plugins.
+ with when("+smatrix"):
+ for _cxxstd in _cxxstd_values:
+ for _v in _cxxstd:
+ depends_on(
+ f"acts-algebra-plugins cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when}"
+ )
+
+ depends_on("actsvg +meta")
+
+ def cmake_args(self):
+ args = [
+ self.define("DETRAY_USE_SYSTEM_LIBS", True),
+ self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
+ self.define_from_variant("CMAKE_CUDA_STANDARD", "cxxstd"),
+ self.define_from_variant("CMAKE_SYCL_STANDARD", "cxxstd"),
+ self.define_from_variant("DETRAY_CUSTOM_SCALARTYPE", "scalar"),
+ self.define_from_variant("DETRAY_EIGEN_PLUGIN", "eigen"),
+ self.define_from_variant("DETRAY_SMATRIX_PLUGIN", "smatrix"),
+ self.define_from_variant("DETRAY_IO_CSV", "csv"),
+ self.define_from_variant("DETRAY_IO_JSON", "json"),
+ self.define_from_variant("DETRAY_VC_PLUGIN", "vc"),
+ self.define_from_variant("DETRAY_VC_AOS_PLUGIN", "vc"),
+ self.define_from_variant("DETRAY_VC_SOA_PLUGIN", "vc"),
+ self.define("DETRAY_SVG_DISPLAY", True),
+ self.define("DETRAY_SETUP_ACTSVG", True),
+ self.define("DETRAY_BUILD_TESTING", False),
+ self.define("DETRAY_SETUP_GOOGLETEST", False),
+ self.define("DETRAY_SETUP_BENCHMARK", False),
+ self.define("DETRAY_BUILD_TUTORIALS", False),
+ self.define("DETRAY_BUILD_TEST_UTILS", True),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/dfelibs/package.py b/var/spack/repos/builtin/packages/dfelibs/package.py
new file mode 100644
index 0000000000..c2ec7d65ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dfelibs/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Dfelibs(CMakePackage):
+ """Acts fork of dfelibs, a header-only utility library for C++."""
+
+ homepage = "https://github.com/acts-project/dfelibs"
+ url = "https://github.com/acts-project/dfelibs/archive/refs/tags/v20211029.tar.gz"
+
+ maintainers("stephenswat", "wdconinc")
+
+ license("MIT", checked_by="stephenswat")
+
+ version("20231012", sha256="7127069858c2e3ce663e66f45e3f7e02ede8bbca23d90f6c89f43f5b05c44dcb")
+ version("20211029", sha256="65b8d536b06b550e38822905dea06d193beb703fe0e4442791f43dc087c5cbfb")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.8:", type="build")
+ depends_on("boost@1.59:", type="test")
+
+ def cmake_args(self):
+ args = [
+ self.define("dfelibs_BUILD_EXAMPLES", False),
+ self.define("dfelibs_BUILD_UNITTESTS", self.run_tests),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/dftbplus/package.py b/var/spack/repos/builtin/packages/dftbplus/package.py
index d5d1b8232e..f8041291c2 100644
--- a/var/spack/repos/builtin/packages/dftbplus/package.py
+++ b/var/spack/repos/builtin/packages/dftbplus/package.py
@@ -15,8 +15,8 @@ class Dftbplus(CMakePackage, MakefilePackage):
url = "https://github.com/dftbplus/dftbplus/releases/download/22.1/dftbplus-22.1.tar.xz"
git = "https://github.com/dftbplus/dftbplus.git"
- maintainers = ["HaoZeke", "aradi", "iamashwin99"]
- generator = "Ninja"
+ maintainers("HaoZeke", "aradi", "iamashwin99")
+ generator("ninja")
build_system(
conditional("cmake", when="@20.1:"),
@@ -27,6 +27,9 @@ class Dftbplus(CMakePackage, MakefilePackage):
license("CC-BY-SA-4.0")
version("main", branch="main")
+ version("24.1", sha256="3bc405d1ab834b6b145ca671fb44565ec50a6f576e9e18e7a1ae2c613a311321")
+ version("23.1", sha256="e2d0471c2fd3aaf174a9aac44fd8e7de2668d182201779626d6e62754adc4cf9")
+ version("22.2", sha256="0140f5f2e24d3071e5e7aede2ed6216a6f46d55216b0d69da17af917c62e98ed")
version("22.1", sha256="02daca6f4c6372656598f3ba0311110c8e473c87c8d934d7bb276feaa4cc1c82")
version("21.2", sha256="fbeb0e0ea93ab4dc4450f298ec712d2cf991f19f621badf57dae05f0e43b5906")
version("21.1", sha256="8c1eb8a38f72c421e2ae20118a6db3a656fa84e8b180ef387e549a73ae77f970")
@@ -39,6 +42,10 @@ class Dftbplus(CMakePackage, MakefilePackage):
sha256="78f45ef0571c78cf732a5493d32830455a832fa05ebcad43098895e46ad8d220",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"api",
default=True,
@@ -175,12 +182,12 @@ class Dftbplus(CMakePackage, MakefilePackage):
mconfig.filter("INSTALLDIR := .*", "INSTALLDIR := {0}".format(prefix))
- if "+gpu" in self.spec:
+ if self.spec.satisfies("+gpu"):
march.filter("MAGMADIR = .*", "MAGMADIR = {0}".format(spec["magma"].prefix))
mconfig.filter("WITH_GPU := .*", "WITH_GPU := 1")
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
march.filter(
"SCALAPACKDIR = .*", "SCALAPACKDIR = {0}".format(spec["scalapack"].prefix)
)
@@ -193,7 +200,7 @@ class Dftbplus(CMakePackage, MakefilePackage):
mconfig.filter("WITH_MPI := .*", "WITH_MPI := 1")
- if "+elsi" in self.spec:
+ if self.spec.satisfies("+elsi"):
mconfig.filter("WITH_ELSI := .*", "WITH_ELSI := 1")
has_pexsi = "+enable_pexsi" in spec["elsi"]
@@ -214,20 +221,20 @@ class Dftbplus(CMakePackage, MakefilePackage):
"LIB_LAPACK += -l.*", "LIB_LAPACK += {0}".format(spec["blas"].libs.ld_flags)
)
- if "+sockets" in self.spec:
+ if self.spec.satisfies("+sockets"):
mconfig.filter("WITH_SOCKETS := .*", "WITH_SOCKETS := 1")
- if "+transport" in self.spec:
+ if self.spec.satisfies("+transport"):
mconfig.filter("WITH_TRANSPORT := .*", "WITH_TRANSPORT := 1")
- if "+arpack" in self.spec:
+ if self.spec.satisfies("+arpack"):
march.filter(
"ARPACK_LIBS = .*", "ARPACK_LIBS = {0}".format(spec["arpack-ng"].libs.ld_flags)
)
mconfig.filter("WITH_ARPACK := .*", "WITH_ARPACK := 1")
- if "+dftd3" in self.spec:
+ if self.spec.satisfies("+dftd3"):
march.filter("COMPILE_DFTD3 = .*", "COMPILE_DFTD3 = 0")
march.filter(
"DFTD3_INCS = .*", "DFTD3_INCS = -I{0}".format(spec["dftd3-lib"].prefix.include)
@@ -265,7 +272,7 @@ class Dftbplus(CMakePackage, MakefilePackage):
# (e.g. -DSCALAPACK_LIBRARY)
# and plural form is ignored.
# We set both inorder to be compatible with all versions.
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
# we use scalapack for linear algebra
args.extend(
[
@@ -291,7 +298,7 @@ class Dftbplus(CMakePackage, MakefilePackage):
self.define("BLAS_LIBRARY", blas_libs),
]
)
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args.append(self.define("BUILD_SHARED_LIBS", True))
if self.run_tests:
args.append("-DWITH_UNIT_TESTS=ON")
diff --git a/var/spack/repos/builtin/packages/dftd3-lib/package.py b/var/spack/repos/builtin/packages/dftd3-lib/package.py
index ff42d16ab8..b28c050980 100644
--- a/var/spack/repos/builtin/packages/dftd3-lib/package.py
+++ b/var/spack/repos/builtin/packages/dftd3-lib/package.py
@@ -13,8 +13,11 @@ class Dftd3Lib(MakefilePackage):
homepage = "https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/dft-d3"
url = "https://github.com/dftbplus/dftd3-lib/archive/0.9.2.tar.gz"
+ version("0.10", sha256="db61bc6c7c699628e8c5bf2018ea38de03a53eac38014e06845829d765caf6bb")
version("0.9.2", sha256="4178f3cf2f3e7e982a7084ec66bac92b4fdf164537d9fc0ada840a11b784f0e0")
+ depends_on("fortran", type="build") # generated
+
# This fixes a concurrency bug, where make would try to start compiling
# the dftd3 target before the lib target ended.
# Since the library is small, disabling causes not much harm
diff --git a/var/spack/repos/builtin/packages/dftd4/package.py b/var/spack/repos/builtin/packages/dftd4/package.py
index 8c2d5c6288..a55cc34d4e 100644
--- a/var/spack/repos/builtin/packages/dftd4/package.py
+++ b/var/spack/repos/builtin/packages/dftd4/package.py
@@ -25,6 +25,9 @@ class Dftd4(MesonPackage):
version("3.1.0", sha256="b652aa7cbf8d087c91bcf80f2d5801459ecf89c5d4176ebb39e963ee740ed54b")
version("3.0.0", sha256="a7539d68d48d851bf37b79e37ea907c9da5eee908d0aa58a0a7dc15f04f8bc35")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP parallelisation")
variant("python", default=False, description="Build Python extension module")
diff --git a/var/spack/repos/builtin/packages/dftfe/package.py b/var/spack/repos/builtin/packages/dftfe/package.py
index a4423d6819..7e6973257e 100644
--- a/var/spack/repos/builtin/packages/dftfe/package.py
+++ b/var/spack/repos/builtin/packages/dftfe/package.py
@@ -20,6 +20,8 @@ class Dftfe(CMakePackage):
version("0.5.1", sha256="e47272d3783cf675dcd8bc31da07765695164110bfebbbab29f5815531f148c1")
version("0.5.0", sha256="9aadb9a9b059f98f88c7756b417423dc67d02f1cdd2ed7472ba395fcfafc6dcb")
+ depends_on("cxx", type="build") # generated
+
variant(
"scalapack",
default=True,
diff --git a/var/spack/repos/builtin/packages/dhtest/package.py b/var/spack/repos/builtin/packages/dhtest/package.py
index e673ef2d4d..60d4264498 100644
--- a/var/spack/repos/builtin/packages/dhtest/package.py
+++ b/var/spack/repos/builtin/packages/dhtest/package.py
@@ -19,6 +19,8 @@ class Dhtest(MakefilePackage):
version("1.5", sha256="df66150429a59a3b6cea9b29e2687707d04ab10db5dfe1c893ba3e0b0531b151")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("dhtest", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py
index 9fe94c8452..258d5773f3 100644
--- a/var/spack/repos/builtin/packages/dia/package.py
+++ b/var/spack/repos/builtin/packages/dia/package.py
@@ -16,6 +16,9 @@ class Dia(Package):
version("0.97.3", sha256="22914e48ef48f894bb5143c5efc3d01ab96e0a0cde80de11058d3b4301377d34")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("intltool", type="build")
depends_on("gettext", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/dialign/package.py b/var/spack/repos/builtin/packages/dialign/package.py
index 7617794128..a7c86efb8e 100644
--- a/var/spack/repos/builtin/packages/dialign/package.py
+++ b/var/spack/repos/builtin/packages/dialign/package.py
@@ -17,6 +17,8 @@ class Dialign(MakefilePackage):
version("2.2.1", sha256="046361bb4ca6e4ab2ac5e634cfcd673f964a887006c09c1b8bd3310fac86f519")
+ depends_on("c", type="build") # generated
+
build_directory = "src"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/diamond/package.py b/var/spack/repos/builtin/packages/diamond/package.py
index c0ea26edd5..1ce6bcae9d 100644
--- a/var/spack/repos/builtin/packages/diamond/package.py
+++ b/var/spack/repos/builtin/packages/diamond/package.py
@@ -16,6 +16,9 @@ class Diamond(CMakePackage):
license("GPL-3.0-only")
+ version("2.1.10", sha256="c6ede5df30d9d496af314e740964c35a0e358458d9c8d9b8dd517d69828d9981")
+ version("2.1.9", sha256="4cde9df78c63e8aef9df1e3265cd06a93ce1b047d6dba513a1437719b70e9d88")
+ version("2.1.8", sha256="b6088259f2bc92d1f9dc4add44590cff68321bcbf91eefbc295a3525118b9415")
version("2.1.7", sha256="2dcaba0e79ecb02c3d2a6816d317e714767118a9a056721643abff4c586ca95b")
version("2.1.6", sha256="852d27c7535d53f1ce59db0625ff23ac3bf17e57f7a3b1c46c08718f77e19c54")
version("2.0.15", sha256="cc8e1f3fd357d286cf6585b21321bd25af69aae16ae1a8f605ea603c1886ffa4")
@@ -34,10 +37,41 @@ class Diamond(CMakePackage):
version("0.8.38", sha256="582a7932f3aa73b0eac2275dd773818665f0b067b32a79ff5a13b0e3ca375f60")
version("0.8.26", sha256="00d2be32dad76511a767ab8e917962c0ecc572bc808080be60dec028df45439f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("blas", when="+eigen")
+ depends_on("blast-plus", when="+blast")
+ depends_on("eigen", when="+eigen")
+ depends_on("lapack", when="+eigen")
depends_on("zlib-api")
+ depends_on("zstd", when="+zstd")
+
+ variant("zstd", default=False, description="Bulid with zstd support", when="@2.1.0:")
+ variant("blast", default=True, description="Build with blast db support", when="@2.1.0:")
+ variant("eigen", default=False, description="Build with Eigen support", when="@2.1.0:")
+
+ requires("+zstd", when="+blast", msg="blast support requires zstd")
conflicts("target=aarch64:", when="@:0.9.25")
# fix error [-Wc++11-narrowing]
# Ref: https://github.com/bbuchfink/diamond/commit/155e076d662b0e9268e2b00bef6d33d90aede7ff
patch("fix_narrowing_error.patch", when="@:0.9.25")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("WITH_ZSTD", "zstd"),
+ self.define_from_variant("EIGEN_BLAS", "eigen"),
+ ]
+ if self.spec.satisfies("+blast"):
+ args.extend(
+ [
+ self.define(
+ "BLAST_INCLUDE_DIR",
+ join_path(self.spec["blast-plus"].prefix.include, "ncbi-tools++"),
+ ),
+ self.define("BLAST_LIBRARY_DIR", self.spec["blast-plus"].prefix.lib),
+ ]
+ )
+ return args
diff --git a/var/spack/repos/builtin/packages/dicom3tools/package.py b/var/spack/repos/builtin/packages/dicom3tools/package.py
index b49547f0b7..d5c2f315a4 100644
--- a/var/spack/repos/builtin/packages/dicom3tools/package.py
+++ b/var/spack/repos/builtin/packages/dicom3tools/package.py
@@ -20,6 +20,8 @@ class Dicom3tools(MakefilePackage):
sha256="3cc2d6056e349e0ac6a093d231d8f4dd7a77e26ed29c1ebaca945dd5e56c1520",
)
+ depends_on("cxx", type="build") # generated
+
variant(
"uid_root",
default="0.0.0.0",
diff --git a/var/spack/repos/builtin/packages/diffmark/package.py b/var/spack/repos/builtin/packages/diffmark/package.py
index 73f405bf96..5d61f9551f 100644
--- a/var/spack/repos/builtin/packages/diffmark/package.py
+++ b/var/spack/repos/builtin/packages/diffmark/package.py
@@ -16,6 +16,8 @@ class Diffmark(AutotoolsPackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/diffsplice/package.py b/var/spack/repos/builtin/packages/diffsplice/package.py
index 128663a989..5246249d7b 100644
--- a/var/spack/repos/builtin/packages/diffsplice/package.py
+++ b/var/spack/repos/builtin/packages/diffsplice/package.py
@@ -19,6 +19,8 @@ class Diffsplice(MakefilePackage):
version("0.1.2beta", sha256="cc06dcb9f8d98b2184f0dd5863b79bdd6a8cd33b9418e6549b7ea63e90ee1aa6")
version("0.1.1", sha256="9740426692b0e5f92b943b127014c1d9815bed2938b5dd9e9d0c5b64abbb5da6")
+ depends_on("cxx", type="build") # generated
+
def edit(self, spec, prefix):
if spec.target.family == "aarch64":
makefile = FileFilter(join_path(self.build_directory, "Makefile"))
diff --git a/var/spack/repos/builtin/packages/diffutils/package.py b/var/spack/repos/builtin/packages/diffutils/package.py
index df14150116..18468f662f 100644
--- a/var/spack/repos/builtin/packages/diffutils/package.py
+++ b/var/spack/repos/builtin/packages/diffutils/package.py
@@ -21,11 +21,14 @@ class Diffutils(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("3.10", sha256="90e5e93cc724e4ebe12ede80df1634063c7a855692685919bfe60b556c9bd09e")
version("3.9", sha256="d80d3be90a201868de83d78dad3413ad88160cc53bcc36eb9eaf7c20dbf023f1")
version("3.8", sha256="a6bdd7d1b31266d11c4f4de6c1b748d4607ab0231af5188fc2533d0ae2438fec")
version("3.7", sha256="b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26")
version("3.6", sha256="d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
patch("nvhpc.patch", when="@3.7 %nvhpc")
diff --git a/var/spack/repos/builtin/packages/digitrounding/package.py b/var/spack/repos/builtin/packages/digitrounding/package.py
index 3697955ff6..a9c7ae6cfe 100644
--- a/var/spack/repos/builtin/packages/digitrounding/package.py
+++ b/var/spack/repos/builtin/packages/digitrounding/package.py
@@ -19,13 +19,15 @@ class Digitrounding(CMakePackage):
version("master", branch="master")
version("2020-02-27", commit="7b18679aded7a85e6f221f7f5cd4f080f322bc33")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
variant("shared", default=True, description="build shared libraries")
def cmake_args(self):
args = []
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
else:
args.append("-DBUILD_SHARED_LIBS=OFF")
diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py
index ea48ff48fe..3ab48b7c39 100644
--- a/var/spack/repos/builtin/packages/dihydrogen/package.py
+++ b/var/spack/repos/builtin/packages/dihydrogen/package.py
@@ -12,7 +12,7 @@ from spack.package import *
def get_blas_entries(inspec):
entries = []
spec = inspec["hydrogen"]
- if "blas=openblas" in spec:
+ if spec.satisfies("blas=openblas"):
entries.append(cmake_cache_option("DiHydrogen_USE_OpenBLAS", True))
elif "blas=mkl" in spec or spec.satisfies("^intel-mkl"):
entries.append(cmake_cache_option("DiHydrogen_USE_MKL", True))
@@ -33,7 +33,7 @@ def get_blas_entries(inspec):
% ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names),
)
)
- elif "blas=accelerate" in spec:
+ elif spec.satisfies("blas=accelerate"):
entries.append(cmake_cache_option("DiHydrogen_USE_ACCELERATE", True))
elif spec.satisfies("^netlib-lapack"):
entries.append(cmake_cache_string("BLA_VENDOR", "Generic"))
@@ -61,6 +61,8 @@ class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
version("0.3.0", sha256="8dd143441a28e0c7662cd92694e9a4894b61fd48508ac1d77435f342bc226dcf")
+ depends_on("cxx", type="build") # generated
+
# Primary features
variant("dace", default=False, sticky=True, description="Enable DaCe backend.")
@@ -257,13 +259,6 @@ class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17"))
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
entries.append(cmake_cache_option("CMAKE_EXPORT_COMPILE_COMMANDS", True))
-
- # It's possible this should have a `if "platform=cray" in
- # spec:` in front of it, but it's not clear to me when this is
- # set. In particular, I don't actually see this blurb showing
- # up on Tioga builds. Which is causing the obvious problem
- # (namely, the one this was added to supposedly solve in the
- # first place.
entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True))
if spec.satisfies("%clang +distconv platform=darwin"):
@@ -337,18 +332,18 @@ class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
# all this, but this shouldn't hurt to have.
entries.append(cmake_cache_path("spdlog_ROOT", spec["spdlog"].prefix))
- if "+developer" in spec:
+ if spec.satisfies("+developer"):
entries.append(cmake_cache_path("Catch2_ROOT", spec["catch2"].prefix))
- if "+coverage" in spec:
+ if spec.satisfies("+coverage"):
entries.append(cmake_cache_path("lcov_ROOT", spec["lcov"].prefix))
entries.append(cmake_cache_path("genhtml_ROOT", spec["lcov"].prefix))
- if "+ci" in spec:
+ if spec.satisfies("+ci"):
entries.append(cmake_cache_path("gcovr_ROOT", spec["py-gcovr"].prefix))
- if "+distconv" in spec:
+ if spec.satisfies("+distconv"):
entries.append(cmake_cache_path("Aluminum_ROOT", spec["aluminum"].prefix))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
entries.append(cmake_cache_path("cuDNN_ROOT", spec["cudnn"].prefix))
# Currently this is a hack for all Hydrogen versions. WIP to
diff --git a/var/spack/repos/builtin/packages/dimemas/package.py b/var/spack/repos/builtin/packages/dimemas/package.py
index 8c5751fbc5..2c41548e82 100644
--- a/var/spack/repos/builtin/packages/dimemas/package.py
+++ b/var/spack/repos/builtin/packages/dimemas/package.py
@@ -16,6 +16,9 @@ class Dimemas(AutotoolsPackage):
version("5.4.1", sha256="10ddca3745a56ebab5c1ba180f6f4bce5832c4deac50c1b1dc08271db5c7cafa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ding-libs/package.py b/var/spack/repos/builtin/packages/ding-libs/package.py
index f8714e2f01..c7c322279e 100644
--- a/var/spack/repos/builtin/packages/ding-libs/package.py
+++ b/var/spack/repos/builtin/packages/ding-libs/package.py
@@ -16,3 +16,5 @@ class DingLibs(AutotoolsPackage):
version("0.6.1", sha256="a319a327deb81f2dfab9ce4a4926e80e1dac5dcfc89f4c7e548cec2645af27c1")
version("0.6.0", sha256="764a211f40cbcf2c9a613fc7ce0d77799d5ee469221b8b6739972e76f09e9fad")
version("0.5.0", sha256="dab937537a05d7a7cbe605fdb9b3809080d67b124ac97eb321255b35f5b172fd")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/dire/package.py b/var/spack/repos/builtin/packages/dire/package.py
index 1d7630754a..fb7849a032 100644
--- a/var/spack/repos/builtin/packages/dire/package.py
+++ b/var/spack/repos/builtin/packages/dire/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.pkg.builtin.boost import Boost
class Dire(Package):
@@ -23,12 +22,10 @@ class Dire(Package):
version("2.004", sha256="8cc1213b58fec744fdaa50834560a14b141de99efb2c3e3d3d47f3d6d84b179f")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants)
depends_on("lhapdf")
depends_on("hepmc")
depends_on("pythia8@8.226:")
diff --git a/var/spack/repos/builtin/packages/direnv/package.py b/var/spack/repos/builtin/packages/direnv/package.py
index 98fdab72a2..58c8807424 100644
--- a/var/spack/repos/builtin/packages/direnv/package.py
+++ b/var/spack/repos/builtin/packages/direnv/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Direnv(Package):
+class Direnv(GoPackage):
"""direnv is an environment switcher for the shell."""
homepage = "https://direnv.net/"
@@ -16,6 +16,8 @@ class Direnv(Package):
license("MIT")
+ version("2.35.0", sha256="a7aaec49d1b305f0745dad364af967fb3dc9bb5befc9f29d268d528b5a474e57")
+ version("2.34.0", sha256="3d7067e71500e95d69eac86a271a6b6fc3f2f2817ba0e9a589524bf3e73e007c")
version("2.33.0", sha256="8ef18051aa6bdcd6b59f04f02acdd0b78849b8ddbdbd372d4957af7889c903ea")
version("2.32.3", sha256="c66f6d1000f28f919c6106b5dcdd0a0e54fb553602c63c60bf59d9bbdf8bd33c")
version("2.32.2", sha256="352b3a65e8945d13caba92e13e5666e1854d41749aca2e230938ac6c64fa8ef9")
@@ -26,16 +28,4 @@ class Direnv(Package):
version("2.11.3", sha256="2d34103a7f9645059270763a0cfe82085f6d9fe61b2a85aca558689df0e7b006")
depends_on("go@1.16:", type="build", when="@2.28:")
- depends_on("go", type="build")
-
- phases = ["build", "install"]
-
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
-
- def build(self, spec, prefix):
- make()
-
- def install(self, spec, prefix):
- make("install", "PREFIX=%s" % prefix)
+ depends_on("go@1.20:", type="build", when="@2.33:")
diff --git a/var/spack/repos/builtin/packages/discotec/package.py b/var/spack/repos/builtin/packages/discotec/package.py
index aa876aa1cd..77007f7dd9 100644
--- a/var/spack/repos/builtin/packages/discotec/package.py
+++ b/var/spack/repos/builtin/packages/discotec/package.py
@@ -20,6 +20,8 @@ class Discotec(CMakePackage):
version("main", branch="main")
+ depends_on("cxx", type="build") # generated
+
variant("compression", default=False, description="Write sparse grid files compressed")
variant("ft", default=False, description="DisCoTec with algorithm-based fault tolerance")
variant("gene", default=False, description="Build for GENE (as task library)")
@@ -52,7 +54,7 @@ class Discotec(CMakePackage):
self.define_from_variant("DISCOTEC_USE_VTK", "vtk"),
self.define_from_variant("DISCOTEC_WITH_SELALIB", "selalib"),
]
- if "+selalib" in self.spec:
+ if self.spec.satisfies("+selalib"):
args.append(self.define("SELALIB_DIR", self.spec["selalib"].prefix.cmake))
return args
diff --git a/var/spack/repos/builtin/packages/discovar/package.py b/var/spack/repos/builtin/packages/discovar/package.py
index 95c5bcdb1c..474546aae9 100644
--- a/var/spack/repos/builtin/packages/discovar/package.py
+++ b/var/spack/repos/builtin/packages/discovar/package.py
@@ -16,4 +16,6 @@ class Discovar(AutotoolsPackage):
version("52488", sha256="c46e8f5727b3c8116d715c02e20a83e6261c762e8964d00709abfb322a501d4e")
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@6:")
diff --git a/var/spack/repos/builtin/packages/discovardenovo/package.py b/var/spack/repos/builtin/packages/discovardenovo/package.py
index a84709eba6..e5e09a455b 100644
--- a/var/spack/repos/builtin/packages/discovardenovo/package.py
+++ b/var/spack/repos/builtin/packages/discovardenovo/package.py
@@ -19,6 +19,8 @@ class Discovardenovo(AutotoolsPackage):
version("52488", sha256="445445a3b75e17e276a6119434f13784a5a661a9c7277f5e10f3b6b3b8ac5771")
+ depends_on("cxx", type="build") # generated
+
# lots of compiler errors with GCC7, works with 4.8.5
# and devs claim it works with 4.7 so I'm assuming 4.7-4.8'll work
conflicts("%gcc@5:")
diff --git a/var/spack/repos/builtin/packages/disktype/package.py b/var/spack/repos/builtin/packages/disktype/package.py
index 3ca4692da9..90eb8b8682 100644
--- a/var/spack/repos/builtin/packages/disktype/package.py
+++ b/var/spack/repos/builtin/packages/disktype/package.py
@@ -16,6 +16,8 @@ class Disktype(MakefilePackage):
version("9.2.1", sha256="fb274d6ce6b69c0d36eb23fcc9f01db3c32c3996b404900d46bb743ce4fa8154")
+ depends_on("c", type="build") # generated
+
build_directory = "src"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/distbench/package.py b/var/spack/repos/builtin/packages/distbench/package.py
index 02daf6b841..fe4dc758f0 100644
--- a/var/spack/repos/builtin/packages/distbench/package.py
+++ b/var/spack/repos/builtin/packages/distbench/package.py
@@ -17,6 +17,8 @@ class Distbench(MakefilePackage):
version("1.0rc4", sha256="adc8da85890219800207d0d4cd7ffd63193d2c4007dba7c44cf545cc13675ff7")
+ depends_on("cxx", type="build") # generated
+
depends_on("bazel", type="build")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/distcc/package.py b/var/spack/repos/builtin/packages/distcc/package.py
index 629cd3fc0a..95d817301b 100644
--- a/var/spack/repos/builtin/packages/distcc/package.py
+++ b/var/spack/repos/builtin/packages/distcc/package.py
@@ -15,9 +15,12 @@ class Distcc(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("3.4", sha256="37a34c9555498a1168fea026b292ab07e7bb394715d87d8403e0c33b16d2d008")
version("3.3.5", sha256="13a4b3ce49dfc853a3de550f6ccac583413946b3a2fa778ddf503a9edc8059b0")
version("3.3.3", sha256="b7f37d314704fbaf006d747514ff6e4d0d722102ef7d2aea132f97cf170f5169")
+ depends_on("c", type="build") # generated
+
depends_on("popt")
depends_on("libiberty")
diff --git a/var/spack/repos/builtin/packages/diy/package.py b/var/spack/repos/builtin/packages/diy/package.py
index 6a08ab5de2..f0b70a90de 100644
--- a/var/spack/repos/builtin/packages/diy/package.py
+++ b/var/spack/repos/builtin/packages/diy/package.py
@@ -10,20 +10,57 @@ class Diy(CMakePackage):
"""Data-parallel out-of-core library"""
homepage = "https://github.com/diatomic/diy"
- url = "https://github.com/diatomic/diy/archive/3.5.0.tar.gz"
+ maintainers("vicentebolea")
+
+ url = "https://github.com/diatomic/diy/archive/3.6.0.tar.gz"
git = "https://github.com/diatomic/diy.git"
license("BSD-3-Clause-LBNL")
- version("3.5.0", sha256="b3b5490441d521b6e9b33471c782948194bf95c7c3df3eb97bc5cf4530b91576")
version("master", branch="master")
+ version("3.6.0", sha256="d12eb7dabe3a8a66cd406d34aabdb43c1ec178b7ed40cf1dff10016643bbf149")
+ version("3.5.0", sha256="b3b5490441d521b6e9b33471c782948194bf95c7c3df3eb97bc5cf4530b91576")
+
+ depends_on("cxx", type="build") # generated
depends_on("mpi")
+ # https://gitlab.kitware.com/diatomic/diy/-/merge_requests/82
+ patch(
+ "https://gitlab.kitware.com/diatomic/diy/-/commit/1d85dd5205b9f0035840e1840a49ea7028618d16.diff",
+ sha256="8d9ae569c4bf87e450a4d96b9a33c5d226011568ee83537a8cb0d46810839169",
+ when="@3.6",
+ )
+
def cmake_args(self):
args = [
"-Dbuild_examples=off",
"-Dbuild_tests=off",
+ "-Dinstall_examples=on",
"-DCMAKE_CXX_COMPILER=%s" % self.spec["mpi"].mpicxx,
]
return args
+
+ def test_smoke_test(self):
+ """Build and run ctests"""
+ spec = self.spec
+
+ if spec.satisfies("@:3.5"):
+ raise SkipTest("Smoke test requires DIY>=3.6")
+
+ with working_dir("smoke_test_build", create=True):
+ cmake = Executable(spec["cmake"].prefix.bin.cmake)
+ ctest = Executable(spec["cmake"].prefix.bin.ctest)
+
+ cmake(
+ spec["diy"].prefix.share.DIY.examples.smoke_test,
+ f"-DMPI_HOME={spec['mpi'].prefix}",
+ f"-DCMAKE_PREFIX_PATH={spec['diy'].prefix}",
+ )
+ cmake("--build", ".")
+ ctest("--verbose")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def build_test(self):
+ self.test_smoke_test()
diff --git a/var/spack/repos/builtin/packages/dla-future-fortran/package.py b/var/spack/repos/builtin/packages/dla-future-fortran/package.py
new file mode 100644
index 0000000000..0937a13782
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dla-future-fortran/package.py
@@ -0,0 +1,61 @@
+# Copyright 2013-2024 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)
+
+# dlaf-no-license-check
+from spack.package import *
+
+
+class DlaFutureFortran(CMakePackage):
+ """
+ Fortran interface to the DLA-Future library.
+ """
+
+ homepage = "https://github.com/eth-cscs/DLA-Future-Fortran"
+ url = "https://github.com/eth-cscs/DLA-Future-Fortran/archive/v0.0.0.tar.gz"
+ git = "https://github.com/eth-cscs/DLA-Future-Fortran.git"
+
+ maintainers("RMeli", "rasolca", "aurianer")
+
+ license("BSD-3-Clause")
+
+ version("main", branch="main")
+ version("0.2.0", sha256="7fd3e1779c111b35f0d2701a024398b4f6e8dea4af523b6c8617d28c0b7ae61a")
+ version("0.1.0", sha256="9fd8a105cbb2f3e1daf8a49910f98fce68ca0b954773dba98a91464cf2e7c1da")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
+ variant("shared", default=True, description="Build shared libraries.")
+ variant("test", default=False, description="Build tests.")
+
+ generator("ninja")
+ depends_on("cmake@3.22:", type="build")
+ depends_on("pkgconfig", type="build")
+
+ depends_on("dla-future@0.4.1:0.5 +scalapack", when="@0.1.0")
+ depends_on("dla-future@0.6.0: +scalapack", when="@0.2.0:")
+ depends_on("dla-future +shared", when="+shared")
+
+ depends_on("mpi", when="+test")
+ depends_on("py-fypp", when="+test", type="build")
+
+ def cmake_args(self):
+ args = []
+
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+
+ if self.spec.satisfies("+test"):
+ args.append(self.define("DLAF_FORTRAN_BUILD_TESTING", True))
+ # Tests run with 6 MPI ranks
+ args.append(self.define("MPIEXEC_MAX_NUMPROCS", 6))
+
+ return args
+
+ @property
+ def libs(self):
+ return find_libraries(
+ "libDLAF_Fortran", root=self.home, shared=self.spec.satisfies("+shared")
+ )
diff --git a/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch b/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch
new file mode 100644
index 0000000000..a42f284f41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dla-future/hip_complex_operator_overloads.patch
@@ -0,0 +1,23 @@
+diff --git a/src/lapack/gpu/add.cu b/src/lapack/gpu/add.cu
+index a55110c2..5d839540 100644
+--- a/src/lapack/gpu/add.cu
++++ b/src/lapack/gpu/add.cu
+@@ -32,6 +32,18 @@ __device__ inline void addAlpha(const T& alpha, const T& a, T& b) {
+ b = b + alpha * a;
+ }
+
++template <>
++__device__ inline void addAlpha<hipFloatComplex>(const hipFloatComplex& alpha, const hipFloatComplex& a,
++ hipFloatComplex& b) {
++ b = b + hipCmulf(alpha, a);
++}
++
++template <>
++__device__ inline void addAlpha<hipDoubleComplex>(const hipDoubleComplex& alpha,
++ const hipDoubleComplex& a, hipDoubleComplex& b) {
++ b = b + hipCmul(alpha, a);
++}
++
+ template <class T>
+ __device__ inline void sum(const T& /*alpha*/, const T& a, T& b) {
+ b = b + a;
diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py
index a010e4553e..c831dd1f67 100644
--- a/var/spack/repos/builtin/packages/dla-future/package.py
+++ b/var/spack/repos/builtin/packages/dla-future/package.py
@@ -16,6 +16,10 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
+ version("0.6.0", sha256="85dfcee36ff28fa44da3134408c40ebd611bccff8a295982a7c78eaf982524d9")
+ version("0.5.0", sha256="f964ee2a96bb58b3f0ee4563ae65fcd136e409a7c0e66beda33f926fc9515a8e")
+ version("0.4.1", sha256="ba95f26475ad68da1f3a24d091dc1b925525e269e4c83c1eaf1d37d29b526666")
+ version("0.4.0", sha256="34fd0da0d1a72b6981bed0bba029ba0947e0d0d99beb3e0aad0a478095c9527d")
version("0.3.1", sha256="350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe")
version("0.3.0", sha256="9887ac0b466ca03d704a8738bc89e68550ed33509578c576390e98e76b64911b")
version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe")
@@ -23,6 +27,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
version("0.1.0", sha256="f7ffcde22edabb3dc24a624e2888f98829ee526da384cd752b2b271c731ca9b1")
version("master", branch="master")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build shared libraries.")
variant(
@@ -43,7 +50,20 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
description="Build C API compatible with ScaLAPACK",
)
+ variant("mpi_gpu_aware", default=False, when="@0.5.0:", description="Use GPU-aware MPI.")
+ conflicts("+mpi_gpu_aware", when="~cuda ~rocm", msg="GPU-aware MPI requires +cuda or +rocm")
+
+ variant(
+ "mpi_gpu_force_contiguous",
+ default=True,
+ when="@0.5.0: +mpi_gpu_aware",
+ description="Force GPU communication buffers to be contiguous before communicating.",
+ )
+
+ generator("ninja")
+
depends_on("cmake@3.22:", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("doxygen", type="build", when="+doc")
depends_on("mpi")
@@ -52,6 +72,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
depends_on("scalapack", when="+scalapack")
depends_on("blaspp@2022.05.00:")
depends_on("lapackpp@2022.05.00:")
+ depends_on("intel-oneapi-mkl +cluster", when="^[virtuals=scalapack] intel-oneapi-mkl")
+
+ conflicts("intel-oneapi-mkl", when="@:0.3")
depends_on("umpire~examples")
depends_on("umpire~cuda", when="~cuda")
@@ -63,7 +86,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
depends_on("pika@0.15.1:", when="@0.1")
depends_on("pika@0.16:", when="@0.2.0")
depends_on("pika@0.17:", when="@0.2.1")
- depends_on("pika@0.18:", when="@0.3.0:")
+ depends_on("pika@0.18:", when="@0.3")
+ depends_on("pika@0.19.1:", when="@0.4.0:")
+ conflicts("^pika@0.28:", when="@:0.6")
depends_on("pika-algorithms@0.1:", when="@:0.2")
depends_on("pika +mpi")
depends_on("pika +cuda", when="+cuda")
@@ -75,9 +100,10 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
depends_on("whip +rocm", when="+rocm")
depends_on("rocblas", when="+rocm")
- depends_on("rocprim", when="+rocm")
depends_on("rocsolver", when="+rocm")
- depends_on("rocthrust", when="+rocm")
+
+ depends_on("rocprim", when="@:0.3 +rocm")
+ depends_on("rocthrust", when="@:0.3 +rocm")
# nvcc 11.2 and older is unable to detect fmt::formatter specializations.
# DLA-Future 0.3.1 includes a workaround to avoid including fmt in device
@@ -100,35 +126,30 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+cuda", when="+rocm")
with when("+rocm"):
- for val in ROCmPackage.amdgpu_targets:
- depends_on("pika amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val))
- depends_on(
- "rocsolver amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
- )
- depends_on(
- "rocblas amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
- )
- depends_on(
- "rocprim amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
- )
- depends_on(
- "rocthrust amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
- )
- depends_on("whip amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val))
- depends_on(
- "umpire amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
- )
+ for arch in ROCmPackage.amdgpu_targets:
+ depends_on(f"pika amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+ depends_on(f"rocsolver amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+ depends_on(f"rocblas amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+ depends_on(f"whip amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+ depends_on(f"umpire amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+
+ with when("@:0.3 +rocm"):
+ for arch in ROCmPackage.amdgpu_targets:
+ depends_on(f"rocprim amdgpu_target={arch}", when=f"amdgpu_target={arch}")
+ depends_on(f"rocthrust amdgpu_target={arch}", when=f"amdgpu_target={arch}")
with when("+cuda"):
- for val in CudaPackage.cuda_arch_values:
- depends_on("pika cuda_arch={0}".format(val), when="cuda_arch={0}".format(val))
- depends_on("umpire cuda_arch={0}".format(val), when="cuda_arch={0}".format(val))
+ for arch in CudaPackage.cuda_arch_values:
+ depends_on(f"pika cuda_arch={arch}", when=f"cuda_arch={arch}")
+ depends_on(f"umpire cuda_arch={arch}", when=f"cuda_arch={arch}")
patch(
- "https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1",
- sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
+ "https://github.com/eth-cscs/DLA-Future/commit/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1",
+ sha256="f40e4a734650f56c39379717a682d00d6400a7a102d90821542652824a8f64cd",
when="@:0.3 %gcc@13:",
)
+ # https://github.com/spack/spack/issues/41511
+ patch("hip_complex_operator_overloads.patch", when="+rocm")
def cmake_args(self):
spec = self.spec
@@ -137,58 +158,104 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
# BLAS/LAPACK
- if self.spec["lapack"].name in INTEL_MATH_LIBRARIES:
+ if spec.version <= Version("0.4") and spec["lapack"].name in INTEL_MATH_LIBRARIES:
+ mkl_provider = spec["lapack"].name
+
vmap = {
- "none": "seq",
- "openmp": "omp",
- "tbb": "tbb",
- } # Map MKL variants to LAPACK target name
- mkl_threads = vmap[spec["intel-mkl"].variants["threads"].value]
- # TODO: Generalise for intel-oneapi-mkl
- args += [
- self.define("DLAF_WITH_MKL", True),
- self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"),
- ]
- if "+scalapack" in spec:
- if (
- "^mpich" in spec
- or "^cray-mpich" in spec
- or "^intel-mpi" in spec
- or "^mvapich" in spec
- or "^mvapich2" in spec
- ):
- mkl_mpi = "mpich"
- elif "^openmpi" in spec:
- mkl_mpi = "ompi"
- args.append(
- self.define(
- "MKL_SCALAPACK_TARGET",
- f"mkl::scalapack_{mkl_mpi}_intel_32bit_{mkl_threads}_dyn",
- )
+ "intel-oneapi-mkl": {
+ "threading": {
+ "none": "sequential",
+ "openmp": "gnu_thread",
+ "tbb": "tbb_thread",
+ },
+ "mpi": {"intel-mpi": "intelmpi", "mpich": "mpich", "openmpi": "openmpi"},
+ },
+ "intel-mkl": {
+ "threading": {"none": "seq", "openmp": "omp", "tbb": "tbb"},
+ "mpi": {"intel-mpi": "mpich", "mpich": "mpich", "openmpi": "ompi"},
+ },
+ }
+
+ if mkl_provider not in vmap.keys():
+ raise RuntimeError(
+ f"dla-future does not support {mkl_provider} as lapack provider"
)
+ mkl_mapper = vmap[mkl_provider]
+
+ mkl_threads = mkl_mapper["threading"][spec[mkl_provider].variants["threads"].value]
+ if mkl_provider == "intel-oneapi-mkl":
+ args += [
+ self.define("DLAF_WITH_MKL", True),
+ self.define("MKL_INTERFACE", "lp64"),
+ self.define("MKL_THREADING", mkl_threads),
+ ]
+ elif mkl_provider == "intel-mkl":
+ args += [
+ (
+ self.define("DLAF_WITH_MKL", True)
+ if spec.version <= Version("0.3")
+ else self.define("DLAF_WITH_MKL_LEGACY", True)
+ ),
+ self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"),
+ ]
+
+ if spec.satisfies("+scalapack"):
+ try:
+ mpi_provider = spec["mpi"].name
+ if mpi_provider in ["mpich", "cray-mpich", "mvapich", "mvapich2"]:
+ mkl_mpi = mkl_mapper["mpi"]["mpich"]
+ else:
+ mkl_mpi = mkl_mapper["mpi"][mpi_provider]
+ except KeyError:
+ raise RuntimeError(
+ f"dla-future does not support {spec['mpi'].name} as mpi provider with "
+ f"the selected scalapack provider {mkl_provider}"
+ )
+
+ if mkl_provider == "intel-oneapi-mkl":
+ args.append(self.define("MKL_MPI", mkl_mpi))
+ elif mkl_provider == "intel-mkl":
+ args.append(
+ self.define(
+ "MKL_SCALAPACK_TARGET",
+ f"mkl::scalapack_{mkl_mpi}_intel_32bit_{mkl_threads}_dyn",
+ )
+ )
else:
- args.append(self.define("DLAF_WITH_MKL", False))
+ args.append(self.define("DLAF_WITH_MKL", spec["lapack"].name in INTEL_MATH_LIBRARIES))
+ add_dlaf_prefix = lambda x: x if spec.satisfies("@:0.6") else "DLAF_" + x
args.append(
self.define(
- "LAPACK_LIBRARY",
+ add_dlaf_prefix("LAPACK_LIBRARY"),
" ".join([spec[dep].libs.ld_flags for dep in ["blas", "lapack"]]),
)
)
- if "+scalapack" in spec:
- args.append(self.define("SCALAPACK_LIBRARY", spec["scalapack"].libs.ld_flags))
+ if spec.satisfies("+scalapack"):
+ args.append(
+ self.define(
+ add_dlaf_prefix("SCALAPACK_LIBRARY"), spec["scalapack"].libs.ld_flags
+ )
+ )
args.append(self.define_from_variant("DLAF_WITH_SCALAPACK", "scalapack"))
+ args.append(self.define_from_variant("DLAF_WITH_MPI_GPU_AWARE", "mpi_gpu_aware"))
+ args.append(
+ self.define_from_variant(
+ "DLAF_WITH_MPI_GPU_FORCE_CONTIGUOUS", "mpi_gpu_force_contiguous"
+ )
+ )
+
# CUDA/HIP
args.append(self.define_from_variant("DLAF_WITH_CUDA", "cuda"))
args.append(self.define_from_variant("DLAF_WITH_HIP", "rocm"))
- if "+rocm" in spec:
- archs = self.spec.variants["amdgpu_target"].value
+ if spec.satisfies("+rocm"):
+ archs = spec.variants["amdgpu_target"].value
if "none" not in archs:
arch_str = ";".join(archs)
args.append(self.define("CMAKE_HIP_ARCHITECTURES", arch_str))
- if "+cuda" in spec:
- archs = self.spec.variants["cuda_arch"].value
+ if spec.satisfies("+cuda"):
+ archs = spec.variants["cuda_arch"].value
if "none" not in archs:
arch_str = ";".join(archs)
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", arch_str))
diff --git a/var/spack/repos/builtin/packages/dlb/package.py b/var/spack/repos/builtin/packages/dlb/package.py
index 32dca653ee..988d4061f0 100644
--- a/var/spack/repos/builtin/packages/dlb/package.py
+++ b/var/spack/repos/builtin/packages/dlb/package.py
@@ -22,6 +22,8 @@ class Dlb(AutotoolsPackage):
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("3.4.1", sha256="7c071b75c126f8e77c1a30369348751624d5636edcbd663bf3d41fa04733c894")
+ version("3.4", sha256="6091d032c11a094a3ce0bec11c0a164783fdff83cb4ec870c9d8e192410c353a")
version("3.3.1", sha256="1b245acad80b03eb83e815fd59dcfc598cfddd899de4504cf6a9572fe5359f40")
version("3.3", sha256="55b87aea14f3954d8878912f3134938db235e6984fae26fdf5134148007eb722")
version("3.2", sha256="b1c65ce3179b5275cfdf0bf921c0565a4a3ebcfdab72d7cef014957c17136c7e")
@@ -30,10 +32,17 @@ class Dlb(AutotoolsPackage):
version("3.0.1", sha256="04f8a7aa269d02fc8561d0a61d64786aa18850367ce4f95d086ca12ab3eb7d24")
version("3.0", sha256="e3fc1d51e9ded6d4d40d37f8568da4c4d72d1a8996bdeff2dfbbd86c9b96e36a")
- variant("debug", default=False, description="Builds additional debug libraries")
- variant("mpi", default=False, description="Builds MPI libraries")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
+ variant("debug", default=False, description="Build additional debug libraries")
+ variant("mpi", default=True, description="Build MPI libraries")
+ variant("hwloc", default=True, description="Enable HWLOC support")
+ variant("papi", default=True, description="Enable PAPI support")
depends_on("mpi", when="+mpi")
+ depends_on("hwloc", when="+hwloc")
+ depends_on("papi", when="@3.4: +papi")
depends_on("python", type="build")
depends_on("autoconf", type="build", when="@main")
depends_on("automake", type="build", when="@main")
@@ -44,5 +53,8 @@ class Dlb(AutotoolsPackage):
args.extend(self.enable_or_disable("debug"))
args.extend(self.enable_or_disable("instrumentation-debug", variant="debug"))
args.extend(self.with_or_without("mpi"))
+ args.extend(self.with_or_without("hwloc"))
+ if self.spec.satisfies("@3.4:"):
+ args.extend(self.with_or_without("papi"))
return args
diff --git a/var/spack/repos/builtin/packages/dlib/package.py b/var/spack/repos/builtin/packages/dlib/package.py
index 355d793656..26a2399112 100644
--- a/var/spack/repos/builtin/packages/dlib/package.py
+++ b/var/spack/repos/builtin/packages/dlib/package.py
@@ -5,7 +5,7 @@
from spack.package import *
-class Dlib(CMakePackage):
+class Dlib(CMakePackage, CudaPackage):
"""toolkit containing machine learning algorithms and tools
for creating complex software in C++ to solve real world problems"""
@@ -13,28 +13,72 @@ class Dlib(CMakePackage):
url = "https://github.com/davisking/dlib/archive/v19.19.tar.gz"
git = "https://github.com/davisking/dlib"
- maintainer = ["robertu94"]
+ maintainers("robertu94")
license("BSL-1.0")
version("master", branch="master")
+ version("19.24.4", sha256="d881911d68972d11563bb9db692b8fcea0ac1b3fd2e3f03fa0b94fde6c739e43")
version("19.22", sha256="5f44b67f762691b92f3e41dcf9c95dd0f4525b59cacb478094e511fdacb5c096")
version("19.21", sha256="116f52e58be04b47dab52057eaad4b5c4d5c3032d927fe23d55b0741fc4107a0")
version("19.20", sha256="fc3f0986350e8e53aceadf95a71d2f413f1eedc469abda99a462cb528741d411")
version("19.19", sha256="7af455bb422d3ae5ef369c51ee64e98fa68c39435b0fa23be2e5d593a3d45b87")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("ffmpeg", default=False, description="build ffmpeg image support")
+ variant("gif", default=False, description="build gif image support")
+ variant("gui", default=False, description="build dlib graphical support")
+ variant("jpeg", default=False, description="build jpeg image support")
+ variant("jxl", default=False, description="build jxl image support")
+ variant("png", default=False, description="build png image support")
variant("shared", default=True, description="build the shared libraries")
+ variant("sqlite", default=False, description="build sqlite3 support")
+ variant("webp", default=False, description="build webp image support")
+ variant("blas", default=True, description="build blas image support")
+ variant("lapack", default=True, description="build lapack image support")
depends_on("zlib-api")
- depends_on("libpng")
- depends_on("libjpeg")
- depends_on("blas")
- depends_on("lapack")
- depends_on("libsm")
- depends_on("libx11")
+ depends_on("ffmpeg", when="+ffmpeg")
+ depends_on("libjxl@0.10.2:", when="+jxl")
+ depends_on("giflib", when="+gif")
+ depends_on("libpng", when="+png")
+ depends_on("libwebp", when="+webp")
+ depends_on("libjpeg", when="+jpeg")
+ depends_on("sqlite", when="+sqlite")
+ depends_on("blas", when="+blas")
+ depends_on("lapack", when="+lapack")
+ depends_on("libsm", when="+gui")
+ depends_on("libx11", when="+gui")
+ depends_on("cuda@7.5:", when="+cuda")
+ depends_on("cudnn", when="+cuda")
+ # depends on the deprecated FindCUDA module dependency as of 19.24.4
+ # when cuda is enabled
+ depends_on("cmake@:3.26", when="+cuda")
def cmake_args(self):
- args = []
- if "+shared" in self.spec:
- args.append("-DBUILD_SHARED_LIBS=ON")
+ spec = self.spec
+ args = [
+ self.define_from_variant("DLIB_USE_BLAS", "blas"),
+ self.define_from_variant("DLIB_USE_LAPACK", "lapack"),
+ self.define_from_variant("DLIB_USE_FFMPEG", "ffmpeg"),
+ self.define_from_variant("DLIB_GIF_SUPPORT", "gif"),
+ self.define("DLIB_NO_GUI_SUPPORT", spec.satisfies("~gui")),
+ self.define_from_variant("DLIB_JPEG_SUPPORT", "jpeg"),
+ self.define_from_variant("DLIB_JXL_SUPPORT", "jxl"),
+ self.define_from_variant("DLIB_PNG_SUPPORT", "png"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("DLIB_LINK_WITH_SQLITE3", "sqlite"),
+ self.define_from_variant("DLIB_WEBP_SUPPORT", "webp"),
+ self.define_from_variant("DLIB_USE_CUDA", "cuda"),
+ ]
+ if spec.satisfies("+cuda"):
+ args.append(
+ self.define(
+ "DLIB_USE_CUDA_COMPUTE_CAPABILITIES", self.spec.variants["cuda_arch"].value
+ )
+ )
+
return args
diff --git a/var/spack/repos/builtin/packages/dlpack/package.py b/var/spack/repos/builtin/packages/dlpack/package.py
index bfaec6a092..efe5c6b4f5 100644
--- a/var/spack/repos/builtin/packages/dlpack/package.py
+++ b/var/spack/repos/builtin/packages/dlpack/package.py
@@ -17,11 +17,15 @@ class Dlpack(Package):
license("Apache-2.0")
version("master", branch="master")
+ version("0.8", sha256="cf965c26a5430ba4cc53d61963f288edddcd77443aa4c85ce722aaf1e2f29513")
version("0.5", sha256="9209ac194a175aaab4381313891fba047cb173b2bdd15ac934f83f567f9cd514")
version("0.4", sha256="d0a533189ecd45a033b72e276fccaa2122cfd76de125e0a5e126bdea0fec2d24")
version("0.3", sha256="703149f5b39ead42cc734c03c7c4bd581fcad1c5a3939e7a4b5bc82f54c3c32a")
version("0.2", sha256="419f76ef723d21b72b704b2c4bf718dcd9d2ecd44cd28c8a71798389b7932ae5")
version("0.1", sha256="c69b06bfe03711e9d9d3f4d3f307d6dfd7e21d4864a053cca26296d5d05c175c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree("include", prefix.include)
diff --git a/var/spack/repos/builtin/packages/dmd/package.py b/var/spack/repos/builtin/packages/dmd/package.py
index 04c247bdc6..9c7d8e211d 100644
--- a/var/spack/repos/builtin/packages/dmd/package.py
+++ b/var/spack/repos/builtin/packages/dmd/package.py
@@ -19,6 +19,9 @@ class Dmd(MakefilePackage):
version("2.081.1", sha256="14f3aafe1c93c86646aaeb3ed7361a5fc5a24374cf25c8848c81942bfd9fae1a")
version("2.081.0", sha256="29b9882ed424b744df83ac73182d4ae952251029ebd16117d18f9cc1e83542e2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openssl")
depends_on("curl")
@@ -47,9 +50,6 @@ class Dmd(MakefilePackage):
env.prepend_path("LIBRARY_PATH", self.prefix.linux.lib64)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.linux.lib64)
- def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
def edit(self, spec, prefix):
# Move contents to dmd/
mkdir = which("mkdir")
diff --git a/var/spack/repos/builtin/packages/dmidecode/package.py b/var/spack/repos/builtin/packages/dmidecode/package.py
index 37f964655e..1eb0db8b6b 100644
--- a/var/spack/repos/builtin/packages/dmidecode/package.py
+++ b/var/spack/repos/builtin/packages/dmidecode/package.py
@@ -17,6 +17,8 @@ class Dmidecode(MakefilePackage):
version("3-2", sha256="489d840d076785617a432649603aafa6358327f4376694c062b69dfa359bcc2d")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("dmidecode", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/dmlc-core/package.py b/var/spack/repos/builtin/packages/dmlc-core/package.py
index 60cc32da43..18f443e9e7 100644
--- a/var/spack/repos/builtin/packages/dmlc-core/package.py
+++ b/var/spack/repos/builtin/packages/dmlc-core/package.py
@@ -19,6 +19,8 @@ class DmlcCore(CMakePackage):
version("master")
version("20170508", commit="a6c5701219e635fea808d264aefc5b03c3aec314")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=False, description="Enable OpenMP support")
patch("cmake.patch")
diff --git a/var/spack/repos/builtin/packages/dmtcp/package.py b/var/spack/repos/builtin/packages/dmtcp/package.py
index ee31dcadc3..4e890bbf85 100644
--- a/var/spack/repos/builtin/packages/dmtcp/package.py
+++ b/var/spack/repos/builtin/packages/dmtcp/package.py
@@ -11,15 +11,18 @@ class Dmtcp(AutotoolsPackage):
checkpoints a single-host or distributed computation in user-space --
with no modifications to user code or to the O/S."""
- homepage = "http://dmtcp.sourceforge.net/"
+ homepage = "https://dmtcp.sourceforge.net/"
url = "https://github.com/dmtcp/dmtcp/archive/refs/tags/3.0.0.tar.gz"
git = "https://github.com/dmtcp/dmtcp.git"
license("LGPL-3.0-only")
maintainers("karya0")
- version("master", branch="master")
+ version("main", branch="main")
version("3.0.0", sha256="2c7e95e1dbc55db33433bfee48a65f274298e98f246a36ab6dad1e0694750d37")
version("2.6.0", sha256="3ed62a86dd0cb9c828b93ee8c7c852d6f9c96a0efa48bcfe867521adf7bced68")
version("2.5.2", sha256="0e3e5e15bd401b7b6937f2b678cd7d6a252eab0a143d5740b89cc3bebb4282be")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
patch("for_aarch64.patch", when="@2.6.0 target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/dmxproto/package.py b/var/spack/repos/builtin/packages/dmxproto/package.py
index 565b066bd6..54b01df358 100644
--- a/var/spack/repos/builtin/packages/dmxproto/package.py
+++ b/var/spack/repos/builtin/packages/dmxproto/package.py
@@ -13,7 +13,7 @@ class Dmxproto(AutotoolsPackage, XorgPackage):
X server that controls multiple back-end X servers making up a large
display."""
- homepage = "http://dmx.sourceforge.net/"
+ homepage = "https://dmx.sourceforge.net/"
xorg_mirror_path = "proto/dmxproto-2.3.1.tar.gz"
version("2.3.1", sha256="3262bbf5902211a3ce88f5c6ab4528145ff84f69c52fd386ae0312bc45fb8a40")
diff --git a/var/spack/repos/builtin/packages/dnsmap/package.py b/var/spack/repos/builtin/packages/dnsmap/package.py
index f5e8ca90d0..8b15753a5c 100644
--- a/var/spack/repos/builtin/packages/dnsmap/package.py
+++ b/var/spack/repos/builtin/packages/dnsmap/package.py
@@ -17,6 +17,8 @@ class Dnsmap(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("dnsmap", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/dnsmasq/package.py b/var/spack/repos/builtin/packages/dnsmasq/package.py
index 4149405f2f..0c0108320e 100644
--- a/var/spack/repos/builtin/packages/dnsmasq/package.py
+++ b/var/spack/repos/builtin/packages/dnsmasq/package.py
@@ -14,6 +14,7 @@ class Dnsmasq(MakefilePackage):
license("GPL-2.0-or-later")
+ version("2.90", sha256="8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b")
version("2.89", sha256="8651373d000cae23776256e83dcaa6723dee72c06a39362700344e0c12c4e7e4")
version("2.81", sha256="3c28c68c6c2967c3a96e9b432c0c046a5df17a426d3a43cffe9e693cf05804d0")
version("2.80", sha256="9e4a58f816ce0033ce383c549b7d4058ad9b823968d352d2b76614f83ea39adc")
@@ -28,6 +29,8 @@ class Dnsmasq(MakefilePackage):
version("2.71", sha256="7d8c64f66a396442e01b639df3ea6b4e02ba88cbe206c80be8de68b6841634c4")
version("2.70", sha256="8eb7bf53688d6aaede5c90cfd2afcce04803a4efbddfbeecc6297180749e98af")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("./src/dnsmasq", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/dnstop/package.py b/var/spack/repos/builtin/packages/dnstop/package.py
index 088eb6aadf..2ea5086d3f 100644
--- a/var/spack/repos/builtin/packages/dnstop/package.py
+++ b/var/spack/repos/builtin/packages/dnstop/package.py
@@ -16,6 +16,8 @@ class Dnstop(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("libpcap")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/dnstracer/package.py b/var/spack/repos/builtin/packages/dnstracer/package.py
index c88435d527..e393f959ee 100644
--- a/var/spack/repos/builtin/packages/dnstracer/package.py
+++ b/var/spack/repos/builtin/packages/dnstracer/package.py
@@ -19,6 +19,8 @@ class Dnstracer(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
configure = Executable("./configure.sh")
configure("--prefix={0}".format(prefix))
diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py
index cc0c802748..d299dbabe6 100644
--- a/var/spack/repos/builtin/packages/docbook-xml/package.py
+++ b/var/spack/repos/builtin/packages/docbook-xml/package.py
@@ -44,16 +44,16 @@ class DocbookXml(Package):
"--noout",
"--add",
"public",
- "-//OASIS//DTD DocBook XML CALS Table Model " "V{0}//EN".format(version),
- "file://{0}/calstblx.dtd".format(prefix),
+ f"-//OASIS//DTD DocBook XML CALS Table Model V{version}//EN",
+ f"file://{prefix}/calstblx.dtd",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//DTD DocBook XML V{0}//EN".format(version),
- "file://{0}/docbookx.dtd".format(prefix),
+ f"-//OASIS//DTD DocBook XML V{version}//EN",
+ f"file://{prefix}/docbookx.dtd",
docbook,
)
xmlcatalog(
@@ -61,15 +61,15 @@ class DocbookXml(Package):
"--add",
"public",
"-//OASIS//DTD XML Exchange Table Model 19990315//EN",
- "file://{0}/soextblx.dtd".format(prefix),
+ f"file://{prefix}/soextblx.dtd",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//ENTITIES DocBook XML Character Entities " "V{0}//EN".format(version),
- "file://{0}/dbcentx.mod".format(prefix),
+ f"-//OASIS//ENTITIES DocBook XML Character Entities V{version}//EN",
+ f"file://{prefix}/dbcentx.mod",
docbook,
)
xmlcatalog(
@@ -78,39 +78,39 @@ class DocbookXml(Package):
"public",
"-//OASIS//ENTITIES DocBook XML Additional General Entities "
"V{0}//EN".format(version),
- "file://{0}/dbgenent.mod".format(prefix),
+ f"file://{prefix}/dbgenent.mod",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//ELEMENTS DocBook XML Document Hierarchy " "V{0}//EN".format(version),
- "file://{0}/dbhierx.mod".format(prefix),
+ f"-//OASIS//ELEMENTS DocBook XML Document Hierarchy V{version}//EN",
+ f"file://{prefix}/dbhierx.mod",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//ENTITIES DocBook XML Notations " "V{0}//EN".format(version),
- "file://{0}/dbnotnx.mod".format(prefix),
+ f"-//OASIS//ENTITIES DocBook XML Notations V{version}//EN",
+ f"file://{prefix}/dbnotnx.mod",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//ELEMENTS DocBook XML Information Pool " "V{0}//EN".format(version),
- "file://{0}/dbpoolx.mod".format(prefix),
+ f"-//OASIS//ELEMENTS DocBook XML Information Pool V{version}//EN",
+ f"file://{prefix}/dbpoolx.mod",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"public",
- "-//OASIS//ELEMENTS DocBook XML HTML Tables " "V{0}//EN".format(version),
- "file://{0}/htmltblx.mod".format(prefix),
+ f"-//OASIS//ELEMENTS DocBook XML HTML Tables V{version}//EN",
+ f"file://{prefix}/htmltblx.mod",
docbook,
)
xmlcatalog(
@@ -118,7 +118,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow " "Relations//EN",
- "file://{0}/isoamsa.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamsa.ent",
docbook,
)
xmlcatalog(
@@ -126,7 +126,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: Binary " "Operators//EN",
- "file://{0}/isoamsb.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamsb.ent",
docbook,
)
xmlcatalog(
@@ -134,7 +134,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN",
- "file://{0}/isoamsc.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamsc.ent",
docbook,
)
xmlcatalog(
@@ -142,7 +142,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: " "Negated Relations//EN",
- "file://{0}/isoamsn.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamsn.ent",
docbook,
)
xmlcatalog(
@@ -150,7 +150,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN",
- "file://{0}/isoamso.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamso.ent",
docbook,
)
xmlcatalog(
@@ -158,7 +158,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN",
- "file://{0}/isoamsr.ent".format(ent_dir),
+ f"file://{ent_dir}/isoamsr.ent",
docbook,
)
xmlcatalog(
@@ -166,7 +166,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Box and Line Drawing//EN",
- "file://{0}/isobox.ent".format(ent_dir),
+ f"file://{ent_dir}/isobox.ent",
docbook,
)
xmlcatalog(
@@ -174,7 +174,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Russian Cyrillic//EN",
- "file://{0}/isocyr1.ent".format(ent_dir),
+ f"file://{ent_dir}/isocyr1.ent",
docbook,
)
xmlcatalog(
@@ -182,7 +182,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN",
- "file://{0}/isocyr2.ent".format(ent_dir),
+ f"file://{ent_dir}/isocyr2.ent",
docbook,
)
xmlcatalog(
@@ -190,7 +190,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Diacritical Marks//EN",
- "file://{0}/isodia.ent".format(ent_dir),
+ f"file://{ent_dir}/isodia.ent",
docbook,
)
xmlcatalog(
@@ -198,7 +198,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Greek Letters//EN",
- "file://{0}/isogrk1.ent".format(ent_dir),
+ f"file://{ent_dir}/isogrk1.ent",
docbook,
)
xmlcatalog(
@@ -206,7 +206,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Monotoniko Greek//EN",
- "file://{0}/isogrk2.ent".format(ent_dir),
+ f"file://{ent_dir}/isogrk2.ent",
docbook,
)
xmlcatalog(
@@ -214,7 +214,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Greek Symbols//EN",
- "file://{0}/isogrk3.ent".format(ent_dir),
+ f"file://{ent_dir}/isogrk3.ent",
docbook,
)
xmlcatalog(
@@ -222,7 +222,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN",
- "file://{0}/isogrk4.ent".format(ent_dir),
+ f"file://{ent_dir}/isogrk4.ent",
docbook,
)
xmlcatalog(
@@ -230,7 +230,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Latin 1//EN",
- "file://{0}/isolat1.ent".format(ent_dir),
+ f"file://{ent_dir}/isolat1.ent",
docbook,
)
xmlcatalog(
@@ -238,7 +238,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Added Latin 2//EN",
- "file://{0}/isolat2.ent".format(ent_dir),
+ f"file://{ent_dir}/isolat2.ent",
docbook,
)
xmlcatalog(
@@ -246,7 +246,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN",
- "file://{0}/isonum.ent".format(ent_dir),
+ f"file://{ent_dir}/isonum.ent",
docbook,
)
xmlcatalog(
@@ -254,7 +254,7 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES Publishing//EN",
- "file://{0}/isopub.ent".format(ent_dir),
+ f"file://{ent_dir}/isopub.ent",
docbook,
)
xmlcatalog(
@@ -262,23 +262,23 @@ class DocbookXml(Package):
"--add",
"public",
"ISO 8879:1986//ENTITIES General Technical//EN",
- "file://{0}/isotech.ent".format(ent_dir),
+ f"file://{ent_dir}/isotech.ent",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"rewriteSystem",
- "https://www.oasis-open.org/docbook/xml/{0}".format(version),
- "file://{0}".format(prefix),
+ f"https://www.oasis-open.org/docbook/xml/{version}",
+ f"file://{prefix}",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"rewriteURI",
- "https://www.oasis-open.org/docbook/xml/{0}".format(version),
- "file://{0}".format(prefix),
+ f"https://www.oasis-open.org/docbook/xml/{version}",
+ f"file://{prefix}",
docbook,
)
xmlcatalog(
@@ -286,7 +286,7 @@ class DocbookXml(Package):
"--add",
"rewriteSystem",
"https://www.oasis-open.org/docbook/xml/current",
- "file://{0}".format(prefix),
+ f"file://{prefix}",
docbook,
)
xmlcatalog(
@@ -294,7 +294,7 @@ class DocbookXml(Package):
"--add",
"rewriteURI",
"https://www.oasis-open.org/docbook/xml/current",
- "file://{0}".format(prefix),
+ f"file://{prefix}",
docbook,
)
@@ -305,7 +305,7 @@ class DocbookXml(Package):
"--add",
"delegatePublic",
"-//OASIS//ENTITIES DocBook XML",
- "file://{0}".format(docbook),
+ f"file://{docbook}",
catalog,
)
xmlcatalog(
@@ -313,23 +313,18 @@ class DocbookXml(Package):
"--add",
"delegatePublic",
"-//OASIS//DTD DocBook XML",
- "file://{0}".format(docbook),
+ f"file://{docbook}",
catalog,
)
xmlcatalog(
- "--noout",
- "--add",
- "delegatePublic",
- "ISO 8879:1986",
- "file://{0}".format(docbook),
- catalog,
+ "--noout", "--add", "delegatePublic", "ISO 8879:1986", f"file://{docbook}", catalog
)
xmlcatalog(
"--noout",
"--add",
"delegateSystem",
"https://www.oasis-open.org/docbook/",
- "file://{0}".format(docbook),
+ f"file://{docbook}",
catalog,
)
xmlcatalog(
@@ -337,7 +332,7 @@ class DocbookXml(Package):
"--add",
"delegateURI",
"https://www.oasis-open.org/docbook/",
- "file://{0}".format(docbook),
+ f"file://{docbook}",
catalog,
)
@@ -348,40 +343,40 @@ class DocbookXml(Package):
"--noout",
"--add",
"public",
- "-//OASIS//DTD DocBook XML V{0}//EN".format(dtversion),
- "http://www.oasis-open.org/docbook/xml/{0}/docbookx.dtd".format(dtversion),
+ f"-//OASIS//DTD DocBook XML V{dtversion}//EN",
+ f"http://www.oasis-open.org/docbook/xml/{dtversion}/docbookx.dtd",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"rewriteSystem",
- "http://www.oasis-open.org/docbook/xml/{0}".format(dtversion),
- "file://{0}".format(prefix),
+ f"http://www.oasis-open.org/docbook/xml/{dtversion}",
+ f"file://{prefix}",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"rewriteURI",
- "http://www.oasis-open.org/docbook/xml/{0}".format(dtversion),
- "file://{0}".format(prefix),
+ f"http://www.oasis-open.org/docbook/xml/{dtversion}",
+ f"file://{prefix}",
docbook,
)
xmlcatalog(
"--noout",
"--add",
"delegateSystem",
- "http://www.oasis-open.org/docbook/xml/{0}".format(dtversion),
- "file://{0}".format(docbook),
+ f"http://www.oasis-open.org/docbook/xml/{dtversion}",
+ f"file://{docbook}",
catalog,
)
xmlcatalog(
"--noout",
"--add",
"delegateURI",
- "http://www.oasis-open.org/docbook/xml/{0}".format(dtversion),
- "file://{0}".format(docbook),
+ f"http://www.oasis-open.org/docbook/xml/{dtversion}",
+ f"file://{docbook}",
catalog,
)
diff --git a/var/spack/repos/builtin/packages/dock/package.py b/var/spack/repos/builtin/packages/dock/package.py
index c97b3efe5e..1188963c98 100644
--- a/var/spack/repos/builtin/packages/dock/package.py
+++ b/var/spack/repos/builtin/packages/dock/package.py
@@ -29,11 +29,11 @@ class Dock(Package):
depends_on("mpi", when="+mpi")
def setup_build_environment(self, env):
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
env.set("MPICH_HOME", self.spec["mpi"].prefix)
def install(self, spec, prefix):
- compiler_targets = {"gcc": "gnu", "intel": "intel", "pgi": "pgi", "sgi": "sgi"}
+ compiler_targets = {"gcc": "gnu", "intel": "intel", "sgi": "sgi"}
if self.compiler.name not in compiler_targets:
template = "Unsupported compiler {0}! Supported compilers: {1}"
@@ -41,14 +41,11 @@ class Dock(Package):
raise InstallError(err)
- if self.compiler.name == "pgi" and "+mpi" in spec:
- raise InstallError("Parallel output is not supported with pgi.")
-
with working_dir("install"):
sh_args = ["./configure", compiler_targets[self.compiler.name]]
config_source = compiler_targets[self.compiler.name]
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
sh_args.append("parallel")
config_source = config_source + ".parallel"
diff --git a/var/spack/repos/builtin/packages/doctest/package.py b/var/spack/repos/builtin/packages/doctest/package.py
new file mode 100644
index 0000000000..c382ccf223
--- /dev/null
+++ b/var/spack/repos/builtin/packages/doctest/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Doctest(CMakePackage):
+ """The fastest feature-rich C++11/14/17/20/23 single-header testing framework"""
+
+ homepage = "https://github.com/doctest/doctest"
+ url = "https://github.com/doctest/doctest/archive/refs/tags/v2.4.11.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("2.4.11", sha256="632ed2c05a7f53fa961381497bf8069093f0d6628c5f26286161fbd32a560186")
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3:", type="build")
+
+ def cmake_args(self):
+ args = [self.define("DOCTEST_WITH_TESTS", self.run_tests)]
+ return args
diff --git a/var/spack/repos/builtin/packages/dorado/cmake-htslib.patch b/var/spack/repos/builtin/packages/dorado/cmake-htslib.patch
new file mode 100644
index 0000000000..a918ee5a78
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dorado/cmake-htslib.patch
@@ -0,0 +1,111 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64d6091e..323412a4 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -316,10 +316,6 @@ target_link_libraries(dorado_lib
+ minimap2
+ )
+
+-if(NOT WIN32)
+- add_dependencies(dorado_lib htslib_project)
+-endif()
+-
+ if(NOT DORADO_DISABLE_DORADO)
+ if(NOT WIN32)
+ # Set up RPATHs so we can find dependencies
+diff --git a/cmake/Htslib.cmake b/cmake/Htslib.cmake
+index caabc1a3..c72fe534 100644
+--- a/cmake/Htslib.cmake
++++ b/cmake/Htslib.cmake
+@@ -1,68 +1,4 @@
+-if(NOT TARGET htslib) # lazy include guard
+- if(WIN32)
+- message(STATUS "Fetching htslib")
+- download_and_extract(https://cdn.oxfordnanoportal.com/software/analysis/htslib-win.tar.gz htslib-win)
+- set(HTSLIB_DIR ${DORADO_3RD_PARTY_DOWNLOAD}/htslib-win CACHE STRING
+- "Path to htslib repo")
+- add_library(htslib SHARED IMPORTED)
+- set_target_properties(htslib PROPERTIES
+- "IMPORTED_IMPLIB" ${HTSLIB_DIR}/hts-3.lib
+- "IMPORTED_LOCATION" ${HTSLIB_DIR}/hts-3.dll
+- "INTERFACE_INCLUDE_DIRECTORIES" ${HTSLIB_DIR})
+- target_link_directories(htslib INTERFACE ${HTSLIB_DIR})
+- else()
+- message(STATUS "Setting up htslib build")
+- set(HTSLIB_DIR ${DORADO_3RD_PARTY_SOURCE}/htslib CACHE STRING "Path to htslib repo")
+- set(htslib_PREFIX ${CMAKE_BINARY_DIR}/3rdparty/htslib)
++include_directories(${HTSLIB_PREFIX}/include)
+
+- find_program(MAKE_COMMAND make REQUIRED)
+- find_program(AUTOCONF_COMMAND autoconf REQUIRED)
+- find_program(AUTOHEADER_COMMAND autoheader REQUIRED)
+- execute_process(COMMAND bash -c "${AUTOCONF_COMMAND} -V | sed 's/.* //; q'"
+- OUTPUT_VARIABLE AUTOCONF_VERS)
+- if (AUTOCONF_VERS VERSION_GREATER_EQUAL 2.70 AND NOT CMAKE_GENERATOR STREQUAL "Xcode")
+- set(AUTOCONF_COMMAND autoreconf --install)
+- endif()
+-
+- # The Htslib build apparently requires BUILD_IN_SOURCE=1, which is a problem when
+- # switching between build targets because htscodecs object files aren't regenerated.
+- # To avoid this, copy the source tree to a build-specific directory and do the build there.
+- set(HTSLIB_BUILD ${CMAKE_BINARY_DIR}/htslib_build)
+- file(COPY ${HTSLIB_DIR} DESTINATION ${HTSLIB_BUILD})
+-
+- if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
+- # We need cross-compilation mode for iOS builds. Otherwise we end up trying to link a MacOS library
+- # into an iOS target.
+- set(CONFIGURE_FLAGS --host=aarch64-apple-darwin "CFLAGS=-isysroot ${CMAKE_OSX_SYSROOT}" "CC=${CMAKE_C_COMPILER}" "LDFLAGS=-isysroot ${CMAKE_OSX_SYSROOT}")
+- # By default the dylib install name will be some local path that won't work on the device.
+- set(INSTALL_NAME ${CMAKE_INSTALL_NAME_TOOL} -id "@executable_path/Frameworks/libhts.3.dylib" ${htslib_PREFIX}/lib/libhts.3.dylib)
+- endif()
+-
+- include(ExternalProject)
+- ExternalProject_Add(htslib_project
+- PREFIX ${HTSLIB_BUILD}
+- SOURCE_DIR ${HTSLIB_BUILD}/htslib
+- BUILD_IN_SOURCE 1
+- CONFIGURE_COMMAND ${AUTOHEADER_COMMAND}
+- COMMAND ${AUTOCONF_COMMAND}
+- COMMAND ./configure --disable-bz2 --disable-lzma --disable-libcurl --disable-s3 --disable-gcs ${CONFIGURE_FLAGS}
+- BUILD_COMMAND ${MAKE_COMMAND} install prefix=${htslib_PREFIX}
+- COMMAND ${INSTALL_NAME}
+- INSTALL_COMMAND ""
+- BUILD_BYPRODUCTS ${htslib_PREFIX}/lib/libhts.a
+- LOG_CONFIGURE 0
+- LOG_BUILD 0
+- LOG_TEST 0
+- LOG_INSTALL 0
+- )
+-
+- add_library(htslib STATIC IMPORTED)
+- # Need to ensure this directory exists before we can add it to INTERFACE_INCLUDE_DIRECTORIES
+- file(MAKE_DIRECTORY ${htslib_PREFIX}/include)
+- set_target_properties(htslib
+- PROPERTIES
+- "IMPORTED_LOCATION" ${htslib_PREFIX}/lib/libhts.a
+- "INTERFACE_INCLUDE_DIRECTORIES" ${htslib_PREFIX}/include)
+- message(STATUS "Done Building htslib")
+- endif()
+-endif()
++add_library(htslib SHARED IMPORTED)
++set_target_properties(htslib PROPERTIES IMPORTED_LOCATION ${HTSLIB_PREFIX}/lib/libhts.so)
+diff --git a/dorado/utils/CMakeLists.txt b/dorado/utils/CMakeLists.txt
+index 9bbf7067..e78feabe 100644
+--- a/dorado/utils/CMakeLists.txt
++++ b/dorado/utils/CMakeLists.txt
+@@ -117,13 +117,9 @@ if(APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ target_link_libraries(dorado_utils PUBLIC ${IOKIT})
+ endif()
+
+-if(NOT WIN32)
+- add_dependencies(dorado_utils htslib_project)
+-endif()
+-
+ # GCC 8 ICEs trying to compile this file with ASAN+optimisations enabled, so knock down the optimisation to try and help it out.
+ if (ECM_ENABLE_SANITIZERS AND (CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0))
+ set_source_files_properties(duplex_utils.cpp PROPERTIES COMPILE_OPTIONS "-O0")
+ endif()
+
+-enable_warnings_as_errors(dorado_utils)
+\ No newline at end of file
++enable_warnings_as_errors(dorado_utils)
diff --git a/var/spack/repos/builtin/packages/dorado/package.py b/var/spack/repos/builtin/packages/dorado/package.py
new file mode 100644
index 0000000000..a56d355c62
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dorado/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Dorado(CMakePackage, CudaPackage):
+ """Dorado is a high-performance, easy-to-use, open source basecaller
+ for Oxford Nanopore reads."""
+
+ homepage = "https://github.com/nanoporetech/dorado"
+ git = "https://github.com/nanoporetech/dorado.git"
+ url = "https://github.com/nanoporetech/dorado/archive/refs/tags/v0.5.1.tar.gz"
+
+ maintainers("snehring")
+
+ version("0.5.3", commit="d9af343c0097e0e60503231e036d69e6eda2f19a", submodules=True)
+ version("0.5.1", commit="a7fb3e3d4afa7a11cb52422e7eecb1a2cdb7860f", submodules=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("git", type="build")
+ depends_on("curl", type="build")
+ depends_on("cuda")
+ depends_on("hdf5@1.17:+hl+cxx+szip")
+ depends_on("htslib@1.15.1")
+ depends_on("openssl")
+ depends_on("zstd")
+ depends_on("libdeflate")
+ depends_on("zlib-api")
+
+ conflicts("%gcc@:8", msg="Dorado requires at least gcc@9 to compile.")
+ conflicts("%gcc@13:", msg="Dorado will not build with gcc@13 and newer.")
+
+ patch("cmake-htslib.patch")
+
+ def setup_build_environment(self, env):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libdeflate"].prefix.lib64)
+ env.prepend_path("LIBRARY_PATH", self.spec["libdeflate"].prefix.lib64)
+
+ def cmake_args(self):
+ htslib_prefix = self.spec["htslib"].prefix
+ args = [f"-DHTSLIB_PREFIX={htslib_prefix}", f"-DDORADO_INSTALL_PATH={self.prefix}"]
+ return args
diff --git a/var/spack/repos/builtin/packages/dorian3d-dlib/package.py b/var/spack/repos/builtin/packages/dorian3d-dlib/package.py
index 74951a4a92..d68366dd08 100644
--- a/var/spack/repos/builtin/packages/dorian3d-dlib/package.py
+++ b/var/spack/repos/builtin/packages/dorian3d-dlib/package.py
@@ -17,5 +17,7 @@ class Dorian3dDlib(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0:", type="build")
depends_on("opencv+calib3d+features2d+highgui+imgproc+imgcodecs+flann")
diff --git a/var/spack/repos/builtin/packages/dos2unix/package.py b/var/spack/repos/builtin/packages/dos2unix/package.py
index 29465bff03..cc90aae1b7 100644
--- a/var/spack/repos/builtin/packages/dos2unix/package.py
+++ b/var/spack/repos/builtin/packages/dos2unix/package.py
@@ -22,6 +22,8 @@ class Dos2unix(MakefilePackage):
version("7.4.2", sha256="6035c58df6ea2832e868b599dfa0d60ad41ca3ecc8aa27822c4b7a9789d3ae01")
version("7.3.4", sha256="8ccda7bbc5a2f903dafd95900abb5bf5e77a769b572ef25150fde4056c5f30c5")
+ depends_on("c", type="build") # generated
+
depends_on("gettext")
executables = [r"^dos2unix$"]
diff --git a/var/spack/repos/builtin/packages/dosfstools/package.py b/var/spack/repos/builtin/packages/dosfstools/package.py
index 6d89720b87..f54245d7a3 100644
--- a/var/spack/repos/builtin/packages/dosfstools/package.py
+++ b/var/spack/repos/builtin/packages/dosfstools/package.py
@@ -15,13 +15,21 @@ class Dosfstools(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("4.2", sha256="355a6725524b50e64ae94060ed28579e0e004c519fc964f7085188cd87a99ba7")
version("4.1", sha256="8ff9c2dcc01551fe9de8888cb41eb1051fd58bdf1ab3a93d3d88916f0a4ffd1b")
version("4.0", sha256="77975e289e695cb8c984a3c0a15a3bbf3af90be83c26983d43abcde9ec48eea5")
+ depends_on("c", type="build")
+
depends_on("automake", type="build")
depends_on("autoconf", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("gettext", when="@4.2:") # for HAVE_ICONV
+
+ @when("@4.2:")
+ def autoreconf(self, spec, prefix):
+ Executable("./autogen.sh")()
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/dotconf/package.py b/var/spack/repos/builtin/packages/dotconf/package.py
index 43ddf55924..d0d30b9ba3 100644
--- a/var/spack/repos/builtin/packages/dotconf/package.py
+++ b/var/spack/repos/builtin/packages/dotconf/package.py
@@ -16,6 +16,8 @@ class Dotconf(AutotoolsPackage):
version("1.3", sha256="7f1ecf40de1ad002a065a321582ed34f8c14242309c3547ad59710ae3c805653")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py b/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py
index b7b0373807..ea64a93377 100644
--- a/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py
+++ b/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import platform
from os import symlink
from spack.package import *
@@ -16,36 +17,78 @@ class DotnetCoreSdk(Package):
license("MIT")
- version(
- "6.0.2",
- url="https://download.visualstudio.microsoft.com/download/pr/e7acb87d-ab08-4620-9050-b3e80f688d36/e93bbadc19b12f81e3a6761719f28b47/dotnet-sdk-6.0.102-linux-x64.tar.gz",
- sha256="9bdd4dacdf9a23d386f207ec19260afd36a7fb7302233c9abc0b47e65ffc3119",
- preferred=True,
- )
-
- version(
- "5.0.4",
- url="https://download.visualstudio.microsoft.com/download/pr/73a9cb2a-1acd-4d20-b864-d12797ca3d40/075dbe1dc3bba4aa85ca420167b861b6/dotnet-sdk-5.0.201-linux-x64.tar.gz",
- sha256="9ff77087831e8ca32719566ec9ef537e136cfc02c5ff565e53f5509cc6e7b341",
- )
-
- version(
- "3.1.13",
- url="https://download.visualstudio.microsoft.com/download/pr/ab82011d-2549-4e23-a8a9-a2b522a31f27/6e615d6177e49c3e874d05ee3566e8bf/dotnet-sdk-3.1.407-linux-x64.tar.gz",
- sha256="a744359910206fe657c3a02dfa54092f288a44c63c7c86891e866f0678a7e911",
- )
-
- version(
- "2.1.300",
- url="https://download.microsoft.com/download/8/8/5/88544F33-836A-49A5-8B67-451C24709A8F/dotnet-sdk-2.1.300-linux-x64.tar.gz",
- sha256="fabca4c8825182ff18e5a2f82dfe75aecd10260ee9e7c85a8c4b3d108e5d8e1b",
- )
+ if platform.system() == "Linux" and platform.machine() == "x86_64":
+ version(
+ "8.0.4",
+ url="https://download.visualstudio.microsoft.com/download/pr/0a1b3cbd-b4af-4d0d-9ed7-0054f0e200b4/4bcc533c66379caaa91770236667aacb/dotnet-sdk-8.0.204-linux-x64.tar.gz",
+ sha256="0ec834dc0f11a994057cd05d84c6250db726457f2fe308091d50543a5285dd15",
+ preferred=True,
+ )
+
+ version(
+ "7.0.18",
+ url="https://download.visualstudio.microsoft.com/download/pr/a256265b-0ec6-4b63-b943-bc27bcfc98c0/47c8bbd54d7f6dbfe0ca4985c410282e/dotnet-sdk-7.0.408-linux-x64.tar.gz",
+ sha256="e72beb77f59d5c55de46f52cce01b68f244e28058f646f1ea4ecf8a35b177e58",
+ )
+
+ version(
+ "6.0.25",
+ url="https://download.visualstudio.microsoft.com/download/pr/1cac4d08-3025-4c00-972d-5c7ea446d1d7/a83bc5cbedf8b90495802ccfedaeb2e6/dotnet-sdk-6.0.417-linux-x64.tar.gz",
+ sha256="1b7c5ea04ccb817e1a411c9e1f89d7a4e54c0842b01b457e141bbc254ce97ba2",
+ )
+
+ version(
+ "6.0.2",
+ url="https://download.visualstudio.microsoft.com/download/pr/e7acb87d-ab08-4620-9050-b3e80f688d36/e93bbadc19b12f81e3a6761719f28b47/dotnet-sdk-6.0.102-linux-x64.tar.gz",
+ sha256="9bdd4dacdf9a23d386f207ec19260afd36a7fb7302233c9abc0b47e65ffc3119",
+ deprecated=True,
+ )
+
+ version(
+ "5.0.4",
+ url="https://download.visualstudio.microsoft.com/download/pr/73a9cb2a-1acd-4d20-b864-d12797ca3d40/075dbe1dc3bba4aa85ca420167b861b6/dotnet-sdk-5.0.201-linux-x64.tar.gz",
+ sha256="9ff77087831e8ca32719566ec9ef537e136cfc02c5ff565e53f5509cc6e7b341",
+ deprecated=True,
+ )
+
+ version(
+ "3.1.13",
+ url="https://download.visualstudio.microsoft.com/download/pr/ab82011d-2549-4e23-a8a9-a2b522a31f27/6e615d6177e49c3e874d05ee3566e8bf/dotnet-sdk-3.1.407-linux-x64.tar.gz",
+ sha256="a744359910206fe657c3a02dfa54092f288a44c63c7c86891e866f0678a7e911",
+ deprecated=True,
+ )
+
+ version(
+ "2.1.300",
+ url="https://download.microsoft.com/download/8/8/5/88544F33-836A-49A5-8B67-451C24709A8F/dotnet-sdk-2.1.300-linux-x64.tar.gz",
+ sha256="fabca4c8825182ff18e5a2f82dfe75aecd10260ee9e7c85a8c4b3d108e5d8e1b",
+ deprecated=True,
+ )
+ elif platform.system() == "Linux" and platform.machine() == "aarch64":
+ version(
+ "8.0.4",
+ url="https://download.visualstudio.microsoft.com/download/pr/1e449990-2934-47ee-97fb-b78f0e587c98/1c92c33593932f7a86efa5aff18960ed/dotnet-sdk-8.0.204-linux-arm64.tar.gz",
+ sha256="c6ecb0c1897e217e8d20153a0119276ee1091c0600aecf2aca8e674c3575942e",
+ preferred=True,
+ )
+
+ version(
+ "7.0.18",
+ url="https://download.visualstudio.microsoft.com/download/pr/460f951f-0944-442b-8474-555e20394ca8/5fcf6b1845d87d772f919737b3dd5f55/dotnet-sdk-7.0.408-linux-arm64.tar.gz",
+ sha256="dd9a8794561a8b9c658a2ba832328449a34b0dd0cdcb79e31d6efc2d0c9a8efc",
+ )
+
+ version(
+ "6.0.25",
+ url="https://download.visualstudio.microsoft.com/download/pr/03972b46-ddcd-4529-b8e0-df5c1264cd98/285a1f545020e3ddc47d15cf95ca7a33/dotnet-sdk-6.0.417-linux-arm64.tar.gz",
+ sha256="c071e936442b90b80a941ab177b8c7851bc5377cf842cc1e61922b3d7fefeb0e",
+ )
variant("telemetry", default=False, description="allow collection of telemetry data")
- def setup_build_environment(self, env):
- if "-telemetry" in self.spec:
- env.set("DOTNET_CLI_TELEMETRY_OPTOUT", 1)
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("~telemetry"):
+ env.set("DOTNET_CLI_TELEMETRY_OPTOUT", "1")
def install(self, spec, prefix):
mkdirp("bin")
diff --git a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py
index 2c9675363c..168e51eb91 100644
--- a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py
+++ b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py
@@ -23,9 +23,13 @@ class DoubleBatchedFftLibrary(CMakePackage):
version("main", branch="main")
version("develop", branch="develop")
+ version("0.5.1", sha256="3651b982b6b5649d2bf95a3391a0a28d6637c51c642379d9708de88ad8d45f61")
+ version("0.5.0", sha256="cbd2ecf039cc40830e57a8af8295abf2083ce3b1a333279a8c17762f41131fff")
version("0.4.0", sha256="f3518012b632c92c2a933d70a040d6b0eee2d631ab6b1881a192a8d1624f242d")
version("0.3.6", sha256="ff163251d77d3c686563141e871c702bf4997c0302d53616add55d6cf9b02d28")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Shared library")
variant("sycl", default=True, description="Build bbfft-sycl")
variant("level-zero", default=True, when="~sycl", description="Build bbfft-level-zero")
@@ -40,10 +44,8 @@ class DoubleBatchedFftLibrary(CMakePackage):
def cmake_args(self):
cxx_compiler = os.path.basename(self.compiler.cxx)
- if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx", "dpcpp"]:
- raise InstallError(
- "The Double-Batched FFT Library requires the oneapi DPC++/C++ Compiler"
- )
+ if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx"]:
+ raise InstallError("The Double-Batched FFT Library requires the oneapi C++ Compiler")
return [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
diff --git a/var/spack/repos/builtin/packages/double-conversion/package.py b/var/spack/repos/builtin/packages/double-conversion/package.py
index ef644be4a7..380ff36ca6 100644
--- a/var/spack/repos/builtin/packages/double-conversion/package.py
+++ b/var/spack/repos/builtin/packages/double-conversion/package.py
@@ -33,5 +33,8 @@ class DoubleConversion(CMakePackage):
version("1.1.4", sha256="24b5edce8c88f0f632c83e60e0bde11252656dc3b714ba195619c1798ff28834")
version("1.1.3", sha256="f0d1b8621592a3cf010c04c3e1c0f08455fc0fc7ee22e1583e2a63dc6d3e3871")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
def cmake_args(self):
return ["-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true"]
diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py
index b47a6f7aea..2ca28689d7 100644
--- a/var/spack/repos/builtin/packages/doxygen/package.py
+++ b/var/spack/repos/builtin/packages/doxygen/package.py
@@ -20,6 +20,9 @@ class Doxygen(CMakePackage):
license("GPL-2.0-or-later")
+ version("1.12.0", sha256="5ca35e1258020df5fe8b21c3656aed156c317def4a81b7fe52f452edc9f35768")
+ version("1.11.0", sha256="1fea49c69e51fec3dd2599947f6d48d9b1268bd5115b1bb08dffefc1fd5d19ee")
+ version("1.10.0", sha256="795692a53136ca9bb9a6cd72656968af7858a78be7d6d011e12ab1dce6b9533c")
version("1.9.8", sha256="77371e8a58d22d5e03c52729844d1043e9cbf8d0005ec5112ffa4c8f509ddde8")
version("1.9.7", sha256="691777992a7240ed1f822a5c2ff2c4273b57c1cf9fc143553d87f91a0c5970ee")
version("1.9.6", sha256="2a3ee47f7276b759f74bac7614c05a1296a5b028d3f6a79a88e4c213db78e7dc")
@@ -39,6 +42,10 @@ class Doxygen(CMakePackage):
version("1.8.11", sha256="86263cb4ce1caa41937465f73f644651bd73128d685d35f18dea3046c7c42c12")
version("1.8.10", sha256="0ac08900e5dc3ab5b65976991bf197623a7cc33ec3b32fe29360fb55d0c16b60")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# graphviz appears to be a run-time optional dependency
variant("graphviz", default=False, description="Build with dot command support from Graphviz.")
@@ -76,6 +83,11 @@ class Doxygen(CMakePackage):
return variants
depends_on("cmake@2.8.12:", type="build")
+ depends_on("cmake@3.2:", type="build", when="@1.8.16:")
+ depends_on("cmake@3.3:", type="build", when="@1.8.18:")
+ depends_on("cmake@3.12:", type="build", when="@1.9.8:")
+ depends_on("cmake@3.14:", type="build", when="@1.10:")
+
depends_on("python", type="build") # 2 or 3 OK; used in CMake build
depends_on("iconv")
depends_on("flex", type="build")
@@ -85,6 +97,10 @@ class Doxygen(CMakePackage):
depends_on("flex@2.5.39", type="build", when="@1.8.10")
depends_on("bison@2.7:", type="build", when="@1.8.10:")
+ # originally bundled dependencies
+ depends_on("spdlog", when="@1.9.8:")
+ depends_on("sqlite", when="@1.10:")
+
# optional dependencies
depends_on("graphviz", when="+graphviz", type="run")
depends_on("mscgen", when="+mscgen", type="run")
@@ -108,28 +124,34 @@ class Doxygen(CMakePackage):
when="@1.9.4 %gcc@12:",
)
+ # https://github.com/doxygen/doxygen/pull/10896: use correct option name with system sqlite3
+ patch(
+ "https://github.com/doxygen/doxygen/commit/83de58c5f4f685a129127c2501f4fccd9557f6c4.patch?full_index=1",
+ sha256="8b46b763b3f0a2726f765141cbfa3eb6efd746531a4d689531e42ff56fc334e2",
+ when="@1.10:1.11.0",
+ )
+
# Some GCC 7.x get stuck in an infinite loop
conflicts("%gcc@7.0:7.9", when="@1.9:")
def patch(self):
- if self.spec["iconv"].name == "libc":
+ if self.spec["iconv"].name != "libiconv":
return
- # On Linux systems, iconv is provided by libc. Since CMake finds the
- # symbol in libc, it does not look for libiconv, which leads to linker
- # errors. This makes sure that CMake always looks for the external
- # libconv instead.
- filter_file(
- "check_function_exists(iconv_open ICONV_IN_GLIBC)",
- "set(ICONV_IN_GLIBC FALSE)",
- join_path("cmake", "FindIconv.cmake"),
- string=True,
- )
+
+ if self.spec.satisfies("@:1.11"):
+ # On Linux systems, iconv is provided by libc. Since CMake finds the
+ # symbol in libc, it does not look for libiconv, which leads to linker
+ # errors. This makes sure that CMake always looks for the external
+ # libconv instead.
+ filter_file(
+ "check_function_exists(iconv_open ICONV_IN_GLIBC)",
+ "set(ICONV_IN_GLIBC FALSE)",
+ join_path("cmake", "FindIconv.cmake"),
+ string=True,
+ )
def cmake_args(self):
- args = [
- # Doxygen's build system uses CMake's deprecated `FindPythonInterp`,
- # which can get confused by other `python` executables in the PATH.
- # See issue: https://github.com/spack/spack/issues/28215
- self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path)
+ return [
+ self.define("use_sys_spdlog", self.spec.satisfies("@1.9.8:")),
+ self.define("use_sys_sqlite3", self.spec.satisfies("@1.10:")),
]
- return args
diff --git a/var/spack/repos/builtin/packages/dpcpp/package.py b/var/spack/repos/builtin/packages/dpcpp/package.py
deleted file mode 100644
index 4fa5a00abb..0000000000
--- a/var/spack/repos/builtin/packages/dpcpp/package.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Dpcpp(CMakePackage):
- """Data Parallel C++ compiler: Intel's implementation of SYCL programming model"""
-
- homepage = "https://intel.github.io/llvm-docs/"
- git = "https://github.com/intel/llvm.git"
-
- license("Apache-2.0")
-
- version("develop", branch="sycl")
- version("2021.09", commit="bd68232bb96386bf7649345c0557ba520e73c02d")
- version("2021.12", commit="27f59d8906fcc8aece7ff6aa570ccdee52168c2d")
-
- maintainers("ravil-mobile")
- variant("cuda", default=False, description="switch from OpenCL to CUDA")
- variant("rocm", default=False, description="switch from OpenCL to ROCm")
- variant(
- "rocm-platform",
- default="AMD",
- values=("AMD", "NVIDIA"),
- multi=False,
- description="choose ROCm backend",
- )
- variant("openmp", default=False, description="build with OpenMP without target offloading")
- variant("esimd-cpu", default=False, description="build with ESIMD_CPU support")
- variant("assertions", default=False, description="build with assertions")
- variant("docs", default=False, description="build Doxygen documentation")
- variant("werror", default=False, description="treat warnings as errors")
- variant("shared", default=False, description="build shared libraries")
- variant("remangle_libclc", default=True, description="remangle libclc gen. variants")
- variant("lld", default=False, description="use LLD linker for build")
-
- depends_on("cmake@3.16.2:", type="build")
- depends_on("ninja@1.10.0:", type="build")
-
- depends_on("cuda@10.2.0:11.4.999", when="+cuda")
-
- # NOTE: AMD HIP needs to be tested; it will be done in the next update
- # depends_on('cuda@10.2.0:10.2.999', when='rocm-platform=NVIDIA', type='build')
- # depends_on('hip@4.0.0:', when='+rocm', type='build')
-
- root_cmakelists_dir = "llvm"
-
- def cmake_args(self):
- llvm_external_projects = "sycl;llvm-spirv;opencl;libdevice;xpti;xptifw"
-
- if "+openmp" in self.spec:
- llvm_external_projects += ";openmp"
-
- sycl_dir = os.path.join(self.stage.source_path, "sycl")
- spirv_dir = os.path.join(self.stage.source_path, "llvm-spirv")
- xpti_dir = os.path.join(self.stage.source_path, "xpti")
- xptifw_dir = os.path.join(self.stage.source_path, "xptifw")
- libdevice_dir = os.path.join(self.stage.source_path, "libdevice")
- llvm_enable_projects = "clang;" + llvm_external_projects
- libclc_targets_to_build = ""
- sycl_build_pi_rocm_platform = self.spec.variants["rocm-platform"].value
-
- if self.spec.satisfies("target=x86_64:"):
- llvm_targets_to_build = "X86"
- elif self.spec.satisfies("target=aarch64:"):
- llvm_targets_to_build = "ARM;AArch64"
- else:
- raise InstallError(
- "target is not supported. " "This package only works on x86_64 or aarch64"
- )
-
- is_cuda = "+cuda" in self.spec
- is_rocm = "+rocm" in self.spec
-
- if is_cuda or is_rocm:
- llvm_enable_projects += ";libclc"
-
- if is_cuda:
- llvm_targets_to_build += ";NVPTX"
- libclc_targets_to_build = "nvptx64--;nvptx64--nvidiacl"
-
- if is_rocm:
- if sycl_build_pi_rocm_platform == "AMD":
- llvm_targets_to_build += ";AMDGPU"
- libclc_targets_to_build += ";amdgcn--;amdgcn--amdhsa"
- elif sycl_build_pi_rocm_platform and not is_cuda:
- llvm_targets_to_build += ";NVPTX"
- libclc_targets_to_build += ";nvptx64--;nvptx64--nvidiacl"
-
- args = [
- self.define_from_variant("LLVM_ENABLE_ASSERTIONS", "assertions"),
- self.define("LLVM_TARGETS_TO_BUILD", llvm_targets_to_build),
- self.define("LLVM_EXTERNAL_PROJECTS", llvm_external_projects),
- self.define("LLVM_EXTERNAL_SYCL_SOURCE_DIR", sycl_dir),
- self.define("LLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR", spirv_dir),
- self.define("LLVM_EXTERNAL_XPTI_SOURCE_DIR", xpti_dir),
- self.define("XPTI_SOURCE_DIR", xpti_dir),
- self.define("LLVM_EXTERNAL_XPTIFW_SOURCE_DIR", xptifw_dir),
- self.define("LLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR", libdevice_dir),
- self.define("LLVM_ENABLE_PROJECTS", llvm_enable_projects),
- self.define("LIBCLC_TARGETS_TO_BUILD", libclc_targets_to_build),
- self.define_from_variant("SYCL_BUILD_PI_CUDA", "cuda"),
- self.define_from_variant("SYCL_BUILD_PI_ROCM", "rocm"),
- self.define("SYCL_BUILD_PI_ROCM_PLATFORM", sycl_build_pi_rocm_platform),
- self.define("LLVM_BUILD_TOOLS", True),
- self.define_from_variant("SYCL_ENABLE_WERROR", "werror"),
- self.define("SYCL_INCLUDE_TESTS", True),
- self.define_from_variant("LIBCLC_GENERATE_REMANGLED_VARIANTS", "remangle_libclc"),
- self.define_from_variant("LLVM_ENABLE_DOXYGEN", "docs"),
- self.define_from_variant("LLVM_ENABLE_SPHINX", "docs"),
- self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
- self.define("SYCL_ENABLE_XPTI_TRACING", "ON"),
- self.define_from_variant("LLVM_ENABLE_LLD", "lld"),
- self.define_from_variant("SYCL_BUILD_PI_ESIMD_CPU", "esimd-cpu"),
- ]
-
- if is_cuda or (is_rocm and sycl_build_pi_rocm_platform == "NVIDIA"):
- args.append(self.define("CUDA_TOOLKIT_ROOT_DIR", self.spec["cuda"].prefix))
-
- if "+openmp" in self.spec:
- omp_dir = os.path.join(self.stage.source_path, "openmp")
- args.extend(
- [
- self.define("LLVM_EXTERNAL_OPENMP_SOURCE_DIR", omp_dir),
- self.define("OPENMP_ENABLE_LIBOMPTARGET", False),
- ]
- )
-
- if self.compiler.name == "gcc":
- gcc_prefix = ancestor(self.compiler.cc, 2)
- args.append(self.define("GCC_INSTALL_PREFIX", gcc_prefix))
-
- return args
-
- def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- env.set("CUDA_LIB_PATH", "{0}/lib64/stubs".format(self.spec["cuda"].prefix))
-
- @run_after("install")
- def post_install(self):
- clang_cpp_path = os.path.join(self.spec.prefix.bin, "clang++")
- dpcpp_path = os.path.join(self.spec.prefix.bin, "dpcpp")
-
- real_clang_cpp_path = os.path.realpath(clang_cpp_path)
- os.symlink(real_clang_cpp_path, dpcpp_path)
-
- def setup_run_environment(self, env):
- bin_path = self.spec.prefix.bin
- for env_var_name, compiler in zip(["CC", "CXX"], ["clang", "clang++"]):
- env.set(env_var_name, os.path.join(bin_path, compiler))
-
- include_env_vars = ["C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", "INCLUDE"]
- for var in include_env_vars:
- env.prepend_path(var, self.prefix.include)
- env.prepend_path(var, self.prefix.include.sycl)
-
- sycl_build_pi_rocm_platform = self.spec.variants["rocm-platform"].value
- if "+cuda" in self.spec or sycl_build_pi_rocm_platform == "NVIDIA":
- env.prepend_path("PATH", self.spec["cuda"].prefix.bin)
- env.set("CUDA_TOOLKIT_ROOT_DIR", self.spec["cuda"].prefix)
diff --git a/var/spack/repos/builtin/packages/dpdk/package.py b/var/spack/repos/builtin/packages/dpdk/package.py
index 590fe54ef4..2d86cf2178 100644
--- a/var/spack/repos/builtin/packages/dpdk/package.py
+++ b/var/spack/repos/builtin/packages/dpdk/package.py
@@ -29,6 +29,9 @@ class Dpdk(MakefilePackage, MesonPackage):
version("19.05", sha256="5fea95cb726e6adaa506dab330e79563ccd4dacf03f126c826aabdced605d32b")
version("19.02", sha256="04885d32c86fff5aefcfffdb8257fed405233602dbcd22f8298be13c2e285a50")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("target=aarch64:", msg="DPDK is not supported on aarch64.")
# Build system
diff --git a/var/spack/repos/builtin/packages/draco/package.py b/var/spack/repos/builtin/packages/draco/package.py
index fd045639ab..b4079b9b18 100644
--- a/var/spack/repos/builtin/packages/draco/package.py
+++ b/var/spack/repos/builtin/packages/draco/package.py
@@ -20,6 +20,8 @@ class Draco(CMakePackage):
license("BSD-3-Clause-Open-MPI")
version("develop", branch="develop")
+ version("7.19.0", sha256="04b33cfea244052efcdd40d2b9dd79348749d34647aaf4dfcb15cdfdbe989783")
+ version("7.18.0", sha256="b210e202a06ffdaf149193b5cba164411fd508e20e573e1dfc46d1f56e3fffaa")
version("7.14.1", sha256="b05c75f1b8ea1d4fac4900d897fb1c948b470826b174ed8b97b32c6da9f030bf")
version("7.14.0", sha256="c8abf293d81c1b8020907557c20d8d2f2edf9ac7ae60a534eab052a8c3b7f99d")
version("7.13.0", sha256="07a443df71d8d3720ced98f86821f714d2bfaa9f17a177c7f0465a59a1e9e719")
@@ -75,6 +77,7 @@ class Draco(CMakePackage):
depends_on("lapack", when="+lapack")
depends_on("libquo@1.3.1:", when="@7.4.0:+libquo")
depends_on("metis", when="+parmetis")
+ depends_on("metis@5:+no_warning", when="@7.19:+parmetis")
depends_on("parmetis", when="+parmetis")
depends_on("qt", when="+qt", type=("build", "link", "run"))
depends_on("superlu-dist@:5", when="@:7.6+superlu_dist")
@@ -82,6 +85,8 @@ class Draco(CMakePackage):
conflicts("+cuda", when="@:7.6")
conflicts("+caliper", when="@:7.7")
+ with when("@7.19.0:"):
+ conflicts("gcc@:9.0")
# Fix python discovery.
patch("d710.patch", when="@7.1.0")
@@ -108,7 +113,7 @@ class Draco(CMakePackage):
"-DUSE_QT={0}".format("ON" if "+qt" in self.spec else "OFF"),
]
)
- if "+fast_fma" in self.spec:
+ if self.spec.satisfies("+fast_fma"):
options.extend(
[
"-DDRACO_ROUNDOFF_MODE={0}".format(
diff --git a/var/spack/repos/builtin/packages/dracut/package.py b/var/spack/repos/builtin/packages/dracut/package.py
index b29f42426f..7152ee96b2 100644
--- a/var/spack/repos/builtin/packages/dracut/package.py
+++ b/var/spack/repos/builtin/packages/dracut/package.py
@@ -16,6 +16,9 @@ class Dracut(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("059", sha256="eabf0bb685420c1e1d5475b6855ef787104508f0135ff570312845256e0fcecf")
version("050", sha256="f9dbf18597e5929221365964293212c8c9ffb7d84529c5a338c834ecab06e333")
+ depends_on("c", type="build") # generated
+
depends_on("kmod")
diff --git a/var/spack/repos/builtin/packages/dramsim2/package.py b/var/spack/repos/builtin/packages/dramsim2/package.py
index 3a896ffcd6..fe31b2bb46 100644
--- a/var/spack/repos/builtin/packages/dramsim2/package.py
+++ b/var/spack/repos/builtin/packages/dramsim2/package.py
@@ -20,6 +20,8 @@ class Dramsim2(MakefilePackage):
version("2.2.2", sha256="96d0257eafb41e38ffa4f13e3ef3759567bdde7fa3329403f324abd0ddf8d015")
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
if spec.satisfies("platform=darwin"):
make("libdramsim.dylib")
diff --git a/var/spack/repos/builtin/packages/dramsim3/package.py b/var/spack/repos/builtin/packages/dramsim3/package.py
index 85668f3e9e..a96546d041 100644
--- a/var/spack/repos/builtin/packages/dramsim3/package.py
+++ b/var/spack/repos/builtin/packages/dramsim3/package.py
@@ -23,6 +23,9 @@ class Dramsim3(Package):
version("1.0.0", sha256="064b732256f3bec9b553e00bcbc9a1d82172ec194f2b69c8797f585200b12566")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/dray/package.py b/var/spack/repos/builtin/packages/dray/package.py
index e7567908be..9c0a38721d 100644
--- a/var/spack/repos/builtin/packages/dray/package.py
+++ b/var/spack/repos/builtin/packages/dray/package.py
@@ -8,6 +8,7 @@ import socket
import llnl.util.tty as tty
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -45,16 +46,20 @@ class Dray(Package, CudaPackage):
license("BSD-3-Clause")
- version("develop", branch="develop", submodules="True")
- version("0.1.8", sha256="ae78ca6a5a31f06f6400a4a1ff6fc1d75347c8b41027a80662179f5b877eee30")
- version("0.1.7", sha256="11ea794c1a24d7ed0d76bad7209d62bafc033ec40a2ea3a00e68fe598c6aa46d")
- version("0.1.6", sha256="43f39039599e3493cbbaeaf5621b611bef301ff504bed6e32c98f30bb2179e92")
- version("0.1.5", sha256="aaf0975561a8e7910b9353e2dc30bd78abf9f01c306ec042422b7da223d3a8b8")
- version("0.1.4", sha256="e763a3aa537b23486a4788f9d68db0a3eb545f6a2e617cd7c8a876682ca2d0a0")
- version("0.1.3", sha256="b2f624a072463189997343b1ed911cc34c9bb1b6c7f0c3e48efeb40c05dd0d92")
- version("0.1.2", sha256="46937f20124b28dc78a634e8e063a3e7a3bbfd9f424ce2680b08417010c376da")
- version("0.1.1", sha256="e5daa49ee3367c087f5028dc5a08655298beb318014c6f3f65ef4a08fcbe346c")
- version("0.1.0", sha256="8b341138e1069361351e0a94478608c5af479cca76e2f97d556229aed45c0169")
+ with default_args(deprecated=True): # part of ascent
+ version("develop", branch="develop", submodules="True")
+ version("0.1.8", sha256="ae78ca6a5a31f06f6400a4a1ff6fc1d75347c8b41027a80662179f5b877eee30")
+ version("0.1.7", sha256="11ea794c1a24d7ed0d76bad7209d62bafc033ec40a2ea3a00e68fe598c6aa46d")
+ version("0.1.6", sha256="43f39039599e3493cbbaeaf5621b611bef301ff504bed6e32c98f30bb2179e92")
+ version("0.1.5", sha256="aaf0975561a8e7910b9353e2dc30bd78abf9f01c306ec042422b7da223d3a8b8")
+ version("0.1.4", sha256="e763a3aa537b23486a4788f9d68db0a3eb545f6a2e617cd7c8a876682ca2d0a0")
+ version("0.1.3", sha256="b2f624a072463189997343b1ed911cc34c9bb1b6c7f0c3e48efeb40c05dd0d92")
+ version("0.1.2", sha256="46937f20124b28dc78a634e8e063a3e7a3bbfd9f424ce2680b08417010c376da")
+ version("0.1.1", sha256="e5daa49ee3367c087f5028dc5a08655298beb318014c6f3f65ef4a08fcbe346c")
+ version("0.1.0", sha256="8b341138e1069361351e0a94478608c5af479cca76e2f97d556229aed45c0169")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("openmp", default=True, description="Build OpenMP backend")
variant("shared", default=True, description="Build as shared libs")
@@ -81,9 +86,10 @@ class Dray(Package, CudaPackage):
depends_on("apcomp~shared", when="~shared")
depends_on("apcomp+shared", when="+shared")
- depends_on("raja@0.12.0:")
+ depends_on("raja@0.14.0:0.14", when="@0.1.8:")
depends_on("raja@:0.14", when="@0.1.7:")
depends_on("raja@:0.13", when="@:0.1.6")
+ depends_on("raja@0.12.0:")
depends_on("raja~cuda", when="~cuda")
depends_on("raja+cuda", when="+cuda")
propagate_cuda_arch("raja")
@@ -114,19 +120,13 @@ class Dray(Package, CudaPackage):
"""
with working_dir("spack-build", create=True):
host_cfg_fname = self.create_host_config(spec, prefix)
- cmake_args = []
- # if we have a static build, we need to avoid any of
- # spack's default cmake settings related to rpaths
- # (see: https://github.com/LLNL/spack/issues/2658)
- if "+shared" in spec:
- cmake_args.extend(std_cmake_args)
- else:
- for arg in std_cmake_args:
- if arg.count("RPATH") == 0:
- cmake_args.append(arg)
- cmake_args.extend(["-C", host_cfg_fname, "../src"])
print("Configuring Devil Ray...")
- cmake(*cmake_args)
+ cmake(
+ *CMakeBuilder.std_args(self, generator="Unix Makefiles"),
+ "-C",
+ host_cfg_fname,
+ "../src",
+ )
print("Building Devil Ray...")
make()
# run unit tests if requested
@@ -168,7 +168,7 @@ class Dray(Package, CudaPackage):
# Find and record what CMake is used
##############################################
- if "+cmake" in spec:
+ if spec.satisfies("+cmake"):
cmake_exe = spec["cmake"].command.path
else:
cmake_exe = which("cmake")
@@ -205,7 +205,7 @@ class Dray(Package, CudaPackage):
cfg.write("# cpp compiler used by spack\n")
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
# if we are using compiler wrappers on cray systems
@@ -218,7 +218,7 @@ class Dray(Package, CudaPackage):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
- if "+blt_find_mpi" in spec:
+ if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))
@@ -256,7 +256,7 @@ class Dray(Package, CudaPackage):
cfg.write("# CUDA Support\n")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cfg.write(cmake_cache_entry("ENABLE_CUDA", "ON"))
if "cuda_arch" in spec.variants:
cuda_value = spec.variants["cuda_arch"].value
@@ -265,13 +265,13 @@ class Dray(Package, CudaPackage):
else:
cfg.write(cmake_cache_entry("ENABLE_CUDA", "OFF"))
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF"))
# shared vs static libs
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
@@ -279,7 +279,7 @@ class Dray(Package, CudaPackage):
#######################
# Unit Tests
#######################
- if "+test" in spec:
+ if spec.satisfies("+test"):
cfg.write(cmake_cache_entry("DRAY_ENABLE_TESTS", "ON"))
# we need this to control BLT tests
cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON"))
@@ -291,7 +291,7 @@ class Dray(Package, CudaPackage):
#######################
# Utilities
#######################
- if "+utils" in spec:
+ if spec.satisfies("+utils"):
cfg.write(cmake_cache_entry("DRAY_ENABLE_UTILS", "ON"))
else:
cfg.write(cmake_cache_entry("DRAY_ENABLE_UTILS", "OFF"))
@@ -299,7 +299,7 @@ class Dray(Package, CudaPackage):
#######################
# Logging
#######################
- if "+logging" in spec:
+ if spec.satisfies("+logging"):
cfg.write(cmake_cache_entry("ENABLE_LOGGING", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_LOGGING", "OFF"))
@@ -307,7 +307,7 @@ class Dray(Package, CudaPackage):
#######################
# Status
#######################
- if "+stats" in spec:
+ if spec.satisfies("+stats"):
cfg.write(cmake_cache_entry("ENABLE_STATS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_STATS", "OFF"))
diff --git a/var/spack/repos/builtin/packages/drill/package.py b/var/spack/repos/builtin/packages/drill/package.py
index 0759e0c0e4..77a3d4205c 100644
--- a/var/spack/repos/builtin/packages/drill/package.py
+++ b/var/spack/repos/builtin/packages/drill/package.py
@@ -14,17 +14,34 @@ class Drill(Package):
"""
homepage = "https://drill.apache.org/"
- url = "https://www-eu.apache.org/dist/drill/drill-1.17.0/apache-drill-1.17.0.tar.gz"
-
- license("Apache-2.0")
-
- version("1.17.0", sha256="a3d2d544bcc32b915fb53fced0f982670bd6fe2abd764423e566a5f6b54debf1")
- version("1.16.0", sha256="fd195d2b38f393459b37d8f13ac1f36cdbe38495eabb08252da38e3544e87839")
- version("1.15.0", sha256="188c1d0df28e50f0265f4bc3c5871b4e7abc9450a4e5a7dbe7f0b23146bec76b")
- version("1.14.0", sha256="1145bdbb723119f271d32daf4cdd77cdeebe88ddcb7d04facd585b715bb5723b")
- version("1.13.0", sha256="8da6d56f75ae01e0bee6176095d32760e7183dd0200f10ee68b8cd3f882def6a")
-
+ url = "https://dist.apache.org/repos/dist/release/drill/1.17.0/apache-drill-1.17.0.tar.gz"
+ git = "https://github.com/apache/drill.git"
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.21.2", sha256="77e2e7438f1b4605409828eaa86690f1e84b038465778a04585bd8fb21d68e3b")
+ version("1.20.3", sha256="1520cd2524cf8e0ce45fcf02e8e5e3e044465c6dacad853f9fadf9c918863cad")
+ with default_args(deprecated=True):
+ # Log4Shell vulnerability (CVE-2021-44228) affects all versions before 1.20.0
+ version(
+ "1.17.0", sha256="a3d2d544bcc32b915fb53fced0f982670bd6fe2abd764423e566a5f6b54debf1"
+ )
+ version(
+ "1.16.0", sha256="fd195d2b38f393459b37d8f13ac1f36cdbe38495eabb08252da38e3544e87839"
+ )
+ version(
+ "1.15.0", sha256="188c1d0df28e50f0265f4bc3c5871b4e7abc9450a4e5a7dbe7f0b23146bec76b"
+ )
+ version(
+ "1.14.0", sha256="1145bdbb723119f271d32daf4cdd77cdeebe88ddcb7d04facd585b715bb5723b"
+ )
+ version(
+ "1.13.0", sha256="8da6d56f75ae01e0bee6176095d32760e7183dd0200f10ee68b8cd3f882def6a"
+ )
+
+ # pom.xml, requireJavaVersion
depends_on("java@7:", type="run")
+ depends_on("java@8:", type="run", when="@1.14:")
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/drishti/package.py b/var/spack/repos/builtin/packages/drishti/package.py
index 8ea7d53d3b..65e7bca88c 100644
--- a/var/spack/repos/builtin/packages/drishti/package.py
+++ b/var/spack/repos/builtin/packages/drishti/package.py
@@ -24,6 +24,8 @@ class Drishti(PythonPackage):
version("0.4", sha256="bbbb272b4f6f44ae762f6cba28a2c589e15608691c559af0cc2f552590335d7b")
+ depends_on("c", type="build") # generated
+
depends_on("darshan-util", type=("run"))
depends_on("python@3.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/dropwatch/package.py b/var/spack/repos/builtin/packages/dropwatch/package.py
index e003c5602d..1d43a943ee 100644
--- a/var/spack/repos/builtin/packages/dropwatch/package.py
+++ b/var/spack/repos/builtin/packages/dropwatch/package.py
@@ -20,6 +20,8 @@ class Dropwatch(AutotoolsPackage):
version("1.5.4", sha256="8c43d0c15d0cb9ce179fa1fb0610611723689a6f551b23c70a7ddc1cf068e8d2")
version("1.5.3", sha256="b748b66a816c1f94531446c0451da5461a4a31b0949244bb867d741c6ac0148b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/dsdp/package.py b/var/spack/repos/builtin/packages/dsdp/package.py
index 381dba628e..a913c197c4 100644
--- a/var/spack/repos/builtin/packages/dsdp/package.py
+++ b/var/spack/repos/builtin/packages/dsdp/package.py
@@ -23,6 +23,8 @@ class Dsdp(MakefilePackage):
version("5.8", sha256="26aa624525a636de272c0b329e2dfd01a0d5b7827f1c1c76f393d71e37dead70")
+ depends_on("c", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/dsfmt/package.py b/var/spack/repos/builtin/packages/dsfmt/package.py
index 5486455f9d..1c44116a31 100644
--- a/var/spack/repos/builtin/packages/dsfmt/package.py
+++ b/var/spack/repos/builtin/packages/dsfmt/package.py
@@ -23,6 +23,9 @@ class Dsfmt(MakefilePackage):
version("2.2.5", sha256="b7bc498cd140b4808963b1ff9f33b42a491870f54775c1060ecad0e02bcaffb4")
version("2.2.4", sha256="39682961ecfba621a98dbb6610b6ae2b7d6add450d4f08d8d4edd0e10abd8174")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
@property
def libs(self):
return find_libraries("libdSFMT", root=self.prefix, recursive=True)
diff --git a/var/spack/repos/builtin/packages/dsqss/package.py b/var/spack/repos/builtin/packages/dsqss/package.py
index 72e5f5961f..1fb90c9ab0 100644
--- a/var/spack/repos/builtin/packages/dsqss/package.py
+++ b/var/spack/repos/builtin/packages/dsqss/package.py
@@ -21,6 +21,8 @@ class Dsqss(CMakePackage):
version("2.0.3", sha256="11255dd1f1317fb4ac2d6ae95535f027d627d03f5470717cd277dd9ab94496e0")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="build mpi support")
depends_on("mpi", when="+mpi")
@@ -58,7 +60,6 @@ class Dsqss(CMakePackage):
copy(join_path(test01, "std.toml"), ".")
# prepare
- python = self.spec["python"].command
opts = [self.spec.prefix.bin.dla_pre, "std.toml"]
with test_part(self, "test_dla_pre", purpose="prepare dla"):
python(*opts)
diff --git a/var/spack/repos/builtin/packages/dsrc/package.py b/var/spack/repos/builtin/packages/dsrc/package.py
index 4baa53b74b..d7a98f398c 100644
--- a/var/spack/repos/builtin/packages/dsrc/package.py
+++ b/var/spack/repos/builtin/packages/dsrc/package.py
@@ -17,6 +17,8 @@ class Dsrc(MakefilePackage):
version("2.0.2", sha256="6d7abe0d72a501054a2115ccafff2e85e6383de627ec3e94ff4f03b7bb96a806")
+ depends_on("cxx", type="build") # generated
+
parallel = False
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/dssp/package.py b/var/spack/repos/builtin/packages/dssp/package.py
index a5a20a4be5..bc63e22b6e 100644
--- a/var/spack/repos/builtin/packages/dssp/package.py
+++ b/var/spack/repos/builtin/packages/dssp/package.py
@@ -18,6 +18,8 @@ class Dssp(AutotoolsPackage):
version("3.1.4", sha256="496282b4b5defc55d111190ab9f1b615a9574a2f090e7cf5444521c747b272d4")
version("2.3.0", sha256="4c95976d86dc64949cb0807fbd58c7bee5393df0001999405863dc90f05846c6")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -51,7 +53,7 @@ class Dssp(AutotoolsPackage):
@run_after("install")
def cache_test_sources(self):
"""Save off the pdb sources for stand-alone testing."""
- self.cache_extra_test_sources("pdb")
+ cache_extra_test_sources(self, "pdb")
def test_mkdssp(self):
"""calculate structure for example"""
diff --git a/var/spack/repos/builtin/packages/dtc/package.py b/var/spack/repos/builtin/packages/dtc/package.py
index a775a98803..8790d702fb 100644
--- a/var/spack/repos/builtin/packages/dtc/package.py
+++ b/var/spack/repos/builtin/packages/dtc/package.py
@@ -18,13 +18,15 @@ class Dtc(MakefilePackage):
version("1.6.1", sha256="6401c9a0f577a270df4632bf0f3e5454ccc7a5ca3caefa67a3e1c29c9c6b8c60")
+ depends_on("c", type="build") # generated
+
depends_on("bison", type="build")
# Build error with flex 2.6.3
# (convert-dtsv0-lexer.lex.c:398: error: "yywrap" redefined)
depends_on("flex@2.6.4:", type="build")
- depends_on("libyaml", type="build")
depends_on("pkgconfig", type="build")
depends_on("python", type="build")
+ depends_on("libyaml", type=("build", "link"))
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
@@ -33,3 +35,14 @@ class Dtc(MakefilePackage):
makefile.filter(
r"WARNINGS = -Wall", "WARNINGS = -Wall -Wno-unused-command-line-argument"
)
+
+ if self.spec.satisfies("platform=darwin"):
+ libfdt_makefile = FileFilter("libfdt/Makefile.libfdt")
+ libfdt_makefile.filter(
+ r"LIBFDT_soname = .*", "LIBFDT_soname = libfdt.1.$(SHAREDLIB_EXT)"
+ )
+
+ @run_after("install")
+ def darwin_fix(self):
+ if self.spec.satisfies("platform=darwin"):
+ fix_darwin_install_name(self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/dtcmp/package.py b/var/spack/repos/builtin/packages/dtcmp/package.py
index 992b2bf646..c331ea2ed3 100644
--- a/var/spack/repos/builtin/packages/dtcmp/package.py
+++ b/var/spack/repos/builtin/packages/dtcmp/package.py
@@ -17,6 +17,7 @@ class Dtcmp(AutotoolsPackage):
maintainers("gonsie", "camstan", "adammoody")
version("main", branch="main")
+ version("1.1.5", sha256="959c28999b8d1dd2e8703172db55392e38114fde0cd54dfad04555622c5e5974")
version("1.1.4", sha256="dd83d8cecd68e13b78b68e88675cc5847cde06742b7740e140b98f4a08127dd3")
version("1.1.3", sha256="90b32cadd0ff2f4fa7fc916f8dcfdbe6918e3e285e0292a2470772478ca0aab5")
version("1.1.2", sha256="76e1d1fed89bf6abf003179a7aed93350d5ce6282cb000b02a241ec802ec399d")
@@ -24,11 +25,14 @@ class Dtcmp(AutotoolsPackage):
version("1.1.0", sha256="fd2c4485eee560a029f62c8f227df4acdb1edc9340907f4ae2dbee59f05f057d")
version("1.0.3", sha256="1327368e2808043ad5f245cd16f0da19543de50eae02a4e22b8a1c2e0eff8f35")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("lwgrp")
depends_on("lwgrp@main", when="@main")
- depends_on("lwgrp@1.0.5", when="@1.1.4")
+ depends_on("lwgrp@1.0.3:", when="@1.1.2:")
+ depends_on("lwgrp@1.0.5:", when="@1.1.4:")
variant("shared", default=True, description="Build with shared libraries")
depends_on("lwgrp+shared", when="+shared")
diff --git a/var/spack/repos/builtin/packages/dtf/package.py b/var/spack/repos/builtin/packages/dtf/package.py
index 97e057717b..a11ef8b7a2 100644
--- a/var/spack/repos/builtin/packages/dtf/package.py
+++ b/var/spack/repos/builtin/packages/dtf/package.py
@@ -21,6 +21,10 @@ class Dtf(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("cxx", default=True, description="Build pnetcdf the C++ Interface")
variant("fortran", default=True, description="Build pnetcdf the Fortran Interface")
diff --git a/var/spack/repos/builtin/packages/duckdb/package.py b/var/spack/repos/builtin/packages/duckdb/package.py
index 7dabb8636b..79f88acc41 100644
--- a/var/spack/repos/builtin/packages/duckdb/package.py
+++ b/var/spack/repos/builtin/packages/duckdb/package.py
@@ -7,15 +7,204 @@
from spack.package import *
-class Duckdb(CMakePackage):
+class Duckdb(MakefilePackage):
"""DuckDB is an in-process SQL OLAP Database Management System."""
homepage = "https://duckdb.org"
- url = "https://github.com/duckdb/duckdb/archive/refs/tags/v0.8.1.tar.gz"
+ url = "https://github.com/duckdb/duckdb/archive/refs/tags/v0.9.2.tar.gz"
git = "https://github.com/duckdb/duckdb.git"
license("MIT")
+ maintainers("glentner", "teaguesterling")
version("master", branch="master")
- version("0.8.1", sha256="a0674f7e320dc7ebcf51990d7fc1c0e7f7b2c335c08f5953702b5285e6c30694")
- version("0.7.1", sha256="67f840f861e5ffbe137d65a8543642d016f900b89dd035492d562ad11acf0e1e")
+ version("1.1.3", sha256="2aea0af898ad753fee82b776fea1bf78ccbc9648986e7f7a87372df5e74cdb98")
+ version("1.1.2", sha256="a3319a64c390ed0454c869b2e4fc0af2413cd49f55cd0f1400aaed9069cdbc4c")
+ version("1.1.1", sha256="a764cef80287ccfd8555884d8facbe962154e7c747043c0842cd07873b4d6752")
+ version("1.1.0", sha256="d9be2c6d3a5ebe2b3d33044fb2cb535bb0bd972a27ae38c4de5e1b4caa4bf68d")
+ # CVE-2024-41672
+ version(
+ "1.0.0",
+ sha256="04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26",
+ deprecated=True,
+ )
+ version(
+ "0.10.3",
+ sha256="7855587b3491dd488993287caee28720bee43ae28e92e8f41ea4631e9afcbf88",
+ deprecated=True,
+ )
+ version(
+ "0.10.2",
+ sha256="662a0ba5c35d678ab6870db8f65ffa1c72e6096ad525a35b41b275139684cea6",
+ deprecated=True,
+ )
+ version(
+ "0.10.0",
+ sha256="5a925b8607d00a97c1a3ffe6df05c0a62a4df063abd022ada82ac1e917792013",
+ deprecated=True,
+ )
+ version(
+ "0.9.2",
+ sha256="afff7bd925a98dc2af4039b8ab2159b0705cbf5e0ee05d97f7bb8dce5f880dc2",
+ deprecated=True,
+ )
+ version(
+ "0.9.1",
+ sha256="37a43188d9354ce3ca101b2b118d867f5f76d04c3b83c09d86fd7508351a631b",
+ deprecated=True,
+ )
+ version(
+ "0.9.0",
+ sha256="3dbf3326a831bf0797591572440e81a3d6d668f8e33a25ce04efae19afc3a23d",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("python@3.7:")
+ with default_args(type="build"):
+ depends_on("cmake")
+ depends_on("gmake")
+ depends_on("ninja", when="+ninjabuild")
+ depends_on("py-pip", when="+python")
+ depends_on("py-setuptools-scm", when="+python")
+ depends_on("pkgconfig", when="+static_openssl")
+ depends_on("zlib-api", when="+static_openssl")
+ depends_on("openssl", when="+httpfs")
+ depends_on("icu4c", when="~icu")
+
+ # Build Options
+ variant("cli", default=True, description="Compile with command line client")
+ variant("icu", default=False, description="Compile with bundled ICU library")
+ variant("ninjabuild", default=True, description="Use GEN=ninja to build")
+ variant("static_openssl", default=False, description="Build with static openSSL")
+ variant(
+ "openssl",
+ default=False,
+ description="Compile with bundled OpenSSL library",
+ when="@:0.9.2",
+ )
+
+ variant("extension_autoload", default=False, description="Enable extension auto-loading")
+ variant("extension_autoinstall", default=False, description="Enable extension auto-installing")
+ variant("extension_repo", default=True, description="Copy extensions to prefix")
+
+ # Extensions
+ variant("autocomplete", default=True, description="Include autocomplete for CLI in build")
+ variant("excel", default=True, description="Include Excel formatting extension in build")
+ variant("fts", default=True, description="Include FTS (full text search) support in build")
+ variant("httpfs", default=True, description="Include HTTPFS (& S3) support in build")
+ variant("inet", default=True, description="Include INET (ip address) support in build")
+ variant("json", default=True, description="Include JSON support in build")
+ variant("parquet", default=True, description="Include parquent support in build")
+ variant("tpce", default=False, description="Include TPCE in build")
+ variant("tpch", default=False, description="Include TPCH in build")
+
+ # APIs
+ variant("python", default=True, description="Build with Python driver")
+ extends("python", when="+python")
+
+ # Observed failure in an AVX2-specific codeblock on x86_64_v4 target
+ conflicts(
+ "@1.0.0",
+ when="target=x86_64_v3:",
+ msg="See: https://github.com/duckdb/duckdb/issues/12362",
+ )
+
+ @property
+ def duckdb_extension_prefix(self):
+ return self.prefix.lib.duckdb
+
+ def setup_build_environment(self, env):
+ cmake_args = [] # Future use
+ if self.spec.satisfies("+ninjabuild"):
+ env.set("GEN", "ninja")
+ if self.spec.satisfies("+python"):
+ env.set("SETUPTOOLS_SCM_PRETEND_VERSION", f"{self.spec.version}")
+ if self.spec.satisfies("+static_openssl"):
+ env.set("STATIC_OPENSSL", "1")
+ variant_flags = [
+ "autocomplete",
+ "cli",
+ "excel",
+ "fts",
+ "httpfs",
+ "icu",
+ "inet",
+ "json",
+ "openssl", # Deprecate after 0.9.2 retired
+ "parquet",
+ "python",
+ "tpce",
+ "tpch",
+ ]
+ for flag in variant_flags:
+ make_flag = "BUILD_" + flag.upper()
+ if "+" + flag in self.spec:
+ env.set(make_flag, "1")
+ elif "~" + flag in self.spec:
+ env.set(make_flag, "0")
+ if self.spec.satisfies("@0.10.2:"):
+ env.set("OVERRIDE_GIT_DESCRIBE", f"v{self.spec.version}")
+ if self.spec.satisfies("+extension_repo"):
+ env.set("LOCAL_EXTENSION_REPO", self.prefix.lib.duckdb.extensions)
+ if self.spec.satisfies("+extension_autoload"):
+ env.set("ENABLE_EXTENSION_AUTOLOADING", "1")
+ if self.spec.satisfies("+extension_autoinstall"):
+ env.set("ENABLE_EXTENSION_AUTOINSTALL", "1")
+
+ if cmake_args:
+ env.set("EXTRA_CMAKE_VARIABLES", " ".join(cmake_args))
+
+ def url_for_version(self, version):
+ return "https://github.com/duckdb/duckdb/archive/refs/tags/v{0}.tar.gz".format(version)
+
+ def patch(self):
+ # DuckDB pulls its version from a git tag, which it can't find in the tarball
+ # and thus defaults to something arbitrary and breaks extensions.
+ # We use the Spack version to inject it in the right place during the build
+ # Patching is not needed for versions from 0.10.2 onward as we can
+ # set OVERRIDE_GIT_DESCRIBE to force the version when not building from a repo.
+
+ version = self.spec.version
+ if self.spec.satisfies("@:0.9.2"):
+ # Prior to version 0.10.0, this was sufficient
+ filter_file(
+ r'(message\(STATUS "git hash \$\{GIT_COMMIT_HASH\}, '
+ r'version \$\{DUCKDB_VERSION\}"\))',
+ 'set(DUCKDB_VERSION "v{0}")\n\\1'.format(version),
+ "CMakeLists.txt",
+ )
+ elif not self.spec.satisfies("@0.10.0"):
+ # Override the fallback values that are set when GIT_COMMIT_HASH doesn't work
+ for i, n in enumerate(["MAJOR", "MINOR", "PATCH"]):
+ filter_file(
+ r"set\(DUCKDB_{0}_VERSION \d+\)".format(n),
+ "set(DUCKDB_{0}_VERSION {1})".format(n, version[i]),
+ "CMakeLists.txt",
+ )
+ # Need to manually set DUCKDB_NORMALIZED_VERSION for helper scripts
+ filter_file(
+ r'(message\(STATUS "git hash \$\{GIT_COMMIT_HASH\},'
+ r" version \$\{DUCKDB_VERSION\},"
+ r' extension folder \$\{DUCKDB_NORMALIZED_VERSION\}"\))',
+ 'set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}'
+ '.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}")'
+ '\nset(DUCKDB_NORMALIZED_VERSION "${DUCKDB_VERSION}")'
+ "\n\\1",
+ "CMakeLists.txt",
+ )
+
+ if self.spec.satisfies("+extension_repo"):
+ mkdirp(self.prefix.lib.duckdb.extensions)
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ mkdirp(prefix.lib)
+ mkdir(prefix.include)
+ build_dir = join_path("build", "release")
+ install(join_path(build_dir, "duckdb"), prefix.bin)
+ install(join_path(build_dir, "src", "libduckdb.so"), prefix.lib)
+ install(join_path(build_dir, "src", "libduckdb_static.a"), prefix.lib)
+ install_tree(join_path("src", "include"), prefix.include)
diff --git a/var/spack/repos/builtin/packages/duperemove/package.py b/var/spack/repos/builtin/packages/duperemove/package.py
index 340abe8a47..71834aecd9 100644
--- a/var/spack/repos/builtin/packages/duperemove/package.py
+++ b/var/spack/repos/builtin/packages/duperemove/package.py
@@ -17,6 +17,8 @@ class Duperemove(MakefilePackage):
version("0.11.1", sha256="75c3c91baf7e5195acad62eab73a7afc3d0b88cbfccefac3e3412eba06a42ac8")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("sqlite")
diff --git a/var/spack/repos/builtin/packages/dwz/package.py b/var/spack/repos/builtin/packages/dwz/package.py
index 85afeedbb6..b85f84e78a 100644
--- a/var/spack/repos/builtin/packages/dwz/package.py
+++ b/var/spack/repos/builtin/packages/dwz/package.py
@@ -22,6 +22,9 @@ class Dwz(MakefilePackage, SourcewarePackage):
preferred=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("dwz", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/dyninst/missing_include_deque.patch b/var/spack/repos/builtin/packages/dyninst/missing_include_deque.patch
new file mode 100644
index 0000000000..cee31fdbb0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dyninst/missing_include_deque.patch
@@ -0,0 +1,11 @@
+diff --git a/dataflowAPI/src/AbslocInterface.C b/dataflowAPI/src/AbslocInterface.C
+index 9d7ad000c..582e64004 100644
+--- a/dataflowAPI/src/AbslocInterface.C
++++ b/dataflowAPI/src/AbslocInterface.C
+@@ -29,6 +29,7 @@
+ */
+
+
++#include <deque>
+ #include "Absloc.h"
+ #include "AbslocInterface.h"
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 331f60d4a3..cca8a3026e 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -22,6 +22,7 @@ class Dyninst(CMakePackage):
license("LGPL-2.1-or-later")
version("master", branch="master")
+ version("13.0.0", sha256="1bc48d26478b677a6c090c25586a447507bd1b4cf88d369bd61820005ce1be39")
version("12.3.0", sha256="956b0378d2badb765a7e677c0b66c0b8b8cacca7631222bfe7a27b369abf7dd4")
version("12.2.1", sha256="c304af3c6191e92acd27350fd9b7b02899767a0e38abb3a08a378abe01d1ef01")
version("12.2.0", sha256="84c37efc1b220110af03f8fbb6ab295628b445c873b5115db91b64443e445a5d")
@@ -50,6 +51,9 @@ class Dyninst(CMakePackage):
"8.2.1", tag="v8.2.1", commit="939afcbad1a8273636a3686a31b51dae4f1f0c11", deprecated=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"openmp",
default=True,
@@ -66,7 +70,8 @@ class Dyninst(CMakePackage):
depends_on("boost@1.61.0:" + boost_libs, when="@10.1.0:")
depends_on("boost@1.61.0:1.69" + boost_libs, when="@:10.0")
depends_on("boost@1.67.0:" + boost_libs, when="@11.0.0:")
- depends_on("boost@1.70.0:" + boost_libs, when="@12:")
+ depends_on("boost@1.70.0:" + boost_libs, when="@12:12.3.0")
+ depends_on("boost@1.71.0:" + boost_libs, when="@13:")
depends_on("libiberty+pic")
@@ -83,12 +88,19 @@ class Dyninst(CMakePackage):
# libdwarf before that.
depends_on("libdwarf", when="@:9")
- # findtbb.cmake in the dynist repo does not work with recent tbb
- # package layout. Need to use tbb provided config instead.
- conflicts("^intel-tbb@2021.1:")
- conflicts("^intel-oneapi-tbb@2021.1:")
- conflicts("^intel-parallel-studio", when="@12.0.0:")
- depends_on("tbb@2018.6.0:", when="@10.0.0:")
+ with when("@:12.3.0"):
+ # findtbb.cmake in the dynist repo does not work with recent tbb
+ # package layout. Need to use tbb provided config instead.
+ conflicts("^intel-tbb@2021.1:")
+ conflicts("^intel-oneapi-tbb@2021.1:")
+ conflicts("^intel-parallel-studio")
+
+ depends_on("intel-tbb@2019.9:", when="@13.0.0:")
+ depends_on("tbb@2018.6.0:", when="@10.0.0:12.3.0")
+
+ with when("@13.0.0:"):
+ depends_on("cmake@3.14.0:", type="build")
+ conflicts("cmake@3.19.0")
depends_on("cmake@3.4.0:", type="build", when="@10.1.0:")
depends_on("cmake@3.0.0:", type="build", when="@10.0.0:10.0")
@@ -98,8 +110,13 @@ class Dyninst(CMakePackage):
patch("stackanalysis_h.patch", when="@9.2.0")
patch("v9.3.2-auto.patch", when="@9.3.2 %gcc@:4.7")
patch("tribool.patch", when="@9.3.0:10.0.0 ^boost@1.69:")
+ patch(
+ "missing_include_deque.patch",
+ when="@10.0.0:12.2.0",
+ sha256="0064d8d51bd01bd0035e1ebc49276f627ce6366d4524c92cf47d3c09b0031f96",
+ )
- requires("%gcc", msg="dyninst builds only with GCC")
+ requires("%gcc", when="@:13.0.0", msg="dyninst builds only with GCC")
# No Mac support (including apple-clang)
conflicts("platform=darwin", msg="macOS is not supported")
@@ -127,19 +144,19 @@ class Dyninst(CMakePackage):
self.define("LibIberty_LIBRARIES", spec["libiberty"].libs),
]
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("-DUSE_OpenMP=ON")
else:
args.append("-DUSE_OpenMP=OFF")
- if "+static" in spec:
+ if spec.satisfies("+static"):
args.append("-DENABLE_STATIC_LIBS=YES")
else:
args.append("-DENABLE_STATIC_LIBS=NO")
# Make sure Dyninst doesn't try to build its own dependencies
# outside of Spack
- if spec.satisfies("@10.2.0:"):
+ if spec.satisfies("@10.2.0:12.3.0"):
args.append("-DSTERILE_BUILD=ON")
return args
@@ -182,14 +199,14 @@ class Dyninst(CMakePackage):
# Openmp applies to version 10.x or later.
if spec.satisfies("@10.0.0:"):
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("-DUSE_OpenMP=ON")
else:
args.append("-DUSE_OpenMP=OFF")
# Static libs started with version 9.1.0.
if spec.satisfies("@9.1.0:"):
- if "+static" in spec:
+ if spec.satisfies("+static"):
args.append("-DENABLE_STATIC_LIBS=1")
else:
args.append("-DENABLE_STATIC_LIBS=NO")
diff --git a/var/spack/repos/builtin/packages/dysco/package.py b/var/spack/repos/builtin/packages/dysco/package.py
index cd853afe2b..cf80d6ae6a 100644
--- a/var/spack/repos/builtin/packages/dysco/package.py
+++ b/var/spack/repos/builtin/packages/dysco/package.py
@@ -14,8 +14,11 @@ class Dysco(CMakePackage):
license("GPL-3.0-only")
+ version("1.3", sha256="02cb53cc0a95a17a04fbaa6063b39641725b81f279b08e85761b01e8f186609f")
version("1.2", sha256="dd992c5a13df67173aa1d3f6dc5df9b51b0bea2fe77bc08f5be7a839be741269")
+ depends_on("cxx", type="build") # generated
+
depends_on("casacore")
depends_on("gsl")
depends_on("boost+date_time+python+container+exception")
diff --git a/var/spack/repos/builtin/packages/e2fsprogs/package.py b/var/spack/repos/builtin/packages/e2fsprogs/package.py
index 5560a5348d..baa78b5a95 100644
--- a/var/spack/repos/builtin/packages/e2fsprogs/package.py
+++ b/var/spack/repos/builtin/packages/e2fsprogs/package.py
@@ -15,14 +15,42 @@ class E2fsprogs(AutotoolsPackage):
license("GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT")
+ version("1.47.1", sha256="db95ff1cb6ef741c9aa8875d9f3f52a34168360febba765b6377b80bada09a8c")
+ version("1.47.0", sha256="74c8ea97c73294edc6c11dc5e7fbb4324f86c28efd66ad0ba50be4eec8a48be2")
version("1.45.6", sha256="d785164a2977cd88758cb0cac5c29add3fe491562a60040cfb193abcd0f9609b")
version("1.45.5", sha256="0fd76e55c1196c1d97a2c01f2e84f463b8e99484541b43ff4197f5a695159fd3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("fuse2fs", default=False, description="Build fuse2fs")
+
depends_on("texinfo", type="build")
+ depends_on("fuse", when="+fuse2fs")
+ depends_on("pkgconfig", when="+fuse2fs")
+
+ # fuse3 support is in the yet unreleased 1.47.1
+ patch(
+ "https://github.com/tytso/e2fsprogs/commit/5598a96.patch?full_index=1",
+ sha256="72b28eb4599dbae45a01a1518ab6b8b6fc23db4f67381b49f63d3a3d45822340",
+ when="@:1.47.0 +fuse2fs",
+ )
+ patch(
+ "https://github.com/tytso/e2fsprogs/commit/1ac0061.patch?full_index=1",
+ sha256="c5fbcd4e6d7f29d083d923b33998d916e2059b8f108c8cc20e8b5c928186eef2",
+ when="@:1.47.0 +fuse2fs",
+ )
+ patch(
+ "https://github.com/tytso/e2fsprogs/commit/448a3f8.patch?full_index=1",
+ sha256="fb45c3af229b49fab19c70c00c33b9f3579a9455025aedb8049ff411b1cf3a96",
+ when="@:1.47.0 +fuse2fs",
+ )
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
def configure_args(self):
# avoid installing things in /etc
- return ["--without-udev-rules-dir", "--without-crond-dir", "--without-systemd-unit-dir"]
+ args = ["--without-udev-rules-dir", "--without-crond-dir", "--without-systemd-unit-dir"]
+ args.extend(self.enable_or_disable("fuse2fs"))
+ return args
diff --git a/var/spack/repos/builtin/packages/e3sm-kernels/package.py b/var/spack/repos/builtin/packages/e3sm-kernels/package.py
index 8000d18ae7..a4564dcc71 100644
--- a/var/spack/repos/builtin/packages/e3sm-kernels/package.py
+++ b/var/spack/repos/builtin/packages/e3sm-kernels/package.py
@@ -23,6 +23,8 @@ class E3smKernels(MakefilePackage):
version("master", branch="master")
version("1.0", sha256="358249785ba9f95616feecbb6f37f7694646568499c11b2094c9233999c6cc95")
+ depends_on("fortran", type="build") # generated
+
variant(
"kernel",
default="atmosphere",
diff --git a/var/spack/repos/builtin/packages/e3sm-scorpio/package.py b/var/spack/repos/builtin/packages/e3sm-scorpio/package.py
index 66c8600096..078a57a7d5 100644
--- a/var/spack/repos/builtin/packages/e3sm-scorpio/package.py
+++ b/var/spack/repos/builtin/packages/e3sm-scorpio/package.py
@@ -16,6 +16,10 @@ class E3smScorpio(CMakePackage):
version("1.4.1", sha256="7cb4589410080d7e547ef17ddabe68f749e6af019c1d0e6ee9f11554f3ff6b1a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("timing", default=False, description="Enable timing")
variant("mpi", default=True, description="Enable MPI")
diff --git a/var/spack/repos/builtin/packages/e4s-alc/package.py b/var/spack/repos/builtin/packages/e4s-alc/package.py
new file mode 100644
index 0000000000..9557d6554c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/e4s-alc/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class E4sAlc(PythonPackage):
+ """Container file creator, facilitating the generation of
+ Dockerfiles and Singularity definition files infused with OS packages,
+ spack packages and custom commands"""
+
+ maintainers("FrederickDeny", "PlatinumCD")
+ homepage = "https://github.com/E4S-Project/e4s-alc"
+ git = "https://github.com/E4S-Project/e4s-alc"
+
+ tags = ["e4s"]
+
+ license("MIT")
+
+ version("main", branch="main")
+ version("1.0.2", commit="9eddfc61659ecab3c0253b2eac020ddb6e610b49")
+ version("1.0.1", commit="262298128a4991ffc773b1bd835687fb6493311e")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-pyyaml@6.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/e4s-cl/package.py b/var/spack/repos/builtin/packages/e4s-cl/package.py
index 258471c010..bbb4003718 100644
--- a/var/spack/repos/builtin/packages/e4s-cl/package.py
+++ b/var/spack/repos/builtin/packages/e4s-cl/package.py
@@ -22,6 +22,8 @@ class E4sCl(PythonPackage):
license("MIT")
version("master", branch="master")
+ version("1.0.4", commit="9781a62af20f951e3c2c19a522f4fc16d20a256e")
+ version("1.0.3", commit="1b34fa7964273675ce18b9cd3006b4b87dda1ef2")
version("1.0.1", commit="b2c92993e0c7cb42de07f0f7cc02da3a06816192")
version("1.0.0", commit="410bb2e6601d9b90243a487ad7f7d2dabd8ba04c")
diff --git a/var/spack/repos/builtin/packages/ea-utils/package.py b/var/spack/repos/builtin/packages/ea-utils/package.py
index b57c30ecb1..8a90b61af3 100644
--- a/var/spack/repos/builtin/packages/ea-utils/package.py
+++ b/var/spack/repos/builtin/packages/ea-utils/package.py
@@ -25,6 +25,9 @@ class EaUtils(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sparsehash")
depends_on("zlib-api")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/eagle/package.py b/var/spack/repos/builtin/packages/eagle/package.py
index 3a68066d11..3abe19fb37 100644
--- a/var/spack/repos/builtin/packages/eagle/package.py
+++ b/var/spack/repos/builtin/packages/eagle/package.py
@@ -18,6 +18,8 @@ class Eagle(MakefilePackage):
version("1.1.3", sha256="bd510b8eef2de14898cbf417e1c7a30b97ddaba24e5e2834da7b02767362fe3c")
version("1.1.2", sha256="afe967560d1f8fdbd0caf4b93b5f2a86830e9e4d399fee4a526140431343045e")
+ depends_on("c", type="build") # generated
+
depends_on("curl")
depends_on("zlib-api")
depends_on("lzma")
diff --git a/var/spack/repos/builtin/packages/earlyoom/package.py b/var/spack/repos/builtin/packages/earlyoom/package.py
index 09cc0d1fad..a79c520a6e 100644
--- a/var/spack/repos/builtin/packages/earlyoom/package.py
+++ b/var/spack/repos/builtin/packages/earlyoom/package.py
@@ -14,9 +14,12 @@ class Earlyoom(MakefilePackage):
license("MIT")
+ version("1.8", sha256="bbb050a2294e60dafc0b129fcec705ef95d9d27f4c9dae1d3b4f25e4f698ae41")
version("1.6.1", sha256="bcd3fab4da5e1dddec952a0974c866ec90c5f9159c995f9162c45488c4d03340")
version("1.6", sha256="b81804fc4470f996014d52252a87a1cf3b43d3d8754140035b10dcee349302b8")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("earlyoom", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/easi/package.py b/var/spack/repos/builtin/packages/easi/package.py
index ea5a113ed1..fbe2163509 100644
--- a/var/spack/repos/builtin/packages/easi/package.py
+++ b/var/spack/repos/builtin/packages/easi/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -14,14 +16,24 @@ class Easi(CMakePackage):
homepage = "https://easyinit.readthedocs.io"
git = "https://github.com/SeisSol/easi.git"
- maintainers("ravil-mobile", "Thomas-Ulrich", "krenzland", "ThrudPrimrose", "davschneller")
+ maintainers("Thomas-Ulrich", "davschneller", "vikaskurapati")
license("BSD-3-Clause")
- version("develop", branch="master")
+ version("master", branch="master")
+ version("1.5.0", tag="v1.5.0", commit="391698ab0072f66280d08441974c2bdb04a65ce0")
+ version("1.4.0", tag="v1.4.0", commit="0d8fcf936574d93ddbd1d9222d46a93d4b119231")
+ version("1.3.0", tag="v1.3.0", commit="99309a0fa78bf11d668c599b3ee469224f04d55b")
version("1.2.0", tag="v1.2.0", commit="305a119338116a0ceac6b68b36841a50250d05b1")
version("1.1.2", tag="v1.1.2", commit="4c87ef3b3dca9415d116ef102cb8de750ef7e1a0")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("python", default=True, description="Install python bindings")
+ extends("python", when="+python")
+ depends_on("mpi", when="+python")
+
variant("asagi", default=True, description="build with ASAGI support")
variant(
"jit",
@@ -38,6 +50,8 @@ class Easi(CMakePackage):
depends_on("lua@5.3.2", when="jit=lua")
depends_on("impalajit@main", when="jit=impalajit")
+ depends_on("py-pybind11@2.6.2:", type="build", when="+python")
+
conflicts("jit=impalajit", when="jit=impalajit-llvm")
conflicts("jit=impalajit-llvm", when="jit=impalajit")
@@ -49,15 +63,25 @@ class Easi(CMakePackage):
def cmake_args(self):
args = []
args.append(self.define_from_variant("ASAGI", "asagi"))
+ args.append(self.define_from_variant("PYTHON_BINDINGS", "python"))
+ self.define("PYBIND11_USE_FETCHCONTENT", False)
spec = self.spec
- if "jit=impalajit" in spec or "jit=impalajit-llvm" in spec:
+ if spec.satisfies("jit=impalajit") or spec.satisfies("jit=impalajit-llvm"):
args.append(self.define("IMPALAJIT", True))
backend_type = "llvm" if "jit=impalajit-llvm" in spec else "original"
args.append(self.define("IMPALAJIT_BACKEND", backend_type))
else:
args.append(self.define("IMPALAJIT", False))
- if "jit=lua" in spec:
+ if spec.satisfies("jit=lua"):
args.append(self.define("LUA", True))
+ if spec.satisfies("+python"):
+ args += [self.define("easi_INSTALL_PYTHONDIR", python_platlib)]
+
return args
+
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+python"):
+ full_path = os.path.join(python_platlib, "easilib/cmake/easi/python_wrapper")
+ env.prepend_path("PYTHONPATH", full_path)
diff --git a/var/spack/repos/builtin/packages/easyloggingpp/package.py b/var/spack/repos/builtin/packages/easyloggingpp/package.py
index c1fba765e8..a46b625b71 100644
--- a/var/spack/repos/builtin/packages/easyloggingpp/package.py
+++ b/var/spack/repos/builtin/packages/easyloggingpp/package.py
@@ -14,3 +14,5 @@ class Easyloggingpp(CMakePackage):
version("9.97.0", sha256="9110638e21ef02428254af8688bf9e766483db8cc2624144aa3c59006907ce22")
version("9.96.7", sha256="237c80072b9b480a9f2942b903b4b0179f65e146e5dcc64864dc91792dedd722")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ebms/package.py b/var/spack/repos/builtin/packages/ebms/package.py
index f92a83e359..a7ed3feb71 100644
--- a/var/spack/repos/builtin/packages/ebms/package.py
+++ b/var/spack/repos/builtin/packages/ebms/package.py
@@ -24,6 +24,8 @@ class Ebms(MakefilePackage):
version("develop")
+ depends_on("c", type="build") # generated
+
depends_on("mpi@2:")
tags = ["proxy-app"]
@@ -34,7 +36,7 @@ class Ebms(MakefilePackage):
cflags = "-g -O3 -std=gnu99"
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
targets.append("CC={0}".format(self.spec["mpi"].mpicc))
targets.append("CFLAGS={0}".format(cflags))
diff --git a/var/spack/repos/builtin/packages/ecbuild/package.py b/var/spack/repos/builtin/packages/ecbuild/package.py
index d4882131a7..9e4cdf6c92 100644
--- a/var/spack/repos/builtin/packages/ecbuild/package.py
+++ b/var/spack/repos/builtin/packages/ecbuild/package.py
@@ -21,6 +21,10 @@ class Ecbuild(CMakePackage):
version("3.6.5", sha256="98bff3d3c269f973f4bfbe29b4de834cd1d43f15b1c8d1941ee2bfe15e3d4f7f")
version("3.6.1", sha256="796ccceeb7af01938c2f74eab0724b228e9bf1978e32484aa3e227510f69ac59")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.11:", type=("build", "run"))
# See https://github.com/ecmwf/ecbuild/issues/35
diff --git a/var/spack/repos/builtin/packages/eccodes/package.py b/var/spack/repos/builtin/packages/eccodes/package.py
index 362d0de274..3c1e955cb2 100644
--- a/var/spack/repos/builtin/packages/eccodes/package.py
+++ b/var/spack/repos/builtin/packages/eccodes/package.py
@@ -50,6 +50,10 @@ class Eccodes(CMakePackage):
license("Apache-2.0")
version("develop", branch="develop")
+ version("2.38.0", sha256="96a21fbe8ca3aa4c31bb71bbd378b7fd130cbc0f7a477567d70e66a000ff68d9")
+ version("2.34.0", sha256="3cd208c8ddad132789662cf8f67a9405514bfefcacac403c0d8c84507f303aba")
+ version("2.33.0", sha256="bdcec8ce63654ec6803400c507f01220a9aa403a45fa6b5bdff7fdcc44fd7daf")
+ version("2.32.1", sha256="ad2ac1bf36577b1d35c4a771b4d174a06f522a1e5ef6c1f5e53a795fb624863e")
version("2.32.0", sha256="b57e8eeb0eba0c05d66fda5527c4ffa84b5ab35c46bcbc9a2227142973ccb8e6")
version("2.31.0", sha256="808ecd2c11fbf2c3f9fc7a36f8c2965b343f3151011b58a1d6e7cc2e6b3cac5d")
version("2.25.0", sha256="8975131aac54d406e5457706fd4e6ba46a8cc9c7dd817a41f2aa64ce1193c04e")
@@ -64,6 +68,10 @@ class Eccodes(CMakePackage):
version("2.5.0", sha256="18ab44bc444168fd324d07f7dea94f89e056f5c5cd973e818c8783f952702e4e")
version("2.2.0", sha256="1a4112196497b8421480e2a0a1164071221e467853486577c4f07627a702f4c3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("tools", default=False, description="Build the command line tools")
variant("netcdf", default=False, description="Enable GRIB to NetCDF conversion tool")
variant(
@@ -110,7 +118,6 @@ class Eccodes(CMakePackage):
depends_on("cmake@3.12:", when="@2.19:", type="build")
depends_on("ecbuild", type="build", when="@develop")
- depends_on("ecbuild@3.7:", type="build", when="@2.25:")
conflicts("+openmp", when="+pthreads", msg="Cannot enable both POSIX threads and OMP")
@@ -295,7 +302,7 @@ class Eccodes(CMakePackage):
return libs
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
@@ -331,7 +338,7 @@ class Eccodes(CMakePackage):
self.define("ENABLE_EXTRA_TESTS", False),
]
- if "+netcdf" in self.spec:
+ if self.spec.satisfies("+netcdf"):
# Prevent possible overriding by environment variables NETCDF_ROOT, NETCDF_DIR, and
# NETCDF_PATH:
args.append(self.define("NETCDF_PATH", self.spec["netcdf-c"].prefix))
@@ -344,16 +351,13 @@ class Eccodes(CMakePackage):
if jp2k == "openjpeg":
args.append(self.define("OPENJPEG_PATH", self.spec["openjpeg"].prefix))
- if "+png" in self.spec:
+ if self.spec.satisfies("+png"):
args.append(self.define("ZLIB_ROOT", self.spec["zlib-api"].prefix))
- if "+aec" in self.spec:
+ if self.spec.satisfies("+aec"):
# Prevent overriding by environment variables AEC_DIR and AEC_PATH:
args.append(self.define("AEC_DIR", self.spec["libaec"].prefix))
- if "+memfs" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", python.path))
-
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/ecdsautils/package.py b/var/spack/repos/builtin/packages/ecdsautils/package.py
index 2c9602eb73..a5b7427b01 100644
--- a/var/spack/repos/builtin/packages/ecdsautils/package.py
+++ b/var/spack/repos/builtin/packages/ecdsautils/package.py
@@ -9,10 +9,17 @@ from spack.package import *
class Ecdsautils(CMakePackage):
"""Tiny collection of programs used for ECDSA."""
- homepage = "https://github.com/freifunk-gluon/"
- url = "https://github.com/freifunk-gluon/ecdsautils/archive/v0.3.2.tar.gz"
+ homepage = "https://github.com/freifunk-gluon/ecdsautils/"
+ url = "https://github.com/freifunk-gluon/ecdsautils/archive/refs/tags/v0.3.2.tar.gz"
+ license("BSD-2-Clause AND MIT", checked_by="wdconinc")
+
+ version("0.4.1", sha256="6fd827b3070afddc9e31f37f1d805f54aabf8518d2310c5c2b26cc8eb53555a8")
version("0.3.2", sha256="a828417c985ccfc623bb613e92ccc8af6c6f24a5bcab8b112b90c033a816204f")
version("0.3.1", sha256="4b6efe7802a089e8d64194c954a8f9981ff516b922b40d51e6c7ba565274a87a")
- depends_on("libuecc", type="build")
+ depends_on("c", type="build")
+ depends_on("pkgconfig", type="build")
+
+ depends_on("libuecc@3:")
+ depends_on("libuecc@6:", when="@0.4:")
diff --git a/var/spack/repos/builtin/packages/ecflow/ctsapi_cassert.patch b/var/spack/repos/builtin/packages/ecflow/ctsapi_cassert.patch
new file mode 100644
index 0000000000..480c7493d6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecflow/ctsapi_cassert.patch
@@ -0,0 +1,10 @@
+--- a/Base/src/cts/CtsApi.hpp 2024-02-10 02:32:48.001444742 +0000
++++ b/Base/src/cts/CtsApi.hpp 2024-02-10 02:33:09.161119010 +0000
+@@ -16,6 +16,7 @@
+ //============================================================================
+ #include <string>
+ #include <vector>
++#include <cassert>
+
+ #include "CheckPt.hpp"
+ #include "NodeFwd.hpp"
diff --git a/var/spack/repos/builtin/packages/ecflow/package.py b/var/spack/repos/builtin/packages/ecflow/package.py
index 4ee103b983..22762230ca 100644
--- a/var/spack/repos/builtin/packages/ecflow/package.py
+++ b/var/spack/repos/builtin/packages/ecflow/package.py
@@ -30,6 +30,10 @@ class Ecflow(CMakePackage):
version("4.12.0", sha256="566b797e8d78e3eb93946b923ef540ac61f50d4a17c9203d263c4fd5c39ab1d1")
version("4.11.1", sha256="b3bcc1255939f87b9ba18d802940e08c0cf6379ca6aeec1fef7bd169b0085d6c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("ssl", default=True, description="Enable SSL")
variant(
"static_boost", default=False, description="Use also static boost libraries when compiling"
@@ -52,7 +56,8 @@ class Ecflow(CMakePackage):
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants, when="@:4")
- # Use newer boost with v5
+ # Use newer boost with v5 up to 1.84.0 - https://github.com/spack/spack/issues/44116
+ conflicts("boost@1.85:", when="@:5.11.4")
depends_on(
"boost@1.72:+chrono+date_time+exception+filesystem+program_options+python+regex+serialization+system+test+thread+timer", # noqa
when="@5:",
@@ -68,6 +73,11 @@ class Ecflow(CMakePackage):
# Requirement to use the Python3_EXECUTABLE variable
depends_on("cmake@3.16:", type="build")
+ # https://github.com/JCSDA/spack-stack/issues/1001
+ # https://github.com/JCSDA/spack-stack/issues/1009
+ patch("ctsapi_cassert.patch", when="@5.11.4")
+ patch("vfile_cassert.patch", when="@5.11.4")
+
@when("@:4.13.0")
def patch(self):
version = str(self.spec["python"].version[:2])
@@ -91,7 +101,6 @@ class Ecflow(CMakePackage):
self.define_from_variant("ENABLE_SSL", "ssl"),
# https://jira.ecmwf.int/browse/SUP-2641#comment-208943
self.define_from_variant("ENABLE_STATIC_BOOST_LIBS", "static_boost"),
- self.define("Python3_EXECUTABLE", spec["python"].package.command),
self.define("BOOST_ROOT", spec["boost"].prefix),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
diff --git a/var/spack/repos/builtin/packages/ecflow/vfile_cassert.patch b/var/spack/repos/builtin/packages/ecflow/vfile_cassert.patch
new file mode 100644
index 0000000000..871ae9d9d5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ecflow/vfile_cassert.patch
@@ -0,0 +1,10 @@
+--- a/Viewer/ecflowUI/src/VFile.cpp 2024-08-28 12:20:27.000000000 +0000
++++ b/Viewer/ecflowUI/src/VFile.cpp 2024-08-28 12:20:51.000000000 +0000
+@@ -9,6 +9,7 @@
+
+ #include "VFile.hpp"
+
++#include <cassert>
+ #include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py
index 2c5ca73267..fdfe2eab69 100644
--- a/var/spack/repos/builtin/packages/eckit/package.py
+++ b/var/spack/repos/builtin/packages/eckit/package.py
@@ -20,6 +20,10 @@ class Eckit(CMakePackage):
license("Apache-2.0")
+ version("1.28.3", sha256="24b2b8d9869849a646aa3fd9d95e4181a92358cd837d95b22e25d718a6ad7738")
+ version("1.28.2", sha256="d122db8bb5bcaadf3256a24f0f90d9bcedad35ef8f25e7eccd8c93c506dbdd24")
+ version("1.27.0", sha256="499f3f8c9aec8d3f42369e3ceedc98b2b09ac04993cfd38dfdf7d38931703fe7")
+ version("1.25.2", sha256="a611d26d50a9f2133b75100567a890eb0e0a48a96669b8c8475baf9d6f359397")
version("1.24.5", sha256="2fd74e04c20a59f9e13635828d9da880e18f8a2cb7fd3bfd0201e07071d6ec41")
version("1.24.4", sha256="b6129eb4f7b8532aa6905033e4cf7d09aadc8547c225780fea3db196e34e4671")
version("1.23.1", sha256="cd3c4b7a3a2de0f4a59f00f7bab3178dd59c0e27900d48eaeb357975e8ce2f15")
@@ -30,6 +34,9 @@ class Eckit(CMakePackage):
version("1.16.3", sha256="d2aae7d8030e2ce39e5d04e36dd6aa739f3c8dfffe32c61c2a3127c36b573485")
version("1.16.0", sha256="9e09161ea6955df693d3c9ac70131985eaf7cf24a9fa4d6263661c6814ebbaf1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py
index 25fe5e78f9..1e6546904c 100644
--- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py
+++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py
@@ -22,6 +22,10 @@ class EcmwfAtlas(CMakePackage):
version("master", branch="master")
version("develop", branch="develop")
+ version("0.40.0", sha256="9aa2c8945a04aff3d50f752147e2b7cf0992c33e7e5a0e7bcd6fe575b0f853b0")
+ version("0.39.0", sha256="bdfc37b5f3f871651b1bb47ae4742988b03858037e36fdca775e220e3abe3bd6")
+ version("0.38.1", sha256="c6868deb483c1d6c241aae92f8af63f3351062c2611c9163e8a9bbf6c97a9798")
+ version("0.38.0", sha256="befe3bfc045bc0783126efb72ed55db9f205eaf176e1b8a2059eaaaaacc4880a")
version("0.36.0", sha256="39bf748aa7b22df80b9791fbb6b4351ed9a9f85587b58fc3225314278a2a68f8")
version("0.35.1", sha256="7a344aaa8a1378d989a7bb883eb741852c5fa494630be6d8c88e477e4b9c5be1")
version("0.35.0", sha256="5a4f898ffb4a33c738b6f86e4e2a4c8e26dfd56d3c3399018081487374e29e97")
@@ -31,7 +35,12 @@ class EcmwfAtlas(CMakePackage):
version("0.31.1", sha256="fa9274c74c40c2115b9c6120a7040e357b0c7f37b20b601b684d2a83a479cdfb")
version("0.31.0", sha256="fa4ff8665544b8e19f79d171c540a9ca8bfc4127f52a3c4d4d618a2fe23354d7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("ecbuild", type=("build"))
+ depends_on("ecbuild@3.4:", type=("build"), when="@0.36.0:")
depends_on("eckit@:1.23", when="@:0.33")
depends_on("eckit@1.24:", when="@0.34:")
depends_on("boost cxxstd=14 visibility=hidden", when="@0.26.0:0.33.99", type=("build", "run"))
@@ -56,13 +65,14 @@ class EcmwfAtlas(CMakePackage):
variant("openmp", default=True, description="Use OpenMP")
depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
variant("shared", default=True, description="Build shared libraries")
-
variant("trans", default=False, description="Enable trans")
depends_on("ectrans@1.1.0:", when="@0.31.0: +trans")
variant("eigen", default=True, description="Enable eigen")
depends_on("eigen", when="+eigen")
variant("fftw", default=True, description="Enable fftw")
depends_on("fftw-api", when="+fftw")
+ variant("tesselation", default=False, description="Enable tesselation", when="@0.35.0:")
+ depends_on("qhull", when="+tesselation")
variant("fismahigh", default=False, description="Apply patching for FISMA-high compliance")
@@ -70,12 +80,15 @@ class EcmwfAtlas(CMakePackage):
args = [
self.define_from_variant("ENABLE_OMP", "openmp"),
self.define_from_variant("ENABLE_FCKIT", "fckit"),
- self.define_from_variant("ENABLE_TRANS", "trans"),
self.define_from_variant("ENABLE_EIGEN", "eigen"),
self.define_from_variant("ENABLE_FFTW", "fftw"),
- "-DPYTHON_EXECUTABLE:FILEPATH=" + self.spec["python"].command.path,
]
- if "~shared" in self.spec:
+ if self.spec.satisfies("@0.31:0.34"):
+ args.append(self.define_from_variant("ENABLE_TRANS", "trans"))
+ if self.spec.satisfies("@0.35:"):
+ args.append(self.define_from_variant("ENABLE_ECTRANS", "trans"))
+ args.append(self.define_from_variant("ENABLE_TESSELATION", "tesselation"))
+ if self.spec.satisfies("~shared"):
args.append("-DBUILD_SHARED_LIBS=OFF")
return args
diff --git a/var/spack/repos/builtin/packages/ecos/package.py b/var/spack/repos/builtin/packages/ecos/package.py
index b393e2636c..9f0ad1f0c7 100644
--- a/var/spack/repos/builtin/packages/ecos/package.py
+++ b/var/spack/repos/builtin/packages/ecos/package.py
@@ -17,6 +17,8 @@ class Ecos(MakefilePackage):
version("2.0.7", sha256="bdb6a84f7d150820459bd0a796cb64ffbb019afb95dc456d22acc2dafb2e70e0")
+ depends_on("c", type="build") # generated
+
build_targets = ["all", "shared"]
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ecoslim/package.py b/var/spack/repos/builtin/packages/ecoslim/package.py
index 61b2fcdfec..22704c2fe7 100644
--- a/var/spack/repos/builtin/packages/ecoslim/package.py
+++ b/var/spack/repos/builtin/packages/ecoslim/package.py
@@ -22,6 +22,8 @@ class Ecoslim(CMakePackage):
version("1.3", sha256="b532e570b4767e4fa84123d8773732150679e8e3d7fecd5c6e99fb1d4dc57b84")
version("master", branch="master")
+ depends_on("fortran", type="build") # generated
+
def cmake_args(self):
"""Populate cmake arguments for EcoSLIM."""
return []
diff --git a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
index d33cd410b0..43214a4823 100644
--- a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
+++ b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
@@ -187,7 +187,7 @@ class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage):
)
# TODO: When Ascent is updated to use VTK-m >= 1.8 move examples to
# the main spec.
- depends_on("vtk-m+examples", when="+vtkm ^vtk-m@1.8:")
+ conflicts("^vtk-m~examples", when="+vtkm ^vtk-m@1.8:")
depends_on("vtk-m+openmp", when="~rocm+vtkm")
depends_on("vtk-m~openmp", when="+rocm+vtkm")
diff --git a/var/spack/repos/builtin/packages/ecp-proxy-apps/package.py b/var/spack/repos/builtin/packages/ecp-proxy-apps/package.py
index b2f124e68e..833d5b9e52 100644
--- a/var/spack/repos/builtin/packages/ecp-proxy-apps/package.py
+++ b/var/spack/repos/builtin/packages/ecp-proxy-apps/package.py
@@ -53,7 +53,6 @@ class EcpProxyApps(BundlePackage):
depends_on("picsarlite@0.1", when="@2.0:")
depends_on("thornado-mini@1.0", when="@2.0:")
- depends_on("candle-benchmarks@0.1", when="+candle @2.0:2.1")
depends_on("laghos@2.0", when="@2.0:2.1")
depends_on("macsio@1.1", when="@2.0:")
depends_on("sw4lite@1.1", when="@2.0:")
@@ -71,7 +70,6 @@ class EcpProxyApps(BundlePackage):
# Dependencies for versions 1.0:1.1
depends_on("amg2013@1.0", when="@1.0:1.1")
- depends_on("candle-benchmarks@0.0", when="+candle @1.0:1.1")
depends_on("laghos@1.0", when="@1.0:1.1")
depends_on("macsio@1.0", when="@1.0:1.1")
depends_on("miniamr@1.4.0", when="@1.0:1.1")
diff --git a/var/spack/repos/builtin/packages/ectrans/package.py b/var/spack/repos/builtin/packages/ectrans/package.py
index e4e7ac65be..b8acf4da02 100644
--- a/var/spack/repos/builtin/packages/ectrans/package.py
+++ b/var/spack/repos/builtin/packages/ectrans/package.py
@@ -23,9 +23,14 @@ class Ectrans(CMakePackage):
version("develop", branch="develop", no_cache=True)
version("main", branch="main", no_cache=True)
+ version("1.5.0", sha256="8b2b24d1988b92dc3793b29142946614fca9e9c70163ee207d2a123494430fde")
+ version("1.4.0", sha256="1364827511a2eb11716aaee85062c3ab0e6b5d5dca7a7b9c364e1c43482b8691")
version("1.2.0", sha256="2ee6dccc8bbfcc23faada1d957d141f24e41bb077c1821a7bc2b812148dd336c")
version("1.1.0", sha256="3c9848bb65033fbe6d791084ee347b3adf71d5dfe6d3c11385000017b6469a3e")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
diff --git a/var/spack/repos/builtin/packages/ed/package.py b/var/spack/repos/builtin/packages/ed/package.py
index df2c77d0ab..36e5d5171f 100644
--- a/var/spack/repos/builtin/packages/ed/package.py
+++ b/var/spack/repos/builtin/packages/ed/package.py
@@ -18,4 +18,6 @@ class Ed(AutotoolsPackage, GNUMirrorPackage):
version("1.4", sha256="db36da85ee1a9d8bafb4b041bd4c8c11becba0c43ec446353b67045de1634fda")
+ depends_on("c", type="build") # generated
+
parallel = False
diff --git a/var/spack/repos/builtin/packages/editline/package.py b/var/spack/repos/builtin/packages/editline/package.py
index 4d6f8024f6..5cfe0db26f 100644
--- a/var/spack/repos/builtin/packages/editline/package.py
+++ b/var/spack/repos/builtin/packages/editline/package.py
@@ -17,6 +17,8 @@ class Editline(AutotoolsPackage):
version("1.17.1", sha256="d65c5739c8ca388fa71feabc5aae506d052e1a6d288ee4e7fcab7efb07a3be74")
version("1.16.0", sha256="33421a1569d025f332a87054bfea28e2c757bdb573f1437bc22c34b798b6383c")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/editorconfig/package.py b/var/spack/repos/builtin/packages/editorconfig/package.py
new file mode 100644
index 0000000000..6ded3f667b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/editorconfig/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Editorconfig(CMakePackage):
+ """
+ EditorConfig helps maintain consistent coding styles for multiple
+ developers working on the same project across various editors and IDEs.
+ """
+
+ homepage = "https://editorconfig.org/"
+ url = "https://github.com/editorconfig/editorconfig-core-c/archive/refs/tags/v0.12.7.tar.gz"
+
+ license("BSD-2-Clause", checked_by="taliaferro")
+
+ version("0.12.7", sha256="f89d2e144fd67bdf0d7acfb2ac7618c6f087e1b3f2c3a707656b4180df422195")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("pcre2")
diff --git a/var/spack/repos/builtin/packages/editres/package.py b/var/spack/repos/builtin/packages/editres/package.py
index 16053f9e3b..352cc81919 100644
--- a/var/spack/repos/builtin/packages/editres/package.py
+++ b/var/spack/repos/builtin/packages/editres/package.py
@@ -15,6 +15,8 @@ class Editres(AutotoolsPackage, XorgPackage):
version("1.0.8", sha256="2d56d6077bc767afa7e030feb2c372fe6be893fec4029a23f45a1d559fd846ae")
version("1.0.6", sha256="85f4664ca582effb01ee972d006124569b757b9a08ae6608c3f45fc36b3b7b1a")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libx11")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/edm4hep/package.py b/var/spack/repos/builtin/packages/edm4hep/package.py
index 1422394e5f..97c32283b0 100644
--- a/var/spack/repos/builtin/packages/edm4hep/package.py
+++ b/var/spack/repos/builtin/packages/edm4hep/package.py
@@ -20,118 +20,90 @@ class Edm4hep(CMakePackage):
license("Apache-2.0")
- version("master", branch="master")
- version("0.10.2", sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2")
- version("0.10.1", sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed")
- version("0.10", sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0")
+ version("main", branch="main")
+ version("0.99.1", sha256="84d990f09dbd0ad2198596c0c51238a4b15391f51febfb15dd3d191dc7aae9f4")
+ version("0.99", sha256="3636e8c14474237029bf1a8be11c53b57ad3ed438fd70a7e9b87c5d08f1f2ea6")
+ version("0.10.5", sha256="003c8e0c8e1d1844592d43d41384f4320586fbfa51d4d728ae0870b9c4f78d81")
version(
- "0.9",
- sha256="170ef84822761c4b02da9047f2b4d0dd0f48ed1c027b10171d4207b1542fbd5c",
+ "0.10.4",
+ sha256="76d51947525bc8a27b62f567033255da2e632d42d07a32ff578887948d56bd6f",
deprecated=True,
)
version(
- "0.8",
- sha256="102d57167885eba3bea79f6b6647e5303ad8732c5784590abdcdd816b2411c79",
+ "0.10.3",
+ sha256="0ba5e4e90376f750f9531831909160e3d7b9c2d1f020d7556f0d3977b7eaafcc",
deprecated=True,
)
version(
- "0.7.2",
- sha256="e289280d5de2c0a3b542bf9dfe04b9f6471b0a0fcf33f5c8101ea7252e2a7643",
+ "0.10.2",
+ sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2",
deprecated=True,
)
version(
- "0.7.1",
- sha256="82e215a532f548a73a6f6094eaa8b436c553994e135f6d63a674543dc89a9f1b",
+ "0.10.1",
+ sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed",
deprecated=True,
)
version(
- "0.7",
- sha256="0cef3f06d86c13e87e3343ac9d5db0b3087c421e8bda4bd2623858acb1af60c9",
- deprecated=True,
- )
- version(
- "0.6",
- sha256="625a5a939cb8d7a0a6ab5874a3e076d7dd5338446be3921b0cbc09de4d96b315",
- deprecated=True,
- )
- version(
- "0.5",
- sha256="aae4f001412d57585751d858999fe78e004755aa0303a503d503a325ef97d7e0",
- deprecated=True,
- )
- version(
- "0.4.2",
- sha256="5f2ff3a14729cbd4da370c7c768c2a09eb9f68f814d61690b1cc99c4248994f4",
- deprecated=True,
- )
- version(
- "0.4.1",
- sha256="122987fd5969b0f1639afa9668ac5181203746d00617ddb3bf8a2a9842758a63",
- deprecated=True,
- )
- version(
- "0.4",
- sha256="bcb729cd4a6f5917b8f073364fc950788111e178dd16b7e5218361f459c92a24",
- deprecated=True,
- )
- version(
- "0.3.2",
- sha256="b6a28649a4ba9ec1c4423bd1397b0a810ca97374305c4856186b506e4c00f769",
- deprecated=True,
- )
- version(
- "0.3.1",
- sha256="eeec38fe7d72d2a72f07a63dca0a34ca7203727f67869c0abf6bef014b8b319b",
- deprecated=True,
- )
- version(
- "0.3",
- sha256="d0ad8a486c3ed1659ea97d47b268fe56718fdb389b5935f23ba93804e4d5fbc5",
+ "0.10",
+ sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0",
deprecated=True,
)
- patch("test-deps.patch", when="@:0.3.2")
+ depends_on("cxx", type="build") # generated
- _cxxstd_values = ("17", "20")
+ _cxxstd_values = (conditional("17", when="@:0.99.0"), conditional("20", when="@0.10:"))
variant(
"cxxstd",
- default="17",
+ default="20",
values=_cxxstd_values,
multi=False,
description="Use the specified C++ standard when building.",
)
+ variant(
+ "json",
+ default=True,
+ description="Build edm4hep with JSON support and edm4hep2json",
+ when="@0.99.2:",
+ )
+
depends_on("cmake@3.3:", type="build")
depends_on("cmake@3.23:", type="build", when="@0.10.3:")
depends_on("python", type="build")
depends_on("root@6.08:")
- depends_on("nlohmann-json@3.10:", when="@0.7.1:")
- depends_on("podio@0.15:", when="@0.6:")
- depends_on("podio@0.14.1:", when="@0.4.1:")
- depends_on("podio@0.14", when="@0.4")
- depends_on("podio@0.13.0:0.13", when="@:0.3")
+ depends_on("nlohmann-json@3.10.5:", when="@0.99.2: +json")
+ depends_on("nlohmann-json@3.10.5:", when="@:0.99.1")
+ depends_on("podio@1:", when="@0.99:")
+ depends_on("podio@0.15:", when="@:0.10.5")
for _std in _cxxstd_values:
- depends_on("podio cxxstd=" + _std, when="cxxstd=" + _std)
+ for _v in _std:
+ depends_on(f"podio cxxstd={_v.value}", when=f"cxxstd={_v.value}")
depends_on("py-jinja2", type="build")
depends_on("py-pyyaml", type="build")
- depends_on("hepmc@:2", type="test", when="@:0.4.0")
- depends_on("hepmc3", type="test", when="@0.4.1:")
+ depends_on("hepmc3", type="test")
depends_on("heppdt", type="test")
depends_on("catch2@3.0.1:", type="test")
+ # Corresponding changes in EDM4hep landed with https://github.com/key4hep/EDM4hep/pull/314
+ extends("python", when="@0.10.6:")
+
def cmake_args(self):
args = []
# C++ Standard
args.append(self.define("CMAKE_CXX_STANDARD", self.spec.variants["cxxstd"].value))
args.append(self.define("BUILD_TESTING", self.run_tests))
+ if self.spec.satisfies("@0.99.2: +json"):
+ args.append(self.define_from_variant("EDM4HEP_WITH_JSON", "json"))
return args
def setup_run_environment(self, env):
env.prepend_path("LD_LIBRARY_PATH", self.spec["edm4hep"].libs.directories[0])
- env.prepend_path("PYTHONPATH", self.prefix.python)
+ if self.spec.satisfies("@:0.10.5"):
+ env.prepend_path("PYTHONPATH", self.prefix.python)
def url_for_version(self, version):
"""Translate version numbers to ilcsoft conventions.
diff --git a/var/spack/repos/builtin/packages/edm4hep/test-deps.patch b/var/spack/repos/builtin/packages/edm4hep/test-deps.patch
deleted file mode 100644
index 53d4bddacb..0000000000
--- a/var/spack/repos/builtin/packages/edm4hep/test-deps.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 6413c03..11325a4 100644
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -54,6 +54,7 @@ IF(TARGET ROOT::ROOTDataFrame)
- add_test(NAME test_rdf COMMAND test_rdf)
- set_tests_properties(test_rdf PROPERTIES
- ENVIRONMENT LD_LIBRARY_PATH=$<TARGET_FILE_DIR:edm4hep>:$<TARGET_FILE_DIR:podio::podio>:$ENV{LD_LIBRARY_PATH}
-+ DEPENDS write_events
- )
- endif()
-
diff --git a/var/spack/repos/builtin/packages/eem/package.py b/var/spack/repos/builtin/packages/eem/package.py
index 4b41e8cefd..777d1ce714 100644
--- a/var/spack/repos/builtin/packages/eem/package.py
+++ b/var/spack/repos/builtin/packages/eem/package.py
@@ -15,6 +15,8 @@ class Eem(MakefilePackage):
version("1.0.1", sha256="f617ea7350fce3b2581c814f70bda4427cbab83aac54a2dcadb36e8193f300bb")
+ depends_on("cxx", type="build") # generated
+
variant("K", default=False, description="Build for K computer")
depends_on("mpi")
@@ -29,7 +31,7 @@ class Eem(MakefilePackage):
settings.filter("$(HOME)/local", prefix, string=True)
settings.filter("mpicxx", self.spec["mpi"].mpicxx, string=True)
- if "+K" in self.spec:
+ if self.spec.satisfies("+K"):
settings.filter("CXXFLAGS= -Wall -Wno-sign-compare -g", "CXXFLAGS=", string=True)
settings.filter(
"CXXFLAGS+= -std=c++11 -DHAVE_UNORDERED_MAP",
diff --git a/var/spack/repos/builtin/packages/efivar/package.py b/var/spack/repos/builtin/packages/efivar/package.py
index 1ef249380a..9bfa06da51 100644
--- a/var/spack/repos/builtin/packages/efivar/package.py
+++ b/var/spack/repos/builtin/packages/efivar/package.py
@@ -18,5 +18,7 @@ class Efivar(MakefilePackage):
version("36", sha256="24ed0cafbaf6d913e8f60e5da3cbbac1a1578e16cf5c95b21f2eb6753c13173f")
version("35", sha256="747bc4d97b4bd74979e5356c44a172534a8a07184f130349fd201742e683d292")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("PREFIX={0}".format(prefix), "install")
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index 6301084fa3..5f0105c217 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -7,17 +7,20 @@
from spack.package import *
-class Eigen(CMakePackage):
+class Eigen(CMakePackage, ROCmPackage):
"""Eigen is a C++ template library for linear algebra matrices,
vectors, numerical solvers, and related algorithms.
"""
homepage = "https://eigen.tuxfamily.org/"
+ git = "https://gitlab.com/libeigen/eigen.git"
url = "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz"
+
maintainers("HaoZeke")
license("MPL-2.0")
+ version("master", branch="master")
version("3.4.0", sha256="8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72")
version("3.3.9", sha256="7985975b787340124786f092b3a07d594b2e9cd53bbfe5f3d9b1daee7d55f56f")
version("3.3.8", sha256="146a480b8ed1fb6ac7cd33fec9eb5e8f8f62c3683b3f850094d9d5c35a92419a")
@@ -36,6 +39,16 @@ class Eigen(CMakePackage):
version("3.2.6", sha256="e097b8dcc5ad30d40af4ad72d7052e3f78639469baf83cffaadc045459cda21f")
version("3.2.5", sha256="8068bd528a2ff3885eb55225c27237cf5cda834355599f05c2c85345db8338b4")
+ variant("nightly", description="run Nightly test", default=False)
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # TODO: https://eigen.tuxfamily.org/dox/TopicUsingBlasLapack.html
+
+ # Older eigen releases haven't been tested with ROCm
+ conflicts("+rocm @:3.4.0")
+
# there is a bug that provokes bad parsing of nvhpc version
patch(
"https://gitlab.com/libeigen/eigen/-/commit/001a57519a7aa909d3bf0cd8c6ec8a9cd19d9c70.diff",
@@ -64,6 +77,7 @@ class Eigen(CMakePackage):
values=("Debug", "Release", "RelWithDebInfo"),
)
+ depends_on("boost@1.53:", when="@master", type="test")
# TODO: latex and doxygen needed to produce docs with make doc
# TODO: Other dependencies might be needed to test this package
@@ -75,9 +89,29 @@ class Eigen(CMakePackage):
if self.spec.satisfies("@:3.4"):
# CMake fails without this flag
# https://gitlab.com/libeigen/eigen/-/issues/1656
- args += [self.define("BUILD_TESTING", "ON")]
+ args.extend([self.define("BUILD_TESTING", "ON")])
+
+ if self.spec.satisfies("+rocm"):
+ args.extend(
+ [
+ self.define("ROCM_PATH", self.spec["hip"].prefix),
+ self.define("HIP_PATH", self.spec["hip"].prefix),
+ self.define("EIGEN_TEST_HIP", "ON"),
+ ]
+ )
+
+ if self.spec.satisfies("@master") and self.run_tests:
+ args.append(self.define("Boost_INCLUDE_DIR", self.spec["boost"].prefix.include))
+
return args
+ def check(self):
+ ctest_args = ["--test-dir", self.build_directory, "--repeat", "until-pass:3"]
+ if self.spec.satisfies("+nightly"):
+ ctest_args.append("-D")
+ ctest_args.append("Nightly")
+ ctest(*ctest_args)
+
@property
def headers(self):
headers = find_all_headers(self.prefix.include)
diff --git a/var/spack/repos/builtin/packages/eigenexa/package.py b/var/spack/repos/builtin/packages/eigenexa/package.py
index 7678f2138b..8eb21e6f37 100644
--- a/var/spack/repos/builtin/packages/eigenexa/package.py
+++ b/var/spack/repos/builtin/packages/eigenexa/package.py
@@ -10,9 +10,21 @@ class Eigenexa(AutotoolsPackage):
"""EigenExa is a high-performance eigenvalue solver."""
homepage = "https://www.r-ccs.riken.jp/labs/lpnctrt/projects/eigenexa/"
- url = "https://www.r-ccs.riken.jp/labs/lpnctrt/projects/eigenexa/EigenExa-2.6.tgz"
- version("2.6", sha256="a1a4e571a8051443f28e7ea4889272993452a4babd036d2b4dd6b28154302f95")
+ version("2.12", sha256="2a33999b09d4434a5ce2fbd18cabbfee1cff0b2a12df7ded1f67127157b08f86")
+ version("2.11", sha256="87dee8ac13f410a007e82df2688fa7f143883229dac729fd20836f4a28fac43d")
+ version("2.10", sha256="5b1806e132b191d23680b34fbc286d676ba20f58ee754122087a3ec3cacb8fa3")
+ version("2.9", sha256="8788922035bf67abf1a7aecf8e30dd7564de387fda4ecd11c6b4cf9259d25990")
+ version("2.8", sha256="3ee846d4db10336d393738eadab2f1c941dfc8fb501f2a4baf0823f0ff938f56")
+ version("2.7", sha256="490f3d0217a8c101e66e785229baaba5b4d674508bc9a5aca6cc5fa074f3a8aa")
+ version(
+ "2.6",
+ sha256="a1a4e571a8051443f28e7ea4889272993452a4babd036d2b4dd6b28154302f95",
+ url="https://www.r-ccs.riken.jp/labs/lpnctrt/projects/eigenexa/EigenExa-2.6.tgz",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -23,11 +35,16 @@ class Eigenexa(AutotoolsPackage):
depends_on("scalapack")
patch("fj_compiler.patch", when="%fj")
- patch("gcc_compiler.patch", when="%gcc")
+ patch("gcc_compiler.patch", when="@:2.6.99 %gcc")
parallel = False
force_autoreconf = True
+ def url_for_version(self, version):
+ return "https://www.r-ccs.riken.jp/labs/lpnctrt/projects/eigenexa/EigenExa-{0}.{1}".format(
+ version, "tar.gz" if version >= Version("2.7") else ".tgz"
+ )
+
def setup_build_environment(self, env):
env.set("FC", self.spec["mpi"].mpifc, force=True)
env.set("F77", self.spec["mpi"].mpif77, force=True)
@@ -47,10 +64,17 @@ class Eigenexa(AutotoolsPackage):
),
)
+ if self.spec.satisfies("%gcc@10:"):
+ fflags = "-fallow-argument-mismatch"
+ if self.spec.satisfies("@:2.8"):
+ fflags += " -fallow-invalid-boz"
+ env.set("FCFLAGS", fflags)
+ env.set("FFLAGS", fflags)
+
@run_after("install")
def cache_test_sources(self):
"""Save off benchmark files for stand-alone tests."""
- self.cache_extra_test_sources("benchmark")
+ cache_extra_test_sources(self, "benchmark")
def test_benchmarks(self):
"""run benchmark checks"""
diff --git a/var/spack/repos/builtin/packages/elasticsearch/package.py b/var/spack/repos/builtin/packages/elasticsearch/package.py
index b17ec06686..200a836053 100644
--- a/var/spack/repos/builtin/packages/elasticsearch/package.py
+++ b/var/spack/repos/builtin/packages/elasticsearch/package.py
@@ -13,14 +13,23 @@ class Elasticsearch(Package):
"""
homepage = "https://www.elastic.co/"
- url = "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz"
+ url = "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.15.2-linux-x86_64.tar.gz"
- version("6.4.0", sha256="e9786efb5cecd12adee2807c7640ba9a1ab3b484d2e87497bb8d0b6df0e24f01")
- version("6.3.0", sha256="0464127140820d82b24bd2830232131ea85bcd49267a8bc7365e4fa391dee2a3")
- version("6.2.4", sha256="91e6f1ea1e1dd39011e7a703d2751ca46ee374665b08b0bfe17e0c0c27000e8e")
+ version("8.15.2", sha256="0b6905ede457be9d1d73d0b6be1c3a7c7c6220829846b532f2604ad30ba7308f")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2018-3831
+ version("6.4.0", sha256="e9786efb5cecd12adee2807c7640ba9a1ab3b484d2e87497bb8d0b6df0e24f01")
+ version("6.3.0", sha256="0464127140820d82b24bd2830232131ea85bcd49267a8bc7365e4fa391dee2a3")
+ version("6.2.4", sha256="91e6f1ea1e1dd39011e7a703d2751ca46ee374665b08b0bfe17e0c0c27000e8e")
depends_on("java", type="run")
+ def url_for_version(self, version):
+ if self.spec.satisfies("@:6"):
+ return f"https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}.tar.gz"
+ else:
+ return f"https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{version}-linux-x86_64.tar.gz"
+
def install(self, spec, prefix):
dirs = ["bin", "config", "lib", "modules", "plugins"]
diff --git a/var/spack/repos/builtin/packages/elbencho/package.py b/var/spack/repos/builtin/packages/elbencho/package.py
index bcc0b6fc53..bfb632efb6 100644
--- a/var/spack/repos/builtin/packages/elbencho/package.py
+++ b/var/spack/repos/builtin/packages/elbencho/package.py
@@ -9,7 +9,6 @@ from spack.package import *
class Elbencho(MakefilePackage):
-
"""
Elbencho storage benchmark
"""
@@ -34,6 +33,9 @@ class Elbencho(MakefilePackage):
version("2.0-9", sha256="fe0f67fbb7dd7c743f8b3e0a92358f7393f2950da456474d4adb38690fab1878")
version("2.0-7", sha256="a2e49cb2cf1ae99e46e9fa95b42ece250cb58fbadb4c393f9776b40204e8b2c0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("s3", default=False, description="Enable support for s3 api")
variant("cuda", default=True, description="Enable CUDA support", when="+cufile")
variant("cuda", default=False, description="Enable CUDA support")
@@ -57,7 +59,7 @@ class Elbencho(MakefilePackage):
depends_on("curl", when="+s3")
depends_on("libarchive", when="+s3")
depends_on("openssl", when="+s3")
- depends_on("libuuid", when="+s3")
+ depends_on("uuid", when="+s3")
depends_on("zlib", when="+s3")
depends_on("cmake", when="+s3")
@@ -66,11 +68,11 @@ class Elbencho(MakefilePackage):
def edit(self, spec, prefix):
os.mkdir(prefix.bin)
os.environ["INST_PATH"] = prefix.bin
- if "+s3" in spec:
+ if spec.satisfies("+s3"):
os.environ["S3_SUPPORT"] = "1"
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
os.environ["CUDA_SUPPORT"] = "1"
- if "+cufile" in spec:
+ if spec.satisfies("+cufile"):
os.environ["CUFILE_SUPPORT"] = "1"
makefile = FileFilter("Makefile")
makefile.filter(r"\s+/etc/bash_completion.d/", f" {prefix}/etc/bash_completion.d/")
diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py
index 49306457d6..85dba11538 100644
--- a/var/spack/repos/builtin/packages/elemental/package.py
+++ b/var/spack/repos/builtin/packages/elemental/package.py
@@ -6,7 +6,6 @@
import os
from spack.package import *
-from spack.spec import UnsupportedCompilerError
class Elemental(CMakePackage):
@@ -23,6 +22,9 @@ class Elemental(CMakePackage):
version("0.87.7", sha256="7becfdbc223e9c72e65ae876d842c48d2037d13f83e9f41cea285e21b840d7d9")
version("0.87.6", sha256="b597987c99ddd3462e0619524c5b7f711177ae8ae541b1b961e11d96e15afc64")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("hybrid", default=True, description="Make use of OpenMP within MPI packing/unpacking")
variant(
@@ -91,6 +93,8 @@ class Elemental(CMakePackage):
patch("elemental_cublas.patch", when="+cublas")
patch("cmake_0.87.7.patch", when="@0.87.7")
+ conflicts("%intel@:17.0.2", when="@:0.87.7")
+
@property
def libs(self):
shared = True if "+shared" in self.spec else False
@@ -98,14 +102,6 @@ class Elemental(CMakePackage):
def cmake_args(self):
spec = self.spec
-
- if "@:0.87.7" in spec and "%intel@:17.0.2" in spec:
- raise UnsupportedCompilerError(
- "Elemental {0} has a known bug with compiler: {1} {2}".format(
- spec.version, spec.compiler.name, spec.compiler.version
- )
- )
-
args = [
"-DCMAKE_INSTALL_MESSAGE:STRING=LAZY",
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
@@ -147,7 +143,7 @@ class Elemental(CMakePackage):
# If using 64bit int BLAS libraries, elemental has to build
# them internally
- if "+int64_blas" in spec:
+ if spec.satisfies("+int64_blas"):
args.extend(
[
"-DEL_BLAS_SUFFIX:STRING={0}".format(
@@ -156,7 +152,7 @@ class Elemental(CMakePackage):
"-DCUSTOM_BLAS_SUFFIX:BOOL=TRUE",
]
),
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
args.extend(
[
"-DEL_LAPACK_SUFFIX:STRING={0}".format(
@@ -168,7 +164,7 @@ class Elemental(CMakePackage):
else:
math_libs = spec["lapack"].libs + spec["blas"].libs
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
math_libs = spec["scalapack"].libs + math_libs
args.extend(["-DMATH_LIBS:STRING={0}".format(math_libs.ld_flags)])
diff --git a/var/spack/repos/builtin/packages/elfio/package.py b/var/spack/repos/builtin/packages/elfio/package.py
index 9205da9481..c38246216a 100644
--- a/var/spack/repos/builtin/packages/elfio/package.py
+++ b/var/spack/repos/builtin/packages/elfio/package.py
@@ -25,6 +25,9 @@ class Elfio(CMakePackage):
version("3.8", sha256="9553ce2b8d8aa2fb43f0e9be9bcbd10cd52f40b385110ea54173889c982f9ac4")
version("3.7", sha256="0af2452214c32639f8dbe520b31e03802be184581ab5ad65e99ed745274dbd5d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# note, 3.10 is required on master it seems
depends_on("cmake@3.12:", when="@3.8:", type="build")
depends_on("cmake@3.12.4:", when="@3.7", type="build")
diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py
index 7ebea92c43..d097728c91 100644
--- a/var/spack/repos/builtin/packages/elfutils/package.py
+++ b/var/spack/repos/builtin/packages/elfutils/package.py
@@ -27,6 +27,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
license("GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )")
+ version("0.191", sha256="df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871")
version("0.190", sha256="8e00a3a9b5f04bc1dc273ae86281d2d26ed412020b391ffcc23198f10231d692")
version("0.189", sha256="39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8")
version("0.188", sha256="fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff")
@@ -49,6 +50,9 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
version("0.168", sha256="b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276")
version("0.163", sha256="7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Native language support from libintl.
variant("nls", default=True, description="Enable Native Language Support.")
variant("exeprefix", default=True, description="Add a prefix to generated executables.")
@@ -124,16 +128,16 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
else:
args.append("--program-prefix=''")
- if "@0.182:" in spec:
+ if spec.satisfies("@0.182:"):
args.append("--with-zstd=%s" % spec["zstd"].prefix)
if spec.satisfies("@0.183:"):
- if spec["iconv"].name == "libc":
+ if spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix=" + format(spec["iconv"].prefix))
- if "+nls" in spec:
+ if spec.satisfies("+nls"):
# Prior to 0.183, only msgfmt is used from gettext.
if spec.satisfies("@0.183:"):
if "intl" not in spec["gettext"].libs.names:
@@ -143,7 +147,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
else:
args.append("--disable-nls")
- if "+debuginfod" in spec:
+ if spec.satisfies("+debuginfod"):
args.append("--enable-debuginfod")
if spec.satisfies("@0.181:"):
args.append("--enable-libdebuginfod")
diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py
index 96dda40d5e..a010200e49 100644
--- a/var/spack/repos/builtin/packages/elk/package.py
+++ b/var/spack/repos/builtin/packages/elk/package.py
@@ -25,6 +25,9 @@ class Elk(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# what linear algebra packages to use? the choices are
# internal - use internal libraries
# generic - use spack-provided blas and lapack
@@ -122,8 +125,6 @@ class Elk(MakefilePackage):
flags = "-O3 -ffast-math -funroll-loops"
if spec.satisfies("%gcc@10:"):
flags += " -fallow-argument-mismatch "
- elif self.compiler.name == "pgi":
- flags = "-O3 -lpthread"
elif self.compiler.name == "g95":
flags = "-O3 -fno-second-underscore"
elif self.compiler.name == "nag":
@@ -133,7 +134,7 @@ class Elk(MakefilePackage):
config["F90_OPTS"] = flags
config["F77_OPTS"] = flags
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
config["F90"] = spec["mpi"].mpifc
config["F77"] = spec["mpi"].mpif77
config["SRC_MPI"] = " "
@@ -143,7 +144,7 @@ class Elk(MakefilePackage):
config["SRC_MPI"] = "mpi_stub.f90"
# OpenMP support
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
config["F90_OPTS"] += " " + self.compiler.openmp_flag
config["F77_OPTS"] += " " + self.compiler.openmp_flag
config["SRC_OMP"] = " "
@@ -151,29 +152,29 @@ class Elk(MakefilePackage):
# BLAS/LAPACK support
# Note: openblas must be compiled with OpenMP support
# if the +openmp variant is chosen
- if "linalg=internal" in spec:
+ if spec.satisfies("linalg=internal"):
self.build_targets.append("blas")
self.build_targets.append("lapack")
- if "linalg=generic" in spec:
+ if spec.satisfies("linalg=generic"):
blas = spec["blas"].libs.joined()
lapack = spec["lapack"].libs.joined()
config["LIB_LPK"] = " ".join([lapack, blas])
- if "linalg=openblas" in spec:
+ if spec.satisfies("linalg=openblas"):
config["LIB_LPK"] = spec["openblas"].libs.ld_flags
config["SRC_OBLAS"] = " "
- if "linalg=mkl" in spec:
+ if spec.satisfies("linalg=mkl"):
config["LIB_LPK"] = spec["mkl"].libs.ld_flags
config["SRC_MKL"] = " "
- if "linalg=blis" in spec:
+ if spec.satisfies("linalg=blis"):
config["LIB_LPK"] = " ".join(["lapack.a ", spec["blis"].libs.ld_flags])
config["SRC_BLIS"] = " "
# FFT
- if "fft=internal" in spec:
+ if spec.satisfies("fft=internal"):
self.build_targets.append("fft")
- elif "fft=fftw" in spec:
+ elif spec.satisfies("fft=fftw"):
config["LIB_FFT"] = spec["fftw"].libs.ld_flags
config["SRC_FFT"] = "zfftifc_fftw.f90"
- elif "fft=mkl" in spec:
+ elif spec.satisfies("fft=mkl"):
config["LIB_FFT"] = spec["mkl"].libs.ld_flags
config["SRC_FFT"] = "mkl_dfti.f90 zfftifc_mkl.f90"
cp = which("cp")
@@ -189,7 +190,7 @@ class Elk(MakefilePackage):
self.build_targets.append("elk")
print(self.build_targets)
# Libxc support
- if "+libxc" in spec:
+ if spec.satisfies("+libxc"):
config["LIB_libxc"] = " ".join(
[
join_path(spec["libxc"].prefix.lib, "libxcf90.so"),
diff --git a/var/spack/repos/builtin/packages/elmerfem/package.py b/var/spack/repos/builtin/packages/elmerfem/package.py
index 3d8863054a..123cdf5866 100644
--- a/var/spack/repos/builtin/packages/elmerfem/package.py
+++ b/var/spack/repos/builtin/packages/elmerfem/package.py
@@ -21,6 +21,10 @@ class Elmerfem(CMakePackage):
version("9.0", sha256="08c5bf261e87ff37456c1aa0372db3c83efabe4473ea3ea0b8ec66f5944d1aa0")
version("8.4", sha256="cc3ce807d76798361592cc14952cdc3db1ad8f9bac038017514033ce9badc5b3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("gui", default=False, description="Enable GUI support.")
variant("mpi", default=True, description="Enable MPI support.")
variant("openmp", default=True, description="Enable OpenMP support.")
@@ -53,7 +57,7 @@ class Elmerfem(CMakePackage):
args = ["-DWITH_ElmerIce=ON", "-DWITH_CONTRIB=ON"]
- if "+gui" in spec:
+ if spec.satisfies("+gui"):
args.append("-DWITH_ELMERGUI:BOOL=TRUE")
args.append("-DWITH_QT5:BOOL=TRUE")
args.append("-DWITH_QWT:BOOL=TRUE")
@@ -61,7 +65,7 @@ class Elmerfem(CMakePackage):
else:
args.append("-DWITH_ELMERGUI:BOOL=FALSE")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append("-DWITH_MPI=ON")
else:
args.append("-DWITH_MPI=OFF")
@@ -69,40 +73,40 @@ class Elmerfem(CMakePackage):
if self.spec.satisfies("^intel-mkl"):
args.append("-DWITH_MKL:BOOL=TRUE")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("-DWITH_OpenMP=ON")
else:
args.append("-DWITH_OpenMP=OFF")
- if "+mumps" in spec:
+ if spec.satisfies("+mumps"):
args.append("-DWITH_Mumps=ON")
else:
args.append("-DWITH_Mumps=OFF")
- if "+hypre" in spec:
+ if spec.satisfies("+hypre"):
args.append("-DWITH_Hypre=ON")
else:
args.append("-DWITH_Hypre=OFF")
- if "+trilinos" in spec:
+ if spec.satisfies("+trilinos"):
args.extend(["-DWITH_Trilinos=ON", "-DCMAKE_CXX_STANDARD=11"])
else:
args.append("-DWITH_Trilinos=OFF")
- if "+lua" in spec:
+ if spec.satisfies("+lua"):
args.extend(["-DWITH_LUA=ON", "-DUSE_SYSTEM_LUA=ON"])
- if "%gcc" in spec:
+ if spec.satisfies("%gcc"):
args.append("-DCMAKE_Fortran_FLAGS=-ffree-line-length-none")
else:
args.append("-DWITH_LUA=OFF")
- if "+zoltan" in spec:
+ if spec.satisfies("+zoltan"):
args.extend(["-DWITH_Zoltan=ON", "-DUSE_SYSTEM_ZOLTAN=ON"])
else:
args.append("-DWITH_Zoltan=OFF")
- if "+scatt2d" in spec:
+ if spec.satisfies("+scatt2d"):
args.extend(
[
"-DWITH_ScatteredDataInterpolator=ON",
@@ -128,5 +132,5 @@ class Elmerfem(CMakePackage):
def setup_run_environment(self, env):
env.set("ELMER_HOME", self.prefix)
env.set("ELMER_Fortran_COMPILER", self.compiler.fc)
- if "+gui" in self.spec:
+ if self.spec.satisfies("+gui"):
env.set("ELMERGUI_HOME", self.prefix.share.ElmerGUI)
diff --git a/var/spack/repos/builtin/packages/elpa/fujitsu.patch b/var/spack/repos/builtin/packages/elpa/fujitsu.patch
new file mode 100644
index 0000000000..d3600cf6bc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/elpa/fujitsu.patch
@@ -0,0 +1,65 @@
+From 8bda2149e4398bb6e6b66e601151966c91f9ec78 Mon Sep 17 00:00:00 2001
+From: m-shunji <m.shunji@fujitsu.com>
+Date: Wed, 13 Sep 2023 17:58:26 +0900
+Subject: [PATCH] Fix compile error in disabling openmp
+
+---
+ src/elpa_impl_math_template.F90 | 6 +++---
+ test/Fortran/test_autotune.F90 | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/elpa_impl_math_template.F90 b/src/elpa_impl_math_template.F90
+index f87a0ad..b41c0c3 100644
+--- a/src/elpa_impl_math_template.F90
++++ b/src/elpa_impl_math_template.F90
+@@ -888,10 +888,10 @@
+ #endif
+ #ifdef COMPLEXCASE
+ #ifdef DOUBLE_PRECISION_COMPLEX
+- & !bind(C, name="elpa_solve_tridiagonal_dc")
++ bind(C, name="elpa_solve_tridiagonal_dc")
+ #endif
+ #ifdef SINGLE_PRECISION_COMPLEX
+- & !bind(C, name="elpa_solve_tridiagonal_fc")
++ bind(C, name="elpa_solve_tridiagonal_fc")
+ #endif
+ #endif
+
+@@ -913,4 +913,4 @@
+ &ELPA_IMPL_SUFFIX&
+ & (self, d, e, q, error)
+ end subroutine
+-
+\ No newline at end of file
++
+diff --git a/test/Fortran/test_autotune.F90 b/test/Fortran/test_autotune.F90
+index 4662564..5355ab3 100644
+--- a/test/Fortran/test_autotune.F90
++++ b/test/Fortran/test_autotune.F90
+@@ -312,8 +312,8 @@ program test
+ status = check_correctness_analytic(na, nev, ev, z, nblk, myid, np_rows, np_cols, my_prow, my_pcol, &
+ .true., .true., print_times=.false.)
+ a(:,:) = as(:,:)
+- call e%autotune_print_state(tune_state)
+- call e%autotune_save_state(tune_state, "saved_state_"//trim(iter_string)//".txt")
++ call e%autotune_print_state(tune_state, error_elpa)
++ call e%autotune_save_state(tune_state, "saved_state_"//trim(iter_string)//".txt", error_elpa)
+ end do
+
+ !! set and print the autotuned-settings
+--
+1.8.3.1
+diff --git a/manual_cpp b/manual_cpp
+index 6f74a79..dbdfc65 100755
+--- a/manual_cpp
++++ b/manual_cpp
+@@ -46,7 +46,7 @@ elif len(files) == 0:
+ elif len(files) == 1:
+ file, = files
+
+-tmp_filename = "manually_preprocessed_" + file.replace("/", "_")
++tmp_filename = "manually_preprocessed_" + file.replace("/", "_").replace("-", "_")
+
+ try:
+ output = args.index("-o")
+
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py
index cd9f49f4c5..b1f07a460d 100644
--- a/var/spack/repos/builtin/packages/elpa/package.py
+++ b/var/spack/repos/builtin/packages/elpa/package.py
@@ -25,15 +25,18 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version(
- "2023.05.001", sha256="ec64be5d6522810d601a3b8e6a31720e3c3eb4af33a434d8a64570d76e6462b6"
+ "2024.03.001", sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622"
)
version(
- "2022.11.001", sha256="75db3ac146f9a6a1598e3418ddcab2be2f40a30ef9ec4c00a3b5d3808c99c430"
+ "2023.11.001-patched",
+ sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e",
+ url="https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2023.11.001/elpa-2023.11.001-patched.tar.gz",
)
version(
- "2022.11.001.rc2",
- sha256="13d67e7d69894c631b48e4fcac905b51c4e41554c7eb4731e98c4e205f0fab9f",
- deprecated=True,
+ "2023.05.001", sha256="ec64be5d6522810d601a3b8e6a31720e3c3eb4af33a434d8a64570d76e6462b6"
+ )
+ version(
+ "2022.11.001", sha256="75db3ac146f9a6a1598e3418ddcab2be2f40a30ef9ec4c00a3b5d3808c99c430"
)
version(
"2021.11.001", sha256="fb361da6c59946661b73e51538d419028f763d7cb9dacf9d8cd5c9cd3fb7802f"
@@ -46,10 +49,24 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
"2021.05.001", sha256="a4f1a4e3964f2473a5f8177f2091a9da5c6b5ef9280b8272dfefcbc3aad44d41"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Activates OpenMP support")
variant("mpi", default=True, description="Activates MPI support")
- depends_on("autoconf", type="build", when="@master")
+ with when("@2021.11.001:"):
+ variant(
+ "autotune", default=False, description="Enables autotuning for matrix restribution"
+ )
+ variant(
+ "gpu_streams", default=True, when="+cuda", description="Activates GPU streams support"
+ )
+
+ patch("fujitsu.patch", when="%fj")
+
+ depends_on("autoconf@2.71:", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("blas")
@@ -59,12 +76,20 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("rocblas", when="+rocm")
depends_on("libtool", type="build")
depends_on("python@3:", type="build")
-
- with when("@2021.11.01:"):
- variant(
- "autotune", default=False, description="Enables autotuning for matrix restribution"
+ depends_on("scalapack", when="+autotune")
+
+ # Force openmp propagation on some providers of blas/lapack, as adviced by docs
+ # https://gitlab.mpcdf.mpg.de/elpa/elpa/-/blob/master/documentation/PERFORMANCE_TUNING.md?ref_type=heads#builds-with-openmp-enabled
+ with when("+openmp"):
+ requires("^openblas threads=openmp", when="^[virtuals=blas,lapack] openblas")
+ requires("^intel-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-mkl")
+ requires(
+ "^intel-oneapi-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-oneapi-mkl"
+ )
+ requires(
+ "^intel-parallel-studio threads=openmp",
+ when="^[virtuals=blas,lapack] intel-parallel-studio",
)
- depends_on("scalapack", when="+autotune")
# fails to build due to broken type-bound procedures in OMP parallel regions
conflicts(
@@ -73,6 +98,11 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
msg="ELPA-2021.05.001+ requires GCC-8+ for OpenMP support",
)
conflicts("+mpi", when="+rocm", msg="ROCm support and MPI are not yet compatible")
+ conflicts(
+ "+gpu_streams",
+ when="@:2023.11.001-patched +openmp",
+ msg="GPU streams currently not supported in combination with OpenMP",
+ )
def url_for_version(self, version):
return "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/{0}/elpa-{0}.tar.gz".format(
@@ -91,7 +121,7 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
# upstream sometimes adds tarball suffixes not part of the internal version
elpa_version = str(self.spec.version)
- for vsuffix in ("_bugfix",):
+ for vsuffix in ("_bugfix", "-patched"):
if elpa_version.endswith(vsuffix): # implementation of py3.9 removesuffix
elpa_version = elpa_version[: -len(vsuffix)]
@@ -113,6 +143,9 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
options += self.with_or_without("mpi")
+ # New options use the "-kernels" suffix
+ kernels = "-kernels" if spec.satisfies("@2023.11:") else ""
+
# TODO: --disable-sse-assembly, --enable-sparc64, --enable-neon-arch64
# Don't include vsx; as of 2022.05 it fails (reported upstream).
# Altivec SSE intrinsics are used anyway.
@@ -120,32 +153,43 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
for feature in simd_features:
msg = "--enable-{0}" if feature in spec.target else "--disable-{0}"
- options.append(msg.format(feature))
+ options.append(msg.format(feature + kernels))
if spec.target.family != "x86_64":
options.append("--disable-sse-assembly")
- if "%aocc" in spec:
+ if spec.satisfies("%aocc") or spec.satisfies("%fj"):
options.append("--disable-shared")
options.append("--enable-static")
# If no features are found, enable the generic ones
if not any(f in spec.target for f in simd_features):
- options.append("--enable-generic")
+ options.append("--enable-generic" + kernels)
if self.compiler.name == "gcc":
options.extend(["CFLAGS=-O3", "FCFLAGS=-O3 -ffree-line-length-none"])
- if "%aocc" in spec:
+ if spec.satisfies("%aocc"):
options.extend(["FCFLAGS=-O3", "CFLAGS=-O3"])
+ if spec.satisfies("%fj"):
+ options.append("--disable-Fortran2008-features")
+ options.append("--enable-FUGAKU")
+ if spec.satisfies("+openmp"):
+ options.extend(["FCFLAGS=-Kparallel"])
+
cuda_flag = "nvidia-gpu"
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
prefix = spec["cuda"].prefix
- options.append("--enable-{0}".format(cuda_flag))
+ # Can't yet be changed to the new option --enable-nvidia-gpu-kernels
+ # https://github.com/marekandreas/elpa/issues/55
+ options.append(f"--enable-{cuda_flag}")
options.append("--with-cuda-path={0}".format(prefix))
options.append("--with-cuda-sdk-path={0}".format(prefix))
+ if spec.satisfies("+gpu_streams"):
+ options.append("--enable-gpu-streams=nvidia")
+
cuda_arch = spec.variants["cuda_arch"].value[0]
if cuda_arch != "none":
@@ -153,22 +197,29 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
"--with-{0}-compute-capability=sm_{1}".format(cuda_flag.upper(), cuda_arch)
)
else:
- options.append("--disable-{0}".format(cuda_flag))
+ options.append(f"--disable-{cuda_flag}" + kernels)
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
+ # Can't yet be changed to the new option --enable-amd-gpu-kernels
+ # https://github.com/marekandreas/elpa/issues/55
options.append("--enable-amd-gpu")
options.append("CXX={0}".format(self.spec["hip"].hipcc))
- elif "@2021.05.001:" in self.spec:
- options.append("--disable-amd-gpu")
+
+ if spec.satisfies("+gpu_streams"):
+ options.append("--enable-gpu-streams=amd")
+
+ elif self.spec.satisfies("@2021.05.001:"):
+ options.append("--disable-amd-gpu" + kernels)
options += self.enable_or_disable("openmp")
- options += [
- "LDFLAGS={0}".format(spec["lapack"].libs.search_flags),
- "LIBS={0} {1}".format(spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags),
- ]
+ # Additional linker search paths and link libs
+ ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags, "-lstdc++"]
+ libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags]
+
+ options += [f'LDFLAGS={" ".join(ldflags)}', f'LIBS={" ".join(libs)}']
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
options += [
"CC={0}".format(spec["mpi"].mpicc),
"CXX={0}".format(spec["mpi"].mpicxx),
@@ -176,7 +227,7 @@ class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
"SCALAPACK_LDFLAGS={0}".format(spec["scalapack"].libs.joined()),
]
- if "+autotune" in self.spec:
+ if self.spec.satisfies("+autotune"):
options.append("--enable-autotune-redistribute-matrix")
# --enable-autotune-redistribute-matrix requires --enable-scalapack-tests as well
options.append("--enable-scalapack-tests")
diff --git a/var/spack/repos/builtin/packages/elsd/package.py b/var/spack/repos/builtin/packages/elsd/package.py
index 1e2c68116d..14ec218678 100644
--- a/var/spack/repos/builtin/packages/elsd/package.py
+++ b/var/spack/repos/builtin/packages/elsd/package.py
@@ -16,6 +16,8 @@ class Elsd(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/elsdc/package.py b/var/spack/repos/builtin/packages/elsdc/package.py
index 2edb0fddf6..fe26f1cec3 100644
--- a/var/spack/repos/builtin/packages/elsdc/package.py
+++ b/var/spack/repos/builtin/packages/elsdc/package.py
@@ -16,6 +16,8 @@ class Elsdc(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/elsi/package.py b/var/spack/repos/builtin/packages/elsi/package.py
index 23fa1fc40f..43573255a0 100644
--- a/var/spack/repos/builtin/packages/elsi/package.py
+++ b/var/spack/repos/builtin/packages/elsi/package.py
@@ -2,26 +2,42 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os.path
from spack.package import *
-# See the Spack documentation for more information on packaging.
-# ----------------------------------------------------------------------------
-
-class Elsi(CMakePackage):
+class Elsi(CMakePackage, CudaPackage):
"""ELSI provides a unified interface for electronic structure
codes to a variety of eigenvalue solvers."""
homepage = "https://wordpress.elsi-interchange.org/"
- url = "https://wordpress.elsi-interchange.org/wp-content/uploads/2019/03/elsi-2.2.1.tar.gz"
+ url = "https://gitlab.com/elsi_project/elsi_interface/-/archive/v2.10.1/elsi_interface-v2.10.1.tar.gz"
+ git = "https://gitlab.com/elsi_project/elsi_interface.git"
license("BSD-3-Clause")
- version("2.2.1", sha256="5b4b2e8fa4b3b68131fe02cc1803a884039b89a1b1138af474af66453bec0b4d")
+ version("2.11.0", sha256="2e6929827ed9c99a32381ed9da40482e862c28608d59d4f27db7dcbcaed1520d")
+ version("2.10.1", sha256="b3c7526d46a9139a26680787172a3df15bc648715a35bdf384053231e94ab829")
+ version(
+ "2.2.1",
+ sha256="5b4b2e8fa4b3b68131fe02cc1803a884039b89a1b1138af474af66453bec0b4d",
+ deprecated=True,
+ )
+ version("master", branch="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ generator("ninja")
- # Variants (translation of cmake options)
- variant("add_underscore", default=True, description="Suffix C functions with an underscore")
+ variant(
+ "add_underscore",
+ default=True,
+ description="Suffix C functions with an underscore",
+ when="@2.2.1",
+ )
variant(
"elpa2_kernel",
default="none",
@@ -31,70 +47,142 @@ class Elsi(CMakePackage):
)
variant("enable_pexsi", default=False, description="Enable PEXSI support")
variant("enable_sips", default=False, description="Enable SLEPc-SIPs support")
- variant("use_external_elpa", default=False, description="Build ELPA using SPACK")
- variant("use_external_ntpoly", default=False, description="Build NTPoly using SPACK")
- variant("use_external_omm", default=False, description="Use external libOMM and MatrixSwitch")
- variant("use_external_superlu", default=False, description="Use external SuperLU DIST")
+ variant("use_external_elpa", default=True, description="Build ELPA using SPACK")
+ variant("use_external_ntpoly", default=True, description="Build NTPoly using SPACK")
+ variant(
+ "use_external_superlu", default=True, description="Use external SuperLU DIST", when="@:2.2"
+ )
variant(
- "use_mpi_iallgather", default=True, description="Use non-blocking collective MPI functions"
+ "use_external_pexsi",
+ default=True,
+ description="Use external PEXSI",
+ when="@2.3: +enable_pexsi",
)
+ variant("use_external_omm", default=True, description="Use external libOMM")
+ variant(
+ "use_mpi_iallgather",
+ default=True,
+ description="Use non-blocking collective MPI functions",
+ when="@:2.5",
+ )
+ variant(
+ "internal_elpa_version",
+ default="2020",
+ values=("2020", "2021", conditional("2023", "2023_11", "2024", when="@:2.11")),
+ description="Internal ELPA version",
+ multi=False,
+ )
+ variant("dlaf", default=False, when="@2.11:", description="Enable DLA-Future support")
# Basic dependencies
depends_on("blas", type="link")
depends_on("lapack", type="link")
- depends_on("cmake", type="build")
- depends_on("mpi")
depends_on("scalapack", type="link")
+ depends_on("mpi")
# Library dependencies
- depends_on("elpa", when="+use_external_elpa")
- depends_on("ntpoly", when="+use_external_ntpoly")
- depends_on("slepc", when="+enable_sips")
- depends_on("petsc", when="+enable_sips")
- depends_on("superlu-dist", when="+use_external_superlu")
+ with when("+use_external_ntpoly"):
+ depends_on("ntpoly")
+ depends_on("ntpoly@3:", when="@2.11:")
+ conflicts("^ntpoly@3:", when="@:2.10")
+ with when("+use_external_elpa"):
+ depends_on("elpa+cuda", when="+cuda")
+ depends_on("elpa~cuda", when="~cuda")
+ with when("+enable_sips"):
+ depends_on("slepc+cuda", when="+cuda")
+ depends_on("slepc~cuda", when="~cuda")
+ depends_on("petsc+cuda", when="+cuda")
+ depends_on("petsc~cuda", when="~cuda")
+ with when("+use_external_superlu"):
+ depends_on("superlu-dist+cuda", when="+cuda")
+ depends_on("superlu-dist~cuda", when="~cuda")
+ with when("+enable_pexsi +use_external_pexsi"):
+ depends_on("pexsi+fortran")
+ depends_on("superlu-dist+cuda", when="+cuda")
+ depends_on("superlu-dist~cuda", when="~cuda")
+ conflicts("^pexsi@2:", when="@:2.11")
+ with when("+use_external_omm"):
+ depends_on("omm")
+ depends_on("matrix-switch") # Direct dependency
+ with when("+dlaf"):
+ depends_on("dla-future-fortran")
+ conflicts("dla-future~cuda", when="+cuda")
+ conflicts("dla-future+cuda", when="~cuda")
def cmake_args(self):
- from os.path import dirname
-
- spec = self.spec
- args = []
-
- # Compiler Information
- # (ELSI wants these explicitly set)
- args += ["-DCMAKE_Fortran_COMPILER=" + self.spec["mpi"].mpifc]
- args += ["-DCMAKE_C_COMPILER=" + self.spec["mpi"].mpicc]
- args += ["-DCMAKE_CXX_COMPILER=" + self.spec["mpi"].mpicxx]
-
- # Handle the various variants
- if "-add_underscore" in self.spec:
- args += ["-DADD_UNDERSCORE=OFF"]
- if (
- "elpa2_kernel" in self.spec.variants
- and self.spec.variants["elpa2_kernel"].value != "none"
- ):
- kernel = self.spec.variants["elpa2_kernel"].value
- args += ["-DELPA2_KERNEL=" + kernel]
- if "+enable_pexsi" in self.spec:
- args += ["-DENABLE_PEXSI=ON"]
- if "+enable_sips" in self.spec:
- args += ["-DENABLE_SIPS=ON"]
- if "+use_external_elpa" in self.spec:
- args += ["-DUSE_EXTERNAL_ELPA=ON"]
- # Setup the searchpath for elpa
- elpa = self.spec["elpa"]
- elpa_module = find(elpa.prefix, "elpa.mod")
- args += ["-DINC_PATHS=" + dirname(elpa_module[0])]
- if "+use_external_ntpoly" in self.spec:
- args += ["-DUSE_EXTERNAL_NTPOLY=ON"]
- if "+use_external_omm" in self.spec:
- args += ["-DUSE_EXTERNAL_OMM=ON"]
- if "+use_external_superlu" in self.spec:
- args += ["-DUSE_EXTERNAL_SUPERLU=ON"]
- if "-use_mpi_iallgather" in self.spec:
- args += ["-DUSE_MPI_IALLGATHER=OFF"]
+ libs_names = ["scalapack", "lapack", "blas"]
+
+ # External libraries
+ if self.spec.satisfies("+use_external_elpa"):
+ libs_names.append("elpa")
+ if self.spec.satisfies("+use_external_ntpoly"):
+ libs_names.append("ntpoly")
+ if self.spec.satisfies("+use_external_superlu"):
+ libs_names.append("superlu-dist")
+ if self.spec.satisfies("+use_external_pexsi"):
+ libs_names.append("superlu-dist")
+ libs_names.append("pexsi")
+ if self.spec.satisfies("+use_external_omm"):
+ libs_names.append("omm")
+ libs_names.append("matrix-switch")
+ if self.spec.satisfies("+dlaf"):
+ libs_names.append("dla-future-fortran")
+
+ lib_paths, inc_paths, libs = [], [], []
+ for lib in libs_names:
+ lib_paths.extend(self.spec[lib].libs.directories)
+ libs.extend(self.spec[lib].libs.names)
+
+ try:
+ inc_paths.extend(self.spec[lib].headers.directories)
+
+ # Deal with Fortran modules
+ for path in self.spec[lib].headers:
+ # Add path to .mod files
+ # headers.directories only add path up to include/
+ if path.endswith(".mod"):
+ inc_paths.append(os.path.dirname(path))
+ except NoHeadersError:
+ pass
+
+ args = [
+ # Compiler Information (ELSI wants these explicitly set)
+ self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc),
+ self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc),
+ self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx),
+ self.define_from_variant("ADD_UNDERSCORE", "add_underscore"),
+ self.define_from_variant("ENABLE_PEXSI", "enable_pexsi"),
+ self.define_from_variant("ENABLE_SIPS", "enable_sips"),
+ self.define_from_variant("ENABLE_DLAF", "dlaf"),
+ self.define_from_variant("USE_EXTERNAL_ELPA", "use_external_elpa"),
+ self.define_from_variant("USE_EXTERNAL_NTPOLY", "use_external_ntpoly"),
+ self.define_from_variant("USE_EXTERNAL_OMM", "use_external_omm"),
+ self.define_from_variant("USE_EXTERNAL_SUPERLU", "use_external_superlu"),
+ self.define_from_variant("USE_EXTERNAL_PEXSI", "use_external_pexsi"),
+ self.define_from_variant("USE_MPI_IALLGATHER", "use_mpi_iallgather"),
+ self.define("ENABLE_TESTS", self.run_tests),
+ self.define("ENABLE_C_TESTS", self.run_tests),
+ self.define_from_variant("USE_GPU_CUDA", "cuda"),
+ self.define("LIB_PATHS", ";".join(set(lib_paths))),
+ self.define("LIBS", ";".join(set(libs))),
+ ]
+
+ if not self.spec.satisfies("+use_external_elpa"):
+ args.append(
+ self.define(f"USE_ELPA_{self.spec.variants['internal_elpa_version'].value}", True)
+ )
+
+ if self.spec.variants["elpa2_kernel"].value != "none":
+ args.append(self.define_from_variant("ELPA2_KERNEL", "elpa2_kernel"))
+
+ if self.spec.satisfies("^elpa+cuda"):
+ elpa_gpu_string = "nvidia-gpu" if self.spec.satisfies("^elpa@2021:") else "gpu"
+ args.append(self.define(ELSI_ELPA_GPU_STRING, elpa_gpu_string))
+
+ args.append(self.define("INC_PATHS", ";".join(set(inc_paths))))
# Only when using fujitsu compiler
- if spec.satisfies("%fj"):
- args += ["-DCMAKE_Fortran_MODDIR_FLAG=-M"]
+ if self.spec.satisfies("%fj"):
+ args.append(self.define("CMAKE_Fortran_MODDIR_FLAG", "-M"))
return args
diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py
index c3c04f8efe..3e428b74bc 100644
--- a/var/spack/repos/builtin/packages/emacs/package.py
+++ b/var/spack/repos/builtin/packages/emacs/package.py
@@ -13,14 +13,19 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
"""The Emacs programmable text editor."""
homepage = "https://www.gnu.org/software/emacs"
- git = "git://git.savannah.gnu.org/emacs.git"
+ git = "https://git.savannah.gnu.org/git/emacs.git"
gnu_mirror_path = "emacs/emacs-24.5.tar.gz"
+ list_url = " https://ftpmirror.gnu.org/emacs/"
+ list_depth = 0
maintainers("alecbcs")
- license("GPL-3.0-or-later")
+ license("GPL-3.0-or-later", checked_by="wdconinc")
version("master", branch="master")
+ version("29.4", sha256="1adb1b9a2c6cdb316609b3e86b0ba1ceb523f8de540cfdda2aec95b6a5343abf")
+ version("29.3", sha256="2de8df5cab8ac697c69a1c46690772b0cf58fe7529f1d1999582c67d927d22e4")
+ version("29.2", sha256="ac8773eb17d8b3c0c4a3bccbb478f7c359266b458563f9a5e2c23c53c05e4e59")
version("29.1", sha256="5b80e0475b0e619d2ad395ef5bc481b7cb9f13894ed23c301210572040e4b5b1")
version("28.2", sha256="a6912b14ef4abb1edab7f88191bfd61c3edd7085e084de960a4f86485cb7cad8")
version("28.1", sha256="1439bf7f24e5769f35601dbf332e74dfc07634da6b1e9500af67188a92340a28")
@@ -34,6 +39,11 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
version("25.1", sha256="763344b90db4d40e9fe90c5d14748a9dbd201ce544e2cf0835ab48a0aa4a1c67")
version("24.5", sha256="2737a6622fb2d9982e9c47fb6f2fb297bda42674e09db40fc9bcc0db4297c3b6")
+ variant("gui", default=False, description="Enable GUI build on Mac")
+ variant("json", default=False, when="@27:", description="Build with json support")
+ variant("native", default=False, when="@28:", description="enable native compilation of elisp")
+ variant("tls", default=True, description="Build Emacs with gnutls")
+ variant("treesitter", default=False, when="@29:", description="Build with tree-sitter support")
variant("X", default=False, description="Enable an X toolkit")
variant(
"toolkit",
@@ -41,35 +51,37 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
values=("gtk", "athena"),
description="Select an X toolkit (gtk, athena)",
)
- variant("tls", default=True, description="Build Emacs with gnutls")
- variant("native", default=False, when="@28:", description="enable native compilation of elisp")
- variant("treesitter", default=False, when="@29:", description="Build with tree-sitter support")
- variant("json", default=False, when="@27:", description="Build with json support")
+ depends_on("c", type="build")
depends_on("pkgconfig", type="build")
depends_on("gzip", type="build")
+ depends_on("texinfo", type="build", when="@29.4:")
depends_on("ncurses")
depends_on("pcre")
depends_on("zlib-api")
depends_on("libxml2")
- depends_on("libtiff", when="+X")
- depends_on("libpng", when="+X")
- depends_on("libxpm", when="+X")
- depends_on("giflib", when="+X")
- depends_on("libx11", when="+X")
- depends_on("libxaw", when="+X toolkit=athena")
- depends_on("gtkplus", when="+X toolkit=gtk")
- depends_on("gnutls", when="+tls")
depends_on("jpeg")
+ depends_on("gnutls", when="+tls")
depends_on("tree-sitter", when="+treesitter")
+ depends_on("gcc@11: +strip languages=jit", when="+native")
+ depends_on("jansson@2.7:", when="+json")
+
+ with when("+X"):
+ depends_on("libtiff")
+ depends_on("libpng")
+ depends_on("libxpm")
+ depends_on("giflib")
+ depends_on("libx11")
+ depends_on("libxaw", when="toolkit=athena")
+ depends_on("gtkplus", when="toolkit=gtk")
+
+ # the following dependencies are required when building from a git ref
+ # so that we can run reconfigure to generate a ./configure script
depends_on("m4", type="build", when="@master:")
depends_on("autoconf", type="build", when="@master:")
depends_on("automake", type="build", when="@master:")
depends_on("libtool", type="build", when="@master:")
- depends_on("texinfo", type="build", when="@master:")
- depends_on("gcc@11: +strip languages=jit", when="+native")
- depends_on("jansson@2.7:", when="+json")
conflicts("@:26.3", when="platform=darwin os=catalina")
@@ -84,15 +96,18 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
spec = self.spec
toolkit = spec.variants["toolkit"].value
- if "+X" in spec:
+ if spec.satisfies("+X"):
args = ["--with-x", "--with-x-toolkit={0}".format(toolkit)]
else:
args = ["--without-x"]
- # On OS X/macOS, do not build "nextstep/Emacs.app", because
- # doing so throws an error at build-time
if sys.platform == "darwin":
- args.append("--without-ns")
+ if spec.satisfies("+gui"):
+ # Do not build the self-contained "nextstep/Emacs.app"
+ args.append("--disable-ns-self-contained")
+ else:
+ # Do not build "nextstep/Emacs.app" at all
+ args.append("--without-ns")
args += self.with_or_without("native-compilation", variant="native")
args += self.with_or_without("gnutls", variant="tls")
@@ -101,6 +116,15 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
return args
+ @run_after("install")
+ def move_macos_app(self):
+ """Move the Emacs.app build on MacOS to <prefix>/Applications.
+ From there users can move it or link it in ~/Applications."""
+ if sys.platform == "darwin" and "+gui" in self.spec:
+ apps_dir = join_path(self.prefix, "Applications")
+ mkdir(apps_dir)
+ move("nextstep/Emacs.app", apps_dir)
+
def run_version_check(self, bin):
"""Runs and checks output of the installed binary."""
exe_path = join_path(self.prefix.bin, bin)
diff --git a/var/spack/repos/builtin/packages/ember/package.py b/var/spack/repos/builtin/packages/ember/package.py
index 3f3bf23dcf..a010792a63 100644
--- a/var/spack/repos/builtin/packages/ember/package.py
+++ b/var/spack/repos/builtin/packages/ember/package.py
@@ -24,6 +24,8 @@ class Ember(MakefilePackage):
version("1.0.0", sha256="5b2a6b8055b46ab3ea2c7baabaf4d280d837bb7c21eba0c9f59e092c6fc1c4a6")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
# TODO: shmem variant disabled due to lack of shmem spackage
diff --git a/var/spack/repos/builtin/packages/emboss/package.py b/var/spack/repos/builtin/packages/emboss/package.py
index 387e4f3464..cfaa52a634 100644
--- a/var/spack/repos/builtin/packages/emboss/package.py
+++ b/var/spack/repos/builtin/packages/emboss/package.py
@@ -11,13 +11,15 @@ class Emboss(AutotoolsPackage):
developed for the needs of the molecular biology (e.g. EMBnet) user
community"""
- homepage = "http://emboss.sourceforge.net/"
+ homepage = "https://emboss.sourceforge.net/"
url = "ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz"
license("GPL-2.0-only")
version("6.6.0", sha256="7184a763d39ad96bb598bfd531628a34aa53e474db9e7cac4416c2a40ab10c6e")
+ depends_on("c", type="build") # generated
+
depends_on("libxpm")
depends_on("libgd")
depends_on("postgresql")
diff --git a/var/spack/repos/builtin/packages/embree/package.py b/var/spack/repos/builtin/packages/embree/package.py
index 72431fb78a..131d4749a9 100644
--- a/var/spack/repos/builtin/packages/embree/package.py
+++ b/var/spack/repos/builtin/packages/embree/package.py
@@ -15,6 +15,9 @@ class Embree(CMakePackage):
license("Apache-2.0")
+ version("4.3.3", sha256="8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d")
+ version("4.3.2", sha256="dc7bb6bac095b2e7bc64321435acd07c6137d6d60e4b79ec07bb0b215ddf81cb")
+ version("4.3.1", sha256="824edcbb7a8cd393c5bdb7a16738487b21ecc4e1d004ac9f761e934f97bb02a4")
version("4.3.0", sha256="baf0a57a45837fc055ba828a139467bce0bc0c6a9a5f2dccb05163d012c12308")
version("4.2.0", sha256="b0479ce688045d17aa63ce6223c84b1cdb5edbf00d7eda71c06b7e64e21f53a0")
version("4.1.0", sha256="117efd87d6dddbf7b164edd94b0bc057da69d6422a25366283cded57ed94738b")
@@ -35,6 +38,9 @@ class Embree(CMakePackage):
version("3.8.0", sha256="40cbc90640f63c318e109365d29aea00003e4bd14aaba8bb654fc1010ea5753a")
version("3.7.0", sha256="2b6300ebe30bb3d2c6e5f23112b4e21a25a384a49c5e3c35440aa6f3c8d9fe84")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("ispc", default=True, description="Enable ISPC support")
depends_on("ispc", when="+ispc", type="build")
@@ -59,7 +65,6 @@ class Embree(CMakePackage):
"-DEMBREE_TUTORIALS=OFF",
"-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=ON",
self.define_from_variant("EMBREE_ISPC_SUPPORT", "ispc"),
- self.define("EMBREE_TBB_ROOT", spec["tbb"].prefix),
]
if spec.satisfies("target=x86_64:") or spec.satisfies("target=x86:"):
diff --git a/var/spack/repos/builtin/packages/enca/package.py b/var/spack/repos/builtin/packages/enca/package.py
index 8d3d67ca8e..f784a79af2 100644
--- a/var/spack/repos/builtin/packages/enca/package.py
+++ b/var/spack/repos/builtin/packages/enca/package.py
@@ -19,6 +19,8 @@ class Enca(AutotoolsPackage):
version("1.17", sha256="b20372440c500e6463bd61dab0e68131cdfe857c6b7ca139b5c6cbf01e24fdc7")
version("1.16", sha256="14457b185c77b947ca2f8e09a2c3ec66940d97a2ccea28b8e61a6e0f3a0033f6")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/enchant/package.py b/var/spack/repos/builtin/packages/enchant/package.py
index b32545e730..3221b2332a 100644
--- a/var/spack/repos/builtin/packages/enchant/package.py
+++ b/var/spack/repos/builtin/packages/enchant/package.py
@@ -12,14 +12,25 @@ class Enchant(AutotoolsPackage):
number of different spelling libraries and programs with a
consistent interface."""
- homepage = "https://abiword.github.io/enchant/"
- url = "https://github.com/AbiWord/enchant/releases/download/v2.2.5/enchant-2.2.5.tar.gz"
+ homepage = "https://rrthomas.github.io/enchant/"
+ url = "https://github.com/rrthomas/enchant/releases/download/v2.8.2/enchant-2.8.2.tar.gz"
license("LGPL-2.1-or-later")
+ version("2.8.2", sha256="8f19535adb5577b83b00e02f330fe9b9eb40dd21f19e2899636fc4d3a7696375")
+ version("2.8.1", sha256="ff79de470b8eb16f53849dc49f2bce8ca4eb7decabfc1349716fe12616e52f4e")
+ version("2.8.0", sha256="c57add422237b8a7eed116a9a88d8be4f7b9281778fa36f03e1f2c051ecb0372")
+ version("2.7.3", sha256="fe6ad4cbe8c71b9384ffdef962be52d4d2bd5ebfb6351435bb390543d4f78b1e")
+ version("2.7.2", sha256="7cc3400a6657974a740b6e3c2568e2935c70e5302f07fadb2095366b75ecad6f")
+ version("2.7.1", sha256="a1cb8239095d6b0bd99ba2dd012a1402cef1a194f5de1b7214bd528676a65229")
+ version("2.7.0", sha256="2a073dc6ebe753196c0674a781ccf321bed25d1c6e43bffb97e2c92af420952c")
+ version("2.6.9", sha256="d9a5a10dc9b38a43b3a0fa22c76ed6ebb7e09eb535aff62954afcdbd40efff6b")
+ version("2.6.8", sha256="f565923062c77f3d58846f0558d21e6d07ca4a488c58812dfdefb35202fac7ae")
+ version("2.6.7", sha256="a1c2e5b59acca000bbfb24810af4a1165733d407f2154786588e076c8cd57bfc")
+
version("2.2.7", sha256="1b22976135812b35cb5b8d21a53ad11d5e7c1426c93f51e7a314a2a42cab3a09")
version("2.2.6", sha256="8048c5bd26190b21279745cfecd05808c635bc14912e630340cd44a49b87d46d")
- version("2.2.5", sha256="ffce4ea00dbda1478d91c3e1538cadfe5761d9d6c0ceb27bc3dba51882fe1c47")
+ version("2.2.5", sha256="ee8a663295c0e039b05d418af065ebcba9e539f785531e552e908030bec48164")
version("2.2.4", sha256="f5d6b689d23c0d488671f34b02d07b84e408544b2f9f6e74fb7221982b1ecadc")
version("2.2.3", sha256="abd8e915675cff54c0d4da5029d95c528362266557c61c7149d53fa069b8076d")
version("2.2.2", sha256="661e0bd6e82deceb97fc94bea8c6cdbcd8ff631cfa9b7a8196de2e2aca13f54b")
@@ -30,11 +41,16 @@ class Enchant(AutotoolsPackage):
version("2.1.1", sha256="5fad0a1e82ddfed91647e93da5955fc76249760fd51865648a36074dc97d526c")
version("2.1.0", sha256="2cdda2d9edb62ad895c34be35c598d56ac5b9b9298f3dfdaa2b40a1914d1db7e")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("pkgconfig", type="build", when="platform=linux")
+
variant("hunspell", default=True, description="Enables hunspell backend")
depends_on("glib")
depends_on("aspell")
depends_on("hunspell", when="+hunspell")
+ depends_on("groff", type="build", when="@2.6.7:")
def configure_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/energyplus/package.py b/var/spack/repos/builtin/packages/energyplus/package.py
index c0c1774edc..efae17adbf 100644
--- a/var/spack/repos/builtin/packages/energyplus/package.py
+++ b/var/spack/repos/builtin/packages/energyplus/package.py
@@ -34,6 +34,9 @@ class Energyplus(Package):
url="https://github.com/NREL/EnergyPlus/releases/download/v8.9.0-WithIDDFixes/EnergyPlus-8.9.0-eba93e8e1b-Linux-x86_64.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
# binary distribution, we just unpack to lib/energyplus
# and then symlink the appropriate targets
diff --git a/var/spack/repos/builtin/packages/ensmallen/package.py b/var/spack/repos/builtin/packages/ensmallen/package.py
index f96d0be33d..921c97535a 100644
--- a/var/spack/repos/builtin/packages/ensmallen/package.py
+++ b/var/spack/repos/builtin/packages/ensmallen/package.py
@@ -21,8 +21,11 @@ class Ensmallen(CMakePackage):
license("BSD-3-Clause")
+ version("2.21.1", sha256="820eee4d8aa32662ff6a7d883a1bcaf4e9bf9ca0a3171d94c5398fe745008750")
version("2.19.1", sha256="f36ad7f08b0688d2a8152e1c73dd437c56ed7a5af5facf65db6ffd977b275b2e")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP for parallelization")
depends_on("cmake@3.3.2:")
diff --git a/var/spack/repos/builtin/packages/entrezdirect/package.py b/var/spack/repos/builtin/packages/entrezdirect/package.py
index fd87aaca5c..281a970416 100644
--- a/var/spack/repos/builtin/packages/entrezdirect/package.py
+++ b/var/spack/repos/builtin/packages/entrezdirect/package.py
@@ -12,21 +12,97 @@ class Entrezdirect(Package):
gene, variation, expression, etc.) from a UNIX terminal window."""
homepage = "https://www.ncbi.nlm.nih.gov/books/NBK179288/"
+ maintainers("snehring")
version(
+ "22.6.20240912", sha256="ddf1aab438bfe6af7cf38f725dac6f288d0daf354197665a66d4556c91129ace"
+ )
+ version(
"10.7.20190114", sha256="4152749e6a3aac71a64e9367527428714ed16cf1fb6c7eff1298cca9ef144c0d"
)
+ resource(
+ name="rchive.ARM64",
+ placement="rchive-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/rchive.ARM64.gz",
+ sha256="48dbd770a62505e3a52cd475f564ba8ab4a20729c318114f8177d5342c519122",
+ when="@22.6.20240912 platform=linux target=aarch64:",
+ )
+ resource(
+ name="rchive.Linux",
+ placement="rchive-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/rchive.Linux.gz",
+ sha256="2454ca3423df31f4057d1d2ce743e14eb3142d856e688dbbc6586cd9a6b7948c",
+ when="@22.6.20240912 platform=linux target=x86_64:",
+ )
+ resource(
+ name="rchive.Silicon",
+ placement="rchive-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/xtract.Silicon.gz",
+ sha256="fd7f73d42055b35783107257eb8d96cc2b65daa00c47774cf1913ab83156719c",
+ when="@22.6.20240912 platform=darwin target=aarch64:",
+ )
+ resource(
+ name="transmute.ARM64",
+ placement="transmute-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/transmute.ARM64.gz",
+ sha256="c9d5dede1c70c29839af4d40a4eb55c0788a8943dc2bde5c919c8bf0be584f34",
+ when="@22.6.20240912 platform=linux target=aarch64:",
+ )
+ resource(
+ name="transmute.Linux",
+ placement="transmute-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/transmute.Linux.gz",
+ sha256="8a8746b991494f354cb94dc46740691810b673ae1ff5235cf5a60b29fb974ac2",
+ when="@22.6.20240912 platform=linux target=x86_64:",
+ )
+ resource(
+ name="transmute.Silicon",
+ placement="transmute-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/transmute.Silicon.gz",
+ sha256="5ec32a04a29db90a98dced0dbef717da174c6a1228fdb86b94bc35d1aed26545",
+ when="@22.6.20240912 platform=darwin target=aarch64:",
+ )
+ resource(
+ name="xtract.ARM64",
+ placement="xtract-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/xtract.ARM64.gz",
+ sha256="1d62f612b2be6265c517af6c7a5d6bec0ce3f11bcccc6602a78ce1113bd4fc6c",
+ when="@22.6.20240912 platform=linux target=aarch64:",
+ )
+ resource(
+ name="xtract.Linux",
+ placement="xtract-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/xtract.Linux.gz",
+ sha256="cc3994ce640cfe9ed67f4b8c31d6d22d006503c11a8506d50a5a9fe7c0b59124",
+ when="@22.6.20240912 platform=linux target=x86_64:",
+ )
+ resource(
+ name="xtract.Silicon",
+ placement="xtract-bin",
+ url="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/22.6.20240912/xtract.Silicon.gz",
+ sha256="fd7f73d42055b35783107257eb8d96cc2b65daa00c47774cf1913ab83156719c",
+ when="@22.6.20240912 platform=darwin target=aarch64:",
+ )
+
+ depends_on("curl", type="run")
depends_on("perl", type="run")
depends_on("perl-html-parser", type="run")
depends_on("perl-libwww-perl", type="run")
depends_on("perl-lwp-protocol-https", type="run")
depends_on("perl-http-message", type="run")
depends_on("perl-xml-simple", type="run")
+ depends_on("python", type="run", when="@22:")
def url_for_version(self, ver):
- pfx = "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/"
+ pfx = "https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/"
return pfx + "{0}/edirect-{0}.tar.gz".format(ver.dotted)
def install(self, spec, prefix):
+ for i in ["rchive", "transmute", "xtract"]:
+ src = f"{i}-bin"
+ exe = find(src, "*")[0]
+ set_executable(exe)
+ copy(exe, ".")
+ remove_linked_tree(src)
install_tree(".", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/entt/package.py b/var/spack/repos/builtin/packages/entt/package.py
index 0726c57718..1ebfab0249 100644
--- a/var/spack/repos/builtin/packages/entt/package.py
+++ b/var/spack/repos/builtin/packages/entt/package.py
@@ -16,9 +16,13 @@ class Entt(CMakePackage):
license("MIT")
+ version("3.13.2", sha256="cb556aa543d01177b62de41321759e02d96078948dda72705b3d7fe68af88489")
+ version("3.13.1", sha256="a4f290b601a70333126abd2cec7b0c232c74a4f85dcf1e04d969e8122dae8652")
version("3.11.1", sha256="0ac010f232d3089200c5e545bcbd6480cf68b705de6930d8ff7cdb0a29f5b47b")
version("3.5.2", sha256="f9271293c44518386c402c9a2188627819748f66302df48af4f6d08e30661036")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.7.0:", type="build")
depends_on("doxygen@1.8.0:", type="build")
@@ -29,4 +33,4 @@ class Entt(CMakePackage):
conflicts("%gcc@:7.1", msg=compiler_warning)
def cmake_args(self):
- return ["-DBUILD_DOCS=ON"]
+ return [self.define("BUILD_DOCS", "ON")]
diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py
index 87c2031da3..2b28e5651d 100644
--- a/var/spack/repos/builtin/packages/environment-modules/package.py
+++ b/var/spack/repos/builtin/packages/environment-modules/package.py
@@ -13,12 +13,14 @@ class EnvironmentModules(Package):
"""
homepage = "https://cea-hpc.github.io/modules/"
- url = "https://github.com/cea-hpc/modules/releases/download/v5.3.1/modules-5.3.1.tar.gz"
+ url = "https://github.com/cea-hpc/modules/releases/download/v5.5.0/modules-5.5.0.tar.gz"
git = "https://github.com/cea-hpc/modules.git"
maintainers("xdelaruelle")
version("main", branch="main")
+ version("5.5.0", sha256="ad0e360c7adc2515a99836863d98499b3ad89cd7548625499b20293845b040cb")
+ version("5.4.0", sha256="586245cbf9420866078d8c28fce8ef4f192530c69a0f368f51e848340dcf3b90")
version("5.3.1", sha256="d02f9ce4f8baf6c99edceb7c73bfdd1e97d77bcc4725810b86efed9f58dda962")
version("5.3.0", sha256="21b8daa0181044ef65097a1e3517af1f24e7c7343cc5bdaf70be11e3cb0edb51")
version("5.2.0", sha256="48f9f10864303df628a48cab17074820a6251ad8cd7d66dd62aa7798af479254")
@@ -57,8 +59,11 @@ class EnvironmentModules(Package):
url="http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz",
)
+ depends_on("c", type="build") # generated
+
variant("X", default=True, description="Build with X functionality")
+ depends_on("util-linux", type=("build", "run"), when="@5.5:")
depends_on("less", type=("build", "run"), when="@4.1:")
with when("@main"):
depends_on("autoconf", type="build")
@@ -72,7 +77,8 @@ class EnvironmentModules(Package):
# Dependencies:
depends_on("tcl", type=("build", "link", "run"))
depends_on("tcl@8.4:", type=("build", "link", "run"), when="@4.0.0:4.8")
- depends_on("tcl@8.5:", type=("build", "link", "run"), when="@5.0.0:")
+ depends_on("tcl@8.5:8", type=("build", "link", "run"), when="@5.0.0:5.4.0")
+ depends_on("tcl@8.5:", type=("build", "link", "run"), when="@5.5.0:")
def install(self, spec, prefix):
tcl = spec["tcl"]
@@ -89,10 +95,13 @@ class EnvironmentModules(Package):
if not spec.satisfies("@4.5.2"):
config_args.extend(["--disable-dependency-tracking", "--disable-silent-rules"])
- if "~X" in spec:
+ if spec.satisfies("~X"):
config_args = ["--without-x"] + config_args
- if "@4.4.0:4.8" in self.spec:
+ if self.spec.satisfies("@5.5.0:"):
+ config_args.extend(["--enable-conflict-unload"])
+
+ if self.spec.satisfies("@4.4.0:4.8"):
config_args.extend(
[
"--with-icase=search",
@@ -101,13 +110,13 @@ class EnvironmentModules(Package):
]
)
- if "@4.3.0:4.8" in self.spec:
+ if self.spec.satisfies("@4.3.0:4.8"):
config_args.extend(["--enable-color"])
- if "@4.2.0:4.8" in self.spec:
+ if self.spec.satisfies("@4.2.0:4.8"):
config_args.extend(["--enable-auto-handling"])
- if "@4.1.0:" in self.spec:
+ if self.spec.satisfies("@4.1.0:"):
config_args.extend(
[
# Variables in quarantine are empty during module command
@@ -117,17 +126,17 @@ class EnvironmentModules(Package):
]
)
- if "@4.0.0:4.8" in self.spec:
+ if self.spec.satisfies("@4.0.0:4.8"):
config_args.extend(["--disable-compat-version"])
- if "@4.0.0:" in self.spec:
+ if self.spec.satisfies("@4.0.0:"):
config_args.extend(["--with-tclsh={0}".format(tcl.prefix.bin.tclsh)])
- if "@3.2.10" in self.spec:
+ if self.spec.satisfies("@3.2.10"):
# See: https://sourceforge.net/p/modules/bugs/62/
config_args.extend(["--disable-debug", "CPPFLAGS=-DUSE_INTERP_ERRORLINE"])
- if "@:3.2" in self.spec:
+ if self.spec.satisfies("@:3.2"):
config_args.extend(
[
"--without-tclx",
@@ -137,6 +146,9 @@ class EnvironmentModules(Package):
]
)
+ if self.spec.satisfies("@5.5:"):
+ config_args.append(f"--with-logger={str(self.spec['util-linux'].prefix.bin.logger)}")
+
if self.spec.satisfies("@4.1:"):
config_args.append(f"--with-pager={str(self.spec['less'].prefix.bin.less)}")
diff --git a/var/spack/repos/builtin/packages/enzo/package.py b/var/spack/repos/builtin/packages/enzo/package.py
index b8498d0862..fa4c5fd8bc 100644
--- a/var/spack/repos/builtin/packages/enzo/package.py
+++ b/var/spack/repos/builtin/packages/enzo/package.py
@@ -17,6 +17,10 @@ class Enzo(MakefilePackage):
version("master", branch="main", deprecated=True)
version("2.6.1", sha256="280270accfc1ddb60e92cc98ca538a3e5787e8cc93ed58fb5c3ab75db8c4b048")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("hdf5~mpi")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/enzyme/package.py b/var/spack/repos/builtin/packages/enzyme/package.py
index 8f983a6534..c793e1eddd 100644
--- a/var/spack/repos/builtin/packages/enzyme/package.py
+++ b/var/spack/repos/builtin/packages/enzyme/package.py
@@ -24,6 +24,8 @@ class Enzyme(CMakePackage):
root_cmakelists_dir = "enzyme"
version("main", branch="main")
+ version("0.0.135", sha256="49c798534faec7ba524a3ed053dd4352d690a44d3cad5a14915c9398dc9b175b")
+ version("0.0.100", sha256="fbc53ec02adc0303ff200d7699afface2d9fbc7350664e6c6d4c527ef11c2e82")
version("0.0.81", sha256="4c17d0c28f0572a3ab97a60f1e56bbc045ed5dd64c2daac53ae34371ca5e8b34")
version("0.0.69", sha256="144d964187551700fdf0a4807961ceab1480d4e4cd0bb0fc7bbfab48fe053aa2")
version("0.0.48", sha256="f5af62448dd2a8a316e59342ff445003581bc154f06b9b4d7a5a2c7259cf5769")
@@ -32,11 +34,16 @@ class Enzyme(CMakePackage):
version("0.0.14", sha256="740641eeeeadaf47942ac88cc52e62ddc0e8c25767a501bed36ec241cf258b8d")
version("0.0.13", sha256="d4a53964ec1f763772db2c56e6734269b7656c8b2ecd41fa7a41315bcd896b5a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("llvm@7:12", when="@0.0.13:0.0.15")
depends_on("llvm@7:14", when="@0.0.32:0.0.47")
depends_on("llvm@7:14", when="@0.0.48:0.0.68")
depends_on("llvm@9:16", when="@0.0.69:0.0.79")
- depends_on("llvm@11:16", when="@0.0.80:")
+ depends_on("llvm@11:16", when="@0.0.80:0.0.99")
+ depends_on("llvm@11:19", when="@0.0.100:")
depends_on("cmake@3.13:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/eospac/package.py b/var/spack/repos/builtin/packages/eospac/package.py
index e21b62f109..26a6d7713a 100644
--- a/var/spack/repos/builtin/packages/eospac/package.py
+++ b/var/spack/repos/builtin/packages/eospac/package.py
@@ -23,8 +23,32 @@ class Eospac(Package):
# - alpha and beta versions are marked with 'deprecated=True' to help
# spack's version comparison.
version(
+ "6.5.12",
+ sha256="62d5f4a6a30c9acb426bd6bd972edc7fad392e5b941f950126ed0d3be5fd5162",
+ url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.12_39364aabc75c3312022b12e6d16d6a31f1f8945f.tgz",
+ )
+ version(
+ "6.5.11",
+ sha256="ed821b5a1bf45df1443d5f72d86190317ed9f5bad6a7c73e23bb4365bd76e24c",
+ url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.11_e87627a204786491b3316d7fe3bda14dd9b52ce7.tgz",
+ )
+ version(
+ "6.5.10",
+ sha256="ddf8475ec41df1102ac9d85404a1954e39d8e410f0f2babafabd218cba9812eb",
+ url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.10_3bf1ad6aab64ad0c665a48978315ba2383ab294f.tgz",
+ )
+ version(
+ "6.5.9",
+ sha256="54df29b1dc3b35c654ef2ebfbfa42d960a230cfb2d3c04a75ba93d3a789a312a",
+ url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.9_4c633156bacc7b721bdd2735e40e09984a4d60a3.tgz",
+ )
+ version(
+ "6.5.8",
+ sha256="4e2c5db150bf7f45b5615c034848b9256f8659bcde95f097e446c226c70c6d96",
+ url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.8_052127ccd65148632bd1258764f455c692a4dfc1.tgz",
+ )
+ version(
"6.5.7",
- preferred=True,
sha256="e59bd449bf97ce977309c6fc8a54fa30f4db9b2ca3e21f996095d78e23799e42",
url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.7_9a867a15ae4137d22e1b52199d6a46b486fc4376.tgz",
)
@@ -118,6 +142,10 @@ class Eospac(Package):
url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.3.1_r20161202150449.tgz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# This patch allows the use of spack's compile wrapper 'flang'
patch("flang.patch", when="@:6.4.0beta.2%clang")
patch("frt.patch", when="%fj")
@@ -145,11 +173,11 @@ class Eospac(Package):
# This looks goofy because eospac does not actually respect the
# value of DO_OFFLOAD and instead only attempts to check for its
# existence; a quirk of eospac.
- if "+offload" in spec:
+ if spec.satisfies("+offload"):
compilerArgs.append("DO_OFFLOAD=1")
# Eospac depends on fcommon behavior
# but gcc@10 flipped to default fno-common
- if "%gcc@10:" in spec:
+ if spec.satisfies("%gcc@10:"):
compilerArgs.append("CFLAGS=-fcommon")
if self.run_tests:
make("check", *compilerArgs)
diff --git a/var/spack/repos/builtin/packages/epics-base/package.py b/var/spack/repos/builtin/packages/epics-base/package.py
index 2509eab83e..b08a31b732 100644
--- a/var/spack/repos/builtin/packages/epics-base/package.py
+++ b/var/spack/repos/builtin/packages/epics-base/package.py
@@ -20,6 +20,9 @@ class EpicsBase(MakefilePackage):
version("7.0.6.1", sha256="8ff318f25e2b70df466f933636a2da85e4b0c841504b9e89857652a4786b6387")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("readline")
depends_on("perl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/epics-ca-gateway/package.py b/var/spack/repos/builtin/packages/epics-ca-gateway/package.py
index fbaf1dc961..8b6ba20783 100644
--- a/var/spack/repos/builtin/packages/epics-ca-gateway/package.py
+++ b/var/spack/repos/builtin/packages/epics-ca-gateway/package.py
@@ -21,6 +21,8 @@ class EpicsCaGateway(MakefilePackage):
version("2.1.3", sha256="f6e9dba46951a168d3208fc57054138759d56ebd8a7c07b496e8f5b8a56027d7")
+ depends_on("cxx", type="build") # generated
+
depends_on("epics-base")
depends_on("epics-pcas")
diff --git a/var/spack/repos/builtin/packages/epics-pcas/package.py b/var/spack/repos/builtin/packages/epics-pcas/package.py
index 14e02f0a09..f745369ed3 100644
--- a/var/spack/repos/builtin/packages/epics-pcas/package.py
+++ b/var/spack/repos/builtin/packages/epics-pcas/package.py
@@ -18,6 +18,9 @@ class EpicsPcas(MakefilePackage):
version("4.13.3", sha256="5004e39339c8e592fcb9b4275c84143635c6e688c0fbe01f17dafe19850398a0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("epics-base", type=("build", "link", "run"))
@property
diff --git a/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py b/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py
index 1302190bb3..8cdb0d4f7f 100644
--- a/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py
+++ b/var/spack/repos/builtin/packages/eprosima-fastcdr/package.py
@@ -16,4 +16,8 @@ class EprosimaFastcdr(CMakePackage):
license("Apache-2.0")
+ version("2.2.1", sha256="11079a534cda791a8fc28d93ecb518bbd3804c0d4e9ca340ab24dcc21ad69a04")
+ version("2.2.0", sha256="8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20")
version("1.0.27", sha256="a9bc8fd31a2c2b95e6d2fb46e6ce1ad733e86dc4442f733479e33ed9cdc54bf6")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/eprosima-fastdds/package.py b/var/spack/repos/builtin/packages/eprosima-fastdds/package.py
index 3af859c1ff..bf139fb5e7 100644
--- a/var/spack/repos/builtin/packages/eprosima-fastdds/package.py
+++ b/var/spack/repos/builtin/packages/eprosima-fastdds/package.py
@@ -20,6 +20,9 @@ class EprosimaFastdds(CMakePackage):
version("2.10.1", sha256="2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("asio")
depends_on("tinyxml2")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/epsic/package.py b/var/spack/repos/builtin/packages/epsic/package.py
index 16144c585d..65cd58256b 100644
--- a/var/spack/repos/builtin/packages/epsic/package.py
+++ b/var/spack/repos/builtin/packages/epsic/package.py
@@ -19,6 +19,8 @@ class Epsic(AutotoolsPackage):
# https://github.com/lwa-project/pulsar/blob/master/SoftwareStack.md
# last updated 10/17/2020
version("LWA-10-17-2020", commit="5315cc634f6539ea0a34e403e492472b97e0f086")
+
+ depends_on("cxx", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("yacc", when="@develop", type="build")
diff --git a/var/spack/repos/builtin/packages/eq-r/package.py b/var/spack/repos/builtin/packages/eq-r/package.py
index 81670ed8db..077a13db46 100644
--- a/var/spack/repos/builtin/packages/eq-r/package.py
+++ b/var/spack/repos/builtin/packages/eq-r/package.py
@@ -22,6 +22,8 @@ class EqR(AutotoolsPackage):
version("1.0", sha256="68047cb0edf088eaaefc5e36cefda9818292e5c832593e10a1dd9c73c27661b6")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/er/package.py b/var/spack/repos/builtin/packages/er/package.py
index 6fed09c5e6..bb2dd37501 100644
--- a/var/spack/repos/builtin/packages/er/package.py
+++ b/var/spack/repos/builtin/packages/er/package.py
@@ -19,6 +19,7 @@ class Er(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.5.0", sha256="dbde4da1fe115b67334085446d413f7365ba94c0a34cb1c38b83944e8fba4d0b")
version("0.4.0", sha256="6cb5b6724ddac5c1f5ed6b326a5f3bf5d4eb1c6958a48218e6ca9bb7c02e48a8")
version("0.3.0", sha256="01bc71bfb2ebb015ccb948f2bb9138b70972a3e8be0e53f9a4844e46b106a36c")
version("0.2.0", sha256="9ddfe2b63682ed0e89685f9b7d5259ef82b802aba55c8ee78cc15a7adbad6bc0")
@@ -26,6 +27,9 @@ class Er(CMakePackage):
version("0.0.4", sha256="c456d34719bb57774adf6d7bc2fa9917ecb4a9de442091023c931a2cb83dfd37")
version("0.0.3", sha256="243b2b46ea274e17417ef5873c3ed7ba16dacdfdaf7053d1de5434e300de796b")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("mpi")
depends_on("kvtree+mpi")
depends_on("rankstr", when="@0.0.4:")
@@ -65,8 +69,5 @@ class Er(CMakePackage):
if spec.satisfies("@0.1.0:"):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("ER_LINK_STATIC", True))
return args
diff --git a/var/spack/repos/builtin/packages/erfa/package.py b/var/spack/repos/builtin/packages/erfa/package.py
index b1132258d4..d510543056 100644
--- a/var/spack/repos/builtin/packages/erfa/package.py
+++ b/var/spack/repos/builtin/packages/erfa/package.py
@@ -16,3 +16,5 @@ class Erfa(AutotoolsPackage):
version("2.0.0", sha256="75cb0a2cc1561d24203d9d0e67c21f105e45a70181d57f158e64a46a50ccd515")
version("1.7.0", sha256="f0787e30e848750c0cbfc14827de6fc7f69a2d5ef0fc653504e74b8967a764e0")
version("1.4.0", sha256="035b7f0ad05c1191b8588191ba4b19ba0f31afa57ad561d33bd5417d9f23e460")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/erlang/package.py b/var/spack/repos/builtin/packages/erlang/package.py
index e21d2d736d..7a6b4b1db5 100644
--- a/var/spack/repos/builtin/packages/erlang/package.py
+++ b/var/spack/repos/builtin/packages/erlang/package.py
@@ -31,6 +31,8 @@ class Erlang(AutotoolsPackage):
version("21.3", sha256="69a743c4f23b2243e06170b1937558122142e47c8ebe652be143199bfafad6e4")
version("21.2", sha256="f6b07bf8e6705915679a63363ce80faaa6b7c231e7236cde443d6445f7430334")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/erne/package.py b/var/spack/repos/builtin/packages/erne/package.py
index dee89bebb8..1f077d6fd6 100644
--- a/var/spack/repos/builtin/packages/erne/package.py
+++ b/var/spack/repos/builtin/packages/erne/package.py
@@ -9,13 +9,16 @@ from spack.package import *
class Erne(AutotoolsPackage):
"""The Extended Randomized Numerical alignEr using BWT"""
- homepage = "http://erne.sourceforge.net/"
+ homepage = "https://erne.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/erne/2.1.1/erne-2.1.1-source.tar.gz"
license("GPL-3.0-only")
version("2.1.1", sha256="f32ab48481fd6c129b0a0246ab02b6e3a2a9da84024e1349510a59c15425d983")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Build with OpenMPI support")
depends_on(
@@ -27,7 +30,7 @@ class Erne(AutotoolsPackage):
depends_on("openmpi", type=("build", "run"), when="+mpi")
def configure_args(self):
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
return ["--enable-openmpi"]
else:
return ["--disable-openmpi"]
diff --git a/var/spack/repos/builtin/packages/es-shell/package.py b/var/spack/repos/builtin/packages/es-shell/package.py
index 79c2376805..ca7a8104e0 100644
--- a/var/spack/repos/builtin/packages/es-shell/package.py
+++ b/var/spack/repos/builtin/packages/es-shell/package.py
@@ -20,5 +20,7 @@ class EsShell(AutotoolsPackage):
version("0.9.1", sha256="b0b41fce99b122a173a06b899a4d92e5bd3cc48b227b2736159f596a58fff4ba")
+ depends_on("c", type="build") # generated
+
depends_on("readline")
depends_on("yacc")
diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py
index 3361e8efb1..20a7223e63 100644
--- a/var/spack/repos/builtin/packages/esmf/package.py
+++ b/var/spack/repos/builtin/packages/esmf/package.py
@@ -6,11 +6,14 @@
import os
import sys
+import spack.build_systems.makefile
+import spack.build_systems.python
+import spack.compiler
from spack.build_environment import dso_suffix, stat_suffix
from spack.package import *
-class Esmf(MakefilePackage):
+class Esmf(MakefilePackage, PythonExtension):
"""The Earth System Modeling Framework (ESMF) is high-performance, flexible
software infrastructure for building and coupling weather, climate, and
related Earth science applications. The ESMF defines an architecture for
@@ -29,6 +32,8 @@ class Esmf(MakefilePackage):
# Develop is a special name for spack and is always considered the newest version
version("develop", branch="develop")
# generate chksum with 'spack checksum esmf@x.y.z'
+ version("8.7.0", sha256="d7ab266e2af8c8b230721d4df59e61aa03c612a95cc39c07a2d5695746f21f56")
+ version("8.6.1", sha256="dc270dcba1c0b317f5c9c6a32ab334cb79468dda283d1e395d98ed2a22866364")
version("8.6.0", sha256="ed057eaddb158a3cce2afc0712b49353b7038b45b29aee86180f381457c0ebe7")
version("8.5.0", sha256="acd0b2641587007cc3ca318427f47b9cae5bfd2da8d2a16ea778f637107c29c4")
version("8.4.2", sha256="969304efa518c7859567fa6e65efd960df2b4f6d72dbf2c3f29e39e4ab5ae594")
@@ -64,6 +69,10 @@ class Esmf(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("external-lapack", default=False, description="Build with external LAPACK library")
variant("netcdf", default=True, description="Build with NetCDF support")
@@ -92,6 +101,10 @@ class Esmf(MakefilePackage):
description="Named variant for snapshots versions (e.g., 'b09')",
)
+ # The way python is handled here is only avialable >=8.4.0
+ # https://github.com/esmf-org/esmf/releases/tag/v8.4.0
+ variant("python", default=False, description="Build python bindings", when="@8.4.0:")
+
# Optional dependencies
depends_on("mpi", when="+mpi")
depends_on("lapack@3:", when="+external-lapack")
@@ -107,9 +120,25 @@ class Esmf(MakefilePackage):
depends_on("parallelio@2.5.10: ~mpi", when="@8.5:+external-parallelio~mpi")
depends_on("cmake@3.5.2:", type="build", when="~external-parallelio")
+ # python library
+ with when("+python"):
+ extends("python")
+ depends_on("py-pip")
+ depends_on("py-setuptools", type="build")
+ depends_on("py-wheel", type="build")
+ depends_on("py-mpi4py", when="+mpi")
+ depends_on("py-numpy")
+
+ # In esmf@8.4.0, esmx was introduced which depends on py-pyyaml
+ with when("@8.4.0:"):
+ depends_on("python", type="run")
+ depends_on("py-pyyaml", type="run")
+
# Testing dependencies
depends_on("perl", type="test")
+ conflicts("%aocc", when="@:8.3")
+
# Make esmf build with newer intel versions
patch("intel.patch", when="@:7.0 %intel@17:")
# Make esmf build with newer gcc versions
@@ -136,6 +165,29 @@ class Esmf(MakefilePackage):
# https://github.com/spack/spack/issues/35957
patch("esmf_cpp_info.patch")
+ @when("+python")
+ def patch(self):
+ # The pyproject.toml file uses a dynamically generated version from git
+ # However, this results in a version of 0.0.0 and a mismatch with the loaded version
+ # so this hardcodes it to match the library's version
+ filter_file(
+ """dynamic = \\[\\s+"version"\\s+\\]""",
+ f"""version = "{self.version}" """,
+ os.path.join("src/addon/esmpy/pyproject.toml"),
+ )
+
+ def setup_run_environment(self, env):
+ env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk"))
+
+
+class PythonPipBuilder(spack.build_systems.python.PythonPipBuilder):
+
+ @property
+ def build_directory(self):
+ return os.path.join(self.stage.source_path, "src/addon/esmpy")
+
+
+class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
# This is strictly required on Cray systems that use
# the Cray compiler wrappers, where we need to swap
# out the spack compiler wrappers in esmf.mk with the
@@ -207,38 +259,38 @@ class Esmf(MakefilePackage):
# ESMF_COMPILER must be set to select which Fortran and
# C++ compilers are being used to build the ESMF library.
- if self.compiler.name == "gcc":
+ if self.pkg.compiler.name == "gcc":
env.set("ESMF_COMPILER", "gfortran")
- with self.compiler.compiler_environment():
+ with self.pkg.compiler.compiler_environment():
gfortran_major_version = int(
spack.compiler.get_compiler_version_output(
- self.compiler.fc, "-dumpversion"
+ self.pkg.compiler.fc, "-dumpversion"
).split(".")[0]
)
- elif self.compiler.name == "intel" or self.compiler.name == "oneapi":
+ elif self.pkg.compiler.name == "intel" or self.pkg.compiler.name == "oneapi":
env.set("ESMF_COMPILER", "intel")
- elif self.compiler.name in ["clang", "apple-clang"]:
+ elif self.pkg.compiler.name in ["clang", "apple-clang"]:
env.set("ESMF_COMPILER", "gfortranclang")
- with self.compiler.compiler_environment():
+ with self.pkg.compiler.compiler_environment():
gfortran_major_version = int(
spack.compiler.get_compiler_version_output(
- self.compiler.fc, "-dumpversion"
+ self.pkg.compiler.fc, "-dumpversion"
).split(".")[0]
)
- elif self.compiler.name == "nag":
+ elif self.pkg.compiler.name == "nag":
env.set("ESMF_COMPILER", "nag")
- elif self.compiler.name == "pgi":
- env.set("ESMF_COMPILER", "pgi")
- elif self.compiler.name == "nvhpc":
+ elif self.pkg.compiler.name == "nvhpc":
env.set("ESMF_COMPILER", "nvhpc")
- elif self.compiler.name == "cce":
+ elif self.pkg.compiler.name == "cce":
env.set("ESMF_COMPILER", "cce")
+ elif self.pkg.compiler.name == "aocc":
+ env.set("ESMF_COMPILER", "aocc")
else:
msg = "The compiler you are building with, "
msg += '"{0}", is not supported by ESMF.'
- raise InstallError(msg.format(self.compiler.name))
+ raise InstallError(msg.format(self.pkg.compiler.name))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env.set("ESMF_CXX", spec["mpi"].mpicxx)
env.set("ESMF_C", spec["mpi"].mpicc)
env.set("ESMF_F90", spec["mpi"].mpifc)
@@ -248,7 +300,7 @@ class Esmf(MakefilePackage):
env.set("ESMF_F90", spack_fc)
# This environment variable controls the build option.
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
# Build a debuggable version of the library.
env.set("ESMF_BOPT", "g")
else:
@@ -256,7 +308,7 @@ class Esmf(MakefilePackage):
env.set("ESMF_BOPT", "O")
if (
- self.compiler.name in ["gcc", "clang", "apple-clang"]
+ self.pkg.compiler.name in ["gcc", "clang", "apple-clang"]
and gfortran_major_version >= 10
and (self.spec.satisfies("@:8.2.99") or self.spec.satisfies("@8.3.0b09"))
):
@@ -268,7 +320,7 @@ class Esmf(MakefilePackage):
# ESMF_OS must be set for Cray systems
# But spack no longer gives arch == cray
- if self.compiler.name == "cce" or "^cray-mpich" in self.spec:
+ if self.pkg.compiler.name == "cce" or "^cray-mpich" in self.spec:
env.set("ESMF_OS", "Unicos")
# Allow override of ESMF_OS:
@@ -282,28 +334,30 @@ class Esmf(MakefilePackage):
# ESMF_COMM must be set to indicate which MPI implementation
# is used to build the ESMF library.
- if "+mpi" in spec:
- if "^cray-mpich" in self.spec:
+ if spec.satisfies("+mpi"):
+ if self.spec.satisfies("^[virtuals=mpi] cray-mpich"):
env.set("ESMF_COMM", "mpi")
# https://github.com/jcsda/spack-stack/issues/517
if self.spec.satisfies("@:8.4.1"):
env.set("ESMF_CXXLINKLIBS", "-lmpifort -lmpi")
- elif "^mvapich2" in spec:
+ elif spec.satisfies("^[virtuals=mpi] mvapich2"):
env.set("ESMF_COMM", "mvapich2")
- elif "^mpich" in spec:
+ elif spec.satisfies("^[virtuals=mpi] mpich"):
if self.spec.satisfies("@:8.2.99"):
env.set("ESMF_COMM", "mpich3")
else:
env.set("ESMF_COMM", "mpich")
- elif "^openmpi" in spec or "^hpcx-mpi" in spec:
+ elif spec.satisfies("^[virtuals=mpi] openmpi") or spec.satisfies(
+ "^[virtuals=mpi] hpcx-mpi"
+ ):
env.set("ESMF_COMM", "openmpi")
elif (
- "^intel-parallel-studio+mpi" in spec
- or "^intel-mpi" in spec
- or "^intel-oneapi-mpi" in spec
+ spec.satisfies("^[virtuals=mpi] intel-parallel-studio+mpi")
+ or spec.satisfies("^[virtuals=mpi] intel-mpi")
+ or spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi")
):
env.set("ESMF_COMM", "intelmpi")
- elif "^mpt" in spec:
+ elif spec.satisfies("^[virtuals=mpi] mpt"):
# MPT is the HPE (SGI) variant of mpich
env.set("ESMF_COMM", "mpt")
else:
@@ -319,15 +373,14 @@ class Esmf(MakefilePackage):
# LAPACK #
##########
- if "+external-lapack" in spec:
+ if spec.satisfies("+external-lapack"):
# A system-dependent external LAPACK/BLAS installation is used
# to satisfy the external dependencies of the LAPACK-dependent
# ESMF code.
env.set("ESMF_LAPACK", "system")
- # FIXME: determine whether or not we need to set this
# Specifies the path where the LAPACK library is located.
- # env.set("ESMF_LAPACK_LIBPATH", spec["lapack"].prefix.lib)
+ env.set("ESMF_LAPACK_LIBPATH", spec["lapack"].prefix.lib)
# Specifies the linker directive needed to link the LAPACK library
# to the application.
@@ -339,7 +392,7 @@ class Esmf(MakefilePackage):
# NetCDF #
##########
- if "+netcdf" in spec:
+ if spec.satisfies("+netcdf"):
# ESMF provides the ability to read Grid and Mesh data in
# NetCDF format.
env.set("ESMF_NETCDF", "nc-config")
@@ -354,7 +407,7 @@ class Esmf(MakefilePackage):
# Parallel-NetCDF #
###################
- if "+pnetcdf" in spec:
+ if spec.satisfies("+pnetcdf"):
# ESMF provides the ability to write Mesh weights
# using Parallel-NetCDF.
@@ -365,7 +418,7 @@ class Esmf(MakefilePackage):
##############
# ParallelIO #
##############
- if "+external-parallelio" in spec:
+ if spec.satisfies("+external-parallelio"):
env.set("ESMF_PIO", "external")
env.set("ESMF_PIO_LIBPATH", spec["parallelio"].prefix.lib)
env.set("ESMF_PIO_INCLUDE", spec["parallelio"].prefix.include)
@@ -379,7 +432,7 @@ class Esmf(MakefilePackage):
# XERCES #
##########
- if "+xerces" in spec:
+ if spec.satisfies("+xerces"):
# ESMF provides the ability to read Attribute data in
# XML file format via the XERCES C++ library.
@@ -395,9 +448,14 @@ class Esmf(MakefilePackage):
#########################
# Static-only option:
- if "~shared" in spec:
+ if spec.satisfies("~shared"):
env.set("ESMF_SHARED_LIB_BUILD", "OFF")
+ # https://github.com/JCSDA/spack-stack/issues/956
+ if spec.satisfies("+shared"):
+ if sys.platform == "darwin":
+ env.set("ESMF_TRACE_LIB_BUILD", "OFF")
+
@run_after("install")
def post_install(self):
install_tree("cmake", self.prefix.cmake)
@@ -417,5 +475,10 @@ class Esmf(MakefilePackage):
def setup_dependent_build_environment(self, env, dependent_spec):
env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk"))
- def setup_run_environment(self, env):
- env.set("ESMFMKFILE", os.path.join(self.prefix.lib, "esmf.mk"))
+ def install(self, pkg, spec, prefix):
+ make("install")
+
+ if spec.satisfies("+python"):
+ # build the python library
+ python_builder = PythonPipBuilder(pkg)
+ python_builder.install(pkg, spec, prefix)
diff --git a/var/spack/repos/builtin/packages/essl/package.py b/var/spack/repos/builtin/packages/essl/package.py
index bda77a149f..bcfbe4b220 100644
--- a/var/spack/repos/builtin/packages/essl/package.py
+++ b/var/spack/repos/builtin/packages/essl/package.py
@@ -45,18 +45,18 @@ class Essl(BundlePackage):
spec = self.spec
prefix = self.prefix
- if "+ilp64" in spec:
+ if spec.satisfies("+ilp64"):
essl_lib = ["libessl6464"]
else:
essl_lib = ["libessl"]
if spec.satisfies("threads=openmp"):
# ESSL SMP support requires XL or Clang OpenMP library
- if "%xl" in spec or "%xl_r" in spec or "%clang" in spec:
- if "+ilp64" in spec:
+ if spec.satisfies("%xl") or spec.satisfies("%xl_r") or spec.satisfies("%clang"):
+ if spec.satisfies("+ilp64"):
essl_lib = ["libesslsmp6464"]
else:
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
essl_lib = ["libesslsmpcuda"]
else:
essl_lib = ["libesslsmp"]
diff --git a/var/spack/repos/builtin/packages/esys-particle/package.py b/var/spack/repos/builtin/packages/esys-particle/package.py
index 0475d965d8..7021384dd9 100644
--- a/var/spack/repos/builtin/packages/esys-particle/package.py
+++ b/var/spack/repos/builtin/packages/esys-particle/package.py
@@ -21,6 +21,8 @@ class EsysParticle(CMakePackage):
version("3.0-alpha", sha256="4fba856a95c93991cacb904e6a54a7ded93558f7adc8c3e6da99bc347843a434")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
depends_on("boost@1.71.0+python")
depends_on("python@3.6:")
diff --git a/var/spack/repos/builtin/packages/ethminer/package.py b/var/spack/repos/builtin/packages/ethminer/package.py
index ae28904c54..35a564e6ff 100644
--- a/var/spack/repos/builtin/packages/ethminer/package.py
+++ b/var/spack/repos/builtin/packages/ethminer/package.py
@@ -17,6 +17,9 @@ class Ethminer(CMakePackage):
version("0.12.0", sha256="71122c8aa1be2c29e46d7f07961fa760b1eb390e4d9a2a21cf900f6482a8755a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("opencl", default=True, description="Enable OpenCL mining.")
variant("cuda", default=False, description="Enable CUDA mining.")
variant("stratum", default=True, description="Build with Stratum protocol support.")
diff --git a/var/spack/repos/builtin/packages/ethtool/package.py b/var/spack/repos/builtin/packages/ethtool/package.py
index da8800471b..04f9bcddda 100644
--- a/var/spack/repos/builtin/packages/ethtool/package.py
+++ b/var/spack/repos/builtin/packages/ethtool/package.py
@@ -17,6 +17,8 @@ class Ethtool(AutotoolsPackage):
version("4.8", sha256="e4443c612b01b6c4891e21f55a59aa2d6da1c9915edcf067bb66a0855590e143")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/etsf-io/package.py b/var/spack/repos/builtin/packages/etsf-io/package.py
index df30e5e257..91df214f7d 100644
--- a/var/spack/repos/builtin/packages/etsf-io/package.py
+++ b/var/spack/repos/builtin/packages/etsf-io/package.py
@@ -22,6 +22,8 @@ class EtsfIo(Package):
version("1.0.4", sha256="3140c2cde17f578a0e6b63acb27a5f6e9352257a1371a17b9c15c3d0ef078fa4")
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Add MPI support")
depends_on("netcdf-fortran")
@@ -30,6 +32,13 @@ class EtsfIo(Package):
patch("tests_module.patch")
patch("tests_init.patch")
+ def flag_handler(self, name, flags):
+ if name == "fflags":
+ flags.append(self.compiler.f77_pic_flag)
+ elif name == "fcflags":
+ flags.append(self.compiler.fc_pic_flag)
+ return flags, None, None
+
def install(self, spec, prefix):
options = ["--prefix=%s" % prefix]
oapp = options.append
diff --git a/var/spack/repos/builtin/packages/eve/package.py b/var/spack/repos/builtin/packages/eve/package.py
index aa0da87e42..76dcd75632 100644
--- a/var/spack/repos/builtin/packages/eve/package.py
+++ b/var/spack/repos/builtin/packages/eve/package.py
@@ -24,3 +24,5 @@ class Eve(CMakePackage):
version("2022.09.0", sha256="53a4e1944a1080c67380a6d7f4fb42998f1c1db35e2370e02d7853c3ac1e0a33")
version("2022.03.0", sha256="8bf9faea516806e7dd468e778dcedc81c51f0b2c6a70b9c75987ce12bb759911")
version("2021.10.0", sha256="580c40a8244039a700b93ea49fb0affc1c8d3c100eb6dc66368e101753f51e5c")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/evemu/package.py b/var/spack/repos/builtin/packages/evemu/package.py
index fee10a7f91..b9c4340a56 100644
--- a/var/spack/repos/builtin/packages/evemu/package.py
+++ b/var/spack/repos/builtin/packages/evemu/package.py
@@ -10,17 +10,18 @@ class Evemu(AutotoolsPackage):
"""The evemu library and tools are used to describe devices, record data,
create devices and replay data from kernel evdev devices."""
- homepage = "https://github.com/freedesktop/evemu"
- url = "https://github.com/freedesktop/evemu/archive/v2.7.0.tar.gz"
+ homepage = "https://gitlab.freedesktop.org/libevdev/evemu"
+ url = "https://gitlab.freedesktop.org/libevdev/evemu/-/archive/v2.7.0/evemu-v2.7.0.tar.gz"
license("LGPL-3.0-only")
- version("2.7.0", sha256="aee1ecc2b6761134470316d97208b173adb4686dc72548b82b2c2b5d1e5dc259")
- version("2.6.0", sha256="dc2382bee4dcb6c413271d586dc11d9b4372a70fa2b66b1e53a7107f2f9f51f8")
- version("2.5.0", sha256="ab7cce32800db84ab3504789583d1be0d9b0a5f2689389691367b18cf059b09f")
- version("2.4.0", sha256="d346ec59289f588bd93fe3cfa40858c7e048660164338787da79b9ebe3256069")
- version("2.3.1", sha256="f2dd97310520bc7824adc38b69ead22c53944a666810c60a3e49592914e14e8a")
+ version("2.7.0", sha256="b4ba7458ccb394e9afdb2562c9809e9e90fd1099e8a028d05de3f12349ab6afa")
+ version("2.6.0", sha256="2efa4abb51f9f35a48605db51ab835cf688f02f6041d48607e78e11ec3524ac8")
+ version("2.5.0", sha256="1d88b2a81db36b6018cdc3e8d57fbb95e3a5df9e6806cd7b3d29c579a7113d4f")
+ version("2.4.0", sha256="ea8e7147550432321418ae1161a909e054ff482c86a6a1631f727171791a501d")
+ version("2.3.1", sha256="fbe77a083ed4328e76e2882fb164efc925b308b83e879b518136ee54d74def46")
+ depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/everytrace-example/package.py b/var/spack/repos/builtin/packages/everytrace-example/package.py
index 4ea4c237b6..28529bd910 100644
--- a/var/spack/repos/builtin/packages/everytrace-example/package.py
+++ b/var/spack/repos/builtin/packages/everytrace-example/package.py
@@ -16,6 +16,8 @@ class EverytraceExample(CMakePackage):
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
depends_on("everytrace+mpi+fortran")
# Currently the only MPI this everytrace works with.
diff --git a/var/spack/repos/builtin/packages/everytrace/package.py b/var/spack/repos/builtin/packages/everytrace/package.py
index 3e5c1d9c88..9ab3a30868 100644
--- a/var/spack/repos/builtin/packages/everytrace/package.py
+++ b/var/spack/repos/builtin/packages/everytrace/package.py
@@ -20,6 +20,10 @@ class Everytrace(CMakePackage):
version("develop", branch="develop")
version("0.2.2", sha256="0487276bb24e648388862d8e1d8cfe56b529f7e3d840df3fcb5b3a3dad4016e1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enables MPI parallelism")
variant("fortran", default=True, description="Enable use with Fortran programs")
variant("cxx", default=True, description="Enable C++ Exception-based features")
diff --git a/var/spack/repos/builtin/packages/evtgen/package.py b/var/spack/repos/builtin/packages/evtgen/package.py
index d9a8f8a192..cac9dd6a18 100644
--- a/var/spack/repos/builtin/packages/evtgen/package.py
+++ b/var/spack/repos/builtin/packages/evtgen/package.py
@@ -17,6 +17,7 @@ class Evtgen(CMakePackage):
maintainers("vvolkl")
+ version("02.02.01", sha256="1fcae56c6b27b89c4a2f4b224d27980607442185f5570e961f6334a3543c6e77")
version("02.02.00", sha256="0c626e51cb17e799ad0ffd0beea5cb94d7ac8a5f8777b746aa1944dd26071ecf")
version("02.00.00", sha256="02372308e1261b8369d10538a3aa65fe60728ab343fcb64b224dac7313deb719")
# switched to cmake in 02.00.00
@@ -26,6 +27,8 @@ class Evtgen(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
variant("pythia8", default=True, description="Build with pythia8")
variant("tauola", default=False, description="Build with tauola")
variant("photos", default=False, description="Build with photos")
@@ -36,6 +39,7 @@ class Evtgen(CMakePackage):
depends_on("hepmc", when="~hepmc3")
depends_on("hepmc3", when="+hepmc3")
+ depends_on("pythia8@:8.309", when="@:02.02.00 +pythia8")
depends_on("pythia8", when="+pythia8")
depends_on("tauola~hepmc3", when="+tauola~hepmc3")
depends_on("photos~hepmc3", when="+photos~hepmc3")
@@ -93,18 +97,18 @@ class Evtgen(CMakePackage):
options += self.configure_args()
with working_dir(self.build_directory, create=True):
- inspect.getmodule(self).configure(*options)
+ configure(*options)
@when("@:01")
def configure_args(self):
args = []
args.append("--hepmcdir=%s" % self.spec["hepmc"].prefix)
- if "+pythia8" in self.spec:
+ if self.spec.satisfies("+pythia8"):
args.append("--pythiadir=%s" % self.spec["pythia8"].prefix)
- if "+photos" in self.spec:
+ if self.spec.satisfies("+photos"):
args.append("--photosdir=%s" % self.spec["photos"].prefix)
- if "+tauola" in self.spec:
+ if self.spec.satisfies("+tauola"):
args.append("--tauoladir=%s" % self.spec["tauola"].prefix)
return args
diff --git a/var/spack/repos/builtin/packages/exabayes/package.py b/var/spack/repos/builtin/packages/exabayes/package.py
index ce1937dc1f..36a5b3ccd9 100644
--- a/var/spack/repos/builtin/packages/exabayes/package.py
+++ b/var/spack/repos/builtin/packages/exabayes/package.py
@@ -19,6 +19,9 @@ class Exabayes(AutotoolsPackage):
version("1.5.1", sha256="f75ce8d5cee4d241cadacd0f5f5612d783b9e9babff2a99c7e0c3819a94bbca9")
version("1.5", sha256="e401f1b4645e67e8879d296807131d0ab79bba81a1cd5afea14d7c3838b095a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
depends_on("mpi", when="+mpi")
@@ -35,7 +38,7 @@ class Exabayes(AutotoolsPackage):
def configure_args(self):
args = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
args.append("--enable-mpi")
else:
args.append("--disable-mpi")
diff --git a/var/spack/repos/builtin/packages/exaca/package.py b/var/spack/repos/builtin/packages/exaca/package.py
index b1fd6416b9..3ca8bcb7a0 100644
--- a/var/spack/repos/builtin/packages/exaca/package.py
+++ b/var/spack/repos/builtin/packages/exaca/package.py
@@ -7,12 +7,12 @@ from spack.package import *
from spack.pkg.builtin.kokkos import Kokkos
-class Exaca(CMakePackage):
+class Exaca(CMakePackage, CudaPackage, ROCmPackage):
"""ExaCA: an exascale cellular automata application for alloy solidification modeling"""
homepage = "https://github.com/LLNL/ExaCA"
git = "https://github.com/LLNL/ExaCA.git"
- url = "https://github.com/LLNL/ExaCA/archive/1.2.0.tar.gz"
+ url = "https://github.com/LLNL/ExaCA/archive/2.0.0.tar.gz"
maintainers("streeve", "MattRolchigo")
@@ -21,10 +21,14 @@ class Exaca(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("2.0.0", sha256="a33cc65a6e79bed37a644f5bfc9dd5fe356239f78c5b82830c6354acc43e016b")
+ version("1.3.0", sha256="637215d3c64e8007b55d68bea6003b51671029d9045af847534e0e59c4271a94")
version("1.2.0", sha256="5038d63de96c6142ddea956998e1f4ebffbc4a5723caa4da0e73eb185e6623e4")
version("1.1.0", sha256="10106fb1836964a19bc5bab3f374baa24188ba786c768e554442ab896b31ff24")
version("1.0.0", sha256="48556233360a5e15e1fc20849e57dd60739c1991c7dfc7e6b2956af06688b96a")
+ depends_on("cxx", type="build") # generated
+
_kokkos_backends = Kokkos.devices_variants
for _backend in _kokkos_backends:
_deflt, _descr = _kokkos_backends[_backend]
@@ -38,13 +42,38 @@ class Exaca(CMakePackage):
depends_on("googletest@1.10:", type="test", when="@1.1:+testing")
depends_on("kokkos@3.0:", when="@:1.1")
depends_on("kokkos@3.2:", when="@1.2:")
+ depends_on("kokkos@4.0:", when="@1.3:")
depends_on("mpi")
depends_on("nlohmann-json", when="@1.2:")
+ for _backend in _kokkos_backends:
+ # Handled separately below
+ if _backend != "cuda" and _backend != "rocm":
+ _backend_dep = "+{0}".format(_backend)
+ depends_on("kokkos {0}".format(_backend_dep), when=_backend_dep)
+
+ for arch in CudaPackage.cuda_arch_values:
+ cuda_dep = "+cuda cuda_arch={0}".format(arch)
+ depends_on("kokkos {0}".format(cuda_dep), when=cuda_dep)
+ for arch in ROCmPackage.amdgpu_targets:
+ rocm_dep = "+rocm amdgpu_target={0}".format(arch)
+ depends_on("kokkos {0}".format(rocm_dep), when=rocm_dep)
+
def cmake_args(self):
options = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
if self.spec.satisfies("@1.1:"):
options += [self.define_from_variant("ExaCA_ENABLE_TESTING", "testing")]
+ # Only release with optional json
+ if self.spec.satisfies("@1.2"):
+ options += [self.define("ExaCA_ENABLE_JSON", "ON")]
+ # Use the json dependency, not an internal download
+ if self.spec.satisfies("@2.0:"):
+ options += [self.define("ExaCA_REQUIRE_EXTERNAL_JSON", "ON")]
+
+ # Use hipcc if compiling for rocm. Modifying this instead of CMAKE_CXX_COMPILER
+ # keeps the spack wrapper
+ if self.spec.satisfies("+rocm"):
+ env["SPACK_CXX"] = self.spec["hip"].hipcc
return options
diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py
index 796138b4c5..950909d3b7 100644
--- a/var/spack/repos/builtin/packages/exago/package.py
+++ b/var/spack/repos/builtin/packages/exago/package.py
@@ -60,6 +60,10 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
)
version("kpp2", tag="kpp2", commit="1da764d80a2db793f4c43ca50e50981f7ed3880a", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Progrmming model options
variant("mpi", default=True, description="Enable/Disable MPI")
variant("raja", default=False, description="Enable/Disable RAJA")
@@ -156,7 +160,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
# This is duplicated from HiOp
# RAJA > 0.14 and Umpire > 6.0 require c++ std 14
# We are working on supporting newer Umpire/RAJA versions
- depends_on("raja@0.14.0:0.14", when="@1.1.0:+raja")
+ depends_on("raja@0.14.0:0.14 +shared", when="@1.1.0:+raja")
depends_on("umpire@6.0.0:6", when="@1.1.0:+raja")
depends_on("camp@0.2.3:0.2", when="@1.1.0:+raja")
# This is no longer a requirement in RAJA > 0.14
@@ -195,7 +199,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
args = []
spec = self.spec
- if "~mpi" in self.spec:
+ if self.spec.satisfies("~mpi"):
args.append(self.define("CMAKE_C_COMPILER", os.environ["CC"]))
args.append(self.define("CMAKE_CXX_COMPILER", os.environ["CXX"]))
else:
@@ -203,7 +207,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define("CMAKE_CXX_COMPILER", 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:
+ if spec.satisfies("+cuda"):
args.append(self.define("MPI_CXX_HEADER_DIR", spec["mpi"].prefix.include))
# NOTE: If building with spack develop on a cluster, you may want to
@@ -229,7 +233,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
]
)
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch_list = spec.variants["cuda_arch"].value
if cuda_arch_list[0] != "none":
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", cuda_arch_list))
@@ -242,7 +246,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
# args.append(
# self.define('HIP_CLANG_INCLUDE_PATH',
# '/opt/rocm-X.Y.Z/llvm/lib/clang/14.0.0/include/'))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
rocm_arch_list = spec.variants["amdgpu_target"].value
diff --git a/var/spack/repos/builtin/packages/examinimd/package.py b/var/spack/repos/builtin/packages/examinimd/package.py
index d23fff888b..54b0ab843c 100644
--- a/var/spack/repos/builtin/packages/examinimd/package.py
+++ b/var/spack/repos/builtin/packages/examinimd/package.py
@@ -43,14 +43,14 @@ class Examinimd(MakefilePackage):
# Append Kokkos
targets.append("KOKKOS_PATH={0}".format(self.spec["kokkos-legacy"].prefix))
# Set kokkos device
- if "openmp" in self.spec:
+ if self.spec.satisfies("openmp"):
targets.append("KOKKOS_DEVICES=OpenMP")
- elif "pthreads" in self.spec:
+ elif self.spec.satisfies("pthreads"):
targets.append("KOKKOS_DEVICES=Pthread")
else:
targets.append("KOKKOS_DEVICES=Serial")
# Set MPI as needed
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
targets.append("MPI=1")
targets.append("CXX = {0}".format(self.spec["mpi"].mpicxx))
else:
diff --git a/var/spack/repos/builtin/packages/examl/package.py b/var/spack/repos/builtin/packages/examl/package.py
index 1747eb95ea..958b809587 100644
--- a/var/spack/repos/builtin/packages/examl/package.py
+++ b/var/spack/repos/builtin/packages/examl/package.py
@@ -31,6 +31,8 @@ class Examl(MakefilePackage):
version("3.0.14", sha256="698b538996946ae23a2d6fa1e230c210832e59080da33679ff7d6b342a9e6180")
version("3.0.13", sha256="893aecb5545798235a17975aa07268693d3526d0aee0ed59a2d6e791248791ed")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/exampm/package.py b/var/spack/repos/builtin/packages/exampm/package.py
index 5c3a428022..0da28676d3 100644
--- a/var/spack/repos/builtin/packages/exampm/package.py
+++ b/var/spack/repos/builtin/packages/exampm/package.py
@@ -20,6 +20,8 @@ class Exampm(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/exasp2/package.py b/var/spack/repos/builtin/packages/exasp2/package.py
index e19cb8d201..911d7f04a0 100644
--- a/var/spack/repos/builtin/packages/exasp2/package.py
+++ b/var/spack/repos/builtin/packages/exasp2/package.py
@@ -32,6 +32,8 @@ class Exasp2(MakefilePackage):
version("develop", branch="master")
version("1.0", sha256="59986ea70391a1b382d2ed22d5cf013f46c0c15e44ed95dcd875a917adfc6211")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Build With MPI Support")
depends_on("bml")
@@ -46,7 +48,7 @@ class Exasp2(MakefilePackage):
def build_targets(self):
targets = []
spec = self.spec
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
targets.append("PARALLEL=MPI")
targets.append("MPICC={0}".format(spec["mpi"].mpicc))
targets.append("MPI_LIB=-L" + spec["mpi"].prefix.lib + " -lmpi")
diff --git a/var/spack/repos/builtin/packages/exawind/package.py b/var/spack/repos/builtin/packages/exawind/package.py
index b7ba5e378d..f7c611a918 100644
--- a/var/spack/repos/builtin/packages/exawind/package.py
+++ b/var/spack/repos/builtin/packages/exawind/package.py
@@ -6,37 +6,126 @@
from spack.package import *
-class Exawind(CMakePackage):
+class Exawind(CMakePackage, CudaPackage, ROCmPackage):
"""Multi-application driver for Exawind project."""
homepage = "https://github.com/Exawind/exawind-driver"
git = "https://github.com/Exawind/exawind-driver.git"
- maintainers("jrood-nrel", "psakievich")
+ maintainers("jrood-nrel")
tags = ["ecp", "ecp-apps"]
license("Apache-2.0")
- version("master", branch="main")
+ version("master", branch="main", submodules=True)
+ version("1.1.0", tag="v1.1.0", submodules=True)
+ version("1.0.0", tag="v1.0.0", submodules=True)
- depends_on("trilinos+stk")
- depends_on("tioga+shared~nodegid")
- depends_on("nalu-wind+hypre+openfast+tioga+wind-utils")
- depends_on("amr-wind+hypre+mpi+netcdf+openfast")
- depends_on("openfast+cxx+shared@2.6.0:")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("amr_wind_gpu", default=False, description="Enable AMR-Wind on the GPU")
+ variant("nalu_wind_gpu", default=False, description="Enable Nalu-Wind on the GPU")
+ variant("sycl", default=False, description="Enable SYCL backend for AMR-Wind")
+ variant("gpu-aware-mpi", default=False, description="gpu-aware-mpi")
+
+ for arch in CudaPackage.cuda_arch_values:
+ depends_on(
+ "amr-wind+cuda cuda_arch=%s" % arch, when="+amr_wind_gpu+cuda cuda_arch=%s" % arch
+ )
+ depends_on(
+ "nalu-wind+cuda cuda_arch=%s" % arch, when="+nalu_wind_gpu+cuda cuda_arch=%s" % arch
+ )
+ depends_on(
+ "trilinos+cuda cuda_arch=%s" % arch, when="+nalu_wind_gpu+cuda cuda_arch=%s" % arch
+ )
+
+ for arch in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "amr-wind+rocm amdgpu_target=%s" % arch,
+ when="+amr_wind_gpu+rocm amdgpu_target=%s" % arch,
+ )
+ depends_on(
+ "nalu-wind+rocm amdgpu_target=%s" % arch,
+ when="+nalu_wind_gpu+rocm amdgpu_target=%s" % arch,
+ )
+ depends_on(
+ "trilinos+rocm amdgpu_target=%s" % arch,
+ when="+nalu_wind_gpu+rocm amdgpu_target=%s" % arch,
+ )
+
+ depends_on("nalu-wind+hypre+fsi+openfast+tioga")
+ depends_on("amr-wind+netcdf+mpi+tiny_profile")
+ depends_on("trilinos")
depends_on("yaml-cpp@0.6:")
+ depends_on("tioga~nodegid")
+ depends_on("openfast+cxx@2.6.0:")
+ depends_on("amr-wind+sycl", when="+amr_wind_gpu+sycl")
+ depends_on("kokkos-nvcc-wrapper", type="build", when="+cuda")
+ depends_on("mpi")
+ depends_on("nalu-wind+gpu-aware-mpi", when="+gpu-aware-mpi")
+ depends_on("amr-wind+gpu-aware-mpi", when="+gpu-aware-mpi")
+ depends_on("nalu-wind@2.0.0:", when="@1.0.0:")
+ depends_on("amr-wind@0.9.0:", when="@1.0.0:")
+ depends_on("tioga@1.0.0:", when="@1.0.0:")
+
+ with when("~amr_wind_gpu~nalu_wind_gpu"):
+ conflicts("+cuda")
+ conflicts("+rocm")
+ conflicts("+sycl")
+ with when("~nalu_wind_gpu"):
+ conflicts("^nalu-wind+cuda")
+ conflicts("^nalu-wind+rocm")
+ with when("~amr_wind_gpu"):
+ conflicts("^amr-wind+cuda")
+ conflicts("^amr-wind+rocm")
+ conflicts("^amr-wind+sycl")
+ conflicts("+amr_wind_gpu", when="~cuda~rocm~sycl")
+ conflicts("+nalu_wind_gpu", when="~cuda~rocm")
+ conflicts("+nalu_wind_gpu", when="+sycl")
+ conflicts("^amr-wind+hypre", when="~amr_wind_gpu+nalu_wind_gpu")
+ conflicts("^amr-wind+hypre", when="+amr_wind_gpu~nalu_wind_gpu")
+ conflicts("+sycl", when="+cuda")
+ conflicts("+rocm", when="+cuda")
+ conflicts("+sycl", when="+rocm")
def cmake_args(self):
spec = self.spec
- args = [
- self.define("Trilinos_DIR", spec["trilinos"].prefix),
- self.define("TIOGA_DIR", spec["tioga"].prefix),
- self.define("Nalu-Wind_DIR", spec["nalu-wind"].prefix),
- self.define("AMR-Wind_DIR", spec["amr-wind"].prefix),
- self.define("OpenFAST_DIR", spec["openfast"].prefix),
- self.define("YAML-CPP_DIR", spec["yaml-cpp"].prefix),
- ]
+ args = [self.define("MPI_HOME", spec["mpi"].prefix)]
+
+ if spec.satisfies("+cuda"):
+ args.append(self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx))
+ args.append(self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc))
+ args.append(self.define("EXAWIND_ENABLE_CUDA", True))
+ args.append(self.define("CUDAToolkit_ROOT", self.spec["cuda"].prefix))
+ args.append(self.define("EXAWIND_CUDA_ARCH", self.spec.variants["cuda_arch"].value))
+
+ if spec.satisfies("+rocm"):
+ targets = self.spec.variants["amdgpu_target"].value
+ args.append(self.define("EXAWIND_ENABLE_ROCM", True))
+ args.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
+ # Optimization to only build one specific target architecture:
+ args.append(self.define("CMAKE_HIP_ARCHITECTURES", ";".join(str(x) for x in targets)))
+ args.append(self.define("AMDGPU_TARGETS", ";".join(str(x) for x in targets)))
+ args.append(self.define("GPU_TARGETS", ";".join(str(x) for x in targets)))
+
+ if spec.satisfies("^amr-wind+hdf5"):
+ args.append(self.define("H5Z_ZFP_USE_STATIC_LIBS", True))
return args
+
+ def setup_build_environment(self, env):
+ env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE")
+ if self.spec.satisfies("+rocm+amr_wind_gpu~nalu_wind_gpu"):
+ # Manually turn off device self.defines to solve Kokkos issues in Nalu-Wind headers
+ env.append_flags("CXXFLAGS", "-U__HIP_DEVICE_COMPILE__ -DDESUL_HIP_RDC")
+ if self.spec.satisfies("+cuda"):
+ env.set("OMPI_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ env.set("MPICH_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ env.set("MPICXX_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ if self.spec.satisfies("+rocm"):
+ env.set("OMPI_CXX", self.spec["hip"].hipcc)
+ env.set("MPICH_CXX", self.spec["hip"].hipcc)
+ env.set("MPICXX_CXX", self.spec["hip"].hipcc)
diff --git a/var/spack/repos/builtin/packages/exciting/package.py b/var/spack/repos/builtin/packages/exciting/package.py
index 72e9c2f82b..8732882361 100644
--- a/var/spack/repos/builtin/packages/exciting/package.py
+++ b/var/spack/repos/builtin/packages/exciting/package.py
@@ -24,6 +24,10 @@ class Exciting(MakefilePackage):
version("oxygen", branch="oxygen_release", preferred=True)
version("14", sha256="a7feaffdc23881d6c0737d2f79f94d9bf073e85ea358a57196d7f7618a0a3eff")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# as-of-yet unpublished fix to version 14
patch("dfgather.patch", when="@14", working_dir="src/src_xs", level=0)
# Patch to add aarch64 in config.guess
@@ -71,18 +75,18 @@ class Exciting(MakefilePackage):
opts["LIB_ARP"] = "libarpack.a"
opts["F90"] = spack_fc
opts["F77"] = spack_f77
- if "+omp" in spec:
+ if spec.satisfies("+omp"):
opts["SMPF90_OPTS"] = self.compiler.openmp_flag + " -DUSEOMP"
opts["SMPF77_OPTS"] = self.compiler.openmp_flag + " -DUSEOMP"
else:
opts["BUILDSMP"] = "false"
- if "%intel" in spec:
+ if spec.satisfies("%intel"):
opts["F90_OPTS"] += " -cpp -ip -unroll -scalar_rep "
opts["CPP_ON_OPTS"] += " -DIFORT -DFFTW"
- if "%gcc" in spec:
+ if spec.satisfies("%gcc"):
opts["F90_OPTS"] += " -march=native -ffree-line-length-0"
- if "%gcc@10:" in spec:
+ if spec.satisfies("%gcc@10:"):
# The INSTALL file says this will fix the GCC@10 issues
opts["F90_OPTS"] += " -fallow-argument-mismatch"
opts["F77_OPTS"] += " -fallow-argument-mismatch"
@@ -91,7 +95,7 @@ class Exciting(MakefilePackage):
" ".join(["FCFLAGS = @FCFLAGS@", "-cpp", self.compiler.openmp_flag]),
"src/libXC/src/Makefile.in",
)
- if "+mkl" in spec:
+ if spec.satisfies("+mkl"):
opts["LIB_LPK"] = "-mkl=parallel"
opts["INC_MKL"] = spec["mkl"].headers.include_flags
opts["LIB_MKL"] = spec["mkl"].libs.ld_flags
@@ -105,17 +109,17 @@ class Exciting(MakefilePackage):
]
)
- if "+omp" in spec:
+ if spec.satisfies("+omp"):
opts["BUILDSMP"] = "true"
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
opts["BUILDMPI"] = "true"
opts["MPIF90"] = spec["mpi"].mpifc
opts["MPIF90_CPP_OPTS"] = "-DMPI -DMPIRHO -DMPISEC"
opts["MPIF90_OPTS"] = " ".join(["$(F90_OPTS)", "$(CPP_ON_OPTS) " "$(MPIF90_CPP_OPTS)"])
opts["MPIF90MT"] = "$(MPIF90)"
- if "+omp" in spec:
+ if spec.satisfies("+omp"):
opts["BUILDMPISMP"] = "true"
opts["SMPF90_OPTS"] = self.compiler.openmp_flag + " -DUSEOMP"
opts["SMPF77_OPTS"] = opts["SMPF90_OPTS"]
@@ -123,7 +127,7 @@ class Exciting(MakefilePackage):
else:
opts["BUILDMPI"] = "false"
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
opts["LIB_SCLPK"] = spec["scalapack"].libs.ld_flags
opts["CPP_SCLPK"] = " -DSCAL "
opts["MPI_LIBS"] = "$(LIB_SCLPK)"
diff --git a/var/spack/repos/builtin/packages/exempi/package.py b/var/spack/repos/builtin/packages/exempi/package.py
index f720a3a56b..2e3a2e126f 100644
--- a/var/spack/repos/builtin/packages/exempi/package.py
+++ b/var/spack/repos/builtin/packages/exempi/package.py
@@ -22,6 +22,8 @@ class Exempi(AutotoolsPackage):
version("2.6.1", sha256="072451ac1e0dc97ed69a2e5bfc235fd94fe093d837f65584d0e3581af5db18cd")
version("2.5.2", sha256="52f54314aefd45945d47a6ecf4bd21f362e6467fa5d0538b0d45a06bc6eaaed5")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("iconv")
# needs +test variant to prevent following error:
diff --git a/var/spack/repos/builtin/packages/exiv2/package.py b/var/spack/repos/builtin/packages/exiv2/package.py
index 937576b4ae..181f0c3e0b 100644
--- a/var/spack/repos/builtin/packages/exiv2/package.py
+++ b/var/spack/repos/builtin/packages/exiv2/package.py
@@ -22,5 +22,7 @@ class Exiv2(CMakePackage):
version("0.27.3", sha256="6398bc743c32b85b2cb2a604273b8c90aa4eb0fd7c1700bf66cbb2712b4f00c1")
version("0.27.2", sha256="3dbcaf01fbc5b98d42f091d1ff0d4b6cd9750dc724de3d9c0d113948570b2934")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
depends_on("expat@2.2.6:", type="link")
diff --git a/var/spack/repos/builtin/packages/exmcutils/package.py b/var/spack/repos/builtin/packages/exmcutils/package.py
index 8cd8115613..6629a68a69 100644
--- a/var/spack/repos/builtin/packages/exmcutils/package.py
+++ b/var/spack/repos/builtin/packages/exmcutils/package.py
@@ -19,6 +19,8 @@ class Exmcutils(AutotoolsPackage):
version("0.5.7", sha256="6b84f43e8928d835dbd68c735ece6a9b7c648a1a4488ec2b1d2f3c4ceec508e8")
version("0.5.6", sha256="296ba85cc828bd816c7c4de9453f589da37f32854a58ffda3586b6f371a23abf")
+ depends_on("c", type="build") # generated
+
@property
def configure_directory(self):
if self.version == Version("master"):
diff --git a/var/spack/repos/builtin/packages/exo/package.py b/var/spack/repos/builtin/packages/exo/package.py
new file mode 100644
index 0000000000..6dc79dc943
--- /dev/null
+++ b/var/spack/repos/builtin/packages/exo/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Exo(AutotoolsPackage):
+ """Helper applications for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/exo/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/exo-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="4f2c61d045a888cdb64297fd0ae20cc23da9b97ffb82562ed12806ed21da7d55")
+ version("4.16.0", sha256="1975b00eed9a8aa1f899eab2efaea593731c19138b83fdff2f13bdca5275bacc")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+
+ # Base requirements
+ with default_args(type=("build", "run")):
+ depends_on("libxfce4util")
+ depends_on("libxfce4ui")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("perl-uri")
+
+ with when("+introspection"):
+ depends_on("libxfce4util+introspection")
+ depends_on("libxfce4ui+introspection")
+ depends_on("gobject-introspection")
+
+ depends_on("intltool@0.51.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+ args += self.enable_or_disable("introspection")
+ return args
diff --git a/var/spack/repos/builtin/packages/exodusii/Fix-ioss-tpl.patch b/var/spack/repos/builtin/packages/exodusii/Fix-ioss-tpl.patch
new file mode 100644
index 0000000000..587d73a885
--- /dev/null
+++ b/var/spack/repos/builtin/packages/exodusii/Fix-ioss-tpl.patch
@@ -0,0 +1,25 @@
+From 4d3884f65a6a4df08ee8dd68ddaee5449f1dd378 Mon Sep 17 00:00:00 2001
+From: Greg Sjaardema <gsjaardema@gmail.com>
+Date: Tue, 26 Mar 2024 12:42:08 -0600
+Subject: [PATCH] Remove ioss as required library
+
+---
+ packages/seacas/cmake/Dependencies.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/packages/seacas/cmake/Dependencies.cmake b/packages/seacas/cmake/Dependencies.cmake
+index 3b1b3d6598..e75f5073f2 100644
+--- a/packages/seacas/cmake/Dependencies.cmake
++++ b/packages/seacas/cmake/Dependencies.cmake
+@@ -4,7 +4,7 @@ TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
+ Exodus_for libraries/exodus_for PT OPTIONAL
+ ExoIIv2for32 libraries/exoIIv2for32 PT OPTIONAL
+ Nemesis libraries/nemesis PT OPTIONAL
+- Ioss libraries/ioss PT REQUIRED
++ Ioss libraries/ioss PT OPTIONAL
+ Chaco libraries/chaco PT OPTIONAL
+ Aprepro_lib libraries/aprepro_lib PT OPTIONAL
+ Supes libraries/supes PT OPTIONAL
+--
+2.39.3 (Apple Git-145)
+
diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py
index 1a755b3965..00c29b96fe 100644
--- a/var/spack/repos/builtin/packages/exodusii/package.py
+++ b/var/spack/repos/builtin/packages/exodusii/package.py
@@ -3,10 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
+from spack.operating_systems.mac_os import macos_version
from spack.package import *
-# TODO: Add support for a C++11 enabled installation that filters out the
-# TODO: "C++11-Disabled" flag (but only if the spec compiler supports C++11).
+is_windows = sys.platform == "win32"
class Exodusii(CMakePackage):
@@ -15,101 +17,186 @@ class Exodusii(CMakePackage):
(problem definition), postprocessing (results visualization), and
data transfer between codes. An Exodus II data file is a random
access, machine independent, binary file that is written and read
- via C, C++, or Fortran API routines.
+ via C, C++, or Fortran API routines. This package *only* installs
+ the C and optionally Fortran library for exodus. If you want the full
+ suite of exodus-releated tools including the IOSS library, install
+ the seacas package instead of this package.
"""
- homepage = "https://github.com/gsjaardema/seacas"
- git = "https://github.com/gsjaardema/seacas.git"
- url = "https://github.com/gsjaardema/seacas/archive/refs/tags/v2021-04-05.zip"
+ homepage = "https://sandialabs.github.io/seacas/"
+ git = "https://github.com/sandialabs/seacas.git"
+ url = "https://github.com/sandialabs/seacas/archive/refs/tags/v2019-08-20.zip"
+ maintainers("gsjaardema")
- license("X11")
+ license("BSD-3-Clause")
+ version("master", branch="master")
version(
- "2021-04-05", sha256="f40d318674753287b8b28d2b4e5cca872cd772d4c7383af4a8f3eeb48fcc7ec0"
+ "2024-04-03", sha256="72b095bae64b2b6c232630f79de763c6ade00c9b1199fc6980800891b2ab3751"
)
version(
- "2021-04-02", sha256="811037a68eaff0daf9f34bd31b2ab1c9b8f028dfcb998ab01fbcb80d9458257c"
+ "2024-03-11", sha256="5d417aa652e4ec8d66e27714c63b8cb5a7f878fb7b2ec55f629636fcff7c0f00"
)
version(
- "2021-01-20", sha256="6ff7c3f0651138f2e2305b5270108ca45f96346a739b35a126a0a260c91cbe64"
+ "2023-11-27", sha256="00c444b2def2c9cf5694bee5bb0284ce289e83f7c84ac28c6701c746cfde9a4c"
)
version(
- "2021-01-06", sha256="69cafef17d8e624c2d9871f3a281ff3690116a6f82162fe5c1507bb4ecd6a32a"
+ "2023-05-30", sha256="d2cbd43596ed3ad77186f865fe8aa81a2efe389ff345b24622ac76c16614b532"
)
version(
- "2020-08-13", sha256="5b128a8ad9b0a69cff4fe937828d6d1702f1fe8aa80d4751e6522939afe62957"
+ "2022-10-14", sha256="a96f29de3b69e7e3f5f344396c8cf791fe277dab0217fc0b90b02e38e75bbdc1"
)
version(
- "2020-05-12", sha256="0402facf6cf23d903d878fb924b5d57e9f279dead5b92cf986953a6b91a6e81f"
+ "2022-08-01", sha256="c12a677ba2178cf5161d63fef3b1da4d3888622199cea3e611f59649085681dc"
)
version(
- "2020-03-16", sha256="ed1d42c8c657931ecd45367a465cf9c00255772d9cd0811fc9baacdb67fc71fa"
+ "2022-05-16", sha256="80f6b0dee91766ab207a366b8eea546cc1afa33cea24deebaa6583f283d80fab"
)
version(
- "2020-01-16", sha256="db69dca25595e88a40c00db0ccf2afed1ecd6008ba30bb478a4e1c5dd61998b8"
+ "2022-03-04", sha256="b2e09f0f64d75634b7d3f9844c2cea7acbc877c4ceebb6b91e8e494bb3653166"
)
version(
- "2019-12-18", sha256="88a71de836aa26fd63756cf3ffbf3978612edc5b6c61fa8de32fe9d638007774"
+ "2022-02-16", sha256="e1907f6831d9a0dd2c65879ca5746b9a0ef57d7ccce0036d55c0c6c5628ac981"
)
version(
- "2019-10-14", sha256="f143d90e8a7516d25979d1416e580dea638332db723f26ae94a712dfe4052e8f"
+ "2022-01-27", sha256="d21c14b9b30f773cef8e2029773f3cc35da021eebe9060298231f95021eb814f"
)
- version("2016-08-09", commit="2ffeb1bd39454ad5aa230e12969ce976f3d1c92b")
- version("master", branch="master")
+ version(
+ "2021-10-11",
+ sha256="5c04d252e1c4a10b037aa352b89487e581ec6b52bdb46e9e85f101bbdcd9c388",
+ deprecated=True,
+ )
+ version(
+ "2021-04-05",
+ sha256="f40d318674753287b8b28d2b4e5cca872cd772d4c7383af4a8f3eeb48fcc7ec0",
+ deprecated=True,
+ )
+ version(
+ "2021-04-02",
+ sha256="811037a68eaff0daf9f34bd31b2ab1c9b8f028dfcb998ab01fbcb80d9458257c",
+ deprecated=True,
+ )
+ version(
+ "2021-01-20",
+ sha256="6ff7c3f0651138f2e2305b5270108ca45f96346a739b35a126a0a260c91cbe64",
+ deprecated=True,
+ )
+ version(
+ "2021-01-06",
+ sha256="69cafef17d8e624c2d9871f3a281ff3690116a6f82162fe5c1507bb4ecd6a32a",
+ deprecated=True,
+ )
+ version(
+ "2020-08-13",
+ sha256="5b128a8ad9b0a69cff4fe937828d6d1702f1fe8aa80d4751e6522939afe62957",
+ deprecated=True,
+ )
+ version(
+ "2020-05-12",
+ sha256="0402facf6cf23d903d878fb924b5d57e9f279dead5b92cf986953a6b91a6e81f",
+ deprecated=True,
+ )
+ version(
+ "2020-03-16",
+ sha256="ed1d42c8c657931ecd45367a465cf9c00255772d9cd0811fc9baacdb67fc71fa",
+ deprecated=True,
+ )
+ version(
+ "2020-01-16",
+ sha256="db69dca25595e88a40c00db0ccf2afed1ecd6008ba30bb478a4e1c5dd61998b8",
+ deprecated=True,
+ )
+ version(
+ "2019-12-18",
+ sha256="88a71de836aa26fd63756cf3ffbf3978612edc5b6c61fa8de32fe9d638007774",
+ deprecated=True,
+ )
+ version(
+ "2019-10-14",
+ sha256="f143d90e8a7516d25979d1416e580dea638332db723f26ae94a712dfe4052e8f",
+ deprecated=True,
+ )
+ version("2016-08-09", commit="2ffeb1bd39454ad5aa230e12969ce976f3d1c92b", deprecated=True)
+ patch("Fix-ioss-tpl.patch", when="@2021-10-11:")
+
+ # Build options
+ variant("fortran", default=False, description="Compile with Fortran support")
+ variant("shared", default=True, description="Enables the build of shared libraries")
variant("mpi", default=True, description="Enables MPI parallelism.")
- variant("fortran", default=False, description="Build Fortran wrapper libraries.")
+ variant("thread_safe", default=False, description="Enable thread-safe exodus library")
- depends_on("cmake@2.8.11:", type="build")
+ depends_on("cmake@3.22:", when="@2023-10-24:", type="build")
+ depends_on("cmake@3.17:", when="@:2023-05-30", type="build")
depends_on("mpi", when="+mpi")
- # https://github.com/gsjaardema/seacas/blob/master/NetCDF-Mapping.md
- depends_on("netcdf-c@4.6.1:+mpi", when="+mpi")
- depends_on("netcdf-c@4.6.1:~mpi", when="~mpi")
+ # Always depends on netcdf-c
+ depends_on("netcdf-c@4.8.0:+mpi+parallel-netcdf", when="+mpi")
+ depends_on("netcdf-c@4.8.0:~mpi", when="~mpi")
+ depends_on("hdf5+hl~mpi", when="~mpi")
+ depends_on("hdf5+hl+mpi", when="+mpi")
+
+ depends_on("python@3.0:")
+ conflicts("+shared", when="platform=windows")
- depends_on("python@2.7:")
+ def setup_run_environment(self, env):
+ env.prepend_path("PYTHONPATH", self.prefix.lib)
def cmake_args(self):
spec = self.spec
+ from_variant = self.define_from_variant
+ define = self.define
+
+ if self.spec.satisfies("@2022-10-14:"):
+ project_name_base = "Seacas"
+ else:
+ project_name_base = "SEACASProj"
- cc_path = spec["mpi"].mpicc if "+mpi" in spec else self.compiler.cc
- cxx_path = spec["mpi"].mpicxx if "+mpi" in spec else self.compiler.cxx
-
- options = [
- # General Flags #
- "-DSEACASProj_ENABLE_SEACASExodus=ON",
- "-DSEACASProj_ENABLE_TESTS=ON",
- "-DBUILD_SHARED_LIBS:BOOL=ON",
- "-DTPL_ENABLE_Netcdf:BOOL=ON",
- "-DHDF5_NO_SYSTEM_PATHS=ON",
- "-DSEACASProj_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=ON",
- "-DSEACASProj_ENABLE_CXX11:BOOL=OFF",
- "-DSEACASProj_ENABLE_Zoltan:BOOL=OFF",
- "-DNetCDF_DIR:PATH={0}".format(spec["netcdf-c"].prefix),
- # MPI Flags #
- "-DTPL_ENABLE_MPI={0}".format("ON" if "+mpi" in spec else "OFF"),
- "-DCMAKE_C_COMPILER={0}".format(cc_path),
- "-DCMAKE_CXX_COMPILER={0}".format(cxx_path),
- ]
- if "+fortran" in spec:
- fc_path = spec["mpi"].mpifc if "+mpi" in spec else self.compiler.f90
+ options = []
+
+ # #################### Base Settings #######################
+ # Only want to enable the Exodus library. If want anything else, use the seacas package.
+ options.extend(
+ [
+ define(project_name_base + "_ENABLE_ALL_PACKAGES", False),
+ define(project_name_base + "_ENABLE_ALL_OPTIONAL_PACKAGES", False),
+ define(project_name_base + "_ENABLE_SECONDARY_TESTED_CODE", False),
+ define(project_name_base + "_ENABLE_SEACASExodus", True),
+ from_variant(project_name_base + "_ENABLE_SEACASExodus_for", "fortran"),
+ from_variant(project_name_base + "_ENABLE_SEACASExoIIv2for32", "fortran"),
+ define(project_name_base + "_HIDE_DEPRECATED_CODE", False),
+ from_variant("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "shared"),
+ from_variant("BUILD_SHARED_LIBS", "shared"),
+ from_variant("SEACASExodus_ENABLE_THREADSAFE", "thread_safe"),
+ from_variant("TPL_ENABLE_Pthread", "thread_safe"),
+ from_variant(project_name_base + "_ENABLE_Fortran", "fortran"),
+ ]
+ )
+ if "~shared" in self.spec and not is_windows:
+ options.append(self.define(project_name_base + "_EXTRA_LINK_FLAGS", "z;dl"))
+ options.append(from_variant("TPL_ENABLE_MPI", "mpi"))
+ if "+mpi" in spec and not is_windows:
options.extend(
[
- "-DSEACASProj_ENABLE_Fortran:BOOL=ON",
- "-DCMAKE_Fortran_COMPILER={0}".format(fc_path),
- "-DSEACASProj_ENABLE_SEACASExodus_for:BOOL=ON",
- "-DSEACASProj_ENABLE_SEACASExoIIv2for32:BOOL=ON",
+ define("CMAKE_C_COMPILER", spec["mpi"].mpicc),
+ define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx),
+ define("MPI_BASE_DIR", spec["mpi"].prefix),
]
)
- # Python #
- # Handle v2016 separately because of older tribits
- if spec.satisfies("@:2016-08-09"):
- options.append(
- "-DPYTHON_EXECUTABLE={0}".format(
- join_path(self.spec["python"].prefix.bin, "python")
- )
- )
+ if self.spec.satisfies("+fortran"):
+ options.append(define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc))
+
+ # ##################### Dependencies ##########################
+ # Always need NetCDF-C
+ options.extend(
+ [define("TPL_ENABLE_Netcdf", True), define("NetCDF_ROOT", spec["netcdf-c"].prefix)]
+ )
+
+ # ################# RPath Handling ######################
+ if sys.platform == "darwin" and macos_version() >= Version("10.12"):
+ # use @rpath on Sierra due to limit of dynamic loader
+ options.append(define("CMAKE_MACOSX_RPATH", True))
else:
- options.append("-DPython_ROOT={0}".format(spec["python"].prefix))
+ options.append(define("CMAKE_INSTALL_NAME_DIR", self.prefix.lib))
return options
diff --git a/var/spack/repos/builtin/packages/exonerate-gff3/package.py b/var/spack/repos/builtin/packages/exonerate-gff3/package.py
index 3d7fac832c..eb5c6234bd 100644
--- a/var/spack/repos/builtin/packages/exonerate-gff3/package.py
+++ b/var/spack/repos/builtin/packages/exonerate-gff3/package.py
@@ -18,6 +18,8 @@ class ExonerateGff3(AutotoolsPackage):
version("2.3.0", sha256="eeab7ea8bc815fc4a37d4c3b89c625167a9a60a4a833b5cc96e32dc313eafd1f")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
# parallel builds fail occasionally
diff --git a/var/spack/repos/builtin/packages/exonerate/package.py b/var/spack/repos/builtin/packages/exonerate/package.py
index 0eac5a4605..1453cf9074 100644
--- a/var/spack/repos/builtin/packages/exonerate/package.py
+++ b/var/spack/repos/builtin/packages/exonerate/package.py
@@ -16,6 +16,8 @@ class Exonerate(AutotoolsPackage):
version("2.4.0", sha256="f849261dc7c97ef1f15f222e955b0d3daf994ec13c9db7766f1ac7e77baa4042")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("glib")
diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py
index 2d3a0148f4..485f773a82 100644
--- a/var/spack/repos/builtin/packages/expat/package.py
+++ b/var/spack/repos/builtin/packages/expat/package.py
@@ -16,9 +16,42 @@ class Expat(AutotoolsPackage, CMakePackage):
url = "https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.bz2"
license("MIT")
-
- version("2.5.0", sha256="6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67")
- # deprecate all releases before 2.5.0 because of security issues
+ version("2.6.4", sha256="8dc480b796163d4436e6f1352e71800a774f73dbae213f1860b60607d2a83ada")
+ # deprecate all releases before 2.6.4 because of security issues
+ # CVE-2024-50602 (fixed in 2.6.4)
+ version(
+ "2.6.3",
+ sha256="b8baef92f328eebcf731f4d18103951c61fa8c8ec21d5ff4202fb6f2198aeb2d",
+ deprecated=True,
+ )
+ # CVE-2024-45490 (fixed in 2.6.3)
+ # CVE-2024-45491 (fixed in 2.6.3)
+ # CVE-2024-45492 (fixed in 2.6.3)
+ version(
+ "2.6.2",
+ sha256="9c7c1b5dcbc3c237c500a8fb1493e14d9582146dd9b42aa8d3ffb856a3b927e0",
+ deprecated=True,
+ )
+ # CVE-2024-28757 (fixed in 2.6.2)
+ version(
+ "2.6.1",
+ sha256="4677d957c0c6cb2a3321101944574c24113b637c7ab1cf0659a27c5babc201fd",
+ deprecated=True,
+ )
+ version(
+ "2.6.0",
+ sha256="ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba",
+ deprecated=True,
+ )
+ # CVE-2023-52425 (fixed in 2.6.0)
+ # CVE-2023-52426 (fixed in 2.6.0)
+ version(
+ "2.5.0",
+ sha256="6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67",
+ deprecated=True,
+ )
+ # CVE-2022-43680 (fixed in 2.5.0)
+ # CVE-2022-40674 (fixed in 2.4.9)
version(
"2.4.8",
sha256="a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16",
@@ -29,6 +62,7 @@ class Expat(AutotoolsPackage, CMakePackage):
sha256="e149bdd8b90254c62b3d195da53a09bd531a4d63a963b0d8a5268d48dd2f6a65",
deprecated=True,
)
+ # CVE-2022-25236 (fixed in 2.4.7)
version(
"2.4.6",
sha256="ce317706b07cae150f90cddd4253f5b4fba929607488af5ac47bf2bc08e31f09",
@@ -39,16 +73,31 @@ class Expat(AutotoolsPackage, CMakePackage):
sha256="fbb430f964c7a2db2626452b6769e6a8d5d23593a453ccbc21701b74deabedff",
deprecated=True,
)
+ # CVE-2022-25235 (fixed in 2.4.5)
+ # CVE-2022-25236 (fixed in 2.4.5)
+ # CVE-2022-25313 (fixed in 2.4.5)
+ # CVE-2022-25314 (fixed in 2.4.5)
+ # CVE-2022-25315 (fixed in 2.4.5)
version(
"2.4.4",
sha256="14c58c2a0b5b8b31836514dfab41bd191836db7aa7b84ae5c47bc0327a20d64a",
deprecated=True,
)
+ # CVE-2022-23852 (fixed in 2.4.4)
+ # CVE-2022-23990 (fixed in 2.4.4)
version(
"2.4.3",
sha256="6f262e216a494fbf42d8c22bc841b3e117c21f2467a19dc4c27c991b5622f986",
deprecated=True,
)
+ # CVE-2021-45960 (fixed in 2.4.3)
+ # CVE-2021-46143 (fixed in 2.4.3)
+ # CVE-2022-22822 (fixed in 2.4.3)
+ # CVE-2022-22823 (fixed in 2.4.3)
+ # CVE-2022-22824 (fixed in 2.4.3)
+ # CVE-2022-22825 (fixed in 2.4.3)
+ # CVE-2022-22826 (fixed in 2.4.3)
+ # CVE-2022-22827 (fixed in 2.4.3)
version(
"2.4.1",
sha256="2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40",
@@ -59,6 +108,7 @@ class Expat(AutotoolsPackage, CMakePackage):
sha256="8c59142ef88913bc0a8b6e4c58970c034210ca552e6271f52f6cd6cce3708424",
deprecated=True,
)
+ # CVE-2013-0340 (fixed in 2.4.0)
version(
"2.3.0",
sha256="f122a20eada303f904d5e0513326c5b821248f2d4d2afbf5c6f1339e511c0586",
@@ -74,6 +124,8 @@ class Expat(AutotoolsPackage, CMakePackage):
sha256="f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237",
deprecated=True,
)
+ # CVE-2019-15903 (fixed in 2.2.8)
+ # CVE-2018-20843 (fixed in 2.2.7)
version(
"2.2.6",
sha256="17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2",
@@ -84,17 +136,25 @@ class Expat(AutotoolsPackage, CMakePackage):
sha256="d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6",
deprecated=True,
)
+ # CVE-2017-11742 (fixed in 2.2.3)
version(
"2.2.2",
sha256="4376911fcf81a23ebd821bbabc26fd933f3ac74833f74924342c29aad2c86046",
deprecated=True,
)
+ # CVE-2017-9233 (fixed in 2.2.1)
+ # CVE-2016-9063 (fixed in 2.2.1)
+ # CVE-2016-5300 (fixed in 2.2.1, in part fixed earlier)
+ # CVE-2012-0876 (fixed in 2.2.1, improved fix)
version(
"2.2.0",
sha256="d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff",
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system("autotools", "cmake", default="autotools")
# Version 2.2.2 introduced a requirement for a high quality
@@ -129,7 +189,7 @@ class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
spec = self.spec
args = ["--without-docbook", "--enable-static"]
- if "+libbsd" in spec and "@2.2.1:" in spec:
+ if spec.satisfies("+libbsd") and spec.satisfies("@2.2.1:"):
args.append("--with-libbsd")
return args
@@ -141,7 +201,7 @@ class CMakeBuilder(cmake.CMakeBuilder):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
]
- if "+libbsd" in self.spec and "@2.2.1:" in self.spec:
+ if self.spec.satisfies("+libbsd") and self.spec.satisfies("@2.2.1:"):
args.append(self.define_from_variant("EXPAT_WITH_LIBBSD", "libbsd"))
return args
diff --git a/var/spack/repos/builtin/packages/expect/package.py b/var/spack/repos/builtin/packages/expect/package.py
index 372817b8d6..02a8cc2599 100644
--- a/var/spack/repos/builtin/packages/expect/package.py
+++ b/var/spack/repos/builtin/packages/expect/package.py
@@ -13,7 +13,7 @@ class Expect(AutotoolsPackage):
"""Expect is a tool for automating interactive applications such as
telnet, ftp, passwd, fsck, rlogin, tip, etc."""
- homepage = "http://expect.sourceforge.net/"
+ homepage = "https://expect.sourceforge.net/"
url = (
"https://sourceforge.net/projects/expect/files/Expect/5.45.4/expect5.45.4.tar.gz/download"
)
@@ -24,6 +24,8 @@ class Expect(AutotoolsPackage):
version("5.45.3", sha256="c520717b7195944a69ce1492ec82ca0ac3f3baf060804e6c5ee6d505ea512be9")
version("5.45", sha256="b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040")
+ depends_on("c", type="build") # generated
+
depends_on("tcl")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/extrae/dyninst_instruction.patch b/var/spack/repos/builtin/packages/extrae/dyninst_instruction.patch
new file mode 100644
index 0000000000..08c691c4f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/extrae/dyninst_instruction.patch
@@ -0,0 +1,19 @@
+diff --git a/src/launcher/dyninst/commonSnippets.C b/src/launcher/dyninst/commonSnippets.C
+index 94904a23..2f918949 100644
+--- a/src/launcher/dyninst/commonSnippets.C
++++ b/src/launcher/dyninst/commonSnippets.C
+@@ -482,9 +482,10 @@ string decodeBasicBlocks(BPatch_function * function, string routine)
+ ParseAPI::Block* b = ParseAPI::convert(block);
+ void * buf = b->region()->getPtrToInstruction(b->start());
+ InstructionAPI::InstructionDecoder dec((unsigned char*)buf,b->size(),b->region()->getArch());
+- InstructionAPI::Instruction::Ptr insn;
+- while((insn = dec.decode())) {
+- res <<loop_name<<"# "<<line++<<": "<< insn->format() << endl;
++ InstructionAPI::Instruction insn = dec.decode();
++ while(insn.isValid()) {
++ res <<loop_name<<"# "<<line++<<": "<< insn.format() << endl;
++ insn = dec.decode();
+ }
+ }
+ return res.str();
+
diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py
index a800bc309f..ee36e88b05 100644
--- a/var/spack/repos/builtin/packages/extrae/package.py
+++ b/var/spack/repos/builtin/packages/extrae/package.py
@@ -16,6 +16,8 @@ from spack.pkg.builtin.boost import Boost
# --with-papi=/usr
# --with-dwarf=/usr
# --with-elf=/usr
+# --with-elfutils=/usr
+# --with-tbb=/usr
# --with-dyninst=/usr
# --with-binutils=/usr
# --with-xml-prefix=/usr
@@ -42,14 +44,28 @@ class Extrae(AutotoolsPackage):
license("LGPL-2.1-or-later")
- version("4.0.6", sha256="b5060336cac57f1345faa09009b1940edf1e6991aae05cc10d0b714d31360a92")
+ version("4.2.3", sha256="c132f3609b2e6f34d95ca1598eea01e5097257b6a663bb9698206ec271825ed0")
+ version("4.2.2", sha256="1f776f1a3401942b79685ba13489a954a731bce7cbb8549594f6da0b557c58a7")
+ version("4.2.1", sha256="0260a9a4952b6ac9b82ee33ee2749c22ae10d39447e42167a2626c77f664bb9a")
+ version("4.2.0", sha256="7b83a1ed008440bbc1bda88297d2d0e9256780db1cf8401b3c12718451f8919a")
+ version("4.1.7", sha256="0ed87449f74db0abc239ee8c40176e89f9ca6a69738fe751ec0df8fc46da1712")
+ version("4.1.6", sha256="9f146e70311b8ae9d77584f6efc7b30478885cfd095f7bd3937d5b08aec19985")
+ version("4.1.5", sha256="ab425f2e155e9af3332c01177df1776a6a953e721dfe8774eb23733f942b76a0")
+ version("4.1.4", sha256="6b5894bea046273a0d2a5c72204937ad310b2f88cd5d87d10f5ca0aaf1d637da")
+ version("4.1.3", sha256="889f136ddcfec2f8f9401b24ee29ebf74cf055e4e524c54821aba25513c24c03")
+ version("4.1.2", sha256="adbc1d3aefde7649262426d471237dc96f070b93be850a6f15280ed86fd0b952")
+ version("4.0.6", sha256="233be38035dd76f6877b1fd93d308e024e5d4ef5519d289f8e319cd6c58d0bc6")
version("4.0.5", sha256="8f5eefa95f2e94a3b5f9b7f7cbaaed523862f190575ee797113b1e97deff1586")
- version("4.0.4", sha256="003bede870de6d88b705c1a13eabe63b6beb928d8f389f5dd70ca5db8450a1f9")
- version("4.0.3", sha256="b5139a07dbb1f4aa9758c1d62d54e42c01125bcfa9aa0cb9ee4f863afae93db1")
- version("3.8.3", sha256="c3bf27fb6f18e66200e40a0b4c35bc257766e5c1a525dc5725f561879e88bf32")
+ version("4.0.4", sha256="b867d395c344020c04e6630e9bfc10bf126e093df989d5563a2f3a6bc7568224")
+ version("4.0.3", sha256="0d87509ec03584a629a879dccea10cf334f8243004077f6af3745aabb31e7250")
+ version("3.8.3", sha256="a05e40891104e73e1019b193002dea39e5c3177204ea04495716511ddfd639cf")
version("3.7.1", sha256="c83ddd18a380c9414d64ee5de263efc6f7bac5fe362d5b8374170c7f18360378")
version("3.4.1", sha256="77bfec16d6b5eee061fbaa879949dcef4cad28395d6a546b1ae1b9246f142725")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -63,7 +79,6 @@ class Extrae(AutotoolsPackage):
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
depends_on("libdwarf")
- depends_on("papi")
depends_on("elf", type="link")
depends_on("libxml2")
depends_on("numactl")
@@ -75,7 +90,10 @@ class Extrae(AutotoolsPackage):
build_directory = "spack-build"
variant("dyninst", default=False, description="Use dyninst for dynamic code installation")
- depends_on("dyninst@:9", when="+dyninst")
+ with when("+dyninst"):
+ depends_on("dyninst@10.1.0:")
+ depends_on("elfutils", when="@4.1.2:")
+ depends_on("intel-oneapi-tbb", when="@4.1.2:")
variant("papi", default=True, description="Use PAPI to collect performance counters")
depends_on("papi", when="+papi")
@@ -87,9 +105,21 @@ class Extrae(AutotoolsPackage):
depends_on("cuda", when="+cupti")
conflicts("+cupti", when="~cuda", msg="CUPTI requires CUDA")
+ variant(
+ "single-mpi-lib",
+ default=False,
+ description="Enable single MPI instrumentation library that supports both Fortran and C",
+ )
+
+ patch(
+ "dyninst_instruction.patch",
+ when="@:4.0.6 +dyninst",
+ sha256="c1df1627b51b9d0f38711aee50ff11f30ffc34c43e520c39118157e9c31a927e",
+ )
+
def configure_args(self):
spec = self.spec
- if "^intel-oneapi-mpi" in spec:
+ if spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi"):
mpiroot = spec["mpi"].component_prefix
else:
mpiroot = spec["mpi"].prefix
@@ -106,32 +136,42 @@ class Extrae(AutotoolsPackage):
args += (
["--with-papi=%s" % spec["papi"].prefix]
- if "+papi" in self.spec
+ if spec.satisfies("+papi")
else ["--without-papi"]
)
- args += (
- ["--with-dyninst=%s" % spec["dyninst"].prefix]
- if "+dyninst" in self.spec
- else ["--without-dyninst"]
- )
+ if spec.satisfies("+dyninst"):
+ args += ["--with-dyninst={spec['dyninst'].prefix}"]
+
+ if spec.satisfies("@4.1.2:"):
+ args += [
+ f"--with-elfutils={spec['elfutils'].prefix}",
+ f"--with-tbb={spec['tbb'].prefix}",
+ ]
+ else:
+ args += ["--without-dyninst"]
args += (
["--with-cuda=%s" % spec["cuda"].prefix]
- if "+cuda" in self.spec
+ if spec.satisfies("+cuda")
else ["--without-cuda"]
)
- if "+cupti" in self.spec:
+ if spec.satisfies("+cupti"):
cupti_h = find_headers("cupti", spec["cuda"].prefix, recursive=True)
cupti_dir = os.path.dirname(os.path.dirname(cupti_h[0]))
- args += ["--with-cupti=%s" % cupti_dir] if "+cupti" in self.spec else ["--without-cupti"]
+ args += ["--with-cupti=%s" % cupti_dir] if "+cupti" in spec else ["--without-cupti"]
- if spec.satisfies("^dyninst@9.3.0:"):
+ if spec.satisfies("+dyninst"):
make.add_default_arg("CXXFLAGS=%s" % self.compiler.cxx11_flag)
args.append("CXXFLAGS=%s" % self.compiler.cxx11_flag)
+ args.extend(self.enable_or_disable("single-mpi-lib"))
+
+ # Library dir of -lintl as provided by gettext to be independent on the system's libintl
+ args.append(f"LDFLAGS=-L{spec['gettext'].prefix.lib}")
+
return args
def flag_handler(self, name, flags):
@@ -145,6 +185,18 @@ class Extrae(AutotoolsPackage):
flags.append("-lintl")
elif name == "ldflags":
flags.append("-pthread")
+
+ # This is to work around
+ # <https://github.com/bsc-performance-tools/extrae/issues/115>.
+ if self.spec.satisfies("%gcc@14:") and name == "cflags":
+ flags.extend(
+ [
+ "-Wno-error=incompatible-pointer-types",
+ "-Wno-error=implicit-function-declaration",
+ "-Wno-error=int-conversion",
+ ]
+ )
+
return self.build_system_flags(name, flags)
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py
index 41452896fa..fbe1951938 100644
--- a/var/spack/repos/builtin/packages/exuberant-ctags/package.py
+++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class ExuberantCtags(AutotoolsPackage):
"""The canonical ctags generator"""
- homepage = "http://ctags.sourceforge.net"
- url = "http://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz"
+ homepage = "https://ctags.sourceforge.net"
+ url = "https://downloads.sourceforge.net/project/ctags/ctags/5.8/ctags-5.8.tar.gz"
license("GPL-2.0-or-later")
version("5.8", sha256="0e44b45dcabe969e0bbbb11e30c246f81abe5d32012db37395eb57d66e9e99c7")
+ depends_on("c", type="build") # generated
+
patch("ctags-5.8-gcc-unused-attribute.patch", when="@5.8")
diff --git a/var/spack/repos/builtin/packages/eza/package.py b/var/spack/repos/builtin/packages/eza/package.py
index 98e1582ff6..321b4aab22 100644
--- a/var/spack/repos/builtin/packages/eza/package.py
+++ b/var/spack/repos/builtin/packages/eza/package.py
@@ -14,6 +14,23 @@ class Eza(CargoPackage):
maintainers("trws")
- license("MIT")
+ license("EUPL-1.2", when="@0.20:", checked_by="pranav-sivaraman")
+ license("MIT", when="@:0.19", checked_by="pranav-sivaraman")
+ version("0.20.4", sha256="5f25e866521c310d9530b9bbabeb288ad8d9cd208adee79582dde79bdd51c470")
version("0.15.3", sha256="09093e565913104acb7a8eba974f8067c95566b6fbedf31138c9923a8cfde42f")
+
+ depends_on("rust@1.70:", when="@0.15.3:")
+
+ @run_after("install")
+ def install_completions(self):
+ package_completions_path = f"{self.stage.source_path}/completions"
+
+ mkdirp(bash_completion_path(self.prefix))
+ copy(f"{package_completions_path}/bash/eza", bash_completion_path(self.prefix))
+
+ mkdirp(zsh_completion_path(self.prefix))
+ copy(f"{package_completions_path}/zsh/_eza", zsh_completion_path(self.prefix))
+
+ mkdirp(fish_completion_path(self.prefix))
+ copy(f"{package_completions_path}/fish/eza.fish", fish_completion_path(self.prefix))
diff --git a/var/spack/repos/builtin/packages/eztrace/package.py b/var/spack/repos/builtin/packages/eztrace/package.py
index 2a119e960e..7648bbb26a 100644
--- a/var/spack/repos/builtin/packages/eztrace/package.py
+++ b/var/spack/repos/builtin/packages/eztrace/package.py
@@ -3,17 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import autotools, cmake
from spack.package import *
-class Eztrace(Package):
- """EZTrace is a tool to automatically generate execution traces
- of HPC applications."""
+class Eztrace(CMakePackage, AutotoolsPackage, CudaPackage):
+ """EZTrace is a tool to automatically generate execution traces of HPC applications."""
homepage = "https://gitlab.com/eztrace"
- maintainers("trahay")
git = "https://gitlab.com/eztrace/eztrace.git"
+ maintainers("trahay")
license("CECILL-B")
version("master", branch="master")
@@ -22,80 +22,50 @@ class Eztrace(Package):
version("1.1-13", sha256="6144d04fb62b3ccad41af0268cd921161f168d0cca3f6c210c448bb0b07be7e0")
version("1.1-10", sha256="63d1af2db38b04efa817614574f381e7536e12db06a2c75375d1795adda3d1d8")
- # dependencies for eztrace 1.x and 2.x
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("starpu", default=False, description="Enable StarPU support", when="@2.1:")
+ variant("netcdf", default=False, description="Enable NetCDF support", when="@2.1:")
+ variant("pnetcdf", default=False, description="Enable PNetCDF support", when="@2.1:")
+
+ build_system(
+ conditional("cmake", when="@2:"), conditional("autotools", when="@:1"), default="cmake"
+ )
+
depends_on("mpi")
depends_on("opari2")
depends_on("binutils")
+ depends_on("otf2", when="@2:")
- # eztrace 1.x dependencies
- depends_on("autoconf@2.71", type="build", when="@:1")
- depends_on("automake", type="build", when="@:1")
- depends_on("libtool", type="build", when="@:1")
- # Does not work on Darwin due to MAP_POPULATE
- conflicts("platform=darwin", when="@:1")
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
- # eztrace 2.x dependencies
- depends_on("cmake@3.1:", type="build", when="@2.0:")
- depends_on("otf2", when="@2.0:")
+ with when("build_system=cmake"):
+ depends_on("cmake@3.1:", type="build")
- variant("starpu", default=False, description="Enable StarPU support", when="@2.1:")
- depends_on("starpu", when="@2.1:+starpu")
- variant("cuda", default=False, description="Enable CUDA support", when="@2.1:")
- depends_on("cuda", when="@2.1:+cuda")
- variant("netcdf", default=False, description="Enable NetCDF support", when="@2.1:")
- depends_on("netcdf-c", when="@2.1:+netcdf")
- variant("pnetcdf", default=False, description="Enable PNetCDF support", when="@2.1:")
- depends_on("parallel-netcdf", when="@2.1:+pnetcdf")
+ depends_on("starpu", when="+starpu")
+ depends_on("cuda", when="+cuda")
+ depends_on("netcdf-c", when="+netcdf")
+ depends_on("parallel-netcdf", when="+pnetcdf")
- def url_for_version(self, version):
- url = "https://gitlab.com/eztrace/eztrace/-/archive/{0}/eztrace-{1}.tar.gz"
- return url.format(version, version)
+ patch(
+ "https://gitlab.com/eztrace/eztrace/-/commit/3aafa74b12bc2c7e0687f2dbcfc35a699487eb10.diff",
+ sha256="45321b0fd15db84840280c34a91ab877d0ceec6eb825f699f08a7bd135be3d79",
+ when="@:1",
+ )
- @when("@2.0:")
- def install(self, spec, prefix):
- # Since eztrace 2.0, the build system uses CMake
- spec = self.spec
- args = [
- "-DCMAKE_INSTALL_PREFIX=$prefix",
- "-DEZTRACE_ENABLE_MEMORY=ON",
- "-DEZTRACE_ENABLE_MPI=ON",
- "-DEZTRACE_ENABLE_OPENMP=ON",
- "-DEZTRACE_ENABLE_POSIXIO=ON",
- "-DEZTRACE_ENABLE_PTHREAD=ON",
- "-DOTF2_INCLUDE_PATH=%s" % spec["otf2"].prefix.include,
- "-DOTF2_LIBRARY_PATH=%s" % spec["otf2"].libs,
- ]
+ # Does not work on Darwin due to MAP_POPULATE
+ conflicts("platform=darwin", when="@:1")
- if spec.satisfies("@2.1:"):
- if spec.satisfies("%llvm-openmp-ompt"):
- args.extend(["-DEZTRACE_ENABLE_OMPT=ON"])
- if "+starpu" in spec:
- args.extend(["-DEZTRACE_ENABLE_STARPU=ON"])
- if "+cuda" in spec:
- args.extend(["-DEZTRACE_ENABLE_CUDA=ON"])
- if "+netcdf" in spec:
- args.extend(["-DEZTRACE_ENABLE_NETCDF=ON"])
- if "+pnetcdf" in spec:
- args.extend(["-DEZTRACE_ENABLE_PNETCDF=ON"])
-
- args.extend(std_cmake_args)
-
- with working_dir("spack-build", create=True):
- cmake("..", *args)
- make()
- make("install")
-
- # Until eztrace 2.0, the build system uses autoconf
- @when("@:1")
- def install(self, spec, prefix):
- if self.spec.satisfies("%fj"):
- env.set("LDFLAGS", "--linkfortran")
- self.patch()
- which("bash")("bootstrap")
- configure("--prefix=" + prefix, "--with-mpi={0}".format(self.spec["mpi"].prefix))
- self.fix_libtool()
- make()
- make("install")
+ # CUDA support from 2.1
+ conflicts("+cuda", when="@:2.0")
+
+ def url_for_version(self, version):
+ return f"https://gitlab.com/eztrace/eztrace/-/archive/{version}/eztrace-{version}.tar.gz"
@when("@:1")
def patch(self):
@@ -106,9 +76,40 @@ class Eztrace(Package):
string=True,
)
- @when("@:1")
- def fix_libtool(self):
- if self.spec.satisfies("%fj"):
- libtools = ["extlib/gtg/libtool", "extlib/opari2/build-frontend/libtool"]
- for f in libtools:
- filter_file('wl=""', 'wl="-Wl,"', f, string=True)
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ spec = self.spec
+ args = [
+ self.define("EZTRACE_ENABLE_MEMORY", True),
+ self.define("EZTRACE_ENABLE_MPI", True),
+ self.define("EZTRACE_ENABLE_OPENMP", True),
+ self.define("EZTRACE_ENABLE_POSIXIO", True),
+ self.define("EZTRACE_ENABLE_PTHREAD", True),
+ self.define("OTF2_INCLUDE_PATH", spec["otf2"].prefix.include),
+ self.define("OTF2_LIBRARY_PATH", spec["otf2"].libs),
+ ]
+
+ if spec.satisfies("@2.1: %llvm-openmp-ompt"):
+ args.append(self.define("EZTRACE_ENABLE_OMPT", True))
+ if spec.satisfies("+starpu"):
+ args.append(self.define("EZTRACE_ENABLE_STARPU", True))
+ if spec.satisfies("+cuda"):
+ args.append(self.define("EZTRACE_ENABLE_CUDA", True))
+ if spec.satisfies("+netcdf"):
+ args.append(self.define("EZTRACE_ENABLE_NETCDF", True))
+ if spec.satisfies("+pnetcdf"):
+ args.append(self.define("EZTRACE_ENABLE_PNETCDF", True))
+
+ return args
+
+
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
+ def setup_build_environment(self, env):
+ env.set("LDFLAGS", "--linkfortran")
+
+ def autoreconf(self, pkg, spec, prefix):
+ Executable("/bin/sh")("./bootstrap")
+
+ def configure_args(self):
+ return [f"--with-mpi={self.spec['mpi'].prefix}"]
diff --git a/var/spack/repos/builtin/packages/f2c/package.py b/var/spack/repos/builtin/packages/f2c/package.py
index be2d921a1a..6e8bc62d11 100644
--- a/var/spack/repos/builtin/packages/f2c/package.py
+++ b/var/spack/repos/builtin/packages/f2c/package.py
@@ -14,6 +14,8 @@ class F2c(MakefilePackage):
version("master", sha256="d4847456aa91c74e5e61e2097780ca6ac3b20869fae8864bfa8dcc66f6721d35")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
url = "https://www.netlib.org/f2c/src.tgz"
return url
diff --git a/var/spack/repos/builtin/packages/f3d/package.py b/var/spack/repos/builtin/packages/f3d/package.py
index 760cfbbb6f..fee8a91208 100644
--- a/var/spack/repos/builtin/packages/f3d/package.py
+++ b/var/spack/repos/builtin/packages/f3d/package.py
@@ -17,4 +17,6 @@ class F3d(CMakePackage):
version("2.0.0", sha256="5b335de78a9f68903d7023d947090d4b36fa15b9e165749906a82153e0f56d05")
version("1.1.1", sha256="68bdbe3a90f2cd553d5e090a95d3c847e2a2f06abbe225ffecd47d3d29978b0a")
+ depends_on("cxx", type="build") # generated
+
depends_on("vtk@9:", type="link")
diff --git a/var/spack/repos/builtin/packages/f77-zmq/package.py b/var/spack/repos/builtin/packages/f77-zmq/package.py
index 645126b67d..0d180c9338 100644
--- a/var/spack/repos/builtin/packages/f77-zmq/package.py
+++ b/var/spack/repos/builtin/packages/f77-zmq/package.py
@@ -21,6 +21,9 @@ class F77Zmq(MakefilePackage):
version("4.3.2", sha256="f1fb7544d38d9bb7235f98c96f241875ddcb0d37ed950618c23d4e4d666a73ca")
version("4.3.1", sha256="a15d72d93022d3e095528d2808c7767cece974a2dc0e2dd95e4c122f60fcf0a8")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("libzmq")
depends_on("python@3:", type="build", when="@:4.3.1")
depends_on("python", type="build", when="@4.3.2:")
diff --git a/var/spack/repos/builtin/packages/f90cache/package.py b/var/spack/repos/builtin/packages/f90cache/package.py
index 29e3fc0f67..9013fbc1bd 100644
--- a/var/spack/repos/builtin/packages/f90cache/package.py
+++ b/var/spack/repos/builtin/packages/f90cache/package.py
@@ -23,3 +23,5 @@ class F90cache(AutotoolsPackage):
sha256="be3fe77b676bc784dd45b3f65b4a5db34d858ed29156b29d8da38b24585bda7d",
url="http://distfiles.exherbo.org/distfiles/f90cache-0.99.tar.bz2",
)
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fabtests/package.py b/var/spack/repos/builtin/packages/fabtests/package.py
index 4c8aef39d8..041f1be910 100644
--- a/var/spack/repos/builtin/packages/fabtests/package.py
+++ b/var/spack/repos/builtin/packages/fabtests/package.py
@@ -16,7 +16,11 @@ class Fabtests(AutotoolsPackage):
license("GPL-2.0-only")
+ version("1.21.0", sha256="d022a186d37bd6ccb52303e0588c28e29f0f56c25a384c37acb16c881ba99e64")
+ version("1.20.2", sha256="624beb02ffc8e325834545810566330f2a1204d5c6ad015ba095303121cb8ae6")
+ version("1.20.1", sha256="687884b6fd3046f46e2f878e19e76e4506b50950bd2f59a731618b89d02a5436")
version("1.20.0", sha256="61d483452163b39d81dcb9f578e5d9007817e0496235bc2aac1e82b7737fd65e")
+ version("1.19.1", sha256="57b11f2e0e3cd77b104d63f0ecb453161fa8a17bc4f7ca2d7a17a7a34f7fb85c")
version("1.19.0", sha256="82d714020df9258cfdd659c51f2be8f4507cbe157c7f03c992c70fc528d8d837")
version("1.18.2", sha256="3d85486ff80151defdb66414a851a9a9a2d4adc6cf696e2b8e4bb3ce340512c2")
version("1.18.1", sha256="fe9864acc0e17a5b0157b1cc996bb3c578cfa32c87bd43bc17b5e31e24ef63b5")
@@ -37,8 +41,14 @@ class Fabtests(AutotoolsPackage):
version("1.5.0", sha256="1dddd446c3f1df346899f9a8636f1b4265de5b863103ae24876e9f0c1e40a69d")
version("1.4.2", sha256="3b78d0ca1b223ff21b7f5b3627e67e358e3c18b700f86b017e2233fee7e88c2e")
+ depends_on("c", type="build") # generated
+
versions = [
+ "1.21.0",
+ "1.20.2",
+ "1.20.1",
"1.20.0",
+ "1.19.1",
"1.19.0",
"1.18.2",
"1.18.1",
diff --git a/var/spack/repos/builtin/packages/fabulous/package.py b/var/spack/repos/builtin/packages/fabulous/package.py
new file mode 100644
index 0000000000..caa3285b4e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fabulous/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Fabulous(CMakePackage):
+ """FABuLOuS (Fast Accurate Block Linear krylOv Solver)
+ Library implementing Block-GMres with Inexact Breakdown and Deflated Restarting"""
+
+ homepage = "https://gitlab.inria.fr/solverstack/fabulous/"
+ git = "https://gitlab.inria.fr/solverstack/fabulous.git"
+ url = "https://gitlab.inria.fr/api/v4/projects/2083/packages/generic/source/v1.1.3/fabulous-1.1.3.tar.gz"
+ maintainers("fpruvost")
+
+ version("master", branch="master", submodules=True)
+ version("1.1.3", sha256="a75a5461984360286c26b104c1d01ac6cf7c3151bfaa42d8e980eb072981f3ef")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("blasmt", default=False, description="use multi-threaded blas and lapack kernels")
+ variant("examples", default=False, description="build examples and tests")
+
+ depends_on("blas")
+ depends_on("lapack")
+
+ def cmake_args(self):
+ args = [
+ self.define("BUILD_SHARED_LIBS", True),
+ self.define("FABULOUS_BUILD_C_API", True),
+ self.define("FABULOUS_BUILD_Fortran_API", True),
+ self.define("FABULOUS_LAPACKE_NANCHECK", True),
+ self.define("FABULOUS_USE_CHAMELEON", False),
+ self.define_from_variant("FABULOUS_BLASMT", "blasmt"),
+ self.define_from_variant("FABULOUS_BUILD_EXAMPLES", "examples"),
+ self.define_from_variant("FABULOUS_BUILD_TESTS", "examples"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/fairlogger/package.py b/var/spack/repos/builtin/packages/fairlogger/package.py
index 83570639b9..a60fb497a4 100644
--- a/var/spack/repos/builtin/packages/fairlogger/package.py
+++ b/var/spack/repos/builtin/packages/fairlogger/package.py
@@ -81,6 +81,8 @@ class Fairlogger(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
generator("make", "ninja", default="ninja")
variant(
diff --git a/var/spack/repos/builtin/packages/fairmq/package.py b/var/spack/repos/builtin/packages/fairmq/package.py
index bb21f841ca..18e5bcf60a 100644
--- a/var/spack/repos/builtin/packages/fairmq/package.py
+++ b/var/spack/repos/builtin/packages/fairmq/package.py
@@ -26,6 +26,8 @@ class Fairmq(CMakePackage):
version("1.6.0", tag="v1.6.0", commit="42d27af20fb5cbbbc0b0fdfef1c981d51a8baf87")
version("1.5.0", tag="v1.5.0", commit="c8fde17b6a10a467035590fd800bb693f50c4826")
+ depends_on("cxx", type="build") # generated
+
variant(
"autobind", default=True, when="@1.7:", description="Override the channel autoBind default"
)
diff --git a/var/spack/repos/builtin/packages/faiss/package.py b/var/spack/repos/builtin/packages/faiss/package.py
index d67bc55544..ceb57a874e 100644
--- a/var/spack/repos/builtin/packages/faiss/package.py
+++ b/var/spack/repos/builtin/packages/faiss/package.py
@@ -5,6 +5,7 @@
import os
+from spack.build_systems import autotools, cmake, python
from spack.package import *
@@ -30,11 +31,15 @@ class Faiss(AutotoolsPackage, CMakePackage, CudaPackage):
license("MIT")
+ version("1.8.0", sha256="56ece0a419d62eaa11e39022fa27c8ed6d5a9b9eb7416cc5a0fdbeab07ec2f0c")
version("1.7.4", sha256="d9a7b31bf7fd6eb32c10b7ea7ff918160eed5be04fe63bb7b4b4b5f2bbde01ad")
version("1.7.2", sha256="d49b4afd6a7a5b64f260a236ee9b2efb760edb08c33d5ea5610c2f078a5995ec")
version("1.6.3", sha256="e1a41c159f0b896975fbb133e0240a233af5c9286c09a28fde6aefff5336e542")
version("1.5.3", sha256="b24d347b0285d01c2ed663ccc7596cd0ea95071f3dd5ebb573ccfc28f15f043b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Build Python bindings")
variant("shared", default=False, description="Build shared library")
variant("tests", default=False, description="Build Tests")
@@ -42,6 +47,7 @@ class Faiss(AutotoolsPackage, CMakePackage, CudaPackage):
conflicts("+tests", when="~python", msg="+tests must be accompanied by +python")
depends_on("cmake@3.17:", when="build_system=cmake", type="build")
+ depends_on("cmake@3.23.1:", when="build_system=cmake @1.7.4:", type="build")
extends("python", when="+python")
depends_on("python@3.7:", when="+python", type=("build", "run"))
@@ -76,7 +82,7 @@ class Faiss(AutotoolsPackage, CMakePackage, CudaPackage):
patch("fixes-in-v1.7.2.patch", when="@1.7.2")
def setup_run_environment(self, env):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", python_platlib)
if self.spec.satisfies("platform=darwin"):
env.append_path(
@@ -86,7 +92,7 @@ class Faiss(AutotoolsPackage, CMakePackage, CudaPackage):
env.append_path("LD_LIBRARY_PATH", os.path.join(python_platlib, "faiss"))
-class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
spec = self.spec
args = [
@@ -96,11 +102,8 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("BUILD_TESTING", "tests"),
self.define("FAISS_OPT_LEVEL", "generic"),
]
- if "+python" in spec:
- pyexe = spec["python"].command.path
- args.append(self.define("Python_EXECUTABLE", pyexe))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
key = "CMAKE_CUDA_ARCHITECTURES"
args.append(self.define_from_variant(key, "cuda_arch"))
# args.append(self.define_from_variant(
@@ -109,22 +112,21 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def install(self, pkg, spec, prefix):
super().install(pkg, spec, prefix)
- if "+python" in spec:
+ if spec.satisfies("+python"):
- class CustomPythonPipBuilder(spack.build_systems.python.PythonPipBuilder):
+ class CustomPythonPipBuilder(python.PythonPipBuilder):
def __init__(self, pkg, build_dirname):
- spack.build_systems.python.PythonPipBuilder.__init__(self, pkg)
+ python.PythonPipBuilder.__init__(self, pkg)
self.build_dirname = build_dirname
@property
def build_directory(self):
return os.path.join(self.pkg.stage.path, self.build_dirname, "faiss", "python")
- customPip = CustomPythonPipBuilder(pkg, self.build_dirname)
- customPip.install(pkg, spec, prefix)
+ CustomPythonPipBuilder(pkg, self.build_dirname).install(pkg, spec, prefix)
-class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
args = []
args.extend(self.with_or_without("cuda", activation_value="prefix"))
@@ -133,17 +135,17 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def build(self, pkg, spec, prefix):
make()
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
make("-C", "python")
# CPU tests
- if "+tests" in self.spec:
+ if self.spec.satisfies("+tests"):
with working_dir("tests"):
make("gtest")
make("tests")
# GPU tests
- if "+tests+cuda" in self.spec:
+ if self.spec.satisfies("+tests+cuda"):
with working_dir(os.path.join("gpu", "test")):
make("gtest")
make("build") # target added by the patch
@@ -152,10 +154,9 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def install(self, pkg, spec, prefix):
make("install")
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*python.PythonPipBuilder.std_args(pkg), f"--prefix={prefix}", ".")
if "+tests" not in self.spec:
return
@@ -174,7 +175,7 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
_prefix_and_install("TestCpu")
# GPU tests
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
with working_dir(os.path.join("gpu", "test")):
_prefix_and_install("TestGpuIndexFlat")
_prefix_and_install("TestGpuIndexBinaryFlat")
diff --git a/var/spack/repos/builtin/packages/fakechroot/package.py b/var/spack/repos/builtin/packages/fakechroot/package.py
index c74d7597b1..8ffb4b930a 100644
--- a/var/spack/repos/builtin/packages/fakechroot/package.py
+++ b/var/spack/repos/builtin/packages/fakechroot/package.py
@@ -21,3 +21,5 @@ class Fakechroot(AutotoolsPackage):
version("2.20.1", sha256="5abd04323c9ddae06b5dcaa56b2da07728de3fe21007b08bd88a17b2409b32aa")
version("2.20", sha256="5da99358d2a49ddd3dd54ba2ff401d93a8fa641e3754cd058bdf53adb4b7e100")
version("2.19", sha256="39ffbbbe3a823be7450928b8e3b99ae4cb339c47213b2f1d8ff903e0246f2e15")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fakexrandr/package.py b/var/spack/repos/builtin/packages/fakexrandr/package.py
index e314fd3ebd..4f7380281b 100644
--- a/var/spack/repos/builtin/packages/fakexrandr/package.py
+++ b/var/spack/repos/builtin/packages/fakexrandr/package.py
@@ -15,6 +15,8 @@ class Fakexrandr(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("libxrandr")
depends_on("libxinerama")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/falco/package.py b/var/spack/repos/builtin/packages/falco/package.py
index 3b6c4268c8..d61d090123 100644
--- a/var/spack/repos/builtin/packages/falco/package.py
+++ b/var/spack/repos/builtin/packages/falco/package.py
@@ -16,6 +16,8 @@ class Falco(AutotoolsPackage):
version("1.2.1", sha256="33de8aafac45c7aea055ed7ab837d0a39d12dcf782816cea8a6c648acb911057")
+ depends_on("cxx", type="build") # generated
+
variant("htslib", default=False, description="Add support for BAM files")
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/falcon/package.py b/var/spack/repos/builtin/packages/falcon/package.py
index 898e13354a..8df968456f 100644
--- a/var/spack/repos/builtin/packages/falcon/package.py
+++ b/var/spack/repos/builtin/packages/falcon/package.py
@@ -21,6 +21,8 @@ class Falcon(PythonPackage):
version("2017-05-30", commit="86cec6157291679095ea6080b0cde6561eccc041")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="run")
depends_on("py-pypeflow", type="run")
depends_on("py-networkx@1.7:1.10", type=["build", "run"])
diff --git a/var/spack/repos/builtin/packages/fann/package.py b/var/spack/repos/builtin/packages/fann/package.py
index ca48172e31..8ee6368055 100644
--- a/var/spack/repos/builtin/packages/fann/package.py
+++ b/var/spack/repos/builtin/packages/fann/package.py
@@ -26,3 +26,6 @@ class Fann(CMakePackage):
license("LGPL-2.0-or-later")
version("2.2.0", sha256="f31c92c1589996f97d855939b37293478ac03d24b4e1c08ff21e0bd093449c3c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/faodel/package.py b/var/spack/repos/builtin/packages/faodel/package.py
index b4b600d299..8d91fe59b2 100644
--- a/var/spack/repos/builtin/packages/faodel/package.py
+++ b/var/spack/repos/builtin/packages/faodel/package.py
@@ -27,6 +27,9 @@ class Faodel(CMakePackage):
version("1.1811.1", sha256="8e95ee99b8c136ff687eb07a2481ee04560cb1526408eb22ab56cd9c60206916")
version("1.1803.1", sha256="70ce7125c02601e14abe5985243d67adf677ed9e7a4dd6d3eaef8a97cf281a16")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build Faodel as shared libs")
variant("mpi", default=True, description="Enable MPI")
diff --git a/var/spack/repos/builtin/packages/fargparse/package.py b/var/spack/repos/builtin/packages/fargparse/package.py
index 53944f5cf0..bd1e3d5906 100644
--- a/var/spack/repos/builtin/packages/fargparse/package.py
+++ b/var/spack/repos/builtin/packages/fargparse/package.py
@@ -20,6 +20,8 @@ class Fargparse(CMakePackage):
version("develop", branch="develop")
version("main", branch="main")
+ version("1.8.0", sha256="37108bd3c65d892d8c24611ce4d8e5451767e4afe81445fde67eab652178dd01")
+ version("1.7.0", sha256="9889e7eca9c020b742787fba2be0ba16edcc3fcf52929261ccb7d09996a35f89")
version("1.6.0", sha256="055a0af44f50c302f8f20a8bcf3d26c5bbeacf5222cdbaa5b19da4cff56eb9c0")
version("1.5.0", sha256="1c16ead5f1bacb9c2f33aab99a0889c68c1a1ece754ddc3fd340f10a0d5da2f7")
version("1.4.2", sha256="2cd3f14845235407c6a4171ab4602499dade045e3f9b7dc75190f4a315ac8b44")
@@ -29,10 +31,19 @@ class Fargparse(CMakePackage):
version("1.2.0", sha256="4d14584d2bd5406267e3eacd35b50548dd9e408526465e89514690774217da70")
version("1.1.2", sha256="89f63f181ccf183ca6212aee7ed7e39d510e3df938b0b16d487897ac9a61647f")
+ depends_on("fortran", type="build")
+
depends_on("gftl-shared")
depends_on("gftl")
depends_on("cmake@3.12:", type="build")
+ # fargparse only works with the Fujitsu compiler from 1.7.0 onwards
+ conflicts(
+ "%fj",
+ when="@:1.6.0",
+ msg="fargparse only works with the Fujitsu compiler from 1.7.0 onwards",
+ )
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/fast-float/package.py b/var/spack/repos/builtin/packages/fast-float/package.py
new file mode 100644
index 0000000000..00872846e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fast-float/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class FastFloat(CMakePackage):
+ """Fast and exact implementation of the C++ from_chars functions for number
+ types."""
+
+ homepage = "https://github.com/fastfloat/fast_float"
+ url = "https://github.com/fastfloat/fast_float/archive/refs/tags/v6.1.4.tar.gz"
+
+ license("Apache-2.0 OR BSL-1.0 OR MIT", checked_by="pranav-sivararamn")
+
+ version("6.1.6", sha256="4458aae4b0eb55717968edda42987cabf5f7fc737aee8fede87a70035dba9ab0")
+ version("6.1.5", sha256="597126ff5edc3ee59d502c210ded229401a30dafecb96a513135e9719fcad55f")
+ version("6.1.4", sha256="12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704")
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.9:", type="build")
+
+ depends_on("doctest", type="test")
+
+ patch(
+ "https://github.com/fastfloat/fast_float/commit/a7ed4e89c7444b5c8585453fc6d015c0efdf8654.patch?full_index=1",
+ sha256="25561aa7db452da458fb0ae3075ef8e63ccab174ca8f5a6c79fb15cb342b3683",
+ when="@:6.1.5",
+ )
+
+ def cmake_args(self):
+ args = [self.define("FASTFLOAT_TEST", self.run_tests), self.define("SYSTEM_DOCTEST", True)]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/fast-global-file-status/package.py b/var/spack/repos/builtin/packages/fast-global-file-status/package.py
index 916bcab193..cf5ceec344 100644
--- a/var/spack/repos/builtin/packages/fast-global-file-status/package.py
+++ b/var/spack/repos/builtin/packages/fast-global-file-status/package.py
@@ -23,6 +23,9 @@ class FastGlobalFileStatus(AutotoolsPackage):
)
version("1.1", sha256="e6fba4a0b7f055899fa0e05d93a435c7f1f2ec1158b9a6647dc8d2bcf9c2e164")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mrnet")
# we depend on mpa@master for bug fixes since mpa 1.1
depends_on("mount-point-attributes@1.1.1:")
diff --git a/var/spack/repos/builtin/packages/fasta/package.py b/var/spack/repos/builtin/packages/fasta/package.py
index 412fb7b28d..c7c6ae641f 100644
--- a/var/spack/repos/builtin/packages/fasta/package.py
+++ b/var/spack/repos/builtin/packages/fasta/package.py
@@ -28,6 +28,8 @@ class Fasta(MakefilePackage):
url="https://github.com/wrpearson/fasta36/archive/refs/tags/v36.3.8h_04-May-2020.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
# The src tree includes a plethora of variant Makefiles and the
diff --git a/var/spack/repos/builtin/packages/fastani/package.py b/var/spack/repos/builtin/packages/fastani/package.py
index fe8a3ee2d5..9658e3b40e 100644
--- a/var/spack/repos/builtin/packages/fastani/package.py
+++ b/var/spack/repos/builtin/packages/fastani/package.py
@@ -19,6 +19,8 @@ class Fastani(CMakePackage, AutotoolsPackage):
version("1.34", sha256="dc185cf29b9fa40cdcc2c83bb48150db46835e49b9b64a3dbff8bc4d0f631cb1")
version("1.33", sha256="0b18b3074094722fb1b2247c1a1c4eb96295fff369b837f422e05072740e0013")
+ depends_on("cxx", type="build") # generated
+
build_system(conditional("cmake", when="@1.34:"), "autotools", default="cmake")
depends_on("autoconf", type="build", when="build_system=autotools")
diff --git a/var/spack/repos/builtin/packages/fastdb/package.py b/var/spack/repos/builtin/packages/fastdb/package.py
index a99b515fde..38404ad9f1 100644
--- a/var/spack/repos/builtin/packages/fastdb/package.py
+++ b/var/spack/repos/builtin/packages/fastdb/package.py
@@ -16,6 +16,9 @@ class Fastdb(MakefilePackage):
version("3.75", sha256="eeafdb2ad01664c29e2d4053a305493bdedc8e91612ab25f1d36ad2f95b0dad6")
version("3.74", sha256="4d0c9a165a1031860d4853d7084b8fe4627f0004861e6070927d3b6c594af889")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("fastdb-fmax-fmin.patch")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/fastdfs/package.py b/var/spack/repos/builtin/packages/fastdfs/package.py
index 0192f7cc19..954680a11b 100644
--- a/var/spack/repos/builtin/packages/fastdfs/package.py
+++ b/var/spack/repos/builtin/packages/fastdfs/package.py
@@ -27,6 +27,8 @@ class Fastdfs(Package):
version("6.02", sha256="b1801f80da9ebce1d84e7e05356c4614190651cb6a5cb4f5662d9196fe243e21")
version("6.01", sha256="b72f4ff6beb21a83af59aeba9f1904e727fa2c1e960e0a9c2b969138d2804148")
+ depends_on("c", type="build") # generated
+
depends_on("perl", type="build")
depends_on("libfastcommon", type="build")
diff --git a/var/spack/repos/builtin/packages/fastjar/package.py b/var/spack/repos/builtin/packages/fastjar/package.py
index 1a124ff62d..6bc2164d99 100644
--- a/var/spack/repos/builtin/packages/fastjar/package.py
+++ b/var/spack/repos/builtin/packages/fastjar/package.py
@@ -16,4 +16,6 @@ class Fastjar(AutotoolsPackage):
version("0.98", sha256="f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/fastjet/package.py b/var/spack/repos/builtin/packages/fastjet/package.py
index cf484d93aa..c2738a3bbf 100644
--- a/var/spack/repos/builtin/packages/fastjet/package.py
+++ b/var/spack/repos/builtin/packages/fastjet/package.py
@@ -25,6 +25,7 @@ class Fastjet(AutotoolsPackage):
license("GPL-2.0-only")
+ version("3.4.2", sha256="b3d33155b55ce43f420cd6d99b525acf7bdc2593a7bb7ea898a9ddb3d8ca38e3")
version("3.4.1", sha256="05608c6ff213f06dd9de723813d6b4dccd51e661ac13098f74bfc9eeaf1cb5aa")
version("3.4.0", sha256="ee07c8747c8ead86d88de4a9e4e8d1e9e7d7614973f5631ba8297f7a02478b91")
version("3.3.4", sha256="432b51401e1335697c9248519ce3737809808fc1f6d1644bfae948716dddfc03")
@@ -59,21 +60,86 @@ class Fastjet(AutotoolsPackage):
version("2.3.0", sha256="e452fe4a9716627bcdb726cfb0917f46a7ac31f6006330a6ccc1abc43d9c2d53")
# older version use .tar instead of .tar.gz extension, to be added
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="plugins=all")
+ depends_on("fortran", type="build", when="plugins=pxcone")
+
variant("shared", default=True, description="Builds a shared version of the library")
variant("auto-ptr", default=False, description="Use auto_ptr")
+ variant(
+ "thread-safety",
+ default="limited",
+ values=("none", "limited", "full"),
+ multi=False,
+ when="@3.4.0:",
+ description="Enables thread safety",
+ )
variant("atlas", default=False, description="Patch to make random generator thread_local")
+ variant(
+ "cxxstd",
+ default="11",
+ values=("11", "17", "20", "23"),
+ multi=False,
+ description="Use the specified C++ standard when building",
+ )
+
+ available_plugins = (
+ conditional("atlascone", when="@2.4.0:"),
+ conditional("cdfcones", when="@2.1.0:"),
+ conditional("cmsiterativecone", when="@2.4.0:"),
+ conditional("d0runicone", when="@3.0.0:"),
+ conditional("d0runiicone", when="@2.4.0:"),
+ conditional("eecambridge", when="@2.4.0:"),
+ conditional("gridjet", when="@3.0.0:"),
+ conditional("jade", when="@2.4.0:"),
+ conditional("nesteddefs", when="@2.4.0:"),
+ conditional("pxcone", when="@2.1.0:"),
+ conditional("siscone", when="@2.1.0:"),
+ conditional("trackjet", when="@2.4.0:"),
+ )
+ variant(
+ "plugins",
+ values=disjoint_sets(("all",), ("cxx",), available_plugins)
+ .prohibit_empty_set()
+ .with_default("all"),
+ description="List of plugins to enable, or 'cxx' or 'all'",
+ )
+
patch("atlas.patch", when="@:3.3 +atlas", level=0)
patch(
"https://gitlab.cern.ch/sft/lcgcmake/-/raw/23c82f269b8e5df0190e20b7fbe06db16b24d667/externals/patches/fastjet-3.4.1.patch",
sha256="1c7eed1d825f2013116778366a2d27b850c46a2848389174f78829fa24cd1c45",
- when="@3.4: +atlas",
+ when="@3.4:3.4.1 +atlas",
level=0,
)
def configure_args(self):
- extra_args = ["--enable-allplugins"]
+ extra_args = []
+ plugins = self.spec.variants["plugins"].value
+ if "all" in plugins:
+ extra_args += ["--enable-allplugins"]
+ elif "cxx" in plugins:
+ extra_args += ["--enable-allcxxplugins"]
+ else:
+ for plugin in self.available_plugins:
+ # conditional returns an iterable _ConditionalVariantValues
+ for v in plugin:
+ # this version does not support this plugin
+ if not self.spec.satisfies(v.when):
+ continue
+ enabled = v.value in plugins
+ extra_args += [f"--{'enable' if enabled else 'disable'}-{v.value}"]
extra_args += self.enable_or_disable("shared")
extra_args += self.enable_or_disable("auto-ptr")
+ if self.spec.variants["thread-safety"].value == "limited":
+ extra_args += ["--enable-limited-thread-safety"]
+ if self.spec.variants["thread-safety"].value == "full":
+ extra_args += ["--enable-thread-safety"]
return extra_args
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ flags.append(f"-std=c++{self.spec.variants['cxxstd'].value}")
+ return (None, flags, None)
diff --git a/var/spack/repos/builtin/packages/fastjson/package.py b/var/spack/repos/builtin/packages/fastjson/package.py
index 351a78358e..fce4bd2486 100644
--- a/var/spack/repos/builtin/packages/fastjson/package.py
+++ b/var/spack/repos/builtin/packages/fastjson/package.py
@@ -12,10 +12,18 @@ class Fastjson(MavenPackage):
string to an equivalent Java object."""
homepage = "https://github.com/alibaba/fastjson/wiki"
- url = "https://github.com/alibaba/fastjson/archive/1.2.68.tar.gz"
+ url = "https://github.com/alibaba/fastjson2/archive/2.0.52.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("2.0.52", sha256="23c84854da465d8cff4e252bf20ef4b82cf2c7bc57944b9a316fd31a8977d2a1")
+ version("1.2.83", sha256="82fffe7859b1b6630f9a5e9b11c3cc5d043ba91f578d30cd1a60afa369ad448b")
version("1.2.68", sha256="0b3f5308830e5e5abacf9dc8e4115c20153c1cdabec228c3eca48a48c9d5f4d7")
depends_on("java@8", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if version < Version("2"):
+ return f"https://github.com/alibaba/fastjson/archive/{version}.tar.gz"
+ else:
+ return f"https://github.com/alibaba/fastjson2/archive/{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/fastor/package.py b/var/spack/repos/builtin/packages/fastor/package.py
new file mode 100644
index 0000000000..348026f3e3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fastor/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Fastor(CMakePackage):
+ """Fastor is a lightweight high performance tensor algebra framework
+ for modern C++."""
+
+ homepage = "https://github.com/romeric/Fastor"
+ url = "https://github.com/romeric/Fastor/archive/refs/tags/V0.6.4.tar.gz"
+ git = "https://github.com/romeric/Fastor.git"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.6.4", sha256="c97a3b9dbb92413be90689af9d942cddee12a74733cf42f1a8014965553a11f8")
+
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.20:", type="build")
+
+ def cmake_args(self):
+ return [self.define("BUILD_TESTING", self.run_tests)]
diff --git a/var/spack/repos/builtin/packages/fastp/package.py b/var/spack/repos/builtin/packages/fastp/package.py
index 422b0294bd..03ff52e50e 100644
--- a/var/spack/repos/builtin/packages/fastp/package.py
+++ b/var/spack/repos/builtin/packages/fastp/package.py
@@ -19,6 +19,8 @@ class Fastp(MakefilePackage):
version("0.23.3", sha256="a37ee4b5dcf836a5a19baec645657b71d9dcd69ee843998f41f921e9b67350e3")
version("0.20.0", sha256="8d751d2746db11ff233032fc49e3bcc8b53758dd4596fdcf4b4099a4d702ac22")
+ depends_on("cxx", type="build") # generated
+
depends_on("libisal", type=("build", "link"), when="@0.23:")
depends_on("libdeflate", type=("build", "link"), when="@0.23:")
diff --git a/var/spack/repos/builtin/packages/fastqvalidator/package.py b/var/spack/repos/builtin/packages/fastqvalidator/package.py
index 588597d359..07a31ad711 100644
--- a/var/spack/repos/builtin/packages/fastqvalidator/package.py
+++ b/var/spack/repos/builtin/packages/fastqvalidator/package.py
@@ -14,6 +14,8 @@ class Fastqvalidator(MakefilePackage):
version("2017-01-10", commit="6d619a34749e9d33c34ef0d3e0e87324ca77f320")
+ depends_on("cxx", type="build") # generated
+
resource(
name="libStatGen",
git="https://github.com/statgen/libStatGen.git",
diff --git a/var/spack/repos/builtin/packages/fasttext/package.py b/var/spack/repos/builtin/packages/fasttext/package.py
index 3efd1c347d..1fc57b12ab 100644
--- a/var/spack/repos/builtin/packages/fasttext/package.py
+++ b/var/spack/repos/builtin/packages/fasttext/package.py
@@ -19,3 +19,5 @@ class Fasttext(CMakePackage):
version("0.9.1", sha256="254ace2fc8dc3bea0fc6ad4897a221eb85c1e9adfa61d130b43398193ca1f061")
version("0.2.0", sha256="71d24ffec9fcc4364554ecac2b3308d834178c903d16d090aa6be9ea6b8e480c")
version("0.1.0", sha256="d6b4932b18d2c8b3d50905028671aadcd212b7aa31cbc6dd6cac66db2eff1397")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fasttransforms/package.py b/var/spack/repos/builtin/packages/fasttransforms/package.py
index 5c35700bdb..585caec673 100644
--- a/var/spack/repos/builtin/packages/fasttransforms/package.py
+++ b/var/spack/repos/builtin/packages/fasttransforms/package.py
@@ -22,6 +22,8 @@ class Fasttransforms(MakefilePackage):
version("0.5.0", sha256="9556d0037bd5348a33f15ad6100e32053b6e22cab16a97c504f30d6c52fd0efd")
version("0.3.4", sha256="a5c8b5aedbdb40218521d061a7df65ef32ce153d4e19d232957db7e3e63c7e9b")
+ depends_on("c", type="build") # generated
+
variant("quadmath", default=False, description="Support 128-bit floats")
depends_on("blas")
@@ -30,9 +32,9 @@ class Fasttransforms(MakefilePackage):
def build(self, spec, prefix):
makeargs = ["CC=cc"]
- if "openblas" in spec:
+ if spec.satisfies("openblas"):
makeargs += ["FT_BLAS=openblas"]
- if "quadmath" in spec:
+ if spec.satisfies("quadmath"):
makeargs += ["FT_QUADMATH=1"]
make("assembly", *makeargs)
make("lib", *makeargs)
diff --git a/var/spack/repos/builtin/packages/fasttree/package.py b/var/spack/repos/builtin/packages/fasttree/package.py
index 8a766c2977..3d26bbd290 100644
--- a/var/spack/repos/builtin/packages/fasttree/package.py
+++ b/var/spack/repos/builtin/packages/fasttree/package.py
@@ -34,7 +34,7 @@ class Fasttree(Package):
def install(self, spec, prefix):
cc = Executable(spack_cc)
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
cc(
"-O3",
self.compiler.openmp_flag,
@@ -63,5 +63,5 @@ class Fasttree(Package):
@run_after("install")
def create_fasttree_mp_symlink(self):
with working_dir(prefix.bin):
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
symlink("FastTree", "FastTreeMP")
diff --git a/var/spack/repos/builtin/packages/fastx-toolkit/package.py b/var/spack/repos/builtin/packages/fastx-toolkit/package.py
index 651cc94255..3279c83915 100644
--- a/var/spack/repos/builtin/packages/fastx-toolkit/package.py
+++ b/var/spack/repos/builtin/packages/fastx-toolkit/package.py
@@ -17,6 +17,9 @@ class FastxToolkit(AutotoolsPackage):
version("0.0.14", sha256="9e1f00c4c9f286be59ac0e07ddb7504f3b6433c93c5c7941d6e3208306ff5806")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libgtextutils")
# patch implicit fallthrough
diff --git a/var/spack/repos/builtin/packages/faust/package.py b/var/spack/repos/builtin/packages/faust/package.py
index fccda50b4e..4649a9cfc0 100644
--- a/var/spack/repos/builtin/packages/faust/package.py
+++ b/var/spack/repos/builtin/packages/faust/package.py
@@ -16,11 +16,16 @@ class Faust(MakefilePackage):
license("GPL-2.0-or-later")
+ version("2.72.14", sha256="f0c82b7e72b663c29c226e5a56f6c43595b7d02c3d63eca0103cd327df4f33cd")
+ version("2.70.3", sha256="644484f95167fe63014eac3db410f50c58810289fea228a2221e07d27da50eec")
version("2.54.9", sha256="14648f020d77874e6f7411d7ff605820015645bbd4b891b24bee3d3a898e48d2")
version("2.27.2", sha256="3367a868a93b63582bae29ab8783f1df7a10f4084a2bc1d2258ebf3d6a8c31d7")
version("2.27.1", sha256="b3e93ca573025b231931e5eb92efc1a1e7f7720902aa3b285061519600a8c417")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
def install(self, spec, prefix):
- make("PREFIX={0}".format(prefix), "install")
+ make(f"PREFIX={prefix}", "install")
diff --git a/var/spack/repos/builtin/packages/fbgemm/package.py b/var/spack/repos/builtin/packages/fbgemm/package.py
index 39893255ed..e0a6c5cfa0 100644
--- a/var/spack/repos/builtin/packages/fbgemm/package.py
+++ b/var/spack/repos/builtin/packages/fbgemm/package.py
@@ -56,6 +56,9 @@ class Fbgemm(CMakePackage):
"2018-12-04", commit="0d5a159b944252e70a677236b570f291943e0543", submodules=True
) # py-torch@1.0.0
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/fcgi/package.py b/var/spack/repos/builtin/packages/fcgi/package.py
index 0f1f88f870..97f6b46228 100644
--- a/var/spack/repos/builtin/packages/fcgi/package.py
+++ b/var/spack/repos/builtin/packages/fcgi/package.py
@@ -28,4 +28,7 @@ class Fcgi(AutotoolsPackage):
url="https://github.com/FastCGI-Archives/FastCGI.com/raw/master/original_snapshot/fcgi-2.4.1-SNAP-0910052249.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
parallel = False
diff --git a/var/spack/repos/builtin/packages/fckit/package.py b/var/spack/repos/builtin/packages/fckit/package.py
index 517fd302bd..c17f23f293 100644
--- a/var/spack/repos/builtin/packages/fckit/package.py
+++ b/var/spack/repos/builtin/packages/fckit/package.py
@@ -22,11 +22,16 @@ class Fckit(CMakePackage):
version("master", branch="master")
version("develop", branch="develop")
+ version("0.13.2", sha256="990623eb4eb999145f2d852da9fbd71a69e2e0be601c655c274e8382750dfda2")
+ version("0.13.1", sha256="89a067a7b5b1f2c7909739b567bd43b69f8a2d91e8cbcbac58655fb2d861db51")
version("0.11.0", sha256="846f5c369940c0a3d42cd12932f7d6155339e79218d149ebbfdd02e759dc86c5")
version("0.10.1", sha256="9cde04fefa50624bf89068ab793cc2e9437c0cd1c271a41af7d54dbd37c306be")
version("0.10.0", sha256="f16829f63a01cdef5e158ed2a51f6d4200b3fe6dce8f251af158141a1afe482b")
version("0.9.5", sha256="183cd78e66d3283d9e6e8e9888d3145f453690a4509fb701b28d1ac6757db5de")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("python")
depends_on("ecbuild", type=("build"))
@@ -62,11 +67,10 @@ class Fckit(CMakePackage):
args = [
self.define_from_variant("ENABLE_ECKIT", "eckit"),
self.define_from_variant("ENABLE_OMP", "openmp"),
- "-DPYTHON_EXECUTABLE:FILEPATH=" + self.spec["python"].command.path,
"-DFYPP_NO_LINE_NUMBERING=ON",
]
- if "~shared" in self.spec:
+ if self.spec.satisfies("~shared"):
args.append("-DBUILD_SHARED_LIBS=OFF")
if "finalize_ddts=auto" not in self.spec:
@@ -75,7 +79,12 @@ class Fckit(CMakePackage):
# See comment above (conflicts for finalize_ddts)
args.append("-DENABLE_FINAL=OFF")
- if self.spec.satisfies("%intel") or self.spec.satisfies("%gcc"):
+ if (
+ self.spec.satisfies("%intel")
+ or self.spec.satisfies("%oneapi")
+ or self.spec.satisfies("%gcc")
+ or self.spec.satisfies("%nvhpc")
+ ):
cxxlib = "stdc++"
elif self.spec.satisfies("%clang") or self.spec.satisfies("%apple-clang"):
cxxlib = "c++"
diff --git a/var/spack/repos/builtin/packages/fd/package.py b/var/spack/repos/builtin/packages/fd/package.py
index a0b2354072..59bb889fca 100644
--- a/var/spack/repos/builtin/packages/fd/package.py
+++ b/var/spack/repos/builtin/packages/fd/package.py
@@ -6,20 +6,39 @@
from spack.package import *
-class Fd(Package):
+class Fd(CargoPackage):
"""A simple, fast and user-friendly alternative to 'find'"""
homepage = "https://github.com/sharkdp/fd"
url = "https://github.com/sharkdp/fd/archive/refs/tags/v8.4.0.tar.gz"
+ maintainers("alecbcs", "ashermancinelli")
+
+ license("Apache-2.0 OR MIT")
+
+ version("10.2.0", sha256="73329fe24c53f0ca47cd0939256ca5c4644742cb7c14cf4114c8c9871336d342")
+ version("10.1.0", sha256="ee4b2403388344ff60125c79ff25b7895a170e7960f243ba2b5d51d2c3712d97")
+ version("9.0.0", sha256="306d7662994e06e23d25587246fa3fb1f528579e42a84f5128e75feec635a370")
version("8.7.0", sha256="13da15f3197d58a54768aaad0099c80ad2e9756dd1b0c7df68c413ad2d5238c9")
version("8.4.0", sha256="d0c2fc7ddbe74e3fd88bf5bb02e0f69078ee6d2aeea3d8df42f508543c9db05d")
version("7.4.0", sha256="33570ba65e7f8b438746cb92bb9bc4a6030b482a0d50db37c830c4e315877537")
- maintainers("alecbcs", "ashermancinelli")
+ depends_on("rust@1.64:", type="build", when="@8.7:")
+ depends_on("rust@1.70:", type="build", when="@8.7.1:")
+ depends_on("rust@1.77.2:", type="build", when="@10:")
+
+ @run_after("install")
+ def install_completions(self):
+ fd = Executable(self.prefix.bin.fd)
+
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "fd", "w") as file:
+ fd("--gen-completions", "bash", output=file)
- depends_on("rust")
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "fd.fish", "w") as file:
+ fd("--gen-completions", "fish", output=file)
- def install(self, spec, prefix):
- cargo = which("cargo")
- cargo("install", "--root", prefix, "--path", ".")
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_fd", "w") as file:
+ fd("--gen-completions", "zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/fdb/package.py b/var/spack/repos/builtin/packages/fdb/package.py
index 76e693d161..74994b9ff1 100644
--- a/var/spack/repos/builtin/packages/fdb/package.py
+++ b/var/spack/repos/builtin/packages/fdb/package.py
@@ -24,6 +24,9 @@ class Fdb(CMakePackage):
version("5.10.8", sha256="6a0db8f98e13c035098dd6ea2d7559f883664cbf9cba8143749539122ac46099")
version("5.7.8", sha256="6adac23c0d1de54aafb3c663d077b85d0f804724596623b381ff15ea4a835f60")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("tools", default=True, description="Build the command line tools")
variant(
"backends",
@@ -66,6 +69,10 @@ class Fdb(CMakePackage):
when="@5.7.1:5.7.10+tools",
)
+ @property
+ def libs(self):
+ return find_libraries("libfdb5", root=self.prefix, shared=True, recursive=True)
+
def cmake_args(self):
enable_build_tools = "+tools" in self.spec
diff --git a/var/spack/repos/builtin/packages/fds/package.py b/var/spack/repos/builtin/packages/fds/package.py
index 0b08921af1..51c983a09d 100644
--- a/var/spack/repos/builtin/packages/fds/package.py
+++ b/var/spack/repos/builtin/packages/fds/package.py
@@ -21,8 +21,16 @@ class Fds(MakefilePackage):
url = "https://github.com/firemodels/fds/archive/refs/tags/FDS-6.8.0.tar.gz"
git = "https://github.com/firemodels/fds.git"
+ version("6.9.1", commit="889da6ae08d08dae680f7c0d8de66a3ad1c65375")
+ version("6.9.0", commit="63395692607884566fdedb5db4b5b4d98d3bcafb")
version("6.8.0", commit="886e0096535519b7358a3c4393c91da3caee5072")
+ variant("openmp", default=False, description="Enable OpenMP support")
+
+ conflicts("%gcc", when="+openmp", msg="GCC already provides OpenMP support")
+
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("mkl")
@@ -69,7 +77,7 @@ class Fds(MakefilePackage):
def edit(self, spec, prefix):
env["MKL_ROOT"] = self.spec["mkl"].prefix
- if spec.compiler.name == "oneapi":
+ if spec.satisfies("%oneapi"):
env["INTEL_IFORT"] = "ifx"
makefile = FileFilter("Build/makefile")
makefile.filter(r"\.\./Scripts", "./Scripts")
@@ -84,11 +92,12 @@ class Fds(MakefilePackage):
mpi_prefix = mpi_mapping[spec["mpi"].name]
compiler_prefix = compiler_mapping[spec.compiler.name]
platform_prefix = platform_mapping[spec.architecture.platform]
- return ["{}_{}_{}".format(mpi_prefix, compiler_prefix, platform_prefix)]
+ openmp_prefix = "_openmp" if "+openmp" in spec else ""
+ return [f"{mpi_prefix}_{compiler_prefix}_{platform_prefix}{openmp_prefix}"]
def install(self, spec, prefix):
mkdirp(prefix.bin)
with working_dir(self.build_directory):
install("*.mod", prefix.bin)
install("*.o", prefix.bin)
- install("fds_" + self.build_targets[0], prefix.bin + "/fds")
+ install("fds_" + self.build_targets[0], join_path(prefix.bin, "fds"))
diff --git a/var/spack/repos/builtin/packages/fdupes/package.py b/var/spack/repos/builtin/packages/fdupes/package.py
index fcb2010409..80174e0c0c 100644
--- a/var/spack/repos/builtin/packages/fdupes/package.py
+++ b/var/spack/repos/builtin/packages/fdupes/package.py
@@ -20,6 +20,8 @@ class Fdupes(AutotoolsPackage):
version("2.2.1", sha256="846bb79ca3f0157856aa93ed50b49217feb68e1b35226193b6bc578be0c5698d")
version("2.1.2", sha256="cd5cb53b6d898cf20f19b57b81114a5b263cc1149cd0da3104578b083b2837bd")
+ depends_on("c", type="build") # generated
+
variant("ncurses", default=True, description="ncurses support")
depends_on("ncurses", when="+ncurses")
diff --git a/var/spack/repos/builtin/packages/feh/package.py b/var/spack/repos/builtin/packages/feh/package.py
index e41ba4e1bb..5e7c3657a9 100644
--- a/var/spack/repos/builtin/packages/feh/package.py
+++ b/var/spack/repos/builtin/packages/feh/package.py
@@ -25,6 +25,8 @@ class Feh(MakefilePackage):
version("3.3", sha256="f3959958258111d5f7c9fbe2e165c52b9d5987f07fd1f37540a4abf9f9638811")
version("3.1.1", sha256="61d0242e3644cf7c5db74e644f0e8a8d9be49b7bd01034265cc1ebb2b3f9c8eb")
+ depends_on("c", type="build") # generated
+
depends_on("imlib2")
depends_on("curl")
depends_on("libxinerama")
diff --git a/var/spack/repos/builtin/packages/fenics-basix/package.py b/var/spack/repos/builtin/packages/fenics-basix/package.py
index 9fec644fc5..9a154a0567 100644
--- a/var/spack/repos/builtin/packages/fenics-basix/package.py
+++ b/var/spack/repos/builtin/packages/fenics-basix/package.py
@@ -17,45 +17,19 @@ class FenicsBasix(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.9.0", sha256="60e96b2393084729b261cb10370f0e44d12735ab3dbd1f15890dec23b9e85329")
+ version("0.8.0", sha256="b299af82daf8fa3e4845e17f202491fe71b313bf6ab64c767a5287190b3dd7fe")
version("0.7.0", sha256="9bee81b396ee452eec8d9735f278cb44cb6994c6bc30aec8ed9bb4b12d83fa7f")
version("0.6.0", sha256="687ae53153c98facac4080dcdc7081701db1dcea8c5e7ae3feb72aec17f83304")
- version("0.5.1", sha256="69133476ac35f0bd0deccb480676030378c341d7dfb2adaca22cd16b7e1dc1cb")
- version("0.4.2", sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f")
- version(
- "0.3.0",
- sha256="9b148fd2a5485c94011fc6ca977ebdef0e51782a62b3654fc044f35b60e2bd07",
- deprecated=True,
- )
- version(
- "0.2.0",
- sha256="e1ec537737adb283717060221635092474e3f2b5b5ba79dfac74aa496bec2fcb",
- deprecated=True,
- )
- version(
- "0.1.0",
- sha256="2ab41fe6ad4f6c42f01b17a6e7c39debb4e0ae61c334d1caebee78b741bca4e7",
- deprecated=True,
- )
-
- depends_on("cmake@3.19:", type="build")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.21:", when="@0.9:", type="build")
+ depends_on("cmake@3.19:", when="@:0.8", type="build")
depends_on("blas")
depends_on("lapack")
- depends_on("xtensor@0.23.10:", when="@:0.4")
- depends_on("xtl@0.7.2:", when="@:0.4")
- depends_on("xtensor-blas@0.19.1:", when="@:0.3")
-
- conflicts(
- "%gcc@:9.10", when="@0.5.0:", msg="fenics-basix requires GCC-10 or newer for C++20 support"
- )
- conflicts(
- "%clang@:9.10",
- when="@0.5.0:",
- msg="fenics-basix requires Clang-10 or newer for C++20 support",
- )
-
- @property
- def root_cmakelists_dir(self):
- if self.spec.satisfies("@0.4.0:"):
- return "cpp"
- return self.stage.source_path
+ conflicts("%gcc@:9.10", msg="fenics-basix requires GCC-10 or newer for C++20 support")
+ conflicts("%clang@:9.10", msg="fenics-basix requires Clang-10 or newer for C++20 support")
+
+ root_cmakelists_dir = "cpp"
diff --git a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py
index 2e42785450..b252d5a9c9 100644
--- a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py
+++ b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py
@@ -17,22 +17,12 @@ class FenicsDolfinx(CMakePackage):
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("0.9.0", sha256="b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1")
+ version("0.8.0", sha256="acf3104d9ecc0380677a6faf69eabfafc58d0cce43f7777e1307b95701c7cad9")
version("0.7.2", sha256="7d9ce1338ce66580593b376327f23ac464a4ce89ef63c105efc1a38e5eae5c0b")
version("0.6.0", sha256="eb8ac2bb2f032b0d393977993e1ab6b4101a84d54023a67206e3eac1a8d79b80")
- version("0.5.1", sha256="a570e3f6ed8e7c570e7e61d0e6fd44fa9dad2c5f8f1f48a6dc9ad22bacfbc973")
- version("0.5.0", sha256="503c70c01a44d1ffe48e052ca987693a49f8d201877652cabbe2a44eb3b7c040")
- version("0.4.1", sha256="68dcf29a26c750fcea5e02d8d58411e3b054313c3bf6fcbc1d0f08dd2851117f")
-
- conflicts(
- "%gcc@:9.10",
- when="@0.5.0:",
- msg="fenics-dolfinx requires GCC-10 or newer for C++20 support",
- )
- conflicts(
- "%clang@:9.10",
- when="@0.5.0:",
- msg="fenics-dolfinx requires Clang-10 or newer for C++20 support",
- )
+
+ depends_on("cxx", type="build") # generated
# Graph partitioner variants
variant(
@@ -44,52 +34,42 @@ class FenicsDolfinx(CMakePackage):
)
# Graph partitioner dependencies
- depends_on("kahip@3.12:", when="partitioners=kahip @0.5.0:")
- depends_on("kahip@3.11", when="partitioners=kahip @:0.4.1")
+ depends_on("kahip@3.12:", when="partitioners=kahip")
depends_on("parmetis", when="partitioners=parmetis")
depends_on("scotch+mpi", when="partitioners=scotch")
variant("slepc", default=False, description="slepc support")
variant("adios2", default=False, description="adios2 support")
- depends_on("cmake@3.19:", type="build")
+ depends_on("cmake@3.21:", when="@0.9:", type="build")
+ depends_on("cmake@3.19:", when="@:0.8", type="build")
depends_on("pkgconfig", type="build")
depends_on("mpi")
depends_on("hdf5+mpi")
depends_on("boost@1.7.0:+filesystem+program_options+timer")
+ depends_on("pugixml")
+ depends_on("spdlog", when="@0.9:")
depends_on("petsc+mpi+shared")
-
- depends_on("xtensor@0.23.10:", when="@:0.5")
- depends_on("xtl@0.7.2:", when="@:0.5")
-
depends_on("slepc", when="+slepc")
+
+ depends_on("adios2@2.8.1:+mpi", when="@0.9: +adios2")
depends_on("adios2+mpi", when="+adios2")
- depends_on("pugixml", when="@0.5.0:")
depends_on("fenics-ufcx@main", when="@main")
+ depends_on("fenics-ufcx@0.9", when="@0.9")
+ depends_on("fenics-ufcx@0.8", when="@0.8")
depends_on("fenics-ufcx@0.7", when="@0.7")
- depends_on("fenics-ufcx@0.6.0:0.6", when="@0.6.0:0.6")
- depends_on("fenics-ufcx@0.5.0", when="@0.5.1:0.5")
- depends_on("fenics-ufcx@0.4.2", when="@0.4.1")
+ depends_on("fenics-ufcx@0.6", when="@0.6")
depends_on("fenics-basix@main", when="@main")
+ depends_on("fenics-basix@0.9", when="@0.9")
+ depends_on("fenics-basix@0.8", when="@0.8")
depends_on("fenics-basix@0.7", when="@0.7")
- depends_on("fenics-basix@0.6.0:0.6", when="@0.6.0:0.6")
- depends_on("fenics-basix@0.5.1:0.5", when="@0.5.0:0.5")
- depends_on("fenics-basix@0.4.2", when="@0.4.1")
-
- conflicts(
- "%gcc@:9.10",
- when="@0.5.0:",
- msg="fenics-dolfinx requires GCC-10 or newer for C++20 support",
- )
- conflicts(
- "%clang@:9.10",
- when="@0.5.0:",
- msg="fenics-dolfinx requires Clang-10 or newer for C++20 support",
- )
- conflicts("%gcc@:8", msg="fenics-dolfinx requires GCC-9 or newer for improved C++17 support")
+ depends_on("fenics-basix@0.6", when="@0.6")
+
+ conflicts("%gcc@:9.10", msg="fenics-dolfinx requires GCC-10 or newer for C++20 support")
+ conflicts("%clang@:9.10", msg="fenics-dolfinx requires Clang-10 or newer for C++20 support")
root_cmakelists_dir = "cpp"
diff --git a/var/spack/repos/builtin/packages/fenics-ufcx/package.py b/var/spack/repos/builtin/packages/fenics-ufcx/package.py
index 49a9ff54c2..12b9808bef 100644
--- a/var/spack/repos/builtin/packages/fenics-ufcx/package.py
+++ b/var/spack/repos/builtin/packages/fenics-ufcx/package.py
@@ -14,18 +14,15 @@ class FenicsUfcx(CMakePackage):
homepage = "https://github.com/FEniCS/ffcx"
git = "https://github.com/FEniCS/ffcx.git"
url = "https://github.com/FEniCS/ffcx/archive/v0.4.2.tar.gz"
- maintainers("ma595", "jhale")
+ maintainers("ma595", "jhale", "garth-wells", "chrisrichardson")
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("0.9.0", sha256="afa517272a3d2249f513cb711c50b77cf8368dd0b8f5ea4b759142229204a448")
+ version("0.8.0", sha256="8a854782dbd119ec1c23c4522a2134d5281e7f1bd2f37d64489f75da055282e3")
version("0.7.0", sha256="7f3c3ca91d63ce7831d37799cc19d0551bdcd275bdfa4c099711679533dd1c71")
version("0.6.0", sha256="076fad61d406afffd41019ae1abf6da3f76406c035c772abad2156127667980e")
- version(
- "0.5.0.post0", sha256="039908c9998b51ba53e5deb3a97016062c262f0a4285218644304f7d3cd35882"
- )
- version("0.5.0", sha256="3413409e5885e41e220f99e0f95cc817e94c4931143d1f700c6e0c5e1bfad1f6")
- version("0.4.2", sha256="3be6eef064d6ef907245db5b6cc15d4e603762e68b76e53e099935ca91ef1ee4")
depends_on("cmake@3.19:", type="build")
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
index 711d6e3333..cec4412ee6 100644
--- a/var/spack/repos/builtin/packages/fenics/package.py
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
from spack.pkg.builtin.boost import Boost
@@ -18,9 +19,10 @@ class Fenics(CMakePackage):
homepage = "https://fenicsproject.org/"
git = "https://bitbucket.org/fenics-project/dolfin.git"
url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-2019.1.0.post0.tar.gz"
+ maintainers("chrisrichardson", "garth-wells", "jhale")
license("LGPL-3.0-only")
-
+ version("master", branch="master")
version(
"2019.1.0.post0", sha256="61abdcdb13684ba2a3ba4afb7ea6c7907aa0896a46439d3af7e8848483d4392f"
)
@@ -39,6 +41,8 @@ class Fenics(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
dolfin_versions = ["2019.1.0", "2018.1.0", "2017.2.0", "2016.2.0"]
variant("python", default=True, description="Compile with Python interface")
@@ -90,7 +94,9 @@ class Fenics(CMakePackage):
# fenics python package dependencies
for ver in dolfin_versions:
wver = "@" + ver
+
depends_on("py-fenics-fiat{0}".format(wver), type=("build", "run"), when=wver + "+python")
+
if Version(ver) < Version("2018.1.0"):
depends_on(
"py-fenics-instant{0}".format(wver), type=("build", "run"), when=wver + "+python"
@@ -99,11 +105,18 @@ class Fenics(CMakePackage):
depends_on(
"py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver + "+python"
)
+
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver + "+python")
if ver in ["2019.1.0", "2017.2.0"]:
wver = "@" + ver + ".post0"
depends_on("py-fenics-ffc{0}".format(wver), type=("build", "run"), when=wver + "+python")
+ # Adding special case for master
+ depends_on("py-fenics-fiat@2019.1.0", type=("build", "run"), when="@master+python")
+ depends_on("py-fenics-dijitso@master", type=("build", "run"), when="@master+python")
+ depends_on("py-fenics-ufl-legacy@main", type=("build", "run"), when="@master+python")
+ depends_on("py-fenics-ffc@master", type=("build", "run"), when="@master+python")
+
# package dependencies
depends_on("python@3.5:", type=("build", "run"), when="+python")
depends_on("eigen@3.2.0:")
@@ -146,7 +159,7 @@ class Fenics(CMakePackage):
depends_on("py-sphinx@1.0.1:", when="+doc", type="build")
def cmake_args(self):
- args = [
+ return [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("DOLFIN_SKIP_BUILD_TESTS", True),
self.define_from_variant("DOLFIN_ENABLE_OPENMP", "openmp"),
@@ -170,11 +183,6 @@ class Fenics(CMakePackage):
self.define_from_variant("DOLFIN_ENABLE_ZLIB", "zlib"),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
-
- return args
-
# set environment for bulding python interface
def setup_build_environment(self, env):
env.set("DOLFIN_DIR", self.prefix)
@@ -185,7 +193,6 @@ class Fenics(CMakePackage):
# build python interface of dolfin
@run_after("install")
def install_python_interface(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/feq-parse/package.py b/var/spack/repos/builtin/packages/feq-parse/package.py
index f470cab980..fd55780e67 100644
--- a/var/spack/repos/builtin/packages/feq-parse/package.py
+++ b/var/spack/repos/builtin/packages/feq-parse/package.py
@@ -11,19 +11,24 @@ class FeqParse(CMakePackage):
is used to interpret and evaluate functions
provided as strings."""
- homepage = "https://github.com/FluidNumerics/feq-parse"
+ homepage = "https://feqparse.fluidnumerics.com"
url = "https://github.com/FluidNumerics/feq-parse/archive/v2.0.1.tar.gz"
maintainers("fluidnumerics-joe")
- license("Apache-2.0")
+ license("3-Clause BSD")
+ version("2.2.2", sha256="cfbf6142186c2e61b373237dd94d68013c1e8202a2b14dfd7aa6b8befbe330eb")
+ version("2.2.1", sha256="d25f81c0e514cf9fad77190d9edf994b94eaebd414cf639cfaa690a9a1cc9cbf")
+ version("2.2.0", sha256="962fca2de745bc3b436cb2299c917184ce2d9ac5edf95aad3c103efb63ed311a")
version("2.1.0", sha256="f3fd51c24c563fe1d0dcb880bc16a62c9e08fe0cdd6f58df08f0db0ed34c289a")
version("2.0.3", sha256="a1c42507801adc55a63a9a904807058079d54e002e10f2b29a916b06fc815f80")
version("2.0.1", sha256="08dd08bd100a0a2eb672a5b2792ad56a337df575c634aac0d7a300d7e484b21c")
version("1.1.0", sha256="d33a4fd6904939bb70780e8f25f37c1291c4f24fd207feb4ffc0f8d89637d1e3")
version("1.0.2", sha256="1cd1db7562908ea16fc65dc5268b654405d0b3d9dcfe11f409949c431b48a3e8")
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.0.2:", type="build")
parallel = False
diff --git a/var/spack/repos/builtin/packages/fermikit/package.py b/var/spack/repos/builtin/packages/fermikit/package.py
index 9bc92d4a28..583d206818 100644
--- a/var/spack/repos/builtin/packages/fermikit/package.py
+++ b/var/spack/repos/builtin/packages/fermikit/package.py
@@ -15,6 +15,8 @@ class Fermikit(MakefilePackage):
version("2017-11-7", commit="bf9c7112221577ba110665bddca8f1987250bdc7", submodules=True)
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/fermisciencetools/package.py b/var/spack/repos/builtin/packages/fermisciencetools/package.py
index 739bd4c4ea..0198453220 100644
--- a/var/spack/repos/builtin/packages/fermisciencetools/package.py
+++ b/var/spack/repos/builtin/packages/fermisciencetools/package.py
@@ -21,5 +21,9 @@ class Fermisciencetools(Package):
# can figure it out and we can use the source distribution instead.
version("11r5p3", sha256="2f4fc32a0b2e5c0f1ddb220a0560f67e66052b7907c72dba181908dc9269ffe8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def install(self, spec, prefix):
install_tree("x86_64-unknown-linux-gnu-libc2.17", prefix)
diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py
index 1e8fa1e45e..9e9a317b47 100644
--- a/var/spack/repos/builtin/packages/ferret/package.py
+++ b/var/spack/repos/builtin/packages/ferret/package.py
@@ -28,6 +28,9 @@ class Ferret(Package):
version("7.2", sha256="21c339b1bafa6939fc869428d906451f130f7e77e828c532ab9488d51cf43095")
version("6.96", sha256="7eb87156aa586cfe838ab83f08b2102598f9ab62062d540a5da8c9123816331a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("datasets", default=False, description="Install Ferret standard datasets")
depends_on("hdf5+hl")
@@ -63,6 +66,11 @@ class Ferret(Package):
else:
return "https://github.com/NOAA-PMEL/Ferret/archive/v{0}.tar.gz".format(version)
+ def flag_handler(self, name, flags):
+ if name == "fflags" and self.spec.satisfies("%gcc@10:"):
+ flags.extend(["-fallow-argument-mismatch", "-fallow-invalid-boz"])
+ return (flags, None, None)
+
def patch(self):
spec = self.spec
hdf5_prefix = spec["hdf5"].prefix
@@ -72,7 +80,7 @@ class Ferret(Package):
work_dir = "FERRET" if "@:7.2" in spec else "."
with working_dir(work_dir, create=False):
- if "@7.3:" in spec:
+ if spec.satisfies("@7.3:"):
copy("site_specific.mk.in", "site_specific.mk")
copy(
"external_functions/ef_utility/site_specific.mk.in",
@@ -103,7 +111,7 @@ class Ferret(Package):
r"^(NETCDF4?_(LIB)?DIR).+", "\\1 = %s" % netcdff_prefix, "site_specific.mk"
)
- if "@:7.3" in spec:
+ if spec.satisfies("@:7.3"):
# Don't force using the static version of libz
filter_file(
r"\$\(LIBZ_DIR\)/lib64/libz.a", "-lz", "platform_specific.mk.x86_64-linux"
@@ -129,7 +137,7 @@ class Ferret(Package):
# Don't force using the static version of libgfortran
filter_file(r"-static-libgfortran", "", "platform_specific.mk.x86_64-linux")
- if "@:7.4" in spec:
+ if spec.satisfies("@:7.4"):
compilers_spec_file = "platform_specific.mk.x86_64-linux"
else:
compilers_spec_file = "site_specific.mk"
@@ -174,7 +182,7 @@ class Ferret(Package):
make(parallel=False)
make("install")
- if "+datasets" in self.spec:
+ if self.spec.satisfies("+datasets"):
mkdir(self.prefix.fer_dsets)
install_tree("fer_dsets", self.prefix.fer_dsets)
@@ -191,7 +199,7 @@ class Ferret(Package):
fer_descr = ["."]
fer_grids = ["."]
- if "+datasets" in self.spec:
+ if self.spec.satisfies("+datasets"):
env.set("FER_DSETS", self.prefix.fer_dsets)
fer_data.append(self.prefix.fer_dsets.data)
diff --git a/var/spack/repos/builtin/packages/feynhiggs/package.py b/var/spack/repos/builtin/packages/feynhiggs/package.py
index 0a3afb7c10..9e6875dd36 100644
--- a/var/spack/repos/builtin/packages/feynhiggs/package.py
+++ b/var/spack/repos/builtin/packages/feynhiggs/package.py
@@ -22,5 +22,9 @@ class Feynhiggs(AutotoolsPackage):
version("2.18.1", sha256="3aba89cac6397d7e1a8a9d9dcfeed9fb32eeeee98768b0c0c9f444c2cc125ab9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def configure_args(self):
return ["FFLAGS=-fPIC", "CFLAGS=-fPIC"]
diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py
index d12c547da6..e2e55b1e70 100644
--- a/var/spack/repos/builtin/packages/ffmpeg/package.py
+++ b/var/spack/repos/builtin/packages/ffmpeg/package.py
@@ -12,31 +12,44 @@ class Ffmpeg(AutotoolsPackage):
homepage = "https://ffmpeg.org"
url = "https://ffmpeg.org/releases/ffmpeg-4.1.1.tar.bz2"
+ git = "https://git.ffmpeg.org/ffmpeg.git"
maintainers("xjrc")
- license("GPL-2.0-or-later AND LGPL-2.1-or-later")
+ license("LGPL-2.1-or-later", when="~gpl", checked_by="wdconinc")
+ license("LGPL-2.1-or-later AND GPL-2.0-or-later", when="+gpl", checked_by="wdconinc")
+ version("master", branch="master")
+ version("7.0.2", sha256="1ed250407ea8f955cca2f1139da3229fbc13032a0802e4b744be195865ff1541")
+ version("7.0", sha256="a24d9074bf5523a65aaa9e7bd02afe4109ce79d69bd77d104fed3dab4b934d7a")
+ version("6.1.1", sha256="5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20")
version("6.0", sha256="47d062731c9f66a78380e35a19aac77cebceccd1c7cc309b9c82343ffc430c3d")
+ version("5.1.4", sha256="c3c1e316bf91468738dd0aff6eb1faab409f1edcd34fd1a4213626439bc5d743")
version("5.1.3", sha256="5d5bef6a11f0c500588f9870ec965a30acc0d54d8b1e535da6554a32902d236d")
version("5.1.2", sha256="39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b")
+ version("4.4.4", sha256="47b1fbf70a2c090d9c0fae5910da11c6406ca92408bb69d8c935cd46c622c7ce")
version("4.4.1", sha256="8fc9f20ac5ed95115a9e285647add0eedd5cc1a98a039ada14c132452f98ac42")
version("4.3.2", sha256="ab3a6d6a70358ba0a5f67f37f91f6656b7302b02e98e5b8c846c16763c99913a")
version("4.2.2", sha256="b620d187c26f76ca19e74210a0336c3b8380b97730df5cdf45f3e69e89000e5c")
version("4.1.1", sha256="0cb40e3b8acaccd0ecb38aa863f66f0c6e02406246556c2992f67bf650fab058")
version("4.1", sha256="b684fb43244a5c4caae652af9022ed5d85ce15210835bce054a33fb26033a1a5")
+ version("3.4.13", sha256="f640aa6f92323558ee31314b773cf2e935def620474754b929e815f8f1ec933f")
version("3.4.12", sha256="08e400330c70b567116addebd1a70279e0d41b0f8742085e32527f2a4eef9ca3")
version("3.2.19", sha256="87a61fa3b20819b71633aa90b55ee6411614e4a0ff7908cf35236b465de5e602")
version("3.2.4", sha256="c0fa3593a2e9e96ace3c1757900094437ad96d1d6ca19f057c378b5f394496a4")
+ version("2.8.22", sha256="c56534d2862d2690b28875e142e0364ab86d784a22775449f04bf995efbc7064")
version("2.8.21", sha256="782c3af1a1ee8945be0800edc39b1d1199ee6a8f31c74b65230795f11911b0d8")
version("2.8.15", sha256="35647f6c1f6d4a1719bc20b76bf4c26e4ccd665f46b5676c0e91c5a04622ee21")
version("1.0.10", sha256="1dbde434c3b5c573d3b2ffc1babe3814f781c10c4bc66193a4132a44c9715176")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Licensing
variant(
"gpl",
default=True,
- description="allow use of GPL code, the resulting libs " "and binaries will be under GPL",
+ description="allow use of GPL code, the resulting libs and binaries will be under GPL",
)
variant("version3", default=True, description="upgrade (L)GPL to version 3")
variant(
@@ -88,6 +101,8 @@ class Ffmpeg(AutotoolsPackage):
depends_on("yasm@1.2.0:")
depends_on("zlib-api")
+ depends_on("pkgconfig", type="build")
+
depends_on("aom", when="+libaom")
depends_on("bzip2", when="+bzlib")
depends_on("fontconfig", when="+drawtext")
@@ -115,6 +130,13 @@ class Ffmpeg(AutotoolsPackage):
conflicts("%nvhpc")
+ # Solve build failure against vulkan headers 1.3.279
+ patch(
+ "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/fef22c87ada4",
+ sha256="5726e8e999e3fc7a5ae4c4c846c9151246e5846c54dc3b8ff8326ee31c59631a",
+ when="@6.1.1",
+ )
+
# Patch solving a build failure when vulkan is enabled
patch(
"https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/eb0455d64690",
@@ -125,15 +147,26 @@ class Ffmpeg(AutotoolsPackage):
# Patch fixing a build failure with binutils 2.41.0
patch(
"https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/effadce6c756247ea8bae32dc13bb3e6f464f0eb",
- sha256="d1ea47c29968507fee772234bc734d29958b62ab92400801ef28559b538a9168",
- when="@:6.0",
+ sha256="f070ac16be68b4d32b1b5b885d146eb36eb508daa928b6f0f78256c3482f9f0e",
+ when="@6:6.0",
+ )
+ # Patch fixing a build failure with binutils 2.41.0, already in @5.1.4
+ patch(
+ "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/effadce6c756247ea8bae32dc13bb3e6f464f0eb",
+ sha256="f070ac16be68b4d32b1b5b885d146eb36eb508daa928b6f0f78256c3482f9f0e",
+ when="@:5.1.3",
)
# fix incompatibility with texinfo@7, especially @7.1:
patch(
"https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7",
- sha256="416751f41cfbf086c28b4bbf01ace4c08e5651e59911dca6240292bb1b5c6b53",
- when="@5:6.0",
+ sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3",
+ when="@6.0",
+ )
+ patch(
+ "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/f01fdedb69e4accb1d1555106d8f682ff1f1ddc7",
+ sha256="673813d13f5c37b75ff5bcb56790ccd6b16962fdb9bddcbbeeead979d47d31b3",
+ when="@5:5.1.3",
)
@property
@@ -148,7 +181,8 @@ class Ffmpeg(AutotoolsPackage):
@when("@:6.0 %apple-clang@15:")
def setup_build_environment(self, env):
- env.append_flags("LDFLAGS", "-Wl,-ld_classic")
+ if self.spec.satisfies("@:3"):
+ env.append_flags("CFLAGS", "-Wno-error=incompatible-function-pointer-types")
def enable_or_disable_meta(self, variant, options):
switch = "enable" if "+{0}".format(variant) in self.spec else "disable"
diff --git a/var/spack/repos/builtin/packages/ffsb/package.py b/var/spack/repos/builtin/packages/ffsb/package.py
index 7000586d8a..8ca9c3c3ff 100644
--- a/var/spack/repos/builtin/packages/ffsb/package.py
+++ b/var/spack/repos/builtin/packages/ffsb/package.py
@@ -18,3 +18,5 @@ class Ffsb(AutotoolsPackage):
version("5.2.1", sha256="36ccda8ff04f837e20bb8b2cc9edb8c6fc923fdcdbb8060d9448dc49234b968d")
version("5.1.1", sha256="e25aef255d8bfe54f29ac88c7af8237fa5a8c2e1716fdef1946cf0ecd9166d1f")
version("5.1", sha256="4d7da7eba46c824ebdc23b3d32532b006aeb5b6697a3ada314c75785ab25cb97")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ffte/package.py b/var/spack/repos/builtin/packages/ffte/package.py
index 98f870f545..af0a89e94b 100644
--- a/var/spack/repos/builtin/packages/ffte/package.py
+++ b/var/spack/repos/builtin/packages/ffte/package.py
@@ -26,6 +26,8 @@ class Ffte(Package):
version("2.0", sha256="f5cf1d1f880288e359f4d517191980ffca4420f817ecaa2d754ca5c5421271e3")
version("1.0", sha256="35171e3324019018c25575b2807a6513fa85badad040f30f238fff03d4b4d1ab")
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Build MPI library")
variant("cuda", default=False, description="Use CUDA Fortran")
variant("vector", default=False, description="Use vectorized FFT")
@@ -85,7 +87,7 @@ class Ffte(Package):
def install(self, spec, prefix):
self.edit(spec, prefix)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env["CC"] = spec["mpi"].mpicc
env["F77"] = spec["mpi"].mpif77
env["FC"] = spec["mpi"].mpifc
@@ -101,5 +103,5 @@ class Ffte(Package):
make()
mkdirp(prefix.lib)
install("libffte.a", prefix.lib)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
install("mpi/libfftempi.a", prefix.lib)
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 7a4ac28eb7..028248fa93 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -25,6 +25,7 @@ class FftwBase(AutotoolsPackage):
)
variant("openmp", default=False, description="Enable OpenMP support.")
variant("mpi", default=True, description="Activate MPI support")
+ variant("shared", default=True, description="Build shared libraries")
depends_on("mpi", when="+mpi")
depends_on("llvm-openmp", when="%apple-clang +openmp")
@@ -78,7 +79,7 @@ class FftwBase(AutotoolsPackage):
os.rename("fftw/config.h", "fftw/config.h.SPACK_RENAMED")
def autoreconf(self, spec, prefix):
- if "+pfft_patches" in spec:
+ if spec.satisfies("+pfft_patches"):
autoreconf = which("autoreconf")
autoreconf("-ifv")
@@ -104,20 +105,22 @@ class FftwBase(AutotoolsPackage):
def configure(self, spec, prefix):
# Base options
- options = ["--prefix={0}".format(prefix), "--enable-shared", "--enable-threads"]
+ options = ["--prefix={0}".format(prefix), "--enable-threads"]
+ options.extend(self.enable_or_disable("shared"))
+
if not self.compiler.f77 or not self.compiler.fc:
options.append("--disable-fortran")
if spec.satisfies("@:2"):
options.append("--enable-type-prefix")
# Variants that affect every precision
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
options.append("--enable-openmp")
if spec.satisfies("@:2"):
# TODO: libtool strips CFLAGS, so 2.x libxfftw_threads
# isn't linked to the openmp library. Patch Makefile?
options.insert(0, "CFLAGS=" + self.compiler.openmp_flag)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.append("--enable-mpi")
# Specific SIMD support.
@@ -126,12 +129,8 @@ class FftwBase(AutotoolsPackage):
# float only
float_simd_features = ["altivec", "sse", "neon"]
- # Workaround PGI compiler bug when avx2 is enabled
- if spec.satisfies("%pgi") and "avx2" in simd_features:
- simd_features.remove("avx2")
-
# Workaround NVIDIA/PGI compiler bug when avx512 is enabled
- if spec.satisfies("%nvhpc") or spec.satisfies("%pgi"):
+ if spec.satisfies("%nvhpc"):
if "avx512" in simd_features:
simd_features.remove("avx512")
@@ -227,6 +226,9 @@ class Fftw(FftwBase):
version("3.3.4", sha256="8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982")
version("2.1.5", sha256="f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"pfft_patches",
default=False,
@@ -241,7 +243,11 @@ class Fftw(FftwBase):
provides("fftw-api@3", when="@3:")
patch("pfft-3.3.9.patch", when="@3.3.9:+pfft_patches", level=0)
+ patch(
+ "https://github.com/FFTW/fftw3/commit/f69fef7aa546d4477a2a3fd7f13fa8b2f6c54af7.patch?full_index=1",
+ sha256="872cff9a7d346e91a108ffd3540bfcebeb8cf86c7f40f6b31fd07a80267cbf53",
+ when="@3.3.7:",
+ )
patch("pfft-3.3.5.patch", when="@3.3.5:3.3.8+pfft_patches", level=0)
patch("pfft-3.3.4.patch", when="@3.3.4+pfft_patches", level=0)
- patch("pgi-3.3.6-pl2.patch", when="@3.3.6-pl2%pgi", level=0)
patch("intel-configure.patch", when="@3:3.3.8%intel", level=0)
diff --git a/var/spack/repos/builtin/packages/fftw/pfft-3.3.9.patch b/var/spack/repos/builtin/packages/fftw/pfft-3.3.9.patch
index a4f0e6adc6..31108f76af 100644
--- a/var/spack/repos/builtin/packages/fftw/pfft-3.3.9.patch
+++ b/var/spack/repos/builtin/packages/fftw/pfft-3.3.9.patch
@@ -21,6 +21,21 @@
RDFT_SRC = rdft-serial.c rdft-rank-geq2.c rdft-rank-geq2-transposed.c rdft-rank1-bigvec.c rdft-problem.c rdft-solve.c mpi-rdft.h
RDFT2_SRC = rdft2-serial.c rdft2-rank-geq2.c rdft2-rank-geq2-transposed.c rdft2-problem.c rdft2-solve.c mpi-rdft2.h
+--- mpi/mpi-transpose.h
++++ mpi/mpi-transpose.h
+@@ -55,6 +55,11 @@ int XM(mkplans_posttranspose)(const problem_mpi_transpose *p, planner *plnr,
+ R *I, R *O, int my_pe,
+ plan **cld2, plan **cld2rest, plan **cld3,
+ INT *rest_Ioff, INT *rest_Ooff);
++/* transpose-pairwise-transposed.c: */
++int XM(mkplans_pretranspose)(const problem_mpi_transpose *p, planner *plnr,
++ R *I, R *O, int my_pe,
++ plan **cld2, plan **cld2rest, plan **cld3,
++ INT *rest_Ioff, INT *rest_Ooff);
+ /* various solvers */
+ void XM(transpose_pairwise_register)(planner *p);
+ void XM(transpose_alltoall_register)(planner *p);
+
--- mpi/mpi-transpose.h 2020-12-10 12:02:44.000000000 +0000
+++ mpi/mpi-transpose.h 2021-04-06 09:06:12.144841002 +0000
@@ -59,3 +59,5 @@
diff --git a/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch b/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch
deleted file mode 100644
index 1822db1231..0000000000
--- a/var/spack/repos/builtin/packages/fftw/pgi-3.3.6-pl2.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- configure 2017-01-27 16:08:52.000000000 -0500
-+++ configure 2017-05-08 22:34:32.358821182 -0400
-@@ -21744,117 +21744,7 @@
-
- # Various other checks:
- if test "x$acx_pthread_ok" = xyes; then
-- save_LIBS="$LIBS"
-- LIBS="$PTHREAD_LIBS $LIBS"
-- save_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
--
-- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
--$as_echo_n "checking for joinable pthread attribute... " >&6; }
-- attr_name=unknown
-- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <pthread.h>
--#ifdef F77_DUMMY_MAIN
--
--# ifdef __cplusplus
-- extern "C"
--# endif
-- int F77_DUMMY_MAIN() { return 1; }
--
--#endif
--int
--main ()
--{
--int attr=$attr; return attr;
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
-- attr_name=$attr; break
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
-- done
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
--$as_echo "$attr_name" >&6; }
-- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
--
--cat >>confdefs.h <<_ACEOF
--#define PTHREAD_CREATE_JOINABLE $attr_name
--_ACEOF
--
-- fi
--
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
--$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-- flag=no
-- case "${host_cpu}-${host_os}" in
-- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
--$as_echo "${flag}" >&6; }
-- if test "x$flag" != xno; then
-- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-- fi
--
-- LIBS="$save_LIBS"
-- CFLAGS="$save_CFLAGS"
--
-- # More AIX lossage: must compile with xlc_r or cc_r
-- if test x"$GCC" != xyes; then
-- for ac_prog in xlc_r cc_r
--do
-- # Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
--$as_echo_n "checking for $ac_word... " >&6; }
--if ${ac_cv_prog_PTHREAD_CC+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- if test -n "$PTHREAD_CC"; then
-- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
-- IFS=$as_save_IFS
-- test -z "$as_dir" && as_dir=.
-- for ac_exec_ext in '' $ac_executable_extensions; do
-- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-- ac_cv_prog_PTHREAD_CC="$ac_prog"
-- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-- break 2
-- fi
--done
-- done
--IFS=$as_save_IFS
--
--fi
--fi
--PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
--if test -n "$PTHREAD_CC"; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
--$as_echo "$PTHREAD_CC" >&6; }
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--fi
--
--
-- test -n "$PTHREAD_CC" && break
--done
--test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
--
-- else
-- PTHREAD_CC=$CC
-- fi
--else
-- PTHREAD_CC="$CC"
-+ PTHREAD_CC="$CC"
- fi
-
-
diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py
index fa4052cf01..b132231d14 100644
--- a/var/spack/repos/builtin/packages/fftx/package.py
+++ b/var/spack/repos/builtin/packages/fftx/package.py
@@ -30,6 +30,9 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage):
version("1.1.0", sha256="a6f95605abc11460bbf51839727a456a31488e27e12a970fc29a1b8c42f4e3b5")
version("1.0.3", sha256="b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("spiral-software+fftx+simt+jit+mpi")
# depend only on spiral-software, but spiral-software must be installed with variants:
# +fftx +simt +mpi +jit
@@ -41,9 +44,9 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage):
# What config should be built -- driven by spec
spec = self.spec
backend = "CPU"
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
backend = "CUDA"
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
backend = "HIP"
self.build_config = "-D_codegen=%s" % backend
@@ -56,7 +59,7 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
args = ["-DSPIRAL_HOME:STRING={0}".format(spec["spiral-software"].prefix)]
args.append("-DCMAKE_INSTALL_PREFIX:PATH={0}".format(self.prefix))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
args.append(self.build_config)
diff --git a/var/spack/repos/builtin/packages/fgsl/package.py b/var/spack/repos/builtin/packages/fgsl/package.py
index 3f16008ff4..8711d91200 100644
--- a/var/spack/repos/builtin/packages/fgsl/package.py
+++ b/var/spack/repos/builtin/packages/fgsl/package.py
@@ -28,6 +28,9 @@ class Fgsl(AutotoolsPackage):
version("1.2.0", sha256="e5a4ac08eb744c963e95a46a51d76c56593836077c5ad8c47e240cae57027002")
version("1.1.0", sha256="a5adce3c3b279d2dacc05b74c598ff89be7ef3ae3ec59b3ec1355750c1bb4832")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/fiat/package.py b/var/spack/repos/builtin/packages/fiat/package.py
index 488ecf450d..69bc44c324 100644
--- a/var/spack/repos/builtin/packages/fiat/package.py
+++ b/var/spack/repos/builtin/packages/fiat/package.py
@@ -19,10 +19,16 @@ class Fiat(CMakePackage):
license("Apache-2.0")
version("main", branch="main", no_cache=True)
+ version("1.4.1", sha256="7d49316150e59afabd853df0066b457a268731633898ab51f6f244569679c84a")
+ version("1.4.0", sha256="5dc5a8bcac5463690529d0d96d2c805cf9c0214d125cd483ee69d36995ff15d3")
version("1.2.0", sha256="758147410a4a3c493290b87443b4091660b915fcf29f7c4d565c5168ac67745f")
version("1.1.0", sha256="58354e60d29a1b710bfcea9b87a72c0d89c39182cb2c9523ead76a142c695f82")
version("1.0.0", sha256="45afe86117142831fdd61771cf59f31131f2b97f52a2bd04ac5eae9b2ab746b8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
diff --git a/var/spack/repos/builtin/packages/fides/package.py b/var/spack/repos/builtin/packages/fides/package.py
index 6bc6fbb3d6..ca13b06710 100644
--- a/var/spack/repos/builtin/packages/fides/package.py
+++ b/var/spack/repos/builtin/packages/fides/package.py
@@ -19,17 +19,23 @@ class Fides(CMakePackage):
version("1.2.0", sha256="12be939d75c765dab9241f9ed2b64af01cce2b10281de402f64fb685e6ccd7df")
version("1.1.0", sha256="40d2e08b8d5cfdfc809eae6ed2ae0731108ce3b1383485f4934a5ec8aaa9425e")
version("1.0.0", sha256="c355fdb4ca3790c1fa9a4491a0d294b8f883b6946c540ad9e5633c9fd8c8c3aa")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("mpi", default=True, description="build mpi support")
# Certain CMake versions have been found to break for our use cases
depends_on("cmake@3.14.1:3.14,3.18.2:", type="build")
-
depends_on("mpi", when="+mpi")
depends_on("adios2")
- # Type check failures when using 32 bit IDs and ADIOS2 with ZFP in older
- # versions of Fides
- depends_on("adios2~zfp", when="@:1.1 ^vtk-m ~64bitids")
- depends_on("vtk-m")
+ # adios2::Mode::ReadRandomAccess requires adios2 2.8.0.
+ # older adios2 supported in https://gitlab.kitware.com/vtk/fides/-/merge_requests/146
+ depends_on("adios2@2.8:", when="@1.2")
+ depends_on("adios2@2.7:2.8", when="@1.1")
+
+ depends_on("vtk-m@1.9:")
+ # vtk-m 2.0 has a breaking change in cmake target name
+ depends_on("vtk-m@:1.9", when="@:1.1")
# Fix missing implicit includes
@when("%gcc@7:")
diff --git a/var/spack/repos/builtin/packages/figcone/package.py b/var/spack/repos/builtin/packages/figcone/package.py
index deb9d730df..be38b281ed 100644
--- a/var/spack/repos/builtin/packages/figcone/package.py
+++ b/var/spack/repos/builtin/packages/figcone/package.py
@@ -15,4 +15,7 @@ class Figcone(CMakePackage):
license("MS-PL")
+ version("3.0.0", sha256="24ed65c2dabc93b205c3adfdb5d7d0523286a956a0257dc5f15de91c5b828aea")
version("2.4.9", sha256="735399e849621a4923e71a50d5e2ba928d5dfa3b01e54d56e0bac8e5102b7697")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/figlet/package.py b/var/spack/repos/builtin/packages/figlet/package.py
index 2037a2de71..bfefd211f7 100644
--- a/var/spack/repos/builtin/packages/figlet/package.py
+++ b/var/spack/repos/builtin/packages/figlet/package.py
@@ -19,6 +19,8 @@ class Figlet(MakefilePackage):
version("2.2.4", sha256="970a18a2a32cca736ff11a5b77e26a54f31a0e08606b85d21d3d5c666937e03d")
version("2.2.3", sha256="168fa3c7a5888d6f796708780d3006f0e1871d83f32c4a10a84596b90ac35999")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
bins = ["figlet", "chkfont", "figlist", "showfigfonts"]
diff --git a/var/spack/repos/builtin/packages/file/package.py b/var/spack/repos/builtin/packages/file/package.py
index d2bc55cb71..c79acb62b5 100644
--- a/var/spack/repos/builtin/packages/file/package.py
+++ b/var/spack/repos/builtin/packages/file/package.py
@@ -19,6 +19,7 @@ class File(AutotoolsPackage):
license("BSD-2-Clause")
+ version("5.45", sha256="fc97f51029bb0e2c9f4e3bffefdaf678f0e039ee872b9de5c002a6d09c784d82")
version("5.44", sha256="3751c7fba8dbc831cb8d7cc8aff21035459b8ce5155ef8b0880a27d028475f3b")
version("5.43", sha256="8c8015e91ae0e8d0321d94c78239892ef9dbc70c4ade0008c0e95894abfb1991")
version("5.42", sha256="c076fb4d029c74073f15c43361ef572cfb868407d347190ba834af3b1639b0e4")
@@ -28,6 +29,8 @@ class File(AutotoolsPackage):
version("5.38", sha256="593c2ffc2ab349c5aea0f55fedfe4d681737b6b62376a9b3ad1e77b2cc19fa34")
version("5.37", sha256="e9c13967f7dd339a3c241b7710ba093560b9a33013491318e88e6b8b57bae07f")
+ depends_on("c", type="build") # generated
+
executables = ["^file$"]
variant("static", default=True, description="Also build static libraries")
diff --git a/var/spack/repos/builtin/packages/filebench/package.py b/var/spack/repos/builtin/packages/filebench/package.py
index 4b1efcfad3..cc8d23badb 100644
--- a/var/spack/repos/builtin/packages/filebench/package.py
+++ b/var/spack/repos/builtin/packages/filebench/package.py
@@ -26,6 +26,9 @@ class Filebench(AutotoolsPackage):
version("1.4.9.1", sha256="77ae91b83c828ded1219550aec74fbbd6975dce02cb5ab13c3b99ac2154e5c2e")
version("1.4.9", sha256="61b8a838c1450b51a4ce61481a19a1bf0d6e3993180c524ff4051f7c18bd9c6a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/filo/package.py b/var/spack/repos/builtin/packages/filo/package.py
index fc778210cd..ec349a006d 100644
--- a/var/spack/repos/builtin/packages/filo/package.py
+++ b/var/spack/repos/builtin/packages/filo/package.py
@@ -18,6 +18,8 @@ class Filo(CMakePackage):
version("main", branch="main")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("axl")
depends_on("kvtree")
@@ -26,8 +28,6 @@ class Filo(CMakePackage):
def cmake_args(self):
args = []
args.append("-DMPI_C_COMPILER=%s" % self.spec["mpi"].mpicc)
- if self.spec.satisfies("platform=cray"):
- args.append("-DFILO_LINK_STATIC=ON")
args.append("-DWITH_AXL_PREFIX=%s" % self.spec["axl"].prefix)
args.append("-DWITH_KVTREE_PREFIX=%s" % self.spec["kvtree"].prefix)
args.append("-DWITH_SPATH_PREFIX=%s" % self.spec["spath"].prefix)
diff --git a/var/spack/repos/builtin/packages/filtlong/package.py b/var/spack/repos/builtin/packages/filtlong/package.py
index ceb344bec1..06038deda1 100644
--- a/var/spack/repos/builtin/packages/filtlong/package.py
+++ b/var/spack/repos/builtin/packages/filtlong/package.py
@@ -19,6 +19,8 @@ class Filtlong(MakefilePackage):
version("0.2.0", sha256="a4afb925d7ced8d083be12ca58911bb16d5348754e7c2f6431127138338ee02a")
version("0.1.1", sha256="ddae7a5850efeb64424965a443540b1ced34286fbefad9230ab71f4af314081b")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
# %gcc@13: requires std libraries be manually added - add an include for `cstdint`
diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py
index 6ff1decade..92c8640c4a 100644
--- a/var/spack/repos/builtin/packages/findutils/package.py
+++ b/var/spack/repos/builtin/packages/findutils/package.py
@@ -51,6 +51,8 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
version("4.1.20", sha256="8c5dd50a5ca54367fa186f6294b81ec7a365e36d670d9feac62227cb513e63ab")
version("4.1", sha256="487ecc0a6c8c90634a11158f360977e5ce0a9a6701502da6cb96a5a7ec143fac")
+ depends_on("c", type="build") # generated
+
# The NVIDIA compilers do not currently support some GNU builtins.
# Detect this case and use the fallback path.
patch("nvhpc.patch", when="@4.6.0 %nvhpc")
diff --git a/var/spack/repos/builtin/packages/fio/package.py b/var/spack/repos/builtin/packages/fio/package.py
index bfabb65d12..554e8f97c1 100644
--- a/var/spack/repos/builtin/packages/fio/package.py
+++ b/var/spack/repos/builtin/packages/fio/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
from spack.package import *
@@ -21,6 +20,8 @@ class Fio(AutotoolsPackage):
license("GPL-2.0-only")
+ version("3.37", sha256="b59099d42d5c62a8171974e54466a688c8da6720bf74a7f16bf24fb0e51ff92d")
+ version("3.36", sha256="b34b8f3c5cd074c09ea487ffe3f444e95565c214b34a73042f35b00cbaab0e17")
version("3.34", sha256="42ea28c78d269c4cc111b7516213f4d4b32986797a710b0ff364232cc7a3a0b7")
version("3.33", sha256="f48b2547313ffd1799c58c6a170175176131bbd42bc847b5650784eaf6d914b3")
version("3.26", sha256="8bd6987fd9b8c2a75d3923661566ade50b99f61fa4352148975e65577ffa4024")
@@ -33,26 +34,28 @@ class Fio(AutotoolsPackage):
variant("doc", default=False, description="Generate documentation")
variant("libaio", default=False, description="Enable libaio engine")
+ depends_on("c", type="build")
+ depends_on("pkgconfig", type="build")
+ depends_on("zlib-api")
depends_on("gtkplus@2.18:", when="+gui")
depends_on("cairo", when="+gui")
depends_on("libaio", when="+libaio")
-
depends_on("py-sphinx", type="build", when="+doc")
conflicts("+libaio", when="platform=darwin", msg="libaio does not support Darwin")
-
+ conflicts("+libaio", when="platform=windows", msg="libaio does not support Windows")
conflicts("@:3.18", when="%gcc@10:", msg="gcc@10: sets -fno-common by default")
def configure_args(self):
- config_args = []
+ config_args = ["--disable-native"]
- if "+gui" in self.spec:
+ if self.spec.satisfies("+gui"):
config_args.append("--enable-gfio")
return config_args
@run_after("build")
def build_docs(self):
- if "+doc" in self.spec:
+ if self.spec.satisfies("+doc"):
make("-C", "doc", "html")
make("-C", "doc", "man")
diff --git a/var/spack/repos/builtin/packages/fipscheck/package.py b/var/spack/repos/builtin/packages/fipscheck/package.py
index bd8039e9e6..03d86c8201 100644
--- a/var/spack/repos/builtin/packages/fipscheck/package.py
+++ b/var/spack/repos/builtin/packages/fipscheck/package.py
@@ -17,6 +17,8 @@ class Fipscheck(AutotoolsPackage):
version("7.0.0.397", sha256="6bce42faabf372d08b6f8fadb4fa9e65671bebf6c0c91eab8c59ae96b1e7d600")
version("7.0.0.396", sha256="058aafac78f3c0c5b65107686538b09eeb52cbb9b7ede688f3502df7d69c1209")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py
index cca14b84bd..b4359aabaf 100644
--- a/var/spack/repos/builtin/packages/fish/package.py
+++ b/var/spack/repos/builtin/packages/fish/package.py
@@ -22,6 +22,11 @@ class Fish(CMakePackage):
license("GPL-2.0-only")
version("master", branch="master")
+ version("3.7.1", sha256="614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250")
+ version("3.7.0", sha256="df1b7378b714f0690b285ed9e4e58afe270ac98dbc9ca5839589c1afcca33ab1")
+ version("3.6.4", sha256="0f3f610e580de092fbe882c8aa76623ecf91bb16fdf0543241e6e90d5d4bc393")
+ version("3.6.3", sha256="55520128c8ef515908a3821423b430db9258527a6c6acb61c7cb95626b5a48d5")
+ version("3.6.2", sha256="a21a6c986f1f80273895ba7e905fa80ad7e1a262ddb3d979efa443367eaf4863")
version("3.6.1", sha256="55402bb47ca6739d8aba25e41780905b5ce1bce0a5e0dd17dca908b5bc0b49b2")
version("3.6.0", sha256="97044d57773ee7ca15634f693d917ed1c3dc0fa7fde1017f1626d60b83ea6181")
version("3.5.1", sha256="a6d45b3dc5a45dd31772e7f8dfdfecabc063986e8f67d60bd7ca60cc81db6928")
@@ -31,6 +36,8 @@ class Fish(CMakePackage):
version("3.1.0", sha256="e5db1e6839685c56f172e1000c138e290add4aa521f187df4cd79d4eab294368")
version("3.0.0", sha256="ea9dd3614bb0346829ce7319437c6a93e3e1dfde3b7f6a469b543b0d2c68f2cf")
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Build documentation")
# https://github.com/fish-shell/fish-shell#dependencies-1
@@ -73,7 +80,7 @@ class Fish(CMakePackage):
"-DPCRE2_INCLUDE_DIR=" + self.spec["pcre2"].headers.directories[0],
]
- if "+docs" in self.spec:
+ if self.spec.satisfies("+docs"):
args.append("-DBUILD_DOCS=ON")
else:
args.append("-DBUILD_DOCS=OFF")
diff --git a/var/spack/repos/builtin/packages/fixesproto/package.py b/var/spack/repos/builtin/packages/fixesproto/package.py
index 92e7f49470..dd0157bd9d 100644
--- a/var/spack/repos/builtin/packages/fixesproto/package.py
+++ b/var/spack/repos/builtin/packages/fixesproto/package.py
@@ -20,3 +20,4 @@ class Fixesproto(AutotoolsPackage, XorgPackage):
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
+ depends_on("xextproto")
diff --git a/var/spack/repos/builtin/packages/fj/detection_test.yaml b/var/spack/repos/builtin/packages/fj/detection_test.yaml
new file mode 100644
index 0000000000..9159d20d91
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fj/detection_test.yaml
@@ -0,0 +1,27 @@
+paths:
+- layout:
+ - executables:
+ - "bin/fcc"
+ script: |
+ echo "fcc (FCC) 4.0.0a 20190314"
+ echo "simulating gcc version 6.1"
+ echo "Copyright FUJITSU LIMITED 2019"
+ - executables:
+ - "bin/FCC"
+ script: |
+ echo "FCC (FCC) 4.0.0a 20190314"
+ echo "simulating gcc version 6.1"
+ echo "Copyright FUJITSU LIMITED 2019"
+ - executables:
+ - "bin/frt"
+ script: |
+ echo "frt (FRT) 4.0.0a 20190314"
+ echo "Copyright FUJITSU LIMITED 2019"
+ platforms: [linux]
+ results:
+ - spec: fj@4.0.0a
+ extra_attributes:
+ compilers:
+ c: ".*/bin/fcc"
+ cxx: ".*/bin/FCC"
+ fortran: ".*/bin/frt"
diff --git a/var/spack/repos/builtin/packages/fj/package.py b/var/spack/repos/builtin/packages/fj/package.py
index 899f85aa78..9ebcecab2e 100644
--- a/var/spack/repos/builtin/packages/fj/package.py
+++ b/var/spack/repos/builtin/packages/fj/package.py
@@ -2,16 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import re
-
-import llnl.util.tty as tty
-
-import spack.compiler
-import spack.util.executable
from spack.package import *
-class Fj(Package):
+class Fj(Package, CompilerPackage):
"""The Fujitsu compiler system is a high performance, production quality
code generation tool designed for high performance parallel
computing workloads.
@@ -27,29 +21,9 @@ class Fj(Package):
"detected on a system where they are supplied by vendor"
)
- executables = ["^fcc", "^FCC", "^frt"]
-
- @classmethod
- def determine_version(cls, exe):
- version_regex = re.compile(r"\((?:FCC|FRT)\) ([a-z\d.]+)")
- try:
- output = spack.compiler.get_compiler_version_output(exe, "--version")
- match = version_regex.search(output)
- if match:
- return match.group(1)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(e)
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- compilers = {}
- for exe in exes:
- if "fcc" in exe:
- compilers["c"] = exe
- if "FCC" in exe:
- compilers["cxx"] = exe
- if "frt" in exe:
- compilers["fortran"] = exe
- return "", {"compilers": compilers}
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["fcc"]
+ cxx_names = ["FCC"]
+ fortran_names = ["frt"]
+ compiler_version_regex = r"\((?:FCC|FRT)\) ([a-z\d.]+)"
+ compiler_version_argument = "--version"
diff --git a/var/spack/repos/builtin/packages/fjcontrib/package.py b/var/spack/repos/builtin/packages/fjcontrib/package.py
index fa84c9d833..2563359dd9 100644
--- a/var/spack/repos/builtin/packages/fjcontrib/package.py
+++ b/var/spack/repos/builtin/packages/fjcontrib/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from spack.package import *
@@ -18,6 +16,7 @@ class Fjcontrib(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("1.054", sha256="1ef922d4c45863e5fe7a3b64dc441703db6b1c2cc92d4160125dc629b05ac331")
version("1.052", sha256="bde63c28cbdf992bedea4ddedfc3cd52c9fec241a767cc455dd4ad10e8210c39")
version("1.051", sha256="76a2ec612c768db3eb6bbaf686d02b05ddb64dde477d185e20df563b52308473")
version("1.045", sha256="667f15556ca371cfaf185086fb41ac579658a233c18fb1e5153382114f9785f8")
@@ -69,6 +68,8 @@ class Fjcontrib(AutotoolsPackage):
version("0.001", sha256="51f24ad55e28fb1f9d698270602e5077c920fcf58d8ccfd274efbe829d7dd821")
version("0.000", sha256="9486b11201e6b6e181b8a3abecd929403ae9aa67de0eb8b7353fb82ab4b89f41")
+ depends_on("cxx", type="build") # generated
+
depends_on("fastjet")
build_targets = ["all", "fragile-shared"]
@@ -84,9 +85,9 @@ class Fjcontrib(AutotoolsPackage):
def build(self, spec, prefix):
with working_dir(self.build_directory):
for target in self.build_targets:
- inspect.getmodule(self).make(target)
+ make(target)
def install(self, spec, prefix):
with working_dir(self.build_directory):
for target in self.install_targets:
- inspect.getmodule(self).make(target)
+ make(target)
diff --git a/var/spack/repos/builtin/packages/flac/package.py b/var/spack/repos/builtin/packages/flac/package.py
index 8ec66a154d..80b18f1293 100644
--- a/var/spack/repos/builtin/packages/flac/package.py
+++ b/var/spack/repos/builtin/packages/flac/package.py
@@ -14,10 +14,17 @@ class Flac(AutotoolsPackage):
license("BSD-3-Clause AND GPL-2.0-or-later")
+ version("1.4.3", sha256="6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70")
version("1.4.2", sha256="e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4")
+ version("1.4.1", sha256="91303c3e5dfde52c3e94e75976c0ab3ee14ced278ab8f60033a3a12db9209ae6")
+ version("1.4.0", sha256="af41c0733c93c237c3e52f64dd87e3b0d9af38259f1c7d11e8cbf583c48c2506")
+ version("1.3.4", sha256="8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737")
version("1.3.3", sha256="213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748")
version("1.3.2", sha256="91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f")
version("1.3.1", sha256="4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c")
version("1.3.0", sha256="fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libogg@1.1.2:")
diff --git a/var/spack/repos/builtin/packages/flamemaster/package.py b/var/spack/repos/builtin/packages/flamemaster/package.py
index d49eacef59..f6dbf090d4 100644
--- a/var/spack/repos/builtin/packages/flamemaster/package.py
+++ b/var/spack/repos/builtin/packages/flamemaster/package.py
@@ -242,7 +242,7 @@ class Flamemaster(CMakePackage):
args.append("-DEIGEN_INTEGRATION:BOOL=%s" % ("ON" if "+eigen" in spec else "OFF"))
args.append("-DINSTALL_EIGEN:BOOL=%s" % ("ON" if "+eigen" in spec else "OFF"))
- if "^amdlibflame" in spec:
+ if spec.satisfies("[virtuals=lapack] ^amdlibflame"):
args.append("-DBLA_VENDOR=FLAME")
args.append("-DFLAMEMASTER_INSTALL_PREFIX:PATH={0}".format(spec.prefix))
diff --git a/var/spack/repos/builtin/packages/flann/package.py b/var/spack/repos/builtin/packages/flann/package.py
index e915599a39..60521f83b9 100644
--- a/var/spack/repos/builtin/packages/flann/package.py
+++ b/var/spack/repos/builtin/packages/flann/package.py
@@ -30,6 +30,9 @@ class Flann(CMakePackage):
version("1.8.1", sha256="82ff80709ca25365bca3367e87ffb4e0395fab068487314d02271bc3034591c1")
version("1.8.0", sha256="8a3eef79512870dec20b3a3e481e5e5e6da00d524b810a22ee186f13732f0fa1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version > Version("1.8.1"):
return "https://github.com/mariusmuja/flann/archive/{0}.tar.gz".format(version)
@@ -91,7 +94,7 @@ class Flann(CMakePackage):
"src/python/CMakeLists.txt",
)
# Fix the install location so that spack activate works
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
filter_file("share/flann/python", python_platlib, "src/python/CMakeLists.txt")
# Hack. Don't install setup.py
filter_file("install( FILES", "# install( FILES", "src/python/CMakeLists.txt", string=True)
@@ -123,8 +126,4 @@ class Flann(CMakePackage):
use_mpi = "ON" if "+mpi" in spec else "OFF"
args.append("-DUSE_MPI:BOOL={0}".format(use_mpi))
- # Configure the proper python executable
- if "+python" in spec:
- args.append("-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path))
-
return args
diff --git a/var/spack/repos/builtin/packages/flap/package.py b/var/spack/repos/builtin/packages/flap/package.py
index 082ff297e6..fc2d901393 100644
--- a/var/spack/repos/builtin/packages/flap/package.py
+++ b/var/spack/repos/builtin/packages/flap/package.py
@@ -19,6 +19,8 @@ class Flap(CMakePackage):
version("master", branch="master", submodules=True)
+ depends_on("fortran", type="build") # generated
+
def flag_handler(self, name, flags):
if name in ["cflags", "cxxflags", "cppflags"]:
return (None, flags, None)
diff --git a/var/spack/repos/builtin/packages/flash/package.py b/var/spack/repos/builtin/packages/flash/package.py
index 8cd9e98f5a..67ca048eb0 100644
--- a/var/spack/repos/builtin/packages/flash/package.py
+++ b/var/spack/repos/builtin/packages/flash/package.py
@@ -18,6 +18,8 @@ class Flash(MakefilePackage):
version("1.2.11", sha256="685ca6f7fedda07434d8ee03c536f4763385671c4509c5bb48beb3055fd236ac")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/flashdimmsim/package.py b/var/spack/repos/builtin/packages/flashdimmsim/package.py
index 9f2bc1574a..77c6ddb979 100644
--- a/var/spack/repos/builtin/packages/flashdimmsim/package.py
+++ b/var/spack/repos/builtin/packages/flashdimmsim/package.py
@@ -14,6 +14,8 @@ class Flashdimmsim(Package):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
build_directory = "src"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/flatbuffers/package.py b/var/spack/repos/builtin/packages/flatbuffers/package.py
index 7613821016..38ac09ef24 100644
--- a/var/spack/repos/builtin/packages/flatbuffers/package.py
+++ b/var/spack/repos/builtin/packages/flatbuffers/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -14,6 +15,8 @@ class Flatbuffers(CMakePackage):
license("Apache-2.0")
+ version("24.3.25", sha256="4157c5cacdb59737c5d627e47ac26b140e9ee28b1102f812b36068aab728c1ed")
+ version("24.3.7", sha256="bfff9d2150fcff88f844e8c608b02b2a0e94c92aea39b04c0624783464304784")
version("2.0.6", sha256="e2dc24985a85b278dd06313481a9ca051d048f9474e0f199e372fea3ea4248c9")
version("2.0.0", sha256="9ddb9031798f4f8754d00fca2f1a68ecf9d0f83dfac7239af1311e4fd9a565c4")
version("1.12.0", sha256="62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45")
@@ -22,6 +25,8 @@ class Flatbuffers(CMakePackage):
version("1.9.0", sha256="5ca5491e4260cacae30f1a5786d109230db3f3a6e5a0eb45d0d0608293d247e3")
version("1.8.0", sha256="c45029c0a0f1a88d416af143e34de96b3091642722aa2d8c090916c6d1498c2e")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared instead of static libraries")
variant("python", default=False, description="Build with python support")
@@ -52,18 +57,15 @@ class Flatbuffers(CMakePackage):
@run_after("install")
def python_install(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
pydir = join_path(self.stage.source_path, "python")
with working_dir(pydir):
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
def cmake_args(self):
args = []
args.append(self.define_from_variant("FLATBUFFERS_BUILD_SHAREDLIB", "shared"))
- args.append(
- "-DFLATBUFFERS_BUILD_FLATLIB={0}".format("ON" if "+shared" not in self.spec else "OFF")
- )
+ args.append(f"-DFLATBUFFERS_BUILD_FLATLIB={'ON' if '+shared' not in self.spec else 'OFF'}")
if "darwin" in self.spec.architecture:
args.append("-DCMAKE_MACOSX_RPATH=ON")
return args
diff --git a/var/spack/repos/builtin/packages/flatcc/package.py b/var/spack/repos/builtin/packages/flatcc/package.py
index ae0fdd2fca..f9c054a5a6 100644
--- a/var/spack/repos/builtin/packages/flatcc/package.py
+++ b/var/spack/repos/builtin/packages/flatcc/package.py
@@ -21,6 +21,7 @@ class Flatcc(CMakePackage):
license("Apache-2.0")
+ version("0.6.1", sha256="2533c2f1061498499f15acc7e0937dcf35bc68e685d237325124ae0d6c600c2b")
version("0.5.3", sha256="d7519a97569ebdc9d12b162be0f9861fdc2724244f68595264a411ac48e4e983")
version("0.5.2", sha256="02dac93d3daf8d0a290aa8711a9b8a53f047436ec5331adb1972389061ec6615")
version("0.5.1", sha256="8c4560ca32e3c555716d9363bed469e2c60e0f443ec32bc08e7abfe681e25ca9")
@@ -30,6 +31,9 @@ class Flatcc(CMakePackage):
version("0.4.1", sha256="de9f668e5555b24c0885f8dc4f4098cc8065c1f428f8209097624035aee487df")
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libs")
depends_on("cmake@2.8:", type="build")
@@ -42,7 +46,7 @@ class Flatcc(CMakePackage):
# allow flatcc to be built with more compilers
args.append("-DFLATCC_ALLOW_WERROR=OFF")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
args.append("-DFLATCC_INSTALL=ON")
else:
diff --git a/var/spack/repos/builtin/packages/flcl/package.py b/var/spack/repos/builtin/packages/flcl/package.py
index dad907c1f7..be0e0b514d 100644
--- a/var/spack/repos/builtin/packages/flcl/package.py
+++ b/var/spack/repos/builtin/packages/flcl/package.py
@@ -23,6 +23,9 @@ class Flcl(CMakePackage):
version("0.4.0", sha256="0fe327906a991262866b126a7d58098eb48297148f117fd59a2dbcc14e76f394")
version("0.3", sha256="fc18c8fa3ae33db61203b647ad9025d894612b0faaf7fe07426aaa8bbfa9e703")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("kokkos")
depends_on("cmake@3.17:", type="build", when="@:0.4.0")
depends_on("cmake@3.19:", type="build", when="@0.5.0:")
diff --git a/var/spack/repos/builtin/packages/flecsale/package.py b/var/spack/repos/builtin/packages/flecsale/package.py
deleted file mode 100644
index ef09c6a29f..0000000000
--- a/var/spack/repos/builtin/packages/flecsale/package.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2013-2024 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.package import *
-from spack.pkg.builtin.boost import Boost
-
-
-class Flecsale(CMakePackage):
- """Flecsale is an ALE code based on FleCSI"""
-
- homepage = "https://github.com/laristra/flecsale"
- git = "https://github.com/laristra/flecsale.git"
-
- license("Unlicense")
-
- version("develop", branch="master", submodules=True)
-
- variant("mpi", default=True, description="Build on top of mpi conduit for mpi inoperability")
-
- depends_on("pkgconfig", type="build")
- depends_on("cmake@3.1:", type="build")
- depends_on("flecsi backend=serial", when="~mpi")
- conflicts("^flecsi backend=serial", when="+mpi")
- depends_on("python")
- depends_on("openssl")
- depends_on("boost~mpi", when="~mpi")
- depends_on("boost+mpi", when="+mpi")
-
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants)
- depends_on("exodusii~mpi", when="~mpi")
- depends_on("exodusii+mpi", when="+mpi")
-
- def cmake_args(self):
- options = ["-DENABLE_UNIT_TESTS=ON" "-DENABLE_OPENSSL=ON" "-DENABLE_PYTHON=ON"]
-
- if "+mpi" in self.spec:
- options.extend(["-DENABLE_MPI=ON", "-DFLECSI_RUNTIME_MODEL=legion"])
-
- return options
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py
index 47b01d1487..517f57b0a7 100644
--- a/var/spack/repos/builtin/packages/flecsi/package.py
+++ b/var/spack/repos/builtin/packages/flecsi/package.py
@@ -17,25 +17,21 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
homepage = "http://flecsi.org/"
git = "https://github.com/flecsi/flecsi.git"
- maintainers("ktsai7", "rbberger")
+ maintainers("rbberger", "opensdh")
tags = ["e4s"]
- version("develop", branch="develop")
- version(
- "2.2.1", tag="v2.2.1", commit="84b5b232aebab40610f57387778db80f6c8c84c5", preferred=True
- )
+ version("develop", branch="develop", deprecated=True)
+ version("2.3.0", tag="v2.3.0", commit="90bc8267fceb02060e54646f73b45d4252aef491")
+ version("2.2.1", tag="v2.2.1", commit="84b5b232aebab40610f57387778db80f6c8c84c5")
version("2.2.0", tag="v2.2.0", commit="dd531ac16c5df124d76e385c6ebe9b9589c2d3ad")
version("2.1.0", tag="v2.1.0", commit="533df139c267e2a93c268dfe68f9aec55de11cf0")
version("2.0.0", tag="v2.0.0", commit="5ceebadf75d1c98999ea9e9446926722d061ec22")
- version(
- "1.4.1", tag="v1.4.1", commit="ab974c3164056e6c406917c8ca771ffd43c5a031", submodules=True
- )
variant(
"backend",
default="mpi",
- values=("serial", "mpi", "legion", "hpx", "charmpp"),
+ values=("mpi", "legion", "hpx"),
description="Backend to use for distributed memory",
multi=False,
)
@@ -54,24 +50,12 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
variant("kokkos", default=False, description="Enable Kokkos Support")
variant("openmp", default=False, description="Enable OpenMP Support")
- # legacy variants
- variant("coverage", default=False, description="Enable coverage build", when="@:1")
- variant(
- "debug_backend", default=False, description="Build Backend with Debug Mode", when="@:1"
- )
- variant("disable_metis", default=False, description="Disable FindPackageMetis", when="@:1")
- variant("doxygen", default=False, description="Enable doxygen", when="@:1")
- variant("tutorial", default=False, description="Build FleCSI Tutorials", when="@:1")
- variant("flecstan", default=False, description="Build FleCSI Static Analyzer", when="@:1")
- variant("external_cinch", default=False, description="Enable External Cinch", when="@:1")
- variant("unit_tests", default=False, description="Build with Unit Tests Enabled", when="@:1")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
# All Current FleCSI Releases
for level in ("low", "medium", "high"):
- depends_on("caliper@2.0.1~adiak~libdw", when="@:1 caliper_detail=%s" % level)
- depends_on("caliper", when="@2.0: caliper_detail=%s" % level)
- conflicts("^caliper@2.6", when="@2.0: caliper_detail=%s" % level)
- conflicts("^caliper@2.7", when="@2.0: caliper_detail=%s" % level)
+ depends_on("caliper@:2.5,2.8:", when=f"caliper_detail={level}")
depends_on("graphviz", when="+graphviz")
depends_on("hdf5+hl+mpi", when="+hdf5")
@@ -79,90 +63,56 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
depends_on("parmetis@4.0.3:")
depends_on("boost@1.70.0: cxxstd=17 +program_options +stacktrace")
- # FleCSI@1.x
- depends_on("cmake@3.12:", when="@:1")
- # Requires cinch > 1.0 due to cinchlog installation issue
- depends_on("cinch@1.01:", type="build", when="+external_cinch @:1")
- depends_on("mpi", when="backend=mpi @:1")
- depends_on("mpi", when="backend=legion @:1")
- depends_on("mpi", when="backend=hpx @:1")
- depends_on("legion+shared", when="backend=legion @:1")
- depends_on("legion+hdf5", when="backend=legion +hdf5 @:1")
- depends_on("legion build_type=Debug", when="backend=legion +debug_backend")
- depends_on("legion@cr", when="backend=legion @:1")
- depends_on("hpx@1.4.1 cxxstd=17 malloc=system max_cpu_count=128", when="backend=hpx @:1")
- depends_on("hpx build_type=Debug", when="backend=hpx +debug_backend")
- depends_on("googletest@1.8.1+gmock", when="@:1")
- depends_on("python@3.0:", when="+tutorial @:1")
- depends_on("doxygen", when="+doxygen @:1")
- depends_on("llvm", when="+flecstan @:1")
- depends_on("pfunit@3.0:3", when="@:1")
- depends_on("py-gcovr", when="+coverage @:1")
- depends_on("openmpi+legacylaunchers", when="+unit_tests ^openmpi")
-
- # FleCSI@2.x
- depends_on("cmake@3.15:", when="@2.0:")
+ depends_on("cmake@3.15:")
depends_on("cmake@3.19:", when="@2.2:")
- depends_on("boost +atomic +filesystem +regex +system", when="@2.0:2.2.1")
+ depends_on("cmake@3.23:", when="@2.3:")
+ depends_on("boost +atomic +filesystem +regex +system", when="@:2.2.1")
depends_on("boost@1.79.0:", when="@2.2:")
- depends_on("kokkos@3.2.00:", when="+kokkos @2.0:")
- depends_on("kokkos +cuda +cuda_constexpr +cuda_lambda", when="+kokkos +cuda @2.0:")
- depends_on("kokkos +rocm", when="+kokkos +rocm @2.0:")
- depends_on("kokkos +openmp", when="+kokkos +openmp @2.0:")
- depends_on("legion@cr", when="backend=legion @2.0:")
- depends_on("legion+shared", when="backend=legion +shared @2.0:")
- depends_on("legion+hdf5", when="backend=legion +hdf5 @2.0:")
- depends_on("legion+kokkos", when="backend=legion +kokkos @2.0:")
- depends_on("legion+openmp", when="backend=legion +openmp @2.0:")
- depends_on("legion+cuda", when="backend=legion +cuda @2.0:")
- depends_on("legion+rocm", when="backend=legion +rocm @2.0:")
- depends_on("hdf5@1.10.7:", when="backend=legion +hdf5 @2.0:")
- depends_on("hpx@1.9.1: cxxstd=17 malloc=system", when="backend=hpx @2.0:")
- depends_on("mpi", when="@2.0:")
- depends_on("mpich@3.4.1:", when="@2.0: ^mpich")
- depends_on("openmpi@4.1.0:", when="@2.0: ^openmpi")
+ depends_on("kokkos@3.2.00:", when="+kokkos")
+ depends_on("kokkos@3.7:", when="+kokkos @2.3:")
+ depends_on("kokkos +cuda +cuda_constexpr +cuda_lambda", when="+kokkos +cuda")
+ depends_on("kokkos +rocm", when="+kokkos +rocm")
+ depends_on("kokkos +openmp", when="+kokkos +openmp")
+ depends_on("legion@cr-20210122", when="backend=legion @2.0:2.2.1")
+ depends_on("legion@cr-20230307", when="backend=legion @2.2.0:2.2.1")
+ depends_on("legion@24.03.0:", when="backend=legion @2.2.2:")
+ depends_on("legion+shared", when="backend=legion +shared")
+ depends_on("legion+hdf5", when="backend=legion +hdf5")
+ depends_on("legion+kokkos", when="backend=legion +kokkos")
+ depends_on("legion+openmp", when="backend=legion +openmp")
+ depends_on("legion+cuda", when="backend=legion +cuda")
+ depends_on("legion+rocm", when="backend=legion +rocm")
+ depends_on("hdf5@1.10.7:", when="backend=legion +hdf5")
+ depends_on("hpx@1.10.0: cxxstd=17 malloc=system", when="backend=hpx")
+ depends_on("mpi")
+ depends_on("mpich@3.4.1:", when="^[virtuals=mpi] mpich")
+ depends_on("openmpi@4.1.0:", when="^[virtuals=mpi] openmpi")
+ depends_on("graphviz@2.49.0:", when="+graphviz @2.3:")
# FleCSI 2.2+ documentation dependencies
depends_on("py-sphinx", when="+doc")
depends_on("py-sphinx-rtd-theme", when="+doc")
- depends_on("py-recommonmark", when="+doc")
+ depends_on("py-recommonmark", when="@:2.2 +doc")
depends_on("doxygen", when="+doc")
depends_on("graphviz", when="+doc")
# Propagate cuda_arch requirement to dependencies
for _flag in CudaPackage.cuda_arch_values:
- depends_on("kokkos cuda_arch=" + _flag, when="+cuda+kokkos cuda_arch=" + _flag + " @2.0:")
- depends_on(
- "legion cuda_arch=" + _flag, when="backend=legion +cuda cuda_arch=" + _flag + " @2.0:"
- )
+ depends_on(f"kokkos cuda_arch={_flag}", when=f"+cuda+kokkos cuda_arch={_flag}")
+ depends_on(f"legion cuda_arch={_flag}", when=f"backend=legion +cuda cuda_arch={_flag}")
# Propagate amdgpu_target requirement to dependencies
for _flag in ROCmPackage.amdgpu_targets:
- depends_on("kokkos amdgpu_target=" + _flag, when="+kokkos +rocm amdgpu_target=" + _flag)
+ depends_on(f"kokkos amdgpu_target={_flag}", when=f"+kokkos +rocm amdgpu_target={_flag}")
depends_on(
- "legion amdgpu_target=" + _flag,
- when="backend=legion +rocm amdgpu_target=" + _flag + " @2.0:",
+ f"legion amdgpu_target={_flag}", when=f"backend=legion +rocm amdgpu_target={_flag}"
)
- requires("%gcc@9:", when="@2: %gcc", msg="Version 9 or newer of GNU compilers required!")
-
- conflicts("+tutorial", when="backend=hpx")
- # FleCSI@2: no longer supports serial or charmpp backends
- conflicts("backend=serial", when="@2.0:")
- conflicts("backend=charmpp", when="@2.0:")
- # FleCSI@:1.4 releases do not support kokkos, omp, cuda, or rocm
- conflicts("+kokkos", when="@:1.4")
- conflicts("+openmp", when="@:1.4")
- conflicts("+cuda", when="@:1.4")
- conflicts("+rocm", when="@:1.4")
- # Unit tests require flog support
- conflicts("+unit_tests", when="~flog")
+ requires("%gcc@9:", when="%gcc", msg="Version 9 or newer of GNU compilers required!")
+
# Disallow conduit=none when using legion as a backend
conflicts("^legion conduit=none", when="backend=legion")
- # Due to overhauls of Legion and Gasnet spackages
- # flecsi@:1.4 can no longer be built with a usable legion
- conflicts("backend=legion", when="@:1.4")
- conflicts("+hdf5", when="@2: backend=hpx", msg="HPX backend doesn't support HDF5")
+ conflicts("+hdf5", when="backend=hpx", msg="HPX backend doesn't support HDF5")
def cmake_args(self):
spec = self.spec
@@ -173,9 +123,7 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("CALIPER_DETAIL", "caliper_detail"),
self.define_from_variant("ENABLE_FLOG", "flog"),
self.define_from_variant("ENABLE_GRAPHVIZ", "graphviz"),
- self.define(
- "ENABLE_HDF5", "+hdf5" in spec and spec.variants["backend"].value != "hpx"
- ),
+ self.define_from_variant("ENABLE_HDF5", "hdf5"),
self.define_from_variant("ENABLE_KOKKOS", "kokkos"),
self.define_from_variant("ENABLE_OPENMP", "openmp"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
@@ -183,13 +131,13 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("ENABLE_DOCUMENTATION", "doc"),
]
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
options.append(self.define("CMAKE_C_COMPILER", self.spec["hip"].hipcc))
- if "backend=legion" in self.spec:
+ if self.spec.satisfies("backend=legion"):
# CMake pulled in via find_package(Legion) won't work without this
options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
- elif "+kokkos" in self.spec:
+ elif self.spec.satisfies("+kokkos"):
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["kokkos"].kokkos_cxx))
else:
# kept for supporing version prior to 2.2
@@ -200,31 +148,14 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("ENABLE_GRAPHVIZ", "graphviz"),
self.define_from_variant("ENABLE_KOKKOS", "kokkos"),
self.define_from_variant("ENABLE_OPENMP", "openmp"),
- self.define_from_variant("ENABLE_DOXYGEN", "doxygen"),
- self.define_from_variant("ENABLE_COVERAGE_BUILD", "coverage"),
+ self.define_from_variant("ENABLE_DOXYGEN", "doc"),
self.define_from_variant("ENABLE_FLOG", "flog"),
- self.define_from_variant("ENABLE_FLECSIT", "tutorial"),
- self.define_from_variant("ENABLE_FLECSI_TUTORIAL", "tutorial"),
- self.define_from_variant("ENABLE_FLECSTAN", "flecstan"),
- self.define("ENABLE_MPI", spec.variants["backend"].value != "serial"),
- self.define("ENABLE_UNIT_TESTS", self.run_tests or "+unit_tests" in spec),
- self.define(
- "ENABLE_HDF5", "+hdf5" in spec and spec.variants["backend"].value != "hpx"
- ),
+ self.define("ENABLE_MPI", True),
+ self.define("ENABLE_UNIT_TESTS", self.run_tests),
+ self.define_from_variant("ENABLE_HDF5", "hdf5"),
]
- if "+external_cinch" in spec:
- options.append(self.define("CINCH_SOURCE_DIR", spec["cinch"].prefix))
-
if spec.variants["backend"].value == "hpx":
options.append(self.define("HPX_IGNORE_CMAKE_BUILD_TYPE_COMPATIBILITY", True))
- if spec.satisfies("@:1"):
- options.append(
- self.define("ENABLE_CALIPER", spec.variants["caliper_detail"].value != "none")
- )
- options.append(
- self.define_from_variant("CMAKE_DISABLE_FIND_PACKAGE_METIS", "disable_metis")
- )
-
return options
diff --git a/var/spack/repos/builtin/packages/flecsph/package.py b/var/spack/repos/builtin/packages/flecsph/package.py
index 0e47ba5ea3..ca875c8ade 100644
--- a/var/spack/repos/builtin/packages/flecsph/package.py
+++ b/var/spack/repos/builtin/packages/flecsph/package.py
@@ -20,6 +20,8 @@ class Flecsph(CMakePackage):
maintainers("JulienLoiseau")
version("master", branch="master", submodules=True, preferred=True)
+ depends_on("cxx", type="build") # generated
+
variant("debug_tree", default=False, description="Enable debug for Ntree")
depends_on("cmake@3.15:", type="build")
diff --git a/var/spack/repos/builtin/packages/fleur/package.py b/var/spack/repos/builtin/packages/fleur/package.py
index ec6c271ad4..d5294733cc 100644
--- a/var/spack/repos/builtin/packages/fleur/package.py
+++ b/var/spack/repos/builtin/packages/fleur/package.py
@@ -22,6 +22,10 @@ class Fleur(Package):
version("4.0", tag="MaX-R4", commit="ea0db7877451e6240124e960c5546318c9ab3953")
version("3.1", tag="MaX-R3.1", commit="f6288a0699604ad9e11efbfcde824b96db429404")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("hdf5", default=False, description="Enable HDF5 support")
variant("scalapack", default=False, description="Enable SCALAPACK")
@@ -64,11 +68,6 @@ class Fleur(Package):
conflicts("%intel@:16.0.4", msg="ifort version <16.0 will most probably not work correctly")
conflicts("%gcc@:6.3.0", msg="gfortran is known to work with versions newer than v6.3")
- conflicts(
- "%pgi@:18.4.0",
- msg="You need at least PGI version 18.4 \
- but might still run into some problems.",
- )
conflicts("~scalapack", when="+elpa", msg="ELPA requires scalapack support")
conflicts("@:5.0", when="fft=fftw", msg="FFTW interface is supported from Fleur v5.0")
conflicts("@:5.0", when="+wannier90", msg="wannier90 is supported from Fleur v5.0")
@@ -78,7 +77,7 @@ class Fleur(Package):
def setup_build_environment(self, env):
spec = self.spec
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env.set("CC", spec["mpi"].mpicc, force=True)
env.set("FC", spec["mpi"].mpifc, force=True)
env.set("CXX", spec["mpi"].mpicxx, force=True)
@@ -108,43 +107,43 @@ class Fleur(Package):
options["-includedir"].append(spec["libxml2"].prefix.include)
options["-includedir"].append(join_path(spec["libxml2"].prefix.include, "libxml2"))
- if "fft=mkl" in spec:
+ if spec.satisfies("fft=mkl"):
options["-link"].append(spec["intel-mkl"].libs.link_flags)
options["-libdir"].append(spec["intel-mkl"].prefix.lib)
options["-includedir"].append(spec["intel-mkl"].prefix.include)
- if "fft=fftw" in spec:
+ if spec.satisfies("fft=fftw"):
options["-link"].append(spec["fftw-api"].libs.link_flags)
options["-libdir"].append(spec["fftw-api"].prefix.lib)
options["-includedir"].append(spec["fftw-api"].prefix.include)
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
options["-link"].append(spec["scalapack"].libs.link_flags)
options["-libdir"].append(spec["scalapack"].prefix.lib)
- if "+external_libxc" in spec:
+ if spec.satisfies("+external_libxc"):
# Workaround: The fortran library is called libxcf90.a/so
# but spec['wannier90'].libs.link_flags return -lxc
options["-link"].append("-lxcf90")
options["-libdir"].append(spec["libxc"].prefix.lib)
options["-includedir"].append(spec["libxc"].prefix.include)
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
options["-link"].append(spec["hdf5"].libs.link_flags)
options["-libdir"].append(spec["hdf5"].prefix.lib)
options["-includedir"].append(spec["hdf5"].prefix.include)
- if "+magma" in spec:
+ if spec.satisfies("+magma"):
options["-link"].append(spec["magma"].libs.link_flags)
options["-libdir"].append(spec["magma"].prefix.lib)
options["-includedir"].append(spec["magma"].prefix.include)
- if "+wannier90" in spec:
+ if spec.satisfies("+wannier90"):
# Workaround: The library is not called wannier90.a/so
# for this reason spec['wannier90'].libs.link_flags fails!
options["-link"].append("-lwannier")
options["-libdir"].append(spec["wannier90"].prefix.lib)
- if "+spfft" in spec:
+ if spec.satisfies("+spfft"):
options["-link"].append(spec["spfft"].libs.link_flags)
# Workaround: The library is installed in /lib64 not /lib
options["-libdir"].append(spec["spfft"].prefix.lib + "64")
# Workaround: The library needs spfft.mod in include/spfft path
options["-includedir"].append(join_path(spec["spfft"].prefix.include, "spfft"))
- if "+elpa" in spec:
+ if spec.satisfies("+elpa"):
options["-link"].append(spec["elpa"].libs.link_flags)
options["-libdir"].append(spec["elpa"].prefix.lib)
# Workaround: The library needs elpa.mod in include/elpa_%VERS/modules
@@ -168,7 +167,7 @@ class Fleur(Package):
with working_dir("build"):
make()
mkdirp(prefix.bin)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
install("fleur_MPI", prefix.bin)
else:
install("fleur", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py
index c887e3580b..cacd5c71a9 100644
--- a/var/spack/repos/builtin/packages/flex/package.py
+++ b/var/spack/repos/builtin/packages/flex/package.py
@@ -33,6 +33,9 @@ class Flex(AutotoolsPackage):
version("2.6.0", sha256="cde6e46064a941a3810f7bbc612a2c39cb3aa29ce7eb775089c2515d0adfa7e9")
version("2.5.39", sha256="258d3c9c38cae05932fb470db58b6a288a361c448399e6bda2694ef72a76e7cd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("nls", default=False, description="Enable native language support")
variant("lex", default=True, description="Provide symlinks for lex and libl")
@@ -62,11 +65,10 @@ class Flex(AutotoolsPackage):
def flag_handler(self, name, flags):
spec = self.spec
- iflags = []
if name == "cflags":
if spec.satisfies("%oneapi"):
- iflags.append("-Wno-error=implicit-function-declaration")
- return (iflags, None, None)
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
@classmethod
def determine_version(cls, exe):
diff --git a/var/spack/repos/builtin/packages/flexi/package.py b/var/spack/repos/builtin/packages/flexi/package.py
index 36e1a62968..80359b1ced 100644
--- a/var/spack/repos/builtin/packages/flexi/package.py
+++ b/var/spack/repos/builtin/packages/flexi/package.py
@@ -18,6 +18,10 @@ class Flexi(CMakePackage):
version("master", preferred=True)
version("21.03.0", tag="v21.03.0", commit="d061978e5d96cfc96c06edc1bae9d92cbe540c18")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("for_aarch64.patch", when="target=aarch64:")
variant("mpi", default=True, description="Enable MPI")
diff --git a/var/spack/repos/builtin/packages/flexiblas/package.py b/var/spack/repos/builtin/packages/flexiblas/package.py
index 369397b156..97024d4d6c 100644
--- a/var/spack/repos/builtin/packages/flexiblas/package.py
+++ b/var/spack/repos/builtin/packages/flexiblas/package.py
@@ -14,6 +14,7 @@ class Flexiblas(CMakePackage):
license("GPL-3.0-or-later")
+ version("3.4.2", sha256="be4bc95461ab4970aba39a0a2bbd0d03bcf802180f63be8eefc189eb2380227c")
version("3.3.0", sha256="2696cd63d69b9a007f40f1f4a1ed83ad2fc46f6a930a22753bd221758c503ea2")
version("3.2.1", sha256="5be7e508e2dbb751b3bf372639d8e82a11f79e9ef6cbf243b64981c24a5703cf")
version("3.2.0", sha256="a3f4d66a30b6fa6473e492de86d34abc5f9d4e69d4d91ba23618388e8df05904")
@@ -21,6 +22,10 @@ class Flexiblas(CMakePackage):
version("3.0.4", sha256="50a88f2e88994dda91b2a2621850afd9654b3b84820e737e335687a46751be5c")
version("3.0.3", sha256="926ab31cf56f0618aec34da85314f3b48b6deb661b4e9d6e6a99dc37872b5341")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# virtual dependency
provides("blas")
provides("lapack")
diff --git a/var/spack/repos/builtin/packages/flibcpp/package.py b/var/spack/repos/builtin/packages/flibcpp/package.py
index 72e5239544..e13cbf7545 100644
--- a/var/spack/repos/builtin/packages/flibcpp/package.py
+++ b/var/spack/repos/builtin/packages/flibcpp/package.py
@@ -26,6 +26,9 @@ class Flibcpp(CMakePackage):
version("0.4.0", sha256="ccb0acf58a4480977fdb3c62a0bd267297c1dfa687a142ea8822474c38aa322b")
version("0.3.1", sha256="871570124122c18018478275d5040b4b787d1966e50ee95b634b0b5e0cd27e91")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("doc", default=False, description="Build and install documentation")
variant("shared", default=True, description="Build shared libraries")
variant("swig", default=False, description="Regenerate source files using SWIG")
@@ -70,7 +73,7 @@ class Flibcpp(CMakePackage):
def setup_smoke_tests(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
@property
def cached_tests_work_dir(self):
diff --git a/var/spack/repos/builtin/packages/flink/package.py b/var/spack/repos/builtin/packages/flink/package.py
index d8d351ad73..6222815e22 100644
--- a/var/spack/repos/builtin/packages/flink/package.py
+++ b/var/spack/repos/builtin/packages/flink/package.py
@@ -13,10 +13,11 @@ class Flink(Package):
"""
homepage = "https://flink.apache.org/"
- url = "https://archive.apache.org/dist/flink/flink-1.9.1/flink-1.9.1-bin-scala_2.11.tgz"
+ url = "https://archive.apache.org/dist/flink/flink-1.20.0/flink-1.20.0-bin-scala_2.12.tgz"
- license("BSD-2-Clause")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("1.20.0", sha256="708fd544ccf9ddc0d4b192fe035797ce16de2c26f1d764c55907305efe140af0")
version("1.9.1", sha256="f69de344cd593e92f8261e19ae8a47b3910e9a70a7cd1ccfb1ecd1ff000b93ea")
version("1.9.0", sha256="a2245f68309e94ed54d86a680232a518aed9c5ea030bcc0b298bc8f27165eeb7")
version("1.8.3", sha256="1ba90e99f70ad7e2583d48d1404d1c09e327e8fb8fa716b1823e427464cc8dc0")
@@ -26,8 +27,8 @@ class Flink(Package):
depends_on("java@8:", type="run")
def url_for_version(self, version):
- url = "http://archive.apache.org/dist/flink/flink-{0}/flink-{0}-bin-scala_2.11.tgz"
- return url.format(version)
+ scala = "2.12" if version >= Version("1.15") else "2.11"
+ return f"https://archive.apache.org/dist/flink/flink-{version}/flink-{version}-bin-scala_{scala}.tgz"
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/flint/package.py b/var/spack/repos/builtin/packages/flint/package.py
index 0c3560fb32..2d49648e50 100644
--- a/var/spack/repos/builtin/packages/flint/package.py
+++ b/var/spack/repos/builtin/packages/flint/package.py
@@ -6,47 +6,35 @@
from spack.package import *
-class Flint(Package):
+class Flint(AutotoolsPackage):
"""FLINT (Fast Library for Number Theory)."""
- homepage = "https://www.flintlib.org"
- url = "https://mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.5.2.tar.gz"
- git = "https://github.com/wbhart/flint2.git"
+ homepage = "https://flintlib.org"
+ url = "https://flintlib.org/flint-3.1.2.tar.gz"
+ git = "https://github.com/flintlib/flint.git"
+ list_url = "https://flintlib.org/downloads.html"
+ list_depth = 0
license("LGPL-2.1-or-later")
- version("develop", branch="trunk")
+ version("main", branch="main")
+ version("3.1.2", sha256="fdb3a431a37464834acff3bdc145f4fe8d0f951dd5327c4c6f93f4cbac5c2700")
+ version("3.0.1", sha256="7b311a00503a863881eb8177dbeb84322f29399f3d7d72f3b1a4c9ba1d5794b4")
version("2.5.2", sha256="cbf1fe0034533c53c5c41761017065f85207a1b770483e98b2392315f6575e87")
version("2.4.5", sha256="e489354df00f0d84976ccdd0477028693977c87ccd14f3924a89f848bb0e01e3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Overlap in functionality between gmp and mpir
# All other dependencies must also be built with
# one or the other
# variant('mpir', default=False,
# description='Compile with the MPIR library')
- # Build dependencies
- depends_on("autoconf", type="build")
-
- # Other dependencies
depends_on("gmp") # mpir is a drop-in replacement for this
depends_on("mpfr") # Could also be built against mpir
- def install(self, spec, prefix):
- options = []
- options = [
- "--prefix=%s" % prefix,
- "--with-gmp=%s" % spec["gmp"].prefix,
- "--with-mpfr=%s" % spec["mpfr"].prefix,
- ]
-
- # if '+mpir' in spec:
- # options.extend([
- # "--with-mpir=%s" % spec['mpir'].prefix
- # ])
-
- configure(*options)
- make()
- if self.run_tests:
- make("check")
- make("install")
+ def configure_args(self):
+ spec = self.spec
+ return [f"--with-gmp={spec['gmp'].prefix}", f"--with-mpfr={spec['mpfr'].prefix}"]
diff --git a/var/spack/repos/builtin/packages/flit/package.py b/var/spack/repos/builtin/packages/flit/package.py
index 8aaad29b00..30c86cfe03 100644
--- a/var/spack/repos/builtin/packages/flit/package.py
+++ b/var/spack/repos/builtin/packages/flit/package.py
@@ -21,6 +21,8 @@ class Flit(MakefilePackage):
version("develop", branch="devel")
version("2.1.0", sha256="b31ffa02fda1ab0f5555acdc6edc353d93d53ae8ef85e099f83bcf1c83e70885")
+ depends_on("cxx", type="build") # generated
+
maintainers("mikebentley15")
# Add dependencies
diff --git a/var/spack/repos/builtin/packages/fltk/package.py b/var/spack/repos/builtin/packages/fltk/package.py
index f860c05cc5..2cb32fd091 100644
--- a/var/spack/repos/builtin/packages/fltk/package.py
+++ b/var/spack/repos/builtin/packages/fltk/package.py
@@ -27,6 +27,9 @@ class Fltk(Package):
version("1.3.7", sha256="5d2ccb7ad94e595d3d97509c7a931554e059dd970b7b29e6fd84cb70fd5491c6")
version("1.3.3", sha256="f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libx11")
patch("font.patch", when="@1.3.3")
@@ -58,16 +61,16 @@ class Fltk(Package):
"--enable-localzlib",
]
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
options.append("--enable-shared")
- if "+xft" in spec:
+ if spec.satisfies("+xft"):
# https://www.fltk.org/articles.php?L374+I0+TFAQ+P1+Q
options.append("--enable-xft")
else:
options.append("--disable-xft")
- if "~gl" in spec:
+ if spec.satisfies("~gl"):
options.append("--disable-gl")
# FLTK needs to be built in-source
diff --git a/var/spack/repos/builtin/packages/flume/package.py b/var/spack/repos/builtin/packages/flume/package.py
index 7a57524b30..c5b8276814 100644
--- a/var/spack/repos/builtin/packages/flume/package.py
+++ b/var/spack/repos/builtin/packages/flume/package.py
@@ -18,11 +18,12 @@ class Flume(Package):
application.
"""
- homepage = "https://cwiki.apache.org/FLUME"
+ homepage = "https://flume.apache.org"
url = "https://www.apache.org/dist/flume/1.9.0/apache-flume-1.9.0-bin.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("1.11.0", sha256="6eb7806076bdc3dcadb728275eeee7ba5cb12b63a2d981de3da9063008dba678")
version("1.9.0", sha256="0373ed5abfd44dc4ab23d9a02251ffd7e3b32c02d83a03546e97ec15a7b23619")
version("1.8.0", sha256="be1b554a5e23340ecc5e0b044215bf7828ff841f6eabe647b526d31add1ab5fa")
version("1.7.0", sha256="b97254cf37c36b6e5045f764095d86fc6d9a8043dda169e950547fcae35681ec")
diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py
index 70dd0ccaf2..0e26992537 100644
--- a/var/spack/repos/builtin/packages/flux-core/package.py
+++ b/var/spack/repos/builtin/packages/flux-core/package.py
@@ -5,7 +5,6 @@
import os
-import spack.util.executable
from spack.package import *
@@ -22,6 +21,17 @@ class FluxCore(AutotoolsPackage):
license("LGPL-3.0-only")
version("master", branch="master")
+ version("0.66.0", sha256="0a25cfb1ebc033c249614eb2350c6fb57b00cdf3c584d0759c787f595c360daa")
+ version("0.65.0", sha256="a60bc7ed13b8e6d09e99176123a474aad2d9792fff6eb6fd4da2a00e1d2865ab")
+ version("0.64.0", sha256="0334d6191915f1b89b70cdbf14f24200f8899da31090df5f502020533b304bb3")
+ version("0.63.0", sha256="f0fd339f0e24cb26331ad55062d3c1e1c7c81df41c0d7f8727aa0700c7baa1ae")
+ version("0.62.0", sha256="54a227741901ca758236c024296b8cd53718eea0050fc6363d2b2979aa0bf1e9")
+ version("0.61.2", sha256="06f38143723e3f8331f55893ad8f74d43eb0588078f91abb603690c3e5f5112c")
+ version("0.61.1", sha256="59cc730b34b732a1d00355bb5589bf2d26bf522b4a31ebfabff70ddb3afb51d6")
+ version("0.61.0", sha256="02cedc6abb12816cbb01f2195c1acf7b6552c1d8b9029f899148df48a7cd05e2")
+ version("0.60.0", sha256="f96025204a20f94c2821db47fe010b2c19e076ef93281ac7d308e82853e135ff")
+ version("0.59.0", sha256="465d24294b92962d156ad49768ea804ff848d5c0b3470d80e07ebf24cd255f2d")
+ version("0.58.0", sha256="3125ace7d4d3c99b362290344f97db74c06c37b5510cfcb746e1bf48e1dc1389")
version("0.57.0", sha256="a412b8370b5236605a5261c892f48d65c1357a83c88446cd1723236f58a807ce")
version("0.56.0", sha256="dfce5aa21bcb1f990397343cdff8a60542b2d18cbd929e46bdb444d21a961efb")
version("0.55.0", sha256="2925b8a084e9d1069a96de7689b515ad6f2051ecfb9fbbe4d2643507de7ccd30")
@@ -52,71 +62,8 @@ class FluxCore(AutotoolsPackage):
version("0.30.0", sha256="e51fde4464140367ae4bc1b44f960675ea0a6f58eede3a561cacd8a11ca3e776")
version("0.29.0", sha256="c13b40e82d66356e75208a689a495ca01f0a013e2e45ac8ea202ed8224987323")
version("0.28.0", sha256="9a784def7186b0036091bd8d6d8fe5bc3425ab2927e1465e1c9ad266631c285d")
- version(
- "0.27.0",
- sha256="abd46d38081ba6b501adb1c111374b39d6ae72ac1aec9fbbf31943a856541d3a",
- deprecated=True,
- )
- version(
- "0.26.0",
- sha256="58bfd4742c59364b13cd83214e8f70735952d01793800b149cae056fddfeeff1",
- deprecated=True,
- )
- version(
- "0.25.0",
- sha256="3c97e21eaec51e8aa0eaee6aa8eb23246650d102a6b6a5c9943cd69e3c8e1008",
- deprecated=True,
- )
- version(
- "0.24.0",
- sha256="fb7e0f9a44d84144a8eaf8f42a5d7e64a4a847861d0ddc2ad8fc4908b5a9190e",
- deprecated=True,
- )
- version(
- "0.23.0",
- sha256="918b181be4e27c32f02d5036230212cd9235dc78dc2bde249c3651d6f75866c7",
- deprecated=True,
- )
- version(
- "0.22.0",
- sha256="1dd0b737199b8a40f245e6a4e1b3b28770f0ecf2f483d284232080b8b252521f",
- deprecated=True,
- )
- version(
- "0.21.0",
- sha256="cc1b7a46d7c1c1a3e99e8861bba0dde89a97351eabd6f1b264788bd76e64c329",
- deprecated=True,
- )
- version(
- "0.20.0",
- sha256="2970b9b1c389fc4a381f9e605921ce0eb6aa9339387ea741978bcffb4bd81b6f",
- deprecated=True,
- )
- version(
- "0.19.0",
- sha256="f45328a37d989c308c46639a9ed771f47b11184422cf5604249919fbd320d6f5",
- deprecated=True,
- )
- version(
- "0.18.0",
- sha256="9784bbca94177a32dbbc99728e8925bf894f3aebaa316961d6ea85df32d59545",
- deprecated=True,
- )
- version(
- "0.17.0",
- sha256="3f8c6cb72982028f86a96c0098cacd3a6e9de359fa1cf077380c835a20e7b7f7",
- deprecated=True,
- )
- version(
- "0.16.0",
- sha256="1582f7fb4d2313127418c34de7c9ce4f5fef00622d19cedca7bed929f4709f10",
- deprecated=True,
- )
- version(
- "0.15.0",
- sha256="51bc2eae69501f802459fc82f191eb5e8ae0b4f7e9e77ac18543a850cc8445f5",
- deprecated=True,
- )
+
+ depends_on("c", type="build") # generated
# Avoid the infinite symlink issue
# This workaround is documented in PR #3543
@@ -133,32 +80,29 @@ class FluxCore(AutotoolsPackage):
depends_on("libarchive+iconv", when="@0.38.0:")
depends_on("ncurses@6.2:", when="@0.32.0:")
depends_on("libzmq@4.0.4:")
- depends_on("czmq@3.0.1:")
- depends_on("hwloc@1.11.1:1", when="@:0.17.0")
- depends_on("hwloc@1.11.1:", when="@0.17.0:")
+ depends_on("czmq@3.0.1:", when="@:0.54.0")
+ depends_on("hwloc@1.11.1:")
depends_on("hwloc +cuda", when="+cuda")
# Provide version hints for lua so that the concretizer succeeds when no
# explicit flux-core version is given. See issue #10000 for details
depends_on("lua", type=("build", "run", "link"))
- depends_on("lua@5.1:5.2", when="@:0.17.0")
- depends_on("lua@5.1:5.3", when="@0.18.0:")
+ depends_on("lua@5.1:5.3")
depends_on("lua-luaposix")
# `link` dependency on python due to Flux's `pymod` module
- depends_on("python@3.6:", when="@0.17:", type=("build", "link", "run"))
- depends_on("python@2.7:", type=("build", "link", "run"))
+ depends_on("python@3.6:", type=("build", "link", "run"))
# Use of distutils in configure script dropped in v0.55
- depends_on("python@:3.11", when="@:0.54", type=("build", "link", "run"))
+ # Detection of cffi version fixed in v0.68
+ depends_on("python@:3.11", when="@:0.67", type=("build", "link", "run"))
depends_on("py-cffi@1.1:", type=("build", "run"))
- depends_on("py-six@1.9:", when="@:0.24", type=("build", "run"))
depends_on("py-pyyaml@3.10:", type=("build", "run"))
- depends_on("py-jsonschema@2.3:", type=("build", "run"))
+ depends_on("py-jsonschema@2.3:", type=("build", "run"), when="@:0.58.0")
depends_on("py-ply", type=("build", "run"), when="@0.46.1:")
- depends_on("jansson")
- depends_on("jansson@2.10:", when="@0.21.0:")
+ depends_on("jansson@2.10:")
depends_on("pkgconfig")
depends_on("lz4")
depends_on("sqlite")
-
+ # Before this version, czmq brings it in
+ depends_on("uuid", when="@0.55.0:")
depends_on("asciidoc", type="build", when="+docs")
depends_on("py-docutils", type="build", when="@0.32.0: +docs")
@@ -166,7 +110,7 @@ class FluxCore(AutotoolsPackage):
# Note that if you install with this variant, it is
# recommended to create a view and then a broker.toml that
# has the path to flux-imp generated by flux-security
- depends_on("flux-security", type="build", when="+security")
+ depends_on("flux-security", when="+security")
# Need autotools when building on master:
depends_on("autoconf", type="build", when="@master")
@@ -212,7 +156,7 @@ class FluxCore(AutotoolsPackage):
git("fetch", "--unshallow")
git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
git("fetch", "origin")
- except spack.util.executable.ProcessError:
+ except ProcessError:
git("fetch")
def autoreconf(self, spec, prefix):
@@ -239,6 +183,12 @@ class FluxCore(AutotoolsPackage):
env.append_path("LUA_PATH", "./?.lua", separator=";")
def setup_run_environment(self, env):
+ # If this package is external, we expect the external provider to set things
+ # like LUA paths. So, we early return. If the package is not external,
+ # properly set these environment variables to make sure the user environment
+ # is configured correctly
+ if self.spec.external:
+ return
env.prepend_path(
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
)
@@ -261,7 +211,7 @@ class FluxCore(AutotoolsPackage):
args = ["--enable-pylint=no"]
if "+docs" not in self.spec:
args.append("--disable-docs")
- if "+security" in self.spec:
+ if self.spec.satisfies("+security"):
args.append("--with-flux-security")
return args
@@ -278,4 +228,4 @@ class FluxCore(AutotoolsPackage):
flags = []
flags.append("-Wno-error=maybe-uninitialized")
- return (flags, None, None)
+ return flags, None, None
diff --git a/var/spack/repos/builtin/packages/flux-pmix/package.py b/var/spack/repos/builtin/packages/flux-pmix/package.py
index 035d850759..23d7425d36 100644
--- a/var/spack/repos/builtin/packages/flux-pmix/package.py
+++ b/var/spack/repos/builtin/packages/flux-pmix/package.py
@@ -18,10 +18,13 @@ class FluxPmix(AutotoolsPackage):
maintainers("grondo")
version("main", branch="main")
+ version("0.5.0", sha256="f382800b1a342df0268146ea7ce33011299bf0c69a46ac8a52e87de6026c9322")
version("0.4.0", sha256="f7f58891fc9d9a97a0399b3ab186f2cae30a75806ba0b4d4c1307f07b3f6d1bc")
version("0.3.0", sha256="88edb2afaeb6058b56ff915105a36972acc0d83204cff7f4a4d2f65a5dee9d34")
version("0.2.0", sha256="d09f1fe6ffe54f83be4677e1e727640521d8110090515d94013eba0f58216934")
+ depends_on("c", type="build") # generated
+
depends_on("flux-core@0.49:", when="@0.3:")
depends_on("flux-core@0.30.0:")
depends_on("pmix@v4.1.0:")
@@ -54,8 +57,8 @@ class FluxPmix(AutotoolsPackage):
def setup_run_environment(self, env):
spec = self.spec
- env.prepend_path("FLUX_SHELL_RC_PATH", join_path(self.prefix, "etc/flux/shell/lua.d"))
+ env.prepend_path("FLUX_SHELL_RC_PATH", join_path(self.prefix.etc, "flux/shell/lua.d"))
if spec.satisfies("@0.3.0:"):
env.prepend_path(
- "FLUX_PMI_CLIENT_SEARCHPATH", join_path(self.prefix, "flux/upmi/plugins")
+ "FLUX_PMI_CLIENT_SEARCHPATH", join_path(self.prefix.lib, "flux/upmi/plugins")
)
diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py
index e007044921..1b7acc8508 100644
--- a/var/spack/repos/builtin/packages/flux-sched/package.py
+++ b/var/spack/repos/builtin/packages/flux-sched/package.py
@@ -5,7 +5,6 @@
import os
-import spack.util.executable
from spack.build_systems.autotools import AutotoolsBuilder
from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -24,6 +23,16 @@ class FluxSched(CMakePackage, AutotoolsPackage):
license("LGPL-3.0-only")
version("master", branch="master")
+ version("0.39.0", sha256="7e87029f8ad17b9286096e4e2d44982b5d6634908aefde3282497bdd3f44f2f8")
+ version("0.38.0", sha256="0cb3efbd490256b28df580bb14f8e89c02084a9126e0b1754d6334a99ecfa969")
+ version("0.37.0", sha256="b354d451183fcb8455e6a61d31e18c7f4af13e16a86b71216738f0991a7bcd50")
+ version("0.36.1", sha256="0ee37ed364912f3f5a48ed5b5f5f21cb86cda43ff357486695b9454c217ad8b8")
+ version("0.36.0", sha256="c20814eae65b6eb9f2c919dbcc216dd4b87f038a341cf99510cca88d43631c41")
+ version("0.35.0", sha256="38fde51464f4e34ecbd1e4fbbf00267f96b639db5987257a7ad07f811e2f09d2")
+ version("0.34.0", sha256="10c03d78fa2302de7ddf9599ea59fb7a2dc7ccf6f526fd9fbfc9e3ff6ba39713")
+ version("0.33.1", sha256="d0a1e504226d69fa8a247e9090d94ccc5e5f5fb028aab805f9cd95379bd8b1b3")
+ version("0.33.0", sha256="d2e97121aed29bb1c6bfac602d890edb2f0a18d5303205b266a33c66fff1d61c")
+ version("0.32.0", sha256="f0b88881f0154057de3dd5485a3e1cfc0b9b64c98052bda7d5fed7c05b5e02f3")
version("0.31.0", sha256="4440156b7f2d43e3db2cbfa0dbc43671074c397525f6b97e3748c3d96a035cdb")
version("0.30.0", sha256="1ccb2e53f4caede0233f19b2707e868f0cee9d2c957a06f97c22936ba9a43552")
version("0.29.0", sha256="b93b18788e677535aa8ef945cdbeeced6d1408a4d16cb4a816ead53f31dd78d2")
@@ -40,20 +49,15 @@ class FluxSched(CMakePackage, AutotoolsPackage):
version("0.19.0", sha256="8dffa8eaec95a81286f621639ef851c52dc4c562d365971233bbd91100c31ed2")
version("0.18.0", sha256="a4d8a6444fdb7b857b26f47fdea57992b486c9522f4ff92d5a6f547d95b586ae")
version("0.17.0", sha256="5acfcb757e2294a92eaa91be58ba9b42736b88b42d2937de4a78f4642b1c4933")
- version("0.16.0", sha256="08313976161c141b9b34e2d44d5a08d1b11302e22d60aeaf878eef84d4bd2884")
- version("0.15.0", sha256="ff24d26997f91af415f98734b8117291f5a5001e86dac865b56b3d72980c80c8")
- version("0.14.0", sha256="2808f42032b917823d69cd26103c9238694416e2f30c6d39c11c670927ed232a")
- version("0.13.0", sha256="ba17fc0451239fe31a1524b6a270741873f59a5057514d2524fd3e9215c47a82")
- version("0.12.0", sha256="b41ecaebba254abfb5a7995fd9100bd45a59d4ad0a79bdca8b3db02785d97b1d")
- version("0.11.0", sha256="6a0e3c0678f85da8724e5399b02be9686311c835617f6036235ef54b489cc336")
- version("0.10.0", sha256="5944927774709b5f52ddf64a0e825d9b0f24c9dea890b5504b87a8576d217cf6")
- version("0.9.0", sha256="0e1eb408a937c2843bdaaed915d4d7e2ea763b98c31e7b849a96a74758d66a21")
- version("0.8.0", sha256="45bc3cefb453d19c0cb289f03692fba600a39045846568d258e4b896ca19ca0d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Avoid the infinite symlink issue
# This workaround is documented in PR #3543
build_directory = "spack-build"
+ variant("docs", default=False, description="Build flux manpages and docs")
variant("cuda", default=False, description="Build dependencies with support for CUDA")
# Needs to be seen if tis is needed once we remove the default variants
@@ -69,14 +73,13 @@ class FluxSched(CMakePackage, AutotoolsPackage):
depends_on("yaml-cpp@0.6.3")
depends_on("uuid")
depends_on("pkgconfig")
+ conflicts("%gcc@:9.3", when="@0.34:")
+ conflicts("%gcc@:11", when="@0.37:", msg="gcc version must be 12 or higher")
+ conflicts("%clang@:14", when="@0.37:", msg="clang must be version 15 or higher")
+ depends_on("py-sphinx@1.6.3:", when="+docs", type="build")
depends_on("flux-core", type=("build", "link", "run"))
depends_on("flux-core+cuda", when="+cuda", type=("build", "run", "link"))
- depends_on("flux-core@0.16.0:0.16", when="@0.8.0", type=("build", "run", "link"))
- depends_on("flux-core@0.22.0", when="@0.14.0", type=("build", "run", "link"))
- depends_on("flux-core@0.23.0:0.25", 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@0.29.0:", when="@0.18.0", type=("build", "run", "link"))
depends_on("flux-core@0.30.0:", when="@0.19.0", type=("build", "run", "link"))
depends_on("flux-core@0.31.0:", when="@0.19.0", type=("build", "run", "link"))
@@ -136,7 +139,7 @@ class FluxSched(CMakePackage, AutotoolsPackage):
git("fetch", "--unshallow")
git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
git("fetch", "origin")
- except spack.util.executable.ProcessError:
+ except ProcessError:
git("fetch")
def autoreconf(self, spec, prefix):
@@ -168,6 +171,12 @@ class FluxSched(CMakePackage, AutotoolsPackage):
return os.path.join("lib", "lua", str(self.lua_version))
def setup_run_environment(self, env):
+ # If this package is external, we expect the external provider to set
+ # things like LUA paths. So, we early return. If the package is not
+ # external, properly set these environment variables to make sure the
+ # user environment is configured correctly
+ if self.spec.external:
+ return
env.prepend_path(
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
)
@@ -177,13 +186,27 @@ class FluxSched(CMakePackage, AutotoolsPackage):
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules)
env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules.sched)
+ # On some systems modules are in lib64 and lib
+ env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules)
+ env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib64.flux.modules.sched)
env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd)
env.prepend_path("FLUX_RC_EXTRA", self.prefix.etc.flux)
class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
- return []
+ args = []
+ ver_in_src = os.path.exists(os.path.join(self.stage.source_path, "flux-sched.ver"))
+ # flux-sched before v0.33 does not correctly set the version even when the file is present.
+ if self.spec.satisfies("@:0.33") or not ver_in_src:
+ # ref_version only exists on git versions
+ try:
+ ver = self.spec.version.ref_version
+ except AttributeError:
+ ver = self.spec.version
+ args.append(self.define("FLUX_SCHED_VER", ver))
+ args.append(self.define_from_variant("ENABLE_DOCS", "docs"))
+ return args
class AutotoolsBuilder(AutotoolsBuilder):
diff --git a/var/spack/repos/builtin/packages/flux-security/package.py b/var/spack/repos/builtin/packages/flux-security/package.py
index 1d108f8449..79d253cd5a 100644
--- a/var/spack/repos/builtin/packages/flux-security/package.py
+++ b/var/spack/repos/builtin/packages/flux-security/package.py
@@ -5,7 +5,6 @@
import os
-import spack.util.executable
from spack.package import *
@@ -22,11 +21,14 @@ class FluxSecurity(AutotoolsPackage):
license("LGPL-3.0-or-later")
version("master", branch="master")
+ version("0.12.0", sha256="2876d1f10c4f898f2ff10d60ddb446af9c8a913dda69f0136d820ad1fdf28a93")
version("0.11.0", sha256="d1ef78a871155a252f07e4f0a636eb272d6c2048d5e0e943860dd687c6cf808a")
version("0.10.0", sha256="b0f39c5e32322f901454469ffd6154019b6dffafc064b55b3e593f70db6a6f68")
version("0.9.0", sha256="2258120c6f32ca0b5b13b166bae56d9bd82a44c6eeaa6bc6187e4a4419bdbcc0")
version("0.8.0", sha256="9963628063b4abdff6bece03208444c8f23fbfda33c20544c48b21e9f4819ce2")
+ depends_on("c", type="build") # generated
+
# Need autotools when building on master:
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
@@ -35,7 +37,7 @@ class FluxSecurity(AutotoolsPackage):
depends_on("pkgconfig")
depends_on("libsodium@1.0.14:")
depends_on("jansson")
- depends_on("libuuid")
+ depends_on("uuid")
depends_on("munge")
depends_on("libpam")
@@ -52,7 +54,7 @@ class FluxSecurity(AutotoolsPackage):
git("fetch", "--unshallow")
git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*")
git("fetch", "origin")
- except spack.util.executable.ProcessError:
+ except ProcessError:
git("fetch")
def autoreconf(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/flux/package.py b/var/spack/repos/builtin/packages/flux/package.py
new file mode 100644
index 0000000000..934f9d5655
--- /dev/null
+++ b/var/spack/repos/builtin/packages/flux/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Flux(CMakePackage):
+ """A C++20 library for sequence-orientated programming"""
+
+ homepage = "https://tristanbrindle.com/flux/"
+ url = "https://github.com/tcbrindle/flux/archive/refs/tags/v0.4.0.tar.gz"
+
+ maintainers("pranav-sivaraman")
+
+ license("BSL-1.0", checked_by="pranav-sivaraman")
+
+ version("0.4.0", sha256="95e7d9d71c9ee9e89bb24b46ccba77ddfb0a1580630c2faab0b415dacc7c8d56")
+
+ variant("docs", default=False, description="Build Flux documentation")
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.23:", type="build")
+
+ with default_args(when="+docs"):
+ depends_on("py-sphinx")
+ depends_on("py-sphinx-copybutton")
+ depends_on("py-furo")
+
+ def cmake_args(self):
+ args = [
+ self.define("FLUX_BUILD_TESTS", self.run_tests),
+ self.define("FLUX_BUILD_EXAMPLES", False),
+ self.define_from_variant("FLUX_BUILD_DOCS", "docs"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/fluxbox/package.py b/var/spack/repos/builtin/packages/fluxbox/package.py
index 4559ad9c80..3a5ae980d8 100644
--- a/var/spack/repos/builtin/packages/fluxbox/package.py
+++ b/var/spack/repos/builtin/packages/fluxbox/package.py
@@ -20,6 +20,8 @@ class Fluxbox(AutotoolsPackage):
version("1.3.7", sha256="c99e2baa06fff1e96342b20415059d12ff1fa2917ade0173c75b2fa570295b9f")
+ depends_on("cxx", type="build") # generated
+
# Referenced:https://sourceforge.net/p/fluxbox/bugs/1171/
patch("fix_zero_comparison.patch")
diff --git a/var/spack/repos/builtin/packages/fmi4cpp/package.py b/var/spack/repos/builtin/packages/fmi4cpp/package.py
new file mode 100644
index 0000000000..837c3e8ef8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fmi4cpp/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Fmi4cpp(CMakePackage):
+ """FMI4cpp is a cross-platform FMI 2.0 implementation written in modern C++.
+ FMI4cpp supports both Co-simulation and Model Exchange.
+ """
+
+ homepage = "https://github.com/NTNU-IHB/FMI4cpp"
+ url = "https://github.com/NTNU-IHB/FMI4cpp/archive/refs/tags/v0.8.3.tar.gz"
+ git = "https://github.com/NTNU-IHB/FMI4cpp.git"
+
+ maintainers("prudhomm")
+ license("MIT", checked_by="prudhomm")
+
+ version("master", branch="master")
+ version("0.8.3", sha256="f48c630f087bdf8d7a04611f6f30942c870c3c1211a94ef2404c40baa4bcb2c9")
+
+ variant("shared", default=True, description="Build shared library")
+
+ depends_on("cxx", type="build")
+ depends_on("libzip")
+ depends_on("pugixml")
+
+ def cmake_args(self):
+ args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
+ return args
diff --git a/var/spack/repos/builtin/packages/fms/package.py b/var/spack/repos/builtin/packages/fms/package.py
index 10cbf09a22..59034e63d5 100644
--- a/var/spack/repos/builtin/packages/fms/package.py
+++ b/var/spack/repos/builtin/packages/fms/package.py
@@ -19,7 +19,16 @@ class Fms(CMakePackage):
license("LGPL-3.0-or-later")
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett", "rem1776", "climbfuji")
+ version("2024.02", sha256="47e5740bb066f5eb032e1de163eb762c7258880a2932f4cc4e34e769e0cc2b0e")
+ version(
+ "2024.01.01", sha256="41c8686bad2b1aed76275e35cbe1af855f7dfce9b6d8907744ea2e8174758f6a"
+ )
+ version("2024.01", sha256="29ac23a5a2a4765ae66d218bb261cb04f7ad44618205ab0924c4e66c9ef8fa38")
version("2023.04", sha256="feb895ea2b3269ca66df296199a36af335f0dc281e2dab2f1bfebb19fd9c22c4")
+ version("2023.03", sha256="008a9ff394efe6a8adbcf37dd45ca103e00ae25748fc2960b7bc54f2f3b08d85")
+ version(
+ "2023.02.01", sha256="1597f7a485d02e401ce76444b2401060d74bd032cbb060cef917f001b4ff14bc"
+ )
version("2023.02", sha256="dc029ffadfd82c334f104268bedd8635c77976485f202f0966ae4cf06d2374be")
version(
"2023.01.01", sha256="f83e2814a1e3ba439ab847ec8bb251f3889d5ca14fb20849507590adbbe8e899"
@@ -46,6 +55,25 @@ class Fms(CMakePackage):
"2020.04.01", sha256="2c409242de7dea0cf29f8dbf7495698b6bcac1eeb5c4599a728bdea172ffe37c"
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # https://github.com/NOAA-GFDL/FMS/issues/1417
+ patch(
+ "https://github.com/NOAA-GFDL/FMS/commit/c9bba516ba1115d4a7660fba92f9d67cf3fd32ad.patch?full_index=1",
+ sha256="07d5b68838bba61ee547bd4cd7c12d81228c91a80a966b8693694fa236d0ac30",
+ when="@2023.03",
+ )
+
+ variant("shared", description="Build shared libraries", when="@2024.02:", default=False)
+ # What the following patch is providing is available in version 2024.03
+ # and newer so it is only needed to 2024.02
+ patch(
+ "https://github.com/NOAA-GFDL/fms/pull/1559.patch?full_index=1",
+ sha256="2b12a6c35f357c3dddcfa5282576e56ab0e8e6c1ad1dab92a2c85ce3dfb815d4",
+ when="@2024.02",
+ )
+
variant(
"precision",
values=("32", "64"),
@@ -85,27 +113,33 @@ class Fms(CMakePackage):
description="Compiles with support for deprecated io modules fms_io and mpp_io",
when="@2023.02:",
)
+ variant("large_file", default=False, description="Enable compiler definition -Duse_LARGEFILE.")
+ variant(
+ "internal_file_nml",
+ default=True,
+ description="Enable compiler definition -DINTERNAL_FILE_NML.",
+ )
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("mpi")
depends_on("libyaml", when="+yaml")
+ depends_on("llvm-openmp", when="+openmp %apple-clang", type=("build", "run"))
def cmake_args(self):
args = [
self.define_from_variant("GFS_PHYS"),
self.define_from_variant("OPENMP"),
self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"),
+ self.define_from_variant("SHARED_LIBS", "shared"),
self.define_from_variant("WITH_YAML", "yaml"),
self.define_from_variant("CONSTANTS"),
+ self.define_from_variant("LARGEFILE", "large_file"),
+ self.define_from_variant("INTERNAL_FILE_NML"),
self.define("32BIT", "precision=32" in self.spec),
self.define("64BIT", "precision=64" in self.spec),
self.define_from_variant("FPIC", "pic"),
self.define_from_variant("USE_DEPRECATED_IO", "deprecated_io"),
]
- args.append(self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc))
- args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx))
- args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc))
-
return args
diff --git a/var/spack/repos/builtin/packages/fmt/fmt-no-variable-initialize_10.0.0.patch b/var/spack/repos/builtin/packages/fmt/fmt-no-variable-initialize_10.0.0.patch
new file mode 100644
index 0000000000..483f2ff676
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fmt/fmt-no-variable-initialize_10.0.0.patch
@@ -0,0 +1,22 @@
+diff --git a/include/fmt/format.h b/include/fmt/format.h
+index 7637c8a0..c9d7b6cc 100644
+--- a/include/fmt/format.h
++++ b/include/fmt/format.h
+@@ -1332,7 +1332,7 @@ template <typename Char, typename UInt, typename Iterator,
+ FMT_CONSTEXPR inline auto format_decimal(Iterator out, UInt value, int size)
+ -> format_decimal_result<Iterator> {
+ // Buffer is large enough to hold all digits (digits10 + 1).
+- Char buffer[digits10<UInt>() + 1] = {};
++ Char buffer[digits10<UInt>() + 1];
+ auto end = format_decimal(buffer, value, size).end;
+ return {out, detail::copy_str_noinline<Char>(buffer, end, out)};
+ }
+@@ -1359,7 +1359,7 @@ FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits,
+ return out;
+ }
+ // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1).
+- char buffer[num_bits<UInt>() / BASE_BITS + 1] = {};
++ char buffer[num_bits<UInt>() / BASE_BITS + 1];
+ format_uint<BASE_BITS>(buffer, value, num_digits, upper);
+ return detail::copy_str_noinline<Char>(buffer, buffer + num_digits, out);
+ }
diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py
index 87504dd667..72f1e11563 100644
--- a/var/spack/repos/builtin/packages/fmt/package.py
+++ b/var/spack/repos/builtin/packages/fmt/package.py
@@ -18,6 +18,11 @@ class Fmt(CMakePackage):
license("MIT")
+ version("11.0.2", sha256="40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465")
+ version("11.0.1", sha256="62ca45531814109b5d6cef0cf2fd17db92c32a30dd23012976e768c685534814")
+ version("11.0.0", sha256="583ce480ef07fad76ef86e1e2a639fc231c3daa86c4aa6bcba524ce908f30699")
+ version("10.2.1", sha256="312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9")
+ version("10.2.0", sha256="8a942861a94f8461a280f823041cde8f620a6d8b0e0aacc98c15bb5a9dd92399")
version("10.1.1", sha256="b84e58a310c9b50196cda48d5678d5fa0849bca19e5fdba6b684f0ee93ed9d1b")
version("10.1.0", sha256="d725fa83a8b57a3cedf238828fa6b167f963041e8f9f7327649bddc68ae316f4")
version("10.0.0", sha256="4943cb165f3f587f26da834d3056ee8733c397e024145ca7d2a8a96bb71ac281")
@@ -40,6 +45,10 @@ class Fmt(CMakePackage):
version("3.0.2", sha256="51407b62a202b29d1a9c0eb5ecd4095d30031aea65407c42c25cb10cb5c59ad4")
version("3.0.1", sha256="4c9af0dc919a8ae7022b44e1a03c435e42d65c866f44667d8d920d342b098550")
version("3.0.0", sha256="1b050b66fa31b74f1d75a14f15e99e728ab79572f176a53b2f8ad7c201c30ceb")
+ version("master", branch="master")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant(
"cxxstd",
@@ -91,6 +100,14 @@ class Fmt(CMakePackage):
when="@10.0.0:10.1.1",
)
+ # Fix 'variable "buffer" may not be initialized' compiler error
+ patch(
+ "fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:11.0.2%clang@12.0.1.ibm.gcc.8.3.1"
+ )
+ patch(
+ "fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:11.0.2%clang@14.0.5.ibm.gcc.8.3.1"
+ )
+
def cmake_args(self):
spec = self.spec
args = []
@@ -98,7 +115,7 @@ class Fmt(CMakePackage):
if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
- if "+pic" in spec:
+ if spec.satisfies("+pic"):
args.extend(
[
"-DCMAKE_C_FLAGS={0}".format(self.compiler.cc_pic_flag),
@@ -112,7 +129,7 @@ class Fmt(CMakePackage):
args.append("-DCMAKE_CXX_STANDARD_REQUIRED=ON")
# When cxxstd is 98, must disable FMT_USE_CPP11
- if "cxxstd=98" in spec:
+ if spec.satisfies("cxxstd=98"):
args.append("-DFMT_USE_CPP11=OFF")
# Can't build docs without doxygen+python+virtualenv
diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py
index a9a333dde8..6a9d8a026f 100644
--- a/var/spack/repos/builtin/packages/foam-extend/package.py
+++ b/var/spack/repos/builtin/packages/foam-extend/package.py
@@ -64,6 +64,10 @@ class FoamExtend(Package):
version("3.1", git="http://git.code.sf.net/p/foam-extend/foam-extend-3.1.git", deprecated=True)
version("3.0", git="http://git.code.sf.net/p/foam-extend/foam-extend-3.0.git", deprecated=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# variant('int64', default=False,
# description='Compile with 64-bit label')
variant("float32", default=False, description="Compile with 32-bit scalar (single-precision)")
@@ -294,7 +298,7 @@ class FoamExtend(Package):
# Adjust configuration via prefs - sort second
self.etc_prefs["001"].update(self.foam_arch.foam_dict())
- if "+scotch" in spec or "+ptscotch" in spec:
+ if spec.satisfies("+scotch") or spec.satisfies("+ptscotch"):
pkg = spec["scotch"].prefix
self.etc_prefs["scotch"] = {
"SCOTCH_SYSTEM": 1,
@@ -304,7 +308,7 @@ class FoamExtend(Package):
"SCOTCH_INCLUDE_DIR": pkg.include,
}
- if "+metis" in spec:
+ if spec.satisfies("+metis"):
pkg = spec["metis"].prefix
self.etc_prefs["metis"] = {
"METIS_SYSTEM": 1,
@@ -314,7 +318,7 @@ class FoamExtend(Package):
"METIS_INCLUDE_DIR": pkg.include,
}
- if "+parmetis" in spec:
+ if spec.satisfies("+parmetis"):
pkg = spec["parmetis"].prefix
self.etc_prefs["parametis"] = {
"PARMETIS_SYSTEM": 1,
@@ -324,7 +328,7 @@ class FoamExtend(Package):
"PARMETIS_INCLUDE_DIR": pkg.include,
}
- if "+parmgridgen" in spec:
+ if spec.satisfies("+parmgridgen"):
pkg = spec["parmgridgen"].prefix
self.etc_prefs["parmgridgen"] = {
"PARMGRIDGEN_SYSTEM": 1,
@@ -334,7 +338,7 @@ class FoamExtend(Package):
"PARMGRIDGEN_INCLUDE_DIR": pkg.include,
}
- if "+paraview" in self.spec:
+ if self.spec.satisfies("+paraview"):
self.etc_prefs["paraview"] = {
"PARAVIEW_SYSTEM": 1,
"PARAVIEW_DIR": spec["paraview"].prefix,
@@ -382,7 +386,7 @@ class FoamExtend(Package):
}
# All top-level files, except spack build info and possibly Allwmake
- if "+source" in spec:
+ if spec.satisfies("+source"):
ignored = re.compile(r"^spack-.*")
else:
ignored = re.compile(r"^(Allclean|Allwmake|spack-).*")
@@ -396,7 +400,7 @@ class FoamExtend(Package):
for d in ["etc", "bin", "wmake", "lib", join_path(appdir, "bin")]:
install_tree(d, join_path(self.projectdir, d), symlinks=True)
- if "+source" in spec:
+ if spec.satisfies("+source"):
subitem = join_path(appdir, "Allwmake")
install(subitem, join_path(self.projectdir, subitem))
diff --git a/var/spack/repos/builtin/packages/foldseek/package.py b/var/spack/repos/builtin/packages/foldseek/package.py
new file mode 100644
index 0000000000..183785bde2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/foldseek/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Foldseek(CMakePackage):
+ """Foldseek enables fast and sensitive comparisons of large protein structure sets"""
+
+ homepage = "https://foldseek.com/"
+ url = "https://github.com/steineggerlab/foldseek/archive/refs/tags/8-ef4e960.tar.gz"
+
+ license("GPL-3.0-only", checked_by="A-N-Other")
+
+ version("9-427df8a", sha256="b17d2d85b49a8508f79ffd8b15e54afc5feef5f3fb0276a291141ca5dbbbe8bc")
+ version("8-ef4e960", sha256="c74d02c4924d20275cc567783b56fff10e76ed67f3d642f53c283f67c4180a1e")
+ version("7-04e0ec8", sha256="009d722d600248a680b9e1e9dcb3bf799f8be8de41e80a598b7f39a5ced54191")
+
+ depends_on("zlib-api")
+ depends_on("bzip2")
+ depends_on("openmpi")
+ depends_on("rust", type="build")
+ depends_on("rust@1.78.0", when="@:9", type="build")
diff --git a/var/spack/repos/builtin/packages/folly/package.py b/var/spack/repos/builtin/packages/folly/package.py
index f621fe475c..72fa97883f 100644
--- a/var/spack/repos/builtin/packages/folly/package.py
+++ b/var/spack/repos/builtin/packages/folly/package.py
@@ -26,6 +26,9 @@ class Folly(CMakePackage):
"2021.05.24.00", sha256="9d308adefe4670637f5c7d96309b3b394ac3fa129bc954f5dfbdd8b741c02aad"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# CMakePackage Dependency
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/font-util/package.py b/var/spack/repos/builtin/packages/font-util/package.py
index 8dddef8645..5ef6c416ff 100644
--- a/var/spack/repos/builtin/packages/font-util/package.py
+++ b/var/spack/repos/builtin/packages/font-util/package.py
@@ -14,10 +14,13 @@ class FontUtil(AutotoolsPackage, XorgPackage):
license("custom")
+ version("1.4.1", sha256="f029ae80cdd75d89bee7f7af61c21e07982adfb9f72344a158b99f91f77ef5ed")
version("1.4.0", sha256="30b90fe52347916be9b08f95f717f17c9c1f58bef8cabb49014d0fdd2b0df643")
version("1.3.2", sha256="f115a3735604de1e852a4bf669be0269d8ce8f21f8e0e74ec5934b31dadc1e76")
version("1.3.1", sha256="34ebb0c9c14e0a392cdd5ea055c92489ad88d55ae148b2f1cfded0f3f63f2b5b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -220,7 +223,6 @@ class FontUtil(AutotoolsPackage, XorgPackage):
when="fonts=" + f,
)
- conflicts("fonts=font-bh-ttf", when="platform=cray")
conflicts("fonts=font-bh-ttf", when="arch=linux-rhel7-broadwell")
if f != "font-bh-ttf":
@@ -244,9 +246,9 @@ class FontUtil(AutotoolsPackage, XorgPackage):
def font_install(self):
autoconf_args = ["-ifv"]
p = join_path(self.spec["util-macros"].prefix, "share", "aclocal")
- autoconf_args.append("--include={0}".format(p))
+ autoconf_args.append(f"--include={p}")
p = join_path(self.spec.prefix, "share", "aclocal")
- autoconf_args.append("--include={0}".format(p))
+ autoconf_args.append(f"--include={p}")
fonts = self.spec.variants["fonts"].value
autoreconf = which("autoreconf")
@@ -255,5 +257,5 @@ class FontUtil(AutotoolsPackage, XorgPackage):
with working_dir(fontroot[0]):
autoreconf(*autoconf_args)
configure = Executable("./configure")
- configure("--prefix={0}".format(self.prefix))
+ configure(f"--prefix={self.prefix}")
make("install")
diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py
index 20dba87685..e96e177287 100644
--- a/var/spack/repos/builtin/packages/fontconfig/package.py
+++ b/var/spack/repos/builtin/packages/fontconfig/package.py
@@ -14,6 +14,7 @@ class Fontconfig(AutotoolsPackage):
license("MIT")
+ version("2.15.0", sha256="f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4")
version("2.14.2", sha256="3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55")
version("2.13.94", sha256="246d1640a7e54fba697b28e4445f4d9eb63dda1b511d19986249368ee7191882")
version("2.13.93", sha256="0f302a18ee52dde0793fe38b266bf269dfe6e0c0ae140e30d72c6cca5dc08db5")
@@ -22,14 +23,20 @@ class Fontconfig(AutotoolsPackage):
version("2.12.1", sha256="a9f42d03949f948a3a4f762287dbc16e53a927c91a07ee64207ebd90a9e5e292")
version("2.11.1", sha256="b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d")
+ depends_on("c", type="build") # generated
+
+ # freetype2 21.0.15+ provided by freetype 2.8.1+
+ depends_on("freetype@2.8.1:", when="@2.13:")
depends_on("freetype")
- depends_on("gperf", type="build", when="@2.12.2:")
- depends_on("libxml2")
- depends_on("pkgconfig", type="build")
+ depends_on("gperf", type="build", when="@2.11.1:")
+ depends_on("libxml2@2.6:")
+ depends_on("pkgconfig@0.9:", type="build")
depends_on("font-util")
depends_on("uuid", when="@2.13.1:")
depends_on("python@3:", type="build", when="@2.13.93:")
+ variant("pic", default=False, description="Enable position-independent code (PIC)")
+
def patch(self):
"""Make test/run-test.sh compatible with dash"""
filter_file("SIGINT SIGTERM SIGABRT EXIT", "2 15 6 0", "test/run-test.sh")
@@ -42,8 +49,29 @@ class Fontconfig(AutotoolsPackage):
def configure_args(self):
font_path = join_path(self.spec["font-util"].prefix, "share", "fonts")
+ args = ["--enable-libxml2", "--disable-docs", f"--with-default-fonts={font_path}"]
+ ldflags = []
+ libs = []
+ deps = []
+ if self.spec["bzip2"].satisfies("~shared"):
+ deps.append("bzip2")
+ if not self.spec["libpng"].satisfies("libs=shared"):
+ deps.append("libpng")
+ if self.spec["libxml2"].satisfies("~shared"):
+ deps.append("libxml-2.0")
+ if deps:
+ pc = which("pkg-config")
+ for lib in deps:
+ ldflags.append(pc(lib, "--static", "--libs-only-L", output=str).strip())
+ libs.append(pc(lib, "--static", "--libs-only-l", output=str).strip())
+ args.append("LDFLAGS=%s" % " ".join(ldflags))
+ args.append("LIBS=%s" % " ".join(libs))
+
+ if self.spec.satisfies("+pic"):
+ args.append(f"CFLAGS={self.compiler.cc_pic_flag}")
+ args.append(f"FFLAGS={self.compiler.f77_pic_flag}")
- return ["--enable-libxml2", "--disable-docs", "--with-default-fonts={0}".format(font_path)]
+ return args
@run_after("install")
def system_fonts(self):
diff --git a/var/spack/repos/builtin/packages/fonttosfnt/package.py b/var/spack/repos/builtin/packages/fonttosfnt/package.py
index bcda2bee77..730fa99631 100644
--- a/var/spack/repos/builtin/packages/fonttosfnt/package.py
+++ b/var/spack/repos/builtin/packages/fonttosfnt/package.py
@@ -9,17 +9,20 @@ from spack.package import *
class Fonttosfnt(AutotoolsPackage, XorgPackage):
"""Wrap a bitmap font in a sfnt (TrueType) wrapper."""
- homepage = "https://cgit.freedesktop.org/xorg/app/fonttosfnt"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/fonttosfnt"
xorg_mirror_path = "app/fonttosfnt-1.0.4.tar.gz"
license("MIT")
+ version("1.2.3", sha256="f7197c327b3b697afd668d064d1996e0ce709f28adaee6e80b784f5c2d0826db")
version("1.2.2", sha256="8111317c38f63aff08c717595e65381af7ebfc54ccc23511c2042ef1cd86c648")
version("1.0.4", sha256="3873636be5b3b8e4160070e8f9a7a9221b5bd5efbf740d7abaa9092e10732673")
+ depends_on("c", type="build")
+
depends_on("freetype")
depends_on("libfontenc")
- depends_on("xproto")
+ depends_on("xproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/foonathan-memory/package.py b/var/spack/repos/builtin/packages/foonathan-memory/package.py
index 4c288031bd..6a99d02d03 100644
--- a/var/spack/repos/builtin/packages/foonathan-memory/package.py
+++ b/var/spack/repos/builtin/packages/foonathan-memory/package.py
@@ -18,5 +18,7 @@ class FoonathanMemory(CMakePackage):
version("0.7-3", sha256="4203d15db22a94a3978eeb1afb59a37d35c57c0f148733f0f1a53a6281cb74dd")
version("0.7", sha256="01a7cc5a5ebddbd71bec69c89562a4a2ecd7c29334c0a29d38d83e7f7f66eb53")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.14:", when="@0.7-3:", type="build")
depends_on("cmake@3.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/form/package.py b/var/spack/repos/builtin/packages/form/package.py
index 0cd7a1a85d..b3d36d6c00 100644
--- a/var/spack/repos/builtin/packages/form/package.py
+++ b/var/spack/repos/builtin/packages/form/package.py
@@ -24,6 +24,9 @@ class Form(AutotoolsPackage):
url="https://github.com/vermaseren/form/releases/download/v4.1-20131025/form-4.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp", type="link", when="+gmp")
depends_on("zlib-api", type="link", when="+zlib")
depends_on("mpi", type="link", when="+parform")
@@ -37,7 +40,7 @@ class Form(AutotoolsPackage):
def configure_args(self):
args = []
args += self.with_or_without("gmp", "prefix")
- if "+zlib" in self.spec:
+ if self.spec.satisfies("+zlib"):
args.append("--with-zlib=%s" % self.spec["zlib-api"].prefix)
else:
args.append("--without-zlib")
diff --git a/var/spack/repos/builtin/packages/formetis/package.py b/var/spack/repos/builtin/packages/formetis/package.py
index 747eaa9eaf..2866df52a1 100644
--- a/var/spack/repos/builtin/packages/formetis/package.py
+++ b/var/spack/repos/builtin/packages/formetis/package.py
@@ -20,6 +20,9 @@ class Formetis(CMakePackage):
version("0.0.2", sha256="0067c03ca822f4a3955751acb470f21eed489256e2ec5ff24741eb2b638592f1")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Enable ParMETIS support")
variant("shared", default=True, description="Build shared libraries")
variant("swig", default=False, description="Regenerate source files using SWIG")
@@ -50,7 +53,7 @@ class Formetis(CMakePackage):
def setup_smoke_tests(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
@property
def cached_tests_work_dir(self):
@@ -64,7 +67,7 @@ class Formetis(CMakePackage):
self.define("CMAKE_Fortran_COMPILER", self.compiler.fc),
self.define("METIS_ROOT", self.spec["metis"].prefix),
]
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
cmake_args.append(self.define("ParMETIS_ROOT", self.spec["parmetis"].prefix))
cmake_args.append(self.cached_tests_work_dir)
cmake = which(self.spec["cmake"].prefix.bin.cmake)
diff --git a/var/spack/repos/builtin/packages/fortran/package.py b/var/spack/repos/builtin/packages/fortran/package.py
index 082d1224c6..df1d30cf20 100644
--- a/var/spack/repos/builtin/packages/fortran/package.py
+++ b/var/spack/repos/builtin/packages/fortran/package.py
@@ -14,18 +14,16 @@ class Fortran(Package):
homepage = "https://wg5-fortran.org/"
virtual = True
- def test(self):
- test_source = self.test_suite.current_test_data_dir
+ def test_fortran(self):
+ """Compile and run 'Hello world'"""
+ expected = ["Hello world", "YES!"]
+ fc = which(os.environ["FC"])
+ test_source = self.test_suite.current_test_data_dir
for test in os.listdir(test_source):
- filepath = os.path.join(test_source, test)
- exe_name = "%s.exe" % test
-
- fc_exe = os.environ["FC"]
- fc_opts = ["-o", exe_name, filepath]
-
- compiled = self.run_test(fc_exe, options=fc_opts, installed=True)
-
- if compiled:
- expected = ["Hello world", "YES!"]
- self.run_test(exe_name, expected=expected)
+ exe_name = f"{test}.exe"
+ with test_part(self, f"test_fortran_{test}", f"run {exe_name}"):
+ fc("-o", exe_name, join_path(test_source, test))
+ exe = which(exe_name)
+ out = exe(output=str.split, error=str.split)
+ check_outputs(expected, out)
diff --git a/var/spack/repos/builtin/packages/fortrilinos/package.py b/var/spack/repos/builtin/packages/fortrilinos/package.py
index a90a954f6f..c1871ab528 100644
--- a/var/spack/repos/builtin/packages/fortrilinos/package.py
+++ b/var/spack/repos/builtin/packages/fortrilinos/package.py
@@ -49,6 +49,9 @@ class Fortrilinos(CMakePackage):
)
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("hl", default=True, description="Build high-level Trilinos wrappers")
variant("shared", default=True, description="Build shared libraries")
@@ -93,7 +96,7 @@ class Fortrilinos(CMakePackage):
def setup_smoke_tests(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
def test_installation(self):
"""build and run ctest against the installed software"""
diff --git a/var/spack/repos/builtin/packages/fossil/package.py b/var/spack/repos/builtin/packages/fossil/package.py
index 6c62b5b4a5..8d09c815eb 100644
--- a/var/spack/repos/builtin/packages/fossil/package.py
+++ b/var/spack/repos/builtin/packages/fossil/package.py
@@ -26,4 +26,7 @@ class Fossil(AutotoolsPackage):
sha256="300c1d5cdd6224ec6e8c88ab3f38d50f80e4071b503731b75bd61274cf310733",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/foundationdb/package.py b/var/spack/repos/builtin/packages/foundationdb/package.py
index 710bdde150..08cbec0b49 100644
--- a/var/spack/repos/builtin/packages/foundationdb/package.py
+++ b/var/spack/repos/builtin/packages/foundationdb/package.py
@@ -25,6 +25,9 @@ class Foundationdb(CMakePackage):
version("6.3.0", sha256="307f99014fe0bb8fbb05399c303f5a7a5007ceee207810857a7b5e6a7df7c8e8")
version("6.2.24", sha256="9225316e43691ff344224824384acfdf16ff2aac5468d6d810e38846051d5db8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.13.0:", type="build")
depends_on("mono")
diff --git a/var/spack/repos/builtin/packages/fox/package.py b/var/spack/repos/builtin/packages/fox/package.py
index 98e4497473..bcd88f7f6c 100644
--- a/var/spack/repos/builtin/packages/fox/package.py
+++ b/var/spack/repos/builtin/packages/fox/package.py
@@ -19,6 +19,8 @@ class Fox(AutotoolsPackage):
license("LGPL-3.0-or-later")
+ # Stable releases (even numbers, preferred)
+ version("1.7.84", sha256="bdb1fe785605488b58addc95f6091a75873e8a3bea7b83caecfb7f4b0827b34e")
version("1.7.67", sha256="7e511685119ef096fa90d334da46f0e50cfed8d414df32d80a7850442052f57d")
version(
"1.6.57",
@@ -26,6 +28,8 @@ class Fox(AutotoolsPackage):
sha256="65ef15de9e0f3a396dc36d9ea29c158b78fad47f7184780357b929c94d458923",
)
+ depends_on("cxx", type="build") # generated
+
patch("no_rexdebug.patch", when="@1.7.67")
variant("opengl", default=False, description="opengl support")
@@ -48,6 +52,6 @@ class Fox(AutotoolsPackage):
def configure_args(self):
# Make the png link flags explicit or it will try to pick up libpng15
# from system
- args = ["LDFLAGS={0}".format(self.spec["libpng"].libs.search_flags)]
+ args = [f"LDFLAGS={self.spec['libpng'].libs.search_flags}"]
args += self.with_or_without("opengl")
return args
diff --git a/var/spack/repos/builtin/packages/fp16/package.py b/var/spack/repos/builtin/packages/fp16/package.py
index d971dc6a1e..c756d5b4ab 100644
--- a/var/spack/repos/builtin/packages/fp16/package.py
+++ b/var/spack/repos/builtin/packages/fp16/package.py
@@ -21,6 +21,9 @@ class Fp16(CMakePackage):
version("2018-10-10", commit="34d4bf01bbf7376f2baa71b8fa148b18524d45cf") # py-torch@1.0
version("2018-02-25", commit="43d6d17df48ebf622587e7ed9472ea76573799b9") # py-torch@:0.4
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@2.8.12:", type="build")
diff --git a/var/spack/repos/builtin/packages/fpart/package.py b/var/spack/repos/builtin/packages/fpart/package.py
index 12a07a01a8..5fb4168c6b 100644
--- a/var/spack/repos/builtin/packages/fpart/package.py
+++ b/var/spack/repos/builtin/packages/fpart/package.py
@@ -17,9 +17,10 @@ class Fpart(AutotoolsPackage):
maintainers("drkrynstrng")
- license("BSD-2-Clause")
+ license("BSD-2-Clause", checked_by="drkrynstrng")
version("master", branch="master")
+ version("1.6.0", sha256="ed1fac2853fc421071b72e4c5d8455a231bc30e50034db14af8b0485ece6e097")
version("1.5.1", sha256="c353a28f48e4c08f597304cb4ebb88b382f66b7fabfc8d0328ccbb0ceae9220c")
variant("embfts", default=False, description="Build with embedded fts functions")
@@ -34,6 +35,7 @@ class Fpart(AutotoolsPackage):
description="Tools used by fpsync to copy files",
)
+ depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/fpchecker/package.py b/var/spack/repos/builtin/packages/fpchecker/package.py
index 0607838e56..d4f29c354c 100644
--- a/var/spack/repos/builtin/packages/fpchecker/package.py
+++ b/var/spack/repos/builtin/packages/fpchecker/package.py
@@ -25,6 +25,10 @@ class Fpchecker(CMakePackage):
version("0.3.5", sha256="ed7277318af8e0a22b05c5655c9acc99e1d3036af41095ec2f1b1ada4d6e90f6")
version("0.3.4", sha256="ecea778dcddc8347da86b02069e12d574a3ba27a4f7c6224bf492fbff6cd162a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("llvm@12.0.1")
depends_on("cmake@3.4:", type="build")
depends_on("python@3:", type="run")
diff --git a/var/spack/repos/builtin/packages/fping/package.py b/var/spack/repos/builtin/packages/fping/package.py
index 5a243a4808..335624b2db 100644
--- a/var/spack/repos/builtin/packages/fping/package.py
+++ b/var/spack/repos/builtin/packages/fping/package.py
@@ -19,6 +19,8 @@ class Fping(AutotoolsPackage):
version("4.1", sha256="1da45b1d8c2d38b52bebd4f8b1617ddfae678e9f6436dafa6f62e97b8ecfc93c")
version("4.0", sha256="8c9eac7aeadb5be0daa978cdac5f68ae44b749af0f643e8252b5e3dd4ce32e6a")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/fplll/package.py b/var/spack/repos/builtin/packages/fplll/package.py
index 4186175b51..f629bb1bfd 100644
--- a/var/spack/repos/builtin/packages/fplll/package.py
+++ b/var/spack/repos/builtin/packages/fplll/package.py
@@ -28,6 +28,8 @@ class Fplll(AutotoolsPackage):
version("5.1.0", sha256="58175c54cc92752576a64361c73e4ea7797fc18fb703b3f22c7570a09075486f")
version("5.0.3", sha256="d2b11b7dcb26c30ac1aab9ff75aca9b3dd6e0b0b40c382af16017a717dfe05c2")
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp")
depends_on("mpfr")
diff --git a/var/spack/repos/builtin/packages/fplo/package.py b/var/spack/repos/builtin/packages/fplo/package.py
index f294fc05d3..61e8f4da09 100644
--- a/var/spack/repos/builtin/packages/fplo/package.py
+++ b/var/spack/repos/builtin/packages/fplo/package.py
@@ -136,5 +136,4 @@ class Fplo(MakefilePackage):
pattern = "^#!.*/usr/bin/perl"
repl = "#!{0}".format(self.spec["perl"].command.path)
files = ["fconv2", "fconvdens2", "fdowngrad.pl", "fout2in", "grBhfat", "grpop"]
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
diff --git a/var/spack/repos/builtin/packages/fpm/package.py b/var/spack/repos/builtin/packages/fpm/package.py
index 5a1d2148d8..5701a24e58 100644
--- a/var/spack/repos/builtin/packages/fpm/package.py
+++ b/var/spack/repos/builtin/packages/fpm/package.py
@@ -25,6 +25,7 @@ class Fpm(Package):
license("MIT")
+ version("0.10.0", sha256="00d687e17bdada4dcae0ff1ea2e01bad287dcc77a74c3bbde0c9ff9633b655bb")
version("0.9.0", sha256="484debabd7d22186ac41f865ddf63475c279a61a51aaff5636ed615860b5b8d7")
version("0.8.2", sha256="67fd8f4f78d19662c61855f531465e347ab0bc913ba59bd419f75f4022d2cd70")
version("0.8.1", sha256="0bd978bb1d3f2a3297d82a0d6ac009746a466cfa9a59ba3b6513b74e5ce4b7bf")
@@ -40,14 +41,17 @@ class Fpm(Package):
depends_on("curl", type="build")
depends_on("git@1.8.5:", type="build")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
def setup_build_environment(self, env):
- if "@0.4.0" in self.spec:
+ if self.spec.satisfies("@0.4.0"):
env.set("FPM_C_COMPILER", self.compiler.cc)
env.set("FPM_CC", self.compiler.cc)
fflags = "-O3"
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
fflags += " " + self.compiler.openmp_flag
env.set("FFLAGS", fflags)
diff --git a/var/spack/repos/builtin/packages/fpocket/package.py b/var/spack/repos/builtin/packages/fpocket/package.py
index 3b50ee6883..833bf24fff 100644
--- a/var/spack/repos/builtin/packages/fpocket/package.py
+++ b/var/spack/repos/builtin/packages/fpocket/package.py
@@ -17,7 +17,11 @@ class Fpocket(MakefilePackage):
license("MIT")
- version("4.1", "1a2af2d3f2df42de67301996db3b93c7eaff0375f866443c0468dcf4b1750688")
+ version("4.2", sha256="8aea4ccdf4243606110c8f6978b13dd90f9cae092660eca4c6970206011de4aa")
+ version("4.1", sha256="1a2af2d3f2df42de67301996db3b93c7eaff0375f866443c0468dcf4b1750688")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("netcdf-c")
depends_on("netcdf-cxx")
diff --git a/var/spack/repos/builtin/packages/fpzip/package.py b/var/spack/repos/builtin/packages/fpzip/package.py
index 7a5c011b19..6c4da7cb87 100644
--- a/var/spack/repos/builtin/packages/fpzip/package.py
+++ b/var/spack/repos/builtin/packages/fpzip/package.py
@@ -19,3 +19,6 @@ class Fpzip(CMakePackage):
version("master", branch="master")
version("1.3.0", sha256="248df7d84259e3feaa4c4797956b2a77c3fcd734e8f8fdc51ce171dcf4f0136c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fqtrim/package.py b/var/spack/repos/builtin/packages/fqtrim/package.py
index 88d80ee345..95321c2432 100644
--- a/var/spack/repos/builtin/packages/fqtrim/package.py
+++ b/var/spack/repos/builtin/packages/fqtrim/package.py
@@ -19,6 +19,8 @@ class Fqtrim(MakefilePackage):
version("0.9.7", sha256="4951538f69dde14a23fc4841ff020434d26eb9622c4e06b43c068c702aa3d0d6")
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
make("release")
diff --git a/var/spack/repos/builtin/packages/fraggenescan/package.py b/var/spack/repos/builtin/packages/fraggenescan/package.py
index 89aab4e736..32e42333de 100644
--- a/var/spack/repos/builtin/packages/fraggenescan/package.py
+++ b/var/spack/repos/builtin/packages/fraggenescan/package.py
@@ -17,6 +17,8 @@ class Fraggenescan(MakefilePackage):
version("1.31", sha256="cd3212d0f148218eb3b17d24fcd1fc897fb9fee9b2c902682edde29f895f426c")
version("1.30", sha256="f2d7f0dfa4a5f4bbea295ed865dcbfedf16c954ea1534c2a879ebdcfb8650d95")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
filter_file("gcc", spack_cc, "Makefile", string=True)
diff --git a/var/spack/repos/builtin/packages/freebayes/package.py b/var/spack/repos/builtin/packages/freebayes/package.py
index 003a652cd7..1931c5e33f 100644
--- a/var/spack/repos/builtin/packages/freebayes/package.py
+++ b/var/spack/repos/builtin/packages/freebayes/package.py
@@ -25,6 +25,9 @@ class Freebayes(MesonPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/freecad/package.py b/var/spack/repos/builtin/packages/freecad/package.py
index 1a395a5dad..3d5af41729 100644
--- a/var/spack/repos/builtin/packages/freecad/package.py
+++ b/var/spack/repos/builtin/packages/freecad/package.py
@@ -21,6 +21,10 @@ class Freecad(CMakePackage):
version("0.20.2", sha256="46922f3a477e742e1a89cd5346692d63aebb2b67af887b3e463e094a4ae055da")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("opencascade")
depends_on("xerces-c")
depends_on("vtk")
diff --git a/var/spack/repos/builtin/packages/freefem/package.py b/var/spack/repos/builtin/packages/freefem/package.py
index 712a1b9b96..37ca96d694 100644
--- a/var/spack/repos/builtin/packages/freefem/package.py
+++ b/var/spack/repos/builtin/packages/freefem/package.py
@@ -19,6 +19,10 @@ class Freefem(AutotoolsPackage):
maintainers("corentin-dev")
+ version("4.14", sha256="931cbfe9ef6f6530756c300c5ae47bfdaca21c560a5407cb33325a376a3b6af8")
+ version("4.13", sha256="aefd4ff02333209f7433abef2e74acb621b6946063ff27e81cf2da43120b6ae4")
+ version("4.12", sha256="291c5f46761711d6303914f9c4f165fd85a7b7b69141f7473e0b6484ce6ab0f5")
+ version("4.11", sha256="d0c6921791e5f94646d8dde4d9ed3c11b979e47e7bbb3c0a66467b04dd56983a")
version("4.10", sha256="957994c8f24cc2a671b8c116ae530796c3a431d4157ee71a3d6aab7122e7570d")
version("4.9", sha256="299ba2b73dfff578b7890f693c1e835680bf55eba87263cabd60d81909e1e0e4")
version("4.8", sha256="499b1ca24d45088226a238412ea1492d9cc3eb6088866904145511469780180d")
@@ -27,6 +31,10 @@ class Freefem(AutotoolsPackage):
version("4.6", sha256="6c09af8e189fc02214b0e664b679b49832c134e29cf1ede3cab29cf754f6078f")
version("4.5", sha256="5b2d4125c312da8fbedd49a72e742f18f35e0ae100c82fb493067dfad5d51432")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Activate MPI support")
variant("petsc", default=False, description="Compile with PETSc/SLEPc")
@@ -67,7 +75,7 @@ class Freefem(AutotoolsPackage):
"CXXFLAGS=%s" % " ".join(spec.compiler_flags["cxxflags"]),
]
- if "+petsc" in spec:
+ if spec.satisfies("+petsc"):
options.append("--with-petsc=%s" % spec["petsc"].prefix.lib.petsc.conf.petscvariables)
options.append("--with-slepc-ldflags=%s" % spec["slepc"].libs.ld_flags)
options.append("--with-slepc-include=%s" % spec["slepc"].headers.include_flags)
diff --git a/var/spack/repos/builtin/packages/freeglut/package.py b/var/spack/repos/builtin/packages/freeglut/package.py
index 993f4dc29e..79e04f3885 100644
--- a/var/spack/repos/builtin/packages/freeglut/package.py
+++ b/var/spack/repos/builtin/packages/freeglut/package.py
@@ -10,7 +10,7 @@ class Freeglut(CMakePackage, SourceforgePackage):
"""FreeGLUT is a free-software/open-source alternative to the OpenGL
Utility Toolkit (GLUT) library"""
- homepage = "http://freeglut.sourceforge.net/"
+ homepage = "https://freeglut.sourceforge.net/"
sourceforge_mirror_path = "freeglut/freeglut-3.2.1.tar.gz"
license("MIT")
@@ -19,6 +19,9 @@ class Freeglut(CMakePackage, SourceforgePackage):
version("3.2.1", sha256="d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68")
version("3.0.0", sha256="2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libs instead of static")
depends_on("gl")
@@ -27,16 +30,12 @@ class Freeglut(CMakePackage, SourceforgePackage):
# FreeGLUT does not support OSMesa
conflicts("^osmesa")
- # FreeGLUT only works with GLX on linux (cray is also linux)
+ # FreeGLUT only works with GLX on linux
with when("platform=linux"):
depends_on("glx")
depends_on("libx11")
depends_on("libxi")
depends_on("libxxf86vm")
- with when("platform=cray"):
- depends_on("glx")
- depends_on("libx11")
- depends_on("libxi")
# freeglut 3.2.1 fails to build with -fno-common (default with newer compilers)
# see https://bugs.gentoo.org/705840 and https://github.com/dcnieho/FreeGLUT/pull/76
diff --git a/var/spack/repos/builtin/packages/freeimage/package.py b/var/spack/repos/builtin/packages/freeimage/package.py
index a0e6ae2e26..f3ac391b7b 100644
--- a/var/spack/repos/builtin/packages/freeimage/package.py
+++ b/var/spack/repos/builtin/packages/freeimage/package.py
@@ -11,7 +11,7 @@ class Freeimage(MakefilePackage):
to support popular graphics image formats like PNG, BMP, JPEG, TIFF and
others as needed by today's multimedia applications"""
- homepage = "http://freeimage.sourceforge.net/"
+ homepage = "https://freeimage.sourceforge.net/"
version("3.18.0", sha256="f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd")
diff --git a/var/spack/repos/builtin/packages/freeipmi/package.py b/var/spack/repos/builtin/packages/freeipmi/package.py
index 2e2b23a614..443bed5176 100644
--- a/var/spack/repos/builtin/packages/freeipmi/package.py
+++ b/var/spack/repos/builtin/packages/freeipmi/package.py
@@ -28,6 +28,8 @@ class Freeipmi(AutotoolsPackage):
version("1.6.9", sha256="f25e1c35f3d0f1b5a99cc31ecc2353ca83ed46a15163842fba870127dc9c8206")
version("1.6.4", sha256="65dfbb95a30438ba247f01a58498862a37d2e71c8c950bcfcee459d079241a3c")
+ depends_on("c", type="build") # generated
+
depends_on("libgcrypt")
parallel = False
diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py
index 0ebfaa8113..2878426951 100644
--- a/var/spack/repos/builtin/packages/freetype/package.py
+++ b/var/spack/repos/builtin/packages/freetype/package.py
@@ -16,11 +16,25 @@ class Freetype(AutotoolsPackage, CMakePackage):
homepage = "https://www.freetype.org/index.html"
url = "https://download.savannah.gnu.org/releases/freetype/freetype-2.10.1.tar.gz"
+ list_url = "https://download.savannah.gnu.org/releases/freetype/freetype-old/"
maintainers("michaelkuhn")
license("FTL OR GPL-2.0-or-later")
+ version("2.13.3", sha256="5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747")
+ # Freetype 2.13.3 broke the public interface, so marking 2.13.2 as preferred in spack 0.23
+ # Once spack 0.23 has been released, this preference can be removed again.
+ # https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/330
+ version(
+ "2.13.2",
+ sha256="1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5",
+ preferred=True,
+ )
+ version("2.13.1", sha256="0b109c59914f25b4411a8de2a506fdd18fa8457eb86eca6c7b15c19110a92fa5")
+ version("2.13.0", sha256="a7aca0e532a276ea8d85bd31149f0a74c33d19c8d287116ef8f5f8357b4f1f80")
+ version("2.12.1", sha256="efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938")
+ version("2.12.0", sha256="7940a46eeb0255baaa87c553d72778c4f8daa2b8888c8e2a05766a2a8686740c")
version("2.11.1", sha256="f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b")
version("2.11.0", sha256="a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f")
version("2.10.4", sha256="5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac")
@@ -30,13 +44,17 @@ class Freetype(AutotoolsPackage, CMakePackage):
version("2.9.1", sha256="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce")
version("2.7.1", sha256="162ef25aa64480b1189cdb261228e6c5c44f212aac4b4621e28cf2157efb59f5")
version("2.7", sha256="7b657d5f872b0ab56461f3bd310bd1c5ec64619bd15f0d8e08282d494d9cfea4")
+ version("2.6.1", sha256="0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014")
version("2.5.3", sha256="41217f800d3f40d78ef4eb99d6a35fd85235b64f81bc56e4812d7672fca7b806")
+ depends_on("c", type="build") # generated
+
+ # CMake build does not install freetype-config, which is needed by most packages
build_system("cmake", "autotools", default="autotools")
depends_on("bzip2")
depends_on("libpng")
- for plat in ["linux", "darwin", "cray"]:
+ for plat in ["linux", "darwin"]:
depends_on("pkgconfig", type="build", when="platform=%s" % plat)
conflicts(
@@ -53,6 +71,14 @@ class Freetype(AutotoolsPackage, CMakePackage):
patch("windows.patch", when="@2.9.1")
+ def url_for_version(self, version):
+ url = "https://download.savannah.gnu.org/releases/{}/freetype-{}.tar.gz"
+ if version >= Version("2.7"):
+ directory = "freetype"
+ else:
+ directory = "freetype/freetype-old"
+ return url.format(directory, version)
+
@property
def headers(self):
headers = find_headers("*", self.prefix.include, recursive=True)
@@ -61,6 +87,8 @@ class Freetype(AutotoolsPackage, CMakePackage):
class AutotoolsBuilder(AutotoolsBuilder):
+ build_directory = "builds/unix"
+
def configure_args(self):
args = [
"--with-brotli=no",
diff --git a/var/spack/repos/builtin/packages/freexl/package.py b/var/spack/repos/builtin/packages/freexl/package.py
index 4ba17479e1..3288dd477e 100644
--- a/var/spack/repos/builtin/packages/freexl/package.py
+++ b/var/spack/repos/builtin/packages/freexl/package.py
@@ -13,4 +13,20 @@ class Freexl(AutotoolsPackage):
homepage = "https://www.gaia-gis.it"
url = "http://www.gaia-gis.it/gaia-sins/freexl-1.0.5.tar.gz"
+ version("2.0.0", sha256="176705f1de58ab7c1eebbf5c6de46ab76fcd8b856508dbd28f5648f7c6e1a7f0")
+ version("1.0.6", sha256="3de8b57a3d130cb2881ea52d3aa9ce1feedb1b57b7daa4eb37f751404f90fc22")
version("1.0.5", sha256="3dc9b150d218b0e280a3d6a41d93c1e45f4d7155829d75f1e5bf3e0b0de6750d")
+
+ depends_on("c", type="build")
+
+ depends_on("minizip", when="@2:")
+ depends_on("expat", type="link")
+ depends_on("iconv", type="link")
+
+ def flag_handler(self, name, flags):
+ # avoid that header is taken from libiconv, but library from libc -- configure script is
+ # missing a compile + link test.
+ iconv = self.spec["iconv"]
+ if name == "ldflags" and iconv.name == "libiconv":
+ flags.append(iconv.libs.ld_flags)
+ return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/fribidi/package.py b/var/spack/repos/builtin/packages/fribidi/package.py
index beea8647cb..b657b2dceb 100644
--- a/var/spack/repos/builtin/packages/fribidi/package.py
+++ b/var/spack/repos/builtin/packages/fribidi/package.py
@@ -20,6 +20,8 @@ class Fribidi(AutotoolsPackage):
version("1.0.8", sha256="94c7b68d86ad2a9613b4dcffe7bbeb03523d63b5b37918bdf2e4ef34195c1e6c")
version("1.0.5", sha256="6a64f2a687f5c4f203a46fa659f43dd43d1f8b845df8d723107e8a7e6158e4ce")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/frontier-client/package.py b/var/spack/repos/builtin/packages/frontier-client/package.py
index 2c9d9f03a7..1ffafa9ada 100644
--- a/var/spack/repos/builtin/packages/frontier-client/package.py
+++ b/var/spack/repos/builtin/packages/frontier-client/package.py
@@ -20,6 +20,9 @@ class FrontierClient(MakefilePackage):
version("2_8_21", sha256="7df9ba61c3e1778aca75c5da6e45ee4d00b5c061d3f7162208e2fbd2ec266a9e")
version("2_8_20", sha256="81b0f45762d96a33f156e0238631a60eef910a176644e95c6c19a36824bef7e1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pacparser")
depends_on("expat")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/frontistr/package.py b/var/spack/repos/builtin/packages/frontistr/package.py
index 0691a40935..d383f96cc5 100644
--- a/var/spack/repos/builtin/packages/frontistr/package.py
+++ b/var/spack/repos/builtin/packages/frontistr/package.py
@@ -58,3 +58,7 @@ class Frontistr(FrontistrBase):
version("5.1", tag="v5.1", commit="f3fe347a8fd83cd45983476521d43061c8528da0")
version("5.0", tag="v5.0", commit="39b83f057a2639af4b5083fb911e0726f0972b75")
version("master", tag="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fsl/package.py b/var/spack/repos/builtin/packages/fsl/package.py
index cae1ff6ecd..746005e3d1 100644
--- a/var/spack/repos/builtin/packages/fsl/package.py
+++ b/var/spack/repos/builtin/packages/fsl/package.py
@@ -6,6 +6,7 @@
import glob
import os
+import spack.util.environment
from spack.package import *
from spack.util.environment import EnvironmentModifications
@@ -111,7 +112,7 @@ class Fsl(Package, CudaPackage):
vtk_settings.filter(r"(^VTKDIR_LIB)\s*=.*", r"\1 = {0}".format(vtk_lib_dir))
vtk_settings.filter(r"(^VTKSUFFIX)\s*=.*", r"\1 = -{0}".format(vtk_suffix))
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
cuda_gencode = " ".join(self.cuda_flags(cuda_arch))
cuda_installation = self.spec["cuda"].prefix
diff --git a/var/spack/repos/builtin/packages/fslsfonts/package.py b/var/spack/repos/builtin/packages/fslsfonts/package.py
index d08250cc2f..c1af295066 100644
--- a/var/spack/repos/builtin/packages/fslsfonts/package.py
+++ b/var/spack/repos/builtin/packages/fslsfonts/package.py
@@ -9,14 +9,16 @@ from spack.package import *
class Fslsfonts(AutotoolsPackage, XorgPackage):
"""fslsfonts produces a list of fonts served by an X font server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/fslsfonts"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/fslsfonts"
xorg_mirror_path = "app/fslsfonts-1.0.5.tar.gz"
version("1.0.6", sha256="17179e32cfc4588da9e8aa1aa21f862af265d673de64fe5e3a8556921caccb28")
version("1.0.5", sha256="27e58d2313835ce0f08cf47c59a43798b122f605a55f54b170db27b57a492007")
+ depends_on("c", type="build")
+
depends_on("libfs")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/fstobdf/package.py b/var/spack/repos/builtin/packages/fstobdf/package.py
index 2d316b4474..c8f9caecfa 100644
--- a/var/spack/repos/builtin/packages/fstobdf/package.py
+++ b/var/spack/repos/builtin/packages/fstobdf/package.py
@@ -12,15 +12,17 @@ class Fstobdf(AutotoolsPackage, XorgPackage):
This is useful in testing servers, debugging font metrics, and
reproducing lost BDF files."""
- homepage = "https://cgit.freedesktop.org/xorg/app/fstobdf"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/fstobdf"
xorg_mirror_path = "app/fstobdf-1.0.6.tar.gz"
version("1.0.7", sha256="5cf1f697415dc5f66df24d7495471dbd5bc3812580773e4c700ead5db27503cf")
version("1.0.6", sha256="bb903ae76cbcb0a08a71f06762b64db7d5c2064f6e88e8dc3a604e76d0bcb93d")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libfs")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/fstrack/package.py b/var/spack/repos/builtin/packages/fstrack/package.py
index 4a0da90af8..a6bd204c3e 100644
--- a/var/spack/repos/builtin/packages/fstrack/package.py
+++ b/var/spack/repos/builtin/packages/fstrack/package.py
@@ -21,6 +21,9 @@ class Fstrack(MakefilePackage):
"0.5.3.092918", sha256="34b31687fdfa207b9659425238b805eaacf0b0209e7e3343c1a3cb4c9e62345d"
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("flow", default=True, description="Build the flow tracker")
depends_on("gmt@4.0:4", when="+flow")
@@ -40,7 +43,7 @@ class Fstrack(MakefilePackage):
env.set("F90FLAGS_DEBUG", "-g -x f95-cpp-input")
env.set("LDFLAGS", "-lm")
- if "+flow" in self.spec:
+ if self.spec.satisfies("+flow"):
env.set("GMTHOME", self.spec["gmt"].prefix)
env.set("NETCDFDIR", self.spec["netcdf-c"].prefix)
@@ -52,7 +55,7 @@ class Fstrack(MakefilePackage):
make()
with working_dir("fstrack"):
- if "+flow" in spec:
+ if spec.satisfies("+flow"):
make("really_all")
else:
make()
diff --git a/var/spack/repos/builtin/packages/ftgl/package.py b/var/spack/repos/builtin/packages/ftgl/package.py
index d9ac0dba6d..3798f8457d 100644
--- a/var/spack/repos/builtin/packages/ftgl/package.py
+++ b/var/spack/repos/builtin/packages/ftgl/package.py
@@ -18,12 +18,12 @@ class Ftgl(CMakePackage):
version("2.4.0", commit="483639219095ad080538e07ceb5996de901d4e74")
version("2.3.1", commit="3c0fdf367824b6381f29df3d8b4590240db62ab7")
- # FIXME: Doc generation is broken in upstream build system
- # variant('doc', default=False, description='Build the documentation')
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build as a shared library")
depends_on("cmake@2.8:", type="build")
- # depends_on('doxygen', type='build', when='+doc') -- FIXME, see above
depends_on("pkgconfig", type="build")
depends_on("gl")
depends_on("glu")
@@ -32,9 +32,23 @@ class Ftgl(CMakePackage):
# Fix oversight in CMakeLists
patch("remove-ftlibrary-from-sources.diff", when="@:2.4.0")
+ # As reported by Khem Raj in
+ # https://github.com/kraj/ftgl/commit/37ed7d606a0dfecdcb4ab0c26d1b0132cd96d5fa
+ # freetype 2.13.3 changed the type of many external chars to unsigned char!
+ patch(
+ "https://patch-diff.githubusercontent.com/raw/frankheckenbach/ftgl/pull/20.patch?full_index=1",
+ sha256="e2a0810fbf68403931bef4fbfda22e010e01421c92eeaa45f62e4e47f2381ebd",
+ when="^freetype@2.13.3:",
+ )
+
def cmake_args(self):
spec = self.spec
args = ["-DBUILD_SHARED_LIBS={0}".format(spec.satisfies("+shared"))]
+
+ # To not fail the build for 'char/unsigned char' conversion errors,
+ # downgrade them to warnings in general to not fail the build:
+ args.append("-DCMAKE_CXX_FLAGS=-fpermissive")
+
if "darwin" in self.spec.architecture:
args.append("-DCMAKE_MACOSX_RPATH=ON")
return args
diff --git a/var/spack/repos/builtin/packages/ftjam/package.py b/var/spack/repos/builtin/packages/ftjam/package.py
index c54a9427e0..df26fa71b6 100644
--- a/var/spack/repos/builtin/packages/ftjam/package.py
+++ b/var/spack/repos/builtin/packages/ftjam/package.py
@@ -15,4 +15,6 @@ class Ftjam(AutotoolsPackage):
version("2.5.2", sha256="a5d456f65477d77936e1726f5f803a2e6def18a6c6fccf5ea8528926c136abc8")
+ depends_on("c", type="build") # generated
+
depends_on("bison")
diff --git a/var/spack/repos/builtin/packages/ftk/package.py b/var/spack/repos/builtin/packages/ftk/package.py
index 44276329c4..c53450588a 100644
--- a/var/spack/repos/builtin/packages/ftk/package.py
+++ b/var/spack/repos/builtin/packages/ftk/package.py
@@ -29,6 +29,9 @@ class Ftk(CMakePackage):
version("0.0.5", sha256="9d5c84a73b7761b9fc7dac62d4296df9f3052b722ec1b06518b2b8f51a8d3440")
version("0.0.4", sha256="1674904da8d88dbd4c7d2b6a2629883f0444e70aefc99b48d285735d394897fa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# variants
variant("adios2", default=False, description="Use ADIOS2")
variant("cuda", default=False, description="Use CUDA")
diff --git a/var/spack/repos/builtin/packages/ftobjectlibrary/package.py b/var/spack/repos/builtin/packages/ftobjectlibrary/package.py
index fe0e6c62d2..ea544bd2f9 100644
--- a/var/spack/repos/builtin/packages/ftobjectlibrary/package.py
+++ b/var/spack/repos/builtin/packages/ftobjectlibrary/package.py
@@ -19,3 +19,5 @@ class Ftobjectlibrary(CMakePackage):
license("MIT")
version("main", branch="main")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ftxui/package.py b/var/spack/repos/builtin/packages/ftxui/package.py
index 92b72c0c26..c572f4132a 100644
--- a/var/spack/repos/builtin/packages/ftxui/package.py
+++ b/var/spack/repos/builtin/packages/ftxui/package.py
@@ -15,6 +15,9 @@ class Ftxui(CMakePackage):
license("MIT")
+ version("5.0.0", sha256="a2991cb222c944aee14397965d9f6b050245da849d8c5da7c72d112de2786b5b")
version("4.1.1", sha256="9009d093e48b3189487d67fc3e375a57c7b354c0e43fc554ad31bec74a4bc2dd")
version("4.0.0", sha256="7276e4117429ebf8e34ea371c3ea4e66eb99e0f234cb4c5c85fca17174a53dfa")
version("2.0.0", sha256="d891695ef22176f0c09f8261a37af9ad5b262dd670a81e6b83661a23abc2c54f")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/fujitsu-fftw/package.py b/var/spack/repos/builtin/packages/fujitsu-fftw/package.py
index 29ea363b1d..c647b94445 100644
--- a/var/spack/repos/builtin/packages/fujitsu-fftw/package.py
+++ b/var/spack/repos/builtin/packages/fujitsu-fftw/package.py
@@ -36,6 +36,9 @@ class FujitsuFftw(FftwBase):
version("1.1.0", sha256="47b01a20846802041a9533a115f816b973cc9b15b3e827a2f0caffaae34a6c9d")
version("1.0.0", sha256="b5931e352355d8d1ffeb215922f4b96de11b8585c423fceeaffbf3d5436f6f2f")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
variant("openmp", default=True, description="Enable OpenMP support")
variant("debug", default=False, description="Builds a debug version of the library")
@@ -75,23 +78,23 @@ class FujitsuFftw(FftwBase):
"ac_cv_prog_f77_v=-###",
]
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
options.append("--enable-shared")
else:
options.append("--disable-shared")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
options.append("--enable-openmp")
options.append("OPENMP_CFLAGS=-Kopenmp")
else:
options.append("--disable-openmp")
- if "+threads" in spec:
+ if spec.satisfies("+threads"):
options.append("--enable-threads")
else:
options.append("--disable-threads")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
options.append("--enable-mpi")
else:
options.append("--disable-mpi")
diff --git a/var/spack/repos/builtin/packages/fujitsu-frontistr/package.py b/var/spack/repos/builtin/packages/fujitsu-frontistr/package.py
index 06e184f296..618927ebc8 100644
--- a/var/spack/repos/builtin/packages/fujitsu-frontistr/package.py
+++ b/var/spack/repos/builtin/packages/fujitsu-frontistr/package.py
@@ -23,6 +23,10 @@ class FujitsuFrontistr(FrontistrBase):
version("5.2", sha256="ebf73a96c33ae7c9e616c99f9ce07ec90d802764dbf6abf627b0083c3bbd2b2e")
version("5.0", sha256="7a3a2dd0f834048fb71cc254c9da6c2637fb23110e79b5efaf208d6f69a5b30a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("static", default=True, description="Build with static linkage")
depends_on("metis ~shared", when="+static")
depends_on("mumps ~shared", when="+static")
diff --git a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
index 07a6631860..36c6cec584 100644
--- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
+++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py
@@ -14,7 +14,15 @@ class FujitsuMpi(Package):
homepage = "https://www.fujitsu.com/us/"
provides("mpi@3.1:")
- requires("%fj")
+ requires(
+ "%fj@4:",
+ "%clang@11:",
+ "%gcc@8:",
+ policy="one_of",
+ msg="currently only supports Fujitsu, Clang, or GCC compilers",
+ )
+
+ requires("platform=linux")
def install(self, spec, prefix):
raise InstallError("Fujitsu MPI is not installable; it is vendor supplied")
@@ -36,18 +44,43 @@ class FujitsuMpi(Package):
return find_libraries(libraries, root=self.prefix, shared=True, recursive=True)
def setup_dependent_package(self, module, dependent_spec):
- self.spec.mpicc = self.prefix.bin.mpifcc
- self.spec.mpicxx = self.prefix.bin.mpiFCC
- self.spec.mpif77 = self.prefix.bin.mpifrt
- self.spec.mpifc = self.prefix.bin.mpifrt
+ if self.spec.satisfies("%gcc"):
+ self.spec.mpicc = self.prefix.bin.mpicc
+ self.spec.mpicxx = self.prefix.bin.mpicxx
+ self.spec.mpif77 = self.prefix.bin.mpif77
+ self.spec.mpifc = self.prefix.bin.mpifort
+ else:
+ self.spec.mpicc = self.prefix.bin.mpifcc
+ self.spec.mpicxx = self.prefix.bin.mpiFCC
+ self.spec.mpif77 = self.prefix.bin.mpifrt
+ self.spec.mpifc = self.prefix.bin.mpifrt
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
+ # Use the spack compiler wrappers under MPI
+ dependent_module = dependent_spec.package.module
+ env.set("OMPI_CC", dependent_module.spack_cc)
+ env.set("OMPI_CXX", dependent_module.spack_cxx)
+ env.set("OMPI_FC", dependent_module.spack_fc)
+ env.set("OMPI_F77", dependent_module.spack_f77)
+ if self.spec.satisfies("%gcc"):
+ env.set("MPI_C_COMPILER", self.prefix.bin.mpicc)
+ env.set("MPI_CXX_COMPILER", self.prefix.bin.mpicxx)
+ env.set("MPI_Fortran_COMPILER", self.prefix.bin.mpifort)
+ else:
+ env.set("MPI_C_COMPILER", self.prefix.bin.mpifcc)
+ env.set("MPI_CXX_COMPILER", self.prefix.bin.mpiFCC)
+ env.set("MPI_Fortran_COMPILER", self.prefix.bin.mpifrt)
def setup_run_environment(self, env):
# Because MPI are both compilers and runtimes, we set up the compilers
# as part of run environment
- env.set("MPICC", self.prefix.bin.mpifcc)
- env.set("MPICXX", self.prefix.bin.mpiFCC)
- env.set("MPIF77", self.prefix.bin.mpifrt)
- env.set("MPIF90", self.prefix.bin.mpifrt)
+ if self.spec.satisfies("%gcc"):
+ env.set("MPICC", self.prefix.bin.mpicc)
+ env.set("MPICXX", self.prefix.bin.mpicxx)
+ env.set("MPIF77", self.prefix.bin.mpif77)
+ env.set("MPIF90", self.prefix.bin.mpifort)
+ else:
+ env.set("MPICC", self.prefix.bin.mpifcc)
+ env.set("MPICXX", self.prefix.bin.mpiFCC)
+ env.set("MPIF77", self.prefix.bin.mpifrt)
+ env.set("MPIF90", self.prefix.bin.mpifrt)
diff --git a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py
index 76682cc862..a12b8ca0e9 100644
--- a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py
+++ b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py
@@ -35,25 +35,25 @@ class FujitsuSsl2(Package):
spec = self.spec
libslist = []
if spec.target == "a64fx": # Build with SVE support
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libfjlapackexsve.so")
else:
libslist.append("libfjlapacksve.so")
else:
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libfjlapackex.so")
else:
libslist.append("libfjlapack.so")
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.extend(["libfjomphk.so", "libfjomp.so"])
if spec.target == "a64fx": # Build with SVE support
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libssl2mtexsve.a")
libslist.append("libssl2mtsve.a")
else:
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libssl2mtex.a")
libslist.append("libssl2mt.a")
@@ -81,7 +81,7 @@ class FujitsuSsl2(Package):
libslist = []
if spec.target == "a64fx": # Build with SVE support
libslist.append("libfjscalapacksve.so")
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libfjlapackexsve.so")
else:
libslist.append("libfjlapacksve.so")
@@ -89,7 +89,7 @@ class FujitsuSsl2(Package):
else:
libslist.append("libfjscalapack.so")
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libfjlapackex.so")
else:
libslist.append("libfjlapack.so")
@@ -97,15 +97,15 @@ class FujitsuSsl2(Package):
libslist.extend(["libmpi_usempi_ignore_tkr.so", "libmpi_mpifh.so"])
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.extend(["libfjomphk.so", "libfjomp.so"])
if spec.target == "a64fx": # Build with SVE support
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libssl2mtexsve.a")
libslist.append("libssl2mtsve.a")
else:
- if "+parallel" in spec: # parallel
+ if spec.satisfies("+parallel"): # parallel
libslist.append("libssl2mtex.a")
libslist.append("libssl2mt.a")
diff --git a/var/spack/repos/builtin/packages/fullock/package.py b/var/spack/repos/builtin/packages/fullock/package.py
index 2009c03628..487e29dce1 100644
--- a/var/spack/repos/builtin/packages/fullock/package.py
+++ b/var/spack/repos/builtin/packages/fullock/package.py
@@ -16,6 +16,7 @@ class Fullock(AutotoolsPackage):
license("MIT")
+ version("1.0.59", sha256="6e1758f52d438b365c439d3518cae47df5334fd73adbd781c932497d2aaaafca")
version("1.0.50", sha256="7222976883289376c1b88fd30ecd3ab2f055316103b97df4aa71192954072848")
version("1.0.39", sha256="0089d4446e3102b5de39e3d18c1b7e5c9567deb77a4e60963e15b5c1b23a594d")
version("1.0.36", sha256="68d0dc9036c2c1871653b4626a594f57663973c159f083ec68647c60ddc919f7")
@@ -24,6 +25,8 @@ class Fullock(AutotoolsPackage):
version("1.0.33", sha256="31a292e50553abf71058b47277dbca37d25a772cf99c0f99c85e56dfcd11edb2")
version("1.0.32", sha256="57d4ca06e5b88a98745062f55ee5ce37c88a49d59d58d09c5178fa1eee4d8353")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/funhpc/package.py b/var/spack/repos/builtin/packages/funhpc/package.py
index f9745c18c7..776da697d8 100644
--- a/var/spack/repos/builtin/packages/funhpc/package.py
+++ b/var/spack/repos/builtin/packages/funhpc/package.py
@@ -17,6 +17,8 @@ class Funhpc(CMakePackage):
version("develop", branch="master")
version("1.3.0", sha256="140e60f55a307f21117bd43fa16db35d60c0df5ef37e17a4da1cb3f5da5e29c1")
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=True, description="Produce position-independent code")
depends_on("cereal")
@@ -29,7 +31,7 @@ class Funhpc(CMakePackage):
def cmake_args(self):
spec = self.spec
options = ["-DGTEST_ROOT=%s" % spec["googletest"].prefix]
- if "+pic" in spec:
+ if spec.satisfies("+pic"):
options += ["-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true"]
return options
diff --git a/var/spack/repos/builtin/packages/funwave/package.py b/var/spack/repos/builtin/packages/funwave/package.py
index f4b4023dd8..1594093df9 100644
--- a/var/spack/repos/builtin/packages/funwave/package.py
+++ b/var/spack/repos/builtin/packages/funwave/package.py
@@ -28,6 +28,8 @@ class Funwave(MakefilePackage):
version("3.1", tag="v3.1", commit="d99502f9288380e0c823f7cc619c6c7c1897f2b9")
version("3.0", tag="v3.0", commit="b569dfe08ab379d7ec375c71304ff95bd6f5ddb6")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
parallel = False
diff --git a/var/spack/repos/builtin/packages/fuse-overlayfs/package.py b/var/spack/repos/builtin/packages/fuse-overlayfs/package.py
index 18112758dc..927c216c99 100644
--- a/var/spack/repos/builtin/packages/fuse-overlayfs/package.py
+++ b/var/spack/repos/builtin/packages/fuse-overlayfs/package.py
@@ -15,6 +15,7 @@ class FuseOverlayfs(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("1.13", sha256="96d10344921d5796bcba7a38580ae14a53c4e60399bb90b238ac5a10b3bb65b2")
version("1.10", sha256="4351eaed7cf26a5012c14c6e0fc883ef65a7b5dcc95ba129ce485904106c25a9")
version("1.7.1", sha256="fe2c076aed7b8669e7970301a99c0b197759b611035d8199de4c0add7d2fb2b4")
version("1.7", sha256="e4d9a794d270e237a38e7ced95af95ad15268e0584eab981ed7c7b3758b95995")
@@ -27,9 +28,12 @@ class FuseOverlayfs(AutotoolsPackage):
version("1.1.1", sha256="9a1c4221a82059fd9686dd8b519d432bae126c08f9d891fb722bcb51ba4933ec")
version("1.1.0", sha256="060168c2d5a8c6cc768b4542eba9953b7ff4a31f94bfb2e05b3d1051390838b1")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
depends_on("fuse")
+ depends_on("libfuse@3.2.1:", when="^[virtuals=fuse] libfuse")
diff --git a/var/spack/repos/builtin/packages/fxdiv/package.py b/var/spack/repos/builtin/packages/fxdiv/package.py
index f934966169..c9194568ef 100644
--- a/var/spack/repos/builtin/packages/fxdiv/package.py
+++ b/var/spack/repos/builtin/packages/fxdiv/package.py
@@ -19,6 +19,9 @@ class Fxdiv(CMakePackage):
version("2018-11-16", commit="b742d1143724d646cd0f914646f1240eacf5bd73") # py-torch@1.0:1.5
version("2018-02-24", commit="811b482bcd9e8d98ad80c6c78d5302bb830184b0") # py-torch@0.4
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/fxt/package.py b/var/spack/repos/builtin/packages/fxt/package.py
index d8039a53da..f4e6a5846b 100644
--- a/var/spack/repos/builtin/packages/fxt/package.py
+++ b/var/spack/repos/builtin/packages/fxt/package.py
@@ -28,6 +28,8 @@ class Fxt(AutotoolsPackage):
version("0.3.4", sha256="fcd35a5278ac0f10eba12fed4fa436dce79559897fde5b8176d5eee9081970f7")
version("0.3.3", sha256="3f6fea5211cc242a54496e6242365c99522a5039916789cdbe25a58d05d6a626")
+ depends_on("c", type="build") # generated
+
variant(
"moreparams",
default=False,
@@ -46,7 +48,7 @@ class Fxt(AutotoolsPackage):
def patch(self):
# Increase the value of FXT_MAX_PARAMS (to allow longer task names)
- if "+moreparams" in self.spec:
+ if self.spec.satisfies("+moreparams"):
filter_file("#define FXT_MAX_PARAMS.*", "#define FXT_MAX_PARAMS 16", "tools/fxt.h")
def autoreconf(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/fyba/package.py b/var/spack/repos/builtin/packages/fyba/package.py
index 37653cf3a8..572c3525d9 100644
--- a/var/spack/repos/builtin/packages/fyba/package.py
+++ b/var/spack/repos/builtin/packages/fyba/package.py
@@ -18,6 +18,8 @@ class Fyba(AutotoolsPackage):
version("4.1.1", sha256="99f658d52e8fd8997118bb6207b9c121500700996d9481a736683474e2534179")
+ depends_on("cxx", type="build") # generated
+
# configure: error: cannot find install-sh or install.sh
force_autoreconf = True
diff --git a/var/spack/repos/builtin/packages/fzf/package.py b/var/spack/repos/builtin/packages/fzf/package.py
index bf00a14f1d..91b838a3fe 100644
--- a/var/spack/repos/builtin/packages/fzf/package.py
+++ b/var/spack/repos/builtin/packages/fzf/package.py
@@ -11,7 +11,7 @@ class Fzf(MakefilePackage):
"""fzf is a general-purpose command-line fuzzy finder."""
homepage = "https://github.com/junegunn/fzf"
- url = "https://github.com/junegunn/fzf/archive/0.17.5.tar.gz"
+ url = "https://github.com/junegunn/fzf/archive/v0.54.0.tar.gz"
maintainers("alecbcs")
@@ -19,12 +19,22 @@ class Fzf(MakefilePackage):
license("MIT")
+ version("0.56.2", sha256="1d67edb3e3ffbb14fcbf786bfcc0b5b8d87db6a0685135677b8ef4c114d2b864")
+ version("0.55.0", sha256="805383f71bca7f8fb271ecd716852aea88fd898d5027d58add9e43df6ea766da")
+ version("0.54.3", sha256="6413f3916f8058b396820f9078b1336d94c72cbae39c593b1d16b83fcc4fdf74")
+ version("0.53.0", sha256="d45abbfb64f21913c633d46818d9d3eb3d7ebc7e94bd16f45941958aa5480e1d")
+ version("0.52.1", sha256="96848746ca78249c1fdd16f170776ce2f667097b60e4ffbd5ecdbd7dfac72ef9")
+ version("0.48.1", sha256="c8dbb545d651808ef4e1f51edba177fa918ea56ac53376c690dc6f2dd0156a71")
+ version("0.47.0", sha256="bc566cb4630418bc9981898d3350dbfddc114637a896acaa8d818a51945bdf30")
+ version("0.46.1", sha256="b0d640be3ae79980fdf461096f7d9d36d38ec752e25f8c4d2ca3ca6c041c2491")
+ version("0.45.0", sha256="f0dd5548f80fe7f80d9277bb8fe252ac6e42a41e76fc85ce0f3af702cd987600")
version("0.44.1", sha256="295f3aec9519f0cf2dce67a14e94d8a743d82c19520e5671f39c71c9ea04f90c")
version("0.42.0", sha256="743c1bfc7851b0796ab73c6da7db09d915c2b54c0dd3e8611308985af8ed3df2")
version("0.41.1", sha256="982682eaac377c8a55ae8d7491fcd0e888d6c13915d01da9ebb6b7c434d7f4b5")
version("0.40.0", sha256="9597f297a6811d300f619fff5aadab8003adbcc1566199a43886d2ea09109a65")
depends_on("go@1.17:", type="build")
+ depends_on("go@1.20:", type="build", when="@0.49.0:")
variant("vim", default=False, description="Install vim plugins for fzf")
@@ -34,6 +44,10 @@ class Fzf(MakefilePackage):
match = re.match(r"(^[\d.]+)", output)
return match.group(1) if match else None
+ def url_for_version(self, version):
+ base = "refs/tags/v" if self.spec.satisfies("@:0.53.0") else ""
+ return f"https://github.com/junegunn/fzf/archive/{base}{version}.tar.gz"
+
def setup_build_environment(self, env):
# Point GOPATH at the top of the staging dir for the build step.
env.prepend_path("GOPATH", self.stage.path)
@@ -52,8 +66,6 @@ class Fzf(MakefilePackage):
mkdirp(prefix.share.fzf.shell)
install_tree("shell", prefix.share.fzf.shell)
- @run_after("install")
- def post_install(self):
- if "+vim" in self.spec:
- mkdir(self.prefix.plugin)
- install("plugin/fzf.vim", self.prefix.plugin)
+ if spec.satisfies("+vim"):
+ mkdirp(prefix.share.fzf.plugins)
+ install("plugin/fzf.vim", prefix.share.fzf.plugins)
diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py
index dcff766289..b8d4a9be51 100644
--- a/var/spack/repos/builtin/packages/g2/package.py
+++ b/var/spack/repos/builtin/packages/g2/package.py
@@ -20,12 +20,18 @@ class G2(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("3.5.1", sha256="a9acdb5d23eca532838f21c4a917727ac85851fc9e1f100d65a6f27c1a563998")
+ version("3.5.0", sha256="3ff59a705bedf56061bba2d667a04391d82701847f93ea5fa1c1d3bd335d07da")
+ version("3.4.9", sha256="6edc33091f6bd2acb191182831499c226a1c3992c3acc104d6363528b12dfbae")
version("3.4.8", sha256="071a6f799c4c4fdfd5d0478152a0cbb9d668d12d71c78d5bda71845fc5580a7f")
version("3.4.7", sha256="d6530611e3a515122f11ed4aeede7641f6f8932ef9ee0d4828786572767304dc")
version("3.4.6", sha256="c4b03946365ce0bacf1e10e8412a5debd72d8671d1696aa4fb3f3adb119175fe")
version("3.4.5", sha256="c18e991c56964953d778632e2d74da13c4e78da35e8d04cb742a2ca4f52737b6")
version("3.4.3", sha256="679ea99b225f08b168cbf10f4b29f529b5b011232f298a5442ce037ea84de17c")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("pic", default=True, description="Build with position-independent-code")
variant(
"precision",
@@ -36,22 +42,43 @@ class G2(CMakePackage):
when="@3.4.6:",
)
variant("w3emc", default=True, description="Enable GRIB1 through w3emc", when="@3.4.6:")
+ variant("shared", default="False", description="Build shared library", when="@3.4.7:")
+ variant("openmp", default=False, description="Use OpenMP multithreading", when="@develop")
+ variant("utils", default=False, description="Build grib utilities", when="@develop")
+ variant(
+ "g2c_compare",
+ default=False,
+ description="Enable copygb2 tests using g2c_compare",
+ when="@develop",
+ )
depends_on("jasper@:2.0.32", when="@:3.4.7")
depends_on("jasper")
depends_on("libpng")
+ depends_on("zlib-api", when="@develop")
depends_on("bacio", when="@3.4.6:")
+ depends_on("ip", when="@develop")
+ requires("^ip precision=d", when="^ip@4.1:")
+ depends_on("sp", when="^ip@:4")
+ requires("^sp precision=d", when="^ip@:4 ^sp@2.4:")
+ depends_on("g2c@1.8: +utils", when="+g2c_compare")
with when("+w3emc"):
depends_on("w3emc")
depends_on("w3emc precision=4", when="precision=4")
depends_on("w3emc precision=d", when="precision=d")
+ depends_on("w3emc +extradeps", when="+utils")
+ depends_on("w3emc precision=4,d", when="+utils")
def cmake_args(self):
args = [
+ self.define_from_variant("OPENMP", "openmp"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
self.define_from_variant("BUILD_WITH_W3EMC", "w3emc"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("BUILD_4", self.spec.satisfies("precision=4")),
self.define("BUILD_D", self.spec.satisfies("precision=d")),
+ self.define_from_variant("G2C_COMPARE", "g2c_compare"),
+ self.define_from_variant("BUILD_UTILS", "utils"),
]
return args
@@ -61,10 +88,15 @@ class G2(CMakePackage):
self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d")
)
for suffix in precisions:
- lib = find_libraries("libg2_" + suffix, root=self.prefix, shared=False, recursive=True)
+ lib = find_libraries(
+ "libg2_" + suffix,
+ root=self.prefix,
+ shared=self.spec.satisfies("+shared"),
+ recursive=True,
+ )
env.set("G2_LIB" + suffix, lib[0])
env.set("G2_INC" + suffix, join_path(self.prefix, "include_" + suffix))
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/g2c/package.py b/var/spack/repos/builtin/packages/g2c/package.py
index 85fe061eb8..0554ccf7b8 100644
--- a/var/spack/repos/builtin/packages/g2c/package.py
+++ b/var/spack/repos/builtin/packages/g2c/package.py
@@ -18,10 +18,16 @@ class G2c(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("2.0.0", sha256="39c23bf1219c60101548c8525e3a879c84119558f768081779d404a8caf4cec9")
+ version("1.9.0", sha256="5554276e18bdcddf387a08c2dd23f9da310c6598905df6a2a244516c22ded9aa")
+ version("1.8.0", sha256="4ce9f5a7cb0950699fe08ebc5a463ab4d09ef550c050391a319308a2494f971f")
version("1.7.0", sha256="73afba9da382fed73ed8692d77fa037bb313280879cd4012a5e5697dccf55175")
version("1.6.4", sha256="5129a772572a358296b05fbe846bd390c6a501254588c6a223623649aefacb9d")
version("1.6.2", sha256="b5384b48e108293d7f764cdad458ac8ce436f26be330b02c69c2a75bb7eb9a2c")
+ depends_on("c", type="build")
+
+ variant("aec", default=True, description="Use AEC library")
variant("png", default=True, description="Use PNG library")
variant("jasper", default=True, description="Use Jasper library")
variant("openjpeg", default=False, description="Use OpenJPEG library")
@@ -46,10 +52,18 @@ class G2c(CMakePackage):
description="Build and install some utility programs",
when="@develop",
)
+ variant(
+ "build_v2_api",
+ default=False,
+ description="Build new g2c API, experimental until 2.0.0 release",
+ when="@develop",
+ )
+ depends_on("libaec", when="+aec")
depends_on("libpng", when="+png")
depends_on("jasper", when="+jasper")
depends_on("openjpeg", when="+openjpeg")
+ depends_on("libxml2@2.9:", when="+build_v2_api")
conflicts("+jasper +openjpeg", msg="Either Jasper or OpenJPEG should be used, not both")
@@ -58,11 +72,13 @@ class G2c(CMakePackage):
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
self.define("BUILD_SHARED_LIBS", self.spec.satisfies("libs=shared")),
self.define("BUILD_STATIC_LIBS", self.spec.satisfies("libs=static")),
+ self.define_from_variant("USE_AEC", "aec"),
self.define_from_variant("USE_PNG", "png"),
self.define_from_variant("USE_Jasper", "jasper"),
self.define_from_variant("USE_OpenJPEG", "openjpeg"),
self.define_from_variant("PTHREADS", "pthreads"),
self.define_from_variant("UTILS", "utils"),
+ self.define_from_variant("BUILD_G2C", "build_v2_api"),
self.define("BUILD_TESTING", self.run_tests),
]
@@ -78,5 +94,5 @@ class G2c(CMakePackage):
env.set("G2C_INC", join_path(self.prefix, "include"))
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/g2o/package.py b/var/spack/repos/builtin/packages/g2o/package.py
index effc4b3c7c..e3c8f04621 100644
--- a/var/spack/repos/builtin/packages/g2o/package.py
+++ b/var/spack/repos/builtin/packages/g2o/package.py
@@ -25,6 +25,9 @@ class G2o(CMakePackage):
"20200410_git", sha256="b79eb1407ae7f2a9e6a002bb4b41d65402c185855db41a9ef4a6e3b42abaec4c"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("eigen@2.91.0:", type="link")
depends_on("ceres-solver")
diff --git a/var/spack/repos/builtin/packages/g2tmpl/package.py b/var/spack/repos/builtin/packages/g2tmpl/package.py
index a231fc2bf0..b76804e873 100644
--- a/var/spack/repos/builtin/packages/g2tmpl/package.py
+++ b/var/spack/repos/builtin/packages/g2tmpl/package.py
@@ -18,6 +18,25 @@ class G2tmpl(CMakePackage):
maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
version("develop", branch="develop")
+ version("1.13.0", sha256="7e52cccc91277bcedbd9e13ee3478480e744eb22d13c5b636bd0ad91bf43d38e")
+ version("1.12.0", sha256="44272be7bde8da05565255a8ecdbd080c659d7f0669e356e1c8fef6bac05e723")
+ version("1.11.0", sha256="00fde3b37c6b4d1f0eaf60f230159298ffcb47349a076c3bd6afa20c7ed791a9")
version("1.10.2", sha256="4063361369f3691f75288c801fa9d1a2414908b7d6c07bbf69d4165802e2a7fc")
version("1.10.1", sha256="0be425e5128fabb89915a92261aa75c27a46a3e115e00c686fc311321e5d1e2a")
version("1.10.0", sha256="dcc0e40b8952f91d518c59df7af64e099131c17d85d910075bfa474c8822649d")
+
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
+ variant("shared", default=False, description="Build shared library")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define("BUILD_TESTING", self.run_tests),
+ ]
+ return args
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/g4abla/package.py b/var/spack/repos/builtin/packages/g4abla/package.py
index 710d8de011..c36cb6f148 100644
--- a/var/spack/repos/builtin/packages/g4abla/package.py
+++ b/var/spack/repos/builtin/packages/g4abla/package.py
@@ -24,13 +24,18 @@ class G4abla(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4ABLA{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4ABLA{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4ABLADATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4ABLA{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4emlow/package.py b/var/spack/repos/builtin/packages/g4emlow/package.py
index d2f220dd2b..458f6da76b 100644
--- a/var/spack/repos/builtin/packages/g4emlow/package.py
+++ b/var/spack/repos/builtin/packages/g4emlow/package.py
@@ -18,6 +18,7 @@ class G4emlow(Package):
maintainers("drbenmorgan")
# Only versions relevant to Geant4 releases built by spack are added
+ version("8.6", sha256="fb7abed0d1db1d8b9ea364279b95e228d7bf3e3a5dc8d449b81665cada4a1a9e")
version("8.5", sha256="66baca49ac5d45e2ac10c125b4fb266225e511803e66981909ce9cd3e9bcef73")
version("8.4", sha256="d87de4d2a364cb0a1e1846560525ffc3f735ccdeea8bc426d61775179aebbe8e")
version("8.2", sha256="3d7768264ff5a53bcb96087604bbe11c60b7fea90aaac8f7d1252183e1a8e427")
@@ -30,15 +31,22 @@ class G4emlow(Package):
version("6.50", sha256="c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236")
version("6.35", sha256="1564045a0acad344c8d432cd48c2c3bb2e051a81ab3099a84e0f56ba0fe82cec")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4EMLOW{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4EMLOW{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4LEDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "https://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4EMLOW{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4ensdfstate/package.py b/var/spack/repos/builtin/packages/g4ensdfstate/package.py
index 59fe04f45d..6cb3904756 100644
--- a/var/spack/repos/builtin/packages/g4ensdfstate/package.py
+++ b/var/spack/repos/builtin/packages/g4ensdfstate/package.py
@@ -25,11 +25,11 @@ class G4ensdfstate(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4ENSDFSTATE{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4ENSDFSTATE{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4ENSDFSTATEDATA", install_path)
def url_for_version(self, version):
@@ -37,3 +37,8 @@ class G4ensdfstate(Package):
return (
"http://geant4-data.web.cern.ch/geant4-data/datasets/G4ENSDFSTATE.%s.tar.gz" % version
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4ENSDFSTATE{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4incl/package.py b/var/spack/repos/builtin/packages/g4incl/package.py
index 479ce2dda2..056910d714 100644
--- a/var/spack/repos/builtin/packages/g4incl/package.py
+++ b/var/spack/repos/builtin/packages/g4incl/package.py
@@ -25,13 +25,18 @@ class G4incl(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4INCL{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4INCL{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4INCLDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4INCL{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4ndl/package.py b/var/spack/repos/builtin/packages/g4ndl/package.py
index be9f298c2f..fa94da01b3 100644
--- a/var/spack/repos/builtin/packages/g4ndl/package.py
+++ b/var/spack/repos/builtin/packages/g4ndl/package.py
@@ -17,6 +17,7 @@ class G4ndl(Package):
maintainers("drbenmorgan")
+ version("4.7.1", sha256="d3acae48622118d2579de24a54d533fb2416bf0da9dd288f1724df1485a46c7c")
version("4.7", sha256="7e7d3d2621102dc614f753ad928730a290d19660eed96304a9d24b453d670309")
version("4.6", sha256="9d287cf2ae0fb887a2adce801ee74fb9be21b0d166dab49bcbee9408a5145408")
version("4.5", sha256="cba928a520a788f2bc8229c7ef57f83d0934bb0c6a18c31ef05ef4865edcdf8e")
@@ -24,13 +25,18 @@ class G4ndl(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4NDL{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4NDL{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4NEUTRONHPDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4NDL.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4NDL{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4neutronxs/package.py b/var/spack/repos/builtin/packages/g4neutronxs/package.py
index 39f6915346..595d86c71e 100644
--- a/var/spack/repos/builtin/packages/g4neutronxs/package.py
+++ b/var/spack/repos/builtin/packages/g4neutronxs/package.py
@@ -24,11 +24,11 @@ class G4neutronxs(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4NEUTRONXS{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4NEUTRONXS{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4NEUTRONXSDATA", install_path)
def url_for_version(self, version):
@@ -36,3 +36,8 @@ class G4neutronxs(Package):
return (
"http://geant4-data.web.cern.ch/geant4-data/datasets/G4NEUTRONXS.%s.tar.gz" % version
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4NEUTRONXS{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4nudexlib/package.py b/var/spack/repos/builtin/packages/g4nudexlib/package.py
new file mode 100644
index 0000000000..2e02321fe4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/g4nudexlib/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class G4nudexlib(Package):
+ """Geant4 data for evaluated particle cross-sections on
+ natural composition of elements"""
+
+ homepage = "https://geant4.web.cern.ch"
+ url = "https://geant4-data.web.cern.ch/geant4-data/datasets/G4NUDEXLIB.1.0.tar.gz"
+
+ tags = ["hep"]
+
+ maintainers("drbenmorgan")
+
+ # Only versions relevant to Geant4 releases built by spack are added
+ version("1.0", sha256="cac7d65e9c5af8edba2b2667d5822e16aaf99065c95f805e76de4cc86395f415")
+
+ def install(self, spec, prefix):
+ mkdirp(join_path(prefix.share, "data"))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
+ install_tree(self.stage.source_path, install_path)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
+ env.set("G4NUDEXLIBDATA", install_path)
+
+ def url_for_version(self, version):
+ """Handle version string."""
+ return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4NUDEXLIB.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4NUDEXLIB{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4particlexs/package.py b/var/spack/repos/builtin/packages/g4particlexs/package.py
index 93c53fb277..209831dfa6 100644
--- a/var/spack/repos/builtin/packages/g4particlexs/package.py
+++ b/var/spack/repos/builtin/packages/g4particlexs/package.py
@@ -19,6 +19,7 @@ class G4particlexs(Package):
maintainers("drbenmorgan")
# Only versions relevant to Geant4 releases built by spack are added
+ version("4.1", sha256="07ae1e048e9ac8e7f91f6696497dd55bd50ccc822d97af1a0b9e923212a6d7d1")
version("4.0", sha256="9381039703c3f2b0fd36ab4999362a2c8b4ff9080c322f90b4e319281133ca95")
version("3.1.1", sha256="66c17edd6cb6967375d0497add84c2201907a25e33db782ebc26051d38f2afda")
version("3.1", sha256="404da84ead165e5cccc0bb795222f6270c9bf491ef4a0fd65195128b27f0e9cd")
@@ -27,11 +28,11 @@ class G4particlexs(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4PARTICLEXS{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4PARTICLEXS{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4PARTICLEXSDATA", install_path)
def url_for_version(self, version):
@@ -39,3 +40,8 @@ class G4particlexs(Package):
return (
"http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.%s.tar.gz" % version
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4PARTICLEXS{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4photonevaporation/package.py b/var/spack/repos/builtin/packages/g4photonevaporation/package.py
index 1c847dec3e..099ded6a5f 100644
--- a/var/spack/repos/builtin/packages/g4photonevaporation/package.py
+++ b/var/spack/repos/builtin/packages/g4photonevaporation/package.py
@@ -27,13 +27,11 @@ class G4photonevaporation(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "PhotonEvaporation{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(
- self.prefix.share, "data", "PhotonEvaporation{0}".format(self.version)
- )
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4LEVELGAMMADATA", install_path)
def url_for_version(self, version):
@@ -42,3 +40,8 @@ class G4photonevaporation(Package):
"http://geant4-data.web.cern.ch/geant4-data/datasets/G4PhotonEvaporation.%s.tar.gz"
% version
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "PhotonEvaporation{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4pii/package.py b/var/spack/repos/builtin/packages/g4pii/package.py
index a1aa5590bc..c9cf78e5cb 100644
--- a/var/spack/repos/builtin/packages/g4pii/package.py
+++ b/var/spack/repos/builtin/packages/g4pii/package.py
@@ -22,13 +22,18 @@ class G4pii(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4PII{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4PII{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4PIIDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "https://geant4-data.web.cern.ch/geant4-data/datasets/G4PII.1.3.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4PII{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
index 69f5681b64..33a75291ff 100644
--- a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
+++ b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
@@ -27,13 +27,11 @@ class G4radioactivedecay(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "RadioactiveDecay{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(
- self.prefix.share, "data", "RadioactiveDecay{0}".format(self.version)
- )
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4RADIOACTIVEDATA", install_path)
def url_for_version(self, version):
@@ -42,3 +40,8 @@ class G4radioactivedecay(Package):
"http://geant4-data.web.cern.ch/geant4-data/datasets/G4RadioactiveDecay.%s.tar.gz"
% version
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "RadioactiveDecay{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4realsurface/package.py b/var/spack/repos/builtin/packages/g4realsurface/package.py
index 28f335bba0..1d92494364 100644
--- a/var/spack/repos/builtin/packages/g4realsurface/package.py
+++ b/var/spack/repos/builtin/packages/g4realsurface/package.py
@@ -25,11 +25,11 @@ class G4realsurface(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "RealSurface{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "RealSurface{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4REALSURFACEDATA", install_path)
def url_for_version(self, version):
@@ -39,3 +39,8 @@ class G4realsurface(Package):
"G4" if version > Version("1.0") else "", version
)
)
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "RealSurface{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4saiddata/package.py b/var/spack/repos/builtin/packages/g4saiddata/package.py
index 371811381b..b4da318580 100644
--- a/var/spack/repos/builtin/packages/g4saiddata/package.py
+++ b/var/spack/repos/builtin/packages/g4saiddata/package.py
@@ -23,13 +23,18 @@ class G4saiddata(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4SAIDDATA{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4SAIDDATA{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4SAIDXSDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4SAIDDATA.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4SAIDDATA{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4tendl/package.py b/var/spack/repos/builtin/packages/g4tendl/package.py
index 92c12423c2..1a2e909511 100644
--- a/var/spack/repos/builtin/packages/g4tendl/package.py
+++ b/var/spack/repos/builtin/packages/g4tendl/package.py
@@ -24,13 +24,18 @@ class G4tendl(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, "data"))
- install_path = join_path(prefix.share, "data", "G4TENDL{0}".format(self.version))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
install_tree(self.stage.source_path, install_path)
def setup_dependent_run_environment(self, env, dependent_spec):
- install_path = join_path(self.prefix.share, "data", "G4TENDL{0}".format(self.version))
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
env.set("G4PARTICLEHPDATA", install_path)
def url_for_version(self, version):
"""Handle version string."""
return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4TENDL.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4TENDL{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/g4urrpt/package.py b/var/spack/repos/builtin/packages/g4urrpt/package.py
new file mode 100644
index 0000000000..a04e6d5d1a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/g4urrpt/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class G4urrpt(Package):
+ """Geant4 data for evaluated particle cross-sections on
+ natural composition of elements"""
+
+ homepage = "https://geant4.web.cern.ch"
+ url = "https://geant4-data.web.cern.ch/geant4-data/datasets/G4URRPT.1.0.tar.gz"
+
+ tags = ["hep"]
+
+ maintainers("drbenmorgan")
+
+ # Only versions relevant to Geant4 releases built by spack are added
+ version("1.0", sha256="278eb6c4086e919d2c2a718eb44d4897b7e06d2a32909f6ed48eb8590b3f9977")
+
+ def install(self, spec, prefix):
+ mkdirp(join_path(prefix.share, "data"))
+ install_path = join_path(prefix.share, "data", self.g4datasetname)
+ install_tree(self.stage.source_path, install_path)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ install_path = join_path(self.prefix.share, "data", self.g4datasetname)
+ env.set("G4URRPTDATA", install_path)
+
+ def url_for_version(self, version):
+ """Handle version string."""
+ return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4URRPT.%s.tar.gz" % version
+
+ @property
+ def g4datasetname(self):
+ spec = self.spec
+ return "G4URRPT{0}".format(spec.version)
diff --git a/var/spack/repos/builtin/packages/gadap/package.py b/var/spack/repos/builtin/packages/gadap/package.py
index 6c50abe4a5..1c43350ea9 100644
--- a/var/spack/repos/builtin/packages/gadap/package.py
+++ b/var/spack/repos/builtin/packages/gadap/package.py
@@ -18,6 +18,8 @@ class Gadap(AutotoolsPackage):
version("2.0", sha256="ae9a989ca00ec29fb40616383d170883f07c022456db338399982a8a94ec0100")
+ depends_on("cxx", type="build") # generated
+
depends_on("curl@7.18.0:")
depends_on("libdap4")
depends_on("libxml2")
diff --git a/var/spack/repos/builtin/packages/gamess-ri-mp2-miniapp/package.py b/var/spack/repos/builtin/packages/gamess-ri-mp2-miniapp/package.py
index 230da64505..7f7b06ff2c 100644
--- a/var/spack/repos/builtin/packages/gamess-ri-mp2-miniapp/package.py
+++ b/var/spack/repos/builtin/packages/gamess-ri-mp2-miniapp/package.py
@@ -18,6 +18,8 @@ class GamessRiMp2Miniapp(MakefilePackage):
version("1.5", sha256="0ff4e8e556caa99ce1ab85c53e78932a32d2e2fa3c5d883fa321d5000f8a731e")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/gapbs/package.py b/var/spack/repos/builtin/packages/gapbs/package.py
index 34a96c284a..8fbde6cda9 100644
--- a/var/spack/repos/builtin/packages/gapbs/package.py
+++ b/var/spack/repos/builtin/packages/gapbs/package.py
@@ -25,12 +25,14 @@ class Gapbs(MakefilePackage):
version("1.4", sha256="d91ecfe364e8c307e9e5535d730ef8ef8554b71d33891b70d0c4665cc11178bb")
version("1.0", sha256="a7516998c4994592053c7aa0c76282760a8e009865a6b7a1c7c40968be1ca55d")
+ depends_on("cxx", type="build") # generated
+
variant("serial", default=False, description="Version with no parallelism")
def build(self, spec, prefix):
cxx_flags = ["-O3", self.compiler.cxx11_flag]
- if "-serial" in spec:
+ if spec.satisfies("-serial"):
cxx_flags.append(self.compiler.openmp_flag)
make("CXX_FLAGS=" + " ".join(cxx_flags))
diff --git a/var/spack/repos/builtin/packages/garcon/package.py b/var/spack/repos/builtin/packages/garcon/package.py
new file mode 100644
index 0000000000..57d76cee6b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/garcon/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Garcon(AutotoolsPackage):
+ """Menu library for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/garcon/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/garcon-0.8.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="54633487566a8b8502b71c11a7f719efe27c069bd5773cc95f11ff4ea8f11a14")
+ version("0.8.0", sha256="4811d89ee5bc48dbdeffd69fc3eec6c112bbf01fde98a9e848335b374a4aa1bb")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+
+ # Base requirements
+ depends_on("intltool@0.51.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+ args += self.enable_or_disable("introspection")
+ return args
+
+ def setup_dependent_build_environment(self, env, dep_spec):
+ if self.spec.satisfies("+introspection") and dep_spec.satisfies("+introspection"):
+ env.append_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/garfieldpp/package.py b/var/spack/repos/builtin/packages/garfieldpp/package.py
index 5d78e443a6..9ea5be344c 100644
--- a/var/spack/repos/builtin/packages/garfieldpp/package.py
+++ b/var/spack/repos/builtin/packages/garfieldpp/package.py
@@ -26,9 +26,14 @@ class Garfieldpp(CMakePackage):
variant("examples", default=False, description="Build garfield examples")
version("master", branch="master")
+ version("5.0", sha256="453e83c2829f57046c471a691e7cd9630650a3c6a696f3be6e86bf2d5159e7b3")
version("4.0", sha256="82bc1f0395213bd30a7cd854426e6757d0b4155e99ffd4405355c9648fa5ada3")
version("3.0", sha256="c1282427a784658bc38b71c8e8cfc8c9f5202b185f0854d85f7c9c5a747c5406")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("root")
depends_on("gsl")
depends_on("geant4", when="+examples")
diff --git a/var/spack/repos/builtin/packages/gasnet/package.py b/var/spack/repos/builtin/packages/gasnet/package.py
index 4aad76c5d6..a929e6b957 100644
--- a/var/spack/repos/builtin/packages/gasnet/package.py
+++ b/var/spack/repos/builtin/packages/gasnet/package.py
@@ -5,6 +5,7 @@
import os
+import spack.main
from spack.package import *
@@ -37,15 +38,44 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
version("main", branch="stable")
version("master", branch="master")
+ version("2024.5.0", sha256="f945e80f71d340664766b66290496d230e021df5e5cd88f404d101258446daa9")
+ version("2023.9.0", sha256="2d9f15a794e10683579ce494cd458b0dd97e2d3327c4d17e1fea79bd95576ce6")
version("2023.3.0", sha256="e1fa783d38a503cf2efa7662be591ca5c2bb98d19ac72a9bc6da457329a9a14f")
version("2022.9.2", sha256="2352d52f395a9aa14cc57d82957d9f1ebd928d0a0021fd26c5f1382a06cd6f1d")
version("2022.9.0", sha256="6873ff4ad8ebee49da4378f2d78095a6ccc31333d6ae4cd739b9f772af11f936")
- version("2022.3.0", sha256="91b59aa84c0680c807e00d3d1d8fa7c33c1aed50b86d1616f93e499620a9ba09")
- version("2021.9.0", sha256="1b6ff6cdad5ecf76b92032ef9507e8a0876c9fc3ee0ab008de847c1fad0359ee")
- version("2021.3.0", sha256="8a40fb3fa8bacc3922cd4d45217816fcb60100357ab97fb622a245567ea31747")
- version("2020.10.0", sha256="ed17baf7fce90499b539857ee37b3eea961aa475cffbde77e4c607a34ece06a0")
- version("2020.3.0", sha256="019eb2d2284856e6fabe6c8c0061c874f10e95fa0265245f227fd3497f1bb274")
- version("2019.9.0", sha256="117f5fdb16e53d0fa8a47a1e28cccab1d8020ed4f6e50163d985dc90226aaa2c")
+ version(
+ "2022.3.0",
+ deprecated=True,
+ sha256="91b59aa84c0680c807e00d3d1d8fa7c33c1aed50b86d1616f93e499620a9ba09",
+ )
+ version(
+ "2021.9.0",
+ deprecated=True,
+ sha256="1b6ff6cdad5ecf76b92032ef9507e8a0876c9fc3ee0ab008de847c1fad0359ee",
+ )
+ version(
+ "2021.3.0",
+ deprecated=True,
+ sha256="8a40fb3fa8bacc3922cd4d45217816fcb60100357ab97fb622a245567ea31747",
+ )
+ version(
+ "2020.10.0",
+ deprecated=True,
+ sha256="ed17baf7fce90499b539857ee37b3eea961aa475cffbde77e4c607a34ece06a0",
+ )
+ version(
+ "2020.3.0",
+ deprecated=True,
+ sha256="019eb2d2284856e6fabe6c8c0061c874f10e95fa0265245f227fd3497f1bb274",
+ )
+ version(
+ "2019.9.0",
+ deprecated=True,
+ sha256="117f5fdb16e53d0fa8a47a1e28cccab1d8020ed4f6e50163d985dc90226aaa2c",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Do NOT add older versions here.
# GASNet-EX releases over 2 years old are not supported.
@@ -54,12 +84,12 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
"conduits",
values=any_combination_of("smp", "mpi", "ibv", "udp", "ofi", "ucx").with_default("smp"),
description="The hardware-dependent network backends to enable.\n"
- + "(smp) = SMP conduit for single-node operation ;\n"
- + "(ibv) = Native InfiniBand verbs conduit ;\n"
- + "(ofi) = OFI conduit over libfabric, for HPE Cray Slingshot and Intel Omni-Path ;\n"
- + "(udp) = Portable UDP conduit, for Ethernet networks ;\n"
- + "(mpi) = Low-performance/portable MPI conduit ;\n"
- + "(ucx) = EXPERIMENTAL UCX conduit for Mellanox IB/RoCE ConnectX-5+ ;\n"
+ + "(smp) = SMP conduit for single-node operation\n"
+ + "(ibv) = Native InfiniBand verbs conduit\n"
+ + "(ofi) = OFI conduit over libfabric, for HPE Cray Slingshot and Intel Omni-Path\n"
+ + "(udp) = Portable UDP conduit, for Ethernet networks\n"
+ + "(mpi) = Low-performance/portable MPI conduit\n"
+ + "(ucx) = EXPERIMENTAL UCX conduit for Mellanox IB/RoCE ConnectX-5+\n"
+ "For detailed recommendations, consult https://gasnet.lbl.gov",
)
@@ -70,21 +100,44 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
default=False,
description="Enables support for the CUDA memory kind in some conduits.\n"
+ "NOTE: Requires CUDA Driver library be present on the build system",
+ when="@2020.11:",
+ )
+ conflicts(
+ "+cuda",
+ when="@:2020.10",
+ msg="GASNet version 2020.11.0 or newer required for CUDA support",
)
variant(
"rocm",
default=False,
description="Enables support for the ROCm/HIP memory kind in some conduits",
+ when="@2021.9:",
+ )
+ conflicts(
+ "+rocm", when="@:2021.8", msg="GASNet version 2021.9.0 or newer required for ROCm support"
+ )
+
+ variant(
+ "level_zero",
+ default=False,
+ description="Enables *experimental* support for the Level Zero "
+ + "memory kind on Intel GPUs in some conduits",
+ when="@2023.9.0:",
)
depends_on("mpi", when="conduits=mpi")
+ depends_on("libfabric", when="conduits=ofi")
depends_on("autoconf@2.69", type="build", when="@master:")
depends_on("automake@1.16:", type="build", when="@master:")
conflicts("^hip@:4.4.0", when="+rocm")
+ conflicts("^hip@6:", when="@:2024.4+rocm") # Bug 4686
+
+ depends_on("oneapi-level-zero@1.8.0:", when="+level_zero")
+
def install(self, spec, prefix):
if spec.satisfies("@master:"):
bootstrapsh = Executable("./Bootstrap")
@@ -93,7 +146,7 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
try:
git = which("git")
git("describe", "--long", "--always", output="version.git")
- except spack.util.executable.ProcessError:
+ except ProcessError:
spack.main.send_warning_to_tty("Omitting version stamp due to git error")
# The GASNet-EX library has a highly multi-dimensional configure space,
@@ -111,16 +164,22 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
if "conduits=none" not in spec:
options = ["--prefix=%s" % prefix]
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
options.append("--enable-debug")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
options.append("--enable-kind-cuda-uva")
+ options.append("--with-cuda-home=" + spec["cuda"].prefix)
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
options.append("--enable-kind-hip")
+ options.append("--with-hip-home=" + spec["hip"].prefix)
+
+ if spec.satisfies("+level_zero"):
+ options.append("--enable-kind-ze")
+ options.append("--with-ze-home=" + spec["oneapi-level-zero"].prefix)
- if "conduits=mpi" in spec:
+ if spec.satisfies("conduits=mpi"):
options.append("--enable-mpi-compat")
else:
options.append("--disable-mpi-compat")
@@ -146,7 +205,7 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def check_install(self):
- if "conduits=smp" in self.spec:
+ if self.spec.satisfies("conduits=smp"):
make("-C", "smp-conduit", "run-tests")
self.test_testtools()
@@ -161,7 +220,7 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
def test_testtools(self):
"""run testtools and check output"""
- if "conduits=none" in self.spec:
+ if self.spec.satisfies("conduits=none"):
raise SkipTest("Test requires conduit libraries")
testtools_path = join_path(self.prefix.tests, "testtools")
@@ -174,7 +233,7 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
def test_testgasnet(self):
"""run testgasnet and check output"""
- if "conduits=none" in self.spec:
+ if self.spec.satisfies("conduits=none"):
raise SkipTest("Test requires conduit libraries")
self._setup_test_env()
diff --git a/var/spack/repos/builtin/packages/gatb-core/package.py b/var/spack/repos/builtin/packages/gatb-core/package.py
index f37117d844..9931d15bb2 100644
--- a/var/spack/repos/builtin/packages/gatb-core/package.py
+++ b/var/spack/repos/builtin/packages/gatb-core/package.py
@@ -17,4 +17,7 @@ class GatbCore(CMakePackage):
version("1.4.2", tag="v1.4.2", commit="99f573a465beb30acc22ab20be458d2ea0277684")
version("1.4.1", tag="v1.4.1", commit="b45a6c213597b23f8f5221902e2b86b4009c11d9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
root_cmakelists_dir = "gatb-core"
diff --git a/var/spack/repos/builtin/packages/gate/package.py b/var/spack/repos/builtin/packages/gate/package.py
index 9a77788ef7..72060b6127 100644
--- a/var/spack/repos/builtin/packages/gate/package.py
+++ b/var/spack/repos/builtin/packages/gate/package.py
@@ -31,6 +31,9 @@ class Gate(CMakePackage):
version("9.1", sha256="aaab874198500b81d45b27cc6d6a51e72cca9519910b893a5c85c8e6d3ffa4fc")
version("9.0", sha256="8354f392facc0b7ae2ddf0eed61cc43136195b198ba399df25e874886b8b69cb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("rtk", default=False, description="build support for the Reconstruction Toolkit")
variant(
"default_platform",
@@ -52,7 +55,7 @@ class Gate(CMakePackage):
def cmake_args(self):
args = []
- if "+rtk" in self.spec:
+ if self.spec.satisfies("+rtk"):
args.extend(["-DGATE_USE_ITK=ON", "-DGATE_USE_RTK=ON"])
else:
args.extend(["-DGATE_USE_ITK=OFF", "-DGATE_USE_RTK=OFF"])
diff --git a/var/spack/repos/builtin/packages/gatepet2stir/package.py b/var/spack/repos/builtin/packages/gatepet2stir/package.py
index 08caa8ed0f..5c84bfb53f 100644
--- a/var/spack/repos/builtin/packages/gatepet2stir/package.py
+++ b/var/spack/repos/builtin/packages/gatepet2stir/package.py
@@ -14,6 +14,8 @@ class Gatepet2stir(QMakePackage):
version("1.3.2", sha256="c53b990e47b5856d47466cff62763d0a3bfdc12538b6842cce45271badb7a387")
+ depends_on("cxx", type="build") # generated
+
depends_on("gperftools")
depends_on("ncurses")
depends_on("qt@:4")
diff --git a/var/spack/repos/builtin/packages/gatetools/package.py b/var/spack/repos/builtin/packages/gatetools/package.py
index 3c4222b73a..dcebec60d5 100644
--- a/var/spack/repos/builtin/packages/gatetools/package.py
+++ b/var/spack/repos/builtin/packages/gatetools/package.py
@@ -14,6 +14,7 @@ class Gatetools(PythonPackage):
license("LGPL-3.0-only")
+ version("0.12.1", sha256="eb4847442594e466f0fc01eb5ff1eb89f1dfc4e4b5968d611dacb75a88d24013")
version("0.11.2", sha256="6eef8a779278b862823ae79d6aab210db4f7889c9127b2c2e4c3a4195f9a9928")
version("0.9.14", sha256="78fe864bb52fd4c6aeeee90d8f6c1bc5406ce02ac6f48712379efac606b5c006")
diff --git a/var/spack/repos/builtin/packages/gatk/package.py b/var/spack/repos/builtin/packages/gatk/package.py
index bab4123466..3c71462b14 100644
--- a/var/spack/repos/builtin/packages/gatk/package.py
+++ b/var/spack/repos/builtin/packages/gatk/package.py
@@ -21,6 +21,7 @@ class Gatk(Package):
license("Unlicense")
+ version("4.5.0.0", sha256="dc1a4471e8bb566397db9894ca18acbf8f40f3fc312c8fad9a8c5390c218e916")
version("4.4.0.0", sha256="444600f7b38b46ad0b3606b7d40ce921e0ff1910a50165872f1c73c7c4a1a390")
version("4.3.0.0", sha256="e2c27229b34c3e22445964adf00639a0909887bbfcc040f6910079177bc6e2dd")
version("4.2.6.1", sha256="1125cfc862301d437310506c8774d36c3a90d00d52c7b5d6b59dac7241203628")
diff --git a/var/spack/repos/builtin/packages/gaudi/build_testing.patch b/var/spack/repos/builtin/packages/gaudi/build_testing.patch
deleted file mode 100644
index ee736fd6dd..0000000000
--- a/var/spack/repos/builtin/packages/gaudi/build_testing.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/GaudiExamples/CMakeLists.txt b/GaudiExamples/CMakeLists.txt
-index ef6f9fcff..672b76d26 100644
---- a/GaudiExamples/CMakeLists.txt
-+++ b/GaudiExamples/CMakeLists.txt
-@@ -0,0 +1,7 @@
-+# GaudiExamples subdirectory
-+if(NOT BUILD_TESTING)
-+ # Ignore examples if not building tests
-+ # see https://gitlab.cern.ch/atlas/atlasexternals/-/merge_requests/664#note_3395313
-+ return()
-+endif()
-+
-
diff --git a/var/spack/repos/builtin/packages/gaudi/includes.patch b/var/spack/repos/builtin/packages/gaudi/includes.patch
new file mode 100644
index 0000000000..84d9851706
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gaudi/includes.patch
@@ -0,0 +1,38 @@
+diff --git a/GaudiHive/src/AvalancheSchedulerSvc.cpp b/GaudiHive/src/AvalancheSchedulerSvc.cpp
+index 7f49e6f75..76601bed8 100644
+--- a/GaudiHive/src/AvalancheSchedulerSvc.cpp
++++ b/GaudiHive/src/AvalancheSchedulerSvc.cpp
+@@ -23,6 +23,7 @@
+
+ // C++
+ #include <algorithm>
++#include <fstream>
+ #include <map>
+ #include <queue>
+ #include <sstream>
+diff --git a/GaudiHive/src/PRGraph/Visitors/Rankers.cpp b/GaudiHive/src/PRGraph/Visitors/Rankers.cpp
+index 33f733633..e4d33080f 100644
+--- a/GaudiHive/src/PRGraph/Visitors/Rankers.cpp
++++ b/GaudiHive/src/PRGraph/Visitors/Rankers.cpp
+@@ -10,6 +10,8 @@
+ \***********************************************************************************/
+ #include "Rankers.h"
+
++#include <fstream>
++
+ namespace concurrency {
+
+ //--------------------------------------------------------------------------
+diff --git a/GaudiHive/src/PrecedenceSvc.cpp b/GaudiHive/src/PrecedenceSvc.cpp
+index ac4a7b7d9..1ff1e3f9e 100644
+--- a/GaudiHive/src/PrecedenceSvc.cpp
++++ b/GaudiHive/src/PrecedenceSvc.cpp
+@@ -17,6 +17,8 @@
+ #include <Gaudi/Algorithm.h>
+ #include <Gaudi/Sequence.h>
+
++#include <fstream>
++
+ #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
+ #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) )
+
diff --git a/var/spack/repos/builtin/packages/gaudi/link_target_fixes.patch b/var/spack/repos/builtin/packages/gaudi/link_target_fixes.patch
deleted file mode 100644
index 468c117b51..0000000000
--- a/var/spack/repos/builtin/packages/gaudi/link_target_fixes.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-diff --git a/cmake/GaudiProjectConfig.cmake b/cmake/GaudiProjectConfig.cmake
-index d7049233e..a9ef71e9a 100644
---- a/cmake/GaudiProjectConfig.cmake
-+++ b/cmake/GaudiProjectConfig.cmake
-@@ -356,6 +356,8 @@ macro(gaudi_project project version)
- # Make sure we select the version of Python provided by LCG (if we are building in that context)
- if(Python_config_version)
- set(Python_config_version ${Python_config_version} CACHE STRING "LCG version of Python")
-+ # Prevent special LCG versions (like 2.7.9.p1) to confuse CMake
-+ string(REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" Python_config_version "${Python_config_version}")
- find_package(PythonInterp ${Python_config_version} QUIET)
- find_package(PythonLibs ${Python_config_version} QUIET)
- if(CMAKE_VERSION VERSION_GREATER 3.12)
-@@ -373,10 +375,10 @@ macro(gaudi_project project version)
- #-- Set up the boost_python_version variable for the project
- find_package(PythonInterp)
- find_package(Boost)
-- if((Boost_VERSION GREATER 106700) OR (Boost_VERSION EQUAL 106700))
-- set(boost_python_version "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
-+ if((Boost_VERSION LESS 106700) OR (Boost_VERSION GREATER 1069000))
-+ set(boost_python_version "")
- else()
-- set(boost_python_version "")
-+ set(boost_python_version "${Python_VERSION_MAJOR}${Python_VERSION_MINOR}")
- endif()
-
- #--- Allow installation on failed builds
-@@ -1620,9 +1622,24 @@ function(gaudi_resolve_link_libraries variable)
- set(collected)
- foreach(package ${ARGN})
- # check if it is an actual library or a target first
-+ if(NOT TARGET ${package})
-+ if(package MATCHES "^Boost::(.*)$")
-+ # special handling of Boost imported targets
-+ find_package(Boost COMPONENTS ${CMAKE_MATCH_1} QUIET)
-+ else()
-+ # the target might be in a project namespace
-+ foreach(_p IN LISTS used_gaudi_projects)
-+ if(TARGET ${_p}::${package})
-+ #message(STATUS "using ${_p}::${package} for ${package}")
-+ set(package ${_p}::${package})
-+ break()
-+ endif()
-+ endforeach()
-+ endif()
-+ endif()
- if(TARGET ${package})
- get_property(target_type TARGET ${package} PROPERTY TYPE)
-- if(NOT target_type MATCHES "(SHARED|STATIC)_LIBRARY")
-+ if(NOT target_type MATCHES "(SHARED|STATIC|UNKNOWN)_LIBRARY")
- message(FATAL_ERROR "${package} is a ${target_type}: you cannot link against it")
- endif()
- #message(STATUS "${package} is a TARGET")
-@@ -1670,6 +1687,19 @@ function(gaudi_resolve_link_libraries variable)
- endforeach()
- #message(STATUS "gaudi_resolve_link_libraries collected: ${collected}")
- _gaudi_strip_build_type_libs(collected)
-+ # resolve missing Boost::* targets, if needed
-+ set(boost_components ${collected})
-+ list(FILTER boost_components INCLUDE REGEX "^Boost::")
-+ list(TRANSFORM boost_components REPLACE "^Boost::" "")
-+ set(missing_components)
-+ foreach(comp IN LISTS boost_components)
-+ if(NOT TARGET Boost::${comp})
-+ list(APPEND missing_components ${comp})
-+ endif()
-+ endforeach()
-+ if(missing_components)
-+ find_package(Boost COMPONENTS ${missing_components} QUIET)
-+ endif()
- #message(STATUS "gaudi_resolve_link_libraries output: ${collected}")
- set(${variable} ${collected} PARENT_SCOPE)
- endfunction()
-@@ -3277,6 +3307,14 @@ macro(gaudi_external_project_environment)
- list(FIND used_gaudi_projects ${pack} gaudi_project_idx)
- if((NOT pack STREQUAL GaudiProject) AND (gaudi_project_idx EQUAL -1))
- message(STATUS " ${pack}")
-+ if(pack STREQUAL Boost)
-+ if(NOT TARGET Boost::headers)
-+ # this is needed to get the non-cache variables for the packages
-+ # but we do not need to call it if we do not use FindBoost.cmake (Boost >= 1.70)
-+ find_package(${pack} QUIET)
-+ endif()
-+ endif()
-+
- if(NOT pack MATCHES "^Python(Interp|Libs)?$")
- # this is needed to get the non-cache variables for the packages
- find_package(${pack} QUIET)
-@@ -3325,6 +3363,17 @@ macro(gaudi_external_project_environment)
- list(APPEND environment SET QT_XKB_CONFIG_ROOT "/usr/share/X11/xkb")
- endif()
- endif()
-+ elseif(pack MATCHES "^boost_(.*)$")
-+ # We are using BoostConfig.cmake (>=1.70) and not FindBoost.cmake
-+ if(TARGET "Boost::${CMAKE_MATCH_1}")
-+ set(tgt_name "Boost::${CMAKE_MATCH_1}")
-+ get_property(target_type TARGET ${tgt_name} PROPERTY TYPE)
-+ if(target_type MATCHES "(SHARED|UNKNOWN)_LIBRARY")
-+ # FIXME: I'm not sure it's good to rely on the "_RELEASE" suffix
-+ get_property(lib_path TARGET ${tgt_name} PROPERTY IMPORTED_LOCATION_RELEASE)
-+ get_filename_component(${pack}_LIBRARY_DIR "${lib_path}" PATH)
-+ endif()
-+ endif()
- endif()
-
- list(APPEND binary_path ${${pack}_BINARY_PATH})
diff --git a/var/spack/repos/builtin/packages/gaudi/link_target_fixes32.patch b/var/spack/repos/builtin/packages/gaudi/link_target_fixes32.patch
deleted file mode 100644
index 95339a0931..0000000000
--- a/var/spack/repos/builtin/packages/gaudi/link_target_fixes32.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-diff --git a/cmake/GaudiProjectConfig.cmake b/cmake/GaudiProjectConfig.cmake
-index 3da52a9c6..08c11c863 100644
---- a/cmake/GaudiProjectConfig.cmake
-+++ b/cmake/GaudiProjectConfig.cmake
-@@ -346,6 +346,8 @@ macro(gaudi_project project version)
- # Make sure we select the version of Python provided by LCG (if we are building in that context)
- if(Python_config_version)
- set(Python_config_version ${Python_config_version} CACHE STRING "LCG version of Python")
-+ # Prevent special LCG versions (like 2.7.9.p1) to confuse CMake
-+ string(REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" Python_config_version "${Python_config_version}")
- find_package(PythonInterp ${Python_config_version} QUIET)
- find_package(PythonLibs ${Python_config_version} QUIET)
- if(CMAKE_VERSION VERSION_GREATER 3.12)
-@@ -363,10 +365,10 @@ macro(gaudi_project project version)
- #-- Set up the boost_python_version variable for the project
- find_package(PythonInterp)
- find_package(Boost)
-- if((Boost_VERSION GREATER 106700) OR (Boost_VERSION EQUAL 106700))
-- set(boost_python_version "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
-+ if((Boost_VERSION LESS 106700) OR (Boost_VERSION GREATER 1069000))
-+ set(boost_python_version "")
- else()
-- set(boost_python_version "")
-+ set(boost_python_version "${Python_VERSION_MAJOR}${Python_VERSION_MINOR}")
- endif()
-
- #--- Allow installation on failed builds
-@@ -1607,9 +1609,25 @@ function(gaudi_resolve_link_libraries variable)
- set(collected)
- foreach(package ${ARGN})
- # check if it is an actual library or a target first
-+ if(NOT TARGET ${package})
-+ if(package MATCHES "^Boost::(.*)$")
-+ # special handling of Boost imported targets
-+ find_package(Boost COMPONENTS ${CMAKE_MATCH_1} QUIET)
-+ else()
-+ # the target might be in a project namespace
-+ foreach(_p IN LISTS used_gaudi_projects)
-+ if(TARGET ${_p}::${package})
-+ #message(STATUS "using ${_p}::${package} for ${package}")
-+ set(package ${_p}::${package})
-+ break()
-+ endif()
-+ endforeach()
-+ endif()
-+ endif()
-+
- if(TARGET ${package})
- get_property(target_type TARGET ${package} PROPERTY TYPE)
-- if(NOT target_type MATCHES "(SHARED|STATIC)_LIBRARY")
-+ if(NOT target_type MATCHES "(SHARED|STATIC|UNKNOWN)_LIBRARY")
- message(FATAL_ERROR "${package} is a ${target_type}: you cannot link against it")
- endif()
- #message(STATUS "${package} is a TARGET")
-@@ -1657,6 +1675,19 @@ function(gaudi_resolve_link_libraries variable)
- endforeach()
- #message(STATUS "gaudi_resolve_link_libraries collected: ${collected}")
- _gaudi_strip_build_type_libs(collected)
-+ # resolve missing Boost::* targets, if needed
-+ set(boost_components ${collected})
-+ list(FILTER boost_components INCLUDE REGEX "^Boost::")
-+ list(TRANSFORM boost_components REPLACE "^Boost::" "")
-+ set(missing_components)
-+ foreach(comp IN LISTS boost_components)
-+ if(NOT TARGET Boost::${comp})
-+ list(APPEND missing_components ${comp})
-+ endif()
-+ endforeach()
-+ if(missing_components)
-+ find_package(Boost COMPONENTS ${missing_components} QUIET)
-+ endif()
- #message(STATUS "gaudi_resolve_link_libraries output: ${collected}")
- set(${variable} ${collected} PARENT_SCOPE)
- endfunction()
-@@ -3262,6 +3293,14 @@ macro(gaudi_external_project_environment)
- list(FIND used_gaudi_projects ${pack} gaudi_project_idx)
- if((NOT pack STREQUAL GaudiProject) AND (gaudi_project_idx EQUAL -1))
- message(STATUS " ${pack}")
-+ if(pack STREQUAL Boost)
-+ if(NOT TARGET Boost::headers)
-+ # this is needed to get the non-cache variables for the packages
-+ # but we do not need to call it if we do not use FindBoost.cmake (Boost >= 1.70)
-+ find_package(${pack} QUIET)
-+ endif()
-+ endif()
-+
- if(NOT pack MATCHES "^Python(Interp|Libs)?$")
- # this is needed to get the non-cache variables for the packages
- find_package(${pack} QUIET)
-@@ -3310,6 +3349,17 @@ macro(gaudi_external_project_environment)
- list(APPEND environment SET QT_XKB_CONFIG_ROOT "/usr/share/X11/xkb")
- endif()
- endif()
-+ elseif(pack MATCHES "^boost_(.*)$")
-+ # We are using BoostConfig.cmake (>=1.70) and not FindBoost.cmake
-+ if(TARGET "Boost::${CMAKE_MATCH_1}")
-+ set(tgt_name "Boost::${CMAKE_MATCH_1}")
-+ get_property(target_type TARGET ${tgt_name} PROPERTY TYPE)
-+ if(target_type MATCHES "(SHARED|UNKNOWN)_LIBRARY")
-+ # FIXME: I'm not sure it's good to rely on the "_RELEASE" suffix
-+ get_property(lib_path TARGET ${tgt_name} PROPERTY IMPORTED_LOCATION_RELEASE)
-+ get_filename_component(${pack}_LIBRARY_DIR "${lib_path}" PATH)
-+ endif()
-+ endif()
- endif()
-
- list(APPEND binary_path ${${pack}_BINARY_PATH})
diff --git a/var/spack/repos/builtin/packages/gaudi/package.py b/var/spack/repos/builtin/packages/gaudi/package.py
index d370b359e4..b580eeec77 100644
--- a/var/spack/repos/builtin/packages/gaudi/package.py
+++ b/var/spack/repos/builtin/packages/gaudi/package.py
@@ -3,8 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
-from spack.pkg.builtin.boost import Boost
class Gaudi(CMakePackage):
@@ -17,6 +18,12 @@ class Gaudi(CMakePackage):
tags = ["hep"]
version("master", branch="master")
+ version("39.0", sha256="faa3653e2e6c769292c0592e3fc35cd98a2820bd6fc0c967cac565808b927262")
+ version("38.3", sha256="47e8c65ea446656d2dae54a32205525e08257778cf80f9f029cd244d6650486e")
+ version("38.2", sha256="08759b1398336987ad991602e37079f0744e8d8e4e3d5df2d253b8dedf925068")
+ version("38.1", sha256="79d42833edcebc2099f91badb6f72708640c05f678cc4521a86e857f112486dc")
+ version("38.0", sha256="52f2733fa0af760c079b3438bb9c7e36b28ea704f78b0085458e1918c11e1653")
+ version("37.2", sha256="9b866caab46e182de98b59eddbde80d6fa0e670fe4a35906f1518b04bd99b2d2")
version("37.1", sha256="1d7038fd5dfb5f2517ce57623cf8090549ffe2ea8f0171d534e5c1ca20bd009a")
version("37.0", sha256="823f3821a4f498ddd2dd123fbb8a3787b361ddfd818f4ab13572076fc9afdfe4")
version("36.14", sha256="b11e0afcb797d61a305856dfe8079d48d74c6b6867ceccc0a83aab5978c9ba5f")
@@ -36,12 +43,17 @@ class Gaudi(CMakePackage):
version("36.0", sha256="8a0458cef5b616532f9db7cca9fa0e892e602b64c9e93dc0cc6d972e03034830")
version("35.0", sha256="c01b822f9592a7bf875b9997cbeb3c94dea97cb13d523c12649dbbf5d69b5fa6")
+ depends_on("cxx", type="build")
+
+ conflicts("%gcc@:10", when="@39:", msg="Gaudi needs a c++20 capable compiler for this version")
+
maintainers("drbenmorgan", "vvolkl", "jmcarcell")
variant("aida", default=False, description="Build AIDA interfaces support")
variant("cppunit", default=False, description="Build with CppUnit unit testing")
variant("docs", default=False, description="Build documentation with Doxygen")
variant("examples", default=False, description="Build examples")
+ variant("gaudialg", default=False, description="Build GaudiAlg support", when="@37.0:38")
variant("gperftools", default=False, description="Build with Google PerfTools support")
variant("heppdt", default=False, description="Build with HEP Particle Data Table support")
variant("jemalloc", default=False, description="Build with jemalloc allocator support")
@@ -49,11 +61,6 @@ class Gaudi(CMakePackage):
variant("vtune", default=False, description="Build with Intel VTune profiler support")
variant("xercesc", default=False, description="Build with Xerces-C XML support")
- # only build subdirectory GaudiExamples when +examples
- patch("build_testing.patch", when="@:34")
- # fixes for the cmake config which could not find newer boost versions
- patch("link_target_fixes.patch", when="@33.0:34")
- patch("link_target_fixes32.patch", when="@:32.2")
patch("fmt_fix.patch", when="@36.6:36.12 ^fmt@10:")
# fix issues with catch2 3.1 and above
patch(
@@ -61,30 +68,53 @@ class Gaudi(CMakePackage):
sha256="b05f6b7c1efb8c3af291c8d81fd1627e58af7c5f9a78a0098c6e3bfd7ec80c15",
when="@37.1 ^catch2@3.1:",
)
+ # add missing <list> include for newer compilers
+ patch(
+ "https://gitlab.cern.ch/gaudi/Gaudi/-/commit/54b727f08a685606420703098131b387d3026637.diff",
+ sha256="41aa1587a3e59d49e0fa9659577073c091871c2eca1b8b237c177ab98fbacf3f",
+ when="@:38.1",
+ )
+
+ # add a few missing includes (c++20?)
+ patch("includes.patch", when="@37:38")
# These dependencies are needed for a minimal Gaudi build
depends_on("aida")
- depends_on("boost@1.67.0: +python")
+ # The boost components that are required for Gaudi
+ boost_libs = "+".join(
+ [
+ "system",
+ "filesystem",
+ "regex",
+ "thread",
+ "python",
+ "test",
+ "program_options",
+ "log",
+ "graph",
+ ]
+ )
+ depends_on(f"boost@1.70: +{boost_libs}", when="@35:")
+ depends_on(f"boost@1.70: +{boost_libs}+fiber", when="@39:")
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants)
depends_on("clhep")
depends_on("cmake", type="build")
+ depends_on("cmake@3.19:", type="build", when="@39:")
depends_on("cppgsl")
- depends_on("fmt")
depends_on("fmt@:8", when="@:36.9")
+ depends_on("fmt@:10")
depends_on("intel-tbb@:2020.3", when="@:37.0")
depends_on("tbb", when="@37.1:")
depends_on("uuid")
depends_on("nlohmann-json")
- depends_on("python", type=("build", "run"))
+ depends_on("python +dbm", type=("build", "run"))
depends_on("py-networkx", type=("build", "run"))
depends_on("py-six", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run", "test"))
depends_on("range-v3")
depends_on("root +python +root7 +ssl +tbb +threads")
depends_on("zlib-api")
+ depends_on("py-pytest-cov", when="@39:")
# Testing dependencies
# Note: gaudi only builds examples when testing enabled
@@ -93,11 +123,11 @@ class Gaudi(CMakePackage):
depends_on(pv[0], when=pv[1] + " +examples")
# Adding these dependencies triggers the build of most optional components
- depends_on("cppgsl", when="+cppunit")
depends_on("cppunit", when="+cppunit")
depends_on("doxygen +graphviz", when="+docs")
depends_on("gperftools", when="+gperftools")
- depends_on("gdb")
+ # gdb is optional, but useful to have as gaudi adds hooks for it if present during build
+ depends_on("gdb", when=sys.platform != "darwin")
depends_on("heppdt", when="+heppdt")
depends_on("jemalloc", when="+jemalloc")
depends_on("libunwind", when="+unwind")
@@ -114,6 +144,7 @@ class Gaudi(CMakePackage):
self.define("BUILD_TESTING", self.run_tests or self.spec.satisfies("+examples")),
self.define_from_variant("GAUDI_USE_AIDA", "aida"),
self.define_from_variant("GAUDI_USE_CPPUNIT", "cppunit"),
+ self.define_from_variant("GAUDI_ENABLE_GAUDIALG", "gaudialg"),
self.define_from_variant("GAUDI_USE_GPERFTOOLS", "gperftools"),
self.define_from_variant("GAUDI_USE_HEPPDT", "heppdt"),
self.define_from_variant("GAUDI_USE_JEMALLOC", "jemalloc"),
@@ -126,6 +157,10 @@ class Gaudi(CMakePackage):
# todo:
self.define("GAUDI_USE_INTELAMPLIFIER", False),
]
+ # Release notes for v39.0: https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v39r0
+ # Gaudi@39: needs C++ >= 20, and we need to force CMake to use C++ 20 with old gcc:
+ if self.spec.satisfies("@39: %gcc@:13"):
+ args.append(self.define("GAUDI_CXX_STANDARD", "20"))
return args
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-building-c-code-with-pgcc.patch b/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-building-c-code-with-pgcc.patch
deleted file mode 100644
index 50ec242a41..0000000000
--- a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-building-c-code-with-pgcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ed64417746c570a00b0ba6c2c8091de4845f9ed1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Tue, 6 Oct 2020 17:48:12 +0200
-Subject: [PATCH 4/5] fix building c code with pgcc
-
----
- bsd/i386.make | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bsd/i386.make b/bsd/i386.make
-index 759ed84..9018c1b 100644
---- a/bsd/i386.make
-+++ b/bsd/i386.make
-@@ -130,7 +130,7 @@ VECTOR = -Mvect=assoc,recog,noaltcode,cachesize:$(CSIZE)$(VECTOR4)
- MACHTY = p7-32
- MACH = -tp $(MACHTY) $(TIME)
- OPTOI = -m32 -march=i486 -malign-double
--GCCOPTS = -ffast-math -funroll-loops -fexpensive-optimizations
-+GCCOPTS = -fast
- OPTFLAGO = $(OPTOI) -O3 $(GCCOPTS)
- # Flags for portland compiler.
- #
---
-2.26.2
-
diff --git a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-shebangs.patch b/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-shebangs.patch
deleted file mode 100644
index fe3681e4ad..0000000000
--- a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-fix-shebangs.patch
+++ /dev/null
@@ -1,841 +0,0 @@
-From 7f5d1d92b18951e364fe32a247056eea0cf130a0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Tue, 6 Oct 2020 17:55:08 +0200
-Subject: [PATCH 5/5] fix shebangs
-
----
- bsd/bldg16 | 3 ++-
- bsd/cachesize | 2 +-
- bsd/checkf | 2 +-
- bsd/ckall | 2 +-
- bsd/ckwork | 2 +-
- bsd/clearipc | 2 +-
- bsd/clone-working | 2 +-
- bsd/cloneg16 | 2 +-
- bsd/co1 | 2 +-
- bsd/comp | 2 +-
- bsd/comp4 | 2 +-
- bsd/compall | 2 +-
- bsd/comphalf | 2 +-
- bsd/diff-src | 2 +-
- bsd/do-util | 3 ++-
- bsd/dom | 2 +-
- bsd/extract-ghelp | 2 +-
- bsd/extract-ghelp-16 | 2 +-
- bsd/findnew | 2 +-
- bsd/findnew1 | 2 +-
- bsd/fixlib | 2 +-
- bsd/fixlinda | 2 +-
- bsd/g16test | 2 +-
- bsd/gau-arflags | 2 +-
- bsd/gau-fixexe | 2 +-
- bsd/gau-get | 2 +-
- bsd/gau-hname | 2 +-
- bsd/gau-nname | 2 +-
- bsd/gau-ranlib | 2 +-
- bsd/gau-unlimit | 2 +-
- bsd/get-ref | 2 +-
- bsd/getx | 2 +-
- bsd/gzt | 2 +-
- bsd/install | 2 +-
- bsd/l1.make | 2 +-
- bsd/l4x | 3 ++-
- bsd/l9999.make | 2 +-
- bsd/linda-ln | 2 +-
- bsd/linda-lnx | 2 +-
- bsd/link.make | 2 +-
- bsd/lx-working | 2 +-
- bsd/lxi-working | 2 +-
- bsd/make-edir | 2 +-
- bsd/make-ldir | 2 +-
- bsd/make-nutill | 3 ++-
- bsd/makeutilcd | 2 +-
- bsd/mkt | 3 ++-
- bsd/mkunixcd | 2 +-
- bsd/movemerged | 2 +-
- bsd/rdmat-ext | 2 +-
- bsd/ren | 2 +-
- bsd/rfhello | 3 ++-
- bsd/rs6k.make | 3 ++-
- bsd/save-working | 2 +-
- bsd/set-mflags | 2 +-
- bsd/setcdef | 2 +-
- bsd/setup-linda | 2 +-
- bsd/ssrunx | 3 ++-
- bsd/ssruny | 2 +-
- bsd/subg16 | 4 ++--
- bsd/sumcpu | 2 +-
- bsd/tbzip | 2 +-
- bsd/test-times | 2 +-
- bsd/testl1 | 2 +-
- bsd/testunf | 3 ++-
- bsd/tgzip | 2 +-
- bsd/tree.make | 2 +-
- bsd/txzip | 2 +-
- bsd/tzzip | 2 +-
- bsd/upd | 2 +-
- bsd/upd-util | 3 ++-
- bsd/updatelink | 2 +-
- bsd/updatelink1 | 2 +-
- bsd/x86type | 2 +-
- 74 files changed, 85 insertions(+), 75 deletions(-)
-
-diff --git a/bsd/bldg16 b/bsd/bldg16
-index c3db34a..f7af456 100755
---- a/bsd/bldg16
-+++ b/bsd/bldg16
-@@ -1,4 +1,5 @@
--#!/bin/csh -xf
-+#!/usr/bin/env tcsh
-+set echo
- #
- # Build Gaussian 16 from source as from distribution tape. The default
- # directory should be the main g16 directory.
-diff --git a/bsd/cachesize b/bsd/cachesize
-index 5ec2c79..f03b7e7 100755
---- a/bsd/cachesize
-+++ b/bsd/cachesize
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set x = `gau-machine`
- @ minc = "524288"
- if ($?GAUSS_CACHESIZE) then
-diff --git a/bsd/checkf b/bsd/checkf
-index f7a271e..0a672b7 100755
---- a/bsd/checkf
-+++ b/bsd/checkf
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set name = "xxx-ftnchek"
- set flags = "-noextern -sixchar -common=2 -novice=no -arguments=3 -array=0 -common=2 -f77=automatic-array,common-subprog-name,quotemark,statement-order,do-enddo,inline-comment,mixed-common -notruncation -truncation=real-do-index -truncation=real-subscript -nopure -nopretty -pretty=embedded-spaces -pretty=long-line -pretty=missing-space -usage=no-do-index-modified,no-arg-alias,no-arg-array-alias,arg-const-modified,ext-multiply-defined,var-set-unused,var-uninitialized,var-unused -nowrap -portability=tab -quiet"
- set TD = "/tmp"
-diff --git a/bsd/ckall b/bsd/ckall
-index 0c058ec..177be53 100755
---- a/bsd/ckall
-+++ b/bsd/ckall
-@@ -1,3 +1,3 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- cat $g16root/g16/{l[0-9]*,lapack-generic,blas-generic,mm,formchk,unfchk,chkchk,c8616,copychk,cubegen,cubman,dummy,freqchk,freqmem,newzmat,wrappers,rwfdump,solname,trajgen,*util*,bsd/mdutil,bsd/mdl1}.F >all.all
- checkf all.all x >&all.dat
-diff --git a/bsd/ckwork b/bsd/ckwork
-index 66f99a1..5194544 100755
---- a/bsd/ckwork
-+++ b/bsd/ckwork
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Check for routines already in working which are also new in the
- # current directory.
-diff --git a/bsd/clearipc b/bsd/clearipc
-index a94cc26..71a9dd7 100755
---- a/bsd/clearipc
-+++ b/bsd/clearipc
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- unalias rm
- if ("`whoami`" == "root") then
- set us="x"
-diff --git a/bsd/clone-working b/bsd/clone-working
-index 22afef2..6c5f2e5 100755
---- a/bsd/clone-working
-+++ b/bsd/clone-working
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ("$1" == "-s") then
- set ww = "/$workbase/1/frisch/working/save-$2"
- mkdir save-$2
-diff --git a/bsd/cloneg16 b/bsd/cloneg16
-index ef69d69..56fb567 100755
---- a/bsd/cloneg16
-+++ b/bsd/cloneg16
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Make a cloned copy of the Gaussian directories, with soft links
- # to the source files but local copies of objects.
-diff --git a/bsd/co1 b/bsd/co1
-index 12ea322..007a2f5 100755
---- a/bsd/co1
-+++ b/bsd/co1
-@@ -1,2 +1,2 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- ../bsd/comp -o ${1}*.F >&../make${1}.log
-diff --git a/bsd/comp b/bsd/comp
-index cb1737c..5a583c3 100755
---- a/bsd/comp
-+++ b/bsd/comp
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- source $g16root/g16/bsd/g16.login
- set mfile = "bsd/g16.make"
- set mflags = "`set-mflags`"
-diff --git a/bsd/comp4 b/bsd/comp4
-index 0ca0806..7e11bf8 100755
---- a/bsd/comp4
-+++ b/bsd/comp4
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if (-e bsd/g16.make) make -f bsd/g16.make clean
- rm -f make*log
- bsd/bldg16 $argv >&make.log &
-diff --git a/bsd/compall b/bsd/compall
-index d53392d..0b68de0 100755
---- a/bsd/compall
-+++ b/bsd/compall
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if (-e bsd/g16.make) make -f bsd/g16.make clean
- rm -f make*log
- bsd/bldg16 $argv >&make.log &
-diff --git a/bsd/comphalf b/bsd/comphalf
-index 43bb0ee..b5fd399 100755
---- a/bsd/comphalf
-+++ b/bsd/comphalf
-@@ -1,2 +1,2 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- bsd/comp newzmat.F l1.F l101.F l10[2-9].F l1[1-2]?.F l[2-9]*.F l1???.F
-diff --git a/bsd/diff-src b/bsd/diff-src
-index 8b63e3a..cb08d97 100755
---- a/bsd/diff-src
-+++ b/bsd/diff-src
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- foreach x (*.new)
- diff -i -w $x $x:r.F >$x:r.diff
- if ($status) then
-diff --git a/bsd/do-util b/bsd/do-util
-index b43b109..8469289 100755
---- a/bsd/do-util
-+++ b/bsd/do-util
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- mkdir temp
- cd temp
- gau-fsplit $1/${2}.F
-diff --git a/bsd/dom b/bsd/dom
-index 4475ad5..92eccc4 100755
---- a/bsd/dom
-+++ b/bsd/dom
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set file = "$1"
- shift
- set file = "$file:r"
-diff --git a/bsd/extract-ghelp b/bsd/extract-ghelp
-index a4e5e9e..36e6ba8 100755
---- a/bsd/extract-ghelp
-+++ b/bsd/extract-ghelp
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # This script runs awk to create abstracts of each source file
- # containing the information for ghelp. This allows ghelp to
-diff --git a/bsd/extract-ghelp-16 b/bsd/extract-ghelp-16
-index 9635d7b..36e6ba8 100755
---- a/bsd/extract-ghelp-16
-+++ b/bsd/extract-ghelp-16
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- #
- # This script runs awk to create abstracts of each source file
- # containing the information for ghelp. This allows ghelp to
-diff --git a/bsd/findnew b/bsd/findnew
-index bc1d527..2ab83c4 100755
---- a/bsd/findnew
-+++ b/bsd/findnew
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ("$1" == "") then
- set ext = "diffn"
- @ docopy = 0
-diff --git a/bsd/findnew1 b/bsd/findnew1
-index 9d42145..70ae61f 100755
---- a/bsd/findnew1
-+++ b/bsd/findnew1
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ("$1" == "") then
- set ext = "diff"
- else
-diff --git a/bsd/fixlib b/bsd/fixlib
-index ae7118d..0cd9ad1 100755
---- a/bsd/fixlib
-+++ b/bsd/fixlib
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Fix up a library using lorder. This routine just does a ranlib except
- # on the trace because some of the libraries have too many object files
-diff --git a/bsd/fixlinda b/bsd/fixlinda
-index 233fff1..0a395db 100755
---- a/bsd/fixlinda
-+++ b/bsd/fixlinda
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set x = `pwd`
- set y = `basename $x`
- if ("$y" != "g16") then
-diff --git a/bsd/g16test b/bsd/g16test
-index 3967e8e..a7c0808 100755
---- a/bsd/g16test
-+++ b/bsd/g16test
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Script to run G16 from a working directory with
- # other executables from the standard places.
-diff --git a/bsd/gau-arflags b/bsd/gau-arflags
-index 7aba8a4..d268bc0 100755
---- a/bsd/gau-arflags
-+++ b/bsd/gau-arflags
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set x = `gau-machine`
- set machflags = ""
- set modeflags = ""
-diff --git a/bsd/gau-fixexe b/bsd/gau-fixexe
-index 2266453..892eec6 100755
---- a/bsd/gau-fixexe
-+++ b/bsd/gau-fixexe
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set gm = "$g16root/g16/bsd/gau-hname"
- if (-e $gm) then
- set hname = `gau-hname`
-diff --git a/bsd/gau-get b/bsd/gau-get
-index 29e9e96..4da00b0 100755
---- a/bsd/gau-get
-+++ b/bsd/gau-get
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- @ n = $#argv - 1
- set str = ""
- foreach x ($argv[1-$n])
-diff --git a/bsd/gau-hname b/bsd/gau-hname
-index c56cc6f..00a422e 100755
---- a/bsd/gau-hname
-+++ b/bsd/gau-hname
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set xname = "$g16root/g16"
- if ((-e $xname/ia32p4.flag) || (-e $xname/ia32p3.flag) ) then
- set hname = "i386"
-diff --git a/bsd/gau-nname b/bsd/gau-nname
-index 391f44f..ad7daa7 100755
---- a/bsd/gau-nname
-+++ b/bsd/gau-nname
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ("$1" == "-") then
- set nn = ""
- else
-diff --git a/bsd/gau-ranlib b/bsd/gau-ranlib
-index 79c4eda..5ff56cb 100755
---- a/bsd/gau-ranlib
-+++ b/bsd/gau-ranlib
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Do a ranlib if necessary on this machine.
- #
-diff --git a/bsd/gau-unlimit b/bsd/gau-unlimit
-index 3e7b971..df3c044 100755
---- a/bsd/gau-unlimit
-+++ b/bsd/gau-unlimit
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Do unlimits if this machine allows them.
- #
-diff --git a/bsd/get-ref b/bsd/get-ref
-index 023696c..b6a773f 100755
---- a/bsd/get-ref
-+++ b/bsd/get-ref
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ($#argv < 1) then
- set flist = "mdutil cphfutil putil osutil utilam utilnz"
- else
-diff --git a/bsd/getx b/bsd/getx
-index 4a5d8f8..23691eb 100755
---- a/bsd/getx
-+++ b/bsd/getx
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ($#argv < 2) then
- echo "usage: getx <routines> link"
- exit
-diff --git a/bsd/gzt b/bsd/gzt
-index ffa5fa0..95ad348 100755
---- a/bsd/gzt
-+++ b/bsd/gzt
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- #
- # Compress a range of test output files.
- #
-diff --git a/bsd/install b/bsd/install
-index 7b0e589..f5f29af 100755
---- a/bsd/install
-+++ b/bsd/install
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Fix file protections in the g16 directories.
- #
-diff --git a/bsd/l1.make b/bsd/l1.make
-index f041912..585ac3a 100644
---- a/bsd/l1.make
-+++ b/bsd/l1.make
-@@ -1,4 +1,4 @@
--SHELL=/bin/csh
-+SHELL=/usr/bin/env tcsh
- GAU_DIR = $(g16root)/g16
- GAU_DIRL = $(GAU_DIR)
- GAU_DIRA = $(GAU_DIR)
-diff --git a/bsd/l4x b/bsd/l4x
-index a7de578..e58226f 100755
---- a/bsd/l4x
-+++ b/bsd/l4x
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- setenv GAUSS_LFLAGS '-n 3 -mp 2 -nodelist "brahms bruckner"'
- setenv GAUSS_EXEDIR $g98root/g98/linda-exe:$g98root/g98
- setenv LD_LIBRARY_PATH $g98root/g98
-diff --git a/bsd/l9999.make b/bsd/l9999.make
-index 643b580..6b317ee 100644
---- a/bsd/l9999.make
-+++ b/bsd/l9999.make
-@@ -1,4 +1,4 @@
--SHELL=/bin/csh
-+SHELL=/usr/bin/env tcsh
- GAU_DIR = $(g16root)/g16
- GAU_DIRL = $(GAU_DIR)
- GAU_DIRA = $(GAU_DIR)
-diff --git a/bsd/linda-ln b/bsd/linda-ln
-index d6f26a2..eb514e6 100755
---- a/bsd/linda-ln
-+++ b/bsd/linda-ln
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Make soft links to the dummy linda link and to each each real one.
- #
-diff --git a/bsd/linda-lnx b/bsd/linda-lnx
-index 15ab0d0..65824be 100755
---- a/bsd/linda-lnx
-+++ b/bsd/linda-lnx
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Make soft links to the dummy linda link and to each each real one.
- #
-diff --git a/bsd/link.make b/bsd/link.make
-index 540903d..dfbeb4b 100644
---- a/bsd/link.make
-+++ b/bsd/link.make
-@@ -1,4 +1,4 @@
--SHELL=/bin/csh
-+SHELL=/usr/bin/env tcsh
- GAU_DIR = $(g16root)/g16
- GAU_DIRL = $(GAU_DIR)
- GAU_DIRA = $(GAU_DIR)
-diff --git a/bsd/lx-working b/bsd/lx-working
-index 5b9315d..e07e01d 100755
---- a/bsd/lx-working
-+++ b/bsd/lx-working
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- foreach x ($argv)
- ln -s /$workbase/1/frisch/working/$x:r.{com,log} .
- end
-diff --git a/bsd/lxi-working b/bsd/lxi-working
-index 7b08887..1adce2f 100755
---- a/bsd/lxi-working
-+++ b/bsd/lxi-working
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- set m = "`gau-machine`"
- if ($m == "sgi") then
- set ext = ".sgi"
-diff --git a/bsd/make-edir b/bsd/make-edir
-index 7fb8a35..01afb73 100755
---- a/bsd/make-edir
-+++ b/bsd/make-edir
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # usage: make-edir
- #
-diff --git a/bsd/make-ldir b/bsd/make-ldir
-index 944b35e..59acb95 100755
---- a/bsd/make-ldir
-+++ b/bsd/make-ldir
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # usage: make-ldir links
- #
-diff --git a/bsd/make-nutill b/bsd/make-nutill
-index 016cb34..c5b8ac3 100755
---- a/bsd/make-nutill
-+++ b/bsd/make-nutill
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- rm -fr nutill
- mkdir nutill
- cd nutil
-diff --git a/bsd/makeutilcd b/bsd/makeutilcd
-index 6ea4228..9fa264c 100755
---- a/bsd/makeutilcd
-+++ b/bsd/makeutilcd
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- #
- # Should be in cds directory, then
- #
-diff --git a/bsd/mkt b/bsd/mkt
-index 976efa2..bf7eeb2 100755
---- a/bsd/mkt
-+++ b/bsd/mkt
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- if (! (-d $1)) then
- echo "no directory $1"
- exit
-diff --git a/bsd/mkunixcd b/bsd/mkunixcd
-index 6503593..15995ce 100755
---- a/bsd/mkunixcd
-+++ b/bsd/mkunixcd
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- if ($#argv <2) then
- echo "usage: mkisofs target-file source-directories"
- exit
-diff --git a/bsd/movemerged b/bsd/movemerged
-index 45fa619..538b4ed 100755
---- a/bsd/movemerged
-+++ b/bsd/movemerged
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if ($#argv < 2) then
- set dir = "../nutil"
- else
-diff --git a/bsd/rdmat-ext b/bsd/rdmat-ext
-index 59e62d0..713046b 100755
---- a/bsd/rdmat-ext
-+++ b/bsd/rdmat-ext
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- @ savefiles = 0
- @ dumpfiles = 1
- @ narg = 0
-diff --git a/bsd/ren b/bsd/ren
-index 60171eb..2862edb 100755
---- a/bsd/ren
-+++ b/bsd/ren
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Rename a list of files to a new extension.
- #
-diff --git a/bsd/rfhello b/bsd/rfhello
-index fb31adf..9ce5b94 100755
---- a/bsd/rfhello
-+++ b/bsd/rfhello
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- set host = `hostname`
- if ("$1" == "") then
- @ n = 8
-diff --git a/bsd/rs6k.make b/bsd/rs6k.make
-index 09f3e0c..259812b 100644
---- a/bsd/rs6k.make
-+++ b/bsd/rs6k.make
-@@ -1,4 +1,5 @@
--#SHELL=/bin/csh -xf
-+#SHELL=/usr/bin/env tcsh
-+set echo
- #
- # Makefile for Gaussian 16.
- #
-diff --git a/bsd/save-working b/bsd/save-working
-index c0e67d0..db78b18 100755
---- a/bsd/save-working
-+++ b/bsd/save-working
-@@ -1,4 +1,4 @@
--#!/bin/csh -x
-+#!/usr/bin/env tcsh -x
- if (-e save.num) then
- @ n = `cat save.num` + 1
- else
-diff --git a/bsd/set-mflags b/bsd/set-mflags
-index ea3523a..6505c17 100755
---- a/bsd/set-mflags
-+++ b/bsd/set-mflags
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # echo the appropriate flags for make (no arguments) or the make command (1 argument).
- #
-diff --git a/bsd/setcdef b/bsd/setcdef
-index b9142e4..c985e0b 100755
---- a/bsd/setcdef
-+++ b/bsd/setcdef
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # return a string for the GAUSS_CDEF environment variable
- #
-diff --git a/bsd/setup-linda b/bsd/setup-linda
-index de9e996..c8ef8fd 100755
---- a/bsd/setup-linda
-+++ b/bsd/setup-linda
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- cd linda7.1
- common/bin/install_pkg
- cd ..
-diff --git a/bsd/ssrunx b/bsd/ssrunx
-index 34a80ff..b211151 100755
---- a/bsd/ssrunx
-+++ b/bsd/ssrunx
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- set x = "`gau-machine`"
- set n = "`basename $0`"
- set d = "$n:r"
-diff --git a/bsd/ssruny b/bsd/ssruny
-index e96f64f..e82c4c0 100755
---- a/bsd/ssruny
-+++ b/bsd/ssruny
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set x = "`gau-machine`"
- set n = "`basename $0`"
- set d = "$n:r"
-diff --git a/bsd/subg16 b/bsd/subg16
-index fd2fab6..66dbc1b 100755
---- a/bsd/subg16
-+++ b/bsd/subg16
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Submit a Gaussian 16 job to an nqs batch queue.
- #
-@@ -12,7 +12,7 @@
- # Generate script, explicitly requesting the csh.
- #
- cat <<END >$2.job
--#!/bin/csh
-+#!/usr/bin/env tcsh
- cd \$QSUB_WORKDIR
- source $g16root/g16/bsd/gau-unlimit
- g16 <$2.com >&$2.log
-diff --git a/bsd/sumcpu b/bsd/sumcpu
-index 4d8c823..93e015d 100755
---- a/bsd/sumcpu
-+++ b/bsd/sumcpu
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # sum cpu usage
- #
-diff --git a/bsd/tbzip b/bsd/tbzip
-index 78e5bce..8b28598 100755
---- a/bsd/tbzip
-+++ b/bsd/tbzip
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- foreach x ($argv)
- bzip2 -9 -v $x:r.tar
- mv $x:r.tar.bz2 $x:r.tbz
-diff --git a/bsd/test-times b/bsd/test-times
-index be04ce1..6c44242 100755
---- a/bsd/test-times
-+++ b/bsd/test-times
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set h = `grep days $argv | count 7`
- set m = `grep days $argv | count 9`
- set s = `grep days $argv | count 11`
-diff --git a/bsd/testl1 b/bsd/testl1
-index 3901f2f..4ac7a37 100755
---- a/bsd/testl1
-+++ b/bsd/testl1
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Test a new version of link 1. The new version is assumed to be
- # l1/testrt. If arguments are provided, they are used as the route;
-diff --git a/bsd/testunf b/bsd/testunf
-index c3ae429..142c0ca 100755
---- a/bsd/testunf
-+++ b/bsd/testunf
-@@ -1,3 +1,4 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- echo "argv is $argv"
- cp $1 $7
-diff --git a/bsd/tgzip b/bsd/tgzip
-index 90b27c1..e7051d8 100755
---- a/bsd/tgzip
-+++ b/bsd/tgzip
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- foreach x ($argv)
- gzip -9 -v $x:r.tar
- mv $x:r.tar.gz $x:r.tgz
-diff --git a/bsd/tree.make b/bsd/tree.make
-index e22451b..91e76ce 100644
---- a/bsd/tree.make
-+++ b/bsd/tree.make
-@@ -5,7 +5,7 @@
- GAU_DIR = $(g16root)/g16
- GAU_DIRL = $(GAU_DIR)
-
--SHELL = /bin/csh
-+SHELL = /usr/bin/env tcsh
- UTIL_NAME = util.a
- GAU_DIRA = $(GAU_DIR)
-
-diff --git a/bsd/txzip b/bsd/txzip
-index 23a6a1b..a9248ff 100755
---- a/bsd/txzip
-+++ b/bsd/txzip
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- if (("$1" == "j") || ("$1" == "J")) then
- set ext = "tbJ"
- shift
-diff --git a/bsd/tzzip b/bsd/tzzip
-index a86a4b8..9a2f462 100755
---- a/bsd/tzzip
-+++ b/bsd/tzzip
-@@ -1,4 +1,4 @@
--#!/bin/csh
-+#!/usr/bin/env tcsh
- foreach x ($argv)
- xz -9 -v $x:r.tar
- mv $x:r.tar.bz2 $x:r.tbz
-diff --git a/bsd/upd b/bsd/upd
-index d6017b3..00ca77f 100755
---- a/bsd/upd
-+++ b/bsd/upd
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Update a link for which the specified routines have been changed.
- #
-diff --git a/bsd/upd-util b/bsd/upd-util
-index 7d007ea..c16b082 100755
---- a/bsd/upd-util
-+++ b/bsd/upd-util
-@@ -1,4 +1,5 @@
--#!/bin/csh -fx
-+#!/usr/bin/env tcsh
-+set echo
- mkdir temp
- cd temp
- foreach x ($argv)
-diff --git a/bsd/updatelink b/bsd/updatelink
-index 7cc99ee..6399d53 100755
---- a/bsd/updatelink
-+++ b/bsd/updatelink
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Update a link library with the specified source files.
- #
-diff --git a/bsd/updatelink1 b/bsd/updatelink1
-index 906e3aa..962dd59 100755
---- a/bsd/updatelink1
-+++ b/bsd/updatelink1
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- #
- # Update a link library with the specified source files.
- #
-diff --git a/bsd/x86type b/bsd/x86type
-index 9ead8f3..7ef1ebe 100755
---- a/bsd/x86type
-+++ b/bsd/x86type
-@@ -1,4 +1,4 @@
--#!/bin/csh -f
-+#!/usr/bin/env tcsh
- set type = "amd"
- set list = "sse4"
- if (-e /proc/cpuinfo) then
---
-2.26.2
-
diff --git a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-replace-deprecated-pgf77-with-pgfortran.patch b/var/spack/repos/builtin/packages/gaussian-src/16-C.01-replace-deprecated-pgf77-with-pgfortran.patch
deleted file mode 100644
index 49e40693d7..0000000000
--- a/var/spack/repos/builtin/packages/gaussian-src/16-C.01-replace-deprecated-pgf77-with-pgfortran.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 6774eb8f9743977d7b3f52ea877c2c0ed6bc45f5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Tue, 6 Oct 2020 17:47:26 +0200
-Subject: [PATCH 3/5] replace deprecated pgf77 with pgfortran
-
----
- bsd/i386.make | 2 +-
- bsd/l1.make | 2 +-
- bsd/l9999.make | 2 +-
- bsd/link.make | 2 +-
- bsd/setup-make | 18 +++++++++---------
- bsd/tree.make | 4 ++--
- 6 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/bsd/i386.make b/bsd/i386.make
-index c9cf696..759ed84 100644
---- a/bsd/i386.make
-+++ b/bsd/i386.make
-@@ -138,7 +138,7 @@ I8FLAG =
- R8FLAG =
- MMODEL =
- PGISTATIC = -Bstatic_pgi
--PGNAME = pgf77
-+PGNAME = pgfortran
- GPUFLAG = $(GPUFLAG1) $(GPUFLAG2) $(GPUFLAG3)
- RUNF77 = $(PGNAME) $(PGISTATIC) $(I8FLAG) $(R8FLAG) $(MMODEL) $(DEBUGF) $(SPECFLAG) $(GPUFLAG)
- F2CLIB =
-diff --git a/bsd/l1.make b/bsd/l1.make
-index fe9897f..f041912 100644
---- a/bsd/l1.make
-+++ b/bsd/l1.make
-@@ -16,7 +16,7 @@ SUN_FC = f95 -fast -xtypemap=real:64,double:64,integer:64 -xtarget=native -xarch
- ALP_FC = f90 -O5 -transform_loops -omp -automatic -i8 -r8 -align dcommons \
- -tune host -trapuv -assume noaccuracy_sensitive -math_library fast \
- -reentrancy threaded
--LIN_FC = pgf77 -mp -Mnostdlib
-+LIN_FC = pgfortran -mp -Mnostdlib
- PGILIBS = $(PGI)/linux86/lib/libpgthread.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgftnrtl.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgmp.a $(PGI)/linux86/lib/libpgc.a
- LIN_FC2 = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a $(PGILIBS)
- CRY_FC = f90
-diff --git a/bsd/l9999.make b/bsd/l9999.make
-index 2c59b37..643b580 100644
---- a/bsd/l9999.make
-+++ b/bsd/l9999.make
-@@ -16,7 +16,7 @@ SUN_FC = f95 -fast -xtypemap=real:64,double:64,integer:64 -xtarget=native -xarch
- ALP_FC = f90 -O5 -transform_loops -omp -automatic -i8 -r8 -align dcommons \
- -tune host -trapuv -assume noaccuracy_sensitive -math_library fast \
- -reentrancy threaded
--LIN_FC = pgf77 -mp -Mnostdlib
-+LIN_FC = pgfortran -mp -Mnostdlib
- PGILIBS = $(PGI)/linux86/lib/libpgthread.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgftnrtl.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgmp.a $(PGI)/linux86/lib/libpgc.a
- LIN_FC2 = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a $(PGILIBS)
- CRY_FC = f90
-diff --git a/bsd/link.make b/bsd/link.make
-index 40cbd06..540903d 100644
---- a/bsd/link.make
-+++ b/bsd/link.make
-@@ -16,7 +16,7 @@ SUN_FC = f95 -fast -xtypemap=real:64,double:64,integer:64 -xtarget=native -xarch
- ALP_FC = f90 -O5 -transform_loops -omp -automatic -i8 -r8 -align dcommons \
- -tune host -trapuv -assume noaccuracy_sensitive -math_library fast \
- -reentrancy threaded
--LIN_FC = pgf77 -mp -Mnostdlib
-+LIN_FC = pgfortran -mp -Mnostdlib
- PGILIBS = $(PGI)/linux86/lib/libpgthread.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgftnrtl.a $(PGI)/linux86/lib/libpgc.a $(PGI)/linux86/lib/libpgmp.a $(PGI)/linux86/lib/libpgc.a
- LIN_FC2 = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a $(PGILIBS)
- CRY_FC = f90
-diff --git a/bsd/setup-make b/bsd/setup-make
-index 7759da2..1a497dd 100644
---- a/bsd/setup-make
-+++ b/bsd/setup-make
-@@ -34,7 +34,7 @@ else if (-e $xname/kepler.flag) then
- set acclib = "-Mcudalib=cublas"
- set acclib1 = ""
- else
-- set pgname = "pgf77"
-+ set pgname = "pgfortran"
- set accopt = ""
- set accflag = ""
- set acclib = ""
-@@ -88,16 +88,16 @@ else if (("$mach" == "i386") || ("$mach" == "amd64") || ("$mach" == "em64t") ||
- set xutilname = "util"
- if (-e $xname/ia32p3.flag) then
- set xutilname = "$xutilname,bsd/libf77blas-ia32,bsd/libatlas-ia32"
-- set fcname = "FCN='pgf77 -Bstatic_pgi'"
-+ set fcname = "FCN='pgfortran -Bstatic_pgi'"
- set blas = "BLAS='' MACHTY=p6"
- set fcflag = "FC='-mp=nonuma -tp p6'"
-- set lfort = "pgf77 -Bstatic_pgi -tp p6 -mp=nonuma"
-+ set lfort = "pgfortran -Bstatic_pgi -tp p6 -mp=nonuma"
- else if ("$mach" == "i386") then
- set xutilname = "$xutilname,bsd/libf77blas-ia32,bsd/libatlas-ia32"
-- set fcname = "FCN='pgf77 -Bstatic_pgi'"
-+ set fcname = "FCN='pgfortran -Bstatic_pgi'"
- set blas = "BLAS='' "
- set fcflag = "FC='-mp=nonuma -fastsse -tp p7-32'"
-- set lfort = "pgf77 -Bstatic_pgi -fastsse -tp p7-32 -mp=nonuma"
-+ set lfort = "pgfortran -Bstatic_pgi -fastsse -tp p7-32 -mp=nonuma"
- else if ("$mach" == "amd64") then
- set fcname = "FCN='"
- set fcname = "$fcname$pgname -Bstatic_pgi'"
-@@ -142,16 +142,16 @@ else if (("$mach" == "i386") || ("$mach" == "amd64") || ("$mach" == "em64t") ||
- endif
- else if ("$mach" == "i386-mac64") then
- set xutilname = "$xutilname,bsd/libf77blas-imac64,bsd/libatlas-imac64"
-- set fcname = "FCN='pgf77'"
-+ set fcname = "FCN='pgfortran'"
- set fcflag = "FC='-Wl,-u -Wl,_drum_ -mp -tp p7-64 -i8 -r8'"
- set blas = "BLAS='' MACHTY=p7-64 GAULIBU=util.a PGISTATIC= LINK1='-Wl,-u' LINK2='-Wl,_drum_' EXTCFLAGS=-D_FORTIFY_SOURCE=0 I8FLAG=-i8 R8FLAG=-r8 OPTOI=-m64 I8CPP1=-DI64 I8CPP2=-DP64 I8CPP3=-DPACK64 I8CPP4=-DUSE_I2 NJSEC=-DDEFJSEC=512"
-- set lfort = "pgf77 -Wl,-u -Wl,_drum_ -mp -tp p7-64 -i8 -r8"
-+ set lfort = "pgfortran -Wl,-u -Wl,_drum_ -mp -tp p7-64 -i8 -r8"
- else if ("$mach" == "i386-mac32") then
- set xutilname = "$xutilname,bsd/libf77blas-imac32,bsd/libatlas-imac32"
-- set fcname = "FCN='pgf77'"
-+ set fcname = "FCN='pgfortran'"
- set fcflag = "FC='-Wl,-u -Wl,_drum_ -mp -tp p7-32'"
- set blas = "BLAS='' MACHTY=p7-32 GAULIBU=util.a PGISTATIC= LINK1='-Wl,-u' LINK2='-Wl,_drum_' EXTCFLAGS=-D_FORTIFY_SOURCE=0 I8FLAG= R8FLAG=-r8 OPTOI=-m32"
-- set lfort = "pgf77 -Wl,-u -Wl,_drum_ -mp -tp p7-32"
-+ set lfort = "pgfortran -Wl,-u -Wl,_drum_ -mp -tp p7-32"
- setenv LINDA_CC 'cc -m32'
- else
- echo "logic failure in setup-make"
-diff --git a/bsd/tree.make b/bsd/tree.make
-index e504f38..e22451b 100644
---- a/bsd/tree.make
-+++ b/bsd/tree.make
-@@ -17,7 +17,7 @@ SGI_FC = f77 -w -i8 -r8 -r8const -mips4 -64 -mp -r10000 -align64 -trapuv
- SGI_FC2 = -lcomplib.sgimath_mp -lfastm
- SUN_FC = fc
- ALP_FC = f90 -omp -automatic -O -i8 -r8 -align dcommons -threads
--LIN_FC = pgf77 -mp
-+LIN_FC = pgfortran -mp
- LIN_FC2 = -llapack /usr/local/lib/blas-opt.a /usr/local/lib/blas-f2c.a
- CRY_FC = f90
- CRY_FC2 = -Wl"-M /dev/null -D DUPENTRY=NOTE -D FORCE=OFF -f indef"
-@@ -31,7 +31,7 @@ NUTIL = ../nutil/*.o ../nutil/*.qo
- NUTILL = ../nutill/*.lo ../nutill/*.o ../nutill/*.qo
- NUTILX = nutil/*.o nutil/*.qo
- else
--PGNAME = pgf77
-+PGNAME = pgfortran
- NUTIL = ../nutil/*.o
- NUTILL = ../nutill/*.lo ../nutill/*.o
- NUTILX = nutil/*.o
---
-2.26.2
-
diff --git a/var/spack/repos/builtin/packages/gaussian-src/package.py b/var/spack/repos/builtin/packages/gaussian-src/package.py
deleted file mode 100644
index 51d771efad..0000000000
--- a/var/spack/repos/builtin/packages/gaussian-src/package.py
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 2013-2024 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 glob
-import os
-
-import llnl.util.tty as tty
-
-from spack.package import *
-
-
-class GaussianSrc(Package):
- """Gaussian is a computer program for computational chemistry.
-
- This Spack package builds Gaussian from source.
-
- Needs post-install steps to make it run!
- See package installation log for details."""
-
- homepage = "http://www.gaussian.com/"
- manual_download = True
-
- maintainers("dev-zero")
-
- version("16-C.01", sha256="c9eb73a9df5ca8705fcf2d7ce2d5f9aceb05ae663689f54c0a581c9d4d44fffb")
-
- depends_on("tcsh", type="build")
-
- # All compilers except for pgi are in conflict:
- requires("%pgi", msg="Gaussian can only be built with the PGI compiler")
-
- patch("16-C.01-replace-deprecated-pgf77-with-pgfortran.patch", when="@16-C.01")
- patch("16-C.01-fix-building-c-code-with-pgcc.patch", when="@16-C.01")
- patch("16-C.01-fix-shebangs.patch", when="@16-C.01")
-
- @property
- def g_name(self):
- return "g{0}".format(self.version.up_to(1))
-
- @property
- def g_root(self):
- return self.prefix.join(self.g_name)
-
- def url_for_version(self, version):
- return "file://{0}/g{1}.tgz".format(os.getcwd(), version)
-
- def install(self, spec, prefix):
- # Spacks strips the single dir inside the tarball, but Gaussian
- # needs it -> move them back
- files = os.listdir()
- mkdirp(self.g_name)
- for f in files:
- os.rename(f, join_path(self.g_name, f))
-
- opts = ["all"]
- # if spec.satisfies('+cuda'):
- # opts += [spec.variants['cuda_family'].value]
-
- with working_dir(self.g_name):
- # can only build with tcsh
- tcsh = which("tcsh")
- tcsh(
- "-c",
- "source ${0}root/{0}/bsd/{0}.login ;"
- "./bsd/bld{0} {1}".format(self.g_name, " ".join(opts)),
- )
-
- install_tree("./bsd", self.g_root.bsd)
- install_tree("./basis", self.g_root.basis)
- install_tree("./doc", self.g_root.doc)
-
- for exe in glob.glob("*.exe"):
- install(exe, self.g_root)
-
- exes = [
- self.g_name,
- "gauopt",
- "gauoptl",
- "ghelp",
- "newzmat",
- "testrt",
- "cubegen",
- "cubman",
- "c8616",
- "ham506",
- "rwfdump",
- "freqchk",
- "freqmem",
- "formchk",
- "demofc",
- "chkchk",
- "solname",
- "gautraj",
- "copychk",
- "pluck",
- "rdmat",
- "wrmat",
- "unfchk",
- "gdrgen",
- "trajgen",
- "mm",
- "grate",
- ]
- for exe in exes:
- install(exe, self.g_root)
-
- @run_after("install")
- def caveats(self):
- perm_script = "spack_perms_fix.sh"
- perm_script_path = join_path(self.spec.prefix, perm_script)
- with open(perm_script_path, "w") as f:
- env = spack.tengine.make_environment(dirs=self.package_dir)
- t = env.get_template(perm_script + ".j2")
- f.write(t.render({"prefix": self.g_root}))
- chmod = which("chmod")
- chmod("0555", perm_script_path)
-
- tty.warn(
- """
-For a working Gaussian installation, all executable files can only be accessible by
-the owner and the group but not the world.
-
-We've installed a script that will make the necessary changes;
-read through it and then execute it:
-
- {0}
-
-If you have to give others access, please customize the group membership of the package
-files as documented here:
-
- https://spack.readthedocs.io/en/latest/build_settings.html#package-permissions""".format(
- perm_script_path
- )
- )
-
- def setup_build_environment(self, env):
- env.set("{0}root".format(self.g_name), self.stage.source_path)
-
- def setup_run_environment(self, env):
- # defaults taken from G16's g16.profile
- env.set("GAUSS_LFLAGS2", "--LindaOptions -s 10000000")
- env.set("_DSM_BARRIER", "SHM")
- env.set("PGI_TERM", "trace,abort")
-
- env.set("{0}root".format(self.g_name), self.prefix)
-
- env.prepend_path("GAUSS_EXEDIR", self.g_root)
- env.prepend_path("GAUSS_EXEDIR", self.g_root.bsd)
-
- env.prepend_path("PATH", self.g_root)
- env.prepend_path("PATH", self.g_root.bsd)
-
- env.set("GAUSS_LEXEDIR", self.g_root.join("linda-exe"))
- env.set("GAUSS_ARCHDIR", self.g_root.arch)
- env.set("GAUSS_BSDDIR", self.g_root.bsd)
- env.set("G{0}BASIS".format(self.version.up_to(1)), self.g_root.basis)
-
- env.prepend_path("LD_LIBRARY_PATH", self.g_root)
- env.prepend_path("LD_LIBRARY_PATH", self.g_root.bsd)
diff --git a/var/spack/repos/builtin/packages/gaussian-src/spack_perms_fix.sh.j2 b/var/spack/repos/builtin/packages/gaussian-src/spack_perms_fix.sh.j2
deleted file mode 100644
index 889ab7fbc2..0000000000
--- a/var/spack/repos/builtin/packages/gaussian-src/spack_perms_fix.sh.j2
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -eu
-
-chmod o-rwx "{{ prefix }}"/*
diff --git a/var/spack/repos/builtin/packages/gaussian-view/package.py b/var/spack/repos/builtin/packages/gaussian-view/package.py
index b092719a45..f0b241aed8 100644
--- a/var/spack/repos/builtin/packages/gaussian-view/package.py
+++ b/var/spack/repos/builtin/packages/gaussian-view/package.py
@@ -8,6 +8,7 @@ import os
import llnl.util.tty as tty
+import spack.tengine
from spack.package import *
@@ -38,18 +39,7 @@ class GaussianView(Package):
extension="tbz",
)
- variant(
- "gaussian-src",
- default=False,
- description="Use gaussian-src instead of gaussian (prebuilt binary)",
- )
-
depends_on("gaussian@16-B.01", type="run", when="@:6.0")
- # TODO: add the checksum for gaussian@16-C.01 before uncommenting
- # depends_on('gaussian@16-C.01', type='run', when='~gaussian-src@6.1:')
- depends_on("gaussian-src@16-C.01", type="run", when="+gaussian-src@6.1:")
-
- conflicts("+gaussian-src", when="@:6.0")
depends_on("libx11", type=("run", "link"))
depends_on("libxext", type=("run", "link"))
@@ -102,7 +92,7 @@ read through it and then execute it:
If you have to give others access, please customize the group membership of the package
files as documented here:
- https://spack.readthedocs.io/en/latest/build_settings.html#package-permissions""".format(
+ https://spack.readthedocs.io/en/latest/packages_yaml.html#package-permissions""".format(
perm_script_path
)
)
diff --git a/var/spack/repos/builtin/packages/gawk/package.py b/var/spack/repos/builtin/packages/gawk/package.py
index 2c935856d0..8f0ef30ba0 100644
--- a/var/spack/repos/builtin/packages/gawk/package.py
+++ b/var/spack/repos/builtin/packages/gawk/package.py
@@ -30,6 +30,8 @@ class Gawk(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("5.3.1", sha256="694db764812a6236423d4ff40ceb7b6c4c441301b72ad502bb5c27e00cd56f78")
+ version("5.3.0", sha256="ca9c16d3d11d0ff8c69d79dc0b47267e1329a69b39b799895604ed447d3ca90b")
version("5.2.2", sha256="3c1fce1446b4cbee1cd273bd7ec64bc87d89f61537471cd3e05e33a965a250e9")
version("5.2.1", sha256="673553b91f9e18cc5792ed51075df8d510c9040f550a6f74e09c9add243a7e4f")
version("5.1.1", sha256="d87629386e894bbea11a5e00515fc909dc9b7249529dad9e6a3a2c77085f7ea2")
@@ -37,6 +39,8 @@ class Gawk(AutotoolsPackage, GNUMirrorPackage):
version("5.0.1", sha256="8e4e86f04ed789648b66f757329743a0d6dfb5294c3b91b756a474f1ce05a794")
version("4.1.4", sha256="53e184e2d0f90def9207860531802456322be091c7b48f23fdc79cda65adc266")
+ depends_on("c", type="build") # generated
+
variant("nls", default=False, description="Enable Native Language Support")
depends_on("gettext", when="+nls")
diff --git a/var/spack/repos/builtin/packages/gbl/package.py b/var/spack/repos/builtin/packages/gbl/package.py
index 89388076ba..a77623f279 100644
--- a/var/spack/repos/builtin/packages/gbl/package.py
+++ b/var/spack/repos/builtin/packages/gbl/package.py
@@ -17,6 +17,9 @@ class Gbl(CMakePackage):
version("V02-04-01", commit="1061b643c6656fbf7ceba579997eb43f0a9e9d3c")
version("V02-01-03", commit="8acaade19c20e9ef23d1244a555fead6ef149c33")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("root", default=True, description="Support ROOT for user I/O")
depends_on("eigen", type=("build", "link"))
depends_on("root", type=("build", "link"), when="+root")
diff --git a/var/spack/repos/builtin/packages/gcc-runtime/package.py b/var/spack/repos/builtin/packages/gcc-runtime/package.py
index 085042b8ce..551aaa57cb 100644
--- a/var/spack/repos/builtin/packages/gcc-runtime/package.py
+++ b/var/spack/repos/builtin/packages/gcc-runtime/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import glob
import os
import re
@@ -11,7 +12,7 @@ from macholib import MachO, mach_o
from llnl.util import tty
from spack.package import *
-from spack.util.elf import parse_elf
+from spack.util.elf import delete_needed_from_elf, parse_elf
class GccRuntime(Package):
@@ -22,6 +23,9 @@ class GccRuntime(Package):
tags = ["runtime"]
+ # gcc-runtime versions are declared dynamically
+ skip_version_audit = ["platform=linux", "platform=darwin", "platform=windows"]
+
maintainers("haampie")
license("GPL-3.0-or-later WITH GCC-exception-3.1")
@@ -44,9 +48,17 @@ class GccRuntime(Package):
"ubsan",
]
+ # libgfortran ABI
+ provides("fortran-rt", "libgfortran")
+ provides("libgfortran@3", when="%gcc@:6")
+ provides("libgfortran@4", when="%gcc@7")
+ provides("libgfortran@5", when="%gcc@8:")
+
+ depends_on("libc", type="link", when="platform=linux")
+
def install(self, spec, prefix):
- if spec.platform in ["linux", "cray", "freebsd"]:
- libraries = self._get_libraries_elf()
+ if spec.platform in ["linux", "freebsd"]:
+ libraries = get_elf_libraries(compiler=self.compiler, libraries=self.LIBRARIES)
elif spec.platform == "darwin":
libraries = self._get_libraries_macho()
else:
@@ -61,46 +73,8 @@ class GccRuntime(Package):
for path, name in libraries:
install(path, os.path.join(prefix.lib, name))
- def _get_libraries_elf(self):
- """Get the GCC runtime libraries for ELF binaries"""
- cc = Executable(self.compiler.cc)
- lib_regex = re.compile(rb"\blib[a-z-_]+\.so\.\d+\b")
- path_and_install_name = []
-
- for name in self.LIBRARIES:
- # Look for the dynamic library that gcc would use to link,
- # that is with .so extension and without abi suffix.
- path = cc(f"-print-file-name=lib{name}.so", output=str).strip()
-
- # gcc reports an absolute path on success
- if not os.path.isabs(path):
- continue
-
- # Now there are two options:
- # 1. the file is an ELF file
- # 2. the file is a linker script referencing the actual library
- with open(path, "rb") as f:
- try:
- # Try to parse as an ELF file
- soname = parse_elf(f, dynamic_section=True).dt_soname_str.decode("utf-8")
- except Exception:
- # On failure try to "parse" as ld script; the actual
- # library needs to be mentioned by filename.
- f.seek(0)
- script_matches = lib_regex.findall(f.read())
- if len(script_matches) != 1:
- continue
- soname = script_matches[0].decode("utf-8")
-
- # Now locate and install the runtime library
- runtime_path = cc(f"-print-file-name={soname}", output=str).strip()
-
- if not os.path.isabs(runtime_path):
- continue
-
- path_and_install_name.append((runtime_path, soname))
-
- return path_and_install_name
+ if spec.platform in ("linux", "freebsd"):
+ _drop_libgfortran_zlib(prefix.lib)
def _get_libraries_macho(self):
"""Same as _get_libraries_elf but for Mach-O binaries"""
@@ -152,3 +126,61 @@ class GccRuntime(Package):
@property
def headers(self):
return HeaderList([])
+
+
+def _drop_libgfortran_zlib(lib_dir: str) -> None:
+ """Due to a bug in GCC's autotools setup (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87182),
+ libz sometimes appears as a redundant system dependency of libgfortran. Delete it."""
+ libraries = glob.glob(os.path.join(lib_dir, "libgfortran*.so*"))
+ if len(libraries) == 0:
+ return
+ with open(libraries[0], "rb+") as f:
+ elf = parse_elf(f, dynamic_section=True)
+ if not elf.has_needed:
+ return
+ libz = next((x for x in elf.dt_needed_strs if x.startswith(b"libz.so")), None)
+ if libz is None:
+ return
+ delete_needed_from_elf(f, elf, libz)
+
+
+def get_elf_libraries(compiler, libraries):
+ """Get the GCC runtime libraries for ELF binaries"""
+ cc = Executable(compiler.cc)
+ lib_regex = re.compile(rb"\blib[a-z-_]+\.so\.\d+\b")
+ path_and_install_name = []
+
+ for name in libraries:
+ # Look for the dynamic library that gcc would use to link,
+ # that is with .so extension and without abi suffix.
+ path = cc(f"-print-file-name=lib{name}.so", output=str).strip()
+
+ # gcc reports an absolute path on success
+ if not os.path.isabs(path):
+ continue
+
+ # Now there are two options:
+ # 1. the file is an ELF file
+ # 2. the file is a linker script referencing the actual library
+ with open(path, "rb") as f:
+ try:
+ # Try to parse as an ELF file
+ soname = parse_elf(f, dynamic_section=True).dt_soname_str.decode("utf-8")
+ except Exception:
+ # On failure try to "parse" as ld script; the actual
+ # library needs to be mentioned by filename.
+ f.seek(0)
+ script_matches = lib_regex.findall(f.read())
+ if len(script_matches) != 1:
+ continue
+ soname = script_matches[0].decode("utf-8")
+
+ # Now locate and install the runtime library
+ runtime_path = cc(f"-print-file-name={soname}", output=str).strip()
+
+ if not os.path.isabs(runtime_path):
+ continue
+
+ path_and_install_name.append((runtime_path, soname))
+
+ return path_and_install_name
diff --git a/var/spack/repos/builtin/packages/gcc/detection_test.yaml b/var/spack/repos/builtin/packages/gcc/detection_test.yaml
index 0930f82d93..67b5bc1e12 100644
--- a/var/spack/repos/builtin/packages/gcc/detection_test.yaml
+++ b/var/spack/repos/builtin/packages/gcc/detection_test.yaml
@@ -1,38 +1,121 @@
paths:
- # Ubuntu 18.04, system compilers without Fortran
- - layout:
- - executables:
- - "bin/gcc"
- - "bin/g++"
- script: "echo 7.5.0"
- results:
- - spec: "gcc@7.5.0 languages=c,c++"
- # Mock a version < 7 of GCC that requires -dumpversion and
- # errors with -dumpfullversion
- - layout:
- - executables:
- - "bin/gcc-5"
- - "bin/g++-5"
- - "bin/gfortran-5"
- script: |
- if [[ "$1" == "-dumpversion" ]] ; then
- echo "5.5.0"
- else
- echo "gcc-5: fatal error: no input files"
- echo "compilation terminated."
- exit 1
- fi
- results:
- - spec: "gcc@5.5.0 languages=c,c++,fortran"
- # Multiple compilers present at the same time
- - layout:
- - executables:
- - "bin/x86_64-linux-gnu-gcc-6"
- script: 'echo 6.5.0'
- - executables:
- - "bin/x86_64-linux-gnu-gcc-10"
- - "bin/x86_64-linux-gnu-g++-10"
- script: "echo 10.1.0"
- results:
- - spec: "gcc@6.5.0 languages=c"
- - spec: "gcc@10.1.0 languages=c,c++"
+# Ubuntu 20.04, system compilers without Fortran. This
+# test also covers which flags are expected to be used
+# during the detection of gcc.
+- layout:
+ - executables:
+ - "bin/gcc"
+ - "bin/g++"
+ script: |
+ if [ "$1" = "-dumpversion" ] ; then
+ echo "9"
+ elif [ "$1" = "-dumpfullversion" ] ; then
+ echo "9.4.0"
+ elif [ "$1" = "--version" ] ; then
+ echo "gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
+ echo "Copyright (C) 2019 Free Software Foundation, Inc."
+ echo "This is free software; see the source for copying conditions. There is NO"
+ echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ else
+ echo "mock executable got an unexpected flag: $1"
+ exit 1
+ fi
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: "gcc@9.4.0 languages=c,c++"
+ extra_attributes:
+ compilers:
+ c: ".*/bin/gcc"
+ cxx: ".*/bin/g\\+\\+"
+
+# Mock a version < 7 of GCC that requires -dumpversion and
+# errors with -dumpfullversion
+- layout:
+ - executables:
+ - "bin/gcc-5"
+ - "bin/g++-5"
+ - "bin/gfortran-5"
+ script: |
+ if [ "$1" = "-dumpversion" ] ; then
+ echo "5.5.0"
+ else
+ echo "gcc-5: fatal error: no input files"
+ echo "compilation terminated."
+ exit 1
+ fi
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: "gcc@5.5.0 languages=c,c++,fortran"
+ extra_attributes:
+ compilers:
+ c: ".*/bin/gcc-5$"
+ cxx: ".*/bin/g[+][+]-5$"
+ fortran: ".*/bin/gfortran-5$"
+
+# Apple clang under disguise as gcc should not be detected
+- layout:
+ - executables:
+ - "bin/gcc"
+ script: |
+ if [ "$1" = "-dumpversion" ] ; then
+ echo "15.0.0"
+ elif [ "$1" = "-dumpfullversion" ] ; then
+ echo "clang: error: no input files" >&2
+ exit 1
+ elif [ "$1" = "--version" ] ; then
+ echo "Apple clang version 15.0.0 (clang-1500.3.9.4)"
+ echo "Target: x86_64-apple-darwin23.4.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ else
+ echo "mock executable got an unexpected flag: $1"
+ exit 1
+ fi
+ platforms: ["darwin"]
+ results: []
+
+# Mingw cross compiler on linux should not be detected
+- layout:
+ - executables:
+ - "bin/i686-w64-mingw32-gcc"
+ script: |
+ if [ "$1" = "-dumpversion" ] ; then
+ echo "9.3-win32"
+ elif [ "$1" = "-dumpfullversion" ] ; then
+ echo "9.3-win32"
+ elif [ "$1" = "--version" ] ; then
+ echo "i686-w64-mingw32-gcc (GCC) 9.3-win32 20200320"
+ echo "Copyright (C) 2019 Free Software Foundation, Inc."
+ echo "This is free software; see the source for copying conditions. There is NO"
+ echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ else
+ echo "mock executable got an unexpected flag: $1"
+ exit 1
+ fi
+ platforms: [linux]
+ results: []
+
+# Homebrew GCC should be detected
+- layout:
+ - executables:
+ - "bin/gcc-14"
+ script: |
+ if [ "$1" = "-dumpversion" ] ; then
+ echo "14"
+ elif [ "$1" = "-dumpfullversion" ] ; then
+ echo "14.1.0"
+ elif [ "$1" = "--version" ] ; then
+ echo "gcc-14 (Homebrew GCC 14.1.0_2) 14.1.0"
+ echo "Copyright (C) 2024 Free Software Foundation, Inc."
+ echo "This is free software; see the source for copying conditions. There is NO"
+ echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ else
+ echo "mock executable got an unexpected flag: $1"
+ exit 1
+ fi
+ platforms: [darwin]
+ results:
+ - spec: "gcc@14.1.0 languages=c"
+ extra_attributes:
+ compilers:
+ c: ".*/bin/gcc-14$"
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index f74e67efe5..8972fc46ce 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -3,24 +3,22 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
-import itertools
import os
-import re
import sys
-from archspec.cpu import UnsupportedMicroarchitecture
+import archspec.cpu
import llnl.util.tty as tty
-from llnl.util.lang import classproperty
+from llnl.util.symlink import readlink
+import spack.compiler
import spack.platforms
-import spack.util.executable
-from spack.build_environment import dso_suffix
+import spack.util.libc
from spack.operating_systems.mac_os import macos_sdk_path, macos_version
from spack.package import *
-class Gcc(AutotoolsPackage, GNUMirrorPackage):
+class Gcc(AutotoolsPackage, GNUMirrorPackage, CompilerPackage):
"""The GNU Compiler Collection includes front ends for C, C++, Objective-C,
Fortran, Ada, and Go, as well as libraries for these languages."""
@@ -35,15 +33,25 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
license("GPL-2.0-or-later AND LGPL-2.1-or-later")
+ provides("c")
+ provides("cxx")
+ provides("fortran")
+
version("master", branch="master")
+ version("14.2.0", sha256="a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9")
+ version("14.1.0", sha256="e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840")
+
+ version("13.3.0", sha256="0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083")
version("13.2.0", sha256="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da")
version("13.1.0", sha256="61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86")
+ version("12.4.0", sha256="704f652604ccbccb14bdabf3478c9511c89788b12cb3bbffded37341916a9175")
version("12.3.0", sha256="949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b")
version("12.2.0", sha256="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff")
version("12.1.0", sha256="62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b")
+ version("11.5.0", sha256="a6e21868ead545cf87f0c01f84276e4b5281d672098591c1c896241f09363478")
version("11.4.0", sha256="3f2db222b007e8a4a23cd5ba56726ef08e8b1f1eb2055ee72c1402cea73a8dd9")
version("11.3.0", sha256="b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39")
version("11.2.0", sha256="d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b")
@@ -95,6 +103,9 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
version("4.6.4", sha256="35af16afa0b67af9b8eb15cafb76d2bc5f568540552522f5dc2c88dd45d977e8")
version("4.5.4", sha256="eef3f0456db8c3d992cbb51d5d32558190bc14f3bc19383dd93acc27acc6befc")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# We specifically do not add 'all' variant here because:
# (i) Ada, D, Go, Jit, and Objective-C++ are not default languages.
# In that respect, the name 'all' is rather misleading.
@@ -128,6 +139,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
description="Compilers and runtime libraries to build",
)
variant("binutils", default=False, description="Build via binutils")
+ variant("mold", default=False, description="Use mold as the linker by default", when="@12:")
variant(
"piclibs", default=False, description="Build PIC versions of libgfortran.a and libstdc++.a"
)
@@ -192,6 +204,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
depends_on(
"binutils+gas+ld+plugins~libiberty", when="+binutils", type=("build", "link", "run")
)
+ depends_on("mold", when="+mold")
depends_on("zip", type="build", when="languages=java")
# The server is sometimes a bit slow to respond
@@ -309,14 +322,10 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
destination="newlibsource",
fetch_options=timeout,
)
- # nvptx-tools does not seem to work as a dependency,
- # but does fine when the source is inside the gcc build directory
- # nvptx-tools doesn't have any releases, so grabbing the last commit
- resource(
- name="nvptx-tools",
- git="https://github.com/MentorEmbedded/nvptx-tools",
- commit="d0524fbdc86dfca068db5a21cc78ac255b335be5",
- )
+
+ nvptx_tools_ver = "2023-09-13"
+ depends_on("nvptx-tools@" + nvptx_tools_ver, type="build")
+
# NVPTX offloading supported in 7 and later by limited languages
conflicts("@:6", msg="NVPTX only supported in gcc 7 and above")
conflicts("languages=ada")
@@ -397,34 +406,71 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
when="@11.2.0",
)
- # Apple M1 support, created from branch of Darwin maintainer for GCC:
- # https://github.com/iains/gcc-11-branch
+ # aarch64-darwin support from Iain Sandoe's branch
patch(
- "https://raw.githubusercontent.com/Homebrew/formula-patches/22dec3fc/gcc/gcc-11.3.0-arm.diff",
- sha256="e02006b7ec917cc1390645d95735a6a866caed0dfe506d5bef742f7862cab218",
- when="@11.3.0 target=aarch64:",
+ "https://github.com/iains/gcc-14-branch/compare/04696df09633baf97cdbbdd6e9929b9d472161d3..gcc-14.2-darwin-r2.patch?full_index=1",
+ sha256="01ea668489f3f0fb2439060f6c333c4c17ef4c19c4c4e6e6aa4b8ea493e97685",
+ when="@14.2.0 target=aarch64:",
)
- # https://github.com/iains/gcc-12-branch
patch(
- "https://raw.githubusercontent.com/Homebrew/formula-patches/76677f2b/gcc/gcc-12.1.0-arm.diff",
- sha256="a000f1d9cb1dd98c7c4ef00df31435cd5d712d2f9d037ddc044f8bf82a16cf35",
- when="@12.1.0 target=aarch64:",
+ "https://github.com/iains/gcc-14-branch/compare/cd0059a1976303638cea95f216de129334fc04d1..gcc-14.1-darwin-r1.patch?full_index=1",
+ sha256="159cc2a1077ad5d9a3cca87880cd977b8202d8fb464a6ec7b53804475d21a682",
+ when="@14.1.0 target=aarch64:",
)
+
patch(
- "https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff",
- sha256="a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d",
- when="@12.2.0 target=aarch64:",
+ "https://github.com/iains/gcc-13-branch/compare/b71f1de6e9cf7181a288c0f39f9b1ef6580cf5c8..gcc-13.3-darwin-r1.patch?full_index=1",
+ sha256="d957520afc286ac46aa3c4bf9b64618d02ca0bf1466f32321b5d6beec6a396eb",
+ when="@13.3.0 target=aarch64:",
+ )
+ patch(
+ "https://github.com/iains/gcc-13-branch/compare/c891d8dc23e1a46ad9f3e757d09e57b500d40044..gcc-13.2-darwin-r0.patch?full_index=1",
+ sha256="6a49d1074d7dd2e3b76e61613a0f143c668ed648fb8d9d48ed76a6b127815c88",
+ when="@13.2.0 target=aarch64:",
)
patch(
- "https://raw.githubusercontent.com/Homebrew/formula-patches/5c206c47/gcc/gcc-13.1.0.diff",
- sha256="cb4e8a89387f748a744da0273025d0dc2e3c76780cc390b18ada704676afea11",
+ "https://github.com/iains/gcc-13-branch/compare/cc035c5d8672f87dc8c2756d9f8367903aa72d93..gcc-13.1-darwin-r0.patch?full_index=1",
+ sha256="36d2c04d487edb6792b48dedae6936f8b864b6f969bd3fd03763e072d471c022",
when="@13.1.0 target=aarch64:",
)
+
patch(
- "https://raw.githubusercontent.com/Homebrew/formula-patches/3c5cbc8e9cf444a1967786af48e430588e1eb481/gcc/gcc-13.2.0.diff",
- sha256="2df7ef067871a30b2531a2013b3db661ec9e61037341977bfc451e30bf2c1035",
- when="@13.2.0 target=aarch64:",
+ "https://github.com/iains/gcc-12-branch/compare/2bada4bc59bed4be34fab463bdb3c3ebfd2b41bb..gcc-12.4-darwin-r0.patch?full_index=1",
+ sha256="e242adf240a62ed3005da75a9e304bda980b84ce497f124b4bddc819ee821e2a",
+ when="@12.4.0 target=aarch64:",
+ )
+ patch(
+ "https://github.com/iains/gcc-12-branch/compare/8fc1a49c9312b05d925b7d21f1d2145d70818151..gcc-12.3-darwin-r0.patch?full_index=1",
+ sha256="1ebac2010eb9ced33cf46a8d8378193671ed6830f262219aa3428de5bc9fd668",
+ when="@12.3.0 target=aarch64:",
+ )
+ patch(
+ "https://github.com/iains/gcc-12-branch/compare/2ee5e4300186a92ad73f1a1a64cb918dc76c8d67..gcc-12.2-darwin-r0.patch?full_index=1",
+ sha256="16d5203ddb97cd43d6c1e9c34e0f681154aed1d127f2324b2a50006b92960cfd",
+ when="@12.2.0 target=aarch64:",
)
+ patch(
+ "https://github.com/iains/gcc-12-branch/compare/1ea978e3066ac565a1ec28a96a4d61eaf38e2726..gcc-12.1-darwin-r1.patch?full_index=1",
+ sha256="b0a811e33c3451ebd1882eac4e2b4b32ce0b60cfa0b8ccf8c5fda7b24327c820",
+ when="@12.1.0 target=aarch64:",
+ )
+
+ patch(
+ "https://github.com/iains/gcc-11-branch/compare/5cc4c42a0d4de08715c2eef8715ad5b2e92a23b6..gcc-11.5-darwin-r0.patch?full_index=1",
+ sha256="6c92190a9acabd6be13bd42ca675f59f44be050a7121214abeaea99d898db30c",
+ when="@11.5.0 target=aarch64:",
+ )
+ patch(
+ "https://github.com/iains/gcc-11-branch/compare/ff4bf326d03e750a8d4905ea49425fe7d15a04b8..gcc-11.4-darwin-r0.patch?full_index=1",
+ sha256="05810e5cdb052c06490f7d987c66a13d47ae7bd2eb285a3a881ad4aa6dd0d13f",
+ when="@11.4.0 target=aarch64:",
+ )
+ patch(
+ "https://github.com/iains/gcc-11-branch/compare/2d280e7eafc086e9df85f50ed1a6526d6a3a204d..gcc-11.3-darwin-r2.patch?full_index=1",
+ sha256="a8097c232dfb21b0e02f3d99e3c3e47443db3982dafbb584938ac1a9a4afd33d",
+ when="@11.3.0 target=aarch64:",
+ )
+
conflicts("+bootstrap", when="@11.3.0,13.1: target=aarch64:")
# Use -headerpad_max_install_names in the build,
@@ -490,94 +536,65 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
when="@9.5.0:10.4.0,11.1.0:11.2.0",
)
- build_directory = "spack-build"
-
- @classproperty
- def executables(cls):
- names = [r"gcc", r"[^\w]?g\+\+", r"gfortran", r"gdc", r"gccgo"]
- suffixes = [r"", r"-mp-\d+\.\d", r"-\d+\.\d", r"-\d+", r"\d\d"]
- return [r"".join(x) for x in itertools.product(names, suffixes)]
+ # patch ICE on aarch64 in tree-vect-slp, cf: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111478
+ # patch taken from releases/gcc-12 branch
+ patch(
+ "https://github.com/gcc-mirror/gcc/commit/9d033155254ac6df5f47ab32896dbf336f991589.patch?full_index=1",
+ sha256="8b76fe575ef095b48ac45e8b56544c331663f840ce4b63abdb61510bf3647597",
+ when="@12.3.0 target=aarch64:",
+ )
+ # patch taken from releases/gcc-13 branch
+ patch(
+ "https://github.com/gcc-mirror/gcc/commit/7c67939ec384425a3d7383dfb4fb39aa7e9ad20a.patch?full_index=1",
+ sha256="f0826d7a9c9808af40f3434918f24ad942f1c6a6daec73f11cf52c544cf5fc01",
+ when="@13.2.0 target=aarch64:",
+ )
- @classmethod
- def filter_detected_exes(cls, prefix, exes_in_prefix):
- result = []
- for exe in exes_in_prefix:
- # On systems like Ubuntu we might get multiple executables
- # with the string "gcc" in them. See:
- # https://helpmanual.io/packages/apt/gcc/
- basename = os.path.basename(exe)
- substring_to_be_filtered = [
- "c99-gcc",
- "c89-gcc",
- "-nm",
- "-ar",
- "ranlib",
- "clang", # clang++ matches g++ -> clan[g++]
- ]
- if any(x in basename for x in substring_to_be_filtered):
- continue
- # Filter out links in favor of real executables on
- # all systems but Cray
- host_platform = str(spack.platforms.host())
- if os.path.islink(exe) and host_platform != "cray":
- continue
+ build_directory = "spack-build"
- result.append(exe)
+ compiler_languages = ["c", "cxx", "fortran", "d", "go"]
- return result
+ @property
+ def supported_languages(self):
+ # This weirdness is because it could be called on an abstract spec
+ if "languages" not in self.spec.variants:
+ return self.compiler_languages
+ return [x for x in self.compiler_languages if x in self.spec.variants["languages"].value]
+
+ c_names = ["gcc"]
+ cxx_names = ["g++"]
+ fortran_names = ["gfortran"]
+ d_names = ["gdc"]
+ go_names = ["gccgo"]
+ compiler_suffixes = [r"-mp-\d+(?:\.\d+)?", r"-\d+(?:\.\d+)?", r"\d\d"]
+ compiler_version_regex = r"([0-9.]+)"
+ compiler_version_argument = ("-dumpfullversion", "-dumpversion")
@classmethod
- def determine_version(cls, exe):
- try:
- output = spack.compiler.get_compiler_version_output(exe, "--version")
- except Exception:
- output = ""
+ def filter_detected_exes(cls, prefix, exes_in_prefix):
# Apple's gcc is actually apple clang, so skip it.
- # Users can add it manually to compilers.yaml at their own risk.
- if "Apple" in output:
- return None
-
- version_regex = re.compile(r"([\d\.]+)")
- for vargs in ("-dumpfullversion", "-dumpversion"):
- try:
- output = spack.compiler.get_compiler_version_output(exe, vargs)
- match = version_regex.search(output)
- if match:
- return match.group(1)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(e)
+ if str(spack.platforms.host()) == "darwin":
+ not_apple_clang = []
+ for exe in exes_in_prefix:
+ try:
+ output = spack.compiler.get_compiler_version_output(exe, "--version")
+ except Exception:
+ output = ""
+ if "clang version" in output:
+ continue
+ not_apple_clang.append(exe)
+ return not_apple_clang
- return None
+ return exes_in_prefix
@classmethod
def determine_variants(cls, exes, version_str):
- languages, compilers = set(), {}
- # There are often at least two copies (not symlinks) of each compiler executable in the
- # same directory: one with a canonical name, e.g. "gfortran", and another one with the
- # target prefix, e.g. "x86_64-pc-linux-gnu-gfortran". There also might be a copy of "gcc"
- # with the version suffix, e.g. "x86_64-pc-linux-gnu-gcc-6.3.0". To ensure the consistency
- # of values in the "compilers" dictionary (i.e. we prefer all of them to reference copies
- # with canonical names if possible), we iterate over the executables in the reversed sorted
- # order:
- for exe in sorted(exes, reverse=True):
- basename = os.path.basename(exe)
- if "g++" in basename:
- languages.add("c++")
- compilers["cxx"] = exe
- elif "gfortran" in basename:
- languages.add("fortran")
- compilers["fortran"] = exe
- elif "gcc" in basename:
- languages.add("c")
- compilers["c"] = exe
- elif "gccgo" in basename:
- languages.add("go")
- compilers["go"] = exe
- elif "gdc" in basename:
- languages.add("d")
- compilers["d"] = exe
+ compilers = cls.determine_compiler_paths(exes=exes)
+
+ languages = set()
+ translation = {"cxx": "c++"}
+ for lang, compiler in compilers.items():
+ languages.add(translation.get(lang, lang))
variant_str = "languages={0}".format(",".join(languages))
return variant_str, {"compilers": compilers}
@@ -607,7 +624,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("c", None)
result = None
- if "languages=c" in self.spec:
+ if self.spec.satisfies("languages=c"):
result = str(self.spec.prefix.bin.gcc)
return result
@@ -618,7 +635,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("cxx", None)
result = None
- if "languages=c++" in self.spec:
+ if self.spec.satisfies("languages=c++"):
result = os.path.join(self.spec.prefix.bin, "g++")
return result
@@ -629,7 +646,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("fortran", None)
result = None
- if "languages=fortran" in self.spec:
+ if self.spec.satisfies("languages=fortran"):
result = str(self.spec.prefix.bin.gfortran)
return result
@@ -693,11 +710,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
"""Get the right (but pessimistic) architecture specific flags supported by
both host gcc and to-be-built gcc. For example: gcc@7 %gcc@12 target=znver3
should pick -march=znver1, since that's what gcc@7 supports."""
- archs = [spec.target] + spec.target.ancestors
- for arch in archs:
+ microarchitectures = [spec.target] + spec.target.ancestors
+ for uarch in microarchitectures:
try:
- return arch.optimization_flags("gcc", spec.version)
- except UnsupportedMicroarchitecture:
+ return uarch.optimization_flags("gcc", str(spec.version))
+ except archspec.cpu.UnsupportedMicroarchitecture:
pass
# no arch specific flags in common, unlikely to happen.
return ""
@@ -725,7 +742,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
if "+bootstrap %gcc" in self.spec and self.spec.target.family != "aarch64":
flags += " " + self.get_common_target_flags(self.spec)
- if "+bootstrap" in self.spec:
+ if self.spec.satisfies("+bootstrap"):
variables = ["BOOT_CFLAGS", "CFLAGS_FOR_TARGET", "CXXFLAGS_FOR_TARGET"]
else:
variables = ["CFLAGS", "CXXFLAGS"]
@@ -766,12 +783,12 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
if self.version >= Version("6"):
options.append("--with-system-zlib")
- if "zstd" in spec:
+ if spec.satisfies("^zstd"):
options.append("--with-zstd-include={0}".format(spec["zstd"].headers.directories[0]))
options.append("--with-zstd-lib={0}".format(spec["zstd"].libs.directories[0]))
# Enabling language "jit" requires --enable-host-shared.
- if "languages=jit" in spec:
+ if spec.satisfies("languages=jit"):
options.append("--enable-host-shared")
# Binutils
@@ -846,7 +863,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
options.append("--with-boot-ldflags=" + boot_ldflags)
options.append("--with-build-config=spack")
- if "languages=d" in spec:
+ if spec.satisfies("languages=d"):
# Phobos is the standard library for the D Programming Language. The documentation says
# that on some targets, 'libphobos' is not enabled by default, but compiles and works
# if '--enable-libphobos' is used. Specifics are documented for affected targets.
@@ -860,6 +877,28 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
return options
+ # Copy nvptx-tools into the GCC install prefix
+ def copy_nvptx_tools(self):
+ nvptx_tools_bin_path = self.spec["nvptx-tools"].prefix.bin
+ gcc_bin_path = self.prefix.bin
+ mkdirp(gcc_bin_path)
+ copy_list = ["as", "ld", "nm", "run", "run-single"]
+ for file in copy_list:
+ fullname = f"nvptx-none-{file}"
+ copy(join_path(nvptx_tools_bin_path, fullname), join_path(gcc_bin_path, fullname))
+ link_list = ["ar", "ranlib"]
+ for file in link_list:
+ fullname = f"nvptx-none-{file}"
+ orig_target = readlink(join_path(nvptx_tools_bin_path, fullname))
+ symlink(orig_target, join_path(gcc_bin_path, fullname))
+ util_dir_path = join_path(self.prefix, "nvptx-none", "bin")
+ mkdirp(util_dir_path)
+ util_list = ["ar", "as", "ld", "nm", "ranlib"]
+ for file in util_list:
+ rel_target = join_path("..", "..", "bin", f"nvptx-none-{file}")
+ dest_link = join_path(util_dir_path, file)
+ symlink(rel_target, dest_link)
+
# run configure/make/make(install) for the nvptx-none target
# before running the host compiler phases
@run_before("configure")
@@ -882,11 +921,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
"--with-cuda-driver-lib={0}".format(spec["cuda"].libs.directories[0]),
]
- with working_dir("nvptx-tools"):
- configure = Executable("./configure")
- configure(*options)
- make()
- make("install")
+ self.copy_nvptx_tools()
pattern = join_path(self.stage.source_path, "newlibsource", "*")
files = glob.glob(pattern)
@@ -915,118 +950,75 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
@property
def build_targets(self):
- if "+profiled" in self.spec:
+ if self.spec.satisfies("+profiled"):
return ["profiledbootstrap"]
return []
@property
def install_targets(self):
- if "+strip" in self.spec:
+ if self.spec.satisfies("+strip"):
return ["install-strip"]
return ["install"]
@property
def spec_dir(self):
# e.g. lib/gcc/x86_64-unknown-linux-gnu/4.9.2
- spec_dir = glob.glob("{0}/gcc/*/*".format(self.prefix.lib))
+ spec_dir = glob.glob(f"{self.prefix.lib}/gcc/*/*")
return spec_dir[0] if spec_dir else None
@run_after("install")
- def write_rpath_specs(self):
- """Generate a spec file so the linker adds a rpath to the libs
- the compiler used to build the executable.
-
- .. caution::
-
- The custom spec file by default with *always* pass ``-Wl,-rpath
- ...`` to the linker, which will cause the linker to *ignore* the
- value of ``LD_RUN_PATH``, which otherwise would be saved to the
- binary as the default rpath. See the mitigation below for how to
- temporarily disable this behavior.
-
- Structure the specs file so that users can define a custom spec file
- to suppress the spack-linked rpaths to facilitate rpath adjustment
- for relocatable binaries. The custom spec file
- :file:`{norpath}.spec` will have a single
- line followed by two blanks lines::
-
- *link_libgcc_rpath:
-
-
-
- It can be passed to the GCC linker using the argument
- ``--specs=norpath.spec`` to disable the automatic rpath and restore
- the behavior of ``LD_RUN_PATH``."""
+ def write_specs_file(self):
+ """(1) inject an rpath to its runtime library dir, (2) add a default programs search path
+ to <binutils>/bin."""
if not self.spec_dir:
- tty.warn(
- "Could not install specs for {0}.".format(self.spec.format("{name}{@version}"))
- )
+ tty.warn(f"Could not install specs for {self.spec.format('{name}{@version}')}.")
return
- gcc = self.spec["gcc"].command
- lines = gcc("-dumpspecs", output=str).splitlines(True)
- specs_file = join_path(self.spec_dir, "specs")
-
- # Save a backup
- with open(specs_file + ".orig", "w") as out:
- out.writelines(lines)
-
# Find which directories have shared libraries
- rpath_libdirs = []
- for dir in ["lib", "lib64"]:
+ for dir in ["lib64", "lib"]:
libdir = join_path(self.prefix, dir)
- if glob.glob(join_path(libdir, "*." + dso_suffix)):
- rpath_libdirs.append(libdir)
-
- if not rpath_libdirs:
- # No shared libraries
+ if glob.glob(join_path(libdir, "libgcc_s.*")):
+ rpath_dir = libdir
+ break
+ else:
tty.warn("No dynamic libraries found in lib/lib64")
- return
+ rpath_dir = None
- # Overwrite the specs file
- with open(specs_file, "w") as out:
- for line in lines:
- out.write(line)
- if line.startswith("*link_libgcc:"):
- # Insert at start of line following link_libgcc, which gets
- # inserted into every call to the linker
- out.write("%(link_libgcc_rpath) ")
-
- # Add easily-overridable rpath string at the end
- out.write("*link_libgcc_rpath:\n")
- out.write(" ".join("-rpath " + lib for lib in rpath_libdirs))
- out.write("\n")
- set_install_permissions(specs_file)
- tty.info("Wrote new spec file to {0}".format(specs_file))
+ specs_file = join_path(self.spec_dir, "specs")
+ with open(specs_file, "w") as f:
+ # can't extend the builtins without dumping them first
+ f.write(self.spec["gcc"].command("-dumpspecs", output=str, error=os.devnull).strip())
- def setup_run_environment(self, env):
- # Search prefix directory for possibly modified compiler names
- from spack.compilers.gcc import Gcc as Compiler
+ f.write("\n\n# Generated by Spack\n\n")
- # Get the contents of the installed binary directory
- bin_path = self.spec.prefix.bin
+ # rpath
+ if rpath_dir:
+ f.write(f"*link_libgcc:\n+ -rpath {rpath_dir}\n\n")
- if not os.path.isdir(bin_path):
- return
+ # programs search path
+ if self.spec.satisfies("+binutils"):
+ f.write(f"*self_spec:\n+ -B{self.spec['binutils'].prefix.bin}\n\n")
- bin_contents = os.listdir(bin_path)
+ # set -fuse-ld=mold as the default linker when +mold
+ if self.spec.satisfies("+mold"):
+ f.write(
+ f"*self_spec:\n+ -B{self.spec['mold'].prefix.bin} "
+ "%{!fuse-ld*:-fuse-ld=mold}\n\n"
+ )
- # Find the first non-symlink compiler binary present for each language
- for lang in ["cc", "cxx", "fc", "f77"]:
- for filename, regexp in itertools.product(bin_contents, Compiler.search_regexps(lang)):
- if not regexp.match(filename):
- continue
+ set_install_permissions(specs_file)
+ tty.info(f"Wrote new spec file to {specs_file}")
- abspath = os.path.join(bin_path, filename)
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("languages=c"):
+ env.set("CC", self.cc)
- # Skip broken symlinks (https://github.com/spack/spack/issues/41327)
- if not os.path.exists(abspath):
- continue
+ if self.spec.satisfies("languages=cxx"):
+ env.set("CXX", self.cxx)
- # Set the proper environment variable
- env.set(lang.upper(), abspath)
- # Stop searching filename/regex combos for this language
- break
+ if self.spec.satisfies("languages=fortran"):
+ env.set("FC", self.fortran)
+ env.set("F77", self.fortran)
def detect_gdc(self):
"""Detect and return the path to GDC that belongs to the same instance of GCC that is used
@@ -1115,7 +1107,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
)
@classmethod
- def runtime_constraints(cls, *, compiler, pkg):
+ def runtime_constraints(cls, *, spec, pkg):
"""Callback function to inject runtime-related rules into the solver.
Rule-injection is obtained through method calls of the ``pkg`` argument.
@@ -1124,7 +1116,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
we'll document the behavior at https://spack.readthedocs.io/en/latest/
Args:
- compiler: compiler object (node attribute) currently considered
+ spec: spec that will inject runtime dependencies
pkg: object used to forward information to the solver
"""
pkg("*").depends_on(
@@ -1134,11 +1126,89 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
description="If any package uses %gcc, it depends on gcc-runtime",
)
pkg("*").depends_on(
- f"gcc-runtime@{str(compiler.version)}:",
- when=f"%{str(compiler.spec)}",
+ f"gcc-runtime@{str(spec.version)}:",
+ when=f"%{str(spec)}",
type="link",
- description=f"If any package uses %{str(compiler.spec)}, "
- f"it depends on gcc-runtime@{str(compiler.version)}:",
+ description=f"If any package uses %{str(spec)}, "
+ f"it depends on gcc-runtime@{str(spec.version)}:",
)
+
+ gfortran_str = "libgfortran@5"
+ if spec.satisfies("gcc@:6"):
+ gfortran_str = "libgfortran@3"
+ elif spec.satisfies("gcc@7"):
+ gfortran_str = "libgfortran@4"
+
+ for fortran_virtual in ("fortran-rt", gfortran_str):
+ pkg("*").depends_on(
+ fortran_virtual,
+ when=f"%{str(spec)}",
+ languages=["fortran"],
+ type="link",
+ description=f"Add a dependency on '{gfortran_str}' for nodes compiled with "
+ f"{str(spec)} and using the 'fortran' language",
+ )
# The version of gcc-runtime is the same as the %gcc used to "compile" it
- pkg("gcc-runtime").requires(f"@={str(compiler.version)}", when=f"%{str(compiler.spec)}")
+ pkg("gcc-runtime").requires(f"@={str(spec.version)}", when=f"%{str(spec)}")
+
+ # If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
+ # (technically @:X is broader than ... <= @=X but this should work in practice)
+ pkg("*").propagate(f"%gcc@:{str(spec.version)}", when=f"%{str(spec)}")
+
+ def _post_buildcache_install_hook(self):
+ if not self.spec.satisfies("platform=linux"):
+ return
+
+ # Setting up the runtime environment shouldn't be necessary here.
+ relocation_args = []
+ gcc = self.spec["gcc"].command
+ specs_file = os.path.join(self.spec_dir, "specs")
+ dryrun = gcc("test.c", "-###", output=os.devnull, error=str).strip()
+ if not dryrun:
+ tty.warn(f"Cannot relocate {specs_file}, compiler might not be working properly")
+ return
+ dynamic_linker = spack.util.libc.parse_dynamic_linker(dryrun)
+ if not dynamic_linker:
+ tty.warn(f"Cannot relocate {specs_file}, compiler might not be working properly")
+ return
+
+ libc = spack.util.libc.libc_from_dynamic_linker(dynamic_linker)
+
+ # We search for crt1.o ourselves because `gcc -print-prile-name=crt1.o` can give a rather
+ # convoluted relative path from a different prefix.
+ startfile_prefix = spack.util.libc.startfile_prefix(libc.external_path, dynamic_linker)
+
+ gcc_can_locate = lambda p: os.path.isabs(
+ gcc(f"-print-file-name={p}", output=str, error=os.devnull).strip()
+ )
+
+ if not gcc_can_locate("crt1.o"):
+ relocation_args.append(f"-B{startfile_prefix}")
+
+ # libc headers may also be in a multiarch subdir.
+ header_dir = spack.util.libc.libc_include_dir_from_startfile_prefix(
+ libc.external_path, startfile_prefix
+ )
+ if header_dir and all(
+ os.path.exists(os.path.join(header_dir, h))
+ for h in libc.package_class.representative_headers
+ ):
+ relocation_args.append(f"-idirafter {header_dir}")
+ else:
+ tty.warn(
+ f"Cannot relocate {specs_file} include directories, "
+ f"compiler might not be working properly"
+ )
+
+ # Delete current spec files.
+ try:
+ os.unlink(specs_file)
+ except OSError:
+ pass
+
+ # Write a new one and append flags for libc
+ self.write_specs_file()
+
+ if relocation_args:
+ with open(specs_file, "a") as f:
+ f.write(f"*self_spec:\n+ {' '.join(relocation_args)}\n\n")
diff --git a/var/spack/repos/builtin/packages/gccmakedep/package.py b/var/spack/repos/builtin/packages/gccmakedep/package.py
index 7f89c316f6..7718cf0477 100644
--- a/var/spack/repos/builtin/packages/gccmakedep/package.py
+++ b/var/spack/repos/builtin/packages/gccmakedep/package.py
@@ -14,6 +14,7 @@ class Gccmakedep(AutotoolsPackage, XorgPackage):
license("MIT")
+ version("1.0.4", sha256="5f36cde3f7cce8150a6eeb8026759977be523068a64fad899776122c3f03311f")
version("1.0.3", sha256="f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/gccxml/package.py b/var/spack/repos/builtin/packages/gccxml/package.py
index 2b492412a2..fba71f1f27 100644
--- a/var/spack/repos/builtin/packages/gccxml/package.py
+++ b/var/spack/repos/builtin/packages/gccxml/package.py
@@ -16,6 +16,9 @@ class Gccxml(CMakePackage):
version("develop", branch="master")
version("latest", commit="3afa8ba5be6866e603dcabe80aff79856b558e24", preferred=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("darwin-gcc.patch", when="%gcc platform=darwin")
# taken from https://github.com/gccxml/gccxml/issues/11#issuecomment-140334118
patch("gcc-5.patch", when="%gcc@5:")
diff --git a/var/spack/repos/builtin/packages/gchp/package.py b/var/spack/repos/builtin/packages/gchp/package.py
index 3c1b892fc5..837f54bc90 100644
--- a/var/spack/repos/builtin/packages/gchp/package.py
+++ b/var/spack/repos/builtin/packages/gchp/package.py
@@ -29,6 +29,10 @@ class Gchp(CMakePackage):
version("13.0.0", commit="1f5a5c5630c5d066ff8306cbb8b83e267ca7c265", submodules=True)
version("dev", branch="dev", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("for_aarch64.patch", when="target=aarch64:")
depends_on("esmf@8.0.1", when="@13.0.0:")
diff --git a/var/spack/repos/builtin/packages/gconf/package.py b/var/spack/repos/builtin/packages/gconf/package.py
index 3b6098b113..072c44606c 100644
--- a/var/spack/repos/builtin/packages/gconf/package.py
+++ b/var/spack/repos/builtin/packages/gconf/package.py
@@ -22,6 +22,8 @@ class Gconf(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("gettext", type="build")
depends_on("intltool", type="build")
diff --git a/var/spack/repos/builtin/packages/gcta/package.py b/var/spack/repos/builtin/packages/gcta/package.py
index 19b89f45e3..6fc6d60ff7 100644
--- a/var/spack/repos/builtin/packages/gcta/package.py
+++ b/var/spack/repos/builtin/packages/gcta/package.py
@@ -21,10 +21,13 @@ class Gcta(CMakePackage):
version("1.94.0beta", commit="746e3975ddb463fc7bd15b03c6cc64b023eca497", submodules=True)
version("1.91.2", sha256="0609d0fba856599a2acc66adefe87725304117acc226360ec2aabf8a0ac64e85")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
conflicts("target=aarch64:", when="@:1.91.2", msg="aarch64 support added in 1.94.0")
depends_on("cmake@3.1:", type="build")
- depends_on("intel-mkl@2017:", when="target=x86_64:")
+ depends_on("intel-oneapi-mkl", when="target=x86_64:")
depends_on("openblas", when="target=aarch64:")
depends_on("eigen@3.3.1", when="@1.91.2")
depends_on("eigen@3.3.7:", when="@1.94.0beta:")
@@ -47,6 +50,12 @@ class Gcta(CMakePackage):
for s in strings:
filter_file(s, "", "CMakeLists.txt", string=True)
+ def flag_handler(self, name, flags):
+ # To compile with newer compilers like gcc-13, gcta needs to include <cstdint>:
+ if name == "cxxflags":
+ flags.extend(["-include", "cstdint"])
+ return (flags, None, None)
+
def cmake_args(self):
eigen = self.spec["eigen"].prefix.include
args = [self.define("EIGEN3_INCLUDE_DIR", eigen)]
@@ -57,7 +66,7 @@ class Gcta(CMakePackage):
args.extend(deps)
if self.spec.satisfies("target=x86_64:"):
- mkl = self.spec["intel-mkl"].prefix
+ mkl = self.spec["intel-oneapi-mkl"].prefix.mkl.latest
args.append(self.define("MKLROOT", mkl))
elif self.spec.satisfies("target=aarch64:"):
openblas = self.spec["openblas"].prefix
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index 85f38725bc..67e8e20987 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -9,7 +9,7 @@ import sys
from spack.build_systems.autotools import AutotoolsBuilder
from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
-from spack.util.environment import filter_system_paths, is_system_path
+from spack.util.environment import filter_system_paths
class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
@@ -28,10 +28,17 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
list_url = "https://download.osgeo.org/gdal/"
list_depth = 1
- maintainers("adamjstewart")
-
license("MIT")
+ maintainers("adamjstewart")
+ version("3.10.0", sha256="af821a3bcf68cf085724c21c9b53605fd451d83af3c8854d8bf194638eb734a8")
+ version("3.9.3", sha256="34a037852ffe6d2163f1b8948a1aa7019ff767148aea55876c1339b22ad751f1")
+ version("3.9.2", sha256="bfbcc9f087f012c36151c20c79f8eac9529e1e5298fbded79cd5a1365f0b113a")
+ version("3.9.1", sha256="aff3086fee75f5773e33a5598df98d8a4d10be411f777d3ce23584b21d8171ca")
+ version("3.9.0", sha256="577f80e9d14ff7c90b6bfbc34201652b4546700c01543efb4f4c3050e0b3fda2")
+ version("3.8.5", sha256="e8b4df2a8a7d25272f867455c0c230459545972f81f0eff2ddbf6a6f60dcb1e4")
+ version("3.8.4", sha256="0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce")
+ version("3.8.3", sha256="ae2d160f65016e208eca34ff14490ec4511f1fa03fd386ac130449d15e82929d")
version("3.8.2", sha256="dc2921ee1cf7a5c0498e94d15fb9ab9c9689c296363a1d021fc3293dd242b4db")
version("3.8.1", sha256="75a20b23879bfa3d8c0db68e1d6f8b924f7f9d97f5fed089b01a72e404293900")
version("3.8.0", sha256="ec0f78d9dc32352aeac6edc9c3b27a991b91f9dc6f92c452207d84431c58757d")
@@ -70,29 +77,33 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
version("3.0.2", sha256="c3765371ce391715c8f28bd6defbc70b57aa43341f6e94605f04fe3c92468983")
version("3.0.1", sha256="45b4ae25dbd87282d589eca76481c426f72132d7a599556470d5c38263b09266")
version("3.0.0", sha256="ad316fa052d94d9606e90b20a514b92b2dd64e3142dfdbd8f10981a5fcd5c43e")
- version("2.4.4", sha256="a383bd3cf555d6e1169666b01b5b3025b2722ed39e834f1b65090f604405dcd8")
- version("2.4.3", sha256="d52dc3e0cff3af3e898d887c4151442989f416e839948e73f0994f0224bbff60")
- version("2.4.2", sha256="dcc132e469c5eb76fa4aaff238d32e45a5d947dc5b6c801a123b70045b618e0c")
- version("2.4.1", sha256="fd51b4900b2fc49b98d8714f55fc8a78ebfd07218357f93fb796791115a5a1ad")
- version("2.4.0", sha256="c3791dcc6d37e59f6efa86e2df2a55a4485237b0a48e330ae08949f0cdf00f27")
- version("2.3.3", sha256="c3635e41766a648f945d235b922e3c5306e26a2ee5bbd730d2181e242f5f46fe")
- version("2.3.2", sha256="3f6d78fe8807d1d6afb7bed27394f19467840a82bc36d65e66316fa0aa9d32a4")
- version("2.3.1", sha256="9c4625c45a3ee7e49a604ef221778983dd9fd8104922a87f20b99d9bedb7725a")
- version("2.3.0", sha256="6f75e49aa30de140525ccb58688667efe3a2d770576feb7fbc91023b7f552aa2")
- version("2.2.4", sha256="441eb1d1acb35238ca43a1a0a649493fc91fdcbab231d0747e9d462eea192278")
- version("2.2.3", sha256="a328d63d476b3653f5a25b5f7971e87a15cdf8860ab0729d4b1157ba988b8d0b")
- version("2.2.2", sha256="eb25d6ee85f4f5ac1d5581958f8c6eed9b1d50746f82866fe92e507541def35b")
- version("2.2.1", sha256="927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066")
- version("2.2.0", sha256="0d4c326862e0f118e17418c042c2bcd037b25abd3fb198e1fc5d40b11a9fc8ea")
- version("2.1.4", sha256="e06a7ae4c4ed2fd678cd045ff50a10ff5002f3b81cdfcd8ab03c39ce962d9b63")
- version("2.1.3", sha256="b489793627e6cb8d2ff8d7737b61daf58382fe189fae4c581ddfd48c04b49005")
- version("2.1.2", sha256="b597f36bd29a2b4368998ddd32b28c8cdf3c8192237a81b99af83cc17d7fa374")
- version("2.1.1", sha256="87ce516ce757ad1edf1e21f007fbe232ed2e932af422e9893f40199711c41f92")
- version("2.1.0", sha256="568b43441955b306364fcf97fb47d4c1512ac6f2f5f76b2ec39a890d2418ee03")
- version("2.0.3", sha256="3c6c5ade299c7a52fc9c5d2111110c97032e1f0c2593ce6091c364b1a43b442a")
- version("2.0.2", sha256="90f838853cc1c07e55893483faa7e923e4b4b1659c6bc9df3538366030a7e622")
- version("2.0.1", sha256="2564c91ed8ed36274ee31002a25798f5babc4221e879cb5013867733d80f9920")
- version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061")
+ with default_args(deprecated=True):
+ version("2.4.4", sha256="a383bd3cf555d6e1169666b01b5b3025b2722ed39e834f1b65090f604405dcd8")
+ version("2.4.3", sha256="d52dc3e0cff3af3e898d887c4151442989f416e839948e73f0994f0224bbff60")
+ version("2.4.2", sha256="dcc132e469c5eb76fa4aaff238d32e45a5d947dc5b6c801a123b70045b618e0c")
+ version("2.4.1", sha256="fd51b4900b2fc49b98d8714f55fc8a78ebfd07218357f93fb796791115a5a1ad")
+ version("2.4.0", sha256="c3791dcc6d37e59f6efa86e2df2a55a4485237b0a48e330ae08949f0cdf00f27")
+ version("2.3.3", sha256="c3635e41766a648f945d235b922e3c5306e26a2ee5bbd730d2181e242f5f46fe")
+ version("2.3.2", sha256="3f6d78fe8807d1d6afb7bed27394f19467840a82bc36d65e66316fa0aa9d32a4")
+ version("2.3.1", sha256="9c4625c45a3ee7e49a604ef221778983dd9fd8104922a87f20b99d9bedb7725a")
+ version("2.3.0", sha256="6f75e49aa30de140525ccb58688667efe3a2d770576feb7fbc91023b7f552aa2")
+ version("2.2.4", sha256="441eb1d1acb35238ca43a1a0a649493fc91fdcbab231d0747e9d462eea192278")
+ version("2.2.3", sha256="a328d63d476b3653f5a25b5f7971e87a15cdf8860ab0729d4b1157ba988b8d0b")
+ version("2.2.2", sha256="eb25d6ee85f4f5ac1d5581958f8c6eed9b1d50746f82866fe92e507541def35b")
+ version("2.2.1", sha256="927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066")
+ version("2.2.0", sha256="0d4c326862e0f118e17418c042c2bcd037b25abd3fb198e1fc5d40b11a9fc8ea")
+ version("2.1.4", sha256="e06a7ae4c4ed2fd678cd045ff50a10ff5002f3b81cdfcd8ab03c39ce962d9b63")
+ version("2.1.3", sha256="b489793627e6cb8d2ff8d7737b61daf58382fe189fae4c581ddfd48c04b49005")
+ version("2.1.2", sha256="b597f36bd29a2b4368998ddd32b28c8cdf3c8192237a81b99af83cc17d7fa374")
+ version("2.1.1", sha256="87ce516ce757ad1edf1e21f007fbe232ed2e932af422e9893f40199711c41f92")
+ version("2.1.0", sha256="568b43441955b306364fcf97fb47d4c1512ac6f2f5f76b2ec39a890d2418ee03")
+ version("2.0.3", sha256="3c6c5ade299c7a52fc9c5d2111110c97032e1f0c2593ce6091c364b1a43b442a")
+ version("2.0.2", sha256="90f838853cc1c07e55893483faa7e923e4b4b1659c6bc9df3538366030a7e622")
+ version("2.0.1", sha256="2564c91ed8ed36274ee31002a25798f5babc4221e879cb5013867733d80f9920")
+ version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
# Optional dependencies
variant("archive", default=False, when="@3.7:", description="Optional for vsi7z VFS driver")
@@ -104,6 +115,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
variant(
"arrow", default=False, when="build_system=cmake", description="Required for Arrow driver"
)
+ variant("avif", default=False, when="@3.10:", description="Required for AVIF driver")
variant(
"basisu", default=False, when="@3.6:", description="Required for BASISU and KTX2 drivers"
)
@@ -186,6 +198,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
"opencad", default=False, when="build_system=cmake", description="Required for CAD driver"
)
variant("opencl", default=False, description="Required to accelerate warping computations")
+ variant("opendrive", default=False, when="@3.10:", description="Required for XODR driver")
variant("openexr", default=False, when="@3.1:", description="Required for EXR driver")
variant("openjpeg", default=False, description="Required for JP2OpenJPEG driver")
variant("openssl", default=False, when="@2.3:", description="Required for EEDAI driver")
@@ -248,18 +261,22 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
with when("build_system=cmake"):
generator("ninja")
+ depends_on("cmake@3.16:", type="build", when="@3.9:")
depends_on("cmake@3.9:", type="build")
with when("build_system=autotools"):
depends_on("gmake", type="build")
# Required dependencies
+ # Versions come from gdal_check_package in cmake/helpers/CheckDependentLibraries.cmake
depends_on("pkgconfig@0.25:", type="build")
+ depends_on("proj@6.3.1:", when="@3.9:")
depends_on("proj@6:", when="@3:")
depends_on("proj@:6", when="@2.5:2")
depends_on("proj@:5", when="@2.4")
depends_on("proj@:4", when="@:2.3")
depends_on("zlib-api")
+ depends_on("libtiff@4.1:", when="@3.9:")
depends_on("libtiff@4:", when="@3:")
depends_on("libtiff@3.6.0:") # 3.9.0+ needed to pass testsuite
depends_on("libgeotiff@1.5:", when="@3:")
@@ -274,12 +291,14 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
depends_on("blas", when="+armadillo")
depends_on("lapack", when="+armadillo")
depends_on("arrow", when="+arrow")
+ depends_on("libavif", when="+avif")
# depends_on("basis-universal", when="+basisu")
depends_on("c-blosc", when="+blosc")
depends_on("brunsli", when="+brunsli")
# depends_on('bsb', when='+bsb')
depends_on("cfitsio", when="+cfitsio")
depends_on("crunch", when="+crnlib")
+ depends_on("curl@7.68:", when="@3.9:+curl")
depends_on("curl", when="+curl")
depends_on("cryptopp", when="+cryptopp")
depends_on("libdeflate", when="+deflate")
@@ -291,6 +310,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
# depends_on('fme', when='+fme')
depends_on("freexl", when="+freexl")
depends_on("fyba", when="+fyba")
+ depends_on("geos@3.8:", when="@3.9:+geos")
depends_on("geos@3.1:", when="+geos")
depends_on("giflib", when="+gif")
depends_on("grass@5.7:", when="+grass")
@@ -298,9 +318,11 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
depends_on("libgta", when="+gta")
depends_on("libheif@1.1:", when="+heif")
depends_on("hdf", when="+hdf4")
- depends_on("hdf5+cxx", when="+hdf5")
- depends_on("hdf5@:1.13", when="@:3.5 +hdf5")
- depends_on("hdf5@:1.12", when="@:3.4 +hdf5")
+ depends_on("hdf5@1.10:", when="@3.9:+hdf5")
+ depends_on("hdf5@:1.13", when="@:3.5+hdf5")
+ depends_on("hdf5@:1.12", when="@:3.4+hdf5")
+ depends_on("hdf5+cxx", when="@3.8:+hdf5+kea")
+ depends_on("hdf5+cxx", when="@:3.7+hdf5")
depends_on("hadoop", when="+hdfs")
depends_on("iconv", when="+iconv")
# depends_on('idb', when='+idb')
@@ -315,6 +337,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
# depends_on('libcsf', when='+libcsf')
depends_on("libkml@1.3:", when="+libkml")
depends_on("xz", when="+liblzma")
+ depends_on("qb3", when="+libqb3")
depends_on("libxml2", when="+libxml2")
# depends_on('luratech', when='+luratech')
depends_on("lz4", when="+lz4")
@@ -327,13 +350,16 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
# depends_on('mssql_ncli', when='+mssql_ncli')
# depends_on('mssql_odbc', when='+mssql_odbc')
depends_on("mysql", when="+mysql")
+ depends_on("netcdf-c@4.7:", when="@3.9:+netcdf")
depends_on("netcdf-c", when="+netcdf")
depends_on("unixodbc", when="+odbc")
# depends_on('odbc-cpp-wrapper', when='+odbccpp')
# depends_on('ogdi', when='+ogdi')
# depends_on('lib-opencad', when='+opencad')
depends_on("opencl", when="+opencl")
+ # depends_on("libopendrive@0.6:", when="+opendrive")
depends_on("openexr@2.2:", when="+openexr")
+ depends_on("openjpeg@2.3.1:", when="@3.9:+openjpeg")
depends_on("openjpeg", when="+openjpeg")
depends_on("openssl", when="+openssl")
depends_on("oracle-instant-client", when="+oracle")
@@ -342,26 +368,32 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
depends_on("pcre2", when="@3.5:+pcre2")
depends_on("pcre", when="@:3.4+pcre2")
# depends_on('pdfium', when='+pdfium')
+ depends_on("libpng@1.6:", when="@3.9:+png")
depends_on("libpng", when="+png")
# depends_on('podofo', when='+podofo')
+ depends_on("poppler@0.86:", when="@3.9:+poppler")
+ depends_on("poppler@0.24:", when="@3:+poppler")
+ depends_on("poppler@:0.63", when="@:2.3+poppler")
+ depends_on("poppler@:0.71", when="@:2.4+poppler")
+ depends_on("poppler@:21", when="@:3.4.1+poppler")
depends_on("poppler", when="+poppler")
- depends_on("poppler@0.24:", when="@3: +poppler")
- depends_on("poppler@:0.63", when="@:2.3 +poppler")
- depends_on("poppler@:0.71", when="@:2.4 +poppler")
- depends_on("poppler@:21", when="@:3.4.1 +poppler")
depends_on("postgresql", when="+postgresql")
- depends_on("qb3", when="+libqb3")
depends_on("qhull", when="+qhull")
depends_on("qhull@2015:", when="@3.5:+qhull")
depends_on("qhull@:2020.1", when="@:3.3+qhull")
# depends_on('rasdaman', when='+rasdaman')
- # depends_on('rasterlite2@1.1:', when='+rasterlite2')
+ # depends_on('rasterlite2@1.1:', when='@3.7:+rasterlite2')
+ # depends_on('rasterlite2', when='+rasterlite2')
# depends_on('rdblib', when='+rdb')
# depends_on('sde', when='+sde')
depends_on("sfcgal", when="+sfcgal")
+ depends_on("libspatialite@4.1.2:", when="@3.7:+spatialite")
depends_on("libspatialite", when="+spatialite")
+ depends_on("sqlite@3.31:", when="@3.9:+sqlite3")
depends_on("sqlite@3:", when="+sqlite3")
# depends_on('teigha', when='+teigha')
+ # depends_on('tiledb@2.15:', when='@3.9:+tiledb')
+ # depends_on('tiledb@2.7:', when='@3.7:+tiledb')
# depends_on('tiledb', when='+tiledb')
depends_on("libwebp", when="+webp")
depends_on("xerces-c@3.1:", when="+xercesc")
@@ -374,17 +406,20 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
# extends('openjdk', when='+java')
# extends('perl', when='+perl')
- # see gdal_version_and_min_supported_python_version
- # in swig/python/osgeo/__init__.py
- depends_on("python@3.6:", type=("build", "link", "run"), when="@3.3:+python")
- depends_on("python@2.0:", type=("build", "link", "run"), when="@3.2:+python")
+ # swig/python/pyproject.toml (3.9+)
+ # swig/python/setup.py.in (3.5-3.8)
+ # swig/python/osgeo/__init__.py (3.4-)
depends_on("python", type=("build", "link", "run"), when="+python")
# Uses distutils
depends_on("python@:3.11", type=("build", "link", "run"), when="@:3.4+python")
- # swig/python/setup.py
+ # swig/python/pyproject.toml (3.9+)
+ # swig/python/setup.py (3.8-)
+ depends_on("py-setuptools@67:", type="build", when="@3.9:+python")
depends_on("py-setuptools@:57", type="build", when="@:3.2+python") # needs 2to3
depends_on("py-setuptools", type="build", when="+python")
depends_on("py-numpy@1.0.0:", type=("build", "run"), when="+python")
+ # https://github.com/OSGeo/gdal/issues/9751
+ depends_on("py-numpy@:1", when="@:3.8+python", type=("build", "run"))
depends_on("swig", type="build", when="+python")
depends_on("java@7:", type=("build", "link", "run"), when="@3.2:+java")
depends_on("java@6:", type=("build", "link", "run"), when="@2.4:+java")
@@ -400,13 +435,20 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
# https://gdal.org/development/rfc/rfc88_googletest.html
depends_on("googletest@1.10:", type="test")
- # https://trac.osgeo.org/gdal/wiki/SupportedCompilers
- msg = "GDAL requires C++11 support"
- conflicts("%gcc@:4.8.0", msg=msg)
- conflicts("%clang@:3.2", msg=msg)
- conflicts("%intel@:12", msg=msg)
- conflicts("%xl@:13.0", msg=msg)
- conflicts("%xl_r@:13.0", msg=msg)
+ # https://gdal.org/development/rfc/rfc98_build_requirements_gdal_3_9.html
+ with default_args(when="@3.9:", msg="GDAL requires C++17 support"):
+ conflicts("%gcc@:7")
+ conflicts("%clang@:4")
+ conflicts("%msvc@:19.14")
+
+ # https://gdal.org/development/rfc/rfc68_cplusplus11.html
+ with default_args(when="@2.3:", msg="GDAL requires C++11 support"):
+ conflicts("%gcc@:4.8.0")
+ conflicts("%clang@:3.2")
+ conflicts("%msvc@:13")
+
+ # https://github.com/OSGeo/gdal/issues/8693
+ conflicts("%gcc@11:", when="@:3.6")
# https://github.com/OSGeo/gdal/issues/5994
conflicts("~png", when="@3:3.5.0")
@@ -469,7 +511,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
return Executable(exe)("--version", output=str, error=str).rstrip()
def setup_run_environment(self, env):
- if "+java" in self.spec:
+ if self.spec.satisfies("+java"):
class_paths = find(self.prefix, "*.jar")
classpath = os.pathsep.join(class_paths)
env.prepend_path("CLASSPATH", classpath)
@@ -486,8 +528,9 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
env.prepend_path("LD_LIBRARY_PATH", ":".join(libs))
def patch(self):
- if "+java platform=darwin" in self.spec:
+ if self.spec.satisfies("+java platform=darwin"):
filter_file("linux", "darwin", "swig/java/java.opt", string=True)
+ filter_file("-lazy-ljvm", "-ljvm", "configure", string=True)
class CMakeBuilder(CMakeBuilder):
@@ -510,6 +553,7 @@ class CMakeBuilder(CMakeBuilder):
self.define_from_variant("GDAL_USE_ARCHIVE", "archive"),
self.define_from_variant("GDAL_USE_ARMADILLO", "armadillo"),
self.define_from_variant("GDAL_USE_ARROW", "arrow"),
+ self.define_from_variant("GDAL_USE_AVIF", "avif"),
self.define_from_variant("GDAL_USE_BASISU", "basisu"),
self.define_from_variant("GDAL_USE_BLOSC", "blosc"),
self.define_from_variant("GDAL_USE_BRUNSLI", "brunsli"),
@@ -556,6 +600,7 @@ class CMakeBuilder(CMakeBuilder):
self.define_from_variant("GDAL_USE_OGDI", "ogdi"),
self.define_from_variant("GDAL_USE_OPENCAD", "opencad"),
self.define_from_variant("GDAL_USE_OPENCL", "opencl"),
+ self.define_from_variant("GDAL_USE_OPENDRIVE", "opendrive"),
self.define_from_variant("GDAL_USE_OPENEXR", "openexr"),
self.define_from_variant("GDAL_USE_OPENJPEG", "openjpeg"),
self.define_from_variant("GDAL_USE_OPENSSL", "openssl"),
@@ -603,7 +648,7 @@ class AutotoolsBuilder(AutotoolsBuilder):
if not variant:
variant = name
- if variant not in self.pkg.variants:
+ if not self.pkg.has_variant(variant):
msg = '"{}" is not a variant of "{}"'
raise KeyError(msg.format(variant, self.name))
@@ -713,11 +758,11 @@ class AutotoolsBuilder(AutotoolsBuilder):
self.with_or_without("perl"),
self.with_or_without("php"),
]
- if "+iconv" in self.spec:
- if self.spec["iconv"].name == "libc":
+ if self.spec.satisfies("+iconv"):
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(self.spec["iconv"].prefix):
- args.append("--with-libiconv-prefix=" + self.spec["iconv"].prefix)
# Renamed or modified flags
if self.spec.satisfies("@3:"):
@@ -749,9 +794,9 @@ class AutotoolsBuilder(AutotoolsBuilder):
else:
args.append(self.with_or_without("dwgdirect", variant="teigha", package="teigha"))
- if "+hdf4" in self.spec:
+ if self.spec.satisfies("+hdf4"):
hdf4 = self.spec["hdf"]
- if "+external-xdr" in hdf4 and hdf4["rpc"].name != "libc":
+ if "+external-xdr" in hdf4 and hdf4["rpc"].name == "libtirpc":
args.append("LIBS=" + hdf4["rpc"].libs.link_flags)
# Remove empty strings
@@ -762,19 +807,19 @@ class AutotoolsBuilder(AutotoolsBuilder):
def build(self, pkg, spec, prefix):
# https://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructionsUnix
make()
- if "+java" in spec:
+ if spec.satisfies("+java"):
with working_dir("swig/java"):
make()
def check(self):
# no top-level test target
- if "+java" in self.spec:
+ if self.spec.satisfies("+java"):
with working_dir("swig/java"):
make("test")
def install(self, pkg, spec, prefix):
make("install")
- if "+java" in spec:
+ if spec.satisfies("+java"):
with working_dir("swig/java"):
make("install")
install("*.jar", prefix)
diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py
index 85bfeaade8..4d0f7d0ccf 100644
--- a/var/spack/repos/builtin/packages/gdb/package.py
+++ b/var/spack/repos/builtin/packages/gdb/package.py
@@ -21,6 +21,8 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later AND LGPL-3.0-or-later")
+ version("15.2", sha256="9d16bc2539a2a20dc3ef99b48b8414d51c51305c8577eb7a1da00996f6dea223")
+ version("14.2", sha256="2de5174762e959a5e529e20c20d88a04735469d8fffd98f61664e70b341dc47c")
version("14.1", sha256="683e63182fb72bd5d8db32ab388143796370a8e3e71c26bc264effb487db7927")
version("13.2", sha256="7ead13d9e19fa0c57bb19104e1a5f67eefa9fc79f2e6360de491e8fddeda1e30")
version("13.1", sha256="4cc3d7143d6d54d289d227b1e7289dbc0fa4cbd46131ab87136e1ea831cf46d4")
@@ -42,6 +44,10 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
version("7.11.1", sha256="57e9e9aa3172ee16aa1e9c66fef08b4393b51872cc153e3f1ffdf18a57440586")
version("7.10.1", sha256="ff14f8050e6484508c73cbfa63731e57901478490ca1672dc0b5e2b03f6af622")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("python", default=True, description="Compile with Python support", when="@8.2:")
variant("xz", default=True, description="Compile with lzma support")
variant("source-highlight", default=False, description="Compile with source-highlight support")
@@ -78,13 +84,18 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
depends_on("texinfo", type="build")
# Optional dependencies
- depends_on("python", when="+python", type=("build", "link", "run"))
- # gdb@9.2 will segmentation fault if it builds with python@3.9.
- # https://bugzilla.redhat.com/show_bug.cgi?id=1829702
- depends_on("python@:3.8", when="@:9.2+python", type=("build", "link", "run"))
+ with when("+python"), default_args(type=("build", "link", "run")):
+ depends_on("python")
+ # gdb@9.2 will segmentation fault if it builds with python@3.9.
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1829702
+ depends_on("python@:3.8", when="@:9.2")
+ # pyOS_ReadlineTState became private API in cpython commit
+ # d228825e08883fc13f35eb91435f95d32524931c
+ depends_on("python@:3.12", when="@:14.2")
depends_on("xz", when="+xz")
depends_on("zlib-api")
depends_on("zstd", when="@13.1:")
+ depends_on("pkgconfig", type="build", when="@13.1:")
depends_on("source-highlight", when="+source-highlight")
depends_on("ncurses", when="+tui")
depends_on("gmp", when="@11.1:")
@@ -111,7 +122,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
if self.spec.version >= Version("11.1"):
args.append("--with-gmp={}".format(self.spec["gmp"].prefix))
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args.append("--with-python={}".format(self.spec["python"].command))
args.append("LDFLAGS={}".format(self.spec["python"].libs.ld_flags))
@@ -119,7 +130,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
@run_after("install")
def gdbinit(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
tool = self.spec["python"].command.path + "-gdb.py"
if os.path.exists(tool):
mkdir(self.prefix.etc)
diff --git a/var/spack/repos/builtin/packages/gdbm/package.py b/var/spack/repos/builtin/packages/gdbm/package.py
index e2efcf9683..0d7bf356cc 100644
--- a/var/spack/repos/builtin/packages/gdbm/package.py
+++ b/var/spack/repos/builtin/packages/gdbm/package.py
@@ -17,6 +17,7 @@ class Gdbm(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("1.24", sha256="695e9827fdf763513f133910bc7e6cfdb9187943a4fec943e57449723d2b8dbf")
version("1.23", sha256="74b1081d21fff13ae4bd7c16e5d6e504a4c26f7cde1dca0d963a484174bbcacd")
version("1.22", sha256="f366c823a6724af313b6bbe975b2809f9a157e5f6a43612a72949138d161d762")
version("1.21", sha256="b0b7dbdefd798de7ddccdd8edf6693a30494f7789777838042991ef107339cc2")
@@ -31,6 +32,8 @@ class Gdbm(AutotoolsPackage, GNUMirrorPackage):
version("1.9.1", sha256="6025852637772b0699f2294b5f14fd4a084bca3c8161d29d64d1f30d6d1a9aed")
version("1.9", sha256="f85324d7de3777db167581fd5d3493d2daa3e85e195a8ae9afc05b34551b6e57")
+ depends_on("c", type="build") # generated
+
depends_on("readline")
patch("macOS.patch", when="@1.21 platform=darwin")
diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
index 97a57b6ce4..f5e099d6dc 100644
--- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
+++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py
@@ -6,61 +6,58 @@
from spack.package import *
-class GdkPixbuf(Package):
- """The Gdk Pixbuf is a toolkit for image loading and pixel buffer
- manipulation. It is used by GTK+ 2 and GTK+ 3 to load and
- manipulate images. In the past it was distributed as part of
- GTK+ 2 but it was split off into a separate package in
- preparation for the change to GTK+ 3."""
+class GdkPixbuf(MesonPackage):
+ """The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. It is used by
+ GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it was distributed as part of
+ GTK+ 2 but it was split off into a separate package in preparation for the change to GTK+ 3."""
homepage = "https://gitlab.gnome.org/GNOME/gdk-pixbuf"
- url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/2.40/gdk-pixbuf-2.40.0.tar.xz"
- list_url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/"
+ git = "https://gitlab.gnome.org/GNOME/gdk-pixbuf"
+ url = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/archive/2.40.0/gdk-pixbuf-2.40.0.tar.gz"
+
+ # Falling back to the gitlab source since the mirror here seems to be broken
+ # url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/2.40/gdk-pixbuf-2.40.0.tar.xz"
+ # list_url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/"
list_depth = 1
- license("LGPL-2.1-or-later")
+ license("LGPL-2.1-or-later", checked_by="wdconinc")
- version("2.42.10", sha256="ee9b6c75d13ba096907a2e3c6b27b61bcd17f5c7ebeab5a5b439d2f2e39fe44b")
- version("2.42.9", sha256="28f7958e7bf29a32d4e963556d241d0a41a6786582ff6a5ad11665e0347fc962")
- version("2.42.6", sha256="c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f")
- version("2.42.2", sha256="83c66a1cfd591d7680c144d2922c5955d38b4db336d7cd3ee109f7bcf9afef15")
- # https://nvd.nist.gov/vuln/detail/CVE-2021-20240
+ version("2.42.12", sha256="d41966831b3d291fcdfe31f683bea4b3f03241d591ddbe550b5db873af3da364")
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-48622
version(
- "2.40.0",
- sha256="1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6",
+ "2.42.10",
+ sha256="87a086c51d9705698b22bd598a795efaccf61e4db3a96f439dcb3cd90506dab8",
deprecated=True,
)
version(
- "2.38.2",
- sha256="73fa651ec0d89d73dd3070b129ce2203a66171dfc0bd2caa3570a9c93d2d0781",
+ "2.42.9",
+ sha256="226d950375907857b23c5946ae6d30128f08cd75f65f14b14334c7a9fb686e36",
deprecated=True,
)
version(
- "2.38.0",
- sha256="dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbbadae47",
+ "2.42.6",
+ sha256="c4f3a84a04bc7c5f4fbd97dce7976ab648c60628f72ad4c7b79edce2bbdb494d",
deprecated=True,
)
version(
- "2.31.2",
- sha256="9e467ed09894c802499fb2399cd9a89ed21c81700ce8f27f970a833efb1e47aa",
+ "2.42.2",
+ sha256="249b977279f761979104d7befbb5ee23f1661e29d19a36da5875f3a97952d13f",
deprecated=True,
)
- variant("x11", default=False, description="Enable X11 support")
+ depends_on("c", type="build")
+
variant("tiff", default=False, description="Enable TIFF support(partially broken)")
# Man page creation was getting docbook errors, see issue #18853
variant("man", default=False, description="Enable man page creation")
- depends_on("meson@0.55.3:", type="build", when="@2.42.2:")
- depends_on("meson@0.46.0:", type="build", when="@2.37.92:")
- depends_on("meson@0.45.0:", type="build", when="@2.37.0:")
- depends_on("ninja", type="build", when="@2.37.0:")
- depends_on("shared-mime-info", when="@2.36.8: platform=linux")
- depends_on("shared-mime-info", when="@2.36.8: platform=cray")
- depends_on("pkgconfig", type="build")
- # Building the man pages requires libxslt and the Docbook stylesheets
- depends_on("libxslt", type="build", when="+man")
- depends_on("docbook-xsl@1.79.2:", type="build", when="+man")
+ with default_args(type="build"):
+ depends_on("meson@0.55.3:")
+ depends_on("pkgconfig")
+ depends_on("libxslt", when="+man")
+ depends_on("docbook-xsl@1.79.2:", when="+man")
+
+ depends_on("shared-mime-info", when="platform=linux")
depends_on("gettext")
depends_on("glib@2.38.0:")
depends_on("jpeg")
@@ -68,68 +65,28 @@ class GdkPixbuf(Package):
depends_on("zlib-api")
depends_on("libtiff", when="+tiff")
depends_on("gobject-introspection")
- depends_on("libx11", when="+x11")
- # Replace the docbook stylesheet URL with the one that our
- # docbook-xsl package uses/recognizes.
- # Pach modifies meson build files, so it only applies to versions that
- # depend on meson.
- patch("docbook-cdn.patch", when="@2.37.0:+man")
+ # Replace the docbook stylesheet URL with the one that our docbook-xsl package uses/recognizes.
+ patch("docbook-cdn.patch", when="+man")
def url_for_version(self, version):
url = "https://ftp.acc.umu.se/pub/gnome/sources/gdk-pixbuf/{0}/gdk-pixbuf-{1}.tar.xz"
return url.format(version.up_to(2), version)
def setup_run_environment(self, env):
- env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
-
- def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
- def setup_dependent_run_environment(self, env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- meson_args = std_meson_args + ["-Dman={0}".format("+man" in spec)]
- # Only build tests when requested
- if self.version >= Version("2.42.9"):
- meson_args += ["-Dtests={0}".format(self.run_tests)]
- # Based on suggestion by luigi-calori and the fixup shown by lee218llnl:
- # https://github.com/spack/spack/pull/27254#issuecomment-974464174
- if "+x11" in spec:
- if self.version >= Version("2.42"):
- raise InstallError("+x11 is not valid for {0}".format(self.version))
- meson_args += ["-Dx11=true"]
- meson("..", *meson_args)
- ninja("-v")
- if self.run_tests:
- ninja("test")
- ninja("install")
-
- def configure_args(self):
- args = []
- # disable building of gtk-doc files following #9771
- args.append("--disable-gtk-doc-html")
- true = which("true")
- args.append("GTKDOC_CHECK={0}".format(true))
- args.append("GTKDOC_CHECK_PATH={0}".format(true))
- args.append("GTKDOC_MKPDF={0}".format(true))
- args.append("GTKDOC_REBASE={0}".format(true))
+ def meson_args(self):
+ args = [f"-Dman={'true' if self.spec.satisfies('+man') else 'false'}"]
+ if self.spec.satisfies("@2.42.9:"):
+ args.append(f"-Dtests={'true' if self.run_tests else 'false'}")
return args
- @when("@:2.36")
- def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix), *self.configure_args())
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
-
def setup_build_environment(self, env):
# The "post-install.sh" script uses gdk-pixbuf-query-loaders,
# which was installed earlier.
diff --git a/var/spack/repos/builtin/packages/gdl/package.py b/var/spack/repos/builtin/packages/gdl/package.py
index b81062260d..79804fce3c 100644
--- a/var/spack/repos/builtin/packages/gdl/package.py
+++ b/var/spack/repos/builtin/packages/gdl/package.py
@@ -20,6 +20,10 @@ class Gdl(CMakePackage):
version("0.9.9", sha256="ad5de3fec095a5c58b46338dcc7367d2565c093794ab1bbcf180bba1a712cf14")
version("0.9.8", sha256="0e22df7314feaf18a76ae39ee57eea2ac8c3633bc095acbc25e1e07277d7c98b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("graphicsmagick", default=False, description="Enable GraphicsMagick")
variant("hdf4", default=False, description="Enable HDF4")
@@ -83,42 +87,42 @@ class Gdl(CMakePackage):
# only version 6 of ImageMagick is supported (version 7 is packaged)
args += ["-DMAGICK=OFF"]
- if "+graphicsmagick" in self.spec:
+ if self.spec.satisfies("+graphicsmagick"):
args += ["-DGRAPHICSMAGICK=ON"]
else:
args += ["-DGRAPHICSMAGICK=OFF"]
- if "+hdf4" in self.spec:
+ if self.spec.satisfies("+hdf4"):
args += ["-DHDF=ON"]
else:
args += ["-DHDF=OFF"]
- if "+hdf5" in self.spec:
+ if self.spec.satisfies("+hdf5"):
args += ["-DHDF5=ON"]
else:
args += ["-DHDF5=OFF"]
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
args += ["-DOPENMP=ON"]
else:
args += ["-DOPENMP=OFF"]
- if "+proj" in self.spec:
+ if self.spec.satisfies("+proj"):
args += ["-DLIBPROJ4=ON", "-DLIBPROJ4DIR={0}".format(self.spec["proj"].prefix)]
else:
args += ["-DLIBPROJ4=OFF"]
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args += ["-DPYTHON_MODULE=ON"]
else:
args += ["-DPYTHON_MODULE=OFF"]
- if "+wx" in self.spec:
+ if self.spec.satisfies("+wx"):
args += ["-DWXWIDGETS=ON"]
else:
args += ["-DWXWIDGETS=OFF"]
- if "+x11" in self.spec:
+ if self.spec.satisfies("+x11"):
args += ["-DX11=ON"]
else:
args += ["-DX11=OFF"]
@@ -127,7 +131,7 @@ class Gdl(CMakePackage):
@run_after("install")
def post_install(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
# gdl installs the python module into prefix/lib/site-python
# move it to the standard location
src = os.path.join(self.spec.prefix.lib, "site-python")
diff --git a/var/spack/repos/builtin/packages/gdrcopy/package.py b/var/spack/repos/builtin/packages/gdrcopy/package.py
index d48e32e3a3..c9b9640c62 100644
--- a/var/spack/repos/builtin/packages/gdrcopy/package.py
+++ b/var/spack/repos/builtin/packages/gdrcopy/package.py
@@ -18,18 +18,32 @@ class Gdrcopy(MakefilePackage, CudaPackage):
license("MIT")
version("master", branch="master")
+ version("2.4.1", sha256="faa7e816e9bad3301e53d6721457f7ef5ab42b7aa3b01ffda51f8e5620bb20ed")
version("2.3", sha256="b85d15901889aa42de6c4a9233792af40dd94543e82abe0439e544c87fd79475")
version("2.2", sha256="e4be119809391b18c735346d24b3b398dd9421cbff47ef12befbae40d61da45f")
version("2.1", sha256="cecc7dcc071107f77396f5553c9109790b6d2298ae29eb2dbbdd52b2a213e4ea")
version("2.0", sha256="98320e6e980a7134ebc4eedd6cf23647104f2b3c557f2eaf0d31a02609f5f2b0")
version("1.3", sha256="f11cdfe389b685f6636b80b4a3312dc014a385ad7220179c1318c60e2e28af3a")
- # Don't call ldconfig: https://github.com/NVIDIA/gdrcopy/pull/229
- patch("ldconfig.patch", when="@2.0:")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ # Don't call ldconfig: https://github.com/NVIDIA/gdrcopy/pull/229
+ patch("ldconfig.patch", when="@2.0:2.3")
+ # Allow tests to build against libcuda.so stub
+ patch(
+ "https://github.com/NVIDIA/gdrcopy/commit/508dd6179dcb04ba7720e2da5124b77bbdb615b0.patch?full_index=1",
+ sha256="cc18b13b6ea5512959464a85a43cdfda0bee5522a471e98ca76ba379bf582b5a",
+ when="@2.0:2.3",
+ )
+
+ depends_on("pkgconfig", type="build", when="@2.0:2.3")
depends_on("check")
requires("+cuda")
+ def setup_build_environment(self, env):
+ env.set("CUDA", self.spec["cuda"].prefix)
+
def build(self, spec, prefix):
make("lib")
make("exes")
diff --git a/var/spack/repos/builtin/packages/geant3/package.py b/var/spack/repos/builtin/packages/geant3/package.py
index cef0167b3b..5f0ede0e58 100644
--- a/var/spack/repos/builtin/packages/geant3/package.py
+++ b/var/spack/repos/builtin/packages/geant3/package.py
@@ -20,6 +20,10 @@ class Geant3(CMakePackage):
version("3-5", sha256="5bec0b442bbb3456d5cd1751ac9f90f1da48df0fcb7f6bf0a86c566bfc408261")
version("3-4", sha256="c7b487ab4fb4e6479c652b9b11dcafb686edf35e2f2048045c501e4f5597d62c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("root~vmc")
depends_on("vmc")
@@ -39,5 +43,5 @@ class Geant3(CMakePackage):
return args
def setup_build_environment(self, env):
- if "platform=darwin" in self.spec:
+ if self.spec.satisfies("platform=darwin"):
env.unset("MACOSX_DEPLOYMENT_TARGET")
diff --git a/var/spack/repos/builtin/packages/geant4-data/package.py b/var/spack/repos/builtin/packages/geant4-data/package.py
index c4134e356a..3b934da392 100644
--- a/var/spack/repos/builtin/packages/geant4-data/package.py
+++ b/var/spack/repos/builtin/packages/geant4-data/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import glob
import os
from spack.package import *
@@ -18,6 +17,8 @@ class Geant4Data(BundlePackage):
tags = ["hep"]
+ version("11.3.0")
+ version("11.2.2")
version("11.2.0")
version("11.1.0")
version("11.0.0")
@@ -43,8 +44,36 @@ class Geant4Data(BundlePackage):
# they generally don't change on the patch level
# Can move to declaring on a dataset basis if needed
_datasets = {
- "11.2.0:11.2": [
- "g4ndl@4.7",
+ "11.3.0:11.3": [
+ "g4ndl@4.7.1",
+ "g4emlow@8.6",
+ "g4photonevaporation@5.7",
+ "g4radioactivedecay@5.6",
+ "g4particlexs@4.1",
+ "g4pii@1.3",
+ "g4realsurface@2.2",
+ "g4saiddata@2.0",
+ "g4abla@3.3",
+ "g4incl@1.2",
+ "g4ensdfstate@2.3",
+ "g4nudexlib@1.0",
+ "g4urrpt@1.0",
+ ],
+ "11.2.2:11.2": [
+ "g4ndl@4.7.1",
+ "g4emlow@8.5",
+ "g4photonevaporation@5.7",
+ "g4radioactivedecay@5.6",
+ "g4particlexs@4.0",
+ "g4pii@1.3",
+ "g4realsurface@2.2",
+ "g4saiddata@2.0",
+ "g4abla@3.3",
+ "g4incl@1.2",
+ "g4ensdfstate@2.3",
+ ],
+ "11.2.0:11.2.1": [
+ "g4ndl@=4.7",
"g4emlow@8.5",
"g4photonevaporation@5.7",
"g4radioactivedecay@5.6",
@@ -174,5 +203,11 @@ class Geant4Data(BundlePackage):
def install(self, spec, prefix):
with working_dir(self.datadir, create=True):
for s in spec.dependencies():
- for d in glob.glob("{0}/data/*".format(s.prefix.share)):
- os.symlink(d, os.path.basename(d))
+ if not s.name.startswith("g4"):
+ continue
+
+ if not hasattr(s.package, "g4datasetname"):
+ raise InstallError(f"Dependency `{s.name}` does not expose `g4datasetname`")
+
+ d = "{0}/data/{1}".format(s.prefix.share, s.package.g4datasetname)
+ os.symlink(d, os.path.basename(d))
diff --git a/var/spack/repos/builtin/packages/geant4-vmc/package.py b/var/spack/repos/builtin/packages/geant4-vmc/package.py
index 60e4bb866b..89bf862c53 100644
--- a/var/spack/repos/builtin/packages/geant4-vmc/package.py
+++ b/var/spack/repos/builtin/packages/geant4-vmc/package.py
@@ -35,6 +35,8 @@ class Geant4Vmc(CMakePackage):
version("4-0-p2", sha256="cdd73c499cd296f13b6c0d37e161e7d94343f85617b2a7577ded8312248f9b9b")
version("3-6-p6", sha256="e62a62ff7075ff9afb2ffe420610374f62136094a447bbbc5f739a2238ddb0f0")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.3:", type="build")
depends_on("geant4")
depends_on("vmc")
diff --git a/var/spack/repos/builtin/packages/geant4/geant4-10.6.patch b/var/spack/repos/builtin/packages/geant4/geant4-10.6.patch
new file mode 100644
index 0000000000..81e8be34ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geant4/geant4-10.6.patch
@@ -0,0 +1,98 @@
+From b19a720a77d6661662f5dd440d9bb7fb6dadd9fb Mon Sep 17 00:00:00 2001
+From: Seth R Johnson <johnsonsr@ornl.gov>
+Date: Wed, 13 Mar 2024 14:43:37 -0400
+Subject: [PATCH] Backport ascii-V10-07-03
+
+---
+ .../persistency/ascii/src/G4tgrEvaluator.cc | 72 +++++++++----------
+ 1 file changed, 36 insertions(+), 36 deletions(-)
+
+diff --git a/source/persistency/ascii/src/G4tgrEvaluator.cc b/source/persistency/ascii/src/G4tgrEvaluator.cc
+index 9447ede9910..f20f3ca3404 100644
+--- a/source/persistency/ascii/src/G4tgrEvaluator.cc
++++ b/source/persistency/ascii/src/G4tgrEvaluator.cc
+@@ -63,45 +63,45 @@ void G4tgrEvaluator::print_error( G4int estatus ) const
+ }
+ }
+
+-G4double fsin( G4double arg ){ return std::sin(arg); }
+-G4double fcos( G4double arg ){ return std::cos(arg); }
+-G4double ftan( G4double arg ){ return std::tan(arg); }
+-G4double fasin( G4double arg ){ return std::asin(arg); }
+-G4double facos( G4double arg ){ return std::acos(arg); }
+-G4double fatan( G4double arg ){ return std::atan(arg); }
+-G4double fatan2( G4double arg1, G4double arg2 ){ return std::atan2(arg1,arg2); }
+-G4double fsinh( G4double arg ){ return std::sinh(arg); }
+-G4double fcosh( G4double arg ){ return std::cosh(arg); }
+-G4double ftanh( G4double arg ){ return std::tanh(arg); }
+-// G4double fasinh( G4double arg ){ return std::asinh(arg); }
+-// G4double facosh( G4double arg ){ return std::acosh(arg); }
+-// G4double fatanh( G4double arg ){ return std::atanh(arg); }
+-G4double fsqrt( G4double arg ){ return std::sqrt(arg); }
+-G4double fexp( G4double arg ){ return std::exp(arg); }
+-G4double flog( G4double arg ){ return std::log(arg); }
+-G4double flog10( G4double arg ){ return std::log10(arg); }
+-G4double fpow( G4double arg1, G4double arg2 ){ return std::pow(arg1,arg2); }
++G4double fltsin( G4double arg ){ return std::sin(arg); }
++G4double fltcos( G4double arg ){ return std::cos(arg); }
++G4double flttan( G4double arg ){ return std::tan(arg); }
++G4double fltasin( G4double arg ){ return std::asin(arg); }
++G4double fltacos( G4double arg ){ return std::acos(arg); }
++G4double fltatan( G4double arg ){ return std::atan(arg); }
++G4double fltatan2( G4double arg1, G4double arg2 ){ return std::atan2(arg1,arg2); }
++G4double fltsinh( G4double arg ){ return std::sinh(arg); }
++G4double fltcosh( G4double arg ){ return std::cosh(arg); }
++G4double flttanh( G4double arg ){ return std::tanh(arg); }
++// G4double fltasinh( G4double arg ){ return std::asinh(arg); }
++// G4double fltacosh( G4double arg ){ return std::acosh(arg); }
++// G4double fltatanh( G4double arg ){ return std::atanh(arg); }
++G4double fltsqrt( G4double arg ){ return std::sqrt(arg); }
++G4double fltexp( G4double arg ){ return std::exp(arg); }
++G4double fltlog( G4double arg ){ return std::log(arg); }
++G4double fltlog10( G4double arg ){ return std::log10(arg); }
++G4double fltpow( G4double arg1, G4double arg2 ){ return std::pow(arg1,arg2); }
+
+
+ //--------------------------------------------------------------------
+ void G4tgrEvaluator::AddCommonFunctions()
+ {
+- setFunction("sin", (*fsin));
+- setFunction("cos", (*fcos));
+- setFunction("tan", (*ftan));
+- setFunction("asin", (*fasin));
+- setFunction("acos", (*facos));
+- setFunction("atan", (*fatan));
+- setFunction("atan2", (*fatan2));
+- setFunction("sinh", (*fsinh));
+- setFunction("cosh", (*fcosh));
+- setFunction("tanh", (*ftanh));
+-// setFunction("asinh", (*fasinh));
+-// setFunction("acosh", (*facosh));
+-// setFunction("atanh", (*fatanh));
+- setFunction("sqrt", (*fsqrt));
+- setFunction("exp", (*fexp));
+- setFunction("log", (*flog));
+- setFunction("log10", (*flog10));
+- setFunction("pow", (*fpow));
++ setFunction("sin", (*fltsin));
++ setFunction("cos", (*fltcos));
++ setFunction("tan", (*flttan));
++ setFunction("asin", (*fltasin));
++ setFunction("acos", (*fltacos));
++ setFunction("atan", (*fltatan));
++ setFunction("atan2", (*fltatan2));
++ setFunction("sinh", (*fltsinh));
++ setFunction("cosh", (*fltcosh));
++ setFunction("tanh", (*flttanh));
++// setFunction("asinh", (*fltasinh));
++// setFunction("acosh", (*fltacosh));
++// setFunction("atanh", (*fltatanh));
++ setFunction("sqrt", (*fltsqrt));
++ setFunction("exp", (*fltexp));
++ setFunction("log", (*fltlog));
++ setFunction("log10", (*fltlog10));
++ setFunction("pow", (*fltpow));
+ }
+--
+2.43.0
+
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py
index f212ecc63b..38ebb060fb 100644
--- a/var/spack/repos/builtin/packages/geant4/package.py
+++ b/var/spack/repos/builtin/packages/geant4/package.py
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.variant import _ConditionalVariantValues
+from spack.variant import ConditionalVariantValues
class Geant4(CMakePackage):
@@ -20,8 +20,18 @@ class Geant4(CMakePackage):
executables = ["^geant4-config$"]
- maintainers("drbenmorgan")
-
+ maintainers("drbenmorgan", "sethrj")
+ version(
+ "11.3.0.beta",
+ sha256="572ba1570ca3b5b6f2a28ccbffa459901f6a986b79da1ebfdbf2f6f3dc5e14bf",
+ deprecated=True,
+ )
+ version(
+ "11.2.2",
+ sha256="3a8d98c63fc52578f6ebf166d7dffaec36256a186d57f2520c39790367700c8d",
+ preferred=True,
+ )
+ version("11.2.1", sha256="76c9093b01128ee2b45a6f4020a1bcb64d2a8141386dea4674b5ae28bcd23293")
version("11.2.0", sha256="9ff544739b243a24dac8f29a4e7aab4274fc0124fd4e1c4972018213dc6991ee")
version("11.1.3", sha256="5d9a05d4ccf8b975649eab1d615fc1b8dce5937e01ab9e795bffd04149240db6")
version("11.1.2", sha256="e9df8ad18c445d9213f028fd9537e174d6badb59d94bab4eeae32f665beb89af")
@@ -47,6 +57,8 @@ class Geant4(CMakePackage):
version("10.3.3", sha256="bcd36a453da44de9368d1d61b0144031a58e4b43a6d2d875e19085f2700a89d8")
version("10.0.4", sha256="97f3744366b00143d1eed52f8786823034bbe523f45998106f798af61d83f863")
+ depends_on("cxx", type="build")
+
_cxxstd_values = (
conditional("11", "14", when="@:10"),
conditional("17", when="@10.4.1:"),
@@ -61,15 +73,51 @@ class Geant4(CMakePackage):
)
variant("threads", default=True, description="Build with multithreading")
- variant("vecgeom", default=False, description="Enable vecgeom support", when="@10.3:")
+ variant("vecgeom", default=False, description="Enable vecgeom support", when="@10.4:")
variant("opengl", default=False, description="Optional OpenGL support")
variant("x11", default=False, description="Optional X11 support")
variant("motif", default=False, description="Optional motif support")
variant("qt", default=False, description="Enable Qt support")
+ variant("hdf5", default=False, description="Enable HDF5 support", when="@10.4:")
variant("python", default=False, description="Enable Python bindings", when="@10.6.2:11.0")
variant("tbb", default=False, description="Use TBB as a tasking backend", when="@11:")
+ variant("timemory", default=False, description="Use TiMemory for profiling", when="@9.5:")
variant("vtk", default=False, description="Enable VTK support", when="@11:")
+ # For most users, obtaining the Geant4 data via Spack will be useful; the
+ # sticky, default-enabled `+data` variant ensures that this happens.
+ # Furthermore, if this variant is enabled, Spack will automatically set the
+ # necessary environment variables to ensure that the Geant4 code runs
+ # correctly.
+ #
+ # However, the Geant4 data is also large and it is, on many machines used
+ # in HEP, already available via e.g. CVMFS. In these cases, users can save
+ # network bandwidth by using externally supplied Geant4 data. This can be
+ # done in two different ways.
+ #
+ # The first is to declare the Geant4 data directories as externals. This
+ # can be done by manually adding them to the `packages.yaml` file, e.g.:
+ #
+ # ```
+ # g4radioactivedecay:
+ # externals:
+ # - spec: g4radioactivedecay@5.6
+ # prefix: <PREFIX>
+ # buildable: False
+ # ```
+ #
+ # Where <PREFIX> is a path such that <PREFIX>/share/data/<DATASET><VERSION>
+ # exists.
+ #
+ # Alternatively, the `~data` variant can be supplied; in this case, Spack
+ # will not attempt to use the `geant4-data` spec at all. It is then
+ # essential to set up the `GEANT4_DATA_DIR` environment variable manually
+ # at runtime; see the Geant4 installation guide for more information:
+ # https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/postinstall.html
+ variant(
+ "data", default=True, sticky=True, description="Enable downloading of the data directory"
+ )
+
depends_on("cmake@3.16:", type="build", when="@11.0.0:")
depends_on("cmake@3.8:", type="build", when="@10.6.0:")
depends_on("cmake@3.5:", type="build")
@@ -91,14 +139,17 @@ class Geant4(CMakePackage):
"10.7.4",
"11.0",
"11.1",
- "11.2:",
+ "11.2.0:11.2.1",
+ "11.2.2:11.2",
+ "11.3:",
]:
- depends_on("geant4-data@" + _vers, type="run", when="@" + _vers)
+ depends_on("geant4-data@" + _vers, type="run", when="+data @" + _vers)
depends_on("expat")
depends_on("zlib-api")
depends_on("tbb", when="+tbb")
+ depends_on("timemory@3.2:", when="+timemory")
depends_on("vtk@8.2:", when="+vtk")
# Python, with boost requirement dealt with in cxxstd section
@@ -106,6 +157,7 @@ class Geant4(CMakePackage):
extends("python", when="+python")
# CLHEP version requirements to be reviewed
+ depends_on("clhep@2.4.7.1:", when="@11.3:")
depends_on("clhep@2.4.6.0:", when="@11.1:")
depends_on("clhep@2.4.5.1:", when="@11.0.0:")
depends_on("clhep@2.4.4.0:", when="@10.7.0:")
@@ -114,6 +166,7 @@ class Geant4(CMakePackage):
# Vecgeom specific versions for each Geant4 version
with when("+vecgeom"):
+ depends_on("vecgeom@1.2.8:", when="@11.3:")
depends_on("vecgeom@1.2.6:", when="@11.2:")
depends_on("vecgeom@1.2.0:", when="@11.1")
depends_on("vecgeom@1.1.18:1.1", when="@11.0.0:11.0")
@@ -121,11 +174,13 @@ class Geant4(CMakePackage):
depends_on("vecgeom@1.1.5", when="@10.6.0:10.6")
depends_on("vecgeom@1.1.0", when="@10.5.0:10.5")
depends_on("vecgeom@0.5.2", when="@10.4.0:10.4")
- depends_on("vecgeom@0.3rc", when="@10.3.0:10.3")
+
+ with when("+hdf5"):
+ depends_on("hdf5 +threadsafe")
def std_when(values):
for v in values:
- if isinstance(v, _ConditionalVariantValues):
+ if isinstance(v, ConditionalVariantValues):
for c in v:
yield (c.value, c.when)
else:
@@ -149,8 +204,13 @@ class Geant4(CMakePackage):
depends_on("libxmu", when="+x11")
depends_on("motif", when="+motif")
with when("+qt"):
- depends_on("qt@5: +opengl")
- depends_on("qt@5.9:", when="@11.2:")
+ depends_on("qmake")
+ with when("^[virtuals=qmake] qt-base"):
+ depends_on("qt-base +accessibility +gui +opengl")
+ with when("^[virtuals=qmake] qt"):
+ depends_on("qt@5: +opengl")
+ depends_on("qt@5.9:", when="@11.2:")
+ conflicts("@:11.1 ^[virtuals=qmake] qt-base", msg="Qt6 not supported before 11.2")
# As released, 10.0.4 has inconsistently capitalised filenames
# in the cmake files; this patch also enables cxxstd 14
@@ -158,6 +218,9 @@ class Geant4(CMakePackage):
# As released, 10.03.03 has issues with respect to using external
# CLHEP.
patch("CLHEP-10.03.03.patch", level=1, when="@10.3")
+ # Build failure on clang 15, ubuntu 22: see Geant4 problem report #2444
+ # fixed by ascii-V10-07-03
+ patch("geant4-10.6.patch", level=1, when="@10.0:10.6")
# These patches can be applied independent of the cxxstd value?
patch("cxx17.patch", when="@10.3 cxxstd=17")
patch("cxx17_geant4_10_0.patch", level=1, when="@10.4.0 cxxstd=17")
@@ -166,6 +229,9 @@ class Geant4(CMakePackage):
# See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556
patch("package-cache.patch", level=1, when="@10.7.0:11.1.2^cmake@3.17:")
+ # Issue with Twisted tubes, see https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2619
+ patch("twisted-tubes.patch", level=1, when="@11.2.0:11.2.2")
+
# NVHPC: "thread-local declaration follows non-thread-local declaration"
conflicts("%nvhpc", when="+threads")
@@ -257,34 +323,42 @@ class Geant4(CMakePackage):
options.append(self.define_from_variant("GEANT4_BUILD_MULTITHREADED", "threads"))
options.append(self.define_from_variant("GEANT4_USE_TBB", "tbb"))
- if "+threads" in spec:
+ if spec.satisfies("+threads"):
# Locked at global-dynamic to allow use cases that load the
# geant4 libs at application runtime
- options.append("-DGEANT4_BUILD_TLS_MODEL=global-dynamic")
+ options.append(self.define("GEANT4_BUILD_TLS_MODEL", "global-dynamic"))
+
+ # Profiling
+ options.append(self.define_from_variant("GEANT4_USE_TIMEMORY", "timemory"))
# Never install the data with geant4, but point to the dependent
# geant4-data's install directory to correctly set up the
# Geant4Config.cmake values for Geant4_DATASETS .
options.append(self.define("GEANT4_INSTALL_DATA", False))
- options.append(self.define("GEANT4_INSTALL_DATADIR", self.datadir))
+ if spec.satisfies("+data"):
+ options.append(self.define("GEANT4_INSTALL_DATADIR", self.datadir))
# Vecgeom
- if "+vecgeom" in spec:
+ if spec.satisfies("+vecgeom"):
options.append(self.define("GEANT4_USE_USOLIDS", True))
options.append(self.define("USolids_DIR", spec["vecgeom"].prefix.lib.CMake.USolids))
# Visualization options
if "platform=darwin" not in spec:
- if "+x11" in spec and "+opengl" in spec:
+ if spec.satisfies("+x11 +opengl"):
options.append(self.define("GEANT4_USE_OPENGL_X11", True))
- if "+motif" in spec and "+opengl" in spec:
+ if spec.satisfies("+motif +opengl"):
options.append(self.define("GEANT4_USE_XM", True))
- if "+x11" in spec:
+ if spec.satisfies("+x11"):
options.append(self.define("GEANT4_USE_RAYTRACER_X11", True))
- if "+qt" in spec:
+ if spec.satisfies("+qt"):
options.append(self.define("GEANT4_USE_QT", True))
- options.append(self.define("QT_QMAKE_EXECUTABLE", spec["qt"].prefix.bin.qmake))
+ if spec.satisfies("^[virtuals=qmake] qt-base"):
+ options.append(self.define("GEANT4_USE_QT_QT6", True))
+ options.append(self.define("QT_QMAKE_EXECUTABLE", spec["qmake"].prefix.bin.qmake))
+
+ options.append(self.define_from_variant("GEANT4_USE_HDF5", "hdf5"))
options.append(self.define_from_variant("GEANT4_USE_VTK", "vtk"))
diff --git a/var/spack/repos/builtin/packages/geant4/twisted-tubes.patch b/var/spack/repos/builtin/packages/geant4/twisted-tubes.patch
new file mode 100644
index 0000000000..6039025829
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geant4/twisted-tubes.patch
@@ -0,0 +1,875 @@
+diff --git a/source/geometry/solids/specific/include/G4TwistedTubs.hh b/source/geometry/solids/specific/include/G4TwistedTubs.hh
+index b8be4e629da8edb87c8e7fdcb12ae243fbb910e4..e6ca127646f1aa1f60b04b5100123ccfff9b698c 100644
+--- a/source/geometry/solids/specific/include/G4TwistedTubs.hh
++++ b/source/geometry/solids/specific/include/G4TwistedTubs.hh
+@@ -226,109 +226,6 @@ class G4TwistedTubs : public G4VSolid
+ mutable G4bool fRebuildPolyhedron = false;
+ mutable G4Polyhedron* fpPolyhedron = nullptr; // polyhedron for vis
+
+- class LastState // last Inside result
+- {
+- public:
+- LastState()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- inside = kOutside;
+- }
+- ~LastState()= default;
+- LastState(const LastState& r) = default;
+- LastState& operator=(const LastState& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; inside = r.inside;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- EInside inside;
+- };
+-
+- class LastVector // last SurfaceNormal result
+- {
+- public:
+- LastVector()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- vec.set(kInfinity,kInfinity,kInfinity);
+- surface = new G4VTwistSurface*[1];
+- }
+- ~LastVector()
+- {
+- delete [] surface;
+- }
+- LastVector(const LastVector& r) : p(r.p), vec(r.vec)
+- {
+- surface = new G4VTwistSurface*[1];
+- surface[0] = r.surface[0];
+- }
+- LastVector& operator=(const LastVector& r)
+- {
+- if (&r == this) { return *this; }
+- p = r.p; vec = r.vec;
+- delete [] surface; surface = new G4VTwistSurface*[1];
+- surface[0] = r.surface[0];
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4ThreeVector vec;
+- G4VTwistSurface **surface;
+- };
+-
+- class LastValue // last G4double value
+- {
+- public:
+- LastValue()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- value = DBL_MAX;
+- }
+- ~LastValue()= default;
+- LastValue(const LastValue& r) = default;
+- LastValue& operator=(const LastValue& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; value = r.value;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4double value;
+- };
+-
+- class LastValueWithDoubleVector // last G4double value
+- {
+- public:
+- LastValueWithDoubleVector()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- vec.set(kInfinity,kInfinity,kInfinity);
+- value = DBL_MAX;
+- }
+- ~LastValueWithDoubleVector()= default;
+- LastValueWithDoubleVector(const LastValueWithDoubleVector& r) = default;
+- LastValueWithDoubleVector& operator=(const LastValueWithDoubleVector& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; vec = r.vec; value = r.value;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4ThreeVector vec;
+- G4double value;
+- };
+-
+- LastState fLastInside;
+- LastVector fLastNormal;
+- LastValue fLastDistanceToIn;
+- LastValue fLastDistanceToOut;
+- LastValueWithDoubleVector fLastDistanceToInWithV;
+- LastValueWithDoubleVector fLastDistanceToOutWithV;
+ };
+
+ //=====================================================================
+diff --git a/source/geometry/solids/specific/include/G4VTwistedFaceted.hh b/source/geometry/solids/specific/include/G4VTwistedFaceted.hh
+index 3d58ba0b242bb4ddc900a3bf0dfd404252cc42e3..6c412c390d0bf780abfe68fdaa89ea76e3264f7c 100644
+--- a/source/geometry/solids/specific/include/G4VTwistedFaceted.hh
++++ b/source/geometry/solids/specific/include/G4VTwistedFaceted.hh
+@@ -190,110 +190,6 @@ class G4VTwistedFaceted: public G4VSolid
+ G4VTwistSurface* fSide180 ; // Twisted Side at phi = 180 deg
+ G4VTwistSurface* fSide270 ; // Twisted Side at phi = 270 deg
+
+- private:
+-
+- class LastState // last Inside result
+- {
+- public:
+- LastState()
+- {
+- p.set(kInfinity,kInfinity,kInfinity); inside = kOutside;
+- }
+- ~LastState()= default;
+- LastState(const LastState& r) = default;
+- LastState& operator=(const LastState& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; inside = r.inside;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- EInside inside;
+- };
+-
+- class LastVector // last SurfaceNormal result
+- {
+- public:
+- LastVector()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- vec.set(kInfinity,kInfinity,kInfinity);
+- surface = new G4VTwistSurface*[1];
+- }
+- ~LastVector()
+- {
+- delete [] surface;
+- }
+- LastVector(const LastVector& r) : p(r.p), vec(r.vec)
+- {
+- surface = new G4VTwistSurface*[1];
+- surface[0] = r.surface[0];
+- }
+- LastVector& operator=(const LastVector& r)
+- {
+- if (&r == this) { return *this; }
+- p = r.p; vec = r.vec;
+- delete [] surface; surface = new G4VTwistSurface*[1];
+- surface[0] = r.surface[0];
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4ThreeVector vec;
+- G4VTwistSurface **surface;
+- };
+-
+- class LastValue // last G4double value
+- {
+- public:
+- LastValue()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- value = DBL_MAX;
+- }
+- ~LastValue()= default;
+- LastValue(const LastValue& r) = default;
+- LastValue& operator=(const LastValue& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; value = r.value;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4double value;
+- };
+-
+- class LastValueWithDoubleVector // last G4double value
+- {
+- public:
+- LastValueWithDoubleVector()
+- {
+- p.set(kInfinity,kInfinity,kInfinity);
+- vec.set(kInfinity,kInfinity,kInfinity);
+- value = DBL_MAX;
+- }
+- ~LastValueWithDoubleVector()= default;
+- LastValueWithDoubleVector(const LastValueWithDoubleVector& r) = default;
+- LastValueWithDoubleVector& operator=(const LastValueWithDoubleVector& r)
+- {
+- if (this == &r) { return *this; }
+- p = r.p; vec = r.vec; value = r.value;
+- return *this;
+- }
+- public:
+- G4ThreeVector p;
+- G4ThreeVector vec;
+- G4double value;
+- };
+-
+- LastState fLastInside;
+- LastVector fLastNormal;
+- LastValue fLastDistanceToIn;
+- LastValue fLastDistanceToOut;
+- LastValueWithDoubleVector fLastDistanceToInWithV;
+- LastValueWithDoubleVector fLastDistanceToOutWithV;
+ };
+
+ //=====================================================================
+diff --git a/source/geometry/solids/specific/src/G4TwistedTubs.cc b/source/geometry/solids/specific/src/G4TwistedTubs.cc
+index 60dea7239081e58af194ecbe6cdeb33781a069b3..e8e414fabd74ecd1e2ed83ee8c072b932e9ae6dd 100644
+--- a/source/geometry/solids/specific/src/G4TwistedTubs.cc
++++ b/source/geometry/solids/specific/src/G4TwistedTubs.cc
+@@ -56,6 +56,7 @@ namespace
+ G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
+ }
+
++
+ //=====================================================================
+ //* constructors ------------------------------------------------------
+
+@@ -223,12 +224,7 @@ G4TwistedTubs::G4TwistedTubs(const G4TwistedTubs& rhs)
+ fTanOuterStereo2(rhs.fTanOuterStereo2),
+ fLowerEndcap(nullptr), fUpperEndcap(nullptr), fLatterTwisted(nullptr), fFormerTwisted(nullptr),
+ fInnerHype(nullptr), fOuterHype(nullptr),
+- fCubicVolume(rhs.fCubicVolume), fSurfaceArea(rhs.fSurfaceArea),
+- fLastInside(rhs.fLastInside), fLastNormal(rhs.fLastNormal),
+- fLastDistanceToIn(rhs.fLastDistanceToIn),
+- fLastDistanceToOut(rhs.fLastDistanceToOut),
+- fLastDistanceToInWithV(rhs.fLastDistanceToInWithV),
+- fLastDistanceToOutWithV(rhs.fLastDistanceToOutWithV)
++ fCubicVolume(rhs.fCubicVolume), fSurfaceArea(rhs.fSurfaceArea)
+ {
+ for (auto i=0; i<2; ++i)
+ {
+@@ -268,11 +264,6 @@ G4TwistedTubs& G4TwistedTubs::operator = (const G4TwistedTubs& rhs)
+ fLowerEndcap= fUpperEndcap= fLatterTwisted= fFormerTwisted= nullptr;
+ fInnerHype= fOuterHype= nullptr;
+ fCubicVolume= rhs.fCubicVolume; fSurfaceArea= rhs.fSurfaceArea;
+- fLastInside= rhs.fLastInside; fLastNormal= rhs.fLastNormal;
+- fLastDistanceToIn= rhs.fLastDistanceToIn;
+- fLastDistanceToOut= rhs.fLastDistanceToOut;
+- fLastDistanceToInWithV= rhs.fLastDistanceToInWithV;
+- fLastDistanceToOutWithV= rhs.fLastDistanceToOutWithV;
+
+ for (auto i=0; i<2; ++i)
+ {
+@@ -381,44 +372,32 @@ EInside G4TwistedTubs::Inside(const G4ThreeVector& p) const
+ // G4Timer timer(timerid, "G4TwistedTubs", "Inside");
+ // timer.Start();
+
+- G4ThreeVector *tmpp;
+- EInside *tmpinside;
+- if (fLastInside.p == p)
+- {
+- return fLastInside.inside;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastInside.p));
+- tmpinside = const_cast<EInside*>(&(fLastInside.inside));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+
+ EInside outerhypearea = ((G4TwistTubsHypeSide *)fOuterHype)->Inside(p);
+ G4double innerhyperho = ((G4TwistTubsHypeSide *)fInnerHype)->GetRhoAtPZ(p);
+ G4double distanceToOut = p.getRho() - innerhyperho; // +ve: inside
+-
++ EInside tmpinside;
+ if ((outerhypearea == kOutside) || (distanceToOut < -halftol))
+ {
+- *tmpinside = kOutside;
++ tmpinside = kOutside;
+ }
+ else if (outerhypearea == kSurface)
+ {
+- *tmpinside = kSurface;
++ tmpinside = kSurface;
+ }
+ else
+ {
+ if (distanceToOut <= halftol)
+ {
+- *tmpinside = kSurface;
++ tmpinside = kSurface;
+ }
+ else
+ {
+- *tmpinside = kInside;
++ tmpinside = kInside;
+ }
+ }
+
+- return fLastInside.inside;
++ return tmpinside;
+ }
+
+ //=====================================================================
+@@ -433,14 +412,6 @@ G4ThreeVector G4TwistedTubs::SurfaceNormal(const G4ThreeVector& p) const
+ // Which of the three or four surfaces are we closest to?
+ //
+
+- if (fLastNormal.p == p)
+- {
+- return fLastNormal.vec;
+- }
+- auto tmpp = const_cast<G4ThreeVector*>(&(fLastNormal.p));
+- auto tmpnormal = const_cast<G4ThreeVector*>(&(fLastNormal.vec));
+- auto tmpsurface = const_cast<G4VTwistSurface**>(fLastNormal.surface);
+- tmpp->set(p.x(), p.y(), p.z());
+
+ G4double distance = kInfinity;
+
+@@ -466,10 +437,7 @@ G4ThreeVector G4TwistedTubs::SurfaceNormal(const G4ThreeVector& p) const
+ }
+ }
+
+- tmpsurface[0] = surfaces[besti];
+- *tmpnormal = tmpsurface[0]->GetNormal(bestxx, true);
+-
+- return fLastNormal.vec;
++ return surfaces[besti]->GetNormal(bestxx, true);
+ }
+
+ //=====================================================================
+@@ -485,26 +453,6 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p,
+ // The function returns kInfinity if no intersection or
+ // just grazing within tolerance.
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4ThreeVector* tmpv;
+- G4double* tmpdist;
+- if ((fLastDistanceToInWithV.p == p) && (fLastDistanceToInWithV.vec == v))
+- {
+- return fLastDistanceToIn.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.p));
+- tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.vec));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToInWithV.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- tmpv->set(v.x(), v.y(), v.z());
+- }
+-
+ //
+ // Calculate DistanceToIn(p,v)
+ //
+@@ -524,8 +472,7 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p,
+ G4ThreeVector normal = SurfaceNormal(p);
+ if (normal*v < 0)
+ {
+- *tmpdist = 0.;
+- return fLastDistanceToInWithV.value;
++ return 0;
+ }
+ }
+ }
+@@ -557,9 +504,7 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p,
+ bestxx = xx;
+ }
+ }
+- *tmpdist = distance;
+-
+- return fLastDistanceToInWithV.value;
++ return distance;
+ }
+
+ //=====================================================================
+@@ -570,23 +515,6 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p) const
+ // DistanceToIn(p):
+ // Calculate distance to surface of shape from `outside',
+ // allowing for tolerance
+-
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4double* tmpdist;
+- if (fLastDistanceToIn.p == p)
+- {
+- return fLastDistanceToIn.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToIn.p));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToIn.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+
+ //
+ // Calculate DistanceToIn(p)
+@@ -600,8 +528,7 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p) const
+ {}
+ case (kSurface) :
+ {
+- *tmpdist = 0.;
+- return fLastDistanceToIn.value;
++ return 0;
+ }
+ case (kOutside) :
+ {
+@@ -628,8 +555,7 @@ G4double G4TwistedTubs::DistanceToIn (const G4ThreeVector& p) const
+ bestxx = xx;
+ }
+ }
+- *tmpdist = distance;
+- return fLastDistanceToIn.value;
++ return distance;
+ }
+ default :
+ {
+@@ -656,32 +582,11 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p,
+ // The function returns kInfinity if no intersection or
+ // just grazing within tolerance.
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4ThreeVector* tmpv;
+- G4double* tmpdist;
+- if ((fLastDistanceToOutWithV.p == p) && (fLastDistanceToOutWithV.vec == v) )
+- {
+- return fLastDistanceToOutWithV.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.p));
+- tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.vec));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToOutWithV.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- tmpv->set(v.x(), v.y(), v.z());
+- }
+-
+ //
+ // Calculate DistanceToOut(p,v)
+ //
+
+ EInside currentside = Inside(p);
+-
+ if (currentside == kOutside)
+ {
+ }
+@@ -693,16 +598,14 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p,
+ // If the particle is exiting from the volume, return 0.
+ //
+ G4ThreeVector normal = SurfaceNormal(p);
+- G4VTwistSurface *blockedsurface = fLastNormal.surface[0];
+ if (normal*v > 0)
+ {
+ if (calcNorm)
+ {
+- *norm = (blockedsurface->GetNormal(p, true));
+- *validNorm = blockedsurface->IsValidNorm();
++ *norm = normal;
++ *validNorm = true;
+ }
+- *tmpdist = 0.;
+- return fLastDistanceToOutWithV.value;
++ return 0;
+ }
+ }
+ }
+@@ -746,9 +649,7 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p,
+ }
+ }
+
+- *tmpdist = distance;
+-
+- return fLastDistanceToOutWithV.value;
++ return distance;
+ }
+
+
+@@ -761,23 +662,6 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p ) const
+ // Calculate distance to surface of shape from `inside',
+ // allowing for tolerance
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4double* tmpdist;
+- if (fLastDistanceToOut.p == p)
+- {
+- return fLastDistanceToOut.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOut.p));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToOut.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+-
+ //
+ // Calculate DistanceToOut(p)
+ //
+@@ -791,8 +675,7 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p ) const
+ }
+ case (kSurface) :
+ {
+- *tmpdist = 0.;
+- return fLastDistanceToOut.value;
++ return 0;
+ }
+ case (kInside) :
+ {
+@@ -819,9 +702,7 @@ G4double G4TwistedTubs::DistanceToOut( const G4ThreeVector& p ) const
+ bestxx = xx;
+ }
+ }
+- *tmpdist = distance;
+-
+- return fLastDistanceToOut.value;
++ return distance;
+ }
+ default :
+ {
+diff --git a/source/geometry/solids/specific/src/G4VTwistedFaceted.cc b/source/geometry/solids/specific/src/G4VTwistedFaceted.cc
+index b8d5c74539453e7a5a5f99623c5e4c9477ff8014..5a524e3398509d340955028835cdf6d52b70b66b 100644
+--- a/source/geometry/solids/specific/src/G4VTwistedFaceted.cc
++++ b/source/geometry/solids/specific/src/G4VTwistedFaceted.cc
+@@ -54,6 +54,7 @@ namespace
+ G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
+ }
+
++
+ //=====================================================================
+ //* constructors ------------------------------------------------------
+
+@@ -222,12 +223,7 @@ G4VTwistedFaceted::G4VTwistedFaceted(const G4VTwistedFaceted& rhs)
+ fDx3(rhs.fDx3), fDx4(rhs.fDx4), fDz(rhs.fDz), fDx(rhs.fDx), fDy(rhs.fDy),
+ fAlph(rhs.fAlph), fTAlph(rhs.fTAlph), fdeltaX(rhs.fdeltaX),
+ fdeltaY(rhs.fdeltaY), fPhiTwist(rhs.fPhiTwist), fLowerEndcap(nullptr),
+- fUpperEndcap(nullptr), fSide0(nullptr), fSide90(nullptr), fSide180(nullptr), fSide270(nullptr),
+- fLastInside(rhs.fLastInside), fLastNormal(rhs.fLastNormal),
+- fLastDistanceToIn(rhs.fLastDistanceToIn),
+- fLastDistanceToOut(rhs.fLastDistanceToOut),
+- fLastDistanceToInWithV(rhs.fLastDistanceToInWithV),
+- fLastDistanceToOutWithV(rhs.fLastDistanceToOutWithV)
++ fUpperEndcap(nullptr), fSide0(nullptr), fSide90(nullptr), fSide180(nullptr), fSide270(nullptr)
+ {
+ CreateSurfaces();
+ }
+@@ -257,11 +253,6 @@ G4VTwistedFaceted& G4VTwistedFaceted::operator = (const G4VTwistedFaceted& rhs)
+ fCubicVolume= rhs.fCubicVolume; fSurfaceArea= rhs.fSurfaceArea;
+ fRebuildPolyhedron = false;
+ delete fpPolyhedron; fpPolyhedron = nullptr;
+- fLastInside= rhs.fLastInside; fLastNormal= rhs.fLastNormal;
+- fLastDistanceToIn= rhs.fLastDistanceToIn;
+- fLastDistanceToOut= rhs.fLastDistanceToOut;
+- fLastDistanceToInWithV= rhs.fLastDistanceToInWithV;
+- fLastDistanceToOutWithV= rhs.fLastDistanceToOutWithV;
+
+ CreateSurfaces();
+
+@@ -347,20 +338,7 @@ G4VTwistedFaceted::CalculateExtent( const EAxis pAxis,
+ EInside G4VTwistedFaceted::Inside(const G4ThreeVector& p) const
+ {
+
+- G4ThreeVector *tmpp;
+- EInside *tmpin;
+- if (fLastInside.p == p)
+- {
+- return fLastInside.inside;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastInside.p));
+- tmpin = const_cast<EInside*>(&(fLastInside.inside));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+-
+- *tmpin = kOutside ;
++ EInside tmpin = kOutside ;
+
+ G4double phi = p.z()/(2*fDz) * fPhiTwist ; // rotate the point to z=0
+ G4double cphi = std::cos(-phi) ;
+@@ -414,13 +392,13 @@ EInside G4VTwistedFaceted::Inside(const G4ThreeVector& p) const
+ if ( posy <= yMax - kCarTolerance*0.5
+ && posy >= yMin + kCarTolerance*0.5 )
+ {
+- if (std::fabs(posz) <= fDz - kCarTolerance*0.5 ) *tmpin = kInside ;
+- else if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) *tmpin = kSurface ;
++ if (std::fabs(posz) <= fDz - kCarTolerance*0.5 ) tmpin = kInside ;
++ else if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) tmpin = kSurface ;
+ }
+ else if ( posy <= yMax + kCarTolerance*0.5
+ && posy >= yMin - kCarTolerance*0.5 )
+ {
+- if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) *tmpin = kSurface ;
++ if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) tmpin = kSurface ;
+ }
+ }
+ else if ( posx <= xMax + kCarTolerance*0.5
+@@ -429,15 +407,15 @@ EInside G4VTwistedFaceted::Inside(const G4ThreeVector& p) const
+ if ( posy <= yMax + kCarTolerance*0.5
+ && posy >= yMin - kCarTolerance*0.5 )
+ {
+- if (std::fabs(posz) <= fDz + kCarTolerance*0.5) *tmpin = kSurface ;
++ if (std::fabs(posz) <= fDz + kCarTolerance*0.5) tmpin = kSurface ;
+ }
+ }
+
+ #ifdef G4TWISTDEBUG
+- G4cout << "inside = " << fLastInside.inside << G4endl ;
++ G4cout << "inside = " << tmpin << G4endl ;
+ #endif
+
+- return fLastInside.inside;
++ return tmpin;
+
+ }
+
+@@ -454,15 +432,6 @@ G4ThreeVector G4VTwistedFaceted::SurfaceNormal(const G4ThreeVector& p) const
+ // Which of the three or four surfaces are we closest to?
+ //
+
+- if (fLastNormal.p == p)
+- {
+- return fLastNormal.vec;
+- }
+-
+- auto tmpp = const_cast<G4ThreeVector*>(&(fLastNormal.p));
+- auto tmpnormal = const_cast<G4ThreeVector*>(&(fLastNormal.vec));
+- auto tmpsurface = const_cast<G4VTwistSurface**>(fLastNormal.surface);
+- tmpp->set(p.x(), p.y(), p.z());
+
+ G4double distance = kInfinity;
+
+@@ -490,10 +459,7 @@ G4ThreeVector G4VTwistedFaceted::SurfaceNormal(const G4ThreeVector& p) const
+ }
+ }
+
+- tmpsurface[0] = surfaces[besti];
+- *tmpnormal = tmpsurface[0]->GetNormal(bestxx, true);
+-
+- return fLastNormal.vec;
++ return surfaces[besti]->GetNormal(bestxx, true);
+ }
+
+
+@@ -510,26 +476,6 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p,
+ // The function returns kInfinity if no intersection or
+ // just grazing within tolerance.
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4ThreeVector* tmpv;
+- G4double* tmpdist;
+- if (fLastDistanceToInWithV.p == p && fLastDistanceToInWithV.vec == v)
+- {
+- return fLastDistanceToIn.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.p));
+- tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.vec));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToInWithV.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- tmpv->set(v.x(), v.y(), v.z());
+- }
+-
+ //
+ // Calculate DistanceToIn(p,v)
+ //
+@@ -547,8 +493,7 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p,
+ G4ThreeVector normal = SurfaceNormal(p);
+ if (normal*v < 0)
+ {
+- *tmpdist = 0.;
+- return fLastDistanceToInWithV.value;
++ return 0;
+ }
+ }
+
+@@ -574,7 +519,7 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p,
+ for (const auto & surface : surfaces)
+ {
+ #ifdef G4TWISTDEBUG
+- G4cout << G4endl << "surface " << i << ": " << G4endl << G4endl ;
++ G4cout << G4endl << "surface " << &surface - &*surfaces << ": " << G4endl << G4endl ;
+ #endif
+ G4double tmpdistance = surface->DistanceToIn(p, v, xx);
+ #ifdef G4TWISTDEBUG
+@@ -592,9 +537,8 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p,
+ G4cout << "best distance = " << distance << G4endl ;
+ #endif
+
+- *tmpdist = distance;
+ // timer.Stop();
+- return fLastDistanceToInWithV.value;
++ return distance;
+ }
+
+
+@@ -608,23 +552,6 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p) const
+ // allowing for tolerance
+ //
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4double* tmpdist;
+- if (fLastDistanceToIn.p == p)
+- {
+- return fLastDistanceToIn.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToIn.p));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToIn.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+-
+ //
+ // Calculate DistanceToIn(p)
+ //
+@@ -639,8 +566,7 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p) const
+
+ case (kSurface) :
+ {
+- *tmpdist = 0.;
+- return fLastDistanceToIn.value;
++ return 0;
+ }
+
+ case (kOutside) :
+@@ -671,8 +597,7 @@ G4double G4VTwistedFaceted::DistanceToIn (const G4ThreeVector& p) const
+ bestxx = xx;
+ }
+ }
+- *tmpdist = distance;
+- return fLastDistanceToIn.value;
++ return distance;
+ }
+
+ default:
+@@ -702,26 +627,6 @@ G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p,
+ // The function returns kInfinity if no intersection or
+ // just grazing within tolerance.
+
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4ThreeVector* tmpv;
+- G4double* tmpdist;
+- if (fLastDistanceToOutWithV.p == p && fLastDistanceToOutWithV.vec == v )
+- {
+- return fLastDistanceToOutWithV.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.p));
+- tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.vec));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToOutWithV.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- tmpv->set(v.x(), v.y(), v.z());
+- }
+-
+ //
+ // Calculate DistanceToOut(p,v)
+ //
+@@ -737,17 +642,15 @@ G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p,
+ // if the particle is exiting from the volume, return 0
+ //
+ G4ThreeVector normal = SurfaceNormal(p);
+- G4VTwistSurface *blockedsurface = fLastNormal.surface[0];
+ if (normal*v > 0)
+ {
+ if (calcNorm)
+ {
+- *norm = (blockedsurface->GetNormal(p, true));
+- *validNorm = blockedsurface->IsValidNorm();
++ *norm = normal;
++ *validNorm = true;
+ }
+- *tmpdist = 0.;
+ // timer.Stop();
+- return fLastDistanceToOutWithV.value;
++ return 0;
+ }
+ }
+
+@@ -789,8 +692,7 @@ G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p,
+ }
+ }
+
+- *tmpdist = distance;
+- return fLastDistanceToOutWithV.value;
++ return distance;
+ }
+
+
+@@ -802,24 +704,6 @@ G4double G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p ) const
+ // DistanceToOut(p):
+ // Calculate distance to surface of shape from `inside',
+ // allowing for tolerance
+-
+- //
+- // checking last value
+- //
+-
+- G4ThreeVector* tmpp;
+- G4double* tmpdist;
+-
+- if (fLastDistanceToOut.p == p)
+- {
+- return fLastDistanceToOut.value;
+- }
+- else
+- {
+- tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOut.p));
+- tmpdist = const_cast<G4double*>(&(fLastDistanceToOut.value));
+- tmpp->set(p.x(), p.y(), p.z());
+- }
+
+ //
+ // Calculate DistanceToOut(p)
+@@ -848,8 +732,7 @@ G4double G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p ) const
+ }
+ case (kSurface) :
+ {
+- *tmpdist = 0.;
+- retval = fLastDistanceToOut.value;
++ retval = 0;
+ break;
+ }
+
+@@ -881,9 +764,7 @@ G4double G4VTwistedFaceted::DistanceToOut( const G4ThreeVector& p ) const
+ bestxx = xx;
+ }
+ }
+- *tmpdist = distance;
+-
+- retval = fLastDistanceToOut.value;
++ retval = distance;
+ break;
+ }
+
diff --git a/var/spack/repos/builtin/packages/gearshifft/package.py b/var/spack/repos/builtin/packages/gearshifft/package.py
index c9cc7b7586..3f25b066f5 100644
--- a/var/spack/repos/builtin/packages/gearshifft/package.py
+++ b/var/spack/repos/builtin/packages/gearshifft/package.py
@@ -18,6 +18,8 @@ class Gearshifft(CMakePackage):
version("0.4.0", sha256="15b9e4bfa1d9b4fe4ae316f289c67b7be0774cdada5bd7310df4d0e026d9d227")
+ depends_on("cxx", type="build") # generated
+
# gearshifft used the variable name `CMAKE_DEFAULT_BUILD_TYPE` which was
# later introduced by CMake leading to an error in newer CMake versions.
# This patch renames the variable to `GEARSHIFFT_DEFAULT_BUILD_TYPE`.
diff --git a/var/spack/repos/builtin/packages/gegelati/package.py b/var/spack/repos/builtin/packages/gegelati/package.py
index 4558126bb1..6f5226a325 100644
--- a/var/spack/repos/builtin/packages/gegelati/package.py
+++ b/var/spack/repos/builtin/packages/gegelati/package.py
@@ -19,6 +19,9 @@ class Gegelati(CMakePackage):
version("1.2.0", sha256="039997c7d6cb394f910f6c40620165b32094e0c85c170be01eb74b55488a1d4c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sdl2")
depends_on("doxygen")
diff --git a/var/spack/repos/builtin/packages/gegl/package.py b/var/spack/repos/builtin/packages/gegl/package.py
index 7005968e7d..d969ef3cea 100644
--- a/var/spack/repos/builtin/packages/gegl/package.py
+++ b/var/spack/repos/builtin/packages/gegl/package.py
@@ -28,6 +28,9 @@ class Gegl(MesonPackage):
version("0.4.34", sha256="ef63f0bca5b431c6119addd834ca7fbb507c900c4861c57b3667b6f4ccfcaaaa")
version("0.4.32", sha256="668e3c6b9faf75fb00512701c36274ab6f22a8ba05ec62dbf187d34b8d298fa1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("cmake@3.4:", type="build")
depends_on("babl")
diff --git a/var/spack/repos/builtin/packages/gem5/package.py b/var/spack/repos/builtin/packages/gem5/package.py
new file mode 100644
index 0000000000..194d2743b7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gem5/package.py
@@ -0,0 +1,71 @@
+# Copyright 2013-2024 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 spack.config
+from spack.package import *
+
+
+class Gem5(SConsPackage):
+ """The gem5 simulator is a modular platform for computer-system
+ architecture research, encompassing system-level architecture as
+ well as processor microarchitecture. gem5 is a community led
+ project with an open governance model. gem5 was originally
+ conceived for computer architecture research in academia, but it
+ has grown to be used in computer system design by academia,
+ industry for research, and in teaching."""
+
+ homepage = "https://www.gem5.org"
+ git = "https://github.com/gem5/gem5"
+ url = "https://github.com/gem5/gem5/archive/refs/tags/v24.0.0.0.tar.gz"
+
+ version("24.0.0.1", tag="v24.0.0.1", commit="b1a44b89c7bae73fae2dc547bc1f871452075b85")
+ version("24.0.0.0", tag="v24.0.0.0", commit="43769abaf05120fed1e4e0cfbb34619edbc10f3f")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("scons", type="build")
+ depends_on("py-mypy", type="build")
+ depends_on("py-pybind11", type="build")
+ depends_on("python")
+ depends_on("gettext")
+ depends_on("hdf5+cxx")
+ depends_on("protobuf")
+ depends_on("gperftools")
+ depends_on("graphviz+pangocairo", type=("build", "run"))
+ depends_on("py-pydot", type=("build", "run"))
+ depends_on("capstone")
+
+ def patch(self):
+ filter_file(
+ " Environment(tools=[",
+ " Environment(ENV=os.environ, tools=[",
+ "SConstruct",
+ string=True,
+ )
+ filter_file(
+ """conf.env['CONF']['HAVE_PERF_ATTR_EXCLUDE_HOST'] = conf.CheckMember(""",
+ """conf.env['CONF']['HAVE_PERF_ATTR_EXCLUDE_HOST'] = bool(conf.CheckMember(""",
+ "src/cpu/kvm/SConsopts",
+ string=True,
+ )
+ filter_file(
+ """perf_event_attr', 'exclude_host')""",
+ """perf_event_attr', 'exclude_host'))""",
+ "src/cpu/kvm/SConsopts",
+ string=True,
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install("build/ALL/gem5.opt", prefix.bin)
+
+ def build_args(self, spec, prefix):
+ args = []
+ args.append("build/ALL/gem5.opt")
+ args.append(f"-j{spack.config.determine_number_of_jobs(parallel=True)}")
+ args.append("--ignore-style")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/gemma/package.py b/var/spack/repos/builtin/packages/gemma/package.py
index 6a43842e0f..c144364d9e 100644
--- a/var/spack/repos/builtin/packages/gemma/package.py
+++ b/var/spack/repos/builtin/packages/gemma/package.py
@@ -20,6 +20,8 @@ class Gemma(MakefilePackage):
version("0.98.5", sha256="3ed336deee29e370f96ec8f1a240f7b62550e57dcd1694245ce7ec8f42241677")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
# openblas is the default
# other lapack implementors can be made to work
diff --git a/var/spack/repos/builtin/packages/gemmlowp/package.py b/var/spack/repos/builtin/packages/gemmlowp/package.py
index cb56090e2e..e77e689b98 100644
--- a/var/spack/repos/builtin/packages/gemmlowp/package.py
+++ b/var/spack/repos/builtin/packages/gemmlowp/package.py
@@ -16,6 +16,8 @@ class Gemmlowp(Package):
version("a6f29d9ac", commit="a6f29d8ac48d63293f845f2253eccbf86bc28321")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
header_directories = (
"eight_bit_int_gemm",
diff --git a/var/spack/repos/builtin/packages/genemark-et/package.py b/var/spack/repos/builtin/packages/genemark-et/package.py
index 8a344157fe..0a65beaa62 100644
--- a/var/spack/repos/builtin/packages/genemark-et/package.py
+++ b/var/spack/repos/builtin/packages/genemark-et/package.py
@@ -62,8 +62,7 @@ class GenemarkEt(Package):
pattern = "^#!.*/usr/bin/perl"
repl = "#!{0}".format(self.spec["perl"].command.path)
files = glob.iglob("*.pl")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
def setup_run_environment(self, env):
env.prepend_path("PERL5LIB", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/generate-ninja/package.py b/var/spack/repos/builtin/packages/generate-ninja/package.py
new file mode 100644
index 0000000000..408152abc0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/generate-ninja/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GenerateNinja(Package):
+ """
+ A meta-build system that generates build files for Ninja.
+ This is a fork of the Google GN package with some minor features and bug fixes
+ """
+
+ homepage = "https://github.com/o-lim/generate-ninja"
+ url = "https://github.com/o-lim/generate-ninja/archive/refs/tags/v0.4.1.tar.gz"
+
+ license("BSD", checked_by="teaguesterling")
+
+ version("0.4.1", sha256="1b2bec9dd18602a4af9dc8782ca809e44305f1435d43c55f35ec9eec50ca7e9a")
+ version("0.4.0", sha256="3575ed41eec49fe756dbd2c402f70cd80ba2952cc59ce2091d0a82b7bd3ce8a0")
+ version("0.3.2", sha256="82e949c3970d77b28c9df7cf3f3df409798b65848e05ff415009e7e2118460a8")
+ version("0.3.1", sha256="ed0112b434b80c322fcc9203646eaef17c306a804bf2ff5e5df91677c4e58678")
+ version("0.3.0", sha256="e6091d34cfc6bc625bfad4bbdc001e10ed951651d0ae98785b509bdfadad6822")
+ version("0.2.2", sha256="3146bdef1db9dfdc2d48bb5ee5e8e4ef9642ebea7cf39c432681685db8a11c86")
+ version("0.2.1", sha256="bf27ddde69bd0791ce86bd3ab9ead51dcfb00d3f202168057b721fdc39d417c5")
+ version("0.2.0", sha256="6cfd6f4a2f6d656e8d5f64d7f03a575a569b2c0f662d1d828ee790c9d9c2be25")
+ version("0.1.0", sha256="eb94e0bb170416010d3efa296fce63e7fec19f1e3e9b5988b2418166ec068896")
+
+ depends_on("ninja")
+ depends_on("python", type="build")
+ depends_on("llvm+clang", type="build")
+
+ def setup_build_environment(self, env):
+ env.set("DEPLOY", "1")
+ env.set("CC", self.spec["llvm"].home.bin.clang)
+ env.set("CXX", self.spec["llvm"].home.bin.join("clang++"))
+
+ phases = ["configure", "build", "install"]
+ # build_targets = ["bootstrap", "gn"]
+ out_dir = "out"
+
+ def configure(self, spec, prefix):
+ python("build/gen.py")
+
+ def build(self, spec, prefix):
+ ninja("-C", self.out_dir)
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install(join_path(self.out_dir, "gn"), prefix.bin.gn)
diff --git a/var/spack/repos/builtin/packages/generax/package.py b/var/spack/repos/builtin/packages/generax/package.py
index ef52f73e5b..74e0b1ec2e 100644
--- a/var/spack/repos/builtin/packages/generax/package.py
+++ b/var/spack/repos/builtin/packages/generax/package.py
@@ -24,6 +24,9 @@ class Generax(CMakePackage):
version("2.0.4", commit="e4fab40f407bdd3b588d3d69a449f8c1be56f9fa", submodules=True)
version("2.0.1", commit="0623dae55dd602a60faae63e9991fa8d41782456", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0.1:", type="build")
depends_on("mpi", when="+mpi")
depends_on("bison")
diff --git a/var/spack/repos/builtin/packages/genesis/package.py b/var/spack/repos/builtin/packages/genesis/package.py
index 485693084f..61ccc3dfe3 100644
--- a/var/spack/repos/builtin/packages/genesis/package.py
+++ b/var/spack/repos/builtin/packages/genesis/package.py
@@ -30,6 +30,9 @@ class Genesis(AutotoolsPackage, CudaPackage):
url="https://www.r-ccs.riken.jp/labs/cbrt/wp-content/uploads/2020/09/genesis-1.5.1.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
resource(
when="@1.6.0",
name="user_guide",
@@ -81,7 +84,7 @@ class Genesis(AutotoolsPackage, CudaPackage):
options.extend(self.enable_or_disable("openmp"))
options.extend(self.enable_or_disable("single"))
options.extend(self.enable_or_disable("hmdisk"))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
options.append("--enable-gpu")
options.append("--with-cuda=%s" % spec["cuda"].prefix)
else:
@@ -96,7 +99,7 @@ class Genesis(AutotoolsPackage, CudaPackage):
env.set("CC", self.spec["mpi"].mpicc, force=True)
env.set("CXX", self.spec["mpi"].mpicxx, force=True)
env.set("LAPACK_LIBS", self.spec["lapack"].libs.ld_flags)
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
cuda_gencode = " ".join(self.cuda_flags(cuda_arch))
env.set("NVCCFLAGS", cuda_gencode)
@@ -114,4 +117,4 @@ class Genesis(AutotoolsPackage, CudaPackage):
def cache_test_sources(self):
"""Copy test files after the package is installed for test()."""
if self.spec.satisfies("@master"):
- self.cache_extra_test_sources(["tests"])
+ cache_extra_test_sources(self, ["tests"])
diff --git a/var/spack/repos/builtin/packages/genfit/package.py b/var/spack/repos/builtin/packages/genfit/package.py
index c4e7f4b441..dad4a85e7b 100644
--- a/var/spack/repos/builtin/packages/genfit/package.py
+++ b/var/spack/repos/builtin/packages/genfit/package.py
@@ -30,6 +30,8 @@ class Genfit(CMakePackage):
# Untagged version from 2017-06-23 known to work with root@6.16.00
version("b496504a", sha256="e1582b35782118ade08498adc03f3fda01979ff8bed61e0520edae46d7bfe477")
+ depends_on("cxx", type="build") # generated
+
depends_on("root")
depends_on("root@:6.16.00", when="@b496504a")
depends_on("eigen")
diff --git a/var/spack/repos/builtin/packages/gengeo/package.py b/var/spack/repos/builtin/packages/gengeo/package.py
index 6c0f3c6be2..a580a7aa90 100644
--- a/var/spack/repos/builtin/packages/gengeo/package.py
+++ b/var/spack/repos/builtin/packages/gengeo/package.py
@@ -23,6 +23,8 @@ class Gengeo(AutotoolsPackage):
version("163", sha256="9c896d430d8f315a45379d2b82e7d374f36259af66a745bfdee4c022a080d34d")
+ depends_on("cxx", type="build") # generated
+
extends("python")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/gengetopt/package.py b/var/spack/repos/builtin/packages/gengetopt/package.py
index b445d8b23a..ed184b6d5b 100644
--- a/var/spack/repos/builtin/packages/gengetopt/package.py
+++ b/var/spack/repos/builtin/packages/gengetopt/package.py
@@ -27,6 +27,9 @@ class Gengetopt(AutotoolsPackage):
version("2.21", sha256="355a32310b2fee5e7289d6d6e89eddd13275a7c85a243dc5dd293a6cb5bb047e")
version("2.20", sha256="4c8b3b42cecff579f5f9de5ccad47e0849e0245e325a04ff5985c248141af1a4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("texinfo", type="build")
parallel = False
diff --git a/var/spack/repos/builtin/packages/genie/package.py b/var/spack/repos/builtin/packages/genie/package.py
index bb9af9dbdd..1e949c8970 100644
--- a/var/spack/repos/builtin/packages/genie/package.py
+++ b/var/spack/repos/builtin/packages/genie/package.py
@@ -22,6 +22,7 @@ class Genie(Package):
maintainers("davehadley")
version("master", branch="master")
+ version("3.4.2", sha256="c5935aea86d2ba9897ab55bb581622c561575957d19e572691d3bc0833ed9512")
version("3.0.6", sha256="ab56ea85d0c1d09029254365bfe75a1427effa717389753b9e0c1b6c2eaa5eaf")
version("3.0.4", sha256="53f034618fef9f7f0e17d1c4ed72743e4bba590e824b795177a1a8a8486c861e")
version("3.0.2", sha256="34d6c37017b2387c781aea7bc727a0aac0ef45d6b3f3982cc6f3fc82493f65c3")
@@ -43,6 +44,8 @@ class Genie(Package):
version("2.9.0", sha256="8229beb73f65f5af86a77bf141acfbe4a8b68cba9d797aae083a929906f6f2a2")
version("2.8.6", sha256="310dc8e0d17a65e6b9773e398250703a3a6f94ceafe94f599ae0f7b3fecf7e6c")
+ depends_on("cxx", type="build") # generated
+
depends_on("root+pythia6")
depends_on("pythia6")
depends_on("lhapdf", when="@3:")
@@ -58,7 +61,11 @@ class Genie(Package):
# GENIE Makefile's think that the spack compiler is invalid.
# Disables this check.
patch("genie_disable_gopt_with_compiler_check.patch", level=0, when="@2.11:")
-
+ patch(
+ "https://patch-diff.githubusercontent.com/raw/GENIE-MC/Generator/pull/376.patch?full_index=1",
+ sha256="7eca9bf44251cd99edd962483ca24c5072f8e2eee688f1e95b076425f2dc59f6",
+ when="@3.4.2",
+ )
# Flags for GENIE"s optional but disabled by default features
variant(
"atmo", default=False, description="Enable GENIE Atmospheric neutrino event generation app"
@@ -88,11 +95,9 @@ class Genie(Package):
def setup_build_environment(self, env):
env.set("GENIE", self.stage.source_path)
- return super().setup_build_environment(env)
def setup_run_environment(self, env):
env.set("GENIE", self.prefix)
- return super().setup_run_environment(env)
def install(self, spec, prefix):
configure = Executable("./configure")
@@ -132,17 +137,17 @@ class Genie(Package):
"--with-lhapdf6-inc=" + spec["lhapdf"].prefix.include,
"--with-lhapdf6-lib=" + spec["lhapdf"].prefix.lib,
]
- if "+vleextension" in self.spec:
+ if self.spec.satisfies("+vleextension"):
args += ["--enable-vle-extension"]
- if "+t2k" in self.spec:
+ if self.spec.satisfies("+t2k"):
args += ["--enable-t2k"]
- if "+fnal" in self.spec:
+ if self.spec.satisfies("+fnal"):
args += ["--enable-fnal"]
- if "+atmo" in self.spec:
+ if self.spec.satisfies("+atmo"):
args += ["--enable-atmo"]
- if "+nucleondecay" in self.spec:
+ if self.spec.satisfies("+nucleondecay"):
args += ["--enable-nucleon-decay"]
- if "+masterclass" in self.spec:
+ if self.spec.satisfies("+masterclass"):
args += ["--enable-masterclass"]
return args
diff --git a/var/spack/repos/builtin/packages/genomefinisher/package.py b/var/spack/repos/builtin/packages/genomefinisher/package.py
index e4c42ce2f6..2e1cce0f24 100644
--- a/var/spack/repos/builtin/packages/genomefinisher/package.py
+++ b/var/spack/repos/builtin/packages/genomefinisher/package.py
@@ -14,7 +14,7 @@ class Genomefinisher(Package):
assembly errors and organizes the contigs/scaffolds with genomes
references."""
- homepage = "http://gfinisher.sourceforge.net"
+ homepage = "https://gfinisher.sourceforge.net"
url = "https://sourceforge.net/projects/gfinisher/files/GenomeFinisher_1.4.zip"
version("1.4", sha256="8efbebaab4b577c72193f14c2c362b96fb949981fd66d2cca1364839af8bf1e3")
diff --git a/var/spack/repos/builtin/packages/genometools/package.py b/var/spack/repos/builtin/packages/genometools/package.py
index 7a3d299e2a..69cbd3cea3 100644
--- a/var/spack/repos/builtin/packages/genometools/package.py
+++ b/var/spack/repos/builtin/packages/genometools/package.py
@@ -15,10 +15,14 @@ class Genometools(MakefilePackage):
license("BSD-2-Clause")
+ version("1.6.5", sha256="f71b95c84761847223cd52a17d30ad9e6d55854448c2139fcd0aac437f73fbbe")
version("1.6.2", sha256="974825ddc42602bdce3d5fbe2b6e2726e7a35e81b532a0dc236f6e375d18adac")
version("1.6.1", sha256="528ca143a7f1d42af8614d60ea1e5518012913a23526d82e434f0dad2e2d863f")
version("1.5.9", sha256="bba8e043f097e7c72e823f73cb0efbd20bbd60f1ce797a0e4c0ab632b170c909")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("cairo+pdf")
depends_on("pango")
@@ -29,7 +33,7 @@ class Genometools(MakefilePackage):
patch("signed.patch", when="%fj")
def install(self, spec, prefix):
- make("install", "prefix=%s" % prefix)
+ make("install", f"prefix={prefix}")
def setup_dependent_build_environment(self, env, dependent_spec):
env.set("CPATH", self.prefix.include.genometools)
diff --git a/var/spack/repos/builtin/packages/genomeworks/package.py b/var/spack/repos/builtin/packages/genomeworks/package.py
index 59622cd79c..4128923dbc 100644
--- a/var/spack/repos/builtin/packages/genomeworks/package.py
+++ b/var/spack/repos/builtin/packages/genomeworks/package.py
@@ -43,6 +43,9 @@ class Genomeworks(CMakePackage, CudaPackage):
"0.2.0", tag="v0.2.0", commit="416af9f1817a4a70745b3f7cdb7418125159f75c", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.10.2:", type=("build"))
depends_on("cuda@11:", type=("build", "run"))
depends_on("python@3.6.7:", type=("build", "run"))
@@ -56,7 +59,7 @@ class Genomeworks(CMakePackage, CudaPackage):
def cmake_args(self):
args = []
spec = self.spec
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("-DWITH_CUDA=ON")
args.append("-Dgw_cuda_gen_all_arch=ON")
args.append("-DTHRUST_IGNORE_CUB_VERSION_CHECK=ON")
diff --git a/var/spack/repos/builtin/packages/genrich/package.py b/var/spack/repos/builtin/packages/genrich/package.py
index b36c194c92..6ddee5019d 100644
--- a/var/spack/repos/builtin/packages/genrich/package.py
+++ b/var/spack/repos/builtin/packages/genrich/package.py
@@ -17,6 +17,8 @@ class Genrich(MakefilePackage):
version("0.6.1", sha256="2c70239e1caf33519b9e99142470bb4dd2f4c69e71f68cee33d6d6a1032d0e33")
version("0.6", sha256="4c87aca8b7789f28b0c5c2c0ccea75668f19fa6a4cb38cd3c06d80ffd98d396f")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/geode/package.py b/var/spack/repos/builtin/packages/geode/package.py
index 51e8284356..bc1cb40498 100644
--- a/var/spack/repos/builtin/packages/geode/package.py
+++ b/var/spack/repos/builtin/packages/geode/package.py
@@ -15,14 +15,21 @@ class Geode(Package):
homepage = "https://geode.apache.org/"
url = "https://archive.apache.org/dist/geode/1.9.2/apache-geode-1.9.2.tgz"
+ list_url = "https://archive.apache.org/dist/geode/"
+ list_depth = 1
license("Apache-2.0")
- version("1.9.2", sha256="4b8118114ef43166f6bf73af56b93aadbf9108fcab06d1fbbb8e27f7d559d7e0")
- version("1.9.0", sha256="8794808ebc89bc855f0b989b32e91e890d446cfd058e123f6ccb9e12597c1c4f")
- version("1.8.0", sha256="58edc41edac4eabd899322b73a24727eac41f6253274c2ce7d0a82227121ae3e")
- version("1.7.0", sha256="91eec04420f46e949d32104479c4a4b5b34a4e5570dca7b98ca067a30d5a783d")
- version("1.6.0", sha256="79e8d81d058b1c4edd5fb414ff30ac530f7913b978f5abc899c353fcb06e5ef3")
+ version("1.15.1", sha256="2668970982d373ef42cff5076e7073b03e82c8e2fcd7757d5799b2506e265d57")
+ version("1.14.3", sha256="5efb1c71db34ba3b7ce1004579f8b9b7a43eae30f42c37837d5abd68c6d778bd")
+ version("1.13.8", sha256="b5fc105ce0a16aaf7ba341668e022d458b18d6d2c44705a8c79c42077c6d8229")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-37021
+ version("1.9.2", sha256="4b8118114ef43166f6bf73af56b93aadbf9108fcab06d1fbbb8e27f7d559d7e0")
+ version("1.9.0", sha256="8794808ebc89bc855f0b989b32e91e890d446cfd058e123f6ccb9e12597c1c4f")
+ version("1.8.0", sha256="58edc41edac4eabd899322b73a24727eac41f6253274c2ce7d0a82227121ae3e")
+ version("1.7.0", sha256="91eec04420f46e949d32104479c4a4b5b34a4e5570dca7b98ca067a30d5a783d")
+ version("1.6.0", sha256="79e8d81d058b1c4edd5fb414ff30ac530f7913b978f5abc899c353fcb06e5ef3")
depends_on("java", type="run")
diff --git a/var/spack/repos/builtin/packages/geoip-api-c/package.py b/var/spack/repos/builtin/packages/geoip-api-c/package.py
index d7d1dc5293..ee49ea2f5d 100644
--- a/var/spack/repos/builtin/packages/geoip-api-c/package.py
+++ b/var/spack/repos/builtin/packages/geoip-api-c/package.py
@@ -13,11 +13,13 @@ class GeoipApiC(AutotoolsPackage):
homepage = "https://github.com/maxmind/geoip-api-c"
url = "https://github.com/maxmind/geoip-api-c/archive/v1.6.12.tar.gz"
- license("LGPL-2.1-or-later")
+ license("LGPL-2.1-or-later", checked_by="wdconinc")
version("1.6.12", sha256="99b119f8e21e94f1dfd6d49fbeed29a70df1544896e76cd456f25e397b07d476")
- version("1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5")
- version("1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a")
+ version("1.6.11", sha256="8859cb7c9cb63e77f4aedb40a4622024359b956b251aba46b255acbe190c34e0")
+ version("1.6.10", sha256="de0d6d037d5e0ad9f7110e7f3b82eb20a24616712d29be0019e28ba7364cdc3e")
+
+ depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/geoip/package.py b/var/spack/repos/builtin/packages/geoip/package.py
index 2e3b028338..9a34a6953e 100644
--- a/var/spack/repos/builtin/packages/geoip/package.py
+++ b/var/spack/repos/builtin/packages/geoip/package.py
@@ -8,13 +8,23 @@ from spack.package import *
class Geoip(AutotoolsPackage):
"""Library for country/city/organization to IP address
- or hostname mapping."""
+ or hostname mapping. This package has been deprecated. Use geoip-api-c instead."""
- homepage = "http://www.maxmind.com/app/c"
+ homepage = "https://www.maxmind.com/app/c"
url = "https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz"
license("LGPL-2.1-or-later")
- version("1.6.12", sha256="1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80")
- version("1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5")
- version("1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a")
+ with default_args(deprecated=True):
+ # Note: use geoip-api-c instead
+ version(
+ "1.6.12", sha256="1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80"
+ )
+ version(
+ "1.6.11", sha256="b0e5a92200b5ab540d118983f7b7191caf4faf1ae879c44afa3ff2a2abcdb0f5"
+ )
+ version(
+ "1.6.10", sha256="cb44e0d0dbc45efe2e399e695864e58237ce00026fba8a74b31d85888c89c67a"
+ )
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/geomodel/package.py b/var/spack/repos/builtin/packages/geomodel/package.py
new file mode 100644
index 0000000000..9dd1b99a91
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geomodel/package.py
@@ -0,0 +1,96 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Geomodel(CMakePackage):
+ """GeoModel is a user-friendly C++ Toolkit and Suite for
+ HEP Detector Description with minimal dependencies."""
+
+ homepage = "https://gitlab.cern.ch/GeoModelDev/GeoModel"
+ url = "https://gitlab.cern.ch/GeoModelDev/GeoModel/-/archive/4.6.0/GeoModel-4.6.0.tar.bz2"
+ git = "https://gitlab.cern.ch/GeoModelDev/GeoModel"
+
+ maintainers("wdconinc", "stephenswat")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("6.6.0", sha256="3cefeaa409177d45d3fa63e069b6496ca062991b0d7d71275b1748487659e91b")
+ version("6.5.0", sha256="8a2f71493e54ea4d393f4c0075f3ca13df132f172c891825f3ab949cda052c5f")
+ version("6.4.0", sha256="369f91f021be83d294ba6a9bdbe00077625e9fe798a396aceece8970e7dd5838")
+ version("6.3.0", sha256="d2b101e06d20a8a3b638e6021f517a939f49ea6d8347ce40c927c27efe66b28c")
+ version("6.2.0", sha256="99bb3908bf710ce5ba0bcdd192942705a183a9f2886079df091dc69423b7bdf1")
+ version("6.1.0", sha256="2974f0e35e07cd44170d29ef106ec1ee50cb3fa3ba88382bea7394eb341dcd32")
+ version("6.0.0", sha256="7263d44ae2b99da9bc45cf0bbda64b2d8bdce1b350328fe41fce001d5266c3a1")
+ version("5.6.0", sha256="51e6570e119c2d3037b594779bb78d78b524c41132fac38d83ae162b5b6ffe54")
+ version("5.4.0", sha256="82cd08bea5791d862244211f8367cd6f5698b311e4862b2eb5584f835d551821")
+ version("5.3.0", sha256="d30c31f387716415542f3424a7f64ab62ef640a4e6f832243944918f7daca080")
+ version("5.1.0", sha256="bbe7d6ea46fe750d9421fb741b2340d16afcddbf5d6aeafab09d60577d55f93d")
+ version("4.6.0", sha256="d827dc79a5555fd7b09d1b670fc6f01f91476d0edf98ccd644c624f18fb729ca")
+
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "visualization", default=False, description="Enable the build of GeoModelVisualization"
+ )
+ variant("geomodelg4", default=False, description="Enable the build of GeoModelG4")
+ variant("fullsimlight", default=False, description="Enable the build of FullSimLight")
+ variant("fsl", default=False, description="Enable the build of FSL and FullSimLight")
+ variant("examples", default=False, description="Enable the build of GeoModelExamples")
+ variant("tools", default=False, description="Enable the build of GeoModelTools")
+ variant(
+ "hepmc3",
+ default=False,
+ description="Build GeoModel tools with support for the HepMC3 exchange format",
+ when="+fullsimlight",
+ )
+ variant(
+ "pythia",
+ default=False,
+ description="Build GeoModel tools with support for the Pythia event generator",
+ when="+fullsimlight",
+ )
+
+ variant(
+ "cxxstd",
+ default="17",
+ values=("17", "20", "23"),
+ multi=False,
+ description="Use the specified C++ standard when building",
+ )
+
+ conflicts("+fullsimlight", when="+fsl", msg="FSL triggers the build of the FullSimLight")
+
+ depends_on("cmake@3.16:", type="build")
+
+ depends_on("eigen@3.2.9:")
+ depends_on("nlohmann-json@3.6.1:")
+ depends_on("sqlite@3.7.17:")
+ depends_on("xerces-c@3.2.3:")
+
+ depends_on("geant4", when="+geomodelg4")
+ depends_on("geant4", when="+fullsimlight")
+ depends_on("hdf5+cxx", when="+fullsimlight")
+ depends_on("hepmc3", when="+hepmc3")
+ depends_on("pythia8", when="+pythia")
+ with when("+visualization"):
+ depends_on("hdf5+cxx")
+ depends_on("qt +gui +opengl +sql")
+ depends_on("coin3d")
+ depends_on("soqt")
+ depends_on("opengl")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("GEOMODEL_BUILD_VISUALIZATION", "visualization"),
+ self.define_from_variant("GEOMODEL_BUILD_GEOMODELG4", "geomodelg4"),
+ self.define_from_variant("GEOMODEL_BUILD_FULLSIMLIGHT", "fullsimlight"),
+ self.define_from_variant("GEOMODEL_BUILD_FSL", "fsl"),
+ self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"),
+ self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"),
+ self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/geopm-runtime/package.py b/var/spack/repos/builtin/packages/geopm-runtime/package.py
new file mode 100644
index 0000000000..74fb3736ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geopm-runtime/package.py
@@ -0,0 +1,168 @@
+# Copyright 2013-2023 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.package import *
+
+
+class GeopmRuntime(AutotoolsPackage):
+ """The Global Extensible Open Power Manager (GEOPM) Runtime is designed to
+ enhance energy efficiency of applications through active hardware
+ configuration."""
+
+ homepage = "https://geopm.github.io"
+ git = "https://github.com/geopm/geopm.git"
+ url = "https://github.com/geopm/geopm/tarball/v3.1.0"
+
+ maintainers("bgeltz", "cmcantalupo")
+ license("BSD-3-Clause")
+ tags = ["e4s"]
+
+ version("develop", branch="dev", get_full_repo=True)
+ version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e")
+ version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("debug", default=False, description="Enable debug")
+ variant("docs", default=False, when="@3.0.1", description="Create man pages with Sphinx")
+ variant("overhead", default=False, description="Track time spent in GEOPM API calls")
+ variant("beta", default=False, description="Enable beta features")
+ variant("mpi", default=True, description="Enable MPI dependent components")
+ variant("fortran", default=True, description="Build fortran interface")
+ variant("openmp", default=True, description="Build with OpenMP")
+ variant("ompt", default=True, description="Use OpenMP Tools Interface")
+ variant("gnu-ld", default=False, description="Assume C compiler uses gnu-ld")
+ variant("intel-mkl", default=True, description="Build with Intel MKL support")
+ variant(
+ "checkprogs",
+ default=False,
+ description='Build tests (use with "devbuild" or "install --keep-stage")',
+ )
+
+ conflicts("%gcc@:7.2", msg="Requires C++17 support")
+ conflicts("%clang@:4", msg="Requires C++17 support")
+ conflicts("%gcc", when="+ompt")
+
+ conflicts("platform=darwin", msg="Darwin is not supported")
+ conflicts("platform=windows", msg="Windows is not supported")
+
+ conflicts("target=aarch64:", msg="Only available on x86_64", when="@3.0.1")
+ conflicts("target=ppc64:", msg="Only available on x86_64", when="@3.0.1")
+ conflicts("target=ppc64le:", msg="Only available on x86_64", when="@3.0.1")
+
+ # Autotools dependencies
+ depends_on("automake", type="build")
+ depends_on("autoconf", type="build")
+ depends_on("libtool", type="build")
+ depends_on("file")
+
+ with when("@3.0.1"):
+ # Docs dependencies
+ # Moved to python3-geopm-doc as of v3.1
+ depends_on("doxygen", type="build", when="+docs")
+ depends_on("py-sphinx", type="build", when="+docs")
+ depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs")
+ depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs")
+ depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs")
+ depends_on("py-pygments@2.13.0:", type="build", when="+docs")
+
+ # Other Python dependencies - from scripts/setup.py
+ # Moved to python3-geopmdpy as of v3.1
+ depends_on("python@3.6:3", type=("build", "run"))
+ depends_on("py-setuptools@53.0.0:", type="build")
+ depends_on("py-cffi@1.14.5:", type="run")
+ depends_on("py-natsort@8.2.0:", type="run")
+ depends_on("py-numpy@1.19.5:", type="run")
+ depends_on("py-pandas@1.1.5:", type="run")
+ depends_on("py-tables@3.7.0:", type="run")
+ depends_on("py-psutil@5.8.0:", type="run")
+ depends_on("py-pyyaml@6.0:", type="run")
+ depends_on("py-docutils@0.18:", type="run", when="+checkprogs")
+
+ # Other dependencies
+ for ver in ["3.0.1", "3.1.0", "develop"]:
+ depends_on(f"geopm-service@{ver}", type=("build", "run"), when=f"@{ver}")
+ depends_on(f"py-geopmdpy@{ver}", type="run", when=f"@{ver}")
+ if ver != "3.0.1": # geopmpy integrated into autotools build until 3.1
+ depends_on(f"py-geopmpy@{ver}", type="run", when=f"@{ver}")
+ depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build")
+ depends_on("bash-completion")
+ depends_on("unzip")
+ depends_on("mpi@2.2:", when="+mpi")
+ depends_on("libelf")
+ depends_on("numactl", type="run", when="+checkprogs")
+ depends_on("stress-ng", type="run", when="+checkprogs")
+
+ # Intel dependencies
+ depends_on("intel-oneapi-mkl%oneapi", when="+intel-mkl")
+
+ extends("python")
+
+ @property
+ def configure_directory(self):
+ if self.version == Version("3.0.1"):
+ return "."
+ else:
+ return "libgeopm"
+
+ @property
+ def install_targets(self):
+ target = ["install"]
+ if self.spec.satisfies("+checkprogs"):
+ target += ["checkprogs"]
+ return target
+
+ def autoreconf(self, spec, prefix):
+ bash = which("bash")
+ with working_dir(self.configure_directory):
+ if not spec.version.isdevelop():
+ if self.version == Version("3.0.1"):
+ version_file = "VERSION_OVERRIDE"
+ else:
+ version_file = "VERSION"
+ # Required to workaround missing VERSION files
+ # from GitHub generated source tarballs
+ with open(version_file, "w") as fd:
+ fd.write(f"{spec.version}")
+ bash("./autogen.sh")
+
+ def configure_args(self):
+
+ with when("@3.0.1"):
+ args = [
+ "--with-bash-completion-dir="
+ + join_path(self.spec.prefix, "share", "bash-completion", "completions")
+ ]
+ args += ["--disable-geopmd-local", f"--with-geopmd={self.spec['geopm-service'].prefix}"]
+
+ args += self.enable_or_disable("debug")
+ args += self.enable_or_disable("docs")
+ args += self.enable_or_disable("overhead")
+ args += self.enable_or_disable("beta")
+ args += self.enable_or_disable("mpi")
+ args += self.enable_or_disable("fortran")
+ args += self.enable_or_disable("openmp")
+ args += self.enable_or_disable("ompt")
+ args += self.with_or_without("gnu-ld")
+
+ return args
+
+ def setup_run_environment(self, env):
+ # Required to ensure libgeopm.so
+ # can be used with LD_PRELOAD
+ if os.path.isdir(self.prefix.lib64):
+ lib_dir = self.prefix.lib64
+ else:
+ lib_dir = self.prefix.lib
+ env.prepend_path("LD_LIBRARY_PATH", lib_dir)
+
+ if self.spec.satisfies("+checkprogs"):
+ env.set("GEOPM_SOURCE", self.stage.source_path)
+ env.prepend_path("PYTHONPATH", self.stage.source_path)
+ env.set("GEOPM_INSTALL", self.prefix)
diff --git a/var/spack/repos/builtin/packages/geopm-service/0001-Support-NVML-via-CUDA-installation.patch b/var/spack/repos/builtin/packages/geopm-service/0001-Support-NVML-via-CUDA-installation.patch
new file mode 100644
index 0000000000..153e53809a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geopm-service/0001-Support-NVML-via-CUDA-installation.patch
@@ -0,0 +1,28 @@
+From cea9ceba3996e58af24c614c91a3d8721f0d8406 Mon Sep 17 00:00:00 2001
+From: Brad Geltz <brad.geltz@intel.com>
+Date: Thu, 14 Dec 2023 16:35:02 -0800
+Subject: [PATCH] Support NVML via CUDA installation
+
+Signed-off-by: Brad Geltz <brad.geltz@intel.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/service/configure.ac b/service/configure.ac
+index f9eb56d50..e8b523006 100644
+--- a/service/configure.ac
++++ b/service/configure.ac
+@@ -264,8 +264,8 @@ AC_ARG_WITH([nvml], [AS_HELP_STRING([--with-nvml=PATH],
+ [specify directory for installed nvml package.])])
+ if test "x$with_nvml" != x; then
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$with_nvml/include"
+- LD_LIBRARY_PATH="$with_nvml/lib64:$with_nvml/lib:$LD_LIBRARY_PATH"
+- AM_LDFLAGS="$AM_LDFLAGS -L$with_nvml/lib -L$with_nvml/lib64"
++ LD_LIBRARY_PATH="$with_nvml/lib64:$with_nvml/lib:$with_nvml/lib/stubs:$LD_LIBRARY_PATH"
++ AM_LDFLAGS="$AM_LDFLAGS -L$with_nvml/lib -L$with_nvml/lib64 -L$with_nvml/lib/stubs"
+ fi
+
+ AC_ARG_WITH([dcgm], [AS_HELP_STRING([--with-dcgm=PATH],
+--
+2.26.2
+
diff --git a/var/spack/repos/builtin/packages/geopm-service/package.py b/var/spack/repos/builtin/packages/geopm-service/package.py
new file mode 100644
index 0000000000..2bfaa68a00
--- /dev/null
+++ b/var/spack/repos/builtin/packages/geopm-service/package.py
@@ -0,0 +1,166 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GeopmService(AutotoolsPackage):
+ """The Global Extensible Open Power Manager (GEOPM) Service provides a
+ user interface for accessing hardware telemetry and settings securely.
+
+ Note: GEOPM interfaces with hardware using Model Specific Registers (MSRs).
+ For proper usage make sure MSRs are made available via the msr or
+ msr-safe kernel modules by your administrator."""
+
+ homepage = "https://geopm.github.io"
+ git = "https://github.com/geopm/geopm.git"
+ url = "https://github.com/geopm/geopm/tarball/v3.1.0"
+
+ maintainers("bgeltz", "cmcantalupo")
+ license("BSD-3-Clause")
+ tags = ["e4s"]
+
+ version("develop", branch="dev", get_full_repo=True)
+ version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e")
+ version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("debug", default=False, description="Enable debug")
+ variant("docs", default=True, when="@3.0.1", description="Create man pages with Sphinx")
+ variant("systemd", default=True, description="Enable use of systemd/DBus")
+ variant("liburing", default=True, description="Enables the use of liburing for batch I/O")
+ variant(
+ "libcap", default=True, description="Enables the use of libcap to do capabilities checks"
+ )
+ variant("gnu-ld", default=False, description="Assume C compiler uses gnu-ld")
+
+ variant("levelzero", default=False, description="Enables the use of oneAPI Level Zero loader")
+ variant("nvml", default=False, description="Enable NVML support")
+
+ variant(
+ "rawmsr",
+ default=True,
+ description="Enable direct use of standard msr device driver",
+ when="@develop",
+ )
+
+ conflicts("+nvml", when="+levelzero", msg="LevelZero and NVML support are mutually exclusive")
+
+ conflicts("%gcc@:7.2", msg="Requires C++17 support")
+ conflicts("%clang@:4", msg="Requires C++17 support")
+
+ conflicts("platform=darwin", msg="Darwin is not supported")
+ conflicts("platform=windows", msg="Windows is not supported")
+
+ conflicts("target=aarch64:", msg="Only available on x86_64", when="@3.0.1")
+ conflicts("target=ppc64:", msg="Only available on x86_64", when="@3.0.1")
+ conflicts("target=ppc64le:", msg="Only available on x86_64", when="@3.0.1")
+
+ patch("0001-Support-NVML-via-CUDA-installation.patch", when="+nvml")
+
+ # Autotools dependencies
+ depends_on("automake", type="build")
+ depends_on("autoconf", type="build")
+ depends_on("libtool", type="build")
+ depends_on("file")
+
+ with when("@3.0.1"):
+ # Docs dependencies
+ # Moved to python3-geopm-doc as of v3.1
+ depends_on("doxygen", type="build", when="+docs")
+ depends_on("py-docstring-parser@0.13.0:", type="build", when="+docs")
+ depends_on("py-sphinx", type="build", when="+docs")
+ depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs")
+ depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs")
+ depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs")
+ depends_on("py-pygments@2.13.0:", type="build", when="+docs")
+
+ # Other Python dependencies - from service/setup.py
+ # Moved to python3-geopmdpy as of v3.1
+ depends_on("py-setuptools@53.0.0:", type="build")
+ depends_on("py-dasbus@1.6.0:", type=("build", "run"))
+ depends_on("py-psutil@5.8.0:", type=("build", "run"))
+ depends_on("py-jsonschema@3.2.0:", type=("build", "run"))
+ depends_on("py-pyyaml@6.0:", type=("build", "run"))
+ depends_on("py-cffi@1.14.5:", type="run")
+
+ # Other dependencies
+ for ver in ["3.1.0", "develop"]:
+ depends_on(f"py-geopmdpy@{ver}", type="run", when=f"@{ver}")
+ depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build")
+ depends_on("bash-completion")
+ depends_on("unzip")
+ depends_on("systemd", when="+systemd")
+ depends_on("libcap", when="+libcap")
+ depends_on("liburing", when="+liburing")
+ depends_on("oneapi-level-zero", when="+levelzero")
+ depends_on("cuda", when="+nvml")
+
+ extends("python")
+
+ @property
+ def configure_directory(self):
+ if self.version == Version("3.0.1"):
+ return "service"
+ else:
+ return "libgeopmd"
+
+ def autoreconf(self, spec, prefix):
+ bash = which("bash")
+ with working_dir(self.configure_directory):
+ if not spec.version.isdevelop():
+ if self.version == Version("3.0.1"):
+ version_file = "VERSION_OVERRIDE"
+ else:
+ version_file = "VERSION"
+ # Required to workaround missing VERSION files
+ # from GitHub generated source tarballs
+ with open(version_file, "w") as fd:
+ fd.write(f"{spec.version}")
+ bash("./autogen.sh")
+
+ def configure_args(self):
+ args = [
+ "--with-bash-completion-dir="
+ + join_path(self.spec.prefix, "share", "bash-completion", "completions")
+ ]
+
+ args += self.enable_or_disable("debug")
+ args += self.enable_or_disable("docs")
+ args += self.enable_or_disable("systemd")
+ args += self.enable_or_disable("liburing")
+ args += self.with_or_without("liburing", activation_value="prefix")
+ args += self.enable_or_disable("libcap")
+ args += self.with_or_without("gnu-ld")
+
+ args += self.enable_or_disable("levelzero")
+ args += self.enable_or_disable("nvml")
+ if self.spec.satisfies("+nvml"):
+ args += [
+ "--with-nvml="
+ + join_path(
+ self.spec["cuda"].prefix, "targets", f"{self.spec.target.family}-linux"
+ )
+ ]
+
+ args += self.enable_or_disable("rawmsr")
+ with when("@develop"):
+ if self.spec.target.family != "x86_64":
+ args += ["--disable-cpuid"]
+ return args
+
+ def setup_run_environment(self, env):
+ # Required to ensure geopmdpy can load
+ # libgeopmd.so.2 via CFFI
+ if os.path.isdir(self.prefix.lib64):
+ lib_dir = self.prefix.lib64
+ else:
+ lib_dir = self.prefix.lib
+ env.prepend_path("LD_LIBRARY_PATH", lib_dir)
diff --git a/var/spack/repos/builtin/packages/geopm/package.py b/var/spack/repos/builtin/packages/geopm/package.py
deleted file mode 100644
index 4b033d27e5..0000000000
--- a/var/spack/repos/builtin/packages/geopm/package.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Geopm(AutotoolsPackage):
- """GEOPM is an extensible power management framework targeting HPC.
- The GEOPM package provides libgeopm, libgeopmpolicy and applications
- geopmctl and geopmpolicy, as well as tools for postprocessing.
- GEOPM is designed to be extended for new control algorithms and new
- hardware power management features via its plugin infrastructure.
-
- Note: GEOPM interfaces with hardware using Model Specific Registers (MSRs).
- For propper usage make sure MSRs are made available directly or via the
- msr-safe kernel module by your administrator."""
-
- homepage = "https://geopm.github.io"
- url = "https://github.com/geopm/geopm/releases/download/v1.0.0/geopm-1.0.0.tar.gz"
- git = "https://github.com/geopm/geopm.git"
-
- tags = ["e4s"]
-
- license("BSD-3-Clause")
-
- # Add additional proper versions and checksums here. "spack checksum geopm"
- version("develop", branch="dev")
- version("master", branch="master")
- version("1.1.0", sha256="5f9a4df37ef0d64c53d64829d46736803c9fe614afd8d2c70fe7a5ebea09f88e")
- version("1.0.0", sha256="24fe72265a7e44d62bdfe49467c49f0b7a649131ddda402d763c00a49765e1cb")
- version("0.6.1", sha256="0ca42853f90885bf213df190c3462b8675c143cc843aee0d8b8a0e30802b55a9")
- version("0.6.0", sha256="95ccf256c2b7cb35838978152479569d154347c3065af1639ed17be1399182d3")
- version("0.5.1", sha256="db247af55f7000b6e4628af099956349b68a637500b9d4fe8d8fb13687124d53")
- version("0.5.0", sha256="cdc123ea68b6d918dcc578a39a7a38275a5d711104364eb889abed15029f4060")
- version("0.4.0", sha256="7d165f5a5fe0f19ca586bd81a4631202effb542e9d762cc9cc86ad6ef7afcad9")
- version("0.3.0", sha256="73b45d36e7d2431d308038fc8c50a521a1d214c5ce105a17fba440f28509d907")
-
- # Variants reflecting most ./configure --help options
- variant("debug", default=False, description="Enable debug.")
- variant(
- "coverage",
- default=False,
- description="Enable test coverage support, enables debug by default.",
- )
- variant(
- "overhead",
- default=False,
- description="Enable GEOPM to calculate and display time spent in GEOPM API calls.",
- )
- variant(
- "procfs", default=True, description="Enable procfs (disable for OSes not using procfs)."
- )
- variant("mpi", default=True, description="Enable MPI dependent components.")
- variant("fortran", default=True, description="Build fortran interface.")
- variant("doc", default=True, description="Create man pages with ruby-ronn.")
- variant("openmp", default=True, description="Build with OpenMP.")
- variant("ompt", default=False, description="Use OpenMP Tools Interface.")
- variant("gnu-ld", default=False, description="Assume C compiler uses gnu-ld.")
-
- # Added dependencies.
- depends_on("ruby-ronn", type="build", when="+doc")
- depends_on("doxygen", type="build", when="+doc")
- depends_on("mpi@2.2:", when="+mpi")
-
- depends_on("m4", type="build")
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
- depends_on("ruby-ronn", type="build", when="+doc")
- depends_on("doxygen", type="build", when="+doc")
- depends_on("numactl", when="@:1.0.0-rc2")
- depends_on("mpi", when="+mpi")
- depends_on("hwloc@1.11.9", when="@:0.5.1")
- depends_on("json-c", when="@:0.9.9")
- depends_on("py-cycler@0.10.0:", when="@1.0.0:", type=("build", "run"))
- depends_on("py-pandas@0.22.0:", type=("build", "run"))
- depends_on("py-tables@3.4.3:", when="@1.0.0:", type=("build", "run"))
- depends_on("py-cffi@1.6.0:", when="@1.1.0:", type=("build", "run"))
- depends_on("py-pyyaml@5.1.0:", when="@1.1.0:", type=("build", "run"))
- depends_on("py-mock@3.0.0:", when="@1.1.0:", type=("build", "run"))
- depends_on("py-future@0.17.1:", when="@1.1.0:", type=("build", "run"))
- depends_on("py-numpy@1.14.3:", type=("build", "run"))
- depends_on("py-setuptools@39.2.0:", when="@1.0.0:", type="build")
- depends_on("py-natsort@5.3.2:", type=("build", "run"))
- depends_on("py-psutil@5.4.8:", when="@1.0.0:", type=("build", "run"))
- depends_on("py-pylint@1.9.5:", when="@1.1.0:", type=("build", "run"))
- depends_on("py-matplotlib@2.2.3", when="@:1.0.0-rc2", type=("build", "run"))
- depends_on("py-matplotlib@2.2.3:", when="@1.1.0:", type=("build", "run"))
-
- parallel = False
-
- def autoreconf(self, spec, prefix):
- bash = which("bash")
- bash("./autogen.sh")
-
- def configure_args(self):
- args = []
- args.extend(self.enable_or_disable("debug"))
- args.extend(self.enable_or_disable("coverage"))
- args.extend(self.enable_or_disable("overhead"))
- args.extend(self.enable_or_disable("procfs"))
- args.extend(self.enable_or_disable("mpi"))
- args.extend(self.enable_or_disable("fortran"))
- args.extend(self.enable_or_disable("doc"))
- args.extend(self.enable_or_disable("openmp"))
- args.extend(self.enable_or_disable("ompt"))
- args.extend(self.with_or_without("gnu-ld"))
-
- return args
diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py
index ae859c85b0..1359fdb8bc 100644
--- a/var/spack/repos/builtin/packages/geos/package.py
+++ b/var/spack/repos/builtin/packages/geos/package.py
@@ -19,12 +19,14 @@ class Geos(CMakePackage):
url = "https://download.osgeo.org/geos/geos-3.8.1.tar.bz2"
git = "https://github.com/libgeos/geos.git"
- maintainers("adamjstewart")
-
license("LGPL-2.1-or-later")
+ maintainers("adamjstewart")
+ version("3.13.0", sha256="47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4")
+ version("3.12.2", sha256="34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6")
version("3.12.1", sha256="d6ea7e492224b51193e8244fe3ec17c4d44d0777f3c32ca4fb171140549a0d03")
version("3.12.0", sha256="d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39")
+ version("3.11.4", sha256="364c88ccfc38aa50cf65c700e7b2ae4706ed103326128493dbf750c78d136d2c")
version("3.11.3", sha256="80d60a2bbc0cde7745a3366b9eb8c0d65a142b03e063ea0a52c364758cd5ee89")
version("3.11.2", sha256="b1f077669481c5a3e62affc49e96eb06f281987a5d36fdab225217e5b825e4cc")
version("3.11.1", sha256="6d0eb3cfa9f92d947731cc75f1750356b3bdfc07ea020553daf6af1c768e0be2")
@@ -65,7 +67,11 @@ class Geos(CMakePackage):
version("3.3.4", sha256="cd5400aa5f3fe32246dfed5d238c5017e1808162c865c016480b3e6c07271904")
version("3.3.3", sha256="dfcf4bd70ab212a5b7bad21d01b84748f101a545092b56dafdc3882ef3bddec9")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
generator("ninja")
+ depends_on("cmake@3.15:", when="@3.13:", type="build")
depends_on("cmake@3.13:", when="@3.10:", type="build")
depends_on("cmake@3.8:", type="build")
@@ -85,7 +91,7 @@ class Geos(CMakePackage):
args = []
# https://github.com/libgeos/geos/issues/460
- if "%intel" in self.spec:
+ if self.spec.satisfies("%intel"):
args.append(self.define("BUILD_ASTYLE", False))
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py
index 75bddc5b0c..f60f26c88c 100644
--- a/var/spack/repos/builtin/packages/gettext/package.py
+++ b/var/spack/repos/builtin/packages/gettext/package.py
@@ -6,7 +6,6 @@
import re
from spack.package import *
-from spack.util.environment import is_system_path
class Gettext(AutotoolsPackage, GNUMirrorPackage):
@@ -18,9 +17,11 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
maintainers("michaelkuhn")
executables = [r"^gettext$"]
+ tags = ["build-tools"]
license("GPL-3.0-or-later AND LGPL-2.1-or-later AND MIT")
+ version("0.22.5", sha256="fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640")
version("0.22.4", sha256="29217f1816ee2e777fa9a01f9956a14139c0c23cc1b20368f06b2888e8a34116")
version("0.22.3", sha256="b838228b3f8823a6c1eddf07297197c4db13f7e1b173b9ef93f3f945a63080b6")
version("0.21.1", sha256="50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6")
@@ -30,6 +31,9 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
version("0.19.8.1", sha256="105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4")
version("0.19.7", sha256="378fa86a091cec3acdece3c961bb8d8c0689906287809a8daa79dc0c6398d934")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# Recommended variants
variant("curses", default=True, description="Use libncurses")
variant("libxml2", default=True, description="Use libxml2")
@@ -49,7 +53,7 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
depends_on("libxml2", when="+libxml2")
# Java runtime and compiler (e.g. GNU gcj or kaffe)
# C# runtime and compiler (e.g. pnet or mono)
- depends_on("tar", when="+tar")
+ depends_on("tar", when="+tar", type="run")
# depends_on('gzip', when='+gzip')
depends_on("bzip2", when="+bzip2")
depends_on("xz", when="+xz", type=("build", "link", "run"))
@@ -61,18 +65,37 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
# depends_on('cvs')
conflicts("+shared~pic")
+ # https://savannah.gnu.org/bugs/?65811
+ conflicts("%gcc@:5", when="@0.22:")
patch("test-verify-parallel-make-check.patch", when="@:0.19.8.1")
patch("nvhpc-builtin.patch", when="@:0.21.0 %nvhpc")
patch("nvhpc-export-symbols.patch", when="%nvhpc")
patch("nvhpc-long-width.patch", when="%nvhpc")
- # Apply this only where we know that the system libc is glibc, be very careful:
- @when("@:0.21.0 target=ppc64le:")
def patch(self):
- for fn in ("gettext-tools/gnulib-lib/cdefs.h", "gettext-tools/libgrep/cdefs.h"):
- with open(fn, "w") as f:
- f.write("#include <sys/cdefs.h>\n")
+ # Apply this only where we know that the system libc is glibc, be very careful:
+ if self.spec.satisfies("@:0.21.0 target=ppc64le"):
+ for fn in ("gettext-tools/gnulib-lib/cdefs.h", "gettext-tools/libgrep/cdefs.h"):
+ with open(fn, "w") as f:
+ f.write("#include <sys/cdefs.h>\n")
+
+ # From the configure script: "we don't want to use an external libxml, because its
+ # dependencies and their dynamic relocations have an impact on the startup time", well,
+ # *we* do.
+ if self.spec.satisfies("@0.20:+libxml2"): # libtextstyle/configure not present prior
+ filter_file(
+ "gl_cv_libxml_force_included=yes",
+ "gl_cv_libxml_force_included=no",
+ "libtextstyle/configure",
+ string=True,
+ )
+
+ def flag_handler(self, name, flags):
+ # this goes together with gl_cv_libxml_force_included=no
+ if name == "ldflags" and self.spec.satisfies("+libxml2"):
+ flags.append("-lxml2")
+ return (flags, None, None)
@classmethod
def determine_version(cls, exe):
@@ -97,17 +120,17 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
config_args.extend(self.enable_or_disable("shared"))
- if self.spec["iconv"].name == "libc":
+ if self.spec["iconv"].name == "libiconv":
+ config_args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
config_args.append("--without-libiconv-prefix")
- elif not is_system_path(self.spec["iconv"].prefix):
- config_args.append("--with-libiconv-prefix=" + self.spec["iconv"].prefix)
- if "+curses" in spec:
+ if spec.satisfies("+curses"):
config_args.append("--with-ncurses-prefix={0}".format(spec["ncurses"].prefix))
else:
config_args.append("--disable-curses")
- if "+libxml2" in spec:
+ if spec.satisfies("+libxml2"):
config_args.append("--with-libxml2-prefix={0}".format(spec["libxml2"].prefix))
else:
config_args.append("--with-included-libxml")
@@ -118,7 +141,7 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
if "+xz" not in spec:
config_args.append("--without-xz")
- if "+libunistring" in spec:
+ if spec.satisfies("+libunistring"):
config_args.append(
"--with-libunistring-prefix={0}".format(spec["libunistring"].prefix)
)
diff --git a/var/spack/repos/builtin/packages/gexiv2/package.py b/var/spack/repos/builtin/packages/gexiv2/package.py
index fc88a05935..585fa110f2 100644
--- a/var/spack/repos/builtin/packages/gexiv2/package.py
+++ b/var/spack/repos/builtin/packages/gexiv2/package.py
@@ -24,6 +24,9 @@ class Gexiv2(MesonPackage):
version("0.12.1", sha256="8aeafd59653ea88f6b78cb03780ee9fd61a2f993070c5f0d0976bed93ac2bd77")
version("0.12.0", sha256="58f539b0386f36300b76f3afea3a508de4914b27e78f58ee4d142486a42f926a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("cmake@3.4:", type="build")
depends_on("ninja@1.8.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/gfal2-util/package.py b/var/spack/repos/builtin/packages/gfal2-util/package.py
new file mode 100644
index 0000000000..874b1f58d7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gfal2-util/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gfal2Util(PythonPackage):
+ """CLI for gfal2."""
+
+ homepage = "https://dmc-docs.web.cern.ch/dmc-docs/gfal2-util.html"
+ url = "https://github.com/cern-fts/gfal2-util/archive/refs/tags/v1.9.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.9.0", sha256="9a5194b7ac80381c0787ec7c2405cc3e060fc03bb99e80bbeb388ec3675cb13d")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/gfal2/package.py b/var/spack/repos/builtin/packages/gfal2/package.py
new file mode 100644
index 0000000000..4b892903c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gfal2/package.py
@@ -0,0 +1,91 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gfal2(CMakePackage):
+ """Multi-protocol data management library."""
+
+ homepage = "https://dmc-docs.web.cern.ch/dmc-docs/"
+ url = "https://github.com/cern-fts/gfal2/archive/refs/tags/v2.23.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("2.23.0", sha256="e3fc9c2ccb2f54b1d0d460545e1b6c581470d2a2968928a8973045089892e509")
+
+ variant("dcap", default=False, description="Enable dcap plugin")
+ variant("file", default=False, description="Enable file plugin")
+ variant("gridftp", default=False, description="Enable gridftp plugin")
+ variant("http", default=False, description="Enable http plugin")
+ variant("sftp", default=False, description="Enable sftp plugin")
+ variant("sftp", default=False, description="Enable sftp plugin")
+ variant("srm", default=False, description="Enable srm plugin")
+ variant("xrootd", default=False, description="Enable xrootd plugin")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("glib")
+ depends_on("json-c")
+ depends_on("openldap")
+
+ depends_on("dcap", when="+dcap")
+ depends_on("zlib", when="+file")
+ depends_on("davix +thirdparty", when="+http")
+ depends_on("cryptopp", when="+http")
+ depends_on("libssh2", when="+sftp")
+ depends_on("xrootd", when="+xrootd")
+
+ with when("+gridftp"):
+ depends_on("globus-common")
+ depends_on("globus-ftp-client")
+ depends_on("globus-ftp-control")
+ depends_on("globus-gass-copy")
+ depends_on("globus-gss-assist")
+ depends_on("globus-gssapi-gsi")
+
+ with when("+srm"):
+ depends_on("globus-common")
+ depends_on("globus-gss-assist")
+ depends_on("globus-gssapi-gsi")
+ depends_on("srm-ifce")
+
+ depends_on("googletest", type="test")
+
+ def patch(self):
+ # FindCryptopp.cmake looks in user-specified ${CRYPTOPP_LOCATION}
+ # for both library and headers
+ filter_file(
+ r"find_library\(CRYPTOPP_LIBRARIES",
+ "find_library(CRYPTOPP_LIBRARIES PATH_SUFFIXES lib lib64",
+ "cmake/modules/FindCryptopp.cmake",
+ )
+ filter_file(
+ r"find_path\(CRYPTOPP_INCLUDE_DIRS",
+ "find_path(CRYPTOPP_INCLUDE_DIRS PATH_SUFFIXES include/cryptopp",
+ "cmake/modules/FindCryptopp.cmake",
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define("MAIN_CORE", True),
+ self.define("MAIN_TRANSFER", True),
+ self.define("SKIP_TESTS", not self.run_tests),
+ self.define_from_variant("PLUGIN_DCAP", "dcap"),
+ self.define_from_variant("PLUGIN_FILE", "file"),
+ self.define_from_variant("PLUGIN_GRIDFTP", "gridftp"),
+ self.define_from_variant("PLUGIN_HTTP", "http"),
+ self.define_from_variant("PLUGIN_SFTP", "sftp"),
+ self.define_from_variant("PLUGIN_SRM", "srm"),
+ self.define_from_variant("PLUGIN_XROOTD", "xrootd"),
+ ]
+ if self.spec.satisfies("+http"):
+ args.append(self.define("CRYPTOPP_LOCATION", self.spec["cryptopp"].prefix))
+ if self.spec.satisfies("+xrootd"):
+ args.append(self.define("XROOTD_LOCATION", self.spec["xrootd"].prefix))
+ return args
diff --git a/var/spack/repos/builtin/packages/gffcompare/package.py b/var/spack/repos/builtin/packages/gffcompare/package.py
index 88c66316ca..6b057b4d1c 100644
--- a/var/spack/repos/builtin/packages/gffcompare/package.py
+++ b/var/spack/repos/builtin/packages/gffcompare/package.py
@@ -19,6 +19,8 @@ class Gffcompare(MakefilePackage):
version("0.12.6", sha256="0e713bc9177d874c935802d11669776da5e9377a8c4d031153b48a783d3391d0")
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
make("release")
diff --git a/var/spack/repos/builtin/packages/gffread/package.py b/var/spack/repos/builtin/packages/gffread/package.py
index 58896451b2..c289d8a0e6 100644
--- a/var/spack/repos/builtin/packages/gffread/package.py
+++ b/var/spack/repos/builtin/packages/gffread/package.py
@@ -10,13 +10,15 @@ class Gffread(MakefilePackage):
"""gffread: GFF/GTF utility providing format conversions, region filtering,
FASTA sequence extraction and more"""
- homepage = "http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread"
+ homepage = "https://ccb.jhu.edu/software/stringtie/gff.shtml#gffread"
url = "https://github.com/gpertea/gffread/releases/download/v0.12.7/gffread-0.12.7.tar.gz"
license("MIT")
version("0.12.7", sha256="bfde1c857495e578f5b3af3c007a9aa40593e69450eafcc6a42c3e8ef08ed1f5")
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
make("release")
diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py
index fbc0e846d9..67f90a2654 100644
--- a/var/spack/repos/builtin/packages/gflags/package.py
+++ b/var/spack/repos/builtin/packages/gflags/package.py
@@ -21,6 +21,8 @@ class Gflags(CMakePackage):
version("2.2.2", sha256="34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf")
version("2.1.2", sha256="d8331bd0f7367c8afd5fcb5f5e85e96868a00fd24b7276fa5fcee1e5575c2662")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.12:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/gfsio/package.py b/var/spack/repos/builtin/packages/gfsio/package.py
index a5dc64a92c..590f70dac5 100644
--- a/var/spack/repos/builtin/packages/gfsio/package.py
+++ b/var/spack/repos/builtin/packages/gfsio/package.py
@@ -19,8 +19,19 @@ class Gfsio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("1.4.2", sha256="1e92ba60c603a8d3019b2aa8134fb3a69e078b2d9398990638576d6c5aea4beb")
version("1.4.1", sha256="eab106302f520600decc4f9665d7c6a55e7b4901fab6d9ef40f29702b89b69b1")
+ depends_on("fortran", type="build")
+
+ depends_on("pfunit", type="test")
+
+ conflicts("%oneapi", when="@:1.4.1", msg="Requires @1.4.2: for Intel oneAPI")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
+
def setup_run_environment(self, env):
lib = find_libraries("libgfsio", root=self.prefix, shared=False, recursive=True)
# Only one library version, but still need to set _4 to make NCO happy
@@ -33,3 +44,7 @@ class Gfsio(CMakePackage):
if name == "fflags":
flags.append("-Free")
return (None, None, flags)
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/gftl-shared/package.py b/var/spack/repos/builtin/packages/gftl-shared/package.py
index 8a327a3626..6933b97ec5 100644
--- a/var/spack/repos/builtin/packages/gftl-shared/package.py
+++ b/var/spack/repos/builtin/packages/gftl-shared/package.py
@@ -25,6 +25,8 @@ class GftlShared(CMakePackage):
version("main", branch="main")
+ version("1.9.0", sha256="a3291ce61b512fe88628cc074b02363c2ba3081e7b453371089121988482dd6f")
+ version("1.8.0", sha256="3450161508c573ea053b2a23cdbf2a1d6fd6fdb78c162d31fc0019da0f8dd03c")
version("1.7.0", sha256="8ba567133fcee6b93bc71f61b3bb2053b4b07c6d78f6ad98a04dfc40aa478de7")
version("1.6.1", sha256="0e3e1e0c7e0c3f1576e296b3b199dcae4bbaad055fc8fe929c34e52d4b07b02c")
version("1.6.0", sha256="90245b83aea9854bc5b9fbd553a68cf73ab12f6ed5a14753a9c84092047e8cb0")
@@ -40,10 +42,19 @@ class GftlShared(CMakePackage):
version("1.3.1", sha256="a71e164108847f32f37da505f604fc2a50f392a4fcdf9a7cfe8eaf775bed64d4")
version("1.3.0", sha256="979b00c4d531e701bf4346f662e3e4cc865124a97ca958637a53201d66d4ee43")
+ depends_on("fortran", type="build")
+
depends_on("m4", type=("build", "run"))
depends_on("cmake@3.12:", type="build")
depends_on("gftl")
+ # gftl-shared only works with the Fujitsu compiler from 1.8.0 onwards
+ conflicts(
+ "%fj",
+ when="@:1.7.0",
+ msg="gftl-shared only works with the Fujitsu compiler from 1.8.0 onwards",
+ )
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/gftl/package.py b/var/spack/repos/builtin/packages/gftl/package.py
index 8f9dec7c90..207b297126 100644
--- a/var/spack/repos/builtin/packages/gftl/package.py
+++ b/var/spack/repos/builtin/packages/gftl/package.py
@@ -39,6 +39,9 @@ class Gftl(CMakePackage):
version("develop", branch="develop")
version("main", branch="main")
+ version("1.14.0", sha256="bf8e3ba3f708ea327c7eb1a5bd1afdce41358c6df1a323aba0f73575c25d5fc8")
+ version("1.13.0", sha256="d8ef4bca5fb67e63dcd69e5377a0cef8336b00178a97450e79010552000d0a52")
+ version("1.12.0", sha256="b50e17cb2109372819b3ee676e6e61fd3a517dc4c1ea293937c8a83f03b0cbd6")
version("1.11.0", sha256="b28935bc077749823b1505ad8c1208360a5ba7e961d7593c17a33b11455a32a4")
version("1.10.0", sha256="d6086e8cba2497bacdae66d301f7cdacaed9138a0055f33f8ca1b778a0cf0dc5")
version("1.9.0", sha256="4c7cb8b1313d87eaa5cc9aae242301085aa3b12688d0fddf54061503e95e4cc0")
@@ -54,9 +57,16 @@ class Gftl(CMakePackage):
version("1.5.5", sha256="67ff8210f08e9f2ee6ba23c8c26336f948420db5db7fc054c3a662e9017f18a3")
version("1.5.4", sha256="4c53e932ba8d82616b65500f403a33a14957b9266b5e931e2448f1f005990750")
+ depends_on("fortran", type="build")
+
depends_on("cmake@3.12:", type="build")
depends_on("m4", type="build")
+ # gftl only works with the Fujitsu compiler from 1.12 onwards
+ conflicts(
+ "%fj", when="@:1.11.0", msg="gftl only works with the Fujitsu compiler from 1.12 onwards"
+ )
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/gh/package.py b/var/spack/repos/builtin/packages/gh/package.py
index 227ce371a0..fddbc6311b 100644
--- a/var/spack/repos/builtin/packages/gh/package.py
+++ b/var/spack/repos/builtin/packages/gh/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Gh(Package):
+class Gh(GoPackage):
"""GitHub's official command line tool."""
homepage = "https://github.com/cli/cli"
@@ -16,6 +16,10 @@ class Gh(Package):
license("MIT")
+ version("2.58.0", sha256="90894536c797147586db775d06ec2040c45cd7eef941f7ccbea46f4e5997c81c")
+ version("2.50.0", sha256="683d0dee90e1d24a6673d13680e0d41963ddc6dd88580ab5119acec790d1b4d7")
+ version("2.49.2", sha256="e839ea302ad99b70ce3efcb903f938ecbbb919798e49bc2f2034ad506ae0b0f5")
+ version("2.43.1", sha256="1ea3f451fb7002c1fb95a7fab21e9ab16591058492628fe264c5878e79ec7c90")
version("2.32.1", sha256="1d569dc82eb6520e6a8959568c2db84fea3bbaab2604c8dd5901849d320e1eae")
version("2.28.0", sha256="cf3c0fb7f601d717d8b5177707a197c49fd426f5dc3c9aa52a932e96ba7166af")
version("2.25.1", sha256="d3b28da03f49600697d2e80c2393425bd382e340040c34641bf3569593c7fbe8")
@@ -35,15 +39,29 @@ class Gh(Package):
conflicts("platform=darwin", when="@2.28.0")
depends_on("go@1.16:", type="build")
+ depends_on("go@1.18:", type="build", when="@2.10.0:")
+ depends_on("go@1.19:", type="build", when="@2.21.0:")
+ depends_on("go@1.21:", type="build", when="@2.33.0:")
+ depends_on("go@1.22:", type="build", when="@2.47.0:")
- phases = ["build", "install"]
+ @property
+ def build_args(self):
+ args = super().build_args
+ args.extend(["-trimpath", "./cmd/gh"])
+ return args
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
+ @run_after("install")
+ def install_completions(self):
+ gh = Executable(self.prefix.bin.gh)
- def build(self, spec, prefix):
- make()
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "gh", "w") as file:
+ gh("completion", "-s", "bash", output=file)
- def install(self, spec, prefix):
- make("install", "prefix=" + prefix)
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "gh.fish", "w") as file:
+ gh("completion", "-s", "fish", output=file)
+
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_gh", "w") as file:
+ gh("completion", "-s", "zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/ghost/package.py b/var/spack/repos/builtin/packages/ghost/package.py
index 030edfe45b..ce99f529a1 100644
--- a/var/spack/repos/builtin/packages/ghost/package.py
+++ b/var/spack/repos/builtin/packages/ghost/package.py
@@ -24,6 +24,9 @@ class Ghost(CMakePackage, CudaPackage):
version("develop", branch="devel")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("mpi", default=True, description="enable/disable MPI")
variant("scotch", default=False, description="enable/disable matrix reordering with PT-SCOTCH")
diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py
index 9384b1e16f..843de73ad7 100644
--- a/var/spack/repos/builtin/packages/ghostscript/package.py
+++ b/var/spack/repos/builtin/packages/ghostscript/package.py
@@ -14,11 +14,15 @@ class Ghostscript(AutotoolsPackage):
homepage = "https://ghostscript.com/"
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz"
+ git = "https://git.ghostscript.com/ghostpdl.git"
executables = [r"^gs$"]
- license("AGPL-3.0-or-later")
+ license("AGPL-3.0-or-later", checked_by="wdconinc")
+ version("10.03.1", sha256="31cd01682ad23a801cc3bbc222a55f07c4ea3e068bdfb447792d54db21a2e8ad")
+ version("10.02.1", sha256="e429e4f5b01615a4f0f93a4128e8a1a4d932dff983b1774174c79c0630717ad9")
+ version("10.01.2", sha256="a4cd61a07fec161bee35da0211a5e5cde8ff8a0aaf942fc0176715e499d21661")
version("10.0.0", sha256="a57764d70caf85e2fc0b0f59b83b92e25775631714dcdb97cc6e0cea414bb5a3")
version("9.56.1", sha256="1598b9a38659cce8448d42a73054b2f9cbfcc40a9b97eeec5f22d4d6cd1de8e6")
version("9.54.0", sha256="0646bb97f6f4d10a763f4919c54fa28b4fbdd3dff8e7de3410431c81762cade0")
@@ -29,6 +33,12 @@ class Ghostscript(AutotoolsPackage):
version("9.21", sha256="02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85")
version("9.18", sha256="5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b")
+ depends_on("c", type="build")
+
+ # --enable-dynamic is deprecated, but kept as a variant since it used to be default
+ # https://github.com/ArtifexSoftware/ghostpdl/commit/fe0f842da782b097ce13c31fccacce2374ed6d4b
+ variant("dynamic", default=False, description="Enable dynamically loaded drivers")
+
# https://www.ghostscript.com/ocr.html
variant("tesseract", default=False, description="Use the Tesseract library for OCR")
@@ -61,6 +71,9 @@ class Ghostscript(AutotoolsPackage):
sha256="f3c2e56aa552a030c6db2923276ff2d140e39c511f92d9ef6c74a24776940af7",
)
+ build_targets = ["default", "so"]
+ install_targets = ["install", "soinstall"]
+
def url_for_version(self, version):
baseurl = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs{0}/ghostscript-{1}.tar.gz"
return baseurl.format(version.joined, version.dotted)
@@ -90,20 +103,19 @@ class Ghostscript(AutotoolsPackage):
)
def configure_args(self):
- args = ["--disable-compile-inits", "--enable-dynamic", "--with-system-libtiff"]
+ args = ["--disable-compile-inits", "--with-system-libtiff"]
if self.spec.satisfies("@9.53:"):
args.extend(self.with_or_without("tesseract"))
- return args
-
- def build(self, spec, prefix):
- make()
- make("so")
+ if self.spec.satisfies("+dynamic"):
+ args.append("--enable-dynamic")
+ if self.spec.satisfies("@10.01.0:"):
+ args.append("--disable-hidden-visibility")
+ else:
+ args.append("--disable-dynamic")
- def install(self, spec, prefix):
- make("install")
- make("soinstall")
+ return args
@classmethod
def determine_version(cls, exe):
diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py
index b28aed7893..fc8b5b1ea9 100644
--- a/var/spack/repos/builtin/packages/giflib/package.py
+++ b/var/spack/repos/builtin/packages/giflib/package.py
@@ -10,11 +10,12 @@ class Giflib(MakefilePackage, SourceforgePackage):
"""The GIFLIB project maintains the giflib service library, which has
been pulling images out of GIFs since 1989."""
- homepage = "http://giflib.sourceforge.net/"
+ homepage = "https://giflib.sourceforge.net/"
sourceforge_mirror_path = "giflib/giflib-5.1.4.tar.gz"
license("MIT")
+ version("5.2.2", sha256="be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb")
version("5.2.1", sha256="31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd")
version("5.2.0", sha256="dc7257487c767137602d86c17098ec97065a718ff568a61cfcf1a9466f197b1f")
version(
@@ -23,6 +24,8 @@ class Giflib(MakefilePackage, SourceforgePackage):
extension="tar.bz2",
)
+ depends_on("c", type="build")
+
depends_on("automake", type="build", when="@:5.2.0")
depends_on("autoconf", type="build", when="@:5.2.0")
depends_on("m4", type="build", when="@:5.2.0")
@@ -33,10 +36,13 @@ class Giflib(MakefilePackage, SourceforgePackage):
"https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch",
sha256="a94e7bdd8840a31cecacc301684dfdbf7b98773ad824aeaab611fabfdc513036",
level=0,
- when="@5.2: platform=darwin",
+ when="@5.2.0:5.2.1 platform=darwin",
)
patch("bsd-head.patch")
+ # error: no such file or directory: 'dgif_lib.o'
+ parallel = False
+
def prefix_and_libversion_args(self):
args = []
if self.spec.satisfies("@5.2.0:"):
@@ -72,3 +78,6 @@ class Giflib(MakefilePackage, SourceforgePackage):
if spec.satisfies("@:5.2.0"):
configure = Executable("./configure")
configure("--prefix={0}".format(prefix))
+ # remove call to convert in doc makefile
+ with working_dir("doc"):
+ filter_file("^.*convert.*-resize.*$", "", "Makefile")
diff --git a/var/spack/repos/builtin/packages/gimp/package.py b/var/spack/repos/builtin/packages/gimp/package.py
index e823df76d8..8519d2a71c 100644
--- a/var/spack/repos/builtin/packages/gimp/package.py
+++ b/var/spack/repos/builtin/packages/gimp/package.py
@@ -25,11 +25,26 @@ class Gimp(AutotoolsPackage):
license("GPL-3.0-or-later")
- version("2.10.32", sha256="3f15c70554af5dcc1b46e6dc68f3d8f0a6cc9fe56b6d78ac08c0fd859ab89a25")
- version("2.10.30", sha256="88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc")
- version("2.10.28", sha256="4f4dc22cff1ab5f026feaa2ab55e05775b3a11e198186b47bdab79cbfa078826")
- version("2.10.26", sha256="5ddbccf1db462a41df9a26197fcb0d24c7152753a36b3c8b8a9506b4136395f7")
- version("2.10.24", sha256="bd1bb762368c0dd3175cf05006812dd676949c3707e21f4e6857435cb435989e")
+ version("2.10.38", sha256="50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e")
+ with default_args(deprecated=True):
+ version(
+ "2.10.32", sha256="3f15c70554af5dcc1b46e6dc68f3d8f0a6cc9fe56b6d78ac08c0fd859ab89a25"
+ )
+ version(
+ "2.10.30", sha256="88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc"
+ )
+ version(
+ "2.10.28", sha256="4f4dc22cff1ab5f026feaa2ab55e05775b3a11e198186b47bdab79cbfa078826"
+ )
+ version(
+ "2.10.26", sha256="5ddbccf1db462a41df9a26197fcb0d24c7152753a36b3c8b8a9506b4136395f7"
+ )
+ version(
+ "2.10.24", sha256="bd1bb762368c0dd3175cf05006812dd676949c3707e21f4e6857435cb435989e"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("doc", default=True, description="Build documentation with gtk-doc")
variant("ghostscript", default=True, description="Build with ghostscript support")
@@ -52,6 +67,7 @@ class Gimp(AutotoolsPackage):
# variant("python", default=False, description="Build with Python bindings")
# ref. https://www.gimp.org/source/
+ depends_on("gettext", type="build")
depends_on("pkgconfig", type="build")
depends_on("babl")
depends_on("fontconfig@2.12.4:")
@@ -67,6 +83,7 @@ class Gimp(AutotoolsPackage):
depends_on("libexif")
# depends_on("libheif+libde265", when="+libheif")
depends_on("libjxl", when="+jpegxl")
+ depends_on("libjxl@:0.7", when="+jpegxl@:2.10.32")
depends_on("libmng", when="+libmng")
depends_on("libmypaint@1.4")
depends_on("libpng")
@@ -90,6 +107,10 @@ class Gimp(AutotoolsPackage):
url = "https://download.gimp.org/gimp/v{0}/gimp-{1}.tar.bz2"
return url.format(version.up_to(2), version)
+ @when("@:2.10.32")
+ def patch(self):
+ filter_file("babl ", "babl-0.1 ", "configure")
+
def configure_args(self):
args = [
"--disable-python",
@@ -97,7 +118,7 @@ class Gimp(AutotoolsPackage):
"GIO_USE_TLS=gnutls",
"GIO_EXTRA_MODULES={0}/lib/gio/modules".format(self.spec["glib-networking"].prefix),
]
- if "+libxpm" in self.spec:
+ if self.spec.satisfies("+libxpm"):
args.append("--with-libxpm={0}".format(self.spec["libxpm"].prefix))
return args
diff --git a/var/spack/repos/builtin/packages/ginkgo/1.4.0_dpcpp_use_old_standard.patch b/var/spack/repos/builtin/packages/ginkgo/1.4.0_dpcpp_use_old_standard.patch
deleted file mode 100644
index 54ed07c22d..0000000000
--- a/var/spack/repos/builtin/packages/ginkgo/1.4.0_dpcpp_use_old_standard.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-commit 83164570f0d3511d114114bcc2b02ad23b753ed0
-Author: Yuhsiang M. Tsai <yhmtsai@gmail.com>
-Date: Wed Oct 6 16:33:16 2021 +0200
-
- syclstd 1.2.1 in new release to propagate subgroup
- remove 64 subgroup in dense to avoid conj_trans issue on cpu temporarily
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ceb269b1cb..b47388a596 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -67,7 +67,8 @@ if(MSVC)
- elseif(GINKGO_BUILD_DPCPP OR CMAKE_CXX_COMPILER MATCHES "dpcpp")
- # For now always use `-ffp-model=precise` with DPC++. This can be removed when
- # the floating point issues are fixed.
-- set(GINKGO_COMPILER_FLAGS "-Wpedantic;-ffp-model=precise" CACHE STRING
-+ # -sycl-std=1.2.1 (or -sycl-std=2017) is temporary workaround after 2021.4 to propagate subgroup setting correctly
-+ set(GINKGO_COMPILER_FLAGS "-Wpedantic;-ffp-model=precise;-sycl-std=1.2.1" CACHE STRING
- "Set the required CXX compiler flags, mainly used for warnings. Current default is `-Wpedantic;-ffp-model=precise`")
- else()
- set(GINKGO_COMPILER_FLAGS "-Wpedantic" CACHE STRING
-diff --git a/cmake/create_test.cmake b/cmake/create_test.cmake
-index 9d22406f9a..dcc452b293 100644
---- a/cmake/create_test.cmake
-+++ b/cmake/create_test.cmake
-@@ -40,6 +40,7 @@ function(ginkgo_create_dpcpp_test test_name)
- add_executable(${test_target_name} ${test_name}.dp.cpp)
- target_compile_features(${test_target_name} PUBLIC cxx_std_17)
- target_compile_options(${test_target_name} PRIVATE "${GINKGO_DPCPP_FLAGS}")
-+ target_compile_options(${test_target_name} PRIVATE "${GINKGO_COMPILER_FLAGS}")
- target_link_options(${test_target_name} PRIVATE -fsycl-device-code-split=per_kernel)
- ginkgo_set_test_target_properties(${test_name} ${test_target_name})
- # Note: MKL_ENV is empty on linux. Maybe need to apply MKL_ENV to all test.
-diff --git a/dpcpp/CMakeLists.txt b/dpcpp/CMakeLists.txt
-index fee9ec3639..ce71fd5d3c 100644
---- a/dpcpp/CMakeLists.txt
-+++ b/dpcpp/CMakeLists.txt
-@@ -68,6 +68,7 @@ target_compile_definitions(ginkgo_dpcpp PRIVATE GKO_COMPILING_DPCPP)
-
- set(GINKGO_DPCPP_FLAGS ${GINKGO_DPCPP_FLAGS} PARENT_SCOPE)
- target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_DPCPP_FLAGS}")
-+target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_COMPILER_FLAGS}")
- # Note: add MKL as PRIVATE not PUBLIC (MKL example shows) to avoid propagating
- # find_package(MKL) everywhere when linking ginkgo (see the MKL example
- # https://software.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/getting-started/cmake-config-for-onemkl.html)
-diff --git a/dpcpp/matrix/dense_kernels.dp.cpp b/dpcpp/matrix/dense_kernels.dp.cpp
-index 0c89530d1d..9a86ab9cd1 100644
---- a/dpcpp/matrix/dense_kernels.dp.cpp
-+++ b/dpcpp/matrix/dense_kernels.dp.cpp
-@@ -69,14 +69,14 @@ namespace dpcpp {
- namespace dense {
-
-
-+// Disable the 64 subgroup. CPU supports 64 now, but conj_transpose will
-+// lead CL_OUT_OF_RESOURCES. TODO: investigate this issue.
- using KCFG_1D = ConfigSet<11, 7>;
- constexpr auto kcfg_1d_list =
-- syn::value_list<std::uint32_t, KCFG_1D::encode(512, 64),
-- KCFG_1D::encode(512, 32), KCFG_1D::encode(512, 16),
-- KCFG_1D::encode(256, 32), KCFG_1D::encode(256, 16),
-- KCFG_1D::encode(256, 8)>();
--constexpr auto subgroup_list =
-- syn::value_list<std::uint32_t, 64, 32, 16, 8, 4>();
-+ syn::value_list<std::uint32_t, KCFG_1D::encode(512, 32),
-+ KCFG_1D::encode(512, 16), KCFG_1D::encode(256, 32),
-+ KCFG_1D::encode(256, 16), KCFG_1D::encode(256, 8)>();
-+constexpr auto subgroup_list = syn::value_list<std::uint32_t, 32, 16, 8, 4>();
- constexpr auto kcfg_1d_array = syn::as_array(kcfg_1d_list);
- constexpr int default_block_size = 256;
-
diff --git a/var/spack/repos/builtin/packages/ginkgo/ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch b/var/spack/repos/builtin/packages/ginkgo/ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch
new file mode 100644
index 0000000000..437f89dab3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ginkgo/ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch
@@ -0,0 +1,19 @@
+diff -ruN spack-src/dpcpp/components/intrinsics.dp.hpp spack-src-patched/dpcpp/components/intrinsics.dp.hpp
+--- spack-src/dpcpp/components/intrinsics.dp.hpp 2024-04-03 18:53:42.724032846 +0000
++++ spack-src-patched/dpcpp/components/intrinsics.dp.hpp 2024-04-03 18:55:01.744543032 +0000
+@@ -67,13 +67,13 @@
+ */
+ __dpct_inline__ int ffs(uint32 mask)
+ {
+- return (mask == 0) ? 0 : (sycl::ext::intel::ctz(mask) + 1);
++ return (mask == 0) ? 0 : (sycl::ctz(mask) + 1);
+ }
+
+ /** @copydoc ffs */
+ __dpct_inline__ int ffs(uint64 mask)
+ {
+- return (mask == 0) ? 0 : (sycl::ext::intel::ctz(mask) + 1);
++ return (mask == 0) ? 0 : (sycl::ctz(mask) + 1);
+ }
+
+
diff --git a/var/spack/repos/builtin/packages/ginkgo/ginkgo-sycl-pr1524.patch b/var/spack/repos/builtin/packages/ginkgo/ginkgo-sycl-pr1524.patch
new file mode 100644
index 0000000000..7d1f97fc15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ginkgo/ginkgo-sycl-pr1524.patch
@@ -0,0 +1,13 @@
+diff -ruN spack-src/dpcpp/components/cooperative_groups.dp.hpp spack-src-patched/dpcpp/components/cooperative_groups.dp.hpp
+--- spack-src/dpcpp/components/cooperative_groups.dp.hpp 2024-01-18 17:25:05.336926061 +0000
++++ spack-src-patched/dpcpp/components/cooperative_groups.dp.hpp 2024-01-18 17:26:50.649595478 +0000
+@@ -240,7 +240,8 @@
+ {
+ // todo: change it when OneAPI update the mask related api
+ return sycl::reduce_over_group(
+- *this, (predicate != 0) ? mask_type(1) << data_.rank : mask_type(0),
++ static_cast<sycl::sub_group>(*this),
++ (predicate != 0) ? mask_type(1) << data_.rank : mask_type(0),
+ sycl::plus<mask_type>());
+ }
+
diff --git a/var/spack/repos/builtin/packages/ginkgo/package.py b/var/spack/repos/builtin/packages/ginkgo/package.py
index 36363ba3cc..dd5dc4b557 100644
--- a/var/spack/repos/builtin/packages/ginkgo/package.py
+++ b/var/spack/repos/builtin/packages/ginkgo/package.py
@@ -18,14 +18,15 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
test_requires_compiler = True
- maintainers("tcojean", "hartwiganzt")
+ maintainers("MarcelKoch", "hartwiganzt")
tags = ["e4s"]
- license("MIT")
+ license("BSD-3-Clause")
version("develop", branch="develop")
version("master", branch="master")
+ version("1.8.0", commit="586b1754058d7a32d4bd1b650f9603484c2a8927") # v1.8.0
version("1.7.0", commit="49242ff89af1e695d7794f6d50ed9933024b66fe") # v1.7.0
version("1.6.0", commit="1f1ed46e724334626f016f105213c047e16bc1ae") # v1.6.0
version("1.5.0", commit="234594c92b58e2384dfb43c2d08e7f43e2b58e7a") # v1.5.0
@@ -41,22 +42,27 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
version("1.1.0", commit="b9bec8225442b3eb2a85a870efa112ab767a17fb") # v1.1.0
version("1.0.0", commit="45244641e0c2b19ba33aecd25153c0bddbcbe1a0") # v1.0.0
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("full_optimizations", default=False, description="Compile with all optimizations")
variant("openmp", default=sys.platform != "darwin", description="Build with OpenMP")
variant("sycl", default=False, description="Enable SYCL backend")
variant("develtools", default=False, description="Compile with develtools enabled")
variant("hwloc", default=False, description="Enable HWLOC support")
- variant("mpi", default=False, description="Enable MPI support")
+ variant("sde", default=False, description="Enable PAPI SDE support", when="@1.7.0:")
+ variant("mpi", default=False, description="Enable MPI support", when="@1.5.0:")
depends_on("cmake@3.9:", type="build", when="@:1.3.0")
depends_on("cmake@3.13:", type="build", when="@1.4.0:1.6.0")
depends_on("cmake@3.16:", type="build", when="@1.7.0:")
depends_on("cmake@3.18:", type="build", when="+cuda@1.7.0:")
+ depends_on("cmake@3.21:", type="build", when="+rocm@1.8.0:")
depends_on("cuda@9:", when="+cuda @:1.4.0")
depends_on("cuda@9.2:", when="+cuda @1.5.0:")
depends_on("cuda@10.1:", when="+cuda @1.7.0:")
- depends_on("mpi", when="+mpi")
+ depends_on("mpi@3.1:", when="+mpi")
depends_on("rocthrust", when="+rocm")
depends_on("hipsparse", when="+rocm")
@@ -68,6 +74,8 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
# setup for rocthrust, this needs to also be added here.
depends_on("rocprim", when="+rocm")
depends_on("hwloc@2.1:", when="+hwloc")
+ # TODO: replace with the next PAPI version when available (>7.0.1.0)
+ depends_on("papi@master+sde", when="+sde")
depends_on("googletest", type="test")
depends_on("numactl", type="test", when="+hwloc")
@@ -78,7 +86,6 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
conflicts("%gcc@:5.2.9")
conflicts("+rocm", when="@:1.1.1")
- conflicts("+mpi", when="@:1.4.0")
# ROCm 4.1.0 breaks platform settings which breaks Ginkgo's HIP support.
conflicts("^hip@4.1.0:", when="@:1.3.0")
@@ -98,19 +105,35 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
"+sycl", when="@:1.4.0", msg="For SYCL support, please use Ginkgo version 1.4.0 and newer."
)
+ # Probably fixed in NVIDIA/cccl#1528 which hopefully comes with the next CUDA release
+ conflicts("^cuda@12.4", when="+cuda", msg="CCCL 2.3 bug causes build failure.")
+
+ # https://github.com/ginkgo-project/ginkgo/pull/1524
+ patch("ginkgo-sycl-pr1524.patch", when="@1.7.0 +sycl %oneapi@2024:")
+
+ # https://github.com/ginkgo-project/ginkgo/pull/1585
+ patch("ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch", when="@1.7.0 +sycl %oneapi@2024.1:")
+
# Skip smoke tests if compatible hardware isn't found
patch("1.4.0_skip_invalid_smoke_tests.patch", when="@1.4.0")
# Add missing include statement
patch("thrust-count-header.patch", when="+rocm @1.5.0")
+ # Correctly find rocthrust through CMake
+ patch(
+ "https://github.com/ginkgo-project/ginkgo/pull/1668.patch?full_index=1",
+ sha256="27d6ae6c87bec15464d20a963c336e89eac92625d07e3f9548e33cd7b952a496",
+ when="+rocm @1.8.0",
+ )
+
def setup_build_environment(self, env):
spec = self.spec
- if "+sycl" in spec:
+ if spec.satisfies("+sycl"):
env.set("MKLROOT", join_path(spec["intel-oneapi-mkl"].prefix, "mkl", "latest"))
env.set("DPL_ROOT", join_path(spec["intel-oneapi-dpl"].prefix, "dpl", "latest"))
# The `IntelSYCLConfig.cmake` is broken with spack. By default, it
- # relies on the CMAKE_CXX_COMPILER being the real ipcx/dpcpp
+ # relies on the CMAKE_CXX_COMPILER being the real ipcx
# compiler. If not, the variable SYCL_COMPILER of that script is
# broken, and all the SYCL detection mechanism is wrong. We fix it
# by giving hint environment variables.
@@ -136,6 +159,8 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
raise InstallError("ginkgo +sycl requires %oneapi@2021.3.0:")
elif self.spec.satisfies("@1.7.0: +sycl") and not self.spec.satisfies("%oneapi@2022.1.0:"):
raise InstallError("ginkgo +sycl requires %oneapi@2022.1.0:")
+ elif self.spec.satisfies("@1.8.0: +sycl") and not self.spec.satisfies("%oneapi@2023.1.0:"):
+ raise InstallError("ginkgo +sycl requires %oneapi@2023.1.0:")
spec = self.spec
from_variant = self.define_from_variant
@@ -148,6 +173,7 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
from_variant("BUILD_SHARED_LIBS", "shared"),
from_variant("GINKGO_JACOBI_FULL_OPTIMIZATIONS", "full_optimizations"),
from_variant("GINKGO_BUILD_HWLOC", "hwloc"),
+ from_variant("GINKGO_WITH_PAPI_SDE", "sde"),
from_variant("GINKGO_DEVEL_TOOLS", "develtools"),
# As we are not exposing benchmarks, examples, tests nor doc
# as part of the installation, disable building them altogether.
@@ -163,13 +189,13 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
if self.run_tests:
args.append("-DGINKGO_USE_EXTERNAL_GTEST=ON")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
archs = spec.variants["cuda_arch"].value
if archs != "none":
arch_str = ";".join(archs)
args.append("-DGINKGO_CUDA_ARCHITECTURES={0}".format(arch_str))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
args.append("-DHIP_PATH={0}".format(spec["hip"].prefix))
args.append("-DHIP_CLANG_PATH={0}/bin".format(spec["llvm-amdgpu"].prefix))
args.append("-DHIP_CLANG_INCLUDE_PATH={0}/include".format(spec["llvm-amdgpu"].prefix))
@@ -187,10 +213,10 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip)
)
- if "+sycl" in self.spec:
- sycl_compatible_compilers = ["dpcpp", "icpx"]
+ if self.spec.satisfies("+sycl"):
+ sycl_compatible_compilers = ["icpx"]
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
- raise InstallError("ginkgo +sycl requires DPC++ (dpcpp) or icpx compiler.")
+ raise InstallError("ginkgo +sycl requires icpx compiler.")
return args
@property
@@ -199,7 +225,7 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
@run_after("install")
def cache_test_sources(self):
- self.cache_extra_test_sources(self.extra_install_tests)
+ cache_extra_test_sources(self, self.extra_install_tests)
def _cached_tests_src_dir(self, script):
"""The cached smoke test source directory for the script."""
@@ -217,7 +243,7 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
]
# Fix: For HIP tests, add the ARCH compilation flags when not present
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
src_path = join_path(src_dir, "CMakeLists.txt")
cmakelists = open(src_path, "rt")
data = cmakelists.read()
diff --git a/var/spack/repos/builtin/packages/git-annex/package.py b/var/spack/repos/builtin/packages/git-annex/package.py
index be50387287..2cecdfce1b 100644
--- a/var/spack/repos/builtin/packages/git-annex/package.py
+++ b/var/spack/repos/builtin/packages/git-annex/package.py
@@ -47,7 +47,7 @@ class GitAnnex(Package):
# - $ git annex whereis git-annex/linux/current/git-annex-standalone-arm64.tar.gz
# -> gives web url
- skip_version_audit = ["platform=darwin"]
+ skip_version_audit = ["platform=darwin", "platform=windows"]
license("AGPL-3.0-or-later")
@@ -124,7 +124,7 @@ class GitAnnex(Package):
def install(self, spec, prefix):
install_tree(".", prefix.bin)
- if "~standalone" in spec:
+ if spec.satisfies("~standalone"):
# use git provided by spack instead of the one in the package
git_files = ["git", "git-receive-pack", "git-shell", "git-upload-pack"]
for i in git_files:
diff --git a/var/spack/repos/builtin/packages/git-lfs/package.py b/var/spack/repos/builtin/packages/git-lfs/package.py
index e2e9ffe793..5e22601b80 100644
--- a/var/spack/repos/builtin/packages/git-lfs/package.py
+++ b/var/spack/repos/builtin/packages/git-lfs/package.py
@@ -26,6 +26,8 @@ class GitLfs(MakefilePackage):
license("MIT")
+ version("3.5.1", sha256="d682a12c0bc48d08d28834dd0d575c91d53dd6c6db63c45c2db7c3dd2fb69ea4")
+ version("3.4.1", sha256="2a36239d7968ae18e1ba2820dc664c4ef753f10bf424f98bccaf44d527f19a17")
version("3.3.0", sha256="d5eeb9ee33188d3dd6a391f8a39b96d271f10295129789e5b3a1ac0e9f5114f5")
version("3.1.2", sha256="5c9bc449068d0104ea124c25f596af16da85e7b5bf256bc544d8ce5f4fe231f2")
version("2.13.3", sha256="f8bd7a06e61e47417eb54c3a0db809ea864a9322629b5544b78661edab17b950")
@@ -39,6 +41,10 @@ class GitLfs(MakefilePackage):
version("2.7.0", sha256="1c829ddd163be2206a44edb366bd7f6d84c5afae3496687405ca9d2a5f3af07b")
version("2.6.1", sha256="e17cd9d4e66d1116be32f7ddc7e660c7f8fabbf510bc01b01ec15a22dd934ead")
+ depends_on("go@1.21:", type="build", when="@3.5:")
+ depends_on("go@1.20:", type="build", when="@3.4:")
+ depends_on("go@1.19:", type="build", when="@3.3:")
+ depends_on("go@1.18:", type="build", when="@3.2:")
depends_on("go@1.17:", type="build", when="@2.13:")
depends_on("go@1.5:", type="build", when="@:2.12")
depends_on("git@1.8.2:", type="run")
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index 3dfe1d6cc2..9b5abba5fc 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -6,6 +6,7 @@
import os
import re
+import spack.fetch_strategy
from spack.package import *
from spack.util.environment import is_system_path
@@ -16,7 +17,7 @@ class Git(AutotoolsPackage):
projects with speed and efficiency.
"""
- homepage = "http://git-scm.com"
+ homepage = "https://git-scm.com"
url = "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz"
maintainers("jennfshr")
@@ -29,165 +30,105 @@ class Git(AutotoolsPackage):
# Every new git release comes with a corresponding manpage resource:
# https://www.kernel.org/pub/software/scm/git/git-manpages-{version}.tar.gz
# https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc
- version("2.42.0", sha256="34aedd54210d7216a55d642bbb4cfb22695b7610719a106bf0ddef4c82a8beed")
- version("2.41.0", sha256="c4a6a3dd1827895a80cbd824e14d94811796ae54037549e0da93f7b84cb45b9f")
- version("2.40.1", sha256="55511f10f3b1cdf5db4e0e3dea61819dfb67661b0507a5a2b061c70e4f87e14c")
- version("2.39.3", sha256="2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e")
- version("2.38.5", sha256="09392caf6ff296341022595a175d8b075bc98b6a82f6227d3bd21e36a2a812c3")
- version("2.37.7", sha256="2108fa57b74add4300b8960e9404e0ed3e5f0efda7470450c67c67e8ab7616d5")
- version("2.36.6", sha256="a8c09f46d5d16a8d8f19e8089aeb408d95d8097af03de297061e83a2c74890dd")
- version("2.35.8", sha256="3a675e0128a7153e1492bbe14d08195d44b5916e6b8879addf94b1f4add77dca")
- version("2.34.8", sha256="10a6c233471d7d4439cd4004961a3f4ff7e6de308645a1074ec3522b8ea52c83")
- version("2.33.8", sha256="eafd10da9fdf86be0a79beb67c3537eead114f91836c685d5b9c969c961516ae")
- version("2.32.7", sha256="f09904d13a9bfca5fcb228c3caba1d4c17426dec0000bf67672af257b8a73db4")
- version("2.31.8", sha256="d2443e368b1394858a1040bd74dacfba46bce2cf3410ef3bc5089a703fc91e9a")
- version("2.30.9", sha256="b14b5f4ce1fe23ed78839664c7ba888fb5cedba3dd98d9f5a499a36fa3a4a2d8")
-
- # Deprecated versions
+ version("2.47.0", sha256="a84a7917e0ab608312834413f01fc01edc7844f9f9002ba69f3b4f4bcb8d937a")
+ version("2.46.2", sha256="65c5689fd44f1d09de7fd8c44de7fef074ddd69dda8b8503d44afb91495ecbce")
+ version("2.45.2", sha256="98b26090ed667099a3691b93698d1e213e1ded73d36a2fde7e9125fce28ba234")
+ version("2.44.2", sha256="f0655e81c5ecfeef7440aa4fcffa1c1a77eaccf764d6fe29579e9a06eac2cd04")
+ version("2.43.5", sha256="324c3b85d668e6afe571b3502035848e4b349dead35188e2b8ab1b96c0cd45ff")
+ version("2.42.3", sha256="f42a8e8f6c0add4516f9e4607554c8ad698161b7d721b82073fe315a59621961")
+ version("2.41.2", sha256="481aa0a15aa37802880a6245b96c1570d7337c44700d5d888344cd6d43d85306")
+ version("2.40.3", sha256="b3dc96b20edcdbe6bea7736ea55bb80babf683d126cc7f353ed4e3bc304cd7da")
+ version("2.39.5", sha256="ca0ec03fb2696f552f37135a56a0242fa062bd350cb243dc4a15c86f1cafbc99")
+
+ # Deprecated versions (https://groups.google.com/g/git-packagers/c/x6-nKLV20aE)
version(
- "2.40.0",
- sha256="ab37c343c0ad097282fd311ab9ca521ab3da836e5c4ed2093994f1b7f8575b09",
+ "2.45.1",
+ sha256="10acb581993061e616be9c5674469335922025a666318e0748cb8306079fef24",
deprecated=True,
)
version(
- "2.39.2",
- sha256="fb6807d1eb4094bb2349ab97d203fe1e6c3eb28af73ea391decfbd3a03c02e85",
+ "2.44.1",
+ sha256="118214bb8d7ba971a62741416e757562b8f5451cefc087a407e91857897c92cc",
deprecated=True,
)
version(
- "2.39.1",
- sha256="ae8d3427e4ccd677abc931f16183c0ec953e3bfcd866493601351e04a2b97398",
+ "2.43.4",
+ sha256="bfd717dc31922f718232a25a929d199e26146df5e876fdf0ff90a7cc95fa06e2",
deprecated=True,
)
version(
- "2.38.3",
- sha256="ba8f1c56763cfde0433657b045629a4c55047c243eb3091d39dea6f281c8d8e1",
+ "2.42.2",
+ sha256="3b24b712fa6e9a3da5b7d3e68b1854466905aadb93a43088a38816bcc3b9d043",
deprecated=True,
)
version(
- "2.38.1",
- sha256="620ed3df572a34e782a2be4c7d958d443469b2665eac4ae33f27da554d88b270",
+ "2.41.1",
+ sha256="06d2a681aa7f1bdb6e7f7101631407e7412faa534e1fa0eb6fdcb9975d867d31",
deprecated=True,
)
version(
- "2.37.5",
- sha256="5c11f90652afee6c77ef7ddfc672facd4bc6f2596d9627df2f1780664b058b9a",
+ "2.40.2",
+ sha256="1dcdfbb4eeb3ef2c2d9154f888d4a6f0cf19f19acad76f0d32e725e7bc147753",
deprecated=True,
)
version(
- "2.37.4",
- sha256="a638c9bf9e45e8d48592076266adaa9b7aa272a99ee2aee2e166a649a9ba8a03",
- deprecated=True,
- )
- version(
- "2.36.3",
- sha256="0c831b88b0534f08051d1287505dfe45c367108ee043de6f1c0502711a7aa3a6",
- deprecated=True,
- )
- version(
- "2.35.6",
- sha256="6bd51e0487028543ba40fe3d5b33bd124526a7f7109824aa7f022e79edf93bd1",
- deprecated=True,
- )
- version(
- "2.35.5",
- sha256="2cca63fe7bebb5b4bf8efea7b46b12bb89c16ff9711b6b6d845928501d00d0a3",
- deprecated=True,
- )
- version(
- "2.34.6",
- sha256="01c0ae4161a07ffeb89cfb8bda564eb2dcb83b45b678cf2930cdbdd8e81784d0",
- deprecated=True,
- )
- version(
- "2.34.5",
- sha256="26831c5e48a8c2bf6a4fede1b38e1e51ffd6dad85952cf69ac520ebd81a5ae82",
- deprecated=True,
- )
- version(
- "2.33.6",
- sha256="76f6a64a198bec38e83044f97fb5a2dfa8404091df5a905404615d2a4c5ebfb7",
- deprecated=True,
- )
- version(
- "2.33.5",
- sha256="d061ed97f890befaef18b4aad80a37b40db90bcf24113c42765fee157a69c7de",
- deprecated=True,
- )
- version(
- "2.32.5",
- sha256="9982e17209cf4a385ce4a6167863cdd29f68e425d4249aac186434dc3536fe5f",
- deprecated=True,
- )
- version(
- "2.32.4",
- sha256="4c791b8e1d96948c9772efc21373ab9b3187af42cdebc3bcbb1a06d794d4e494",
+ "2.39.4",
+ sha256="b895ed2b5d98fd3dcfde5807f16d5fb17c4f83044e7d08e597ae13de222f0d26",
deprecated=True,
)
+
+ # Deprecated versions (see https://github.blog/2024-05-14-securing-git-addressing-5-new-vulnerabilities/).
version(
- "2.31.6",
- sha256="73971208dccdd6d87639abe50ee3405421ec4ba05dec9f8aa90b4e7f1985e15c",
+ "2.42.0",
+ sha256="34aedd54210d7216a55d642bbb4cfb22695b7610719a106bf0ddef4c82a8beed",
deprecated=True,
)
version(
- "2.31.5",
- sha256="2d4197660322937cc44cab5742deef727ba519ef7405455e33100912e3b019f2",
+ "2.41.0",
+ sha256="c4a6a3dd1827895a80cbd824e14d94811796ae54037549e0da93f7b84cb45b9f",
deprecated=True,
)
version(
- "2.30.7",
- sha256="c98bf38a296f23ad5619a097df928044b31859df8f89b3ae5a8ea109d3ebd88e",
+ "2.40.1",
+ sha256="55511f10f3b1cdf5db4e0e3dea61819dfb67661b0507a5a2b061c70e4f87e14c",
deprecated=True,
)
version(
- "2.30.6",
- sha256="a6130b38843a5c80e80fb4f7ac4864d361cbf103d262b64e267264e49440d24a",
+ "2.39.3",
+ sha256="2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e",
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
for _version, _sha256_manpage in {
+ "2.47.0": "1a6f1e775dfe324a9b521793cbd2b3bba546442cc2ac2106d4df33dea9005038",
+ "2.46.2": "4bc3774ee4597098977befa4ec30b0f2cbed3b59b756e7cbb59ce1738682d43a",
+ "2.45.2": "48c1e2e3ecbb2ce9faa020a19fcdbc6ce64ea25692111b5930686bc0bb4f0e7f",
+ "2.45.1": "d9098fd93a3c0ef242814fc856a99886ce31dae2ba457afc416ba4e92af8f8f5",
+ "2.44.2": "ee6a7238d5ede18fe21c0cc2131c7fbff1f871c25e2848892ee864d40baf7218",
+ "2.44.1": "8d80359e44cbcce256c1eb1389cb8e15ccfcd267fbb8df567d5ce19ce006eb42",
+ "2.43.5": "df3c3d0f0834959aa33005e6f8134c1e56ab01f34d1497ceb34b2dd8ec7d4de4",
+ "2.43.4": "99d3a0394a6093237123237fd6c0d3de1041d5ceaedc3bfc016807914275d3e2",
+ "2.42.3": "3c8c55dcbc3f59560c63e6ced400f7251e9a00d876d365cb4fe9be6b3c3e3713",
+ "2.42.2": "2ddfa2187fdaf9ab2b27c0ab043e46793127c26c82a824ffe980f006be049286",
"2.42.0": "51643c53d70ce15dde83b6da2bad76ba0c7bbcd4f944d7c378f03a15b9f2e1de",
+ "2.41.2": "a758988c81478a942e1593ecf11568b962506bff1119061bad04bd4149b40c2c",
+ "2.41.1": "7093ef7dacfa8cdb3c4689d8bc1f06186d9b2420bec49087a3a6a4dee26ddcec",
"2.41.0": "7b77c646b36d33c5c0f62677a147142011093270d6fd628ca38c42d5301f3888",
+ "2.40.3": "fa9b837e1e161ebdbbbfde27a883a90fe5f603ce1618086a384bccda59c47de5",
+ "2.40.2": "2c71f3f3e4801176f97708f2093756bce672ef260c6d95c255046e6727b3a031",
"2.40.1": "6bbde434121bd0bf8aa574c60fd9a162388383679bd5ddd99921505149ffd4c2",
- "2.40.0": "fda16047e9c1dd07d9585cc26bbf4002ebf8462ada54cb72b97a0e48135fd435",
+ "2.39.5": "16aac22749bd55d845c422068702781a9c89e6cdde7de1c3aa1dd0fb41aeae39",
+ "2.39.4": "fedd01dd22a15b84bcbcad68c1b37113ba2c64381c19b6c9f3aa9b2818e126dc",
"2.39.3": "c8377b5a3ff497d7e6377363c270931496e982509ff27a1e46956d6637671642",
- "2.39.2": "fd92e67fb750ceb2279dcee967a21303f2f8117834a21c1e0c9f312ebab6d254",
- "2.39.1": "b2d1b2c6cba2343934792c4409a370a8c684add1b3c0f9b757e71189b1a2e80e",
- "2.38.5": "648f2b89c9a173c3a687b99629208222170a398c7b14ed92de128656123c73cd",
- "2.38.3": "9e5c924f6f1c961e09d1a8926c2775a158a0375a3311205d7a6176a3ed522272",
- "2.38.1": "fcb27484406b64419a9f9890e95ef29af08e1f911d9d368546eddc59a18e245d",
- "2.37.7": "475a894584ecc8b278d592a2d99c5c4a4a863485f5126508bcef686cba4a4ac0",
- "2.37.5": "9fab559197891fc1b499cb57513effce7462383f861ac6a7791a46f5348dd7fe",
- "2.37.4": "06ed920949e717f3ab13c98327ee63cae5e3020ac657d14513ef8f843109b638",
- "2.36.6": "08bded34c0ff49b7e8d5d0778511a07f191751c6edb98aaf2cee4c96962cc94c",
- "2.36.3": "c5f5385c2b46270a8ce062a9c510bfa4288d9cca54efe0dff48a12ca969cfc6f",
- "2.35.8": "f85e549d37936df744fd78c1ce670c1682bdd2f35d1f072883b82babe66e484a",
- "2.35.6": "5e44e05a97f49d7a170a7303f795063b19bc78560acd7458274882f19b631187",
- "2.35.5": "6cbd4d2185c7a757db21f873973fa1efb81069d8b8b8cc350ca6735cb98f45c5",
- "2.34.8": "e43e75edb8d339ceed4990b5054eb2302efc857d0feab690598e14dbdb9bcccc",
- "2.34.6": "70c784ced9c5ccbd4137d676b032e2ccffeea8aef3094626c2b44d6c843547df",
- "2.34.5": "897941be5b223b9d32217adb64ea8747db2ba57be5f68be598c44d747d1061b2",
- "2.33.8": "9b49f931e58001d818b2cba7eb6d0242965cfb1eaa5194271b88fcc4529b4987",
- "2.33.6": "d7b9170dc7d6f461e00731cf5cf6e4b589e90c8d4eac440fd3e8b5e3d11f0b8f",
- "2.33.5": "34648ede9ac2869190083ee826065c36165e54d9e2906b10680261b243d89890",
- "2.32.7": "dcce6d701f99190e081f74b539389cdf4674ddbcd4af143631034354a5db39fc",
- "2.32.5": "99b236824f1677e15b21514e310d7a0954586d031ffc3a873a4e2138ed073f15",
- "2.32.4": "fa73d0eac384e594efdd4c21343545e407267ab64e970a6b395c7f1874ddb0bf",
- "2.31.8": "73722b9487456d7605beec65a9fa9415410faa8b9f8a5fd209d75be47bf1a968",
- "2.31.6": "2e2f921d8ef8a839e05ba3a1cea8f864a49b04648378bf0253213a5d4f1642fe",
- "2.31.5": "18850fc8f1c34e51a0a98b9f974b8356a5d63a53c96fb9fe3dc2880ee84746ab",
- "2.30.9": "a3f61fe08453dd88fdd84a28ee6d4c9fbd710a7b1ead7ce5c976146656714ece",
- "2.30.7": "4fc6063c229453de244a88c71f688a2508f30b80ebd47353cc68d730ea1b82aa",
- "2.30.6": "6c20ab10be233e8ff7838351fa5210e972c08005ec541a5241f626cfd4adebfe",
}.items():
resource(
name="git-manpages",
- url="https://www.kernel.org/pub/software/scm/git/git-manpages-{0}.tar.gz".format(
- _version
- ),
+ url=f"https://www.kernel.org/pub/software/scm/git/git-manpages-{_version}.tar.gz",
sha256=_sha256_manpage,
placement="git-manpages",
- when="@{0} +man".format(_version),
+ when=f"@{_version} +man",
)
variant("tcltk", default=False, description="Gitk: provide Tcl/Tk in the run environment")
@@ -207,8 +148,7 @@ class Git(AutotoolsPackage):
depends_on("iconv")
depends_on("libidn2")
depends_on("openssl")
- depends_on("pcre", when="@:2.13")
- depends_on("pcre2", when="@2.14:")
+ depends_on("pcre2")
depends_on("perl", when="+perl")
depends_on("zlib-api")
depends_on("openssh", type="run")
@@ -250,7 +190,7 @@ class Git(AutotoolsPackage):
# In that case the node in the DAG gets truncated and git DOES NOT
# have a gettext dependency.
spec = self.spec
- if "+nls" in spec:
+ if spec.satisfies("+nls"):
if "intl" in spec["gettext"].libs.names:
extlib_bits = []
if not is_system_path(spec["gettext"].prefix):
@@ -265,7 +205,7 @@ class Git(AutotoolsPackage):
# For build step:
env.append_flags("EXTLIBS", curlconfig("--static-libs", output=str).strip())
- if "~perl" in self.spec:
+ if self.spec.satisfies("~perl"):
env.append_flags("NO_PERL", "1")
def configure_args(self):
@@ -278,21 +218,17 @@ class Git(AutotoolsPackage):
"--with-zlib={0}".format(spec["zlib-api"].prefix),
]
- if not self.spec["iconv"].name == "libc":
- configure_args.append(
- "--with-iconv={0}".format(
- "yes" if is_system_path(spec["iconv"].prefix) else spec["iconv"].prefix
- )
- )
+ if self.spec["iconv"].name == "libiconv":
+ configure_args.append(f"--with-iconv={self.spec['iconv'].prefix}")
- if "+perl" in self.spec:
+ if self.spec.satisfies("+perl"):
configure_args.append("--with-perl={0}".format(spec["perl"].command.path))
- if "^pcre" in self.spec:
+ if self.spec.satisfies("^pcre"):
configure_args.append("--with-libpcre={0}".format(spec["pcre"].prefix))
- if "^pcre2" in self.spec:
+ if self.spec.satisfies("^pcre2"):
configure_args.append("--with-libpcre2={0}".format(spec["pcre2"].prefix))
- if "+tcltk" in self.spec:
+ if self.spec.satisfies("+tcltk"):
configure_args.append("--with-tcltk={0}".format(self.spec["tk"].prefix.bin.wish))
else:
configure_args.append("--without-tcltk")
@@ -310,7 +246,7 @@ class Git(AutotoolsPackage):
def build(self, spec, prefix):
args = []
- if "~nls" in self.spec:
+ if self.spec.satisfies("~nls"):
args.append("NO_GETTEXT=1")
make(*args)
@@ -320,7 +256,7 @@ class Git(AutotoolsPackage):
def install(self, spec, prefix):
args = ["install"]
- if "~nls" in self.spec:
+ if self.spec.satisfies("~nls"):
args.append("NO_GETTEXT=1")
make(*args)
@@ -332,11 +268,26 @@ class Git(AutotoolsPackage):
@run_after("install")
def install_completions(self):
- install_tree("contrib/completion", self.prefix.share)
+ mkdirp(bash_completion_path(self.prefix))
+ install(
+ "contrib/completion/git-completion.bash",
+ join_path(bash_completion_path(self.prefix), "git"),
+ )
+
+ mkdirp(zsh_completion_path(self.prefix))
+ filter_file(
+ r"\$bash_completion\/git",
+ join_path(bash_completion_path(self.prefix), "git"),
+ "contrib/completion/git-completion.zsh",
+ )
+ install(
+ "contrib/completion/git-completion.zsh",
+ join_path(zsh_completion_path(self.prefix), "_git"),
+ )
@run_after("install")
def install_manpages(self):
- if "~man" in self.spec:
+ if self.spec.satisfies("~man"):
return
prefix = self.prefix
@@ -348,7 +299,7 @@ class Git(AutotoolsPackage):
@run_after("install")
def install_subtree(self):
- if "+subtree" in self.spec:
+ if self.spec.satisfies("+subtree"):
with working_dir("contrib/subtree"):
make_args = ["V=1", "prefix={}".format(self.prefix.bin)]
make(" ".join(make_args))
@@ -361,7 +312,7 @@ class Git(AutotoolsPackage):
# Libs from perl-alien-svn and apr-util are required in
# LD_LIBRARY_PATH
# TODO: extend to other platforms
- if "+svn platform=linux" in self.spec:
+ if self.spec.satisfies("+svn platform=linux"):
perl_svn = self.spec["perl-alien-svn"]
env.prepend_path(
"LD_LIBRARY_PATH",
diff --git a/var/spack/repos/builtin/packages/gitconddb/package.py b/var/spack/repos/builtin/packages/gitconddb/package.py
index f42822459d..4499def68f 100644
--- a/var/spack/repos/builtin/packages/gitconddb/package.py
+++ b/var/spack/repos/builtin/packages/gitconddb/package.py
@@ -24,6 +24,8 @@ class Gitconddb(CMakePackage):
version("0.1.2", sha256="121ac34d8afffbd97b052cbb10f15e78cef962fe25ded85d88ab26e1677b72b5")
version("0.1.1", sha256="024a6867722a3a622ed4327ea7d15641dd48e4e8411bdcc21915e406b3c479a2")
+ depends_on("cxx", type="build") # generated
+
# Add the cxxstd variant for forward compatibility, though we require 17
_cxxstd_values = ("17",)
variant(
diff --git a/var/spack/repos/builtin/packages/gl2ps/package.py b/var/spack/repos/builtin/packages/gl2ps/package.py
index 59fcebe431..6826fd4fb0 100644
--- a/var/spack/repos/builtin/packages/gl2ps/package.py
+++ b/var/spack/repos/builtin/packages/gl2ps/package.py
@@ -19,6 +19,8 @@ class Gl2ps(CMakePackage):
version("1.4.0", sha256="03cb5e6dfcd87183f3b9ba3b22f04cd155096af81e52988cc37d8d8efe6cf1e2")
version("1.3.9", sha256="8a680bff120df8bcd78afac276cdc38041fed617f2721bade01213362bcc3640")
+ depends_on("c", type="build") # generated
+
variant("png", default=True, description="Enable PNG support")
variant("zlib", default=True, description="Enable compression using ZLIB")
variant("doc", default=False, description="Generate documentation using pdflatex")
@@ -31,6 +33,16 @@ class Gl2ps(CMakePackage):
depends_on("zlib-api", when="+zlib")
depends_on("texlive", type="build", when="+doc")
+ # gl2ps tries to build static and shared libs at once with the same
+ # target name. This causes ninja to fail the build
+ # This patch defines a new CL opt to toggle shared vs static
+ # and renames all lib target refs
+ # Patch derived from https://gitlab.onelab.info/gl2ps/gl2ps/-/issues/30
+ # and fixes a few additional places that solution misses.
+ with when("platform=windows"):
+ variant("shared", default=True, description="Enable building shared libraries")
+ patch("prevent-ninja-target-clash.patch")
+
def cmake_args(self):
spec = self.spec
options = [
@@ -48,7 +60,10 @@ class Gl2ps(CMakePackage):
if spec.satisfies("platform=darwin"):
options.append(self.define("CMAKE_MACOSX_RPATH", True))
- if "~doc" in spec:
+ if spec.satisfies("platform=windows"):
+ options.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+
+ if spec.satisfies("~doc"):
# Make sure we don't look.
options.append(self.define("CMAKE_DISABLE_FIND_PACKAGE_LATEX", True))
diff --git a/var/spack/repos/builtin/packages/gl2ps/prevent-ninja-target-clash.patch b/var/spack/repos/builtin/packages/gl2ps/prevent-ninja-target-clash.patch
new file mode 100644
index 0000000000..88dda9adbc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gl2ps/prevent-ninja-target-clash.patch
@@ -0,0 +1,49 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0001c4f..a2133de 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,6 +49,7 @@ project(gl2ps C)
+
+ option(ENABLE_ZLIB "Enable compression using ZLIB" ON)
+ option(ENABLE_PNG "Enable PNG support" ON)
++option(BUILD_SHARED_LIBS "Enable building shared libs" ON)
+
+ set(GL2PS_MAJOR_VERSION 1)
+ set(GL2PS_MINOR_VERSION 4)
+@@ -139,19 +140,17 @@ if(APPLE)
+ endif()
+
+ if(OPENGL_FOUND)
+- add_library(lib STATIC gl2ps.c gl2ps.h)
+- set_target_properties(lib PROPERTIES OUTPUT_NAME gl2ps)
++ add_library(gl2ps gl2ps.c gl2ps.h)
+
+- add_library(shared SHARED gl2ps.c gl2ps.h)
+- target_link_libraries(shared ${EXTERNAL_LIBRARIES})
+- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps
++ target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES})
++ set_target_properties(gl2ps PROPERTIES OUTPUT_NAME gl2ps
+ VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION}
+ SOVERSION ${GL2PS_MAJOR_VERSION})
+ if(WIN32 OR CYGWIN)
+- set_target_properties(shared PROPERTIES
++ set_target_properties(gl2ps PROPERTIES
+ COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS")
+ endif()
+- install(TARGETS lib shared RUNTIME DESTINATION bin
++ install(TARGETS gl2ps RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ endif()
+@@ -171,9 +170,9 @@ install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC})
+
+ if(GLUT_FOUND)
+ add_executable(gl2psTest WIN32 gl2psTest.c)
+- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES})
++ target_link_libraries(gl2psTest gl2ps ${EXTERNAL_LIBRARIES})
+ add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c)
+- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES})
++ target_link_libraries(gl2psTestSimple gl2ps ${EXTERNAL_LIBRARIES})
+ endif()
+
+ find_package(LATEX)
diff --git a/var/spack/repos/builtin/packages/glab/package.py b/var/spack/repos/builtin/packages/glab/package.py
index 9cb9a26c25..ed4eead798 100644
--- a/var/spack/repos/builtin/packages/glab/package.py
+++ b/var/spack/repos/builtin/packages/glab/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Glab(Package):
+class Glab(GoPackage):
"""GitLab's official command line tool."""
homepage = "https://gitlab.com/gitlab-org/cli"
@@ -16,6 +16,9 @@ class Glab(Package):
license("MIT")
+ version("1.48.0", sha256="45410de23a7bad37feeae18f47f3c0113d81133ad9bb97c8f0b8afc5409272c7")
+ version("1.46.1", sha256="935f732ddacc6e54fc83d06351fc25454ac8a58c465c3efa43e066ea226257c2")
+ version("1.36.0", sha256="8d6c759ebfe9c6942fcdb7055a4a5c7209a3b22beb25947f906c9aef3bc067e8")
version("1.35.0", sha256="7ed31c7a9b425fc15922f83c5dd8634a2758262a4f25f92583378655fcad6303")
version("1.33.0", sha256="447a9b76acb5377642a4975908f610a3082026c176329c7c8cfed1461d2e1570")
version("1.31.0", sha256="5648e88e7d6cc993227f5a4e80238af189bed09c7aed1eb12be7408e9a042747")
@@ -30,18 +33,30 @@ class Glab(Package):
version("1.20.0", sha256="6beb0186fa50d0dea3b05fcfe6e4bc1f9be0c07aa5fa15b37ca2047b16980412")
depends_on("go@1.13:", type="build")
- depends_on("go@1.17:", type="build", when="@1.22.0:")
- depends_on("go@1.18:", type="build", when="@1.23.0:")
-
- phases = ["build", "install"]
-
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
-
- def build(self, spec, prefix):
- make()
-
- def install(self, spec, prefix):
- mkdirp(prefix.bin)
- install("bin/glab", prefix.bin)
+ depends_on("go@1.17:", type="build", when="@1.22:")
+ depends_on("go@1.18:", type="build", when="@1.23:")
+ depends_on("go@1.19:", type="build", when="@1.35:")
+ depends_on("go@1.21:", type="build", when="@1.37:")
+ depends_on("go@1.22.3:", type="build", when="@1.41:")
+ depends_on("go@1.22.4:", type="build", when="@1.42:")
+ depends_on("go@1.22.5:", type="build", when="@1.44:")
+ depends_on("go@1.23:", type="build", when="@1.46:")
+ depends_on("go@1.23.2:", type="build", when="@1.48:")
+
+ build_directory = "cmd/glab"
+
+ @run_after("install")
+ def install_completions(self):
+ glab = Executable(self.prefix.bin.glab)
+
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "glab", "w") as file:
+ glab("completion", "-s", "bash", output=file)
+
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "glab.fish", "w") as file:
+ glab("completion", "-s", "fish", output=file)
+
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_glab", "w") as file:
+ glab("completion", "-s", "zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/glew/package.py b/var/spack/repos/builtin/packages/glew/package.py
index 22ec0dbb68..43db0431d2 100644
--- a/var/spack/repos/builtin/packages/glew/package.py
+++ b/var/spack/repos/builtin/packages/glew/package.py
@@ -2,16 +2,13 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import sys
-
from spack.package import *
class Glew(CMakePackage):
"""The OpenGL Extension Wrangler Library."""
- homepage = "http://glew.sourceforge.net/"
+ homepage = "https://glew.sourceforge.net/"
url = "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz"
root_cmakelists_dir = "build/cmake"
@@ -23,29 +20,11 @@ class Glew(CMakePackage):
version("2.1.0", sha256="04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95")
version("2.0.0", sha256="c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764")
- variant(
- "gl",
- default="glx" if sys.platform.startswith("linux") else "other",
- values=("glx", "osmesa", "egl", "other"),
- multi=False,
- description="The OpenGL provider to use",
- )
- conflicts("^osmesa", when="gl=glx")
- conflicts("^osmesa", when="gl=egl")
- conflicts("^osmesa", when="gl=other")
- conflicts("^glx", when="gl=osmesa")
- conflicts("^glx", when="gl=other")
- conflicts("^glx", when="gl=egl")
- conflicts("^egl", when="gl=glx")
- conflicts("^egl", when="gl=osmesa")
- conflicts("^egl", when="gl=other")
+ depends_on("c", type="build") # generated
depends_on("gl")
- depends_on("osmesa", when="gl=osmesa")
- depends_on("glx", when="gl=glx")
- depends_on("libx11", when="gl=glx")
- depends_on("xproto", when="gl=glx")
- depends_on("egl", when="gl=egl")
+ depends_on("libx11", when="^[virtuals=gl] glx")
+ depends_on("xproto", when="^[virtuals=gl] glx")
# glu is already forcibly disabled in the CMakeLists.txt. This prevents
# it from showing up in the .pc file
@@ -56,18 +35,15 @@ class Glew(CMakePackage):
args = [
self.define("BUILD_UTILS", True),
self.define("GLEW_REGAL", False),
- self.define("GLEW_EGL", "gl=egl" in spec),
- self.define("OpenGL_GL_PREFERENCE", "LEGACY"),
+ self.define("GLEW_EGL", spec.satisfies("^[virtuals=gl] egl")),
self.define("OPENGL_INCLUDE_DIR", spec["gl"].headers.directories[0]),
self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0]),
self.define("OPENGL_opengl_LIBRARY", "IGNORE"),
self.define("OPENGL_glx_LIBRARY", "IGNORE"),
self.define("OPENGL_glu_LIBRARY", "IGNORE"),
- self.define("GLEW_OSMESA", "gl=osmesa" in spec),
- self.define("GLEW_X11", "gl=glx" in spec),
- self.define("CMAKE_DISABLE_FIND_PACKAGE_X11", "gl=glx" not in spec),
+ self.define("GLEW_OSMESA", spec.satisfies("^[virtuals=gl] osmesa")),
]
- if "gl=egl" in spec:
+ if spec.satisfies("^[virtuals=gl] egl"):
args.append(
self.define("OPENGL_egl_LIBRARY", [spec["egl"].libs[0], spec["egl"].libs[1]])
)
@@ -75,3 +51,8 @@ class Glew(CMakePackage):
args.append(self.define("OPENGL_egl_LIBRARY", "IGNORE"))
return args
+
+ def flag_handler(self, name, flags):
+ if name == "ldflags" and self.spec.satisfies("platform=darwin ^apple-gl"):
+ flags.append("-framework OpenGL")
+ return flags, None, None
diff --git a/var/spack/repos/builtin/packages/glfmultiples/package.py b/var/spack/repos/builtin/packages/glfmultiples/package.py
index 4ed24a0573..ca2be8bdbb 100644
--- a/var/spack/repos/builtin/packages/glfmultiples/package.py
+++ b/var/spack/repos/builtin/packages/glfmultiples/package.py
@@ -21,6 +21,8 @@ class Glfmultiples(MakefilePackage):
"2010-06-16", sha256="f7abef6f6b043e9052fb408bb2aae6d0d97d907aedc1b3e02dd0db08eb81b979"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/glfw/package.py b/var/spack/repos/builtin/packages/glfw/package.py
index bdaadb3cfd..ba005f779c 100644
--- a/var/spack/repos/builtin/packages/glfw/package.py
+++ b/var/spack/repos/builtin/packages/glfw/package.py
@@ -29,6 +29,8 @@ class Glfw(CMakePackage):
version("3.0.4", sha256="a4e7c57db2086803de4fc853bd472ff8b6d2639b9aa16e6ac6b19ffb53958caf")
version("3.0.3", sha256="7a182047ba6b1fdcda778b79aac249bb2328b6d141188cb5df29560715d01693")
+ depends_on("c", type="build") # generated
+
variant("doc", default=False, description="Build documentation")
variant("shared", default=False, description="Builds a shared version of the library")
diff --git a/var/spack/repos/builtin/packages/glib-networking/package.py b/var/spack/repos/builtin/packages/glib-networking/package.py
index 998c0d7bee..d44f39fd5e 100644
--- a/var/spack/repos/builtin/packages/glib-networking/package.py
+++ b/var/spack/repos/builtin/packages/glib-networking/package.py
@@ -18,7 +18,10 @@ class GlibNetworking(MesonPackage):
version("2.65.90", sha256="91b35c5d7472d10229b0b01c0631ac171903e96f84a6fb22c4126a40528c09e2")
version("2.65.1", sha256="d06311004f7dda4561c210f286a3678b631fb7187cb3b90616c5ba39307cc91f")
+ depends_on("c", type="build")
+
depends_on("gettext", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("glib")
depends_on("gnutls")
depends_on("gsettings-desktop-schemas")
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index f09a32a3cf..5a32596e38 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -5,6 +5,8 @@
import os.path
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
from spack.util.environment import is_system_path
@@ -28,7 +30,14 @@ class Glib(MesonPackage, AutotoolsPackage):
license("LGPL-2.1-or-later")
- version("2.78.3", sha256="609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21")
+ # Even minor versions are stable, odd minor versions are development, only add even numbers
+ version("2.82.2", sha256="ab45f5a323048b1659ee0fbda5cecd94b099ab3e4b9abf26ae06aeb3e781fd63")
+ # No real reason to prefer older versions, `preferred` should be removed after testing
+ version(
+ "2.78.3",
+ sha256="609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21",
+ preferred=True,
+ )
version("2.78.0", sha256="44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30")
version("2.76.6", sha256="1136ae6987dcbb64e0be3197a80190520f7acab81e2bfb937dc85c11c8aa9f04")
version("2.76.4", sha256="5a5a191c96836e166a7771f7ea6ca2b0069c603c7da3cba1cd38d1694a395dda")
@@ -120,6 +129,9 @@ class Glib(MesonPackage, AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("libmount", default=False, description="Build with libmount support")
variant(
"tracing",
@@ -134,6 +146,8 @@ class Glib(MesonPackage, AutotoolsPackage):
)
with when("build_system=meson"):
+ depends_on("meson@1.4:", when="@2.83:", type="build")
+ depends_on("meson@1.2:", when="@2.79:", type="build")
depends_on("meson@0.60.0:", when="@2.73:", type="build")
depends_on("meson@0.52.0:", when="@2.71:2.72", type="build")
depends_on("meson@0.49.2:", when="@2.61.2:2.70", type="build")
@@ -144,8 +158,9 @@ class Glib(MesonPackage, AutotoolsPackage):
depends_on("zlib-api")
depends_on("gettext")
depends_on("perl", type=("build", "run"))
+ depends_on("python", type=("build", "run"), when="@2.53.4:")
# Uses distutils in gio/gdbus-2.0/codegen/utils.py
- depends_on("python@:3.11", type=("build", "run"), when="@2.53.4:")
+ depends_on("python@:3.11", type=("build", "run"), when="@2.53.4:2.78")
depends_on("pcre2", when="@2.73.2:")
depends_on("pcre2@10.34:", when="@2.74:")
depends_on("pcre+utf", when="@2.48:2.73.1")
@@ -205,7 +220,7 @@ class Glib(MesonPackage, AutotoolsPackage):
return find_libraries(["libglib*"], root=self.prefix, recursive=True)
-class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
+class AnyBuilder(BaseBuilder):
@property
def dtrace_copy_path(self):
return join_path(self.stage.source_path, "dtrace-copy")
@@ -285,24 +300,24 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
filter_file(pattern, repl, myfile, backup=False)
-class MesonBuilder(BaseBuilder, spack.build_systems.meson.MesonBuilder):
+class MesonBuilder(AnyBuilder, spack.build_systems.meson.MesonBuilder):
def meson_args(self):
args = []
if self.spec.satisfies("@2.63.5:"):
- if "+libmount" in self.spec:
+ if self.spec.satisfies("+libmount"):
args.append("-Dlibmount=enabled")
else:
args.append("-Dlibmount=disabled")
else:
- if "+libmount" in self.spec:
+ if self.spec.satisfies("+libmount"):
args.append("-Dlibmount=true")
else:
args.append("-Dlibmount=false")
- if "tracing=dtrace" in self.spec:
+ if self.spec.satisfies("tracing=dtrace"):
args.append("-Ddtrace=true")
else:
args.append("-Ddtrace=false")
- if "tracing=systemtap" in self.spec:
+ if self.spec.satisfies("tracing=systemtap"):
args.append("-Dsystemtap=true")
else:
args.append("-Dsystemtap=false")
@@ -317,20 +332,20 @@ class MesonBuilder(BaseBuilder, spack.build_systems.meson.MesonBuilder):
if self.spec.satisfies("@:2.72"):
args.append("-Dgettext=external")
if self.spec.satisfies("@:2.74"):
- if self.spec["iconv"].name == "libc":
- args.append("-Diconv=libc")
- else:
+ if self.spec["iconv"].name == "libiconv":
if self.spec.satisfies("@2.61.0:"):
args.append("-Diconv=external")
else:
args.append("-Diconv=gnu")
+ else:
+ args.append("-Diconv=libc")
return args
-class AutotoolsBuilder(BaseBuilder, spack.build_systems.autotools.AutotoolsBuilder):
+class AutotoolsBuilder(AnyBuilder, spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
args = []
- if "+libmount" in self.spec:
+ if self.spec.satisfies("+libmount"):
args.append("--enable-libmount")
else:
args.append("--disable-libmount")
@@ -338,10 +353,10 @@ class AutotoolsBuilder(BaseBuilder, spack.build_systems.autotools.AutotoolsBuild
args.append(
"--with-python={0}".format(os.path.basename(self.spec["python"].command.path))
)
- if self.spec["iconv"].name == "libc":
- args.append("--with-libiconv=maybe")
- else:
+ if self.spec["iconv"].name == "libiconv":
args.append("--with-libiconv=gnu")
+ else:
+ args.append("--with-libiconv=maybe")
if self.spec.satisfies("@2.56:"):
for value in ("dtrace", "systemtap"):
if ("tracing=" + value) in self.spec:
@@ -349,7 +364,7 @@ class AutotoolsBuilder(BaseBuilder, spack.build_systems.autotools.AutotoolsBuild
else:
args.append("--disable-" + value)
else:
- if "tracing=dtrace" in self.spec or "tracing=systemtap" in self.spec:
+ if self.spec.satisfies("tracing=dtrace") or self.spec.satisfies("tracing=systemtap"):
args.append("--enable-tracing")
else:
args.append("--disable-tracing")
diff --git a/var/spack/repos/builtin/packages/glibc/package.py b/var/spack/repos/builtin/packages/glibc/package.py
index 471eb0345d..db4dce7ec6 100644
--- a/var/spack/repos/builtin/packages/glibc/package.py
+++ b/var/spack/repos/builtin/packages/glibc/package.py
@@ -20,10 +20,19 @@ class Glibc(AutotoolsPackage, GNUMirrorPackage):
maintainers("haampie")
build_directory = "build"
+ tags = ["runtime"]
+
+ # This is used when the package is external and we need to find the actual default include path
+ # which may be in a multiarch subdir.
+ representative_headers = ["ieee754.h"]
license("LGPL-2.1-or-later")
+ provides("libc")
+ provides("iconv")
+
version("master", branch="master")
+ version("2.39", sha256="97f84f3b7588cd54093a6f6389b0c1a81e70d99708d74963a2e3eab7c7dc942d")
version("2.38", sha256="16e51e0455e288f03380b436e41d5927c60945abd86d0c9852b84be57dd6ed5e")
version("2.37", sha256="e3a790c2f84eed5c5d569ed6172c253c607dd3962135437da413aa39aa4fd352")
version("2.36", sha256="02efa6ffbbaf3e10e88f16818a862608d04b0ef838c66f6025ae120530792c9c")
@@ -59,6 +68,9 @@ class Glibc(AutotoolsPackage, GNUMirrorPackage):
version("2.6.1", sha256="6be7639ccad715d25eef560ce9d1637ef206fb9a162714f6ab8167fc0d971cae")
version("2.5", sha256="16d3ac4e86eed75d85d80f1f214a6bd58d27f13590966b5ad0cc181df85a3493")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Fix for newer GCC, related to -fno-common
patch("locs.patch", when="@2.23:2.25")
patch("locs-2.22.patch", when="@:2.22")
@@ -165,6 +177,8 @@ class Glibc(AutotoolsPackage, GNUMirrorPackage):
# See 2d7ed98add14f75041499ac189696c9bd3d757fe
depends_on("gmake@:4.3", type="build", when="@:2.36")
+ # Since f2873d2da0ac9802e0b570e8e0b9e7e04a82bf55
+ depends_on("gmake@4.0:", type="build", when="@2.28:")
# From 2.29: generates locale/C-translit.h
# before that it's a test dependency.
@@ -192,3 +206,11 @@ class Glibc(AutotoolsPackage, GNUMirrorPackage):
make("-C", "..", f"objdir={os.getcwd()}", "lib")
delete_rpath(join_path("elf", "ld.so"))
make()
+
+ @property
+ def libs(self):
+ return LibraryList([])
+
+ @property
+ def headers(self):
+ return HeaderList([])
diff --git a/var/spack/repos/builtin/packages/glibmm/package.py b/var/spack/repos/builtin/packages/glibmm/package.py
index 25b0ba95ea..3e533d3551 100644
--- a/var/spack/repos/builtin/packages/glibmm/package.py
+++ b/var/spack/repos/builtin/packages/glibmm/package.py
@@ -19,6 +19,8 @@ class Glibmm(AutotoolsPackage):
version("2.16.0", sha256="99795b9c6e58e490df740a113408092bf47a928427cbf178d77c35adcb6a57a3")
version("2.4.8", sha256="78b97bfa1d001cc7b398f76bf09005ba55b45ae20780b297947a1a71c4f07e1f")
+ depends_on("cxx", type="build") # generated
+
depends_on("libsigcpp")
# https://libsigcplusplus.github.io/libsigcplusplus/index.html
# sigc++-2.0 and sigc++-3.0 are different parallel-installable ABIs:
diff --git a/var/spack/repos/builtin/packages/glimmer/package.py b/var/spack/repos/builtin/packages/glimmer/package.py
index f16453f198..85df3c25ed 100644
--- a/var/spack/repos/builtin/packages/glimmer/package.py
+++ b/var/spack/repos/builtin/packages/glimmer/package.py
@@ -16,6 +16,8 @@ class Glimmer(MakefilePackage):
version("3.02b", sha256="ecf28e03d0a675aed7360ca34ca7f19993f5c3ea889273e657ced9fa7d1e2bf6")
+ depends_on("cxx", type="build") # generated
+
build_directory = "src"
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py
index bd5921c61b..8b78d03c82 100644
--- a/var/spack/repos/builtin/packages/glm/package.py
+++ b/var/spack/repos/builtin/packages/glm/package.py
@@ -19,12 +19,16 @@ class Glm(CMakePackage):
license("MIT")
version("develop", branch="master")
+ version("1.0.1", sha256="9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c")
version("0.9.9.8", sha256="7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592")
version("0.9.9.3", sha256="fba9fd177073a36c5a7798c74b28e79ba6deb8f4bb0d2dbfc0e207c27da7e12c")
version("0.9.7.1", sha256="285a0dc8f762b4e523c8710fbd97accaace0c61f45bc8be2bdb0deed07b0e6f3")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("cmake@3.2:", type="build", when="@0.9.9.0:")
+ depends_on("cmake@3.6:", type="build", when="@1:")
# CMake install target was removed in version 0.9.9.6
@when("@0.9.9.6:0.9.9.8")
diff --git a/var/spack/repos/builtin/packages/globalarrays/package.py b/var/spack/repos/builtin/packages/globalarrays/package.py
index 54f740cac9..bf7844924c 100644
--- a/var/spack/repos/builtin/packages/globalarrays/package.py
+++ b/var/spack/repos/builtin/packages/globalarrays/package.py
@@ -35,6 +35,10 @@ class Globalarrays(AutotoolsPackage):
version("5.6.1", sha256="b324deed49f930f55203e1d18294ce07dd02680b9ac0728ebc54f94a12557ebc")
version("5.6", sha256="a228dfbae9a6cfaae34694d7e56f589ac758e959b58f4bc49e6ef44058096767")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("scalapack", default=False, description="Enable SCALAPACK")
variant(
"armci",
@@ -47,6 +51,9 @@ class Globalarrays(AutotoolsPackage):
depends_on("blas")
depends_on("lapack")
+ depends_on("libfabric", when="armci=ofi")
+ depends_on("rdma-core", when="armci=openib")
+
depends_on("scalapack", when="+scalapack")
# See release https://github.com/GlobalArrays/ga/releases/tag/v5.7.1
@@ -68,7 +75,7 @@ class Globalarrays(AutotoolsPackage):
"--with-lapack={0}".format(lapack_libs),
]
- if "+scalapack" in self.spec:
+ if self.spec.satisfies("+scalapack"):
scalapack_libs = self.spec["scalapack"].libs.ld_flags
args.append("--with-scalapack={0}".format(scalapack_libs))
diff --git a/var/spack/repos/builtin/packages/globus-callout/package.py b/var/spack/repos/builtin/packages/globus-callout/package.py
new file mode 100644
index 0000000000..982082bdf7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-callout/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusCallout(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus Callout Library - provides a
+ platform independent way of dealing with runtime loadable functions.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/callout/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_callout-4.3.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.3", sha256="367e3fda18c3c3eb2b12496abc504186d0bfa0dadc666f626f580a443bba3000")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@15:")
diff --git a/var/spack/repos/builtin/packages/globus-common/package.py b/var/spack/repos/builtin/packages/globus-common/package.py
new file mode 100644
index 0000000000..c141110d86
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-common/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusCommon(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Common Library Programs.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/common/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_common-18.14.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("18.14", sha256="22368942a78e608d8fe6d9f7379abc628e2bd7af54a98c7d2bddc265d6f0ba45")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/builtin/packages/globus-ftp-client/package.py b/var/spack/repos/builtin/packages/globus-ftp-client/package.py
new file mode 100644
index 0000000000..454d3aab69
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-ftp-client/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusFtpClient(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the GridFTP Client Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gridftp/client/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_ftp_client-9.8.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.8", sha256="aa83229f70352e106fc29f28cef4fc8fdab37c794603e7b425f193d947e5926c")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("openssl")
+ depends_on("globus-common@15:")
+ depends_on("globus-ftp-control@4:")
+ depends_on("globus-gsi-callback@4:")
+ depends_on("globus-gsi-credential@5:")
+ depends_on("globus-gsi-sysconfig@5:")
+ depends_on("globus-gssapi-gsi@10:")
+ depends_on("globus-xio@3:")
+ depends_on("globus-xio-popen-driver@2:")
diff --git a/var/spack/repos/builtin/packages/globus-ftp-control/package.py b/var/spack/repos/builtin/packages/globus-ftp-control/package.py
new file mode 100644
index 0000000000..5b4d233015
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-ftp-control/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusFtpControl(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the GridFTP Control Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gridftp/control/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_ftp_control-9.7.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.10", sha256="86677b4aef54b32bcdc11bb48d63f0a30ee520c8aa60e1f0f51d6cd671ee4010")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gss-assist@11:")
+ depends_on("globus-gssapi-gsi@13:")
+ depends_on("globus-io@11:")
+ depends_on("globus-xio@3:")
+ depends_on("globus-gssapi-error@4:")
diff --git a/var/spack/repos/builtin/packages/globus-gass-copy/package.py b/var/spack/repos/builtin/packages/globus-gass-copy/package.py
new file mode 100644
index 0000000000..f95e69effb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gass-copy/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGassCopy(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus Gass Copy Programs.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gass/copy/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gass_copy-10.13.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("10.13", sha256="f8b301b99de8f236733486767409d952024e16ff44ccfa8627063eefcbc8fe45")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@15:")
+ depends_on("globus-ftp-client@7:")
+ depends_on("globus-ftp-control@4:")
+ depends_on("globus-gsi-sysconfig@4:")
+ depends_on("globus-gass-transfer@7:")
+ depends_on("globus-io@8:")
+ depends_on("globus-gssapi-gsi@9:")
+ depends_on("globus-gssapi-error@4:")
diff --git a/var/spack/repos/builtin/packages/globus-gass-transfer/package.py b/var/spack/repos/builtin/packages/globus-gass-transfer/package.py
new file mode 100644
index 0000000000..f4a4f5e035
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gass-transfer/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGassTransfer(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus Gass Transfer.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gass/transfer/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gass_transfer-9.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.4", sha256="c5ad54d0e4959f7dc4131918ad9d40d49db2823b84aec8229127826a9601fbf9")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gssapi-gsi@10:")
+ depends_on("globus-gss-assist@8:")
+ depends_on("globus-io@8:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-callback/package.py b/var/spack/repos/builtin/packages/globus-gsi-callback/package.py
new file mode 100644
index 0000000000..1f63f68bc1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-callback/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiCallback(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI Callback Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gsi/callback/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_callback-6.2.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("6.2", sha256="ffac5435b7d3a78db3c1f856fbe41e7951d5f7d60df3af4ce8cf5b9e303a6f68")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-openssl-module@3:")
+ depends_on("globus-gsi-openssl-error@2:")
+ depends_on("globus-gsi-cert-utils@8:")
+ depends_on("globus-gsi-sysconfig@5:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-cert-utils/package.py b/var/spack/repos/builtin/packages/globus-gsi-cert-utils/package.py
new file mode 100644
index 0000000000..a17c6def1c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-cert-utils/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiCertUtils(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI Cert Utils Library Programs.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/cert_utils/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_cert_utils-10.11.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("10.11", sha256="0bcbef5e04feda1900407970e52e81ad94f68bceef35313f82c810ddb5bff6ba")
+
+ depends_on("c", type="build")
+ depends_on("openssl@1:")
+ depends_on("globus-common@14:")
+ depends_on("globus-openssl-module@3:")
+ depends_on("globus-gsi-openssl-error@2:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-credential/package.py b/var/spack/repos/builtin/packages/globus-gsi-credential/package.py
new file mode 100644
index 0000000000..9d68a84369
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-credential/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiCredential(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI Credential Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gsi/credential/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_credential-8.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("8.4", sha256="19e8fde9d4b335d60a021ac58c7559e5c34981e9332a8e574eda0b44ec160fa7")
+
+ depends_on("c", type="build")
+ depends_on("globus-common@14:")
+ depends_on("globus-gsi-openssl-error@2:")
+ depends_on("globus-gsi-cert-utils@8:")
+ depends_on("globus-gsi-sysconfig@5:")
+ depends_on("globus-gsi-callback@4:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-openssl-error/package.py b/var/spack/repos/builtin/packages/globus-gsi-openssl-error/package.py
new file mode 100644
index 0000000000..573859cdb4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-openssl-error/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiOpensslError(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus OpenSSL Error Handling.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/openssl_error/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_openssl_error-4.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.4", sha256="1879ff269154431700ed158a75acc6e10ca0c96af95d92bc2fa63b7fe998fa6e")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("openssl@1:")
+ depends_on("globus-common@14:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-proxy-core/package.py b/var/spack/repos/builtin/packages/globus-gsi-proxy-core/package.py
new file mode 100644
index 0000000000..c81d612830
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-proxy-core/package.py
@@ -0,0 +1,42 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiProxyCore(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI Proxy Core Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/proxy/proxy_core/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_proxy_core-9.8.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.8", sha256="b0865b298d96ffbf6963c0fcb14eb7fd311de67fb25890a677bd6ace13475da3")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("openssl@1:")
+ depends_on("globus-common@14:")
+ depends_on("globus-openssl-module@3:")
+ depends_on("globus-gsi-openssl-error@2:")
+ depends_on("globus-gsi-cert-utils@8:")
+ depends_on("globus-gsi-sysconfig@5:")
+ depends_on("globus-gsi-proxy-ssl@4:")
+ depends_on("globus-gsi-credential@5:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-proxy-ssl/package.py b/var/spack/repos/builtin/packages/globus-gsi-proxy-ssl/package.py
new file mode 100644
index 0000000000..e8bfa9342b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-proxy-ssl/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiProxySsl(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI Proxy SSL Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gsi/proxy/proxy_ssl/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_proxy_ssl-6.5.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("6.5", sha256="4f20042d80a1fe28b40d9f7f4a1fc9f2790645e9b3f426a659b0c3f01eb04259")
+
+ depends_on("c", type="build")
+
+ depends_on("openssl@1:")
diff --git a/var/spack/repos/builtin/packages/globus-gsi-sysconfig/package.py b/var/spack/repos/builtin/packages/globus-gsi-sysconfig/package.py
new file mode 100644
index 0000000000..006ff1cc7f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gsi-sysconfig/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGsiSysconfig(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus GSI System Config Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/sysconfig/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gsi_sysconfig-9.6.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.6", sha256="7d843374eb64605dda206b84cad2a5c39a1bc9b18e9bfd93591c8fcb6d5a1a7a")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@15:")
+ depends_on("globus-openssl-module@e3:")
+ depends_on("globus-gsi-openssl-error@2:")
diff --git a/var/spack/repos/builtin/packages/globus-gss-assist/package.py b/var/spack/repos/builtin/packages/globus-gss-assist/package.py
new file mode 100644
index 0000000000..a49237f6b8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gss-assist/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGssAssist(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the GSSAPI Assist library Programs.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/gss_assist/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gss_assist-12.7.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("12.7", sha256="5184e0f1a09a64651472f19b79101fc6d966056fd9e1ee29512e41f694eae759")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gsi-sysconfig@7:")
+ depends_on("globus-gsi-cert-utils@8:")
+ depends_on("globus-gssapi-gsi@13:")
+ depends_on("globus-callout@2:")
+ depends_on("globus-gsi-credential@6:")
diff --git a/var/spack/repos/builtin/packages/globus-gssapi-error/package.py b/var/spack/repos/builtin/packages/globus-gssapi-error/package.py
new file mode 100644
index 0000000000..b2d16c4420
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gssapi-error/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGssapiError(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the GSSAPI Error Library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/gssapi_error/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gssapi_error-6.3.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("6.3", sha256="943261f337ca5547f0e4fed47c8beac14cb125837b265f152c216f9b068dabc4")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gss-assist@8:")
+ depends_on("globus-gssapi-gsi@9:")
diff --git a/var/spack/repos/builtin/packages/globus-gssapi-gsi/package.py b/var/spack/repos/builtin/packages/globus-gssapi-gsi/package.py
new file mode 100644
index 0000000000..f47d9f37ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-gssapi-gsi/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusGssapiGsi(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the GSSAPI library.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/gsi/gssapi/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_gssapi_gsi-14.20.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("14.20", sha256="2ba4e905f1dbbbee8ade01a6d0d59a9b5e816620fe5b080de0524b5331614236")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ depends_on("awk", type="build")
+
+ depends_on("openssl")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-openssl-module@3:")
+ depends_on("globus-gsi-openssl-error@2:")
+ depends_on("globus-gsi-cert-utils@8:")
+ depends_on("globus-gsi-credential@5:")
+ depends_on("globus-gsi-callback@4:")
+ depends_on("globus-gsi-proxy-core@8:")
+ depends_on("globus-gsi-sysconfig@8:")
diff --git a/var/spack/repos/builtin/packages/globus-io/package.py b/var/spack/repos/builtin/packages/globus-io/package.py
new file mode 100644
index 0000000000..0c3ce0dd5c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-io/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusIo(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the uniform I/O interface to stream and
+ datagram style communications.
+ """
+
+ homepage = "https://github.com/gridcf/gct/tree/master/io/compat"
+ url = "https://repo.gridcf.org/gct6/sources/globus_io-12.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("12.4", sha256="992de8d1d6c1a0c4edccd798084b6a7f8b93155ba7ae110d836dc248a2f7005a")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-xio@3:")
+ depends_on("globus-gss-assist@8:")
+ depends_on("globus-gssapi-gsi@10:")
+ depends_on("globus-xio-gsi-driver@2:")
+ depends_on("globus-gssapi-error@4:")
diff --git a/var/spack/repos/builtin/packages/globus-openssl-module/package.py b/var/spack/repos/builtin/packages/globus-openssl-module/package.py
new file mode 100644
index 0000000000..0252b985b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-openssl-module/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusOpensslModule(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus OpenSSL Module Wrapper.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/gsi/openssl_module"
+ url = "https://repo.gridcf.org/gct6/sources/globus_openssl_module-5.2.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("5.2", sha256="6dfcbe4af7a23d16745946131da938181cee3adfe08504df4bb4ab3160c23467")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gsi-proxy-ssl@4:")
+ depends_on("globus-gsi-openssl-error@2:")
diff --git a/var/spack/repos/builtin/packages/globus-xio-gsi-driver/package.py b/var/spack/repos/builtin/packages/globus-xio-gsi-driver/package.py
new file mode 100644
index 0000000000..630de7603c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-xio-gsi-driver/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusXioGsiDriver(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus XIO GSI Driver.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/xio/drivers/gsi"
+ url = "https://repo.gridcf.org/gct6/sources/globus_xio_gsi_driver-5.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("5.4", sha256="9a28f8da77efbd8560bcfacdd514f81f5653d1c612d7fe3c479e52a4c8c1ed76")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-gssapi-gsi@13:")
+ depends_on("globus-gssapi-error@4:")
+ depends_on("globus-gss-assist@11:")
+ depends_on("globus-xio@3:")
diff --git a/var/spack/repos/builtin/packages/globus-xio-pipe-driver/package.py b/var/spack/repos/builtin/packages/globus-xio-pipe-driver/package.py
new file mode 100644
index 0000000000..4a649591cd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-xio-pipe-driver/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusXioPipeDriver(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus Pipe Driver.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/xio/drivers/pipe/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_xio_pipe_driver-4.1.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.1", sha256="90860e3bf7c66791f873f488b3b31892d386ac9d73dd4bb366ae8d39fd16ba66")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-xio@3:")
diff --git a/var/spack/repos/builtin/packages/globus-xio-popen-driver/package.py b/var/spack/repos/builtin/packages/globus-xio-popen-driver/package.py
new file mode 100644
index 0000000000..8b0eb093ad
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-xio-popen-driver/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusXioPopenDriver(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus XIO Pipe Open Driver, which allows
+ a user to execute a program and treat it as a transport driver by
+ routing data through pipes.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/xio/drivers/popen/source"
+ url = "https://repo.gridcf.org/gct6/sources/globus_xio_popen_driver-4.1.tar.gz"
+
+ maintainers("github_user1", "github_user2")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.1", sha256="6e9875c0d279511d8c476f71a46346712512284ade0623cd780c4e504908c110")
+
+ depends_on("c", type="build")
+
+ depends_on("globus-common@14:")
+ depends_on("globus-xio@3:")
diff --git a/var/spack/repos/builtin/packages/globus-xio/package.py b/var/spack/repos/builtin/packages/globus-xio/package.py
new file mode 100644
index 0000000000..bbd131f5b7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/globus-xio/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GlobusXio(AutotoolsPackage):
+ """The Grid Community Toolkit (GCT) is an open source software
+ toolkit used for building grid systems and applications. It is a fork
+ of the Globus Toolkit originally created by the Globus Alliance.
+ It is supported by the Grid Community Forum (GridCF) that provides
+ community-based support for core software packages in grid computing.
+
+ This package contains the Globus XIO Framework.
+ """
+
+ homepage = "https://github.com/gridcf/gct/blob/master/xio/src"
+ url = "https://repo.gridcf.org/gct6/sources/globus_xio-6.6.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("6.6", sha256="2ea379df7c2f918a05902bf3e9347667bb172c4893e819913f7975e9e89205fc")
+
+ depends_on("c", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("globus-common@14:")
diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py
index b6deab0253..b38537f499 100644
--- a/var/spack/repos/builtin/packages/glog/package.py
+++ b/var/spack/repos/builtin/packages/glog/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Glog(Package):
+class Glog(CMakePackage):
"""C++ implementation of the Google logging module."""
homepage = "https://github.com/google/glog"
@@ -14,34 +14,19 @@ class Glog(Package):
license("BSD-3-Clause")
+ version("0.7.1", sha256="00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08")
+ version("0.7.0", sha256="375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11")
version("0.6.0", sha256="8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6")
version("0.4.0", sha256="f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c")
version("0.3.5", sha256="7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0")
- version(
- "0.3.4",
- sha256="ce99d58dce74458f7656a68935d7a0c048fa7b4626566a71b7f4e545920ceb10",
- deprecated=True,
- )
- version(
- "0.3.3",
- sha256="544e178644bd9b454768c2c91716c3b8365cc5d47adfbdbaecd8cf3fa17adfcb",
- deprecated=True,
- )
+
+ depends_on("cxx", type="build") # generated
depends_on("gflags")
- depends_on("cmake", when="@0.3.5:", type="build")
-
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
- make()
- make("install")
-
- @when("@0.3.5:")
- def install(self, spec, prefix):
- cmake_args = ["-DBUILD_SHARED_LIBS=TRUE"]
- cmake_args.extend(std_cmake_args)
-
- with working_dir("spack-build", create=True):
- cmake("..", *cmake_args)
- make()
- make("install")
+
+ depends_on("cmake@3:", type="build")
+ depends_on("cmake@3.16:", type="build", when="@0.6.0:")
+ depends_on("cmake@3.22:", type="build", when="@0.7.0:")
+
+ def cmake_args(self):
+ return [self.define("BUILD_SHARED_LIBS", True)]
diff --git a/var/spack/repos/builtin/packages/gloo/package.py b/var/spack/repos/builtin/packages/gloo/package.py
index dcf9a7e3ce..f2cae6f993 100644
--- a/var/spack/repos/builtin/packages/gloo/package.py
+++ b/var/spack/repos/builtin/packages/gloo/package.py
@@ -15,7 +15,8 @@ class Gloo(CMakePackage, CudaPackage):
license("BSD-3-Clause")
version("master", branch="master")
- version("2023-05-19", commit="597accfd79f5b0f9d57b228dec088ca996686475") # py-torch@2.1:
+ version("2023-12-03", commit="5354032ea08eadd7fc4456477f7f7c6308818509") # py-torch@2.3:
+ version("2023-05-19", commit="597accfd79f5b0f9d57b228dec088ca996686475") # py-torch@2.1:2.2
version("2023-01-17", commit="10909297fedab0a680799211a299203e53515032") # py-torch@2.0
version("2022-05-18", commit="5b143513263133af2b95547e97c07cebeb72bf72") # py-torch@1.13
version("2021-05-21", commit="c22a5cfba94edf8ea4f53a174d38aa0c629d070f") # py-torch@1.10:1.12
@@ -30,6 +31,8 @@ class Gloo(CMakePackage, CudaPackage):
version("2018-05-29", commit="69eef748cc1dfbe0fefed69b34e6545495f67ac5") # py-torch@0.4.1
version("2018-04-06", commit="aad0002fb40612e991390d8e807f247ed23f13c5") # py-torch@:0.4.0
+ variant("libuv", default=False, description="Build libuv transport")
+
# Gloo does not build on Linux >=6.0.3 (fixed in master)
# See: https://github.com/facebookincubator/gloo/issues/345
patch(
@@ -45,7 +48,17 @@ class Gloo(CMakePackage, CudaPackage):
)
generator("ninja")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("pkgconfig", type="build")
+ depends_on("libuv@1.26:", when="+libuv")
depends_on("cmake@2.8.12:", type="build")
+ depends_on("libuv", when="platform=windows")
def cmake_args(self):
- return [self.define_from_variant("USE_CUDA", "cuda")]
+ return [
+ self.define_from_variant("USE_CUDA", "cuda"),
+ self.define_from_variant("USE_LIBUV", "libuv"),
+ ]
diff --git a/var/spack/repos/builtin/packages/glow/package.py b/var/spack/repos/builtin/packages/glow/package.py
new file mode 100644
index 0000000000..2c20cfda21
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glow/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Glow(GoPackage):
+ """
+ Glow is a terminal based markdown reader designed
+ from the ground up to bring out the beauty—and power—of the CLI.
+ Use it to discover markdown files,
+ read documentation directly on the command line and stash markdown files
+ to your own private collection, so you can read them anywhere.
+ Glow will find local markdown files in subdirectories or a local Git repository.
+ """
+
+ homepage = "https://github.com/charmbracelet/glow"
+
+ url = "https://github.com/charmbracelet/glow/archive/refs/tags/v1.5.1.tar.gz"
+
+ license("MIT")
+
+ version("1.5.1", sha256="b4ecf269b7c6447e19591b1d23f398ef2b38a6a75be68458390b42d3efc44b92")
+ version("1.5.0", sha256="66f2a876eba15d71cfd08b56667fb07e1d49d383aa17d31696a39e794e23ba92")
+ version("1.4.1", sha256="ff6dfd7568f0bac5144ffa3a429ed956dcbdb531487ef6e38ac61365322c9601")
+ version("1.4.0", sha256="97d373e002332e54e2fb808ea38f098ca49e2b88038c115bd6d33d0b3b921495")
+ version("1.3.0", sha256="828d8453f026a24cd7a6dcf8d97213fe713cadcfab7ca969d5f4c8338d88bb86")
+ version("1.2.1", sha256="ceb9369e2f93412abf914fd4cdc2e1a7e70cf48e2b2607c1e10847223c4a1b68")
+ version("1.2.0", sha256="75d80dcd3258569e187d189f96f79de544332b72d635cc20b5111453d03c3a2d")
+ version("1.1.0", sha256="c9a72e2267b95e39033e845961ad45675c9f0d86080b138c6a2fbf2a5d3428d1")
+ version("1.0.2", sha256="2d98c1e780d750b83d8da094de4c2a999c324021906e6d813b7c75d0320243c8")
+ version("1.0.1", sha256="78d163bea8e6c13fb343f1e3586e93e0392e5052c408a248cc2f0fcc7aa38618")
+
+ @run_after("install")
+ def install_completions(self):
+ glow = Executable(self.prefix.bin.glow)
+
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "glow", "w") as file:
+ glow("completion", "bash", output=file)
+
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "glow.fish", "w") as file:
+ glow("completion", "fish", output=file)
+
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_glow", "w") as file:
+ glow("completion", "zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/glpk/package.py b/var/spack/repos/builtin/packages/glpk/package.py
index 2cd7426f71..ea7a104793 100644
--- a/var/spack/repos/builtin/packages/glpk/package.py
+++ b/var/spack/repos/builtin/packages/glpk/package.py
@@ -23,6 +23,9 @@ class Glpk(AutotoolsPackage, GNUMirrorPackage):
version("4.61", sha256="9866de41777782d4ce21da11b88573b66bb7858574f89c28be6967ac22dfaba9")
version("4.57", sha256="7323b2a7cc1f13e45fc845f0fdca74f4daea2af716f5ad2d4d55b41e8394275c")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("gmp", default=False, description="Activates support for GMP library")
depends_on("gmp", when="+gmp")
@@ -30,7 +33,7 @@ class Glpk(AutotoolsPackage, GNUMirrorPackage):
def configure_args(self):
options = []
- if "+gmp" in self.spec:
+ if self.spec.satisfies("+gmp"):
options.append("--with-gmp")
return options
diff --git a/var/spack/repos/builtin/packages/gluegen/package.py b/var/spack/repos/builtin/packages/gluegen/package.py
index 5112cee7c6..01834d01ed 100644
--- a/var/spack/repos/builtin/packages/gluegen/package.py
+++ b/var/spack/repos/builtin/packages/gluegen/package.py
@@ -19,6 +19,8 @@ class Gluegen(Package):
version("java-11-fixes", branch="java-11-fixes", submodules=True)
+ depends_on("c", type="build") # generated
+
# ant optional jar file to execute antlr tasks
resource(
name="ant-optional",
diff --git a/var/spack/repos/builtin/packages/glusterfs/package.py b/var/spack/repos/builtin/packages/glusterfs/package.py
index 0df17e464a..e104e4dea3 100644
--- a/var/spack/repos/builtin/packages/glusterfs/package.py
+++ b/var/spack/repos/builtin/packages/glusterfs/package.py
@@ -25,6 +25,8 @@ class Glusterfs(AutotoolsPackage):
version("6.8", sha256="41e855bdc456759c8c15ef494c636a25cc7b62c55ad132ecd55bec05df64793f")
version("6.7", sha256="e237dd59a2d5b73e156b0b71df49ff64a143b3aaf8f0a65daaf369bb40f5e923")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/glvis/package.py b/var/spack/repos/builtin/packages/glvis/package.py
index 310c9695b5..872be1a028 100644
--- a/var/spack/repos/builtin/packages/glvis/package.py
+++ b/var/spack/repos/builtin/packages/glvis/package.py
@@ -93,6 +93,9 @@ class Glvis(MakefilePackage):
extension="tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"screenshots",
default="png",
@@ -154,6 +157,9 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
"CONFIG_MK={0}".format(self.spec["mfem"].package.config_mk),
]
+ # https://github.com/spack/spack/issues/42839
+ result.append("CPPFLAGS=-DGLEW_NO_GLU")
+
if self.spec.satisfies("@4.0:"):
# Spack will inject the necessary include dirs and link paths via
# its compiler wrapper, so we can skip them:
diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py
index fd91ab8405..092d131493 100644
--- a/var/spack/repos/builtin/packages/gmake/package.py
+++ b/var/spack/repos/builtin/packages/gmake/package.py
@@ -24,7 +24,14 @@ class Gmake(Package, GNUMirrorPackage):
version("4.4", sha256="581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18")
version("4.3", sha256="e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19")
version("4.2.1", sha256="e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7")
- version("4.0", sha256="fc42139fb0d4b4291929788ebaf77e2a4de7eaca95e31f3634ef7d4932051f69")
+ version("4.1", sha256="9fc7a9783d3d2ea002aa1348f851875a2636116c433677453cc1d1acc3fc4d55")
+ version(
+ "4.0",
+ deprecated=True,
+ sha256="fc42139fb0d4b4291929788ebaf77e2a4de7eaca95e31f3634ef7d4932051f69",
+ )
+
+ depends_on("c", type="build")
variant("guile", default=False, description="Support GNU Guile for embedded scripting")
@@ -33,9 +40,6 @@ class Gmake(Package, GNUMirrorPackage):
depends_on("guile@:3.0")
depends_on("pkgconfig", type="build")
- # build.sh requires it in 4.0 (SV 40254)
- conflicts("~guile", when="@4.0")
-
patch(
"https://src.fedoraproject.org/rpms/make/raw/519a7c5bcbead22e6ea2d2c2341d981ef9e25c0d/f/make-4.2.1-glob-fix-2.patch",
level=1,
@@ -75,10 +79,18 @@ class Gmake(Package, GNUMirrorPackage):
def install(self, spec, prefix):
configure = Executable(join_path(self.stage.source_path, "configure"))
- build_sh = Executable(join_path(self.stage.source_path, "build.sh"))
with working_dir(self.build_directory, create=True):
configure(f"--prefix={prefix}", *self.configure_args())
- build_sh()
+ if spec.satisfies("@:4.2.1"): # generated files in build dir
+ build_sh = join_path(".", "build.sh")
+ config_h = join_path(".", "config.h")
+ else: # generated files in source dir
+ build_sh = join_path(self.stage.source_path, "build.sh")
+ config_h = join_path("src", "config.h")
+ # The default CXX value should be generic, not CXX from the current build as it points
+ # to the compiler wrapper by absolute path.
+ filter_file(r"^#define MAKE_CXX .*$", "#undef MAKE_CXX", config_h)
+ Executable(build_sh)()
os.mkdir(prefix.bin)
install("make", prefix.bin)
os.symlink("make", prefix.bin.gmake)
diff --git a/var/spack/repos/builtin/packages/gmap-gsnap/package.py b/var/spack/repos/builtin/packages/gmap-gsnap/package.py
index 739e76f5fe..0ba006aa2f 100644
--- a/var/spack/repos/builtin/packages/gmap-gsnap/package.py
+++ b/var/spack/repos/builtin/packages/gmap-gsnap/package.py
@@ -61,6 +61,8 @@ class GmapGsnap(AutotoolsPackage):
"2014-12-28", sha256="108433f3e3ea89b8117c8bb36d396913225caf1261d46ce6d89709ff1b44025d"
)
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("bzip2")
depends_on("perl", type="run")
diff --git a/var/spack/repos/builtin/packages/gmime/package.py b/var/spack/repos/builtin/packages/gmime/package.py
index c10f374153..0e62740def 100644
--- a/var/spack/repos/builtin/packages/gmime/package.py
+++ b/var/spack/repos/builtin/packages/gmime/package.py
@@ -11,12 +11,14 @@ class Gmime(AutotoolsPackage):
parsing of messages using the Multipurpose Internet Mail Extension (MIME).
"""
- homepage = "http://spruce.sourceforge.net/gmime/"
+ homepage = "https://spruce.sourceforge.net/gmime/"
url = "https://download.gnome.org/sources/gmime/2.6/gmime-2.6.23.tar.xz"
license("LGPL-2.1-or-later")
version("2.6.23", sha256="7149686a71ca42a1390869b6074815106b061aaeaaa8f2ef8c12c191d9a79f6a")
+ depends_on("c", type="build") # generated
+
depends_on("glib@2.18.0:")
depends_on("libgpg-error")
diff --git a/var/spack/repos/builtin/packages/gmodel/package.py b/var/spack/repos/builtin/packages/gmodel/package.py
index c65558e0cc..1fc0d934a6 100644
--- a/var/spack/repos/builtin/packages/gmodel/package.py
+++ b/var/spack/repos/builtin/packages/gmodel/package.py
@@ -22,6 +22,8 @@ class Gmodel(CMakePackage):
version("2.1.0", sha256="80df0c6dc413a9ffa0f0e7b65118b05b643ba3e1bfcac28fb91d2d3ad017fda0")
+ depends_on("cxx", type="build") # generated
+
# fix error [-Werror,-Wzero-as-null-pointer-constant]
# fix error [-Werror,-Wunused-template]
# Ref: https://github.com/ibaned/gmodel/commit/6b81ec190cf2ce9a6554a99cb6d759b023393cdd
diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py
index d385de6a30..ae3618d695 100644
--- a/var/spack/repos/builtin/packages/gmp/package.py
+++ b/var/spack/repos/builtin/packages/gmp/package.py
@@ -15,6 +15,7 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
license("LGPL-3.0-or-later OR GPL-2.0-or-later")
+ version("6.3.0", sha256="ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb")
version("6.2.1", sha256="eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c")
version("6.2.0", sha256="f51c99cb114deb21a60075ffb494c1a210eb9d7cb729ed042ddb7de9534451ea")
version("6.1.2", sha256="5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2")
@@ -25,6 +26,9 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
# Old version needed for a binary package in ghc-bootstrap
version("4.3.2", sha256="936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build", when="+cxx")
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -60,6 +64,6 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
def configure_args(self):
args = self.enable_or_disable("cxx")
args += self.enable_or_disable("libs")
- if "libs=static" in self.spec:
+ if self.spec.satisfies("libs=static"):
args.append("--with-pic")
return args
diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py
index 3cac816636..79517a3cf5 100644
--- a/var/spack/repos/builtin/packages/gmsh/package.py
+++ b/var/spack/repos/builtin/packages/gmsh/package.py
@@ -20,9 +20,16 @@ class Gmsh(CMakePackage):
url = "https://gmsh.info/src/gmsh-4.4.1-source.tgz"
git = "https://gitlab.onelab.info/gmsh/gmsh.git"
+ maintainers("fspiga")
+
license("GPL-2.0-or-later")
version("master", branch="master")
+ version("4.13.1", sha256="77972145f431726026d50596a6a44fb3c1c95c21255218d66955806b86edbe8d")
+ version("4.13.0", sha256="c85f056ee549a433e814a61c385c97952bbfe514b442b999f6149fffb1e54f64")
+ version("4.12.2", sha256="13e09d9ca8102e5c40171d6ee150c668742b98c3a6ca57f837f7b64e1e2af48f")
+ version("4.12.0", sha256="2a6007872ba85abd9901914826f6986a2437ab7104f564ccefa1b7a3de742c17")
+ version("4.11.1", sha256="c5fe1b7cbd403888a814929f2fd0f5d69e27600222a18c786db5b76e8005b365")
version("4.10.3", sha256="a87d59ccea596d493d375b0d6bc380079a5e5a4baebf0d3383018b0cd6bd8e33")
version("4.8.4", sha256="760dbdc072eaa3c82d066c5ba3b06eacdd3304eb2a97373fe4ada9509f0b6ace")
version("4.7.1", sha256="c984c295116c757ed165d77149bd5fdd1068cbd7835e9bcd077358b503891c6a")
@@ -39,6 +46,10 @@ class Gmsh(CMakePackage):
version("2.16.0", sha256="e829eaf32ea02350a385202cc749341f2a3217c464719384b18f653edd028eea")
version("2.15.0", sha256="992a4b580454105f719f5bc05441d3d392ab0b4b80d4ea07b61ca3bdc974070a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"external",
default=False,
@@ -69,6 +80,9 @@ class Gmsh(CMakePackage):
# https://gmsh.info/doc/texinfo/gmsh.html#Compiling-the-source-code
# We make changes to the GMSH default, such as external blas.
+ depends_on("libpng", when="+fltk")
+ depends_on("libjpeg-turbo", when="+fltk")
+ depends_on("zlib-api")
depends_on("blas", when="~eigen")
depends_on("lapack", when="~eigen")
depends_on("eigen@3:", when="+eigen+external")
@@ -107,6 +121,7 @@ class Gmsh(CMakePackage):
conflicts("+slepc", when="~petsc")
conflicts("+oce", when="+opencascade")
conflicts("+oce", when="^gmsh@4.10:4.10.3")
+ conflicts("+oce", when="@4.10.3:")
conflicts("+metis", when="+external", msg="External Metis cannot build with GMSH")
def flag_handler(self, name, flags):
@@ -138,37 +153,37 @@ class Gmsh(CMakePackage):
]
# Use system versions of contrib libraries, when possible:
- if "+external" in spec:
+ if spec.satisfies("+external"):
options.append(self.define("ENABLE_SYSTEM_CONTRIB", True))
# Make sure native file dialogs are used
options.append("-DENABLE_NATIVE_FILE_CHOOSER=ON")
- options.append("-DCMAKE_INSTALL_NAME_DIR:PATH=%s" % self.prefix.lib)
+ options.append(f"-DCMAKE_INSTALL_NAME_DIR:PATH={self.prefix.lib}")
# Prevent GMsh from using its own strange directory structure on OSX
options.append("-DENABLE_OS_SPECIFIC_INSTALL=OFF")
# Make sure GMSH picks up correct BlasLapack by providing linker flags
- if "~eigen" in spec:
+ if spec.satisfies("~eigen"):
options.append("-DENABLE_BLAS_LAPACK=ON")
blas_lapack = spec["lapack"].libs + spec["blas"].libs
- options.append("-DBLAS_LAPACK_LIBRARIES={0}".format(blas_lapack.ld_flags))
+ options.append(f"-DBLAS_LAPACK_LIBRARIES={blas_lapack.ld_flags}")
- if "+oce" in spec:
+ if spec.satisfies("+oce"):
options.append("-DENABLE_OCC=ON")
- elif "+opencascade" in spec:
+ elif spec.satisfies("+opencascade"):
options.append("-DENABLE_OCC=ON")
else:
options.append("-DENABLE_OCC=OFF")
- if "@:3.0.6" in spec:
+ if spec.satisfies("@:3.0.6"):
options.append(self.define_from_variant("ENABLE_TETGEN", "tetgen"))
- if "@:4.6" in spec:
+ if spec.satisfies("@:4.6"):
options.append(self.define_from_variant("ENABLE_MMG3D", "mmg"))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
# Builds dynamic executable and installs shared library
options.append(self.define("ENABLE_BUILD_SHARED", True))
options.append(self.define("ENABLE_BUILD_DYNAMIC", True))
@@ -176,7 +191,7 @@ class Gmsh(CMakePackage):
# Builds and installs static library
options.append(self.define("ENABLE_BUILD_LIB", True))
- if "+compression" in spec:
+ if spec.satisfies("+compression"):
options.append(self.define("ENABLE_COMPRESSED_IO", True))
return options
diff --git a/var/spack/repos/builtin/packages/gmt/package.py b/var/spack/repos/builtin/packages/gmt/package.py
index 02e3d1973e..be2b4ec5c7 100644
--- a/var/spack/repos/builtin/packages/gmt/package.py
+++ b/var/spack/repos/builtin/packages/gmt/package.py
@@ -38,6 +38,9 @@ class Gmt(CMakePackage, AutotoolsPackage):
url="ftp://ftp.soest.hawaii.edu/gmt/gmt-4.5.18-src.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"ghostscript",
default=False,
@@ -127,16 +130,16 @@ class CMakeBuilder(CMakeBuilder):
self.define("DCW_PATH", "dcw"),
]
- if "+ghostscript" in spec:
+ if spec.satisfies("+ghostscript"):
args.append(self.define("GS", spec["ghostscript"].prefix.bin.gs))
- if "+geos" in spec:
+ if spec.satisfies("+geos"):
args.append(self.define("GEOS_CONFIG", spec["geos"].prefix.bin.join("geos-config")))
- if "+pcre" in spec:
+ if spec.satisfies("+pcre"):
args.append(self.define("PCRE2_CONFIG", spec["pcre2"].prefix.bin.join("pcre2-config")))
- if "+fftw" in spec:
+ if spec.satisfies("+fftw"):
args.extend(
[
self.define("FFTW3_INCLUDE_DIR", spec["fftw"].headers.directories[0]),
@@ -144,7 +147,7 @@ class CMakeBuilder(CMakeBuilder):
]
)
- if "+glib" in spec:
+ if spec.satisfies("+glib"):
args.extend(
[
self.define("GLIB_INCLUDE_DIR", spec["glib"].headers.directories[0]),
@@ -152,7 +155,7 @@ class CMakeBuilder(CMakeBuilder):
]
)
- if "graphicsmagick" in spec:
+ if spec.satisfies("graphicsmagick"):
args.extend(
[
self.define("GM", spec["graphicsmagick"].prefix.bin.gm),
@@ -160,7 +163,7 @@ class CMakeBuilder(CMakeBuilder):
]
)
- if "+ffmpeg" in spec:
+ if spec.satisfies("+ffmpeg"):
args.append(self.define("FFMPEG", spec["ffmpeg"].prefix.bin.ffmpeg))
return args
diff --git a/var/spack/repos/builtin/packages/gmtsar/package.py b/var/spack/repos/builtin/packages/gmtsar/package.py
index 40de8de678..45495d1f11 100644
--- a/var/spack/repos/builtin/packages/gmtsar/package.py
+++ b/var/spack/repos/builtin/packages/gmtsar/package.py
@@ -17,4 +17,6 @@ class Gmtsar(CMakePackage):
version("5.6", sha256="0f7326f46aedf1e8e4dc80dd03f1ae8681f52a8253dc4a00a943aec14562994b")
+ depends_on("c", type="build") # generated
+
depends_on("gmt")
diff --git a/var/spack/repos/builtin/packages/gnds/package.py b/var/spack/repos/builtin/packages/gnds/package.py
index f413ab30f7..41322d1564 100644
--- a/var/spack/repos/builtin/packages/gnds/package.py
+++ b/var/spack/repos/builtin/packages/gnds/package.py
@@ -15,10 +15,10 @@ class Gnds(CMakePackage):
homepage = "https://code.ornl.gov/RNSD/gnds"
url = "https://code.ornl.gov/RNSD/gnds/-/archive/v0.0.1/gnds-v0.0.1.tar.gz"
- maintainers("sethrj")
-
version("0.0.1", sha256="4c8faaa01a3e6fb08ec3e8e126a76f75b5442509a46b993e325ec79dd9f04879")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build shared libraries")
depends_on("pugixml")
diff --git a/var/spack/repos/builtin/packages/gnina/package.py b/var/spack/repos/builtin/packages/gnina/package.py
index 5b9ae74c3e..f9d1dded27 100644
--- a/var/spack/repos/builtin/packages/gnina/package.py
+++ b/var/spack/repos/builtin/packages/gnina/package.py
@@ -21,6 +21,8 @@ class Gnina(CMakePackage, CudaPackage):
version("1.1", sha256="114570b0f84a545ce0fea5b2da87bc116c134cef64bf90e6e58e8f84e175a0fa")
version("1.0.3", sha256="4274429f38293d79c7d22ab08aca91109e327e9ce3f682cd329a8f9c6ef429da")
+ depends_on("cxx", type="build") # generated
+
variant("cudnn", default=True, description="Build with cuDNN")
variant("gninavis", default=False, description="Build gninavis")
@@ -70,12 +72,9 @@ class Gnina(CMakePackage, CudaPackage):
depends_on("cudnn", when="+cudnn")
def cmake_args(self):
- args = [
- "-DBLAS=Open", # Use OpenBLAS instead of Atlas' BLAS
- f"-DPYTHON_EXECUTABLE={self.spec['python'].command.path}",
- ]
+ args = ["-DBLAS=Open"] # Use OpenBLAS instead of Atlas' BLAS
- if "+gninavis" in self.spec:
+ if self.spec.satisfies("+gninavis"):
args.append(f"-DRDKIT_INCLUDE_DIR={self.spec['rdkit'].prefix.include.rdkit}")
return args
diff --git a/var/spack/repos/builtin/packages/gnuconfig/package.py b/var/spack/repos/builtin/packages/gnuconfig/package.py
index aab4bbbdb7..d999b073b9 100644
--- a/var/spack/repos/builtin/packages/gnuconfig/package.py
+++ b/var/spack/repos/builtin/packages/gnuconfig/package.py
@@ -16,11 +16,15 @@ class Gnuconfig(Package):
homepage = "https://www.gnu.org/software/config/"
git = "https://github.com/spack/gnuconfig.git"
url = "https://github.com/spack/gnuconfig/releases/download/2021-08-14/gnuconfig-2021-08-14.tar.gz"
+ tags = ["build-tools"]
maintainers("haampie")
version("master", branch="master")
version(
+ "2024-07-27", sha256="1135044961853c7f116145cee9bb15c3d29b1b081cf8293954efd0f05d801a7c"
+ )
+ version(
"2022-09-17", sha256="95306801ad7086e6a6e13397cb859183d8b7adbba2e372ce0819bad5fcb919b7"
)
version(
diff --git a/var/spack/repos/builtin/packages/gnupg/package.py b/var/spack/repos/builtin/packages/gnupg/package.py
index 066b06448c..859389b850 100644
--- a/var/spack/repos/builtin/packages/gnupg/package.py
+++ b/var/spack/repos/builtin/packages/gnupg/package.py
@@ -3,8 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+
from spack.package import *
-from spack.util.environment import is_system_path
class Gnupg(AutotoolsPackage):
@@ -17,6 +18,8 @@ class Gnupg(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("2.4.5", sha256="f68f7d75d06cb1635c336d34d844af97436c3f64ea14bcb7c869782f96f44277")
+ version("2.4.4", sha256="67ebe016ca90fa7688ce67a387ebd82c6261e95897db7b23df24ff335be85bc6")
version("2.4.3", sha256="a271ae6d732f6f4d80c258ad9ee88dd9c94c8fdc33c3e45328c4d7c126bd219d")
version("2.4.2", sha256="97eb47df8ae5a3ff744f868005a090da5ab45cb48ee9836dbf5ee739a4e5cf49")
version("2.4.1", sha256="76b71e5aeb443bfd910ce9cbc8281b617c8341687afb67bae455877972b59de8")
@@ -25,105 +28,30 @@ class Gnupg(AutotoolsPackage):
version("2.3.7", sha256="ee163a5fb9ec99ffc1b18e65faef8d086800c5713d15a672ab57d3799da83669")
version("2.2.40", sha256="1164b29a75e8ab93ea15033300149e1872a7ef6bdda3d7c78229a735f8204c28")
- # Deprecated over CVE-2022-34903
- version(
- "2.3.4",
- sha256="f3468ecafb1d7f9ad7b51fd1db7aebf17ceb89d2efa8a05cf2f39b4d405402ae",
- deprecated=True,
- )
- version(
- "2.3.3",
- sha256="5789b86da6a1a6752efb38598f16a77af51170a8494039c3842b085032e8e937",
- deprecated=True,
- )
- version(
- "2.3.2",
- sha256="e1d953e0e296072fca284215103ef168885eaac596c4660c5039a36a83e3041b",
- deprecated=True,
- )
- version(
- "2.3.1",
- sha256="c498db346a9b9a4b399e514c8f56dfc0a888ce8f327f10376ff984452cd154ec",
- deprecated=True,
- )
- version(
- "2.2.27",
- sha256="34e60009014ea16402069136e0a5f63d9b65f90096244975db5cea74b3d02399",
- deprecated=True,
- )
- version(
- "2.2.25",
- sha256="c55307b247af4b6f44d2916a25ffd1fb64ce2e509c3c3d028dbe7fbf309dc30a",
- deprecated=True,
- )
- version(
- "2.2.24",
- sha256="9090b400faae34f08469d78000cfec1cee5b9c553ce11347cc96ef16eab98c46",
- deprecated=True,
- )
- version(
- "2.2.23",
- sha256="10b55e49d78b3e49f1edb58d7541ecbdad92ddaeeb885b6f486ed23d1cd1da5c",
- deprecated=True,
- )
- version(
- "2.2.22",
- sha256="7c1370565e1910b9d8c4e0fb57b9de34aa062ec7bb91abad5803d791f38d855b",
- deprecated=True,
- )
- version(
- "2.2.21",
- sha256="61e83278fb5fa7336658a8b73ab26f379d41275bb1c7c6e694dd9f9a6e8e76ec",
- deprecated=True,
- )
- version(
- "2.2.20",
- sha256="04a7c9d48b74c399168ee8270e548588ddbe52218c337703d7f06373d326ca30",
- deprecated=True,
- )
- version(
- "2.2.19",
- sha256="242554c0e06f3a83c420b052f750b65ead711cc3fddddb5e7274fcdbb4e9dec0",
- deprecated=True,
- )
- version(
- "2.2.17",
- sha256="afa262868e39b651a2db4c071fba90415154243e83a830ca00516f9a807fd514",
- deprecated=True,
- )
- version(
- "2.2.15",
- sha256="cb8ce298d7b36558ffc48aec961b14c830ff1783eef7a623411188b5e0f5d454",
- deprecated=True,
- )
- version(
- "2.2.3",
- sha256="cbd37105d139f7aa74f92b6f65d136658682094b0e308666b820ae4b984084b4",
- deprecated=True,
- )
- version(
- "2.1.21",
- sha256="7aead8a8ba75b69866f583b6c747d91414d523bfdfbe9a8e0fe026b16ba427dd",
- deprecated=True,
- )
-
+ # Versions up to 2.2.27, and 2.3.6 deprecated over CVE-2022-34903
version(
"1.4.23",
sha256="c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba",
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("npth@1.2:", when="@2:")
depends_on("libgpg-error@1.24:", when="@2:")
depends_on("libgpg-error@1.41:", when="@2.3:")
+ depends_on("libgpg-error@1.46:", when="@2.4:")
depends_on("libgcrypt@1.7.0:", when="@2:")
depends_on("libgcrypt@1.9.1:", when="@2.3:")
- depends_on("libksba@1.3.4:", when="@2.0.0:")
- depends_on("libassuan@2.4:", when="@2.0.0:2.2.3")
+ depends_on("libksba@1.3.4:", when="@2:")
+ depends_on("libksba@1.6.3:", when="@2.4:")
+
depends_on("libassuan@2.5:", when="@2.2.15:")
+ depends_on("libassuan@:2", when="@:2.4.3")
+
depends_on("pinentry", type="run", when="@2:")
depends_on("iconv", when="@2:")
depends_on("zlib-api")
@@ -135,6 +63,14 @@ class Gnupg(AutotoolsPackage):
# Getting some linking error.
conflicts("%gcc@10:", when="@:1")
+ executables = ["^gpg$", "^gpg-agent$"]
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.search(r"gpg \(GnuPG\) (\S+)", output)
+ return match.group(1) if match else None
+
@run_after("install")
def add_gpg2_symlink(self):
if self.spec.satisfies("@2.0:2"):
@@ -146,7 +82,7 @@ class Gnupg(AutotoolsPackage):
"--disable-bzip2",
"--disable-ldap",
"--disable-regex",
- "--with-zlib=" + self.spec["zlib-api"].prefix,
+ f"--with-zlib={self.spec['zlib-api'].prefix}",
"--without-tar",
"--without-readline",
]
@@ -157,18 +93,18 @@ class Gnupg(AutotoolsPackage):
"--disable-sqlite",
"--disable-ntbtls",
"--disable-gnutls",
- "--with-pinentry-pgm=" + self.spec["pinentry"].command.path,
- "--with-libgpg-error-prefix=" + self.spec["libgpg-error"].prefix,
- "--with-libgcrypt-prefix=" + self.spec["libgcrypt"].prefix,
- "--with-libassuan-prefix=" + self.spec["libassuan"].prefix,
- "--with-ksba-prefix=" + self.spec["libksba"].prefix,
- "--with-npth-prefix=" + self.spec["npth"].prefix,
+ f"--with-pinentry-pgm={self.spec['pinentry'].command.path}",
+ f"--with-libgpg-error-prefix={self.spec['libgpg-error'].prefix}",
+ f"--with-libgcrypt-prefix={self.spec['libgcrypt'].prefix}",
+ f"--with-libassuan-prefix={self.spec['libassuan'].prefix}",
+ f"--with-ksba-prefix={self.spec['libksba'].prefix}",
+ f"--with-npth-prefix={self.spec['npth'].prefix}",
]
)
- if self.spec["iconv"].name == "libc":
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(self.spec["iconv"].prefix):
- args.append("--with-libiconv-prefix=" + self.spec["iconv"].prefix)
if self.spec.satisfies("@:1"):
args.extend(
diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py
index d733395cf2..fc5f19f1ec 100644
--- a/var/spack/repos/builtin/packages/gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/gnuplot/package.py
@@ -22,7 +22,7 @@ class Gnuplot(AutotoolsPackage):
"""
homepage = "http://www.gnuplot.info"
- url = "http://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.6/gnuplot-5.0.6.tar.gz"
+ url = "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.0.6/gnuplot-5.0.6.tar.gz"
# There is a conflict in term.h between gnuplot and ncurses, which is a
# dependency of readline. Fix it with a small patch
@@ -30,6 +30,8 @@ class Gnuplot(AutotoolsPackage):
license("MIT")
+ version("6.0.0", sha256="635a28f0993f6ab0d1179e072ad39b8139d07f51237f841d93c6c2ff4b1758ec")
+ version("5.4.10", sha256="975d8c1cc2c41c7cedc4e323aff035d977feb9a97f0296dd2a8a66d197a5b27c")
version("5.4.3", sha256="51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84")
version("5.4.2", sha256="e57c75e1318133951d32a83bcdc4aff17fed28722c4e71f2305cfc2ae1cae7ba")
version("5.2.8", sha256="60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37")
@@ -42,6 +44,9 @@ class Gnuplot(AutotoolsPackage):
version("5.0.5", sha256="25f3e0bf192e01115c580f278c3725d7a569eb848786e12b455a3fda70312053")
version("5.0.1", sha256="7cbc557e71df581ea520123fb439dea5f073adcc9010a2885dc80d4ed28b3c47")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("wx", default=False, description="Activates wxWidgets terminal")
variant("gd", default=True, description="Activates gd based terminal")
variant("cairo", default=True, description="Activates cairo based terminal")
@@ -86,12 +91,12 @@ class Gnuplot(AutotoolsPackage):
options += self.with_or_without("readline", "prefix")
- if "+pbm" in spec:
+ if spec.satisfies("+pbm"):
options.append("--with-bitmap-terminals")
else:
options.append("--without-bitmap-terminals")
- if "+X" in spec:
+ if spec.satisfies("+X"):
# It seems there's an open bug for wxWidgets support
# See : http://sourceforge.net/p/gnuplot/bugs/1694/
os.environ["TERMLIBS"] = "-lX11"
@@ -99,7 +104,7 @@ class Gnuplot(AutotoolsPackage):
else:
options.append("--without-x")
- if "+qt" in spec:
+ if spec.satisfies("+qt"):
options.append("--with-qt=qt5")
# QT needs C++11 compiler:
os.environ["CXXFLAGS"] = "{0}".format(self.compiler.cxx11_flag)
@@ -129,22 +134,22 @@ class Gnuplot(AutotoolsPackage):
else:
options.append("--with-qt=no")
- if "+wx" in spec:
+ if spec.satisfies("+wx"):
options.append("--with-wx=%s" % spec["wxwidgets"].prefix)
else:
options.append("--disable-wxwidgets")
- if "+gd" in spec:
+ if spec.satisfies("+gd"):
options.append("--with-gd=%s" % spec["libgd"].prefix)
else:
options.append("--without-gd")
- if "+cairo" in spec:
+ if spec.satisfies("+cairo"):
options.append("--with-cairo")
else:
options.append("--without-cairo")
- if "+libcerf" in spec:
+ if spec.satisfies("+libcerf"):
options.append("--with-libcerf")
else:
options.append("--without-libcerf")
@@ -162,7 +167,7 @@ class Gnuplot(AutotoolsPackage):
# TODO: --with-aquaterm depends_on('aquaterm')
options.append("--without-aquaterm")
- if spec.satisfies("%gcc@11:"):
+ if spec.satisfies("%gcc@8:"):
os.environ["LDFLAGS"] = "-Wl,--copy-dt-needed-entries"
return options
diff --git a/var/spack/repos/builtin/packages/gnuradio/package.py b/var/spack/repos/builtin/packages/gnuradio/package.py
index ddc2db5604..515d765389 100644
--- a/var/spack/repos/builtin/packages/gnuradio/package.py
+++ b/var/spack/repos/builtin/packages/gnuradio/package.py
@@ -26,6 +26,10 @@ class Gnuradio(CMakePackage):
version("3.8.2.0", sha256="ddda12b55e3e1d925eefb24afb9d604bca7c9bbe0a431707aa48a2eed53eec2f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("gui", default=False, description="Build with gui support")
depends_on("cmake@3.5.1:", type="build")
@@ -42,6 +46,8 @@ class Gnuradio(CMakePackage):
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/gnuradio/gnuradio/issues/7378
+ depends_on("py-numpy@:1", when="@:3.10.10.0", type=("build", "run"))
depends_on("py-click", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-click-plugins", type=("build", "run"))
@@ -61,10 +67,7 @@ class Gnuradio(CMakePackage):
extends("python")
def cmake_args(self):
- args = []
- args.append("-DPYTHON_EXECUTABLE={0}".format(self.spec["python"].command.path))
- args.append("-DENABLE_INTERNAL_VOLK=OFF")
- return args
+ return ["-DENABLE_INTERNAL_VOLK=OFF"]
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py
index c8b0feb408..d3ef1b8a32 100644
--- a/var/spack/repos/builtin/packages/gnutls/package.py
+++ b/var/spack/repos/builtin/packages/gnutls/package.py
@@ -17,8 +17,11 @@ class Gnutls(AutotoolsPackage):
homepage = "https://www.gnutls.org"
url = "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.19.tar.xz"
+ maintainers("alecbcs")
+
license("LGPL-2.1-or-later")
+ version("3.8.3", sha256="f74fc5954b27d4ec6dfbb11dea987888b5b124289a3703afcada0ee520f4173e")
version("3.7.8", sha256="c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114")
version("3.6.15", sha256="0ea8c3283de8d8335d7ae338ef27c53a916f15f382753b174c18b45ffd481558")
version("3.6.14", sha256="5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63")
@@ -30,12 +33,22 @@ class Gnutls(AutotoolsPackage):
version("3.5.9", sha256="82b10f0c4ef18f4e64ad8cef5dbaf14be732f5095a41cf366b4ecb4050382951")
version("3.3.9", sha256="39166de5293a9d30ef1cd0a4d97f01fdeed7d7dbf8db95392e309256edcb13c1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("zlib", default=True, description="Enable zlib compression support")
variant("guile", default=False, description="Enable Guile bindings")
+ variant(
+ "brotli", default=True, description="Enable brotli compression support", when="@3.7.4:"
+ )
# gnutls+guile is currently broken on MacOS. See Issue #11668
conflicts("+guile", when="platform=darwin")
+ # -Wimplicit-int is an error in newer clang
+ conflicts("%clang@16:", when="@:3.7")
+ conflicts("%apple-clang@15:", when="@:3.7")
+
# Note that version 3.3.9 of gnutls doesn't support nettle 3.0.
depends_on("nettle@3.4.1:", when="@3.6.7.1:")
depends_on("guile", when="+guile")
@@ -44,6 +57,7 @@ class Gnutls(AutotoolsPackage):
depends_on("libidn2@:2.0", when="@:3.5")
depends_on("libidn2")
depends_on("zlib-api", when="+zlib")
+ depends_on("brotli", when="+brotli")
depends_on("gettext")
depends_on("pkgconfig", type="build")
@@ -56,7 +70,7 @@ class Gnutls(AutotoolsPackage):
def setup_build_environment(self, env):
spec = self.spec
- if "+guile" in spec:
+ if spec.satisfies("+guile"):
env.set("GUILE", spec["guile"].prefix.bin.guile)
def configure_args(self):
@@ -69,15 +83,9 @@ class Gnutls(AutotoolsPackage):
args.append("--with-included-unistring")
args.append("--without-p11-kit") # p11-kit@0.23.1: ...
- if "+zlib" in spec:
- args.append("--with-zlib")
- else:
- args.append("--without-zlib")
-
- if "+guile" in spec:
- args.append("--enable-guile")
- else:
- args.append("--disable-guile")
+ args += self.with_or_without("zlib")
+ args += self.with_or_without("brotli")
+ args += self.enable_or_disable("guile")
if self.run_tests:
args.extend(["--enable-tests", "--enable-valgrind-tests", "--enable-full-test-suite"])
diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py
index 494eea00f0..108c854252 100644
--- a/var/spack/repos/builtin/packages/go-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py
@@ -25,8 +25,6 @@ class GoBootstrap(Package):
maintainers("alecbcs")
- depends_on("git", type=("build", "link", "run"))
-
executables = ["^go$"]
# List binary go releases for multiple operating systems and architectures.
@@ -34,6 +32,17 @@ class GoBootstrap(Package):
# should update these binary releases on a yearly schedule as
# bootstrapping requirements are modified by new releases of go.
go_releases = {
+ "1.20.6": {
+ "darwin": {
+ "amd64": "98a09c085b4c385abae7d35b9155195d5e584d14988347ac7f18e4cbe3b5ef3d",
+ "arm64": "1163be1998835a13f00dfc869a8e3cdebf86984ad41ff2fff43e35ac2a0d8344",
+ },
+ "linux": {
+ "amd64": "b945ae2bb5db01a0fb4786afde64e6fbab50b67f6fa0eb6cfa4924f16a7ff1eb",
+ "arm64": "4e15ab37556e979181a1a1cc60f6d796932223a0f5351d7c83768b356f84429b",
+ "ppc64le": "a1b91a42a40bba54bfd5c96c23d72250e0c424038d0d2b5c7950b828b4905822",
+ },
+ },
"1.17.13": {
"darwin": {
"amd64": "c101beaa232e0f448fab692dc036cd6b4677091ff89c4889cc8754b1b29c6608",
@@ -44,7 +53,7 @@ class GoBootstrap(Package):
"arm64": "914daad3f011cc2014dea799bb7490442677e4ad6de0b2ac3ded6cee7e3f493d",
"ppc64le": "bd0763fb130f8412672ffe1e4a8e65888ebe2419e5caa9a67ac21e8c298aa254",
},
- }
+ },
}
# Normalize architectures returned by platform to those used by the
diff --git a/var/spack/repos/builtin/packages/go-md2man/package.py b/var/spack/repos/builtin/packages/go-md2man/package.py
index 7c26ef69cd..48656e6810 100644
--- a/var/spack/repos/builtin/packages/go-md2man/package.py
+++ b/var/spack/repos/builtin/packages/go-md2man/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class GoMd2man(Package):
+class GoMd2man(GoPackage):
"""go-md2man converts markdown into roff (man pages)"""
homepage = "https://github.com/cpuguy83/go-md2man"
@@ -14,33 +14,7 @@ class GoMd2man(Package):
license("MIT")
+ version("2.0.4", sha256="b0a4c7c077ede56967deef6ab7e7696c0f46124b0b3360fd05564ec5a536f11f")
+ version("2.0.3", sha256="7ca3a04bb4ab83387538235decc42a535097a05d2fb9f2266d0c47b33119501f")
version("2.0.2", sha256="2f52e37101ea2734b02f2b54a53c74305b95b3a9a27792fdac962b5354aa3e4a")
version("1.0.10", sha256="76aa56849123b99b95fcea2b15502fd886dead9a5c35be7f78bdc2bad6be8d99")
-
- depends_on("go")
-
- resource(
- name="blackfriday",
- url="https://github.com/russross/blackfriday/archive/v1.5.2.tar.gz",
- sha256="626138a08abb8579474a555e9d45cb5260629a2c07e8834428620a650dc9f195",
- placement="blackfriday",
- destination=join_path("src", "github.com", "russross"),
- )
-
- def patch(self):
- mkdirp(join_path(self.stage.source_path, "src", "github.com", "russross"))
-
- mkdirp(join_path(self.stage.source_path, "src", "github.com", "cpuguy83"))
-
- ln = which("ln")
- ln("-s", self.stage.source_path, join_path("src", "github.com", "cpuguy83", "go-md2man"))
-
- def install(self, spec, prefix):
- with working_dir("src"):
- env["GOPATH"] = self.stage.source_path
- env["GO111MODULE"] = "off"
- go = which("go")
- go("build", "-v", join_path("github.com", "cpuguy83", "go-md2man"))
-
- mkdir(prefix.bin)
- install("go-md2man", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py
index c1fc49b4c7..753c26c4ae 100644
--- a/var/spack/repos/builtin/packages/go/package.py
+++ b/var/spack/repos/builtin/packages/go/package.py
@@ -6,7 +6,7 @@
import os
import re
-import llnl.util.tty as tty
+from llnl.util import tty
from spack.package import *
@@ -41,58 +41,50 @@ class Go(Package):
license("BSD-3-Clause")
- version("1.21.3", sha256="186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488")
+ version("1.23.3", sha256="8d6a77332487557c6afa2421131b50f83db4ae3c579c3bc72e670ee1f6968599")
+ version("1.23.2", sha256="36930162a93df417d90bd22c6e14daff4705baac2b02418edda671cdfa9cd07f")
+ version("1.23.1", sha256="6ee44e298379d146a5e5aa6b1c5b5d5f5d0a3365eabdd70741e6e21340ec3b0d")
+ version("1.22.8", sha256="df12c23ebf19dea0f4bf46a22cbeda4a3eca6f474f318390ce774974278440b8")
+ version("1.22.7", sha256="66432d87d85e0cfac3edffe637d5930fc4ddf5793313fe11e4a0f333023c879f")
+ version("1.22.6", sha256="9e48d99d519882579917d8189c17e98c373ce25abaebb98772e2927088992a51")
+ version("1.22.4", sha256="fed720678e728a7ca30ba8d1ded1caafe27d16028fab0232b8ba8e22008fb784")
- # Deprecated Versions
- # https://nvd.nist.gov/vuln/detail/CVE-2023-39533
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-24790
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-24789
version(
- "1.20.6",
- sha256="62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70",
+ "1.22.2",
+ sha256="374ea82b289ec738e968267cac59c7d5ff180f9492250254784b2044e90df5a9",
deprecated=True,
)
- # https://nvd.nist.gov/vuln/detail/CVE-2023-29405
version(
- "1.20.4",
- sha256="9f34ace128764b7a3a4b238b805856cc1b2184304df9e5690825b0710f4202d6",
+ "1.22.1",
+ sha256="79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321",
deprecated=True,
)
version(
- "1.20.3",
- sha256="e447b498cde50215c4f7619e5124b0fc4e25fb5d16ea47271c47f278e7aa763a",
+ "1.22.0",
+ sha256="4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c",
deprecated=True,
)
version(
- "1.19.11",
- sha256="e25c9ab72d811142b7f41ff6da5165fec2d1be5feec3ef2c66bc0bdecb431489",
+ "1.21.6",
+ sha256="124926a62e45f78daabbaedb9c011d97633186a33c238ffc1e25320c02046248",
deprecated=True,
)
version(
- "1.19.9",
- sha256="131190a4697a70c5b1d232df5d3f55a3f9ec0e78e40516196ffb3f09ae6a5744",
- deprecated=True,
- )
- version(
- "1.19.8",
- sha256="1d7a67929dccafeaf8a29e55985bc2b789e0499cb1a17100039f084e3238da2f",
- deprecated=True,
- )
- # https://nvd.nist.gov/vuln/detail/CVE-2023-24538
- version(
- "1.20.2",
- sha256="4d0e2850d197b4ddad3bdb0196300179d095bb3aefd4dfbc3b36702c3728f8ab",
- deprecated=True,
- )
- version(
- "1.19.7",
- sha256="775bdf285ceaba940da8a2fe20122500efd7a0b65dbcee85247854a8d7402633",
+ "1.21.5",
+ sha256="285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19",
deprecated=True,
)
provides("golang")
- depends_on("git", type=("build", "link", "run"))
+ depends_on("bash", type="build")
+ depends_on("sed", type="build")
+ depends_on("grep", type="build")
depends_on("go-or-gccgo-bootstrap", type="build")
depends_on("go-or-gccgo-bootstrap@1.17.13:", type="build", when="@1.20:")
+ depends_on("go-or-gccgo-bootstrap@1.20.6:", type="build", when="@1.22:")
phases = ["build", "install"]
@@ -106,7 +98,7 @@ class Go(Package):
return match.group(1) if match else None
def setup_build_environment(self, env):
- env.set("GOROOT_FINAL", self.spec.prefix)
+ env.set("GOROOT_FINAL", self.spec.prefix.go)
# We need to set CC/CXX_FOR_TARGET, otherwise cgo will use the
# internal Spack wrappers and fail.
env.set("CC_FOR_TARGET", self.compiler.cc)
@@ -114,13 +106,15 @@ class Go(Package):
env.set("GOMAXPROCS", make_jobs)
def build(self, spec, prefix):
+ # Build script depend on bash
bash = which("bash")
with working_dir("src"):
bash(f"{'all' if self.run_tests else 'make'}.bash")
def install(self, spec, prefix):
- install_tree(".", prefix)
+ install_tree(".", prefix.go)
+ os.symlink(prefix.go.bin, prefix.bin)
def setup_dependent_package(self, module, dependent_spec):
"""Called before go modules' build(), install() methods.
diff --git a/var/spack/repos/builtin/packages/goaccess/package.py b/var/spack/repos/builtin/packages/goaccess/package.py
new file mode 100644
index 0000000000..881e7a7546
--- /dev/null
+++ b/var/spack/repos/builtin/packages/goaccess/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Goaccess(AutotoolsPackage):
+ """An open source real-time web log analyzer and interactive viewer that
+ runs in a terminal in *nix systems or through your browser"""
+
+ homepage = "https://goaccess.io"
+ url = "https://tar.goaccess.io/goaccess-1.9.3.tar.gz"
+
+ maintainers("haampie")
+
+ license("MIT", checked_by="haampie")
+
+ version("1.9.3", sha256="49f0ee49e3c4a95f5f75f6806b0406746fcbf2f9ad971cae23e2ea95d3ec7837")
+
+ depends_on("gettext")
+ depends_on("ncurses")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py
index d6aea5ff1b..fd0d5881be 100644
--- a/var/spack/repos/builtin/packages/gobject-introspection/package.py
+++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py
@@ -20,13 +20,17 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
license("LGPL-2.0-or-later AND GPL-2.0-or-later AND MIT")
+ version("1.78.1", sha256="bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4")
version("1.76.1", sha256="196178bf64345501dcdc4d8469b36aa6fe80489354efe71cb7cb8ab82a3738bf")
version("1.72.1", sha256="012e313186e3186cf0fde6decb57d970adf90e6b1fac5612fe69cbb5ba99543a")
version("1.72.0", sha256="02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc")
+ version("1.60.2", sha256="ffdfe2368fb2e34a547898b01aac0520d52d8627fdeb1c306559bcb503ab5e9c")
version("1.56.1", sha256="5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d9ea24b")
version("1.49.2", sha256="73d59470ba1a546b293f54d023fd09cca03a951005745d86d586b9e3a8dde9ac")
version("1.48.0", sha256="fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877")
+ depends_on("c", type="build") # generated
+
build_system(
conditional("autotools", when="@:1.60"),
conditional("meson", when="@1.61:"),
@@ -41,9 +45,13 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
depends_on("sed", when="platform=darwin", type="build")
depends_on("cairo+gobject")
- depends_on("glib@2.49.2:", when="@1.49.2:")
- # version 1.48.0 build fails with glib 2.49.4
+ depends_on("glib@2.78:", when="@1.78")
+ depends_on("glib@2.76:", when="@1.76")
+ depends_on("glib@2.58:", when="@1.60:1.72")
+ depends_on("glib@2.56:", when="@1.56")
+ depends_on("glib@2.49.2:", when="@1.49.2")
depends_on("glib@2.48.1", when="@1.48.0")
+
depends_on("libffi")
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
depends_on("libffi@:3.3", when="@:1.72") # libffi 3.4 caused seg faults
@@ -69,7 +77,10 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
# extra sed expression in its TOOL_SUBSTITUTION that results in
# an `#!/bin/bash /path/to/spack/bin/sbang` unconditionally being
# inserted into the scripts as they're generated.
- patch("sbang.patch", when="@:1.60")
+ patch("sbang.patch", when="@:1.56")
+ # The TOOL_SUBSITUTION line changed after 1.58 to include /usr/bin/env in
+ # the Python substituion more explicitly. The Makefile.am was removed in 1.61.
+ patch("sbang-1.60.2.patch", when="@1.58:1.60")
# Drop deprecated xml.etree.ElementTree.Element.getchildren() which leads
# to compilation issues with Python 3.9.
@@ -81,6 +92,18 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
when="@:1.63.1",
)
+ # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/361
+ # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/395
+ conflicts(
+ "^python@3.12:",
+ msg="gobject-introspection still uses distutils which was removed in Python 3.12",
+ )
+ conflicts(
+ "^python@3.11:",
+ when="@:1.60",
+ msg="giscannermodule.c in <=v1.60 uses syntax incompatible with Python >=3.11",
+ )
+
def url_for_version(self, version):
url = "https://download.gnome.org/sources/gobject-introspection/{0}/gobject-introspection-{1}.tar.xz"
return url.format(version.up_to(2), version)
@@ -89,6 +112,7 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
# Only needed for sbang.patch above
if self.spec.satisfies("@:1.60"):
env.set("SPACK_SBANG", sbang.sbang_install_path())
+ env.set("GI_SCANNER_DISABLE_CACHE", "1")
def setup_run_environment(self, env):
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
@@ -96,6 +120,7 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
+ env.set("GI_SCANNER_DISABLE_CACHE", "1")
def setup_dependent_run_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/gobject-introspection/sbang-1.60.2.patch b/var/spack/repos/builtin/packages/gobject-introspection/sbang-1.60.2.patch
new file mode 100644
index 0000000000..c4d4985d64
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gobject-introspection/sbang-1.60.2.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in 2016-09-13 01:23:59.000000000 -0700
++++ b/Makefile.in 2017-02-22 10:26:31.824509512 -0800
+@@ -1475,7 +1475,7 @@
+ gir_DATA = $(STATIC_GIRSOURCES) $(SUBSTITUTED_GIRSOURCES) $(BUILT_GIRSOURCES)
+ typelibsdir = $(libdir)/girepository-1.0
+ typelibs_DATA = $(gir_DATA:.gir=.typelib)
+-TOOL_SUBSTITUTIONS = -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON_CMD\@,\/usr\/bin\/env\ $(PYTHON), -e s,@GIR_DIR\@,$(GIR_DIR),g
++TOOL_SUBSTITUTIONS = -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON_CMD\@,\/usr\/bin\/env\ $(PYTHON), -e s,@GIR_DIR\@,$(GIR_DIR),g -e "1i\#!/bin/bash $(SPACK_SBANG)"
+ g_ir_compiler_SOURCES = tools/compiler.c
+ g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
+ -I$(top_srcdir)/girepository
diff --git a/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py b/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py
index b5182447a4..bad1c82d1c 100644
--- a/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py
+++ b/var/spack/repos/builtin/packages/goblin-hmc-sim/package.py
@@ -15,16 +15,18 @@ class GoblinHmcSim(MakefilePackage):
homepage = "https://github.com/tactcomplabs/gc64-hmcsim"
git = "https://github.com/tactcomplabs/gc64-hmcsim"
# The version numbers track the SST they were released with
- url = "https://github.com/tactcomplabs/gc64-hmcsim/archive/sst-8.0.0-release.tar.gz"
+ url = "https://github.com/tactcomplabs/gc64-hmcsim/archive/refs/tags/sst-8.0.0-release.tar.gz"
# This works with parallel builds outside Spack
# For some reason .o files get thrashed inside Spack
parallel = False
- maintainers("jjwilke")
+ maintainers("berquist")
license("BSD-2-Clause")
version("8.0.0", sha256="8a5e6b701865a581f15965d3ddd8c7d301b15f4b63543c444058e9c3688fd2c8")
+ version("main", branch="main")
+
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/gocryptfs/package.py b/var/spack/repos/builtin/packages/gocryptfs/package.py
new file mode 100644
index 0000000000..c9b1dc6f22
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gocryptfs/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gocryptfs(GoPackage):
+ """Encrypted overlay filesystem written in Go"""
+
+ homepage = "https://nuetzlich.net/gocryptfs/"
+ url = (
+ "https://github.com/rfjakob/gocryptfs/releases/download/v2.4.0/gocryptfs_v2.4.0_src.tar.gz"
+ )
+
+ maintainers("snehring")
+
+ license("MIT", checked_by="snehring")
+
+ version("2.4.0", sha256="26a93456588506f4078f192b70e7816b6a4042a14b748b28a50d2b6c9b10e2ec")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("openssl")
+ depends_on("pkg-config", type="build")
diff --git a/var/spack/repos/builtin/packages/goimports/package.py b/var/spack/repos/builtin/packages/goimports/package.py
new file mode 100644
index 0000000000..2c799cfde5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/goimports/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Goimports(GoPackage):
+ """Updates your Go import lines, adding missing ones and removing unreferenced ones."""
+
+ homepage = "https://golang.org/x/tools/cmd/goimports"
+ url = "https://github.com/golang/tools/archive/refs/tags/v0.25.0.tar.gz"
+
+ maintainers("alecbcs")
+
+ license("BSD-3-Clause", checked_by="alecbcs")
+
+ version("0.25.0", sha256="c536188f5db744371f526f3059960945ed580b3ee60553a4f01956251ab36d20")
+
+ build_directory = "cmd/goimports"
diff --git a/var/spack/repos/builtin/packages/goma/package.py b/var/spack/repos/builtin/packages/goma/package.py
index aa468cb1d1..e698441f3c 100644
--- a/var/spack/repos/builtin/packages/goma/package.py
+++ b/var/spack/repos/builtin/packages/goma/package.py
@@ -18,6 +18,9 @@ class Goma(CMakePackage):
license("GPL-2.0-or-later")
+ version("7.8.2", commit="968790728b7544f6e362792748c3842d6c5e2bd9")
+ version("7.7.0", commit="936caf27cab74023d8dfd792cc5411b8c92f2a04")
+ version("7.6.1", commit="c799e935009b85e00979fa8b248952194f6ade7a")
version("7.4.3", commit="bb0cf8030f9e8d61066d052ea6fad67fe49651f8")
version("7.3.0", commit="415f442953e2171afae1f8ad55868052c6f511ce")
version("7.2.0", commit="814f433aa5674c07274fffd4a619d80cd31f71ab")
@@ -28,6 +31,10 @@ class Goma(CMakePackage):
version("release", branch="release")
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Problem size variants
variant(
"max_conc",
diff --git a/var/spack/repos/builtin/packages/google-cloud-cli/package.py b/var/spack/repos/builtin/packages/google-cloud-cli/package.py
index a40a09e66c..18b66dc957 100644
--- a/var/spack/repos/builtin/packages/google-cloud-cli/package.py
+++ b/var/spack/repos/builtin/packages/google-cloud-cli/package.py
@@ -49,6 +49,8 @@ class GoogleCloudCli(Package):
if system in versions[ver] and machine in versions[ver][system]:
version(ver, sha256=versions[ver][system][machine])
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "run"))
def url_for_version(self, version):
@@ -58,7 +60,7 @@ class GoogleCloudCli(Package):
# https://cloud.google.com/sdk/gcloud/reference/topic/startup
env.set("CLOUDSDK_PYTHON", self.spec["python"].command.path)
# ~70 dependencies with no hints as to what versions are supported, just use bundled deps
- env.set("CLOUDSDK_PYTHON_SITEPACKAGES", 0)
+ env.set("CLOUDSDK_PYTHON_SITEPACKAGES", "0")
def setup_run_environment(self, env):
self.setup_build_environment(env)
diff --git a/var/spack/repos/builtin/packages/google-cloud-cpp/package.py b/var/spack/repos/builtin/packages/google-cloud-cpp/package.py
new file mode 100644
index 0000000000..e66aedae3f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/google-cloud-cpp/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GoogleCloudCpp(CMakePackage):
+ """C++ Client Libraries for Google Cloud Platform."""
+
+ homepage = "https://cloud.google.com/cpp"
+ url = "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.28.0.tar.gz"
+
+ maintainers("dbolduc")
+
+ license("Apache-2.0", checked_by="dbolduc")
+
+ sanity_check_is_dir = ["lib", "include"]
+
+ version("2.30.0", sha256="170650b11ece54977b42dd85be648b6bd2d614ff68ea6863a0013865e576b49c")
+ version("2.29.0", sha256="758e1eca8186b962516c0659b34ce1768ba1c9769cfd998c5bbffb084ad901ff")
+ version("2.28.0", sha256="1d51910cb4419f6100d8b9df6bccd33477d09f50e378f12b06dae0f137ed7bc6")
+
+ depends_on("abseil-cpp")
+ depends_on("curl")
+ depends_on("google-crc32c")
+ depends_on("grpc")
+ depends_on("nlohmann-json")
+ depends_on("protobuf")
+
+ variant("shared", default=False, description="Build shared instead of static libraries")
+ variant(
+ "cxxstd",
+ default="14",
+ values=("14", "17", "20"),
+ multi=False,
+ description="Use the specified C++ standard when building.",
+ )
+ variant(
+ "libraries",
+ default="__ga_libraries__",
+ multi=False,
+ description="Which client libraries to build/install. e.g. libraries=bigtable,storage",
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
+ "-DBUILD_TESTING:Bool=OFF",
+ "-DGOOGLE_CLOUD_CPP_WITH_MOCKS:Bool=OFF",
+ "-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:Bool=OFF",
+ self.define_from_variant("GOOGLE_CLOUD_CPP_ENABLE", "libraries"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/google-crc32c/package.py b/var/spack/repos/builtin/packages/google-crc32c/package.py
index 0cfd5075bf..5f73a46e80 100644
--- a/var/spack/repos/builtin/packages/google-crc32c/package.py
+++ b/var/spack/repos/builtin/packages/google-crc32c/package.py
@@ -18,6 +18,9 @@ class GoogleCrc32c(CMakePackage):
version("1.1.2", sha256="ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py
index 175fff38ad..ca9bf32afd 100644
--- a/var/spack/repos/builtin/packages/googletest/package.py
+++ b/var/spack/repos/builtin/packages/googletest/package.py
@@ -10,7 +10,7 @@ class Googletest(CMakePackage):
"""Google test framework for C++. Also called gtest."""
homepage = "https://github.com/google/googletest"
- url = "https://github.com/google/googletest/archive/release-1.10.0.tar.gz"
+ url = "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"
git = "https://github.com/google/googletest"
maintainers("sethrj")
@@ -27,6 +27,9 @@ class Googletest(CMakePackage):
version("1.7.0", sha256="f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc")
version("1.6.0", sha256="5fbc058e5b662b9c86d93ac76fefb58eec89cbf26144b49669a38ecb62758447")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("gmock", default=True, when="@1.8:", description="Build with gmock")
variant("pthreads", default=True, description="Build multithreaded version with pthreads")
variant("shared", default=True, description="Build shared libraries (DLLs)")
@@ -44,10 +47,10 @@ class Googletest(CMakePackage):
def cmake_args(self):
spec = self.spec
args = [
- self.define_from_variant("gtest_disable_pthreads", "pthreads"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
]
+ args.append(self.define("gtest_disable_pthreads", not spec.satisfies("+pthreads")))
if spec.satisfies("@1.8:"):
# New style (contains both Google Mock and Google Test)
args.append(self.define("BUILD_GTEST", True))
@@ -64,7 +67,7 @@ class Googletest(CMakePackage):
install_tree(join_path(self.stage.source_path, "include"), prefix.include)
mkdirp(prefix.lib)
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
install("libgtest.{0}".format(dso_suffix), prefix.lib)
install("libgtest_main.{0}".format(dso_suffix), prefix.lib)
else:
@@ -85,11 +88,11 @@ class Googletest(CMakePackage):
while versions up to, and including, 1.8.0 are available only from
`archive/release-<version>.tar.gz`
"""
- if version.satisfies("@:1.8.0"):
+ if version <= Version("1.8.0"):
return f"{self.git}/archive/release-{version}.tar.gz"
tagname = f"release-{version}"
- if version.satisfies("@1.13:"):
+ if version >= Version("1.13"):
tagname = f"v{version}"
return f"{self.git}/archive/refs/tags/{tagname}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/gopls/package.py b/var/spack/repos/builtin/packages/gopls/package.py
new file mode 100644
index 0000000000..ba4959d9d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gopls/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gopls(GoPackage):
+ """The official Go language server developed by the Go team."""
+
+ homepage = "https://golang.org/x/tools/gopls"
+ url = "https://github.com/golang/tools/archive/refs/tags/gopls/v0.16.2.tar.gz"
+
+ maintainers("alecbcs")
+
+ license("BSD-3-Clause", checked_by="alecbcs")
+
+ version("0.16.2", sha256="be68b3159fcb8cde9ebb8b468f67f03531c58be2de33edbac69e5599f2d4a2c1")
+
+ build_directory = "gopls"
diff --git a/var/spack/repos/builtin/packages/gosam-contrib/package.py b/var/spack/repos/builtin/packages/gosam-contrib/package.py
index ab60938f49..9c49e53458 100644
--- a/var/spack/repos/builtin/packages/gosam-contrib/package.py
+++ b/var/spack/repos/builtin/packages/gosam-contrib/package.py
@@ -17,6 +17,12 @@ class GosamContrib(AutotoolsPackage):
version("2.0", sha256="c05beceea74324eb51c1049773095e2cb0c09c8c909093ee913d8b0da659048d")
version("1.0", sha256="a29d4232d9190710246abc2ed97fdcd8790ce83580f56a360f3456b0377c40ec")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # whizard checks for .la files ( but does not use them )
+ install_libtool_archives = True
+
variant(
"libs",
default="shared,static",
@@ -26,16 +32,21 @@ class GosamContrib(AutotoolsPackage):
)
variant("pic", default=False, description="Build position-independent code")
+ def patch(self):
+ # remove spack compiler wrapper path
+ mf = FileFilter("gosam.conf.in")
+ mf.filter("^fc.bin=.*", "fc.bin=" + self.compiler.fc)
+
def flag_handler(self, name, flags):
if name in ["cflags", "cxxflags", "cppflags"]:
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
flags.append(self.compiler.cc_pic_flag)
if name == "fflags":
if "gfortran" in self.compiler.fc:
flags.append("-std=legacy")
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
flags.append(self.compiler.fc_pic_flag)
return (None, flags, None)
diff --git a/var/spack/repos/builtin/packages/gotcha/package.py b/var/spack/repos/builtin/packages/gotcha/package.py
index a743f84474..a8a7507883 100644
--- a/var/spack/repos/builtin/packages/gotcha/package.py
+++ b/var/spack/repos/builtin/packages/gotcha/package.py
@@ -17,12 +17,17 @@ class Gotcha(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("1.0.7", tag="1.0.7", commit="ae053b77e6b2800188e2c4ddd17057c9b15f4adb")
+ version("1.0.6", tag="1.0.6", commit="81401b939c23562728a27d7678505090463e5c03")
version("1.0.5", tag="1.0.5", commit="e28f10c45a0cda0e1ec225eaea6abfe72c8353aa")
version("1.0.4", tag="1.0.4", commit="46f2aaedc885f140a3f31a17b9b9a9d171f3d6f0")
version("1.0.3", tag="1.0.3", commit="1aafd1e30d46ce4e6555c8a4ea5f5edf6a5eade5")
version("1.0.2", tag="1.0.2", commit="bed1b7c716ebb0604b3e063121649b5611640f25")
version("0.0.2", tag="0.0.2", commit="c82f74778f7cae958a1bf21926d34fc910613d19")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("test", default=False, description="Build tests for Gotcha")
patch(
"https://github.com/LLNL/GOTCHA/commit/e82b4a1ecb634075d8f5334b796c888c86da0427.patch?full_index=1",
diff --git a/var/spack/repos/builtin/packages/gource/package.py b/var/spack/repos/builtin/packages/gource/package.py
index e410159ff9..c957010155 100644
--- a/var/spack/repos/builtin/packages/gource/package.py
+++ b/var/spack/repos/builtin/packages/gource/package.py
@@ -17,6 +17,8 @@ class Gource(AutotoolsPackage):
version("0.44", sha256="2604ca4442305ffdc5bb1a7bac07e223d59c846f93567be067e8dfe2f42f097c")
+ depends_on("cxx", type="build") # generated
+
depends_on("automake", type="build")
depends_on("autoconf", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/gpcnet/package.py b/var/spack/repos/builtin/packages/gpcnet/package.py
index 37c6eac63c..dbc49b8fcb 100644
--- a/var/spack/repos/builtin/packages/gpcnet/package.py
+++ b/var/spack/repos/builtin/packages/gpcnet/package.py
@@ -17,6 +17,8 @@ class Gpcnet(MakefilePackage):
version("master")
+ depends_on("c", type="build") # generated
+
depends_on("mpi", type=("build", "run"))
@property
diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py
index dbb1b2c325..d69af609cc 100644
--- a/var/spack/repos/builtin/packages/gperf/package.py
+++ b/var/spack/repos/builtin/packages/gperf/package.py
@@ -22,6 +22,9 @@ class Gperf(AutotoolsPackage, GNUMirrorPackage):
version("3.1", sha256="588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2")
version("3.0.4", sha256="767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# This patch removes all instances of the register keyword within gperf
# which is necessary to build gperf with recent compilers that default to
# c++17 where using the register keyword results in a compile-time error.
diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py
index 5cfa3ecf55..8afbc07839 100644
--- a/var/spack/repos/builtin/packages/gperftools/package.py
+++ b/var/spack/repos/builtin/packages/gperftools/package.py
@@ -3,10 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import autotools, cmake
from spack.package import *
-class Gperftools(AutotoolsPackage):
+class Gperftools(AutotoolsPackage, CMakePackage):
"""Google's fast malloc/free implementation, especially for
multi-threaded applications. Contains tcmalloc, heap-checker,
heap-profiler, and cpu-profiler.
@@ -19,6 +20,11 @@ class Gperftools(AutotoolsPackage):
license("BSD-3-Clause")
+ build_system(conditional("cmake", when="@2.8.1:"), "autotools", default="cmake")
+
+ version("2.16", sha256="f12624af5c5987f2cc830ee534f754c3c5961eec08004c26a8b80de015cf056f")
+ version("2.15", sha256="c69fef855628c81ef56f12e3c58f2b7ce1f326c0a1fe783e5cae0b88cbbe9a80")
+ version("2.14", sha256="6b561baf304b53d0a25311bd2e29bc993bed76b7c562380949e7cb5e3846b299")
version("2.13", sha256="4882c5ece69f8691e51ffd6486df7d79dbf43b0c909d84d3c0883e30d27323e7")
version("2.12", sha256="fb611b56871a3d9c92ab0cc41f9c807e8dfa81a54a4a9de7f30e838756b5c7c6")
version("2.11", sha256="8ffda10e7c500fea23df182d7adddbf378a203c681515ad913c28a64b87e24dc")
@@ -29,6 +35,9 @@ class Gperftools(AutotoolsPackage):
version("2.4", sha256="982a37226eb42f40714e26b8076815d5ea677a422fb52ff8bfca3704d9c30a2d")
version("2.3", sha256="093452ad45d639093c144b4ec732a3417e8ee1f3744f2b0f8d45c996223385ce")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("sized_delete", default=False, description="Build sized delete operator")
variant(
"dynamic_sized_delete_support",
@@ -41,16 +50,42 @@ class Gperftools(AutotoolsPackage):
)
depends_on("unwind", when="+libunwind")
+ depends_on("cmake@3.12:", type="build", when="build_system=cmake")
+ # https://github.com/gperftools/gperftools/commit/9dfab2cdce5ec1ebb36e2a20e5031ef49cbe8087
+ conflicts("build_system=cmake", when="@2.16:")
+
+ # Linker error: src/base/dynamic_annotations.cc:46: undefined reference to
+ # `TCMallocGetenvSafe'
+ conflicts("target=ppc64:", when="@2.14")
+ conflicts("target=ppc64le:", when="@2.14")
+
+ # the autotools build system creates an explicit list of -L <system dir> flags that end up
+ # before the -L <spack dir> flags, which causes the system libunwind to be linked instead of
+ # the spack libunwind. This is a workaround to fix that.
+ conflicts("+libunwind", when="build_system=autotools")
+
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [
+ self.define_from_variant("gperftools_sized_delete", "sized_delete"),
+ self.define_from_variant(
+ "gperftools_dynamic_sized_delete_support", "dynamic_sized_delete_support"
+ ),
+ self.define_from_variant("GPERFTOOLS_BUILD_DEBUGALLOC", "debugalloc"),
+ self.define_from_variant("gperftools_enable_libunwind", "libunwind"),
+ self.define("gperftools_build_benchmark", False),
+ self.define("BUILD_TESTING", False),
+ ]
+
+class AutotooolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
- args = []
- args += self.enable_or_disable("sized-delete", variant="sized_delete")
- args += self.enable_or_disable(
- "dynamic-sized-delete-support", variant="dynamic_sized_delete_support"
- )
- args += self.enable_or_disable("debugalloc")
- args += self.enable_or_disable("libunwind")
- if self.spec.satisfies("+libunwind"):
- args += ["LDFLAGS=-lunwind"]
-
- return args
+ return [
+ *self.enable_or_disable("sized-delete", variant="sized_delete"),
+ *self.enable_or_disable(
+ "dynamic-sized-delete-support", variant="dynamic_sized_delete_support"
+ ),
+ *self.enable_or_disable("debugalloc"),
+ *self.enable_or_disable("libunwind"),
+ ]
diff --git a/var/spack/repos/builtin/packages/gpgme/package.py b/var/spack/repos/builtin/packages/gpgme/package.py
index 6707d1fc3e..444f21dedf 100644
--- a/var/spack/repos/builtin/packages/gpgme/package.py
+++ b/var/spack/repos/builtin/packages/gpgme/package.py
@@ -21,6 +21,9 @@ class Gpgme(AutotoolsPackage):
version("1.16.0", sha256="6c8cc4aedb10d5d4c905894ba1d850544619ee765606ac43df7405865de29ed0")
version("1.12.0", sha256="b4dc951c3743a60e2e120a77892e9e864fb936b2e58e7c77e8581f4d050e8cd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# https://dev.gnupg.org/T5509 - New test t-edit-sign test crashes with GCC 11.1.0
patch(
"https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff_plain;h=81a33ea5e1b86d586b956e893a5b25c4cd41c969;hp=e8e055e682f8994d62012574e1c8d862ca72a35d",
@@ -30,7 +33,7 @@ class Gpgme(AutotoolsPackage):
depends_on("gnupg", type="build")
depends_on("libgpg-error", type="build")
- depends_on("libassuan", type="build")
+ depends_on("libassuan@2.4.2:2", type=("build", "link"))
@classmethod
def determine_version(cls, exe):
diff --git a/var/spack/repos/builtin/packages/gpi-2/package.py b/var/spack/repos/builtin/packages/gpi-2/package.py
index 16167b43d0..70ca28ff43 100644
--- a/var/spack/repos/builtin/packages/gpi-2/package.py
+++ b/var/spack/repos/builtin/packages/gpi-2/package.py
@@ -37,6 +37,10 @@ class Gpi2(AutotoolsPackage):
version("1.0.2", sha256="b03b4ac9f0715279b2a5e064fd85047cb640a85c2361d732930307f8bbf2aeb8")
version("1.0.1", sha256="b1341bb39e7e70334d7acf831fe7f2061376e7516b44d18b31797748c2a169a3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=False, description="Enable Fortran modules")
variant("mpi", default=False, description="Enable MPI support")
variant(
@@ -101,17 +105,17 @@ class Gpi2(AutotoolsPackage):
self.set_specific_cflags(spec)
config_args = ["-p {0}".format(prefix)]
- if "fabrics=ethernet" in spec:
+ if spec.satisfies("fabrics=ethernet"):
config_args += ["--with-ethernet"]
- elif "fabrics=infiniband" in spec:
+ elif spec.satisfies("fabrics=infiniband"):
config_args += ["--with-infiniband={0}".format(spec["rdma-core"].prefix)]
- if "schedulers=loadleveler" in spec:
+ if spec.satisfies("schedulers=loadleveler"):
config_args += ["--with-ll"]
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
config_args += ["--with-fortran=true"]
else:
config_args += ["--with-fortran=false"]
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
config_args += ["--with-mpi={0}".format(spec["mpi"].prefix)]
with working_dir(self.build_directory):
@@ -143,7 +147,7 @@ class Gpi2(AutotoolsPackage):
config_args.extend(self.with_or_without("fortran"))
# Mpi
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
config_args += ["--with-mpi={0}".format(spec["mpi"].prefix)]
# Fabrics
if "fabrics=none" not in spec:
diff --git a/var/spack/repos/builtin/packages/gpi-space/package.py b/var/spack/repos/builtin/packages/gpi-space/package.py
index 166e20c458..02e24a5052 100644
--- a/var/spack/repos/builtin/packages/gpi-space/package.py
+++ b/var/spack/repos/builtin/packages/gpi-space/package.py
@@ -35,6 +35,9 @@ class GpiSpace(CMakePackage):
version("21.12", sha256="51794e2b593b8d1dc7d6310e17744842919bf44205b2cb7a79de2f2bbac3352a")
version("21.09", sha256="7f3861c2bfec15a4da46378ea38b304e1462ed315cd315b81ab2c2a8ba50dd3e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"monitor",
default=True,
diff --git a/var/spack/repos/builtin/packages/gprofng-gui/package.py b/var/spack/repos/builtin/packages/gprofng-gui/package.py
new file mode 100644
index 0000000000..f1ba082352
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gprofng-gui/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class GprofngGui(AutotoolsPackage):
+ """A graphical environment to analyze the performance data generated by the gprofng"""
+
+ homepage = "https://sourceware.org/binutils/wiki/gprofng"
+ url = "https://ftp.gnu.org/gnu/gprofng-gui/gprofng-gui-1.1.tar.gz"
+ git = "https://git.savannah.gnu.org/git/gprofng-gui.git"
+
+ maintainers("pramodk")
+
+ license("GPL-3.0-only", checked_by="pramodk")
+
+ version("develop", branch="master")
+ version("1.1", sha256="94fa577b856f00b89a2832771a265e221818b88dc0b36d8bca365efe6f08e12a")
+ version("1.0", sha256="c88da8ec91a9943636301fb7da9d337fe0851d874f8f7a4d2169bd859ee72dbc")
+
+ depends_on("autoconf", type="build", when="@develop")
+ depends_on("automake", type="build", when="@develop")
+ depends_on("libtool", type="build", when="@develop")
+
+ depends_on("java", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/gprolog/package.py b/var/spack/repos/builtin/packages/gprolog/package.py
index 099e9b1af8..f8f9e5ec32 100644
--- a/var/spack/repos/builtin/packages/gprolog/package.py
+++ b/var/spack/repos/builtin/packages/gprolog/package.py
@@ -17,6 +17,8 @@ class Gprolog(Package):
version("1.5.0", sha256="670642b43c0faa27ebd68961efb17ebe707688f91b6809566ddd606139512c01")
version("1.4.5", sha256="bfdcf00e051e0628b4f9af9d6638d4fde6ad793401e58a5619d1cc6105618c7c")
+ depends_on("c", type="build") # generated
+
parallel = False
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/gptl/package.py b/var/spack/repos/builtin/packages/gptl/package.py
index 76e89e1e64..70395d99bc 100644
--- a/var/spack/repos/builtin/packages/gptl/package.py
+++ b/var/spack/repos/builtin/packages/gptl/package.py
@@ -22,6 +22,9 @@ class Gptl(AutotoolsPackage):
version("8.0.3", sha256="334979c6fe78d4ed1b491ec57fb61df7a910c58fd39a3658d03ad89f077a4db6")
version("8.0.2", sha256="011f153084ebfb52b6bf8f190835d4bae6f6b5c0ad320331356aa47a547bf2b4")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("pmpi", default=False, description="Build with PMPI support to auto-profile MPI calls")
variant("papi", default=False, description="Enable built-in support for papi library")
variant("nestedomp", default=False, description="Build with nested OMP capability")
@@ -32,7 +35,7 @@ class Gptl(AutotoolsPackage):
def configure_args(self):
args = []
- if "+pmpi" in self.spec:
+ if self.spec.satisfies("+pmpi"):
args.append("--enable-pmpi")
args.append("CC=" + self.spec["mpi"].mpicc)
args.append("CXX=" + self.spec["mpi"].mpicxx)
@@ -40,13 +43,13 @@ class Gptl(AutotoolsPackage):
args.append("F90=" + self.spec["mpi"].mpifc)
args.append("F77=" + self.spec["mpi"].mpif77)
- if "+papi" in self.spec:
+ if self.spec.satisfies("+papi"):
args.append("--enable-papi")
- if "+nestedomp" in self.spec:
+ if self.spec.satisfies("+nestedomp"):
args.append("--enable-nestedomp")
- if "+disable-unwind" in self.spec:
+ if self.spec.satisfies("+disable-unwind"):
args.append("--disable-libunwind")
return args
diff --git a/var/spack/repos/builtin/packages/gptune/package.py b/var/spack/repos/builtin/packages/gptune/package.py
index f7647367b2..dd04798059 100644
--- a/var/spack/repos/builtin/packages/gptune/package.py
+++ b/var/spack/repos/builtin/packages/gptune/package.py
@@ -2,11 +2,19 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
+import os
from spack.package import *
+def terminate_bash_failures(dir):
+ """Ensure bash scripts within the directory fail as soon as a command
+ within fails."""
+ for f in os.listdir(dir):
+ if f.endswith(".sh"):
+ filter_file(r"#!/bin/bash", r"#!/bin/bash" + "\nset -e", join_path(dir, f))
+
+
class Gptune(CMakePackage):
"""GPTune is an autotuning framework that relies on multitask and transfer
learnings to help solve the underlying black-box optimization problem using
@@ -24,6 +32,10 @@ class Gptune(CMakePackage):
version("3.0.0", sha256="e19bfc3033fff11ff8c20cae65b88b7ca005d2c4e4db047f9f23226126ec92fa")
version("2.1.0", sha256="737e0a1d83f66531098beafa73dd479f12def576be83b1c7b8ea5f1615d60a53")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("superlu", default=False, description="Build the SuperLU_DIST example")
variant("hypre", default=False, description="Build the Hypre example")
variant("mpispawn", default=True, description="MPI spawning-based interface")
@@ -89,7 +101,6 @@ class Gptune(CMakePackage):
return args
examples_src_dir = "examples"
- src_dir = "GPTune"
nodes = 1
cores = 4
@@ -97,45 +108,14 @@ class Gptune(CMakePackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
- def setup_run_environment(self, env):
- env.set("GPTUNE_INSTALL_PATH", python_platlib)
-
- def test(self):
- spec = self.spec
+ # Create the environment setup script
comp_name = self.compiler.name
comp_version = str(self.compiler.version).replace(".", ",")
- test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
-
- if "+superlu" in spec:
- superludriver = join_path(spec["superlu-dist"].prefix.lib, "EXAMPLE/pddrive_spawn")
- op = ["-r", superludriver, "."]
- # copy superlu-dist executables to the correct place
- wd = join_path(test_dir, "SuperLU_DIST")
- self.run_test("rm", options=["-rf", "superlu_dist"], work_dir=wd)
- self.run_test(
- "git",
- options=["clone", "https://github.com/xiaoyeli/superlu_dist.git"],
- work_dir=wd,
- )
- self.run_test("mkdir", options=["-p", "build"], work_dir=wd + "/superlu_dist")
- self.run_test("mkdir", options=["-p", "EXAMPLE"], work_dir=wd + "/superlu_dist/build")
- self.run_test("cp", options=op, work_dir=wd + "/superlu_dist/build/EXAMPLE")
-
- if "+hypre" in spec:
- hypredriver = join_path(spec["hypre"].prefix.bin, "ij")
- op = ["-r", hypredriver, "."]
- # copy superlu-dist executables to the correct place
- wd = join_path(test_dir, "Hypre")
- self.run_test("rm", options=["-rf", "hypre"], work_dir=wd)
- self.run_test(
- "git", options=["clone", "https://github.com/hypre-space/hypre.git"], work_dir=wd
- )
- self.run_test("cp", options=op, work_dir=wd + "/hypre/src/test/")
-
- wd = self.test_suite.current_test_cache_dir
- with open("{0}/run_env.sh".format(wd), "w") as envfile:
+ spec = self.spec
+ script_path = f"{install_test_root(self)}/run_env.sh"
+ with open(script_path, "w") as envfile:
envfile.write('if [[ $NERSC_HOST = "cori" ]]; then\n')
envfile.write(" export machine=cori\n")
envfile.write('elif [[ $(uname -s) = "Darwin" ]]; then\n')
@@ -150,13 +130,15 @@ class Gptune(CMakePackage):
envfile.write(" export machine=unknownlinux\n")
envfile.write("fi\n")
envfile.write("export GPTUNEROOT=$PWD\n")
- envfile.write("export MPIRUN={0}\n".format(which(spec["mpi"].prefix.bin + "/mpirun")))
- envfile.write("export PYTHONPATH={0}:$PYTHONPATH\n".format(python_platlib + "/gptune"))
+ mpirun = spec["mpi"].prefix.bin.mpirun
+ envfile.write(f"export MPIRUN={mpirun}\n")
+ gptune_path = join_path(python_platlib, "gptune")
+ envfile.write(f"export PYTHONPATH={gptune_path}:$PYTHONPATH\n")
envfile.write("export proc=$(spack arch)\n")
- envfile.write("export mpi={0}\n".format(spec["mpi"].name))
- envfile.write("export compiler={0}\n".format(comp_name))
- envfile.write("export nodes={0} \n".format(self.nodes))
- envfile.write("export cores={0} \n".format(self.cores))
+ envfile.write(f"export mpi={spec['mpi'].name}\n")
+ envfile.write(f"export compiler={comp_name}\n")
+ envfile.write(f"export nodes={self.nodes} \n")
+ envfile.write(f"export cores={self.cores} \n")
envfile.write("export ModuleEnv=$machine-$proc-$mpi-$compiler \n")
envfile.write(
'software_json=$(echo ",\\"software_configuration\\":'
@@ -210,28 +192,112 @@ class Gptune(CMakePackage):
+ '{\\"nodes\\":$nodes,\\"cores\\":$cores}}}") \n'
)
- # copy the environment configuration files to non-cache directories
- op = ["run_env.sh", python_platlib + "/gptune/."]
- self.run_test("cp", options=op, work_dir=wd)
- op = ["run_env.sh", self.install_test_root + "/."]
- self.run_test("cp", options=op, work_dir=wd)
-
- apps = ["Scalapack-PDGEQRF_RCI"]
- if "+mpispawn" in spec:
- apps = apps + ["GPTune-Demo", "Scalapack-PDGEQRF"]
- if "+superlu" in spec:
- apps = apps + ["SuperLU_DIST_RCI"]
- if "+mpispawn" in spec:
- apps = apps + ["SuperLU_DIST"]
- if "+hypre" in spec:
- if "+mpispawn" in spec:
- apps = apps + ["Hypre"]
+ # copy the environment configuration to the python install directory
+ cp = which("cp")
+ cp(script_path, join_path(python_platlib, "gptune"))
- for app in apps:
- wd = join_path(test_dir, app)
- self.run_test(
- "bash",
- options=["run_examples.sh"],
- work_dir=wd,
- purpose="gptune smoke test for {0}".format(app),
+ def setup_run_environment(self, env):
+ env.set("GPTUNE_INSTALL_PATH", python_platlib)
+
+ cmd = {"bash": which("bash"), "cp": which("cp"), "git": which("git"), "rm": which("rm")}
+
+ def test_hypre(self):
+ """set up and run hypre example"""
+ spec = self.spec
+ if spec.satisfies("~hypre") or spec.satisfies("~mpispawn"):
+ raise SkipTest("Package must be installed with +hypre+mpispawn")
+
+ # https://github.com/spack/spack/pull/45383#discussion_r1737987370
+ if not self.spec["hypre"].satisfies("@2.19.0"):
+ raise SkipTest("Package test only works for hypre@2.19.0")
+
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
+
+ # copy hypre executables to the correct place
+ wd = join_path(test_dir, "Hypre")
+ with working_dir(wd):
+ self.cmd["rm"]("-rf", "hypre")
+ self.cmd["git"](
+ "clone",
+ "--depth",
+ "1",
+ "--branch",
+ f"v{self.spec['hypre'].version.string}",
+ "https://github.com/hypre-space/hypre.git",
)
+
+ hypre_test_dir = join_path(wd, "hypre", "src", "test")
+ mkdirp(hypre_test_dir)
+ self.cmd["cp"]("-r", self.spec["hypre"].prefix.bin.ij, hypre_test_dir)
+
+ # now run the test example
+ with working_dir(join_path(test_dir, "Hypre")):
+ terminate_bash_failures(".")
+ self.cmd["bash"]("run_examples.sh")
+
+ def test_superlu(self):
+ """set up and run superlu tests"""
+ if self.spec.satisfies("~superlu"):
+ raise SkipTest("Package must be installed with +superlu")
+
+ # https://github.com/spack/spack/pull/45383#discussion_r1737987370
+ if self.spec["superlu-dist"].version < Version("7.1"):
+ raise SkipTest("Package must be installed with superlu-dist@:7.1")
+
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
+
+ # copy only works for-dist executables to the correct place
+ wd = join_path(test_dir, "SuperLU_DIST")
+ with working_dir(wd):
+ self.cmd["rm"]("-rf", "superlu_dist")
+ version = self.spec["superlu-dist"].version.string
+ tag = f"v{version}" if version.replace(".", "").isdigit() else version
+ # TODO: Replace this IF/when superlu-dist renames its "master"
+ # branch's version from "develop" to "master".
+ tag = "master" if tag == "develop" else tag
+ self.cmd["git"](
+ "clone",
+ "--depth",
+ "1",
+ "--branch",
+ tag,
+ "https://github.com/xiaoyeli/superlu_dist.git",
+ )
+
+ superludriver = self.spec["superlu-dist"].prefix.lib.EXAMPLE.pddrive_spawn
+ example_dir = join_path(wd, "superlu_dist", "build", "EXAMPLE")
+ mkdirp(example_dir)
+ self.cmd["cp"]("-r", superludriver, example_dir)
+
+ apps = ["SuperLU_DIST", "SuperLU_DIST_RCI"]
+ for app in apps:
+ with test_part(self, f"test_superlu_{app}", purpose=f"run {app} example"):
+ if app == "SuperLU_DIST" and self.spec.satisfies("~mpispawn"):
+ raise SkipTest("Package must be installed with +superlu+mpispawn")
+ with working_dir(join_path(test_dir, app)):
+ terminate_bash_failures(".")
+ self.cmd["bash"]("run_examples.sh")
+
+ def test_demo(self):
+ """Run the demo test"""
+ if self.spec.satisfies("~mpispawn"):
+ raise SkipTest("Package must be installed with +mpispawn")
+
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
+
+ with working_dir(join_path(test_dir, "GPTune-Demo")):
+ terminate_bash_failures(".")
+ self.cmd["bash"]("run_examples.sh")
+
+ def test_scalapack(self):
+ """Run scalapack tests"""
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
+
+ apps = ["Scalapack-PDGEQRF", "Scalapack-PDGEQRF_RCI"]
+ for app in apps:
+ with test_part(self, f"test_scalapack_{app}", purpose=f"run {app} example"):
+ if app == "Scalapack-PDGEQRF" and self.spec.satisfies("~mpispawn"):
+ raise SkipTest("Package must be installed with +superlu+mpispawn")
+ with working_dir(join_path(test_dir, app)):
+ terminate_bash_failures(".")
+ self.cmd["bash"]("run_examples.sh")
diff --git a/var/spack/repos/builtin/packages/gpu-burn/package.py b/var/spack/repos/builtin/packages/gpu-burn/package.py
index b673b851a8..8cc872ed68 100644
--- a/var/spack/repos/builtin/packages/gpu-burn/package.py
+++ b/var/spack/repos/builtin/packages/gpu-burn/package.py
@@ -18,6 +18,8 @@ class GpuBurn(MakefilePackage, CudaPackage):
version("1.1", sha256="9876dbf7ab17b3072e9bc657034ab39bdedb219478f57c4e93314c78ae2d6376")
version("1.0", sha256="d55994f0bee8dabf021966dbe574ef52be1e43386faeee91318dd4ebb36aa74a")
+ depends_on("cxx", type="build") # generated
+
# This package uses CudaPackage to pick up the cuda_arch variant. A side
# effect is that it also picks up the cuda variant, but cuda is required
# for gpu-burn so is not really a variant.
@@ -28,7 +30,7 @@ class GpuBurn(MakefilePackage, CudaPackage):
def edit(self, spec, prefix):
# update cuda architecture if necessary
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
archflag = " ".join(CudaPackage.cuda_flags(cuda_arch))
with open("Makefile", "w") as fh:
diff --git a/var/spack/repos/builtin/packages/gpuscout/package.py b/var/spack/repos/builtin/packages/gpuscout/package.py
new file mode 100644
index 0000000000..a4478cb989
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gpuscout/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gpuscout(CMakePackage, CudaPackage):
+ """GPUscout: A tool for discovering data movement-related bottlenecks on NVidia GPUs."""
+
+ homepage = "https://github.com/caps-tum/GPUscout"
+ url = "https://github.com/caps-tum/GPUscout/archive/refs/tags/v0.2.1.tar.gz"
+ git = "https://github.com/caps-tum/GPUscout.git"
+
+ maintainers("stepanvanecek")
+
+ license("Apache-2.0")
+
+ version(
+ "0.2.1",
+ sha256="78db030c443b971358905460c53c514134c18ebca9cafc26bfcfa297ff17683b",
+ extension="tar.gz",
+ )
+ version("master", branch="master")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.27:", type="build")
+ depends_on("cuda@12:")
diff --git a/var/spack/repos/builtin/packages/gqrx/package.py b/var/spack/repos/builtin/packages/gqrx/package.py
index cd47d34469..224f45f1ed 100644
--- a/var/spack/repos/builtin/packages/gqrx/package.py
+++ b/var/spack/repos/builtin/packages/gqrx/package.py
@@ -26,6 +26,9 @@ class Gqrx(CMakePackage):
license("GPL-3.0-or-later")
version("2.13.1", sha256="08b7b930bed00c6ac79330695c24919a9d779112e1a3dd37d22cc9ee38561e82")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3.2.0:", type="build")
depends_on("gnuradio")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/gr-osmosdr/package.py b/var/spack/repos/builtin/packages/gr-osmosdr/package.py
index 93b5389646..96618a6785 100644
--- a/var/spack/repos/builtin/packages/gr-osmosdr/package.py
+++ b/var/spack/repos/builtin/packages/gr-osmosdr/package.py
@@ -37,6 +37,8 @@ class GrOsmosdr(CMakePackage):
version("0.2.2", sha256="5a7ce7afee38a56191b5d16cb4a91c92476729ff16ed09cbba5a3851ac619713")
+ depends_on("cxx", type="build") # generated
+
depends_on("gnuradio")
depends_on("swig", type="build")
depends_on("hackrf-host", when="+hackrf")
diff --git a/var/spack/repos/builtin/packages/grabix/package.py b/var/spack/repos/builtin/packages/grabix/package.py
index 31f6d661eb..9d8b996d2a 100644
--- a/var/spack/repos/builtin/packages/grabix/package.py
+++ b/var/spack/repos/builtin/packages/grabix/package.py
@@ -23,6 +23,9 @@ class Grabix(MakefilePackage):
version("0.1.7", sha256="d90735c55c0985a4d751858d7ce9e36ad534fff4103257e8e981e34d5c915b28")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@7:", msg="grabix cannot be compiled with newer versions of GCC")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/grace/package.py b/var/spack/repos/builtin/packages/grace/package.py
index 5d36086c23..3da2aa95c9 100644
--- a/var/spack/repos/builtin/packages/grace/package.py
+++ b/var/spack/repos/builtin/packages/grace/package.py
@@ -20,6 +20,9 @@ class Grace(AutotoolsPackage):
version("5.1.25", sha256="751ab9917ed0f6232073c193aba74046037e185d73b77bab0f5af3e3ff1da2ac")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("libx11")
depends_on("libxext")
depends_on("libxmu")
diff --git a/var/spack/repos/builtin/packages/grackle/package.py b/var/spack/repos/builtin/packages/grackle/package.py
index e87b2ef93e..63b0c4b5ce 100644
--- a/var/spack/repos/builtin/packages/grackle/package.py
+++ b/var/spack/repos/builtin/packages/grackle/package.py
@@ -3,9 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os.path
+from spack.hooks.sbang import filter_shebang
from spack.package import *
@@ -16,23 +16,39 @@ class Grackle(Package):
simulation code
"""
- homepage = "http://grackle.readthedocs.io/en/grackle-3.1/"
- url = "https://bitbucket.org/grackle/grackle/get/grackle-3.1.tar.bz2"
+ homepage = "http://grackle.readthedocs.io/en/latest/"
+ url = "https://github.com/grackle-project/grackle/archive/refs/tags/grackle-3.1.tar.gz"
- version("3.1", sha256="504fb080c7f8578c92dcde76cf9e8b851331a38ac76fc4a784df4ecbe1ff2ae8")
- version("3.0", sha256="9219033332188d615e49135a3b030963f076b3afee098592b0c3e9f8bafdf504")
- version("2.2", sha256="b1d201313c924df38d1e677015f7c31dce42083ef6a0e0936bb9410ccd8a3655")
- version("2.0.1", sha256="8f784aaf53d98ddb52b448dc51eb9ec452261a2dbb360170a798693b85165f7d")
+ version("3.1", sha256="5705985a70d65bc2478cc589ca26f631a8de90e3c8f129a6b2af69db17c01079")
+ version("3.0", sha256="41e9ba1fe18043a98db194a6f5b9c76a7f0296a95a457d2b7d73311195b7d781")
+ version("2.2", sha256="5855cb0f93736fd8dd47efeb0abdf36af9339ede86de7f895f527513566c0fae")
+ version("2.0.1", sha256="bcdf6b3ff7b7515ae5e9f1f3369b2690ed8b3c450040e92a03e40582f57a0864")
variant("float", default=False, description="Build with float")
- depends_on("libtool", when="@2.2")
+ depends_on("libtool", when="@2.2:")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+ depends_on("tcsh", type="build")
depends_on("mpi")
depends_on("hdf5+mpi")
parallel = False
+ @run_before("install")
+ def filter_sbang(self):
+ """Run before install so that the standard Spack sbang install hook
+ can fix up the path to the tcsh binary.
+ """
+ tcsh = self.spec["tcsh"].command
+ with working_dir(self.stage.source_path):
+ match = "^#!/bin/csh.*"
+ substitute = f"#!{tcsh}"
+ filter_file(match, substitute, "configure")
+ # Since scripts are run during installation, we need to add sbang
+ filter_shebang("configure")
+
def install(self, spec, prefix):
template_name = "{0.architecture}-{0.compiler.name}"
grackle_architecture = template_name.format(spec)
@@ -51,9 +67,7 @@ class Grackle(Package):
"@LINK_VARIABLES_DEFINITION": link_variables,
}
- template = join_path(
- os.path.dirname(inspect.getmodule(self).__file__), "Make.mach.template"
- )
+ template = join_path(os.path.dirname(__file__), "Make.mach.template")
makefile = join_path(
self.stage.source_path, "src", "clib", "Make.mach.{0}".format(grackle_architecture)
)
@@ -62,7 +76,7 @@ class Grackle(Package):
filter_file(key, value, makefile)
configure()
- with working_dir("src/clib"):
+ with working_dir(join_path(self.stage.source_path, "src", "clib")):
make("clean")
make("machine-{0}".format(grackle_architecture))
make("opt-high")
diff --git a/var/spack/repos/builtin/packages/gradle/package.py b/var/spack/repos/builtin/packages/gradle/package.py
index 10b69e7849..243c06ae62 100644
--- a/var/spack/repos/builtin/packages/gradle/package.py
+++ b/var/spack/repos/builtin/packages/gradle/package.py
@@ -17,8 +17,20 @@ class Gradle(Package):
homepage = "https://gradle.org"
url = "https://services.gradle.org/distributions/gradle-3.4-all.zip"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("8.10.2", sha256="2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6")
+ version("8.10.1", sha256="fdfca5dbc2834f0ece5020465737538e5ba679deeff5ab6c09621d67f8bb1a15")
+ version("8.10", sha256="682b4df7fe5accdca84a4d1ef6a3a6ab096b3efd5edf7de2bd8c758d95a93703")
+ version("8.9", sha256="258e722ec21e955201e31447b0aed14201765a3bfbae296a46cf60b70e66db70")
+ version("8.8", sha256="f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961")
+ version("8.7", sha256="194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0")
+ version("8.6", sha256="85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d")
+ version("8.5", sha256="c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b")
+ version("8.4", sha256="f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419")
+ version("8.3", sha256="bb09982fdf52718e4c7b25023d10df6d35a5fff969860bdf5a5bd27a3ab27a9e")
+ version("8.2.1", sha256="7c3ad722e9b0ce8205b91560fd6ce8296ac3eadf065672242fd73c06b8eeb6ee")
+ version("8.2", sha256="5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640")
version("8.1.1", sha256="5625a0ae20fe000d9225d000b36909c7a0e0e8dda61c19b12da769add847c975")
version("8.0.2", sha256="47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da")
version("7.3", sha256="00b273629df4ce46e68df232161d5a7c4e495b9a029ce6e0420f071e21316867")
diff --git a/var/spack/repos/builtin/packages/grads/package.py b/var/spack/repos/builtin/packages/grads/package.py
index 70146e6720..a864ca1005 100644
--- a/var/spack/repos/builtin/packages/grads/package.py
+++ b/var/spack/repos/builtin/packages/grads/package.py
@@ -24,6 +24,8 @@ class Grads(AutotoolsPackage):
version("2.2.2", sha256="1b5a600d4d407ffcf2fbbbba42037a6e1ebfdb8246ba56b93c628e3c472b4ded")
version("2.2.1", sha256="695e2066d7d131720d598bac0beb61ac3ae5578240a5437401dc0ffbbe516206")
+ depends_on("c", type="build") # generated
+
variant("geotiff", default=True, description="Enable GeoTIFF support")
variant("shapefile", default=True, description="Enable Shapefile support")
variant("grib2", default=True, description="Enable GRIB2 support")
@@ -63,10 +65,14 @@ class Grads(AutotoolsPackage):
return url.format(version.up_to(2), version)
# Name of grib2 C library has changed in recent versions
- with when("+grib2"):
+ def patch(self):
+ if self.spec.satisfies("@:2.2.2"):
+ filter_file("png15", "png", "configure")
- def patch(self):
+ if self.spec.satisfies("+grib2"):
filter_file("grib2c", "g2c", "configure")
+ if self.spec.satisfies("^g2c@1.8.0:"):
+ filter_file("G2_VERSION", "G2C_VERSION", "src/gacfg.c")
def setup_build_environment(self, env):
env.set("SUPPLIBS", "/")
diff --git a/var/spack/repos/builtin/packages/grafana/package.py b/var/spack/repos/builtin/packages/grafana/package.py
index 37f3b73064..49f1ee7784 100644
--- a/var/spack/repos/builtin/packages/grafana/package.py
+++ b/var/spack/repos/builtin/packages/grafana/package.py
@@ -21,6 +21,8 @@ class Grafana(Package):
version("6.7.0", sha256="7f4e3f0d42b8188a334e97062c3bf63ff43af273095ba10147b299e3c1c5a7b7")
version("6.6.2", sha256="e11e5971d08e45e277b55e060c0ce3cf25ca0ba144367c53b4836f2d133ed9b8")
+ depends_on("c", type="build") # generated
+
depends_on("go", type="build")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/grandr/package.py b/var/spack/repos/builtin/packages/grandr/package.py
index 46cd8962fa..af22fdce79 100644
--- a/var/spack/repos/builtin/packages/grandr/package.py
+++ b/var/spack/repos/builtin/packages/grandr/package.py
@@ -14,6 +14,8 @@ class Grandr(AutotoolsPackage, XorgPackage):
version("0.1", sha256="67a049c8dccdb48897efbd86c2b1d3b0ff5ce3c7859c46b0297d64c881b36d24")
+ depends_on("c", type="build") # generated
+
depends_on("gtkplus@2.0.0:")
depends_on("gconf")
depends_on("xrandr@1.2:")
diff --git a/var/spack/repos/builtin/packages/graph500/package.py b/var/spack/repos/builtin/packages/graph500/package.py
index e1a6131e88..c50344ff64 100644
--- a/var/spack/repos/builtin/packages/graph500/package.py
+++ b/var/spack/repos/builtin/packages/graph500/package.py
@@ -16,6 +16,8 @@ class Graph500(MakefilePackage):
version("3.0.0", sha256="887dcff56999987fba4953c1c5696d50e52265fe61b6ffa8bb14cc69ff27e8a0")
+ depends_on("c", type="build") # generated
+
depends_on("mpi@2.0:")
build_directory = "src"
diff --git a/var/spack/repos/builtin/packages/graphblast/package.py b/var/spack/repos/builtin/packages/graphblast/package.py
index e67fd0b906..1144bc3b1d 100644
--- a/var/spack/repos/builtin/packages/graphblast/package.py
+++ b/var/spack/repos/builtin/packages/graphblast/package.py
@@ -23,6 +23,8 @@ class Graphblast(MakefilePackage, CudaPackage):
preferred=True,
)
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with Cuda support")
depends_on("boost +program_options")
diff --git a/var/spack/repos/builtin/packages/graphicsmagick/package.py b/var/spack/repos/builtin/packages/graphicsmagick/package.py
index c84bde89b9..e3713d2946 100644
--- a/var/spack/repos/builtin/packages/graphicsmagick/package.py
+++ b/var/spack/repos/builtin/packages/graphicsmagick/package.py
@@ -20,6 +20,7 @@ class Graphicsmagick(AutotoolsPackage):
license("MIT")
+ version("1.3.43", sha256="2b88580732cd7e409d9e22c6116238bef4ae06fcda11451bf33d259f9cbf399f")
version("1.3.34", sha256="df009d5173ed0d6a0c6457234256c5a8aeaace782afa1cbab015d5a12bd4f7a4")
version("1.3.33", sha256="130cb330a633580b5124eba5c125bbcbc484298423a97b9bed37ccd50d6dc778")
version("1.3.32", sha256="b842a5a0d6c84fd6c5f161b5cd8e02bbd210b0c0b6728dd762b7c53062ba94e1")
@@ -27,6 +28,9 @@ class Graphicsmagick(AutotoolsPackage):
version("1.3.30", sha256="d965e5c6559f55eec76c20231c095d4ae682ea0cbdd8453249ae8771405659f1")
version("1.3.29", sha256="e18df46a6934c8c12bfe274d09f28b822f291877f9c81bd9a506f879a7610cd4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("bzip2")
depends_on("ghostscript")
depends_on("ghostscript-fonts")
@@ -38,7 +42,6 @@ class Graphicsmagick(AutotoolsPackage):
depends_on("libpng")
depends_on("libsm")
depends_on("libtiff")
- depends_on("libtool")
depends_on("libxml2")
depends_on("xz")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/graphite2/package.py b/var/spack/repos/builtin/packages/graphite2/package.py
index 10af88d825..a1b69f5f49 100644
--- a/var/spack/repos/builtin/packages/graphite2/package.py
+++ b/var/spack/repos/builtin/packages/graphite2/package.py
@@ -22,6 +22,9 @@ class Graphite2(CMakePackage):
version("1.3.14", sha256="f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d")
version("1.3.13", sha256="dd63e169b0d3cf954b397c122551ab9343e0696fb2045e1b326db0202d875f06")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type="test")
depends_on("freetype")
diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py
index 3f8026b048..4aef29a524 100644
--- a/var/spack/repos/builtin/packages/graphlib/package.py
+++ b/var/spack/repos/builtin/packages/graphlib/package.py
@@ -16,4 +16,6 @@ class Graphlib(CMakePackage):
version("2.0.0", sha256="4f4aa1193167c41c8491dec3cf22b1e52a8f0842faab88b7945972f02d2adbcd")
version("3.0.0", sha256="c3d889f7bc25b9662426605e52f14cd16f9c05b034738a343890707f5f5681f1")
+ depends_on("c", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
diff --git a/var/spack/repos/builtin/packages/graphmap/package.py b/var/spack/repos/builtin/packages/graphmap/package.py
index 0d9ad07e81..1e572833c8 100644
--- a/var/spack/repos/builtin/packages/graphmap/package.py
+++ b/var/spack/repos/builtin/packages/graphmap/package.py
@@ -16,6 +16,8 @@ class Graphmap(MakefilePackage):
version("0.3.0", commit="eb8c75d68b03be95464318afa69b645a59f8f6b7")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 110746d911..ca3552c3fd 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -15,12 +15,17 @@ MACOS_VERSION = macos_version() if sys.platform == "darwin" else None
class Graphviz(AutotoolsPackage):
"""Graph Visualization Software"""
- homepage = "http://www.graphviz.org"
+ homepage = "https://www.graphviz.org"
git = "https://gitlab.com/graphviz/graphviz.git"
url = "https://gitlab.com/graphviz/graphviz/-/archive/2.46.0/graphviz-2.46.0.tar.bz2"
license("EPL-1.0")
+ version("12.1.0", sha256="ad2023c23935397d4b5a34c14682f8098d2f20d2144c63d20d05be372757fdb1")
+ version("11.0.0", sha256="95173d21922082b0b2649fb24c1dc4bbc1e39504a92903b88df39804778cbb9d")
+ version("10.0.1", sha256="eaa60fea2b3ad904e3bf6919710c1ba3207ce31b5d7da1687dd3b734de8736f6")
+ version("9.0.0", sha256="5c0a6e60761e2e0f6cbb8baca958b643a06b9bb74ed5a2e4937ee7dbb49dead3")
+ version("8.1.0", sha256="ce8911695752aa2c3929147e3dee016e58aa624d81d7c18dd16f895ae79460de")
version("8.0.5", sha256="c1901fe52483fad55fbf893ccd59a3dcaedd53f0d50b5aebbbf3deaba93b674d")
version("8.0.1", sha256="19928f09f759676578b50101420b24475eb35f712ffbe8a97254f64b20fdbd03")
version("7.1.0", sha256="7943c3fa0c55c779f595259f3b9e41c7ea6ed92f0aca0d24df917f631322dc01")
@@ -36,12 +41,15 @@ class Graphviz(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Language bindings
language_bindings = ["java"]
# Additional language bindings are nominally supported by GraphViz via SWIG
# but are untested and need the proper dependencies added:
- # language_bindings += ['sharp', 'go', 'guile', 'io', 'lua', 'ocaml',
+ # language_bindings += ['sharp', 'go', 'guile', 'io', 'lua',
# 'perl', 'php', 'python', 'r', 'ruby', 'tcl']
for lang in language_bindings:
@@ -156,7 +164,7 @@ class Graphviz(AutotoolsPackage):
# Set MACOSX_DEPLOYMENT_TARGET to 10.x due to old configure
super().setup_build_environment(env)
- if "+quartz" in self.spec:
+ if self.spec.satisfies("+quartz"):
env.set("OBJC", self.compiler.cc)
@when("%clang platform=darwin")
@@ -195,12 +203,13 @@ class Graphviz(AutotoolsPackage):
"x",
]:
args += self.with_or_without(var)
- for var in ("expat", "java"):
- if "+" + var in spec:
+
+ for var, when in [("expat", "@:8.0"), ("java", "@:")]:
+ if spec.satisfies("+" + var + when):
args.append("--with-{0}includedir={1}".format(var, spec[var].prefix.include))
args.append("--with-{0}libdir={1}".format(var, spec[var].prefix.lib))
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
args.append("--with-zlibincludedir={}".format(spec["zlib-api"].prefix.include))
args.append("--with-zliblibdir={}".format(spec["zlib-api"].prefix.lib))
diff --git a/var/spack/repos/builtin/packages/grass/package.py b/var/spack/repos/builtin/packages/grass/package.py
index 01adc4587b..d66a88b329 100644
--- a/var/spack/repos/builtin/packages/grass/package.py
+++ b/var/spack/repos/builtin/packages/grass/package.py
@@ -28,6 +28,9 @@ class Grass(AutotoolsPackage):
version("7.8.1", sha256="6ae578fd67afcce7abec4ba4505dcc55b3d2dfe0ca46b99d966cb148c654abb3")
version("7.8.0", sha256="4b1192294e959ffd962282344e4ff325c4472f73abe605e246a1da3beda7ccfa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cxx", default=True, description="Support C++ functionality")
variant("tiff", default=False, description="Support TIFF functionality")
variant("png", default=False, description="Support PNG functionality")
@@ -114,132 +117,132 @@ class Grass(AutotoolsPackage):
"--with-proj-share={0}".format(spec["proj"].prefix.share.proj),
]
- if "+cxx" in spec:
+ if spec.satisfies("+cxx"):
args.append("--with-cxx")
else:
args.append("--without-cxx")
- if "+tiff" in spec:
+ if spec.satisfies("+tiff"):
args.append("--with-tiff")
else:
args.append("--without-tiff")
- if "+png" in spec:
+ if spec.satisfies("+png"):
args.append("--with-png")
else:
args.append("--without-png")
- if "+postgres" in spec:
+ if spec.satisfies("+postgres"):
args.append("--with-postgres")
else:
args.append("--without-postgres")
- if "+mysql" in spec:
+ if spec.satisfies("+mysql"):
args.append("--with-mysql")
else:
args.append("--without-mysql")
- if "+sqlite" in spec:
+ if spec.satisfies("+sqlite"):
args.append("--with-sqlite")
else:
args.append("--without-sqlite")
- if "+opengl" in spec:
+ if spec.satisfies("+opengl"):
args.append("--with-opengl")
else:
args.append("--without-opengl")
- if "+odbc" in spec:
+ if spec.satisfies("+odbc"):
args.append("--with-odbc")
else:
args.append("--without-odbc")
- if "+fftw" in spec:
+ if spec.satisfies("+fftw"):
args.append("--with-fftw")
else:
args.append("--without-fftw")
- if "+blas" in spec:
+ if spec.satisfies("+blas"):
args.append("--with-blas")
else:
args.append("--without-blas")
- if "+lapack" in spec:
+ if spec.satisfies("+lapack"):
args.append("--with-lapack")
else:
args.append("--without-lapack")
- if "+cairo" in spec:
+ if spec.satisfies("+cairo"):
args.append("--with-cairo")
else:
args.append("--without-cairo")
- if "+freetype" in spec:
+ if spec.satisfies("+freetype"):
args.append("--with-freetype")
else:
args.append("--without-freetype")
- if "+readline" in spec:
+ if spec.satisfies("+readline"):
args.append("--with-readline")
else:
args.append("--without-readline")
- if "+regex" in spec:
+ if spec.satisfies("+regex"):
args.append("--with-regex")
else:
args.append("--without-regex")
- if "+pthread" in spec:
+ if spec.satisfies("+pthread"):
args.append("--with-pthread")
else:
args.append("--without-pthread")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
- if "+opencl" in spec:
+ if spec.satisfies("+opencl"):
args.append("--with-opencl")
else:
args.append("--without-opencl")
- if "+bzlib" in spec:
+ if spec.satisfies("+bzlib"):
args.append("--with-bzlib")
else:
args.append("--without-bzlib")
- if "+zstd" in spec:
+ if spec.satisfies("+zstd"):
args.append("--with-zstd")
else:
args.append("--without-zstd")
- if "+gdal" in spec:
+ if spec.satisfies("+gdal"):
args.append("--with-gdal={0}/gdal-config".format(spec["gdal"].prefix.bin))
else:
args.append("--without-gdal")
- if "+liblas" in spec:
+ if spec.satisfies("+liblas"):
args.append("--with-liblas={0}/liblas-config".format(spec["liblas"].prefix.bin))
else:
args.append("--without-liblas")
- if "+wxwidgets" in spec:
+ if spec.satisfies("+wxwidgets"):
args.append("--with-wxwidgets={0}/wx-config".format(spec["wxwidgets"].prefix.bin))
else:
args.append("--without-wxwidgets")
- if "+netcdf" in spec:
+ if spec.satisfies("+netcdf"):
args.append("--with-netcdf={0}/bin/nc-config".format(spec["netcdf-c"].prefix))
else:
args.append("--without-netcdf")
- if "+geos" in spec:
+ if spec.satisfies("+geos"):
args.append("--with-geos={0}/bin/geos-config".format(spec["geos"].prefix))
else:
args.append("--without-geos")
- if "+x" in spec:
+ if spec.satisfies("+x"):
args.append("--with-x")
else:
args.append("--without-x")
diff --git a/var/spack/repos/builtin/packages/grep/package.py b/var/spack/repos/builtin/packages/grep/package.py
index 5a08cad458..a8f2927469 100644
--- a/var/spack/repos/builtin/packages/grep/package.py
+++ b/var/spack/repos/builtin/packages/grep/package.py
@@ -2,6 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+
from spack.package import *
@@ -14,12 +16,16 @@ class Grep(AutotoolsPackage):
license("GPL-3.0-or-later")
+ executables = ["^grep$"]
+
version("3.11", sha256="1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab")
version("3.10", sha256="24efa5b595fb5a7100879b51b8868a0bb87a71c183d02c4c602633b88af6855b")
version("3.9", sha256="abcd11409ee23d4caf35feb422e53bbac867014cfeed313bb5f488aca170b599")
version("3.7", sha256="5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c")
version("3.3", sha256="b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514")
+ depends_on("c", type="build") # generated
+
variant("pcre", default=False, description="Enable Perl Compatible Regular Expression support")
build_directory = "spack-build"
@@ -27,10 +33,18 @@ class Grep(AutotoolsPackage):
depends_on("pcre2", when="@3.8:+pcre")
depends_on("pcre", when="@:3.7+pcre")
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ # Example output:
+ # grep (GNU grep) 3.11
+ match = re.search(r"^grep \(GNU grep\) ([0-9.]+)", output)
+ return match.group(1) if match else None
+
def configure_args(self):
args = []
- if "+pcre" in self.spec:
+ if self.spec.satisfies("+pcre"):
args.append("--enable-perl-regexp")
else:
args.append("--disable-perl-regexp")
diff --git a/var/spack/repos/builtin/packages/grib-api/package.py b/var/spack/repos/builtin/packages/grib-api/package.py
index 70d3d2517d..2f207025a9 100644
--- a/var/spack/repos/builtin/packages/grib-api/package.py
+++ b/var/spack/repos/builtin/packages/grib-api/package.py
@@ -105,7 +105,7 @@ class GribApi(CMakePackage):
for var, opt in var_opt_list
]
- if "+netcdf" in self.spec:
+ if self.spec.satisfies("+netcdf"):
args.extend(
[
"-DENABLE_NETCDF=ON",
@@ -128,12 +128,12 @@ class GribApi(CMakePackage):
if self.spec.variants["jp2k"].value == "openjpeg":
args.append("-DOPENJPEG_PATH=" + self.spec["openjpeg"].prefix)
- if "+png" in self.spec:
+ if self.spec.satisfies("+png"):
args.extend(["-DENABLE_PNG=ON", "-DZLIB_ROOT=" + self.spec["zlib-api"].prefix])
else:
args.append("-DENABLE_PNG=OFF")
- if "+aec" in self.spec:
+ if self.spec.satisfies("+aec"):
args.extend(
[
"-DENABLE_AEC=ON",
diff --git a/var/spack/repos/builtin/packages/grib-util/package.py b/var/spack/repos/builtin/packages/grib-util/package.py
index 54ce211c77..b44e86134e 100644
--- a/var/spack/repos/builtin/packages/grib-util/package.py
+++ b/var/spack/repos/builtin/packages/grib-util/package.py
@@ -18,30 +18,43 @@ class GribUtil(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("1.5.0", tag="v1.5.0", commit="b84e877a62efe6695546a4b7a02e7adb6e1ece25")
+ version("1.4.0", tag="v1.4.0", commit="eeacc9ec93dfe6379f576191883c84a4a1202cc8")
+ version("1.3.0", commit="9d3c68a")
version("1.2.4", sha256="f021d6df3186890b0b1781616dabf953581d71db63e7c2913360336985ccaec7")
version("1.2.3", sha256="b17b08e12360bb8ad01298e615f1b4198e304b0443b6db35fe990a817e648ad5")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("openmp", default=False, description="Use OpenMP multithreading")
+ variant("tests", default=False, description="Enable this variant when installing with --test")
depends_on("jasper")
depends_on("libpng")
depends_on("zlib-api")
depends_on("w3emc +extradeps", when="@1.2.4:")
- depends_on("w3emc precision=4,d", when="^w3emc@2.10:")
+ requires("^w3emc precision=4,d", when="^w3emc@2.10:")
depends_on("w3nco", when="@:1.2.3")
depends_on("g2")
+ depends_on("g2@3.4.9:", when="@1.4")
+ depends_on("g2@3.5:", when="@1.5:")
+ depends_on("g2c@1.8: +utils", when="+tests")
depends_on("bacio")
depends_on("ip")
- depends_on("ip@:3.3.3", when="@:1.2.4")
- depends_on("sp")
+ requires("^ip precision=d", when="^ip@4.1:")
+ depends_on("ip@:3.3.3", when="@:1.2")
+ depends_on("sp", when="^ip@:4")
+ requires("^sp precision=d", when="^ip@:4 ^sp@2.4:")
def cmake_args(self):
args = [
self.define_from_variant("OPENMP", "openmp"),
self.define("BUILD_TESTING", self.run_tests),
+ self.define("G2C_COMPARE", self.run_tests),
]
return args
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/grid/package.py b/var/spack/repos/builtin/packages/grid/package.py
index 952d741b68..9d1b6b3fe0 100644
--- a/var/spack/repos/builtin/packages/grid/package.py
+++ b/var/spack/repos/builtin/packages/grid/package.py
@@ -19,6 +19,8 @@ class Grid(AutotoolsPackage):
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
variant(
"comms",
default="mpi",
@@ -75,12 +77,12 @@ class Grid(AutotoolsPackage):
args = ["--with-gmp", "--with-mpfr"]
if spec.satisfies("^intel-mkl"):
- if "+fftw" in spec or "+lapack" in spec:
+ if spec.satisfies("+fftw") or spec.satisfies("+lapack"):
args.append("--enable-mkl")
else:
- if "+fftw" in spec:
+ if spec.satisfies("+fftw"):
args.append("--with-fftw={0}".format(self.spec["fftw-api"].prefix))
- if "+lapack" in spec:
+ if spec.satisfies("+lapack"):
args.append("--enable-lapack={0}".format(self.spec["lapack"].prefix))
# lapack is searched only as `-llapack`, so anything else
# wouldn't be found, causing an error.
diff --git a/var/spack/repos/builtin/packages/gridlab-d/package.py b/var/spack/repos/builtin/packages/gridlab-d/package.py
index aa3ecdcbd1..882b065fb5 100644
--- a/var/spack/repos/builtin/packages/gridlab-d/package.py
+++ b/var/spack/repos/builtin/packages/gridlab-d/package.py
@@ -24,6 +24,9 @@ class GridlabD(AutotoolsPackage):
# Using only develop as other branches and releases did not build properly.
version("develop", branch="develop")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mysql", default=False, description="Enable MySQL support for Gridlab-D.")
variant("helics", default=False, description="Enable Helics support for Gridlab-D.")
@@ -39,7 +42,7 @@ class GridlabD(AutotoolsPackage):
def configure_args(self):
args = []
- if "+helics" in self.spec:
+ if self.spec.satisfies("+helics"):
# Taken from
# https://github.com/GMLC-TDC/HELICS-Tutorial/tree/master/setup
args.append("--with-helics=" + self.spec["helics"].prefix)
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py
index c648b7e16b..8e96bc06ad 100644
--- a/var/spack/repos/builtin/packages/groff/package.py
+++ b/var/spack/repos/builtin/packages/groff/package.py
@@ -6,7 +6,6 @@
import re
from spack.package import *
-from spack.util.environment import is_system_path
class Groff(AutotoolsPackage, GNUMirrorPackage):
@@ -22,9 +21,13 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("1.23.0", sha256="6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c13")
version("1.22.4", sha256="e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293")
version("1.22.3", sha256="3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# TODO: add html variant, spack doesn't have netpbm and its too
# complicated for me to find out at this point in time.
# See brew scripts for groff for guidance:
@@ -41,6 +44,7 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
conflicts("+uchardet", when="@:1.22.3")
+ depends_on("m4", type="build")
depends_on("gawk", type="build")
depends_on("gmake", type="build")
depends_on("sed", type="build")
@@ -78,12 +82,12 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
def configure_args(self):
args = ["--disable-silent-rules"]
args.extend(self.with_or_without("x"))
- if "@1.22.4:" in self.spec:
+ if self.spec.satisfies("@1.22.4:"):
args.extend(self.with_or_without("uchardet"))
- if self.spec["iconv"].name == "libc":
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(self.spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(self.spec["iconv"].prefix))
return args
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/gromacs-chain-coordinate/package.py b/var/spack/repos/builtin/packages/gromacs-chain-coordinate/package.py
index bc9ca53f29..d5160ebf4b 100644
--- a/var/spack/repos/builtin/packages/gromacs-chain-coordinate/package.py
+++ b/var/spack/repos/builtin/packages/gromacs-chain-coordinate/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
+from spack.pkg.builtin.gromacs import CMakeBuilder as GromacsCMakeBuilder
from spack.pkg.builtin.gromacs import Gromacs
@@ -14,13 +15,19 @@ class GromacsChainCoordinate(Gromacs):
"""
homepage = "https://gitlab.com/cbjh/gromacs-chain-coordinate/-/blob/main/README.md"
- url = "https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.2/gromacs-chain-coordinate-release-2021.chaincoord-0.2.tar.bz2"
+ url = "https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.3/gromacs-chain-coordinate-release-2021.chaincoord-0.3.tar.bz2"
git = "https://gitlab.com/cbjh/gromacs-chain-coordinate.git"
maintainers("w8jcik")
version("main", branch="main")
version(
+ "2021.5-0.3",
+ sha256="64ec5f385445ae43dfec8c27198034c0ba641863ab856c8c29798a4c83016baa",
+ url="https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.3/gromacs-chain-coordinate-release-2021.chaincoord-0.3.tar.bz2",
+ )
+
+ version(
"2021.5-0.2",
sha256="33dda1e39cd47c5ae32b5455af8534225d3888fd7e4968f499b8483620fa770a",
url="https://gitlab.com/cbjh/gromacs-chain-coordinate/-/archive/release-2021.chaincoord-0.2/gromacs-chain-coordinate-release-2021.chaincoord-0.2.tar.bz2",
@@ -56,3 +63,7 @@ class GromacsChainCoordinate(Gromacs):
self._if_make_target_execute("check")
elif self.generator == "Ninja":
self._if_ninja_target_execute("check")
+
+
+class CMakeBuilder(GromacsCMakeBuilder):
+ pass
diff --git a/var/spack/repos/builtin/packages/gromacs-swaxs/package.py b/var/spack/repos/builtin/packages/gromacs-swaxs/package.py
index e6bf451be6..bea5a16102 100644
--- a/var/spack/repos/builtin/packages/gromacs-swaxs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs-swaxs/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
+from spack.pkg.builtin.gromacs import CMakeBuilder as GromacsCMakeBuilder
from spack.pkg.builtin.gromacs import Gromacs
@@ -11,11 +12,17 @@ class GromacsSwaxs(Gromacs):
"""Modified Gromacs for small-angle scattering calculations (SAXS/WAXS/SANS)"""
homepage = "https://biophys.uni-saarland.de/swaxs.html"
- url = "https://gitlab.com/cbjh/gromacs-swaxs/-/archive/release-2019.swaxs-0.1/gromacs-swaxs-release-2019.swaxs-0.1.tar.bz2"
+ url = "https://gitlab.com/cbjh/gromacs-swaxs/-/archive/release-2021.swaxs-0.5/gromacs-swaxs-release-2021.swaxs-0.5.tar.bz2"
git = "https://gitlab.com/cbjh/gromacs-swaxs.git"
maintainers("w8jcik")
version(
+ "2021.5-0.5",
+ sha256="7207f107dc6c4009a04a533e18545666d4f58c172b2b24d04442bb1a0f43ff44",
+ url="https://gitlab.com/cbjh/gromacs-swaxs/-/archive/release-2021.swaxs-0.5/gromacs-swaxs-release-2021.swaxs-0.5.tar.bz2",
+ )
+
+ version(
"2021.5-0.4",
sha256="9f8ed6d448a04789d45e847cbbc706a07130377f578388220a9d5357fae9d1c3",
url="https://gitlab.com/cbjh/gromacs-swaxs/-/archive/release-2021.swaxs-0.4/gromacs-swaxs-release-2021.swaxs-0.4.tar.bz2",
@@ -151,3 +158,7 @@ class GromacsSwaxs(Gromacs):
super().__init__(spec)
self.remove_parent_versions()
+
+
+class CMakeBuilder(GromacsCMakeBuilder):
+ pass
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index dbd4057df5..0caecfe319 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -7,6 +7,7 @@ import os
import llnl.util.filesystem as fs
+import spack.build_systems.cmake
from spack.package import *
@@ -26,12 +27,37 @@ class Gromacs(CMakePackage, CudaPackage):
url = "https://ftp.gromacs.org/gromacs/gromacs-2022.2.tar.gz"
list_url = "https://ftp.gromacs.org/gromacs"
git = "https://gitlab.com/gromacs/gromacs.git"
- maintainers("danielahlin", "eirrgang", "junghans")
-
- license("BSD-2-Clause")
+ maintainers("mabraham", "eirrgang", "junghans")
+
+ license("GPL-2.0-or-later", when="@:4.5")
+ license("LGPL-2.1-or-later", when="@4.6:")
+
+ # Deprecation policy:
+ #
+ # GROMACS makes an annual major release and supports it with fixes
+ # in minor updates for about two years. Each such annual release
+ # series is supported in spack for those two years, then marked as
+ # deprecated in Spack. Deprecated versions can be removed after
+ # the next major release of GROMACS is supported in Spack. Users
+ # needing such an old version can either do a manual installation
+ # or get an older version of Spack.
+ #
+ # Exception: Version 2019.6 is the last version capable of tabulated
+ # interactions used in the so-called "group scheme." It will be marked
+ # as deprecated only after equivalent functionality is available in
+ # a major release of GROMACS, then removed as above.
+ #
+ # Exception: Otherwise, versions before 2022 will be removed when
+ # 2025 is supported.
version("main", branch="main")
version("master", branch="main", deprecated=True)
+ version("2024.3", sha256="bbda056ee59390be7d58d84c13a9ec0d4e3635617adf2eb747034922cba1f029")
+ version("2024.2", sha256="802a7e335f2e895770f57b159e4ec368ebb0ff2ce6daccf706c6e8025c36852b")
+ version("2024.1", sha256="937d8f12a36fffbf2af7add71adbb5aa5c5537892d46c9a76afbecab1aa0aac7")
+ version("2024", sha256="04d226d52066a8bc3a42e00d6213de737b4ec292e26703065924ff01956801e2")
+ version("2023.5", sha256="9cc491d3601a5fe0ec0de727e4432c34877f596fe8a463d4cf0f0f53fb34d08b")
+ version("2023.4", sha256="e5d6c4d9e7ccacfaccb0888619bd21b5ea8911f82b410e68d6db5d40f695f231")
version("2023.3", sha256="4ec8f8d0c7af76b13f8fd16db8e2c120e749de439ae9554d9f653f812d78d1cb")
version("2023.2", sha256="bce1480727e4b2bb900413b75d99a3266f3507877da4f5b2d491df798f9fcdae")
version("2023.1", sha256="eef2bb4a6cb6314cf9da47f26df2a0d27af4bf7b3099723d43601073ab0a42f4")
@@ -43,45 +69,201 @@ class Gromacs(CMakePackage, CudaPackage):
version("2022.2", sha256="656404f884d2fa2244c97d2a5b92af148d0dbea94ad13004724b3fcbf45e01bf")
version("2022.1", sha256="85ddab5197d79524a702c4959c2c43be875e0fc471df3a35224939dce8512450")
version("2022", sha256="fad60d606c02e6164018692c6c9f2c159a9130c2bf32e8c5f4f1b6ba2dda2b68")
- version("2021.7", sha256="4db7bbbfe5424de48373686ec0e8c5bfa7175d5cd74290ef1c1e840e6df67f06")
- version("2021.6", sha256="52df2c1d7586fd028d9397985c68bd6dd26e6e905ead382b7e6c473d087902c3")
- version("2021.5", sha256="eba63fe6106812f72711ef7f76447b12dd1ee6c81b3d8d4d0e3098cd9ea009b6")
- version("2021.4", sha256="cb708a3e3e83abef5ba475fdb62ef8d42ce8868d68f52dafdb6702dc9742ba1d")
- version("2021.3", sha256="e109856ec444768dfbde41f3059e3123abdb8fe56ca33b1a83f31ed4575a1cc6")
- version("2021.2", sha256="d940d865ea91e78318043e71f229ce80d32b0dc578d64ee5aa2b1a4be801aadb")
- version("2021.1", sha256="bc1d0a75c134e1fb003202262fe10d3d32c59bbb40d714bc3e5015c71effe1e5")
- version("2021", sha256="efa78ab8409b0f5bf0fbca174fb8fbcf012815326b5c71a9d7c385cde9a8f87b")
- version("2020.7", sha256="744158d8f61b0d36ffe89ec934519b7e0981a7af438897740160da648d36c2f0")
- version("2020.6", sha256="d8bbe57ed3c9925a8cb99ecfe39e217f930bed47d5268a9e42b33da544bdb2ee")
- version("2020.5", sha256="7b6aff647f7c8ee1bf12204d02cef7c55f44402a73195bd5f42cf11850616478")
- version("2020.4", sha256="5519690321b5500c7951aaf53ff624042c3edd1a5f5d6dd1f2d802a3ecdbf4e6")
- version("2020.3", sha256="903183691132db14e55b011305db4b6f4901cc4912d2c56c131edfef18cc92a9")
- version("2020.2", sha256="7465e4cd616359d84489d919ec9e4b1aaf51f0a4296e693c249e83411b7bd2f3")
- version("2020.1", sha256="e1666558831a3951c02b81000842223698016922806a8ce152e8f616e29899cf")
- version("2020", sha256="477e56142b3dcd9cb61b8f67b24a55760b04d1655e8684f979a75a5eec40ba01")
+ version(
+ "2021.7",
+ sha256="4db7bbbfe5424de48373686ec0e8c5bfa7175d5cd74290ef1c1e840e6df67f06",
+ deprecated=True,
+ )
+ version(
+ "2021.6",
+ sha256="52df2c1d7586fd028d9397985c68bd6dd26e6e905ead382b7e6c473d087902c3",
+ deprecated=True,
+ )
+ version(
+ "2021.5",
+ sha256="eba63fe6106812f72711ef7f76447b12dd1ee6c81b3d8d4d0e3098cd9ea009b6",
+ deprecated=True,
+ )
+ version(
+ "2021.4",
+ sha256="cb708a3e3e83abef5ba475fdb62ef8d42ce8868d68f52dafdb6702dc9742ba1d",
+ deprecated=True,
+ )
+ version(
+ "2021.3",
+ sha256="e109856ec444768dfbde41f3059e3123abdb8fe56ca33b1a83f31ed4575a1cc6",
+ deprecated=True,
+ )
+ version(
+ "2021.2",
+ sha256="d940d865ea91e78318043e71f229ce80d32b0dc578d64ee5aa2b1a4be801aadb",
+ deprecated=True,
+ )
+ version(
+ "2021.1",
+ sha256="bc1d0a75c134e1fb003202262fe10d3d32c59bbb40d714bc3e5015c71effe1e5",
+ deprecated=True,
+ )
+ version(
+ "2021",
+ sha256="efa78ab8409b0f5bf0fbca174fb8fbcf012815326b5c71a9d7c385cde9a8f87b",
+ deprecated=True,
+ )
+ version(
+ "2020.7",
+ sha256="744158d8f61b0d36ffe89ec934519b7e0981a7af438897740160da648d36c2f0",
+ deprecated=True,
+ )
+ version(
+ "2020.6",
+ sha256="d8bbe57ed3c9925a8cb99ecfe39e217f930bed47d5268a9e42b33da544bdb2ee",
+ deprecated=True,
+ )
+ version(
+ "2020.5",
+ sha256="7b6aff647f7c8ee1bf12204d02cef7c55f44402a73195bd5f42cf11850616478",
+ deprecated=True,
+ )
+ version(
+ "2020.4",
+ sha256="5519690321b5500c7951aaf53ff624042c3edd1a5f5d6dd1f2d802a3ecdbf4e6",
+ deprecated=True,
+ )
+ version(
+ "2020.3",
+ sha256="903183691132db14e55b011305db4b6f4901cc4912d2c56c131edfef18cc92a9",
+ deprecated=True,
+ )
+ version(
+ "2020.2",
+ sha256="7465e4cd616359d84489d919ec9e4b1aaf51f0a4296e693c249e83411b7bd2f3",
+ deprecated=True,
+ )
+ version(
+ "2020.1",
+ sha256="e1666558831a3951c02b81000842223698016922806a8ce152e8f616e29899cf",
+ deprecated=True,
+ )
+ version(
+ "2020",
+ sha256="477e56142b3dcd9cb61b8f67b24a55760b04d1655e8684f979a75a5eec40ba01",
+ deprecated=True,
+ )
version("2019.6", sha256="bebe396dc0db11a9d4cc205abc13b50d88225617642508168a2195324f06a358")
- version("2019.5", sha256="438061a4a2d45bbb5cf5c3aadd6c6df32d2d77ce8c715f1c8ffe56156994083a")
- version("2019.4", sha256="ba4366eedfc8a1dbf6bddcef190be8cd75de53691133f305a7f9c296e5ca1867")
- version("2019.3", sha256="4211a598bf3b7aca2b14ad991448947da9032566f13239b1a05a2d4824357573")
- version("2019.2", sha256="bcbf5cc071926bc67baa5be6fb04f0986a2b107e1573e15fadcb7d7fc4fb9f7e")
- version("2019.1", sha256="b2c37ed2fcd0e64c4efcabdc8ee581143986527192e6e647a197c76d9c4583ec")
- version("2019", sha256="c5b281a5f0b5b4eeb1f4c7d4dc72f96985b566561ca28acc9c7c16f6ee110d0b")
- version("2018.8", sha256="776923415df4bc78869d7f387c834141fdcda930b2e75be979dc59ecfa6ebecf")
- version("2018.5", sha256="32261df6f7ec4149fc0508f9af416953d056e281590359838c1ed6644ba097b8")
- version("2018.4", sha256="6f2ee458c730994a8549d6b4f601ecfc9432731462f8bd4ffa35d330d9aaa891")
- version("2018.3", sha256="4423a49224972969c52af7b1f151579cea6ab52148d8d7cbae28c183520aa291")
- version("2018.2", sha256="4bdde8120c510b6543afb4b18f82551fddb11851f7edbd814aa24022c5d37857")
- version("2018.1", sha256="4d3533340499323fece83b4a2d4251fa856376f2426c541e00b8e6b4c0d705cd")
- version("2018", sha256="deb5d0b749a52a0c6083367b5f50a99e08003208d81954fb49e7009e1b1fd0e9")
- version("2016.6", sha256="bac0117d2cad21f9b94fe5b854fb9ae7435b098a6da4e732ee745f18e52473d7")
- version("2016.5", sha256="57db26c6d9af84710a1e0c47a1f5bf63a22641456448dcd2eeb556ebd14e0b7c")
- version("2016.4", sha256="4be9d3bfda0bdf3b5c53041e0b8344f7d22b75128759d9bfa9442fe65c289264")
- version("2016.3", sha256="7bf00e74a9d38b7cef9356141d20e4ba9387289cbbfd4d11be479ef932d77d27")
- version("5.1.5", sha256="c25266abf07690ecad16ed3996899b1d489cbb1ef733a1befb3b5c75c91a703e")
- version("5.1.4", sha256="0f3793d8f1f0be747cf9ebb0b588fb2b2b5dc5acc32c3046a7bee2d2c03437bc")
- version("5.1.2", sha256="39d6f1d7ae8ba38cea6089da40676bfa4049a49903d21551abc030992a58f304")
- version("4.6.7", sha256="6afb1837e363192043de34b188ca3cf83db6bd189601f2001a1fc5b0b2a214d9")
- version("4.5.5", sha256="e0605e4810b0d552a8761fef5540c545beeaf85893f4a6e21df9905a33f871ba")
+ version(
+ "2019.5",
+ sha256="438061a4a2d45bbb5cf5c3aadd6c6df32d2d77ce8c715f1c8ffe56156994083a",
+ deprecated=True,
+ )
+ version(
+ "2019.4",
+ sha256="ba4366eedfc8a1dbf6bddcef190be8cd75de53691133f305a7f9c296e5ca1867",
+ deprecated=True,
+ )
+ version(
+ "2019.3",
+ sha256="4211a598bf3b7aca2b14ad991448947da9032566f13239b1a05a2d4824357573",
+ deprecated=True,
+ )
+ version(
+ "2019.2",
+ sha256="bcbf5cc071926bc67baa5be6fb04f0986a2b107e1573e15fadcb7d7fc4fb9f7e",
+ deprecated=True,
+ )
+ version(
+ "2019.1",
+ sha256="b2c37ed2fcd0e64c4efcabdc8ee581143986527192e6e647a197c76d9c4583ec",
+ deprecated=True,
+ )
+ version(
+ "2019",
+ sha256="c5b281a5f0b5b4eeb1f4c7d4dc72f96985b566561ca28acc9c7c16f6ee110d0b",
+ deprecated=True,
+ )
+ version(
+ "2018.8",
+ sha256="776923415df4bc78869d7f387c834141fdcda930b2e75be979dc59ecfa6ebecf",
+ deprecated=True,
+ )
+ version(
+ "2018.5",
+ sha256="32261df6f7ec4149fc0508f9af416953d056e281590359838c1ed6644ba097b8",
+ deprecated=True,
+ )
+ version(
+ "2018.4",
+ sha256="6f2ee458c730994a8549d6b4f601ecfc9432731462f8bd4ffa35d330d9aaa891",
+ deprecated=True,
+ )
+ version(
+ "2018.3",
+ sha256="4423a49224972969c52af7b1f151579cea6ab52148d8d7cbae28c183520aa291",
+ deprecated=True,
+ )
+ version(
+ "2018.2",
+ sha256="4bdde8120c510b6543afb4b18f82551fddb11851f7edbd814aa24022c5d37857",
+ deprecated=True,
+ )
+ version(
+ "2018.1",
+ sha256="4d3533340499323fece83b4a2d4251fa856376f2426c541e00b8e6b4c0d705cd",
+ deprecated=True,
+ )
+ version(
+ "2018",
+ sha256="deb5d0b749a52a0c6083367b5f50a99e08003208d81954fb49e7009e1b1fd0e9",
+ deprecated=True,
+ )
+ version(
+ "2016.6",
+ sha256="bac0117d2cad21f9b94fe5b854fb9ae7435b098a6da4e732ee745f18e52473d7",
+ deprecated=True,
+ )
+ version(
+ "2016.5",
+ sha256="57db26c6d9af84710a1e0c47a1f5bf63a22641456448dcd2eeb556ebd14e0b7c",
+ deprecated=True,
+ )
+ version(
+ "2016.4",
+ sha256="4be9d3bfda0bdf3b5c53041e0b8344f7d22b75128759d9bfa9442fe65c289264",
+ deprecated=True,
+ )
+ version(
+ "2016.3",
+ sha256="7bf00e74a9d38b7cef9356141d20e4ba9387289cbbfd4d11be479ef932d77d27",
+ deprecated=True,
+ )
+ version(
+ "5.1.5",
+ sha256="c25266abf07690ecad16ed3996899b1d489cbb1ef733a1befb3b5c75c91a703e",
+ deprecated=True,
+ )
+ version(
+ "5.1.4",
+ sha256="0f3793d8f1f0be747cf9ebb0b588fb2b2b5dc5acc32c3046a7bee2d2c03437bc",
+ deprecated=True,
+ )
+ version(
+ "5.1.2",
+ sha256="39d6f1d7ae8ba38cea6089da40676bfa4049a49903d21551abc030992a58f304",
+ deprecated=True,
+ )
+ version(
+ "4.6.7",
+ sha256="6afb1837e363192043de34b188ca3cf83db6bd189601f2001a1fc5b0b2a214d9",
+ deprecated=True,
+ )
+ version(
+ "4.5.5",
+ sha256="e0605e4810b0d552a8761fef5540c545beeaf85893f4a6e21df9905a33f871ba",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"mpi", default=True, description="Activate MPI support (disable for Thread-MPI support)"
@@ -101,11 +283,22 @@ class Gromacs(CMakePackage, CudaPackage):
variant(
"heffte",
default=False,
- when="@2021: +sycl+mpi",
+ when="@2021: +mpi",
description="Enable multi-GPU FFT support with HeFFTe",
)
+ depends_on("heffte +cuda", when="+heffte +cuda")
+ depends_on("heffte +sycl", when="+heffte +sycl")
variant("opencl", default=False, description="Enable OpenCL support")
variant("sycl", default=False, when="@2021:", description="Enable SYCL support")
+ requires(
+ "^intel-oneapi-runtime",
+ "^hipsycl %clang",
+ policy="one_of",
+ when="+sycl",
+ msg="GROMACS SYCL support comes either from intel-oneapi-runtime or a "
+ + "package that provides the virtual package `sycl`, such as AdaptiveCpp "
+ + "plus a clang compiler.",
+ )
variant(
"intel-data-center-gpu-max",
default=False,
@@ -148,6 +341,21 @@ class Gromacs(CMakePackage, CudaPackage):
conflicts(
"+mdrun_only", when="@2021:", msg="mdrun-only build option was removed for GROMACS 2021."
)
+ variant(
+ "nvshmem",
+ default=False,
+ when="@2024:+mpi+cuda",
+ description="Enable NVSHMEM support for Nvidia GPUs",
+ )
+ conflicts(
+ "+nvshmem",
+ when="+cufftmp",
+ msg=(
+ "The GROMACS support for NVSHMEM does not work with the GROMACS support "
+ "for cuFFTMp (even though cuFFTMp uses NVSHMEM in its implementation)"
+ ),
+ )
+
variant("openmp", default=True, description="Enables OpenMP at configure time")
variant("openmp_max_threads", default="none", description="Max number of OpenMP threads")
conflicts(
@@ -157,7 +365,7 @@ class Gromacs(CMakePackage, CudaPackage):
"sve",
default=True,
description="Enable SVE on aarch64 if available",
- when="target=neoverse_v1",
+ when="target=neoverse_v1:,neoverse_v2:,neoverse_n2:",
)
variant(
"sve", default=True, description="Enable SVE on aarch64 if available", when="target=a64fx"
@@ -221,16 +429,21 @@ class Gromacs(CMakePackage, CudaPackage):
# Above dependencies can be verified, and new versions added, by going to
# https://github.com/plumed/plumed2/tree/v2.9.0/patches
# and switching tags.
+
+ # Versions without minor release number, such as `2023` and `2021`,
+ # require exact specifcation using `@=`, starting from Spack v0.20.0,
+ # see https://github.com/spack/spack/releases/tag/v0.20.0
+
plumed_patches = {
- "2023": "2.9.0",
- "2022.5": "2.8.2:2.9.0",
+ "=2023": "2.9.1",
+ "2022.5": "2.8.2:2.9.1",
"2022.3": "2.8.1",
- "2021.7": "2.8.2:2.9.0",
+ "2021.7": "2.8.2:2.9.1",
"2021.6": "2.8.1",
"2021.5": "2.7.5:2.7.6",
"2021.4": "2.7.3:2.8.0",
- "2021": "2.7.1:2.7.2",
- "2020.7": "2.8.1:2.9.0",
+ "=2021": "2.7.1:2.7.2",
+ "2020.7": "2.8.1:2.9.1",
"2020.6": "2.7.2:2.8.0",
"2020.5": "2.7.1",
"2020.4": "2.6.2:2.7.0",
@@ -264,6 +477,15 @@ class Gromacs(CMakePackage, CudaPackage):
+ "The g++ location is written to icp{c,x}.cfg",
)
+ variant(
+ "itt",
+ default=False,
+ when="@2024:",
+ description="Enable Instrumentation and Tracing Technology (ITT)"
+ + " profiling API (from Intel)",
+ )
+ depends_on("intel-oneapi-vtune", "+itt")
+
depends_on("fftw-api@3")
depends_on("cmake@2.8.8:3", type="build")
depends_on("cmake@3.4.3:3", type="build", when="@2018:")
@@ -272,12 +494,20 @@ class Gromacs(CMakePackage, CudaPackage):
depends_on("cmake@3.16.3:3", type="build", when="@2022:")
depends_on("cmake@3.18.4:3", type="build", when="@main")
depends_on("cmake@3.16.0:3", type="build", when="%fj")
+ depends_on("pkgconfig", type="build")
+
depends_on("cuda", when="+cuda")
depends_on("sycl", when="+sycl")
depends_on("lapack")
depends_on("blas")
- depends_on("gcc", when="%oneapi ~intel_provided_gcc")
depends_on("gcc", when="%intel ~intel_provided_gcc")
+ # TODO this can be expanded to all clang-based compilers once
+ # the principle is demonstrated to work
+ with when("%oneapi ~intel_provided_gcc"):
+ depends_on("gcc-runtime@5:", when="@2020")
+ depends_on("gcc-runtime@7:", when="@2021:2022")
+ depends_on("gcc-runtime@9:", when="@2023:2024")
+ depends_on("gcc-runtime@11:", when="@2025:")
depends_on("hwloc@1.0:1", when="+hwloc@2016:2018")
depends_on("hwloc", when="+hwloc@2019:")
@@ -285,6 +515,7 @@ class Gromacs(CMakePackage, CudaPackage):
depends_on("cp2k@8.1:", when="+cp2k")
depends_on("nvhpc", when="+cufftmp")
+ depends_on("nvhpc", when="+nvshmem")
depends_on("heffte", when="+heffte")
requires(
@@ -350,14 +581,14 @@ class Gromacs(CMakePackage, CudaPackage):
string=True,
)
- if "+plumed" in self.spec:
+ if self.spec.satisfies("+plumed"):
self.spec["plumed"].package.apply_patch(self)
if self.spec.satisfies("%nvhpc"):
# Disable obsolete workaround
filter_file("ifdef __PGI", "if 0", "src/gromacs/fileio/xdrf.h")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
# Upstream supports building of last two major versions of Gromacs.
# Older versions of Gromacs need to be patched to build with more recent
# versions of CUDA library.
@@ -393,6 +624,20 @@ class Gromacs(CMakePackage, CudaPackage):
r"-gencode;arch=compute_20,code=sm_21;?", "", "cmake/gmxManageNvccConfig.cmake"
)
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+cufftmp"):
+ env.append_path(
+ "LD_LIBRARY_PATH",
+ join_path(
+ self.spec["nvhpc"].prefix,
+ f"Linux_{self.spec.target.family}",
+ self.spec["nvhpc"].version,
+ "comm_libs",
+ "nvshmem",
+ "lib",
+ ),
+ )
+
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
@run_after("build")
@@ -438,7 +683,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
# In other words, the mapping between package variants and the
# GMX CMake variables is often non-trivial.
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
options.append("-DGMX_MPI:BOOL=ON")
if self.pkg.version < Version("2020"):
# Ensures gmxapi builds properly
@@ -491,43 +736,46 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
):
with open(".".join([os.environ["SPACK_CXX"], "cfg"]), "r") as f:
options.append("-DCMAKE_CXX_FLAGS={}".format(f.read()))
- else:
+ elif self.spec.satisfies("^gcc"):
options.append("-DGMX_GPLUSPLUS_PATH=%s/g++" % self.spec["gcc"].prefix.bin)
- if "+double" in self.spec:
+ if self.spec.satisfies("+double"):
options.append("-DGMX_DOUBLE:BOOL=ON")
- if "+nosuffix" in self.spec:
+ if self.spec.satisfies("+nosuffix"):
options.append("-DGMX_DEFAULT_SUFFIX:BOOL=OFF")
- if "~shared" in self.spec:
+ if self.spec.satisfies("~shared"):
options.append("-DBUILD_SHARED_LIBS:BOOL=OFF")
options.append("-DGMXAPI:BOOL=OFF")
- if "+hwloc" in self.spec:
+ if self.spec.satisfies("+hwloc"):
options.append("-DGMX_HWLOC:BOOL=ON")
else:
options.append("-DGMX_HWLOC:BOOL=OFF")
if self.pkg.version >= Version("2021"):
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
options.append("-DGMX_GPU:STRING=CUDA")
- elif "+opencl" in self.spec:
+ elif self.spec.satisfies("+opencl"):
options.append("-DGMX_GPU:STRING=OpenCL")
- elif "+sycl" in self.spec:
+ elif self.spec.satisfies("+sycl"):
options.append("-DGMX_GPU:STRING=SYCL")
else:
options.append("-DGMX_GPU:STRING=OFF")
else:
- if "+cuda" in self.spec or "+opencl" in self.spec:
+ if self.spec.satisfies("+cuda") or self.spec.satisfies("+opencl"):
options.append("-DGMX_GPU:BOOL=ON")
- if "+opencl" in self.spec:
+ if self.spec.satisfies("+opencl"):
options.append("-DGMX_USE_OPENCL=ON")
else:
options.append("-DGMX_GPU:BOOL=OFF")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
options.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix)
+ if not self.spec.satisfies("cuda_arch=none"):
+ cuda_arch = self.spec.variants["cuda_arch"].value
+ options.append(f"-DGMX_CUDA_TARGET_SM:STRING={';'.join(cuda_arch)}")
options.append("-DGMX_EXTERNAL_LAPACK:BOOL=ON")
if self.spec["lapack"].libs:
@@ -537,28 +785,35 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
if self.spec["blas"].libs:
options.append("-DGMX_BLAS_USER={0}".format(self.spec["blas"].libs.joined(";")))
- if "+cp2k" in self.spec:
+ if self.spec.satisfies("+cp2k"):
options.append("-DGMX_CP2K:BOOL=ON")
options.append("-DCP2K_DIR:STRING={0}".format(self.spec["cp2k"].prefix))
- if "+cufftmp" in self.spec:
+ if self.spec.satisfies("+cufftmp"):
options.append("-DGMX_USE_CUFFTMP=ON")
options.append(
f'-DcuFFTMp_ROOT={self.spec["nvhpc"].prefix}/Linux_{self.spec.target.family}'
+ f'/{self.spec["nvhpc"].version}/math_libs'
)
- if "+heffte" in self.spec:
+ if self.spec.satisfies("+heffte"):
options.append("-DGMX_USE_HEFFTE=on")
options.append(f'-DHeffte_ROOT={self.spec["heffte"].prefix}')
- if "+intel-data-center-gpu-max" in self.spec:
+ if self.spec.satisfies("+intel-data-center-gpu-max"):
options.append("-DGMX_GPU_NB_CLUSTER_SIZE=8")
options.append("-DGMX_GPU_NB_NUM_CLUSTER_PER_CELL_X=1")
- if "~nblib" in self.spec:
+ if "+itt" in self.spec:
+ options.append("-DGMX_USE_ITT=on")
+ options.append(
+ "-DITTNOTIFY_INCLUDE_DIR=%s"
+ % self.spec["intel-oneapi-vtune"].package.headers.directories[0]
+ )
+
+ if self.spec.satisfies("~nblib"):
options.append("-DGMX_INSTALL_NBLIB_API=OFF")
- if "~gmxapi" in self.spec:
+ if self.spec.satisfies("~gmxapi"):
options.append("-DGMXAPI=OFF")
# Activate SIMD based on properties of the target
@@ -634,7 +889,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
)
)
- if "+cycle_subcounters" in self.spec:
+ if self.spec.satisfies("+cycle_subcounters"):
options.append("-DGMX_CYCLE_SUBCOUNTERS:BOOL=ON")
else:
options.append("-DGMX_CYCLE_SUBCOUNTERS:BOOL=OFF")
@@ -643,6 +898,16 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
options.append(
"-DGMX_OPENMP_MAX_THREADS=%s" % self.spec.variants["openmp_max_threads"].value
)
+ if self.spec.satisfies("+nvshmem"):
+ options.append("-DGMX_NVSHMEM:BOOL=ON")
+ nvshmem_root = join_path(
+ self.spec["nvhpc"].prefix,
+ f"Linux_{self.spec.target.family}",
+ self.spec["nvhpc"].version,
+ "comm_libs",
+ "nvshmem",
+ )
+ options.append(f"-DNVSHMEM_ROOT={nvshmem_root}")
if self.spec["lapack"].name in INTEL_MATH_LIBRARIES:
# fftw-api@3 is provided by intel-mkl or intel-parllel-studio
@@ -658,7 +923,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
else:
# we rely on the fftw-api@3
options.append("-DGMX_FFT_LIBRARY=fftw3")
- if "^amdfftw" in self.spec:
+ if self.spec.satisfies("^[virtuals=fftw-api] amdfftw"):
options.append("-DGMX_FFT_LIBRARY=fftw3")
options.append(
"-DFFTWF_INCLUDE_DIRS={0}".format(self.spec["amdfftw"].headers.directories[0])
@@ -666,14 +931,14 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
options.append(
"-DFFTWF_LIBRARIES={0}".format(self.spec["amdfftw"].libs.joined(";"))
)
- elif "^armpl-gcc" in self.spec:
+ elif self.spec.satisfies("^armpl-gcc"):
options.append(
"-DFFTWF_INCLUDE_DIR={0}".format(self.spec["armpl-gcc"].headers.directories[0])
)
options.append(
"-DFFTWF_LIBRARY={0}".format(self.spec["armpl-gcc"].libs.joined(";"))
)
- elif "^acfl" in self.spec:
+ elif self.spec.satisfies("^acfl"):
options.append(
"-DFFTWF_INCLUDE_DIR={0}".format(self.spec["acfl"].headers.directories[0])
)
@@ -681,8 +946,22 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
# Ensure that the GROMACS log files report how the code was patched
# during the build, so that any problems are easier to diagnose.
- if "+plumed" in self.spec:
+ if self.spec.satisfies("+plumed"):
options.append("-DGMX_VERSION_STRING_OF_FORK=PLUMED-spack")
else:
options.append("-DGMX_VERSION_STRING_OF_FORK=spack")
return options
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+cufftmp"):
+ env.append_path(
+ "LD_LIBRARY_PATH",
+ join_path(
+ self.spec["nvhpc"].prefix,
+ f"Linux_{self.spec.target.family}",
+ self.spec["nvhpc"].version,
+ "comm_libs",
+ "nvshmem",
+ "lib",
+ ),
+ )
diff --git a/var/spack/repos/builtin/packages/grpc/package.py b/var/spack/repos/builtin/packages/grpc/package.py
index 03bdb71303..0f58af9076 100644
--- a/var/spack/repos/builtin/packages/grpc/package.py
+++ b/var/spack/repos/builtin/packages/grpc/package.py
@@ -8,13 +8,17 @@ from spack.package import *
class Grpc(CMakePackage):
"""A high performance, open-source universal RPC framework."""
- maintainers("nazavode")
-
homepage = "https://grpc.io"
- url = "https://github.com/grpc/grpc/archive/v1.39.0.tar.gz"
+ url = "https://github.com/grpc/grpc/archive/v1.59.1.tar.gz"
license("Apache-2.0 AND BSD-3-Clause AND MIT")
+ version("1.66.1", sha256="79ed4ab72fa9589b20f8b0b76c16e353e4cfec1d773d33afad605d97b5682c61")
+ version("1.64.0", sha256="d5509e40fb24f6390deeef8a88668124f4ec77d2ebb3b1a957b235a2f08b70c0")
+ version("1.63.0", sha256="493d9905aa09124c2f44268b66205dd013f3925a7e82995f36745974e97af609")
+ version("1.62.2", sha256="e5d5e0dd96fe9452fe24cc8c827381dca484c54d171fb512a198025fec81a3c8")
+ version("1.61.2", sha256="86f8773434c4b8a4b64c67c91a19a90991f0da0ba054bbeb299dc1bc95fad1e9")
+ version("1.59.1", sha256="916f88a34f06b56432611aaa8c55befee96d0a7b7d7457733b9deeacbc016f99")
version("1.55.0", sha256="9cf1a69a921534ac0b760dcbefb900f3c2f735f56070bf0536506913bb5bfd74")
version("1.50.0", sha256="76900ab068da86378395a8e125b5cc43dfae671e09ff6462ddfef18676e2165a")
version("1.47.0", sha256="271bdc890bf329a8de5b65819f0f9590a5381402429bca37625b63546ed19e54")
@@ -43,6 +47,9 @@ class Grpc(CMakePackage):
version("1.24.3", sha256="c84b3fa140fcd6cce79b3f9de6357c5733a0071e04ca4e65ba5f8d306f10f033")
version("1.23.1", sha256="dd7da002b15641e4841f20a1f3eb1e359edb69d5ccf8ac64c362823b05f523d9")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=False, description="Build shared instead of static libraries")
variant(
"codegen",
@@ -58,10 +65,16 @@ class Grpc(CMakePackage):
)
depends_on("protobuf")
+ depends_on("protobuf@3.22:", when="@1.55:")
depends_on("openssl")
depends_on("zlib-api")
depends_on("c-ares")
- depends_on("abseil-cpp", when="@1.27:")
+
+ with when("@1.27:"):
+ depends_on("abseil-cpp")
+ # missing includes: https://github.com/grpc/grpc/commit/bc044174401a0842b36b8682936fc93b5041cf88
+ depends_on("abseil-cpp@:20230802", when="@:1.61")
+
depends_on("re2+pic@2023-09-01", when="@1.33.1:")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py b/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py
index 1056f36a10..29b6288ecc 100644
--- a/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py
+++ b/var/spack/repos/builtin/packages/gsettings-desktop-schemas/package.py
@@ -19,9 +19,12 @@ class GsettingsDesktopSchemas(MesonPackage):
version("3.37.92", sha256="5f5dd0421ed2f3746674b8bb6e0c652784915133c7f2d133339bf5e4140d8d1d")
version("3.37.2", sha256="1dacdfeecfc57468da7c598a01b635f82ecd088e1d78d5aa840e47256026654d")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("gobject-introspection", type="build")
depends_on("gettext", type="build")
+ depends_on("pkgconfig", type="build")
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/gsi-ncdiag/package.py b/var/spack/repos/builtin/packages/gsi-ncdiag/package.py
index f25498a04a..ac18366440 100644
--- a/var/spack/repos/builtin/packages/gsi-ncdiag/package.py
+++ b/var/spack/repos/builtin/packages/gsi-ncdiag/package.py
@@ -19,6 +19,8 @@ class GsiNcdiag(CMakePackage):
version("1.1.0", sha256="9195801301209d6f93890944d58ffee4e24a4e35502ab27560a8c440ee53df4c")
version("1.0.0", sha256="7251d6139c2bc1580db5f7f019e10a4c73d188ddd52ccf21ecc9e39d50a6af51")
+ depends_on("fortran", type="build") # generated
+
variant("serial", default=True, description="Enable Serial NetCDF diagnostics")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/gsibec/package.py b/var/spack/repos/builtin/packages/gsibec/package.py
index 9028bc315a..3a83af2399 100644
--- a/var/spack/repos/builtin/packages/gsibec/package.py
+++ b/var/spack/repos/builtin/packages/gsibec/package.py
@@ -20,6 +20,7 @@ class Gsibec(CMakePackage):
license("Apache-2.0")
version("develop", branch="develop")
+ version("1.2.1", sha256="83bf12ad6603d66e2e48b50cfcb57b7acd64e0d428a597a842db978a3277baf6")
version("1.1.3", sha256="9cac000562250487c16608e8245d97457cc1663b1793b3833be5a76ebccb4b47")
version("1.1.2", sha256="8bdcdf1663e6071b6ad9e893a76307abc70a6de744fb75a13986e70242993ada")
version("1.0.7", sha256="53912f1f19d46f4941b377803cc2fce89a2b50d2ece7562f8fd65215a8908158")
@@ -29,6 +30,8 @@ class Gsibec(CMakePackage):
version("1.0.3", sha256="f104daf55705c5093a3d984073f082017bc9166f51ded36c7f7bb8adf233c916")
version("1.0.2", sha256="7dc02f1f499e0d9f2843440f517d6c8e5d10ea084cbb2567ec198ba06816bc8b")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi", type=("build", "run"))
depends_on("netcdf-c +mpi", type=("build", "run"))
depends_on("netcdf-fortran", type=("build", "run"))
@@ -43,6 +46,6 @@ class Gsibec(CMakePackage):
args = []
mkl_providers = ["intel-mkl", "intel-oneapi-mkl", "intel-parallel-studio"]
- args.append(self.define("ENABLE_MKL", spec["lapack"].name in mkl_providers))
+ args.append(self.define("ENABLE_MKL", self.spec["lapack"].name in mkl_providers))
return args
diff --git a/var/spack/repos/builtin/packages/gsl-lite/package.py b/var/spack/repos/builtin/packages/gsl-lite/package.py
index a4084e8434..38df082f16 100644
--- a/var/spack/repos/builtin/packages/gsl-lite/package.py
+++ b/var/spack/repos/builtin/packages/gsl-lite/package.py
@@ -28,6 +28,8 @@ class GslLite(CMakePackage):
version("0.36.0", sha256="c052cc4547b33cedee6f000393a7005915c45c6c06b35518d203db117f75c71c")
version("0.34.0", sha256="a7d5b2672b78704ca03df9ef65bc274d8f8cacad3ca950365eef9e25b50324c5")
+ depends_on("cxx", type="build") # generated
+
variant("tests", default=False, description="Build and perform gsl-lite tests")
variant("cuda_tests", default=False, description="Build and perform gsl-lite CUDA tests")
variant("examples", default=False, description="Build gsl-lite examples")
diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py
index 1c4732e160..6b17ec9e2e 100644
--- a/var/spack/repos/builtin/packages/gsl/package.py
+++ b/var/spack/repos/builtin/packages/gsl/package.py
@@ -19,6 +19,7 @@ class Gsl(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("2.8", sha256="6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190")
version("2.7.1", sha256="dcb0fbd43048832b757ff9942691a8dd70026d5da0ff85601e52687f6deeb34b")
version("2.7", sha256="efbbf3785da0e53038be7907500628b466152dbc3c173a87de1b5eba2e23602b")
version("2.6", sha256="b782339fc7a38fe17689cb39966c4d821236c28018b6593ddb6fd59ee40786a8")
@@ -30,6 +31,8 @@ class Gsl(AutotoolsPackage, GNUMirrorPackage):
version("2.0", sha256="e361f0b19199b5e6c21922e9f16adf7eca8dd860842802424906d0f83485ca2d")
version("1.16", sha256="73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53")
+ depends_on("c", type="build") # generated
+
variant("external-cblas", default=False, description="Build against external blas")
variant("shared", default=True, description="Build shared library")
variant("pic", default=True, description="Enable position-independent code (PIC)")
diff --git a/var/spack/repos/builtin/packages/gslib/package.py b/var/spack/repos/builtin/packages/gslib/package.py
index b865806444..45e3f4e113 100644
--- a/var/spack/repos/builtin/packages/gslib/package.py
+++ b/var/spack/repos/builtin/packages/gslib/package.py
@@ -22,6 +22,9 @@ class Gslib(Package):
version("1.0.1", tag="v1.0.1", commit="d16685f24551b7efd69e58d96dc76aec75239ea3")
version("1.0.0", tag="v1.0.0", commit="9533e652320a3b26a72c36487ae265b02072cd48")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI")
variant("mpiio", default=True, description="Build with MPI I/O")
variant("blas", default=False, description="Build with BLAS")
@@ -47,7 +50,7 @@ class Gslib(Package):
if "+mpiio" not in spec:
filter_file(r"MPIIO.*?=.*1", "MPIIO = 0", makefile)
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
cc = spec["mpi"].mpicc
else:
filter_file(r"MPI.*?=.*1", "MPI = 0", makefile)
@@ -55,7 +58,7 @@ class Gslib(Package):
make_cmd = "CC=" + cc
- if "+blas" in spec:
+ if spec.satisfies("+blas"):
filter_file(r"BLAS.*?=.*0", "BLAS = 1", makefile)
blas = spec["blas"].libs
ld_flags = blas.ld_flags
diff --git a/var/spack/repos/builtin/packages/gsoap/package.py b/var/spack/repos/builtin/packages/gsoap/package.py
index 6eface4e36..d1d8b3d1e4 100644
--- a/var/spack/repos/builtin/packages/gsoap/package.py
+++ b/var/spack/repos/builtin/packages/gsoap/package.py
@@ -17,13 +17,30 @@ class Gsoap(AutotoolsPackage, SourceforgePackage):
maintainers("greenc-FNAL", "gartung", "marcmengel", "vitodb")
- version("2.8.127", sha256="25ecad1bbc363494eb7ea95a68508e4c93cc20596fad9ebc196c6572bbbd3c08")
- version("2.8.124", sha256="4b798780989338f665ef8e171bbcc422a271004d62d5852666d5eeca33a6a636")
- version("2.8.119", sha256="8997c43b599a2bfe4a788e303a5dd24bbf5992fd06d56f606ca680ca5b0070cf")
- version("2.8.114", sha256="aa70a999258100c170a3f8750c1f91318a477d440f6a28117f68bc1ded32327f")
- version("2.8.113", sha256="e73782b618303cf55ea6a45751b75ba96797a7a12967ed9d02e6d5761977e73a")
- version("2.8.112", sha256="05345312e0bb4d81c98ae63b97cff9eb097f38dafe09356189f9d8e235c54095")
- version("2.8.111", sha256="f1670c7e3aeaa66bc5658539fbd162e5099f022666855ef2b2c2bac07fec4bd3")
+ version("2.8.135", sha256="b11757e405d55d4674dfbf88c4fa6d7e24155cf64ed8ed578ccad2f2b555e98d")
+ with default_args(deprecated=True):
+ # Unavailable for direct download anymore
+ version(
+ "2.8.127", sha256="25ecad1bbc363494eb7ea95a68508e4c93cc20596fad9ebc196c6572bbbd3c08"
+ )
+ version(
+ "2.8.124", sha256="4b798780989338f665ef8e171bbcc422a271004d62d5852666d5eeca33a6a636"
+ )
+ version(
+ "2.8.119", sha256="8997c43b599a2bfe4a788e303a5dd24bbf5992fd06d56f606ca680ca5b0070cf"
+ )
+ version(
+ "2.8.114", sha256="aa70a999258100c170a3f8750c1f91318a477d440f6a28117f68bc1ded32327f"
+ )
+ version(
+ "2.8.113", sha256="e73782b618303cf55ea6a45751b75ba96797a7a12967ed9d02e6d5761977e73a"
+ )
+ version(
+ "2.8.112", sha256="05345312e0bb4d81c98ae63b97cff9eb097f38dafe09356189f9d8e235c54095"
+ )
+ version(
+ "2.8.111", sha256="f1670c7e3aeaa66bc5658539fbd162e5099f022666855ef2b2c2bac07fec4bd3"
+ )
depends_on("openssl")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/gtfsort/package.py b/var/spack/repos/builtin/packages/gtfsort/package.py
new file mode 100644
index 0000000000..e74a3ae772
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gtfsort/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Gtfsort(CargoPackage):
+ """A chr/pos/feature GTF sorter that uses a lexicographically-based index ordering algorithm"""
+
+ homepage = "https://github.com/alejandrogzi/gtfsort"
+ url = "https://github.com/alejandrogzi/gtfsort/archive/refs/tags/v.0.2.2.tar.gz"
+
+ license("MIT", checked_by="A_N_Other")
+
+ version("0.2.2", sha256="d22a8ef32e30111ad2dd08d1da0e0914ac62a728483b8e39a4ef8ea4e6133b4f")
diff --git a/var/spack/repos/builtin/packages/gtk-doc/package.py b/var/spack/repos/builtin/packages/gtk-doc/package.py
index 470836b317..014cb27805 100644
--- a/var/spack/repos/builtin/packages/gtk-doc/package.py
+++ b/var/spack/repos/builtin/packages/gtk-doc/package.py
@@ -22,6 +22,8 @@ class GtkDoc(AutotoolsPackage):
version("1.33.2", sha256="2d1b0cbd26edfcb54694b2339106a02a81d630a7dedc357461aeb186874cc7c0")
version("1.32", sha256="0890c1f00d4817279be51602e67c4805daf264092adc58f9c04338566e8225ba")
+ depends_on("c", type="build") # generated
+
# Commented out until package dblatex has been created
# variant('pdf', default=False, description='Adds PDF support')
diff --git a/var/spack/repos/builtin/packages/gtkmm/package.py b/var/spack/repos/builtin/packages/gtkmm/package.py
index eeddcc70e5..924334c9cb 100644
--- a/var/spack/repos/builtin/packages/gtkmm/package.py
+++ b/var/spack/repos/builtin/packages/gtkmm/package.py
@@ -23,6 +23,8 @@ class Gtkmm(AutotoolsPackage):
version("2.16.0", sha256="7b2cccda794531ecfa65c01e57614ecba526153ad2a29d580c6e8df028d56ec4")
version("2.4.11", sha256="0754187a5bcf3795cd7c959de303e6a19a130b0c5927bff1504baa3524bee8c1")
+ depends_on("cxx", type="build") # generated
+
depends_on("glibmm")
depends_on("atk")
depends_on("gtkplus")
diff --git a/var/spack/repos/builtin/packages/gtkorvo-atl/package.py b/var/spack/repos/builtin/packages/gtkorvo-atl/package.py
index a748baf9b9..2c5363e735 100644
--- a/var/spack/repos/builtin/packages/gtkorvo-atl/package.py
+++ b/var/spack/repos/builtin/packages/gtkorvo-atl/package.py
@@ -15,10 +15,14 @@ class GtkorvoAtl(CMakePackage):
url = "https://github.com/GTkorvo/atl/archive/v2.1.tar.gz"
git = "https://github.com/GTkorvo/atl.git"
- version("develop", branch="master")
+ version("master", branch="master")
+ version("develop", branch="master", deprecated=True)
+ version("2.2.1", sha256="7ff2dca93702ed56e3bbfd8eb52da3bb5f0e7bef5006f3ca29aaa468cab89037")
version("2.2", sha256="d88b6eaa3926e499317973bfb2ae469c584bb064da198217ea5fede6d919e160")
version("2.1", sha256="379b493ba867b76d76eabfe5bfeec85239606e821509c31e8eb93c2dc238e4a8")
+ depends_on("c", type="build") # generated
+
depends_on("gtkorvo-cercs-env")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py b/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py
index 638202b428..9b0a5fafaa 100644
--- a/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py
+++ b/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py
@@ -16,6 +16,8 @@ class GtkorvoCercsEnv(CMakePackage):
version("develop", branch="master")
version("1.0", sha256="e4080a98c1af5003a038361c8bb343843665cac428101ac7d721bad8ba7d244e")
+ depends_on("c", type="build") # generated
+
def cmake_args(self):
args = ["-DENABLE_TESTING=0", "-DENABLE_SHARED_STATIC=STATIC"]
return args
diff --git a/var/spack/repos/builtin/packages/gtkorvo-dill/package.py b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py
index 0cd813d6e2..07095b70de 100644
--- a/var/spack/repos/builtin/packages/gtkorvo-dill/package.py
+++ b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py
@@ -20,6 +20,9 @@ class GtkorvoDill(CMakePackage):
version("2.4", sha256="ed7745d13e8c6a556f324dcc0e48a807fc993bdd5bb1daa94c1df116cb7e81fa")
version("2.1", sha256="7671e1f3c25ac6a4ec2320cec2c342a2f668efb170e3dba186718ed17d2cf084")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Ref: https://github.com/GTkorvo/dill/commit/dac6dfcc7fdaceeb4c157f9ecdf5ecc28f20477f
patch("2.4-fix-clear_cache.patch", when="@2.4")
patch("2.1-fix-clear_cache.patch", when="@2.1")
diff --git a/var/spack/repos/builtin/packages/gtkorvo-enet/package.py b/var/spack/repos/builtin/packages/gtkorvo-enet/package.py
index 640479d6d5..c805aa0dc3 100644
--- a/var/spack/repos/builtin/packages/gtkorvo-enet/package.py
+++ b/var/spack/repos/builtin/packages/gtkorvo-enet/package.py
@@ -20,3 +20,5 @@ class GtkorvoEnet(AutotoolsPackage):
version("1.3.14", sha256="d1fda051bdee46ad8cce7c3bb36fb6b7a7a443945f27a280ac104753c29465b0")
version("1.3.13", sha256="ede6e4f03e4cb0c3d93044ace9e8c1818ef4d3ced4aaa70384155769b3c436dc")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py
index 884fe8552e..68b21046fe 100644
--- a/var/spack/repos/builtin/packages/gtkplus/package.py
+++ b/var/spack/repos/builtin/packages/gtkplus/package.py
@@ -3,10 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Gtkplus(MesonPackage):
+class Gtkplus(AutotoolsPackage, MesonPackage):
"""The GTK+ package contains libraries used for creating graphical user
interfaces for applications."""
@@ -15,9 +17,21 @@ class Gtkplus(MesonPackage):
license("LGPL-2.0-or-later")
+ build_system(
+ conditional("autotools", when="@:3.24.35"),
+ conditional("meson", when="@3.24.9:"),
+ default="autotools",
+ )
+
+ version("3.24.41", sha256="47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa")
version("3.24.29", sha256="f57ec4ade8f15cab0c23a80dcaee85b876e70a8823d9105f067ce335a8268caa")
version("3.24.26", sha256="2cc1b2dc5cad15d25b6abd115c55ffd8331e8d4677745dd3ce6db725b4fff1e9")
version(
+ "3.22.30",
+ sha256="a1a4a5c12703d4e1ccda28333b87ff462741dc365131fbc94c218ae81d9a6567",
+ deprecated=True,
+ )
+ version(
"3.20.10",
sha256="e81da1af1c5c1fee87ba439770e17272fa5c06e64572939814da406859e56b70",
deprecated=True,
@@ -38,21 +52,28 @@ class Gtkplus(MesonPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cups", default=False, description="enable cups support")
# See meson.build for version requirements
- depends_on("meson@0.48.0:", when="@3.24:", type="build")
- depends_on("ninja", when="@3.24:", type="build")
+ depends_on("meson@0.48.0:", when="build_system=meson", type="build")
+ depends_on("ninja", when="build_system=meson", type="build")
# Needed to build man pages:
# depends_on('docbook-xml', when='@3.24:', type='build')
# depends_on('docbook-xsl', when='@3.24:', type='build')
# depends_on('libxslt', when='@3.24:', type='build')
depends_on("pkgconfig", type="build")
- depends_on("glib@2.57.2:")
+ depends_on("glib")
+ depends_on("glib@2.49.4:", when="@3.22:")
+ depends_on("glib@2.57.2:", when="@3.24:")
depends_on("pango@1.41.0:+X")
depends_on("fribidi@0.19.7:")
- depends_on("atk@2.35.1:")
- depends_on("at-spi2-atk@2.15.1:", when="@3:")
+ # atk was also merged into at-spi2-core, but gtk3 doesn't want to build without it
+ depends_on("atk@2.35.1:", when="@:3")
+ # at-spi2-atk was merged into at-spi2-core, but gtk3 is picky
+ depends_on("at-spi2-core@2.46:2.48", when="@:3")
depends_on("cairo@1.14.0:+X+pdf+gobject")
depends_on("gdk-pixbuf@2.30.0:")
depends_on("gobject-introspection@1.39.0:")
@@ -66,6 +87,7 @@ class Gtkplus(MesonPackage):
depends_on("fixesproto", when="@3:")
depends_on("gettext", when="@3:")
depends_on("cups", when="+cups")
+ depends_on("libxfixes", when="@:2")
patch("no-demos.patch", when="@2.0:2")
@@ -74,28 +96,35 @@ class Gtkplus(MesonPackage):
return url.format(version.up_to(2), version)
def patch(self):
- # remove disable deprecated flag.
- filter_file(
- r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', "", "configure", string=True
- )
+ if self.spec.satisfies("@:3.24.35"):
+ # remove disable deprecated flag.
+ filter_file(
+ r'CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"', "", "configure", string=True
+ )
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3776
- if self.spec.satisfies("@3:%gcc@11:"):
+ if self.spec.satisfies("@3.24:%gcc@11:"):
filter_file(" '-Werror=array-bounds',", "", "meson.build", string=True)
def setup_run_environment(self, env):
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
- def setup_dependent_build_environment(self, env, dependent_spec):
+ def setup_dependent_run_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
- def setup_dependent_run_environment(self, env, dependent_spec):
+
+class BuildEnvironment:
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
+
+class MesonBuilder(BuildEnvironment, spack.build_systems.meson.MesonBuilder):
+
def meson_args(self):
- args = std_meson_args
+ args = []
if self.spec.satisfies("platform=darwin"):
args.extend(["-Dx11_backend=false", "-Dquartz_backend=true"])
@@ -104,8 +133,17 @@ class Gtkplus(MesonPackage):
["-Dgtk_doc=false", "-Dman=false", "-Dintrospection=true", "-Dwayland_backend=false"]
)
+ args.append("-Dprint_backends=file,lpr{0}".format(",cups" if "+cups" in self.spec else ""))
+
return args
+ def check(self):
+ """All build time checks open windows in the X server, don't do that"""
+ pass
+
+
+class AutotoolsBuilder(BuildEnvironment, spack.build_systems.autotools.AutotoolsBuilder):
+
def configure_args(self):
true = which("true")
args = [
@@ -117,22 +155,10 @@ class Gtkplus(MesonPackage):
"GTKDOC_MKPDF={0}".format(true),
"GTKDOC_REBASE={0}".format(true),
]
- if "~cups" in self.spec:
+ if self.spec.satisfies("~cups"):
args.append("--disable-cups")
return args
- @when("@:3.20.10")
- def meson(self, spec, prefix):
- configure(*self.configure_args())
-
- @when("@:3.20.10")
- def build(self, spec, prefix):
- make()
-
- @when("@:3.20.10")
- def install(self, spec, prefix):
- make("install")
-
def check(self):
"""All build time checks open windows in the X server, don't do that"""
pass
diff --git a/var/spack/repos/builtin/packages/gtksourceview/package.py b/var/spack/repos/builtin/packages/gtksourceview/package.py
index d9607d34a5..14d60531a1 100644
--- a/var/spack/repos/builtin/packages/gtksourceview/package.py
+++ b/var/spack/repos/builtin/packages/gtksourceview/package.py
@@ -23,6 +23,10 @@ class Gtksourceview(AutotoolsPackage):
version("4.2.0", sha256="c431eb234dc83c7819e58f77dd2af973252c7750da1c9d125ddc94268f94f675")
version("3.24.11", sha256="691b074a37b2a307f7f48edc5b8c7afa7301709be56378ccf9cc9735909077fd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/gts/package.py b/var/spack/repos/builtin/packages/gts/package.py
index a5883016d9..c3598ceb74 100644
--- a/var/spack/repos/builtin/packages/gts/package.py
+++ b/var/spack/repos/builtin/packages/gts/package.py
@@ -21,12 +21,14 @@ class Gts(AutotoolsPackage):
surface meshes.
"""
- homepage = "http://gts.sourceforge.net/index.html"
- url = "http://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz"
+ homepage = "https://gts.sourceforge.net/index.html"
+ url = "https://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz"
license("LGPL-2.0-only")
version("121130", sha256="c23f72ab74bbf65599f8c0b599d6336fabe1ec2a09c19b70544eeefdc069b73b")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("pkgconfig", type=("build"))
diff --git a/var/spack/repos/builtin/packages/guacamole-client/package.py b/var/spack/repos/builtin/packages/guacamole-client/package.py
index 7b1cb8d11c..1aed681f84 100644
--- a/var/spack/repos/builtin/packages/guacamole-client/package.py
+++ b/var/spack/repos/builtin/packages/guacamole-client/package.py
@@ -15,6 +15,19 @@ class GuacamoleClient(MavenPackage):
license("Apache-2.0")
+ version("1.5.5", sha256="ebbd3c0b73ddafbf6656d11324163f5b8d410f94b472791e6fa75fca13a5d30b")
version("1.2.0", sha256="2327368a32e61cf82032311be79ded4e5eefbc59ac9fb6e0a054b4f49168843e")
- depends_on("java@8", type=("build", "run"))
+ # remove usage of deprecated AccessController class, deprecated in java 17
+ patch(
+ "https://github.com/apache/guacamole-client/commit/b315e6aac84550948763a2bc99f12ceb2a28dca1.patch?full_index=1",
+ sha256="3529eb8bfd3d025682463cbce3f5a58bdbcacfa58c915c5471e00913c89f7474",
+ when="@1.5:1.5.5",
+ )
+
+ depends_on("java@8:", type=("build", "run"))
+ depends_on("java@:16", type=("build", "run"), when="@:1.4")
+
+ def build_args(self):
+ # The file .spack_patched is flagged as an unapproved license
+ return ["-Drat.numUnapprovedLicenses=1"]
diff --git a/var/spack/repos/builtin/packages/guacamole-server/package.py b/var/spack/repos/builtin/packages/guacamole-server/package.py
index 39f0e19beb..0b0805dcc1 100644
--- a/var/spack/repos/builtin/packages/guacamole-server/package.py
+++ b/var/spack/repos/builtin/packages/guacamole-server/package.py
@@ -16,13 +16,18 @@ class GuacamoleServer(AutotoolsPackage):
license("GPL-3.0-or-later")
- version("1.1.0", sha256="d0f0c66ebfa7a4fd6689ae5240f21797b5177945a042388b691b15b8bd5c81a8")
+ version("1.5.5", sha256="50430c0f0f3b92f2cd3e60436fab0cedee8c1a9f762696a666016347039c731e")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-43826
+ version("1.1.0", sha256="d0f0c66ebfa7a4fd6689ae5240f21797b5177945a042388b691b15b8bd5c81a8")
+
+ depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("cairo")
+ depends_on("cairo +pdf +png") # pdf enables zlib support required for CairoScript
depends_on("libjpeg")
depends_on("libpng")
depends_on("uuid")
diff --git a/var/spack/repos/builtin/packages/guile/package.py b/var/spack/repos/builtin/packages/guile/package.py
index 2103145fef..170b0f92ba 100644
--- a/var/spack/repos/builtin/packages/guile/package.py
+++ b/var/spack/repos/builtin/packages/guile/package.py
@@ -25,6 +25,8 @@ class Guile(AutotoolsPackage, GNUMirrorPackage):
version("2.0.14", sha256="8aeb2f353881282fe01694cce76bb72f7ffdd296a12c7a1a39255c27b0dfe5f1")
version("2.0.11", sha256="e6786c934346fa2e38e46d8d81a622bb1c16d130153523f6129fcd79ef1fb040")
+ depends_on("c", type="build") # generated
+
variant("readline", default=True, description="Use the readline library")
variant(
"threads",
@@ -39,7 +41,7 @@ class Guile(AutotoolsPackage, GNUMirrorPackage):
depends_on("bdw-gc@7.0: threads=dgux386", when="threads=dgux386")
depends_on("gmp@4.2:")
depends_on("gettext")
- depends_on("libtool@1.5.6:")
+ depends_on("libtool@1.5.6:", type="link") # links to libltdl.so
depends_on("libunistring@0.9.3:")
depends_on("libffi")
depends_on("readline", when="+readline")
@@ -68,12 +70,12 @@ class Guile(AutotoolsPackage, GNUMirrorPackage):
"--with-libintl-prefix={0}".format(spec["gettext"].prefix),
]
- if "threads=none" in spec:
+ if spec.satisfies("threads=none"):
config_args.append("--without-threads")
else:
config_args.append("--with-threads")
- if "+readline" in spec:
+ if spec.satisfies("+readline"):
config_args.append("--with-libreadline-prefix={0}".format(spec["readline"].prefix))
else:
config_args.append("--without-libreadline-prefix")
diff --git a/var/spack/repos/builtin/packages/gunrock/package.py b/var/spack/repos/builtin/packages/gunrock/package.py
index 19813e6d19..bcb9189aac 100644
--- a/var/spack/repos/builtin/packages/gunrock/package.py
+++ b/var/spack/repos/builtin/packages/gunrock/package.py
@@ -33,6 +33,9 @@ class Gunrock(CMakePackage, CudaPackage):
version("0.2", submodules=True, tag="v0.2", commit="f9d85343ee68c65567184d74021b9483cd142ea0")
version("0.1", submodules=True, tag="v0.1", commit="4c00284f6b7d490a83fa7afe5cdff60923316448")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with Cuda support")
variant("lib", default=True, description="Build main gunrock library")
@@ -160,5 +163,5 @@ See "spack info gunrock"',
with working_dir(self.build_directory):
install_tree("lib", prefix.lib)
# bin dir is created only if tests/examples are built
- if "+tests" in spec:
+ if spec.satisfies("+tests"):
install_tree("bin", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/gurobi/package.py b/var/spack/repos/builtin/packages/gurobi/package.py
index c0fa33639d..d9dd35c2ed 100644
--- a/var/spack/repos/builtin/packages/gurobi/package.py
+++ b/var/spack/repos/builtin/packages/gurobi/package.py
@@ -57,5 +57,4 @@ class Gurobi(Package):
@run_after("install")
def gurobipy(self):
with working_dir("linux64"):
- python = which("python")
python("setup.py", "install", "--prefix={0}".format(self.prefix))
diff --git a/var/spack/repos/builtin/packages/gxsview/package.py b/var/spack/repos/builtin/packages/gxsview/package.py
index ea45246d1c..d50fe08e3c 100644
--- a/var/spack/repos/builtin/packages/gxsview/package.py
+++ b/var/spack/repos/builtin/packages/gxsview/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -23,6 +25,9 @@ class Gxsview(QMakePackage):
license("LGPL-3.0-only")
version(
+ "2024.03.15", sha256="5a6e6384a79fc2f39370846814f049b6c4c32f418cb00363cfb18bc1b6598d3a"
+ )
+ version(
"2023.05.29", sha256="1e768fd7afd22198b7f73adeb42f4ccf7e0ff68996a3843b1ea138225c4c1da3"
)
version(
@@ -38,12 +43,17 @@ class Gxsview(QMakePackage):
depends_on("fontconfig")
depends_on("qt@5.14.0:+opengl+gui")
depends_on("vtk@8.0:+qt+opengl2") # +mpi+python are optional
+ depends_on("vtk@9:+qt+opengl2", when="@2024.03.15:")
conflicts("%gcc@:7.2.0", msg="Requires C++17 compiler support") # need C++17 standard
+ conflicts("qt@6:", msg="Qt 6 support is not yet achieved")
+ conflicts("qt-base@6:", msg="Qt 6 support is not yet achieved") # required for clingo
patch("vtk9.patch", when="^vtk@9:")
# gcc11 compilation rule for std::numeric_limits,
# avoid "numeric_limits" is not a member of "std"
patch("gcc11.patch", when="@2021.07.01 %gcc@11:")
+ # sets fontconfig inc/lib, removes useless stuffs
+ patch("vtk90.patch", when="@2024.03.15")
build_directory = "gui"
@@ -51,11 +61,28 @@ class Gxsview(QMakePackage):
vtk_suffix = self.spec["vtk"].version.up_to(2)
vtk_lib_dir = self.spec["vtk"].prefix.lib
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk-{0}".format(vtk_suffix))
- args = [
- "VTK_LIB_DIR={0}".format(vtk_lib_dir),
- "VTK_INC_DIR={0}".format(vtk_include_dir),
- "VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
- ]
+ args = []
+ if not os.path.exists(vtk_include_dir):
+ vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk")
+ args.append("VTK_NO_VER_SUFFIX=ON")
+ fontconfig = self.spec["fontconfig"]
+ args.extend(
+ [
+ "VTK_LIB_DIR={0}".format(vtk_lib_dir),
+ "VTK_INC_DIR={0}".format(vtk_include_dir),
+ "VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
+ "FONTCONFIG_LIBDIR={0}".format(fontconfig.prefix.lib),
+ "FONTCONFIG_INCDIR={0}".format(fontconfig.prefix.include),
+ ]
+ )
+ # Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
+ if self.spec.satisfies("%gcc@8.0:8.9") or self.spec.satisfies("%fj"):
+ if self.spec.satisfies("^vtk@9:"):
+ fic = "vtk9.pri"
+ else:
+ fic = "vtk8.pri"
+ with open(fic, "a") as fh:
+ fh.write("-lstdc++fs\n")
return args
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/gxsview/vtk90.patch b/var/spack/repos/builtin/packages/gxsview/vtk90.patch
new file mode 100644
index 0000000000..afe6990e45
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gxsview/vtk90.patch
@@ -0,0 +1,51 @@
+diff --git a/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp b/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
+index 92802f2..af731e3 100644
+--- a/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
++++ b/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
+@@ -7,6 +7,7 @@
+ #include "trajectorycreatingworker.hpp"
+
+ #include <vtkCellData.h> // for coloring
++#include <vtkUnsignedCharArray.h>
+
+ #include "core/image/color.hpp"
+
+diff --git a/gui/geometryviewer/trajectorypane/trajectorypane.cpp b/gui/geometryviewer/trajectorypane/trajectorypane.cpp
+index eeae291..337e0e1 100644
+--- a/gui/geometryviewer/trajectorypane/trajectorypane.cpp
++++ b/gui/geometryviewer/trajectorypane/trajectorypane.cpp
+@@ -35,7 +35,7 @@
+ #include <vtkPolyDataMapper.h>
+ #include <vtkProperty.h>
+ #include <vtkSmartPointer.h>
+-#include <vtkQImageToImageSource.h>
++// #include <vtkQImageToImageSource.h>
+ #include <vtkOggTheoraWriter.h>
+ #include <vtkWindowToImageFilter.h>
+ #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__WIN64__) || defined(_MSC_VER)
+diff --git a/gui/gui.pro b/gui/gui.pro
+index cab6c36..81861b7 100644
+--- a/gui/gui.pro
++++ b/gui/gui.pro
+@@ -302,7 +302,8 @@ unix:{
+
+
+ unix:!macx {
+- LIBS += -lfontconfig
++ LIBS += -L$$FONTCONFIG_LIBDIR -lfontconfig
++ INCLUDEPATH += $$FONTCONFIG_INCDIR
+ # gcc7 requires libstdc++fs
+ linux-g++ {
+ lessThan(QMAKE_GCC_MAJOR_VERSION, 8) {
+diff --git a/gui/vtk9.pri b/gui/vtk9.pri
+index 298dedb..82993f2 100644
+--- a/gui/vtk9.pri
++++ b/gui/vtk9.pri
+@@ -58,7 +58,6 @@ LIBS += \
+ -lvtkRenderingGL2PSOpenGL2$$VTK_VER_SUFFIX \
+ -lvtkRenderingSceneGraph$$VTK_VER_SUFFIX \
+ -lvtkRenderingOpenGL2$$VTK_VER_SUFFIX \
+- -lvtkRenderingQt$$VTK_VER_SUFFIX \
+ -lvtkRenderingUI$$VTK_VER_SUFFIX \
+ -lvtkRenderingVolume$$VTK_VER_SUFFIX \
+ -lvtkRenderingVtkJS$$VTK_VER_SUFFIX \
diff --git a/var/spack/repos/builtin/packages/gzip/package.py b/var/spack/repos/builtin/packages/gzip/package.py
index 11d8f89845..2a89789076 100644
--- a/var/spack/repos/builtin/packages/gzip/package.py
+++ b/var/spack/repos/builtin/packages/gzip/package.py
@@ -31,5 +31,7 @@ class Gzip(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
# Gzip makes a recursive symlink if built in-source
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/h5bench/package.py b/var/spack/repos/builtin/packages/h5bench/package.py
index c367bbaf8e..0c1b9568ba 100644
--- a/var/spack/repos/builtin/packages/h5bench/package.py
+++ b/var/spack/repos/builtin/packages/h5bench/package.py
@@ -33,6 +33,10 @@ class H5bench(CMakePackage):
"1.0", commit="9d3438c1bc66c5976279ef203bd11a8d48ade724", submodules=True, deprecated=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("metadata", default=False, when="@1.2:", description="Enables metadata benchmark")
variant("amrex", default=False, when="@1.2:", description="Enables AMReX benchmark")
variant("exerciser", default=False, when="@1.2:", description="Enables exerciser benchmark")
diff --git a/var/spack/repos/builtin/packages/h5cpp/package.py b/var/spack/repos/builtin/packages/h5cpp/package.py
index 9d793f32eb..5e299f062a 100644
--- a/var/spack/repos/builtin/packages/h5cpp/package.py
+++ b/var/spack/repos/builtin/packages/h5cpp/package.py
@@ -21,6 +21,9 @@ class H5cpp(CMakePackage):
version("1.10.4-6", sha256="4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93")
version("1.10.4-5", sha256="661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Include MPI support")
depends_on("cmake @3.10:", type="build")
diff --git a/var/spack/repos/builtin/packages/h5hut/package.py b/var/spack/repos/builtin/packages/h5hut/package.py
index dd1013bac7..d400a3cef4 100644
--- a/var/spack/repos/builtin/packages/h5hut/package.py
+++ b/var/spack/repos/builtin/packages/h5hut/package.py
@@ -13,15 +13,26 @@ class H5hut(AutotoolsPackage):
homepage = "https://amas.psi.ch/H5hut/"
url = "https://amas.web.psi.ch/Downloads/H5hut/H5hut-2.0.0rc3.tar.gz"
+ git = "https://gitlab.psi.ch/H5hut/src.git"
version("2.0.0rc3", sha256="1ca9a9478a99e1811ecbca3c02cc49258050d339ffb1a170006eab4ab2a01790")
+ version("master", branch="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enable Fortran support")
variant("mpi", default=True, description="Enable MPI support")
+ depends_on("autoconf", type="build", when="build_system=autotools")
+ depends_on("automake", type="build", when="build_system=autotools")
+ depends_on("libtool", type="build", when="build_system=autotools")
+
depends_on("mpi", when="+mpi")
# h5hut +mpi uses the obsolete function H5Pset_fapl_mpiposix:
- depends_on("hdf5@1.8:1.8.12+mpi", when="+mpi")
+ depends_on("hdf5@1.8:+mpi", when="+mpi")
depends_on("hdf5@1.8:", when="~mpi")
# If built in parallel, the following error message occurs:
@@ -32,17 +43,26 @@ class H5hut(AutotoolsPackage):
def validate(self):
"""Checks if Fortran compiler is available."""
- if "+fortran" in self.spec and not self.compiler.fc:
+ if self.spec.satisfies("+fortran") and not self.compiler.fc:
raise RuntimeError("Cannot build Fortran variant without a Fortran compiler.")
+ def flag_handler(self, name, flags):
+ build_system_flags = []
+ if name == "cflags" and self.spec["hdf5"].satisfies("@1.12:"):
+ build_system_flags = ["-DH5_USE_110_API"]
+ return flags, None, build_system_flags
+
+ def autoreconf(self, spec, prefix):
+ which("bash")("autogen.sh")
+
def configure_args(self):
spec = self.spec
config_args = ["--enable-shared"]
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
config_args.append("--enable-fortran")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
config_args.extend(
[
"--enable-parallel",
@@ -51,7 +71,7 @@ class H5hut(AutotoolsPackage):
]
)
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
config_args.append("FC={0}".format(spec["mpi"].mpifc))
return config_args
diff --git a/var/spack/repos/builtin/packages/h5utils/package.py b/var/spack/repos/builtin/packages/h5utils/package.py
index d2d583a8f6..10e4a2802d 100644
--- a/var/spack/repos/builtin/packages/h5utils/package.py
+++ b/var/spack/repos/builtin/packages/h5utils/package.py
@@ -15,6 +15,7 @@ class H5utils(AutotoolsPackage):
license("GPL-2.0-only")
+ version("1.13.2", sha256="eea7855a8235facb7c454e61103098e55658da0ddf4b6de5b82a992e5f024351")
version("1.13.1", sha256="c5a76f064d6daa3e65583dce2b61202510e67cf6590f076af9a8aa72511d7d65")
version(
"1.12.1",
@@ -22,6 +23,9 @@ class H5utils(AutotoolsPackage):
url="https://github.com/NanoComp/h5utils/archive/refs/tags/1.12.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("png", default=True, description="Enable PNG support")
variant("vis5d", default=False, description="Enable Vis5d support")
variant("octave", default=False, description="Enable GNU Octave support")
@@ -43,17 +47,17 @@ class H5utils(AutotoolsPackage):
spec = self.spec
args = []
- if "+vis5d" in spec:
- args.append("--with-v5d={0}".format(spec["vis5d"].prefix))
+ if spec.satisfies("+vis5d"):
+ args.append(f"--with-v5d={spec['vis5d'].prefix}")
else:
args.append("--without-v5d")
- if "+octave" in spec:
+ if spec.satisfies("+octave"):
args.append("--with-octave")
else:
args.append("--without-octave")
- if "+hdf" in spec:
+ if spec.satisfies("+hdf"):
args.append("--with-hdf4")
else:
args.append("--without-hdf4")
diff --git a/var/spack/repos/builtin/packages/h5z-zfp/package.py b/var/spack/repos/builtin/packages/h5z-zfp/package.py
index a9c1f86974..f1979dd6ae 100644
--- a/var/spack/repos/builtin/packages/h5z-zfp/package.py
+++ b/var/spack/repos/builtin/packages/h5z-zfp/package.py
@@ -20,6 +20,9 @@ class H5zZfp(CMakePackage):
version("1.1.1", sha256="921af7b9d1c8c46c036b46544f2785f69d405c0701abe1c1ce3aca2bd5899171")
version("1.1.0", sha256="48a81e69d1f3b61d9a1eb07e868164fadf3b88690ec930efd849f5889681a893")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enable Fortran support")
depends_on("hdf5+fortran", when="+fortran")
@@ -31,7 +34,7 @@ class H5zZfp(CMakePackage):
def make_defs(self):
cc = spack_cc
fc = spack_fc
- if "^hdf5+mpi" in self.spec:
+ if self.spec.satisfies("^hdf5+mpi"):
cc = self.spec["mpi"].mpicc
fc = self.spec["mpi"].mpifc
make_defs = [
@@ -41,7 +44,7 @@ class H5zZfp(CMakePackage):
"ZFP_HOME=%s" % self.spec["zfp"].prefix,
]
- if "+fortran" in self.spec and fc:
+ if self.spec.satisfies("+fortran") and fc:
make_defs += ["FC=%s" % fc]
else:
make_defs += ["FC="]
diff --git a/var/spack/repos/builtin/packages/haccabana/package.py b/var/spack/repos/builtin/packages/haccabana/package.py
index bce59ef2ba..df24131f5d 100644
--- a/var/spack/repos/builtin/packages/haccabana/package.py
+++ b/var/spack/repos/builtin/packages/haccabana/package.py
@@ -23,6 +23,8 @@ class Haccabana(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
depends_on("cmake@3.9:", type="build")
diff --git a/var/spack/repos/builtin/packages/hacckernels/package.py b/var/spack/repos/builtin/packages/hacckernels/package.py
index 01bae2a386..5f0c02b4cb 100644
--- a/var/spack/repos/builtin/packages/hacckernels/package.py
+++ b/var/spack/repos/builtin/packages/hacckernels/package.py
@@ -22,6 +22,8 @@ class Hacckernels(CMakePackage):
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("README", prefix)
diff --git a/var/spack/repos/builtin/packages/hackrf-host/package.py b/var/spack/repos/builtin/packages/hackrf-host/package.py
index 6a02fa73a2..319bcb0c16 100644
--- a/var/spack/repos/builtin/packages/hackrf-host/package.py
+++ b/var/spack/repos/builtin/packages/hackrf-host/package.py
@@ -22,6 +22,8 @@ class HackrfHost(CMakePackage):
version("2018.01.1", sha256="84dbb5536d3aa5bd6b25d50df78d591e6c3431d752de051a17f4cb87b7963ec3")
+ depends_on("c", type="build") # generated
+
depends_on("cmake@2.8.12:", type="build")
depends_on("libusb@1.0.18:")
depends_on("fftw@3.3.5:")
diff --git a/var/spack/repos/builtin/packages/hadoop-xrootd/package.py b/var/spack/repos/builtin/packages/hadoop-xrootd/package.py
index 439301c38e..fe15a4aced 100644
--- a/var/spack/repos/builtin/packages/hadoop-xrootd/package.py
+++ b/var/spack/repos/builtin/packages/hadoop-xrootd/package.py
@@ -18,6 +18,8 @@ class HadoopXrootd(MavenPackage):
version("1.0.7", sha256="9a129dc14b3dc139aa4da7543f6392a5c80b41fea6bb9f6cd27db5acf6f5471f")
+ depends_on("cxx", type="build") # generated
+
depends_on("hadoop")
depends_on("xrootd")
conflicts("%clang")
diff --git a/var/spack/repos/builtin/packages/hadoop/package.py b/var/spack/repos/builtin/packages/hadoop/package.py
index d3d1212f45..3dfd038f01 100644
--- a/var/spack/repos/builtin/packages/hadoop/package.py
+++ b/var/spack/repos/builtin/packages/hadoop/package.py
@@ -14,9 +14,16 @@ class Hadoop(Package):
homepage = "https://hadoop.apache.org/"
url = "https://archive.apache.org/dist/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz"
+ list_url = "https://archive.apache.org/dist/hadoop/common"
+ list_depth = 1
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("3.4.0", sha256="e311a78480414030f9ec63549a5d685e69e26f207103d9abf21a48b9dd03c86c")
+ version("3.3.6", sha256="f5195059c0d4102adaa7fff17f7b2a85df906bcb6e19948716319f9978641a04")
+ version("3.3.5", sha256="446e05ca92fa23a60617a8b17946dede47281af1504041617cb7d5f62e74252a")
+ version("3.3.4", sha256="6a483d1a0b123490ebd8df3f71b64eb39f333f78b95f090aeb58e433cbc2416d")
+ version("3.3.3", sha256="fa71c61bbaa427129aef09fec028b34dd542c65ad90fdccec5e7ef93d83b8764")
version("3.3.2", sha256="b341587495b12eec0b244b517f21df88eb46ef634dc7dc3e5969455b80ce2ce5")
version("3.3.0", sha256="ea1a0f0afcdfb9b6b9d261cdce5a99023d7e8f72d26409e87f69bda65c663688")
version("3.2.2", sha256="97e73b46c3972cd3c40c2295bd9488843c24e8503c36e7c57f6e6ecc4e12b8c3")
diff --git a/var/spack/repos/builtin/packages/hal/package.py b/var/spack/repos/builtin/packages/hal/package.py
index 06461380fb..8fc8ec4603 100644
--- a/var/spack/repos/builtin/packages/hal/package.py
+++ b/var/spack/repos/builtin/packages/hal/package.py
@@ -21,6 +21,9 @@ class Hal(MakefilePackage):
version("2.1", sha256="540255be1af55abf390359fe034b82d7e61bdf6c3277df3cc01259cd450994e5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("ilbiondo")
# HAL expects to be compiled alongside sonlib so we need both the
diff --git a/var/spack/repos/builtin/packages/halide/package.py b/var/spack/repos/builtin/packages/halide/package.py
index f9e95e6756..df6832bf91 100644
--- a/var/spack/repos/builtin/packages/halide/package.py
+++ b/var/spack/repos/builtin/packages/halide/package.py
@@ -15,10 +15,17 @@ class Halide(CMakePackage, PythonExtension):
license("MIT")
- maintainers("wraith1995")
+ maintainers("wraith1995", "alexreinking")
version("main", branch="main")
+ version("18.0.0", sha256="1176b42a3e2374ab38555d9316c78e39b157044b5a8e765c748bf3afd2edb351")
+ version("17.0.2", sha256="5f3a43ba27b47d3dcbcee963faabf1d633d4151031e60b6ff7cc62472e5677a0")
+ version("17.0.1", sha256="beb18331d9e4b6f69943bcc75fb9d923a250ae689f09f6940a01636243289727")
+ version("17.0.0", sha256="7e5a526b4074887b528d25b0265ddfa92c0a6d8bfdfbbba536313ecddf352da3")
+ version("16.0.0", sha256="a0cccee762681ea697124b8172dd65595856d0fa5bd4d1af7933046b4a085b04")
version("15.0.0", sha256="6680424f80c5731a85d977c06327096afe5af31da3667e91d4d36a25fabdda15")
version("14.0.0", sha256="f9fc9765217cbd10e3a3e3883a60fc8f2dbbeaac634b45c789577a8a87999a01")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant(
"build_type",
default="Release",
@@ -58,8 +65,12 @@ class Halide(CMakePackage, PythonExtension):
depends_on("cmake@3.22:", type="build")
depends_on("llvm+clang+lld build_type=Release", type=("link", "run"))
- depends_on("llvm@13.0.0:15", type=("link", "run"), when="@14.0.0")
- depends_on("llvm@14.0.0:16", type=("link", "run"), when="@15.0.0:")
+ depends_on("llvm@14.0.0:14", type=("link", "run"), when="@14.0.0:14")
+ depends_on("llvm@15.0.0:15", type=("link", "run"), when="@15.0.0:15")
+ depends_on("llvm@16.0.0:16", type=("link", "run"), when="@16.0.0:16")
+ depends_on("llvm@17.0.0:17", type=("link", "run"), when="@17.0.0:17")
+ depends_on("llvm@17.0.0:18", type=("link", "run"), when="@18.0.0:18")
+
for v in _values:
depends_on(
"llvm targets={0}".format(v), type=("link", "run"), when="targets={0}".format(v)
@@ -71,7 +82,8 @@ class Halide(CMakePackage, PythonExtension):
depends_on("python@3.8:", type=("build", "link", "run"), when="+python")
# See https://github.com/halide/Halide/blob/main/requirements.txt
- depends_on("py-pybind11@2.6.2", type="build", when="+python")
+ depends_on("py-pybind11@2.6.2", type="build", when="@14.0.0:17+python")
+ depends_on("py-pybind11@2.10.4", type="build", when="@18.0.0:+python")
depends_on("py-setuptools@43:", type="build", when="+python")
depends_on("py-scikit-build", type="build", when="+python")
depends_on("py-wheel", type="build", when="+python")
@@ -106,9 +118,8 @@ class Halide(CMakePackage, PythonExtension):
for target in llvm_targets:
args += [self.define("TARGET_{0}".format(target[0]), target[1])]
- if "+python" in spec:
+ if spec.satisfies("+python"):
args += [
- self.define("Python3_EXECUTABLE", spec["python"].command.path),
self.define("PYBIND11_USE_FETCHCONTENT", False),
self.define("Halide_INSTALL_PYTHONDIR", python_platlib),
]
diff --git a/var/spack/repos/builtin/packages/hapcut2/package.py b/var/spack/repos/builtin/packages/hapcut2/package.py
index 620f297cd6..c9a5635761 100644
--- a/var/spack/repos/builtin/packages/hapcut2/package.py
+++ b/var/spack/repos/builtin/packages/hapcut2/package.py
@@ -25,6 +25,8 @@ class Hapcut2(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("htslib@1.3:")
depends_on("curl")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/haproxy/package.py b/var/spack/repos/builtin/packages/haproxy/package.py
index b887c3d090..23ad029ae8 100644
--- a/var/spack/repos/builtin/packages/haproxy/package.py
+++ b/var/spack/repos/builtin/packages/haproxy/package.py
@@ -15,9 +15,12 @@ class Haproxy(MakefilePackage):
homepage = "https://www.haproxy.org"
url = "https://www.haproxy.org/download/2.1/src/haproxy-2.1.0.tar.gz"
+ version("2.1.12", sha256="acebbf932f2703ee287d6e945bd845cde8c9db9a13f7cbb2a99671499c558056")
version("2.1.1", sha256="57e75c1a380fc6f6aa7033f71384370899443c7f4e8a4ba289b5d4350bc76d1a")
version("2.1.0", sha256="f268efb360a0e925137b4b8ed431f2f8f3b68327efb2c418b266e535d8e335a0")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
url = "https://www.haproxy.org/download/{0}/src/haproxy-{1}.tar.gz"
return url.format(version.up_to(2), version)
diff --git a/var/spack/repos/builtin/packages/hardlink/package.py b/var/spack/repos/builtin/packages/hardlink/package.py
index 66e0cbbf0b..a84b18e979 100644
--- a/var/spack/repos/builtin/packages/hardlink/package.py
+++ b/var/spack/repos/builtin/packages/hardlink/package.py
@@ -15,5 +15,7 @@ class Hardlink(MakefilePackage):
version("0.1.1", sha256="5876554e6dafb6627a94670ac33e750a7efeb3a5fbde5ede3e145cdb5131d1ba")
version("0.1", sha256="72f8a07b0dfe30a77da576b8dff5998c5f7e054052382fd61ac46157a5e039db")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("PREFIX={0}".format(prefix), "install-homebrew")
diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py
index e5edb2ed3b..09a43358cb 100644
--- a/var/spack/repos/builtin/packages/harfbuzz/package.py
+++ b/var/spack/repos/builtin/packages/harfbuzz/package.py
@@ -2,16 +2,20 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
import spack.build_systems.autotools
import spack.build_systems.meson
from spack.package import *
+IS_WINDOWS = sys.platform == "win32"
+
class Harfbuzz(MesonPackage, AutotoolsPackage):
"""The Harfbuzz package contains an OpenType text shaping engine."""
homepage = "https://github.com/harfbuzz/harfbuzz"
- url = "https://github.com/harfbuzz/harfbuzz/releases/download/2.9.1/harfbuzz-2.9.1.tar.xz"
+ url = "https://github.com/harfbuzz/harfbuzz/releases/download/9.0.0/harfbuzz-9.0.0.tar.xz"
git = "https://github.com/harfbuzz/harfbuzz.git"
build_system(
@@ -20,6 +24,14 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
license("MIT")
+ version("10.1.0", sha256="6ce3520f2d089a33cef0fc48321334b8e0b72141f6a763719aaaecd2779ecb82")
+ version("10.0.1", sha256="b2cb13bd351904cb9038f907dc0dee0ae07127061242fe3556b2795c4e9748fc")
+ version("10.0.0", sha256="c2dfe016ad833a5043ecc6579043f04e8e6d50064e02ad449bb466e6431e3e04")
+ version("9.0.0", sha256="a41b272ceeb920c57263ec851604542d9ec85ee3030506d94662067c7b6ab89e")
+ version("8.5.0", sha256="77e4f7f98f3d86bf8788b53e6832fb96279956e1c3961988ea3d4b7ca41ddc27")
+ version("8.4.0", sha256="af4ea73e25ab748c8c063b78c2f88e48833db9b2ac369e29bd115702e789755e")
+ version("8.3.1", sha256="f73e1eacd7e2ffae687bc3f056bb0c705b7a05aee86337686e09da8fc1c2030c")
+ version("8.3.0", sha256="109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847")
version("7.3.0", sha256="20770789749ac9ba846df33983dbda22db836c70d9f5d050cb9aa5347094a8fb")
version("7.2.0", sha256="fc5560c807eae0efd5f95b5aa4c65800c7a8eed6642008a6b1e7e3ffff7873cc")
version("6.0.0", sha256="1d1010a1751d076d5291e433c138502a794d679a7498d1268ee21e2d4a140eb4")
@@ -68,6 +80,9 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("graphite2", default=False, description="enable support for graphite2 font engine")
variant(
"coretext",
@@ -76,12 +91,15 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
description="Enable CoreText shaper backend on macOS",
)
- depends_on("pkgconfig", type="build")
- depends_on("glib")
- depends_on("gobject-introspection")
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ depends_on("pkgconfig", type="build")
+ depends_on("glib")
+ depends_on("gobject-introspection")
+ depends_on("cairo+pdf+ft")
+
depends_on("icu4c")
depends_on("freetype")
- depends_on("cairo+pdf+ft")
depends_on("zlib-api")
depends_on("graphite2", when="+graphite2")
@@ -90,7 +108,7 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
)
def url_for_version(self, version):
- if version > Version("2.3.1"):
+ if self.spec.satisfies("@2.3.2:"):
url = "https://github.com/harfbuzz/harfbuzz/releases/download/{0}/harfbuzz-{0}.tar.xz"
else:
url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-{0}.tar.bz2"
@@ -103,9 +121,9 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
if name == "cxxflags":
flags.append(self.compiler.cxx11_flag)
if name == "cflags":
- if "%pgi" not in self.spec and self.spec.satisfies("%gcc@:5.1"):
+ if self.spec.satisfies("%gcc@:5.1"):
flags.append("-std=gnu99")
- return (None, None, flags)
+ return None, None, flags
def setup_run_environment(self, env):
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
@@ -114,6 +132,7 @@ class Harfbuzz(MesonPackage, AutotoolsPackage):
env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))
+ @when("@:8")
def patch(self):
change_sed_delimiter("@", ";", "src/Makefile.in")
@@ -128,12 +147,16 @@ class MesonBuilder(spack.build_systems.meson.MesonBuilder, SetupEnvironment):
def meson_args(self):
graphite2 = "enabled" if self.pkg.spec.satisfies("+graphite2") else "disabled"
coretext = "enabled" if self.pkg.spec.satisfies("+coretext") else "disabled"
- return [
+ config_args = [
# disable building of gtk-doc files following #9885 and #9771
"-Ddocs=disabled",
- "-Dgraphite2={0}".format(graphite2),
- "-Dcoretext={0}".format(coretext),
+ "-Dfreetype=enabled",
+ f"-Dgraphite2={graphite2}",
+ f"-Dcoretext={coretext}",
]
+ if IS_WINDOWS:
+ config_args.extend(["-Dcairo=disabled", "-Dglib=disabled"])
+ return config_args
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, SetupEnvironment):
@@ -143,10 +166,10 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, SetupEnvi
# disable building of gtk-doc files following #9771
args.append("--disable-gtk-doc-html")
true = which("true")
- args.append("GTKDOC_CHECK={0}".format(true))
- args.append("GTKDOC_CHECK_PATH={0}".format(true))
- args.append("GTKDOC_MKPDF={0}".format(true))
- args.append("GTKDOC_REBASE={0}".format(true))
+ args.append(f"GTKDOC_CHECK={true}")
+ args.append(f"GTKDOC_CHECK_PATH={true}")
+ args.append(f"GTKDOC_MKPDF={true}")
+ args.append(f"GTKDOC_REBASE={true}")
args.extend(self.with_or_without("graphite2"))
args.extend(self.with_or_without("coretext"))
diff --git a/var/spack/repos/builtin/packages/harminv/package.py b/var/spack/repos/builtin/packages/harminv/package.py
index 3bff34a919..dcd2bfa725 100644
--- a/var/spack/repos/builtin/packages/harminv/package.py
+++ b/var/spack/repos/builtin/packages/harminv/package.py
@@ -21,6 +21,8 @@ class Harminv(AutotoolsPackage):
version("1.4.2", sha256="5a9a1bf710972442f065d0d62c62d0c4ec3da4a3696d7160a35602c9470bc7a2")
version("1.4.1", sha256="e1b923c508a565f230aac04e3feea23b888b47d8e19b08816a97ee4444233670")
+ depends_on("c", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/hashcat/package.py b/var/spack/repos/builtin/packages/hashcat/package.py
index 56d615a9cc..9cb2c3f9b9 100644
--- a/var/spack/repos/builtin/packages/hashcat/package.py
+++ b/var/spack/repos/builtin/packages/hashcat/package.py
@@ -25,5 +25,8 @@ class Hashcat(MakefilePackage):
version("5.1.0", sha256="283beaa68e1eab41de080a58bb92349c8e47a2bb1b93d10f36ea30f418f1e338")
version("5.0.0", sha256="7092d98cf0d8b29bd6efe2cf94802442dd8d7283982e9439eafbdef62b0db08f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
make("SHARED=1", "PREFIX={0}".format(prefix), "install")
diff --git a/var/spack/repos/builtin/packages/haveged/package.py b/var/spack/repos/builtin/packages/haveged/package.py
index 5c80663979..8b0c9922a2 100644
--- a/var/spack/repos/builtin/packages/haveged/package.py
+++ b/var/spack/repos/builtin/packages/haveged/package.py
@@ -15,3 +15,5 @@ class Haveged(AutotoolsPackage):
license("GPL-3.0-or-later")
version("1.9.13", sha256="d17bd22fa1745daca5ac72e014ed3b0fe5720da4c115953124b1bf2a0aa2b04b")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/hazelcast/package.py b/var/spack/repos/builtin/packages/hazelcast/package.py
index 60eb0b1018..29725b6f37 100644
--- a/var/spack/repos/builtin/packages/hazelcast/package.py
+++ b/var/spack/repos/builtin/packages/hazelcast/package.py
@@ -15,8 +15,9 @@ class Hazelcast(MavenPackage):
homepage = "http://www.hazelcast.com/"
url = "https://github.com/hazelcast/hazelcast/archive/v3.12.8.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("5.5.0", sha256="bbf0c9b9de89512a41d698c02477c88c4955600f34741ee42e26838409e2e526")
version("5.2.3", sha256="026c213d3bb520b6c44587ae2a67eca50b9a5a0fc56d2cdedfb2c09c7858a11f")
version("4.0.2", sha256="4f01682583ae6603365ac7a24c568d7598cc3c1cbd736e5c6ed98bd75e39ffa3")
version("4.0.1", sha256="c9c7d5cbcf70c5e1eb72890df2b4104639f7543f11c6ac5d3e80cd2d4a0d2181")
diff --git a/var/spack/repos/builtin/packages/hbm-dramsim2/package.py b/var/spack/repos/builtin/packages/hbm-dramsim2/package.py
index 5fff62e4c0..2c3aa4fdca 100644
--- a/var/spack/repos/builtin/packages/hbm-dramsim2/package.py
+++ b/var/spack/repos/builtin/packages/hbm-dramsim2/package.py
@@ -19,5 +19,7 @@ class HbmDramsim2(MakefilePackage):
version("1.0.0", sha256="0efad11c58197edb47ad1359f8f93fb45d882c6bebcf9f2143e0df7a719689a0")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/hdf-eos2/hdf-eos2.configure.patch b/var/spack/repos/builtin/packages/hdf-eos2/hdf-eos2.configure.patch
new file mode 100644
index 0000000000..7c3f1ec925
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf-eos2/hdf-eos2.configure.patch
@@ -0,0 +1,25 @@
+# Fix some issues with hdf-eos2 configure script
+# configure (according to config.log) would find the jpeg
+# and libz libs, but then abort complaining they were not
+# found because HAVE_LIBJPEG, etc not set (the script just
+# appended the lines to confdefs.h but not set in the environment
+# of the running script and script tests the env variable)
+diff -Naur spack-src/configure spack-src.patched/configure
+--- spack-src/configure 2023-12-18 14:56:50.796875000 -0500
++++ spack-src.patched/configure 2023-12-18 15:01:50.780038643 -0500
+@@ -12488,6 +12488,7 @@
+ _ACEOF
+
+ LIBS="-ljpeg $LIBS"
++ HAVE_LIBJPEG=1
+
+ else
+
+@@ -12863,6 +12864,7 @@
+ _ACEOF
+
+ LIBS="-lz $LIBS"
++ HAVE_LIBZ=1
+
+ else
+
diff --git a/var/spack/repos/builtin/packages/hdf-eos2/package.py b/var/spack/repos/builtin/packages/hdf-eos2/package.py
index 72e5fb282f..aae0b559cf 100644
--- a/var/spack/repos/builtin/packages/hdf-eos2/package.py
+++ b/var/spack/repos/builtin/packages/hdf-eos2/package.py
@@ -3,8 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
import sys
-from os import chmod
from spack.package import *
@@ -16,10 +16,15 @@ class HdfEos2(AutotoolsPackage):
"""
homepage = "https://hdfeos.org"
- # The download URLs are messing, and include sha256 checksum.
+ # Starting with @3, download requires authentication. So reverting
+ # to a manual download
+ url = "file://{0}/hdf-eos2-3.0-src.tar.gz".format(os.getcwd())
+ manual_download = True
+
+ # The download URLs for @2 versions are messing, and include sha256 checksum.
+ # Templates for url_for_version. 0 is sha256 checksum, 1 is filename
# This is just a template. See version_list and url_for_version below
- # Template for url_for_version. 0 is sha256 checksum, 1 is filename
- url = "https://git.earthdata.nasa.gov/rest/git-lfs/storage/DAS/hdfeos/{0}?response-content-disposition=attachment%3B%20filename%3D%22{1}%22%3B%20filename*%3Dutf-8%27%27{1}"
+ v2url = "https://git.earthdata.nasa.gov/rest/git-lfs/storage/DAS/hdfeos/{0}?response-content-disposition=attachment%3B%20filename%3D%22{1}%22%3B%20filename*%3Dutf-8%27%27{1}"
maintainers("climbfuji")
@@ -30,14 +35,22 @@ class HdfEos2(AutotoolsPackage):
# 1 is for version with dots => underscores
version_list = [
{
+ "version": "3.0",
+ "basename": "hdf-eos2-{0}-src.tar.gz",
+ "sha256": "3a5564b4d69b541139ff7dfdad948696cf31d9d1a6ea8af290c91a4c0ee37188",
+ "can_auto_download": False,
+ },
+ {
"version": "2.20v1.00",
"sha256": "cb0f900d2732ab01e51284d6c9e90d0e852d61bba9bce3b43af0430ab5414903",
"basename": "HDF-EOS{0}.tar.Z",
+ "can_auto_download": True,
},
{
"version": "2.19b",
"sha256": "a69993508dbf5fa6120bac3c906ab26f1ad277348dfc2c891305023cfdf5dc9d",
"basename": "hdfeos{1}.zip",
+ "can_auto_download": True,
},
]
@@ -58,24 +71,32 @@ class HdfEos2(AutotoolsPackage):
# Build dependencies
depends_on("hdf")
# Because hdf always depends on zlib and jpeg in spack, the tests below in configure_args
- # (if "jpeg" in self.spec:) always returns true and hdf-eos2 wants zlib and jpeg, too.
+ # (if self.spec.satisfies("^jpeg"):) always returns true and hdf-eos2 wants zlib and jpeg, too.
depends_on("zlib-api")
depends_on("jpeg")
depends_on("szip", when="^hdf +szip")
+ # Fix some problematic logic in stock configure script
+ # test succeeds, but then script aborts due to env variable not being set
+ patch("hdf-eos2.configure.patch", when="@2:3.0")
+
# The standard Makefile.am, etc. add a --single_module flag to LDFLAGS
# to pass to the linker.
# That appears to be only recognized by the Darwin linker, remove it
# if we are not running on darwin/
if sys.platform != "darwin":
- patch("hdf-eos2.nondarwin-no-single_module.patch")
+ patch("hdf-eos2.nondarwin-no-single_module.patch", when="@2")
def url_for_version(self, version):
vrec = [x for x in self.version_list if x["version"] == version.dotted.string]
if vrec:
fname = vrec[0]["basename"].format(version.dotted, version.underscored)
sha256 = vrec[0]["sha256"]
- myurl = self.url.format(sha256, fname)
+ can_auto_download = vrec[0].get("can_auto_download", False)
+ if can_auto_download:
+ myurl = self.v2url.format(sha256, fname)
+ else:
+ myurl = self.url
return myurl
else:
sys.exit(
@@ -83,26 +104,43 @@ class HdfEos2(AutotoolsPackage):
"version/checksum not found in version_list".format(version)
)
- # spack patches the configure file unless autoconf is run,
- # and this fails because configure has the wrong permissions (644)
@run_before("configure")
- def fix_permissions(self):
+ def fix_configure(self):
+ # spack patches the configure file unless autoconf is run,
+ # and this fails because configure has the wrong permissions (644)
if not self.force_autoreconf:
- chmod(join_path(self.stage.source_path, "configure"), 0o755)
+ os.chmod(join_path(self.stage.source_path, "configure"), 0o755)
+
+ # The configure script as written really wants you to use h4cc.
+ # This causes problems because h4cc differs when HDF is built with
+ # autotools vs cmake, and we lose all the nice flags from the
+ # Spack wrappers. These filter operations allow us to use the
+ # Spack wrappers again
+ filter_file("\\$CC -show &> /dev/null", "true", "configure")
+ filter_file("CC=./\\$SZIP_CC", "", "configure")
def flag_handler(self, name, flags):
- if self.spec.compiler.name == "apple-clang":
- if name == "cflags":
+ if name == "cflags":
+ flags.append(self.compiler.cc_pic_flag)
+ if self.spec.compiler.name in ["apple-clang", "oneapi"]:
flags.append("-Wno-error=implicit-function-declaration")
+ flags.append("-Wno-error=implicit-int")
return flags, None, None
+ def setup_build_environment(self, env):
+ # Add flags to LDFLAGS for any dependencies that need it
+ extra_ldflags = []
+ # hdf might have link dependency on rpc, if so need to add flags
+ if self.spec.satisfies("^libtirpc"):
+ tmp = self.spec["libtirpc"].libs.ld_flags
+ extra_ldflags.append(tmp)
+ # Set LDFLAGS
+ env.set("LDFLAGS", " ".join(extra_ldflags))
+
def configure_args(self):
extra_args = []
- # Package really wants h4cc to be used
- extra_args.append("CC={0}/bin/h4cc -Df2cFortran".format(self.spec["hdf"].prefix))
-
# We always build PIC code
extra_args.append("--with-pic")
extra_args.append("--enable-install_include")
@@ -113,11 +151,15 @@ class HdfEos2(AutotoolsPackage):
# Provide config args for dependencies
extra_args.append("--with-hdf4={0}".format(self.spec["hdf"].prefix))
- if "jpeg" in self.spec:
- extra_args.append("--with-jpeg={0}".format(self.spec["jpeg"].prefix))
- if "szip" in self.spec:
+ if self.spec.satisfies("^jpeg"):
+ # Allow handling whatever provider of jpeg are using
+ tmp = self.spec["jpeg"].libs.directories
+ if tmp:
+ tmp = tmp[0]
+ extra_args.append("--with-jpeg={0}".format(tmp))
+ if self.spec.satisfies("^szip"):
extra_args.append("--with-szlib={0}".format(self.spec["szip"].prefix))
- if "zlib" in self.spec:
+ if self.spec.satisfies("^zlib"):
extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix))
return extra_args
diff --git a/var/spack/repos/builtin/packages/hdf-eos5/package.py b/var/spack/repos/builtin/packages/hdf-eos5/package.py
index fd0d6147ef..2af16da1ca 100644
--- a/var/spack/repos/builtin/packages/hdf-eos5/package.py
+++ b/var/spack/repos/builtin/packages/hdf-eos5/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
+from os import chmod
from spack.package import *
@@ -77,15 +78,24 @@ class HdfEos5(AutotoolsPackage):
"version/checksum not found in version_list".format(version)
)
+ @run_before("configure")
+ def fix_configure(self):
+ # spack patches the configure file unless autoconf is run,
+ # and this fails because configure has the wrong permissions (644)
+ if not self.force_autoreconf:
+ chmod(join_path(self.stage.source_path, "configure"), 0o755)
+
+ # The configure script as written really wants you to use h5cc. This causes
+ # problems because h5cc differs when HDF5 is built with autotools vs cmake,
+ # and we lose all nice flags from the Spack wrappers. These filter operations
+ # allow use to use the Spack wrappers again.
+ with keep_modification_time("configure"):
+ filter_file(r"$CC -show &> /dev/null", "true", "configure", string=True)
+ filter_file(r"CC=./$SZIP_CC", "", "configure", string=True)
+
def configure_args(self):
extra_args = []
- # Package really wants h5cc to be used
- if self.spec["mpi"]:
- extra_args.append("CC={0}/bin/h5pcc -Df2cFortran".format(self.spec["hdf5"].prefix))
- else:
- extra_args.append("CC={0}/bin/h5cc -Df2cFortran".format(self.spec["hdf5"].prefix))
-
# We always build PIC code
extra_args.append("--with-pic")
# We always enable installation of include directories
@@ -97,9 +107,9 @@ class HdfEos5(AutotoolsPackage):
# Provide config args for dependencies
extra_args.append("--with-hdf5={0}".format(self.spec["hdf5"].prefix))
- if "szip" in self.spec:
+ if self.spec.satisfies("^szip"):
extra_args.append("--with-szlib={0}".format(self.spec["szip"].prefix))
- if "zlib-api" in self.spec:
+ if self.spec.satisfies("^zlib-api"):
extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix))
return extra_args
diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py
index d352e2f6b5..9531524c0c 100644
--- a/var/spack/repos/builtin/packages/hdf/package.py
+++ b/var/spack/repos/builtin/packages/hdf/package.py
@@ -25,6 +25,10 @@ class Hdf(AutotoolsPackage):
version("4.2.12", sha256="dd419c55e85d1a0e13f3ea5ed35d00710033ccb16c85df088eb7925d486e040c")
version("4.2.11", sha256="c3f7753b2fb9b27d09eced4d2164605f111f270c9a60b37a578f7de02de86d24")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("szip", default=False, description="Enable szip support")
variant(
"external-xdr", default=sys.platform != "darwin", description="Use an external XDR backend"
@@ -117,28 +121,28 @@ class Hdf(AutotoolsPackage):
elif "static" in query_parameters:
shared = False
else:
- shared = "+shared" in self.spec
+ shared = self.spec.satisfies("+shared")
libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True)
if not libs:
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
if not shared and "transitive" in query_parameters:
libs += self.spec["jpeg:transitive"].libs
libs += self.spec["zlib:transitive"].libs
- if "+szip" in self.spec:
+ if self.spec.satisfies("+szip"):
libs += self.spec["szip:transitive"].libs
- if "+external-xdr" in self.spec and self.spec["rpc"].name != "libc":
+ if self.spec.satisfies("+external-xdr") and self.spec["rpc"].name == "libtirpc":
libs += self.spec["rpc:transitive"].libs
return libs
def flag_handler(self, name, flags):
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
if name == "cflags":
flags.append(self.compiler.cc_pic_flag)
elif name == "fflags":
@@ -146,10 +150,14 @@ class Hdf(AutotoolsPackage):
if name == "cflags":
# https://forum.hdfgroup.org/t/help-building-hdf4-with-clang-error-implicit-declaration-of-function-test-mgr-szip-is-invalid-in-c99/7680
- if self.spec.satisfies("@:4.2.15 %apple-clang") or self.spec.satisfies("%clang@16:"):
+ if (
+ self.spec.satisfies("@:4.2.15 %apple-clang")
+ or self.spec.satisfies("%clang@16:")
+ or self.spec.satisfies("%oneapi")
+ ):
flags.append("-Wno-error=implicit-function-declaration")
- if self.spec.satisfies("%clang@16:"):
+ if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%apple-clang@15:"):
flags.append("-Wno-error=implicit-int")
return flags, None, None
@@ -167,14 +175,14 @@ class Hdf(AutotoolsPackage):
config_args += self.enable_or_disable("fortran")
config_args += self.enable_or_disable("java")
- if "+szip" in self.spec:
+ if self.spec.satisfies("+szip"):
config_args.append("--with-szlib=%s" % self.spec["szip"].prefix)
else:
config_args.append("--without-szlib")
- if "~external-xdr" in self.spec:
+ if self.spec.satisfies("~external-xdr"):
config_args.append("--enable-hdf4-xdr")
- elif self.spec["rpc"].name != "libc":
+ elif self.spec["rpc"].name == "libtirpc":
# We should not specify '--disable-hdf4-xdr' due to a bug in the
# configure script.
config_args.append("LIBS=%s" % self.spec["rpc"].libs.link_flags)
@@ -210,7 +218,7 @@ class Hdf(AutotoolsPackage):
def setup_build_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(self.extra_install_tests)
+ cache_extra_test_sources(self, self.extra_install_tests)
def _check_version_match(self, exe):
"""Ensure exe version check yields spec version."""
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
index d99e9bbd3a..d7002e6631 100644
--- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -36,6 +36,8 @@ class Hdf5Blosc(Package):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("c-blosc")
depends_on("hdf5")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hdf5-vfd-gds/package.py b/var/spack/repos/builtin/packages/hdf5-vfd-gds/package.py
index 28ab546bd4..17da8e1206 100644
--- a/var/spack/repos/builtin/packages/hdf5-vfd-gds/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vfd-gds/package.py
@@ -23,6 +23,8 @@ class Hdf5VfdGds(CMakePackage, CudaPackage):
version("1.0.1", sha256="00e125fd149561be991f41e883824de826d8add604aebccf103a4fb82d5faac2")
version("1.0.0", sha256="6b16105c7c49f13fc05784ee69b78d45fb159270c78d760689f9cd21e230ddd2")
+ depends_on("c", type="build") # generated
+
# Dependencies
conflicts("~cuda")
# Although cuFILE predates 11.7.0, it is not installed in a location the build
diff --git a/var/spack/repos/builtin/packages/hdf5-vol-async/package.py b/var/spack/repos/builtin/packages/hdf5-vol-async/package.py
index fd94f588d5..1fb1ff16cc 100644
--- a/var/spack/repos/builtin/packages/hdf5-vol-async/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vol-async/package.py
@@ -30,6 +30,8 @@ class Hdf5VolAsync(CMakePackage):
version("1.6", tag="v1.6", commit="f3406d62ec055cdcfe077979a1068bd102c598a5")
version("1.5", tag="v1.5", commit="b917713ffcb207d9799c6d6863cf805ee54ccfea")
+ depends_on("c", type="build") # generated
+
variant("memcpy", default=False, description="Enable buffer copy for dataset write")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py b/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py
index e5f086b88a..8a9cf389ff 100644
--- a/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py
@@ -19,12 +19,15 @@ class Hdf5VolCache(CMakePackage):
version("v1.1", tag="v1.1", commit="d886a17a381990b5949d95f5299461c39d7ac2bc")
version("v1.0", tag="v1.0", commit="a9b9704e74fa24af50b2a3bd0d63a40a69bde8fe")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("hdf5@1.14: +mpi +threadsafe")
depends_on("hdf5-vol-async")
def flag_handler(self, name, flags):
if name == "cflags":
- if self.spec.satisfies("%oneapi"):
+ if self.spec.satisfies("%oneapi") or self.spec.satisfies("%cce"):
flags.append("-Wno-error=incompatible-function-pointer-types")
return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/hdf5-vol-daos/package.py b/var/spack/repos/builtin/packages/hdf5-vol-daos/package.py
index 6fe945bb02..284ac473e8 100644
--- a/var/spack/repos/builtin/packages/hdf5-vol-daos/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vol-daos/package.py
@@ -22,6 +22,9 @@ class Hdf5VolDaos(CMakePackage):
version("master", branch="master", submodules=True)
version("1.2.0", sha256="669c1443605068f24c033783ef72619afcec4844902b3e0bffa19ddeea39779f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.12.2:", type="build")
depends_on("daos@2.2.0:")
depends_on("hdf5@1.14.0:+hl+mpi+map")
diff --git a/var/spack/repos/builtin/packages/hdf5-vol-external-passthrough/package.py b/var/spack/repos/builtin/packages/hdf5-vol-external-passthrough/package.py
index e7892a705d..9e97f6e58d 100644
--- a/var/spack/repos/builtin/packages/hdf5-vol-external-passthrough/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vol-external-passthrough/package.py
@@ -16,6 +16,8 @@ class Hdf5VolExternalPassthrough(CMakePackage):
version("develop", branch="develop")
version("1.1", sha256="9f1a7fba4958fe0f46b4451253b9b1d7a4cfb30a0ce4183f5f756ceaddbbf2c3")
+
+ depends_on("c", type="build") # generated
depends_on("hdf5@1.14.0:")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/hdf5-vol-log/package.py b/var/spack/repos/builtin/packages/hdf5-vol-log/package.py
index 3864e6ec3c..0f5a7dbb63 100644
--- a/var/spack/repos/builtin/packages/hdf5-vol-log/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-vol-log/package.py
@@ -19,6 +19,9 @@ class Hdf5VolLog(AutotoolsPackage):
version("1.4.0", tag="logvol.1.4.0", commit="786d2cc4da8b4a0827ee00b1b0ab3968ef942f99")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("hdf5@1.14.0:", when="@1.4.0:")
depends_on("mpi")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/hdf5/find_package_zlib.patch b/var/spack/repos/builtin/packages/hdf5/find_package_zlib.patch
new file mode 100644
index 0000000000..73b65e826d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf5/find_package_zlib.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
+index dbd68fd110..3d06b13d57 100644
+--- a/CMakeFilters.cmake
++++ b/CMakeFilters.cmake
+@@ -70,7 +70,6 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
+ if (HDF5_ENABLE_Z_LIB_SUPPORT)
+ if (NOT H5_ZLIB_HEADER)
+ if (NOT ZLIB_USE_EXTERNAL)
+- find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ if (NOT ZLIB_FOUND)
+ find_package (ZLIB) # Legacy find
+ endif ()
diff --git a/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_3_fpe.patch b/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_3_fpe.patch
new file mode 100644
index 0000000000..90ab32a0f4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_3_fpe.patch
@@ -0,0 +1,203 @@
+diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
+index 328f8d3cec..079f08d96c 100644
+--- a/config/linux-gnulibc1
++++ b/config/linux-gnulibc1
+@@ -173,10 +173,7 @@ case $FC_BASENAME in
+ nagfor)
+
+ F9XSUFFIXFLAG=""
+- # NOTE: The default is -ieee=stop, which will cause problems
+- # when the H5T module performs floating-point type
+- # introspection
+- AM_FCFLAGS="$AM_FCFLAGS -ieee=full"
++ AM_FCFLAGS="$AM_FCFLAGS"
+ FSEARCH_DIRS=""
+
+ # Production
+diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
+index 200576332b..0aa139761d 100644
+--- a/release_docs/RELEASE.txt
++++ b/release_docs/RELEASE.txt
+@@ -246,6 +246,27 @@ Support for new platforms, languages and compilers
+ -
+
+
++Patches applied since the HDF5-1.14.3 release
++=============================================
++ Library
++ -------
++ - Suppressed floating-point exceptions in H5T init code
++
++ The floating-point datatype initialization code in H5Tinit_float.c
++ could raise FE_INVALID exceptions while munging bits and performing
++ comparisons that might involve NaN. This was not a problem when the
++ initialization code was executed in H5detect at compile time (prior
++ to 1.14.3), but now that the code is executed at library startup
++ (1.14.3+), these exceptions can be caught by user code, as is the
++ default in the NAG Fortran compiler.
++
++ Starting in 1.14.4, we now suppress floating-point exceptions while
++ initializing the floating-point types and clear FE_INVALID before
++ restoring the original environment.
++
++ Fixes GitHub #3831
++
++
+ Bug Fixes since HDF5-1.14.2 release
+ ===================================
+ Library
+@@ -619,12 +640,6 @@ Known Problems
+ this release with link errors. As a result, Windows binaries for this release
+ will not include Fortran. The problem will be addressed in HDF5 1.14.4.
+
+- IEEE standard arithmetic enables software to raise exceptions such as overflow,
+- division by zero, and other illegal operations without interrupting or halting
+- the program flow. The HDF5 C library intentionally performs these exceptions.
+- Therefore, the "-ieee=full" nagfor switch is necessary when compiling a program
+- to avoid stopping on an exception.
+-
+ CMake files do not behave correctly with paths containing spaces.
+ Do not use spaces in paths because the required escaping for handling spaces
+ results in very complex and fragile build files.
+diff --git a/src/H5Tinit_float.c b/src/H5Tinit_float.c
+index 3b9e127fe4..02bb3bad77 100644
+--- a/src/H5Tinit_float.c
++++ b/src/H5Tinit_float.c
+@@ -51,19 +51,23 @@
+ * Function: DETECT_F
+ *
+ * Purpose: This macro takes a floating point type like `double' and
+- * a base name like `natd' and detects byte order, mantissa
+- * location, exponent location, sign bit location, presence or
+- * absence of implicit mantissa bit, and exponent bias and
+- * initializes a detected_t structure with those properties.
++ * detects byte order, mantissa location, exponent location,
++ * sign bit location, presence or absence of implicit mantissa
++ * bit, and exponent bias and initializes a detected_t structure
++ * with those properties.
++ *
++ * Note that these operations can raise floating-point
++ * exceptions and building with some compiler options
++ * (especially Fortran) can cause problems.
+ *-------------------------------------------------------------------------
+ */
+-#define DETECT_F(TYPE, VAR, INFO) \
++#define DETECT_F(TYPE, INFO) \
+ do { \
+- TYPE _v1, _v2, _v3; \
+- unsigned char _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \
+- unsigned char _pad_mask[sizeof(TYPE)]; \
+- unsigned char _byte_mask; \
+- int _i, _j, _last = (-1); \
++ TYPE _v1, _v2, _v3; \
++ uint8_t _buf1[sizeof(TYPE)], _buf3[sizeof(TYPE)]; \
++ uint8_t _pad_mask[sizeof(TYPE)]; \
++ uint8_t _byte_mask; \
++ int _i, _j, _last = -1; \
+ \
+ memset(&INFO, 0, sizeof(INFO)); \
+ INFO.size = sizeof(TYPE); \
+@@ -81,7 +85,7 @@
+ _v1 = (TYPE)4.0L; \
+ H5MM_memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
+- for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
++ for (_byte_mask = (uint8_t)1; _byte_mask; _byte_mask = (uint8_t)(_byte_mask << 1)) { \
+ _buf1[_i] ^= _byte_mask; \
+ H5MM_memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
+ H5_GCC_CLANG_DIAG_OFF("float-equal") \
+@@ -118,7 +122,7 @@
+ _v1 = (TYPE)1.0L; \
+ _v2 = (TYPE)-1.0L; \
+ if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.sign)) < 0) \
+- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
++ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine sign bit"); \
+ \
+ /* Mantissa */ \
+ INFO.mpos = 0; \
+@@ -126,12 +130,11 @@
+ _v1 = (TYPE)1.0L; \
+ _v2 = (TYPE)1.5L; \
+ if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.msize)) < 0) \
+- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
++ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine mantissa"); \
+ INFO.msize += 1 + (unsigned)(INFO.imp ? 0 : 1) - INFO.mpos; \
+ \
+ /* Exponent */ \
+- INFO.epos = INFO.mpos + INFO.msize; \
+- \
++ INFO.epos = INFO.mpos + INFO.msize; \
+ INFO.esize = INFO.sign - INFO.epos; \
+ \
+ _v1 = (TYPE)1.0L; \
+@@ -456,17 +459,24 @@ H5T__set_precision(H5T_fpoint_det_t *d)
+ herr_t H5_NO_UBSAN
+ H5T__init_native_float_types(void)
+ {
++ fenv_t saved_fenv;
+ H5T_fpoint_det_t det;
+ H5T_t *dt = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_PACKAGE
+
++ /* Turn off floating-point exceptions while initializing to avoid
++ * tripping over signaling NaNs while looking at "don't care" bits.
++ */
++ if (feholdexcept(&saved_fenv) != 0)
++ HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't save floating-point environment");
++
+ /* H5T_NATIVE_FLOAT */
+
+ /* Get the type's characteristics */
+ memset(&det, 0, sizeof(H5T_fpoint_det_t));
+- DETECT_F(float, FLOAT, det);
++ DETECT_F(float, det);
+
+ /* Allocate and fill type structure */
+ if (NULL == (dt = H5T__alloc()))
+@@ -497,7 +507,7 @@ H5T__init_native_float_types(void)
+
+ /* Get the type's characteristics */
+ memset(&det, 0, sizeof(H5T_fpoint_det_t));
+- DETECT_F(double, DOUBLE, det);
++ DETECT_F(double, det);
+
+ /* Allocate and fill type structure */
+ if (NULL == (dt = H5T__alloc()))
+@@ -528,7 +538,7 @@ H5T__init_native_float_types(void)
+
+ /* Get the type's characteristics */
+ memset(&det, 0, sizeof(H5T_fpoint_det_t));
+- DETECT_F(long double, LDOUBLE, det);
++ DETECT_F(long double, det);
+
+ /* Allocate and fill type structure */
+ if (NULL == (dt = H5T__alloc()))
+@@ -561,6 +571,14 @@ H5T__init_native_float_types(void)
+ H5T_native_order_g = det.order;
+
+ done:
++ /* Clear any FE_INVALID exceptions from NaN handling */
++ if (feclearexcept(FE_INVALID) != 0)
++ HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't clear floating-point exceptions");
++
++ /* Restore the original environment */
++ if (feupdateenv(&saved_fenv) != 0)
++ HSYS_GOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't restore floating-point environment");
++
+ if (ret_value < 0) {
+ if (dt != NULL) {
+ dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
+diff --git a/src/H5private.h b/src/H5private.h
+index 14a0ac3225..3aaa0d5245 100644
+--- a/src/H5private.h
++++ b/src/H5private.h
+@@ -26,6 +26,7 @@
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <fenv.h>
+ #include <float.h>
+ #include <math.h>
+ #include <setjmp.h>
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 273a1e7255..ecd36f1c44 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -6,6 +6,7 @@
import os
import re
import shutil
+import sys
import llnl.util.lang
import llnl.util.tty as tty
@@ -19,10 +20,9 @@ class Hdf5(CMakePackage):
flexible and efficient I/O and for high volume and complex data.
"""
- homepage = "https://portal.hdfgroup.org"
- url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.tar.gz"
- list_url = "https://support.hdfgroup.org/ftp/HDF5/releases"
- list_depth = 3
+ homepage = "https://support.hdfgroup.org"
+ url = "https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.tar.gz"
+
git = "https://github.com/HDFGroup/hdf5.git"
maintainers("lrknox", "brtnfld", "byrnHDF", "gheber", "hyoklee", "lkurz")
@@ -33,9 +33,13 @@ class Hdf5(CMakePackage):
license("custom")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build", when="+cxx")
+ depends_on("fortran", type="build", when="+fortran")
+
# The 'develop' version is renamed so that we could uninstall (or patch) it
# without affecting other develop version.
- version("develop-1.15", branch="develop")
+ version("develop-2.0", branch="develop")
version("develop-1.14", branch="hdf5_1_14")
version("develop-1.12", branch="hdf5_1_12")
version("develop-1.10", branch="hdf5_1_10")
@@ -44,172 +48,76 @@ class Hdf5(CMakePackage):
# Odd versions are considered experimental releases
# Even versions are maintenance versions
version(
+ "1.14.5",
+ sha256="ec2e13c52e60f9a01491bb3158cb3778c985697131fc6a342262d32a26e58e44",
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.tar.gz",
+ preferred=True,
+ )
+ version(
+ "1.14.4-3",
+ sha256="019ac451d9e1cf89c0482ba2a06f07a46166caf23f60fea5ef3c37724a318e03",
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_4/downloads/hdf5-1.14.4-3.tar.gz",
+ )
+ version(
"1.14.3",
sha256="09cdb287aa7a89148c1638dd20891fdbae08102cf433ef128fd345338aa237c7",
- preferred=True,
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_3/downloads/hdf5-1.14.3.tar.gz",
)
version(
"1.14.2",
sha256="1c342e634008284a8c2794c8e7608e2eaf26d01d445fb3dfd7f33cb2fb51ac53",
- preferred=True,
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_2/downloads/hdf5-1.14.2.tar.gz",
)
version(
"1.14.1-2",
sha256="cbe93f275d5231df28ced9549253793e40cd2b555e3d288df09d7b89a9967b07",
- preferred=True,
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_1/downloads/hdf5-1.14.1-2.tar.gz",
)
version(
"1.14.0",
sha256="a571cc83efda62e1a51a0a912dd916d01895801c5025af91669484a1575a6ef4",
- preferred=True,
- )
- version(
- "1.12.2",
- sha256="2a89af03d56ce7502dcae18232c241281ad1773561ec00c0f0e8ee2463910f14",
- preferred=True,
- )
- version(
- "1.12.1",
- sha256="79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca",
- preferred=True,
- )
- version(
- "1.12.0",
- sha256="a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a",
- preferred=True,
- )
- version(
- "1.10.11",
- sha256="341684c5c0976b8c7e6951735a400275a90693604464cac73e9f323c696fc79c",
- preferred=True,
- )
- version(
- "1.10.10",
- sha256="a6877ab7bd5d769d2d68618fdb54beb50263dcc2a8c157fe7e2186925cdb02db",
- preferred=True,
- )
- version(
- "1.10.9",
- sha256="f5b77f59b705a755a5a223372d0222c7bc408fe8db6fa8d9d7ecf8bce291b8dd",
- preferred=True,
- )
- version(
- "1.10.8",
- sha256="d341b80d380dd763753a0ebe22915e11e87aac4e44a084a850646ff934d19c80",
- preferred=True,
- )
- version(
- "1.10.7",
- sha256="7a1a0a54371275ce2dfc5cd093775bb025c365846512961e7e5ceaecb437ef15",
- preferred=True,
- )
- version(
- "1.10.6",
- sha256="5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa",
- preferred=True,
- )
- version(
- "1.10.5",
- sha256="6d4ce8bf902a97b050f6f491f4268634e252a63dadd6656a1a9be5b7b7726fa8",
- preferred=True,
- )
- version(
- "1.10.4",
- sha256="8f60dc4dd6ab5fcd23c750d1dc5bca3d0453bdce5c8cdaf0a4a61a9d1122adb2",
- preferred=True,
- )
- version(
- "1.10.3",
- sha256="b600d7c914cfa80ae127cd1a1539981213fee9994ac22ebec9e3845e951d9b39",
- preferred=True,
- )
- version(
- "1.10.2",
- sha256="bfec1be8c366965a99812cf02ddc97e4b708c1754fccba5414d4adccdc073866",
- preferred=True,
- )
- version(
- "1.10.1",
- sha256="048a9d149fb99aaa1680a712963f5a78e9c43b588d0e79d55e06760ec377c172",
- preferred=True,
- )
- version(
- "1.10.0-patch1",
- sha256="6e78cfe32a10e6e0629393cdfddf6cfa536571efdaf85f08e35326e1b4e9eff0",
- preferred=True,
- )
- version(
- "1.10.0",
- sha256="81f6201aba5c30dced5dcd62f5d5477a2790fd5850e02ac514ca8bf3e2bb375a",
- preferred=True,
- )
- version(
- "1.8.23",
- sha256="37fa4eb6cd0e181eb49a10d54611cb00700e9537f805d03e6853503afe5abc27",
- preferred=True,
- )
- version(
- "1.8.22",
- sha256="8406d96d9355ef8961d2739fb8fd5474ad4cdf52f3cfac657733defd9709bfaa",
- preferred=True,
- )
- version(
- "1.8.21",
- sha256="87d8c82eba5cf766d97cd06c054f4639c1049c4adeaa3a79f77f8bd374f80f37",
- preferred=True,
- )
- version(
- "1.8.19",
- sha256="a4335849f19fae88c264fd0df046bc321a78c536b2548fc508627a790564dc38",
- preferred=True,
- )
- version(
- "1.8.18",
- sha256="cdb195ad8d9e6782acf24b2488061289f615628c2ccda8457b0a0c3fb7a8a063",
- preferred=True,
- )
- version(
- "1.8.17",
- sha256="d9cda297ee76ade9881c4208987939250d397bae6252d0ccb66fa7d24d67e263",
- preferred=True,
- )
- version(
- "1.8.16",
- sha256="ed17178abd9928a7237f30370189ba767b9e39e0db45917c2ac4665eb9cb4771",
- preferred=True,
- )
- version(
- "1.8.15",
- sha256="4e963216b7d32469596bc1321a8c3f6e0c278dcbbdb7be6414c63c081b34c275",
- preferred=True,
- )
- version(
- "1.8.14",
- sha256="1dbefeeef7f591897c632b2b090db96bb8d35ad035beaa36bc39cb2bc67e0639",
- preferred=True,
- )
- version(
- "1.8.13",
- sha256="82f6b38eec103b4fccfbf14892786e0c27a8135d3252d8601cf5bf20066d38c1",
- preferred=True,
- )
- version(
- "1.8.12",
- sha256="b5cccea850096962b5fd9e96f22c4f47d2379224bb41130d9bc038bb6c37dfcb",
- preferred=True,
- )
- version(
- "1.8.10",
- sha256="4813b79c5fb8701a625b9924b8203bc7154a77f9b826ad4e034144b4056a160a",
- preferred=True,
- )
+ url="https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_0/downloads/hdf5-1.14.0.tar.gz",
+ )
+ version("1.12.3", sha256="c15adf34647918dd48150ea1bd9dffd3b32a3aec5298991d56048cc3d39b4f6f")
+ version("1.12.2", sha256="2a89af03d56ce7502dcae18232c241281ad1773561ec00c0f0e8ee2463910f14")
+ version("1.12.1", sha256="79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca")
+ version("1.12.0", sha256="a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a")
+ version("1.10.11", sha256="341684c5c0976b8c7e6951735a400275a90693604464cac73e9f323c696fc79c")
+ version("1.10.10", sha256="a6877ab7bd5d769d2d68618fdb54beb50263dcc2a8c157fe7e2186925cdb02db")
+ version("1.10.9", sha256="f5b77f59b705a755a5a223372d0222c7bc408fe8db6fa8d9d7ecf8bce291b8dd")
+ version("1.10.8", sha256="d341b80d380dd763753a0ebe22915e11e87aac4e44a084a850646ff934d19c80")
+ version("1.10.7", sha256="7a1a0a54371275ce2dfc5cd093775bb025c365846512961e7e5ceaecb437ef15")
+ version("1.10.6", sha256="5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa")
+ version("1.10.5", sha256="6d4ce8bf902a97b050f6f491f4268634e252a63dadd6656a1a9be5b7b7726fa8")
+ version("1.10.4", sha256="8f60dc4dd6ab5fcd23c750d1dc5bca3d0453bdce5c8cdaf0a4a61a9d1122adb2")
+ version("1.10.3", sha256="b600d7c914cfa80ae127cd1a1539981213fee9994ac22ebec9e3845e951d9b39")
+ version("1.10.2", sha256="bfec1be8c366965a99812cf02ddc97e4b708c1754fccba5414d4adccdc073866")
+ version("1.10.1", sha256="048a9d149fb99aaa1680a712963f5a78e9c43b588d0e79d55e06760ec377c172")
+ version(
+ "1.10.0-patch1", sha256="6e78cfe32a10e6e0629393cdfddf6cfa536571efdaf85f08e35326e1b4e9eff0"
+ )
+ version("1.10.0", sha256="81f6201aba5c30dced5dcd62f5d5477a2790fd5850e02ac514ca8bf3e2bb375a")
+ version("1.8.23", sha256="37fa4eb6cd0e181eb49a10d54611cb00700e9537f805d03e6853503afe5abc27")
+ version("1.8.22", sha256="8406d96d9355ef8961d2739fb8fd5474ad4cdf52f3cfac657733defd9709bfaa")
+ version("1.8.21", sha256="87d8c82eba5cf766d97cd06c054f4639c1049c4adeaa3a79f77f8bd374f80f37")
+ version("1.8.19", sha256="a4335849f19fae88c264fd0df046bc321a78c536b2548fc508627a790564dc38")
+ version("1.8.18", sha256="cdb195ad8d9e6782acf24b2488061289f615628c2ccda8457b0a0c3fb7a8a063")
+ version("1.8.17", sha256="d9cda297ee76ade9881c4208987939250d397bae6252d0ccb66fa7d24d67e263")
+ version("1.8.16", sha256="ed17178abd9928a7237f30370189ba767b9e39e0db45917c2ac4665eb9cb4771")
+ version("1.8.15", sha256="4e963216b7d32469596bc1321a8c3f6e0c278dcbbdb7be6414c63c081b34c275")
+ version("1.8.14", sha256="1dbefeeef7f591897c632b2b090db96bb8d35ad035beaa36bc39cb2bc67e0639")
+ version("1.8.13", sha256="82f6b38eec103b4fccfbf14892786e0c27a8135d3252d8601cf5bf20066d38c1")
+ version("1.8.12", sha256="b5cccea850096962b5fd9e96f22c4f47d2379224bb41130d9bc038bb6c37dfcb")
+ version("1.8.10", sha256="4813b79c5fb8701a625b9924b8203bc7154a77f9b826ad4e034144b4056a160a")
variant("shared", default=True, description="Builds a shared version of the library")
variant("hl", default=False, description="Enable the high-level library")
variant("cxx", default=False, description="Enable C++ support")
variant("map", when="@1.14:", default=False, description="Enable MAP API support")
- variant("subfiling", when="@1.14:", default=False, description="Enable Subfiling VFD support")
+ variant(
+ "subfiling", when="@1.14: +mpi", default=False, description="Enable Subfiling VFD support"
+ )
variant("fortran", default=False, description="Enable Fortran support")
variant("java", when="@1.10:", default=False, description="Enable Java support")
variant("threadsafe", default=False, description="Enable thread-safe capabilities")
@@ -228,14 +136,23 @@ class Hdf5(CMakePackage):
depends_on("cmake@3.12:", type="build")
depends_on("cmake@3.18:", type="build", when="@1.13:")
- depends_on("mpi", when="+mpi")
+ with when("+mpi"):
+ depends_on("mpi")
+ depends_on("mpich+fortran", when="+fortran ^[virtuals=mpi] mpich")
+
depends_on("java", type=("build", "run"), when="+java")
depends_on("szip", when="+szip")
+
depends_on("zlib-api")
+ # See https://github.com/HDFGroup/hdf5/pull/4147
+ depends_on(
+ "zlib-ng~new_strategies",
+ when="@:1.14.3,develop-1.8:develop-1.12 ^[virtuals=zlib-api] zlib-ng",
+ )
# The compiler wrappers (h5cc, h5fc, etc.) run 'pkg-config'.
# Skip this on Windows since pkgconfig is autotools
- for plat in ["cray", "darwin", "linux"]:
+ for plat in ["darwin", "linux"]:
depends_on("pkgconfig", when=f"platform={plat}", type="run")
conflicts("+mpi", "^mpich@4.0:4.0.3")
@@ -272,6 +189,12 @@ class Hdf5(CMakePackage):
"+fortran", when="@1.13.3:^cmake@:3.22", msg="cmake_minimum_required is not set correctly."
)
+ # HDF5 searches for zlib CMake config files before it falls back to
+ # FindZLIB.cmake. We don't build zlib with CMake by default, so have to
+ # delete the first search, otherwise it may find a system zlib. See
+ # https://github.com/HDFGroup/hdf5/issues/4904
+ patch("find_package_zlib.patch", when="@1.8.16:1.14.4")
+
# There are several officially unsupported combinations of the features:
# 1. Thread safety is not guaranteed via high-level C-API but in some cases
# it works.
@@ -289,6 +212,15 @@ class Hdf5(CMakePackage):
# described in #2 we allow for such combination.
# conflicts('+mpi+cxx')
+ # Patch needed for HDF5 1.14.3 to fix signaling FPE checks from triggering
+ # at dynamic type system initialization. The type system's builtin types
+ # were refactored in 1.14.3 and switched from compile-time to run-time
+ # initialization. This patch suppresses floating point exception checks
+ # that would otherwise be triggered by this code. Later HDF5 versions
+ # will include the patch code changes.
+ # See https://github.com/HDFGroup/hdf5/pull/3837
+ patch("hdf5_1_14_3_fpe.patch", when="@1.14.3")
+
# There are known build failures with intel@18.0.1. This issue is
# discussed and patch is provided at
# https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/747951.
@@ -380,22 +312,14 @@ class Hdf5(CMakePackage):
# compiler wrappers and do not need to be changed.
# These do not exist on Windows.
# Enable only for supported target platforms.
- for spack_spec_target_platform in ["linux", "darwin", "cray"]:
+
+ if sys.platform != "win32":
filter_compiler_wrappers(
- "h5cc",
- "h5hlcc",
- "h5fc",
- "h5hlfc",
- "h5c++",
- "h5hlc++",
- relative_root="bin",
- when=f"platform={spack_spec_target_platform}",
+ "h5cc", "h5hlcc", "h5fc", "h5hlfc", "h5c++", "h5hlc++", relative_root="bin"
)
def url_for_version(self, version):
- url = (
- "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{0}/hdf5-{1}/src/hdf5-{1}.tar.gz"
- )
+ url = "https://support.hdfgroup.org/archive/support/ftp/HDF5/releases/hdf5-{0}/hdf5-{1}/src/hdf5-{1}.tar.gz"
return url.format(version.up_to(2), version)
def flag_handler(self, name, flags):
@@ -403,7 +327,12 @@ class Hdf5(CMakePackage):
cmake_flags = []
if name == "cflags":
- if spec.compiler.name in ["gcc", "clang", "apple-clang", "oneapi"]:
+ if (
+ spec.satisfies("%gcc")
+ or spec.satisfies("%clang")
+ or spec.satisfies("%apple-clang")
+ or spec.satisfies("%oneapi")
+ ):
# Quiet warnings/errors about implicit declaration of functions
# in C99:
cmake_flags.append("-Wno-error=implicit-function-declaration")
@@ -427,7 +356,7 @@ class Hdf5(CMakePackage):
if spec.satisfies("@:1.8.12+fortran~shared"):
cmake_flags.append(self.compiler.fc_pic_flag)
elif name == "ldlibs":
- if "+fortran %fj" in spec:
+ if spec.satisfies("+fortran %fj"):
cmake_flags.extend(["-lfj90i", "-lfj90f", "-lfjsrcinfo", "-lelf"])
return flags, None, (cmake_flags or None)
@@ -445,7 +374,7 @@ class Hdf5(CMakePackage):
"""
query_parameters = self.spec.last_query.extra_parameters
- shared = "+shared" in self.spec
+ shared = self.spec.satisfies("+shared")
# This map contains a translation from query_parameters
# to the libraries needed
@@ -586,7 +515,7 @@ class Hdf5(CMakePackage):
@run_before("cmake")
def fortran_check(self):
- if "+fortran" in self.spec and not self.compiler.fc:
+ if self.spec.satisfies("+fortran") and not self.compiler.fc:
msg = "cannot build a Fortran variant without a Fortran compiler"
raise RuntimeError(msg)
@@ -633,7 +562,7 @@ class Hdf5(CMakePackage):
# MSMPI does not provide compiler wrappers
# and pointing these variables at the MSVC compilers
# breaks CMake's mpi detection for MSMPI.
- if "+mpi" in spec and "msmpi" not in spec:
+ if spec.satisfies("+mpi") and "msmpi" not in spec:
args.extend(
[
"-DMPI_CXX_COMPILER:PATH=%s" % spec["mpi"].mpicxx,
@@ -641,13 +570,17 @@ class Hdf5(CMakePackage):
]
)
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
args.extend(["-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc])
# work-around for https://github.com/HDFGroup/hdf5/issues/1320
if spec.satisfies("@1.10.8,1.13.0"):
args.append(self.define("HDF5_INSTALL_CMAKE_DIR", "share/cmake/hdf5"))
+ # AOCC does not support _Float16
+ if spec.satisfies("@1.14.4: %aocc"):
+ args.append(self.define("HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16", False))
+
return args
@run_after("install")
@@ -671,7 +604,7 @@ class Hdf5(CMakePackage):
# 1.10.6 and 1.12.0. The current develop versions do not produce 'h5pfc'
# at all. Here, we make sure that 'h5pfc' is available when Fortran and
# MPI support are enabled (only for versions that generate 'h5fc').
- if self.spec.satisfies("@1.8.22:1.8," "1.10.6:1.10.9," "1.12.0:1.12" "+fortran+mpi"):
+ if self.spec.satisfies("@1.8.22:1.8," "1.10.6:1.10.9," "1.12.0:1.12.2" "+fortran+mpi"):
with working_dir(self.prefix.bin):
# No try/except here, fix the condition above instead:
symlink("h5fc", "h5pfc")
@@ -719,13 +652,43 @@ class Hdf5(CMakePackage):
def link_debug_libs(self):
# When build_type is Debug, the hdf5 build appends _debug to all library names.
# Dependents of hdf5 (netcdf-c etc.) can't handle those, thus make symlinks.
- if "build_type=Debug" in self.spec:
+ if self.spec.satisfies("build_type=Debug"):
libs = find(self.prefix.lib, "libhdf5*_debug.*", recursive=False)
with working_dir(self.prefix.lib):
for lib in libs:
libname = os.path.split(lib)[1]
os.symlink(libname, libname.replace("_debug", ""))
+ @run_after("install")
+ def symlink_to_h5hl_wrappers(self):
+ if self.spec.satisfies("+hl"):
+ with working_dir(self.prefix.bin):
+ # CMake's FindHDF5 relies only on h5cc so it doesn't find the HL
+ # component unless it uses h5hlcc so we symlink h5cc to h5hlcc etc
+ symlink_files = {"h5cc": "h5hlcc", "h5c++": "h5hlc++"}
+ for old, new in symlink_files.items():
+ if os.path.isfile(old):
+ os.remove(old)
+ symlink(new, old)
+
+ @run_after("install")
+ def symlink_mpi_libs(self):
+ """Compatibility layer to support projects looking for the MPI suffix"""
+ if not self.spec.satisfies("+mpi"):
+ return
+
+ mpi_libs = ["libhdf5{mpi_suffix}", "libhdf5{mpi_suffix}_hl"]
+ for lib_f in mpi_libs:
+ src_name = lib_f.format(mpi_suffix="")
+ dst_name = lib_f.format(mpi_suffix="_mpi")
+ libs = find_libraries(src_name, root=self.prefix, recursive=True)
+ for lib_path in libs:
+ prefix = os.path.dirname(lib_path)
+ src_lib = os.path.basename(lib_path)
+ dst_lib = dst_name.join(src_lib.rsplit(src_name, 1))
+ with working_dir(prefix):
+ symlink(src_lib, dst_lib)
+
@property
@llnl.util.lang.memoized
def _output_version(self):
diff --git a/var/spack/repos/builtin/packages/heaptrack/package.py b/var/spack/repos/builtin/packages/heaptrack/package.py
index e246895943..305bd28977 100644
--- a/var/spack/repos/builtin/packages/heaptrack/package.py
+++ b/var/spack/repos/builtin/packages/heaptrack/package.py
@@ -18,6 +18,9 @@ class Heaptrack(CMakePackage):
version("1.3.0", sha256="794b067772f4e4219bb7b6ff1bc1b2134b1b242e748a2cc5c47626040c631956")
version("1.1.0", sha256="bd247ac67d1ecf023ec7e2a2888764bfc03e2f8b24876928ca6aa0cdb3a07309")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.41: +program_options+exception+filesystem+system+iostreams+container")
depends_on("cmake@2.8.9:", type="build")
depends_on("elfutils")
diff --git a/var/spack/repos/builtin/packages/heasoft/package.py b/var/spack/repos/builtin/packages/heasoft/package.py
index 76073a2e3b..72db8410e6 100644
--- a/var/spack/repos/builtin/packages/heasoft/package.py
+++ b/var/spack/repos/builtin/packages/heasoft/package.py
@@ -29,6 +29,10 @@ class Heasoft(AutotoolsPackage):
version("6.30", sha256="7f828f6050809653319f94d715c1b6815fbc09adfdcb61f2f0f1d7a6af10684a")
version("6.29", sha256="534fec04baa2586326fd7240805f2606620f3b7d7078a80fdd95c9c1177c9e68")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("X", default=True, description="Enable X11 support")
depends_on("zlib-api")
@@ -89,7 +93,7 @@ class Heasoft(AutotoolsPackage):
join_path("tcltk", "BUILD_DIR", "hd_config_info"),
)
- if "+X" in self.spec:
+ if self.spec.satisfies("+X"):
filter_file(
r"(\s+XDIR => ).*",
r"\1'{0}',".format(self.spec["libx11"].libs.directories[0]),
@@ -105,7 +109,7 @@ class Heasoft(AutotoolsPackage):
config_args += self.enable_or_disable("x", variant="X")
- if "+X" in self.spec:
+ if self.spec.satisfies("+X"):
config_args.extend(
[
"--x-includes={0}".format(self.spec["libx11"].headers.directories[0]),
diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py
index 228e813973..fd6d9ed5b4 100644
--- a/var/spack/repos/builtin/packages/heffte/package.py
+++ b/var/spack/repos/builtin/packages/heffte/package.py
@@ -21,6 +21,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("develop", branch="master")
+ version("2.4.1", sha256="de2cf26df5d61baac7841525db3f393cb007f79612ac7534fd4757f154ba3e6c")
version("2.4.0", sha256="02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d")
version("2.3.0", sha256="63db8c9a8822211d23e29f7adf5aa88bb462c91d7a18c296c3ef3a06be8d6171")
version("2.2.0", sha256="332346d5c1d1032288d09839134c79e4a9704e213a2d53051e96c3c414c74df0")
@@ -31,6 +32,10 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("cmake-magma-v230.patch", when="@2.3.0")
patch("fortran200.patch", when="@2.0.0")
@@ -64,7 +69,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
depends_on("mpi", type=("build", "run"))
depends_on("fftw@3.3.8:", when="+fftw", type=("build", "run"))
- depends_on("intel-mkl@2018.0.128:", when="+mkl", type=("build", "run"))
+ depends_on("intel-oneapi-mkl", when="+mkl", type=("build", "run"))
depends_on("cuda@8.0:", when="+cuda", type=("build", "run"))
depends_on("hip@3.8.0:", when="+rocm", type=("build", "run"))
depends_on("rocfft@3.8.0:", when="+rocm", type=("build", "run"))
@@ -96,7 +101,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("Heffte_ENABLE_PYTHON", "python"),
]
- if "+cuda" in self.spec and self.spec.satisfies("@:2.3.0"):
+ if self.spec.satisfies("+cuda") and self.spec.satisfies("@:2.3.0"):
cuda_arch = self.spec.variants["cuda_arch"].value
if len(cuda_arch) > 0 or cuda_arch[0] != "none":
nvcc_flags = ""
@@ -107,14 +112,14 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
archs = ";".join(cuda_arch)
args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % archs)
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
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)))
- # See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/322
+ # See https://github.com/ROCm/rocFFT/issues/322
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
@@ -125,7 +130,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
if self.spec.satisfies("@:2.2.0"):
return
install_tree(
- self.prefix.share.heffte.testing, join_path(self.install_test_root, "testing")
+ self.prefix.share.heffte.testing, join_path(install_test_root(self), "testing")
)
def test_make_test(self):
@@ -138,8 +143,13 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
cmake_dir = self.test_suite.current_test_cache_dir.testing
options = [cmake_dir]
- options.append(self.define("Heffte_DIR", self.spec.prefix.lib.cmake.Heffte))
- if "+rocm" in self.spec:
+ # changing the default install path search to newer cmake convention
+ if self.spec.satisfies("@2.4.1:"):
+ options.append(self.define("Heffte_ROOT", self.spec.prefix))
+ else:
+ options.append(self.define("Heffte_DIR", self.spec.prefix.lib.cmake.Heffte))
+
+ if self.spec.satisfies("+rocm"):
# path name is 'hsa-runtime64' but python cannot have '-' in variable name
hsa_runtime = join_path(self.spec["hsa-rocr-dev"].prefix.lib.cmake, "hsa-runtime64")
options.extend(
diff --git a/var/spack/repos/builtin/packages/heimdall/package.py b/var/spack/repos/builtin/packages/heimdall/package.py
new file mode 100644
index 0000000000..dce08369e4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/heimdall/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Heimdall(AutotoolsPackage, CudaPackage):
+ """GPU accelerated transient detection pipeline"""
+
+ homepage = "https://sourceforge.net/projects/heimdall-astro/"
+ git = "https://git.code.sf.net/p/heimdall-astro/code"
+
+ maintainers("aweaver1fandm")
+
+ version("master", branch="master", preferred=True)
+
+ depends_on("cxx", type="build") # generated
+
+ conflicts("~cuda", msg="You must specify +cuda")
+ conflicts("cuda@11.8")
+ conflicts("cuda_arch=none", msg="You must specify the CUDA architecture")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("cuda")
+
+ # Pass the cuda architecture to DEDISP and PSRDADA for building
+ for arch in CudaPackage.cuda_arch_values:
+ depends_on(f"dedisp cuda_arch={arch}", when=f"cuda_arch={arch}")
+
+ depends_on(f"psrdada cuda_arch={arch}", when=f"cuda_arch={arch}")
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.spec["psrdada"].prefix.bin)
+ env.prepend_path("PATH", self.prefix.bin)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["dedisp"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["cuda"].prefix.lib)
+
+ def configure_args(self):
+ # Required flags for configure
+ args = [
+ f"--with-psrdada-dir={self.spec['psrdada'].prefix}",
+ f"--with-dedisp-dir={self.spec['dedisp'].prefix}",
+ f"--with-cuda-dir={self.spec['cuda'].prefix}",
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/helib/package.py b/var/spack/repos/builtin/packages/helib/package.py
index 040b828cca..5129bd1bc3 100644
--- a/var/spack/repos/builtin/packages/helib/package.py
+++ b/var/spack/repos/builtin/packages/helib/package.py
@@ -39,6 +39,9 @@ class Helib(CMakePackage):
version("1.1.0", sha256="77a912ed3c86f8bde31b7d476321d0c2d810570c04a60fa95c4bd32a1955b5cf")
version("1.0.2", sha256="b907eaa8381af3d001d7fb8383273f4c652415b3320c11d5be2ad8f19757c998")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=False, description="Build shared library.")
depends_on("gmp@6.2.1:")
depends_on("ntl@11.5.1:")
diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py
index 90c82bbb54..072e746c86 100644
--- a/var/spack/repos/builtin/packages/helics/package.py
+++ b/var/spack/repos/builtin/packages/helics/package.py
@@ -23,6 +23,10 @@ class Helics(CMakePackage):
version("develop", branch="develop", submodules=True)
version("main", branch="main", submodules=True)
version("master", branch="main", submodules=True)
+ version("3.5.3", sha256="f9ace240510b18caf642f55d08f9009a9babb203fbc032ec7d7d8aa6fd5e1553")
+ version("3.5.2", sha256="c2604694698a1e33c4a68f3d1c5ab0a228ef2bfca1b0d3bae94801dbd3b11048")
+ version("3.5.1", sha256="546fc6e6a85de6ba841e4bd547b811cc81a67a22be5e212ccb54be139d740555")
+ version("3.5.0", sha256="0c02ebaecf3d4ead7911e13325b26706f1e4b316ca51ec609e969e18ec584b78")
version("3.4.0", sha256="88877a3767de9aed9f1cddea7b6455a2be060a00b959bb7e94994d1fd20878f8")
version("3.3.2", sha256="b04013969fc02dc36c697c328e6f50a0ac8dbdaf3d3e69870cd6e6ebeb374286")
version("3.3.1", sha256="0f6357e6781157515230d14033afc8769a02971a1870909e5697415e1db2e03f")
@@ -46,6 +50,9 @@ class Helics(CMakePackage):
version("2.4.2", sha256="957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb")
version("2.4.1", sha256="ac077e9efe466881ea366721cb31fb37ea0e72a881a717323ba4f3cdda338be4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("apps", default=True, description="Install the HELICS apps executables")
variant("apps_lib", default=True, description="Install the HELICS apps library")
variant("benchmarks", default=False, description="Install the HELICS benchmarks")
@@ -135,7 +142,9 @@ class Helics(CMakePackage):
# HELICS shared library options
args.append(
- "-DHELICS_DISABLE_C_SHARED_LIB={0}".format("OFF" if "+c_shared" in spec else "ON")
+ "-DHELICS_DISABLE_C_SHARED_LIB={0}".format(
+ "OFF" if spec.satisfies("+c_shared") else "ON"
+ )
)
args.append(from_variant("HELICS_BUILD_CXX_SHARED_LIB", "cxx_shared"))
@@ -143,13 +152,17 @@ class Helics(CMakePackage):
args.append(from_variant("HELICS_BUILD_APP_EXECUTABLES", "apps"))
args.append(from_variant("HELICS_BUILD_APP_LIBRARY", "apps_lib"))
args.append(
- "-DHELICS_DISABLE_WEBSERVER={0}".format("OFF" if "+webserver" in spec else "ON")
+ "-DHELICS_DISABLE_WEBSERVER={0}".format(
+ "OFF" if spec.satisfies("+webserver") else "ON"
+ )
)
args.append(from_variant("HELICS_BUILD_BENCHMARKS", "benchmarks"))
# Extra HELICS library dependencies
- args.append("-DHELICS_DISABLE_BOOST={0}".format("OFF" if "+boost" in spec else "ON"))
- args.append("-DHELICS_DISABLE_ASIO={0}".format("OFF" if "+asio" in spec else "ON"))
+ args.append(
+ "-DHELICS_DISABLE_BOOST={0}".format("OFF" if spec.satisfies("+boost") else "ON")
+ )
+ args.append("-DHELICS_DISABLE_ASIO={0}".format("OFF" if spec.satisfies("+asio") else "ON"))
# Encryption
args.append(from_variant("HELICS_ENABLE_ENCRYPTION", "encryption"))
@@ -162,9 +175,14 @@ class Helics(CMakePackage):
# Python interface was removed from the main HELICS build in v3
args.append(from_variant("BUILD_PYTHON_INTERFACE", "python"))
+ # GCC >=13
+ if spec.satisfies("%gcc@13:"):
+ # C++20 required when building with GCC>=13
+ args.append("-DCMAKE_CXX_STANDARD=20")
+
return args
def setup_run_environment(self, env):
spec = self.spec
- if "+python" in spec:
+ if spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", self.prefix.python)
diff --git a/var/spack/repos/builtin/packages/help2man/package.py b/var/spack/repos/builtin/packages/help2man/package.py
index f5b41627f9..3688260cb1 100644
--- a/var/spack/repos/builtin/packages/help2man/package.py
+++ b/var/spack/repos/builtin/packages/help2man/package.py
@@ -21,4 +21,6 @@ class Help2man(AutotoolsPackage, GNUMirrorPackage):
version("1.47.8", sha256="528f6a81ad34cbc76aa7dce5a82f8b3d2078ef065271ab81fda033842018a8dc")
version("1.47.4", sha256="d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753")
+ depends_on("c", type="build") # generated
+
depends_on("perl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/henson/package.py b/var/spack/repos/builtin/packages/henson/package.py
index b347adc120..4b7eb9bb63 100644
--- a/var/spack/repos/builtin/packages/henson/package.py
+++ b/var/spack/repos/builtin/packages/henson/package.py
@@ -16,6 +16,9 @@ class Henson(CMakePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("mrzv")
depends_on("mpi")
@@ -32,13 +35,8 @@ class Henson(CMakePackage):
conflicts("^openmpi", when="+mpi-wrappers")
def cmake_args(self):
- args = [
+ return [
self.define_from_variant("python", "python"),
self.define_from_variant("mpi-wrappers", "mpi-wrappers"),
self.define_from_variant("use_boost", "boost"),
]
-
- if self.spec.satisfies("+python"):
- args += [self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path)]
-
- return args
diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py
index a1194a7938..161220d854 100644
--- a/var/spack/repos/builtin/packages/hepmc/package.py
+++ b/var/spack/repos/builtin/packages/hepmc/package.py
@@ -26,6 +26,9 @@ class Hepmc(CMakePackage):
version("2.06.06", sha256="8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125")
version("2.06.05", sha256="4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("length", default="MM", values=("CM", "MM"), multi=False, description="Unit of length")
variant(
"momentum",
diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py
index ab4c50a169..03da34d3f8 100644
--- a/var/spack/repos/builtin/packages/hepmc3/package.py
+++ b/var/spack/repos/builtin/packages/hepmc3/package.py
@@ -16,10 +16,12 @@ class Hepmc3(CMakePackage):
tags = ["hep"]
- maintainers("vvolkl")
+ maintainers("vvolkl", "luketpickering")
license("LGPL-3.0-or-later")
+ version("3.3.0", sha256="6f876091edcf7ee6d0c0db04e080056e89efc1a61abe62355d97ce8e735769d6")
+ version("3.2.7", sha256="587faa6556cc54ccd89ad35421461b4761d7809bc17a2e72f5034daea142232b")
version("3.2.6", sha256="248f3b5b36dd773844cbe73d51f60891458334b986b259754c59dbf4bbf1d525")
version("3.2.5", sha256="cd0f75c80f75549c59cc2a829ece7601c77de97cb2a5ab75790cac8e1d585032")
version("3.2.4", sha256="e088fccfd1a6c2f8e1089f457101bee1e5c7a9777e9d51c6419c8a288a49e1bb")
@@ -30,6 +32,10 @@ class Hepmc3(CMakePackage):
version("3.1.2", sha256="4133074b3928252877982f3d4b4c6c750bb7a324eb6c7bb2afc6fa256da3ecc7")
version("3.1.1", sha256="2fcbc9964d6f9f7776289d65f9c73033f85c15bf5f0df00c429a6a1d8b8248bb")
version("3.1.0", sha256="cd37eed619d58369041018b8627274ad790020a4714b54ac05ad1ebc1a6e7f8a")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# note that version 3.0.0 is not supported
# conflicts with cmake configuration
@@ -43,25 +49,31 @@ class Hepmc3(CMakePackage):
)
depends_on("cmake@2.8.9:", type="build")
- depends_on("root", when="+rootio")
+ with when("+rootio"):
+ depends_on("root")
+ depends_on("root cxxstd=11", when="@:3.2.3")
depends_on("protobuf", when="+protobuf")
depends_on("python", when="+python")
conflicts("%gcc@9.3.0", when="@:3.1.1")
patch("ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch", when="@3.1.2:3.2.1 %gcc@9.3.0")
+ @property
+ def libs(self):
+ return find_libraries(["libHepMC3", "libHepMC3Search"], root=self.prefix, recursive=True)
+
def cmake_args(self):
spec = self.spec
from_variant = self.define_from_variant
args = [
- from_variant("HEPMC3_ENABLE_PROTOBUF", "protobuf"),
+ from_variant("HEPMC3_ENABLE_PROTOBUFIO", "protobuf"),
from_variant("HEPMC3_ENABLE_PYTHON", "python"),
from_variant("HEPMC3_ENABLE_ROOTIO", "rootio"),
from_variant("HEPMC3_INSTALL_INTERFACES", "interfaces"),
self.define("HEPMC3_ENABLE_TEST", self.run_tests),
]
- if "+python" in spec:
+ if spec.satisfies("+python"):
py_ver = spec["python"].version.up_to(2)
args.extend(
[
@@ -70,7 +82,13 @@ class Hepmc3(CMakePackage):
]
)
- if "+rootio" in spec:
+ if spec.satisfies("+rootio"):
args.append(self.define("ROOT_DIR", spec["root"].prefix))
+ if spec.satisfies("@3.2.4:3.2"):
+ args.append(
+ self.define("HEPMC3_CXX_STANDARD", spec["root"].variants["cxxstd"].value)
+ )
+ elif spec.satisfies("+protobuf"):
+ args.append(self.define("HEPMC3_CXX_STANDARD", "14"))
return args
diff --git a/var/spack/repos/builtin/packages/hepmcanalysis/package.py b/var/spack/repos/builtin/packages/hepmcanalysis/package.py
index 2b66581b9c..e23a30323b 100644
--- a/var/spack/repos/builtin/packages/hepmcanalysis/package.py
+++ b/var/spack/repos/builtin/packages/hepmcanalysis/package.py
@@ -15,6 +15,9 @@ class Hepmcanalysis(MakefilePackage):
version("3.4.13", sha256="be9937c6de493a5671258919493b0caa0cecca77853a2075f5cecce1071e0029")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
tags = ["hep"]
depends_on("hepmc")
diff --git a/var/spack/repos/builtin/packages/heppdt/package.py b/var/spack/repos/builtin/packages/heppdt/package.py
index 5f066f44d3..fe7164905f 100644
--- a/var/spack/repos/builtin/packages/heppdt/package.py
+++ b/var/spack/repos/builtin/packages/heppdt/package.py
@@ -28,3 +28,6 @@ class Heppdt(AutotoolsPackage):
sha256="12a1b6ffdd626603fa3b4d70f44f6e95a36f8f3b6d4fd614bac14880467a2c2e",
preferred=True,
)
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/hermes-shm/package.py b/var/spack/repos/builtin/packages/hermes-shm/package.py
new file mode 100644
index 0000000000..f141db123f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hermes-shm/package.py
@@ -0,0 +1,87 @@
+# Copyright 2013-2024 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.package import *
+
+
+class HermesShm(CMakePackage):
+ """Hermes Shared Memory contains a variety of data structures
+ and synchronization primitives which are compatible with shared memory.
+ """
+
+ homepage = "https://github.com/grc-iit/hermes-shm/wiki"
+ git = "https://github.com/grc-iit/hermes-shm.git"
+
+ maintainers("lukemartinlogan", "hyoklee")
+
+ version("master", branch="master")
+ version(
+ "1.1.0",
+ url="https://github.com/grc-iit/hermes-shm/archive/refs/tags/v1.1.0.tar.gz",
+ sha256="2270d629373447a2872d7109b5a5e66027dc8d8178d3ba84eb48a875f49b6bdf",
+ )
+ version(
+ "1.0.0",
+ url="https://github.com/lukemartinlogan/hermes_shm/archive/refs/tags/v1.0.0.tar.gz",
+ sha256="a79f01d531ce89985ad59a2f62b41d74c2385e48d929e2f4ad895ae34137573b",
+ )
+
+ # Main variants
+ variant("mochi", default=True, description="Build with mochi-thallium support")
+ variant("cereal", default=True, description="Build with cereal support")
+ variant("boost", default=True, description="Build with boost support")
+ variant("mpiio", default=True, description="Build with MPI support")
+ variant("vfd", default=False, description="Build with HDF5 support")
+ variant("zmq", default=False, description="Build ZeroMQ tests")
+ variant("adios", default=False, description="Build Adios support")
+
+ # Required deps
+ depends_on("pkgconfig", type="build")
+ depends_on("catch2@3.0.1")
+ depends_on("yaml-cpp")
+ depends_on("doxygen@1.9.3:", type="build")
+ depends_on("libelf")
+
+ # Machine variants
+ variant("ares", default=False, description="Build in ares")
+ depends_on("libfabric fabrics=sockets,tcp,udp,verbs,mlx,rxm,rxd,shm", when="+ares")
+
+ # Main dependencies
+ depends_on("mochi-thallium+cereal@0.10.1", when="+mochi")
+ depends_on("cereal", when="+cereal")
+ depends_on(
+ "boost@1.7: +context +fiber +coroutine +regex +system \
+ +filesystem +serialization +pic +math",
+ when="+boost",
+ )
+ depends_on("mpi", when="+mpiio")
+ depends_on("hdf5@1.14.0", when="+vfd")
+ depends_on("libzmq", "+zmq")
+ depends_on("adios2", when="+adios")
+
+ # Compress variant
+ variant("compress", default=False, description="Build with compression support")
+ with when("+compress"):
+ depends_on("lzo")
+ depends_on("bzip2")
+ depends_on("zstd")
+ depends_on("lz4")
+ depends_on("zlib")
+ depends_on("xz")
+ depends_on("brotli")
+ depends_on("snappy")
+ depends_on("c-blosc2")
+
+ # Encryption variant
+ variant("encrypt", default=False, description="Build with encryption support")
+ depends_on("openssl", when="+encrypt")
+
+ def cmake_args(self):
+ return [
+ self.define_from_variant("HERMES_ENABLE_VFD", "vfd"),
+ self.define_from_variant("HERMES_ENABLE_COMPRESSION", "compress"),
+ self.define_from_variant("HERMES_ENABLE_ENCRYPTION", "encrypt"),
+ self.define_from_variant("HERMES_RPC_THALLIUM", "mochi"),
+ self.define_from_variant("HERMES_ENABLE_ZMQ_TESTS", "zmq"),
+ ]
diff --git a/var/spack/repos/builtin/packages/hermes/package.py b/var/spack/repos/builtin/packages/hermes/package.py
index ef33ea207b..fa04336fc6 100644
--- a/var/spack/repos/builtin/packages/hermes/package.py
+++ b/var/spack/repos/builtin/packages/hermes/package.py
@@ -11,35 +11,102 @@ class Hermes(CMakePackage):
I/O buffering system that aims to significantly accelerate I/O performance.
"""
- homepage = "http://www.cs.iit.edu/~scs/assets/projects/Hermes/Hermes.html"
+ homepage = "https://grc.iit.edu/research/projects/hermes"
git = "https://github.com/HDFGroup/hermes.git"
- maintainers("hyoklee")
+ maintainers("lukemartinlogan", "hyoklee")
- license("GPL-2.0-only")
+ version("master", branch="master", submodules=True)
- version("master", branch="master")
+ version(
+ "1.2.1",
+ url="https://github.com/HDFGroup/hermes/archive/refs/tags/v1.2.1.tar.gz",
+ sha256="d60ee5d6856dc1a1f389fb08f61252cc7736d1c38d3049043749640897fe3b6d",
+ )
version(
"0.9.0-beta",
url="https://github.com/HDFGroup/hermes/archive/refs/tags/v0.9.0-beta.tar.gz",
sha256="abf258a52fa79729dfeb28559957abf8945f3ad37cadefb3bc685227c5f057a8",
)
+ variant("adios", default=False, description="Build Adios tests")
+ variant("ares", default=False, description="Enable full libfabric install")
+ variant("compress", default=False, description="Enable compression")
+ variant("encrypt", default=False, description="Enable encryption")
+ variant("mpiio", default=True, description="Enable MPI I/O adapter")
+ # Builds with hermes@master. 1.2.1, we'd need to extract pybind11 source in external/pybind11:
+ variant("python", default=False, description="Build Python Wrapper", when="@master")
+ variant("stdio", default=True, description="Enable STDIO adapter")
variant("vfd", default=False, description="Enable HDF5 VFD")
+ variant("zmq", default=False, description="Build ZeroMQ tests")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("pkgconfig", type="build")
+ depends_on("libelf")
+
+ depends_on("hermes-shm@master+boost+cereal+mochi")
+
+ depends_on("hermes-shm+adios", when="+adios")
+ depends_on("hermes-shm+ares", when="+ares")
+ depends_on("hermes-shm+compress", when="+compress")
+ depends_on("hermes-shm+encrypt", when="+encrypt")
+ depends_on("hermes-shm+mpiio", when="+mpiio")
+ depends_on("hermes-shm+vfd", when="+vfd")
+ depends_on("hermes-shm+zmq", when="+zmq")
+
+ depends_on("py-jarvis-util", type="test")
- depends_on("mochi-thallium~cereal@0.8:")
- depends_on("catch2")
- depends_on("glpk")
- depends_on("glog@0.4.0:")
- depends_on("mpi")
- depends_on("hdf5@1.14.0:", when="+vfd")
- depends_on("yaml-cpp")
+ depends_on("mpi", when="+mpiio")
+ conflicts("^[virtuals=mpi] nvhpc", when="+mpiio", msg="+mpio does not support nvhpc MPI")
def cmake_args(self):
- args = [
- self.define("HERMES_RPC_THALLIUM", True),
- self.define("HERMES_INSTALL_TESTS", True),
- self.define("BUILD_TESTING", True),
- self.define_from_variant("HERMES_ENABLE_VFD", "vfd"),
- ]
+ args = []
+ if "+mpiio" in self.spec:
+ args.append("-DHERMES_ENABLE_MPIIO_ADAPTER=ON")
+ mpi_name = self.spec["mpi"].name
+ if mpi_name == "openmpi":
+ args.append("-DHERMES_OPENMPI=ON")
+ elif mpi_name == "mpich":
+ args.append("-DHERMES_MPICH=ON")
+ else:
+ raise InstallError("hermes+mpiio needs openmpi or mpich, got " + mpi_name)
+ if "+stdio" in self.spec:
+ args.append("-DHERMES_ENABLE_STDIO_ADAPTER=ON")
+ if "+vfd" in self.spec:
+ args.append("-DHERMES_ENABLE_VFD=ON")
+ if "+compress" in self.spec:
+ args.append(self.define("HERMES_ENABLE_COMPRESSION", "ON"))
+ if "+encrypt" in self.spec:
+ args.append(self.define("HERMES_ENABLE_ENCRYPTION", "ON"))
+ if "+adios" in self.spec:
+ args.append(self.define("HERMES_ENABLE_ADIOS", "ON"))
+ if "+python" in self.spec:
+ args.append(self.define("HERMES_ENABLE_PYTHON", "ON"))
return args
+
+ def set_include(self, env, path):
+ env.append_flags("CFLAGS", "-I{}".format(path))
+ env.append_flags("CXXFLAGS", "-I{}".format(path))
+ env.prepend_path("INCLUDE", "{}".format(path))
+ env.prepend_path("CPATH", "{}".format(path))
+
+ def set_lib(self, env, path):
+ env.prepend_path("LIBRARY_PATH", path)
+ env.prepend_path("LD_LIBRARY_PATH", path)
+ env.append_flags("LDFLAGS", "-L{}".format(path))
+ env.prepend_path("PYTHONPATH", "{}".format(path))
+
+ def set_flags(self, env):
+ self.set_include(env, "{}/include".format(self.prefix))
+ self.set_include(env, "{}/include".format(self.prefix))
+ self.set_lib(env, "{}/lib".format(self.prefix))
+ self.set_lib(env, "{}/lib64".format(self.prefix))
+ env.prepend_path("CMAKE_PREFIX_PATH", "{}/cmake".format(self.prefix))
+ env.prepend_path("CMAKE_MODULE_PATH", "{}/cmake".format(self.prefix))
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ self.set_flags(spack_env)
+
+ def setup_run_environment(self, env):
+ self.set_flags(env)
diff --git a/var/spack/repos/builtin/packages/herwig3/package.py b/var/spack/repos/builtin/packages/herwig3/package.py
index 960656ee6b..bac7b7c4e4 100644
--- a/var/spack/repos/builtin/packages/herwig3/package.py
+++ b/var/spack/repos/builtin/packages/herwig3/package.py
@@ -20,6 +20,10 @@ class Herwig3(AutotoolsPackage):
version("7.2.2", sha256="53e06b386df5bc20fe268b6c8ba50f1e62b6744e577d383ec836ea3fc672c383")
version("7.2.1", sha256="d4fff32f21c5c08a4b2e563c476b079859c2c8e3b78d853a8a60da96d5eea686")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/herwigpp/package.py b/var/spack/repos/builtin/packages/herwigpp/package.py
index b1d2cd12eb..85c42af5c4 100644
--- a/var/spack/repos/builtin/packages/herwigpp/package.py
+++ b/var/spack/repos/builtin/packages/herwigpp/package.py
@@ -19,6 +19,10 @@ class Herwigpp(AutotoolsPackage):
license("GPL-2.0-only")
version("2.7.1", sha256="80a189376bb65f5ec4e64f42e76c00ea9102d8224010563a424fc11e619a6ad6")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
patch("herwig++-2.7.1.patch", when="@2.7.1", level=0)
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/hevea/package.py b/var/spack/repos/builtin/packages/hevea/package.py
index b29903e95e..9e4dcfa2ec 100644
--- a/var/spack/repos/builtin/packages/hevea/package.py
+++ b/var/spack/repos/builtin/packages/hevea/package.py
@@ -23,6 +23,8 @@ class Hevea(MakefilePackage):
version("2.33", sha256="122f9023f9cfe8b41dd8965b7d9669df21bf41e419bcf5e9de5314f428380d0f")
version("2.32", sha256="f0c12ee3936364a3aa26da384e3d2ad2344be0091f04f9531f04ecb1dca98aca")
+ depends_on("c", type="build") # generated
+
# Dependency demands ocamlbuild
depends_on("ocaml")
depends_on("ocamlbuild")
diff --git a/var/spack/repos/builtin/packages/heyoka/package.py b/var/spack/repos/builtin/packages/heyoka/package.py
new file mode 100644
index 0000000000..a76e4b6a76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/heyoka/package.py
@@ -0,0 +1,88 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Heyoka(CMakePackage):
+ """heyoka is a C++ library for integration of ODEs via Taylor’s method"""
+
+ homepage = "https://bluescarni.github.io/heyoka"
+ url = "https://github.com/bluescarni/heyoka/archive/refs/tags/v3.2.0.tar.gz"
+
+ # A list of GitHub accounts to notify when the package is updated.
+ maintainers("bluescarni", "agseaton")
+
+ # SPDX identifier of the project's license.
+ license("MPL-2.0")
+
+ version("6.1.0", sha256="a0f01afb1fb4f93fdc41b2a8dfebf9f9ddd45b28b7b373c4ef9355aeda7107b4")
+ version("6.0.0", sha256="9cf56a6a29db5c72c5203af70d568aede78cb549baf1505b8abd04b888492895")
+ version("5.1.0", sha256="dd405328ace718865ae2690384fbf5f7ee4d03ab6821b908e7d0ca0a02c35e14")
+ version("5.0.0", sha256="e9a4b5683a08706addc1b448e232f1e269d78586859fe3f4d93d4c5eee3bc8ae")
+ version("4.0.3", sha256="47608e785607782d896ae2347a29a143cdb7e5c602f48f5ea795cf682051dbee")
+ version("4.0.2", sha256="8eba8fe0626c3d48affad3055e490e5d21430a420af867d7d52c18ed6b602ae0")
+ version("4.0.1", sha256="25ad39a716c5d548260d505225a13b7fa86534761b6e3d3de991d9d097ec615f")
+ version("4.0.0", sha256="bc375271773993bd89d604a269c4931e54fb8508c8235397d47f0b60b78f3cdf")
+ version("3.2.0", sha256="37db24fbaf0e65d740ffb20f76ac1c8ab9fbd6893dc87dfd483c965b71dbf465")
+ version("3.1.0", sha256="7eecab47f44a9fff022cf24f226763dab8b075a9fdaa543a42f64bb2634b3ad8")
+ version("3.0.0", sha256="03ccb6fb015ad43877781763c0f2f49bd6db64c8b9493174e589c970ef00d7f2")
+ version("2.0.0", sha256="418ce55557496d3ff1383e8b64663661d9b6a5f39dc7080e401d6537db0c4cd2")
+ version("1.0.0", sha256="96f2e049e0518c49dbe224fc268ab1ad80abeaa306e2fe7a30e2acffb79c04af")
+ version("0.21.0", sha256="16d22e99397139d25b2a0c418a654e9cba3684c7eb28933791526bb163f50f27")
+ version("0.20.1", sha256="7abd68d319dd2740ca8440d41602ceefb45809d6fadbbf31728c5cb003511f8c")
+ version("0.20.0", sha256="d6b4601ee28fc2dbb84c317bbe2619c776ce448f782c045a801dfa46b0d5e52c")
+ version("0.19.0", sha256="7a7634379233be778fd6b15090df287787cc429314ec521d0336cdc1ae26642a")
+ version("0.18.0", sha256="2a14a988d973d9a76424df05d38f89ae64f7a1e1c12131022e338fe2de2dcb94")
+
+ depends_on("cxx", type="build") # generated
+
+ # Define variants of the package
+ variant("mppp", default=False, description="enable features relying on the mp++ library")
+ variant("sleef", default=False, description="enable features relying on the SLEEF library")
+ variant("tests", default=False, description="build the test suite")
+ variant("benchmarks", default=False, description="build the benchmarking suite")
+ variant("tutorials", default=False, description="build the tutorials")
+ variant(
+ "static",
+ default=False,
+ description=("build heyoka as a static library, instead of a dynamic library"),
+ )
+
+ # Dependencies
+
+ # Build dependencies
+ depends_on("cmake@3.18:", type="build")
+
+ # Required dependencies
+ depends_on("llvm@13:17", when="@:4")
+ depends_on("llvm@13:18", when="@5")
+ depends_on("llvm@15:19", when="@6")
+ depends_on("boost@1.69: +serialization")
+ depends_on("fmt@9:10", when="@:5")
+ depends_on("fmt@9:11", when="@6")
+ depends_on("spdlog")
+ depends_on("intel-tbb@2021.4.0:")
+
+ # Optional dependencies
+ depends_on("boost@1.69: +serialization +program_options", when="+benchmarks")
+ depends_on("mppp@1 +serialization +fmt +mpfr +mpc", when="+mppp")
+ depends_on("sleef", when="+sleef")
+ depends_on("xtensor", when="+benchmarks")
+ depends_on("xtensor-blas", when="+benchmarks")
+ depends_on("xtensor", when="+tests")
+ depends_on("xtensor-blas", when="+tests")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("HEYOKA_WITH_MPPP", "mppp"),
+ self.define_from_variant("HEYOKA_WITH_SLEEF", "sleef"),
+ self.define_from_variant("HEYOKA_BUILD_TESTS", "tests"),
+ self.define_from_variant("HEYOKA_BUILD_BENCHMARKS", "benchmarks"),
+ self.define_from_variant("HEYOKA_BUILD_TUTORIALS", "tutorials"),
+ self.define_from_variant("HEYOKA_BUILD_STATIC_LIBRARY", "static"),
+ self.define_from_variant("HEYOKA_ENABLE_IPO", "ipo"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/hh-suite/package.py b/var/spack/repos/builtin/packages/hh-suite/package.py
index 334653ea86..66496a8981 100644
--- a/var/spack/repos/builtin/packages/hh-suite/package.py
+++ b/var/spack/repos/builtin/packages/hh-suite/package.py
@@ -21,14 +21,23 @@ class HhSuite(CMakePackage):
version("3.3.0", sha256="dd67f7f3bf601e48c9c0bc4cf1fbe3b946f787a808bde765e9436a48d27b0964")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
depends_on("cmake@2.8.12:", type="build")
depends_on("mpi", when="+mpi")
+ # https://github.com/soedinglab/hh-suite/pull/357
+ patch(
+ "https://github.com/soedinglab/hh-suite/commit/cec47cba5dcd580e668b1ee507c9282fbdc8e7d7.patch?full_index=1",
+ sha256="dad4ee82e506a42c243fa315f542a0e91e379851dffc368e17c9584b2ee71d89",
+ )
+
def build_args(self, spec, prefix):
args = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
args.append("-DCHECK_MPI=1")
else:
args.append("-DCHECK_MPI=0")
diff --git a/var/spack/repos/builtin/packages/hicops/package.py b/var/spack/repos/builtin/packages/hicops/package.py
index 7cfd6c3672..c599dbec39 100644
--- a/var/spack/repos/builtin/packages/hicops/package.py
+++ b/var/spack/repos/builtin/packages/hicops/package.py
@@ -20,6 +20,8 @@ class Hicops(CMakePackage):
version("release", branch="release")
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
# Build Options
variant("mpi", default=True, description="Enable MPI support.")
variant(
diff --git a/var/spack/repos/builtin/packages/hicup/package.py b/var/spack/repos/builtin/packages/hicup/package.py
new file mode 100644
index 0000000000..daf3f5da39
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hicup/package.py
@@ -0,0 +1,55 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Hicup(Package):
+ """HiCUP: a bioinformatics pipeline for processing Hi-C data"""
+
+ homepage = "https://stevenwingett.github.io/HiCUP"
+ url = "https://github.com/StevenWingett/HiCUP/archive/refs/tags/v0.9.2.tar.gz"
+ git = "https://github.com/StevenWingett/HiCUP.git"
+
+ license("LGPL-3.0-only", checked_by="A-N-Other")
+
+ version("0.9.2", sha256="7f9f65669d14fd2499afc4ac87735834b57b8f30b8e5785c4b406ec206cf9d2a")
+ version("0.8.3", sha256="e2381c2c45e0d79a6d1a2d9a8358b3efe8da727112d262cb0122132012266368")
+ version("combinations", branch="combinations")
+
+ variant("bowtie2", description="Use bowtie2 aligner", default=True)
+ variant("bowtie", description="Use bowtie aligner", default=False)
+
+ depends_on("pandoc", type="run")
+ depends_on("perl", type="run")
+ depends_on("perl-math-round", type="run")
+ depends_on("r", type="run")
+ depends_on("r-stringi@1.7.8:", type="run")
+ depends_on("r-markdown", type="run")
+ depends_on("r-tidyverse", type="run")
+ depends_on("r-plotly", type="run")
+ depends_on("samtools@0.1.18:", type="run")
+ # variant dependencies
+ depends_on("bowtie2", type="run", when="+bowtie2")
+ depends_on("bowtie", type="run", when="+bowtie")
+
+ def edit(self, spec, prefix):
+ grep = which("grep")
+ chmod = which("chmod")
+ perl_files = grep("-lRr", "#!/usr/bin/perl", ".").splitlines()
+ for f in perl_files:
+ filter_file("/usr/bin/perl", self.spec["perl"].command.path, f, backup=False)
+ filter_file("$Bin", "$RealBin", f, backup=False)
+ chmod("+x", f)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install("hicup*", prefix.bin)
+ if self.spec.satisfies("@combinations"):
+ install("Misc/get_captured_reads", prefix.bin)
+ else:
+ install("Misc/hicup_capture", prefix.bin)
+ install("Conversion/hicup2*", prefix.bin)
+ install_tree("r_scripts", prefix.bin.r_scripts)
diff --git a/var/spack/repos/builtin/packages/highfive/package.py b/var/spack/repos/builtin/packages/highfive/package.py
index da9f4425da..34266ca7d9 100644
--- a/var/spack/repos/builtin/packages/highfive/package.py
+++ b/var/spack/repos/builtin/packages/highfive/package.py
@@ -19,6 +19,8 @@ class Highfive(CMakePackage):
license("BSL-1.0")
version("develop", branch="master")
+ version("2.10.0", sha256="c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38")
+ version("2.9.0", sha256="6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e")
version("2.8.0", sha256="cd2502cae61bfb00e32dd18c9dc75289e09ad1db5c2a46d3b0eefd32e0df983b")
version("2.7.1", sha256="25b4c51a94d1e670dc93b9b73f51e79b65d8ff49bcd6e5d5582d5ecd2789a249")
version("2.7.0", sha256="8e05672ddf81a59ce014b1d065bd9a8c5034dbd91a5c2578e805ef880afa5907")
@@ -40,6 +42,8 @@ class Highfive(CMakePackage):
version("1.1", sha256="430fc312fc1961605ffadbfad82b9753a5e59482e9fbc64425fb2c184123d395")
version("1.0", sha256="d867fe73d00817f686d286f3c69a23731c962c3e2496ca1657ea7302cd0bb944")
+ depends_on("cxx", type="build") # generated
+
variant("boost", default=False, description="Support Boost")
variant("mpi", default=True, description="Support MPI")
@@ -54,8 +58,8 @@ class Highfive(CMakePackage):
def cmake_args(self):
args = [
- "-DUSE_BOOST:Bool={0}".format("+boost" in self.spec),
- "-DHIGHFIVE_PARALLEL_HDF5:Bool={0}".format("+mpi" in self.spec),
+ "-DUSE_BOOST:Bool={0}".format(self.spec.satisfies("+boost")),
+ "-DHIGHFIVE_PARALLEL_HDF5:Bool={0}".format(self.spec.satisfies("+mpi")),
"-DHIGHFIVE_UNIT_TESTS:Bool=false",
"-DHIGHFIVE_EXAMPLES:Bool=false",
]
diff --git a/var/spack/repos/builtin/packages/highway/package.py b/var/spack/repos/builtin/packages/highway/package.py
index d4b2f0cc68..d36d9b6080 100644
--- a/var/spack/repos/builtin/packages/highway/package.py
+++ b/var/spack/repos/builtin/packages/highway/package.py
@@ -14,6 +14,8 @@ class Highway(CMakePackage):
license("Apache-2.0")
+ version("1.2.0", sha256="7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343")
+ version("1.1.0", sha256="354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9")
version("1.0.7", sha256="5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5")
version("1.0.6", sha256="d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207")
version("1.0.5", sha256="99b7dad98b8fa088673b720151458fae698ae5df9154016e39de4afdc23bb927")
@@ -23,11 +25,26 @@ class Highway(CMakePackage):
version("1.0.1", sha256="7ca6af7dc2e3e054de9e17b9dfd88609a7fd202812b1c216f43cc41647c97311")
version("1.0.0", sha256="ab4f5f864932268356f9f6aa86f612fa4430a7db3c8de0391076750197e876b8")
+ variant("shared", default=True, description="Build shared libs")
+ variant("examples", default=False, description="Build examples")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.10:", type="build")
+
depends_on("googletest", type="test")
def cmake_args(self):
- args = []
- if self.run_tests:
- args.append(self.define("HWY_SYSTEM_GTEST", True))
+ define = self.define
+ from_variant = self.define_from_variant
+
+ args = [
+ from_variant("BUILD_SHARED_LIBS", "shared"),
+ from_variant("HWY_ENABLE_EXAMPLES", "examples"),
+ define("HWY_ENABLE_TESTS", self.run_tests),
+ define("BUILD_TESTING", self.run_tests),
+ define("HWY_SYSTEM_GTEST", self.run_tests),
+ ]
+
return args
diff --git a/var/spack/repos/builtin/packages/highwayhash/package.py b/var/spack/repos/builtin/packages/highwayhash/package.py
index 8dad7acc99..e86c65a62c 100644
--- a/var/spack/repos/builtin/packages/highwayhash/package.py
+++ b/var/spack/repos/builtin/packages/highwayhash/package.py
@@ -21,6 +21,8 @@ class Highwayhash(MakefilePackage):
version("dfcb97", commit="dfcb97ca4fe9277bf9dc1802dd979b071896453b")
+ depends_on("cxx", type="build") # generated
+
build_targets = ["all", "libhighwayhash.a"]
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py
index e15aedb8e6..1b29d8b3ac 100644
--- a/var/spack/repos/builtin/packages/hiop/package.py
+++ b/var/spack/repos/builtin/packages/hiop/package.py
@@ -5,8 +5,6 @@
import os
-import llnl.util.tty as tty
-
from spack.package import *
@@ -25,6 +23,15 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# Most recent tagged snapshot is the preferred version when profiling.
version(
+ "1.1.0", tag="v1.1.0", commit="7ccfa86a71fdb670ae690199ac676f3c1365799a", submodules=True
+ )
+ version(
+ "1.0.3", tag="v1.0.3", commit="6161396d9b562c39e7e6fe686ab46a2ec7927482", submodules=True
+ )
+ version(
+ "1.0.2", tag="v1.0.2", commit="2378fde5cc371047227c396ddaaf58b6453f928c", submodules=True
+ )
+ version(
"1.0.1", tag="v1.0.1", commit="c5e156c6f27d046f590dc35114980e3f9c573ca6", submodules=True
)
version(
@@ -49,10 +56,10 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
version("0.5.0", tag="v0.5.0", commit="a39da8025037c7c8ae2eb31234eb80cc73bec2af")
version("0.4.6", tag="v0.4.6", commit="b72d163d52c9225c3196ceb2baebdc7cf09a69de")
version("0.4.5", tag="v0.4.5", commit="c353580456c4776c50811b97cf8ff802dc27b90c")
- version("0.4.4", tag="v0.4.4", commit="e858eefa6b914f5c87c3717bbce811931ea69386")
+ version("0.4.4", tag="v0.4.4", commit="4e3faa9963e83cd7f2a388bfcc1e402dc86fc81d")
version("0.4.3", tag="v0.4.3", commit="c0394af4d84ebb84b7d2b95283ad65ffd84e0d45")
version("0.4.2", tag="v0.4.2", commit="3fcb788d223eec24c0241680070c4a9a5ec71ef3")
- version("0.4.1", tag="v0.4.1", commit="3f269560f76d5a89bcbd1d3c4f9f0e5acaa6fd64")
+ version("0.4.1", tag="v0.4.1", commit="281adb5fb335642446e0804a2669b97d8ef62998")
version("0.4", tag="v0.4", commit="91d21085a1149eacdb27cd738d4a74a7e412fcff")
version("0.3.99.3", tag="v0.3.99.3", commit="bed1dbef260e53a9d139ccfb77d2e83a98aab216")
version("0.3.99.2", tag="v0.3.99.2", commit="9eb026768bc5e0a2c1293d0487cc39913001ae19")
@@ -66,10 +73,14 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version("develop", branch="develop")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("jsrun", default=False, description="Enable/Disable jsrun command for testing")
variant("shared", default=False, description="Enable/Disable shared libraries")
variant("mpi", default=True, description="Enable/Disable MPI")
- variant("raja", default=False, description="Enable/Disable RAJA")
+ variant("raja", default=False, when="@0.3.99:", description="Enable/Disable RAJA")
variant("kron", default=False, description="Enable/Disable Kron reduction")
variant("sparse", default=False, description="Enable/Disable Sparse linear algebra")
variant(
@@ -118,7 +129,11 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# 1.0.2 fixes bug with cuda 12 compatibility
# hiop@0.6.0 requires cusolver API in cuda@11
depends_on("cuda@11:11.9", when="@0.6.0:1.0.1+cuda")
- depends_on("cuda@11:", when="@develop:+cuda")
+ # Version v0.7.0 of HiOp is the earliest version that uses
+ # cusparseSpGEMMreuse_workEstimation
+ # which appears for the first time in the cuSPARSE version shipped with
+ # CUDA 11.3.1, at least according to the CUDA online documentation.
+ depends_on("cuda@11.3.1:", when="@0.7:+cuda")
# Before hiop@0.6.0 only cuda requirement was magma
depends_on("cuda", when="@:0.5.4+cuda")
@@ -128,9 +143,11 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# RAJA > 0.14 and Umpire > 6.0 require c++ std 14
# We are working on supporting newer Umpire/RAJA versions
- depends_on("raja@0.14.0:0.14", when="@0.5.0:+raja")
- depends_on("umpire@6.0.0:6", when="@0.5.0:+raja")
- depends_on("camp@0.2.3:0.2", when="@0.5.0:+raja")
+ depends_on("raja@0.14", when="@0.5:+raja")
+ depends_on("raja@:0.13", when="@0.3.99:0.4+raja")
+ depends_on("umpire@6", when="@0.5:+raja")
+ depends_on("umpire@:5", when="@0.3.99:0.4+raja")
+ depends_on("camp@0.2.3:0.2", when="@0.3.99:+raja")
# This is no longer a requirement in RAJA > 0.14
depends_on("umpire+cuda~shared", when="+raja+cuda ^raja@:0.14")
@@ -141,7 +158,12 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
msg="umpire+cuda exports device code and requires static libs",
)
+ # We rely on RAJA / Umpire utilities when supporting CUDA backend
+ conflicts("~raja", when="+cuda", msg="RAJA is required for CUDA support")
+ conflicts("~raja", when="+rocm", msg="RAJA is required for ROCm support")
+
depends_on("hip", when="+rocm")
+ depends_on("hiprand", when="+rocm")
depends_on("hipblas", when="+rocm")
depends_on("hipsparse", when="+rocm")
@@ -159,7 +181,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
args = []
spec = self.spec
- use_gpu = "+cuda" in spec or "+rocm" in spec
+ use_gpu = spec.satisfies("+cuda") or spec.satisfies("+rocm")
if use_gpu:
args.extend(
@@ -189,7 +211,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("HIOP_USE_COINHSL", "sparse"),
self.define_from_variant("HIOP_TEST_WITH_BSUB", "jsrun"),
self.define_from_variant("HIOP_USE_GINKGO", "ginkgo"),
- self.define_from_variant("HIOP_USE_CUSOLVER_LU", "cusolver_lu"),
+ self.define_from_variant("HIOP_USE_RESOLVE", "cusolver_lu"),
]
)
@@ -199,7 +221,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# args.append(
# self.define('HIOP_CTEST_LAUNCH_COMMAND', 'srun -t 10:00'))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.extend(
[
self.define("MPI_HOME", spec["mpi"].prefix),
@@ -218,7 +240,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# self.define('MPI_Fortran_LINK_FLAGS',
# '-L/path/to/libfabric/lib64/ -lfabric'))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch_list = spec.variants["cuda_arch"].value
if cuda_arch_list[0] != "none":
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", cuda_arch_list))
@@ -231,7 +253,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# args.append(
# self.define('HIP_CLANG_INCLUDE_PATH',
# '/opt/rocm-X.Y.Z/llvm/lib/clang/14.0.0/include/'))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
rocm_arch_list = spec.variants["amdgpu_target"].value
@@ -239,7 +261,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define("GPU_TARGETS", rocm_arch_list))
args.append(self.define("AMDGPU_TARGETS", rocm_arch_list))
- if "+kron" in spec:
+ if spec.satisfies("+kron"):
args.append(self.define("HIOP_UMFPACK_DIR", spec["suite-sparse"].prefix))
# Unconditionally disable strumpack, even when +sparse. This may be
@@ -247,7 +269,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
# fully supported in spack at the moment.
args.append(self.define("HIOP_USE_STRUMPACK", False))
- if "+sparse" in spec:
+ if spec.satisfies("+sparse"):
args.append(self.define("HIOP_COINHSL_DIR", spec["coinhsl"].prefix))
return args
@@ -257,37 +279,35 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
#
# export SPACK_USER_CACHE_PATH=/tmp/spack
# export SPACK_DISABLE_LOCAL_CONFIG=true
- def test(self):
- if not self.spec.satisfies("@develop") or not os.path.isdir(self.prefix.bin):
- tty.info("Skipping: checks not installed in bin for v{0}".format(self.version))
- return
-
- tests = [
- ["NlpMdsEx1.exe", "400", "100", "0", "-selfcheck"],
- ["NlpMdsEx1.exe", "400", "100", "1", "-selfcheck"],
- ["NlpMdsEx1.exe", "400", "100", "0", "-empty_sp_row", "-selfcheck"],
+
+ def run_hiop(self, raja):
+ if raja:
+ exName = "NlpMdsEx1Raja.exe"
+ else:
+ exName = "NlpMdsEx1.exe"
+
+ exe = os.path.join(self.prefix.bin, exName)
+ if not os.path.exists(exe):
+ raise SkipTest(f"{exName} does not exist in version {self.version}")
+
+ options = [
+ ["400", "100", "0", "-selfcheck"],
+ ["400", "100", "1", "-selfcheck"],
+ ["400", "100", "0", "-empty_sp_row", "-selfcheck"],
]
- if "+raja" in self.spec:
- tests.extend(
- [
- ["NlpMdsEx1Raja.exe", "400", "100", "0", "-selfcheck"],
- ["NlpMdsEx1Raja.exe", "400", "100", "1", "-selfcheck"],
- ["NlpMdsEx1Raja.exe", "400", "100", "0", "-empty_sp_row", "-selfcheck"],
- ]
- )
+ exe = which(exe)
- for i, test in enumerate(tests):
- exe = os.path.join(self.prefix.bin, test[0])
- args = test[1:]
- reason = 'test {0}: "{1}"'.format(i, " ".join(test))
- self.run_test(
- exe,
- args,
- [],
- 0,
- installed=False,
- purpose=reason,
- skip_missing=True,
- work_dir=self.prefix.bin,
- )
+ for i, args in enumerate(options):
+ with test_part(self, f"test_{exName}_{i+1}", purpose=" ".join(args)):
+ exe(*args)
+
+ def test_NlpMdsEx1(self):
+ """Test NlpMdsEx1"""
+ self.run_hiop(False)
+
+ def test_NlpMdsEx1Raja(self):
+ """Test NlpMdsEx1 with +raja"""
+ if "+raja" not in self.spec:
+ raise SkipTest("Package must be installed with +raja")
+ self.run_hiop(True)
diff --git a/var/spack/repos/builtin/packages/hip-examples/package.py b/var/spack/repos/builtin/packages/hip-examples/package.py
index c2e8aaa97e..279ecb4ddd 100644
--- a/var/spack/repos/builtin/packages/hip-examples/package.py
+++ b/var/spack/repos/builtin/packages/hip-examples/package.py
@@ -11,9 +11,9 @@ from spack.package import *
class HipExamples(Package):
"""Examples for HIP"""
- homepage = "https://github.com/ROCm-Developer-Tools/HIP-Examples/"
- git = "https://github.com/ROCm-Developer-Tools/HIP-Examples.git"
- url = "https://github.com/ROCm-Developer-Tools/HIP-Examples/archive/rocm-5.4.3.tar.gz"
+ homepage = "https://github.com/ROCm/HIP-Examples/"
+ git = "https://github.com/ROCm/HIP-Examples.git"
+ url = "https://github.com/ROCm/HIP-Examples/archive/rocm-5.4.3.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "afzpatel")
@@ -24,6 +24,10 @@ class HipExamples(Package):
version("5.5.0", sha256="bea8a4155bbfbdb3bc1f83c22e4bd1214b1b4e1840b58dc7d37704620de5b103")
version("5.4.3", sha256="053b8b7892e2929e3f90bd978d8bb1c9801e4803eadd7d97fc6692ce60af1d47")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("0001-add-inc-and-lib-paths-to-openmp-helloworld.patch")
patch("0002-add-fpic-compile-to-add4.patch")
diff --git a/var/spack/repos/builtin/packages/hip-rocclr/opengl.patch b/var/spack/repos/builtin/packages/hip-rocclr/opengl.patch
deleted file mode 100644
index fc9bacee50..0000000000
--- a/var/spack/repos/builtin/packages/hip-rocclr/opengl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 98df37fc36b6276c26532e86e89be7e389745f4e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Torsten=20Ke=C3=9Fler?= <t.kessler@posteo.de>
-Date: Sun, 19 Jul 2020 11:58:24 +0200
-Subject: [PATCH] Fix search for OpenCL include dirs
-
----
- CMakeLists.txt | 26 +++++++++-----------------
- 1 file changed, 9 insertions(+), 17 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 122277ee..02ca4644 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -53,26 +53,18 @@ find_package(amd_comgr REQUIRED CONFIG
- )
- message(STATUS "Code Object Manager found at ${amd_comgr_DIR}.")
-
--# FIXME: Use find_package(OpenCL)
--find_library( OpenCL REQUIRED CONFIG
-- PATHS
-- /opt/rocm
-+find_path(OPENCL_INCLUDE_DIR
-+ NAMES OpenCL/cl.h CL/cl.h
-+ PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
-+ PATHS ${OPENCL_DIR}
-+ DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
- )
-
--if( NOT OPENCL_DIR )
-- find_path(OPENCL_INCLUDE_DIR
-- NAMES OpenCL/cl.h CL/cl.h
-- PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
-- PATHS /opt/rocm
-- DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
-- )
--
-- if( NOT OPENCL_INCLUDE_DIR )
-- unset(OPENCL_INCLUDE_DIR CACHE)
-- set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
-- endif()
-- message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
-+if( NOT OPENCL_INCLUDE_DIR )
-+ unset(OPENCL_INCLUDE_DIR CACHE)
-+ set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
- endif()
-+message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
-
-
-
diff --git a/var/spack/repos/builtin/packages/hip-rocclr/package.py b/var/spack/repos/builtin/packages/hip-rocclr/package.py
index 2ae9e375e0..420e3954be 100644
--- a/var/spack/repos/builtin/packages/hip-rocclr/package.py
+++ b/var/spack/repos/builtin/packages/hip-rocclr/package.py
@@ -12,19 +12,14 @@ class HipRocclr(CMakePackage):
with to different backends such as ROCr or PAL This abstraction allows
runtimes to work on Windows as well as on Linux without much effort."""
- homepage = "https://github.com/ROCm-Developer-Tools/ROCclr"
- git = "https://github.com/ROCm-Developer-Tools/ROCclr.git"
+ homepage = "https://github.com/ROCm/ROCclr"
+ url = "https://github.com/ROCm/ROCclr/archive/rocm-5.6.1.tar.gz"
+ git = "https://github.com/ROCm/ROCclr.git"
tags = ["rocm"]
- maintainers("srekolam", "renjithravindrankannath")
-
- def url_for_version(self, version):
- # Fix up a typo in the 3.5.0 release.
- if version == Version("3.5.0"):
- return "https://github.com/ROCm-Developer-Tools/ROCclr/archive/roc-3.5.0.tar.gz"
+ phases = ["cmake", "build"]
- url = "https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-{0}.tar.gz"
- return url.format(version)
+ maintainers("srekolam", "renjithravindrankannath")
license("MIT")
@@ -33,138 +28,27 @@ class HipRocclr(CMakePackage):
version("5.6.0", sha256="864f87323e793e60b16905284fba381a7182b960dd4a37fb67420c174442c03c")
version("5.5.1", sha256="1375fc7723cfaa0ae22a78682186d4804188b0a54990bfd9c0b8eb421b85e37e")
version("5.5.0", sha256="efbae9a1ef2ab3de5ca44091e9bb78522e76759c43524c1349114f9596cc61d1")
- version("5.4.3", sha256="71d9668619ab57ec8a4564d11860438c5aad5bd161a3e58fbc49555fbd59182d")
- version("5.4.0", sha256="46a1579310b3ab9dc8948d0fb5bed4c6b312f158ca76967af7ab69e328d43138")
- version("5.3.3", sha256="f8133a5934f9c53b253d324876d74f08a19e2f5b073bc94a62fe64b0d2183a18")
- version("5.3.0", sha256="2bf14116b5e2270928265f5d417b3d0f0f2e13cbc8ec5eb8c80d4d4a58ff7e94")
- version("5.2.3", sha256="0493c414d4db1af8e1eb30a651d9512044644244488ebb13478c2138a7612998")
- version("5.2.1", sha256="465ca9fa16869cd89dab8c2d66d9b9e3c14f744bbedaa1d215b0746d77a500ba")
- version("5.2.0", sha256="37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb")
- version("5.1.3", sha256="ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48")
- version("5.1.0", sha256="f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa")
- version(
- "5.0.2",
- sha256="34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="bda52c65f03a69a9d8ab1a118d45646d76843249fb975d67e5141e63fa3acc79",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="8a86b4f2a1b1c7ac628262e5b11b07ff42a224e62e594a4e0683aeb616062538",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="c57525af32c59becf56fd83cdd61f5320a95024d9baa7fb729a01e7a9fcdfd78",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="9eb1d88cfc9474979aaf29b99bcf9d3769a0f7f1f8f10660941aabf83d9eeb0c",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="8db502d0f607834e3b882f939d33e8abe2f9b55ddafaf1b0c2cd29a0425ed76a",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="d1ac02840c2dcb3d5fa3008fe9e313767ebe6d1dcf978a924341834ec96ebfe2",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="d248958672ae35ab7f9fbd83827ccf352e2756dfa7819f6b614ace2e1a9a064e",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="10d8aa6f5af7b51813015da603c4e75edc863c3530793f6ed9769ca345c08ed6",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="a49f464bb2eab6317e87e3cc249aba3b2517a34fbdfe50175f0437f69a219adc",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="87c1ee9f02b8aa487b628c543f058198767c474cec3d21700596a73c028959e1",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="71d9668619ab57ec8a4564d11860438c5aad5bd161a3e58fbc49555fbd59182d")
+ version("5.4.0", sha256="46a1579310b3ab9dc8948d0fb5bed4c6b312f158ca76967af7ab69e328d43138")
+ version("5.3.3", sha256="f8133a5934f9c53b253d324876d74f08a19e2f5b073bc94a62fe64b0d2183a18")
+ version("5.3.0", sha256="2bf14116b5e2270928265f5d417b3d0f0f2e13cbc8ec5eb8c80d4d4a58ff7e94")
+ version("5.2.3", sha256="0493c414d4db1af8e1eb30a651d9512044644244488ebb13478c2138a7612998")
+ version("5.2.1", sha256="465ca9fa16869cd89dab8c2d66d9b9e3c14f744bbedaa1d215b0746d77a500ba")
+ version("5.2.0", sha256="37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb")
+ version("5.1.3", sha256="ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48")
+ version("5.1.0", sha256="f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("gl@4.5:", type="link")
- depends_on("libelf", type="link", when="@3.7.0:3.8.0")
- depends_on("numactl", type="link", when="@3.7.0:")
+ depends_on("numactl", type="link")
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- "5.6.0",
- "5.6.1",
- "master",
- ]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
-
- # See: https://github.com/ROCm-Developer-Tools/ROCclr/pull/16
- # In 3.7.0 the find opengl things have changed slightly.
- patch("opengl.patch", when="@3.5.0")
-
- resource(
- name="opencl-on-vdi",
- url="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-3.5.0.tar.gz",
- sha256="511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0",
- expand=True,
- destination="",
- placement="opencl-on-vdi",
- when="@3.5.0",
- )
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.6.1", "master"]:
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
# Add opencl sources thru the below
for d_version, d_shasum in [
@@ -176,68 +60,28 @@ class HipRocclr(CMakePackage):
("5.4.0", "a294639478e76c75dac0e094b418f9bd309309b07faf6af126cdfad9aab3c5c7"),
("5.3.3", "cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f"),
("5.3.0", "d251e2efe95dc12f536ce119b2587bed64bbda013969fa72be58062788044a9e"),
- ("5.2.3", "932ea3cd268410010c0830d977a30ef9c14b8c37617d3572a062b5d4595e2b94"),
- ("5.2.1", "eb4ff433f8894ca659802f81792646034f8088b47aca6ad999292bcb8d6381d5"),
- ("5.2.0", "80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0"),
- ("5.1.3", "44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31"),
- ("5.1.0", "362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927"),
- ("5.0.2", "3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95"),
- ("5.0.0", "2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be"),
- ("4.5.2", "96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d"),
- ("4.5.0", "3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8"),
- ("4.3.1", "7f98f7d4707b4392f8aa7017aaca9e27cb20263428a1a81fb7ec7c552e60c4ca"),
- ("4.3.0", "d37bddcc6835b6c0fecdf4d02c204ac1d312076f3eef2b1faded1c4c1bc651e9"),
- ("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
- ),
+ url=f"https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="opencl-on-vdi",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
resource(
name="opencl-on-vdi",
- git="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git",
+ git="https://github.com/ROCm/ROCm-OpenCL-Runtime.git",
destination="",
placement="opencl-on-vdi",
branch="main",
when="@master",
)
- @run_after("install")
- def deploy_missing_files(self):
- if "@3.5.0" in self.spec:
- # the amdrocclr_staticTargets.cmake file is generated but not
- # installed and when we install it by hand, we have to fix the
- # path to the static library libamdrocclr_static.a from build
- # dir to prefix lib dir.
- cmakefile = join_path(self.build_directory, "amdrocclr_staticTargets.cmake")
- filter_file(self.build_directory, self.prefix.lib, cmakefile)
- install(cmakefile, self.prefix.lib)
- elif self.spec.satisfies("@3.7.0:4.3.2"):
- path = join_path(self.prefix.lib, "cmake/rocclr/ROCclrConfig.cmake")
- filter_file(self.build_directory, self.prefix, path)
-
def cmake_args(self):
- args = [
+ return [
self.define("USE_COMGR_LIBRARY", "yes"),
self.define("OPENCL_DIR", join_path(self.stage.source_path, "opencl-on-vdi")),
]
- return args
-
- def __init__(self, spec):
- super().__init__(spec)
- if self.spec.satisfies("@4.5.0:"):
- self.phases = ["cmake", "build"]
diff --git a/var/spack/repos/builtin/packages/hip-tensor/package.py b/var/spack/repos/builtin/packages/hip-tensor/package.py
new file mode 100644
index 0000000000..c4f9219ad9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hip-tensor/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2023 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.package import *
+
+
+class HipTensor(CMakePackage, ROCmPackage):
+ """AMD’s C++ library for accelerating tensor primitives"""
+
+ homepage = "https://github.com/ROCm/hipTensor"
+ git = "https://github.com/ROCm/hipTensor.git"
+ url = "https://github.com/ROCm/hipTensor/archive/refs/tags/rocm-6.1.2.tar.gz"
+ tags = ["rocm"]
+
+ maintainers("srekolam", "afzpatel")
+
+ version("master", branch="master")
+ version("6.2.4", sha256="54c378b440ede7a07c93b5ed8d16989cc56283a56ea35e41f3666bb05b6bc984")
+ version("6.2.1", sha256="592dbe73f5f95ba512f7fbe9975a68dbea85846be74da15344d74952b286f243")
+ version("6.2.0", sha256="adb7459416864fb2664064f5bea5fb669839247b702209a6415b396813626b31")
+ version("6.1.2", sha256="ac0e07a3019bcce4a0a98aafa4922d5fc9e953bed07084abef5306c851717783")
+ version("6.1.1", sha256="09bcdbf6b1d20dc4d75932abd335a9a534b16a8343858121daa5813a38f5ad3a")
+ version("6.1.0", sha256="9cc43b1b3394383f22f30e194d8753ca6ff1887c83ec1de5823cb2e94976eeed")
+ version("6.0.2", sha256="6e6e7530eabbd1fb28b83efa5a49c19a6642d40e1554224ebb1e0a5999045e27")
+ version("6.0.0", sha256="268d7f114784b7e824f89c21c65c2efedbb5486f09a356a56dca1b89bde1ef7a")
+ version("5.7.1", sha256="96743d4e695fe865aef4097ae31d9b4e42a2d5a92135a005b0d187d9c0b17645")
+ version("5.7.0", sha256="4b17f6d43b17fe2dc1d0c61e9663d4752006f7898cc94231206444a1663eb252")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+ for ver in [
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ "master",
+ ]:
+ depends_on(f"composable-kernel@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}", when=f"@{ver}")
+
+ for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hipcc@{ver}", when=f"@{ver}")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("@6.1"):
+ env.set("CXX", self.spec["hipcc"].prefix.bin.hipcc)
+ else:
+ env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
diff --git a/var/spack/repos/builtin/packages/hip/0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch b/var/spack/repos/builtin/packages/hip/0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch
deleted file mode 100644
index 53f2bea672..0000000000
--- a/var/spack/repos/builtin/packages/hip/0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From cf5f9124a629e0594c71daa6ea12ee823bf6a9fb Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Fri, 7 Aug 2020 23:09:43 +0200
-Subject: [PATCH] Make it possible to specify the package folder of
- rocm_agent_enumerator from the command line
-
----
- bin/hipcc | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/bin/hipcc b/bin/hipcc
-index 8c0a4796..48192ed1 100755
---- a/bin/hipcc
-+++ b/bin/hipcc
-@@ -684,7 +684,8 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
- $targetsStr = $ENV{HCC_AMDGPU_TARGET};
- } else {
- # Else try using rocm_agent_enumerator
-- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
-+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
-+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
- $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
- $targetsStr =~ s/\n/,/g;
- }
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0002-Fix-detection-of-HIP_CLANG_ROOT.patch b/var/spack/repos/builtin/packages/hip/0002-Fix-detection-of-HIP_CLANG_ROOT.patch
deleted file mode 100644
index 61ad05873a..0000000000
--- a/var/spack/repos/builtin/packages/hip/0002-Fix-detection-of-HIP_CLANG_ROOT.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4f324ddc12f358de47ea0ef1872c61b1dc4c46e2 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Mon, 10 Aug 2020 15:00:06 +0200
-Subject: [PATCH] Fix detection of HIP_CLANG_ROOT
-
----
- hip-config.cmake.in | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/hip-config.cmake.in b/hip-config.cmake.in
-index 859e2fa0..4baafbde 100644
---- a/hip-config.cmake.in
-+++ b/hip-config.cmake.in
-@@ -58,8 +58,9 @@ if(HIP_COMPILER STREQUAL "clang")
- execute_process(COMMAND ${HIP_CXX_COMPILER} --version
- OUTPUT_STRIP_TRAILING_WHITESPACE
- OUTPUT_VARIABLE HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT)
-- if(HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT MATCHES "InstalledDir:[\t\r\n][\t\r\n]*([^\t\r\n])")
-- set(HIP_CLANG_ROOT ${CMAKE_MATCH_1})
-+ if(HIP_CLANG_CXX_COMPILER_VERSION_OUTPUT MATCHES "InstalledDir: ([^\t\r\n]+)")
-+ # InstalledDir points to the bin/ directory, so the root is the parent dir
-+ get_filename_component(HIP_CLANG_ROOT ${CMAKE_MATCH_1} DIRECTORY)
- else()
- set(HIP_CLANG_ROOT /opt/rocm/llvm)
- endif()
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch b/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch
deleted file mode 100644
index 87f64923dd..0000000000
--- a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.4.2.0.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f97fb83..a059c42 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -72,7 +72,17 @@ list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
- list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
- set(HIP_VERSION_GITDATE 0)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+
-+# FIXME: Two different version strings used.
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+
-
- # FIXME: Two different version strings used.
- if(GIT_FOUND)
-@@ -118,9 +128,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-diff --git a/hip-config.cmake.in b/hip-config.cmake.in
-index cbb4ffe..94e2ec1 100644
---- a/hip-config.cmake.in
-+++ b/hip-config.cmake.in
-@@ -265,9 +265,6 @@ if(HIP_COMPILER STREQUAL "clang")
- endif()
-
- # Add support for __fp16 and _Float16, explicitly link with compiler-rt
-- set_property(TARGET hip::host APPEND PROPERTY
-- INTERFACE_LINK_LIBRARIES "-L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64"
-- )
- set_property(TARGET hip::device APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES "-L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64"
- )
diff --git a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.10.0.patch b/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.10.0.patch
deleted file mode 100644
index d7f1a8dff3..0000000000
--- a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.10.0.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 3a05d9ee5af2d318d27ee4b8e81542e2c81b9d5a Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Mon, 11 Jan 2021 16:38:14 +0100
-Subject: [PATCH] Improve compilation without git repo
-
----
- CMakeLists.txt | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7831bb4d..c0c7a536 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -42,9 +42,17 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
- list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
- list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-
- # FIXME: Two different version strings used.
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+
- if(GIT_FOUND)
- # get date information based on UTC
- # use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE
-@@ -88,9 +96,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-@@ -488,10 +493,6 @@ endif()
- # Generate .hipVersion
- file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
-
--if(NOT DEFINED HIP_VERSION_GITDATE)
-- set(HIP_VERSION_GITDATE 0)
--endif()
--
- # Build doxygen documentation
- find_program(DOXYGEN_EXE doxygen)
- if(DOXYGEN_EXE)
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.7.0.patch b/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.7.0.patch
deleted file mode 100644
index 2bb5074df2..0000000000
--- a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.3.7.0.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From db2a538d9beaef9092dff19c36ed8a2e291bc69a Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Mon, 11 Jan 2021 16:38:14 +0100
-Subject: [PATCH 1/2] Improve compilation without git repo
-
----
- CMakeLists.txt | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7f5bdad9..ca0e7ed4 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -44,9 +44,17 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
- list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
- list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-
- # FIXME: Two different version strings used.
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+
- if(GIT_FOUND)
- # get date information based on UTC
- # use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE
-@@ -90,9 +98,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- add_to_config(_versionInfo HIP_VERSION_MAJOR)
-@@ -447,10 +452,6 @@ endif()
- # Generate .hipVersion
- file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
-
--if(NOT DEFINED HIP_VERSION_GITDATE)
-- set(HIP_VERSION_GITDATE 0)
--endif()
--
- # Generate hip_version.h
- set(_versionInfoHeader
- "// Auto-generated by cmake\n
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.4.1.0.patch b/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.4.1.0.patch
deleted file mode 100644
index f5b59e5b6f..0000000000
--- a/var/spack/repos/builtin/packages/hip/0003-Improve-compilation-without-git-repo.4.1.0.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 483f8c9..8ddf76e 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -52,7 +52,16 @@ string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION})
- list(GET VERSION_LIST 0 HIP_VERSION_MAJOR)
- list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+
-+# FIXME: Two different version strings used.
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-
- # FIXME: Two different version strings used.
- if(GIT_FOUND)
-@@ -98,9 +107,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-@@ -295,10 +301,6 @@ file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo})
- # Generate .hipVersion
- file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
-
--if(NOT DEFINED HIP_VERSION_GITDATE)
-- set(HIP_VERSION_GITDATE 0)
--endif()
--
- # Build doxygen documentation
- find_program(DOXYGEN_EXE doxygen)
- if(DOXYGEN_EXE)
-
diff --git a/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch b/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch
deleted file mode 100644
index a930858378..0000000000
--- a/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 8b266132ee180ff8cc17b394ba64850f207a3dab Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Tue, 12 Jan 2021 12:26:44 +0100
-Subject: [PATCH] Drop clang rt builtins linking on hip::host
-
-Ref this comment
-https://github.com/ROCm-Developer-Tools/HIP/pull/2217#discussion_r555402581:
-
-> Yea, this should only be linked on hip::device as I believe its needed
-> for __fp16 support on the GPU. If users need this on the host-side,
-> then they should explicitly add it.
----
- hip-config.cmake.in | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/hip-config.cmake.in b/hip-config.cmake.in
-index 6dfbd527..0ac1b659 100644
---- a/hip-config.cmake.in
-+++ b/hip-config.cmake.in
-@@ -206,9 +206,6 @@ if(HIP_COMPILER STREQUAL "clang")
- endif()
-
- # Add support for __fp16 and _Float16, explicitly link with compiler-rt
-- set_property(TARGET hip::host APPEND PROPERTY
-- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
-- )
- set_property(TARGET hip::device APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
- )
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch b/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch
deleted file mode 100644
index 936b333277..0000000000
--- a/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 053bb794c57424fc47d53d8914bca1dc8d776a34 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Tue, 12 Jan 2021 12:26:44 +0100
-Subject: [PATCH 2/2] Drop clang rt builtins linking on hip::host
-
-Ref this comment
-https://github.com/ROCm-Developer-Tools/HIP/pull/2217#discussion_r555402581:
-
-> Yea, this should only be linked on hip::device as I believe its needed
-> for __fp16 support on the GPU. If users need this on the host-side,
-> then they should explicitly add it.
----
- hip-config.cmake.in | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/hip-config.cmake.in b/hip-config.cmake.in
-index ba340134..4daff392 100644
---- a/hip-config.cmake.in
-+++ b/hip-config.cmake.in
-@@ -204,12 +204,6 @@ if(HIP_COMPILER STREQUAL "clang")
- endif()
-
- # Add support for __fp16 and _Float16, explicitly link with compiler-rt
-- set_property(TARGET hip::host APPEND PROPERTY
-- INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
-- )
-- set_property(TARGET hip::host APPEND PROPERTY
-- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
-- )
- set_property(TARGET hip::device APPEND PROPERTY
- INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
- )
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.5.0.patch b/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.5.0.patch
deleted file mode 100644
index 500504e657..0000000000
--- a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.5.0.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 52f389bc39e6f3d1eb76225a82c23312dd6006ee Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Wed, 4 Aug 2021 15:12:10 +0200
-Subject: [PATCH] tests
-
----
- CMakeLists.txt | 30 ------------------------------
- 1 file changed, 30 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 4a34b02..37e1c3f 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -641,36 +641,6 @@ if(CLANGFORMAT_EXE)
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
--#############################
--# Testing steps
--#############################
--# Target: test
--set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
--set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--if(${RUN_HIT} EQUAL 0)
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--if(${RUN_HIT} EQUAL 0)
-- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
-- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
--
-- # Add tests
-- include_directories(${HIP_SRC_PATH}/tests/src)
-- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/src "directed_tests")
--
-- # Add unit tests
-- include_directories(${HIP_SRC_PATH}/tests/unit)
-- hit_add_directory_recursive(${HIP_SRC_PATH}/tests/unit "unit_tests")
--
-- # Add top-level tests to build_tests
-- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
--
-- # Add custom target: check
-- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
--else()
-- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
--endif()
-
- #############################
- # Code analysis
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.6.0.patch b/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.6.0.patch
deleted file mode 100644
index 7adf7e35cc..0000000000
--- a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.6.0.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 400797728d50d335c2399bc44ab2b1330d0c6dc4 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Wed, 4 Aug 2021 15:10:00 +0200
-Subject: [PATCH] tests
-
----
- CMakeLists.txt | 42 ------------------------------------------
- 1 file changed, 42 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 055543a..7e408b6 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -661,48 +661,6 @@ if(CLANGFORMAT_EXE)
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
--#############################
--# Testing steps
--#############################
--# Target: test
--set(HIP_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
--set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--if(${RUN_HIT} EQUAL 0)
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--if(${RUN_HIT} EQUAL 0)
-- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
-- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
--
-- # Add tests
-- include_directories(${HIP_SRC_PATH}/tests/src)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
--
-- # Add unit tests
-- include_directories(${HIP_SRC_PATH}/tests/unit)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
--
-- # Add performance tests
-- include_directories(${HIP_SRC_PATH}/tests/performance)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
--
-- # Add top-level tests to build_tests
-- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
--
-- # Add top-level tests to build performance_tests.
-- # To build performance tests, just run "make build_perf"
-- add_custom_target(build_perf DEPENDS performance_tests)
--
-- # Add custom target: perf.
-- # To run performance tests, just run "make perf"
-- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
--
-- # Add custom target: check
-- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
--else()
-- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
--endif()
-
- #############################
- # Code analysis
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.9.0.patch b/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.9.0.patch
deleted file mode 100644
index fdc4a5ffa6..0000000000
--- a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-3.9.0.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 823d25faf479a83879a0faf73bf95eaae9ae9fff Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Wed, 4 Aug 2021 15:06:53 +0200
-Subject: [PATCH] Disable testing
-
----
- CMakeLists.txt | 45 ---------------------------------------------
- 1 file changed, 45 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7831bb4..b8f420c 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -696,51 +696,6 @@ if(CLANGFORMAT_EXE)
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
--#############################
--# Testing steps
--#############################
--# Target: test
--set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
--set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
--if(HIP_PLATFORM STREQUAL "nvcc")
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--if(${RUN_HIT} EQUAL 0)
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--if(${RUN_HIT} EQUAL 0)
-- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
-- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
--
-- # Add tests
-- include_directories(${HIP_SRC_PATH}/tests/src)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/src "directed_tests")
--
-- # Add unit tests
-- include_directories(${HIP_SRC_PATH}/tests/unit)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_DEFAULT} ${HIP_SRC_PATH}/tests/unit "unit_tests")
--
-- # Add performance tests
-- include_directories(${HIP_SRC_PATH}/tests/performance)
-- hit_add_directory_recursive(${HIP_CTEST_CONFIG_PERFORMANCE} ${HIP_SRC_PATH}/tests/performance "performance_tests")
--
-- # Add top-level tests to build_tests
-- add_custom_target(build_tests DEPENDS directed_tests unit_tests)
--
-- # Add top-level tests to build performance_tests.
-- # To build performance tests, just run "make build_perf"
-- add_custom_target(build_perf DEPENDS performance_tests)
--
-- # Add custom target: perf.
-- # To run performance tests, just run "make perf"
-- add_custom_target(perf COMMAND "${CMAKE_CTEST_COMMAND}" -C "${HIP_CTEST_CONFIG_PERFORMANCE}" -R "performance_tests/" --verbose)
--
-- # Add custom target: check
-- add_custom_target(check COMMAND "${CMAKE_COMMAND}" --build . --target test DEPENDS build_tests)
--else()
-- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
--endif()
-
- #############################
- # Code analysis
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-4.1.0.patch b/var/spack/repos/builtin/packages/hip/0005-Disable-tests-4.1.0.patch
deleted file mode 100644
index e582951458..0000000000
--- a/var/spack/repos/builtin/packages/hip/0005-Disable-tests-4.1.0.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0c097d01b70f479acc7c40cde35a057fafa072ba Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Wed, 4 Aug 2021 15:00:14 +0200
-Subject: [PATCH] Disable tests
-
----
- CMakeLists.txt | 19 -------------------
- 1 file changed, 19 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a059c42..471fa97 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -488,25 +488,6 @@ if(CLANGFORMAT_EXE)
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
--#############################
--# Testing steps
--#############################
--set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
--set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
--if(HIP_PLATFORM STREQUAL "nvidia")
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--if(${RUN_HIT} EQUAL 0)
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--if(${RUN_HIT} EQUAL 0)
-- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
-- include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
-- include(${HIP_SRC_PATH}/tests/Tests.cmake)
--else()
-- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
--endif()
-
- #############################
- # Code analysis
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host_disabletests.4.5.0.patch b/var/spack/repos/builtin/packages/hip/0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host_disabletests.4.5.0.patch
deleted file mode 100644
index 8541bf45df..0000000000
--- a/var/spack/repos/builtin/packages/hip/0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host_disabletests.4.5.0.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index b1ab39e..f1459ea 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -87,7 +87,20 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
- list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
- set(HIP_VERSION_GITDATE 0)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+
-+# FIXME: Two different version strings used.
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+set(HIP_VERSION_GITHASH "0")
-+set(HIP_VERSION_PATCH_GITHASH "0")
-+set (HIP_LIB_VERSION_PATCH "0")
-+
-
- # FIXME: Two different version strings used.
- # Below we use UNIX commands, not compatible with Windows.
-@@ -132,9 +145,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-@@ -177,7 +187,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
- if (${ROCM_PATCH_VERSION} )
- set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
- else ()
-- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
-+ set (HIP_LIB_VERSION_PATCH "0")
- endif ()
- set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
- if (DEFINED ENV{ROCM_RPATH})
-@@ -484,34 +494,6 @@ if(CLANGFORMAT_EXE)
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
--#############################
--# Testing steps
--#############################
--# HIT is not compatible with Windows
--if(NOT WIN32)
--set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
--set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
--if(HIP_PLATFORM STREQUAL "nvidia")
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_INCLUDE_DIR}/hip/" "${HIP_ROOT_DIR}/include/hip/" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_DIR}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--if(${RUN_HIT} EQUAL 0)
-- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_BIN_DIR}" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
--endif()
--if(HIP_CATCH_TEST EQUAL "1")
-- enable_testing()
-- add_subdirectory(${HIP_COMMON_DIR}/tests/catch ${PROJECT_BINARY_DIR}/catch)
--else()
-- if(${RUN_HIT} EQUAL 0)
-- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
-- include(${HIP_COMMON_DIR}/tests/hit/HIT.cmake)
-- include(${HIP_COMMON_DIR}/tests/Tests.cmake)
-- else()
-- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
-- endif()
--endif()
--endif()
-
- #############################
- # Code analysis
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index 2edce6c..ee7d70c 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -212,7 +212,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
-
- if(NOT WIN32)
- set_target_properties(hip::device PROPERTIES
-- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
-+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
- )
- endif()
-@@ -271,7 +271,6 @@ if(HIP_COMPILER STREQUAL "clang")
- endif()
-
- # Add support for __fp16 and _Float16, explicitly link with compiler-rt
-- hip_add_interface_link_flags(hip::host -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
- hip_add_interface_link_flags(hip::device -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
- endif()
-
diff --git a/var/spack/repos/builtin/packages/hip/0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.0.patch b/var/spack/repos/builtin/packages/hip/0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.0.patch
deleted file mode 100644
index e2801bf47b..0000000000
--- a/var/spack/repos/builtin/packages/hip/0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.0.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/bin/hipcc b/bin/hipcc
-index 7b84067..9acccc0 100755
---- a/bin/hipcc
-+++ b/bin/hipcc
-@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){
- $targetsStr = $ENV{HCC_AMDGPU_TARGET};
- } elsif (not $isWindows) {
- # Else try using rocm_agent_enumerator
-- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
-+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
-+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
- $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
- $targetsStr =~ s/\n/,/g;
- }
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 3c6ee26..39f4310 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -88,7 +88,19 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
- list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
- set(HIP_VERSION_GITDATE 0)
-
--find_package(Git)
-+# only look for git when we have a git repo
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+set(HIP_VERSION_GITHASH "0")
-+set(HIP_VERSION_PATCH_GITHASH "0")
-+set (HIP_LIB_VERSION_PATCH "0")
-+set(HIP_VERSION_BUILD_ID 0)
-+set(HIP_VERSION_BUILD_NAME "")
-
- # FIXME: Two different version strings used.
- # Below we use UNIX commands, not compatible with Windows.
-@@ -136,9 +148,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-@@ -181,7 +190,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
- if (${ROCM_PATCH_VERSION} )
- set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
- else ()
-- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
-+ set (HIP_LIB_VERSION_PATCH "0")
- endif ()
- set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
- if (DEFINED ENV{ROCM_RPATH})
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index 274e3f1..2d024a8 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -215,7 +215,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
-
- if(NOT WIN32)
- set_target_properties(hip::device PROPERTIES
-- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
-+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
- )
- endif()
-@@ -286,7 +286,6 @@ if(HIP_COMPILER STREQUAL "clang")
- if(CLANGRT_BUILTINS-NOTFOUND)
- message(FATAL_ERROR "clangrt builtins lib not found")
- else()
-- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- endif()
- endif()
diff --git a/var/spack/repos/builtin/packages/hip/0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.2.patch b/var/spack/repos/builtin/packages/hip/0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.2.patch
deleted file mode 100644
index 9308e8635c..0000000000
--- a/var/spack/repos/builtin/packages/hip/0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.0.2.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/bin/hipcc.pl b/bin/hipcc.pl
-index 7b84067..9acccc0 100755
---- a/bin/hipcc.pl
-+++ b/bin/hipcc.pl
-@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){
- $targetsStr = $ENV{HCC_AMDGPU_TARGET};
- } elsif (not $isWindows) {
- # Else try using rocm_agent_enumerator
-- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
-+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
-+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
- $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
- $targetsStr =~ s/\n/,/g;
- }
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 20b45aa..d463d1a 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -90,7 +90,18 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
- list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
- set(HIP_VERSION_GITDATE 0)
-
--find_package(Git)
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+
-+set(HIP_PACKAGING_VERSION_PATCH "0")
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_PATCH "0")
-+set(HIP_VERSION_GITHASH "0")
-+set(HIP_VERSION_PATCH_GITHASH "0")
-+set (HIP_LIB_VERSION_PATCH "0")
-+set(HIP_VERSION_BUILD_ID 0)
-+set(HIP_VERSION_BUILD_NAME "")
-
- # FIXME: Two different version strings used.
- # Below we use UNIX commands, not compatible with Windows.
-@@ -138,9 +149,6 @@ if(GIT_FOUND)
- else()
- set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
- endif()
--else()
-- # FIXME: Some parts depend on this being set.
-- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
- ## Debian package specific variables
-@@ -183,7 +191,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
- if (${ROCM_PATCH_VERSION} )
- set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
- else ()
-- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
-+ set (HIP_LIB_VERSION_PATCH "0")
- endif ()
- set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
- if (DEFINED ENV{ROCM_RPATH})
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index 274e3f1..2d024a8 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -215,7 +215,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
-
- if(NOT WIN32)
- set_target_properties(hip::device PROPERTIES
-- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
-+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
- )
- endif()
-@@ -286,7 +286,6 @@ if(HIP_COMPILER STREQUAL "clang")
- if(CLANGRT_BUILTINS-NOTFOUND)
- message(FATAL_ERROR "clangrt builtins lib not found")
- else()
-- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- endif()
- endif()
diff --git a/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.0.patch b/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.0.patch
deleted file mode 100644
index 3c44a29bbd..0000000000
--- a/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.0.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From d3d2b2b69ac04ac1d1ead30f546fb4884fb93e27 Mon Sep 17 00:00:00 2001
-From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
-Date: Mon, 8 Aug 2022 22:26:13 +0000
-Subject: [PATCH] Improve compilation without git repo and remove compiler rt
- linkage for host and correction in CMake target path variable
-
----
- bin/hipcc.pl | 3 ++-
- hipamd/CMakeLists.txt | 12 +++++++++---
- hipamd/hip-config.cmake.in | 1 -
- 3 files changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/bin/hipcc.pl b/bin/hipcc.pl
-index 1ef3a90..995abe5 100755
---- a/bin/hipcc.pl
-+++ b/bin/hipcc.pl
-@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){
- $targetsStr = $ENV{HCC_AMDGPU_TARGET};
- } elsif (not $isWindows) {
- # Else try using rocm_agent_enumerator
-- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
-+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
-+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
- $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
- $targetsStr =~ s/\n/,/g;
- }
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 9591924..4f50c2a 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -91,7 +91,13 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
- list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
- set(HIP_VERSION_GITDATE 0)
-
--find_package(Git)
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_GITHASH "0")
-+set(HIP_VERSION_BUILD_ID 0)
-+set(HIP_VERSION_BUILD_NAME "")
-
- # FIXME: Two different version strings used.
- # Below we use UNIX commands, not compatible with Windows.
-@@ -183,7 +189,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
- if (${ROCM_PATCH_VERSION} )
- set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
- else ()
-- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
-+ set (HIP_LIB_VERSION_PATCH "0")
- endif ()
- set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
- if (DEFINED ENV{ROCM_RPATH})
-@@ -395,7 +401,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
- if(WIN32)
- install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION .)
- else()
-- install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION CONFIG_PACKAGE_INSTALL_DIR)
-+ install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR})
- endif()
- endif()
-
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index ba3e75c..02dd586 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -290,7 +290,6 @@ if(HIP_COMPILER STREQUAL "clang")
- if(CLANGRT_BUILTINS-NOTFOUND)
- message(FATAL_ERROR "clangrt builtins lib not found")
- else()
-- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- endif()
- endif()
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch b/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch
deleted file mode 100644
index e332f90ee4..0000000000
--- a/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 526da7995578ef12908a297ae6fef4db0488253e Mon Sep 17 00:00:00 2001
-From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
-Date: Tue, 16 Aug 2022 04:09:46 +0000
-Subject: [PATCH] Improve compilation without git repo and remove compiler rt
- linkage-for-host
-
----
- bin/hipcc.pl | 3 ++-
- hipamd/CMakeLists.txt | 11 ++++++++---
- hipamd/hip-config.cmake.in | 1 -
- 3 files changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/bin/hipcc.pl b/bin/hipcc.pl
-index 1ef3a90..995abe5 100755
---- a/bin/hipcc.pl
-+++ b/bin/hipcc.pl
-@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){
- $targetsStr = $ENV{HCC_AMDGPU_TARGET};
- } elsif (not $isWindows) {
- # Else try using rocm_agent_enumerator
-- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
-+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH;
-+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
- $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
- $targetsStr =~ s/\n/,/g;
- }
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index f425504..831b192 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -89,9 +89,14 @@ list(GET VERSION_LIST 1 HIP_VERSION_MINOR)
- list(GET VERSION_LIST 2 HIP_VERSION_PATCH_GITHASH)
- string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
- list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
--set(HIP_VERSION_GITDATE 0)
-+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
-+ find_package(Git)
-+endif()
-+set(HIP_VERSION_GITDATE "0")
-+set(HIP_VERSION_GITHASH "0")
-+set(HIP_VERSION_BUILD_ID 0)
-+set(HIP_VERSION_BUILD_NAME "")
-
--find_package(Git)
-
- # FIXME: Two different version strings used.
- # Below we use UNIX commands, not compatible with Windows.
-@@ -183,7 +188,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
- if (${ROCM_PATCH_VERSION} )
- set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
- else ()
-- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
-+ set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH})
- endif ()
- set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
- if (DEFINED ENV{ROCM_RPATH})
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index ba3e75c..02dd586 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -290,7 +290,6 @@ if(HIP_COMPILER STREQUAL "clang")
- if(CLANGRT_BUILTINS-NOTFOUND)
- message(FATAL_ERROR "clangrt builtins lib not found")
- else()
-- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
- endif()
- endif()
---
-2.18.4
-
diff --git a/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.0.patch b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.0.patch
new file mode 100644
index 0000000000..3dc0e6ac0c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.0.patch
@@ -0,0 +1,30 @@
+diff --git a/clr/hipamd/CMakeLists.txt b/clr/hipamd/CMakeLists.txt
+index 7ad3001..aaf6ad0 100755
+--- a/clr/hipamd/CMakeLists.txt
++++ b/clr/hipamd/CMakeLists.txt
+@@ -297,16 +297,6 @@ if(HIP_RUNTIME STREQUAL "rocclr")
+ add_subdirectory(src)
+ endif()
+
+-# Download libamdhip64.so.5
+-if(HIP_PLATFORM STREQUAL "amd")
+- if(NOT WIN32)
+- execute_process(COMMAND sh -c "${CMAKE_CURRENT_SOURCE_DIR}/download_libamhip64_v5.sh" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND_ECHO STDERR RESULT_VARIABLE DWLD_HIP_SO_RC)
+- if (DWLD_HIP_SO_RC AND NOT DWLD_HIP_SO_RC EQUAL 0)
+- message(FATAL_ERROR "Failed to download libamdhip64.so.5")
+- endif()
+- endif()
+-endif()
+-
+ # Build doxygen documentation
+ find_program(DOXYGEN_EXE doxygen)
+ if(DOXYGEN_EXE)
+@@ -408,8 +398,6 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "")
+ install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin)
+ install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin)
+ install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin)
+- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)
+- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
+ endif()
+
+ #############################
diff --git a/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.1.patch b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.1.patch
new file mode 100644
index 0000000000..d8ef3a558b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.6.1.patch
@@ -0,0 +1,21 @@
+diff --git a/clr/hipamd/CMakeLists.txt b/clr/hipamd/CMakeLists.txt
+index ccfbcee..8c3752f 100755
+--- a/clr/hipamd/CMakeLists.txt
++++ b/clr/hipamd/CMakeLists.txt
+@@ -300,16 +300,6 @@ if(HIP_RUNTIME STREQUAL "rocclr")
+ add_subdirectory(src)
+ endif()
+
+-# Download libamdhip64.so.5
+-if(HIP_PLATFORM STREQUAL "amd")
+- if(NOT WIN32)
+- execute_process(COMMAND sh -c "${CMAKE_CURRENT_SOURCE_DIR}/download_libamhip64_v5.sh" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND_ECHO STDERR RESULT_VARIABLE DWLD_HIP_SO_RC)
+- if (DWLD_HIP_SO_RC AND NOT DWLD_HIP_SO_RC EQUAL 0)
+- message(FATAL_ERROR "Failed to download libamdhip64.so.5")
+- endif()
+- endif()
+-endif()
+-
+ # Build doxygen documentation
+ find_program(DOXYGEN_EXE doxygen)
+ if(DOXYGEN_EXE)
diff --git a/var/spack/repos/builtin/packages/hip/0017-Set-PARAMETERS_MIN_ALIGNMENT-to-the-native-alignment.patch b/var/spack/repos/builtin/packages/hip/0017-Set-PARAMETERS_MIN_ALIGNMENT-to-the-native-alignment.patch
deleted file mode 100644
index cabc64fd2a..0000000000
--- a/var/spack/repos/builtin/packages/hip/0017-Set-PARAMETERS_MIN_ALIGNMENT-to-the-native-alignment.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git a/clr/rocclr/platform/kernel.hpp b/clr/rocclr/platform/kernel.hpp
-index 8cb3b7f..d441b18 100644
---- a/clr/rocclr/platform/kernel.hpp
-+++ b/clr/rocclr/platform/kernel.hpp
-@@ -159,7 +159,7 @@ class KernelParameters : protected HeapObject {
- deviceKernelArgs_(false) {
- totalSize_ = signature.paramsSize() + (signature.numMemories() +
- signature.numSamplers() + signature.numQueues()) * sizeof(void*);
-- values_ = reinterpret_cast<address>(this) + alignUp(sizeof(KernelParameters), 16);
-+ values_ = reinterpret_cast<address>(this) + alignUp(sizeof(KernelParameters), PARAMETERS_MIN_ALIGNMENT);
- memoryObjOffset_ = signature_.paramsSize();
- memoryObjects_ = reinterpret_cast<amd::Memory**>(values_ + memoryObjOffset_);
- samplerObjOffset_ = memoryObjOffset_ + signature_.numMemories() * sizeof(amd::Memory*);
-@@ -183,7 +183,7 @@ class KernelParameters : protected HeapObject {
- execNewVcop_(rhs.execNewVcop_),
- execPfpaVcop_(rhs.execPfpaVcop_),
- deviceKernelArgs_(false) {
-- values_ = reinterpret_cast<address>(this) + alignUp(sizeof(KernelParameters), 16);
-+ values_ = reinterpret_cast<address>(this) + alignUp(sizeof(KernelParameters), PARAMETERS_MIN_ALIGNMENT);
- memoryObjOffset_ = signature_.paramsSize();
- memoryObjects_ = reinterpret_cast<amd::Memory**>(values_ + memoryObjOffset_);
- samplerObjOffset_ = memoryObjOffset_ + signature_.numMemories() * sizeof(amd::Memory*);
-@@ -220,7 +220,7 @@ class KernelParameters : protected HeapObject {
- //! Allocate memory for this instance as well as the required storage for
- // the values_, defined_, and rawPointer_ arrays.
- void* operator new(size_t size, const KernelSignature& signature) {
-- size_t requiredSize = alignUp(size, 16) + signature.paramsSize() +
-+ size_t requiredSize = alignUp(size, PARAMETERS_MIN_ALIGNMENT) + signature.paramsSize() +
- (signature.numMemories() + signature.numSamplers() + signature.numQueues()) *
- sizeof(void*);
- return AlignedMemory::allocate(requiredSize, PARAMETERS_MIN_ALIGNMENT);
-diff --git a/clr/rocclr/utils/flags.hpp b/clr/rocclr/utils/flags.hpp
-index df12fe6..88848e5 100644
---- a/clr/rocclr/utils/flags.hpp
-+++ b/clr/rocclr/utils/flags.hpp
-@@ -52,7 +52,7 @@ debug(size_t, CPU_MEMORY_GUARD_PAGE_SIZE, 64, \
- "Size in KB of CPU memory guard page") \
- debug(size_t, CPU_MEMORY_ALIGNMENT_SIZE, 256, \
- "Size in bytes for the default alignment for guarded memory on CPU") \
--debug(size_t, PARAMETERS_MIN_ALIGNMENT, 16, \
-+debug(size_t, PARAMETERS_MIN_ALIGNMENT, NATIVE_ALIGNMENT_SIZE, \
- "Minimum alignment required for the abstract parameters stack") \
- debug(size_t, MEMOBJ_BASE_ADDR_ALIGN, 4*Ki, \
- "Alignment of the base address of any allocate memory object") \
-diff --git a/clr/rocclr/utils/macros.hpp b/clr/rocclr/utils/macros.hpp
-index 02fef75..e2110eb 100644
---- a/clr/rocclr/utils/macros.hpp
-+++ b/clr/rocclr/utils/macros.hpp
-@@ -126,6 +126,14 @@
- #define IS_WINDOWS false
- #endif
-
-+#if defined(__AVX512F__)
-+#define NATIVE_ALIGNMENT_SIZE 64
-+#elif defined(__AVX__)
-+#define NATIVE_ALIGNMENT_SIZE 32
-+#else
-+#define NATIVE_ALIGNMENT_SIZE 16
-+#endif
-+
- #define IF_LEFT_true(x) x
- #define IF_LEFT_false(x)
- #define IF_RIGHT_true(x)
diff --git a/var/spack/repos/builtin/packages/hip/0018-reverting-hipMemoryType-with-memoryType.patch b/var/spack/repos/builtin/packages/hip/0018-reverting-hipMemoryType-with-memoryType.patch
new file mode 100644
index 0000000000..c77075d640
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hip/0018-reverting-hipMemoryType-with-memoryType.patch
@@ -0,0 +1,17 @@
+diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h
+index 88e6850..d280504 100644
+--- a/include/hip/hip_runtime_api.h
++++ b/include/hip/hip_runtime_api.h
+@@ -259,7 +259,11 @@ typedef enum hipMemoryType {
+ * Pointer attributes
+ */
+ typedef struct hipPointerAttribute_t {
+- enum hipMemoryType type;
++ union {
++ // Deprecated, use instead type
++ enum hipMemoryType memoryType;
++ enum hipMemoryType type;
++ };
+ int device;
+ void* devicePointer;
+ void* hostPointer;
diff --git a/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch b/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch
deleted file mode 100644
index 236d591c51..0000000000
--- a/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff --git a/amdocl/cl_vk_amd.hpp b/amdocl/cl_vk_amd.hpp
-new file mode 100644
-index 0000000..8b6212b
---- /dev/null
-+++ b/amdocl/cl_vk_amd.hpp
-@@ -0,0 +1,119 @@
-+/* Copyright (c) 2010-present Advanced Micro Devices, Inc.
-+
-+Permission is hereby granted, free of charge, to any person obtaining a copy
-+of this software and associated documentation files (the "Software"), to deal
-+in the Software without restriction, including without limitation the rights
-+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+copies of the Software, and to permit persons to whom the Software is
-+furnished to do so, subject to the following conditions:
-+
-+The above copyright notice and this permission notice shall be included in
-+all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+THE SOFTWARE. */
-+
-+#pragma once
-+
-+#include "platform/context.hpp"
-+#include "platform/memory.hpp"
-+
-+namespace amd
-+{
-+ class VkObject : public InteropObject
-+ {
-+ protected:
-+ amd::Os::FileDesc handleVk_;
-+
-+ public:
-+ //! GLObject constructor initializes member variables
-+ VkObject(
-+ amd::Os::FileDesc handle
-+ ) // Initialization of member variables
-+
-+ {
-+ handleVk_ = handle;
-+ }
-+
-+ virtual ~VkObject() {}
-+ VkObject* asVkObject() { return this; }
-+ amd::Os::FileDesc getVkSharedHandle() const { return handleVk_; }
-+
-+
-+ };
-+
-+ class BufferVk : public Buffer, public VkObject
-+ {
-+ protected:
-+ //! Initializes the device memory array which is nested
-+ // after'BufferVk' object in memory layout.
-+ void initDeviceMemory() {
-+ deviceMemories_ =
-+ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(BufferVk));
-+ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory));
-+ }
-+ public:
-+ //! BufferVk constructor just calls constructors of base classes
-+ //! to pass down the parameters
-+ BufferVk(
-+ Context& amdContext,
-+ size_t uiSizeInBytes,
-+ amd::Os::FileDesc handle)
-+ : // Call base classes constructors
-+ Buffer(
-+ amdContext,
-+ 0,
-+ uiSizeInBytes
-+ ),
-+ VkObject(
-+ handle
-+ )
-+ {
-+ setInteropObj(this);
-+ }
-+ virtual ~BufferVk() {}
-+
-+ BufferVk* asBufferVk() { return this; }
-+ };
-+
-+ // to be modified once image requirments are known, for now, implement like buffer
-+
-+ class ImageVk : public Buffer, public VkObject
-+ {
-+ protected:
-+ //! Initializes the device memory array which is nested
-+ // after'ImageVk' object in memory layout.
-+ void initDeviceMemory() {
-+ deviceMemories_ =
-+ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(ImageVk));
-+ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory));
-+ }
-+ public:
-+ //! ImageVk constructor just calls constructors of base classes
-+ //! to pass down the parameters
-+ ImageVk(
-+ Context& amdContext,
-+ size_t uiSizeInBytes,
-+ amd::Os::FileDesc handle)
-+ : // Call base classes constructors
-+ Buffer(
-+ amdContext,
-+ 0,
-+ uiSizeInBytes
-+ ),
-+ VkObject(
-+ handle
-+ )
-+ {
-+ setInteropObj(this);
-+ }
-+ virtual ~ImageVk() {}
-+
-+ ImageVk* asImageVk() { return this; }
-+ };
-+}
diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py
index 29b23fecca..8a65beeba1 100644
--- a/var/spack/repos/builtin/packages/hip/package.py
+++ b/var/spack/repos/builtin/packages/hip/package.py
@@ -6,6 +6,7 @@
import os
import re
+import spack.build_environment
from spack.hooks.sbang import filter_shebang
from spack.package import *
from spack.util.prefix import Prefix
@@ -16,9 +17,9 @@ class Hip(CMakePackage):
create portable applications for AMD and NVIDIA GPUs from
single source code."""
- homepage = "https://github.com/ROCm-Developer-Tools/HIP"
- git = "https://github.com/ROCm-Developer-Tools/HIP.git"
- url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/HIP"
+ git = "https://github.com/ROCm/HIP.git"
+ url = "https://github.com/ROCm/HIP/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "haampie")
@@ -27,101 +28,44 @@ class Hip(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("6.2.4", sha256="76e4583ae3d31786270fd92abbb2e3dc5e665b22fdedb5ceff0093131d4dc0ca")
+ version("6.2.1", sha256="a8b86666a59867cae67409c4a45e0b8f29a6328c9739e6512c2b5612376f30cf")
+ version("6.2.0", sha256="7ca261eba79793427674bf2372c92ac5483cc0fac5278f8ad611de396fad8bee")
+ version("6.1.2", sha256="9ba5f70a553b48b2cea25c7e16b97ad49320750c0152763b173b63b9f151e783")
+ version("6.1.1", sha256="09e8013b8071fca2cf914758001bbd1dccaa237e798e945970e4356cb9b90050")
+ version("6.1.0", sha256="6fd57910a16d0b54df822807e67b6207146233a2de5a46c6a05b940a21e2c4d7")
+ version("6.0.2", sha256="b47178db94f2acc106e1a88ceb029844805266ebaba11ef63744e90d224b11be")
+ version("6.0.0", sha256="0d575788e0b731124a8489a36652014a165b9ebab92d5456ec3c976e062f3a82")
version("5.7.1", sha256="eaa0e14a9ae45c58ed37863797b683a7778b3cbbf92f5b6529ec65fd61d61f3e")
version("5.7.0", sha256="cb61234eec7879fb7e20937659ad535b93a6e66fc8de0a543da8b7702474f2fc")
version("5.6.1", sha256="4b3c4dfcf8595da0e1b8c3e8067b1ccebeaac337762ff098db14375fa8dd4487")
version("5.6.0", sha256="a8237768c1ae70029d972376f8d279f4de18a1e6106fff6215d1e16847bc375e")
version("5.5.1", sha256="1f5f6bb72d8d64335ccc8242ef2e2ea8efeb380cce2997f475b1ee77528d9fb4")
version("5.5.0", sha256="5b0d0253e62f85cc21d043513f7c11c64e4a4ec416159668f0b160d732d09a3c")
- version("5.4.3", sha256="23e51d3af517cd63019f8d199e46b84d5a18251d148e727f3985e8d99ccb0e58")
- version("5.4.0", sha256="e290f835d69ef23e8b5833a7e616b0a989ff89ada4412d9742430819546efc6c")
- version("5.3.3", sha256="51d4049dc37d261afb9e1270e60e112708ff06b470721ff21023e16e040e4403")
- version("5.3.0", sha256="05225832fb5a4d24f49a773ac27e315239943a6f24291a50d184e2913f2cdbe0")
- version("5.2.3", sha256="5b83d1513ea4003bfad5fe8fa741434104e3e49a87e1d7fad49e5a8c1d06e57b")
- version("5.2.1", sha256="7d4686a2f8a9124bb21f7f3958e451c57019f48a0cbb42ffdc56ed02860a46c3")
- version("5.2.0", sha256="a6e0515d4d25865c037b546035df9c51f0882cd2700e759c266ff7e199f37c3a")
- version("5.1.3", sha256="ce755ee6e407904eba3f6b3c9efcdd48eb4f58a26b06e1892166d05f19a75973")
- version("5.1.0", sha256="47e542183699f4005c48631d96f6a1fbdf27e07ad3402ccd7b5f707c2c602266")
- version(
- "5.0.2",
- sha256="e23601e6f4f62083899ea6356fffbe88d1deb20fa61f2c970e3c0474cd8886ca",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="ae12fcda2d955f04a51c9e794bdb0fa96539cda88b6de8e377850e68e7c2a781",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="c2113dc3c421b8084cd507d91b6fbc0170765a464b71fb0d96bb875df368f160",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="4026f31fb4f8050e9aa9d4294f29c3410bfb38422dbbae4236ccd65fed4d55b2",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="955311193819f487f9a2d64bffe07c4b8c3a0dc644dc3ad984f7c66a325bdd6f",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="293b5025b5e153f2f25e465a2e0006a2b4606db7b7ec2ae449f8a4c0b52d491b",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="ecb929e0fc2eaaf7bbd16a1446a876a15baf72419c723734f456ee62e70b4c24",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="e21c10b62868ece7aa3c8413ec0921245612d16d86d81fe61797bf9a64bc37eb",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="d7b78d96cec67c55b74ea3811ce861b16d300410bc687d0629e82392e8d7c857",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="0082c402f890391023acdfd546760f41cb276dffc0ffeddc325999fd2331d4e8",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="25ad58691456de7fd9e985629d0ed775ba36a2a0e0b21c086bd96ba2fb0f7ed1",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="6450baffe9606b358a4473d5f3e57477ca67cff5843a84ee644bcf685e75d839",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="757b392c3beb29beea27640832fbad86681dbd585284c19a4c2053891673babd",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="ae8384362986b392288181bcfbe5e3a0ec91af4320c189bd83c844ed384161b3",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="23e51d3af517cd63019f8d199e46b84d5a18251d148e727f3985e8d99ccb0e58")
+ version("5.4.0", sha256="e290f835d69ef23e8b5833a7e616b0a989ff89ada4412d9742430819546efc6c")
+ version("5.3.3", sha256="51d4049dc37d261afb9e1270e60e112708ff06b470721ff21023e16e040e4403")
+ version("5.3.0", sha256="05225832fb5a4d24f49a773ac27e315239943a6f24291a50d184e2913f2cdbe0")
variant("rocm", default=True, description="Enable ROCm support")
variant("cuda", default=False, description="Build with CUDA")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
+ conflicts("~rocm +asan", msg="ROCm must be enabled for asan")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("cuda", when="+cuda")
- depends_on("cmake@3.16.8:", type=("build"), when="@4.5.0:")
- depends_on("cmake@3.4.3:", type="build")
+ depends_on("cmake@3.16.8:", type="build")
+ depends_on("libedit", type="build")
depends_on("perl@5.10:", type=("build", "run"))
test_requires_compiler = True
@@ -129,39 +73,9 @@ class Hip(CMakePackage):
with when("+rocm"):
depends_on("gl@4.5:")
depends_on("py-cppheaderparser", type="build", when="@5.3.3:")
+ depends_on("libx11", when="+asan")
+ depends_on("xproto", when="+asan")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- ]:
- depends_on("hip-rocclr@" + ver, when="@" + ver)
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -172,22 +86,70 @@ class Hip(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", when=f"@{ver}")
+ depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.4.0",
+ "5.4.3",
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@{0} +rocm-device-libs".format(ver), when="@" + ver)
- depends_on("rocminfo@" + ver, when="@" + ver)
- depends_on("roctracer-dev-api@" + ver, when="@" + ver)
-
- for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("hipify-clang", when="@" + ver)
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"hipify-clang@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
+
# hipcc likes to add `-lnuma` by default :(
- # ref https://github.com/ROCm-Developer-Tools/HIP/pull/2202
+ # ref https://github.com/ROCm/HIP/pull/2202
depends_on("numactl", when="@3.7.0:")
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hipcc@{ver}", when=f"@{ver}")
+
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocprofiler-register@{ver}", when=f"@{ver}")
+
# roc-obj-ls requirements
depends_on("perl-file-which")
depends_on("perl-uri-encode")
@@ -200,26 +162,15 @@ class Hip(CMakePackage):
("5.4.0", "c4b79738eb6e669160382b6c47d738ac59bd493fc681ca400ff012a2e8212955"),
("5.3.3", "36acce92af39b0fa06002e164f5a7f5a9c7daa19bf96645361325775a325499d"),
("5.3.0", "81e9bd5209a7b400c986f9bf1d7079bcf7169bbcb06fc4fe843644559a4d612e"),
- ("5.2.3", "5031d07554ce07620e24e44d482cbc269fa972e3e35377e935d2694061ff7c04"),
- ("5.2.1", "4feaa3883cbc54ddcd5d2d5becbe0f3fe3edd5b3b468dc73b5104893029eefac"),
- ("5.2.0", "8774958bebc29a4b7eb9dc2d38808d79d9a24bf9c1f44e801ff99d2d5ba82240"),
- ("5.1.3", "707f2217f0e7aeb62d7b76830a271056d665542bf5f7a54e40adf4d5f299ca93"),
- ("5.1.0", "77984854bfe00f938353fe4c7604d09967eaf5c609d05f1e6423d3c3dea86e61"),
- ("5.0.2", "80e7268dd22eba0f2f9222932480dede1d80e56227c0168c6a0cc8e4f23d3b76"),
- ("5.0.0", "cbd95a577abfd7cbffee14a4848f7789a417c6e5e5a713f42eb75d7948abcdf9"),
- ("4.5.2", "b6f35b1a1d0c466b5af28e26baf646ae63267eccc4852204db1e0c7222a39ce2"),
- ("4.5.0", "7b93ab64d6894ff9b5ba0be35e3ed8501d6b18a2a14223d6311d72ab8a9cdba6"),
]:
resource(
name="hipamd",
- url="https://github.com/ROCm-Developer-Tools/hipamd/archive/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/hipamd/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="hipamd",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
# Add opencl sources thru the below
for d_version, d_shasum in [
@@ -229,26 +180,15 @@ class Hip(CMakePackage):
("5.4.0", "a294639478e76c75dac0e094b418f9bd309309b07faf6af126cdfad9aab3c5c7"),
("5.3.3", "cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f"),
("5.3.0", "d251e2efe95dc12f536ce119b2587bed64bbda013969fa72be58062788044a9e"),
- ("5.2.3", "932ea3cd268410010c0830d977a30ef9c14b8c37617d3572a062b5d4595e2b94"),
- ("5.2.1", "eb4ff433f8894ca659802f81792646034f8088b47aca6ad999292bcb8d6381d5"),
- ("5.2.0", "80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0"),
- ("5.1.3", "44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31"),
- ("5.1.0", "362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927"),
- ("5.0.2", "3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95"),
- ("5.0.0", "2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be"),
- ("4.5.2", "96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d"),
- ("4.5.0", "3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8"),
]:
resource(
name="opencl",
- url="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/ROCm-OpenCL-Runtime/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="opencl",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
for d_version, d_shasum in [
("5.5.1", "1375fc7723cfaa0ae22a78682186d4804188b0a54990bfd9c0b8eb421b85e37e"),
@@ -257,29 +197,26 @@ class Hip(CMakePackage):
("5.4.0", "46a1579310b3ab9dc8948d0fb5bed4c6b312f158ca76967af7ab69e328d43138"),
("5.3.3", "f8133a5934f9c53b253d324876d74f08a19e2f5b073bc94a62fe64b0d2183a18"),
("5.3.0", "2bf14116b5e2270928265f5d417b3d0f0f2e13cbc8ec5eb8c80d4d4a58ff7e94"),
- ("5.2.3", "0493c414d4db1af8e1eb30a651d9512044644244488ebb13478c2138a7612998"),
- ("5.2.1", "465ca9fa16869cd89dab8c2d66d9b9e3c14f744bbedaa1d215b0746d77a500ba"),
- ("5.2.0", "37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb"),
- ("5.1.3", "ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48"),
- ("5.1.0", "f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa"),
- ("5.0.2", "34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e"),
- ("5.0.0", "6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724"),
- ("4.5.2", "6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1"),
- ("4.5.0", "ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e"),
]:
resource(
name="rocclr",
- url="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/ROCclr/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="rocclr",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
# Add hip-clr sources thru the below
for d_version, d_shasum in [
+ ("6.2.4", "0a3164af7f997a4111ade634152957378861b95ee72d7060eb01c86c87208c54"),
+ ("6.2.1", "e9cff3a8663defdbda833d49c9e7160171eca14dc285ffe4061378607d6c890d"),
+ ("6.2.0", "620e4c6a7f05651cc7a170bc4700fef8cae002420307a667c638b981d00b25e8"),
+ ("6.1.2", "1a1e21640035d957991559723cd093f0c7e202874423667d2ba0c7662b01fea4"),
+ ("6.1.1", "2db02f335c9d6fa69befcf7c56278e5cecfe3db0b457eaaa41206c2585ef8256"),
+ ("6.1.0", "49b23eef621f4e8e528bb4de8478a17436f42053a2f7fde21ff221aa683205c7"),
+ ("6.0.2", "cb8ac610c8d4041b74fb3129c084f1e7b817ce1a5a9943feca1fa7531dc7bdcc"),
+ ("6.0.0", "798b55b5b5fb90dd19db54f136d8d8e1da9ae1e408d5b12b896101d635f97e50"),
("5.7.1", "c78490335233a11b4d8a5426ace7417c555f5e2325de10422df06c0f0f00f7eb"),
("5.7.0", "bc2447cb6fd86dff6a333b04e77ce85755104d9011a14a044af53caf02449573"),
("5.6.1", "0b88af1e99643899d11b1c8cf8a3c46601051b328a5e0ffbd44ee88b7eb0db33"),
@@ -287,14 +224,27 @@ class Hip(CMakePackage):
]:
resource(
name="clr",
- url="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/clr/archive/refs/tags/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="clr",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
+ )
+
+ # For avx build, the start address of values_ buffer in KernelParameters is not
+ # correct as it is computed based on 16-byte alignment.
+ patch(
+ "https://github.com/ROCm/clr/commit/c4f773db0b4ccbbeed4e3d6c0f6bff299c2aa3f0.patch?full_index=1",
+ sha256="5bb9b0e08888830ccf3a0a658529fe25f4ee62b5b8890f349bf2cc914236eb2f",
+ working_dir="clr",
+ when="@5.7:6.0",
+ )
+ patch(
+ "https://github.com/ROCm/clr/commit/7868876db742fb4d44483892856a66d2993add03.patch?full_index=1",
+ sha256="7668b2a710baf4cb063e6b00280fb75c4c3e0511575e8298a9c7ae5143f60b33",
+ working_dir="clr",
+ when="@5.7:6.0",
)
# Add hipcc sources thru the below
@@ -306,17 +256,44 @@ class Hip(CMakePackage):
]:
resource(
name="hipcc",
- url="https://github.com/ROCm-Developer-Tools/HIPCC/archive/refs/tags/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/HIPCC/archive/refs/tags/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="hipcc",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
+ # Add hipother sources thru the below
+ for d_version, d_shasum in [
+ ("6.2.4", "b7ebcf8a2679e50d27c49ebec0dbea5a67573f8b8c3f4a29108c84b28b5bedee"),
+ ("6.2.1", "5d99e498c1fece44a421574282fc89c6a2499979eaa9f850e5caa7fa3a8938b8"),
+ ("6.2.0", "1f854b0c07d71b10450080e3bbffe47adaf10a9745a9212797d991756a100174"),
+ ("6.1.2", "2740d1e3dcf1f2d07d2a8db6acf4c972941ae392172b83fd8ddcfe8706a40d0b"),
+ ("6.1.1", "8b975623c8ed1db53feea2cfd5d29f2a615e890aee1157d0d17adeb97200643f"),
+ ("6.1.0", "43a48ccc82f705a15852392ee7419e648d913716bfc04063a53d2d17979b1b46"),
+ ("6.0.2", "0bebb3774debcecc0b29a0cc5aa98e373a3ee7acf161503d0d9c9d0ecc8b8010"),
+ ("6.0.0", "d3bf62cc17c3c44fea52b34bcbf725e7af1afc3542c2884cefcd41f65371f552"),
+ ]:
+ resource(
+ name="hipother",
+ url=f"https://github.com/ROCm/hipother/archive/refs/tags/rocm-{d_version}.tar.gz",
+ sha256=d_shasum,
+ expand=True,
+ destination="",
+ placement="hipother",
+ when=f"@{d_version} +cuda",
+ )
+
# Add hiptests sources thru the below
for d_version, d_shasum in [
+ ("6.2.4", "1478b49583d09cb3a96e26ec3bf8dc5ff3e3ec72fa133bb6d7768595d825051e"),
+ ("6.2.1", "90fcf0169889533b882d289f9cb8a7baf9bd46a3ce36752b915083931dc839f1"),
+ ("6.2.0", "314837dbac78be71844ceb959476470c484fdcd4fb622ff8de9277783e0fcf1c"),
+ ("6.1.2", "5b14e4a30d8d8fb56c43e262009646ba9188eac1c8ff882d9a606a4bec69b56b"),
+ ("6.1.1", "10c96ee72adf4580056292ab17cfd858a2fd7bc07abeb41c6780bd147b47f7af"),
+ ("6.1.0", "cf3a6a7c43116032d933cc3bc88bfc4b17a4ee1513c978e751755ca11a5ed381"),
+ ("6.0.2", "740ca064f4909c20d83226a63c2f164f7555783ec5f5f70be5bc23d3587ad829"),
+ ("6.0.0", "e8f92a0f5d1f6093ca1fb24ff1b7140128900fcdc6e9f01f153d6907e5c2d807"),
("5.7.1", "28fbdf49f405adfee903bc0f05a43ac392c55b34c514c3582dfb7d6d67e79985"),
("5.7.0", "b1dae3cfc715e71dce92ac1da94265a9398944c76cee85ffab8f0c93665a48d6"),
("5.6.1", "5b3002ddfafda162329e4d9e6ac1200eeb48ff08e666b342aa8aeca30750f48b"),
@@ -324,97 +301,38 @@ class Hip(CMakePackage):
]:
resource(
name="hip-tests",
- url="https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="hip-tests",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
- # Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks
- # in the parent directory of the package, which is incompatible with spack.
- # In hipcc the ROCM_PATH variable is used to point to the parent directory
- # of the package. With the following patch we should never hit code that
- # uses the ROCM_PATH variable again; just to be sure we set it to an empty
- # string.
- patch("0001-Make-it-possible-to-specify-the-package-folder-of-ro.patch", when="@3.5.0:4.5.3")
- patch(
- "0010-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- ".5.0.0.patch",
- when="@5.0.0",
- )
- patch(
- "0011-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- ".5.0.2.patch",
- when="@5.0.2:5.1.3",
- )
# Improve compilation without git repo and remove compiler rt linkage
# for host and correction in CMake target path variable and
# correcting the CMake path variable.
- patch(
- "0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- ".5.2.0.patch",
- when="@5.2.0",
- )
- patch(
- "0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- ".5.2.1.patch",
- when="@5.2.1:5.2.3",
- )
patch("0013-remove-compiler-rt-linkage-for-host.5.3.0.patch", when="@5.3.0:5.4")
-
- # See https://github.com/ROCm-Developer-Tools/HIP/pull/2141
- patch("0002-Fix-detection-of-HIP_CLANG_ROOT.patch", when="@:3.9.0")
-
- # See https://github.com/ROCm-Developer-Tools/HIP/pull/2218
- patch("0003-Improve-compilation-without-git-repo.3.7.0.patch", when="@3.7.0:3.9.0")
- patch("0003-Improve-compilation-without-git-repo.3.10.0.patch", when="@3.10.0:4.0.0")
- patch("0003-Improve-compilation-without-git-repo.4.1.0.patch", when="@4.1.0")
- patch(
- "0003-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- ".4.2.0.patch",
- when="@4.2.0:4.3.2",
- )
- patch(
- "0009-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host"
- "_disabletests.4.5.0.patch",
- when="@4.5.0:4.5.3",
- )
- # See https://github.com/ROCm-Developer-Tools/HIP/pull/2219
- patch("0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch", when="@3.7.0:3.9.0")
- patch("0004-Drop-clang-rt-builtins-linking-on-hip-host.3.10.0.patch", when="@3.10.0:4.1.0")
-
- # Tests are broken when using cmake 3.21
- with when("^cmake@3.21.0:"):
- patch("0005-Disable-tests-3.5.0.patch", when="@3.5.0")
- patch("0005-Disable-tests-3.6.0.patch", when="@3.6.0:3.8.0")
- patch("0005-Disable-tests-3.9.0.patch", when="@3.9.0:4.0.0")
- patch("0005-Disable-tests-4.1.0.patch", when="@4.1.0:4.3.2")
-
- patch("Add_missing_open_cl_header_file_for_4.3.0.patch", when="@4.3.0:4.3.2")
patch("0014-hip-test-file-reorg-5.4.0.patch", when="@5.4.0:5.5")
patch("0016-hip-sample-fix-hipMalloc-call.patch", when="@5.4.3:5.5")
patch("0014-remove-compiler-rt-linkage-for-host.5.5.0.patch", when="@5.5")
patch("0014-remove-compiler-rt-linkage-for-host.5.6.0.patch", when="@5.6.0:5.6")
patch("0014-Remove-compiler-rt-linkage-for-host-for-5.7.0.patch", when="@5.7.0:5.7")
- patch("0015-reverting-operator-mixup-fix-for-slate.patch", when="@5.6:")
- patch("0017-Set-PARAMETERS_MIN_ALIGNMENT-to-the-native-alignment.patch", when="@5.7")
+ patch("0014-remove-compiler-rt-linkage-for-host.6.0.patch", when="@6.0")
+ patch("0014-remove-compiler-rt-linkage-for-host.6.1.patch", when="@6.1")
+ patch("0015-reverting-operator-mixup-fix-for-slate.patch", when="@5.6:6.0")
+ patch("0018-reverting-hipMemoryType-with-memoryType.patch", when="@6.0:")
- # See https://github.com/ROCm-Developer-Tools/HIP/pull/3206
+ # See https://github.com/ROCm/HIP/pull/3206
patch(
- "https://github.com/ROCm-Developer-Tools/HIP/commit/50ee82f6bc4aad10908ce09198c9f7ebfb2a3561.patch?full_index=1",
+ "https://github.com/ROCm/HIP/commit/50ee82f6bc4aad10908ce09198c9f7ebfb2a3561.patch?full_index=1",
sha256="c2ee21cdc55262c7c6ba65546b5ca5f65ea89730",
- when="@5.2:",
+ when="@5.2:5.7",
)
@property
def root_cmakelists_dir(self):
- if self.spec.satisfies("@:4.3.2"):
- return self.stage.source_path
- elif self.spec.satisfies("@4.5:5.5"):
+ if self.spec.satisfies("@4.5:5.5"):
return "hipamd"
else:
return "clr"
@@ -465,13 +383,14 @@ class Hip(CMakePackage):
"rocminfo": rocm_prefix,
"comgr": rocm_prefix,
"rocm-device-libs": rocm_prefix,
+ "hipify-clang": rocm_prefix,
}
- if self.spec.satisfies("@5.4:"):
- paths["hipify-clang"] = rocm_prefix
-
if self.spec.satisfies("@5.7:"):
paths["hip-path"] = rocm_prefix
+ if self.spec.satisfies("@6.0:"):
+ paths["hsa-rocr-dev"] = rocm_prefix
+
else:
paths = {
"hip-path": self.spec.prefix,
@@ -481,14 +400,9 @@ class Hip(CMakePackage):
"rocminfo": self.spec["rocminfo"].prefix,
"comgr": self.spec["comgr"].prefix,
"rocm-device-libs": self.spec["llvm-amdgpu"].prefix,
+ "hipify-clang": self.spec["hipify-clang"].prefix,
}
-
- if self.spec.satisfies("@5.4:"):
- paths["hipify-clang"] = self.spec["hipify-clang"].prefix
- if "@:3.8.0" in self.spec:
- paths["bitcode"] = paths["rocm-device-libs"].lib
- else:
- paths["bitcode"] = paths["rocm-device-libs"].amdgcn.bitcode
+ paths["bitcode"] = paths["rocm-device-libs"].amdgcn.bitcode
return paths
@@ -514,14 +428,13 @@ class Hip(CMakePackage):
env.set("ROCM_PATH", paths["rocm-path"])
if self.spec.satisfies("@5.4:"):
env.set("HIPIFY_CLANG_PATH", paths["hipify-clang"])
+ if self.spec.satisfies("@6.1:"):
+ env.prepend_path("LD_LIBRARY_PATH", paths["hsa-rocr-dev"].lib)
# hipcc recognizes HIP_PLATFORM == hcc and HIP_COMPILER == clang, even
# though below we specified HIP_PLATFORM=rocclr and HIP_COMPILER=clang
# in the CMake args.
- if self.spec.satisfies("@:4.0.0"):
- env.set("HIP_PLATFORM", "hcc")
- else:
- env.set("HIP_PLATFORM", "amd")
+ env.set("HIP_PLATFORM", "amd")
env.set("HIP_COMPILER", "clang")
@@ -533,7 +446,7 @@ class Hip(CMakePackage):
# This is a variable that does not exist in hipcc but was introduced
# in a patch of ours since 3.5.0 to locate rocm_agent_enumerator:
- # https://github.com/ROCm-Developer-Tools/HIP/pull/2138
+ # https://github.com/ROCm/HIP/pull/2138
env.set("ROCMINFO_PATH", paths["rocminfo"])
# This one is used in hipcc to run `clang --hip-device-lib-path=...`
@@ -544,11 +457,13 @@ class Hip(CMakePackage):
env.set("HIP_DEVICE_LIB_PATH", paths["bitcode"])
# Just the prefix of hip (used in hipcc)
- env.set("HIP_PATH", paths["hip-path"])
+ # Deprecated in 5.1.0 and breaks hipcc in 5.5.1+
+ if self.spec.satisfies("@:5.4"):
+ env.set("HIP_PATH", paths["hip-path"])
# Used in comgr and seems necessary when using the JIT compiler, e.g.
# hiprtcCreateProgram:
- # https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/rocm-4.0.0/lib/comgr/src/comgr-env.cpp
+ # https://github.com/ROCm/ROCm-CompilerSupport/blob/rocm-4.0.0/lib/comgr/src/comgr-env.cpp
env.set("LLVM_PATH", paths["llvm-amdgpu"])
env.set("COMGR_PATH", paths["comgr"])
@@ -560,18 +475,30 @@ class Hip(CMakePackage):
# and parsing of the <prefix>/bin/.hipVersion file. Let's just set this
# to the hip prefix directory for non-external builds so that the
# bin/.hipVersion file can still be parsed.
- # See also https://github.com/ROCm-Developer-Tools/HIP/issues/2223
- if "@3.8.0:" in self.spec:
- env.append_path(
- "HIPCC_COMPILE_FLAGS_APPEND",
- "--rocm-path={0}".format(paths["rocm-path"]),
- separator=" ",
- )
+ # See also https://github.com/ROCm/HIP/issues/2223
+ env.append_path(
+ "HIPCC_COMPILE_FLAGS_APPEND",
+ "--rocm-path={0}".format(paths["rocm-path"]),
+ separator=" ",
+ )
elif self.spec.satisfies("+cuda"):
env.set("CUDA_PATH", self.spec["cuda"].prefix)
env.set("HIP_PATH", self.spec.prefix)
env.set("HIP_PLATFORM", "nvidia")
+ # Set up hipcc/hip-clang to use the specific GCC toolchain that is
+ # being used to compile. This is only important for external ROCm
+ # installations, which may otherwise pick up the wrong GCC toolchain.
+ if self.spec.external and self.spec.satisfies("%gcc"):
+ # This is picked up by hipcc.
+ env.append_path(
+ "HIPCC_COMPILE_FLAGS_APPEND",
+ f"--gcc-toolchain={self.compiler.prefix}",
+ separator=" ",
+ )
+ # This is picked up by CMake when using HIP as a CMake language.
+ env.append_path("HIPFLAGS", f"--gcc-toolchain={self.compiler.prefix}", separator=" ")
+
def setup_build_environment(self, env):
self.set_variables(env)
@@ -593,13 +520,6 @@ class Hip(CMakePackage):
self.spec.hipcc = join_path(self.prefix.bin, "hipcc")
def patch(self):
- if self.spec.satisfies("@:4.3.2"):
- filter_file(
- 'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"',
- 'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"',
- "hip-config.cmake.in",
- string=True,
- )
if self.spec.satisfies("@5.2:5.4 +rocm"):
filter_file(
'"${ROCM_PATH}/llvm"',
@@ -621,85 +541,36 @@ class Hip(CMakePackage):
"clr/hipamd/hip-config-amd.cmake",
string=True,
)
- filter_file(
- '"${ROCM_PATH}/llvm"',
- self.spec["llvm-amdgpu"].prefix,
- "clr/hipamd/src/hiprtc/CMakeLists.txt",
- string=True,
- )
perl = self.spec["perl"].command
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
-
- with working_dir("bin"):
- match = "^#!/usr/bin/perl"
- substitute = "#!{perl}".format(perl=perl)
-
- if self.spec.satisfies("@:4.0.0"):
- files = ["hipify-perl", "hipcc", "extractkernel", "hipconfig", "hipify-cmakefile"]
- elif self.spec.satisfies("@4.0.0:4.3.2"):
- files = [
- "hipify-perl",
- "hipcc",
- "roc-obj-extract",
- "hipconfig",
- "hipify-cmakefile",
- "roc-obj-ls",
- "hipvars.pm",
- ]
- elif self.spec.satisfies("@4.5.0:5.5"):
- files = []
- filter_file(match, substitute, *files, **kwargs)
- # This guy is used during the cmake phase, so we have to fix the
- # shebang already here in case it is too long.
+
+ if self.spec.satisfies("@:5.5"):
+ with working_dir("bin"):
filter_shebang("hipconfig")
- if self.spec.satisfies("@4.5.0:5.5"):
- perl = self.spec["perl"].command
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
with working_dir("hipamd/bin"):
- match = "^#!/usr/bin/perl"
- substitute = "#!{perl}".format(perl=perl)
- files = ["roc-obj-extract", "roc-obj-ls"]
- filter_file(match, substitute, *files, **kwargs)
- if self.spec.satisfies("@5.6.0:"):
- perl = self.spec["perl"].command
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
- match = "^#!/usr/bin/perl"
- substitute = "#!{perl}".format(perl=perl)
+ filter_file("^#!/usr/bin/perl", f"#!{perl}", "roc-obj-extract", "roc-obj-ls")
+ if self.spec.satisfies("@5.6:"):
with working_dir("clr/hipamd/bin"):
- files = ["roc-obj-extract", "roc-obj-ls"]
- filter_file(match, substitute, *files, **kwargs)
+ filter_file("^#!/usr/bin/perl", f"#!{perl}", "roc-obj-extract", "roc-obj-ls")
+ if self.spec.satisfies("@5.6:5.7"):
with working_dir("hipcc/bin"):
- files = []
- filter_file(match, substitute, *files, **kwargs)
filter_shebang("hipconfig")
- if "@3.7.0: +rocm" in self.spec:
- numactl = self.spec["numactl"].prefix.lib
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
- with working_dir("bin"):
- match = " -lnuma"
- substitute = " -L{numactl} -lnuma".format(numactl=numactl)
- if self.spec.satisfies("@4.5.0:5.5"):
- filter_file(match, substitute, "hipcc", **kwargs)
- if "@5.6.0: +rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
numactl = self.spec["numactl"].prefix.lib
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
-
- with working_dir("hipcc/src"):
- match = " -lnuma"
- substitute = " -L{numactl} -lnuma".format(numactl=numactl)
- filter_file(match, substitute, "hipBin_amd.h", **kwargs)
-
- def flag_handler(self, name, flags):
- if name == "cxxflags" and self.spec.satisfies("@3.7.0:4.3.2"):
- incl = self.spec["hip-rocclr"].prefix.include
- flags.append("-I {0}/compiler/lib/include".format(incl))
- flags.append("-I {0}/elf".format(incl))
-
- return (flags, None, None)
+ if self.spec.satisfies("@:5.5"):
+ with working_dir("bin"):
+ filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipcc")
+ elif self.spec.satisfies("@5.6:5.7"):
+ with working_dir("hipcc/src"):
+ filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipBin_amd.h")
def cmake_args(self):
- args = []
+ args = [
+ # find_package(Clang) and find_package(LLVM) in clr/hipamd/src/hiprtc/CMakeLists.txt
+ # should find llvm-amdgpu
+ self.define("LLVM_ROOT", self.spec["llvm-amdgpu"].prefix),
+ self.define("Clang_ROOT", self.spec["llvm-amdgpu"].prefix),
+ ]
if self.spec.satisfies("+rocm"):
args.append(self.define("HSA_PATH", self.spec["hsa-rocr-dev"].prefix))
args.append(self.define("HIP_COMPILER", "clang"))
@@ -709,33 +580,49 @@ class Hip(CMakePackage):
self.spec["roctracer-dev-api"].prefix.roctracer.include.ext,
)
)
- if self.spec.satisfies("@:4.0.0"):
- args.append(self.define("HIP_RUNTIME", "ROCclr"))
- args.append(self.define("HIP_PLATFORM", "rocclr"))
- else:
- args.append(self.define("HIP_RUNTIME", "rocclr"))
- args.append(self.define("HIP_PLATFORM", "amd"))
+ args.append(self.define("HIP_RUNTIME", "rocclr"))
+ args.append(self.define("HIP_PLATFORM", "amd"))
+ if self.spec.satisfies("@5.6.0:"):
+ args.append(self.define("HIP_LLVM_ROOT", self.spec["llvm-amdgpu"].prefix))
+ if self.spec.satisfies("@6.1.0:") and self.spec.satisfies("+asan"):
+ args.append(self.define("ADDRESS_SANITIZER", "ON"))
+ args.append(
+ self.define("CMAKE_C_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ )
+ args.append(
+ self.define(
+ "CMAKE_CXX_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++"
+ )
+ )
+ args.append(
+ self.define(
+ "CMAKE_CXX_FLAGS",
+ f"-I{self.spec['libx11'].prefix.include} "
+ f"-I{self.spec['mesa'].prefix.include} "
+ f"-I{self.spec['xproto'].prefix.include}",
+ )
+ )
+
if self.spec.satisfies("+cuda"):
args.append(self.define("HIP_PLATFORM", "nvidia"))
+ args.append(self.define("HIPNV_DIR", self.stage.source_path + "/hipother/hipnv"))
- # LIBROCclr_STATIC_DIR is unused from 3.6.0 and above
- if "@3.5.0:4.3.2" in self.spec:
- args.append(self.define("LIBROCclr_STATIC_DIR", self.spec["hip-rocclr"].prefix.lib))
- if "@4.5.0:" in self.spec:
- args.append(self.define("HIP_COMMON_DIR", self.stage.source_path))
- args.append(self.define("HIP_CATCH_TEST", "OFF"))
- if "@4.5.0:5.5" in self.spec:
+ args.append(self.define("HIP_COMMON_DIR", self.stage.source_path))
+ args.append(self.define("HIP_CATCH_TEST", "OFF"))
+ if self.spec.satisfies("@:5.5"):
args.append(self.define("ROCCLR_PATH", self.stage.source_path + "rocclr"))
args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "opencl"))
- if "@5.3.0:" in self.spec:
+ if self.spec.satisfies("@5.3.0:"):
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
- if "@5.6.0:" in self.spec:
+ if self.spec.satisfies("@5.6.0:"):
args.append(self.define("ROCCLR_PATH", self.stage.source_path + "/clr/rocclr"))
args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "/clr/opencl"))
- args.append(self.define("HIPCC_BIN_DIR", self.stage.source_path + "/hipcc/bin")),
args.append(self.define("CLR_BUILD_HIP", True)),
args.append(self.define("CLR_BUILD_OCL", False)),
- args.append(self.define("HIP_LLVM_ROOT", self.spec["llvm-amdgpu"].prefix))
+ if self.spec.satisfies("@5.6:5.7"):
+ args.append(self.define("HIPCC_BIN_DIR", self.stage.source_path + "/hipcc/bin")),
+ if self.spec.satisfies("@6.0:"):
+ args.append(self.define("HIPCC_BIN_DIR", self.spec["hipcc"].prefix.bin)),
return args
test_src_dir_old = "samples"
@@ -750,29 +637,18 @@ class Hip(CMakePackage):
def cache_test_sources(self):
"""Copy the tests source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- if self.spec.satisfies("@:5.1.0"):
- return
- elif self.spec.satisfies("@5.1:5.5"):
- self.cache_extra_test_sources([self.test_src_dir_old])
+ if self.spec.satisfies("@5.1:5.5"):
+ cache_extra_test_sources(self, [self.test_src_dir_old])
elif self.spec.satisfies("@5.6:"):
- self.cache_extra_test_sources([self.test_src_dir])
+ cache_extra_test_sources(self, [self.test_src_dir])
def test_samples(self):
- # configure, build and run all hip samples
- if self.spec.satisfies("@:5.1.0"):
- raise SkipTest("Test is only available for specs after version 5.1.0")
- elif self.spec.satisfies("@5.1:5.5"):
+ """build and run all hip samples"""
+ if self.spec.satisfies("@5.1:5.5"):
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir_old)
elif self.spec.satisfies("@5.6:"):
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
- prefixes = ";".join(
- [
- self.spec["hip"].prefix,
- self.spec["llvm-amdgpu"].prefix,
- self.spec["comgr"].prefix,
- self.spec["hsa-rocr-dev"].prefix,
- ]
- )
+ prefixes = ";".join(spack.build_environment.get_cmake_prefix_path(self))
cc_options = ["-DCMAKE_PREFIX_PATH=" + prefixes, ".."]
amdclang_path = join_path(self.spec["llvm-amdgpu"].prefix, "bin", "amdclang++")
diff --git a/var/spack/repos/builtin/packages/hipace/package.py b/var/spack/repos/builtin/packages/hipace/package.py
index 70ca72c621..8b805fd474 100644
--- a/var/spack/repos/builtin/packages/hipace/package.py
+++ b/var/spack/repos/builtin/packages/hipace/package.py
@@ -24,6 +24,8 @@ class Hipace(CMakePackage):
version("23.05", sha256="33a15cfeada3ca16c2a3af1538caa7ff731df13b48b884045a0fe7974382fcd1")
version("21.09", sha256="5d27824fe6aac47ce26ca69759140ab4d7844f9042e436c343c03ea4852825f1")
+ depends_on("cxx", type="build") # generated
+
variant(
"compute",
default="noacc",
diff --git a/var/spack/repos/builtin/packages/hipblas/hipblas-link-clients-blas-5.0.0.patch b/var/spack/repos/builtin/packages/hipblas/hipblas-link-clients-blas-5.0.0.patch
deleted file mode 100644
index 6c96b61943..0000000000
--- a/var/spack/repos/builtin/packages/hipblas/hipblas-link-clients-blas-5.0.0.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
-index f2f5428..7d5a6f8 100644
---- a/clients/benchmarks/CMakeLists.txt
-+++ b/clients/benchmarks/CMakeLists.txt
-@@ -94,7 +94,7 @@ if(LINK_BLIS)
- endif()
-
- if (NOT WIN32)
-- target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
-+ target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
- endif()
-
- if(LINK_BLIS)
-diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
-index 9328055..188b7bc 100644
---- a/clients/gtest/CMakeLists.txt
-+++ b/clients/gtest/CMakeLists.txt
-@@ -156,7 +156,7 @@ if (NOT WIN32)
- target_link_libraries( hipblas-test PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
- endif()
-
--target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} )
-+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} )
-
- if(LINK_BLIS)
- target_link_libraries( hipblas-test PRIVATE ${BLIS_LIBRARY} )
diff --git a/var/spack/repos/builtin/packages/hipblas/link-clients-blas-4.5.0.patch b/var/spack/repos/builtin/packages/hipblas/link-clients-blas-4.5.0.patch
deleted file mode 100644
index 9f4d9c6e6f..0000000000
--- a/var/spack/repos/builtin/packages/hipblas/link-clients-blas-4.5.0.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
-index 9c9e1d7..c9ce5f0 100644
---- a/clients/benchmarks/CMakeLists.txt
-+++ b/clients/benchmarks/CMakeLists.txt
-@@ -93,7 +93,7 @@ if(LINK_BLIS)
- endif()
-
- if (NOT WIN32)
-- target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
-+ target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
- endif()
-
- if(LINK_BLIS)
-diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
-index 75dcce8..620102d 100644
---- a/clients/gtest/CMakeLists.txt
-+++ b/clients/gtest/CMakeLists.txt
-@@ -172,7 +172,7 @@ if (NOT WIN32)
- target_link_libraries( hipblas-test PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
- endif()
-
--target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} ${Boost_LIBRARIES} )
-+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} ${Boost_LIBRARIES} )
-
- if(LINK_BLIS)
- target_link_libraries( hipblas-test PRIVATE ${BLIS_LIBRARY} )
diff --git a/var/spack/repos/builtin/packages/hipblas/link-clients-blas.patch b/var/spack/repos/builtin/packages/hipblas/link-clients-blas.patch
deleted file mode 100644
index 18e599d9ab..0000000000
--- a/var/spack/repos/builtin/packages/hipblas/link-clients-blas.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
---- a/clients/benchmarks/CMakeLists.txt 2021-10-28 14:14:41.379987882 -0600
-+++ b/clients/benchmarks/CMakeLists.txt 2021-10-28 13:37:50.409696036 -0600
-@@ -53,7 +53,7 @@
- $<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
- )
-
--target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack)
-+target_link_libraries( hipblas-bench PRIVATE hipblas_fortran_client roc::hipblas cblas lapack blas)
-
- # need mf16c flag for float->half convertion
- target_compile_options( hipblas-bench PRIVATE -mf16c)
-diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
---- a/clients/gtest/CMakeLists.txt 2021-10-28 14:14:41.379987882 -0600
-+++ b/clients/gtest/CMakeLists.txt 2021-10-28 13:37:34.609274623 -0600
-@@ -146,7 +146,7 @@
- ${ROCM_PATH}/hsa/include
- )
-
--target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack ${GTEST_LIBRARIES} ${Boost_LIBRARIES} hipblas_fortran_client )
-+target_link_libraries( hipblas-test PRIVATE roc::hipblas cblas lapack blas ${GTEST_LIBRARIES} ${Boost_LIBRARIES} hipblas_fortran_client )
-
- # need mf16c flag for float->half convertion
- target_compile_options( hipblas-test PRIVATE -mf16c )
diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py
index e05dfd3768..fbbf3d4c99 100644
--- a/var/spack/repos/builtin/packages/hipblas/package.py
+++ b/var/spack/repos/builtin/packages/hipblas/package.py
@@ -5,6 +5,7 @@
import re
+import spack.variant
from spack.package import *
@@ -12,9 +13,9 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
"""hipBLAS is a BLAS marshalling library, with multiple
supported backends"""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipBLAS"
- git = "https://github.com/ROCmSoftwarePlatform/hipBLAS.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipBLAS/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipBLAS"
+ git = "https://github.com/ROCm/hipBLAS.git"
+ url = "https://github.com/ROCm/hipBLAS/archive/rocm-6.0.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie")
@@ -24,91 +25,29 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="3137ba35e0663d6cceed70086fc6397d9e74803e1711382be62809b91beb2f32")
+ version("6.2.1", sha256="b770b6ebd27d5c12ad01827195e996469bfc826e8a2531831df475fc8d7f6b2e")
+ version("6.2.0", sha256="33688a4d929b13e1fd800aff7e0833a9f7abf3913754b6b15995595e0d434e94")
+ version("6.1.2", sha256="73699892855775a67f48c38beae78169a516078c17f1ed5d67c80abe5d308502")
+ version("6.1.1", sha256="087ea82dff13c8162bf93343b174b18f1d58681711bce4fb7c8dc7212020c099")
+ version("6.1.0", sha256="5f8193c4ef0508967e608a8adf86d63066a984c5803a4d05dd617021d6298091")
+ version("6.0.2", sha256="10c1b6c1deb0f225c0fb6b2bb88398a32cd0d32d3ffce9b5c8df9db2cf88d25c")
+ version("6.0.0", sha256="8fbd0c244fe82eded866e06d2399b1d91ab5d43d2ebcb73382c7ce1ae48d9cb3")
version("5.7.1", sha256="794e9298f48ffbe3bd1c1ab87a5c2c2b953713500155fdec9ef8cbb11f81fc8a")
version("5.7.0", sha256="8c6cd2ffa4ce6ab03e05feffe074685b5525610870aebe9d78f817b3037f33a4")
version("5.6.1", sha256="f9da82fbefc68b84081ea0ed0139b91d2a540357fcf505c7f1d57eab01eb327c")
version("5.6.0", sha256="9453a31324e10ba528f8f4755d2c270d0ed9baa33e980d8f8383204d8e28a563")
version("5.5.1", sha256="5920c9a9c83cf7e2b42d1f99f5d5091cac7f6c0a040a737e869e57b92d7045a9")
version("5.5.0", sha256="b080c25cb61531228d26badcdca856c46c640035c058bfc1c9f63de65f418cd5")
- version("5.4.3", sha256="5acac147aafc15c249c2f24c19459135ed68b506403aa92e602b67cfc10c38b7")
- version("5.4.0", sha256="341d61adff8d08cbf70aa07bd11a088bcd0687fc6156870a1aee9eff74f3eb4f")
- version("5.3.3", sha256="1ce093fc6bc021ad4fe0b0b93f9501038a7a5a16b0fd4fc485d65cbd220a195e")
- version("5.3.0", sha256="873d55749479873994679840906c4257316dfb09a6200411204ad4a8c2480565")
- version("5.2.3", sha256="4d66db9b000b6207b5270d90556b724bfdb08ebbfcc675f014287e0be7ee6344")
- version("5.2.1", sha256="ccae36b118b7a1eb4b2f7d65fb163f54ab9c5cf774dbe2ec60971d4f78ae8308")
- version("5.2.0", sha256="5e9091dc4ef83896f5c3bc5ade1cb5db8e1a6afc451dbba4da19d8a7ec2b6f29")
- version("5.1.3", sha256="f0fdaa851971b41b48ec2e7d640746fbd6f9f433da2020c5fd95c91a7473d9e1")
- version("5.1.0", sha256="22faba3828e50a4c4e22f569a7d6441c797a11db1d472619c01d3515a3275e92")
- version(
- "5.0.2",
- sha256="201772bfc422ecb2c50e898dccd7d3d376cf34a2b795360e34bf71326aa37646",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="63cffe748ed4a86fc80f408cb9e8a9c6c55c22a2b65c0eb9a76360b97bbb9d41",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="82dd82a41bbadbb2a91a2a44a5d8e0d2e4f36d3078286ed4db3549b1fb6d6978",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="187777ed49cc7c496c897e8ba80532d458c9afbc51a960e45f96923ad896c18e",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="7b1f774774de5fa3d2b777e3a262328559d56165c32aa91b002505694362e7b2",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="0631e21c588794ea1c8413ef8ff293606bcf7a52c0c3ff88da824f103395a76a",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="c7ce7f69c7596b5a54e666fb1373ef41d1f896dd29260a691e2eadfa863e2b1a",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="876efe80a4109ad53d290d2921b3fb425b4cb857b32920819f10dcd4deee4ef8",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="6cc03af891b36cce8266d32ba8dfcf7fdfcc18afa7a6cc058fbe28bcf8528d94",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="45cb5e3b37f0845bd9e0d09912df4fa0ce88dd508ec9448241ae6600d3c4b1e8",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="82ddd57fd905a5d4060665349ec017ff757a7c121cb9310574be3c3630b3545f",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="33cb82e8b2658ae2096f39e41492ba8b6852ac37c26a730612b8642d9d29abe3",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="9840a493ab4838c86696ceb33ce07c34b5f59f62db4f88cb3af62b69d84f8729",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="d451da80beb048767da71a090afceed2e111d01b3e95a7044deada5054d6e7b1",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="5acac147aafc15c249c2f24c19459135ed68b506403aa92e602b67cfc10c38b7")
+ version("5.4.0", sha256="341d61adff8d08cbf70aa07bd11a088bcd0687fc6156870a1aee9eff74f3eb4f")
+ version("5.3.3", sha256="1ce093fc6bc021ad4fe0b0b93f9501038a7a5a16b0fd4fc485d65cbd220a195e")
+ version("5.3.0", sha256="873d55749479873994679840906c4257316dfb09a6200411204ad4a8c2480565")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -124,6 +63,7 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
sticky=True,
)
variant("rocm", default=True, description="Enable ROCm support")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
@@ -132,38 +72,20 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
depends_on("googletest@1.10.0:", type="test")
depends_on("netlib-lapack@3.7.1:", type="test")
depends_on("boost@1.64.0:1.76.0 +program_options cxxstd=14", type="test")
+ depends_on("py-pyaml", type="test", when="@6.1:")
- patch("link-clients-blas.patch", when="@4.3.0:4.3.2")
- patch("link-clients-blas-4.5.0.patch", when="@4.5.0:4.5.2")
- patch("hipblas-link-clients-blas-5.0.0.patch", when="@5.0.0:5.0.2")
- patch("remove-hipblas-clients-file-installation.patch", when="@5.5:")
+ patch("remove-hipblas-clients-file-installation.patch", when="@5.5:5.7.1")
+ patch("remove-hipblas-clients-file-installation-6.0.patch", when="@6.0:")
- depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:")
- depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
- depends_on("rocm-cmake@3.5.0:", type="build")
+ depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:5.7")
+ depends_on("rocm-cmake@4.5.0:", type="build")
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocm-cmake@{ver}", when=f"+rocm @{ver}")
+ depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"+rocm @{ver}")
depends_on("hip +cuda", when="+cuda")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -174,19 +96,22 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
"develop",
]:
- depends_on("rocsolver@" + ver, when="+rocm @" + ver)
- depends_on("rocblas@" + ver, when="+rocm @" + ver)
-
+ depends_on(f"rocsolver@{ver}", when=f"+rocm @{ver}")
+ depends_on(f"rocblas@{ver}", when=f"+rocm @{ver}")
for tgt in ROCmPackage.amdgpu_targets:
- depends_on(
- "rocblas amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
- depends_on(
- "rocsolver amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
+ depends_on(f"rocblas amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
+ depends_on(f"rocsolver amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
@classmethod
def determine_version(cls, lib):
@@ -199,35 +124,29 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage):
ver = None
return ver
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
+
def cmake_args(self):
args = [
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
+ self.define_from_variant("USE_CUDA", "cuda"),
]
- if self.spec.satisfies("@:3.9.0"):
- args.append(self.define_from_variant("TRY_CUDA", "cuda"))
- else:
- args.append(self.define_from_variant("USE_CUDA", "cuda"))
-
- # FindHIP.cmake was used for +rocm until 4.1.0 and is still used for +cuda
- if self.spec.satisfies("@:4.0") or self.spec.satisfies("+cuda"):
- if self.spec["hip"].satisfies("@:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- else:
- args.append(
- self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip)
- )
-
+ # FindHIP.cmake is still used for +cuda
+ if self.spec.satisfies("+cuda"):
+ args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
if self.spec.satisfies("@5.2.0:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
if self.spec.satisfies("@5.3.0:"):
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ if self.spec.satisfies("@6.1:") and self.run_tests:
+ args.append(self.define("LINK_BLIS", "OFF"))
return args
- @run_after("build")
- @on_package_attributes(run_tests=True)
- def check_build(self):
+ def check(self):
exe = Executable(join_path(self.build_directory, "clients", "staging", "hipblas-test"))
exe("--gtest_filter=-*known_bug*")
diff --git a/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation-6.0.patch b/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation-6.0.patch
new file mode 100644
index 0000000000..ca6fa8f413
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation-6.0.patch
@@ -0,0 +1,32 @@
+From 120af1b2483868ebdc2ee5f137418d23c14178ad Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Wed, 10 Jan 2024 04:28:15 +0000
+Subject: [PATCH] Remove hipblas clients file installation
+
+---
+ clients/CMakeLists.txt | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
+index 8206ad7..6a59808 100644
+--- a/clients/CMakeLists.txt
++++ b/clients/CMakeLists.txt
+@@ -135,15 +135,3 @@ add_custom_command( OUTPUT "${HIPBLAS_GENTEST}"
+
+ add_custom_target( hipblas-common DEPENDS "${HIPBLAS_COMMON}" "${HIPBLAS_TEMPLATE}" "${HIPBLAS_SMOKE}" "${HIPBLAS_GENTEST}" )
+
+-if( BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_BENCHMARKS )
+- rocm_install(
+- FILES ${HIPBLAS_COMMON} ${HIPBLAS_TEMPLATE} ${HIPBLAS_SMOKE}
+- DESTINATION "${CMAKE_INSTALL_BINDIR}"
+- COMPONENT clients-common
+- )
+- rocm_install(
+- PROGRAMS ${HIPBLAS_GENTEST}
+- DESTINATION "${CMAKE_INSTALL_BINDIR}"
+- COMPONENT clients-common
+- )
+-endif()
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/hipblaslt/0001-Set-LLVM_Path-Add-Hiblas-Include-to-CmakeLists-6.1.Patch b/var/spack/repos/builtin/packages/hipblaslt/0001-Set-LLVM_Path-Add-Hiblas-Include-to-CmakeLists-6.1.Patch
new file mode 100644
index 0000000000..33b2e79787
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipblaslt/0001-Set-LLVM_Path-Add-Hiblas-Include-to-CmakeLists-6.1.Patch
@@ -0,0 +1,88 @@
+From 085d965e11cda1830cf325e0d12db3faf61a94d0 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Thu, 23 May 2024 05:49:34 +0000
+Subject: [PATCH] Add hipblas include dir in CMakeLists.txt and Modify the LLVM
+ Path in the Tensile code for Spack
+
+---
+ clients/gtest/CMakeLists.txt | 1 +
+ library/CMakeLists.txt | 2 ++
+ tensilelite/Tensile/Common.py | 7 ++++---
+ tensilelite/Tensile/Ops/gen_assembly.sh | 2 +-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 825bdca..f817e12 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -53,6 +53,7 @@ target_include_directories( hipblaslt-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${HIPBLAS_INCLUDE_DIRS}>
+ )
+ message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
+ target_link_libraries( hipblaslt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipblaslt )
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index 3252da0..1b8d628 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -72,6 +72,8 @@ include(src/CMakeLists.txt)
+ # Create hipBLASLt library
+ add_library(hipblaslt ${hipblaslt_source} ${hipblaslt_headers_public})
+ add_library(roc::hipblaslt ALIAS hipblaslt)
++target_include_directories( hipblaslt PRIVATE ${HIPBLAS_INCLUDE_DIRS} )
++target_include_directories( hipblaslt PRIVATE ${MSGPACK_DIR}/include )
+
+ # Target compile definitions
+ if(NOT BUILD_CUDA)
+diff --git a/tensilelite/Tensile/Common.py b/tensilelite/Tensile/Common.py
+index 8ee6373..52d6a97 100644
+--- a/tensilelite/Tensile/Common.py
++++ b/tensilelite/Tensile/Common.py
+@@ -273,6 +273,7 @@ globalParameters["LazyLibraryLoading"] = False # Load library and code object fi
+ globalParameters["UseUserArgs"] = False
+
+ globalParameters["RotatingBufferSize"] = 0 # Size in MB
++globalParameters["LLVMPath"] = os.environ.get("LLVM_PATH")
+
+ # Save a copy - since pytest doesn't re-run this initialization code and YAML files can override global settings - odd things can happen
+ defaultGlobalParameters = deepcopy(globalParameters)
+@@ -1488,10 +1489,10 @@ def assignGlobalParameters( config ):
+ if os.name == "nt":
+ globalParameters["AssemblerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang++.exe")
+ else:
+- globalParameters["AssemblerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang++")
++ globalParameters["AssemblerPath"] = locateExe(os.path.join(globalParameters["LLVMPath"], "bin"), "clang++")
+
+ globalParameters["ROCmSMIPath"] = locateExe(globalParameters["ROCmBinPath"], "rocm-smi")
+- globalParameters["ROCmLdPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "ld.lld")
++ globalParameters["ROCmLdPath"] = locateExe(os.path.join(globalParameters["LLVMPath"], "bin"), "ld.lld")
+
+ globalParameters["ExtractKernelPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "hip/bin"), "extractkernel")
+
+@@ -1501,7 +1502,7 @@ def assignGlobalParameters( config ):
+ if os.name == "nt":
+ globalParameters["ClangOffloadBundlerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang-offload-bundler.exe")
+ else:
+- globalParameters["ClangOffloadBundlerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang-offload-bundler")
++ globalParameters["ClangOffloadBundlerPath"] = locateExe(os.path.join(globalParameters["LLVMPath"], "bin"), "clang-offload-bundler")
+
+ if "ROCmAgentEnumeratorPath" in config:
+ globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
+diff --git a/tensilelite/Tensile/Ops/gen_assembly.sh b/tensilelite/Tensile/Ops/gen_assembly.sh
+index 230c446..9f7dc6d 100644
+--- a/tensilelite/Tensile/Ops/gen_assembly.sh
++++ b/tensilelite/Tensile/Ops/gen_assembly.sh
+@@ -32,7 +32,7 @@ if ! [ -z ${ROCM_PATH+x} ]; then
+ rocm_path=${ROCM_PATH}
+ fi
+
+-toolchain=${rocm_path}/llvm/bin/clang++
++toolchain=${LLVM_PATH}/bin/clang++
+
+ . ${venv}/bin/activate
+
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/hipblaslt/001_Set_LLVM_Paths_And_Add_Includes.patch b/var/spack/repos/builtin/packages/hipblaslt/001_Set_LLVM_Paths_And_Add_Includes.patch
new file mode 100644
index 0000000000..27eb39effd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipblaslt/001_Set_LLVM_Paths_And_Add_Includes.patch
@@ -0,0 +1,70 @@
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 825bdca..f817e12 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -53,6 +53,7 @@ target_include_directories( hipblaslt-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${HIPBLAS_INCLUDE_DIRS}>
+ )
+ message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
+ target_link_libraries( hipblaslt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipblaslt )
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index 3252da0..1b8d628 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -72,6 +72,8 @@ include(src/CMakeLists.txt)
+ # Create hipBLASLt library
+ add_library(hipblaslt ${hipblaslt_source} ${hipblaslt_headers_public})
+ add_library(roc::hipblaslt ALIAS hipblaslt)
++target_include_directories( hipblaslt PRIVATE ${HIPBLAS_INCLUDE_DIRS} )
++target_include_directories( hipblaslt PRIVATE ${MSGPACK_DIR}/include )
+
+ # Target compile definitions
+ if(NOT BUILD_CUDA)
+diff --git a/tensilelite/Tensile/Common.py b/tensilelite/Tensile/Common.py
+index 0f862b8..0baeb55 100644
+--- a/tensilelite/Tensile/Common.py
++++ b/tensilelite/Tensile/Common.py
+@@ -270,6 +270,8 @@ globalParameters["LazyLibraryLoading"] = False # Load library and code object fi
+
+ globalParameters["UseUserArgs"] = False
+
++globalParameters["LLVMPath"] = os.environ.get("LLVM_PATH")
++
+ # Save a copy - since pytest doesn't re-run this initialization code and YAML files can override global settings - odd things can happen
+ defaultGlobalParameters = deepcopy(globalParameters)
+
+@@ -1471,7 +1473,7 @@ def assignGlobalParameters( config ):
+ if os.name == "nt":
+ globalParameters["AssemblerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang++.exe")
+ else:
+- globalParameters["AssemblerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang++")
++ globalParameters["AssemblerPath"] = locateExe(os.path.join(globalParameters["LLVMPath"], "bin"), "clang++")
+
+ globalParameters["ROCmSMIPath"] = locateExe(globalParameters["ROCmBinPath"], "rocm-smi")
+
+@@ -1483,7 +1485,7 @@ def assignGlobalParameters( config ):
+ if os.name == "nt":
+ globalParameters["ClangOffloadBundlerPath"] = locateExe(globalParameters["ROCmBinPath"], "clang-offload-bundler.exe")
+ else:
+- globalParameters["ClangOffloadBundlerPath"] = locateExe(os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "clang-offload-bundler")
++ globalParameters["ClangOffloadBundlerPath"] = locateExe(os.path.join(globalParameters["LLVMPath"], "bin"), "clang-offload-bundler")
+
+ if "ROCmAgentEnumeratorPath" in config:
+ globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
+diff --git a/tensilelite/Tensile/Ops/gen_assembly.sh b/tensilelite/Tensile/Ops/gen_assembly.sh
+index 7b16069..1392cab 100644
+--- a/tensilelite/Tensile/Ops/gen_assembly.sh
++++ b/tensilelite/Tensile/Ops/gen_assembly.sh
+@@ -32,7 +32,9 @@ if ! [ -z ${ROCM_PATH+x} ]; then
+ rocm_path=${ROCM_PATH}
+ fi
+
+-toolchain=${rocm_path}/llvm/bin/clang++
++$LLVM_PATH=$ENV{'LLVM_PATH'};
++
++toolchain=${LLVM_PATH}/bin/clang++
+
+ . ${venv}/bin/activate
diff --git a/var/spack/repos/builtin/packages/hipblaslt/package.py b/var/spack/repos/builtin/packages/hipblaslt/package.py
new file mode 100644
index 0000000000..31938b82d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipblaslt/package.py
@@ -0,0 +1,75 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Hipblaslt(CMakePackage):
+ """hipBLASLt is a library that provides general matrix-matrix operations with a flexible API
+ and extends functionalities beyond a traditional BLAS library"""
+
+ homepage = "https://github.com/ROCm/hipBLASLt"
+ url = "https://github.com/ROCm/hipBLASLt/archive/refs/tags/rocm-6.1.2.tar.gz"
+ git = "https://github.com/ROCm/hipBLASLt.git"
+
+ maintainers("srekolam", "afzpatel", "renjithravindrankannath")
+
+ license("MIT")
+ version("6.2.4", sha256="b8a72cb1ed4988b0569817c6387fb2faee4782795a0d8f49b827b32b52572cfd")
+ version("6.2.1", sha256="9b062b1d6d945349c31828030c8c1d99fe57d14a1837196ff9aa67bf10ef43f1")
+ version("6.2.0", sha256="aec9edc75ae4438aa712192c784e2bed683d2839b502b6aadb18f6012306749b")
+ version("6.1.2", sha256="fcfe950f7b87c421565abe090b2de6f463afc1549841002f105ecca7bbbf59e5")
+ version("6.1.1", sha256="1e21730ade59b5e32432fa0981383f689a380b1ffc92fe950822722da9521a72")
+ version("6.1.0", sha256="90fc2f2c9e11c87e0529e824e4b0561dbc850f8ffa21be6932ae63cbaa27cdf0")
+ version("6.0.2", sha256="e281a1a7760fab8c3e0baafe17950cf43c422184e3226e3c14eb06e50c69d421")
+ version("6.0.0", sha256="6451b6fdf7f24787628190bbe8f2208c929546b68b692d8355d2f18bea7ca7db")
+
+ depends_on("cxx", type="build") # generated
+
+ amdgpu_targets = ROCmPackage.amdgpu_targets
+
+ variant(
+ "amdgpu_target",
+ description="AMD GPU architecture",
+ values=auto_or_any_combination_of(*amdgpu_targets),
+ sticky=True,
+ )
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"hipblas@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}")
+
+ depends_on("msgpack-c")
+ depends_on("py-joblib")
+ depends_on("googletest@1.10.0:", type="test")
+ depends_on("netlib-lapack@3.7.1:", type="test")
+ depends_on("py-pyyaml", type="test")
+
+ # Sets the proper for clang++ and clang-offload-blunder.
+ # Also adds hipblas and msgpack include directories
+ patch("001_Set_LLVM_Paths_And_Add_Includes.patch", when="@6.0")
+ # Below patch sets the proper path for clang++ and clang-offload-blunder.
+ # Also adds hipblas and msgpack include directories for 6.1.0 release.
+ patch("0001-Set-LLVM_Path-Add-Hiblas-Include-to-CmakeLists-6.1.Patch", when="@6.1:6.2")
+
+ def setup_build_environment(self, env):
+ env.set("CXX", self.spec["hip"].hipcc)
+
+ def cmake_args(self):
+ args = [
+ self.define("Tensile_CODE_OBJECT_VERSION", "default"),
+ self.define("MSGPACK_DIR", self.spec["msgpack-c"].prefix),
+ self.define_from_variant("ADDRESS_SANITIZER", "asan"),
+ self.define("BUILD_CLIENTS_TESTS", self.run_tests),
+ ]
+ if "auto" not in self.spec.variants["amdgpu_target"]:
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
+ if self.run_tests:
+ args.append(
+ self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
+ )
+ return args
diff --git a/var/spack/repos/builtin/packages/hipcc/0001-Update-the-ROCMINFO-HIPCLANG-PATHS-inside-hipcc-6.2.0.patch b/var/spack/repos/builtin/packages/hipcc/0001-Update-the-ROCMINFO-HIPCLANG-PATHS-inside-hipcc-6.2.0.patch
new file mode 100644
index 0000000000..22b386136b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipcc/0001-Update-the-ROCMINFO-HIPCLANG-PATHS-inside-hipcc-6.2.0.patch
@@ -0,0 +1,57 @@
+From 8d2e14328cd99bbad2eaa498c207cf41f688fc30 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Mon, 23 Sep 2024 10:34:16 +0000
+Subject: [PATCH] Use the rocminfo_path and hipclang_path inside the hipcc.pl
+ and hipbin_amd.h
+
+---
+ amd/hipcc/bin/hipcc.pl | 9 ++++++---
+ amd/hipcc/src/hipBin_amd.h | 2 +-
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/amd/hipcc/bin/hipcc.pl b/amd/hipcc/bin/hipcc.pl
+index 27839e5..fcb8d4e 100755
+--- a/amd/hipcc/bin/hipcc.pl
++++ b/amd/hipcc/bin/hipcc.pl
+@@ -160,11 +160,13 @@ if ($HIP_PLATFORM eq "amd") {
+ if($isWindows) {
+ $execExtension = ".exe";
+ }
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang++" . $execExtension);
++ # hip_clang_path is set inside the hip recipe
++ $HIP_CLANG_PATH= $ENV{'HIP_CLANG_PATH'};
++ $HIPCC="${HIP_CLANG_PATH}/clang++" . $execExtension;
+
+ # If $HIPCC clang++ is not compiled, use clang instead
+ if ( ! -e $HIPCC ) {
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang" . $execExtension);
++ $HIPCC="${HIP_CLANG_PATH}/clang" . $execExtension;
+ $HIPLDFLAGS = "--driver-mode=g++";
+ }
+ # to avoid using dk linker or MSVC linker
+@@ -480,7 +482,8 @@ if($HIP_PLATFORM eq "amd"){
+ $targetsStr = $ENV{HCC_AMDGPU_TARGET};
+ } elsif (not $isWindows) {
+ # Else try using rocm_agent_enumerator
+- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
++ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCMINFO_PATH;
++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
+ $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
+ $targetsStr =~ s/\n/,/g;
+ }
+diff --git a/amd/hipcc/src/hipBin_amd.h b/amd/hipcc/src/hipBin_amd.h
+index 57d0098..d53d081 100644
+--- a/amd/hipcc/src/hipBin_amd.h
++++ b/amd/hipcc/src/hipBin_amd.h
+@@ -752,7 +752,7 @@ void HipBinAmd::executeHipCCCmd(vector<string> argv) {
+ } else if (os != windows) {
+ // Else try using rocm_agent_enumerator
+ string ROCM_AGENT_ENUM;
+- ROCM_AGENT_ENUM = roccmPath + "/bin/rocm_agent_enumerator";
++ ROCM_AGENT_ENUM = string(getenv("ROCMINFO_PATH")) + "/bin/rocm_agent_enumerator";
+ targetsStr = ROCM_AGENT_ENUM +" -t GPU";
+ SystemCmdOut sysOut = hipBinUtilPtr_->exec(targetsStr.c_str());
+ regex toReplace("\n+");
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.0.patch b/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.0.patch
new file mode 100644
index 0000000000..74b90fafe0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.0.patch
@@ -0,0 +1,30 @@
+diff --git a/bin/hipcc.pl b/bin/hipcc.pl
+index 513a427..780dc5c 100755
+--- a/bin/hipcc.pl
++++ b/bin/hipcc.pl
+@@ -160,11 +160,13 @@ if ($HIP_PLATFORM eq "amd") {
+ if($isWindows) {
+ $execExtension = ".exe";
+ }
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang++" . $execExtension);
++ # llvm_path is set inside the hip recipe
++ $HIP_CLANG_PATH= $ENV{'HIP_CLANG_PATH'};
++ $HIPCC="${HIP_CLANG_PATH}/clang++" . $execExtension;
+
+ # If $HIPCC clang++ is not compiled, use clang instead
+ if ( ! -e $HIPCC ) {
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang" . $execExtension);
++ $HIPCC="${HIP_CLANG_PATH}/clang" . $execExtension;
+ $HIPLDFLAGS = "--driver-mode=g++";
+ }
+ # to avoid using dk linker or MSVC linker
+@@ -484,7 +486,8 @@ if($HIP_PLATFORM eq "amd"){
+ $targetsStr = $ENV{HCC_AMDGPU_TARGET};
+ } elsif (not $isWindows) {
+ # Else try using rocm_agent_enumerator
+- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
++ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCMINFO_PATH;
++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
+ $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
+ $targetsStr =~ s/\n/,/g;
+ }
diff --git a/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.1.patch b/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.1.patch
new file mode 100644
index 0000000000..5bd44f33b8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipcc/0014-remove-compiler-rt-linkage-for-host.6.1.patch
@@ -0,0 +1,30 @@
+diff --git a/amd/hipcc/bin/hipcc.pl b/amd/hipcc/bin/hipcc.pl
+index 513a427..780dc5c 100755
+--- a/amd/hipcc/bin/hipcc.pl
++++ b/amd/hipcc/bin/hipcc.pl
+@@ -160,11 +160,13 @@ if ($HIP_PLATFORM eq "amd") {
+ if($isWindows) {
+ $execExtension = ".exe";
+ }
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang++" . $execExtension);
++ # hip_clang_path is set inside the hip recipe
++ $HIP_CLANG_PATH= $ENV{'HIP_CLANG_PATH'};
++ $HIPCC="${HIP_CLANG_PATH}/clang++" . $execExtension;
+
+ # If $HIPCC clang++ is not compiled, use clang instead
+ if ( ! -e $HIPCC ) {
+- $HIPCC=get_normalized_path("$HIP_CLANG_PATH/clang" . $execExtension);
++ $HIPCC="${HIP_CLANG_PATH}/clang" . $execExtension;
+ $HIPLDFLAGS = "--driver-mode=g++";
+ }
+ # to avoid using dk linker or MSVC linker
+@@ -484,7 +486,8 @@ if($HIP_PLATFORM eq "amd"){
+ $targetsStr = $ENV{HCC_AMDGPU_TARGET};
+ } elsif (not $isWindows) {
+ # Else try using rocm_agent_enumerator
+- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
++ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCMINFO_PATH;
++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
+ $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
+ $targetsStr =~ s/\n/,/g;
+ }
diff --git a/var/spack/repos/builtin/packages/hipcc/package.py b/var/spack/repos/builtin/packages/hipcc/package.py
new file mode 100644
index 0000000000..a01c8ac078
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipcc/package.py
@@ -0,0 +1,69 @@
+# Copyright 2013-2024 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.hooks.sbang import filter_shebang
+from spack.package import *
+
+
+class Hipcc(CMakePackage):
+ """HIPCC: HIP compiler driver"""
+
+ homepage = "https://github.com/ROCm/hipcc"
+ git = "https://github.com/ROCm/hipcc.git"
+
+ def url_for_version(self, version):
+ if version <= Version("6.0.2"):
+ url = "https://github.com/ROCm/HIPCC/archive/rocm-{0}.tar.gz"
+ else:
+ url = "https://github.com/ROCm/llvm-project/archive/rocm-{0}.tar.gz"
+ return url.format(version)
+
+ maintainers("srekolam", "renjithravindrankannath", "afzpatel")
+
+ license("MIT")
+ version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528")
+ version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7")
+ version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200")
+ version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097")
+ version("6.1.1", sha256="f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d")
+ version("6.1.0", sha256="6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34")
+ version("6.0.2", sha256="d6209b14fccdd00d7231dec4b4f962aa23914b9dde389ba961370e8ba918bde5")
+ version("6.0.0", sha256="e9cfaaecaf0e6ed363946439197f340c115e8e1189f96dbd716cf20245c29255")
+ version("5.7.1", sha256="d47d27ef2b5de7f49cdfd8547832ac9b437a32e6fc6f0e9c1646f4b704c90aee")
+ version("5.7.0", sha256="9f839bf7226e5e26f3150f8ba6eca507ab9a668e68b207736301b3bb9040c973")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("numactl")
+
+ patch("0014-remove-compiler-rt-linkage-for-host.6.0.patch", when="@6.0")
+ patch("0014-remove-compiler-rt-linkage-for-host.6.1.patch", when="@6.1")
+ patch("0001-Update-the-ROCMINFO-HIPCLANG-PATHS-inside-hipcc-6.2.0.patch", when="@6.2:")
+
+ @property
+ def root_cmakelists_dir(self):
+ if self.spec.satisfies("@:6.0"):
+ return "."
+ else:
+ return join_path("amd", "hipcc")
+
+ def patch(self):
+ numactl = self.spec["numactl"].prefix.lib
+ if self.spec.satisfies("@:6.0"):
+ with working_dir("bin"):
+ filter_shebang("hipconfig")
+ else:
+ with working_dir("amd/hipcc/bin"):
+ filter_shebang("hipconfig")
+
+ if self.spec.satisfies("@:6.0"):
+ with working_dir("src"):
+ filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipBin_amd.h")
+ else:
+ with working_dir("amd/hipcc/src"):
+ filter_file(" -lnuma", f" -L{numactl} -lnuma", "hipBin_amd.h")
diff --git a/var/spack/repos/builtin/packages/hipcub/find-hip-cuda-rocm-5.1.patch b/var/spack/repos/builtin/packages/hipcub/find-hip-cuda-rocm-5.1.patch
deleted file mode 100644
index eacfcc645d..0000000000
--- a/var/spack/repos/builtin/packages/hipcub/find-hip-cuda-rocm-5.1.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cmake/VerifyCompiler.cmake b/cmake/VerifyCompiler.cmake
-index ca4d646..0256683 100644
---- a/cmake/VerifyCompiler.cmake
-+++ b/cmake/VerifyCompiler.cmake
-@@ -22,8 +22,6 @@
-
- list(APPEND CMAKE_PREFIX_PATH /opt/rocm /opt/rocm/hip)
- if(CMAKE_CXX_COMPILER MATCHES ".*/nvcc$" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-- list(APPEND CMAKE_MODULE_PATH /opt/rocm/hip/cmake)
-- find_package(hip QUIET CONFIG PATHS /opt/rocm)
- if(NOT hip_FOUND)
- find_package(HIP REQUIRED)
- endif()
diff --git a/var/spack/repos/builtin/packages/hipcub/package.py b/var/spack/repos/builtin/packages/hipcub/package.py
index 61c05e7431..2a71711b47 100644
--- a/var/spack/repos/builtin/packages/hipcub/package.py
+++ b/var/spack/repos/builtin/packages/hipcub/package.py
@@ -3,105 +3,42 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.variant
from spack.package import *
class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
"""Radeon Open Compute Parallel Primitives Library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB"
- git = "https://github.com/ROCmSoftwarePlatform/hipCUB.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipCUB"
+ git = "https://github.com/ROCm/hipCUB.git"
+ url = "https://github.com/ROCm/hipCUB/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
license("BSD-3-Clause")
maintainers("srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="06f3655b110d3d2e2ecf0aca052d3ba3f2ef012c069e5d2d82f2b75d50555f46")
+ version("6.2.1", sha256="e0203e72afac4da19cb1d62896fff404ec44517141b420bd38f6e962e52ef6fd")
+ version("6.2.0", sha256="8dda8b77740e722fd4cf7223476313fc873bad75d50e6cb86ff284a91d76752d")
+ version("6.1.2", sha256="830a0f3231e07fcc6cd6261c4e1af2d7d0ac4862c606ecdc80c2635557ca3d9f")
+ version("6.1.1", sha256="967716d67e4270c599a60b770d543ea9148948edb907a0fa4d8be3a1785c2058")
+ version("6.1.0", sha256="39ac03053ecf35f1faf212e5b197b03c0104b74b0833f7cce5cf625c273ba71c")
+ version("6.0.2", sha256="3f912a23dc34510cf18d9097f6eda37e01d01724975c8149c92a64c92415968c")
+ version("6.0.0", sha256="8d9f6e1e3f8433a2ceae1b0efd6727c21383980077e264725d00d5fee165bd30")
version("5.7.1", sha256="9b23a58408bc4c549d3c754196cb3e2c1a50e177ab0a286101cbea2f7f173945")
version("5.7.0", sha256="899356867f662d9a6f3870bb4a496f605a3143c6ad4d1fa9e9faead68fa8d13b")
version("5.6.1", sha256="4b9479daa40424c9ddbc14ce967aa170680f8ca1ed01a514e6e30ccfa22552ce")
version("5.6.0", sha256="5e74ddbf833f39836bf9ec6c6750348c7386a85ca67aaf9bb54d16c9e1959031")
version("5.5.1", sha256="ad83f3f1ed85ead9e3012906957c125a896168be913f6fb6af298228fc571480")
version("5.5.0", sha256="3eec838119326a67eb4cc006c706e328f3a51a01e98bbfb518df8fe4a4707e13")
- version("5.4.3", sha256="cf528d9acb4f9b9c3aad439ae76bfc3d02be6e7a74d96099544e5d54e1a23675")
- version("5.4.0", sha256="78db2c2ea466a4c5d84beedc000ae934f6d0ff1793eae90bb8d02b2dbff8932c")
- version("5.3.3", sha256="b4fc3c05892729873dc098f111c31f83af7d33da572bdb7d87de100d4c238e6d")
- version("5.3.0", sha256="4016cfc240b3cc1a97b549ecc4a5b76369610d46247661834630846391e5fad2")
- version("5.2.3", sha256="cab929f10c649f8fd76df989a16d0cd9301bc6aaad91cd2f84498c831378d559")
- version("5.2.1", sha256="07b34d8cdf885838dde264c2a70044505e7b9632cb6efbdb52e2569f95112970")
- version("5.2.0", sha256="ac4dc2310f0eb657e1337c93d8cc4a5d8396f9544a7336eeceb455678a1f9139")
- version("5.1.3", sha256="dc75640689b6a5e15dd3acea643266bdf114ea63efc60be8272f484cf8f04494")
- version("5.1.0", sha256="b30d51fc5fca2584f0c9a6fa8dafc9fbdda96a3acff30288e49b397f8842f705")
- version(
- "5.0.2",
- sha256="22effb18f2c38d76fa379f14c9f9ee7a11987a5d1ae4a7e837af87232c8c9183",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="09c4f1b88aa5f50f04043d379e4960dab556e0fbdf8e25ab03d02a07c1ff7b2f",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="bec9ba1a6aa0475475ee292e54807accc839ed001338275f48da13e3bfb77514",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="5902fae0485789f1d1cc6b8e81d9f1b39338170d3139844d5edf0d324f9694c9",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="20fcd34323c541c182655b7ff6dc6ff268c0127596f0d9993884621c2b14b67a",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="733499a8d55e2d73bf874d43a98ee7425e4325f77e03fb0c80debf36c740cb70",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="56b50e185b7cdf4615d2f56d3a4e86fe76f885e9ad04845f3d0671afcb315c69",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="6d33cc371b9a5ac9c0ab9853bac736f6cea0d2192f4dc9e6d8175d207ee4b4f2",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="656bd6ec547810fd74bcebba41453e6e729f3fdb7346f5564ab71fc0346c3fb5",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="759da5c6ef0cc1e4ecf2083659e78b8bbaa015f0bb360177674e0feb3032c5be",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="c46995f9f18733ec18e370c21d7c0d6ac719e8e9d3254c6303a20ba90831e12e",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="11d7d97268aeb953c34a80125c4577e27cb57cb6095606533105cecf2bd2ec9c",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="a2438632ea1606e83a8c0e1a8777aa5fdca66d77d90862642eb0ec2314b4978d",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="1eb2cb5f6e90ed1b7a9ac6dd86f09ec2ea27bceb5a92eeffa9c2123950c53b9d",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="cf528d9acb4f9b9c3aad439ae76bfc3d02be6e7a74d96099544e5d54e1a23675")
+ version("5.4.0", sha256="78db2c2ea466a4c5d84beedc000ae934f6d0ff1793eae90bb8d02b2dbff8932c")
+ version("5.3.3", sha256="b4fc3c05892729873dc098f111c31f83af7d33da572bdb7d87de100d4c238e6d")
+ version("5.3.0", sha256="4016cfc240b3cc1a97b549ecc4a5b76369610d46247661834630846391e5fad2")
+
+ depends_on("cxx", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -117,36 +54,15 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
sticky=True,
)
variant("rocm", default=True, description="Enable ROCm support")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
- depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
- depends_on("cmake@3.5.1:", type="build")
-
- depends_on("hip +cuda", when="+cuda")
+ depends_on("cmake@3.10.2:", type="build")
depends_on("googletest@1.10.0:", type="test")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -157,17 +73,27 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocprim@" + ver, when="+rocm @" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"rocprim@{ver}", when=f"+rocm @{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"hip +cuda@{ver}", when=f"+cuda @{ver}")
# fix hardcoded search in /opt/rocm and broken config mode search
- patch("find-hip-cuda-rocm-5.1.patch", when="@5.1:5.2 +cuda")
patch("find-hip-cuda-rocm-5.3.patch", when="@5.3: +cuda")
def setup_build_environment(self, env):
if self.spec.satisfies("+rocm"):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
def cmake_args(self):
args = [self.define("BUILD_TEST", self.run_tests)]
@@ -175,15 +101,9 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage):
if self.spec.satisfies("+rocm ^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
- # FindHIP.cmake was used for +rocm until 3.7.0 and is still used for +cuda
- if self.spec.satisfies("@:3.7.0") or self.spec.satisfies("+cuda"):
- if self.spec["hip"].satisfies("@:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- else:
- args.append(
- self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip)
- )
-
+ # FindHIP.cmake is still used for +cuda
+ if self.spec.satisfies("+cuda"):
+ args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
if self.spec.satisfies("@5.2.0:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
diff --git a/var/spack/repos/builtin/packages/hipfft/001-remove-submodule-and-sync-shared-files-from-rocFFT.patch b/var/spack/repos/builtin/packages/hipfft/001-remove-submodule-and-sync-shared-files-from-rocFFT.patch
new file mode 100644
index 0000000000..537794d3cc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipfft/001-remove-submodule-and-sync-shared-files-from-rocFFT.patch
@@ -0,0 +1,11431 @@
+From 27ae15a459f45f1acfcb1a9b1c8d491d9f731fd4 Mon Sep 17 00:00:00 2001
+From: Steve Leung <Steve.Leung@amd.com>
+Date: Thu, 4 Jan 2024 16:36:08 -0700
+Subject: [PATCH] remove submodule and sync shared files from rocFFT, update
+ CHANGELOG.md
+
+---
+ clients/CMakeLists.txt | 15 -
+ clients/bench/CMakeLists.txt | 4 +-
+ clients/bench/bench.cpp | 2 +-
+ clients/hipfft_params.h | 2 +-
+ clients/tests/CMakeLists.txt | 11 +-
+ clients/tests/accuracy_test_1D.cpp | 8 +-
+ clients/tests/accuracy_test_2D.cpp | 8 +-
+ clients/tests/accuracy_test_3D.cpp | 8 +-
+ clients/tests/accuracy_test_callback.cpp | 2 +-
+ clients/tests/gtest_main.cpp | 6 +-
+ clients/tests/hipfft_accuracy_test.cpp | 11 +-
+ clients/tests/hipfft_accuracy_test.h | 2 +-
+ clients/tests/multi_device_test.cpp | 2 +-
+ cmake/dependencies.cmake | 3 -
+ library/src/amd_detail/hipfft.cpp | 8 +-
+ shared/accuracy_test.h | 1949 +++++++++++++
+ shared/arithmetic.h | 61 +
+ shared/array_predicate.h | 47 +
+ shared/array_validator.cpp | 549 ++++
+ shared/array_validator.h | 31 +
+ shared/concurrency.h | 41 +
+ shared/data_gen_device.h | 1303 +++++++++
+ shared/data_gen_host.h | 881 ++++++
+ shared/device_properties.h | 74 +
+ shared/enum_to_string.h | 81 +
+ shared/environment.h | 97 +
+ shared/fft_params.h | 3274 ++++++++++++++++++++++
+ shared/fftw_transform.h | 493 ++++
+ shared/gpubuf.h | 134 +
+ shared/hip_object_wrapper.h | 86 +
+ shared/hostbuf.h | 158 ++
+ shared/increment.h | 100 +
+ shared/precision_type.h | 70 +
+ shared/printbuffer.h | 108 +
+ shared/ptrdiff.h | 40 +
+ shared/rocfft_accuracy_test.h | 29 +
+ shared/rocfft_against_fftw.h | 231 ++
+ shared/rocfft_complex.h | 346 +++
+ shared/rocfft_hip.h | 52 +
+ shared/rocfft_params.h | 585 ++++
+ shared/test_params.h | 51 +
+ shared/work_queue.h | 49 +
+ 46 files changed, 10966 insertions(+), 66 deletions(-)
+ create mode 100644 shared/accuracy_test.h
+ create mode 100644 shared/arithmetic.h
+ create mode 100644 shared/array_predicate.h
+ create mode 100644 shared/array_validator.cpp
+ create mode 100644 shared/array_validator.h
+ create mode 100644 shared/concurrency.h
+ create mode 100644 shared/data_gen_device.h
+ create mode 100644 shared/data_gen_host.h
+ create mode 100644 shared/device_properties.h
+ create mode 100644 shared/enum_to_string.h
+ create mode 100644 shared/environment.h
+ create mode 100644 shared/fft_params.h
+ create mode 100644 shared/fftw_transform.h
+ create mode 100644 shared/gpubuf.h
+ create mode 100644 shared/hip_object_wrapper.h
+ create mode 100644 shared/hostbuf.h
+ create mode 100644 shared/increment.h
+ create mode 100644 shared/precision_type.h
+ create mode 100644 shared/printbuffer.h
+ create mode 100644 shared/ptrdiff.h
+ create mode 100644 shared/rocfft_accuracy_test.h
+ create mode 100644 shared/rocfft_against_fftw.h
+ create mode 100644 shared/rocfft_complex.h
+ create mode 100644 shared/rocfft_hip.h
+ create mode 100644 shared/rocfft_params.h
+ create mode 100644 shared/test_params.h
+ create mode 100644 shared/work_queue.h
+
+diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
+index 1db0d9c..b99a9e5 100644
+--- a/clients/CMakeLists.txt
++++ b/clients/CMakeLists.txt
+@@ -65,21 +65,6 @@ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" AND NOT CMAKE_CXX_COMPILER_ID STR
+ endif()
+
+
+-if( GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git" )
+- message(STATUS "rocFFT submodule update")
+- execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/clients/rocFFT
+- RESULT_VARIABLE GIT_SUBMOD_RESULT)
+- if( NOT GIT_SUBMOD_RESULT EQUAL "0" )
+- message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules manually.")
+- endif( )
+-endif( )
+-
+-if( NOT EXISTS "${CMAKE_SOURCE_DIR}/clients/rocFFT/CMakeLists.txt" )
+- message(FATAL_ERROR "The rocFFT submodule is not present! Please update git submodules and try again. ${CMAKE_CURRENT_SOURCE_DIR}/clients/rocFFT/CMakeLists.txt")
+-endif( )
+-
+-
+ # This option only works for make/nmake and the ninja generators, but no reason it shouldn't be on
+ # all the time
+ # This tells cmake to create a compile_commands.json file that can be used with clang tooling or vim
+diff --git a/clients/bench/CMakeLists.txt b/clients/bench/CMakeLists.txt
+index b5cef9b..ccb8c29 100644
+--- a/clients/bench/CMakeLists.txt
++++ b/clients/bench/CMakeLists.txt
+@@ -26,8 +26,8 @@ find_package( Boost COMPONENTS program_options REQUIRED)
+ set( Boost_USE_STATIC_LIBS OFF )
+
+
+-set( hipfft_bench_source bench.cpp ../rocFFT/shared/array_validator.cpp )
+-set( hipfft_bench_includes bench.h ../rocFFT/shared/array_validator.h )
++set( hipfft_bench_source bench.cpp ../../shared/array_validator.cpp )
++set( hipfft_bench_includes bench.h ../../shared/array_validator.h )
+
+ add_executable( hipfft-bench ${hipfft_bench_source} ${hipfft_bench_includes} )
+
+diff --git a/clients/bench/bench.cpp b/clients/bench/bench.cpp
+index 894769c..a906879 100644
+--- a/clients/bench/bench.cpp
++++ b/clients/bench/bench.cpp
+@@ -29,7 +29,7 @@
+ #include <boost/program_options.hpp>
+ namespace po = boost::program_options;
+
+-#include "../rocFFT/shared/gpubuf.h"
++#include "../../shared/gpubuf.h"
+
+ int main(int argc, char* argv[])
+ {
+diff --git a/clients/hipfft_params.h b/clients/hipfft_params.h
+index b8b58ac..75d9db9 100644
+--- a/clients/hipfft_params.h
++++ b/clients/hipfft_params.h
+@@ -23,9 +23,9 @@
+
+ #include <optional>
+
++#include "../shared/fft_params.h"
+ #include "hipfft/hipfft.h"
+ #include "hipfft/hipfftXt.h"
+-#include "rocFFT/shared/fft_params.h"
+
+ inline fft_status fft_status_from_hipfftparams(const hipfftResult_t val)
+ {
+diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
+index 9742a45..2d1aac0 100644
+--- a/clients/tests/CMakeLists.txt
++++ b/clients/tests/CMakeLists.txt
+@@ -37,14 +37,7 @@ set( hipfft-test_source
+ accuracy_test_3D.cpp
+ accuracy_test_callback.cpp
+ multi_device_test.cpp
+- ../rocFFT/shared/array_validator.cpp
+- )
+-
+-set( hipfft-test_includes
+- ../rocFFT/clients/tests/fftw_transform.h
+- ../rocFFT/clients/tests/rocfft_against_fftw.h
+- ../rocFFT/clients/tests/misc/include/test_exception.h
+- ../rocFFT/shared/array_validator.h
++ ../../shared/array_validator.cpp
+ )
+
+ add_executable( hipfft-test ${hipfft-test_source} ${hipfft-test_includes} )
+@@ -56,8 +49,6 @@ target_include_directories(
+ $<BUILD_INTERFACE:${FFTW_INCLUDE_DIRS}>
+ $<BUILD_INTERFACE:${hip_INCLUDE_DIRS}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/include>
+- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../rocFFT/library/include>
+- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../rocFFT/clients/tests>
+ )
+
+
+diff --git a/clients/tests/accuracy_test_1D.cpp b/clients/tests/accuracy_test_1D.cpp
+index 27e849d..57d846a 100644
+--- a/clients/tests/accuracy_test_1D.cpp
++++ b/clients/tests/accuracy_test_1D.cpp
+@@ -23,11 +23,11 @@
+ #include <stdexcept>
+ #include <vector>
+
+-#include "../rocFFT/shared/fft_params.h"
++#include "../../shared/fft_params.h"
+
+-#include "accuracy_test.h"
+-#include "fftw_transform.h"
+-#include "rocfft_against_fftw.h"
++#include "../../shared/accuracy_test.h"
++#include "../../shared/fftw_transform.h"
++#include "../../shared/rocfft_against_fftw.h"
+
+ using ::testing::ValuesIn;
+
+diff --git a/clients/tests/accuracy_test_2D.cpp b/clients/tests/accuracy_test_2D.cpp
+index 1674593..6f618c0 100644
+--- a/clients/tests/accuracy_test_2D.cpp
++++ b/clients/tests/accuracy_test_2D.cpp
+@@ -23,11 +23,11 @@
+ #include <stdexcept>
+ #include <vector>
+
+-#include "../rocFFT/shared/fft_params.h"
++#include "../../shared/fft_params.h"
+
+-#include "accuracy_test.h"
+-#include "fftw_transform.h"
+-#include "rocfft_against_fftw.h"
++#include "../../shared/accuracy_test.h"
++#include "../../shared/fftw_transform.h"
++#include "../../shared/rocfft_against_fftw.h"
+
+ using ::testing::ValuesIn;
+
+diff --git a/clients/tests/accuracy_test_3D.cpp b/clients/tests/accuracy_test_3D.cpp
+index a87476a..941ec24 100644
+--- a/clients/tests/accuracy_test_3D.cpp
++++ b/clients/tests/accuracy_test_3D.cpp
+@@ -23,11 +23,11 @@
+ #include <stdexcept>
+ #include <vector>
+
+-#include "../rocFFT/shared/fft_params.h"
++#include "../../shared/fft_params.h"
+
+-#include "accuracy_test.h"
+-#include "fftw_transform.h"
+-#include "rocfft_against_fftw.h"
++#include "../../shared/accuracy_test.h"
++#include "../../shared/fftw_transform.h"
++#include "../../shared/rocfft_against_fftw.h"
+
+ using ::testing::ValuesIn;
+
+diff --git a/clients/tests/accuracy_test_callback.cpp b/clients/tests/accuracy_test_callback.cpp
+index 4782830..b5cc4a7 100644
+--- a/clients/tests/accuracy_test_callback.cpp
++++ b/clients/tests/accuracy_test_callback.cpp
+@@ -18,7 +18,7 @@
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ // THE SOFTWARE.
+
+-#include "accuracy_test.h"
++#include "../../shared/accuracy_test.h"
+
+ std::vector<std::vector<size_t>> callback_sizes = {
+ // some single kernel sizes
+diff --git a/clients/tests/gtest_main.cpp b/clients/tests/gtest_main.cpp
+index 1f0ae83..2f7674e 100644
+--- a/clients/tests/gtest_main.cpp
++++ b/clients/tests/gtest_main.cpp
+@@ -30,10 +30,10 @@
+ #include <streambuf>
+ #include <string>
+
++#include "../../shared/concurrency.h"
++#include "../../shared/environment.h"
++#include "../../shared/work_queue.h"
+ #include "../hipfft_params.h"
+-#include "../rocFFT/shared/concurrency.h"
+-#include "../rocFFT/shared/environment.h"
+-#include "../rocFFT/shared/work_queue.h"
+ #include "hipfft/hipfft.h"
+ #include "hipfft_accuracy_test.h"
+ #include "hipfft_test_params.h"
+diff --git a/clients/tests/hipfft_accuracy_test.cpp b/clients/tests/hipfft_accuracy_test.cpp
+index 2abaf74..609239a 100644
+--- a/clients/tests/hipfft_accuracy_test.cpp
++++ b/clients/tests/hipfft_accuracy_test.cpp
+@@ -29,11 +29,12 @@
+ #include "hipfft/hipfft.h"
+
+ #include "../hipfft_params.h"
+-#include "../rocFFT/clients/tests/fftw_transform.h"
+-#include "../rocFFT/clients/tests/rocfft_accuracy_test.h"
+-#include "../rocFFT/clients/tests/rocfft_against_fftw.h"
+-#include "../rocFFT/shared/gpubuf.h"
+-#include "../rocFFT/shared/rocfft_complex.h"
++
++#include "../../shared/accuracy_test.h"
++#include "../../shared/fftw_transform.h"
++#include "../../shared/gpubuf.h"
++#include "../../shared/rocfft_against_fftw.h"
++#include "../../shared/rocfft_complex.h"
+
+ void fft_vs_reference(hipfft_params& params, bool round_trip)
+ {
+diff --git a/clients/tests/hipfft_accuracy_test.h b/clients/tests/hipfft_accuracy_test.h
+index 0491bd9..181150e 100644
+--- a/clients/tests/hipfft_accuracy_test.h
++++ b/clients/tests/hipfft_accuracy_test.h
+@@ -23,8 +23,8 @@
+ #ifndef ROCFFT_ACCURACY_TEST
+ #define ROCFFT_ACCURACY_TEST
+
++#include "../../shared/accuracy_test.h"
+ #include "../hipfft_params.h"
+-#include "../rocFFT/clients/tests/accuracy_test.h"
+
+ void fft_vs_reference(hipfft_params& params, bool round_trip = false);
+
+diff --git a/clients/tests/multi_device_test.cpp b/clients/tests/multi_device_test.cpp
+index b3dc4c9..3274b80 100644
+--- a/clients/tests/multi_device_test.cpp
++++ b/clients/tests/multi_device_test.cpp
+@@ -18,7 +18,7 @@
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ // THE SOFTWARE.
+
+-#include "accuracy_test.h"
++#include "../../shared/accuracy_test.h"
+ #include <gtest/gtest.h>
+ #include <hip/hip_runtime_api.h>
+
+diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
+index 5810e37..bdbf689 100644
+--- a/cmake/dependencies.cmake
++++ b/cmake/dependencies.cmake
+@@ -21,9 +21,6 @@
+ #
+ # #############################################################################
+
+-# Git
+-find_package(Git REQUIRED)
+-
+ # HIP
+ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
+ if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
+diff --git a/library/src/amd_detail/hipfft.cpp b/library/src/amd_detail/hipfft.cpp
+index c2f7036..3d4f61f 100644
+--- a/library/src/amd_detail/hipfft.cpp
++++ b/library/src/amd_detail/hipfft.cpp
+@@ -27,10 +27,10 @@
+ #include <string>
+ #include <vector>
+
+-#include "../../../clients/rocFFT/shared/arithmetic.h"
+-#include "../../../clients/rocFFT/shared/gpubuf.h"
+-#include "../../../clients/rocFFT/shared/ptrdiff.h"
+-#include "../../../clients/rocFFT/shared/rocfft_hip.h"
++#include "../../../shared/arithmetic.h"
++#include "../../../shared/gpubuf.h"
++#include "../../../shared/ptrdiff.h"
++#include "../../../shared/rocfft_hip.h"
+
+ #define ROC_FFT_CHECK_ALLOC_FAILED(ret) \
+ { \
+diff --git a/shared/accuracy_test.h b/shared/accuracy_test.h
+new file mode 100644
+index 0000000..362a7c1
+--- /dev/null
++++ b/shared/accuracy_test.h
+@@ -0,0 +1,1949 @@
++// Copyright (C) 2020 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++
++#ifndef ACCURACY_TEST
++#define ACCURACY_TEST
++
++#include <algorithm>
++#include <functional>
++#include <future>
++#include <iterator>
++#include <string>
++#include <vector>
++
++#include "enum_to_string.h"
++#include "fft_params.h"
++#include "fftw_transform.h"
++#include "gpubuf.h"
++#include "rocfft_against_fftw.h"
++#include "test_params.h"
++
++extern int verbose;
++extern size_t ramgb;
++extern bool fftw_compare;
++
++static const size_t ONE_GiB = 1 << 30;
++
++inline size_t bytes_to_GiB(const size_t bytes)
++{
++ return bytes == 0 ? 0 : (bytes - 1 + ONE_GiB) / ONE_GiB;
++}
++
++typedef std::tuple<fft_transform_type, fft_result_placement, fft_array_type, fft_array_type>
++ type_place_io_t;
++
++// Remember the results of the last FFT we computed with FFTW. Tests
++// are ordered so that later cases can often reuse this result.
++struct last_cpu_fft_cache
++{
++ // keys to the cache
++ std::vector<size_t> length;
++ size_t nbatch = 0;
++ fft_transform_type transform_type = fft_transform_type_complex_forward;
++ bool run_callbacks = false;
++ fft_precision precision = fft_precision_single;
++
++ // FFTW input/output
++ std::vector<hostbuf> cpu_input;
++ std::vector<hostbuf> cpu_output;
++};
++extern last_cpu_fft_cache last_cpu_fft_data;
++
++struct system_memory
++{
++ size_t total_bytes = 0;
++ size_t free_bytes = 0;
++};
++extern system_memory start_memory;
++
++system_memory get_system_memory();
++
++// Estimate the amount of host memory needed for buffers.
++inline size_t needed_ram_buffers(const fft_params& params, const int verbose)
++{
++ // This calculation is assuming contiguous data but noncontiguous buffers
++ // are assumed to require a close enough amount of space for the purposes
++ // of this estimate.
++
++ size_t needed_ram = 6
++ * std::accumulate(params.length.begin(),
++ params.length.end(),
++ static_cast<size_t>(1),
++ std::multiplies<size_t>());
++
++ // Account for precision and data type:
++ if(params.transform_type != fft_transform_type_real_forward
++ && params.transform_type != fft_transform_type_real_inverse)
++ {
++ needed_ram *= 2;
++ }
++ switch(params.precision)
++ {
++ case fft_precision_half:
++ needed_ram *= 2;
++ break;
++ case fft_precision_single:
++ needed_ram *= 4;
++ break;
++ case fft_precision_double:
++ needed_ram *= 8;
++ break;
++ }
++
++ needed_ram *= params.nbatch;
++
++ if(verbose)
++ {
++ std::cout << "required host memory for buffers (GiB): " << bytes_to_GiB(needed_ram) << "\n";
++ }
++
++ return needed_ram;
++}
++
++template <typename Tfloat>
++bool fftw_plan_uses_bluestein(const typename fftw_trait<Tfloat>::fftw_plan_type& cpu_plan)
++{
++#ifdef FFTW_HAVE_SPRINT_PLAN
++ char* print_plan_c_str = fftw_sprint_plan<Tfloat>(cpu_plan);
++ std::string print_plan(print_plan_c_str);
++ free(print_plan_c_str);
++ return print_plan.find("bluestein") != std::string::npos;
++#else
++ // assume worst case (bluestein is always used)
++ return true;
++#endif
++}
++
++// Estimate the amount of host memory needed for fftw.
++template <typename Tfloat>
++inline size_t needed_ram_fftw(const fft_params& contiguous_params,
++ const typename fftw_trait<Tfloat>::fftw_plan_type& cpu_plan,
++ const int verbose)
++{
++ size_t total_length = std::accumulate(contiguous_params.length.begin(),
++ contiguous_params.length.end(),
++ static_cast<size_t>(1),
++ std::multiplies<size_t>());
++ size_t needed_ram = 0;
++ // Detect Bluestein in plan
++ if(fftw_plan_uses_bluestein<Tfloat>(cpu_plan))
++ {
++ for(size_t dim : contiguous_params.length)
++ {
++ unsigned int needed_ram_dim = dim;
++
++ // Next-plus-one-power-of-two multiplied any other lengths
++ needed_ram_dim--;
++
++ needed_ram_dim |= needed_ram_dim >> 2;
++ needed_ram_dim |= needed_ram_dim >> 4;
++ needed_ram_dim |= needed_ram_dim >> 8;
++ needed_ram_dim |= needed_ram_dim >> 16;
++
++ needed_ram_dim++;
++
++ needed_ram_dim *= 2 * (total_length / dim);
++
++ if(needed_ram_dim > needed_ram)
++ {
++ needed_ram = needed_ram_dim;
++ }
++ }
++ }
++
++ // Account for precision and data type:
++ if(contiguous_params.transform_type != fft_transform_type_real_forward
++ && contiguous_params.transform_type != fft_transform_type_real_inverse)
++ {
++ needed_ram *= 2;
++ }
++ switch(contiguous_params.precision)
++ {
++ case fft_precision_half:
++ needed_ram *= 2;
++ break;
++ case fft_precision_single:
++ needed_ram *= 4;
++ break;
++ case fft_precision_double:
++ needed_ram *= 8;
++ break;
++ }
++
++ needed_ram *= contiguous_params.nbatch;
++
++ if(verbose)
++ {
++ std::cout << "required host memory for FFTW (GiB): " << bytes_to_GiB(needed_ram) << "\n";
++ }
++
++ return needed_ram;
++}
++
++// Base gtest class for comparison with FFTW.
++class accuracy_test : public ::testing::TestWithParam<fft_params>
++{
++protected:
++ void SetUp() override {}
++ void TearDown() override {}
++
++public:
++ static std::string TestName(const testing::TestParamInfo<accuracy_test::ParamType>& info)
++ {
++ return info.param.token();
++ }
++};
++
++const static std::vector<size_t> batch_range = {2, 1};
++
++const static std::vector<fft_precision> precision_range_full
++ = {fft_precision_double, fft_precision_single, fft_precision_half};
++const static std::vector<fft_precision> precision_range_sp_dp
++ = {fft_precision_double, fft_precision_single};
++
++const static std::vector<fft_result_placement> place_range
++ = {fft_placement_inplace, fft_placement_notinplace};
++const static std::vector<fft_transform_type> trans_type_range
++ = {fft_transform_type_complex_forward, fft_transform_type_real_forward};
++const static std::vector<fft_transform_type> trans_type_range_complex
++ = {fft_transform_type_complex_forward};
++const static std::vector<fft_transform_type> trans_type_range_real
++ = {fft_transform_type_real_forward};
++
++// Given a vector of vector of lengths, generate all unique permutations.
++// Add an optional vector of ad-hoc lengths to the result.
++inline std::vector<std::vector<size_t>>
++ generate_lengths(const std::vector<std::vector<size_t>>& inlengths)
++{
++ std::vector<std::vector<size_t>> output;
++ if(inlengths.size() == 0)
++ {
++ return output;
++ }
++ const size_t dim = inlengths.size();
++ std::vector<size_t> looplength(dim);
++ for(unsigned int i = 0; i < dim; ++i)
++ {
++ looplength[i] = inlengths[i].size();
++ }
++ for(unsigned int idx = 0; idx < inlengths.size(); ++idx)
++ {
++ std::vector<size_t> index(dim);
++ do
++ {
++ std::vector<size_t> length(dim);
++ for(unsigned int i = 0; i < dim; ++i)
++ {
++ length[i] = inlengths[i][index[i]];
++ }
++ output.push_back(length);
++ } while(increment_rowmajor(index, looplength));
++ }
++ // uniquify the result
++ std::sort(output.begin(), output.end());
++ output.erase(std::unique(output.begin(), output.end()), output.end());
++ return output;
++}
++
++// Return the valid rocFFT input and output types for a given transform type.
++inline std::vector<std::pair<fft_array_type, fft_array_type>>
++ iotypes(const fft_transform_type transformType,
++ const fft_result_placement place,
++ const bool planar = true)
++{
++ std::vector<std::pair<fft_array_type, fft_array_type>> iotypes;
++ switch(transformType)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_complex_interleaved, fft_array_type_complex_interleaved));
++ if(planar)
++ {
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_complex_planar, fft_array_type_complex_planar));
++ if(place == fft_placement_notinplace)
++ {
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_complex_planar, fft_array_type_complex_interleaved));
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_complex_interleaved, fft_array_type_complex_planar));
++ }
++ }
++ break;
++ case fft_transform_type_real_forward:
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_real, fft_array_type_hermitian_interleaved));
++ if(planar && place == fft_placement_notinplace)
++ {
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_real, fft_array_type_hermitian_planar));
++ }
++ break;
++ case fft_transform_type_real_inverse:
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_hermitian_interleaved, fft_array_type_real));
++ if(planar && place == fft_placement_notinplace)
++ {
++ iotypes.push_back(std::make_pair<fft_array_type, fft_array_type>(
++ fft_array_type_hermitian_planar, fft_array_type_real));
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ return iotypes;
++}
++
++// Generate all combinations of input/output types, from combinations of transform and placement
++// types.
++static std::vector<type_place_io_t>
++ generate_types(fft_transform_type transform_type,
++ const std::vector<fft_result_placement>& place_range,
++ const bool planar)
++{
++ std::vector<type_place_io_t> ret;
++ for(auto place : place_range)
++ {
++ for(auto iotype : iotypes(transform_type, place, planar))
++ {
++ ret.push_back(std::make_tuple(transform_type, place, iotype.first, iotype.second));
++ }
++ }
++ return ret;
++}
++
++struct stride_generator
++{
++ struct stride_dist
++ {
++ stride_dist(const std::vector<size_t>& s, size_t d)
++ : stride(s)
++ , dist(d)
++ {
++ }
++ std::vector<size_t> stride;
++ size_t dist;
++ };
++
++ // NOTE: allow for this ctor to be implicit, so it's less typing for a test writer
++ //
++ // cppcheck-suppress noExplicitConstructor
++ stride_generator(const std::vector<std::vector<size_t>>& stride_list_in)
++ : stride_list(stride_list_in)
++ {
++ }
++ virtual std::vector<stride_dist> generate(const std::vector<size_t>& lengths,
++ size_t batch) const
++ {
++ std::vector<stride_dist> ret;
++ for(const auto& s : stride_list)
++ ret.emplace_back(s, 0);
++ return ret;
++ }
++ std::vector<std::vector<size_t>> stride_list;
++};
++
++// Generate strides such that batch is essentially the innermost dimension
++// e.g. given a batch-2 4x3x2 transform which logically looks like:
++//
++// batch0:
++// A B A B
++// A B A B
++// A B A B
++//
++// A B A B
++// A B A B
++// A B A B
++//
++// batch1:
++// A B A B
++// A B A B
++// A B A B
++//
++// A B A B
++// A B A B
++// A B A B
++//
++// we instead do stride-2 4x3x2 transform where first batch is the
++// A's and second batch is the B's.
++struct stride_generator_3D_inner_batch : public stride_generator
++{
++ explicit stride_generator_3D_inner_batch(const std::vector<std::vector<size_t>>& stride_list_in)
++ : stride_generator(stride_list_in)
++ {
++ }
++ std::vector<stride_dist> generate(const std::vector<size_t>& lengths,
++ size_t batch) const override
++ {
++ std::vector<stride_dist> ret = stride_generator::generate(lengths, batch);
++ std::vector<size_t> strides{lengths[1] * lengths[2] * batch, lengths[2] * batch, batch};
++ ret.emplace_back(strides, 1);
++ return ret;
++ }
++};
++
++// Create an array of parameters to pass to gtest. Base generator
++// that allows choosing transform type.
++inline auto param_generator_base(const std::vector<fft_transform_type>& type_range,
++ const std::vector<std::vector<size_t>>& v_lengths,
++ const std::vector<fft_precision>& precision_range,
++ const std::vector<size_t>& batch_range,
++ decltype(generate_types) types_generator,
++ const stride_generator& istride,
++ const stride_generator& ostride,
++ const std::vector<std::vector<size_t>>& ioffset_range,
++ const std::vector<std::vector<size_t>>& ooffset_range,
++ const std::vector<fft_result_placement>& place_range,
++ const bool planar = true,
++ const bool run_callbacks = false)
++{
++
++ std::vector<fft_params> params;
++
++ // For any length, we compute double-precision CPU reference
++ // for largest batch size first and reuse for smaller batch
++ // sizes, then convert to single-precision.
++
++ for(auto& transform_type : type_range)
++ {
++ for(const auto& lengths : v_lengths)
++ {
++ // try to ensure that we are given literal lengths, not
++ // something to be passed to generate_lengths
++ if(lengths.empty() || lengths.size() > 3)
++ {
++ continue;
++ }
++ {
++ for(const auto precision : precision_range)
++ {
++ for(const auto batch : batch_range)
++ {
++ for(const auto& types :
++ types_generator(transform_type, place_range, planar))
++ {
++ for(const auto& istride_dist : istride.generate(lengths, batch))
++ {
++ for(const auto& ostride_dist : ostride.generate(lengths, batch))
++ {
++ for(const auto& ioffset : ioffset_range)
++ {
++ for(const auto& ooffset : ooffset_range)
++ {
++ fft_params param;
++
++ param.length = lengths;
++ param.istride = istride_dist.stride;
++ param.ostride = ostride_dist.stride;
++ param.nbatch = batch;
++ param.precision = precision;
++ param.transform_type = std::get<0>(types);
++ param.placement = std::get<1>(types);
++ param.idist = istride_dist.dist;
++ param.odist = ostride_dist.dist;
++ param.itype = std::get<2>(types);
++ param.otype = std::get<3>(types);
++ param.ioffset = ioffset;
++ param.ooffset = ooffset;
++
++ if(run_callbacks)
++ {
++ // add a test if both input and output support callbacks
++ if(param.itype != fft_array_type_complex_planar
++ && param.itype != fft_array_type_hermitian_planar
++ && param.otype != fft_array_type_complex_planar
++ && param.otype
++ != fft_array_type_hermitian_planar)
++ {
++ param.run_callbacks = true;
++ }
++ else
++ {
++ continue;
++ }
++ }
++ param.validate();
++
++ // Keeping the random number generator here
++ // allows one to run the same tests for a given
++ // random seed; ie the test suite is repeatable.
++ std::hash<std::string> hasher;
++ std::ranlux24_base gen(random_seed
++ + hasher(param.token()));
++ std::uniform_real_distribution<> dis(0.0, 1.0);
++
++ if(param.is_planar())
++ {
++ const double roll = dis(gen);
++ if(roll > planar_prob)
++ {
++ if(verbose > 4)
++ {
++ std::cout << "Planar transform skipped "
++ "(planar_prob: "
++ << planar_prob << " > " << roll
++ << ")\n";
++ }
++ continue;
++ }
++ }
++ if(run_callbacks)
++ {
++ const double roll = dis(gen);
++ if(roll > callback_prob)
++ {
++
++ if(verbose > 4)
++ {
++ std::cout << "Callback transform skipped "
++ "(planar_prob: "
++ << planar_prob << " > " << roll
++ << ")\n";
++ }
++ continue;
++ }
++ }
++
++ if(param.valid(0))
++ {
++ params.push_back(param);
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ return params;
++}
++
++// Create an array of parameters to pass to gtest. Default generator
++// that picks all transform types.
++inline auto param_generator(const std::vector<std::vector<size_t>>& v_lengths,
++ const std::vector<fft_precision>& precision_range,
++ const std::vector<size_t>& batch_range,
++ const stride_generator& istride,
++ const stride_generator& ostride,
++ const std::vector<std::vector<size_t>>& ioffset_range,
++ const std::vector<std::vector<size_t>>& ooffset_range,
++ const std::vector<fft_result_placement>& place_range,
++ const bool planar,
++ const bool run_callbacks = false)
++{
++ return param_generator_base(trans_type_range,
++ v_lengths,
++ precision_range,
++ batch_range,
++ generate_types,
++ istride,
++ ostride,
++ ioffset_range,
++ ooffset_range,
++ place_range,
++ planar,
++ run_callbacks);
++}
++
++// Create an array of parameters to pass to gtest. Only tests complex-type transforms
++inline auto param_generator_complex(const std::vector<std::vector<size_t>>& v_lengths,
++ const std::vector<fft_precision>& precision_range,
++ const std::vector<size_t>& batch_range,
++ const stride_generator& istride,
++ const stride_generator& ostride,
++ const std::vector<std::vector<size_t>>& ioffset_range,
++ const std::vector<std::vector<size_t>>& ooffset_range,
++ const std::vector<fft_result_placement>& place_range,
++ const bool planar,
++ const bool run_callbacks = false)
++{
++ return param_generator_base(trans_type_range_complex,
++ v_lengths,
++ precision_range,
++ batch_range,
++ generate_types,
++ istride,
++ ostride,
++ ioffset_range,
++ ooffset_range,
++ place_range,
++ planar,
++ run_callbacks);
++}
++
++// Create an array of parameters to pass to gtest.
++inline auto param_generator_real(const std::vector<std::vector<size_t>>& v_lengths,
++ const std::vector<fft_precision>& precision_range,
++ const std::vector<size_t>& batch_range,
++ const stride_generator& istride,
++ const stride_generator& ostride,
++ const std::vector<std::vector<size_t>>& ioffset_range,
++ const std::vector<std::vector<size_t>>& ooffset_range,
++ const std::vector<fft_result_placement>& place_range,
++ const bool planar,
++ const bool run_callbacks = false)
++{
++ return param_generator_base(trans_type_range_real,
++ v_lengths,
++ precision_range,
++ batch_range,
++ generate_types,
++ istride,
++ ostride,
++ ioffset_range,
++ ooffset_range,
++ place_range,
++ planar,
++ run_callbacks);
++}
++
++template <class Tcontainer>
++auto param_generator_token(const Tcontainer& tokens)
++{
++ std::vector<fft_params> params;
++ params.reserve(tokens.size());
++ for(auto t : tokens)
++ {
++ params.push_back({});
++ params.back().from_token(t);
++ }
++ return params;
++}
++
++struct callback_test_data
++{
++ // scalar to modify the input/output with
++ double scalar;
++ // base address of input, to ensure that each callback gets an offset from that base
++ void* base;
++};
++
++void* get_load_callback_host(fft_array_type itype,
++ fft_precision precision,
++ bool round_trip_inverse);
++void apply_load_callback(const fft_params& params, std::vector<hostbuf>& input);
++void apply_store_callback(const fft_params& params, std::vector<hostbuf>& output);
++void* get_store_callback_host(fft_array_type otype,
++ fft_precision precision,
++ bool round_trip_inverse);
++
++static auto allocate_cpu_fft_buffer(const fft_precision precision,
++ const fft_array_type type,
++ const std::vector<size_t>& size)
++{
++ // FFTW does not support half-precision, so we do single instead.
++ // So if we need to do a half-precision FFTW transform, allocate
++ // enough buffer for single-precision instead.
++ return allocate_host_buffer(
++ precision == fft_precision_half ? fft_precision_single : precision, type, size);
++}
++
++template <typename Tfloat>
++inline void execute_cpu_fft(fft_params& params,
++ fft_params& contiguous_params,
++ typename fftw_trait<Tfloat>::fftw_plan_type& cpu_plan,
++ std::vector<hostbuf>& cpu_input,
++ std::vector<hostbuf>& cpu_output)
++{
++ // CPU output might not be allocated already for us, if FFTW never
++ // needed an output buffer during planning
++ if(cpu_output.empty())
++ cpu_output = allocate_cpu_fft_buffer(
++ contiguous_params.precision, contiguous_params.otype, contiguous_params.osize);
++
++ // If this is either C2R or callbacks are enabled, the
++ // input will be modified. So we need to modify the copy instead.
++ std::vector<hostbuf> cpu_input_copy(cpu_input.size());
++ std::vector<hostbuf>* input_ptr = &cpu_input;
++ if(params.run_callbacks || contiguous_params.transform_type == fft_transform_type_real_inverse)
++ {
++ for(size_t i = 0; i < cpu_input.size(); ++i)
++ {
++ cpu_input_copy[i] = cpu_input[i].copy();
++ }
++
++ input_ptr = &cpu_input_copy;
++ }
++
++ // run FFTW (which may destroy CPU input)
++ apply_load_callback(params, *input_ptr);
++ fftw_run<Tfloat>(contiguous_params.transform_type, cpu_plan, *input_ptr, cpu_output);
++ // clean up
++ fftw_destroy_plan_type(cpu_plan);
++ // ask FFTW to fully clean up, since it tries to cache plan details
++ fftw_cleanup();
++ cpu_plan = nullptr;
++ apply_store_callback(params, cpu_output);
++}
++
++// execute the GPU transform
++template <class Tparams>
++inline void execute_gpu_fft(Tparams& params,
++ std::vector<void*>& pibuffer,
++ std::vector<void*>& pobuffer,
++ std::vector<gpubuf>& obuffer,
++ std::vector<hostbuf>& gpu_output,
++ bool round_trip_inverse = false)
++{
++ gpubuf_t<callback_test_data> load_cb_data_dev;
++ gpubuf_t<callback_test_data> store_cb_data_dev;
++ if(params.run_callbacks)
++ {
++ void* load_cb_host
++ = get_load_callback_host(params.itype, params.precision, round_trip_inverse);
++
++ callback_test_data load_cb_data_host;
++
++ if(round_trip_inverse)
++ {
++ load_cb_data_host.scalar = params.store_cb_scalar;
++ }
++ else
++ {
++ load_cb_data_host.scalar = params.load_cb_scalar;
++ }
++
++ load_cb_data_host.base = pibuffer.front();
++
++ auto hip_status = hipSuccess;
++
++ hip_status = load_cb_data_dev.alloc(sizeof(callback_test_data));
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP();
++ }
++ else
++ {
++ GTEST_FAIL();
++ }
++ }
++ hip_status = hipMemcpy(load_cb_data_dev.data(),
++ &load_cb_data_host,
++ sizeof(callback_test_data),
++ hipMemcpyHostToDevice);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP();
++ }
++ else
++ {
++ GTEST_FAIL();
++ }
++ }
++
++ void* store_cb_host
++ = get_store_callback_host(params.otype, params.precision, round_trip_inverse);
++
++ callback_test_data store_cb_data_host;
++
++ if(round_trip_inverse)
++ {
++ store_cb_data_host.scalar = params.load_cb_scalar;
++ }
++ else
++ {
++ store_cb_data_host.scalar = params.store_cb_scalar;
++ }
++
++ store_cb_data_host.base = pobuffer.front();
++
++ hip_status = store_cb_data_dev.alloc(sizeof(callback_test_data));
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP();
++ }
++ else
++ {
++ GTEST_FAIL();
++ }
++ }
++
++ hip_status = hipMemcpy(store_cb_data_dev.data(),
++ &store_cb_data_host,
++ sizeof(callback_test_data),
++ hipMemcpyHostToDevice);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP();
++ }
++ else
++ {
++ GTEST_FAIL();
++ }
++ }
++
++ auto fft_status = params.set_callbacks(
++ load_cb_host, load_cb_data_dev.data(), store_cb_host, store_cb_data_dev.data());
++ if(fft_status != fft_status_success)
++ throw std::runtime_error("set callback failure");
++ }
++
++ // Execute the transform:
++ auto fft_status = params.execute(pibuffer.data(), pobuffer.data());
++ if(fft_status != fft_status_success)
++ throw std::runtime_error("rocFFT plan execution failure");
++
++ // if not comparing, then just executing the GPU FFT is all we
++ // need to do
++ if(!fftw_compare)
++ return;
++
++ // finalize a multi-GPU transform
++ params.multi_gpu_finalize(obuffer, pobuffer);
++
++ ASSERT_TRUE(!gpu_output.empty()) << "no output buffers";
++ for(unsigned int idx = 0; idx < gpu_output.size(); ++idx)
++ {
++ ASSERT_TRUE(gpu_output[idx].data() != nullptr)
++ << "output buffer index " << idx << " is empty";
++ auto hip_status = hipMemcpy(gpu_output[idx].data(),
++ pobuffer.at(idx),
++ gpu_output[idx].size(),
++ hipMemcpyDeviceToHost);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemcpy failure";
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemcpy failure";
++ }
++ }
++ }
++ if(verbose > 2)
++ {
++ std::cout << "GPU output:\n";
++ params.print_obuffer(gpu_output);
++ }
++ if(verbose > 5)
++ {
++ std::cout << "flat GPU output:\n";
++ params.print_obuffer_flat(gpu_output);
++ }
++}
++
++template <typename Tfloat>
++static void assert_init_value(const std::vector<hostbuf>& output,
++ const size_t idx,
++ const Tfloat orig_value);
++
++template <>
++void assert_init_value(const std::vector<hostbuf>& output, const size_t idx, const float orig_value)
++{
++ float actual_value = reinterpret_cast<const float*>(output.front().data())[idx];
++ ASSERT_EQ(actual_value, orig_value) << "index " << idx;
++}
++
++template <>
++void assert_init_value(const std::vector<hostbuf>& output,
++ const size_t idx,
++ const double orig_value)
++{
++ double actual_value = reinterpret_cast<const double*>(output.front().data())[idx];
++ ASSERT_EQ(actual_value, orig_value) << "index " << idx;
++}
++
++template <>
++void assert_init_value(const std::vector<hostbuf>& output,
++ const size_t idx,
++ const rocfft_complex<float> orig_value)
++{
++ // if this is interleaved, check directly
++ if(output.size() == 1)
++ {
++ rocfft_complex<float> actual_value
++ = reinterpret_cast<const rocfft_complex<float>*>(output.front().data())[idx];
++ ASSERT_EQ(actual_value.x, orig_value.x) << "x index " << idx;
++ ASSERT_EQ(actual_value.y, orig_value.y) << "y index " << idx;
++ }
++ else
++ {
++ // planar
++ rocfft_complex<float> actual_value{
++ reinterpret_cast<const float*>(output.front().data())[idx],
++ reinterpret_cast<const float*>(output.back().data())[idx]};
++ ASSERT_EQ(actual_value.x, orig_value.x) << "x index " << idx;
++ ASSERT_EQ(actual_value.y, orig_value.y) << "y index " << idx;
++ }
++}
++
++template <>
++void assert_init_value(const std::vector<hostbuf>& output,
++ const size_t idx,
++ const rocfft_complex<double> orig_value)
++{
++ // if this is interleaved, check directly
++ if(output.size() == 1)
++ {
++ rocfft_complex<double> actual_value
++ = reinterpret_cast<const rocfft_complex<double>*>(output.front().data())[idx];
++ ASSERT_EQ(actual_value.x, orig_value.x) << "x index " << idx;
++ ASSERT_EQ(actual_value.y, orig_value.y) << "y index " << idx;
++ }
++ else
++ {
++ // planar
++ rocfft_complex<double> actual_value{
++ reinterpret_cast<const double*>(output.front().data())[idx],
++ reinterpret_cast<const double*>(output.back().data())[idx]};
++ ASSERT_EQ(actual_value.x, orig_value.x) << "x index " << idx;
++ ASSERT_EQ(actual_value.y, orig_value.y) << "y index " << idx;
++ }
++}
++
++static const int OUTPUT_INIT_PATTERN = 0xcd;
++template <class Tfloat>
++void check_single_output_stride(const std::vector<hostbuf>& output,
++ const size_t offset,
++ const std::vector<size_t>& length,
++ const std::vector<size_t>& stride,
++ const size_t i)
++{
++ Tfloat orig;
++ memset(static_cast<void*>(&orig), OUTPUT_INIT_PATTERN, sizeof(Tfloat));
++
++ size_t curLength = length[i];
++ size_t curStride = stride[i];
++ size_t nextSmallerLength = i == length.size() - 1 ? 0 : length[i + 1];
++ size_t nextSmallerStride = i == stride.size() - 1 ? 0 : stride[i + 1];
++
++ if(nextSmallerLength == 0)
++ {
++ // this is the fastest dim, indexes that are not multiples of
++ // the stride should be the initial value
++ for(size_t idx = 0; idx < (curLength - 1) * curStride; ++idx)
++ {
++ if(idx % curStride != 0)
++ assert_init_value<Tfloat>(output, idx, orig);
++ }
++ }
++ else
++ {
++ for(size_t lengthIdx = 0; lengthIdx < curLength; ++lengthIdx)
++ {
++ // check that the space after the next smaller dim and the
++ // end of this dim is initial value
++ for(size_t idx = nextSmallerLength * nextSmallerStride; idx < curStride; ++idx)
++ assert_init_value<Tfloat>(output, idx, orig);
++
++ check_single_output_stride<Tfloat>(
++ output, offset + lengthIdx * curStride, length, stride, i + 1);
++ }
++ }
++}
++
++template <class Tparams>
++void check_output_strides(const std::vector<hostbuf>& output, Tparams& params)
++{
++ // treat batch+dist like highest length+stride, if batch > 1
++ std::vector<size_t> length;
++ std::vector<size_t> stride;
++ if(params.nbatch > 1)
++ {
++ length.push_back(params.nbatch);
++ stride.push_back(params.odist);
++ }
++
++ auto olength = params.olength();
++ std::copy(olength.begin(), olength.end(), std::back_inserter(length));
++ std::copy(params.ostride.begin(), params.ostride.end(), std::back_inserter(stride));
++
++ if(params.precision == fft_precision_single)
++ {
++ if(params.otype == fft_array_type_real)
++ check_single_output_stride<float>(output, 0, length, stride, 0);
++ else
++ check_single_output_stride<rocfft_complex<float>>(output, 0, length, stride, 0);
++ }
++ else
++ {
++ if(params.otype == fft_array_type_real)
++ check_single_output_stride<double>(output, 0, length, stride, 0);
++ else
++ check_single_output_stride<rocfft_complex<double>>(output, 0, length, stride, 0);
++ }
++}
++
++// run rocFFT inverse transform
++template <class Tparams>
++inline void run_round_trip_inverse(Tparams& params,
++ std::vector<gpubuf>& obuffer,
++ std::vector<void*>& pibuffer,
++ std::vector<void*>& pobuffer,
++ std::vector<hostbuf>& gpu_output)
++{
++ params.validate();
++
++ // Make sure that the parameters make sense:
++ ASSERT_TRUE(params.valid(verbose));
++
++ // Create FFT plan - this will also allocate work buffer, but will throw a
++ // specific exception if that step fails
++ auto plan_status = fft_status_success;
++ try
++ {
++ plan_status = params.create_plan();
++ }
++ catch(fft_params::work_buffer_alloc_failure& e)
++ {
++ std::stringstream ss;
++ ss << "Failed to allocate work buffer (size: " << params.workbuffersize << ")";
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << ss.str();
++ }
++ else
++ {
++ GTEST_FAIL() << ss.str();
++ }
++ }
++ ASSERT_EQ(plan_status, fft_status_success) << "round trip inverse plan creation failed";
++
++ auto obuffer_sizes = params.obuffer_sizes();
++
++ if(params.placement != fft_placement_inplace)
++ {
++ for(unsigned int i = 0; i < obuffer_sizes.size(); ++i)
++ {
++ // If we're validating output strides, init the
++ // output buffer to a known pattern and we can check
++ // that the pattern is untouched in places that
++ // shouldn't have been touched.
++ if(params.check_output_strides)
++ {
++ auto hip_status
++ = hipMemset(obuffer[i].data(), OUTPUT_INIT_PATTERN, obuffer_sizes[i]);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemset failure";
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemset failure";
++ }
++ }
++ }
++ }
++ }
++
++ // execute GPU transform
++ execute_gpu_fft(params, pibuffer, pobuffer, obuffer, gpu_output, true);
++}
++
++// compare rocFFT inverse transform with forward transform input
++template <class Tparams>
++inline void compare_round_trip_inverse(Tparams& params,
++ fft_params& contiguous_params,
++ std::vector<hostbuf>& gpu_output,
++ std::vector<hostbuf>& cpu_input,
++ const VectorNorms& cpu_input_norm,
++ size_t total_length)
++{
++ if(params.check_output_strides)
++ {
++ check_output_strides<Tparams>(gpu_output, params);
++ }
++
++ // compute GPU output norm
++ std::shared_future<VectorNorms> gpu_norm = std::async(std::launch::async, [&]() {
++ return norm(gpu_output,
++ params.olength(),
++ params.nbatch,
++ params.precision,
++ params.otype,
++ params.ostride,
++ params.odist,
++ params.ooffset);
++ });
++
++ // compare GPU inverse output to CPU forward input
++ std::unique_ptr<std::vector<std::pair<size_t, size_t>>> linf_failures;
++ if(verbose > 1)
++ linf_failures = std::make_unique<std::vector<std::pair<size_t, size_t>>>();
++ const double linf_cutoff
++ = type_epsilon(params.precision) * cpu_input_norm.l_inf * log(total_length);
++
++ VectorNorms diff = distance(cpu_input,
++ gpu_output,
++ params.olength(),
++ params.nbatch,
++ params.precision,
++ contiguous_params.itype,
++ contiguous_params.istride,
++ contiguous_params.idist,
++ params.otype,
++ params.ostride,
++ params.odist,
++ linf_failures.get(),
++ linf_cutoff,
++ {0},
++ params.ooffset,
++ 1.0 / total_length);
++
++ if(verbose > 1)
++ {
++ std::cout << "GPU output Linf norm: " << gpu_norm.get().l_inf << "\n";
++ std::cout << "GPU output L2 norm: " << gpu_norm.get().l_2 << "\n";
++ std::cout << "GPU linf norm failures:";
++ std::sort(linf_failures->begin(), linf_failures->end());
++ for(const auto& i : *linf_failures)
++ {
++ std::cout << " (" << i.first << "," << i.second << ")";
++ }
++ std::cout << std::endl;
++ }
++
++ EXPECT_TRUE(std::isfinite(gpu_norm.get().l_inf)) << params.str();
++ EXPECT_TRUE(std::isfinite(gpu_norm.get().l_2)) << params.str();
++
++ switch(params.precision)
++ {
++ case fft_precision_half:
++ max_linf_eps_half
++ = std::max(max_linf_eps_half, diff.l_inf / cpu_input_norm.l_inf / log(total_length));
++ max_l2_eps_half
++ = std::max(max_l2_eps_half, diff.l_2 / cpu_input_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ case fft_precision_single:
++ max_linf_eps_single
++ = std::max(max_linf_eps_single, diff.l_inf / cpu_input_norm.l_inf / log(total_length));
++ max_l2_eps_single
++ = std::max(max_l2_eps_single, diff.l_2 / cpu_input_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ case fft_precision_double:
++ max_linf_eps_double
++ = std::max(max_linf_eps_double, diff.l_inf / cpu_input_norm.l_inf / log(total_length));
++ max_l2_eps_double
++ = std::max(max_l2_eps_double, diff.l_2 / cpu_input_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ }
++
++ if(verbose > 1)
++ {
++ std::cout << "L2 diff: " << diff.l_2 << "\n";
++ std::cout << "Linf diff: " << diff.l_inf << "\n";
++ }
++
++ EXPECT_TRUE(diff.l_inf <= linf_cutoff)
++ << "Linf test failed. Linf:" << diff.l_inf
++ << "\tnormalized Linf: " << diff.l_inf / cpu_input_norm.l_inf << "\tcutoff: " << linf_cutoff
++ << params.str();
++
++ EXPECT_TRUE(diff.l_2 / cpu_input_norm.l_2
++ < sqrt(log2(total_length)) * type_epsilon(params.precision))
++ << "L2 test failed. L2: " << diff.l_2
++ << "\tnormalized L2: " << diff.l_2 / cpu_input_norm.l_2
++ << "\tepsilon: " << sqrt(log2(total_length)) * type_epsilon(params.precision)
++ << params.str();
++}
++
++// RAII type to put data into the cache when this object leaves scope
++struct StoreCPUDataToCache
++{
++ StoreCPUDataToCache(std::vector<hostbuf>& cpu_input, std::vector<hostbuf>& cpu_output)
++ : cpu_input(cpu_input)
++ , cpu_output(cpu_output)
++ {
++ }
++ ~StoreCPUDataToCache()
++ {
++ last_cpu_fft_data.cpu_output.swap(cpu_output);
++ last_cpu_fft_data.cpu_input.swap(cpu_input);
++ }
++ std::vector<hostbuf>& cpu_input;
++ std::vector<hostbuf>& cpu_output;
++};
++
++// run CPU + rocFFT transform with the given params and compare
++template <class Tfloat, class Tparams>
++inline void fft_vs_reference_impl(Tparams& params, bool round_trip)
++{
++ // Call hipGetLastError to reset any errors
++ // returned by previous HIP runtime API calls.
++ hipError_t hip_status = hipGetLastError();
++
++ // Make sure that the parameters make sense:
++ ASSERT_TRUE(params.valid(verbose));
++
++ size_t needed_ram = needed_ram_buffers(params, verbose);
++
++ if(ramgb > 0 && needed_ram > ramgb * ONE_GiB)
++ {
++ GTEST_SKIP() << "needed_ramgb: " << bytes_to_GiB(needed_ram) << ", ramgb limit: " << ramgb
++ << ".\n";
++ }
++
++ auto ibuffer_sizes = params.ibuffer_sizes();
++ auto obuffer_sizes = params.obuffer_sizes();
++
++ size_t vram_avail = 0;
++
++ if(vramgb == 0)
++ {
++ // Check free and total available memory:
++ size_t free = 0;
++ size_t total = 0;
++ auto hip_status = hipMemGetInfo(&free, &total);
++ if(hip_status != hipSuccess || total == 0)
++ {
++ ++n_hip_failures;
++ std::stringstream ss;
++ if(total == 0)
++ ss << "hipMemGetInfo claims there there isn't any vram";
++ else
++ ss << "hipMemGetInfo failure with error " << hip_status;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << ss.str();
++ }
++ else
++ {
++ GTEST_FAIL() << ss.str();
++ }
++ }
++ vram_avail = total;
++ }
++ else
++ {
++ vram_avail = vramgb * ONE_GiB;
++ }
++
++ // First try a quick estimation of vram footprint, to speed up skipping tests
++ // that are too large to fit in the gpu (no plan created with the rocFFT backend)
++ const auto raw_vram_footprint
++ = params.fft_params_vram_footprint() + twiddle_table_vram_footprint(params);
++
++ if(!vram_fits_problem(raw_vram_footprint, vram_avail))
++ {
++ GTEST_SKIP() << "Raw problem size (" << bytes_to_GiB(raw_vram_footprint)
++ << " GiB) raw data too large for device";
++ }
++
++ if(verbose > 2)
++ {
++ std::cout << "Raw problem size: " << raw_vram_footprint << std::endl;
++ }
++
++ // If it passed the quick estimation test, go for the more
++ // accurate calculation that actually creates the plan and
++ // take into account the work buffer size
++ const auto vram_footprint = params.vram_footprint();
++ if(!vram_fits_problem(vram_footprint, vram_avail))
++ {
++ if(verbose)
++ {
++ std::cout << "Problem raw data won't fit on device; skipped." << std::endl;
++ }
++ GTEST_SKIP() << "Problem size (" << bytes_to_GiB(vram_footprint)
++ << " GiB) raw data too large for device";
++ }
++
++ // Create FFT plan - this will also allocate work buffer, but
++ // will throw a specific exception if that step fails
++ auto plan_status = fft_status_success;
++ try
++ {
++ plan_status = params.create_plan();
++ }
++ catch(fft_params::work_buffer_alloc_failure& e)
++ {
++ ++n_hip_failures;
++ std::stringstream ss;
++ ss << "Work buffer allocation failed with size: " << params.workbuffersize;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << ss.str();
++ }
++ else
++ {
++ GTEST_FAIL() << ss.str();
++ }
++ }
++ ASSERT_EQ(plan_status, fft_status_success) << "plan creation failed";
++
++ if(!vram_fits_problem(vram_footprint, vram_avail))
++ {
++ if(verbose)
++ {
++ std::cout << "Problem won't fit on device; skipped." << std::endl;
++ }
++ GTEST_SKIP() << "Problem size (" << vram_footprint << ") too large for device";
++ return;
++ }
++
++ fft_params contiguous_params;
++ contiguous_params.length = params.length;
++ contiguous_params.precision = params.precision;
++ contiguous_params.placement = fft_placement_notinplace;
++ contiguous_params.transform_type = params.transform_type;
++ contiguous_params.nbatch = params.nbatch;
++ contiguous_params.itype = contiguous_itype(params.transform_type);
++ contiguous_params.otype = contiguous_otype(contiguous_params.transform_type);
++
++ contiguous_params.validate();
++
++ if(!contiguous_params.valid(verbose))
++ {
++ throw std::runtime_error("Invalid contiguous params");
++ }
++
++ if(verbose > 3)
++ {
++ std::cout << "CPU params:\n";
++ std::cout << contiguous_params.str("\n\t") << std::endl;
++ }
++
++ std::vector<gpubuf> ibuffer(ibuffer_sizes.size());
++ std::vector<void*> pibuffer(ibuffer_sizes.size());
++ for(unsigned int i = 0; i < ibuffer.size(); ++i)
++ {
++ hip_status = ibuffer[i].alloc(ibuffer_sizes[i]);
++ if(hip_status != hipSuccess)
++ {
++ std::stringstream ss;
++ ss << "hipMalloc failure for input buffer " << i << " size " << ibuffer_sizes[i] << "("
++ << bytes_to_GiB(ibuffer_sizes[i]) << " GiB)"
++ << " with code " << hipError_to_string(hip_status);
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << ss.str();
++ }
++ else
++ {
++ GTEST_FAIL() << ss.str();
++ }
++ }
++ pibuffer[i] = ibuffer[i].data();
++ }
++
++ // allocation counts in elements, ibuffer_sizes is in bytes
++ auto ibuffer_sizes_elems = ibuffer_sizes;
++ for(auto& buf : ibuffer_sizes_elems)
++ buf /= var_size<size_t>(params.precision, params.itype);
++
++ // Check cache first - nbatch is a >= comparison because we compute
++ // the largest batch size and cache it. Smaller batch runs can
++ // compare against the larger data.
++ std::vector<hostbuf> cpu_input;
++ std::vector<hostbuf> cpu_output;
++ std::shared_future<void> convert_cpu_output_precision;
++ std::shared_future<void> convert_cpu_input_precision;
++ bool run_fftw = true;
++ std::unique_ptr<StoreCPUDataToCache> store_to_cache;
++ if(fftw_compare && last_cpu_fft_data.length == params.length
++ && last_cpu_fft_data.transform_type == params.transform_type
++ && last_cpu_fft_data.run_callbacks == params.run_callbacks)
++ {
++ if(last_cpu_fft_data.nbatch >= params.nbatch)
++ {
++ // use the cached input/output
++ cpu_input.swap(last_cpu_fft_data.cpu_input);
++ cpu_output.swap(last_cpu_fft_data.cpu_output);
++ run_fftw = false;
++
++ store_to_cache = std::make_unique<StoreCPUDataToCache>(cpu_input, cpu_output);
++
++ if(params.precision != last_cpu_fft_data.precision)
++ {
++ // Tests should be ordered so we do wider first, then narrower.
++ switch(params.precision)
++ {
++ case fft_precision_double:
++ std::cerr
++ << "test ordering is incorrect: double precision follows a narrower one"
++ << std::endl;
++ abort();
++ break;
++ case fft_precision_single:
++ if(last_cpu_fft_data.precision != fft_precision_double)
++ {
++ std::cerr
++ << "test ordering is incorrect: float precision follows a narrower one"
++ << std::endl;
++ abort();
++ }
++ // convert the input/output to single-precision
++ convert_cpu_output_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<double, float>(cpu_output.front());
++ });
++ convert_cpu_input_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<double, float>(cpu_input.front());
++ });
++ break;
++ case fft_precision_half:
++ // convert to half precision
++ if(last_cpu_fft_data.precision == fft_precision_double)
++ {
++ convert_cpu_output_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<double, _Float16>(cpu_output.front());
++ });
++ convert_cpu_input_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<double, _Float16>(cpu_input.front());
++ });
++ }
++ else if(last_cpu_fft_data.precision == fft_precision_single)
++ {
++ convert_cpu_output_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<float, _Float16>(cpu_output.front());
++ });
++ convert_cpu_input_precision = std::async(std::launch::async, [&]() {
++ narrow_precision_inplace<float, _Float16>(cpu_input.front());
++ });
++ }
++ else
++ {
++ std::cerr << "unhandled previous precision, cannot convert to half"
++ << std::endl;
++ abort();
++ }
++ break;
++ }
++ last_cpu_fft_data.precision = params.precision;
++ }
++ }
++ // If the last result has a smaller batch than the new
++ // params, that might be a developer error - tests should be
++ // ordered to generate the bigger batch first. But if tests
++ // got filtered or skipped due to insufficient memory, we
++ // might never have tried to generate the bigger batch first.
++ // So just fall through and redo the CPU FFT.
++ }
++ else
++ {
++ // Clear cache explicitly so that even if we didn't get a hit,
++ // we're not uselessly holding on to cached cpu input/output
++ last_cpu_fft_data = last_cpu_fft_cache();
++ }
++
++ // Allocate CPU input
++ if(run_fftw)
++ {
++ cpu_input = allocate_cpu_fft_buffer(
++ contiguous_params.precision, contiguous_params.itype, contiguous_params.isize);
++ }
++
++ // Create FFTW plan - this may write to input, but that's fine
++ // since there's nothing in there right now
++ typename fftw_trait<Tfloat>::fftw_plan_type cpu_plan = nullptr;
++ if(run_fftw)
++ {
++ // Normally, we would want to defer allocation of CPU output
++ // buffer until when we actually do the CPU FFT. But if we're
++ // using FFTW wisdom, FFTW needs an output buffer at plan
++ // creation time.
++ if(use_fftw_wisdom)
++ {
++ cpu_output = allocate_cpu_fft_buffer(
++ contiguous_params.precision, contiguous_params.otype, contiguous_params.osize);
++ }
++ cpu_plan = fftw_plan_via_rocfft<Tfloat>(contiguous_params.length,
++ contiguous_params.istride,
++ contiguous_params.ostride,
++ contiguous_params.nbatch,
++ contiguous_params.idist,
++ contiguous_params.odist,
++ contiguous_params.transform_type,
++ cpu_input,
++ cpu_output);
++
++ needed_ram += needed_ram_fftw<Tfloat>(contiguous_params, cpu_plan, verbose);
++
++ if(ramgb > 0 && needed_ram > ramgb * ONE_GiB)
++ {
++ if(verbose)
++ {
++ std::cout << "Problem exceeds memory limit; skipped [rocfft_transform]."
++ << std::endl;
++ }
++ GTEST_SKIP();
++ return;
++ }
++ }
++
++ std::vector<hostbuf> gpu_input_data;
++
++ // allocate and populate the input buffer (cpu/gpu)
++ if(run_fftw)
++ {
++ gpu_input_data = allocate_host_buffer(params.precision, params.itype, ibuffer_sizes_elems);
++
++ //generate the input directly on the gpu
++ params.compute_input(ibuffer);
++
++ // Copy the input to CPU
++ if(params.itype != contiguous_params.itype || params.istride != contiguous_params.istride
++ || params.idist != contiguous_params.idist || params.isize != contiguous_params.isize)
++ {
++ // Copy input to CPU
++ for(unsigned int idx = 0; idx < ibuffer.size(); ++idx)
++ {
++ hip_status = hipMemcpy(gpu_input_data.at(idx).data(),
++ ibuffer[idx].data(),
++ ibuffer_sizes[idx],
++ hipMemcpyDeviceToHost);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemcpy failure with error " << hip_status;
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemcpy failure with error " << hip_status;
++ }
++ }
++ }
++
++ copy_buffers(gpu_input_data,
++ cpu_input,
++ params.ilength(),
++ params.nbatch,
++ params.precision,
++ params.itype,
++ params.istride,
++ params.idist,
++ contiguous_params.itype,
++ contiguous_params.istride,
++ contiguous_params.idist,
++ params.ioffset,
++ contiguous_params.ioffset);
++ }
++ else
++ {
++ // Copy input to CPU
++ for(unsigned int idx = 0; idx < ibuffer.size(); ++idx)
++ {
++ hip_status = hipMemcpy(cpu_input.at(idx).data(),
++ ibuffer[idx].data(),
++ ibuffer_sizes[idx],
++ hipMemcpyDeviceToHost);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemcpy failure with error " << hip_status;
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemcpy failure with error " << hip_status;
++ }
++ }
++ }
++ }
++ }
++ else if(fftw_compare)
++ {
++ gpu_input_data = allocate_host_buffer(params.precision, params.itype, ibuffer_sizes_elems);
++
++ // In case the cached cpu input needed conversion, wait for it
++ if(convert_cpu_input_precision.valid())
++ convert_cpu_input_precision.get();
++
++ // gets a pre-computed gpu input buffer from the cpu cache
++ std::vector<hostbuf>* gpu_input = &cpu_input;
++
++ if(params.itype != contiguous_params.itype || params.istride != contiguous_params.istride
++ || params.idist != contiguous_params.idist || params.isize != contiguous_params.isize)
++ {
++ copy_buffers(cpu_input,
++ gpu_input_data,
++ params.ilength(),
++ params.nbatch,
++ params.precision,
++ contiguous_params.itype,
++ contiguous_params.istride,
++ contiguous_params.idist,
++ params.itype,
++ params.istride,
++ params.idist,
++ {0},
++ params.ioffset);
++ gpu_input = &gpu_input_data;
++ }
++
++ // Copy input to GPU
++ for(unsigned int idx = 0; idx < gpu_input->size(); ++idx)
++ {
++ hip_status = hipMemcpy(ibuffer[idx].data(),
++ gpu_input->at(idx).data(),
++ ibuffer_sizes[idx],
++ hipMemcpyHostToDevice);
++
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemcpy failure with error " << hip_status;
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemcpy failure with error " << hip_status;
++ }
++ }
++ }
++ }
++
++ if(verbose > 3)
++ {
++ std::cout << "CPU input:\n";
++ contiguous_params.print_ibuffer(cpu_input);
++ }
++
++ // compute input norm
++ std::shared_future<VectorNorms> cpu_input_norm;
++ if(fftw_compare)
++ cpu_input_norm = std::async(std::launch::async, [&]() {
++ // in case the cached cpu input needed conversion, wait for it
++ if(convert_cpu_input_precision.valid())
++ convert_cpu_input_precision.get();
++
++ auto input_norm = norm(cpu_input,
++ contiguous_params.ilength(),
++ contiguous_params.nbatch,
++ contiguous_params.precision,
++ contiguous_params.itype,
++ contiguous_params.istride,
++ contiguous_params.idist,
++ contiguous_params.ioffset);
++ if(verbose > 2)
++ {
++ std::cout << "CPU Input Linf norm: " << input_norm.l_inf << "\n";
++ std::cout << "CPU Input L2 norm: " << input_norm.l_2 << "\n";
++ }
++ return input_norm;
++ });
++
++ std::vector<gpubuf> obuffer_data;
++ std::vector<gpubuf>* obuffer = &obuffer_data;
++ std::vector<void*> pobuffer;
++
++ // allocate the output buffer
++
++ if(params.placement == fft_placement_inplace)
++ {
++ obuffer = &ibuffer;
++ }
++ else
++ {
++ auto obuffer_sizes = params.obuffer_sizes();
++ obuffer_data.resize(obuffer_sizes.size());
++ for(unsigned int i = 0; i < obuffer_data.size(); ++i)
++ {
++ hip_status = obuffer_data[i].alloc(obuffer_sizes[i]);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ std::stringstream ss;
++ ss << "hipMalloc failure for output buffer " << i << " size " << obuffer_sizes[i]
++ << "(" << bytes_to_GiB(obuffer_sizes[i]) << " GiB)"
++ << " with code " << hipError_to_string(hip_status);
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << ss.str();
++ }
++ else
++ {
++ GTEST_FAIL() << ss.str();
++ }
++ }
++
++ // If we're validating output strides, init the
++ // output buffer to a known pattern and we can check
++ // that the pattern is untouched in places that
++ // shouldn't have been touched.
++ if(params.check_output_strides)
++ {
++ hip_status
++ = hipMemset(obuffer_data[i].data(), OUTPUT_INIT_PATTERN, obuffer_sizes[i]);
++ if(hip_status != hipSuccess)
++ {
++ ++n_hip_failures;
++ if(skip_runtime_fails)
++ {
++ GTEST_SKIP() << "hipMemset failure with error " << hip_status;
++ }
++ else
++ {
++ GTEST_FAIL() << "hipMemset failure with error " << hip_status;
++ }
++ }
++ }
++ }
++ }
++ pobuffer.resize(obuffer->size());
++ for(unsigned int i = 0; i < obuffer->size(); ++i)
++ {
++ pobuffer[i] = obuffer->at(i).data();
++ }
++
++ // Run CPU transform
++ //
++ // NOTE: This must happen after input is copied to GPU and input
++ // norm is computed, since the CPU FFT may overwrite the input.
++ VectorNorms cpu_output_norm;
++ std::shared_future<void> cpu_fft;
++ if(fftw_compare)
++ cpu_fft = std::async(std::launch::async, [&]() {
++ // wait for input norm to finish, since we might overwrite input
++ cpu_input_norm.get();
++
++ if(run_fftw)
++ execute_cpu_fft<Tfloat>(params, contiguous_params, cpu_plan, cpu_input, cpu_output);
++ // in case the cached cpu output needed conversion, wait for it
++ else if(convert_cpu_output_precision.valid())
++ convert_cpu_output_precision.get();
++
++ if(verbose > 3)
++ {
++ std::cout << "CPU output:\n";
++ contiguous_params.print_obuffer(cpu_output);
++ }
++
++ cpu_output_norm = norm(cpu_output,
++ params.olength(),
++ params.nbatch,
++ params.precision,
++ contiguous_params.otype,
++ contiguous_params.ostride,
++ contiguous_params.odist,
++ contiguous_params.ooffset);
++ if(verbose > 2)
++ {
++ std::cout << "CPU Output Linf norm: " << cpu_output_norm.l_inf << "\n";
++ std::cout << "CPU Output L2 norm: " << cpu_output_norm.l_2 << "\n";
++ }
++ });
++
++ // scatter data out to multi-GPUs if this is a multi-GPU test
++ params.multi_gpu_prepare(ibuffer, pibuffer, pobuffer);
++
++ // execute GPU transform
++ std::vector<hostbuf> gpu_output
++ = allocate_host_buffer(params.precision, params.otype, params.osize);
++
++ execute_gpu_fft(params, pibuffer, pobuffer, *obuffer, gpu_output);
++
++ params.free();
++
++ if(params.check_output_strides)
++ {
++ check_output_strides<Tparams>(gpu_output, params);
++ }
++
++ // compute GPU output norm
++ std::shared_future<VectorNorms> gpu_norm;
++ if(fftw_compare)
++ gpu_norm = std::async(std::launch::async, [&]() {
++ return norm(gpu_output,
++ params.olength(),
++ params.nbatch,
++ params.precision,
++ params.otype,
++ params.ostride,
++ params.odist,
++ params.ooffset);
++ });
++
++ // compare output
++ //
++ // Compute the l-infinity and l-2 distance between the CPU and GPU output:
++ // wait for cpu FFT so we can compute cutoff
++
++ const auto total_length = std::accumulate(params.length.begin(),
++ params.length.end(),
++ static_cast<size_t>(1),
++ std::multiplies<size_t>());
++
++ std::unique_ptr<std::vector<std::pair<size_t, size_t>>> linf_failures;
++ if(verbose > 1)
++ linf_failures = std::make_unique<std::vector<std::pair<size_t, size_t>>>();
++ double linf_cutoff;
++ VectorNorms diff;
++
++ std::shared_future<void> compare_output;
++ if(fftw_compare)
++ compare_output = std::async(std::launch::async, [&]() {
++ cpu_fft.get();
++ linf_cutoff
++ = type_epsilon(params.precision) * cpu_output_norm.l_inf * log(total_length);
++
++ diff = distance(cpu_output,
++ gpu_output,
++ params.olength(),
++ params.nbatch,
++ params.precision,
++ contiguous_params.otype,
++ contiguous_params.ostride,
++ contiguous_params.odist,
++ params.otype,
++ params.ostride,
++ params.odist,
++ linf_failures.get(),
++ linf_cutoff,
++ {0},
++ params.ooffset);
++ });
++
++ // Update the cache if this current transform is different from
++ // what's stored. But if this transform only has a smaller batch
++ // than what's cached, we can still keep the cache around since
++ // the input/output we already have is still valid.
++ const bool update_last_cpu_fft_data
++ = last_cpu_fft_data.length != params.length
++ || last_cpu_fft_data.transform_type != params.transform_type
++ || last_cpu_fft_data.run_callbacks != params.run_callbacks
++ || last_cpu_fft_data.precision != params.precision
++ || params.nbatch > last_cpu_fft_data.nbatch;
++
++ // store cpu output in cache
++ if(update_last_cpu_fft_data)
++ {
++ last_cpu_fft_data.length = params.length;
++ last_cpu_fft_data.nbatch = params.nbatch;
++ last_cpu_fft_data.transform_type = params.transform_type;
++ last_cpu_fft_data.run_callbacks = params.run_callbacks;
++ last_cpu_fft_data.precision = params.precision;
++ }
++
++ if(compare_output.valid())
++ compare_output.get();
++
++ if(!store_to_cache)
++ store_to_cache = std::make_unique<StoreCPUDataToCache>(cpu_input, cpu_output);
++
++ Tparams params_inverse;
++
++ if(round_trip)
++ {
++ params_inverse.inverse_from_forward(params);
++
++ run_round_trip_inverse<Tparams>(
++ params_inverse, ibuffer, pobuffer, pibuffer, gpu_input_data);
++ }
++
++ if(fftw_compare)
++ {
++ ASSERT_TRUE(std::isfinite(cpu_input_norm.get().l_2));
++ ASSERT_TRUE(std::isfinite(cpu_input_norm.get().l_inf));
++
++ ASSERT_TRUE(std::isfinite(cpu_output_norm.l_2));
++ ASSERT_TRUE(std::isfinite(cpu_output_norm.l_inf));
++
++ if(verbose > 1)
++ {
++ std::cout << "GPU output Linf norm: " << gpu_norm.get().l_inf << "\n";
++ std::cout << "GPU output L2 norm: " << gpu_norm.get().l_2 << "\n";
++ std::cout << "GPU linf norm failures:";
++ std::sort(linf_failures->begin(), linf_failures->end());
++ for(const auto& i : *linf_failures)
++ {
++ std::cout << " (" << i.first << "," << i.second << ")";
++ }
++ std::cout << std::endl;
++ }
++
++ EXPECT_TRUE(std::isfinite(gpu_norm.get().l_inf)) << params.str();
++ EXPECT_TRUE(std::isfinite(gpu_norm.get().l_2)) << params.str();
++ }
++
++ switch(params.precision)
++ {
++ case fft_precision_half:
++ max_linf_eps_half
++ = std::max(max_linf_eps_half, diff.l_inf / cpu_output_norm.l_inf / log(total_length));
++ max_l2_eps_half
++ = std::max(max_l2_eps_half, diff.l_2 / cpu_output_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ case fft_precision_single:
++ max_linf_eps_single
++ = std::max(max_linf_eps_single, diff.l_inf / cpu_output_norm.l_inf / log(total_length));
++ max_l2_eps_single = std::max(max_l2_eps_single,
++ diff.l_2 / cpu_output_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ case fft_precision_double:
++ max_linf_eps_double
++ = std::max(max_linf_eps_double, diff.l_inf / cpu_output_norm.l_inf / log(total_length));
++ max_l2_eps_double = std::max(max_l2_eps_double,
++ diff.l_2 / cpu_output_norm.l_2 * sqrt(log2(total_length)));
++ break;
++ }
++
++ if(verbose > 1)
++ {
++ std::cout << "L2 diff: " << diff.l_2 << "\n";
++ std::cout << "Linf diff: " << diff.l_inf << "\n";
++ }
++
++ if(fftw_compare)
++ {
++ EXPECT_TRUE(diff.l_inf <= linf_cutoff)
++ << "Linf test failed. Linf:" << diff.l_inf
++ << "\tnormalized Linf: " << diff.l_inf / cpu_output_norm.l_inf
++ << "\tcutoff: " << linf_cutoff << params.str();
++
++ EXPECT_TRUE(diff.l_2 / cpu_output_norm.l_2
++ < sqrt(log2(total_length)) * type_epsilon(params.precision))
++ << "L2 test failed. L2: " << diff.l_2
++ << "\tnormalized L2: " << diff.l_2 / cpu_output_norm.l_2
++ << "\tepsilon: " << sqrt(log2(total_length)) * type_epsilon(params.precision)
++ << params.str();
++ }
++
++ if(round_trip && fftw_compare)
++ {
++ compare_round_trip_inverse<Tparams>(params_inverse,
++ contiguous_params,
++ gpu_input_data,
++ cpu_input,
++ cpu_input_norm.get(),
++ total_length);
++ }
++}
++
++#endif
+diff --git a/shared/arithmetic.h b/shared/arithmetic.h
+new file mode 100644
+index 0000000..774d342
+--- /dev/null
++++ b/shared/arithmetic.h
+@@ -0,0 +1,61 @@
++/******************************************************************************
++* Copyright (C) 2021 - 2022 Advanced Micro Devices, Inc. All rights reserved.
++*
++* Permission is hereby granted, free of charge, to any person obtaining a copy
++* of this software and associated documentation files (the "Software"), to deal
++* in the Software without restriction, including without limitation the rights
++* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++* copies of the Software, and to permit persons to whom the Software is
++* furnished to do so, subject to the following conditions:
++*
++* The above copyright notice and this permission notice shall be included in
++* all copies or substantial portions of the Software.
++*
++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++* THE SOFTWARE.
++*******************************************************************************/
++
++#pragma once
++
++#include <numeric>
++#include <stddef.h>
++
++// arithmetic helper functions
++
++static inline bool IsPo2(size_t u)
++{
++ return (u != 0) && (0 == (u & (u - 1)));
++}
++
++// help function: Find the smallest power of 2 that is >= n; return its
++// power of 2 factor
++// e.g., CeilPo2 (7) returns 3 : (2^3 >= 7)
++static inline size_t CeilPo2(size_t n)
++{
++ size_t v = 1, t = 0;
++ while(v < n)
++ {
++ v <<= 1;
++ t++;
++ }
++
++ return t;
++}
++
++template <typename T>
++static inline T DivRoundingUp(T a, T b)
++{
++ return (a + (b - 1)) / b;
++}
++
++template <typename Titer>
++typename Titer::value_type product(Titer begin, Titer end)
++{
++ return std::accumulate(
++ begin, end, typename Titer::value_type(1), std::multiplies<typename Titer::value_type>());
++}
+diff --git a/shared/array_predicate.h b/shared/array_predicate.h
+new file mode 100644
+index 0000000..92e45b4
+--- /dev/null
++++ b/shared/array_predicate.h
+@@ -0,0 +1,47 @@
++// Copyright (C) 2021 - 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_ARRAY_PREDICATE_H
++#define ROCFFT_ARRAY_PREDICATE_H
++
++#include "rocfft/rocfft.h"
++
++namespace
++{
++ bool array_type_is_complex(rocfft_array_type type)
++ {
++ return type == rocfft_array_type_complex_interleaved
++ || type == rocfft_array_type_complex_planar
++ || type == rocfft_array_type_hermitian_interleaved
++ || type == rocfft_array_type_hermitian_planar;
++ }
++ bool array_type_is_interleaved(rocfft_array_type type)
++ {
++ return type == rocfft_array_type_complex_interleaved
++ || type == rocfft_array_type_hermitian_interleaved;
++ }
++ bool array_type_is_planar(rocfft_array_type type)
++ {
++ return type == rocfft_array_type_complex_planar
++ || type == rocfft_array_type_hermitian_planar;
++ }
++}
++
++#endif
+diff --git a/shared/array_validator.cpp b/shared/array_validator.cpp
+new file mode 100644
+index 0000000..70abb08
+--- /dev/null
++++ b/shared/array_validator.cpp
+@@ -0,0 +1,549 @@
++// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#include <iostream>
++#include <numeric>
++#include <unordered_set>
++
++#include "array_validator.h"
++#include "increment.h"
++
++// Check a 2D array for collisions.
++// The 2D case can be determined via a number-theoretic argument.
++bool valid_length_stride_2d(const size_t l0, const size_t l1, const size_t s0, const size_t s1)
++{
++ if(s0 == s1)
++ return false;
++ const auto c = std::lcm(s0, s1);
++ return !((s0 * (l0 - 1) >= c) && (s1 * (l1 - 1) >= c));
++}
++
++// Compare a 1D direction with a multi-index hyperface for collisions.
++bool valid_length_stride_1d_multi(const unsigned int idx,
++ const std::vector<size_t> l,
++ const std::vector<size_t> s,
++ const int verbose)
++{
++ size_t l0{0}, s0{0};
++ std::vector<size_t> l1{}, s1{};
++ for(unsigned int i = 0; i < l.size(); ++i)
++ {
++ if(i == idx)
++ {
++ l0 = l[i];
++ s0 = s[i];
++ }
++ else
++ {
++ l1.push_back(l[i]);
++ s1.push_back(s[i]);
++ }
++ }
++
++ if(verbose > 4)
++ {
++ std::cout << "l0: " << l0 << "\ts0: " << s0 << std::endl;
++ }
++
++ // We only need to go to the maximum pointer offset for (l1,s1).
++ const auto max_offset
++ = std::accumulate(l1.begin(), l1.end(), (size_t)1, std::multiplies<size_t>())
++ - std ::inner_product(l1.begin(), l1.end(), s1.begin(), (size_t)0);
++ std::unordered_set<size_t> a0{};
++ for(size_t i = 1; i < l0; ++i)
++ {
++ const auto val = i * s0;
++ if(val <= max_offset)
++ a0.insert(val);
++ else
++ break;
++ }
++
++ if(verbose > 5)
++ {
++ std::cout << "a0:";
++ for(auto i : a0)
++ std::cout << " " << i;
++ std::cout << std::endl;
++
++ std::cout << "l1:";
++ for(auto i : l1)
++ std::cout << " " << i;
++ std::cout << std::endl;
++
++ std::cout << "s1:";
++ for(auto i : s1)
++ std::cout << " " << i;
++ std::cout << std::endl;
++ }
++
++ // TODO: this can be multi-threaded, since find(...) is thread-safe.
++ std::vector<size_t> index(l1.size());
++ std::fill(index.begin(), index.end(), 0);
++ do
++ {
++ const int i = std::inner_product(index.begin(), index.end(), s1.begin(), (size_t)0);
++ if(i > 0 && (i % s0 == 0))
++ {
++ // TODO: use an ordered set and binary search
++ if(verbose > 6)
++ std::cout << i << std::endl;
++ if(a0.find(i) != a0.end())
++ {
++ if(verbose > 4)
++ {
++ std::cout << "l0: " << l0 << "\ts0: " << s0 << std::endl;
++ std::cout << "l1:";
++ for(const auto li : l1)
++ std::cout << " " << li;
++ std::cout << " s1:";
++ for(const auto si : s1)
++ std::cout << " " << si;
++ std::cout << std::endl;
++ std::cout << "Found duplicate: " << i << std::endl;
++ }
++ return false;
++ }
++ }
++ } while(increment_rowmajor(index, l1));
++
++ return true;
++}
++
++// Compare a hyperface with another hyperface for collisions.
++bool valid_length_stride_multi_multi(const std::vector<size_t> l0,
++ const std::vector<size_t> s0,
++ const std::vector<size_t> l1,
++ const std::vector<size_t> s1)
++{
++ std::unordered_set<size_t> a0{};
++
++ const auto max_offset
++ = std::accumulate(l1.begin(), l1.end(), (size_t)1, std::multiplies<size_t>())
++ - std::inner_product(l1.begin(), l1.end(), s1.begin(), (size_t)0);
++ std::vector<size_t> index0(l0.size()); // TODO: check this
++ std::fill(index0.begin(), index0.end(), 0);
++ do
++ {
++ const auto i = std::inner_product(index0.begin(), index0.end(), s0.begin(), (size_t)0);
++ if(i > max_offset)
++ a0.insert(i);
++ } while(increment_rowmajor(index0, l0));
++
++ std::vector<size_t> index1(l1.size());
++ std::fill(index1.begin(), index1.end(), 0);
++ do
++ {
++ const auto i = std::inner_product(index1.begin(), index1.end(), s1.begin(), (size_t)0);
++ if(i > 0)
++ {
++ // TODO: use an ordered set and binary search
++ if(a0.find(i) != a0.end())
++ {
++
++ return false;
++ }
++ }
++ } while(increment_rowmajor(index1, l1));
++
++ return true;
++}
++
++bool valid_length_stride_3d(const std::vector<size_t>& l,
++ const std::vector<size_t>& s,
++ const int verbose)
++{
++ // Check that 2D faces are valid:
++ if(!valid_length_stride_2d(l[0], l[1], s[0], s[1]))
++ return false;
++ if(!valid_length_stride_2d(l[0], l[2], s[0], s[2]))
++ return false;
++ if(!valid_length_stride_2d(l[1], l[2], s[1], s[2]))
++ return false;
++
++ // If the 2D faces are valid, check an axis vs a face for collisions:
++ bool invalid = false;
++#ifdef _OPENMP
++#pragma omp parallel for
++#endif
++ for(int idx = 0; idx < 3; ++idx)
++ {
++ if(!valid_length_stride_1d_multi(idx, l, s, verbose))
++ {
++#ifdef _OPENMP
++#pragma omp cancel for
++#endif
++ invalid = true;
++ }
++ }
++ if(invalid)
++ return false;
++ return true;
++}
++
++bool valid_length_stride_4d(const std::vector<size_t>& l,
++ const std::vector<size_t>& s,
++ const int verbose)
++{
++ if(l.size() != 4)
++ {
++ throw std::runtime_error("Incorrect dimensions for valid_length_stride_4d");
++ }
++
++ // Check that 2D faces are valid:
++ for(int idx0 = 0; idx0 < 3; ++idx0)
++ {
++ for(int idx1 = idx0 + 1; idx1 < 4; ++idx1)
++ {
++ if(!valid_length_stride_2d(l[idx0], l[idx1], s[idx0], s[idx1]))
++ return false;
++ }
++ }
++
++ bool invalid = false;
++ // Check that 1D vs 3D faces are valid:
++#ifdef _OPENMP
++#pragma omp parallel for
++#endif
++ for(int idx0 = 0; idx0 < 4; ++idx0)
++ {
++ if(!valid_length_stride_1d_multi(idx0, l, s, verbose))
++ {
++#ifdef _OPENMP
++#pragma omp cancel for
++#endif
++ invalid = true;
++ }
++ }
++ if(invalid)
++ return false;
++
++ // Check that 2D vs 2D faces are valid:
++
++ // First, get all the permutations
++ std::vector<std::vector<size_t>> perms;
++ std::vector<size_t> v(l.size());
++ std::fill(v.begin(), v.begin() + 2, 0);
++ std::fill(v.begin() + 2, v.end(), 1);
++ do
++ {
++ perms.push_back(v);
++ if(verbose > 3)
++ {
++ std::cout << "v:";
++ for(const auto i : v)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ }
++ } while(std::next_permutation(v.begin(), v.end()));
++
++ // Then loop over all of the permutations.
++#ifdef _OPENMP
++#pragma omp parallel for
++#endif
++ for(size_t iperm = 0; iperm < perms.size(); ++iperm)
++ {
++ std::vector<size_t> l0(2);
++ std::vector<size_t> s0(2);
++ std::vector<size_t> l1(2);
++ std::vector<size_t> s1(2);
++ for(size_t i = 0; i < l.size(); ++i)
++ {
++ if(perms[iperm][i] == 0)
++ {
++ l0.push_back(l[i]);
++ s0.push_back(s[i]);
++ }
++ else
++ {
++ l1.push_back(l[i]);
++ s1.push_back(s[i]);
++ }
++ }
++
++ if(verbose > 3)
++ {
++ std::cout << "\tl0:";
++ for(const auto i : l0)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\ts0:";
++ for(const auto i : s0)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\tl1:";
++ for(const auto i : l1)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\ts1:";
++ for(const auto i : s1)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ }
++
++ if(!valid_length_stride_multi_multi(l0, s0, l1, s1))
++ {
++#ifdef _OPENMP
++#pragma omp cancel for
++#endif
++ invalid = true;
++ }
++ }
++ if(invalid)
++ return false;
++
++ return true;
++}
++
++bool valid_length_stride_generald(const std::vector<size_t> l,
++ const std::vector<size_t> s,
++ const int verbose)
++{
++ if(verbose > 2)
++ {
++ std::cout << "checking dimension " << l.size() << std::endl;
++ }
++
++ // Recurse on d-1 hyper-faces:
++ for(unsigned int idx = 0; idx < l.size(); ++idx)
++ {
++ std::vector<size_t> l0{};
++ std::vector<size_t> s0{};
++ for(size_t i = 0; i < l.size(); ++i)
++ {
++ if(i != idx)
++ {
++ l0.push_back(l[i]);
++ s0.push_back(s[i]);
++ }
++ }
++ if(!array_valid(l0, s0, verbose))
++ return false;
++ }
++
++ // Handle the 1D vs (N-1) case:
++ for(unsigned int idx = 0; idx < l.size(); ++idx)
++ {
++ if(!valid_length_stride_1d_multi(idx, l, s, verbose))
++ return false;
++ }
++
++ for(size_t dim0 = 2; dim0 <= l.size() / 2; ++dim0)
++ {
++ const size_t dim1 = l.size() - dim0;
++ if(verbose > 2)
++ std::cout << "dims: " << dim0 << " " << dim1 << std::endl;
++
++ // We iterate over all permutations of an array of length l.size() which contains dim0 zeros
++ // and dim1 ones. We start with {0, ..., 0, 1, ... 1} to guarantee that we hit all the
++ // possibilities.
++
++ // First, get all the permutations
++ std::vector<std::vector<size_t>> perms;
++ std::vector<size_t> v(l.size());
++ std::fill(v.begin(), v.begin() + dim1, 0);
++ std::fill(v.begin() + dim1, v.end(), 1);
++ do
++ {
++ perms.push_back(v);
++ if(verbose > 3)
++ {
++ std::cout << "v:";
++ for(const auto i : v)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ }
++
++ } while(std::next_permutation(v.begin(), v.end()));
++
++ bool invalid = false;
++ // Then loop over all of the permutations.
++#ifdef _OPENMP
++#pragma omp parallel for
++#endif
++ for(size_t iperm = 0; iperm < perms.size(); ++iperm)
++ {
++ std::vector<size_t> l0(dim0);
++ std::vector<size_t> s0(dim0);
++ std::vector<size_t> l1(dim1);
++ std::vector<size_t> s1(dim1);
++
++ for(size_t i = 0; i < l.size(); ++i)
++ {
++ if(v[i] == 0)
++ {
++ l0.push_back(l[i]);
++ s0.push_back(s[i]);
++ }
++ else
++ {
++ l1.push_back(l[i]);
++ s1.push_back(s[i]);
++ }
++ }
++
++ if(verbose > 3)
++ {
++ std::cout << "\tl0:";
++ for(const auto i : l0)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\ts0:";
++ for(const auto i : s0)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\tl1:";
++ for(const auto i : l1)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ std::cout << "\ts1:";
++ for(const auto i : s1)
++ {
++ std::cout << " " << i;
++ }
++ std::cout << "\n";
++ }
++
++ if(!valid_length_stride_multi_multi(l0, s0, l1, s1))
++ {
++#ifdef _OPENMP
++#pragma omp cancel for
++#endif
++ invalid = true;
++ }
++ }
++ if(invalid)
++ return false;
++ }
++
++ return true;
++}
++
++bool sort_by_stride(const std::pair<size_t, size_t>& ls0, const std::pair<size_t, size_t>& ls1)
++{
++ return ls0.second < ls1.second;
++}
++
++bool array_valid(const std::vector<size_t>& length,
++ const std::vector<size_t>& stride,
++ const int verbose)
++{
++ if(length.size() != stride.size())
++ return false;
++
++ // If a length is 1, then the stride is irrelevant.
++ // If a length is > 1, then the corresponding stride must be > 1.
++ std::vector<size_t> l{}, s{};
++ for(unsigned int i = 0; i < length.size(); ++i)
++ {
++ if(length[i] > 1)
++ {
++ if(stride[i] == 0)
++ return false;
++ l.push_back(length[i]);
++ s.push_back(stride[i]);
++ }
++ }
++
++ if(length.size() > 1)
++ {
++ // Check happy path.
++ bool happy_path = true;
++ std::vector<std::pair<size_t, size_t>> ls;
++ for(size_t idx = 0; idx < length.size(); ++idx)
++ {
++ ls.push_back(std::pair(length[idx], stride[idx]));
++ }
++ std::sort(ls.begin(), ls.end(), sort_by_stride);
++
++ if(verbose > 2)
++ {
++ for(size_t idx = 0; idx < ls.size(); ++idx)
++ {
++ std::cout << ls[idx].first << "\t" << ls[idx].second << "\n";
++ }
++ }
++
++ for(size_t idx = 1; idx < ls.size(); ++idx)
++ {
++ if(ls[idx].second < ls[idx - 1].first * ls[idx - 1].second)
++ {
++ happy_path = false;
++ break;
++ }
++ }
++ if(happy_path)
++ {
++ if(verbose > 2)
++ {
++ std::cout << "happy path\n";
++ }
++ return true;
++ }
++ }
++
++ switch(l.size())
++ {
++ case 0:
++ return true;
++ break;
++ case 1:
++ return s[0] != 0;
++ break;
++ case 2:
++ {
++ return valid_length_stride_2d(l[0], l[1], s[0], s[1]);
++ break;
++ }
++ case 3:
++ {
++ return valid_length_stride_3d(l, s, verbose);
++ break;
++ }
++ case 4:
++ {
++ return valid_length_stride_4d(l, s, verbose);
++ break;
++ }
++ default:
++ return valid_length_stride_generald(l, s, verbose);
++ return true;
++ }
++
++ return true;
++}
+diff --git a/shared/array_validator.h b/shared/array_validator.h
+new file mode 100644
+index 0000000..ce85173
+--- /dev/null
++++ b/shared/array_validator.h
+@@ -0,0 +1,31 @@
++// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ARRAY_VALIDATOR_H
++#define ARRAY_VALIDATOR_H
++
++#include <vector>
++
++// Checks whether the array with given length and stride has multi-index collisions.
++bool array_valid(const std::vector<size_t>& length,
++ const std::vector<size_t>& stride,
++ const int verbose = 0);
++
++#endif
+diff --git a/shared/concurrency.h b/shared/concurrency.h
+new file mode 100644
+index 0000000..a36c7c1
+--- /dev/null
++++ b/shared/concurrency.h
+@@ -0,0 +1,41 @@
++// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++
++#include <thread>
++
++#ifndef WIN32
++#include <sched.h>
++#endif
++
++// work out how many parallel tasks to run, based on available
++// resources. on Linux, this will look at the cpu affinity mask (if
++// available) which might be restricted in a container. otherwise,
++// return std::thread::hardware_concurrency().
++static unsigned int rocfft_concurrency()
++{
++#ifndef WIN32
++ cpu_set_t cpuset;
++ if(sched_getaffinity(0, sizeof(cpuset), &cpuset) == 0)
++ return CPU_COUNT(&cpuset);
++#endif
++ return std::thread::hardware_concurrency();
++}
+diff --git a/shared/data_gen_device.h b/shared/data_gen_device.h
+new file mode 100644
+index 0000000..77fb012
+--- /dev/null
++++ b/shared/data_gen_device.h
+@@ -0,0 +1,1303 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef DATA_GEN_DEVICE_H
++#define DATA_GEN_DEVICE_H
++
++// rocRAND can generate warnings if inline asm is not available for
++// some architectures. data generation isn't performance-critical,
++// so just disable inline asm to prevent the warnings.
++#define ROCRAND_DISABLE_INLINE_ASM
++
++#include "../shared/arithmetic.h"
++#include "../shared/device_properties.h"
++#include "../shared/gpubuf.h"
++#include "../shared/increment.h"
++#include "../shared/rocfft_complex.h"
++#include <hip/hip_runtime.h>
++#include <hip/hip_runtime_api.h>
++#include <hiprand/hiprand.h>
++#include <hiprand/hiprand_kernel.h>
++#include <limits>
++#include <vector>
++
++static const unsigned int DATA_GEN_THREADS = 8;
++static const unsigned int DATA_GEN_GRID_Y_MAX = 64;
++
++template <typename T>
++struct input_val_1D
++{
++ T val1;
++};
++
++template <typename T>
++struct input_val_2D
++{
++ T val1;
++ T val2;
++};
++
++template <typename T>
++struct input_val_3D
++{
++ T val1;
++ T val2;
++ T val3;
++};
++
++template <typename T>
++static input_val_1D<T> get_input_val(const T& val)
++{
++ return input_val_1D<T>{val};
++}
++
++template <typename T>
++static input_val_2D<T> get_input_val(const std::tuple<T, T>& val)
++{
++ return input_val_2D<T>{std::get<0>(val), std::get<1>(val)};
++}
++
++template <typename T>
++static input_val_3D<T> get_input_val(const std::tuple<T, T, T>& val)
++{
++ return input_val_3D<T>{std::get<0>(val), std::get<1>(val), std::get<2>(val)};
++}
++
++template <typename T>
++__device__ static size_t
++ compute_index(const input_val_1D<T>& length, const input_val_1D<T>& stride, size_t base)
++{
++ return (length.val1 * stride.val1) + base;
++}
++
++template <typename T>
++__device__ static size_t
++ compute_index(const input_val_2D<T>& length, const input_val_2D<T>& stride, size_t base)
++{
++ return (length.val1 * stride.val1) + (length.val2 * stride.val2) + base;
++}
++
++template <typename T>
++__device__ static size_t
++ compute_index(const input_val_3D<T>& length, const input_val_3D<T>& stride, size_t base)
++{
++ return (length.val1 * stride.val1) + (length.val2 * stride.val2) + (length.val3 * stride.val3)
++ + base;
++}
++
++template <typename T>
++static inline input_val_1D<T> make_zero_length(const input_val_1D<T>& whole_length)
++{
++ return input_val_1D<T>{0};
++}
++
++template <typename T>
++static inline input_val_2D<T> make_zero_length(const input_val_2D<T>& whole_length)
++{
++ return input_val_2D<T>{0, 0};
++}
++
++template <typename T>
++static inline input_val_3D<T> make_zero_length(const input_val_3D<T>& whole_length)
++{
++ return input_val_3D<T>{0, 0, 0};
++}
++
++template <typename T>
++static inline input_val_1D<T> make_unit_stride(const input_val_1D<T>& whole_length)
++{
++ return input_val_1D<T>{1};
++}
++
++template <typename T>
++static inline input_val_2D<T> make_unit_stride(const input_val_2D<T>& whole_length)
++{
++ return input_val_2D<T>{1, whole_length.val1};
++}
++
++template <typename T>
++static inline input_val_3D<T> make_unit_stride(const input_val_3D<T>& whole_length)
++{
++ return input_val_3D<T>{1, whole_length.val1, whole_length.val1 * whole_length.val2};
++}
++
++template <typename T>
++__device__ static input_val_1D<T> get_length(const size_t i, const input_val_1D<T>& whole_length)
++{
++ auto xlen = whole_length.val1;
++
++ auto xidx = i % xlen;
++
++ return input_val_1D<T>{xidx};
++}
++
++template <typename T>
++__device__ static input_val_2D<T> get_length(const size_t i, const input_val_2D<T>& whole_length)
++{
++ auto xlen = whole_length.val1;
++ auto ylen = whole_length.val2;
++
++ auto xidx = i % xlen;
++ auto yidx = i / xlen % ylen;
++
++ return input_val_2D<T>{xidx, yidx};
++}
++
++template <typename T>
++__device__ static input_val_3D<T> get_length(const size_t i, const input_val_3D<T>& whole_length)
++{
++ auto xlen = whole_length.val1;
++ auto ylen = whole_length.val2;
++ auto zlen = whole_length.val3;
++
++ auto xidx = i % xlen;
++ auto yidx = i / xlen % ylen;
++ auto zidx = i / xlen / ylen % zlen;
++
++ return input_val_3D<T>{xidx, yidx, zidx};
++}
++
++template <typename T>
++__device__ static size_t get_batch(const size_t i, const input_val_1D<T>& whole_length)
++{
++ auto xlen = whole_length.val1;
++
++ auto yidx = i / xlen;
++
++ return yidx;
++}
++
++template <typename T>
++__device__ static size_t get_batch(const size_t i, const input_val_2D<T>& whole_length)
++{
++ auto xlen = whole_length.val1;
++ auto ylen = whole_length.val2;
++
++ auto zidx = i / xlen / ylen;
++
++ return zidx;
++}
++
++template <typename T>
++__device__ static size_t get_batch(const size_t i, const input_val_3D<T>& length)
++{
++ auto xlen = length.val1;
++ auto ylen = length.val2;
++ auto zlen = length.val3;
++
++ auto widx = i / xlen / ylen / zlen;
++
++ return widx;
++}
++
++__device__ static double make_random_val(hiprandStatePhilox4_32_10* gen_state, double offset)
++{
++ return hiprand_uniform_double(gen_state) + offset;
++}
++
++__device__ static float make_random_val(hiprandStatePhilox4_32_10* gen_state, float offset)
++{
++ return hiprand_uniform(gen_state) + offset;
++}
++
++__device__ static _Float16 make_random_val(hiprandStatePhilox4_32_10* gen_state, _Float16 offset)
++{
++ return static_cast<_Float16>(hiprand_uniform(gen_state)) + offset;
++}
++
++template <typename Tcomplex>
++__device__ static void set_imag_zero(const size_t pos, Tcomplex* x)
++{
++ x[pos].y = 0.0;
++}
++
++template <typename Tfloat>
++__device__ static void set_imag_zero(const size_t pos, Tfloat* xreal, Tfloat* ximag)
++{
++ ximag[pos] = 0.0;
++}
++
++template <typename Tcomplex>
++__device__ static void conjugate(const size_t pos, const size_t cpos, Tcomplex* x)
++{
++ x[pos].x = x[cpos].x;
++ x[pos].y = -x[cpos].y;
++}
++
++template <typename Tfloat>
++__device__ static void conjugate(const size_t pos, const size_t cpos, Tfloat* xreal, Tfloat* ximag)
++{
++ xreal[pos] = xreal[cpos];
++ ximag[pos] = -ximag[cpos];
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_random_interleaved_data_kernel(const Tint whole_length,
++ const Tint zero_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ rocfft_complex<Treal>* data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ auto i_length = get_length(i, whole_length);
++ auto i_batch = get_batch(i, whole_length);
++ auto i_base = i_batch * idist;
++
++ auto seed = compute_index(zero_length, istride, i_base);
++ auto idx = compute_index(i_length, istride, i_base);
++
++ hiprandStatePhilox4_32_10 gen_state;
++ hiprand_init(seed, idx, 0, &gen_state);
++
++ data[idx].x = make_random_val(&gen_state, static_cast<Treal>(-0.5));
++ data[idx].y = make_random_val(&gen_state, static_cast<Treal>(-0.5));
++ }
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_interleaved_data_kernel(const Tint whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ const Tint ustride,
++ const Treal inv_scale,
++ rocfft_complex<Treal>* data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ const auto i_length = get_length(i, whole_length);
++ const auto i_batch = get_batch(i, whole_length);
++ const auto i_base = i_batch * idist;
++
++ const auto val = static_cast<Treal>(-0.5)
++ + static_cast<Treal>(
++ static_cast<unsigned long long>(compute_index(i_length, ustride, 0)))
++ * inv_scale;
++
++ const auto idx = compute_index(i_length, istride, i_base);
++
++ data[idx].x = val;
++ data[idx].y = val;
++ }
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_random_planar_data_kernel(const Tint whole_length,
++ const Tint zero_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ Treal* real_data,
++ Treal* imag_data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ auto i_length = get_length(i, whole_length);
++ auto i_batch = get_batch(i, whole_length);
++ auto i_base = i_batch * idist;
++
++ auto seed = compute_index(zero_length, istride, i_base);
++ auto idx = compute_index(i_length, istride, i_base);
++
++ hiprandStatePhilox4_32_10 gen_state;
++ hiprand_init(seed, idx, 0, &gen_state);
++
++ real_data[idx] = make_random_val(&gen_state, static_cast<Treal>(-0.5));
++ imag_data[idx] = make_random_val(&gen_state, static_cast<Treal>(-0.5));
++ }
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_planar_data_kernel(const Tint whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ const Tint ustride,
++ const Treal inv_scale,
++ Treal* real_data,
++ Treal* imag_data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ const auto i_length = get_length(i, whole_length);
++ const auto i_batch = get_batch(i, whole_length);
++ const auto i_base = i_batch * idist;
++
++ const auto val = static_cast<Treal>(-0.5)
++ + static_cast<Treal>(
++ static_cast<unsigned long long>(compute_index(i_length, ustride, 0)))
++ * inv_scale;
++
++ const auto idx = compute_index(i_length, istride, i_base);
++
++ real_data[idx] = val;
++ imag_data[idx] = val;
++ }
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_random_real_data_kernel(const Tint whole_length,
++ const Tint zero_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ Treal* data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ auto i_length = get_length(i, whole_length);
++ auto i_batch = get_batch(i, whole_length);
++ auto i_base = i_batch * idist;
++
++ auto seed = compute_index(zero_length, istride, i_base);
++ auto idx = compute_index(i_length, istride, i_base);
++
++ hiprandStatePhilox4_32_10 gen_state;
++ hiprand_init(seed, idx, 0, &gen_state);
++
++ data[idx] = make_random_val(&gen_state, static_cast<Treal>(-0.5));
++ }
++}
++
++template <typename Tint, typename Treal>
++__global__ static void __launch_bounds__(DATA_GEN_THREADS)
++ generate_real_data_kernel(const Tint whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint istride,
++ const Tint ustride,
++ const Treal inv_scale,
++ Treal* data)
++{
++ auto const i = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x
++ + blockIdx.y * gridDim.x * DATA_GEN_THREADS;
++ static_assert(sizeof(i) >= sizeof(isize));
++ if(i < isize)
++ {
++ const auto i_length = get_length(i, whole_length);
++ const auto i_batch = get_batch(i, whole_length);
++ const auto i_base = i_batch * idist;
++
++ const auto val = static_cast<Treal>(-0.5)
++ + static_cast<Treal>(
++ static_cast<unsigned long long>(compute_index(i_length, ustride, 0)))
++ * inv_scale;
++
++ const auto idx = compute_index(i_length, istride, i_base);
++
++ data[idx] = val;
++ }
++}
++
++// For complex-to-real transforms, the input data must be Hermitiam-symmetric.
++// That is, u_k is the complex conjugate of u_{-k}, where k is the wavevector in Fourier
++// space. For multi-dimensional data, this means that we only need to store a bit more
++// than half of the complex values; the rest are redundant. However, there are still
++// some restrictions:
++// * the origin and Nyquist value(s) must be real-valued
++// * some of the remaining values are still redundant, and you might get different results
++// than you expect if the values don't agree.
++
++template <typename Tcomplex>
++__global__ static void impose_hermitian_symmetry_interleaved_1D_kernel(Tcomplex* x,
++ const size_t Nx,
++ const size_t xstride,
++ const size_t dist,
++ const size_t batch_total,
++ const bool Nxeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ id_batch *= dist;
++
++ set_imag_zero(id_batch, x);
++
++ if(Nxeven)
++ set_imag_zero(id_batch + (Nx / 2) * xstride, x);
++ }
++}
++
++template <typename Tfloat>
++__global__ static void impose_hermitian_symmetry_planar_1D_kernel(Tfloat* xreal,
++ Tfloat* ximag,
++ const size_t Nx,
++ const size_t xstride,
++ const size_t dist,
++ const size_t batch_total,
++ const bool Nxeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ id_batch *= dist;
++
++ set_imag_zero(id_batch, xreal, ximag);
++
++ if(Nxeven)
++ set_imag_zero(id_batch + (Nx / 2) * xstride, xreal, ximag);
++ }
++}
++
++template <typename Tcomplex>
++__global__ static void impose_hermitian_symmetry_interleaved_2D_kernel(Tcomplex* x,
++ const size_t Nx,
++ const size_t Ny,
++ const size_t xstride,
++ const size_t ystride,
++ const size_t dist,
++ const size_t batch_total,
++ const size_t x_total,
++ const bool Nxeven,
++ const bool Nyeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ const auto id_x = static_cast<size_t>(threadIdx.y) + blockIdx.y * blockDim.y;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++ static_assert(sizeof(id_x) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ id_batch *= dist;
++
++ if(id_x == 0)
++ set_imag_zero(id_batch, x);
++
++ if(id_x == 0 && Nxeven)
++ set_imag_zero(id_batch + (Nx / 2) * xstride, x);
++
++ if(id_x == 0 && Nyeven)
++ set_imag_zero(id_batch + ystride * (Ny / 2), x);
++
++ if(id_x == 0 && Nxeven && Nyeven)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2), x);
++
++ if(id_x < x_total)
++ {
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)), id_batch + xstride * (id_x + 1), x);
++
++ if(Nyeven)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (Ny / 2),
++ x);
++ }
++ }
++}
++
++template <typename Tfloat>
++__global__ static void impose_hermitian_symmetry_planar_2D_kernel(Tfloat* xreal,
++ Tfloat* ximag,
++ const size_t Nx,
++ const size_t Ny,
++ const size_t xstride,
++ const size_t ystride,
++ const size_t dist,
++ const size_t batch_total,
++ const size_t x_total,
++ const bool Nxeven,
++ const bool Nyeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ const auto id_x = static_cast<size_t>(threadIdx.y) + blockIdx.y * blockDim.y;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++ static_assert(sizeof(id_x) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ id_batch *= dist;
++
++ if(id_x == 0)
++ set_imag_zero(id_batch, xreal, ximag);
++
++ if(id_x == 0 && Nxeven)
++ set_imag_zero(id_batch + (Nx / 2) * xstride, xreal, ximag);
++
++ if(id_x == 0 && Nyeven)
++ set_imag_zero(id_batch + ystride * (Ny / 2), xreal, ximag);
++
++ if(id_x == 0 && Nxeven && Nyeven)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2), xreal, ximag);
++
++ if(id_x < x_total)
++ {
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)),
++ id_batch + xstride * (id_x + 1),
++ xreal,
++ ximag);
++
++ if(Nyeven)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (Ny / 2),
++ xreal,
++ ximag);
++ }
++ }
++}
++
++template <typename Tcomplex>
++__global__ static void impose_hermitian_symmetry_interleaved_3D_kernel(Tcomplex* x,
++ const size_t Nx,
++ const size_t Ny,
++ const size_t Nz,
++ const size_t xstride,
++ const size_t ystride,
++ const size_t zstride,
++ const size_t dist,
++ const size_t batch_total,
++ const size_t x_total,
++ const size_t y_total,
++ const size_t y_total_half,
++ const bool Nxeven,
++ const bool Nyeven,
++ const bool Nzeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ const auto id_x = static_cast<size_t>(threadIdx.y) + blockIdx.y * blockDim.y;
++ const auto id_y = static_cast<size_t>(threadIdx.z) + blockIdx.z * blockDim.z;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++ static_assert(sizeof(id_x) == sizeof(size_t));
++ static_assert(sizeof(id_y) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ auto id_x_y_zero = (id_x == 0 && id_y == 0);
++
++ id_batch *= dist;
++
++ if(id_x_y_zero)
++ set_imag_zero(id_batch, x);
++
++ if(Nxeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2), x);
++
++ if(Nyeven && id_x_y_zero)
++ set_imag_zero(id_batch + ystride * (Ny / 2), x);
++
++ if(Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + zstride * (Nz / 2), x);
++
++ if(Nxeven && Nyeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2), x);
++
++ if(Nxeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + zstride * (Nz / 2), x);
++
++ if(Nyeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + ystride * (Ny / 2) + zstride * (Nz / 2), x);
++
++ if(Nxeven && Nyeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2) + zstride * (Nz / 2),
++ x);
++
++ if(id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + ystride * (Ny - (id_y + 1)), id_batch + ystride * (id_y + 1), x);
++
++ if(Nxeven && id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + xstride * (Nx / 2) + ystride * (Ny - (id_y + 1)),
++ id_batch + xstride * (Nx / 2) + ystride * (id_y + 1),
++ x);
++
++ if(id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)), id_batch + xstride * (id_x + 1), x);
++
++ if(Nyeven && id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (Ny / 2),
++ x);
++
++ if(id_x < x_total && id_y < y_total)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny - (id_y + 1)),
++ id_batch + xstride * (id_x + 1) + ystride * (id_y + 1),
++ x);
++
++ if(Nzeven)
++ {
++ if(id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + zstride * (Nz / 2),
++ x);
++
++ if(Nyeven && id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + zstride * (Nz / 2),
++ x);
++
++ if(id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + ystride * (Ny - (id_y + 1)) + zstride * (Nz / 2),
++ id_batch + ystride * (id_y + 1) + zstride * (Nz / 2),
++ x);
++
++ if(Nxeven && id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + xstride * (Nx / 2) + ystride * (Ny - (id_y + 1))
++ + zstride * (Nz / 2),
++ id_batch + xstride * (Nx / 2) + ystride * (id_y + 1) + zstride * (Nz / 2),
++ x);
++
++ if(id_x < x_total && id_y < y_total)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny - (id_y + 1))
++ + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (id_y + 1)
++ + zstride * (Nz / 2),
++ x);
++ }
++ }
++}
++
++template <typename Tfloat>
++__global__ static void impose_hermitian_symmetry_planar_3D_kernel(Tfloat* xreal,
++ Tfloat* ximag,
++ const size_t Nx,
++ const size_t Ny,
++ const size_t Nz,
++ const size_t xstride,
++ const size_t ystride,
++ const size_t zstride,
++ const size_t dist,
++ const size_t batch_total,
++ const size_t x_total,
++ const size_t y_total,
++ const size_t y_total_half,
++ const bool Nxeven,
++ const bool Nyeven,
++ const bool Nzeven)
++{
++ auto id_batch = static_cast<size_t>(threadIdx.x) + blockIdx.x * blockDim.x;
++ const auto id_x = static_cast<size_t>(threadIdx.y) + blockIdx.y * blockDim.y;
++ const auto id_y = static_cast<size_t>(threadIdx.z) + blockIdx.z * blockDim.z;
++ static_assert(sizeof(id_batch) == sizeof(size_t));
++ static_assert(sizeof(id_x) == sizeof(size_t));
++ static_assert(sizeof(id_y) == sizeof(size_t));
++
++ if(id_batch < batch_total)
++ {
++ auto id_x_y_zero = (id_x == 0 && id_y == 0);
++
++ id_batch *= dist;
++
++ if(id_x_y_zero)
++ set_imag_zero(id_batch, xreal, ximag);
++
++ if(Nxeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2), xreal, ximag);
++
++ if(Nyeven && id_x_y_zero)
++ set_imag_zero(id_batch + ystride * (Ny / 2), xreal, ximag);
++
++ if(Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + zstride * (Nz / 2), xreal, ximag);
++
++ if(Nxeven && Nyeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2), xreal, ximag);
++
++ if(Nxeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + zstride * (Nz / 2), xreal, ximag);
++
++ if(Nyeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + ystride * (Ny / 2) + zstride * (Nz / 2), xreal, ximag);
++
++ if(Nxeven && Nyeven && Nzeven && id_x_y_zero)
++ set_imag_zero(id_batch + xstride * (Nx / 2) + ystride * (Ny / 2) + zstride * (Nz / 2),
++ xreal,
++ ximag);
++
++ if(id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + ystride * (Ny - (id_y + 1)),
++ id_batch + ystride * (id_y + 1),
++ xreal,
++ ximag);
++
++ if(Nxeven && id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + xstride * (Nx / 2) + ystride * (Ny - (id_y + 1)),
++ id_batch + xstride * (Nx / 2) + ystride * (id_y + 1),
++ xreal,
++ ximag);
++
++ if(id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)),
++ id_batch + xstride * (id_x + 1),
++ xreal,
++ ximag);
++
++ if(Nyeven && id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (Ny / 2),
++ xreal,
++ ximag);
++
++ if(id_x < x_total && id_y < y_total)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny - (id_y + 1)),
++ id_batch + xstride * (id_x + 1) + ystride * (id_y + 1),
++ xreal,
++ ximag);
++
++ if(Nzeven)
++ {
++ if(id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + zstride * (Nz / 2),
++ xreal,
++ ximag);
++
++ if(Nyeven && id_x < x_total && id_y == 0)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + zstride * (Nz / 2),
++ xreal,
++ ximag);
++
++ if(id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + ystride * (Ny - (id_y + 1)) + zstride * (Nz / 2),
++ id_batch + ystride * (id_y + 1) + zstride * (Nz / 2),
++ xreal,
++ ximag);
++
++ if(Nxeven && id_x == 0 && id_y < y_total_half)
++ conjugate(id_batch + xstride * (Nx / 2) + ystride * (Ny - (id_y + 1))
++ + zstride * (Nz / 2),
++ id_batch + xstride * (Nx / 2) + ystride * (id_y + 1) + zstride * (Nz / 2),
++ xreal,
++ ximag);
++
++ if(id_x < x_total && id_y < y_total)
++ conjugate(id_batch + xstride * (Nx - (id_x + 1)) + ystride * (Ny - (id_y + 1))
++ + zstride * (Nz / 2),
++ id_batch + xstride * (id_x + 1) + ystride * (id_y + 1)
++ + zstride * (Nz / 2),
++ xreal,
++ ximag);
++ }
++ }
++}
++
++// get grid dimensions for data gen kernel
++static dim3 generate_data_gridDim(const size_t isize)
++{
++ auto blockSize = DATA_GEN_THREADS;
++ // total number of blocks needed in the grid
++ auto numBlocks_setup = DivRoundingUp<size_t>(isize, blockSize);
++
++ // Total work items per dimension in the grid is counted in
++ // uint32_t. Since each thread initializes one element, very
++ // large amounts of data will overflow this total size if we do
++ // all this work in one grid dimension, causing launch failure.
++ //
++ // CUDA also generally allows for effectively unlimited grid X
++ // dim, but Y and Z are more limited.
++ auto gridDim_y = std::min<unsigned int>(DATA_GEN_GRID_Y_MAX, numBlocks_setup);
++ auto gridDim_x = DivRoundingUp<unsigned int>(numBlocks_setup, DATA_GEN_GRID_Y_MAX);
++ return {gridDim_x, gridDim_y};
++}
++
++// get grid dimensions for hermitian symmetrizer kernel
++static dim3 generate_hermitian_gridDim(const std::vector<size_t>& length,
++ const size_t batch,
++ const size_t blockSize)
++{
++ dim3 gridDim;
++
++ switch(length.size())
++ {
++ case 1:
++ gridDim = dim3(DivRoundingUp<size_t>(batch, blockSize));
++ break;
++ case 2:
++ gridDim = dim3(DivRoundingUp<size_t>(batch, blockSize),
++ DivRoundingUp<size_t>((length[0] + 1) / 2 - 1, blockSize));
++ break;
++ case 3:
++ gridDim = dim3(DivRoundingUp<size_t>(batch, blockSize),
++ DivRoundingUp<size_t>((length[0] + 1) / 2 - 1, blockSize),
++ DivRoundingUp<size_t>(length[1] - 1, blockSize));
++ break;
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++
++ return gridDim;
++}
++
++static dim3 generate_blockDim(const std::vector<size_t>& length, const size_t blockSize)
++{
++ dim3 blockDim;
++
++ switch(length.size())
++ {
++ case 1:
++ blockDim = dim3(blockSize);
++ break;
++ case 2:
++ blockDim = dim3(blockSize, blockSize);
++ break;
++ case 3:
++ blockDim = dim3(blockSize, blockSize, blockSize);
++ break;
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++
++ return blockDim;
++}
++
++template <typename Tint, typename Treal>
++static void generate_random_interleaved_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ rocfft_complex<Treal>* input_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ auto input_length = get_input_val(whole_length);
++ auto zero_length = make_zero_length(input_length);
++ auto input_stride = get_input_val(whole_stride);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_random_interleaved_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(
++ HIP_KERNEL_NAME(generate_random_interleaved_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ zero_length,
++ idist,
++ isize,
++ input_stride,
++ input_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_random_interleaved_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tint, typename Treal>
++static void generate_interleaved_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ const size_t nbatch,
++ rocfft_complex<Treal>* input_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ const auto input_length = get_input_val(whole_length);
++ const auto input_stride = get_input_val(whole_stride);
++ const auto unit_stride = make_unit_stride(input_length);
++
++ const auto inv_scale
++ = static_cast<Treal>(1.0)
++ / static_cast<Treal>(static_cast<unsigned long long>(isize) / nbatch - 1);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_interleaved_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(
++ HIP_KERNEL_NAME(generate_interleaved_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ idist,
++ isize,
++ input_stride,
++ unit_stride,
++ inv_scale,
++ input_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_interleaved_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tint, typename Treal>
++static void generate_random_planar_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ Treal* real_data,
++ Treal* imag_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ const auto input_length = get_input_val(whole_length);
++ const auto zero_length = make_zero_length(input_length);
++ const auto input_stride = get_input_val(whole_stride);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_random_planar_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(
++ HIP_KERNEL_NAME(generate_random_planar_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ zero_length,
++ idist,
++ isize,
++ input_stride,
++ real_data,
++ imag_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_random_planar_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tint, typename Treal>
++static void generate_planar_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ const size_t nbatch,
++ Treal* real_data,
++ Treal* imag_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ const auto input_length = get_input_val(whole_length);
++ const auto input_stride = get_input_val(whole_stride);
++ const auto unit_stride = make_unit_stride(input_length);
++
++ const auto inv_scale
++ = static_cast<Treal>(1.0)
++ / static_cast<Treal>(static_cast<unsigned long long>(isize) / nbatch - 1);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_planar_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(HIP_KERNEL_NAME(generate_planar_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ idist,
++ isize,
++ input_stride,
++ unit_stride,
++ inv_scale,
++ real_data,
++ imag_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_planar_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tint, typename Treal>
++static void generate_random_real_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ Treal* input_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ const auto input_length = get_input_val(whole_length);
++ const auto zero_length = make_zero_length(input_length);
++ const auto input_stride = get_input_val(whole_stride);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_random_real_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(
++ HIP_KERNEL_NAME(generate_random_real_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ zero_length,
++ idist,
++ isize,
++ input_stride,
++ input_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_random_real_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tint, typename Treal>
++static void generate_real_data(const Tint& whole_length,
++ const size_t idist,
++ const size_t isize,
++ const Tint& whole_stride,
++ const size_t nbatch,
++ Treal* input_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ const auto input_length = get_input_val(whole_length);
++ const auto input_stride = get_input_val(whole_stride);
++ const auto unit_stride = make_unit_stride(input_length);
++
++ const auto inv_scale
++ = static_cast<Treal>(1.0)
++ / static_cast<Treal>(static_cast<unsigned long long>(isize) / nbatch - 1);
++
++ dim3 gridDim = generate_data_gridDim(isize);
++ dim3 blockDim{DATA_GEN_THREADS};
++
++ launch_limits_check("generate_real_data_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(HIP_KERNEL_NAME(generate_real_data_kernel<decltype(input_length), Treal>),
++ gridDim,
++ blockDim,
++ 0, // sharedMemBytes
++ 0, // stream
++ input_length,
++ idist,
++ isize,
++ input_stride,
++ unit_stride,
++ inv_scale,
++ input_data);
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("generate_real_data_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tcomplex>
++static void impose_hermitian_symmetry_interleaved(const std::vector<size_t>& length,
++ const std::vector<size_t>& ilength,
++ const std::vector<size_t>& stride,
++ const size_t dist,
++ const size_t batch,
++ Tcomplex* input_data,
++ const hipDeviceProp_t& deviceProp)
++{
++ auto blockSize = DATA_GEN_THREADS;
++ auto blockDim = generate_blockDim(length, blockSize);
++ auto gridDim = generate_hermitian_gridDim(length, batch, blockSize);
++
++ switch(length.size())
++ {
++ case 1:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_interleaved_1D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_interleaved_1D_kernel<Tcomplex>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data,
++ length[0],
++ stride[0],
++ dist,
++ batch,
++ length[0] % 2 == 0);
++
++ break;
++ }
++ case 2:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_interleaved_2D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_interleaved_2D_kernel<Tcomplex>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data,
++ length[0],
++ length[1],
++ stride[0],
++ stride[1],
++ dist,
++ batch,
++ (ilength[0] + 1) / 2 - 1,
++ length[0] % 2 == 0,
++ length[1] % 2 == 0);
++
++ break;
++ }
++ case 3:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_interleaved_3D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_interleaved_3D_kernel<Tcomplex>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data,
++ length[0],
++ length[1],
++ length[2],
++ stride[0],
++ stride[1],
++ stride[2],
++ dist,
++ batch,
++ (ilength[0] + 1) / 2 - 1,
++ ilength[1] - 1,
++ (ilength[1] + 1) / 2 - 1,
++ length[0] % 2 == 0,
++ length[1] % 2 == 0,
++ length[2] % 2 == 0);
++ break;
++ }
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("impose_hermitian_symmetry_interleaved_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++template <typename Tfloat>
++static void impose_hermitian_symmetry_planar(const std::vector<size_t>& length,
++ const std::vector<size_t>& ilength,
++ const std::vector<size_t>& stride,
++ const size_t dist,
++ const size_t batch,
++ Tfloat* input_data_real,
++ Tfloat* input_data_imag,
++ const hipDeviceProp_t& deviceProp)
++{
++ auto blockSize = DATA_GEN_THREADS;
++ auto blockDim = generate_blockDim(length, blockSize);
++ auto gridDim = generate_hermitian_gridDim(length, batch, blockSize);
++
++ switch(length.size())
++ {
++ case 1:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_planar_1D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_planar_1D_kernel<Tfloat>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data_real,
++ input_data_imag,
++ length[0],
++ stride[0],
++ dist,
++ batch,
++ length[0] % 2 == 0);
++
++ break;
++ }
++ case 2:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_planar_2D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_planar_2D_kernel<Tfloat>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data_real,
++ input_data_imag,
++ length[0],
++ length[1],
++ stride[0],
++ stride[1],
++ dist,
++ batch,
++ (ilength[0] + 1) / 2 - 1,
++ length[0] % 2 == 0,
++ length[1] % 2 == 0);
++
++ break;
++ }
++ case 3:
++ {
++ launch_limits_check(
++ "impose_hermitian_symmetry_planar_3D_kernel", gridDim, blockDim, deviceProp);
++
++ hipLaunchKernelGGL(impose_hermitian_symmetry_planar_3D_kernel<Tfloat>,
++ gridDim,
++ blockDim,
++ 0,
++ 0,
++ input_data_real,
++ input_data_imag,
++ length[0],
++ length[1],
++ length[2],
++ stride[0],
++ stride[1],
++ stride[2],
++ dist,
++ batch,
++ (ilength[0] + 1) / 2 - 1,
++ ilength[1] - 1,
++ (ilength[1] + 1) / 2 - 1,
++ length[0] % 2 == 0,
++ length[1] % 2 == 0,
++ length[2] % 2 == 0);
++ break;
++ }
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++ auto err = hipGetLastError();
++ if(err != hipSuccess)
++ throw std::runtime_error("impose_hermitian_symmetry_planar_kernel launch failure: "
++ + std::string(hipGetErrorName(err)));
++}
++
++#endif // DATA_GEN_DEVICE_H
+diff --git a/shared/data_gen_host.h b/shared/data_gen_host.h
+new file mode 100644
+index 0000000..29d3854
+--- /dev/null
++++ b/shared/data_gen_host.h
+@@ -0,0 +1,881 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef DATA_GEN_HOST_H
++#define DATA_GEN_HOST_H
++
++#include "../shared/hostbuf.h"
++#include "../shared/increment.h"
++#include <complex>
++#include <limits>
++#include <random>
++#include <tuple>
++#include <vector>
++
++// Specialized computation of index given 1-, 2-, 3- dimension length + stride
++template <typename T1, typename T2>
++size_t compute_index(T1 length, T2 stride, size_t base)
++{
++ return (length * stride) + base;
++}
++
++template <typename T1, typename T2>
++size_t
++ compute_index(const std::tuple<T1, T1>& length, const std::tuple<T2, T2>& stride, size_t base)
++{
++ static_assert(std::is_integral<T1>::value, "Integral required.");
++ static_assert(std::is_integral<T2>::value, "Integral required.");
++ return (std::get<0>(length) * std::get<0>(stride)) + (std::get<1>(length) * std::get<1>(stride))
++ + base;
++}
++
++template <typename T1, typename T2>
++size_t compute_index(const std::tuple<T1, T1, T1>& length,
++ const std::tuple<T2, T2, T2>& stride,
++ size_t base)
++{
++ static_assert(std::is_integral<T1>::value, "Integral required.");
++ static_assert(std::is_integral<T2>::value, "Integral required.");
++ return (std::get<0>(length) * std::get<0>(stride)) + (std::get<1>(length) * std::get<1>(stride))
++ + (std::get<2>(length) * std::get<2>(stride)) + base;
++}
++
++// count the number of total iterations for 1-, 2-, and 3-D dimensions
++template <typename T1>
++size_t count_iters(const T1& i)
++{
++ return i;
++}
++
++template <typename T1>
++size_t count_iters(const std::tuple<T1, T1>& i)
++{
++ return std::get<0>(i) * std::get<1>(i);
++}
++
++template <typename T1>
++size_t count_iters(const std::tuple<T1, T1, T1>& i)
++{
++ return std::get<0>(i) * std::get<1>(i) * std::get<2>(i);
++}
++
++template <typename T1>
++T1 make_unit_stride(const T1& whole_length)
++{
++ return static_cast<T1>(1);
++}
++
++template <typename T1>
++std::tuple<T1, T1> make_unit_stride(const std::tuple<T1, T1>& whole_length)
++{
++ return std::make_tuple(static_cast<T1>(1), static_cast<T1>(std::get<0>(whole_length)));
++}
++
++template <typename T1>
++std::tuple<T1, T1, T1> make_unit_stride(const std::tuple<T1, T1, T1>& whole_length)
++{
++ return std::make_tuple(static_cast<T1>(1),
++ static_cast<T1>(std::get<0>(whole_length)),
++ static_cast<T1>(std::get<0>(whole_length))
++ * static_cast<T1>(std::get<1>(whole_length)));
++}
++
++// Work out how many partitions to break our iteration problem into
++template <typename T1>
++static size_t compute_partition_count(T1 length)
++{
++#ifdef _OPENMP
++ // we seem to get contention from too many threads, which slows
++ // things down. particularly noticeable with mix_3D tests
++ static const size_t MAX_PARTITIONS = 8;
++ size_t iters = count_iters(length);
++ size_t hw_threads = std::min(MAX_PARTITIONS, static_cast<size_t>(omp_get_num_procs()));
++ if(!hw_threads)
++ return 1;
++
++ // don't bother threading problem sizes that are too small. pick
++ // an arbitrary number of iterations and ensure that each thread
++ // has at least that many iterations to process
++ static const size_t MIN_ITERS_PER_THREAD = 2048;
++
++ // either use the whole CPU, or use ceil(iters/iters_per_thread)
++ return std::min(hw_threads, (iters + MIN_ITERS_PER_THREAD + 1) / MIN_ITERS_PER_THREAD);
++#else
++ return 1;
++#endif
++}
++
++// Break a scalar length into some number of pieces, returning
++// [(start0, end0), (start1, end1), ...]
++template <typename T1>
++std::vector<std::pair<T1, T1>> partition_base(const T1& length, size_t num_parts)
++{
++ static_assert(std::is_integral<T1>::value, "Integral required.");
++
++ // make sure we don't exceed the length
++ num_parts = std::min(length, num_parts);
++
++ std::vector<std::pair<T1, T1>> ret(num_parts);
++ auto partition_size = length / num_parts;
++ T1 cur_partition = 0;
++ for(size_t i = 0; i < num_parts; ++i, cur_partition += partition_size)
++ {
++ ret[i].first = cur_partition;
++ ret[i].second = cur_partition + partition_size;
++ }
++ // last partition might not divide evenly, fix it up
++ ret.back().second = length;
++ return ret;
++}
++
++// Returns pairs of startindex, endindex, for 1D, 2D, 3D lengths
++template <typename T1>
++std::vector<std::pair<T1, T1>> partition_rowmajor(const T1& length)
++{
++ return partition_base(length, compute_partition_count(length));
++}
++
++// Partition on the leftmost part of the tuple, for row-major indexing
++template <typename T1>
++std::vector<std::pair<std::tuple<T1, T1>, std::tuple<T1, T1>>>
++ partition_rowmajor(const std::tuple<T1, T1>& length)
++{
++ auto partitions = partition_base(std::get<0>(length), compute_partition_count(length));
++ std::vector<std::pair<std::tuple<T1, T1>, std::tuple<T1, T1>>> ret(partitions.size());
++ for(size_t i = 0; i < partitions.size(); ++i)
++ {
++ std::get<0>(ret[i].first) = partitions[i].first;
++ std::get<1>(ret[i].first) = 0;
++ std::get<0>(ret[i].second) = partitions[i].second;
++ std::get<1>(ret[i].second) = std::get<1>(length);
++ }
++ return ret;
++}
++template <typename T1>
++std::vector<std::pair<std::tuple<T1, T1, T1>, std::tuple<T1, T1, T1>>>
++ partition_rowmajor(const std::tuple<T1, T1, T1>& length)
++{
++ auto partitions = partition_base(std::get<0>(length), compute_partition_count(length));
++ std::vector<std::pair<std::tuple<T1, T1, T1>, std::tuple<T1, T1, T1>>> ret(partitions.size());
++ for(size_t i = 0; i < partitions.size(); ++i)
++ {
++ std::get<0>(ret[i].first) = partitions[i].first;
++ std::get<1>(ret[i].first) = 0;
++ std::get<2>(ret[i].first) = 0;
++ std::get<0>(ret[i].second) = partitions[i].second;
++ std::get<1>(ret[i].second) = std::get<1>(length);
++ std::get<2>(ret[i].second) = std::get<2>(length);
++ }
++ return ret;
++}
++
++// For complex-to-real transforms, the input data must be Hermitiam-symmetric.
++// That is, u_k is the complex conjugate of u_{-k}, where k is the wavevector in Fourier
++// space. For multi-dimensional data, this means that we only need to store a bit more
++// than half of the complex values; the rest are redundant. However, there are still
++// some restrictions:
++// * the origin and Nyquist value(s) must be real-valued
++// * some of the remaining values are still redundant, and you might get different results
++// than you expect if the values don't agree.
++// Below are some example kernels which impose Hermitian symmetry on a complex array
++// of the given dimensions.
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_interleaved_1D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data = ((std::complex<Tfloat>*)vals[0].data()) + ibatch * idist;
++
++ data[0].imag(0.0);
++
++ if(length[0] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2)].imag(0.0);
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_planar_1D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data_imag = ((Tfloat*)vals[1].data()) + ibatch * idist;
++
++ data_imag[0] = 0.0;
++
++ if(length[0] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2)] = 0.0;
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_interleaved_2D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data = ((std::complex<Tfloat>*)vals[0].data()) + ibatch * idist;
++
++ data[0].imag(0.0);
++
++ if(length[0] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2)].imag(0.0);
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ data[istride[1] * (length[1] / 2)].imag(0.0);
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)].imag(0.0);
++ }
++
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i)] = std::conj(data[istride[0] * i]);
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = std::conj(data[istride[0] * i + istride[1] * (length[1] / 2)]);
++ }
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_planar_2D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data_real = ((Tfloat*)vals[0].data()) + ibatch * idist;
++ auto data_imag = ((Tfloat*)vals[1].data()) + ibatch * idist;
++
++ data_imag[0] = 0.0;
++
++ if(length[0] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2)] = 0.0;
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ data_imag[istride[1] * (length[1] / 2)] = 0.0;
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)] = 0.0;
++ }
++
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i)] = data_real[istride[0] * i];
++ data_imag[istride[0] * (length[0] - i)] = -data_imag[istride[0] * i];
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = data_real[istride[0] * i + istride[1] * (length[1] / 2)];
++ data_imag[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = -data_imag[istride[0] * i + istride[1] * (length[1] / 2)];
++ }
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_interleaved_3D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data = ((std::complex<Tfloat>*)vals[0].data()) + ibatch * idist;
++
++ data[0].imag(0.0);
++
++ if(length[0] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2)].imag(0.0);
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ data[istride[1] * (length[1] / 2)].imag(0.0);
++ }
++
++ if(length[2] % 2 == 0)
++ {
++ data[istride[2] * (length[2] / 2)].imag(0.0);
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)].imag(0.0);
++ }
++
++ if(length[0] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2) + istride[2] * (length[2] / 2)].imag(0.0);
++ }
++ if(length[1] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data[istride[1] * (length[1] / 2) + istride[2] * (length[2] / 2)].imag(0.0);
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)
++ + istride[2] * (length[2] / 2)]
++ .imag(0.0);
++ }
++
++ // y-axis:
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data[istride[1] * (length[1] - j)] = std::conj(data[istride[1] * j]);
++ }
++
++ if(length[0] % 2 == 0)
++ {
++ // y-axis at x-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)]
++ = std::conj(data[istride[0] * (length[0] / 2) + istride[1] * j]);
++ }
++ }
++
++ // x-axis:
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i)] = std::conj(data[istride[0] * i]);
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ // x-axis at y-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = std::conj(data[istride[0] * i + istride[1] * (length[1] / 2)]);
++ }
++ }
++
++ // x-y plane:
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ for(unsigned int j = 1; j < length[1]; ++j)
++ {
++ data[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)]
++ = std::conj(data[istride[0] * i + istride[1] * j]);
++ }
++ }
++
++ if(length[2] % 2 == 0)
++ {
++ // x-axis at z-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = std::conj(data[istride[0] * i + istride[2] * (length[2] / 2)]);
++ }
++ if(length[1] % 2 == 0)
++ {
++ // x-axis at yz-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = std::conj(data[istride[0] * i + istride[2] * (length[2] / 2)]);
++ }
++ }
++
++ // y-axis: at z-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data[istride[1] * (length[1] - j) + istride[2] * (length[2] / 2)]
++ = std::conj(data[istride[1] * j + istride[2] * (length[2] / 2)]);
++ }
++
++ if(length[0] % 2 == 0)
++ {
++ // y-axis: at xz-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = std::conj(data[istride[0] * (length[0] / 2) + istride[1] * j
++ + istride[2] * (length[2] / 2)]);
++ }
++ }
++
++ // x-y plane: at z-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ for(unsigned int j = 1; j < length[1]; ++j)
++ {
++ data[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = std::conj(
++ data[istride[0] * i + istride[1] * j + istride[2] * (length[2] / 2)]);
++ }
++ }
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_planar_3D(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ for(unsigned int ibatch = 0; ibatch < nbatch; ++ibatch)
++ {
++ auto data_real = ((Tfloat*)vals[0].data()) + ibatch * idist;
++ auto data_imag = ((Tfloat*)vals[1].data()) + ibatch * idist;
++
++ data_imag[0] = 0.0;
++
++ if(length[0] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2)] = 0.0;
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ data_imag[istride[1] * (length[1] / 2)] = 0.0;
++ }
++
++ if(length[2] % 2 == 0)
++ {
++ data_imag[istride[2] * (length[2] / 2)] = 0.0;
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)] = 0.0;
++ }
++
++ if(length[0] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2) + istride[2] * (length[2] / 2)] = 0.0;
++ }
++ if(length[1] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data_imag[istride[1] * (length[1] / 2) + istride[2] * (length[2] / 2)] = 0.0;
++ }
++
++ if(length[0] % 2 == 0 && length[1] % 2 == 0 && length[2] % 2 == 0)
++ {
++ data_imag[istride[0] * (length[0] / 2) + istride[1] * (length[1] / 2)
++ + istride[2] * (length[2] / 2)]
++ = 0.0;
++ }
++
++ // y-axis:
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data_real[istride[1] * (length[1] - j)] = data_real[istride[1] * j];
++ data_imag[istride[1] * (length[1] - j)] = -data_imag[istride[1] * j];
++ }
++
++ if(length[0] % 2 == 0)
++ {
++ // y-axis at x-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data_real[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)]
++ = data_real[istride[0] * (length[0] / 2) + istride[1] * j];
++ data_imag[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)]
++ = -data_imag[istride[0] * (length[0] / 2) + istride[1] * j];
++ }
++ }
++
++ // x-axis:
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i)] = data_real[istride[0] * i];
++ data_imag[istride[0] * (length[0] - i)] = -data_imag[istride[0] * i];
++ }
++
++ if(length[1] % 2 == 0)
++ {
++ // x-axis at y-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = data_real[istride[0] * i + istride[1] * (length[1] / 2)];
++ data_imag[istride[0] * (length[0] - i) + istride[1] * (length[1] / 2)]
++ = -data_imag[istride[0] * i + istride[1] * (length[1] / 2)];
++ }
++ }
++
++ // x-y plane:
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ for(unsigned int j = 1; j < length[1]; ++j)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)]
++ = data_real[istride[0] * i + istride[1] * j];
++ data_imag[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)]
++ = -data_imag[istride[0] * i + istride[1] * j];
++ }
++ }
++
++ if(length[2] % 2 == 0)
++ {
++ // x-axis at z-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = data_real[istride[0] * i + istride[2] * (length[2] / 2)];
++ data_imag[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = -data_imag[istride[0] * i + istride[2] * (length[2] / 2)];
++ }
++ if(length[1] % 2 == 0)
++ {
++ // x-axis at yz-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = data_real[istride[0] * i + istride[2] * (length[2] / 2)];
++ data_imag[istride[0] * (length[0] - i) + istride[2] * (length[2] / 2)]
++ = -data_imag[istride[0] * i + istride[2] * (length[2] / 2)];
++ }
++ }
++
++ // y-axis: at z-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data_real[istride[1] * (length[1] - j) + istride[2] * (length[2] / 2)]
++ = data_real[istride[1] * j + istride[2] * (length[2] / 2)];
++ data_imag[istride[1] * (length[1] - j) + istride[2] * (length[2] / 2)]
++ = -data_imag[istride[1] * j + istride[2] * (length[2] / 2)];
++ }
++
++ if(length[0] % 2 == 0)
++ {
++ // y-axis: at xz-nyquist
++ for(unsigned int j = 1; j < (length[1] + 1) / 2; ++j)
++ {
++ data_real[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = data_real[istride[0] * (length[0] / 2) + istride[1] * j
++ + istride[2] * (length[2] / 2)];
++ data_imag[istride[0] * (length[0] / 2) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = -data_imag[istride[0] * (length[0] / 2) + istride[1] * j
++ + istride[2] * (length[2] / 2)];
++ }
++ }
++
++ // x-y plane: at z-nyquist
++ for(unsigned int i = 1; i < (length[0] + 1) / 2; ++i)
++ {
++ for(unsigned int j = 1; j < length[1]; ++j)
++ {
++ data_real[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = data_real[istride[0] * i + istride[1] * j + istride[2] * (length[2] / 2)];
++ data_imag[istride[0] * (length[0] - i) + istride[1] * (length[1] - j)
++ + istride[2] * (length[2] / 2)]
++ = -data_imag[istride[0] * i + istride[1] * j
++ + istride[2] * (length[2] / 2)];
++ }
++ }
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_random_interleaved_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++ auto idata = (std::complex<Tfloat>*)input[0].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ std::mt19937 gen(compute_index(index, whole_stride, i_base));
++ do
++ {
++ const auto i = compute_index(index, whole_stride, i_base);
++ const Tfloat x = (Tfloat)gen() / (Tfloat)gen.max();
++ const Tfloat y = (Tfloat)gen() / (Tfloat)gen.max();
++ const std::complex<Tfloat> val(x, y);
++ idata[i] = val;
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_interleaved_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++ auto idata = (std::complex<Tfloat>*)input[0].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ auto unit_stride = make_unit_stride(whole_length);
++
++ const Tfloat inv_scale = 1.0 / static_cast<Tfloat>(count_iters(whole_length) - 1);
++
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto val_xy
++ = -0.5 + static_cast<Tfloat>(compute_index(index, unit_stride, 0)) * inv_scale;
++
++ const std::complex<Tfloat> val(val_xy, val_xy);
++
++ const auto i = compute_index(index, whole_stride, i_base);
++
++ idata[i] = val;
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_random_planar_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++ auto ireal = (Tfloat*)input[0].data();
++ auto iimag = (Tfloat*)input[1].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ std::mt19937 gen(compute_index(index, whole_stride, i_base));
++ do
++ {
++ const auto i = compute_index(index, whole_stride, i_base);
++ const std::complex<Tfloat> val((Tfloat)gen() / (Tfloat)gen.max(),
++ (Tfloat)gen() / (Tfloat)gen.max());
++ ireal[i] = val.real();
++ iimag[i] = val.imag();
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_planar_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++
++ auto ireal = (Tfloat*)input[0].data();
++ auto iimag = (Tfloat*)input[1].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ auto unit_stride = make_unit_stride(whole_length);
++
++ const Tfloat inv_scale = 1.0 / static_cast<Tfloat>(count_iters(whole_length) - 1);
++
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto val_xy
++ = -0.5 + static_cast<Tfloat>(compute_index(index, unit_stride, 0)) * inv_scale;
++
++ const auto i = compute_index(index, whole_stride, i_base);
++
++ ireal[i] = val_xy;
++ iimag[i] = val_xy;
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_random_real_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++ auto idata = (Tfloat*)input[0].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ std::mt19937 gen(compute_index(index, whole_stride, i_base));
++ do
++ {
++ const auto i = compute_index(index, whole_stride, i_base);
++ const Tfloat val = (Tfloat)gen() / (Tfloat)gen.max();
++ idata[i] = val;
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++static void generate_real_data(std::vector<hostbuf>& input,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch)
++{
++
++ auto idata = (Tfloat*)input[0].data();
++ size_t i_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ auto unit_stride = make_unit_stride(whole_length);
++
++ const Tfloat inv_scale = 1.0 / static_cast<Tfloat>(count_iters(whole_length) - 1);
++
++ for(unsigned int b = 0; b < nbatch; b++, i_base += idist)
++ {
++#pragma omp parallel for num_threads(partitions.size())
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto i = compute_index(index, whole_stride, i_base);
++
++ idata[i]
++ = -0.5 + static_cast<Tfloat>(compute_index(index, unit_stride, 0)) * inv_scale;
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_interleaved(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ switch(length.size())
++ {
++ case 1:
++ impose_hermitian_symmetry_interleaved_1D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ case 2:
++ impose_hermitian_symmetry_interleaved_2D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ case 3:
++ impose_hermitian_symmetry_interleaved_3D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++}
++
++template <typename Tfloat, typename Tsize>
++static void impose_hermitian_symmetry_planar(std::vector<hostbuf>& vals,
++ const std::vector<Tsize>& length,
++ const std::vector<Tsize>& istride,
++ const Tsize idist,
++ const Tsize nbatch)
++{
++ switch(length.size())
++ {
++ case 1:
++ impose_hermitian_symmetry_planar_1D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ case 2:
++ impose_hermitian_symmetry_planar_2D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ case 3:
++ impose_hermitian_symmetry_planar_3D<Tfloat>(vals, length, istride, idist, nbatch);
++ break;
++ default:
++ throw std::runtime_error("Invalid dimension for impose_hermitian_symmetry");
++ }
++}
++
++#endif // DATA_GEN_HOST_H
+diff --git a/shared/device_properties.h b/shared/device_properties.h
+new file mode 100644
+index 0000000..6e2e1e1
+--- /dev/null
++++ b/shared/device_properties.h
+@@ -0,0 +1,74 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_DEVICE_PROPS_H
++#define ROCFFT_DEVICE_PROPS_H
++
++#include <cstdint>
++#include <hip/hip_runtime_api.h>
++#include <stdexcept>
++
++// get device properties
++static hipDeviceProp_t get_curr_device_prop()
++{
++ hipDeviceProp_t prop;
++ int deviceId = 0;
++ if(hipGetDevice(&deviceId) != hipSuccess)
++ throw std::runtime_error("hipGetDevice failed.");
++
++ if(hipGetDeviceProperties(&prop, deviceId) != hipSuccess)
++ throw std::runtime_error("hipGetDeviceProperties failed for deviceId "
++ + std::to_string(deviceId));
++
++ return prop;
++}
++
++// check that the given grid/block dims will fit into the limits in
++// the device properties. throws std::runtime_error if the limits
++// are exceeded.
++static void launch_limits_check(const std::string& kernel_name,
++ const dim3 gridDim,
++ const dim3 blockDim,
++ const hipDeviceProp_t& deviceProp)
++{
++ // Need lots of casting here because dim3 is unsigned but device
++ // props are signed. Cast direct comparisons to fix signedness
++ // issues. Promote types to 64-bit when multiplying to try to
++ // avoid overflow.
++
++ // Block limits along each dimension
++ if(blockDim.x > static_cast<uint32_t>(deviceProp.maxThreadsDim[0])
++ || blockDim.y > static_cast<uint32_t>(deviceProp.maxThreadsDim[1])
++ || blockDim.z > static_cast<uint32_t>(deviceProp.maxThreadsDim[2]))
++ throw std::runtime_error("max threads per dim exceeded: " + kernel_name);
++
++ // Total threads for the whole block
++ if(static_cast<uint64_t>(blockDim.x) * blockDim.y * blockDim.z
++ > static_cast<uint64_t>(deviceProp.maxThreadsPerBlock))
++ throw std::runtime_error("max threads per block exceeded: " + kernel_name);
++
++ // Grid dimension limits
++ if(gridDim.x > static_cast<uint32_t>(deviceProp.maxGridSize[0])
++ || gridDim.y > static_cast<uint32_t>(deviceProp.maxGridSize[1])
++ || gridDim.z > static_cast<uint32_t>(deviceProp.maxGridSize[2]))
++ throw std::runtime_error("max grid size exceeded: " + kernel_name);
++}
++
++#endif
+diff --git a/shared/enum_to_string.h b/shared/enum_to_string.h
+new file mode 100644
+index 0000000..1c2fba0
+--- /dev/null
++++ b/shared/enum_to_string.h
+@@ -0,0 +1,81 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ENUM_TO_STRING_H
++#define ENUM_TO_STRING_H
++
++#include "fft_params.h"
++
++// Return the string of the hipError code.
++static std::string hipError_to_string(const hipError_t ret)
++{
++ switch(ret)
++ {
++ case hipSuccess:
++ return "hipSuccess";
++ case hipErrorInvalidContext:
++ return "hipErrorInvalidContext";
++ case hipErrorInvalidKernelFile:
++ return "hipErrorInvalidKernelFile";
++ case hipErrorMemoryAllocation:
++ return "hipErrorMemoryAllocation";
++ case hipErrorInitializationError:
++ return "hipErrorInitializationError";
++ case hipErrorLaunchFailure:
++ return "hipErrorLaunchFailure";
++ case hipErrorLaunchOutOfResources:
++ return "hipErrorLaunchOutOfResources";
++ case hipErrorInvalidDevice:
++ return "hipErrorInvalidDevice";
++ case hipErrorInvalidValue:
++ return "hipErrorInvalidValue";
++ case hipErrorInvalidDevicePointer:
++ return "hipErrorInvalidDevicePointer";
++ case hipErrorInvalidMemcpyDirection:
++ return "hipErrorInvalidMemcpyDirection";
++ case hipErrorUnknown:
++ return "hipErrorUnknown";
++ case hipErrorInvalidResourceHandle:
++ return "hipErrorInvalidResourceHandle";
++ case hipErrorNotReady:
++ return "hipErrorNotReady";
++ case hipErrorNoDevice:
++ return "hipErrorNoDevice";
++ case hipErrorPeerAccessAlreadyEnabled:
++ return "hipErrorPeerAccessAlreadyEnabled";
++ case hipErrorPeerAccessNotEnabled:
++ return "hipErrorPeerAccessNotEnabled";
++ case hipErrorRuntimeMemory:
++ return "hipErrorRuntimeMemory";
++ case hipErrorRuntimeOther:
++ return "hipErrorRuntimeOther";
++ case hipErrorHostMemoryAlreadyRegistered:
++ return "hipErrorHostMemoryAlreadyRegistered";
++ case hipErrorHostMemoryNotRegistered:
++ return "hipErrorHostMemoryNotRegistered";
++ case hipErrorMapBufferObjectFailed:
++ return "hipErrorMapBufferObjectFailed";
++ case hipErrorTbd:
++ return "hipErrorTbd";
++ default:
++ throw std::runtime_error("unknown hipError");
++ }
++}
++#endif
+diff --git a/shared/environment.h b/shared/environment.h
+new file mode 100644
+index 0000000..7be56a0
+--- /dev/null
++++ b/shared/environment.h
+@@ -0,0 +1,97 @@
++// Copyright (C) 2021 - 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++// wrappers around environment variable routines
++
++#pragma once
++
++#include <string>
++
++// Windows provides "getenv" and "_putenv", but those modify the
++// runtime's copy of the environment. The actual environment in the
++// process control block is accessed using GetEnvironmentVariable and
++// SetEnvironmentVariable.
++
++#ifdef WIN32
++#include <windows.h>
++static void rocfft_setenv(const char* var, const char* value)
++{
++ SetEnvironmentVariable(var, value);
++}
++static void rocfft_unsetenv(const char* var)
++{
++ SetEnvironmentVariable(var, nullptr);
++}
++static std::string rocfft_getenv(const char* var)
++{
++ DWORD size = GetEnvironmentVariable(var, nullptr, 0);
++ std::string ret;
++ if(size)
++ {
++ ret.resize(size);
++ GetEnvironmentVariable(var, ret.data(), size);
++ // GetEnvironmentVariable counts the terminating null, so remove it
++ while(!ret.empty() && ret.back() == 0)
++ ret.pop_back();
++ }
++ return ret;
++}
++
++#else
++
++#include <stdlib.h>
++
++static void rocfft_setenv(const char* var, const char* value)
++{
++ setenv(var, value, 1);
++}
++static void rocfft_unsetenv(const char* var)
++{
++ unsetenv(var);
++}
++static std::string rocfft_getenv(const char* var)
++{
++ auto value = getenv(var);
++ return value ? value : "";
++}
++#endif
++
++// RAII object to set an environment variable and restore it to its
++// previous value on destruction
++struct EnvironmentSetTemp
++{
++ EnvironmentSetTemp(const char* _var, const char* val)
++ : var(_var)
++ {
++ auto val_ptr = rocfft_getenv(_var);
++ if(!val_ptr.empty())
++ oldvalue = val_ptr;
++ rocfft_setenv(_var, val);
++ }
++ ~EnvironmentSetTemp()
++ {
++ if(oldvalue.empty())
++ rocfft_unsetenv(var.c_str());
++ else
++ rocfft_setenv(var.c_str(), oldvalue.c_str());
++ }
++ std::string var;
++ std::string oldvalue;
++};
+diff --git a/shared/fft_params.h b/shared/fft_params.h
+new file mode 100644
+index 0000000..bf428ef
+--- /dev/null
++++ b/shared/fft_params.h
+@@ -0,0 +1,3274 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef FFT_PARAMS_H
++#define FFT_PARAMS_H
++
++#include <algorithm>
++#include <hip/hip_runtime.h>
++#include <iostream>
++#include <mutex>
++#include <numeric>
++#include <sstream>
++#ifdef _OPENMP
++#include <omp.h>
++#endif
++#include <random>
++#include <tuple>
++#include <unordered_set>
++#include <vector>
++
++#include "../shared/arithmetic.h"
++#include "../shared/array_validator.h"
++#include "../shared/data_gen_device.h"
++#include "../shared/data_gen_host.h"
++#include "../shared/device_properties.h"
++#include "../shared/printbuffer.h"
++#include "../shared/ptrdiff.h"
++
++enum fft_status
++{
++ fft_status_success,
++ fft_status_failure,
++ fft_status_invalid_arg_value,
++ fft_status_invalid_dimensions,
++ fft_status_invalid_array_type,
++ fft_status_invalid_strides,
++ fft_status_invalid_distance,
++ fft_status_invalid_offset,
++ fft_status_invalid_work_buffer,
++};
++
++enum fft_transform_type
++{
++ fft_transform_type_complex_forward,
++ fft_transform_type_complex_inverse,
++ fft_transform_type_real_forward,
++ fft_transform_type_real_inverse,
++};
++
++enum fft_precision
++{
++ fft_precision_half,
++ fft_precision_single,
++ fft_precision_double,
++};
++
++static std::istream& operator>>(std::istream& str, fft_precision& precision)
++{
++ std::string word;
++ str >> word;
++
++ if(word == "half")
++ precision = fft_precision_half;
++ else if(word == "single")
++ precision = fft_precision_single;
++ else if(word == "double")
++ precision = fft_precision_double;
++ else
++ throw std::runtime_error("Invalid precision specified");
++ return str;
++}
++
++// fft_input_generator: linearly spaced sequence in [-0.5,0.5]
++// fft_input_random_generator: pseudo-random sequence in [-0.5,0.5]
++enum fft_input_generator
++{
++ fft_input_random_generator_device,
++ fft_input_random_generator_host,
++ fft_input_generator_device,
++ fft_input_generator_host,
++};
++
++static std::istream& operator>>(std::istream& str, fft_input_generator& gen)
++{
++ std::string word;
++ str >> word;
++
++ if(word == "0")
++ gen = fft_input_random_generator_device;
++ else if(word == "1")
++ gen = fft_input_random_generator_host;
++ else if(word == "2")
++ gen = fft_input_generator_device;
++ else if(word == "3")
++ gen = fft_input_generator_host;
++ else
++ throw std::runtime_error("Invalid input generator specified");
++ return str;
++}
++
++enum fft_array_type
++{
++ fft_array_type_complex_interleaved,
++ fft_array_type_complex_planar,
++ fft_array_type_real,
++ fft_array_type_hermitian_interleaved,
++ fft_array_type_hermitian_planar,
++ fft_array_type_unset,
++};
++
++enum fft_result_placement
++{
++ fft_placement_inplace,
++ fft_placement_notinplace,
++};
++
++// Determine the size of the data type given the precision and type.
++template <typename Tsize>
++inline Tsize var_size(const fft_precision precision, const fft_array_type type)
++{
++ size_t var_size = 0;
++ switch(precision)
++ {
++ case fft_precision_half:
++ var_size = sizeof(_Float16);
++ break;
++ case fft_precision_single:
++ var_size = sizeof(float);
++ break;
++ case fft_precision_double:
++ var_size = sizeof(double);
++ break;
++ }
++ switch(type)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ var_size *= 2;
++ break;
++ default:
++ break;
++ }
++ return var_size;
++}
++// Given an array type and transform length, strides, etc, load random floats in [0,1]
++// into the input array of floats/doubles or complex floats/doubles gpu buffers.
++template <typename Tfloat, typename Tint1>
++inline void set_input(std::vector<gpubuf>& input,
++ const fft_input_generator igen,
++ const fft_array_type itype,
++ const std::vector<size_t>& length,
++ const std::vector<size_t>& ilength,
++ const std::vector<size_t>& istride,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch,
++ const hipDeviceProp_t& deviceProp)
++{
++ auto isize = count_iters(whole_length) * nbatch;
++
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ auto ibuffer = (rocfft_complex<Tfloat>*)input[0].data();
++
++ if(igen == fft_input_generator_device)
++ generate_interleaved_data(
++ whole_length, idist, isize, whole_stride, nbatch, ibuffer, deviceProp);
++ else if(igen == fft_input_random_generator_device)
++ generate_random_interleaved_data(
++ whole_length, idist, isize, whole_stride, ibuffer, deviceProp);
++
++ if(itype == fft_array_type_hermitian_interleaved)
++ {
++ auto ibuffer_2 = (rocfft_complex<Tfloat>*)input[0].data();
++ impose_hermitian_symmetry_interleaved(
++ length, ilength, istride, idist, nbatch, ibuffer_2, deviceProp);
++ }
++
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ {
++ auto ibuffer_real = (Tfloat*)input[0].data();
++ auto ibuffer_imag = (Tfloat*)input[1].data();
++
++ if(igen == fft_input_generator_device)
++ generate_planar_data(whole_length,
++ idist,
++ isize,
++ whole_stride,
++ nbatch,
++ ibuffer_real,
++ ibuffer_imag,
++ deviceProp);
++ else if(igen == fft_input_random_generator_device)
++ generate_random_planar_data(
++ whole_length, idist, isize, whole_stride, ibuffer_real, ibuffer_imag, deviceProp);
++
++ if(itype == fft_array_type_hermitian_planar)
++ impose_hermitian_symmetry_planar(
++ length, ilength, istride, idist, nbatch, ibuffer_real, ibuffer_imag, deviceProp);
++
++ break;
++ }
++ case fft_array_type_real:
++ {
++ auto ibuffer = (Tfloat*)input[0].data();
++
++ if(igen == fft_input_generator_device)
++ generate_real_data(
++ whole_length, idist, isize, whole_stride, nbatch, ibuffer, deviceProp);
++ else if(igen == fft_input_random_generator_device)
++ generate_random_real_data(
++ whole_length, idist, isize, whole_stride, ibuffer, deviceProp);
++
++ break;
++ }
++ default:
++ throw std::runtime_error("Input layout format not yet supported");
++ }
++}
++
++template <typename Tfloat, typename Tint1>
++inline void set_input(std::vector<hostbuf>& input,
++ const fft_input_generator igen,
++ const fft_array_type itype,
++ const std::vector<size_t>& length,
++ const std::vector<size_t>& ilength,
++ const std::vector<size_t>& istride,
++ const Tint1& whole_length,
++ const Tint1& whole_stride,
++ const size_t idist,
++ const size_t nbatch,
++ const hipDeviceProp_t& deviceProp)
++{
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ if(igen == fft_input_generator_host)
++ generate_interleaved_data<Tfloat>(input, whole_length, whole_stride, idist, nbatch);
++ else if(igen == fft_input_random_generator_host)
++ generate_random_interleaved_data<Tfloat>(
++ input, whole_length, whole_stride, idist, nbatch);
++
++ if(itype == fft_array_type_hermitian_interleaved)
++ impose_hermitian_symmetry_interleaved<Tfloat>(input, length, istride, idist, nbatch);
++
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ {
++ if(igen == fft_input_generator_host)
++ generate_planar_data<Tfloat>(input, whole_length, whole_stride, idist, nbatch);
++ else if(igen == fft_input_random_generator_host)
++ generate_random_planar_data<Tfloat>(input, whole_length, whole_stride, idist, nbatch);
++
++ if(itype == fft_array_type_hermitian_planar)
++ impose_hermitian_symmetry_planar<Tfloat>(input, length, istride, idist, nbatch);
++
++ break;
++ }
++ case fft_array_type_real:
++ {
++ if(igen == fft_input_generator_host)
++ generate_real_data<Tfloat>(input, whole_length, whole_stride, idist, nbatch);
++ else if(igen == fft_input_random_generator_host)
++ generate_random_real_data<Tfloat>(input, whole_length, whole_stride, idist, nbatch);
++
++ break;
++ }
++ default:
++ throw std::runtime_error("Input layout format not yet supported");
++ }
++}
++
++// unroll set_input for dimension 1, 2, 3
++template <typename Tbuff, typename Tfloat>
++inline void set_input(std::vector<Tbuff>& input,
++ const fft_input_generator igen,
++ const fft_array_type itype,
++ const std::vector<size_t>& length,
++ const std::vector<size_t>& ilength,
++ const std::vector<size_t>& istride,
++ const size_t idist,
++ const size_t nbatch,
++ const hipDeviceProp_t& deviceProp)
++{
++ switch(length.size())
++ {
++ case 1:
++ set_input<Tfloat>(input,
++ igen,
++ itype,
++ length,
++ ilength,
++ istride,
++ ilength[0],
++ istride[0],
++ idist,
++ nbatch,
++ deviceProp);
++ break;
++ case 2:
++ set_input<Tfloat>(input,
++ igen,
++ itype,
++ length,
++ ilength,
++ istride,
++ std::make_tuple(ilength[0], ilength[1]),
++ std::make_tuple(istride[0], istride[1]),
++ idist,
++ nbatch,
++ deviceProp);
++ break;
++ case 3:
++ set_input<Tfloat>(input,
++ igen,
++ itype,
++ length,
++ ilength,
++ istride,
++ std::make_tuple(ilength[0], ilength[1], ilength[2]),
++ std::make_tuple(istride[0], istride[1], istride[2]),
++ idist,
++ nbatch,
++ deviceProp);
++ break;
++ default:
++ abort();
++ }
++}
++
++// Container class for test parameters.
++class fft_params
++{
++public:
++ // All parameters are row-major.
++ std::vector<size_t> length;
++ std::vector<size_t> istride;
++ std::vector<size_t> ostride;
++ size_t nbatch = 1;
++ fft_precision precision = fft_precision_single;
++ fft_input_generator igen = fft_input_random_generator_device;
++ fft_transform_type transform_type = fft_transform_type_complex_forward;
++ fft_result_placement placement = fft_placement_inplace;
++ size_t idist = 0;
++ size_t odist = 0;
++ fft_array_type itype = fft_array_type_unset;
++ fft_array_type otype = fft_array_type_unset;
++ std::vector<size_t> ioffset = {0, 0};
++ std::vector<size_t> ooffset = {0, 0};
++
++ std::vector<size_t> isize;
++ std::vector<size_t> osize;
++
++ size_t workbuffersize = 0;
++
++ struct fft_brick
++ {
++ // all vectors here are row-major, with same length as FFT
++ // dimension + 1 (for batch dimension)
++
++ // inclusive lower bound of brick
++ std::vector<size_t> lower;
++ // exclusive upper bound of brick
++ std::vector<size_t> upper;
++ // stride of brick in memory
++ std::vector<size_t> stride;
++
++ // compute the length of this brick
++ std::vector<size_t> length() const
++ {
++ std::vector<size_t> ret;
++ for(size_t i = 0; i < lower.size(); ++i)
++ ret.push_back(upper[i] - lower[i]);
++ return ret;
++ }
++
++ // compute offset of lower bound in a field with the given
++ // stride + dist (batch stride is separate)
++ size_t lower_field_offset(std::vector<size_t> stride, size_t dist) const
++ {
++ // brick strides include batch, so adjust our input accordingly
++ stride.insert(stride.begin(), dist);
++
++ return std::inner_product(lower.begin(), lower.end(), stride.begin(), 0);
++ }
++
++ // location of the brick
++ int device = 0;
++ };
++
++ struct fft_field
++ {
++ std::vector<fft_brick> bricks;
++ };
++ // optional brick decomposition of inputs/outputs
++ std::vector<fft_field> ifields;
++ std::vector<fft_field> ofields;
++
++ // run testing load/store callbacks
++ bool run_callbacks = false;
++ static constexpr double load_cb_scalar = 0.457813941;
++ static constexpr double store_cb_scalar = 0.391504938;
++
++ // Check that data outside of output strides is not overwritten.
++ // This is only set explicitly on some tests where there's space
++ // between dimensions, but the dimensions are still in-order.
++ // We're not trying to generically find holes in arbitrary data
++ // layouts.
++ //
++ // NOTE: this flag is not included in tokens, since it doesn't
++ // affect how the FFT library behaves.
++ bool check_output_strides = false;
++
++ // scaling factor - we do a pointwise multiplication of outputs by
++ // this factor
++ double scale_factor = 1.0;
++
++ fft_params(){};
++ virtual ~fft_params(){};
++
++ // Given an array type, return the name as a string.
++ static std::string array_type_name(const fft_array_type type, bool verbose = true)
++ {
++ switch(type)
++ {
++ case fft_array_type_complex_interleaved:
++ return verbose ? "fft_array_type_complex_interleaved" : "CI";
++ case fft_array_type_complex_planar:
++ return verbose ? "fft_array_type_complex_planar" : "CP";
++ case fft_array_type_real:
++ return verbose ? "fft_array_type_real" : "R";
++ case fft_array_type_hermitian_interleaved:
++ return verbose ? "fft_array_type_hermitian_interleaved" : "HI";
++ case fft_array_type_hermitian_planar:
++ return verbose ? "fft_array_type_hermitian_planar" : "HP";
++ case fft_array_type_unset:
++ return verbose ? "fft_array_type_unset" : "UN";
++ }
++ return "";
++ }
++
++ std::string transform_type_name() const
++ {
++ switch(transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ return "fft_transform_type_complex_forward";
++ case fft_transform_type_complex_inverse:
++ return "fft_transform_type_complex_inverse";
++ case fft_transform_type_real_forward:
++ return "fft_transform_type_real_forward";
++ case fft_transform_type_real_inverse:
++ return "fft_transform_type_real_inverse";
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ }
++
++ // Convert to string for output.
++ std::string str(const std::string& separator = ", ") const
++ {
++ // top-level stride/dist are not used when fields are specified.
++ const bool have_ifields = !ifields.empty();
++ const bool have_ofields = !ofields.empty();
++
++ std::stringstream ss;
++ auto print_size_vec = [&](const char* description, const std::vector<size_t>& vec) {
++ ss << description << ":";
++ for(auto i : vec)
++ ss << " " << i;
++ ss << separator;
++ };
++ auto print_fields = [&](const char* description, const std::vector<fft_field>& fields) {
++ for(unsigned int fidx = 0; fidx < fields.size(); ++fidx)
++ {
++ const auto& f = fields[fidx];
++ ss << description << " " << fidx << ":" << separator;
++ for(unsigned int bidx = 0; bidx < f.bricks.size(); ++bidx)
++ {
++ const auto& b = f.bricks[bidx];
++ ss << " brick " << bidx << ":" << separator;
++ print_size_vec(" lower", b.lower);
++ print_size_vec(" upper", b.upper);
++ print_size_vec(" stride", b.stride);
++ ss << " device: " << b.device << separator;
++ }
++ }
++ };
++
++ print_size_vec("length", length);
++ if(have_ifields)
++ {
++ print_fields("ifield", ifields);
++ }
++ else
++ {
++ print_size_vec("istride", istride);
++ ss << "idist: " << idist << separator;
++ }
++
++ if(have_ofields)
++ {
++ print_fields("ofield", ofields);
++ }
++ else
++ {
++ print_size_vec("ostride", ostride);
++ ss << "odist: " << odist << separator;
++ }
++
++ ss << "batch: " << nbatch << separator;
++ print_size_vec("isize", isize);
++ print_size_vec("osize", osize);
++
++ print_size_vec("ioffset", ioffset);
++ print_size_vec("ooffset", ooffset);
++
++ if(placement == fft_placement_inplace)
++ ss << "in-place";
++ else
++ ss << "out-of-place";
++ ss << separator;
++ ss << "transform_type: " << transform_type_name() << separator;
++ ss << array_type_name(itype) << " -> " << array_type_name(otype) << separator;
++ switch(precision)
++ {
++ case fft_precision_half:
++ ss << "half-precision";
++ break;
++ case fft_precision_single:
++ ss << "single-precision";
++ break;
++ case fft_precision_double:
++ ss << "double-precision";
++ break;
++ }
++ ss << separator;
++
++ print_size_vec("ilength", ilength());
++ print_size_vec("olength", olength());
++
++ print_size_vec("ibuffer_size", ibuffer_sizes());
++ print_size_vec("obuffer_size", obuffer_sizes());
++
++ if(scale_factor != 1.0)
++ ss << "scale factor: " << scale_factor << separator;
++
++ return ss.str();
++ }
++
++ // Produce a stringified token of the test fft params.
++ std::string token() const
++ {
++ std::string ret;
++
++ switch(transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ ret += "complex_forward_";
++ break;
++ case fft_transform_type_complex_inverse:
++ ret += "complex_inverse_";
++ break;
++ case fft_transform_type_real_forward:
++ ret += "real_forward_";
++ break;
++ case fft_transform_type_real_inverse:
++ ret += "real_inverse_";
++ break;
++ }
++
++ auto append_size_vec = [&ret](const std::vector<size_t>& vec) {
++ for(auto s : vec)
++ {
++ ret += "_";
++ ret += std::to_string(s);
++ }
++ };
++
++ ret += "len";
++ append_size_vec(length);
++
++ switch(precision)
++ {
++ case fft_precision_half:
++ ret += "_half_";
++ break;
++ case fft_precision_single:
++ ret += "_single_";
++ break;
++ case fft_precision_double:
++ ret += "_double_";
++ break;
++ }
++
++ switch(placement)
++ {
++ case fft_placement_inplace:
++ ret += "ip_";
++ break;
++ case fft_placement_notinplace:
++ ret += "op_";
++ break;
++ }
++
++ ret += "batch_";
++ ret += std::to_string(nbatch);
++
++ auto append_array_type = [&ret](fft_array_type type) {
++ switch(type)
++ {
++ case fft_array_type_complex_interleaved:
++ ret += "CI";
++ break;
++ case fft_array_type_complex_planar:
++ ret += "CP";
++ break;
++ case fft_array_type_real:
++ ret += "R";
++ break;
++ case fft_array_type_hermitian_interleaved:
++ ret += "HI";
++ break;
++ case fft_array_type_hermitian_planar:
++ ret += "HP";
++ break;
++ default:
++ ret += "UN";
++ break;
++ }
++ };
++
++ auto append_brick_info = [&ret, &append_size_vec](const fft_brick& b) {
++ ret += "_brick";
++
++ ret += "_lower";
++ append_size_vec(b.lower);
++ ret += "_upper";
++ append_size_vec(b.upper);
++ ret += "_stride";
++ append_size_vec(b.stride);
++ ret += "_dev_";
++ ret += std::to_string(b.device);
++ };
++
++ const bool have_ifields = !ifields.empty();
++ const bool have_ofields = !ofields.empty();
++
++ if(have_ifields)
++ {
++ for(const auto& f : ifields)
++ {
++ ret += "_ifield";
++ for(const auto& b : f.bricks)
++ append_brick_info(b);
++ }
++ }
++ else
++ {
++ ret += "_istride";
++ append_size_vec(istride);
++ ret += "_";
++ append_array_type(itype);
++ }
++
++ if(have_ofields)
++ {
++ for(const auto& f : ofields)
++ {
++ ret += "_ofield";
++ for(const auto& b : f.bricks)
++ append_brick_info(b);
++ }
++ }
++ else
++ {
++ ret += "_ostride";
++ append_size_vec(ostride);
++ ret += "_";
++ append_array_type(otype);
++ }
++
++ if(!have_ifields)
++ {
++ ret += "_idist_";
++ ret += std::to_string(idist);
++ }
++ if(!have_ofields)
++ {
++ ret += "_odist_";
++ ret += std::to_string(odist);
++ }
++
++ if(!have_ifields)
++ {
++ ret += "_ioffset";
++ append_size_vec(ioffset);
++ }
++
++ if(!have_ofields)
++ {
++ ret += "_ooffset";
++ append_size_vec(ooffset);
++ }
++
++ if(run_callbacks)
++ ret += "_CB";
++
++ if(scale_factor != 1.0)
++ ret += "_scale";
++
++ return ret;
++ }
++
++ // Set all params from a stringified token.
++ void from_token(std::string token)
++ {
++ std::vector<std::string> vals;
++
++ std::string delimiter = "_";
++ {
++ size_t pos = 0;
++ while((pos = token.find(delimiter)) != std::string::npos)
++ {
++ auto val = token.substr(0, pos);
++ vals.push_back(val);
++ token.erase(0, pos + delimiter.length());
++ }
++ vals.push_back(token);
++ }
++
++ auto size_parser
++ = [](const std::vector<std::string>& vals, const std::string token, size_t& pos) {
++ if(vals[pos++] != token)
++ throw std::runtime_error("Unable to parse token");
++ return std::stoull(vals[pos++]);
++ };
++
++ auto vector_parser
++ = [](const std::vector<std::string>& vals, const std::string token, size_t& pos) {
++ if(vals[pos++] != token)
++ throw std::runtime_error("Unable to parse token");
++ std::vector<size_t> vec;
++
++ while(pos < vals.size())
++ {
++ if(std::all_of(vals[pos].begin(), vals[pos].end(), ::isdigit))
++ {
++ vec.push_back(std::stoull(vals[pos++]));
++ }
++ else
++ {
++ break;
++ }
++ }
++ return vec;
++ };
++
++ auto type_parser = [](const std::string& val) {
++ if(val == "CI")
++ return fft_array_type_complex_interleaved;
++ else if(val == "CP")
++ return fft_array_type_complex_planar;
++ else if(val == "R")
++ return fft_array_type_real;
++ else if(val == "HI")
++ return fft_array_type_hermitian_interleaved;
++ else if(val == "HP")
++ return fft_array_type_hermitian_planar;
++ return fft_array_type_unset;
++ };
++
++ auto field_parser = [&vector_parser, &size_parser](const std::vector<std::string>& vals,
++ size_t& pos,
++ std::vector<fft_field>& output) {
++ // skip over ifield/ofield word
++ pos++;
++ fft_field& f = output.emplace_back();
++ while(pos < vals.size() && vals[pos] == "brick")
++ {
++ fft_brick& b = f.bricks.emplace_back();
++ pos++;
++ b.lower = vector_parser(vals, "lower", pos);
++ b.upper = vector_parser(vals, "upper", pos);
++ b.stride = vector_parser(vals, "stride", pos);
++ b.device = size_parser(vals, "dev", pos);
++ }
++ };
++
++ size_t pos = 0;
++
++ bool complex = vals[pos++] == "complex";
++ bool forward = vals[pos++] == "forward";
++
++ if(complex && forward)
++ transform_type = fft_transform_type_complex_forward;
++ if(complex && !forward)
++ transform_type = fft_transform_type_complex_inverse;
++ if(!complex && forward)
++ transform_type = fft_transform_type_real_forward;
++ if(!complex && !forward)
++ transform_type = fft_transform_type_real_inverse;
++
++ length = vector_parser(vals, "len", pos);
++
++ if(vals[pos] == "half")
++ precision = fft_precision_half;
++ else if(vals[pos] == "single")
++ precision = fft_precision_single;
++ else if(vals[pos] == "double")
++ precision = fft_precision_double;
++ pos++;
++
++ placement = (vals[pos++] == "ip") ? fft_placement_inplace : fft_placement_notinplace;
++
++ nbatch = size_parser(vals, "batch", pos);
++
++ // strides, bricks etc are mixed in from here, so just keep
++ // looking at the next token to decide what to do
++ while(pos < vals.size())
++ {
++ const auto& next_token = vals[pos];
++ if(next_token == "istride")
++ {
++ istride = vector_parser(vals, "istride", pos);
++ itype = type_parser(vals[pos]);
++ pos++;
++ }
++ else if(next_token == "ostride")
++ {
++ ostride = vector_parser(vals, "ostride", pos);
++ otype = type_parser(vals[pos]);
++ pos++;
++ }
++ else if(next_token == "idist")
++ idist = size_parser(vals, "idist", pos);
++ else if(next_token == "odist")
++ odist = size_parser(vals, "odist", pos);
++ else if(next_token == "ioffset")
++ ioffset = vector_parser(vals, "ioffset", pos);
++ else if(next_token == "ooffset")
++ ooffset = vector_parser(vals, "ooffset", pos);
++ else if(next_token == "ifield")
++ field_parser(vals, pos, ifields);
++ else if(next_token == "ofield")
++ field_parser(vals, pos, ofields);
++ else
++ break;
++ }
++
++ if(pos < vals.size() && vals[pos] == "CB")
++ {
++ run_callbacks = true;
++ ++pos;
++ }
++
++ if(pos < vals.size() && vals[pos] == "scale")
++ {
++ // just pick some factor that's not zero or one
++ scale_factor = 0.1239;
++ ++pos;
++ }
++ }
++
++ // Stream output operator (for gtest, etc).
++ friend std::ostream& operator<<(std::ostream& stream, const fft_params& params)
++ {
++ stream << params.str();
++ return stream;
++ }
++
++ // Dimension of the transform.
++ size_t dim() const
++ {
++ return length.size();
++ }
++
++ virtual std::vector<size_t> ilength() const
++ {
++ auto ilength = length;
++ if(transform_type == fft_transform_type_real_inverse)
++ ilength[dim() - 1] = ilength[dim() - 1] / 2 + 1;
++ return ilength;
++ }
++
++ virtual std::vector<size_t> olength() const
++ {
++ auto olength = length;
++ if(transform_type == fft_transform_type_real_forward)
++ olength[dim() - 1] = olength[dim() - 1] / 2 + 1;
++ return olength;
++ }
++
++ static size_t nbuffer(const fft_array_type type)
++ {
++ switch(type)
++ {
++ case fft_array_type_real:
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ return 1;
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ return 2;
++ case fft_array_type_unset:
++ return 0;
++ }
++ return 0;
++ }
++
++ // Number of input buffers
++ size_t nibuffer() const
++ {
++ return nbuffer(itype);
++ }
++
++ // Number of output buffers
++ size_t nobuffer() const
++ {
++ return nbuffer(otype);
++ }
++
++ void set_iotypes()
++ {
++ if(itype == fft_array_type_unset)
++ {
++ switch(transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ itype = fft_array_type_complex_interleaved;
++ break;
++ case fft_transform_type_real_forward:
++ itype = fft_array_type_real;
++ break;
++ case fft_transform_type_real_inverse:
++ itype = fft_array_type_hermitian_interleaved;
++ break;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ }
++ if(otype == fft_array_type_unset)
++ {
++ switch(transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ otype = fft_array_type_complex_interleaved;
++ break;
++ case fft_transform_type_real_forward:
++ otype = fft_array_type_hermitian_interleaved;
++ break;
++ case fft_transform_type_real_inverse:
++ otype = fft_array_type_real;
++ break;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ }
++ }
++
++ // Check that the input and output types are consistent.
++ bool check_iotypes() const
++ {
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_interleaved:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ break;
++ default:
++ throw std::runtime_error("Invalid Input array type format");
++ }
++
++ switch(otype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_interleaved:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ break;
++ default:
++ throw std::runtime_error("Invalid Input array type format");
++ }
++
++ // Check that format choices are supported
++ if(transform_type != fft_transform_type_real_forward
++ && transform_type != fft_transform_type_real_inverse)
++ {
++ if(placement == fft_placement_inplace && itype != otype)
++ {
++ throw std::runtime_error(
++ "In-place transforms must have identical input and output types");
++ }
++ }
++
++ bool okformat = true;
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_complex_planar:
++ okformat = (otype == fft_array_type_complex_interleaved
++ || otype == fft_array_type_complex_planar);
++ break;
++ case fft_array_type_hermitian_interleaved:
++ case fft_array_type_hermitian_planar:
++ okformat = otype == fft_array_type_real;
++ break;
++ case fft_array_type_real:
++ okformat = (otype == fft_array_type_hermitian_interleaved
++ || otype == fft_array_type_hermitian_planar);
++ break;
++ default:
++ throw std::runtime_error("Invalid Input array type format");
++ }
++
++ return okformat;
++ }
++
++ // Given a length vector, set the rest of the strides.
++ // The optional argument stride0 sets the stride for the contiguous dimension.
++ // The optional rcpadding argument sets the stride correctly for in-place
++ // multi-dimensional real/complex transforms.
++ // Format is row-major.
++ template <typename T1>
++ std::vector<T1> compute_stride(const std::vector<T1>& length,
++ const std::vector<size_t>& stride0 = std::vector<size_t>(),
++ const bool rcpadding = false) const
++ {
++ std::vector<T1> stride(dim());
++
++ size_t dimoffset = 0;
++
++ if(stride0.size() == 0)
++ {
++ // Set the contiguous stride:
++ stride[dim() - 1] = 1;
++ dimoffset = 1;
++ }
++ else
++ {
++ // Copy the input values to the end of the stride array:
++ for(size_t i = 0; i < stride0.size(); ++i)
++ {
++ stride[dim() - stride0.size() + i] = stride0[i];
++ }
++ }
++
++ if(stride0.size() < dim())
++ {
++ // Compute any remaining values via recursion.
++ for(size_t i = dim() - dimoffset - stride0.size(); i-- > 0;)
++ {
++ auto lengthip1 = length[i + 1];
++ if(rcpadding && i == dim() - 2)
++ {
++ lengthip1 = 2 * (lengthip1 / 2 + 1);
++ }
++ stride[i] = stride[i + 1] * lengthip1;
++ }
++ }
++
++ return stride;
++ }
++
++ void compute_istride()
++ {
++ istride = compute_stride(ilength(),
++ istride,
++ placement == fft_placement_inplace
++ && transform_type == fft_transform_type_real_forward);
++ }
++
++ void compute_ostride()
++ {
++ ostride = compute_stride(olength(),
++ ostride,
++ placement == fft_placement_inplace
++ && transform_type == fft_transform_type_real_inverse);
++ }
++
++ virtual void compute_isize()
++ {
++ auto il = ilength();
++ size_t val = compute_ptrdiff(il, istride, nbatch, idist);
++ isize.resize(nibuffer());
++ for(unsigned int i = 0; i < isize.size(); ++i)
++ {
++ isize[i] = val + ioffset[i];
++ }
++ }
++
++ virtual void compute_osize()
++ {
++ auto ol = olength();
++ size_t val = compute_ptrdiff(ol, ostride, nbatch, odist);
++ osize.resize(nobuffer());
++ for(unsigned int i = 0; i < osize.size(); ++i)
++ {
++ osize[i] = val + ooffset[i];
++ }
++ }
++
++ std::vector<size_t> ibuffer_sizes() const
++ {
++ std::vector<size_t> ibuffer_sizes;
++
++ // In-place real-to-complex transforms need to have enough space in the input buffer to
++ // accomadate the output, which is slightly larger.
++ if(placement == fft_placement_inplace && transform_type == fft_transform_type_real_forward)
++ {
++ return obuffer_sizes();
++ }
++
++ if(isize.empty())
++ return ibuffer_sizes;
++
++ switch(itype)
++ {
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ ibuffer_sizes.resize(2);
++ break;
++ default:
++ ibuffer_sizes.resize(1);
++ }
++ for(unsigned i = 0; i < ibuffer_sizes.size(); i++)
++ {
++ ibuffer_sizes[i] = isize[i] * var_size<size_t>(precision, itype);
++ }
++ return ibuffer_sizes;
++ }
++
++ virtual std::vector<size_t> obuffer_sizes() const
++ {
++ std::vector<size_t> obuffer_sizes;
++
++ if(osize.empty())
++ return obuffer_sizes;
++
++ switch(otype)
++ {
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ obuffer_sizes.resize(2);
++ break;
++ default:
++ obuffer_sizes.resize(1);
++ }
++ for(unsigned i = 0; i < obuffer_sizes.size(); i++)
++ {
++ obuffer_sizes[i] = osize[i] * var_size<size_t>(precision, otype);
++ }
++ return obuffer_sizes;
++ }
++
++ // Compute the idist for a given transform based on the placeness, transform type, and data
++ // layout.
++ size_t compute_idist() const
++ {
++ size_t dist = 0;
++ // In-place 1D transforms need extra dist.
++ if(transform_type == fft_transform_type_real_forward && dim() == 1
++ && placement == fft_placement_inplace)
++ {
++ dist = 2 * (length[0] / 2 + 1) * istride[0];
++ return dist;
++ }
++
++ if(transform_type == fft_transform_type_real_inverse && dim() == 1)
++ {
++ dist = (length[0] / 2 + 1) * istride[0];
++ return dist;
++ }
++
++ dist = (transform_type == fft_transform_type_real_inverse)
++ ? (length[dim() - 1] / 2 + 1) * istride[dim() - 1]
++ : length[dim() - 1] * istride[dim() - 1];
++ for(unsigned int i = 0; i < dim() - 1; ++i)
++ {
++ dist = std::max(length[i] * istride[i], dist);
++ }
++ return dist;
++ }
++ void set_idist()
++ {
++ if(idist != 0)
++ return;
++ idist = compute_idist();
++ }
++
++ // Compute the odist for a given transform based on the placeness, transform type, and data
++ // layout. Row-major.
++ size_t compute_odist() const
++ {
++ size_t dist = 0;
++ // In-place 1D transforms need extra dist.
++ if(transform_type == fft_transform_type_real_inverse && dim() == 1
++ && placement == fft_placement_inplace)
++ {
++ dist = 2 * (length[0] / 2 + 1) * ostride[0];
++ return dist;
++ }
++
++ if(transform_type == fft_transform_type_real_forward && dim() == 1)
++ {
++ dist = (length[0] / 2 + 1) * ostride[0];
++ return dist;
++ }
++
++ dist = (transform_type == fft_transform_type_real_forward)
++ ? (length[dim() - 1] / 2 + 1) * ostride[dim() - 1]
++ : length[dim() - 1] * ostride[dim() - 1];
++ for(unsigned int i = 0; i < dim() - 1; ++i)
++ {
++ dist = std::max(length[i] * ostride[i], dist);
++ }
++ return dist;
++ }
++ void set_odist()
++ {
++ if(odist != 0)
++ return;
++ odist = compute_odist();
++ }
++
++ // Put the length, stride, batch, and dist into a single length/stride array and pass off to the
++ // validity checker.
++ bool valid_length_stride_batch_dist(const std::vector<size_t>& l0,
++ const std::vector<size_t>& s0,
++ const size_t n,
++ const size_t dist,
++ const int verbose = 0) const
++ {
++ if(l0.size() != s0.size())
++ return false;
++
++ // Length and stride vectors, including bathes:
++ std::vector<size_t> l{}, s{};
++ for(unsigned int i = 0; i < l0.size(); ++i)
++ {
++ if(l0[i] > 1)
++ {
++ if(s0[i] == 0)
++ return false;
++ l.push_back(l0[i]);
++ s.push_back(s0[i]);
++ }
++ }
++ if(n > 1)
++ {
++ if(dist == 0)
++ return false;
++ l.push_back(n);
++ s.push_back(dist);
++ }
++
++ return array_valid(l, s, verbose);
++ }
++
++ // Return true if the given GPU parameters would produce a valid transform.
++ bool valid(const int verbose) const
++ {
++ if(ioffset.size() < nibuffer() || ooffset.size() < nobuffer())
++ return false;
++
++ // Check that in-place transforms have the same input and output stride:
++ if(placement == fft_placement_inplace)
++ {
++ const auto stridesize = std::min(istride.size(), ostride.size());
++ bool samestride = true;
++ for(unsigned int i = 0; i < stridesize; ++i)
++ {
++ if(istride[i] != ostride[i])
++ samestride = false;
++ }
++ if((transform_type == fft_transform_type_complex_forward
++ || transform_type == fft_transform_type_complex_inverse)
++ && !samestride)
++ {
++ // In-place transforms require identical input and output strides.
++ if(verbose)
++ {
++ std::cout << "istride:";
++ for(const auto& i : istride)
++ std::cout << " " << i;
++ std::cout << " ostride0:";
++ for(const auto& i : ostride)
++ std::cout << " " << i;
++ std::cout << " differ; skipped for in-place transforms: skipping test"
++ << std::endl;
++ }
++ return false;
++ }
++
++ if((transform_type == fft_transform_type_complex_forward
++ || transform_type == fft_transform_type_complex_inverse)
++ && (idist != odist) && nbatch > 1)
++ {
++ // In-place transforms require identical distance, if
++ // batch > 1. If batch is 1 then dist is ignored and
++ // the FFT should still work.
++ if(verbose)
++ {
++ std::cout << "idist:" << idist << " odist:" << odist
++ << " differ; skipped for in-place transforms: skipping test"
++ << std::endl;
++ }
++ return false;
++ }
++
++ if((transform_type == fft_transform_type_real_forward
++ || transform_type == fft_transform_type_real_inverse)
++ && (istride.back() != 1 || ostride.back() != 1))
++ {
++ // In-place real/complex transforms require unit strides.
++ if(verbose)
++ {
++ std::cout
++ << "istride.back(): " << istride.back()
++ << " ostride.back(): " << ostride.back()
++ << " must be unitary for in-place real/complex transforms: skipping test"
++ << std::endl;
++ }
++ return false;
++ }
++
++ if((itype == fft_array_type_complex_interleaved
++ && otype == fft_array_type_complex_planar)
++ || (itype == fft_array_type_complex_planar
++ && otype == fft_array_type_complex_interleaved))
++ {
++ if(verbose)
++ {
++ std::cout << "In-place c2c transforms require identical io types; skipped.\n";
++ }
++ return false;
++ }
++
++ // Check offsets
++ switch(transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ for(unsigned int i = 0; i < nibuffer(); ++i)
++ {
++ if(ioffset[i] != ooffset[i])
++ return false;
++ }
++ break;
++ case fft_transform_type_real_forward:
++ if(ioffset[0] != 2 * ooffset[0])
++ return false;
++ break;
++ case fft_transform_type_real_inverse:
++ if(2 * ioffset[0] != ooffset[0])
++ return false;
++ break;
++ }
++ }
++
++ if(!check_iotypes())
++ return false;
++
++ // we can only check output strides on out-of-place
++ // transforms, since we need to initialize output to a known
++ // pattern
++ if(placement == fft_placement_inplace && check_output_strides)
++ return false;
++
++ // Check input and output strides
++ if(valid_length_stride_batch_dist(ilength(), istride, nbatch, idist, verbose) != true)
++ {
++ if(verbose)
++ std::cout << "Invalid input data format.\n";
++ return false;
++ }
++ if(!(ilength() == olength() && istride == ostride && idist == odist))
++ {
++ // Only check if different
++ if(valid_length_stride_batch_dist(olength(), ostride, nbatch, odist, verbose) != true)
++ {
++ if(verbose)
++ std::cout << "Invalid output data format.\n";
++ return false;
++ }
++ }
++
++ // The parameters are valid.
++ return true;
++ }
++
++ // Fill in any missing parameters.
++ void validate()
++ {
++ set_iotypes();
++ compute_istride();
++ compute_ostride();
++ set_idist();
++ set_odist();
++ compute_isize();
++ compute_osize();
++
++ validate_fields();
++ }
++
++ virtual void validate_fields() const
++ {
++ if(!ifields.empty() || !ofields.empty())
++ throw std::runtime_error("input/output fields are unsupported");
++ }
++
++ // Column-major getters:
++ std::vector<size_t> length_cm() const
++ {
++ auto length_cm = length;
++ std::reverse(std::begin(length_cm), std::end(length_cm));
++ return length_cm;
++ }
++ std::vector<size_t> ilength_cm() const
++ {
++ auto ilength_cm = ilength();
++ std::reverse(std::begin(ilength_cm), std::end(ilength_cm));
++ return ilength_cm;
++ }
++ std::vector<size_t> olength_cm() const
++ {
++ auto olength_cm = olength();
++ std::reverse(std::begin(olength_cm), std::end(olength_cm));
++ return olength_cm;
++ }
++ std::vector<size_t> istride_cm() const
++ {
++ auto istride_cm = istride;
++ std::reverse(std::begin(istride_cm), std::end(istride_cm));
++ return istride_cm;
++ }
++ std::vector<size_t> ostride_cm() const
++ {
++ auto ostride_cm = ostride;
++ std::reverse(std::begin(ostride_cm), std::end(ostride_cm));
++ return ostride_cm;
++ }
++ bool is_planar() const
++ {
++ if(itype == fft_array_type_complex_planar || itype == fft_array_type_hermitian_planar)
++ return true;
++ if(otype == fft_array_type_complex_planar || otype == fft_array_type_hermitian_planar)
++ return true;
++ return false;
++ }
++
++ // Given a data type and dimensions, fill the buffer, imposing Hermitian symmetry if necessary.
++ template <typename Tbuff>
++ inline void compute_input(std::vector<Tbuff>& input)
++ {
++ auto deviceProp = get_curr_device_prop();
++
++ switch(precision)
++ {
++ case fft_precision_half:
++ set_input<Tbuff, _Float16>(
++ input, igen, itype, length, ilength(), istride, idist, nbatch, deviceProp);
++ break;
++ case fft_precision_double:
++ set_input<Tbuff, double>(
++ input, igen, itype, length, ilength(), istride, idist, nbatch, deviceProp);
++ break;
++ case fft_precision_single:
++ set_input<Tbuff, float>(
++ input, igen, itype, length, ilength(), istride, idist, nbatch, deviceProp);
++ break;
++ }
++ }
++
++ template <typename Tstream = std::ostream>
++ void print_ibuffer(const std::vector<hostbuf>& buf, Tstream& stream = std::cout) const
++ {
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<rocfft_complex<_Float16>> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<rocfft_complex<float>> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ case fft_precision_double:
++ {
++ buffer_printer<rocfft_complex<double>> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ }
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<_Float16> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<float> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ case fft_precision_double:
++ {
++ buffer_printer<double> s;
++ s.print_buffer(buf, ilength(), istride, nbatch, idist, ioffset);
++ break;
++ }
++ }
++ break;
++ }
++ default:
++ throw std::runtime_error("Invalid itype in print_ibuffer");
++ }
++ }
++
++ template <typename Tstream = std::ostream>
++ void print_obuffer(const std::vector<hostbuf>& buf, Tstream& stream = std::cout) const
++ {
++ switch(otype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<rocfft_complex<_Float16>> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<rocfft_complex<float>> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ case fft_precision_double:
++ buffer_printer<rocfft_complex<double>> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<_Float16> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<float> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ case fft_precision_double:
++ {
++ buffer_printer<double> s;
++ s.print_buffer(buf, olength(), ostride, nbatch, odist, ooffset);
++ break;
++ }
++ }
++ break;
++ }
++
++ default:
++ throw std::runtime_error("Invalid itype in print_obuffer");
++ }
++ }
++
++ void print_ibuffer_flat(const std::vector<hostbuf>& buf) const
++ {
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<rocfft_complex<_Float16>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<rocfft_complex<float>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_double:
++ buffer_printer<rocfft_complex<double>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<_Float16> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<float> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_double:
++ {
++ buffer_printer<double> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid itype in print_ibuffer_flat");
++ }
++ }
++ }
++
++ void print_obuffer_flat(const std::vector<hostbuf>& buf) const
++ {
++ switch(otype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<rocfft_complex<_Float16>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<rocfft_complex<float>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_double:
++ buffer_printer<rocfft_complex<double>> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ break;
++ }
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ case fft_array_type_real:
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ {
++ buffer_printer<_Float16> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ case fft_precision_single:
++ {
++ buffer_printer<float> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++
++ case fft_precision_double:
++ {
++ buffer_printer<double> s;
++ s.print_buffer_flat(buf, osize, ooffset);
++ break;
++ }
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid itype in print_ibuffer_flat");
++ }
++ }
++ }
++
++ virtual fft_status set_callbacks(void* load_cb_host,
++ void* load_cb_data,
++ void* store_cb_host,
++ void* store_cb_data)
++ {
++ return fft_status_success;
++ }
++
++ virtual fft_status execute(void** in, void** out)
++ {
++ return fft_status_success;
++ };
++
++ size_t fft_params_vram_footprint()
++ {
++ return fft_params::vram_footprint();
++ }
++
++ virtual size_t vram_footprint()
++ {
++ const auto ibuf_size = ibuffer_sizes();
++ size_t val = std::accumulate(ibuf_size.begin(), ibuf_size.end(), (size_t)1);
++ if(placement == fft_placement_notinplace)
++ {
++ const auto obuf_size = obuffer_sizes();
++ val += std::accumulate(obuf_size.begin(), obuf_size.end(), (size_t)1);
++ }
++ return val;
++ }
++
++ // Specific exception type for work buffer allocation failure.
++ // Tests that hit this can't fit on the GPU and should be skipped.
++ struct work_buffer_alloc_failure : public std::runtime_error
++ {
++ work_buffer_alloc_failure(const std::string& s)
++ : std::runtime_error(s)
++ {
++ }
++ };
++
++ virtual fft_status create_plan()
++ {
++ return fft_status_success;
++ }
++
++ // Change a forward transform to it's inverse
++ void inverse_from_forward(fft_params& params_forward)
++ {
++ switch(params_forward.transform_type)
++ {
++ case fft_transform_type_complex_forward:
++ transform_type = fft_transform_type_complex_inverse;
++ break;
++ case fft_transform_type_real_forward:
++ transform_type = fft_transform_type_real_inverse;
++ break;
++ default:
++ throw std::runtime_error("Transform type not forward.");
++ }
++
++ length = params_forward.length;
++ istride = params_forward.ostride;
++ ostride = params_forward.istride;
++ nbatch = params_forward.nbatch;
++ precision = params_forward.precision;
++ placement = params_forward.placement;
++ idist = params_forward.odist;
++ odist = params_forward.idist;
++ itype = params_forward.otype;
++ otype = params_forward.itype;
++ ioffset = params_forward.ooffset;
++ ooffset = params_forward.ioffset;
++
++ run_callbacks = params_forward.run_callbacks;
++
++ check_output_strides = params_forward.check_output_strides;
++
++ scale_factor = 1 / params_forward.scale_factor;
++ }
++
++ // prepare for multi-GPU transform. Generated input is in ibuffer.
++ // pibuffer, pobuffer are the pointers that will be passed to the
++ // FFT library's "execute" API.
++ virtual void multi_gpu_prepare(std::vector<gpubuf>& ibuffer,
++ std::vector<void*>& pibuffer,
++ std::vector<void*>& pobuffer)
++ {
++ }
++
++ // finalize multi-GPU transform. pobuffers are the pointers
++ // provided to the FFT library's "execute" API. obuffer is the
++ // buffer where transform output needs to go for validation
++ virtual void multi_gpu_finalize(std::vector<gpubuf>& obuffer, std::vector<void*>& pobuffer) {}
++
++ // create bricks in the specified field for the specified number
++ // of devices. The field is split along the highest FFT
++ // dimension, and the length only includes FFT lengths, not batch
++ // dimension.
++ void distribute_field(int deviceCount,
++ std::vector<fft_field>& fields,
++ const std::vector<size_t>& field_length)
++ {
++ size_t slowLen = field_length.front();
++ if(slowLen < static_cast<size_t>(deviceCount))
++ throw std::runtime_error("too many devices to distribute length "
++ + std::to_string(slowLen));
++
++ auto& field = fields.emplace_back();
++
++ for(int i = 0; i < deviceCount; ++i)
++ {
++ // start at origin
++ std::vector<size_t> field_lower(field_length.size());
++ std::vector<size_t> field_upper(field_length.size());
++
++ // note: slowest FFT dim is index 0 in these coordinates
++ field_lower[0] = slowLen / deviceCount * i;
++
++ // last brick needs to include the whole slow len
++ if(i == deviceCount - 1)
++ {
++ field_upper[0] = slowLen;
++ }
++ else
++ {
++ field_upper[0] = std::min(slowLen, field_lower[0] + slowLen / deviceCount);
++ }
++
++ for(unsigned int upperDim = 1; upperDim < field_length.size(); ++upperDim)
++ {
++ field_upper[upperDim] = field_length[upperDim];
++ }
++
++ // field coordinates also need to include batch
++ field_lower.insert(field_lower.begin(), 0);
++ field_upper.insert(field_upper.begin(), nbatch);
++
++ // bricks have contiguous strides
++ size_t brick_dist = 1;
++ std::vector<size_t> brick_stride(field_lower.size());
++ for(size_t distIdx = 0; distIdx < field_lower.size(); ++distIdx)
++ {
++ // fill strides from fastest to slowest
++ *(brick_stride.rbegin() + distIdx) = brick_dist;
++ brick_dist *= *(field_upper.rbegin() + distIdx) - *(field_lower.rbegin() + distIdx);
++ }
++ field.bricks.push_back(
++ fft_params::fft_brick{field_lower, field_upper, brick_stride, i});
++ }
++ }
++
++ void distribute_input(int deviceCount)
++ {
++ distribute_field(deviceCount, ifields, length);
++ }
++
++ void distribute_output(int deviceCount)
++ {
++ distribute_field(deviceCount, ofields, olength());
++ }
++};
++
++// This is used with the program_options class so that the user can type an integer on the
++// command line and we store into an enum varaible
++template <typename _Elem, typename _Traits>
++std::basic_istream<_Elem, _Traits>& operator>>(std::basic_istream<_Elem, _Traits>& stream,
++ fft_array_type& atype)
++{
++ unsigned tmp;
++ stream >> tmp;
++ atype = fft_array_type(tmp);
++ return stream;
++}
++
++// similarly for transform type
++template <typename _Elem, typename _Traits>
++std::basic_istream<_Elem, _Traits>& operator>>(std::basic_istream<_Elem, _Traits>& stream,
++ fft_transform_type& ttype)
++{
++ unsigned tmp;
++ stream >> tmp;
++ ttype = fft_transform_type(tmp);
++ return stream;
++}
++
++// Returns pairs of startindex, endindex, for 1D, 2D, 3D lengths
++template <typename T1>
++std::vector<std::pair<T1, T1>> partition_colmajor(const T1& length)
++{
++ return partition_base(length, compute_partition_count(length));
++}
++
++// Partition on the rightmost part of the tuple, for col-major indexing
++template <typename T1>
++std::vector<std::pair<std::tuple<T1, T1>, std::tuple<T1, T1>>>
++ partition_colmajor(const std::tuple<T1, T1>& length)
++{
++ auto partitions = partition_base(std::get<1>(length), compute_partition_count(length));
++ std::vector<std::pair<std::tuple<T1, T1>, std::tuple<T1, T1>>> ret(partitions.size());
++ for(size_t i = 0; i < partitions.size(); ++i)
++ {
++ std::get<1>(ret[i].first) = partitions[i].first;
++ std::get<0>(ret[i].first) = 0;
++ std::get<1>(ret[i].second) = partitions[i].second;
++ std::get<0>(ret[i].second) = std::get<0>(length);
++ }
++ return ret;
++}
++template <typename T1>
++std::vector<std::pair<std::tuple<T1, T1, T1>, std::tuple<T1, T1, T1>>>
++ partition_colmajor(const std::tuple<T1, T1, T1>& length)
++{
++ auto partitions = partition_base(std::get<2>(length), compute_partition_count(length));
++ std::vector<std::pair<std::tuple<T1, T1, T1>, std::tuple<T1, T1, T1>>> ret(partitions.size());
++ for(size_t i = 0; i < partitions.size(); ++i)
++ {
++ std::get<2>(ret[i].first) = partitions[i].first;
++ std::get<1>(ret[i].first) = 0;
++ std::get<0>(ret[i].first) = 0;
++ std::get<2>(ret[i].second) = partitions[i].second;
++ std::get<1>(ret[i].second) = std::get<1>(length);
++ std::get<0>(ret[i].second) = std::get<0>(length);
++ }
++ return ret;
++}
++
++// Copy data of dimensions length with strides istride and length idist between batches to
++// a buffer with strides ostride and length odist between batches. The input and output
++// types are identical.
++template <typename Tval, typename Tint1, typename Tint2, typename Tint3>
++inline void copy_buffers_1to1(const Tval* input,
++ Tval* output,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const Tint2& istride,
++ const size_t idist,
++ const Tint3& ostride,
++ const size_t odist,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset)
++{
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for num_threads(partitions.size())
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ output[odx + ooffset[0]] = input[idx + ioffset[0]];
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++// Copy data of dimensions length with strides istride and length idist between batches to
++// a buffer with strides ostride and length odist between batches. The input type is
++// planar and the output type is complex interleaved.
++template <typename Tval, typename Tint1, typename Tint2, typename Tint3>
++inline void copy_buffers_2to1(const Tval* input0,
++ const Tval* input1,
++ rocfft_complex<Tval>* output,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const Tint2& istride,
++ const size_t idist,
++ const Tint3& ostride,
++ const size_t odist,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset)
++{
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for num_threads(partitions.size())
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ output[odx + ooffset[0]]
++ = rocfft_complex<Tval>(input0[idx + ioffset[0]], input1[idx + ioffset[1]]);
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++// Copy data of dimensions length with strides istride and length idist between batches to
++// a buffer with strides ostride and length odist between batches. The input type is
++// complex interleaved and the output type is planar.
++template <typename Tval, typename Tint1, typename Tint2, typename Tint3>
++inline void copy_buffers_1to2(const rocfft_complex<Tval>* input,
++ Tval* output0,
++ Tval* output1,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const Tint2& istride,
++ const size_t idist,
++ const Tint3& ostride,
++ const size_t odist,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset)
++{
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for num_threads(partitions.size())
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ output0[odx + ooffset[0]] = input[idx + ioffset[0]].real();
++ output1[odx + ooffset[1]] = input[idx + ioffset[0]].imag();
++ } while(increment_rowmajor(index, length));
++ }
++ }
++}
++
++// Copy data of dimensions length with strides istride and length idist between batches to
++// a buffer with strides ostride and length odist between batches. The input type given
++// by itype, and the output type is given by otype.
++template <typename Tint1, typename Tint2, typename Tint3>
++inline void copy_buffers(const std::vector<hostbuf>& input,
++ std::vector<hostbuf>& output,
++ const Tint1& length,
++ const size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type itype,
++ const Tint2& istride,
++ const size_t idist,
++ const fft_array_type otype,
++ const Tint3& ostride,
++ const size_t odist,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset)
++{
++ if(itype == otype)
++ {
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ switch(precision)
++ {
++ case fft_precision_half:
++ copy_buffers_1to1(
++ reinterpret_cast<const rocfft_complex<_Float16>*>(input[0].data()),
++ reinterpret_cast<rocfft_complex<_Float16>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_single:
++ copy_buffers_1to1(reinterpret_cast<const rocfft_complex<float>*>(input[0].data()),
++ reinterpret_cast<rocfft_complex<float>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_double:
++ copy_buffers_1to1(reinterpret_cast<const rocfft_complex<double>*>(input[0].data()),
++ reinterpret_cast<rocfft_complex<double>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ }
++ break;
++ case fft_array_type_real:
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ for(unsigned int idx = 0; idx < input.size(); ++idx)
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ copy_buffers_1to1(reinterpret_cast<const _Float16*>(input[idx].data()),
++ reinterpret_cast<_Float16*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_single:
++ copy_buffers_1to1(reinterpret_cast<const float*>(input[idx].data()),
++ reinterpret_cast<float*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_double:
++ copy_buffers_1to1(reinterpret_cast<const double*>(input[idx].data()),
++ reinterpret_cast<double*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ }
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid data type");
++ }
++ }
++ else if((itype == fft_array_type_complex_interleaved && otype == fft_array_type_complex_planar)
++ || (itype == fft_array_type_hermitian_interleaved
++ && otype == fft_array_type_hermitian_planar))
++ {
++ // copy 1to2
++ switch(precision)
++ {
++ case fft_precision_half:
++ copy_buffers_1to2(reinterpret_cast<const rocfft_complex<_Float16>*>(input[0].data()),
++ reinterpret_cast<_Float16*>(output[0].data()),
++ reinterpret_cast<_Float16*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_single:
++ copy_buffers_1to2(reinterpret_cast<const rocfft_complex<float>*>(input[0].data()),
++ reinterpret_cast<float*>(output[0].data()),
++ reinterpret_cast<float*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_double:
++ copy_buffers_1to2(reinterpret_cast<const rocfft_complex<double>*>(input[0].data()),
++ reinterpret_cast<double*>(output[0].data()),
++ reinterpret_cast<double*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ }
++ }
++ else if((itype == fft_array_type_complex_planar && otype == fft_array_type_complex_interleaved)
++ || (itype == fft_array_type_hermitian_planar
++ && otype == fft_array_type_hermitian_interleaved))
++ {
++ // copy 2 to 1
++ switch(precision)
++ {
++ case fft_precision_half:
++ copy_buffers_2to1(reinterpret_cast<const _Float16*>(input[0].data()),
++ reinterpret_cast<const _Float16*>(input[1].data()),
++ reinterpret_cast<rocfft_complex<_Float16>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_single:
++ copy_buffers_2to1(reinterpret_cast<const float*>(input[0].data()),
++ reinterpret_cast<const float*>(input[1].data()),
++ reinterpret_cast<rocfft_complex<float>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ case fft_precision_double:
++ copy_buffers_2to1(reinterpret_cast<const double*>(input[0].data()),
++ reinterpret_cast<const double*>(input[1].data()),
++ reinterpret_cast<rocfft_complex<double>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ ioffset,
++ ooffset);
++ break;
++ }
++ }
++ else
++ {
++ throw std::runtime_error("Invalid input and output types.");
++ }
++}
++
++// unroll arbitrary-dimension copy_buffers into specializations for 1-, 2-, 3-dimensions
++template <typename Tint1, typename Tint2, typename Tint3>
++inline void copy_buffers(const std::vector<hostbuf>& input,
++ std::vector<hostbuf>& output,
++ const std::vector<Tint1>& length,
++ const size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type itype,
++ const std::vector<Tint2>& istride,
++ const size_t idist,
++ const fft_array_type otype,
++ const std::vector<Tint3>& ostride,
++ const size_t odist,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset)
++{
++ switch(length.size())
++ {
++ case 1:
++ return copy_buffers(input,
++ output,
++ length[0],
++ nbatch,
++ precision,
++ itype,
++ istride[0],
++ idist,
++ otype,
++ ostride[0],
++ odist,
++ ioffset,
++ ooffset);
++ case 2:
++ return copy_buffers(input,
++ output,
++ std::make_tuple(length[0], length[1]),
++ nbatch,
++ precision,
++ itype,
++ std::make_tuple(istride[0], istride[1]),
++ idist,
++ otype,
++ std::make_tuple(ostride[0], ostride[1]),
++ odist,
++ ioffset,
++ ooffset);
++ case 3:
++ return copy_buffers(input,
++ output,
++ std::make_tuple(length[0], length[1], length[2]),
++ nbatch,
++ precision,
++ itype,
++ std::make_tuple(istride[0], istride[1], istride[2]),
++ idist,
++ otype,
++ std::make_tuple(ostride[0], ostride[1], ostride[2]),
++ odist,
++ ioffset,
++ ooffset);
++ default:
++ abort();
++ }
++}
++
++// Compute the L-infinity and L-2 distance between two buffers with strides istride and
++// length idist between batches to a buffer with strides ostride and length odist between
++// batches. Both buffers are of complex type.
++
++struct VectorNorms
++{
++ double l_2 = 0.0, l_inf = 0.0;
++};
++
++template <typename Tcomplex, typename Tint1, typename Tint2, typename Tint3>
++inline VectorNorms distance_1to1_complex(const Tcomplex* input,
++ const Tcomplex* output,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const Tint2& istride,
++ const size_t idist,
++ const Tint3& ostride,
++ const size_t odist,
++ std::vector<std::pair<size_t, size_t>>* linf_failures,
++ const double linf_cutoff,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset,
++ const double output_scalar = 1.0)
++{
++ double linf = 0.0;
++ double l2 = 0.0;
++
++ std::mutex linf_failure_lock;
++ std::vector<std::pair<size_t, size_t>> linf_failures_private;
++
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_colmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for reduction(max : linf) reduction(+ : l2) num_threads(partitions.size()) private(linf_failures_private)
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ double cur_linf = 0.0;
++ double cur_l2 = 0.0;
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ const double rdiff
++ = std::abs(static_cast<double>(output[odx + ooffset[0]].real()) * output_scalar
++ - static_cast<double>(input[idx + ioffset[0]].real()));
++ cur_linf = std::max(rdiff, cur_linf);
++ if(cur_linf > linf_cutoff)
++ {
++ std::pair<size_t, size_t> fval(b, idx);
++ if(linf_failures)
++ linf_failures_private.push_back(fval);
++ }
++ cur_l2 += rdiff * rdiff;
++
++ const double idiff
++ = std::abs(static_cast<double>(output[odx + ooffset[0]].imag()) * output_scalar
++ - static_cast<double>(input[idx + ioffset[0]].imag()));
++ cur_linf = std::max(idiff, cur_linf);
++ if(cur_linf > linf_cutoff)
++ {
++ std::pair<size_t, size_t> fval(b, idx);
++ if(linf_failures)
++ linf_failures_private.push_back(fval);
++ }
++ cur_l2 += idiff * idiff;
++
++ } while(increment_rowmajor(index, length));
++ linf = std::max(linf, cur_linf);
++ l2 += cur_l2;
++
++ if(linf_failures)
++ {
++ linf_failure_lock.lock();
++ std::copy(linf_failures_private.begin(),
++ linf_failures_private.end(),
++ std::back_inserter(*linf_failures));
++ linf_failure_lock.unlock();
++ }
++ }
++ }
++ return {.l_2 = sqrt(l2), .l_inf = linf};
++}
++
++// Compute the L-infinity and L-2 distance between two buffers with strides istride and
++// length idist between batches to a buffer with strides ostride and length odist between
++// batches. Both buffers are of real type.
++template <typename Tfloat, typename Tint1, typename Tint2, typename Tint3>
++inline VectorNorms distance_1to1_real(const Tfloat* input,
++ const Tfloat* output,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const Tint2& istride,
++ const size_t idist,
++ const Tint3& ostride,
++ const size_t odist,
++ std::vector<std::pair<size_t, size_t>>* linf_failures,
++ const double linf_cutoff,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset,
++ const double output_scalar = 1.0)
++{
++ double linf = 0.0;
++ double l2 = 0.0;
++
++ std::mutex linf_failure_lock;
++ std::vector<std::pair<size_t, size_t>> linf_failures_private;
++
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for reduction(max : linf) reduction(+ : l2) num_threads(partitions.size()) private(linf_failures_private)
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ double cur_linf = 0.0;
++ double cur_l2 = 0.0;
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ const double diff
++ = std::abs(static_cast<double>(output[odx + ooffset[0]]) * output_scalar
++ - static_cast<double>(input[idx + ioffset[0]]));
++ cur_linf = std::max(diff, cur_linf);
++ if(cur_linf > linf_cutoff)
++ {
++ std::pair<size_t, size_t> fval(b, idx);
++ if(linf_failures)
++ linf_failures_private.push_back(fval);
++ }
++ cur_l2 += diff * diff;
++
++ } while(increment_rowmajor(index, length));
++ linf = std::max(linf, cur_linf);
++ l2 += cur_l2;
++
++ if(linf_failures)
++ {
++ linf_failure_lock.lock();
++ std::copy(linf_failures_private.begin(),
++ linf_failures_private.end(),
++ std::back_inserter(*linf_failures));
++ linf_failure_lock.unlock();
++ }
++ }
++ }
++ return {.l_2 = sqrt(l2), .l_inf = linf};
++}
++
++// Compute the L-infinity and L-2 distance between two buffers with strides istride and
++// length idist between batches to a buffer with strides ostride and length odist between
++// batches. input is complex-interleaved, output is complex-planar.
++template <typename Tval, typename Tint1, typename T2, typename T3>
++inline VectorNorms distance_1to2(const rocfft_complex<Tval>* input,
++ const Tval* output0,
++ const Tval* output1,
++ const Tint1& whole_length,
++ const size_t nbatch,
++ const T2& istride,
++ const size_t idist,
++ const T3& ostride,
++ const size_t odist,
++ std::vector<std::pair<size_t, size_t>>* linf_failures,
++ const double linf_cutoff,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset,
++ const double output_scalar = 1.0)
++{
++ double linf = 0.0;
++ double l2 = 0.0;
++
++ std::mutex linf_failure_lock;
++ std::vector<std::pair<size_t, size_t>> linf_failures_private;
++
++ const bool idx_equals_odx = istride == ostride && idist == odist;
++ size_t idx_base = 0;
++ size_t odx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist, odx_base += odist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for reduction(max : linf) reduction(+ : l2) num_threads(partitions.size()) private(linf_failures_private)
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ double cur_linf = 0.0;
++ double cur_l2 = 0.0;
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const auto odx = idx_equals_odx ? idx : compute_index(index, ostride, odx_base);
++ const double rdiff
++ = std::abs(static_cast<double>(output0[odx + ooffset[0]]) * output_scalar
++ - static_cast<double>(input[idx + ioffset[0]].real()));
++ cur_linf = std::max(rdiff, cur_linf);
++ if(cur_linf > linf_cutoff)
++ {
++ std::pair<size_t, size_t> fval(b, idx);
++ if(linf_failures)
++ linf_failures_private.push_back(fval);
++ }
++ cur_l2 += rdiff * rdiff;
++
++ const double idiff
++ = std::abs(static_cast<double>(output1[odx + ooffset[1]]) * output_scalar
++ - static_cast<double>(input[idx + ioffset[0]].imag()));
++ cur_linf = std::max(idiff, cur_linf);
++ if(cur_linf > linf_cutoff)
++ {
++ std::pair<size_t, size_t> fval(b, idx);
++ if(linf_failures)
++ linf_failures_private.push_back(fval);
++ }
++ cur_l2 += idiff * idiff;
++
++ } while(increment_rowmajor(index, length));
++ linf = std::max(linf, cur_linf);
++ l2 += cur_l2;
++
++ if(linf_failures)
++ {
++ linf_failure_lock.lock();
++ std::copy(linf_failures_private.begin(),
++ linf_failures_private.end(),
++ std::back_inserter(*linf_failures));
++ linf_failure_lock.unlock();
++ }
++ }
++ }
++ return {.l_2 = sqrt(l2), .l_inf = linf};
++}
++
++// Compute the L-inifnity and L-2 distance between two buffers of dimension length and
++// with types given by itype, otype, and precision.
++template <typename Tint1, typename Tint2, typename Tint3>
++inline VectorNorms distance(const std::vector<hostbuf>& input,
++ const std::vector<hostbuf>& output,
++ const Tint1& length,
++ const size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type itype,
++ const Tint2& istride,
++ const size_t idist,
++ const fft_array_type otype,
++ const Tint3& ostride,
++ const size_t odist,
++ std::vector<std::pair<size_t, size_t>>* linf_failures,
++ const double linf_cutoff,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset,
++ const double output_scalar = 1.0)
++{
++ VectorNorms dist;
++
++ if(itype == otype)
++ {
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ switch(precision)
++ {
++ case fft_precision_half:
++ dist = distance_1to1_complex(
++ reinterpret_cast<const rocfft_complex<_Float16>*>(input[0].data()),
++ reinterpret_cast<const rocfft_complex<_Float16>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_single:
++ dist = distance_1to1_complex(
++ reinterpret_cast<const rocfft_complex<float>*>(input[0].data()),
++ reinterpret_cast<const rocfft_complex<float>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_double:
++ dist = distance_1to1_complex(
++ reinterpret_cast<const rocfft_complex<double>*>(input[0].data()),
++ reinterpret_cast<const rocfft_complex<double>*>(output[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ }
++ dist.l_2 *= dist.l_2;
++ break;
++ case fft_array_type_real:
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ for(unsigned int idx = 0; idx < input.size(); ++idx)
++ {
++ VectorNorms d;
++ switch(precision)
++ {
++ case fft_precision_half:
++ d = distance_1to1_real(reinterpret_cast<const _Float16*>(input[idx].data()),
++ reinterpret_cast<const _Float16*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_single:
++ d = distance_1to1_real(reinterpret_cast<const float*>(input[idx].data()),
++ reinterpret_cast<const float*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_double:
++ d = distance_1to1_real(reinterpret_cast<const double*>(input[idx].data()),
++ reinterpret_cast<const double*>(output[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ }
++ dist.l_inf = std::max(d.l_inf, dist.l_inf);
++ dist.l_2 += d.l_2 * d.l_2;
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid input and output types.");
++ }
++ }
++ else if((itype == fft_array_type_complex_interleaved && otype == fft_array_type_complex_planar)
++ || (itype == fft_array_type_hermitian_interleaved
++ && otype == fft_array_type_hermitian_planar))
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ dist = distance_1to2(reinterpret_cast<const rocfft_complex<_Float16>*>(input[0].data()),
++ reinterpret_cast<const _Float16*>(output[0].data()),
++ reinterpret_cast<const _Float16*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_single:
++ dist = distance_1to2(reinterpret_cast<const rocfft_complex<float>*>(input[0].data()),
++ reinterpret_cast<const float*>(output[0].data()),
++ reinterpret_cast<const float*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_double:
++ dist = distance_1to2(reinterpret_cast<const rocfft_complex<double>*>(input[0].data()),
++ reinterpret_cast<const double*>(output[0].data()),
++ reinterpret_cast<const double*>(output[1].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ ostride,
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ }
++ dist.l_2 *= dist.l_2;
++ }
++ else if((itype == fft_array_type_complex_planar && otype == fft_array_type_complex_interleaved)
++ || (itype == fft_array_type_hermitian_planar
++ && otype == fft_array_type_hermitian_interleaved))
++ {
++ switch(precision)
++ {
++ case fft_precision_half:
++ dist
++ = distance_1to2(reinterpret_cast<const rocfft_complex<_Float16>*>(output[0].data()),
++ reinterpret_cast<const _Float16*>(input[0].data()),
++ reinterpret_cast<const _Float16*>(input[1].data()),
++ length,
++ nbatch,
++ ostride,
++ odist,
++ istride,
++ idist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_single:
++ dist = distance_1to2(reinterpret_cast<const rocfft_complex<float>*>(output[0].data()),
++ reinterpret_cast<const float*>(input[0].data()),
++ reinterpret_cast<const float*>(input[1].data()),
++ length,
++ nbatch,
++ ostride,
++ odist,
++ istride,
++ idist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ case fft_precision_double:
++ dist = distance_1to2(reinterpret_cast<const rocfft_complex<double>*>(output[0].data()),
++ reinterpret_cast<const double*>(input[0].data()),
++ reinterpret_cast<const double*>(input[1].data()),
++ length,
++ nbatch,
++ ostride,
++ odist,
++ istride,
++ idist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ break;
++ }
++ dist.l_2 *= dist.l_2;
++ }
++ else
++ {
++ throw std::runtime_error("Invalid input and output types.");
++ }
++ dist.l_2 = sqrt(dist.l_2);
++ return dist;
++}
++
++// check if the specified length + stride/dist is contiguous
++template <typename Tint1, typename Tint2>
++bool is_contiguous_rowmajor(const std::vector<Tint1>& length,
++ const std::vector<Tint2>& stride,
++ size_t dist)
++{
++ size_t expected_stride = 1;
++ auto stride_it = stride.rbegin();
++ auto length_it = length.rbegin();
++ for(; stride_it != stride.rend() && length_it != length.rend(); ++stride_it, ++length_it)
++ {
++ if(*stride_it != expected_stride)
++ return false;
++ expected_stride *= *length_it;
++ }
++ return expected_stride == dist;
++}
++
++// Unroll arbitrary-dimension distance into specializations for 1-, 2-, 3-dimensions
++template <typename Tint1, typename Tint2, typename Tint3>
++inline VectorNorms distance(const std::vector<hostbuf>& input,
++ const std::vector<hostbuf>& output,
++ std::vector<Tint1> length,
++ size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type itype,
++ std::vector<Tint2> istride,
++ const size_t idist,
++ const fft_array_type otype,
++ std::vector<Tint3> ostride,
++ const size_t odist,
++ std::vector<std::pair<size_t, size_t>>* linf_failures,
++ const double linf_cutoff,
++ const std::vector<size_t>& ioffset,
++ const std::vector<size_t>& ooffset,
++ const double output_scalar = 1.0)
++{
++ // If istride and ostride are both contiguous, collapse them down
++ // to one dimension. Index calculation is simpler (and faster)
++ // in the 1D case.
++ if(is_contiguous_rowmajor(length, istride, idist)
++ && is_contiguous_rowmajor(length, ostride, odist))
++ {
++ length = {product(length.begin(), length.end()) * nbatch};
++ istride = {static_cast<Tint2>(1)};
++ ostride = {static_cast<Tint3>(1)};
++ nbatch = 1;
++ }
++
++ switch(length.size())
++ {
++ case 1:
++ return distance(input,
++ output,
++ length[0],
++ nbatch,
++ precision,
++ itype,
++ istride[0],
++ idist,
++ otype,
++ ostride[0],
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ case 2:
++ return distance(input,
++ output,
++ std::make_tuple(length[0], length[1]),
++ nbatch,
++ precision,
++ itype,
++ std::make_tuple(istride[0], istride[1]),
++ idist,
++ otype,
++ std::make_tuple(ostride[0], ostride[1]),
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ case 3:
++ return distance(input,
++ output,
++ std::make_tuple(length[0], length[1], length[2]),
++ nbatch,
++ precision,
++ itype,
++ std::make_tuple(istride[0], istride[1], istride[2]),
++ idist,
++ otype,
++ std::make_tuple(ostride[0], ostride[1], ostride[2]),
++ odist,
++ linf_failures,
++ linf_cutoff,
++ ioffset,
++ ooffset,
++ output_scalar);
++ default:
++ abort();
++ }
++}
++
++// Compute the L-infinity and L-2 norm of a buffer with strides istride and
++// length idist. Data is rocfft_complex.
++template <typename Tcomplex, typename T1, typename T2>
++inline VectorNorms norm_complex(const Tcomplex* input,
++ const T1& whole_length,
++ const size_t nbatch,
++ const T2& istride,
++ const size_t idist,
++ const std::vector<size_t>& offset)
++{
++ double linf = 0.0;
++ double l2 = 0.0;
++
++ size_t idx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for reduction(max : linf) reduction(+ : l2) num_threads(partitions.size())
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ double cur_linf = 0.0;
++ double cur_l2 = 0.0;
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++
++ const double rval = std::abs(static_cast<double>(input[idx + offset[0]].real()));
++ cur_linf = std::max(rval, cur_linf);
++ cur_l2 += rval * rval;
++
++ const double ival = std::abs(static_cast<double>(input[idx + offset[0]].imag()));
++ cur_linf = std::max(ival, cur_linf);
++ cur_l2 += ival * ival;
++
++ } while(increment_rowmajor(index, length));
++ linf = std::max(linf, cur_linf);
++ l2 += cur_l2;
++ }
++ }
++ return {.l_2 = sqrt(l2), .l_inf = linf};
++}
++
++// Compute the L-infinity and L-2 norm of abuffer with strides istride and
++// length idist. Data is real-valued.
++template <typename Tfloat, typename T1, typename T2>
++inline VectorNorms norm_real(const Tfloat* input,
++ const T1& whole_length,
++ const size_t nbatch,
++ const T2& istride,
++ const size_t idist,
++ const std::vector<size_t>& offset)
++{
++ double linf = 0.0;
++ double l2 = 0.0;
++
++ size_t idx_base = 0;
++ auto partitions = partition_rowmajor(whole_length);
++ for(size_t b = 0; b < nbatch; b++, idx_base += idist)
++ {
++#ifdef _OPENMP
++#pragma omp parallel for reduction(max : linf) reduction(+ : l2) num_threads(partitions.size())
++#endif
++ for(size_t part = 0; part < partitions.size(); ++part)
++ {
++ double cur_linf = 0.0;
++ double cur_l2 = 0.0;
++ auto index = partitions[part].first;
++ const auto length = partitions[part].second;
++ do
++ {
++ const auto idx = compute_index(index, istride, idx_base);
++ const double val = std::abs(static_cast<double>(input[idx + offset[0]]));
++ cur_linf = std::max(val, cur_linf);
++ cur_l2 += val * val;
++
++ } while(increment_rowmajor(index, length));
++ linf = std::max(linf, cur_linf);
++ l2 += cur_l2;
++ }
++ }
++ return {.l_2 = sqrt(l2), .l_inf = linf};
++}
++
++// Compute the L-infinity and L-2 norm of abuffer with strides istride and
++// length idist. Data format is given by precision and itype.
++template <typename T1, typename T2>
++inline VectorNorms norm(const std::vector<hostbuf>& input,
++ const T1& length,
++ const size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type itype,
++ const T2& istride,
++ const size_t idist,
++ const std::vector<size_t>& offset)
++{
++ VectorNorms norm;
++
++ switch(itype)
++ {
++ case fft_array_type_complex_interleaved:
++ case fft_array_type_hermitian_interleaved:
++ switch(precision)
++ {
++ case fft_precision_half:
++ norm = norm_complex(reinterpret_cast<const rocfft_complex<_Float16>*>(input[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ case fft_precision_single:
++ norm = norm_complex(reinterpret_cast<const rocfft_complex<float>*>(input[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ case fft_precision_double:
++ norm = norm_complex(reinterpret_cast<const rocfft_complex<double>*>(input[0].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ }
++ norm.l_2 *= norm.l_2;
++ break;
++ case fft_array_type_real:
++ case fft_array_type_complex_planar:
++ case fft_array_type_hermitian_planar:
++ for(unsigned int idx = 0; idx < input.size(); ++idx)
++ {
++ VectorNorms n;
++ switch(precision)
++ {
++ case fft_precision_half:
++ n = norm_real(reinterpret_cast<const _Float16*>(input[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ case fft_precision_single:
++ n = norm_real(reinterpret_cast<const float*>(input[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ case fft_precision_double:
++ n = norm_real(reinterpret_cast<const double*>(input[idx].data()),
++ length,
++ nbatch,
++ istride,
++ idist,
++ offset);
++ break;
++ }
++ norm.l_inf = std::max(n.l_inf, norm.l_inf);
++ norm.l_2 += n.l_2 * n.l_2;
++ }
++ break;
++ default:
++ throw std::runtime_error("Invalid data type");
++ }
++
++ norm.l_2 = sqrt(norm.l_2);
++ return norm;
++}
++
++// Unroll arbitrary-dimension norm into specializations for 1-, 2-, 3-dimensions
++template <typename T1, typename T2>
++inline VectorNorms norm(const std::vector<hostbuf>& input,
++ std::vector<T1> length,
++ size_t nbatch,
++ const fft_precision precision,
++ const fft_array_type type,
++ std::vector<T2> stride,
++ const size_t dist,
++ const std::vector<size_t>& offset)
++{
++ // If stride is contiguous, collapse it down to one dimension.
++ // Index calculation is simpler (and faster) in the 1D case.
++ if(is_contiguous_rowmajor(length, stride, dist))
++ {
++ length = {product(length.begin(), length.end()) * nbatch};
++ stride = {static_cast<T2>(1)};
++ nbatch = 1;
++ }
++
++ switch(length.size())
++ {
++ case 1:
++ return norm(input, length[0], nbatch, precision, type, stride[0], dist, offset);
++ case 2:
++ return norm(input,
++ std::make_tuple(length[0], length[1]),
++ nbatch,
++ precision,
++ type,
++ std::make_tuple(stride[0], stride[1]),
++ dist,
++ offset);
++ case 3:
++ return norm(input,
++ std::make_tuple(length[0], length[1], length[2]),
++ nbatch,
++ precision,
++ type,
++ std::make_tuple(stride[0], stride[1], stride[2]),
++ dist,
++ offset);
++ default:
++ abort();
++ }
++}
++
++// Given a data type and precision, the distance between batches, and
++// the batch size, allocate the required host buffer(s).
++static std::vector<hostbuf> allocate_host_buffer(const fft_precision precision,
++ const fft_array_type type,
++ const std::vector<size_t>& size)
++{
++ std::vector<hostbuf> buffers(size.size());
++ for(unsigned int i = 0; i < size.size(); ++i)
++ {
++ buffers[i].alloc(size[i] * var_size<size_t>(precision, type));
++ }
++ return buffers;
++}
++
++// Check if the required buffers fit in the device vram.
++inline bool vram_fits_problem(const size_t prob_size, const size_t vram_avail, int deviceId = 0)
++{
++ // We keep a small margin of error for fitting the problem into vram:
++ const size_t extra = 1 << 27;
++
++ return vram_avail > prob_size + extra;
++}
++
++// Computes the twiddle table VRAM footprint for r2c/c2r transforms.
++// This function will return 0 for the other transform types, since
++// the VRAM footprint in rocFFT is negligible for the other cases.
++inline size_t twiddle_table_vram_footprint(const fft_params& params)
++{
++ size_t vram_footprint = 0;
++
++ // Add vram footprint from real/complex even twiddle buffer size.
++ if(params.transform_type == fft_transform_type_real_forward
++ || params.transform_type == fft_transform_type_real_inverse)
++ {
++ const auto realdim = params.length.back();
++ if(realdim % 2 == 0)
++ {
++ const auto complex_size = params.precision == fft_precision_single ? 8 : 16;
++ // even length twiddle size is 1/4 of the real size, but
++ // in complex elements
++ vram_footprint += realdim * complex_size / 4;
++ }
++ }
++
++ return vram_footprint;
++}
++
++#endif
+diff --git a/shared/fftw_transform.h b/shared/fftw_transform.h
+new file mode 100644
+index 0000000..873a373
+--- /dev/null
++++ b/shared/fftw_transform.h
+@@ -0,0 +1,493 @@
++// Copyright (C) 2016 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++#ifndef FFTWTRANSFORM_H
++#define FFTWTRANSFORM_H
++
++#include "hostbuf.h"
++#include "rocfft_complex.h"
++#include "test_params.h"
++#include <fftw3.h>
++#include <vector>
++
++// Function to return maximum error for float and double types.
++//
++// Following Schatzman (1996; Accuracy of the Discrete Fourier
++// Transform and the Fast Fourier Transform), the shape of relative
++// l_2 error vs length should look like
++//
++// epsilon * sqrt(log2(length)).
++//
++// The magic epsilon constants below were chosen so that we get a
++// reasonable upper bound for (all of) our tests.
++//
++// For rocFFT, prime lengths result in the highest error. As such,
++// the epsilons below are perhaps too loose for pow2 lengths; but they
++// are appropriate for prime lengths.
++template <typename Tfloat>
++inline double type_epsilon();
++template <>
++inline double type_epsilon<_Float16>()
++{
++ return half_epsilon;
++}
++template <>
++inline double type_epsilon<float>()
++{
++ return single_epsilon;
++}
++template <>
++inline double type_epsilon<double>()
++{
++ return double_epsilon;
++}
++
++// C++ traits to translate float->fftwf_complex and
++// double->fftw_complex.
++// The correct FFTW complex type can be accessed via, for example,
++// using complex_t = typename fftw_complex_trait<Tfloat>::complex_t;
++template <typename Tfloat>
++struct fftw_trait;
++template <>
++struct fftw_trait<_Float16>
++{
++ // fftw does not support half precision, so use single precision and convert
++ using fftw_complex_type = fftwf_complex;
++ using fftw_plan_type = fftwf_plan;
++};
++template <>
++struct fftw_trait<float>
++{
++ using fftw_complex_type = fftwf_complex;
++ using fftw_plan_type = fftwf_plan;
++};
++template <>
++struct fftw_trait<double>
++{
++ using fftw_complex_type = fftw_complex;
++ using fftw_plan_type = fftw_plan;
++};
++
++// Copies the half-precision input buffer to a single-precision
++// buffer. Note that the input buffer is already sized like it's a
++// single-precision buffer (but only half of it is filled), because
++// we allocate a single-precision buffer for FFTW to plan with.
++static hostbuf half_to_single_copy(const hostbuf& in)
++{
++ auto out = in.copy();
++ auto in_begin = reinterpret_cast<const _Float16*>(in.data());
++ std::copy_n(in_begin, in.size() / sizeof(_Float16) / 2, reinterpret_cast<float*>(out.data()));
++ return out;
++}
++
++// converts a wider precision buffer to a narrower precision, in-place
++template <typename TfloatIn, typename TfloatOut>
++void narrow_precision_inplace(hostbuf& in)
++{
++ // ensure we're actually shrinking the data
++ static_assert(sizeof(TfloatIn) > sizeof(TfloatOut));
++
++ auto readPtr = reinterpret_cast<const TfloatIn*>(in.data());
++ auto writePtr = reinterpret_cast<TfloatOut*>(in.data());
++ std::copy_n(readPtr, in.size() / sizeof(TfloatIn), writePtr);
++ in.shrink(in.size() / (sizeof(TfloatIn) / sizeof(TfloatOut)));
++}
++
++static void single_to_half_inplace(hostbuf& in)
++{
++ narrow_precision_inplace<float, _Float16>(in);
++}
++
++// Template wrappers for real-valued FFTW allocators:
++template <typename Tfloat>
++inline Tfloat* fftw_alloc_real_type(size_t n);
++template <>
++inline float* fftw_alloc_real_type<float>(size_t n)
++{
++ return fftwf_alloc_real(n);
++}
++template <>
++inline double* fftw_alloc_real_type<double>(size_t n)
++{
++ return fftw_alloc_real(n);
++}
++
++// Template wrappers for complex-valued FFTW allocators:
++template <typename Tfloat>
++inline typename fftw_trait<Tfloat>::fftw_complex_type* fftw_alloc_complex_type(size_t n);
++template <>
++inline typename fftw_trait<float>::fftw_complex_type* fftw_alloc_complex_type<float>(size_t n)
++{
++ return fftwf_alloc_complex(n);
++}
++template <>
++inline typename fftw_trait<double>::fftw_complex_type* fftw_alloc_complex_type<double>(size_t n)
++{
++ return fftw_alloc_complex(n);
++}
++
++template <typename fftw_type>
++inline fftw_type* fftw_alloc_type(size_t n);
++template <>
++inline float* fftw_alloc_type<float>(size_t n)
++{
++ return fftw_alloc_real_type<float>(n);
++}
++template <>
++inline double* fftw_alloc_type<double>(size_t n)
++{
++ return fftw_alloc_real_type<double>(n);
++}
++template <>
++inline fftwf_complex* fftw_alloc_type<fftwf_complex>(size_t n)
++{
++ return fftw_alloc_complex_type<float>(n);
++}
++template <>
++inline fftw_complex* fftw_alloc_type<fftw_complex>(size_t n)
++{
++ return fftw_alloc_complex_type<double>(n);
++}
++template <>
++inline rocfft_complex<float>* fftw_alloc_type<rocfft_complex<float>>(size_t n)
++{
++ return (rocfft_complex<float>*)fftw_alloc_complex_type<float>(n);
++}
++template <>
++inline rocfft_complex<double>* fftw_alloc_type<rocfft_complex<double>>(size_t n)
++{
++ return (rocfft_complex<double>*)fftw_alloc_complex_type<double>(n);
++}
++
++// Template wrappers for FFTW plan executors:
++template <typename Tfloat>
++inline void fftw_execute_type(typename fftw_trait<Tfloat>::fftw_plan_type plan);
++template <>
++inline void fftw_execute_type<float>(typename fftw_trait<float>::fftw_plan_type plan)
++{
++ return fftwf_execute(plan);
++}
++template <>
++inline void fftw_execute_type<double>(typename fftw_trait<double>::fftw_plan_type plan)
++{
++ return fftw_execute(plan);
++}
++
++// Template wrappers for FFTW plan destroyers:
++template <typename Tfftw_plan>
++inline void fftw_destroy_plan_type(Tfftw_plan plan);
++template <>
++inline void fftw_destroy_plan_type<fftwf_plan>(fftwf_plan plan)
++{
++ return fftwf_destroy_plan(plan);
++}
++template <>
++inline void fftw_destroy_plan_type<fftw_plan>(fftw_plan plan)
++{
++ return fftw_destroy_plan(plan);
++}
++
++// Template wrappers for FFTW c2c planners:
++template <typename Tfloat>
++inline typename fftw_trait<Tfloat>::fftw_plan_type
++ fftw_plan_guru64_dft(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<Tfloat>::fftw_complex_type* in,
++ typename fftw_trait<Tfloat>::fftw_complex_type* out,
++ int sign,
++ unsigned flags);
++
++template <>
++inline typename fftw_trait<_Float16>::fftw_plan_type
++ fftw_plan_guru64_dft<_Float16>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<_Float16>::fftw_complex_type* in,
++ typename fftw_trait<_Float16>::fftw_complex_type* out,
++ int sign,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft(rank, dims, howmany_rank, howmany_dims, in, out, sign, flags);
++}
++
++template <>
++inline typename fftw_trait<float>::fftw_plan_type
++ fftw_plan_guru64_dft<float>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<float>::fftw_complex_type* in,
++ typename fftw_trait<float>::fftw_complex_type* out,
++ int sign,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft(rank, dims, howmany_rank, howmany_dims, in, out, sign, flags);
++}
++
++template <>
++inline typename fftw_trait<double>::fftw_plan_type
++ fftw_plan_guru64_dft<double>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<double>::fftw_complex_type* in,
++ typename fftw_trait<double>::fftw_complex_type* out,
++ int sign,
++ unsigned flags)
++{
++ return fftw_plan_guru64_dft(rank, dims, howmany_rank, howmany_dims, in, out, sign, flags);
++}
++
++// Template wrappers for FFTW c2c executors:
++template <typename Tfloat>
++inline void fftw_plan_execute_c2c(typename fftw_trait<Tfloat>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out);
++
++template <>
++inline void fftw_plan_execute_c2c<_Float16>(typename fftw_trait<_Float16>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ // since FFTW does not natively support half precision, convert
++ // input to single, execute, then convert output back to half
++ auto in_single = half_to_single_copy(in.front());
++ fftwf_execute_dft(plan,
++ reinterpret_cast<fftwf_complex*>(in_single.data()),
++ reinterpret_cast<fftwf_complex*>(out.front().data()));
++ single_to_half_inplace(out.front());
++}
++
++template <>
++inline void fftw_plan_execute_c2c<float>(typename fftw_trait<float>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftwf_execute_dft(plan,
++ reinterpret_cast<fftwf_complex*>(in.front().data()),
++ reinterpret_cast<fftwf_complex*>(out.front().data()));
++}
++
++template <>
++inline void fftw_plan_execute_c2c<double>(typename fftw_trait<double>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftw_execute_dft(plan,
++ reinterpret_cast<fftw_complex*>(in.front().data()),
++ reinterpret_cast<fftw_complex*>(out.front().data()));
++}
++
++// Template wrappers for FFTW r2c planners:
++template <typename Tfloat>
++inline typename fftw_trait<Tfloat>::fftw_plan_type
++ fftw_plan_guru64_r2c(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ Tfloat* in,
++ typename fftw_trait<Tfloat>::fftw_complex_type* out,
++ unsigned flags);
++template <>
++inline typename fftw_trait<_Float16>::fftw_plan_type
++ fftw_plan_guru64_r2c<_Float16>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ _Float16* in,
++ typename fftw_trait<_Float16>::fftw_complex_type* out,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft_r2c(
++ rank, dims, howmany_rank, howmany_dims, reinterpret_cast<float*>(in), out, flags);
++}
++template <>
++inline typename fftw_trait<float>::fftw_plan_type
++ fftw_plan_guru64_r2c<float>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ float* in,
++ typename fftw_trait<float>::fftw_complex_type* out,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft_r2c(rank, dims, howmany_rank, howmany_dims, in, out, flags);
++}
++template <>
++inline typename fftw_trait<double>::fftw_plan_type
++ fftw_plan_guru64_r2c<double>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ double* in,
++ typename fftw_trait<double>::fftw_complex_type* out,
++ unsigned flags)
++{
++ return fftw_plan_guru64_dft_r2c(rank, dims, howmany_rank, howmany_dims, in, out, flags);
++}
++
++// Template wrappers for FFTW r2c executors:
++template <typename Tfloat>
++inline void fftw_plan_execute_r2c(typename fftw_trait<Tfloat>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out);
++template <>
++inline void fftw_plan_execute_r2c<_Float16>(typename fftw_trait<float>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ // since FFTW does not natively support half precision, convert
++ // input to single, execute, then convert output back to half
++ auto in_single = half_to_single_copy(in.front());
++ fftwf_execute_dft_r2c(plan,
++ reinterpret_cast<float*>(in_single.data()),
++ reinterpret_cast<fftwf_complex*>(out.front().data()));
++ single_to_half_inplace(out.front());
++}
++template <>
++inline void fftw_plan_execute_r2c<float>(typename fftw_trait<float>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftwf_execute_dft_r2c(plan,
++ reinterpret_cast<float*>(in.front().data()),
++ reinterpret_cast<fftwf_complex*>(out.front().data()));
++}
++template <>
++inline void fftw_plan_execute_r2c<double>(typename fftw_trait<double>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftw_execute_dft_r2c(plan,
++ reinterpret_cast<double*>(in.front().data()),
++ reinterpret_cast<fftw_complex*>(out.front().data()));
++}
++
++// Template wrappers for FFTW c2r planners:
++template <typename Tfloat>
++inline typename fftw_trait<Tfloat>::fftw_plan_type
++ fftw_plan_guru64_c2r(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<Tfloat>::fftw_complex_type* in,
++ Tfloat* out,
++ unsigned flags);
++template <>
++inline typename fftw_trait<_Float16>::fftw_plan_type
++ fftw_plan_guru64_c2r<_Float16>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<_Float16>::fftw_complex_type* in,
++ _Float16* out,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft_c2r(
++ rank, dims, howmany_rank, howmany_dims, in, reinterpret_cast<float*>(out), flags);
++}
++template <>
++inline typename fftw_trait<float>::fftw_plan_type
++ fftw_plan_guru64_c2r<float>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<float>::fftw_complex_type* in,
++ float* out,
++ unsigned flags)
++{
++ return fftwf_plan_guru64_dft_c2r(rank, dims, howmany_rank, howmany_dims, in, out, flags);
++}
++template <>
++inline typename fftw_trait<double>::fftw_plan_type
++ fftw_plan_guru64_c2r<double>(int rank,
++ const fftw_iodim64* dims,
++ int howmany_rank,
++ const fftw_iodim64* howmany_dims,
++ typename fftw_trait<double>::fftw_complex_type* in,
++ double* out,
++ unsigned flags)
++{
++ return fftw_plan_guru64_dft_c2r(rank, dims, howmany_rank, howmany_dims, in, out, flags);
++}
++
++// Template wrappers for FFTW c2r executors:
++template <typename Tfloat>
++inline void fftw_plan_execute_c2r(typename fftw_trait<Tfloat>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out);
++template <>
++inline void fftw_plan_execute_c2r<_Float16>(typename fftw_trait<float>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ // since FFTW does not natively support half precision, convert
++ // input to single, execute, then convert output back to half
++ auto in_single = half_to_single_copy(in.front());
++ fftwf_execute_dft_c2r(plan,
++ reinterpret_cast<fftwf_complex*>(in_single.data()),
++ reinterpret_cast<float*>(out.front().data()));
++ single_to_half_inplace(out.front());
++}
++template <>
++inline void fftw_plan_execute_c2r<float>(typename fftw_trait<float>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftwf_execute_dft_c2r(plan,
++ reinterpret_cast<fftwf_complex*>(in.front().data()),
++ reinterpret_cast<float*>(out.front().data()));
++}
++template <>
++inline void fftw_plan_execute_c2r<double>(typename fftw_trait<double>::fftw_plan_type plan,
++ std::vector<hostbuf>& in,
++ std::vector<hostbuf>& out)
++{
++ fftw_execute_dft_c2r(plan,
++ reinterpret_cast<fftw_complex*>(in.front().data()),
++ reinterpret_cast<double*>(out.front().data()));
++}
++
++#ifdef FFTW_HAVE_SPRINT_PLAN
++// Template wrappers for FFTW print plan:
++template <typename Tfloat>
++inline char* fftw_sprint_plan(const typename fftw_trait<Tfloat>::fftw_plan_type plan);
++template <>
++inline char* fftw_sprint_plan<_Float16>(const typename fftw_trait<_Float16>::fftw_plan_type plan)
++{
++ return fftwf_sprint_plan(plan);
++}
++template <>
++inline char* fftw_sprint_plan<float>(const typename fftw_trait<float>::fftw_plan_type plan)
++{
++ return fftwf_sprint_plan(plan);
++}
++template <>
++inline char* fftw_sprint_plan<double>(const typename fftw_trait<double>::fftw_plan_type plan)
++{
++ return fftw_sprint_plan(plan);
++}
++#endif
++
++#endif
+diff --git a/shared/gpubuf.h b/shared/gpubuf.h
+new file mode 100644
+index 0000000..993fa95
+--- /dev/null
++++ b/shared/gpubuf.h
+@@ -0,0 +1,134 @@
++// Copyright (C) 2021 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_GPUBUF_H
++#define ROCFFT_GPUBUF_H
++
++#include "rocfft_hip.h"
++#include <cstdlib>
++
++// Simple RAII class for GPU buffers. T is the type of pointer that
++// data() returns
++template <class T = void>
++class gpubuf_t
++{
++public:
++ gpubuf_t() {}
++ // buffers are movable but not copyable
++ gpubuf_t(gpubuf_t&& other)
++ {
++ std::swap(buf, other.buf);
++ std::swap(bsize, other.bsize);
++ std::swap(device, other.device);
++ }
++ gpubuf_t& operator=(gpubuf_t&& other)
++ {
++ std::swap(buf, other.buf);
++ std::swap(bsize, other.bsize);
++ std::swap(device, other.device);
++ return *this;
++ }
++ gpubuf_t(const gpubuf_t&) = delete;
++ gpubuf_t& operator=(const gpubuf_t&) = delete;
++
++ ~gpubuf_t()
++ {
++ free();
++ }
++
++ static bool use_alloc_managed()
++ {
++ return std::getenv("ROCFFT_MALLOC_MANAGED");
++ }
++
++ hipError_t alloc(const size_t size)
++ {
++ // remember the device that was current as of alloc, so we can
++ // free on the correct device
++ auto ret = hipGetDevice(&device);
++ if(ret != hipSuccess)
++ return ret;
++
++ bsize = size;
++ static bool alloc_managed = use_alloc_managed();
++ free();
++ ret = alloc_managed ? hipMallocManaged(&buf, bsize) : hipMalloc(&buf, bsize);
++ if(ret != hipSuccess)
++ {
++ buf = nullptr;
++ bsize = 0;
++ }
++ return ret;
++ }
++
++ size_t size() const
++ {
++ return bsize;
++ }
++
++ void free()
++ {
++ if(buf != nullptr)
++ {
++ // free on the device we allocated on
++ rocfft_scoped_device dev(device);
++ (void)hipFree(buf);
++ buf = nullptr;
++ bsize = 0;
++ }
++ }
++
++ // return a pointer to the allocated memory, offset by the
++ // specified number of bytes
++ T* data_offset(size_t offset_bytes = 0) const
++ {
++ void* ptr = static_cast<char*>(buf) + offset_bytes;
++ return static_cast<T*>(ptr);
++ }
++
++ T* data() const
++ {
++ return static_cast<T*>(buf);
++ }
++
++ // equality/bool tests
++ bool operator==(std::nullptr_t n) const
++ {
++ return buf == n;
++ }
++ bool operator!=(std::nullptr_t n) const
++ {
++ return buf != n;
++ }
++ operator bool() const
++ {
++ return buf;
++ }
++
++private:
++ // The GPU buffer
++ void* buf = nullptr;
++ size_t bsize = 0;
++ int device = 0;
++};
++
++// default gpubuf that gives out void* pointers
++typedef gpubuf_t<> gpubuf;
++#endif
+diff --git a/shared/hip_object_wrapper.h b/shared/hip_object_wrapper.h
+new file mode 100644
+index 0000000..54083ab
+--- /dev/null
++++ b/shared/hip_object_wrapper.h
+@@ -0,0 +1,86 @@
++/******************************************************************************
++* Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++*
++* Permission is hereby granted, free of charge, to any person obtaining a copy
++* of this software and associated documentation files (the "Software"), to deal
++* in the Software without restriction, including without limitation the rights
++* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++* copies of the Software, and to permit persons to whom the Software is
++* furnished to do so, subject to the following conditions:
++*
++* The above copyright notice and this permission notice shall be included in
++* all copies or substantial portions of the Software.
++*
++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++* THE SOFTWARE.
++*******************************************************************************/
++
++#ifndef ROCFFT_HIP_OBJ_WRAPPER_H
++#define ROCFFT_HIP_OBJ_WRAPPER_H
++
++#include "rocfft_hip.h"
++
++// RAII wrapper around HIP objects
++template <typename T, auto TCreate, auto TDestroy>
++struct hip_object_wrapper_t
++{
++ hip_object_wrapper_t()
++ : obj(nullptr)
++ {
++ }
++
++ void alloc()
++ {
++ if(obj == nullptr && TCreate(&obj) != hipSuccess)
++ throw std::runtime_error("hip create failure");
++ }
++
++ void free()
++ {
++ if(obj)
++ {
++ (void)TDestroy(obj);
++ obj = nullptr;
++ }
++ }
++
++ operator const T&() const
++ {
++ return obj;
++ }
++ operator T&()
++ {
++ return obj;
++ }
++
++ operator bool() const
++ {
++ return obj != nullptr;
++ }
++
++ ~hip_object_wrapper_t()
++ {
++ free();
++ }
++
++ hip_object_wrapper_t(const hip_object_wrapper_t&) = delete;
++ hip_object_wrapper_t& operator=(const hip_object_wrapper_t&) = delete;
++ hip_object_wrapper_t(hip_object_wrapper_t&& other)
++ : obj(other.obj)
++ {
++ other.obj = nullptr;
++ }
++
++private:
++ T obj;
++};
++
++typedef hip_object_wrapper_t<hipStream_t, hipStreamCreate, hipStreamDestroy> hipStream_wrapper_t;
++typedef hip_object_wrapper_t<hipEvent_t, hipEventCreate, hipEventDestroy> hipEvent_wrapper_t;
++
++#endif // ROCFFT_HIP_OBJ_WRAPPER_H
+diff --git a/shared/hostbuf.h b/shared/hostbuf.h
+new file mode 100644
+index 0000000..0a96c7d
+--- /dev/null
++++ b/shared/hostbuf.h
+@@ -0,0 +1,158 @@
++// Copyright (C) 2021 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_HOSTBUF_H
++#define ROCFFT_HOSTBUF_H
++
++#include "arithmetic.h"
++#include <cstdlib>
++#include <cstring>
++
++#ifndef WIN32
++#include <stdlib.h>
++#include <sys/mman.h>
++#endif
++
++// Simple RAII class for host buffers. T is the type of pointer that
++// data() returns
++template <class T = void>
++class hostbuf_t
++{
++public:
++ hostbuf_t() {}
++ // buffers are movable but not copyable
++ hostbuf_t(hostbuf_t&& other)
++ {
++ std::swap(buf, other.buf);
++ std::swap(bsize, other.bsize);
++ }
++ hostbuf_t& operator=(hostbuf_t&& other)
++ {
++ std::swap(buf, other.buf);
++ std::swap(bsize, other.bsize);
++ return *this;
++ }
++ hostbuf_t(const hostbuf_t&) = delete;
++ hostbuf_t& operator=(const hostbuf_t&) = delete;
++
++ ~hostbuf_t()
++ {
++ free();
++ }
++
++ void alloc(size_t size)
++ {
++ bsize = size;
++ free();
++
++ // we're aligning to multiples of 64 bytes, so round the
++ // allocation size up to the nearest 64 to keep ASAN happy
++ if(size % 64)
++ {
++ size += 64 - size % 64;
++ }
++
++ // FFTW requires aligned allocations to use faster SIMD instructions.
++ // If enabling hugepages, align to 2 MiB. Otherwise, aligning to
++ // 64 bytes is enough for AVX instructions up to AVX512.
++#ifdef WIN32
++ buf = _aligned_malloc(size, 64);
++#else
++ // On Linux, ask for hugepages to reduce TLB pressure and
++ // improve performance. Allocations need to be aligned to
++ // the hugepage size, and rounded up to the next whole
++ // hugepage.
++ static const size_t TWO_MiB = 2 * 1024 * 1024;
++ if(size >= TWO_MiB)
++ {
++ size_t rounded_size = DivRoundingUp(size, TWO_MiB) * TWO_MiB;
++ buf = aligned_alloc(TWO_MiB, rounded_size);
++ madvise(buf, rounded_size, MADV_HUGEPAGE);
++ }
++ else
++ buf = aligned_alloc(64, size);
++#endif
++ }
++
++ size_t size() const
++ {
++ return bsize;
++ }
++
++ void free()
++ {
++ if(buf != nullptr)
++ {
++#ifdef WIN32
++ _aligned_free(buf);
++#else
++ std::free(buf);
++#endif
++ buf = nullptr;
++ bsize = 0;
++ }
++ }
++
++ T* data() const
++ {
++ return static_cast<T*>(buf);
++ }
++
++ // Copy method
++ hostbuf_t copy() const
++ {
++ hostbuf_t copy;
++ copy.alloc(bsize);
++ memcpy(copy.buf, buf, bsize);
++ return copy;
++ }
++
++ // shrink the buffer to fit the new size
++ void shrink(size_t new_size)
++ {
++ if(new_size > bsize)
++ throw std::runtime_error("can't shrink hostbuf to larger size");
++ // just pretend the buffer is now that size
++ bsize = new_size;
++ }
++
++ // equality/bool tests
++ bool operator==(std::nullptr_t n) const
++ {
++ return buf == n;
++ }
++ bool operator!=(std::nullptr_t n) const
++ {
++ return buf != n;
++ }
++ operator bool() const
++ {
++ return buf;
++ }
++
++private:
++ // The host buffer
++ void* buf = nullptr;
++ size_t bsize = 0;
++};
++
++// default hostbuf that gives out void* pointers
++typedef hostbuf_t<> hostbuf;
++#endif
+diff --git a/shared/increment.h b/shared/increment.h
+new file mode 100644
+index 0000000..90bba1d
+--- /dev/null
++++ b/shared/increment.h
+@@ -0,0 +1,100 @@
++// Copyright (C) 2021 - 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_INCREMENT_H
++#define ROCFFT_INCREMENT_H
++
++#include <algorithm>
++#include <tuple>
++#include <vector>
++
++// Helper functions to iterate over a buffer in row-major order.
++// Indexes may be given as either a tuple or vector of sizes. They
++// return true if the index was successfully incremented to move to
++// the next element in the buffer.
++
++template <typename T1, typename T2>
++static bool increment_base(T1& index, const T2& length)
++{
++ static_assert(std::is_integral<T1>::value, "Integral required.");
++ static_assert(std::is_integral<T2>::value, "Integral required.");
++ if(index < length - 1)
++ {
++ ++index;
++ return true;
++ }
++ index = 0;
++ return false;
++}
++
++// Increment the index (row-major) for looping over 1, 2, and 3 dimensions length.
++template <typename T1, typename T2>
++static bool increment_rowmajor(T1& index, const T2& length)
++{
++ static_assert(std::is_integral<T1>::value, "Integral required.");
++ static_assert(std::is_integral<T2>::value, "Integral required.");
++ return increment_base(index, length);
++}
++
++template <typename T1, typename T2>
++static bool increment_rowmajor(std::tuple<T1, T1>& index, const std::tuple<T2, T2>& length)
++{
++ if(increment_base(std::get<1>(index), std::get<1>(length)))
++ // we incremented ok, nothing further to do
++ return true;
++ // otherwise, we rolled over
++ return increment_base(std::get<0>(index), std::get<0>(length));
++}
++
++template <typename T1, typename T2>
++static bool increment_rowmajor(std::tuple<T1, T1, T1>& index, const std::tuple<T2, T2, T2>& length)
++{
++ if(increment_base(std::get<2>(index), std::get<2>(length)))
++ // we incremented ok, nothing further to do
++ return true;
++ if(increment_base(std::get<1>(index), std::get<1>(length)))
++ // we incremented ok, nothing further to do
++ return true;
++ // otherwise, we rolled over
++ return increment_base(std::get<0>(index), std::get<0>(length));
++}
++
++// Increment row-major index over arbitrary dimension length
++template <typename T1, typename T2>
++bool increment_rowmajor(std::vector<T1>& index, const std::vector<T2>& length)
++{
++ for(int idim = length.size(); idim-- > 0;)
++ {
++ if(index[idim] < length[idim])
++ {
++ if((++index[idim]) == length[idim])
++ {
++ index[idim] = 0;
++ continue;
++ }
++ // we know we were able to increment something and didn't hit the end
++ return true;
++ }
++ }
++ // End the loop when we get back to the start:
++ return !std::all_of(index.begin(), index.end(), [](int i) { return i == 0; });
++}
++
++#endif
+diff --git a/shared/precision_type.h b/shared/precision_type.h
+new file mode 100644
+index 0000000..526fc9a
+--- /dev/null
++++ b/shared/precision_type.h
+@@ -0,0 +1,70 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_PRECISION_TYPE_H
++#define ROCFFT_PRECISION_TYPE_H
++
++#include "array_predicate.h"
++#include "rocfft/rocfft.h"
++
++static size_t real_type_size(rocfft_precision precision)
++{
++ switch(precision)
++ {
++ case rocfft_precision_half:
++ return 2;
++ case rocfft_precision_single:
++ return 4;
++ case rocfft_precision_double:
++ return 8;
++ }
++}
++
++static size_t complex_type_size(rocfft_precision precision)
++{
++ return real_type_size(precision) * 2;
++}
++
++static const char* precision_name(rocfft_precision precision)
++{
++ switch(precision)
++ {
++ case rocfft_precision_half:
++ return "half";
++ case rocfft_precision_single:
++ return "single";
++ case rocfft_precision_double:
++ return "double";
++ }
++}
++
++static size_t element_size(rocfft_precision precision, rocfft_array_type array_type)
++{
++ return array_type_is_complex(array_type) ? complex_type_size(precision)
++ : real_type_size(precision);
++}
++
++// offset a pointer by a number of elements, given the elements'
++// precision and type (complex or not)
++static void* ptr_offset(void* p, size_t elems, rocfft_precision precision, rocfft_array_type type)
++{
++ return static_cast<char*>(p) + elems * element_size(precision, type);
++}
++#endif
+diff --git a/shared/printbuffer.h b/shared/printbuffer.h
+new file mode 100644
+index 0000000..5ae0b64
+--- /dev/null
++++ b/shared/printbuffer.h
+@@ -0,0 +1,108 @@
++// Copyright (C) 2021 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef PRINTBUFFER_H
++#define PRINTBUFFER_H
++
++#include "hostbuf.h"
++#include "increment.h"
++#include <algorithm>
++#include <vector>
++
++// Output a formatted general-dimensional array with given length and stride in batches
++// separated by dist.
++template <typename Toutput, typename T1, typename T2, typename Tsize, typename Tstream>
++inline void printbuffer(const Toutput* output,
++ const std::vector<T1>& length,
++ const std::vector<T2>& stride,
++ const Tsize nbatch,
++ const Tsize dist,
++ const size_t offset,
++ Tstream& stream)
++{
++ auto i_base = 0;
++ for(unsigned int b = 0; b < nbatch; b++, i_base += dist)
++ {
++ std::vector<size_t> index(length.size());
++ std::fill(index.begin(), index.end(), 0);
++ do
++ {
++ const int i
++ = std::inner_product(index.begin(), index.end(), stride.begin(), i_base + offset);
++ stream << output[i] << " ";
++ for(int li = index.size(); li-- > 0;)
++ {
++ if(index[li] == (length[li] - 1))
++ {
++ stream << "\n";
++ }
++ else
++ {
++ break;
++ }
++ }
++ } while(increment_rowmajor(index, length));
++ stream << std::endl;
++ }
++}
++
++template <typename Telem>
++class buffer_printer
++{
++ // The scalar versions might be part of a planar format.
++public:
++ template <typename Tint1, typename Tint2, typename Tsize, typename Tstream = std::ostream>
++ static void print_buffer(const std::vector<hostbuf>& buf,
++ const std::vector<Tint1>& length,
++ const std::vector<Tint2>& stride,
++ const Tsize nbatch,
++ const Tsize dist,
++ const std::vector<size_t>& offset,
++ Tstream& stream = std::cout)
++ {
++ for(const auto& vec : buf)
++ {
++ printbuffer(reinterpret_cast<const Telem*>(vec.data()),
++ length,
++ stride,
++ nbatch,
++ dist,
++ offset[0],
++ stream);
++ }
++ };
++ template <typename Tstream = std::ostream>
++ static void print_buffer_flat(const std::vector<hostbuf>& buf,
++ const std::vector<size_t>& size,
++ const std::vector<size_t>& offset,
++ Tstream& stream = std::cout)
++ {
++ for(const auto& vec : buf)
++ {
++ auto data = reinterpret_cast<const Telem*>(vec.data());
++ stream << "idx " << 0;
++ for(size_t i = 0; i < size[0]; ++i)
++ stream << " " << data[i];
++ stream << std::endl;
++ }
++ };
++};
++
++#endif
+diff --git a/shared/ptrdiff.h b/shared/ptrdiff.h
+new file mode 100644
+index 0000000..3bd15de
+--- /dev/null
++++ b/shared/ptrdiff.h
+@@ -0,0 +1,40 @@
++// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++
++// Compute the farthest point from the original pointer.
++static size_t compute_ptrdiff(const std::vector<size_t>& length,
++ const std::vector<size_t>& stride,
++ const size_t nbatch,
++ const size_t dist)
++{
++ size_t val = 0;
++ if(!length.empty())
++ {
++ val = 1;
++ for(unsigned int i = 0; i < length.size(); ++i)
++ {
++ val += (length[i] - 1) * stride[i];
++ }
++ val += (nbatch - 1) * dist;
++ }
++ return val;
++}
+diff --git a/shared/rocfft_accuracy_test.h b/shared/rocfft_accuracy_test.h
+new file mode 100644
+index 0000000..4ce3059
+--- /dev/null
++++ b/shared/rocfft_accuracy_test.h
+@@ -0,0 +1,29 @@
++// Copyright (C) 2022 - 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_ACCURACY_TEST
++#define ROCFFT_ACCURACY_TEST
++
++#include "accuracy_test.h"
++#include "rocfft_params.h"
++
++void fft_vs_reference(rocfft_params& params, bool round_trip = false);
++
++#endif
+diff --git a/shared/rocfft_against_fftw.h b/shared/rocfft_against_fftw.h
+new file mode 100644
+index 0000000..d03754c
+--- /dev/null
++++ b/shared/rocfft_against_fftw.h
+@@ -0,0 +1,231 @@
++// Copyright (C) 2016 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++#ifndef ROCFFT_AGAINST_FFTW
++#define ROCFFT_AGAINST_FFTW
++
++#include <gtest/gtest.h>
++#include <math.h>
++#include <stdexcept>
++#include <vector>
++
++#include "fftw_transform.h"
++
++// Return the precision enum for rocFFT based upon the type.
++template <typename Tfloat>
++inline fft_precision precision_selector();
++template <>
++inline fft_precision precision_selector<float>()
++{
++ return fft_precision_single;
++}
++template <>
++inline fft_precision precision_selector<double>()
++{
++ return fft_precision_double;
++}
++
++extern bool use_fftw_wisdom;
++
++// construct and return an FFTW plan with the specified type,
++// precision, and dimensions. cpu_out is required if we're using
++// wisdom, which runs actual FFTs to work out the best plan.
++template <typename Tfloat>
++static typename fftw_trait<Tfloat>::fftw_plan_type
++ fftw_plan_with_precision(const std::vector<fftw_iodim64>& dims,
++ const std::vector<fftw_iodim64>& howmany_dims,
++ const fft_transform_type transformType,
++ const size_t isize,
++ void* cpu_in,
++ void* cpu_out)
++{
++ using fftw_complex_type = typename fftw_trait<Tfloat>::fftw_complex_type;
++
++ // NB: Using FFTW_MEASURE implies that the input buffer's data
++ // may be destroyed during plan creation. But if we're wanting
++ // to run FFTW in the first place, we must have just created an
++ // uninitialized input buffer anyway.
++
++ switch(transformType)
++ {
++ case fft_transform_type_complex_forward:
++ return fftw_plan_guru64_dft<Tfloat>(dims.size(),
++ dims.data(),
++ howmany_dims.size(),
++ howmany_dims.data(),
++ reinterpret_cast<fftw_complex_type*>(cpu_in),
++ reinterpret_cast<fftw_complex_type*>(cpu_out),
++ -1,
++ use_fftw_wisdom ? FFTW_MEASURE : FFTW_ESTIMATE);
++ case fft_transform_type_complex_inverse:
++ return fftw_plan_guru64_dft<Tfloat>(dims.size(),
++ dims.data(),
++ howmany_dims.size(),
++ howmany_dims.data(),
++ reinterpret_cast<fftw_complex_type*>(cpu_in),
++ reinterpret_cast<fftw_complex_type*>(cpu_out),
++ 1,
++ use_fftw_wisdom ? FFTW_MEASURE : FFTW_ESTIMATE);
++ case fft_transform_type_real_forward:
++ return fftw_plan_guru64_r2c<Tfloat>(dims.size(),
++ dims.data(),
++ howmany_dims.size(),
++ howmany_dims.data(),
++ reinterpret_cast<Tfloat*>(cpu_in),
++ reinterpret_cast<fftw_complex_type*>(cpu_out),
++ use_fftw_wisdom ? FFTW_MEASURE : FFTW_ESTIMATE);
++ case fft_transform_type_real_inverse:
++ return fftw_plan_guru64_c2r<Tfloat>(dims.size(),
++ dims.data(),
++ howmany_dims.size(),
++ howmany_dims.data(),
++ reinterpret_cast<fftw_complex_type*>(cpu_in),
++ reinterpret_cast<Tfloat*>(cpu_out),
++ use_fftw_wisdom ? FFTW_MEASURE : FFTW_ESTIMATE);
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++}
++
++// construct an FFTW plan, given rocFFT parameters. output is
++// required if planning with wisdom.
++template <typename Tfloat>
++static typename fftw_trait<Tfloat>::fftw_plan_type
++ fftw_plan_via_rocfft(const std::vector<size_t>& length,
++ const std::vector<size_t>& istride,
++ const std::vector<size_t>& ostride,
++ const size_t nbatch,
++ const size_t idist,
++ const size_t odist,
++ const fft_transform_type transformType,
++ std::vector<hostbuf>& input,
++ std::vector<hostbuf>& output)
++{
++ // Dimension configuration:
++ std::vector<fftw_iodim64> dims(length.size());
++ for(unsigned int idx = 0; idx < length.size(); ++idx)
++ {
++ dims[idx].n = length[idx];
++ dims[idx].is = istride[idx];
++ dims[idx].os = ostride[idx];
++ }
++
++ // Batch configuration:
++ std::vector<fftw_iodim64> howmany_dims(1);
++ howmany_dims[0].n = nbatch;
++ howmany_dims[0].is = idist;
++ howmany_dims[0].os = odist;
++
++ return fftw_plan_with_precision<Tfloat>(dims,
++ howmany_dims,
++ transformType,
++ idist * nbatch,
++ input.front().data(),
++ output.empty() ? nullptr : output.front().data());
++}
++
++template <typename Tfloat>
++void fftw_run(fft_transform_type transformType,
++ typename fftw_trait<Tfloat>::fftw_plan_type cpu_plan,
++ std::vector<hostbuf>& cpu_in,
++ std::vector<hostbuf>& cpu_out)
++{
++ switch(transformType)
++ {
++ case fft_transform_type_complex_forward:
++ {
++ fftw_plan_execute_c2c<Tfloat>(cpu_plan, cpu_in, cpu_out);
++ break;
++ }
++ case fft_transform_type_complex_inverse:
++ {
++ fftw_plan_execute_c2c<Tfloat>(cpu_plan, cpu_in, cpu_out);
++ break;
++ }
++ case fft_transform_type_real_forward:
++ {
++ fftw_plan_execute_r2c<Tfloat>(cpu_plan, cpu_in, cpu_out);
++ break;
++ }
++ case fft_transform_type_real_inverse:
++ {
++ fftw_plan_execute_c2r<Tfloat>(cpu_plan, cpu_in, cpu_out);
++ break;
++ }
++ }
++}
++
++// Given a transform type, return the contiguous input type.
++inline fft_array_type contiguous_itype(const fft_transform_type transformType)
++{
++ switch(transformType)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ return fft_array_type_complex_interleaved;
++ case fft_transform_type_real_forward:
++ return fft_array_type_real;
++ case fft_transform_type_real_inverse:
++ return fft_array_type_hermitian_interleaved;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ return fft_array_type_complex_interleaved;
++}
++
++// Given a transform type, return the contiguous output type.
++inline fft_array_type contiguous_otype(const fft_transform_type transformType)
++{
++ switch(transformType)
++ {
++ case fft_transform_type_complex_forward:
++ case fft_transform_type_complex_inverse:
++ return fft_array_type_complex_interleaved;
++ case fft_transform_type_real_forward:
++ return fft_array_type_hermitian_interleaved;
++ case fft_transform_type_real_inverse:
++ return fft_array_type_real;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++ return fft_array_type_complex_interleaved;
++}
++
++// Given a precision, return the acceptable tolerance.
++inline double type_epsilon(const fft_precision precision)
++{
++ switch(precision)
++ {
++ case fft_precision_half:
++ return type_epsilon<_Float16>();
++ break;
++ case fft_precision_single:
++ return type_epsilon<float>();
++ break;
++ case fft_precision_double:
++ return type_epsilon<double>();
++ break;
++ default:
++ throw std::runtime_error("Invalid precision");
++ }
++}
++
++#endif
+diff --git a/shared/rocfft_complex.h b/shared/rocfft_complex.h
+new file mode 100644
+index 0000000..efa0290
+--- /dev/null
++++ b/shared/rocfft_complex.h
+@@ -0,0 +1,346 @@
++// Copyright (C) 2021 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_COMPLEX_H
++#define ROCFFT_COMPLEX_H
++
++#include <hip/hip_fp16.h>
++#if !defined(__HIPCC_RTC__)
++#include <iostream>
++#endif
++#include <math.h>
++#include <type_traits>
++
++#ifdef __HIP_PLATFORM_NVIDIA__
++typedef __half _Float16;
++#endif
++
++template <typename Treal>
++struct rocfft_complex
++{
++
++ Treal x; // Real part
++ Treal y; // Imaginary part
++
++ // Constructors
++ // Do not initialize the members x or y by default, to ensure that it can
++ // be used in __shared__ and that it is a trivial class compatible with C.
++ __device__ __host__ rocfft_complex() = default;
++ __device__ __host__ rocfft_complex(const rocfft_complex&) = default;
++ __device__ __host__ rocfft_complex(rocfft_complex&&) = default;
++ __device__ __host__ rocfft_complex& operator=(const rocfft_complex& rhs) & = default;
++ __device__ __host__ rocfft_complex& operator=(rocfft_complex&& rhs) & = default;
++ __device__ __host__ ~rocfft_complex() = default;
++
++ // Constructor from real and imaginary parts
++ __device__ __host__ constexpr rocfft_complex(Treal real, Treal imag)
++ : x{real}
++ , y{imag}
++ {
++ }
++
++ // Conversion from different precision
++ template <typename U>
++ __device__ __host__ explicit constexpr rocfft_complex(const rocfft_complex<U>& z)
++ : x(z.x)
++ , y(z.y)
++ {
++ }
++
++ // Accessors
++ __device__ __host__ constexpr Treal real() const
++ {
++ return x;
++ }
++
++ __device__ __host__ constexpr Treal imag() const
++ {
++ return y;
++ }
++
++ // Unary operations
++ __forceinline__ __device__ __host__ rocfft_complex operator-() const
++ {
++ return {-x, -y};
++ }
++
++ __forceinline__ __device__ __host__ rocfft_complex operator+() const
++ {
++ return *this;
++ }
++
++ __device__ __host__ Treal asum(const rocfft_complex& z)
++ {
++ return abs(z.x) + abs(z.y);
++ }
++
++ // Internal real functions
++ static __forceinline__ __device__ __host__ Treal abs(Treal x)
++ {
++ return x < 0 ? -x : x;
++ }
++
++ static __forceinline__ __device__ __host__ float sqrt(float x)
++ {
++ return ::sqrtf(x);
++ }
++
++ static __forceinline__ __device__ __host__ double sqrt(double x)
++ {
++ return ::sqrt(x);
++ }
++
++ // Addition operators
++ __device__ __host__ auto& operator+=(const rocfft_complex& rhs)
++ {
++ return *this = {x + rhs.x, y + rhs.y};
++ }
++
++ __device__ __host__ auto operator+(const rocfft_complex& rhs) const
++ {
++ auto lhs = *this;
++ return lhs += rhs;
++ }
++
++ // Subtraction operators
++ __device__ __host__ auto& operator-=(const rocfft_complex& rhs)
++ {
++ return *this = {x - rhs.x, y - rhs.y};
++ }
++
++ __device__ __host__ auto operator-(const rocfft_complex& rhs) const
++ {
++ auto lhs = *this;
++ return lhs -= rhs;
++ }
++
++ // Multiplication operators
++ __device__ __host__ auto& operator*=(const rocfft_complex& rhs)
++ {
++ return *this = {x * rhs.x - y * rhs.y, y * rhs.x + x * rhs.y};
++ }
++
++ __device__ __host__ auto operator*(const rocfft_complex& rhs) const
++ {
++ auto lhs = *this;
++ return lhs *= rhs;
++ }
++
++ // Division operators
++ __device__ __host__ auto& operator/=(const rocfft_complex& rhs)
++ {
++ // Form of Robert L. Smith's Algorithm 116
++ if(abs(rhs.x) > abs(rhs.y))
++ {
++ Treal ratio = rhs.y / rhs.x;
++ Treal scale = 1 / (rhs.x + rhs.y * ratio);
++ *this = {(x + y * ratio) * scale, (y - x * ratio) * scale};
++ }
++ else
++ {
++ Treal ratio = rhs.x / rhs.y;
++ Treal scale = 1 / (rhs.x * ratio + rhs.y);
++ *this = {(y + x * ratio) * scale, (y * ratio - x) * scale};
++ }
++ return *this;
++ }
++
++ __device__ __host__ auto operator/(const rocfft_complex& rhs) const
++ {
++ auto lhs = *this;
++ return lhs /= rhs;
++ }
++
++ // Comparison operators
++ __device__ __host__ constexpr bool operator==(const rocfft_complex& rhs) const
++ {
++ return x == rhs.x && y == rhs.y;
++ }
++
++ __device__ __host__ constexpr bool operator!=(const rocfft_complex& rhs) const
++ {
++ return !(*this == rhs);
++ }
++
++ // Operators for complex-real computations
++ template <typename U>
++ __device__ __host__ auto& operator+=(const U& rhs)
++ {
++ return (x += Treal(rhs)), *this;
++ }
++
++ template <typename U>
++ __device__ __host__ auto& operator-=(const U& rhs)
++ {
++ return (x -= Treal(rhs)), *this;
++ }
++
++ __device__ __host__ auto operator+(const Treal& rhs)
++ {
++ auto lhs = *this;
++ return lhs += rhs;
++ }
++
++ __device__ __host__ auto operator-(const Treal& rhs)
++ {
++ auto lhs = *this;
++ return lhs -= rhs;
++ }
++
++ template <typename U>
++ __device__ __host__ auto& operator*=(const U& rhs)
++ {
++ return (x *= Treal(rhs)), (y *= Treal(rhs)), *this;
++ }
++
++ template <typename U>
++ __device__ __host__ auto operator*(const U& rhs) const
++ {
++ auto lhs = *this;
++ return lhs *= Treal(rhs);
++ }
++
++ template <typename U>
++ __device__ __host__ auto& operator/=(const U& rhs)
++ {
++ return (x /= Treal(rhs)), (y /= Treal(rhs)), *this;
++ }
++
++ template <typename U>
++ __device__ __host__ auto operator/(const U& rhs) const
++ {
++ auto lhs = *this;
++ return lhs /= Treal(rhs);
++ }
++
++ template <typename U>
++ __device__ __host__ constexpr bool operator==(const U& rhs) const
++ {
++ return x == Treal(rhs) && y == 0;
++ }
++
++ template <typename U>
++ __device__ __host__ constexpr bool operator!=(const U& rhs) const
++ {
++ return !(*this == rhs);
++ }
++};
++
++// Stream operators
++#if !defined(__HIPCC_RTC__)
++static std::ostream& operator<<(std::ostream& stream, const _Float16& f)
++{
++ return stream << static_cast<double>(f);
++}
++
++template <typename Treal>
++std::ostream& operator<<(std::ostream& out, const rocfft_complex<Treal>& z)
++{
++ return out << '(' << static_cast<double>(z.x) << ',' << static_cast<double>(z.y) << ')';
++}
++#endif
++
++// Operators for real-complex computations
++template <typename U, typename Treal>
++__device__ __host__ rocfft_complex<Treal> operator+(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ return {Treal(lhs) + rhs.x, rhs.y};
++}
++
++template <typename U, typename Treal>
++__device__ __host__ rocfft_complex<Treal> operator-(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ return {Treal(lhs) - rhs.x, -rhs.y};
++}
++
++template <typename U, typename Treal>
++__device__ __host__ rocfft_complex<Treal> operator*(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ return {Treal(lhs) * rhs.x, Treal(lhs) * rhs.y};
++}
++
++template <typename U, typename Treal>
++__device__ __host__ rocfft_complex<Treal> operator/(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ // Form of Robert L. Smith's Algorithm 116
++ if(rocfft_complex<Treal>::abs(rhs.x) > rocfft_complex<Treal>::abs(rhs.y))
++ {
++ Treal ratio = rhs.y / rhs.x;
++ Treal scale = Treal(lhs) / (rhs.x + rhs.y * ratio);
++ return {scale, -scale * ratio};
++ }
++ else
++ {
++ Treal ratio = rhs.x / rhs.y;
++ Treal scale = Treal(lhs) / (rhs.x * ratio + rhs.y);
++ return {ratio * scale, -scale};
++ }
++}
++
++template <typename U, typename Treal>
++__device__ __host__ constexpr bool operator==(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ return Treal(lhs) == rhs.x && 0 == rhs.y;
++}
++
++template <typename U, typename Treal>
++__device__ __host__ constexpr bool operator!=(const U& lhs, const rocfft_complex<Treal>& rhs)
++{
++ return !(lhs == rhs);
++}
++
++// Extending std namespace to handle rocfft_complex datatype
++namespace std
++{
++ template <typename Treal>
++ __device__ __host__ constexpr Treal real(const rocfft_complex<Treal>& z)
++ {
++ return z.x;
++ }
++
++ template <typename Treal>
++ __device__ __host__ constexpr Treal imag(const rocfft_complex<Treal>& z)
++ {
++ return z.y;
++ }
++
++ template <typename Treal>
++ __device__ __host__ constexpr rocfft_complex<Treal> conj(const rocfft_complex<Treal>& z)
++ {
++ return {z.x, -z.y};
++ }
++
++ template <typename Treal>
++ __device__ __host__ inline Treal norm(const rocfft_complex<Treal>& z)
++ {
++ return (z.x * z.x) + (z.y * z.y);
++ }
++
++ template <typename Treal>
++ __device__ __host__ inline Treal abs(const rocfft_complex<Treal>& z)
++ {
++ Treal tr = rocfft_complex<Treal>::abs(z.x), ti = rocfft_complex<Treal>::abs(z.y);
++ return tr > ti ? (ti /= tr, tr * rocfft_complex<Treal>::sqrt(ti * ti + 1))
++ : ti ? (tr /= ti, ti * rocfft_complex<Treal>::sqrt(tr * tr + 1))
++ : 0;
++ }
++}
++
++#endif // ROCFFT_COMPLEX_H
+diff --git a/shared/rocfft_hip.h b/shared/rocfft_hip.h
+new file mode 100644
+index 0000000..e086cab
+--- /dev/null
++++ b/shared/rocfft_hip.h
+@@ -0,0 +1,52 @@
++// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef __ROCFFT_HIP_H__
++#define __ROCFFT_HIP_H__
++
++#include <hip/hip_runtime_api.h>
++#include <stdexcept>
++
++class rocfft_scoped_device
++{
++public:
++ rocfft_scoped_device(int device)
++ {
++ if(hipGetDevice(&orig_device) != hipSuccess)
++ throw std::runtime_error("hipGetDevice failure");
++
++ if(hipSetDevice(device) != hipSuccess)
++ throw std::runtime_error("hipSetDevice failure");
++ }
++ ~rocfft_scoped_device()
++ {
++ (void)hipSetDevice(orig_device);
++ }
++
++ // not copyable or movable
++ rocfft_scoped_device(const rocfft_scoped_device&) = delete;
++ rocfft_scoped_device(rocfft_scoped_device&&) = delete;
++ rocfft_scoped_device& operator=(const rocfft_scoped_device&) = delete;
++
++private:
++ int orig_device;
++};
++
++#endif // __ROCFFT_HIP_H__
+diff --git a/shared/rocfft_params.h b/shared/rocfft_params.h
+new file mode 100644
+index 0000000..bf9b728
+--- /dev/null
++++ b/shared/rocfft_params.h
+@@ -0,0 +1,585 @@
++// Copyright (C) 2021 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#ifndef ROCFFT_PARAMS_H
++#define ROCFFT_PARAMS_H
++
++#include "../shared/fft_params.h"
++#include "../shared/gpubuf.h"
++#include "rocfft/rocfft.h"
++
++// Return the string of the rocfft_status code
++static std::string rocfft_status_to_string(const rocfft_status ret)
++{
++ switch(ret)
++ {
++ case rocfft_status_success:
++ return "rocfft_status_success";
++ case rocfft_status_failure:
++ return "rocfft_status_failure";
++ case rocfft_status_invalid_arg_value:
++ return "rocfft_status_invalid_arg_value";
++ case rocfft_status_invalid_dimensions:
++ return "rocfft_status_invalid_dimensions";
++ case rocfft_status_invalid_array_type:
++ return "rocfft_status_invalid_array_type";
++ case rocfft_status_invalid_strides:
++ return "rocfft_status_invalid_strides";
++ case rocfft_status_invalid_distance:
++ return "rocfft_status_invalid_distance";
++ case rocfft_status_invalid_offset:
++ return "rocfft_status_invalid_offset";
++ case rocfft_status_invalid_work_buffer:
++ return "rocfft_status_invalid_work_buffer";
++ default:
++ throw std::runtime_error("unknown rocfft_status");
++ }
++}
++
++inline fft_status fft_status_from_rocfftparams(const rocfft_status val)
++{
++ switch(val)
++ {
++ case rocfft_status_success:
++ return fft_status_success;
++ case rocfft_status_failure:
++ return fft_status_failure;
++ case rocfft_status_invalid_arg_value:
++ return fft_status_invalid_arg_value;
++ case rocfft_status_invalid_dimensions:
++ return fft_status_invalid_dimensions;
++ case rocfft_status_invalid_array_type:
++ return fft_status_invalid_array_type;
++ case rocfft_status_invalid_strides:
++ return fft_status_invalid_strides;
++ case rocfft_status_invalid_distance:
++ return fft_status_invalid_distance;
++ case rocfft_status_invalid_offset:
++ return fft_status_invalid_offset;
++ case rocfft_status_invalid_work_buffer:
++ return fft_status_invalid_work_buffer;
++ default:
++ throw std::runtime_error("Invalid status");
++ }
++}
++
++inline rocfft_precision rocfft_precision_from_fftparams(const fft_precision val)
++{
++ switch(val)
++ {
++ case fft_precision_single:
++ return rocfft_precision_single;
++ case fft_precision_double:
++ return rocfft_precision_double;
++ case fft_precision_half:
++ return rocfft_precision_half;
++ default:
++ throw std::runtime_error("Invalid precision");
++ }
++}
++
++inline rocfft_array_type rocfft_array_type_from_fftparams(const fft_array_type val)
++{
++ switch(val)
++ {
++ case fft_array_type_complex_interleaved:
++ return rocfft_array_type_complex_interleaved;
++ case fft_array_type_complex_planar:
++ return rocfft_array_type_complex_planar;
++ case fft_array_type_real:
++ return rocfft_array_type_real;
++ case fft_array_type_hermitian_interleaved:
++ return rocfft_array_type_hermitian_interleaved;
++ case fft_array_type_hermitian_planar:
++ return rocfft_array_type_hermitian_planar;
++ case fft_array_type_unset:
++ return rocfft_array_type_unset;
++ }
++ return rocfft_array_type_unset;
++}
++
++inline rocfft_transform_type rocfft_transform_type_from_fftparams(const fft_transform_type val)
++{
++ switch(val)
++ {
++ case fft_transform_type_complex_forward:
++ return rocfft_transform_type_complex_forward;
++ case fft_transform_type_complex_inverse:
++ return rocfft_transform_type_complex_inverse;
++ case fft_transform_type_real_forward:
++ return rocfft_transform_type_real_forward;
++ case fft_transform_type_real_inverse:
++ return rocfft_transform_type_real_inverse;
++ default:
++ throw std::runtime_error("Invalid transform type");
++ }
++}
++
++inline rocfft_result_placement
++ rocfft_result_placement_from_fftparams(const fft_result_placement val)
++{
++ switch(val)
++ {
++ case fft_placement_inplace:
++ return rocfft_placement_inplace;
++ case fft_placement_notinplace:
++ return rocfft_placement_notinplace;
++ default:
++ throw std::runtime_error("Invalid result placement");
++ }
++}
++
++class rocfft_params : public fft_params
++{
++public:
++ rocfft_plan plan = nullptr;
++ rocfft_execution_info info = nullptr;
++ rocfft_plan_description desc = nullptr;
++ gpubuf_t<void> wbuffer;
++
++ explicit rocfft_params(){};
++
++ explicit rocfft_params(const fft_params& p)
++ : fft_params(p){};
++
++ rocfft_params(const rocfft_params&) = delete;
++ rocfft_params& operator=(const rocfft_params&) = delete;
++
++ ~rocfft_params()
++ {
++ free();
++ };
++
++ void free()
++ {
++ if(plan != nullptr)
++ {
++ rocfft_plan_destroy(plan);
++ plan = nullptr;
++ }
++ if(info != nullptr)
++ {
++ rocfft_execution_info_destroy(info);
++ info = nullptr;
++ }
++ if(desc != nullptr)
++ {
++ rocfft_plan_description_destroy(desc);
++ desc = nullptr;
++ }
++ wbuffer.free();
++ }
++
++ void validate_fields() const override
++ {
++ // row-major lengths including batch (i.e. batch is at the front)
++ std::vector<size_t> length_with_batch{nbatch};
++ std::copy(length.begin(), length.end(), std::back_inserter(length_with_batch));
++
++ auto validate_field = [&](const fft_field& f) {
++ for(const auto& b : f.bricks)
++ {
++ // bricks must have same dim as FFT, including batch
++ if(b.lower.size() != length.size() + 1 || b.upper.size() != length.size() + 1
++ || b.stride.size() != length.size() + 1)
++ throw std::runtime_error(
++ "brick dimension does not match FFT + batch dimension");
++
++ // ensure lower < upper, and that both fit in the FFT + batch dims
++ if(!std::lexicographical_compare(
++ b.lower.begin(), b.lower.end(), b.upper.begin(), b.upper.end()))
++ throw std::runtime_error("brick lower index is not less than upper index");
++
++ if(!std::lexicographical_compare(b.lower.begin(),
++ b.lower.end(),
++ length_with_batch.begin(),
++ length_with_batch.end()))
++ throw std::runtime_error(
++ "brick lower index is not less than FFT + batch length");
++
++ if(!std::lexicographical_compare(b.upper.begin(),
++ b.upper.end(),
++ length_with_batch.begin(),
++ length_with_batch.end())
++ && b.upper != length_with_batch)
++ throw std::runtime_error("brick upper index is not <= FFT + batch length");
++ }
++ };
++
++ for(const auto& ifield : ifields)
++ validate_field(ifield);
++ for(const auto& ofield : ofields)
++ validate_field(ofield);
++ }
++
++ rocfft_precision get_rocfft_precision()
++ {
++ return rocfft_precision_from_fftparams(precision);
++ }
++
++ size_t vram_footprint() override
++ {
++ size_t val = fft_params::vram_footprint();
++ if(setup_structs() != fft_status_success)
++ {
++ throw std::runtime_error("Struct setup failed");
++ }
++ val += workbuffersize;
++
++ return val;
++ }
++
++ // Convert the generic fft_field structure to a rocfft_field
++ // structure that can be passed to rocFFT. In particular, we need
++ // to convert from row-major to column-major.
++ static rocfft_field fft_field_to_rocfft_field(const fft_field& f)
++ {
++ rocfft_field rfield = nullptr;
++ if(f.bricks.empty())
++ return rfield;
++
++ if(rocfft_field_create(&rfield) != rocfft_status_success)
++ throw std::runtime_error("rocfft_field_create failed");
++ for(const auto& b : f.bricks)
++ {
++ // rocFFT wants column-major bricks and fft_params stores
++ // row-major
++ std::vector<size_t> lower_cm;
++ std::copy(b.lower.rbegin(), b.lower.rend(), std::back_inserter(lower_cm));
++ std::vector<size_t> upper_cm;
++ std::copy(b.upper.rbegin(), b.upper.rend(), std::back_inserter(upper_cm));
++ std::vector<size_t> stride_cm;
++ std::copy(b.stride.rbegin(), b.stride.rend(), std::back_inserter(stride_cm));
++
++ rocfft_brick rbrick = nullptr;
++ if(rocfft_brick_create(&rbrick,
++ lower_cm.data(), // field_lower
++ upper_cm.data(), // field_upper
++ stride_cm.data(), // brick_stride
++ lower_cm.size(), // dim
++ b.device) // deviceID
++ != rocfft_status_success)
++ throw std::runtime_error("rocfft_brick_create failed");
++
++ if(rocfft_field_add_brick(rfield, rbrick) != rocfft_status_success)
++ throw std::runtime_error("rocfft_field_add_brick failed");
++
++ rocfft_brick_destroy(rbrick);
++ }
++ return rfield;
++ }
++
++ fft_status setup_structs()
++ {
++ rocfft_status fft_status = rocfft_status_success;
++ if(desc == nullptr)
++ {
++ rocfft_plan_description_create(&desc);
++ if(fft_status != rocfft_status_success)
++ return fft_status_from_rocfftparams(fft_status);
++
++ fft_status
++ = rocfft_plan_description_set_data_layout(desc,
++ rocfft_array_type_from_fftparams(itype),
++ rocfft_array_type_from_fftparams(otype),
++ ioffset.data(),
++ ooffset.data(),
++ istride_cm().size(),
++ istride_cm().data(),
++ idist,
++ ostride_cm().size(),
++ ostride_cm().data(),
++ odist);
++ if(fft_status != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_plan_description_set_data_layout failed");
++ }
++
++ if(scale_factor != 1.0)
++ {
++ fft_status = rocfft_plan_description_set_scale_factor(desc, scale_factor);
++ if(fft_status != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_plan_description_set_scale_factor failed");
++ }
++ }
++
++ for(const auto& ifield : ifields)
++ {
++ rocfft_field infield = fft_field_to_rocfft_field(ifield);
++ if(rocfft_plan_description_add_infield(desc, infield) != rocfft_status_success)
++ throw std::runtime_error("rocfft_description_add_infield failed");
++ rocfft_field_destroy(infield);
++ }
++
++ for(const auto& ofield : ofields)
++ {
++ rocfft_field outfield = fft_field_to_rocfft_field(ofield);
++ if(rocfft_plan_description_add_outfield(desc, outfield) != rocfft_status_success)
++ throw std::runtime_error("rocfft_description_add_outfield failed");
++ rocfft_field_destroy(outfield);
++ }
++ }
++
++ if(plan == nullptr)
++ {
++ fft_status = rocfft_plan_create(&plan,
++ rocfft_result_placement_from_fftparams(placement),
++ rocfft_transform_type_from_fftparams(transform_type),
++ get_rocfft_precision(),
++ length_cm().size(),
++ length_cm().data(),
++ nbatch,
++ desc);
++ if(fft_status != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_plan_create failed");
++ }
++ }
++
++ if(info == nullptr)
++ {
++ fft_status = rocfft_execution_info_create(&info);
++ if(fft_status != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_execution_info_create failed");
++ }
++ }
++
++ fft_status = rocfft_plan_get_work_buffer_size(plan, &workbuffersize);
++ if(fft_status != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_plan_get_work_buffer_size failed");
++ }
++
++ return fft_status_from_rocfftparams(fft_status);
++ }
++
++ fft_status create_plan() override
++ {
++ fft_status ret = setup_structs();
++ if(ret != fft_status_success)
++ {
++ return ret;
++ }
++ if(workbuffersize > 0)
++ {
++ hipError_t hip_status = hipSuccess;
++ hip_status = wbuffer.alloc(workbuffersize);
++ if(hip_status != hipSuccess)
++ {
++ std::ostringstream oss;
++ oss << "work buffer allocation failed (" << workbuffersize << " requested)";
++ size_t mem_free = 0;
++ size_t mem_total = 0;
++ hip_status = hipMemGetInfo(&mem_free, &mem_total);
++ if(hip_status == hipSuccess)
++ {
++ oss << "free vram: " << mem_free << " total vram: " << mem_total;
++ }
++ else
++ {
++ oss << "hipMemGetInfo also failed";
++ }
++ throw work_buffer_alloc_failure(oss.str());
++ }
++
++ auto rocret
++ = rocfft_execution_info_set_work_buffer(info, wbuffer.data(), workbuffersize);
++ if(rocret != rocfft_status_success)
++ {
++ throw std::runtime_error("rocfft_execution_info_set_work_buffer failed");
++ }
++ }
++
++ return ret;
++ }
++
++ fft_status set_callbacks(void* load_cb_host,
++ void* load_cb_data,
++ void* store_cb_host,
++ void* store_cb_data) override
++ {
++ if(run_callbacks)
++ {
++ auto roc_status
++ = rocfft_execution_info_set_load_callback(info, &load_cb_host, &load_cb_data, 0);
++ if(roc_status != rocfft_status_success)
++ return fft_status_from_rocfftparams(roc_status);
++
++ roc_status
++ = rocfft_execution_info_set_store_callback(info, &store_cb_host, &store_cb_data, 0);
++ if(roc_status != rocfft_status_success)
++ return fft_status_from_rocfftparams(roc_status);
++ }
++ return fft_status_success;
++ }
++
++ fft_status execute(void** in, void** out) override
++ {
++ auto ret = rocfft_execute(plan, in, out, info);
++ return fft_status_from_rocfftparams(ret);
++ }
++
++ // scatter data to multiple GPUs and adjust I/O buffers to match
++ void multi_gpu_prepare(std::vector<gpubuf>& ibuffer,
++ std::vector<void*>& pibuffer,
++ std::vector<void*>& pobuffer) override
++ {
++ auto alloc_fields = [&](const fft_params::fft_field& field,
++ fft_array_type array_type,
++ std::vector<void*>& pbuffer,
++ bool copy_input) {
++ if(field.bricks.empty())
++ return;
++
++ // we have a field defined, clear the list of buffers as
++ // we'll be allocating new ones for each brick
++ pbuffer.clear();
++
++ for(const auto& b : field.bricks)
++ {
++ // get brick's length - note that this includes batch
++ // dimension
++ const auto brick_len = b.length();
++ const auto brick_stride = b.stride;
++
++ const size_t brick_size_elems = product(brick_len.begin(), brick_len.end());
++ const size_t elem_size_bytes = var_size<size_t>(precision, array_type);
++ const size_t brick_size_bytes = brick_size_elems * elem_size_bytes;
++
++ // set device for the alloc, but we want to return to the
++ // default device as the source of a following memcpy
++ {
++ rocfft_scoped_device dev(b.device);
++ multi_gpu_data.emplace_back();
++ if(multi_gpu_data.back().alloc(brick_size_bytes) != hipSuccess)
++ throw std::runtime_error("device allocation failure");
++ pbuffer.push_back(multi_gpu_data.back().data());
++ }
++
++ if(copy_input)
++ {
++ // For now, assume we're only splitting on highest FFT
++ // dimension, lower-dimensional FFT data is all
++ // contiguous, and batches are contiguous in each brick.
++ //
++ // That means we can express this as a 2D memcpy.
++ const size_t unbatched_elems_per_brick
++ = product(brick_len.begin() + 1, brick_len.end());
++ const size_t unbatched_elems_per_fft = product(length.begin(), length.end());
++
++ // get this brick's starting offset in the field
++ const size_t brick_offset
++ = b.lower_field_offset(istride, idist) * elem_size_bytes;
++
++ // copy from original input - note that we're
++ // assuming interleaved data so ibuffer has only one
++ // gpubuf
++ if(hipMemcpy2D(pbuffer.back(),
++ unbatched_elems_per_brick * elem_size_bytes,
++ ibuffer.front().data_offset(brick_offset),
++ unbatched_elems_per_fft * elem_size_bytes,
++ unbatched_elems_per_brick * elem_size_bytes,
++ brick_len.front(),
++ hipMemcpyHostToDevice)
++ != hipSuccess)
++ throw std::runtime_error("hipMemcpy failure");
++ }
++ }
++
++ // if we copied the input to all the other devices, and
++ // this is an out-of-place transform, we no longer
++ // need the original input
++ if(copy_input && placement == fft_placement_notinplace)
++ ibuffer.clear();
++ };
++
++ // assume one input, one output field for simple cases
++ if(!ifields.empty())
++ alloc_fields(ifields.front(), itype, pibuffer, true);
++ if(!ofields.empty())
++ {
++ if(!ifields.empty() && placement == fft_placement_inplace)
++ pobuffer = pibuffer;
++ else
++ alloc_fields(ofields.front(), otype, pobuffer, false);
++ }
++ }
++
++ // when preparing for multi-GPU transform, we need to allocate data
++ // on each GPU. This vector remembers all of those allocations.
++ std::vector<gpubuf> multi_gpu_data;
++
++ // gather data after multi-GPU FFT for verification
++ void multi_gpu_finalize(std::vector<gpubuf>& obuffer, std::vector<void*>& pobuffer) override
++ {
++ if(ofields.empty())
++ return;
++
++ for(size_t i = 0; i < ofields.front().bricks.size(); ++i)
++ {
++ const auto& b = ofields.front().bricks[i];
++ const auto& brick_ptr = pobuffer[i];
++
++ const auto brick_len = b.length();
++
++ const size_t elem_size_bytes = var_size<size_t>(precision, otype);
++
++ // get this brick's starting offset in the field
++ const size_t brick_offset = b.lower_field_offset(ostride, odist) * elem_size_bytes;
++
++ // switch device to where we're copying from
++ rocfft_scoped_device dev(b.device);
++
++ // For now, assume we're only splitting on highest FFT
++ // dimension, lower-dimensional FFT data is all
++ // contiguous, and batches are contiguous in each brick.
++ //
++ // That means we can express this as a 2D memcpy.
++ const size_t unbatched_elems_per_brick
++ = product(brick_len.begin() + 1, brick_len.end());
++ const auto output_length = olength();
++ const size_t unbatched_elems_per_fft
++ = product(output_length.begin(), output_length.end());
++
++ // copy to original output buffer - note that
++ // we're assuming interleaved data so obuffer
++ // has only one gpubuf
++ if(hipMemcpy2D(obuffer.front().data_offset(brick_offset),
++ unbatched_elems_per_fft * elem_size_bytes,
++ brick_ptr,
++ unbatched_elems_per_brick * elem_size_bytes,
++ unbatched_elems_per_brick * elem_size_bytes,
++ brick_len.front(),
++ hipMemcpyDeviceToDevice)
++ != hipSuccess)
++ throw std::runtime_error("hipMemcpy failure");
++
++ // device-to-device transfers don't synchronize with the
++ // host, add explicit sync
++ (void)hipDeviceSynchronize();
++ }
++ pobuffer.clear();
++ pobuffer.push_back(obuffer.front().data());
++ }
++};
++
++#endif
+diff --git a/shared/test_params.h b/shared/test_params.h
+new file mode 100644
+index 0000000..8d8f6f7
+--- /dev/null
++++ b/shared/test_params.h
+@@ -0,0 +1,51 @@
++// Copyright (C) 2016 - 2023 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++#ifndef TESTCONSTANTS_H
++#define TESTCONSTANTS_H
++
++#include <stdexcept>
++
++extern int verbose;
++extern size_t ramgb;
++extern size_t vramgb;
++
++extern size_t n_random_tests;
++
++extern size_t random_seed;
++extern double planar_prob;
++extern double callback_prob;
++
++extern double half_epsilon;
++extern double single_epsilon;
++extern double double_epsilon;
++extern bool skip_runtime_fails;
++
++extern double max_linf_eps_double;
++extern double max_l2_eps_double;
++extern double max_linf_eps_single;
++extern double max_l2_eps_single;
++extern double max_linf_eps_half;
++extern double max_l2_eps_half;
++
++extern int n_hip_failures;
++
++#endif
+diff --git a/shared/work_queue.h b/shared/work_queue.h
+new file mode 100644
+index 0000000..e13fc41
+--- /dev/null
++++ b/shared/work_queue.h
+@@ -0,0 +1,49 @@
++// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a copy
++// of this software and associated documentation files (the "Software"), to deal
++// in the Software without restriction, including without limitation the rights
++// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++// copies of the Software, and to permit persons to whom the Software is
++// furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++
++#pragma once
++
++#include <condition_variable>
++#include <mutex>
++#include <queue>
++template <typename _WorkItem>
++struct WorkQueue
++{
++ void push(_WorkItem&& i)
++ {
++ std::unique_lock<std::mutex> lock(queueMutex);
++ items.emplace(std::move(i));
++ emptyWait.notify_all();
++ }
++ _WorkItem pop()
++ {
++ std::unique_lock<std::mutex> lock(queueMutex);
++ while(items.empty())
++ emptyWait.wait(lock);
++ _WorkItem item(items.front());
++ items.pop();
++ return item;
++ }
++
++private:
++ std::queue<_WorkItem> items;
++ std::mutex queueMutex;
++ std::condition_variable emptyWait;
++};
diff --git a/var/spack/repos/builtin/packages/hipfft/package.py b/var/spack/repos/builtin/packages/hipfft/package.py
index 818a9c4935..25d640fc22 100644
--- a/var/spack/repos/builtin/packages/hipfft/package.py
+++ b/var/spack/repos/builtin/packages/hipfft/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.variant
from spack.package import *
@@ -14,9 +15,9 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
It sits between the application and the backend FFT library, marshalling
inputs into the backend and results back to the application."""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipFFT"
- git = "https://github.com/ROCmSoftwarePlatform/hipFFT.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipfft/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipFFT"
+ git = "https://github.com/ROCm/hipFFT.git"
+ url = "https://github.com/ROCm/hipfft/archive/rocm-6.1.0.tar.gz"
tags = ["rocm"]
maintainers("renjithravindrankannath", "srekolam")
@@ -24,61 +25,27 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
license("MIT")
version("master", branch="master")
+ version("6.2.4", sha256="308b81230498b01046f7fc3299a9e9c2c5456d80fd71a94f490ad97f51ed9de8")
+ version("6.2.1", sha256="5f668fa8b5ed10d47d164d887699d3c14d900d78f6a31bf953f8fbbc08bc5fd1")
+ version("6.2.0", sha256="8d19aebb1bbfea1f235ca08d34393ce39bea35dc9cbfa72a3cf7cdf1c56410e7")
+ version("6.1.2", sha256="6753e45d9c671d58e68bed2b0c1bfcd40fad9d690dba3fe6011e67e51dbe3cc6")
+ version("6.1.1", sha256="df84e488098d457a7411f6b459537fa5c5ee160027efc3a9a076980bbe57c4d3")
+ version("6.1.0", sha256="1a9cf598a932192f7f12b8987d96477f09186f9a95c5a28742f9caeb81640c95")
+ version("6.0.2", sha256="c0a4bac5fa9a757a19a4995fa9571328b6ee0a71e93c66a880069794d65d284a")
+ version("6.0.0", sha256="44f328b7862c066459089dfe62833cb7d626c6ceb71c57d8c7d6bba45dad491e")
version("5.7.1", sha256="33452576649df479f084076c47d0b30f6f1da34864094bce767dd9bf609f04aa")
version("5.7.0", sha256="daa5dc44580145e85ff8ffa7eb40a3d1ef41f3217549c01281715ff696a31588")
version("5.6.1", sha256="d2ae36b8eacd39b865e8a7972b8eb86bcea2de4ac90711bba7e29b39b01eaa74")
version("5.6.0", sha256="c7f425b693caf9371b42226d86392335d993a117d23219b6ba1fd13523cb8261")
version("5.5.1", sha256="3addd15a459752ad657e84c2a7b6b6289600d1d0a5f90d6e0946ba11e8148fc0")
version("5.5.0", sha256="47ec6f7da7346c312b80daaa8f763e86c7bdc33ac8617cfa3344068e5b20dd9e")
- version("5.4.3", sha256="ae37f40b6019a11f10646ef193716836f366d269eab3c5cc2ed09af85355b945")
- version("5.4.0", sha256="d0a8e790182928b3d19774b8db1eece9b881a422f6a7055c051b12739fded624")
- version("5.3.3", sha256="fd1662cd5b1e1bce9db53b320c0fe614179cd196251efc2ef3365d38922b5cdc")
- version("5.3.0", sha256="ebbe2009b86b688809b6b4d5c3929fc589db455218d54a37790f21339147c5df")
- version("5.2.3", sha256="10be731fe91ede5e9f254f6eb3bc00b4dbeab449477f3cac03de358a7d0a6fa1")
- version("5.2.1", sha256="6c8fbace2864ca992b2fca9dc8d0bb4488aef62045acdfcf249d53dd005ebd35")
- version("5.2.0", sha256="ec37edcd61837281c403802ccc1cb01ec3fa3ba135b5ab16617961b66d4cc3e2")
- version("5.1.3", sha256="c26fa64499293b25d0686bed04feb61378c878a4bb4a6d559e6cb7be1f6bf2ec")
- version("5.1.0", sha256="1bac7761c055355216cd262cdc0450aabb383addcb739b56ba849b2e6e013fa5")
- version(
- "5.0.2",
- sha256="9ef64694f5def0d6fb98dc89e46d7a3f7d005a61348ac0b52184a3b8e84c2383",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="867d0bdc6c9769c6cebc0c4594b24d5f3504157cdcef97a6a1668dd493ca6a15",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="32ba6a5f50cfede3777a43794371ffb1363302131d8a0382d96df90ed7bc911a",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="96636713bc6cdafbd5a9c1e98e816895448960c86b380fc0c3c9ffa28f670844",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="429cfd40415856da8f5c2c321b612800d6826ee121df5a4e6d1596cad5b51727",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="6e52e0eb5b2a13adaf317fe5b20b3e059589aabf2af87e4c67cb1022b861ba84",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="74253b0d92feff55ebb39b3fe4a22a6454160a60bdad37384aa5340fd8843f8a",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="885ffd4813f2c271150f1b8b386f0af775b38fc82b96ce6fd94eb4ba0c0180be",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="ae37f40b6019a11f10646ef193716836f366d269eab3c5cc2ed09af85355b945")
+ version("5.4.0", sha256="d0a8e790182928b3d19774b8db1eece9b881a422f6a7055c051b12739fded624")
+ version("5.3.3", sha256="fd1662cd5b1e1bce9db53b320c0fe614179cd196251efc2ef3365d38922b5cdc")
+ version("5.3.0", sha256="ebbe2009b86b688809b6b4d5c3929fc589db455218d54a37790f21339147c5df")
+
+ depends_on("cxx", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -96,25 +63,13 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
variant("rocm", default=True, description="Enable ROCm support")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3.5:", type="build")
depends_on("hip +cuda", when="+cuda")
for ver in [
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -125,14 +80,27 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ "master",
]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("rocfft@" + ver, when="+rocm @" + ver)
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"rocfft@{ver}", when=f"+rocm @{ver}")
for tgt in ROCmPackage.amdgpu_targets:
- depends_on(
- "rocfft amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
+ depends_on(f"rocfft amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
+ # https://github.com/ROCm/rocFFT/pull/85)
+ patch("001-remove-submodule-and-sync-shared-files-from-rocFFT.patch", when="@6.0.0")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
def cmake_args(self):
args = [self.define("BUILD_CLIENTS_SAMPLES", "OFF")]
@@ -143,9 +111,7 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define("BUILD_WITH_LIB", "CUDA"))
# FindHIP.cmake is still used for both +rocm and +cuda
- if self.spec["hip"].satisfies("@:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- else:
+ if self.spec["hip"].satisfies("@5.2:"):
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
if self.spec.satisfies("@5.2.0:"):
diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py
index be1819bf50..66d28801e0 100644
--- a/var/spack/repos/builtin/packages/hipfort/package.py
+++ b/var/spack/repos/builtin/packages/hipfort/package.py
@@ -9,89 +9,36 @@ from spack.package import *
class Hipfort(CMakePackage):
"""Radeon Open Compute Parallel Primitives Library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipfort"
- git = "https://github.com/ROCmSoftwarePlatform/hipfort.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipfort/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipfort"
+ git = "https://github.com/ROCm/hipfort.git"
+ url = "https://github.com/ROCm/hipfort/archive/rocm-6.1.1.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("cgmb", "srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="32daa4ee52c2d44790bff7a7ddde9d572e4785b2f54766a5e45d10228da0534b")
+ version("6.2.1", sha256="5258f2dd63aeebe29ce566e654c47b8e2e1f5eb8ca3da92af09c54517b259f32")
+ version("6.2.0", sha256="7f6db61a0ac7771e5c4604a6113b36736f6c7f05cabd7e1df8e832c98b87311d")
+ version("6.1.2", sha256="f60d07fa3e5b09246c8908b2876addf175a91e91c8b0fac85b000f88b6743c7c")
+ version("6.1.1", sha256="646f7077399db7a70d7102fda8307d0a11039f616399a4a06a64fd824336419f")
+ version("6.1.0", sha256="70d3ccc9f3536f62686e73934f5972ed011c4df7654ed1f8e6d2d42c4289f47e")
+ version("6.0.2", sha256="b60ada7474b71c1d82c700b0159bc0756dbb2808375054903710280b1677f199")
+ version("6.0.0", sha256="151cf11648885db799aade0d00a7882589e7195643b02beaa251f1b2a43aceed")
version("5.7.1", sha256="859fac509e195f3ab97c555b5f63afea325a61aae0f281cb19a970a1b533dead")
version("5.7.0", sha256="57b04d59f61683a1b141d6d831d10c9fdecea483991ec02d14c14e441e935c05")
version("5.6.1", sha256="a55345cc9ccaf0cd69d306b8eb9ec2a02c220a57e9c396443cc7273aa3377adc")
version("5.6.0", sha256="03176a099bc81e212ad1bf9d86f35561f8f2d21a2f126732d7620e1ea59888d5")
version("5.5.1", sha256="abc59f7b81cbefbe3555cbf1bf0d80e8aa65901c70799748c40870fe6f3fea60")
version("5.5.0", sha256="cae75ffeac129639cabebfe2f95f254c83d6c0a6cffd98142ea3537a132e42bb")
- version("5.4.3", sha256="1954a1cba351d566872ced5549b2ced7ab6332221e2b98dba3c07180dce8f173")
- version("5.4.0", sha256="a781bc6d1dbb508a4bd6cc3df931696fac6c6361d4fd35efb12c9a04a72e112c")
- version("5.3.3", sha256="593be86502578b68215ffe767c26849fd27d4dbd92c8e76762275805f99e64f5")
- version("5.3.0", sha256="9e2aa142de45b2d2c29449d6f82293fb62844d511fbf51fa597845ba05c700fa")
- version("5.2.3", sha256="6648350ca4edc8757f0ae51d73a05a9a536808f19ad45f5b5ab84d420c72c9ec")
- version("5.2.1", sha256="ed53c9914d326124482751b81c4a353c6e64e87c1111124169a33513a3c49b42")
- version("5.2.0", sha256="a0af1fe62757993600a41af6bb6c4b8c6cfdfba650389645ac1f995f7623785c")
- version("5.1.3", sha256="8f8849d8d0972366bafa41be35cf6a7a59480ed584d1ddff39768cb14247e9d4")
- version("5.1.0", sha256="1ddd46c00bb6bcd539a921d6a94d858f4e4408a35cb6910186c7517f375ae8ab")
- version(
- "5.0.2",
- sha256="fcee6e62482ab15f365681dbc12bd9ae26b0fab2f2848a3c14de8ec63004a7aa",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="af0f332fec082a03ca0403618ab20d31baadf3103e3371db9edc39dc9474ef4c",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="14599d027b57189c6734b04ace7792d2ae5c409cf7983c0970b086fb4e634dd8",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="48626dfb15bb5dcb044c9e1d4dc4b0654a2cd0abfc69485aa285dc20d7f40d51",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="279a35edbc0c22fa930a4355e663a86adf4d0316c5b1b6b9ccc6ee5c19c8c2e4",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="fd0ffdafdc17ac42c7dae3f89991651f15affdef9b2354da05c7493d09d8974e",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="b411cb32bf87927eba4c5573b412c56d75d15165e2f1c8ac5ac18e624ed3a4b4",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="2d335ae068d0cbb480575de7d3ea4868362af32cb195f911ee1aeced499f3974",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="a497645c33e0eff39abd5344756de63424733cde2837b7376c924b44ed5ae9c9",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="44173522d9eb2a18ec1cea2d9b00b237fe70501f0849bd6be3decbb73389487a",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="a3c4e125a9b56820446a65bd76b8caa196fddb0e0723eb513f0bcde9abd6a0c0",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="0132e9949f758dd8b8a462d133b3316101440cd503aa6c53bea9e34e61bbb3cc",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="1954a1cba351d566872ced5549b2ced7ab6332221e2b98dba3c07180dce8f173")
+ version("5.4.0", sha256="a781bc6d1dbb508a4bd6cc3df931696fac6c6361d4fd35efb12c9a04a72e112c")
+ version("5.3.3", sha256="593be86502578b68215ffe767c26849fd27d4dbd92c8e76762275805f99e64f5")
+ version("5.3.0", sha256="9e2aa142de45b2d2c29449d6f82293fb62844d511fbf51fa597845ba05c700fa")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("cmake@3.0.2:", type="build")
@@ -100,23 +47,6 @@ class Hipfort(CMakePackage):
depends_on("binutils", when="%cce")
for ver in [
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -127,8 +57,16 @@ class Hipfort(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", type="build", when=f"@{ver}")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
@@ -146,5 +84,8 @@ class Hipfort(CMakePackage):
"-DHIPFORT_RANLIB=" + join_path(self.spec["binutils"].prefix.bin, "ranlib")
)
args.append("-DHIPFORT_COMPILER_FLAGS='-ffree -eT'")
+ elif self.spec.satisfies("%gcc"):
+ args.append("-DHIPFORT_COMPILER={}".format(spack_fc))
+ args.append("-DHIPFORT_COMPILER_FLAGS='-ffree-form -cpp -ffree-line-length-none'")
return args
diff --git a/var/spack/repos/builtin/packages/hipify-clang/0001-use-source-permission-for-hipify-perl.patch b/var/spack/repos/builtin/packages/hipify-clang/0001-use-source-permission-for-hipify-perl.patch
new file mode 100644
index 0000000000..8d9290e40c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipify-clang/0001-use-source-permission-for-hipify-perl.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d105e2..0c1bbb5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -177,6 +177,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
+ install(
+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin
+ DESTINATION .
++ USE_SOURCE_PERMISSIONS
+ PATTERN "hipify-perl"
+ PATTERN "*.sh"
+ PATTERN "findcode.sh" EXCLUDE
diff --git a/var/spack/repos/builtin/packages/hipify-clang/0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch b/var/spack/repos/builtin/packages/hipify-clang/0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch
new file mode 100644
index 0000000000..363bff874e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipify-clang/0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 02df74d..a645aa4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -184,7 +184,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
+ # Install all folders under clang/version/ in CMAKE_INSTALL_PREFIX path.
+ install(
+ DIRECTORY ${LLVM_DIR}/../../clang/${LIB_CLANG_RES}/
+- DESTINATION .
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include
+ COMPONENT clang-resource-headers
+ FILES_MATCHING
+ PATTERN "*.h"
+@@ -199,7 +199,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
+ # install all folders under clang/version/ in CMAKE_INSTALL_PREFIX path
+ install(
+ DIRECTORY ${LLVM_DIR}/../../clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/
+- DESTINATION .
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include
+ COMPONENT clang-resource-headers
+ FILES_MATCHING
+ PATTERN "*.h"
diff --git a/var/spack/repos/builtin/packages/hipify-clang/package.py b/var/spack/repos/builtin/packages/hipify-clang/package.py
index ab15e479d4..ab254322b4 100644
--- a/var/spack/repos/builtin/packages/hipify-clang/package.py
+++ b/var/spack/repos/builtin/packages/hipify-clang/package.py
@@ -10,9 +10,9 @@ class HipifyClang(CMakePackage):
"""hipify-clang is a clang-based tool for translation CUDA
sources into HIP sources"""
- homepage = "https://github.com/ROCm-Developer-Tools/HIPIFY"
- git = "https://github.com/ROCm-Developer-Tools/HIPIFY.git"
- url = "https://github.com/ROCm-Developer-Tools/HIPIFY/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/HIPIFY"
+ git = "https://github.com/ROCm/HIPIFY.git"
+ url = "https://github.com/ROCm/HIPIFY/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -20,119 +20,41 @@ class HipifyClang(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("6.2.4", sha256="981af55ab4243f084b3e75007e827f7c94ac317fa84fe08d59c5872124a7d3c7")
+ version("6.2.1", sha256="db5680d677222596cf9edfb84ae96b37db829a40a2e0243d26ff24a16e03ff74")
+ version("6.2.0", sha256="11bfbde7c40e5cd5de02a47ec30dc6df4b233a12126bf7ee449432a30a3e6e1e")
+ version("6.1.2", sha256="7cc1e3fd7690a3e1d99cd07f2bd62ee73682cceeb4a46918226fc70f8092eb68")
+ version("6.1.1", sha256="240b83ccbe1b6514a6af6c2261e306948ce6c2b1c4d1056e830bbaebddeabd82")
+ version("6.1.0", sha256="dc61b476081750130c62c7540fce49ee3a45a2b74e185d20049382574c1842d1")
+ version("6.0.2", sha256="21e46276677ec8c00e61c0cbf5fa42185517f6af0d4845ea877fd40eb35198c4")
+ version("6.0.0", sha256="91bed2b72a6684a04e078e50b12b36b93f64ff96523283f4e5d9a33c11e6b967")
version("5.7.1", sha256="43121e62233dab010ab686d6805bc2d3163f0dc5e89cc503d50c4bcd59eeb394")
version("5.7.0", sha256="10e4386727e102fba166f012147120a6ec776e8d95fbcac3af93e243205d80a6")
version("5.6.1", sha256="ec3a4f276556f9fd924ea3c89be11b6c6ddf999cdd4387f669e38e41ee0042e8")
version("5.6.0", sha256="a2572037a7d3bd0813bd6819a5e6c0e911678db5fd3ab15a65370601df91891b")
version("5.5.1", sha256="35b9c07a7afaf9cf6f3bbe9dd147fa81b1b297af3e5e26e60c55629e83feaa48")
version("5.5.0", sha256="1b75c702799ac93027337f8fb61d7c27ba960e8ece60d907fc8c5ab3f15c3fe9")
- version("5.4.3", sha256="79e27bd6c0a28e6a62b02dccc0b5d88a81f69fe58487e83f3b7ab47d6b64341b")
- version("5.4.0", sha256="9f51eb280671ae7f7e14eb593ee3ef099899221c4bdccfbdb7a78681ad17f37f")
- version("5.3.3", sha256="9d08e2896e52c10a0a189a5407567043f2510adc7bf618591c97a22a23699691")
- version("5.3.0", sha256="7674900d2b9319d91fa8f469252c5acb5bedf339142417cdcb64f33ee8482e00")
- version("5.2.3", sha256="1314a37ab544b68fd51858b77d2d4b30ecff82ef3f90de6e80891a95f6749849")
- version("5.2.1", sha256="4d658d00b219f7ef40e832da3680852aeb4c258c0a114f1779fa4cda99ee23b1")
- version("5.2.0", sha256="dcd5f44daceb984bb654a209e78debf81e1cdeaf9202444a1e110b45ad6c3f4f")
- version("5.1.3", sha256="6354b08b8ab2f4c481398fb768652bae00bb78c4cec7a11d5f6c7e4cb831ddf1")
- version("5.1.0", sha256="ba792294cbdcc880e0f02e38ee352dff8d4a2c183430e13d1c5ed176bd46cfc5")
- version(
- "5.0.2",
- sha256="812bccfeb044483a1c7df89f45843afcb28d8146f348c792f082b693cbff3984",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="06fbb3259b6d014bc24fb3c05f71026bc39ae564559d40f2ca37236044c7ba17",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="f0d401e634642a1d6659b9163a38661ee38da1e1aceabb1f16f78f8fce048a4e",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="1f6e1bd4b9d64eed67f519c453fa65b362a20583df1f35fd09d08de831f3c8de",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="c5754f7c2c68ea4f65cc0ffc1e8ccc30634181525b25c10817e07eaa75ca8157",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="182b336a994e3de0dfbce935dc35091388d18a29e3cfdadb2ab7da8a2dc121a2",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="afdc82ae00e14e8e742be6cd47d8fb120d18fc52fe96cba8d8ac4c56176a432e",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="ec9cc410167b6ab31706742f3d7a77dbd29eb548e7371134b3aace8597665475",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="9d3906d606fca2bcb58f5f2a70cc4b9e298ca0e12a84ee5f18e42b7df97b38a4",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="7ebba22ed70100150bedddffa08a84f91b546347662862487b6703a1edce2623",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="07adb98e91ddd7420d873806866d53eaf77527fac57799e846823522191ba89a",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="095b876a750a0dc1ae669102ba53d668f65062b823f8be745411db86a2db7916",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="dd58c8b88d4b7877f2521b02954de79d570fa36fc751a17d33e56436ee02571e",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="31e7c11d3e221e15a2721456c4f8bceea9c28fd37345464c86ea74cf05ddf2c9",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="79e27bd6c0a28e6a62b02dccc0b5d88a81f69fe58487e83f3b7ab47d6b64341b")
+ version("5.4.0", sha256="9f51eb280671ae7f7e14eb593ee3ef099899221c4bdccfbdb7a78681ad17f37f")
+ version("5.3.3", sha256="9d08e2896e52c10a0a189a5407567043f2510adc7bf618591c97a22a23699691")
+ version("5.3.0", sha256="7674900d2b9319d91fa8f469252c5acb5bedf339142417cdcb64f33ee8482e00")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
# the patch was added to install the targets in the correct directory structure
# this will fix the issue https://github.com/spack/spack/issues/30711
patch("0001-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.1.0:5.5")
- patch("0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.6:")
+ patch("0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.6:6.0")
+ patch("0003-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@6.1")
+ patch("0001-use-source-permission-for-hipify-perl.patch", when="@6.2")
depends_on("cmake@3.5:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -143,12 +65,35 @@ class HipifyClang(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
def setup_run_environment(self, env):
# The installer puts the binaries directly into the prefix
@@ -159,4 +104,6 @@ class HipifyClang(CMakePackage):
args = []
if self.spec.satisfies("@5.5"):
args.append(self.define("SWDEV_375013", "ON"))
+ if self.spec.satisfies("@5.7.0:"):
+ args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
return args
diff --git a/var/spack/repos/builtin/packages/hiprand/package.py b/var/spack/repos/builtin/packages/hiprand/package.py
index 0d8666f884..5dc0d429c2 100644
--- a/var/spack/repos/builtin/packages/hiprand/package.py
+++ b/var/spack/repos/builtin/packages/hiprand/package.py
@@ -5,6 +5,7 @@
import re
+import spack.variant
from spack.package import *
@@ -12,9 +13,9 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
"""The hipRAND project provides an interface for generating pseudo-random
and quasi-random numbers with either cuRAND or rocRAND backends."""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipRAND"
- git = "https://github.com/ROCmSoftwarePlatform/hipRAND.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipRAND/archive/rocm-5.7.1.tar.gz"
+ homepage = "https://github.com/ROCm/hipRAND"
+ git = "https://github.com/ROCm/hipRAND.git"
+ url = "https://github.com/ROCm/hipRAND/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
@@ -24,21 +25,28 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="b6010f5e0c63a139acd92197cc1c0d64a428f7a0ad661bce0cd1e553ad6fd6eb")
+ version("6.2.1", sha256="0d4585b8adbc299f3fdc2c74bb20ffd4285027b861a759c3e62ce564589465da")
+ version("6.2.0", sha256="daaf32506eaaf3c3b715ed631387c27992cfe0d938353a88ad6acedc735eb54b")
+ version("6.1.2", sha256="f0f129811c144dd711e967305c7af283cefb94bfdbcd2a11296b92a9e966be2c")
+ version("6.1.1", sha256="dde1526fb6cde17b18bc9ee6daa719056fc468dfbda5801b9a61260daf2b4498")
+ version("6.1.0", sha256="f9d71af23092f8faa888d2c14713ee4d4d350454818ca9331d422c81c2587c1f")
+ version("6.0.2", sha256="cb6ff8f58c024b60b3914271921f58f0ab3bdbc9889a53795b40c99c9de0bcd4")
+ version("6.0.0", sha256="7e06c98f9da7c0b20b55b2106cf3a48b9ef6577a79549a455667ae97bd15b61d")
version("5.7.1", sha256="81a9f5f0960dce125ce1ab1c7eb58bb07c8756346f9e46a1cc65aa61d5a114f8")
version("5.7.0", sha256="4dee76719839503b02ce7d38e1c61bbdb2da18da7f63a7ef7012c84c71aa0a9d")
version("5.6.1", sha256="a73d5578bc7f8dff0b8960e4bff97bc4fc28f508a19ed6acd1cfd4d3e76b47ee")
version("5.6.0", sha256="8c214e2f90337a5317a69950026bf337b1e567d43bb9ae64f2a802af2228c313")
version("5.5.1", sha256="5df9d78eae0991be5ec9f60e8d3530fabc23793d9f9cf274b075d689675db04e")
version("5.5.0", sha256="7c7dde7b989d5da9c0b0251233245f955b477c090462c7d34e3e0284c5fca761")
- version("5.4.3", sha256="7d3d04476880ec90c088dff81f69aac8699eaef972476000e5c4726584ffa98f")
- version("5.4.0", sha256="9456d4b4d5fd5c0b728f4aa4f8c224f829fe6fbf08e397848475293f71029a22")
- version("5.3.3", sha256="f72626b00d61ed2925b3124b7f094ccfaf7750f02bee6bac6b79317e1c5576ef")
- version("5.3.0", sha256="6fd9b3a719bf4c228657cb2a0ff283eb7d777ba31bfffe5a26589d588f89a279")
- version("5.2.3", sha256="56d62a94c8ce6e2fc55fff57f3d0931b6332654333d1ad5dee854aefb1548f66")
- version("5.2.1", sha256="27b00e15ca1f6608a5625a246b55f3128ce32fdca605eb727f66c6322b77bf42")
- version("5.2.0", sha256="3d179aa928446471651ef2f308779b5946b3ba9bbc1643689b0abc56e6ec2f5e")
- version("5.1.3", sha256="6965e30a6ec0bef4ee251d144785a4dda55dff32aed27e12dc1b4dc0c4bbc094")
- version("5.1.0", sha256="a3dd384439047bdad60864f0aff7fcf855a6a601458b05770d054b53c1a7cae2")
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="7d3d04476880ec90c088dff81f69aac8699eaef972476000e5c4726584ffa98f")
+ version("5.4.0", sha256="9456d4b4d5fd5c0b728f4aa4f8c224f829fe6fbf08e397848475293f71029a22")
+ version("5.3.3", sha256="f72626b00d61ed2925b3124b7f094ccfaf7750f02bee6bac6b79317e1c5576ef")
+ version("5.3.0", sha256="6fd9b3a719bf4c228657cb2a0ff283eb7d777ba31bfffe5a26589d588f89a279")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -62,6 +70,7 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
values=("Release", "Debug", "RelWithDebInfo"),
description="CMake build type",
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3.10.2:", type="build")
@@ -73,11 +82,6 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
depends_on("googletest@1.10.0:", type="test")
for ver in [
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -88,6 +92,14 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
"develop",
]:
@@ -101,6 +113,8 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
@classmethod
def determine_version(cls, lib):
diff --git a/var/spack/repos/builtin/packages/hipsolver/0001-suite-sparse-include-path-6.1.1.patch b/var/spack/repos/builtin/packages/hipsolver/0001-suite-sparse-include-path-6.1.1.patch
new file mode 100644
index 0000000000..79f1713a04
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsolver/0001-suite-sparse-include-path-6.1.1.patch
@@ -0,0 +1,38 @@
+From 329ee96fa7004c6fb0a8f93375e9081ef717fbab Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Fri, 31 May 2024 19:51:49 +0000
+Subject: [PATCH] suite-sparse include and library path 6.1.1
+
+---
+ CMakeLists.txt | 1 +
+ library/src/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 52a059a..fddda0b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,6 +88,7 @@ include( ROCMPackageConfigHelpers )
+ include( ROCMInstallSymlinks )
+ include( ROCMClients )
+ include( ROCMHeaderWrapper )
++include_directories(${SUITE_SPARSE_PATH}/include)
+
+ set ( VERSION_STRING "2.1.1" )
+ rocm_setup_version( VERSION ${VERSION_STRING} )
+diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
+index ec708df..7b0e414 100644
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -135,7 +135,7 @@ if( NOT USE_CUDA )
+ endif( )
+ endif( )
+
+- target_link_libraries( hipsolver PRIVATE roc::rocsparse suitesparseconfig cholmod )
++ target_link_libraries( hipsolver PRIVATE roc::rocsparse ${SUITE_SPARSE_LIBDIR}/libsuitesparseconfig.so ${SUITE_SPARSE_LIBDIR}/libcholmod.so )
+ set_source_files_properties(${hipsolver_source}
+ PROPERTIES
+ COMPILE_DEFINITIONS HAVE_ROCSPARSE
+--
+2.17.1
+
diff --git a/var/spack/repos/builtin/packages/hipsolver/001-suite-sparse-include-path.patch b/var/spack/repos/builtin/packages/hipsolver/001-suite-sparse-include-path.patch
new file mode 100644
index 0000000000..5a33b969e7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsolver/001-suite-sparse-include-path.patch
@@ -0,0 +1,38 @@
+From 90c1913a29f6ee097aea18a66deb0a4fb0bc0066 Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Sat, 8 Jun 2024 00:46:22 +0000
+Subject: [PATCH] add SUITE_SPARSE_PATH to the CMakeLists.txt
+
+---
+ CMakeLists.txt | 1 +
+ library/src/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 95a2393..b403f57 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,6 +88,7 @@ include( ROCMPackageConfigHelpers )
+ include( ROCMInstallSymlinks )
+ include( ROCMClients )
+ include( ROCMHeaderWrapper )
++include_directories(${SUITE_SPARSE_PATH}/include/suitesparse)
+
+ set ( VERSION_STRING "2.1.0" )
+ rocm_setup_version( VERSION ${VERSION_STRING} )
+diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
+index ab448f4..f3d759e 100644
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -135,7 +135,7 @@ if( NOT USE_CUDA )
+ endif( )
+ endif( )
+
+- target_link_libraries( hipsolver PRIVATE roc::rocsparse suitesparseconfig cholmod )
++ target_link_libraries( hipsolver PRIVATE roc::rocsparse ${SUITE_SPARSE_LIBDIR}/libsuitesparseconfig.so ${SUITE_SPARSE_LIBDIR}/libcholmod.so )
+ target_include_directories( hipsolver
+ SYSTEM PRIVATE
+ $<BUILD_INTERFACE:/usr/include/suitesparse/>
+--
+2.27.0
+
diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py
index f39755d03d..7aab4e720d 100644
--- a/var/spack/repos/builtin/packages/hipsolver/package.py
+++ b/var/spack/repos/builtin/packages/hipsolver/package.py
@@ -3,8 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
import re
+import spack.variant
from spack.package import *
@@ -16,9 +18,9 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
regardless of the chosen backend. Currently, hipSOLVER supports rocSOLVER
and cuSOLVER as backends."""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipSOLVER"
- git = "https://github.com/ROCmSoftwarePlatform/hipSOLVER.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipSOLVER/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipSOLVER"
+ git = "https://github.com/ROCm/hipSOLVER.git"
+ url = "https://github.com/ROCm/hipSOLVER/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
@@ -28,41 +30,29 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="4dc564498361cb1bac17dcfeaf0f2b9c85320797c75b05ee33160a133f5f4a15")
+ version("6.2.1", sha256="614e3c0bc11bfa84acd81d46db63f3852a750adaaec094b7701ab7b996cc8e93")
+ version("6.2.0", sha256="637577a9cc38e4865894dbcd7eb35050e3de5d45e6db03472e836b318602a84d")
+ version("6.1.2", sha256="406a8e5b82daae2fc03e0a738b5a054ade01bb41785cee4afb9e21c7ec91d492")
+ version("6.1.1", sha256="01d4553458f417824807c069cacfc65d23f6cac79536158473b4356986c8fafd")
+ version("6.1.0", sha256="3cb89ca486cdbdfcb1a07c35ee65f60219ef7bc62a5b0f94ca1a3206a0106495")
+ version("6.0.2", sha256="8215e55c3a5bc9c7eeb141cefdc6a6eeba94d8bc3aeae9e685ab7904965040d4")
+ version("6.0.0", sha256="385849db02189d5e62096457e52ae899ae5c1ae7d409dc1da61f904d8861b48c")
version("5.7.1", sha256="5592e965c0dc5722931302289643d1ece370220af2c7afc58af97b3395295658")
version("5.7.0", sha256="0e35795bfbcb57ed8e8437471209fb7d230babcc31d9a4a0b3640c3ee639f4a7")
version("5.6.1", sha256="2e546bc7771f7bf0aa7892b69cded725941573e8b70614759c3d03c21eb78dde")
version("5.6.0", sha256="11fa51d210853d93d24d55b20367738e49711793412f58e8d7689710b92ae16c")
version("5.5.1", sha256="826bd64a4887176595bb7319d9a3612e7327602efe1f42aa3f2ad0e783d1a180")
version("5.5.0", sha256="0f45be0f90907381ae3e82424599e2ca2112d6411b4a64c72558d63f00409b83")
- version("5.4.3", sha256="02a1bffecc494393f49f97174db7d2c101db557d32404923a44520876e682e3a")
- version("5.4.0", sha256="d53d81c55b458ba5e6ea0ec6bd24bcc79ab06789730391da82d8c33b936339d9")
- version("5.3.3", sha256="f5a487a1c7225ab748996ac4d837ac7ab26b43618c4ed97a124f8fac1d67786e")
- version("5.3.0", sha256="6e920a59ddeefd52c9a6d164c33bc097726529e1ede3c417c711697956655b15")
- version("5.2.3", sha256="a57d883fdd09c6c7f9856fcfcabee6fa7ff9beed33d2f1a465bf28d38ea6f364")
- version("5.2.1", sha256="e000b08cf7bfb5f8f6d65d163ebeeb3274172b9f474228b810bde5e6f87f2b37")
- version("5.2.0", sha256="96927410e0a2cc0f50172604ef6437e15d2cf4b62d22b2035f13aae21f43dc82")
- version("5.1.3", sha256="96faa799a2db8078b72f9c3b5c199179875a7c20dc1064371b22a6a63397c145")
- version("5.1.0", sha256="697ba2b2814e7ac6f79680e6455b4b5e0def1bee2014b6940f47be7d13c0ae74")
- version(
- "5.0.2",
- sha256="cabeada451686ed7904a452c5f8fd3776721507db1c06f426cd8d7189ff4a441",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="c59a5783dbbcb6a601c0e73d85d4a64d6d2c8f46009c01cb2b9886323f11e02b",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="9807bf1da0da25940b546cf5d5d6064d46d837907e354e10c6eeb2ef7c296a93",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="ee1176e977736a6e6fcba507fe6f56fcb3cefd6ba741cceb28464ea8bc476cd8",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="02a1bffecc494393f49f97174db7d2c101db557d32404923a44520876e682e3a")
+ version("5.4.0", sha256="d53d81c55b458ba5e6ea0ec6bd24bcc79ab06789730391da82d8c33b936339d9")
+ version("5.3.3", sha256="f5a487a1c7225ab748996ac4d837ac7ab26b43618c4ed97a124f8fac1d67786e")
+ version("5.3.0", sha256="6e920a59ddeefd52c9a6d164c33bc097726529e1ede3c417c711697956655b15")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -87,8 +77,10 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
values=("Release", "Debug", "RelWithDebInfo"),
description="CMake build type",
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3.5:", type="build")
+ depends_on("suite-sparse", type="build")
depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:")
depends_on("rocm-cmake@4.5.0:", type="build")
@@ -96,15 +88,6 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
depends_on("hip +cuda", when="+cuda")
for ver in [
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -115,26 +98,33 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
"develop",
]:
- depends_on("rocblas@" + ver, when="+rocm @" + ver)
- depends_on("rocsolver@" + ver, when="+rocm @" + ver)
+ depends_on(f"rocblas@{ver}", when=f"+rocm @{ver}")
+ depends_on(f"rocsolver@{ver}", when=f"+rocm @{ver}")
for tgt in ROCmPackage.amdgpu_targets:
- depends_on(
- "rocblas amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
- depends_on(
- "rocsolver amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
+ depends_on(f"rocblas amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
+ depends_on(f"rocsolver amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
depends_on("googletest@1.10.0:", type="test")
depends_on("netlib-lapack@3.7.1:", type="test")
+ patch("001-suite-sparse-include-path.patch", when="@6.1.0")
+ patch("0001-suite-sparse-include-path-6.1.1.patch", when="@6.1.1:")
def check(self):
exe = join_path(self.build_directory, "clients", "staging", "hipsolver-test")
- self.run_test(exe, options=["--gtest_filter=-*known_bug*"])
+ exe = which(exe)
+ exe(["--gtest_filter=-*known_bug*"])
@classmethod
def determine_version(cls, lib):
@@ -147,19 +137,24 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
ver = None
return ver
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
+
def cmake_args(self):
args = [
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
+ self.define("BUILD_FORTRAN_BINDINGS", "OFF"),
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
+ self.define("SUITE_SPARSE_PATH", self.spec["suite-sparse"].prefix),
+ self.define("ROCBLAS_PATH", self.spec["rocblas"].prefix),
]
args.append(self.define_from_variant("USE_CUDA", "cuda"))
# FindHIP.cmake is still used for +cuda
if self.spec.satisfies("+cuda"):
- if self.spec["hip"].satisfies("@:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- else:
+ if self.spec["hip"].satisfies("@5.2:"):
args.append(
self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip)
)
@@ -168,5 +163,8 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
if self.spec.satisfies("@5.3.0:"):
args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
-
+ libloc = self.spec["suite-sparse"].prefix.lib64
+ if not os.path.isdir(libloc):
+ libloc = self.spec["suite-sparse"].prefix.lib
+ args.append(self.define("SUITE_SPARSE_LIBDIR", libloc))
return args
diff --git a/var/spack/repos/builtin/packages/hipsparse/530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch b/var/spack/repos/builtin/packages/hipsparse/530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch
deleted file mode 100644
index afd14bdbb0..0000000000
--- a/var/spack/repos/builtin/packages/hipsparse/530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 530047af4a0f437dafc02f76b3a17e3b1536c7ec Mon Sep 17 00:00:00 2001
-From: Nico Trost <nico.trost@amd.com>
-Date: Sun, 21 Jun 2020 20:54:09 +0200
-Subject: [PATCH] fix for csr2csr_compress and nnz_compress
-
----
- library/src/nvcc_detail/hipsparse.cpp | 24 ++++--------------------
- 1 file changed, 4 insertions(+), 20 deletions(-)
-
-diff --git a/library/src/nvcc_detail/hipsparse.cpp b/library/src/nvcc_detail/hipsparse.cpp
-index 0883351..d7cbb8c 100644
---- a/library/src/nvcc_detail/hipsparse.cpp
-+++ b/library/src/nvcc_detail/hipsparse.cpp
-@@ -5213,10 +5213,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
- int* nnzC,
- hipComplex tol)
- {
-- cuComplex cutol;
-- cutol.x = tol.x;
-- cutol.y = tol.y;
--
- return hipCUSPARSEStatusToHIPStatus(cusparseCnnz_compress((cusparseHandle_t)handle,
- m,
- (const cusparseMatDescr_t)descrA,
-@@ -5224,7 +5220,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
- csrRowPtrA,
- nnzPerRow,
- nnzC,
-- cutol));
-+ {cuCrealf(tol), cuCimagf(tol)}));
- }
-
- hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
-@@ -5236,10 +5232,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
- int* nnzC,
- hipDoubleComplex tol)
- {
-- cuDoubleComplex cutol;
-- cutol.x = tol.x;
-- cutol.y = tol.y;
--
- return hipCUSPARSEStatusToHIPStatus(cusparseZnnz_compress((cusparseHandle_t)handle,
- m,
- (const cusparseMatDescr_t)descrA,
-@@ -5247,7 +5239,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
- csrRowPtrA,
- nnzPerRow,
- nnzC,
-- cutol));
-+ {cuCreal(tol), cuCimag(tol)}));
- }
-
- hipsparseStatus_t hipsparseXcsr2coo(hipsparseHandle_t handle,
-@@ -5773,10 +5765,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
- int* csrRowPtrC,
- hipComplex tol)
- {
-- cuComplex cutol;
-- cutol.x = tol.x;
-- cutol.y = tol.y;
--
- return hipCUSPARSEStatusToHIPStatus(cusparseCcsr2csr_compress((cusparseHandle_t)handle,
- m,
- n,
-@@ -5789,7 +5777,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
- (cuComplex*)csrValC,
- csrColIndC,
- csrRowPtrC,
-- cutol));
-+ {cuCrealf(tol), cuCimagf(tol)}));
- }
-
- hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
-@@ -5806,10 +5794,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
- int* csrRowPtrC,
- hipDoubleComplex tol)
- {
-- cuDoubleComplex cutol;
-- cutol.x = tol.x;
-- cutol.y = tol.y;
--
- return hipCUSPARSEStatusToHIPStatus(cusparseZcsr2csr_compress((cusparseHandle_t)handle,
- m,
- n,
-@@ -5822,7 +5806,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
- (cuDoubleComplex*)csrValC,
- csrColIndC,
- csrRowPtrC,
-- cutol));
-+ {cuCreal(tol), cuCimag(tol)}));
- }
-
- hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
diff --git a/var/spack/repos/builtin/packages/hipsparse/e79985dccde22d826aceb3badfc643a3227979d2.patch b/var/spack/repos/builtin/packages/hipsparse/e79985dccde22d826aceb3badfc643a3227979d2.patch
deleted file mode 100644
index 03ef1d222c..0000000000
--- a/var/spack/repos/builtin/packages/hipsparse/e79985dccde22d826aceb3badfc643a3227979d2.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From e79985dccde22d826aceb3badfc643a3227979d2 Mon Sep 17 00:00:00 2001
-From: Nico Trost <nico.trost@amd.com>
-Date: Sun, 21 Jun 2020 20:48:22 +0200
-Subject: [PATCH] fix for csr2csr_compress and nnz_compress
-
----
- library/src/hcc_detail/hipsparse.cpp | 24 ++++--------------------
- 1 file changed, 4 insertions(+), 20 deletions(-)
-
-diff --git a/library/src/hcc_detail/hipsparse.cpp b/library/src/hcc_detail/hipsparse.cpp
-index 7786d6e..5cf0ad6 100644
---- a/library/src/hcc_detail/hipsparse.cpp
-+++ b/library/src/hcc_detail/hipsparse.cpp
-@@ -6284,10 +6284,6 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
- int* csrRowPtrC,
- hipComplex tol)
- {
-- rocsparse_float_complex rtol;
-- rtol.x = tol.x;
-- rtol.y = tol.y;
--
- return rocSPARSEStatusToHIPStatus(
- rocsparse_ccsr2csr_compress((rocsparse_handle)handle,
- m,
-@@ -6301,7 +6297,7 @@ hipsparseStatus_t hipsparseCcsr2csr_compress(hipsparseHandle_t handle,
- (rocsparse_float_complex*)csrValC,
- csrRowPtrC,
- csrColIndC,
-- rtol));
-+ {hipCrealf(tol), hipCimagf(tol)}));
- }
-
- hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
-@@ -6318,10 +6314,6 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
- int* csrRowPtrC,
- hipDoubleComplex tol)
- {
-- rocsparse_double_complex rtol;
-- rtol.x = tol.x;
-- rtol.y = tol.y;
--
- return rocSPARSEStatusToHIPStatus(
- rocsparse_zcsr2csr_compress((rocsparse_handle)handle,
- m,
-@@ -6335,7 +6327,7 @@ hipsparseStatus_t hipsparseZcsr2csr_compress(hipsparseHandle_t handle,
- (rocsparse_double_complex*)csrValC,
- csrRowPtrC,
- csrColIndC,
-- rtol));
-+ {hipCreal(tol), hipCimag(tol)}));
- }
-
- hipsparseStatus_t hipsparseShyb2csr(hipsparseHandle_t handle,
-@@ -7006,10 +6998,6 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
- int* nnzC,
- hipComplex tol)
- {
-- rocsparse_float_complex rtol;
-- rtol.x = tol.x;
-- rtol.y = tol.y;
--
- RETURN_IF_ROCSPARSE_ERROR(rocsparse_cnnz_compress((rocsparse_handle)handle,
- m,
- (const rocsparse_mat_descr)descrA,
-@@ -7017,7 +7005,7 @@ hipsparseStatus_t hipsparseCnnz_compress(hipsparseHandle_t handle,
- csrRowPtrA,
- nnzPerRow,
- nnzC,
-- rtol));
-+ {hipCrealf(tol), hipCimagf(tol)}));
- return HIPSPARSE_STATUS_SUCCESS;
- }
-
-@@ -7030,10 +7018,6 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
- int* nnzC,
- hipDoubleComplex tol)
- {
-- rocsparse_double_complex rtol;
-- rtol.x = tol.x;
-- rtol.y = tol.y;
--
- RETURN_IF_ROCSPARSE_ERROR(rocsparse_znnz_compress((rocsparse_handle)handle,
- m,
- (const rocsparse_mat_descr)descrA,
-@@ -7041,7 +7025,7 @@ hipsparseStatus_t hipsparseZnnz_compress(hipsparseHandle_t handle,
- csrRowPtrA,
- nnzPerRow,
- nnzC,
-- rtol));
-+ {hipCreal(tol), hipCimag(tol)}));
- return HIPSPARSE_STATUS_SUCCESS;
- }
-
diff --git a/var/spack/repos/builtin/packages/hipsparse/package.py b/var/spack/repos/builtin/packages/hipsparse/package.py
index a195356fa4..b43712ed7f 100644
--- a/var/spack/repos/builtin/packages/hipsparse/package.py
+++ b/var/spack/repos/builtin/packages/hipsparse/package.py
@@ -5,6 +5,7 @@
import re
+import spack.variant
from spack.package import *
@@ -12,101 +13,37 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
"""hipSPARSE is a SPARSE marshalling library, with
multiple supported backends"""
- homepage = "https://github.com/ROCmSoftwarePlatform/hipSPARSE"
- git = "https://github.com/ROCmSoftwarePlatform/hipSPARSE.git"
- url = "https://github.com/ROCmSoftwarePlatform/hipSPARSE/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/hipSPARSE"
+ git = "https://github.com/ROCm/hipSPARSE.git"
+ url = "https://github.com/ROCm/hipSPARSE/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie")
libraries = ["libhipsparse"]
license("MIT")
-
+ version("6.2.4", sha256="0ecc0ff1eeb99e9a9ac419e49e9be9ec4cd23a117d819710114ee2f35aefe88b")
+ version("6.2.1", sha256="5a3241c857f705b1e5c64b3f5163575726e64a8d19f3957f7326622fda277710")
+ version("6.2.0", sha256="e51b9871d764763519c14be2ec52c1e1ae3959b439afb4be6518b9f9a6f0ebaf")
+ version("6.1.2", sha256="dd44f9b6000b3b0ac0fa238037a80f79d6745a689d4a6755f2d595643be1ef6d")
+ version("6.1.1", sha256="307cff012f0465942dd6666cb00ae60c35941699677c4b26b08e4832bc499059")
+ version("6.1.0", sha256="1d9277a11f71474ea4a9f8419a7a2c37170a86969584e5724e385ec74241e565")
+ version("6.0.2", sha256="40c1d2493f87c686d9afd84a00321ad10ca0d0d80d6dcfeee8e51858dd1bd8c1")
+ version("6.0.0", sha256="718a5f03b6a579c0542a60d00f5688bec53a181b429b7ee8ce3c8b6c4a78d754")
version("5.7.1", sha256="16c3818260611226c3576d8d55ad8f51e0890d2473503edf2c9313250ae65ca7")
version("5.7.0", sha256="729b749b5340034639873a99e6091963374f6f0456c8f36d076c96f03fe43888")
version("5.6.1", sha256="d636d0c5d1e38cc0c09b1e95380199ec82bd465b94bd6661f0c8d9374d9b565d")
version("5.6.0", sha256="3a6931b744ebaa4469a4c50d059a008403e4dc2a4f04dd69c3c6d20916b4a491")
version("5.5.1", sha256="3d291e4fe2c611d555e54de66149b204fe7ac59f5dd00a9ad93bc6dca0528880")
version("5.5.0", sha256="8122c8f17d899385de83efb7ac0d8a4fabfcd2aa21bbed63e63ea7adf0d22df6")
- version("5.4.3", sha256="b373eccd03679a13fab4e740fc780da25cbd598abca3a1e5e3613ae14954f9db")
- version("5.4.0", sha256="47420d38483c8124813b744971e428a0352c83d9b62a5a50f74ffa8f9b785b20")
- version("5.3.3", sha256="d96d0e47594ab12e8c380da2300704c105736a0771940d7d2fae666f2869e457")
- version("5.3.0", sha256="691b32b916952ed9af008aa29f60cc190322b73cfc098bb2eda3ff68c89c7b35")
- version("5.2.3", sha256="f70d3deff13188adc4105ef3ead53510e4b54075b9ffcfe3d3355d90d4b6eadd")
- version("5.2.1", sha256="7b8e4ff264285ae5aabb3c5c2b38bf28f90b2af44efb0398fcf13ffc24bc000a")
- version("5.2.0", sha256="4fdab6ec953c6d2d000687c5979077deafd37208cd722554b5a6ede1e5ba170c")
- version("5.1.3", sha256="6e6a0752654f0d391533df8cedf4b630a78ad34c99087741520c582963ce1602")
- version("5.1.0", sha256="f41329534f2ff477a0db6b7f77a72bb062f117800970c122d676db8b207ce80b")
- version(
- "5.0.2",
- sha256="a266e8b3bbdea04617260f51b3d85cc672af6ca417cae0812d04fd9702429c47",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="0a1754508e06d3a6b17593a71a3c57a3e25d3b46d88573098fda11442853196c",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="81ca24491fbf2bc8e5aa477a6c38776877579ac9f4241ddadeca76a579a7ebb5",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="1049c490fc2008d701a16d14e11004e3bc5b4da993aa48b117e3c44be5677e3c",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="e5757b5213b880237ae0f24616088f79c449c2955cf2133642dbbc9c655f4691",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="194fbd589ce34471f3255f71ea5fca2d27bee47a464558a86d0713b4d26237ea",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="cdedf3766c10200d3ebabe86cbb9c0fe6504e4b3317dccca289327d7c189bb3f",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="66710c390489922f0bd1ac38fd8c32fcfb5b7760b92c2d282f7d1abf214742ee",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="fc3736b2ea203209021616b2ffbcdd664781d692b07b8e8bb7f78b42dabbd5e5",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="7fd863ebf6eed09325c23ba06d9008b2f2c1345283d1a331e329e1a512b602f7",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="ab0ea3dd9b68a126291ed5a35e50fc85d0aeb35fe862f5d9e544435e4262c435",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="8874c100e9ba54587a6057c2a0e555a0903254a16e9e01c2385bae1b027f83b5",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="a2f02d8fc6ad9a561f06dacde54ecafd30563c5c95f93819a5694e5b650dad7f",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="fa16b2a307a5d9716066c2876febcbc1cef855bf0c96d235d2d8f2206a0fb69d",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="b373eccd03679a13fab4e740fc780da25cbd598abca3a1e5e3613ae14954f9db")
+ version("5.4.0", sha256="47420d38483c8124813b744971e428a0352c83d9b62a5a50f74ffa8f9b785b20")
+ version("5.3.3", sha256="d96d0e47594ab12e8c380da2300704c105736a0771940d7d2fae666f2869e457")
+ version("5.3.0", sha256="691b32b916952ed9af008aa29f60cc190322b73cfc098bb2eda3ff68c89c7b35")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# default to an 'auto' variant until amdgpu_targets can be given a better default than 'none'
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -122,6 +59,7 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
sticky=True,
)
variant("rocm", default=True, description="Enable ROCm support")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")
conflicts("~cuda ~rocm", msg="CUDA or ROCm support is required")
@@ -131,25 +69,6 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
depends_on("git", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -160,17 +79,21 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("rocsparse@" + ver, when="+rocm @" + ver)
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"rocsparse@{ver}", when=f"+rocm @{ver}")
for tgt in ROCmPackage.amdgpu_targets:
- depends_on(
- "rocsparse amdgpu_target={0}".format(tgt), when="+rocm amdgpu_target={0}".format(tgt)
- )
+ depends_on(f"rocsparse amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
- patch("e79985dccde22d826aceb3badfc643a3227979d2.patch", when="@3.5.0")
- patch("530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch", when="@3.5.0")
patch("0a90ddc4c33ed409a938513b9dbdca8bfad65e06.patch", when="@:5.4")
@classmethod
@@ -184,6 +107,10 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
ver = None
return ver
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
+
def cmake_args(self):
args = [
self.define("CMAKE_CXX_STANDARD", "14"),
@@ -193,15 +120,9 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage):
args.append(self.define_from_variant("BUILD_CUDA", "cuda"))
- # FindHIP.cmake was used for +rocm until 5.0.0 and is still used for +cuda
- if self.spec.satisfies("@:4") or self.spec.satisfies("+cuda"):
- if self.spec["hip"].satisfies("@:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- else:
- args.append(
- self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip)
- )
-
+ # FindHIP.cmake is still used for +cuda
+ if self.spec.satisfies("+cuda"):
+ args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
if self.spec.satisfies("@5.2.0:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
diff --git a/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch
new file mode 100644
index 0000000000..bd07d5af37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch
@@ -0,0 +1,77 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e10585c..a29bc63 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -185,7 +185,7 @@ else()
+ set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
+ file (STRINGS "tensilelite_tag.txt" read_tensile_tag)
+ set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
+- virtualenv_install("git+https://github.com/${tensile_fork}/hipBLASLt.git@${tensile_tag}#subdirectory=tensilelite")
++ virtualenv_install("git+https://github.com/ROCm/hipBLASLt.git@modify-tensilelite-spack#subdirectory=tensilelite")
+
+ message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
+ endif()
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 2057db0..6085133 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -53,6 +53,7 @@ target_include_directories( hipsparselt-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
+ )
+ message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
+ target_link_libraries( hipsparselt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipsparselt )
+diff --git a/clients/samples/CMakeLists.txt b/clients/samples/CMakeLists.txt
+index 6b303d5..c6d608c 100644
+--- a/clients/samples/CMakeLists.txt
++++ b/clients/samples/CMakeLists.txt
+@@ -50,6 +50,11 @@ foreach( exe ${sample_list_all} )
+ $<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
+ )
+
++ target_include_directories( ${exe}
++ SYSTEM PRIVATE
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
++ )
++
+ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # GCC or hip-clang needs specific flags to turn on f16c intrinsics
+ target_compile_options( ${exe} PRIVATE -mf16c )
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index aac8506..e282268 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -58,6 +58,9 @@ include(src/CMakeLists.txt)
+ # Create hipSPARSELt library
+ add_library(hipsparselt ${hipsparselt_source} ${hipsparselt_headers_public})
+ add_library(roc::hipsparselt ALIAS hipsparselt)
++target_include_directories( hipsparselt PRIVATE ${HIPSPARSE_INCLUDE_DIRS} )
++target_include_directories( hipsparselt PRIVATE ${MSGPACK_DIR}/include )
++
+
+ # Target compile definitions
+ if(NOT BUILD_CUDA)
+diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
+index 85f7cde..4c52b34 100755
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -61,7 +61,7 @@ if(NOT BUILD_CUDA)
+ if(Tensile_CPU_THREADS MATCHES "^[0-9]+$")
+ # only including threads argument if number
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
+@@ -72,7 +72,7 @@ if(NOT BUILD_CUDA)
+ )
+ else()
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
diff --git a/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch
new file mode 100644
index 0000000000..143b0e5926
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch
@@ -0,0 +1,77 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e10585c..a29bc63 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -185,7 +185,7 @@ else()
+ set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
+ file (STRINGS "tensilelite_tag.txt" read_tensile_tag)
+ set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
+- virtualenv_install("git+https://github.com/${tensile_fork}/hipBLASLt.git@${tensile_tag}#subdirectory=tensilelite")
++ virtualenv_install("git+https://github.com/ROCm/hipBLASLt.git@modify-tensilelite-spack-6.2#subdirectory=tensilelite")
+
+ message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
+ endif()
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 2057db0..6085133 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -53,6 +53,7 @@ target_include_directories( hipsparselt-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
+ )
+ message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
+ target_link_libraries( hipsparselt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipsparselt )
+diff --git a/clients/samples/CMakeLists.txt b/clients/samples/CMakeLists.txt
+index 6b303d5..c6d608c 100644
+--- a/clients/samples/CMakeLists.txt
++++ b/clients/samples/CMakeLists.txt
+@@ -50,6 +50,11 @@ foreach( exe ${sample_list_all} )
+ $<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
+ )
+
++ target_include_directories( ${exe}
++ SYSTEM PRIVATE
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
++ )
++
+ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # GCC or hip-clang needs specific flags to turn on f16c intrinsics
+ target_compile_options( ${exe} PRIVATE -mf16c )
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index aac8506..e282268 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -58,6 +58,9 @@ include(src/CMakeLists.txt)
+ # Create hipSPARSELt library
+ add_library(hipsparselt ${hipsparselt_source} ${hipsparselt_headers_public})
+ add_library(roc::hipsparselt ALIAS hipsparselt)
++target_include_directories( hipsparselt PRIVATE ${HIPSPARSE_INCLUDE_DIRS} )
++target_include_directories( hipsparselt PRIVATE ${MSGPACK_DIR}/include )
++
+
+ # Target compile definitions
+ if(NOT BUILD_CUDA)
+diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
+index 85f7cde..4c52b34 100755
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -61,7 +61,7 @@ if(NOT BUILD_CUDA)
+ if(Tensile_CPU_THREADS MATCHES "^[0-9]+$")
+ # only including threads argument if number
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
+@@ -72,7 +72,7 @@ if(NOT BUILD_CUDA)
+ )
+ else()
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
diff --git a/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch
new file mode 100644
index 0000000000..1ad1b289ad
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsparselt/0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch
@@ -0,0 +1,92 @@
+From c0ffe6cb718325634c353dec2894ac90ad6ea5e4 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Wed, 8 May 2024 10:25:43 +0000
+Subject: [PATCH] changes to find the llvm_path for spack and add
+ hipsparse_include_dirs
+
+---
+ CMakeLists.txt | 2 +-
+ clients/gtest/CMakeLists.txt | 1 +
+ clients/samples/CMakeLists.txt | 4 ++++
+ library/CMakeLists.txt | 2 ++
+ library/src/CMakeLists.txt | 4 ++--
+ 5 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 050826e..4cc2ee9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -185,7 +185,7 @@ else()
+ set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
+ file (STRINGS "tensilelite_tag.txt" read_tensile_tag)
+ set( tensile_tag ${read_tensile_tag} CACHE STRING "Tensile tag to download" )
+- virtualenv_install("git+https://github.com/${tensile_fork}/hipBLASLt.git@${tensile_tag}#subdirectory=tensilelite")
++ virtualenv_install("git+https://github.com/ROCm/hipBLASLt.git@spack-change-tensilelite#subdirectory=tensilelite")
+
+ message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${tensile_tag}")
+ endif()
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 2057db0..6085133 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -53,6 +53,7 @@ target_include_directories( hipsparselt-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
+ )
+ message("BLIS_INCLUDE_DIR=" ${BLIS_INCLUDE_DIR})
+ target_link_libraries( hipsparselt-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::hipsparselt )
+diff --git a/clients/samples/CMakeLists.txt b/clients/samples/CMakeLists.txt
+index 6b303d5..a06fdc2 100644
+--- a/clients/samples/CMakeLists.txt
++++ b/clients/samples/CMakeLists.txt
+@@ -50,6 +50,10 @@ foreach( exe ${sample_list_all} )
+ $<BUILD_INTERFACE:${HIP_INCLUDE_DIRS}>
+ )
+
++ target_include_directories( ${exe}
++ SYSTEM PRIVATE
++ $<BUILD_INTERFACE:${HIPSPARSE_INCLUDE_DIRS}>
++ )
+ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # GCC or hip-clang needs specific flags to turn on f16c intrinsics
+ target_compile_options( ${exe} PRIVATE -mf16c )
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index aac8506..bc13d51 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -58,6 +58,8 @@ include(src/CMakeLists.txt)
+ # Create hipSPARSELt library
+ add_library(hipsparselt ${hipsparselt_source} ${hipsparselt_headers_public})
+ add_library(roc::hipsparselt ALIAS hipsparselt)
++target_include_directories( hipsparselt PRIVATE ${HIPSPARSE_INCLUDE_DIRS} )
++target_include_directories( hipsparselt PRIVATE ${MSGPACK_DIR}/include )
+
+ # Target compile definitions
+ if(NOT BUILD_CUDA)
+diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
+index 85f7cde..94d2274 100755
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -61,7 +61,7 @@ if(NOT BUILD_CUDA)
+ if(Tensile_CPU_THREADS MATCHES "^[0-9]+$")
+ # only including threads argument if number
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
+@@ -72,7 +72,7 @@ if(NOT BUILD_CUDA)
+ )
+ else()
+ TensileCreateLibraryFiles(
+- "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic/${Tensile_LOGIC}"
++ "${CMAKE_CURRENT_SOURCE_DIR}/src/hcc_detail/rocsparselt/src/spmm/Tensile/Logic"
+ "${PROJECT_BINARY_DIR}/Tensile"
+ ARCHITECTURE ${Tensile_ARCHITECTURE}
+ CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION}
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/hipsparselt/package.py b/var/spack/repos/builtin/packages/hipsparselt/package.py
new file mode 100644
index 0000000000..4d97f93b60
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hipsparselt/package.py
@@ -0,0 +1,91 @@
+# Copyright 2013-2024 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 spack.variant
+from spack.package import *
+
+
+class Hipsparselt(CMakePackage, ROCmPackage):
+ """hipSPARSELt is a SPARSE marshalling library, with multiple supported backends.
+ It sits between the application and a 'worker' SPARSE library, marshalling inputs into
+ the backend library and marshalling results back to the application. hipSPARSELt exports
+ an interface that does not require the client to change, regardless of the chosen backend.
+ Currently, hipSPARSELt supports rocSPARSELt and cuSPARSELt v0.4 as backends."""
+
+ homepage = "https://github.com/ROCm/hipsparselt"
+ url = "https://github.com/ROCm/hipSPARSELt/archive/refs/tags/rocm-6.1.2.tar.gz"
+ git = "https://github.com/ROCm/hipsparseLt.git"
+
+ maintainers("srekolam", "afzpatel", "renjithravindrankannath")
+
+ license("MIT")
+ version("6.2.4", sha256="7b007b346f89fac9214ad8541b3276105ce1cac14d6f95a8a504b5a5381c8184")
+ version("6.2.1", sha256="a23287bc759442aebaccce0306f5e3938865240e13553847356c25c54214a0d4")
+ version("6.2.0", sha256="a25a3ce0ed3cc616b1a4e38bfdd5e68463bb9fe791a56d1367b8a6373bb63d12")
+ version("6.1.2", sha256="a5a01fec7bc6e1f4792ccd5c8eaee7b42deac315c54298a7ce5265e5551e8640")
+ version("6.1.1", sha256="ca6da099d9e385ffce2b68404f395a93b199af1592037cf52c620f9148a6a78d")
+ version("6.1.0", sha256="66ade6de4fd19d144cab27214352faf5b00bbe12afe59472efb441b16d090265")
+ version("6.0.2", sha256="bdbceeae515f737131f0391ee3b7d2f7b655e3cf446e4303d93f083c59053587")
+ version("6.0.0", sha256="cc4c7970601edbaa7f630b7ea24ae85beaeae466ef3e5ba63e11eab52465c157")
+
+ depends_on("cxx", type="build") # generated
+
+ amdgpu_targets = ROCmPackage.amdgpu_targets
+ variant(
+ "amdgpu_target",
+ description="AMD GPU architecture",
+ values=spack.variant.DisjointSetsOfValues(("auto",), ("none",), amdgpu_targets)
+ .with_default("auto")
+ .with_error(
+ "the values 'auto' and 'none' are mutually exclusive with any of the other values"
+ )
+ .with_non_feature_values("auto", "none"),
+ sticky=True,
+ )
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"hipsparse@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}", type="test")
+
+ depends_on("cmake@3.5:", type="build")
+ depends_on("msgpack-c@3:")
+ depends_on("python@3.6:")
+ depends_on("py-virtualenv")
+ depends_on("py-wheel")
+ depends_on("py-pip")
+ depends_on("py-pyyaml", type="test")
+ depends_on("py-joblib")
+ depends_on("googletest@1.10.0:", type="test")
+ depends_on("netlib-lapack@3.7.1:", type="test")
+
+ patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack.patch", when="@6.0")
+ # Below patch sets the proper path for clang++,lld and clang-offload-blunder inside the
+ # tensorlite subdir of hipblas . Also adds hipsparse and msgpack include directories
+ # for 6.1.0 release.
+ patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.1.patch", when="@6.1")
+ patch("0001-update-llvm-path-add-hipsparse-include-dir-for-spack-6.2.patch", when="@6.2")
+
+ def setup_build_environment(self, env):
+ env.set("CXX", self.spec["hip"].hipcc)
+
+ def cmake_args(self):
+ args = [
+ self.define("Tensile_CODE_OBJECT_VERSION", "default"),
+ self.define("MSGPACK_DIR", self.spec["msgpack-c"].prefix),
+ self.define_from_variant("BUILD_ADDRESS_SANITIZER", "asan"),
+ self.define("BUILD_CLIENTS_TESTS", self.run_tests),
+ self.define("BUILD_SHARED_LIBS", "ON"),
+ self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
+ ]
+ if "auto" not in self.spec.variants["amdgpu_target"]:
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
+ if self.run_tests:
+ args.append(
+ self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
+ )
+ return args
diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py
index 1e2a059211..0a60f5f189 100644
--- a/var/spack/repos/builtin/packages/hipsycl/package.py
+++ b/var/spack/repos/builtin/packages/hipsycl/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import json
+import os
from os import path
from llnl.util import filesystem
@@ -11,7 +12,7 @@ from llnl.util import filesystem
from spack.package import *
-class Hipsycl(CMakePackage):
+class Hipsycl(CMakePackage, ROCmPackage):
"""hipSYCL is an implementation of the SYCL standard programming model
over NVIDIA CUDA/AMD HIP"""
@@ -19,13 +20,15 @@ class Hipsycl(CMakePackage):
url = "https://github.com/illuhad/hipSYCL/archive/v0.8.0.tar.gz"
git = "https://github.com/illuhad/hipSYCL.git"
- maintainers("nazavode")
-
provides("sycl")
license("BSD-2-Clause")
version("stable", branch="stable", submodules=True)
+ version("24.06.0", commit="fc51dae9006d6858fc9c33148cc5f935bb56b075", submodules=True)
+ version("24.02.0", commit="974adc33ea5a35dd8b5be68c7a744b37482b8b64", submodules=True)
+ version("23.10.0", commit="3952b468c9da89edad9dff953cdcab0a3c3bf78c", submodules=True)
+ version("0.9.4", commit="99d9e24d462b35e815e0e59c1b611936c70464ae", submodules=True)
version("0.9.4", commit="99d9e24d462b35e815e0e59c1b611936c70464ae", submodules=True)
version("0.9.3", commit="51507bad524c33afe8b124804091b10fa25618dc", submodules=True)
version("0.9.2", commit="49fd02499841ae884c61c738610e58c27ab51fdb", submodules=True)
@@ -34,6 +37,7 @@ class Hipsycl(CMakePackage):
version("develop", branch="develop", submodules=True)
variant("cuda", default=False, description="Enable CUDA backend for SYCL kernels")
+ variant("rocm", default=False, description="Enable ROCM backend for SYCL kernels")
depends_on("cmake@3.5:", type="build")
depends_on("boost +filesystem", when="@:0.8")
@@ -44,8 +48,10 @@ class Hipsycl(CMakePackage):
# hipSYCL 0.8.0 supported only LLVM 8-10:
# (https://github.com/AdaptiveCpp/AdaptiveCpp/blob/v0.8.0/CMakeLists.txt#L29-L37)
depends_on("llvm@8:10", when="@0.8.0")
+ # https://github.com/spack/spack/issues/45029 and https://github.com/spack/spack/issues/43142
+ conflicts("^gcc@12", when="@23.10.0")
# https://github.com/OpenSYCL/OpenSYCL/pull/918 was introduced after 0.9.4
- conflicts("^llvm@16:", when="@:0.9.4")
+ conflicts("^gcc@12.2.0", when="@:0.9.4")
# LLVM PTX backend requires cuda7:10.1 (https://tinyurl.com/v82k5qq)
depends_on("cuda@9:10.1", when="@0.8.1: +cuda ^llvm@9")
depends_on("cuda@9:", when="@0.8.1: +cuda ^llvm@10:")
@@ -69,14 +75,15 @@ class Hipsycl(CMakePackage):
"further info please refer to: "
"https://github.com/illuhad/hipSYCL/blob/master/doc/install-cuda.md",
)
+ # https://github.com/spack/spack/issues/46681
+ conflicts("^llvm@19", when="@24.02.0:24.06.0")
def cmake_args(self):
spec = self.spec
args = [
"-DWITH_CPU_BACKEND:Bool=TRUE",
- # TODO: no ROCm stuff available in spack yet
- "-DWITH_ROCM_BACKEND:Bool=FALSE",
- "-DWITH_CUDA_BACKEND:Bool={0}".format("TRUE" if "+cuda" in spec else "FALSE"),
+ "-DWITH_ROCM_BACKEND:Bool={0}".format("TRUE" if spec.satisfies("+rocm") else "FALSE"),
+ "-DWITH_CUDA_BACKEND:Bool={0}".format("TRUE" if spec.satisfies("+cuda") else "FALSE"),
# prevent hipSYCL's cmake to look for other LLVM installations
# if the specified one isn't compatible
"-DDISABLE_LLVM_VERSION_CHECK:Bool=TRUE",
@@ -114,48 +121,77 @@ class Hipsycl(CMakePackage):
)
args.append("-DCLANG_EXECUTABLE_PATH:String={0}".format(llvm_clang_bin))
# explicit CUDA toolkit
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("-DCUDA_TOOLKIT_ROOT_DIR:String={0}".format(spec["cuda"].prefix))
+ if spec.satisfies("+rocm"):
+ args.append("-DWITH_ACCELERATED_CPU:STRING=OFF")
+ args.append("-DROCM_PATH:STRING={0}".format(os.environ.get("ROCM_PATH")))
+ if self.spec.satisfies("@24.02.0:"):
+ args.append("-DWITH_SSCP_COMPILER=OFF")
return args
@run_after("install")
def filter_config_file(self):
- config_file_paths = filesystem.find(self.prefix, "syclcc.json")
- if len(config_file_paths) != 1:
- raise InstallError(
- "installed hipSYCL must provide a unique compiler driver "
- "configuration file, found: {0}".format(config_file_paths)
- )
- config_file_path = config_file_paths[0]
- with open(config_file_path) as f:
- config = json.load(f)
- # 1. Fix compiler: use the real one in place of the Spack wrapper
- config["default-cpu-cxx"] = self.compiler.cxx
- # 2. Fix stdlib: we need to make sure cuda-enabled binaries find
- # the libc++.so and libc++abi.so dyn linked to the sycl
- # ptx backend
- rpaths = set()
- so_paths = filesystem.find_libraries(
- "libc++", self.spec["llvm"].prefix, shared=True, recursive=True
- )
- if len(so_paths) != 1:
- raise InstallError(
- "concretized llvm dependency must provide a "
- "unique directory containing libc++.so, "
- "found: {0}".format(so_paths)
- )
- rpaths.add(path.dirname(so_paths[0]))
- so_paths = filesystem.find_libraries(
- "libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True
- )
- if len(so_paths) != 1:
- raise InstallError(
- "concretized llvm dependency must provide a "
- "unique directory containing libc++abi, "
- "found: {0}".format(so_paths)
- )
- rpaths.add(path.dirname(so_paths[0]))
- config["default-cuda-link-line"] += " " + " ".join("-rpath {0}".format(p) for p in rpaths)
- # Replace the installed config file
- with open(config_file_path, "w") as f:
- json.dump(config, f, indent=2)
+ def edit_config(filename, editor):
+ config_file_paths = filesystem.find(self.prefix, filename)
+ if len(config_file_paths) != 1:
+ raise InstallError(
+ "installed hipSYCL must provide a unique compiler driver"
+ "configuration file ({0}), found: {1}".format(filename, config_file_paths)
+ )
+ config_file_path = config_file_paths[0]
+ with open(config_file_path) as f:
+ config = json.load(f)
+
+ config_modified = editor(config)
+
+ with open(config_file_path, "w") as f:
+ json.dump(config_modified, f, indent=2)
+
+ if self.spec.satisfies("@:23.10.0"):
+ configfiles = {"core": "syclcc.json", "cuda": "syclcc.json"}
+ else:
+ configfiles = {"core": "acpp-core.json", "cuda": "acpp-cuda.json"}
+
+ def adjust_core_config(config):
+ config["default-cpu-cxx"] = self.compiler.cxx
+ return config
+
+ edit_config(configfiles["core"], adjust_core_config)
+
+ if self.spec.satisfies("+cuda"):
+ # 1. Fix compiler: use the real one in place of the Spack wrapper
+
+ # 2. Fix stdlib: we need to make sure cuda-enabled binaries find
+ # the libc++.so and libc++abi.so dyn linked to the sycl
+ # ptx backend
+ rpaths = set()
+ if self.spec.satisfies("~rocm"):
+ so_paths = filesystem.find_libraries(
+ "libc++", self.spec["llvm"].prefix, shared=True, recursive=True
+ )
+ if len(so_paths) != 1:
+ raise InstallError(
+ "concretized llvm dependency must provide a "
+ "unique directory containing libc++.so, "
+ "found: {0}".format(so_paths)
+ )
+ rpaths.add(path.dirname(so_paths[0]))
+ so_paths = filesystem.find_libraries(
+ "libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True
+ )
+ if len(so_paths) != 1:
+ raise InstallError(
+ "concretized llvm dependency must provide a "
+ "unique directory containing libc++abi, "
+ "found: {0}".format(so_paths)
+ )
+ rpaths.add(path.dirname(so_paths[0]))
+
+ def adjust_cuda_config(config):
+ config["default-cuda-link-line"] += " " + " ".join(
+ "-rpath {0}".format(p) for p in rpaths
+ )
+ return config
+
+ edit_config(configfiles["cuda"], adjust_cuda_config)
diff --git a/var/spack/repos/builtin/packages/hiptt/package.py b/var/spack/repos/builtin/packages/hiptt/package.py
index 2e3c4704c2..69d02a1ee3 100644
--- a/var/spack/repos/builtin/packages/hiptt/package.py
+++ b/var/spack/repos/builtin/packages/hiptt/package.py
@@ -20,6 +20,8 @@ class Hiptt(MakefilePackage, ROCmPackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
patch("bugfix_make.patch")
# To enable this package add it to the LD_LIBRARY_PATH
diff --git a/var/spack/repos/builtin/packages/hiredis/package.py b/var/spack/repos/builtin/packages/hiredis/package.py
index c54f214367..9d0a5ba955 100644
--- a/var/spack/repos/builtin/packages/hiredis/package.py
+++ b/var/spack/repos/builtin/packages/hiredis/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.cmake
+import spack.build_systems.makefile
from spack.package import *
@@ -26,6 +28,9 @@ class Hiredis(MakefilePackage, CMakePackage):
version("0.13.3", sha256="717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78")
version("0.13.2", sha256="b0cf73ebe039fe25ecaaa881acdda8bdc393ed997e049b04fc20865835953694")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("cmake", when="@1:"), conditional("makefile", when="@:0"), default="cmake"
)
@@ -43,13 +48,17 @@ class Hiredis(MakefilePackage, CMakePackage):
class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
@property
def build_targets(self):
- use_ssl = 1 if "+ssl" in self.spec else 0
- run_test_async = 1 if "+test_async" in self.spec else 0
+ use_ssl = 1 if self.spec.satisfies("+ssl") else 0
+ run_test_async = 1 if self.spec.satisfies("+test_async") else 0
return ["USE_SSL={0}".format(use_ssl), "TEST_ASYNC={0}".format(run_test_async)]
def install(self, pkg, spec, prefix):
make("PREFIX={0}".format(prefix), "install")
- if "+test" in self.spec or "+test_async" in self.spec or "+test_ssl" in self.spec:
+ if (
+ self.spec.satisfies("+test")
+ or self.spec.satisfies("+test_async")
+ or self.spec.satisfies("+test_ssl")
+ ):
make("PREFIX={0}".format(prefix), "test")
@run_after("install")
@@ -60,9 +69,9 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
- build_test = not ("+test" in self.spec)
- ssl_test = ("+test_ssl" in self.spec) and ("+test" in self.spec)
- async_test = ("+test_async" in self.spec) and ("+test" in self.spec)
+ build_test = not self.spec.satisfies("+test")
+ ssl_test = self.spec.satisfies("+test_ssl") and self.spec.satisfies("+test")
+ async_test = self.spec.satisfies("+test_async") and self.spec.satisfies("+test")
args = [
self.define_from_variant("ENABLE_SSL", "ssl"),
diff --git a/var/spack/repos/builtin/packages/hisat2/package.py b/var/spack/repos/builtin/packages/hisat2/package.py
index f4f2886fc7..ca96899314 100644
--- a/var/spack/repos/builtin/packages/hisat2/package.py
+++ b/var/spack/repos/builtin/packages/hisat2/package.py
@@ -31,7 +31,12 @@ class Hisat2(MakefilePackage):
url="https://cloud.biohpc.swmed.edu/index.php/s/hisat2-220-source/download",
extension="zip",
)
- version("2.1.0", sha256="89a276eed1fc07414b1601947bc9466bdeb50e8f148ad42074186fe39a1ee781")
+ version(
+ "2.1.0",
+ sha256="89a276eed1fc07414b1601947bc9466bdeb50e8f148ad42074186fe39a1ee781",
+ url="ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-2.1.0-source.zip",
+ extension="zip",
+ )
variant("sra", default=False, description="Add SRA (Sequence Read Archive) support")
@@ -48,8 +53,8 @@ class Hisat2(MakefilePackage):
def build(self, spec, prefix):
make(
"USE_SRA=1",
- "NCBI_NGS_DIR={0}".format(spec["sra-tools"].prefix),
- "NCBI_VDB_DIR={0}".format(spec["ncbi-vdb"].prefix),
+ f"NCBI_NGS_DIR={spec['sra-tools'].prefix}",
+ f"NCBI_VDB_DIR={spec['ncbi-vdb'].prefix}",
)
def install(self, spec, prefix):
@@ -59,7 +64,7 @@ class Hisat2(MakefilePackage):
install_tree("example", prefix.example)
install_tree("scripts", prefix.scripts)
- if "@:2.2.0" in spec:
+ if spec.satisfies("@:2.2.0"):
install_tree("hisatgenotype_modules", prefix.hisatgenotype_modules)
install_tree("hisatgenotype_scripts", prefix.hisatgenotype_scripts)
@@ -75,33 +80,29 @@ class Hisat2(MakefilePackage):
install("hisat2-inspect-l", prefix.bin)
install("*.py", prefix.bin)
- if "@2.2:" in spec:
+ if spec.satisfies("@2.2:"):
install("hisat2-repeat", prefix.bin)
@run_after("install")
def filter_sbang(self):
with working_dir(self.prefix.bin):
pattern = "^#!.*/usr/bin/env python"
- repl = "#!{0}".format(self.spec["python"].command.path)
+ repl = f"#!{self.spec['python'].command.path}"
files = ["hisat2-build", "hisat2-inspect"]
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
pattern = "^#!.*/usr/bin/env perl"
- repl = "#!{0}".format(self.spec["perl"].command.path)
+ repl = f"#!{self.spec['perl'].command.path}"
files = ["hisat2"]
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
pattern = "^#!.*/usr/bin/env python3"
- repl = "#!{0}".format(self.spec["python"].command.path)
+ repl = f"#!{self.spec['python'].command.path}"
files = glob.glob("*.py")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
with working_dir(self.prefix.scripts):
pattern = "^#!.*/usr/bin/perl"
- repl = "#!{0}".format(self.spec["perl"].command.path)
+ repl = f"#!{self.spec['perl'].command.path}"
files = glob.glob("*.pl")
- for file in files:
- filter_file(pattern, repl, *files, backup=False)
+ filter_file(pattern, repl, *files, backup=False)
diff --git a/var/spack/repos/builtin/packages/hisea/package.py b/var/spack/repos/builtin/packages/hisea/package.py
index ff08e1d90c..5fc33ae1a7 100644
--- a/var/spack/repos/builtin/packages/hisea/package.py
+++ b/var/spack/repos/builtin/packages/hisea/package.py
@@ -22,6 +22,8 @@ class Hisea(MakefilePackage):
url="https://github.com/lucian-ilie/HISEA/tarball/39e01e98caa0f2101da806ca59306296effe789c",
)
+ depends_on("cxx", type="build") # generated
+
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
diff --git a/var/spack/repos/builtin/packages/hive/package.py b/var/spack/repos/builtin/packages/hive/package.py
index da071c8bb7..89dc7de044 100644
--- a/var/spack/repos/builtin/packages/hive/package.py
+++ b/var/spack/repos/builtin/packages/hive/package.py
@@ -17,11 +17,15 @@ class Hive(Package):
homepage = "https://hive.apache.org/"
url = "https://www.apache.org/dist/hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz"
- license("Apache-2.0")
-
- version("3.1.2", sha256="d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462")
- version("2.3.6", sha256="0b3736edc8d15f01ed649bfce7d74346c35fd57567411e9d0c3f48578f76610d")
- version("1.2.2", sha256="763b246a1a1ceeb815493d1e5e1d71836b0c5b9be1c4cd9c8d685565113771d1")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.0.1", sha256="2bf988a1ed17437b1103e367939c25a13f64d36cf6d1c3bef8c3f319f0067619")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2020-13949
+ version("3.1.3", sha256="0c9b6a6359a7341b6029cc9347435ee7b379f93846f779d710b13f795b54bb16")
+ version("3.1.2", sha256="d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462")
+ version("2.3.6", sha256="0b3736edc8d15f01ed649bfce7d74346c35fd57567411e9d0c3f48578f76610d")
+ version("1.2.2", sha256="763b246a1a1ceeb815493d1e5e1d71836b0c5b9be1c4cd9c8d685565113771d1")
depends_on("hadoop", type="run")
diff --git a/var/spack/repos/builtin/packages/hivex/package.py b/var/spack/repos/builtin/packages/hivex/package.py
index 9a231f270e..c44d5a509d 100644
--- a/var/spack/repos/builtin/packages/hivex/package.py
+++ b/var/spack/repos/builtin/packages/hivex/package.py
@@ -19,4 +19,6 @@ class Hivex(AutotoolsPackage):
version("1.3.18", sha256="8a1e788fd9ea9b6e8a99705ebd0ff8a65b1bdee28e319c89c4a965430d0a7445")
version("1.3.17", sha256="13cb4b87ab72d74d9e83e56ae0f77152312f33ee772dc84fdd86b2cb9e8c52db")
+ depends_on("c", type="build") # generated
+
depends_on("perl")
diff --git a/var/spack/repos/builtin/packages/hmmer/package.py b/var/spack/repos/builtin/packages/hmmer/package.py
index 0df0c49501..8e12b52287 100644
--- a/var/spack/repos/builtin/packages/hmmer/package.py
+++ b/var/spack/repos/builtin/packages/hmmer/package.py
@@ -25,6 +25,8 @@ class Hmmer(Package):
version("2.3.2", sha256="d20e1779fcdff34ab4e986ea74a6c4ac5c5f01da2993b14e92c94d2f076828b4")
version("2.3.1", sha256="3956d53af8de5bb99eec18cba0628e86924c6543639d290293b6677a9224ea3f")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Compile with MPI")
variant("gsl", default=False, description="Compile with GSL")
@@ -39,10 +41,10 @@ class Hmmer(Package):
def install(self, spec, prefix):
configure_args = ["--prefix={0}".format(prefix)]
- if "+gsl" in self.spec:
+ if self.spec.satisfies("+gsl"):
configure_args.extend(["--with-gsl", "LIBS=-lgsl -lgslcblas"])
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
configure_args.append("--enable-mpi")
configure(*configure_args)
diff --git a/var/spack/repos/builtin/packages/hohqmesh/package.py b/var/spack/repos/builtin/packages/hohqmesh/package.py
index d5bd80bf16..9c1eda34a1 100644
--- a/var/spack/repos/builtin/packages/hohqmesh/package.py
+++ b/var/spack/repos/builtin/packages/hohqmesh/package.py
@@ -17,12 +17,23 @@ class Hohqmesh(CMakePackage):
license("MIT")
+ version("main", branch="main")
+ version("1.5.3", sha256="5d6de1ff6472d5044997372111754dcf339603351d0c855664115353a085a21e")
+ version("1.5.2", sha256="afc749f71657fc70294a00e84891463d23a57dff0c17975445f268fb417da0cc")
+ version("1.5.1", sha256="3a3e0246d61d55b58f5bebc6c925f0f6df93398ad8efc52a933feab4dcf00dc1")
+ version("1.5.0", sha256="e2a8ff604b93b49dbab101edd6f031e5032535ec96a84ea58906a326be1c8f04")
+ version("1.4.2", sha256="656c149b510b6d3e914d1794c27b4802699c9fd209afff8aec3a219a9e7f86ff")
+ version("1.4.1", sha256="bbfecdba3899bf124bdac2bf91f1262a8e2f224ba699d55bdf8546073fc62b21")
+ version("1.4.0", sha256="f3a8ca4906d86360260b55cf79f66ba7e35f8c3c293ae6d83361d9edf5f70e6d")
version("1.3.0", sha256="31ea80de15ece886df0dd1b941714d86ec06a9ed02c1415308b4ba23d8314eff")
version("1.2.1", sha256="b1b13a680c3ef6b8d6a8d05406f68c1ff641c26f69c468ccf2d7bed8d556dd7e")
+ version("1.2.0", sha256="39387276a2f145618b1ec3486426f181fc3f3fe1e85519505735a44f0b480967")
version("1.1.0", sha256="5fdb75157d9dc29bba55e6ae9dc2be71294754204f4f0912795532ae66aada10")
version("1.0.1", sha256="8435f13c96d714a287f3c24392330047e2131d53fafe251a77eba365bd2b3141")
version("1.0.0", sha256="3800e63975d0a61945508f13fb76d5e2145c0260440484252b6b81aa0bfe076d")
+ depends_on("fortran", type="build") # generated
+
depends_on("ftobjectlibrary")
parallel = False
diff --git a/var/spack/repos/builtin/packages/homer/package.py b/var/spack/repos/builtin/packages/homer/package.py
index 7ee7b7fbdc..17a3b7e13e 100644
--- a/var/spack/repos/builtin/packages/homer/package.py
+++ b/var/spack/repos/builtin/packages/homer/package.py
@@ -50,5 +50,5 @@ class Homer(Package):
perl("configureHomer.pl", "-local")
# download extra data if requested
- if "+data" in spec:
+ if spec.satisfies("+data"):
perl("configureHomer.pl", "-install", "-all")
diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py
index a69a801526..b58222cb1c 100644
--- a/var/spack/repos/builtin/packages/hoomd-blue/package.py
+++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py
@@ -35,6 +35,9 @@ class HoomdBlue(CMakePackage):
"2.1.6", tag="v2.1.6", commit="aa650aaf13721f2abf945e868f65b806fcc54fea", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Compile with MPI enabled")
variant("cuda", default=True, description="Compile with CUDA Toolkit")
variant("doc", default=False, description="Generate documentation")
@@ -65,20 +68,17 @@ class HoomdBlue(CMakePackage):
def cmake_args(self):
spec = self.spec
- cmake_args = [
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path),
- "-DCMAKE_INSTALL_PREFIX={0}".format(python_platlib),
- ]
+ cmake_args = ["-DCMAKE_INSTALL_PREFIX={0}".format(python_platlib)]
# MPI support
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
os.environ["MPI_HOME"] = spec["mpi"].prefix
cmake_args.append("-DENABLE_MPI=ON")
else:
cmake_args.append("-DENABLE_MPI=OFF")
# CUDA support
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cmake_args.append("-DENABLE_CUDA=ON")
else:
cmake_args.append("-DENABLE_CUDA=OFF")
@@ -95,7 +95,7 @@ class HoomdBlue(CMakePackage):
cmake_args.append("-DENABLE_MPI_CUDA=OFF")
# Documentation
- if "+doc" in spec:
+ if spec.satisfies("+doc"):
cmake_args.append("-DENABLE_DOXYGEN=ON")
else:
cmake_args.append("-DENABLE_DOXYGEN=OFF")
diff --git a/var/spack/repos/builtin/packages/hoppet/package.py b/var/spack/repos/builtin/packages/hoppet/package.py
index e2cade0a73..54b663d15a 100644
--- a/var/spack/repos/builtin/packages/hoppet/package.py
+++ b/var/spack/repos/builtin/packages/hoppet/package.py
@@ -17,3 +17,6 @@ class Hoppet(AutotoolsPackage):
maintainers("haralmha")
version("1.2.0", sha256="6e00eb56a4f922d03dfceba7b389a3aaf51f277afa46d7b634d661e0797e8898")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/hotspot/package.py b/var/spack/repos/builtin/packages/hotspot/package.py
index 2d9d0a0cf6..f7eae01e18 100644
--- a/var/spack/repos/builtin/packages/hotspot/package.py
+++ b/var/spack/repos/builtin/packages/hotspot/package.py
@@ -15,6 +15,8 @@ class Hotspot(MakefilePackage):
version("6.0", commit="a7a3286e368867c26381e0a23e36b3e273bdeda9")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdir(prefix.bin)
install("hotspot", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/hpcc/package.py b/var/spack/repos/builtin/packages/hpcc/package.py
index 08c620c00d..e8a9acb6de 100644
--- a/var/spack/repos/builtin/packages/hpcc/package.py
+++ b/var/spack/repos/builtin/packages/hpcc/package.py
@@ -7,6 +7,7 @@ import os
import platform
import re
+from spack.build_environment import optimization_flags
from spack.package import *
@@ -40,6 +41,8 @@ class Hpcc(MakefilePackage):
version("develop", branch="main")
version("1.5.0", sha256="0a6fef7ab9f3347e549fed65ebb98234feea9ee18aea0c8f59baefbe3cf7ffb8")
+ depends_on("c", type="build") # generated
+
variant(
"fft",
default="internal",
@@ -54,7 +57,7 @@ class Hpcc(MakefilePackage):
depends_on("fftw@2+mpi", when="fft=fftw2")
depends_on("mkl", when="fft=mkl")
- arch = "{0}-{1}".format(platform.system(), platform.processor())
+ arch = f"{platform.system()}-{platform.processor()}"
config = {
"@SHELL@": "/bin/sh",
@@ -83,7 +86,7 @@ class Hpcc(MakefilePackage):
}
def patch(self):
- if "fftw" in self.spec:
+ if self.spec.satisfies("^fftw"):
# spack's fftw2 prefix headers with floating point type
filter_file(r"^\s*#include <fftw.h>", "#include <sfftw.h>", "FFT/wrapfftw.h")
filter_file(
@@ -94,7 +97,7 @@ class Hpcc(MakefilePackage):
"""write make.arch file"""
with working_dir("hpl"):
# copy template make.arch file
- make_arch_filename = "Make.{0}".format(self.arch)
+ make_arch_filename = f"Make.{self.arch}"
copy(join_path("setup", "Make.UNKNOWN.in"), make_arch_filename)
# fill template with values
@@ -123,7 +126,7 @@ class Hpcc(MakefilePackage):
and spec["fftw-api"].name in INTEL_MATH_LIBRARIES
):
mklroot = env["MKLROOT"]
- self.config["@LAINC@"] += " -I{0}".format(join_path(mklroot, "include/fftw"))
+ self.config["@LAINC@"] += f" -I{join_path(mklroot, 'include/fftw')}"
libfftw2x_cdft = join_path(
mklroot, "lib", "intel64", "libfftw2x_cdft_DOUBLE_ilp64.a"
)
@@ -153,19 +156,19 @@ class Hpcc(MakefilePackage):
self.config["@LALIB@"] = " ".join(lin_alg_libs)
# Compilers / linkers - Optimization flags
- self.config["@CC@"] = "{0}".format(spec["mpi"].mpicc)
+ self.config["@CC@"] = f"{spec['mpi'].mpicc}"
# Compiler flags for CPU architecture optimizations
if spec.satisfies("%intel"):
# with intel-parallel-studio+mpi the '-march' arguments
# are not passed to icc
- arch_opt = spec.target.optimization_flags(spec.compiler.name, spec.compiler.version)
- self.config["@CCFLAGS@"] = "-O3 -restrict -ansi-alias -ip {0}".format(arch_opt)
+ arch_opt = optimization_flags(self.compiler, spec.target)
+ self.config["@CCFLAGS@"] = f"-O3 -restrict -ansi-alias -ip {arch_opt}"
self.config["@CCNOOPT@"] = "-restrict"
self._write_make_arch(spec, prefix)
def build(self, spec, prefix):
- make("arch={0}".format(self.arch))
+ make(f"arch={self.arch}")
def check(self):
"""Simple check that compiled binary is working:
diff --git a/var/spack/repos/builtin/packages/hpccg/package.py b/var/spack/repos/builtin/packages/hpccg/package.py
index eca4f30b26..86244d74aa 100644
--- a/var/spack/repos/builtin/packages/hpccg/package.py
+++ b/var/spack/repos/builtin/packages/hpccg/package.py
@@ -19,6 +19,8 @@ class Hpccg(MakefilePackage):
version("1.0", sha256="5be1b8cc3246811bfc9d6d7072be29455777d61b585675512ae52043ea64cefc")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=True, description="Build with OpenMP support")
@@ -29,7 +31,7 @@ class Hpccg(MakefilePackage):
def build_targets(self):
targets = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
targets.append("CXX={0}".format(self.spec["mpi"].mpicxx))
targets.append("LINKER={0}".format(self.spec["mpi"].mpicxx))
targets.append("USE_MPI=-DUSING_MPI")
@@ -37,7 +39,7 @@ class Hpccg(MakefilePackage):
targets.append("CXX=c++")
targets.append("LINKER=c++")
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
targets.append("USE_OMP=-DUSING_OMP")
targets.append("OMP_FLAGS={0}".format(self.compiler.openmp_flag))
diff --git a/var/spack/repos/builtin/packages/hpcg/package.py b/var/spack/repos/builtin/packages/hpcg/package.py
index 2f261b5836..9e0affb3b8 100644
--- a/var/spack/repos/builtin/packages/hpcg/package.py
+++ b/var/spack/repos/builtin/packages/hpcg/package.py
@@ -21,6 +21,8 @@ class Hpcg(AutotoolsPackage):
version("develop", branch="master")
version("3.1", sha256="33a434e716b79e59e745f77ff72639c32623e7f928eeb7977655ffcaade0f4a4")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Enable OpenMP support")
patch(
@@ -48,6 +50,11 @@ class Hpcg(AutotoolsPackage):
sha256="722c13837b287e979442f8372274aa5910a290aa39f1ed1ff646116be08dcae9",
when="%intel",
)
+ patch(
+ "https://github.com/hpcg-benchmark/hpcg/commit/e9e0b7e6cae23e1f30dd983c2ce2d3bd34d56f75.patch?full_index=1",
+ sha256="722c13837b287e979442f8372274aa5910a290aa39f1ed1ff646116be08dcae9",
+ when="%clang",
+ )
depends_on("mpi@1.1:")
@@ -62,13 +69,14 @@ class Hpcg(AutotoolsPackage):
and not spec.satisfies("%arm")
and not spec.satisfies("%intel")
and not spec.satisfies("%oneapi")
+ and not spec.satisfies("%clang")
):
CXXFLAGS += " -ftree-vectorizer-verbose=0 "
if spec.satisfies("%cce"):
CXXFLAGS += " -Rpass=loop-vectorize"
CXXFLAGS += " -Rpass-missed=loop-vectorize"
CXXFLAGS += " -Rpass-analysis=loop-vectorize "
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
CXXFLAGS += self.compiler.openmp_flag
config = [
# Shell
diff --git a/var/spack/repos/builtin/packages/hpctoolkit/correcting-hsa-include-path.patch b/var/spack/repos/builtin/packages/hpctoolkit/correcting-hsa-include-path.patch
new file mode 100644
index 0000000000..3d9a73db2f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpctoolkit/correcting-hsa-include-path.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 34b2613..8fa980d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4861,7 +4861,7 @@ case "$ROCM_HSA" in
+ found=yes
+ elif test -f "$ROCM_HSA/include/hsa/hsa.h" ; then
+ AC_MSG_NOTICE([found $ROCM_HSA/include/hsa/hsa.h])
+- ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa"
++ ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa -I$ROCM_HSA/include"
+ ROCM_HSA_INC_MESG="$ROCM_HSA"
+ found=yes
+ fi
diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py
index f617bdaa9d..34900192a0 100644
--- a/var/spack/repos/builtin/packages/hpctoolkit/package.py
+++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py
@@ -3,14 +3,18 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import configparser
import os
+import tempfile
import llnl.util.tty as tty
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Hpctoolkit(AutotoolsPackage):
+class Hpctoolkit(AutotoolsPackage, MesonPackage):
"""HPCToolkit is an integrated suite of tools for measurement and analysis
of program performance on computers ranging from multicore desktop systems
to the nation's largest supercomputers. By using statistical sampling of
@@ -18,7 +22,7 @@ class Hpctoolkit(AutotoolsPackage):
measurements of a program's work, resource consumption, and inefficiency
and attributes them to the full calling context in which they occur."""
- homepage = "http://hpctoolkit.org"
+ homepage = "https://hpctoolkit.org"
git = "https://gitlab.com/hpctoolkit/hpctoolkit.git"
maintainers("mwkrentel")
@@ -29,16 +33,18 @@ class Hpctoolkit(AutotoolsPackage):
license("BSD-3-Clause")
version("develop", branch="develop")
+ version("2024.01.stable", branch="release/2024.01")
+ version("2024.01.1", tag="2024.01.1", commit="0672b9a9a2a1e3846c5e2059fb73a07a129f22cd")
version("2023.08.stable", branch="release/2023.08")
version("2023.08.1", tag="2023.08.1", commit="753a72affd584a5e72fe153d1e8c47a394a3886e")
version("2023.03.stable", branch="release/2023.03")
version("2023.03.01", commit="9e0daf2ad169f6c7f6c60408475b3c2f71baebbf")
version("2022.10.01", commit="e8a5cc87e8f5ddfd14338459a4106f8e0d162c83")
- version("2022.05.15", commit="8ac72d9963c4ed7b7f56acb65feb02fbce353479")
- version("2022.04.15", commit="a92fdad29fc180cc522a9087bba9554a829ee002")
- version("2022.01.15", commit="0238e9a052a696707e4e65b2269f342baad728ae")
- version("2021.10.15", commit="a8f289e4dc87ff98e05cfc105978c09eb2f5ea16")
- version("2021.05.15", commit="004ea0c2aea6a261e7d5d216c24f8a703fc6c408")
+ version("2022.05.15", commit="8ac72d9963c4ed7b7f56acb65feb02fbce353479", deprecated=True)
+ version("2022.04.15", commit="a92fdad29fc180cc522a9087bba9554a829ee002", deprecated=True)
+ version("2022.01.15", commit="0238e9a052a696707e4e65b2269f342baad728ae", deprecated=True)
+ version("2021.10.15", commit="a8f289e4dc87ff98e05cfc105978c09eb2f5ea16", deprecated=True)
+ version("2021.05.15", commit="004ea0c2aea6a261e7d5d216c24f8a703fc6c408", deprecated=True)
version("2021.03.01", commit="68a051044c952f0f4dac459d9941875c700039e7", deprecated=True)
version("2020.08.03", commit="d9d13c705d81e5de38e624254cf0875cce6add9a", deprecated=True)
version("2020.07.21", commit="4e56c780cffc53875aca67d6472a2fb3678970eb", deprecated=True)
@@ -46,8 +52,9 @@ class Hpctoolkit(AutotoolsPackage):
version("2020.03.01", commit="94ede4e6fa1e05e6f080be8dc388240ea027f769", deprecated=True)
version("2019.12.28", commit="b4e1877ff96069fd8ed0fdf0e36283a5b4b62240", deprecated=True)
version("2019.08.14", commit="6ea44ed3f93ede2d0a48937f288a2d41188a277c", deprecated=True)
- version("2018.12.28", commit="8dbf0d543171ffa9885344f32f23cc6f7f6e39bc", deprecated=True)
- version("2018.11.05", commit="d0c43e39020e67095b1f1d8bb89b75f22b12aee9", deprecated=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Options for MPI and hpcprof-mpi. We always support profiling
# MPI applications. These options add hpcprof-mpi, the MPI
@@ -57,13 +64,14 @@ class Hpctoolkit(AutotoolsPackage):
"cray",
default=False,
description="Build hpcprof-mpi for Cray systems (may require --dirty).",
+ when="build_system=autotools",
)
variant(
"cray-static",
default=False,
description="Build old rev of hpcprof-mpi statically on Cray systems.",
- when="@:2022.09+cray",
+ when="@:2022.09+cray build_system=autotools",
)
variant(
@@ -104,45 +112,76 @@ class Hpctoolkit(AutotoolsPackage):
variant("rocm", default=False, description="Support ROCM on AMD GPUs.", when="@2022.04:")
# Other variants.
- variant("debug", default=False, description="Build in debug (develop) mode.")
+ variant(
+ "debug",
+ default=False,
+ description="Build in debug (develop) mode.",
+ when="build_system=autotools",
+ )
variant("viewer", default=True, description="Include hpcviewer.")
variant(
"python", default=False, description="Support unwinding Python source.", when="@2023.03:"
)
- with when("@develop build_system=autotools"):
+ build_system(
+ conditional("meson", when="@2024.01:"),
+ conditional("autotools", when="@:2024.01"),
+ default="autotools",
+ )
+
+ with when("@2024.01: build_system=autotools"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ with when("build_system=meson"):
+ depends_on("meson@1.1.0:", type="build")
+
+ with when("@:2024.01"):
+ depends_on("gmake", type="build")
+ depends_on("m4", type="build")
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ with when("@2024.02:"):
+ depends_on("pkgconfig", type="build")
+ depends_on("cmake", type="build")
+
boost_libs = (
"+atomic +chrono +date_time +filesystem +system +thread +timer"
" +graph +regex +shared +multithreaded visibility=global"
)
- depends_on("binutils +libiberty", type="link", when="@2021:2022.06")
- depends_on("binutils +libiberty~nls", type="link", when="@2020.04:2020")
+ depends_on("binutils@:2.39 +libiberty", type="link", when="@2021:2022.06")
+ depends_on("binutils@:2.39 +libiberty~nls", type="link", when="@2020.04:2020")
depends_on("binutils@:2.33.1 +libiberty~nls", type="link", when="@:2020.03")
depends_on("boost" + boost_libs)
depends_on("bzip2+shared", type="link")
- depends_on("dyninst@12.1.0:", when="@2022.0:")
- depends_on("dyninst@10.2.0:", when="@2021.0:2021.12")
- depends_on("dyninst@9.3.2:", when="@:2020")
+ depends_on("dyninst@12.1.0:", when="@2024.01:")
+ depends_on("dyninst@12.1.0:12", when="@2022:2023.08")
+ depends_on("dyninst@10.2.0:12", when="@2021")
+ depends_on("dyninst@9.3.2:12", when="@:2020")
depends_on("elfutils~nls", type="link")
depends_on("gotcha@1.0.3:", when="@:2020.09")
- depends_on("intel-tbb+shared")
+ depends_on("tbb")
+ depends_on("intel-tbb+shared", when="^[virtuals=tbb] intel-tbb")
depends_on("libdwarf", when="@:2022.06")
depends_on("libiberty+pic", when="@2022.10:")
- depends_on("libmonitor+hpctoolkit~dlopen", when="@2021.00:")
+ depends_on("libmonitor+hpctoolkit~dlopen", when="@2021.00:2024")
depends_on("libmonitor+hpctoolkit+dlopen", when="@:2020")
- depends_on("libmonitor@2023.02.13:", when="@2023.01:")
- depends_on("libmonitor@2021.11.08:", when="@2022.01:")
- depends_on("libunwind@1.4: +xz+pic")
+ depends_on("libmonitor@2023.02.13:", when="@2023.01:2024")
+ depends_on("libmonitor@2021.11.08:", when="@2022.01:2024")
+ depends_on("libunwind@1.4: +xz")
+ depends_on("libunwind +pic libs=static", when="@:2023.08")
depends_on("mbedtls+pic", when="@:2022.03")
depends_on("xerces-c transcoder=iconv")
- depends_on("xz+pic libs=static", type="link")
+ depends_on("xxhash@0.8.1:", when="@develop")
+ depends_on("xz", type="link")
+ depends_on("xz+pic libs=static", type="link", when="@:2023.08")
depends_on("yaml-cpp@0.7.0: +shared", when="@2022.10:")
+ depends_on("googletest@1.8.1: +gmock", type="test", when="@develop")
depends_on("zlib-api")
depends_on("zlib+shared", when="^[virtuals=zlib-api] zlib")
@@ -153,15 +192,19 @@ class Hpctoolkit(AutotoolsPackage):
depends_on("intel-gtpin", when="+gtpin")
depends_on("opencl-c-headers", when="+opencl")
- depends_on("intel-xed+pic", when="target=x86_64:")
- depends_on("memkind", type=("build", "run"), when="@2021.05.01:")
+ depends_on("memkind", type=("build", "run"), when="@2021.05.01:2023.08")
depends_on("papi", when="+papi")
depends_on("libpfm4", when="~papi")
depends_on("mpi", when="+cray")
depends_on("mpi", when="+mpi")
depends_on("hpcviewer@2022.10:", type="run", when="@2022.10: +viewer")
depends_on("hpcviewer", type="run", when="+viewer")
- depends_on("python@3.10:", type=("build", "run"), when="+python")
+ depends_on("python@3.10:", type=("build", "run"), when="@:2023.08 +python")
+ depends_on("python@3.8:", type=("build", "run"), when="@2024.01: +python")
+
+ with when("target=x86_64:"):
+ depends_on("intel-xed+pic")
+ depends_on("intel-xed+deprecated-includes", when="@:2024.01.1")
# Avoid 'link' dep, we don't actually link, and that adds rpath
# that conflicts with app.
@@ -178,6 +221,12 @@ class Hpctoolkit(AutotoolsPackage):
conflicts("^xz@5.2.7:5.2.8", msg="avoid xz 5.2.7:5.2.8 (broken symbol versions)")
conflicts("^intel-xed@2023.08:", when="@:2023.09")
+ # https://gitlab.com/hpctoolkit/hpctoolkit/-/issues/831
+ conflicts(
+ "^elfutils@0.191:",
+ msg="avoid elfutils 0.191 (known critical errors in hpcstruct for CUDA binaries)",
+ )
+
conflicts("+cray", when="@2022.10.01", msg="hpcprof-mpi is not available in 2022.10.01")
conflicts("+mpi", when="@2022.10.01", msg="hpcprof-mpi is not available in 2022.10.01")
@@ -185,6 +234,8 @@ class Hpctoolkit(AutotoolsPackage):
"^hip@5.3:", when="@:2022.12", msg="rocm 5.3 requires hpctoolkit 2023.03.01 or later"
)
+ conflicts("^hip@6:", when="@:2023", msg="rocm 6.0 requires hpctoolkit 2024.01.1 or later")
+
# Fix the build for old revs with gcc 10.x and 11.x.
patch("gcc10-enum.patch", when="@2020.01.01:2020.08 %gcc@10.0:")
patch("511afd95b01d743edc5940c84e0079f462b2c23e.patch", when="@2019.08.01:2021.03 %gcc@11.0:")
@@ -194,15 +245,52 @@ class Hpctoolkit(AutotoolsPackage):
depends_on("python@3.4:", type="build", when="@2020.03:2020.08")
patch("python3.patch", when="@2020.03:2020.08")
+ # hsa include path is hsa-rocr-dev-prefix-path/include
+ patch("correcting-hsa-include-path.patch", when="@2024.01 ^hip@6.0:")
+
# Fix a bug where make would mistakenly overwrite hpcrun-fmt.h.
# https://gitlab.com/hpctoolkit/hpctoolkit/-/merge_requests/751
+ @when("@:2022")
def patch(self):
with working_dir(join_path("src", "lib", "prof-lean")):
if os.access("hpcrun-fmt.txt", os.F_OK):
os.rename("hpcrun-fmt.txt", "hpcrun-fmt.readme")
- flag_handler = AutotoolsPackage.build_system_flags
+ # We only want hpctoolkit and hpcviewer paths and man paths in the
+ # module file. The run dependencies are all curried into hpctoolkit
+ # and we don't want to risk exposing a package if the application
+ # uses a different version of the same package.
+ def setup_run_environment(self, env):
+ spec = self.spec
+ env.clear()
+ env.prepend_path("PATH", spec.prefix.bin)
+ env.prepend_path("MANPATH", spec.prefix.share.man)
+ env.prepend_path("CPATH", spec.prefix.include)
+ env.prepend_path("LD_LIBRARY_PATH", spec.prefix.lib.hpctoolkit)
+ if spec.satisfies("+viewer"):
+ env.prepend_path("PATH", spec["hpcviewer"].prefix.bin)
+ env.prepend_path("MANPATH", spec["hpcviewer"].prefix.share.man)
+ def test_sort(self):
+ """build and run selection sort unit test"""
+ exe = "tst-sort"
+ cxx = which(os.environ["CXX"])
+ cxx(self.test_suite.current_test_data_dir.join("sort.cpp"), "-o", exe)
+
+ hpcrun = which("hpcrun")
+ meas = "tst-sort.m"
+ hpcrun("-e", "REALTIME@5000", "-t", "-o", meas, "./" + exe)
+
+ hpcstruct = which("hpcstruct")
+ struct = "tst-sort.hpcstruct"
+ hpcstruct("-j", "4", "--time", "-o", struct, "./" + exe)
+
+ hpcprof = which("hpcprof")
+ db = "tst-sort.d"
+ hpcprof("-S", struct, "-o", db, meas)
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
spec = self.spec
@@ -234,7 +322,7 @@ class Hpctoolkit(AutotoolsPackage):
if spec.satisfies("@:2022.03"):
args.append("--with-mbedtls=%s" % spec["mbedtls"].prefix)
- if spec.satisfies("@2021.05.01:"):
+ if spec.satisfies("@2021.05.01:2023.08"):
args.append("--with-memkind=%s" % spec["memkind"].prefix)
if spec.satisfies("+papi"):
@@ -245,18 +333,18 @@ class Hpctoolkit(AutotoolsPackage):
if spec.satisfies("@2022.10:"):
args.append("--with-yaml-cpp=%s" % spec["yaml-cpp"].prefix)
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--with-cuda=%s" % spec["cuda"].prefix)
- if "+level_zero" in spec:
+ if spec.satisfies("+level_zero"):
args.append("--with-level0=%s" % spec["oneapi-level-zero"].prefix)
# gtpin requires level_zero
- if "+gtpin" in spec:
+ if spec.satisfies("+gtpin"):
args.append("--with-gtpin=%s" % spec["intel-gtpin"].prefix)
args.append("--with-igc=%s" % spec["oneapi-igc"].prefix)
- if "+opencl" in spec:
+ if spec.satisfies("+opencl"):
args.append("--with-opencl=%s" % spec["opencl-c-headers"].prefix)
if spec.satisfies("+rocm"):
@@ -293,29 +381,14 @@ class Hpctoolkit(AutotoolsPackage):
return args
- # We only want hpctoolkit and hpcviewer paths and man paths in the
- # module file. The run dependencies are all curried into hpctoolkit
- # and we don't want to risk exposing a package if the application
- # uses a different version of the same package.
- def setup_run_environment(self, env):
- spec = self.spec
- env.clear()
- env.prepend_path("PATH", spec.prefix.bin)
- env.prepend_path("MANPATH", spec.prefix.share.man)
- env.prepend_path("CPATH", spec.prefix.include)
- env.prepend_path("LD_LIBRARY_PATH", spec.prefix.lib.hpctoolkit)
- if "+viewer" in spec:
- env.prepend_path("PATH", spec["hpcviewer"].prefix.bin)
- env.prepend_path("MANPATH", spec["hpcviewer"].prefix.share.man)
+ flag_handler = AutotoolsPackage.build_system_flags
# Build tests (spack install --run-tests). Disable the default
# spack tests and run autotools 'make check', but only from the
# tests directory.
build_time_test_callbacks = [] # type: List[str]
- install_time_test_callbacks = [] # type: List[str]
+ install_time_test_callbacks = ["check_install"] # type: List[str]
- @run_after("install")
- @on_package_attributes(run_tests=True)
def check_install(self):
if not self.spec.satisfies("@2022:"):
tty.warn("requires 2022.01.15 or later")
@@ -324,25 +397,89 @@ class Hpctoolkit(AutotoolsPackage):
with working_dir("tests"):
make("check")
- # Post-Install tests (spack test run). These are the same tests
- # but with a different Makefile that works outside the build
- # directory.
- @run_after("install")
- def copy_test_files(self):
- if self.spec.satisfies("@2022:"):
- self.cache_extra_test_sources(["tests"])
- def test_run_sort(self):
- """build and run selection sort unit test"""
- if not self.spec.satisfies("@2022:"):
- raise SkipTest("No tests exist for versions prior to 2022.01.15")
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+ def meson_args(self):
+ spec = self.spec
+
+ args = [
+ "-Dhpcprof_mpi=" + ("enabled" if spec.satisfies("+mpi") else "disabled"),
+ "-Dpython=" + ("enabled" if spec.satisfies("+python") else "disabled"),
+ "-Dpapi=" + ("enabled" if spec.satisfies("+papi") else "disabled"),
+ "-Dopencl=" + ("enabled" if spec.satisfies("+opencl") else "disabled"),
+ "-Dcuda=" + ("enabled" if spec.satisfies("+cuda") else "disabled"),
+ "-Drocm=" + ("enabled" if spec.satisfies("+rocm") else "disabled"),
+ "-Dlevel0=" + ("enabled" if spec.satisfies("+level_zero") else "disabled"),
+ "-Dgtpin=" + ("enabled" if spec.satisfies("+gtpin") else "disabled"),
+ ]
+
+ if spec.satisfies("@develop"):
+ args.append("-Dtests=" + ("enabled" if self.pkg.run_tests else "disabled"))
+
+ if spec.satisfies("@:2024.01"):
+ args.append(f"--native-file={self.gen_prefix_file()}")
+
+ return args
+
+ def gen_prefix_file(self):
+ """Generate a native file specifying install prefixes for dependencies"""
+ spec = self.spec
+
+ cfg = configparser.ConfigParser()
+ cfg["properties"] = {}
+ cfg["binaries"] = {}
+
+ cfg["properties"]["prefix_boost"] = f"'''{spec['boost'].prefix}'''"
+ cfg["properties"]["prefix_bzip"] = f"'''{spec['bzip2'].prefix}'''"
+ cfg["properties"]["prefix_dyninst"] = f"'''{spec['dyninst'].prefix}'''"
+ cfg["properties"]["prefix_elfutils"] = f"'''{spec['elfutils'].prefix}'''"
+ cfg["properties"]["prefix_tbb"] = f"'''{spec['intel-tbb'].prefix}'''"
+ cfg["properties"]["prefix_libmonitor"] = f"'''{spec['libmonitor'].prefix}'''"
+ cfg["properties"]["prefix_libunwind"] = f"'''{spec['libunwind'].prefix}'''"
+ cfg["properties"]["prefix_xerces"] = f"'''{spec['xerces-c'].prefix}'''"
+ cfg["properties"]["prefix_lzma"] = f"'''{spec['xz'].prefix}'''"
+ cfg["properties"]["prefix_zlib"] = f"'''{spec['zlib-api'].prefix}'''"
+ cfg["properties"]["prefix_libiberty"] = f"'''{spec['libiberty'].prefix}'''"
+
+ if spec.target.family == "x86_64":
+ cfg["properties"]["prefix_xed"] = f"'''{spec['intel-xed'].prefix}'''"
+
+ if spec.satisfies("+papi"):
+ cfg["properties"]["prefix_papi"] = f"'''{spec['papi'].prefix}'''"
+ else:
+ cfg["properties"]["prefix_perfmon"] = f"'''{spec['libpfm4'].prefix}'''"
+
+ cfg["properties"]["prefix_yaml_cpp"] = f"'''{spec['yaml-cpp'].prefix}'''"
+
+ if spec.satisfies("+cuda"):
+ cfg["properties"]["prefix_cuda"] = f"'''{spec['cuda'].prefix}'''"
+
+ if spec.satisfies("+level_zero"):
+ cfg["properties"]["prefix_level0"] = f"'''{spec['oneapi-level-zero'].prefix}'''"
+
+ if spec.satisfies("+gtpin"):
+ cfg["properties"]["prefix_gtpin"] = f"'''{spec['intel-gtpin'].prefix}'''"
+ cfg["properties"]["prefix_igc"] = f"'''{spec['oneapi-igc'].prefix}'''"
+
+ if spec.satisfies("+opencl"):
+ cfg["properties"]["prefix_opencl"] = f"'''{spec['opencl-c-headers'].prefix}'''"
+
+ if spec.satisfies("+rocm"):
+ cfg["properties"]["prefix_rocm_hip"] = f"'''{spec['hip'].prefix}'''"
+ cfg["properties"]["prefix_rocm_hsa"] = f"'''{spec['hsa-rocr-dev'].prefix}'''"
+ cfg["properties"]["prefix_rocm_tracer"] = f"'''{spec['roctracer-dev'].prefix}'''"
+ cfg["properties"]["prefix_rocm_profiler"] = f"'''{spec['rocprofiler-dev'].prefix}'''"
+
+ if spec.satisfies("+python"):
+ cfg["binaries"]["python"] = f"'''{spec['python'].command}'''"
- test_dir = self.test_suite.current_test_cache_dir.tests
- with working_dir(test_dir):
- make = which("make")
- make("-f", "Makefile.spack", "all")
+ if spec.satisfies("+mpi"):
+ cfg["binaries"]["mpicxx"] = f"'''{spec['mpi'].mpicxx}'''"
- run_sort = which(join_path(".", "run-sort"))
- assert run_sort, "run-sort is missing"
+ native_fd, native_path = tempfile.mkstemp(
+ prefix="spack-native.", suffix=".ini", dir=self.stage.path
+ )
+ with os.fdopen(native_fd, "w") as native_f:
+ cfg.write(native_f)
- run_sort()
+ return native_path
diff --git a/var/spack/repos/builtin/packages/hpctoolkit/test/sort.cpp b/var/spack/repos/builtin/packages/hpctoolkit/test/sort.cpp
new file mode 100644
index 0000000000..afbe5cc4ce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpctoolkit/test/sort.cpp
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2002-2023, Rice University.
+// See the file LICENSE for details.
+//
+// Simple selection sort, shows a couple of loops, some C++
+// templates.
+//
+
+#include <stdlib.h>
+#include <iostream>
+#include <list>
+
+using namespace std;
+
+typedef list <long> llist;
+
+int main(int argc, char **argv)
+{
+ llist olist, nlist;
+ long n, N, sum;
+
+ N = 80000;
+
+ if (argc > 1) {
+ N = atol(argv[1]);
+ }
+
+ sum = 0;
+ for (n = 1; n <= N; n += 2) {
+ olist.push_front(n);
+ olist.push_back(n + 1);
+ sum += 2 * n + 1;
+ }
+
+ cout << "orig list: " << N << " " << sum << endl;
+
+ sum = 0;
+ while (olist.size() > 0) {
+ auto min = olist.begin();
+
+ for (auto it = olist.begin(); it != olist.end(); ++it) {
+ if (*it < *min) {
+ min = it;
+ }
+ }
+ sum += *min;
+ nlist.push_back(*min);
+ olist.erase(min);
+ }
+
+ cout << "new list: " << N << " " << sum << endl;
+
+ return 0;
+}
diff --git a/var/spack/repos/builtin/packages/hpcviewer/package.py b/var/spack/repos/builtin/packages/hpcviewer/package.py
index e874c093a1..e5aae93bdb 100644
--- a/var/spack/repos/builtin/packages/hpcviewer/package.py
+++ b/var/spack/repos/builtin/packages/hpcviewer/package.py
@@ -10,29 +10,6 @@ import platform
from spack.package import *
-# The viewer and trace viewer tar files and sha256sum depend on the
-# version and machine type. Starting with 2019.08, the name of the
-# tar file contains the version number.
-def viewer_url(ver, mach):
- ver2 = ("-" + ver) if ver >= "2019.08" else ""
- return ("http://hpctoolkit.org/download/hpcviewer/{0}/hpcviewer{1}-linux.gtk.{2}.tgz").format(
- ver, ver2, mach
- )
-
-
-def trace_url(ver, mach):
- ver2 = ("-" + ver) if ver >= "2019.08" else ""
- return (
- "http://hpctoolkit.org/download/hpcviewer/{0}/hpctraceviewer{1}-linux.gtk.{2}.tgz"
- ).format(ver, ver2, mach)
-
-
-def darwin_url(ver, mach):
- return (
- "http://hpctoolkit.org/download/hpcviewer/{0}/hpcviewer-{0}-macosx.cocoa.{1}.zip"
- ).format(ver, mach)
-
-
class Hpcviewer(Package):
"""Binary distribution of hpcviewer and integrated hpctraceviewer for
the Rice HPCToolkit (Linux x86_64, ppc64le and aarch64, and MacOSX
@@ -43,10 +20,16 @@ class Hpcviewer(Package):
run hpcrun and hpcviewer on different machines.
"""
- homepage = "http://hpctoolkit.org"
+ homepage = "https://hpctoolkit.org"
maintainers("mwkrentel")
+ skip_version_audit = ["platform=windows"]
+
darwin_sha = {
+ ("2024.09", "aarch64"): "f2e5b516105fe99315950ac4cc3bce120afadeca57cfaa16d58684756950d373",
+ ("2024.09", "x86_64"): "dd7a807a70c384e73d9abfe67b9e41de5dedcec2da4a36cc487bb9cd1ed6b366",
+ ("2024.02", "aarch64"): "0f2bf2f89b7b9656b1b249efc8b24763f7865e8ddae5b22a3c21cc79fda49ce9",
+ ("2024.02", "x86_64"): "7f61166155f326179e309aa18568b44d98a2219973a323cd4713123b5bf6fd54",
("2023.07", "aarch64"): "6e3146fc3c6d778a256938a3589818ad3ac6496415f9fe27a012b6c1e7fbe766",
("2023.07", "x86_64"): "0711a71d44e0323ec4a274983e63f07d13d09a41ead08427d273808326565cc9",
("2023.05", "aarch64"): "b34e1ebc021e91c7260cc91a888e966a81913691de04c5e972da613d0dc34294",
@@ -69,6 +52,12 @@ class Hpcviewer(Package):
}
viewer_sha = {
+ ("2024.09", "aarch64"): "22f2fd477652a252375554270f82068691462e93d1fea4b7c1620e26ca0c9148",
+ ("2024.09", "ppc64le"): "eabfa180fc023b9d0d3db06763ec5bb9abc278d65a9763cd26d214605d1b8dd4",
+ ("2024.09", "x86_64"): "4b3acd19f96ffd387e5aca7a51fcaad4919449223ce77332c91d616660c2850a",
+ ("2024.02", "aarch64"): "b64166060ee0d2165fdb885ca7a0658c0d7656b2fcf3e5fc735127f3e577ed7b",
+ ("2024.02", "ppc64le"): "83ea588d547c4a8bc13db0ed5c763770e7b40b44b0318b75b54ccd226410aa0d",
+ ("2024.02", "x86_64"): "fa4d769ef93c666f2702d0cbc4bb49bd5f48c0c15a0eb4cbad6105807bcd57b0",
("2023.07", "aarch64"): "641c151ed0bc5d85db40187eb39ba4bcb7a4fdeeb07d5b4d00ed6a6d457f59b4",
("2023.07", "ppc64le"): "e76558377b5e64d8a07f6232468c8098d5aba32c2a6210c58bef26acd3ce8c9b",
("2023.07", "x86_64"): "06db75b1aab80f1142058716ca295bb43956a2b315bd7f385ec4c3a74ade0cbb",
@@ -122,27 +111,6 @@ class Hpcviewer(Package):
("2020.02", "x86_64"): "af1f514547a9325aee30eb891b31e38c7ea3f33d2d1978b44f83e7daa3d5de6b",
("2020.02", "ppc64"): "7bb4926202db663aedd5a6830778c5f73f6b08a65d56861824ea95ba83b1f59c",
("2020.02", "ppc64le"): "cfcebb7ba301affd6d21d2afd43c540e6dd4c5bc39b0d20e8bd1e4fed6aa3481",
- ("2020.01", "x86_64"): "3cd5a2a382cec1d64c8bd0abaf2b1461dcd4092a4b4074ddbdc1b96d2a0b4220",
- ("2020.01", "ppc64"): "814394a5f410033cc1019526c268ef98b5b381e311fcd39ae8b2bde6c6ff017c",
- ("2020.01", "ppc64le"): "e830e956b8088c415fb25ef44a8aca16ebcb27bcd34536866612343217e3f9e4",
- ("2019.12", "x86_64"): "6ba149c8d23d9913291655602894f7a91f9c838e69ae5682fd7b605467255c2d",
- ("2019.12", "ppc64"): "787257272381fac26401e1013952bea94635172503e7abf8063081fe03f08384",
- ("2019.12", "ppc64le"): "fd20891fdae6dd5c2313cdd98e53c52023a0cf146a1121d0c889ebedc08a8bb9",
- ("2019.09", "x86_64"): "40982a43880fe646b7f9d03ac4911b55f8a4464510eb8c7304ffaf4d4205ecc6",
- ("2019.09", "ppc64"): "3972d604bd160c058185b6f8f3f3a63c4031046734b29cc386c24e40831e6798",
- ("2019.09", "ppc64le"): "c348f442b7415aadb94ead06bd35e96442a49a9768fd8c972ca707d77d61e0c3",
- ("2019.08", "x86_64"): "249aae6a23dca19286ee15909afbeba5e515388f1c1ad87f572454534fccb9f2",
- ("2019.08", "ppc64"): "f91b4772c92c05a4a35c88eec094604f3c233c7233adeede97acba38592da379",
- ("2019.08", "ppc64le"): "b1bd5c76b37f225a01631193e0a62524bd41a54b3354a658fdfd0f66c444cc28",
- ("2019.07", "x86_64"): "e999781d6a7d178cb1db5b549650024fa9b19891e933bac8b0441d24e7bf015c",
- ("2019.07", "ppc64"): "057ce0e2d6be5639639f762fb43b116fe31fb855745abaf4ea26bd281cffaab1",
- ("2019.07", "ppc64le"): "40d6928e0761568168f3ce34f3ed320916ea60bda830dd74513897ef77386b28",
- ("2019.04", "x86_64"): "c524498ef235171e298c8142b7e73b0a1f7c433f9c471fb692d31f0685e53aa4",
- ("2019.04", "ppc64"): "dc9daee886ba72c0615db909860ee1aed0979f12c0d113efbe721ddabdf55199",
- ("2019.04", "ppc64le"): "dddabccef156996d390653639096ad3e27b7384a5754f42084f50c4a50a9009b",
- ("2019.02", "x86_64"): "e24368a3ec27b82736a781971a8371abfe7744b2a4f68b7b41d76f84af306b83",
- ("2019.02", "ppc64"): "72c1ef1a5682c3273e900bb248f126428a02dfe728af0c49c7ee8381938d1e18",
- ("2019.02", "ppc64le"): "02aaf27bb5b0f72d5b5738289bce60f6ef0ef7327ca96a890892509a09adc946",
}
trace_sha = {
@@ -158,27 +126,6 @@ class Hpcviewer(Package):
("2020.02", "x86_64"): "b7b634e91108aa50a2e8647ac6bac87df775ae38aff078545efaa84735e0a666",
("2020.02", "ppc64"): "a3e845901689e1b32bc6ab2826c6ac6ed352df4839090fa530b20f747e6e0957",
("2020.02", "ppc64le"): "a64a283f61e706d988952a7cede9fac0328b09d2d0b64e4c08acc54e38781c98",
- ("2020.01", "x86_64"): "9459177a2445e85d648384e2ccee20524592e91a74d615262f32d0876831cd7c",
- ("2020.01", "ppc64"): "02366a2ba30b9b2450d50cf44933288f04fae5bf9868eef7bb2ae1b49d4f454e",
- ("2020.01", "ppc64le"): "39970e84e397ed96bc994e7b8db3b7b3aab4e3155fa7ca8e68b9274bb58115f0",
- ("2019.12", "x86_64"): "6339b36e655e2c2b07af4cb40946f325acc46da3ec590d36069661e69b046a92",
- ("2019.12", "ppc64"): "fe4ee5af22a983fa0ddbfbd97fa6676f07492400536e900188455f21e489c59b",
- ("2019.12", "ppc64le"): "2688ea834c546b9e2c6e9d69d271a62dd00f6bc7ff4cb874563ba8d0ae5824e3",
- ("2019.09", "x86_64"): "8d7ce0710570bb8cd424d88cc4b5bfe821330f24fef84bbbbb370fa291b60a14",
- ("2019.09", "ppc64"): "dfb3fe8283cbaeaa1653e8c8bf68267a3f25886bc452309b10f88a7b1e713ec6",
- ("2019.09", "ppc64le"): "c1b6ab4f6c91e3a226e8629de62e718c92318ffd83d03db3c40678d578b99b20",
- ("2019.08", "x86_64"): "6cefed6a397298ab31cadd10831f5d5533d3f634a4a76bb93f686e603a42c5ed",
- ("2019.08", "ppc64"): "64ca5605c89dd3065cacaeee4a8e2ac14b47953530711ed9e04666c8435e44e8",
- ("2019.08", "ppc64le"): "bee03b5cb2de7e8556cf1249f98ece7848c13a0de6b8ba71786c430da68f7bcc",
- ("2019.07", "x86_64"): "267052cf742d12bbe900bc03bc7c47c8e1704fbaad0e1a3fc77b73dc506d5a68",
- ("2019.07", "ppc64"): "5ae63d8e2f2edf5c3b982d3663311e4d55f9b378f512926b3ebadab27ba72e22",
- ("2019.07", "ppc64le"): "c2883714cbafa5252432c52d1d32ab5f34554b33a9bad20dcd2c0632388fbee5",
- ("2019.04", "x86_64"): "f5f908c0e52c97a72af1af8519f4b191298fe52bd811dd06a051b68cd7bcce27",
- ("2019.04", "ppc64"): "221683c992e4fe2cd9079ad2ebb531d99d04a3cbb3a8860f795b276b1eaeab19",
- ("2019.04", "ppc64le"): "fe539c6a165a72bba6ea7bdb34a90d862d427c4d55095c97794d54e6dd9d3075",
- ("2019.02", "x86_64"): "5ff11317a638318295821204ffcb1276e9da1684cd5f298410ae2bf78ce88b6b",
- ("2019.02", "ppc64"): "95b2a7d848ecb924591c248f5e47c641646ef90a071db48237ddb96c4b71a8fb",
- ("2019.02", "ppc64le"): "01a159306e7810efe07157ec823ac6ca7570ec2014c95db599a3f90eee33355c",
}
system = platform.system().lower()
@@ -188,34 +135,42 @@ class Hpcviewer(Package):
# Versions for MacOSX / Darwin
if system == "darwin":
- for key in darwin_sha.keys():
- if key[1] == machine:
- version(key[0], url=darwin_url(*key), sha256=darwin_sha[key])
+ for (ver, arch), sha in darwin_sha.items():
+ if arch == machine:
+ version(
+ ver,
+ url=f"https://gitlab.com/hpctoolkit/hpcviewer/-/releases/{ver}/downloads/hpcviewer-macosx.cocoa.{arch}.zip",
+ sha256=sha,
+ # Versions before 2022.01 are dead links
+ deprecated=(ver < "2022.01"),
+ )
# Versions for Linux and Cray front-end
if system == "linux":
- for key in viewer_sha.keys():
- if key[1] == machine:
+ for (ver, arch), sha in viewer_sha.items():
+ if arch == machine:
version(
- key[0],
- url=viewer_url(*key),
- sha256=viewer_sha[key],
- deprecated=(key[0] <= "2020.99"),
+ ver,
+ url=f"https://gitlab.com/hpctoolkit/hpcviewer/-/releases/{ver}/downloads/hpcviewer-linux.gtk.{arch}.tgz",
+ sha256=sha,
+ # Versions before 2022.01 are dead links
+ deprecated=(ver < "2022.01"),
)
# Current versions include the viewer and trace viewer in
# one tar file. Before 2020.07, the trace viewer was a
# separate tar file (resource).
- if key in trace_sha:
+ if (ver, arch) in trace_sha:
resource(
name="hpctraceviewer",
- url=trace_url(*key),
- sha256=trace_sha[key],
+ url=f"https://gitlab.com/hpctoolkit/hpcviewer/-/releases/{ver}/downloads/hpctraceviewer-linux.gtk.{arch}.tgz",
+ sha256=trace_sha[ver, arch],
placement="TRACE",
- when="@{0}".format(key[0]),
+ when=f"@{ver}",
)
- depends_on("java@11:", type=("build", "run"), when="@2021.0:")
+ depends_on("java@17:", type=("build", "run"), when="@2024.09:")
+ depends_on("java@11:", type=("build", "run"), when="@2021.0:2024.02")
depends_on("java@8", type=("build", "run"), when="@:2020")
# Install for MacOSX / Darwin
@@ -239,11 +194,6 @@ class Hpcviewer(Package):
file.write("open " + app_dir + "\n")
os.chmod(viewer_file, 0o755)
- # Install for Cray front-end is the same as Linux.
- @when("platform=cray")
- def install(self, spec, prefix):
- self.linux_install(spec, prefix)
-
@when("platform=linux")
def install(self, spec, prefix):
self.linux_install(spec, prefix)
diff --git a/var/spack/repos/builtin/packages/hpcx-mpi/package.py b/var/spack/repos/builtin/packages/hpcx-mpi/package.py
index 95b575d167..54becb1539 100644
--- a/var/spack/repos/builtin/packages/hpcx-mpi/package.py
+++ b/var/spack/repos/builtin/packages/hpcx-mpi/package.py
@@ -19,8 +19,10 @@ class HpcxMpi(Package):
provides("mpi")
+ requires("platform=linux")
+
def install(self, spec, prefix):
- raise InstallError("HPC-X MPI is not buildable, it is for external " "specs only.")
+ raise InstallError("HPC-X MPI is not buildable, it is for external specs only.")
def setup_dependent_package(self, module, dependent_spec):
# This works for AOCC (AMD), Intel and GNU.
diff --git a/var/spack/repos/builtin/packages/hpddm/package.py b/var/spack/repos/builtin/packages/hpddm/package.py
index df75297679..f34f6496cf 100644
--- a/var/spack/repos/builtin/packages/hpddm/package.py
+++ b/var/spack/repos/builtin/packages/hpddm/package.py
@@ -26,6 +26,10 @@ class Hpddm(Package):
version("2.1.3", commit="32025e4ee75a16fa67399d26dd86910c03910dba")
version("2.1.2", commit="e58205623814f59bf2aec2e2bab8eafcfbd22466")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/hpgmg/package.py b/var/spack/repos/builtin/packages/hpgmg/package.py
index 75a79367c9..cd37b5a702 100644
--- a/var/spack/repos/builtin/packages/hpgmg/package.py
+++ b/var/spack/repos/builtin/packages/hpgmg/package.py
@@ -32,6 +32,8 @@ class Hpgmg(MakefilePackage):
)
version("0.3", sha256="12a65da216fec91daea78594ae4b5a069c8f1a700f1ba21eed9f45a79a68c793")
+ depends_on("c", type="build") # generated
+
variant("fe", default=False, description="Build finite element solver")
variant(
"fv",
@@ -50,24 +52,24 @@ class Hpgmg(MakefilePackage):
def configure_args(self):
args = []
- if "+fe" in self.spec and not ("@0.3" in self.spec):
+ if self.spec.satisfies("+fe") and not self.spec.satisfies("@0.3"):
args.append("--fe")
- if "fv=serial" in self.spec:
+ if self.spec.satisfies("fv=serial"):
args.append("--no-fv-mpi")
- if "mpi" in self.spec:
+ if self.spec.satisfies("^mpi"):
args.append("--CC={0}".format(self.spec["mpi"].mpicc))
cflags = []
- if "fv=none" in self.spec:
+ if self.spec.satisfies("fv=none"):
args.append("--no-fv")
else:
# Apple's Clang doesn't support OpenMP
if not self.spec.satisfies("%apple-clang"):
cflags.append(self.compiler.openmp_flag)
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
cflags.append("-g")
else:
cflags.append("-O3")
diff --git a/var/spack/repos/builtin/packages/hping/package.py b/var/spack/repos/builtin/packages/hping/package.py
index 187c5630c6..3aa211ce08 100644
--- a/var/spack/repos/builtin/packages/hping/package.py
+++ b/var/spack/repos/builtin/packages/hping/package.py
@@ -16,6 +16,8 @@ class Hping(AutotoolsPackage):
version("master", commit="3547c7691742c6eaa31f8402e0ccbb81387c1b99")
+ depends_on("c", type="build") # generated
+
patch("bpf.patch", sha256="99b9f91a308ffca306f69ccdb285e289ee3d280ec47ec7229e3a7669cca512f2")
depends_on("libpcap")
diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py
index 8865405f21..b57692b050 100644
--- a/var/spack/repos/builtin/packages/hpl/package.py
+++ b/var/spack/repos/builtin/packages/hpl/package.py
@@ -23,6 +23,8 @@ class Hpl(AutotoolsPackage):
version("2.3", sha256="32c5c17d22330e6f2337b681aded51637fb6008d3f0eb7c277b163fadd612830")
version("2.2", sha256="ac7534163a09e21a5fa763e4e16dfc119bc84043f6e6a807aba666518f8df440")
+ depends_on("c", type="build") # generated
+
variant("openmp", default=False, description="Enable OpenMP support")
depends_on("mpi@1.1:")
@@ -48,7 +50,7 @@ class Hpl(AutotoolsPackage):
config = []
# OpenMP support
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
config.append("OMP_DEFS = {0}".format(self.compiler.openmp_flag))
config.extend(
@@ -103,27 +105,30 @@ class Hpl(AutotoolsPackage):
def configure_args(self):
filter_file(r"^libs10=.*", "libs10=%s" % self.spec["blas"].libs.ld_flags, "configure")
- if "+openmp" in self.spec:
- config = ["CFLAGS=-O3 " + self.compiler.openmp_flag]
- else:
- config = ["CFLAGS=-O3"]
+ cflags, ldflags = ["-O3"], []
+ if self.spec.satisfies("+openmp"):
+ cflags.append(self.compiler.openmp_flag)
if (
self.spec.satisfies("^intel-mkl")
or self.spec.satisfies("^intel-oneapi-mkl")
or self.spec.satisfies("^intel-parallel-studio+mkl")
):
- config.append("LDFLAGS={0}".format(self.spec["blas"].libs.ld_flags))
+ ldflags.append(self.spec["blas"].libs.ld_flags)
+
+ if self.spec.satisfies("%aocc"):
+ if self.spec.satisfies("%aocc@3:"):
+ ldflags.extend(["-lamdlibm", "-lm"])
+ if self.spec.satisfies("%aocc@4:"):
+ ldflags.append("-lamdalloc")
- if "%aocc" in self.spec:
- amd_ldflags = " "
- if "%aocc@3:" in self.spec:
- amd_ldflags += "-lamdlibm -lm "
- if "%aocc@4:" in self.spec:
- amd_ldflags += "-lamdalloc "
- config.append("LDFLAGS=" + amd_ldflags)
+ if self.spec["blas"].name == "fujitsu-ssl2" and (
+ self.spec.satisfies("%fj") or self.spec.satisfies("%clang@17:")
+ ):
+ cflags.append("-SSL2BLAMP")
+ ldflags.append("-SSL2BLAMP")
- return config
+ return ["CFLAGS={0}".format(" ".join(cflags)), "LDFLAGS={0}".format(" ".join(ldflags))]
@when("@:2.2")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/hpx-kokkos/package.py b/var/spack/repos/builtin/packages/hpx-kokkos/package.py
index 83e13413ed..c01af6c03f 100644
--- a/var/spack/repos/builtin/packages/hpx-kokkos/package.py
+++ b/var/spack/repos/builtin/packages/hpx-kokkos/package.py
@@ -24,6 +24,8 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
version("0.2.0", sha256="289b711cea26afe80be002fc521234c9194cd0e8f69863f3b08b654674dbe5d5")
version("0.1.0", sha256="24edb817d0969f4aea1b68eab4984c2ea9a58f4760a9b8395e20f85b178f0850")
+ depends_on("cxx", type="build")
+
cxxstds = ("14", "17", "20")
variant(
"cxxstd",
@@ -79,7 +81,7 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
self.define("HPX_KOKKOS_ENABLE_BENCHMARKS", self.run_tests),
]
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
args += [self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)]
return args
diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py
index c0ec68df22..b40de24c0e 100644
--- a/var/spack/repos/builtin/packages/hpx/package.py
+++ b/var/spack/repos/builtin/packages/hpx/package.py
@@ -16,7 +16,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://hpx.stellar-group.org/"
url = "https://github.com/STEllAR-GROUP/hpx/archive/v0.0.0.tar.gz"
git = "https://github.com/STEllAR-GROUP/hpx.git"
- maintainers("msimberg", "albestro", "teonnik", "hkaiser")
+ maintainers("msimberg", "albestro", "teonnik", "hkaiser", "diehlpk")
license("BSL-1.0")
@@ -24,6 +24,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version("stable", tag="stable", commit="103a7b8e3719a0db948d1abde29de0ff91e070be")
+ version("1.10.0", sha256="5720ed7d2460fa0b57bd8cb74fa4f70593fe8675463897678160340526ec3c19")
version("1.9.1", sha256="1adae9d408388a723277290ddb33c699aa9ea72defadf3f12d4acc913a0ff22d")
version("1.9.0", sha256="2a8dca78172fbb15eae5a5e9facf26ab021c845f9c09e61b1912e6cf9e72915a")
version("1.8.1", sha256="2fc4c10f55e2e6bcdc6f6ff950e26c6d8e218e138fdbd885ee71ccf5c5549054")
@@ -40,6 +41,8 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
version("1.2.0", sha256="20942314bd90064d9775f63b0e58a8ea146af5260a4c84d0854f9f968077c170")
version("1.1.0", sha256="1f28bbe58d8f0da600d60c3a74a644d75ac777b20a018a5c1c6030a470e8a1c9")
+ depends_on("cxx", type="build")
+
generator("ninja")
map_cxxstd = lambda cxxstd: "2a" if cxxstd == "20" else cxxstd
@@ -60,12 +63,12 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
variant(
"max_cpu_count",
- default="64",
+ default="auto",
description="Max number of OS-threads for HPX applications",
- values=lambda x: isinstance(x, str) and x.isdigit(),
+ values=lambda x: isinstance(x, str) and (x.isdigit() or x == "auto"),
)
- instrumentation_values = ("apex", "google_perftools", "papi", "valgrind")
+ instrumentation_values = ("apex", "google_perftools", "papi", "valgrind", "thread_debug")
variant(
"instrumentation",
values=any_combination_of(*instrumentation_values),
@@ -105,11 +108,10 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
depends_on("boost +context", when="+generic_coroutines")
for cxxstd in cxxstds:
depends_on("boost cxxstd={0}".format(map_cxxstd(cxxstd)), when="cxxstd={0}".format(cxxstd))
- depends_on("asio", when="@1.7:")
- for cxxstd in cxxstds:
- depends_on(
- "asio cxxstd={0}".format(map_cxxstd(cxxstd)), when="cxxstd={0} ^asio".format(cxxstd)
- )
+
+ with when("@1.7:"):
+ for cxxstd in cxxstds:
+ depends_on(f"asio cxxstd={map_cxxstd(cxxstd)}", when=f"cxxstd={cxxstd}")
depends_on("gperftools", when="malloc=tcmalloc")
depends_on("jemalloc", when="malloc=jemalloc")
@@ -225,6 +227,9 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
def cmake_args(self):
spec, args = self.spec, []
+ format_max_cpu_count = lambda max_cpu_count: (
+ "" if max_cpu_count == "auto" else max_cpu_count
+ )
args += [
self.define("HPX_WITH_CXX{0}".format(spec.variants["cxxstd"].value), True),
self.define_from_variant("HPX_WITH_MALLOC", "malloc"),
@@ -236,9 +241,12 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("HPX_WITH_ASYNC_CUDA", "async_cuda"),
self.define("HPX_WITH_TESTS", self.run_tests),
self.define("HPX_WITH_NETWORKING", "networking=none" not in spec),
- self.define("HPX_WITH_PARCELPORT_TCP", "networking=tcp" in spec),
- self.define("HPX_WITH_PARCELPORT_MPI", "networking=mpi" in spec),
- self.define_from_variant("HPX_WITH_MAX_CPU_COUNT", "max_cpu_count"),
+ self.define("HPX_WITH_PARCELPORT_TCP", spec.satisfies("networking=tcp")),
+ self.define("HPX_WITH_PARCELPORT_MPI", spec.satisfies("networking=mpi")),
+ self.define(
+ "HPX_WITH_MAX_CPU_COUNT",
+ format_max_cpu_count(spec.variants["max_cpu_count"].value),
+ ),
self.define_from_variant("HPX_WITH_GENERIC_CONTEXT_COROUTINES", "generic_coroutines"),
self.define("BOOST_ROOT", spec["boost"].prefix),
self.define("HWLOC_ROOT", spec["hwloc"].prefix),
@@ -252,7 +260,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
args += [self.define("HPX_WITH_UNITY_BUILD", True)]
# HIP support requires compiling with hipcc
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
args += [self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)]
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args += [self.define("__skip_rocmclang", True)]
@@ -260,7 +268,13 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
# Instrumentation
args += self.instrumentation_args()
- if "instrumentation=apex" in spec:
+ if spec.satisfies("instrumentation=thread_debug"):
+ args += [
+ self.define("HPX_WITH_THREAD_DEBUG_INFO", True),
+ self.define("HPX_WITH_LOGGING", True),
+ ]
+
+ if spec.satisfies("instrumentation=apex"):
args += [
self.define("APEX_WITH_OTF2", True),
self.define("OTF2_ROOT", spec["otf2"].prefix),
diff --git a/var/spack/repos/builtin/packages/hpx5/package.py b/var/spack/repos/builtin/packages/hpx5/package.py
index 147101cc20..eccb045c21 100644
--- a/var/spack/repos/builtin/packages/hpx5/package.py
+++ b/var/spack/repos/builtin/packages/hpx5/package.py
@@ -29,6 +29,9 @@ class Hpx5(AutotoolsPackage):
version("2.1.0", sha256="675826f669eeb3eab40947715af8c8495e2b3d299223372431dc01c1f7d5d616")
version("2.0.0", sha256="0278728557b6684aeb86228f44d548ac809302f05a0b9c8b433cdd157629e384")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Don't second-guess what compiler we are using on Cray
patch("configure.patch", when="@4.0.0")
@@ -81,24 +84,24 @@ class Hpx5(AutotoolsPackage):
# '--with-papi=papi', # currently disabled in HPX
]
- if "+cxx11" in spec:
+ if spec.satisfies("+cxx11"):
args += ["--enable-hpx++"]
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
args += ["--enable-debug"]
- if "+instrumentation" in spec:
+ if spec.satisfies("+instrumentation"):
args += ["--enable-instrumentation"]
- if "+mpi" in spec or "+photon" in spec:
+ if spec.satisfies("+mpi") or spec.satisfies("+photon"):
# photon requires mpi
args += ["--enable-mpi"]
# Choose pkg-config name for MPI library
- if "^openmpi" in spec:
+ if spec.satisfies("^openmpi"):
args += ["--with-mpi=ompi-cxx"]
- elif "^mpich" in spec:
+ elif spec.satisfies("^mpich"):
args += ["--with-mpi=mpich"]
- elif "^mvapich2" in spec:
+ elif spec.satisfies("^mvapich2"):
args += ["--with-mpi=mvapich2-cxx"]
else:
args += ["--with-mpi=system"]
@@ -107,17 +110,17 @@ class Hpx5(AutotoolsPackage):
# if '+metis' in spec:
# args += ['--with-metis=???']
- if "+opencl" in spec:
+ if spec.satisfies("+opencl"):
args += ["--enable-opencl"]
- if "^pocl" in spec:
+ if spec.satisfies("^pocl"):
args += ["--with-opencl=pocl"]
else:
args += ["--with-opencl=system"]
- if "+photon" in spec:
+ if spec.satisfies("+photon"):
args += ["--enable-photon"]
- if "+pic" in spec:
+ if spec.satisfies("+pic"):
args += ["--with-pic"]
return args
diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch b/var/spack/repos/builtin/packages/hsa-rocr-dev/0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch
deleted file mode 100644
index 6b73f81635..0000000000
--- a/var/spack/repos/builtin/packages/hsa-rocr-dev/0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 905b812fffdf109f767e1dc079ac1d32d5cf5838 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Wed, 5 Aug 2020 17:44:05 +0200
-Subject: [PATCH] Do not set an explicit rpath by default, since package
- managers cannot override them
-
----
- src/CMakeLists.txt | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 7174044..10c6fcc 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -114,7 +114,9 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR}/libamdhsacode )
- add_definitions ( -DROCR_BUILD_ID=${PACKAGE_VERSION_STRING} )
-
- ## Set RUNPATH - ../../lib covers use of the legacy symlink in /hsa/lib/
--set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
-+if (NOT CMAKE_INSTALL_RPATH)
-+ set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
-+endif ()
-
- ## ------------------------- Linux Compiler and Linker options -------------------------
- set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function" )
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py
index d0a153a595..d647a6aa96 100644
--- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py
+++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py
@@ -15,135 +15,53 @@ class HsaRocrDev(CMakePackage):
HSA ROCm kernel agents.AMD Heterogeneous System Architecture HSA -
Linux HSA Runtime for Boltzmann (ROCm) platforms."""
- homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime"
- git = "https://github.com/RadeonOpenCompute/ROCR-Runtime.git"
- url = "https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCR-Runtime"
+ git = "https://github.com/ROCm/ROCR-Runtime.git"
+ url = "https://github.com/ROCm/ROCR-Runtime/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "haampie")
libraries = ["libhsa-runtime64"]
version("master", branch="master")
+ version("6.2.4", sha256="b7aa0055855398d1228c39a6f4feb7d7be921af4f43d82855faf0b531394bb9b")
+ version("6.2.1", sha256="dbe477b323df636f5e3221471780da156c938ec00dda4b50639aa8d7fb9248f4")
+ version("6.2.0", sha256="c98090041fa56ca4a260709876e2666f85ab7464db9454b177a189e1f52e0b1a")
+ version("6.1.2", sha256="6eb7a02e5f1e5e3499206b9e74c9ccdd644abaafa2609dea0993124637617866")
+ version("6.1.1", sha256="72841f112f953c16619938273370eb8727ddf6c2e00312856c9fca54db583b99")
+ version("6.1.0", sha256="50386ebcb7ff24449afa2a10c76a059597464f877225c582ba3e097632a43f9c")
+ version("6.0.2", sha256="e7ff4d7ac35a2dd8aad1cb40b96511a77a9c23fe4d1607902328e53728e05c28")
+ version("6.0.0", sha256="99e8fa1af52d0bf382f28468e1a345af1ff3452c35914a6a7b5eeaf69fc568db")
version("5.7.1", sha256="655e9bfef4b0b6ad3f9b89c934dc0a8377273bb0bccbda6c399ac5d5d2c1c04c")
version("5.7.0", sha256="2c56ec5c78a36f2b847afd4632cb25dbf6ecc58661eb2ae038c2552342e6ce23")
version("5.6.1", sha256="4de9a57c2092edf9398d671c8a2c60626eb7daf358caf710da70d9c105490221")
version("5.6.0", sha256="30875d440df9d8481ffb24d87755eae20a0efc1114849a72619ea954f1e9206c")
version("5.5.1", sha256="53d84ad5ba5086ed4ad67ad892c52c0e4eba8ddfa85c2dd341bf825f4d5fe4ee")
version("5.5.0", sha256="8dbc776b56f93ddaa2ca38bf3b88299b8091de7c1b3f2e481064896cf6808e6c")
- version("5.4.3", sha256="a600eed848d47a7578c60da7e64eb92f29bbce2ec67932b251eafd4c2974cb67")
- version("5.4.0", sha256="476cd18500cc227d01f6b44c00c7adc8574eb8234b6b4daefc219650183fa090")
- version("5.3.3", sha256="aca88d90f169f35bd65ce3366b8670c7cdbe3abc0a2056eab805d0192cfd7130")
- version("5.3.0", sha256="b51dbedbe73390e0be748b92158839c82d7fa0e514fede60aa7696dc498facf0")
- version("5.2.3", sha256="978de85d3455207bb82bef2254a4624e9116b1258a8c164d7a7e21a644eff12f")
- version("5.2.1", sha256="448a7409bdc6618332a42b9503122996f26b91768140b710ba99bff8a8c03dd9")
- version("5.2.0", sha256="529e49693dd9f6459586dd0a26f14dd77dbdf8c0b45fb54830b294eba7babd27")
- version("5.1.3", sha256="479340ec34cdffbbdb1002c85a47d1fccd23e8394631a1f001ef6130be08287d")
- version("5.1.0", sha256="a5f7245059c3d28dbc037e1e6fa3f09084e29147096dd61f7ce5560291ab330f")
- version(
- "5.0.2",
- sha256="94ce313f3b37e6571778dc6865d73dafa798cbaf4de63b5307382c4a2418e99f",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="61644365ea2b09fa7ec22f3dbdb74f2b6b1daa34b180138da9e0c856006a373e",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="d99eddedce0a97d9970932b64b0bb4743e47d2740e8db0288dbda7bec3cefa80",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="fbf550f243dddfef46a716e360b77c43886fed3eef67215ab9dab1c82f3851ca",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="85fbd1645120b71635844090ce8bd9f7af0a3d1065d5fae476879f99ba0c0475",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="2a08657a517971447fc233cb2c8ee2e117c6ab5efc31af147b28b3ef59b3847d",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="fa0e7bcd64e97cbff7c39c9e87c84a49d2184dc977b341794770805ec3f896cc",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="c223a5f7ccac280520abb6ea49fdd36fa9468718098a9d984be6ef839ccbc6db",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="e84c48e80ea38698a5bd5da3940048ad3cab3696d10a53132acad07ca357f17c",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="58866d8acdb6cc45227f2412098e37c65908b20ed3dd54901dfb515c15ad5f71",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="d722fb61f62037894957856f2c2d17231c4622bdf75db372321ee30206dceeb6",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="1dfad4d89d6c099e15073ed38e083bcf6cc463470dcc8a1e1b9e22060c060c72",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="0071d14431f73ce74574e61d0786f2b7cf34b14ea898a1f54b6e1b06b2d468c0",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="52c12eec3e3404c0749c70f156229786ee0c3e6d3c979aed9bbaea500fa1f3b8",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="a600eed848d47a7578c60da7e64eb92f29bbce2ec67932b251eafd4c2974cb67")
+ version("5.4.0", sha256="476cd18500cc227d01f6b44c00c7adc8574eb8234b6b4daefc219650183fa090")
+ version("5.3.3", sha256="aca88d90f169f35bd65ce3366b8670c7cdbe3abc0a2056eab805d0192cfd7130")
+ version("5.3.0", sha256="b51dbedbe73390e0be748b92158839c82d7fa0e514fede60aa7696dc498facf0")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("shared", default=True, description="Build shared or static library")
variant("image", default=True, description="build with or without image support")
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3:", type="build")
- depends_on("pkgconfig", type="build", when="@5.3.0:")
+ depends_on("pkgconfig", type="build")
# Note, technically only necessary when='@3.7: +image', but added to all
# to work around https://github.com/spack/spack/issues/23951
depends_on("xxd", when="+image", type="build")
depends_on("elf", type="link")
depends_on("numactl")
- depends_on("pkgconfig", type="build", when="@5.3.0:")
+ depends_on("pkgconfig")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -154,20 +72,39 @@ class HsaRocrDev(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
# allow standalone rocm-device-libs (useful for aomp)
- depends_on(
- "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
- )
+ depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
- # Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways
- patch("0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch", when="@3.5.0")
patch("0002-Remove-explicit-RPATH-again.patch", when="@3.7.0:5.6")
root_cmakelists_dir = "src"
@@ -195,19 +132,26 @@ class HsaRocrDev(CMakePackage):
args = [
self.define("LIBELF_INCLUDE_DIRS", libelf_include),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("IMAGE_SUPPORT", "image"),
]
- if self.spec.satisfies("@3.7.0:"):
- args.append(self.define_from_variant("IMAGE_SUPPORT", "image"))
-
- # device libs is bundled with llvm-amdgpu (default) or standalone
- if self.spec.satisfies("^rocm-device-libs"):
- bitcode_dir = spec["rocm-device-libs"].prefix.amdgcn.bitcode
- else:
- bitcode_dir = spec["llvm-amdgpu"].prefix.amdgcn.bitcode
+ # device libs is bundled with llvm-amdgpu (default) or standalone
+ if self.spec.satisfies("^rocm-device-libs"):
+ bitcode_dir = spec["rocm-device-libs"].prefix.amdgcn.bitcode
+ else:
+ bitcode_dir = spec["llvm-amdgpu"].prefix.amdgcn.bitcode
- args.append(self.define("BITCODE_DIR", bitcode_dir))
+ args.append(self.define("BITCODE_DIR", bitcode_dir))
if self.spec.satisfies("@5.6:"):
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ if self.spec.satisfies("@6.0"):
+ args.append(self.define("ROCM_PATCH_VERSION", "60000"))
+ if self.spec.satisfies("@6.1"):
+ args.append(self.define("ROCM_PATCH_VERSION", "60100"))
+ if self.spec.satisfies("@6.2"):
+ args.append(self.define("ROCM_PATCH_VERSION", "60200"))
+ if self.spec.satisfies("@5.7.0:"):
+ args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
+
return args
diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/0001-Remove-compiler-support-libraries-and-libudev-as-req.patch b/var/spack/repos/builtin/packages/hsakmt-roct/0001-Remove-compiler-support-libraries-and-libudev-as-req.patch
deleted file mode 100644
index b0a04e3e84..0000000000
--- a/var/spack/repos/builtin/packages/hsakmt-roct/0001-Remove-compiler-support-libraries-and-libudev-as-req.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 423bfb21eee3f75c5a116a88f7903a7dfb9ff89c Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Thu, 10 Feb 2022 13:50:55 +0100
-Subject: [PATCH] Remove compiler support libraries and libudev as required
- dependencies
-
----
- CMakeLists.txt | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 077ab51..0af642e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -187,16 +187,6 @@ target_link_libraries ( ${HSAKMT_TARGET}
- )
-
- target_compile_options(${HSAKMT_TARGET} PRIVATE ${DRM_CFLAGS} ${HSAKMT_C_FLAGS})
--if(NOT DISTRO_ID MATCHES "ubuntu")
-- find_library(LIBGCC NAMES libgcc_s.so.1 REQUIRED)
-- message(STATUS "LIBGCC:" ${LIBGCC})
-- target_link_libraries( ${HSAKMT_TARGET} PRIVATE ${LIBGCC} )
--else()
-- find_library(UDEV NAMES libudev.so libudev.a REQUIRED)
-- message(STATUS "UDEV:" ${UDEV})
-- find_package(ZLIB REQUIRED)
-- target_link_libraries( ${HSAKMT_TARGET} PRIVATE ${ZLIB} ${UDEV} )
--endif()
-
- ## Define default paths and packages.
- if( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py
index e087ea6519..0b980cf83c 100644
--- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py
+++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py
@@ -14,127 +14,71 @@ class HsakmtRoct(CMakePackage):
Thunk Interface is a user-mode API interfaces used to interact
with the ROCk driver."""
- homepage = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
- git = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git"
- url = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCT-Thunk-Interface"
+ git = "https://github.com/ROCm/ROCT-Thunk-Interface.git"
+ url = "https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
version("master", branch="master")
+ version("6.2.4", sha256="5c71655e3a1b9d1404dc8cb64b9d2fadd27e67606aaa8aec0c325768d8c483c0")
+ version("6.2.1", sha256="bba5dd8cce595d94d6a8e467dbd6de9e921f81e665ca8aac1e346e0ade7620f0")
+ version("6.2.0", sha256="73df98ca2be8a887cb76554c23f148ef6556bdbccfac99f34111fa1f87fd7c5d")
+ version("6.1.2", sha256="097a5b7eb136300667b36bd35bf55e4a283a1ed04e614cf24dddca0a65c86389")
+ version("6.1.1", sha256="c586d8a04fbd9a7bc0a15e0a6a161a07f88f654402bb11694bd8aebc343c00f0")
+ version("6.1.0", sha256="1085055068420821f7a7adb816692412b5fb38f89d67b9edb9995198f39e2f31")
+ version("6.0.2", sha256="5354bda9382f80edad834463f2c684289841770a4f7b13f0f40bd8271cc4c71d")
+ version("6.0.0", sha256="9f4e80bd0a714ce45326941b906a62298c62025eff186dc6c48282ce84c787c7")
version("5.7.1", sha256="38bc3732886a52ca9cd477ec6fcde3ab17a0ba5dc8e2f7ac34c4de597bd00e8b")
version("5.7.0", sha256="52293e40c4ba0c653d796e2f6109f5fb4c79f5fb82310ecbfd9a5432acf9da43")
version("5.6.1", sha256="d60b355bfd21a08e0e36270fd56f98d052c3c6edca47da887fa32bf32759c29b")
version("5.6.0", sha256="cd009c5c09f664f046c428ba9843582ab468f7b88d560747eb949d8d7f8c5567")
version("5.5.1", sha256="4ffde3fc1f91f24cdbf09263fd8e012a3995ad10854f4c1d866beab7b9f36bf4")
version("5.5.0", sha256="2b11fd8937c2b06cd4ddea2c3699fbf3d1651892c4c5957d38553b993dd9af18")
- version("5.4.3", sha256="3799abbe7177fbff3b304e2a363e2b39e8864f8650ae569b2b88b9291f9a710c")
- version("5.4.0", sha256="690a78a6e67ae2b3f518dbc4a1e267237d6a342e1063b31eef297f4a04d780f8")
- version("5.3.3", sha256="b5350de915997ed48072b37a21c2c44438028255f6cc147c25a196ad383c52e7")
- version("5.3.0", sha256="c150be3958fd46e57bfc9db187819ec34b1db8f0cf9b69f8c3f8915001800ab8")
- version("5.2.3", sha256="8d313b8fd945a8d7248c00a2de9a2ee896fe77e464430a91b63400a986ec0bf0")
- version("5.2.1", sha256="13c4a6748c4ae70f87869f10fda101d67c9dbaecf040687f7f5d9bb8b6d0506c")
- version("5.2.0", sha256="3797cb0eafbec3fd3d4a2b53f789eb8cdbab30729f13dbcca0a10bc1bafd2187")
- version("5.1.3", sha256="3c66b1aa7451571ce8bee10e601d34b93c9416b9be476610ee5685dbad81034a")
- version("5.1.0", sha256="032717e80b1aefed59f11399e575564ee86ee7c125e889f7c79c2afdfab1eb93")
- version(
- "5.0.2",
- sha256="f2a27ac18aada1dc0dba6455beb7dd7d88a4457c1917024ea372fecb03356e97",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="1d803572eac0d6186260b5671268bad7513aa9433f9c2e99f14c8bf766c02122",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="fb8e44226b9e393baf51bfcb9873f63ce7e4fcf7ee7f530979cf51857ea4d24b",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="620b39959e0ee5d709b8cf6eb3cc06c8356d72838343756230c638899b10bb9a",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="9d0727e746d4ae6e2709e3534d91046640be511a71c027f47db25e529fe3b4d4",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="1ef5fe687bc23ffda17841fe354c1fb94e9aaf276ca9e5757488852f9066f231",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="cc325d4b9a96062f2ad0515fce724a8c64ba56a7d7f1ac4a0753941b8599c52e",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="8443ed5907a7ba9ad4003a49d90ff7b8886e1b2a5e90f14e4035765a7f64d7ca",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="a6960fffc8388731ee18953faae12d1449c582e3b3594418845a544455895f42",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="a3d629247a763cc36f5d48e9122cee8498574af628e14e3c38686c05f66e3e06",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="e1bb8b010855736d8a97957222f648532d42646ec2964776a9a1455dc81104a3",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="cd5440f31f592737b5d05448704bd01f91f73cfcab8a7829922e81332575cfe8",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="b357fe7f425996c49f41748923ded1a140933de7564a70a828ed6ded6d896458",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="d9f458c16cb62c3c611328fd2f2ba3615da81e45f3b526e45ff43ab4a67ee4aa",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="3799abbe7177fbff3b304e2a363e2b39e8864f8650ae569b2b88b9291f9a710c")
+ version("5.4.0", sha256="690a78a6e67ae2b3f518dbc4a1e267237d6a342e1063b31eef297f4a04d780f8")
+ version("5.3.3", sha256="b5350de915997ed48072b37a21c2c44438028255f6cc147c25a196ad383c52e7")
+ version("5.3.0", sha256="c150be3958fd46e57bfc9db187819ec34b1db8f0cf9b69f8c3f8915001800ab8")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("shared", default=True, description="Build shared or static library")
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- depends_on("pkgconfig", type="build", when="@4.5.0:")
+ depends_on("pkgconfig", type="build")
depends_on("cmake@3:", type="build")
depends_on("numactl")
- depends_on("libdrm", when="@4.5.0:")
+ depends_on("libdrm")
for ver in ["5.3.0", "5.4.0", "5.4.3"]:
- depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver)
-
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver)
-
- # See https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/72
+ depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}")
+
+ # See https://github.com/ROCm/ROCT-Thunk-Interface/issues/72
# and https://github.com/spack/spack/issues/28398
- patch("0001-Remove-compiler-support-libraries-and-libudev-as-req.patch", when="@4.5.0:5.2")
patch("0002-Remove-compiler-support-libraries-and-libudev-as-req-5.3.patch", when="@5.3.0:5.4")
- @property
- def install_targets(self):
- if self.version == Version("3.5.0"):
- return ["install", "install-dev"]
- else:
- return ["install"]
-
def cmake_args(self):
args = []
if self.spec.satisfies("@:5.4.3"):
@@ -142,7 +86,7 @@ class HsakmtRoct(CMakePackage):
else:
args.append(self.define("BUILD_SHARED_LIBS", False))
if self.spec.satisfies("@5.4.3:"):
- args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
if self.spec.satisfies("@5.7.0:"):
args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
@@ -151,12 +95,9 @@ class HsakmtRoct(CMakePackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def check_install(self):
- if self.spec.satisfies("@:5.3.0"):
- print("Skipping: stand-alone tests")
- return
- test_dir = "tests/kfdtest"
+ """Check if package is installed correctly"""
+ test_dir = join_path("tests", "kfdtest")
with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
prefixes = ";".join(
[
self.spec["libdrm"].prefix,
@@ -174,9 +115,12 @@ class HsakmtRoct(CMakePackage):
"-DLIBHSAKMT_PATH=" + hsakmt_path,
".",
]
- self.run_test(cmake_bin, cc_options)
+ cmake = self.spec["cmake"].command
+ cmake(*cc_options)
+ make = which("make")
make()
os.environ["LD_LIBRARY_PATH"] = hsakmt_path
os.environ["BIN_DIR"] = os.getcwd()
- self.run_test("scripts/run_kfdtest.sh")
+ run_kfdtest = which(join_path("scripts", "run_kfdtest.sh"))
+ run_kfdtest()
make("clean")
diff --git a/var/spack/repos/builtin/packages/hsakmt/package.py b/var/spack/repos/builtin/packages/hsakmt/package.py
index 2a88f1fd48..d26dc9a849 100644
--- a/var/spack/repos/builtin/packages/hsakmt/package.py
+++ b/var/spack/repos/builtin/packages/hsakmt/package.py
@@ -16,3 +16,5 @@ class Hsakmt(AutotoolsPackage, XorgPackage):
license("MIT")
version("1.0.0", sha256="3d46af85c27091937618f5e92f7446cff3e9e6378888645e6e238806461e5b77")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/hssp/package.py b/var/spack/repos/builtin/packages/hssp/package.py
index 151644e4e8..f32f34a6d8 100644
--- a/var/spack/repos/builtin/packages/hssp/package.py
+++ b/var/spack/repos/builtin/packages/hssp/package.py
@@ -33,6 +33,8 @@ class Hssp(AutotoolsPackage):
version("3.0.2", sha256="76b4275c8cde120509d7920609fca983f2b04249a649d0aa802c69fd09e5f8cf")
version("3.0.1", sha256="62a703d15bdfec82fdbd2a4275e1973b6a1ac6ccd4dbec75036f16faacaa9dce")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hstr/package.py b/var/spack/repos/builtin/packages/hstr/package.py
index 8ad7f1c973..28400a7ddd 100644
--- a/var/spack/repos/builtin/packages/hstr/package.py
+++ b/var/spack/repos/builtin/packages/hstr/package.py
@@ -18,6 +18,8 @@ class Hstr(AutotoolsPackage):
version("1.22", sha256="384fee04e4c80a1964dcf443131c1da4a20dd474fb48132a51d3de0a946ba996")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hto4l/package.py b/var/spack/repos/builtin/packages/hto4l/package.py
index 921af275c6..4a8d6571d8 100644
--- a/var/spack/repos/builtin/packages/hto4l/package.py
+++ b/var/spack/repos/builtin/packages/hto4l/package.py
@@ -11,7 +11,7 @@ class Hto4l(MakefilePackage):
up to NLOPS electroweak accuracy and in presence of dimension-6 operators."""
homepage = "https://www2.pv.infn.it/~hepcomplex/hto4l.html"
- url = "http://www2.pv.infn.it/~hepcomplex/releases/hto4l/Hto4l-v2.02.tar.bz2"
+ url = "https://www2.pv.infn.it/hepcomplex/releases/hto4l/Hto4l-v2.02.tar.bz2"
maintainers("haralmha")
diff --git a/var/spack/repos/builtin/packages/htop/package.py b/var/spack/repos/builtin/packages/htop/package.py
index d3d2e9b1cd..23c8a6034e 100644
--- a/var/spack/repos/builtin/packages/htop/package.py
+++ b/var/spack/repos/builtin/packages/htop/package.py
@@ -15,6 +15,7 @@ class Htop(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("3.3.0", sha256="1e5cc328eee2bd1acff89f860e3179ea24b85df3ac483433f92a29977b14b045")
version("3.2.2", sha256="3829c742a835a0426db41bb039d1b976420c21ec65e93b35cd9bfd2d57f44ac8")
version("3.2.1", sha256="b5ffac1949a8daaabcffa659c0964360b5008782aae4dfa7702d2323cfb4f438")
version("3.2.0", sha256="1a1dd174cc828521fe5fd0e052cff8c30aa50809cf80d3ce3a481c37d476ac54")
@@ -32,6 +33,8 @@ class Htop(AutotoolsPackage):
url="https://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz",
)
+ depends_on("c", type="build") # generated
+
variant("unicode", default=True, description="Enable Unicode support dependency")
variant("hwloc", default=False, description="Enable hwloc support for CPU affinity")
variant("debug", default=False, description="Enable asserts and internal sanity checks")
diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py
index 8c7f319444..9e43771b2f 100644
--- a/var/spack/repos/builtin/packages/htslib/package.py
+++ b/var/spack/repos/builtin/packages/htslib/package.py
@@ -16,6 +16,8 @@ class Htslib(AutotoolsPackage):
license("MIT AND BSD-3-Clause-Modification")
+ version("1.20", sha256="e52d95b14da68e0cfd7d27faf56fef2f88c2eaf32a2be51c72e146e3aa928544")
+ version("1.19.1", sha256="222d74d3574fb67b158c6988c980eeaaba8a0656f5e4ffb76b5fa57f035933ec")
version("1.19", sha256="8751c40c4fa7d1f23a6864c5b20a73744f8be68239535ae7729c5f7d394d0736")
version("1.18", sha256="f1ab53a593a2320a1bfadf4ef915dae784006c5b5c922c8a8174d7530a9af18f")
version("1.17", sha256="763779288c40f07646ec7ad98b96c378c739171d162ad98398868783b721839f")
@@ -36,22 +38,30 @@ class Htslib(AutotoolsPackage):
version("1.3.1", sha256="49d53a2395b8cef7d1d11270a09de888df8ba06f70fe68282e8235ee04124ae6")
version("1.2", sha256="125c01421d5131afb4c3fd2bc9c7da6f4f1cd9ab5fc285c076080b9aca24bffc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"libcurl",
default=True,
description="Enable libcurl-based support for http/https/etc URLs,"
- " for versions >= 1.3. This also enables S3 and GCS support.",
+ " for versions >= 1.3. This also enables S3 and GCS support by default.",
)
variant(
"libdeflate",
default=True,
description="use libdeflate for faster crc and deflate algorithms",
)
+ variant("gcs", default=True, description="enable gcs url support", when="@1.5:+libcurl")
+ variant("s3", default=True, description="enable s3 url support", when="@1.5:+libcurl")
+ variant("plugins", default=False, description="enable support for separately compiled plugins")
+ variant("pic", default=True, description="Compile with PIC support")
depends_on("zlib-api")
depends_on("bzip2", when="@1.4:")
depends_on("xz", when="@1.4:")
depends_on("curl", when="@1.3:+libcurl")
+ depends_on("openssl", when="+s3")
depends_on("libdeflate", when="@1.8:+libdeflate")
depends_on("m4", when="@1.2")
@@ -59,6 +69,8 @@ class Htslib(AutotoolsPackage):
depends_on("automake", when="@1.2")
depends_on("libtool", when="@1.2")
+ conflicts("zlib-ng", when="@:1.12") # https://github.com/samtools/htslib/issues/1257
+
@property
def libs(self):
return find_libraries("libhts", root=self.prefix, recursive=True)
@@ -72,6 +84,11 @@ class Htslib(AutotoolsPackage):
url = "https://github.com/samtools/htslib/releases/download/{0}/htslib-{0}.tar.bz2"
return url.format(version.dotted)
+ def flag_handler(self, name, flags):
+ if name == "cflags" and self.spec.satisfies("+pic"):
+ flags.append(self.compiler.cc_pic_flag)
+ return (flags, None, None)
+
def configure_args(self):
spec = self.spec
args = []
@@ -79,6 +96,11 @@ class Htslib(AutotoolsPackage):
if spec.satisfies("@1.3:"):
args.extend(self.enable_or_disable("libcurl"))
+ if spec.satisfies("@1.5:"):
+ args.extend(self.enable_or_disable("s3"))
+ args.extend(self.enable_or_disable("gcs"))
+ args.extend(self.enable_or_disable("plugins"))
+
if spec.satisfies("@1.8:"):
args.extend(self.enable_or_disable("libdeflate"))
diff --git a/var/spack/repos/builtin/packages/http-get/package.py b/var/spack/repos/builtin/packages/http-get/package.py
index 380522ab4a..7300665b04 100644
--- a/var/spack/repos/builtin/packages/http-get/package.py
+++ b/var/spack/repos/builtin/packages/http-get/package.py
@@ -20,6 +20,8 @@ class HttpGet(MakefilePackage):
"2018-05-23", sha256="f04e9d911fbc0cdb7c4ebe91dae1cc951ea14b657f48309c3952dcc938bb2e0d"
)
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
ver = datetime.datetime.strptime(str(version), "%Y-%m-%d").date()
verstr = datetime.datetime.strftime(ver, "%d%b%Y")
diff --git a/var/spack/repos/builtin/packages/http-load/package.py b/var/spack/repos/builtin/packages/http-load/package.py
index 736c7988a4..2c6739a609 100644
--- a/var/spack/repos/builtin/packages/http-load/package.py
+++ b/var/spack/repos/builtin/packages/http-load/package.py
@@ -18,6 +18,8 @@ class HttpLoad(MakefilePackage):
"2016-03-09", sha256="5a7b00688680e3fca8726dc836fd3f94f403fde831c71d73d9a1537f215b4587"
)
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
ver = datetime.datetime.strptime(str(version), "%Y-%m-%d").date()
verstr = datetime.datetime.strftime(ver, "%d%b%Y")
diff --git a/var/spack/repos/builtin/packages/http-parser/package.py b/var/spack/repos/builtin/packages/http-parser/package.py
index 61af488281..03bb080b6f 100644
--- a/var/spack/repos/builtin/packages/http-parser/package.py
+++ b/var/spack/repos/builtin/packages/http-parser/package.py
@@ -19,5 +19,7 @@ class HttpParser(MakefilePackage):
version("2.9.2", sha256="5199500e352584852c95c13423edc5f0cb329297c81dd69c3c8f52a75496da08")
version("2.9.1", sha256="33220771208bcacecd970b6de03bebe239374a8e9cf3baeda79b4f3920bede21")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("install", "DESTDIR=%s" % prefix, "PREFIX=")
diff --git a/var/spack/repos/builtin/packages/http-ping/package.py b/var/spack/repos/builtin/packages/http-ping/package.py
index 5e403a91b2..765dea676d 100644
--- a/var/spack/repos/builtin/packages/http-ping/package.py
+++ b/var/spack/repos/builtin/packages/http-ping/package.py
@@ -19,6 +19,8 @@ class HttpPing(MakefilePackage):
"2016-03-09", sha256="f8b95773aaed09839a44a1927f979a62752d57aace79da3846bfb73e6c9805e9"
)
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
ver = datetime.datetime.strptime(str(version), "%Y-%m-%d").date()
verstr = datetime.datetime.strftime(ver, "%d%b%Y")
diff --git a/var/spack/repos/builtin/packages/http-post/package.py b/var/spack/repos/builtin/packages/http-post/package.py
index 6429398c6a..a244a44277 100644
--- a/var/spack/repos/builtin/packages/http-post/package.py
+++ b/var/spack/repos/builtin/packages/http-post/package.py
@@ -20,6 +20,8 @@ class HttpPost(MakefilePackage):
"2018-05-18", sha256="6607faa91aea410efb9b86ae0b1b64541b55318831cf6bb3fdee5d68f8adab31"
)
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
ver = datetime.datetime.strptime(str(version), "%Y-%m-%d").date()
verstr = datetime.datetime.strftime(ver, "%d%b%Y")
diff --git a/var/spack/repos/builtin/packages/httpd/package.py b/var/spack/repos/builtin/packages/httpd/package.py
index 435c504b1a..9995478254 100644
--- a/var/spack/repos/builtin/packages/httpd/package.py
+++ b/var/spack/repos/builtin/packages/httpd/package.py
@@ -13,32 +13,23 @@ class Httpd(AutotoolsPackage):
homepage = "https://httpd.apache.org/"
url = "https://archive.apache.org/dist/httpd/httpd-2.4.43.tar.bz2"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
- version("2.4.55", sha256="11d6ba19e36c0b93ca62e47e6ffc2d2f2884942694bce0f23f39c71bdc5f69ac")
+ version("2.4.62", sha256="674188e7bf44ced82da8db522da946849e22080d73d16c93f7f4df89e25729ec")
- # https://nvd.nist.gov/vuln/detail/CVE-2022-31813
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-38477
version(
- "2.4.43",
- sha256="a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43",
+ "2.4.59",
+ sha256="ec51501ec480284ff52f637258135d333230a7d229c3afa6f6c2f9040e321323",
deprecated=True,
)
version(
- "2.4.41",
- sha256="133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40",
- deprecated=True,
- )
- version(
- "2.4.39",
- sha256="b4ca9d05773aa59b54d66cd8f4744b945289f084d3be17d7981d1783a5decfa2",
- deprecated=True,
- )
- version(
- "2.4.38",
- sha256="7dc65857a994c98370dc4334b260101a7a04be60e6e74a5c57a6dee1bc8f394a",
+ "2.4.55",
+ sha256="11d6ba19e36c0b93ca62e47e6ffc2d2f2884942694bce0f23f39c71bdc5f69ac",
deprecated=True,
)
+ depends_on("c", type="build")
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -50,7 +41,7 @@ class Httpd(AutotoolsPackage):
def configure_args(self):
spec = self.spec
config_args = [
- "--with-apr={0}".format(spec["apr"].prefix),
- "--with-apr-util={0}".format(spec["apr-util"].prefix),
+ f"--with-apr={spec['apr'].prefix}",
+ f"--with-apr-util={spec['apr-util'].prefix}",
]
return config_args
diff --git a/var/spack/repos/builtin/packages/httperf/package.py b/var/spack/repos/builtin/packages/httperf/package.py
index e6a9fc2aa6..8f4e0b5102 100644
--- a/var/spack/repos/builtin/packages/httperf/package.py
+++ b/var/spack/repos/builtin/packages/httperf/package.py
@@ -16,6 +16,8 @@ class Httperf(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hub/package.py b/var/spack/repos/builtin/packages/hub/package.py
index 0e636a072e..646b1a13c1 100644
--- a/var/spack/repos/builtin/packages/hub/package.py
+++ b/var/spack/repos/builtin/packages/hub/package.py
@@ -40,6 +40,8 @@ class Hub(Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
extends("go")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/hudi/package.py b/var/spack/repos/builtin/packages/hudi/package.py
index 5bac21e23a..887146409a 100644
--- a/var/spack/repos/builtin/packages/hudi/package.py
+++ b/var/spack/repos/builtin/packages/hudi/package.py
@@ -12,7 +12,7 @@ class Hudi(MavenPackage):
Hudi manages the storage of large analytical datasets on DFS."""
homepage = "https://hudi.apache.org/"
- url = "https://github.com/apache/hudi/archive/release-0.5.3.tar.gz"
+ url = "https://github.com/apache/hudi/archive/refs/tags/release-0.5.3.tar.gz"
license("Apache-2.0")
diff --git a/var/spack/repos/builtin/packages/hugo/package.py b/var/spack/repos/builtin/packages/hugo/package.py
index 2bb87852b1..ef9c4f3838 100644
--- a/var/spack/repos/builtin/packages/hugo/package.py
+++ b/var/spack/repos/builtin/packages/hugo/package.py
@@ -8,7 +8,7 @@ import re
from spack.package import *
-class Hugo(Package):
+class Hugo(GoPackage):
"""The world's fastest framework for building websites."""
homepage = "https://gohugo.io"
@@ -20,6 +20,9 @@ class Hugo(Package):
license("Apache-2.0")
+ version("0.135.0", sha256="a75c4c684d2125255f214d11b9834a5ec6eb64353f4de2c06952d2b3b7430f0e")
+ version("0.127.0", sha256="549c7ebdf2ee6b3107ea10a9fbd9932a91bb3f30f7e8839245f6d8e318aca88c")
+ version("0.126.3", sha256="2a1d65b09884e3c57a8705db99487404856c947dd847cf7bb845e0e1825b33ec")
version("0.118.2", sha256="915d7dcb44fba949c80858f9c2a55a11256162ba28a9067752f808cfe8faedaa")
version("0.112.7", sha256="d706e52c74f0fb00000caf4e95b98e9d62c3536a134d5e26b433b1fa1e2a74aa")
version("0.111.3", sha256="b6eeb13d9ed2e5d5c6895bae56480bf0fec24a564ad9d17c90ede14a7b240999")
@@ -31,27 +34,11 @@ class Hugo(Package):
version("0.107.0", sha256="31d959a3c1633087d338147782d03bdef65323b67ff3efcec7b40241413e270a")
version("0.106.0", sha256="9219434beb51466487b9f8518edcbc671027c1998e5a5820d76d517e1dfbd96a")
- # https://nvd.nist.gov/vuln/detail/CVE-2020-26284
- version(
- "0.74.3",
- sha256="9b296fa0396c20956fa6a1f7afadaa78739af62c277b6c0cfae79a91b0fe823f",
- deprecated=True,
- )
- version(
- "0.68.3",
- sha256="38e743605e45e3aafd9563feb9e78477e72d79535ce83b56b243ff991d3a2b6e",
- deprecated=True,
- )
- version(
- "0.53",
- sha256="48e65a33d3b10527101d13c354538379d9df698e5c38f60f4660386f4232e65c",
- deprecated=True,
- )
-
- # Uses go modules.
- # See https://gohugo.io/getting-started/installing/#fetch-from-github
- depends_on("go@1.11:", when="@0.48:", type="build")
- depends_on("go@1.18:", when="@0.106:", type="build")
+ depends_on("go@1.11:", type="build", when="@0.48:")
+ depends_on("go@1.18:", type="build", when="@0.106:")
+ depends_on("go@1.20:", type="build", when="@0.123:")
+ depends_on("go@1.21.8:", type="build", when="@0.131:")
+ depends_on("go@1.22.6:", type="build", when="@0.133:")
variant("extended", default=False, description="Enable extended features")
@@ -63,17 +50,26 @@ class Hugo(Package):
match = re.search(r"Hugo Static Site Generator v(\S+)", output)
return match.group(1) if match else None
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
-
- def build(self, spec, prefix):
- go_args = ["build"]
+ @property
+ def build_args(self):
+ args = super().build_args
if self.spec.satisfies("+extended"):
- go_args.extend(["--tags", "extended"])
+ args.extend(["--tags", "extended"])
+
+ return args
+
+ @run_after("install")
+ def install_completions(self):
+ hugo = Executable(self.prefix.bin.hugo)
+
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "hugo", "w") as file:
+ hugo("completion", "bash", output=file)
- go(*go_args)
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "hugo.fish", "w") as file:
+ hugo("completion", "fish", output=file)
- def install(self, spec, prefix):
- mkdirp(prefix.bin)
- install("hugo", prefix.bin)
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_hugo", "w") as file:
+ hugo("completion", "zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/hunspell/package.py b/var/spack/repos/builtin/packages/hunspell/package.py
index 5b471af7a3..5916ea1dc1 100644
--- a/var/spack/repos/builtin/packages/hunspell/package.py
+++ b/var/spack/repos/builtin/packages/hunspell/package.py
@@ -18,6 +18,8 @@ class Hunspell(AutotoolsPackage):
version("1.7.0", sha256="bb27b86eb910a8285407cf3ca33b62643a02798cf2eef468c0a74f6c3ee6bc8a")
version("1.6.0", sha256="512e7d2ee69dad0b35ca011076405e56e0f10963a02d4859dbcc4faf53ca68e2")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hw-probe/package.py b/var/spack/repos/builtin/packages/hw-probe/package.py
index bbbff9af15..5a740bedc9 100644
--- a/var/spack/repos/builtin/packages/hw-probe/package.py
+++ b/var/spack/repos/builtin/packages/hw-probe/package.py
@@ -14,9 +14,10 @@ class HwProbe(MakefilePackage):
license("LGPL-2.1-or-later OR BSD-4-Clause")
+ version("1.6", sha256="de048be6aef357d3142c9e2327d6f79d205a42aa3396ad381ed319115d1c9a22")
version("1.5", sha256="8bb7d6ff272c1412e26fcfd86e9df5c3e34e1584552404b930c281b8498b25ea")
version("1.4", sha256="90f3ea83bf641348b209e4a2a910f65d836ae7828c0be0f660236ea413bc46bb")
version("1.3", sha256="820ada4f16cb827e0990eb918e75423845fef54a863fdd88aa5bd23127354229")
def install(self, spec, prefix):
- make("install", "prefix={0}".format(prefix))
+ make("install", f"prefix={prefix}")
diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
index be41c6655f..4ef81adee3 100644
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -2,6 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
import re
import sys
@@ -25,15 +26,20 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
"""
homepage = "https://www.open-mpi.org/projects/hwloc/"
- url = "https://download.open-mpi.org/release/hwloc/v2.0/hwloc-2.0.2.tar.gz"
+ url = "https://download.open-mpi.org/release/hwloc/v2.11/hwloc-2.11.1.tar.bz2"
git = "https://github.com/open-mpi/hwloc.git"
maintainers("bgoglin")
- executables = ["^hwloc-bind$"]
license("BSD-3-Clause")
+ executables = ["^hwloc-bind$"]
+
version("master", branch="master")
+ version("2.11.1", sha256="9f320925cfd0daeaf3a3d724c93e127ecac63750c623654dca0298504aac4c2c")
+ version("2.10.0", sha256="c7fd8a1404a9719c76aadc642864b9f77aed1dc1fc8882d6af861a9260ba240d")
+ version("2.9.3", sha256="5985db3a30bbe51234c2cd26ebe4ae9b4c3352ab788b1a464c40c0483bf4de59")
+ version("2.9.2", sha256="ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3")
version("2.9.1", sha256="a440e2299f7451dc10a57ddbfa3f116c2a6c4be1bb97c663edd3b9c7b3b3b4cf")
version("2.9.0", sha256="9d7d3450e0a5fea4cb80ca07dc8db939abb7ab62e2a7bb27f9376447658738ec")
version("2.8.0", sha256="20b2bd4df436827d8e50f7afeafb6f967259f2fb374ce7330244f8d0ed2dde6f")
@@ -69,7 +75,7 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
variant("nvml", default=False, description="Support NVML device discovery")
variant("gl", default=False, description="Support GL device discovery")
variant("libxml2", default=True, description="Build with libxml2")
- variant("libudev", default=False, description="Build with libudev")
+ variant("libudev", default=False, when="@1.11.0:", description="Build with libudev")
variant(
"pci",
default=(sys.platform != "darwin"),
@@ -85,19 +91,17 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
variant(
"cairo", default=False, description="Enable the Cairo back-end of hwloc's lstopo command"
)
- variant("netloc", default=False, description="Enable netloc [requires MPI]")
+ variant(
+ "netloc", default=False, when="@2.0.0:2.9.3", description="Enable netloc [requires MPI]"
+ )
variant("opencl", default=False, description="Support an OpenCL library at run time")
variant("rocm", default=False, description="Support ROCm devices")
variant(
"oneapi-level-zero", default=False, description="Support Intel OneAPI Level Zero devices"
)
- # netloc isn't available until version 2.0.0
- conflicts("+netloc", when="@:1")
-
- # libudev isn't available until version 1.11.0
- conflicts("+libudev", when="@:1.10")
-
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("pkgconfig", type="build")
depends_on("m4", type="build", when="@master")
depends_on("autoconf", type="build", when="@master")
@@ -133,7 +137,7 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("rocm-opencl", when="+opencl")
# Avoid a circular dependency since the openmp
# variant of llvm-amdgpu depends on hwloc.
- depends_on("llvm-amdgpu~openmp", when="+opencl")
+ depends_on("llvm-amdgpu", when="+opencl")
with when("+oneapi-level-zero"):
depends_on("oneapi-level-zero")
@@ -174,7 +178,7 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
if "+rocm" not in self.spec:
args.append("--disable-rsmi")
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
args.append("--with-rocm={0}".format(self.spec["hip"].prefix))
args.append("--with-rocm-version={0}".format(self.spec["hip"].version))
@@ -188,11 +192,13 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
args.extend(self.enable_or_disable("pci"))
args.extend(self.enable_or_disable("libs"))
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("--with-cuda={0}".format(self.spec["cuda"].prefix))
args.append("--with-cuda-version={0}".format(self.spec["cuda"].version))
- if "+oneapi-level-zero" in self.spec:
+ if self.spec.satisfies("+oneapi-level-zero"):
args.append("--enable-levelzero")
+ else:
+ args.append("--disable-levelzero")
return args
diff --git a/var/spack/repos/builtin/packages/hybpiper/package.py b/var/spack/repos/builtin/packages/hybpiper/package.py
index db890c6f73..d1b6e1a96b 100644
--- a/var/spack/repos/builtin/packages/hybpiper/package.py
+++ b/var/spack/repos/builtin/packages/hybpiper/package.py
@@ -7,7 +7,7 @@
from spack.package import *
-class Hybpiper(Package):
+class Hybpiper(PythonPackage, Package):
"""HybPiper was designed for targeted sequence capture, in which DNA
sequencing libraries are enriched for gene regions of interest,
especially for phylogenetics. HybPiper is a suite of Python scripts
@@ -17,24 +17,51 @@ class Hybpiper(Package):
homepage = "https://github.com/mossmatters/HybPiper"
url = "https://github.com/mossmatters/HybPiper/archive/v1.2.0.tar.gz"
git = "https://github.com/mossmatters/HybPiper/HybPiper.git"
+ maintainers("snehring")
license("GPL-3.0-or-later")
+ version("2.1.8", sha256="ff358a560d6dbbec4fdac67457451cb4e6ca21b8661044c43902aa013d805e47")
version("1.3.1", sha256="7ca07a9390d1ca52c72721774fa220546f18d3fa3b58500f68f3b2d89dbc0ecf")
version("1.2.0", sha256="34c7b324e9bcacb6ccfe87dc50615d6f93866433b61a59291707efa858b6df57")
+ build_system(
+ conditional("python_pip", when="@2.1:"),
+ conditional("generic", when="@:1.3.1"),
+ default="python_pip",
+ )
+
depends_on("python@2.7:", type=("build", "run"))
+ depends_on("python@3.9:", type=("build", "run"), when="@2.1:")
+
depends_on("py-biopython", type=("build", "run"))
+ depends_on("py-biopython@1.80:", type=("build", "run"), when="@2.1:")
+ depends_on("py-matplotlib", type=("build", "run"), when="@2.1:")
+ depends_on("py-pandas", type=("build", "run"), when="@2.1:")
+ depends_on("py-pebble", type=("build", "run"), when="@2.1:")
+ depends_on("py-progressbar2", type=("build", "run"), when="@2.1:")
+ depends_on("py-psutil", type=("build", "run"), when="@2.1:")
+ depends_on("py-scipy", type=("build", "run"), when="@2.1:")
+ depends_on("py-seaborn", type=("build", "run"), when="@2.1:")
+
depends_on("exonerate")
+ depends_on("exonerate@2.4:", when="@2.1:")
+ depends_on("bbmap", when="@2.1:")
depends_on("blast-plus")
- depends_on("spades")
- depends_on("parallel")
+ depends_on("blast-plus@2.9.0:", when="@2.1:")
depends_on("bwa")
+ depends_on("diamond", when="@2.1:")
+ depends_on("mafft", when="@2.1:")
+ depends_on("parallel")
depends_on("samtools")
+ depends_on("samtools@1.14", when="@2.1:")
+ depends_on("spades")
+ depends_on("spades@3.15.4:", when="@2.1:")
def setup_run_environment(self, env):
env.set("HYBPIPER_HOME", self.prefix)
+ @when("@:1.3.1")
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("*.py", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/hybrid-lambda/package.py b/var/spack/repos/builtin/packages/hybrid-lambda/package.py
index dcd5b6893b..4b31318b1f 100644
--- a/var/spack/repos/builtin/packages/hybrid-lambda/package.py
+++ b/var/spack/repos/builtin/packages/hybrid-lambda/package.py
@@ -26,6 +26,8 @@ class HybridLambda(AutotoolsPackage):
version("develop", submodules=True)
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/hybridsim/package.py b/var/spack/repos/builtin/packages/hybridsim/package.py
index 3d1d0a8e02..c1ed72491b 100644
--- a/var/spack/repos/builtin/packages/hybridsim/package.py
+++ b/var/spack/repos/builtin/packages/hybridsim/package.py
@@ -21,6 +21,9 @@ class Hybridsim(MakefilePackage):
version("2.0.1", sha256="57b82ac929acd36de84525e4d61358f1ab6532f5b635ca3f560e563479921937")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("dramsim2")
depends_on("nvdimmsim")
patch("makefile.patch", when="@2.0.1")
diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py
index 5d4e695e64..6df93d1f7e 100644
--- a/var/spack/repos/builtin/packages/hydra/package.py
+++ b/var/spack/repos/builtin/packages/hydra/package.py
@@ -19,5 +19,9 @@ class Hydra(AutotoolsPackage):
license("AGPL-3.0-or-later")
+ version("4.2.1", sha256="eb0f33f702aaf1ba54a4892a67b344cd815e0c51d1767327a675824490ab4b51")
+ version("4.2.0", sha256="d7159353d9d0576effba632668a3e6defde2067530ac5db4bae0a85a23dfda5a")
version("4.1.1", sha256="d4b915ccab426cd8368bbb2ee9d933fe07bea01493901fb56880b338a7f0b97e")
version("3.2", sha256="f7a67ec91a773d95cbbd479a80e926d44bee1ff9fc70a8d1df075ea53ea33889")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/hydrogen/cmake-intel-mpi-escape-quotes-pr177.patch b/var/spack/repos/builtin/packages/hydrogen/cmake-intel-mpi-escape-quotes-pr177.patch
new file mode 100644
index 0000000000..3d2c059cde
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hydrogen/cmake-intel-mpi-escape-quotes-pr177.patch
@@ -0,0 +1,12 @@
+diff -ruN spack-src/CMakeLists.txt spack-src-patched/CMakeLists.txt
+--- spack-src/CMakeLists.txt 2023-11-07 21:54:14.000000000 +0000
++++ spack-src-patched/CMakeLists.txt 2024-01-26 19:32:52.140539356 +0000
+@@ -515,7 +515,7 @@
+ # docs (which has the advantage that preprocessing will take
+ # "{,hydrogen_}config.h" into consideration).
+ configure_file("${PROJECT_SOURCE_DIR}/cmake/configure_files/config.h.in"
+- "${PROJECT_BINARY_DIR}/include/El/config.h")
++ "${PROJECT_BINARY_DIR}/include/El/config.h" ESCAPE_QUOTES)
+ configure_file("${PROJECT_SOURCE_DIR}/cmake/configure_files/hydrogen_config.h.in"
+ "${PROJECT_BINARY_DIR}/include/El/hydrogen_config.h")
+ configure_file("${PROJECT_SOURCE_DIR}/doxy/Doxyfile.in"
diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py
index fc30587fb3..b4116df1c4 100644
--- a/var/spack/repos/builtin/packages/hydrogen/package.py
+++ b/var/spack/repos/builtin/packages/hydrogen/package.py
@@ -31,6 +31,9 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
version("1.5.3", sha256="faefbe738bd364d0e26ce9ad079a11c93a18c6f075719a365fd4fa5f1f7a989a")
version("1.5.2", sha256="a902cad3962471216cfa278ba0561c18751d415cd4d6b2417c02a43b0ab2ea33")
version("1.5.1", sha256="447da564278f98366906d561d9c8bc4d31678c56d761679c2ff3e59ee7a2895c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Older versions are no longer supported.
variant("shared", default=True, description="Enables the build of shared libraries.")
@@ -130,9 +133,13 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("llvm-openmp", when="%apple-clang +openmp")
+ # Fixes https://github.com/spack/spack/issues/42286
+ # https://github.com/LLNL/Elemental/pull/177
+ patch("cmake-intel-mpi-escape-quotes-pr177.patch", when="@1.5.3")
+
@property
def libs(self):
- shared = True if "+shared" in self.spec else False
+ shared = True if self.spec.satisfies("+shared") else False
return find_libraries("libHydrogen", root=self.prefix, shared=shared, recursive=True)
def cmake_args(self):
@@ -168,7 +175,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
# FIXME: Enforce this better in the actual CMake.
entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17"))
- entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
entries.append(cmake_cache_option("CMAKE_EXPORT_COMPILE_COMMANDS", True))
entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True))
@@ -193,7 +200,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super(Hydrogen, self).initconfig_hardware_entries()
- entries.append(cmake_cache_option("Hydrogen_ENABLE_CUDA", "+cuda" in spec))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_CUDA", spec.satisfies("+cuda")))
if spec.satisfies("+cuda"):
entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "17"))
if not spec.satisfies("cuda_arch=none"):
@@ -208,7 +215,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
if len(cuda_flags) > 0:
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags)))
- entries.append(cmake_cache_option("Hydrogen_ENABLE_ROCM", "+rocm" in spec))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_ROCM", spec.satisfies("+rocm")))
if spec.satisfies("+rocm"):
entries.append(cmake_cache_string("CMAKE_HIP_STANDARD", "17"))
if not spec.satisfies("amdgpu_target=none"):
@@ -226,30 +233,36 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
entries = super(Hydrogen, self).initconfig_package_entries()
# Basic Hydrogen options
- entries.append(cmake_cache_option("Hydrogen_ENABLE_TESTING", "+test" in spec))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_TESTING", spec.satisfies("+test")))
entries.append(cmake_cache_option("Hydrogen_GENERAL_LAPACK_FALLBACK", True))
- entries.append(cmake_cache_option("Hydrogen_USE_64BIT_INTS", "+int64" in spec))
- entries.append(cmake_cache_option("Hydrogen_USE_64BIT_BLAS_INTS", "+int64_blas" in spec))
+ entries.append(cmake_cache_option("Hydrogen_USE_64BIT_INTS", spec.satisfies("+int64")))
+ entries.append(
+ cmake_cache_option("Hydrogen_USE_64BIT_BLAS_INTS", spec.satisfies("+int64_blas"))
+ )
# Advanced dependency options
- entries.append(cmake_cache_option("Hydrogen_ENABLE_ALUMINUM", "+al" in spec))
- entries.append(cmake_cache_option("Hydrogen_ENABLE_CUB", "+cub" in spec))
- entries.append(cmake_cache_option("Hydrogen_ENABLE_GPU_FP16", "+cuda +half" in spec))
- entries.append(cmake_cache_option("Hydrogen_ENABLE_HALF", "+half" in spec))
- entries.append(cmake_cache_option("Hydrogen_ENABLE_OPENMP", "+openmp" in spec))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_ALUMINUM", spec.satisfies("+al")))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_CUB", spec.satisfies("+cub")))
entries.append(
- cmake_cache_option("Hydrogen_ENABLE_OMP_TASKLOOP", "+omp_taskloops" in spec)
+ cmake_cache_option("Hydrogen_ENABLE_GPU_FP16", spec.satisfies("+cuda +half"))
+ )
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_HALF", spec.satisfies("+half")))
+ entries.append(cmake_cache_option("Hydrogen_ENABLE_OPENMP", spec.satisfies("+openmp")))
+ entries.append(
+ cmake_cache_option("Hydrogen_ENABLE_OMP_TASKLOOP", spec.satisfies("+omp_taskloops"))
)
# Note that CUDA/ROCm are handled above.
- if "blas=openblas" in spec:
- entries.append(cmake_cache_option("Hydrogen_USE_OpenBLAS", "blas=openblas" in spec))
+ if spec.satisfies("blas=openblas"):
+ entries.append(
+ cmake_cache_option("Hydrogen_USE_OpenBLAS", spec.satisfies("blas=openblas"))
+ )
# CMAKE_PREFIX_PATH should handle this
entries.append(cmake_cache_string("OpenBLAS_DIR", spec["openblas"].prefix))
- elif "blas=mkl" in spec or spec.satisfies("^intel-mkl"):
+ elif spec.satisfies("blas=mkl") or spec.satisfies("^intel-mkl"):
entries.append(cmake_cache_option("Hydrogen_USE_MKL", True))
- elif "blas=essl" in spec or spec.satisfies("^essl"):
+ elif spec.satisfies("blas=essl") or spec.satisfies("^essl"):
entries.append(cmake_cache_string("BLA_VENDOR", "IBMESSL"))
# IF IBM ESSL is used it needs help finding the proper LAPACK libraries
entries.append(
@@ -266,7 +279,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
% ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names),
)
)
- elif "blas=accelerate" in spec:
+ elif spec.satisfies("blas=accelerate"):
entries.append(cmake_cache_option("Hydrogen_USE_ACCELERATE", True))
elif spec.satisfies("^netlib-lapack"):
entries.append(cmake_cache_string("BLA_VENDOR", "Generic"))
diff --git a/var/spack/repos/builtin/packages/hypar/package.py b/var/spack/repos/builtin/packages/hypar/package.py
index f8c69c30d6..6236b1b1ba 100644
--- a/var/spack/repos/builtin/packages/hypar/package.py
+++ b/var/spack/repos/builtin/packages/hypar/package.py
@@ -18,14 +18,14 @@ class Hypar(AutotoolsPackage):
"""
homepage = "http://hypar.github.io/"
- url = "https://bitbucket.org/deboghosh/hypar/get/v4.1.tar.gz"
- git = "https://bitbucket.org/deboghosh/hypar.git"
+ url = "https://github.com/debog/hypar/archive/refs/tags/v4.1.tar.gz"
+ git = "https://github.com/debog/hypar.git"
maintainers("debog")
tags = ["proxy-app", "ecp-proxy-app"]
- version("4.1", sha256="36c11dcfda006115f4656ff73790992e5caea99dbc64776c9db4e0a29b4c60da")
+ version("4.1", sha256="b3bfc6da28d78e2cc89868a35990617e4f77521b68911772887c2f8d0b1fec21")
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=False, description="Build with OpenMP support")
@@ -47,17 +47,18 @@ class Hypar(AutotoolsPackage):
def configure_args(self):
args = []
spec = self.spec
- if "+mpi" in spec:
- args.append("--enable-mpi")
+ if spec.satisfies("+mpi"):
args.append("--with-mpi-dir={0}".format(spec["mpi"].prefix))
- if "+openmp" in spec:
+ else:
+ args.append("--enable-serial")
+ if spec.satisfies("+openmp"):
args.append("--enable-omp")
- if "+scalapack" in spec:
+ if spec.satisfies("+scalapack"):
args.append("--enable-scalapack")
args.append("--with-blas-dir={0}".format(spec["blas"].prefix))
args.append("--with-lapack-dir={0}".format(spec["lapack"].prefix))
args.append("--with-scalapack-dir={0}".format(spec["scalapack"].prefix))
- if "+fftw" in spec:
+ if spec.satisfies("+fftw"):
args.append("--enable-fftw")
args.append("--with-fftw-dir={0}".format(spec["fftw"].prefix))
return args
diff --git a/var/spack/repos/builtin/packages/hyperfine/package.py b/var/spack/repos/builtin/packages/hyperfine/package.py
index e862d07392..ce79559231 100644
--- a/var/spack/repos/builtin/packages/hyperfine/package.py
+++ b/var/spack/repos/builtin/packages/hyperfine/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Hyperfine(Package):
+class Hyperfine(CargoPackage):
"""A command-line benchmarking tool."""
homepage = "https://github.com/sharkdp/hyperfine"
@@ -16,14 +16,15 @@ class Hyperfine(Package):
license("Apache-2.0 AND MIT")
+ version("1.18.0", sha256="fea7b92922117ed04b9c84bb9998026264346768804f66baa40743c5528bed6b")
version("1.17.0", sha256="3dcd86c12e96ab5808d5c9f3cec0fcc04192a87833ff009063c4a491d5487b58")
version("1.16.1", sha256="ffb3298945cbe2c068ca1a074946d55b9add83c9df720eda2ed7f3d94d7e65d2")
version("1.14.0", sha256="59018c22242dd2ad2bd5fb4a34c0524948b7921d02aa79419ccec4c1ffd3da14")
version("1.13.0", sha256="6e57c8e51962dd24a283ab46dde6fe306da772f4ef9bad86f8c89ac3a499c87e")
version("1.12.0", sha256="2120870a97e68fa3426eac5646a071c9646e96d2309220e3c258bf588e496454")
- depends_on("rust@1.46:")
-
- def install(self, spec, prefix):
- cargo = which("cargo")
- cargo("install", "--root", prefix, "--path", ".")
+ depends_on("rust@1.70:", when="@1.18.0:")
+ depends_on("rust@1.65:", when="@1.17.0:")
+ depends_on("rust@1.64:", when="@1.16.0:")
+ depends_on("rust@1.54:", when="@1.13.0:")
+ depends_on("rust@1.46:", when="@1.12.0:")
diff --git a/var/spack/repos/builtin/packages/hyperscan/package.py b/var/spack/repos/builtin/packages/hyperscan/package.py
index 622601384f..6c7ae93069 100644
--- a/var/spack/repos/builtin/packages/hyperscan/package.py
+++ b/var/spack/repos/builtin/packages/hyperscan/package.py
@@ -35,6 +35,9 @@ class Hyperscan(CMakePackage):
if pkg:
version(ver, sha256=pkg[0], url=pkg[1])
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost+exception+serialization+random+graph+container")
depends_on("pcre")
depends_on("ragel", type="build")
diff --git a/var/spack/repos/builtin/packages/hyphen/package.py b/var/spack/repos/builtin/packages/hyphen/package.py
index 607f4e5bea..d1f5b97a86 100644
--- a/var/spack/repos/builtin/packages/hyphen/package.py
+++ b/var/spack/repos/builtin/packages/hyphen/package.py
@@ -16,6 +16,8 @@ class Hyphen(AutotoolsPackage):
version("master", branch="master")
version("2.8.8", sha256="304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/hyphy/package.py b/var/spack/repos/builtin/packages/hyphy/package.py
index c63e67b50f..a6e2f74ac3 100644
--- a/var/spack/repos/builtin/packages/hyphy/package.py
+++ b/var/spack/repos/builtin/packages/hyphy/package.py
@@ -15,6 +15,9 @@ class Hyphy(CMakePackage):
version("2.5.51hf", sha256="403a5d07a4e7e67d3d8136fa83649713ad28223a2519e5fba3aa82697a03375f")
version("2.3.14", sha256="9e6c817cb649986e3fe944bcaf88be3533e7e62968b9a486c719e951e5ed1cf6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openmpi", type="build", when="@2.4:")
depends_on("cmake@3.12:", type="build", when="@2.4:")
depends_on("cmake@3.0:", type="build", when="@:2.3")
diff --git a/var/spack/repos/builtin/packages/hypre-cmake/package.py b/var/spack/repos/builtin/packages/hypre-cmake/package.py
index 8d6ad9bed8..df5be36f64 100644
--- a/var/spack/repos/builtin/packages/hypre-cmake/package.py
+++ b/var/spack/repos/builtin/packages/hypre-cmake/package.py
@@ -13,7 +13,7 @@ class HypreCmake(CMakePackage, CudaPackage):
features parallel multigrid methods for both structured and
unstructured grid problems."""
- homepage = "http://computing.llnl.gov/project/linear_solvers/software.php"
+ homepage = "https://computing.llnl.gov/project/linear_solvers/software.php"
url = "https://github.com/hypre-space/hypre/archive/v2.14.0.tar.gz"
git = "https://github.com/hypre-space/hypre.git"
@@ -26,6 +26,10 @@ class HypreCmake(CMakePackage, CudaPackage):
version("develop", branch="master")
version("2.22.0", sha256="2c786eb5d3e722d8d7b40254f138bef4565b2d4724041e56a8fa073bda5cfbb5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"shared",
default=(sys.platform != "darwin"),
@@ -52,11 +56,11 @@ class HypreCmake(CMakePackage, CudaPackage):
def url_for_version(self, version):
if version >= Version("2.12.0"):
- url = "https://github.com/hypre-space/hypre/archive/v{0}.tar.gz"
+ url = f"https://github.com/hypre-space/hypre/archive/v{version}.tar.gz"
else:
- url = "http://computing.llnl.gov/project/linear_solvers/download/hypre-{0}.tar.gz"
+ url = f"https://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz"
- return url.format(version)
+ return url
root_cmakelists_dir = "src"
@@ -78,7 +82,7 @@ class HypreCmake(CMakePackage, CudaPackage):
return args
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
env.set("CUDA_HOME", self.spec["cuda"].prefix)
env.set("CUDA_PATH", self.spec["cuda"].prefix)
cuda_arch = self.spec.variants["cuda_arch"].value
@@ -86,44 +90,53 @@ class HypreCmake(CMakePackage, CudaPackage):
arch_sorted = list(sorted(cuda_arch, reverse=True))
env.set("HYPRE_CUDA_SM", arch_sorted[0])
# In CUDA builds hypre currently doesn't handle flags correctly
- env.append_flags("CXXFLAGS", "-O2" if "~debug" in self.spec else "-g")
+ env.append_flags("CXXFLAGS", "-O2" if self.spec.satisfies("~debug") else "-g")
extra_install_tests = join_path("src", "examples")
@run_after("install")
def cache_test_sources(self):
- self.cache_extra_test_sources(self.extra_install_tests)
+ if "+mpi" not in self.spec:
+ print("Package must be installed with +mpi to cache test sources")
+ return
+
+ cache_extra_test_sources(self, self.extra_install_tests)
+
+ # Customize the examples makefile before caching it
+ makefile = join_path(install_test_root(self), self.extra_install_tests, "Makefile")
+ filter_file(r"^HYPRE_DIR\s* =.*", f"HYPRE_DIR = {self.prefix}", makefile)
+ filter_file(r"^CC\s*=.*", "CC = " + self.spec["mpi"].mpicc, makefile)
+ filter_file(r"^F77\s*=.*", "F77 = " + self.spec["mpi"].mpif77, makefile)
+ filter_file(r"^CXX\s*=.*", "CXX = " + self.spec["mpi"].mpicxx, makefile)
+ filter_file(
+ r"^LIBS\s*=.*",
+ r"LIBS = -L$(HYPRE_DIR)/lib64 -lHYPRE -lm $(CUDA_LIBS) $(DOMP_LIBS)",
+ makefile,
+ )
@property
def _cached_tests_work_dir(self):
"""The working directory for cached test sources."""
return join_path(self.test_suite.current_test_cache_dir, self.extra_install_tests)
- def test(self):
- """Perform smoke test on installed HYPRE package."""
+ def test_bigint(self):
+ """Perform smoke tests on installed HYPRE package."""
if "+mpi" not in self.spec:
- print("Skipping: HYPRE must be installed with +mpi to run tests")
- return
+ raise SkipTest("Package must be installed with +mpi to run tests")
- # Build copied and cached test examples
- self.run_test(
- "make",
- ["HYPRE_DIR={0}".format(self.prefix), "bigint"],
- purpose="test: building selected examples",
- work_dir=self._cached_tests_work_dir,
- )
+ # Build and run cached examples
+ with working_dir(self._cached_tests_work_dir):
+ make = which("make")
+ make("bigint")
+
+ for exe_name in ["ex5big", "ex15big"]:
+ with test_part(self, f"test_bigint_{exe_name}", purpose=f"Ensure {exe_name} runs"):
+
+ program = which(exe_name)
+ if program is None:
+ raise SkipTest(f"{exe_name} does not exist in version {self.version}")
- # Run the examples built above
- for exe in ["./ex5big", "./ex15big"]:
- self.run_test(
- exe,
- [],
- [],
- installed=False,
- purpose="test: ensuring {0} runs".format(exe),
- skip_missing=True,
- work_dir=self._cached_tests_work_dir,
- )
+ program()
@property
def headers(self):
@@ -139,6 +152,6 @@ class HypreCmake(CMakePackage, CudaPackage):
"""Export the hypre library.
Sample usage: spec['hypre'].libs.ld_flags
"""
- is_shared = "+shared" in self.spec
+ is_shared = self.spec.satisfies("+shared")
libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared, recursive=True)
return libs or None
diff --git a/var/spack/repos/builtin/packages/hypre/hypre-precision-fix.patch b/var/spack/repos/builtin/packages/hypre/hypre-precision-fix.patch
new file mode 100644
index 0000000000..d40b705820
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hypre/hypre-precision-fix.patch
@@ -0,0 +1,27 @@
+diff --git a/src/distributed_ls/ParaSails/ConjGrad.c b/src/distributed_ls/ParaSails/ConjGrad.c
+index 0ef71b36f..7abbc38aa 100644
+--- a/src/distributed_ls/ParaSails/ConjGrad.c
++++ b/src/distributed_ls/ParaSails/ConjGrad.c
+@@ -33,19 +33,19 @@ static HYPRE_Real InnerProd(HYPRE_Int n, HYPRE_Real *x, HYPRE_Real *y, MPI_Comm
+ static void CopyVector(HYPRE_Int n, HYPRE_Real *x, HYPRE_Real *y)
+ {
+ HYPRE_Int one = 1;
+- hypre_F90_NAME_BLAS(dcopy, DCOPY)(&n, x, &one, y, &one);
++ hypre_dcopy(&n, x, &one, y, &one);
+ }
+
+ static void ScaleVector(HYPRE_Int n, HYPRE_Real alpha, HYPRE_Real *x)
+ {
+ HYPRE_Int one = 1;
+- hypre_F90_NAME_BLAS(dscal, DSCAL)(&n, &alpha, x, &one);
++ hypre_dscal(&n, &alpha, x, &one);
+ }
+
+ static void Axpy(HYPRE_Int n, HYPRE_Real alpha, HYPRE_Real *x, HYPRE_Real *y)
+ {
+ HYPRE_Int one = 1;
+- hypre_F90_NAME_BLAS(daxpy, DAXPY)(&n, &alpha, x, &one, y, &one);
++ hypre_daxpy(&n, &alpha, x, &one, y, &one);
+ }
+
+
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index 977fce01bb..078221ba64 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -19,13 +19,15 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
git = "https://github.com/hypre-space/hypre.git"
tags = ["e4s", "radiuss"]
- maintainers("ulrikeyang", "osborn9", "balay")
+ maintainers("ulrikeyang", "osborn9", "victorapm", "balay")
test_requires_compiler = True
license("MIT")
version("develop", branch="master")
+ version("2.32.0", sha256="2277b6f01de4a7d0b01cfe12615255d9640eaa02268565a7ce1a769beab25fa1")
+ version("2.31.0", sha256="9a7916e2ac6615399de5010eb39c604417bb3ea3109ac90e199c5c63b0cb4334")
version("2.30.0", sha256="8e2af97d9a25bf44801c6427779f823ebc6f306438066bba7fcbc2a5f9b78421")
version("2.29.0", sha256="98b72115407a0e24dbaac70eccae0da3465f8f999318b2c9241631133f42d511")
version("2.28.0", sha256="2eea68740cdbc0b49a5e428f06ad7af861d1e169ce6a12d2cf0aa2fc28c4a2ae")
@@ -54,6 +56,10 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
version("2.10.1", sha256="a4a9df645ebdc11e86221b794b276d1e17974887ead161d5050aaf0b43bb183a")
version("2.10.0b", sha256="b55dbdc692afe5a00490d1ea1c38dd908dae244f7bdd7faaf711680059824c11")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Versions 2.13.0 and later can be patched to build shared
# libraries on Darwin; the patch for this capability does not
# apply to version 2.12.1 and earlier due to changes in the build system
@@ -68,9 +74,11 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
variant(
"superlu-dist", default=False, description="Activates support for SuperLU_Dist library"
)
+ variant("lapack", default=True, description="Use external blas/lapack")
variant("int64", default=False, description="Use 64bit integers")
variant("mixedint", default=False, description="Use 64bit integers while reducing memory use")
variant("complex", default=False, description="Use complex values")
+ variant("gpu-aware-mpi", default=False, description="Use gpu-aware mpi")
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=False, description="Enable OpenMP support")
variant("debug", default=False, description="Build debug instead of optimized version")
@@ -81,6 +89,16 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
variant("sycl", default=False, description="Enable SYCL support")
variant("magma", default=False, description="Enable MAGMA interface")
variant("caliper", default=False, description="Enable Caliper support")
+ variant("rocblas", default=False, description="Enable rocBLAS")
+ variant("cublas", default=False, description="Enable cuBLAS")
+ variant(
+ "precision",
+ default="double",
+ values=("single", "double", "longdouble"),
+ multi=False,
+ description="Floating point precision",
+ when="@2.12.1:",
+ )
# Patch to add gptune hookup codes
patch("ij_gptune.patch", when="+gptune@2.19.0")
@@ -96,14 +114,18 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
patch("hypre21800-compat.patch", when="@2.18.0")
# Patch to get config flags right
patch("detect-compiler.patch", when="@2.15.0:2.20.0")
+ # The following patch may not work for all versions, so apply it only when
+ # it is needed:
+ patch("hypre-precision-fix.patch", when="precision=single")
+ patch("hypre-precision-fix.patch", when="precision=longdouble")
@when("@2.26.0")
def patch(self): # fix sequential compilation in 'src/seq_mv'
filter_file("\tmake", "\t$(MAKE)", "src/seq_mv/Makefile")
depends_on("mpi", when="+mpi")
- depends_on("blas")
- depends_on("lapack")
+ depends_on("blas", when="+lapack")
+ depends_on("lapack", when="+lapack")
depends_on("magma", when="+magma")
depends_on("superlu-dist", when="+superlu-dist+mpi")
depends_on("rocsparse", when="+rocm")
@@ -112,22 +134,18 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("rocprim", when="+rocm")
depends_on("hipblas", when="+rocm +superlu-dist")
depends_on("umpire", when="+umpire")
+ depends_on("umpire+rocm", when="+umpire+rocm")
+ depends_on("umpire+cuda", when="+umpire+cuda")
depends_on("caliper", when="+caliper")
gpu_pkgs = ["magma", "umpire"]
for sm_ in CudaPackage.cuda_arch_values:
for pkg in gpu_pkgs:
- depends_on(
- "{0}+cuda cuda_arch={1}".format(pkg, sm_),
- when="+{0}+cuda cuda_arch={1}".format(pkg, sm_),
- )
+ depends_on(f"{pkg}+cuda cuda_arch={sm_}", when=f"+{pkg}+cuda cuda_arch={sm_}")
for gfx in ROCmPackage.amdgpu_targets:
for pkg in gpu_pkgs:
- depends_on(
- "{0}+rocm amdgpu_target={1}".format(pkg, gfx),
- when="+{0}+rocm amdgpu_target={1}".format(pkg, gfx),
- )
+ depends_on(f"{pkg}+rocm amdgpu_target={gfx}", when=f"+{pkg}+rocm amdgpu_target={gfx}")
# hypre@:2.28.0 uses deprecated cuSPARSE functions/types (e.g. csrsv2Info_t).
depends_on("cuda@:11", when="@:2.28.0+cuda")
@@ -164,45 +182,53 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
# Option added in v2.29.0
conflicts("+magma", when="@:2.28")
+ conflicts("+cublas", when="~cuda", msg="cuBLAS requires CUDA to be enabled")
+ conflicts("+rocblas", when="~rocm", msg="rocBLAS requires ROCm to be enabled")
+
configure_directory = "src"
def url_for_version(self, version):
if version >= Version("2.12.0"):
- url = "https://github.com/hypre-space/hypre/archive/v{0}.tar.gz"
+ url = f"https://github.com/hypre-space/hypre/archive/v{version}.tar.gz"
else:
- url = "http://computing.llnl.gov/project/linear_solvers/download/hypre-{0}.tar.gz"
+ url = (
+ f"http://computing.llnl.gov/project/linear_solvers/download/hypre-{version}.tar.gz"
+ )
- return url.format(version)
+ return url
def configure_args(self):
spec = self.spec
+ configure_args = [f"--prefix={prefix}"]
+
# Note: --with-(lapack|blas)_libs= needs space separated list of names
- lapack = spec["lapack"].libs
- blas = spec["blas"].libs
-
- configure_args = [
- "--prefix=%s" % prefix,
- "--with-lapack-libs=%s" % " ".join(lapack.names),
- "--with-lapack-lib-dirs=%s" % " ".join(lapack.directories),
- "--with-blas-libs=%s" % " ".join(blas.names),
- "--with-blas-lib-dirs=%s" % " ".join(blas.directories),
- ]
-
- if "+mpi" in spec:
+ if spec.satisfies("+lapack"):
+ configure_args.append("--with-lapack")
+ configure_args.append("--with-blas")
+ configure_args.append("--with-lapack-libs=%s" % " ".join(spec["lapack"].libs.names))
+ configure_args.append("--with-blas-libs=%s" % " ".join(spec["blas"].libs.names))
+ configure_args.append(
+ "--with-lapack-lib-dirs=%s" % " ".join(spec["lapack"].libs.directories)
+ )
+ configure_args.append(
+ "--with-blas-lib-dirs=%s" % " ".join(spec["blas"].libs.directories)
+ )
+
+ if spec.satisfies("+mpi"):
os.environ["CC"] = spec["mpi"].mpicc
os.environ["CXX"] = spec["mpi"].mpicxx
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
os.environ["F77"] = spec["mpi"].mpif77
os.environ["FC"] = spec["mpi"].mpifc
configure_args.append("--with-MPI")
- configure_args.append("--with-MPI-lib-dirs={0}".format(spec["mpi"].prefix.lib))
- configure_args.append("--with-MPI-include={0}".format(spec["mpi"].prefix.include))
+ configure_args.append(f"--with-MPI-lib-dirs={spec['mpi'].prefix.lib}")
+ configure_args.append(f"--with-MPI-include={spec['mpi'].prefix.include}")
else:
configure_args.append("--without-MPI")
configure_args.extend(self.with_or_without("openmp"))
- if "+int64" in spec:
+ if spec.satisfies("+int64"):
configure_args.append("--enable-bigint")
else:
configure_args.append("--disable-bigint")
@@ -211,115 +237,127 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
configure_args.extend(self.enable_or_disable("complex"))
- if "+shared" in spec:
+ if spec.satisfies("precision=single"):
+ configure_args.append("--enable-single")
+ elif spec.satisfies("precision=longdouble"):
+ configure_args.append("--enable-longdouble")
+
+ if spec.satisfies("+shared"):
configure_args.append("--enable-shared")
- if "~internal-superlu" in spec:
+ if spec.satisfies("~internal-superlu"):
configure_args.append("--without-superlu")
# MLI and FEI do not build without superlu on Linux
configure_args.append("--without-mli")
- configure_args.append("--without-fei")
+ # FEI option was removed in hypre 2.17
+ if self.version < Version("2.17.0"):
+ configure_args.append("--without-fei")
- if "+superlu-dist" in spec:
+ if spec.satisfies("+superlu-dist"):
configure_args.append(
"--with-dsuperlu-include=%s" % spec["superlu-dist"].prefix.include
)
configure_args.append("--with-dsuperlu-lib=%s" % spec["superlu-dist"].libs)
configure_args.append("--with-dsuperlu")
- if "+umpire" in spec:
+ if spec.satisfies("+umpire"):
configure_args.append("--with-umpire-include=%s" % spec["umpire"].prefix.include)
configure_args.append("--with-umpire-lib=%s" % spec["umpire"].libs)
- if "~cuda~rocm" in spec:
+ if spec.satisfies("~cuda~rocm"):
configure_args.append("--with-umpire-host")
else:
configure_args.append("--with-umpire")
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
configure_args.append("--with-caliper")
configure_args.append("--with-caliper-include=%s" % spec["caliper"].prefix.include)
configure_args.append("--with-caliper-lib=%s" % spec["caliper"].libs)
configure_args.extend(self.enable_or_disable("debug"))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
configure_args.extend(["--with-cuda", "--enable-curand", "--enable-cusparse"])
cuda_arch_vals = spec.variants["cuda_arch"].value
if cuda_arch_vals:
cuda_arch_sorted = list(sorted(cuda_arch_vals, reverse=True))
cuda_arch = cuda_arch_sorted[0]
- configure_args.append("--with-gpu-arch={0}".format(cuda_arch))
+ configure_args.append(f"--with-gpu-arch={cuda_arch}")
# New in 2.21.0: replaces --enable-cub
- if "@2.21.0:" in spec:
+ if spec.satisfies("@2.21.0:"):
configure_args.append("--enable-device-memory-pool")
- configure_args.append("--with-cuda-home={0}".format(spec["cuda"].prefix))
+ configure_args.append(f"--with-cuda-home={spec['cuda'].prefix}")
else:
configure_args.append("--enable-cub")
+ if spec.satisfies("+cublas"):
+ configure_args.append("--enable-cublas")
else:
configure_args.extend(["--without-cuda", "--disable-curand", "--disable-cusparse"])
- if "@:2.20.99" in spec:
+ if spec.satisfies("@:2.20.99"):
configure_args.append("--disable-cub")
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
rocm_pkgs = ["rocsparse", "rocthrust", "rocprim", "rocrand"]
- if "+superlu-dist" in spec:
+ if spec.satisfies("+superlu-dist"):
rocm_pkgs.append("hipblas")
rocm_inc = ""
for pkg in rocm_pkgs:
- if "^" + pkg in spec:
- rocm_inc += spec[pkg].headers.include_flags + " "
+ rocm_inc += spec[pkg].headers.include_flags + " "
configure_args.extend(
[
"--with-hip",
"--enable-rocrand",
"--enable-rocsparse",
- "--with-extra-CUFLAGS={0}".format(rocm_inc),
+ f"--with-extra-CUFLAGS={rocm_inc}",
]
)
rocm_arch_vals = spec.variants["amdgpu_target"].value
if rocm_arch_vals:
rocm_arch_sorted = list(sorted(rocm_arch_vals, reverse=True))
rocm_arch = rocm_arch_sorted[0]
- configure_args.append("--with-gpu-arch={0}".format(rocm_arch))
+ configure_args.append(f"--with-gpu-arch={rocm_arch}")
+ if spec.satisfies("+rocblas"):
+ configure_args.append("--enable-rocblas")
else:
configure_args.extend(["--without-hip", "--disable-rocrand", "--disable-rocsparse"])
- if "+sycl" in spec:
+ if spec.satisfies("+sycl"):
configure_args.append("--with-sycl")
- sycl_compatible_compilers = ["dpcpp", "icpx"]
+ sycl_compatible_compilers = ["icpx"]
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
raise InstallError(
- "Hypre's SYCL GPU Backend requires DPC++ (dpcpp)"
- + " or the oneAPI CXX (icpx) compiler."
+ "Hypre's SYCL GPU Backend requires the oneAPI CXX (icpx) compiler."
)
- if "+unified-memory" in spec:
+ if spec.satisfies("+unified-memory"):
configure_args.append("--enable-unified-memory")
- if "+magma" in spec:
+ if spec.satisfies("+magma"):
configure_args.append("--with-magma-include=%s" % spec["magma"].prefix.include)
configure_args.append("--with-magma-lib=%s" % spec["magma"].libs)
configure_args.append("--with-magma")
+ if spec.satisfies("+gpu-aware-mpi"):
+ configure_args.append("--enable-gpu-aware-mpi")
+
configure_args.extend(self.enable_or_disable("fortran"))
return configure_args
def setup_build_environment(self, env):
spec = self.spec
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
env.set("CC", spec["mpi"].mpicc)
env.set("CXX", spec["mpi"].mpicxx)
- if "+fortran" in spec:
+ if spec.satisfies("+fortan"):
env.set("F77", spec["mpi"].mpif77)
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
env.set("CUDA_HOME", spec["cuda"].prefix)
env.set("CUDA_PATH", spec["cuda"].prefix)
# In CUDA builds hypre currently doesn't handle flags correctly
- env.append_flags("CXXFLAGS", "-O2" if "~debug" in spec else "-g")
+ env.append_flags("CXXFLAGS", "-O2" if spec.satisfies("~debug") else "-g")
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
# As of 2022/04/05, the following are set by 'llvm-amdgpu' and
# override hypre's default flags, so we unset them.
env.unset("CFLAGS")
@@ -341,10 +379,10 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
sstruct()
sstruct("-in", "test/sstruct.in.default", "-solver", "40", "-rhsone")
make("install")
- if "+gptune" in self.spec:
+ if spec.satisfies("+gptune"):
make("test")
- self.run_test("mkdir", options=["-p", self.prefix.bin])
- self.run_test("cp", options=["test/ij", self.prefix.bin + "/."])
+ mkdirp(self.prefix.bin)
+ install(join_path("test", "ij"), self.prefix.bin)
extra_install_tests = join_path("src", "examples")
@@ -352,36 +390,34 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
def cache_test_sources(self):
cache_extra_test_sources(self, self.extra_install_tests)
+ # Customize the makefile to use the installed package
+ makefile = join_path(install_test_root(self), self.extra_install_tests, "Makefile")
+ filter_file(r"^HYPRE_DIR\s* =.*", f"HYPRE_DIR = {self.prefix}", makefile)
+ filter_file(r"^CC\s*=.*", f"CC = {os.environ['CC']}", makefile)
+ filter_file(r"^F77\s*=.*", f"F77 = {os.environ['F77']}", makefile)
+ filter_file(r"^CXX\s*=.*", f"CXX = {os.environ['CXX']}", makefile)
+
@property
def _cached_tests_work_dir(self):
"""The working directory for cached test sources."""
return join_path(self.test_suite.current_test_cache_dir, self.extra_install_tests)
- def test(self):
- """Perform smoke test on installed HYPRE package."""
+ def test_bigint(self):
+ """build and run bigint tests"""
if "+mpi" not in self.spec:
- print("Skipping: HYPRE must be installed with +mpi to run tests")
- return
-
- # Build copied and cached test examples
- self.run_test(
- "make",
- ["HYPRE_DIR={0}".format(self.prefix), "bigint"],
- purpose="test: building selected examples",
- work_dir=self._cached_tests_work_dir,
- )
-
- # Run the examples built above
- for exe in ["./ex5big", "./ex15big"]:
- self.run_test(
- exe,
- [],
- [],
- installed=False,
- purpose="test: ensuring {0} runs".format(exe),
- skip_missing=True,
- work_dir=self._cached_tests_work_dir,
- )
+ raise SkipTest("Package must be installed with +mpi")
+
+ # build and run cached examples
+ with working_dir(self._cached_tests_work_dir):
+ make = which("make")
+ make("bigint")
+
+ for name in ["ex5big", "ex15big"]:
+ with test_part(self, f"test_bigint_{name}", f"ensure {name} runs"):
+ exe = which(name)
+ if exe is None:
+ raise SkipTest(f"{name} does not exist in version {self.version}")
+ exe()
@property
def headers(self):
@@ -397,6 +433,6 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Export the hypre library.
Sample usage: spec['hypre'].libs.ld_flags
"""
- is_shared = "+shared" in self.spec
+ is_shared = self.spec.satisfies("+shared")
libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared, recursive=True)
return libs or None
diff --git a/var/spack/repos/builtin/packages/hztool/package.py b/var/spack/repos/builtin/packages/hztool/package.py
index 60e2a60f3e..39276be305 100644
--- a/var/spack/repos/builtin/packages/hztool/package.py
+++ b/var/spack/repos/builtin/packages/hztool/package.py
@@ -27,6 +27,8 @@ class Hztool(AutotoolsPackage):
version("4.1", sha256="a24b5d483d1dacaa991958956e838601a426133c74885b3aa2fc27c98b42d22a")
version("4.0", sha256="e6f6955159da46156bf9182f61754a59dd14e407d40c2448e3f821d55bf963a0")
+ depends_on("fortran", type="build") # generated
+
def patch(self):
filter_file("-fno-automatic", "-fno-automatic -fallow-argument-mismatch", "configure.ac")
diff --git a/var/spack/repos/builtin/packages/i3/package.py b/var/spack/repos/builtin/packages/i3/package.py
index 53d0ad53eb..2224ad4a8f 100644
--- a/var/spack/repos/builtin/packages/i3/package.py
+++ b/var/spack/repos/builtin/packages/i3/package.py
@@ -19,6 +19,8 @@ class I3(AutotoolsPackage):
version("4.14.1", sha256="28d8102d656f17445a6e1523b12c1a730cc3925a520add1f75b56b9c842932f9")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ibm-databroker/package.py b/var/spack/repos/builtin/packages/ibm-databroker/package.py
index 745240354b..8f3b4ed990 100644
--- a/var/spack/repos/builtin/packages/ibm-databroker/package.py
+++ b/var/spack/repos/builtin/packages/ibm-databroker/package.py
@@ -28,6 +28,9 @@ class IbmDatabroker(CMakePackage, PythonExtension):
version("0.6.1", sha256="2c7d6c6a269d4ae97aad4d770533e742f367da84758130c283733f25df83e535")
version("0.6.0", sha256="5856209d965c923548ebb69119344f1fc596d4c0631121b230448cc91bac4290")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Build Python bindings")
depends_on("cmake@2.8:", type="build")
@@ -44,6 +47,6 @@ class IbmDatabroker(CMakePackage, PythonExtension):
def cmake_args(self):
args = []
args.append("-DDEFAULT_BE=redis")
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args.append("-DPYDBR=1")
return args
diff --git a/var/spack/repos/builtin/packages/ibm-java/package.py b/var/spack/repos/builtin/packages/ibm-java/package.py
index 97d63d65c8..376233effd 100644
--- a/var/spack/repos/builtin/packages/ibm-java/package.py
+++ b/var/spack/repos/builtin/packages/ibm-java/package.py
@@ -6,6 +6,8 @@
import os
import platform
+from llnl.util.symlink import readlink
+
from spack.package import *
@@ -94,7 +96,7 @@ class IbmJava(Package):
# The archive.bin file is quite fussy and doesn't work as a
# symlink.
if os.path.islink(archive):
- targ = os.readlink(archive)
+ targ = readlink(archive)
os.unlink(archive)
copy(targ, archive)
diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py
index bb21460e04..7a4b3ec9e0 100644
--- a/var/spack/repos/builtin/packages/ibmisc/package.py
+++ b/var/spack/repos/builtin/packages/ibmisc/package.py
@@ -19,6 +19,9 @@ class Ibmisc(CMakePackage):
version("0.1.0", sha256="38481a8680aad4b40eca6723b2898b344cf0ef891ebc3581f5e99fbe420fa0d8")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("everytrace", default=False, description="Report errors through Everytrace")
variant("proj", default=True, description="Compile utilities for PROJ.4 library")
variant("blitz", default=True, description="Compile utilities for Blitz library")
diff --git a/var/spack/repos/builtin/packages/icarus/package.py b/var/spack/repos/builtin/packages/icarus/package.py
index b652f7a6da..1cc72168e1 100644
--- a/var/spack/repos/builtin/packages/icarus/package.py
+++ b/var/spack/repos/builtin/packages/icarus/package.py
@@ -22,6 +22,9 @@ class Icarus(AutotoolsPackage):
version("11_0", sha256="6327fb900e66b46803d928b7ca439409a0dc32731d82143b20387be0833f1c95")
version("10_3", commit="453c5465895eaca4a792d18b75e9ec14db6ea50e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("bison", type="build")
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/iceauth/package.py b/var/spack/repos/builtin/packages/iceauth/package.py
index 051e9527eb..6b5bcfce51 100644
--- a/var/spack/repos/builtin/packages/iceauth/package.py
+++ b/var/spack/repos/builtin/packages/iceauth/package.py
@@ -11,16 +11,19 @@ class Iceauth(AutotoolsPackage, XorgPackage):
information used in connecting with ICE. It operates very much
like the xauth program for X11 connection authentication records."""
- homepage = "https://cgit.freedesktop.org/xorg/app/iceauth"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/iceauth"
xorg_mirror_path = "app/iceauth-1.0.7.tar.gz"
license("MIT")
+ version("1.0.10", sha256="f17f373c6e7bfef9cfa4c688f165dfebec7642ad7c6304c5bb3c9bc2bfcde747")
version("1.0.9", sha256="5ca274cf210453e7d7cf5c827a2fbc92149df83824f99a27cde17e1f20324dc6")
version("1.0.7", sha256="6c9706cce276609876e768759ed4ee3b447cd17af4a61f9b5a374c7dda9696d8")
+ depends_on("c", type="build")
+
depends_on("libice")
- depends_on("xproto@7.0.22:")
+ depends_on("xproto@7.0.22:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/icedtea/package.py b/var/spack/repos/builtin/packages/icedtea/package.py
index b1dfc2dd16..9499abc5bf 100644
--- a/var/spack/repos/builtin/packages/icedtea/package.py
+++ b/var/spack/repos/builtin/packages/icedtea/package.py
@@ -27,6 +27,9 @@ class Icedtea(AutotoolsPackage):
version("3.5.0", sha256="2c92e18fa70edaf73517fcf91bc2a7cc2ec2aa8ffdf22bb974fa6f9bc3065f30")
version("3.4.0", sha256="2b606bbbf4ca5bcf2c8e811ea9060da30744860f3d63e1b3149fb5550a90b92b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("X", default=False, description="Build with GUI support.")
variant(
"shenandoah",
@@ -37,7 +40,7 @@ class Icedtea(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("gmake", type="build")
depends_on("cups")
- depends_on("jdk", type="build")
+ depends_on("java", type="build")
# X11 deps required for building even when headless
depends_on("libx11", when="~X", type="build")
depends_on("xproto", when="~X", type="build")
@@ -155,9 +158,9 @@ class Icedtea(AutotoolsPackage):
os.environ["POTENTIAL_CC"] = os.environ["CC"]
os.environ["WGET"] = self.spec["wget"].command.path
args = []
- if "~X" in self.spec:
+ if self.spec.satisfies("~X"):
args.append("--enable-headless")
- if "+shenandoah" in self.spec:
+ if self.spec.satisfies("+shenandoah"):
args.append("--with-hotspot-build=shenandoah")
args.append("--with-hotspot-src-zip=" + self.stage[9].archive_file)
args.append("--with-hotspot-checksum=no")
diff --git a/var/spack/repos/builtin/packages/icet/package.py b/var/spack/repos/builtin/packages/icet/package.py
index 72efff0787..6d6b145fc3 100644
--- a/var/spack/repos/builtin/packages/icet/package.py
+++ b/var/spack/repos/builtin/packages/icet/package.py
@@ -17,6 +17,8 @@ class Icet(CMakePackage):
version("develop", branch="master")
version("2.1.1", sha256="04cc5b7aa5b3ec95b255febdcfc2312e553ce3db5ca305526803d5737561ec32")
+ depends_on("c", type="build") # generated
+
variant("opengl", default=False, description="Use opengl")
variant("shared", default=True, description="Enable shared library")
diff --git a/var/spack/repos/builtin/packages/ico/package.py b/var/spack/repos/builtin/packages/ico/package.py
index 4afb834fad..a057f41252 100644
--- a/var/spack/repos/builtin/packages/ico/package.py
+++ b/var/spack/repos/builtin/packages/ico/package.py
@@ -12,14 +12,16 @@ class Ico(AutotoolsPackage, XorgPackage):
polyhedron, with hidden lines removed, or a solid-fill polyhedron with
hidden faces removed."""
- homepage = "https://cgit.freedesktop.org/xorg/app/ico"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/ico"
xorg_mirror_path = "app/ico-1.0.4.tar.gz"
version("1.0.6", sha256="dc59589044d71e3ef4dacf5a62a7b0f69b543386d2a12fb8b5558caee5b1e22f")
version("1.0.4", sha256="eb8609c3b43dc2e575272f2702590525fe13229e022c4aff8b9a0cc2a3f3205d")
+ depends_on("c", type="build")
+
depends_on("libx11@0.99.1:")
- depends_on("xproto@7.0.22:")
+ depends_on("xproto@7.0.22:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/icon/package.py b/var/spack/repos/builtin/packages/icon/package.py
new file mode 100644
index 0000000000..e75d8d6b05
--- /dev/null
+++ b/var/spack/repos/builtin/packages/icon/package.py
@@ -0,0 +1,282 @@
+# Copyright 2013-2024 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 collections import defaultdict
+
+from spack.package import *
+
+
+class Icon(AutotoolsPackage):
+ """ICON - is a modeling framework for weather, climate, and environmental prediction. It solves
+ the full three-dimensional non-hydrostatic and compressible Navier-Stokes equations on an
+ icosahedral grid and allows seamless predictions from local to global scales."""
+
+ homepage = "https://www.icon-model.org"
+ url = "https://gitlab.dkrz.de/icon/icon-model/-/archive/icon-2024.01-public/icon-model-icon-2024.01-public.tar.gz"
+
+ maintainers("skosukhin", "Try2Code")
+
+ license("BSD-3-Clause", checked_by="skosukhin")
+
+ version("2024.10", sha256="5c461c783eb577c97accd632b18140c3da91c1853d836ca2385f376532e9bad1")
+ version("2024.07", sha256="f53043ba1b36b8c19d0d2617ab601c3b9138b90f8ff8ca6db0fd079665eb5efa")
+ version("2024.01-1", sha256="3e57608b7e1e3cf2f4cb318cfe2fdb39678bd53ca093955d99570bd6d7544184")
+ version("2024.01", sha256="d9408fdd6a9ebf5990298e9a09c826e8c15b1e79b45be228f7a5670a3091a613")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # Model Features:
+ variant("atmo", default=True, description="Enable the atmosphere component")
+ variant("les", default=True, description="Enable the Large-Eddy Simulation component")
+ variant("upatmo", default=True, description="Enable the upper atmosphere component")
+ variant("ocean", default=True, description="Enable the ocean component")
+ variant("jsbach", default=True, description="Enable the land component JSBACH")
+ variant("waves", default=True, description="Enable the ocean surface wave component")
+ variant("coupling", default=True, description="Enable the coupling")
+ variant("aes", default=True, description="Enable the AES physics package")
+ variant("nwp", default=True, description="Enable the NWP physics package")
+ variant(
+ "ecrad", default=False, description="Enable usage of the ECMWF radiation scheme (ECRAD)"
+ )
+ variant(
+ "rte-rrtmgp",
+ default=True,
+ description="Enable usage of the RTE+RRTMGP toolbox for radiation calculations",
+ )
+ variant(
+ "art", default=False, description="Enable the aerosols and reactive trace component ART"
+ )
+
+ # Infrastructural Features:
+ variant("mpi", default=True, description="Enable MPI (parallelization) support")
+ variant("openmp", default=False, description="Enable OpenMP support")
+
+ nvidia_targets = {"nvidia-{0}".format(cc): cc for cc in CudaPackage.cuda_arch_values}
+ # TODO: add AMD GPU support
+
+ variant(
+ "gpu",
+ default="none",
+ values=("none",) + tuple(nvidia_targets.keys()),
+ description="Enable GPU support for the specified architecture",
+ )
+ for __x in nvidia_targets.keys():
+ # Other compilers are not yet tested or supported, older NVHPC versions are not supported:
+ requires("%nvhpc@21.3:", when="gpu={0}".format(__x))
+
+ variant("mpi-gpu", default=True, description="Enable usage of the GPU-aware MPI features")
+ requires("+mpi", when="+mpi-gpu")
+ conflicts("gpu=none", when="+mpi-gpu")
+
+ variant("grib2", default=False, description="Enable GRIB2 I/O")
+
+ variant(
+ "parallel-netcdf",
+ default=False,
+ description="Enable usage of the parallel features of NetCDF",
+ )
+ requires("+mpi", when="+parallel-netcdf")
+
+ variant("cdi-pio", default=False, description="Enable usage of the parallel features of CDI")
+ requires("+mpi", when="+cdi-pio")
+
+ variant("yaxt", default=False, description="Enable the YAXT data exchange")
+ requires("+mpi", when="+yaxt")
+
+ serialization_values = ("read", "perturb", "create")
+ variant(
+ "serialization",
+ default="none",
+ values=("none",) + serialization_values,
+ description="Enable the Serialbox2 serialization",
+ )
+
+ variant("comin", default=False, description="Enable the ICON community interfaces")
+
+ # Optimization Features:
+ variant("mixed-precision", default=False, description="Enable mixed-precision dynamical core")
+
+ depends_on("python", type="build")
+ depends_on("perl", type="build")
+ depends_on("cmake@3.18:", type="build")
+ depends_on("gmake@3.81:", type="build")
+ depends_on("findutils", type="build")
+
+ depends_on("libxml2", when="+art")
+ depends_on("libfyaml@0.6:", when="+coupling")
+ for __x in serialization_values:
+ depends_on("serialbox+fortran", when="serialization={0}".format(__x))
+ depends_on("eccodes", when="+grib2")
+ depends_on("lapack")
+ depends_on("blas")
+ depends_on("netcdf-fortran")
+ depends_on("netcdf-c")
+ depends_on("netcdf-c+mpi", when="+parallel-netcdf")
+ depends_on("mpi", when="+mpi")
+
+ for __x in nvidia_targets.keys():
+ depends_on("cuda", when="gpu={0}".format(__x))
+
+ def configure_args(self):
+ args = ["--disable-rpaths"]
+ flags = defaultdict(list)
+ libs = LibraryList([])
+
+ for x in [
+ "atmo",
+ "les",
+ "upatmo",
+ "jsbach",
+ "waves",
+ "aes",
+ "nwp",
+ "ecrad",
+ "rte-rrtmgp",
+ "openmp",
+ "mpi-gpu",
+ "parallel-netcdf",
+ "cdi-pio",
+ "yaxt",
+ "mixed-precision",
+ "comin",
+ ]:
+ args += self.enable_or_disable(x)
+
+ if self.spec.satisfies("+art"):
+ args.append("--enable-art")
+ libs += self.spec["libxml2"].libs
+ else:
+ args.append("--disable-art")
+
+ if self.spec.satisfies("+coupling"):
+ args.append("--enable-coupling")
+ libs += self.spec["libfyaml"].libs
+ else:
+ args.append("--disable-coupling")
+
+ serialization = self.spec.variants["serialization"].value
+ if serialization == "none":
+ args.append("--disable-serialization")
+ else:
+ args.extend(
+ [
+ "--enable-serialization={0}".format(serialization),
+ "SB2PP={0}".format(self.spec["serialbox"].pp_ser),
+ ]
+ )
+ libs += self.spec["serialbox:fortran"].libs
+
+ if self.spec.satisfies("+grib2"):
+ args.append("--enable-grib2")
+ libs += self.spec["eccodes:c"].libs
+ else:
+ args.append("--disable-grib2")
+
+ libs += self.spec["lapack:fortran"].libs
+ libs += self.spec["blas:fortran"].libs
+ libs += self.spec["netcdf-fortran"].libs
+ libs += self.spec["netcdf-c"].libs
+
+ if self.spec.satisfies("+mpi"):
+ args.extend(
+ [
+ "--enable-mpi",
+ # We cannot provide a universal value for MPI_LAUNCH, therefore we have to
+ # disable the MPI checks:
+ "--disable-mpi-checks",
+ "CC=" + self.spec["mpi"].mpicc,
+ "FC=" + self.spec["mpi"].mpifc,
+ ]
+ )
+ else:
+ args.append("--disable-mpi")
+
+ gpu = self.spec.variants["gpu"].value
+
+ if gpu in self.nvidia_targets:
+ args.append("--enable-gpu=openacc+cuda")
+ flags["CUDAFLAGS"] = [
+ "-g",
+ "-O3",
+ "-arch=sm_{0}".format(self.nvidia_targets[gpu]),
+ "-ccbin={0}".format(spack_cxx),
+ ]
+ flags["ICON_LDFLAGS"].extend(self.compiler.stdcxx_libs)
+ libs += self.spec["cuda"].libs
+ else:
+ args.append("--disable-gpu")
+
+ if self.compiler.name == "gcc":
+ flags["CFLAGS"].append("-g")
+ flags["ICON_CFLAGS"].append("-O3")
+ flags["ICON_BUNDLED_CFLAGS"].append("-O2")
+ flags["FCFLAGS"].append("-g")
+ flags["ICON_FCFLAGS"].append("-O2")
+ if self.spec.satisfies("+ocean"):
+ flags["ICON_OCEAN_FCFLAGS"].extend(["-O3", "-fno-tree-loop-vectorize"])
+ args.extend(
+ ["--enable-fcgroup-OCEAN", "ICON_OCEAN_PATH=src/hamocc:src/ocean:src/sea_ice"]
+ )
+
+ elif self.compiler.name in ["intel", "oneapi"]:
+ args.append("--enable-intel-consistency")
+
+ flags["CFLAGS"].extend(["-g", "-ftz", "-fma", "-ip", "-qno-opt-dynamic-align"])
+ flags["ICON_CFLAGS"].append("-O3")
+ flags["ICON_BUNDLED_CFLAGS"].append("-O2")
+ flags["FCFLAGS"].extend(["-g", "-fp-model source"])
+ flags["ICON_FCFLAGS"].extend(
+ [
+ "-O3",
+ "-ftz",
+ "-qoverride-limits",
+ "-assume realloc_lhs",
+ "-align array64byte",
+ "-fma",
+ "-ip",
+ ]
+ )
+
+ if self.spec.satisfies("%oneapi+coupling"):
+ flags["ICON_YAC_CFLAGS"].extend(["-O2", "-fp-model precise"])
+
+ if self.spec.satisfies("+ocean"):
+ flags["ICON_OCEAN_FCFLAGS"].extend(
+ ["-O3", "-assume norealloc_lhs", "-reentrancy threaded"]
+ )
+ args.extend(
+ ["--enable-fcgroup-OCEAN", "ICON_OCEAN_PATH=src/hamocc:src/ocean:src/sea_ice"]
+ )
+
+ if self.spec.satisfies("+openmp"):
+ flags["ICON_OCEAN_FCFLAGS"].extend(["-DOCE_SOLVE_OMP"])
+
+ if self.spec.satisfies("+ecrad"):
+ flags["ICON_ECRAD_FCFLAGS"].extend(["-qno-opt-dynamic-align", "-no-fma", "-fpe0"])
+
+ elif self.compiler.name == "nvhpc":
+ flags["CFLAGS"].extend(["-g", "-O2"])
+ flags["FCFLAGS"].extend(
+ ["-g", "-O2", "-Mrecursive", "-Mallocatable=03", "-Mstack_arrays"]
+ )
+
+ if gpu in self.nvidia_targets:
+ flags["FCFLAGS"].extend(
+ ["-acc=gpu", "-gpu=cc{0}".format(self.nvidia_targets[gpu])]
+ )
+
+ if self.spec.satisfies("%nvhpc@:23.9+coupling"):
+ args.append("yac_cv_fc_is_contiguous_works=yes")
+
+ else:
+ flags["CFLAGS"].extend(["-g", "-O2"])
+ flags["FCFLAGS"].extend(["-g", "-O2"])
+
+ args.extend(["{0}={1}".format(name, " ".join(value)) for name, value in flags.items()])
+ args.append("LIBS={0}".format(libs.link_flags))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py
index fc5dbb2101..10189b1b85 100644
--- a/var/spack/repos/builtin/packages/icu4c/package.py
+++ b/var/spack/repos/builtin/packages/icu4c/package.py
@@ -3,10 +3,14 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import pathlib
+
+import spack.build_systems.autotools
+import spack.build_systems.msbuild
from spack.package import *
-class Icu4c(AutotoolsPackage):
+class Icu4c(AutotoolsPackage, MSBuildPackage):
"""ICU is a mature, widely used set of C/C++ and Java libraries providing
Unicode and Globalization support for software applications. ICU4C is the
C/C++ interface."""
@@ -16,6 +20,7 @@ class Icu4c(AutotoolsPackage):
license("Unicode-TOU")
+ version("74.2", sha256="68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c")
version("67.1", sha256="94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc")
version("66.1", sha256="52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e")
version("65.1", sha256="53e37466b3d6d6d01ead029e3567d873a43a5d1c668ed2278e253b683136d948")
@@ -27,15 +32,25 @@ class Icu4c(AutotoolsPackage):
version("57.2", sha256="623f04b921827a041f42d52495a6f8eee6565a9b7557051ac68e099123ff28dc")
version("57.1", sha256="ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581")
- variant(
- "cxxstd",
- default="11",
- values=("11", "14", "17"),
- multi=False,
- description="Use the specified C++ standard when building",
- )
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ build_system("autotools", "msbuild", default="autotools")
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ variant(
+ "cxxstd",
+ default="11",
+ values=("11", "14", "17"),
+ multi=False,
+ description="Use the specified C++ standard when building",
+ )
depends_on("python", type="build", when="@64.1:")
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
conflicts(
"%intel@:16",
@@ -51,8 +66,6 @@ class Icu4c(AutotoolsPackage):
when="@58.0:59",
)
- configure_directory = "source"
-
def url_for_version(self, version):
url = "https://github.com/unicode-org/icu/releases/download/release-{0}/icu4c-{1}-src.tgz"
return url.format(version.dashed, version.underscored)
@@ -61,13 +74,15 @@ class Icu4c(AutotoolsPackage):
if name == "cxxflags":
# Control of the C++ Standard is via adding the required "-std"
# flag to CXXFLAGS in env
- flags.append(
- getattr(self.compiler, "cxx{0}_flag".format(self.spec.variants["cxxstd"].value))
- )
+ flags.append(getattr(self.compiler, f"cxx{self.spec.variants['cxxstd'].value}_flag"))
return (None, flags, None)
- # Need to make sure that locale is UTF-8 in order to process source
- # files in UTF-8.
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+
+ configure_directory = "source"
+
+ # Need to make sure that locale is UTF-8 in order to process source files in UTF-8.
@when("@59:")
def setup_build_environment(self, env):
env.set("LC_ALL", "en_US.UTF-8")
@@ -75,14 +90,49 @@ class Icu4c(AutotoolsPackage):
def configure_args(self):
args = []
- if "python" in self.spec:
+ if self.spec.satisfies("^python"):
# Make sure configure uses Spack's python package
# Without this, configure could pick a broken global installation
- args.append("PYTHON={0}".format(self.spec["python"].command))
+ args.append(f"PYTHON={self.spec['python'].command}")
# The --enable-rpath option is only needed on MacOS, and it
# breaks the build for xerces-c on Linux.
- if "platform=darwin" in self.spec:
+ if self.spec.satisfies("platform=darwin"):
args.append("--enable-rpath")
return args
+
+
+class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder):
+ # Need to make sure that locale is UTF-8 in order to process source files in UTF-8.
+ @when("@59:")
+ def setup_build_environment(self, env):
+ env.set("LC_ALL", "en_US.UTF-8")
+
+ def msbuild_args(self):
+ return [
+ "allinone.sln",
+ self.define("OutputPath", self.spec.prefix),
+ self.define("Configuration", "Release"),
+ self.define("SkipUWP", "true"),
+ ]
+
+ @property
+ def build_directory(self):
+ solution_path = pathlib.Path(self.pkg.stage.source_path)
+ if self.spec.satsifies("@:67"):
+ solution_path = solution_path / "icu"
+ solution_path = solution_path / "source" / "allinone"
+ return str(solution_path)
+
+ def install(self, pkg, spec, prefix):
+ mkdirp(prefix.lib)
+ mkdirp(prefix.bin)
+ mkdirp(prefix.include)
+ with working_dir(self.pkg.stage.source_path):
+ # install bin
+ install_tree("bin64", prefix.bin)
+ # install lib
+ install_tree("lib64", prefix.lib)
+ # intstall headers
+ install_tree("include", prefix.include)
diff --git a/var/spack/repos/builtin/packages/id3lib/package.py b/var/spack/repos/builtin/packages/id3lib/package.py
index 660897260c..7756183291 100644
--- a/var/spack/repos/builtin/packages/id3lib/package.py
+++ b/var/spack/repos/builtin/packages/id3lib/package.py
@@ -9,13 +9,16 @@ from spack.package import *
class Id3lib(AutotoolsPackage):
"""Library for manipulating ID3v1 and ID3v2 tags"""
- homepage = "http://id3lib.sourceforge.net/"
+ homepage = "https://id3lib.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/id3lib/id3lib/3.8.3/id3lib-3.8.3.tar.gz"
license("GPL-2.0-only")
version("3.8.3", sha256="2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
# http://connie.slackware.com/~alien/slackbuilds/id3lib/build/id3lib-3.8.3_gcc4.diff
diff --git a/var/spack/repos/builtin/packages/idba/package.py b/var/spack/repos/builtin/packages/idba/package.py
index 3213d2838f..ae20069341 100644
--- a/var/spack/repos/builtin/packages/idba/package.py
+++ b/var/spack/repos/builtin/packages/idba/package.py
@@ -15,6 +15,8 @@ class Idba(AutotoolsPackage):
version("1.1.3", sha256="6b1746a29884f4fa17b110d94d9ead677ab5557c084a93b16b6a043dbb148709")
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/idg/package.py b/var/spack/repos/builtin/packages/idg/package.py
index 42621b4ca9..74e6b0637b 100644
--- a/var/spack/repos/builtin/packages/idg/package.py
+++ b/var/spack/repos/builtin/packages/idg/package.py
@@ -25,6 +25,9 @@ class Idg(CMakePackage):
version("1.0.0", commit="3322756fb8b6e3bb1fe5293f3e07e40623ff8486")
version("0.8.1", commit="a09f3c85094c592f9304fff4c31e920c7592c3c3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost")
depends_on("fftw-api@3")
depends_on("blas")
diff --git a/var/spack/repos/builtin/packages/igprof/package.py b/var/spack/repos/builtin/packages/igprof/package.py
index 97e80795d1..eb4d92ca3d 100644
--- a/var/spack/repos/builtin/packages/igprof/package.py
+++ b/var/spack/repos/builtin/packages/igprof/package.py
@@ -16,8 +16,12 @@ class Igprof(CMakePackage):
homepage = "https://igprof.org/"
url = "https://github.com/igprof/igprof/archive/v5.9.16.tar.gz"
+ version("5.9.18", sha256="f3e378a358469cd269aa5cb3312adc4f5ca89b90c0de89dc070d803c6b68f7b5")
version("5.9.16", sha256="cc977466b310f47bbc2967a0bb6ecd49d7437089598346e3f1d8aaf9a7555d96")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libunwind")
# Three patches in one: C++11 compatibility (src/analyse.cc),
diff --git a/var/spack/repos/builtin/packages/igraph/package.py b/var/spack/repos/builtin/packages/igraph/package.py
index ec5051d054..948b325322 100644
--- a/var/spack/repos/builtin/packages/igraph/package.py
+++ b/var/spack/repos/builtin/packages/igraph/package.py
@@ -14,9 +14,15 @@ class Igraph(CMakePackage, AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("0.10.15", sha256="03ba01db0544c4e32e51ab66f2356a034394533f61b4e14d769b9bbf5ad5e52c")
+ version("0.10.13", sha256="c6dc44324f61f52c098bedb81f6a602365d39d692d5068ca4fc3734b2a15e64c")
version("0.10.6", sha256="99bf91ee90febeeb9a201f3e0c1d323c09214f0b5f37a4290dc3b63f52839d6d")
version("0.7.1", sha256="d978030e27369bf698f3816ab70aa9141e9baf81c56cc4f55efbe5489b46b0df")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=False, description="Enable shared build")
build_system(
@@ -46,7 +52,7 @@ class Igraph(CMakePackage, AutotoolsPackage):
"-DBLA_VENDOR=OpenBLAS",
]
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
else:
args.append("-DBUILD_SHARED_LIBS=OFF")
diff --git a/var/spack/repos/builtin/packages/igv/package.py b/var/spack/repos/builtin/packages/igv/package.py
index 62c4817c9c..ca3d1bc843 100644
--- a/var/spack/repos/builtin/packages/igv/package.py
+++ b/var/spack/repos/builtin/packages/igv/package.py
@@ -34,7 +34,7 @@ class Igv(Package):
mkdirp(prefix.bin)
install("igv.args", prefix)
files = ["igv.sh", "igv_hidpi.sh"]
- if "+igvtools" in spec:
+ if spec.satisfies("+igvtools"):
files.extend(["igvtools", "igvtools_gui", "igvtools_gui_hidpi"])
for f in files:
filter_file("^prefix=.*$", "prefix=" + prefix, f)
diff --git a/var/spack/repos/builtin/packages/ike-scan/package.py b/var/spack/repos/builtin/packages/ike-scan/package.py
index b6aef8a42d..fa2aa4c30b 100644
--- a/var/spack/repos/builtin/packages/ike-scan/package.py
+++ b/var/spack/repos/builtin/packages/ike-scan/package.py
@@ -15,3 +15,5 @@ class IkeScan(AutotoolsPackage):
license("GPL-2.0-or-later")
version("1.9", sha256="05d15c7172034935d1e46b01dacf1101a293ae0d06c0e14025a4507656f1a7b6")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ilmbase/package.py b/var/spack/repos/builtin/packages/ilmbase/package.py
index e3d47d3e30..7ee9bfc2fe 100644
--- a/var/spack/repos/builtin/packages/ilmbase/package.py
+++ b/var/spack/repos/builtin/packages/ilmbase/package.py
@@ -34,3 +34,5 @@ class Ilmbase(AutotoolsPackage):
sha256="c134e47206d0e22ff0be96fa95391a13b635b6ad42668673e293f835fbd176b1",
url="http://download.savannah.nongnu.org/releases/openexr/ilmbase-0.9.0.tar.gz",
)
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ima-evm-utils/package.py b/var/spack/repos/builtin/packages/ima-evm-utils/package.py
index 11728627b9..1bb470496a 100644
--- a/var/spack/repos/builtin/packages/ima-evm-utils/package.py
+++ b/var/spack/repos/builtin/packages/ima-evm-utils/package.py
@@ -21,6 +21,8 @@ class ImaEvmUtils(AutotoolsPackage):
version("1.3", sha256="62e90e8dc6b131a4f34a356114cdcb5bef844f110abbdd5d8b53c449aecc609f")
version("1.2.1", sha256="ad8471b58c4df29abd51c80d74b1501cfe3289b60d32d1b318618a8fd26c0c0a")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/imagemagick/package.py b/var/spack/repos/builtin/packages/imagemagick/package.py
index 3f5cc4478b..cae37bc79b 100644
--- a/var/spack/repos/builtin/packages/imagemagick/package.py
+++ b/var/spack/repos/builtin/packages/imagemagick/package.py
@@ -15,26 +15,58 @@ class Imagemagick(AutotoolsPackage):
license("ImageMagick")
+ version("7.1.1-39", sha256="b2eb652d9221bdeb65772503891d8bfcfc36b3b1a2c9bb35b9d247a08965fd5d")
+ version("7.1.1-29", sha256="27bd25f945efdd7e38f6f9845a7c0a391fdb732f652dda140b743769c5f106e8")
version("7.1.1-11", sha256="98bb2783da7d5b06e7543529bd07b50d034fba611ff15e8817a0f4f73957d934")
- version("7.0.8-7", sha256="fadb36b59f310e9eee5249ecb2326b323a64da6cc716dd6d08ece8ea2c780b81")
- version("7.0.5-9", sha256="b85b269e0ed1628e88e840053823f8a33c314b2271f04762f43d33e9d0b4d264")
- version("7.0.2-7", sha256="f2f18a97f861c1668befdaff0cc3aaafb2111847aab028a88b4c2cb017acfbaa")
- version("7.0.2-6", sha256="7d49ca8030f895c683cae69c52d8edfc4876de651f5b8bfdbea907e222480bd3")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-34153
+ version(
+ "7.1.0-62", sha256="d282117bc6d0e91ad1ad685d096623b96ed8e229f911c891d83277b350ef884a"
+ )
+ version(
+ "7.1.0-60", sha256="94424cc13c5ba18e0e5d5badb834ce74eab11207b00ea32c1f533a5e34c85887"
+ )
+ version(
+ "7.0.11-14", sha256="dfa5aa3f7f289f12c2f9ee6c7c19b02ae857b4eec02f40298f60f5c11048a016"
+ )
+ version(
+ "7.0.10-62", sha256="84442158aea070095efa832cfe868fd99d6befdf609444f0c9e9f1b4f25480cd"
+ )
+ version(
+ "7.0.9-27", sha256="aeea7768bf330d87efa80fa89f03c5acc2382eae32d1d871acb813e5b116395a"
+ )
+ version(
+ "7.0.8-7", sha256="fadb36b59f310e9eee5249ecb2326b323a64da6cc716dd6d08ece8ea2c780b81"
+ )
+ version(
+ "7.0.5-9", sha256="b85b269e0ed1628e88e840053823f8a33c314b2271f04762f43d33e9d0b4d264"
+ )
+ version(
+ "7.0.2-7", sha256="f2f18a97f861c1668befdaff0cc3aaafb2111847aab028a88b4c2cb017acfbaa"
+ )
+ version(
+ "7.0.2-6", sha256="7d49ca8030f895c683cae69c52d8edfc4876de651f5b8bfdbea907e222480bd3"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("ghostscript", default=False, description="Compile with Ghostscript support")
+ variant("rsvg", default=False, description="Enable RSVG support")
+
+ depends_on("pkgconfig@0.20:", type="build")
+ depends_on("fontconfig@2.1:")
+ depends_on("freetype@2.8:")
depends_on("jpeg")
- depends_on("pango")
- depends_on("libtool", type="build")
- depends_on("libtool", when="@7.0.8:", type=("build", "link"))
- depends_on("libpng")
- depends_on("freetype")
- depends_on("fontconfig")
- depends_on("libtiff")
+ depends_on("pango@1.28.1:")
+ depends_on("libpng@1:")
+ depends_on("librsvg@2.9:", when="+rsvg")
+ depends_on("libtiff@4:")
depends_on("ghostscript", when="+ghostscript")
depends_on("ghostscript-fonts", when="+ghostscript")
- depends_on("libsm")
- depends_on("pkgconfig", type="build")
+
+ depends_on("libsm", when="@:7.1.0-60 platform=linux")
def configure_args(self):
args = []
@@ -45,6 +77,7 @@ class Imagemagick(AutotoolsPackage):
args.append("--with-gs-font-dir={0}".format(gs_font_dir))
else:
args.append("--without-gslib")
+ args.extend(self.with_or_without("rsvg"))
return args
@property
diff --git a/var/spack/repos/builtin/packages/imake/package.py b/var/spack/repos/builtin/packages/imake/package.py
index f209554cd3..7749f3efa8 100644
--- a/var/spack/repos/builtin/packages/imake/package.py
+++ b/var/spack/repos/builtin/packages/imake/package.py
@@ -9,20 +9,23 @@ from spack.package import *
class Imake(AutotoolsPackage, XorgPackage):
"""The imake build system."""
- homepage = "http://www.snake.net/software/imake-stuff/"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/imake"
xorg_mirror_path = "util/imake-1.0.7.tar.gz"
license("custom")
+ version("1.0.10", sha256="9bbe76b6bb39caf34a437f50010f58a13d7dd6d512e00e765a2b7883e6ae613c")
version("1.0.9", sha256="ca53ad18c683091490596d72fee8dbee4c6ddb7693709e25f26da140d29687c1")
version("1.0.7", sha256="6bda266a07eb33445d513f1e3c82a61e4822ccb94d420643d58e1be5f881e5cb")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xproto", type="build")
depends_on("xorg-cf-files", type="run")
depends_on("pkgconfig", type="build")
def configure_args(self):
args = []
cfgdir = self.spec["xorg-cf-files"].prefix.lib.X11.config
- args.append("--with-config-dir={0}".format(cfgdir))
+ args.append(f"--with-config-dir={cfgdir}")
return args
diff --git a/var/spack/repos/builtin/packages/imath/package.py b/var/spack/repos/builtin/packages/imath/package.py
index 1937e754fa..b61a2db681 100644
--- a/var/spack/repos/builtin/packages/imath/package.py
+++ b/var/spack/repos/builtin/packages/imath/package.py
@@ -17,8 +17,12 @@ class Imath(CMakePackage):
license("BSD-3-Clause")
+ version("3.1.11", sha256="9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063")
version("3.1.9", sha256="f1d8aacd46afed958babfced3190d2d3c8209b66da451f556abd6da94c165cf3")
version("3.1.7", sha256="bff1fa140f4af0e7f02c6cb78d41b9a7d5508e6bcdfda3a583e35460eb6d4b47")
version("3.1.5", sha256="1e9c7c94797cf7b7e61908aed1f80a331088cc7d8873318f70376e4aed5f25fb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.12:", type="build")
diff --git a/var/spack/repos/builtin/packages/imgui/package.py b/var/spack/repos/builtin/packages/imgui/package.py
index c233e4abe9..4824937cdd 100644
--- a/var/spack/repos/builtin/packages/imgui/package.py
+++ b/var/spack/repos/builtin/packages/imgui/package.py
@@ -18,8 +18,12 @@ class Imgui(Package):
license("MIT")
+ version("1.90.6", sha256="70b4b05ac0938e82b4d5b8d59480d3e2ca63ca570dfb88c55023831f387237ad")
version("1.85", sha256="7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
# No specific build process is required.
# You can add the .cpp files to your existing project.
diff --git a/var/spack/repos/builtin/packages/imlib2/package.py b/var/spack/repos/builtin/packages/imlib2/package.py
index d77907c81b..60530a35aa 100644
--- a/var/spack/repos/builtin/packages/imlib2/package.py
+++ b/var/spack/repos/builtin/packages/imlib2/package.py
@@ -24,6 +24,8 @@ class Imlib2(AutotoolsPackage, SourceforgePackage):
version("1.6.0", sha256="cfc440ddfaed5fc85ba2572ad8d87a87cd77a5bffb33ebca882c42cefcd8691d")
version("1.5.1", sha256="fa4e57452b8843f4a70f70fd435c746ae2ace813250f8c65f977db5d7914baae")
+ depends_on("c", type="build") # generated
+
depends_on("libtiff")
depends_on("giflib")
depends_on("bzip2")
diff --git a/var/spack/repos/builtin/packages/imp/package.py b/var/spack/repos/builtin/packages/imp/package.py
index e8af0247af..9a78845cc6 100644
--- a/var/spack/repos/builtin/packages/imp/package.py
+++ b/var/spack/repos/builtin/packages/imp/package.py
@@ -17,6 +17,9 @@ class Imp(CMakePackage):
version("2.8.0", sha256="0b46b8988febd7cdfc5838849007f9a547493ed4b6c752fe54571467eeb1acd2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:")
depends_on("swig")
depends_on("boost@1.40:")
diff --git a/var/spack/repos/builtin/packages/impalajit/package.py b/var/spack/repos/builtin/packages/impalajit/package.py
index ad823160d1..fb2bcf2852 100644
--- a/var/spack/repos/builtin/packages/impalajit/package.py
+++ b/var/spack/repos/builtin/packages/impalajit/package.py
@@ -27,6 +27,10 @@ class Impalajit(CMakePackage):
version("llvm", git="https://github.com/ravil-mobile/ImpalaJIT.git", branch="dev")
version("llvm-1.0.0", git="https://github.com/ravil-mobile/ImpalaJIT.git", tag="v1.0.0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
maintainers("ravil-mobile", "Thomas-Ulrich")
variant("shared", default=True, description="build as a shared library")
@@ -42,7 +46,6 @@ class Impalajit(CMakePackage):
args.append(self.define_from_variant("SHARED_LIB", "shared"))
args.append(self.define("TESTS", self.run_tests))
- if self.compiler != "intel":
+ if not self.spec.satisfies("%intel"):
args.append("-DINTEL_COMPILER=OFF")
-
return args
diff --git a/var/spack/repos/builtin/packages/improved-rdock/package.py b/var/spack/repos/builtin/packages/improved-rdock/package.py
index 3f78946a24..1adef52b67 100644
--- a/var/spack/repos/builtin/packages/improved-rdock/package.py
+++ b/var/spack/repos/builtin/packages/improved-rdock/package.py
@@ -23,6 +23,8 @@ class ImprovedRdock(MakefilePackage):
version("main", branch="main")
+ depends_on("cxx", type="build") # generated
+
depends_on("popt")
depends_on("cppunit")
depends_on("openbabel @3.0.0: +python", type="run")
@@ -61,33 +63,41 @@ class ImprovedRdock(MakefilePackage):
def setup_run_environment(self, env):
env.set("RBT_ROOT", self.prefix)
- def test(self):
+ def test_rdock(self):
+ """improved-rdock test suite"""
copy(join_path(self.prefix.example, "1sj0", "*"), ".")
- opts = ["-r", "1sj0_rdock.prm", "-was"]
- self.run_test("rbcavity", options=opts)
-
- mpiexe = self.spec["mpi"].prefix.bin.mpirun
- opts = [
- self.prefix.bin.rbdock,
- "-r",
- "1sj0_rdock.prm",
- "-p",
- "dock.prm",
- "-n",
- "100",
- "-i",
- "1sj0_ligand.sd",
- "-o",
- "1sj0_docking_out",
- "-s",
- "1",
- ]
- self.run_test(str(mpiexe), options=opts)
-
- opts = [join_path(self.test_suite.current_test_data_dir, "test.sh")]
- self.run_test("bash", options=opts)
-
- pythonexe = self.spec["python"].command.path
- opts = [self.spec.prefix.bin.sdrmsd, "1sj0_ligand.sd", "1sj0_docking_out_sorted.sd"]
- expected = ["1\t0.55", "100\t7.91"]
- self.run_test(pythonexe, options=opts, expected=expected)
+
+ with test_part(self, "test_rdock_rbcavity", purpose="Check rbcavity"):
+ rbcavity = which("rbcavity")
+ rbcavity("-r", "1sj0_rdock.prm", "-was")
+
+ with test_part(self, "test_rdock_rbdock", purpose="Use mpirun to run rbdock in parallel"):
+ mpiexe = which(str(self.spec["mpi"].prefix.bin.mpirun))
+ opts = [
+ self.prefix.bin.rbdock,
+ "-r",
+ "1sj0_rdock.prm",
+ "-p",
+ "dock.prm",
+ "-n",
+ "100",
+ "-i",
+ "1sj0_ligand.sd",
+ "-o",
+ "1sj0_docking_out",
+ "-s",
+ "1",
+ ]
+ mpiexe(*opts)
+
+ with test_part(self, "test_rdock_test_sh", purpose="Sort the output"):
+ bash = which("bash")
+ opts = [join_path(self.test_suite.current_test_data_dir, "test.sh")]
+ bash(*opts)
+
+ with test_part(self, "test_rdock_sdrmsd", purpose="Check sdrmsd calculations"):
+ pythonexe = which(str(self.spec["python"].command.path))
+ opts = [self.spec.prefix.bin.sdrmsd, "1sj0_ligand.sd", "1sj0_docking_out_sorted.sd"]
+ expected = ["1\t0.55", "100\t7.91"]
+ out = pythonexe(*opts, out=str.split, error=str.split)
+ check_outputs(expected, out)
diff --git a/var/spack/repos/builtin/packages/infernal/package.py b/var/spack/repos/builtin/packages/infernal/package.py
index a69ca987b2..d5dda6d05e 100644
--- a/var/spack/repos/builtin/packages/infernal/package.py
+++ b/var/spack/repos/builtin/packages/infernal/package.py
@@ -15,20 +15,28 @@ class Infernal(AutotoolsPackage):
homepage = "http://eddylab.org/infernal/"
url = "http://eddylab.org/infernal/infernal-1.1.2.tar.gz"
+ version("1.1.5", sha256="ad4ddae02f924ca7c85bc8c4a79c9f875af8df96aeb726702fa985cbe752497f")
version("1.1.4", sha256="f9493c7dee9fbf25f6405706818883d24b9f5e455121a0662c96c8f0307f95fc")
version("1.1.3", sha256="3b98a6a3a0e7b01aa077a0caf1e958223c4d8f80a69a4eb602ca59a3475da85e")
version("1.1.2", sha256="ac8c24f484205cfb7124c38d6dc638a28f2b9035b9433efec5dc753c7e84226b")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI parallel support")
depends_on("mpi", when="+mpi")
+ # v1.1.4 and below do not build on aarch64
# https://github.com/EddyRivasLab/infernal/issues/30
- conflicts("target=aarch64:", msg="infernal is only available for x86_64 and PowerPC")
+ conflicts(
+ "target=aarch64:",
+ when="@:1.1.4",
+ msg="infernal v1.1.4 and below are only available for x86_64 and PowerPC",
+ )
def configure_args(self):
args = []
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
args.append("--enable-mpi")
else:
args.append("--disable-mpi")
diff --git a/var/spack/repos/builtin/packages/iniparser/package.py b/var/spack/repos/builtin/packages/iniparser/package.py
index ba99ed31bc..b5be9e4e68 100644
--- a/var/spack/repos/builtin/packages/iniparser/package.py
+++ b/var/spack/repos/builtin/packages/iniparser/package.py
@@ -15,11 +15,14 @@ class Iniparser(MakefilePackage):
license("MIT")
+ version("4.2", sha256="dbcbaf3aedb4f88a9fc0df4b315737ddd10e6c37918e3d89f0ecc475333bde4d")
version("4.1", sha256="960daa800dd31d70ba1bacf3ea2d22e8ddfc2906534bf328319495966443f3ae")
version("4.0", sha256="e0bbd664bb3f0d64c21ac2d67a843b1c7a3a9710e96393344d170ab8b33e92ba")
version("3.2", sha256="4a60b8e29d33d24b458749404e1ff2bcbfedd53ad800757daeed7955599fdce4")
version("3.1", sha256="73b88632dc16c2839f5d9ac7e6ec7a41415a68e590f75d0580b302af4a5d821d")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.include)
mkdirp(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/intel-daal/package.py b/var/spack/repos/builtin/packages/intel-daal/package.py
deleted file mode 100644
index f992c40cba..0000000000
--- a/var/spack/repos/builtin/packages/intel-daal/package.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-@IntelOneApiPackage.update_description
-class IntelDaal(IntelPackage):
- """Intel Data Analytics Acceleration Library. This package has been
- replace by intel-oneapi-dal.
-
- """
-
- maintainers("rscohn2")
-
- homepage = "https://software.intel.com/en-us/daal"
-
- version(
- "2020.2.254",
- sha256="08528bc150dad312ff2ae88ce12d6078ed8ba2f378f4bf3daf0fbbb9657dce1e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16822/l_daal_2020.2.254.tgz",
- deprecated=True,
- )
- version(
- "2020.1.217",
- sha256="3f84dea0ce1038ac1b9c25b3e2c02e9fac440fa36cc8adfce69edfc06fe0edda",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16536/l_daal_2020.1.217.tgz",
- deprecated=True,
- )
- version(
- "2020.0.166",
- sha256="695166c9ab32ac5d3006d6d35162db3c98734210507144e315ed7c3b7dbca9c1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16234/l_daal_2020.0.166.tgz",
- deprecated=True,
- )
- version(
- "2019.5.281",
- sha256="e92aaedbe35c9daf1c9483260cb2363da8a85fa1aa5566eb38cf4b1f410bc368",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15818/l_daal_2019.5.281.tgz",
- deprecated=True,
- )
- version(
- "2019.4.243",
- sha256="c74486a555ca5636c2ac1b060d5424726c022468f3ee0898bb46e333cda6f7b8",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15552/l_daal_2019.4.243.tgz",
- deprecated=True,
- )
- version(
- "2019.3.199",
- sha256="1f7d9cdecc1091b03f1ee6303fc7566179d1e3f1813a98ef7a6239f7d456b8ef",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15277/l_daal_2019.3.199.tgz",
- deprecated=True,
- )
- version(
- "2019.2.187",
- sha256="2982886347e9376e892a5c4e22fa1d4b7b843e1ae988a107dd2d0a639f257765",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15097/l_daal_2019.2.187.tgz",
- deprecated=True,
- )
- version(
- "2019.1.144",
- sha256="1672afac568c93e185283cf7e044d511381092ebc95d7204c4dccb83cc493197",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14869/l_daal_2019.1.144.tgz",
- deprecated=True,
- )
- version(
- "2019.0.117",
- sha256="85ac8e983bc9b9cc635e87cb4ec775ffd3695e44275d20fdaf53c19ed280d69f",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13577/l_daal_2019.0.117.tgz",
- deprecated=True,
- )
- version(
- "2018.3.222",
- sha256="378fec529a36508dd97529037e1164ff98e0e062a9a47ede99ccf9e91493d1e2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13007/l_daal_2018.3.222.tgz",
- deprecated=True,
- )
- version(
- "2018.2.199",
- sha256="cee30299b3ffaea515f5a9609f4df0f644579c8a1ba2b61747b390f6caf85b14",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12727/l_daal_2018.2.199.tgz",
- deprecated=True,
- )
- version(
- "2018.1.163",
- sha256="ac96b5a6c137cda18817d9b3505975863f8f53347225ebb6ccdaaf4bdb8dc349",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12414/l_daal_2018.1.163.tgz",
- deprecated=True,
- )
- version(
- "2018.0.128",
- sha256="d13a7cd1b6779971f2ba46797447de9409c98a4d2f0eb0dc9622d9d63ac8990f",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12072/l_daal_2018.0.128.tgz",
- deprecated=True,
- )
- version(
- "2017.4.239",
- sha256="cc4b608f59f3b2fafee16389102a763d27c46f6d136a6cfa89847418a8ea7460",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12148/l_daal_2017.4.239.tgz",
- deprecated=True,
- )
- version(
- "2017.3.196",
- sha256="cfa863f342dd1c5fe8f1c7b6fd69589140370fc92742a19d82c8594e4e1e46ce",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11546/l_daal_2017.3.196.tgz",
- deprecated=True,
- )
- version(
- "2017.2.174",
- sha256="5ee838b08d4cda7fc3e006e1deeed41671cbd7cfd11b64ec3b762c94dfc2b660",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11308/l_daal_2017.2.174.tgz",
- deprecated=True,
- )
- version(
- "2017.1.132",
- sha256="6281105d3947fc2860e67401ea0218198cc4753fd2d4b513528a89143248e4f3",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10983/l_daal_2017.1.132.tgz",
- deprecated=True,
- )
- version(
- "2017.0.098",
- sha256="a7064425653b4f5f0fe51e25358d267d8ae023179eece61e08da891b67d79fe5",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9664/l_daal_2017.0.098.tgz",
- deprecated=True,
- )
- version(
- "2016.3.210",
- sha256="367eaef21ea0143c11ae3fd56cd2a05315768c059e14caa15894bcf96853687c",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9099/l_daal_2016.3.210.tgz",
- deprecated=True,
- )
- version(
- "2016.2.181",
- sha256="afdb65768957784d28ac537b4933a86eb4193c68a636157caed17b29ccdbfacb",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8687/l_daal_2016.2.181.tgz",
- deprecated=True,
- )
-
- provides("daal")
diff --git a/var/spack/repos/builtin/packages/intel-gpu-tools/package.py b/var/spack/repos/builtin/packages/intel-gpu-tools/package.py
index afef3bc25f..efb78e1563 100644
--- a/var/spack/repos/builtin/packages/intel-gpu-tools/package.py
+++ b/var/spack/repos/builtin/packages/intel-gpu-tools/package.py
@@ -24,6 +24,8 @@ class IntelGpuTools(AutotoolsPackage, XorgPackage):
version("1.20", sha256="c6ee992301e43ec14ef810ef532e2601ecf7399315f942207ae0dd568fd9c2b7")
version("1.16", sha256="4874e6e7704c8d315deaf5b44cc9467ea5e502c7f816470a4a28827fcb34643f")
+ depends_on("c", type="build") # generated
+
depends_on("libdrm@2.4.64:")
depends_on("libpciaccess@0.10:", when=(sys.platform != "darwin"))
depends_on("libunwind")
diff --git a/var/spack/repos/builtin/packages/intel-gtpin/package.py b/var/spack/repos/builtin/packages/intel-gtpin/package.py
index 77d03e3c99..d082e4fb17 100644
--- a/var/spack/repos/builtin/packages/intel-gtpin/package.py
+++ b/var/spack/repos/builtin/packages/intel-gtpin/package.py
@@ -39,6 +39,24 @@ class IntelGtpin(Package):
license("MIT")
version(
+ "4.0",
+ sha256="fc12fb3aefdd4ae75b21ef9325e4058439dace52501200900895240c6ef3f0d8",
+ url="https://downloadmirror.intel.com/816037/external-release-gtpin-4.0-linux.tar.xz",
+ )
+
+ version(
+ "3.7",
+ sha256="366edb46369a67bdbaea3c11ad5bf9a9ead5a7234efb780a27dffd70d1150c39",
+ url="https://downloadmirror.intel.com/793592/external-release-gtpin-3.7-linux.tar.xz",
+ )
+
+ version(
+ "3.4",
+ sha256="c96d08a2729c255e3bc67372fc1271ba60ca8d7bd913f92c2bd951d7d348f553",
+ url="https://downloadmirror.intel.com/777295/external-release-gtpin-3.4-linux.tar.xz",
+ )
+
+ version(
"3.2.2",
sha256="6c51b08451935ed8c86778d197e2ff36d4b91883f41292968ff413b53ac8910a",
url="https://downloadmirror.intel.com/762747/external-release-gtpin-3.2.2-linux.tar.xz",
@@ -72,10 +90,13 @@ class IntelGtpin(Package):
url="https://downloadmirror.intel.com/682779/external-gtpin-2.11.4-linux.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("patchelf", type="build")
- # Gtpin only runs on linux/cray x86_64.
- conflicts("platform=darwin", msg="intel-gtpin only runs on linux/cray")
+ # Gtpin only runs on linux x86_64.
+ conflicts("platform=darwin", msg="intel-gtpin only runs on linux")
conflicts("target=ppc64:", msg="intel-gtpin only runs on x86_64")
conflicts("target=ppc64le:", msg="intel-gtpin only runs on x86_64")
conflicts("target=aarch64:", msg="intel-gtpin only runs on x86_64")
diff --git a/var/spack/repos/builtin/packages/intel-ipp/package.py b/var/spack/repos/builtin/packages/intel-ipp/package.py
deleted file mode 100644
index ef7d4ed83d..0000000000
--- a/var/spack/repos/builtin/packages/intel-ipp/package.py
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-@IntelOneApiPackage.update_description
-class IntelIpp(IntelPackage):
- """Intel Integrated Performance Primitives. This package has been
- replaced by intel-oneapi-ipp.
-
- """
-
- maintainers("rscohn2")
-
- homepage = "https://software.intel.com/en-us/intel-ipp"
-
- version(
- "2020.2.254",
- sha256="18266ad1eec9b5b17e76da24f1aa9a9147300e5bd345e6bdad58d7187392fa77",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16846/l_ipp_2020.2.254.tgz",
- deprecated=True,
- )
- version(
- "2020.1.217",
- sha256="0bf8ac7e635e7e602cf201063a1a7dea3779b093104563fdb15e6b7ecf2f00a7",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16534/l_ipp_2020.1.217.tgz",
- deprecated=True,
- )
- version(
- "2020.0.166",
- sha256="6844007892ba524e828f245355cee44e8149f4c233abbbea16f7bb55a7d6ecff",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16233/l_ipp_2020.0.166.tgz",
- deprecated=True,
- )
- version(
- "2019.5.281",
- sha256="61d1e1da1a4a50f1cf02a3ed44e87eed05e94d58b64ef1e67a3bdec363bee713",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15817/l_ipp_2019.5.281.tgz",
- deprecated=True,
- )
- version(
- "2019.4.243",
- sha256="d4f4232323e66b010d8440c75189aeb6a3249966e05035242b21982238a7a7f2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15541/l_ipp_2019.4.243.tgz",
- deprecated=True,
- )
- version(
- "2019.3.199",
- sha256="02545383206c1ae4dd66bfa6a38e2e14480ba11932eeed632df8ab798aa15ccd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15276/l_ipp_2019.3.199.tgz",
- deprecated=True,
- )
- version(
- "2019.2.187",
- sha256="280e9081278a0db3892fe82474c1201ec780a6f7c8d1f896494867f4b3bd8421",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15096/l_ipp_2019.2.187.tgz",
- deprecated=True,
- )
- version(
- "2019.1.144",
- sha256="1eb7cd0fba74615aeafa4e314c645414497eb73f1705200c524fe78f00620db3",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14887/l_ipp_2019.1.144.tgz",
- deprecated=True,
- )
- version(
- "2019.0.117",
- sha256="d552ba49fba58f0e94da2048176f21c5dfd490dca7c5ce666dfc2d18db7fd551",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13576/l_ipp_2019.0.117.tgz",
- deprecated=True,
- )
- version(
- "2018.4.274",
- sha256="bdc6082c65410c98ccf6daf239e0a6625d15ec5e0ddc1c0563aad42b6ba9063c",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13726/l_ipp_2018.4.274.tgz",
- deprecated=True,
- )
- version(
- "2018.3.222",
- sha256="bb783c5e6220e240f19136ae598cd1c1d647496495139ce680de58d3d5496934",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13006/l_ipp_2018.3.222.tgz",
- deprecated=True,
- )
- version(
- "2018.2.199",
- sha256="55cb5c910b2c1e2bd798163fb5019b992b1259a0692e328bb9054778cf01562b",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12726/l_ipp_2018.2.199.tgz",
- deprecated=True,
- )
- version(
- "2018.0.128",
- sha256="da568ceec1b7acbcc8f666b73d4092788b037b1b03c0436974b82155056ed166",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12071/l_ipp_2018.0.128.tgz",
- deprecated=True,
- )
- version(
- "2017.3.196",
- sha256="50d49a1000a88a8a58bd610466e90ae28d07a70993a78cbbf85d44d27c4232b6",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11545/l_ipp_2017.3.196.tgz",
- deprecated=True,
- )
- version(
- "2017.2.174",
- sha256="92f866c9dce8503d7e04223ec35f281cfeb0b81cf94208c3becb11aacfda7b99",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11307/l_ipp_2017.2.174.tgz",
- deprecated=True,
- )
- version(
- "2017.1.132",
- sha256="2908bdeab3057d4ebcaa0b8ff5b00eb47425d35961a96f14780be68554d95376",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11031/l_ipp_2017.1.132.tgz",
- deprecated=True,
- )
- version(
- "2017.0.098",
- sha256="7633d16e2578be64533892336c8a15c905139147b0f74eaf9f281358ad7cdcba",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9663/l_ipp_2017.0.098.tgz",
- deprecated=True,
- )
- # built from parallel_studio_xe_2016.3.067
- version(
- "9.0.3.210",
- sha256="8ce7bf17f4a0bbf8c441063de26be7f6e0f6179789e23f24eaa8b712632b3cdd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9067/l_ipp_9.0.3.210.tgz",
- deprecated=True,
- )
-
- provides("ipp")
diff --git a/var/spack/repos/builtin/packages/intel-llvm/package.py b/var/spack/repos/builtin/packages/intel-llvm/package.py
index 630e2df996..c87b61c5e6 100644
--- a/var/spack/repos/builtin/packages/intel-llvm/package.py
+++ b/var/spack/repos/builtin/packages/intel-llvm/package.py
@@ -14,12 +14,14 @@ class IntelLlvm(CMakePackage):
homepage = "https://github.com/intel/llvm"
git = "https://github.com/intel/llvm.git"
- family = "compiler"
-
license("Apache-2.0")
version("sycl", branch="sycl")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.4.3:", type="build")
# It doesn't seem possible to use != in a conflicts statement
@@ -30,7 +32,7 @@ class IntelLlvm(CMakePackage):
env.append_flags("CXXFLAGS", self.compiler.cxx11_flag)
def setup_run_environment(self, env):
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
env.set("CC", join_path(self.spec.prefix.bin, "clang"))
env.set("CXX", join_path(self.spec.prefix.bin, "clang++"))
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
index 7653d676f1..91bbcd5e76 100644
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -22,141 +22,141 @@ class IntelMkl(IntelPackage):
version(
"2020.4.304",
sha256="2314d46536974dbd08f2a4e4f9e9a155dc7e79e2798c74e7ddfaad00a5917ea5",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16917/l_mkl_2020.4.304.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16917/l_mkl_2020.4.304.tgz",
deprecated=True,
)
version(
"2020.3.279",
sha256="2b8e434ecc9462491130ba25a053927fd1a2eca05e12acb5936b08c486857a04",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16903/l_mkl_2020.3.279.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16903/l_mkl_2020.3.279.tgz",
deprecated=True,
)
version(
"2020.2.254",
sha256="ed00a267af362a6c14212bd259ab1673d64337e077263033edeef8ac72c10223",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16849/l_mkl_2020.2.254.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16849/l_mkl_2020.2.254.tgz",
deprecated=True,
)
version(
"2020.1.217",
sha256="082a4be30bf4f6998e4d6e3da815a77560a5e66a68e254d161ab96f07086066d",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16533/l_mkl_2020.1.217.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16533/l_mkl_2020.1.217.tgz",
deprecated=True,
)
version(
"2020.0.166",
sha256="f6d92deb3ff10b11ba3df26b2c62bb4f0f7ae43e21905a91d553e58f0f5a8ae0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16232/l_mkl_2020.0.166.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16232/l_mkl_2020.0.166.tgz",
deprecated=True,
)
version(
"2019.5.281",
sha256="9995ea4469b05360d509c9705e9309dc983c0a10edc2ae3a5384bc837326737e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15816/l_mkl_2019.5.281.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15816/l_mkl_2019.5.281.tgz",
deprecated=True,
)
version(
"2019.4.243",
sha256="fcac7b0369665d93f0c4dd98afe2816aeba5410e2b760655fe55fc477f8f33d0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15540/l_mkl_2019.4.243.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15540/l_mkl_2019.4.243.tgz",
deprecated=True,
)
version(
"2019.3.199",
sha256="06de2b54f4812e7c39a118536259c942029fe1d6d8918ad9df558a83c4162b8f",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15275/l_mkl_2019.3.199.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15275/l_mkl_2019.3.199.tgz",
deprecated=True,
)
version(
"2019.2.187",
sha256="2bf004e6b5adb4f956993d6c20ea6ce289bb630314dd501db7f2dd5b9978ed1d",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15095/l_mkl_2019.2.187.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15095/l_mkl_2019.2.187.tgz",
deprecated=True,
)
version(
"2019.1.144",
sha256="5205a460a9c685f7a442868367389b2d0c25e1455346bc6a37c5b8ff90a20fbb",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14895/l_mkl_2019.1.144.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14895/l_mkl_2019.1.144.tgz",
deprecated=True,
)
version(
"2019.0.117",
sha256="4e1fe2c705cfc47050064c0d6c4dee1a8c6740ac1c4f64dde9c7511c4989c7ad",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13575/l_mkl_2019.0.117.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13575/l_mkl_2019.0.117.tgz",
deprecated=True,
)
version(
"2018.4.274",
sha256="18eb3cde3e6a61a88f25afff25df762a560013f650aaf363f7d3d516a0d04881",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13725/l_mkl_2018.4.274.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13725/l_mkl_2018.4.274.tgz",
deprecated=True,
)
version(
"2018.3.222",
sha256="108d59c0927e58ce8c314db6c2b48ee331c3798f7102725f425d6884eb6ed241",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13005/l_mkl_2018.3.222.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13005/l_mkl_2018.3.222.tgz",
deprecated=True,
)
version(
"2018.2.199",
sha256="e28d12173bef9e615b0ded2f95f59a42b3e9ad0afa713a79f8801da2bfb31936",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12725/l_mkl_2018.2.199.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12725/l_mkl_2018.2.199.tgz",
deprecated=True,
)
version(
"2018.1.163",
sha256="f6dc263fc6f3c350979740a13de1b1e8745d9ba0d0f067ece503483b9189c2ca",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12414/l_mkl_2018.1.163.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12414/l_mkl_2018.1.163.tgz",
deprecated=True,
)
version(
"2018.0.128",
sha256="c368baa40ca88057292512534d7fad59fa24aef06da038ea0248e7cd1e280cec",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12070/l_mkl_2018.0.128.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12070/l_mkl_2018.0.128.tgz",
deprecated=True,
)
version(
"2017.4.239",
sha256="dcac591ed1e95bd72357fd778edba215a7eab9c6993236373231cc16c200c92a",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12147/l_mkl_2017.4.239.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12147/l_mkl_2017.4.239.tgz",
deprecated=True,
)
version(
"2017.3.196",
sha256="fd7295870fa164d6138c9818304f25f2bb263c814a6c6539c9fe4e104055f1ca",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11544/l_mkl_2017.3.196.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11544/l_mkl_2017.3.196.tgz",
deprecated=True,
)
version(
"2017.2.174",
sha256="0b8a3fd6bc254c3c3d9d51acf047468c7f32bf0baff22aa1e064d16d9fea389f",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11306/l_mkl_2017.2.174.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11306/l_mkl_2017.2.174.tgz",
deprecated=True,
)
version(
"2017.1.132",
sha256="8c6bbeac99326d59ef3afdc2a95308c317067efdaae50240d2f4a61f37622e69",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11024/l_mkl_2017.1.132.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11024/l_mkl_2017.1.132.tgz",
deprecated=True,
)
version(
"2017.0.098",
sha256="f2233e8e011f461d9c15a853edf7ed0ae8849aa665a1ec765c1ff196fd70c4d9",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9662/l_mkl_2017.0.098.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9662/l_mkl_2017.0.098.tgz",
deprecated=True,
)
# built from parallel_studio_xe_2016.3.x
version(
"11.3.3.210",
sha256="ff858f0951fd698e9fb30147ea25a8a810c57f0126c8457b3b0cdf625ea43372",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9068/l_mkl_11.3.3.210.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9068/l_mkl_11.3.3.210.tgz",
deprecated=True,
)
# built from parallel_studio_xe_2016.2.062
version(
"11.3.2.181",
sha256="bac04a07a1fe2ae4996a67d1439ee90c54f31305e8663d1ccfce043bed84fc27",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8711/l_mkl_11.3.2.181.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8711/l_mkl_11.3.2.181.tgz",
deprecated=True,
)
diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
index 764394ea1f..1ed9b1ce15 100644
--- a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
@@ -40,6 +40,9 @@ class IntelMpiBenchmarks(MakefilePackage):
version("2018.1", sha256="718a4eb155f18cf15a736f6496332407b5837cf1f19831723d4cfe5266c43507")
version("2018.0", sha256="2e60a9894a686a95791be2227bc569bf81ca3875421b5307df7d83f885b1de88")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi", when="@2019:")
depends_on("intel-mpi", when="@2018")
depends_on("gmake", type="build", when="@2018")
@@ -95,25 +98,25 @@ class IntelMpiBenchmarks(MakefilePackage):
def build_targets(self):
spec = self.spec
targets = []
- if "+mpi1" in spec:
+ if spec.satisfies("+mpi1"):
targets.append("MPI1")
- if "+ext" in spec:
+ if spec.satisfies("+ext"):
targets.append("EXT")
- if "+io" in spec:
+ if spec.satisfies("+io"):
targets.append("IO")
- if "+nbc" in spec:
+ if spec.satisfies("+nbc"):
targets.append("NBC")
- if "+p2p" in spec:
+ if spec.satisfies("+p2p"):
targets.append("P2P")
- if "+rma" in spec:
+ if spec.satisfies("+rma"):
targets.append("RMA")
- if "+mt" in spec:
+ if spec.satisfies("+mt"):
targets.append("MT")
if spec.satisfies("@2019:"):
targets = ["TARGET=" + target for target in targets]
- if "+check" in spec:
+ if spec.satisfies("+check"):
targets.append("CPPFLAGS=-DCHECK")
return targets
@@ -126,17 +129,17 @@ class IntelMpiBenchmarks(MakefilePackage):
mkdir(prefix.bin)
with working_dir(self.build_directory):
- if "+mpi1" in spec:
+ if spec.satisfies("+mpi1"):
install("IMB-MPI1", prefix.bin)
- if "+ext" in spec:
+ if spec.satisfies("+ext"):
install("IMB-EXT", prefix.bin)
- if "+io" in spec:
+ if spec.satisfies("+io"):
install("IMB-IO", prefix.bin)
- if "+nbc" in spec:
+ if spec.satisfies("+nbc"):
install("IMB-NBC", prefix.bin)
- if "+p2p" in spec:
+ if spec.satisfies("+p2p"):
install("IMB-P2P", prefix.bin)
- if "+rma" in spec:
+ if spec.satisfies("+rma"):
install("IMB-RMA", prefix.bin)
- if "+mt" in spec:
+ if spec.satisfies("+mt"):
install("IMB-MT", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/intel-mpi/package.py b/var/spack/repos/builtin/packages/intel-mpi/package.py
index 9ea647c77a..3e8ce47e9d 100644
--- a/var/spack/repos/builtin/packages/intel-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi/package.py
@@ -17,128 +17,128 @@ class IntelMpi(IntelPackage):
version(
"2019.10.317",
sha256="28e1b615e63d2170a99feedc75e3b0c5a7e1a07dcdaf0a4181831b07817a5346",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17534/l_mpi_2019.10.317.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/17534/l_mpi_2019.10.317.tgz",
deprecated=True,
)
version(
"2019.9.304",
sha256="618a5dc2de54306645e6428c5eb7d267b54b11b5a83dfbcad7d0f9e0d90bb2e7",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/17263/l_mpi_2019.9.304.tgz",
deprecated=True,
)
version(
"2019.8.254",
sha256="fa163b4b79bd1b7509980c3e7ad81b354fc281a92f9cf2469bf4d323899567c0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16814/l_mpi_2019.8.254.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16814/l_mpi_2019.8.254.tgz",
deprecated=True,
)
version(
"2019.7.217",
sha256="90383b0023f84ac003a55d8bb29dbcf0c639f43a25a2d8d8698a16e770ac9c07",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16546/l_mpi_2019.7.217.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16546/l_mpi_2019.7.217.tgz",
deprecated=True,
)
version(
"2019.6.166",
sha256="119be69f1117c93a9e5e9b8b4643918e55d2a55a78ad9567f77d16cdaf18cd6e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16120/l_mpi_2019.6.166.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16120/l_mpi_2019.6.166.tgz",
deprecated=True,
)
version(
"2019.5.281",
sha256="9c59da051f1325b221e5bc4d8b689152e85d019f143069fa39e17989306811f4",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15838/l_mpi_2019.5.281.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15838/l_mpi_2019.5.281.tgz",
deprecated=True,
)
version(
"2019.4.243",
sha256="233a8660b92ecffd89fedd09f408da6ee140f97338c293146c9c080a154c5fcd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15553/l_mpi_2019.4.243.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15553/l_mpi_2019.4.243.tgz",
deprecated=True,
)
version(
"2019.3.199",
sha256="5304346c863f64de797250eeb14f51c5cfc8212ff20813b124f20e7666286990",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15260/l_mpi_2019.3.199.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15260/l_mpi_2019.3.199.tgz",
deprecated=True,
)
version(
"2019.2.187",
sha256="6a3305933b5ef9e3f7de969e394c91620f3fa4bb815a4f439577739d04778b20",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15040/l_mpi_2019.2.187.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15040/l_mpi_2019.2.187.tgz",
deprecated=True,
)
version(
"2019.1.144",
sha256="dac86a5db6b86503313742b17535856a432955604f7103cb4549a9bfc256c3cd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14879/l_mpi_2019.1.144.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14879/l_mpi_2019.1.144.tgz",
deprecated=True,
)
version(
"2019.0.117",
sha256="dfb403f49c1af61b337aa952b71289c7548c3a79c32c57865eab0ea0f0e1bc08",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13584/l_mpi_2019.0.117.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13584/l_mpi_2019.0.117.tgz",
deprecated=True,
)
version(
"2018.4.274",
sha256="a1114b3eb4149c2f108964b83cad02150d619e50032059d119ac4ffc9d5dd8e0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13741/l_mpi_2018.4.274.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13741/l_mpi_2018.4.274.tgz",
deprecated=True,
)
version(
"2018.3.222",
sha256="5021d14b344fc794e89f146e4d53d70184d7048610895d7a6a1e8ac0cf258999",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13112/l_mpi_2018.3.222.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13112/l_mpi_2018.3.222.tgz",
deprecated=True,
)
version(
"2018.2.199",
sha256="0927f1bff90d10974433ba2892e3fd38e6fee5232ab056a9f9decf565e814460",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12748/l_mpi_2018.2.199.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12748/l_mpi_2018.2.199.tgz",
deprecated=True,
)
version(
"2018.1.163",
sha256="130b11571c3f71af00a722fa8641db5a1552ac343d770a8304216d8f5d00e75c",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12414/l_mpi_2018.1.163.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12414/l_mpi_2018.1.163.tgz",
deprecated=True,
)
version(
"2018.0.128",
sha256="debaf2cf80df06db9633dfab6aa82213b84a665a55ee2b0178403906b5090209",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12120/l_mpi_2018.0.128.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12120/l_mpi_2018.0.128.tgz",
deprecated=True,
)
version(
"2017.4.239",
sha256="5a1048d284dce8bc75b45789471c83c94b3c59f8f159cab43d783fc44302510b",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12209/l_mpi_2017.4.239.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12209/l_mpi_2017.4.239.tgz",
deprecated=True,
)
version(
"2017.3.196",
sha256="dad9efbc5bbd3fd27cce7e1e2507ad77f342d5ecc929747ae141c890e7fb87f0",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11595/l_mpi_2017.3.196.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11595/l_mpi_2017.3.196.tgz",
deprecated=True,
)
version(
"2017.2.174",
sha256="106a4b362c13ddc6978715e50f5f81c58c1a4c70cd2d20a99e94947b7e733b88",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11334/l_mpi_2017.2.174.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11334/l_mpi_2017.2.174.tgz",
deprecated=True,
)
version(
"2017.1.132",
sha256="8d30a63674fe05f17b0a908a9f7d54403018bfed2de03c208380b171ab99be82",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11014/l_mpi_2017.1.132.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11014/l_mpi_2017.1.132.tgz",
deprecated=True,
)
# built from parallel_studio_xe_2016.3.068
version(
"5.1.3.223",
sha256="544f4173b09609beba711fa3ba35567397ff3b8390e4f870a3307f819117dd9b",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9278/l_mpi_p_5.1.3.223.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9278/l_mpi_p_5.1.3.223.tgz",
deprecated=True,
)
@@ -150,19 +150,21 @@ class IntelMpi(IntelPackage):
depends_on("libfabric", when="+external-libfabric", type=("build", "link", "run"))
depends_on("cpio", type="build")
- def setup_dependent_build_environment(self, *args):
+ def setup_dependent_build_environment(self, env, dependent_spec):
# Handle in callback, conveying client's compilers in additional arg.
# CAUTION - DUP code in:
# ../intel-mpi/package.py
# ../intel-parallel-studio/package.py
+ dependent_module = dependent_spec.package.module
self._setup_dependent_env_callback(
- *args,
+ env,
+ dependent_spec,
compilers_of_client={
- "CC": spack_cc,
- "CXX": spack_cxx,
- "F77": spack_f77,
- "F90": spack_fc,
- "FC": spack_fc,
+ "CC": dependent_module.spack_cc,
+ "CXX": dependent_module.spack_cxx,
+ "F77": dependent_module.spack_f77,
+ "F90": dependent_module.spack_fc,
+ "FC": dependent_module.spack_fc,
},
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py
index 02587c47f2..354c01f17d 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py
@@ -25,6 +25,42 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk):
)
version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fe95ae4a-3692-4e31-919d-3e7bdf5832f1/intel-advisor-2025.0.0.798_offline.sh",
+ sha256="bf85d4b0bd199a2babdff6b4bd3885ce569a3ad0e992b99b2e14dbb30af88cd4",
+ expand=False,
+ )
+ version(
+ "2024.3.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e36c14f6-6142-44ff-b498-d4ff169cc8b0/l_oneapi_advisor_p_2024.3.0.43_offline.sh",
+ sha256="6d230a0d11b972c4c677e041a6077216de79037376f5776b3b291113e25335be",
+ expand=False,
+ )
+ version(
+ "2024.2.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/65f69c5c-b41f-4688-8a41-ece8f2bbbb5a/l_oneapi_advisor_p_2024.2.1.44_offline.sh",
+ sha256="2ef23dac756dc41bd7021297d3f3248968d7a0e29372e6b19b8752eb8d2e6a61",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/a4c8046c-6abf-4f53-a33c-4a587cd80fc1/l_oneapi_advisor_p_2024.2.0.683_offline.sh",
+ sha256="8a6a8ced2456ea7c538aad01b4e6e0bd41244bcb438f76d4b87af5f63f94a733",
+ expand=False,
+ )
+ version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/414cea14-4f3c-45f0-b854-44fb6cf9f34b/l_oneapi_advisor_p_2024.1.0.500_offline.sh",
+ sha256="1c327777a34a7e70e5840b9555ebf44615bf0295fcf3c673576d36a9a8979090",
+ expand=False,
+ )
+ version(
+ "2024.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2d6b30ed-c7ea-4ad1-b138-91614f8242e8/l_oneapi_advisor_p_2024.0.1.17_offline.sh",
+ sha256="3b34ff2b13737c7e0b7b97ee9544cf0718feab80f2a8e7728e4149e66d09a14a",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/88c5bdaa-7a2d-491f-9871-7170fadc3d52/l_oneapi_advisor_p_2024.0.0.49522_offline.sh",
sha256="0ef3cf39c2fbb39371ac2470dad7d0d8cc0a2709c4f78dcab58d115b446c81c4",
@@ -44,37 +80,37 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19094/l_oneapi_advisor_p_2023.0.0.25338_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19094/l_oneapi_advisor_p_2023.0.0.25338_offline.sh",
sha256="5d8ef163f70ee3dc42b13642f321d974f49915d55914ba1ca9177ed29b100b9d",
expand=False,
)
version(
"2022.3.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18985/l_oneapi_advisor_p_2022.3.1.15323_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18985/l_oneapi_advisor_p_2022.3.1.15323_offline.sh",
sha256="f05b58c2f13972b3ac979e4796bcc12a234b1e077400b5d00fc5df46cd228899",
expand=False,
)
version(
"2022.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18872/l_oneapi_advisor_p_2022.3.0.8704_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18872/l_oneapi_advisor_p_2022.3.0.8704_offline.sh",
sha256="ae1e542e6030b04f70f3b9831b5e92def97ce4692c974da44e7e9d802f25dfa7",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18730/l_oneapi_advisor_p_2022.1.0.171_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18730/l_oneapi_advisor_p_2022.1.0.171_offline.sh",
sha256="b627dbfefa779b44e7ab40dfa37614e56caa6e245feaed402d51826e6a7cb73b",
expand=False,
)
version(
"2022.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18369/l_oneapi_advisor_p_2022.0.0.92_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18369/l_oneapi_advisor_p_2022.0.0.92_offline.sh",
sha256="f1c4317c2222c56fb2e292513f7eec7ec27eb1049d3600cb975bc08ed1477993",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18220/l_oneapi_advisor_p_2021.4.0.389_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18220/l_oneapi_advisor_p_2021.4.0.389_offline.sh",
sha256="dd948f7312629d9975e12a57664f736b8e011de948771b4c05ad444438532be8",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py
index a8f9aac4f6..78f939f16f 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py
@@ -28,6 +28,30 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage):
depends_on("intel-oneapi-mpi")
version(
+ "2021.14.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/88a7a6db-816c-4cd5-993f-821729da5648/intel-oneccl-2021.14.0.506_offline.sh",
+ sha256="2a02ebf10e9b129df8538520b4b343c5ac30350ada6bd1f2bdc9b4ef0f46e165",
+ expand=False,
+ )
+ version(
+ "2021.13.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4b4cf672-c1f9-4bac-97c4-f4ae10a0a020/l_oneapi_ccl_p_2021.13.1.32_offline.sh",
+ sha256="05027a00d3b97754c8ba4ec009901b95e11a88d32c1206ea464ac6ea8b5aa03b",
+ expand=False,
+ )
+ version(
+ "2021.13.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2413acba-2216-4a35-9c74-82694a20d176/l_oneapi_ccl_p_2021.13.0.300_offline.sh",
+ sha256="0cb848fb86b2eec6ed53910f961211c43bab628ada47e5b3d401bfff59942c02",
+ expand=False,
+ )
+ version(
+ "2021.12.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cad4b3be-a272-4ed0-b67a-3871e495cb28/l_oneapi_ccl_p_2021.12.0.311_offline.sh",
+ sha256="77b60a56d02c3700182370698b760cb17c66be700ca98bda1f30b39b9948e375",
+ expand=False,
+ )
+ version(
"2021.11.2",
url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7a2bbe23-9cf2-47a3-945f-fc160b9d868a/l_oneapi_ccl_p_2021.11.2.7_offline.sh",
sha256="095be44ae21348ead46008844667a30da92a0afac305f722777c345394e50a14",
@@ -59,61 +83,61 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage):
)
version(
"2021.8.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19135/l_oneapi_ccl_p_2021.8.0.25371_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19135/l_oneapi_ccl_p_2021.8.0.25371_offline.sh",
sha256="c660405fcc29bddd5bf9371b8e586c597664fb1ae59eb17cb02685cc662db82c",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19029/l_oneapi_ccl_p_2021.7.1.16948_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19029/l_oneapi_ccl_p_2021.7.1.16948_offline.sh",
sha256="daab05a0779db343b600253df8fea93ab0ed20bd630d89883dd651b6b540b1b2",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18891/l_oneapi_ccl_p_2021.7.0.8733_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18891/l_oneapi_ccl_p_2021.7.0.8733_offline.sh",
sha256="a0e64db03868081fe075afce8abf4cb94236effc6c52e5049118cfb2ef81a6c7",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18697/l_oneapi_ccl_p_2021.6.0.568.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18697/l_oneapi_ccl_p_2021.6.0.568.sh",
sha256="e3c50c9cbeb350e8f28488b2e8fee54156116548db8010bb2c2443048715d3ea",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18472/l_oneapi_ccl_p_2021.5.1.494_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18472/l_oneapi_ccl_p_2021.5.1.494_offline.sh",
sha256="237f45d3c43447460e36eb7d68ae3bf611aa282015e57c7fe06c2004d368a68e",
expand=False,
)
version(
"2021.5.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18371/l_oneapi_ccl_p_2021.5.0.478_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18371/l_oneapi_ccl_p_2021.5.0.478_offline.sh",
sha256="47584ad0269fd13bcfbc2cd0bb029bdcc02b723070abcb3d5e57f9586f4e74f8",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18188/l_oneapi_ccl_p_2021.4.0.433_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18188/l_oneapi_ccl_p_2021.4.0.433_offline.sh",
sha256="004031629d97ef99267d8ea962b666dc4be1560d7d32bd510f97bc81d9251ef6",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17920/l_oneapi_ccl_p_2021.3.0.343_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17920/l_oneapi_ccl_p_2021.3.0.343_offline.sh",
sha256="0bb63e2077215cc161973b2e5029919c55e84aea7620ee9a848f6c2cc1245e3f",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17731/l_oneapi_ccl_p_2021.2.0.269_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17731/l_oneapi_ccl_p_2021.2.0.269_offline.sh",
sha256="18b7875030243295b75471e235e91e5f7b4fc15caf18c07d941a6d47fba378d7",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17391/l_oneapi_ccl_p_2021.1.1.54_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17391/l_oneapi_ccl_p_2021.1.1.54_offline.sh",
sha256="de732df57a03763a286106c8b885fd60e83d17906936a8897a384b874e773f49",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/detection_test.yaml b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/detection_test.yaml
new file mode 100644
index 0000000000..0684507424
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/detection_test.yaml
@@ -0,0 +1,89 @@
+paths:
+- layout:
+ - executables:
+ - "bin/intel64/icc"
+ script: |
+ echo "icc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/icpc"
+ script: |
+ echo "icpc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/ifort"
+ script: |
+ echo "ifort (IFORT) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: 'intel-oneapi-compilers-classic@18.0.5'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/intel64/icc"
+ cxx: ".*/bin/intel64/icpc"
+ fortran: ".*/bin/intel64/ifort"
+- layout:
+ - executables:
+ - "bin/icc"
+ script: |
+ echo "icc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/icpc"
+ script: |
+ echo "icpc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/ifort"
+ script: |
+ echo "ifort (IFORT) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: 'intel-oneapi-compilers-classic@18.0.5'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/icc"
+ cxx: ".*/bin/icpc"
+ fortran: ".*/bin/ifort"
+- layout:
+ - executables:
+ - "compiler/18.0.5/linux/bin/intel64/icc"
+ script: |
+ echo "icc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "compiler/18.0.5/linux/bin/intel64/icpc"
+ script: |
+ echo "icpc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "compiler/18.0.5/linux/bin/intel64/ifort"
+ script: |
+ echo "ifort (IFORT) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: 'intel-oneapi-compilers-classic@18.0.5'
+ extra_attributes:
+ compilers:
+ c: ".*compiler/18.0.5/linux/bin/intel64/icc"
+ cxx: ".*compiler/18.0.5/linux/bin/intel64/icpc"
+ fortran: ".*compiler/18.0.5/linux/bin/intel64/ifort"
+- layout: # oneapi compiler is not detected as classic
+ - executables:
+ - "compiler/18.0.5/linux/bin/icx"
+ - "compiler/18.0.5/linux/bin/icpx"
+ script: |
+ echo "Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /made/up/path",
+ - executables:
+ - "compiler/18.0.5/linux/bin/ifx"
+ script: |
+ echo "ifx (IFORT) 2021.1.2 Beta 20201214"
+ echo "Copyright (C) 1985-2020 Intel Corporation. All rights reserved."
+ platforms: [linux]
+ results: []
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py
index d5c409f734..71de26ed34 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py
@@ -3,14 +3,16 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import sys
+from llnl.util.lang import classproperty
from llnl.util.link_tree import LinkTree
from spack.package import *
@IntelOneApiPackage.update_description
-class IntelOneapiCompilersClassic(Package):
+class IntelOneapiCompilersClassic(Package, CompilerPackage):
"""Relies on intel-oneapi-compilers to install the compilers, and
configures modules for icc/icpc/ifort.
@@ -22,6 +24,23 @@ class IntelOneapiCompilersClassic(Package):
has_code = False
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["icc"]
+ cxx_names = ["icpc"]
+ fortran_names = ["ifort"]
+
+ @classproperty
+ def compiler_version_argument(self):
+ if sys.platform == "win32":
+ return "/QV"
+ return "--version"
+
+ @classproperty
+ def compiler_version_regex(self):
+ if sys.platform == "win32":
+ return r"([1-9][0-9]*\.[0-9]*\.[0-9]*)"
+ return r"\((?:IFORT|ICC)\) ([^ ]+)"
+
# Versions before 2021 are in the `intel` package
# intel-oneapi versions before 2022 use intel@19.0.4
for ver, oneapi_ver in {
@@ -35,7 +54,7 @@ class IntelOneapiCompilersClassic(Package):
"2021.7.1": "2022.2.1",
"2021.8.0": "2023.0.0",
"2021.9.0": "2023.1.0",
- "2021.10.0": "2023.2.0",
+ "2021.10.0": "2023.2.4",
"2021.11.1": "2024.0.2",
}.items():
# prefer 2021.10.0 because it is the last one that has a C compiler
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/detection_test.yaml b/var/spack/repos/builtin/packages/intel-oneapi-compilers/detection_test.yaml
new file mode 100644
index 0000000000..d1e0c2252e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/detection_test.yaml
@@ -0,0 +1,23 @@
+paths:
+- layout:
+ - executables:
+ - "compiler/2021.2.0/linux/bin/icx"
+ - "compiler/2021.2.0/linux/bin/icpx"
+ script: |
+ echo "Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /made/up/path",
+ - executables:
+ - "compiler/2021.2.0/linux/bin/ifx"
+ script: |
+ echo "ifx (IFORT) 2021.2.0 Beta 20201214"
+ echo "Copyright (C) 1985-2020 Intel Corporation. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: intel-oneapi-compilers@2021.2.0
+ extra_attributes:
+ compilers:
+ c: ".*/compiler/2021.2.0/linux/bin/icx"
+ cxx: ".*/compiler/2021.2.0/linux/bin/icpx"
+ fortran: ".*/compiler/2021.2.0/linux/bin/ifx"
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
index de9cd5ac60..e3ec31d4b0 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
@@ -4,12 +4,103 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import platform
from spack.build_environment import dso_suffix
from spack.package import *
versions = [
{
+ "version": "2025.0.3",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1cac4f39-2032-4aa9-86d7-e4f3e40e4277/intel-dpcpp-cpp-compiler-2025.0.3.9_offline.sh",
+ "sha256": "0ca834002b9091dc9988da6798a2eb36ebc5933d8d523ed0fa78a55744c88823",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fafa2df1-4bb1-43f7-87c6-3c82f1bdc712/intel-fortran-compiler-2025.0.3.9_offline.sh",
+ "sha256": "1ad813cf6495ded730646d6c4fd065dcc840875fdea28fcc6bac2cafb8d22c8d",
+ },
+ },
+ {
+ "version": "2025.0.1",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4fd7c6b0-853f-458a-a8ec-421ab50a80a6/intel-dpcpp-cpp-compiler-2025.0.1.46_offline.sh",
+ "sha256": "1595397566b59a5c8f81e2c235b6bedd2405dc70309b5bf00ed75827d0f12449",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7ba31291-8a27-426f-88d5-8c2d65316655/intel-fortran-compiler-2025.0.1.41_offline.sh",
+ "sha256": "aa54f019ad8db79f716f880c72784dc117d64e525e4c3b62717bd9d18a6c9060",
+ },
+ },
+ {
+ "version": "2025.0.0",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ac92f2bb-4818-4e53-a432-f8b34d502f23/intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh",
+ "sha256": "04fadf63789acee731895e631db63f65a98b8279db3d0f48bdf0d81e6103bdd8",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/69f79888-2d6c-4b20-999e-e99d72af68d4/intel-fortran-compiler-2025.0.0.723_offline.sh",
+ "sha256": "2be6d607ce84f35921228595b118fbc516d28587cbc4e6dcf6b7219e5cd1a9a9",
+ },
+ "nvidia-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2025.0.0&filters[]=12.0&filters[]=linux",
+ "sha256": "264a43d2e07c08eb31d6483fb1c289a6b148709e48e9a250efc1b1e9a527feb6",
+ },
+ "amd-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2025.0.0&filters[]=6.1.0&filters[]=linux",
+ "sha256": "2c5a147e82f0e995b9c0457b53967cc066d5741d675cb64cb9eba8e3c791a064",
+ },
+ },
+ {
+ "version": "2024.2.1",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/74587994-3c83-48fd-b963-b707521a63f4/l_dpcpp-cpp-compiler_p_2024.2.1.79_offline.sh",
+ "sha256": "af0243f80640afa94c7f9c8151da91d7ab17f448f542fa76d785230dec712048",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5e7b0f1c-6f25-4cc8-94d7-3a527e596739/l_fortran-compiler_p_2024.2.1.80_offline.sh",
+ "sha256": "6f6dab82a88082a7a39f6feb699343c521f58c6481a1bb87edba7e2550995b6d",
+ },
+ "nvidia-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.1&filters[]=12.0&filters[]=linux",
+ "sha256": "2c377027c650291ccd8267cbf75bd3d00c7b11998cc59d5668a02a0cbc2c015f",
+ },
+ "amd-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.1&filters[]=6.1.0&filters[]=linux",
+ "sha256": "fbeb64f959f907cbf3469f4e154b2af6d8ff46fe4fc667c811e04f3872a13823",
+ },
+ },
+ {
+ "version": "2024.2.0",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6780ac84-6256-4b59-a647-330eb65f32b6/l_dpcpp-cpp-compiler_p_2024.2.0.495_offline.sh",
+ "sha256": "9463aa979314d2acc51472d414ffcee032e9869ca85ac6ff4c71d39500e5173d",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/801143de-6c01-4181-9911-57e00fe40181/l_fortran-compiler_p_2024.2.0.426_offline.sh",
+ "sha256": "fd19a302662b2f86f76fc115ef53a69f16488080278dba4c573cc705f3a52ffa",
+ },
+ "nvidia-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.0&filters[]=12.0&filters[]=linux",
+ "sha256": "0622df0054364b01e91e7ed72a33cb3281e281db5b0e86579f516b1cc5336b0f",
+ },
+ "amd-plugin": {
+ "url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.0&filters[]=6.1.0&filters[]=linux",
+ "sha256": "d1e9d30fa92f3ef606f054d8cbd7c338b3e46f6a9f8472736e29e8ccd9e50688",
+ },
+ },
+ {
+ "version": "2024.1.0",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2e562b6e-5d0f-4001-8121-350a828332fb/l_dpcpp-cpp-compiler_p_2024.1.0.468_offline.sh",
+ "sha256": "534ecc6e4b690c9011d7765cbe178f520aa8f49c0eb4ea80ea1415e48e5d7cf7",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fd9342bd-7d50-442c-a3e4-f41974e14396/l_fortran-compiler_p_2024.1.0.465_offline.sh",
+ "sha256": "30a02bad9a96a543c60f3bfa4238dfe07c2d26d76fc22ba9aa9b7c603e11f1b9",
+ },
+ },
+ {
"version": "2024.0.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/bb99984f-370f-413d-bbec-38928d2458f2/l_dpcpp-cpp-compiler_p_2024.0.2.29_offline.sh",
@@ -43,6 +134,17 @@ versions = [
},
},
{
+ "version": "2023.2.4",
+ "cpp": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b00a4b0e-bd21-41fa-ab34-19e8e2a77c5a/l_dpcpp-cpp-compiler_p_2023.2.4.24_offline.sh",
+ "sha256": "f143a764adba04a41e49ec405856ad781e5c3754812e90a7ffe06d08cd07f684",
+ },
+ "ftn": {
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5bfaa204-689d-4bf1-9656-e37e35ea3fc2/l_fortran-compiler_p_2023.2.4.31_offline.sh",
+ "sha256": "2f327d67cd207399b327df5b7c912baae800811d0180485ef5431f106686c94b",
+ },
+ },
+ {
"version": "2023.2.3",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d85fbeee-44ec-480a-ba2f-13831bac75f7/l_dpcpp-cpp-compiler_p_2023.2.3.12_offline.sh",
@@ -89,110 +191,110 @@ versions = [
{
"version": "2023.0.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/19123/l_dpcpp-cpp-compiler_p_2023.0.0.25393_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19123/l_dpcpp-cpp-compiler_p_2023.0.0.25393_offline.sh",
"sha256": "473eb019282c2735d65c6058f6890e60b79a5698ae18d2c1e4489fed8dd18a02",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/19105/l_fortran-compiler_p_2023.0.0.25394_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19105/l_fortran-compiler_p_2023.0.0.25394_offline.sh",
"sha256": "fd7525bf90646c8e43721e138f29c9c6f99e96dfe5648c13633f30ec64ac8b1b",
},
},
{
"version": "2022.2.1",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/19049/l_dpcpp-cpp-compiler_p_2022.2.1.16991_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19049/l_dpcpp-cpp-compiler_p_2022.2.1.16991_offline.sh",
"sha256": "3f0f02f9812a0cdf01922d2df9348910c6a4cb4f9dfe50fc7477a59bbb1f7173",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18998/l_fortran-compiler_p_2022.2.1.16992_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18998/l_fortran-compiler_p_2022.2.1.16992_offline.sh",
"sha256": "64f1d1efbcdc3ac2182bec18313ca23f800d94f69758db83a1394490d9d4b042",
},
},
{
"version": "2022.2.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18849/l_dpcpp-cpp-compiler_p_2022.2.0.8772_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18849/l_dpcpp-cpp-compiler_p_2022.2.0.8772_offline.sh",
"sha256": "8ca97f7ea8abf7876df6e10ce2789ea8cbc310c100ad7bf0b5ffccc4f3c7f2c9",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18909/l_fortran-compiler_p_2022.2.0.8773_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18909/l_fortran-compiler_p_2022.2.0.8773_offline.sh",
"sha256": "4054e4bf5146d55638d21612396a19ea623d22cbb8ac63c0a7150773541e0311",
},
},
{
"version": "2022.1.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18717/l_dpcpp-cpp-compiler_p_2022.1.0.137_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18717/l_dpcpp-cpp-compiler_p_2022.1.0.137_offline.sh",
"sha256": "1027819581ba820470f351abfc2b2658ff2684ed8da9ed0e722a45774a2541d6",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18703/l_fortran-compiler_p_2022.1.0.134_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18703/l_fortran-compiler_p_2022.1.0.134_offline.sh",
"sha256": "583082abe54a657eb933ea4ba3e988eef892985316be13f3e23e18a3c9515020",
},
},
{
"version": "2022.0.2",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18478/l_dpcpp-cpp-compiler_p_2022.0.2.84_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18478/l_dpcpp-cpp-compiler_p_2022.0.2.84_offline.sh",
"sha256": "ade5bbd203e7226ca096d7bf758dce07857252ec54e83908cac3849e6897b8f3",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18481/l_fortran-compiler_p_2022.0.2.83_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18481/l_fortran-compiler_p_2022.0.2.83_offline.sh",
"sha256": "78532b4118fc3d7afd44e679fc8e7aed1e84efec0d892908d9368e0c7c6b190c",
},
},
{
"version": "2022.0.1",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18435/l_dpcpp-cpp-compiler_p_2022.0.1.71_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18435/l_dpcpp-cpp-compiler_p_2022.0.1.71_offline.sh",
"sha256": "c7cddc64c3040eece2dcaf48926ba197bb27e5a46588b1d7b3beddcdc379926a",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18436/l_fortran-compiler_p_2022.0.1.70_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18436/l_fortran-compiler_p_2022.0.1.70_offline.sh",
"sha256": "2cb28a04f93554bfeffd6cad8bd0e7082735f33d73430655dea86df8933f50d1",
},
},
{
"version": "2021.4.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18209/l_dpcpp-cpp-compiler_p_2021.4.0.3201_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18209/l_dpcpp-cpp-compiler_p_2021.4.0.3201_offline.sh",
"sha256": "9206bff1c2fdeb1ca0d5f79def90dcf3e6c7d5711b9b5adecd96a2ba06503828",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/18210/l_fortran-compiler_p_2021.4.0.3224_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18210/l_fortran-compiler_p_2021.4.0.3224_offline.sh",
"sha256": "de2fcf40e296c2e882e1ddf2c45bb8d25aecfbeff2f75fcd7494068d621eb7e0",
},
},
{
"version": "2021.3.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17928/l_dpcpp-cpp-compiler_p_2021.3.0.3168_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17928/l_dpcpp-cpp-compiler_p_2021.3.0.3168_offline.sh",
"sha256": "f848d81b7cabc76c2841c9757abb2290921efd7b82491d830605f5785600e7a1",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17959/l_fortran-compiler_p_2021.3.0.3168_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17959/l_fortran-compiler_p_2021.3.0.3168_offline.sh",
"sha256": "c4553f7e707be8e8e196f625e4e7fbc8eff5474f64ab85fc7146b5ed53ebc87c",
},
},
{
"version": "2021.2.0",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17749/l_dpcpp-cpp-compiler_p_2021.2.0.118_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17749/l_dpcpp-cpp-compiler_p_2021.2.0.118_offline.sh",
"sha256": "5d01cbff1a574c3775510cd97ffddd27fdf56d06a6b0c89a826fb23da4336d59",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17756/l_fortran-compiler_p_2021.2.0.136_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17756/l_fortran-compiler_p_2021.2.0.136_offline.sh",
"sha256": "a62e04a80f6d2f05e67cd5acb03fa58857ee22c6bd581ec0651c0ccd5bdec5a1",
},
},
{
"version": "2021.1.2",
"cpp": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17513/l_dpcpp-cpp-compiler_p_2021.1.2.63_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17513/l_dpcpp-cpp-compiler_p_2021.1.2.63_offline.sh",
"sha256": "68d6cb638091990e578e358131c859f3bbbbfbf975c581fd0b4b4d36476d6f0a",
},
"ftn": {
- "url": "https://registrationcenter-download.intel.com/akdlm/irc_nas/17508/l_fortran-compiler_p_2021.1.2.62_offline.sh",
+ "url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17508/l_fortran-compiler_p_2021.1.2.62_offline.sh",
"sha256": "29345145268d08a59fa7eb6e58c7522768466dd98f6d9754540d1a0803596829",
},
},
@@ -200,19 +302,31 @@ versions = [
@IntelOneApiPackage.update_description
-class IntelOneapiCompilers(IntelOneApiPackage):
- """Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, ifx,
- and dpcpp.
-
- """
+class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage):
+ """Intel oneAPI Compilers. Includes: icx, icpx, ifx, and ifort.
+ Releases before 2024.0 include icc/icpc"""
maintainers("rscohn2")
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi.html"
- # See https://github.com/spack/spack/issues/39252
- depends_on("patchelf@:0.17", type="build")
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["icx"]
+ cxx_names = ["icpx"]
+ fortran_names = ["ifx"]
+ compiler_version_argument = "--version"
+ compiler_version_regex = (
+ r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
+ )
+ # See https://github.com/spack/spack/issues/39252
+ depends_on("patchelf@:0.17", type="build", when="@:2024.1")
+ # Add the nvidia variant
+ variant("nvidia", default=False, description="Install NVIDIA plugin for OneAPI")
+ conflicts("@:2022.2.1", when="+nvidia", msg="Codeplay NVIDIA plugin requires newer release")
+ # Add the amd variant
+ variant("amd", default=False, description="Install AMD plugin for OneAPI")
+ conflicts("@:2022.2.1", when="+amd", msg="Codeplay AMD plugin requires newer release")
# TODO: effectively gcc is a direct dependency of intel-oneapi-compilers, but we
# cannot express that properly. For now, add conflicts for non-gcc compilers
# instead.
@@ -228,6 +342,22 @@ class IntelOneapiCompilers(IntelOneApiPackage):
expand=False,
**v["ftn"],
)
+ if "nvidia-plugin" in v:
+ resource(
+ name="nvidia-plugin-installer",
+ placement="nvidia-plugin-installer",
+ when="@{0}".format(v["version"]),
+ expand=False,
+ **v["nvidia-plugin"],
+ )
+ if "amd-plugin" in v:
+ resource(
+ name="amd-plugin-installer",
+ placement="amd-plugin-installer",
+ when="@{0}".format(v["version"]),
+ expand=False,
+ **v["amd-plugin"],
+ )
@property
def v2_layout_versions(self):
@@ -287,6 +417,21 @@ class IntelOneapiCompilers(IntelOneApiPackage):
# Some installers have a bug and do not return an error code when failing
if not is_exe(self._llvm_bin.ifx):
raise RuntimeError("Fortran install failed")
+ # install nvidia-plugin
+ if self.spec.satisfies("+nvidia"):
+ nvidia_script = find("nvidia-plugin-installer", "*")
+ if nvidia_script:
+ if platform.system() == "Linux":
+ bash = Executable("bash")
+ # For NVIDIA plugin installer
+ bash(nvidia_script[0], "-y", "--install-dir", self.prefix)
+ if self.spec.satisfies("+amd"):
+ amd_script = find("amd-plugin-installer", "*")
+ if amd_script:
+ if platform.system() == "Linux":
+ bash = Executable("bash")
+ # For AMD plugin installer
+ bash(amd_script[0], "-y", "--install-dir", self.prefix)
@run_after("install")
def inject_rpaths(self):
@@ -299,6 +444,12 @@ class IntelOneapiCompilers(IntelOneApiPackage):
# issues. I am using the 2024 release as a milestone to stop
# patching everything and just patching the binaries that have
# a problem.
+
+ # 2024.2 no longer needs patching
+ if self.spec.satisfies("@2024.2:"):
+ return
+
+ # 2024 fixed all but these 2
patchelf = which("patchelf")
if self.spec.satisfies("@2024:"):
patchelf.add_default_arg("--set-rpath", self.component_prefix.lib)
@@ -319,7 +470,7 @@ class IntelOneapiCompilers(IntelOneApiPackage):
# Tolerate missing compilers.
# Initially, we installed icx/ifx/icc/ifort into a single prefix.
# Starting in 2024, there is no icc. 2023.2.3 does not have an ifx.
- if os.path.exists(compiler):
+ if os.path.exists(path.join(compiler)):
p = path.join(compiler + ".cfg")
with open(p, "w") as f:
f.write(" ".join(flags))
@@ -358,7 +509,11 @@ class IntelOneapiCompilers(IntelOneApiPackage):
llvm_flags.append("-Wno-unused-command-line-argument")
self.write_config_file(common_flags + llvm_flags, self._llvm_bin, ["icx", "icpx"])
- self.write_config_file(common_flags + classic_flags, self._llvm_bin, ["ifx"])
+ self.write_config_file(
+ common_flags + (llvm_flags if self.spec.satisfies("@2022.1.0:") else classic_flags),
+ self._llvm_bin,
+ ["ifx"],
+ )
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["ifort"])
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["icc", "icpc"])
@@ -377,3 +532,31 @@ class IntelOneapiCompilers(IntelOneApiPackage):
p = join_path(self.component_prefix.linux, d)
if find(p, "*." + dso_suffix, recursive=False):
yield p
+
+ @classmethod
+ def runtime_constraints(cls, *, spec, pkg):
+ pkg("*").depends_on(
+ "intel-oneapi-runtime",
+ when="%oneapi",
+ type="link",
+ description="If any package uses %oneapi, it depends on intel-oneapi-runtime",
+ )
+ pkg("*").depends_on(
+ f"intel-oneapi-runtime@{str(spec.version)}:",
+ when=f"%{str(spec)}",
+ type="link",
+ description=f"If any package uses %{str(spec)}, "
+ f"it depends on intel-oneapi-runtime@{str(spec.version)}:",
+ )
+
+ for fortran_virtual in ("fortran-rt", "libifcore@5"):
+ pkg("*").depends_on(
+ fortran_virtual,
+ when=f"%{str(spec)}",
+ languages=["fortran"],
+ type="link",
+ description=f"Add a dependency on 'libifcore' for nodes compiled with "
+ f"{str(spec)} and using the 'fortran' language",
+ )
+ # The version of intel-oneapi-runtime is the same as the %oneapi used to "compile" it
+ pkg("intel-oneapi-runtime").requires(f"@={str(spec.version)}", when=f"%{str(spec)}")
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py
index 1c509113d0..afebb68a8e 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py
@@ -27,6 +27,36 @@ class IntelOneapiDal(IntelOneApiLibraryPackage):
)
version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d9f2cdb2-93ec-4c78-a3fb-a59d27050c16/intel-onedal-2025.0.0.958_offline.sh",
+ sha256="be6c4130c29a77323515d1febcd55163f1db3e1cecdc8d477617cb8e560e4a3f",
+ expand=False,
+ )
+ version(
+ "2024.7.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ed2c397a-9a78-4466-9179-b39b7da07e83/l_daal_oneapi_p_2024.7.0.14_offline.sh",
+ sha256="aa7b072fe019ce253a111b38055f3949222d7be5231b4df2780a7ded16cd9097",
+ expand=False,
+ )
+ version(
+ "2024.6.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1edf7074-80f8-4b97-aad3-5023b41b7ecd/l_daal_oneapi_p_2024.6.0.418_offline.sh",
+ sha256="2e5966348df4dd70b2887512dca12ecc671de831a30ca21a23a28822c4d24f9f",
+ expand=False,
+ )
+ version(
+ "2024.5.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6ca2d1a8-b7c7-4a70-9c38-2b437dacae1a/l_daal_oneapi_p_2024.5.0.284_offline.sh",
+ sha256="65d437f8841fd4872e35708f3c989bc00022fe041e750e8c35dee010bd87db9d",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3cee4c6c-b7d1-42ce-8bbb-d829a700952f/l_daal_oneapi_p_2024.2.0.280_offline.sh",
+ sha256="921dbbf200096166d58ab5b8baeb93a8c85ad8a98cc43e178ae0c2f29af02212",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/37364086-b3cd-4a54-8736-7893732c1a86/l_daal_oneapi_p_2024.0.0.49569_offline.sh",
sha256="45e71c7cbf38b04a34c47e36e2d86a48847f2f0485bafbc3445077a9ba3fa73c",
@@ -46,61 +76,61 @@ class IntelOneapiDal(IntelOneApiLibraryPackage):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19122/l_daal_oneapi_p_2023.0.0.25395_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19122/l_daal_oneapi_p_2023.0.0.25395_offline.sh",
sha256="83d0ca7501c882bf7e1f250e7310dafa6b6fd404858298ce9cde7546654d43bc",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19032/l_daal_oneapi_p_2021.7.1.16996_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19032/l_daal_oneapi_p_2021.7.1.16996_offline.sh",
sha256="2328927480b0ba5d380028f981717b63ee323f8a1616a491a160a0a0b239e285",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18895/l_daal_oneapi_p_2021.7.0.8746_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18895/l_daal_oneapi_p_2021.7.0.8746_offline.sh",
sha256="c18e68df120c2b1db17877cfcbb1b5c93a47b2f4756a3444c663d0f03be4eee3",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18698/l_daal_oneapi_p_2021.6.0.915_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18698/l_daal_oneapi_p_2021.6.0.915_offline.sh",
sha256="bc9a430f372a5f9603c19ec25207c83ffd9d59fe517599c734d465e32afc9790",
expand=False,
)
version(
"2021.5.3",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18480/l_daal_oneapi_p_2021.5.3.832_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18480/l_daal_oneapi_p_2021.5.3.832_offline.sh",
sha256="6d3503cf7be2908bbb7bd18e67b8f2e96ad9aec53d4813c9be620adaa2db390f",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18432/l_daal_oneapi_p_2021.5.1.803_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18432/l_daal_oneapi_p_2021.5.1.803_offline.sh",
sha256="bba7bee3caef14fbb54ad40615222e5da429496455edf7375f11fd84a72c87ba",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18218/l_daal_oneapi_p_2021.4.0.729_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18218/l_daal_oneapi_p_2021.4.0.729_offline.sh",
sha256="61da9d2a40c75edadff65d052fd84ef3db1da5d94f86ad3956979e6988549dda",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17905/l_daal_oneapi_p_2021.3.0.557_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17905/l_daal_oneapi_p_2021.3.0.557_offline.sh",
sha256="4c2e77a3a2fa5f8a09b7d68760dfca6c07f3949010836cd6da34075463467995",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17747/l_daal_oneapi_p_2021.2.0.358_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17747/l_daal_oneapi_p_2021.2.0.358_offline.sh",
sha256="cbf4e64dbd21c10179f2d1d7e8b8b0f12eeffe6921602df33276cd0ebd1f8e34",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17443/l_daal_oneapi_p_2021.1.1.79_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17443/l_daal_oneapi_p_2021.1.1.79_offline.sh",
sha256="6e0e24bba462e80f0fba5a46e95cf0cca6cf17948a7753f8e396ddedd637544e",
expand=False,
)
@@ -117,3 +147,14 @@ class IntelOneapiDal(IntelOneApiLibraryPackage):
@property
def component_dir(self):
return "dal"
+
+ @property
+ def headers(self):
+ # This should match the directories added to CPATH by
+ # env/vars.sh for the component
+ if self.v2_layout:
+ dirs = [self.component_prefix.include, self.component_prefix.include.dal]
+ else:
+ dirs = [self.component_prefix.include]
+
+ return self.header_directories(dirs)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
index 81764743dc..9c7e5d0970 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
@@ -27,6 +27,42 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage):
)
version(
+ "2025.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6cfa324b-1591-4c0b-b8d2-97c5b3b272a7/intel-onednn-2025.0.1.12_offline.sh",
+ sha256="3c81880a1fc40f2e68a1dcc05f220b5e22c1e9c78723a2e57770ed3c740800f2",
+ expand=False,
+ )
+ version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/87e117ab-039b-437d-9c80-dcd5c9e675d5/intel-onednn-2025.0.0.862_offline.sh",
+ sha256="267f63e8a3fe2a37c92873e53f3bf14a2cf680e888005cb6deb2014bc3be077c",
+ expand=False,
+ )
+ version(
+ "2024.2.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7c850be0-b17d-4b7f-898d-3bc5fc36aa8d/l_onednn_p_2024.2.1.76_offline.sh",
+ sha256="86f143568529465d6e8b87763e645774f40ac3c38d7713088a597a3f941978bb",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6f830f51-56cd-4ea6-ade7-0f066c9b1939/l_onednn_p_2024.2.0.571_offline.sh",
+ sha256="9bc74f8e48758c0ce7dda4c9f8f961a26f48c25e5ad5335c6e7ecbd7ece38c97",
+ expand=False,
+ )
+ version(
+ "2024.1.1",
+ url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/5f6d82fa-2580-4bb1-83bb-cce7a52d1d34/l_onednn_p_2024.1.1.16_offline.sh",
+ sha256="a67a387bc0d30a5ca1bd0ed3d551ed13df7dba7939b208fd0c81a24425e6e90a",
+ expand=False,
+ )
+ version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/759e8b2a-cbff-4b4f-ad88-08deb7730e73/l_onednn_p_2024.1.0.571_offline.sh",
+ sha256="580cb133e08b522945172a396dec9c83dd6e951602c4f36a6c346b25ab2e48c5",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/dc309221-d210-4f3a-9406-d897df8deab8/l_onednn_p_2024.0.0.49548_offline.sh",
sha256="17fbd5cc5d08de33625cf2879c0cceec53c91bbcd0b863e8f29d27885bac88c9",
@@ -46,61 +82,61 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19137/l_onednn_p_2023.0.0.25399_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19137/l_onednn_p_2023.0.0.25399_offline.sh",
sha256="f974901132bf55ba11ce782747ba9443f38d67827bce3994775eeb86ed018869",
expand=False,
)
version(
"2022.2.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19035/l_onednn_p_2022.2.1.16994_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19035/l_onednn_p_2022.2.1.16994_offline.sh",
sha256="2102964a36a5b58b529385706e6829456ee5225111c33dfce6326fff5175aace",
expand=False,
)
version(
"2022.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18933/l_onednn_p_2022.2.0.8750_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18933/l_onednn_p_2022.2.0.8750_offline.sh",
sha256="920833cd1f05f2fdafb942c96946c3925eb734d4458d52f22f2cc755133cb9e0",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18725/l_onednn_p_2022.1.0.132_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18725/l_onednn_p_2022.1.0.132_offline.sh",
sha256="0b9a7efe8dd0f0b5132b353a8ee99226f75bae4bab188a453817263a0684cc93",
expand=False,
)
version(
"2022.0.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18476/l_onednn_p_2022.0.2.43_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18476/l_onednn_p_2022.0.2.43_offline.sh",
sha256="a2a953542b4f632b51a2527d84bd76c3140a41c8085420da4237e2877c27c280",
expand=False,
)
version(
"2022.0.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18441/l_onednn_p_2022.0.1.26_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18441/l_onednn_p_2022.0.1.26_offline.sh",
sha256="8339806300d83d2629952e6e2f2758b52f517c072a20b7b7fc5642cf1e2a5410",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18221/l_onednn_p_2021.4.0.467_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18221/l_onednn_p_2021.4.0.467_offline.sh",
sha256="30cc601467f6a94b3d7e14f4639faf0b12fdf6d98df148b07acdb4dfdfb971db",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17923/l_onednn_p_2021.3.0.344_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17923/l_onednn_p_2021.3.0.344_offline.sh",
sha256="1521f6cbffcf9ce0c7b5dfcf1a2546a4a0c8d8abc99f3011709039aaa9e0859a",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17751/l_onednn_p_2021.2.0.228_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17751/l_onednn_p_2021.2.0.228_offline.sh",
sha256="62121a3355298211a124ff4e71c42fc172bf1061019be6c6120830a1a502aa88",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17385/l_onednn_p_2021.1.1.55_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17385/l_onednn_p_2021.1.1.55_offline.sh",
sha256="24002c57bb8931a74057a471a5859d275516c331fd8420bee4cae90989e77dc3",
expand=False,
)
@@ -123,7 +159,14 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage):
@property
def headers(self):
- return find_headers("dnnl", self.__target().include)
+ # This should match the directories added to CPATH by
+ # env/vars.sh for the component
+ if self.v2_layout:
+ dirs = [self.component_prefix.include]
+ else:
+ dirs = [self.component_prefix.cpu_dpcpp_gpu_dpcpp.include]
+
+ return self.header_directories(dirs)
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py
index ac1dee0736..2d10ad1705 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py
@@ -20,6 +20,36 @@ class IntelOneapiDpct(IntelOneApiPackage):
homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compatibility-tool.html#gs.2p8km6"
version(
+ "2025.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6d1e0867-72b4-4670-8efc-3586894ad15f/intel-dpcpp-ct-2025.0.1.19_offline.sh",
+ sha256="b9e3bf879938a3e50cda73f555f54dff8769d8cb4c00746dbdba363af2a54410",
+ expand=False,
+ )
+ version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/de77e9b7-1fa2-4329-8777-2de569fee5d9/intel-dpcpp-ct-2025.0.0.912_offline.sh",
+ sha256="a675a0c6261c31c73ca8c37e9d6b4bd19018e9fcba72800c245ed61eb0fac9ee",
+ expand=False,
+ )
+ version(
+ "2024.2.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e3b7b68d-65dd-4d03-9119-ce3ad448657e/l_dpcpp-ct_p_2024.2.1.64_offline.sh",
+ sha256="87af24e0151bcde66c568f73156532a055569b349a7dbd34178344245a43ca1f",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6b83dabd-75cf-4371-b4cd-91160175d5ff/l_dpcpp-ct_p_2024.2.0.424_offline.sh",
+ sha256="43a6c5fa646291ea4f8ee94e2e711ee42bbd6aff7901bda1694e1ea99e6852e2",
+ expand=False,
+ )
+ version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/997fe522-cedf-46da-a54d-be4f22992fa1/l_dpcpp-ct_p_2024.1.0.378_offline.sh",
+ sha256="f4855ef768b9067476f0e216140c65777e301c9b32be45d9e644d54b6dc21e1b",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/6633bc4b-5356-471a-9aae-d5e63e7acd95/l_dpcpp-ct_p_2024.0.0.49394_offline.sh",
sha256="5fdba92edf24084187d98f083f9a6e17ee6b33ad8a736d6c9cdd3dbd4e0eab8a",
@@ -39,25 +69,25 @@ class IntelOneapiDpct(IntelOneApiPackage):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19100/l_dpcpp-ct_p_2023.0.0.25483_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19100/l_dpcpp-ct_p_2023.0.0.25483_offline.sh",
sha256="81f392d16a10cbdb8e9d053f18566304a78e1be624280ad43ddbc0dfd767fc7f",
expand=False,
)
version(
"2022.2.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18991/l_dpcpp-ct_p_2022.2.1.14994_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18991/l_dpcpp-ct_p_2022.2.1.14994_offline.sh",
sha256="ea2fbe36de70eb3c78c97133f81e0b2a2fbcfc9525e77125a183d7af446ef3e6",
expand=False,
)
version(
"2022.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18908/l_dpcpp-ct_p_2022.2.0.8701_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18908/l_dpcpp-ct_p_2022.2.0.8701_offline.sh",
sha256="ca79b89ba4b97accb868578a1b7ba0e38dc5e4457d45c6c2552ba33d71b52128",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18746/l_dpcpp-ct_p_2022.1.0.172_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18746/l_dpcpp-ct_p_2022.1.0.172_offline.sh",
sha256="ec42f4df3f9daf1af587b14b8b6644c773a0b270e03dd22ac9e2f49131e3e40c",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py
index 42b778222c..c3fa765220 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py
@@ -23,6 +23,36 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage):
homepage = "https://github.com/oneapi-src/oneDPL"
version(
+ "2022.7.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/de3c613f-829c-4bdc-aa2b-6129eece3bd9/intel-onedpl-2022.7.1.15_offline.sh",
+ sha256="737f8d29f50fcb26abf7a39373305c177d8b91a70dbc5fed9d41aabfcc8bad5a",
+ expand=False,
+ )
+ version(
+ "2022.7.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/85ad74ff-f4fa-45e2-b50d-67d637d42baa/intel-onedpl-2022.7.0.647_offline.sh",
+ sha256="8eecb6bd35ad414248fc03f9fd8ef4ec504d0ce44724b2c23d42f5f08e046a3f",
+ expand=False,
+ )
+ version(
+ "2022.6.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fe007d71-c49f-4cdd-8a95-5c8e29c5b19c/l_oneDPL_p_2022.6.1.15_offline.sh",
+ sha256="44eb3d12321e4fbf0bf8f78f47831ce4d5825cc041037ff919dca79db3354c7d",
+ expand=False,
+ )
+ version(
+ "2022.6.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/65565430-3eb6-49ad-ae51-e35314cc6f08/l_oneDPL_p_2022.6.0.560_offline.sh",
+ sha256="540c79d2cea77c009fd7d49d65323418aded1235afd30d91192257a2f14a366f",
+ expand=False,
+ )
+ version(
+ "2022.5.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d0be9e37-532e-4fde-9ac2-32c3ec5a2029/l_oneDPL_p_2022.5.0.219_offline.sh",
+ sha256="41a96db8adc2de60f2e8dc8b01a6f93f39dad568a46ab1699f3b4200d0acf834",
+ expand=False,
+ )
+ version(
"2022.3.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/be027095-148a-4433-aff4-c6e8582da3ca/l_oneDPL_p_2022.3.0.49386_offline.sh",
sha256="1e40c6562bc41fa5a46c80c09222bf12d36d8e82f749476d0a7e97503d4659df",
@@ -42,43 +72,43 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage):
)
version(
"2022.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19133/l_oneDPL_p_2022.0.0.25335_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19133/l_oneDPL_p_2022.0.0.25335_offline.sh",
sha256="61fcdfe854393f90c43c01bff81bf917c1784bc1c128afdb0c8be2795455d3d2",
expand=False,
)
version(
"2021.7.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19046/l_oneDPL_p_2021.7.2.15007_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19046/l_oneDPL_p_2021.7.2.15007_offline.sh",
sha256="84d60a6b1978ff45d2c416f18ca7df542eaa8c0b18dc3abf4bb0824a91b4fc44",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18846/l_oneDPL_p_2021.7.1.8713_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18846/l_oneDPL_p_2021.7.1.8713_offline.sh",
sha256="275c935427e3ad0eb995034b05ff2ffd13c55ee58069c3702aa383f68a1e5485",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18752/l_oneDPL_p_2021.7.0.631_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18752/l_oneDPL_p_2021.7.0.631_offline.sh",
sha256="1e2d735d5eccfe8058e18f96d733eda8de5b7a07d613447b7d483fd3f9cec600",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18372/l_oneDPL_p_2021.6.0.501_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18372/l_oneDPL_p_2021.6.0.501_offline.sh",
sha256="0225f133a6c38b36d08635986870284a958e5286c55ca4b56a4058bd736f8f4f",
expand=False,
)
version(
"2021.5.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18189/l_oneDPL_p_2021.5.0.445_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18189/l_oneDPL_p_2021.5.0.445_offline.sh",
sha256="7d4adf300a18f779c3ab517070c61dba10e3952287d5aef37c38f739e9041a68",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17889/l_oneDPL_p_2021.4.0.337_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17889/l_oneDPL_p_2021.4.0.337_offline.sh",
sha256="540ef0d308c4b0f13ea10168a90edd42a56dc0883024f6f1a678b94c10b5c170",
expand=False,
)
@@ -93,6 +123,11 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage):
@property
def headers(self):
- return self.header_directories(
- [self.component_prefix.include, self.component_prefix.linux.include]
- )
+ # This should match the directories added to CPATH by
+ # env/vars.sh for the component
+ if self.v2_layout:
+ dirs = [self.component_prefix.include]
+ else:
+ dirs = [self.component_prefix.linux.include]
+
+ return self.header_directories(dirs)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py
index 457afb8430..42a2dbbae4 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py
@@ -25,6 +25,12 @@ class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk):
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/inspector.html"
version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/891acaab-a5b4-4a3c-9f36-60dca629e410/l_inspector_oneapi_p_2024.1.0.158_offline.sh",
+ sha256="b4e4e2e395ad98ce025a6bf26950fc39c2f54c905a1a9c88cb129109a5dd0936",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/44ae6846-719c-49bd-b196-b16ce5835a1e/l_inspector_oneapi_p_2024.0.0.49433_offline.sh",
sha256="2b281c3a704a242aa3372284960ea8ed5ed1ba293cc2f70c2f873db3300c80a3",
@@ -44,43 +50,43 @@ class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19125/l_inspector_oneapi_p_2023.0.0.25340_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19125/l_inspector_oneapi_p_2023.0.0.25340_offline.sh",
sha256="adae2f06443c62a1a7be6aff2ad9c78672ec70f67b83dd660e68faafd7911dd4",
expand=False,
)
version(
"2022.3.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19005/l_inspector_oneapi_p_2022.3.1.15318_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19005/l_inspector_oneapi_p_2022.3.1.15318_offline.sh",
sha256="62aa2abf6928c0f4fc60ccfb69375297f823c183aea2519d7344e09c9734c1f8",
expand=False,
)
version(
"2022.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18924/l_inspector_oneapi_p_2022.3.0.8706_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18924/l_inspector_oneapi_p_2022.3.0.8706_offline.sh",
sha256="c239b93769afae0ef5f7d3b8584d739bf4a839051bd428f1e6be3e8ca5d4aefa",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18712/l_inspector_oneapi_p_2022.1.0.123_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18712/l_inspector_oneapi_p_2022.1.0.123_offline.sh",
sha256="8551180aa30be3abea11308fb11ea9a296f0e056ab07d9254585448a0b23333e",
expand=False,
)
version(
"2022.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18363/l_inspector_oneapi_p_2022.0.0.56_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18363/l_inspector_oneapi_p_2022.0.0.56_offline.sh",
sha256="79a0eb2ae3f1de1e3456076685680c468702922469c3fda3e074718fb0bea741",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18239/l_inspector_oneapi_p_2021.4.0.266_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18239/l_inspector_oneapi_p_2021.4.0.266_offline.sh",
sha256="c8210cbcd0e07cc75e773249a5e4a02cf34894ec80a213939f3a20e6c5705274",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17946/l_inspector_oneapi_p_2021.3.0.217_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17946/l_inspector_oneapi_p_2021.3.0.217_offline.sh",
sha256="1371ca74be2a6d4b069cdb3f8f2d6109abbc3261a81f437f0fe5412a7b659b43",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py
index 923e19301f..99b2fea2d0 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py
@@ -28,6 +28,30 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage):
)
version(
+ "2022.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/acf220fa-326d-4f6e-9b63-f2da47b6f680/intel-ipp-2022.0.0.809_offline.sh",
+ sha256="e5e9be64ed79d9f3b2a11d9cdb573bea4a3a9a5cf08e5b7cc713947e622abbd6",
+ expand=False,
+ )
+ version(
+ "2021.12.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7e07b203-af56-4b52-b69d-97680826a8df/l_ipp_oneapi_p_2021.12.1.16_offline.sh",
+ sha256="2d53745148d33f44895f4a9f9ba123c689efedbc739ab13630f25b4a1ce53165",
+ expand=False,
+ )
+ version(
+ "2021.12.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ecc315bf-9e5a-4a23-b0ca-f58aea109e39/l_ipp_oneapi_p_2021.12.0.559_offline.sh",
+ sha256="84e4dfba142c3c629424012ad5e8e5f78d2a05983bf03cdc7e3ec6b530142d0e",
+ expand=False,
+ )
+ version(
+ "2021.11.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c8d09493-ca9b-45b1-b720-12b8719b4136/l_ipp_oneapi_p_2021.11.0.532_offline.sh",
+ sha256="42bfaf593184e3293c10e06ccc9e9781427d86a8a88e3d09f6921ffd7de24ee6",
+ expand=False,
+ )
+ version(
"2021.10.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/2d48c7d9-e716-4c73-8fe5-77a9599a405f/l_ipp_oneapi_p_2021.10.0.670_offline.sh",
sha256="c4ad98f96760b0a821dbcd59963c5148fd9dc4eb790af0e6e765a5f36525d202",
@@ -47,61 +71,61 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage):
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19126/l_ipp_oneapi_p_2021.7.0.25396_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19126/l_ipp_oneapi_p_2021.7.0.25396_offline.sh",
sha256="98b40cb6cea2198480400579330a5de85fd58d441b323246dfd2b960990fec26",
expand=False,
)
version(
"2021.6.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19007/l_ipp_oneapi_p_2021.6.2.16995_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19007/l_ipp_oneapi_p_2021.6.2.16995_offline.sh",
sha256="23ae49afa9f13c2bed0c8a32e447e1c6b3528685cebdd32e4aa2a9736827cc4e",
expand=False,
)
version(
"2021.6.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18925/l_ipp_oneapi_p_2021.6.1.8749_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18925/l_ipp_oneapi_p_2021.6.1.8749_offline.sh",
sha256="3f8705bf57c07b71d822295bfad49b531a38b6c3a4ca1119e4c52236cb664f57",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18748/l_ipp_oneapi_p_2021.6.0.626_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18748/l_ipp_oneapi_p_2021.6.0.626_offline.sh",
sha256="cf09b5229dd38d75671fa1ab1af47e4d5f9f16dc7c9c22a4313a221a184774aa",
expand=False,
)
version(
"2021.5.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18474/l_ipp_oneapi_p_2021.5.2.544_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18474/l_ipp_oneapi_p_2021.5.2.544_offline.sh",
sha256="ba48d91ab1447d0ae3d3a5448e3f08e460393258b60630c743be88281e51608e",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18440/l_ipp_oneapi_p_2021.5.1.522_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18440/l_ipp_oneapi_p_2021.5.1.522_offline.sh",
sha256="be99f9b0b2cc815e017188681ab997f3ace94e3010738fa6f702f2416dac0de4",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18219/l_ipp_oneapi_p_2021.4.0.459_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18219/l_ipp_oneapi_p_2021.4.0.459_offline.sh",
sha256="1a7a8fe5502ae61c10f5c432b7662c6fa542e5832a40494eb1c3a2d8e27c9f3e",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17958/l_ipp_oneapi_p_2021.3.0.333_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17958/l_ipp_oneapi_p_2021.3.0.333_offline.sh",
sha256="67e75c80813ec9a30d5fda5860f76122ae66fa2128a48c8461f5e6b100b38bbb",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17758/l_ipp_oneapi_p_2021.2.0.233_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17758/l_ipp_oneapi_p_2021.2.0.233_offline.sh",
sha256="ccdfc81f77203822d80151b40ce9e8fd82bb2de85a9b132ceed12d24d3f3ff52",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17436/l_ipp_oneapi_p_2021.1.1.47_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17436/l_ipp_oneapi_p_2021.1.1.47_offline.sh",
sha256="2656a3a7f1f9f1438cbdf98fd472a213c452754ef9476dd65190a7d46618ba86",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py
index 6e8bb45078..ed40dbac35 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py
@@ -29,6 +29,30 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage):
)
version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4592da40-6f1c-4d4b-aa5b-0bb97ec66c92/intel-cryptography-primitives-library-2025.0.0.616_offline.sh",
+ sha256="a529b52ad8b2bdc2ad8372e11e8dac0df1daebaf8f5ade8a7ceb9b8669778c42",
+ expand=False,
+ )
+ version(
+ "2021.12.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/8d82c537-2756-4000-a6cf-d7fedbfb9499/l_ippcp_oneapi_p_2021.12.1.14_offline.sh",
+ sha256="d83dc57a2471579297dd3a303b93c50c6be37c0f7aaac80d0fc34dda90e4750a",
+ expand=False,
+ )
+ version(
+ "2021.12.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/16cce450-2d08-474f-a783-da6061bd8de9/l_ippcp_oneapi_p_2021.12.0.472_offline.sh",
+ sha256="4a27c6209481b7f4b52f75660c243f0fc9884c18bda34fe8bf8493b9cfb00daa",
+ expand=False,
+ )
+ version(
+ "2021.11.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/a28fefdf-f67e-43a9-8e42-fcccd9da1fff/l_ippcp_oneapi_p_2021.11.0.37_offline.sh",
+ sha256="58c2cee4bacb6a706173e0e59153f96d6686b35b7f124638a7b66c08674226ee",
+ expand=False,
+ )
+ version(
"2021.9.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/6792a758-2d69-4ff3-ad24-233fb3bf56e4/l_ippcp_oneapi_p_2021.9.0.533_offline.sh",
sha256="5eca6fd18d9117f8cb7c599cee418b9cc3d7d5d5404f1350d47289095b6a1254",
@@ -48,61 +72,61 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage):
)
version(
"2021.6.3",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19108/l_ippcp_oneapi_p_2021.6.3.25343_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19108/l_ippcp_oneapi_p_2021.6.3.25343_offline.sh",
sha256="82e7f577a73af8c168a28029019f85136617ac762438e77d21647a70dec74baf",
expand=False,
)
version(
"2021.6.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18999/l_ippcp_oneapi_p_2021.6.2.15006_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18999/l_ippcp_oneapi_p_2021.6.2.15006_offline.sh",
sha256="3c285c12da98a4d16e9a5ba237c8c51780475af54b1d1162185480ac891f16ee",
expand=False,
)
version(
"2021.6.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18923/l_ippcp_oneapi_p_2021.6.1.8714_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18923/l_ippcp_oneapi_p_2021.6.1.8714_offline.sh",
sha256="a83c2e74f78ea00aae877259df38baab31e78bc04c0a387a1de36fff712eb225",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18709/l_ippcp_oneapi_p_2021.6.0.536_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18709/l_ippcp_oneapi_p_2021.6.0.536_offline.sh",
sha256="dac90862b408a6418f3782a5c4bf940939b1307ff4841ecfc6a29322976a2d43",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18470/l_ippcp_oneapi_p_2021.5.1.462_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18470/l_ippcp_oneapi_p_2021.5.1.462_offline.sh",
sha256="7ec058abbc1cdfd240320228d6426c65e5a855fd3a27e11fbd1ad2523f64812a",
expand=False,
)
version(
"2021.5.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18364/l_ippcp_oneapi_p_2021.5.0.445_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18364/l_ippcp_oneapi_p_2021.5.0.445_offline.sh",
sha256="e71aee288cc970b9c9fe21f7d5c300dbc2a4ea0687c7028f200d6b87e6c895a1",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18187/l_ippcp_oneapi_p_2021.4.0.401_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18187/l_ippcp_oneapi_p_2021.4.0.401_offline.sh",
sha256="2ca2320f733ee75b4a27865185a1b0730879fe2c47596e570b1bd50d0b8ac608",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17886/l_ippcp_oneapi_p_2021.3.0.315_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17886/l_ippcp_oneapi_p_2021.3.0.315_offline.sh",
sha256="0214d132d8e64b02e9cc63182e2099fb9caebf8c240fb1629ae898c2e1f72fb9",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17684/l_ippcp_oneapi_p_2021.2.0.231_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17684/l_ippcp_oneapi_p_2021.2.0.231_offline.sh",
sha256="64cd5924b42f924b6a8128a8bf8e686f5dc52b98f586ffac6c2e2f1585e3aba9",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17415/l_ippcp_oneapi_p_2021.1.1.54_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17415/l_ippcp_oneapi_p_2021.1.1.54_offline.sh",
sha256="c0967afae22c7a223ec42542bcc702121064cd3d8f680eff36169c94f964a936",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py b/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py
index c24c602981..7c33c0d4e8 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py
@@ -28,6 +28,18 @@ class IntelOneapiItac(IntelOneApiPackage):
maintainers("rscohn2")
version(
+ "2022.4.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d75145c0-e3e2-4806-a2f8-8e46972ea2cb/l_itac_oneapi_p_2022.4.0.16_offline.sh",
+ sha256="746a51d91be17e5916ec74d6b3691bf58c2820cc9a2920f104e6e96383505bbe",
+ expand=False,
+ )
+ version(
+ "2022.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/644eec67-83d9-4bdd-be0d-d90587ec72ed/l_itac_oneapi_p_2022.1.0.158_offline.sh",
+ sha256="2a1f4be6b349d1629006ee72087b361a5f3e714bddd1ef932045d0c03c0b20e8",
+ expand=False,
+ )
+ version(
"2022.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/e83526f5-7e0f-4708-9e0d-47f1e65f29aa/l_itac_oneapi_p_2022.0.0.49690_offline.sh",
sha256="6ab2888afcfc981273aed3df316463fbaf511faf83ee091ca79016459b03b79e",
@@ -41,25 +53,25 @@ class IntelOneapiItac(IntelOneApiPackage):
)
version(
"2021.8.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19129/l_itac_oneapi_p_2021.8.0.25341_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19129/l_itac_oneapi_p_2021.8.0.25341_offline.sh",
sha256="9e943e07cbe7bcb2c6ec181cea5a2fd2241555bed695050f5069467fe7140c37",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19024/l_itac_oneapi_p_2021.7.1.15324_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19024/l_itac_oneapi_p_2021.7.1.15324_offline.sh",
sha256="fb26689efdb7369e211b5cf05f3e30d491a2787f24fef174b23241b997cc442f",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18886/l_itac_oneapi_p_2021.7.0.8707_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18886/l_itac_oneapi_p_2021.7.0.8707_offline.sh",
sha256="719faeccfb1478f28110b72b1558187590a6f44cce067158f407ab335a7395bd",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18694/l_itac_oneapi_p_2021.6.0.434_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18694/l_itac_oneapi_p_2021.6.0.434_offline.sh",
sha256="1ecc2735da960041b051e377cadb9f6ab2f44e8aa44d0f642529a56a3cbba436",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
index 12ba4f142a..305f339547 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py
@@ -26,6 +26,43 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
)
version(
+ "2025.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/246ea40e-5aa7-42a4-81fa-0c029dc8650f/intel-onemkl-2025.0.1.16_offline.sh",
+ sha256="bd86677aa17499c89ca7a3c3c83b73f0644147e4f1d2a218b45a7349cf582f4a",
+ expand=False,
+ )
+ version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/79153e0f-74d7-45af-b8c2-258941adf58a/intel-onemkl-2025.0.0.940_offline.sh",
+ sha256="c0fe8c43718c56858df96ad469b22d9d5e5c1aa4b872e34c6cbebfb17bd15b9c",
+ expand=False,
+ )
+ version(
+ "2024.2.2",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/89a381f6-f85d-4dda-ae62-30d51470f53c/l_onemkl_p_2024.2.2.17_offline.sh",
+ sha256="6b64ab95567bee53d6cf7e78f9f7b15695902fb9da0d20c29e638ad001b6b348",
+ expand=False,
+ preferred=True,
+ )
+ version(
+ "2024.2.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6e00e368-b61d-4f87-a409-9b510c022a37/l_onemkl_p_2024.2.1.105_offline.sh",
+ sha256="adfb1391f87a0a638772ac3146db92126a4accf4da1fe8707a000b27dd2448ef",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cdff21a5-6ac7-4b41-a7ec-351b5f9ce8fd/l_onemkl_p_2024.2.0.664_offline.sh",
+ sha256="f1f46f5352c197a9840e08fc191a879dad79ebf742fe782e386ba8006f262f7a",
+ expand=False,
+ )
+ version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2f3a5785-1c41-4f65-a2f9-ddf9e0db3ea0/l_onemkl_p_2024.1.0.695_offline.sh",
+ sha256="b121bc70d3493ef1fbd05f077b1cd27ac4eb2fd1099f44e9f4b8a1366995fb92",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/86d6a4c1-c998-4c6b-9fff-ca004e9f7455/l_onemkl_p_2024.0.0.49673_offline.sh",
sha256="2a3be7d01d75ba8cc3059f9a32ae72e5bfc93e68e72e94e79d7fa6ea2f7814de",
@@ -45,65 +82,67 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19138/l_onemkl_p_2023.0.0.25398_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19138/l_onemkl_p_2023.0.0.25398_offline.sh",
sha256="0d61188e91a57bdb575782eb47a05ae99ea8eebefee6b2dfe20c6708e16e9927",
expand=False,
)
version(
"2022.2.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19038/l_onemkl_p_2022.2.1.16993_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19038/l_onemkl_p_2022.2.1.16993_offline.sh",
sha256="eedd4b795720de776b1fc5f542ae0fac37ec235cdb567f7c2ee3182e73e3e59d",
expand=False,
)
version(
"2022.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18898/l_onemkl_p_2022.2.0.8748_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18898/l_onemkl_p_2022.2.0.8748_offline.sh",
sha256="07d7caedd4b9f025c6fd439a0d2c2f279b18ecbbb63cadb864f6c63c1ed942db",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18721/l_onemkl_p_2022.1.0.223_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18721/l_onemkl_p_2022.1.0.223_offline.sh",
sha256="4b325a3c4c56e52f4ce6c8fbb55d7684adc16425000afc860464c0f29ea4563e",
expand=False,
)
version(
"2022.0.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18483/l_onemkl_p_2022.0.2.136_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18483/l_onemkl_p_2022.0.2.136_offline.sh",
sha256="134b748825a474acc862bb4a7fada99741a15b7627cfaa6ba0fb05ec0b902b5e",
expand=False,
)
version(
"2022.0.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18444/l_onemkl_p_2022.0.1.117_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18444/l_onemkl_p_2022.0.1.117_offline.sh",
sha256="22afafbe2f3762eca052ac21ec40b845ff2f3646077295c88c2f37f80a0cc160",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18222/l_onemkl_p_2021.4.0.640_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18222/l_onemkl_p_2021.4.0.640_offline.sh",
sha256="9ad546f05a421b4f439e8557fd0f2d83d5e299b0d9bd84bdd86be6feba0c3915",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17901/l_onemkl_p_2021.3.0.520_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17901/l_onemkl_p_2021.3.0.520_offline.sh",
sha256="a06e1cdbfd8becc63440b473b153659885f25a6e3c4dcb2907ad9cd0c3ad59ce",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17757/l_onemkl_p_2021.2.0.296_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17757/l_onemkl_p_2021.2.0.296_offline.sh",
sha256="816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17402/l_onemkl_p_2021.1.1.52_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17402/l_onemkl_p_2021.1.1.52_offline.sh",
sha256="818b6bd9a6c116f4578cda3151da0612ec9c3ce8b2c8a64730d625ce5b13cc0c",
expand=False,
)
+ variant("gfortran", default=False, description="Compatibility with GNU Fortran")
+
variant("shared", default=True, description="Builds shared library")
variant("ilp64", default=False, description="Build with ILP64 support")
variant(
@@ -125,15 +164,51 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
multi=False,
)
+ requires(
+ "%clang",
+ "%gcc",
+ "%intel",
+ "%oneapi",
+ policy="one_of",
+ when="threads=openmp",
+ msg="MKL with OpenMP threading requires GCC, clang, or Intel compilers",
+ )
+
depends_on("tbb")
# cluster libraries need mpi
depends_on("mpi", when="+cluster")
+ # If a +cluster then mpi_family must be set
+ with when("+cluster"):
+ conflicts("mpi_family=none")
+ requires("mpi_family=mpich", when="^intel-oneapi-mpi")
+ requires("mpi_family=mpich", when="^intel-mpi")
+ requires("mpi_family=mpich", when="^mpich")
+ requires("mpi_family=mpich", when="^mvapich")
+ requires("mpi_family=mpich", when="^mvapich2")
+ requires("mpi_family=mpich", when="^cray-mpich")
+ requires("mpi_family=openmpi", when="^openmpi")
+ requires("mpi_family=openmpi", when="^hpcx-mpi")
+
provides("fftw-api@3")
provides("scalapack", when="+cluster")
provides("mkl")
provides("lapack", "blas")
+ @run_after("install")
+ def fixup_installation(self):
+ # fixup missing path in mkl cmake files. This issue was new in
+ # 2024.0.0 and expected to be fixed in the next release.
+ if self.spec.satisfies("@2024.0.0"):
+ # cannot use spack patch because this is applied to the
+ # installed mkl, not sources
+ filter_file(
+ 'PATH_SUFFIXES "lib"',
+ 'PATH_SUFFIXES "lib" "../../compiler/latest/lib"',
+ self.component_prefix.lib.cmake.mkl.join("MKLConfig.cmake"),
+ backup=False,
+ )
+
@property
def v2_layout_versions(self):
return "@2024:"
@@ -158,7 +233,10 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
# Only if environment modifications are desired (default is +envmods)
if self.spec.satisfies("+envmods"):
env.set("MKLROOT", self.component_prefix)
+ # 2023.1.0 has the pkgconfig files in lib/pkgconfig, 2021.3.0 has them in
+ # tools/pkgconfig, just including both in PKG_CONFIG_PATH
env.append_path("PKG_CONFIG_PATH", self.component_prefix.lib.pkgconfig)
+ env.append_path("PKG_CONFIG_PATH", self.component_prefix.tools.pkgconfig)
def _find_mkl_libs(self, shared):
libs = []
@@ -166,7 +244,17 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
if self.spec.satisfies("+cluster"):
libs.extend([self._xlp64_lib("libmkl_scalapack"), "libmkl_cdft_core"])
- libs.append(self._xlp64_lib("libmkl_intel"))
+ # Explicit variant for compatibility with gfortran, otherwise
+ # support intel fortran. Be aware that some dependencies may
+ # be using this logic and other dependencies might be using
+ # cmake for the library list and they have to be consistent.
+ # https://github.com/spack/spack/pull/43673 for discussion
+ if self.spec.satisfies("+gfortran"):
+ depends_on("fortran", type="build")
+ libs.append(self._xlp64_lib("libmkl_gf"))
+ else:
+ libs.append(self._xlp64_lib("libmkl_intel"))
+
if self.spec.satisfies("threads=tbb"):
libs.append("libmkl_tbb_thread")
elif self.spec.satisfies("threads=openmp"):
@@ -180,36 +268,20 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
libs.append("libmkl_core")
if self.spec.satisfies("+cluster"):
- if any(
- self.spec.satisfies(m)
- for m in [
- "^intel-oneapi-mpi",
- "^intel-mpi",
- "^mpich",
- "^cray-mpich",
- "mpi_family=mpich",
- ]
- ):
+ if self.spec.satisfies("mpi_family=mpich"):
libs.append(self._xlp64_lib("libmkl_blacs_intelmpi"))
- elif any(
- self.spec.satisfies(m) for m in ["^openmpi", "^hpcx-mpi", "mpi_family=openmpi"]
- ):
+ elif self.spec.satisfies("mpi_family=openmpi"):
libs.append(self._xlp64_lib("libmkl_blacs_openmpi"))
- else:
- raise RuntimeError(
- (
- "intel-oneapi-mkl +cluster requires one of ^intel-oneapi-mpi, "
- "^intel-mpi, ^mpich, ^cray-mpich, mpi_family=mpich, ^openmpi, "
- "^hpcx-mpi, or mpi_family=openmpi"
- )
- )
lib_path = (
self.component_prefix.lib if self.v2_layout else self.component_prefix.lib.intel64
)
lib_path = lib_path if isdir(lib_path) else dirname(lib_path)
+ # resolved_libs is populated as follows
+ # MKL-related + MPI-related + threading-related
resolved_libs = find_libraries(libs, lib_path, shared=shared)
+
# Add MPI libraries for cluster support. If MPI is not in the
# spec, then MKL is externally installed and application must
# link with MPI libaries. If MPI is in spec, but there are no
@@ -218,8 +290,11 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
try:
if self.spec.satisfies("+cluster ^mpi"):
resolved_libs = resolved_libs + self.spec["mpi"].libs
- except spack.error.NoLibrariesError:
+ except NoLibrariesError:
pass
+
+ if self.spec.satisfies("threads=openmp"):
+ resolved_libs += self.openmp_libs()
return resolved_libs
def _xlp64_lib(self, lib):
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
index 14743bfc8f..79e4443626 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
@@ -22,6 +22,42 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html"
version(
+ "2021.14.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1acd5e79-796c-401a-ab31-a3dc7b20c6a2/intel-mpi-2021.14.1.7_offline.sh",
+ sha256="6459b9fc81fad9b9955de7fd9904e67fcf2ada3564ce0a74b9c14ea8fb533ddf",
+ expand=False,
+ )
+ version(
+ "2021.14.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4b14b28c-2ca6-4559-a0ca-8a157627e0c8/intel-mpi-2021.14.0.791_offline.sh",
+ sha256="81ea7aaf8039c134b4df40bab1423a269425d26bb90ac05f7decac39719d21f3",
+ expand=False,
+ )
+ version(
+ "2021.13.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/364c798c-4cad-4c01-82b5-e1edd1b476af/l_mpi_oneapi_p_2021.13.1.769_offline.sh",
+ sha256="be61c4792d25bd4a1b5f7b808c06a9f4676f1b247d7605ac6d3c6cffdb8f19b7",
+ expand=False,
+ )
+ version(
+ "2021.13.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9f84e1e8-11b2-4bd1-8512-3e3343585956/l_mpi_oneapi_p_2021.13.0.719_offline.sh",
+ sha256="5e23cf495c919e17032577e3059438f632297ee63f2cdb906a2547298823cc64",
+ expand=False,
+ )
+ version(
+ "2021.12.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56b2dd0e-954d-4330-b0a7-b22992f7e6b7/l_mpi_oneapi_p_2021.12.1.8_offline.sh",
+ sha256="6a4cd82ff1c64eac2a7ac3784ea2dc3a0e32740fb7e7bc6a1aa48740d5011b2f",
+ expand=False,
+ )
+ version(
+ "2021.12.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/749f02a5-acb8-4bbb-91db-501ff80d3f56/l_mpi_oneapi_p_2021.12.0.538_offline.sh",
+ sha256="6ccfc35784ec86d898f4c1cedf82c4f71926123a12db64111f67e7d0286bbb2d",
+ expand=False,
+ )
+ version(
"2021.11.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/2c45ede0-623c-4c8e-9e09-bed27d70fa33/l_mpi_oneapi_p_2021.11.0.49513_offline.sh",
sha256="9a96caeb7abcf5aa08426216db38a2c7936462008b9825036266bc79cb0e30d8",
@@ -41,61 +77,61 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
)
version(
"2021.8.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19131/l_mpi_oneapi_p_2021.8.0.25329_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19131/l_mpi_oneapi_p_2021.8.0.25329_offline.sh",
sha256="0fcb1171fc42fd4b2d863ae474c0b0f656b0fa1fdc1df435aa851ccd6d1eaaf7",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19010/l_mpi_oneapi_p_2021.7.1.16815_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19010/l_mpi_oneapi_p_2021.7.1.16815_offline.sh",
sha256="90e7804f2367d457cd4cbf7aa29f1c5676287aa9b34f93e7c9a19e4b8583fff7",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18926/l_mpi_oneapi_p_2021.7.0.8711_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18926/l_mpi_oneapi_p_2021.7.0.8711_offline.sh",
sha256="4eb1e1487b67b98857bc9b7b37bcac4998e0aa6d1b892b2c87b003bf84fb38e9",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18714/l_mpi_oneapi_p_2021.6.0.602_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18714/l_mpi_oneapi_p_2021.6.0.602_offline.sh",
sha256="e85db63788c434d43c1378e5e2bf7927a75d11aee8e6b78ee0d933da920977a6",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18471/l_mpi_oneapi_p_2021.5.1.515_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18471/l_mpi_oneapi_p_2021.5.1.515_offline.sh",
sha256="b992573959e39752e503e691564a0d876b099547c38b322d5775c5b06ec07a7f",
expand=False,
)
version(
"2021.5.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18370/l_mpi_oneapi_p_2021.5.0.495_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18370/l_mpi_oneapi_p_2021.5.0.495_offline.sh",
sha256="3aae53fe77f7c6aac7a32b299c25d6ca9a00ba4e2d512a26edd90811e59e7471",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18186/l_mpi_oneapi_p_2021.4.0.441_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18186/l_mpi_oneapi_p_2021.4.0.441_offline.sh",
sha256="cc4b7072c61d0bd02b1c431b22d2ea3b84b967b59d2e587e77a9e7b2c24f2a29",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17947/l_mpi_oneapi_p_2021.3.0.294_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17947/l_mpi_oneapi_p_2021.3.0.294_offline.sh",
sha256="04c48f864ee4c723b1b4ca62f2bea8c04d5d7e3de19171fd62b17868bc79bc36",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17729/l_mpi_oneapi_p_2021.2.0.215_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17729/l_mpi_oneapi_p_2021.2.0.215_offline.sh",
sha256="d0d4cdd11edaff2e7285e38f537defccff38e37a3067c02f4af43a3629ad4aa3",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17397/l_mpi_oneapi_p_2021.1.1.76_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17397/l_mpi_oneapi_p_2021.1.1.76_offline.sh",
sha256="8b7693a156c6fc6269637bef586a8fd3ea6610cac2aae4e7f48c1fbb601625fe",
expand=False,
)
@@ -104,7 +140,12 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
variant(
"generic-names",
default=False,
- description="Use generic names, e.g mpicc instead of mpiicc",
+ description="Use generic names, e.g mpicc instead of mpiicx",
+ )
+ variant(
+ "classic-names",
+ default=False,
+ description="Use classic compiler names, e.g mpiicc instead of mpiicx",
)
variant(
"external-libfabric", default=False, description="Enable external libfabric dependency"
@@ -112,6 +153,11 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
depends_on("libfabric", when="+external-libfabric", type=("link", "run"))
provides("mpi@:3.1")
+ conflicts("+generic-names +classic-names")
+
+ @property
+ def mpiexec(self):
+ return self.component_prefix.bin.mpiexec
@property
def v2_layout_versions(self):
@@ -123,63 +169,59 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
@property
def env_script_args(self):
- if "+external-libfabric" in self.spec:
+ if self.spec.satisfies("+external-libfabric"):
return ("-i_mpi_ofi_internal=0",)
else:
return ()
- def setup_dependent_package(self, module, dep_spec):
- if "+generic-names" in self.spec:
- self.spec.mpicc = join_path(self.component_prefix.bin, "mpicc")
- self.spec.mpicxx = join_path(self.component_prefix.bin, "mpicxx")
- self.spec.mpif77 = join_path(self.component_prefix.bin, "mpif77")
- self.spec.mpifc = join_path(self.component_prefix.bin, "mpifc")
+ def wrapper_names(self):
+ if self.spec.satisfies("+generic-names"):
+ return ["mpicc", "mpicxx", "mpif77", "mpif90", "mpifc"]
+ elif self.spec.satisfies("+classic-names"):
+ return ["mpiicc", "mpiicpc", "mpiifort", "mpiifort", "mpiifort"]
else:
- self.spec.mpicc = join_path(self.component_prefix.bin, "mpiicc")
- self.spec.mpicxx = join_path(self.component_prefix.bin, "mpiicpc")
- self.spec.mpif77 = join_path(self.component_prefix.bin, "mpiifort")
- self.spec.mpifc = join_path(self.component_prefix.bin, "mpiifort")
+ return ["mpiicx", "mpiicpx", "mpiifx", "mpiifx", "mpiifx"]
+
+ def wrapper_paths(self):
+ return [self.component_prefix.bin.join(name) for name in self.wrapper_names()]
+
+ def setup_dependent_package(self, module, dep_spec):
+ wrappers = self.wrapper_paths()
+ self.spec.mpicc = wrappers[0]
+ self.spec.mpicxx = wrappers[1]
+ self.spec.mpif77 = wrappers[2]
+ # no self.spec.mpif90
+ self.spec.mpifc = wrappers[4]
def setup_dependent_build_environment(self, env, dependent_spec):
- env.set("I_MPI_CC", spack_cc)
- env.set("I_MPI_CXX", spack_cxx)
- env.set("I_MPI_F77", spack_f77)
- env.set("I_MPI_F90", spack_fc)
- env.set("I_MPI_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("I_MPI_CC", dependent_module.spack_cc)
+ env.set("I_MPI_CXX", dependent_module.spack_cxx)
+ env.set("I_MPI_F77", dependent_module.spack_f77)
+ env.set("I_MPI_F90", dependent_module.spack_fc)
+ env.set("I_MPI_FC", dependent_module.spack_fc)
# Set compiler wrappers for dependent build stage
- if "+generic-names" in self.spec:
- env.set("MPICC", join_path(self.component_prefix.bin, "mpicc"))
- env.set("MPICXX", join_path(self.component_prefix.bin, "mpicxx"))
- env.set("MPIF77", join_path(self.component_prefix.bin, "mpif77"))
- env.set("MPIF90", join_path(self.component_prefix.bin, "mpif90"))
- env.set("MPIFC", join_path(self.component_prefix.bin, "mpifc"))
- else:
- env.set("MPICC", join_path(self.component_prefix.bin, "mpiicc"))
- env.set("MPICXX", join_path(self.component_prefix.bin, "mpiicpc"))
- env.set("MPIF77", join_path(self.component_prefix.bin, "mpiifort"))
- env.set("MPIF90", join_path(self.component_prefix.bin, "mpiifort"))
- env.set("MPIFC", join_path(self.component_prefix.bin, "mpiifort"))
+ wrappers = self.wrapper_paths()
+ env.set("MPICC", wrappers[0])
+ env.set("MPICXX", wrappers[1])
+ env.set("MPIF77", wrappers[2])
+ env.set("MPIF90", wrappers[3])
+ env.set("MPIFC", wrappers[4])
env.set("I_MPI_ROOT", self.component_prefix)
@property
- def headers(self):
- return self.header_directories(
- [self.component_prefix.include, self.component_prefix.include.ilp64]
- )
-
- @property
def libs(self):
libs = []
- if "+ilp64" in self.spec:
+ if self.spec.satisfies("+ilp64"):
libs += find_libraries("libmpi_ilp64", self.component_prefix.lib.release)
libs += find_libraries(["libmpicxx", "libmpifort"], self.component_prefix.lib)
libs += find_libraries("libmpi", self.component_prefix.lib.release)
libs += find_system_libraries(["libdl", "librt", "libpthread"])
# Find libfabric for libmpi.so
- if "+external-libfabric" in self.spec:
+ if self.spec.satisfies("+external-libfabric"):
libs += self.spec["libfabric"].libs
else:
libs += find_libraries(["libfabric"], self.component_prefix.libfabric.lib)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py b/var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py
new file mode 100644
index 0000000000..961a8e301c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-oneapi-runtime/package.py
@@ -0,0 +1,68 @@
+# Copyright 2013-2024 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 llnl.util import tty
+
+from spack.package import *
+from spack.pkg.builtin.gcc_runtime import get_elf_libraries
+
+
+@IntelOneApiPackage.update_description
+class IntelOneapiRuntime(Package):
+ """Package for OneAPI compiler runtime libraries redistributables."""
+
+ homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi.html"
+ has_code = False
+ license("https://intel.ly/393CijO")
+
+ maintainers("rscohn2")
+
+ tags = ["runtime"]
+
+ requires("%oneapi")
+
+ depends_on("gcc-runtime", type="link")
+
+ LIBRARIES = [
+ "imf",
+ "intlc",
+ "irc",
+ "irng",
+ "svml",
+ "ifcore", # Fortran
+ "ifcoremt", # Fortran
+ "ifport", # Fortran
+ "iomp5",
+ "sycl",
+ ]
+
+ # libifcore ABI
+ provides("fortran-rt", "libifcore@5", when="%oneapi@2021:")
+ provides("sycl")
+
+ conflicts("platform=windows", msg="IntelOneAPI can only be installed on Linux, and FreeBSD")
+ conflicts("platform=darwin", msg="IntelOneAPI can only be installed on Linux, and FreeBSD")
+
+ depends_on("libc", type="link", when="platform=linux")
+
+ def install(self, spec, prefix):
+ libraries = get_elf_libraries(compiler=self.compiler, libraries=self.LIBRARIES)
+ mkdir(prefix.lib)
+
+ if not libraries:
+ tty.warn("Could not detect any shared OneAPI runtime libraries")
+ return
+
+ for path, name in libraries:
+ install(path, os.path.join(prefix.lib, name))
+
+ @property
+ def libs(self):
+ return LibraryList([])
+
+ @property
+ def headers(self):
+ return HeaderList([])
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py
index dba598f342..ae07f734bd 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py
@@ -23,6 +23,30 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage):
)
version(
+ "2022.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9d5f5bd1-6021-41f7-aa3e-36d44c4ac190/intel-onetbb-2022.0.0.403_offline.sh",
+ sha256="02077de6748422c1b5396afc3806addd9b1e832d9807126b54f22ed18853f86f",
+ expand=False,
+ )
+ version(
+ "2021.13.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b9aad7b8-0a4c-4f95-a100-e0e2921d5777/l_tbb_oneapi_p_2021.13.1.15_offline.sh",
+ sha256="cae21300e5e4e3bbb392b24db54246a103c1634296529617292be62e7b8505a4",
+ expand=False,
+ )
+ version(
+ "2021.13.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d6b5327e-f2fd-4c90-966a-d7a0e1376686/l_tbb_oneapi_p_2021.13.0.629_offline.sh",
+ sha256="f16586e5d8c479d05662359c95c6720445e95a21443f3979c9321d154947ca99",
+ expand=False,
+ )
+ version(
+ "2021.12.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b31f6b79-10aa-4119-a437-48fe2775633b/l_tbb_oneapi_p_2021.12.0.499_offline.sh",
+ sha256="13e981cb4d9d3f72058cc136f8cdedf6ba9af225ae317f91b59e2050b0d49e43",
+ expand=False,
+ )
+ version(
"2021.11.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/af3ad519-4c87-4534-87cb-5c7bda12754e/l_tbb_oneapi_p_2021.11.0.49527_offline.sh",
sha256="dd878ee979d7b6da4eb973adfebf814d9d7eed86b875d31e3662d100b2fa0956",
@@ -42,61 +66,61 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage):
)
version(
"2021.8.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19143/l_tbb_oneapi_p_2021.8.0.25334_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19143/l_tbb_oneapi_p_2021.8.0.25334_offline.sh",
sha256="41074fcf6a33e41f9e8007609100e40c27f4e36b709b964835eff823e655486b",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19041/l_tbb_oneapi_p_2021.7.1.15005_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19041/l_tbb_oneapi_p_2021.7.1.15005_offline.sh",
sha256="f13a8e740d69347b5985c1be496a3259a86d64ec94933b3d26100dbc2f059fd4",
expand=False,
)
version(
"2021.7.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18901/l_tbb_oneapi_p_2021.7.0.8712_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18901/l_tbb_oneapi_p_2021.7.0.8712_offline.sh",
sha256="879bd2004b8e93bc12c53c43eab44cd843433e3da7a976baa8bf07a1069a87c5",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18728/l_tbb_oneapi_p_2021.6.0.835_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18728/l_tbb_oneapi_p_2021.6.0.835_offline.sh",
sha256="e9ede40a3d7745de6d711d43818f820c8486ab544a45610a71118fbca20698e5",
expand=False,
)
version(
"2021.5.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18473/l_tbb_oneapi_p_2021.5.1.738_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18473/l_tbb_oneapi_p_2021.5.1.738_offline.sh",
sha256="c154749f1f370e4cde11a0a7c80452d479e2dfa53ff2b1b97003d9c0d99c91e3",
expand=False,
)
version(
"2021.5.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18380/l_tbb_oneapi_p_2021.5.0.707_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18380/l_tbb_oneapi_p_2021.5.0.707_offline.sh",
sha256="6ff7890a74a43ae02e0fa2d9c5533fce70a49dff8e73278b546a0995367fec5e",
expand=False,
)
version(
"2021.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18194/l_tbb_oneapi_p_2021.4.0.643_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18194/l_tbb_oneapi_p_2021.4.0.643_offline.sh",
sha256="33332012ff8ffe7987b1a20bea794d76f7d8050ccff04fa6e1990974c336ee24",
expand=False,
)
version(
"2021.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17952/l_tbb_oneapi_p_2021.3.0.511_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17952/l_tbb_oneapi_p_2021.3.0.511_offline.sh",
sha256="b83f5e018e3d262e42e9c96881845bbc09c3f036c265e65023422ca8e8637633",
expand=False,
)
version(
"2021.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17759/l_tbb_oneapi_p_2021.2.0.357_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17759/l_tbb_oneapi_p_2021.2.0.357_offline.sh",
sha256="c1c3623c5bef547b30eac009e7a444611bf714c758d7472c114e9be9d5700eba",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17378/l_tbb_oneapi_p_2021.1.1.119_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17378/l_tbb_oneapi_p_2021.1.1.119_offline.sh",
sha256="535290e3910a9d906a730b24af212afa231523cf13a668d480bade5f2a01b53b",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py
index ebee643db8..e42bbc6303 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py
@@ -33,43 +33,43 @@ class IntelOneapiVpl(IntelOneApiLibraryPackage):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19134/l_oneVPL_p_2023.0.0.25332_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19134/l_oneVPL_p_2023.0.0.25332_offline.sh",
sha256="69e42fc7f412271c92395412a693bd158ef6df1472b3e0e783a63fddfc44c5af",
expand=False,
)
version(
"2022.2.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18903/l_oneVPL_p_2022.2.0.8703_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18903/l_oneVPL_p_2022.2.0.8703_offline.sh",
sha256="cb8af222d194ebb4b1dafe12e0b70cbbdee204f9fcfe9eafb46b287ee33b3797",
expand=False,
)
version(
"2022.1.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18750/l_oneVPL_p_2022.1.0.154_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18750/l_oneVPL_p_2022.1.0.154_offline.sh",
sha256="486cca918c9772a43f62da77e07cdf54dabb92ecebf494eb8c89c4492ab43447",
expand=False,
)
version(
"2022.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18375/l_oneVPL_p_2022.0.0.58_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18375/l_oneVPL_p_2022.0.0.58_offline.sh",
sha256="600b8566e1aa523b97291bed6b08f69a04bc7c4c75c035942a64a38f45a1a7f0",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18190/l_oneVPL_p_2021.6.0.458_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18190/l_oneVPL_p_2021.6.0.458_offline.sh",
sha256="40c50008be3f03d17cc8c0c34324593c1d419ee4c45af5543aa5a2d5fb11071f",
expand=False,
)
version(
"2021.2.2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17733/l_oneVPL_p_2021.2.2.212_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17733/l_oneVPL_p_2021.2.2.212_offline.sh",
sha256="21106ba5cde22f3e31fd55280fbccf263508fa054030f12d5dff4a5379ef3bb7",
expand=False,
)
version(
"2021.1.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/17418/l_oneVPL_p_2021.1.1.66_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17418/l_oneVPL_p_2021.1.1.66_offline.sh",
sha256="0fec42545b30b7bb2e4e33deb12ab27a02900f5703153d9601673a8ce43082ed",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py
index 4cfe6b4002..1b5d942535 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py
@@ -26,6 +26,48 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk):
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html"
version(
+ "2025.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1277cea4-34b7-4221-bdbc-4f47a9a5592d/intel-vtune-2025.0.1.16_offline.sh",
+ sha256="e0917aab901018d2786df2fcfbaea2bf9c4ff7d5b7f9413e9f3d6860bb743f82",
+ expand=False,
+ )
+ version(
+ "2025.0.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e7797b12-ce87-4df0-aa09-df4a272fc5d9/intel-vtune-2025.0.0.1130_offline.sh",
+ sha256="6742e5c6b1cd6e4efb794bde5d995ba738be1a991ac84678e0efca04fc080074",
+ expand=False,
+ )
+ version(
+ "2024.3.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d7e1fdb1-cfc7-40fb-bf46-3719e9372d67/l_oneapi_vtune_p_2024.3.0.31_offline.sh",
+ sha256="da9f45ee4a5ea337756e85e58e40b235417cffbca6813cf224db49061947253d",
+ expand=False,
+ )
+ version(
+ "2024.2.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d703d28b-d70b-4c90-bdb1-c3562c1084e5/l_oneapi_vtune_p_2024.2.1.68_offline.sh",
+ sha256="09d8a6b025eb895a3a5fa593f63de1f04aced37bf7f7c1ec8efc2525df8bb4f1",
+ expand=False,
+ )
+ version(
+ "2024.2.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3ffac886-6281-46d7-8704-7aab66705926/l_oneapi_vtune_p_2024.2.0.708_offline.sh",
+ sha256="a0b6be945d54ec5b8f3f4edf3ca9d0027df3fd1f139c266f29f8d2c6f1608562",
+ expand=False,
+ )
+ version(
+ "2024.1.0",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/671388a1-607e-463c-8d91-db4eebc2e8d2/l_oneapi_vtune_p_2024.1.0.519_offline.sh",
+ sha256="d92fa6eb8470f8f8a262ae6f825f1a2a80bd11591bde40c1ebe7fb92affbc682",
+ expand=False,
+ )
+ version(
+ "2024.0.1",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56d0db2b-1ff1-4abe-857a-72ca9be22bd3/l_oneapi_vtune_p_2024.0.1.14_offline.sh",
+ sha256="2c9b28ed91562deeea211b341cb257cc55051ac29c064b9cf65b4517b958724d",
+ expand=False,
+ )
+ version(
"2024.0.0",
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/1722cc83-ceb2-4304-b4dc-2813780222a3/l_oneapi_vtune_p_2024.0.0.49503_offline.sh",
sha256="09537329bdf6e105b0e164f75dc8ae122adc99a64441f6a52225509bcff3b848",
@@ -45,43 +87,43 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk):
)
version(
"2023.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19136/l_oneapi_vtune_p_2023.0.0.25339_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19136/l_oneapi_vtune_p_2023.0.0.25339_offline.sh",
sha256="77fb356b501177d7bd5c936729ba4c1ada45935dc45a8ecd2f1164c276feb1ea",
expand=False,
)
version(
"2022.4.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/19027/l_oneapi_vtune_p_2022.4.1.16919_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19027/l_oneapi_vtune_p_2022.4.1.16919_offline.sh",
sha256="eb4b4da61eea52c08fc139dbf4630e2c52cbcfaea8f1376c545c0863839366d1",
expand=False,
)
version(
"2022.4.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18888/l_oneapi_vtune_p_2022.4.0.8705_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18888/l_oneapi_vtune_p_2022.4.0.8705_offline.sh",
sha256="8c5a144ed61ef9addaa41abe7fbfceeedb6a8fe1c5392e3e265aada1f545b0fe",
expand=False,
)
version(
"2022.3.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18656/l_oneapi_vtune_p_2022.3.0.195_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18656/l_oneapi_vtune_p_2022.3.0.195_offline.sh",
sha256="7921fce7fcc3b82575be22d9c36beec961ba2a9fb5262ba16a04090bcbd2e1a6",
expand=False,
)
version(
"2022.0.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18406/l_oneapi_vtune_p_2022.0.0.94_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18406/l_oneapi_vtune_p_2022.0.0.94_offline.sh",
sha256="aa4d575c22e7be0c950b87d67d9e371f470f682906864c4f9b68e530ecd22bd7",
expand=False,
)
version(
"2021.7.1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18086/l_oneapi_vtune_p_2021.7.1.492_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18086/l_oneapi_vtune_p_2021.7.1.492_offline.sh",
sha256="4cf17078ae6e09f26f70bd9d0b726af234cc30c342ae4a8fda69941b40139b26",
expand=False,
)
version(
"2021.6.0",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/18012/l_oneapi_vtune_p_2021.6.0.411_offline.sh",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18012/l_oneapi_vtune_p_2021.6.0.411_offline.sh",
sha256="6b1df7da713337aa665bcc6ff23e4a006695b5bfaf71dffd305cbadca2e5560c",
expand=False,
)
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index 20830ea23a..5a64a75820 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -31,186 +31,186 @@ class IntelParallelStudio(IntelPackage):
version(
"cluster.2020.4",
sha256="f36e49da97b6ce24d2d464d73d7ff49d71cff20e1698c20e607919819602a9f5",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17113/parallel_studio_xe_2020_update4_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/17113/parallel_studio_xe_2020_update4_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2020.2",
sha256="4795c44374e8988b91da20ac8f13022d7d773461def4a26ca210a8694f69f133",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16744/parallel_studio_xe_2020_update2_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16744/parallel_studio_xe_2020_update2_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2020.1",
sha256="fd11d8de72b2bd60474f8bce7b463e4cbb2255969b9eaf24f689575aa2a2abab",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16526/parallel_studio_xe_2020_update1_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16526/parallel_studio_xe_2020_update1_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2020.0",
sha256="573b1d20707d68ce85b70934cfad15b5ad9cc14124a261c17ddd7717ba842c64",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16225/parallel_studio_xe_2020_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16225/parallel_studio_xe_2020_cluster_edition.tgz",
deprecated=True,
)
#
version(
"cluster.2019.5",
sha256="c03421de616bd4e640ed25ce4103ec9c5c85768a940a5cb5bd1e97b45be33904",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15809/parallel_studio_xe_2019_update5_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15809/parallel_studio_xe_2019_update5_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2019.4",
sha256="32aee12de3b5ca14caf7578313c06b205795c67620f4a9606ea45696ee3b3d9e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15533/parallel_studio_xe_2019_update4_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15533/parallel_studio_xe_2019_update4_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2019.3",
sha256="b5b022366d6d1a98dbb63b60221c62bc951c9819653ad6f5142192e89f78cf63",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15268/parallel_studio_xe_2019_update3_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15268/parallel_studio_xe_2019_update3_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2019.2",
sha256="8c526bdd95d1da454e5cada00f7a2353089b86d0c9df2088ca7f842fe3ff4cae",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15088/parallel_studio_xe_2019_update2_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15088/parallel_studio_xe_2019_update2_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2019.1",
sha256="3a1eb39f15615f7a2688426b9835e5e841e0c030f21dcfc899fe23e09bd2c645",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14850/parallel_studio_xe_2019_update1_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14850/parallel_studio_xe_2019_update1_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2019.0",
sha256="1096dd4139bdd4b3abbda69a17d1e229a606759f793f5b0ba0d39623928ee4a1",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13589/parallel_studio_xe_2019_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13589/parallel_studio_xe_2019_cluster_edition.tgz",
deprecated=True,
)
#
version(
"cluster.2018.4",
sha256="210a5904a860e11b861720e68416f91fd47a459e4500976853291fa8b0478566",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13717/parallel_studio_xe_2018_update4_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13717/parallel_studio_xe_2018_update4_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2018.3",
sha256="23c64b88cea5056eaeef7b4ae0f4c6a86485c97f5e41d6c8419cb00aa4929287",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12998/parallel_studio_xe_2018_update3_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12998/parallel_studio_xe_2018_update3_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2018.2",
sha256="550bc4758f7dd70e75830d329947532ad8b7cbb85225b8ec6db7e78a3f1d6d84",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12717/parallel_studio_xe_2018_update2_cluster_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12717/parallel_studio_xe_2018_update2_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2018.1",
sha256="f7a94e83248d2641eb7ae2c1abf681067203a5b4372619e039861b468744774c",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12374/parallel_studio_xe_2018_update1_cluster_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12374/parallel_studio_xe_2018_update1_cluster_edition.tgz",
deprecated=True,
)
version(
"cluster.2018.0",
sha256="526e5e71c420dc9b557b0bae2a81abb33eedb9b6a28ac94996ccbcf71cf53774",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12058/parallel_studio_xe_2018_cluster_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12058/parallel_studio_xe_2018_cluster_edition.tgz",
deprecated=True,
)
#
version(
"cluster.2017.7",
sha256="133c3aa99841a4fe48149938a90f971467452a82f033be10cd9464ba810f6360",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12856/parallel_studio_xe_2017_update7.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12856/parallel_studio_xe_2017_update7.tgz",
deprecated=True,
)
version(
"cluster.2017.6",
sha256="d771b00d3658934c424f294170125dc58ae9b03639aa898a2f115d7a7482dd3a",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12534/parallel_studio_xe_2017_update6.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12534/parallel_studio_xe_2017_update6.tgz",
deprecated=True,
)
version(
"cluster.2017.5",
sha256="36e496d1d1d7d7168cc3ba8f5bca9b52022339f30b62a87ed064b77a5cbccc09",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12138/parallel_studio_xe_2017_update5.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12138/parallel_studio_xe_2017_update5.tgz",
deprecated=True,
)
version(
"cluster.2017.4",
sha256="27d34625adfc635d767c136b5417a372f322fabe6701b651d858a8fe06d07f2d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11537/parallel_studio_xe_2017_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11537/parallel_studio_xe_2017_update4.tgz",
deprecated=True,
)
version(
"cluster.2017.3",
sha256="856950c0493de3e8b4150e18f8821675c1cf75c2eea5ff0804f59eb301414bbe",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11460/parallel_studio_xe_2017_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11460/parallel_studio_xe_2017_update3.tgz",
deprecated=True,
)
version(
"cluster.2017.2",
sha256="83a655f0c2969409758488d70d6719fb5ea81a84b6da3feb641ce67bb240bc8a",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11298/parallel_studio_xe_2017_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11298/parallel_studio_xe_2017_update2.tgz",
deprecated=True,
)
version(
"cluster.2017.1",
sha256="c808be744c98f7471c61258144859e8e8fc92771934281a16135803e941fd9b0",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10973/parallel_studio_xe_2017_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/10973/parallel_studio_xe_2017_update1.tgz",
deprecated=True,
)
version(
"cluster.2017.0",
sha256="f380a56a25cf17941eb691a640035e79f92516346500e0df80fbdd46c5c1b301",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9651/parallel_studio_xe_2017.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9651/parallel_studio_xe_2017.tgz",
deprecated=True,
)
#
version(
"cluster.2016.4",
sha256="ea43c150ed6f9967bc781fe4253169a0447c69bac4fe2c563016a1ad2875ae23",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9781/parallel_studio_xe_2016_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9781/parallel_studio_xe_2016_update4.tgz",
deprecated=True,
)
version(
"cluster.2016.3",
sha256="aa7c6f1a6603fae07c2b01409c12de0811aa5947eaa71dfb1fe9898076c2773e",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9061/parallel_studio_xe_2016_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9061/parallel_studio_xe_2016_update3.tgz",
deprecated=True,
)
version(
"cluster.2016.2",
sha256="280bf39c75d7f52f206759ca4d8b6334ab92d5970957b90f5aa286bb0aa8d65e",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8676/parallel_studio_xe_2016_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8676/parallel_studio_xe_2016_update2.tgz",
deprecated=True,
)
version(
"cluster.2016.1",
sha256="f5a3ab9fb581e19bf1bd966f7d40a11905e002a2bfae1c4a2140544288ca3e48",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8365/parallel_studio_xe_2016_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8365/parallel_studio_xe_2016_update1.tgz",
deprecated=True,
)
version(
"cluster.2016.0",
sha256="fd4c32352fd78fc919601bedac5658ad5ac48efbc5700d9a8d42ed7d53bd8bb7",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/7997/parallel_studio_xe_2016.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/7997/parallel_studio_xe_2016.tgz",
deprecated=True,
)
#
version(
"cluster.2015.6",
sha256="e604ed2bb45d227b151dd2898f3edd93526d58d1db1cb9d6b6f614907864f392",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8469/parallel_studio_xe_2015_update6.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8469/parallel_studio_xe_2015_update6.tgz",
deprecated=True,
)
version(
"cluster.2015.1",
sha256="84fdf48d1de20e1d580ba5d419a5bc1c55d217a4f5dc1807190ecffe0229a62b",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/4992/parallel_studio_xe_2015_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/4992/parallel_studio_xe_2015_update1.tgz",
deprecated=True,
)
@@ -222,186 +222,186 @@ class IntelParallelStudio(IntelPackage):
version(
"professional.2020.4",
sha256="f9679a40c63575191385837f4f1bdafbcfd3736f09ac51d0761248b9ca9cc9e6",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17114/parallel_studio_xe_2020_update4_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/17114/parallel_studio_xe_2020_update4_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2020.2",
sha256="96f9bca551a43e09d9648e8cba357739a759423adb671d1aa5973b7a930370c5",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16756/parallel_studio_xe_2020_update2_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16756/parallel_studio_xe_2020_update2_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2020.1",
sha256="5b547be92ecf50cb338b3038a565f5609135b27aa98a8b7964879eb2331eb29a",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16527/parallel_studio_xe_2020_update1_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16527/parallel_studio_xe_2020_update1_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2020.0",
sha256="e88cad18d28da50ed9cb87b12adccf13efd91bf94731dc33290481306c6f15ac",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16226/parallel_studio_xe_2020_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16226/parallel_studio_xe_2020_professional_edition.tgz",
deprecated=True,
)
#
version(
"professional.2019.5",
sha256="0ec638330214539361f8632e20759f385a5a78013dcc980ee93743d86d354452",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15810/parallel_studio_xe_2019_update5_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15810/parallel_studio_xe_2019_update5_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2019.4",
sha256="9b2818ea5739ade100841e99ce79ef7f4049a2513beb2ce20fc94706f1ba0231",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15534/parallel_studio_xe_2019_update4_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15534/parallel_studio_xe_2019_update4_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2019.3",
sha256="92a8879106d0bdf1ecf4670cd97fbcdc67d78b13bdf484f2c516a533aa7a27f9",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15269/parallel_studio_xe_2019_update3_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15269/parallel_studio_xe_2019_update3_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2019.2",
sha256="cdb629d74612d135ca197f1f64e6a081e31df68cda92346a29e1223bb06e64ea",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15089/parallel_studio_xe_2019_update2_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15089/parallel_studio_xe_2019_update2_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2019.1",
sha256="bc83ef5a728903359ae11a2b90ad7dae4ae61194afb28bb5bb419f6a6aea225d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14825/parallel_studio_xe_2019_update1_professional_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14825/parallel_studio_xe_2019_update1_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2019.0",
sha256="94b9714e353e5c4f58d38cb236e2f8911cbef31c4b42a148d60c988e926411e2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13578/parallel_studio_xe_2019_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13578/parallel_studio_xe_2019_professional_edition.tgz",
deprecated=True,
)
#
version(
"professional.2018.4",
sha256="54ab4320da849108602096fa7a34aa21751068467e0d1584aa8f16352b77d323",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13718/parallel_studio_xe_2018_update4_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13718/parallel_studio_xe_2018_update4_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2018.3",
sha256="3d8e72ccad31f243e43b72a925ad4a6908e2955682433898640ab783decf9960",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12999/parallel_studio_xe_2018_update3_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12999/parallel_studio_xe_2018_update3_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2018.2",
sha256="fc577b29fb2c687441d4faea14a6fb6da529fc78fcb778cbface59f40e128e02",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12718/parallel_studio_xe_2018_update2_professional_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12718/parallel_studio_xe_2018_update2_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2018.1",
sha256="dd3e118069d87eebb614336732323b48172c8c8a653cde673a8ef02f7358e94d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12375/parallel_studio_xe_2018_update1_professional_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12375/parallel_studio_xe_2018_update1_professional_edition.tgz",
deprecated=True,
)
version(
"professional.2018.0",
sha256="72308ffa088391ea65726a79d7a73738206fbb1d8ed8563e3d06eab3120fb1a0",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12062/parallel_studio_xe_2018_professional_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12062/parallel_studio_xe_2018_professional_edition.tgz",
deprecated=True,
)
#
version(
"professional.2017.7",
sha256="133c3aa99841a4fe48149938a90f971467452a82f033be10cd9464ba810f6360",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12856/parallel_studio_xe_2017_update7.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12856/parallel_studio_xe_2017_update7.tgz",
deprecated=True,
)
version(
"professional.2017.6",
sha256="d771b00d3658934c424f294170125dc58ae9b03639aa898a2f115d7a7482dd3a",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12534/parallel_studio_xe_2017_update6.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12534/parallel_studio_xe_2017_update6.tgz",
deprecated=True,
)
version(
"professional.2017.5",
sha256="36e496d1d1d7d7168cc3ba8f5bca9b52022339f30b62a87ed064b77a5cbccc09",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12138/parallel_studio_xe_2017_update5.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12138/parallel_studio_xe_2017_update5.tgz",
deprecated=True,
)
version(
"professional.2017.4",
sha256="27d34625adfc635d767c136b5417a372f322fabe6701b651d858a8fe06d07f2d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11537/parallel_studio_xe_2017_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11537/parallel_studio_xe_2017_update4.tgz",
deprecated=True,
)
version(
"professional.2017.3",
sha256="856950c0493de3e8b4150e18f8821675c1cf75c2eea5ff0804f59eb301414bbe",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11460/parallel_studio_xe_2017_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11460/parallel_studio_xe_2017_update3.tgz",
deprecated=True,
)
version(
"professional.2017.2",
sha256="83a655f0c2969409758488d70d6719fb5ea81a84b6da3feb641ce67bb240bc8a",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11298/parallel_studio_xe_2017_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11298/parallel_studio_xe_2017_update2.tgz",
deprecated=True,
)
version(
"professional.2017.1",
sha256="c808be744c98f7471c61258144859e8e8fc92771934281a16135803e941fd9b0",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10973/parallel_studio_xe_2017_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/10973/parallel_studio_xe_2017_update1.tgz",
deprecated=True,
)
version(
"professional.2017.0",
sha256="f380a56a25cf17941eb691a640035e79f92516346500e0df80fbdd46c5c1b301",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9651/parallel_studio_xe_2017.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9651/parallel_studio_xe_2017.tgz",
deprecated=True,
)
#
version(
"professional.2016.4",
sha256="ea43c150ed6f9967bc781fe4253169a0447c69bac4fe2c563016a1ad2875ae23",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9781/parallel_studio_xe_2016_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9781/parallel_studio_xe_2016_update4.tgz",
deprecated=True,
)
version(
"professional.2016.3",
sha256="aa7c6f1a6603fae07c2b01409c12de0811aa5947eaa71dfb1fe9898076c2773e",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9061/parallel_studio_xe_2016_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9061/parallel_studio_xe_2016_update3.tgz",
deprecated=True,
)
version(
"professional.2016.2",
sha256="280bf39c75d7f52f206759ca4d8b6334ab92d5970957b90f5aa286bb0aa8d65e",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8676/parallel_studio_xe_2016_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8676/parallel_studio_xe_2016_update2.tgz",
deprecated=True,
)
version(
"professional.2016.1",
sha256="f5a3ab9fb581e19bf1bd966f7d40a11905e002a2bfae1c4a2140544288ca3e48",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8365/parallel_studio_xe_2016_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8365/parallel_studio_xe_2016_update1.tgz",
deprecated=True,
)
version(
"professional.2016.0",
sha256="fd4c32352fd78fc919601bedac5658ad5ac48efbc5700d9a8d42ed7d53bd8bb7",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/7997/parallel_studio_xe_2016.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/7997/parallel_studio_xe_2016.tgz",
deprecated=True,
)
#
version(
"professional.2015.6",
sha256="e604ed2bb45d227b151dd2898f3edd93526d58d1db1cb9d6b6f614907864f392",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8469/parallel_studio_xe_2015_update6.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8469/parallel_studio_xe_2015_update6.tgz",
deprecated=True,
)
version(
"professional.2015.1",
sha256="84fdf48d1de20e1d580ba5d419a5bc1c55d217a4f5dc1807190ecffe0229a62b",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/4992/parallel_studio_xe_2015_update1.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/4992/parallel_studio_xe_2015_update1.tgz",
deprecated=True,
)
@@ -409,161 +409,161 @@ class IntelParallelStudio(IntelPackage):
version(
"composer.2020.4",
sha256="ac1efeff608a8c3a416e6dfe20364061e8abf62d35fbaacdffe3fc9676fc1aa3",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2020.2",
sha256="42af16e9a91226978bb401d9f17b628bc279aa8cb104d4a38ba0808234a79bdd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2020.1",
sha256="26c7e7da87b8a83adfd408b2a354d872be97736abed837364c1bf10f4469b01e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2020.0",
sha256="9168045466139b8e280f50f0606b9930ffc720bbc60bc76f5576829ac15757ae",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
deprecated=True,
)
#
version(
"composer.2019.5",
sha256="e8c8e4b9b46826a02c49325c370c79f896858611bf33ddb7fb204614838ad56c",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2019.4",
sha256="1915993445323e1e78d6de73702a88fa3df2036109cde03d74ee38fef9f1abf2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15537/parallel_studio_xe_2019_update4_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15537/parallel_studio_xe_2019_update4_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2019.3",
sha256="15373ac6df2a84e6dd9fa0eac8b5f07ab00cdbb67f494161fd0d4df7a71aff8e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15272/parallel_studio_xe_2019_update3_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15272/parallel_studio_xe_2019_update3_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2019.2",
sha256="1e0f400be1f458592a8c2e7d55c1b2a4506f68f22bacbf1175af947809a4cd87",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15092/parallel_studio_xe_2019_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15092/parallel_studio_xe_2019_update2_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2019.1",
sha256="db000cb2ebf411f6e91719db68a0c68b8d3f7d38ad7f2049ea5b2f1b5f006c25",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14832/parallel_studio_xe_2019_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14832/parallel_studio_xe_2019_update1_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2019.0",
sha256="e1a29463038b063e01f694e2817c0fcf1a8e824e24f15a26ce85f20afa3f963a",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13581/parallel_studio_xe_2019_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13581/parallel_studio_xe_2019_composer_edition.tgz",
deprecated=True,
)
#
version(
"composer.2018.4",
sha256="94aca8f091dff9535b02f022a37aef150b36925c8ef069335621496f8e4db267",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13722/parallel_studio_xe_2018_update4_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13722/parallel_studio_xe_2018_update4_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2018.3",
sha256="f21f7759709a3d3e3390a8325fa89ac79b1fce8890c292e73b2ba3ec576ebd2b",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13002/parallel_studio_xe_2018_update3_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13002/parallel_studio_xe_2018_update3_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2018.2",
sha256="02d2a9fb10d9810f85dd77700215c4348d2e4475e814e4f086eb1442462667ff",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12722/parallel_studio_xe_2018_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12722/parallel_studio_xe_2018_update2_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2018.1",
sha256="db9aa417da185a03a63330c9d76ee8e88496ae6b771584d19003a29eedc7cab5",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12381/parallel_studio_xe_2018_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12381/parallel_studio_xe_2018_update1_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2018.0",
sha256="ecad64360fdaff2548a0ea250a396faf680077c5a83c3c3ce2c55f4f4270b904",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12067/parallel_studio_xe_2018_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12067/parallel_studio_xe_2018_composer_edition.tgz",
deprecated=True,
)
#
version(
"composer.2017.7",
sha256="661e33b68e47bf335694d2255f5883955234e9085c8349783a5794eed2a937ad",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12860/parallel_studio_xe_2017_update7_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12860/parallel_studio_xe_2017_update7_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.6",
sha256="771f50746fe130ea472394c42e25d2c7edae049ad809d2050945ef637becf65f",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12538/parallel_studio_xe_2017_update6_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12538/parallel_studio_xe_2017_update6_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.5",
sha256="ede4ea9351fcf263103588ae0f130b4c2a79395529cdb698b0d6e866c4871f78",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12144/parallel_studio_xe_2017_update5_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12144/parallel_studio_xe_2017_update5_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.4",
sha256="4304766f80206a27709be61641c16782fccf2b3fcf7285782cce921ddc9b10ff",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.3",
sha256="3648578d7bba993ebb1da37c173979bfcfb47f26e7f4e17f257e78dea8fd96ab",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.2",
sha256="abd26ab2a703e73ab93326984837818601c391782a6bce52da8b2a246798ad40",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.1",
sha256="bc592abee829ba6e00a4f60961b486b80c15987ff1579d6560186407c84add6f",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz",
deprecated=True,
)
version(
"composer.2017.0",
sha256="d218db66a5bb57569bea00821ac95d4647eda7422bf8a178d1586b0fb314935a",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9656/parallel_studio_xe_2017_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9656/parallel_studio_xe_2017_composer_edition.tgz",
deprecated=True,
)
#
version(
"composer.2016.4",
sha256="17606c52cab6f5114223a2425923c8dd69f1858f5a3bdf280e0edea49ebd430d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz",
deprecated=True,
)
version(
"composer.2016.3",
sha256="fcec90ba97533e4705077e0701813b5a3bcc197b010b03e96f83191a35c26acf",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz",
deprecated=True,
)
version(
"composer.2016.2",
sha256="6309ef8be1abba7737d3c1e17af64ca2620672b2da57afe2c3c643235f65b4c7",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz",
deprecated=True,
)
#
@@ -571,13 +571,13 @@ class IntelParallelStudio(IntelPackage):
version(
"composer.2015.6",
sha256="b1e09833469ca76a2834cd0a5bb5fea11ec9986da85abf4c6eed42cd96ec24cb",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8432/l_compxe_2015.6.233.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8432/l_compxe_2015.6.233.tgz",
deprecated=True,
)
version(
"composer.2015.1",
sha256="8a438fe20103e27bfda132955616d0c886aa6cfdd86dcd9764af5d937a8799d9",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/4933/l_compxe_2015.1.133.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/4933/l_compxe_2015.1.133.tgz",
deprecated=True,
)
@@ -666,19 +666,21 @@ class IntelParallelStudio(IntelPackage):
msg="SSE3 is not supported on MacOS x86_64",
)
- def setup_dependent_build_environment(self, *args):
+ def setup_dependent_build_environment(self, env, dependent_spec):
# Handle in callback, conveying client's compilers in additional arg.
# CAUTION - DUP code in:
# ../intel-mpi/package.py
# ../intel-parallel-studio/package.py
+ dependent_module = dependent_spec.package.module
self._setup_dependent_env_callback(
- *args,
+ env,
+ dependent_spec,
compilers_of_client={
- "CC": spack_cc,
- "CXX": spack_cxx,
- "F77": spack_f77,
- "F90": spack_fc,
- "FC": spack_fc,
+ "CC": dependent_module.spack_cc,
+ "CXX": dependent_module.spack_cxx,
+ "F77": dependent_module.spack_f77,
+ "F90": dependent_module.spack_fc,
+ "FC": dependent_module.spack_fc,
},
)
diff --git a/var/spack/repos/builtin/packages/intel-pin/package.py b/var/spack/repos/builtin/packages/intel-pin/package.py
index 6cf07b7257..b1acaf43de 100644
--- a/var/spack/repos/builtin/packages/intel-pin/package.py
+++ b/var/spack/repos/builtin/packages/intel-pin/package.py
@@ -19,6 +19,26 @@ class IntelPin(Package):
license("MIT")
version(
+ "3.31",
+ sha256="82216144e3df768f0203b671ff48605314f13266903eb42dac01b91310eba956",
+ url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-external-3.31-98869-gfa6f126a8-gcc-linux.tar.gz",
+ )
+ version(
+ "3.30",
+ sha256="be4f1130445c3fc4d83b7afad85c421d418f60013c33e8ee457bc7c9c194de1b",
+ url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.30-98830-g1d7b601b3-gcc-linux.tar.gz",
+ )
+ version(
+ "3.29",
+ sha256="45c2a68d4b2184117584a55db17b44c86f9476e9cb8109b2fae50a965b1ea64f",
+ url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.29-98790-g1a445fcd1-gcc-linux.tar.gz",
+ )
+ version(
+ "3.28",
+ sha256="5a5a3337f3f16176b97edcd3366b561936e1068fba4ebcfed4b836d81d45847b",
+ url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.28-98749-g6643ecee5-gcc-linux.tar.gz",
+ )
+ version(
"3.27",
sha256="e7d44d25668632007d5a109e5033415e91db543b8ce9e665893a05e852b67707",
url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.27-98718-gbeaa5d51e-gcc-linux.tar.gz",
@@ -114,6 +134,9 @@ class IntelPin(Package):
url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree(".", prefix)
mkdir(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py
index deda008f6b..4598ce1643 100644
--- a/var/spack/repos/builtin/packages/intel-tbb/package.py
+++ b/var/spack/repos/builtin/packages/intel-tbb/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
-import inspect
import platform
import sys
@@ -33,6 +32,9 @@ class IntelTbb(CMakePackage, MakefilePackage):
license("Apache-2.0")
version("master", branch="master")
+ version("2021.12.0", sha256="c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f")
+ version("2021.11.0", sha256="782ce0cab62df9ea125cdea253a50534862b563f1d85d4cda7ad4e77550ac363")
+ version("2021.10.0", sha256="487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b")
version("2021.9.0", sha256="1ce48f34dada7837f510735ff1172f6e2c261b09460e3bf773b49791d247d24e")
version("2021.8.0", sha256="eee380323bb7ce864355ed9431f85c43955faaae9e9bce35c62b372d7ffd9f8b")
version("2021.7.0", sha256="2cae2a80cda7d45dc7c072e4295c675fff5ad8316691f26f40539f7e7e54c0cc")
@@ -80,6 +82,9 @@ class IntelTbb(CMakePackage, MakefilePackage):
version("4.4.1", sha256="05737bf6dd220b31aad63d77ca59c742271f81b4cc6643aa6f93d37450ae32b5")
version("4.4", sha256="93c74b6054c69c86fa49d0fce7c50061fc907cb198a7237b8dd058298fd40c0e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("makefile", when="@:2020.3"),
conditional("cmake", when="@2021:"),
@@ -127,7 +132,7 @@ class IntelTbb(CMakePackage, MakefilePackage):
patch("gcc_generic-pedantic-4.4.patch", level=1, when="@:2019.0")
# Patch and conflicts for GCC 13 support (#1031).
- patch("gcc_13-2021-v2.patch", when="@2021.1:")
+ patch("gcc_13-2021-v2.patch", when="@2021.1:2021.9")
conflicts("%gcc@13", when="@:2021.3")
# Patch cmakeConfig.cmake.in to find the libraries where we install them.
@@ -182,7 +187,7 @@ class IntelTbb(CMakePackage, MakefilePackage):
@property
def libs(self):
- shared = True if "+shared" in self.spec else False
+ shared = True if self.spec.satisfies("+shared") else False
return find_libraries("libtbb*", root=self.prefix, shared=shared, recursive=True)
@@ -199,8 +204,9 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder, SetupEnvironment):
options = [
self.define("CMAKE_HWLOC_2_INCLUDE_PATH", spec["hwloc"].prefix.include),
self.define("CMAKE_HWLOC_2_LIBRARY_PATH", spec["hwloc"].libs),
- self.define("-DTBB_CPF", True),
+ self.define("TBB_CPF", True),
self.define("TBB_STRICT", False),
+ self.define("TBB_TEST", False),
]
if spec.variants["cxxstd"].value != "default":
options.append(self.define("CMAKE_CXX_STANDARD", spec.variants["cxxstd"].value))
@@ -309,14 +315,13 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder, SetupEnviron
if spec.satisfies("@2017.8,2018.1:"):
# Generate and install the CMake Config file.
- cmake_args = (
- "-DTBB_ROOT={0}".format(prefix),
- "-DTBB_OS={0}".format(platform.system()),
- "-P",
- "tbb_config_generator.cmake",
- )
with working_dir(join_path(self.stage.source_path, "cmake")):
- inspect.getmodule(self).cmake(*cmake_args)
+ cmake(
+ f"-DTBB_ROOT={prefix}",
+ f"-DTBB_OS={platform.system()}",
+ "-P",
+ "tbb_config_generator.cmake",
+ )
@run_after("install")
def darwin_fix(self):
diff --git a/var/spack/repos/builtin/packages/intel-xed/package.py b/var/spack/repos/builtin/packages/intel-xed/package.py
index 3e21a6e28d..1d1a547d5d 100644
--- a/var/spack/repos/builtin/packages/intel-xed/package.py
+++ b/var/spack/repos/builtin/packages/intel-xed/package.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import stat
+from pathlib import Path
from spack.package import *
@@ -21,6 +23,9 @@ class IntelXed(Package):
# Current versions now have actual releases and tags.
version("main", branch="main")
+ version("2024.05.20", tag="v2024.05.20", commit="7e88c3e00274a10daa6b9d053decc057f65aa0ec")
+ version("2024.04.01", tag="v2024.04.01", commit="6d87b5481aa53b5ab1fc2b5a5622759c46746bf9")
+ version("2024.02.22", tag="v2024.02.22", commit="d08a6f66f780a685f26322960cd3ae297dbad931")
version("2023.10.11", tag="v2023.10.11", commit="d7d46c73fb04a1742e99c9382a4acb4ed07ae272")
version("2023.08.21", tag="v2023.08.21", commit="01a6da8090af84cd52f6c1070377ae6e885b078f")
version("2023.07.09", tag="v2023.07.09", commit="539a6a349cf7538a182ed3ee1f48bb9317eb185f")
@@ -35,6 +40,9 @@ class IntelXed(Package):
# The old 2019.03.01 version (before there were tags).
version("10.2019.03", commit="b7231de4c808db821d64f4018d15412640c34113", deprecated=True)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# XED wants the mbuild directory adjacent to xed in the same directory.
mdir = join_path("..", "mbuild")
@@ -59,8 +67,21 @@ class IntelXed(Package):
when="@:2022.06",
)
+ variant("optimize", default=True, description="Build with -O2")
variant("debug", default=False, description="Enable debug symbols")
variant("pic", default=False, description="Compile with position independent code.")
+ variant("examples", default=False, description="Build and install the examples")
+
+ # Previous versions of this recipe used a different install layout than upstream Xed.
+ # This has since been fixed, but some packages were written on the older install layout and
+ # will not build on the upstream Xed layout.
+ # Enabling this variant adds compatibility headers for such software to build successfully.
+ variant(
+ "deprecated-includes",
+ default=False,
+ sticky=True,
+ description="Add compatibility headers for software written on the old include layout",
+ )
# The current mfile uses python3 by name.
depends_on("python@3.7:", type="build")
@@ -69,26 +90,10 @@ class IntelXed(Package):
patch("2019-python3.patch", when="@10.2019.03")
patch("libxed-ild.patch", when="@12.0:2022.12")
- requires("target=x86_64:", msg="intel-xed only runs on x86/x86_64")
-
- mycflags = [] # type: List[str]
-
- # Save CFLAGS for use in install.
- def flag_handler(self, name, flags):
- if name == "cflags":
- self.mycflags = flags
-
- if "+pic" in self.spec:
- flags.append(self.compiler.cc_pic_flag)
-
- return (flags, None, None)
-
- def install(self, spec, prefix):
- # XED needs PYTHONPATH to find the mbuild directory.
- mbuild_dir = join_path(self.stage.source_path, "..", "mbuild")
- python_path = os.getenv("PYTHONPATH", "")
- os.environ["PYTHONPATH"] = mbuild_dir + ":" + python_path
+ requires("target=x86_64:,aarch64:", msg="intel-xed only builds on x86-64 or aarch64")
+ @when("@2023.04.16")
+ def patch(self):
# In 2023.04.16, the xed source directory must be exactly 'xed',
# so add a symlink, but don't fail if the link already exists.
# See: https://github.com/intelxed/xed/issues/300
@@ -98,45 +103,66 @@ class IntelXed(Package):
except OSError:
pass
- mfile = Executable(join_path(".", "mfile.py"))
-
- args = ["-j", str(make_jobs), "--cc=%s" % spack_cc, "--no-werror"]
-
- if "+debug" in spec:
- args.append("--debug")
-
- # If an optimization flag (-O...) is specified in CFLAGS, use
- # that, else set default opt level.
- for flag in self.mycflags:
- if flag.startswith("-O"):
- break
- else:
- args.append("--opt=2")
-
- # Build and install static libxed.a.
- mfile("--clean")
- mfile(*args)
-
- mkdirp(prefix.include)
- mkdirp(prefix.lib)
- mkdirp(prefix.bin)
+ def setup_build_environment(self, env):
+ # XED needs PYTHONPATH to find the mbuild directory.
+ env.prepend_path("PYTHONPATH", self.mdir)
- install(join_path("obj", "lib*.a"), prefix.lib)
+ @staticmethod
+ def _make_writable(root) -> None:
+ for dirpath, _, filenames in os.walk(root):
+ for fn in filenames:
+ path = Path(dirpath) / fn
+ if not path.is_symlink():
+ path.chmod(path.stat().st_mode | stat.S_IWUSR)
- # Build and install shared libxed.so and examples (to get the CLI).
+ def install(self, spec, prefix):
+ mfile = Executable(join_path(".", "mfile.py"))
+ mfile.add_default_arg(
+ f"--jobs={make_jobs}",
+ f"--cc={spack_cc}",
+ f"--cxx={spack_cxx}",
+ "--no-werror",
+ f"--prefix={prefix}",
+ )
+ if spec.satisfies("+optimize"):
+ mfile.add_default_arg("--opt=2")
+ if spec.satisfies("+debug"):
+ mfile.add_default_arg("--debug")
+ if spec.satisfies("+pic"):
+ mfile.add_default_arg(
+ f"--extra-ccflags={self.compiler.cc_pic_flag}",
+ f"--extra-cxxflags={self.compiler.cxx_pic_flag}",
+ )
+
+ # Build and install first as static (the default).
+ mfile("--install-dir=" + join_path("kits", "static"), "install")
+ self._make_writable(prefix)
+
+ # Rebuild and reinstall as shared. This overwrites anything installed as static before.
+ shared_kit = join_path("kits", "shared")
mfile("--clean")
- mfile("examples", "--shared", *args)
-
- install(join_path("obj", "lib*.so"), prefix.lib)
-
- # Starting with 11.x, the install files are moved or copied into
- # subdirs of obj/wkit.
- if spec.satisfies("@11.0:"):
- wkit = join_path("obj", "wkit")
- install(join_path(wkit, "bin", "xed"), prefix.bin)
- install(join_path(wkit, "include", "xed", "*.h"), prefix.include)
- else:
- # Old 2019.03.01 paths.
- install(join_path("obj", "examples", "xed"), prefix.bin)
- install(join_path("include", "public", "xed", "*.h"), prefix.include)
- install(join_path("obj", "*.h"), prefix.include)
+ mfile(
+ f"--install-dir={shared_kit}",
+ "--shared",
+ *(["examples"] if spec.satisfies("+examples") else []),
+ "install",
+ )
+
+ if self.spec.satisfies("+examples"):
+ # Install the example binaries to share/xed/examples
+ install_tree(join_path(shared_kit, "bin"), prefix.share.xed.examples)
+
+ # Add a convenience symlink for the xed example/CLI to bin/xed
+ mkdirp(prefix.bin)
+ symlink(prefix.share.xed.examples.xed, prefix.bin.xed)
+
+ @run_after("install", when="+deprecated-includes")
+ def install_deprecated_include_compat(self):
+ """Install compatibility headers in <prefix>/include for old code"""
+ for hdr in Path(self.prefix.include).glob("xed/*.h"):
+ (Path(self.prefix.include) / hdr.name).write_text(
+ f"""\
+#warning This is a Spack compatibilty header, please update your #includes!
+#include "xed/{hdr.name}"
+"""
+ )
diff --git a/var/spack/repos/builtin/packages/intel/detection_test.yaml b/var/spack/repos/builtin/packages/intel/detection_test.yaml
index 076bfeaaba..dfff8fa4a1 100644
--- a/var/spack/repos/builtin/packages/intel/detection_test.yaml
+++ b/var/spack/repos/builtin/packages/intel/detection_test.yaml
@@ -1,19 +1,25 @@
paths:
- - layout:
- - executables:
- - "bin/intel64/icc"
- script: |
- echo "icc (ICC) 18.0.5 20180823"
- echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
- - executables:
- - "bin/intel64/icpc"
- script: |
- echo "icpc (ICC) 18.0.5 20180823"
- echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
- - executables:
- - "bin/intel64/ifort"
- script: |
- echo "ifort (IFORT) 18.0.5 20180823"
- echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
- results:
- - spec: 'intel@18.0.5'
+- layout:
+ - executables:
+ - "bin/intel64/icc"
+ script: |
+ echo "icc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/icpc"
+ script: |
+ echo "icpc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/ifort"
+ script: |
+ echo "ifort (IFORT) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: 'intel@18.0.5'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/intel64/icc"
+ cxx: ".*/bin/intel64/icpc"
+ fortran: ".*/bin/intel64/ifort"
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
index e051bf0ba2..51bae70edb 100644
--- a/var/spack/repos/builtin/packages/intel/package.py
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -6,6 +6,7 @@ import re
import llnl.util.tty as tty
+import spack.compiler
from spack.package import *
@@ -28,73 +29,73 @@ class Intel(IntelPackage):
version(
"20.0.4",
sha256="ac1efeff608a8c3a416e6dfe20364061e8abf62d35fbaacdffe3fc9676fc1aa3",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17117/parallel_studio_xe_2020_update4_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/17117/parallel_studio_xe_2020_update4_composer_edition.tgz",
deprecated=True,
)
version(
"20.0.2",
sha256="42af16e9a91226978bb401d9f17b628bc279aa8cb104d4a38ba0808234a79bdd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
deprecated=True,
)
version(
"20.0.1",
sha256="26c7e7da87b8a83adfd408b2a354d872be97736abed837364c1bf10f4469b01e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
deprecated=True,
)
version(
"20.0.0",
sha256="9168045466139b8e280f50f0606b9930ffc720bbc60bc76f5576829ac15757ae",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
deprecated=True,
)
version(
"19.1.2",
sha256="42af16e9a91226978bb401d9f17b628bc279aa8cb104d4a38ba0808234a79bdd",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16759/parallel_studio_xe_2020_update2_composer_edition.tgz",
deprecated=True,
)
version(
"19.1.1",
sha256="26c7e7da87b8a83adfd408b2a354d872be97736abed837364c1bf10f4469b01e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz",
deprecated=True,
)
version(
"19.1.0",
sha256="9168045466139b8e280f50f0606b9930ffc720bbc60bc76f5576829ac15757ae",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/16229/parallel_studio_xe_2020_composer_edition.tgz",
deprecated=True,
)
version(
"19.0.5",
sha256="e8c8e4b9b46826a02c49325c370c79f896858611bf33ddb7fb204614838ad56c",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz",
deprecated=True,
)
version(
"19.0.4",
sha256="1915993445323e1e78d6de73702a88fa3df2036109cde03d74ee38fef9f1abf2",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15537/parallel_studio_xe_2019_update4_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15537/parallel_studio_xe_2019_update4_composer_edition.tgz",
deprecated=True,
)
version(
"19.0.3",
sha256="15373ac6df2a84e6dd9fa0eac8b5f07ab00cdbb67f494161fd0d4df7a71aff8e",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15272/parallel_studio_xe_2019_update3_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/15272/parallel_studio_xe_2019_update3_composer_edition.tgz",
deprecated=True,
)
version(
"19.0.1",
sha256="db000cb2ebf411f6e91719db68a0c68b8d3f7d38ad7f2049ea5b2f1b5f006c25",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14832/parallel_studio_xe_2019_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/14832/parallel_studio_xe_2019_update1_composer_edition.tgz",
deprecated=True,
)
version(
"19.0.0",
sha256="e1a29463038b063e01f694e2817c0fcf1a8e824e24f15a26ce85f20afa3f963a",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13581/parallel_studio_xe_2019_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13581/parallel_studio_xe_2019_composer_edition.tgz",
deprecated=True,
)
@@ -103,99 +104,99 @@ class Intel(IntelPackage):
version(
"18.0.5",
sha256="94aca8f091dff9535b02f022a37aef150b36925c8ef069335621496f8e4db267",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13722/parallel_studio_xe_2018_update4_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13722/parallel_studio_xe_2018_update4_composer_edition.tgz",
deprecated=True,
)
version(
"18.0.3",
sha256="f21f7759709a3d3e3390a8325fa89ac79b1fce8890c292e73b2ba3ec576ebd2b",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13002/parallel_studio_xe_2018_update3_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/13002/parallel_studio_xe_2018_update3_composer_edition.tgz",
deprecated=True,
)
version(
"18.0.2",
sha256="02d2a9fb10d9810f85dd77700215c4348d2e4475e814e4f086eb1442462667ff",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12722/parallel_studio_xe_2018_update2_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12722/parallel_studio_xe_2018_update2_composer_edition.tgz",
deprecated=True,
)
version(
"18.0.1",
sha256="db9aa417da185a03a63330c9d76ee8e88496ae6b771584d19003a29eedc7cab5",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12381/parallel_studio_xe_2018_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12381/parallel_studio_xe_2018_update1_composer_edition.tgz",
deprecated=True,
)
version(
"18.0.0",
sha256="ecad64360fdaff2548a0ea250a396faf680077c5a83c3c3ce2c55f4f4270b904",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12067/parallel_studio_xe_2018_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12067/parallel_studio_xe_2018_composer_edition.tgz",
deprecated=True,
)
#
version(
"17.0.7",
sha256="661e33b68e47bf335694d2255f5883955234e9085c8349783a5794eed2a937ad",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12860/parallel_studio_xe_2017_update7_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12860/parallel_studio_xe_2017_update7_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.6",
sha256="771f50746fe130ea472394c42e25d2c7edae049ad809d2050945ef637becf65f",
- url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12538/parallel_studio_xe_2017_update6_composer_edition.tgz",
+ url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12538/parallel_studio_xe_2017_update6_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.5",
sha256="ede4ea9351fcf263103588ae0f130b4c2a79395529cdb698b0d6e866c4871f78",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12144/parallel_studio_xe_2017_update5_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/12144/parallel_studio_xe_2017_update5_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.4",
sha256="4304766f80206a27709be61641c16782fccf2b3fcf7285782cce921ddc9b10ff",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.3",
sha256="3648578d7bba993ebb1da37c173979bfcfb47f26e7f4e17f257e78dea8fd96ab",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.2",
sha256="abd26ab2a703e73ab93326984837818601c391782a6bce52da8b2a246798ad40",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.1",
sha256="bc592abee829ba6e00a4f60961b486b80c15987ff1579d6560186407c84add6f",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz",
deprecated=True,
)
version(
"17.0.0",
sha256="d218db66a5bb57569bea00821ac95d4647eda7422bf8a178d1586b0fb314935a",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9656/parallel_studio_xe_2017_composer_edition.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9656/parallel_studio_xe_2017_composer_edition.tgz",
deprecated=True,
)
#
version(
"16.0.4",
sha256="17606c52cab6f5114223a2425923c8dd69f1858f5a3bdf280e0edea49ebd430d",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz",
deprecated=True,
)
version(
"16.0.3",
sha256="fcec90ba97533e4705077e0701813b5a3bcc197b010b03e96f83191a35c26acf",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz",
deprecated=True,
)
version(
"16.0.2",
sha256="6309ef8be1abba7737d3c1e17af64ca2620672b2da57afe2c3c643235f65b4c7",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz",
deprecated=True,
)
#
@@ -203,13 +204,13 @@ class Intel(IntelPackage):
version(
"15.0.6",
sha256="b1e09833469ca76a2834cd0a5bb5fea11ec9986da85abf4c6eed42cd96ec24cb",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8432/l_compxe_2015.6.233.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/8432/l_compxe_2015.6.233.tgz",
deprecated=True,
)
version(
"15.0.1",
sha256="8a438fe20103e27bfda132955616d0c886aa6cfdd86dcd9764af5d937a8799d9",
- url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/4933/l_compxe_2015.1.133.tgz",
+ url="http://registrationcenter-download.intel.com/akdlm/IRC_NAS/tec/4933/l_compxe_2015.1.133.tgz",
deprecated=True,
)
@@ -240,7 +241,7 @@ class Intel(IntelPackage):
match = version_regex.search(output)
if match:
return match.group(1)
- except spack.util.executable.ProcessError:
+ except ProcessError:
pass
except Exception as e:
tty.debug(str(e))
diff --git a/var/spack/repos/builtin/packages/interproscan/package.py b/var/spack/repos/builtin/packages/interproscan/package.py
index 2af5c6e401..6088b12c38 100644
--- a/var/spack/repos/builtin/packages/interproscan/package.py
+++ b/var/spack/repos/builtin/packages/interproscan/package.py
@@ -32,6 +32,9 @@ class Interproscan(Package):
url="ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/4/RELEASE/4.8/iprscan_v4.8.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
resource(
when="@5.63-95.0 +databases",
name="databases",
diff --git a/var/spack/repos/builtin/packages/ioapi/package.py b/var/spack/repos/builtin/packages/ioapi/package.py
index fcc640734e..2f7398075a 100644
--- a/var/spack/repos/builtin/packages/ioapi/package.py
+++ b/var/spack/repos/builtin/packages/ioapi/package.py
@@ -20,6 +20,9 @@ class Ioapi(MakefilePackage):
# source tarball (#28247). This also means that one must test for breaking
# changes when updating the checksum and avoid #22633.
version("3.2", sha256="0a3cbf236ffbd9fb5f6509e35308c3353f1f53096efe0c51b84883d2da86924b")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("netcdf-c@4:")
depends_on("netcdf-fortran@4:")
depends_on("sed", type="build")
diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py
index 78eb17fdbf..72e4a62c81 100644
--- a/var/spack/repos/builtin/packages/ior/package.py
+++ b/var/spack/repos/builtin/packages/ior/package.py
@@ -14,6 +14,7 @@ class Ior(AutotoolsPackage):
url = "https://github.com/hpc/ior/archive/3.2.1.tar.gz"
version("develop", git="https://github.com/hpc/ior.git", branch="main")
+ version("4.0.0", sha256="cb17f6b0d17fb98dae28abaa116fd3adde411f52d45ff9efb125efc791b97463")
version(
"3.3.0",
sha256="701f2167f81ef963e227d4c036c4a947a98b5642b7c14c87c8ae657849891528",
@@ -24,6 +25,8 @@ class Ior(AutotoolsPackage):
version("3.2.0", sha256="91a766fb9c34b5780705d0997b71b236a1120da46652763ba11d9a8c44251852")
version("3.0.1", sha256="0cbefbcdb02fb13ba364e102f9e7cc2dcf761698533dac25de446a3a3e81390d")
+ depends_on("c", type="build") # generated
+
variant("hdf5", default=False, description="support IO with HDF5 backend")
variant("ncmpi", default=False, description="support IO with NCMPI backend")
variant("lustre", default=False, description="support configurable Lustre striping values")
@@ -63,18 +66,18 @@ class Ior(AutotoolsPackage):
env["CC"] = spec["mpi"].mpicc
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
config_args.append("--with-hdf5")
config_args.append("CFLAGS=-D H5_USE_16_API")
else:
config_args.append("--without-hdf5")
- if "+ncmpi" in spec:
+ if spec.satisfies("+ncmpi"):
config_args.append("--with-ncmpi")
else:
config_args.append("--without-ncmpi")
- if "+lustre" in spec:
+ if spec.satisfies("+lustre"):
config_args.append("--with-lustre")
else:
config_args.append("--without-lustre")
diff --git a/var/spack/repos/builtin/packages/iozone/package.py b/var/spack/repos/builtin/packages/iozone/package.py
index 86b31db056..25b557095f 100644
--- a/var/spack/repos/builtin/packages/iozone/package.py
+++ b/var/spack/repos/builtin/packages/iozone/package.py
@@ -22,6 +22,8 @@ class Iozone(MakefilePackage):
version("3_491", sha256="2cc4842d382e46a585d1df9ae1e255695480dcc0fc05c3b1cb32ef3493d0ec9a")
version("3_465", sha256="2e3d72916e7d7340a7c505fc0c3d28553fcc5ff2daf41d811368e55bd4e6a293")
+ depends_on("c", type="build") # generated
+
# TODO: Add support for other architectures as necessary
build_targets = ["linux-AMD64"]
diff --git a/var/spack/repos/builtin/packages/ip/package.py b/var/spack/repos/builtin/packages/ip/package.py
index 29c82f3165..d8e2371fb0 100644
--- a/var/spack/repos/builtin/packages/ip/package.py
+++ b/var/spack/repos/builtin/packages/ip/package.py
@@ -18,6 +18,12 @@ class Ip(CMakePackage):
maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA")
version("develop", branch="develop")
+ version("5.1.0", sha256="5279f11f4c12db68ece74cec392b7a2a6b5166bc505877289f34cc3149779619")
+ version("5.0.0", sha256="54b2987bd4f94adc1f7595d2a384e646019c22d163bcd30840a916a6abd7df71")
+ version("4.4.0", sha256="858d9201ce0bc4d16b83581ef94a4a0262f498ed1ea1b0535de2e575da7a8b8c")
+ version("4.3.0", sha256="799308a868dea889d2527d96a0405af7b376869581410fe4cff681205e9212b4")
+ # Note that versions 4.0-4.2 contain constants_mod module, and should not be used when
+ # also compiling with packages containing Fortran modules of the same name, namely, FMS.
version("4.2.0", sha256="9b9f47106822044ff224c6dfd9f140c146dffc833904f2a0c5db7b5d8932e39e")
version("4.1.0", sha256="b83ca037d9a5ad3eb0fb1acfe665c38b51e01f6bd73ce9fb8bb2a14f5f63cdbe")
version("4.0.0", sha256="a2ef0cc4e4012f9cb0389fab6097407f4c623eb49772d96eb80c44f804aa86b8")
@@ -27,6 +33,9 @@ class Ip(CMakePackage):
preferred=True,
)
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("openmp", description="Enable OpenMP threading", default=True)
variant("pic", default=True, description="Build with position-independent-code")
variant("shared", default=False, description="Build shared library", when="@4.1:")
@@ -46,14 +55,22 @@ class Ip(CMakePackage):
description="Set precision (_4/_d/_8 library versions)",
when="@4.2:",
)
+ variant(
+ "deprecated",
+ default=False,
+ description="Build deprecated spectral interpolation functions",
+ when="@5.0:",
+ )
conflicts("+shared ~pic")
- depends_on("sp")
+ depends_on("sp", when="@:4")
depends_on("sp@:2.3.3", when="@:4.0")
- depends_on("sp precision=4", when="precision=4")
- depends_on("sp precision=d", when="precision=d")
- depends_on("sp precision=8", when="precision=8")
+ depends_on("sp precision=4", when="@4.1:4 precision=4")
+ depends_on("sp precision=d", when="@4.1:4 precision=d")
+ depends_on("sp precision=8", when="@4.1:4 precision=8")
+ depends_on("lapack", when="@5.1:")
+ depends_on("cmake@3.18:", when="@5.1:")
def cmake_args(self):
args = [
@@ -70,8 +87,23 @@ class Ip(CMakePackage):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
args.append(self.define("BUILD_4", self.spec.satisfies("precision=4")))
args.append(self.define("BUILD_D", self.spec.satisfies("precision=d")))
+
+ if self.spec.satisfies("@4.2:"):
args.append(self.define("BUILD_8", self.spec.satisfies("precision=8")))
+ if self.spec.satisfies("@5:"):
+ args.append(self.define_from_variant("BUILD_DEPRECATED", "deprecated"))
+
+ if self.spec.satisfies("@5.1:"):
+ # Use the LAPACK provider set by Spack even if the compiler supports native BLAS
+ bla_vendors = {"openblas": "OpenBLAS"}
+ lapack_provider = self.spec["lapack"].name
+ if lapack_provider in bla_vendors.keys():
+ bla_vendor = bla_vendors[lapack_provider]
+ else:
+ bla_vendor = "All"
+ args.append(self.define("BLA_VENDOR", bla_vendor))
+
return args
def setup_run_environment(self, env):
@@ -88,6 +120,7 @@ class Ip(CMakePackage):
env.set("IP_LIB" + suffix, lib[0])
env.set("IP_INC" + suffix, join_path(self.prefix, "include_" + suffix))
+ @when("@4:")
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/ip2/package.py b/var/spack/repos/builtin/packages/ip2/package.py
index 9264092670..ed228022d4 100644
--- a/var/spack/repos/builtin/packages/ip2/package.py
+++ b/var/spack/repos/builtin/packages/ip2/package.py
@@ -19,9 +19,17 @@ class Ip2(CMakePackage):
maintainers("t-brown", "AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
- version("1.1.2", sha256="73c6beec8fd463ec7ccba3633d8c5d53d385c43d507367efde918c2db0af42ab")
+ version(
+ "1.1.2",
+ sha256="73c6beec8fd463ec7ccba3633d8c5d53d385c43d507367efde918c2db0af42ab",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
depends_on("sp")
+ requires("^sp precision=4,8,d", when="^sp@2.4:")
def setup_run_environment(self, env):
for suffix in ("4", "8", "d"):
diff --git a/var/spack/repos/builtin/packages/ipcalc/package.py b/var/spack/repos/builtin/packages/ipcalc/package.py
index 06fa24b10a..0e8fbadd30 100644
--- a/var/spack/repos/builtin/packages/ipcalc/package.py
+++ b/var/spack/repos/builtin/packages/ipcalc/package.py
@@ -21,6 +21,8 @@ class Ipcalc(MakefilePackage):
version("0.2.2", sha256="bf1b95eca219e564c85fa4233fe65342963cf3e8a303a7e10b4dd7269c864794")
version("0.2.0", sha256="c965c1296172a6acc50d54dfe81f7e5d589f9762b5d9ae459eee00349675336b")
+ depends_on("c", type="build") # generated
+
depends_on("geoip-api-c")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/iperf2/package.py b/var/spack/repos/builtin/packages/iperf2/package.py
index 81970527e4..15896021a4 100644
--- a/var/spack/repos/builtin/packages/iperf2/package.py
+++ b/var/spack/repos/builtin/packages/iperf2/package.py
@@ -11,10 +11,13 @@ class Iperf2(AutotoolsPackage, SourceforgePackage):
2.0.5 code base. Iperf 2.0.5 is still widely deployed and used by many for
testing networks and for qualifying networking products."""
- homepage = "https://sourceforge.net/projects/iperf2"
+ homepage = "https://sourceforge.net/projects/iperf2/"
sourceforge_mirror_path = "iperf2/iperf-2.0.12.tar.gz"
version("2.1.9", sha256="5c0771aab00ef14520013aef01675977816e23bb8f5d9fde016f90eb2f1be788")
version("2.1.8", sha256="8e2cf2fbc9d0d4d1cf9d109b1e328459f9622993dc9a4c5a7dc8a2088fb7beaf")
version("2.1.7", sha256="1aba2e1d7aa43641ef841951ed88e16cffba898460e0c51e6b2806f3ff20e9d4")
version("2.0.12", sha256="367f651fb1264b13f6518e41b8a7e08ce3e41b2a1c80e99ff0347561eed32646")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/iperf3/package.py b/var/spack/repos/builtin/packages/iperf3/package.py
index aaaf24f545..a1f8991ca5 100644
--- a/var/spack/repos/builtin/packages/iperf3/package.py
+++ b/var/spack/repos/builtin/packages/iperf3/package.py
@@ -12,8 +12,16 @@ class Iperf3(AutotoolsPackage):
maintained project."""
homepage = "https://software.es.net/iperf/"
- url = "https://github.com/esnet/iperf/archive/3.6.tar.gz"
+ url = "https://downloads.es.net/pub/iperf/iperf-3.17.tar.gz"
license("BSD-3-Clause-LBNL")
- version("3.6", sha256="1ad23f70a8eb4b892a3cbb247cafa956e0f5c7d8b8601b1d9c8031c2a806f23f")
+ version("3.17.1", sha256="84404ca8431b595e86c473d8f23d8bb102810001f15feaf610effd3b318788aa")
+ version("3.17", sha256="077ede831b11b733ecf8b273abd97f9630fd7448d3ec1eaa789f396d82c8c943")
+ version("3.16", sha256="cc740c6bbea104398cc3e466befc515a25896ec85e44a662d5f4a767b9cf713e")
+ version("3.14", sha256="723fcc430a027bc6952628fa2a3ac77584a1d0bd328275e573fc9b206c155004")
+ version("3.12", sha256="72034ecfb6a7d6d67e384e19fb6efff3236ca4f7ed4c518d7db649c447e1ffd6")
+ version("3.9", sha256="24b63a26382325f759f11d421779a937b63ca1bc17c44587d2fcfedab60ac038")
+ version("3.6", sha256="de5d51e46dc460cc590fb4d44f95e7cad54b74fea1eba7d6ebd6f8887d75946e")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ipm/package.py b/var/spack/repos/builtin/packages/ipm/package.py
index 1c8a18ea59..cf0c732280 100644
--- a/var/spack/repos/builtin/packages/ipm/package.py
+++ b/var/spack/repos/builtin/packages/ipm/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.util.executable import Executable
class Ipm(AutotoolsPackage):
@@ -23,6 +22,10 @@ class Ipm(AutotoolsPackage):
version("master", branch="master", preferred=True)
version("2.0.6", tag="2.0.6", commit="b008141ee16d39b33e20bffde615564afa107575")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("papi", default=False, description="Enable PAPI")
variant("cuda", default=False, description="Enable CUDA")
variant("libunwind", default=False, description="Enable libunwind")
@@ -75,25 +78,25 @@ class Ipm(AutotoolsPackage):
def configure_args(self):
args = []
spec = self.spec
- if "+papi" in spec:
+ if spec.satisfies("+papi"):
args.append("--with-papi={0}".format(spec["papi"].prefix))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--with-cudapath={0}".format(spec["cuda"].prefix))
- if "+libunwind" in spec:
+ if spec.satisfies("+libunwind"):
args.append("--with-libunwind={0}".format(spec["libunwind"].prefix))
- if "+papi_multiplexing" in spec:
+ if spec.satisfies("+papi_multiplexing"):
args.append("--enable-papi-multiplexing")
- if "+posixio" in spec:
+ if spec.satisfies("+posixio"):
args.append("--enable-posixio")
- if "+pmon" in spec:
+ if spec.satisfies("+pmon"):
args.append("--enable-pmon")
- if "+coll_details" in spec:
+ if spec.satisfies("+coll_details"):
args.append("--enable-coll-details")
args.extend(
diff --git a/var/spack/repos/builtin/packages/ipopt/ipopt_mumps_mpi_comm_option.patch b/var/spack/repos/builtin/packages/ipopt/ipopt_mumps_mpi_comm_option.patch
new file mode 100644
index 0000000000..44c15cfbf4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ipopt/ipopt_mumps_mpi_comm_option.patch
@@ -0,0 +1,56 @@
+diff --git a/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp b/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
+index 62089361..306966b4 100644
+--- a/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
++++ b/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp
+@@ -97,13 +97,11 @@ MumpsSolverInterface::MumpsSolverInterface()
+ mumps_->job = -1; //initialize mumps
+ mumps_->par = 1; //working host for sequential version
+ mumps_->sym = 2; //general symmetric matrix
+- mumps_->comm_fortran = USE_COMM_WORLD;
+
+ #ifndef IPOPT_MUMPS_NOMUTEX
+ const std::lock_guard<std::mutex> lock(mumps_call_mutex);
+ #endif
+
+- mumps_c(mumps_);
+ mumps_->icntl[2] = 0; // global info stream
+ mumps_->icntl[3] = 0; // print level
+ mumps_ptr_ = (void*) mumps_;
+@@ -180,6 +178,11 @@ void MumpsSolverInterface::RegisterOptions(
+ "Threshold to consider a pivot at zero in detection of linearly dependent constraints with MUMPS.",
+ 0.0,
+ "This is CNTL(3) in MUMPS.", true);
++ roptions->AddIntegerOption(
++ "mumps_mpi_communicator",
++ "MPI communicator used for matrix operations",
++ USE_COMM_WORLD,
++ "This sets the MPI communicator. MPI_COMM_WORLD is the default. Any other value should be the return value from MPI_Comm_c2f");
+ }
+
+ /// give name of MUMPS with version info
+@@ -217,13 +220,24 @@ bool MumpsSolverInterface::InitializeImpl(
+ options.GetIntegerValue("mumps_scaling", mumps_scaling_, prefix);
+ options.GetNumericValue("mumps_dep_tol", mumps_dep_tol_, prefix);
+
++ MUMPS_STRUC_C* mumps_ = static_cast<MUMPS_STRUC_C*>(mumps_ptr_);
++
++#ifndef IPOPT_MUMPS_NOMUTEX
++ const std::lock_guard<std::mutex> lock(mumps_call_mutex);
++#endif
++
++ Index mpi_comm;
++ options.GetIntegerValue("mumps_mpi_communicator", mpi_comm, prefix);
++ mumps_->comm_fortran = static_cast<int>(mpi_comm);
++
++ mumps_c(mumps_);
++
+ // Reset all private data
+ initialized_ = false;
+ pivtol_changed_ = false;
+ refactorize_ = false;
+ have_symbolic_factorization_ = false;
+
+- MUMPS_STRUC_C* mumps_ = static_cast<MUMPS_STRUC_C*>(mumps_ptr_);
+ if( !warm_start_same_structure_ )
+ {
+ mumps_->n = 0;
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py
index b5fc7b0cc7..e4912b437d 100644
--- a/var/spack/repos/builtin/packages/ipopt/package.py
+++ b/var/spack/repos/builtin/packages/ipopt/package.py
@@ -12,10 +12,13 @@ class Ipopt(AutotoolsPackage):
homepage = "https://github.com/coin-or/Ipopt"
url = "https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.13.2.tar.gz"
- maintainers("goxberry")
+ maintainers("chapman39", "tepperly")
license("EPL-2.0")
+ version("3.14.14", sha256="264d2d3291cd1cd2d0fa0ad583e0a18199e3b1378c3cb015b6c5600083f1e036")
+ version("3.14.13", sha256="2afcb057e7cf8ed7e07f50ee0a4a06d2e4d39e0f964777e9dd55fe56199a5e0a")
+ version("3.14.12", sha256="6b06cd6280d5ca52fc97ca95adaaddd43529e6e8637c274e21ee1072c3b4577f")
version("3.14.9", sha256="e12eba451269ec30f4cf6e2acb8b35399f0d029c97dff10465416f5739c8cf7a")
version("3.14.5", sha256="9ebbbbf14a64e998e3fba5d2662a8f9bd03f97b1406017e78ae54e5d105ae932")
version("3.14.4", sha256="60865150b6fad19c5968395b57ff4a0892380125646c3afa2a714926f5ac9487")
@@ -43,15 +46,19 @@ class Ipopt(AutotoolsPackage):
version("3.12.1", sha256="bde8c415136bb38d5a3c5935757399760c6cabf67e9362702e59ab6027f030ec")
version("3.12.0", sha256="b42f44eb53540205ede4584cced5d88a7b3ec2f1fac6e173a105496307e273a0")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("coinhsl", default=False, description="Build with Coin Harwell Subroutine Libraries")
variant("metis", default=False, description="Build with METIS partitioning support")
variant("debug", default=False, description="Build debug instead of optimized version")
variant("mumps", default=True, description="Build with support for linear solver MUMPS")
+ variant("java", default=False, description="Include Java support")
depends_on("blas")
depends_on("lapack")
depends_on("pkgconfig", type="build")
- depends_on("mumps+double~mpi", when="+mumps")
+ depends_on("mumps+double", when="+mumps")
depends_on("coinhsl", when="+coinhsl")
depends_on("metis@4.0:", when="+metis")
@@ -59,6 +66,7 @@ class Ipopt(AutotoolsPackage):
conflicts("~mumps", when="~coinhsl")
patch("ipopt_ppc_build.patch", when="arch=ppc64le")
+ patch("ipopt_mumps_mpi_comm_option.patch", when="+mumps")
flag_handler = build_system_flags
build_directory = "spack-build"
@@ -89,9 +97,11 @@ class Ipopt(AutotoolsPackage):
else:
args.extend(["--with-lapack-lflags={0} {1}".format(lapack_lib, blas_lib)])
- if "+mumps" in spec:
+ if spec.satisfies("+mumps"):
mumps_dir = spec["mumps"].prefix
- mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq"
+ mumps_flags = "-ldmumps -lmumps_common -lpord"
+ if "^mumps~mpi" in spec:
+ mumps_flags = mumps_flags + "-lmpiseq"
mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags
if spec.satisfies("@:3.12.13"):
args.extend(
@@ -108,8 +118,10 @@ class Ipopt(AutotoolsPackage):
"--with-mumps-cflags=%s" % mumps_dir.include,
]
)
+ if "^mumps+mpi" in spec:
+ args.extend(["--disable-mpiinit"])
- if "coinhsl" in spec:
+ if spec.satisfies("+coinhsl"):
hsl_ld_flags = "-ldl {0}".format(spec["coinhsl"].libs.ld_flags)
if spec.satisfies("^coinhsl+blas"):
@@ -130,8 +142,12 @@ class Ipopt(AutotoolsPackage):
"--with-hsl-cflags=%s" % spec["coinhsl"].prefix.include,
]
)
+ else:
+ # Fixes dynamic linking errors relating to failure to find hsllib.so
+ if spec.satisfies("@3.13:"):
+ args.extend(["--without-hsl"])
- if "metis" in spec:
+ if spec.satisfies("+metis"):
if spec.satisfies("@:3.12.13"):
args.extend(
[
@@ -140,10 +156,15 @@ class Ipopt(AutotoolsPackage):
]
)
+ if spec.satisfies("+java"):
+ args.extend(["--enable-java"])
+ else:
+ args.extend(["--disable-java"])
+
# The IPOPT configure file states that '--enable-debug' implies
# '--disable-shared', but adding '--enable-shared' overrides
# '--disable-shared' and builds a shared library with debug symbols
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
args.append("--enable-debug")
else:
args.append("--disable-debug")
diff --git a/var/spack/repos/builtin/packages/iproute2/package.py b/var/spack/repos/builtin/packages/iproute2/package.py
index 98430a131a..967cdaebfd 100644
--- a/var/spack/repos/builtin/packages/iproute2/package.py
+++ b/var/spack/repos/builtin/packages/iproute2/package.py
@@ -9,8 +9,8 @@ from spack.package import *
class Iproute2(AutotoolsPackage):
"""This is a set of utilities for Linux networking."""
- homepage = "https://github.com/shemminger/iproute2"
- url = "https://github.com/shemminger/iproute2/archive/v5.9.0.tar.gz"
+ homepage = "https://wiki.linuxfoundation.org/networking/iproute2"
+ url = "https://github.com/iproute2/iproute2/archive/v5.9.0.tar.gz"
depends_on("bison", type="build")
depends_on("flex", type="build")
@@ -18,6 +18,13 @@ class Iproute2(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("6.11.0", sha256="e5ad1c86aa788a979ba1b68cd6ee948b37983d99efabf6a0bf556b061569cc4d")
+ version("6.10.0", sha256="060ee42dfcdf8b9daf9f986eee26d16ac5bdf39c8784702957b13bebec538541")
+ version("6.2.0", sha256="813d41443d4ee0b189531e0d63f955ce94367ef80b184bcd27a30be86ae715e0")
+ version("6.1.0", sha256="63b6057041be86fee8af3468d86fdc1eb2afe1d56500f298413baf89575eff1e")
+ version("6.0.0", sha256="0a92b8d04710ab4e649ec25eb919768ba44d3047f26e80621368689d0f3c5a59")
+ version("5.17.0", sha256="ab5ed83d901d42a8dd5ec539ab8de35c65f921f002331fc7adfd359def33158d")
+ version("5.15.0", sha256="e10161fabe68714b34d565b6efff41b987ffec077f79beec497688c155881ea6")
version("5.11.0", sha256="16b79e6ce65d4d5fd425cef2fd92a58c403a93faeeed0e0a3202b36a8e857d1f")
version("5.10.0", sha256="164f1de457eefbdadb98d82c309a0977542b34e7a2dfe81e497a0b93675cb3d2")
version("5.9.0", sha256="1afde56d416f136b1236ac2f8276e4edbe114ca3c2ab12f11af11b84cf0992e4")
@@ -26,6 +33,8 @@ class Iproute2(AutotoolsPackage):
version("5.6.0", sha256="be41c35eddb02e736a2040b66ccfacee41fe7ee454580588f8959568d8a3c5b3")
version("5.5.0", sha256="5bc88876a3140f640e3318453382be5be4c673ccc17a518c05a5ce2ef9aa9a7f")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("install", "DESTDIR={0}".format(prefix), "PREFIX=")
diff --git a/var/spack/repos/builtin/packages/iptraf-ng/package.py b/var/spack/repos/builtin/packages/iptraf-ng/package.py
index 4f1bb59cb0..c3288c02ac 100644
--- a/var/spack/repos/builtin/packages/iptraf-ng/package.py
+++ b/var/spack/repos/builtin/packages/iptraf-ng/package.py
@@ -18,6 +18,8 @@ class IptrafNg(MakefilePackage):
version("1.2.0", sha256="9725115e501d083674d50a7686029d3a08f920abd35c9a2d4a28b5ddb782417f")
version("1.1.4", sha256="16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/iq-tree/package.py b/var/spack/repos/builtin/packages/iq-tree/package.py
index 4a5bb01c25..25bc11cf59 100644
--- a/var/spack/repos/builtin/packages/iq-tree/package.py
+++ b/var/spack/repos/builtin/packages/iq-tree/package.py
@@ -17,6 +17,12 @@ class IqTree(CMakePackage):
license("GPL-2.0-or-later")
version(
+ "2.3.2", tag="v2.3.1", commit="60f1aa68646ab84cc96b55a7548707adde15f47a", submodules=True
+ )
+ version(
+ "2.3.1", tag="v2.3.1", commit="2914a2f7aac0a1a3c4fadde42c83e5dee315186d", submodules=True
+ )
+ version(
"2.2.2.7",
tag="v2.2.2.7",
commit="bd3468c7af6572ea29002dfdba377804f8f56c26",
@@ -30,6 +36,9 @@ class IqTree(CMakePackage):
)
version("1.6.12", sha256="9614092de7a157de82c9cc402b19cc8bfa0cb0ffc93b91817875c2b4bb46a284")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Enable OpenMP support.")
variant("mpi", default=False, description="Enable MPI support.")
variant("lsd2", default=True, description="Activate Least Squares Dating.")
@@ -48,13 +57,13 @@ class IqTree(CMakePackage):
args = []
iqflags = []
- if "+lsd2" in spec:
+ if spec.satisfies("+lsd2"):
args.append("-DUSE_LSD2=ON")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
iqflags.append("omp")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
iqflags.append("mpi")
if not iqflags:
diff --git a/var/spack/repos/builtin/packages/iqtree2/package.py b/var/spack/repos/builtin/packages/iqtree2/package.py
deleted file mode 100644
index 36b28af74f..0000000000
--- a/var/spack/repos/builtin/packages/iqtree2/package.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Iqtree2(CMakePackage):
- """Efficient and versatile phylogenomic software by maximum likelihood"""
-
- homepage = "http://www.iqtree.org"
- url = "https://github.com/iqtree/iqtree2/archive/refs/tags/v2.1.2.tar.gz"
-
- license("GPL-2.0-or-later")
-
- version("2.2.2.7", sha256="407a1a56d352ba9c2152a1d708cd29db872a41c252fbdc7acd8e0de0da8af008")
- version("2.2.2", sha256="2e9ce79427b140bca5f48b31fb098f394a21a7c5116bbbada1e3eabdd6efe982")
- version("2.1.2", sha256="3aaf5ac7f60d852ac8b733fb82832c049ca48b7203a6a865e99c5af359fcca5a")
-
- variant("lsd2", default=False, description="Build with LSD2 support")
-
- depends_on("boost", type="link")
- depends_on("eigen", type="link")
- depends_on("zlib-api", type="link")
-
- resource(
- name="lsd2-rsrc",
- url="https://github.com/tothuhien/lsd2/archive/refs/tags/v.2.4.1.tar.gz",
- sha256="3d0921c96edb8f30498dc8a27878a76d785516043fbede4a72eefd84b5955458",
- destination="lsd2-rsrc",
- when="+lsd2",
- )
-
- @run_before("cmake")
- def expand_resource(self):
- copy_tree(join_path("lsd2-rsrc", "*"), "lsd2")
-
- def cmake_cargs(self):
- args = [self.define_from_variant("USE_LSD2", variant="lsd2")]
-
- return args
diff --git a/var/spack/repos/builtin/packages/irep/package.py b/var/spack/repos/builtin/packages/irep/package.py
index 2210f7bac5..357eb3009d 100644
--- a/var/spack/repos/builtin/packages/irep/package.py
+++ b/var/spack/repos/builtin/packages/irep/package.py
@@ -20,4 +20,8 @@ class Irep(CMakePackage):
version("1.0.0", sha256="b84203ac92de824dbdc672de45cfdb9609373791c4ee84a5201fa6e4ccecc1a4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("lua-lang")
diff --git a/var/spack/repos/builtin/packages/isa-l-crypto/package.py b/var/spack/repos/builtin/packages/isa-l-crypto/package.py
index f6aa7e762d..e02d07cfa2 100644
--- a/var/spack/repos/builtin/packages/isa-l-crypto/package.py
+++ b/var/spack/repos/builtin/packages/isa-l-crypto/package.py
@@ -35,6 +35,8 @@ class IsaLCrypto(AutotoolsPackage):
version("2.23.0", sha256="4827bc3e281d19a434deaa17a172f22f38c113ffc65f5df4348062165cb89eb8")
version("2.22.0", sha256="c6503b455bdf0efcad74fdae4e9b30465e0e208cff2b0b34fd8f471553455527")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/isa-l/package.py b/var/spack/repos/builtin/packages/isa-l/package.py
index 2d56fbcebb..3acf9c9879 100644
--- a/var/spack/repos/builtin/packages/isa-l/package.py
+++ b/var/spack/repos/builtin/packages/isa-l/package.py
@@ -38,6 +38,8 @@ class IsaL(AutotoolsPackage):
version("2.26.0", sha256="938ccce1764ed8fb65a13b02295be5af9a5e0d91686efb7474bde666214153b3")
version("2.25.0", sha256="302bb38bf76be632dbd338ab97efe1c84d47dbe6265ff7af8cb373f256c84b48")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/isaac-server/package.py b/var/spack/repos/builtin/packages/isaac-server/package.py
index 16fc1c6b54..8dcc67b254 100644
--- a/var/spack/repos/builtin/packages/isaac-server/package.py
+++ b/var/spack/repos/builtin/packages/isaac-server/package.py
@@ -28,6 +28,8 @@ class IsaacServer(CMakePackage):
version("1.3.1", sha256="7dead8f3d5467cbd2cde8187e7b860a4ab7796348895d18291f97a76e28757cf")
version("1.3.0", sha256="fcf10f4738e7790ef6604e1e2cdd052a129ba4e53a439deaafa9fb2a70585574")
+ depends_on("cxx", type="build") # generated
+
# variant('gstreamer', default=False, description= \
# 'Support for RTP streams, e.g. to Twitch or Youtube')
diff --git a/var/spack/repos/builtin/packages/isaac/package.py b/var/spack/repos/builtin/packages/isaac/package.py
index 36e13abbe3..8bc42c1e94 100644
--- a/var/spack/repos/builtin/packages/isaac/package.py
+++ b/var/spack/repos/builtin/packages/isaac/package.py
@@ -28,6 +28,8 @@ class Isaac(CMakePackage):
version("1.3.1", sha256="7dead8f3d5467cbd2cde8187e7b860a4ab7796348895d18291f97a76e28757cf")
version("1.3.0", sha256="fcf10f4738e7790ef6604e1e2cdd052a129ba4e53a439deaafa9fb2a70585574")
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Generate CUDA kernels for Nvidia GPUs")
# variant('alpaka', default=False,
# description='Generate kernels via Alpaka, for CPUs or GPUs')
diff --git a/var/spack/repos/builtin/packages/isc-dhcp/package.py b/var/spack/repos/builtin/packages/isc-dhcp/package.py
index 23e223acb5..9cfe0c22ac 100644
--- a/var/spack/repos/builtin/packages/isc-dhcp/package.py
+++ b/var/spack/repos/builtin/packages/isc-dhcp/package.py
@@ -27,6 +27,9 @@ class IscDhcp(AutotoolsPackage):
version("4.3.6", sha256="a41eaf6364f1377fe065d35671d9cf82bbbc8f21207819b2b9f33f652aec6f1b")
version("4.3.5", sha256="eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/isescan/package.py b/var/spack/repos/builtin/packages/isescan/package.py
index ea130c0e59..d598c24b6f 100644
--- a/var/spack/repos/builtin/packages/isescan/package.py
+++ b/var/spack/repos/builtin/packages/isescan/package.py
@@ -18,6 +18,8 @@ class Isescan(Package):
version("1.7.2.3", sha256="90ef6bc660e471347f65864bd3563f769ed4b79b1a932195f353c5e86351ab05")
version("1.7.2.1", sha256="b971a3e86a8cddaa4bcd520ba9e75425bbe93190466f81a3791ae0cb4baf5e5d")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.3.3:", type="run")
depends_on("py-numpy@1.8.0:", type="run")
depends_on("py-scipy@0.13.1:", type="run")
diff --git a/var/spack/repos/builtin/packages/isl/package.py b/var/spack/repos/builtin/packages/isl/package.py
index 43a1d0c4c5..53862f40ad 100644
--- a/var/spack/repos/builtin/packages/isl/package.py
+++ b/var/spack/repos/builtin/packages/isl/package.py
@@ -15,6 +15,7 @@ class Isl(AutotoolsPackage):
license("MIT")
+ version("0.26", sha256="5eac8664e9d67be6bd0bee5085d6840b8baf738c06814df47eaf4166d9776436")
version("0.25", sha256="4305c54d4eebc4bf3ce365af85f04984ef5aa97a52e01128445e26da5b1f467a")
version("0.24", sha256="fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0")
version("0.21", sha256="d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859")
@@ -24,7 +25,10 @@ class Isl(AutotoolsPackage):
version("0.15", sha256="8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b")
version("0.14", sha256="7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp")
def configure_args(self):
- return ["--with-gmp-prefix={0}".format(self.spec["gmp"].prefix)]
+ return [f"--with-gmp-prefix={self.spec['gmp'].prefix}"]
diff --git a/var/spack/repos/builtin/packages/iso-codes/package.py b/var/spack/repos/builtin/packages/iso-codes/package.py
index 7cc06fcc2f..baba46db33 100644
--- a/var/spack/repos/builtin/packages/iso-codes/package.py
+++ b/var/spack/repos/builtin/packages/iso-codes/package.py
@@ -15,6 +15,7 @@ class IsoCodes(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("4.16.0", sha256="d37ff1b2b76e63926e8043b42e0ff806bb4e41e2a57d93c9d4ec99c06b409530")
version("4.15.0", sha256="3d50750bf1d62d83b6085f5815ceb8392df34266a15f16bcf8d4cf7eb15d245c")
version("4.13.0", sha256="2d4d0e5c02327f52cf7c029202da72f2074348472c26904b7104d2be3e0750ef")
version("4.3", sha256="643eb83b2d714e8650ed7112706968d057bf5b101ba71c8ef219e20f1737b141")
diff --git a/var/spack/repos/builtin/packages/isoquant/package.py b/var/spack/repos/builtin/packages/isoquant/package.py
new file mode 100644
index 0000000000..7655204ec5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/isoquant/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Isoquant(Package):
+ """IsoQuant: Transcript discovery and quantification with long RNA reads"""
+
+ # IsoQuant is a collection of Python scripts but does not install as a
+ # typical Python package, so this is a `Package` rather than a `PythonPackage`
+ # and we move things into place manually ...
+
+ homepage = "https://ablab.github.io/IsoQuant/"
+ url = "https://github.com/ablab/IsoQuant/releases/download/v3.6.1/IsoQuant-3.6.1.tar.gz"
+
+ license("GPL-2.0-only", checked_by="A-N-Other")
+
+ version("3.6.1", sha256="6d16e47e9ca45f9a0d029940d5b84e03038d9ba3d640945e3a5087acfd7ed56d")
+
+ depends_on("minimap2", type="run")
+ depends_on("samtools", type="run")
+
+ depends_on("python@3.8:", type="run")
+ depends_on("py-gffutils@0.10.1:", type="run")
+ depends_on("py-biopython@1.76:", type="run")
+ depends_on("py-pandas@1.0.1:", type="run")
+ depends_on("py-pybedtools@0.8.1:", type="run")
+ depends_on("py-pysam@0.15:", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-pyfaidx@0.7:", type="run")
+ depends_on("py-pyyaml@5.4:", type="run")
+ depends_on("py-matplotlib@3.1.3:", type="run")
+ depends_on("py-numpy@1.18.1:", type="run")
+ depends_on("py-scipy@1.4.1:", type="run")
+ depends_on("py-seaborn@0.10.0:", type="run")
+
+ def install(self, spec, prefix):
+ chmod = which("chmod")
+ chmod("+x", "isoquant.py", "visualize.py")
+ mkdirp(prefix.bin)
+ install("*.py", prefix.bin)
+ install_tree("src", prefix.bin.src)
diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py
index bae4d9ceb5..f892540c67 100644
--- a/var/spack/repos/builtin/packages/ispc/package.py
+++ b/var/spack/repos/builtin/packages/ispc/package.py
@@ -27,6 +27,9 @@ class Ispc(CMakePackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("1.24.0", sha256="fac82c8f3f7ece2bc96620cef0b34e10b29462de9349447bcd8c3ba98cfdcd72")
+ version("1.23.0", sha256="e268eabed9a9021b4402725ed1c120b8eca776ee4aaf50ddeb0e4adaadda05f9")
+ version("1.22.0", sha256="1f115eeed7df5028c19c9b256887949ca88c29c146f641b031d8e080297f5acd")
version("1.21.1", sha256="99bbb1d1f15bc4433d6a63b5bb35b321af3e3af753c3b28a61850d1748e8a89f")
version("1.21.0", sha256="023782f721bfb5893bac24bc2153a8214c916be82c290bf63a3ec6678949b5ef")
version("1.20.0", sha256="8bd30ded7f96859451ead1cecf6f58ac8e937288fe0e5b98c56f6eba4be370b4")
@@ -41,25 +44,29 @@ class Ispc(CMakePackage):
version("1.14.0", sha256="1ed72542f56738c632bb02fb0dd56ad8aec3e2487839ebbc0def8334f305a4c7")
version("1.13.0", sha256="aca595508b51dd1ff065c406a3fd7c93822320c510077dd4d97a2b98a23f097a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type="build")
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("ncurses", type="link")
depends_on("zlib-api", type="link")
depends_on("tbb", type="link", when="platform=linux @1.20:")
- depends_on("llvm+clang")
- depends_on("llvm libcxx=none", when="platform=darwin")
- depends_on("llvm targets=arm,aarch64", when="target=arm:")
- depends_on("llvm targets=arm,aarch64", when="target=aarch64:")
- depends_on("llvm@:17", when="@:1.21")
- depends_on("llvm@:15", when="@:1.20")
- depends_on("llvm@:14", when="@:1.18")
- depends_on("llvm@:12", when="@:1.16")
- depends_on("llvm@:11", when="@:1.15")
- depends_on("llvm@:10", when="@:1.14")
- depends_on("llvm@13:", when="@1.19:")
- depends_on("llvm@11:", when="@1.16:")
- depends_on("llvm@10:", when="@1.13:")
+ depends_on("llvm+clang", type="build")
+ depends_on("llvm libcxx=none", when="platform=darwin", type="build")
+ depends_on("llvm targets=arm,aarch64", when="target=arm:", type="build")
+ depends_on("llvm targets=arm,aarch64", when="target=aarch64:", type="build")
+ depends_on("llvm@:18.1", when="@:1.24", type="build")
+ depends_on("llvm@:17", when="@:1.23", type="build")
+ depends_on("llvm@:15", when="@:1.20", type="build")
+ depends_on("llvm@:14", when="@:1.18", type="build")
+ depends_on("llvm@:12", when="@:1.16", type="build")
+ depends_on("llvm@:11", when="@:1.15", type="build")
+ depends_on("llvm@:10", when="@:1.14", type="build")
+ depends_on("llvm@13:", when="@1.19:", type="build")
+ depends_on("llvm@11:", when="@1.16:", type="build")
+ depends_on("llvm@10:", when="@1.13:", type="build")
patch(
"don-t-assume-that-ncurses-zlib-are-system-libraries.patch",
@@ -73,6 +80,13 @@ class Ispc(CMakePackage):
sha256="d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc",
)
+ # Fix build with Apple clang 15
+ patch(
+ "https://github.com/ispc/ispc/pull/2785.patch?full_index=1",
+ when="@1.22:1.23.0",
+ sha256="f6a413bf86e49d520d23df7132004d1f09caa512187f369549a4a783859fbc41",
+ )
+
# Fix library lookup for NCurses in CMake
patch(
"https://patch-diff.githubusercontent.com/raw/ispc/ispc/pull/2638.patch?full_index=1",
diff --git a/var/spack/repos/builtin/packages/istio/package.py b/var/spack/repos/builtin/packages/istio/package.py
index 7616151112..fd824e7234 100644
--- a/var/spack/repos/builtin/packages/istio/package.py
+++ b/var/spack/repos/builtin/packages/istio/package.py
@@ -8,21 +8,31 @@ import platform
from spack.package import *
_versions = {
+ "1.23.2": {
+ "Linux-aarch64": "c2f1ca6cec376cb7eaff5807124b6d7ebcef9c84ff9f3fb7ad3ed1e942cfefab",
+ "Linux-x86_64": "c4bbcb95e3015f63f9aa76ac07a544d4c2f46d6d3b20971559d9216eb07b676b",
+ },
+ # Deprecated versions
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-31045
"1.6.7": {
"Linux-aarch64": "22b0f94efafe9f221c00f4599d9a04e473554515e5fdf8d119fd27e27e36c89f",
"Linux-x86_64": "3243d2c4bb7a116aa04a6bc21d289fb73cdc704988af1749d2a1f0fb5426be36",
+ "deprecated": True,
},
"1.6.6": {
"Linux-aarch64": "b122a0abde24b7680194f504815db5e054483b3657292a6150104e9d129787a5",
"Linux-x86_64": "3f092ffb3a1c13eccfadb42fe14166049535945f349241f90a91d97e57036da7",
+ "deprecated": True,
},
"1.6.5": {
"Linux-aarch64": "c32ed12be0e2bb33bae510fd6b680656990bf2c2ba6059277b6f463a195355a0",
"Linux-x86_64": "68e58e8aec544c2b72377f7c334f90f6215bc819f3ed71ac952692cc5c9b73ac",
+ "deprecated": True,
},
"1.6.4": {
"Linux-aarch64": "700416965f48f91ce5a654513b5aa4ed56dd5875e98af203389b3d20d55016b2",
"Linux-x86_64": "97ce26edad734b4a324b1a3914cead3a38ac70a029dbe09777a483ec192d04df",
+ "deprecated": True,
},
}
@@ -41,7 +51,7 @@ class Istio(Package):
key = "{0}-{1}".format(platform.system(), platform.machine())
sha_val = packages.get(key)
if sha_val:
- version(ver, sha256=sha_val)
+ version(ver, sha256=sha_val, deprecated=packages.get("deprecated", False))
def url_for_version(self, version):
url = "https://github.com/istio/istio/releases/download/{0}/istio-{0}-linux-{1}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/itensor/package.py b/var/spack/repos/builtin/packages/itensor/package.py
index d121e086a0..12ba468096 100644
--- a/var/spack/repos/builtin/packages/itensor/package.py
+++ b/var/spack/repos/builtin/packages/itensor/package.py
@@ -17,6 +17,7 @@ class Itensor(MakefilePackage):
license("Apache-2.0")
+ version("3.2.0", sha256="cb2b041514857639cf9e7c326bfeef152d45228b26243dbb9d1a0f82189f1014")
version("3.1.11", sha256="bc6c48d34c4d4281d15116d7d95d7e6e2b6878b9a60ce33372b8967a96826e95")
version("3.1.10", sha256="68c149e23a1ab936ef8175ea11fedc0ec64031c3686ede93c3a5ab0c893774f6")
version("3.1.9", sha256="4dd71b251b63fb7775ef854212df6f1d5d3ac4d6d1905dc03b1e6d2a0a620a17")
@@ -33,6 +34,8 @@ class Itensor(MakefilePackage):
version("3.0.0", sha256="1d249a3a6442188a9f7829b32238c1025457c2930566d134a785994b1f7c54a9")
version("2.1.1", sha256="b91a67af66ed0fa7678494f3895b5d5ae7f1dc1026540689f9625f515cb7791c")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=False, description="Enable OpenMP support.")
variant("hdf5", default=False, description="Build rockstar with HDF5 support.")
variant("shared", default=False, description="Also build dynamic libraries.")
@@ -62,7 +65,7 @@ class Itensor(MakefilePackage):
copy("options.mk.sample", mf)
# 1.CCCOM
- ccopts = "CCCOM={0}{1}".format(spack_cxx, self.getcopts(spec))
+ ccopts = f"CCCOM={spack_cxx}{self.getcopts(spec)}"
filter_file(r"^CCCOM.+", ccopts, mf)
# 2.BLAS/LAPACK
@@ -80,29 +83,29 @@ class Itensor(MakefilePackage):
vinc += " -fpermissive"
vinc += " -DHAVE_LAPACK_CONFIG_H"
vinc += " -DLAPACK_COMPLEX_STRUCTURE"
- filter_file("#PLATFORM=lapack", vinc, mf, String=True)
+ filter_file("#PLATFORM=lapack", vinc, mf, string=True)
elif ltype == "intel-mkl":
vpla = "PLATFORM=mkl"
- filter_file("#PLATFORM=lapack", vinc, mf, String=True)
+ filter_file("#PLATFORM=lapack", vinc, mf, string=True)
filter_file(r"^PLATFORM.+", vpla, mf)
filter_file(r"^BLAS_LAPACK_LIBFLAGS.+", vlib, mf)
# 3.HDF5
- if "+hdf5" in spec:
- hdf5p = "HDF5_PREFIX={0}".format(spec["hdf5"].prefix.lib)
+ if spec.satisfies("+hdf5"):
+ hdf5p = f"HDF5_PREFIX={spec['hdf5'].prefix.lib}"
filter_file("^#HDF5.+", hdf5p, mf)
# 4.openmp
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
filter_file("#ITENSOR_USE_OMP", "ITENSOR_USE_OMP", mf)
filter_file("-fopenmp", self.compiler.openmp_flag, mf)
# 5.prefix
- filter_file(r"^PREFIX.+", "PREFIX={0}".format(os.getcwd()), mf)
+ filter_file(r"^PREFIX.+", f"PREFIX={os.getcwd()}", mf)
# 5.shared
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
filter_file("ITENSOR_MAKE_DYLIB=0", "ITENSOR_MAKE_DYLIB=1", mf)
def install(self, spec, prefix):
@@ -111,7 +114,7 @@ class Itensor(MakefilePackage):
copy(mf, "options.mk.build")
# 1.CCCOM
- ccopts = "CCCOM={0}".format(self.compiler.cxx)
+ ccopts = f"CCCOM={self.compiler.cxx}"
ccopts += " " + " ".join(spec.compiler_flags["cxxflags"])
if spec.satisfies("%fj"):
ccopts += " " + env["FCC_ENV"]
@@ -125,10 +128,10 @@ class Itensor(MakefilePackage):
filter_file(r"^BLAS_LAPACK_LIBFLAGS=", vlib, mf)
# 3.prefix
- filter_file(r"^PREFIX.+", "PREFIX={0}".format(prefix), mf)
+ filter_file(r"^PREFIX.+", f"PREFIX={prefix}", mf)
# tutorial/project_template/Makefile
mf2 = join_path("tutorial", "project_template", "Makefile")
- filter_file(r"^LIBRARY_DIR.+", "LIBRARY_DIR={0}".format(prefix), mf2)
+ filter_file(r"^LIBRARY_DIR.+", f"LIBRARY_DIR={prefix}", mf2)
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/itk/package.py b/var/spack/repos/builtin/packages/itk/package.py
index f5f46daa7f..f5155a7cc5 100644
--- a/var/spack/repos/builtin/packages/itk/package.py
+++ b/var/spack/repos/builtin/packages/itk/package.py
@@ -35,6 +35,10 @@ class Itk(CMakePackage):
version("5.1.2", sha256="f1e5a78e11125348f68f655c6b89b617c3a8b2c09f710081f621054811a70c98")
version("5.1.1", sha256="39e2a63840054361b728878a35b21bbe38374682ffb4b5c4f8f8f7514dedb58e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("review", default=False, description="enable modules under review")
variant("rtk", default=False, description="build the RTK (Reconstruction Toolkit module")
variant("minc", default=False, description="enable support for MINC files")
@@ -59,7 +63,6 @@ class Itk(CMakePackage):
depends_on("eigen")
depends_on("expat")
depends_on("fftw-api")
- depends_on("googletest")
depends_on("hdf5+cxx+hl")
depends_on("jpeg")
depends_on("libpng")
@@ -75,8 +78,11 @@ class Itk(CMakePackage):
def cmake_args(self):
use_mkl = self.spec["fftw-api"].name in INTEL_MATH_LIBRARIES
args = [
+ self.define("BUILD_TESTING", False),
self.define("BUILD_SHARED_LIBS", True),
self.define("ITK_USE_SYSTEM_LIBRARIES", True),
+ # https://github.com/InsightSoftwareConsortium/ITK/issues/303
+ self.define("ITK_USE_SYSTEM_GOOGLETEST", False),
self.define("ITK_USE_MKL", use_mkl),
self.define_from_variant("Module_ITKReview", "review"),
self.define_from_variant("Module_RTK", "rtk"),
diff --git a/var/spack/repos/builtin/packages/itstool/package.py b/var/spack/repos/builtin/packages/itstool/package.py
index 1847302407..69c45b6d88 100644
--- a/var/spack/repos/builtin/packages/itstool/package.py
+++ b/var/spack/repos/builtin/packages/itstool/package.py
@@ -11,8 +11,8 @@ class Itstool(AutotoolsPackage):
rules from the W3C Internationalization Tag Set (ITS) to determine what
to translate and how to separate it into PO file messages."""
- homepage = "http://itstool.org/"
- url = "http://files.itstool.org/itstool/itstool-2.0.2.tar.bz2"
+ homepage = "https://itstool.org/"
+ url = "https://files.itstool.org/itstool/itstool-2.0.2.tar.bz2"
maintainers("agoodLANL")
diff --git a/var/spack/repos/builtin/packages/iwyu/package.py b/var/spack/repos/builtin/packages/iwyu/package.py
index 1c28fb9e80..b455810bfe 100644
--- a/var/spack/repos/builtin/packages/iwyu/package.py
+++ b/var/spack/repos/builtin/packages/iwyu/package.py
@@ -37,6 +37,9 @@ class Iwyu(CMakePackage):
version("0.12", sha256="a5892fb0abccb820c394e4e245c00ef30fc94e4ae58a048b23f94047c0816025")
version("0.11", sha256="2d2877726c4aed9518cbb37673ffbc2b7da9c239bf8fe29432da35c1c0ec367a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("iwyu-013-cmake.patch", when="@0.13:0.14")
depends_on("llvm+clang@17.0:17", when="@0.21")
diff --git a/var/spack/repos/builtin/packages/jackcess/package.py b/var/spack/repos/builtin/packages/jackcess/package.py
index 72d92fdebc..eb271cb1a0 100644
--- a/var/spack/repos/builtin/packages/jackcess/package.py
+++ b/var/spack/repos/builtin/packages/jackcess/package.py
@@ -10,7 +10,7 @@ class Jackcess(Package):
"""Jackcess is a pure Java library for reading from and writing to
MS Access databases (currently supporting versions 2000-2016)."""
- homepage = "http://jackcess.sourceforge.net/"
+ homepage = "https://jackcess.sourceforge.net/"
url = "https://sourceforge.net/projects/jackcess/files/jackcess/2.1.12/jackcess-2.1.12.jar"
version(
diff --git a/var/spack/repos/builtin/packages/jags/package.py b/var/spack/repos/builtin/packages/jags/package.py
index bff7d1574b..e73dfe8c86 100644
--- a/var/spack/repos/builtin/packages/jags/package.py
+++ b/var/spack/repos/builtin/packages/jags/package.py
@@ -13,14 +13,19 @@ class Jags(AutotoolsPackage):
tags = ["mcmc", "Gibbs-sampler"]
- homepage = "http://mcmc-jags.sourceforge.net/"
+ homepage = "https://mcmc-jags.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Source/JAGS-4.2.0.tar.gz"
license("GPL-2.0-or-later")
+ version("4.3.2", sha256="871f556af403a7c2ce6a0f02f15cf85a572763e093d26658ebac55c4ab472fc8")
version("4.3.0", sha256="8ac5dd57982bfd7d5f0ee384499d62f3e0bb35b5f1660feb368545f1186371fc")
version("4.2.0", sha256="af3e9d2896d3e712f99e2a0c81091c6b08f096650af6aa9d0c631c0790409cf7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/jali/package.py b/var/spack/repos/builtin/packages/jali/package.py
index ce7b62ac54..56e9d14a55 100644
--- a/var/spack/repos/builtin/packages/jali/package.py
+++ b/var/spack/repos/builtin/packages/jali/package.py
@@ -28,6 +28,8 @@ class Jali(CMakePackage):
version("1.1.0", sha256="783dfcd6a9284af83bb380ed257fa8b0757dc2f7f9196d935eb974fb6523c644")
version("1.0.5", sha256="979170615d33a7bf20c96bd4d0285e05a2bbd901164e377a8bccbd9af9463801")
+ depends_on("cxx", type="build") # generated
+
variant("mstk", default=True, description="Enable MSTK")
# dependencies
diff --git a/var/spack/repos/builtin/packages/jansi-native/package.py b/var/spack/repos/builtin/packages/jansi-native/package.py
index 26903db652..b57e73df86 100644
--- a/var/spack/repos/builtin/packages/jansi-native/package.py
+++ b/var/spack/repos/builtin/packages/jansi-native/package.py
@@ -18,4 +18,6 @@ class JansiNative(MavenPackage):
version("1.8", sha256="053808f58495a5657c7e7f388008b02065fbbb3f231454bfcfa159adc2e2fcea")
+ depends_on("c", type="build") # generated
+
depends_on("java@8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/jansson/package.py b/var/spack/repos/builtin/packages/jansson/package.py
index 034040dcad..96ecf3588b 100644
--- a/var/spack/repos/builtin/packages/jansson/package.py
+++ b/var/spack/repos/builtin/packages/jansson/package.py
@@ -24,6 +24,9 @@ class Jansson(CMakePackage):
version("2.10", sha256="b0a899f90ade82e42da0ecabc8af1fa296d69691e7c0786c4994fb79d4833ebb")
version("2.9", sha256="952fa714b399e71c1c3aa020e32e899f290c82126ca4d0d14cff5d10af457656")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/jasper/package.py b/var/spack/repos/builtin/packages/jasper/package.py
index 3158e66138..5b77a1cd05 100644
--- a/var/spack/repos/builtin/packages/jasper/package.py
+++ b/var/spack/repos/builtin/packages/jasper/package.py
@@ -3,34 +3,44 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import autotools, cmake
from spack.package import *
-class Jasper(Package):
+class Jasper(AutotoolsPackage, CMakePackage):
"""Library for manipulating JPEG-2000 images"""
homepage = "https://www.ece.uvic.ca/~frodo/jasper/"
url = "https://github.com/jasper-software/jasper/archive/version-2.0.32.tar.gz"
+ version("4.2.4", sha256="23a3d58cdeacf3abdf9fa1d81dcefee58da6ab330940790c0f27019703bfd2cd")
+ version("3.0.6", sha256="c79961bc00158f5b5dc5f5fcfa792fde9bebb024432689d0f9e3f95a097d0ec3")
version("3.0.3", sha256="1b324f7746681f6d24d06fcf163cf3b8ae7ac320adc776c3d611b2b62c31b65f")
version("2.0.32", sha256="a3583a06698a6d6106f2fc413aa42d65d86bedf9a988d60e5cfa38bf72bc64b9")
version("2.0.31", sha256="d419baa2f8a6ffda18472487f6314f0f08b673204723bf11c3a1f5b3f1b8e768")
version("2.0.16", sha256="f1d8b90f231184d99968f361884e2054a1714fdbbd9944ba1ae4ebdcc9bbfdb1")
version("2.0.14", sha256="85266eea728f8b14365db9eaf1edc7be4c348704e562bb05095b9a077cf1a97b")
- version("1.900.1", sha256="c2b03f28166f9dc8ae434918839ae9aa9962b880fcfd24eebddd0a2daeb9192c")
+ version(
+ "1.900.1",
+ sha256="c2b03f28166f9dc8ae434918839ae9aa9962b880fcfd24eebddd0a2daeb9192c",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ build_system(
+ conditional("cmake", when="@2:"), conditional("autotools", when="@:1"), default="cmake"
+ )
variant("jpeg", default=True, description="Enable the use of the JPEG library")
variant("opengl", default=False, description="Enable the use of the OpenGL and GLUT libraries")
variant("shared", default=True, description="Enable the building of shared libraries")
- variant(
- "build_type",
- default="Release",
- description="CMake build type",
- values=("Debug", "Release"),
- )
- depends_on("cmake@2.8.11:", type="build", when="@2:")
- depends_on("cmake@3.12:", type="build", when="@3:")
+ with when("build_system=cmake"):
+ depends_on("cmake@2.8.11:", type="build")
+ depends_on("cmake@3.12:", type="build", when="@3:")
+
depends_on("jpeg", when="+jpeg")
depends_on("gl", when="+opengl")
@@ -42,69 +52,22 @@ class Jasper(Package):
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786
patch("fix_alpha_channel_assert_fail.patch", when="@1.900.1")
- def cmake_args(self):
- spec = self.spec
- args = std_cmake_args
- args.append("-DJAS_ENABLE_DOC=false")
-
- if "+jpeg" in spec:
- args.append("-DJAS_ENABLE_LIBJPEG=true")
- else:
- args.append("-DJAS_ENABLE_LIBJPEG=false")
-
- if "+opengl" in spec:
- args.append("-DJAS_ENABLE_OPENGL=true")
- else:
- args.append("-DJAS_ENABLE_OPENGL=false")
- if "+shared" in spec:
- args.append("-DJAS_ENABLE_SHARED=true")
- else:
- args.append("-DJAS_ENABLE_SHARED=false")
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [
+ self.define("JAS_ENABLE_DOC", False),
+ self.define("JAS_ENABLE_LATEX", False),
+ self.define_from_variant("JAS_ENABLE_LIBJPEG", "jpeg"),
+ self.define_from_variant("JAS_ENABLE_OPENGL", "opengl"),
+ self.define_from_variant("JAS_ENABLE_SHARED", "shared"),
+ ]
- return args
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
- spec = self.spec
- args = ["--prefix={0}".format(self.prefix)]
-
- if "+jpeg" in spec:
- args.append("--enable-libjpeg")
- else:
- args.append("--disable-libjpeg")
-
- if "+opengl" in spec:
- args.append("--enable-opengl")
- else:
- args.append("--disable-opengl")
-
- if "+shared" in spec:
- args.append("--enable-shared")
- else:
- args.append("--disable-shared")
-
- if "build_type=Debug" in spec:
- args.append("--enable-debug")
- else:
- args.append("--disable-debug")
-
+ args = []
+ args.extend(self.enable_or_disable("jpeg"))
+ args.extend(self.enable_or_disable("opengl"))
+ args.extend(self.enable_or_disable("shared"))
return args
-
- @when("@2:")
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- cmake("..", *self.cmake_args())
- make()
- if self.run_tests:
- make("test")
- make("install")
-
- @when("@:1")
- def install(self, spec, prefix):
- configure(*self.configure_args())
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
diff --git a/var/spack/repos/builtin/packages/javafx/package.py b/var/spack/repos/builtin/packages/javafx/package.py
index fe3d767c8e..20e58fb506 100644
--- a/var/spack/repos/builtin/packages/javafx/package.py
+++ b/var/spack/repos/builtin/packages/javafx/package.py
@@ -47,6 +47,8 @@ class Javafx(Package):
except KeyError:
continue
+ skip_version_audit = ["platform=windows"]
+
maintainers("snehring")
extends("openjdk")
diff --git a/var/spack/repos/builtin/packages/jbigkit/package.py b/var/spack/repos/builtin/packages/jbigkit/package.py
index 6a95bd304b..9551d7b046 100644
--- a/var/spack/repos/builtin/packages/jbigkit/package.py
+++ b/var/spack/repos/builtin/packages/jbigkit/package.py
@@ -16,6 +16,8 @@ class Jbigkit(MakefilePackage):
version("2.1", sha256="de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932")
version("1.6", sha256="d841b6d0723c1082450967f3ea500be01810a34ec4a97ad10985ae7071a6150b")
+ depends_on("c", type="build") # generated
+
build_directory = "libjbig"
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/jchronoss/package.py b/var/spack/repos/builtin/packages/jchronoss/package.py
index c6a991b33d..dcbf609af9 100644
--- a/var/spack/repos/builtin/packages/jchronoss/package.py
+++ b/var/spack/repos/builtin/packages/jchronoss/package.py
@@ -22,6 +22,9 @@ class Jchronoss(CMakePackage):
version("1.1", sha256="e8230416c94fb58516a4b9293efd0a67edf4a37e82cfae2ced2c0af8b4615f22")
version("1.0", sha256="6a92d3cf2424fc7eaaeac9bfefe395596275e552ac5660eb4543e43679586f24")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("realtime", default=False, description="Enable Real-Time support")
variant("openmp", default=False, description="Enable OpenMP constructs")
variant("ncurses", default=False, description="Enable ncurses-based tool")
diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py
index b0bdf2e8e3..c699f19a10 100644
--- a/var/spack/repos/builtin/packages/jdk/package.py
+++ b/var/spack/repos/builtin/packages/jdk/package.py
@@ -6,8 +6,6 @@
import os
import re
-import llnl.util.tty as tty
-
from spack.package import *
from spack.util.prefix import Prefix
@@ -21,96 +19,25 @@ class Jdk(Package):
maintainers("justintoo")
- # Oracle requires that you accept their License Agreement in order
- # to access the Java packages in download.oracle.com. In order to
- # automate this process, we need to utilize these additional curl
- # command-line options. See:
- # http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux
- fetch_options = {"cookie": "oraclelicense=accept-securebackup-cookie"}
-
- # To add the latest version, go to the homepage listed above,
- # click "JDK Download", click "Accept License Agreement", right-click the
- # Linux .tar.gz link, and select Copy Link Address. The checksum can be
- # found in a link above. The build number can be deciphered from the URL.
- # Alternatively, run `bin/java -version` after extracting. Replace '+'
- # symbol in version with '_', otherwise it will be interpreted as a variant
- version(
- "14_36",
- sha256="4639bbaecc9cc606f1a4b99fda1efcaefcbf57a7025b3828b095093a6c866afd",
- url="https://download.oracle.com/otn-pub/java/jdk/14+36/076bab302c7b4508975440c56f6cc26a/jdk-14_linux-x64_bin.tar.gz",
- )
- version(
- "12.0.2_10",
- sha256="2dde6fda89a4ec6e6560ed464e917861c9e40bf576e7a64856dafc55abaaff51",
- url="https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz",
- )
- version(
- "12.0.1_12",
- sha256="9fd6dcdaf2cfca7da59e39b009a0f5bcd53bec2fb16105f7ca8d689cdab68d75",
- url="https://download.oracle.com/otn-pub/java/jdk/12.0.1+12/69cfe15208a647278a19ef0990eea691/jdk-12.0.1_linux-x64_bin.tar.gz",
- )
- version(
- "11.0.2_9",
- sha256="7b4fd8ffcf53e9ff699d964a80e4abf9706b5bdb5644a765c2b96f99e3a2cdc8",
- url="https://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz",
- )
- version(
- "11.0.1_13",
- sha256="e7fd856bacad04b6dbf3606094b6a81fa9930d6dbb044bbd787be7ea93abc885",
- url="https://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.tar.gz",
- )
- version(
- "10.0.2_13",
- sha256="6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b",
- url="https://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz",
- )
- version(
- "10.0.1_10",
- sha256="ae8ed645e6af38432a56a847597ac61d4283b7536688dbab44ab536199d1e5a4",
- url="https://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz",
- )
- version(
- "1.8.0_241-b07",
- sha256="419d32677855f676076a25aed58e79432969142bbd778ff8eb57cb618c69e8cb",
- url="https://download.oracle.com/otn-pub/java/jdk/8u241-b07/1f5b5a70bf22433b84d0e960903adac8/jdk-8u241-linux-x64.tar.gz",
- )
version(
- "1.8.0_231-b11",
- sha256="a011584a2c9378bf70c6903ef5fbf101b30b08937441dc2ec67932fb3620b2cf",
- url="https://download.oracle.com/otn-pub/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-linux-x64.tar.gz",
+ "21.0.2",
+ sha256="9f1f4a7f25ef6a73255657c40a6d7714f2d269cf15fb2ff1dc9c0c8b56623a6f",
+ url="https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz",
)
version(
- "1.8.0_212-b10",
- sha256="3160c50aa8d8e081c8c7fe0f859ea452922eca5d2ae8f8ef22011ae87e6fedfb",
- url="https://download.oracle.com/otn-pub/java/jdk/8u212-b10/59066701cf1a433da9770636fbc4c9aa/jdk-8u212-linux-x64.tar.gz",
- )
- version(
- "1.8.0_202-b08",
- sha256="9a5c32411a6a06e22b69c495b7975034409fa1652d03aeb8eb5b6f59fd4594e0",
- url="https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.tar.gz",
- )
- version(
- "1.8.0_141-b15",
- sha256="041d5218fbea6cd7e81c8c15e51d0d32911573af2ed69e066787a8dc8a39ba4f",
- url="https://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz",
- )
- version(
- "1.8.0_131-b11",
- sha256="62b215bdfb48bace523723cdbb2157c665e6a25429c73828a32f00e587301236",
- url="https://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz",
+ "17.0.10",
+ sha256="e4fb2df9a32a876afb0a6e17f54c594c2780e18badfa2e8fc99bc2656b0a57b1",
+ url="https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz",
)
- provides("java@14", when="@14.0:14")
- provides("java@13", when="@13.0:13")
- provides("java@12", when="@12.0:12")
- provides("java@11", when="@11.0:11")
- provides("java@10", when="@10.0:10")
- provides("java@9", when="@9.0:9")
- provides("java@8", when="@1.8.0:1.8")
- provides("java@7", when="@1.7.0:1.7")
+ provides("java@21", when="@21")
+ provides("java@17", when="@17")
- conflicts("target=ppc64:", msg="jdk is only available for x86_64")
- conflicts("target=ppc64le:", msg="jdk is only available for x86_64")
+ requires("target=x86_64:", msg="binaries only availble for x86_64")
+ # requires("platform=linux") # bug in concretizer
+ conflicts("platform=windows")
+ conflicts("platform=darwin")
+ conflicts("platform=freebsd")
# FIXME:
# 1. `extends('java')` doesn't work, you need to use `extends('jdk')`
@@ -168,46 +95,6 @@ class Jdk(Package):
return find_libraries(["libjvm"], root=self.home, recursive=True)
- @run_before("install")
- def macos_check(self):
- if self.spec.satisfies("platform=darwin"):
- msg = """\
-Spack's JDK package only supports Linux. If you need to install JDK on macOS,
-manually download the .dmg from:
-
- {0}
-
-and double-click to install. Once JDK is installed, you can tell Spack where
-to find it like so. To find the JDK installation directory, run:
-
- $ /usr/libexec/java_home
-
-If you have multiple versions of JDK installed, you can specify a particular
-version to search for with the --version flag. To find the exact version
-number, run:
-
- $ java -version
-
-If the version number contains a '+' symbol, replace it with '_', otherwise
-Spack will think it is a variant. Add JDK as an external package by running:
-
- $ spack config edit packages
-
-and adding entries for each installation:
-
- packages:
- jdk:
- buildable: False
- externals:
- - spec: jdk@10.0.1_10
- prefix: /path/to/jdk/Home
- - spec: jdk@1.7.0_45-b18
- prefix: /path/to/jdk/Home""".format(
- self.homepage
- )
-
- tty.die(msg)
-
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/jellyfish/package.py b/var/spack/repos/builtin/packages/jellyfish/package.py
index 6bd9df9924..f20643fa8d 100644
--- a/var/spack/repos/builtin/packages/jellyfish/package.py
+++ b/var/spack/repos/builtin/packages/jellyfish/package.py
@@ -15,6 +15,7 @@ class Jellyfish(AutotoolsPackage):
license("GPL-3.0-only")
+ version("2.3.1", sha256="ee032b57257948ca0f0610883099267572c91a635eecbd88ae5d8974c2430fcd")
version("2.3.0", sha256="e195b7cf7ba42a90e5e112c0ed27894cd7ac864476dc5fb45ab169f5b930ea5a")
version(
"2.2.7",
@@ -27,6 +28,8 @@ class Jellyfish(AutotoolsPackage):
url="https://www.cbcb.umd.edu/software/jellyfish/jellyfish-1.1.11.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", when="@2.2.7:", type=("build", "run"))
variant("ruby", default=False, description="Enable ruby bindings")
# Info: python bindings exist, but are for python2 which is no longer supported in spack
diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py
index 938e506b2a..e2bbecd2af 100644
--- a/var/spack/repos/builtin/packages/jemalloc/package.py
+++ b/var/spack/repos/builtin/packages/jemalloc/package.py
@@ -26,6 +26,9 @@ class Jemalloc(AutotoolsPackage):
version("4.1.0", sha256="fad06d714f72adb4265783bc169c6d98eeb032d57ba02d87d1dcb4a2d933ec8e")
version("4.0.4", sha256="3fda8d8d7fcd041aa0bebbecd45c46b28873cf37bd36c56bf44961b36d0f42d0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("stats", default=False, description="Enable heap statistics")
variant("prof", default=False, description="Enable heap profiling")
variant(
diff --git a/var/spack/repos/builtin/packages/jhpcn-df/package.py b/var/spack/repos/builtin/packages/jhpcn-df/package.py
index 5f266d1936..5a63d22644 100644
--- a/var/spack/repos/builtin/packages/jhpcn-df/package.py
+++ b/var/spack/repos/builtin/packages/jhpcn-df/package.py
@@ -25,6 +25,10 @@ class JhpcnDf(CMakePackage):
version("1.1.0", sha256="106d99cc4faac5c76e51e8bfe3193c1d3dc91648072cf418d868ed830592b04b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("lz4", default=False, description="Enable lz4")
variant("fortran", default=False, description="Enable Fortran Interface")
diff --git a/var/spack/repos/builtin/packages/jimtcl/package.py b/var/spack/repos/builtin/packages/jimtcl/package.py
index 35fc0ed7d0..b764fe7e12 100644
--- a/var/spack/repos/builtin/packages/jimtcl/package.py
+++ b/var/spack/repos/builtin/packages/jimtcl/package.py
@@ -18,3 +18,6 @@ class Jimtcl(AutotoolsPackage):
version("0.79", sha256="ab8204cd03b946f5149e1273af9c86d8e73b146084a0fbeb1d4f41a75b0b3411")
version("0.78", sha256="cf801795c9fd98bfff6882c14afdf96424ba86dead58c2a4e15978b176d3e12b")
version("0.77", sha256="0874c50ab932c68940c29c48c014266a322c54ff357a0919386f32cc341eb3b2")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/jmol/package.py b/var/spack/repos/builtin/packages/jmol/package.py
index a3eba1e202..317627f4de 100644
--- a/var/spack/repos/builtin/packages/jmol/package.py
+++ b/var/spack/repos/builtin/packages/jmol/package.py
@@ -12,7 +12,7 @@ class Jmol(Package):
"""Jmol: an open-source Java viewer for chemical structures in 3D
with features for chemicals, crystals, materials and biomolecules."""
- homepage = "http://jmol.sourceforge.net/"
+ homepage = "https://jmol.sourceforge.net/"
url = "https://sourceforge.net/projects/jmol/files/Jmol/Version%2014.8/Jmol%2014.8.0/Jmol-14.8.0-binary.tar.gz"
license("LGPL-2.1-or-later")
diff --git a/var/spack/repos/builtin/packages/jogl/package.py b/var/spack/repos/builtin/packages/jogl/package.py
index 0e03ff6319..011fc980f4 100644
--- a/var/spack/repos/builtin/packages/jogl/package.py
+++ b/var/spack/repos/builtin/packages/jogl/package.py
@@ -19,6 +19,9 @@ class Jogl(Package):
version("java-11-fixes", branch="java-11-fixes", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("ant", type="build")
depends_on("java", type=("build", "run"))
depends_on("gluegen", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/jose/package.py b/var/spack/repos/builtin/packages/jose/package.py
index 3f997647f9..c2d2df4606 100644
--- a/var/spack/repos/builtin/packages/jose/package.py
+++ b/var/spack/repos/builtin/packages/jose/package.py
@@ -18,6 +18,8 @@ class Jose(AutotoolsPackage):
version("9", sha256="64262b1344d92fc183f70ca93db6100cd97b3dfa7cddea1e08e8588e6cd681eb")
version("8", sha256="24e3d71e3da5a7913ab3c299381d76dfde488d91cb108b1a9527454bf1e9dc51")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("jansson@2.10:")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/jpegoptim/package.py b/var/spack/repos/builtin/packages/jpegoptim/package.py
index 070889c15e..802cdce858 100644
--- a/var/spack/repos/builtin/packages/jpegoptim/package.py
+++ b/var/spack/repos/builtin/packages/jpegoptim/package.py
@@ -18,4 +18,6 @@ class Jpegoptim(AutotoolsPackage):
version("1.4.5", sha256="53207f479f96c4f792b3187f31abf3534d69c88fe23720d0c23f5310c5d2b2f5")
version("1.4.4", sha256="bc6b018ae8c3eb12d07596693d54243e214780a2a2303a6578747d3671f45da3")
+ depends_on("c", type="build") # generated
+
depends_on("libjpeg")
diff --git a/var/spack/repos/builtin/packages/jq/package.py b/var/spack/repos/builtin/packages/jq/package.py
index effafa8ee2..69886aa9b2 100644
--- a/var/spack/repos/builtin/packages/jq/package.py
+++ b/var/spack/repos/builtin/packages/jq/package.py
@@ -17,9 +17,12 @@ class Jq(AutotoolsPackage):
license("MIT")
+ version("1.7.1", sha256="478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2")
version("1.6", sha256="5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72")
version("1.5", sha256="c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c")
+ depends_on("c", type="build") # generated
+
depends_on("oniguruma")
depends_on("bison@3.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/json-c/package.py b/var/spack/repos/builtin/packages/json-c/package.py
index c5ebb20a45..59da279e5e 100644
--- a/var/spack/repos/builtin/packages/json-c/package.py
+++ b/var/spack/repos/builtin/packages/json-c/package.py
@@ -22,6 +22,9 @@ class JsonC(CMakePackage, AutotoolsPackage):
version("0.12", sha256="000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f")
version("0.11", sha256="28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("cmake", when="@0.14:"),
conditional("autotools", when="@:0.13.1"),
@@ -45,11 +48,10 @@ class JsonC(CMakePackage, AutotoolsPackage):
filter_file("-Werror", "", "CMakeLists.txt")
def flag_handler(self, name, flags):
- iflags = []
if name == "cflags":
if self.spec.satisfies("%oneapi"):
- iflags.append("-Wno-error=implicit-function-declaration")
- return (iflags, None, None)
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
@run_after("install")
def darwin_fix(self):
diff --git a/var/spack/repos/builtin/packages/json-cwx/package.py b/var/spack/repos/builtin/packages/json-cwx/package.py
index b0b0091c9e..0ad82764b4 100644
--- a/var/spack/repos/builtin/packages/json-cwx/package.py
+++ b/var/spack/repos/builtin/packages/json-cwx/package.py
@@ -16,6 +16,8 @@ class JsonCwx(AutotoolsPackage):
version("0.12", sha256="3bfae1f23eacba53ee130dbd1a6acf617af4627a9b4e4581d64b20a99b4e2b60")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/json-fortran/package.py b/var/spack/repos/builtin/packages/json-fortran/package.py
index 334cd6093e..722fd2256b 100644
--- a/var/spack/repos/builtin/packages/json-fortran/package.py
+++ b/var/spack/repos/builtin/packages/json-fortran/package.py
@@ -29,6 +29,8 @@ class JsonFortran(CMakePackage):
version("7.0.0", sha256="9b5b6235489b27d572bbc7620ed8e039fa9d4d14d41b1581b279be9db499f32c")
version("6.11.0", sha256="0ce38236a0debcd775108684b835f9f92ca9d6594da714c0025014fe9f03eec3")
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@2.8.8:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py
index 8c5050761f..c176626483 100644
--- a/var/spack/repos/builtin/packages/jsoncpp/package.py
+++ b/var/spack/repos/builtin/packages/jsoncpp/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.cmake
+import spack.build_systems.meson
from spack.package import *
@@ -35,6 +37,8 @@ class Jsoncpp(CMakePackage, MesonPackage):
version("1.7.4", sha256="10dcd0677e80727e572a1e462193e51a5fde3e023b99e144b2ee1a469835f769")
version("1.7.3", sha256="1cfcad14054039ba97c22531888796cb9369e6353f257aacaad34fda956ada53")
+ depends_on("cxx", type="build") # generated
+
# From 1.9.3 onwards CMAKE_CXX_STANDARD is finally set to 11.
variant(
"cxxstd",
diff --git a/var/spack/repos/builtin/packages/jsonnet/package.py b/var/spack/repos/builtin/packages/jsonnet/package.py
index e5db816c56..24d5465b40 100644
--- a/var/spack/repos/builtin/packages/jsonnet/package.py
+++ b/var/spack/repos/builtin/packages/jsonnet/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -22,6 +23,9 @@ class Jsonnet(MakefilePackage):
version("0.18.0", sha256="85c240c4740f0c788c4d49f9c9c0942f5a2d1c2ae58b2c71068107bc80a3ced4")
version("0.17.0", sha256="076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@:5.4.99", when="@0.18.0:")
variant("python", default=False, description="Provide Python bindings for jsonnet")
@@ -37,5 +41,4 @@ class Jsonnet(MakefilePackage):
@run_after("install")
def python_install(self):
if "+python" in self.spec:
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/jube/package.py b/var/spack/repos/builtin/packages/jube/package.py
index dac82cac14..554e98c069 100644
--- a/var/spack/repos/builtin/packages/jube/package.py
+++ b/var/spack/repos/builtin/packages/jube/package.py
@@ -17,6 +17,31 @@ class Jube(PythonPackage):
license("GPL-3.0-or-later")
version(
+ "2.7.1",
+ sha256="fe8b505a8bf224d785df665af134a1e69063d34d1a7214700d8c7325fef9ecfc",
+ extension="tar.gz",
+ )
+ version(
+ "2.7.0",
+ sha256="31bba50c40547db6dc777d9766babb4786bb8539e988fd5de962602593304d26",
+ extension="tar.gz",
+ )
+ version(
+ "2.6.2",
+ sha256="44fd0dd74500cb2537af52850d5742e5bc09f0379036bad83984a69bd7396151",
+ extension="tar.gz",
+ )
+ version(
+ "2.6.1",
+ sha256="348ebeb4db0ea56889a5d13bf49e394fccc0992f620e8c0c61c40185db13ad64",
+ extension="tar.gz",
+ )
+ version(
+ "2.6.0",
+ sha256="cc1bfa30c4a1de010c0a203c9d22ec810c5de8b76108d5a8174b395573e2ebcc",
+ extension="tar.gz",
+ )
+ version(
"2.5.1",
sha256="4c9a754b0e6f2b5e8cd0f5bd643dcfd7863a96b05cd02141d5eb301f2b89f6a3",
extension="tar.gz",
diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py
index 7dec302710..9353721974 100644
--- a/var/spack/repos/builtin/packages/judy/package.py
+++ b/var/spack/repos/builtin/packages/judy/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Judy(AutotoolsPackage):
"""Judy: General-purpose dynamic array, associative array and hash-trie."""
- homepage = "http://judy.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz"
+ homepage = "https://judy.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz"
license("LGPL-2.0-only")
version("1.0.5", sha256="d2704089f85fdb6f2cd7e77be21170ced4b4375c03ef1ad4cf1075bd414a63eb")
+ depends_on("c", type="build") # generated
+
parallel = False
diff --git a/var/spack/repos/builtin/packages/julea/package.py b/var/spack/repos/builtin/packages/julea/package.py
index 4d1f336fd7..7c22aa696b 100644
--- a/var/spack/repos/builtin/packages/julea/package.py
+++ b/var/spack/repos/builtin/packages/julea/package.py
@@ -23,6 +23,9 @@ class Julea(MesonPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("hdf5", default=True, description="Enable HDF5 support")
variant("leveldb", default=True, description="Enable LevelDB support")
variant("lmdb", default=True, description="Enable LMDB support")
diff --git a/var/spack/repos/builtin/packages/julia/julia-1.10-rm-suite-sparse-cuda-stubs.patch b/var/spack/repos/builtin/packages/julia/julia-1.10-rm-suite-sparse-cuda-stubs.patch
new file mode 100644
index 0000000000..e95b59fe3c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/julia/julia-1.10-rm-suite-sparse-cuda-stubs.patch
@@ -0,0 +1,16 @@
+diff --git a/base/Makefile b/base/Makefile
+index ad2bb6a63c..493302af78 100644
+--- a/base/Makefile
++++ b/base/Makefile
+@@ -269,11 +269,9 @@ $(eval $(call symlink_system_library,LIBSUITESPARSE,libamd))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libcamd))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libccolamd))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libcholmod))
+-$(eval $(call symlink_system_library,LIBSUITESPARSE,libcholmod_cuda))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libcolamd))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libumfpack))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libspqr))
+-$(eval $(call symlink_system_library,LIBSUITESPARSE,libspqr_cuda))
+ $(eval $(call symlink_system_library,LIBSUITESPARSE,libsuitesparseconfig))
+ # EXCLUDED LIBRARIES (installed/used, but not vendored for use with dlopen):
+ # libunwind
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
index 857d51bdbe..6495d8ae6f 100644
--- a/var/spack/repos/builtin/packages/julia/package.py
+++ b/var/spack/repos/builtin/packages/julia/package.py
@@ -26,9 +26,16 @@ class Julia(MakefilePackage):
maintainers("vchuravy", "haampie", "giordano")
version("master", branch="master")
+ version("1.11.0", sha256="a938c6b7758a83e817b56db3e542bd85e6d74db75e1381b1ba24cd6e3dc8c566")
+
+ version("1.10.4", sha256="c46ed8166fe860a7258d088a0add68dfdf11ad64cc4c0b1f113570862d3ef777")
+ version("1.10.3", sha256="b3cd34c839d25b98a162070b4e3abd5f34564ffdad13e07073be7885e5678a18")
+ version("1.10.2", sha256="e3d20c02975da054aeb18d32ed84c5d760d54d2563e45e25017684a5a105d185")
+
version("1.9.3", sha256="8d7dbd8c90e71179e53838cdbe24ff40779a90d7360e29766609ed90d982081d")
version("1.9.2", sha256="015438875d591372b80b09d01ba899657a6517b7c72ed41222298fef9d4ad86b")
version("1.9.0", sha256="48f4c8a7d5f33d0bc6ce24226df20ab49e385c2d0c3767ec8dfdb449602095b2")
+
version("1.8.5", sha256="d31026cc6b275d14abce26fd9fd5b4552ac9d2ce8bde4291e494468af5743031")
version("1.8.4", sha256="b7b8ee64fb947db8d61104f231e1b25342fe330d29e0d2273f93c264f32c5333")
version("1.8.3", sha256="4d8d460fcae5c6f8306a3e3c14371635c1a26f47c3ce62b2950cf9234b6ec849")
@@ -46,6 +53,10 @@ class Julia(MakefilePackage):
version("1.6.5", sha256="b70ae299ff6b63a9e9cbf697147a48a31b4639476d1947cb52e4201e444f23cb")
version("1.6.4", sha256="a4aa921030250f58015201e28204bff604a007defc5a379a608723e6bb1808d4")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
variant("precompile", default=True, description="Improve julia startup time")
variant("openlibm", default=True, description="Use openlibm instead of libm")
@@ -59,9 +70,39 @@ class Julia(MakefilePackage):
)
depends_on("libuv", when="@:1.7")
depends_on("libuv-julia@1.42.0", when="@1.8.0:1.8.1")
- depends_on("libuv-julia@1.44.2", when="@1.8.2:")
+ depends_on("libuv-julia@1.44.2", when="@1.8.2:1.9")
+ depends_on("libuv-julia@1.44.3", when="@1.10.0:1.10")
+ depends_on("libuv-julia@1.48.0", when="@1.11.0:")
depends_on("suite-sparse@5.4:5.10", when="@1.6:1.9")
+ with when("@1.11.0:1.11"):
+ # libssh2.so.1, libpcre2-8.so.0, libmbedtls.so.14, libmbedcrypto.so.7, libmbedx509.so.1,
+ # libopenlibm.so.4, libblastrampoline.so.5, libgit2.so.1.7, libnghttp2.so.14,
+ # libcurl.so.4
+ depends_on("libblastrampoline@5.11.0:5")
+ depends_on("libgit2@1.7.2:1.7")
+ depends_on("libssh2@1.11")
+ depends_on("llvm@16.0.6 +lld shlib_symbol_version=JL_LLVM_16.0")
+ depends_on("mbedtls@2.28.2:2.28")
+ depends_on("openlibm@0.8.1:0.8", when="+openlibm")
+ depends_on("nghttp2@1.59.0:1.59")
+ depends_on("curl@8.6.0:")
+ depends_on("suite-sparse@7.7.0")
+
+ with when("@1.10.0:1.10"):
+ # libssh2.so.1, libpcre2-8.so.0, libmbedtls.so.14, libmbedcrypto.so.7, libmbedx509.so.1,
+ # libopenlibm.so.4, libblastrampoline.so.5, libgit2.so.1.6, libnghttp2.so.14,
+ # libcurl.so.4
+ depends_on("libblastrampoline@5.8.0:5")
+ depends_on("libgit2@1.6.4:1.6")
+ depends_on("libssh2@1.11.0:1.11")
+ depends_on("llvm@15.0.7 +lld shlib_symbol_version=JL_LLVM_15.0")
+ depends_on("mbedtls@2.28.2:2.28")
+ depends_on("openlibm@0.8.1:0.8", when="+openlibm")
+ depends_on("nghttp2@1.52.0:1.52")
+ depends_on("curl@8.4.0:")
+ depends_on("suite-sparse@7.2.1")
+
with when("@1.9.0:1.9"):
# libssh2.so.1, libpcre2-8.so.0, mbedtls.so.14, mbedcrypto.so.7, mbedx509.so.1
# openlibm.so.4, libblastrampoline.so.5, libgit2.so.1.5, libnghttp2.so.14,
@@ -125,7 +166,7 @@ class Julia(MakefilePackage):
"llvm",
when="^llvm@12.0.1",
patches=patch(
- "https://raw.githubusercontent.com/spack/patches/master/julia/10cb42f80c2eaad3e9c87cb818b6676f1be26737bdf972c77392d71707386aa4.patch",
+ "https://raw.githubusercontent.com/spack/patches/24ff44c4c5439400747941473c0298a74c1fbcb1/julia/10cb42f80c2eaad3e9c87cb818b6676f1be26737bdf972c77392d71707386aa4.patch",
sha256="10cb42f80c2eaad3e9c87cb818b6676f1be26737bdf972c77392d71707386aa4",
),
)
@@ -133,7 +174,7 @@ class Julia(MakefilePackage):
"llvm",
when="^llvm@13.0.1",
patches=patch(
- "https://raw.githubusercontent.com/spack/patches/master/julia/45f72c59ae5cf45461e9cd8b224ca49b739d885c79b3786026433c6c22f83b5f.patch",
+ "https://raw.githubusercontent.com/spack/patches/24ff44c4c5439400747941473c0298a74c1fbcb1/julia/45f72c59ae5cf45461e9cd8b224ca49b739d885c79b3786026433c6c22f83b5f.patch",
sha256="45f72c59ae5cf45461e9cd8b224ca49b739d885c79b3786026433c6c22f83b5f",
),
)
@@ -141,10 +182,26 @@ class Julia(MakefilePackage):
"llvm",
when="^llvm@14.0.6",
patches=patch(
- "https://raw.githubusercontent.com/spack/patches/master/julia/f3def26930832532bbcd861d41b31ae03db993bc2b3510f89ef831a30bd3e099.patch",
+ "https://raw.githubusercontent.com/spack/patches/24ff44c4c5439400747941473c0298a74c1fbcb1/julia/f3def26930832532bbcd861d41b31ae03db993bc2b3510f89ef831a30bd3e099.patch",
sha256="f3def26930832532bbcd861d41b31ae03db993bc2b3510f89ef831a30bd3e099",
),
)
+ depends_on(
+ "llvm",
+ when="^llvm@15.0.7",
+ patches=patch(
+ "https://raw.githubusercontent.com/spack/patches/24ff44c4c5439400747941473c0298a74c1fbcb1/julia/25cdc0271e7722d4a7cc6f72abcb17bfe205fc741bbe3716a21759c3eee7d32c.patch",
+ sha256="25cdc0271e7722d4a7cc6f72abcb17bfe205fc741bbe3716a21759c3eee7d32c",
+ ),
+ )
+ depends_on(
+ "llvm",
+ when="^llvm@16.0.6",
+ patches=patch(
+ "https://raw.githubusercontent.com/spack/patches/d042ae8f41493547d4263d249a13546f2c971972/julia/4997cd3006a3171d9b33f9a72ff9fdadc84e91a7c86aa044dcf495eef3a02893.patch",
+ sha256="4997cd3006a3171d9b33f9a72ff9fdadc84e91a7c86aa044dcf495eef3a02893",
+ ),
+ )
# Patches for libuv
depends_on(
@@ -169,6 +226,7 @@ class Julia(MakefilePackage):
depends_on("patchelf@0.13:0.17", type="build")
depends_on("perl", type="build")
depends_on("libwhich", type="build")
+ depends_on("which", type="build") # for detecting 7z, lld, dsymutil
depends_on("python", type="build")
depends_on("blas") # note: for now openblas is fixed...
@@ -190,13 +248,23 @@ class Julia(MakefilePackage):
depends_on("unwind")
depends_on("utf8proc")
depends_on("zlib-api")
- depends_on("zlib +shared +pic +optimize", when="^zlib")
+ depends_on("zlib +shared +pic +optimize", when="^[virtuals=zlib-api] zlib")
+
+ # https://github.com/JuliaLang/julia/pull/45649#issuecomment-1192377430
+ conflicts("%gcc@12:", when="@:1.7")
# Patches for julia
patch("julia-1.6-system-libwhich-and-p7zip-symlink.patch", when="@1.6.0:1.6")
patch("use-add-rpath.patch", when="@:1.8.0")
patch("use-add-rpath-2.patch", when="@1.8.1:1.8")
+ # Fix the path to Spack llvm's lld and dsymutil
+ patch(
+ "https://github.com/JuliaLang/julia/commit/55c13d234c1523861b278f7989b1af105ef0e88f.patch?full_index=1",
+ sha256="00569f40e1845329060a714813e509677949e633a0e833c40a3c70dcf9269cc1",
+ when="@1.9:1.10",
+ )
+
# Fix libstdc++ not being found (https://github.com/JuliaLang/julia/issues/47987)
patch(
"https://github.com/JuliaLang/julia/pull/48342.patch?full_index=1",
@@ -226,6 +294,11 @@ class Julia(MakefilePackage):
# Make sure Julia sets -DNDEBUG when including LLVM header files.
patch("llvm-NDEBUG.patch", when="@1.7.0:1.7")
+ # suite-sparse@7.2.1 sometimes builds cuda stub libraries and Julia build
+ # system deals with them, but we don't compile them, so we remove the code
+ # which is creating symlinks to those libraries.
+ patch("julia-1.10-rm-suite-sparse-cuda-stubs.patch", when="@1.10.0:1.10")
+
def patch(self):
# The system-libwhich-libblastrampoline.patch causes a rebuild of docs as it
# touches the main Makefile, so we reset the a/m-time to doc/_build's.
@@ -237,7 +310,7 @@ class Julia(MakefilePackage):
def setup_build_environment(self, env):
# this is a bit ridiculous, but we are setting runtime linker paths to
# dependencies so that libwhich can locate them.
- if self.spec.satisfies("platform=linux") or self.spec.satisfies("platform=cray"):
+ if self.spec.satisfies("platform=linux"):
linker_var = "LD_LIBRARY_PATH"
elif self.spec.satisfies("platform=darwin"):
linker_var = "DYLD_FALLBACK_LIBRARY_PATH"
diff --git a/var/spack/repos/builtin/packages/jump/package.py b/var/spack/repos/builtin/packages/jump/package.py
new file mode 100644
index 0000000000..f6c4c3a8f0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/jump/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Jump(GoPackage):
+ """Jump integrates with your shell and learns about your navigational habits
+ by keeping track of the directories you visit. It gives you the most visited
+ directory for the shortest search term you type."""
+
+ homepage = "https://github.com/gsamokovarov/jump"
+ url = "https://github.com/gsamokovarov/jump/archive/refs/tags/v0.51.0.tar.gz"
+
+ maintainers("fthaler")
+
+ license("MIT", checked_by="fthaler")
+
+ version("0.51.0", sha256="ce297cada71e1dca33cd7759e55b28518d2bf317cdced1f3b3f79f40fa1958b5")
+
+ depends_on("go@1.16:", type="build")
diff --git a/var/spack/repos/builtin/packages/justbuild/package.py b/var/spack/repos/builtin/packages/justbuild/package.py
index 3b4dd93238..1cf96c1bbb 100644
--- a/var/spack/repos/builtin/packages/justbuild/package.py
+++ b/var/spack/repos/builtin/packages/justbuild/package.py
@@ -24,6 +24,12 @@ class Justbuild(Package):
license("Apache-2.0")
version("master", branch="master")
+ version("1.4.0", tag="v1.4.0", commit="562bddf70175a602f896397f41ee5f5e07e834eb")
+ version("1.3.2", tag="v1.3.2", commit="27a56845398b07471f8185648a79a63f97851659")
+ version("1.3.1", tag="v1.3.1", commit="b248838ed0f01bc5824caee3a555e7fd22d5ad10")
+ version("1.3.0", tag="v1.3.0", commit="a7be2417f358049e6a0e28e01bc4020d8de2fdc5")
+ version("1.2.5", tag="v1.2.5", commit="0f7447e3f50e68ecfe00b2db06fb5f154842ac5a")
+ version("1.2.4", tag="v1.2.4", commit="215e6afab93d28aeea54cb2c657afda0e5453307")
version("1.2.3", tag="v1.2.3", commit="45e9c1c85399f00372ad8b72894979a0002d8f95")
version("1.2.2", tag="v1.2.2", commit="e1ee04684c34ae30ac3c91b6753e99a81a9dc51c")
version("1.2.1", tag="v1.2.1", commit="959cd90083d0c783389cd09e187c98322c16469f")
@@ -32,6 +38,8 @@ class Justbuild(Package):
version("1.1.2", tag="v1.1.2", commit="67b486e2ce6ab657a98b2212a9b6f68935d07a29")
version("1.0.0", tag="v1.0.0", commit="c29b671f798e82ba26b5f54ebc9e24c7dcfb8166")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3:", type=("build", "run"))
depends_on("wget", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/jwt-cpp/package.py b/var/spack/repos/builtin/packages/jwt-cpp/package.py
index f0a9784824..e0cc0a3971 100644
--- a/var/spack/repos/builtin/packages/jwt-cpp/package.py
+++ b/var/spack/repos/builtin/packages/jwt-cpp/package.py
@@ -16,12 +16,17 @@ class JwtCpp(CMakePackage):
license("MIT")
+ version("0.7.0", sha256="b9eb270e3ba8221e4b2bc38723c9a1cb4fa6c241a42908b9a334daff31137406")
version("0.6.0", sha256="0227bd6e0356b211341075c7997c837f0b388c01379bd256aa525566a5553f03")
version("0.5.2", sha256="d3188f9611597eb1bb285169879e1d87202bf10a08e4e7734c9f2097bfd4a850")
version("0.5.1", sha256="d8f5ffb361824630b3b6f4aad26c730c915081071040c232ac57947d6177ef4f")
version("0.5.0", sha256="079a273f070dd11213e301712319a65881e51ab81535cc436d5313191df852a2")
version("0.4.0", sha256="f0dcc7b0e8bef8f9c3f434e7121f9941145042c9fe3055a5bdd709085a4f2be4")
+ depends_on("cxx", type="build") # generated
+
+ # TODO: jwt-cpp>=0.5.0 has an embedded copy of picojson which can be packaged seperately
+
# TODO: jwt-cpp>=0.6.0 supports wolfSSL for which there is currently
# no Spack recipe.
variant(
@@ -37,6 +42,7 @@ class JwtCpp(CMakePackage):
depends_on("openssl@1.0.2:", when="@0.5.0:0.5.99 ssl=openssl")
depends_on("openssl@1.0.1:", when="@0.6.0: ssl=openssl")
depends_on("libressl@3:", when="@0.5.0: ssl=libressl")
+ depends_on("nlohmann-json", when="@0.7.0:")
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/jxrlib-debian/package.py b/var/spack/repos/builtin/packages/jxrlib-debian/package.py
index b1c239aa37..9728efb549 100644
--- a/var/spack/repos/builtin/packages/jxrlib-debian/package.py
+++ b/var/spack/repos/builtin/packages/jxrlib-debian/package.py
@@ -24,6 +24,8 @@ class JxrlibDebian(MakefilePackage):
sha256="3d9d5d6ca972b51259efe1f37a8e42892e90920b13308d70b8a24eb9a82bf34c",
)
+ depends_on("c", type="build") # generated
+
def setup_build_environment(self, env):
env.set("DIR_INSTALL", self.prefix)
if self.spec.satisfies("+shared"):
diff --git a/var/spack/repos/builtin/packages/k8/package.py b/var/spack/repos/builtin/packages/k8/package.py
index 14452606a6..0448f21240 100644
--- a/var/spack/repos/builtin/packages/k8/package.py
+++ b/var/spack/repos/builtin/packages/k8/package.py
@@ -17,6 +17,8 @@ class K8(Package):
version("0.2.4", sha256="da8a99c7f1ce7f0cb23ff07ce10510e770686b906d5431442a5439743c0b3c47")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="run")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/kadath/package.py b/var/spack/repos/builtin/packages/kadath/package.py
index ec6ac84b9a..b77b4113b2 100644
--- a/var/spack/repos/builtin/packages/kadath/package.py
+++ b/var/spack/repos/builtin/packages/kadath/package.py
@@ -28,6 +28,8 @@ class Kadath(CMakePackage):
version("fuka", branch="fuka")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant(
diff --git a/var/spack/repos/builtin/packages/kafka/package.py b/var/spack/repos/builtin/packages/kafka/package.py
index 62397025a0..85f4ec7e37 100644
--- a/var/spack/repos/builtin/packages/kafka/package.py
+++ b/var/spack/repos/builtin/packages/kafka/package.py
@@ -21,6 +21,17 @@ class Kafka(Package):
license("EPL-2.0")
version(
+ "2.13-3.8.0", sha256="e0297cc6fdb09ef9d9905751b25d2b629c17528f8629b60561eeff87ce29099c"
+ )
+ version(
+ "2.13-3.7.1", sha256="62acae4a143dd983dc7eb4804d5744ba0c50b199b508f599ef001020e2558fc9"
+ )
+ version(
+ "2.13-3.7.0",
+ sha256="65f26e5937bbb76dfe78dfb416730dfa7e3378b27e13fd1e204f1a1099bfaf9c",
+ deprecated=True,
+ )
+ version(
"2.13-3.5.1", sha256="f7b74d544023f2c0ec52a179de59975cb64e34ea03650d829328b407b560e4da"
)
version(
diff --git a/var/spack/repos/builtin/packages/kahip/cstdint.patch b/var/spack/repos/builtin/packages/kahip/cstdint.patch
new file mode 100644
index 0000000000..01831e824e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kahip/cstdint.patch
@@ -0,0 +1,11 @@
+diff -Naur spack-src/lib/io/mmap_graph_io.h spack-src/lib/io/mmap_graph_io.patched.h
+--- spack-src/lib/io/mmap_graph_io.h 2024-08-22 17:56:05.689983013 +0200
++++ spack-src/lib/io/mmap_graph_io.patched.h 2024-08-22 17:58:10.915413214 +0200
+@@ -1,6 +1,7 @@
+ #pragma once
+
+ #include <cctype>
++#include <cstdint>
+ #include <cstring>
+ #include <fcntl.h>
+ #include <fstream>
diff --git a/var/spack/repos/builtin/packages/kahip/package.py b/var/spack/repos/builtin/packages/kahip/package.py
index a623635468..314e37296c 100644
--- a/var/spack/repos/builtin/packages/kahip/package.py
+++ b/var/spack/repos/builtin/packages/kahip/package.py
@@ -41,6 +41,9 @@ class Kahip(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"deterministic",
default=False,
@@ -66,6 +69,8 @@ class Kahip(CMakePackage):
patch("fix-sconstruct-for-py3.patch", when="@2:2.10 ^python@3:")
patch("fix-sconstruct-for-py3-v2.00.patch", when="@2.00 ^python@3:")
+ patch("cstdint.patch", when="@3:")
+
# 'when' decorators to override new CMake build approach (old build was SConstruct).
@when("@:2.10")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/kakoune-lsp/package.py b/var/spack/repos/builtin/packages/kakoune-lsp/package.py
new file mode 100644
index 0000000000..9088522449
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kakoune-lsp/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class KakouneLsp(CargoPackage):
+ """Kakoune Language Server Protocol Client"""
+
+ homepage = "https://github.com/kakoune-lsp/kakoune-lsp"
+ url = "https://github.com/kakoune-lsp/kakoune-lsp/archive/refs/tags/v17.0.1.tar.gz"
+
+ maintainers("taliaferro")
+
+ license("UNLICENSE", checked_by="taliaferro")
+
+ version("17.0.1", sha256="c32172a7d13621d7f7fd8b32b819865fd58a38c0c431d3cedd6046fb6de42f44")
diff --git a/var/spack/repos/builtin/packages/kakoune/package.py b/var/spack/repos/builtin/packages/kakoune/package.py
index 345a69f3ae..a55761fcb6 100644
--- a/var/spack/repos/builtin/packages/kakoune/package.py
+++ b/var/spack/repos/builtin/packages/kakoune/package.py
@@ -14,17 +14,25 @@ class Kakoune(MakefilePackage):
"https://github.com/mawww/kakoune/releases/download/v2021.11.08/kakoune-2021.11.08.tar.bz2"
)
- maintainers("Bambi")
+ maintainers("Bambi", "taliaferro")
license("Unlicense")
version(
+ "2024.05.18", sha256="dae8ac2e61d21d9bcd10145aa70b421234309a7b0bc57fad91bc34dbae0cb9fa"
+ )
+ version(
+ "2024.05.09", sha256="2190bddfd3af590c0593c38537088976547506f47bd6eb6c0e22350dbd16a229"
+ )
+ version(
"2023.08.05", sha256="3e45151e0addd3500de2d6a29b5aacf2267c42bb256d44a782e73defb29cda5c"
)
version(
"2021.11.08", sha256="aa30889d9da11331a243a8f40fe4f6a8619321b19217debac8f565e06eddb5f4"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("ncurses")
conflicts("%gcc@:8", when="@2021.11.08", msg="GCC version must be at least 9.0!")
@@ -33,5 +41,6 @@ class Kakoune(MakefilePackage):
build_targets = ["all", "man"]
- def edit(self, spec, prefix):
- env["PREFIX"] = prefix
+ @property
+ def install_targets(self):
+ return ["-e", f"PREFIX={prefix}", "installdirs", "install"]
diff --git a/var/spack/repos/builtin/packages/kaks-calculator/package.py b/var/spack/repos/builtin/packages/kaks-calculator/package.py
index c82f20469c..ceb29bc7a0 100644
--- a/var/spack/repos/builtin/packages/kaks-calculator/package.py
+++ b/var/spack/repos/builtin/packages/kaks-calculator/package.py
@@ -12,11 +12,13 @@ class KaksCalculator(MakefilePackage, SourceforgePackage):
include as many features as needed for accurately capturing evolutionary
information in protein-coding sequences."""
- homepage = "https://sourceforge.net/projects/kakscalculator2"
+ homepage = "https://sourceforge.net/projects/kakscalculator2/"
sourceforge_mirror_path = "kakscalculator2/KaKs_Calculator2.0.tar.gz"
version("2.0", sha256="e2df719a2fecc549d8ddc4e6d8f5cfa4b248282dca319c1928eaf886d68ec3c5")
+ depends_on("cxx", type="build") # generated
+
build_directory = "src"
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/kaldi/package.py b/var/spack/repos/builtin/packages/kaldi/package.py
index 576c0850da..7411a8e257 100644
--- a/var/spack/repos/builtin/packages/kaldi/package.py
+++ b/var/spack/repos/builtin/packages/kaldi/package.py
@@ -7,6 +7,8 @@ import os
from fnmatch import fnmatch
from os.path import join
+from llnl.util.symlink import readlink
+
from spack.package import *
@@ -27,6 +29,8 @@ class Kaldi(Package): # Does not use Autotools
version("2018-07-11", commit="6f2140b032b0108bc313eefdca65151289642773")
version("2015-10-07", commit="c024e8aa0a727bf76c91a318f76a1f8b0b59249e")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="build shared libraries")
variant("double", default=False, description="build with double precision floats")
variant("cuda", default=False, description="build with CUDA")
@@ -54,28 +58,30 @@ class Kaldi(Package): # Does not use Autotools
configure_args.append("--speex-root=" + spec["speex"].prefix)
configure_args.append("--cub-root=" + spec["cuda"].prefix.include)
- if "~shared" in spec:
+ if spec.satisfies("~shared"):
configure_args.append("--static")
else:
configure_args.append("--shared")
- if "^openblas" in spec:
+ if spec.satisfies("^[virtuals=blas] openblas"):
configure_args.append("--mathlib=OPENBLAS")
configure_args.append("--openblas-root=" + spec["blas"].prefix)
if "+openmp" in spec["blas"].variants:
configure_args.append("--threaded-math=yes")
- elif "^atlas" in spec:
+ elif spec.satisfies("^[virtuals=blas] atlas"):
configure_args.append("--mathlib=ATLAS")
configure_args.append("--atlas-root=" + spec["blas"].prefix)
if "+pthread" in spec["blas"].variants:
configure_args.append("--threaded-atlas")
- elif "^intel-parallel-studio" in spec or "^intel-mkl" in spec:
+ elif spec.satisfies("^[virtuals=blas] intel-parallel-studio") or spec.satisfies(
+ "^[virtuals=blas] intel-mkl"
+ ):
configure_args.append("--mathlib=MKL")
configure_args.append("--mkl-root=" + spec["blas"].prefix.mkl)
if "+openmp" in spec["blas"].variants:
configure_args.append("--mkl-threading=iomp")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
configure_args.append("--use-cuda=yes")
configure_args.append("--cudatk-dir=" + spec["cuda"].prefix)
@@ -105,7 +111,7 @@ class Kaldi(Package): # Does not use Autotools
for name in files:
if name.endswith("." + dso_suffix):
fpath = join(root, name)
- src = os.readlink(fpath)
+ src = readlink(fpath)
install(src, prefix.lib)
for root, dirs, files in os.walk("."):
diff --git a/var/spack/repos/builtin/packages/kalign/package.py b/var/spack/repos/builtin/packages/kalign/package.py
index a4c0632c08..f9b0895dc1 100644
--- a/var/spack/repos/builtin/packages/kalign/package.py
+++ b/var/spack/repos/builtin/packages/kalign/package.py
@@ -17,6 +17,9 @@ class Kalign(AutotoolsPackage, CMakePackage):
version("3.4.0", sha256="67d1a562d54b3b7622cc3164588c05b9e2bf8f1a5140bb48a4e816c61a87d4a8")
version("3.3.1", sha256="7f10acf9a3fa15deabbc0304e7c14efa25cea39108318c9f02b47257de2d7390")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("cmake", when="@3.4.0:"),
conditional("autotools", when="@3.3.1"),
diff --git a/var/spack/repos/builtin/packages/kallisto/package.py b/var/spack/repos/builtin/packages/kallisto/package.py
index a0cba6850c..21fbdbe7c2 100644
--- a/var/spack/repos/builtin/packages/kallisto/package.py
+++ b/var/spack/repos/builtin/packages/kallisto/package.py
@@ -15,12 +15,17 @@ class Kallisto(CMakePackage):
license("BSD-2-Clause")
+ version("0.50.1", sha256="030752bab3b0e33cd3f23f6d8feddd74194e5513532ffbf23519e84db2a86d34")
version("0.48.0", sha256="1797ac4d1f0771e3f1f25dd7972bded735fcb43f853cf52184d3d9353a6269b0")
version("0.46.2", sha256="c447ca8ddc40fcbd7d877d7c868bc8b72807aa8823a8a8d659e19bdd515baaf2")
version("0.43.1", sha256="7baef1b3b67bcf81dc7c604db2ef30f5520b48d532bf28ec26331cb60ce69400")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# HDF5 support is optional beginning with version 0.46.2.
variant("hdf5", when="@0.46.2:", default=False, description="Build with HDF5 support")
+ variant("bam", when="@0.50.1:", default=False, description="Build with htslib support")
depends_on("zlib-api")
depends_on("hdf5", when="@:0.43")
@@ -38,7 +43,7 @@ class Kallisto(CMakePackage):
patch("link_zlib.patch", when="@:0.43")
patch("limits.patch", when="@:0.46")
- patch("htslib_configure.patch", when="@0.44.0:^autoconf@2.70:")
+ patch("htslib_configure.patch", when="@0.44.0:0.48.0^autoconf@2.70:")
@run_before("cmake")
def autoreconf(self):
@@ -54,17 +59,9 @@ class Kallisto(CMakePackage):
# configure script.
# See https://github.com/spack/spack/issues/15274 and
# https://github.com/pachterlab/kallisto/issues/253
- @property
- def std_cmake_args(self):
- """Call the original std_cmake_args and then filter the verbose
- setting.
- """
- a = super().std_cmake_args
- if self.spec.satisfies("@0.44.0:"):
- args = [i for i in a if i != "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"]
- if self.spec.satisfies("@0.46.2:"):
- args.append(self.define_from_variant("USE_HDF5", "hdf5"))
- else:
- args = a
-
- return args
+ def cmake_args(self):
+ return [
+ self.define("CMAKE_VERBOSE_MAKEFILE", False),
+ self.define_from_variant("USE_HDF5", "hdf5"),
+ self.define_from_variant("USE_BAM", "bam"),
+ ]
diff --git a/var/spack/repos/builtin/packages/kassiopeia/package.py b/var/spack/repos/builtin/packages/kassiopeia/package.py
index 17adf4970f..75f2b63c8f 100644
--- a/var/spack/repos/builtin/packages/kassiopeia/package.py
+++ b/var/spack/repos/builtin/packages/kassiopeia/package.py
@@ -32,6 +32,9 @@ class Kassiopeia(CMakePackage):
version("3.5.0", sha256="b704d77bd182b2806dc8323f642d3197ce21dba3d456430f594b19a7596bda22")
version("3.4.0", sha256="4e2bca61011e670186d49048aea080a06c3c95dacf4b79e7549c36960b4557f4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("root", default=False, description="Include support for writing ROOT files")
variant("vtk", default=False, description="Include visualization support through VTK")
variant("mpi", default=False, description="Include MPI support for field calculations")
@@ -60,7 +63,7 @@ class Kassiopeia(CMakePackage):
)
def cmake_args(self):
- if "+root" in self.spec:
+ if self.spec.satisfies("+root"):
cxxstd = self.spec["root"].variants["cxxstd"].value
else:
if self.spec.satisfies("@:3.8.1"):
diff --git a/var/spack/repos/builtin/packages/kbd/package.py b/var/spack/repos/builtin/packages/kbd/package.py
index 561f5ae57b..991bdad6d8 100644
--- a/var/spack/repos/builtin/packages/kbd/package.py
+++ b/var/spack/repos/builtin/packages/kbd/package.py
@@ -20,6 +20,8 @@ class Kbd(AutotoolsPackage):
version("2.2.90", sha256="a310a915f474c85ee28cd860677a34a529aca940daa44634a428dd6df58c196e")
version("2.2.0", sha256="5dec023c7a05b4d11d8ae795f59fab2b0bacfcc5c20a3d534dc7566cfe47ccf7")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/kcov/package.py b/var/spack/repos/builtin/packages/kcov/package.py
index f0cfb30ec9..4bf45f3f98 100644
--- a/var/spack/repos/builtin/packages/kcov/package.py
+++ b/var/spack/repos/builtin/packages/kcov/package.py
@@ -12,11 +12,20 @@ class Kcov(CMakePackage):
compilation options"""
homepage = "https://simonkagstrom.github.io/kcov/index.html"
- url = "https://github.com/SimonKagstrom/kcov/archive/38.tar.gz"
+ url = "https://github.com/SimonKagstrom/kcov/archive/refs/tags/v42.tar.gz"
license("GPL-2.0-or-later")
- version("38", sha256="b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4")
+ version("42", sha256="2c47d75397af248bc387f60cdd79180763e1f88f3dd71c94bb52478f8e74a1f8")
+ version(
+ "38",
+ sha256="b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4",
+ url="https://github.com/SimonKagstrom/kcov/archive/38.tar.gz",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@2.8.4:", type="build")
depends_on("zlib-api")
@@ -29,9 +38,13 @@ class Kcov(CMakePackage):
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/kcov.rb
return ["-DSPECIFY_RPATH=ON"]
- @run_after("install")
- @on_package_attributes(run_tests=True)
- def test_install(self):
- # The help message exits with an exit code of 1
+ def test_kcov_help(self):
+ """run installed kcov help"""
kcov = Executable(self.prefix.bin.kcov)
+ # The help message exits with an exit code of 1
kcov("-h", ignore_errors=1)
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check_install(self):
+ self.test_kcov_help()
diff --git a/var/spack/repos/builtin/packages/kdiff3/package.py b/var/spack/repos/builtin/packages/kdiff3/package.py
index 3dc83d23b0..f49d74176f 100644
--- a/var/spack/repos/builtin/packages/kdiff3/package.py
+++ b/var/spack/repos/builtin/packages/kdiff3/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Kdiff3(Package):
"""Compare and merge 2 or 3 files or directories."""
- homepage = "http://kdiff3.sourceforge.net/"
+ homepage = "https://kdiff3.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/kdiff3/kdiff3/0.9.98/kdiff3-0.9.98.tar.gz"
license("GPL-2.0-or-later")
version("0.9.98", sha256="802c1ababa02b403a5dca15955c01592997116a24909745016931537210fd668")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt@:4,5.2.0:")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/kea/package.py b/var/spack/repos/builtin/packages/kea/package.py
index 58d7e5e5fa..1adaa997a5 100644
--- a/var/spack/repos/builtin/packages/kea/package.py
+++ b/var/spack/repos/builtin/packages/kea/package.py
@@ -17,6 +17,8 @@ class Kea(AutotoolsPackage):
version("1.6.2", sha256="2af7336027143c3e98d8d1d44165b2c2cbb0252a92bd88f6dd4d2c6adb69d7b5")
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py
index f7691cfc83..2939c85d73 100644
--- a/var/spack/repos/builtin/packages/kealib/package.py
+++ b/var/spack/repos/builtin/packages/kealib/package.py
@@ -44,6 +44,8 @@ class Kealib(CMakePackage):
version("1.4.8", sha256="0f24d8478865abcb17865c8f49c0370095726c529b8ac373ffae018ad3d40a02")
version("1.4.7", sha256="ec38751b3b555d3a26f0c7445f2d2cd9d7c3a3502237519a206a50cb58df56ec")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
depends_on("hdf5+cxx+hl", when="@:1.5.1")
depends_on("hdf5+cxx", when="@1.5.2:")
diff --git a/var/spack/repos/builtin/packages/keepalived/package.py b/var/spack/repos/builtin/packages/keepalived/package.py
index e7f2333d1d..58042c927d 100644
--- a/var/spack/repos/builtin/packages/keepalived/package.py
+++ b/var/spack/repos/builtin/packages/keepalived/package.py
@@ -17,6 +17,7 @@ class Keepalived(AutotoolsPackage):
license("GPL-2.0-only")
+ version("2.3.1", sha256="92f4b69bfd998e2306d1995ad16fdad1b59e70be694c883385c5f55e02c62aa3")
version("2.0.19", sha256="0e2f8454765bc6a5fa26758bd9cec18aae42882843cdd24848aff0ae65ce4ca7")
version("2.0.18", sha256="1423a2b1b8e541211029b9e1e1452e683bbe5f4b0b287eddd609aaf5ff024fd0")
version("2.0.17", sha256="8965ffa2ffe243014f9c0245daa65f00a9930cf746edf33525d28a86f97497b4")
@@ -27,6 +28,9 @@ class Keepalived(AutotoolsPackage):
version("2.0.12", sha256="fd50e433d784cfd948de5726752cf89ab7001f587fe10a5110c6c7cbda4b7b5e")
version("2.0.11", sha256="a298b0c02a20959cfc365b62c14f45abd50d5e0595b2869f5bce10ec2392fa48")
+ depends_on("c", type="build")
+ depends_on("pkgconfig", type="build")
+
depends_on("openssl")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/keepassxc/package.py b/var/spack/repos/builtin/packages/keepassxc/package.py
index 677c72ecfa..455bf1841b 100644
--- a/var/spack/repos/builtin/packages/keepassxc/package.py
+++ b/var/spack/repos/builtin/packages/keepassxc/package.py
@@ -18,11 +18,16 @@ class Keepassxc(CMakePackage):
license("GPL-2.0-only OR GPL-3.0-only")
version("master", branch="master")
+ version("2.7.7", sha256="58fc45ae98e4b3ffb052103014f5b97a41fefd17102c7f56073934dd3a82ee67")
+ version("2.7.6", sha256="a58074509fa8e90f152c6247f73e75e126303081f55eedb4ea0cbb6fa980d670")
version("2.7.1", sha256="6001ba626c35c316dbda6de35736f012a2264f95139fcb4a094b8eb49b15d3e7")
version("2.7.0", sha256="83be76890904cd6703343fa097d68bcfdd99bb525cf518fa62a7df9293026aa7")
version("2.6.6", sha256="3603b11ac39b289c47fac77fa150e05fd64b393d8cfdf5732dc3ef106650a4e2")
version("2.6.4", sha256="e536e2a71c90fcf264eb831fb1a8b518ee1b03829828f862eeea748d3310f82b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("autotype", default=False, description="enable auto-type")
variant("docs", default=True, description="Build documentation")
@@ -65,6 +70,7 @@ class Keepassxc(CMakePackage):
"-DCMAKE_INSTALL_DATADIR=%s" % join_path(spec.prefix, "share"),
]
args.append(self.define_from_variant("WITH_XC_ALL", "autotype"))
+ args.append(self.define_from_variant("WITH_XC_AUTOTYPE", "autotype"))
args.append(self.define_from_variant("WITH_XC_DOCS", "docs"))
if spec.satisfies("platform=darwin"):
diff --git a/var/spack/repos/builtin/packages/kentutils/fix-mysql-options-gcc13.patch b/var/spack/repos/builtin/packages/kentutils/fix-mysql-options-gcc13.patch
new file mode 100644
index 0000000000..f0a799d306
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kentutils/fix-mysql-options-gcc13.patch
@@ -0,0 +1,13 @@
+diff --git a/jksql.c.orig b/jksql.c
+index bf38b3b..69b2c42 100644
+--- a/kent/src/hg/lib/jksql.c
++++ b/kent/src/hg/lib/jksql.c
+@@ -1129,7 +1129,7 @@ mysql_options(conn, MYSQL_OPT_LOCAL_INFILE, NULL);
+ if (sp->verifyServerCert && !sameString(sp->verifyServerCert,"0"))
+ {
+ #if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80000
+- mysql_options(conn, MYSQL_OPT_SSL_MODE, SSL_MODE_REQUIRED);
++ mysql_options(conn, MYSQL_OPT_SSL_MODE, (void*) SSL_MODE_REQUIRED);
+ #else
+ my_bool flag = TRUE;
+ mysql_options(conn, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &flag);
diff --git a/var/spack/repos/builtin/packages/kentutils/mysql-zlib-workaround.patch b/var/spack/repos/builtin/packages/kentutils/mysql-zlib-workaround.patch
new file mode 100644
index 0000000000..10a460d781
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kentutils/mysql-zlib-workaround.patch
@@ -0,0 +1,13 @@
+diff --git a/kent/src/inc/common.mk.orig b/kent/src/inc/common.mk
+index 83803ad..8c90e3a 100644
+--- a/kent/src/inc/common.mk
++++ b/kent/src/inc/common.mk
+@@ -226,6 +226,8 @@ ifeq (${ZLIB},)
+ ZLIB=-lz
+ endif
+
++MYSQLLIBS := $(subst -lzlib,, ${MYSQLLIBS})
++
+ # on hgwdev, use the static libraries
+ ifeq (${IS_HGWDEV},yes)
+ FULLWARN = yes
diff --git a/var/spack/repos/builtin/packages/kentutils/package.py b/var/spack/repos/builtin/packages/kentutils/package.py
index f1deffdcb6..d2838c9da6 100644
--- a/var/spack/repos/builtin/packages/kentutils/package.py
+++ b/var/spack/repos/builtin/packages/kentutils/package.py
@@ -3,32 +3,157 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
class Kentutils(MakefilePackage):
- """Jim Kent command line bioinformatic utilities"""
+ """
+ Jim Kent command line bioinformatic utilities and libraries
+
+ This bundles a custom version of htslib, but can be overridden with ~htslib.
+ Consider adding the ^mysql+client_only dependency to avoid building all mysql/mariadb.
+ """
+
+ homepage = "https://genome.cse.ucsc.edu/"
+ url = "https://hgdownload.cse.ucsc.edu/admin/exe/userApps.archive/userApps.v453.src.tgz"
+
+ maintainers("teaguesterling")
+
+ version("465", sha256="eef17b1f3182d1d9dc99b5c73a6b0468d5d3bd80470f25d3f7706cc1372e04b0")
+ version("464", sha256="24e20fe68e2a2894d802c87662f69a62f71b3c15fafb2e4d6c3c425c63638bb2")
+ version("460", sha256="b955e56ee880074521ef1ab1371491f47e66dc6fdd93b05328386dd675a635fa")
+ version("455", sha256="e458cadad7c4a5c1b8385edafffa1b29380ac725a0c20535bf5a3bab99fe80db")
+ # This version isn't present in the archive any more
+ # Might be worth changing url to: https://github.com/ucscGenomeBrowser/kent-core/tags/...
+ version(
+ "459",
+ sha256="0b6e89a183e6385c713cf010a7aeead9da6626d8d2f78c363a4f1bc56ccccebb",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ # The bundled version of kentlib has some custom changes that are used by parts of
+ # kentlib. See https://github.com/spack/spack/pull/44501#issuecomment-2162789410
+ # for some additional details. A built-in version SHOULD work for most things though.
+ variant(
+ "builtin_htslib",
+ default=False,
+ description="Build with bundled htslib (using an external htslib may lead to errors)",
+ sticky=True,
+ )
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("libpng")
+ depends_on("openssl")
+ depends_on("uuid")
+ depends_on("mysql-client")
+ depends_on("zlib-api")
+ depends_on("freetype")
+ depends_on("libiconv")
+ depends_on("htslib+pic", when="~builtin_htslib")
+
+ # The bgzip.c bug present in other packages is present in kent/src/htslib/bgzf.c
+ # Conflicting line: assert(compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE);
+ # We can patch this by removing the assertion, but there are still performance issues
+ # See: https://github.com/samtools/htslib/issues/1257
+ conflicts("zlib-ng")
+
+ # Does not add a link to mysql_config, which is required for compilation
+ conflicts("mariadb-c-client")
+
+ # MySQL pointer/integer conversion issue (https://github.com/ucscGenomeBrowser/kent/pull/87)
+ patch("fix-mysql-options-gcc13.patch", when="%gcc@13: ^mysql")
+ # MySQL build flags from `mysql_config` are not compatible with Spack's method of building
+ # and includes zlib when it's not needed/available, leading to a linking failure.
+ patch("mysql-zlib-workaround.patch", when="%gcc ^mysql")
+
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ flags.append(self.compiler.cc_pic_flag)
+ elif name == "ldflags":
+ flags.append(f'{self.spec["libiconv"].libs.ld_flags}')
+ return (flags, None, None)
+
+ @property
+ def machtype(self):
+ # This is hard-coded in the Makefile and included here for reference
+ # and to make it adjustable if we need to adjust this in the future
+ return "local"
+
+ @property
+ def headers(self):
+ headers = []
+ headers.extend(find_headers("*", self.prefix.inc, recursive=True))
+ if self.spec.satisfies("+builtin_htslib"):
+ headers.extend(find_headers("*", self.prefix.htslib, recursive=True))
+ return HeaderList(headers)
+
+ @property
+ def libs(self):
+ return LibraryList([join_path(self.prefix, lib) for lib in self.local_libs])
+
+ @property
+ def local_libs(self):
+ libs = [
+ f"lib/{self.machtype}/jkweb.a",
+ f"lib/{self.machtype}/jkOwnLib.a",
+ f"lib/{self.machtype}/jkhgap.a",
+ f"lib/{self.machtype}/jkhgapcgi.a",
+ f"hg/altSplice/lib/{self.machtype}/libSpliceGraph.a",
+ ]
+ if self.spec.satisfies("+builtin_htslib"):
+ libs.append("htslib/libhts.a")
+ return LibraryList(libs)
+
+ @property
+ def lib_dir(self):
+ return join_path(self.prefix.lib, self.machtype)
+
+ @property
+ def htslib_include_dir(self):
+ if self.spec.satisfies("~builtin_htslib"):
+ # If we're not using the bundled version, just defer to htslib
+ return self.spec["htslib"].prefix.include
+ else:
+ # In the event we're using the bundled htslib, the htslib
+ # headers live in a different part of the installed tree
+ return self.prefix.htslib
+
+ # Packages that link to kentlib (and potential, htslib) often have
+ # idiosyncratic ways of setting up their includes and linker paths.
+ # Having these paths available will make things cleaner downstream.
+ def setup_dependent_package(self, module, dep_spec):
+ setattr(module, "kentutils_include_dir", self.prefix.inc)
+ setattr(module, "kentutils_lib_dir", self.lib_dir)
+ setattr(module, "kentutils_htslib_include_dir", self.htslib_include_dir)
- homepage = "https://github.com/ENCODE-DCC/kentUtils"
- git = "https://github.com/ENCODE-DCC/kentUtils.git"
+ def install_libs_from_stage(self, spec, prefix):
+ # Dependent packages expect things in the source tree, but we don't
+ # want to copy all of the compilation artifacts in so we'll do them
+ # manually instead of leaving the build directory around
- version("302.1", commit="d8376c5d52a161f2267346ed3dc94b5dce74c2f9")
+ src_prefix = "kent/src"
- depends_on("libpng")
- depends_on("openssl")
+ def install_kent(path, tree):
+ src = join_path(src_prefix, path)
+ dest = join_path(prefix, path)
+ mkdirp(os.path.dirname(dest))
+ if tree:
+ install_tree(src, dest)
+ else:
+ install(src, dest)
- # Actually depends on mysql, but mariadb works for now until mysql is
- # available
- depends_on("mariadb")
+ install_kent("inc", tree=True)
+ if spec.satisfies("+builtin_htslib"):
+ install_kent("htslib/htslib", tree=True)
- conflicts("%cce")
- conflicts("%apple-clang")
- conflicts("%clang")
- conflicts("%intel")
- conflicts("%nag")
- conflicts("%pgi")
- conflicts("%xl")
- conflicts("%xl_r")
+ for lib in self.local_libs:
+ install_kent(lib, tree=False)
def install(self, spec, prefix):
install_tree("bin", prefix.bin)
+ self.install_libs_from_stage(spec, prefix)
diff --git a/var/spack/repos/builtin/packages/keyutils/package.py b/var/spack/repos/builtin/packages/keyutils/package.py
index 45fbb4de5b..6278778e2e 100644
--- a/var/spack/repos/builtin/packages/keyutils/package.py
+++ b/var/spack/repos/builtin/packages/keyutils/package.py
@@ -21,6 +21,8 @@ class Keyutils(MakefilePackage):
version("1.5.10", sha256="e1fdbde234c786b65609a4cf080a2c5fbdb57f049249c139160c85fc3dfa7da9")
version("1.5.9", sha256="2dc0bdb099ab8331e02e5dbbce320359bef76eda0a4ddbd2ba1d1b9d3a8cdff8")
+ depends_on("c", type="build") # generated
+
conflicts("platform=darwin", msg="Linux-only")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/khmer/package.py b/var/spack/repos/builtin/packages/khmer/package.py
new file mode 100644
index 0000000000..7c5dd92833
--- /dev/null
+++ b/var/spack/repos/builtin/packages/khmer/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Khmer(PythonPackage):
+ """khmer is a software library and toolkit for k-mer based analysis and transformation
+ of nucleotide sequence data"""
+
+ homepage = "https://khmer.readthedocs.io/en/latest/"
+ pypi = "khmer/khmer-2.1.1.tar.gz"
+
+ license("BSD-3-Clause", checked_by="A-N-Other")
+
+ version("2.1.1", sha256="a709606910bb8679bd8525e9d2bf6d1421996272e343b54cc18090feb2fdbe24")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ # https://github.com/dib-lab/khmer/pull/1922 ...
+ conflicts("^python@3.12:")
+
+ depends_on("py-setuptools@3.4.1:", type="build")
+ depends_on("py-pytest-runner@2", type="build")
+ depends_on("py-screed@1:", type=("build", "run"))
+ # abandoned `bz2file` dependency dropped in favour of the patch below
+
+ depends_on("openmpi")
+
+ def patch(self):
+ filter_file("bz2file", "bz2", join_path("khmer", "kfile.py"))
+ filter_file("'bz2file', ", "", "setup.py")
diff --git a/var/spack/repos/builtin/packages/kibana/package.py b/var/spack/repos/builtin/packages/kibana/package.py
index 266a796854..0245929e6b 100644
--- a/var/spack/repos/builtin/packages/kibana/package.py
+++ b/var/spack/repos/builtin/packages/kibana/package.py
@@ -13,7 +13,10 @@ class Kibana(Package):
homepage = "https://www.elastic.co/products/kibana"
url = "https://artifacts.elastic.co/downloads/kibana/kibana-6.4.0-linux-x86_64.tar.gz"
- version("6.4.0", sha256="df2056105a08c206a1adf9caed09a152a53429a0f1efc1ba3ccd616092d78aee")
+ version("8.15.2", sha256="b1f8082a4200867078170e92ad299e293ee514f5fdbb96b7a0d1de17a880d1eb")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2019-7609
+ version("6.4.0", sha256="df2056105a08c206a1adf9caed09a152a53429a0f1efc1ba3ccd616092d78aee")
depends_on("java", type="run")
diff --git a/var/spack/repos/builtin/packages/kicad/package.py b/var/spack/repos/builtin/packages/kicad/package.py
index 81db728ecc..04ce3b555f 100644
--- a/var/spack/repos/builtin/packages/kicad/package.py
+++ b/var/spack/repos/builtin/packages/kicad/package.py
@@ -22,6 +22,9 @@ class Kicad(CMakePackage):
version("5.1.9", sha256="841be864b9dc5c761193c3ee9cbdbed6729952d7b38451aa8e1977bdfdb6081b")
version("5.1.8", sha256="bf24f8ef427b4a989479b8e4af0b8ae5c54766755f12748e2e88a922c5344ca4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("wxwidgets")
depends_on("python@3:", type=("build", "run"))
# py-wxpython needs work
@@ -127,6 +130,5 @@ class Kicad(CMakePackage):
for ver, lib, checksum in self.resource_list:
if self.spec.version == Version(ver):
with working_dir("kicad-{0}-{1}".format(lib, ver)):
- args = std_cmake_args
- cmake(*args)
+ cmake(*self.std_cmake_args)
make("install")
diff --git a/var/spack/repos/builtin/packages/kim-api/package.py b/var/spack/repos/builtin/packages/kim-api/package.py
index 0273fc2d6c..bbe6f3a8cd 100644
--- a/var/spack/repos/builtin/packages/kim-api/package.py
+++ b/var/spack/repos/builtin/packages/kim-api/package.py
@@ -39,6 +39,10 @@ class KimApi(CMakePackage):
version("2.1.1", sha256="25c4e83c6caa83a1c4ad480b430f1926fb44813b64f548fdaedc45e310b5f6b9")
version("2.1.0", sha256="d6b154b31b288ec0a5643db176950ed71f1ca83a146af210a1d5d01cce8ce958")
version("2.0.2", sha256="26e7cf91066692f316b8ba1548ccb7152bf56aad75902bce2338cff53e74e63d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# The Fujitsu compiler requires the '--linkfortran'
# option to combine C++ and Fortran programs.
patch("fujitsu_add_link_flags.patch", when="%fj")
@@ -49,3 +53,7 @@ class KimApi(CMakePackage):
filter_file(
"-std=gnu", "", "examples/simulators/simulator-model-example/CMakeLists.txt"
)
+
+ def cmake_args(self):
+ args = [self.define("CMAKE_INSTALL_SYSCONFDIR", self.prefix.etc)]
+ return args
diff --git a/var/spack/repos/builtin/packages/kineto/package.py b/var/spack/repos/builtin/packages/kineto/package.py
index 4c17411400..5aa1c15faa 100644
--- a/var/spack/repos/builtin/packages/kineto/package.py
+++ b/var/spack/repos/builtin/packages/kineto/package.py
@@ -26,6 +26,8 @@ class Kineto(CMakePackage):
"2021-02-04", commit="258d9a471f8d3a50a0f52b85c3fe0902f65489df", submodules=True
) # py-torch@1.8.0
+ depends_on("cxx", type="build") # generated
+
root_cmakelists_dir = "libkineto"
generator("ninja")
diff --git a/var/spack/repos/builtin/packages/kitty/package.py b/var/spack/repos/builtin/packages/kitty/package.py
index 8ff092a50b..b9e65e5bb0 100644
--- a/var/spack/repos/builtin/packages/kitty/package.py
+++ b/var/spack/repos/builtin/packages/kitty/package.py
@@ -32,6 +32,8 @@ class Kitty(Package):
version("0.10.1", sha256="ef22208497a76e2f88ebe56c176e4608f049b056252cf1bf122c9c1ec711cfa6")
version("0.10.0", sha256="056563862c5759b740e95efff44b82c1a4efc370092f22f26aee0b774106bf4d")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("harfbuzz@1.5.0:")
depends_on("libxkbcommon@0.5:")
diff --git a/var/spack/repos/builtin/packages/kmergenie/package.py b/var/spack/repos/builtin/packages/kmergenie/package.py
index 962042f5a8..f1eae61f16 100644
--- a/var/spack/repos/builtin/packages/kmergenie/package.py
+++ b/var/spack/repos/builtin/packages/kmergenie/package.py
@@ -17,6 +17,8 @@ class Kmergenie(MakefilePackage):
version("1.7051", sha256="13148e5a2c700359cffca363b66ffa8f23c5db6af6eec03f739139ffdfee763f")
version("1.7044", sha256="46f2a08a2d7b1885414143e436829dd7e61fcc31ec4e429433e516a168d2978e")
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("r", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/kmod/package.py b/var/spack/repos/builtin/packages/kmod/package.py
index 3c0d1a2c15..b017ff986b 100644
--- a/var/spack/repos/builtin/packages/kmod/package.py
+++ b/var/spack/repos/builtin/packages/kmod/package.py
@@ -22,6 +22,8 @@ class Kmod(AutotoolsPackage):
version("24", sha256="f7a5ee07d4901c87711880536604de7e31c182d85a72de7b8d7dd04d4ee0aa59")
version("23", sha256="8f139543d82e8ccc2227dec4c016d6656e9789365a6dce73f90b620a53e62ee6")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/knem/package.py b/var/spack/repos/builtin/packages/knem/package.py
index ae6713cd3d..e3db858ff5 100644
--- a/var/spack/repos/builtin/packages/knem/package.py
+++ b/var/spack/repos/builtin/packages/knem/package.py
@@ -29,6 +29,8 @@ class Knem(AutotoolsPackage):
url="https://gitlab.inria.fr/knem/knem/uploads/59375c38537e6ff2d94209f190c54aa6/knem-1.1.3.tar.gz",
)
+ depends_on("c", type="build") # generated
+
variant("hwloc", default=True, description="Enable hwloc in the user-space tools")
patch(
diff --git a/var/spack/repos/builtin/packages/kokkos-kernels-legacy/package.py b/var/spack/repos/builtin/packages/kokkos-kernels-legacy/package.py
index c0582f1956..9ade1c168a 100644
--- a/var/spack/repos/builtin/packages/kokkos-kernels-legacy/package.py
+++ b/var/spack/repos/builtin/packages/kokkos-kernels-legacy/package.py
@@ -29,6 +29,8 @@ class KokkosKernelsLegacy(MakefilePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
# make sure kokkos kernels version matches kokkos
depends_on("kokkos-legacy@2.5.00", when="@2.5.00")
depends_on("kokkos-legacy@2.6.00", when="@2.6.00")
diff --git a/var/spack/repos/builtin/packages/kokkos-kernels/package.py b/var/spack/repos/builtin/packages/kokkos-kernels/package.py
index 14ce721955..9993e8b5fe 100644
--- a/var/spack/repos/builtin/packages/kokkos-kernels/package.py
+++ b/var/spack/repos/builtin/packages/kokkos-kernels/package.py
@@ -11,7 +11,7 @@ class KokkosKernels(CMakePackage, CudaPackage):
homepage = "https://github.com/kokkos/kokkos-kernels"
git = "https://github.com/kokkos/kokkos-kernels.git"
- url = "https://github.com/kokkos/kokkos-kernels/archive/4.0.00.tar.gz"
+ url = "https://github.com/kokkos/kokkos-kernels/releases/download/4.4.01/kokkos-kernels-4.4.01.tar.gz"
tags = ["e4s"]
@@ -19,30 +19,130 @@ class KokkosKernels(CMakePackage, CudaPackage):
maintainers("lucbv", "srajama1", "brian-kelley")
- license("BSD-3-Clause")
+ license("Apache-2.0 WITH LLVM-exception")
- # generate checksum for each release tarball with the following command
- # openssl sha256 kokkos-kernels-x.y.z.tar.gz
version("develop", branch="develop")
version("master", branch="master")
- version("4.0.00", sha256="750079d0be1282d18ecd280e130ca303044ac399f1e5864488284b92f5ce0a86")
- version("3.7.01", sha256="b2060f5894bdaf7f7d4793b90444fac260460cfa80595afcbcb955518864b446")
- version("3.7.00", sha256="51bc6db3995392065656848e2b152cfd1c3a95a951ab18a3934278113d59f32b")
- version("3.6.01", sha256="f000b156c8c0b80e85d38587907c11d9479aaf362408b812effeda5e22b24d0d")
- version("3.6.00", sha256="2753643fd643b9eed9f7d370e0ff5fa957211d08a91aa75398e31cbc9e5eb0a5")
- version("3.5.00", sha256="a03a41a047d95f9f07cd1e1d30692afdb75b5c705ef524e19c1d02fe60ccf8d1")
- version("3.4.01", sha256="f504aa4afbffb58fa7c4430d0fdb8fd5690a268823fa15eb0b7d58dab9d351e6")
- version("3.4.00", sha256="07ba11869e686cb0d47272d1ef494ccfbcdef3f93ff1c8b64ab9e136a53a227a")
- version("3.3.01", sha256="0f21fe6b5a8b6ae7738290e293aa990719aefe88b32f84617436bfd6074a8f77")
- version("3.3.00", sha256="8d7f78815301afb90ddba7914dce5b718cea792ac0c7350d2f8d00bd2ef1cece")
- version("3.2.01", sha256="c486e5cac19e354a517498c362838619435734d64b44f44ce909b0531c21d95c")
- version("3.2.00", sha256="8ac20ee28ae7813ce1bda461918800ad57fdbac2af86ef5d1ba74e83e10956de")
- version("3.1.00", sha256="27fea241ae92f41bd5b070b1a590ba3a56a06aca750207a98bea2f64a4a40c89")
- version("3.0.00", sha256="e4b832aed3f8e785de24298f312af71217a26067aea2de51531e8c1e597ef0e6")
+
+ version("4.5.00", sha256="94726a64e349adf6cd276e9fdc1b2bf7ff81efec833e479a5d3024b83f165a59")
+ version("4.4.01", sha256="4a32bc8330e0113856bdf181df94cc4f9902e3cebb5dc7cea5948f30df03bfa1")
+ version("4.4.00", sha256="66d5c3f728a8c7689159c97006996164ea00fd39702476220e3dbf2a05c49e8f")
+
+ version(
+ "4.3.01",
+ sha256="749553a6ea715ba1e56fa0b13b42866bb9880dba7a94e343eadf40d08c68fab8",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.3.01.tar.gz",
+ )
+ version(
+ "4.3.00",
+ sha256="03c3226ee97dbca4fa56fe69bc4eefa0673e23c37f2741943d9362424a63950e",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.3.00.tar.gz",
+ )
+ version(
+ "4.2.01",
+ sha256="058052b3a40f5d4e447b7ded5c480f1b0d4aa78373b0bc7e43804d0447c34ca8",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.2.01.tar.gz",
+ )
+ version(
+ "4.2.00",
+ sha256="c65df9a101dbbef2d8fd43c60c9ea85f2046bb3535fa1ad16e7c661ddd60401e",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.2.00.tar.gz",
+ )
+ version(
+ "4.1.00",
+ sha256="d6a4108444ea226e43bf6a9c0dfc557f223a72b1142bf81aa78dd60e16ac2d56",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.1.00.tar.gz",
+ )
+ version(
+ "4.0.01",
+ sha256="3f493fcb0244b26858ceb911be64092fbf7785616ad62c81abde0ea1ce86688a",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.0.01.tar.gz",
+ )
+ version(
+ "4.0.00",
+ sha256="750079d0be1282d18ecd280e130ca303044ac399f1e5864488284b92f5ce0a86",
+ url="https://github.com/kokkos/kokkos-kernels/archive/4.0.00.tar.gz",
+ )
+ version(
+ "3.7.01",
+ sha256="b2060f5894bdaf7f7d4793b90444fac260460cfa80595afcbcb955518864b446",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.7.01.tar.gz",
+ )
+ version(
+ "3.7.00",
+ sha256="51bc6db3995392065656848e2b152cfd1c3a95a951ab18a3934278113d59f32b",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.7.00.tar.gz",
+ )
+ version(
+ "3.6.01",
+ sha256="f000b156c8c0b80e85d38587907c11d9479aaf362408b812effeda5e22b24d0d",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.6.01.tar.gz",
+ )
+ version(
+ "3.6.00",
+ sha256="2753643fd643b9eed9f7d370e0ff5fa957211d08a91aa75398e31cbc9e5eb0a5",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.6.00.tar.gz",
+ )
+ version(
+ "3.5.00",
+ sha256="a03a41a047d95f9f07cd1e1d30692afdb75b5c705ef524e19c1d02fe60ccf8d1",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.5.00.tar.gz",
+ )
+ version(
+ "3.4.01",
+ sha256="f504aa4afbffb58fa7c4430d0fdb8fd5690a268823fa15eb0b7d58dab9d351e6",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.4.01.tar.gz",
+ )
+ version(
+ "3.4.00",
+ sha256="07ba11869e686cb0d47272d1ef494ccfbcdef3f93ff1c8b64ab9e136a53a227a",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.4.00.tar.gz",
+ )
+ version(
+ "3.3.01",
+ sha256="0f21fe6b5a8b6ae7738290e293aa990719aefe88b32f84617436bfd6074a8f77",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.3.01.tar.gz",
+ )
+ version(
+ "3.3.00",
+ sha256="8d7f78815301afb90ddba7914dce5b718cea792ac0c7350d2f8d00bd2ef1cece",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.3.00.tar.gz",
+ )
+ version(
+ "3.2.01",
+ sha256="c486e5cac19e354a517498c362838619435734d64b44f44ce909b0531c21d95c",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.2.01.tar.gz",
+ )
+ version(
+ "3.2.00",
+ sha256="8ac20ee28ae7813ce1bda461918800ad57fdbac2af86ef5d1ba74e83e10956de",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.2.00.tar.gz",
+ )
+ version(
+ "3.1.00",
+ sha256="27fea241ae92f41bd5b070b1a590ba3a56a06aca750207a98bea2f64a4a40c89",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.1.00.tar.gz",
+ )
+ version(
+ "3.0.00",
+ sha256="e4b832aed3f8e785de24298f312af71217a26067aea2de51531e8c1e597ef0e6",
+ url="https://github.com/kokkos/kokkos-kernels/archive/3.0.00.tar.gz",
+ )
+
+ depends_on("cxx", type="build") # generated
depends_on("kokkos")
depends_on("kokkos@master", when="@master")
depends_on("kokkos@develop", when="@develop")
+ depends_on("kokkos@4.5.00", when="@4.5.00")
+ depends_on("kokkos@4.4.01", when="@4.4.01")
+ depends_on("kokkos@4.4.00", when="@4.4.00")
+ depends_on("kokkos@4.3.01", when="@4.3.01")
+ depends_on("kokkos@4.3.00", when="@4.3.00")
+ depends_on("kokkos@4.2.01", when="@4.2.01")
+ depends_on("kokkos@4.2.00", when="@4.2.00")
+ depends_on("kokkos@4.1.00", when="@4.1.00")
+ depends_on("kokkos@4.0.01", when="@4.0.01")
depends_on("kokkos@4.0.00", when="@4.0.00")
depends_on("kokkos@3.7.01", when="@3.7.01")
depends_on("kokkos@3.7.00", when="@3.7.00")
@@ -127,29 +227,37 @@ class KokkosKernels(CMakePackage, CudaPackage):
variant(eti, default=deflt, description=eti, values=vals, multi=True)
tpls = {
- # variant name #deflt #spack name #root var name #docstring
- "blas": (False, "blas", "BLAS", "Link to system BLAS"),
- "lapack": (False, "lapack", "LAPACK", "Link to system LAPACK"),
- "mkl": (False, "mkl", "MKL", "Link to system MKL"),
- "cublas": (False, "cuda", None, "Link to CUDA BLAS library"),
- "cusparse": (False, "cuda", None, "Link to CUDA sparse library"),
- "superlu": (False, "superlu", "SUPERLU", "Link to SuperLU library"),
- "cblas": (False, "cblas", "CBLAS", "Link to CBLAS library"),
- "lapacke": (False, "clapack", "LAPACKE", "Link to LAPACKE library"),
+ # variant name #deflt #spack name #root var name #supporting versions #docstring
+ "blas": (False, "blas", "BLAS", "@3.0.00:", "Link to system BLAS"),
+ "lapack": (False, "lapack", "LAPACK", "@3.0.00:", "Link to system LAPACK"),
+ "mkl": (False, "mkl", "MKL", "@3.0.00:", "Link to system MKL"),
+ "cublas": (False, "cuda", None, "@3.0.00:", "Link to CUDA BLAS library"),
+ "cusparse": (False, "cuda", None, "@3.0.00:", "Link to CUDA sparse library"),
+ "superlu": (False, "superlu", "SUPERLU", "@3.1.00:", "Link to SuperLU library"),
+ "cblas": (False, "cblas", "CBLAS", "@3.1.00:", "Link to CBLAS library"),
+ "lapacke": (False, "clapack", "LAPACKE", "@3.1.00:", "Link to LAPACKE library"),
+ "rocblas": (False, "rocblas", "ROCBLAS", "@3.6.00:", "Link to AMD BLAS library"),
+ "rocsparse": (False, "rocsparse", "ROCSPARSE", "@3.6.00:", "Link to AMD sparse library"),
+ "cusolver": (False, "cuda", None, "@4.3.00:", "Link to CUDA solver library"),
+ "rocsolver": (False, "rocsolver", "ROCSOLVER", "@4.3.00:", "Link to AMD solver library"),
}
for tpl in tpls:
- deflt_bool, spackname, rootname, descr = tpls[tpl]
- variant(tpl, default=deflt_bool, description=descr)
+ deflt_bool, spackname, rootname, condition, descr = tpls[tpl]
+ variant(tpl, default=deflt_bool, when=f"{condition}", description=descr)
depends_on(spackname, when="+%s" % tpl)
variant("shared", default=True, description="Build shared libraries")
+ # sanity check
+ sanity_check_is_file = [join_path("include", "KokkosKernels_config.h")]
+ sanity_check_is_dir = ["include"]
+
def cmake_args(self):
spec = self.spec
options = []
- isdiy = "+diy" in spec
+ isdiy = spec.satisfies("+diy")
if isdiy:
options.append("-DSpack_WORKAROUND=On")
@@ -166,7 +274,7 @@ class KokkosKernels(CMakePackage, CudaPackage):
for tpl in self.tpls:
on_flag = "+%s" % tpl
off_flag = "~%s" % tpl
- dflt, spackname, rootname, descr = self.tpls[tpl]
+ dflt, spackname, rootname, condition, descr = self.tpls[tpl]
if on_flag in self.spec:
options.append("-DKokkosKernels_ENABLE_TPL_%s=ON" % tpl.upper())
if rootname:
diff --git a/var/spack/repos/builtin/packages/kokkos-legacy/package.py b/var/spack/repos/builtin/packages/kokkos-legacy/package.py
index 54548c0ae1..c0eebf980c 100644
--- a/var/spack/repos/builtin/packages/kokkos-legacy/package.py
+++ b/var/spack/repos/builtin/packages/kokkos-legacy/package.py
@@ -14,6 +14,8 @@ class KokkosLegacy(Package):
url = "https://github.com/kokkos/kokkos/archive/2.03.00.tar.gz"
git = "https://github.com/kokkos/kokkos.git"
+ # This package has been archived. All new versions of Kokkos should go into
+ # the kokkos package itself.
version(
"2.9.00",
sha256="e0621197791ed3a381b4f02c78fa529f3cff3abb74d52157b4add17e8aa04bc4",
@@ -85,6 +87,9 @@ class KokkosLegacy(Package):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("debug", default=False, description="Build debug version of Kokkos")
variant("serial", default=True, description="enable Serial backend (default)")
@@ -197,7 +202,7 @@ class KokkosLegacy(Package):
# without specifying CUDA
for p in gpu_values:
conflicts(
- "gpu_arch={0}".format(p),
+ f"gpu_arch={p}",
when="~cuda",
msg="Must specify CUDA backend to use a GPU architecture.",
)
@@ -235,35 +240,35 @@ class KokkosLegacy(Package):
def install(self, spec, prefix):
generate = which(join_path(self.stage.source_path, "generate_makefile.bash"))
with working_dir("build", create=True):
- g_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec["hwloc"].prefix]
+ g_args = [f"--prefix={prefix}", f"--with-hwloc={spec['hwloc'].prefix}"]
arch_args = []
kokkos_options_args = []
cuda_options_args = []
# PIC
- if "+pic" in spec:
+ if spec.satisfies("+pic"):
g_args.append("--cxxflags=-fPIC")
# C++ standard
cxxstandard = spec.variants["cxxstd"].value
if cxxstandard != "none":
- g_args.append("--cxxstandard=%s" % cxxstandard)
+ g_args.append(f"--cxxstandard={cxxstandard}")
# Build Debug
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
g_args.append("--debug")
# Backends
- if "+serial" in spec:
+ if spec.satisfies("+serial"):
g_args.append("--with-serial")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
g_args.append("--with-openmp")
- if "+pthreads" in spec:
+ if spec.satisfies("+pthreads"):
g_args.append("--with-pthread")
- if "+qthreads" in spec:
- g_args.append("--with-qthreads=%s" % spec["qthreads"].prefix)
- if "+cuda" in spec:
- g_args.append("--with-cuda=%s" % spec["cuda"].prefix)
+ if spec.satisfies("+qthreads"):
+ g_args.append(f"--with-qthreads={spec['qthreads'].prefix}")
+ if spec.satisfies("+cuda"):
+ g_args.append(f"--with-cuda={spec['cuda'].prefix}")
# Host architectures
host_arch = spec.variants["host_arch"].value
# GPU architectures
@@ -274,37 +279,37 @@ class KokkosLegacy(Package):
arch_args.append(gpu_arch)
# Combined architecture flags
if arch_args:
- g_args.append("--arch={0}".format(",".join(arch_args)))
+ g_args.append(f"--arch={','.join(arch_args)}")
# CUDA options
- if "+force_uvm" in spec:
+ if spec.satisfies("+force_uvm"):
cuda_options_args.append("force_uvm")
- if "+use_ldg" in spec:
+ if spec.satisfies("+use_ldg"):
cuda_options_args.append("use_ldg")
- if "+rdc" in spec:
+ if spec.satisfies("+rdc"):
cuda_options_args.append("rdc")
- if "+enable_lambda" in spec:
+ if spec.satisfies("+enable_lambda"):
cuda_options_args.append("enable_lambda")
if cuda_options_args:
- g_args.append("--with-cuda-options={0}".format(",".join(cuda_options_args)))
+ g_args.append(f"--with-cuda-options={','.join(cuda_options_args)}")
# Kokkos options
- if "+aggressive_vectorization" in spec:
+ if spec.satisfies("+aggressive_vectorization"):
kokkos_options_args.append("aggressive_vectorization")
- if "+disable_profiling" in spec:
+ if spec.satisfies("+disable_profiling"):
kokkos_options_args.append("disable_profiling")
- if "+disable_dualview_modify_check" in spec:
+ if spec.satisfies("+disable_dualview_modify_check"):
kokkos_options_args.append("disable_dualview_modify_check")
- if "+enable_profile_load_print" in spec:
+ if spec.satisfies("+enable_profile_load_print"):
kokkos_options_args.append("enable_profile_load_print")
- if "+compiler_warnings" in spec:
+ if spec.satisfies("+compiler_warnings"):
kokkos_options_args.append("compiler_warnings")
- if "+disable_deprecated_code" in spec:
+ if spec.satisfies("+disable_deprecated_code"):
kokkos_options_args.append("disable_deprecated_code")
- if "+enable_eti" in spec:
+ if spec.satisfies("+enable_eti"):
kokkos_options_args.append("enable_eti")
if kokkos_options_args:
- g_args.append("--with-options={0}".format(",".join(kokkos_options_args)))
+ g_args.append(f"--with-options={','.join(kokkos_options_args)}")
generate(*g_args)
make()
diff --git a/var/spack/repos/builtin/packages/kokkos-nvcc-wrapper/package.py b/var/spack/repos/builtin/packages/kokkos-nvcc-wrapper/package.py
index e3bdc63471..ae8aca3945 100644
--- a/var/spack/repos/builtin/packages/kokkos-nvcc-wrapper/package.py
+++ b/var/spack/repos/builtin/packages/kokkos-nvcc-wrapper/package.py
@@ -21,6 +21,12 @@ class KokkosNvccWrapper(Package):
license("BSD-3-Clause")
+ version("4.4.01", sha256="3f7096d17eaaa4004c7497ac082bf1ae3ff47b5104149e54af021a89414c3682")
+ version("4.4.00", sha256="c638980cb62c34969b8c85b73e68327a2cb64f763dd33e5241f5fd437170205a")
+ version("4.3.01", sha256="5998b7c732664d6b5e219ccc445cd3077f0e3968b4be480c29cd194b4f45ec70")
+ version("4.3.00", sha256="53cf30d3b44dade51d48efefdaee7a6cf109a091b702a443a2eda63992e5fe0d")
+ version("4.2.01", sha256="cbabbabba021d00923fb357d2e1b905dda3838bd03c885a6752062fe03c67964")
+ version("4.2.00", sha256="ac08765848a0a6ac584a0a46cd12803f66dd2a2c2db99bb17c06ffc589bf5be8")
version("4.1.00", sha256="cf725ea34ba766fdaf29c884cfe2daacfdc6dc2d6af84042d1c78d0f16866275")
version("4.0.01", sha256="bb942de8afdd519fd6d5d3974706bfc22b6585a62dd565c12e53bdb82cd154f0")
version("4.0.00", sha256="1829a423883d4b44223c7c3a53d3c51671145aad57d7d23e6a1a4bebf710dcf6")
@@ -42,6 +48,10 @@ class KokkosNvccWrapper(Package):
version("master", branch="master")
version("develop", branch="develop")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cuda")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/kokkos-tools/package.py b/var/spack/repos/builtin/packages/kokkos-tools/package.py
new file mode 100644
index 0000000000..c35e8dbe8d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kokkos-tools/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class KokkosTools(CMakePackage):
+ """Kokkos Profiling and Debugging Tools"""
+
+ homepage = "https://github.com/kokkos/kokkos-tools/"
+ git = "https://github.com/kokkos/kokkos-tools.git"
+
+ license("Apache-2.0 WITH LLVM-exception")
+
+ version("develop", branch="develop")
+
+ variant("mpi", default=False, description="Enable MPI support")
+ variant("papi", default=False, description="Enable PAPI support")
+
+ depends_on("kokkos")
+ depends_on("mpi", when="+mpi")
+ depends_on("papi", when="+papi")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("KokkosTools_ENABLE_MPI", "mpi"),
+ self.define_from_variant("KokkosTools_ENABLE_PAPI", "papi"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index 6f0ba1a6a8..6b58c7298a 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -4,8 +4,9 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
-from llnl.util import lang, tty
+import llnl.util.lang as lang
+import spack.build_systems.cmake
from spack.package import *
@@ -15,39 +16,139 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://github.com/kokkos/kokkos"
git = "https://github.com/kokkos/kokkos.git"
- url = "https://github.com/kokkos/kokkos/archive/3.6.00.tar.gz"
+ url = "https://github.com/kokkos/kokkos/releases/download/4.4.01/kokkos-4.4.01.tar.gz"
tags = ["e4s"]
test_requires_compiler = True
- maintainers("janciesko", "crtrott")
+ maintainers("cedricchevalier19", "nmm0", "lucbv")
- license("BSD-3-Clause")
+ license("Apache-2.0 WITH LLVM-exception")
version("master", branch="master")
version("develop", branch="develop")
- version("4.2.00", sha256="ac08765848a0a6ac584a0a46cd12803f66dd2a2c2db99bb17c06ffc589bf5be8")
- version("4.1.00", sha256="cf725ea34ba766fdaf29c884cfe2daacfdc6dc2d6af84042d1c78d0f16866275")
- version("4.0.01", sha256="bb942de8afdd519fd6d5d3974706bfc22b6585a62dd565c12e53bdb82cd154f0")
- version("4.0.00", sha256="1829a423883d4b44223c7c3a53d3c51671145aad57d7d23e6a1a4bebf710dcf6")
- version("3.7.02", sha256="5024979f06bc8da2fb696252a66297f3e0e67098595a0cc7345312b3b4aa0f54")
- version("3.7.01", sha256="0481b24893d1bcc808ec68af1d56ef09b82a1138a1226d6be27c3b3c3da65ceb")
- version("3.7.00", sha256="62e3f9f51c798998f6493ed36463f66e49723966286ef70a9dcba329b8443040")
- version("3.6.01", sha256="1b80a70c5d641da9fefbbb652e857d7c7a76a0ebad1f477c253853e209deb8db")
- version("3.6.00", sha256="53b11fffb53c5d48da5418893ac7bc814ca2fde9c86074bdfeaa967598c918f4")
- version("3.5.00", sha256="748f06aed63b1e77e3653cd2f896ef0d2c64cb2e2d896d9e5a57fec3ff0244ff")
- version("3.4.01", sha256="146d5e233228e75ef59ca497e8f5872d9b272cb93e8e9cdfe05ad34a23f483d1")
- version("3.4.00", sha256="2e4438f9e4767442d8a55e65d000cc9cde92277d415ab4913a96cd3ad901d317")
- version("3.3.01", sha256="4919b00bb7b6eb80f6c335a32f98ebe262229d82e72d3bae6dd91aaf3d234c37")
- version("3.3.00", sha256="170b9deaa1943185e928f8fcb812cd4593a07ed7d220607467e8f0419e147295")
- version("3.2.01", sha256="9e27a3d8f81559845e190d60f277d84d6f558412a3df3301d9545e91373bcaf1")
- version("3.2.00", sha256="05e1b4dd1ef383ca56fe577913e1ff31614764e65de6d6f2a163b2bddb60b3e9")
- version("3.1.01", sha256="ff5024ebe8570887d00246e2793667e0d796b08c77a8227fe271127d36eec9dd")
- version("3.1.00", sha256="b935c9b780e7330bcb80809992caa2b66fd387e3a1c261c955d622dae857d878")
- version("3.0.00", sha256="c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b")
+
+ version("4.5.00", sha256="cbfb742feeb9e649db9eca0394e6ca9a22aa017a1e6aab8576990772a0e3135b")
+ version("4.4.01", sha256="3413f0cb39912128d91424ebd92e8832009e7eeaf6fa8da58e99b0d37860d972")
+ version("4.4.00", sha256="0b46372f38c48aa088411ac1b7c173a5c90f0fdb69ab40271827688fc134f58b")
+
+ version(
+ "4.3.01",
+ sha256="5998b7c732664d6b5e219ccc445cd3077f0e3968b4be480c29cd194b4f45ec70",
+ url="https://github.com/kokkos/kokkos/archive/4.3.01.tar.gz",
+ )
+ version(
+ "4.3.00",
+ sha256="53cf30d3b44dade51d48efefdaee7a6cf109a091b702a443a2eda63992e5fe0d",
+ url="https://github.com/kokkos/kokkos/archive/4.3.00.tar.gz",
+ )
+ version(
+ "4.2.01",
+ sha256="cbabbabba021d00923fb357d2e1b905dda3838bd03c885a6752062fe03c67964",
+ url="https://github.com/kokkos/kokkos/archive/4.2.01.tar.gz",
+ )
+ version(
+ "4.2.00",
+ sha256="ac08765848a0a6ac584a0a46cd12803f66dd2a2c2db99bb17c06ffc589bf5be8",
+ url="https://github.com/kokkos/kokkos/archive/4.2.00.tar.gz",
+ )
+ version(
+ "4.1.00",
+ sha256="cf725ea34ba766fdaf29c884cfe2daacfdc6dc2d6af84042d1c78d0f16866275",
+ url="https://github.com/kokkos/kokkos/archive/4.1.00.tar.gz",
+ )
+ version(
+ "4.0.01",
+ sha256="bb942de8afdd519fd6d5d3974706bfc22b6585a62dd565c12e53bdb82cd154f0",
+ url="https://github.com/kokkos/kokkos/archive/4.0.01.tar.gz",
+ )
+ version(
+ "4.0.00",
+ sha256="1829a423883d4b44223c7c3a53d3c51671145aad57d7d23e6a1a4bebf710dcf6",
+ url="https://github.com/kokkos/kokkos/archive/4.0.00.tar.gz",
+ )
+ version(
+ "3.7.02",
+ sha256="5024979f06bc8da2fb696252a66297f3e0e67098595a0cc7345312b3b4aa0f54",
+ url="https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz",
+ )
+ version(
+ "3.7.01",
+ sha256="0481b24893d1bcc808ec68af1d56ef09b82a1138a1226d6be27c3b3c3da65ceb",
+ url="https://github.com/kokkos/kokkos/archive/3.7.01.tar.gz",
+ )
+ version(
+ "3.7.00",
+ sha256="62e3f9f51c798998f6493ed36463f66e49723966286ef70a9dcba329b8443040",
+ url="https://github.com/kokkos/kokkos/archive/3.7.00.tar.gz",
+ )
+ version(
+ "3.6.01",
+ sha256="1b80a70c5d641da9fefbbb652e857d7c7a76a0ebad1f477c253853e209deb8db",
+ url="https://github.com/kokkos/kokkos/archive/3.6.01.tar.gz",
+ )
+ version(
+ "3.6.00",
+ sha256="53b11fffb53c5d48da5418893ac7bc814ca2fde9c86074bdfeaa967598c918f4",
+ url="https://github.com/kokkos/kokkos/archive/3.6.00.tar.gz",
+ )
+ version(
+ "3.5.00",
+ sha256="748f06aed63b1e77e3653cd2f896ef0d2c64cb2e2d896d9e5a57fec3ff0244ff",
+ url="https://github.com/kokkos/kokkos/archive/3.5.00.tar.gz",
+ )
+ version(
+ "3.4.01",
+ sha256="146d5e233228e75ef59ca497e8f5872d9b272cb93e8e9cdfe05ad34a23f483d1",
+ url="https://github.com/kokkos/kokkos/archive/3.4.01.tar.gz",
+ )
+ version(
+ "3.4.00",
+ sha256="2e4438f9e4767442d8a55e65d000cc9cde92277d415ab4913a96cd3ad901d317",
+ url="https://github.com/kokkos/kokkos/archive/3.4.00.tar.gz",
+ )
+ version(
+ "3.3.01",
+ sha256="4919b00bb7b6eb80f6c335a32f98ebe262229d82e72d3bae6dd91aaf3d234c37",
+ url="https://github.com/kokkos/kokkos/archive/3.3.01.tar.gz",
+ )
+ version(
+ "3.3.00",
+ sha256="170b9deaa1943185e928f8fcb812cd4593a07ed7d220607467e8f0419e147295",
+ url="https://github.com/kokkos/kokkos/archive/3.3.00.tar.gz",
+ )
+ version(
+ "3.2.01",
+ sha256="9e27a3d8f81559845e190d60f277d84d6f558412a3df3301d9545e91373bcaf1",
+ url="https://github.com/kokkos/kokkos/archive/3.2.01.tar.gz",
+ )
+ version(
+ "3.2.00",
+ sha256="05e1b4dd1ef383ca56fe577913e1ff31614764e65de6d6f2a163b2bddb60b3e9",
+ url="https://github.com/kokkos/kokkos/archive/3.2.00.tar.gz",
+ )
+ version(
+ "3.1.01",
+ sha256="ff5024ebe8570887d00246e2793667e0d796b08c77a8227fe271127d36eec9dd",
+ url="https://github.com/kokkos/kokkos/archive/3.1.01.tar.gz",
+ )
+ version(
+ "3.1.00",
+ sha256="b935c9b780e7330bcb80809992caa2b66fd387e3a1c261c955d622dae857d878",
+ url="https://github.com/kokkos/kokkos/archive/3.1.00.tar.gz",
+ )
+ version(
+ "3.0.00",
+ sha256="c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b",
+ url="https://github.com/kokkos/kokkos/archive/3.0.00.tar.gz",
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build") # Kokkos requires a C++ compiler
depends_on("cmake@3.16:", type="build")
+ conflicts("cmake@3.28", when="@:4.2.01 +cuda")
devices_variants = {
"cuda": [False, "Whether to build CUDA backend"],
@@ -61,9 +162,12 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+rocm", when="@:3.0")
conflicts("+sycl", when="@:3.3")
conflicts("+openmptarget", when="@:3.5")
+ conflicts(
+ "".join([f"~{d}" for d in devices_variants]),
+ msg="Kokkos requires at least one active backend",
+ )
# https://github.com/spack/spack/issues/29052
- conflicts("@:3.5 +sycl", when="%dpcpp@2022:")
conflicts("@:3.5 +sycl", when="%oneapi@2022:")
tpls_variants = {
@@ -76,6 +180,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
options_variants = {
"aggressive_vectorization": [False, "Aggressively vectorize loops"],
"compiler_warnings": [False, "Print all compiler warnings"],
+ "complex_align": [True, "Align complex numbers"],
"cuda_constexpr": [False, "Activate experimental constexpr features"],
"cuda_lambda": [False, "Activate experimental lambda features"],
"cuda_ldg_intrinsic": [False, "Use CUDA LDG intrinsics"],
@@ -158,10 +263,10 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
"gfx906": "vega906",
"gfx908": "vega908",
"gfx90a": "vega90A",
+ "gfx940": "amd_gfx940",
"gfx942": "amd_gfx942",
"gfx1030": "navi1030",
"gfx1100": "navi1100",
- "gfx942": "amd_gfx942",
}
amd_support_conflict_msg = (
"{0} is not supported; "
@@ -194,6 +299,8 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
for dev, (dflt, desc) in devices_variants.items():
variant(dev, default=dflt, description=desc)
conflicts("+cuda", when="+rocm", msg="CUDA and ROCm are not compatible in Kokkos.")
+ depends_on("intel-oneapi-dpl", when="+sycl")
+ depends_on("rocthrust", when="@4.3: +rocm")
for opt, (dflt, desc) in options_variants.items():
variant(opt, default=dflt, description=desc, when=("+cuda" if "cuda" in opt else None))
@@ -203,10 +310,17 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
depends_on(tpl, when="+%s" % tpl)
variant("wrapper", default=False, description="Use nvcc-wrapper for CUDA build")
+ variant(
+ "cmake_lang",
+ default=False,
+ description="Use CMake language support for CUDA/HIP",
+ when="@3.6:",
+ )
depends_on("kokkos-nvcc-wrapper", when="+wrapper")
depends_on("kokkos-nvcc-wrapper@develop", when="@develop+wrapper")
depends_on("kokkos-nvcc-wrapper@master", when="@master+wrapper")
conflicts("+wrapper", when="~cuda")
+ conflicts("+wrapper", when="+cmake_lang")
cxxstds = ["11", "14", "17", "20"]
variant("cxxstd", default="17", values=cxxstds, multi=False, description="C++ standard")
@@ -218,6 +332,10 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+cuda", when="cxxstd=17 ^cuda@:10")
conflicts("+cuda", when="cxxstd=20 ^cuda@:11")
+ # Expose a way to disable CudaMallocAsync that can cause problems
+ # with some MPI such as cray-mpich
+ variant("alloc_async", default=False, description="Use CudaMallocAsync", when="@4.2: +cuda")
+
# SYCL and OpenMPTarget require C++17 or higher
for cxxstdver in cxxstds[: cxxstds.index("17")]:
conflicts(
@@ -240,6 +358,12 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
# Patches
patch("hpx_profiling_fences.patch", when="@3.5.00 +hpx")
patch("sycl_bhalft_test.patch", when="@4.2.00 +sycl")
+ # adds amd_gfx940 support to Kokkos 4.2.00 (upstreamed in https://github.com/kokkos/kokkos/pull/6671)
+ patch(
+ "https://github.com/rbberger/kokkos/commit/293319c5844f4d8eea51eb9cd1457115a5016d3f.patch?full_index=1",
+ sha256="145619e87dbf26b66ea23e76906576e2a854a3b09f2a2dd70363e61419fa6a6e",
+ when="@4.2.00",
+ )
variant("shared", default=True, description="Build shared libraries")
@@ -250,6 +374,13 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
"KokkosConfigCommon.cmake", relative_root=os.path.join("lib64", "cmake", "Kokkos")
)
+ # sanity check
+ sanity_check_is_file = [
+ join_path("include", "KokkosCore_config.h"),
+ join_path("include", "Kokkos_Core.hpp"),
+ ]
+ sanity_check_is_dir = ["bin", "include"]
+
@classmethod
def get_microarch(cls, target):
"""Get the Kokkos microarch name for a Spack target (spec.target)."""
@@ -270,7 +401,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
variant_to_cmake_option = {"rocm": "hip"}
for variant_name in cmake_options:
opt = variant_to_cmake_option.get(variant_name, variant_name)
- optname = "Kokkos_%s_%s" % (cmake_prefix, opt.upper())
+ optname = f"Kokkos_{cmake_prefix}_{opt.upper()}"
# Explicitly enable or disable
option = self.define_from_variant(optname, variant_name)
if option:
@@ -287,18 +418,21 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
from_variant = self.define_from_variant
if spec.satisfies("~wrapper+cuda") and not (
- spec.satisfies("%clang") or spec.satisfies("%cce")
+ spec.satisfies("%clang") or spec.satisfies("%cce") or spec.satisfies("+cmake_lang")
):
- raise InstallError("Kokkos requires +wrapper when using +cuda" "without clang")
+ raise InstallError(
+ "Kokkos requires +wrapper when using +cuda without %clang, %cce or +cmake_lang"
+ )
options = [
from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
from_variant("BUILD_SHARED_LIBS", "shared"),
+ from_variant("Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE", "cmake_lang"),
]
spack_microarches = []
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
if isinstance(spec.variants["cuda_arch"].value, str):
cuda_arch = spec.variants["cuda_arch"].value
else:
@@ -314,7 +448,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
if kokkos_microarch_name:
spack_microarches.append(kokkos_microarch_name)
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
for amdgpu_target in spec.variants["amdgpu_target"].value:
if amdgpu_target != "none":
if amdgpu_target in self.amdgpu_arch_map:
@@ -338,35 +472,40 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
if spec.variants[tpl].value:
options.append(self.define(tpl + "_DIR", spec[tpl].prefix))
- if "+rocm" in self.spec:
- options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
- elif "+wrapper" in self.spec:
+ if self.spec.satisfies("+wrapper"):
options.append(
self.define("CMAKE_CXX_COMPILER", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
)
+ elif "+rocm" in self.spec:
+ if "+cmake_lang" in self.spec:
+ options.append(
+ self.define(
+ "CMAKE_HIP_COMPILER",
+ join_path(self.spec["llvm-amdgpu"].prefix.bin, "amdclang++"),
+ )
+ )
+ options.append(from_variant("CMAKE_HIP_STANDARD", "cxxstd"))
+ else:
+ options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
+ options.append(self.define("Kokkos_ENABLE_ROCTHRUST", True))
+ elif "+cuda" in self.spec and "+cmake_lang" in self.spec:
+ options.append(
+ self.define("CMAKE_CUDA_COMPILER", join_path(self.spec["cuda"].prefix.bin, "nvcc"))
+ )
+ options.append(from_variant("CMAKE_CUDA_STANDARD", "cxxstd"))
if self.spec.satisfies("%oneapi") or self.spec.satisfies("%intel"):
options.append(self.define("CMAKE_CXX_FLAGS", "-fp-model=precise"))
+ options.append(
+ self.define_from_variant("Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC", "alloc_async")
+ )
+
# Remove duplicate options
return lang.dedupe(options)
test_script_relative_path = join_path("scripts", "spack_test")
- # TODO: Replace this method and its 'get' use for cmake path with
- # join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone
- # tests can access build dependencies through self.spec['cmake'].
- def cmake_bin(self, set=True):
- """(Hack) Set/get cmake dependency path."""
- filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
- if set:
- with open(filepath, "w") as out_file:
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- out_file.write("{0}\n".format(cmake_bin))
- elif os.path.isfile(filepath):
- with open(filepath, "r") as in_file:
- return in_file.read().strip()
-
@run_after("install")
def setup_build_tests(self):
# Skip if unsupported version
@@ -379,47 +518,29 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
cmake_source_path,
"-DSPACK_PACKAGE_SOURCE_DIR:PATH={0}".format(self.stage.source_path),
"-DSPACK_PACKAGE_TEST_ROOT_DIR:PATH={0}".format(
- join_path(self.install_test_root, cmake_out_path)
+ join_path(install_test_root(self), cmake_out_path)
),
"-DSPACK_PACKAGE_INSTALL_DIR:PATH={0}".format(self.prefix),
]
cmake(*cmake_args)
- self.cache_extra_test_sources(cmake_out_path)
- self.cmake_bin(set=True)
+ cache_extra_test_sources(self, cmake_out_path)
- def build_tests(self, cmake_path):
- """Build test."""
- cmake_bin = self.cmake_bin(set=False)
-
- if not cmake_bin:
- tty.msg("Skipping kokkos test: cmake_bin_path.txt not found")
- return
-
- cmake_args = [cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path]
-
- if not self.run_test(cmake_bin, options=cmake_args, purpose="Generate the Makefile"):
- tty.warn("Skipping kokkos test: failed to generate Makefile")
- return
-
- if not self.run_test("make", purpose="Build test software"):
- tty.warn("Skipping kokkos test: failed to build test")
-
- def run_tests(self, cmake_path):
- """Run test."""
- if not self.run_test(
- "make", options=[cmake_path, "test"], purpose="Checking ability to execute."
- ):
- tty.warn("Failed to run kokkos test")
-
- def test(self):
- # Skip if unsupported version
+ def test_run(self):
+ """Test if kokkos builds and runs"""
cmake_path = join_path(
self.test_suite.current_test_cache_dir, self.test_script_relative_path, "out"
)
if not os.path.exists(cmake_path):
- tty.warn("Skipping smoke tests: {0} is missing".format(cmake_path))
- return
-
- self.build_tests(cmake_path)
- self.run_tests(cmake_path)
+ raise SkipTest(f"{cmake_path} is missing")
+
+ cmake = self.spec["cmake"].command
+ cmake_args = ["-DEXECUTABLE_OUTPUT_PATH=" + cmake_path]
+ if self.spec.satisfies("+rocm"):
+ prefix_paths = ";".join(spack.build_systems.cmake.get_cmake_prefix_path(self))
+ cmake_args.append("-DCMAKE_PREFIX_PATH={0}".format(prefix_paths))
+
+ cmake(cmake_path, *cmake_args)
+ make = which("make")
+ make()
+ make(cmake_path, "test")
diff --git a/var/spack/repos/builtin/packages/kraken/package.py b/var/spack/repos/builtin/packages/kraken/package.py
index 6bfaef69c9..806e3d29da 100644
--- a/var/spack/repos/builtin/packages/kraken/package.py
+++ b/var/spack/repos/builtin/packages/kraken/package.py
@@ -21,6 +21,8 @@ class Kraken(Package):
version("1.1.1", sha256="73e48f40418f92b8cf036ca1da727ca3941da9b78d4c285b81ba3267326ac4ee")
version("1.0", sha256="bade6d83233c26226d02bd427fe0a4d6cd6dc5c0300927e30d41e885a478c378")
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
# Does NOT support JELLYFISH 2.0. Ver 1.1.11 is the last version of
# JELLYFISH 1.
diff --git a/var/spack/repos/builtin/packages/kraken2/package.py b/var/spack/repos/builtin/packages/kraken2/package.py
index efe7513656..5a41bff18c 100644
--- a/var/spack/repos/builtin/packages/kraken2/package.py
+++ b/var/spack/repos/builtin/packages/kraken2/package.py
@@ -32,6 +32,8 @@ class Kraken2(Package):
"2.0.6-beta", sha256="d77db6251179c4d7e16bc9b5e5e9043d25acf81f3e32ad6eadfba829a31e1d09"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("rsync", type=("run"))
depends_on("wget", type=("run"))
diff --git a/var/spack/repos/builtin/packages/krakenuniq/package.py b/var/spack/repos/builtin/packages/krakenuniq/package.py
index c4610dac2f..848dc0b9b4 100644
--- a/var/spack/repos/builtin/packages/krakenuniq/package.py
+++ b/var/spack/repos/builtin/packages/krakenuniq/package.py
@@ -25,6 +25,8 @@ class Krakenuniq(Package):
version("0.5.5", sha256="645f4387a59638526dededacd5104abc1b325c020d5e4c136b902f1167fc4fd5")
version("0.5.3", sha256="bc57fd4d5f50363aef640d61b2b111d9bef84a32e9a4eebfb977812cb8dc0250")
+ depends_on("cxx", type="build") # generated
+
variant("jellyfish", default=False, description="Install jellyfish v1.1.")
depends_on("bzip2")
@@ -33,7 +35,7 @@ class Krakenuniq(Package):
def install(self, spec, prefix):
local_script = which("./install_krakenuniq.sh")
- if "+jellyfish" in self.spec:
+ if self.spec.satisfies("+jellyfish"):
local_script("-j", prefix.bin)
else:
local_script(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/krb5/package.py b/var/spack/repos/builtin/packages/krb5/package.py
index 12ad783dbc..c4ee935801 100644
--- a/var/spack/repos/builtin/packages/krb5/package.py
+++ b/var/spack/repos/builtin/packages/krb5/package.py
@@ -16,28 +16,58 @@ class Krb5(AutotoolsPackage):
list_url = "https://kerberos.org/dist/krb5/"
list_depth = 1
- license("MIT")
-
- version("1.20.1", sha256="704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851")
- version("1.19.4", sha256="41f5981c5a4de0a26b3937e679a116cd5b3739641fd253124aac91f7179b54eb")
- version("1.19.3", sha256="56d04863cfddc9d9eb7af17556e043e3537d41c6e545610778676cf551b9dcd0")
- version("1.19.2", sha256="10453fee4e3a8f8ce6129059e5c050b8a65dab1c257df68b99b3112eaa0cdf6a")
- version("1.18.2", sha256="c6e4c9ec1a98141c3f5d66ddf1a135549050c9fab4e9a4620ee9b22085873ae0")
- version("1.18.1", sha256="02a4e700f10936f937cd1a4c303cab8687a11abecc6107bd4b706b9329cd5400")
- version("1.18", sha256="73913934d711dcf9d5f5605803578edb44b9a11786df3c1b2711f4e1752f2c88")
- version("1.17.1", sha256="3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181")
- version("1.17", sha256="5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5")
- version("1.16.3", sha256="e40499df7c6dbef0cf9b11870a0e167cde827737d8b2c06a9436334f08ab9b0d")
- version("1.16.2", sha256="9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027")
- version("1.16.1", sha256="214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117")
+ license("MIT", checked_by="wdconinc")
+
+ version("1.21.3", sha256="b7a4cd5ead67fb08b980b21abd150ff7217e85ea320c9ed0c6dadd304840ad35")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-37371
+ version(
+ "1.21.2", sha256="9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491"
+ )
+ version(
+ "1.20.1", sha256="704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851"
+ )
+ version(
+ "1.19.4", sha256="41f5981c5a4de0a26b3937e679a116cd5b3739641fd253124aac91f7179b54eb"
+ )
+ version(
+ "1.19.3", sha256="56d04863cfddc9d9eb7af17556e043e3537d41c6e545610778676cf551b9dcd0"
+ )
+ version(
+ "1.19.2", sha256="10453fee4e3a8f8ce6129059e5c050b8a65dab1c257df68b99b3112eaa0cdf6a"
+ )
+ version(
+ "1.18.2", sha256="c6e4c9ec1a98141c3f5d66ddf1a135549050c9fab4e9a4620ee9b22085873ae0"
+ )
+ version(
+ "1.18.1", sha256="02a4e700f10936f937cd1a4c303cab8687a11abecc6107bd4b706b9329cd5400"
+ )
+ version("1.18", sha256="73913934d711dcf9d5f5605803578edb44b9a11786df3c1b2711f4e1752f2c88")
+ version(
+ "1.17.1", sha256="3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181"
+ )
+ version("1.17", sha256="5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5")
+ version(
+ "1.16.3", sha256="e40499df7c6dbef0cf9b11870a0e167cde827737d8b2c06a9436334f08ab9b0d"
+ )
+ version(
+ "1.16.2", sha256="9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027"
+ )
+ version(
+ "1.16.1", sha256="214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("diffutils", type="build")
depends_on("bison", type="build")
depends_on("openssl@:1", when="@:1.19")
depends_on("openssl")
depends_on("gettext")
+ depends_on("perl", type="build")
depends_on("findutils", type="build")
- depends_on("pkgconfig", type="build", when="^openssl~shared")
+ depends_on("pkgconfig", type="build")
variant(
"shared", default=True, description="install shared libraries if True, static if false"
@@ -72,19 +102,20 @@ class Krb5(AutotoolsPackage):
)
def configure_args(self):
- args = ["--without-system-verto"]
+ spec = self.spec
+ args = ["--without-system-verto", "--without-keyutils"]
- if "~shared" in self.spec:
+ if spec.satisfies("~shared"):
args.append("--enable-static")
args.append("--disable-shared")
else:
args.append("--disable-static")
# https://github.com/spack/spack/issues/34193
- if "%gcc@10:" in self.spec:
+ if spec.satisfies("%gcc@10:"):
args.append("CFLAGS=-fcommon")
- if self.spec["openssl"].satisfies("~shared"):
+ if spec["openssl"].satisfies("~shared"):
pkgconf = which("pkg-config")
ssllibs = pkgconf("--static", "--libs", "openssl", output=str)
args.append(f"LDFLAGS={ssllibs}")
diff --git a/var/spack/repos/builtin/packages/krims/package.py b/var/spack/repos/builtin/packages/krims/package.py
index 3d07b1a5b6..2670d5d0b8 100644
--- a/var/spack/repos/builtin/packages/krims/package.py
+++ b/var/spack/repos/builtin/packages/krims/package.py
@@ -23,6 +23,8 @@ class Krims(CMakePackage):
version("develop", branch="master")
version("0.2.1", sha256="baac8de392e6c2a73a535f71596f51d4a80a08d9c0ecbf9a2d72d1d70dd17999")
+ depends_on("cxx", type="build") # generated
+
#
# Variants
#
@@ -66,10 +68,10 @@ class Krims(CMakePackage):
args = [
"-DAUTOCHECKOUT_MISSING_REPOS=OFF",
#
- "-DBUILD_SHARED_LIBS=" + str("+shared" in spec),
+ "-DBUILD_SHARED_LIBS=" + str(spec.satisfies("+shared")),
# TODO Hard-disable tests for now, since rapidcheck not in Spack
"-DKRIMS_ENABLE_TESTS=OFF",
- "-DKRIMS_ENABLE_EXAMPLES=" + str("+examples" in spec),
+ "-DKRIMS_ENABLE_EXAMPLES=" + str(spec.satisfies("+examples")),
]
return args
diff --git a/var/spack/repos/builtin/packages/kripke/001-remove-googletest-from-cmake.patch b/var/spack/repos/builtin/packages/kripke/001-remove-googletest-from-cmake.patch
new file mode 100644
index 0000000000..9e54cedc6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kripke/001-remove-googletest-from-cmake.patch
@@ -0,0 +1,25 @@
+
+m aa630efbd686c8581bb893b512dbf1613e1e574d Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Thu, 20 Jun 2024 18:40:02 +0000
+Subject: [PATCH] Comment out googletest folder
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f9bff0..3059e26 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -64,7 +64,7 @@ endif()
+ #
+ # Add googletest (needed by RAJA, etc)
+ #
+-add_subdirectory(tpl/googletest)
++# add_subdirectory(tpl/googletest)
+
+
+ #
+--
+2.31.1
diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py
index 8c41fbc940..2cfabaed50 100644
--- a/var/spack/repos/builtin/packages/kripke/package.py
+++ b/var/spack/repos/builtin/packages/kripke/package.py
@@ -22,6 +22,15 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop", submodules=False)
version(
+ "1.2.7", submodules=True, tag="v1.2.7", commit="ddcac43cdad999f0346eb682065ef0af1847029d"
+ )
+ version(
+ "1.2.6", submodules=True, tag="v1.2.6", commit="55b39f34b68c68b2d828a33a75568abd66e1019f"
+ )
+ version(
+ "1.2.5", submodules=True, tag="v1.2.5", commit="20e9ea975f1bf567829323a18927b69bed3f4ebd"
+ )
+ version(
"1.2.4", submodules=False, tag="v1.2.4", commit="d85c6bc462f17a2382b11ba363059febc487f771"
)
version(
@@ -46,6 +55,10 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
commit="67e4b0a2f092009d61f44b5122111d388a3bec2a",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI.")
variant("openmp", default=False, description="Build with OpenMP enabled.")
variant("caliper", default=False, description="Build with Caliper support enabled.")
@@ -53,11 +66,28 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
depends_on("mpi", when="+mpi")
depends_on("blt", type="build")
depends_on("caliper", when="+caliper")
+ depends_on("adiak@0.4:", when="+caliper")
depends_on("chai~examples+raja")
- depends_on("raja~exercises~examples")
+ depends_on("raja@:2024.02.1~exercises~examples")
depends_on("umpire~examples")
+
+ with when("+rocm @1.2.5:"):
+ depends_on("raja+rocm", when="+rocm")
+ depends_on("chai+rocm", when="+rocm")
+ for arch in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "raja+rocm amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)
+ )
+ depends_on(
+ "chai+rocm amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)
+ )
+
conflicts("^blt@:0.3.6", when="+rocm")
+ # googletest folder version hasn't been updated in over 5 years
+ # and is commented out in later releases
+ patch("001-remove-googletest-from-cmake.patch", when="@1.2.5:1.2.6")
+
def cmake_args(self):
spec = self.spec
args = []
@@ -73,17 +103,18 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
]
)
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
args.append("-DENABLE_CALIPER=ON")
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append("-DENABLE_MPI=ON")
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
# Set up the hip macros needed by the build
args.append("-DENABLE_HIP=ON")
args.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix))
+ args.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
rocm_archs = spec.variants["amdgpu_target"].value
if "none" not in rocm_archs:
args.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(",".join(rocm_archs)))
@@ -92,7 +123,7 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
# Ensure build with hip is disabled
args.append("-DENABLE_HIP=OFF")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("-DENABLE_CUDA=ON")
args.append(self.define("CMAKE_CUDA_HOST_COMPILER", self.spec["mpi"].mpicxx))
if not spec.satisfies("cuda_arch=none"):
@@ -112,4 +143,7 @@ class Kripke(CMakePackage, CudaPackage, ROCmPackage):
# Kripke does not provide install target, so we have to copy
# things into place.
mkdirp(prefix.bin)
- install(join_path(self.build_directory, "kripke.exe"), prefix.bin)
+ if spec.satisfies("@:1.2.4") or spec.satisfies("@1.2.7:"):
+ install(join_path(self.build_directory, "kripke.exe"), prefix.bin)
+ else:
+ install(join_path(self.build_directory, "bin", "kripke.exe"), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/kubectl/package.py b/var/spack/repos/builtin/packages/kubectl/package.py
index 786a948c81..f5d03af3fa 100644
--- a/var/spack/repos/builtin/packages/kubectl/package.py
+++ b/var/spack/repos/builtin/packages/kubectl/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Kubectl(Package):
+class Kubectl(GoPackage):
"""
Kubectl is a command-line interface for Kubernetes clusters.
"""
@@ -18,16 +18,12 @@ class Kubectl(Package):
license("Apache-2.0")
+ version("1.31.1", sha256="83094915698a9c24f93d1ffda3f17804a4024d3b65eabf681e77a62b35137208")
+ version("1.31.0", sha256="6679eb90815cc4c3bef6c1b93f7a8451bf3f40d003f45ab57fdc9f8c4e8d4b4f")
version("1.27.1", sha256="3a3f7c6b8cf1d9f03aa67ba2f04669772b1205b89826859f1636062d5f8bec3f")
version("1.27.0", sha256="536025dba2714ee5e940bb0a6b1df9ca97c244fa5b00236e012776a69121c323")
depends_on("bash", type="build")
- depends_on("go", type="build")
+ depends_on("go@1.22:", type="build", when="@1.30:")
- phases = ["build", "install"]
-
- def build(self, spec, prefix):
- make("-f", "build/root/Makefile", "WHAT=cmd/kubectl")
-
- def install(self, spec, prefix):
- install_tree("_output/bin", prefix.bin)
+ build_directory = "cmd/kubectl"
diff --git a/var/spack/repos/builtin/packages/kubernetes/package.py b/var/spack/repos/builtin/packages/kubernetes/package.py
index 84ba7935c4..02be4abf8d 100644
--- a/var/spack/repos/builtin/packages/kubernetes/package.py
+++ b/var/spack/repos/builtin/packages/kubernetes/package.py
@@ -40,6 +40,8 @@ class Kubernetes(Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("bash", type="build")
depends_on("go", type="build")
diff --git a/var/spack/repos/builtin/packages/kumi/package.py b/var/spack/repos/builtin/packages/kumi/package.py
index 2ccd22dbbb..45825157ac 100644
--- a/var/spack/repos/builtin/packages/kumi/package.py
+++ b/var/spack/repos/builtin/packages/kumi/package.py
@@ -21,3 +21,5 @@ class Kumi(CMakePackage):
version("2.1", sha256="34fc756780d463db35716e40eecd89b1505917926281262c74af425556a5260c")
version("2.0", sha256="c9f2d2014d3513c57db4457c5a678c7adce1fa9bd061ee008847876f06dac355")
version("1.0", sha256="d28be244e326b1c9f1651b47728af74bb6be80a7accd39f07441a246d49220f5")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/kvasir-mpl/package.py b/var/spack/repos/builtin/packages/kvasir-mpl/package.py
index d1627d064c..bd73a3be8f 100644
--- a/var/spack/repos/builtin/packages/kvasir-mpl/package.py
+++ b/var/spack/repos/builtin/packages/kvasir-mpl/package.py
@@ -17,5 +17,7 @@ class KvasirMpl(Package):
version("develop", branch="development")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree("src", prefix.include)
diff --git a/var/spack/repos/builtin/packages/kvtree/package.py b/var/spack/repos/builtin/packages/kvtree/package.py
index 042c5a7591..86126ec57a 100644
--- a/var/spack/repos/builtin/packages/kvtree/package.py
+++ b/var/spack/repos/builtin/packages/kvtree/package.py
@@ -20,6 +20,7 @@ class Kvtree(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("1.5.0", sha256="9617948bdb905615aeb0604d4998d92eb970ecd5c9c851116266972462f0b350")
version("1.4.0", sha256="48a36fd578f0d1198a9c1512d6446c830b915ace5bb97539eec615495bee5a51")
version("1.3.0", sha256="8281e075772d3534183c46133553d5765455d79ed98a895743663db891755ca9")
version("1.2.0", sha256="ecd4b8bc479c33ab4f23fc764445a3bb353a1d15c208d011f5577a32c182477f")
@@ -28,6 +29,9 @@ class Kvtree(CMakePackage):
version("1.0.3", sha256="c742cdb1241ef4cb13767019204d5350a3c4383384bed9fb66680b93ff44b0d4")
version("1.0.2", sha256="56fb5b747758c24a907a8380e8748d296900d94de9547bc15f6b427ac4ae2ec4")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("zlib-api", type="link")
variant("mpi", default=True, description="Build with MPI message packing")
@@ -53,15 +57,12 @@ class Kvtree(CMakePackage):
spec = self.spec
args = []
args.append(self.define_from_variant("MPI"))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define_from_variant("KVTREE_FILE_LOCK", "file_lock"))
if spec.satisfies("@1.2.0:"):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("KVTREE_LINK_STATIC", True))
return args
diff --git a/var/spack/repos/builtin/packages/kylin/package.py b/var/spack/repos/builtin/packages/kylin/package.py
index 623b23273e..4d4e3df591 100644
--- a/var/spack/repos/builtin/packages/kylin/package.py
+++ b/var/spack/repos/builtin/packages/kylin/package.py
@@ -23,4 +23,6 @@ class Kylin(MavenPackage):
version("3.1.0", sha256="84073ff16a0dad6e0611fea9fbf2b977b6bac307107a222b7f576a3a3b712157")
+ depends_on("cxx", type="build") # generated
+
depends_on("java@8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/kyotocabinet/package.py b/var/spack/repos/builtin/packages/kyotocabinet/package.py
index 2afa1f7b15..684cbbd2d4 100644
--- a/var/spack/repos/builtin/packages/kyotocabinet/package.py
+++ b/var/spack/repos/builtin/packages/kyotocabinet/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -19,4 +18,17 @@ class Kyotocabinet(AutotoolsPackage):
version("1.2.80", sha256="4c85d736668d82920bfdbdb92ac3d66b7db1108f09581a769dd9160a02def349")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api@1.2.3:", type=("build", "link"))
+ depends_on("lzo", type=("build", "link"))
+ depends_on("xz", type=("build", "link"))
+
+ def configure_args(self):
+ args = []
+
+ args.append("--enable-lzo")
+ args.append("--enable-lzma")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/laghos/package.py b/var/spack/repos/builtin/packages/laghos/package.py
index de5a4f09c7..0c3b59cc40 100644
--- a/var/spack/repos/builtin/packages/laghos/package.py
+++ b/var/spack/repos/builtin/packages/laghos/package.py
@@ -30,6 +30,8 @@ class Laghos(MakefilePackage):
version("1.1", sha256="53b9bfe2af263c63eb4544ca1731dd26f40b73a0d2775a9883db51821bf23b7f")
version("1.0", sha256="af50a126355a41c758fcda335a43fdb0a3cd97e608ba51c485afda3dd84a5b34")
+ depends_on("cxx", type="build") # generated
+
variant("metis", default=True, description="Enable/disable METIS support")
variant("ofast", default=False, description="Enable gcc optimization flags")
@@ -44,6 +46,13 @@ class Laghos(MakefilePackage):
# Recommended mfem version for laghos v1.x is: ^mfem@3.3.1-laghos-v1.0
depends_on("mfem@3.3.1-laghos-v1.0", when="@1.0,1.1")
+ # Replace MPI_Session
+ patch(
+ "https://github.com/CEED/Laghos/commit/c800883ab2741c8c3b99486e7d8ddd8e53a7cb95.patch?full_index=1",
+ sha256="e783a71c3cb36886eb539c0f7ac622883ed5caf7ccae597d545d48eaf051d15d",
+ when="@3.1 ^mfem@4.4:",
+ )
+
@property
def build_targets(self):
targets = []
@@ -54,7 +63,7 @@ class Laghos(MakefilePackage):
targets.append("TEST_MK=%s" % spec["mfem"].package.test_mk)
if spec.satisfies("@:2.0"):
targets.append("CXX=%s" % spec["mpi"].mpicxx)
- if "+ofast %gcc" in self.spec:
+ if self.spec.satisfies("+ofast %gcc"):
targets.append("CXXFLAGS = -Ofast -finline-functions")
return targets
diff --git a/var/spack/repos/builtin/packages/lame/package.py b/var/spack/repos/builtin/packages/lame/package.py
index 3f0625c973..5c6a4115dd 100644
--- a/var/spack/repos/builtin/packages/lame/package.py
+++ b/var/spack/repos/builtin/packages/lame/package.py
@@ -10,13 +10,16 @@ class Lame(AutotoolsPackage):
"""LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed
under the LGPL."""
- homepage = "http://lame.sourceforge.net/"
+ homepage = "https://lame.sourceforge.net/"
url = "https://download.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz"
license("LGPL-2.0-or-later")
version("3.100", sha256="ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("nasm", type="build")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/lammps-example-plugin/package.py b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py
new file mode 100644
index 0000000000..4233b0da2b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py
@@ -0,0 +1,79 @@
+# Copyright 2013-2024 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 datetime as dt
+
+from spack.package import *
+from spack.pkg.builtin.lammps import Lammps
+
+
+class LammpsExamplePlugin(CMakePackage):
+ """LAMMPS Example Plugin"""
+
+ homepage = "https://www.lammps.org/"
+ url = "https://github.com/lammps/lammps/archive/patch_1Sep2017.tar.gz"
+ git = "https://github.com/lammps/lammps.git"
+
+ maintainers("rbberger")
+
+ license("GPL-2.0-only")
+
+ # rules for new versions and deprecation
+ # * new stable versions should be added to stable_versions set
+ # * a stable version that has updates and any of its outdated update releases should be
+ # marked deprecated=True
+ # * patch releases older than a stable release should be marked deprecated=True
+ version("develop", branch="develop")
+ version(
+ "20240829",
+ sha256="6112e0cc352c3140a4874c7f74db3c0c8e30134024164509ecf3772b305fde2e",
+ preferred=True,
+ )
+ version("20240627", sha256="2174a99d266279823a8c57629ee1c21ec357816aefd85f964d9f859fe9222aa5")
+ version("20240417", sha256="158b288725c251fd8b30dbcf61749e0d6a042807da92af865a7d3c413efdd8ea")
+ version(
+ "20240207.1", sha256="3ba62c2a1ed463fceedf313a1c3ea2997994aa102379a8d35b525ea424f56776"
+ )
+ version(
+ "20240207",
+ sha256="d518f32de4eb2681f2543be63926411e72072dd7d67c1670c090b5baabed98ac",
+ deprecated=True,
+ )
+ version("20231121", sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1")
+ version(
+ "20230802.4", sha256="6eed007cc24cda80b5dd43372b2ad4268b3982bb612669742c8c336b79137b5b"
+ )
+ version(
+ "20230802.3", sha256="6666e28cb90d3ff01cbbda6c81bdb85cf436bbb41604a87f2ab2fa559caa8510"
+ )
+
+ depends_on("cxx", type="build")
+
+ def url_for_version(self, version):
+ split_ver = str(version).split(".")
+ vdate = dt.datetime.strptime(split_ver[0], "%Y%m%d")
+ if len(split_ver) < 2:
+ update = ""
+ else:
+ update = "_update{0}".format(split_ver[1])
+
+ return "https://github.com/lammps/lammps/archive/{0}_{1}{2}.tar.gz".format(
+ "stable" if str(version) in Lammps.stable_versions else "patch",
+ vdate.strftime("%d%b%Y").lstrip("0"),
+ update,
+ )
+
+ depends_on("lammps+plugin+lib+openmp-package")
+
+ root_cmakelists_dir = "examples/plugins"
+
+ def patch(self):
+ with open("examples/plugins/CMakeLists.txt", "a") as f:
+ print("include(GNUInstallDirs)", file=f)
+ print(
+ "install(TARGETS morse2plugin nve2plugin helloplugin zero2plugin morse2plugin "
+ "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/lammps/plugins)",
+ file=f,
+ )
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index ce760e817f..6b8287b49c 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -5,8 +5,8 @@
import datetime as dt
import os
-import archspec
-
+from spack.build_environment import optimization_flags
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -23,7 +23,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
maintainers("rbberger")
- license("GPL-2.0-or-later")
+ license("GPL-2.0-only")
# rules for new versions and deprecation
# * new stable versions should be added to stable_versions set
@@ -31,11 +31,58 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
# marked deprecated=True
# * patch releases older than a stable release should be marked deprecated=True
version("develop", branch="develop")
- version("20231121", sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1")
+ version(
+ "20240829.1",
+ sha256="3aea41869aa2fb8120fc4814cab645686f969e2eb7c66aa5587e500597d482dc",
+ preferred=True,
+ )
+ version(
+ "20240829",
+ sha256="6112e0cc352c3140a4874c7f74db3c0c8e30134024164509ecf3772b305fde2e",
+ deprecated=True,
+ )
+ version(
+ "20240627",
+ sha256="2174a99d266279823a8c57629ee1c21ec357816aefd85f964d9f859fe9222aa5",
+ deprecated=True,
+ )
+ version(
+ "20240417",
+ sha256="158b288725c251fd8b30dbcf61749e0d6a042807da92af865a7d3c413efdd8ea",
+ deprecated=True,
+ )
+ version(
+ "20240207.1",
+ sha256="3ba62c2a1ed463fceedf313a1c3ea2997994aa102379a8d35b525ea424f56776",
+ deprecated=True,
+ )
+ version(
+ "20240207",
+ sha256="d518f32de4eb2681f2543be63926411e72072dd7d67c1670c090b5baabed98ac",
+ deprecated=True,
+ )
+ version(
+ "20231121",
+ sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1",
+ deprecated=True,
+ )
+ version(
+ "20230802.4", sha256="6eed007cc24cda80b5dd43372b2ad4268b3982bb612669742c8c336b79137b5b"
+ )
+ version(
+ "20230802.3",
+ sha256="6666e28cb90d3ff01cbbda6c81bdb85cf436bbb41604a87f2ab2fa559caa8510",
+ deprecated=True,
+ )
+ version(
+ "20230802.2",
+ sha256="3bcecabc9cad08d0a4e4d989b52d29c58505f7ead8ebacf43c9db8d9fd3d564a",
+ deprecated=True,
+ )
version(
"20230802.1",
sha256="0e5568485e5ee080412dba44a1b7a93f864f1b5c75121f11d528854269953ed0",
- preferred=True,
+ deprecated=True,
)
version(
"20230802",
@@ -351,7 +398,22 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
deprecated=True,
)
+ depends_on("cxx", type="build")
+
+ # mdi, scafacos, ml-quip, qmmm require C, but not available in Spack
+ for c_pkg in ("adios", "atc", "awpmd", "ml-pod", "electrode", "kim", "h5md", "tools", "rheo"):
+ depends_on("c", type="build", when=f"+{c_pkg}")
+
+ # scafacos, ml-quip require Fortran, but not available in Spack
+ for fc_pkg in ("kim",):
+ depends_on("fortran", type="build", when=f"+{fc_pkg}")
+
stable_versions = {
+ "20240829.1",
+ "20240829",
+ "20230802.4",
+ "20230802.3",
+ "20230802.2",
"20230802.1",
"20230802",
"20220623.4",
@@ -443,6 +505,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
"ml-pod": {"when": "@20221222:"},
"ml-rann": {"when": "@20210702:"},
"ml-snap": {"when": "@20210702:"},
+ "ml-uf3": {"when": "@20240627:"},
"mliap": {"when": "@20200630:20210527"},
"mofff": {"when": "@20210702:"},
"molecule": {"default": True},
@@ -464,6 +527,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
"reaction": {"when": "@20210702:"},
"reax": {"when": "@:20181212"},
"reaxff": {"when": "@20210702:"},
+ "rheo": {"when": "@20240829:"},
"replica": {},
"rigid": {"default": True},
"shock": {},
@@ -538,6 +602,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
variant("jpeg", default=False, description="Build with jpeg support")
variant("png", default=False, description="Build with png support")
variant("ffmpeg", default=False, description="Build with ffmpeg support")
+ variant("curl", default=False, description="Build with curl support", when="@20240829:")
variant("openmp", default=True, description="Build with OpenMP")
variant("opencl", default=False, description="Build with OpenCL")
variant(
@@ -570,6 +635,29 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
multi=False,
)
variant(
+ "fft",
+ default="fftw3",
+ when="+kspace",
+ description="FFT library for KSPACE package",
+ values=("kiss", "fftw3", "mkl"),
+ multi=False,
+ )
+ variant(
+ "heffte",
+ default=False,
+ when="+kspace @20240207:",
+ description="Use heffte as distubuted FFT engine",
+ )
+
+ variant(
+ "fft_kokkos",
+ default="fftw3",
+ when="@20240417: +kspace+kokkos",
+ description="FFT library for Kokkos-enabled KSPACE package",
+ values=("kiss", "fftw3", "mkl", "hipfft", "cufft"),
+ multi=False,
+ )
+ variant(
"gpu_precision",
default="mixed",
when="~kokkos",
@@ -577,13 +665,20 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
values=("double", "mixed", "single"),
multi=False,
)
+ variant("tools", default=False, description="Build LAMMPS tools (msi2lmp, binary2txt, chain)")
- depends_on("cmake@3.16:", when="@20231121:")
+ depends_on("cmake@3.16:", when="@20231121:", type="build")
depends_on("mpi", when="+mpi")
depends_on("mpi", when="+mpiio")
- depends_on("fftw-api@3", when="+kspace")
- depends_on("hipfft", when="+kspace+kokkos+rocm")
- depends_on("voropp+pic", when="+voronoi")
+ depends_on("fftw-api@3", when="+kspace fft=fftw3")
+ depends_on("heffte", when="+heffte")
+ depends_on("heffte+fftw", when="+heffte fft=fftw3")
+ depends_on("heffte+mkl", when="+heffte fft=mkl")
+ depends_on("mkl", when="+kspace fft=mkl")
+ depends_on("hipfft", when="+kokkos+kspace+rocm fft_kokkos=hipfft")
+ depends_on("fftw-api@3", when="+kokkos+kspace fft_kokkos=fftw3")
+ depends_on("mkl", when="+kokkos+kspace fft_kokkos=mkl")
+ depends_on("voropp", when="+voronoi")
depends_on("netcdf-c+mpi", when="+user-netcdf")
depends_on("netcdf-c+mpi", when="+netcdf")
depends_on("blas", when="+user-atc")
@@ -607,11 +702,14 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
depends_on("jpeg", when="+jpeg")
depends_on("kim-api", when="+kim")
depends_on("curl", when="@20190329:+kim")
+ depends_on("curl", when="+curl")
depends_on("libpng", when="+png")
depends_on("ffmpeg", when="+ffmpeg")
depends_on("kokkos+deprecated_code+shared@3.0.00", when="@20200303+kokkos")
depends_on("kokkos+shared@3.1:", when="@20200505:+kokkos")
depends_on("kokkos@3.7.01:", when="@20230208: +kokkos")
+ depends_on("kokkos@4.3.00:", when="@20240417: +kokkos")
+ depends_on("kokkos@4.3.01:", when="@20240627: +kokkos")
depends_on("adios2", when="+user-adios")
depends_on("adios2", when="+adios")
depends_on("plumed", when="+user-plumed")
@@ -626,13 +724,16 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
depends_on("py-numpy", when="+python", type=("build", "run"))
depends_on("py-mpi4py", when="+python+mpi", type=("build", "run"))
depends_on("py-setuptools@42:", when="@20220217:+python", type=("build", "run"))
- depends_on("n2p2@2.1.4:", when="+user-hdnnp")
- depends_on("n2p2@2.1.4:", when="+ml-hdnnp")
- depends_on("n2p2+shared", when="+lib ^n2p2")
+ for _n2p2_cond in ("+user-hdnnp", "+ml-hdnnp"):
+ with when(_n2p2_cond):
+ depends_on("n2p2@2.1.4:")
+ depends_on("n2p2+shared", when="+lib")
depends_on("vtk", when="+user-vtk")
depends_on("vtk", when="+vtk")
depends_on("hipcub", when="~kokkos +rocm")
- depends_on("llvm-amdgpu +openmp", when="+rocm +openmp", type="build")
+ depends_on("llvm-amdgpu ", when="+rocm", type="build")
+ depends_on("rocm-openmp-extras", when="+rocm +openmp", type="build")
+ depends_on("gsl@2.6:", when="+rheo")
# propagate CUDA and ROCm architecture when +kokkos
for arch in CudaPackage.cuda_arch_values:
@@ -651,7 +752,6 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
conflicts("+cuda", when="+opencl")
conflicts("+rocm", when="+opencl")
conflicts("+body", when="+poems@:20180628")
- conflicts("+latte", when="@:20170921")
conflicts("+python", when="~lib")
conflicts("+qeq", when="~manybody")
conflicts("+user-atc", when="~manybody")
@@ -701,6 +801,12 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
sha256="3dedd807f63a21c543d1036439099f05c6031fd98e7cb1ea7825822fc074106e",
when="@20220623.3:20230208 +kokkos +rocm +kspace",
)
+ # Fixed in https://github.com/lammps/lammps/pull/4305
+ patch(
+ "https://github.com/lammps/lammps/commit/49bdc3e26449634f150602a66d0dab34d09dbc0e.patch?full_index=1",
+ sha256="b8d1f08a82329e493e040de2bde9d2291af173a0fe6c7deb24750cc22823c421",
+ when="@20240829 %cce",
+ )
# Older LAMMPS does not compile with Kokkos 4.x
conflicts(
@@ -751,15 +857,16 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
self.define_from_variant("LAMMPS_EXCEPTIONS", "exceptions"),
self.define_from_variant("{}_MPI".format(mpi_prefix), "mpi"),
self.define_from_variant("BUILD_OMP", "openmp"),
+ self.define_from_variant("BUILD_TOOLS", "tools"),
self.define("ENABLE_TESTING", self.run_tests),
self.define("DOWNLOAD_POTENTIALS", False),
]
- if "~kokkos" in spec:
+ if spec.satisfies("~kokkos"):
# LAMMPS can be build with the GPU package OR the KOKKOS package
# Using both in a single build is discouraged.
# +cuda only implies that one of the two is used
# by default it will use the GPU package if kokkos wasn't enabled
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append(self.define("PKG_GPU", True))
args.append(self.define("GPU_API", "cuda"))
args.append(self.define_from_variant("GPU_PREC", "gpu_precision"))
@@ -767,19 +874,23 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
if cuda_arch != "none":
args.append(self.define("GPU_ARCH", "sm_{0}".format(cuda_arch[0])))
args.append(self.define_from_variant("CUDA_MPS_SUPPORT", "cuda_mps"))
- elif "+opencl" in spec:
+ elif spec.satisfies("+opencl"):
# LAMMPS downloads and bundles its own OpenCL ICD Loader by default
args.append(self.define("USE_STATIC_OPENCL_LOADER", False))
args.append(self.define("PKG_GPU", True))
args.append(self.define("GPU_API", "opencl"))
args.append(self.define_from_variant("GPU_PREC", "gpu_precision"))
- elif "+rocm" in spec:
+ elif spec.satisfies("+rocm"):
args.append(self.define("PKG_GPU", True))
args.append(self.define("GPU_API", "hip"))
args.append(self.define_from_variant("GPU_PREC", "gpu_precision"))
args.append(self.define_from_variant("HIP_ARCH", "amdgpu_target"))
else:
args.append(self.define("PKG_GPU", False))
+ else:
+ args.append(self.define("EXTERNAL_KOKKOS", True))
+ if spec.satisfies("@20240207: +kokkos+kspace"):
+ args.append(self.define_from_variant("FFT_KOKKOS", "fft_kokkos"))
if spec.satisfies("@20180629:+lib"):
args.append(self.define("BUILD_LIB", True))
@@ -787,22 +898,30 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
if spec.satisfies("%aocc"):
if spec.satisfies("+intel"):
cxx_flags = (
- "-Ofast -fno-math-errno -fno-unroll-loops "
+ "-O3 -fno-math-errno -fno-unroll-loops "
"-fveclib=AMDLIBM -muse-unaligned-vector-move"
)
+ if spec.satisfies("%aocc@4.1:4.2"):
+ cxx_flags += (
+ " -mllvm -force-gather-overhead-cost=50"
+ " -mllvm -enable-masked-gather-sequence=false"
+ )
+ elif spec.satisfies("%aocc@5.0:"):
+ cxx_flags += " -mllvm -enable-aggressive-gather"
+ if spec.target >= "zen5":
+ cxx_flags += " -fenable-restrict-based-lv"
+
# add -fopenmp-simd if OpenMP not already turned on
if spec.satisfies("~openmp"):
cxx_flags += " -fopenmp-simd"
cxx_flags += " -DLMP_SIMD_COMPILER -DUSE_OMP_SIMD -DLMP_INTEL_USELRT"
else:
- cxx_flags = "-Ofast -mfma -fvectorize -funroll-loops"
+ cxx_flags = "-O3 -mfma -fvectorize -funroll-loops"
args.append(self.define("CMAKE_CXX_FLAGS_RELEASE", cxx_flags))
args.append(self.define("CMAKE_CXX_FLAGS_RELWITHDEBINFO", cxx_flags))
# Overwrite generic cpu tune option
- cmake_tune_flags = archspec.cpu.TARGETS[spec.target.name].optimization_flags(
- spec.compiler.name, spec.compiler.version
- )
+ cmake_tune_flags = optimization_flags(self.compiler, spec.target)
args.append(self.define("CMAKE_TUNE_FLAGS", cmake_tune_flags))
args.append(self.define_from_variant("LAMMPS_SIZES", "lammps_sizes"))
@@ -810,21 +929,17 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
args.append(self.define_from_variant("WITH_JPEG", "jpeg"))
args.append(self.define_from_variant("WITH_PNG", "png"))
args.append(self.define_from_variant("WITH_FFMPEG", "ffmpeg"))
+ args.append(self.define_from_variant("WITH_CURL", "curl"))
for pkg, params in self.supported_packages.items():
if "when" not in params or spec.satisfies(params["when"]):
opt = "{0}_{1}".format(pkg_prefix, pkg.replace("-package", "").upper())
args.append(self.define(opt, "+{0}".format(pkg) in spec))
- if "+kspace" in spec:
- # If FFTW3 is selected, then CMake will try to detect, if threaded
- # FFTW libraries are available and enable them by default.
- if "^fftw" in spec or "^cray-fftw" in spec or "^amdfftw" in spec:
- args.append(self.define("FFT", "FFTW3"))
- elif spec["fftw-api"].name in INTEL_MATH_LIBRARIES:
- args.append(self.define("FFT", "MKL"))
- elif "^armpl-gcc" in spec or "^acfl" in spec:
- args.append(self.define("FFT", "FFTW3"))
+ if spec.satisfies("+kspace"):
+ args.append(self.define_from_variant("FFT", "fft"))
+ args.append(self.define_from_variant("FFT_USE_HEFFTE", "heffte"))
+ if spec.satisfies("fft=fftw3 ^armpl-gcc") or spec.satisfies("fft=fftw3 ^acfl"):
args.append(self.define("FFTW3_LIBRARY", self.spec["fftw-api"].libs[0]))
args.append(
self.define("FFTW3_INCLUDE_DIR", self.spec["fftw-api"].headers.directories[0])
@@ -834,28 +949,28 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
# for transposing 3d FFT data.
args.append(self.define("FFT_SINGLE", spec.satisfies("fftw_precision=single")))
- if "+kokkos" in spec:
- args.append(self.define("EXTERNAL_KOKKOS", True))
- if "+user-adios" in spec or "+adios" in spec:
+ if spec.satisfies("+user-adios") or spec.satisfies("+adios"):
args.append(self.define("ADIOS2_DIR", self.spec["adios2"].prefix))
- if "+user-plumed" in spec or "+plumed" in spec:
+ if spec.satisfies("+user-plumed") or spec.satisfies("+plumed"):
args.append(self.define("DOWNLOAD_PLUMED", False))
if "+shared" in self.spec["plumed"]:
args.append(self.define("PLUMED_MODE", "shared"))
else:
args.append(self.define("PLUMED_MODE", "static"))
- if "+user-smd" in spec or "+machdyn" in spec:
+ if spec.satisfies("+user-smd") or spec.satisfies("+machdyn"):
args.append(self.define("DOWNLOAD_EIGEN3", False))
args.append(self.define("EIGEN3_INCLUDE_DIR", self.spec["eigen"].prefix.include))
- if "+user-hdnnp" in spec or "+ml-hdnnp" in spec:
+ if spec.satisfies("+user-hdnnp") or spec.satisfies("+ml-hdnnp"):
args.append(self.define("DOWNLOAD_N2P2", False))
args.append(self.define("N2P2_DIR", self.spec["n2p2"].prefix))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
-
- if "+python" in spec:
- args.append(self.define("Python_EXECUTABLE", spec["python"].command.path))
+ if spec.satisfies("@:20231121"):
+ if spec.satisfies("^hip@:5.4"):
+ args.append(self.define("HIP_PATH", f"{spec['hip'].prefix}/hip"))
+ elif spec.satisfies("^hip@5.5:"):
+ args.append(self.define("HIP_PATH", spec["hip"].prefix))
return args
@@ -865,13 +980,21 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
def setup_run_environment(self, env):
env.set("LAMMPS_POTENTIALS", self.prefix.share.lammps.potentials)
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
if self.spec.platform == "darwin":
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", self.prefix.lib)
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", self.prefix.lib64)
else:
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib64)
+ if self.spec.satisfies("+plugin"):
+ env.prepend_path("LAMMPS_PLUGIN_PATH", self.prefix.lib.lammps.plugins)
+ env.prepend_path("LAMMPS_PLUGIN_PATH", self.prefix.lib64.lammps.plugins)
+
+ @run_after("install")
+ def make_plugins_directories(self):
+ os.makedirs(self.prefix.lib.lammps.plugins, exist_ok=True)
+ os.makedirs(self.prefix.lib64.lammps.plugins, exist_ok=True)
@run_after("install")
def install_python(self):
@@ -881,5 +1004,4 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
os.environ["LAMMPS_VERSION_FILE"] = join_path(
self.stage.source_path, "src", "version.h"
)
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/landsfcutil/package.py b/var/spack/repos/builtin/packages/landsfcutil/package.py
index a854f0b859..c137cb2e90 100644
--- a/var/spack/repos/builtin/packages/landsfcutil/package.py
+++ b/var/spack/repos/builtin/packages/landsfcutil/package.py
@@ -19,8 +19,19 @@ class Landsfcutil(CMakePackage):
maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
version("develop", branch="develop")
+ version("2.4.2", sha256="ac0ee4edaab3d273d9a6acffea8aa8a5b363366c3ade3e32539c057e84e4fa73")
version("2.4.1", sha256="831c5005a480eabe9a8542b4deec838c2650f6966863ea2711cc0cc5db51ca14")
+ depends_on("fortran", type="build")
+
+ depends_on("pfunit", type="test")
+
+ conflicts("%oneapi", when="@:2.4.1", msg="Requires @2.4.2: for Intel oneAPI")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
+
def setup_run_environment(self, env):
for suffix in ("4", "d"):
lib = find_libraries(
@@ -35,3 +46,7 @@ class Landsfcutil(CMakePackage):
if name == "fflags":
flags.append("-Free")
return (None, None, flags)
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/lapackpp/package.py b/var/spack/repos/builtin/packages/lapackpp/package.py
index 83b726c614..7e3577aa28 100644
--- a/var/spack/repos/builtin/packages/lapackpp/package.py
+++ b/var/spack/repos/builtin/packages/lapackpp/package.py
@@ -11,6 +11,9 @@ from spack.package import *
_versions = [
# LAPACK++, BLAS++
["master", "master"],
+ ["2024.10.26", "2024.10.26"],
+ ["2024.05.31", "2024.05.31"],
+ ["2023.11.05", "2023.11.05"],
["2023.08.25", "2023.08.25"],
["2023.06.00", "2023.06.00"],
["2022.07.00", "2022.07.00"],
@@ -36,6 +39,15 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version(
+ "2024.10.26", sha256="67f81f585a7ac89b779c79297cab75cc23d2492cb5055c2348381ebdb751821d"
+ )
+ version(
+ "2024.05.31", sha256="093646d492a4c2c6b4d7001effb559c80da7fa31fd5ba517a6d686ca8c78cd99"
+ )
+ version(
+ "2023.11.05", sha256="9a505ef4e76504b6714cc19eb1b58939694f9ab51427a5bb915b016d615570ca"
+ )
+ version(
"2023.08.25", sha256="9effdd616a4a183a9b37c2ad33c85ddd3d6071b183e8c35e02243fbaa7333d4d"
)
version(
@@ -60,6 +72,8 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage):
"2020.10.00", sha256="5f6ab3bd3794711818a3a50198efd29571520bf455e13ffa8ba50fa8376d7d1a"
)
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared library")
variant("sycl", default=False, description="Build support for the SYCL backend")
@@ -94,15 +108,15 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage):
backend = "none"
if self.version >= Version("2022.07.00"):
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
backend = "cuda"
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
backend = "hip"
- if "+sycl" in spec:
+ if spec.satisfies("+sycl"):
backend = "sycl"
args = [
- "-DBUILD_SHARED_LIBS=%s" % ("+shared" in spec),
+ "-DBUILD_SHARED_LIBS=%s" % spec.satisfies("+shared"),
"-Dbuild_tests=%s" % self.run_tests,
"-DLAPACK_LIBRARIES=%s" % spec["lapack"].libs.joined(";"),
"-Dgpu_backend=%s" % backend,
@@ -115,8 +129,8 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage):
def check(self):
# If the tester fails to build, ensure that the check() fails.
- if os.path.isfile(join_path(self.builder.build_directory, "test", "tester")):
- with working_dir(self.builder.build_directory):
+ if os.path.isfile(join_path(self.build_directory, "test", "tester")):
+ with working_dir(self.build_directory):
make("check")
else:
raise Exception("The tester was not built!")
diff --git a/var/spack/repos/builtin/packages/last/package.py b/var/spack/repos/builtin/packages/last/package.py
index bbc2e87a22..a5419d8193 100644
--- a/var/spack/repos/builtin/packages/last/package.py
+++ b/var/spack/repos/builtin/packages/last/package.py
@@ -22,6 +22,9 @@ class Last(MakefilePackage):
version("1282", commit="4368be912f4759e52b549940276f1adf087f489a")
version("869", sha256="6371a6282bc1bb02a5e5013cc463625f2ce3e7746ff2ea0bdf9fe6b15605a67c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/lastz/package.py b/var/spack/repos/builtin/packages/lastz/package.py
index 6f366e74b7..d570d32c24 100644
--- a/var/spack/repos/builtin/packages/lastz/package.py
+++ b/var/spack/repos/builtin/packages/lastz/package.py
@@ -19,6 +19,8 @@ class Lastz(MakefilePackage):
version("1.04.03", sha256="c58ed8e37c4b0e82492b3a2b3e12447a3c40286fb8358906d19f10b0a713e9f4")
version("1.04.00", sha256="a4c2c7a77430387e96dbc9f5bdc75874334c672be90f5720956c0f211abf9f5a")
+ depends_on("c", type="build") # generated
+
# Ref: https://github.com/lastz/lastz/commit/20aa14f483265b4eac97f25aca666c708b9655e4
patch("sequences.c.patch", when="@:1.04.03")
diff --git a/var/spack/repos/builtin/packages/laszip/package.py b/var/spack/repos/builtin/packages/laszip/package.py
index b6d5d763c3..30a2a58bbb 100644
--- a/var/spack/repos/builtin/packages/laszip/package.py
+++ b/var/spack/repos/builtin/packages/laszip/package.py
@@ -16,3 +16,6 @@ class Laszip(CMakePackage):
version("3.4.3", sha256="53f546a7f06fc969b38d1d71cceb1862b4fc2c4a0965191a0eee81a57c7b373d")
version("3.4.1", sha256="5d9b0ffaf8b7319c2fa216da3f3f878bb8f4e5b4b14d2c154d441a351da2be37")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/latex2html/package.py b/var/spack/repos/builtin/packages/latex2html/package.py
index 18ea8babd2..a37e7a964c 100644
--- a/var/spack/repos/builtin/packages/latex2html/package.py
+++ b/var/spack/repos/builtin/packages/latex2html/package.py
@@ -13,7 +13,7 @@ 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"
+ url = "https://github.com/latex2html/latex2html/archive/refs/tags/v2024.tar.gz"
git = "https://github.com/latex2html/latex2html.git"
maintainers("cessenat")
@@ -21,6 +21,8 @@ class Latex2html(AutotoolsPackage):
license("GPL-2.0-only")
version("master", branch="master")
+ version("2024", sha256="554a51f83431683521b9e47a19edf07c90960feb040048a08ad8301bdca2c6fa")
+ version("2023.2", sha256="2a3f50621a71c9c0c425fb6709ae69bb2cf4df4bfe72ac661c2ea302e5aba185")
version("2022.2", sha256="b1d5bba7bab7d0369d1241f2d8294137a52b7cb7df11239bfa15ec0a2546c093")
version("2021", sha256="872fe7a53f91ababaafc964847639e3644f2b9fab3282ea059788e4e18cbba47")
version("2017", sha256="28a5d4b8f14b1f95928da281b6332559bcd83349ba439b2fa43655b2e21c83ab")
@@ -38,6 +40,9 @@ class Latex2html(AutotoolsPackage):
# Provides pdftocairo
depends_on("poppler+glib", type=("build", "run"), when="+svg")
+ def url_for_version(self, version):
+ return f"https://github.com/latex2html/latex2html/archive/refs/tags/v{version}.tar.gz"
+
# A copy of texlive function as long as it does not provide the
# bin env to dependent package:
def tex_arch(self):
@@ -114,7 +119,7 @@ class Latex2html(AutotoolsPackage):
exe = which(p)
if exe:
args.append("--with-{0}={1}".format(p, str(exe)))
- if "+svg" in spec:
+ if spec.satisfies("+svg"):
p = "pdftocairo"
exe = join_path(spec["poppler"].prefix.bin, p)
if os.path.exists(exe):
diff --git a/var/spack/repos/builtin/packages/latte/package.py b/var/spack/repos/builtin/packages/latte/package.py
index ca5605f724..19a9a49275 100644
--- a/var/spack/repos/builtin/packages/latte/package.py
+++ b/var/spack/repos/builtin/packages/latte/package.py
@@ -23,6 +23,9 @@ class Latte(CMakePackage):
version("1.2.1", sha256="a21dda5ebdcefa56e9ff7296d74ef03f89c200d2e110a02af7a84612668bf702")
version("1.0.1", sha256="67b2957639ad8e36b69bc6ea9a13085183a881562af9ca6d2b90b412ff073789")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with mpi")
variant("progress", default=False, description="Use progress for fast")
variant("shared", default=True, description="Build shared libs")
@@ -37,13 +40,13 @@ class Latte(CMakePackage):
def cmake_args(self):
options = []
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
options.append("-DBUILD_SHARED_LIBS=ON")
else:
options.append("-DBUILD_SHARED_LIBS=OFF")
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
options.append("-DO_MPI=yes")
- if "+progress" in self.spec:
+ if self.spec.satisfies("+progress"):
options.append("-DPROGRESS=yes")
blas_list = ";".join(self.spec["blas"].libs)
diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py
index 4ca7b03b1f..45f35f0eb3 100644
--- a/var/spack/repos/builtin/packages/launchmon/package.py
+++ b/var/spack/repos/builtin/packages/launchmon/package.py
@@ -23,6 +23,9 @@ class Launchmon(AutotoolsPackage):
)
version("1.0.2", sha256="1d301ccccfe0873efcd66da87ed5e4d7bafc560b00aee396d8a9365f53b3a33a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("libtool", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/laynii/package.py b/var/spack/repos/builtin/packages/laynii/package.py
new file mode 100644
index 0000000000..54332bd2ed
--- /dev/null
+++ b/var/spack/repos/builtin/packages/laynii/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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 glob
+
+from spack.package import *
+
+
+class Laynii(MakefilePackage):
+ """Stand alone fMRI software suite for layer-fMRI analyses."""
+
+ homepage = "https://layerfmri.com"
+ url = "https://github.com/layerfMRI/LAYNII/archive/refs/tags/v2.7.0.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("2.7.0", sha256="f0f45c6e80afaca1d89a4721dda70f152c175434e19358974a221ef9c713826b")
+
+ depends_on("cxx", type="build")
+
+ depends_on("zlib")
+
+ def edit(self, spec, prefix):
+ pass
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ for file in glob.glob("LN*"):
+ install(file, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/lazygit/package.py b/var/spack/repos/builtin/packages/lazygit/package.py
index de68d64575..7ef76106b8 100644
--- a/var/spack/repos/builtin/packages/lazygit/package.py
+++ b/var/spack/repos/builtin/packages/lazygit/package.py
@@ -17,4 +17,10 @@ class Lazygit(GoPackage):
license("MIT")
+ version("0.44.1", sha256="02b67d38e07ae89b0ddd3b4917bd0cfcdfb5e158ed771566d3eb81f97f78cc26")
+ version("0.41.0", sha256="f2176fa253588fe4b7118bf83f4316ae3ecb914ae1e99aad8c474e23cea49fb8")
version("0.40.2", sha256="146bd63995fcf2f2373bbc2143b3565b7a2be49a1d4e385496265ac0f69e4128")
+
+ depends_on("go@1.20:", type="build", when="@0.40:")
+ depends_on("go@1.21:", type="build", when="@0.41:")
+ depends_on("go@1.22:", type="build", when="@0.42:")
diff --git a/var/spack/repos/builtin/packages/lazyten/package.py b/var/spack/repos/builtin/packages/lazyten/package.py
index b155958a88..9b42672559 100644
--- a/var/spack/repos/builtin/packages/lazyten/package.py
+++ b/var/spack/repos/builtin/packages/lazyten/package.py
@@ -25,6 +25,8 @@ class Lazyten(CMakePackage):
version("develop", branch="master")
version("0.4.1", sha256="696d151382993c13d04516c77db3ea712a70e3cb449539b9e79abc78cf245ae4")
+ depends_on("cxx", type="build") # generated
+
#
# Variants
#
@@ -73,10 +75,10 @@ class Lazyten(CMakePackage):
args = [
"-DAUTOCHECKOUT_MISSING_REPOS=OFF",
#
- "-DBUILD_SHARED_LIBS=" + str("+shared" in spec),
+ "-DBUILD_SHARED_LIBS=" + str(spec.satisfies("+shared")),
# TODO Hard-disable tests for now, since rapidcheck not in Spack
"-DLAZYTEN_ENABLE_TESTS=OFF",
- "-DLAZYTEN_ENABLE_EXAMPLES=" + str("+examples" in spec),
+ "-DLAZYTEN_ENABLE_EXAMPLES=" + str(spec.satisfies("+examples")),
]
# Tell lazyten where to look for the krims cmake config
@@ -96,7 +98,7 @@ class Lazyten(CMakePackage):
]
)
- if "+arpack" in spec:
+ if spec.satisfies("+arpack"):
args.append("-DARPACK_DIR=" + spec["arpack-ng"].prefix)
args.append("-DARPACK_LIBRARY=" + ";".join(spec["arpack-ng"].libs))
diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py
index 482d591a1c..0686530d21 100644
--- a/var/spack/repos/builtin/packages/lbann/package.py
+++ b/var/spack/repos/builtin/packages/lbann/package.py
@@ -35,6 +35,8 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="Release",
@@ -224,7 +226,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("python@3: +shared", type=("build", "run"), when="+pfe")
extends("python", when="+pfe")
depends_on("py-setuptools", type="build", when="+pfe")
- depends_on("py-protobuf+cpp@3.10.0:4.21.12", type=("build", "run"), when="+pfe")
+ depends_on("py-protobuf@3.10.0:4.21.12", type=("build", "run"), when="+pfe")
depends_on("protobuf@3.10.0:3.21.12")
depends_on("zlib-api", when="^protobuf@3.11.0:")
@@ -264,7 +266,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
@property
def libs(self):
- shared = True if "+shared" in self.spec else False
+ shared = True if self.spec.satisfies("+shared") else False
return find_libraries("liblbann", root=self.prefix, shared=shared, recursive=True)
@property
@@ -284,7 +286,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super().initconfig_compiler_entries()
entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17"))
- entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
if not spec.satisfies("^cmake@3.23.0"):
# There is a bug with using Ninja generator in this version
# of CMake
@@ -296,7 +298,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append(cmake_cache_string("CMAKE_SHARED_LINKER_FLAGS", linker_flags))
# Use lld high performance linker
- if "+lld" in spec:
+ if spec.satisfies("+lld"):
entries.append(
cmake_cache_string(
"CMAKE_EXE_LINKER_FLAGS", "{0} -fuse-ld=lld".format(linker_flags)
@@ -309,7 +311,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
)
# Use gold high performance linker
- if "+gold" in spec:
+ if spec.satisfies("+gold"):
entries.append(
cmake_cache_string(
"CMAKE_EXE_LINKER_FLAGS", "{0} -fuse-ld=gold".format(linker_flags)
@@ -338,7 +340,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super().initconfig_hardware_entries()
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
if self.spec.satisfies("%clang"):
for flag in self.spec.compiler_flags["cxxflags"]:
if "gcc-toolchain" in flag:
@@ -357,10 +359,6 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
cmake_cache_string("CMAKE_CUDA_FLAGS", "-allow-unsupported-compiler")
)
- if "+rocm" in spec:
- if "platform=cray" in spec:
- entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True))
-
return entries
def initconfig_package_entries(self):
@@ -395,19 +393,17 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append(cmake_cache_option("LBANN_WITH_ALUMINUM", True))
entries.append(cmake_cache_option("LBANN_WITH_CONDUIT", True))
entries.append(cmake_cache_option("LBANN_WITH_HWLOC", True))
- entries.append(cmake_cache_option("LBANN_WITH_ROCTRACER", "+rocm +distconv" in spec))
+ entries.append(
+ cmake_cache_option("LBANN_WITH_ROCTRACER", spec.satisfies("+rocm +distconv"))
+ )
entries.append(cmake_cache_option("LBANN_WITH_TBINF", False))
entries.append(
cmake_cache_string("LBANN_DATATYPE", "{0}".format(spec.variants["dtype"].value))
)
entries.append(cmake_cache_option("protobuf_MODULE_COMPATIBLE", True))
- if spec.satisfies("^python") and "+pfe" in spec:
- entries.append(
- cmake_cache_path(
- "LBANN_PFE_PYTHON_EXECUTABLE", "{0}/python3".format(spec["python"].prefix.bin)
- )
- )
+ if spec.satisfies("+pfe ^python"):
+ entries.append(cmake_cache_path("LBANN_PFE_PYTHON_EXECUTABLE", python.path))
entries.append(
cmake_cache_string("LBANN_PFE_PYTHONPATH", env["PYTHONPATH"])
) # do NOT need to sub ; for : because
diff --git a/var/spack/repos/builtin/packages/lbfgspp/package.py b/var/spack/repos/builtin/packages/lbfgspp/package.py
index eef7277bd6..cdf3082dac 100644
--- a/var/spack/repos/builtin/packages/lbfgspp/package.py
+++ b/var/spack/repos/builtin/packages/lbfgspp/package.py
@@ -14,6 +14,9 @@ class Lbfgspp(CMakePackage):
license("MIT")
+ version("0.3.0", sha256="490720b9d5acce6459cb0336ca3ae0ffc48677225f0ebfb35c9bef6baefdfc6a")
version("0.2.0", sha256="7101744a538c3aff52e10c82267305847b0b5e9d39f9974b4b29812cd1398ff9")
+ depends_on("cxx", type="build") # generated
+
depends_on("eigen @3:")
diff --git a/var/spack/repos/builtin/packages/lbxproxy/package.py b/var/spack/repos/builtin/packages/lbxproxy/package.py
index 4e6765a9c6..122ddbc0c8 100644
--- a/var/spack/repos/builtin/packages/lbxproxy/package.py
+++ b/var/spack/repos/builtin/packages/lbxproxy/package.py
@@ -16,18 +16,20 @@ class Lbxproxy(AutotoolsPackage, XorgPackage):
extension, so this program is only useful in connecting to older
X servers."""
- homepage = "https://cgit.freedesktop.org/xorg/app/lbxproxy"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/lbxproxy"
xorg_mirror_path = "app/lbxproxy-1.0.3.tar.gz"
version("1.0.3", sha256="db36251c9656c7da720f31e10df384f8946a9a5395915371b60d9423ad8f6a80")
+ depends_on("c", type="build")
+
depends_on("libxext")
depends_on("liblbxutil")
depends_on("libx11")
depends_on("libice")
depends_on("xtrans")
- depends_on("xproxymanagementprotocol")
- depends_on("bigreqsproto")
+ depends_on("xproxymanagementprotocol", type="build")
+ depends_on("bigreqsproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/lc-framework/package.py b/var/spack/repos/builtin/packages/lc-framework/package.py
new file mode 100644
index 0000000000..0f9f1b1be2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lc-framework/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2024 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.build_systems.cmake import CMakeBuilder
+from spack.package import *
+
+
+def try_le(x, y):
+ try:
+ return int(x) < y
+ except ValueError:
+ False
+
+
+class LcFramework(CMakePackage, CudaPackage):
+ """a framework for automatically creating high-speed lossless and
+ error-bounded lossy data compression and decompression algorithms."""
+
+ homepage = "https://userweb.cs.txstate.edu/~burtscher/LC/"
+ url = "https://github.com/robertu94/LC-framework/archive/refs/tags/1.1.1.tar.gz"
+ git = "https://github.com/robertu94/LC-framework"
+
+ maintainers("robertu94")
+
+ version("1.2.2", sha256="957c5da99bca4cfe125486c11b4b7dc6e38f9a158261aff3cd545e47ad9894a6")
+ version("1.2.1", commit="98102fdaf443c968ab1bea5f006060b1e4f2d0e7")
+ version("1.2.0", commit="2d0f39a927c3487551e4f3c786c3799cada1e203")
+ version("1.1.2", sha256="5ccbeaf8e2ef93894854406054210c8525055d195b39e2f141b4f81175fe2815")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("libpressio", description="build a libpressio plugin for LC", default=False)
+ conflicts("+cuda", when="@:1.2.1")
+ for sm in [i for i in CudaPackage.cuda_arch_values if try_le(i, 60)]:
+ conflicts(
+ "cuda_arch={sm}".format(sm=sm), when="+cuda", msg="cuda_arch 60 or newer is required"
+ )
+
+ depends_on("python", type=("build",))
+ depends_on("libpressio@0.98.0:", when="+libpressio")
+ depends_on("libpressio+cuda", when="+cuda+libpressio")
+
+ def cmake_args(self):
+ args = [self.define_from_variant("LC_BUILD_LIBPRESSIO_PLUGIN", "libpressio")]
+ if self.spec.satisfies("+cuda"):
+ args.append(self.define_from_variant("LC_BUILD_CUDA", "cuda"))
+ args.append(CMakeBuilder.define_cuda_architectures(self))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/lcc/package.py b/var/spack/repos/builtin/packages/lcc/package.py
index 4ed9f48ee2..4fe7b4462f 100644
--- a/var/spack/repos/builtin/packages/lcc/package.py
+++ b/var/spack/repos/builtin/packages/lcc/package.py
@@ -24,6 +24,9 @@ class Lcc(CMakePackage):
version("1.0.1", sha256="fa13364dcdf3b1f8d80fc768f0e7ad3849f8d98091fb96926100a6764f836020")
version("1.0.0", sha256="750ce09e809a4e85ae3219fd537dc84a923fe3d3683b26b5d915eccfd1f0120c")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=False, description="Build shared libs")
depends_on("cmake@3.10:", type="build")
diff --git a/var/spack/repos/builtin/packages/lci/package.py b/var/spack/repos/builtin/packages/lci/package.py
new file mode 100644
index 0000000000..4a30ea36c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lci/package.py
@@ -0,0 +1,200 @@
+# Copyright 2013-2024 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.package import *
+
+
+def is_positive_int(val):
+ try:
+ return int(val) > 0
+ except ValueError:
+ return val == "auto"
+
+
+class Lci(CMakePackage):
+ """LCI: the Lightweight Communication Interface"""
+
+ homepage = "https://github.com/uiuc-hpc/lci"
+ url = "https://github.com/uiuc-hpc/lci/archive/refs/tags/v1.7.7.tar.gz"
+ git = "https://github.com/uiuc-hpc/lci.git"
+
+ maintainers("omor1", "JiakunYan")
+
+ license("MIT")
+
+ version("master", branch="master")
+ version("1.7.7", sha256="c310f699b7b4317a2f5c3557f85c240fe3c85d2d06618dd248434ef807d53779")
+ version("1.7.6", sha256="c88ccea2ad277ed38fc23187771b52b6fb212ed4429114717bfa8887ed21665c")
+ version("1.7.5", sha256="13e4084c9e7aaf55966ba5aa0423164b8fd21ee7526fc62017b3c9b3db99cb83")
+ version("1.7.4", sha256="00c6ef06bf90a02b55c72076dedf912580dcb1fb59fdc0e771d9e1a71283b72f")
+ version("1.7.3", sha256="3c47d51d4925e6700294ac060c88a73c26ca6e9df5b4010d0e90b0bf5e505040")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "fabric",
+ default="ibv",
+ values=("ofi", "ibv", "ucx"),
+ multi=False,
+ description="Communication fabric",
+ )
+
+ variant("examples", default=False, description="Build LCI examples")
+ variant("tests", default=False, description="Build LCI tests")
+ variant("benchmarks", default=False, description="Build LCI benchmarks")
+ variant("docs", default=False, description="Build LCI documentation")
+
+ variant(
+ "cache-line",
+ default="auto",
+ values=is_positive_int,
+ description="Cache line size, in bytes",
+ )
+
+ variant(
+ "multithread-progress",
+ default=True,
+ description="Enable thread-safe LCI_progress function",
+ )
+ variant("dreg", default="auto", description="Whether to use registration cache by default")
+ variant(
+ "packet-size",
+ default="auto",
+ values=is_positive_int,
+ description="Size of packet by default",
+ )
+ variant(
+ "npackets",
+ default="auto",
+ values=is_positive_int,
+ description="Number of packets by default",
+ )
+ variant(
+ "fabric-nsends-max",
+ default="auto",
+ values=is_positive_int,
+ description="Max number of send descriptors that can be posted (send queue length) "
+ "at the fabric layer by default",
+ )
+ variant(
+ "fabric-nrecvs-max",
+ default="auto",
+ values=is_positive_int,
+ description="Max number of receive descriptors that can be posted (receive queue length) "
+ "at the fabric layer by default",
+ )
+ variant(
+ "fabric-ncqes-max",
+ default="auto",
+ values=is_positive_int,
+ description="Max number of completion queue entries that can be posted "
+ "(completion queue length) at the fabric layer by default",
+ )
+
+ variant("debug", default=False, description="Enable the debug mode")
+ variant("pcounter", default=False, description="Enable the performance counters")
+ variant(
+ "papi", default=False, description="Enable the PAPI plugin to collect hardware counters"
+ )
+
+ variant(
+ "enable-pm",
+ description="Process management backends to enable",
+ values=disjoint_sets(("auto",), ("pmix", "pmi2", "pmi1", "mpi", "local"))
+ .prohibit_empty_set()
+ .with_default("auto")
+ .with_non_feature_values("auto"),
+ )
+ variant(
+ "default-pm",
+ description="Order of process management backends to try by default",
+ values=disjoint_sets(("auto",), ("pmix", "pmi2", "pmi1", "mpi", "local"), ("cray",))
+ .prohibit_empty_set()
+ .with_default("auto")
+ .with_non_feature_values("auto"),
+ )
+
+ generator("ninja", "make", default="ninja")
+
+ depends_on("cmake@3.12:", type="build")
+ depends_on("libfabric", when="fabric=ofi")
+ depends_on("rdma-core", when="fabric=ibv")
+ depends_on("ucx", when="fabric=ucx")
+ depends_on("mpi", when="enable-pm=mpi")
+ depends_on("papi", when="+papi")
+ depends_on("doxygen", when="+docs")
+ depends_on("cray-pmi", when="default-pm=cray")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("LCI_SERVER", "fabric"),
+ self.define("LCI_FORCE_SERVER", True),
+ self.define_from_variant("LCI_WITH_EXAMPLES", "examples"),
+ self.define_from_variant("LCI_WITH_TESTS", "tests"),
+ self.define_from_variant("LCI_WITH_BENCHMARKS", "benchmarks"),
+ self.define_from_variant("LCI_WITH_DOC", "docs"),
+ self.define_from_variant("LCI_ENABLE_MULTITHREAD_PROGRESS", "multithread-progress"),
+ self.define_from_variant("LCI_DEBUG", "debug"),
+ self.define_from_variant("LCI_USE_PERFORMANCE_COUNTER", "pcounter"),
+ self.define_from_variant("LCI_USE_PAPI", "papi"),
+ ]
+
+ if not self.spec.satisfies("dreg=auto"):
+ args.append(self.define_from_variant("LCI_USE_DREG_DEFAULT", "dreg"))
+
+ if not self.spec.satisfies("enable-pm=auto"):
+ args.extend(
+ [
+ self.define(
+ "LCT_PMI_BACKEND_ENABLE_PMI1", self.spec.satisfies("enable-pm=pmi1")
+ ),
+ self.define(
+ "LCT_PMI_BACKEND_ENABLE_PMI2", self.spec.satisfies("enable-pm=pmi2")
+ ),
+ self.define(
+ "LCT_PMI_BACKEND_ENABLE_MPI", self.spec.satisfies("enable-pm=mpi")
+ ),
+ self.define(
+ "LCT_PMI_BACKEND_ENABLE_PMIX", self.spec.satisfies("enable-pm=pmix")
+ ),
+ ]
+ )
+
+ if self.spec.satisfies("default-pm=cray"):
+ args.extend(
+ [
+ self.define("LCI_PMI_BACKEND_DEFAULT", "pmi1"),
+ self.define("LCT_PMI_BACKEND_ENABLE_PMI1", True),
+ ]
+ )
+ elif not self.spec.satisfies("default-pm=auto"):
+ args.append(self.define_from_variant("LCI_PMI_BACKEND_DEFAULT", "default-pm"))
+
+ if not self.spec.satisfies("cache-line=auto"):
+ args.append(self.define_from_variant("LCI_CACHE_LINE", "cache-line"))
+
+ if not self.spec.satisfies("packet-size=auto"):
+ args.append(self.define_from_variant("LCI_PACKET_SIZE_DEFAULT", "packet-size"))
+
+ if not self.spec.satisfies("npackets=auto"):
+ args.append(self.define_from_variant("LCI_SERVER_NUM_PKTS_DEFAULT", "npackets"))
+
+ if not self.spec.satisfies("fabric-nsends-max=auto"):
+ args.append(
+ self.define_from_variant("LCI_SERVER_MAX_SENDS_DEFAULT", "fabric-nsends-max")
+ )
+
+ if not self.spec.satisfies("fabric-nrecvs-max=auto"):
+ args.append(
+ self.define_from_variant("LCI_SERVER_MAX_RECVS_DEFAULT", "fabric-nrecvs-max")
+ )
+
+ if not self.spec.satisfies("fabric-ncqes-max=auto"):
+ args.append(
+ self.define_from_variant("LCI_SERVER_MAX_CQES_DEFAULT", "fabric-ncqes-max")
+ )
+
+ return args
diff --git a/var/spack/repos/builtin/packages/lcio/package.py b/var/spack/repos/builtin/packages/lcio/package.py
index e01edbc217..c768ee39be 100644
--- a/var/spack/repos/builtin/packages/lcio/package.py
+++ b/var/spack/repos/builtin/packages/lcio/package.py
@@ -21,6 +21,10 @@ class Lcio(CMakePackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("2.22.2", sha256="e5ad9690af85160ef52dd407fc0995451b4293f3aee415a8ea8a950de63d87a1")
+ version("2.22.1", sha256="4bc3d2c83af7b1c65d6736dd14ee82f41af7ce9bfc7cfe779c5f47417e8dc326")
+ version("2.22", sha256="95676977a0427f5ecc857e8504b13f332c2c2e5769dc00f6beecff3c73dab395")
+ version("2.21", sha256="a9f0a9922ab2ef17c6f1b8f7187bfc341f27567745a43c0480c103b617dfcea6")
version("2.20.2", sha256="b37cee344c28ccddc590e5317721b375ef19f4392ae067bc86583107acaf2374")
version("2.20.1", sha256="125f657297de12b40694cb0dddec1d1ce3379058492f2a6a2a6f992ee51604d6")
version("2.20", sha256="5ef92c9ef04ce468ffb48be0ec6010377a400b064e352cb50f9f4c9599e7e990")
@@ -42,6 +46,8 @@ class Lcio(CMakePackage):
version("2.13.2", sha256="9f153ba13e56ee16795378f9192678d40df1faca51d00aaa8fb80547bfecb8d8")
version("2.13.1", sha256="aa572e2ba38c0cadd6a92fa933c3ed97e21d016c7982578d3f293901169f4ec0")
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default="17",
@@ -62,6 +68,7 @@ class Lcio(CMakePackage):
depends_on("sio@0.0.2:", when="@2.14:")
depends_on("sio@0.1:", when="@2.16:")
+ depends_on("sio@0.2:", when="@2.21:")
depends_on("root@6.04:", when="+rootdict")
depends_on("root@6.04: cxxstd=11", when="+rootdict cxxstd=11")
diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py
index 5fcf28bf7f..dbfe54508a 100644
--- a/var/spack/repos/builtin/packages/lcms/package.py
+++ b/var/spack/repos/builtin/packages/lcms/package.py
@@ -3,32 +3,62 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import pathlib
+
+import spack.build_systems.msbuild
from spack.package import *
-class Lcms(AutotoolsPackage):
+class Lcms(AutotoolsPackage, MSBuildPackage):
"""Little cms is a color management library. Implements fast
transforms between ICC profiles. It is focused on speed, and is
portable across several platforms (MIT license)."""
homepage = "https://www.littlecms.com"
- url = "http://downloads.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz"
+ url = "https://downloads.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz"
license("MIT")
+ version("2.16", sha256="d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51")
+ version("2.15", sha256="b20cbcbd0f503433be2a4e81462106fa61050a35074dc24a4e356792d971ab39")
+ version("2.14", sha256="28474ea6f6591c4d4cee972123587001a4e6e353412a41b3e9e82219818d5740")
version("2.13.1", sha256="d473e796e7b27c5af01bd6d1552d42b45b43457e7182ce9903f38bb748203b88")
version("2.9", sha256="48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20")
version("2.8", sha256="66d02b229d2ea9474e62c2b6cd6720fde946155cd1d0d2bffdab829790a0fb22")
version("2.6", sha256="5172528839647c54c3da211837225e221be93e4733f5b5e9f57668f7107e14b1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
- url = "http://downloads.sourceforge.net/project/lcms/lcms/{0}/lcms2-{1}.tar.gz"
+ url = "https://downloads.sourceforge.net/project/lcms/lcms/{0}/lcms2-{1}.tar.gz"
return url.format(version.up_to(2), version)
depends_on("jpeg")
depends_on("libtiff")
depends_on("zlib-api")
+ build_system("autotools", "msbuild")
+
@property
def libs(self):
return find_libraries("liblcms2", root=self.prefix, recursive=True)
+
+
+class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder):
+ @property
+ def build_directory(self):
+ return (
+ pathlib.Path(self.pkg.stage.source_path)
+ / "Projects"
+ / f"VC{self.pkg.compiler.visual_studio_version}"
+ )
+
+ def setup_build_environment(self, env):
+ env.prepend_path(
+ "INCLUDE",
+ ";".join([dep.prefix.include for dep in self.spec.dependencies(deptype="link")]),
+ )
+
+ def msbuild_args(self):
+ return ["lcms2.sln"]
diff --git a/var/spack/repos/builtin/packages/lcov/package.py b/var/spack/repos/builtin/packages/lcov/package.py
index 9794fb69e5..54ab5955e3 100644
--- a/var/spack/repos/builtin/packages/lcov/package.py
+++ b/var/spack/repos/builtin/packages/lcov/package.py
@@ -12,17 +12,23 @@ class Lcov(MakefilePackage):
adds overview pages for easy navigation within the file structure. LCOV
supports statement, function and branch coverage measurement."""
- homepage = "http://ltp.sourceforge.net/coverage/lcov.php"
+ homepage = "https://ltp.sourceforge.net/coverage/lcov.php"
url = "https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0.tar.gz"
+ git = "https://github.com/linux-test-project/lcov.git"
+
maintainers("KineticTheory")
license("GPL-2.0-or-later")
+ version("master", branch="master")
version("2.0", sha256="1857bb18e27abe8bcec701a907d5c47e01db4d4c512fc098d1a6acd29267bf46")
version("1.16", sha256="987031ad5528c8a746d4b52b380bc1bffe412de1f2b9c2ba5224995668e3240b")
version("1.15", sha256="c1cda2fa33bec9aa2c2c73c87226cfe97de0831887176b45ee523c5e30f8053a")
version("1.14", sha256="14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# dependencies from
# https://github.com/linux-test-project/lcov/blob/02ece21d54ccd16255d74f8b00f8875b6c15653a/README#L91-L111
depends_on("perl", type=("build", "run"))
@@ -51,6 +57,7 @@ class Lcov(MakefilePackage):
depends_on("perl-specio", type=("run"))
depends_on("perl-sub-identify", type=("run"))
depends_on("perl-time-hires", type=("run"))
+ depends_on("perl-timedate", type=("run"))
def install(self, spec, prefix):
make(
diff --git a/var/spack/repos/builtin/packages/ldak/package.py b/var/spack/repos/builtin/packages/ldak/package.py
index 94209a9e76..c4855de475 100644
--- a/var/spack/repos/builtin/packages/ldak/package.py
+++ b/var/spack/repos/builtin/packages/ldak/package.py
@@ -28,9 +28,9 @@ class Ldak(Package):
depends_on("zlib-api")
depends_on("blas")
depends_on("lapack")
- depends_on("openblas threads=openmp", when="^openblas")
- depends_on("intel-mkl threads=openmp", when="^intel-mkl")
- depends_on("intel-oneapi-mkl threads=openmp", when="^intel-oneapi-mkl")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
+ depends_on("intel-mkl threads=openmp", when="^[virtuals=blas] intel-mkl")
+ depends_on("intel-oneapi-mkl threads=openmp", when="^[virtuals=blas] intel-oneapi-mkl")
depends_on("glpk", when="+glpk")
requires("target=x86_64:", when="~glpk", msg="bundled qsopt is only for x86_64")
@@ -40,7 +40,6 @@ class Ldak(Package):
policy="one_of",
msg="Only mkl or openblas are supported for blas/lapack with ldak",
)
- conflicts("platform=cray", when="~glpk", msg="bundled qsopt only for linux or mac")
phases = ["build", "install"]
diff --git a/var/spack/repos/builtin/packages/ldc-bootstrap/package.py b/var/spack/repos/builtin/packages/ldc-bootstrap/package.py
index 7c9730c03d..c51e301617 100644
--- a/var/spack/repos/builtin/packages/ldc-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/ldc-bootstrap/package.py
@@ -26,6 +26,9 @@ class LdcBootstrap(CMakePackage):
# This is the last version that does not require a D compiler to bootstrap
version("0.17.4", sha256="48428afde380415640f3db4e38529345f3c8485b1913717995547f907534c1c3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("llvm@3.7:")
depends_on("zlib-api")
depends_on("libconfig")
diff --git a/var/spack/repos/builtin/packages/ldc/package.py b/var/spack/repos/builtin/packages/ldc/package.py
index a297edf5b7..d44db2b064 100644
--- a/var/spack/repos/builtin/packages/ldc/package.py
+++ b/var/spack/repos/builtin/packages/ldc/package.py
@@ -23,6 +23,9 @@ class Ldc(CMakePackage):
version("1.3.0", sha256="efe31a639bcb44e1f5b752da21713376d9410a01279fecc8aab8572065a3050b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build runtime and tooling as shared libs")
depends_on("llvm@3.9:")
@@ -40,7 +43,9 @@ class Ldc(CMakePackage):
args = [
"-DD_COMPILER:STRING={0}".format(ldmd2),
- "-DBUILD_SHARED_LIBS:BOOL={0}".format("ON" if "+shared" in self.spec else "OFF"),
+ "-DBUILD_SHARED_LIBS:BOOL={0}".format(
+ "ON" if self.spec.satisfies("+shared") else "OFF"
+ ),
"-DLDC_INSTALL_LTOPLUGIN:BOOL=ON",
"-DLDC_BUILD_WITH_LTO:BOOL=OFF",
]
diff --git a/var/spack/repos/builtin/packages/ldsc/package.py b/var/spack/repos/builtin/packages/ldsc/package.py
new file mode 100644
index 0000000000..00f7bc6060
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ldsc/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Ldsc(PythonPackage):
+ """ldsc is a command line tool for estimating heritability and genetic correlation from
+ GWAS summary statistics. ldsc also computes LD scores"""
+
+ homepage = "https://github.com/bulik/ldsc"
+ pypi = "ldsc/ldsc-2.0.1.tar.gz"
+
+ license("GPL-3.0-only", checked_by="A-N-Other")
+
+ version("2.0.1", sha256="fe72f99da8a26414d82e47f2d2ee7cebbbab6c20d1b4ea51a0c38cc650c63556")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-bitarray@2.6.0:", type=("build", "run"))
+ depends_on("py-pybedtools@0.9.0:", type=("build", "run"))
+ depends_on("py-scipy@1.9.2:", type=("build", "run"))
+ depends_on("py-numpy@1.23.3:", type=("build", "run"))
+ depends_on("py-pandas@1.5.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index 2840d577de..4e1a9cccf7 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -25,8 +25,15 @@ class Legion(CMakePackage, ROCmPackage):
homepage = "https://legion.stanford.edu/"
git = "https://github.com/StanfordLegion/legion.git"
+ license("Apache-2.0")
+
maintainers("pmccormick", "streichler", "elliottslaughter")
tags = ["e4s"]
+ version("24.09.0", tag="legion-24.09.0", commit="4a03402467547b99530042cfe234ceec2cd31b2e")
+ version("24.06.0", tag="legion-24.06.0", commit="3f27977943626ef23038ef0049b7ad1b389caad1")
+ version("24.03.0", tag="legion-24.03.0", commit="c61071541218747e35767317f6f89b83f374f264")
+ version("23.12.0", tag="legion-23.12.0", commit="8fea67ee694a5d9fb27232a7976af189d6c98456")
+ version("23.09.0", tag="legion-23.09.0", commit="7304dfcf9b69005dd3e65e9ef7d5bd49122f9b49")
version("23.06.0", tag="legion-23.06.0", commit="7b5ff2fb9974511c28aec8d97b942f26105b5f6d")
version("23.03.0", tag="legion-23.03.0", commit="12f6051c9d75229d00ac0b31d6be1ff2014f7e6a")
version("22.12.0", tag="legion-22.12.0", commit="9ed6f4d6b579c4f17e0298462e89548a4f0ed6e5")
@@ -39,7 +46,15 @@ class Legion(CMakePackage, ROCmPackage):
version("21.03.0", tag="legion-21.03.0", commit="0cf9ddd60c227c219c8973ed0580ddc5887c9fb2")
version("stable", branch="stable")
version("master", branch="master")
- version("cr", branch="control_replication")
+
+ # Old control replication commits used by FleCSI releases, prior to 24.03.0
+ version("cr-20230307", commit="435183796d7c8b6ac1035a6f7af480ded750f67d", deprecated=True)
+ version("cr-20210122", commit="181e63ad4187fbd9a96761ab3a52d93e157ede20", deprecated=True)
+ version("cr-20191217", commit="572576b312509e666f2d72fafdbe9d968b1a6ac3", deprecated=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("cmake@3.16:", type="build")
# TODO: Need to spec version of MPI v3 for use of the low-level MPI transport
@@ -52,8 +67,10 @@ class Legion(CMakePackage, ROCmPackage):
depends_on("mpi", when="conduit=mpi")
depends_on("cuda@10.0:11.9", when="+cuda_unsupported_compiler @21.03.0:23.03.0")
depends_on("cuda@10.0:11.9", when="+cuda @21.03.0:23.03.0")
- depends_on("cuda@10.0:12.2", when="+cuda_unsupported_compiler")
- depends_on("cuda@10.0:12.2", when="+cuda")
+ depends_on("cuda@10.0:", when="+cuda_unsupported_compiler")
+ depends_on("cuda@10.0:", when="+cuda")
+ depends_on("hip@5.1:5.7", when="+rocm @23.03.0:23.12.0")
+ depends_on("hip@5.1:", when="+rocm")
depends_on("hdf5", when="+hdf5")
depends_on("hwloc", when="+hwloc")
@@ -61,12 +78,12 @@ class Legion(CMakePackage, ROCmPackage):
cuda_arch_list = CudaPackage.cuda_arch_values
for nvarch in cuda_arch_list:
depends_on(
- "kokkos@3.3.01:+cuda+cuda_lambda+wrapper cuda_arch={0}".format(nvarch),
- when="%gcc+kokkos+cuda cuda_arch={0}".format(nvarch),
+ f"kokkos@3.3.01:+cuda+cuda_lambda+wrapper cuda_arch={nvarch}",
+ when=f"%gcc+kokkos+cuda cuda_arch={nvarch}",
)
depends_on(
- "kokkos@3.3.01:+cuda+cuda_lambda~wrapper cuda_arch={0}".format(nvarch),
- when="%clang+kokkos+cuda cuda_arch={0}".format(nvarch),
+ f"kokkos@3.3.01:+cuda+cuda_lambda~wrapper cuda_arch={nvarch}",
+ when=f"%clang+kokkos+cuda cuda_arch={nvarch}",
)
depends_on("kokkos@3.3.01:~cuda", when="+kokkos~cuda")
@@ -76,7 +93,9 @@ class Legion(CMakePackage, ROCmPackage):
patch("hip-offload-arch.patch", when="@23.03.0 +rocm")
def patch(self):
- if "network=gasnet conduit=ofi-slingshot11 ^cray-mpich+wrappers" in self.spec:
+ if self.spec.satisfies(
+ "network=gasnet conduit=ofi-slingshot11 ^[virtuals=mpi] cray-mpich+wrappers"
+ ):
filter_file(
r"--with-mpi-cc=cc",
f"--with-mpi-cc={self.spec['mpi'].mpicc}",
@@ -101,10 +120,7 @@ class Legion(CMakePackage, ROCmPackage):
)
for arch in ROCmPackage.amdgpu_targets:
- depends_on(
- "kokkos@3.3.01:+rocm amdgpu_target={0}".format(arch),
- when="+rocm amdgpu_target={0}".format(arch),
- )
+ depends_on(f"kokkos@3.3.01:+rocm amdgpu_target={arch}", when=f"+rocm amdgpu_target={arch}")
depends_on("kokkos@3.3.01:+rocm", when="+kokkos+rocm")
@@ -112,6 +128,9 @@ class Legion(CMakePackage, ROCmPackage):
depends_on("python@3.8:", when="+python")
depends_on("py-cffi", when="+python")
depends_on("py-numpy", when="+python")
+ depends_on("py-pip", when="+python", type="build")
+ depends_on("py-setuptools", when="+python", type="build")
+
depends_on("papi", when="+papi")
depends_on("zlib-api", when="+zlib")
@@ -119,8 +138,8 @@ class Legion(CMakePackage, ROCmPackage):
# but this might be helpful for other use cases down the road. Legion's
# current development policy is C++11 or greater so we capture that aspect
# here.
- cpp_stds = ["11", "14", "17", "20"]
- variant("cxxstd", default="11", description="C++ standard", values=cpp_stds, multi=False)
+ cpp_stds = (conditional("11", "14", when="@:24.03.0"), "17", "20")
+ variant("cxxstd", default="17", description="C++ standard", values=cpp_stds, multi=False)
# Network transport layer: the underlying data transport API should be used for
# distributed data movement. For Legion, gasnet is the currently the most
@@ -257,6 +276,12 @@ class Legion(CMakePackage, ROCmPackage):
variant(
"redop_complex", default=False, description="Use reduction operators for complex types."
)
+ requires("+redop_complex", when="+bindings")
+ variant(
+ "redop_half",
+ default=False,
+ description="Use reduction operators for half precision types.",
+ )
variant(
"max_dims",
@@ -276,14 +301,27 @@ class Legion(CMakePackage, ROCmPackage):
default=1024,
description="Maximum number of nodes supported by Legion.",
)
+ variant("prof", default=False, description="Install Rust Legion prof")
+
+ depends_on("rust@1.74:", type="build", when="+prof")
+
+ variant("gc", default=False, description="Enable garbage collector logging")
+ variant(
+ "sysomp", default=False, description="Use system OpenMP implementation instead of Realm's"
+ )
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ if self.spec.satisfies("%oneapi@2025:"):
+ flags.append("-Wno-error=missing-template-arg-list-after-template-kw")
+ return (flags, None, None)
def cmake_args(self):
spec = self.spec
- cmake_cxx_flags = []
from_variant = self.define_from_variant
options = [from_variant("CMAKE_CXX_STANDARD", "cxxstd")]
- if "network=gasnet" in spec:
+ if spec.satisfies("network=gasnet"):
options.append("-DLegion_NETWORKS=gasnetex")
if spec.variants["gasnet_root"].value != "none":
gasnet_dir = spec.variants["gasnet_root"].value
@@ -302,106 +340,114 @@ class Legion(CMakePackage, ROCmPackage):
else:
options.append("-DGASNet_CONDUIT=%s" % gasnet_conduit)
- if "+gasnet_debug" in spec:
+ if spec.satisfies("+gasnet_debug"):
options.append("-DLegion_EMBED_GASNet_CONFIGURE_ARGS=--enable-debug")
- elif "network=mpi" in spec:
+ elif spec.satisfies("network=mpi"):
options.append("-DLegion_NETWORKS=mpi")
- elif "network=ucx" in spec:
+ elif spec.satisfies("network=ucx"):
options.append("-DLegion_NETWORKS=ucx")
else:
options.append("-DLegion_EMBED_GASNet=OFF")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
options.append("-DBUILD_SHARED_LIBS=ON")
else:
options.append("-DBUILD_SHARED_LIBS=OFF")
- if "+bounds_checks" in spec:
+ if spec.satisfies("+bounds_checks"):
# default is off.
options.append("-DLegion_BOUNDS_CHECKS=ON")
- if "+privilege_checks" in spec:
+ if spec.satisfies("+privilege_checks"):
# default is off.
options.append("-DLegion_PRIVILEGE_CHECKS=ON")
- if "output_level" in spec:
- level = str.upper(spec.variants["output_level"].value)
- options.append("-DLegion_OUTPUT_LEVEL=%s" % level)
- if "+spy" in spec:
+
+ options.append(f"-DLegion_OUTPUT_LEVEL={str.upper(spec.variants['output_level'].value)}")
+
+ if spec.satisfies("+spy"):
# default is off.
options.append("-DLegion_SPY=ON")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cuda_arch = spec.variants["cuda_arch"].value
options.append("-DLegion_USE_CUDA=ON")
options.append("-DLegion_GPU_REDUCTIONS=ON")
options.append("-DLegion_CUDA_ARCH=%s" % cuda_arch)
- if "+cuda_hijack" in spec:
+ if spec.satisfies("+cuda_hijack"):
options.append("-DLegion_HIJACK_CUDART=ON")
else:
options.append("-DLegion_HIJACK_CUDART=OFF")
- if "+cuda_unsupported_compiler" in spec:
+ if spec.satisfies("+cuda_unsupported_compiler"):
options.append("-DCUDA_NVCC_FLAGS:STRING=--allow-unsupported-compiler")
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
options.append("-DLegion_USE_HIP=ON")
options.append("-DLegion_GPU_REDUCTIONS=ON")
options.append(from_variant("Legion_HIP_TARGET", "hip_target"))
options.append(from_variant("Legion_HIP_ARCH", "amdgpu_target"))
options.append(from_variant("Legion_HIJACK_HIP", "hip_hijack"))
- options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
+ if spec.satisfies("@23.03.0:23.12.0"):
+ options.append(self.define("HIP_PATH", f"{spec['hip'].prefix}/hip"))
+ else:
+ options.append(self.define("ROCM_PATH", spec["hip"].prefix))
- if "+fortran" in spec:
+ if spec.satisfies("+fortran"):
# default is off.
options.append("-DLegion_USE_Fortran=ON")
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
# default is off.
options.append("-DLegion_USE_HDF5=ON")
- if "+hwloc" in spec:
+ if spec.satisfies("+hwloc"):
# default is off.
options.append("-DLegion_USE_HWLOC=ON")
- if "+kokkos" in spec:
+ if spec.satisfies("+kokkos"):
# default is off.
options.append("-DLegion_USE_Kokkos=ON")
os.environ["KOKKOS_CXX_COMPILER"] = spec["kokkos"].kokkos_cxx
+ if spec.satisfies("+cuda+cuda_unsupported_compiler ^kokkos%clang +cuda"):
+ # Keep CMake CUDA compiler detection happy
+ options.append(
+ self.define("CMAKE_CUDA_FLAGS", "--allow-unsupported-compiler -std=c++17")
+ )
- if "+libdl" in spec:
+ if spec.satisfies("+libdl"):
# default is on.
options.append("-DLegion_USE_LIBDL=ON")
else:
options.append("-DLegion_USE_LIBDL=OFF")
- if "+openmp" in spec:
+ if spec.satisfies("+openmp"):
# default is off.
options.append("-DLegion_USE_OpenMP=ON")
- if "+papi" in spec:
+ if spec.satisfies("+papi"):
# default is off.
options.append("-DLegion_USE_PAPI=ON")
- if "+python" in spec:
+ if spec.satisfies("+python"):
# default is off.
options.append("-DLegion_USE_Python=ON")
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
# default is on.
options.append("-DLegion_USE_ZLIB=ON")
else:
options.append("-DLegion_USE_ZLIB=OFF")
- if "+redop_complex" in spec:
- # default is off.
- options.append("-DLegion_REDOP_COMPLEX=ON")
-
- if "+bindings" in spec:
+ if spec.satisfies("+bindings"):
# default is off.
options.append("-DLegion_BUILD_BINDINGS=ON")
- options.append("-DLegion_REDOP_COMPLEX=ON") # required for bindings
- if spec.variants["build_type"].value == "Debug":
- cmake_cxx_flags.extend(["-DDEBUG_REALM", "-DDEBUG_LEGION", "-ggdb"])
+ if spec.satisfies("+redop_complex"):
+ # default is off
+ options.append("-DLegion_REDOP_COMPLEX=ON")
+
+ if spec.satisfies("+redop_half"):
+ # default is off
+ options.append("-DLegion_REDOP_HALF=ON")
maxdims = int(spec.variants["max_dims"].value)
# TODO: sanity check if maxdims < 0 || > 9???
@@ -432,43 +478,56 @@ class Legion(CMakePackage, ROCmPackage):
# This disables Legion's CMake build system's logic for targeting the native
# CPU architecture in favor of Spack-provided compiler flags
options.append("-DBUILD_MARCH:STRING=")
+
+ if spec.satisfies("+openmp +sysomp"):
+ options.append("-DLegion_OpenMP_SYSTEM_RUNTIME=ON")
+
+ if spec.satisfies("+gc"):
+ options.append("-DCMAKE_CXX_FLAGS=-DLEGION_GC")
+
return options
+ def build(self, spec, prefix):
+ super().build(spec, prefix)
+ if spec.satisfies("+prof"):
+ with working_dir(join_path(self.stage.source_path, "tools", "legion_prof_rs")):
+ cargo = which("cargo")
+ cargo("install", "--root", "out", "--path", ".", "--all-features", "--locked")
+
+ def install(self, spec, prefix):
+ super().install(spec, prefix)
+ if spec.satisfies("+prof"):
+ with working_dir(join_path(self.stage.source_path, "tools", "legion_prof_rs")):
+ install_tree("out", prefix)
+
@run_after("install")
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([join_path("examples", "local_function_tasks")])
+ cache_extra_test_sources(self, [join_path("examples", "local_function_tasks")])
- def run_local_function_tasks_test(self):
- """Run stand alone test: local_function_tasks"""
+ def test_run_local_function_tasks(self):
+ """Build and run external application example"""
test_dir = join_path(
self.test_suite.current_test_cache_dir, "examples", "local_function_tasks"
)
if not os.path.exists(test_dir):
- print("Skipping local_function_tasks test")
- return
-
- exe = "local_function_tasks"
+ raise SkipTest(f"{test_dir} must exist")
cmake_args = [
- "-DCMAKE_C_COMPILER={0}".format(self.compiler.cc),
- "-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx),
- "-DLegion_DIR={0}".format(join_path(self.prefix, "share", "Legion", "cmake")),
+ f"-DCMAKE_C_COMPILER={self.compiler.cc}",
+ f"-DCMAKE_CXX_COMPILER={self.compiler.cxx}",
+ f"-DLegion_DIR={join_path(self.prefix, 'share', 'Legion', 'cmake')}",
]
- self.run_test(
- "cmake",
- options=cmake_args,
- purpose="test: generate makefile for {0} example".format(exe),
- work_dir=test_dir,
- )
-
- self.run_test("make", purpose="test: build {0} example".format(exe), work_dir=test_dir)
+ with working_dir(test_dir):
+ cmake = self.spec["cmake"].command
+ cmake(*cmake_args)
- self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir)
+ make = which("make")
+ make()
- def test(self):
- self.run_local_function_tasks_test()
+ exe = which("local_function_tasks")
+ exe()
diff --git a/var/spack/repos/builtin/packages/lemon/package.py b/var/spack/repos/builtin/packages/lemon/package.py
index 21effe4636..8c770a3c23 100644
--- a/var/spack/repos/builtin/packages/lemon/package.py
+++ b/var/spack/repos/builtin/packages/lemon/package.py
@@ -17,6 +17,8 @@ class Lemon(CMakePackage):
version("1.3.1", sha256="71b7c725f4c0b4a8ccb92eb87b208701586cf7a96156ebd821ca3ed855bad3c8")
+ depends_on("cxx", type="build") # generated
+
# variant("coin", default=False, description="Enable Coin solver backend") #TODO build fails
variant("ilog", default=False, description="Enable ILOG (CPLEX) solver backend")
variant("glpk", default=True, description="Enable GLPK solver backend")
diff --git a/var/spack/repos/builtin/packages/leptonica/package.py b/var/spack/repos/builtin/packages/leptonica/package.py
index 2f941a289f..25cfd3f373 100644
--- a/var/spack/repos/builtin/packages/leptonica/package.py
+++ b/var/spack/repos/builtin/packages/leptonica/package.py
@@ -15,12 +15,16 @@ class Leptonica(CMakePackage):
license("custom")
+ version("1.84.1", sha256="ecd7a868403b3963c4e33623595d77f2c87667e2cfdd9b370f87729192061bef")
version("1.83.1", sha256="4289d0a4224b614010072253531c0455a33a4d7c7a0017fe7825ed382290c0da")
version("1.81.0", sha256="70ebc04ff8b9684205bd1d01843c635a8521255b74813bf7cce9a33368f7952c")
version("1.80.0", sha256="3952b974ec057d24267aae48c54bca68ead8275604bf084a73a4b953ff79196e")
version("1.79.0", sha256="bf9716f91a4844c2682a07ef21eaf68b6f1077af1f63f27c438394fd66218e17")
version("1.78.0", sha256="f8ac4d93cc76b524c2c81d27850bfc342e68b91368aa7a1f7d69e34ce13adbb4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("giflib")
depends_on("jpeg")
depends_on("libpng")
@@ -30,6 +34,6 @@ class Leptonica(CMakePackage):
depends_on("openjpeg")
def cmake_args(self):
- args = ["-DBUILD_SHARED_LIBS=ON"]
+ args = [self.define("BUILD_SHARED_LIBS", "ON")]
return args
diff --git a/var/spack/repos/builtin/packages/lerc/package.py b/var/spack/repos/builtin/packages/lerc/package.py
index 0e71371180..3ce249af43 100644
--- a/var/spack/repos/builtin/packages/lerc/package.py
+++ b/var/spack/repos/builtin/packages/lerc/package.py
@@ -22,6 +22,8 @@ class Lerc(CMakePackage):
version("4.0.0", sha256="91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0")
version("3.0", sha256="8c0148f5c22d823eff7b2c999b0781f8095e49a7d3195f13c68c5541dd5740a1")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.11:", type="build")
depends_on("cmake@3.12:", type="build", when="@4.0.0:")
diff --git a/var/spack/repos/builtin/packages/less/package.py b/var/spack/repos/builtin/packages/less/package.py
index 3e4b402dee..8601a60210 100644
--- a/var/spack/repos/builtin/packages/less/package.py
+++ b/var/spack/repos/builtin/packages/less/package.py
@@ -17,9 +17,15 @@ class Less(AutotoolsPackage):
depends_on("ncurses")
- license("GPL-3.0-or-later OR BSD-2-Clause")
+ license("GPL-3.0-or-later OR BSD-2-Clause", checked_by="wdconinc")
+ depends_on("c", type="build")
+
+ version("668", sha256="dbc0de59ea9c50e1e8927e6b077858db3a84954e767909bc599e6e6f602c5717")
+ version("661", sha256="a900e3916738bf8c1a0a2a059810f1c59b8271ac8bb46898c6e921ea6aefd757")
version("643", sha256="3bb417c4b909dfcb0adafc371ab87f0b22e8b15f463ec299d156c495fc9aa196")
- version("590", sha256="69056021c365b16504cf5bd3864436a5e50cb2f98b76cd68b99b457064139375")
- version("551", sha256="2630db16ef188e88b513b3cc24daa9a798c45643cc7da06e549c9c00cfd84244")
- version("530", sha256="8c1652ba88a726314aa2616d1c896ca8fe9a30253a5a67bc21d444e79a6c6bc3")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-46663
+ version("590", sha256="69056021c365b16504cf5bd3864436a5e50cb2f98b76cd68b99b457064139375")
+ version("551", sha256="2630db16ef188e88b513b3cc24daa9a798c45643cc7da06e549c9c00cfd84244")
+ version("530", sha256="8c1652ba88a726314aa2616d1c896ca8fe9a30253a5a67bc21d444e79a6c6bc3")
diff --git a/var/spack/repos/builtin/packages/lesstif/package.py b/var/spack/repos/builtin/packages/lesstif/package.py
index 8c936d9156..f8966c74ef 100644
--- a/var/spack/repos/builtin/packages/lesstif/package.py
+++ b/var/spack/repos/builtin/packages/lesstif/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Lesstif(AutotoolsPackage):
"""LessTif is the Hungry Programmers' version of OSF/Motif."""
- homepage = "https://sourceforge.net/projects/lesstif"
+ homepage = "https://sourceforge.net/projects/lesstif/"
url = "https://sourceforge.net/projects/lesstif/files/lesstif/0.95.2/lesstif-0.95.2.tar.bz2/download"
license("LGPL-2.0-only")
version("0.95.2", sha256="eb4aa38858c29a4a3bcf605cfe7d91ca41f4522d78d770f69721e6e3a4ecf7e3")
+ depends_on("c", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("static", default=False, description="Build static libraries")
@@ -40,8 +42,8 @@ class Lesstif(AutotoolsPackage):
"--disable-debug",
"--enable-production",
"--disable-dependency-tracking",
- "--enable-shared" if "+shared" in spec else "--disable-shared",
- "--enable-static" if "+static" in spec else "--disable-static",
+ "--enable-shared" if spec.satisfies("+shared") else "--disable-shared",
+ "--enable-static" if spec.satisfies("+static") else "--disable-static",
]
return args
diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py
index 1eaadf2058..6c153c8f43 100644
--- a/var/spack/repos/builtin/packages/leveldb/package.py
+++ b/var/spack/repos/builtin/packages/leveldb/package.py
@@ -23,6 +23,9 @@ class Leveldb(CMakePackage):
version("1.20", sha256="f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664")
version("1.18", sha256="4aa1a7479bc567b95a59ac6fb79eba49f61884d6fd400f20b7af147d54c5cee5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared library")
depends_on("cmake@3.9:", when="@1.21:", type="build")
@@ -67,7 +70,7 @@ class Leveldb(CMakePackage):
def cmake_args(self):
args = []
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
else:
args.append("-DBUILD_SHARED_LIBS=OFF")
diff --git a/var/spack/repos/builtin/packages/lfortran/package.py b/var/spack/repos/builtin/packages/lfortran/package.py
index 51155e4743..a2d3bec19b 100644
--- a/var/spack/repos/builtin/packages/lfortran/package.py
+++ b/var/spack/repos/builtin/packages/lfortran/package.py
@@ -12,20 +12,26 @@ class Lfortran(CMakePackage):
homepage = "https://lfortran.org"
url = "https://lfortran.github.io/tarballs/release/lfortran-0.19.0.tar.gz"
git = "https://github.com/lfortran/lfortran.git"
- maintainers = ["certik"]
+ maintainers("certik")
license("BSD-3-Clause")
# The build process uses 'git describe --tags' to get the package version
version("main", branch="main", get_full_repo=True)
+ version("0.30.0", sha256="aafdfbfe81d69ceb3650ae1cf9bcd8a1f1532d895bf88f3071fe9610859bcd6f")
version("0.19.0", sha256="d496f61d7133b624deb3562677c0cbf98e747262babd4ac010dbd3ab4303d805")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("llvm", default=True, description="Build with LLVM support")
variant("stacktrace", default=True, description="Build with stacktrace support")
depends_on("python@3:", type="build", when="@main")
depends_on("cmake", type="build")
- depends_on("llvm@11:15", type=("build", "run"), when="+llvm")
+ depends_on("llvm@11:15", type=("build", "run"), when="@0.19.0+llvm")
+ depends_on("llvm@11:16", type=("build", "run"), when="@0.30.0:+llvm")
depends_on("zlib-api")
depends_on("re2c", type="build", when="@main")
depends_on("bison@:3.4", type="build", when="@main")
diff --git a/var/spack/repos/builtin/packages/lftp/package.py b/var/spack/repos/builtin/packages/lftp/package.py
index eebdb596a4..f5bce1fc23 100644
--- a/var/spack/repos/builtin/packages/lftp/package.py
+++ b/var/spack/repos/builtin/packages/lftp/package.py
@@ -21,6 +21,9 @@ class Lftp(AutotoolsPackage):
version("4.7.7", sha256="7bce216050094a1146ed05bed8fe5b3518224764ffe98884a848d44dc76fff8f")
version("4.6.4", sha256="791e783779d3d6b519d0c23155430b9785f2854023eb834c716f5ba78873b15a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("expat")
depends_on("gettext")
depends_on("iconv")
@@ -37,10 +40,10 @@ class Lftp(AutotoolsPackage):
"--with-zlib={0}".format(self.spec["zlib-api"].prefix),
"--disable-dependency-tracking",
]
- if self.spec["iconv"].name == "libc":
- args.append("--without-libiconv-prefix")
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
elif not is_system_path(self.spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(self.spec["iconv"].prefix))
+ args.append("--without-libiconv-prefix")
if "intl" not in self.spec["gettext"].libs.names:
args.append("--without-libintl-prefix")
elif not is_system_path(self.spec["gettext"].prefix):
diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py
index 2a9bc2583c..9a86639a45 100644
--- a/var/spack/repos/builtin/packages/lhapdf/package.py
+++ b/var/spack/repos/builtin/packages/lhapdf/package.py
@@ -31,6 +31,9 @@ class Lhapdf(AutotoolsPackage):
version("6.3.0", sha256="864468439c7662bbceed6c61c7132682ec83381a23c9c9920502fdd7329dd816")
version("6.2.3", sha256="37200a1ab70247250a141dfed7419d178f9a83bd23a4f8a38e203d4e27b41308")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("python", default=True, description="Build python bindings")
depends_on("autoconf", type="build")
@@ -47,7 +50,7 @@ class Lhapdf(AutotoolsPackage):
# Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc:
if (
self.spec.satisfies("+python")
- and "gettext" in self.spec
+ and self.spec.satisfies("^gettext")
and "intl" in self.spec["gettext"].libs.names
):
env.append_flags("LDFLAGS", "-L" + self.spec["gettext"].prefix.lib)
diff --git a/var/spack/repos/builtin/packages/lhapdf5/package.py b/var/spack/repos/builtin/packages/lhapdf5/package.py
index 94fa2b369c..952a42a4a0 100644
--- a/var/spack/repos/builtin/packages/lhapdf5/package.py
+++ b/var/spack/repos/builtin/packages/lhapdf5/package.py
@@ -29,6 +29,10 @@ class Lhapdf5(AutotoolsPackage):
version("5.8.0", sha256="8381ea5f785dde95772a2b6d5890f1cb72012e223e6861823fd81b09eedaa7a3")
version("5.7.1", sha256="40529629351598317fbf7b5905661e51b23778019d50451eee78d7b1118e2559")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def setup_build_environment(self, env):
env.append_flags("FFLAGS", "-std=legacy")
diff --git a/var/spack/repos/builtin/packages/lhapdfsets/package.py b/var/spack/repos/builtin/packages/lhapdfsets/package.py
index deb654c067..2dbe00a9a9 100644
--- a/var/spack/repos/builtin/packages/lhapdfsets/package.py
+++ b/var/spack/repos/builtin/packages/lhapdfsets/package.py
@@ -74,8 +74,8 @@ class Lhapdfsets(BundlePackage):
@classmethod
def determine_spec_details(cls, prefix, exes_in_prefix):
path = os.environ.get("LHAPDF_DATA_PATH", None)
+ if not path:
+ return None
# unfortunately the sets are not versioned -
# just hardcode the current version and hope it is fine
- s = Spec.from_detection("lhapdfsets@6.3.0")
- s.external_path = path
- return s if path else None
+ return Spec.from_detection("lhapdfsets@6.3.0", external_path=path)
diff --git a/var/spack/repos/builtin/packages/libabigail/package.py b/var/spack/repos/builtin/packages/libabigail/package.py
index 1d5cf3071f..ecc8c645b0 100644
--- a/var/spack/repos/builtin/packages/libabigail/package.py
+++ b/var/spack/repos/builtin/packages/libabigail/package.py
@@ -16,9 +16,13 @@ class Libabigail(AutotoolsPackage):
license("Apache-2.0 WITH LLVM-exception")
version("master", branch="master")
+ version("2.1", sha256="4a6297d41d15d1936256117116bd61296e6b9bee23d54a0caf8d3f5ab8ddcc4c")
version("2.0", sha256="3704ae97a56bf076ca08fb5dea6b21db998fbbf14c4f9de12824b78db53b6fda")
version("1.8", sha256="1cbf260b894ccafc61b2673ba30c020c3f67dbba9dfa88dca3935dff661d665c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="build documentation")
depends_on("elfutils", type=("build", "link"))
@@ -40,7 +44,7 @@ class Libabigail(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- config_args = ["CPPFLAGS=-I{0}/include".format(spec["libxml2"].prefix)]
+ config_args = [f"CPPFLAGS=-I{spec['libxml2'].prefix}/include"]
config_args.append(
"LDFLAGS=-L{0} -Wl,-rpath,{0}".format(spec["libxml2"].libs.directories[0])
)
diff --git a/var/spack/repos/builtin/packages/libaec/package.py b/var/spack/repos/builtin/packages/libaec/package.py
index 5c2a21a5c6..12a059907e 100644
--- a/var/spack/repos/builtin/packages/libaec/package.py
+++ b/var/spack/repos/builtin/packages/libaec/package.py
@@ -29,6 +29,9 @@ class Libaec(CMakePackage):
version("1.0.1", sha256="3668eb4ed36724441e488a7aadc197426afef4b1e8bd139af6d3e36023906459")
version("1.0.0", sha256="849f08b08ddaaffe543d06d0ced5e4ee3e526b13a67c5f422d126b1c9cf1b546")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
@property
@@ -45,7 +48,7 @@ class Libaec(CMakePackage):
if not libs:
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
return libs
diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py
index 9e01952ff8..46f1579264 100644
--- a/var/spack/repos/builtin/packages/libaio/package.py
+++ b/var/spack/repos/builtin/packages/libaio/package.py
@@ -17,7 +17,7 @@ class Libaio(MakefilePackage):
I/O operations associated with a given completion group.
"""
- homepage = "http://lse.sourceforge.net/io/aio.html"
+ homepage = "https://lse.sourceforge.net/io/aio.html"
url = (
"https://debian.inf.tu-dresden.de/debian/pool/main/liba/libaio/libaio_0.3.110.orig.tar.gz"
)
@@ -27,6 +27,8 @@ class Libaio(MakefilePackage):
version("0.3.113", sha256="2c44d1c5fd0d43752287c9ae1eb9c023f04ef848ea8d4aafa46e9aedb678200b")
version("0.3.110", sha256="e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e")
+ depends_on("c", type="build") # generated
+
conflicts("platform=darwin", msg="libaio is a linux specific library")
@property
diff --git a/var/spack/repos/builtin/packages/libao/package.py b/var/spack/repos/builtin/packages/libao/package.py
index d93e765e2f..1326940964 100644
--- a/var/spack/repos/builtin/packages/libao/package.py
+++ b/var/spack/repos/builtin/packages/libao/package.py
@@ -18,6 +18,8 @@ class Libao(AutotoolsPackage):
version("1.2.0", sha256="5ec2d15ee39f218e93a87f5cc8508aaebf5c8b544f42488dcb2b504d97392c99")
version("1.1.0", sha256="69edc39fa2759133edfcdee0ec47559067a1a8e7cd718db0eb3c82ca4254aa6b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libapplewm/package.py b/var/spack/repos/builtin/packages/libapplewm/package.py
index d3d4d579ff..203ac43679 100644
--- a/var/spack/repos/builtin/packages/libapplewm/package.py
+++ b/var/spack/repos/builtin/packages/libapplewm/package.py
@@ -11,21 +11,22 @@ class Libapplewm(AutotoolsPackage, XorgPackage):
extension. This extension allows X window managers to better interact with
the Mac OS X Aqua user interface when running X11 in a rootless mode."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libAppleWM"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libAppleWM"
xorg_mirror_path = "lib/libAppleWM-1.4.1.tar.gz"
license("MIT")
version("1.4.1", sha256="d7fb098d65ad4d840f60e5c92de7f58f1725bd70d0d132755ea453462fd50049")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("applewmproto@1.4:")
+ depends_on("xextproto", type="build")
+ depends_on("applewmproto@1.4:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
- # Crashes with this error message on Linux:
- # HIServices/Processes.h: No such file or directory
- # May only build properly on macOS?
+ conflicts("platform=linux", msg="AppleWM is only available for macOS")
+ conflicts("platform=windows", msg="AppleWM is only available for macOS")
diff --git a/var/spack/repos/builtin/packages/libapreq2/package.py b/var/spack/repos/builtin/packages/libapreq2/package.py
index 39bad41c7b..4eda5032cf 100644
--- a/var/spack/repos/builtin/packages/libapreq2/package.py
+++ b/var/spack/repos/builtin/packages/libapreq2/package.py
@@ -21,6 +21,8 @@ class Libapreq2(AutotoolsPackage):
version("2.12", sha256="75cc1daa60e781270178c8f9fbe9c68231a7bc96bcc5c7a970cfce75d784b568")
version("2.08", sha256="9f491588957415ebe0decdf6758fcb5c0d3eaf05a573bdd51de499ae111ffc53")
+ depends_on("c", type="build") # generated
+
depends_on("apr")
depends_on("apr-util")
depends_on("httpd")
diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py
index 2535451109..124b8a25f0 100644
--- a/var/spack/repos/builtin/packages/libarchive/package.py
+++ b/var/spack/repos/builtin/packages/libarchive/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.util.environment import is_system_path
class Libarchive(AutotoolsPackage):
@@ -18,11 +17,42 @@ class Libarchive(AutotoolsPackage):
license("BSD-2-Clause AND BSD-3-Clause AND Public-Domain")
- version("3.7.1", sha256="5d24e40819768f74daf846b99837fc53a3a9dcdf3ce1c2003fe0596db850f0f0")
- version("3.7.0", sha256="d937886a14b48c4287c4d343644feb294a14b31b7926ba9a4f1777123ce7c2cc")
- version("3.6.2", sha256="ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3")
+ version("3.7.6", sha256="b4071807367b15b72777c2eaac80f42c8ea2d20212ab279514a19fe1f6f96ef4")
+ version("3.7.5", sha256="37556113fe44d77a7988f1ef88bf86ab68f53d11e85066ffd3c70157cc5110f1")
# Deprecated versions
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-48957
+ version(
+ "3.7.4",
+ sha256="7875d49596286055b52439ed42f044bd8ad426aa4cc5aabd96bfe7abb971d5e8",
+ deprecated=True,
+ )
+ version(
+ "3.7.3",
+ sha256="f27a97bc22ceb996e72502df47dc19f99f9a0f09181ae909f09f3c9eb17b67e2",
+ deprecated=True,
+ )
+ version(
+ "3.7.2",
+ sha256="df404eb7222cf30b4f8f93828677890a2986b66ff8bf39dac32a804e96ddf104",
+ deprecated=True,
+ )
+ version(
+ "3.7.1",
+ sha256="5d24e40819768f74daf846b99837fc53a3a9dcdf3ce1c2003fe0596db850f0f0",
+ deprecated=True,
+ )
+ version(
+ "3.7.0",
+ sha256="d937886a14b48c4287c4d343644feb294a14b31b7926ba9a4f1777123ce7c2cc",
+ deprecated=True,
+ )
+ version(
+ "3.6.2",
+ sha256="ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3",
+ deprecated=True,
+ )
+
# https://nvd.nist.gov/vuln/detail/CVE-2021-31566
version(
"3.5.2",
@@ -65,6 +95,9 @@ class Libarchive(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"libs",
default="static,shared",
@@ -131,11 +164,11 @@ class Libarchive(AutotoolsPackage):
args += self.with_or_without("xar")
args += self.enable_or_disable("programs")
- if "+iconv" in spec:
- if spec["iconv"].name == "libc":
+ if spec.satisfies("+iconv"):
+ if spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={p}".format(p=spec["iconv"].prefix))
else:
args.append("--without-iconv")
diff --git a/var/spack/repos/builtin/packages/libasr/package.py b/var/spack/repos/builtin/packages/libasr/package.py
index f4bd5bde80..b01cd9c053 100644
--- a/var/spack/repos/builtin/packages/libasr/package.py
+++ b/var/spack/repos/builtin/packages/libasr/package.py
@@ -16,3 +16,5 @@ class Libasr(AutotoolsPackage):
version("1.0.4", sha256="19fb6bed10d15c9775c8d008cd1130155917ae4e801c729fe85e6d88a545dab4")
version("1.0.3", sha256="9cd88e0172e6d426438875e09229d1d473d56db546d02b630f9dd14db226d68d")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libassuan/package.py b/var/spack/repos/builtin/packages/libassuan/package.py
index 8ba17f7144..ccd55d3e18 100644
--- a/var/spack/repos/builtin/packages/libassuan/package.py
+++ b/var/spack/repos/builtin/packages/libassuan/package.py
@@ -2,15 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
from spack.package import *
class Libassuan(AutotoolsPackage):
- """Libassuan is a small library implementing the so-called Assuan
- protocol.
- """
+ """Libassuan is a small library implementing the so-called Assuan protocol."""
homepage = "https://gnupg.org/software/libassuan/index.html"
url = "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.4.5.tar.bz2"
@@ -19,6 +15,9 @@ class Libassuan(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("3.0.1", sha256="c8f0f42e6103dea4b1a6a483cb556654e97302c7465308f58363778f95f194b1")
+ version("3.0.0", sha256="0b160cbb898b852c6c04314b9a63e90ca87501305ad72a58a010f808665bbaf6")
+ version("2.5.7", sha256="0103081ffc27838a2e50479153ca105e873d3d65d8a9593282e9c94c7e6afb76")
version("2.5.6", sha256="e9fd27218d5394904e4e39788f9b1742711c3e6b41689a31aa3380bd5aa4f426")
version("2.5.5", sha256="8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4")
version("2.5.4", sha256="c080ee96b3bd519edd696cfcebdecf19a3952189178db9887be713ccbcb5fbf0")
@@ -26,11 +25,15 @@ class Libassuan(AutotoolsPackage):
version("2.4.5", sha256="fbfea5d1dbcdee34f2597b0afb3d8bb4eda96c924a1e01b01c2acde68b81625f")
version("2.4.3", sha256="22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71")
+ depends_on("c", type="build") # generated
+
depends_on("libgpg-error@1.17:")
+ conflicts("platform=darwin", when="@3")
+
def configure_args(self):
return [
"--enable-static",
"--enable-shared",
- "--with-libgpg-error-prefix=" + self.spec["libgpg-error"].prefix,
+ f"--with-libgpg-error-prefix={self.spec['libgpg-error'].prefix}",
]
diff --git a/var/spack/repos/builtin/packages/libatasmart/package.py b/var/spack/repos/builtin/packages/libatasmart/package.py
index ee2dd4dfea..966cabfea8 100644
--- a/var/spack/repos/builtin/packages/libatasmart/package.py
+++ b/var/spack/repos/builtin/packages/libatasmart/package.py
@@ -19,6 +19,8 @@ class Libatasmart(AutotoolsPackage):
version("0.18", sha256="4a6e93fbaec2d4caffb06ddd47c2c35ea4ad2d3d22e805bf284adba949f64ddf")
version("0.17", sha256="353b2ec097814254989a809fd495f95a315e608fdf320c2b96dc52d70392e955")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libatomic-ops/package.py b/var/spack/repos/builtin/packages/libatomic-ops/package.py
index f03e958862..da7561ebe2 100644
--- a/var/spack/repos/builtin/packages/libatomic-ops/package.py
+++ b/var/spack/repos/builtin/packages/libatomic-ops/package.py
@@ -15,11 +15,14 @@ class LibatomicOps(AutotoolsPackage):
license("GPL-2.0-only")
+ version("7.8.2", sha256="d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51")
version("7.8.0", sha256="15676e7674e11bda5a7e50a73f4d9e7d60452271b8acf6fd39a71fefdf89fa31")
version("7.6.14", sha256="390f244d424714735b7050d056567615b3b8f29008a663c262fb548f1802d292")
version("7.6.12", sha256="f0ab566e25fce08b560e1feab6a3db01db4a38e5bc687804334ef3920c549f3e")
version("7.6.6", sha256="99feabc5f54877f314db4fadeb109f0b3e1d1a54afb6b4b3dfba1e707e38e074")
version("7.4.4", sha256="bf210a600dd1becbf7936dd2914cf5f5d3356046904848dcfd27d0c8b12b6f8f")
+ depends_on("c", type="build") # generated
+
def configure_args(self):
return ["--enable-shared"]
diff --git a/var/spack/repos/builtin/packages/libavif/package.py b/var/spack/repos/builtin/packages/libavif/package.py
new file mode 100644
index 0000000000..5889f39d40
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libavif/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libavif(CMakePackage):
+ """libavif - Library for encoding and decoding .avif files."""
+
+ homepage = "https://github.com/AOMediaCodec/libavif"
+ url = "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz"
+
+ license("bsd-2-clause")
+
+ version("1.1.1", sha256="914662e16245e062ed73f90112fbb4548241300843a7772d8d441bb6859de45b")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.13:", type="build")
+
+ def cmake_args(self):
+ return [
+ self.define("AVIF_JPEG", False),
+ self.define("AVIF_LIBYUV", False),
+ self.define("AVIF_ZLIBPNG", False),
+ ]
diff --git a/var/spack/repos/builtin/packages/libbacktrace/package.py b/var/spack/repos/builtin/packages/libbacktrace/package.py
index 7c25877627..a2379f591d 100644
--- a/var/spack/repos/builtin/packages/libbacktrace/package.py
+++ b/var/spack/repos/builtin/packages/libbacktrace/package.py
@@ -17,6 +17,8 @@ class Libbacktrace(AutotoolsPackage):
version("master", branch="master")
version("2020-02-19", commit="ca0de0517f3be44fedf5a2c01cfaf6437d4cae68")
+ depends_on("c", type="build") # generated
+
variant("shared", default=False, description="Additionally build shared library")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/libbeagle/package.py b/var/spack/repos/builtin/packages/libbeagle/package.py
index 4fff19fe9c..312c98ebf8 100644
--- a/var/spack/repos/builtin/packages/libbeagle/package.py
+++ b/var/spack/repos/builtin/packages/libbeagle/package.py
@@ -22,6 +22,9 @@ class Libbeagle(AutotoolsPackage, CudaPackage):
url="https://github.com/beagle-dev/beagle-lib/archive/beagle_release_2_1_2.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -45,7 +48,7 @@ class Libbeagle(AutotoolsPackage, CudaPackage):
def patch(self):
# update cuda architecture if necessary
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
archflag = "-arch=compute_{0}".format(cuda_arch)
@@ -70,12 +73,12 @@ class Libbeagle(AutotoolsPackage, CudaPackage):
"--disable-march-native"
]
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
args.append("--with-cuda={0}".format(self.spec["cuda"].prefix))
else:
args.append("--without-cuda")
- if "+opencl" in self.spec:
+ if self.spec.satisfies("+opencl"):
args.append("--with-opencl={0}".format(self.spec["opencl"].prefix))
else:
args.append("--without-opencl")
diff --git a/var/spack/repos/builtin/packages/libbeato/package.py b/var/spack/repos/builtin/packages/libbeato/package.py
index 2179a6de31..5ff0acb1a1 100644
--- a/var/spack/repos/builtin/packages/libbeato/package.py
+++ b/var/spack/repos/builtin/packages/libbeato/package.py
@@ -17,3 +17,5 @@ class Libbeato(AutotoolsPackage):
license("GPL-3.0-or-later")
version("master", branch="master")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libbigwig/package.py b/var/spack/repos/builtin/packages/libbigwig/package.py
index 430c6d5593..8a6cde1b8d 100644
--- a/var/spack/repos/builtin/packages/libbigwig/package.py
+++ b/var/spack/repos/builtin/packages/libbigwig/package.py
@@ -17,6 +17,8 @@ class Libbigwig(CMakePackage):
version("0.4.7", sha256="8e057797011d93fa00e756600898af4fe6ca2d48959236efc9f296abe94916d9")
+ depends_on("c", type="build") # generated
+
variant("curl", default=True, description="Build with curl support")
depends_on("curl", when="+curl")
diff --git a/var/spack/repos/builtin/packages/libbinio/package.py b/var/spack/repos/builtin/packages/libbinio/package.py
index 3d086a5550..0206ca9b15 100644
--- a/var/spack/repos/builtin/packages/libbinio/package.py
+++ b/var/spack/repos/builtin/packages/libbinio/package.py
@@ -16,3 +16,5 @@ class Libbinio(AutotoolsPackage):
version("1.5", sha256="398b2468e7838d2274d1f62dbc112e7e043433812f7ae63ef29f5cb31dc6defd")
version("1.4", sha256="4a32d3154517510a3fe4f2dc95e378dcc818a4a921fc0cb992bdc0d416a77e75")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libblastrampoline/package.py b/var/spack/repos/builtin/packages/libblastrampoline/package.py
index c7c498e97d..f10e7089ce 100644
--- a/var/spack/repos/builtin/packages/libblastrampoline/package.py
+++ b/var/spack/repos/builtin/packages/libblastrampoline/package.py
@@ -17,6 +17,9 @@ class Libblastrampoline(MakefilePackage):
license("MIT")
+ version("5.11.0", sha256="4ea6c134843bd868f78d7ee0c61bf8bdda5334f20deaa6d3cd5bc6caafc4af17")
+ version("5.10.1", sha256="1185a2a85453827823c224727e7cd665b7af8f48af5d2cd0225bd45389112e81")
+ version("5.9.0", sha256="fe62c48eab6000a348d6d0cc3f2ebd2c38c6cae460468b56539b8438d42dc589")
version("5.8.0", sha256="aeceb01ebebdd1068a1147b636451c46c16d64f9e22694075abda4dddfffe13d")
version("5.4.0", sha256="e1a2258b0ad31cc41e6e9b8ba36f5c239fd1a267f2657ef3d3f669cc5b811f6a")
version("5.3.0", sha256="95bca73f1567e2acd1110d0dfe5bb58fc86718555cd6eab89f0a769534df3b62")
@@ -41,6 +44,8 @@ class Libblastrampoline(MakefilePackage):
version("3.0.0", sha256="4d0856d30e7ba0cb0de08b08b60fd34879ce98714341124acf87e587d1bbbcde")
version("2.2.0", sha256="1fb8752891578b45e187019c67fccbaafb108756aadc69bdd876033846ad30d3")
+ depends_on("c", type="build") # generated
+
build_directory = "src"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libbsd/package.py b/var/spack/repos/builtin/packages/libbsd/package.py
index d880d3fd4e..a3718c8217 100644
--- a/var/spack/repos/builtin/packages/libbsd/package.py
+++ b/var/spack/repos/builtin/packages/libbsd/package.py
@@ -21,6 +21,8 @@ class Libbsd(AutotoolsPackage):
license("BSD-3-Clause")
+ version("0.12.2", sha256="b88cc9163d0c652aaf39a99991d974ddba1c3a9711db8f1b5838af2a14731014")
+ version("0.12.1", sha256="d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a")
version("0.11.7", sha256="9baa186059ebbf25c06308e9f991fda31f7183c0f24931826d83aa6abd8a0261")
version("0.11.6", sha256="19b38f3172eaf693e6e1c68714636190c7e48851e45224d720b3b5bc0499b5df")
version("0.11.5", sha256="1a9c952525635c1bb6770cb22e969b938d8e6a9d7912362b98ee8370599b0efd")
@@ -34,6 +36,8 @@ class Libbsd(AutotoolsPackage):
version("0.8.7", sha256="f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31")
version("0.8.6", sha256="467fbf9df1f49af11f7f686691057c8c0a7613ae5a870577bef9155de39f9687")
+ depends_on("c", type="build") # generated
+
patch("cdefs.h.patch", when="@0.8.6 %gcc@:4")
patch("local-elf.h.patch", when="@:0.10 %intel")
diff --git a/var/spack/repos/builtin/packages/libbson/package.py b/var/spack/repos/builtin/packages/libbson/package.py
index f394f66841..1584f5bd29 100644
--- a/var/spack/repos/builtin/packages/libbson/package.py
+++ b/var/spack/repos/builtin/packages/libbson/package.py
@@ -3,18 +3,20 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import cmake
from spack.package import *
-class Libbson(Package):
+class Libbson(AutotoolsPackage, CMakePackage):
"""libbson is a library providing useful routines related to building,
parsing, and iterating BSON documents."""
homepage = "https://github.com/mongodb/mongo-c-driver"
- url = "https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz"
+ url = "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.25.0.tar.gz"
maintainers("michaelkuhn")
+ version("1.27.2", sha256="a53010803e2df097a2ea756be6ece34c8f52cda2c18e6ea21115097b75f5d4bf")
version("1.24.4", sha256="2f4a3e8943bfe3b8672c2053f88cf74acc8494dc98a45445f727901eee141544")
version("1.23.4", sha256="209406c91fcf7c63aa633179a0a6b1b36ba237fb77e0470fd81f7299a408e334")
version("1.23.3", sha256="c8f951d4f965d455f37ae2e10b72914736fc0f25c4ffc14afc3cbadd1a574ef6")
@@ -33,52 +35,48 @@ class Libbson(Package):
version("1.7.0", sha256="442d89e89dfb43bba1f65080dc61fdcba01dcb23468b2842c1dbdd4acd6049d3")
version("1.6.3", sha256="e9e4012a9080bdc927b5060b126a2c82ca11e71ebe7f2152d079fa2ce461a7fb")
version("1.6.2", sha256="aad410123e4bd8a9804c3c3d79e03344e2df104872594dc2cf19605d492944ba")
- version("1.6.1", sha256="5f160d44ea42ce9352a7a3607bc10d3b4b22d3271763aa3b3a12665e73e3a02d")
+ version(
+ "1.6.1",
+ sha256="5f160d44ea42ce9352a7a3607bc10d3b4b22d3271763aa3b3a12665e73e3a02d",
+ deprecated=True,
+ )
- depends_on("cmake@3.1:", type="build", when="@1.10.0:")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
- depends_on("autoconf", type="build", when="@1.6.1")
- depends_on("automake", type="build", when="@1.6.1")
- depends_on("libtool", type="build", when="@1.6.1")
- depends_on("m4", type="build", when="@1.6.1")
+ with when("build_system=cmake"):
+ depends_on("cmake@3.1:", type="build")
+
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build", when="@1.6.1")
+ depends_on("automake", type="build", when="@1.6.1")
+ depends_on("libtool", type="build", when="@1.6.1")
+
+ build_system(
+ conditional("cmake", when="@1.10:"),
+ conditional("autotools", when="@:1.9"),
+ default="cmake",
+ )
def url_for_version(self, version):
+ if version >= Version("1.25.0"):
+ return f"https://github.com/mongodb/mongo-c-driver/archive/refs/tags/{version}.tar.gz"
if version >= Version("1.10.0"):
- url = "https://github.com/mongodb/mongo-c-driver/releases/download/{0}/mongo-c-driver-{0}.tar.gz"
+ return f"https://github.com/mongodb/mongo-c-driver/releases/download/{version}/mongo-c-driver-{version}.tar.gz"
else:
- url = "https://github.com/mongodb/libbson/releases/download/{0}/libbson-{0}.tar.gz"
-
- return url.format(version)
-
- def cmake_args(self):
- args = ["-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF", "-DENABLE_MONGOC=OFF"]
-
- return args
-
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- # We cannot simply do
- # cmake('..', *std_cmake_args, *self.cmake_args())
- # because that is not Python 2 compatible. Instead, collect
- # arguments into a temporary buffer first.
- args = []
- args.extend(std_cmake_args)
- args.extend(self.cmake_args())
- cmake("..", *args)
- make()
- make("install")
+ return f"https://github.com/mongodb/libbson/releases/download/{version}/libbson-{version}.tar.gz"
@property
def force_autoreconf(self):
# 1.6.1 tarball is broken
return self.spec.satisfies("@1.6.1")
- @when("@:1.9")
- def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix))
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [
+ self.define("ENABLE_AUTOMATIC_INIT_AND_CLEANUP", False),
+ self.define("ENABLE_MONGOC", False),
+ self.define("MONGO_USE_CCACHE", False),
+ self.define("MONGO_USE_LLD", False),
+ ]
diff --git a/var/spack/repos/builtin/packages/libbytesize/package.py b/var/spack/repos/builtin/packages/libbytesize/package.py
index 9c36c2d8aa..7a0102b8f9 100644
--- a/var/spack/repos/builtin/packages/libbytesize/package.py
+++ b/var/spack/repos/builtin/packages/libbytesize/package.py
@@ -19,6 +19,8 @@ class Libbytesize(AutotoolsPackage):
version("2.3", sha256="3c74113fc8cd1a2fbd8870fa0ed7cef2ef24d60ef91e7145fbc041f9aa144479")
version("2.2", sha256="b93c54b502880c095c9f5767a42464853e2687db2e5e3084908a615bafe73baa")
+ depends_on("c", type="build") # generated
+
extends("python")
depends_on("pcre2")
depends_on("gmp")
diff --git a/var/spack/repos/builtin/packages/libc/package.py b/var/spack/repos/builtin/packages/libc/package.py
deleted file mode 100644
index 2a1f13739b..0000000000
--- a/var/spack/repos/builtin/packages/libc/package.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Libc(BundlePackage):
- """Dummy package to provide interfaces available in libc."""
-
- homepage = "https://en.wikipedia.org/wiki/C_standard_library"
-
- version("1.0") # Dummy
-
- variant("iconv", default=False, description="Provides interfaces for Localization Functions")
- variant("rpc", default=False, description="Provides interfaces for RPC")
-
- provides("iconv", when="+iconv")
- provides("rpc", when="+rpc")
-
- @property
- def libs(self):
- return LibraryList([])
diff --git a/var/spack/repos/builtin/packages/libcanberra/package.py b/var/spack/repos/builtin/packages/libcanberra/package.py
index ba94f92309..7e09b89f09 100644
--- a/var/spack/repos/builtin/packages/libcanberra/package.py
+++ b/var/spack/repos/builtin/packages/libcanberra/package.py
@@ -18,6 +18,8 @@ class Libcanberra(AutotoolsPackage):
version("0.30", sha256="c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72")
+ depends_on("c", type="build") # generated
+
# TODO: Add variants and dependencies for the following audio support:
# ALSA, OSS, PulseAudio, udev, GStreamer, null, GTK3+ , tdb
@@ -37,14 +39,14 @@ class Libcanberra(AutotoolsPackage):
depends_on("gtkplus", when="+gtk")
depends_on("libvorbis")
- depends_on("libtool", type="build")
+ depends_on("libtool", type="link") # libltdl
depends_on("pkgconfig", type="build")
def configure_args(self):
args = ["--enable-static"]
- if "+gtk" in self.spec:
+ if self.spec.satisfies("+gtk"):
args.append("--enable-gtk")
else:
args.append("--disable-gtk")
diff --git a/var/spack/repos/builtin/packages/libcap-ng/package.py b/var/spack/repos/builtin/packages/libcap-ng/package.py
index 373cf7c399..064fd9b5d0 100644
--- a/var/spack/repos/builtin/packages/libcap-ng/package.py
+++ b/var/spack/repos/builtin/packages/libcap-ng/package.py
@@ -19,6 +19,8 @@ class LibcapNg(AutotoolsPackage):
version("0.7.11", sha256="78f32ff282b49b7b91c56d317fb6669df26da332c6fc9462870cec2573352222")
version("0.7.10", sha256="c3c156a215e5be5430b2f3b8717bbd1afdabe458b6068a8d163e71cefe98fc32")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -33,7 +35,7 @@ class LibcapNg(AutotoolsPackage):
def setup_build_environment(self, env):
if self.spec.satisfies("+python"):
- env.set("PYTHON", self.spec["python"].command.path)
+ env.set("PYTHON", python.path)
def configure_args(self):
args = []
diff --git a/var/spack/repos/builtin/packages/libcap/package.py b/var/spack/repos/builtin/packages/libcap/package.py
index 6dedb75748..8793f4bd6d 100644
--- a/var/spack/repos/builtin/packages/libcap/package.py
+++ b/var/spack/repos/builtin/packages/libcap/package.py
@@ -17,6 +17,7 @@ class Libcap(MakefilePackage):
license("BSD-3-Clause OR GPL-2.0-only")
+ version("2.69", sha256="3a99ec26452e328e0ea408efd67096ef914f4ee4788fa8e8e21f214e2bd670b9")
version("2.68", sha256="046e55716e0643b565efcd1dab1d26c5625709fcd0b5c271290c7ea1524cf906")
version("2.67", sha256="2d0b679a431c06afd8651a8ada906303eda8b3ac67c308e5fe1937eea5c018aa")
version("2.66", sha256="5f65dc5b2e9f63a0748ea1b05be7965a38548db1cbfd53b30271ff02186b3a4a")
@@ -24,6 +25,8 @@ class Libcap(MakefilePackage):
version("2.64", sha256="e9ec608ae5720989d7274531f9898d64b6bca2491a231b8091229e49891933dd")
version("2.25", sha256="4ca80dc6f9f23d14747e4b619fd9784434c570e24a7346f326c692784ed83a86")
+ depends_on("c", type="build") # generated
+
patch("libcap-fix-the-libcap-native-building-failure-on-CentOS-6.7.patch", when="@2.25")
def makeflags(self, prefix):
@@ -33,7 +36,7 @@ class Libcap(MakefilePackage):
"USE_GPERF=no",
"SHARED=yes",
"lib=lib",
- "prefix={}".format(prefix),
+ f"prefix={prefix}",
]
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libcatalyst/package.py b/var/spack/repos/builtin/packages/libcatalyst/package.py
index ce3a4c7e9f..bf10c56b43 100644
--- a/var/spack/repos/builtin/packages/libcatalyst/package.py
+++ b/var/spack/repos/builtin/packages/libcatalyst/package.py
@@ -16,19 +16,29 @@ class Libcatalyst(CMakePackage):
homepage = "https://gitlab.kitware.com/paraview/catalyst"
git = "https://gitlab.kitware.com/paraview/catalyst.git"
- url = "https://gitlab.kitware.com/api/v4/projects/paraview%2Fcatalyst/packages/generic/catalyst/v2.0.0/catalyst-v2.0.0.tar.gz"
+ url = "https://gitlab.kitware.com/api/v4/projects/5912/packages/generic/catalyst/v2.0.0/catalyst-v2.0.0.tar.gz"
license("BSD-3-Clause")
maintainers("mathstuf", "ayenpure")
version("master", branch="master")
- version("2.0.0-rc4", sha256="cb491e4ccd344156cc2494f65b9f38885598c16d12e1016c36e2ee0bc3640863")
+ version("2.0.0", sha256="5842b690bd8afa635414da9b9c5e5d79fa37879b0d382428d0d8e26ba5374828")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+ depends_on("pkgconfig", type="build")
variant("mpi", default=False, description="Enable MPI support")
variant("conduit", default=False, description="Use external Conduit for Catalyst")
+ variant("fortran", default=False, description="Enable Fortran wrapping")
+ variant("python", default=False, description="Enable Python wrapping")
depends_on("mpi", when="+mpi")
depends_on("conduit", when="+conduit")
+ depends_on("cmake@3.26:", type="build")
+ depends_on("python@3:", when="+python")
+ depends_on("py-numpy", when="+python", type=("build", "link", "run"))
def cmake_args(self):
"""Populate cmake arguments for libcatalyst."""
@@ -36,6 +46,8 @@ class Libcatalyst(CMakePackage):
"-DCATALYST_BUILD_TESTING=OFF",
self.define_from_variant("CATALYST_USE_MPI", "mpi"),
self.define_from_variant("CATALYST_WITH_EXTERNAL_CONDUIT", "conduit"),
+ self.define_from_variant("CATALYST_WRAP_FORTRAN", "fortran"),
+ self.define_from_variant("CATALYST_WRAP_PYTHON", "python"),
]
return args
diff --git a/var/spack/repos/builtin/packages/libceed/package.py b/var/spack/repos/builtin/packages/libceed/package.py
index 3f4f4f3764..5900047a79 100644
--- a/var/spack/repos/builtin/packages/libceed/package.py
+++ b/var/spack/repos/builtin/packages/libceed/package.py
@@ -17,7 +17,7 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
license("BSD-2-Clause")
version("develop", branch="main")
- version("0.12.0", tag="v0.12.0", commit="60ef3feef7f5137af55ea7336903743d94ee71a8")
+ version("0.12.0", tag="v0.12.0", commit="4018a20a98d451fac24765d3ddb936861647ce8d")
version("0.11.0", tag="v0.11.0", commit="8ec64e9ae9d5df169dba8c8ee61d8ec8907b8f80")
version("0.10.1", tag="v0.10.1", commit="74532b27052d94e943eb8bc76257fbd710103614")
version("0.9", tag="v0.9.0", commit="d66340f5aae79e564186ab7514a1cd08b3a1b06b")
@@ -31,15 +31,18 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
version("0.2", tag="v0.2", commit="113004cb41757b819325a4b3a8a7dfcea5156531")
version("0.1", tag="v0.1", commit="74e0540e2478136394f75869675056eb6aba67cc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("occa", default=False, description="Enable OCCA backends")
variant("debug", default=False, description="Enable debug build")
variant("libxsmm", default=False, description="Enable LIBXSMM backend", when="@0.3:")
variant("magma", default=False, description="Enable MAGMA backend", when="@0.6:")
- conflicts("+rocm", when="@:0.6")
+ conflicts("+rocm", when="@:0.7")
with when("+rocm"):
- depends_on("hip@3.8.0", when="@0.7:0.7.99")
depends_on("hip@3.8.0:", when="@0.8:")
depends_on("hipblas@3.8.0:", when="@0.8:")
@@ -73,12 +76,12 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
# Use verbose building output
makeopts = ["V=1"]
- if "@:0.2" in spec:
- makeopts += ["NDEBUG=%s" % ("" if "+debug" in spec else "1")]
+ if spec.satisfies("@:0.2"):
+ makeopts += ["NDEBUG=%s" % ("" if spec.satisfies("+debug") else "1")]
- elif "@0.4:" in spec:
+ elif spec.satisfies("@0.4:"):
# Determine options based on the compiler:
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
opt = "-g"
elif compiler.name == "gcc":
opt = "-O3 -g -ffp-contract=fast"
@@ -111,7 +114,7 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
if spec.satisfies("@:0.7") and "avx" in self.spec.target:
makeopts.append("AVX=1")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
makeopts += ["CUDA_DIR=%s" % spec["cuda"].prefix]
makeopts += ["CUDA_ARCH=sm_%s" % spec.variants["cuda_arch"].value]
if spec.satisfies("@:0.4"):
@@ -125,17 +128,17 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage):
# Disable CUDA auto-detection:
makeopts += ["CUDA_DIR=/disable-cuda"]
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
makeopts += ["HIP_DIR=%s" % spec["hip"].prefix]
amdgpu_target = ",".join(spec.variants["amdgpu_target"].value)
makeopts += ["HIP_ARCH=%s" % amdgpu_target]
if spec.satisfies("@0.8"):
makeopts += ["HIPBLAS_DIR=%s" % spec["hipblas"].prefix]
- if "+libxsmm" in spec:
+ if spec.satisfies("+libxsmm"):
makeopts += ["XSMM_DIR=%s" % spec["libxsmm"].prefix]
- if "+magma" in spec:
+ if spec.satisfies("+magma"):
makeopts += ["MAGMA_DIR=%s" % spec["magma"].prefix]
return makeopts
diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py
index fb84326608..a00b140f9e 100644
--- a/var/spack/repos/builtin/packages/libcerf/package.py
+++ b/var/spack/repos/builtin/packages/libcerf/package.py
@@ -14,11 +14,14 @@ class Libcerf(AutotoolsPackage, SourceforgePackage):
"""
- homepage = "https://sourceforge.net/projects/libcerf"
+ homepage = "https://sourceforge.net/projects/libcerf/"
sourceforge_mirror_path = "libcerf/libcerf-1.3.tgz"
version("1.3", sha256="d7059e923d3f370c89fb4d19ed4f827d381bc3f0e36da5595a04aeaaf3e6a859")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def configure_args(self):
spec = self.spec
options = []
diff --git a/var/spack/repos/builtin/packages/libcgroup/package.py b/var/spack/repos/builtin/packages/libcgroup/package.py
index 8c56473351..67cd8e8ec2 100644
--- a/var/spack/repos/builtin/packages/libcgroup/package.py
+++ b/var/spack/repos/builtin/packages/libcgroup/package.py
@@ -9,14 +9,20 @@ from spack.package import *
class Libcgroup(AutotoolsPackage):
"""Library of control groups."""
- homepage = "https://sourceforge.net/projects/libcg/"
- url = "https://sourceforge.net/projects/libcg/files/libcgroup/v0.41/libcgroup-0.41.tar.bz2"
+ homepage = "https://github.com/libcgroup/libcgroup/"
+ url = "https://github.com/libcgroup/libcgroup/releases/download/v3.1.0/libcgroup-3.1.0.tar.gz"
license("LGPL-2.1-only")
- version("0.41", sha256="e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51")
- version("0.37", sha256="15c8f3febb546530d3495af4e4904b3189c273277ca2d8553dec882cde1cd0f6")
- version("0.36", sha256="8dcd2ae220435b3de736d3efb0023fdf1192d7a7f4032b439f3cf5342cff7b4c")
+ version("3.1.0", sha256="976ec4b1e03c0498308cfd28f1b256b40858f636abc8d1f9db24f0a7ea9e1258")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2018-14348
+ version("0.41", sha256="e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51")
+ version("0.37", sha256="15c8f3febb546530d3495af4e4904b3189c273277ca2d8553dec882cde1cd0f6")
+ version("0.36", sha256="8dcd2ae220435b3de736d3efb0023fdf1192d7a7f4032b439f3cf5342cff7b4c")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("m4", type="build")
depends_on("autoconf", type="build")
@@ -25,3 +31,10 @@ class Libcgroup(AutotoolsPackage):
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("linux-pam")
+ depends_on("systemd", when="@3.1:")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@2.0.1:"):
+ return f"https://github.com/libcgroup/libcgroup/releases/download/v{version}/libcgroup-{version}.tar.gz"
+ else:
+ return f"https://github.com/libcgroup/libcgroup/releases/download/v{version}/libcgroup-{version}.tar.bz2"
diff --git a/var/spack/repos/builtin/packages/libcint/package.py b/var/spack/repos/builtin/packages/libcint/package.py
index 8273d63b38..cb9ec5aec2 100644
--- a/var/spack/repos/builtin/packages/libcint/package.py
+++ b/var/spack/repos/builtin/packages/libcint/package.py
@@ -11,13 +11,15 @@ class Libcint(CMakePackage):
homepage = "https://github.com/sunqm/libcint"
url = "https://github.com/sunqm/libcint/archive/v3.0.4.tar.gz"
- maintainers("mfherbst")
+ maintainers("mfherbst", "bruneval")
license("BSD-2-Clause")
#
# Versions
#
+ version("6.1.2", sha256="8287e1eaf2b8c8e19eb7a8ea92fd73898f0884023c503b84624610400adb25c4")
+ version("5.5.0", sha256="c822a9a454587d935287de0f64a2c2cf5338323a554a3f34bcfb4a2892daf477")
version("5.3.0", sha256="9d4fae074b53a8ce0335e2672d423deca2bda6df8020352e59d23c17a0c1239d")
version("5.2.0", sha256="f9dba1040c445ee81ae5a2a59d9f1291fc0406edad0fb5ea37fceb66c2ef7799")
version("5.1.3", sha256="a239275a0464360c904fd06e67d2e76ef1147e04bc634befb40c67d3e79b3638")
@@ -31,6 +33,9 @@ class Libcint(CMakePackage):
version("3.0.5", sha256="7bde241ce83c00b89c80459e3af5734d40925d8fd9fcaaa7245f61b08192c722")
version("3.0.4", sha256="0f25ef7ad282dd7a20e4decf283558e4f949243a5423ff4c0cd875276c310c47")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
#
# Variants
#
@@ -63,11 +68,11 @@ class Libcint(CMakePackage):
def cmake_args(self):
spec = self.spec
args = [
- "-DWITH_RANGE_COULOMB=" + str("+coulomb_erf" in spec),
- "-DPYPZPX=" + str("+pypzpx" in spec),
- "-DWITH_F12=" + str("+f12" in spec),
- "-DBUILD_SHARED_LIBS=" + str("+shared" in spec),
- "-DENABLE_TEST=" + str("+test" in spec),
+ "-DWITH_RANGE_COULOMB=" + str(spec.satisfies("+coulomb_erf")),
+ "-DPYPZPX=" + str(spec.satisfies("+pypzpx")),
+ "-DWITH_F12=" + str(spec.satisfies("+f12")),
+ "-DBUILD_SHARED_LIBS=" + str(spec.satisfies("+shared")),
+ "-DENABLE_TEST=" + str(spec.satisfies("+test")),
"-DENABLE_EXAMPLE=OFF", # Requires fortran compiler
]
return args
diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py
index 115164fd99..a07cf2bb34 100644
--- a/var/spack/repos/builtin/packages/libcircle/package.py
+++ b/var/spack/repos/builtin/packages/libcircle/package.py
@@ -26,6 +26,8 @@ class Libcircle(AutotoolsPackage):
"0.2.1-rc.1", sha256="5747f91cf4417023304dcc92fd07e3617ac712ca1eeb698880979bbca3f54865"
)
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("pkgconfig", type="build")
depends_on("libpciaccess", type="link")
diff --git a/var/spack/repos/builtin/packages/libconfig/package.py b/var/spack/repos/builtin/packages/libconfig/package.py
index a798afa49c..2b24305778 100644
--- a/var/spack/repos/builtin/packages/libconfig/package.py
+++ b/var/spack/repos/builtin/packages/libconfig/package.py
@@ -21,6 +21,9 @@ class Libconfig(AutotoolsPackage):
version("1.7.1", sha256="d288e6ae817f4ef78df43cdb2647f768dc97899ee82fcc41f857e8eb9fd7fbdb")
version("1.5", sha256="cae5c02361d8a9b2bb26946c64f089d2e5e599972f386203fbc48975c0d885c8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type=("build"))
depends_on("autoconf", type=("build"))
depends_on("automake", type=("build"))
diff --git a/var/spack/repos/builtin/packages/libconfuse/package.py b/var/spack/repos/builtin/packages/libconfuse/package.py
index e04391ba89..cdb5cc66db 100644
--- a/var/spack/repos/builtin/packages/libconfuse/package.py
+++ b/var/spack/repos/builtin/packages/libconfuse/package.py
@@ -18,6 +18,8 @@ class Libconfuse(AutotoolsPackage):
version("3.2.2", sha256="2cf7e032980aff8f488efba61510dc3fb95e9a4b9183f985dea457a5651b0e2c")
version("3.2.1", sha256="2eff8e3c300c4ed1d67fdb13f9d31a72a68e31874b4640db15334305bc40cebd")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/libcroco/package.py b/var/spack/repos/builtin/packages/libcroco/package.py
index 851b364f8d..ebb6878943 100644
--- a/var/spack/repos/builtin/packages/libcroco/package.py
+++ b/var/spack/repos/builtin/packages/libcroco/package.py
@@ -18,6 +18,8 @@ class Libcroco(AutotoolsPackage):
version("0.6.13", sha256="767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4")
version("0.6.12", sha256="ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860")
+ depends_on("c", type="build") # generated
+
variant("doc", default=False, description="Build documentation with gtk-doc")
depends_on("glib")
@@ -30,7 +32,7 @@ class Libcroco(AutotoolsPackage):
def configure_args(self):
config_args = []
- if "+doc" in self.spec:
+ if self.spec.satisfies("+doc"):
config_args.extend(
[
"--enable-gtk-doc",
diff --git a/var/spack/repos/builtin/packages/libctl/package.py b/var/spack/repos/builtin/packages/libctl/package.py
index d1ac1b9244..86332a99e9 100644
--- a/var/spack/repos/builtin/packages/libctl/package.py
+++ b/var/spack/repos/builtin/packages/libctl/package.py
@@ -25,6 +25,8 @@ class Libctl(AutotoolsPackage):
url="http://ab-initio.mit.edu/libctl/libctl-3.2.2.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("guile")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/libcudf/package.py b/var/spack/repos/builtin/packages/libcudf/package.py
index f3b56e93b4..b3fc85919d 100644
--- a/var/spack/repos/builtin/packages/libcudf/package.py
+++ b/var/spack/repos/builtin/packages/libcudf/package.py
@@ -19,6 +19,8 @@ class Libcudf(CMakePackage):
version("0.15.0", sha256="2570636b72cce4c52f71e36307f51f630e2f9ea94a1abc018d40ce919ba990e4")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.14:", type="build")
depends_on("cuda@10.0:")
diff --git a/var/spack/repos/builtin/packages/libcuml/package.py b/var/spack/repos/builtin/packages/libcuml/package.py
index 7d2b27346c..5173eb1b59 100644
--- a/var/spack/repos/builtin/packages/libcuml/package.py
+++ b/var/spack/repos/builtin/packages/libcuml/package.py
@@ -16,6 +16,8 @@ class Libcuml(CMakePackage):
version("0.15.0", sha256="5c9c656ae4eaa94a426e07d7385fd5ea0e5dc7abff806af2941aee10d4ca99c7")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.14:", type="build")
depends_on("zlib-api")
depends_on("libcudf@0.8:")
diff --git a/var/spack/repos/builtin/packages/libcumlprims/package.py b/var/spack/repos/builtin/packages/libcumlprims/package.py
index eaf7fab455..a7ae12acb2 100644
--- a/var/spack/repos/builtin/packages/libcumlprims/package.py
+++ b/var/spack/repos/builtin/packages/libcumlprims/package.py
@@ -25,6 +25,8 @@ class Libcumlprims(Package):
sha256="f055f904b5ef67995869b0bc648d9fe30839b08e77cb335573bf9f1c816d4d9b",
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cuda@11.0.0:11.0", when="@0.15.0-cuda11.0_gdbd0d39_0")
depends_on("cuda@10.2.0:10.2", when="@0.15.0-cuda10.2_gdbd0d39_0")
depends_on("cuda@10.1.0:10.1", when="@0.15.0-cuda10.1_gdbd0d39_0")
diff --git a/var/spack/repos/builtin/packages/libcxxwrap-julia/package.py b/var/spack/repos/builtin/packages/libcxxwrap-julia/package.py
index 9cdcfea1f8..e5ecdfe8fa 100644
--- a/var/spack/repos/builtin/packages/libcxxwrap-julia/package.py
+++ b/var/spack/repos/builtin/packages/libcxxwrap-julia/package.py
@@ -21,8 +21,12 @@ class LibcxxwrapJulia(CMakePackage):
# note: use the @main branch version if you're building for julia 1.7
version("main", branch="main")
+ version("0.12.5", sha256="7970ab5e2a22a7be5185d40f184fa0b3949a3e83ffdf4f1512feb4f261957312")
+ version("0.12.4", sha256="c1eafbbefd01074b4e303603e7c012518fc9ce86e055f08c0f0446bc46d50327")
version("0.9.1", sha256="d7938d88ae2dbcc6abf505df3ac280dcd7c85fca0954af56911cf510d6161e05")
version("0.8.3", sha256="b0421d11bdee5ce8af4922de6dfe3b0e5d69b07bb52894e3a22a477bbd27ee9e")
version("0.8.2", sha256="f8b171def3d61904ba8f9a9052a405c25afbfb9a3c5af3dd30bc36a0184ed539")
+ depends_on("cxx", type="build") # generated
+
depends_on("julia")
diff --git a/var/spack/repos/builtin/packages/libcyaml/package.py b/var/spack/repos/builtin/packages/libcyaml/package.py
index c1d7900697..098ea2af6e 100644
--- a/var/spack/repos/builtin/packages/libcyaml/package.py
+++ b/var/spack/repos/builtin/packages/libcyaml/package.py
@@ -15,13 +15,16 @@ class Libcyaml(MakefilePackage):
license("ISC")
+ version("1.4.1", sha256="8dbd216e1fce90f9f7cca341e5178710adc76ee360a7793ef867edb28f3e4130")
version("1.4.0", sha256="e803fef0e254aa1f302c622c2d25cff989e04e9b2bebb7d22abd91386373122f")
version("1.1.0", sha256="37a00ed8ec206b60a712acfd44196bef063b8f02e376d8e86f61a7007a81daea")
+ depends_on("c", type="build") # generated
+
depends_on("libyaml")
def build(self, spec, prefix):
make("VARIANT=release")
def install(self, spec, prefix):
- make("install", "VARIANT=release", "PREFIX={0}".format(prefix))
+ make("install", "VARIANT=release", f"PREFIX={prefix}")
diff --git a/var/spack/repos/builtin/packages/libdaemon/package.py b/var/spack/repos/builtin/packages/libdaemon/package.py
index a73e9947c0..92c127ee54 100644
--- a/var/spack/repos/builtin/packages/libdaemon/package.py
+++ b/var/spack/repos/builtin/packages/libdaemon/package.py
@@ -18,3 +18,5 @@ class Libdaemon(AutotoolsPackage):
version("0.14", sha256="fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834")
version("0.13", sha256="bd949d459d2da54f1cdfbd1f4592e32541e8a195aca56fa7a8329ed79836d709")
version("0.12", sha256="39e7c9f8644d1af310d076c1a5cc648040033e4724e7edfd85eb983ad88336d0")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libdap4/package.py b/var/spack/repos/builtin/packages/libdap4/package.py
index d69d9d34ff..6744921e27 100644
--- a/var/spack/repos/builtin/packages/libdap4/package.py
+++ b/var/spack/repos/builtin/packages/libdap4/package.py
@@ -24,6 +24,10 @@ class Libdap4(AutotoolsPackage):
version("3.20.6", sha256="e44e83043c158d8c9d0a37a1821626ab0db4a1a6578b02182440170c0b060e6d")
version("3.20.4", sha256="c39fa310985cc8963029ad0d0aba784e7dbf1f70c566bd7ae58242f1bb06d24a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -41,7 +45,7 @@ class Libdap4(AutotoolsPackage):
# during configure tests. This can cause a failure with libtirpc if the following variable
# is not set.
if self.spec.satisfies("^libtirpc"):
- env.set("TIRPC_LIBS", self.spec["rpc"].libs)
+ env.set("TIRPC_LIBS", self.spec["rpc"].libs.link_flags)
def configure_args(self):
# libxml2 exports ./include/libxml2/ instead of ./include/, which we
diff --git a/var/spack/repos/builtin/packages/libdatrie/package.py b/var/spack/repos/builtin/packages/libdatrie/package.py
index f2534674bd..0437fe8621 100644
--- a/var/spack/repos/builtin/packages/libdatrie/package.py
+++ b/var/spack/repos/builtin/packages/libdatrie/package.py
@@ -18,4 +18,6 @@ class Libdatrie(AutotoolsPackage):
version("0.2.12", sha256="452dcc4d3a96c01f80f7c291b42be11863cd1554ff78b93e110becce6e00b149")
version("0.2.11", sha256="547c7bd2ab9e10ad65f3270cae8ca7027f52db9c30f7327d24354ad41a98e94b")
+ depends_on("c", type="build") # generated
+
depends_on("doxygen@1.8.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/libdc1394/package.py b/var/spack/repos/builtin/packages/libdc1394/package.py
index b8151a70d9..f84ff749d2 100644
--- a/var/spack/repos/builtin/packages/libdc1394/package.py
+++ b/var/spack/repos/builtin/packages/libdc1394/package.py
@@ -18,6 +18,8 @@ class Libdc1394(AutotoolsPackage):
version("2.2.6", sha256="2b905fc9aa4eec6bdcf6a2ae5f5ba021232739f5be047dec8fe8dd6049c10fed")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("libusb")
depends_on("libraw1394")
diff --git a/var/spack/repos/builtin/packages/libde265/package.py b/var/spack/repos/builtin/packages/libde265/package.py
index 7e6db94a65..175c52c3a6 100644
--- a/var/spack/repos/builtin/packages/libde265/package.py
+++ b/var/spack/repos/builtin/packages/libde265/package.py
@@ -19,6 +19,9 @@ class Libde265(CMakePackage):
license("LGPL-3.0-or-later")
- version("1.0.9", sha256="153554f407718a75f1e0ae197d35b43147ce282118a54f894554dbe27c32163d")
+ version("1.0.15", sha256="d4e55706dfc5b2c5c9702940b675ce2d3e7511025c6894eaddcdbaf0b15fd3f3")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3.13:", type="build")
diff --git a/var/spack/repos/builtin/packages/libdeflate/package.py b/var/spack/repos/builtin/packages/libdeflate/package.py
index f140cb57a3..a79d5c8bea 100644
--- a/var/spack/repos/builtin/packages/libdeflate/package.py
+++ b/var/spack/repos/builtin/packages/libdeflate/package.py
@@ -22,6 +22,8 @@ class Libdeflate(MakefilePackage, CMakePackage):
version("1.10", sha256="5c1f75c285cd87202226f4de49985dcb75732f527eefba2b3ddd70a8865f2533")
version("1.7", sha256="a5e6a0a9ab69f40f0f59332106532ca76918977a974e7004977a9498e3f11350")
+ depends_on("c", type="build") # generated
+
build_system(
conditional("makefile", when="@:1.14"),
conditional("cmake", when="@1.15:"),
diff --git a/var/spack/repos/builtin/packages/libdicom/package.py b/var/spack/repos/builtin/packages/libdicom/package.py
new file mode 100644
index 0000000000..ab55e4c220
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libdicom/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libdicom(MesonPackage):
+ """libdicom is a C library and a set of command-line tools for reading DICOM WSI files."""
+
+ homepage = "https://github.com/ImagingDataCommons/libdicom"
+ url = "https://github.com/ImagingDataCommons/libdicom/archive/refs/tags/v1.0.5.tar.gz"
+
+ license("MIT")
+
+ version("1.1.0", sha256="a0ab640e050f373bc5a3e1ec99bee7d5b488652340855223a73002181b094ae8")
+ version("1.0.5", sha256="ebf5f7c0d1a0f802c1801f2f762537f014f2a431be3e063142f6ed3c96878abb")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("meson@0.50:", type="build")
+ depends_on("ninja", type="build")
+ depends_on("pkgconfig", type="build")
+ depends_on("cmake", type="build")
+ depends_on("uthash")
+ depends_on("check@0.9.6:", type=("build", "test"))
+
+ def meson_args(self):
+ return ["-Dwrap_mode=nofallback"]
diff --git a/var/spack/repos/builtin/packages/libdistributed/package.py b/var/spack/repos/builtin/packages/libdistributed/package.py
index 83d5aab986..42566c109c 100644
--- a/var/spack/repos/builtin/packages/libdistributed/package.py
+++ b/var/spack/repos/builtin/packages/libdistributed/package.py
@@ -17,6 +17,7 @@ class Libdistributed(CMakePackage):
maintainers("robertu94")
version("master", branch="master")
+ version("0.4.3", sha256="fbfb473ab6da18880d64a36cf2134c18938a57fe958b822606927b2132783c0d")
version("0.4.2", sha256="ffb5e0aea2cd5ccbd7af2471059d6e70fa5ac2d6ce64fb71c6d434544c01be95")
version("0.4.1", sha256="62bbd4cbaf396cea7f33d62d5e79086a56ee1396d070ad3c4fd9720c50d242c0")
version("0.4.0", sha256="7895d268c4f9b5444e4378f60b5a28198720bc48633d0e5d072c39e3366b096c")
@@ -35,6 +36,8 @@ class Libdistributed(CMakePackage):
version("0.0.2", sha256="c25309108fe17021fd5f06ba98386210708158c439e98326e68f66c42875e58a")
version("0.0.1", sha256="4c23ce0fd70a12ee5f8760ea00377ab6370d86b30ab42476e07453b19ea4ac44")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi@2:")
depends_on("libstdcompat@0.0.2:", when="@0.1.0:")
@@ -48,5 +51,5 @@ class Libdistributed(CMakePackage):
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
+ def check_test(self):
make("test")
diff --git a/var/spack/repos/builtin/packages/libdivsufsort/package.py b/var/spack/repos/builtin/packages/libdivsufsort/package.py
index bebbc0c57b..4b6a56e19f 100644
--- a/var/spack/repos/builtin/packages/libdivsufsort/package.py
+++ b/var/spack/repos/builtin/packages/libdivsufsort/package.py
@@ -17,6 +17,8 @@ class Libdivsufsort(CMakePackage):
version("2.0.1", sha256="9164cb6044dcb6e430555721e3318d5a8f38871c2da9fd9256665746a69351e0")
+ depends_on("c", type="build") # generated
+
def cmake_args(self):
args = ["-DBUILD_DIVSUFSORT64=ON"]
return args
diff --git a/var/spack/repos/builtin/packages/libdmx/package.py b/var/spack/repos/builtin/packages/libdmx/package.py
index 80122777e8..177623e25f 100644
--- a/var/spack/repos/builtin/packages/libdmx/package.py
+++ b/var/spack/repos/builtin/packages/libdmx/package.py
@@ -10,16 +10,19 @@ class Libdmx(AutotoolsPackage, XorgPackage):
"""libdmx - X Window System DMX (Distributed Multihead X) extension
library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libdmx"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libdmx"
xorg_mirror_path = "lib/libdmx-1.1.3.tar.gz"
+ version("1.1.5", sha256="070e82cc1daa1b21ee1339aef56a909eab04cbe7d430fabfbb01ecd21b2dd9f3")
version("1.1.4", sha256="4d05bd5b248c1f46729fa1536b7a5e4d692567327ad41564c36742fb327af925")
version("1.1.3", sha256="c4b24d7e13e5a67ead7a18f0b4cc9b7b5363c9d04cd01b83b5122ff92b3b4996")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("dmxproto@2.2.99.1:")
+ depends_on("xextproto", type="build")
+ depends_on("dmxproto@2.2.99.1:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py
index 0b7497efdd..6c68e5248f 100644
--- a/var/spack/repos/builtin/packages/libdrm/package.py
+++ b/var/spack/repos/builtin/packages/libdrm/package.py
@@ -3,21 +3,32 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Libdrm(Package):
+class Libdrm(AutotoolsPackage, MesonPackage):
"""A userspace library for accessing the DRM, direct rendering manager,
on Linux, BSD and other systems supporting the ioctl interface."""
homepage = "https://dri.freedesktop.org/libdrm/"
url = "https://dri.freedesktop.org/libdrm/libdrm-2.4.101.tar.xz"
list_url = "https://dri.freedesktop.org/libdrm/"
+ git = "https://gitlab.freedesktop.org/mesa/drm"
maintainers("wdconinc")
license("MIT")
+ version("2.4.123", sha256="a2b98567a149a74b0f50e91e825f9c0315d86e7be9b74394dae8b298caadb79e")
+ version("2.4.122", sha256="d9f5079b777dffca9300ccc56b10a93588cdfbc9dde2fae111940dfb6292f251")
+ version("2.4.121", sha256="909084a505d7638887f590b70791b3bbd9069c710c948f5d1f1ce6d080cdfcab")
+ version("2.4.120", sha256="3bf55363f76c7250946441ab51d3a6cc0ae518055c0ff017324ab76cdefb327a")
+ version("2.4.119", sha256="0a49f12f09b5b6e68eaaaff3f02ca7cff9aa926939b212d343161d3e8ac56291")
+ version("2.4.118", sha256="a777bd85f2b5fc9c57f886c82058300578317cafdbc77d0a769d7e9a9567ab88")
+ version("2.4.117", sha256="a2888d69e3eb1c8a77adc08a75a60fbae01f0d208d26f034d1a12e362361242b")
+ version("2.4.116", sha256="46c53f40735ea3d26d614297f155f6131a510624a24274f654f6469ca905339a")
version("2.4.115", sha256="554cfbfe0542bddb391b4e3e05bfbbfc3e282b955bd56218d21c0616481f65eb")
version("2.4.114", sha256="3049cf843a47d12e5eeefbc3be3496d782fa09f42346bf0b7defe3d1e598d026")
version("2.4.113", sha256="7fd7eb2967f63beb4606f22d50e277d993480d05ef75dd88a9bd8e677323e5e1")
@@ -34,15 +45,24 @@ class Libdrm(Package):
version("2.4.59", sha256="ed9d03a92c2d80e6310cc350db3430620f1659ae084a07c6824cee7bc81ae8fa")
version("2.4.33", sha256="bd2a8fecf28616f2157ca33ede691c139cc294ed2d0c4244b62ca7d22e98e5a4")
+ depends_on("c", type="build")
+
variant("docs", default=False, description="Build man pages")
depends_on("pkgconfig", type="build")
depends_on("libpciaccess@0.10:")
depends_on("libpthread-stubs")
- # 2.4.90 is the first version to use meson, spack defaults to meson since
- # 2.4.101.
- depends_on("meson", type="build", when="@2.4.101:")
+ # 2.4.90 is the first version to use meson, but spack supports meson since 2.4.101.
+ build_system(
+ conditional("meson", when="@2.4.101:"),
+ conditional("autotools", when="@:2.4.100"),
+ default="meson",
+ )
+
+ with when("build_system=meson"):
+ depends_on("meson@0.53:", type="build", when="@2.4.101:")
+ depends_on("meson@0.59:", type="build", when="@2.4.117:")
# >= 2.4.104 uses reStructuredText for man pages.
with when("@2.4.104: +docs"):
@@ -60,24 +80,8 @@ class Libdrm(Package):
else:
return self.list_url + "libdrm-%s.tar.xz" % version
- def meson_args(self):
- if self.version <= Version("2.4.112"):
- return ["-Dman-pages=" + ("true" if "+docs" in self.spec else "false")]
- else:
- return ["-Dman-pages=" + ("enabled" if "+docs" in self.spec else "disabled")]
-
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- args = []
- args.extend(std_meson_args)
- args.extend(self.meson_args())
- meson("..", *args)
- ninja("-v")
- if self.run_tests:
- ninja("test")
- ninja("install")
-
- @when("@:2.4.100")
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
args = []
args.append("--enable-static")
@@ -93,12 +97,10 @@ class Libdrm(Package):
args.append("CFLAGS=-fcommon")
return args
- @when("@:2.4.100")
- def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix), *self.configure_args())
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
+
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+ def meson_args(self):
+ if self.spec.satisfies("@:2.4.112"):
+ return ["-Dman-pages=" + ("true" if self.spec.satisfies("+docs") else "false")]
+ else:
+ return ["-Dman-pages=" + ("enabled" if self.spec.satisfies("+docs") else "disabled")]
diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py
index f935a7ca79..89b6e87327 100644
--- a/var/spack/repos/builtin/packages/libdwarf/package.py
+++ b/var/spack/repos/builtin/packages/libdwarf/package.py
@@ -6,13 +6,15 @@
import os
import sys
+import spack.build_systems.cmake
+import spack.build_systems.generic
from spack.package import *
# Only build certain parts of dwarf because the other ones break.
dwarf_dirs = ["libdwarf", "dwarfdump2"]
-class Libdwarf(Package):
+class Libdwarf(CMakePackage, Package):
"""The DWARF Debugging Information Format is of interest to
programmers working on compilers and debuggers (and any one
interested in reading or writing DWARF information). It was
@@ -25,26 +27,98 @@ class Libdwarf(Package):
MIPS/IRIX C compiler."""
homepage = "https://www.prevanders.net/dwarf.html"
- url = "https://www.prevanders.net/libdwarf-20160507.tar.gz"
+ url = "https://www.prevanders.net/libdwarf-0.10.1.tar.xz"
list_url = homepage
license("LGPL-2.1-only")
- version("20180129", sha256="8bd91b57064b0c14ade5a009d3a1ce819f1b6ec0e189fc876eb8f42a8720d8a6")
- version("20160507", sha256="12ae39376e3915bf8fa92555989f3ad5f2f4f332b590a628541ce68987b337af")
- version("20130729", sha256="b6455d8616baf2883e2af91f006d6cbd583128fdfff46e3d1fae460bc223bb7b")
- version("20130207", sha256="5cb81459f0a1f6a2a10ef4635faddc2fa5e1a9e36901018c017759e491e708b8")
- version("20130126", sha256="c23c847935f8612f4fcdcfa0b3311f1553dcbd95bb683d3d5e030440201192fe")
+ version("0.11.0", sha256="846071fb220ac1952f9f15ebbac6c7831ef50d0369b772c07a8a8139a42e07d2")
+ version("0.10.1", sha256="b511a2dc78b98786064889deaa2c1bc48a0c70115c187900dd838474ded1cc19")
+ with default_args(deprecated=True):
+ version(
+ "20180129", sha256="8bd91b57064b0c14ade5a009d3a1ce819f1b6ec0e189fc876eb8f42a8720d8a6"
+ )
+ version(
+ "20160507", sha256="12ae39376e3915bf8fa92555989f3ad5f2f4f332b590a628541ce68987b337af"
+ )
+ version(
+ "20130729", sha256="b6455d8616baf2883e2af91f006d6cbd583128fdfff46e3d1fae460bc223bb7b"
+ )
+ version(
+ "20130207", sha256="5cb81459f0a1f6a2a10ef4635faddc2fa5e1a9e36901018c017759e491e708b8"
+ )
+ version(
+ "20130126", sha256="c23c847935f8612f4fcdcfa0b3311f1553dcbd95bb683d3d5e030440201192fe"
+ )
+
+ build_system(
+ conditional("generic", when="@20130126:20180130"),
+ conditional("cmake", when="@0:"),
+ default="generic",
+ )
+
+ with when("@:20130126"):
+ variant("shared", default=True, description="Build shared libs")
+ variant("examples", default=False, description="Build examples")
+ variant("pic", default=True, description="Build with position independent code")
+ variant("dwarfdump", default=True, description="Build dwarfdump")
+ variant("dwarfgen", default=False, description="Build dwarfgen")
+ variant(
+ "decompression",
+ default=True,
+ description="Enables support for compressed debug sections",
+ )
+
+ conflicts("+shared ~pic")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.5:", type="build", when="@:20130126")
+ depends_on("gmake", type="build", when="@20130126:")
+
depends_on("elfutils@0.163", when="@20160507", type="link")
- depends_on("elf", type="link")
- depends_on("zlib-api", type="link")
+ depends_on("elf", when="@20130126:", type="link")
+
+ depends_on("zlib-api", when="@20130126:", type="link")
+
+ with when("@:20130126 +decompression"):
+ depends_on("zlib-api", type="link")
+ depends_on("zstd", type="link")
parallel = False
+ def url_for_version(self, version):
+ if version < Version("20130126"):
+ return super().url_for_version(version)
+ return f"https://www.prevanders.net/libdwarf-{version}.tar.gz"
+
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ spec = self.spec
+ define = self.define
+ from_variant = self.define_from_variant
+
+ args = [
+ from_variant("BUILD_SHARED", "shared"),
+ from_variant("BUILD_DWARFEXAMPLE", "examples"),
+ from_variant("PIC_ALWAYS", "pic"),
+ from_variant("BUILD_DWARFDUMP", "dwarfdump"),
+ from_variant("BUILD_DWARFGEN", "dwarfgen"),
+ from_variant("ENABLE_DECOMPRESSION", "decompression"),
+ define("BUILD_NON_SHARED", spec.satisfies("~shared")),
+ define("DO_TESTING", self.pkg.run_tests),
+ ]
+
+ return args
+
+
+class GenericBuilder(spack.build_systems.generic.GenericBuilder):
def patch(self):
filter_file(r"^typedef struct Elf Elf;$", "", "libdwarf/libdwarf.h.in")
- def install(self, spec, prefix):
+ def install(self, pkg, spec, prefix):
# dwarf build does not set arguments for ar properly
make.add_default_arg("ARFLAGS=rcs")
diff --git a/var/spack/repos/builtin/packages/libeatmydata/package.py b/var/spack/repos/builtin/packages/libeatmydata/package.py
index 02c69137c3..d749d9e9bf 100644
--- a/var/spack/repos/builtin/packages/libeatmydata/package.py
+++ b/var/spack/repos/builtin/packages/libeatmydata/package.py
@@ -20,6 +20,8 @@ class Libeatmydata(AutotoolsPackage):
version("131", sha256="cf18a8c52138a38541be3478af446c06048108729d7e18476492d62d54baabc4")
version("105", sha256="bdd2d068b6b27cf47cd22aa4c5da43b3d4a05944cfe0ad1b0d843d360ed3a8dd")
+ depends_on("c", type="build") # generated
+
depends_on("strace", type="test")
def check(self):
diff --git a/var/spack/repos/builtin/packages/libecpint/package.py b/var/spack/repos/builtin/packages/libecpint/package.py
index d7021a0534..34bab8e69c 100644
--- a/var/spack/repos/builtin/packages/libecpint/package.py
+++ b/var/spack/repos/builtin/packages/libecpint/package.py
@@ -18,6 +18,7 @@ class Libecpint(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("1.0.7", sha256="e9c60fddb2614f113ab59ec620799d961db73979845e6e637c4a6fb72aee51cc")
version("1.0.5", sha256="3ad5ff342b1bc870f5992c296e8bd8aa590c21a9b14333958c601f8916d6f532")
version("1.0.4", sha256="fad9d1ac98f8dcd40f7bee69aef653bfa3079f016e43277cbd554e06890aa186")
version("1.0.3", sha256="13c3f7d1cf35355e37a903196d5cace60f6a72ae041e8b3502dfabdd19dde17a")
@@ -25,6 +26,8 @@ class Libecpint(CMakePackage):
version("1.0.1", sha256="245b89fe8cb0a92cbbb79c811b48cb15fcfc937389df89387466f1bf76a096bf")
version("1.0.0", sha256="47d741cc48a543ef9c85483cb2d5cd1c9f6677fa7e9920886d083b3c25232379")
+ depends_on("cxx", type="build") # generated
+
depends_on("pugixml")
depends_on("googletest")
diff --git a/var/spack/repos/builtin/packages/libedit/package.py b/var/spack/repos/builtin/packages/libedit/package.py
index 0d3f20c5a4..98ecb9251b 100644
--- a/var/spack/repos/builtin/packages/libedit/package.py
+++ b/var/spack/repos/builtin/packages/libedit/package.py
@@ -12,9 +12,18 @@ class Libedit(AutotoolsPackage):
homepage = "https://thrysoee.dk/editline/"
url = "https://thrysoee.dk/editline/libedit-20170329-3.1.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
version(
+ "3.1-20240808", sha256="5f0573349d77c4a48967191cdd6634dd7aa5f6398c6a57fe037cc02696d6099f"
+ )
+ version(
+ "3.1-20240517", sha256="3a489097bb4115495f3bd85ae782852b7097c556d9500088d74b6fa38dbd12ff"
+ )
+ version(
+ "3.1-20230828", sha256="4ee8182b6e569290e7d1f44f0f78dac8716b35f656b76528f699c69c98814dad"
+ )
+ version(
"3.1-20210216", sha256="2283f741d2aab935c8c52c04b57bf952d02c2c02e651172f8ac811f77b1fc77a"
)
version(
@@ -30,6 +39,8 @@ class Libedit(AutotoolsPackage):
"3.1-20150325", sha256="c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5"
)
+ depends_on("c", type="build")
+
depends_on("pkgconfig", type="build")
depends_on("ncurses")
@@ -40,7 +51,7 @@ class Libedit(AutotoolsPackage):
def configure_args(self):
args = ["ac_cv_lib_curses_tgetent=no", "ac_cv_lib_termcap_tgetent=no"]
- if "+termlib" in self.spec["ncurses"]:
+ if self.spec["ncurses"].satisfies("+termlib"):
args.append("ac_cv_lib_ncurses_tgetent=no")
else:
args.append("ac_cv_lib_tinfo_tgetent=no")
diff --git a/var/spack/repos/builtin/packages/libefence/package.py b/var/spack/repos/builtin/packages/libefence/package.py
index a0178ed080..70902fb887 100644
--- a/var/spack/repos/builtin/packages/libefence/package.py
+++ b/var/spack/repos/builtin/packages/libefence/package.py
@@ -22,6 +22,8 @@ class Libefence(MakefilePackage):
version("2.2.6", sha256="a949e0dedb06cbcd444566cce1457223f2c41abd3513f21663f30f19ccc48e24")
+ depends_on("c", type="build") # generated
+
def build(self, spec, prefix):
make()
diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py
index 4b575a6a92..e4fe56ec74 100644
--- a/var/spack/repos/builtin/packages/libelf/package.py
+++ b/var/spack/repos/builtin/packages/libelf/package.py
@@ -29,6 +29,8 @@ class Libelf(AutotoolsPackage):
version("0.8.13", sha256="591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d")
+ depends_on("c", type="build") # generated
+
provides("elf@0")
# configure: error: neither int nor long is 32-bit
@@ -55,7 +57,7 @@ class Libelf(AutotoolsPackage):
def flag_handler(self, name, flags):
if name == "cflags":
- if self.spec.satisfies("%clang@16:"):
+ if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%gcc@14:"):
flags.append("-Wno-error=implicit-int")
flags.append("-Wno-error=implicit-function-declaration")
return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/libepoxy/package.py b/var/spack/repos/builtin/packages/libepoxy/package.py
index 1736ae80d7..c991fdb371 100644
--- a/var/spack/repos/builtin/packages/libepoxy/package.py
+++ b/var/spack/repos/builtin/packages/libepoxy/package.py
@@ -3,27 +3,66 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Libepoxy(AutotoolsPackage):
+class Libepoxy(AutotoolsPackage, MesonPackage):
"""Epoxy is a library for handling OpenGL function pointer management for
you."""
homepage = "https://github.com/anholt/libepoxy"
- url = "https://github.com/anholt/libepoxy/releases/download/1.4.3/libepoxy-1.4.3.tar.xz"
- list_url = "https://github.com/anholt/libepoxy/releases"
+ url = "https://github.com/anholt/libepoxy/archive/refs/tags/1.5.9.tar.gz"
license("MIT")
+ build_system(
+ conditional("autotools", when="@:1.5.4"),
+ conditional("meson", when="@1.4.0:"),
+ default="meson",
+ )
+
+ version("1.5.10", sha256="a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15")
version("1.4.3", sha256="0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("gl")
depends_on("libx11", when="+glx")
variant("glx", default=True, description="enable GLX support")
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.5.10:"):
+ # no more release artifacts are uploaded
+ return f"https://github.com/anholt/libepoxy/archive/refs/tags/{version}.tar.gz"
+ else:
+ return f"https://github.com/anholt/libepoxy/releases/download/{version}/libepoxy-{version}.tar.xz"
+
+
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+
+ def meson_args(self):
+ # Disable egl, otherwise configure fails with:
+ # error: Package requirements (egl) were not met
+ # Package 'egl', required by 'virtual:world', not found
+ args = ["-Degl=no"]
+
+ # Option glx defaults to auto and was failing on PPC64LE systems
+ # because libx11 was missing from the dependences. This explicitly
+ # enables/disables glx support.
+ if self.spec.satisfies("+glx"):
+ args.append("-Dglx=yes")
+ else:
+ args.append("-Dglx=no")
+
+ return args
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+
def configure_args(self):
# Disable egl, otherwise configure fails with:
# error: Package requirements (egl) were not met
@@ -33,7 +72,7 @@ class Libepoxy(AutotoolsPackage):
# --enable-glx defaults to auto and was failing on PPC64LE systems
# because libx11 was missing from the dependences. This explicitly
# enables/disables glx support.
- if "+glx" in self.spec:
+ if self.spec.satisfies("+glx"):
args.append("--enable-glx=yes")
else:
args.append("--enable-glx=no")
diff --git a/var/spack/repos/builtin/packages/libestr/package.py b/var/spack/repos/builtin/packages/libestr/package.py
index 1f8a2cf0d0..140ac55962 100644
--- a/var/spack/repos/builtin/packages/libestr/package.py
+++ b/var/spack/repos/builtin/packages/libestr/package.py
@@ -18,6 +18,8 @@ class Libestr(AutotoolsPackage):
version("0.1.10", sha256="e8756b071540314abef25c044f893d6b5d249e46709329a4b3e7361403c29a1e")
version("0.1.9", sha256="efa0b90b5fe22844bac26042f988de6e8b2770e28dbd84bf49b9982d9c3e34f8")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libev/package.py b/var/spack/repos/builtin/packages/libev/package.py
index 4a9836ead6..e436d4d81e 100644
--- a/var/spack/repos/builtin/packages/libev/package.py
+++ b/var/spack/repos/builtin/packages/libev/package.py
@@ -17,8 +17,11 @@ class Libev(AutotoolsPackage):
license("BSD-2-Clause OR GPL-2.0-or-later")
version("develop", branch="master")
+ version("4.33", sha256="507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea")
version("4.24", sha256="973593d3479abdf657674a55afe5f78624b0e440614e2b8cb3a07f16d4d7f821")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build", when="@develop")
depends_on("automake", type="build", when="@develop")
depends_on("libtool", type="build", when="@develop")
diff --git a/var/spack/repos/builtin/packages/libevdev/package.py b/var/spack/repos/builtin/packages/libevdev/package.py
index 3bd9774d30..4742be6736 100644
--- a/var/spack/repos/builtin/packages/libevdev/package.py
+++ b/var/spack/repos/builtin/packages/libevdev/package.py
@@ -22,6 +22,8 @@ class Libevdev(AutotoolsPackage):
version("1.5.1", sha256="a9a789abf2f047d2449f09458bb754a9dd53f550ea537654d59492acad787ce6")
version("1.5.0", sha256="ae1b64f26f4b6b55d78bf6e8de87eeb8c58e964b1d457ffa8060e4a889dcb31f")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py
index 9caeea8d03..2fff5bc04f 100644
--- a/var/spack/repos/builtin/packages/libevent/package.py
+++ b/var/spack/repos/builtin/packages/libevent/package.py
@@ -36,6 +36,8 @@ class Libevent(AutotoolsPackage):
version("2.0.13", sha256="e2cc3b9f03e68ff878919b1cd031a210ba9ff376283d895161afcbc25aca00a9")
version("2.0.12", sha256="ac0283f72e0f881e93ac3ae9497a20c78bd075c6c12506ad10e821aa1c29e5ab")
+ depends_on("c", type="build") # generated
+
variant(
"openssl", default=True, description="Build with encryption enabled at the libevent level."
)
@@ -43,10 +45,6 @@ class Libevent(AutotoolsPackage):
depends_on("openssl@:1.0", when="@:2.0+openssl")
depends_on("openssl", when="+openssl")
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
-
def url_for_version(self, version):
if version >= Version("2.0.22"):
url = "https://github.com/libevent/libevent/releases/download/release-{0}-stable/libevent-{0}-stable.tar.gz"
@@ -60,13 +58,10 @@ class Libevent(AutotoolsPackage):
libs = find_libraries("libevent", root=self.prefix, shared=True, recursive=True)
return LibraryList(libs)
- def autoreconf(self, spec, prefix):
- autoreconf("--force", "--install", "--symlink")
-
def configure_args(self):
spec = self.spec
configure_args = []
- if "+openssl" in spec:
+ if spec.satisfies("+openssl"):
configure_args.append("--enable-openssl")
else:
configure_args.append("--disable-openssl")
diff --git a/var/spack/repos/builtin/packages/libevpath/package.py b/var/spack/repos/builtin/packages/libevpath/package.py
index 0b88d6c597..2bf9681b80 100644
--- a/var/spack/repos/builtin/packages/libevpath/package.py
+++ b/var/spack/repos/builtin/packages/libevpath/package.py
@@ -24,6 +24,8 @@ class Libevpath(CMakePackage):
version("4.1.2", sha256="2c0d5acc0e1c5aadd32d7147d2f0ce26220e3870e21c7d5429372d8f881e519e")
version("4.1.1", sha256="cfc9587f98c1f057eb25712855d14311fd91d6284151eee7bd8936c4ff7ee001")
+ depends_on("c", type="build") # generated
+
variant("enet_transport", default=False, description="Build an ENET transport for EVpath")
depends_on("gtkorvo-enet", when="@4.4.0: +enet_transport")
diff --git a/var/spack/repos/builtin/packages/libexif/package.py b/var/spack/repos/builtin/packages/libexif/package.py
index 185be43a36..5c22c9f8f8 100644
--- a/var/spack/repos/builtin/packages/libexif/package.py
+++ b/var/spack/repos/builtin/packages/libexif/package.py
@@ -8,12 +8,21 @@ from spack.package import *
class Libexif(AutotoolsPackage, SourceforgePackage):
"""A library to parse an EXIF file and read the data from those tags"""
- homepage = "https://sourceforge.net/projects/libexif"
- sourceforge_mirror_path = "libexif/libexif-0.6.21.tar.bz2"
+ homepage = "https://libexif.github.io/"
+ url = "https://github.com/libexif/libexif/releases/download/v0.6.24/libexif-0.6.24.tar.bz2"
maintainers("TheQueasle")
- license("LGPL-2.0-or-later")
+ license("LGPL-2.1-or-later", checked_by="wdconinc")
+ version("0.6.24", sha256="d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae")
version("0.6.21", sha256="16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a")
+
+ depends_on("c", type="build")
depends_on("glib")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@:0.6.21"):
+ return f"https://downloads.sourceforge.net/project/libexif/libexif/{version}/libexif-{version}.tar.bz2"
+ else:
+ return f"https://github.com/libexif/libexif/releases/download/v{version}/libexif-{version}.tar.bz2"
diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py
index ea74bf6522..7aaa7dd73f 100644
--- a/var/spack/repos/builtin/packages/libfabric/package.py
+++ b/var/spack/repos/builtin/packages/libfabric/package.py
@@ -10,7 +10,7 @@ import spack.platforms.cray
from spack.package import *
-class Libfabric(AutotoolsPackage):
+class Libfabric(AutotoolsPackage, CudaPackage):
"""The Open Fabrics Interfaces (OFI) is a framework focused on exporting
fabric communication services to applications."""
@@ -24,7 +24,13 @@ class Libfabric(AutotoolsPackage):
license("GPL-2.0-or-later")
version("main", branch="main")
+ version("1.22.0", sha256="485e6cafa66c9e4f6aa688d2c9526e274c47fda3a783cf1dd8f7c69a07e2d5fe")
+ version("1.21.1", sha256="54befa6697352f3179c79c4a79225ae71694f29eefad5d0d5a14b5444ff986dd")
+ version("1.21.0", sha256="0c1b7b830d9147f661e5d7f359250b85b5a9885c330464cd3b5e5d35b86551c7")
+ version("1.20.2", sha256="75b89252a0b8b3eae8e60f7098af1598445a99a99e8fc1ff458e2fd5d4ef8cde")
+ version("1.20.1", sha256="fd88d65c3139865d42a6eded24e121aadabd6373239cef42b76f28630d6eed76")
version("1.20.0", sha256="7fbbaeb0e15c7c4553c0ac5f54e4ef7aecaff8a669d4ba96fa04b0fc780b9ddc")
+ version("1.19.1", sha256="b8839e56d80470a917453a7d8ad9cb717f6683fee28cf93de5f3a056ed4f04c8")
version("1.19.0", sha256="f14c764be9103e80c46223bde66e530e5954cb28b3835b57c8e728479603ef9e")
version("1.18.2", sha256="64d7837853ca84d2a413fdd96534b6a81e6e777cc13866e28cf86cd0ccf1b93e")
version("1.18.1", sha256="4615ae1e22009e59c72ae03c20adbdbd4a3dce95aeefbc86cc2bf1acc81c9e38")
@@ -60,6 +66,8 @@ class Libfabric(AutotoolsPackage):
version("1.5.0", sha256="88a8ad6772f11d83e5b6f7152a908ffcb237af273a74a1bd1cb4202f577f1f23")
version("1.4.2", sha256="5d027d7e4e34cb62508803e51d6bd2f477932ad68948996429df2bfff37ca2a5")
+ depends_on("c", type="build") # generated
+
fabrics = (
conditional("cxi", when=spack.platforms.cray.slingshot_network()),
"efa",
@@ -191,7 +199,7 @@ class Libfabric(AutotoolsPackage):
args.extend(self.enable_or_disable("debug"))
- if "+kdreg" in self.spec:
+ if self.spec.satisfies("+kdreg"):
args.append("--with-kdreg=yes")
else:
args.append("--with-kdreg=no")
@@ -205,6 +213,9 @@ class Libfabric(AutotoolsPackage):
else:
args.append("--enable-{0}=no".format(fabric))
+ if self.spec.satisfies("+cuda"):
+ args.append(f"--with-cuda={self.spec['cuda'].prefix}")
+
return args
def installcheck(self):
diff --git a/var/spack/repos/builtin/packages/libfastcommon/package.py b/var/spack/repos/builtin/packages/libfastcommon/package.py
index b66f8a3b73..cf3612f0e2 100644
--- a/var/spack/repos/builtin/packages/libfastcommon/package.py
+++ b/var/spack/repos/builtin/packages/libfastcommon/package.py
@@ -24,6 +24,8 @@ class Libfastcommon(Package):
version("1.0.40", sha256="ebb89a1bfeb5b140f596fd3e2a0ff202420be05a4d80ef67ddcfdbb248b9fef8")
version("1.0.39", sha256="72ca36f83f3453564ca09d2d0c31354b868cf52ef5a24cfb15e66d0e505c90ac")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
sh = which("sh")
sh("make.sh")
diff --git a/var/spack/repos/builtin/packages/libfastjson/package.py b/var/spack/repos/builtin/packages/libfastjson/package.py
index 445f7a3604..69878f9966 100644
--- a/var/spack/repos/builtin/packages/libfastjson/package.py
+++ b/var/spack/repos/builtin/packages/libfastjson/package.py
@@ -18,6 +18,8 @@ class Libfastjson(AutotoolsPackage):
version("0.99.7", sha256="a142a6e5fa5c9c4ac32615c42fc663a1a14bff305c922e55192b6abf7d1ce1d8")
version("0.99.6", sha256="617373e5205c84b5f674354df6ee9cba53ef8a227f0d1aa928666ed8a16d5547")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py
index 703ce16d3a..c2b8b12a6e 100644
--- a/var/spack/repos/builtin/packages/libffi/package.py
+++ b/var/spack/repos/builtin/packages/libffi/package.py
@@ -17,6 +17,8 @@ class Libffi(AutotoolsPackage):
license("MIT")
+ version("3.4.6", sha256="b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e")
+ version("3.4.5", sha256="96fff4e589e3b239d888d9aa44b3ff30693c2ba1617f953925a70ddebcc102b2")
version("3.4.4", sha256="d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676")
version("3.4.3", sha256="4416dd92b6ae8fcb5b10421e711c4d3cb31203d77521a77d85d0102311e6c3b8")
version("3.4.2", sha256="540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620")
@@ -31,6 +33,9 @@ class Libffi(AutotoolsPackage):
sha256="d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("clang-powerpc-3.2.1.patch", when="@3.2.1%clang platform=linux")
# ref.: https://github.com/libffi/libffi/pull/561
patch("powerpc-3.3.patch", when="@3.3")
@@ -56,7 +61,7 @@ class Libffi(AutotoolsPackage):
return (flags, None, None)
def configure_args(self):
- args = []
+ args = ["--with-pic"]
if self.spec.version >= Version("3.3"):
# Spack adds its own target flags, so tell libffi not to
# second-guess us
diff --git a/var/spack/repos/builtin/packages/libffs/package.py b/var/spack/repos/builtin/packages/libffs/package.py
index 0623e1637b..ad3a2d1de1 100644
--- a/var/spack/repos/builtin/packages/libffs/package.py
+++ b/var/spack/repos/builtin/packages/libffs/package.py
@@ -23,6 +23,8 @@ class Libffs(CMakePackage):
version("1.1.1", sha256="9c3a82b3357e6ac255b65d4f45003dd270dea3ec0cd7a2aa40b59b3eab4bdb83")
version("1.1", sha256="008fd87c5a6cb216cd757b4dc04057fc987b39b7a367623eb4cf0fd32a9fd81e")
+ depends_on("c", type="build") # generated
+
depends_on("flex", type="build", when="@:1.4")
depends_on("bison", type="build", when="@:1.4")
depends_on("gtkorvo-cercs-env", type="build", when="@:1.4")
diff --git a/var/spack/repos/builtin/packages/libfirefly/package.py b/var/spack/repos/builtin/packages/libfirefly/package.py
index 40ef846e16..c6b41864e7 100644
--- a/var/spack/repos/builtin/packages/libfirefly/package.py
+++ b/var/spack/repos/builtin/packages/libfirefly/package.py
@@ -19,11 +19,15 @@ class Libfirefly(CMakePackage):
version("master", branch="master")
version("2.1.0", sha256="4de4b216c73199a1826de7a0d45205b401603315347d7947d8b5950d3e6b893d")
+ version("3.0.0", sha256="af7477962bf052452f4ba906ee85d55c1bbfaad6fc8e03403ed265b264ca209a")
+
+ depends_on("cxx", type="build") # generated
variant(
"double-precision",
description="Enables double type instead of float when enabled",
default=True,
+ when="@2.1.0",
)
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/libfive/package.py b/var/spack/repos/builtin/packages/libfive/package.py
index 71935c8128..04d2036b6e 100644
--- a/var/spack/repos/builtin/packages/libfive/package.py
+++ b/var/spack/repos/builtin/packages/libfive/package.py
@@ -19,6 +19,8 @@ class Libfive(CMakePackage):
# and currently, all tags are from 2017:
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("cmake@3.12:", type="build")
depends_on("boost@1.65:")
diff --git a/var/spack/repos/builtin/packages/libflame/package.py b/var/spack/repos/builtin/packages/libflame/package.py
index f92c306aba..765e588ee4 100644
--- a/var/spack/repos/builtin/packages/libflame/package.py
+++ b/var/spack/repos/builtin/packages/libflame/package.py
@@ -72,22 +72,22 @@ class LibflameBase(AutotoolsPackage):
# https://github.com/flame/libflame/issues/24
config_args = ["LIBS=" + self.spec["blas"].libs.ld_flags]
- if "+lapack2flame" in self.spec:
+ if self.spec.satisfies("+lapack2flame"):
config_args.append("--enable-lapack2flame")
else:
config_args.append("--disable-lapack2flame")
- if "+static" in self.spec:
+ if self.spec.satisfies("+static"):
config_args.append("--enable-static-build")
else:
config_args.append("--disable-static-build")
- if "+shared" in self.spec:
+ if self.spec.satisfies("+shared"):
config_args.append("--enable-dynamic-build")
else:
config_args.append("--disable-dynamic-build")
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
config_args.append("--enable-debug")
else:
config_args.append("--disable-debug")
@@ -133,6 +133,9 @@ class Libflame(LibflameBase):
version("5.2.0", sha256="997c860f351a5c7aaed8deec00f502167599288fd0559c92d5bfd77d0b4d475c")
version("5.1.0", sha256="e7189b750890bd781fe773f366b374518dd1d89a6513d3d6261bf549826384d1")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
provides("flame@5.2", when="@5.2.0")
provides("flame@5.1", when="@5.1.0")
diff --git a/var/spack/repos/builtin/packages/libfms/package.py b/var/spack/repos/builtin/packages/libfms/package.py
index a7e30c70db..c32b15b764 100644
--- a/var/spack/repos/builtin/packages/libfms/package.py
+++ b/var/spack/repos/builtin/packages/libfms/package.py
@@ -21,6 +21,9 @@ class Libfms(CMakePackage):
version("develop", branch="master")
version("0.2.0", tag="v0.2", commit="a66cb96711cc404c411f1bf07ca8db09b6f894eb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("conduit", default=True, description="Build with Conduit I/O support")
variant("shared", default=True, description="Build shared libraries")
@@ -30,7 +33,7 @@ class Libfms(CMakePackage):
def cmake_args(self):
args = []
args.extend([self.define_from_variant("BUILD_SHARED_LIBS", "shared")])
- if "+conduit" in self.spec:
+ if self.spec.satisfies("+conduit"):
args.extend([self.define("CONDUIT_DIR", self.spec["conduit"].prefix)])
return args
@@ -49,6 +52,6 @@ class Libfms(CMakePackage):
"""Export the FMS library.
Sample usage: spec['libfms'].libs.ld_flags
"""
- is_shared = "+shared" in self.spec
+ is_shared = self.spec.satisfies("+shared")
libs = find_libraries("libfms", root=self.prefix, shared=is_shared, recursive=True)
return libs or None # Raise an error if no libs are found
diff --git a/var/spack/repos/builtin/packages/libfontenc/package.py b/var/spack/repos/builtin/packages/libfontenc/package.py
index 91774ced25..8d9a1d93e6 100644
--- a/var/spack/repos/builtin/packages/libfontenc/package.py
+++ b/var/spack/repos/builtin/packages/libfontenc/package.py
@@ -9,16 +9,19 @@ from spack.package import *
class Libfontenc(AutotoolsPackage, XorgPackage):
"""libfontenc - font encoding library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libfontenc"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libfontenc"
xorg_mirror_path = "lib/libfontenc-1.1.3.tar.gz"
license("MIT")
+ version("1.1.8", sha256="b55039f70959a1b2f02f4ec8db071e5170528d2c9180b30575dccf7510d7fb9f")
version("1.1.7", sha256="5e5f210329823f08f97bfe9fd5b4105070c789bc5aef88ce01d86d8203d4aa9f")
version("1.1.3", sha256="6fba26760ca8d5045f2b52ddf641c12cedc19ee30939c6478162b7db8b6220fb")
+ depends_on("c", type="build")
+
depends_on("zlib-api")
- depends_on("xproto")
+ depends_on("xproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libfort/package.py b/var/spack/repos/builtin/packages/libfort/package.py
new file mode 100644
index 0000000000..6a09762f3e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libfort/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libfort(CMakePackage):
+ """libfort is a simple crossplatform library to create formatted text tables."""
+
+ homepage = "https://github.com/seleznevae/libfort"
+ url = "https://github.com/seleznevae/libfort/archive/refs/tags/v0.4.2.tar.gz"
+
+ license("MIT")
+
+ version("0.4.2", sha256="8f7b03f1aa526e50c9828f09490f3c844b73d5f9ca72493fe81931746f75e489")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("enable_astyle", default=False, description="Enable astyle")
+ variant("enable_wchar", default=True, description="Enable wchar support")
+ variant("enable_utf8", default=True, description="Enable utf8 support")
+ variant("enable_testing", default=True, description="Enables building tests and examples")
+ variant("shared", default=False, description="Build shared library")
+
+ depends_on("cmake@3.0.0:", type="build")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("FORT_ENABLE_ASTYLE", "enable_astyle"),
+ self.define_from_variant("FORT_ENABLE_WCHAR", "enable_wchar"),
+ self.define_from_variant("FORT_ENABLE_UTF8", "enable_utf8"),
+ self.define_from_variant("FORT_ENABLE_TESTING", "enable_testing"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/libfs/package.py b/var/spack/repos/builtin/packages/libfs/package.py
index 05a557246d..d468a495f7 100644
--- a/var/spack/repos/builtin/packages/libfs/package.py
+++ b/var/spack/repos/builtin/packages/libfs/package.py
@@ -12,14 +12,18 @@ class Libfs(AutotoolsPackage, XorgPackage):
This library is used by clients of X Font Servers (xfs), such as
xfsinfo, fslsfonts, and the X servers themselves."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libFS"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libFS"
xorg_mirror_path = "lib/libFS-1.0.7.tar.gz"
version("1.0.9", sha256="8bc2762f63178905228a28670539badcfa2c8793f7b6ce3f597b7741b932054a")
version("1.0.7", sha256="91bf1c5ce4115b7dbf4e314fdbee54052708e8f7b6a2ec6e82c309bcbe40ef3d")
- depends_on("xproto@7.0.17:")
- depends_on("fontsproto")
+ depends_on("c", type="build")
+
+ # Note: `Requires: xproto fontsproto` in libfs.pc means this is type link
+ # https://gitlab.freedesktop.org/xorg/lib/libfs/-/blob/master/libfs.pc.in
+ depends_on("xproto@7.0.17:", type=("build", "link"))
+ depends_on("fontsproto", type=("build", "link"))
depends_on("xtrans")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libfuse/package.py b/var/spack/repos/builtin/packages/libfuse/package.py
index 6aabffb453..57d62e0bf6 100644
--- a/var/spack/repos/builtin/packages/libfuse/package.py
+++ b/var/spack/repos/builtin/packages/libfuse/package.py
@@ -31,6 +31,9 @@ class Libfuse(MesonPackage):
version("3.9.2", sha256="b4409255cbda6f6975ca330f5b04cb335b823a95ddd8c812c3d224ec53478fc0")
version("2.9.9", sha256="d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version < Version("3.0.0"):
return "https://github.com/libfuse/libfuse/releases/download/fuse-{0}/fuse-{1}.tar.gz".format(
@@ -103,19 +106,19 @@ class Libfuse(MesonPackage):
def meson_args(self):
args = []
- if "+utils" in self.spec:
+ if self.spec.satisfies("+utils"):
args.append("-Dutils=true")
args.append("-Dexamples=true")
else:
args.append("-Dutils=false")
args.append("-Dexamples=false")
- if "+useroot" in self.spec:
+ if self.spec.satisfies("+useroot"):
args.append("-Duseroot=true")
else:
args.append("-Duseroot=false")
- if "~system_install" in self.spec:
+ if self.spec.satisfies("~system_install"):
# Fix meson's setup if meson does not have the host system's udev package:
args.append("-Dudevrulesdir={0}".format(self.prefix.etc.rules.d))
@@ -144,10 +147,14 @@ class Libfuse(MesonPackage):
]
args.append(
- "--enable-static" if "default_library=static" in self.spec else "--disable-static"
+ "--enable-static"
+ if self.spec.satisfies("default_library=static")
+ else "--disable-static"
)
args.append(
- "--enable-shared" if "default_library=shared" in self.spec else "--disable-shared"
+ "--enable-shared"
+ if self.spec.satisfies("default_library=shared")
+ else "--disable-shared"
)
configure(*args)
diff --git a/var/spack/repos/builtin/packages/libfyaml/package.py b/var/spack/repos/builtin/packages/libfyaml/package.py
index 9f19520e3e..7b2d4ac0d2 100644
--- a/var/spack/repos/builtin/packages/libfyaml/package.py
+++ b/var/spack/repos/builtin/packages/libfyaml/package.py
@@ -15,8 +15,11 @@ class Libfyaml(AutotoolsPackage):
license("MIT")
+ version("0.9", sha256="7731edc5dfcc345d5c5c9f6ce597133991a689dabede393cd77bae89b327cd6d")
version("0.8", sha256="dc4d4348eedca68e8e2394556d57f71410e7d61791a71cbe178302ebe5f26b99")
version("0.7.12", sha256="485342c6920e9fdc2addfe75e5c3e0381793f18b339ab7393c1b6edf78bf8ca8")
version("0.5.7", sha256="3221f31bb3feba97e544a82d0d5e4711ff0e4101cca63923dc5a1a001c187590")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/libgain/package.py b/var/spack/repos/builtin/packages/libgain/package.py
index dfe0bdc292..3df08f4a24 100644
--- a/var/spack/repos/builtin/packages/libgain/package.py
+++ b/var/spack/repos/builtin/packages/libgain/package.py
@@ -22,7 +22,13 @@ class Libgain(AutotoolsPackage):
url="https://gitlab.com/l_sim/bigdft-suite/-/raw/1.9.1/GaIn-1.0.tar.gz",
)
+ depends_on("fortran", type="build") # generated
+
+ def flag_handler(self, name, flags):
+ flags.append(self.compiler.fc_pic_flag)
+ return (None, None, flags)
+
@property
def libs(self):
- shared = "+shared" in self.spec
+ shared = self.spec.satisfies("+shared")
return find_libraries("libGaIn", root=self.prefix, shared=shared, recursive=True)
diff --git a/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch
new file mode 100644
index 0000000000..9bd196ff60
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch
@@ -0,0 +1,33 @@
+From b42116d6067a5233f72e5598032d4b396bb8eaac Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Thu, 4 Jul 2024 11:17:03 +0900
+Subject: [PATCH] cipher:blake2: Fix for use_avx512.
+
+* cipher/blake2.c (blake2s_init_ctx): Conditional with USE_AVX512.
+
+--
+
+GnuPG-bug-id: 7184
+Reported-by: Aaron Howland
+Fixing-commit: 909daa700e4b45d75469df298ee564b8fc2f4b72
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ cipher/blake2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/blake2.c b/cipher/blake2.c
+index 451e71f6..1a04fbd8 100644
+--- a/cipher/blake2.c
++++ b/cipher/blake2.c
+@@ -830,7 +830,7 @@ static gcry_err_code_t blake2s_init_ctx(void *ctx, unsigned int flags,
+ #ifdef USE_AVX
+ c->use_avx = !!(features & HWF_INTEL_AVX);
+ #endif
+-#ifdef USE_AVX
++#ifdef USE_AVX512
+ c->use_avx512 = !!(features & HWF_INTEL_AVX512);
+ #endif
+
+--
+2.30.2
+
diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py
index 8a5165923d..44080a58b7 100644
--- a/var/spack/repos/builtin/packages/libgcrypt/package.py
+++ b/var/spack/repos/builtin/packages/libgcrypt/package.py
@@ -16,24 +16,35 @@ class Libgcrypt(AutotoolsPackage):
license("LGPL-2.1-or-later AND GPL-2.0-or-later")
+ version("1.11.0", sha256="09120c9867ce7f2081d6aaa1775386b98c2f2f246135761aae47d81f58685b9c")
version("1.10.3", sha256="8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa")
version("1.10.2", sha256="3b9c02a004b68c256add99701de00b383accccf37177e0d6c58289664cce0c03")
version("1.10.1", sha256="ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de")
version("1.10.0", sha256="6a00f5c05caa4c4acc120c46b63857da0d4ff61dc4b4b03933fa8d46013fae81")
- version("1.9.4", sha256="ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7")
- version("1.9.3", sha256="97ebe4f94e2f7e35b752194ce15a0f3c66324e0ff6af26659bbfb5ff2ec328fd")
- version("1.9.2", sha256="b2c10d091513b271e47177274607b1ffba3d95b188bbfa8797f948aec9053c5a")
- version("1.9.1", sha256="c5a67a8b9b2bd370fb415ed1ee31c7172e5683076493cf4a3678a0fbdf0265d9")
+
+ # End of life: 2024-03-31
+ with default_args(deprecated=True):
+ version("1.9.4", sha256="ea849c83a72454e3ed4267697e8ca03390aee972ab421e7df69dfe42b65caaf7")
+ version("1.9.3", sha256="97ebe4f94e2f7e35b752194ce15a0f3c66324e0ff6af26659bbfb5ff2ec328fd")
+ version("1.9.2", sha256="b2c10d091513b271e47177274607b1ffba3d95b188bbfa8797f948aec9053c5a")
+ version("1.9.1", sha256="c5a67a8b9b2bd370fb415ed1ee31c7172e5683076493cf4a3678a0fbdf0265d9")
+
+ # End of life: 2024-12-31 (LTS)
version("1.8.9", sha256="2bda4790aa5f0895d3407cf7bf6bd7727fd992f25a45a63d92fef10767fa3769")
version("1.8.7", sha256="03b70f028299561b7034b8966d7dd77ef16ed139c43440925fe8782561974748")
version("1.8.6", sha256="0cba2700617b99fc33864a0c16b1fa7fdf9781d9ed3509f5d767178e5fd7b975")
version("1.8.5", sha256="3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3")
version("1.8.4", sha256="f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227")
version("1.8.1", sha256="7a2875f8b1ae0301732e878c0cca2c9664ff09ef71408f085c50e332656a78b3")
- version("1.7.6", sha256="626aafee84af9d2ce253d2c143dc1c0902dda045780cc241f39970fc60be05bc")
- version("1.6.2", sha256="de084492a6b38cdb27b67eaf749ceba76bf7029f63a9c0c3c1b05c88c9885c4c")
+
+ depends_on("c", type="build") # generated
depends_on("libgpg-error@1.25:")
+ depends_on("libgpg-error@1.27:", when="@1.9:")
+ depends_on("libgpg-error@1.49:", when="@1.11:")
+
+ # See https://dev.gnupg.org/T7170
+ conflicts("platform=darwin", when="@1.11.0")
def flag_handler(self, name, flags):
# We should not inject optimization flags through the wrapper, because
@@ -45,6 +56,9 @@ class Libgcrypt(AutotoolsPackage):
# https://dev.gnupg.org/T6442
patch("rndgetentropy_no_getrandom.patch", when="@=1.10.2 platform=darwin")
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=b42116d6067a5233f72e5598032d4b396bb8eaac
+ patch("conditional_avx512.patch", when="@1.11.0")
+
def check(self):
# Without this hack, `make check` fails on macOS when SIP is enabled
# https://bugs.gnupg.org/gnupg/issue2056
diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py
index e01c81d74c..8beb6e83d5 100644
--- a/var/spack/repos/builtin/packages/libgd/package.py
+++ b/var/spack/repos/builtin/packages/libgd/package.py
@@ -24,6 +24,9 @@ class Libgd(AutotoolsPackage):
version("2.3.3", sha256="dd3f1f0bb016edcc0b2d082e8229c822ad1d02223511997c80461481759b1ed2")
version("2.2.4", sha256="487a650aa614217ed08ab1bd1aa5d282f9d379cfd95c756aed0b43406381be65")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Build dependencies
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -39,6 +42,13 @@ class Libgd(AutotoolsPackage):
depends_on("fontconfig")
depends_on("libx11")
+ # add missing '#include <limits.h>' in gd_gd2.c, which uses the constant 'INT_MAX'
+ patch(
+ "https://github.com/libgd/libgd/commit/c9b601a658a79e6ea2aad29fbf60ca6e24ccef1e.patch?full_index=1",
+ sha256="1dc3a72491427acbae2cd0c6d3b08c0814ffa2f9fee91269b8b46429cabb773d",
+ when="@2.2.4",
+ )
+
def patch(self):
p = self.spec["jpeg"].libs.search_flags
filter_file(
diff --git a/var/spack/repos/builtin/packages/libgdsii/package.py b/var/spack/repos/builtin/packages/libgdsii/package.py
index 660ad7e479..2681d3919e 100644
--- a/var/spack/repos/builtin/packages/libgdsii/package.py
+++ b/var/spack/repos/builtin/packages/libgdsii/package.py
@@ -19,6 +19,8 @@ class Libgdsii(AutotoolsPackage):
version("0.21", sha256="1adc571c6b53df4c08d108f9ac4f4a7fd6fbefd4bc56f74e0b7b2801353671b8")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libgeotiff/package.py b/var/spack/repos/builtin/packages/libgeotiff/package.py
index 4be72c04b5..1692919251 100644
--- a/var/spack/repos/builtin/packages/libgeotiff/package.py
+++ b/var/spack/repos/builtin/packages/libgeotiff/package.py
@@ -27,6 +27,8 @@ class Libgeotiff(AutotoolsPackage):
version("1.4.3", sha256="b8510d9b968b5ee899282cdd5bef13fd02d5a4c19f664553f81e31127bc47265")
version("1.4.2", sha256="ad87048adb91167b07f34974a8e53e4ec356494c29f1748de95252e8f81a5e6e")
+ depends_on("c", type="build") # generated
+
variant("zlib", default=True, description="Include zlib support")
variant("jpeg", default=True, description="Include jpeg support")
variant("proj", default=True, description="Use PROJ.x library")
@@ -61,17 +63,17 @@ class Libgeotiff(AutotoolsPackage):
args = ["--with-libtiff={0}".format(spec["libtiff"].prefix)]
- if "+zlib" in spec:
+ if spec.satisfies("+zlib"):
args.append("--with-zlib={0}".format(spec["zlib-api"].prefix))
else:
args.append("--with-zlib=no")
- if "+jpeg" in spec:
+ if spec.satisfies("+jpeg"):
args.append("--with-jpeg={0}".format(spec["jpeg"].prefix))
else:
args.append("--with-jpeg=no")
- if "+proj" in spec:
+ if spec.satisfies("+proj"):
args.append("--with-proj={0}".format(spec["proj"].prefix))
else:
args.append("--with-proj=no")
diff --git a/var/spack/repos/builtin/packages/libgff/package.py b/var/spack/repos/builtin/packages/libgff/package.py
index bfced22147..b682e4af00 100644
--- a/var/spack/repos/builtin/packages/libgff/package.py
+++ b/var/spack/repos/builtin/packages/libgff/package.py
@@ -17,3 +17,6 @@ class Libgff(CMakePackage):
maintainers("ajxander12")
version("2.0.0", sha256="7656b19459a7ca7d2fd0fcec4f2e0fd0deec1b4f39c703a114e8f4c22d82a99c")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py
index 773771ffdc..2ba56471b6 100644
--- a/var/spack/repos/builtin/packages/libgit2/package.py
+++ b/var/spack/repos/builtin/packages/libgit2/package.py
@@ -16,6 +16,8 @@ class Libgit2(CMakePackage):
homepage = "https://libgit2.github.com/"
url = "https://github.com/libgit2/libgit2/archive/v0.26.0.tar.gz"
+ version("1.8.0", sha256="9e1d6a880d59026b675456fbb1593c724c68d73c34c0d214d6eb848e9bbd8ae4")
+ version("1.7.2", sha256="de384e29d7efc9330c6cdb126ebf88342b5025d920dcb7c645defad85195ea7f")
version("1.7.0", sha256="d9d0f84a86bf98b73e68997f5c1543cc5067d0ca9c7a5acaba3e8d117ecefef3")
version("1.6.4", sha256="d25866a4ee275a64f65be2d9a663680a5cf1ed87b7ee4c534997562c828e500d")
version("1.6.3", sha256="a8e2a09835eabb24ace2fd597a78af182e1e199a894e99a90e4c87c849fcd9c4")
@@ -64,6 +66,8 @@ class Libgit2(CMakePackage):
version("0.26.1", sha256="68cd0f8ee9e0ca84dcf0f0267d0a8297471d3365622d22d3da67c57165bb0722")
version("0.26.0", sha256="6a62393e0ceb37d02fe0d5707713f504e7acac9006ef33da1e88960bd78b6eac")
+ depends_on("c", type="build") # generated
+
# Backends
variant(
"https",
@@ -88,7 +92,6 @@ class Libgit2(CMakePackage):
# Runtime Dependencies
depends_on("libssh2", when="+ssh")
depends_on("openssl", when="https=system platform=linux")
- depends_on("openssl", when="https=system platform=cray")
depends_on("openssl", when="https=openssl")
depends_on("curl", when="+curl")
depends_on("pcre", when="@0.99:")
@@ -102,25 +105,25 @@ class Libgit2(CMakePackage):
def cmake_args(self):
args = []
- if "https=system" in self.spec:
- if "platform=linux" in self.spec or "platform=cray" in self.spec:
+ if self.spec.satisfies("https=system"):
+ if self.spec.satisfies("platform=linux"):
args.append("-DUSE_HTTPS=OpenSSL")
- elif "platform=darwin" in self.spec:
+ elif self.spec.satisfies("platform=darwin"):
args.append("-DUSE_HTTPS=SecureTransport")
else:
# Let CMake try to find an HTTPS implementation. Mileage on
# your platform may vary
args.append("-DUSE_HTTPS=ON")
- elif "https=openssl" in self.spec:
+ elif self.spec.satisfies("https=openssl"):
args.append("-DUSE_HTTPS=OpenSSL")
else:
args.append("-DUSE_HTTPS=OFF")
- args.append("-DUSE_SSH={0}".format("ON" if "+ssh" in self.spec else "OFF"))
+ args.append(f"-DUSE_SSH={'ON' if '+ssh' in self.spec else 'OFF'}")
# The curl backed is not supported after 0.27.x
- if "@:0.27 +curl" in self.spec:
- args.append("-DCURL={0}".format("ON" if "+curl" in self.spec else "OFF"))
+ if self.spec.satisfies("@:0.27 +curl"):
+ args.append(f"-DCURL={'ON' if '+curl' in self.spec else 'OFF'}")
# Control tests
args.append(self.define("BUILD_CLAR", self.run_tests))
diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py
index 73258b5140..6b78a25423 100644
--- a/var/spack/repos/builtin/packages/libgpg-error/package.py
+++ b/var/spack/repos/builtin/packages/libgpg-error/package.py
@@ -16,6 +16,9 @@ class LibgpgError(AutotoolsPackage):
license("GPL-2.0-or-later AND LGPL-2.1-or-later")
+ version("1.50", sha256="69405349e0a633e444a28c5b35ce8f14484684518a508dc48a089992fe93e20a")
+ version("1.49", sha256="8b79d54639dbf4abc08b5406fb2f37e669a2dec091dd024fb87dd367131c63a9")
+ version("1.48", sha256="89ce1ae893e122924b858de84dc4f67aae29ffa610ebf668d5aa539045663d6f")
version("1.47", sha256="9e3c670966b96ecc746c28c2c419541e3bcb787d1a73930f5e5f5e1bcbbb9bdb")
version("1.46", sha256="b7e11a64246bbe5ef37748de43b245abd72cfcd53c9ae5e7fc5ca59f1c81268d")
version("1.45", sha256="570f8ee4fb4bff7b7495cff920c275002aea2147e9a1d220c068213267f80a26")
@@ -30,9 +33,18 @@ class LibgpgError(AutotoolsPackage):
version("1.21", sha256="b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d")
version("1.18", sha256="9ff1d6e61d4cef7c1d0607ceef6d40dc33f3da7a3094170c3718c00153d80810")
+ depends_on("c", type="build") # generated
+
depends_on("awk", type="build")
# Patch for using gawk@5, c.f. https://dev.gnupg.org/T4459
patch("awk-5.patch", when="@1.36^gawk@5:")
+ # See https://github.com/macports/macports-ports/pull/24601 and https://dev.gnupg.org/T7169
+ patch(
+ "https://raw.githubusercontent.com/ryandesign/macports-ports/290e77cca6ce054768ddefee2b51222d72780ac9/devel/libgpg-error/files/patch-src-spawn-posix.c.diff",
+ sha256="0b2a0ffab81b2b0b40d6ab59016c92fcebbe80710a3e0adba570f73f7a931d16",
+ level=0,
+ when="@1.50",
+ )
def configure_args(self):
args = [
diff --git a/var/spack/repos/builtin/packages/libgpuarray/package.py b/var/spack/repos/builtin/packages/libgpuarray/package.py
index fb989c2504..3b990e3bd9 100644
--- a/var/spack/repos/builtin/packages/libgpuarray/package.py
+++ b/var/spack/repos/builtin/packages/libgpuarray/package.py
@@ -24,6 +24,8 @@ class Libgpuarray(CMakePackage):
version("0.6.1", sha256="b2466311e0e3bacdf7a586bba0263f6d232bf9f8d785e91ddb447653741e6ea5")
version("0.6.0", sha256="a58a0624e894475a4955aaea25e82261c69b4d22c8f15ec07041a4ba176d35af")
+ depends_on("c", type="build") # generated
+
depends_on("cuda")
depends_on("cmake@3:", type="build")
depends_on("check")
diff --git a/var/spack/repos/builtin/packages/libgridxc/package.py b/var/spack/repos/builtin/packages/libgridxc/package.py
index 90473c0b0b..8500694777 100644
--- a/var/spack/repos/builtin/packages/libgridxc/package.py
+++ b/var/spack/repos/builtin/packages/libgridxc/package.py
@@ -26,6 +26,8 @@ class Libgridxc(MakefilePackage):
version("0.8.0", sha256="ff89b3302f850d1d9f651951e4ade20dfa4c71c809a2d86382c6797392064c9c")
version("0.7.6", sha256="058b80f40c85997eea0eae3f15b7cc8105f817e59564106308b22f57a03b216b")
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf@2.69:", type="build")
depends_on("automake@1.14:", type="build")
depends_on("libtool@2.4.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/libgssglue/package.py b/var/spack/repos/builtin/packages/libgssglue/package.py
index a3accd3280..f838f4d0ba 100644
--- a/var/spack/repos/builtin/packages/libgssglue/package.py
+++ b/var/spack/repos/builtin/packages/libgssglue/package.py
@@ -17,3 +17,5 @@ class Libgssglue(AutotoolsPackage):
version("0.4", sha256="3f791a75502ba723e5e85e41e5e0c711bb89e2716b7c0ec6e74bd1df6739043a")
version("0.3", sha256="d98a022af432b61fe2a1eb811b5916743ccb781e383da680f1a00fd1005a5174")
version("0.2", sha256="3de4974e19e54048acdc465d3b3c6c006cb66d2952d36e6b0afc10012184dc91")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libgta/package.py b/var/spack/repos/builtin/packages/libgta/package.py
index 022be5a31d..629408f62b 100644
--- a/var/spack/repos/builtin/packages/libgta/package.py
+++ b/var/spack/repos/builtin/packages/libgta/package.py
@@ -16,6 +16,9 @@ class Libgta(CMakePackage):
version("1.2.1", sha256="d445667e145f755f0bc34ac89b63a6bfdce1eea943f87ee7a3f23dc0dcede8b1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/libgtextutils/package.py b/var/spack/repos/builtin/packages/libgtextutils/package.py
index c10e53bcb2..4092d64ac3 100644
--- a/var/spack/repos/builtin/packages/libgtextutils/package.py
+++ b/var/spack/repos/builtin/packages/libgtextutils/package.py
@@ -16,3 +16,6 @@ class Libgtextutils(AutotoolsPackage):
patch("text_line_reader.patch")
version("0.7", sha256="792e0ea3c96ffe3ad65617a104b7dc50684932bc96d2adab501c952fd65c3e4a")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libgtop/package.py b/var/spack/repos/builtin/packages/libgtop/package.py
new file mode 100644
index 0000000000..4486d69192
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libgtop/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libgtop(AutotoolsPackage):
+ """Contains the GNOME top libraries for collecting system monitoring data"""
+
+ homepage = "https://gitlab.gnome.org/GNOME/libgtop"
+ url = "https://download.gnome.org/sources/libgtop/2.41/libgtop-2.41.3.tar.xz"
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling")
+
+ version("2.41.2", sha256="d9026cd8a48d27cdffd332f8d60a92764b56424e522c420cd13a01f40daf92c3")
+ version("2.41.1", sha256="43ea9ad13f7caf98303e64172b191be9b96bab340b019deeec72251ee140fe3b")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("pkgconfig", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("glib@2.65:", when="@2.40:")
+ depends_on("gettext@:0.19", when="@:2.40.0")
diff --git a/var/spack/repos/builtin/packages/libgudev/package.py b/var/spack/repos/builtin/packages/libgudev/package.py
new file mode 100644
index 0000000000..fa26423192
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libgudev/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libgudev(MesonPackage):
+ """Provides GObject bindings for libudev."""
+
+ homepage = "https://gitlab.gnome.org/GNOME/libgudev/"
+ url = "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz"
+
+ maintainers("teaguesterling")
+
+ license("LGPL2.1", checked_by="teaguesterling")
+
+ version("238", sha256="61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("glib@2.38:")
+ depends_on("systemd@251:") # For libuvdev
diff --git a/var/spack/repos/builtin/packages/libharu/package.py b/var/spack/repos/builtin/packages/libharu/package.py
index baebd257b7..e3cad31663 100644
--- a/var/spack/repos/builtin/packages/libharu/package.py
+++ b/var/spack/repos/builtin/packages/libharu/package.py
@@ -24,6 +24,9 @@ class Libharu(AutotoolsPackage):
version("2.3.0", sha256="8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2")
version("2.2.0", sha256="5e63246d2da0272a9dbe5963fd827c7efa6e29d97a2d047c0d4c5f0b780f10b5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libtool", type=("build"))
depends_on("autoconf", type=("build"))
depends_on("automake", type=("build"))
@@ -41,8 +44,8 @@ class Libharu(AutotoolsPackage):
spec = self.spec
args = []
- args.append("--with-zlib={0}".format(spec["zlib-api"].prefix))
- args.append("--with-png={0}".format(spec["libpng"].prefix))
+ args.append(f"--with-zlib={spec['zlib-api'].prefix}")
+ args.append(f"--with-png={spec['libpng'].prefix}")
return args
diff --git a/var/spack/repos/builtin/packages/libhbaapi/package.py b/var/spack/repos/builtin/packages/libhbaapi/package.py
index b61bcf2d79..7749ecbc40 100644
--- a/var/spack/repos/builtin/packages/libhbaapi/package.py
+++ b/var/spack/repos/builtin/packages/libhbaapi/package.py
@@ -18,6 +18,8 @@ class Libhbaapi(AutotoolsPackage):
version("3.10", sha256="ca4f4ec3defa057c1b51bc87cc749efe5d54579e055d7a51688d18cc35166462")
version("3.9", sha256="8e60616abde44488fed05254988f9b41653d2204a7218072714d6623e099c863")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libheif/package.py b/var/spack/repos/builtin/packages/libheif/package.py
index fd45ec6bba..d33799e210 100644
--- a/var/spack/repos/builtin/packages/libheif/package.py
+++ b/var/spack/repos/builtin/packages/libheif/package.py
@@ -16,4 +16,7 @@ class Libheif(CMakePackage):
version("1.12.0", sha256="086145b0d990182a033b0011caadb1b642da84f39ab83aa66d005610650b3c65")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.13:", type="build")
diff --git a/var/spack/repos/builtin/packages/libhio/package.py b/var/spack/repos/builtin/packages/libhio/package.py
index e978ede515..fbabcb9d45 100644
--- a/var/spack/repos/builtin/packages/libhio/package.py
+++ b/var/spack/repos/builtin/packages/libhio/package.py
@@ -32,6 +32,8 @@ class Libhio(AutotoolsPackage):
version("1.4.1.1", sha256="5c65d18bf74357f9d9960bf6b9ad2432f8fc5a2b653e72befe4d1caabb9a2f7a")
version("1.4.1.0", sha256="963f4a8d365afd92a5593f80946e2c4c79f4185d897436a43fae61dae5567ac4")
+ depends_on("c", type="build") # generated
+
#
# main users of libhio thru spack will want to use HFDF5 plugin,
# so make hdf5 variant a default
@@ -60,7 +62,7 @@ class Libhio(AutotoolsPackage):
args = []
args.append("--with-external_bz2={0}".format(spec["bzip2"].prefix))
- if "+hdf5" in spec:
+ if spec.satisfies("+hdf5"):
args.append("--with-hdf5={0}".format(spec["hdf5"].prefix))
args.append("--with-external-json={0}".format(spec["json-c"].prefix))
diff --git a/var/spack/repos/builtin/packages/libhugetlbfs/package.py b/var/spack/repos/builtin/packages/libhugetlbfs/package.py
index ba0bd48680..a6eeb11456 100644
--- a/var/spack/repos/builtin/packages/libhugetlbfs/package.py
+++ b/var/spack/repos/builtin/packages/libhugetlbfs/package.py
@@ -6,16 +6,28 @@
from spack.package import *
-class Libhugetlbfs(MakefilePackage):
+class Libhugetlbfs(AutotoolsPackage):
"""libhugetlbfs is a library which provides easy access
to huge pages of memory."""
homepage = "https://github.com/libhugetlbfs/libhugetlbfs"
- url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/2.22/libhugetlbfs-2.22.tar.gz"
+ url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/2.24/libhugetlbfs-2.24.tar.gz"
license("LGPL-2.1-or-later")
- version("2.22", sha256="94dca9ea2c527cd77bf28904094fe4708865a85122d416bfccc8f4b73b9a6785")
+ version("2.24", sha256="d501dfa91c8ead1106967a3d3829f2ba738c3fac0a65cb358ed2ab3870ddc5ef")
- def install(self, spec, prefix):
- make("install", "PREFIX=%s" % prefix)
+ depends_on("c", type="build") # generated
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ build_targets = ["-e", "libs", "tools"]
+ install_targets = ["-e", "install"]
+ parallel = False
+
+ def setup_build_environment(self, env):
+ env.set("BUILDTYPE", "NATIVEONLY")
+ env.set("PREFIX", self.prefix)
+ env.set("V", "1")
diff --git a/var/spack/repos/builtin/packages/libiberty/package.py b/var/spack/repos/builtin/packages/libiberty/package.py
index 41f2f3ac69..a76d140078 100644
--- a/var/spack/repos/builtin/packages/libiberty/package.py
+++ b/var/spack/repos/builtin/packages/libiberty/package.py
@@ -37,6 +37,9 @@ class Libiberty(AutotoolsPackage, GNUMirrorPackage):
version("2.29.1", sha256="e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577")
version("2.28.1", sha256="16328a906e55a3c633854beec8e9e255a639b366436470b4f6245eb0d2fde942")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=False, description="Compile with position independent code.")
# Configure and build just libiberty.
@@ -57,7 +60,7 @@ class Libiberty(AutotoolsPackage, GNUMirrorPackage):
else:
flags.append("-O2")
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
flags.append(self.compiler.cc_pic_flag)
return (None, None, flags)
diff --git a/var/spack/repos/builtin/packages/libibumad/package.py b/var/spack/repos/builtin/packages/libibumad/package.py
index 2601b3ffbe..19a3fbd7a6 100644
--- a/var/spack/repos/builtin/packages/libibumad/package.py
+++ b/var/spack/repos/builtin/packages/libibumad/package.py
@@ -19,6 +19,8 @@ class Libibumad(CMakePackage):
version("44.1", sha256="1dec7e25dd248f1ff4d262e5674297205ad9113a4ff25ab7ecbb75a824adac27")
version("25.0", sha256="d735bd091d13e8a68ce650e432b5bdc934fc7f1d5fb42a6045278a5b3f7fe48b")
+ depends_on("c", type="build") # generated
+
depends_on("libnl")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libical/package.py b/var/spack/repos/builtin/packages/libical/package.py
index 8ba00a19ef..452dbabd65 100644
--- a/var/spack/repos/builtin/packages/libical/package.py
+++ b/var/spack/repos/builtin/packages/libical/package.py
@@ -14,9 +14,14 @@ class Libical(CMakePackage):
license("LGPL-2.1-only OR MPL-2.0")
+ version("3.0.18", sha256="72b7dc1a5937533aee5a2baefc990983b66b141dd80d43b51f80aced4aae219c")
+ version("3.0.17", sha256="bcda9a6db6870240328752854d1ea475af9bbc6356e6771018200e475e5f781b")
version("3.0.11", sha256="1e6c5e10c5a48f7a40c68958055f0e2759d9ab3563aca17273fe35a5df7dbbf1")
version("3.0.8", sha256="09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1.0:", type="build")
depends_on("perl", type="build")
depends_on("pkgconfig", type="build")
@@ -25,4 +30,4 @@ class Libical(CMakePackage):
depends_on("libxml2@2.7.3:")
def cmake_args(self):
- return ["-DENABLE_GTK_DOC=OFF"]
+ return [self.define("ENABLE_GTK_DOC", "OFF")]
diff --git a/var/spack/repos/builtin/packages/libicd/package.py b/var/spack/repos/builtin/packages/libicd/package.py
index a8c7521e44..307e372772 100644
--- a/var/spack/repos/builtin/packages/libicd/package.py
+++ b/var/spack/repos/builtin/packages/libicd/package.py
@@ -16,6 +16,9 @@ class Libicd(CMakePackage):
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
depends_on("jpeg")
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/libice/package.py b/var/spack/repos/builtin/packages/libice/package.py
index 63c7dfa57d..e8807b8881 100644
--- a/var/spack/repos/builtin/packages/libice/package.py
+++ b/var/spack/repos/builtin/packages/libice/package.py
@@ -9,14 +9,25 @@ from spack.package import *
class Libice(AutotoolsPackage, XorgPackage):
"""libICE - Inter-Client Exchange Library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libICE"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libICE"
xorg_mirror_path = "lib/libICE-1.0.9.tar.gz"
license("X11")
+ maintainers("wdconinc")
+
+ version("1.1.1", sha256="04fbd34a11ba08b9df2e3cdb2055c2e3c1c51b3257f683d7fcf42dabcf8e1210")
+ version("1.1.0", sha256="7a735ec530d7a437955747eabac06bbc0b695da77fd1b4d1df3b0a483d823875")
+ version("1.0.10", sha256="1116bc64c772fd127a0d0c0ffa2833479905e3d3d8197740b3abd5f292f22d2d")
version("1.0.9", sha256="7812a824a66dd654c830d21982749b3b563d9c2dfe0b88b203cefc14a891edc0")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ # technically libbsd is only required when glibc < 2.36 which provides arc4random_buf,
+ # but spack doesn't currently have a good way to model this so we depend on it unconditionally
+ depends_on("libbsd", when="platform=linux")
+
+ depends_on("xproto", type=("build", "link"))
depends_on("xtrans")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py
index efe9584a82..26db964f1c 100644
--- a/var/spack/repos/builtin/packages/libiconv/package.py
+++ b/var/spack/repos/builtin/packages/libiconv/package.py
@@ -20,6 +20,8 @@ class Libiconv(AutotoolsPackage, GNUMirrorPackage):
version("1.15", sha256="ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178")
version("1.14", sha256="72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613")
+ depends_on("c", type="build") # generated
+
variant(
"libs",
default="shared,static",
@@ -41,11 +43,22 @@ class Libiconv(AutotoolsPackage, GNUMirrorPackage):
args += self.enable_or_disable("libs")
args.append("--with-pic")
+ # Starting version 1.17, libiconv uses the version of gnulib that implements a
+ # configure-time check for C compiler flags that enables/disables certain warning
+ # (see https://git.savannah.gnu.org/gitweb/?p=gnulib.git;h=0c8a563f6). Unfortunately, the
+ # check does not work for compilers that inject extra symbols into the translation unit
+ # during the preprocessing step. For example, NVHPC injects the definition of the
+ # __va_list_tag structure, which appears verbatim on the compilation command line as
+ # additional compiler flags. The easiest way to circumvent the issue is to make the
+ # configure script believe that the compiler does not support a flag that allows warnings:
+ if self.spec.satisfies("@1.17:%nvhpc"):
+ args.append("gl_cv_cc_wallow=none")
+
# A hack to patch config.guess in the libcharset sub directory
copy("./build-aux/config.guess", "libcharset/build-aux/config.guess")
return args
@property
def libs(self):
- shared = "libs=shared" in self.spec
+ shared = self.spec.satisfies("libs=shared")
return find_libraries(["libiconv"], root=self.prefix, recursive=True, shared=shared)
diff --git a/var/spack/repos/builtin/packages/libid3tag/package.py b/var/spack/repos/builtin/packages/libid3tag/package.py
index 2d28ded9c6..1fa9721b6a 100644
--- a/var/spack/repos/builtin/packages/libid3tag/package.py
+++ b/var/spack/repos/builtin/packages/libid3tag/package.py
@@ -19,6 +19,8 @@ class Libid3tag(AutotoolsPackage):
version("0.15.1b", sha256="63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("gperf")
diff --git a/var/spack/repos/builtin/packages/libidl/package.py b/var/spack/repos/builtin/packages/libidl/package.py
index 5074329b40..5dc471aebd 100644
--- a/var/spack/repos/builtin/packages/libidl/package.py
+++ b/var/spack/repos/builtin/packages/libidl/package.py
@@ -17,6 +17,8 @@ class Libidl(AutotoolsPackage):
version("0.8.14", sha256="c5d24d8c096546353fbc7cedf208392d5a02afe9d56ebcc1cccb258d7c4d2220")
+ depends_on("c", type="build") # generated
+
depends_on("flex", type="build")
depends_on("bison", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/libidn/package.py b/var/spack/repos/builtin/packages/libidn/package.py
new file mode 100644
index 0000000000..275ecd5f4f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libidn/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libidn(AutotoolsPackage, GNUMirrorPackage):
+ """GNU Libidn is a fully documented implementation of the Stringprep,
+ Punycode and IDNA 2003 specifications. Libidn's purpose is to
+ encode and decode internationalized domain names."""
+
+ homepage = "https://www.gnu.org/software/libidn/"
+ gnu_mirror_path = "libidn/libidn-1.42.tar.gz"
+
+ maintainers("snehring")
+
+ license("LGPL-2.1-or-later", checked_by="snehring")
+
+ version("1.42", sha256="d6c199dcd806e4fe279360cb4b08349a0d39560ed548ffd1ccadda8cdecb4723")
+ version("1.38", sha256="de00b840f757cd3bb14dd9a20d5936473235ddcba06d4bc2da804654b8bbf0f6")
+ version("1.34", sha256="3719e2975f2fb28605df3479c380af2cf4ab4e919e1506527e4c7670afff6e3c")
+ version("1.28", sha256="dd357a968449abc97c7e5fa088a4a384de57cb36564f9d4e0d898ecc6373abfb")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libidn2/package.py b/var/spack/repos/builtin/packages/libidn2/package.py
index f36da936ac..c073712bd1 100644
--- a/var/spack/repos/builtin/packages/libidn2/package.py
+++ b/var/spack/repos/builtin/packages/libidn2/package.py
@@ -17,6 +17,7 @@ class Libidn2(AutotoolsPackage, GNUMirrorPackage):
license("GPL-2.0-or-later OR LGPL-3.0-or-later")
+ version("2.3.7", sha256="4c21a791b610b9519b9d0e12b8097bf2f359b12f8dd92647611a929e6bfd7d64")
version("2.3.4", sha256="93caba72b4e051d1f8d4f5a076ab63c99b77faee019b72b9783b267986dbb45f")
version("2.3.3", sha256="f3ac987522c00d33d44b323cae424e2cffcb4c63c6aa6cd1376edacbf1c36eb0")
version("2.3.2", sha256="76940cd4e778e8093579a9d195b25fff5e936e9dc6242068528b437a76764f91")
@@ -27,6 +28,8 @@ class Libidn2(AutotoolsPackage, GNUMirrorPackage):
version("2.1.0", sha256="032398dbaa9537af43f51a8d94e967e3718848547b1b2a4eb3138b20cad11d32")
version("2.0.5", sha256="53f69170886f1fa6fa5b332439c7a77a7d22626a82ef17e2c1224858bb4ca2b8")
+ depends_on("c", type="build") # generated
+
depends_on("libunistring")
# in-source build fails
diff --git a/var/spack/repos/builtin/packages/libimagequant/package.py b/var/spack/repos/builtin/packages/libimagequant/package.py
index e4f22875f3..9c6a50553c 100644
--- a/var/spack/repos/builtin/packages/libimagequant/package.py
+++ b/var/spack/repos/builtin/packages/libimagequant/package.py
@@ -19,5 +19,7 @@ class Libimagequant(MakefilePackage):
version("2.12.6", sha256="b34964512c0dbe550c5f1b394c246c42a988cd73b71a76c5838aa2b4a96e43a0")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
configure("--prefix=" + prefix)
diff --git a/var/spack/repos/builtin/packages/libinih/package.py b/var/spack/repos/builtin/packages/libinih/package.py
index 8ed231a4cc..95f8333219 100644
--- a/var/spack/repos/builtin/packages/libinih/package.py
+++ b/var/spack/repos/builtin/packages/libinih/package.py
@@ -16,3 +16,6 @@ class Libinih(MesonPackage):
git = "https://github.com/benhoyt/inih.git"
version("master", branch="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 889e98776e..cc09df5645 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -33,6 +33,7 @@ class Libint(AutotoolsPackage):
license("LGPL-3.0-only")
+ version("2.9.0", sha256="4929b2f2d3e53479270be052e366e8c70fa154a7f309e5c2c23b7d394159687d")
version("2.6.0", sha256="4ae47e8f0b5632c3d2a956469a7920896708e9f0e396ec10071b8181e4c8d9fa")
version("2.4.2", sha256="86dff38065e69a3a51d15cfdc638f766044cb87e5c6682d960c14f9847e2eac3")
version("2.4.1", sha256="0513be124563fdbbc7cd3c7043e221df1bda236a037027ba9343429a27db8ce4")
@@ -42,6 +43,10 @@ class Libint(AutotoolsPackage):
version("1.1.6", sha256="f201b0c621df678cfe8bdf3990796b8976ff194aba357ae398f2f29b0e2985a6")
version("1.1.5", sha256="ec8cd4a4ba1e1a98230165210c293632372f0e573acd878ed62e5ec6f8b6174b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("debug", default=False, description="Enable building with debug symbols")
variant("fortran", default=False, description="Build & install Fortran bindings")
variant(
@@ -64,11 +69,16 @@ class Libint(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("python", type="build")
+ depends_on("cmake@3.19:", when="@2.6.0:", type="build")
# Libint 2 dependencies
# Fixme: Can maintainers please confirm that this is a required dependency
depends_on(Boost.with_default_variants, when="@2:")
depends_on("gmp+cxx", when="@2:")
+ depends_on("eigen", when="@2.7.0:")
+ # unicode variable names in @2.9.0:
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67224
+ conflicts("%gcc@:9", when="@2.9.0:", msg="libint@2.9.0: requires at least gcc 10")
for tvariant in TUNE_VARIANTS[1:]:
conflicts(
@@ -98,10 +108,6 @@ class Libint(AutotoolsPackage):
aclocal("-I", "lib/autoconf")
autoconf()
- if "@2.6.0:" in spec:
- # skip tarball creation and removal of dir with generated code
- filter_file(r"^(export::.*)\s+tgz$", r"\1", "export/Makefile")
-
@property
def optflags(self):
flags = "-O2"
@@ -117,9 +123,12 @@ class Libint(AutotoolsPackage):
env.set("CFLAGS", self.optflags)
env.set("CXXFLAGS", self.optflags)
+ if self.spec.satisfies("%fj"):
+ env.set("LDFLAGS", "--linkfortran")
+
# Change AR to xiar if we compile with Intel and we
# find the executable
- if "%intel" in self.spec and which("xiar"):
+ if self.spec.satisfies("%intel") and which("xiar"):
env.set("AR", "xiar")
def configure_args(self):
@@ -149,7 +158,7 @@ class Libint(AutotoolsPackage):
if self.version < Version("2.0.0"):
config_args.extend(["--with-libint-max-am=5", "--with-libderiv-max-am1=4"])
- if "@2.6.0:" in self.spec:
+ if self.spec.satisfies("@2.6.0:"):
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")
@@ -195,7 +204,7 @@ class Libint(AutotoolsPackage):
@property
def build_targets(self):
- if "@2.6.0:" in self.spec:
+ if self.spec.satisfies("@2.6.0:"):
return ["export"]
return []
@@ -209,40 +218,71 @@ class Libint(AutotoolsPackage):
"""
# 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
- # first generate the libint compiler
+ # is deprecated and one should use CMake
+
+ # skip tarball creation and removal of dir with generated code
+ filter_file("&& rm -rf $(EXPORTDIR)", "", "export/Makefile", string=True)
+
make("export")
# now build the library
with working_dir(os.path.join(self.build_directory, "generated")):
- # straight from the AutotoolsPackage class:
- config_args = [
- "--prefix={0}".format(prefix),
- "--enable-shared",
- "--with-boost={0}".format(self.spec["boost"].prefix),
- "--with-cxx-optflags={0}".format(self.optflags),
- ]
- config_args += self.enable_or_disable("debug", activation_value=lambda x: "opt")
- config_args += self.enable_or_disable("fortran")
-
- configure = Executable("./configure")
- configure(*config_args)
- make()
+ if spec.satisfies("@2.6.0"):
+ config_args = [
+ f"--prefix={prefix}",
+ "--enable-shared",
+ f"--with-boost={spec['boost'].prefix}",
+ f"--with-cxx-optflags={self.optflags}",
+ ]
+ config_args += self.enable_or_disable("debug", activation_value=lambda x: "opt")
+ config_args += self.enable_or_disable("fortran")
+ configure = Executable("./configure")
+ configure(*config_args)
+ make()
+ else:
+ cmake_args = [
+ "..",
+ f"-DCMAKE_INSTALL_PREFIX={prefix}",
+ "-DLIBINT2_BUILD_SHARED_AND_STATIC_LIBS=ON",
+ ]
+ if spec.satisfies("+fortran"):
+ cmake_args.append("-DENABLE_FORTRAN=ON")
+ if spec.satisfies("+debug"):
+ cmake_args.append("CMAKE_BUILD_TYPE=Debug")
+ cmake = Executable("cmake")
+ mkdirp("build")
+ with working_dir("build"):
+ cmake(*cmake_args)
+ make()
@when("@2.6.0:")
def check(self):
- with working_dir(os.path.join(self.build_directory, "generated")):
+ path = join_path(self.build_directory, "generated")
+ if self.spec.satisfies("@2.9.0:"):
+ path = join_path(path, "build")
+ with working_dir(path):
make("check")
@when("@2.6.0:")
def install(self, spec, prefix):
- with working_dir(os.path.join(self.build_directory, "generated")):
+ path = join_path(self.build_directory, "generated")
+ if self.spec.satisfies("@2.9.0:"):
+ path = join_path(path, "build")
+ with working_dir(path):
make("install")
+ @when("@:2.6.0")
def patch(self):
# Use Fortran compiler to link the Fortran example, not the C++
# compiler
- if "+fortran" in self.spec:
- filter_file(
- "$(CXX) $(CXXFLAGS)", "$(FC) $(FCFLAGS)", "export/fortran/Makefile", string=True
- )
+ if self.spec.satisfies("+fortran"):
+ if not self.spec.satisfies("%fj"):
+ filter_file(
+ "$(CXX) $(CXXFLAGS)",
+ "$(FC) $(FCFLAGS)",
+ "export/fortran/Makefile",
+ string=True,
+ )
+
+ @property
+ def libs(self):
+ return find_libraries("libint2", self.spec.prefix, shared=True, recursive=True)
diff --git a/var/spack/repos/builtin/packages/libisal/package.py b/var/spack/repos/builtin/packages/libisal/package.py
index e812129e6e..4da1110d88 100644
--- a/var/spack/repos/builtin/packages/libisal/package.py
+++ b/var/spack/repos/builtin/packages/libisal/package.py
@@ -15,8 +15,11 @@ class Libisal(AutotoolsPackage):
license("BSD-3-Clause")
+ version("2.31.0", sha256="e218b7b2e241cfb8e8b68f54a6e5eed80968cc387c4b1af03708b54e9fb236f1")
version("2.29.0", sha256="832d9747ef3f0c8c05d39e3d7fd6ee5299a844e1ee7382fc8c8b52a268f36eda")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libiscsi/package.py b/var/spack/repos/builtin/packages/libiscsi/package.py
index 9fe50b24b9..e6c366d248 100644
--- a/var/spack/repos/builtin/packages/libiscsi/package.py
+++ b/var/spack/repos/builtin/packages/libiscsi/package.py
@@ -19,6 +19,8 @@ class Libiscsi(AutotoolsPackage):
version("1.16.0", sha256="35c7be63a8c3a7cee7b697901b6d2dd464e098e1881671eb67462983053b3c7b")
version("1.15.0", sha256="489e625e58c1e6da2fa3536f9c4b12290f2d3fb4ce14edc0583b8ba500605c34")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
index eb18f147c3..d88e2984ef 100644
--- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
+import spack.build_systems.cmake
from spack.package import *
@@ -14,12 +17,17 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage):
transcoding.
"""
+ maintainers("AlexanderRichert-NOAA")
+
# https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/BUILDING.md
homepage = "https://libjpeg-turbo.org/"
url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz"
license("BSD-3-Clause AND IJG AND Zlib")
+ version("3.0.3", sha256="a649205a90e39a548863a3614a9576a3fb4465f8e8e66d54999f127957c25b21")
+ version("3.0.2", sha256="29f2197345aafe1dcaadc8b055e4cbec9f35aad2a318d61ea081f835af2eebe9")
+ version("3.0.1", sha256="5b9bbca2b2a87c6632c821799438d358e27004ab528abf798533c15d50b39f82")
version("3.0.0", sha256="171dae5d73560bc94006a7c0c3281bd9bfde6a34f7e41e66f930a1a9162bd7df")
version("2.1.5.1", sha256="61846251941e5791005fb7face196eec24541fce04f12570c308557529e92c75")
version("2.1.5", sha256="254f3642b04e309fee775123133c6464181addc150499561020312ec61c1bf7c")
@@ -50,6 +58,9 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
provides("jpeg")
build_system(
@@ -58,10 +69,18 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage):
default="cmake",
)
- variant("shared", default=True, description="Build shared libs")
- variant("static", default=True, description="Build static libs")
+ variant(
+ "libs",
+ default=("shared", "static"),
+ values=("shared", "static"),
+ multi=True,
+ description="Build shared libs, static libs, or both",
+ )
variant("jpeg8", default=False, description="Emulate libjpeg v8 API/ABI")
variant(
+ "pic", default=True, description="Enable position independent code", when="libs=static"
+ )
+ variant(
"partial_decoder",
default=False,
description="add partial_decode_scale functionality required for rocAL",
@@ -94,15 +113,18 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage):
@property
def libs(self):
- return find_libraries("libjpeg*", root=self.prefix, recursive=True)
+ shared = self.spec.satisfies("libs=shared")
+ name = "jpeg" if sys.platform == "win32" else "libjpeg*"
+ return find_libraries(name, root=self.prefix, shared=shared, recursive=True, runtime=False)
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
args = [
- self.define_from_variant("ENABLE_SHARED", "shared"),
- self.define_from_variant("ENABLE_STATIC", "static"),
+ self.define("ENABLE_SHARED", self.spec.satisfies("libs=shared")),
+ self.define("ENABLE_STATIC", self.spec.satisfies("libs=static")),
self.define_from_variant("WITH_JPEG8", "jpeg8"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
return args
@@ -110,5 +132,5 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
@run_after("install")
def darwin_fix(self):
# The shared library is not installed correctly on Darwin; fix this
- if self.spec.satisfies("platform=darwin") and ("+shared" in self.spec):
+ if self.spec.satisfies("platform=darwin") and self.spec.satisfies("+shared"):
fix_darwin_install_name(self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/libjpeg/package.py b/var/spack/repos/builtin/packages/libjpeg/package.py
index e2733c41ce..93f89b7149 100644
--- a/var/spack/repos/builtin/packages/libjpeg/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg/package.py
@@ -16,12 +16,15 @@ class Libjpeg(AutotoolsPackage):
license("BitTorrent-1.0")
+ version("9f", sha256="04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b")
version("9e", sha256="4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d")
version("9d", sha256="6c434a3be59f8f62425b2e3c077e785c9ce30ee5874ea1c270e843f273ba71ee")
version("9c", sha256="650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122")
version("9b", sha256="240fd398da741669bf3c90366f58452ea59041cacc741a489b99f2f6a0bad052")
version("9a", sha256="3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7")
+ depends_on("c", type="build") # generated
+
provides("jpeg")
def check(self):
diff --git a/var/spack/repos/builtin/packages/libjson/package.py b/var/spack/repos/builtin/packages/libjson/package.py
index e2f393bab0..d7cd514f7e 100644
--- a/var/spack/repos/builtin/packages/libjson/package.py
+++ b/var/spack/repos/builtin/packages/libjson/package.py
@@ -20,6 +20,8 @@ class Libjson(MakefilePackage):
version("0.5", sha256="d19e149118c01c4a1f4cd16be3ce54bfc97a7210b6f0d76a3f8ef75bf70e8acd")
version("0.4", sha256="9b3ebbeb1940dbd8664524d27e66d991fedc00cca9f403f9aa9c2f28104ca81b")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
filter_file("-o root -g root", "", "Makefile")
diff --git a/var/spack/repos/builtin/packages/libjwt/package.py b/var/spack/repos/builtin/packages/libjwt/package.py
index ae372d3c4d..9037fa72cf 100644
--- a/var/spack/repos/builtin/packages/libjwt/package.py
+++ b/var/spack/repos/builtin/packages/libjwt/package.py
@@ -23,6 +23,8 @@ class Libjwt(AutotoolsPackage):
version("1.12.1", sha256="d29e4250d437340b076350e910e69fd5539ef8b92528d0306745cec0e343cc17")
version("1.12.0", sha256="eaf5d8b31d867c02dde767efa2cf494840885a415a3c9a62680bf870a4511bee")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libjxl/package.py b/var/spack/repos/builtin/packages/libjxl/package.py
index e4828c90a0..5117fc3c92 100644
--- a/var/spack/repos/builtin/packages/libjxl/package.py
+++ b/var/spack/repos/builtin/packages/libjxl/package.py
@@ -17,13 +17,20 @@ class Libjxl(CMakePackage):
version("main", branch="main", submodules=True)
version(
+ "0.10.2", tag="v0.10.2", commit="e1489592a770b989303b0edc5cc1dc447bbe0515", submodules=True
+ )
+ version(
"0.7.0", tag="v0.7.0", commit="f95da131cf7c7ccd4da256356fde2fec1fa23bb5", submodules=True
)
version(
"0.6.1", tag="v0.6.1", commit="a205468bc5d3a353fb15dae2398a101dff52f2d3", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.10:", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("brotli")
depends_on("highway")
@@ -40,6 +47,7 @@ class Libjxl(CMakePackage):
args = [
self.define("JPEGXL_FORCE_SYSTEM_BROTLI", True),
self.define("JPEGXL_FORCE_SYSTEM_HWY", True),
+ self.define("BUILD_TESTING", self.run_tests),
]
if self.run_tests:
diff --git a/var/spack/repos/builtin/packages/libkcapi/package.py b/var/spack/repos/builtin/packages/libkcapi/package.py
index 7ca711e4ca..5f9dfd29d5 100644
--- a/var/spack/repos/builtin/packages/libkcapi/package.py
+++ b/var/spack/repos/builtin/packages/libkcapi/package.py
@@ -14,10 +14,13 @@ class Libkcapi(AutotoolsPackage):
license("BSD-3-Clause OR GPL-2.0-only")
+ version("1.5.0", sha256="f1d827738bda03065afd03315479b058f43493ab6e896821b947f391aa566ba0")
version("1.2.0", sha256="8be75173c56342c8fe1c63a901c0d9cb750405abdc23288d04f549a960862867")
version("1.1.5", sha256="ca38bf4d750dd2d3531ddb94d502feedb0f926bd9b29fb97e253b83bbceb6611")
version("1.1.4", sha256="241ffa4f2813c6da442b1c1e152d489905ffab35a6c50e76aca5ee6fe60319dd")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libkml/package.py b/var/spack/repos/builtin/packages/libkml/package.py
index 69f98eea82..2c0fde6cfc 100644
--- a/var/spack/repos/builtin/packages/libkml/package.py
+++ b/var/spack/repos/builtin/packages/libkml/package.py
@@ -20,6 +20,9 @@ class Libkml(CMakePackage):
version("1.3.0", sha256="8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("java", default=False, description="Build java bindings")
variant("python", default=False, description="Build python bindings")
@@ -49,12 +52,12 @@ class Libkml(CMakePackage):
args = []
- if "+java" in spec:
+ if spec.satisfies("+java"):
args.append("-DWITH_JAVA:BOOL=ON")
else:
args.append("-DWITH_JAVA:BOOL=OFF")
- if "+python" in spec:
+ if spec.satisfies("+python"):
args.append("-DWITH_PYTHON:BOOL=ON")
else:
args.append("-DWITH_PYTHON:BOOL=OFF")
diff --git a/var/spack/repos/builtin/packages/libksba/package.py b/var/spack/repos/builtin/packages/libksba/package.py
index c92d7ac042..65bc644241 100644
--- a/var/spack/repos/builtin/packages/libksba/package.py
+++ b/var/spack/repos/builtin/packages/libksba/package.py
@@ -2,8 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
from spack.package import *
@@ -19,49 +17,22 @@ class Libksba(AutotoolsPackage):
license("LGPL-3.0-only AND GPL-2.0-only AND GPL-3.0-only")
+ version("1.6.7", sha256="cf72510b8ebb4eb6693eef765749d83677a03c79291a311040a5bfd79baab763")
+ version("1.6.6", sha256="5dec033d211559338838c0c4957c73dfdc3ee86f73977d6279640c9cd08ce6a4")
version("1.6.5", sha256="a564628c574c99287998753f98d750babd91a4e9db451f46ad140466ef2a6d16")
version("1.6.4", sha256="bbb43f032b9164d86c781ffe42213a83bf4f2fee91455edfa4654521b8b03b6b")
version("1.6.3", sha256="3f72c68db30971ebbf14367527719423f0a4d5f8103fc9f4a1c01a9fa440de5c")
- # Deprecated over CVE-2022-3515 (https://gnupg.org/blog/20221017-pepe-left-the-ksba.html)
- version(
- "1.6.2",
- sha256="fce01ccac59812bddadffacff017dac2e4762bdb6ebc6ffe06f6ed4f6192c971",
- deprecated=True,
- )
- version(
- "1.6.0",
- sha256="dad683e6f2d915d880aa4bed5cea9a115690b8935b78a1bbe01669189307a48b",
- deprecated=True,
- )
- version(
- "1.5.1",
- sha256="b0f4c65e4e447d9a2349f6b8c0e77a28be9531e4548ba02c545d1f46dc7bf921",
- deprecated=True,
- )
- version(
- "1.5.0",
- sha256="ae4af129216b2d7fdea0b5bf2a788cd458a79c983bb09a43f4d525cc87aba0ba",
- deprecated=True,
- )
- version(
- "1.4.0",
- sha256="bfe6a8e91ff0f54d8a329514db406667000cb207238eded49b599761bfca41b6",
- deprecated=True,
- )
- version(
- "1.3.5",
- sha256="41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340",
- deprecated=True,
- )
+ depends_on("c", type="build") # generated
- depends_on("libgpg-error@1.8:")
+ # Versions before 1.6.3 were deprecated over CVE-2022-3515
+ # (https://gnupg.org/blog/20221017-pepe-left-the-ksba.html)
- conflicts("%apple-clang@12:", when="@:1.3")
+ depends_on("libgpg-error@1.8:")
def configure_args(self):
return [
"--enable-static",
"--enable-shared",
- "--with-libgpg-error-prefix=" + self.spec["libgpg-error"].prefix,
+ f"--with-libgpg-error-prefix={self.spec['libgpg-error'].prefix}",
]
diff --git a/var/spack/repos/builtin/packages/liblas/package.py b/var/spack/repos/builtin/packages/liblas/package.py
index de77219900..3fa4283976 100644
--- a/var/spack/repos/builtin/packages/liblas/package.py
+++ b/var/spack/repos/builtin/packages/liblas/package.py
@@ -18,6 +18,9 @@ class Liblas(CMakePackage):
version("1.8.1", sha256="9adb4a98c63b461ed2bc82e214ae522cbd809cff578f28511122efe6c7ea4e76")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# libLAS linkage of GDAL and libgeotiff enhances spatial coordinate system
# description and provides data reprojection support.
# Ref.: https://liblas.org/compilation.html#optional-libraries
@@ -34,22 +37,22 @@ class Liblas(CMakePackage):
def cmake_args(self):
args = []
- if "+endian" in self.spec:
+ if self.spec.satisfies("+endian"):
args.append("-DWITH_ENDIANAWARE=ON")
else:
args.append("-DWITH_ENDIANAWARE=OFF")
- if "+gdal" in self.spec:
+ if self.spec.satisfies("+gdal"):
args.append("-DWITH_GDAL=ON")
else:
args.append("-DWITH_GDAL=OFF")
- if "+geotiff" in self.spec:
+ if self.spec.satisfies("+geotiff"):
args.append("-DWITH_GEOTIFF=ON")
else:
args.append("-DWITH_GEOTIFF=OFF")
- if "+laszip" in self.spec:
+ if self.spec.satisfies("+laszip"):
args.append("-DWITH_LASZIP=ON")
else:
args.append("-DWITH_LASZIP=OFF")
diff --git a/var/spack/repos/builtin/packages/liblbxutil/package.py b/var/spack/repos/builtin/packages/liblbxutil/package.py
index 8a8e47cbbb..3717532752 100644
--- a/var/spack/repos/builtin/packages/liblbxutil/package.py
+++ b/var/spack/repos/builtin/packages/liblbxutil/package.py
@@ -9,15 +9,17 @@ from spack.package import *
class Liblbxutil(AutotoolsPackage, XorgPackage):
"""liblbxutil - Low Bandwith X extension (LBX) utility routines."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/liblbxutil"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/liblbxutil"
xorg_mirror_path = "lib/liblbxutil-1.1.0.tar.gz"
license("libtiff")
version("1.1.0", sha256="285c1bc688cc71ec089e9284f2566d1780cc5d90816e9997890af8689f386951")
- depends_on("xextproto@7.0.99.1:")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xextproto@7.0.99.1:", type="build")
+ depends_on("xproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
depends_on("zlib-api", type="link")
diff --git a/var/spack/repos/builtin/packages/liblockfile/package.py b/var/spack/repos/builtin/packages/liblockfile/package.py
index 91a9f04209..9dce85e240 100644
--- a/var/spack/repos/builtin/packages/liblockfile/package.py
+++ b/var/spack/repos/builtin/packages/liblockfile/package.py
@@ -16,6 +16,8 @@ class Liblockfile(AutotoolsPackage):
version("1.14", sha256="be85dba347889d9b65cbd361a611e6b88e044fdca9c98e5139d5fbc9ba37ccc8")
+ depends_on("c", type="build") # generated
+
patch("install_as_nonroot.patch")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/liblognorm/package.py b/var/spack/repos/builtin/packages/liblognorm/package.py
index 1512db8232..d8ff085302 100644
--- a/var/spack/repos/builtin/packages/liblognorm/package.py
+++ b/var/spack/repos/builtin/packages/liblognorm/package.py
@@ -20,6 +20,8 @@ class Liblognorm(AutotoolsPackage):
version("2.0.3", sha256="fac2a6a5adbeb63d06a63ab2e398b3fac8625d0ea69db68f1d81196897a9d687")
version("2.0.2", sha256="bdd08e9837e8fcca5029ec12c9fb9f16593313f9d743625bab062250e0daa5d8")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/liblouis/package.py b/var/spack/repos/builtin/packages/liblouis/package.py
index d8428ca73a..730ea4ed60 100644
--- a/var/spack/repos/builtin/packages/liblouis/package.py
+++ b/var/spack/repos/builtin/packages/liblouis/package.py
@@ -22,3 +22,5 @@ class Liblouis(AutotoolsPackage):
version("3.13.0", sha256="2803b89a2bff9f02032125fa7b7d0a204a60d8d14f232242344b5f09535e9a01")
version("3.12.0", sha256="87d9bad6d75916270bad14bb22fa5f487c7edee4774878c04bef82833bc9467d")
version("3.11.0", sha256="b802aba0bff49636907ca748225e21c56ecf3f3ebc143d582430036d4d9f6259")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libluv/package.py b/var/spack/repos/builtin/packages/libluv/package.py
index 3993e5dbf7..3f64589c2d 100644
--- a/var/spack/repos/builtin/packages/libluv/package.py
+++ b/var/spack/repos/builtin/packages/libluv/package.py
@@ -16,6 +16,7 @@ class Libluv(CMakePackage):
license("Apache-2.0")
+ version("1.48.0-2", sha256="2c3a1ddfebb4f6550293a40ee789f7122e97647eede51511f57203de48c03b7a")
version("1.45.0-0", sha256="fa6c46fb09f88320afa7f88017efd7b0d2b3a0158c5ba5b6851340b0332a2b81")
version("1.44.2-1", sha256="3eb5c7bc44f61fbc4148ea30e3221d410263e0ffa285672851fc19debf9e5c30")
version("1.44.2-0", sha256="30639f8e0fac7fb0c3a04b94a00f73c6d218c15765347ceb0998a6b72464b6cf")
@@ -24,6 +25,8 @@ class Libluv(CMakePackage):
version("1.42.0-0", sha256="b5228a9d0eaacd9f862b6270c732d5c90773a28ce53b6d9e32a14050e7947f36")
version("1.36.0-0", sha256="f2e7eb372574f25c6978c1dc74280d22efdcd7df2dda4a286c7fe7dceda26445")
+ depends_on("c", type="build") # generated
+
# https://github.com/neovim/neovim/issues/25770
# up to 1.45 (included) dynamic library on macOS did not have the @rpath prefix, being not
# usable on this platform.
diff --git a/var/spack/repos/builtin/packages/liblzf/package.py b/var/spack/repos/builtin/packages/liblzf/package.py
index 91c60937e0..2e93bca660 100644
--- a/var/spack/repos/builtin/packages/liblzf/package.py
+++ b/var/spack/repos/builtin/packages/liblzf/package.py
@@ -19,3 +19,5 @@ class Liblzf(AutotoolsPackage):
license("BSD-2-Clause")
version("3.6", sha256="9c5de01f7b9ccae40c3f619d26a7abec9986c06c36d260c179cedd04b89fb46a")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libmacaroons/package.py b/var/spack/repos/builtin/packages/libmacaroons/package.py
index 37d433f852..4278f575d2 100644
--- a/var/spack/repos/builtin/packages/libmacaroons/package.py
+++ b/var/spack/repos/builtin/packages/libmacaroons/package.py
@@ -20,6 +20,8 @@ class Libmacaroons(AutotoolsPackage):
version("0.2.0", sha256="fa2146d89a4e844703896ece778f0c42b2b0ee3d09dea350ff34fd6873e72018")
version("0.1.0", sha256="0aa413d8a793f004874695466f93eed9c8e721524765704fe410694583928007")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libmad/package.py b/var/spack/repos/builtin/packages/libmad/package.py
index 3d221d03ed..c064efd796 100644
--- a/var/spack/repos/builtin/packages/libmad/package.py
+++ b/var/spack/repos/builtin/packages/libmad/package.py
@@ -17,6 +17,8 @@ class Libmad(AutotoolsPackage):
version("0.15.1b", sha256="bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libmatheval/package.py b/var/spack/repos/builtin/packages/libmatheval/package.py
index abdd74882c..d41a1ccda6 100644
--- a/var/spack/repos/builtin/packages/libmatheval/package.py
+++ b/var/spack/repos/builtin/packages/libmatheval/package.py
@@ -21,6 +21,8 @@ class Libmatheval(AutotoolsPackage, GNUMirrorPackage):
version("1.1.11", sha256="474852d6715ddc3b6969e28de5e1a5fbaff9e8ece6aebb9dc1cc63e9e88e89ab")
+ depends_on("c", type="build") # generated
+
# Only needed for unit tests, but configure crashes without it
depends_on("guile", type="build")
diff --git a/var/spack/repos/builtin/packages/libmaus2/package.py b/var/spack/repos/builtin/packages/libmaus2/package.py
index fe4c0528f8..49f143c757 100644
--- a/var/spack/repos/builtin/packages/libmaus2/package.py
+++ b/var/spack/repos/builtin/packages/libmaus2/package.py
@@ -18,6 +18,9 @@ class Libmaus2(AutotoolsPackage):
url="https://gitlab.com/german.tischler/libmaus2/-/archive/2.0.767-release-20201123131410/libmaus2-2.0.767-release-20201123131410.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libmaxminddb/package.py b/var/spack/repos/builtin/packages/libmaxminddb/package.py
index adf0a6f24b..eb36bf98c3 100644
--- a/var/spack/repos/builtin/packages/libmaxminddb/package.py
+++ b/var/spack/repos/builtin/packages/libmaxminddb/package.py
@@ -16,9 +16,12 @@ class Libmaxminddb(AutotoolsPackage):
license("Apache-2.0")
+ version("1.9.1", sha256="a80682a89d915fdf60b35d316232fb04ebf36fff27fda9bd39fe8a38d3cd3f12")
version("1.7.1", sha256="e8414f0dedcecbc1f6c31cb65cd81650952ab0677a4d8c49cab603b3b8fb083e")
version("1.3.2", sha256="e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0")
+ depends_on("c", type="build") # generated
+
def configure_args(self):
args = ["--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules"]
return args
diff --git a/var/spack/repos/builtin/packages/libmbim/package.py b/var/spack/repos/builtin/packages/libmbim/package.py
index 6f86673daf..5cae06c702 100644
--- a/var/spack/repos/builtin/packages/libmbim/package.py
+++ b/var/spack/repos/builtin/packages/libmbim/package.py
@@ -23,6 +23,8 @@ class Libmbim(AutotoolsPackage):
version("1.14.4", sha256="4b2e8723ea50b2e1d22695850c40abb9f7bcb713ea3b9f91f2c350aaa6ae8d1c")
version("1.14.2", sha256="bf161c4f78327f8422fd6a820e7e5571d99b719af45429e581bfd6a1585fe4a8")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libmcrypt/package.py b/var/spack/repos/builtin/packages/libmcrypt/package.py
index 013c2a55ea..771195a5c0 100644
--- a/var/spack/repos/builtin/packages/libmcrypt/package.py
+++ b/var/spack/repos/builtin/packages/libmcrypt/package.py
@@ -17,3 +17,5 @@ class Libmcrypt(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("2.5.8", sha256="e4eb6c074bbab168ac47b947c195ff8cef9d51a211cdd18ca9c9ef34d27a373e")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libmd/package.py b/var/spack/repos/builtin/packages/libmd/package.py
index 6d813bfed4..c5de7e7c14 100644
--- a/var/spack/repos/builtin/packages/libmd/package.py
+++ b/var/spack/repos/builtin/packages/libmd/package.py
@@ -22,5 +22,7 @@ class Libmd(AutotoolsPackage):
version("1.0.1", sha256="e14eeb931cf85330f95ff822262d3033125488dfb2f867441e36e2d2c4a34c71")
version("1.0.0", sha256="f21aea69f6411cb4307cda1f6378c7ed07830202b5f4cb9e64f681fdaf2d64c7")
+ depends_on("c", type="build") # generated
+
# Use wrapper functions instead of __attribute__ __alias__
patch("nvhpc-aliases.patch", when="%nvhpc")
diff --git a/var/spack/repos/builtin/packages/libmesh/package.py b/var/spack/repos/builtin/packages/libmesh/package.py
index 6f26264614..0cd0ba6dac 100644
--- a/var/spack/repos/builtin/packages/libmesh/package.py
+++ b/var/spack/repos/builtin/packages/libmesh/package.py
@@ -20,6 +20,7 @@ class Libmesh(AutotoolsPackage):
version("master", branch="master", submodules=True)
+ version("1.7.1", sha256="0387d62773cf92356eb128ba92f767e56c298d78f4b97446e68bf288da1eb6b4")
version("1.4.1", sha256="67eb7d5a9c954d891ca1386b70f138333a87a141d9c44213449ca6be69a66414")
version("1.4.0", sha256="62d7fce89096c950d1b38908484856ea63df57754b64cde6582e7ac407c8c81d")
version("1.3.1", sha256="638cf30d05c249315760f16cbae4804964db8857a04d5e640f37617bef17ab0f")
@@ -119,6 +120,7 @@ class Libmesh(AutotoolsPackage):
values=("none", "pthreads", "tbb", "openmp"),
multi=False,
)
+ variant("shared", default=True, description="Enables the build of shared libraries")
conflicts(
"+metaphysicl",
@@ -140,8 +142,8 @@ class Libmesh(AutotoolsPackage):
depends_on("mpi", when="+slepc")
# compilation dependencies depend on perl
depends_on("perl")
- depends_on("petsc+mpi", when="+mpi")
- depends_on("petsc+metis", when="+metis")
+ depends_on("petsc+mpi", when="+petsc+mpi")
+ depends_on("petsc+metis", when="+petsc+metis")
depends_on("slepc", when="+slepc")
depends_on("petsc", when="+petsc")
depends_on("tbb", when="threads=tbb")
@@ -150,6 +152,11 @@ class Libmesh(AutotoolsPackage):
def configure_args(self):
options = []
+ if self.spec.satisfies("+shared"):
+ options.extend(["--enable-shared", "--disable-static"])
+ else:
+ options.extend(["--disable-shared", "--enable-static"])
+
# GLIBCXX debugging is not, by default, supported by other libraries,
# so unconditionally disable it for libmesh
options.append("--enable-glibcxx-debugging=no")
@@ -202,44 +209,44 @@ class Libmesh(AutotoolsPackage):
options.append("--enable-" + bundled_library + "=no")
# and the ones which are dependencies of other bundled libraries:
- if "+exodusii" in self.spec or "+netcdf" in self.spec:
+ if self.spec.satisfies("+exodusii") or self.spec.satisfies("+netcdf"):
options.append("--enable-netcdf=yes")
else:
options.append("--enable-netcdf=no")
- if "+vtk" in self.spec:
+ if self.spec.satisfies("+vtk"):
options.append("--enable-vtk")
options.append("--with-vtk=%s" % self.spec["vtk"].prefix)
else:
options.append("--disable-vtk")
# handle external library dependencies:
- if "+boost" in self.spec:
+ if self.spec.satisfies("+boost"):
options.append("--with-boost=%s" % self.spec["boost"].prefix)
else:
options.append("--enable-boost=no")
- if "+eigen" in self.spec:
+ if self.spec.satisfies("+eigen"):
options.append("--with-eigen=%s" % self.spec["eigen"].prefix)
else:
options.append("--enable-eigen=no")
- if "+metaphysicl" in self.spec:
+ if self.spec.satisfies("+metaphysicl"):
options.append("--enable-metaphysicl")
else:
options.append("--disable-metaphysicl")
- if "+perflog" in self.spec:
+ if self.spec.satisfies("+perflog"):
options.append("--enable-perflog")
else:
options.append("--disable-perflog")
- if "+blocked" in self.spec:
+ if self.spec.satisfies("+blocked"):
options.append("--enable-blocked-storage")
else:
options.append("--disable-blocked-storage")
- if "+hdf5" in self.spec:
+ if self.spec.satisfies("+hdf5"):
options.append("--with-hdf5=%s" % self.spec["hdf5"].prefix)
else:
options.append("--enable-hdf5=no")
@@ -248,32 +255,34 @@ class Libmesh(AutotoolsPackage):
if "+netcdf" not in self.spec:
options.append("--disable-netcdf-4")
- if "+metis" in self.spec:
+ if self.spec.satisfies("+metis"):
options.append("--enable-metis")
options.append("--enable-parmetis")
- if "+petsc" in self.spec:
+ if self.spec.satisfies("+petsc"):
options.append("--with-metis=PETSc")
options.append("--with-parmetis=PETSc")
+ else:
+ options.append("--disable-metis")
- if "+petsc" in self.spec or "+slepc" in self.spec:
+ if self.spec.satisfies("+petsc") or self.spec.satisfies("+slepc"):
options.append("--enable-petsc=yes")
options.append("PETSC_DIR=%s" % self.spec["petsc"].prefix)
else:
options.append("--enable-petsc=no")
- if "+slepc" in self.spec:
+ if self.spec.satisfies("+slepc"):
options.append("--enable-slepc=yes")
options.append("SLEPC_DIR=%s" % self.spec["slepc"].prefix)
else:
options.append("--enable-slepc=no")
# and, finally, other things:
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
options.append("--with-methods=dbg")
else:
options.append("--with-methods=opt")
- if "+mpi" in self.spec:
+ if self.spec.satisfies("+mpi"):
options.append("CC=%s" % self.spec["mpi"].mpicc)
options.append("CXX=%s" % self.spec["mpi"].mpicxx)
options.append("--with-mpi=%s" % self.spec["mpi"].prefix)
@@ -284,7 +293,7 @@ class Libmesh(AutotoolsPackage):
options.append("CC=%s" % self.compiler.cc)
options.append("CXX=%s" % self.compiler.cxx)
- if "threads=openmp" in self.spec:
+ if self.spec.satisfies("threads=openmp"):
# OpenMP cannot be used if pthreads is not available: see
# parallel/threads_pthread.h and parallel/threads.h
options.append("--enable-openmp=yes")
@@ -293,14 +302,14 @@ class Libmesh(AutotoolsPackage):
else:
options.append("--enable-openmp=no")
- if "threads=pthreads" in self.spec:
+ if self.spec.satisfies("threads=pthreads"):
options.append("--with-thread-model=pthread")
options.append("--enable-pthreads=yes")
else:
if "threads=openmp" not in self.spec:
options.append("--enable-pthreads=no")
- if "threads=tbb" in self.spec:
+ if self.spec.satisfies("threads=tbb"):
options.append("--with-thread-model=tbb")
options.append("--enable-tbb=yes")
options.append("--with-tbb=%s" % self.spec["tbb"].prefix)
diff --git a/var/spack/repos/builtin/packages/libmetalink/package.py b/var/spack/repos/builtin/packages/libmetalink/package.py
index b4465b86aa..fb7cca52c1 100644
--- a/var/spack/repos/builtin/packages/libmetalink/package.py
+++ b/var/spack/repos/builtin/packages/libmetalink/package.py
@@ -20,6 +20,8 @@ class Libmetalink(AutotoolsPackage):
version("0.1.2", sha256="64af0979c11658f7a1659ca97ebc3c7bac8104253bf504015ac3b9c363382bae")
version("0.1.1", sha256="e9b8dff68b0b999884c21f68d9b1cc0c1993270e3e1f639f82e27b1eb960cb66")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libmicrodns/package.py b/var/spack/repos/builtin/packages/libmicrodns/package.py
index 6a48c55266..cde841d6fb 100644
--- a/var/spack/repos/builtin/packages/libmicrodns/package.py
+++ b/var/spack/repos/builtin/packages/libmicrodns/package.py
@@ -17,3 +17,5 @@ class Libmicrodns(MesonPackage):
version("0.2.0", sha256="2da28e7dda4861d76f797f92ac3e6c3e048333b95f9e4fc3a6548ad8afd8c446")
version("0.1.2", sha256="666c4b9d86b5b3c37357bb78453c7e8b72cd65ade22d0a7963bfbefe51509b5c")
version("0.1.1", sha256="498c81fd07718f449267a207948536cbb527610942d91999488eaea6de301c52")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libmicrohttpd/package.py b/var/spack/repos/builtin/packages/libmicrohttpd/package.py
index fc9b25ba00..e39b9acf71 100644
--- a/var/spack/repos/builtin/packages/libmicrohttpd/package.py
+++ b/var/spack/repos/builtin/packages/libmicrohttpd/package.py
@@ -27,6 +27,8 @@ class Libmicrohttpd(AutotoolsPackage):
version("0.9.70", sha256="90d0a3d396f96f9bc41eb0f7e8187796049285fabef82604acd4879590977307")
version("0.9.50", sha256="d1b6385068abded29b6470e383287aa7705de05ae3c08ad0bf5747ac4dc6ebd7")
+ depends_on("c", type="build") # generated
+
variant("https", default=False, description="HTTPS support with GnuTLS")
depends_on("gettext")
diff --git a/var/spack/repos/builtin/packages/libmmtf-cpp/package.py b/var/spack/repos/builtin/packages/libmmtf-cpp/package.py
index 5109f7623b..66b172b9ef 100644
--- a/var/spack/repos/builtin/packages/libmmtf-cpp/package.py
+++ b/var/spack/repos/builtin/packages/libmmtf-cpp/package.py
@@ -17,4 +17,6 @@ class LibmmtfCpp(CMakePackage):
version("1.1.0", sha256="021173bdc1814b1d0541c4426277d39df2b629af53151999b137e015418f76c0")
version("1.0.0", sha256="881f69c4bb56605fa63fd5ca50842facc4947f686cbf678ad04930674d714f40")
+ depends_on("cxx", type="build") # generated
+
depends_on("msgpack-c")
diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py
index db1b8c3547..d3b59562f4 100644
--- a/var/spack/repos/builtin/packages/libmng/package.py
+++ b/var/spack/repos/builtin/packages/libmng/package.py
@@ -3,29 +3,50 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
-class Libmng(CMakePackage):
+class Libmng(CMakePackage, AutotoolsPackage):
"""THE reference library for reading, displaying, writing
and examining Multiple-Image Network Graphics. MNG is the animation
extension to the popular PNG image format."""
homepage = "https://sourceforge.net/projects/libmng/"
- url = "http://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz"
+ url = "https://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz"
license("custom")
version("2.0.3", sha256="cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa")
version("2.0.2", sha256="4908797bb3541fb5cd8fffbe0b1513ed163509f2a4d57a78b26a96f8d1dd05a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("jpeg")
depends_on("zlib-api")
depends_on("lcms")
+ build_system("cmake", "autotools", default="cmake")
+
def patch(self):
# jpeg requires stdio to be included before its headers.
filter_file(r"^(\#include \<jpeglib\.h\>)", "#include<stdio.h>\n\\1", "libmng_types.h")
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
return ["-DWITH_LCMS2:BOOL=ON", "-DWITH_LCMS1:BOOL=OFF"]
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+ @run_before("configure")
+ def clean_preconf(self):
+ """Required, otherwise configure will crash as subdirectories have
+ already been configured"""
+ make("distclean")
+
+ def configure_args(self):
+ return ["--with-lcms2", "--without-lcms1"]
diff --git a/var/spack/repos/builtin/packages/libmnl/package.py b/var/spack/repos/builtin/packages/libmnl/package.py
index f3bda99327..eb6d71490d 100644
--- a/var/spack/repos/builtin/packages/libmnl/package.py
+++ b/var/spack/repos/builtin/packages/libmnl/package.py
@@ -8,19 +8,35 @@ from spack.package import *
class Libmnl(AutotoolsPackage):
"""libmnl is a minimalistic user-space library oriented to Netlink
- developers.There are a lot of common tasks in parsing, validating,
+ developers. There are a lot of common tasks in parsing, validating,
constructing of both the Netlink header and TLVs that are repetitive
- and easy to get wrong.This library aims to provide simple helpers
+ and easy to get wrong. This library aims to provide simple helpers
that allows you to re-use code and to avoid re-inventing the wheel."""
- homepage = "https://github.com/threatstack/libmnl"
- url = "https://github.com/threatstack/libmnl/archive/libmnl-1.0.3.tar.gz"
+ homepage = "https://netfilter.org/projects/libmnl/"
+ url = "https://netfilter.org/projects/libmnl/files/libmnl-1.0.5.tar.bz2"
- license("LGPL-2.1-or-later")
+ license("LGPL-2.1-or-later", checked_by="wdconinc")
- version("1.0.3", sha256="14405da1bb3a679c24e0fe1f2845d47359ed2de8055e588df4b6b19cab68e901")
- version("1.0.2", sha256="2caec4716aceb245130f4e42f8c118b92618e37db8bb94e2799aff42b95c269f")
- version("1.0.1", sha256="60fe2a6ce59f6118b75b598dc11fc89b97e20ff8633fbea26fc568c45bbb672b")
+ version("1.0.5", sha256="274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ version(
+ "1.0.3",
+ sha256="14405da1bb3a679c24e0fe1f2845d47359ed2de8055e588df4b6b19cab68e901",
+ url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.3.tar.gz",
+ )
+ version(
+ "1.0.2",
+ sha256="2caec4716aceb245130f4e42f8c118b92618e37db8bb94e2799aff42b95c269f",
+ url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.2.tar.gz",
+ )
+ version(
+ "1.0.1",
+ sha256="60fe2a6ce59f6118b75b598dc11fc89b97e20ff8633fbea26fc568c45bbb672b",
+ url="https://github.com/threatstack/libmnl/archive/libmnl-1.0.1.tar.gz",
+ )
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/libmo-unpack/package.py b/var/spack/repos/builtin/packages/libmo-unpack/package.py
index 6f7daacbe7..0e89865830 100644
--- a/var/spack/repos/builtin/packages/libmo-unpack/package.py
+++ b/var/spack/repos/builtin/packages/libmo-unpack/package.py
@@ -17,4 +17,6 @@ class LibmoUnpack(CMakePackage):
version("3.1.2", sha256="e09ef3e6f1075144acc5d6466b4ef70b2fe32ed4ab1840dd4fb7e15a40f3d370")
+ depends_on("c", type="build") # generated
+
depends_on("check")
diff --git a/var/spack/repos/builtin/packages/libmodbus/package.py b/var/spack/repos/builtin/packages/libmodbus/package.py
index e27e0aafa2..142e47ebca 100644
--- a/var/spack/repos/builtin/packages/libmodbus/package.py
+++ b/var/spack/repos/builtin/packages/libmodbus/package.py
@@ -12,17 +12,22 @@ class Libmodbus(AutotoolsPackage):
and supports RTU (serial) and TCP (Ethernet) communications."""
homepage = "https://libmodbus.org/"
- url = "https://libmodbus.org/releases/libmodbus-3.0.8.tar.gz"
+ url = "https://github.com/stephane/libmodbus/releases/download/v3.1.10/libmodbus-3.1.10.tar.gz"
license("LGPL-2.1-or-later")
- version("3.1.6", sha256="d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16")
- version("3.1.5", sha256="f7a9538f23a8786b1ee62a4b75879b5c0e194e728350de1b741ce7d595970f06")
- version("3.1.4", sha256="c8c862b0e9a7ba699a49bc98f62bdffdfafd53a5716c0e162696b4bf108d3637")
- version("3.1.3", sha256="9e02d79d715522e03b61c313c7278fcf80860816718587819318b8ad9c3fd0ce")
- version("3.1.2", sha256="661e14f9dc904f3f1b034464ddaa5fd4b8472f8f5d1ea10a1148af85591b7ee9")
- version("3.1.1", sha256="76d93aff749d6029f81dcf1fb3fd6abe10c9b48d376f3a03a4f41c5197c95c99")
- version("3.0.8", sha256="022f0691d920b8aee3ee49d7af0f69b7ef80fc3c849a8e0281d5bc27db7a24ea")
- version("3.0.7", sha256="6c26850cd5dedcf5dad40977ac7f2ee990a3667f6959a1e05e22959bdf537961")
- version("3.0.6", sha256="046d63f10f755e2160dc56ef681e5f5ad3862a57c1955fd82e0ce036b69471b6")
- version("3.0.5", sha256="19aad5d55fa315602d6e836a858a3802f1608f9d824afba05fa12a58a1b1e656")
+ version("3.1.10", sha256="899be4e25ab7fe5799d43f9567510d6f063d2e8f56136dd726b6fd976f9b2253")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-0367
+ version("3.1.6", sha256="d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16")
+ version("3.1.5", sha256="f7a9538f23a8786b1ee62a4b75879b5c0e194e728350de1b741ce7d595970f06")
+ version("3.1.4", sha256="c8c862b0e9a7ba699a49bc98f62bdffdfafd53a5716c0e162696b4bf108d3637")
+ version("3.1.3", sha256="9e02d79d715522e03b61c313c7278fcf80860816718587819318b8ad9c3fd0ce")
+ version("3.1.2", sha256="661e14f9dc904f3f1b034464ddaa5fd4b8472f8f5d1ea10a1148af85591b7ee9")
+ version("3.1.1", sha256="76d93aff749d6029f81dcf1fb3fd6abe10c9b48d376f3a03a4f41c5197c95c99")
+ version("3.0.8", sha256="022f0691d920b8aee3ee49d7af0f69b7ef80fc3c849a8e0281d5bc27db7a24ea")
+ version("3.0.7", sha256="6c26850cd5dedcf5dad40977ac7f2ee990a3667f6959a1e05e22959bdf537961")
+ version("3.0.6", sha256="046d63f10f755e2160dc56ef681e5f5ad3862a57c1955fd82e0ce036b69471b6")
+ version("3.0.5", sha256="19aad5d55fa315602d6e836a858a3802f1608f9d824afba05fa12a58a1b1e656")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libmolgrid/package.py b/var/spack/repos/builtin/packages/libmolgrid/package.py
index 883231ec33..a8e423f8c6 100644
--- a/var/spack/repos/builtin/packages/libmolgrid/package.py
+++ b/var/spack/repos/builtin/packages/libmolgrid/package.py
@@ -22,6 +22,8 @@ class Libmolgrid(CMakePackage):
version("0.5.3", sha256="a9f7a62cdeb516bc62a06b324cdd33b095a787df175c6166d74a8d30b6916abb")
version("0.5.2", sha256="e732d13a96c2f374d57a73999119bef700172d392c195c751214aa6ac6680c3a")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("boost +regex +test +program_options +system +filesystem +iostreams +python")
depends_on("openbabel@3:~gui~cairo")
@@ -35,9 +37,4 @@ class Libmolgrid(CMakePackage):
ob_incl = os.path.join(self.spec["openbabel"].prefix.include, "openbabel3")
ob_libs = self.spec["openbabel"].libs.joined(";")
- args = [
- "-DOPENBABEL3_INCLUDE_DIR=" + ob_incl,
- "-DOPENBABEL3_LIBRARIES=" + ob_libs,
- f"-DPYTHON_EXECUTABLE={self.spec['python'].command.path}",
- ]
- return args
+ return ["-DOPENBABEL3_INCLUDE_DIR=" + ob_incl, "-DOPENBABEL3_LIBRARIES=" + ob_libs]
diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py
index 3eb4ca6060..e72d9bc122 100644
--- a/var/spack/repos/builtin/packages/libmonitor/package.py
+++ b/var/spack/repos/builtin/packages/libmonitor/package.py
@@ -28,6 +28,8 @@ class Libmonitor(AutotoolsPackage):
version("2018.07.18", commit="d28cc1d3c08c02013a68a022a57a6ac73db88166")
version("2013.02.18", commit="4f2311e413fd90583263d6f20453bbe552ccfef3")
+ depends_on("c", type="build") # generated
+
# Configure for Rice HPCToolkit.
variant("hpctoolkit", default=False, description="Configure for HPCToolkit")
@@ -62,10 +64,10 @@ class Libmonitor(AutotoolsPackage):
def configure_args(self):
args = []
- if "+hpctoolkit" in self.spec:
+ if self.spec.satisfies("+hpctoolkit"):
args.append("--enable-client-signals=%s" % self.signals)
- if "+dlopen" in self.spec:
+ if self.spec.satisfies("+dlopen"):
args.append("--enable-dlfcn")
else:
args.append("--disable-dlfcn")
diff --git a/var/spack/repos/builtin/packages/libmpdclient/package.py b/var/spack/repos/builtin/packages/libmpdclient/package.py
index 6182050e94..8e550c5de7 100644
--- a/var/spack/repos/builtin/packages/libmpdclient/package.py
+++ b/var/spack/repos/builtin/packages/libmpdclient/package.py
@@ -20,3 +20,5 @@ class Libmpdclient(MesonPackage):
version("2.17", sha256="06eb4b67c63f64d647e97257ff5f8506bf9c2a26b314bf5d0dd5944995b59fc9")
version("2.16", sha256="6651898489b69d2f2f8e94f0ed6ddcc0dd2cdbcf99b02131b790551922558d6c")
version("2.15", sha256="dd3d36801e397bf43719a291289ff610af71859c08f3196a506e4b1af43c290c")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libmypaint/package.py b/var/spack/repos/builtin/packages/libmypaint/package.py
index 4714394c71..2726201553 100644
--- a/var/spack/repos/builtin/packages/libmypaint/package.py
+++ b/var/spack/repos/builtin/packages/libmypaint/package.py
@@ -24,6 +24,10 @@ class Libmypaint(AutotoolsPackage):
version("1.4.0", sha256="59d13b14c6aca0497095f29ee7228ca2499a923ba8e1dd718a2f2ecb45a9cbff")
version("1.3.0", sha256="6a07d9d57fea60f68d218a953ce91b168975a003db24de6ac01ad69dcc94a671")
+ depends_on("c", type="build")
+ depends_on("gettext", type="build")
+ depends_on("pkgconfig", type="build")
+
variant("gegl", default=False, description="Enable GEGL based code in build")
variant("introspection", default=True, description="Enable introspection for this build")
@@ -39,10 +43,10 @@ class Libmypaint(AutotoolsPackage):
def configure_args(self):
args = []
- if "+gegl" in self.spec:
+ if self.spec.satisfies("+gegl"):
args.append("--enable-gegl=yes")
- if "+introspection" in self.spec:
+ if self.spec.satisfies("+introspection"):
args.extend(
["--enable-introspection=yes", "--with-glib={0}".format(self.spec["glib"].prefix)]
)
diff --git a/var/spack/repos/builtin/packages/libnbc/package.py b/var/spack/repos/builtin/packages/libnbc/package.py
index 7507ff362e..4174487e49 100644
--- a/var/spack/repos/builtin/packages/libnbc/package.py
+++ b/var/spack/repos/builtin/packages/libnbc/package.py
@@ -20,4 +20,6 @@ class Libnbc(AutotoolsPackage):
version("1.1.1", sha256="63aa5f75f84c191da0688cb551ebd0e9e46928edfba350b2a534eb0c704dd9c3")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/libndp/package.py b/var/spack/repos/builtin/packages/libndp/package.py
index 242f447b3f..1012974f20 100644
--- a/var/spack/repos/builtin/packages/libndp/package.py
+++ b/var/spack/repos/builtin/packages/libndp/package.py
@@ -20,6 +20,8 @@ class Libndp(AutotoolsPackage):
version("1.4", sha256="b9b23d14e9b2d87745810d9d0e956e9fb45f44e794b1629492850c5a8fbbb083")
version("1.3", sha256="e933dc1b9ce85089de8ba0f6ba4c3ec47eba0e9a404e14c1789a6fa9e23793f6")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libnet/package.py b/var/spack/repos/builtin/packages/libnet/package.py
index 99a3d4c3db..44df3a759b 100644
--- a/var/spack/repos/builtin/packages/libnet/package.py
+++ b/var/spack/repos/builtin/packages/libnet/package.py
@@ -16,8 +16,11 @@ class Libnet(AutotoolsPackage):
license("BSD-2-Clause")
+ version("1.3", sha256="44e28a4e5a9256ce74d96fd1ad8ac2e3f300f55dc70c93bb81851183a21d7d3a")
version("1.2", sha256="b7a371a337d242c017f3471d70bea2963596bec5bd3bd0e33e8517550e2311ef")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libnetfilter-conntrack/package.py b/var/spack/repos/builtin/packages/libnetfilter-conntrack/package.py
index fcbc19b902..128ca79246 100644
--- a/var/spack/repos/builtin/packages/libnetfilter-conntrack/package.py
+++ b/var/spack/repos/builtin/packages/libnetfilter-conntrack/package.py
@@ -10,19 +10,42 @@ class LibnetfilterConntrack(AutotoolsPackage):
"""libnetfilter_conntrack is a userspace library providing a programming
interface (API) to the in-kernel connection tracking state table."""
- homepage = "https://netfilter.org"
- url = "https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.4.tar.gz"
+ homepage = "https://netfilter.org/projects/libnetfilter_conntrack/"
+ url = "https://www.netfilter.org/projects/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.5.tar.bz2"
- license("GPL-2.0-or-later")
+ license("GPL-2.0-or-later", checked_by="wdconinc")
- version("1.0.4", sha256="68168697b9d6430b7797ddd579e13a2cef06ea15c154dfd14e18be64e035ea6e")
- version("1.0.3", sha256="e2129d7c0346c7140355d643da8e3409cbd755689ea889bc0d6dbd557f1b5671")
- version("1.0.2", sha256="97f641a2e47053bd87bc817292519d6661e8f84a22d3314724b83b9f5eaddbff")
+ version("1.0.9", sha256="67bd9df49fe34e8b82144f6dfb93b320f384a8ea59727e92ff8d18b5f4b579a8")
+ version("1.0.8", sha256="0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf")
+ version("1.0.7", sha256="33685351e29dff93cc21f5344b6e628e41e32b9f9e567f4bec0478eb41f989b6")
+ version("1.0.6", sha256="efcc08021284e75f4d96d3581c5155a11f08fd63316b1938cbcb269c87f37feb")
+ version("1.0.5", sha256="fc9d7daf43605a73045de203bbfc0bca3e07f72d4ac61bcf656868f48692d73a")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ version(
+ "1.0.4",
+ sha256="68168697b9d6430b7797ddd579e13a2cef06ea15c154dfd14e18be64e035ea6e",
+ url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.4.tar.gz",
+ )
+ version(
+ "1.0.3",
+ sha256="e2129d7c0346c7140355d643da8e3409cbd755689ea889bc0d6dbd557f1b5671",
+ url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.3.tar.gz",
+ )
+ version(
+ "1.0.2",
+ sha256="97f641a2e47053bd87bc817292519d6661e8f84a22d3314724b83b9f5eaddbff",
+ url="https://github.com/Distrotech/libnetfilter_conntrack/archive/libnetfilter_conntrack-1.0.2.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
+
depends_on("libmnl@1.0.3:")
depends_on("libnfnetlink@1.0.0:")
diff --git a/var/spack/repos/builtin/packages/libnetfilter-cthelper/package.py b/var/spack/repos/builtin/packages/libnetfilter-cthelper/package.py
index cd99be3b0d..fbc4efb592 100644
--- a/var/spack/repos/builtin/packages/libnetfilter-cthelper/package.py
+++ b/var/spack/repos/builtin/packages/libnetfilter-cthelper/package.py
@@ -9,17 +9,28 @@ from spack.package import *
class LibnetfilterCthelper(AutotoolsPackage):
"""Libnetfilter-cthelper library for user space helpers / ALGs"""
- homepage = "https://github.com/vyos/libnetfilter-cthelper/"
- url = "https://github.com/vyos/libnetfilter-cthelper/archive/VyOS_1.2-2019Q4.tar.gz"
+ homepage = "https://netfilter.org/projects/libnetfilter_cthelper/"
+ url = "https://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-1.0.5.tar.bz2"
license("GPL-2.0-or-later")
- version(
- "1.2-2019Q4", sha256="15a7b13999d1428d75e720c8116318cd51bec1d365852ae1778d3c85b93a9777"
- )
+ version("1.0.1", sha256="14073d5487233897355d3ff04ddc1c8d03cc5ba8d2356236aa88161a9f2dc912")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ # This appears to be version 1.0.0
+ version(
+ "1.2-2019Q4",
+ sha256="15a7b13999d1428d75e720c8116318cd51bec1d365852ae1778d3c85b93a9777",
+ url="https://github.com/vyos/libnetfilter-cthelper/archive/VyOS_1.2-2019Q4.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("libmnl")
+ depends_on("pkgconfig", type="build")
+
+ depends_on("libmnl@1.0:")
diff --git a/var/spack/repos/builtin/packages/libnetfilter-cttimeout/package.py b/var/spack/repos/builtin/packages/libnetfilter-cttimeout/package.py
index b16dddd76c..8b3d0a46ec 100644
--- a/var/spack/repos/builtin/packages/libnetfilter-cttimeout/package.py
+++ b/var/spack/repos/builtin/packages/libnetfilter-cttimeout/package.py
@@ -9,18 +9,28 @@ from spack.package import *
class LibnetfilterCttimeout(AutotoolsPackage):
"""Conntrack timeout policy library."""
- homepage = "https://github.com/vyos/libnetfilter-cttimeout/"
- url = "https://github.com/vyos/libnetfilter-cttimeout/archive/VyOS_1.2-2019Q4.tar.gz"
+ homepage = "https://netfilter.org/projects/libnetfilter_cttimeout/"
+ url = "https://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.1.tar.bz2"
- license("GPL-2.0-only")
+ license("GPL-2.0-only", checked_by="wdconinc")
- version(
- "1.2-2019Q4", sha256="71cebdf07a578901b160a54199062a4b4cd445e14742e2c7badc0900d8ae56b6"
- )
+ version("1.0.1", sha256="0b59da2f3204e1c80cb85d1f6d72285fc07b01a2f5678abf5dccfbbefd650325")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ # This appears to be version 1.0.0
+ version(
+ "1.2-2019Q4",
+ sha256="71cebdf07a578901b160a54199062a4b4cd445e14742e2c7badc0900d8ae56b6",
+ url="https://github.com/vyos/libnetfilter-cttimeout/archive/VyOS_1.2-2019Q4.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("libmnl")
diff --git a/var/spack/repos/builtin/packages/libnetfilter-queue/package.py b/var/spack/repos/builtin/packages/libnetfilter-queue/package.py
index e1ab35dab3..9ce03a057e 100644
--- a/var/spack/repos/builtin/packages/libnetfilter-queue/package.py
+++ b/var/spack/repos/builtin/packages/libnetfilter-queue/package.py
@@ -9,19 +9,29 @@ from spack.package import *
class LibnetfilterQueue(AutotoolsPackage):
"""Libnetfilter-queue libnetfilter queue library."""
- homepage = "https://github.com/vyos/libnetfilter-queue/"
- url = "https://github.com/vyos/libnetfilter-queue/archive/VyOS_1.2-2019Q4.tar.gz"
+ homepage = "https://netfilter.org/projects/libnetfilter_queue/"
+ url = "https://www.netfilter.org/projects/libnetfilter_queue/files/libnetfilter_queue-1.0.5.tar.bz2"
license("GPL-2.0-only")
- version(
- "1.2-2019Q4", sha256="73b87e600b492cf9e3aa8fb6e9855e1ccc523a7bc466c1fd1a0e6ffa424d746e"
- )
+ version("1.0.5", sha256="f9ff3c11305d6e03d81405957bdc11aea18e0d315c3e3f48da53a24ba251b9f5")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ # This appears to be version 1.0.2
+ version(
+ "1.2-2019Q4",
+ sha256="73b87e600b492cf9e3aa8fb6e9855e1ccc523a7bc466c1fd1a0e6ffa424d746e",
+ url="https://github.com/vyos/libnetfilter-queue/archive/VyOS_1.2-2019Q4.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("libnfnetlink")
- depends_on("libmnl")
+ depends_on("libmnl@1.0.3:")
diff --git a/var/spack/repos/builtin/packages/libnetworkit/package.py b/var/spack/repos/builtin/packages/libnetworkit/package.py
index 2ef31c7413..5c3cd1a1a5 100644
--- a/var/spack/repos/builtin/packages/libnetworkit/package.py
+++ b/var/spack/repos/builtin/packages/libnetworkit/package.py
@@ -31,6 +31,8 @@ class Libnetworkit(CMakePackage):
version("7.0", sha256="4faf16c5fae3e14d3c1b6f30e25c6e093dcf6a3dbf021235f3161ac2a527f682")
version("6.1", sha256="22c953ea1054c356663b31c77114c2f0c8fec17e0e707aeec23026241beab9b2")
+ depends_on("cxx", type="build") # generated
+
variant("static", default=False, description="Enables the build of shared libraries")
variant("doc", default=False, description="Enables the build with sphinx documentation")
diff --git a/var/spack/repos/builtin/packages/libnfnetlink/package.py b/var/spack/repos/builtin/packages/libnfnetlink/package.py
index 041a15e1ca..fd36bb4679 100644
--- a/var/spack/repos/builtin/packages/libnfnetlink/package.py
+++ b/var/spack/repos/builtin/packages/libnfnetlink/package.py
@@ -12,14 +12,32 @@ class Libnfnetlink(AutotoolsPackage):
netfilter subsystem specific libraries such as libnfnetlink_conntrack,
libnfnetlink_log and libnfnetlink_queue."""
- homepage = "https://netfilter.org"
- url = "https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.1.tar.gz"
+ homepage = "https://netfilter.org/projects/libnfnetlink/"
+ url = "https://netfilter.org/projects/libnfnetlink/files/libnfnetlink-1.0.2.tar.bz2"
license("GPL-2.0-only")
- version("1.0.1", sha256="11dd8a1045b03d47c878535eeb6b9eb34db295d21903a4dfd2c2cc63f45e675b")
- version("1.0.0", sha256="1d43456e51d5ff2e8bc84b68d8acad3bb15603cfaa806ba9693eea4f2aa1abeb")
- version("0.0.41", sha256="84381ad3aec4fc4884c020c7774a241160d92ed50c9f93a2660db94e212cbb72")
+ version("1.0.2", sha256="b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376")
+
+ # Versions that were initially sourced at a third party are now deprecated
+ with default_args(deprecated=True):
+ version(
+ "1.0.1",
+ sha256="11dd8a1045b03d47c878535eeb6b9eb34db295d21903a4dfd2c2cc63f45e675b",
+ url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.1.tar.gz",
+ )
+ version(
+ "1.0.0",
+ sha256="1d43456e51d5ff2e8bc84b68d8acad3bb15603cfaa806ba9693eea4f2aa1abeb",
+ url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-1.0.0.tar.gz",
+ )
+ version(
+ "0.0.41",
+ sha256="84381ad3aec4fc4884c020c7774a241160d92ed50c9f93a2660db94e212cbb72",
+ url="https://github.com/Distrotech/libnfnetlink/archive/libnfnetlink-0.0.41.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/libnfs/package.py b/var/spack/repos/builtin/packages/libnfs/package.py
index bfbced8b34..e98c709027 100644
--- a/var/spack/repos/builtin/packages/libnfs/package.py
+++ b/var/spack/repos/builtin/packages/libnfs/package.py
@@ -19,3 +19,5 @@ class Libnfs(CMakePackage):
version("2.0.0", sha256="7ea6cd8fa6c461d01091e584d424d28e137d23ff4b65b95d01a3fd0ef95d120e")
version("1.11.0", sha256="fc2e45df14d8714ccd07dc2bbe919e45a2e36318bae7f045cbbb883a7854640f")
version("1.10.0", sha256="7f6c62a05c7e0f0749f2b13f178a4ed7aaf17bd09e65a10bb147bfe9807da272")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libnfsidmap/package.py b/var/spack/repos/builtin/packages/libnfsidmap/package.py
index 5643540c95..0895b3c1c6 100644
--- a/var/spack/repos/builtin/packages/libnfsidmap/package.py
+++ b/var/spack/repos/builtin/packages/libnfsidmap/package.py
@@ -15,6 +15,8 @@ class Libnfsidmap(AutotoolsPackage):
version("0-26", sha256="8c6d62285b528d673fcb8908fbe230ae82287b292d90925d014c6f367e8425ef")
version("0-25", sha256="dbf844a2aa820d7275eca55c2e392d12453ab4020d37d532ea6beac47efc4725")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libnftnl/package.py b/var/spack/repos/builtin/packages/libnftnl/package.py
index 35494bc283..b646512f23 100644
--- a/var/spack/repos/builtin/packages/libnftnl/package.py
+++ b/var/spack/repos/builtin/packages/libnftnl/package.py
@@ -10,14 +10,25 @@ class Libnftnl(AutotoolsPackage):
"""A library for low-level interaction with nftables Netlink's API
over libmnl."""
- homepage = "https://git.netfilter.org/libnftnl/"
- url = "http://ftp.netfilter.org/pub/libnftnl/libnftnl-1.1.5.tar.bz2"
+ homepage = "https://netfilter.org/projects/libmnl/"
+ url = "https://netfilter.org/projects/libnftnl/files/libnftnl-1.2.7.tar.xz"
- license("GPL-2.0-or-later")
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+ version("1.2.7", sha256="9122774f968093d5c0bacddd67de480f31fa4073405a7fc058a34b0f387aecb3")
version("1.1.6", sha256="c1eb5a696fc1d4b3b412770586017bc01af93da3ddd25233d34a62979dee1eca")
version("1.1.5", sha256="66de4d05227c0a1a731c369b193010d18a05b1185c2735211e0ecf658eeb14f3")
version("1.1.4", sha256="c8c7988347adf261efac5bba59f8e5f995ffb65f247a88cc144e69620573ed20")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
- depends_on("libmnl@1.0.3:")
+ depends_on("libmnl@1.0.0:")
+ depends_on("libmnl@1.0.3:", when="@1.1.1:")
+ depends_on("libmnl@1.0.4:", when="@1.1.7:")
+
+ def url_for_version(self, version):
+ if version >= Version("1.2.5"):
+ return f"https://netfilter.org/projects/libnftnl/files/libnftnl-{version}.tar.xz"
+ else:
+ return f"https://netfilter.org/projects/libnftnl/files/libnftnl-{version}.tar.bz2"
diff --git a/var/spack/repos/builtin/packages/libnids/package.py b/var/spack/repos/builtin/packages/libnids/package.py
index 9d8d2968bc..da9cc25e3a 100644
--- a/var/spack/repos/builtin/packages/libnids/package.py
+++ b/var/spack/repos/builtin/packages/libnids/package.py
@@ -11,15 +11,18 @@ class Libnids(AutotoolsPackage):
NIDS (Network Intrusion Detection System) components, namely
E-component."""
- homepage = "http://libnids.sourceforge.net/"
+ homepage = "https://libnids.sourceforge.net/"
url = "https://github.com/MITRECND/libnids/archive/1.25.tar.gz"
git = "https://github.com/MITRECND/libnids.git"
license("GPL-2.0-only")
version("master", branch="master")
+ version("1.26", sha256="3f3e9f99a83cd37bc74af83d415c5e3a7505f5b190dfaf456b0849e0054f6733")
version("1.25", sha256="47aa634bd0cdad81e092fac3aef6f12ee346c2f536a1eff4d3d5dacdb6dfcec1")
+ depends_on("c", type="build") # generated
+
depends_on("libpcap")
depends_on("libnet")
depends_on("glib@2.2.0:")
diff --git a/var/spack/repos/builtin/packages/libnl/package.py b/var/spack/repos/builtin/packages/libnl/package.py
index 7212ff3f08..656a2cd361 100644
--- a/var/spack/repos/builtin/packages/libnl/package.py
+++ b/var/spack/repos/builtin/packages/libnl/package.py
@@ -17,6 +17,8 @@ class Libnl(AutotoolsPackage):
version("3.3.0", sha256="705468b5ae4cd1eb099d2d1c476d6a3abe519bc2810becf12fb1e32de1e074e4")
+ depends_on("c", type="build") # generated
+
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/libnotify/package.py b/var/spack/repos/builtin/packages/libnotify/package.py
index 4fab7677f6..eb96b1dda8 100644
--- a/var/spack/repos/builtin/packages/libnotify/package.py
+++ b/var/spack/repos/builtin/packages/libnotify/package.py
@@ -16,6 +16,8 @@ class Libnotify(MesonPackage):
version("0.7.9", sha256="9bd4f5fa911d27567e7cc2d2d09d69356c16703c4e8d22c0b49a5c45651f3af0")
+ depends_on("c", type="build") # generated
+
# Libnotify is having trouble with finding the DTD and XSLT for docbook,
# which is required for both of these varients.
# variant('docbook', default=False,
diff --git a/var/spack/repos/builtin/packages/libnova/package.py b/var/spack/repos/builtin/packages/libnova/package.py
index 471be31eff..875a968d64 100644
--- a/var/spack/repos/builtin/packages/libnova/package.py
+++ b/var/spack/repos/builtin/packages/libnova/package.py
@@ -10,13 +10,15 @@ class Libnova(AutotoolsPackage):
""" "libnova is a general purpose, double precision, Celestial Mechanics,
Astrometry and Astrodynamics library."""
- homepage = "http://libnova.sourceforge.net"
+ homepage = "https://libnova.sourceforge.net"
url = "https://sourceforge.net/projects/libnova/files/libnova/v%200.15.0/libnova-0.15.0.tar.gz/download"
license("LGPL-2.0-only")
version("0.15.0", sha256="7c5aa33e45a3e7118d77df05af7341e61784284f1e8d0d965307f1663f415bb1")
+ depends_on("c", type="build") # generated
+
depends_on("m4")
depends_on("autoconf")
depends_on("automake")
diff --git a/var/spack/repos/builtin/packages/libnrm/package.py b/var/spack/repos/builtin/packages/libnrm/package.py
index 2b91d482d1..f714173323 100644
--- a/var/spack/repos/builtin/packages/libnrm/package.py
+++ b/var/spack/repos/builtin/packages/libnrm/package.py
@@ -17,6 +17,8 @@ class Libnrm(AutotoolsPackage):
version("0.1.0", sha256="f849ada384025fa41251acc2a43aa335e0cb1b9cd1c8ab8b9d1808a036ae551e")
+ depends_on("c", type="build") # generated
+
tags = ["e4s"]
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/libnsl/package.py b/var/spack/repos/builtin/packages/libnsl/package.py
index 8d0cefc6b2..5f9fd1c8f6 100644
--- a/var/spack/repos/builtin/packages/libnsl/package.py
+++ b/var/spack/repos/builtin/packages/libnsl/package.py
@@ -15,6 +15,7 @@ class Libnsl(AutotoolsPackage):
license("LGPL-2.0-or-later")
+ version("2.0.1", sha256="59048b53be8d3904bf939313debf13956a881b0de79da40f7719a77bcd1e9c53")
version("2.0.0", sha256="eb37be57c1cf650b3a8a4fc7cd66c8b3dfc06215b41956a16325a9388171bc40")
version("1.3.0", sha256="8e88017f01dd428f50386186b0cd82ad06c9b2a47f9c5ea6b3023fc6e08a6b0f")
version("1.2.0", sha256="a5a28ef17c4ca23a005a729257c959620b09f8c7f99d0edbfe2eb6b06bafd3f8")
@@ -24,6 +25,8 @@ class Libnsl(AutotoolsPackage):
url="https://github.com/thkukuk/libnsl/archive/1.1.0.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libogg/package.py b/var/spack/repos/builtin/packages/libogg/package.py
index 45613a654c..4e62a81e98 100644
--- a/var/spack/repos/builtin/packages/libogg/package.py
+++ b/var/spack/repos/builtin/packages/libogg/package.py
@@ -5,7 +5,7 @@
import os
-from spack.build_systems.generic import GenericBuilder
+from spack.build_systems import cmake, generic
from spack.package import *
@@ -22,6 +22,18 @@ class Libogg(CMakePackage, AutotoolsPackage, Package):
version("1.3.4", sha256="fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e")
version("1.3.2", sha256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692")
+ depends_on("c", type="build") # generated
+
+ variant("shared", default=True, description="Build shared library", when="build_system=cmake")
+ variant(
+ "pic",
+ default=True,
+ description="Produce position-independent code (for shared libs)",
+ when="build_system=cmake",
+ )
+
+ requires("+pic", when="+shared")
+
# Backport a patch that fixes an unsigned typedef problem on macOS:
# https://github.com/xiph/ogg/pull/64
patch(
@@ -37,7 +49,17 @@ class Libogg(CMakePackage, AutotoolsPackage, Package):
)
-class GenericBuilder(GenericBuilder):
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ base_cmake_args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
+ ]
+
+ return base_cmake_args
+
+
+class GenericBuilder(generic.GenericBuilder):
phases = ["build", "install"]
def is_64bit(self):
diff --git a/var/spack/repos/builtin/packages/liboldx/package.py b/var/spack/repos/builtin/packages/liboldx/package.py
index b65a99ae16..2f7b9d7d7b 100644
--- a/var/spack/repos/builtin/packages/liboldx/package.py
+++ b/var/spack/repos/builtin/packages/liboldx/package.py
@@ -14,6 +14,8 @@ class Liboldx(AutotoolsPackage, XorgPackage):
version("1.0.1", sha256="74322dbf04df69787485eb24b16e12783dfc3454befaf18482ead51bd7b55dc8")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/libopts/package.py b/var/spack/repos/builtin/packages/libopts/package.py
index 78f48985a6..5c85ba65d5 100644
--- a/var/spack/repos/builtin/packages/libopts/package.py
+++ b/var/spack/repos/builtin/packages/libopts/package.py
@@ -17,6 +17,8 @@ class Libopts(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
parallel = False
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libp11/package.py b/var/spack/repos/builtin/packages/libp11/package.py
index 69463c1669..addef7cc53 100644
--- a/var/spack/repos/builtin/packages/libp11/package.py
+++ b/var/spack/repos/builtin/packages/libp11/package.py
@@ -21,11 +21,14 @@ class Libp11(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("0.4.12", sha256="c1a233ecb09ab48595ba36a504c47f82cf53a59aa8db789c02ca72d50e85ca87")
version("0.4.11", sha256="56d6149879bda379613d89adfd3486ce5a3c20af6c1e3f9e83d15d900ab9e4bc")
version("0.4.10", sha256="123c1525fa7ce7a34060f9a4148a30717482c517a378f428b704459820c1bf35")
version("0.4.9", sha256="9d1c76d74c21ca224f96204982097ebc6b956f645b2b0b5f9c502a20e9ffcfd8")
version("0.4.8", sha256="acccd56b736942dfcc490d102d2cb2b6afa6b2e448dd1dc5a1b773eadb98f83d")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libpam/package.py b/var/spack/repos/builtin/packages/libpam/package.py
index 85d888b07a..670df0cce1 100644
--- a/var/spack/repos/builtin/packages/libpam/package.py
+++ b/var/spack/repos/builtin/packages/libpam/package.py
@@ -19,6 +19,8 @@ class Libpam(AutotoolsPackage):
version("1.08", sha256="6f6d7530261ba9e2ece84214f1445857d488b7851c28a58356b49f2d9fd36290")
version("1.07", sha256="104a158e013585e20287f8d33935e93c711b96281e6dda621a5c19575d0b0405")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libpaper/package.py b/var/spack/repos/builtin/packages/libpaper/package.py
index 5723a25ea1..d4f0ef68bd 100644
--- a/var/spack/repos/builtin/packages/libpaper/package.py
+++ b/var/spack/repos/builtin/packages/libpaper/package.py
@@ -16,8 +16,11 @@ class Libpaper(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("1.1.29", sha256="26330e21e9a3124658d515fd850b0cde546ff42d89b2596a5264c5f1677f0547")
version("1.1.28", sha256="c8bb946ec93d3c2c72bbb1d7257e90172a22a44a07a07fb6b802a5bb2c95fddc")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libpcap/package.py b/var/spack/repos/builtin/packages/libpcap/package.py
index 19276cfd3d..a4920fed11 100644
--- a/var/spack/repos/builtin/packages/libpcap/package.py
+++ b/var/spack/repos/builtin/packages/libpcap/package.py
@@ -12,14 +12,17 @@ class Libpcap(AutotoolsPackage):
homepage = "https://www.tcpdump.org/"
list_url = "https://www.tcpdump.org/release/"
url = "https://www.tcpdump.org/release/libpcap-1.8.1.tar.gz"
+ git = "https://github.com/the-tcpdump-group/libpcap"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("1.10.5", sha256="37ced90a19a302a7f32e458224a00c365c117905c2cd35ac544b6880a81488f0")
version("1.10.4", sha256="ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f")
version("1.10.3", sha256="2a8885c403516cf7b0933ed4b14d6caa30e02052489ebd414dc75ac52e7559e6")
version("1.10.0", sha256="8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e")
version("1.9.1", sha256="635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094")
version("1.8.1", sha256="673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e")
+ depends_on("c", type="build")
depends_on("flex", type="build")
depends_on("bison", type="build")
diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py
index 90c9b543ca..922af5e899 100644
--- a/var/spack/repos/builtin/packages/libpciaccess/package.py
+++ b/var/spack/repos/builtin/packages/libpciaccess/package.py
@@ -19,21 +19,13 @@ class Libpciaccess(AutotoolsPackage, XorgPackage):
version("0.13.5", sha256="fe26ec788732b4ef60b550f2d3fa51c605d27f646e18ecec878f061807a3526e")
version("0.13.4", sha256="74d92bda448e6fdb64fee4e0091255f48d625d07146a121653022ed3a0ca1f2f")
- depends_on("libtool", type="build")
+ depends_on("c", type="build")
+
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
patch("nvhpc.patch", when="%nvhpc")
- # A known issue exists when building with PGI as documented here:
- # https://bugs.freedesktop.org/show_bug.cgi?id=94398
- # https://www.pgroup.com/userforum/viewtopic.php?f=4&t=5126
- # https://gitlab.freedesktop.org/xorg/lib/libpciaccess/issues/7
- #
- # When the ability to use dependencies built by another compiler, using a
- # libpciaccess built by gcc should be usable by PGI builds.
- conflicts("%pgi")
-
conflicts("platform=darwin")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/libpfm4/package.py b/var/spack/repos/builtin/packages/libpfm4/package.py
index 9ce2730326..2c642657e4 100644
--- a/var/spack/repos/builtin/packages/libpfm4/package.py
+++ b/var/spack/repos/builtin/packages/libpfm4/package.py
@@ -11,7 +11,7 @@ class Libpfm4(MakefilePackage):
setup performance events for use with
the perf_events Linux kernel interface."""
- homepage = "http://perfmon2.sourceforge.net"
+ homepage = "https://perfmon2.sourceforge.net"
url = "https://downloads.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.12.0.tar.gz"
maintainers("mwkrentel")
@@ -24,6 +24,8 @@ class Libpfm4(MakefilePackage):
version("4.9.0", sha256="db0fbe8ee28fd9beeb5d3e80b7cb3b104debcf6a9fcf5cb8b882f0662c79e4e2")
version("4.8.0", sha256="9193787a73201b4254e3669243fd71d15a9550486920861912090a09f366cf68")
+ depends_on("c", type="build") # generated
+
# Fails to build libpfm4 with intel compiler version 16 and 17
conflicts("%intel@16:17")
diff --git a/var/spack/repos/builtin/packages/libpipeline/package.py b/var/spack/repos/builtin/packages/libpipeline/package.py
index b35c345599..32d9e01d88 100644
--- a/var/spack/repos/builtin/packages/libpipeline/package.py
+++ b/var/spack/repos/builtin/packages/libpipeline/package.py
@@ -20,5 +20,7 @@ class Libpipeline(AutotoolsPackage):
version("1.5.5", sha256="0c8367f8b82bb721b50647a647115b6e62a37e3b2e954a9685e4d933f30c00cc")
version("1.4.2", sha256="fef1fc9aa40ce8796f18cd1aecd888a9484a9556c8b0f8d07c863578277679be")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("check", type="test")
diff --git a/var/spack/repos/builtin/packages/libplist/package.py b/var/spack/repos/builtin/packages/libplist/package.py
index d92235b13f..d58de2c891 100644
--- a/var/spack/repos/builtin/packages/libplist/package.py
+++ b/var/spack/repos/builtin/packages/libplist/package.py
@@ -28,6 +28,9 @@ class Libplist(AutotoolsPackage):
version("1.4", sha256="2ad226abe1131a72e7ecbb2b921ad92f54b8e787c2281c89b00145b519479a71")
version("1.3", sha256="982c8aac59cdc3fafc925a407a29b6cf367c5ec9bad6ad509fe5ea25d3e5b6b0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("libtool", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py b/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py
index d4e43270ca..8d2af867d0 100644
--- a/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py
+++ b/var/spack/repos/builtin/packages/libpmemobj-cpp/package.py
@@ -14,6 +14,7 @@ class LibpmemobjCpp(CMakePackage):
git = "https://github.com/pmem/libpmemobj-cpp.git"
version("develop", branch="master")
+ version("1.13.0", sha256="1fd204303b86ff9974e39d6cdb4037556402df981bebcc824a9125e12bf48c80")
version("1.12", sha256="5a7e082a862affbd87ff174b790be7db77f7d85d4c583acc34011f1104bc54a9")
version("1.11", sha256="2818f3ce23c861222d2765c377e6d4ccf8a2e2f66e4d23e4e2c35f4246f4a403")
version("1.10", sha256="bba31d9a1c21b38c20cbe2d2b152effef7e2debfa89a87e0c32de616c31d9191")
@@ -24,6 +25,9 @@ class LibpmemobjCpp(CMakePackage):
version("1.5.1", sha256="0448bac4697f6563789e5bf22b8556288ae67ab916608bc45d0a3baa24c67985")
version("1.5", sha256="6254aa2fb77977f8b91998eb866216d2af22f4ccbffdfc7932df1dff151da61e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# libpmemobj only supports 'Debug' and 'Release'
variant(
"build_type",
diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py
index 395f2694c5..7f3a85c2ae 100644
--- a/var/spack/repos/builtin/packages/libpng/package.py
+++ b/var/spack/repos/builtin/packages/libpng/package.py
@@ -30,6 +30,9 @@ class Libpng(CMakePackage):
version("1.5.30", sha256="7d76275fad2ede4b7d87c5fd46e6f488d2a16b5a69dc968ffa840ab39ba756ed")
version("1.2.57", sha256="0f4620e11fa283fedafb474427c8e96bf149511a1804bdc47350963ae5cf54d8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
variant(
@@ -45,8 +48,10 @@ class Libpng(CMakePackage):
def libs(self):
# v1.2 does not have a version-less symlink
libraries = f"libpng{self.version.up_to(2).joined}"
- shared = "libs=shared" in self.spec
- return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True)
+ shared = self.spec.satisfies("libs=shared")
+ return find_libraries(
+ libraries, root=self.prefix, shared=shared, recursive=True, runtime=False
+ )
class CMakeBuilder(CMakeBuilder):
diff --git a/var/spack/repos/builtin/packages/libpostal/package.py b/var/spack/repos/builtin/packages/libpostal/package.py
index e594a00b68..3bace0d7ae 100644
--- a/var/spack/repos/builtin/packages/libpostal/package.py
+++ b/var/spack/repos/builtin/packages/libpostal/package.py
@@ -25,6 +25,8 @@ class Libpostal(AutotoolsPackage):
version("0.3.1", sha256="68c51a5fdae41e1cac474742789ba5a46a38e307a0a2450cb2d3e33b4f17cf4d")
version("0.3", sha256="28c19e21bab13425a76aa65a8435f4b3909611056c2ff439c39b4e57b2a70150")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libpressio-adios1/package.py b/var/spack/repos/builtin/packages/libpressio-adios1/package.py
new file mode 100644
index 0000000000..f7a5f560b3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpressio-adios1/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class LibpressioAdios1(CMakePackage):
+ """LibPressio file reader for legacy ADIOS1 files not supported by ADIOS2"""
+
+ homepage = "https://github.com/robertu94/libpressio-adios1"
+ url = "https://github.com/robertu94/libpressio-adios1/archive/refs/tags/0.0.1.tar.gz"
+ git = "https://github.com/robertu94/libpressio-adios1"
+
+ maintainers("robertu94")
+
+ version("0.0.2", sha256="cb3c4ef3c9c3bd5f4c08d1145a07d2ce0c84605a2213b744992c6c8cef998d39")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("adios")
+ depends_on("libpressio")
+
+ def cmake_args(self):
+ args = ["-DCMAKE_MODULE_PATH={}".format(self.spec["adios"].prefix.etc)]
+ return args
diff --git a/var/spack/repos/builtin/packages/libpressio-adios2/package.py b/var/spack/repos/builtin/packages/libpressio-adios2/package.py
index d4aefcbb85..778e780f50 100644
--- a/var/spack/repos/builtin/packages/libpressio-adios2/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-adios2/package.py
@@ -14,9 +14,13 @@ class LibpressioAdios2(CMakePackage):
maintainers("robertu94")
+ version("0.0.3", sha256="ca6a90dae1070f3ffe5c89b25966eb3142cb62820144e19ab4fd5b980531ba3b")
version("0.0.2", sha256="8ab4b5a0dd8038d52f54aa9b5a67b83a8f7cd096db4c5a413fe0c6caf678e402")
version("0.0.1", sha256="ab9c7e26114e8d81f8ad8aca703855079cd3441f9b72e01d9b4aeb0c57ce0746")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("libpressio@0.99.4:+mpi", when="@0.0.3:")
depends_on("libpressio@0.85.0:+mpi", when="@0.0.2")
depends_on("libpressio@0.60.0:+mpi")
depends_on("adios2@2.8.0:+mpi")
diff --git a/var/spack/repos/builtin/packages/libpressio-dataset/package.py b/var/spack/repos/builtin/packages/libpressio-dataset/package.py
new file mode 100644
index 0000000000..a7041bcdc9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpressio-dataset/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2024 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.package import *
+
+
+class LibpressioDataset(CMakePackage):
+ """A set of libraries for LibPressio to easily load datasets"""
+
+ homepage = "https://github.com/robertu94/libpressio_dataset"
+ url = "https://github.com/robertu94/libpressio_dataset/archive/refs/tags/0.0.2.tar.gz"
+ git = "https://github.com/robertu94/libpressio_dataset"
+
+ maintainers = ["robertu94"]
+
+ version("0.0.9", sha256="743edf3bda7a174ed9953388b7975d463384001b9c6e04d07e7adc8012d10f5a")
+ version("0.0.8", sha256="5e0adac22b8c96f26b93e253bb9d30623bf357da608c10bddad3871c4e9dbe17")
+ version("0.0.7", sha256="203b36b337d23b789658162ecc024d7acf60fbff2fdc5b946c0854998e03e7bf")
+ version("0.0.6", sha256="24c07ac329714587d0778e6a2bf598aa8005de374595c36180de81ab020d55fc")
+ version("0.0.5", sha256="07906545207831515ad7ce1ad99994887f458c2e2f422fd5ea7569a5b0d072ad")
+ version("0.0.4", sha256="ff65e9c45fac607c7e48d305694c79996a1eb20c409ca3e1af59aad0c6e16f57")
+ version("0.0.3", sha256="b821bd880159c93fe5a960f4b51927a3963b1f0d2b91dc2f6c4655d644e8a28b")
+ version("0.0.2", sha256="b5d62260cc596a6239a721bda12293bce34f86266c203a573d3afa8fe0876c2f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("hdf5", default=False, description="add support for hdf5")
+ variant("shared", default=True, description="build shared libaries")
+
+ depends_on("libpressio@0.99.4:", when="@0.0.9:")
+ depends_on("libpressio@0.93.0:", when="@0.0.3:0.0.8")
+ depends_on("libpressio@0.91.1:", when="@:0.0.2")
+ depends_on("hdf5", when="+hdf5")
+
+ def cmake_args(self):
+ args = [
+ self.define("BUILD_TESTING", self.run_tests),
+ self.define_from_variant("LIBPRESSIO_DATASET_HAS_HDF5", "hdf5"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/libpressio-errorinjector/package.py b/var/spack/repos/builtin/packages/libpressio-errorinjector/package.py
index 8ed53ad670..05ad253ef8 100644
--- a/var/spack/repos/builtin/packages/libpressio-errorinjector/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-errorinjector/package.py
@@ -14,11 +14,15 @@ class LibpressioErrorinjector(CMakePackage):
maintainers("robertu94")
+ version("0.9.0", commit="7042a11ca94f2027e60e5824c7c72c7e9a07f80f")
version("0.8.0", commit="0bfac9a06b1ae34a872b8b599dd4ccb46aa2db4e")
version("0.7.0", commit="0b5a5b15121be248a3e5af925f9ad88b3d43fef6")
- depends_on("libpressio@0.88.0:", when="@0.8.0:")
- depends_on("libpressio@:0.87.0", when="@:0.7.0")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("libpressio@0.99.4:", when="@0.9.0:")
+ depends_on("libpressio@0.88.0:", when="@0.8.0")
+ depends_on("libpressio@:0.87.0", when="@0.7.0")
def cmake_args(self):
args = ["-DBUILD_TESTING=OFF"]
diff --git a/var/spack/repos/builtin/packages/libpressio-jit/package.py b/var/spack/repos/builtin/packages/libpressio-jit/package.py
new file mode 100755
index 0000000000..8d9fe66bdb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpressio-jit/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class LibpressioJit(CMakePackage):
+ """the FZ module compiler"""
+
+ homepage = "https://github.com/robertu94/libpressio_jit"
+ url = "https://github.com/robertu94/libpressio_jit/archive/refs/tags/0.0.1.tar.gz"
+ git = "https://github.com/robertu94/libpressio_jit"
+
+ maintainers("robertu94")
+ license("BSD-4-Clause", checked_by="robertu94")
+
+ version("0.0.1", sha256="6aa771c624980589cc941e8cfca1c5fb6cea3fef2b060f58bfdf07109eda8c08")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("poorjit", description="include the prototype poorjit compiler", default=True)
+
+ depends_on("poorjit", when="+poorjit")
+ depends_on("libpressio@0.99.1:")
+
+ def cmake_args(self):
+ args = [self.define_from_variant("LIBPRESSIO_JIT_HAS_POORJIT", "poorjit")]
+ return args
diff --git a/var/spack/repos/builtin/packages/libpressio-nvcomp/package.py b/var/spack/repos/builtin/packages/libpressio-nvcomp/package.py
index d496bff18d..1b45443d08 100644
--- a/var/spack/repos/builtin/packages/libpressio-nvcomp/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-nvcomp/package.py
@@ -15,12 +15,18 @@ class LibpressioNvcomp(CMakePackage, CudaPackage):
maintainers("robertu94")
+ version("0.0.6", sha256="19ecc090b32ec77ddbdf6a3f1f823cf19c32bd8c08b0acb0f87c740961a1d9b4")
version("0.0.5", sha256="2f2a2567c77db550badaf594cda824fa313470b143f69bcef308eeb80b4876c2")
version("0.0.4", sha256="6ff7d0f3167dead7584c994a6a11782f20eb3dd4844307e4ee8b2aebcd8571e9")
version("0.0.3", sha256="21409d34f9281bfd7b83b74f5f8fc6d34794f3161391405538c060fb59534597")
version("0.0.2", commit="38d7aa7c283681cbe5b7f17b900f72f9f25be51c")
+ depends_on("cxx", type="build") # generated
+
depends_on("nvcomp@2.2.0:", when="@0.0.3:")
+ depends_on("libpressio+cuda")
+ depends_on("libpressio@0.99.4:", when="@0.0.6:")
+ depends_on("libpressio@0.89.0:", when="@0.0.3:0.0.5")
depends_on("libpressio@0.88.0:", when="@:0.0.2")
conflicts("~cuda")
diff --git a/var/spack/repos/builtin/packages/libpressio-opt/package.py b/var/spack/repos/builtin/packages/libpressio-opt/package.py
index 07c4f3b03d..37c291e92e 100644
--- a/var/spack/repos/builtin/packages/libpressio-opt/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-opt/package.py
@@ -10,13 +10,14 @@ class LibpressioOpt(CMakePackage):
"""Metacompressor which preforms optimization of compressor settings for LibPressio"""
homepage = "https://github.com/robertu94/libpressio_opt"
- git = "git@github.com:robertu94/libpressio_opt"
+ git = "https://github.com/robertu94/libpressio_opt.git"
url = "https://github.com/robertu94/libpressio_opt/archive/refs/tags/0.11.0.tar.gz"
maintainers("robertu94")
version("develop", branch="develop")
version("sdr-develop", branch="develop", git="git@github.com:szcompressor/SDRFramework")
+ version("0.15.4", sha256="43ff4a13300eb0812066b193f0883295156c85a5980f225e739f95f029c77f92")
version("0.15.0", sha256="0f092ae287e555c890d0ab77df83a7acf619a2b05ab104cef8647df4f886d759")
version("0.14.0", sha256="1e8d348f9777f3d49764b22b1f2abefd4b972cb9b1fa27c867373d32c8f1c57d")
version("0.13.5", sha256="cc0e6a46335aa3552b8ab57757d39855f4fba71e661f706ec99519cb2c8a2f3c")
@@ -29,7 +30,11 @@ class LibpressioOpt(CMakePackage):
version("0.12.0", sha256="5f28f37de858634cf481d911f202360f078902803f82b5f49b7eec9b59948d64")
version("0.11.0", sha256="cebbc512fcaa537d2af1a6919d6e0400cdc13595d71d9b90b74ad3eb865c9767")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libpressio+libdistributed+mpi")
+ depends_on("libpressio@0.99.4:", when="@0.15.4:")
depends_on("libpressio@0.93.0:", when="@0.14.0:")
depends_on("libpressio@0.95.0:", when="@0.15.0:")
depends_on("libpressio@0.88.0:", when="@0.13.5:")
@@ -49,5 +54,5 @@ class LibpressioOpt(CMakePackage):
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
+ def check_test(self):
make("test")
diff --git a/var/spack/repos/builtin/packages/libpressio-predict/package.py b/var/spack/repos/builtin/packages/libpressio-predict/package.py
new file mode 100644
index 0000000000..6eeb7bc37d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpressio-predict/package.py
@@ -0,0 +1,66 @@
+# Copyright 2013-2024 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.package import *
+
+
+class LibpressioPredict(CMakePackage):
+ """High Fidelity Proxy Models for Compression"""
+
+ homepage = "https://github.com/robertu94/libpressio-predict"
+ url = "https://github.com/robertu94/libpressio-predict/archive/refs/tags/0.0.0.tar.gz"
+ git = "https://github.com/robertu94/libpressio-predict"
+
+ maintainers("robertu94")
+
+ version("0.0.4", sha256="50131183196ba6476a887ee7ffeface3cbb368da24fab2f8c6352c1f891f8c1b")
+ version("0.0.3", sha256="dc2b97f58ba3ec5a86f93a4085ebb45521edb0347cb90a4ae68283de16e3c526")
+ version("0.0.2", sha256="02323e03c832cd1f116136347c6b2b52e5c04485fcd57aeb588b6f1923c62a60")
+ version("0.0.0", sha256="b3c08be05e3b49542929e4d3849c232d1343c66c9f785b312bb37196dc530035")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("bin", default=True, description="build the command line tools")
+ variant("shared", default=True, description="build shared libaries")
+
+ depends_on("libpressio-tools@0.4.2:", when="@:0.0.3")
+ depends_on("libpressio@0.96.3:", when="@:0.0.2")
+ depends_on("libpressio@0.96.5:", when="@0.0.3:")
+ depends_on("libpressio-dataset@0.0.7:", when="@0.0.3:")
+ depends_on("libpressio-dataset@0.0.6:", when="@0.0.2")
+ with when("@0.0.3:"):
+ variant("khan2023", description="build support for secde from khan2023", default=False)
+ variant("rahman2023", description="build support for secde from rahman2023", default=False)
+ variant("sian2022", description="build support for secde from sian2022", default=False)
+ variant(
+ "python", description="build support for python fit/predict methods", default=False
+ )
+ with when("+python"):
+ depends_on("libpressio+pybind")
+ with when("+rahman2023"):
+ conflicts("~python")
+ with when("+khan2023"):
+ depends_on("libpressio+sz3+zfp")
+ depends_on("sz3")
+ depends_on("zfp")
+ with when("+sian2022"):
+ depends_on("libpressio+sz3")
+ depends_on("sz3")
+ with when("+bin"):
+ depends_on("libpressio+libdistributed+json+remote+mpi+openssl")
+ depends_on("libdistributed@0.4.3:")
+ depends_on("mpi")
+ depends_on("sqlite@3.38:+dynamic_extensions")
+ depends_on("libpressio-dataset@0.0.5", when="@0.0.0")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("LIBPRESSIO_PREDICT_BUILD_TOOLS", "bin"),
+ self.define_from_variant("LIBPRESSIO_PREDICT_HAS_PYTHON", "python"),
+ self.define_from_variant("LIBPRESSIO_PREDICT_HAS_SIAN2022", "sian2022"),
+ self.define_from_variant("LIBPRESSIO_PREDICT_HAS_KHAN2023", "khan2023"),
+ self.define("LIBPRESSIO_PREDICT_USE_MPI", self.spec.satisfies("^ mpi")),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/libpressio-rmetric/package.py b/var/spack/repos/builtin/packages/libpressio-rmetric/package.py
index a024871bae..01feff140f 100644
--- a/var/spack/repos/builtin/packages/libpressio-rmetric/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-rmetric/package.py
@@ -17,13 +17,17 @@ class LibpressioRmetric(CMakePackage):
version("master", branch="master")
# note versions <= 0.0.3 do not build with spack
+ version("0.0.8", sha256="246d98c80f1011819bdac2893035d7914b40d328aae2d50b3608a178406f95d9")
version("0.0.7", sha256="b01df5102076412064849335c2c928a4a5ba23e1f1f515062d9166b0a7531179")
version("0.0.6", sha256="b23a79448cd32b51a7301d6cebf4e228289712dd77dd76d86821741467e9af46")
version("0.0.5", sha256="51eb192314ef083790dd0779864cab527845bd8de699b3a33cd065c248eae24c")
version("0.0.4", sha256="166af5e84d7156c828a3f0dcc5bf531793ea4ec44bbf468184fbab96e1f0a91f")
version("0.0.3", sha256="c45948f83854c87748c7ec828ca2f06d7cf6f98a34f763b68c13a4e2deb7fd79")
- depends_on("libpressio@0.88.0:", when="@0.0.5:")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("libpressio@0.99.4:", when="@0.0.8:")
+ depends_on("libpressio@0.88.0:", when="@0.0.5:0.0.7")
depends_on("libpressio@0.85.0:", when="@:0.0.4")
depends_on("r")
depends_on("r-rcpp")
@@ -40,5 +44,5 @@ class LibpressioRmetric(CMakePackage):
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
+ def check_test(self):
make("test")
diff --git a/var/spack/repos/builtin/packages/libpressio-sperr/package.py b/var/spack/repos/builtin/packages/libpressio-sperr/package.py
index 193ac86737..adf79898aa 100644
--- a/var/spack/repos/builtin/packages/libpressio-sperr/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-sperr/package.py
@@ -18,12 +18,16 @@ class LibpressioSperr(CMakePackage):
license("GPL-3.0-only")
version("master", branch="master")
+ version("0.0.5", sha256="8fda62ad923b4229b9a434d5f9197010e396e972ffb9e29c2e7783ec14fdc324")
version("0.0.4", sha256="97f2879460b1a28ed8ebf0c300c1cf7ceeb2c7aa7b8a1307ed19bf8cce0b7941")
version("0.0.3", sha256="e0d1fd083419aaaa243cbf780b7de17aeb96533000071088aa21ec238d358ecc")
version("0.0.2", sha256="61995d687f9e7e798e17ec7238d19d917890dc0ff5dec18293b840c4d6f8c115")
version("0.0.1", sha256="e2c164822708624b97654046b42abff704594cba6537d6d0646d485bdf2d03ca")
- depends_on("libpressio@0.88.0:", when="@0.0.3:")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("libpressio@0.99.4:", when="@0.0.5:")
+ depends_on("libpressio@0.88.0:", when="@0.0.3:0.0.4")
depends_on("libpressio@:0.88.0", when="@:0.0.2")
depends_on("sperr@:0.6.2", when="@:0.0.3")
depends_on("sperr@0.7.1:", when="@0.0.4:")
diff --git a/var/spack/repos/builtin/packages/libpressio-tools/package.py b/var/spack/repos/builtin/packages/libpressio-tools/package.py
index a72f1b4c8b..b4f518e0f8 100644
--- a/var/spack/repos/builtin/packages/libpressio-tools/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-tools/package.py
@@ -9,14 +9,18 @@ from spack.package import *
class LibpressioTools(CMakePackage):
"""General Utilities for LibPressio"""
- homepage = "https://github.com/robertu94/pressio-tools"
- url = "https://github.com/robertu94/pressio-tools/archive/refs/tags/0.0.15.tar.gz"
+ url = "https://github.com/robertu94/pressio-tools/archive/refs/tags/0.4.7.tar.gz"
git = "https://github.com/robertu94/pressio-tools"
+ homepage = "https://github.com/robertu94/pressio-tools"
maintainers("robertu94")
tags = ["e4s"]
- version("master", branch="master")
+ version("0.4.7", sha256="02052025529bcae6125bbcb6c1513776f06164324379d936175fc574188d4d7c")
+ version("0.4.6", sha256="b1253d49bd16669c41332146e3c441f5a6363cad73262e91a945831ec2bc76e0")
+ version("0.4.5", sha256="4f296e4b31f6880f388cb95823864f2c76244e40bb6a94d7918234d189f799ed")
+ version("0.4.4", sha256="edbff72b0dba11b145b4d61d507b869ef976c5a8941afb817a533b923a9d7a41")
+ version("0.4.3", sha256="2122e2c5212325a54bb6a80f4b7fb56060a1d2d0fa5733ac5757109ea892c9f9")
version("0.3.0", sha256="2f309557df3e8df9e492691213933865a5dbfb051c03404e33918f4765223025")
version("0.2.0", sha256="75048950f0dfa0e20f2651991875822f36fceb84bdda12d1c0361d49912392b8")
version("0.1.6", sha256="a67a364f46dea29ff1b3e5c52c0a5abf2d9d53412fb8d424f6bd71252bfa7792")
@@ -37,6 +41,16 @@ class LibpressioTools(CMakePackage):
version("0.0.16", sha256="1299e441fb15666d1c8abfd40f3f52b1bf55b6bfda4bfcc71177eec37160a95e")
version("0.0.15", sha256="bcdf865d77969a34e2d747034ceeccf5cb766a4c11bcc856630d837f442ee33e")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("libpressio-adios1@0.0.2:", when="+adios1")
+ depends_on("lc-framework@1.1.1:+libpressio", when="+lc")
+
+ depends_on("dctz@0.2.2:+libpressio", when="+dctz")
+ depends_on("libpressio-predict@0.0.4:", when="+predict")
+ depends_on("libpressio-dataset@0.0.8:", when="+dataset")
+ depends_on("libpressio-jit@0.0.1:", when="+jit")
+
depends_on("mpi", when="+mpi")
depends_on("libpressio+libdistributed+mpi", when="+mpi")
depends_on("libpressio", when="~mpi")
@@ -73,32 +87,34 @@ class LibpressioTools(CMakePackage):
variant("adios2", default=False, description="depend on ADIOS2 for IO modules")
variant("sperr", default=False, description="depend on sperr", when="@0.1.2:")
variant("nvcomp", default=False, description="depend on nvcomp", when="@0.1.0:")
- conflicts("+opt", "~mpi")
+ variant("adios1", default=False, description="depend on adios1", when="@0.4.3:")
+ variant("lc", default=False, description="depend on lc", when="@0.4.4:")
+ variant("dctz", default=False, description="depend on dctz", when="@0.4.5:")
+ variant("dataset", default=False, description="depend on libpressio-dataset", when="@0.4.6:")
+ variant("predict", default=False, description="depend on libpressio-predict", when="@0.4.6:")
+ variant("jit", default=False, description="depend on libpressio-jit", when="@0.4.6:")
+ conflicts("+opt", when="~mpi", msg="opt support requires MPI")
def cmake_args(self):
- args = []
- if "+mpi" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_MPI=YES")
- if "+opt" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_OPT=YES")
- if "+error_injector" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_ERROR_INJECTOR=YES")
- if "+tthresh" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_TTHRESH=YES")
- if "+rcpp" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_RMETRIC=YES")
- if "+sperr" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_SPERR=YES")
- if "+nvcomp" in self.spec:
- args.append("-DLIBPRESSIO_TOOLS_HAS_NVCOMP=YES")
- if self.run_tests:
- args.append("-DBUILD_TESTING=ON")
- else:
- args.append("-DBUILD_TESTING=OFF")
-
+ args = [
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_MPI", "mpi"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_OPT", "opt"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_ERROR_INJECTOR", "error_injector"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_TTHRESH", "tthresh"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_RMETRIC", "rcpp"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_SPERR", "sperr"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_NVCOMP", "nvcomp"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_DCTZ", "dctz"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_ADIOS1", "adios1"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_LC", "lc"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_PREDICT", "predict"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_JIT", "jit"),
+ self.define_from_variant("LIBPRESSIO_TOOLS_HAS_DATASET", "dataset"),
+ self.define("BUILD_TESTING", self.run_tests),
+ ]
return args
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
+ def check_test(self):
make("test")
diff --git a/var/spack/repos/builtin/packages/libpressio-tthresh/package.py b/var/spack/repos/builtin/packages/libpressio-tthresh/package.py
index c37bcb8ede..d66cf2894d 100644
--- a/var/spack/repos/builtin/packages/libpressio-tthresh/package.py
+++ b/var/spack/repos/builtin/packages/libpressio-tthresh/package.py
@@ -18,13 +18,17 @@ class LibpressioTthresh(CMakePackage):
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("0.0.8", sha256="c6590a965b0ff3e97db1bab8ddb6e552ad4f8142623d02323dc9598da9052309")
version("0.0.7", sha256="5e364ef72dd1ed1cf786d2b7aef89624fdcf1a0ca845777ce54c365b35a75be2")
version("0.0.6", sha256="e9dc4754421d892a86516c6bb892f6ff582e9ea3c242c1c052104e4f6944cbec")
version("0.0.5", sha256="af47c90e9c16825312e390a7fb30d9d128847afb69ad6c2f6608bd80f60bae23")
version("0.0.3", sha256="b0b0a4876d3362deafc2bb326be33882132e3d1666e0c5f916fd6fad74a18688")
version("0.0.1", sha256="9efcfa97a5a81e9c456f50b712adb806d9d2f2ed6039860615df0f2e9d96569e")
+ depends_on("cxx", type="build") # generated
+
depends_on("eigen")
+ depends_on("libpressio@0.99.4:", when="@0.0.8:")
depends_on("libpressio@0.85.0:", when="@:0.0.5")
depends_on("libpressio@0.88.0:", when="@0.0.6:")
@@ -38,5 +42,5 @@ class LibpressioTthresh(CMakePackage):
@run_after("build")
@on_package_attributes(run_tests=True)
- def test(self):
+ def check_test(self):
make("test")
diff --git a/var/spack/repos/builtin/packages/libpressio/package.py b/var/spack/repos/builtin/packages/libpressio/package.py
index f020cb3800..095a401883 100644
--- a/var/spack/repos/builtin/packages/libpressio/package.py
+++ b/var/spack/repos/builtin/packages/libpressio/package.py
@@ -20,6 +20,21 @@ class Libpressio(CMakePackage, CudaPackage):
tests_require_compiler = True
version("master", branch="master")
version("develop", branch="develop")
+ version("0.99.4", sha256="091e4bac2cedca5fb9495a22eee7be718c2d04d899d56c65fc088936884eac0e")
+ version("0.99.2", sha256="556d157097b2168fefde1fe3b5e2da06a952346357d46c55548d92c77d1da878")
+ version("0.99.1", sha256="c9b19deaac4df5eaeecd938fea4c1752d86474f453880c0ba984ceee6bf15d35")
+ version("0.99.0", sha256="b95916c4851a7ec952e5f29284e4f7477eaeff0e52a2e5b593481c72edf733d6")
+ version("0.98.1", sha256="5246271fdf2e4ba99eeadfccd6224b75bf3af278a812ded74ec9adc11f6cabba")
+ version("0.98.0", sha256="6b6507bf1489ff2cbeaf4c507d34e1015495c811730aa809e778f111213062db")
+ version("0.97.3", sha256="631111253ec4cfd3138773eaf8280921e220b0d260985da762f0a0152e5b1b17")
+ version("0.97.2", sha256="70d549ef457d5192c084fbf6304cb362d367786afe88d7b8db4eea263f9c7d43")
+ version("0.96.6", sha256="a8d3269f0f5289d46471a5b85e5cd32e370edb8df45d04f5e707e0a1f64eccd8")
+ version("0.96.5", sha256="7cca6f3f98dde2dbd1c9ff7462d09975f6a3630704bd01b6bef6163418a0521b")
+ version("0.96.4", sha256="7f012b01ce1a6c9f5897487089266de5b60659ed6b220eadba51d63613620404")
+ version("0.96.3", sha256="e8f4af028d34df2f3c8eb61cfc2f93fadab7a2e2d072a30ee6a085fb344a3be4")
+ version("0.96.2", sha256="2c904ec16900b67ab0188ea96d27fa4efca2c9efc1b214119451becaaeaa2d18")
+ version("0.96.1", sha256="2305d04b57c1b49ecd5a4bda117f1252a57529c98e6bd260bfe5166a4f4d4043")
+ version("0.96.0", sha256="42f563b70c4f77abffb430284f0c5bc9adba2666412ee4072d6f97da88f0c1a0")
version("0.95.1", sha256="c2e4f81d1491781cd47f2baba64acfbba9a7d6203c9b01369f8b1a8f94e0bb2b")
version("0.94.0", sha256="4250597cdd54043a7d5009ffc3feea3eac9496cdd38ea3f61f9727b7acd09add")
version("0.93.0", sha256="1da5940aaf0190a810988dcd8f415b9c8db53bbbdfcb627d899921c89170d990")
@@ -159,6 +174,19 @@ class Libpressio(CMakePackage, CudaPackage):
version("0.27.0", sha256="387ee5958de2d986095cda2aaf39d0bf319d02eaeeea2a565aea97e6a6f31f36")
version("0.26.0", sha256="c451591d106d1671c9ddbb5c304979dd2d083e0616b2aeede62e7a6b568f828c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "pybind", default=False, description="build support for pybind metrics", when="@0.96.0:"
+ )
+ variant(
+ "openssl", default=False, description="build support for hashing options", when="@0.96.2:"
+ )
+ variant("szx", default=False, description="build support for SZx", when="@0.87.0:")
+ variant("blosc2", default=False, description="build support for blosc2", when="@0.98.0:")
+ variant("matio", default=False, description="build support for matio", when="@0.99.0:")
+ variant("clang", default=False, description="build migration tools", when="@0.99.0:")
variant("blosc", default=False, description="support the blosc lossless compressors")
variant("fpzip", default=False, description="support for the FPZIP lossy compressor")
variant("hdf5", default=False, description="support reading and writing from hdf5 files")
@@ -206,6 +234,7 @@ class Libpressio(CMakePackage, CudaPackage):
depends_on("boost", when="@:0.51.0+boost")
depends_on("libstdcompat+boost", when="+boost")
+ depends_on("libstdcompat@0.0.16:", when="@0.93.0:")
depends_on("libstdcompat@0.0.14:", when="@0.79.0:")
depends_on("libstdcompat@0.0.13:", when="@0.73.0:")
depends_on("libstdcompat@0.0.10:", when="@0.71.3:")
@@ -253,111 +282,122 @@ class Libpressio(CMakePackage, CudaPackage):
depends_on("arc", when="+arc")
depends_on("netcdf-c", when="+netcdf")
depends_on("mgardx", when="+mgardx")
+ depends_on("szx@:1.1.0", when="@0.87.0:0.97.1 +szx")
+ depends_on("szx@1.1.1:", when="@0.97.2: +szx")
+ depends_on("openssl", when="+openssl")
+ depends_on("py-pybind11", when="+pybind")
+ depends_on("matio+shared@1.5.17:", when="+matio")
+ depends_on("llvm@17: +clang", when="+clang")
conflicts(
"^ mgard@2022-11-18",
when="@:0.88.3+mgard",
msg="mgard@2022-11-18 is not supported before 0.89.0",
)
conflicts(
- "+mgardx", when="+szauto"
- ) # SZ auto and MGARDx cause symbol conflicts with each other
+ "+mgardx", when="+szauto", msg="SZ auto and MGARDx cause symbol conflicts with each other"
+ )
conflicts(
"~json",
when="@0.57.0:+remote",
msg="JSON support required for remote after version 0.57.0",
)
+ for cuda_compressor in ["cusz", "mgard", "zfp", "ndzip"]:
+ conflicts(
+ f"~cuda+{cuda_compressor} ^ {cuda_compressor}+cuda",
+ msg="compiling a CUDA compressor without a CUDA support makes no sense",
+ )
depends_on("sz3", when="+sz3")
+ depends_on("sz3@3.1.8:", when="@0.98.1: +sz3")
depends_on("bzip2", when="+bzip2")
depends_on("qoz", when="+qoz")
- depends_on("cusz", when="+cusz")
+ depends_on("cusz@0.6.0:", when="+cusz")
extends("python", when="+python")
+ def lp_cxx_version(self):
+ try:
+ self.compiler.cxx20_flag
+ return "20"
+ except Exception:
+ pass
+ try:
+ self.compiler.cxx17_flag
+ return "17"
+ except Exception:
+ pass
+ try:
+ self.compiler.cxx14_flag
+ return "14"
+ except Exception:
+ pass
+ self.compiler.cxx11_flag
+ return "11"
+
def cmake_args(self):
- args = []
- if "+python" in self.spec:
- args.append("-DLIBPRESSIO_PYTHON_SITELIB={0}".format(python_platlib))
- args.append("-DBUILD_PYTHON_WRAPPER=ON")
- args.append("-DPython3_EXECUTABLE={0}".format(self.spec["python"].command))
- if "+mpi" in self.spec:
- args.append("-DLIBPRESSIO_HAS_MPI4PY=ON")
- if "+hdf5" in self.spec:
- args.append("-DLIBPRESSIO_HAS_HDF=ON")
- args.append("-DHDF5_ROOT=" + self.spec["hdf5"].prefix)
- if "+sz" in self.spec:
- args.append("-DLIBPRESSIO_HAS_SZ=ON")
- if "+szauto" in self.spec:
- args.append("-DLIBPRESSIO_HAS_SZ_AUTO=ON")
- if "+zfp" in self.spec:
- args.append("-DLIBPRESSIO_HAS_ZFP=ON")
- if "+fpzip" in self.spec:
- args.append("-DLIBPRESSIO_HAS_FPZIP=ON")
- if "+blosc" in self.spec:
- args.append("-DLIBPRESSIO_HAS_BLOSC=ON")
- if "+magick" in self.spec:
- args.append("-DLIBPRESSIO_HAS_MAGICK=ON")
- if "+mgard" in self.spec:
- args.append("-DLIBPRESSIO_HAS_MGARD=ON")
- if "+petsc" in self.spec:
- args.append("-DLIBPRESSIO_HAS_PETSC=ON")
- if "+boost" in self.spec:
- args.append("-DLIBPRESSIO_CXX_VERSION=11")
- if "+mpi" in self.spec:
- args.append("-DLIBPRESSIO_HAS_MPI=ON")
- if "+lua" in self.spec:
- args.append("-DLIBPRESSIO_HAS_LUA=ON")
- if "+libdistributed" in self.spec:
- args.append("-DLIBPRESSIO_HAS_LIBDISTRIBUTED=ON")
- if "+ftk" in self.spec:
- args.append("-DLIBPRESSIO_HAS_FTK=ON")
- if "+bitgrooming" in self.spec:
- args.append("-DLIBPRESSIO_HAS_BIT_GROOMING=ON")
- if "+digitrounding" in self.spec:
- args.append("-DLIBPRESSIO_HAS_DIGIT_ROUNDING=ON")
- if "+openmp" in self.spec:
- args.append("-DLIBPRESSIO_HAS_OPENMP=ON")
- if "+docs" in self.spec:
- args.append("-DBUILD_DOCS=ON")
- args.append("-DLIBPRESSIO_INSTALL_DOCS=ON")
- if "+remote" in self.spec:
- args.append("-DLIBPRESSIO_HAS_REMOTELAUNCH=ON")
- if "+json" in self.spec:
- args.append("-DLIBPRESSIO_HAS_JSON=ON")
- if "+unix" in self.spec:
- args.append("-DLIBPRESSIO_HAS_LINUX=ON")
- if "+ndzip" in self.spec:
- args.append("-DLIBPRESSIO_HAS_NDZIP=ON")
- if "+arc" in self.spec:
- args.append("-DLIBPRESSIO_HAS_ARC=ON")
- if "+netcdf" in self.spec:
- args.append("-DLIBPRESSIO_HAS_NETCDF=ON")
- if "+sz3" in self.spec:
- args.append("-DLIBPRESSIO_HAS_SZ3=ON")
- if "+cuda" in self.spec:
- args.append("-DLIBPRESSIO_HAS_CUFILE=ON")
- args.append("-DLIBPRESSIO_HAS_CUDA=ON")
- if "+mgardx" in self.spec:
- args.append("-DLIBPRESSIO_HAS_MGARDx=ON")
- if "+bzip2" in self.spec:
- args.append("-DLIBPRESSIO_HAS_BZIP2=ON")
- if "+qoz" in self.spec:
- args.append("-DLIBPRESSIO_HAS_QoZ=ON")
- if "+cusz" in self.spec:
- args.append("-DLIBPRESSIO_HAS_CUSZ=ON")
+ args = [
+ self.define_from_variant("LIBPRESSIO_HAS_SZ", "sz"),
+ self.define_from_variant("LIBPRESSIO_HAS_SZx", "szx"),
+ self.define_from_variant("LIBPRESSIO_HAS_OPENSSL", "openssl"),
+ self.define_from_variant("LIBPRESSIO_HAS_PYTHON_LAUNCH", "pybind"),
+ self.define_from_variant("LIBPRESSIO_HAS_BLOSC2", "blosc2"),
+ self.define_from_variant("LIBPRESSIO_HAS_MATLABIO", "matio"),
+ self.define_from_variant("BUILD_MIGRATION_TOOLS", "clang"),
+ self.define_from_variant("LIBPRESSIO_HAS_SZ_AUTO", "szauto"),
+ self.define_from_variant("LIBPRESSIO_HAS_ZFP", "zfp"),
+ self.define_from_variant("LIBPRESSIO_HAS_FPZIP", "fpzip"),
+ self.define_from_variant("LIBPRESSIO_HAS_BLOSC", "blosc"),
+ self.define_from_variant("LIBPRESSIO_HAS_MAGICK", "magick"),
+ self.define_from_variant("LIBPRESSIO_HAS_MGARD", "mgard"),
+ self.define_from_variant("LIBPRESSIO_HAS_PETSC", "petsc"),
+ self.define_from_variant("LIBPRESSIO_HAS_MPI", "mpi"),
+ self.define_from_variant("LIBPRESSIO_HAS_LUA", "lua"),
+ self.define_from_variant("LIBPRESSIO_HAS_LIBDISTRIBUTED", "libdistributed"),
+ self.define_from_variant("LIBPRESSIO_HAS_FTK", "ftk"),
+ self.define_from_variant("LIBPRESSIO_HAS_BIT_GROOMING", "bitgrooming"),
+ self.define_from_variant("LIBPRESSIO_HAS_DIGIT_ROUNDING", "digitrounding"),
+ self.define_from_variant("LIBPRESSIO_HAS_OPENMP", "openmp"),
+ self.define_from_variant("LIBPRESSIO_HAS_REMOTELAUNCH", "remote"),
+ self.define_from_variant("LIBPRESSIO_HAS_JSON", "json"),
+ self.define_from_variant("LIBPRESSIO_HAS_LINUX", "unix"),
+ self.define_from_variant("LIBPRESSIO_HAS_NDZIP", "ndzip"),
+ self.define_from_variant("LIBPRESSIO_HAS_ARC", "arc"),
+ self.define_from_variant("LIBPRESSIO_HAS_NETCDF", "netcdf"),
+ self.define_from_variant("LIBPRESSIO_HAS_SZ3", "sz3"),
+ self.define_from_variant("LIBPRESSIO_HAS_MGARDx", "mgardx"),
+ self.define_from_variant("LIBPRESSIO_HAS_BZIP2", "bzip2"),
+ self.define_from_variant("LIBPRESSIO_HAS_QoZ", "qoz"),
+ self.define_from_variant("LIBPRESSIO_HAS_CUSZ", "cusz"),
+ self.define_from_variant("LIBPRESSIO_HAS_CUFILE", "cuda"),
+ self.define_from_variant("LIBPRESSIO_HAS_CUDA", "cuda"),
+ self.define_from_variant("LIBPRESSIO_HAS_HDF", "hdf5"),
+ self.define_from_variant("BUILD_DOCS", "docs"),
+ self.define_from_variant("LIBPRESSIO_INSTALL_DOCS", "docs"),
+ self.define_from_variant("BUILD_PYTHON_WRAPPER", "python"),
+ self.define("LIBPRESSIO_HAS_MPI4PY", self.spec.satisfies("+python +mpi")),
+ self.define(
+ "LIBPRESSIO_BUILD_MODE", "FULL" if self.spec.satisfies("+core") else "CORE"
+ ),
+ self.define("BUILD_TESTING", self.run_tests),
+ # this flag was removed in 0.52.0, we should deprecate and remove this
+ self.define(
+ "LIBPRESSIO_CXX_VERSION",
+ "11" if self.spec.satisfies("+boost") else self.lp_cxx_version(),
+ ),
+ ]
+ # if cuda is backed by the shim, we need to set these linker flags to
+ # avoid downstream linker errors
if self.spec.satisfies("+cusz +cuda"):
args.append("-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined")
- if "+core" in self.spec:
- args.append("-DLIBPRESSIO_BUILD_MODE=FULL")
- else:
- args.append("-DLIBPRESSIO_BUILD_MODE=CORE")
- if self.run_tests:
- args.append("-DBUILD_TESTING=ON")
- else:
- args.append("-DBUILD_TESTING=OFF")
+ # libpressio needs to know where to install the python libraries
+ if self.spec.satisfies("+python"):
+ args.append(f"-DLIBPRESSIO_PYTHON_SITELIB={python_platlib}")
+ # help ensure that libpressio finds the correct HDF5 package
+ if self.spec.satisfies("+hdf5"):
+ args.append("-DHDF5_ROOT=" + self.spec["hdf5"].prefix)
return args
def setup_run_environment(self, env):
- if "+hdf5" in self.spec and "+json" in self.spec:
+ if self.spec.satisfies("+hdf5") and self.spec.satisfies("+json"):
env.prepend_path("HDF5_PLUGIN_PATH", self.prefix.lib64)
@run_after("build")
@@ -367,36 +407,36 @@ class Libpressio(CMakePackage, CudaPackage):
@run_after("build")
def install_docs(self):
- if "+docs" in self.spec:
+ if self.spec.satisfies("+docs"):
with working_dir(self.build_directory):
make("docs")
@run_after("install")
def copy_test_sources(self):
- if self.version < Version("0.88.3"):
+ if self.spec.satisfies("@:0.88.2"):
return
srcs = [
join_path("test", "smoke_test", "smoke_test.cc"),
join_path("test", "smoke_test", "CMakeLists.txt"),
]
- self.cache_extra_test_sources(srcs)
+ cache_extra_test_sources(self, srcs)
- def test(self):
- if self.version < Version("0.88.3"):
- return
+ def test_smoke(self):
+ """Run smoke test"""
+ # this works for cmake@3.14: which is required for this package
+ if self.spec.satisfies("@:0.88.2"):
+ raise SkipTest("Package must be installed as version @0.88.3 or later")
args = self.cmake_args()
- args.append(
- "-S{}".format(join_path(self.test_suite.current_test_cache_dir, "test", "smoke_test"))
- )
- args.append(
- "-DCMAKE_PREFIX_PATH={};{}".format(self.spec["libstdcompat"].prefix, self.prefix)
- )
+ args.append(f"-S{join_path(self.test_suite.current_test_cache_dir, 'test', 'smoke_test')}")
+ args.append(f"-DCMAKE_PREFIX_PATH={self.spec['libstdcompat'].prefix};{self.prefix}")
- self.run_test("cmake", args, purpose="cmake configuration works")
+ cmake = self.spec["cmake"].command
+ cmake(*args)
+ cmake("--build", ".")
- # this works for cmake@3.14: which is required for this package
- args = ["--build", "."]
- self.run_test("cmake", args, purpose="cmake builds works")
+ exe = which("pressio_smoke_tests")
+ out = exe(output=str.split, error=str.split)
- self.run_test("./pressio_smoke_tests", expected="all passed")
+ expected = "all passed"
+ assert expected in out
diff --git a/var/spack/repos/builtin/packages/libproxy/package.py b/var/spack/repos/builtin/packages/libproxy/package.py
index 70158c0bf9..612f6d01ee 100644
--- a/var/spack/repos/builtin/packages/libproxy/package.py
+++ b/var/spack/repos/builtin/packages/libproxy/package.py
@@ -21,6 +21,9 @@ class Libproxy(CMakePackage):
version("0.4.14", sha256="6220a6cab837a8996116a0568324cadfd09a07ec16b930d2a330e16d5c2e1eb6")
version("0.4.13", sha256="d610bc0ef81a18ba418d759c5f4f87bf7102229a9153fb397d7d490987330ffd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("perl", default=False, description="Enable Perl bindings")
variant("python", default=False, description="Enable Python bindings", when="@0.4.16:")
@@ -37,12 +40,12 @@ class Libproxy(CMakePackage):
self.define("WITH_PYTHON2", False),
self.define("WITH_VALA", False),
]
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args.append(self.define("PYTHON3_SITEPKG_DIR", python_platlib))
return args
def setup_run_environment(self, env):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
libs = self.spec["libproxy"].libs.directories[0]
if self.spec.satisfies("platform=darwin"):
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs)
diff --git a/var/spack/repos/builtin/packages/libpsl/package.py b/var/spack/repos/builtin/packages/libpsl/package.py
index f6ea835e9a..fe8c8210d0 100644
--- a/var/spack/repos/builtin/packages/libpsl/package.py
+++ b/var/spack/repos/builtin/packages/libpsl/package.py
@@ -15,12 +15,15 @@ class Libpsl(AutotoolsPackage):
license("MIT")
+ version("0.21.5", sha256="1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208")
version("0.21.2", sha256="e35991b6e17001afa2c0ca3b10c357650602b92596209b7492802f3768a6285f")
version("0.20.2", sha256="7aa949fd3fdba61b0dc7b3f4c2520263b942c189746e157f48436386eca3398e")
version("0.19.1", sha256="9b47387a087bcac2af31ea0c94f644bfa32e0be6d079bfa430452b7521ad8c57")
version("0.18.0", sha256="f79c6b257dd39e8f37c7e18d293bbfa35f38676f5d6b6e918687d1cd08216439")
version("0.17.0", sha256="025729d6a26ffd53cb54b4d86196f62c01d1813a4360c627546c6eb60ce3dd4b")
+ depends_on("c", type="build") # generated
+
depends_on("icu4c")
depends_on("gettext", type="build")
@@ -40,7 +43,7 @@ class Libpsl(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- args = ["PYTHON={0}".format(spec["python"].command.path)]
+ args = [f"PYTHON={spec['python'].command.path}"]
if self.run_tests:
args.append("--enable-valgrind-tests")
diff --git a/var/spack/repos/builtin/packages/libpsm3/package.py b/var/spack/repos/builtin/packages/libpsm3/package.py
index 8ce2995bfd..6772a10a39 100644
--- a/var/spack/repos/builtin/packages/libpsm3/package.py
+++ b/var/spack/repos/builtin/packages/libpsm3/package.py
@@ -22,6 +22,8 @@ class Libpsm3(AutotoolsPackage):
)
version("11.4.1.0", sha256="272adb9ec10edf709bfcfccc6b6e9296d25d892c36b845ad577caeb82b70c9ac")
+ depends_on("c", type="build") # generated
+
variant("atomics", default=True, description="Enable atomics")
variant("debug", default=False, description="Enable debugging")
variant("sockets", default=True, description="Enable PSM3 sockets")
@@ -54,8 +56,8 @@ class Libpsm3(AutotoolsPackage):
env.prepend_path("FI_PROVIDER_PATH", self.prefix.lib)
env.set("FI_PROVIDER", "psm3")
env.set("PSM3_ALLOW_ROUTERS", "1")
- if "+sockets" in self.spec and "~verbs" in self.spec:
+ if self.spec.satisfies("+sockets ~verbs"):
env.set("PSM3_HAL", "sockets")
env.set("FI_PSM3_NAME_SERVER", "1")
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
env.set("PSM3_IDENTIFY", "1")
diff --git a/var/spack/repos/builtin/packages/libpsml/package.py b/var/spack/repos/builtin/packages/libpsml/package.py
index b6fb93a282..77ac9840eb 100644
--- a/var/spack/repos/builtin/packages/libpsml/package.py
+++ b/var/spack/repos/builtin/packages/libpsml/package.py
@@ -22,6 +22,8 @@ class Libpsml(AutotoolsPackage):
version("1.1.7", sha256="b3f5431fd3965b66fe01b899c0c3ef73d9f969d67329cd1f5aba84fb056b5dd1")
version("1.1.6", sha256="521647dbd945b208e5d468fceeb2bc397737d9a659e2c7549597bf4eb29f60df")
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf@2.69:", type="build")
depends_on("automake@1.14:", type="build")
depends_on("libtool@2.4.2:", type="build")
diff --git a/var/spack/repos/tutorial/packages/libpspio/package.py b/var/spack/repos/builtin/packages/libpspio/package.py
index 97744468e1..130cebd07c 100644
--- a/var/spack/repos/tutorial/packages/libpspio/package.py
+++ b/var/spack/repos/builtin/packages/libpspio/package.py
@@ -16,8 +16,12 @@ class Libpspio(AutotoolsPackage):
license("MPL-2.0")
+ version("0.4.1", sha256="e4f87f6d8821042db3a88dad60ae07278e36ad2571e28f5d30f02d8b164b4daa")
version("0.3.0", sha256="4dc092457e481e5cd703eeecd87e6f17749941fe274043550c8a2557a649afc5")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=False, description="Enable Fortran bindings")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
index cdf5143b5b..0deb8fb717 100644
--- a/var/spack/repos/builtin/packages/libpthread-stubs/package.py
+++ b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
@@ -15,6 +15,7 @@ class LibpthreadStubs(AutotoolsPackage, XorgPackage):
maintainers("wdconinc")
+ version("0.5", sha256="593196cc746173d1e25cb54a93a87fd749952df68699aab7e02c085530e87747")
version(
"0.4",
sha256="50d5686b79019ccea08bcbd7b02fe5a40634abcfd4146b6e75c6420cc170e9d9",
diff --git a/var/spack/repos/builtin/packages/libpulsar/package.py b/var/spack/repos/builtin/packages/libpulsar/package.py
index cb24450f49..cbff8e9320 100644
--- a/var/spack/repos/builtin/packages/libpulsar/package.py
+++ b/var/spack/repos/builtin/packages/libpulsar/package.py
@@ -20,6 +20,9 @@ class Libpulsar(CMakePackage):
version("2.7.0", sha256="5bf8e5115075e12c848a9e4474cd47067c3200f7ff13c45f624f7383287e8e5e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zstd")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/libqrencode/package.py b/var/spack/repos/builtin/packages/libqrencode/package.py
index d3db70755e..3079c38334 100644
--- a/var/spack/repos/builtin/packages/libqrencode/package.py
+++ b/var/spack/repos/builtin/packages/libqrencode/package.py
@@ -21,6 +21,8 @@ class Libqrencode(AutotoolsPackage):
version("master", branch="master")
version("4.1.1", sha256="5385bc1b8c2f20f3b91d258bf8ccc8cf62023935df2d2676b5b67049f31a049c")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
# We assume a reasonably recent libtool is necessary
diff --git a/var/spack/repos/builtin/packages/libquo/package.py b/var/spack/repos/builtin/packages/libquo/package.py
index 5aa5d0d7cb..efaa0da76f 100644
--- a/var/spack/repos/builtin/packages/libquo/package.py
+++ b/var/spack/repos/builtin/packages/libquo/package.py
@@ -12,7 +12,7 @@ class Libquo(AutotoolsPackage):
single- and multi-threaded libraries."""
homepage = "https://github.com/lanl/libquo"
- url = "https://lanl.github.io/libquo/dists/libquo-1.3.1.tar.gz"
+ url = "https://lanl.github.io/libquo/dists/libquo-1.4.tar.gz"
git = "https://github.com/lanl/libquo.git"
maintainers("samuelkgutierrez")
@@ -22,10 +22,14 @@ class Libquo(AutotoolsPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("1.4", sha256="82395148cdef43c37ef018672307316951e55fc6feffce5ab9b412cfafedffcb")
version("1.3.1", sha256="407f7c61cc80aa934cf6086f3516a31dee3b803047713c297102452c3d7d6ed1")
version("1.3", sha256="61b0beff15eae4be94b5d3cbcbf7bf757659604465709ed01827cbba45efcf90")
version("1.2.9", sha256="0a64bea8f52f9eecd89e4ab82fde1c5bd271f3866c612da0ce7f38049409429b")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("m4", when="@develop", type="build")
@@ -39,11 +43,4 @@ class Libquo(AutotoolsPackage):
bash("./autogen")
def configure_args(self):
- config_args = [
- "CC={0}".format(self.spec["mpi"].mpicc),
- "FC={0}".format(self.spec["mpi"].mpifc),
- ]
- if "%pgi" in self.spec:
- config_args.append("CFLAGS={0}".format(self.compiler.cc_pic_flag))
- config_args.append("FCFLAGS={0}".format(self.compiler.fc_pic_flag))
- return config_args
+ return [f"CC={self.spec['mpi'].mpicc}", f"FC={self.spec['mpi'].mpifc}"]
diff --git a/var/spack/repos/builtin/packages/libraqm/package.py b/var/spack/repos/builtin/packages/libraqm/package.py
index 745dc9f1a9..547931a621 100644
--- a/var/spack/repos/builtin/packages/libraqm/package.py
+++ b/var/spack/repos/builtin/packages/libraqm/package.py
@@ -17,6 +17,8 @@ class Libraqm(MesonPackage):
version("0.9.0", sha256="9ed6fdf41da6391fc9bf7038662cbe412c330aa6eb22b19704af2258e448107c")
+ depends_on("c", type="build") # generated
+
variant(
"bidi_algo",
default="fribidi",
diff --git a/var/spack/repos/builtin/packages/libraw1394/package.py b/var/spack/repos/builtin/packages/libraw1394/package.py
index 89a9262f34..589bb96e8f 100644
--- a/var/spack/repos/builtin/packages/libraw1394/package.py
+++ b/var/spack/repos/builtin/packages/libraw1394/package.py
@@ -16,3 +16,5 @@ class Libraw1394(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("1.2.0", sha256="1fdcfa4c5a0938705b925d06f17da9be6ec3f8f065040bb7f33082ef3fc63fad")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/librdkafka/package.py b/var/spack/repos/builtin/packages/librdkafka/package.py
index 53cb81e2f8..df90516c22 100644
--- a/var/spack/repos/builtin/packages/librdkafka/package.py
+++ b/var/spack/repos/builtin/packages/librdkafka/package.py
@@ -15,6 +15,8 @@ class Librdkafka(AutotoolsPackage):
license("BSD-2-Clause")
+ version("2.6.0", sha256="abe0212ecd3e7ed3c4818a4f2baf7bf916e845e902bb15ae48834ca2d36ac745")
+ version("2.5.3", sha256="eaa1213fdddf9c43e28834d9a832d9dd732377d35121e42f875966305f52b8ff")
version("2.2.0", sha256="af9a820cbecbc64115629471df7c7cecd40403b6c34bfdbb9223152677a47226")
version("2.1.1", sha256="7be1fc37ab10ebdc037d5c5a9b35b48931edafffae054b488faaff99e60e0108")
version("2.1.0", sha256="d8e76c4b1cde99e283a19868feaaff5778aa5c6f35790036c5ef44bc5b5187aa")
@@ -24,5 +26,11 @@ class Librdkafka(AutotoolsPackage):
version("1.4.4", sha256="0984ffbe17b9e04599fb9eceb16cfa189f525a042bef02474cd1bbfe1ea68416")
version("1.4.2", sha256="3b99a36c082a67ef6295eabd4fb3e32ab0bff7c6b0d397d6352697335f4e57eb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zstd")
depends_on("lz4")
+ depends_on("curl")
+ depends_on("openssl")
+ depends_on("zlib")
diff --git a/var/spack/repos/builtin/packages/librelp/package.py b/var/spack/repos/builtin/packages/librelp/package.py
index 3113da14f3..a3d0a468e7 100644
--- a/var/spack/repos/builtin/packages/librelp/package.py
+++ b/var/spack/repos/builtin/packages/librelp/package.py
@@ -20,6 +20,8 @@ class Librelp(AutotoolsPackage):
version("1.6.0", sha256="acaaa6b8e295ecd8e9d9b70c1c3c8fb3cc3c95a9ed5ce1689688510d0eecb37e")
version("1.5.0", sha256="ce7f463944417ba77d7b586590e41e276f7b107d3e35a77ce768cf3889b5e1a6")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libreproc/package.py b/var/spack/repos/builtin/packages/libreproc/package.py
index 353819c54d..2c98bcdea8 100644
--- a/var/spack/repos/builtin/packages/libreproc/package.py
+++ b/var/spack/repos/builtin/packages/libreproc/package.py
@@ -18,6 +18,9 @@ class Libreproc(CMakePackage):
version("14.2.4", sha256="55c780f7faa5c8cabd83ebbb84b68e5e0e09732de70a129f6b3c801e905415dd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cxx", default=False, description="Build reproc C++ bindings")
variant("shared", default=True, description="Build shared libraries")
diff --git a/var/spack/repos/builtin/packages/libressl/package.py b/var/spack/repos/builtin/packages/libressl/package.py
index fbdf8a956d..4e060e3395 100644
--- a/var/spack/repos/builtin/packages/libressl/package.py
+++ b/var/spack/repos/builtin/packages/libressl/package.py
@@ -18,10 +18,15 @@ class Libressl(AutotoolsPackage):
license("custom")
+ version("3.9.2", sha256="7b031dac64a59eb6ee3304f7ffb75dad33ab8c9d279c847f92c89fb846068f97")
+ version("3.8.4", sha256="c0cef9cfe174ac366ce482f542fddb07721e7fa0caface34b49a8720fa37fe7d")
+ version("3.7.3", sha256="7948c856a90c825bd7268b6f85674a8dcd254bae42e221781b24e3f8dc335db3")
version("3.7.2", sha256="b06aa538fefc9c6b33c4db4931a09a5f52d9d2357219afcbff7d93fe12ebf6f7")
version("3.6.3", sha256="87b1bbe36e9eec8d0ae5f04c83d36b2c5b0e581784c7eb0817025ed29eadea37")
version("3.6.1", sha256="acfac61316e93b919c28d62d53037ca734de85c46b4d703f19fd8395cf006774")
+ depends_on("c", type="build")
+
variant("shared", default=True, description="Build shared libraries")
variant("static", default=False, description="Build static libraries")
diff --git a/var/spack/repos/builtin/packages/libristra/package.py b/var/spack/repos/builtin/packages/libristra/package.py
index 74eb576d0b..bf884b47ff 100644
--- a/var/spack/repos/builtin/packages/libristra/package.py
+++ b/var/spack/repos/builtin/packages/libristra/package.py
@@ -20,14 +20,16 @@ class Libristra(CMakePackage):
version("master", branch="master", submodules=False, preferred=True)
version("1.0.0", commit="33235fe0334ca7f1f99b386a90932d9f8e1e71de")
+ depends_on("cxx", type="build") # generated
+
variant("paraview", default=False, description="Enable ParaView")
variant("shared_lua", default=False, description="Build with shared lua")
depends_on("cmake@3.12:")
depends_on("mpi")
depends_on("boost@1.70.0: cxxstd=17 +program_options")
- depends_on("lua@5.3.5~shared", when="~shared_lua")
- depends_on("lua@5.3.5+shared", when="+shared_lua")
+ depends_on("lua@5.3.5:~shared", when="~shared_lua")
+ depends_on("lua@5.3.5:+shared", when="+shared_lua")
# TODO: might want to move paraview out of libristra
depends_on("paraview", when="+paraview")
# We explicitly depend on gtest and can no longer rely on others for it
diff --git a/var/spack/repos/builtin/packages/librmm/package.py b/var/spack/repos/builtin/packages/librmm/package.py
index 4e885df76d..3adab29f30 100644
--- a/var/spack/repos/builtin/packages/librmm/package.py
+++ b/var/spack/repos/builtin/packages/librmm/package.py
@@ -16,6 +16,9 @@ class Librmm(CMakePackage):
license("Apache-2.0")
+ version("24.02.00", sha256="63ddde8788727f0989f6397aed8a007ef414a577417b7d3cf39ca670c1bc4a91")
version("0.15.0", sha256="599f97b95d169a90d11296814763f7e151a8a1e060ba10bc6c8f4684a5cd7972")
+ depends_on("cxx", type="build") # generated
+
depends_on("cuda@9.0:")
diff --git a/var/spack/repos/builtin/packages/librom/package.py b/var/spack/repos/builtin/packages/librom/package.py
index b46c9e0976..1a95b3116f 100644
--- a/var/spack/repos/builtin/packages/librom/package.py
+++ b/var/spack/repos/builtin/packages/librom/package.py
@@ -17,6 +17,10 @@ class Librom(AutotoolsPackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("lapack")
depends_on("mpi")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/librsb/package.py b/var/spack/repos/builtin/packages/librsb/package.py
index 19981ce8b0..d78349824a 100644
--- a/var/spack/repos/builtin/packages/librsb/package.py
+++ b/var/spack/repos/builtin/packages/librsb/package.py
@@ -10,12 +10,13 @@ class Librsb(AutotoolsPackage):
"""librsb : A shared memory parallel sparse matrix computations
library for the Recursive Sparse Blocks format"""
- homepage = "http://librsb.sourceforge.net/"
- url = "http://download.sourceforge.net/librsb/librsb-1.3.0.1.tar.gz"
+ homepage = "https://librsb.sourceforge.net/"
+ url = "https://download.sourceforge.net/librsb/librsb-1.3.0.1.tar.gz"
list_url = "https://sourceforge.net/projects/librsb/files/"
license("LGPL-3.0-only")
+ version("1.3.0.2", sha256="18c6fc443fa1cfd2a8110f7d4b88d5bbcb493b9e85b3a62014b8bb57a848e04f")
version("1.3.0.1", sha256="3fc024a410f94aca2a7139ae79f4d713b11fa83304293630c363786874c17db4")
version("1.3.0.0", sha256="2ac8725d1f988f57df9383ae6b0bb2ed221ec935187d31ebb62ea95ee868a790")
version("1.2.0.11", sha256="0686be29bbe277e227c6021de6bd0564e4fc83f996b787886437d28048057bc8")
@@ -23,6 +24,10 @@ class Librsb(AutotoolsPackage):
version("1.2.0.9", sha256="f421f5d572461601120933e3c1cfee2ca69e6ecc92cbb11baa4e86bdedd3d9fa")
version("1.2.0.8", sha256="8bebd19a1866d80ade13eabfdd0f07ae7e8a485c0b975b5d15f531ac204d80cb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("zlib-api")
depends_on("googletest", type="build", when="+googletest")
conflicts("%apple-clang")
@@ -39,7 +44,7 @@ class Librsb(AutotoolsPackage):
variant("verbose", default=False, description="Extra Library Verbosity. Good for learning.")
def setup_build_environment(self, spack_env):
- if "+asan" in self.spec:
+ if self.spec.satisfies("+asan"):
spack_env.set("LSAN_OPTIONS", "verbosity=1:log_threads=1")
spack_env.set("ASAN_OPTS", "detect_leaks=0")
@@ -48,28 +53,28 @@ class Librsb(AutotoolsPackage):
"--enable-openmp",
"--with-zlib",
"--enable-fortran-module-install",
- "CPPFLAGS={0}".format(self.spec["zlib-api"].headers.include_flags),
- "LDFLAGS={0}".format(self.spec["zlib-api"].libs.search_flags),
+ f"CPPFLAGS={self.spec['zlib-api'].headers.include_flags}",
+ f"LDFLAGS={self.spec['zlib-api'].libs.search_flags}",
]
- if "+asan" in self.spec:
+ if self.spec.satisfies("+asan"):
args.append("CFLAGS=-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer")
args.append("CXXFLAGS=-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer")
args.append("LIBS=-lasan")
args.append("FCLIBS=-lasan")
args.append("--disable-shared")
args.append("--enable-fortran-linker")
- if "+debug" in self.spec:
+ if self.spec.satisfies("+debug"):
args.append("--enable-allocator-wrapper")
args.append("--enable-debug")
- if "+native" in self.spec:
+ if self.spec.satisfies("+native"):
args.append("CFLAGS=-O3 -march=native")
args.append("CXXFLAGS=-O3 -march=native")
args.append("FCFLAGS=-O3 -march=native")
- if "+nospblas" in self.spec:
+ if self.spec.satisfies("+nospblas"):
args.append("--disable-sparse-blas-interface")
- if "+serial" in self.spec:
+ if self.spec.satisfies("+serial"):
args.append("--disable-openmp")
- if "+verbose" in self.spec:
+ if self.spec.satisfies("+verbose"):
args.append("--enable-internals-error-verbosity=1")
args.append("--enable-interface-error-verbosity=1")
return args
diff --git a/var/spack/repos/builtin/packages/librsvg/package.py b/var/spack/repos/builtin/packages/librsvg/package.py
index 93ec2e7146..843d4bd759 100644
--- a/var/spack/repos/builtin/packages/librsvg/package.py
+++ b/var/spack/repos/builtin/packages/librsvg/package.py
@@ -18,9 +18,12 @@ class Librsvg(AutotoolsPackage):
version("2.51.0", sha256="89d32e38445025e1b1d9af3dd9d3aeb9f6fce527aeecbecf38b369b34c80c038")
version("2.50.2", sha256="6211f271ce4cd44a7318190d36712e9cea384a933d3e3570004edeb210a056d3")
version("2.50.0", sha256="b3fadba240f09b9c9898ab20cb7311467243e607cf8f928b7c5f842474ee3df4")
+ version("2.44.17", sha256="91bea64669203c677d5efbe21175aabbadf36754c7e7a1d1dc016dff4425273b")
version("2.44.14", sha256="6a85a7868639cdd4aa064245cc8e9d864dad8b8e9a4a8031bb09a4796bc4e303")
version("2.40.21", sha256="f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba")
+ depends_on("c", type="build") # generated
+
variant("doc", default=False, description="Build documentation with gtk-doc")
depends_on("gobject-introspection", type="build")
@@ -34,9 +37,9 @@ class Librsvg(AutotoolsPackage):
depends_on("gtk-doc", type="build", when="+doc")
# requirements according to `configure` file
- depends_on("cairo@1.16:+gobject", when="@2.50:")
- depends_on("cairo@1.15.12:+gobject", when="@2.44.14:")
- depends_on("cairo@1.2.0:+gobject")
+ depends_on("cairo@1.16:+gobject+png", when="@2.50:")
+ depends_on("cairo@1.15.12:+gobject+png", when="@2.44.14:")
+ depends_on("cairo@1.2.0:+gobject+png")
depends_on("libcroco@0.6.1:", when="@:2.44.14")
depends_on("gdk-pixbuf@2.20:")
depends_on("glib@2.50:", when="@2.50:")
@@ -49,6 +52,7 @@ class Librsvg(AutotoolsPackage):
depends_on("libffi")
depends_on("shared-mime-info")
+ depends_on("py-docutils", type="build")
def url_for_version(self, version):
url = "https://download.gnome.org/sources/librsvg/"
@@ -71,7 +75,7 @@ class Librsvg(AutotoolsPackage):
def configure_args(self):
args = []
- if "+doc" in self.spec:
+ if self.spec.satisfies("+doc"):
args.append("--enable-gtk-doc")
else:
args.extend(
diff --git a/var/spack/repos/builtin/packages/librtlsdr/package.py b/var/spack/repos/builtin/packages/librtlsdr/package.py
index 0eaed4a6d0..5a8258fb40 100644
--- a/var/spack/repos/builtin/packages/librtlsdr/package.py
+++ b/var/spack/repos/builtin/packages/librtlsdr/package.py
@@ -17,4 +17,6 @@ class Librtlsdr(CMakePackage):
version("0.6.0", sha256="80a5155f3505bca8f1b808f8414d7dcd7c459b662a1cde84d3a2629a6e72ae55")
version("0.5.4", sha256="6fd0d298c1a18fc8005b0c2f6199b08bc15e3fb4f4312f551eea2ae269c940c5")
+ depends_on("c", type="build") # generated
+
depends_on("libusb")
diff --git a/var/spack/repos/builtin/packages/librttopo/package.py b/var/spack/repos/builtin/packages/librttopo/package.py
index 082ca655c3..79ef2f6236 100644
--- a/var/spack/repos/builtin/packages/librttopo/package.py
+++ b/var/spack/repos/builtin/packages/librttopo/package.py
@@ -20,6 +20,8 @@ class Librttopo(AutotoolsPackage):
version("1.1.0", sha256="2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f")
+ depends_on("c", type="build") # generated
+
depends_on("geos")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/libsakura/package.py b/var/spack/repos/builtin/packages/libsakura/package.py
index 788327f3fa..42ed11da53 100644
--- a/var/spack/repos/builtin/packages/libsakura/package.py
+++ b/var/spack/repos/builtin/packages/libsakura/package.py
@@ -20,6 +20,9 @@ class Libsakura(CMakePackage):
version("4.0.2065", sha256="3fde3713b1ca539f0b2397ec72a0086a3138ef63f89dce4be51ee60585df995f")
version("3.0.2025", sha256="381a49d57cbc88dea15e08f7ed64ba57481d25bce8e5f68938dd4b6a30589c16")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
depends_on("eigen@3.2:")
diff --git a/var/spack/repos/builtin/packages/libsamplerate/package.py b/var/spack/repos/builtin/packages/libsamplerate/package.py
index 35fc19520b..095f94f80f 100644
--- a/var/spack/repos/builtin/packages/libsamplerate/package.py
+++ b/var/spack/repos/builtin/packages/libsamplerate/package.py
@@ -10,15 +10,26 @@ class Libsamplerate(AutotoolsPackage):
"""libsamplerate (also known as Secret Rabbit Code) is a library for
performing sample rate conversion of audio data."""
- homepage = "http://www.mega-nerd.com/libsamplerate/history.html"
- url = "http://www.mega-nerd.com/libsamplerate/libsamplerate-0.1.9.tar.gz"
+ homepage = "http://libsndfile.github.io/libsamplerate/"
+ url = "https://github.com/libsndfile/libsamplerate/releases/download/0.2.2/libsamplerate-0.2.2.tar.xz"
license("BSD-2-Clause")
+ version("0.2.2", sha256="3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893")
version("0.1.9", sha256="0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1")
version("0.1.8", sha256="93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06")
+ depends_on("c", type="build")
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@2.2:"):
+ return f"https://github.com/libsndfile/libsamplerate/releases/download/{version}/libsamplerate-{version}.tar.xz"
+ elif self.spec.satisfies("@2:2.1"):
+ return f"https://github.com/libsndfile/libsamplerate/releases/download/{version}/libsamplerate-{version}.tar.bz2"
+ else:
+ return f"http://www.mega-nerd.com/libsamplerate/libsamplerate-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/libseccomp/package.py b/var/spack/repos/builtin/packages/libseccomp/package.py
index 8b87dbff48..f5ec6cbefd 100644
--- a/var/spack/repos/builtin/packages/libseccomp/package.py
+++ b/var/spack/repos/builtin/packages/libseccomp/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Libseccomp(AutotoolsPackage):
+class Libseccomp(AutotoolsPackage, PythonExtension):
"""The main libseccomp repository"""
homepage = "https://github.com/seccomp/libseccomp"
@@ -18,13 +18,17 @@ class Libseccomp(AutotoolsPackage):
version("2.5.3", sha256="59065c8733364725e9721ba48c3a99bbc52af921daf48df4b1e012fbc7b10a76")
version("2.3.3", sha256="7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155")
+ depends_on("c", type="build")
+
variant("python", default=True, description="Build Python bindings")
depends_on("gperf", type="build", when="@2.5:")
- depends_on("py-cython", type="build", when="+python")
+
+ with when("+python"):
+ extends("python")
+ depends_on("py-cython", type="build")
+ # https://github.com/seccomp/libseccomp/commit/afbde6ddaec7c58c3b281d43b0b287269ffca9bd
+ depends_on("python@:3.11", type=("run", "link", "build"), when="@:2.5.5")
def configure_args(self):
- args = []
- if "+python" in self.spec:
- args.append("--enable-python")
- return args
+ return self.enable_or_disable("python", variant="python")
diff --git a/var/spack/repos/builtin/packages/libsecret/package.py b/var/spack/repos/builtin/packages/libsecret/package.py
index ba7c8aa265..91c79ed634 100644
--- a/var/spack/repos/builtin/packages/libsecret/package.py
+++ b/var/spack/repos/builtin/packages/libsecret/package.py
@@ -22,6 +22,8 @@ class Libsecret(AutotoolsPackage):
version("0.18.8", sha256="3bfa889d260e0dbabcf5b9967f2aae12edcd2ddc9adc365de7a5cc840c311d15")
+ depends_on("c", type="build") # generated
+
variant("gcrypt", default=True, description="Build with libgcrypt")
variant("gobj", default=False, description="Build with gobject-introspection")
# Optional Vala support is not implemented yet
diff --git a/var/spack/repos/builtin/packages/libsharp/package.py b/var/spack/repos/builtin/packages/libsharp/package.py
index 482439306a..b8c75ab3ba 100644
--- a/var/spack/repos/builtin/packages/libsharp/package.py
+++ b/var/spack/repos/builtin/packages/libsharp/package.py
@@ -23,6 +23,9 @@ class Libsharp(AutotoolsPackage):
version("1.0.0", commit="cc4753ff4b0ef393f0d4ada41a175c6d1dd85d71", preferred=True)
version("2018-01-17", commit="593d4eba67d61827191c32fb94bf235cb31205e1")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("mpi", when="+mpi")
@@ -40,7 +43,7 @@ class Libsharp(AutotoolsPackage):
args.append("--disable-openmp")
if "+mpi" not in self.spec:
args.append("--disable-mpi")
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
args.append("--enable-pic")
return args
diff --git a/var/spack/repos/builtin/packages/libshm/package.py b/var/spack/repos/builtin/packages/libshm/package.py
index 6bbe6cd94e..c55fce1cc6 100644
--- a/var/spack/repos/builtin/packages/libshm/package.py
+++ b/var/spack/repos/builtin/packages/libshm/package.py
@@ -17,5 +17,7 @@ class Libshm(Package):
version("master")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree("include", prefix.include)
diff --git a/var/spack/repos/builtin/packages/libsigcpp/package.py b/var/spack/repos/builtin/packages/libsigcpp/package.py
index 318851ac09..f8e047a285 100644
--- a/var/spack/repos/builtin/packages/libsigcpp/package.py
+++ b/var/spack/repos/builtin/packages/libsigcpp/package.py
@@ -21,6 +21,8 @@ class Libsigcpp(AutotoolsPackage):
version("2.1.1", sha256="7a2bd0b521544b31051c476205a0e74ace53771ec1a939bfec3c297b50c9fd78")
version("2.0.3", sha256="6ee6d5f164d8a34da33d2251cdb348b4f5769bf993ed8a6d4055bd47562f94a2")
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", when="@:2.9", type="build")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/libsignal-protocol-c/package.py b/var/spack/repos/builtin/packages/libsignal-protocol-c/package.py
index 1b3bd1c1b4..da46db5679 100644
--- a/var/spack/repos/builtin/packages/libsignal-protocol-c/package.py
+++ b/var/spack/repos/builtin/packages/libsignal-protocol-c/package.py
@@ -17,3 +17,5 @@ class LibsignalProtocolC(CMakePackage):
license("GPL-3.0-only")
version("2.3.3", sha256="c22e7690546e24d46210ca92dd808f17c3102e1344cd2f9a370136a96d22319d")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess b/var/spack/repos/builtin/packages/libsigsegv/new_config_guess.patch
index 3ecc7458f7..3ecc7458f7 100644
--- a/var/spack/repos/builtin/packages/libsigsegv/patch.new_config_guess
+++ b/var/spack/repos/builtin/packages/libsigsegv/new_config_guess.patch
diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py
index f2dc840891..66e78612fe 100644
--- a/var/spack/repos/builtin/packages/libsigsegv/package.py
+++ b/var/spack/repos/builtin/packages/libsigsegv/package.py
@@ -23,7 +23,9 @@ class Libsigsegv(AutotoolsPackage, GNUMirrorPackage):
version("2.11", sha256="dd7c2eb2ef6c47189406d562c1dc0f96f2fc808036834d596075d58377e37a18")
version("2.10", sha256="8460a4a3dd4954c3d96d7a4f5dd5bc4d9b76f5754196aa245287553b26d2199a")
- patch("patch.new_config_guess", when="@2.10")
+ depends_on("c", type="build") # generated
+
+ patch("new_config_guess.patch", when="@2.10")
def configure_args(self):
return ["--enable-shared"]
@@ -34,7 +36,7 @@ class Libsigsegv(AutotoolsPackage, GNUMirrorPackage):
def setup_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(self.extra_install_tests)
+ cache_extra_test_sources(self, self.extra_install_tests)
def test_smoke_test(self):
"""build and run smoke test"""
diff --git a/var/spack/repos/builtin/packages/libsixel/package.py b/var/spack/repos/builtin/packages/libsixel/package.py
new file mode 100644
index 0000000000..2d73c9fc7d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsixel/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Libsixel(MesonPackage):
+ """
+ This package provides encoder/decoder implementation for DEC SIXEL graphics,
+ and some converter programs like img2sixel.
+ """
+
+ homepage = "https://github.com/libsixel/libsixel"
+ url = "https://github.com/libsixel/libsixel/archive/refs/tags/v1.10.3.tar.gz"
+
+ maintainers("taliaferro")
+
+ version("1.10.3", sha256="028552eb8f2a37c6effda88ee5e8f6d87b5d9601182ddec784a9728865f821e0")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("img2sixel", default=True, description="build binary img2sixel")
+ variant("sixel2png", default=True, description="build binary sixel2png")
+ variant("gd", default=True, description="build with libgd")
+ variant("jpeg", default=False, description="build with libjpeg")
+ variant("png", default=False, description="build with libpng")
+ variant("libcurl", default=False, description="build with libcurl")
+ variant("gdk-pixbuf2", default=False, description="build with gdk-pixbuf2")
+
+ depends_on("curl", when="+libcurl")
+ depends_on("libgd", when="+gd")
+ depends_on("gdk-pixbuf", when="+gdk-pixbuf2")
+ depends_on("libjpeg", when="+jpeg")
+ depends_on("libpng", when="+png")
+
+ def meson_args(self):
+ options = ["img2sixel", "sixel2png", "libcurl", "gdk-pixbuf2"]
+ args = []
+ for option in options:
+ state = "enabled" if "+{}".format(option) in self.spec else "disabled"
+ args.append("-D{option}={state}".format(option=option, state=state))
+ return args
diff --git a/var/spack/repos/builtin/packages/libslirp/package.py b/var/spack/repos/builtin/packages/libslirp/package.py
index cb75c8bcf8..da3dc9c424 100644
--- a/var/spack/repos/builtin/packages/libslirp/package.py
+++ b/var/spack/repos/builtin/packages/libslirp/package.py
@@ -18,5 +18,7 @@ class Libslirp(MesonPackage):
version("4.7.0", sha256="9398f0ec5a581d4e1cd6856b88ae83927e458d643788c3391a39e61b75db3d3b")
version("4.6.1", sha256="69ad4df0123742a29cc783b35de34771ed74d085482470df6313b6abeb799b11")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("glib")
diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py
index d8f75eaffe..103b16aa0a 100644
--- a/var/spack/repos/builtin/packages/libsm/package.py
+++ b/var/spack/repos/builtin/packages/libsm/package.py
@@ -9,19 +9,25 @@ from spack.package import *
class Libsm(AutotoolsPackage, XorgPackage):
"""libSM - X Session Management Library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libSM"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libSM"
xorg_mirror_path = "lib/libSM-1.2.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.2.4", sha256="51464ce1abce323d5b6707ceecf8468617106e1a8a98522f8342db06fd024c15")
version("1.2.3", sha256="1e92408417cb6c6c477a8a6104291001a40b3bb56a4a60608fdd9cd2c5a0f320")
version("1.2.2", sha256="14bb7c669ce2b8ff712fbdbf48120e3742a77edcd5e025d6b3325ed30cf120f4")
+ depends_on("c", type="build")
+
+ depends_on("libice@1.1.0:", when="@1.2.4:")
depends_on("libice@1.0.5:")
depends_on("uuid")
- depends_on("xproto")
- depends_on("xtrans")
+ depends_on("xproto", type="build")
+ depends_on("xtrans", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libsndfile/package.py b/var/spack/repos/builtin/packages/libsndfile/package.py
index 031517c755..a9ba1d2b48 100644
--- a/var/spack/repos/builtin/packages/libsndfile/package.py
+++ b/var/spack/repos/builtin/packages/libsndfile/package.py
@@ -12,12 +12,23 @@ class Libsndfile(AutotoolsPackage):
through one standard library interface. It is released in source code
format under the Gnu Lesser General Public License."""
- homepage = "http://www.mega-nerd.com/libsndfile/"
- url = "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz"
+ homepage = "https://github.com/libsndfile/libsndfile"
+ url = (
+ "https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz"
+ )
license("LGPL-2.1-or-later")
- version("1.0.28", sha256="1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9")
+ version("1.2.2", sha256="3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e")
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-33064
+ version(
+ "1.0.28",
+ sha256="1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("alsa", default=False, description="Use alsa in example programs")
variant(
@@ -29,9 +40,18 @@ class Libsndfile(AutotoolsPackage):
depends_on("alsa-lib", when="+alsa")
depends_on("flac@1.3.1:", when="+external-libs")
depends_on("libogg@1.1.3:", when="+external-libs")
+ depends_on("libogg@1.3.0:", when="@1.0.31: +external-libs")
depends_on("libvorbis@1.2.3:", when="+external-libs")
depends_on("sqlite@3.2:", when="+sqlite")
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.1:"):
+ return f"https://github.com/libsndfile/libsndfile/releases/download/{version}/libsndfile-{version}.tar.xz"
+ elif self.spec.satisfies("@1.0.29:"):
+ return f"https://github.com/libsndfile/libsndfile/releases/download/v{version}/libsndfile-{version}.tar.bz2"
+ else:
+ return f"http://www.mega-nerd.com/libsndfile/files/libsndfile-{version}.tar.gz"
+
def configure_args(self):
args = []
diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py
index b825fc7192..2b29d2db82 100644
--- a/var/spack/repos/builtin/packages/libsodium/package.py
+++ b/var/spack/repos/builtin/packages/libsodium/package.py
@@ -15,11 +15,17 @@ class Libsodium(AutotoolsPackage):
decryption, signatures, password hashing and more."""
homepage = "https://download.libsodium.org/doc/"
- url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.13.tar.gz"
- list_url = "https://download.libsodium.org/libsodium/releases/old"
+ url = "https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz"
+ git = "https://github.com/jedisct1/libsodium.git"
license("ISC")
+ version("master", branch="master")
+ version("stable", branch="stable")
+ version("next", branch="next", deprecated=True)
+
+ version("1.0.20", sha256="ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19")
+ version("1.0.19", sha256="018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea")
version("1.0.18", sha256="6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1")
version("1.0.17", sha256="0cc3dae33e642cc187b5ceb467e0ad0e1b51dcba577de1190e9ffa17766ac2b1")
version("1.0.16", sha256="eeadc7e1e1bcef09680fb4837d448fbdf57224978f865ac1c16745868fbd0533")
@@ -31,13 +37,10 @@ class Libsodium(AutotoolsPackage):
version("1.0.0", sha256="ced1fe3d2066953fea94f307a92f8ae41bf0643739a44309cbe43aa881dbc9a5")
version("0.7.1", sha256="ef46bbb5bac263ef6d3fc00ccc11d4690aea83643412919fe15369b9870280a7")
- def url_for_version(self, version):
- url = "https://download.libsodium.org/libsodium/releases/"
- if version < Version("1.0.16"):
- url += "old/unsupported/"
- elif version < Version("1.0.17"):
- url += "old/"
- return url + "libsodium-{0}.tar.gz".format(version)
+ depends_on("c", type="build")
+
+ # https://github.com/jedisct1/libsodium/issues/1372
+ conflicts("target=aarch64:", when="@1.0.19")
def patch(self):
# Necessary on ppc64le / aarch64, because Spack tries to execute these scripts
diff --git a/var/spack/repos/builtin/packages/libsolv/package.py b/var/spack/repos/builtin/packages/libsolv/package.py
index c75731358e..5852878010 100644
--- a/var/spack/repos/builtin/packages/libsolv/package.py
+++ b/var/spack/repos/builtin/packages/libsolv/package.py
@@ -18,6 +18,9 @@ class Libsolv(CMakePackage):
version("0.7.22", sha256="968aef452b5493751fa0168cd58745a77c755e202a43fe8d549d791eb16034d5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("conda", default=False, description="Include solv/conda.h")
@@ -26,7 +29,7 @@ class Libsolv(CMakePackage):
def cmake_args(self):
return [
- self.define("ENABLE_STATIC", "~shared" in self.spec),
- self.define("DISABLE_DYNAMIC", "~shared" in self.spec),
+ self.define("ENABLE_STATIC", self.spec.satisfies("~shared")),
+ self.define("DISABLE_DYNAMIC", self.spec.satisfies("~shared")),
self.define_from_variant("ENABLE_CONDA", "conda"),
]
diff --git a/var/spack/repos/builtin/packages/libspatialindex/package.py b/var/spack/repos/builtin/packages/libspatialindex/package.py
index 0f59f80bcb..7923e2e0b5 100644
--- a/var/spack/repos/builtin/packages/libspatialindex/package.py
+++ b/var/spack/repos/builtin/packages/libspatialindex/package.py
@@ -17,6 +17,9 @@ class Libspatialindex(CMakePackage):
version("1.9.3", sha256="7b44340a3edc55c11abfc453bb60f148b29f569cef9e1148583e76132e9c7379")
version("1.8.5", sha256="93cce77269612f45287b521d5afdfb245be2b93b8b6438d92f8b9e0bdb37059d")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.5.0:", type="build")
@property
diff --git a/var/spack/repos/builtin/packages/libspatialite/package.py b/var/spack/repos/builtin/packages/libspatialite/package.py
index 1865bb1f7e..b6643e4ade 100644
--- a/var/spack/repos/builtin/packages/libspatialite/package.py
+++ b/var/spack/repos/builtin/packages/libspatialite/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
@@ -14,37 +12,39 @@ class Libspatialite(AutotoolsPackage):
homepage = "https://www.gaia-gis.it"
url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz"
- manual_download = True
license("MPL-1.1")
+ version("5.1.0", sha256="43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080")
version("5.0.1", sha256="eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98")
+ version(
+ "5.0.0-beta0",
+ sha256="caacf5378a5cfab9b8e98bb361e2b592e714e21f5c152b795df80d0ab1da1c42",
+ deprecated=True,
+ )
version("5.0.0", sha256="7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac")
- # Must download manually from:
- # https://www.gaia-gis.it/fossil/libspatialite/info/c7f67038bf06d98d
- # For instructions on the file:// below..
- # https://github.com/spack/spack/issues/2489
version(
- "5.0.0.2.c7f67038bf",
- sha256="f8100f71b769c7db066c6f938af6b00e920e4b90ac14c00a4f3ed7171565caab",
- url="file://%s/SpatiaLite-c7f67038bf.tar.gz" % os.getcwd(),
+ "4.3.0a",
+ sha256="88900030a4762904a7880273f292e5e8ca6b15b7c6c3fb88ffa9e67ee8a5a499",
+ deprecated=True,
)
-
version(
- "5.0.0-beta0", sha256="caacf5378a5cfab9b8e98bb361e2b592e714e21f5c152b795df80d0ab1da1c42"
+ "3.0.1",
+ sha256="4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6",
+ deprecated=True,
)
- version("4.3.0a", sha256="88900030a4762904a7880273f292e5e8ca6b15b7c6c3fb88ffa9e67ee8a5a499")
- version("3.0.1", sha256="4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6")
+
+ depends_on("c", type="build") # generated
depends_on("pkgconfig", type="build")
- depends_on("sqlite+rtree")
- depends_on("proj@:5", when="@:4")
- # PROJ.6 is OK w/ newer versions
- # https://www.gaia-gis.it/fossil/libspatialite/wiki?name=PROJ.6
- depends_on("proj")
- depends_on("geos")
depends_on("freexl")
+ depends_on("freexl@2:", when="@5.1:")
+ depends_on("geos")
+ depends_on("geos@:3.9", when="@:5.0.0")
depends_on("iconv")
+ depends_on("librttopo", when="@5.0.1:")
depends_on("libxml2")
depends_on("minizip", when="@5.0.0:")
- depends_on("librttopo", when="@5.0.1:")
+ depends_on("proj")
+ depends_on("proj@:5", when="@:4")
+ depends_on("sqlite+rtree")
diff --git a/var/spack/repos/builtin/packages/libspiro/package.py b/var/spack/repos/builtin/packages/libspiro/package.py
index 99dc733c5e..119839ab54 100644
--- a/var/spack/repos/builtin/packages/libspiro/package.py
+++ b/var/spack/repos/builtin/packages/libspiro/package.py
@@ -19,6 +19,8 @@ class Libspiro(AutotoolsPackage):
version("20200505", sha256="00be530b5c0ea9274baadf6c05521f0b192d4c3c1db636ac8b08efd44aaea8f5")
version("20190731", sha256="24c7d1ccc7c7fe44ff10c376aa9f96e20e505f417ee72b63dc91a9b34eeac354")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py
index b431a80f35..3ece876675 100644
--- a/var/spack/repos/builtin/packages/libsplash/package.py
+++ b/var/spack/repos/builtin/packages/libsplash/package.py
@@ -31,6 +31,8 @@ class Libsplash(CMakePackage):
version("1.3.1", sha256="6ad04261e6d377a59b209f345af56405b37830f0dcfac28770b63091bff59383")
version("1.2.4", sha256="f5c4f792fee5609ede6a7d2fee5fa5799d3b68e8cdc23001a3aba390394d2f36")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable parallel I/O (one-file aggregation) support")
depends_on("cmake@3.10.0:", type="build", when="@1.7.0:")
diff --git a/var/spack/repos/builtin/packages/libspng/package.py b/var/spack/repos/builtin/packages/libspng/package.py
index e227ec8869..b22165f58f 100644
--- a/var/spack/repos/builtin/packages/libspng/package.py
+++ b/var/spack/repos/builtin/packages/libspng/package.py
@@ -14,6 +14,19 @@ class Libspng(CMakePackage):
homepage = "https://github.com/randy408/libspng"
url = "https://github.com/randy408/libspng/archive/refs/tags/v0.7.2.tar.gz"
+ maintainers("sethrj")
+
license("BSD-2-Clause")
+ version("0.7.4", sha256="47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487")
version("0.7.2", sha256="4acf25571d31f540d0b7ee004f5461d68158e0a13182505376805da99f4ccc4e")
+
+ depends_on("c", type="build")
+ depends_on("zlib")
+
+ def cmake_args(self):
+ target = self.spec.target
+ return [
+ self.define("BUILD_EXAMPLES", False),
+ self.define("ENABLE_OPT", target.vendor != "generic"),
+ ]
diff --git a/var/spack/repos/builtin/packages/libssh/package.py b/var/spack/repos/builtin/packages/libssh/package.py
index 8bd652d384..5371b0c99d 100644
--- a/var/spack/repos/builtin/packages/libssh/package.py
+++ b/var/spack/repos/builtin/packages/libssh/package.py
@@ -11,11 +11,19 @@ class Libssh(CMakePackage):
homepage = "https://www.libssh.org"
url = "https://www.libssh.org/files/0.8/libssh-0.8.5.tar.xz"
+ list_url = "https://www.libssh.org/files"
+ list_depth = 1
+ version("0.11.0", sha256="860e814579e7606f3fc3db98c5807bef2ab60f793ec871d81bcd23acdcdd3e91")
+ version("0.10.6", sha256="1861d498f5b6f1741b6abc73e608478491edcf9c9d4b6630eef6e74596de9dc1")
+ version("0.9.8", sha256="9f834b732341d428d67bbe835b7d10ae97ccf25d6f5bd0288fa51ae683f2e7cd")
version("0.8.9", sha256="8559e19da0c40b6f93482b6160219ad77a4d9f1dc190bf174757455c6ae26825")
version("0.8.5", sha256="07d2c431240fc88f6b06bcb36ae267f9afeedce2e32f6c42f8844b205ab5a335")
version("0.7.5", sha256="54e86dd5dc20e5367e58f3caab337ce37675f863f80df85b6b1614966a337095")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("gssapi", default=True, description="Build with gssapi support")
depends_on("openssl@:1.0", when="@:0.7")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/libssh2/package.py b/var/spack/repos/builtin/packages/libssh2/package.py
index 3a66e97f18..8b1b425a71 100644
--- a/var/spack/repos/builtin/packages/libssh2/package.py
+++ b/var/spack/repos/builtin/packages/libssh2/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
@@ -14,6 +16,7 @@ class Libssh2(AutotoolsPackage, CMakePackage):
license("BSD-3-Clause")
+ version("1.11.1", sha256="d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7")
version("1.11.0", sha256="3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461")
version("1.10.0", sha256="2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51")
version("1.9.0", sha256="d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd")
@@ -23,6 +26,8 @@ class Libssh2(AutotoolsPackage, CMakePackage):
"1.4.3", sha256="eac6f85f9df9db2e6386906a6227eb2cd7b3245739561cad7d6dc1d5d021b96d"
) # CentOS7
+ depends_on("c", type="build")
+
build_system("autotools", "cmake", default="autotools")
variant(
@@ -50,7 +55,7 @@ class Libssh2(AutotoolsPackage, CMakePackage):
# and fails to prepend the -L flags, which is causing issues in libgit2, as
# it tries to locate e.g. libssl in the dirs of the pc file's -L flags, and
# cannot find the lib.
- patch("pr-1114.patch", when="@1.7:")
+ patch("pr-1114.patch", when="@1.7:1.11.0")
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
@@ -74,14 +79,27 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
- args = ["--disable-tests", "--disable-docker-tests", "--disable-examples-build"]
- args += self.enable_or_disable("shared")
+ args = [
+ "--disable-tests",
+ "--disable-docker-tests",
+ "--disable-examples-build",
+ "--without-libgcrypt",
+ "--without-wincng",
+ *self.enable_or_disable("shared"),
+ ]
crypto = self.spec.variants["crypto"].value
- if crypto == "openssl":
- args.append(f"--with-libssl-prefix={self.spec['openssl'].prefix}")
- elif crypto == "mbedtls":
- args.append(f"--with-libmbedcrypto-prefix={self.spec['mbedtls'].prefix}")
+ if self.spec.satisfies("@1.9:"):
+ # single flag for all crypto backends
+ args.append(f"--with-crypto={crypto}")
+ else:
+ # one flag per crypto backend
+ if crypto == "openssl":
+ args.append(f"--with-libssl-prefix={self.spec['openssl'].prefix}")
+ args.append("--without-mbedtls")
+ elif crypto == "mbedtls":
+ args.append(f"--with-libmbedcrypto-prefix={self.spec['mbedtls'].prefix}")
+ args.append("--without-openssl")
return args
diff --git a/var/spack/repos/builtin/packages/libstdcompat/package.py b/var/spack/repos/builtin/packages/libstdcompat/package.py
index 279cd3367a..3a5321fb4c 100644
--- a/var/spack/repos/builtin/packages/libstdcompat/package.py
+++ b/var/spack/repos/builtin/packages/libstdcompat/package.py
@@ -16,6 +16,9 @@ class Libstdcompat(CMakePackage):
maintainers("robertu94")
version("master", branch="master")
+ version("0.0.21", sha256="67cfd57080a74752b4c239e031cc44734286589a89bb1cd51a8bd7039f87a3f3")
+ version("0.0.20", sha256="9fdc632eb135f57132953b512d8f9101e8eb4e6a88e6c3b838aaa9c51a2dbfd6")
+ version("0.0.19", sha256="584ee52b1f82671e5d8fde786c46aa7e98d30104674c6f4b75dbae8d83b13f21")
version("0.0.17", sha256="8c8a3f2727dd28c51ab10e02a1114e39b683d6d9ea119d5c2a953f8c41d6bedd")
version("0.0.16", sha256="1287251b694adb80210536ab6eb75c1ff2c4ed8b77023208a757ae27c9dae0bb")
version("0.0.15", sha256="af374a8883a32d874f6cd18cce4e4344e32f9d60754be403a5ac7114feca2a28")
@@ -34,9 +37,11 @@ class Libstdcompat(CMakePackage):
version("0.0.2", sha256="36424399e649be38bdb21899aa45f94aebba25c66048bab2751b1b3b9fd27238")
version("0.0.1", sha256="3d63e901f4e20b9032a67086f4b4281f641ee0dea436cf15f7058faa40d8637b")
+ depends_on("cxx", type="build") # generated
+
variant(
"cpp_compat",
- values=("11", "14", "17", "20", "auto"),
+ values=("11", "14", "17", "20", "23", "auto"),
default="auto",
multi=False,
description="version of the c++ standard to use and depend on",
@@ -57,6 +62,17 @@ class Libstdcompat(CMakePackage):
conflicts("cpp_compat=20", when="@:0.0.7")
def max_cxx_version(self):
+ if self.spec.version >= Version("0.0.20"):
+ try:
+ self.compiler.cxx23_flag
+ return "23"
+ except Exception:
+ pass
+ try:
+ self.compiler.cxx20_flag
+ return "20"
+ except Exception:
+ pass
try:
self.compiler.cxx17_flag
return "17"
@@ -74,7 +90,7 @@ class Libstdcompat(CMakePackage):
args = []
cpp_compat = self.spec.variants["cpp_compat"].value
- if "cpp_unstable" in self.spec:
+ if self.spec.satisfies("+cpp_unstable"):
args.append("-DSTDCOMPAT_CXX_UNSTABLE=ON")
if cpp_compat == "auto":
@@ -93,8 +109,3 @@ class Libstdcompat(CMakePackage):
else:
args.append("-DBUILD_TESTING=OFF")
return args
-
- @run_after("build")
- @on_package_attributes(run_tests=True)
- def test(self):
- make("test")
diff --git a/var/spack/repos/builtin/packages/libsvm/package.py b/var/spack/repos/builtin/packages/libsvm/package.py
index 8d1089337f..bc3506f206 100644
--- a/var/spack/repos/builtin/packages/libsvm/package.py
+++ b/var/spack/repos/builtin/packages/libsvm/package.py
@@ -18,6 +18,9 @@ class Libsvm(MakefilePackage):
version("323", sha256="7a466f90f327a98f8ed1cb217570547bcb00077933d1619f3cb9e73518f38196")
version("322", sha256="a3469436f795bb3f8b1e65ea761e14e5599ec7ee941c001d771c07b7da318ac6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
mkdirp(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/libszip/package.py b/var/spack/repos/builtin/packages/libszip/package.py
index 2aa2974fc4..2314879927 100644
--- a/var/spack/repos/builtin/packages/libszip/package.py
+++ b/var/spack/repos/builtin/packages/libszip/package.py
@@ -24,6 +24,8 @@ class Libszip(AutotoolsPackage):
version("2.1.1", sha256="21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412")
version("2.1", sha256="a816d95d5662e8279625abdbea7d0e62157d7d1f028020b1075500bf483ed5ef")
+ depends_on("c", type="build") # generated
+
@property
def libs(self):
shared = "static" not in self.spec.last_query.extra_parameters
@@ -32,7 +34,7 @@ class Libszip(AutotoolsPackage):
if not libs:
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
return libs
diff --git a/var/spack/repos/builtin/packages/libtar/package.py b/var/spack/repos/builtin/packages/libtar/package.py
index bf5757ab72..ada56da6ac 100644
--- a/var/spack/repos/builtin/packages/libtar/package.py
+++ b/var/spack/repos/builtin/packages/libtar/package.py
@@ -17,6 +17,8 @@ class Libtar(AutotoolsPackage):
version("1.2.19", sha256="5fea7152106b1b8cda109da27f505439865dd196da94f503fab18264591ddf64")
version("1.2.18", sha256="a5ac82dae9677b5b74333ed63043b9699c7ef561e2eacf301188c277952d4b7d")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libtasn1/package.py b/var/spack/repos/builtin/packages/libtasn1/package.py
index 07abb9199d..3d7719b11f 100644
--- a/var/spack/repos/builtin/packages/libtasn1/package.py
+++ b/var/spack/repos/builtin/packages/libtasn1/package.py
@@ -29,6 +29,8 @@ class Libtasn1(Package):
version("4.1", sha256="60ee6571dcfa00cf55406404912274d6dc759cbaa80d666b89d819feeff5f301")
version("4.0", sha256="41d044f7644bdd1c4f8a5c15ac1885ca1fcbf32f5f6dd4760a19278b979857fe")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
configure(
"--disable-dependency-tracking",
diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py
index 817438a516..253826b620 100644
--- a/var/spack/repos/builtin/packages/libtermkey/package.py
+++ b/var/spack/repos/builtin/packages/libtermkey/package.py
@@ -21,6 +21,8 @@ class Libtermkey(MakefilePackage):
version("0.15b", sha256="6825422c6297e4f81b2c48962b4512585ca8a50bf31f24b3234a1be71a9d7a6e")
version("0.14", sha256="3d114d4509499b80a583ea39cd35f18268aacf4a7bbf56c142cd032632005c79")
+ depends_on("c", type="build") # generated
+
depends_on("gzip", type="build")
depends_on("libtool", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/libthai/package.py b/var/spack/repos/builtin/packages/libthai/package.py
index 5ae2db3dbd..ff0233a466 100644
--- a/var/spack/repos/builtin/packages/libthai/package.py
+++ b/var/spack/repos/builtin/packages/libthai/package.py
@@ -22,5 +22,7 @@ class Libthai(AutotoolsPackage):
version("0.1.28", sha256="ffe0a17b4b5aa11b153c15986800eca19f6c93a4025ffa5cf2cab2dcdf1ae911")
version("0.1.27", sha256="1659fa1b7b1d6562102d7feb8c8c3fd94bb2dc5761ed7dbaae4f300e1c03eff6")
+ depends_on("c", type="build") # generated
+
depends_on("libdatrie")
depends_on("doxygen@1.8.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py
index f12f67c460..b3da2e7103 100644
--- a/var/spack/repos/builtin/packages/libtheora/package.py
+++ b/var/spack/repos/builtin/packages/libtheora/package.py
@@ -16,7 +16,7 @@ class Libtheora(AutotoolsPackage, MSBuildPackage):
"""Theora Video Compression."""
homepage = "https://www.theora.org"
- url = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz"
+ url = "https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz"
git = "https://gitlab.xiph.org/xiph/theora.git"
license("BSD-3-Clause")
@@ -26,6 +26,8 @@ class Libtheora(AutotoolsPackage, MSBuildPackage):
version("1.1.1", sha256="f36da409947aa2b3dcc6af0a8c2e3144bc19db2ed547d64e9171c59c66561c61")
version("1.1.0", sha256="3d7b4fb1c115f1a530afd430eed2e8861fa57c8b179ec2d5a5d8f1cd0c7a4268")
+ depends_on("c", type="build") # generated
+
variant("doc", default=False, description="Build documentation")
depends_on("doxygen", when="+doc", type="build")
@@ -76,12 +78,6 @@ class AutotoolsBuilder(AutotoolsBuilder):
args += ["LIBS=-lm"]
return args
- def autoreconf(self, pkg, spec, prefix):
- sh = which("sh")
- # arguments are passed on to configure, let it just print its version
- # and exit, so that configure can run in the configure build phase
- sh("./autogen.sh", "-V")
-
class MSBuildBuilder(MSBuildBuilder):
def is_64bit(self):
diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py
index 8bd59a30f6..f1f337bbcf 100644
--- a/var/spack/repos/builtin/packages/libtiff/package.py
+++ b/var/spack/repos/builtin/packages/libtiff/package.py
@@ -40,20 +40,37 @@ class Libtiff(CMakePackage, AutotoolsPackage):
license("libtiff")
- version("4.5.1", sha256="d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b")
- version("4.5.0", sha256="c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464")
- version("4.4.0", sha256="917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed")
- version("4.3.0", sha256="0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8")
- version("4.2.0", sha256="eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb")
- version("4.1.0", sha256="5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634")
- version("4.0.10", sha256="2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4")
- version("4.0.9", sha256="6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd")
- version("4.0.8", sha256="59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910")
- version("4.0.7", sha256="9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019")
- version("4.0.6", sha256="4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c")
- version("4.0.5", sha256="e25eaa83ed7fab43ddd278b9b14d91a406a4b674cedc776adb95535f897f309c")
- version("4.0.4", sha256="8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890")
- version("3.9.7", sha256="f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a")
+ version("4.7.0", sha256="67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-7006
+ version("4.6.0", sha256="88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a")
+ version("4.5.1", sha256="d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b")
+ version("4.5.0", sha256="c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464")
+ version("4.4.0", sha256="917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed")
+ version("4.3.0", sha256="0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8")
+ version("4.2.0", sha256="eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb")
+ version("4.1.0", sha256="5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634")
+ version(
+ "4.0.10", sha256="2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4"
+ )
+ version("4.0.9", sha256="6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd")
+ version("4.0.8", sha256="59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910")
+ version("4.0.7", sha256="9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019")
+ version("4.0.6", sha256="4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c")
+ version("4.0.5", sha256="e25eaa83ed7fab43ddd278b9b14d91a406a4b674cedc776adb95535f897f309c")
+ version("4.0.4", sha256="8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890")
+ version("3.9.7", sha256="f5d64dd4ce61c55f5e9f6dc3920fbe5a41e02c2e607da7117a35eb5c320cef6a")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ # GUI
+ variant(
+ "opengl",
+ default=False,
+ description="use OpenGL (required for tiffgt viewer)",
+ when="@4.5,4.7:",
+ )
# Internal codecs
variant("ccitt", default=True, description="support for CCITT Group 3 & 4 algorithms")
@@ -118,6 +135,7 @@ class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
args = [self.define_from_variant(var) for var in VARIANTS]
args.append("-Dsphinx=OFF")
+ args += [self.define_from_variant("tiff-opengl", "opengl")]
args += [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
args += [self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")]
@@ -135,6 +153,7 @@ class AutotoolsBuilder(AutotoolsBuilder):
args.append("--disable-sphinx")
+ args.extend(self.enable_or_disable("opengl"))
args.extend(self.enable_or_disable("shared"))
args.extend(self.with_or_without("pic"))
diff --git a/var/spack/repos/builtin/packages/libtirpc/package.py b/var/spack/repos/builtin/packages/libtirpc/package.py
index e2f3b307dc..f401636a80 100644
--- a/var/spack/repos/builtin/packages/libtirpc/package.py
+++ b/var/spack/repos/builtin/packages/libtirpc/package.py
@@ -18,6 +18,8 @@ class Libtirpc(AutotoolsPackage):
version("1.2.6", sha256="4278e9a5181d5af9cd7885322fdecebc444f9a3da87c526e7d47f7a12a37d1cc")
version("1.1.4", sha256="2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d")
+ depends_on("c", type="build") # generated
+
depends_on("krb5")
provides("rpc")
diff --git a/var/spack/repos/builtin/packages/libtlx/package.py b/var/spack/repos/builtin/packages/libtlx/package.py
index 8c852a11c2..5a4e64f6c2 100644
--- a/var/spack/repos/builtin/packages/libtlx/package.py
+++ b/var/spack/repos/builtin/packages/libtlx/package.py
@@ -34,3 +34,5 @@ class Libtlx(CMakePackage):
version(
"0.5.20191212", sha256="5e67d3042a390dbb831b6d46437e3c7fadf738bff362aa7376b210b10ecd532d"
)
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libtomlc99/package.py b/var/spack/repos/builtin/packages/libtomlc99/package.py
index c1cef890bd..5f3ed20bc7 100644
--- a/var/spack/repos/builtin/packages/libtomlc99/package.py
+++ b/var/spack/repos/builtin/packages/libtomlc99/package.py
@@ -28,6 +28,8 @@ class Libtomlc99(Package):
# Does not build shared libraries.
version("0.2019.03.06", commit="bd76f1276ee5f5df0eb064f1842af5ad1737cf1e")
+ depends_on("c", type="build") # generated
+
variant("debug", default=False, description="Build with debug enabled.")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libtommath/package.py b/var/spack/repos/builtin/packages/libtommath/package.py
index 8eb61d9d91..0eb2dae299 100644
--- a/var/spack/repos/builtin/packages/libtommath/package.py
+++ b/var/spack/repos/builtin/packages/libtommath/package.py
@@ -14,8 +14,12 @@ class Libtommath(MakefilePackage):
license("Unlicense")
+ version("1.3.0", sha256="6d099e93ff00fa9b18346f4bcd97dcc48c3e91286f7e16c4ac5515a7171c3149")
+ version("1.2.1", sha256="068adaf5155d28d4ac976eb95ea0df1ecb362f20d777287154c22a24fdb35faa")
version("1.2.0", sha256="f3c20ab5df600d8d89e054d096c116417197827d12732e678525667aa724e30f")
version("1.1.0", sha256="71b6f3f99341b7693393ab4b58f03b79b6afc2ee5288666cc4538b4b336355f4")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
- make("DESTDIR={0}".format(prefix), "LIBPATH=/lib", "INCPATH=/include", "install")
+ make(f"DESTDIR={prefix}", "LIBPATH=/lib", "INCPATH=/include", "install")
diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py
index 6e164dbcbd..1547aa6764 100644
--- a/var/spack/repos/builtin/packages/libtool/package.py
+++ b/var/spack/repos/builtin/packages/libtool/package.py
@@ -32,8 +32,16 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("m4@1.4.6:", type="build")
+ # the following are places in which libtool depends on findutils
+ # https://github.com/autotools-mirror/libtool/blob/v2.4.7/build-aux/ltmain.in#L3296
+ # https://github.com/autotools-mirror/libtool/blob/v2.4.6/build-aux/ltmain.in#L3278
+ # https://github.com/autotools-mirror/libtool/blob/v2.4.2/libltdl/config/ltmain.m4sh#L3028
+ depends_on("findutils", type="run")
+
with when("@2.4.2"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/libtorrent/package.py b/var/spack/repos/builtin/packages/libtorrent/package.py
index 900cdf59c6..4160c7febb 100644
--- a/var/spack/repos/builtin/packages/libtorrent/package.py
+++ b/var/spack/repos/builtin/packages/libtorrent/package.py
@@ -17,6 +17,8 @@ class Libtorrent(AutotoolsPackage):
version("0.13.8", sha256="0f6c2e7ffd3a1723ab47fdac785ec40f85c0a5b5a42c1d002272205b988be722")
+ depends_on("cxx", type="build") # generated
+
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./autogen.sh")
diff --git a/var/spack/repos/builtin/packages/libtraceevent/package.py b/var/spack/repos/builtin/packages/libtraceevent/package.py
new file mode 100644
index 0000000000..1948a40f62
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libtraceevent/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libtraceevent(MakefilePackage):
+ """Library to parse raw trace event formats."""
+
+ homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git"
+ url = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-1.8.2.tar.gz"
+ git = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git"
+
+ maintainers("Jordan474")
+
+ license("LGPL-2.1-or-later AND GPL-2.0-or-later")
+
+ version("1.8.2", sha256="919f0c024c7b5059eace52d854d4df00ae7e361a4033e1b4d6fe01d97064a1b9")
+
+ variant("doc", default=False, description="Build documentation")
+
+ depends_on("c", type="build")
+ depends_on("asciidoc", when="+doc", type="build")
+ depends_on("xmlto", when="+doc", type="build")
+
+ def patch(self):
+ set_executable("Documentation/install-docs.sh.in")
+
+ @property
+ def common_targets(self):
+ return [
+ "prefix=" + self.prefix,
+ "pkgconfig_dir=" + join_path(self.prefix.lib, "pkgconfig"),
+ ]
+
+ @property
+ def build_targets(self):
+ result = self.common_targets + ["all"]
+ if self.spec.satisfies("+doc"):
+ result.append("doc")
+ return result
+
+ @property
+ def install_targets(self):
+ result = self.common_targets + ["install"]
+ if self.spec.satisfies("+doc"):
+ result.append("doc-install")
+ return result
diff --git a/var/spack/repos/builtin/packages/libtree/package.py b/var/spack/repos/builtin/packages/libtree/package.py
index 85eff7b2c8..3e956cec52 100644
--- a/var/spack/repos/builtin/packages/libtree/package.py
+++ b/var/spack/repos/builtin/packages/libtree/package.py
@@ -38,6 +38,8 @@ class Libtree(MakefilePackage, CMakePackage):
version("1.0.4", sha256="b15a54b6f388b8bd8636e288fcb581029f1e65353660387b0096a554ad8e9e45")
version("1.0.3", sha256="67ce886c191d50959a5727246cdb04af38872cd811c9ed4e3822f77a8f40b20b")
+ depends_on("c", type="build") # generated
+
build_system(
conditional("cmake", when="@:2"), conditional("makefile", when="@3:"), default="makefile"
)
diff --git a/var/spack/repos/builtin/packages/libuecc/package.py b/var/spack/repos/builtin/packages/libuecc/package.py
index 8f916905ba..8191b3bba0 100644
--- a/var/spack/repos/builtin/packages/libuecc/package.py
+++ b/var/spack/repos/builtin/packages/libuecc/package.py
@@ -17,3 +17,5 @@ class Libuecc(CMakePackage):
version("7", sha256="465a6584c991c13fddf36700328c44fee9a3baff9025fb5f232b34d003d715e0")
version("6", sha256="ad813abd91462a6b10608e51862a65998649651b22ab5d82f920622cc93befd7")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/libunistring/package.py b/var/spack/repos/builtin/packages/libunistring/package.py
index f9091adffc..86155050fc 100644
--- a/var/spack/repos/builtin/packages/libunistring/package.py
+++ b/var/spack/repos/builtin/packages/libunistring/package.py
@@ -18,6 +18,7 @@ class Libunistring(AutotoolsPackage, GNUMirrorPackage):
license("GPL-2.0-or-later OR LGPL-3.0-or-later")
version("master", branch="master")
+ version("1.2", sha256="632bd65ed74a881ca8a0309a1001c428bd1cbd5cd7ddbf8cedcd2e65f4dcdc44")
version("1.1", sha256="827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98")
version("1.0", sha256="5bab55b49f75d77ed26b257997e919b693f29fd4a1bc22e0e6e024c246c72741")
version("0.9.10", sha256="eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7")
@@ -26,6 +27,8 @@ class Libunistring(AutotoolsPackage, GNUMirrorPackage):
version("0.9.7", sha256="2e3764512aaf2ce598af5a38818c0ea23dedf1ff5460070d1b6cee5c3336e797")
version("0.9.6", sha256="2df42eae46743e3f91201bf5c100041540a7704e8b9abfd57c972b2d544de41b")
+ depends_on("c", type="build") # generated
+
depends_on("iconv")
with when("@master"):
depends_on("autoconf", type="build")
@@ -43,6 +46,11 @@ class Libunistring(AutotoolsPackage, GNUMirrorPackage):
# https://bugs.gentoo.org/688464#c9 (this links to all further info)
filter_file("# pragma weak pthread_create", "", "tests/glthread/thread.h")
+ def flag_handler(self, name, flags):
+ if name == "cflags" and self.spec.satisfies("@1.1:") and self.spec.satisfies("%intel"):
+ flags.append(self.compiler.c18_flag)
+ return (flags, None, None)
+
@when("@master")
def autoreconf(self, spec, prefix):
which("./gitsub.sh")("pull")
diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py
index c389cbda7b..9f6df14fd6 100644
--- a/var/spack/repos/builtin/packages/libunwind/package.py
+++ b/var/spack/repos/builtin/packages/libunwind/package.py
@@ -11,25 +11,26 @@ class Libunwind(AutotoolsPackage):
the call-chain of a program."""
homepage = "https://www.nongnu.org/libunwind/"
- url = "http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz"
+ url = "https://github.com/libunwind/libunwind/releases/download/v0.0.0/libunwind-0.0.0.tar.gz"
git = "https://github.com/libunwind/libunwind"
maintainers("mwkrentel")
license("MIT")
version("master", branch="master")
+ version("1.8-stable", branch="v1.8-stable")
+ version("1.8.1", sha256="ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157")
+ version("1.7-stable", branch="v1.7-stable")
+ version("1.7.2", sha256="a18a6a24307443a8ace7a8acc2ce79fbbe6826cd0edf98d6326d0225d6a5d6e6")
version("1.6-stable", branch="v1.6-stable")
version("1.6.2", sha256="4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976")
- version("1.5-stable", branch="v1.5-stable")
version("1.5.0", sha256="90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017")
version("1.4.0", sha256="df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435")
version("1.3.1", sha256="43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8")
version("1.2.1", sha256="3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb")
- version(
- "1.1",
- sha256="9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a",
- deprecated=True,
- )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("docs", default=True, description="Build man page")
variant(
@@ -80,7 +81,7 @@ class Libunwind(AutotoolsPackage):
# The libunwind releases contain the autotools generated files,
# but the git repo snapshots do not.
- reconf_versions = "@master,1.5-stable,1.6-stable"
+ reconf_versions = "@master,1.6-stable,1.7-stable,1.8-stable"
depends_on("autoconf", type="build", when=reconf_versions)
depends_on("automake", type="build", when=reconf_versions)
depends_on("libtool", type="build", when=reconf_versions)
@@ -91,8 +92,21 @@ class Libunwind(AutotoolsPackage):
conflicts("platform=darwin", msg="Non-GNU libunwind needs ELF libraries Darwin does not have")
+ # Introduced in https://github.com/libunwind/libunwind/pull/555, fixed in
+ # https://github.com/libunwind/libunwind/pull/723
+ conflicts("target=ppc64:", when="@1.8")
+ conflicts("target=ppc64le:", when="@1.8")
+
+ conflicts("target=aarch64:", when="@1.8:")
+
provides("unwind")
+ def url_for_version(self, version):
+ if version == Version("1.5.0"):
+ return f"https://github.com/libunwind/libunwind/releases/download/v{version.up_to(2)}/libunwind-{version}.tar.gz"
+ else:
+ return super().url_for_version(version)
+
def flag_handler(self, name, flags):
wrapper_flags = []
@@ -105,7 +119,7 @@ class Libunwind(AutotoolsPackage):
):
wrapper_flags.append("-fcommon")
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
wrapper_flags.append(self.compiler.cc_pic_flag)
return (wrapper_flags, None, flags)
diff --git a/var/spack/repos/builtin/packages/liburcu/package.py b/var/spack/repos/builtin/packages/liburcu/package.py
new file mode 100644
index 0000000000..31206595f3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/liburcu/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Liburcu(AutotoolsPackage):
+ """liburcu is a LGPLv2.1 userspace RCU (read-copy-update) library.
+ This data synchronization library provides read-side access which
+ scales linearly with the number of cores."""
+
+ homepage = "https://liburcu.org"
+ url = "https://lttng.org/files/urcu/userspace-rcu-0.14.0.tar.bz2"
+ git = "https://git.lttng.org/userspace-rcu.git"
+
+ license("LGPL-2.1", checked_by="wdconinc")
+
+ version("0.14.0", sha256="ca43bf261d4d392cff20dfae440836603bf009fce24fdc9b2697d837a2239d4f")
+
+ depends_on("autoconf@2.69:", type="build")
+ depends_on("automake@1.12:", type="build")
+
+ def patch(self):
+ filter_file("-Wl,-rpath ", "-Wl,-rpath,", "doc/examples/Makefile.in")
diff --git a/var/spack/repos/builtin/packages/liburing/package.py b/var/spack/repos/builtin/packages/liburing/package.py
index 7e2d433a6f..24b53ae1a8 100644
--- a/var/spack/repos/builtin/packages/liburing/package.py
+++ b/var/spack/repos/builtin/packages/liburing/package.py
@@ -22,5 +22,8 @@ class Liburing(AutotoolsPackage):
version("master", branch="master")
version("2.3", sha256="60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8")
- conflicts("platform=darwin", msg="Only supported on 'linux' and 'cray'")
- conflicts("platform=windows", msg="Only supported on 'linux' and 'cray'")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ conflicts("platform=darwin", msg="Only supported on linux")
+ conflicts("platform=windows", msg="Only supported on linux")
diff --git a/var/spack/repos/builtin/packages/libusb/package.py b/var/spack/repos/builtin/packages/libusb/package.py
index f51e969016..9fdc454afc 100644
--- a/var/spack/repos/builtin/packages/libusb/package.py
+++ b/var/spack/repos/builtin/packages/libusb/package.py
@@ -11,16 +11,24 @@ class Libusb(AutotoolsPackage):
"""Library for USB device access."""
homepage = "https://libusb.info/"
- url = "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2"
+ url = "https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2"
git = "https://github.com/libusb/libusb"
license("LGPL-2.1-or-later")
version("master", branch="master")
+ version("1.0.27", sha256="ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575")
+ version("1.0.26", sha256="12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5")
+ version("1.0.25", sha256="8a28ef197a797ebac2702f095e81975e2b02b2eeff2774fa909c78a74ef50849")
+ version("1.0.24", sha256="7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a")
+ version("1.0.23", sha256="db11c06e958a82dac52cf3c65cb4dd2c3f339c8a988665110e0d24d19312ad8d")
version("1.0.22", sha256="75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157")
version("1.0.21", sha256="7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b")
version("1.0.20", sha256="cb057190ba0a961768224e4dc6883104c6f945b2bf2ef90d7da39e7c1834f7ff")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("libtool", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/libuser/package.py b/var/spack/repos/builtin/packages/libuser/package.py
index 5edc7db485..f8bc34807a 100644
--- a/var/spack/repos/builtin/packages/libuser/package.py
+++ b/var/spack/repos/builtin/packages/libuser/package.py
@@ -18,6 +18,8 @@ class Libuser(AutotoolsPackage):
version("0.61", sha256="0a114a52446e12781e2ffdf26f59df0d14e7809c7db5e551d3cf61c4e398751d")
version("0.60", sha256="b1f73408ebfee79eb01a47c5879a2cdef6a00b75ee24870de7df1b816ff483eb")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("linux-pam")
depends_on("popt")
diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py
index 6fa16449cc..1a0a2ebfcd 100644
--- a/var/spack/repos/builtin/packages/libuuid/package.py
+++ b/var/spack/repos/builtin/packages/libuuid/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -12,6 +14,15 @@ class Libuuid(AutotoolsPackage, SourceforgePackage):
homepage = "https://sourceforge.net/projects/libuuid/"
sourceforge_mirror_path = "libuuid/libuuid-1.0.3.tar.gz"
- version("1.0.3", sha256="46af3275291091009ad7f1b899de3d0cea0252737550e7919d17237997db5644")
+ version(
+ "1.0.3",
+ sha256="46af3275291091009ad7f1b899de3d0cea0252737550e7919d17237997db5644",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+
+ if sys.platform not in ["darwin", "win32"]:
+ provides("uuid")
- provides("uuid")
+ conflicts("%gcc@14:")
diff --git a/var/spack/repos/builtin/packages/libuv-julia/package.py b/var/spack/repos/builtin/packages/libuv-julia/package.py
index 8e668ca22f..00a6291587 100644
--- a/var/spack/repos/builtin/packages/libuv-julia/package.py
+++ b/var/spack/repos/builtin/packages/libuv-julia/package.py
@@ -18,11 +18,14 @@ class LibuvJulia(AutotoolsPackage):
license("CC-BY-4.0")
# julia's libuv fork doesn't tag (all?) releases, so we fix commits.
+ version("1.48.0", commit="ca3a5a431a1c37859b6508e6b2a288092337029a")
version("1.44.3", commit="2723e256e952be0b015b3c0086f717c3d365d97e")
version("1.44.2", commit="e6f0e4900e195c8352f821abe2b3cffc3089547b")
version("1.44.1", commit="1b2d16477fe1142adea952168d828a066e03ee4c")
version("1.42.0", commit="3a63bf71de62c64097989254e4f03212e3bf5fc8")
+ depends_on("c", type="build") # generated
+
def autoreconf(self, spec, prefix):
# @haampie: Configure files are checked in, but git does not restore
# mtime by design. Therefore, touch files to avoid regenerating those.
diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py
index 39bb4ee62f..69cce8f9aa 100644
--- a/var/spack/repos/builtin/packages/libuv/package.py
+++ b/var/spack/repos/builtin/packages/libuv/package.py
@@ -2,24 +2,64 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
+import spack.build_systems
+import spack.build_systems.autotools
from spack.package import *
-class Libuv(AutotoolsPackage):
+class Libuv(CMakePackage, AutotoolsPackage):
"""Multi-platform library with a focus on asynchronous IO"""
homepage = "https://libuv.org"
- url = "https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1-dist.tar.gz"
+ url = "https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1.tar.gz"
list_url = "https://dist.libuv.org/dist"
list_depth = 1
license("MIT")
- version("1.46.0", sha256="94f101111ef3209340d7f09c2aa150ddb4feabd2f9d87d47d9f5bded835b8094")
- version("1.45.0", sha256="3793d8c0d6fa587721d010d0555b7e82443fd4e8b3c91e529eb6607592f52b87")
- version("1.44.2", sha256="8ff28f6ac0d6d2a31d2eeca36aff3d7806706c7d3f5971f5ee013ddb0bdd2e9e")
- version("1.44.1", sha256="b7293cefb470e17774dcf5d62c4c969636172726155b55ceef5092b7554863cc")
- version("1.44.0", sha256="6c52494401cfe8d08fb4ec245882f0bd4b1572b5a8e79d6c418b855422a1a27d")
+ if sys.platform == "win32":
+ version(
+ "1.48.0", sha256="7f1db8ac368d89d1baf163bac1ea5fe5120697a73910c8ae6b2fffb3551d59fb"
+ )
+ version(
+ "1.47.0", sha256="20c37a4ca77a2107879473c6c8fa0dc1350e80045df98bfbe78f7cd6d7dd2965"
+ )
+ version(
+ "1.46.0", sha256="111f83958b9fdc65f1489195d25f342b9f7a3e683140c60e62c00fbaccddddce"
+ )
+ version(
+ "1.45.0", sha256="f5b07f65a1e8166e47983a7ed1f42fae0bee08f7458142170c37332fc676a748"
+ )
+ version(
+ "1.44.2", sha256="ccfcdc968c55673c6526d8270a9c8655a806ea92468afcbcabc2b16040f03cb4"
+ )
+ version(
+ "1.44.1", sha256="9d37b63430fe3b92a9386b949bebd8f0b4784a39a16964c82c9566247a76f64a"
+ )
+ version(
+ "1.44.0", sha256="d969fc47b8e39ec909d3f8cfa6a6e616e7c370637068ce2d95fdfcbb7f8467f5"
+ )
+ else:
+ version(
+ "1.48.0", sha256="c593139feb9061699fdd2f7fde47bb6c1ca77761ae9ec04f052083f1ef46c13b"
+ )
+ version(
+ "1.46.0", sha256="94f101111ef3209340d7f09c2aa150ddb4feabd2f9d87d47d9f5bded835b8094"
+ )
+ version(
+ "1.45.0", sha256="3793d8c0d6fa587721d010d0555b7e82443fd4e8b3c91e529eb6607592f52b87"
+ )
+ version(
+ "1.44.2", sha256="8ff28f6ac0d6d2a31d2eeca36aff3d7806706c7d3f5971f5ee013ddb0bdd2e9e"
+ )
+ version(
+ "1.44.1", sha256="b7293cefb470e17774dcf5d62c4c969636172726155b55ceef5092b7554863cc"
+ )
+ version(
+ "1.44.0", sha256="6c52494401cfe8d08fb4ec245882f0bd4b1572b5a8e79d6c418b855422a1a27d"
+ )
version("1.43.0", sha256="90d72bb7ae18de2519d0cac70eb89c319351146b90cd3f91303a492707e693a4")
version("1.42.0", sha256="43129625155a8aed796ebe90b8d4c990a73985ec717de2b2d5d3a23cfe4deb72")
version("1.41.1", sha256="65db0c7f2438bc8cd48865de282bf6670027f3557d6e3cb62fb65b2e350a687d")
@@ -31,18 +71,44 @@ class Libuv(AutotoolsPackage):
version("1.10.0", sha256="0307a0eec6caddd476f9cad39e18fdd6f22a08aa58103c4b0aead96d638be15e")
version("1.9.0", sha256="d595b2725abcce851c76239aab038adc126c58714cfb572b2ebb2d21b3593842")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
- if version < Version("1.44.0"):
+ if self.spec.satisfies("@:1.43") or self.spec.satisfies("build_system=cmake"):
+ # This version includes CMake files unlike the '-dist' source distribution below
url = "https://dist.libuv.org/dist/v{0}/libuv-v{0}.tar.gz"
else:
# From 1.44 on, the `-dist` download includes a configure script
url = "https://dist.libuv.org/dist/v{0}/libuv-v{0}-dist.tar.gz"
return url.format(version, version)
- depends_on("automake", type="build", when="@:1.43.0")
- depends_on("autoconf", type="build", when="@:1.43.0")
- depends_on("libtool", type="build", when="@:1.43.0")
- depends_on("m4", type="build", when="@:1.43.0")
+ # Windows needs a CMake build, but the cmake-enabled sources do not have a
+ # pre-generated configure script to enable the autotools build, so: (a)
+ # pull different sources if you are on Windows and (b) make sure cmake
+ # build is not chosen on Linux
+ # (because Linux does not download the cmake-enabled source).
+ # new libuv versions should only use CMake to prevent the scenario
+ # described above
+ build_system(conditional("cmake", when="platform=windows"), "autotools", default="autotools")
+
+ with when("build_system=autotools"):
+ depends_on("automake", type="build", when="@:1.43.0")
+ depends_on("autoconf", type="build", when="@:1.43.0")
+ depends_on("libtool", type="build", when="@:1.43.0")
+ depends_on("m4", type="build", when="@:1.43.0")
+
+ with when("build_system=cmake"):
+ # explicitly require ownlibs to indicate we're short
+ # circuiting the cmake<->libuv cyclic dependency here
+ depends_on("cmake+ownlibs")
+
+ conflicts(
+ "%gcc@:4.8",
+ when="@1.45:",
+ msg="libuv version 1.45 and above require <stdatomic.h>. "
+ "See: https://github.com/libuv/libuv/blob/v1.45.0/ChangeLog#L11"
+ "and https://gcc.gnu.org/gcc-4.9/changes.html",
+ )
# Tries to build an Objective-C file with GCC's C frontend
# https://github.com/libuv/libuv/issues/2805
@@ -52,9 +118,17 @@ class Libuv(AutotoolsPackage):
msg="libuv does not compile with GCC on macOS yet, use clang. "
"See: https://github.com/libuv/libuv/issues/2805",
)
+ conflicts(
+ "platform=windows",
+ when="@:1.20",
+ msg="Build system for Windows in versions older than 1.21 is"
+ "broken for versions of MSVC supported by Spack",
+ )
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
@when("@:1.43")
- def autoreconf(self, spec, prefix):
+ def autoreconf(self, pkg, spec, prefix):
# This is needed because autogen.sh generates on-the-fly
# an m4 macro needed during configuration
Executable("./autogen.sh")()
diff --git a/var/spack/repos/builtin/packages/libva/package.py b/var/spack/repos/builtin/packages/libva/package.py
new file mode 100644
index 0000000000..538ca8914e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libva/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libva(AutotoolsPackage):
+ """Libva is an implementation for VA-API (Video Acceleration API).
+ VA-API is an open-source library and API specification, which provides
+ access to graphics hardware acceleration capabilities for video
+ processing. It consists of a main library and driver-specific
+ acceleration backends for each supported hardware vendor."""
+
+ homepage = "https://github.com/intel/libva"
+ url = "https://github.com/intel/libva/archive/refs/tags/2.22.0.tar.gz"
+
+ version("2.22.0", sha256="467c418c2640a178c6baad5be2e00d569842123763b80507721ab87eb7af8735")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build")
+
+ depends_on("libdrm")
+ depends_on("libx11", when="^[virtuals=gl] glx")
+ depends_on("libxext", when="^[virtuals=gl] glx")
+
+ def autoreconf(self, spec, prefix):
+ autogen = Executable("./autogen.sh")
+ autogen()
+
+ def configure_args(self):
+ spec = self.spec
+ args = ["--disable-x11", "--disable-wayland", "--disable-glx", "--enable-libdrm"]
+ if spec.satisfies("^[virtuals=gl] glx"):
+ args.append("--enable-x11")
+ else:
+ args.append("--disable-x11")
+ return args
diff --git a/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch
new file mode 100644
index 0000000000..f009188f52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libvdwxc/fftw-detection.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index 494ea9f..1ca6516 100755
+--- a/configure
++++ b/configure
+@@ -17006,7 +17006,7 @@ int
+ main ()
+ {
+
+- fftw_plan *plan;
++ fftw_plan plan;
+ fftw_complex *a1, *a2;
+ fftw_execute_dft(plan, a1, a2);
+
diff --git a/var/spack/repos/builtin/packages/libvdwxc/package.py b/var/spack/repos/builtin/packages/libvdwxc/package.py
index f83ccd52ee..f9d6a0d845 100644
--- a/var/spack/repos/builtin/packages/libvdwxc/package.py
+++ b/var/spack/repos/builtin/packages/libvdwxc/package.py
@@ -18,6 +18,9 @@ class Libvdwxc(AutotoolsPackage):
version("0.4.0", sha256="3524feb5bb2be86b4688f71653502146b181e66f3f75b8bdaf23dd1ae4a56b33")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("pfft", default=False, description="Enable support for PFFT")
@@ -51,3 +54,10 @@ class Libvdwxc(AutotoolsPackage):
args += ["--without-mpi"]
return args
+
+ # misuse of fftw_plan in m4 for fftw detection (configure fails with gcc 14)
+ # Only the configure script is patched, NOT the m4 macro (to avoid depending on aclocal),
+ # so running autoreconf is not supported.
+ # The relevant upstream fix for the m4 would be:
+ # https://gitlab.com/libvdwxc/libvdwxc/-/commit/9340f857515c4a2e56d2aa7cf3a21c41ba8559c3.diff
+ patch("fftw-detection.patch", when="@:0.4.0")
diff --git a/var/spack/repos/builtin/packages/libverto/package.py b/var/spack/repos/builtin/packages/libverto/package.py
index 0698c553e1..73bbf393ca 100644
--- a/var/spack/repos/builtin/packages/libverto/package.py
+++ b/var/spack/repos/builtin/packages/libverto/package.py
@@ -21,6 +21,8 @@ class Libverto(AutotoolsPackage):
version("0.3.0", sha256="fad201d9d0ac1abf1283d2d78bb3a615f72cfd2a2141673589d93c0cb762b3f1")
version("0.2.7", sha256="0ef688a8a8690c24714834cc155b067b1c5d3f3194acceb333751deebd50de01")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/libvips/package.py b/var/spack/repos/builtin/packages/libvips/package.py
index f5e64f6a9b..cd16fd69ea 100644
--- a/var/spack/repos/builtin/packages/libvips/package.py
+++ b/var/spack/repos/builtin/packages/libvips/package.py
@@ -12,16 +12,26 @@ class Libvips(AutotoolsPackage):
little memory."""
homepage = "https://libvips.github.io/libvips/"
- url = "https://github.com/libvips/libvips/releases/download/v8.9.0/vips-8.9.0.tar.gz"
+ url = "https://github.com/libvips/libvips/releases/download/v8.15.3/vips-8.15.3.tar.xz"
git = "https://github.com/libvips/libvips.git"
- license("LGPL-2.1-or-later")
+ license("LGPL-2.1-or-later", checked_by="wdconinc")
+ version("8.15.3", sha256="3e27d9f536eafad64013958fe9e8a1964c90b564c731d49db7c1a1c11b1052a0")
version("8.13.3", sha256="4eff5cdc8dbe1a05a926290a99014e20ba386f5dcca38d9774bef61413435d4c")
version("8.10.5", sha256="a4eef2f5334ab6dbf133cd3c6d6394d5bdb3e76d5ea4d578b02e1bc3d9e1cfd8")
version("8.9.1", sha256="45633798877839005016c9d3494e98dee065f5cb9e20f4552d3b315b8e8bce91")
version("8.9.0", sha256="97334a5e70aff343d2587f23cb8068fc846a58cd937c89a446142ccf00ea0349")
+ build_system(
+ conditional("autotools", when="@:8.13"),
+ conditional("meson", when="@8.13:"),
+ default="meson",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("fftw", default=True, description="Uses FFTW3 for fourier transforms.")
variant("jpeg", default=False, description="Enable JPEG support")
@@ -42,4 +52,8 @@ class Libvips(AutotoolsPackage):
depends_on("libjpeg", when="+jpeg")
depends_on("libtiff", when="+tiff")
depends_on("libpng", when="+png")
- depends_on("poppler", when="+poppler")
+ depends_on("poppler +glib", when="+poppler")
+
+ def url_for_version(self, version):
+ ext = "xz" if version >= Version("8.14") else "gz"
+ return f"https://github.com/libvips/libvips/releases/download/v{version}/vips-{version}.tar.{ext}"
diff --git a/var/spack/repos/builtin/packages/libvorbis/package.py b/var/spack/repos/builtin/packages/libvorbis/package.py
index 922e9c57e9..ccaf5fff0b 100644
--- a/var/spack/repos/builtin/packages/libvorbis/package.py
+++ b/var/spack/repos/builtin/packages/libvorbis/package.py
@@ -20,6 +20,8 @@ class Libvorbis(AutotoolsPackage):
version("1.3.7", sha256="0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab")
version("1.3.5", sha256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce")
+ depends_on("c", type="build") # generated
+
depends_on("libogg")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/libvori/package.py b/var/spack/repos/builtin/packages/libvori/package.py
index 47fb3be91a..ecfd87922b 100644
--- a/var/spack/repos/builtin/packages/libvori/package.py
+++ b/var/spack/repos/builtin/packages/libvori/package.py
@@ -22,6 +22,8 @@ class Libvori(CMakePackage):
version("201224", sha256="16f6c49eaa17ea23868925dbaae2eca71bdacbe50418c97d6c55e05728038f31")
version("201217", sha256="6ad456ed6ca5d28cadcc0d90eabe8fff5caa77b99f12764323de5e3ae21cddf5")
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=True, description="Compile the library with position independent code")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/libvpx/package.py b/var/spack/repos/builtin/packages/libvpx/package.py
index 063c76c9bc..e47170935a 100644
--- a/var/spack/repos/builtin/packages/libvpx/package.py
+++ b/var/spack/repos/builtin/packages/libvpx/package.py
@@ -19,7 +19,18 @@ class Libvpx(AutotoolsPackage):
license("BSD-3-Clause")
- version("1.10.0", sha256="85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a")
+ version("1.14.1", sha256="901747254d80a7937c933d03bd7c5d41e8e6c883e0665fadcb172542167c7977")
+
+ # Deprecated versions
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-44488
+ version(
+ "1.10.0",
+ sha256="85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
@@ -27,6 +38,6 @@ class Libvpx(AutotoolsPackage):
def configure_args(self):
extra_args = []
- if "+pic" in self.spec:
+ if self.spec.satisfies("+pic"):
extra_args.append("--enable-pic")
return extra_args
diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py
index 3298835371..6d6ff9e444 100644
--- a/var/spack/repos/builtin/packages/libvterm/package.py
+++ b/var/spack/repos/builtin/packages/libvterm/package.py
@@ -11,23 +11,26 @@ class Libvterm(MakefilePackage):
"""An abstract library implementation of a terminal emulator"""
homepage = "http://www.leonerd.org.uk/code/libvterm/"
- url = "http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.3.tar.gz"
license("MIT")
+ maintainers("fthaler")
+
+ version("0.3.3", sha256="09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0")
version("0.3.1", sha256="25a8ad9c15485368dfd0a8a9dca1aec8fea5c27da3fa74ec518d5d3787f0c397")
version("0.3", sha256="61eb0d6628c52bdf02900dfd4468aa86a1a7125228bab8a67328981887483358")
version("0.2", sha256="4c5150655438cfb8c57e7bd133041140857eb04defd0e544521c0e469258e105")
version("0.1.4", sha256="bc70349e95559c667672fc8c55b9527d9db9ada0fb80a3beda533418d782d3dd")
version("0.1.3", sha256="e41724466a4658e0f095e8fc5aeae26026c0726dce98ee71d6920d06f7d78e2b")
- version(
- "0.0.0",
- sha256="6344eca01c02e2270348b79e033c1e0957028dbcd76bc784e8106bea9ec3029d",
- url="http://www.leonerd.org.uk/code/libvterm/libvterm-0+bzr726.tar.gz",
- )
+
+ depends_on("c", type="build") # generated
depends_on("libtool", type="build")
+ def url_for_version(self, version):
+ url = "https://launchpad.net/libvterm/trunk/v{0}/+download/libvterm-{1}.tar.gz"
+ return url.format(version.up_to(2), version)
+
def setup_build_environment(self, env):
env.set("LIBTOOL", self.spec["libtool"].prefix.bin.join("libtool"))
diff --git a/var/spack/repos/builtin/packages/libwebp/package.py b/var/spack/repos/builtin/packages/libwebp/package.py
index f74efe9a11..4e118a47e9 100644
--- a/var/spack/repos/builtin/packages/libwebp/package.py
+++ b/var/spack/repos/builtin/packages/libwebp/package.py
@@ -16,12 +16,19 @@ class Libwebp(AutotoolsPackage):
license("BSD-3-Clause")
+ version("1.4.0", sha256="61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5")
+ version("1.3.2", sha256="2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4")
+ version("1.3.1", sha256="b3779627c2dfd31e3d8c4485962c2efe17785ef975e2be5c8c0c9e6cd3c4ef66")
+ version("1.3.0", sha256="64ac4614db292ae8c5aa26de0295bf1623dbb3985054cb656c55e67431def17c")
version("1.2.4", sha256="7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df")
version("1.2.3", sha256="f5d7ab2390b06b8a934a4fc35784291b3885b557780d099bd32f09241f9d83f9")
version("1.2.2", sha256="7656532f837af5f4cec3ff6bafe552c044dc39bf453587bd5b77450802f4aee6")
version("1.2.0", sha256="2fc8bbde9f97f2ab403c0224fb9ca62b2e6852cbc519e91ceaa7c153ffd88a0c")
version("1.0.3", sha256="e20a07865c8697bba00aebccc6f54912d6bc333bb4d604e6b07491c1a226b34f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("libwebpmux", default=False, description="Build libwebpmux")
variant("libwebpdemux", default=False, description="Build libwebpdemux")
variant("libwebpdecoder", default=False, description="Build libwebpdecoder")
@@ -44,13 +51,13 @@ class Libwebp(AutotoolsPackage):
# TODO: add variants and dependencies for these
args = ["--disable-gl", "--disable-sdl", "--disable-wic"]
- args += self.enable_or_disable("gif")
- args += self.enable_or_disable("jpeg")
- args += self.enable_or_disable("png")
- args += self.enable_or_disable("tiff")
args += self.enable_or_disable("libwebpmux")
args += self.enable_or_disable("libwebpdemux")
args += self.enable_or_disable("libwebpdecoder")
args += self.enable_or_disable("libwebpextras")
+ args += self.enable_or_disable("gif")
+ args += self.enable_or_disable("jpeg")
+ args += self.enable_or_disable("png")
+ args += self.enable_or_disable("tiff")
return args
diff --git a/var/spack/repos/builtin/packages/libwebsockets/package.py b/var/spack/repos/builtin/packages/libwebsockets/package.py
index 59fae25a80..5347f241df 100644
--- a/var/spack/repos/builtin/packages/libwebsockets/package.py
+++ b/var/spack/repos/builtin/packages/libwebsockets/package.py
@@ -15,11 +15,18 @@ class Libwebsockets(CMakePackage):
license("MIT")
+ version("4.3.3", sha256="6fd33527b410a37ebc91bb64ca51bdabab12b076bc99d153d7c5dd405e4bdf90")
version("2.2.1", sha256="e7f9eaef258e003c9ada0803a9a5636757a5bc0a58927858834fb38a87d18ad2")
version("2.1.1", sha256="96183cbdfcd6e6a3d9465e854a924b7bfde6c8c6d3384d6159ad797c2e823b4d")
version("2.1.0", sha256="bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66")
version("2.0.3", sha256="cf0e91b564c879ab98844385c98e7c9e298cbb969dbc251a3f18a47feb94342c")
version("1.7.9", sha256="86a5105881ea2cb206f8795483d294e9509055decf60436bcc1e746262416438")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("openssl")
+
+ def cmake_args(self):
+ return ["-DLWS_WITHOUT_TESTAPPS=ON"]
diff --git a/var/spack/repos/builtin/packages/libwhich/package.py b/var/spack/repos/builtin/packages/libwhich/package.py
index 37ec3fc115..d9430ee12b 100644
--- a/var/spack/repos/builtin/packages/libwhich/package.py
+++ b/var/spack/repos/builtin/packages/libwhich/package.py
@@ -23,6 +23,8 @@ class Libwhich(Package):
version("1.1.0", sha256="f1c30bf7396859ad437a5db74e9e328fb4b4e1379457121e28a3524b1e3a0b3f")
version("1.0.0", sha256="61d5d643d4cbd4b340b9b48922e1b4fd2a35729b7cfdcc7283aab82a6f742a6c")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make()
mkdir(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/libwindowswm/package.py b/var/spack/repos/builtin/packages/libwindowswm/package.py
index dd533742c1..ceca358af7 100644
--- a/var/spack/repos/builtin/packages/libwindowswm/package.py
+++ b/var/spack/repos/builtin/packages/libwindowswm/package.py
@@ -14,17 +14,19 @@ class Libwindowswm(AutotoolsPackage, XorgPackage):
better interact with the Cygwin XWin server when running X11 in a
rootless mode."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libWindowsWM"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libWindowsWM"
xorg_mirror_path = "lib/libWindowsWM-1.0.1.tar.gz"
license("MIT")
version("1.0.1", sha256="94f9c0add3bad38ebd84bc43d854207c4deaaa74fb15339276e022546124b98a")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("windowswmproto")
+ depends_on("xextproto", type="build")
+ depends_on("windowswmproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libwmf/package.py b/var/spack/repos/builtin/packages/libwmf/package.py
index 63d32c1b20..b29215418d 100644
--- a/var/spack/repos/builtin/packages/libwmf/package.py
+++ b/var/spack/repos/builtin/packages/libwmf/package.py
@@ -19,9 +19,18 @@ class Libwmf(AutotoolsPackage):
license("LGPL-2.0-or-later")
+ version("0.2.13", sha256="18ba69febd2f515d98a2352de284a8051896062ac9728d2ead07bc39ea75a068")
version("0.2.12", sha256="464ff63605d7eaf61a4a12dbd420f7a41a4d854675d8caf37729f5bc744820e2")
version("0.2.11", sha256="e2a2664afd5abc71a42be7ad3c200f64de2b8889bf088eac1d32e205ce843803")
+ patch(
+ "https://github.com/caolanm/libwmf/commit/1f87c35bc2a36fdca760a4577761d30d9cc876e2.patch?full_index=1",
+ sha256="80ae84a904baa21e1566e3d2bca1c6aaa0a2a30f684fe50f25e7e5751ef3ec93",
+ when="@:0.2.13",
+ )
+
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("expat")
depends_on("freetype")
diff --git a/var/spack/repos/builtin/packages/libwnck/package.py b/var/spack/repos/builtin/packages/libwnck/package.py
new file mode 100644
index 0000000000..40f139cb6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libwnck/package.py
@@ -0,0 +1,76 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libwnck(MesonPackage, AutotoolsPackage):
+ """Window Navigator Construction Kit"""
+
+ homepage = "https://gitlab.gnome.org/GNOME/libwnck"
+ url = "https://download.gnome.org/sources/libwnck/3.4/libwnck-3.4.9.tar.xz"
+ list_url = "https://download.gnome.org/sources/libwnck/"
+ list_depth = 2
+
+ def url_for_version(self, version):
+ base = "https://download.gnome.org/sources/libwnck"
+ dirname = version.up_to(1) if version >= Version("40") else version.up_to(2)
+ filename = f"libwnck-{version.up_to(3)}.tar.xz"
+ return f"{base}/{dirname}/{filename}"
+
+ license("GPLv2", checked_by="teaguesterling")
+
+ version("43.0", sha256="905bcdb85847d6b8f8861e56b30cd6dc61eae67ecef4cd994a9f925a26a2c1fe")
+ version("40.1", sha256="03134fa114ef3fbe34075aa83678f58aa2debe9fcef4ea23c0779e28601d6611")
+ version("3.36.0", sha256="bc508150b3ed5d22354b0e6774ad4eee465381ebc0ace45eb0e2d3a4186c925f")
+ version("3.24.1", sha256="afa6dc283582ffec15c3374790bcbcb5fb422bd38356d72deeef35bf7f9a1f04")
+ version("3.20.1", sha256="1cb03716bc477058dfdf3ebfa4f534de3b13b1aa067fcd064d0b7813291cba72")
+ version("3.14.1", sha256="bb643c9c423c8aa79c59973ce27ce91d3b180d1e9907902278fb79391f52befa")
+ version("3.4.9", sha256="96e6353f2701a1ea565ece54d791a7bebef1832d96126f7377c54bb3516682c4")
+
+ variant("cairo", default=True, description="Build with cairo support")
+ variant("install_tools", default=True, description="Install WNCK tools")
+ variant("xres", default=True, description="Build with xres support")
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant(
+ "startup_notification", default=True, description="Build with startup-notification support"
+ )
+ variant("gtk_doc", default=False, description="Build documentation")
+
+ build_system(
+ conditional("meson", when="@3.31:"),
+ conditional("autotools", when="@:3.24"),
+ default="meson",
+ )
+
+ with default_args(type="build"):
+ depends_on("pkgconfig@0.9.0:")
+ depends_on("gettext", when="@3.31:")
+ depends_on("intltool@0.40.6:", when="@:3.24")
+ depends_on("cmake", when="build_system=meson")
+ depends_on("gtk-doc@1.9:", when="+gtk_doc")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("glib@2")
+ depends_on("gdk-pixbuf")
+ depends_on("gtkplus@3.22:")
+
+ depends_on("cairo+X+gobject", when="+cairo")
+ depends_on("libxres", when="+xres")
+ depends_on("gobject-introspection", when="+introspection")
+ depends_on("startup-notification", when="+startup_notification")
+
+ def configure_args(self):
+ args = []
+
+ args += self.enable_or_disable("introspection")
+ args += self.enable_or_disable("install_tools")
+ args += self.enable_or_disable("startup_notification")
+ args += self.enable_or_disable("gtk_doc")
+
+ return args
+
+ def setup_dependent_build_environment(self, env, dep_spec):
+ if self.spec.satisfies("+introspection") and dep_spec.satisfies("+introspection"):
+ env.append_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py
index 89c3bd28a1..41d64789db 100644
--- a/var/spack/repos/builtin/packages/libx11/package.py
+++ b/var/spack/repos/builtin/packages/libx11/package.py
@@ -11,23 +11,45 @@ class Libx11(AutotoolsPackage, XorgPackage):
homepage = "https://www.x.org/"
xorg_mirror_path = "lib/libX11-1.6.7.tar.gz"
+ git = "https://gitlab.freedesktop.org/xorg/lib/libx11.git"
license("X11")
+ maintainers("wdconinc")
+
+ version("1.8.10", sha256="b7a1a90d881bb7b94df5cf31509e6b03f15c0972d3ac25ab0441f5fbc789650f")
+ version("1.8.9", sha256="57ca5f07d263788ad661a86f4139412e8b699662e6b60c20f1f028c25a935e48")
+ version("1.8.8", sha256="26997a2bc48c03df7d670f8a4ee961d1d6b039bf947475e5fec6b7635b4efe72")
+ version("1.8.7", sha256="793ebebf569f12c864b77401798d38814b51790fce206e01a431e5feb982e20b")
+ version("1.8.6", sha256="5ff0d26c94d82ebb94a944b9f1f55cd01b9713fd461fe93f62f3527ce14ad94e")
+ version("1.8.5", sha256="d84a35c324d5a1724692eafc1ed76f1689c833021e0062933773ec437f91a56b")
version("1.8.4", sha256="efd3a3a43c1f177edc2c205bedb0719b6648203595e54c0b83a32576aeaca7cd")
+ version("1.8.3", sha256="5a55945b7da86ce94733faf229342f75867e9c1090685f47f4d82b7f88602a14")
+ version("1.8.2", sha256="f1bc56187bee0f830e1179ac5068ac93b78c51ace94eb27702ffb2efd116587b")
+ version("1.8.1", sha256="d52f0a7c02a45449f37b0831d99ff936d92eb4ce8b4c97dc17a63cea79ce5a76")
+ version("1.8", sha256="68e0a30c4248b9f41492891a4b49672c3b0c59e84c4868144f03eef01ebc5eea")
+ version("1.7.5", sha256="78992abcd2bfdebe657699203ad8914e7ae77025175460e04a1045387192a978")
+ version("1.7.4", sha256="252fb028524caa878e6507729efc115d7434f867f6549fe087e7869a66adfa2c")
+ version("1.7.3.1", sha256="d9d2c45f89687cfc915a766aa91f01843ae97607baa1d1027fd208f8e014f71e")
+ version("1.7.3", sha256="029acf61e7e760a3150716b145a58ce5052ee953e8cccc8441d4f550c420debb")
+ version("1.7.2", sha256="2c26ccd08f43a6214de89110554fbe97c71692eeb7e7d4829f3004ae6fafd2c0")
+ version("1.7.1", sha256="7e6d4120696e90995e66ac24f1042d4f11c14fbefd7aab48de0ed1fe3c4b922b")
version("1.7.0", sha256="c48ec61785ec68fc6a9a6aca0a9578393414fe2562e3cc9cca30234345c7b6ac")
version("1.6.7", sha256="f62ab88c2a87b55e1dc338726a55bb6ed8048084fe6a3294a7ae324ca45159d1")
version("1.6.5", sha256="3abce972ba62620611fab5b404dafb852da3da54e7c287831c30863011d28fb3")
version("1.6.3", sha256="0b03b9d22f4c9e59b4ba498f294e297f013cae27050dfa0f3496640200db5376")
+ depends_on("c", type="build")
+
+ depends_on("libxcb@1.11.1:", when="@1.6.4:")
depends_on("libxcb@1.1.92:")
- depends_on("xproto@7.0.25:", when="@1.7.0:")
- depends_on("xproto@7.0.17:")
- depends_on("xextproto")
+ depends_on("xproto@7.0.25:", when="@1.7.0:", type=("build", "link"))
+ depends_on("xproto@7.0.17:", type=("build", "link"))
+ depends_on("xextproto", type="build")
depends_on("xtrans")
- depends_on("kbproto")
- depends_on("inputproto")
+ depends_on("kbproto", type=("build", "link"))
+ depends_on("inputproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
depends_on("perl", type="build")
diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py
index adbca5ac62..1d3ecde7c6 100644
--- a/var/spack/repos/builtin/packages/libxau/package.py
+++ b/var/spack/repos/builtin/packages/libxau/package.py
@@ -11,14 +11,21 @@ class Libxau(AutotoolsPackage, XorgPackage):
Authorization Protocol. This is useful for restricting client
access to the display."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXau/"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXau/"
xorg_mirror_path = "lib/libXau-1.0.8.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.0.11", sha256="3a321aaceb803577a4776a5efe78836eb095a9e44bbc7a465d29463e1a14f189")
+ version("1.0.10", sha256="51a54da42475d4572a0b59979ec107c27dacf6c687c2b7b04e5cf989a7c7e60c")
+ version("1.0.9", sha256="1f123d8304b082ad63a9e89376400a3b1d4c29e67e3ea07b3f659cccca690eea")
version("1.0.8", sha256="c343b4ef66d66a6b3e0e27aa46b37ad5cab0f11a5c565eafb4a1c7590bc71d7b")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxaw/package.py b/var/spack/repos/builtin/packages/libxaw/package.py
index b741be5f2e..e2633f11d6 100644
--- a/var/spack/repos/builtin/packages/libxaw/package.py
+++ b/var/spack/repos/builtin/packages/libxaw/package.py
@@ -10,21 +10,28 @@ class Libxaw(AutotoolsPackage, XorgPackage):
"""Xaw is the X Athena Widget Set.
Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXaw"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXaw"
xorg_mirror_path = "lib/libXaw-1.0.13.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.0.16", sha256="012f90adf8739f2f023d63a5fee1528949cf2aba92ef7ac1abcfc2ae9cf28798")
+ version("1.0.15", sha256="ca8a613884c922985202075b3cc8ee8821bfa83a5eb066189ae3cca131e63972")
+ version("1.0.14", sha256="59cfed2712cc80bbfe62dd1aacf24f58d74a76dd08329a922077b134a8d8048f")
version("1.0.13", sha256="7e74ac3e5f67def549722ff0333d6e6276b8becd9d89615cda011e71238ab694")
version("1.0.12", sha256="e32abc68d759ffb643f842329838f8b6c157e31023cc91059aabf730e7222ad2")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
depends_on("libxt")
depends_on("libxmu")
depends_on("libxpm")
- depends_on("xproto")
- depends_on("xextproto")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("xextproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxaw3d/package.py b/var/spack/repos/builtin/packages/libxaw3d/package.py
index 1b7d11fa34..f332772e43 100644
--- a/var/spack/repos/builtin/packages/libxaw3d/package.py
+++ b/var/spack/repos/builtin/packages/libxaw3d/package.py
@@ -10,19 +10,26 @@ class Libxaw3d(AutotoolsPackage, XorgPackage):
"""Xaw3d is the X 3D Athena Widget Set.
Xaw3d is a widget set based on the X Toolkit Intrinsics (Xt) Library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXaw3d"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXaw3d"
xorg_mirror_path = "lib/libXaw3d-1.6.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.6.6", sha256="0cdb8f51c390b0f9f5bec74454e53b15b6b815bc280f6b7c969400c9ef595803")
+ version("1.6.5", sha256="1123d80c58f45616ef18502081eeec5e92f20c7e7dd82a24f9e2e4f3c0e86dc7")
version("1.6.4", sha256="09fecfdab9d7d5953567883e2074eb231bc7a122a06e5055f9c119090f1f76a7")
version("1.6.2", sha256="847dab01aeac1448916e3b4edb4425594b3ac2896562d9c7141aa4ac6c898ba9")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxt")
depends_on("libxmu")
depends_on("libxext")
depends_on("libxpm")
+ depends_on("xproto@7.0.22:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxc/nvhpc-configure.patch b/var/spack/repos/builtin/packages/libxc/nvhpc-configure.patch
deleted file mode 100644
index 47e8f2213b..0000000000
--- a/var/spack/repos/builtin/packages/libxc/nvhpc-configure.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/configure 2020-09-24 11:13:16.306629033 -0700
-+++ b/configure 2020-09-24 11:14:16.412221646 -0700
-@@ -8908,7 +8908,7 @@
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
-@@ -9547,11 +9547,11 @@
- tmp_addflag=' $pic_flag'
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | nvc) # Portland Group C compiler
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-- pgf77* | pgf90* | pgf95* | pgfortran*)
-+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
- # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
-@@ -13810,7 +13810,7 @@
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_fc_compiler_gnu
- if test -n "$ac_tool_prefix"; then
-- for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
-+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 nvfortran lf95 ftn nagfor
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
- set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-@@ -13854,7 +13854,7 @@
- fi
- if test -z "$FC"; then
- ac_ct_FC=$FC
-- for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
-+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 nvfortran lf95 ftn nagfor
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -14545,7 +14545,7 @@
- lt_prog_compiler_pic_FC='-fPIC'
- lt_prog_compiler_static_FC='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl_FC='-Wl,'
-@@ -14587,7 +14587,7 @@
- lt_prog_compiler_pic_FC='-fPIC'
- lt_prog_compiler_static_FC='-static'
- ;;
-- *Portland\ Group*)
-+ *Portland\ Group* | *NVIDIA\ Compilers* | *PGI\ Compilers*)
- lt_prog_compiler_wl_FC='-Wl,'
- lt_prog_compiler_pic_FC='-fpic'
- lt_prog_compiler_static_FC='-Bstatic'
-@@ -15169,11 +15169,11 @@
- tmp_addflag=' $pic_flag'
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | nvc) # Portland Group C compiler
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-- pgf77* | pgf90* | pgf95* | pgfortran*)
-+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
- # Portland Group f77 and f90 compilers
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
diff --git a/var/spack/repos/builtin/packages/libxc/nvhpc-libtool.patch b/var/spack/repos/builtin/packages/libxc/nvhpc-libtool.patch
deleted file mode 100644
index 18d6b0e1fe..0000000000
--- a/var/spack/repos/builtin/packages/libxc/nvhpc-libtool.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From b71206582131f88f6602a40e4c67e3d92b119229 Mon Sep 17 00:00:00 2001
-From: Tin Huynh <ahuynh@nvidia.com>
-Date: Mon, 27 Jul 2020 15:15:47 -0700
-Subject: [PATCH] Recognize new Nvidia compilers.
-
-With the upcoming release of HPC-SDK, updating Libtool to recognize Nvidia
-compilers (nvc, nvc++, nvfortran).
----
- m4/libtool.m4 | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
-index f2d1f39..4eac689 100644
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -4402,8 +4402,8 @@ m4_if([$1], [CXX], [
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
-- pgCC* | pgcpp*)
-- # Portland Group C++ compiler
-+ pgCC* | pgcpp* | pgc\+\+* | nvc\+\+*)
-+ # NVIDIA HPC C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-@@ -4739,9 +4739,8 @@ m4_if([$1], [CXX], [
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
-- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-- # Portland Group compilers (*not* the Pentium gcc compiler,
-- # which looks to be a dead project)
-+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
-+ # NVIDIA HPC Compilers
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-@@ -4781,7 +4780,7 @@ m4_if([$1], [CXX], [
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
-- *Portland\ Group*)
-+ *Portland\ Group* | *NVIDIA\ Compilers* | *PGI\ Compilers*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-@@ -5209,12 +5208,12 @@ _LT_EOF
- tmp_addflag=' $pic_flag'
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
-- pgcc*) # Portland Group C compiler
-+ pgcc* | nvc) # NVIDIA HPC C++ Compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
-- pgf77* | pgf90* | pgf95* | pgfortran*)
-- # Portland Group f77 and f90 compilers
-+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
-+ # NVIDIA HPC Fortran Compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
-@@ -7004,8 +7003,8 @@ if test yes != "$_lt_caught_CXX_error"; then
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
- ;;
-- pgCC* | pgcpp*)
-- # Portland Group C++ compiler
-+ pgCC* | pgcpp* | pgc\+\+* | nvc\+\+*)
-+ # NVIDIA HPC C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
---
-2.7.4
-
diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py
index 720095b190..46ff91c34f 100644
--- a/var/spack/repos/builtin/packages/libxc/package.py
+++ b/var/spack/repos/builtin/packages/libxc/package.py
@@ -10,29 +10,33 @@ class Libxc(AutotoolsPackage, CudaPackage):
"""Libxc is a library of exchange-correlation functionals for
density-functional theory."""
- homepage = "https://tddft.org/programs/libxc/"
+ homepage = "https://libxc.gitlab.io"
url = "https://gitlab.com/libxc/libxc/-/archive/6.1.0/libxc-6.1.0.tar.gz"
license("MPL-2.0-no-copyleft-exception")
- version("6.2.2", sha256="3b0523924579cf494cafc6fea92945257f35692b004217d3dfd3ea7ca780e8dc")
- version("6.2.1", sha256="b5f3b4514db6bc4ccda1da90ac6176ea1f82e12241cc66427c58cbc4a5197b9b")
- version("6.2.0", sha256="3d25878782b5f94e7e4d41bd6de27f98983584cd0be0c65e69a9ada986b56b4d")
- version("6.1.0", sha256="f593745fa47ebfb9ddc467aaafdc2fa1275f0d7250c692ce9761389a90dd8eaf")
- version("6.0.0", sha256="0c774e8e195dd92800b9adf3df5f5721e29acfe9af4b191a9937c7de4f9aa9f6")
- version("5.2.3", sha256="7b7a96d8eeb472c7b8cca7ac38eae27e0a8113ef44dae5359b0eb12592b4bcf2")
- version("5.1.7", sha256="1a818fdfe5c5f74270bc8ef0c59064e8feebcd66b8f642c08aecc1e7d125be34")
- version("5.1.5", sha256="02e4615a22dc3ec87a23efbd3d9be5bfad2445337140bad1720699571c45c3f9")
- version("5.1.3", sha256="0350defdd6c1b165e4cf19995f590eee6e0b9db95a6b221d28cecec40f4e85cd")
- version("5.1.2", sha256="180d52b5552921d1fac8a10869dd30708c0fb41dc202a3bbee0e36f43872718a")
- version("5.1.0", sha256="f67b6e518372871d9eed6e5dba77c3ab5ea030c229ba7a7d44bcf51f3258373f")
- version("5.0.0", sha256="1cdc57930f7b57da4eb9b2c55a50ba1c2c385936ddaf5582fee830994461a892")
- version("4.3.4", sha256="a8ee37ddc5079339854bd313272856c9d41a27802472ee9ae44b58ee9a298337")
- version("4.3.2", sha256="bc159aea2537521998c7fb1199789e1be71e04c4b7758d58282622e347603a6f")
- version("4.2.3", sha256="02e49e9ba7d21d18df17e9e57eae861e6ce05e65e966e1e832475aa09e344256")
- version("3.0.0", sha256="5542b99042c09b2925f2e3700d769cda4fb411b476d446c833ea28c6bfa8792a")
- version("2.2.2", sha256="6ca1d0bb5fdc341d59960707bc67f23ad54de8a6018e19e02eee2b16ea7cc642")
- version("2.2.1", sha256="ade61c1fa4ed238edd56408fd8ee6c2e305a3d5753e160017e2a71817c98fd00")
+ version("7.0.0", sha256="8d4e343041c9cd869833822f57744872076ae709a613c118d70605539fb13a77")
+ version("6.2.2", sha256="d1b65ef74615a1e539d87a0e6662f04baf3a2316706b4e2e686da3193b26b20f")
+ version("6.2.1", sha256="da96fc4f6e4221734986f49758b410ffe1d406efd3538761062a4af57a2bd272")
+ version("6.2.0", sha256="31edb72c69157b6c0beaff1f10cbbb6348ce7579ef81d8f286764e5ab61194d1")
+ version("6.1.0", sha256="9baf23501dca21b05fa22d8e2ffeb56f294abe19ba12584cb3f9b421ae719c5f")
+ version("6.0.0", sha256="48a5393984d95bf0dd05c5ffc94e77da938b7f321058fe250c3448c7a9392c88")
+ version("5.2.3", sha256="3e0b36b3b9986a621fd8850133408f6f567bd7db5636a32a68f7637e116e268c")
+ version("5.1.7", sha256="1d50e1a92e59b5f3c8e7408f8612f0fb0e953d4f159515b7d81485891f3a1bbc")
+ version("5.1.5", sha256="101d6ea9e013006deae074843f0d02ab2813e16734e47ff7b0551babc4497163")
+ version("5.1.3", sha256="76b2abd063b692ed7e60fb6dfdf5a54072378710ee91f2b352a4e311d9805e97")
+ version("5.1.2", sha256="ff13eef8184b6c61dac8933ee74fc05967de4a67489581bdc500f1ec63826aae")
+ version("5.1.0", sha256="e8d2b6eb2b46b356a27f0367a7665ff276d7f295da7c734e774ee66f82e56297")
+ version("5.0.0", sha256="6b3be3cf6daf6b3eddf32d4077276eb9169531b42f98c2ca28ac85b9ea408493")
+ version("4.3.4", sha256="2d5878dd69f0fb68c5e97f46426581eed2226d1d86e3080f9aa99af604c65647")
+ version("4.3.2", sha256="3bbe01971d0a43fb63b5c17d922388a39a3f0ae3bd37ae5f6fe31bca9ab63f3c")
+ version("4.2.3", sha256="869ca4967cd255097fd2dc31664f30607e81f5abcf5f9c89bd467dc0bf93e5aa")
+ version("3.0.0", sha256="df2362351280edaf2233f3b2c8eb8e6dd6c68105f152897a4cc629fa346a7396")
+ version("2.2.2", sha256="6ffaad40505dbe8f155049448554b54ea31d31babf74ccf6b7935bfe55eeafd8")
+ version("2.2.1", sha256="c8577ba1ddd5c28fd0aa7c579ae65ab990eb7cb51ecf9f8175f9251f6deb9a06")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("shared", default=True, description="Build shared libraries")
variant("kxc", default=False, when="@5:", description="Build with third derivatives")
@@ -41,11 +45,10 @@ class Libxc(AutotoolsPackage, CudaPackage):
conflicts("+shared +cuda", msg="Only ~shared supported with +cuda")
conflicts("+cuda", when="@:4", msg="CUDA support only in libxc 5.0.0 and above")
- # Remove this when the release tarballs become available for 6.0.0 and above.
- with when("@6.0.0:"):
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
+ # Remove this if the release tarballs are available again.
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
depends_on("perl", type="build")
@@ -57,17 +60,6 @@ class Libxc(AutotoolsPackage, CudaPackage):
when="@6.0.0",
)
- patch("nvhpc-configure.patch", when="%nvhpc")
- patch("nvhpc-libtool.patch", when="@develop %nvhpc")
-
- def url_for_version(self, version):
- # The webserver at https://tddft.org/programs/libxc/download is unreliable,
- # see https://gitlab.com/libxc/libxc/-/issues/453. The pre 6.0.0 release tarballs
- # ar available in our source mirror, but the latest versions are not.
- if version < Version("6"):
- return f"https://www.tddft.org/programs/libxc/down/{version}/libxc-{version}.tar.gz"
- return f"https://gitlab.com/libxc/libxc/-/archive/{version}/libxc-{version}.tar.gz"
-
@property
def libs(self):
"""Libxc can be queried for the following parameters:
@@ -104,14 +96,14 @@ class Libxc(AutotoolsPackage, CudaPackage):
# https://gitlab.com/libxc/libxc/-/issues/430 (configure script does not ensure C99)
# TODO: Switch to cmake since this is better supported
env.append_flags("CFLAGS", self.compiler.c99_flag)
- if "%intel" in self.spec:
+ if self.spec.satisfies("%intel"):
if which("xiar"):
env.set("AR", "xiar")
- if "%aocc" in self.spec:
+ if self.spec.satisfies("%aocc"):
env.append_flags("FCFLAGS", "-fPIC")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
nvcc = self.spec["cuda"].prefix.bin.nvcc
env.set("CCLD", "{0} -ccbin {1}".format(nvcc, spack_cc))
env.set("CC", "{0} -x cu -ccbin {1}".format(nvcc, spack_cc))
@@ -125,16 +117,16 @@ class Libxc(AutotoolsPackage, CudaPackage):
args = []
args += self.enable_or_disable("shared")
args += self.enable_or_disable("cuda")
- if "+kxc" in self.spec:
+ if self.spec.satisfies("+kxc"):
args.append("--enable-kxc")
- if "+lxc" in self.spec:
+ if self.spec.satisfies("+lxc"):
args.append("--enable-lxc")
return args
@run_after("configure")
def patch_libtool(self):
"""AOCC support for LIBXC"""
- if "%aocc" in self.spec:
+ if self.spec.satisfies("%aocc"):
filter_file(
r"\$wl-soname \$wl\$soname",
r"-fuse-ld=ld -Wl,-soname,\$soname",
diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py
index 94a3fd34b1..2d5959cc8c 100644
--- a/var/spack/repos/builtin/packages/libxcb/package.py
+++ b/var/spack/repos/builtin/packages/libxcb/package.py
@@ -6,41 +6,49 @@
from spack.package import *
-class Libxcb(AutotoolsPackage):
+class Libxcb(AutotoolsPackage, XorgPackage):
"""The X protocol C-language Binding (XCB) is a replacement
for Xlib featuring a small footprint, latency hiding, direct
access to the protocol, improved threading support, and
extensibility."""
homepage = "https://xcb.freedesktop.org/"
- url = "https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.14.tar.xz"
+ xorg_mirror_path = "lib/libxcb-1.14.tar.xz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.17.0", sha256="599ebf9996710fea71622e6e184f3a8ad5b43d0e5fa8c4e407123c88a59a6d55")
+ version("1.16.1", sha256="f24d187154c8e027b358fc7cb6588e35e33e6a92f11c668fe77396a7ae66e311")
+ version("1.16", sha256="4348566aa0fbf196db5e0a576321c65966189210cb51328ea2bb2be39c711d71")
+ version("1.15", sha256="cc38744f817cf6814c847e2df37fcb8997357d72fa4bcbc228ae0fe47219a059")
version("1.14", sha256="a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34")
- version("1.13", sha256="0bb3cfd46dbd90066bf4d7de3cad73ec1024c7325a4a0cbf5f4a0d4fa91155fb")
+ version(
+ "1.13",
+ sha256="0bb3cfd46dbd90066bf4d7de3cad73ec1024c7325a4a0cbf5f4a0d4fa91155fb",
+ url="https://xcb.freedesktop.org/dist/libxcb-1.13.tar.gz",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
depends_on("libpthread-stubs")
depends_on("libxau@0.99.2:")
depends_on("libxdmcp")
# libxcb 1.X requires xcb-proto >= 1.X
- depends_on("xcb-proto")
- depends_on("xcb-proto@1.14:", when="@1.14")
- depends_on("xcb-proto@1.13:", when="@1.13")
+ depends_on("xcb-proto", type="build")
+ depends_on("xcb-proto@1.17:", when="@1.17", type="build")
+ depends_on("xcb-proto@1.16:", when="@1.16", type="build")
+ depends_on("xcb-proto@1.15:", when="@1.15", type="build")
+ depends_on("xcb-proto@1.14:", when="@1.14", type="build")
+ depends_on("xcb-proto@1.13:", when="@1.13", type="build")
depends_on("python", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
- def url_for_version(self, version):
- if version >= Version("1.14"):
- url = "https://xorg.freedesktop.org/archive/individual/lib/libxcb-{0}.tar.xz"
- else:
- url = "https://xcb.freedesktop.org/dist/libxcb-{0}.tar.gz"
-
- return url.format(version)
-
def configure_args(self):
config_args = []
@@ -52,3 +60,13 @@ class Libxcb(AutotoolsPackage):
def patch(self):
filter_file("typedef struct xcb_auth_info_t {", "typedef struct {", "src/xcb.h")
+
+ # libxcb fails to build with non-UTF-8 locales, see:
+ # https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html
+ # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/53 (merged in 1.17.0)
+ # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/60
+ # If a newer release can be verified to build with LC_ALL=en_US.ISO-8859-1,
+ # then we can limit the following function, e.g.
+ # when("@:1.17")
+ def setup_build_environment(self, env):
+ env.set("LC_ALL", "C.UTF-8")
diff --git a/var/spack/repos/builtin/packages/libxcomposite/package.py b/var/spack/repos/builtin/packages/libxcomposite/package.py
index f683f75d63..489ef94150 100644
--- a/var/spack/repos/builtin/packages/libxcomposite/package.py
+++ b/var/spack/repos/builtin/packages/libxcomposite/package.py
@@ -10,17 +10,22 @@ class Libxcomposite(AutotoolsPackage, XorgPackage):
"""libXcomposite - client library for the Composite extension to the
X11 protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXcomposite"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXcomposite"
xorg_mirror_path = "lib/libXcomposite-0.4.4.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
version("0.4.6", sha256="3599dfcd96cd48d45e6aeb08578aa27636fa903f480f880c863622c2b352d076")
version("0.4.4", sha256="83c04649819c6f52cda1b0ce8bcdcc48ad8618428ad803fb07f20b802f1bdad1")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxfixes")
- depends_on("fixesproto@0.4:")
- depends_on("compositeproto@0.4:")
+ depends_on("fixesproto@0.4:", type="build")
+ depends_on("compositeproto@0.4:", type=("build", "link"))
+ depends_on("xproto@7.0.22:", type=("build", "link"), when="@0.4.6")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxcrypt/package.py b/var/spack/repos/builtin/packages/libxcrypt/package.py
index 19a304b7d9..dccd34f7b9 100644
--- a/var/spack/repos/builtin/packages/libxcrypt/package.py
+++ b/var/spack/repos/builtin/packages/libxcrypt/package.py
@@ -11,6 +11,7 @@ class Libxcrypt(AutotoolsPackage):
homepage = "https://github.com/besser82/libxcrypt"
url = "https://github.com/besser82/libxcrypt/releases/download/v4.4.30/libxcrypt-4.4.30.tar.xz"
+ tags = ["build-tools"]
maintainers("haampie")
def url_for_version(self, version):
@@ -32,6 +33,8 @@ class Libxcrypt(AutotoolsPackage):
version("4.4.16", sha256="a98f65b8baffa2b5ba68ee53c10c0a328166ef4116bce3baece190c8ce01f375")
version("4.4.15", sha256="8bcdef03bc65f9dbda742e56820435b6f13eea59fb903765141c6467f4655e5a")
+ depends_on("c", type="build") # generated
+
variant(
"obsolete_api",
default=False,
diff --git a/var/spack/repos/builtin/packages/libxcursor/package.py b/var/spack/repos/builtin/packages/libxcursor/package.py
index cb1e1a4789..103ed5862e 100644
--- a/var/spack/repos/builtin/packages/libxcursor/package.py
+++ b/var/spack/repos/builtin/packages/libxcursor/package.py
@@ -9,18 +9,23 @@ from spack.package import *
class Libxcursor(AutotoolsPackage, XorgPackage):
"""libXcursor - X Window System Cursor management library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXcursor"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXcursor"
xorg_mirror_path = "lib/libXcursor-1.1.14.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.2.2", sha256="98c3a30a3f85274c167d1ac5419d681ce41f14e27bfa5fe3003c8172cd8af104")
version("1.2.1", sha256="77f96b9ad0a3c422cfa826afabaf1e02b9bfbfc8908c5fa1a45094faad074b98")
version("1.1.14", sha256="be0954faf274969ffa6d95b9606b9c0cfee28c13b6fc014f15606a0c8b05c17b")
+ depends_on("c", type="build")
+
depends_on("libxrender@0.8.2:")
depends_on("libxfixes")
depends_on("libx11")
- depends_on("fixesproto")
+ depends_on("fixesproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxcvt/package.py b/var/spack/repos/builtin/packages/libxcvt/package.py
new file mode 100644
index 0000000000..6a73ef3d85
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxcvt/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libxcvt(MesonPackage, XorgPackage):
+ """Implementation of the VESA CVT standard timing modelines generator."""
+
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcvt"
+ xorg_mirror_path = "lib/libxcvt-0.1.2.tar.xz"
+
+ license("MIT", checked_by="teaguesterling")
+
+ version("0.1.2", sha256="0561690544796e25cfbd71806ba1b0d797ffe464e9796411123e79450f71db38")
diff --git a/var/spack/repos/builtin/packages/libxdamage/package.py b/var/spack/repos/builtin/packages/libxdamage/package.py
index ffe29030ee..e3da4a5006 100644
--- a/var/spack/repos/builtin/packages/libxdamage/package.py
+++ b/var/spack/repos/builtin/packages/libxdamage/package.py
@@ -9,18 +9,24 @@ from spack.package import *
class Libxdamage(AutotoolsPackage, XorgPackage):
"""This package contains the library for the X Damage extension."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXdamage"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXdamage"
xorg_mirror_path = "lib/libXdamage-1.1.4.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.6", sha256="2afcc139eb6eb926ffe344494b1fc023da25def42874496e6e6d3aa8acef8595")
+ version("1.1.5", sha256="630ec53abb8c2d6dac5cd9f06c1f73ffb4a3167f8118fdebd77afd639dbc2019")
version("1.1.4", sha256="4bb3e9d917f5f593df2277d452926ee6ad96de7b7cd1017cbcf4579fe5d3442b")
+ depends_on("c", type="build")
+
depends_on("libxfixes")
depends_on("libx11")
- depends_on("damageproto@1.1:")
- depends_on("fixesproto")
- depends_on("xextproto")
+ depends_on("damageproto@1.1:", type=("build", "link"))
+ depends_on("fixesproto", type="build")
+ depends_on("xextproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxdmcp/package.py b/var/spack/repos/builtin/packages/libxdmcp/package.py
index 5c2533379b..6a66f62984 100644
--- a/var/spack/repos/builtin/packages/libxdmcp/package.py
+++ b/var/spack/repos/builtin/packages/libxdmcp/package.py
@@ -9,16 +9,21 @@ from spack.package import *
class Libxdmcp(AutotoolsPackage, XorgPackage):
"""libXdmcp - X Display Manager Control Protocol library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXdmcp"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXdmcp"
xorg_mirror_path = "lib/libXdmcp-1.1.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.5", sha256="31a7abc4f129dcf6f27ae912c3eedcb94d25ad2e8f317f69df6eda0bc4e4f2f3")
version("1.1.4", sha256="55041a8ff8992ab02777478c4b19c249c0f8399f05a752cb4a1a868a9a0ccb9a")
+ version("1.1.3", sha256="2ef9653d32e09d1bf1b837d0e0311024979653fe755ad3aaada8db1aa6ea180c")
version("1.1.2", sha256="6f7c7e491a23035a26284d247779174dedc67e34e93cc3548b648ffdb6fc57c0")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
depends_on("libbsd", when="platform=linux")
- depends_on("libbsd", when="platform=cray")
diff --git a/var/spack/repos/builtin/packages/libxevie/package.py b/var/spack/repos/builtin/packages/libxevie/package.py
index 2dd724510c..b56191d0bb 100644
--- a/var/spack/repos/builtin/packages/libxevie/package.py
+++ b/var/spack/repos/builtin/packages/libxevie/package.py
@@ -9,18 +9,20 @@ from spack.package import *
class Libxevie(AutotoolsPackage, XorgPackage):
"""Xevie - X Event Interception Extension (XEvIE)."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXevie"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXevie"
xorg_mirror_path = "lib/libXevie-1.0.3.tar.gz"
license("MIT")
version("1.0.3", sha256="3759bb1f7fdade13ed99bfc05c0717bc42ce3f187e7da4eef80beddf5e461258")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xproto")
- depends_on("xextproto")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("xextproto", type="build")
depends_on("evieext")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxext/package.py b/var/spack/repos/builtin/packages/libxext/package.py
index 28586bc430..c107e9305b 100644
--- a/var/spack/repos/builtin/packages/libxext/package.py
+++ b/var/spack/repos/builtin/packages/libxext/package.py
@@ -9,17 +9,24 @@ from spack.package import *
class Libxext(AutotoolsPackage, XorgPackage):
"""libXext - library for common extensions to the X11 protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXext"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXext"
xorg_mirror_path = "lib/libXext-1.3.3.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.3.6", sha256="1a0ac5cd792a55d5d465ced8dbf403ed016c8e6d14380c0ea3646c4415496e3d")
+ version("1.3.5", sha256="1a3dcda154f803be0285b46c9338515804b874b5ccc7a2b769ab7fd76f1035bd")
+ version("1.3.4", sha256="8ef0789f282826661ff40a8eef22430378516ac580167da35cc948be9041aac1")
version("1.3.3", sha256="eb0b88050491fef4716da4b06a4d92b4fc9e76f880d6310b2157df604342cfe5")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
- depends_on("xproto@7.0.13:")
- depends_on("xextproto@7.2:")
+ depends_on("xproto@7.0.13:", type="build")
+ depends_on("xextproto@7.2:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxfce4ui/package.py b/var/spack/repos/builtin/packages/libxfce4ui/package.py
new file mode 100644
index 0000000000..0ac4b5500d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfce4ui/package.py
@@ -0,0 +1,66 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libxfce4ui(AutotoolsPackage):
+ """Widget sharing library for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/libxfce4ui/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/libxfce4ui-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="532247c4387c17bb9ef94a73147039b8d013c3131c95cdbd2fa85fbcc848d06b")
+ version("4.16.0", sha256="8b06c9e94f4be88a9d87c47592411b6cbc32073e7af9cbd64c7b2924ec90ceaa")
+
+ variant("glibtop", default=True, description="Build with glibtop support")
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant("vala", default=True, description="Build with vala support")
+ variant("notification", default=True, description="Build with startup-notification support")
+
+ depends_on("intltool@0.35.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("xfconf")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("libgtop@2", when="+glibtop")
+ depends_on("startup-notification", when="+notification")
+ with when("+introspection"):
+ depends_on("gobject-introspection")
+ depends_on("libxfce4util+introspection")
+ with when("+vala"):
+ depends_on("vala")
+ depends_on("libxfce4util+vala")
+ with when("@4.18:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+
+ args += self.enable_or_disable("glibtop")
+ args += self.enable_or_disable("introspection")
+ args += self.enable_or_disable("vala")
+ args += self.enable_or_disable("notification")
+
+ return args
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/libxfce4util/package.py b/var/spack/repos/builtin/packages/libxfce4util/package.py
new file mode 100644
index 0000000000..705720ff72
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxfce4util/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Libxfce4util(AutotoolsPackage):
+ """Libxfce4util common non-GTK+ utilities among the Xfce applications."""
+
+ homepage = "https://docs.xfce.org/xfce/libxfce4util/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/libxfce4util-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("LGPLv2", checked_by="teague") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="1157ca717fd3dd1da7724a6432a4fb24af9cd922f738e971fd1fd36dfaeac3c9")
+ version("4.16.0", sha256="60598d745d1fc81ff5ad3cecc3a8d1b85990dd22023e7743f55abd87d8b55b83")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant("vala", default=True, description="Build with vala support")
+
+ with default_args(type="build"):
+ depends_on("intltool@0.35.0:", when="@4.16:")
+ depends_on("gettext", when="@4.18:")
+
+ with default_args(type=("run", "link", "build")):
+ depends_on("pkgconfig@0.9.0:")
+ depends_on("glib@2")
+ depends_on("gobject-introspection", when="+introspection")
+ depends_on("vala", when="+vala")
+ with when("@4.18:"):
+ depends_on("glib@2.66:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16"):
+ depends_on("glib@2.50:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+
+ args += self.enable_or_disable("introspection")
+ args += self.enable_or_disable("vala")
+
+ return args
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/libxfixes/package.py b/var/spack/repos/builtin/packages/libxfixes/package.py
index fbb560e077..7b30f07026 100644
--- a/var/spack/repos/builtin/packages/libxfixes/package.py
+++ b/var/spack/repos/builtin/packages/libxfixes/package.py
@@ -10,17 +10,26 @@ class Libxfixes(AutotoolsPackage, XorgPackage):
"""This package contains header files and documentation for the XFIXES
extension. Library and server implementations are separate."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXfixes"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXfixes"
xorg_mirror_path = "lib/libXfixes-5.0.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ # Newer versions are blocked by https://github.com/spack/spack/issues/41688
+ # version("6.0.1", sha256="e69eaa321173c748ba6e2f15c7cf8da87f911d3ea1b6af4b547974aef6366bec")
+ # version("6.0.0", sha256="82045da5625350838390c9440598b90d69c882c324ca92f73af9f0e992cb57c7")
+ version("5.0.3", sha256="9ab6c13590658501ce4bd965a8a5d32ba4d8b3bb39a5a5bc9901edffc5666570")
version("5.0.2", sha256="ad8df1ecf3324512b80ed12a9ca07556e561b14256d94216e67a68345b23c981")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
- depends_on("xproto")
- depends_on("fixesproto@5.0:")
- depends_on("xextproto")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("fixesproto@5.0:", type=("build", "link"), when="@5")
+ # depends_on("fixesproto@6.0:", type=("build", "link"), when="@6")
+ depends_on("xextproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxfont/package.py b/var/spack/repos/builtin/packages/libxfont/package.py
index 7647d81fdb..f48b8971ff 100644
--- a/var/spack/repos/builtin/packages/libxfont/package.py
+++ b/var/spack/repos/builtin/packages/libxfont/package.py
@@ -14,7 +14,7 @@ class Libxfont(AutotoolsPackage, XorgPackage):
but should not be used by normal X11 clients. X11 clients access fonts
via either the new API's in libXft, or the legacy API's in libX11."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXfont"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXfont"
xorg_mirror_path = "lib/libXfont-1.5.2.tar.gz"
license("MIT")
@@ -22,11 +22,13 @@ class Libxfont(AutotoolsPackage, XorgPackage):
version("1.5.4", sha256="59be6eab53f7b0feb6b7933c11d67d076ae2c0fd8921229c703fc7a4e9a80d6e")
version("1.5.2", sha256="a7350c75171d03d06ae0d623e42240356d6d3e1ac7dfe606639bf20f0d653c93")
+ depends_on("c", type="build")
+
depends_on("libfontenc")
- depends_on("freetype")
+ depends_on("freetype build_system=autotools")
depends_on("xtrans")
- depends_on("xproto")
- depends_on("fontsproto@2.1.3:")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("fontsproto@2.1.3:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxfont2/package.py b/var/spack/repos/builtin/packages/libxfont2/package.py
index 417dfd2323..b8ca4cfa1b 100644
--- a/var/spack/repos/builtin/packages/libxfont2/package.py
+++ b/var/spack/repos/builtin/packages/libxfont2/package.py
@@ -14,7 +14,7 @@ class Libxfont2(AutotoolsPackage, XorgPackage):
but should not be used by normal X11 clients. X11 clients access fonts
via either the new API's in libXft, or the legacy API's in libX11."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXfont"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXfont"
xorg_mirror_path = "lib/libXfont2-2.0.1.tar.gz"
license("MIT")
@@ -22,11 +22,13 @@ class Libxfont2(AutotoolsPackage, XorgPackage):
version("2.0.6", sha256="a944df7b6837c8fa2067f6a5fc25d89b0acc4011cd0bc085106a03557fb502fc")
version("2.0.1", sha256="381b6b385a69343df48a082523c856aed9042fbbc8ee0a6342fb502e4321230a")
+ depends_on("c", type="build")
+
depends_on("libfontenc")
depends_on("freetype")
depends_on("xtrans")
- depends_on("xproto")
- depends_on("fontsproto@2.1.3:")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("fontsproto@2.1.3:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxfontcache/package.py b/var/spack/repos/builtin/packages/libxfontcache/package.py
index ea1d748670..f813911378 100644
--- a/var/spack/repos/builtin/packages/libxfontcache/package.py
+++ b/var/spack/repos/builtin/packages/libxfontcache/package.py
@@ -9,17 +9,19 @@ from spack.package import *
class Libxfontcache(AutotoolsPackage, XorgPackage):
"""Xfontcache - X-TrueType font cache extension client library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXfontcache"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXfontcache"
xorg_mirror_path = "lib/libXfontcache-1.0.5.tar.gz"
license("BSD-2-Clause")
version("1.0.5", sha256="fdba75307a0983d2566554e0e9effa7079551f1b7b46e8de642d067998619659")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("fontcacheproto")
+ depends_on("xextproto", type="build")
+ depends_on("fontcacheproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxft/package.py b/var/spack/repos/builtin/packages/libxft/package.py
index 3904ce6766..7833041afd 100644
--- a/var/spack/repos/builtin/packages/libxft/package.py
+++ b/var/spack/repos/builtin/packages/libxft/package.py
@@ -13,13 +13,23 @@ class Libxft(AutotoolsPackage, XorgPackage):
connects X applications with the FreeType font rasterization library. Xft
uses fontconfig to locate fonts so it has no configuration files."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXft"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXft"
xorg_mirror_path = "lib/libXft-2.3.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("2.3.8", sha256="32e48fe2d844422e64809e4e99b9d8aed26c1b541a5acf837c5037b8d9f278a8")
+ version("2.3.7", sha256="75b4378644f5df3a15f684f8f0b5ff1324d37aacd5a381f3b830a2fbe985f660")
+ version("2.3.6", sha256="b7e59f69e0bbabe9438088775f7e5a7c16a572e58b11f9722519385d38192df5")
+ version("2.3.5", sha256="f7324aa0664115223672bae55086f3a9ae8f6ad4cdca87a8dd620295ee459e1a")
+ version("2.3.4", sha256="1eca71bec9cb483165ce1ab94f5cd3036269f5268651df6a2d99c4a7ab644d79")
+ version("2.3.3", sha256="3c3cf88b1a96e49a3d87d67d9452d34b6e25e96ae83959b8d0a980935014d701")
version("2.3.2", sha256="26cdddcc70b187833cbe9dc54df1864ba4c03a7175b2ca9276de9f05dce74507")
+ depends_on("c", type="build") # generated
+
depends_on("freetype@2.1.6:")
depends_on("fontconfig@2.5.92:")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/libxi/package.py b/var/spack/repos/builtin/packages/libxi/package.py
index 5025c73bf8..3f7cf05dc8 100644
--- a/var/spack/repos/builtin/packages/libxi/package.py
+++ b/var/spack/repos/builtin/packages/libxi/package.py
@@ -9,21 +9,33 @@ from spack.package import *
class Libxi(AutotoolsPackage, XorgPackage):
"""libXi - library for the X Input Extension."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXi"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXi"
xorg_mirror_path = "lib/libXi-1.7.6.tar.gz"
license("MIT AND X11")
+ maintainers("wdconinc")
+
+ # Newer versions are blocked by https://github.com/spack/spack/issues/41688
+ # version("1.8.1", sha256="3b5f47c223e4b63d7f7fe758886b8bf665b20a7edb6962c423892fd150e326ea")
+ # version("1.8", sha256="c80fd200a1190e4406bb4cc6958839d9651638cb47fa546a595d4bebcd3b9e2d")
+ version("1.7.10", sha256="b51e106c445a49409f3da877aa2f9129839001b24697d75a54e5c60507e9a5e3")
+ version("1.7.9", sha256="463cc5370191404bc0f8a450fdbf6d9159efbbf274e5e0f427a60191fed9cf4b")
+ version("1.7.8", sha256="7466d0c626a9cc2e53fd78c811815e82924cd7582236a82401df3d282a9c2889")
+ version("1.7.7", sha256="501f49e9c85609da17614d711aa4931fd128011042ff1cae53a16ce03e51ff5e")
version("1.7.6", sha256="4e88fa7decd287e58140ea72238f8d54e4791de302938c83695fc0c9ac102b7e")
+ depends_on("c", type="build")
+
depends_on("pkgconfig", type="build")
depends_on("libx11@1.6:")
depends_on("libxext@1.0.99.1:")
depends_on("libxfixes@5:")
- depends_on("fixesproto@5.0:")
- depends_on("xproto@7.0.13:")
- depends_on("xextproto@7.0.3:")
- depends_on("inputproto@2.2.99.1:")
+ depends_on("fixesproto@5.0:", type="build")
+ depends_on("xproto@7.0.13:", type="build")
+ depends_on("xextproto@7.0.3:", type="build")
+ depends_on("inputproto@2.2.99.1:", when="@1.7:", type=("build", "link"))
+ # depends_on("inputproto@2.3.99.1:", when="@1.8:", type=("build", "link"))
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/libxinerama/package.py b/var/spack/repos/builtin/packages/libxinerama/package.py
index cf3bcb5a3f..3156091c5a 100644
--- a/var/spack/repos/builtin/packages/libxinerama/package.py
+++ b/var/spack/repos/builtin/packages/libxinerama/package.py
@@ -9,18 +9,24 @@ from spack.package import *
class Libxinerama(AutotoolsPackage, XorgPackage):
"""libXinerama - API for Xinerama extension to X11 Protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXinerama"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXinerama"
xorg_mirror_path = "lib/libXinerama-1.1.3.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.5", sha256="2efa855cb42dc620eff3b77700d8655695e09aaa318f791f201fa60afa72b95c")
+ version("1.1.4", sha256="64de45e18cc76b8e703cb09b3c9d28bd16e3d05d5cd99f2d630de2d62c3acc18")
version("1.1.3", sha256="0ba243222ae5aba4c6a3d7a394c32c8b69220a6872dbb00b7abae8753aca9a44")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("xineramaproto@1.1.99.1:")
+ depends_on("xextproto", type="build")
+ depends_on("xineramaproto@1.1.99.1:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxkbcommon/package.py b/var/spack/repos/builtin/packages/libxkbcommon/package.py
index f8af4ede74..5b74ff5c3d 100644
--- a/var/spack/repos/builtin/packages/libxkbcommon/package.py
+++ b/var/spack/repos/builtin/packages/libxkbcommon/package.py
@@ -22,6 +22,8 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
license("MIT")
+ version("1.7.0", sha256="65782f0a10a4b455af9c6baab7040e2f537520caa2ec2092805cdfd36863b247")
+ version("1.6.0", sha256="0edc14eccdd391514458bc5f5a4b99863ed2d651e4dd761a90abf4f46ef99c2b")
version("1.5.0", sha256="560f11c4bbbca10f495f3ef7d3a6aa4ca62b4f8fb0b52e7d459d18a26e46e017")
version("1.4.1", sha256="943c07a1e2198026d8102b17270a1f406e4d3d6bbc4ae105b9e1b82d7d136b39")
version("1.4.0", sha256="106cec5263f9100a7e79b5f7220f889bc78e7d7ffc55d2b6fdb1efefb8024031")
@@ -41,11 +43,14 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
variant("wayland", default=False, description="Enable Wayland support")
depends_on("meson@0.41:", type="build", when="@0.9:")
depends_on("meson@0.49:", type="build", when="@1.0:")
depends_on("meson@0.51:", type="build", when="@1.5:")
+ depends_on("meson@0.52:", type="build", when="@1.6:")
depends_on("pkgconfig@0.9.0:", type="build")
depends_on("bison", type="build")
depends_on("util-macros")
@@ -59,12 +64,17 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
class MesonBuilder(spack.build_systems.meson.MesonBuilder):
def meson_args(self):
- return [
+ args = [
"-Dxkb-config-root={0}".format(self.spec["xkbdata"].prefix),
"-Denable-docs=false",
"-Denable-wayland=" + str(self.spec.satisfies("+wayland")),
]
+ if self.spec.satisfies("@1.6:"):
+ args.append("-Denable-bash-completion=false")
+
+ return args
+
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/libxkbfile/package.py b/var/spack/repos/builtin/packages/libxkbfile/package.py
index 8eb4016abb..a9cb634023 100644
--- a/var/spack/repos/builtin/packages/libxkbfile/package.py
+++ b/var/spack/repos/builtin/packages/libxkbfile/package.py
@@ -9,15 +9,23 @@ from spack.package import *
class Libxkbfile(AutotoolsPackage, XorgPackage):
"""XKB file handling routines."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbfile"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libxkbfile"
xorg_mirror_path = "lib/libxkbfile-1.0.9.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.3", sha256="c4c2687729d1f920f165ebb96557a1ead2ef655809ab5eaa66a1ad36dc31050d")
+ version("1.1.2", sha256="d1a7e659bc7ae1aa1fc1ecced261c734df5ad5d86af1ef7a946be0e2d841e51d")
+ version("1.1.1", sha256="87faee6d4873c5631e8bb53e85134084b862185da682de8617f08ca18d82e216")
+ version("1.1.0", sha256="2a92adda3992aa7cbad758ef0b8dfeaedebb49338b772c64ddf369d78c1c51d3")
version("1.0.9", sha256="95df50570f38e720fb79976f603761ae6eff761613eb56f258c3cb6bab4fd5e3")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("kbproto")
+ depends_on("kbproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxkbui/package.py b/var/spack/repos/builtin/packages/libxkbui/package.py
index 4167ed1629..cb8a9cf602 100644
--- a/var/spack/repos/builtin/packages/libxkbui/package.py
+++ b/var/spack/repos/builtin/packages/libxkbui/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Libxkbui(AutotoolsPackage, XorgPackage):
"""X.org libxkbui library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libxkbui/"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libxkbui/"
xorg_mirror_path = "lib/libxkbui-1.0.2.tar.gz"
version("1.0.2", sha256="196ab4867f3754caae34e51a663cbce26b4af819db3960f1fc4fb42c6a3c535d")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxt")
depends_on("libxkbfile")
diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py
index c953c32e84..a07f0c1b6a 100644
--- a/var/spack/repos/builtin/packages/libxml2/package.py
+++ b/var/spack/repos/builtin/packages/libxml2/package.py
@@ -4,7 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-import spack.builder
+import llnl.util.filesystem as fs
+
from spack.build_systems import autotools, nmake
from spack.package import *
@@ -14,7 +15,7 @@ class Libxml2(AutotoolsPackage, NMakePackage):
project (but usable outside of the Gnome platform), it is free
software available under the MIT License."""
- homepage = "http://xmlsoft.org"
+ homepage = "https://gitlab.gnome.org/GNOME/libxml2/-/wikis"
url = "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.13.tar.xz"
list_url = "https://gitlab.gnome.org/GNOME/libxml2/-/releases"
@@ -28,19 +29,42 @@ class Libxml2(AutotoolsPackage, NMakePackage):
license("MIT")
- version("2.10.3", sha256="5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c")
- version("2.10.2", sha256="d240abe6da9c65cb1900dd9bf3a3501ccf88b3c2a1cb98317d03f272dda5b265")
- version("2.10.1", sha256="21a9e13cc7c4717a6c36268d0924f92c3f67a1ece6b7ff9d588958a6db9fb9d8")
- version("2.9.14", sha256="60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee")
- version("2.9.13", sha256="276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e")
- version("2.9.12", sha256="c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92")
- version("2.9.11", sha256="886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331")
- version("2.9.10", sha256="aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f")
- version("2.9.9", sha256="94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871")
- version("2.9.8", sha256="0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732")
- version("2.9.4", sha256="ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c")
- version("2.9.2", sha256="5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc")
- version("2.7.8", sha256="cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec")
+ version("2.13.4", sha256="65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650")
+ version("2.12.9", sha256="59912db536ab56a3996489ea0299768c7bcffe57169f0235e7f962a91f483590")
+ version("2.11.9", sha256="780157a1efdb57188ec474dca87acaee67a3a839c2525b2214d318228451809f")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-25062
+ version(
+ "2.10.3", sha256="5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c"
+ )
+ version(
+ "2.10.2", sha256="d240abe6da9c65cb1900dd9bf3a3501ccf88b3c2a1cb98317d03f272dda5b265"
+ )
+ version(
+ "2.10.1", sha256="21a9e13cc7c4717a6c36268d0924f92c3f67a1ece6b7ff9d588958a6db9fb9d8"
+ )
+ version(
+ "2.9.14", sha256="60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
+ )
+ version(
+ "2.9.13", sha256="276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e"
+ )
+ version(
+ "2.9.12", sha256="c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92"
+ )
+ version(
+ "2.9.11", sha256="886f696d5d5b45d780b2880645edf9e0c62a4fd6841b853e824ada4e02b4d331"
+ )
+ version(
+ "2.9.10", sha256="aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f"
+ )
+ version("2.9.9", sha256="94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871")
+ version("2.9.8", sha256="0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732")
+ version("2.9.4", sha256="ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c")
+ version("2.9.2", sha256="5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc")
+ version("2.7.8", sha256="cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec")
+
+ depends_on("c", type="build")
variant("python", default=False, description="Enable Python support")
variant("shared", default=True, description="Build shared library")
@@ -200,16 +224,16 @@ class Libxml2(AutotoolsPackage, NMakePackage):
xmllint("--dtdvalid", dtd_path, data_dir.join("info.xml"))
-class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
+class AnyBuilder(BaseBuilder):
@run_after("install")
@on_package_attributes(run_tests=True)
def import_module_test(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
with working_dir("spack-test", create=True):
python("-c", "import libxml2")
-class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
+class AutotoolsBuilder(AnyBuilder, autotools.AutotoolsBuilder):
def configure_args(self):
spec = self.spec
@@ -218,7 +242,7 @@ class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
"--with-iconv={0}".format(spec["iconv"].prefix),
]
- if "+python" in spec:
+ if spec.satisfies("+python"):
args.extend(
[
"--with-python={0}".format(spec["python"].home),
@@ -235,7 +259,7 @@ class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
return args
-class NMakeBuilder(BaseBuilder, nmake.NMakeBuilder):
+class NMakeBuilder(AnyBuilder, nmake.NMakeBuilder):
phases = ("configure", "build", "install")
@property
@@ -244,20 +268,31 @@ class NMakeBuilder(BaseBuilder, nmake.NMakeBuilder):
@property
def build_directory(self):
- return os.path.join(self.stage.source_path, "win32")
+ return fs.windows_sfn(os.path.join(self.stage.source_path, "win32"))
def configure(self, pkg, spec, prefix):
with working_dir(self.build_directory):
opts = [
- "prefix=%s" % prefix,
+ "prefix=%s" % fs.windows_sfn(prefix),
"compiler=msvc",
"iconv=no",
"zlib=yes",
"lzma=yes",
- "lib=%s" % ";".join((spec["zlib-api"].prefix.lib, spec["xz"].prefix.lib)),
+ "lib=%s"
+ % ";".join(
+ (
+ fs.windows_sfn(spec["zlib-api"].prefix.lib),
+ fs.windows_sfn(spec["xz"].prefix.lib),
+ )
+ ),
"include=%s"
- % ";".join((spec["zlib-api"].prefix.include, spec["xz"].prefix.include)),
+ % ";".join(
+ (
+ fs.windows_sfn(spec["zlib-api"].prefix.include),
+ fs.windows_sfn(spec["xz"].prefix.include),
+ )
+ ),
]
- if "+python" in spec:
+ if spec.satisfies("+python"):
opts.append("python=yes")
cscript("configure.js", *opts)
diff --git a/var/spack/repos/builtin/packages/libxmu/package.py b/var/spack/repos/builtin/packages/libxmu/package.py
index 42e8a75923..2d740fd1bd 100644
--- a/var/spack/repos/builtin/packages/libxmu/package.py
+++ b/var/spack/repos/builtin/packages/libxmu/package.py
@@ -12,18 +12,25 @@ class Libxmu(AutotoolsPackage, XorgPackage):
that it may be layered on top of any proprietary implementation of Xlib
or Xt."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXmu"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXmu"
xorg_mirror_path = "lib/libXmu-1.1.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.2.1", sha256="bf0902583dd1123856c11e0a5085bd3c6e9886fbbd44954464975fd7d52eb599")
+ version("1.2.0", sha256="b4686c4b4570044bcfc35bfaa3edbe68185ddf8e3250387f74a140c8e45afb2f")
version("1.1.4", sha256="3091d711cdc1d8ea0f545a13b90d1464c3c3ab64778fd121f0d789b277a80289")
version("1.1.2", sha256="e5fd4bacef068f9509b8226017205040e38d3fba8d2de55037200e7176c13dba")
+ depends_on("c", type="build")
+
depends_on("libxt")
+ depends_on("libxt@1.1:", when="@1.2:")
depends_on("libxext")
depends_on("libx11")
- depends_on("xextproto")
+ depends_on("xextproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxp/package.py b/var/spack/repos/builtin/packages/libxp/package.py
index 5237e9c094..38f97cc0a5 100644
--- a/var/spack/repos/builtin/packages/libxp/package.py
+++ b/var/spack/repos/builtin/packages/libxp/package.py
@@ -9,16 +9,21 @@ from spack.package import *
class Libxp(AutotoolsPackage, XorgPackage):
"""libXp - X Print Client Library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXp"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXp"
xorg_mirror_path = "lib/libXp-1.0.3.tar.gz"
+ maintainers("wdconinc")
+
+ version("1.0.4", sha256="05e46af1ccb68f1752cca5879774a4fb9bf3b19fe088eb745034956e0c6fadba")
version("1.0.3", sha256="f6b8cc4ef05d3eafc9ef5fc72819dd412024b4ed60197c0d5914758125817e9c")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
depends_on("libxext")
depends_on("libxau")
- depends_on("xextproto")
- depends_on("printproto")
+ depends_on("xextproto", type="build")
+ depends_on("printproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py
index 8031fef998..93fa947ce5 100644
--- a/var/spack/repos/builtin/packages/libxpm/package.py
+++ b/var/spack/repos/builtin/packages/libxpm/package.py
@@ -9,11 +9,18 @@ from spack.package import *
class Libxpm(AutotoolsPackage, XorgPackage):
"""libXpm - X Pixmap (XPM) image file format library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXpm"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXpm"
xorg_mirror_path = "lib/libXpm-3.5.12.tar.gz"
license("X11")
+ maintainers("wdconinc")
+
+ version("3.5.17", sha256="959466c7dfcfcaa8a65055bfc311f74d4c43d9257900f85ab042604d286df0c6")
+ version("3.5.16", sha256="43a70e6f9b67215fb223ca270d83bdcb868c513948441d5b781ea0765df6bfb4")
+ version("3.5.15", sha256="2a9bd419e31270593e59e744136ee2375ae817322447928d2abb6225560776f9")
+ version("3.5.14", sha256="18861cc64dfffc0e7fe317b0eeb935adf64858fd5d82004894c4906d909dabf8")
+ version("3.5.13", sha256="e3dfb0fb8c1f127432f2a498c7856b37ce78a61e8da73f1aab165a73dd97ad00")
version("3.5.12", sha256="2523acc780eac01db5163267b36f5b94374bfb0de26fc0b5a7bee76649fd8501")
version("3.5.11", sha256="53ddf924441b7ed2de994d4934358c13d9abf4828b1b16e1255ade5032b31df7")
version("3.5.10", sha256="f73f06928a140fd2090c439d1d55c6682095044495af6bf886f8e66cf21baee5")
@@ -21,10 +28,13 @@ class Libxpm(AutotoolsPackage, XorgPackage):
version("3.5.8", sha256="06472c7fdd175ea54c84162a428be19c154e7dda03d8bf91beee7f1d104669a6")
version("3.5.7", sha256="422fbb311c4fe6ef337e937eb3adc8617a4320bd3e00fce06850d4360829b3ae")
+ depends_on("c", type="build")
+
depends_on("gettext")
depends_on("libx11")
- depends_on("xproto")
+ depends_on("xproto", type="build")
+ depends_on("ncompress", when="@3.5.15")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxpresent/package.py b/var/spack/repos/builtin/packages/libxpresent/package.py
index eb800d0dbe..e8cf21f0af 100644
--- a/var/spack/repos/builtin/packages/libxpresent/package.py
+++ b/var/spack/repos/builtin/packages/libxpresent/package.py
@@ -10,22 +10,27 @@ class Libxpresent(AutotoolsPackage, XorgPackage):
"""This package contains header files and documentation for the Present
extension. Library and server implementations are separate."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXpresent/"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXpresent/"
xorg_mirror_path = "lib/libXpresent-1.0.0.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.0.1", sha256="8ebf8567a8f6afe5a64275a2ecfd4c84e957970c27299d964350f60be9f3541d")
version("1.0.0", sha256="92f1bdfb67ae2ffcdb25ad72c02cac5e4912dc9bc792858240df1d7f105946fa")
+ depends_on("c", type="build")
+
depends_on("libx11", type="link")
depends_on("libxext", type="link")
depends_on("libxfixes", type="link")
depends_on("libxrandr", type="link")
- depends_on("xproto")
- depends_on("presentproto@1.0:")
- depends_on("xextproto")
- depends_on("fixesproto")
- depends_on("randrproto")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("presentproto@1.0:", type=("build", "link"))
+ depends_on("xextproto", type="build")
+ depends_on("fixesproto", type="build")
+ depends_on("randrproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxprintapputil/package.py b/var/spack/repos/builtin/packages/libxprintapputil/package.py
index 990e29e18f..582106f9d3 100644
--- a/var/spack/repos/builtin/packages/libxprintapputil/package.py
+++ b/var/spack/repos/builtin/packages/libxprintapputil/package.py
@@ -9,16 +9,18 @@ from spack.package import *
class Libxprintapputil(AutotoolsPackage, XorgPackage):
"""Xprint application utility routines."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintAppUtil/"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXprintAppUtil/"
xorg_mirror_path = "lib/libXprintAppUtil-1.0.1.tar.gz"
version("1.0.1", sha256="5af3939ffe15508b942bc1e325a29a95b1c85e8900a5f65a896101e63048bbf7")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxp")
depends_on("libxprintutil")
depends_on("libxau")
- depends_on("printproto")
+ depends_on("printproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxprintutil/package.py b/var/spack/repos/builtin/packages/libxprintutil/package.py
index c23f59de90..d2c671183d 100644
--- a/var/spack/repos/builtin/packages/libxprintutil/package.py
+++ b/var/spack/repos/builtin/packages/libxprintutil/package.py
@@ -9,16 +9,18 @@ from spack.package import *
class Libxprintutil(AutotoolsPackage, XorgPackage):
"""Xprint application utility routines."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXprintUtil/"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXprintUtil/"
xorg_mirror_path = "lib/libXprintUtil-1.0.1.tar.gz"
version("1.0.1", sha256="220924216f98ef8f7aa4cff33629edb1171ad10f8ea302a1eb85055545d4d195")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxp")
depends_on("libxt")
depends_on("libxau")
- depends_on("printproto")
+ depends_on("printproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxrandr/package.py b/var/spack/repos/builtin/packages/libxrandr/package.py
index 868b616e45..01e28d012d 100644
--- a/var/spack/repos/builtin/packages/libxrandr/package.py
+++ b/var/spack/repos/builtin/packages/libxrandr/package.py
@@ -9,21 +9,26 @@ from spack.package import *
class Libxrandr(AutotoolsPackage, XorgPackage):
"""libXrandr - X Resize, Rotate and Reflection extension library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXrandr"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXrandr"
xorg_mirror_path = "lib/libXrandr-1.5.0.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.5.4", sha256="c72c94dc3373512ceb67f578952c5d10915b38cc9ebb0fd176a49857b8048e22")
version("1.5.3", sha256="3ad316c1781fe2fe22574b819e81f0eff087a8560377f521ba932238b41b251f")
version("1.5.0", sha256="1b594a149e6b124aab7149446f2fd886461e2935eca8dca43fe83a70cf8ec451")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
depends_on("libxext")
depends_on("libxrender")
- depends_on("randrproto@1.5:")
- depends_on("xextproto")
- depends_on("renderproto")
+ depends_on("randrproto@1.5:", type=("build", "link"))
+ depends_on("xextproto", type="build")
+ depends_on("renderproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxrender/package.py b/var/spack/repos/builtin/packages/libxrender/package.py
index 9aee8a7e24..a01b8e8677 100644
--- a/var/spack/repos/builtin/packages/libxrender/package.py
+++ b/var/spack/repos/builtin/packages/libxrender/package.py
@@ -9,17 +9,22 @@ from spack.package import *
class Libxrender(AutotoolsPackage, XorgPackage):
"""libXrender - library for the Render Extension to the X11 protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXrender"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXrender"
xorg_mirror_path = "lib/libXrender-0.9.10.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("0.9.11", sha256="6aec3ca02e4273a8cbabf811ff22106f641438eb194a12c0ae93c7e08474b667")
version("0.9.10", sha256="770527cce42500790433df84ec3521e8bf095dfe5079454a92236494ab296adf")
version("0.9.9", sha256="beeac64ff8d225f775019eb7c688782dee9f4cc7b412a65538f8dde7be4e90fe")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
- depends_on("renderproto@0.9:")
+ depends_on("renderproto@0.9:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxres/package.py b/var/spack/repos/builtin/packages/libxres/package.py
index 4e2aef0245..946c900c13 100644
--- a/var/spack/repos/builtin/packages/libxres/package.py
+++ b/var/spack/repos/builtin/packages/libxres/package.py
@@ -9,17 +9,26 @@ from spack.package import *
class Libxres(AutotoolsPackage, XorgPackage):
"""libXRes - X-Resource extension client library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXRes"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXRes"
xorg_mirror_path = "lib/libXres-1.0.7.tar.gz"
license("custom")
+ maintainers("wdconinc")
+
+ version("1.2.2", sha256="8abce597ced4a7ab89032aee91f6f784d9960adc772b2b59f17e515cd4127950")
+ version("1.2.1", sha256="918fb33c3897b389a1fbb51571c5c04c6b297058df286d8b48faa5af85e88bcc")
+ version("1.2.0", sha256="5b62feee09f276d74054787df030fceb41034de84174abec6d81c591145e043a")
version("1.0.7", sha256="488c9fa14b38f794d1f019fe62e6b06514a39f1a7538e55ece8faf22482fefcd")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("resourceproto@1.0:")
+ depends_on("xextproto", type="build")
+ depends_on("resourceproto@1.0:", type="build", when="@1.0")
+ depends_on("resourceproto@1.2:", type="build", when="@1.2")
+
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxscrnsaver/package.py b/var/spack/repos/builtin/packages/libxscrnsaver/package.py
index f8080b14b7..df5823230c 100644
--- a/var/spack/repos/builtin/packages/libxscrnsaver/package.py
+++ b/var/spack/repos/builtin/packages/libxscrnsaver/package.py
@@ -9,17 +9,23 @@ from spack.package import *
class Libxscrnsaver(AutotoolsPackage, XorgPackage):
"""XScreenSaver - X11 Screen Saver extension client library"""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXScrnSaver"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXScrnSaver"
xorg_mirror_path = "lib/libXScrnSaver-1.2.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.2.4", sha256="0656b2630475104d6df75d91ebb8e0153e61d14e9871ef1f403bcda4a62a838a")
+ version("1.2.3", sha256="4f74e7e412144591d8e0616db27f433cfc9f45aae6669c6c4bb03e6bf9be809a")
version("1.2.2", sha256="e12ba814d44f7b58534c0d8521e2d4574f7bf2787da405de4341c3b9f4cc8d96")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("scrnsaverproto@1.2:")
+ depends_on("xextproto", type="build")
+ depends_on("scrnsaverproto@1.2:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py
index fa05f7ee59..11005334f1 100644
--- a/var/spack/repos/builtin/packages/libxshmfence/package.py
+++ b/var/spack/repos/builtin/packages/libxshmfence/package.py
@@ -13,14 +13,25 @@ class Libxshmfence(AutotoolsPackage, XorgPackage):
with the X SyncFence objects that can be shared between processes
using file descriptor passing."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libxshmfence/"
- xorg_mirror_path = "lib/libxshmfence-1.3.tar.bz2"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libxshmfence"
+ xorg_mirror_path = "lib/libxshmfence-1.3.2.tar.xz"
license("MIT")
+ version("1.3.2", sha256="870df257bc40b126d91b5a8f1da6ca8a524555268c50b59c0acd1a27f361606f")
+ version("1.3.1", sha256="1129f95147f7bfe6052988a087f1b7cb7122283d2c47a7dbf7135ce0df69b4f8")
version("1.3", sha256="b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7")
version("1.2", sha256="d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
+
+ def url_for_version(self, version):
+ url = super().url_for_version(version)
+ if version <= Version("1.3"):
+ return url.replace("xz", "bz2")
+
+ return url
diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py
index 102d5d2d34..9c24949814 100644
--- a/var/spack/repos/builtin/packages/libxslt/package.py
+++ b/var/spack/repos/builtin/packages/libxslt/package.py
@@ -13,17 +13,31 @@ class Libxslt(AutotoolsPackage):
implements most of the EXSLT set of processor-portable extensions functions
and some of Saxon's evaluate and expressions extensions."""
- homepage = "http://www.xmlsoft.org/XSLT/index.html"
- url = "http://xmlsoft.org/sources/libxslt-1.1.32.tar.gz"
+ homepage = "https://gitlab.gnome.org/GNOME/libxslt/-/wikis/home"
+ url = "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.34.tar.xz"
+ git = "https://gitlab.gnome.org/GNOME/libxslt"
+ list_url = "https://download.gnome.org/sources/libxslt/"
+ list_depth = 1
- license("X11")
+ license("X11", checked_by="wdconinc")
+ version("1.1.42", sha256="85ca62cac0d41fc77d3f6033da9df6fd73d20ea2fc18b0a3609ffb4110e1baeb")
+ version("1.1.41", sha256="3ad392af91115b7740f7b50d228cc1c5fc13afc1da7f16cb0213917a37f71bda")
+ version("1.1.40", sha256="194715db023035f65fb566402f2ad2b5eab4c29d541f511305c40b29b1f48d13")
+ version("1.1.39", sha256="2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0")
+ version("1.1.38", sha256="1f32450425819a09acaff2ab7a5a7f8a2ec7956e505d7beeb45e843d0e1ecab1")
+ version("1.1.37", sha256="3a4b27dc8027ccd6146725950336f1ec520928f320f144eb5fa7990ae6123ab4")
+ version("1.1.36", sha256="12848f0a4408f65b530d3962cd9ff670b6ae796191cfeff37522b5772de8dc8e")
+ version("1.1.35", sha256="8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79")
+ version("1.1.34", sha256="98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f")
version("1.1.33", sha256="8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8")
version("1.1.32", sha256="526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460")
version("1.1.29", sha256="b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce")
version("1.1.28", sha256="5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c")
version("1.1.26", sha256="55dd52b42861f8a02989d701ef716d6280bfa02971e967c285016f99c66e3db1")
+ depends_on("c", type="build")
+
variant("crypto", default=True, description="Build libexslt with crypto support")
variant("python", default=False, description="Build Python bindings")
@@ -38,15 +52,21 @@ class Libxslt(AutotoolsPackage):
depends_on("python+shared", when="+python")
extends("python", when="+python")
+ def url_for_version(self, v):
+ if v > Version("1.1.34"):
+ return f"https://download.gnome.org/sources/libxslt/{v.up_to(2)}/libxslt-{v}.tar.xz"
+ else:
+ return f"http://xmlsoft.org/sources/libxslt-{v}.tar.gz"
+
def configure_args(self):
args = []
- if "+crypto" in self.spec:
+ if self.spec.satisfies("+crypto"):
args.append("--with-crypto")
else:
args.append("--without-crypto")
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
args.append("--with-python={0}".format(self.spec["python"].home))
else:
args.append("--without-python")
@@ -56,7 +76,7 @@ class Libxslt(AutotoolsPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def import_module_test(self):
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
with working_dir("spack-test", create=True):
python("-c", "import libxslt")
diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py
index 71e60f7703..14e287a918 100644
--- a/var/spack/repos/builtin/packages/libxsmm/package.py
+++ b/var/spack/repos/builtin/packages/libxsmm/package.py
@@ -27,8 +27,12 @@ class Libxsmm(MakefilePackage):
# after 2.0 release.
version("main-2023-11", commit="0d9be905527ba575c14ca5d3b4c9673916c868b2")
version("main", branch="main")
-
- version("1.17", sha256="8b642127880e92e8a75400125307724635ecdf4020ca4481e5efe7640451bb92")
+ version("1.17-cp2k", commit="6f883620f58afdeebab28039fc9cf580e76a5ec6")
+ version(
+ "1.17",
+ sha256="8b642127880e92e8a75400125307724635ecdf4020ca4481e5efe7640451bb92",
+ preferred=True,
+ )
version("1.16.3", sha256="e491ccadebc5cdcd1fc08b5b4509a0aba4e2c096f53d7880062a66b82a0baf84")
version("1.16.2", sha256="bdc7554b56b9e0a380fc9c7b4f4394b41be863344858bc633bc9c25835c4c64e")
version("1.16.1", sha256="93dc7a3ec40401988729ddb2c6ea2294911261f7e6cd979cf061b5c3691d729d")
@@ -63,6 +67,10 @@ class Libxsmm(MakefilePackage):
version("1.4.1", sha256="c19be118694c9b4e9a61ef4205b1e1a7e0c400c07f9bce65ae430d2dc2be5fe1")
version("1.4", sha256="cf483a370d802bd8800c06a12d14d2b4406a745c8a0b2c8722ccc992d0cd72dd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=False, description="With shared libraries (and static libraries).")
variant("debug", default=False, description="With call-trace (LIBXSMM_TRACE); unoptimized.")
variant(
@@ -109,14 +117,17 @@ class Libxsmm(MakefilePackage):
"CXX={0}".format(spack_cxx),
"FC={0}".format(spack_fc),
"PREFIX=%s" % prefix,
- "SYM=1",
]
+ if spec.target.family == "aarch64":
+ make_args += ["PLATFORM=1"]
+ else:
+ make_args += ["SYM=1"]
# JIT (AVX and later) makes MNK, M, N, or K spec. superfluous
# make_args += ['MNK=1 4 5 6 8 9 13 16 17 22 23 24 26 32']
# include call trace as the build is already de-optimized
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
make_args += ["DBG=1"]
make_args += ["TRACE=1"]
@@ -124,10 +135,10 @@ class Libxsmm(MakefilePackage):
if blas_val != "default":
make_args += ["BLAS={0}".format(blas_val)]
- if "+large_jit_buffer" in spec:
+ if spec.satisfies("+large_jit_buffer"):
make_args += ["CODE_BUF_MAXSIZE=262144"]
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
make(*(make_args + ["STATIC=0"]))
# builds static libraries by default
@@ -144,16 +155,16 @@ class Libxsmm(MakefilePackage):
# always install libraries
install_tree("lib", prefix.lib)
- if "+header-only" in spec:
+ if spec.satisfies("+header-only"):
install_tree("src", prefix.src)
- if "+generator" in spec:
+ if spec.satisfies("+generator"):
install_tree("bin", prefix.bin)
mkdirp(prefix.doc)
install(join_path("documentation", "*.md"), prefix.doc)
install(join_path("documentation", "*.pdf"), prefix.doc)
- if "@1.8.2:" in spec:
+ if spec.satisfies("@1.8.2:"):
install("LICENSE.md", prefix.doc)
else:
install("README.md", prefix.doc)
diff --git a/var/spack/repos/builtin/packages/libxstream/package.py b/var/spack/repos/builtin/packages/libxstream/package.py
index 6cf99d4390..8002a7ace6 100644
--- a/var/spack/repos/builtin/packages/libxstream/package.py
+++ b/var/spack/repos/builtin/packages/libxstream/package.py
@@ -18,6 +18,9 @@ class Libxstream(Package):
version("0.9.0", sha256="03365f23b337533b8e5a049a24bc5a91c0f1539dd042ca5312abccc8f713b473")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def patch(self):
kwargs = {"ignore_absent": False, "backup": True, "string": True}
makefile = FileFilter("Makefile.inc")
diff --git a/var/spack/repos/builtin/packages/libxt/package.py b/var/spack/repos/builtin/packages/libxt/package.py
index bcc0e2e477..96693ebecd 100644
--- a/var/spack/repos/builtin/packages/libxt/package.py
+++ b/var/spack/repos/builtin/packages/libxt/package.py
@@ -9,19 +9,26 @@ from spack.package import *
class Libxt(AutotoolsPackage, XorgPackage):
"""libXt - X Toolkit Intrinsics library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXt"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXt"
xorg_mirror_path = "lib/libXt-1.1.5.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.3.0", sha256="de4a80c4cc7785b9620e572de71026805f68e85a2bf16c386009ef0e50be3f77")
+ version("1.2.1", sha256="6da1bfa9dd0ed87430a5ce95b129485086394df308998ebe34d98e378e3dfb33")
+ version("1.2.0", sha256="d4bee88898fc5e1dc470e361430c72fbc529b9cdbbb6c0ed3affea3a39f97d8d")
version("1.1.5", sha256="b59bee38a9935565fa49dc1bfe84cb30173e2e07e1dcdf801430d4b54eb0caa3")
+ depends_on("c", type="build")
+
depends_on("libsm")
depends_on("libice")
depends_on("libx11")
- depends_on("xproto")
- depends_on("kbproto")
+ depends_on("xproto", type=("build", "link"))
+ depends_on("kbproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxtrap/package.py b/var/spack/repos/builtin/packages/libxtrap/package.py
index 7027e0e6e4..2ce4055623 100644
--- a/var/spack/repos/builtin/packages/libxtrap/package.py
+++ b/var/spack/repos/builtin/packages/libxtrap/package.py
@@ -18,16 +18,18 @@ class Libxtrap(AutotoolsPackage, XorgPackage):
As X11R6 was released in 1994, XTrap has now been deprecated for over
15 years, and uses of it should be quite rare."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXTrap"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXTrap"
xorg_mirror_path = "lib/libXTrap-1.0.1.tar.gz"
version("1.0.1", sha256="db748e299dcc9af68428795b898a4a96cf806f79b75786781136503e4fce5e17")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxt")
depends_on("libxext")
- depends_on("trapproto")
- depends_on("xextproto")
+ depends_on("trapproto", type=("build", "link"))
+ depends_on("xextproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxtst/package.py b/var/spack/repos/builtin/packages/libxtst/package.py
index 6cb5e98687..62d914daac 100644
--- a/var/spack/repos/builtin/packages/libxtst/package.py
+++ b/var/spack/repos/builtin/packages/libxtst/package.py
@@ -18,20 +18,26 @@ class Libxtst(AutotoolsPackage, XorgPackage):
The RECORD extension supports the recording and reporting of all
core X protocol and arbitrary X extension protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXtst"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXtst"
xorg_mirror_path = "lib/libXtst-1.2.2.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.2.4", sha256="01366506aeb033f6dffca5326af85f670746b0cabbfd092aabefb046cf48c445")
+ version("1.2.3", sha256="a0c83acce02d4923018c744662cb28eb0dbbc33b4adc027726879ccf68fbc2c2")
version("1.2.2", sha256="221838960c7b9058cd6795c1c3ee8e25bae1c68106be314bc3036a4f26be0e6c")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext@1.0.99.4:")
depends_on("libxi")
- depends_on("recordproto@1.13.99.1:")
- depends_on("xextproto@7.0.99.3:")
- depends_on("inputproto")
- depends_on("fixesproto")
+ depends_on("recordproto@1.13.99.1:", type=("build", "link"))
+ depends_on("xextproto@7.0.99.3:", type="build")
+ depends_on("inputproto", type="build")
+ depends_on("fixesproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxv/package.py b/var/spack/repos/builtin/packages/libxv/package.py
index 8cd6b4d328..c0ea897606 100644
--- a/var/spack/repos/builtin/packages/libxv/package.py
+++ b/var/spack/repos/builtin/packages/libxv/package.py
@@ -10,17 +10,23 @@ class Libxv(AutotoolsPackage, XorgPackage):
"""libXv - library for the X Video (Xv) extension to the
X Window System."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXv"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXv"
xorg_mirror_path = "lib/libXv-1.0.10.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.0.12", sha256="ce706619a970a580a0e35e9b5c98bdd2af243ac6494c65f44608a89a86100126")
+ version("1.0.11", sha256="c4112532889b210e21cf05f46f0f2f8354ff7e1b58061e12d7a76c95c0d47bb1")
version("1.0.10", sha256="89a664928b625558268de81c633e300948b3752b0593453d7815f8775bab5293")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
depends_on("libxext")
- depends_on("xextproto")
- depends_on("videoproto")
+ depends_on("xextproto", type="build")
+ depends_on("videoproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxvmc/package.py b/var/spack/repos/builtin/packages/libxvmc/package.py
index 8f7a107014..d3e9510923 100644
--- a/var/spack/repos/builtin/packages/libxvmc/package.py
+++ b/var/spack/repos/builtin/packages/libxvmc/package.py
@@ -9,18 +9,27 @@ from spack.package import *
class Libxvmc(AutotoolsPackage, XorgPackage):
"""X.org libXvMC library."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXvMC"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXvMC"
xorg_mirror_path = "lib/libXvMC-1.0.9.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.0.14", sha256="3ad5d2b991219e2bf9b2f85d40b12c16f1afec038715e462f6058af73a9b5ef8")
+ version("1.0.13", sha256="e630b4373af8c67a7c8f07ebe626a1269a613d262d1f737b57231a06f7c34b4e")
+ version("1.0.12", sha256="024c9ec4f001f037eeca501ee724c7e51cf287eb69ced8c6126e16e7fa9864b5")
+ version("1.0.11", sha256="0b931d216b23b95df87cc65f7bb7acef4120d9263adb0a4d90856ba1f7a390da")
+ version("1.0.10", sha256="d8306f71c798d10409bb181b747c2644e1d60c05773c742c12304ab5aa5c8436")
version("1.0.9", sha256="090f087fe65b30b3edfb996c79ff6cf299e473fb25e955fff1c4e9cb624da2c2")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
depends_on("libxext")
depends_on("libxv")
- depends_on("xextproto")
- depends_on("videoproto")
+ depends_on("xextproto", type=("build", "link"))
+ depends_on("videoproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxxf86dga/package.py b/var/spack/repos/builtin/packages/libxxf86dga/package.py
index f3f3f260bb..65c8709949 100644
--- a/var/spack/repos/builtin/packages/libxxf86dga/package.py
+++ b/var/spack/repos/builtin/packages/libxxf86dga/package.py
@@ -9,18 +9,24 @@ from spack.package import *
class Libxxf86dga(AutotoolsPackage, XorgPackage):
"""libXxf86dga - Client library for the XFree86-DGA extension."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXxf86dga"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXxf86dga"
xorg_mirror_path = "lib/libXxf86dga-1.1.4.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.6", sha256="87c7482b1e29b4eeb415815641c4f69c00545a8138e1b73ff1f361f7d9c22ac4")
+ version("1.1.5", sha256="715e2bf5caf6276f0858eb4b11a1aef1a26beeb40dce2942387339da395bef69")
version("1.1.4", sha256="e6361620a15ceba666901ca8423e8be0c6ed0271a7088742009160349173766b")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xproto")
- depends_on("xextproto")
- depends_on("xf86dgaproto@2.0.99.2:")
+ depends_on("xproto", type="build")
+ depends_on("xextproto", type="build")
+ depends_on("xf86dgaproto@2.0.99.2:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxxf86misc/package.py b/var/spack/repos/builtin/packages/libxxf86misc/package.py
index 27e06c05fd..331ddc0564 100644
--- a/var/spack/repos/builtin/packages/libxxf86misc/package.py
+++ b/var/spack/repos/builtin/packages/libxxf86misc/package.py
@@ -9,17 +9,21 @@ from spack.package import *
class Libxxf86misc(AutotoolsPackage, XorgPackage):
"""libXxf86misc - Extension library for the XFree86-Misc X extension."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXxf86misc"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXxf86misc"
xorg_mirror_path = "lib/libXxf86misc-1.0.3.tar.gz"
+ maintainers("wdconinc")
+
version("1.0.4", sha256="63a68b2fafd03236f9b0135de21976e9194d6d811ca2fd774c13a6b4be576676")
version("1.0.3", sha256="358f692f793af00f6ef4c7a8566c1bcaeeea37e417337db3f519522cc1df3946")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
- depends_on("xproto")
- depends_on("xextproto")
- depends_on("xf86miscproto")
+ depends_on("xproto", type="build")
+ depends_on("xextproto", type="build")
+ depends_on("xf86miscproto", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libxxf86vm/package.py b/var/spack/repos/builtin/packages/libxxf86vm/package.py
index 9f27ccd63d..eef44998cd 100644
--- a/var/spack/repos/builtin/packages/libxxf86vm/package.py
+++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py
@@ -9,19 +9,24 @@ from spack.package import *
class Libxxf86vm(AutotoolsPackage, XorgPackage):
"""libXxf86vm - Extension library for the XFree86-VidMode X extension."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libXxf86vm"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libXxf86vm"
xorg_mirror_path = "lib/libXxf86vm-1.1.4.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.5", sha256="f3f1c29fef8accb0adbd854900c03c6c42f1804f2bc1e4f3ad7b2e1f3b878128")
version("1.1.4", sha256="5108553c378a25688dcb57dca383664c36e293d60b1505815f67980ba9318a99")
+ depends_on("c", type="build")
+
depends_on("libx11@1.6:")
depends_on("libxext")
- depends_on("xproto")
- depends_on("xextproto")
- depends_on("xf86vidmodeproto@2.2.99.1:")
+ depends_on("xproto", type="build")
+ depends_on("xextproto", type="build")
+ depends_on("xf86vidmodeproto@2.2.99.1:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/libyaml/package.py b/var/spack/repos/builtin/packages/libyaml/package.py
index e3f46d0367..47cb115709 100644
--- a/var/spack/repos/builtin/packages/libyaml/package.py
+++ b/var/spack/repos/builtin/packages/libyaml/package.py
@@ -29,6 +29,8 @@ class Libyaml(AutotoolsPackage):
version("0.1.2", sha256="5beb94529cc7ac79b17e354f9b03aea311f5af17be5d48bc39e6f1db5059f70f")
version("0.1.1", sha256="76444692a94de4e6776a1bdf3b735e8f016bb374ae7c60496f8032fdc6085889")
+ depends_on("c", type="build") # generated
+
depends_on("automake", when="@master")
depends_on("autoconf", when="@master")
depends_on("libtool", when="@master")
diff --git a/var/spack/repos/builtin/packages/libyogrt/package.py b/var/spack/repos/builtin/packages/libyogrt/package.py
index f63d1736b9..d18dd7b31b 100644
--- a/var/spack/repos/builtin/packages/libyogrt/package.py
+++ b/var/spack/repos/builtin/packages/libyogrt/package.py
@@ -16,6 +16,7 @@ class Libyogrt(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("1.35", sha256="a03b3d24da49af626351aaca9ab3eaff102ed41d5171f1bcb2ff26a561bd0cd6")
version("1.33", sha256="797d20c49cdc4f6beae8660b4f41ba7ac13f7e93a0344b47f0bdc64f780d1398")
version("1.27", sha256="c57ce60770b61aa20bc83fe34ff52b5e444964338df3786f282d0d9bcdd26138")
version("1.24", sha256="36695030e72b24b1f22bfcfe42bfd1d3c87f9c0eea5e94ce0120782581ea522f")
@@ -29,6 +30,9 @@ class Libyogrt(AutotoolsPackage):
version("1.20-3", sha256="61a8f28f452aef0e09d700dbaaffd91ae3855f7ac221c7ebe478a028df635e31")
version("1.20-2", sha256="bf22a82ab3bfede780be3fb6c132cc354234f8d57d3cccd58fe594f074ed7f95")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# libyogrt supports the following schedulers:
# flux, lcrm, lsf, moab, slurm, AIX+slurm
@@ -57,7 +61,7 @@ class Libyogrt(AutotoolsPackage):
def url_for_version(self, version):
if version < Version("1.21"):
- return "https://github.com/LLNL/libyogrt/archive/%s.tar.gz" % version
+ return f"https://github.com/LLNL/libyogrt/archive/{version}.tar.gz"
else:
return "https://github.com/LLNL/libyogrt/releases/download/{0}/libyogrt-{0}.tar.gz".format(
version
@@ -82,11 +86,11 @@ class Libyogrt(AutotoolsPackage):
args.append("--with-lsf")
args.append("LIBS=-llsf -lrt -lnsl")
elif sched == "flux":
- args.append("--with-flux=%s" % (self.spec["flux-core"].prefix))
+ args.append(f"--with-flux={self.spec['flux-core'].prefix}")
elif sched != "system":
- args.append("--with-%s=%s" % (sched, self.spec[sched].prefix))
+ args.append(f"--with-{sched}={self.spec[sched].prefix}")
- if "+static" in self.spec:
+ if self.spec.satisfies("+static"):
args.append("--enable-static=yes")
return args
@@ -108,4 +112,4 @@ class Libyogrt(AutotoolsPackage):
# create conf file to inform libyogrt about job scheduler
with open(os.path.join(etcpath, "yogrt.conf"), "w+") as f:
- f.write("backend=%s\n" % sched)
+ f.write(f"backend={sched}\n")
diff --git a/var/spack/repos/builtin/packages/libzip/package.py b/var/spack/repos/builtin/packages/libzip/package.py
index 79c31a8696..eff9884080 100644
--- a/var/spack/repos/builtin/packages/libzip/package.py
+++ b/var/spack/repos/builtin/packages/libzip/package.py
@@ -6,20 +6,51 @@
from spack.package import *
-class Libzip(AutotoolsPackage):
+class Libzip(CMakePackage, AutotoolsPackage):
"""libzip is a C library for reading, creating,
and modifying zip archives."""
- homepage = "https://nih.at/libzip/index.html"
- url = "https://nih.at/libzip/libzip-1.2.0.tar.gz"
+ homepage = "https://libzip.org/"
license("BSD-3-Clause")
- version("1.3.2", sha256="ab4c34eb6c3a08b678cd0f2450a6c57a13e9618b1ba34ee45d00eb5327316457")
- version("1.2.0", sha256="6cf9840e427db96ebf3936665430bab204c9ebbd0120c326459077ed9c907d9f")
+ # current versions are released on GitHub
+ version("1.10.1", sha256="9669ae5dfe3ac5b3897536dc8466a874c8cf2c0e3b1fdd08d75b273884299363")
+ version("1.9.2", sha256="fd6a7f745de3d69cf5603edc9cb33d2890f0198e415255d0987a0cf10d824c6f")
+ version("1.8.0", sha256="30ee55868c0a698d3c600492f2bea4eb62c53849bcf696d21af5eb65f3f3839e")
+ version("1.7.3", sha256="0e2276c550c5a310d4ebf3a2c3dfc43fb3b4602a072ff625842ad4f3238cb9cc")
+ version(
+ "1.6.1",
+ sha256="06eb8e9141fd19e2788cabaea9c9c2fd4d488d9e1484eb474bbfcac78e7b1d88",
+ url="https://github.com/nih-at/libzip/releases/download/rel-1-6-1/libzip-1.6.1.tar.gz",
+ )
+ # older releases are available on libzip.org
+ version(
+ "1.3.2",
+ sha256="ab4c34eb6c3a08b678cd0f2450a6c57a13e9618b1ba34ee45d00eb5327316457",
+ deprecated=True,
+ )
+ version(
+ "1.2.0",
+ sha256="6cf9840e427db96ebf3936665430bab204c9ebbd0120c326459077ed9c907d9f",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ def url_for_version(self, version):
+ if version < Version("1.6"):
+ return f"https://libzip.org/download/libzip-{version}.tar.gz"
+ return f"https://github.com/nih-at/libzip/releases/download/v{version}/libzip-{version}.tar.gz"
depends_on("zlib-api")
+ # Build system
+ build_system(
+ conditional("cmake", when="@1.4:"), conditional("autotools", when="@:1.3"), default="cmake"
+ )
+
@property
def headers(self):
# Up to version 1.3.0 zipconf.h was installed outside of self.prefix.include
diff --git a/var/spack/repos/builtin/packages/libzmq/package.py b/var/spack/repos/builtin/packages/libzmq/package.py
index 2028dcd55e..423fc9c43d 100644
--- a/var/spack/repos/builtin/packages/libzmq/package.py
+++ b/var/spack/repos/builtin/packages/libzmq/package.py
@@ -35,6 +35,9 @@ class Libzmq(AutotoolsPackage):
version("4.0.6", sha256="28a2a9c9b77014c39087a498942449df18bb9885cdb63334833525a1d19f2894")
version("4.0.5", sha256="3bc93c5f67370341428364ce007d448f4bb58a0eaabd0a60697d8086bc43342b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"libsodium",
default=True,
diff --git a/var/spack/repos/builtin/packages/liftoff/package.py b/var/spack/repos/builtin/packages/liftoff/package.py
new file mode 100644
index 0000000000..cbe9eb0f88
--- /dev/null
+++ b/var/spack/repos/builtin/packages/liftoff/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Liftoff(PythonPackage):
+ """Liftoff is a tool that accurately maps annotations in GFF or
+ GTF between assemblies of the same, or closely-related species.
+ """
+
+ homepage = "https://github.com/agshumate/Liftoff"
+
+ pypi = "liftoff/Liftoff-1.6.3.2.tar.gz"
+
+ git = "https://github.com/agshumate/Liftoff.git"
+
+ maintainers("snehring")
+
+ license("GPL-3.0-only", checked_by="snehring")
+
+ version("1.6.3.2", sha256="7070a861144d0f043533893d39f95589a64d63f0365a99d06d71f1700b7fb758")
+
+ depends_on("python@3:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@1.22:", type=("build", "run"))
+ depends_on("py-biopython@1.76:", type=("build", "run"))
+ depends_on("py-gffutils@0.10.1:", type=("build", "run"))
+ depends_on("py-networkx@2.4:", type=("build", "run"))
+ depends_on("py-pysam@0.19.1:", type=("build", "run"))
+ depends_on("py-pyfaidx@0.5.8:", type=("build", "run"))
+ depends_on("py-interlap@0.2.6:", type=("build", "run"))
+ depends_on("py-ujson@3:", type=("build", "run"))
+ depends_on("py-parasail@1.2.1:", type=("build", "run"))
+ depends_on("minimap2", type="run")
diff --git a/var/spack/repos/builtin/packages/liggghts/package.py b/var/spack/repos/builtin/packages/liggghts/package.py
index d67890824c..58b213a483 100644
--- a/var/spack/repos/builtin/packages/liggghts/package.py
+++ b/var/spack/repos/builtin/packages/liggghts/package.py
@@ -22,6 +22,10 @@ class Liggghts(MakefilePackage):
version("3.8.0", sha256="9cb2e6596f584463ac2f80e3ff7b9588b7e3638c44324635b6329df87b90ab03")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("jpeg", default=True, description="Enable JPEG support")
variant("gzip", default=True, description="Enable GZIP for some input and output files")
@@ -63,7 +67,7 @@ class Liggghts(MakefilePackage):
)
makefile.filter(r"^#(VTK_LIB_USR=-L).*", r"\1{0}".format(vtk.prefix.lib))
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
mpi = spec["mpi"]
makefile.filter(r"^#(MPICXX_USR=).*", r"\1{0}".format(mpi.mpicxx))
makefile.filter(r"^#(MPI_INC_USR=).*", r"\1{0}".format(mpi.prefix.include))
@@ -77,19 +81,19 @@ class Liggghts(MakefilePackage):
# builds using its own target!
makefile_auto.filter(r"^(.+)(EXTRA_ADDLIBS.*mpi_stubs.*)", r"\1#\2")
- if "+jpeg" in spec:
+ if spec.satisfies("+jpeg"):
jpeg = spec["jpeg"]
makefile.filter(r"^(USE_JPG = ).*", r'\1"ON"')
makefile.filter(r"^#(JPG_INC_USR=-I).*", r"\1{0}".format(jpeg.prefix.include))
makefile.filter(r"^#(JPG_LIB_USR=-L).*", r"\1{0}".format(jpeg.prefix.lib))
- if "+gzip" in spec:
+ if spec.satisfies("+gzip"):
makefile.filter(r"^(USE_GZIP = ).*", r'\1"ON"')
- if "+debug" in spec:
+ if spec.satisfies("+debug"):
makefile.filter(r"^(USE_DEBUG = ).*", r'\1"ON"')
- if "+profile" in spec:
+ if spec.satisfies("+profile"):
makefile.filter(r"^(USE_PROFILE = ).*", r'\1"ON"')
# Enable debug output of Makefile.auto in the log file
diff --git a/var/spack/repos/builtin/packages/lighttpd/package.py b/var/spack/repos/builtin/packages/lighttpd/package.py
index 7048111b65..96a2cf04ec 100644
--- a/var/spack/repos/builtin/packages/lighttpd/package.py
+++ b/var/spack/repos/builtin/packages/lighttpd/package.py
@@ -24,6 +24,8 @@ class Lighttpd(CMakePackage):
version("1.4.50", sha256="c9a9f175aca6db22ebebbc47de52c54a99bbd1dce8d61bb75103609a3d798235")
version("1.4.49", sha256="8b744baf9f29c386fff1a6d2e435491e726cb8d29cfdb1fe20ab782ee2fc2ac7")
+ depends_on("c", type="build") # generated
+
depends_on("pcre")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/ligra/package.py b/var/spack/repos/builtin/packages/ligra/package.py
index 749cceeab2..39ebe95a73 100644
--- a/var/spack/repos/builtin/packages/ligra/package.py
+++ b/var/spack/repos/builtin/packages/ligra/package.py
@@ -21,6 +21,8 @@ class Ligra(MakefilePackage):
version("1.1", sha256="a7311b96fabc286a8f1250d8a6e2d1b1e4545c720fa6bb4acf7ed31211fcc99a")
version("1.0", sha256="fb39ae0a3eddb26f37b8cc0a543648575a50bcc488cecd4a5f1beaaf2458736c")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP")
variant("mkl", default=False, description="Build with Intel MKL")
# TODO: Add cilk variant when spack has a cilk plus package created.
@@ -28,7 +30,7 @@ class Ligra(MakefilePackage):
depends_on("mkl", when="+mkl")
def setup_build_environment(self, env):
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
env.set("OPENMP", "1")
# when +mkl, MKLROOT will be defined by intel-mkl package,
# triggering a build with mkl support
diff --git a/var/spack/repos/builtin/packages/likwid/package.py b/var/spack/repos/builtin/packages/likwid/package.py
index eaa3c301a3..65b72202d2 100644
--- a/var/spack/repos/builtin/packages/likwid/package.py
+++ b/var/spack/repos/builtin/packages/likwid/package.py
@@ -8,6 +8,7 @@ import os
import llnl.util.tty as tty
+import spack.tengine
from spack.package import *
@@ -26,6 +27,7 @@ class Likwid(Package):
license("GPL-3.0-only")
+ version("5.4.0", sha256="0f2b671c69caa993fedb48187b3bdcc94c22400ec84c926fd0898dbff68aa03e")
version("5.3.0", sha256="c290e554c4253124ac2ab8b056e14ee4d23966b8c9fbfa10ba81f75ae543ce4e")
version("5.2.2", sha256="7dda6af722e04a6c40536fc9f89766ce10f595a8569b29e80563767a6a8f940e")
version("5.2.1", sha256="1b8e668da117f24302a344596336eca2c69d2bc2f49fa228ca41ea0688f6cbc2")
@@ -41,6 +43,10 @@ class Likwid(Package):
version("4.3.1", sha256="4b40a96717da54514274d166f9b71928545468091c939c1d74109733279eaeb1")
version("4.3.0", sha256="86fc5f82c80fcff1a643394627839ec79f1ca2bcfad30000eb7018da592588b4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch(
"https://github.com/RRZE-HPC/likwid/commit/e0332ace8fe8ca7dcd4b4477a25e37944f173a5c.patch?full_index=1",
when="@5.0.1",
@@ -89,7 +95,6 @@ class Likwid(Package):
depends_on("hwloc", when="@5.2.0:")
depends_on("rocprofiler-dev", when="@5.3: +rocm")
depends_on("rocm-core", when="@5.3: +rocm")
- depends_on("rocm-smi", when="@5.3: +rocm")
depends_on("rocm-smi-lib", when="@5.3: +rocm")
# TODO: check
@@ -105,13 +110,13 @@ class Likwid(Package):
filter_file("^#!/usr/bin/perl", "#!/usr/bin/env perl", *files)
def setup_run_environment(self, env):
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
libs = find_libraries(
"libcupti", root=self.spec["cuda"].prefix, shared=True, recursive=True
)
for lib in libs.directories:
env.append_path("LD_LIBRARY_PATH", lib)
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
libs = find_libraries(
"librocprofiler64.so.1",
root=self.spec["rocprofiler-dev"].prefix,
@@ -173,14 +178,14 @@ class Likwid(Package):
"ACCESSMODE = {}".format(spec.variants["accessmode"].value),
"config.mk",
)
- if "accessmode=accessdaemon" in spec:
+ if spec.satisfies("accessmode=accessdaemon"):
# Disable the chown, see the `spack_perms_fix` template and script
filter_file("^INSTALL_CHOWN .*", "INSTALL_CHOWN =", "config.mk")
else:
filter_file("^BUILDFREQ .*", "BUILDFREQ = false", "config.mk")
filter_file("^BUILDDAEMON .*", "BUILDDAEMON = false", "config.mk")
- if "+fortran" in self.spec:
+ if self.spec.satisfies("+fortran"):
filter_file("^FORTRAN_INTERFACE .*", "FORTRAN_INTERFACE = true", "config.mk")
if self.compiler.name == "gcc":
makepath = join_path("make", "include_GCC.mk")
@@ -189,7 +194,7 @@ class Likwid(Package):
else:
filter_file("^FORTRAN_INTERFACE .*", "FORTRAN_INTERFACE = false", "config.mk")
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
filter_file("^NVIDIA_INTERFACE.*", "NVIDIA_INTERFACE = true", "config.mk")
filter_file("^BUILDAPPDAEMON.*", "BUILDAPPDAEMON = true", "config.mk")
cudainc = spec["cuda"].prefix.include
@@ -203,7 +208,7 @@ class Likwid(Package):
else:
filter_file("^NVIDIA_INTERFACE.*", "NVIDIA_INTERFACE = false", "config.mk")
- if "+rocm" in self.spec:
+ if self.spec.satisfies("+rocm"):
env["ROCM_HOME"] = spec["rocm-core"].prefix
filter_file("^ROCM_INTERFACE.*", "ROCM_INTERFACE = true", "config.mk")
filter_file("^BUILDAPPDAEMON.*", "BUILDAPPDAEMON = true", "config.mk")
@@ -253,7 +258,7 @@ class Likwid(Package):
# the build log. See https://github.com/spack/spack/pull/10412.
@run_after("install")
def caveats(self):
- if "accessmode=accessdaemon" in self.spec:
+ if self.spec.satisfies("accessmode=accessdaemon"):
perm_script = "spack_perms_fix.sh"
perm_script_path = join_path(self.spec.prefix, perm_script)
daemons = glob.glob(join_path(self.spec.prefix, "sbin", "*"))
diff --git a/var/spack/repos/builtin/packages/lima/package.py b/var/spack/repos/builtin/packages/lima/package.py
new file mode 100644
index 0000000000..42769c43b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lima/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Lima(Package):
+ """Linux virtual machines, with a focus on running containers"""
+
+ homepage = "https://lima-vm.io"
+ url = "https://github.com/lima-vm/lima/archive/refs/tags/v0.23.2.tar.gz"
+
+ maintainers("trws")
+
+ license("Apache-2.0", checked_by="trws")
+
+ version("0.23.2", sha256="fc21295f78d717efc921f8f6d1ec22f64da82bfe685d0d2d505aee76c53da1ff")
+
+ depends_on("qemu@9:")
+ depends_on("go@1.22.0:")
+
+ # NOTE: in truth this is a go build, it fetches many go packages during this build
+ # process, but at least uses the built qemu and local vz on macos
+ def install(self, spec, prefix):
+ make()
+ make("install", f"DESTDIR={prefix}", "PREFIX=")
diff --git a/var/spack/repos/builtin/packages/linaro-forge/package.py b/var/spack/repos/builtin/packages/linaro-forge/package.py
index 5a6ed211df..13f0a17269 100644
--- a/var/spack/repos/builtin/packages/linaro-forge/package.py
+++ b/var/spack/repos/builtin/packages/linaro-forge/package.py
@@ -22,7 +22,33 @@ class LinaroForge(Package):
homepage = "https://www.linaroforge.com"
maintainers("kenche-linaro")
- if platform.machine() in ["aarch64", "arm64"]:
+ if platform.machine() == "aarch64":
+ version("24.1", sha256="e297d0c19c95d4db842187eb38882db094094ec667d854aaf396e11a81bffe0b")
+ version(
+ "24.0.6", sha256="a7f9f71e4352be3680854611fe433a9974fcb8a327ac65ca3bc950c956eac6e4"
+ )
+ version(
+ "24.0.5", sha256="fc0c80ce9f66c6966faaca77de0f13e26da564c853e5bfc1e8acd17b65bc2ba0"
+ )
+ version(
+ "24.0.4", sha256="d126e4690f7c9bf21e541721dac51dcee1f336a882211426bf98a15d80671e3d"
+ )
+ version(
+ "24.0.3", sha256="5030c5c23824963f82e94ed606e47cce802393fa4cb7757966818baa7012aa21"
+ )
+ version(
+ "24.0.2", sha256="8346eb0375910498a83baff6833256c8221c2c06737670687bcf9f1497d9ede9"
+ )
+ version(
+ "24.0.1", sha256="d9d8e8fd56894032ea98a5ff7885c16c0522a192d9cbf4e131581c65e34efb82"
+ )
+ version("24.0", sha256="ee631177f5289127f0d3d99b600d437b4bd40c34c1c15388288b72543dc420ad")
+ version(
+ "23.1.2", sha256="8c01f4768a8f784f0bfa78c82dbd39e5077bbc6880b6f3c3704019eecfca5b3a"
+ )
+ version(
+ "23.1.1", sha256="6e95a9c9f894caad073e58590733c4ce4489aec0d8db6553050e71a59e41e6f8"
+ )
version("23.1", sha256="c9889b95729f97bcffaf0f15b930efbd27081b7cf2ebc958eede3a186cc4d93a")
version(
"23.0.4", sha256="a19e6b247badaa52f78815761f71fb95a565024b7f79bdfb2f602f18b47a881c"
@@ -40,10 +66,14 @@ class LinaroForge(Package):
version(
"22.1.4", sha256="4e2af481a37b4c99dba0de6fac75ac945316955fc4170d06e321530adea7ac9f"
)
+ elif platform.machine() == "ppc64le":
+ # N.B. support for ppc64le was dropped in 24.0
version(
- "21.1.3", sha256="4a4ff7372aad5a31fc9e18b7b6c493691ab37d8d44a3158584e62d1ab82b0eeb"
+ "23.1.2", sha256="5c588a6b7391d75cced4016936d0c5a00023431269339432738ff33b860487b3"
+ )
+ version(
+ "23.1.1", sha256="9d4dfa440ef1cc9c6a7cb4f7eeec49fc77f0b6b75864fbe018a41783ac5fc5df"
)
- elif platform.machine() == "ppc64le":
version("23.1", sha256="39a522c1d9a29f0a35bba5201f3e23c56d87543410505df30c85128816dd455b")
version(
"23.0.4", sha256="927c1ba733cf63027243060586b196f8262e545d898712044c359a6af6fc5795"
@@ -64,10 +94,33 @@ class LinaroForge(Package):
version(
"22.0.4", sha256="f4cb5bcbaa67f9209299fe4653186a2829760b8b16a2883913aa43766375b04c"
)
+ elif platform.machine() == "x86_64":
+ version("24.1", sha256="0b96878ab73c20b39c4730ed15f24ca86dc5985637ff5d8e68f55e1e802e5fe3")
version(
- "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e"
+ "24.0.6", sha256="eab198b964862b4664359ccbec1edb27c2dd3b9fa82bcb4e14fc616a2b0341da"
+ )
+ version(
+ "24.0.5", sha256="da0d4d6fa9120b5e7c4a248795b7f5da32c4987588ecb7406213c8c9846af2bc"
+ )
+ version(
+ "24.0.4", sha256="001e7b7cd796d8e807971b99a9ca233c24f8fcd6eee4e9b4bbb0ec8560d44f08"
+ )
+ version(
+ "24.0.3", sha256="1796559fb86220d5e17777215d3820f4b04aba271782276b81601d5065284526"
+ )
+ version(
+ "24.0.2", sha256="e2ad12273d568560e948a9bcdd49b830a2309f247b146bf36579053f99ec59a3"
+ )
+ version(
+ "24.0.1", sha256="70aa6b610d181c12be10e57d2fd3439261e2c6cb23d9f1f33303b85f04cb7bf2"
+ )
+ version("24.0", sha256="5976067e3de14d0838e1069021a4a4a96d048824454668779473ff0776d66a01")
+ version(
+ "23.1.2", sha256="675d2d8e4510afefa0405eecb46ac8bf440ff35a5a40d5507dc12d29678a22bf"
+ )
+ version(
+ "23.1.1", sha256="6dcd39fc582088eb4b13233ae1e9b38e12bfa07babf77d89b869473a3c2b66e6"
)
- elif platform.machine() == "x86_64":
version("23.1", sha256="31185d5f9855fd03701089907cdf7b38eb72c484ee730f8341decbbd8f9b5930")
version(
"23.0.4", sha256="41a81840a273ea9a232efb4f031149867c5eff7a6381d787e18195f1171caac4"
@@ -88,9 +141,6 @@ class LinaroForge(Package):
version(
"22.0.4", sha256="a2c8c1da38b9684d7c4656a98b3fc42777b03fd474cd0bf969324804f47587e5"
)
- version(
- "21.1.3", sha256="03dc82f1d075deb6f08d1e3e6592dc9b630d406c08a1316d89c436b5874f3407"
- )
variant(
"probe",
diff --git a/var/spack/repos/builtin/packages/linkphase3/package.py b/var/spack/repos/builtin/packages/linkphase3/package.py
index 6eec3c55cd..946a70dc17 100644
--- a/var/spack/repos/builtin/packages/linkphase3/package.py
+++ b/var/spack/repos/builtin/packages/linkphase3/package.py
@@ -16,6 +16,8 @@ class Linkphase3(Package):
version("2017-06-14", commit="559913593fc818bb1adb29796a548cf5bf323827")
+ depends_on("fortran", type="build") # generated
+
def install(self, spec, prefix):
fortran = Executable(self.compiler.fc)
fortran("LINKPHASE3.f90", "-o", "LINKPHASE3")
diff --git a/var/spack/repos/builtin/packages/linktest/package.py b/var/spack/repos/builtin/packages/linktest/package.py
index ef8e510d06..b0163dd616 100644
--- a/var/spack/repos/builtin/packages/linktest/package.py
+++ b/var/spack/repos/builtin/packages/linktest/package.py
@@ -24,6 +24,8 @@ class Linktest(MakefilePackage):
extension="tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("sionlib")
diff --git a/var/spack/repos/builtin/packages/linux-external-modules/kconfig_allconfig b/var/spack/repos/builtin/packages/linux-external-modules/kconfig_allconfig
new file mode 100644
index 0000000000..fbd5a45838
--- /dev/null
+++ b/var/spack/repos/builtin/packages/linux-external-modules/kconfig_allconfig
@@ -0,0 +1,141 @@
+CONFIG_CC_CAN_LINK_STATIC=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE=y
+CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
+# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
+CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
+CONFIG_CC_HAS_INT128=y
+CONFIG_ARCH_SUPPORTS_INT128=y
+# CONFIG_KEXEC_FILE is not set
+CONFIG_64BIT=y
+CONFIG_X86_64=y
+CONFIG_OUTPUT_FORMAT="elf64-x86-64"
+CONFIG_ARCH_MMAP_RND_BITS_MIN=28
+CONFIG_ARCH_MMAP_RND_BITS_MAX=32
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_PGTABLE_LEVELS=5
+CONFIG_X86_MPPARSE=y
+# CONFIG_X86_FRED is not set
+# CONFIG_MPSC is not set
+CONFIG_GENERIC_CPU=y
+CONFIG_X86_INTERNODE_CACHE_SHIFT=6
+CONFIG_X86_L1_CACHE_SHIFT=6
+CONFIG_X86_MINIMUM_CPU_FAMILY=64
+CONFIG_HPET_TIMER=y
+CONFIG_UP_LATE_INIT=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
+CONFIG_X86_ESPFIX64=y
+CONFIG_X86_VSYSCALL_EMULATION=y
+CONFIG_X86_5LEVEL=y
+CONFIG_X86_DIRECT_GBPAGES=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+CONFIG_X86_CET=y
+CONFIG_X86_KERNEL_IBT=y
+CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y
+# CONFIG_X86_USER_SHADOW_STACK is not set
+CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y
+CONFIG_DYNAMIC_MEMORY_LAYOUT=y
+# CONFIG_ADDRESS_MASKING is not set
+CONFIG_LEGACY_VSYSCALL_XONLY=y
+# CONFIG_LEGACY_VSYSCALL_NONE is not set
+CONFIG_HAVE_LIVEPATCH=y
+CONFIG_FUNCTION_PADDING_CFI=11
+CONFIG_FUNCTION_PADDING_BYTES=16
+CONFIG_ARCH_HAS_ADD_PAGES=y
+# CONFIG_IA32_EMULATION is not set
+# CONFIG_X86_X32_ABI is not set
+CONFIG_HAVE_RUST=y
+CONFIG_ARCH_SUPPORTS_CFI_CLANG=y
+CONFIG_HAVE_CONTEXT_TRACKING_USER=y
+CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y
+CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y
+CONFIG_HAVE_ARCH_HUGE_VMAP=y
+CONFIG_HAVE_ARCH_HUGE_VMALLOC=y
+CONFIG_HAVE_ARCH_SOFT_DIRTY=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
+CONFIG_ARCH_MMAP_RND_BITS=28
+CONFIG_HAVE_OBJTOOL=y
+CONFIG_HAVE_JUMP_LABEL_HACK=y
+CONFIG_HAVE_NOINSTR_HACK=y
+CONFIG_HAVE_NOINSTR_VALIDATION=y
+CONFIG_HAVE_UACCESS_VALIDATION=y
+CONFIG_HAVE_STACK_VALIDATION=y
+CONFIG_HAVE_ARCH_VMAP_STACK=y
+CONFIG_VMAP_STACK=y
+CONFIG_STRICT_MODULE_RWX=y
+CONFIG_HAVE_STATIC_CALL_INLINE=y
+CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
+CONFIG_ARCH_HAS_ELFCORE_COMPAT=y
+CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
+CONFIG_FUNCTION_ALIGNMENT_16B=y
+CONFIG_FUNCTION_ALIGNMENT=16
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+# CONFIG_MODULE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_ASM_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_MODULE_SIG is not set
+CONFIG_MODULE_COMPRESS_NONE=y
+# CONFIG_MODULE_COMPRESS_GZIP is not set
+# CONFIG_MODULE_COMPRESS_XZ is not set
+# CONFIG_MODULE_COMPRESS_ZSTD is not set
+# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
+CONFIG_MODPROBE_PATH="/sbin/modprobe"
+# CONFIG_TRIM_UNUSED_KSYMS is not set
+CONFIG_MODULES_TREE_LOOKUP=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y
+CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+# CONFIG_MEMORY_HOTPLUG is not set
+CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_ARCH_WANTS_THP_SWAP=y
+CONFIG_ARCH_HAS_PTE_DEVMAP=y
+CONFIG_ZONE_DMA32=y
+CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
+CONFIG_ARCH_HAS_PKEYS=y
+CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
+CONFIG_EXECMEM=y
+# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
+CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_SWIOTLB=y
+# CONFIG_SWIOTLB_DYNAMIC is not set
+CONFIG_DMA_NEED_SYNC=y
+CONFIG_ARCH_HAS_PMEM_API=y
+CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y
+CONFIG_ARCH_HAS_COPY_MC=y
+CONFIG_OBJTOOL=y
+# CONFIG_STACK_VALIDATION is not set
+CONFIG_HAVE_ARCH_KCSAN=y
+# CONFIG_PAGE_TABLE_CHECK is not set
+CONFIG_HAVE_ARCH_KASAN=y
+CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
+CONFIG_HAVE_ARCH_KMSAN=y
+CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
+# CONFIG_TEST_LOCKUP is not set
+CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
+CONFIG_HAVE_FENTRY=y
+CONFIG_HAVE_OBJTOOL_MCOUNT=y
+CONFIG_HAVE_OBJTOOL_NOP_MCOUNT=y
+CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y
+CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
+# CONFIG_UNWINDER_ORC is not set
+CONFIG_ARCH_HAS_KCOV=y
+# CONFIG_KCOV is not set
diff --git a/var/spack/repos/builtin/packages/linux-external-modules/package.py b/var/spack/repos/builtin/packages/linux-external-modules/package.py
new file mode 100644
index 0000000000..1934cb688d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/linux-external-modules/package.py
@@ -0,0 +1,341 @@
+# Copyright 2013-2024 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 shutil import copy2
+
+from spack.package import *
+
+
+class LinuxExternalModules(MakefilePackage):
+ """The Linux kernel provides services to start and stop programs,
+ handles the file system and other common "low-level" tasks that most
+ programs share, and schedules access to avoid conflicts when programs
+ try to access the same resource or device simultaneously. The kernel
+ has a modular design such that modules can be integrated as software
+ components. In this package, Linux has been configured to build out-of-tree
+ kernel modules."""
+
+ homepage = "https://github.com/torvalds/linux"
+ url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.2.tar.xz"
+ # See section 2.1 for how to build out-of-tree kernel modules using linux-external-modules.
+ # Specifically, <path_to_kernel_src> should point to the install directory of
+ # linux-external-modules.
+ how_to = "https://docs.kernel.org/kbuild/modules.html"
+
+ maintainers("kyotsukete", "rountree")
+
+ license("GPL-2.0-only", checked_by="kyotsukete")
+
+ version("6.10.3", sha256="fa5f22fd67dd05812d39dca579320c493048e26c4a556048a12385e7ae6fc698")
+ version("6.10.2", sha256="73d8520dd9cba5acfc5e7208e76b35d9740b8aae38210a9224e32ec4c0d29b70")
+ version("6.10.1", sha256="70109dfd1cd1c5f8a58eb1cb37122b9bf93f9c6a6280bf91019263c7339cf76b")
+ version("6.10", sha256="774698422ee54c5f1e704456f37c65c06b51b4e9a8b0866f34580d86fef8e226")
+ version("6.9.12", sha256="5ae7cc4e0e2f6b9ba630f643985ba0522c7d5e5b9571ba478a3cb513edd4cf22")
+ version("6.9.11", sha256="dedf84e0832c3e912024e0c04347e9e48a2b2676d5c5cd869b3eb0ce92f513e1")
+ version("6.9.10", sha256="efd12e335fa67d13a3eae30e4b7b7546e74b8ccc90682e4c3fffab0b22654da1")
+ version("6.9.9", sha256="2be05b487eb239a3bf687d628a8f104177d09c310f00bcc2a5e50f1733421eb9")
+ version("6.9.8", sha256="f048267b7b88316c9ca708c68d15a9ae802dcfc943c3188c1273eb958c433281")
+ version("6.9.7", sha256="e4f588cd91eef9d461e5e14fdf9415feff8a72fbcc274089a0f768a58de001f8")
+ version("6.9.6", sha256="5d4366e2b89998f274abe03557ef3bc78b58e47fc62c102d51e6f49e5ed96b4b")
+ version("6.9.5", sha256="a51fb4ab5003a6149bd9bf4c18c9b1f0f4945c272549095ab154b9d1052f95b1")
+ version("6.9.4", sha256="272800e0d1a7d01a78bce95a3aaf5c80816f50eb15c517d7003e58355760ecc2")
+ version("6.9.3", sha256="c321c46401368774fc236f57095b205a5da57415f9a6008018902f9fd5eddfae")
+ version("6.9.2", sha256="d46c5bdf2c5961cc2a4dedefe0434d456865e95e4a7cd9f93fff054f9090e5f9")
+ version("6.9.1", sha256="01b414ba98fd189ecd544435caf3860ae2a790e3ec48f5aa70fdf42dc4c5c04a")
+ version("6.9", sha256="24fa01fb989c7a3e28453f117799168713766e119c5381dac30115f18f268149")
+ version("6.8.12", sha256="19b31956d229b5b9ca5671fa1c74320179682a3d8d00fc86794114b21da86039")
+ version("6.8.11", sha256="b78dcd09f6b725872a2c0c87a70a064b0fbbcccfe5ce60aa46c669934a9e28b6")
+ version("6.8.10", sha256="b0bb92d982f88380e5b2059349c3a862e0afa712e0646eb0e082b9c2c5cb5176")
+ version("6.8.9", sha256="f905f1238ea7a8e85314bacf283302e8097006010d25fcea726d0de0ea5bc9b6")
+ version("6.8.8", sha256="1c4cdcb9d560fad1fb95db2cb8afbedc922f9ead848371fe40363b13f9f631ba")
+ version("6.8.7", sha256="291d1a1faf4e87b3b0ea9729080db887aafd1ff2fac1430ceca921e46bc22fae")
+ version("6.8.6", sha256="9e723232d603ab45ebf043c34714c48f277ab195c29abcb8472f2a4c3a5a1995")
+ version("6.8.5", sha256="138923e5d73748b4bdbe9b5a0b8f36dfac9fcc16753a9222928dc6c963effa89")
+ version("6.8.4", sha256="d5dec495fc00605fa9e04114df547fbc92b33d9ea7a4a2b7073c589590e79e63")
+ version("6.8.3", sha256="db7eb56d5014ee9a7fac0c715053155d92798d98d9197a2173eef1f0a496c986")
+ version("6.8.2", sha256="9ac322d85bcf98a04667d929f5c2666b15bd58c6c2d68dd512c72acbced07d04")
+ version("6.8.1", sha256="8d0c8936e3140a0fbdf511ad7a9f21121598f3656743898f47bb9052d37cff68")
+ version("6.8", sha256="c969dea4e8bb6be991bbf7c010ba0e0a5643a3a8d8fb0a2aaa053406f1e965f3")
+ version("6.7.12", sha256="6c2979e3948806a0dbacba193f8453ea42c179c1eb9f6136e3c35d87e5707984")
+ version("6.7.11", sha256="2c6497c971632fd9d056941a8a31369d36ef07baa755e4c1cdcc326acb090b4a")
+ version("6.7.10", sha256="a9b99fb376f9fcd699c7c252aeef3bb5ba26280eb049711ac091b2eb2b487c03")
+ version("6.7.9", sha256="0fd733fc0778f8da1fdf66df1698d394248807de71eef83a4d1218bcb3dfd346")
+ version("6.7.8", sha256="469ff46b98685df13b56c98417c64ba7a30f8a45baf34aa99f07935e1bf65c18")
+ version("6.7.7", sha256="256b8b44570ddbe266eb3ad0c2cba2616f1609b4a3de5014a3da5512907b14d9")
+ version("6.7.6", sha256="e489ec0e1370d089b446d565aded7a698093d2b7c4122a18f21edb6ef93d37d3")
+ version("6.7.5", sha256="29f6464061b8179cbb77fc5591e06a2199324e018c9ed730ca3e6dfb145539ff")
+ version("6.7.4", sha256="f68d9f5ffc0a24f850699b86c8aea8b8687de7384158d5ed3bede37de098d60c")
+ version("6.7.3", sha256="b7f08c652747574a3aa26e317d7a8f23ffab3fb645e1b1533b215dcfd5742b44")
+ version("6.7.2", sha256="c34de41baa29c475c0834e88a3171e255ff86cd32d83c6bffc2b797e60bfa671")
+ version("6.7.1", sha256="1ecffa568e86a2202ba5533ad9034bc263a9aa14e189597a94f09b3854ad68c3")
+ version("6.7", sha256="ef31144a2576d080d8c31698e83ec9f66bf97c677fa2aaf0d5bbb9f3345b1069")
+ version("6.6.44", sha256="93218296934915636fe6ba08e125948424cc270fd8948502c0ab91087a9fccd8")
+ version("6.6.43", sha256="0ad83b1a1a780a1aad948d55aa55ee63c50c626f2d46910b9d2180028d100a5e")
+ version("6.6.42", sha256="8801c8c297d774e76044977ec3d0684399dc4e7cce347d730874ec78b774e683")
+ version("6.6.41", sha256="9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef")
+ version("6.6.40", sha256="5c3a3c03c055b8d601a6d7f80d1465ada6b83a12299f6ace2027b47f0baff538")
+ version("6.6.39", sha256="2783d42112095f95c510e1b421f056df8cbfa845f9040c6115080434a77a776b")
+ version("6.6.38", sha256="4ed403ffb550565d03485aeca9a52c128cdde43f4a373a1a9ee3a590524fe743")
+ version("6.6.37", sha256="f3976e77708694fe4a1f8d1307c315c8a36cbc58f038a38e006b91e29a1f3214")
+ version("6.6.36", sha256="b9676828b737e8fb8eaa5198303d35d35e8df019550be153c8a42c99afe0cdd5")
+ version("6.6.35", sha256="fce3ee728712ed063aa8c14a8756c8ff8c7a46ba3827f61d2b04a73c7cf5dd9e")
+ version("6.6.34", sha256="c4e0ec8f593aa3717e85abad940466e7d7cbc362989426eb37f499330a461ba0")
+ version("6.6.33", sha256="a13ebc20dc2a75722699949af74aa86a4ce5d544d6daaa6a7de4e8c81b40de97")
+ version("6.6.32", sha256="aaa824eaf07f61911d22b75ff090a403c3dd0bd73e23933e0bba8b5971436ce1")
+ version("6.6.31", sha256="d6ecff966f8c95ec4cb3bb303904f757b7de6a6bcfef0d0771cb852158e61c20")
+ version("6.6.30", sha256="b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6")
+ version("6.6.29", sha256="7f26f74c08082c86b1daf866e4d49c5d8276cc1906a89d0e367e457ec167cbd0")
+ version("6.6.28", sha256="818716ed13e7dba6aaeae24e3073993e260812ed128d10272e94b922ee6d3394")
+ version("6.6.27", sha256="639e50060e3c8f23ed017cb10cfeacc6ba88ff5583812bb76859b4cc6a128291")
+ version("6.6.26", sha256="af54b449f4fb93b8e8daa346144a7309e8e95174bd962c4b5917cf56120456d9")
+ version("6.6.25", sha256="99d210be87908233a55b0fadc0dccd3b95926c0651b6b82e37350b2029de1f44")
+ version("6.6.24", sha256="3e9ef879dae8319338eb0dc2d2c2025c13257fdeddf6245c000cb5a85a8af6f5")
+ version("6.6.23", sha256="200fd119cb9ef06bcedcdb52be00ba443163eab154295c5831fed9a12211a8b9")
+ version("6.6.22", sha256="23e3e7b56407250f5411bdab95763d0bc4e3a19dfa431d951df7eacabd61a2f4")
+ version("6.6.21", sha256="ee0b430148da94d2b13608b8d80b007b7d281dc90e3f19b63cf9a9943810e457")
+ version("6.6.20", sha256="e2f6c7f39b304248193370f8c5755553ab73ad5672e92dae994a344084d8dd22")
+ version("6.6.19", sha256="b5637e6b72c2b4b12e7db790bc155d141a9c2fe4b25f7b215410107e8747139a")
+ version("6.6.18", sha256="4e43d8c5fba14f7c82597838011648056487b7550fd83276ad534559e8499b1d")
+ version("6.6.17", sha256="ee7650996ba75aa29fe66f309b413097f249a03e7001f2a41128c7c95205226a")
+ version("6.6.16", sha256="b21d5795a3bead4f112916423222faa8a0f519e4201df343e3eb88dc9e4aaa30")
+ version("6.6.15", sha256="ab290c7f8687f2f8af96e14abd0700ba8b282426151873690f51621d8d5f5faa")
+ version("6.6.14", sha256="fbe96b2db3f962cd2a96a849d554300e7a4555995160082d4f323c2a1dfa1584")
+ version("6.6.13", sha256="88b89e7dd41ead4e3ab1e411c8bb8d592575acf815cf1df3c0dc57e2e882c0bc")
+ version("6.6.12", sha256="1fd7ec8c3d9c4e4b3a41d11e2c6d151e5fbf875dd08b3577f73afd6ee6674605")
+ version("6.6.11", sha256="afe2e5a661bb886d762684ebea71607d1ee8cb9dd100279d2810ba20d9671e52")
+ version("6.6.10", sha256="9ee627e4c109aec7fca3eda5898e81d201af2c7eb2f7d9d7d94c1f0e1205546c")
+ version("6.6.9", sha256="8ebc65af0cfc891ba63dce0546583da728434db0f5f6a54d979f25ec47f548b3")
+ version("6.6.8", sha256="5036c434e11e4b36d8da3f489851f7f829cf785fa7f7887468537a9ea4572416")
+ version("6.6.7", sha256="0ce68ec6019019140043263520955ecd04839e55a1baab2fa9155b42bb6fd841")
+ version("6.6.6", sha256="ebf70a917934b13169e1be5b95c3b6c2fea5bc14e6dc144f1efb8a0016b224c8")
+ version("6.6.5", sha256="7c92795854a68d218c576097d50611f8eea86fd55810e0bc27724f020753b19e")
+ version("6.6.4", sha256="49e49660c93d8d6d58f118360d3ca8131695ec34669263ca8f041c876da93e45")
+ version("6.6.3", sha256="28edfc3d4f90cd738f2a20f5a2d68510268176d6111f6278d8f495edfd9495a7")
+ version("6.6.2", sha256="73d4f6ad8dd6ac2a41ed52c2928898b7c3f2519ed5dbdb11920209a36999b77e")
+ version("6.6.1", sha256="da1ed7d47c97ed72c9354091628740aa3c40a3c9cd7382871f3cedbd60588234")
+ version("6.6", sha256="d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0")
+ version("6.5.13", sha256="78fbd43822f4c56bc16e89e8874767f592532e1a0ffcd1af4dd279559b5fcbb5")
+ version("6.5.12", sha256="4a69c1d32c974e125ad723145d31683a3b078667ad56d17f7852dcaffb9f359f")
+ version("6.5.11", sha256="2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519")
+ version("6.5.10", sha256="a15f498604adf8f6ac842f1733a694083f23e578b48c8e97d94b6d8968e55a8b")
+ version("6.5.9", sha256="c6662f64713f56bf30e009c32eac15536fad5fd1c02e8a3daf62a0dc2f058fd5")
+ version("6.5.8", sha256="299cca897d90deaa176eebec42f0a80eeb7516afed330a45c14da9de086cf717")
+ version("6.5.7", sha256="0d09ea448005c9cfe5383e4c72a872b39188b928f8c44e146b03b1b7851fbb8c")
+ version("6.5.6", sha256="78e36d4214547051c24df2140f4ce09428d6c515ad9a71b38b28e8094a95d2f6")
+ version("6.5.5", sha256="8cf10379f7df8ea731e09bff3d0827414e4b643dd41dc99d0af339669646ef95")
+ version("6.5.4", sha256="bdf76c15229b241e578046b8486106f09534d754ea4cbf105e0660e551fb1669")
+ version("6.5.3", sha256="4cac13f7b17bd8dcf9032ad68f9123ab5313d698c9f59416043165150763eb4f")
+ version("6.5.2", sha256="2027e14057d568ad3ddc100dadf4c8853a49b031270478a61d88f6011572650f")
+ version("6.5.1", sha256="23765dd44425462cd92adbee52670608fd7f3fd183a83b25ba7a7b4883d0451b")
+ version("6.5", sha256="7a574bbc20802ea76b52ca7faf07267f72045e861b18915c5272a98c27abf884")
+ version("6.4.16", sha256="9626ec84a39ecb009bf11a271dd520941159c165d4e62f82e3a77b79d20ff27d")
+ version("6.4.15", sha256="23f9e7c8d2a583e432ed203cab88fbd7ecc6920015cb5d38d5b7585acee814de")
+ version("6.4.14", sha256="75eae323747ae37b05086c5a51326a744eb611b0e890e7ebe77de362b30450e6")
+ version("6.4.13", sha256="5e5511b50bc9fd358bb5d7746fab3c5ea396d42c6bd7a54b2555ede0de5ac8e5")
+ version("6.4.12", sha256="cca91be956fe081f8f6da72034cded96fe35a50be4bfb7e103e354aa2159a674")
+ version("6.4.11", sha256="546b68b5097d3c0d74722de62aae217729d98e45fbb6bd458b490ac21ea40918")
+ version("6.4.10", sha256="980b3fb2a97788fd885cbd85ba4520980f76c7ae1d62bfc2e7477ee04df5f239")
+ version("6.4.9", sha256="b8b8a29852b999f337c4e93eff6c91fb7fd2d49a6614cbcbeb6fa171ba55cc9f")
+ version("6.4.8", sha256="c59f34e19e84db30206b9373041abf893f9d8a08765d163586570a5238c458b6")
+ version("6.4.7", sha256="de143cb61dcaa756c05f56ff35144316d810615819518a33e34754f064c4a7d8")
+ version("6.4.6", sha256="e1ecc496efc48aaf25a6607a4b8e52d574d6f67a2b0aa1664087d301d3515ea4")
+ version("6.4.5", sha256="374e2c07463c51dfd71204b7fac3b73c7f973550ae019b74e9f2b815b28de9b7")
+ version("6.4.4", sha256="9cbc4a2be714a4d154e1312c9f33ded91174907c8b15ee936ad27002ac75ff2a")
+ version("6.4.3", sha256="7134ed29360df6f37a26410630283f0592c91a6d2178a9648226d30ddf8c88a1")
+ version("6.4.2", sha256="a326ab224176c5b17c73c9ccad85f32e49b6e4e764861d57595727b7ef10062c")
+ version("6.4.1", sha256="0d9daa9f1c176fb13b9447f6e3d80e82b49043f0d344c247bbf09b4e625beef3")
+ version("6.4", sha256="8fa0588f0c2ceca44cac77a0e39ba48c9f00a6b9dc69761c02a5d3efac8da7f3")
+ version("6.3.13", sha256="ea460560e2898022c5f3c4649908694dcd75a094ffde726e8c6ca5e0a09491fb")
+ version("6.3.12", sha256="cb7fdefc207dd4e8ef947fccd687126425edce0138ca11191bc0590c678e6cd7")
+ version("6.3.11", sha256="1d5a3fbd4d4265b6c9605d5c605d947673e7643af2890e4ad5c946940f123e16")
+ version("6.3.10", sha256="e0a9ad8692b2191cbd33db371a780a3fe375de90123a307ecd874c0860cd46e3")
+ version("6.3.9", sha256="41ecf21399b17ab85163750ba22347d09b54fa099b80b63d0e2ef0066129b13e")
+ version("6.3.8", sha256="4323d421250e2e444c35d36f4aa8ddb56591dedc25c68d359d19c4ef9dd20955")
+ version("6.3.7", sha256="fe369743996c522a7b473e99dcf8f88847bd5cc88546fd3b7a41d9fe5a5b97a9")
+ version("6.3.6", sha256="7a6a1f0dfa0bf7f45f9d4a7b409315cf32267850adab4db033a17de0320a24ef")
+ version("6.3.5", sha256="f5cd478c3d8b908ab606afd1e95a4f8f77e7186b4a82829251d6e6aaafff825e")
+ version("6.3.4", sha256="d8627528ed6b3ae607d00b1ef5a46e0e7051ae40b285fd4e82f4ff0bb72b68e8")
+ version("6.3.3", sha256="8975216a6cee827390586758ed69d19743367098d1fc5dd5694987bb529e44e5")
+ version("6.3.2", sha256="b612ecf282ca3f7989ff6d9f39082833b7dc2d522cb969a05334d3614e9c5328")
+ version("6.3.1", sha256="78620fb4a7d5e0db1d4eb8d5b1c6e207ba5d19564efa63967a59b6daf89b3f2a")
+ version("6.3", sha256="ba3491f5ed6bd270a370c440434e3d69085fcdd528922fa01e73d7657db73b1e")
+ version("6.2.16", sha256="06ff0d780a6934b46140f6d8c1a15792c78aa337d8b2411bf90747371d358713")
+ version("6.2.15", sha256="9ffa34921044660c6adb3eb5fd996192e322b15bbf532fe4e4e7a47079ed8fc1")
+ version("6.2.14", sha256="0ebc9fa309d496d474b06682578c5f7b42f0cf330365102b2feaab65ba296729")
+ version("6.2.13", sha256="c7dded14e368834b18bb2ad64af65560d8bcb9d2d6597e0f6ef151fded01e577")
+ version("6.2.12", sha256="c7e146b52737adfa4c724bfa41bf4721c5ee3cf220c074fbc60eb3ea62b0ccc8")
+ version("6.2.11", sha256="0d236784e60b87c7953535aeb148dd9e773b26495dfa9c6d69615f54fe00dd47")
+ version("6.2.10", sha256="57c562c3cd2753f232549cab05c8ad770ed848ae86401619c7581bdffaeea4fe")
+ version("6.2.9", sha256="903449c164c03f0e742aacc920e18563585e07a28c6cb79e0fd6c36695fd43f5")
+ version("6.2.8", sha256="fed0ad87d42f83a70ce019ff2800bc30a855e672e72bf6d54a014d98d344f665")
+ version("6.2.7", sha256="4303105201fb0c0b17155fff87df0a022a32a41eb1ce94a264ae648c64bd0d8d")
+ version("6.2.6", sha256="1fe2f1d7ceb7129c111159d8efd361971dbf212206f81e7078b98df8b00b3d9d")
+ version("6.2.5", sha256="65ab0192cf6e5808a075588944de8febf9e61f1a85147e479ffd440708cee5b9")
+ version("6.2.4", sha256="8275806bad41e9f67b60b00a9460a7912aeab93913681ae0b13fa0e4d54032c5")
+ version("6.2.3", sha256="b36d0b54fc13770802aff37d8f8d6fec7b950e4f099884e30445ad2265063924")
+ version("6.2.2", sha256="c12755a2bb0e19e83457727e949ee1020cc268f44222488256223da8eeecbfb0")
+ version("6.2.1", sha256="2fcc07e1c90ea4ce148f50f9beeb0dca0b6e4b379a768de8abc7a4a26f252534")
+ version("6.2", sha256="74862fa8ab40edae85bb3385c0b71fe103288bce518526d63197800b3cbdecb1")
+ version("6.1.103", sha256="5eb4706f898f50881552ff5146d892132d3ffc5298033bffe27087d3a44c4573")
+ version("6.1.102", sha256="1ba5f93b411ead7587fe48b2eec6c656f6796d31f5e406d236913c77512497ec")
+ version("6.1.101", sha256="f1459faa68429fa6607ae18b869fd02ed685bb33c72289f175aca163c592b34c")
+ version("6.1.100", sha256="b9aa6ec1a00f234d6c6f2d428fbb0a6bf459606c259263df978f86685b65a8b9")
+ version("6.1.99", sha256="c086ee9ce2b1eeba6e085d569bc97ae764a5d15f6322847f0ebc9f787ae34dd3")
+ version("6.1.98", sha256="97cdc9127c7700556ea0891267a0c24cf372f4b81636fb8203a914f3a69f3406")
+ version("6.1.97", sha256="890b845f36452328716e62dd893b634584f607cdd44b4e685392d302d3be41af")
+ version("6.1.96", sha256="3e77c9069de5e7ab02ff9c2dcfe77dab193613fc1de21071901b4153374862a9")
+ version("6.1.95", sha256="2960f0aa1d75665f39114ad3c272a999c54796e553a2355d0379f5188d14dfbd")
+ version("6.1.94", sha256="38ea71ad22ae0187fd8ee5ff879b33b0d9bd58161ac9a3e868ae0b4c66b95369")
+ version("6.1.93", sha256="df31af2ef5923d61fadd68bfd991f50f2e42a913895eb4b03214ee78f8720bcf")
+ version("6.1.92", sha256="9019f427bfdc9ced5bc954d760d37ac08c0cdffb45ad28087fc45a73e64336c9")
+ version("6.1.91", sha256="880ace63ca2291b8b639e9bd862cc828649d3e1e00ccfee5861473debd2e4dec")
+ version("6.1.90", sha256="83a3d72e764fceda2c1fc68a4ea6b91253a28da56a688a2b61776b0d19788e1d")
+ version("6.1.89", sha256="12bab8e092618d1d4eeaf4201e6e70054c94896198956bd84ff0e908b0264719")
+ version("6.1.88", sha256="696902fd45c543168b638370464c44ffbfdf5f20003ae32b6145bbce3665f8d1")
+ version("6.1.87", sha256="fc7af16a72e8aee4790b796f1bf5003cb0de6095ea1ffd7d7c7c9a5678d95124")
+ version("6.1.86", sha256="d3d3c8c44f0f0a870a95bd2823f9d91979d1aa6f266da5d8cccd0c4b15e3115b")
+ version("6.1.85", sha256="33fe9bcc597c60021a2b2abacd4e0f6f546200ab99594c9a07ad600258b86274")
+ version("6.1.84", sha256="af97d2ebe14765d0db3af6560309daf08535da25bfad36e5fb3e436f22a1707a")
+ version("6.1.83", sha256="88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190")
+ version("6.1.82", sha256="d150d2d9d416877668d8b56f75759f166168d192419eefaa942ed67225cbec06")
+ version("6.1.81", sha256="0ebd861c6fd47bb0a9d3a09664d704833d1a54750c7bf9c4ad8b5e9cbd49342b")
+ version("6.1.80", sha256="568ecaaebb8b87c7c8246bba67bc83402972bf34f5811651a2d3cd548ff7b671")
+ version("6.1.79", sha256="faa49ca22fb55ed4d5ca2a55e07dd10e4e171cfc3b92568a631453cd2068b39b")
+ version("6.1.78", sha256="65206b969831236849c9906eba267e715734a93808e9909fd9b4f12eea10d689")
+ version("6.1.77", sha256="3b54ec567716cdfb3618caf38c58a8aab1372cc41c16430633febe9ccdb3f91d")
+ version("6.1.76", sha256="0580cc0e81ff9aee245f79531d8c1c5c7d711eee227cd4cf52d1ff335727b1fd")
+ version("6.1.75", sha256="6cd19410330c13ec4c18fd28a83d3e40fc12a152815fb7c3e1b0764329093a56")
+ version("6.1.74", sha256="b7fbd1d79faed2ce3570ef79dc1223e4e19c868b86326b14a435db56ebbb2022")
+ version("6.1.73", sha256="6cad48706bf1cde342613dca2a2cd6dd4f79f88f9e4d356263564e4b2a5d7e87")
+ version("6.1.72", sha256="98dce69077c35cffca799dcdbbd32a02242aad6b0950eb931936bb2ef69f0926")
+ version("6.1.71", sha256="2df774dd53f9ffd4e57ebf804cf597709295df6a304fe261d25220a134b7f041")
+ version("6.1.70", sha256="ed1365266456c07696a7499581aec5d851ca2296f4f6f90f23d189ea5a56afef")
+ version("6.1.69", sha256="7e3d2694d18ce502068cc88a430da809abbd17d0773268524ebece442612b541")
+ version("6.1.68", sha256="365ff26a30e206de9b18489f45d38582a0a61b7c5919f8ab89295a47316784e1")
+ version("6.1.67", sha256="7537db7289ca4854a126bc1237c47c5b21784bcbf27b4e571d389e3528c59285")
+ version("6.1.66", sha256="419e62cd6c4239e6950b688db9e8753eb1e99c216dc3204f7932398a3fef1a0c")
+ version("6.1.65", sha256="407229936802a44b1e484c2e9ac3bbe53a65d825cc468ccdbd76281b491ab20a")
+ version("6.1.64", sha256="629daa38f3ea67f29610bfbd53f9f38f46834d3654451e9474100490c66dc7e7")
+ version("6.1.63", sha256="c29d043b01dd4fcc61a24fd027c5c7912b15b1f10d8e3c83a0cb935885f0758d")
+ version("6.1.62", sha256="b9fd616facd6becfceef88b9be718d0f16625cab3fe81d11384802a7091e85ec")
+ version("6.1.61", sha256="ad2c9d12fc36e2dde4796a3eec8f4ddca2e278098f4e555b6e6f5f03ef6964ce")
+ version("6.1.60", sha256="58520e7ae5a6af254ddf7ddbfc42e4373b0d36c67d467f6e35a3bd1672f5fb0a")
+ version("6.1.59", sha256="627f7724c675036639290fb5c39e3fdeb3d566b80b192c45f4a808ab54c8c0a0")
+ version("6.1.58", sha256="ce987ed3d2f640b3a2a62a0a8573d538a36dfd3cc31e2d7a239ce5a16c1c21ad")
+ version("6.1.57", sha256="f9ebfe3ddc5152d87b37e33be30e31875d137433be10a57ce29d2eae7b6e91b1")
+ version("6.1.56", sha256="9edefdde32c2298389dcd19566402332b3c2016f5ada17e5820f500b908d478c")
+ version("6.1.55", sha256="a87e241ec15d53452c4efe219713a3769d88cc436b5b98cf6efb262c4aff15c0")
+ version("6.1.54", sha256="a3181e46d407cd6ab15f412402e8220684ff9659b0262b7a3de7384405ce4e27")
+ version("6.1.53", sha256="5f57e0a04810d24f2b1a8fc95451241f80530e678717eda0f45104c6dc78ed7e")
+ version("6.1.52", sha256="567737990dbc9265966a0786392821a9fa559fd346494fd1eff050dbeb383a52")
+ version("6.1.51", sha256="58b0446d8ea4bc0b26a35e2e3509bd53efcdeb295c9e4f48d33a23b1cdaa103b")
+ version("6.1.50", sha256="b27ac1443eea563bc546ee1f67d9802bc8d6c0f6f18707407fba01f9f78c488c")
+ version("6.1.49", sha256="c9ea14231ca4ca6e3882a9339a8c3c414e4c91519d3e50af6822f47e99057a0f")
+ version("6.1.48", sha256="c606cbd0353e677df6fae73cc16ba3c9244b98372ed7771d551024016f55ac31")
+ version("6.1.47", sha256="93d58b6af007a5f44dd26831ff310707deb1ab9380c5136a534287eb3fddfcab")
+ version("6.1.46", sha256="f5f67bcfccd47f8d9db2d5ba24e33af7778f40a777577d1fba424f4a1712a296")
+ version("6.1.45", sha256="bd2343396e7ddad8974f3689a5a067ec931f4ade793e72b1070a85cd19f1f192")
+ version("6.1.44", sha256="2e51d41fe11d082ae167cee05772bb07ca7f19448d2b46772d8ca2db7673a1a5")
+ version("6.1.43", sha256="245248470a62d4e94b46f753afc01e19e45b9e6f3a0fa06e7f5da21fe845a808")
+ version("6.1.42", sha256="aaf8261b551c8b76b81eab8780b446e88cea4d551ae517ac3a9b2dbdbd381ed3")
+ version("6.1.41", sha256="312809a78eea052a08a6580f47b2ed8dd28e5633461d6731febaf3cb1e570bb7")
+ version("6.1.40", sha256="43eafc2197a07dcdcff7a7ef79ac7502061f7c564744e51626bf5fa2e22587f0")
+ version("6.1.39", sha256="4cddee22fdf657138a06af653492f67cd3a4762c04a34725534bd200d99085b8")
+ version("6.1.38", sha256="f9a4f91b609f7d332a5f2be01ab86336fa00149fae6bdc19f16fa19f78802d43")
+ version("6.1.37", sha256="46cad712d261a23c8e483a3b79b6a84b9a5f731a8921c9127df35ae35cef1e80")
+ version("6.1.36", sha256="d8ca0e300f30b9ff70c6e1497c638a1dac1407f45d3655e9c62c6e45a08afe6b")
+ version("6.1.35", sha256="be368143bc5d0dc73dd3e8c6191630c1620520379baf6f47c16116b2c0bc26ac")
+ version("6.1.34", sha256="b26f7cbcbf8031efc49f11f236f372fc34a4fd5fc6ad3151b893d1aa038ed603")
+ version("6.1.33", sha256="b87d6ba8ea7328e8007a7ea9171d1aa0d540d95eacfcab09578e0a3b623dd2cd")
+ version("6.1.32", sha256="7c88b7a09ba2b9e47b78eba2b32b1db6a4d89636f7ddd586545f9671a2521a6c")
+ version("6.1.31", sha256="e86917bba1990e967943645484182a64ba325f98b114a1906cc1d50992e073c1")
+ version("6.1.30", sha256="1bf254c4ca9ebccb25328296584fb5e87ad635ae0c1cc1deb0b5bb37a4608813")
+ version("6.1.29", sha256="1e736cc9bd6036379a1d915e518abd4c2c94ad0fd1ea0da961c3489308b8fcfb")
+ version("6.1.28", sha256="7a094c1428b20fef0b5429e4effcc6ed962a674ac6f04e606d63be1ddcc3a6f0")
+ version("6.1.27", sha256="c2b74b96dd3d0cc9f300914ef7c4eef76d5fac9de6047961f49e69447ce9f905")
+ version("6.1.26", sha256="dfdcc143a879d64a5ee99213b2b4b05b5dccd566c144df93bca1e204df64c110")
+ version("6.1.25", sha256="cb72436ceb15086ae3df65e590592030692a9237a37d64105478eb5a72493091")
+ version("6.1.24", sha256="aae6a7e38e33589011f5a5c0d7e087c8a26e3daf8d434432ee975ead90546504")
+ version("6.1.23", sha256="7458372e8750afe37fd1ac3e7ab3c22f2c6018f760f8134055a03f54aba3ebeb")
+ version("6.1.22", sha256="2be89141cef74d0e5a55540d203eb8010dfddb3c82d617e66b058f20b19cfda8")
+ version("6.1.21", sha256="b33cb1b86ae13441db36f7e8099ff9edb10494bfd141b4efb41bc44bf815d93a")
+ version("6.1.20", sha256="76322de8c01a3c63b42c4d1e9b9e7d1897ddb91276e10d73d1f9df3562f031f0")
+ version("6.1.19", sha256="9e991c6e5f6c1ca45eea98c55e82ef6ae3dccc73b3e8a655c8665e585f5a8647")
+ version("6.1.18", sha256="842ac15eff0e6fb0c150fdf83f4f6aaf6b4c1239dcf8c14e2227620ec0ae141e")
+ version("6.1.17", sha256="a9bc8d0329304e36777d4cbfaa3f8784d7f915640442ca7c5c025b96818f2199")
+ version("6.1.16", sha256="a6849c55580b5515a07b6ad21861c450fa20345c66624eecb89e8873816da3c5")
+ version("6.1.15", sha256="2c16dfe2168a2e64ac0d55a12d625ebfb963818bb48b60c1868c7c460644c4fd")
+ version("6.1.14", sha256="a27076011efec7ad11e9ed0644f512c34cab4c5ed5ba42cfe71c83fabebe810d")
+ version("6.1.13", sha256="48841319f4b0077da15e4176e624032d8332d961ee660e1b85e1ce73ded17a67")
+ version("6.1.12", sha256="d47aa675170904dcc93eeaa7c96db54d476a11c5d3e8cf3d3b96e364e2a0edea")
+ version("6.1.11", sha256="581b0560077863c5116512c0b5fd93b97814092c80e6ebebabe88101949af7a1")
+ version("6.1.10", sha256="0be2919ba91cf5873a4cb4d429de78aad0469120d624e333a43b4b011d74d19d")
+ version("6.1.9", sha256="d60cf185693c386e7acd9f3eb3a94ae30ffbfee0a9447a20e83711e0bdf5922b")
+ version("6.1.8", sha256="b60bb53ab8ba370a270454b11e93d41af29126fc72bd6ede517673e2e57b816d")
+ version("6.1.7", sha256="4ab048bad2e7380d3b827f1fad5ad2d2fc4f2e80e1c604d85d1f8781debe600f")
+ version("6.1.6", sha256="3e4d8e561da5703a205ae8d7b2bed6c5c64fc4299eebcbfd20481e63b57d5ee3")
+ version("6.1.5", sha256="bc7f6d9a8a8bbe9a723e82346bba94b58d926f78bfba106b21e041e0290076fc")
+ version("6.1.4", sha256="8aa8f64fa60bb13381a9608d1fefbdd0555e2a70c40b2c7d0671b0d64aa4559e")
+ version("6.1.3", sha256="6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317")
+ version("6.1.2", sha256="ee41f3c4f599b2f46f08aae428c9243db403e7292eb2c9f04ee34909b038d1ae")
+ version("6.1.1", sha256="a3e61377cf4435a9e2966b409a37a1056f6aaa59e561add9125a88e3c0971dfb")
+ version("6.1", sha256="2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb")
+ version("6.0.19", sha256="abe37eb0e2e331bdc7c4110115664e180e7d43b7336de6b4cd2bd1b123d30207")
+ version("6.0.18", sha256="9ab661699211518d8d32f6c7f646230549e8c5b424df6f685a323bc320949459")
+ version("6.0.17", sha256="a7ee92092a5459bb46abf0b5449a4e57e8b792591ac4e7ac04ed2542d2ce1d08")
+ version("6.0.16", sha256="842071bca611c1f080cbc39c7ab3a6b58d7951f4f41e553b3db4fbe3e0705ce4")
+ version("6.0.15", sha256="d484eb3d4f88be14b42507a85ad4b0932e92e7a742acbce74e8be007124a6820")
+ version("6.0.14", sha256="5ef18f7e7fcffa2571431fccb3bc26a4e975492208e8490867148a2a5b78c220")
+ version("6.0.13", sha256="08d3118d6b755769f166de6babed54964393a7c0928029bef11bf55559a72da4")
+ version("6.0.12", sha256="89b730edf8942b49e02f9894244205886c9a214d629b35b88c4ff06ee9304f01")
+ version("6.0.11", sha256="2bae6131e64971e1e34ff395fa542971134c857bdb0b29069ab847c7c9a9c762")
+ version("6.0.10", sha256="39e57fcd84cd70bfa3e1a4185d3aa0ed7f1432f24c6548d16326b0c3c9541dd0")
+ version("6.0.9", sha256="6114a208e82739b4a1ab059ace35262be2a83be34cd1ae23cb8a09337db831c7")
+ version("6.0.8", sha256="0de4f83996951c6faf9b2225db4f645882c47b1a09198190f97bd46e5f5fa257")
+ version("6.0.7", sha256="67dacc2b78605a56e997f4c08d009be87c98ec66f1870220226c8b3cc676590f")
+ version("6.0.6", sha256="864b05af2d869ba73d61a9c5959e4531a141ab2bd7b217483671f625f9747faa")
+ version("6.0.5", sha256="61332ef22b53c50c10faabfb965896a7d1ad4f3381f0f89643c820f28a60418e")
+ version("6.0.4", sha256="c8f103d0da604e61f898dd729e738abd55261823db42f2826d647b53b4a41ed8")
+ version("6.0.3", sha256="b0d522241805794d8af3a67d331ba063a16496c6fb6d365d48f7ed78ee1c3dcf")
+ version("6.0.2", sha256="a13c26388cacccb684cd9f51109596a280c8186b7e95174d31ee7c5718e95c9d")
+ version("6.0.1", sha256="8ede745a69351ea0f27fe0c48780d4efa37ff086135e129358ce09694957e8f9")
+ version("6.0", sha256="5c2443a5538de52688efb55c27ab0539c1f5eb58c0cfd16a2b9fbb08fd81788e")
+
+ requires("platform=linux")
+ requires("%gcc@5.1:", when="@6.0:")
+
+ depends_on("bash@4.2:", when="@6.0:")
+ depends_on("flex@2.5.35:", when="@6.0:")
+ depends_on("bison@2.0:", when="@6.0:")
+ depends_on("util-linux@2.10o:", when="@6.0:")
+ depends_on("kmod@13:", when="@6.0:")
+ depends_on("e2fsprogs@1.41.4:", when="@6.0:")
+ depends_on("procps@3.2.0:", when="@6.0:")
+ depends_on("openssl@1.0.0:", when="@6.0:")
+ depends_on("bc@1.06.95:", when="@6.0:")
+ depends_on("cpio")
+ depends_on("tar@1.28:", when="@6.5:")
+
+ depends_on("gmake@3.82:", when="@6.1:")
+ depends_on("gmake@3.81:", when="@6.0")
+
+ depends_on("binutils@2.25:", when="@6.2:")
+ depends_on("binutils@2.23:", when="@6.0:6.2")
+
+ def setup_build_environment(self, env):
+ env.set("KBUILD_OUTPUT", self.prefix)
+
+ @run_before("build")
+ def copy_kconfig(self):
+ name = "kconfig_allconfig"
+ copy2(f"{self.package_dir}/{name}", f"{self.build_directory}/{name}")
+
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make("KCONFIG_ALLCONFIG=kconfig_allconfig", "allnoconfig")
+ make("modules")
+
+ def install(self, spec, prefix):
+ install_tree(self.build_directory, self.prefix)
diff --git a/var/spack/repos/builtin/packages/linux-headers/package.py b/var/spack/repos/builtin/packages/linux-headers/package.py
index 703e783352..1213d35014 100644
--- a/var/spack/repos/builtin/packages/linux-headers/package.py
+++ b/var/spack/repos/builtin/packages/linux-headers/package.py
@@ -18,10 +18,15 @@ class LinuxHeaders(Package):
license("GPL-2.0-only")
+ version("6.9.1", sha256="01b414ba98fd189ecd544435caf3860ae2a790e3ec48f5aa70fdf42dc4c5c04a")
+ version("6.8.9", sha256="f905f1238ea7a8e85314bacf283302e8097006010d25fcea726d0de0ea5bc9b6")
version("6.5.2", sha256="2027e14057d568ad3ddc100dadf4c8853a49b031270478a61d88f6011572650f")
version("6.2.8", sha256="fed0ad87d42f83a70ce019ff2800bc30a855e672e72bf6d54a014d98d344f665")
version("4.9.10", sha256="bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://www.kernel.org/pub/linux/kernel/v{0}.x/linux-{1}.tar.xz"
return url.format(version.up_to(1), version)
diff --git a/var/spack/repos/builtin/packages/linux-pam/package.py b/var/spack/repos/builtin/packages/linux-pam/package.py
index 24f70243e1..265a96e4a6 100644
--- a/var/spack/repos/builtin/packages/linux-pam/package.py
+++ b/var/spack/repos/builtin/packages/linux-pam/package.py
@@ -14,17 +14,57 @@ class LinuxPam(AutotoolsPackage):
license("BSD-3-Clause")
- version("1.5.1", sha256="201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc")
+ version("1.6.1", sha256="f8923c740159052d719dbfc2a2f81942d68dd34fcaf61c706a02c9b80feeef8e")
+ version("1.6.0", sha256="fff4a34e5bbee77e2e8f1992f27631e2329bcbf8a0563ddeb5c3389b4e3169ad")
+ version("1.5.3", sha256="7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283")
version("1.5.2", sha256="e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d")
+ version("1.5.1", sha256="201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc")
version("1.5.0", sha256="02d39854b508fae9dc713f7733bbcdadbe17b50de965aedddd65bcb6cc7852c8")
version("1.4.0", sha256="cd6d928c51e64139be3bdb38692c68183a509b83d4f2c221024ccd4bcddfd034")
version("1.3.1", sha256="eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db")
- depends_on("m4", type="build")
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
+ variant("unix", default=True, description="Build pam_unix model")
+ variant("selinux", default=False, description="Build with selinux support")
+ variant("nls", default=False, description="Build with natural language support")
+ variant("xauth", default=False, description="Build with xauth support")
+ variant("openssl", default=False, description="Build with openssl support")
+ variant("lastlog", default=False, description="Build pam_lastlog model")
+ variant("regenerate-docu", default=False, description="Regenerate docs")
+
+ depends_on("pkgconfig", type="build")
+ depends_on("libtirpc")
+ depends_on("libxcrypt")
+ depends_on("xauth", when="+xauth")
+ depends_on("c", type="build")
+
+ with default_args(type="build"):
+ depends_on("m4")
+ depends_on("autoconf")
+ depends_on("automake")
+ depends_on("libtool")
+ depends_on("gettext", when="+nls")
+ with when("+regenerate-docu"):
+ depends_on("bison")
+ depends_on("flex")
+ depends_on("yacc")
+
+ def flag_handler(self, name, flags):
+ if name == "ldflags" and self.spec.satisfies("+nls"):
+ flags += ["-lintl"] # Addresses https://github.com/spack/spack/issues/44637
+ return (flags, None, None)
def configure_args(self):
- config_args = ["--includedir=" + self.prefix.include.security]
- return config_args
+ args = [f"--includedir={self.prefix.include.security}"]
+
+ args += self.enable_or_disable("nls")
+ args += self.enable_or_disable("openssl")
+ args += self.enable_or_disable("unix")
+ args += self.enable_or_disable("lastlog")
+ args += self.enable_or_disable("selinux")
+ args += self.enable_or_disable("regenerate-docu")
+
+ if self.spec.satisfies("+xauth"):
+ xauth = self.spec["xauth"]
+ args.append(f"--with-xauth={xauth.prefix.bin.xauth}")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/linux-perf/package.py b/var/spack/repos/builtin/packages/linux-perf/package.py
new file mode 100644
index 0000000000..9e550d783d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/linux-perf/package.py
@@ -0,0 +1,275 @@
+# Copyright 2013-2024 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 re
+import shutil
+from textwrap import dedent
+
+import llnl.util.tty as tty
+
+from spack.package import *
+
+
+class LinuxPerf(Package):
+ """The Linux perf tool."""
+
+ homepage = "https://www.kernel.org/"
+ url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.5.tar.xz"
+
+ executables = ["^perf$"]
+
+ maintainers("Jordan474")
+
+ version("6.9.10", sha256="efd12e335fa67d13a3eae30e4b7b7546e74b8ccc90682e4c3fffab0b22654da1")
+ version("6.6.41", sha256="9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef")
+ version("5.15.163", sha256="025fc7d8b1560cf456ccae50591fe1ca21c990645df9791aed25820fe78db302")
+
+ variant("libtraceevent", default=True, description="recommended dependency")
+ variant("python", default=True, description="Python support")
+ variant("perl", default=True, description="perl script extension")
+ variant("slang", default=True, description="TUI support")
+ variant("libpfm4", default=True, description="libpfm4 events extension")
+ variant("babeltrace", default=True, description="libbabeltrace support for CTF data format")
+ variant("libcap", default=True, description="process capabilities considered by perf")
+ variant("numactl", default=True, description="numa perf benchmark")
+ variant(
+ "libaudit",
+ default=False,
+ description=(
+ "get perf-trace syscall table from libaudit at runtime,"
+ " rather than unistd.h at buildtime"
+ ),
+ )
+ variant("debuginfod", default=False, description="support debuginfod")
+ variant("capstone", default=True, description="capstone disassembler")
+ variant(
+ "zstd",
+ default=True,
+ description="Zstandard based runtime trace compression in record mode",
+ )
+ variant("xz", default=True, description="xz kernel module decompression")
+ variant(
+ "openssl",
+ default=True,
+ description="support generating build-ids for ELFs generated by jitdump",
+ )
+ variant("jvmti", default=False, description="build jvmti agent")
+
+ depends_on("c", type="build")
+ depends_on("gmake", type="build")
+ depends_on("pkgconfig", type="build")
+ depends_on("flex", type="build")
+ depends_on("bison", type="build")
+
+ depends_on("elfutils")
+ depends_on("elfutils +debuginfod", when="+debuginfod")
+ depends_on("libunwind components=ptrace")
+ depends_on("libiberty")
+ depends_on("binutils", type=("build", "link", "run"))
+ depends_on("zlib-api")
+
+ depends_on("libtraceevent", when="+libtraceevent")
+
+ # jevents requires python >= 3.6
+ depends_on("python@3.6:", type=("build", "link", "run"), when="+python")
+ depends_on("py-setuptools", type="build", when="+python")
+ depends_on("perl", when="+perl")
+ depends_on("slang", when="+slang")
+ depends_on("capstone", when="+capstone")
+ depends_on("libpfm4", when="+libpfm4")
+ depends_on("babeltrace@1.5:", when="+babeltrace")
+ depends_on("libcap", when="+libcap")
+ depends_on("audit-userspace", when="+libaudit")
+ depends_on("numactl", when="+numactl")
+ depends_on("zstd", when="+zstd")
+ depends_on("xz", when="+xz")
+ depends_on("openssl", when="+openssl")
+ depends_on("openssl@1.1:", when="@5.19: +openssl")
+ depends_on("java", when="+jvmti")
+
+ depends_on("asciidoc", type="build")
+ depends_on("xmlto", type="build")
+
+ conflicts(
+ "~libtraceevent",
+ when="@6.2:",
+ msg="linux 6.2 removed internal libtraceevent, and it's highly recommended",
+ )
+
+ def url_for_version(self, version):
+ return f"https://cdn.kernel.org/pub/linux/kernel/v{version[0]}.x/linux-{version}.tar.xz"
+
+ def setup_build_environment(self, env):
+ # This variable is used in the Makefile. If it is defined on the
+ # system, it can break the build if there is no build recipe for
+ # that specific ARCH
+ env.unset("ARCH")
+
+ @property
+ def archive_files(self):
+ return [join_path(self.stage.source_path, "tools/perf/FEATURE-DUMP")]
+
+ def install(self, spec, prefix):
+ # TODO:
+ # - GTK2=
+ # - NO_LIBBPF=1 ?
+ # - d3 flamegraph resources (libexec/perf-core/scripts/python/flamegraph.py)
+
+ version = self.spec.version
+
+ args = [
+ "LIBDW_DIR={}".format(spec["elfutils"].prefix),
+ "LIBUNWIND_DIR={}".format(spec["libunwind"].prefix),
+ "NO_SHELLCHECK=1",
+ ]
+
+ # Setup clang if found in the system's or env's PATH:
+ clang = shutil.which("clang")
+ if clang:
+ args.append("CLANG=" + clang)
+
+ # Features to check post-install against `perf version --build-options`
+ checks = {"dwarf", "libunwind", "libbfd", "zlib"}
+
+ if version >= Version("6.4"):
+ args.append("BUILD_NONDISTRO=1")
+
+ if spec.satisfies("+libaudit"):
+ checks.add("libaudit")
+ args.append("NO_SYSCALL_TABLE=1") # will look for libaudit
+ else:
+ checks.add("syscall_table")
+ args.append("NO_LIBAUDIT=1")
+
+ if spec.satisfies("+debuginfod"):
+ if version >= Version("5.19"): # Not in --build-options before that
+ checks.add("debuginfod")
+ else:
+ args.append("NO_LIBDEBUGINFOD=1")
+
+ if spec.satisfies("+python"):
+ checks.add("libpython")
+ args.extend(
+ [
+ "PYTHON={}".format(spec["python"].command),
+ "PYTHON_CONFIG={}".format(spec["python"].prefix.bin.join("python-config")),
+ ]
+ )
+ else:
+ args.append("NO_LIBPYTHON=1")
+
+ if spec.satisfies("+perl"):
+ checks.add("libperl")
+ else:
+ args.append("NO_LIBPERL=1")
+
+ if spec.satisfies("+openssl"):
+ checks.add("libcrypto")
+ else:
+ args.append("NO_LIBCRYPTO=1")
+
+ if spec.satisfies("+slang"):
+ checks.add("libslang")
+ else:
+ args.append("NO_SLANG=1")
+
+ if spec.satisfies("+libpfm4"):
+ checks.add("libpfm4")
+ if version < Version("6.4"):
+ args.append("LIBPFM4=1")
+ else:
+ if version >= Version("6.4"):
+ args.append("NO_LIBPFM4=1")
+
+ if spec.satisfies("+babeltrace"):
+ # checks.add("babeltrace") # Not in --build-options ?
+ args.append("LIBBABELTRACE_DIR={}".format(spec["babeltrace"].prefix))
+ else:
+ args.append("NO_LIBBABELTRACE=1")
+
+ if spec.satisfies("+libcap"):
+ # checks.add("libcap") # Not in --build-options ?
+ pass
+ else:
+ args.append("NO_LIBCAP=1")
+
+ if spec.satisfies("+numactl"):
+ checks.add("libnuma")
+ else:
+ args.append("NO_LIBNUMA=1")
+
+ if spec.satisfies("+xz"):
+ checks.add("lzma")
+ else:
+ args.append("NO_LZMA=1")
+
+ if spec.satisfies("+zstd"):
+ checks.add("zstd")
+ args.append("LIBZSTD_DIR={}".format(spec["zstd"].prefix))
+ else:
+ args.append("NO_LIBZSTD=1")
+
+ if spec.satisfies("+libtraceevent"):
+ if version >= Version("6.2"): # Not in --build-options before that
+ checks.add("libtraceevent")
+ if version >= Version("6.10"):
+ args.append("LIBTRACEEVENT_DIR={}".format(spec["libtraceevent"].prefix))
+ if version < Version("6.2"):
+ args.append("LIBTRACEEVENT_DYNAMIC=1")
+ else:
+ if version >= Version("6.2"):
+ args.append("NO_LIBTRACEEVENT=1")
+
+ if spec.satisfies("+jvmti"):
+ # checks.add("jvmti") # Not in --build-options ?
+ args.append("JDIR={}".format(spec["java"].prefix))
+ else:
+ args.append("NO_JVMTI=1")
+
+ with working_dir("tools/perf"):
+ make(
+ "V=1",
+ f"JOBS={make_jobs}",
+ f"prefix={prefix}",
+ "DESTDIR=",
+ *args,
+ "all",
+ "install",
+ parallel=False,
+ )
+
+ # Create a perfconfig with binutils paths
+ perfconfig = str(prefix.join("etc/perfconfig"))
+ assert not os.path.exists(perfconfig)
+ mkdirp(os.path.dirname(perfconfig))
+ with open(perfconfig, "w") as f:
+ f.write(
+ dedent(
+ """\
+ [annotate]
+ addr2line = {addr2line}
+ objdump = {objdump}
+ """
+ ).format(
+ addr2line=spec["binutils"].prefix.bin.join("addr2line"),
+ objdump=spec["binutils"].prefix.bin.join("objdump"),
+ )
+ )
+
+ # Post-install dependency check:
+ # $ perf version --build-options
+ # perf version 6.5.7
+ # dwarf: [ on ] # HAVE_DWARF_SUPPORT
+ # ...
+ perf = Executable(self.prefix.bin.perf)
+ output = perf("version", "--build-options", output=str, error=str)
+ tty.msg(output) # keep a trace in build log
+ enabled = set(re.findall(r"^\s*(\S+)\s*:\s*\[\s*on\s*\]", output, re.MULTILINE))
+ missing = set(checks) - enabled
+ tty.msg(f"detected features: {sorted(enabled)!r}")
+ tty.msg(f"expected features: {sorted(checks)!r}")
+ if missing:
+ raise InstallError(f"Perf is missing features {sorted(missing)!r}, see log")
diff --git a/var/spack/repos/builtin/packages/lis/package.py b/var/spack/repos/builtin/packages/lis/package.py
index 973be730ff..bae63b5b70 100644
--- a/var/spack/repos/builtin/packages/lis/package.py
+++ b/var/spack/repos/builtin/packages/lis/package.py
@@ -16,6 +16,10 @@ class Lis(AutotoolsPackage):
homepage = "https://www.ssisc.org/lis/index.en.html"
url = "https://www.ssisc.org/lis/dl/lis-2.0.27.zip"
+ version("2.1.6", sha256="7e2c4c5a1b96d2aa21fe799c073d7ca3cd5be79f350593d83102e37ca9780821")
+ version("2.1.5", sha256="4b78335cf85c327976536b8ac584f258dc9ae085e91b5d4a40879422b3e71543")
+ version("2.1.4", sha256="d94d634db49fff2368bb615225ee4fdde919c63b7a9bc1f81f7d166a8c105f92")
+ version("2.1.3", sha256="2ca0682198c2cdb6beb7866bd2b25071dc8964c6f76d8962477f848f39ff57ea")
version("2.1.1", sha256="e1b227fb9c88be4d897be4211198e1e9e8258eb75127848d35b67a0182bf4538")
version("2.1.0", sha256="630a1341824fbeef7fdfb82413bfdeb7d3df14e77616ba88159fce1150cf006c")
version("2.0.27", sha256="85f32f4abbc94d1b40b22c10b915170271b19822b6aa6939b1cb295f6e455237")
diff --git a/var/spack/repos/builtin/packages/listres/package.py b/var/spack/repos/builtin/packages/listres/package.py
index 800f161b84..2a82b923c2 100644
--- a/var/spack/repos/builtin/packages/listres/package.py
+++ b/var/spack/repos/builtin/packages/listres/package.py
@@ -15,9 +15,12 @@ class Listres(AutotoolsPackage, XorgPackage):
license("X11")
+ version("1.0.6", sha256="f262774a25db3cbf6e2a67f8bb2d3bc836ace2124afd63f1773cfd386df926a5")
version("1.0.5", sha256="ed068e63dfb6e42cfbcea568d161e53e1d120d99da9aa16c1f822803ebb38504")
version("1.0.3", sha256="87d5698b8aa4d841e45e6556932c9914210cbd8b10003d664b31185b087981be")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxt")
depends_on("libxmu")
diff --git a/var/spack/repos/builtin/packages/litestream/package.py b/var/spack/repos/builtin/packages/litestream/package.py
new file mode 100644
index 0000000000..8ff79e32f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/litestream/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Litestream(GoPackage):
+ """Streaming replication for SQLite."""
+
+ homepage = "https://github.com/benbjohnson/litestream"
+ url = "https://github.com/benbjohnson/litestream/archive/refs/tags/v0.3.13.tar.gz"
+
+ maintainers("alecbcs")
+
+ license("Apache-2.0", checked_by="cmelone")
+
+ version("0.3.13", sha256="92cb22323b8168f6efdfcad270772fea9e78c709a7149b1bf35d81fcb88bdaf9")
+
+ depends_on("go@1.21:", type="build", when="@0.3.12:")
+
+ build_directory = "cmd/litestream"
diff --git a/var/spack/repos/builtin/packages/lizard/package.py b/var/spack/repos/builtin/packages/lizard/package.py
index 60ce4e9cc4..9e18d86f92 100644
--- a/var/spack/repos/builtin/packages/lizard/package.py
+++ b/var/spack/repos/builtin/packages/lizard/package.py
@@ -18,9 +18,12 @@ class Lizard(MakefilePackage):
git = "https://github.com/inikep/lizard.git"
version("develop", branch="lizard")
+ version("2.0", sha256="85456b7274c9f0e477ff8e3f06dbc2f8ee8619d737a73c730c8a1adacb45f6da")
version("1.0", sha256="6f666ed699fc15dc7fdaabfaa55787b40ac251681b50c0d8df017c671a9457e6")
+ depends_on("c", type="build") # generated
+
patch("fix-install-decompress.patch", when="@1.0")
def install(self, spec, prefix):
- make("PREFIX=%s" % prefix, "install")
+ make(f"PREFIX={prefix}", "install")
diff --git a/var/spack/repos/builtin/packages/lksctp-tools/package.py b/var/spack/repos/builtin/packages/lksctp-tools/package.py
index 957e4a1774..e690b5a9be 100644
--- a/var/spack/repos/builtin/packages/lksctp-tools/package.py
+++ b/var/spack/repos/builtin/packages/lksctp-tools/package.py
@@ -14,8 +14,11 @@ class LksctpTools(AutotoolsPackage):
license("GPL-2.0-or-later AND LGPL-2.1-or-later")
+ version("1.0.21", sha256="8738bf17ecffbbe2440a6e2ffaf1cbcebb633fc99d63d88761af35c02a571893")
version("1.0.18", sha256="3e9ab5b3844a8b65fc8152633aafe85f406e6da463e53921583dfc4a443ff03a")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/detection_test.yaml b/var/spack/repos/builtin/packages/llvm-amdgpu/detection_test.yaml
new file mode 100644
index 0000000000..5fa0fb526b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/llvm-amdgpu/detection_test.yaml
@@ -0,0 +1,103 @@
+paths:
+- layout:
+ - executables:
+ - "bin/amdclang"
+ - "bin/amdclang++"
+ script: |
+ echo "AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-5.7.1/llvm/bin"
+ echo "Configuration file: /opt/rocm-5.7.1/llvm/bin/clang.cfg"
+ - executables:
+ - "bin/amdflang"
+ script: |
+ echo "AMD flang-classic version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-5.7.1/llvm/bin"
+ platforms: [linux]
+ results:
+ - spec: llvm-amdgpu@5.7.1
+ extra_attributes:
+ compilers:
+ c: ".*/bin/amdclang"
+ cxx: ".*/bin/amdclang[+][+]"
+ fortran: ".*/bin/amdflang"
+
+- layout:
+ - executables:
+ - "bin/amdclang"
+ - "bin/amdclang++"
+ script: |
+ echo "AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-5.7.1/llvm/bin"
+ echo "Configuration file: /opt/rocm-5.7.1/llvm/bin/clang.cfg"
+ platforms: [linux]
+ results:
+ - spec: llvm-amdgpu@5.7.1
+ extra_attributes:
+ compilers:
+ c: ".*/bin/amdclang"
+ cxx: ".*/bin/amdclang[+][+]"
+
+- layout:
+ - executables:
+ - "bin/amdclang"
+ - "bin/amdclang++"
+ script: |
+ echo "AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-5.7.1/llvm/bin"
+ echo "Configuration file: /opt/rocm-5.7.1/llvm/bin/clang.cfg"
+ - executables:
+ - "bin/amdflang"
+ script: |
+ echo "AMD flang-classic version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-5.7.1/llvm/bin"
+ - executables:
+ - "bin/amdclang-6"
+ - "bin/amdclang++-6"
+ script: |
+ echo "AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-6.0.2 24012 af27734ed982b52a9f1be0f035ac91726fc697e4)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-6.0.2/llvm/bin"
+ echo "Configuration file: /opt/rocm-6.0.2/llvm/bin/clang.cfg"
+ - executables:
+ - "bin/amdflang-6"
+ script: |
+ echo "AMD flang-classic version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-6.0.2 24012 af27734ed982b52a9f1be0f035ac91726fc697e4)"
+ echo "Target: x86_64-unknown-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /opt/rocm-6.0.2/llvm/bin"
+ platforms: [linux]
+ results:
+ - spec: llvm-amdgpu@6.0.2
+ extra_attributes:
+ compilers:
+ c: ".*/bin/amdclang-6$"
+ cxx: ".*/bin/amdclang[+][+]-6$"
+ fortran: ".*/bin/amdflang-6$"
+ - spec: llvm-amdgpu@5.7.1
+ extra_attributes:
+ compilers:
+ c: ".*/bin/amdclang"
+ cxx: ".*/bin/amdclang[+][+]"
+ fortran: ".*/bin/amdflang"
+- layout: # does not detect upstream clang
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "clang version 8.0.0 (tags/RELEASE_800/final"
+ echo "Target: x86_64-unknown-linux-gnu\n"
+ echo "Thread model: posix\n"
+ echo "InstalledDir: /usr/bin"
+ platforms: [linux]
+ results: []
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-ncurses-3.9.0.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/fix-ncurses-3.9.0.patch
deleted file mode 100644
index 24be1ecf31..0000000000
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-ncurses-3.9.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Adapt the fix-system-zlib-ncurses.patch for version 3.9.0.
-
---- llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake.orig 2020-11-20 21:41:10.498772540 -0600
-+++ llvm-project-rocm-3.9.0/llvm/cmake/config-ix.cmake 2020-11-20 22:27:57.242391054 -0600
-@@ -126,15 +126,11 @@
- endif()
- if(LLVM_ENABLE_TERMINFO)
- set(HAVE_TERMINFO 0)
-- foreach(library terminfo tinfo curses ncurses ncursesw)
-- string(TOUPPER ${library} library_suffix)
-- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
-- if(HAVE_TERMINFO_${library_suffix})
-- set(HAVE_TERMINFO 1)
-- set(TERMINFO_LIBS "${library}")
-- break()
-- endif()
-- endforeach()
-+ find_library(FIND_TERMINFO NAMES terminfo tinfo curses ncurses ncursesw)
-+ if(FIND_TERMINFO)
-+ set(HAVE_TERMINFO 1)
-+ set(TERMINFO_LIBS "${FIND_TERMINFO}")
-+ endif()
- else()
- set(HAVE_TERMINFO 0)
- endif()
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-spack-detection-4.2.0.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/fix-spack-detection-4.2.0.patch
deleted file mode 100644
index 2cedd4f073..0000000000
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-spack-detection-4.2.0.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
---- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
-+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
-@@ -58,19 +58,16 @@
- llvm::sys::path::append(PackagePath, SubDirs[0]);
- return PackagePath;
- }
-- if (SubDirs.size() == 0) {
-- unsigned DiagID = D.getDiags().getCustomDiagID(
-- DiagnosticsEngine::Error,
-- "Expecting SPACK package %0 at %1 but not found");
-- D.Diag(DiagID) << Prefix << Cand.Path;
-+ if (SubDirs.size() == 0 && Verbose) {
-+ llvm::errs() << "SPACK package " << Prefix << " not found at " << Cand.Path
-+ << '\n';
- return {};
- }
-
-- assert(SubDirs.size() > 1);
-- unsigned DiagID = D.getDiags().getCustomDiagID(
-- DiagnosticsEngine::Error,
-- "Expecting one SPACK package %0 at %1 but found more");
-- D.Diag(DiagID) << Prefix << Cand.Path;
-+ if (SubDirs.size() > 1 && Verbose) {
-+ llvm::errs() << "Cannot use SPACK package " << Prefix << " at " << Cand.Path
-+ << " due to multiple installations for the same version\n";
-+ }
- return {};
- }
-
-@@ -305,6 +302,7 @@
- const Driver &D, const llvm::Triple &HostTriple,
- const llvm::opt::ArgList &Args, bool DetectHIPRuntime, bool DetectDeviceLib)
- : D(D) {
-+ Verbose = Args.hasArg(options::OPT_v);
- RocmPathArg = Args.getLastArgValue(clang::driver::options::OPT_rocm_path_EQ);
- PrintROCmSearchDirs =
- Args.hasArg(clang::driver::options::OPT_print_rocm_search_dirs);
-diff --git a/clang/lib/Driver/ToolChains/ROCm.h b/clang/lib/Driver/ToolChains/ROCm.h
---- a/clang/lib/Driver/ToolChains/ROCm.h
-+++ b/clang/lib/Driver/ToolChains/ROCm.h
-@@ -110,6 +110,7 @@
- // Cache ROCm installation search paths.
- SmallVector<Candidate, 4> ROCmSearchDirs;
- bool PrintROCmSearchDirs;
-+ bool Verbose;
-
- bool allGenericLibsValid() const {
- return !OCML.empty() && !OCKL.empty() && !OpenCL.empty() && !HIP.empty() &&
-diff --git a/clang/test/Driver/rocm-detect.hip b/clang/test/Driver/rocm-detect.hip
---- a/clang/test/Driver/rocm-detect.hip
-+++ b/clang/test/Driver/rocm-detect.hip
-@@ -61,12 +61,15 @@
- // RUN: %s 2>&1 | FileCheck -check-prefixes=SPACK-SET %s
-
- // Test invalid SPACK ROCm installation missing hip and rocm-device-libs packages.
-+// The message about SPACK is emitted only if -v is specified.
-
- // RUN: rm -rf %T/rocm-spack/hip-*
- // RUN: rm -rf %T/rocm-spack/rocm-device-libs-*
- // RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \
- // RUN: -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 %s 2>&1 \
- // RUN: | FileCheck -check-prefixes=SPACK-MISS %s
-+// RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang --version 2>&1 \
-+// RUN: | FileCheck -check-prefixes=SPACK-MISS-SILENT %s
-
- // GFX902-DEFAULTLIBS: error: cannot find ROCm device library for gfx902. Provide its path via --rocm-path or --rocm-device-lib-path, or pass -nogpulib to build without ROCm device library
-
-@@ -90,8 +93,8 @@
- // SPACK-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
-
- // SPACK-MULT: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin
--// SPACK-MULT-DAG: Expecting one SPACK package hip-4.0.0 at [[DIR]] but found more
--// SPACK-MULT-DAG: Expecting one SPACK package rocm-device-libs-4.0.0 at [[DIR]] but found more
-+// SPACK-MULT-DAG: Cannot use SPACK package hip-4.0.0 at [[DIR]] due to multiple installations for the same version
-+// SPACK-MULT-DAG: Cannot use SPACK package rocm-device-libs-4.0.0 at [[DIR]] due to multiple installations for the same version
- // SPACK-MULT-NOT: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd
- // SPACK-MULT-NOT: "-mlink-builtin-bitcode" "[[DIR]]/rocm-device-libs-4.0.0-6wnyzz4hgl3hr7uswasnagt7j2adctbs/amdgcn/bitcode/hip.bc"
- // SPACK-MULT-NOT: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
-@@ -103,8 +106,12 @@
- // SPACK-SET-SAME: "-internal-isystem" "[[DIR]]/hip-4.0.0-abcd/include"
-
- // SPACK-MISS: InstalledDir: [[DIR:.*]]/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin
--// SPACK-MISS-DAG: Expecting SPACK package hip-4.0.0 at [[DIR]] but not found
--// SPACK-MISS-DAG: Expecting SPACK package rocm-device-libs-4.0.0 at [[DIR]] but not found
-+// SPACK-MISS-DAG: SPACK package hip-4.0.0 not found at [[DIR]]
-+// SPACK-MISS-DAG: SPACK package rocm-device-libs-4.0.0 not found at [[DIR]]
- // SPACK-MISS-NOT: Found HIP installation: [[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5, version 4.0.20214-a2917cd
- // SPACK-MISS-NOT: "-mlink-builtin-bitcode" "[[DIR]]/rocm-device-libs-4.0.0-6wnyzz4hgl3hr7uswasnagt7j2adctbs/amdgcn/bitcode/hip.bc"
- // SPACK-MISS-NOT: "-internal-isystem" "[[DIR]]/hip-4.0.0-5f63slrursbrvfe2txrrjkynbsywsob5/include"
-+
-+// SPACK-MISS-SILENT-NOT: SPACK package hip-{{.*}} not found at
-+// SPACK-MISS-SILENT-NOT: SPACK package rocm-device-libs-{{.*}} not found at
-+// SPACK-MISS-SILENT-NOT: Found HIP installation
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-system-zlib-ncurses.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/fix-system-zlib-ncurses.patch
deleted file mode 100644
index 64d429a7e9..0000000000
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/fix-system-zlib-ncurses.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 0f5e8e4368199ab993470dc4e7df5d91b806c557 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Tue, 11 Aug 2020 15:06:24 +0200
-Subject: [PATCH] Use find_library for zlib and ncurses
-
-find_library makes it easier to use a non-system version of zlib and
-ncurses, since it respects *_ROOT and CMAKE_PREFIX_PATH.
----
- llvm/cmake/config-ix.cmake | 28 ++++++++++------------------
- 1 file changed, 10 insertions(+), 18 deletions(-)
-
-diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
-index 612ce5bdbcb..e748e5ef8c1 100644
---- a/llvm/cmake/config-ix.cmake
-+++ b/llvm/cmake/config-ix.cmake
-@@ -120,15 +120,11 @@ endif()
- if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
- set(HAVE_LIBZ 0)
- if(LLVM_ENABLE_ZLIB)
-- foreach(library z zlib_static zlib)
-- string(TOUPPER ${library} library_suffix)
-- check_library_exists(${library} compress2 "" HAVE_LIBZ_${library_suffix})
-- if(HAVE_LIBZ_${library_suffix})
-- set(HAVE_LIBZ 1)
-- set(ZLIB_LIBRARIES "${library}")
-- break()
-- endif()
-- endforeach()
-+ find_library(FIND_ZLIB NAMES z zlib_static zlib)
-+ if(FIND_ZLIB)
-+ set(HAVE_LIBZ 1)
-+ set(ZLIB_LIBRARIES "${FIND_ZLIB}")
-+ endif()
- endif()
-
- # Don't look for these libraries on Windows.
-@@ -141,15 +137,11 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
- endif()
- if(LLVM_ENABLE_TERMINFO)
- set(HAVE_TERMINFO 0)
-- foreach(library terminfo tinfo curses ncurses ncursesw)
-- string(TOUPPER ${library} library_suffix)
-- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
-- if(HAVE_TERMINFO_${library_suffix})
-- set(HAVE_TERMINFO 1)
-- set(TERMINFO_LIBS "${library}")
-- break()
-- endif()
-- endforeach()
-+ find_library(FIND_TERMINFO NAMES terminfo tinfo curses ncurses ncursesw)
-+ if(FIND_TERMINFO)
-+ set(HAVE_TERMINFO 1)
-+ set(TERMINFO_LIBS "${FIND_TERMINFO}")
-+ endif()
- else()
- set(HAVE_TERMINFO 0)
- endif()
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
index f8cddebf84..ee9d5699ec 100644
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
+++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py
@@ -2,115 +2,52 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
import os
import re
+import shutil
from spack.package import *
-class LlvmAmdgpu(CMakePackage):
+class LlvmAmdgpu(CMakePackage, CompilerPackage):
"""Toolkit for the construction of highly optimized compilers,
optimizers, and run-time environments."""
- homepage = "https://github.com/RadeonOpenCompute/llvm-project"
- git = "https://github.com/RadeonOpenCompute/llvm-project.git"
- url = "https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/llvm-project"
+ git = "https://github.com/ROCm/llvm-project.git"
+ url = "https://github.com/ROCm/llvm-project/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
executables = [r"amdclang", r"amdclang\+\+", r"amdflang", r"clang.*", r"flang.*", "llvm-.*"]
generator("ninja")
- maintainers("srekolam", "renjithravindrankannath", "haampie")
+ maintainers("srekolam", "renjithravindrankannath", "haampie", "afzpatel")
license("Apache-2.0")
version("master", branch="amd-stg-open")
+ version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528")
+ version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7")
+ version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200")
+ version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097")
+ version("6.1.1", sha256="f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d")
+ version("6.1.0", sha256="6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34")
+ version("6.0.2", sha256="7d35acc84de1adee65406f92a369a30364703f84279241c444cd93a48c7eeb76")
+ version("6.0.0", sha256="c673708d413d60ca8606ee75c77e9871b6953c59029c987b92f2f6e85f683626")
version("5.7.1", sha256="6b54c422e45ad19c9bf5ab090ec21753e7f7d854ca78132c30eb146657b168eb")
version("5.7.0", sha256="4abdf00b297a77c5886cedb37e63acda2ba11cb9f4c0a64e133b05800aadfcf0")
version("5.6.1", sha256="045e43c0c4a3f4f2f1db9fb603a4f1ea3d56e128147e19ba17909eb57d7f08e5")
version("5.6.0", sha256="e922bd492b54d99e56ed88c81e2009ed6472059a180b10cc56ce1f9bd2d7b6ed")
version("5.5.1", sha256="7d7181f20f89cb0715191aa32914186c67a34258c13457055570d47e15296553")
version("5.5.0", sha256="5dc6c99f612b69ff73145bee17524e3712990100e16445b71634106acf7927cf")
- version("5.4.3", sha256="a844d3cc01613f6284a75d44db67c495ac1e9b600eacbb1eb13d2649f5d5404d")
- version("5.4.0", sha256="ff54f45a17723892cd775c1eaff9e5860527fcfd33d98759223c70e3362335bf")
- version("5.3.3", sha256="5296d5e474811c7d1e456cb6d5011db248b79b8d0512155e8a6c2aa5b5f12d38")
- version("5.3.0", sha256="4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e")
- version("5.2.3", sha256="1b852711aec3137b568fb65f93606d37fdcd62e06f5da3766f2ffcd4e0c646df")
- version("5.2.1", sha256="3644e927d943d61e22672422591c47a62ff83e3d87ced68439822156d8f79abf")
- version("5.2.0", sha256="0f892174111b78a02d1a00f8f46d9f80b9abb95513a7af38ecf2a5a0882fe87f")
- version("5.1.3", sha256="d236a2064363c0278f7ba1bb2ff1545ee4c52278c50640e8bb2b9cfef8a2f128")
- version("5.1.0", sha256="db5d45c4a7842a908527c1b7b8d4a40c688225a41d23cfa382eab23edfffdd10")
- version(
- "5.0.2",
- sha256="99a14394b406263576ed3d8d10334de7c78d42b349109f375d178b11492eecaf",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="bca2db4aaab71541cac588d6a708fde60f0ebe744809bde8a3847044a1a77413",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="36a4f7dd961cf373b743fc679bdf622089d2a905de2cfd6fd6c9e7ff8d8ad61f",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="b71451bf26650ba06c0c5c4c7df70f13975151eaa673ef0cc77c1ab0000ccc97",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="b53c6b13be7d77dc93a7c62e4adbb414701e4e601e1af2d1e98da4ee07c9837f",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="751eca1d18595b565cfafa01c3cb43efb9107874865a60c80d6760ba83edb661",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="244e38d824fa7dfa8d0edf3c036b3c84e9c17a16791828e4b745a8d31eb374ae",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="aa1f80f429fded465e86bcfaef72255da1af1c5c52d58a4c979bc2f6c2da5a69",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="8262aff88c1ff6c4deb4da5a4f8cda1bf90668950e2b911f93f73edaee53b370",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="1ff14b56d10c2c44d36c3c412b190d3d8cd1bb12cfc7cd58af004c16fd9987d1",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="93a28464a4d0c1c9f4ba55e473e5d1cde4c5c0e6d087ec8a0a3aef1f5f5208e8",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="3e2542ce54b91b5c841f33d542143e0e43eae95e8785731405af29f08ace725b",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="4878fa85473b24d88edcc89938441edc85d2e8a785e567b7bd7ce274ecc2fd9c",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="a844d3cc01613f6284a75d44db67c495ac1e9b600eacbb1eb13d2649f5d5404d")
+ version("5.4.0", sha256="ff54f45a17723892cd775c1eaff9e5860527fcfd33d98759223c70e3362335bf")
+ version("5.3.3", sha256="5296d5e474811c7d1e456cb6d5011db248b79b8d0512155e8a6c2aa5b5f12d38")
+ version("5.3.0", sha256="4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"rocm-device-libs",
@@ -120,7 +57,6 @@ class LlvmAmdgpu(CMakePackage):
"standalone spack package."
),
)
- variant("openmp", default=False, description="Enable OpenMP")
variant(
"llvm_dylib",
default=False,
@@ -133,46 +69,34 @@ class LlvmAmdgpu(CMakePackage):
description="Link LLVM tools against the LLVM shared library",
)
- provides("libllvm@11", when="@3.5:3.8")
- provides("libllvm@12", when="@3.9:4.2")
- provides("libllvm@13", when="@4.3:4.9")
- provides("libllvm@14", when="@5:5.2")
provides("libllvm@15", when="@5.3:5.4")
provides("libllvm@16", when="@5.5:5.6")
- provides("libllvm@17", when="@5.7:")
+ provides("libllvm@17", when="@5.7:6.1")
+ provides("libllvm@18", when="@6.2:")
- depends_on("cmake@3.4.3:", type="build", when="@:3.8")
- depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
+ depends_on("cmake@3.13.4:", type="build")
depends_on("python", type="build")
depends_on("z3", type="link")
depends_on("zlib-api", type="link")
depends_on("ncurses+termlib", type="link")
+ depends_on("libxml2", type="link")
depends_on("pkgconfig", type="build")
- # openmp dependencies
- depends_on("perl-data-dumper", type=("build"), when="+openmp")
- depends_on("hwloc", when="+openmp")
- depends_on("elf", type="link", when="+openmp")
-
- # Will likely only be fixed in LLVM 12 upstream
- patch("fix-system-zlib-ncurses.patch", when="@3.5.0:3.8.0")
- patch("fix-ncurses-3.9.0.patch", when="@3.9.0:4.0.0")
-
- # This is already fixed in upstream but not in 4.2.0 rocm release
- patch("fix-spack-detection-4.2.0.patch", when="@4.2.0:4.5.2")
-
- patch("remove-cyclades-inclusion-in-sanitizer.patch", when="@4.2.0:4.5.2")
+ # This flavour of LLVM doesn't work on MacOS, so we should ensure that it
+ # isn't used to satisfy any of the libllvm dependencies on the Darwin
+ # platform.
+ conflicts("platform=darwin")
# OpenMP clang toolchain looks for bitcode files in llvm/bin/../lib
# as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice.
# Below patch is to look in the old path.
patch("adjust-openmp-bitcode-directory-for-llvm-link.patch", when="@5.2.0:5.6")
- patch("0001-update-HIP_PATH-deduction-for-5.7.0.patch", when="@5.7.0:5.7")
+ patch("0001-update-HIP_PATH-deduction-for-5.7.0.patch", when="@5.7.0:6.0")
# Below patch is to set the flag -mcode-object-version=none until
# the below fix is available in device-libs release code.
- # https://github.com/RadeonOpenCompute/ROCm-Device-Libs/commit/f0356159dbdc93ea9e545f9b61a7842f9c881fdf
- patch("patch-llvm-5.5.0.patch", when="@5.5: +rocm-device-libs")
+ # https://github.com/ROCm/ROCm-Device-Libs/commit/f0356159dbdc93ea9e545f9b61a7842f9c881fdf
+ patch("patch-llvm-5.5.0.patch", when="@5.5:5.7 +rocm-device-libs")
# i1 muls can sometimes happen after SCEV.
# They resulted in ISel failures because we were missing the patterns for them.
@@ -181,13 +105,33 @@ class LlvmAmdgpu(CMakePackage):
patch("001-Add-i1-mul-patterns.patch", when="@5.6")
patch("001-Add-i1-mul-patterns-5.7.patch", when="@5.7")
+ # fixes the libamdhip64.so not found in some ROCm math lib tests
+ patch(
+ "https://github.com/ROCm/llvm-project/commit/444d1d12bbc0269fed5451fb1a9110a049679ca5.patch?full_index=1",
+ sha256="b4774ca19b030890d7b276d12c446400ccf8bc3aa724c7f2e9a73531a7400d69",
+ when="@6.0:",
+ )
+
+ # Fix for https://github.com/llvm/llvm-project/issues/78530
+ # Patch from https://github.com/llvm/llvm-project/pull/80071
+ patch(
+ "https://github.com/ROCm/llvm-project/commit/c651b2b0d9d1393fb5191ac3acfe96e5ecc94bbc.patch?full_index=1",
+ sha256="eaf700a5b51d53324a93e5c951bc08b6311ce2053c44c1edfff5119f472d8080",
+ when="@:6.2",
+ )
+
conflicts("^cmake@3.19.0")
+ # https://github.com/spack/spack/issues/45746
+ conflicts("^ninja@1.12:", when="@:6.0")
+
root_cmakelists_dir = "llvm"
install_targets = ["clang-tidy", "install"]
# Add device libs sources so they can be an external LLVM project
for d_version, d_shasum in [
+ ("6.0.2", "c6d88b9b46e39d5d21bd5a0c1eba887ec473a370b1ed0cebd1d2e910eedc5837"),
+ ("6.0.0", "198df4550d4560537ba60ac7af9bde31d59779c8ec5d6309627f77a43ab6ef6f"),
("5.7.1", "703de8403c0bd0d80f37c970a698f10f148daf144d34f982e4484d04f7c7bbef"),
("5.7.0", "0f8780b9098573f1c456bdc84358de924dcf00604330770a383983e1775bf61e"),
("5.6.1", "f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c"),
@@ -198,44 +142,31 @@ class LlvmAmdgpu(CMakePackage):
("5.4.0", "d68813ded47179c39914c8d1b76af3dad8c714b10229d1e2246af67609473951"),
("5.3.3", "963c9a0561111788b55a8c3b492e2a5737047914752376226c97a28122a4d768"),
("5.3.0", "f7e1665a1650d3d0481bec68252e8a5e68adc2c867c63c570f6190a1d2fe735c"),
- ("5.2.3", "16b7fc7db4759bd6fb54852e9855fa16ead76c97871d7e1e9392e846381d611a"),
- ("5.2.1", "e5855387ce73ed483ed0d03dbfef31f297c6ca66cf816f6816fd5ee373fc8225"),
- ("5.2.0", "901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c"),
- ("5.1.3", "c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e"),
- ("5.1.0", "47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f"),
- ("5.0.2", "49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e"),
- ("5.0.0", "83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0"),
- ("4.5.2", "50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61"),
- ("4.5.0", "78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77"),
- ("4.3.1", "a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592"),
- ("4.3.0", "055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2"),
- ("4.2.0", "34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f"),
- ("4.1.0", "f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b"),
- ("4.0.0", "d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a"),
- ("3.10.0", "bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc"),
- ("3.9.0", "c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7"),
- ("3.8.0", "e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574"),
- ("3.7.0", "b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d"),
- ("3.5.0", "dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378"),
]:
resource(
name="rocm-device-libs",
placement="rocm-device-libs",
- url="https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/ROCm-Device-Libs/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
- when="@{0} +rocm-device-libs".format(d_version),
+ when=f"@{d_version} +rocm-device-libs",
)
resource(
name="rocm-device-libs",
placement="rocm-device-libs",
- git="https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git",
+ git="https://github.com/ROCm/ROCm-Device-Libs.git",
branch="amd-stg-open",
when="@master +rocm-device-libs",
)
for d_version, d_shasum in [
+ ("6.2.4", "b7aa0055855398d1228c39a6f4feb7d7be921af4f43d82855faf0b531394bb9b"),
+ ("6.2.1", "dbe477b323df636f5e3221471780da156c938ec00dda4b50639aa8d7fb9248f4"),
+ ("6.2.0", "c98090041fa56ca4a260709876e2666f85ab7464db9454b177a189e1f52e0b1a"),
+ ("6.1.2", "6eb7a02e5f1e5e3499206b9e74c9ccdd644abaafa2609dea0993124637617866"),
+ ("6.1.1", "72841f112f953c16619938273370eb8727ddf6c2e00312856c9fca54db583b99"),
+ ("6.1.0", "50386ebcb7ff24449afa2a10c76a059597464f877225c582ba3e097632a43f9c"),
+ ("6.0.2", "e7ff4d7ac35a2dd8aad1cb40b96511a77a9c23fe4d1607902328e53728e05c28"),
+ ("6.0.0", "99e8fa1af52d0bf382f28468e1a345af1ff3452c35914a6a7b5eeaf69fc568db"),
("5.7.1", "655e9bfef4b0b6ad3f9b89c934dc0a8377273bb0bccbda6c399ac5d5d2c1c04c"),
("5.7.0", "2c56ec5c78a36f2b847afd4632cb25dbf6ecc58661eb2ae038c2552342e6ce23"),
("5.6.1", "4de9a57c2092edf9398d671c8a2c60626eb7daf358caf710da70d9c105490221"),
@@ -244,19 +175,21 @@ class LlvmAmdgpu(CMakePackage):
resource(
name="hsa-runtime",
placement="hsa-runtime",
- url=f"https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-{d_version}.tar.gz",
+ url=f"https://github.com/ROCm/ROCR-Runtime/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
resource(
name="hsa-runtime",
placement="hsa-runtime",
- git="https://github.com/RadeonOpenCompute/ROCR-Runtime.git",
+ git="https://github.com/ROCm/ROCR-Runtime.git",
branch="master",
when="@master",
)
for d_version, d_shasum in [
+ ("6.0.2", "737b110d9402509db200ee413fb139a78369cf517453395b96bda52d0aa362b9"),
+ ("6.0.0", "04353d27a512642a5e5339532a39d0aabe44e0964985de37b150a2550385800a"),
("5.7.1", "3b9433b4a0527167c3e9dfc37a3c54e0550744b8d4a8e1be298c8d4bcedfee7c"),
("5.7.0", "e234bcb93d602377cfaaacb59aeac5796edcd842a618162867b7e670c3a2c42c"),
("5.6.1", "0a85d84619f98be26ca7a32c71f94ed3c4e9866133789eabb451be64ce739300"),
@@ -265,61 +198,50 @@ class LlvmAmdgpu(CMakePackage):
resource(
name="comgr",
placement="comgr",
- url=f"https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-{d_version}.tar.gz",
+ url=f"https://github.com/ROCm/ROCm-CompilerSupport/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
resource(
name="comgr",
placement="comgr",
- git="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git",
+ git="https://github.com/ROCm/ROCm-CompilerSupport.git",
branch="amd-stg-open",
when="@master",
)
def cmake_args(self):
llvm_projects = ["clang", "lld", "clang-tools-extra", "compiler-rt"]
- llvm_runtimes = []
- args = []
- if self.spec.satisfies("@4.3.0:"):
- args = [
- self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"),
- self.define("LLLVM_ENABLE_ZLIB", "ON"),
- self.define("CLANG_DEFAULT_LINKER", "lld"),
- self.define("LIBCXX_ENABLE_SHARED", "OFF"),
- self.define("LIBCXX_ENABLE_STATIC", "ON"),
- self.define("LIBCXX_INSTALL_LIBRARY", "OFF"),
- self.define("LIBCXX_INSTALL_HEADERS", "OFF"),
- self.define("LIBCXXABI_ENABLE_SHARED", "OFF"),
- self.define("LIBCXXABI_ENABLE_STATIC", "ON"),
- self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"),
- ]
- args.append(self.define("LLVM_ENABLE_RTTI", "ON"))
- if self.spec.satisfies("@4.3.0:4.5.2"):
- llvm_projects.append("libcxx")
- llvm_projects.append("libcxxabi")
- if self.spec.satisfies("@5.0.0:"):
- llvm_runtimes.append("libcxx")
- llvm_runtimes.append("libcxxabi")
+ llvm_runtimes = ["libcxx", "libcxxabi"]
+ args = [
+ self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"),
+ self.define("LLLVM_ENABLE_ZLIB", "ON"),
+ self.define("CLANG_DEFAULT_LINKER", "lld"),
+ self.define("LIBCXX_ENABLE_SHARED", "OFF"),
+ self.define("LIBCXX_ENABLE_STATIC", "ON"),
+ self.define("LIBCXX_INSTALL_LIBRARY", "OFF"),
+ self.define("LIBCXX_INSTALL_HEADERS", "OFF"),
+ self.define("LIBCXXABI_ENABLE_SHARED", "OFF"),
+ self.define("LIBCXXABI_ENABLE_STATIC", "ON"),
+ self.define("LIBCXXABI_INSTALL_STATIC_LIBRARY", "OFF"),
+ self.define("LLVM_ENABLE_RTTI", "ON"),
+ self.define("LLVM_AMDGPU_ALLOW_NPI_TARGETS", "ON"),
+ self.define("PACKAGE_VENDOR", "AMD"),
+ self.define("CLANG_ENABLE_AMDCLANG", "ON"),
+ ]
+
+ if self.spec.target.family == "aarch64":
+ args.append(self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;AArch64"))
+ else:
args.append(self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"))
- args.append(self.define("LLVM_AMDGPU_ALLOW_NPI_TARGETS", "ON"))
- args.extend([self.define("LLVM_ENABLE_RUNTIMES", ";".join(llvm_runtimes))])
- if "+openmp" in self.spec:
- llvm_projects.append("openmp")
- args.extend([self.define("LLVM_ENABLE_PROJECTS", ";".join(llvm_projects))])
-
- if self.spec.satisfies("@4.5.0:"):
- args.append(self.define("PACKAGE_VENDOR", "AMD"))
-
- if self.spec.satisfies("@5.0.0:"):
- args.append(self.define("CLANG_ENABLE_AMDCLANG", "ON"))
- if self.spec.satisfies("@5.3.0:"):
- args.append(self.define("LLVM_TARGETS_TO_BUILD", "AMDGPU;X86"))
- args.append(self.define("LLLVM_AMDGPU_ALLOW_NPI_TARGETS", True))
# Enable rocm-device-libs as a external project
- if "+rocm-device-libs" in self.spec:
- dir = os.path.join(self.stage.source_path, "rocm-device-libs")
+ if self.spec.satisfies("+rocm-device-libs"):
+ if self.spec.satisfies("@:6.0"):
+ dir = os.path.join(self.stage.source_path, "rocm-device-libs")
+ elif self.spec.satisfies("@6.1:"):
+ dir = os.path.join(self.stage.source_path, "amd/device-libs")
+
args.extend(
[
self.define("LLVM_EXTERNAL_PROJECTS", "device-libs"),
@@ -327,12 +249,12 @@ class LlvmAmdgpu(CMakePackage):
]
)
- if "+llvm_dylib" in self.spec:
- args.append("-DLLVM_BUILD_LLVM_DYLIB:Bool=ON")
+ if self.spec.satisfies("+llvm_dylib"):
+ args.append(self.define("LLVM_BUILD_LLVM_DYLIB", True))
- if "+link_llvm_dylib" in self.spec:
- args.append("-DLLVM_LINK_LLVM_DYLIB:Bool=ON")
- args.append("-DCLANG_LINK_CLANG_DYLIB:Bool=ON")
+ if self.spec.satisfies("+link_llvm_dylib"):
+ args.append(self.define("LLVM_LINK_LLVM_DYLIB", True))
+ args.append(self.define("CLANG_LINK_CLANG_DYLIB", True))
# Get the GCC prefix for LLVM.
if self.compiler.name == "gcc":
@@ -342,55 +264,67 @@ class LlvmAmdgpu(CMakePackage):
if self.spec.satisfies("@5.5.0:"):
args.append("-DCLANG_DEFAULT_RTLIB=compiler-rt")
args.append("-DCLANG_DEFAULT_UNWINDLIB=libgcc")
- if self.spec.satisfies("@5.5.0:"):
- args.append("-DCLANG_DEFAULT_RTLIB=compiler-rt")
- args.append("-DCLANG_DEFAULT_UNWINDLIB=libgcc")
+ if self.spec.satisfies("@5.6.0:6.0"):
+ comgrinc_path = os.path.join(self.stage.source_path, "comgr/lib/comgr/include")
+ elif self.spec.satisfies("@6.1:"):
+ comgrinc_path = os.path.join(self.stage.source_path, "amd/comgr/include")
if self.spec.satisfies("@5.6.0:"):
hsainc_path = os.path.join(self.stage.source_path, "hsa-runtime/src/inc")
- comgrinc_path = os.path.join(self.stage.source_path, "comgr/lib/comgr/include")
args.append("-DSANITIZER_HSA_INCLUDE_PATH={0}".format(hsainc_path))
args.append("-DSANITIZER_COMGR_INCLUDE_PATH={0}".format(comgrinc_path))
args.append("-DSANITIZER_AMDGPU:Bool=ON")
+ if self.spec.satisfies("@:6.0"):
+ args.append(self.define("LLVM_ENABLE_PROJECTS", llvm_projects))
+ args.append(self.define("LLVM_ENABLE_RUNTIMES", llvm_runtimes))
+ elif self.spec.satisfies("@6.1:"):
+ llvm_projects.remove("compiler-rt")
+ llvm_runtimes.extend(["compiler-rt", "libunwind"])
+ args.append(self.define("LLVM_ENABLE_PROJECTS", llvm_projects))
+ args.append(self.define("LLVM_ENABLE_RUNTIMES", llvm_runtimes))
+ args.append(self.define("LLVM_ENABLE_LIBCXX", "OFF"))
+ args.append(self.define("CLANG_LINK_FLANG_LEGACY", True))
+ args.append(self.define("CMAKE_CXX_STANDARD", 17))
+ args.append(self.define("FLANG_INCLUDE_DOCS", False))
+ args.append(self.define("LLVM_BUILD_DOCS", "ON"))
+ args.append(self.define("CLANG_DEFAULT_PIE_ON_LINUX", "OFF"))
return args
- @run_after("install")
- def post_install(self):
- # TODO:Enabling LLVM_ENABLE_RUNTIMES for libcxx,libcxxabi did not build.
- # bootstraping the libcxx with the just built clang
- if self.spec.satisfies("@4.5.0:4.5.2"):
- spec = self.spec
- define = self.define
- libcxxdir = "build-bootstrapped-libcxx"
- with working_dir(libcxxdir, create=True):
- cmake_args = [
- self.stage.source_path + "/libcxx",
- define("CMAKE_C_COMPILER", spec.prefix.bin + "/clang"),
- define("CMAKE_CXX_COMPILER", spec.prefix.bin + "/clang++"),
- define("CMAKE_INSTALL_PREFIX", spec.prefix),
- ]
- cmake_args.extend(self.cmake_args())
- cmake(*cmake_args)
- cmake("--build", ".")
-
- @classmethod
- def determine_version(cls, path):
- match = re.search(r"amdclang", path)
- detected_version = None
- if match:
- version_query = Executable(path)("--version", output=str)
- match = re.search(r"roc-(\d)\.(\d).(\d)", version_query)
- if match:
- detected_version = "{0}.{1}.{2}".format(
- int(match.group(1)), int(match.group(2)), int(match.group(3))
- )
- return detected_version
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["amdclang"]
+ cxx_names = ["amdclang++"]
+ fortran_names = ["amdflang"]
+ compiler_version_argument = "--version"
+ compiler_version_regex = r"roc-(\d+[._]\d+[._]\d+)"
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_run_environment(self, env):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
- env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")
+ env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/lib")
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_dependent_run_environment(self, env, dependent_spec):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
- env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")
+ env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/lib")
+
+ @run_after("install")
+ def post_install(self):
+ if self.spec.satisfies("@6.1: +rocm-device-libs"):
+ exe = self.prefix.bin.join("llvm-config")
+ output = Executable(exe)("--version", output=str, error=str)
+ version = re.split("[.]", output)[0]
+ mkdirp(join_path(self.prefix.lib.clang, version, "lib"), "amdgcn")
+ install_tree(
+ self.prefix.amdgcn, join_path(self.prefix.lib.clang, version, "lib", "amdgcn")
+ )
+ shutil.rmtree(self.prefix.amdgcn)
+ os.symlink(
+ join_path(self.prefix.lib.clang, version, "lib", "amdgcn"),
+ os.path.join(self.prefix, "amdgcn"),
+ )
+
+ # Required for enabling asan on dependent packages
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ for root, _, files in os.walk(self.spec["llvm-amdgpu"].prefix):
+ if "libclang_rt.asan-x86_64.so" in files:
+ env.prepend_path("LD_LIBRARY_PATH", root)
+ env.prune_duplicate_paths("LD_LIBRARY_PATH")
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/remove-cyclades-inclusion-in-sanitizer.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/remove-cyclades-inclusion-in-sanitizer.patch
deleted file mode 100644
index 8d055507cf..0000000000
--- a/var/spack/repos/builtin/packages/llvm-amdgpu/remove-cyclades-inclusion-in-sanitizer.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 68d5235cb58f988c71b403334cd9482d663841ab Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Thu, 20 May 2021 18:55:11 +0100
-Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer
-
-The Linux kernel has removed the interface to cyclades from
-the latest kernel headers[1] due to them being orphaned for the
-past 13 years.
-
-libsanitizer uses this header when compiling against glibc, but
-glibcs itself doesn't seem to have any references to cyclades.
-
-Further more it seems that the driver is broken in the kernel and
-the firmware doesn't seem to be available anymore.
-
-As such since this is breaking the build of libsanitizer (and so the
-GCC bootstrap[2]) I propose to remove this.
-
-[1] https://lkml.org/lkml/2021/3/2/153
-[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379
-
-Reviewed By: eugenis
-
-Differential Revision: https://reviews.llvm.org/D102059
----
- .../sanitizer_common_interceptors_ioctl.inc | 9 ---------
- .../sanitizer_platform_limits_posix.cpp | 11 -----------
- .../sanitizer_platform_limits_posix.h | 10 ----------
- 3 files changed, 30 deletions(-)
-
-diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-index 7f181258eab52..b7da659875574 100644
---- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
-@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
-
- #if SANITIZER_GLIBC
- // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
-- _(CYGETDEFTHRESH, WRITE, sizeof(int));
-- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
-- _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
-- _(CYGETTHRESH, WRITE, sizeof(int));
-- _(CYGETTIMEOUT, WRITE, sizeof(int));
-- _(CYSETDEFTHRESH, NONE, 0);
-- _(CYSETDEFTIMEOUT, NONE, 0);
-- _(CYSETTHRESH, NONE, 0);
-- _(CYSETTIMEOUT, NONE, 0);
- _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
- _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
- _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
-diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-index 35a690cba5c83..6e5c330b98eff 100644
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
-@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t;
- # include <sys/procfs.h>
- #endif
- #include <sys/user.h>
--#include <linux/cyclades.h>
- #include <linux/if_eql.h>
- #include <linux/if_plip.h>
- #include <linux/lp.h>
-@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
-
- #if SANITIZER_GLIBC
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
- #if EV_VERSION > (0x010000)
- unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
- #else
-@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
- #endif // SANITIZER_LINUX
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
-- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
-- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
-- unsigned IOCTL_CYGETMON = CYGETMON;
-- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
-- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
-- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
-- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
-- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
-- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
- unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
- unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
- unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
-diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
-index 836b178c131ba..8a156b7fcb80a 100644
---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
-+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
-@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- extern unsigned struct_ax25_parms_struct_sz;
--extern unsigned struct_cyclades_monitor_sz;
- extern unsigned struct_input_keymap_entry_sz;
- extern unsigned struct_ipx_config_data_sz;
- extern unsigned struct_kbdiacrs_sz;
-@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
- #endif // SANITIZER_LINUX
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
--extern unsigned IOCTL_CYGETDEFTHRESH;
--extern unsigned IOCTL_CYGETDEFTIMEOUT;
--extern unsigned IOCTL_CYGETMON;
--extern unsigned IOCTL_CYGETTHRESH;
--extern unsigned IOCTL_CYGETTIMEOUT;
--extern unsigned IOCTL_CYSETDEFTHRESH;
--extern unsigned IOCTL_CYSETDEFTIMEOUT;
--extern unsigned IOCTL_CYSETTHRESH;
--extern unsigned IOCTL_CYSETTIMEOUT;
- extern unsigned IOCTL_EQL_EMANCIPATE;
- extern unsigned IOCTL_EQL_ENSLAVE;
- extern unsigned IOCTL_EQL_GETMASTRCFG;
diff --git a/var/spack/repos/builtin/packages/llvm-doe/package.py b/var/spack/repos/builtin/packages/llvm-doe/package.py
index 90faf6e135..8aae32d5ac 100644
--- a/var/spack/repos/builtin/packages/llvm-doe/package.py
+++ b/var/spack/repos/builtin/packages/llvm-doe/package.py
@@ -9,8 +9,7 @@ import sys
import llnl.util.tty as tty
-import spack.build_environment
-import spack.util.executable
+from spack.build_systems.cmake import get_cmake_prefix_path
from spack.package import *
@@ -28,8 +27,6 @@ class LlvmDoe(CMakePackage, CudaPackage):
generator("ninja")
- family = "compiler" # Used by lmod
-
version("doe", branch="doe", preferred=True)
version("upstream", branch="llvm.org/main")
version("bolt", branch="bolt/main")
@@ -38,6 +35,10 @@ class LlvmDoe(CMakePackage, CudaPackage):
version("pragma-omp-tile", branch="sollve/pragma-omp-tile")
version("13.0.0", branch="llvm.org/llvmorg-13.0.0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# NOTE: The debug version of LLVM is an order of magnitude larger than
# the release version, and may take up 20-30 GB of space. If you want
# to save space, build with `build_type=Release`.
@@ -185,7 +186,6 @@ class LlvmDoe(CMakePackage, CudaPackage):
# code signing is only necessary on macOS",
conflicts("+code_signing", when="platform=linux")
- conflicts("+code_signing", when="platform=cray")
conflicts(
"+code_signing",
@@ -257,7 +257,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
match = version_regex.search(output)
if match:
return match.group(match.lastindex)
- except spack.util.executable.ProcessError:
+ except ProcessError:
pass
except Exception as e:
tty.debug(e)
@@ -308,7 +308,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("c", None)
result = None
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
result = os.path.join(self.spec.prefix.bin, "clang")
return result
@@ -319,7 +319,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("cxx", None)
result = None
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
result = os.path.join(self.spec.prefix.bin, "clang++")
return result
@@ -330,7 +330,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("fc", None)
result = None
- if "+flang" in self.spec:
+ if self.spec.satisfies("+flang"):
result = os.path.join(self.spec.prefix.bin, "flang")
return result
@@ -341,7 +341,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("f77", None)
result = None
- if "+flang" in self.spec:
+ if self.spec.satisfies("+flang"):
result = os.path.join(self.spec.prefix.bin, "flang")
return result
@@ -391,10 +391,10 @@ class LlvmDoe(CMakePackage, CudaPackage):
env.prepend_path("PATH", self.stage.path)
def setup_run_environment(self, env):
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
env.set("CC", join_path(self.spec.prefix.bin, "clang"))
env.set("CXX", join_path(self.spec.prefix.bin, "clang++"))
- if "+flang" in self.spec:
+ if self.spec.satisfies("+flang"):
env.set("FC", join_path(self.spec.prefix.bin, "flang"))
env.set("F77", join_path(self.spec.prefix.bin, "flang"))
@@ -405,13 +405,11 @@ class LlvmDoe(CMakePackage, CudaPackage):
define = self.define
from_variant = self.define_from_variant
- python = spec["python"]
cmake_args = [
define("LLVM_REQUIRES_RTTI", True),
define("LLVM_ENABLE_RTTI", True),
define("LLVM_ENABLE_EH", True),
define("CLANG_DEFAULT_OPENMP_RUNTIME", "libomp"),
- define("PYTHON_EXECUTABLE", python.command.path),
define("LIBOMP_USE_HWLOC", True),
define("LIBOMP_HWLOC_INSTALL_DIR", spec["hwloc"].prefix),
]
@@ -420,15 +418,10 @@ class LlvmDoe(CMakePackage, CudaPackage):
if version_suffix != "none":
cmake_args.append(define("LLVM_VERSION_SUFFIX", version_suffix))
- if python.version >= Version("3"):
- cmake_args.append(define("Python3_EXECUTABLE", python.command.path))
- else:
- cmake_args.append(define("Python2_EXECUTABLE", python.command.path))
-
projects = []
runtimes = []
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cmake_args.extend(
[
define("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix),
@@ -442,7 +435,7 @@ class LlvmDoe(CMakePackage, CudaPackage):
),
]
)
- if "+omp_as_runtime" in spec:
+ if spec.satisfies("+omp_as_runtime"):
cmake_args.extend(
[
define("LIBOMPTARGET_NVPTX_ENABLE_BCLIB", True),
@@ -465,21 +458,21 @@ class LlvmDoe(CMakePackage, CudaPackage):
cmake_args.append(from_variant("LIBOMPTARGET_ENABLE_DEBUG", "omp_debug"))
- if "+lldb" in spec:
+ if spec.satisfies("+lldb"):
if spec.version >= Version("10"):
cmake_args.append(from_variant("LLDB_ENABLE_PYTHON", "python"))
else:
- cmake_args.append(define("LLDB_DISABLE_PYTHON", "~python" in spec))
+ cmake_args.append(define("LLDB_DISABLE_PYTHON", spec.satisfies("~python")))
if spec.satisfies("@5.0.0: +python"):
cmake_args.append(define("LLDB_USE_SYSTEM_SIX", True))
- if "+gold" in spec:
+ if spec.satisfies("+gold"):
cmake_args.append(define("LLVM_BINUTILS_INCDIR", spec["binutils"].prefix.include))
- if "+clang" in spec:
+ if spec.satisfies("+clang"):
projects.append("clang")
projects.append("clang-tools-extra")
- if "+omp_as_runtime" in spec:
+ if spec.satisfies("+omp_as_runtime"):
runtimes.append("openmp")
else:
projects.append("openmp")
@@ -491,22 +484,22 @@ class LlvmDoe(CMakePackage, CudaPackage):
if self.spec.satisfies("@9:"):
cmake_args.append(define("LLVM_ENABLE_Z3_SOLVER", self.spec.satisfies("@9:+z3")))
- if "+flang" in spec:
+ if spec.satisfies("+flang"):
projects.append("flang")
- if "+lldb" in spec:
+ if spec.satisfies("+lldb"):
projects.append("lldb")
- if "+lld" in spec:
+ if spec.satisfies("+lld"):
projects.append("lld")
- if "+compiler-rt" in spec:
+ if spec.satisfies("+compiler-rt"):
projects.append("compiler-rt")
- if "+libcxx" in spec:
+ if spec.satisfies("+libcxx"):
projects.append("libcxx")
projects.append("libcxxabi")
- if "+mlir" in spec:
+ if spec.satisfies("+mlir"):
projects.append("mlir")
- if "+internal_unwind" in spec:
+ if spec.satisfies("+internal_unwind"):
projects.append("libunwind")
- if "+polly" in spec:
+ if spec.satisfies("+polly"):
projects.append("polly")
cmake_args.append(define("LINK_POLLY_INTO_TOOLS", True))
@@ -550,13 +543,13 @@ class LlvmDoe(CMakePackage, CudaPackage):
projects.remove("openmp")
projects.append("bolt")
cmake_args.append("-DLIBOMP_USE_BOLT_DEFAULT=ON")
- if "+argobots" in spec and spec.satisfies("@bolt"):
+ if spec.satisfies("+argobots") and spec.satisfies("@bolt"):
cmake_args.append("-DLIBOMP_USE_ARGOBOTS=ON")
if self.compiler.name == "gcc":
cmake_args.append(define("GCC_INSTALL_PREFIX", self.compiler.prefix))
- # if spec.satisfies("platform=cray") or spec.satisfies("platform=linux"):
+ # if spec.satisfies("platform=linux"):
# cmake_args.append("-DCMAKE_BUILD_WITH_INSTALL_RPATH=1")
if self.spec.satisfies("~code_signing platform=darwin"):
@@ -577,9 +570,9 @@ class LlvmDoe(CMakePackage, CudaPackage):
define = self.define
# unnecessary if we build openmp via LLVM_ENABLE_RUNTIMES
- if "+cuda ~omp_as_runtime" in self.spec:
+ if self.spec.satisfies("+cuda ~omp_as_runtime"):
ompdir = "build-bootstrapped-omp"
- prefix_paths = spack.build_environment.get_cmake_prefix_path(self)
+ prefix_paths = get_cmake_prefix_path(self)
prefix_paths.append(str(spec.prefix))
# rebuild libomptarget to get bytecode runtime library files
with working_dir(ompdir, create=True):
@@ -606,10 +599,10 @@ class LlvmDoe(CMakePackage, CudaPackage):
cmake(*cmake_args)
ninja()
ninja("install")
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
install_tree("llvm/bindings/python", python_platlib)
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
install_tree("clang/bindings/python", python_platlib)
with working_dir(self.build_directory):
diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
index cb35ca36d2..4e0385dd94 100644
--- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
+++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
@@ -24,6 +24,10 @@ class LlvmOpenmpOmpt(CMakePackage):
# align-to-tr-rebased branch
version("3.9.2b", commit="982a08bcf3df9fb5afc04ac3bada47f19cc4e3d3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# variant for building llvm-openmp-ompt as a stand alone library
variant(
"standalone",
@@ -57,7 +61,7 @@ class LlvmOpenmpOmpt(CMakePackage):
# Build llvm-openmp-ompt as a stand alone library
# CMAKE rpath variable prevents standalone error
# where this package wants the llvm tools path
- if "+standalone" in self.spec:
+ if self.spec.satisfies("+standalone"):
cmake_args.extend(
[
"-DLIBOMP_STANDALONE_BUILD=true",
@@ -68,11 +72,11 @@ class LlvmOpenmpOmpt(CMakePackage):
# Build llvm-openmp-ompt using the tr6_forwards branch
# This requires the version to be 5.0 (50)
- if "@tr6_forwards" in self.spec:
+ if self.spec.satisfies("@tr6_forwards"):
cmake_args.extend(["-DLIBOMP_OMP_VERSION=50"])
# Disable support for libomptarget
- if "~libomptarget" in self.spec:
+ if self.spec.satisfies("~libomptarget"):
cmake_args.extend(["-DOPENMP_ENABLE_LIBOMPTARGET=OFF"])
return cmake_args
diff --git a/var/spack/repos/builtin/packages/llvm-openmp/package.py b/var/spack/repos/builtin/packages/llvm-openmp/package.py
index b826e86a36..a1e3f056c9 100644
--- a/var/spack/repos/builtin/packages/llvm-openmp/package.py
+++ b/var/spack/repos/builtin/packages/llvm-openmp/package.py
@@ -8,6 +8,15 @@ import os
from spack.package import *
+def resource_for_ver(ver, sha256):
+ resource(
+ name="cmake",
+ url=f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{ver}/cmake-{ver}.src.tar.xz",
+ sha256=sha256,
+ when=f"@{ver}",
+ )
+
+
class LlvmOpenmp(CMakePackage):
"""The OpenMP subproject of LLVM contains the components required to build
an executable OpenMP program that are outside the compiler itself."""
@@ -17,30 +26,33 @@ class LlvmOpenmp(CMakePackage):
license("Apache-2.0")
+ version("18.1.0", sha256="ef1cef885d463e4becf5e132a9175a540c6f4487334c0e86274a374ce7d0a092")
+ resource_for_ver(
+ "18.1.0", sha256="d367bf77a3707805168b0a7a7657c8571207fcae29c5890312642ee42b76c967"
+ )
+ version("17.0.6", sha256="74334cbb4dc8b73a768448a7561d5a3540404940b2267b1fb9813a6464b320de")
+ resource_for_ver(
+ "17.0.6", sha256="807f069c54dc20cb47b21c1f6acafdd9c649f3ae015609040d6182cab01140f4"
+ )
version("16.0.0", sha256="e30f69c6533157ec4399193ac6b158807610815accfbed98695d72074e4bedd0")
+ resource_for_ver(
+ "16.0.0", sha256="04e62ab7d0168688d9102680adf8eabe7b04275f333fe20eef8ab5a3a8ea9fcc"
+ )
version("14.0.6", sha256="4f731ff202add030d9d68d4c6daabd91d3aeed9812e6a5b4968815cfdff0eb1f")
version("12.0.1", sha256="60fe79440eaa9ebf583a6ea7f81501310388c02754dbe7dc210776014d06b091")
version("9.0.0", sha256="9979eb1133066376cc0be29d1682bc0b0e7fb541075b391061679111ae4d3b5b")
version("8.0.0", sha256="f7b1705d2f16c4fc23d6531f67d2dd6fb78a077dd346b02fed64f4b8df65c9d5")
- variant(
- "multicompat",
- default=False,
- description="Support gomp and the Intel openMP runtime library.",
- )
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("multicompat", default=True, description="Support the GNU OpenMP runtime interface.")
depends_on("cmake@3.13.4:", when="@12:", type="build")
depends_on("cmake@2.8:", type="build")
depends_on("py-lit", type="test")
depends_on("py-filecheck", type="test")
- # depends_on("llvm-utils", type="test") # for "not"
-
- resource(
- name="cmake",
- url="https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/cmake-16.0.0.src.tar.xz",
- sha256="04e62ab7d0168688d9102680adf8eabe7b04275f333fe20eef8ab5a3a8ea9fcc",
- when="@16.0.0",
- )
@property
def root_cmakelists_dir(self):
@@ -59,14 +71,12 @@ class LlvmOpenmp(CMakePackage):
@when("@16:")
def patch(self):
- src = os.path.join(self.stage.source_path, f"cmake-{self.version}.src")
- dst = os.path.join(self.stage.path, "cmake")
- os.rename(src, dst)
+ cmake_mod_dir = os.path.join(self.stage.source_path, f"cmake-{self.version}.src")
+ if os.path.isdir(cmake_mod_dir):
+ os.rename(cmake_mod_dir, os.path.join(self.stage.path, "cmake"))
def cmake_args(self):
- # Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as
- # libgomp alias which can conflict with GCC's libgomp.
- cmake_args = ["-DLIBOMP_INSTALL_ALIASES=OFF"]
+ cmake_args = []
# Add optional support for both Intel and gcc compilers
if self.spec.satisfies("+multicompat"):
cmake_args.append("-DKMP_GOMP_COMPAT=1")
diff --git a/var/spack/repos/builtin/packages/llvm/detection_test.yaml b/var/spack/repos/builtin/packages/llvm/detection_test.yaml
index 48e9d6751a..860b3061d2 100644
--- a/var/spack/repos/builtin/packages/llvm/detection_test.yaml
+++ b/var/spack/repos/builtin/packages/llvm/detection_test.yaml
@@ -1,56 +1,104 @@
paths:
- - layout:
- - executables:
- - "bin/clang-3.9"
- script: |
- echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
- echo "Target: x86_64-pc-linux-gnu"
- echo "Thread model: posix"
- echo "InstalledDir: /usr/bin"
- - executables:
- - "bin/clang++-3.9"
- script: |
- echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
- echo "Target: x86_64-pc-linux-gnu"
- echo "Thread model: posix"
- echo "InstalledDir: /usr/bin"
- results:
- - spec: 'llvm@3.9.1 +clang~lld~lldb'
- # Multiple LLVM packages in the same prefix
- - layout:
- - executables:
- - "bin/clang-8"
- - "bin/clang++-8"
- script: |
- echo "clang version 8.0.0-3~ubuntu18.04.2 (tags/RELEASE_800/final)"
- echo "Target: x86_64-pc-linux-gnu"
- echo "Thread model: posix"
- echo "InstalledDir: /usr/bin"
- - executables:
- - "bin/ld.lld-8"
- script: 'echo "LLD 8.0.0 (compatible with GNU linkers)"'
- - executables:
- - "bin/lldb"
- script: 'echo "lldb version 8.0.0"'
- - executables:
- - "bin/clang-3.9"
- - "bin/clang++-3.9"
- script: |
- echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
- echo "Target: x86_64-pc-linux-gnu"
- echo "Thread model: posix"
- echo "InstalledDir: /usr/bin"
- results:
- - spec: 'llvm@8.0.0+clang+lld+lldb'
- - spec: 'llvm@3.9.1+clang~lld~lldb'
- # Apple Clang should not be detected
- - layout:
- - executables:
- - "bin/clang"
- - "bin/clang++"
- script: |
- echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
- echo "Target: x86_64-apple-darwin19.5.0"
+- layout:
+ - executables:
+ - "bin/clang-3.9"
+ - "bin/clang++-3.9"
+ script: |
+ echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: 'llvm@3.9.1 +clang~lld~lldb'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-3.9$"
+ cxx: ".*/bin/clang[+][+]-3.9$"
+
+# `~` and other weird characters in the version string
+- layout:
+ - executables:
+ - "bin/clang-6.0"
+ - "bin/clang++-6.0"
+ script: |
+ echo "clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)"
+ echo "Target: x86_64-pc-linux-gnu"
echo "Thread model: posix"
- echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
- results: []
+ echo "InstalledDir: /usr/bin",
+
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: 'llvm@6.0.1 +clang~lld~lldb'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-6.0$"
+ cxx: ".*/bin/clang[+][+]-6.0$"
+- layout:
+ - executables:
+ - "bin/clang-9.0"
+ - "bin/clang++-9.0"
+ script: |
+ echo "clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: 'llvm@9.0.1 +clang~lld~lldb'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-9.0$"
+ cxx: ".*/bin/clang[+][+]-9.0$"
+
+# Multiple LLVM packages in the same prefix
+- layout:
+ - executables:
+ - "bin/clang-8"
+ - "bin/clang++-8"
+ script: |
+ echo "clang version 8.0.0-3~ubuntu18.04.2 (tags/RELEASE_800/final)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ - executables:
+ - "bin/ld.lld-8"
+ script: 'echo "LLD 8.0.0 (compatible with GNU linkers)"'
+ - executables:
+ - "bin/lldb"
+ script: 'echo "lldb version 8.0.0"'
+ - executables:
+ - "bin/clang-3.9"
+ - "bin/clang++-3.9"
+ script: |
+ echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ platforms: ["darwin", "linux"]
+ results:
+ - spec: 'llvm@8.0.0+clang+lld+lldb'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-8$"
+ cxx: ".*/bin/clang[+][+]-8$"
+
+ - spec: 'llvm@3.9.1+clang~lld~lldb'
+ extra_attributes:
+ compilers:
+ c: ".*/bin/clang-3.9$"
+ cxx: ".*/bin/clang[+][+]-3.9$"
+
+# Apple Clang should not be detected
+- layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
+ echo "Target: x86_64-apple-darwin19.5.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ platforms: ["darwin"]
+ results: []
diff --git a/var/spack/repos/builtin/packages/llvm/llvm17-18-thread.patch b/var/spack/repos/builtin/packages/llvm/llvm17-18-thread.patch
new file mode 100644
index 0000000000..7e337433ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/llvm/llvm17-18-thread.patch
@@ -0,0 +1,22 @@
+diff --git a/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake b/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
+index 1f2a50667c4f..d3ff232f6bd3 100644
+--- a/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
++++ b/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
+@@ -280,4 +280,5 @@ if (NOT LIBOMPTARGET_CUDA_TOOLKIT_ROOT_DIR_PRESET AND
+ endif()
+ endif()
+
+-set(OPENMP_PTHREAD_LIB ${LLVM_PTHREAD_LIB})
++find_package(Threads REQUIRED)
++set(OPENMP_PTHREAD_LIB Threads::Threads)
+diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt
+index 071ec61889a2..b782c3b07e6f 100644
+--- a/openmp/libomptarget/src/CMakeLists.txt.orig 2024-03-26 14:30:52.000000000 +0900
++++ b/openmp/libomptarget/src/CMakeLists.txt 2024-03-26 14:34:02.000000000 +0900
+@@ -41,5 +41,6 @@
+
+ if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
+ target_link_libraries(omptarget PRIVATE
++ ${OPENMP_PTHREAD_LIB}
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports")
+ endif()
diff --git a/var/spack/repos/builtin/packages/llvm/llvm17-fujitsu.patch b/var/spack/repos/builtin/packages/llvm/llvm17-fujitsu.patch
new file mode 100644
index 0000000000..f960830c13
--- /dev/null
+++ b/var/spack/repos/builtin/packages/llvm/llvm17-fujitsu.patch
@@ -0,0 +1,28 @@
+diff --git a/lldb/include/lldb/Utility/LLDBAssert.h_org b/lldb/include/lldb/Utility/LLDBAssert.h
+index aeef3e5..2f14ff3 100644
+--- a/lldb/include/lldb/Utility/LLDBAssert.h_org
++++ b/lldb/include/lldb/Utility/LLDBAssert.h
+@@ -14,7 +14,7 @@
+ #ifndef NDEBUG
+ #define lldbassert(x) assert(x)
+ #else
+-#if defined(__clang__)
++#if defined(__clang__) && !defined(__CLANG_FUJITSU)
+ // __FILE_NAME__ is a Clang-specific extension that functions similar to
+ // __FILE__ but only renders the last path component (the filename) instead of
+ // an invocation dependent full path to that file.
+
+diff --git runtimes/CMakeLists.txt_org runtimes/CMakeLists.txt
+--- a/runtimes/CMakeLists.txt_org
++++ b/runtimes/CMakeLists.txt
+@@ -6,2 +6,2 @@
+ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+ NO_POLICY_SCOPE)
+
++string(REPLACE "-Nclang" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++string(REPLACE "-Nnofjprof" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++string(REPLACE "-Nfjprof" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++
+ project(Runtimes C CXX ASM)
+
+ list(INSERT CMAKE_MODULE_PATH 0
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 9ea2e1abd9..d5abd0cb6f 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -8,13 +8,35 @@ import re
import sys
import llnl.util.tty as tty
+from llnl.util.lang import classproperty
-import spack.build_environment
-import spack.util.executable
+import spack.compilers
+from spack.build_systems.cmake import get_cmake_prefix_path
+from spack.operating_systems.mac_os import macos_sdk_path
from spack.package import *
+from spack.package_base import PackageBase
-class Llvm(CMakePackage, CudaPackage):
+class LlvmDetection(PackageBase):
+ """Base class to detect LLVM based compilers"""
+
+ compiler_version_argument = "--version"
+ c_names = ["clang"]
+ cxx_names = ["clang++"]
+
+ @classmethod
+ def filter_detected_exes(cls, prefix, exes_in_prefix):
+ # Executables like lldb-vscode-X are daemon listening on some port and would hang Spack
+ # during detection. clang-cl, clang-cpp, etc. are dev tools that we don't need to test
+ reject = re.compile(
+ r"-(vscode|cpp|cl|ocl|gpu|tidy|rename|scan-deps|format|refactor|offload|"
+ r"check|query|doc|move|extdef|apply|reorder|change-namespace|"
+ r"include-fixer|import-test|dap|server)"
+ )
+ return [x for x in exes_in_prefix if not reject.search(x)]
+
+
+class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage):
"""The LLVM Project is a collection of modular and reusable compiler and
toolchain technologies. Despite its name, LLVM has little to do
with traditional virtual machines, though it does provide helpful
@@ -28,15 +50,29 @@ class Llvm(CMakePackage, CudaPackage):
git = "https://github.com/llvm/llvm-project"
maintainers("trws", "haampie", "skosukhin")
- tags = ["e4s"]
+ tags = ["e4s", "compiler"]
generator("ninja")
- family = "compiler" # Used by lmod
-
license("Apache-2.0")
version("main", branch="main")
+ version("19.1.4", sha256="010e1fd3cabee8799bd2f8a6fbc68f28207494f315cf9da7057a2820f79fd531")
+ version("19.1.3", sha256="e5106e2bef341b3f5e41340e4b6c6a58259f4021ad801acf14e88f1a84567b05")
+ version("19.1.2", sha256="622cb6c5e95a3bb7e9876c4696a65671f235bd836cfd0c096b272f6c2ada41e7")
+ version("19.1.1", sha256="115dfd98a353d05bffdab3f80db22f159da48aca0124e8c416f437adcd54b77f")
+ version("19.1.0", sha256="0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe")
+ version("18.1.8", sha256="09c08693a9afd6236f27a2ebae62cda656eba19021ef3f94d59e931d662d4856")
+ version("18.1.7", sha256="b60df7cbe02cef2523f7357120fb0d46cbb443791cde3a5fb36b82c335c0afc9")
+ version("18.1.6", sha256="01390edfae5b809e982b530ff9088e674c62b13aa92cb9dc1e067fa2cf501083")
+ version("18.1.5", sha256="d543309f55ae3f9b422108302b45c40f5696c96862f4bda8f5526955daa54284")
+ version("18.1.4", sha256="deca5a29e8b1d103ecc4badb3c304aca50d5cac6453364d88ee415dc55699dfb")
+ version("18.1.3", sha256="fc5a2fd176d73ceb17f4e522f8fe96d8dde23300b8c233476d3609f55d995a7a")
+ version("18.1.2", sha256="8d686d5ece6f12b09985cb382a3a530dc06bb6e7eb907f57c7f8bf2d868ebb0b")
+ version("18.1.1", sha256="62439f733311869dbbaf704ce2e02141d2a07092d952fc87ef52d1d636a9b1e4")
+ version("18.1.0", sha256="eb18f65a68981e94ea1a5aae4f02321b17da9e99f76bfdb983b953f4ba2d3550")
+ version("17.0.6", sha256="81494d32e6f12ea6f73d6d25424dbd2364646011bb8f7e345ca870750aa27de1")
+ version("17.0.5", sha256="432c1eda3d1c9379cd52a9bee8e0ea6f7b204bff5075895f963fd8e575aa4fb8")
version("17.0.4", sha256="46200b79f52a02fe26d0a43fd856ab6ceff49ab2a0b7c240ac4b700a6ada700c")
version("17.0.3", sha256="1e3d9d04fb5fbd8d0080042ad72c7e2a5c68788b014b186647a604dbbdd625d2")
version("17.0.2", sha256="dcba3eb486973dce45b6edfe618f3f29b703ae7e6ef9df65182fb50fb6fe4235")
@@ -84,6 +120,9 @@ class Llvm(CMakePackage, CudaPackage):
version("5.0.1", sha256="84ca454abf262579814a2a2b846569f6e0cb3e16dc33ca3642b4f1dff6fbafd3")
version("5.0.0", sha256="1f1843315657a4371d8ca37f01265fa9aae17dbcf46d2d0a95c1fdb3c6a4bab6")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant(
"clang", default=True, description="Build the LLVM C/C++/Objective-C compiler frontend"
)
@@ -132,8 +171,12 @@ class Llvm(CMakePackage, CudaPackage):
"or as a project (with the compiler in use)",
)
+ variant("offload", default=True, when="@19:", description="Build the Offload subproject")
+ conflicts("+offload", when="~clang")
+
variant("libomptarget", default=True, description="Build the OpenMP offloading library")
conflicts("+libomptarget", when="~clang")
+ conflicts("+libomptarget", when="~offload @19:")
for _p in ["darwin", "windows"]:
conflicts("+libomptarget", when="platform={0}".format(_p))
del _p
@@ -240,6 +283,8 @@ class Llvm(CMakePackage, CudaPackage):
conflicts("+z3", when="~clang")
conflicts("+lua", when="@:10")
conflicts("+lua", when="~lldb")
+ # Python distutils were removed with 3.12 and are required to build LLVM <= 14
+ conflicts("^python@3.12:", when="@:14")
variant(
"zstd",
@@ -248,6 +293,8 @@ class Llvm(CMakePackage, CudaPackage):
description="Enable zstd support for static analyzer / lld",
)
+ provides("libllvm@19", when="@19.0.0:19")
+ provides("libllvm@18", when="@18.0.0:18")
provides("libllvm@17", when="@17.0.0:17")
provides("libllvm@16", when="@16.0.0:16")
provides("libllvm@15", when="@15.0.0:15")
@@ -382,6 +429,19 @@ class Llvm(CMakePackage, CudaPackage):
# cuda_arch value must be specified
conflicts("cuda_arch=none", when="+cuda", msg="A value for cuda_arch must be specified.")
+ # clang/test/Misc/target-invalid-cpu-note.c
+ conflicts("cuda_arch=10")
+ conflicts("cuda_arch=11")
+ conflicts("cuda_arch=12")
+ conflicts("cuda_arch=13")
+ conflicts("cuda_arch=75", when="@:13")
+ conflicts("cuda_arch=80", when="@:13")
+ conflicts("cuda_arch=86", when="@:13")
+ conflicts("cuda_arch=87", when="@:15")
+ conflicts("cuda_arch=89", when="@:15")
+ conflicts("cuda_arch=90", when="@:15")
+ conflicts("cuda_arch=90a", when="@:17")
+
# LLVM bug https://bugs.llvm.org/show_bug.cgi?id=48234
# CMake bug: https://gitlab.kitware.com/cmake/cmake/-/issues/21469
# Fixed in upstream versions of both
@@ -534,6 +594,10 @@ class Llvm(CMakePackage, CudaPackage):
# avoid build failed with Fujitsu compiler
patch("llvm13-fujitsu.patch", when="@13 %fj")
+ # avoid build failed with Fujitsu compiler since llvm17
+ patch("llvm17-fujitsu.patch", when="@17: %fj")
+ patch("llvm17-18-thread.patch", when="@17:18 %fj")
+
# patch for missing hwloc.h include for libompd
# see https://reviews.llvm.org/D123888
patch(
@@ -586,50 +650,46 @@ class Llvm(CMakePackage, CudaPackage):
string=True,
)
- # The functions and attributes below implement external package
- # detection for LLVM. See:
- #
- # https://spack.readthedocs.io/en/latest/packaging_guide.html#making-a-package-discoverable-with-spack-external-find
- executables = ["clang", "flang", "ld.lld", "lldb"]
+ compiler_version_regex = (
+ # Normal clang compiler versions are left as-is
+ r"clang version ([^ )\n]+)-svn[~.\w\d-]*|"
+ # Don't include hyphenated patch numbers in the version
+ # (see https://github.com/spack/spack/pull/14365 for details)
+ r"clang version ([^ )\n]+?)-[~.\w\d-]*|"
+ r"clang version ([^ )\n]+)|"
+ # LLDB
+ r"lldb version ([^ )\n]+)|"
+ # LLD
+ r"LLD ([^ )\n]+) \(compatible with GNU linkers\)"
+ )
+ fortran_names = ["flang"]
- @classmethod
- def filter_detected_exes(cls, prefix, exes_in_prefix):
- result = []
- for exe in exes_in_prefix:
- # Executables like lldb-vscode-X are daemon listening
- # on some port and would hang Spack during detection.
- # clang-cl and clang-cpp are dev tools that we don't
- # need to test
- if any(x in exe for x in ("vscode", "cpp", "-cl", "-gpu")):
- continue
- result.append(exe)
- return result
+ @property
+ def supported_languages(self):
+ languages = []
+ if self.spec.satisfies("+clang"):
+ languages.extend(["c", "cxx"])
+ if self.spec.satisfies("+flang"):
+ languages.append("fortran")
+ return languages
+
+ @classproperty
+ def executables(cls):
+ return super().executables + [r"^ld\.lld(-\d+)?$", r"^lldb(-\d+)?$"]
@classmethod
def determine_version(cls, exe):
- version_regex = re.compile(
- # Normal clang compiler versions are left as-is
- r"clang version ([^ )\n]+)-svn[~.\w\d-]*|"
- # Don't include hyphenated patch numbers in the version
- # (see https://github.com/spack/spack/pull/14365 for details)
- r"clang version ([^ )\n]+?)-[~.\w\d-]*|"
- r"clang version ([^ )\n]+)|"
- # LLDB
- r"lldb version ([^ )\n]+)|"
- # LLD
- r"LLD ([^ )\n]+) \(compatible with GNU linkers\)"
- )
try:
compiler = Executable(exe)
- output = compiler("--version", output=str, error=str)
+ output = compiler(cls.compiler_version_argument, output=str, error=str)
if "Apple" in output:
return None
if "AMD" in output:
return None
- match = version_regex.search(output)
+ match = re.search(cls.compiler_version_regex, output)
if match:
return match.group(match.lastindex)
- except spack.util.executable.ProcessError:
+ except ProcessError:
pass
except Exception as e:
tty.debug(e)
@@ -638,23 +698,23 @@ class Llvm(CMakePackage, CudaPackage):
@classmethod
def determine_variants(cls, exes, version_str):
+ # Do not need to reuse more general logic from CompilerPackage
+ # because LLVM has kindly named compilers
variants, compilers = ["+clang"], {}
lld_found, lldb_found = False, False
- for exe in exes:
- if "clang++" in exe:
- compilers["cxx"] = exe
- elif "clang" in exe:
- compilers["c"] = exe
- elif "flang" in exe:
+ for exe in sorted(exes, key=len):
+ name = os.path.basename(exe)
+ if "clang++" in name:
+ compilers.setdefault("cxx", exe)
+ elif "clang" in name:
+ compilers.setdefault("c", exe)
+ elif "flang" in name:
variants.append("+flang")
- compilers["fc"] = exe
- compilers["f77"] = exe
- elif "ld.lld" in exe:
+ compilers.setdefault("fortran", exe)
+ elif "ld.lld" in name:
lld_found = True
- compilers["ld"] = exe
- elif "lldb" in exe:
+ elif "lldb" in name:
lldb_found = True
- compilers["lldb"] = exe
variants.append("+lld" if lld_found else "~lld")
variants.append("+lldb" if lldb_found else "~lldb")
@@ -680,7 +740,7 @@ class Llvm(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("c", None)
result = None
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
result = os.path.join(self.spec.prefix.bin, "clang")
return result
@@ -691,7 +751,7 @@ class Llvm(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("cxx", None)
result = None
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
result = os.path.join(self.spec.prefix.bin, "clang++")
return result
@@ -702,7 +762,7 @@ class Llvm(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("fc", None)
result = None
- if "+flang" in self.spec:
+ if self.spec.satisfies("+flang"):
result = os.path.join(self.spec.prefix.bin, "flang")
return result
@@ -713,7 +773,7 @@ class Llvm(CMakePackage, CudaPackage):
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("f77", None)
result = None
- if "+flang" in self.spec:
+ if self.spec.satisfies("+flang"):
result = os.path.join(self.spec.prefix.bin, "flang")
return result
@@ -747,10 +807,7 @@ class Llvm(CMakePackage, CudaPackage):
)
def flag_handler(self, name, flags):
- if name == "cxxflags":
- flags.append(self.compiler.cxx11_flag)
- return (None, flags, None)
- elif name == "ldflags" and self.spec.satisfies("%intel"):
+ if name == "ldflags" and self.spec.satisfies("%intel"):
flags.append("-shared-intel")
return (None, flags, None)
return (flags, None, None)
@@ -766,6 +823,18 @@ class Llvm(CMakePackage, CudaPackage):
os.symlink(bin, sym)
env.prepend_path("PATH", self.stage.path)
+ if self.spec.satisfies("platform=darwin"):
+ # set the SDKROOT so the bootstrap compiler finds its C++ headers
+ env.set("SDKROOT", macos_sdk_path())
+
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+clang"):
+ env.set("CC", join_path(self.spec.prefix.bin, "clang"))
+ env.set("CXX", join_path(self.spec.prefix.bin, "clang++"))
+ if self.spec.satisfies("+flang"):
+ env.set("FC", join_path(self.spec.prefix.bin, "flang"))
+ env.set("F77", join_path(self.spec.prefix.bin, "flang"))
+
root_cmakelists_dir = "llvm"
def cmake_args(self):
@@ -773,13 +842,11 @@ class Llvm(CMakePackage, CudaPackage):
define = self.define
from_variant = self.define_from_variant
- python = spec["python"]
cmake_args = [
define("LLVM_REQUIRES_RTTI", True),
define("LLVM_ENABLE_RTTI", True),
define("LLVM_ENABLE_LIBXML2", False),
define("CLANG_DEFAULT_OPENMP_RUNTIME", "libomp"),
- define("PYTHON_EXECUTABLE", python.command.path),
define("LIBOMP_USE_HWLOC", True),
define("LIBOMP_HWLOC_INSTALL_DIR", spec["hwloc"].prefix),
from_variant("LLVM_ENABLE_ZSTD", "zstd"),
@@ -803,15 +870,10 @@ class Llvm(CMakePackage, CudaPackage):
if shlib_symbol_version is not None and shlib_symbol_version.value != "none":
cmake_args.append(define("LLVM_SHLIB_SYMBOL_VERSION", shlib_symbol_version.value))
- if python.version >= Version("3"):
- cmake_args.append(define("Python3_EXECUTABLE", python.command.path))
- else:
- cmake_args.append(define("Python2_EXECUTABLE", python.command.path))
-
projects = []
runtimes = []
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cmake_args.extend(
[
define("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix),
@@ -825,7 +887,7 @@ class Llvm(CMakePackage, CudaPackage):
),
]
)
- if "openmp=runtime" in spec:
+ if spec.satisfies("openmp=runtime"):
cmake_args.append(define("LIBOMPTARGET_NVPTX_ENABLE_BCLIB", True))
else:
# still build libomptarget but disable cuda
@@ -840,7 +902,15 @@ class Llvm(CMakePackage, CudaPackage):
cmake_args.append(from_variant("LIBOMPTARGET_ENABLE_DEBUG", "libomptarget_debug"))
- if "+lldb" in spec:
+ if spec.satisfies("@14:"):
+ # The hsa-rocr-dev package may be pulled in through hwloc, which can lead to cmake
+ # finding libhsa and enabling the AMDGPU plugin. Since we don't support this yet,
+ # disable explicitly. See commit a05a0c3c2f8eefc80d84b7a87a23a4452d4a3087.
+ cmake_args.append(define("LIBOMPTARGET_BUILD_AMDGPU_PLUGIN", False))
+ if "python" in spec: # lit's Python needs to be set with this variable
+ cmake_args.append(define("python_executable", spec["python"].command.path))
+
+ if spec.satisfies("+lldb"):
projects.append("lldb")
cmake_args.extend(
[
@@ -851,59 +921,65 @@ class Llvm(CMakePackage, CudaPackage):
define("LLDB_ENABLE_LZMA", True),
]
)
- if spec["ncurses"].satisfies("+termlib"):
- cmake_args.append(define("LLVM_ENABLE_TERMINFO", True))
+ if spec.satisfies("@19:"):
+ cmake_args.append(define("LLDB_CURSES_LIBS", spec["ncurses"].libs))
else:
- cmake_args.append(define("LLVM_ENABLE_TERMINFO", False))
+ if spec["ncurses"].satisfies("+termlib"):
+ cmake_args.append(define("LLVM_ENABLE_TERMINFO", True))
+ else:
+ cmake_args.append(define("LLVM_ENABLE_TERMINFO", False))
if spec.version >= Version("10"):
cmake_args.append(from_variant("LLDB_ENABLE_PYTHON", "python"))
else:
- cmake_args.append(define("LLDB_DISABLE_PYTHON", "~python" in spec))
+ cmake_args.append(define("LLDB_DISABLE_PYTHON", spec.satisfies("~python")))
if spec.satisfies("@5.0.0: +python"):
cmake_args.append(define("LLDB_USE_SYSTEM_SIX", True))
- else:
+ elif spec.satisfies("@:19"):
cmake_args.append(define("LLVM_ENABLE_TERMINFO", False))
- if "+gold" in spec:
+ if spec.satisfies("+gold"):
cmake_args.append(define("LLVM_BINUTILS_INCDIR", spec["binutils"].prefix.include))
- if "+clang" in spec:
+ if spec.satisfies("+clang"):
projects.append("clang")
projects.append("clang-tools-extra")
- if "openmp=runtime" in spec:
+ if spec.satisfies("openmp=runtime"):
runtimes.append("openmp")
- elif "openmp=project" in spec:
+ elif spec.satisfies("openmp=project"):
projects.append("openmp")
- if "+libomptarget" in spec:
+ if spec.satisfies("+offload"):
+ runtimes.append("offload")
+
+ if spec.satisfies("+libomptarget"):
cmake_args.append(define("OPENMP_ENABLE_LIBOMPTARGET", True))
else:
cmake_args.append(define("OPENMP_ENABLE_LIBOMPTARGET", False))
- if "@8" in spec:
+ if spec.satisfies("@8"):
cmake_args.append(from_variant("CLANG_ANALYZER_ENABLE_Z3_SOLVER", "z3"))
- elif "@9:" in spec:
+ elif spec.satisfies("@9:"):
cmake_args.append(from_variant("LLVM_ENABLE_Z3_SOLVER", "z3"))
- if "+flang" in spec:
+ if spec.satisfies("+flang"):
projects.append("flang")
- if "+lld" in spec:
+ if spec.satisfies("+lld"):
projects.append("lld")
- if "compiler-rt=runtime" in spec:
+ if spec.satisfies("compiler-rt=runtime"):
runtimes.append("compiler-rt")
- elif "compiler-rt=project" in spec:
+ elif spec.satisfies("compiler-rt=project"):
projects.append("compiler-rt")
- if "libcxx=runtime" in spec:
+ if spec.satisfies("libcxx=runtime"):
runtimes.extend(["libcxx", "libcxxabi"])
- elif "libcxx=project" in spec:
+ elif spec.satisfies("libcxx=project"):
projects.extend(["libcxx", "libcxxabi"])
- if "+mlir" in spec:
+ if spec.satisfies("+mlir"):
projects.append("mlir")
- if "libunwind=runtime" in spec:
+ if spec.satisfies("libunwind=runtime"):
runtimes.append("libunwind")
- elif "libunwind=project" in spec:
+ elif spec.satisfies("libunwind=project"):
projects.append("libunwind")
- if "+polly" in spec:
+ if spec.satisfies("+polly"):
projects.append("polly")
cmake_args.append(define("LINK_POLLY_INTO_TOOLS", True))
@@ -917,6 +993,14 @@ class Llvm(CMakePackage, CudaPackage):
# CMAKE_INSTALL_RPATH to it, which fails. Statically link libc++abi.a
# into libc++.so, linking with -lc++ or -stdlib=libc++ is enough.
define("LIBCXX_ENABLE_STATIC_ABI_LIBRARY", True),
+ # Make sure that CMake does not pick host-installed tools for the build
+ # Until #45535 is merged, prevent CMake from delivering incompatible
+ # system tools like python3.12 to older LLVM versions like LLVM-14:
+ define("CMAKE_FIND_PACKAGE_PREFER_CONFIG", True),
+ define("CMAKE_FIND_USE_PACKAGE_ROOT_PATH", False),
+ define("CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY", False),
+ define("CMAKE_FIND_USE_PACKAGE_REGISTRY", False),
+ define("CMAKE_FIND_USE_SYSTEM_PATH", False),
]
)
@@ -924,20 +1008,35 @@ class Llvm(CMakePackage, CudaPackage):
cmake_args.append(from_variant("LIBOMP_TSAN_SUPPORT", "libomp_tsan"))
- if self.compiler.name == "gcc":
+ # From clang 16 onwards we use a more precise --gcc-install-dir flag in post-install
+ # generated config files.
+ if self.spec.satisfies("@:15 %gcc"):
cmake_args.append(define("GCC_INSTALL_PREFIX", self.compiler.prefix))
if self.spec.satisfies("~code_signing platform=darwin"):
cmake_args.append(define("LLDB_USE_SYSTEM_DEBUGSERVER", True))
# LLDB test suite requires libc++
- if "libcxx=none" in spec:
+ if spec.satisfies("libcxx=none"):
cmake_args.append(define("LLDB_INCLUDE_TESTS", False))
# Enable building with CLT [and not require full Xcode]
# https://github.com/llvm/llvm-project/issues/57037
if self.spec.satisfies("@15.0.0: platform=darwin"):
- cmake_args.append(define("BUILTINS_CMAKE_ARGS", "-DCOMPILER_RT_ENABLE_IOS=OFF"))
+ cmake_args.append(
+ define(
+ "BUILTINS_CMAKE_ARGS",
+ ";".join(
+ [f"-DCOMPILER_RT_ENABLE_{os}=OFF" for os in ("IOS", "WATCHOS", "TVOS")]
+ ),
+ )
+ )
+
+ if self.spec.satisfies("platform=darwin"):
+ cmake_args.append(define("LLVM_ENABLE_LIBCXX", True))
+ cmake_args.append(define("DEFAULT_SYSROOT", macos_sdk_path()))
+ # without this libc++ headers are not fond during compiler-rt build
+ cmake_args.append(define("LLVM_BUILD_EXTERNAL_COMPILER_RT", True))
# Semicolon seperated list of projects to enable
cmake_args.append(define("LLVM_ENABLE_PROJECTS", projects))
@@ -960,16 +1059,28 @@ class Llvm(CMakePackage, CudaPackage):
"openmp",
]
runtimes.sort(
- key=lambda x: runtimes_order.index(x)
- if x in runtimes_order
- else len(runtimes_order)
+ key=lambda x: (
+ runtimes_order.index(x) if x in runtimes_order else len(runtimes_order)
+ )
+ )
+
+ # CMake args passed just to runtimes
+ runtime_cmake_args = [define("CMAKE_INSTALL_RPATH_USE_LINK_PATH", True)]
+
+ # When building runtimes, just-built clang has to know where GCC is.
+ gcc_install_dir_flag = get_gcc_install_dir_flag(spec, self.compiler)
+ if gcc_install_dir_flag:
+ runtime_cmake_args.extend(
+ [
+ define("CMAKE_C_FLAGS", gcc_install_dir_flag),
+ define("CMAKE_CXX_FLAGS", gcc_install_dir_flag),
+ ]
)
+
cmake_args.extend(
[
define("LLVM_ENABLE_RUNTIMES", runtimes),
- define(
- "RUNTIMES_CMAKE_ARGS", [define("CMAKE_INSTALL_RPATH_USE_LINK_PATH", True)]
- ),
+ define("RUNTIMES_CMAKE_ARGS", runtime_cmake_args),
]
)
@@ -981,9 +1092,9 @@ class Llvm(CMakePackage, CudaPackage):
define = self.define
# unnecessary if we build openmp via LLVM_ENABLE_RUNTIMES
- if "+cuda openmp=project" in self.spec:
+ if self.spec.satisfies("+cuda openmp=project"):
ompdir = "build-bootstrapped-omp"
- prefix_paths = spack.build_environment.get_cmake_prefix_path(self)
+ prefix_paths = get_cmake_prefix_path(self)
prefix_paths.append(str(spec.prefix))
# rebuild libomptarget to get bytecode runtime library files
with working_dir(ompdir, create=True):
@@ -1007,18 +1118,31 @@ class Llvm(CMakePackage, CudaPackage):
cmake(*cmake_args)
ninja()
ninja("install")
- if "+python" in self.spec:
+ if self.spec.satisfies("+python"):
if spec.version < Version("17.0.0"):
# llvm bindings were removed in v17:
# https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html#changes-to-the-python-bindings
install_tree("llvm/bindings/python", python_platlib)
- if "+clang" in self.spec:
+ if self.spec.satisfies("+clang"):
install_tree("clang/bindings/python", python_platlib)
with working_dir(self.build_directory):
install_tree("bin", join_path(self.prefix, "libexec", "llvm"))
+ cfg_files = []
+ if spec.satisfies("+clang"):
+ cfg_files.extend(("clang.cfg", "clang++.cfg"))
+ if spec.satisfies("@19: +flang"):
+ # The config file is `flang.cfg` even though the executable is `flang-new`.
+ # `--gcc-install-dir` / `--gcc-toolchain` support was only added in LLVM 19.
+ cfg_files.append("flang.cfg")
+ gcc_install_dir_flag = get_gcc_install_dir_flag(spec, self.compiler)
+ if gcc_install_dir_flag:
+ for cfg in cfg_files:
+ with open(os.path.join(self.prefix.bin, cfg), "w") as f:
+ print(gcc_install_dir_flag, file=f)
+
def llvm_config(self, *args, **kwargs):
lc = Executable(self.prefix.bin.join("llvm-config"))
if not kwargs.get("output"):
@@ -1030,6 +1154,18 @@ class Llvm(CMakePackage, CudaPackage):
return ret
+def get_gcc_install_dir_flag(spec: Spec, compiler) -> Optional[str]:
+ """Get the --gcc-install-dir=... flag, so that clang does not do a system scan for GCC."""
+ if not spec.satisfies("@16: %gcc"):
+ return None
+ gcc = Executable(compiler.cc)
+ libgcc_path = gcc("-print-file-name=libgcc.a", output=str, fail_on_error=False).strip()
+ if not os.path.isabs(libgcc_path):
+ return None
+ libgcc_dir = os.path.dirname(libgcc_path)
+ return f"--gcc-install-dir={libgcc_dir}" if os.path.exists(libgcc_dir) else None
+
+
def get_llvm_targets_to_build(spec):
targets = spec.variants["targets"].value
diff --git a/var/spack/repos/builtin/packages/lm-sensors/package.py b/var/spack/repos/builtin/packages/lm-sensors/package.py
index bdef319cbf..a9ae344fff 100644
--- a/var/spack/repos/builtin/packages/lm-sensors/package.py
+++ b/var/spack/repos/builtin/packages/lm-sensors/package.py
@@ -29,6 +29,8 @@ class LmSensors(MakefilePackage):
version("3-1-2", sha256="a587f4f37c0f32ac48575338013ee443a0152d87543e8e702db6161ec0ca1161")
version("3-1-1", sha256="22b5ab0bab853c34298ff617efb292c5dde7b254596b31ce4c6e90b1d1cf8ad8")
+ depends_on("c", type="build") # generated
+
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("perl", type="run")
diff --git a/var/spack/repos/builtin/packages/lmbench/package.py b/var/spack/repos/builtin/packages/lmbench/package.py
index a94a2793ab..cf5407194c 100644
--- a/var/spack/repos/builtin/packages/lmbench/package.py
+++ b/var/spack/repos/builtin/packages/lmbench/package.py
@@ -12,13 +12,15 @@ class Lmbench(MakefilePackage):
bandwidth. lmbench is intended to give system developers insight into
basic costs of key operations."""
- homepage = "http://lmbench.sourceforge.net/"
+ homepage = "https://lmbench.sourceforge.net/"
git = "https://github.com/intel/lmbench.git"
license("GPL-2.0-only")
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("libtirpc")
patch(
diff --git a/var/spack/repos/builtin/packages/lmdb/package.py b/var/spack/repos/builtin/packages/lmdb/package.py
index 6e8c9667a9..a74a8d6918 100644
--- a/var/spack/repos/builtin/packages/lmdb/package.py
+++ b/var/spack/repos/builtin/packages/lmdb/package.py
@@ -24,6 +24,8 @@ class Lmdb(MakefilePackage):
version("0.9.21", sha256="1187b635a4cc415bb6972bba346121f81edd996e99b8f0816151d4090f90b559")
version("0.9.16", sha256="49d7b40949f2ced9bc8b23ea6a89e75471a1c9126537a8b268c318a00b84322b")
+ depends_on("c", type="build") # generated
+
build_directory = "libraries/liblmdb"
@property
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index b1b0fd4e15..e7e9cf85cb 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -23,6 +23,7 @@ class Lmod(AutotoolsPackage):
license("MIT")
+ version("8.7.37", sha256="171529152fedfbb3c45d27937b0eaa1ee62b5e5cdac3086f44a6d56e5d1d7da4")
version("8.7.24", sha256="8451267652059b6507b652e1b563929ecf9b689ffb20830642085eb6a55bd539")
version("8.7.20", sha256="c04deff7d2ca354610a362459a7aa9a1c642a095e45a4b0bb2471bb3254e85f4")
version("8.7.18", sha256="b9912caca1557dd0c17113bceb1a4952e0ae75331d38df6361601db3f80366af")
@@ -54,6 +55,8 @@ class Lmod(AutotoolsPackage):
version("6.4.1", sha256="a260b4e42269a80b517c066ba8484658362ea095e80767a2376bbe33d9b070a5")
version("6.3.7", sha256="55ddb52cbdc0e2e389b3405229336df9aabfa582c874f5df2559ea264e2ee4ae")
+ depends_on("c", type="build") # generated
+
depends_on("lua+shared@5.1:")
depends_on("lua-luaposix", type=("build", "run"))
depends_on("lua-luafilesystem", type=("build", "run"))
@@ -85,14 +88,15 @@ class Lmod(AutotoolsPackage):
filter_file(r"^#!.*tclsh", "#!@path_to_tclsh@", tclscript)
def configure_args(self):
+ spec = self.spec
args = []
- if "+auto_swap" in self.spec:
+ if spec.satisfies("+auto_swap"):
args.append("--with-autoSwap=yes")
else:
args.append("--with-autoSwap=no")
- if "+redirect" in self.spec:
+ if spec.satisfies("+redirect"):
args.append("--with-redirect=yes")
else:
args.append("--with-redirect=no")
diff --git a/var/spack/repos/builtin/packages/lndir/package.py b/var/spack/repos/builtin/packages/lndir/package.py
index 3c34408946..91cf5aaabd 100644
--- a/var/spack/repos/builtin/packages/lndir/package.py
+++ b/var/spack/repos/builtin/packages/lndir/package.py
@@ -10,11 +10,14 @@ class Lndir(AutotoolsPackage, XorgPackage):
"""lndir - create a shadow directory of symbolic links to another
directory tree."""
- homepage = "https://cgit.freedesktop.org/xorg/util/lndir"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/lndir"
xorg_mirror_path = "util/lndir-1.0.3.tar.gz"
+ version("1.0.5", sha256="2be863f59e6833955b11295c43d79ab32464a8706d29072171cd8da95922a7a2")
version("1.0.4", sha256="b448b49a55d0750acfc3fd992c2511b21838ec2cea870d109bb9fdca2ac028da")
version("1.0.3", sha256="95b2d26fb3cbe702f828146c7a4c7c48001d2da52b062580227b7b68180be902")
- depends_on("xproto@7.0.17:")
+ depends_on("c", type="build")
+
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/lodepng/package.py b/var/spack/repos/builtin/packages/lodepng/package.py
index 0fe2cc6375..d460f85c24 100644
--- a/var/spack/repos/builtin/packages/lodepng/package.py
+++ b/var/spack/repos/builtin/packages/lodepng/package.py
@@ -16,6 +16,9 @@ class Lodepng(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sdl2")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/log4c/package.py b/var/spack/repos/builtin/packages/log4c/package.py
index 95fbd8fe3a..01a21b00c2 100644
--- a/var/spack/repos/builtin/packages/log4c/package.py
+++ b/var/spack/repos/builtin/packages/log4c/package.py
@@ -9,11 +9,14 @@ from spack.package import *
class Log4c(AutotoolsPackage):
"""Library for writing log messages from C programs"""
- homepage = "http://log4c.sourceforge.net/"
+ homepage = "https://log4c.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/log4c/log4c/1.2.4/log4c-1.2.4.tar.gz"
license("LGPL-2.1-or-later")
version("1.2.4", sha256="5991020192f52cc40fa852fbf6bbf5bd5db5d5d00aa9905c67f6f0eadeed48ea")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("expat@1.95.1:")
diff --git a/var/spack/repos/builtin/packages/log4cplus/package.py b/var/spack/repos/builtin/packages/log4cplus/package.py
index 6c3e637781..ad0b4e8720 100644
--- a/var/spack/repos/builtin/packages/log4cplus/package.py
+++ b/var/spack/repos/builtin/packages/log4cplus/package.py
@@ -19,3 +19,5 @@ class Log4cplus(CMakePackage):
version("2.0.7", sha256="8fadbafee2ba4e558a0f78842613c9fb239c775d83f23340d091084c0e1b12ab")
version("2.0.1", sha256="43baa7dec3db1ecc97dd9ecf3b50220439d2c7041d15860c36aa1d48dcf480b5")
version("1.2.1", sha256="ada80be050033d7636beb894eb54de5575ceca95a5572e9437b0fc4ed7d877c4")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/log4cpp/package.py b/var/spack/repos/builtin/packages/log4cpp/package.py
index 165ed73b7f..1e08a86e2b 100644
--- a/var/spack/repos/builtin/packages/log4cpp/package.py
+++ b/var/spack/repos/builtin/packages/log4cpp/package.py
@@ -13,9 +13,12 @@ class Log4cpp(AutotoolsPackage):
the Log4j Java library, staying as close to their API as is
reasonable."""
- homepage = "http://log4cpp.sourceforge.net/"
+ homepage = "https://log4cpp.sourceforge.net/"
url = "http://sourceforge.net/projects/log4cpp/files/log4cpp-1.1.3.tar.gz"
license("LGPL-2.1-or-later")
version("1.1.3", sha256="2cbbea55a5d6895c9f0116a9a9ce3afb86df383cd05c9d6c1a4238e5e5c8f51d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/log4cxx/package.py b/var/spack/repos/builtin/packages/log4cxx/package.py
index b855412531..077f30c5ea 100644
--- a/var/spack/repos/builtin/packages/log4cxx/package.py
+++ b/var/spack/repos/builtin/packages/log4cxx/package.py
@@ -14,18 +14,41 @@ class Log4cxx(CMakePackage):
maintainers("nicmcd")
- license("Apache-2.0")
-
- version("0.12.1", sha256="7bea5cb477f0e31c838f0e1f4f498cc3b30c2eae74703ddda923e7e8c2268d22")
- version("0.12.0", sha256="bd5b5009ca914c8fa7944b92ea6b4ca6fb7d146f65d526f21bf8b3c6a0520e44")
-
- variant("cxxstd", default="17", description="C++ standard", values=("11", "17"), multi=False)
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.2.0", sha256="09f4748aa5675ef5c0770bedbf5e00488668933c5a935a43ac5b85be2436c48a")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-31038
+ version(
+ "0.12.1", sha256="7bea5cb477f0e31c838f0e1f4f498cc3b30c2eae74703ddda923e7e8c2268d22"
+ )
+ version(
+ "0.12.0", sha256="bd5b5009ca914c8fa7944b92ea6b4ca6fb7d146f65d526f21bf8b3c6a0520e44"
+ )
+
+ variant(
+ "cxxstd",
+ default="17",
+ description="C++ standard",
+ values=("11", "17"),
+ multi=False,
+ when="@:1.1",
+ )
+ variant(
+ "cxxstd",
+ default="20",
+ description="C++ standard",
+ values=("11", "17", "20"),
+ multi=False,
+ when="@1.2:",
+ )
depends_on("cmake@3.13:", type="build")
depends_on("apr-util")
depends_on("apr")
depends_on("boost+thread+system", when="cxxstd=11")
+ depends_on("expat")
depends_on("zlib-api")
depends_on("zip")
diff --git a/var/spack/repos/builtin/packages/logrotate/package.py b/var/spack/repos/builtin/packages/logrotate/package.py
index 4983a7fb8b..be759478bf 100644
--- a/var/spack/repos/builtin/packages/logrotate/package.py
+++ b/var/spack/repos/builtin/packages/logrotate/package.py
@@ -20,6 +20,8 @@ class Logrotate(AutotoolsPackage):
version("3.16.0", sha256="bc6acfd09925045d48b5ff553c24c567cfd5f59d513c4ac34bfb51fa6b79dc8a")
version("3.15.1", sha256="a7b20f5184c9598c36546f9200d3bd616d561478a0423ab8074e97a1cd7b1c25")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/logstash/package.py b/var/spack/repos/builtin/packages/logstash/package.py
index c7b922b06a..4ad690c764 100644
--- a/var/spack/repos/builtin/packages/logstash/package.py
+++ b/var/spack/repos/builtin/packages/logstash/package.py
@@ -15,9 +15,24 @@ class Logstash(Package):
"""
homepage = "https://artifacts.elastic.co"
- url = "https://artifacts.elastic.co/downloads/logstash/logstash-6.6.0.tar.gz"
+ url = "https://artifacts.elastic.co/downloads/logstash/logstash-8.15.2-linux-x86_64.tar.gz"
- version("6.6.0", sha256="5a9a8b9942631e9d4c3dfb8d47075276e8c2cff343841145550cc0c1cfe7bba7")
+ version("8.15.2", sha256="fc75c8cad1016b07f7aeeeeb7ea23f4195ab1beee2ced282f11ff6d0e84f7e51")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2019-7612
+ version("6.6.0", sha256="5a9a8b9942631e9d4c3dfb8d47075276e8c2cff343841145550cc0c1cfe7bba7")
+
+ depends_on("java@11:")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@:6"):
+ return f"https://artifacts.elastic.co/downloads/logstash/logstash-{version}.tar.gz"
+ else:
+ return f"https://artifacts.elastic.co/downloads/logstash/logstash-{version}-linux-x86_64.tar.gz"
def install(self, spec, prefix):
install_tree(".", prefix)
+
+ def setup_run_environment(self, env):
+ # do not use the bundled jdk
+ env.set("LS_JAVA_HOME", self.spec["java"].home)
diff --git a/var/spack/repos/builtin/packages/loki/package.py b/var/spack/repos/builtin/packages/loki/package.py
index 46e6706402..360d2ad587 100644
--- a/var/spack/repos/builtin/packages/loki/package.py
+++ b/var/spack/repos/builtin/packages/loki/package.py
@@ -10,7 +10,7 @@ class Loki(MakefilePackage):
"""Loki is a C++ library of designs, containing flexible implementations
of common design patterns and idioms."""
- homepage = "http://loki-lib.sourceforge.net"
+ homepage = "https://loki-lib.sourceforge.net"
url = "https://downloads.sourceforge.net/project/loki-lib/Loki/Loki%200.1.7/loki-0.1.7.tar.bz2"
tags = ["e4s"]
@@ -18,10 +18,14 @@ class Loki(MakefilePackage):
version("0.1.7", sha256="07553754f6be2738559947db69b0718512665bf4a34015fa3a875b6eb1111198")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
def flag_handler(self, name, flags):
if name == "cxxflags":
+ if self.spec.satisfies("%oneapi@2025:"):
+ flags.append("-Wno-error=missing-template-arg-list-after-template-kw")
if self.spec.satisfies("%oneapi@2023.0.0:"):
flags.append("-Wno-error=dynamic-exception-spec")
if self.spec.satisfies("@0.1.7 %gcc@11:"):
@@ -29,14 +33,14 @@ class Loki(MakefilePackage):
return (flags, None, None)
def build(self, spec, prefix):
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
make("-C", "src", "build-shared")
else:
make("-C", "src", "build-static")
def install(self, spec, prefix):
make("-C", "include", "install", "prefix={0}".format(prefix))
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
make("-C", "src", "install-shared", "prefix={0}".format(prefix))
else:
make("-C", "src", "install-static", "prefix={0}".format(prefix))
diff --git a/var/spack/repos/builtin/packages/looptools/package.py b/var/spack/repos/builtin/packages/looptools/package.py
index 52d56aca59..d84264b758 100644
--- a/var/spack/repos/builtin/packages/looptools/package.py
+++ b/var/spack/repos/builtin/packages/looptools/package.py
@@ -22,6 +22,9 @@ class Looptools(AutotoolsPackage):
version("2.15", sha256="a065ffdc4fe6882aa3bb926134ba8ec875d6c0a633c3d4aa5f70db26542713f2")
version("2.8", sha256="2395518d0eac9b0883a2c249b9a5ba80df443929c520c45e60f5a4284166eb42")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("conf.patch", when="%fj")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/lordec/package.py b/var/spack/repos/builtin/packages/lordec/package.py
index 24e6f2d9a2..7e3d1b32bd 100644
--- a/var/spack/repos/builtin/packages/lordec/package.py
+++ b/var/spack/repos/builtin/packages/lordec/package.py
@@ -20,6 +20,8 @@ class Lordec(MakefilePackage):
version("0.9", sha256="8108b82a8404fbf44c7e300d3abb43358ccc28993f90546168a20ca82536923b")
version("0.8", sha256="3894a7c57649a3545b598f92a48d55eda66d729ab51606b00470c50611b12823")
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version == Version("0.8"):
return "https://gite.lirmm.fr/lordec/lordec-releases/uploads/e3116a5f251e46e47f7a3b7ddb2bd7f6/lordec-src_0.8.tar.gz"
diff --git a/var/spack/repos/builtin/packages/lorene/package.py b/var/spack/repos/builtin/packages/lorene/package.py
index 76ad46d1e1..abf63bd21f 100644
--- a/var/spack/repos/builtin/packages/lorene/package.py
+++ b/var/spack/repos/builtin/packages/lorene/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os
from spack.package import *
@@ -42,8 +41,8 @@ class Lorene(MakefilePackage):
def edit(self, spec, prefix):
blas_libs = spec["blas"].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_incdirs = "-I" + spec["fftw"].prefix.include if spec.satisfies("+fftw") else ""
+ fftw_libdirs = "-L" + spec["fftw"].prefix.lib if spec.satisfies("+fftw") else ""
fftw_libs = spec["fftw"].libs.link_flags
gsl_incdirs = "-I" + spec["gsl"].prefix.include
gsl_libdirs = "-L" + spec["gsl"].prefix.lib
@@ -80,9 +79,7 @@ class Lorene(MakefilePackage):
("@LIB_LAPACK@", lapack_libs + " " + blas_libs),
("@LIB_PGPLOT@", pgplot_libdirs + " " + pgplot_libs),
]
- local_settings_template = join_path(
- os.path.dirname(inspect.getmodule(self).__file__), "local_settings.template"
- )
+ local_settings_template = join_path(os.path.dirname(__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:
@@ -94,7 +91,7 @@ class Lorene(MakefilePackage):
# (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:
+ if spec.satisfies("+bin_star"):
with working_dir(join_path("Codes", "Bin_star")):
make(
"-f",
@@ -114,7 +111,7 @@ class Lorene(MakefilePackage):
install_tree("Export/C++/Include", prefix.include)
install_tree("C++/Include", prefix.include)
mkdirp(prefix.bin)
- if "+bin_star" in spec:
+ if spec.satisfies("+bin_star"):
for exe in [
"coal",
"lit_bin",
@@ -128,5 +125,5 @@ class Lorene(MakefilePackage):
@property
def libs(self):
- shared = "+shared" in self.spec
+ shared = self.spec.satisfies("+shared")
return find_libraries("liblorene*", root=self.prefix, shared=shared, recursive=True)
diff --git a/var/spack/repos/builtin/packages/lp-solve/package.py b/var/spack/repos/builtin/packages/lp-solve/package.py
index 4f4b36117d..252cb25dd6 100644
--- a/var/spack/repos/builtin/packages/lp-solve/package.py
+++ b/var/spack/repos/builtin/packages/lp-solve/package.py
@@ -14,6 +14,8 @@ class LpSolve(Package):
version("5.5.2.11", sha256="6d4abff5cc6aaa933ae8e6c17a226df0fc0b671c438f69715d41d09fe81f902f")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
with working_dir("lpsolve55"):
mkdir(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/lrslib/package.py b/var/spack/repos/builtin/packages/lrslib/package.py
index b07e73e424..772b942b7a 100644
--- a/var/spack/repos/builtin/packages/lrslib/package.py
+++ b/var/spack/repos/builtin/packages/lrslib/package.py
@@ -23,6 +23,9 @@ class Lrslib(Package):
version("5.1", sha256="500893df61631944bac14a76c6e13fc08e6e729727443fa5480b2510de0db635")
version("4.3", sha256="04fc1916ea122b3f2446968d2739717aa2c6c94b21fba1f2c627fd17fcf7a963")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Note: lrslib can also be built with Boost, and probably without gmp
# depends_on("boost")
diff --git a/var/spack/repos/builtin/packages/lrzip/package.py b/var/spack/repos/builtin/packages/lrzip/package.py
index 34224cad8b..966b92149d 100644
--- a/var/spack/repos/builtin/packages/lrzip/package.py
+++ b/var/spack/repos/builtin/packages/lrzip/package.py
@@ -27,6 +27,9 @@ class Lrzip(Package):
version("0.616", sha256="6ef50bfec15d7585e5b085067c9fe91a87246ccd14a3165acd08b147bba26a2e")
version("0.615", sha256="45bc3e09a9c467c9331499e4e7919ea97d0824d24a1f2c3ec9548bb2b9d14898")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# depends_on('coreutils')
depends_on("lzo")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/lshw/package.py b/var/spack/repos/builtin/packages/lshw/package.py
index dd6e49a0f4..cff56ccc0e 100644
--- a/var/spack/repos/builtin/packages/lshw/package.py
+++ b/var/spack/repos/builtin/packages/lshw/package.py
@@ -17,14 +17,21 @@ class Lshw(MakefilePackage):
homepage = "https://github.com/lyonel/lshw"
url = "https://github.com/lyonel/lshw/archive/B.02.18.tar.gz"
+ list_url = "https://github.com/lyonel/lshw/tags"
- license("GPL-3.0-or-later")
+ license("GPL-2.0-only", checked_by="wdconinc")
+ version("02.20", sha256="6b8346a89fb0f0f1798e66f6a707a881d38b9b3a67256b30fc4628dac09f291a")
version("02.18", sha256="aa8cb2eebf36e9e46dfc227f24784aa8c87181ec96e57ee6c455da8a0ce4fa77")
version("02.17", sha256="0bb76c7df7733dc9b80d5d35f9d9752409ddb506e190453a2cc960461de5ddeb")
version("02.16", sha256="58a7731d204791dd33db5eb3fde9808d1235283e069e6c33a193637ccec27b3e")
version("02.15", sha256="33c51ba0554d4bcd8ff9a67e5971a63b9ddd58213e2901a09000815376bc61b9")
- def install(self, spec, prefix):
- make("install")
- install_tree(".", prefix)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ def setup_build_environment(self, env):
+ env.set("PREFIX", self.prefix)
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/lsscsi/package.py b/var/spack/repos/builtin/packages/lsscsi/package.py
index 2042e3b6b8..387ee16284 100644
--- a/var/spack/repos/builtin/packages/lsscsi/package.py
+++ b/var/spack/repos/builtin/packages/lsscsi/package.py
@@ -20,3 +20,5 @@ class Lsscsi(AutotoolsPackage):
version("0.32", sha256="0a800e9e94dca2ab702d65d72777ae8cae078e3d74d0bcbed64ba0849e8029a1")
version("0.31", sha256="12bf1973014803c6fd6d547e7594a4c049f0eef3bf5d22190d4be29d7c09f3ca")
version("0.30", sha256="619a2187405f02c5f57682f3478bffc75326803cd08839e39d434250c5518b15")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ltp/package.py b/var/spack/repos/builtin/packages/ltp/package.py
index f2dc4a280c..02fbb4619b 100644
--- a/var/spack/repos/builtin/packages/ltp/package.py
+++ b/var/spack/repos/builtin/packages/ltp/package.py
@@ -23,6 +23,8 @@ class Ltp(AutotoolsPackage):
version("20190930", sha256="eca11dbe11a61f3035561a2aa272d578ca9380563440f9ba876c0c4755a42533")
version("20190517", sha256="538175fff2d6c9d69748b2d4afcf5ac43f7300456f839fa7b5b101c7ad447af7")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ltr-retriever/package.py b/var/spack/repos/builtin/packages/ltr-retriever/package.py
index e54698684b..73f4111eef 100644
--- a/var/spack/repos/builtin/packages/ltr-retriever/package.py
+++ b/var/spack/repos/builtin/packages/ltr-retriever/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from os import symlink
-
from spack.package import *
@@ -42,9 +40,7 @@ class LtrRetriever(Package):
"^TEsorter=.*$", "TEsorter={}".format(spec["py-tesorter"].prefix.bin), "paths"
)
- mkdirp(prefix.opt)
- mkdirp(prefix.bin)
-
- install_tree(".", prefix.opt.ltr_retriever)
+ install_tree(".", prefix)
- symlink(prefix.opt.ltr_retriever.LTR_retriever, prefix.bin.LTR_retriever)
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.prefix)
diff --git a/var/spack/repos/builtin/packages/ltrace/package.py b/var/spack/repos/builtin/packages/ltrace/package.py
index 3db1d32379..5962420247 100644
--- a/var/spack/repos/builtin/packages/ltrace/package.py
+++ b/var/spack/repos/builtin/packages/ltrace/package.py
@@ -18,6 +18,9 @@ class Ltrace(AutotoolsPackage):
version("0.7.3", sha256="0e6f8c077471b544c06def7192d983861ad2f8688dd5504beae62f0c5f5b9503")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("platform=darwin", msg="ltrace runs only on Linux.")
depends_on("elf", type="link")
diff --git a/var/spack/repos/builtin/packages/lua-bitlib/package.py b/var/spack/repos/builtin/packages/lua-bitlib/package.py
index a125690f45..d17ac20be3 100644
--- a/var/spack/repos/builtin/packages/lua-bitlib/package.py
+++ b/var/spack/repos/builtin/packages/lua-bitlib/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class LuaBitlib(LuaPackage):
"""Lua-jit-like bitwise operations for lua"""
- homepage = "http://luaforge.net/projects/bitlib"
+ homepage = "https://luaforge.net/projects/bitlib"
url = "https://luarocks.org/manifests/luarocks/bitlib-23-2.src.rock"
version(
diff --git a/var/spack/repos/builtin/packages/lua-ffi/package.py b/var/spack/repos/builtin/packages/lua-ffi/package.py
index cecf7a11d5..609475446c 100644
--- a/var/spack/repos/builtin/packages/lua-ffi/package.py
+++ b/var/spack/repos/builtin/packages/lua-ffi/package.py
@@ -23,4 +23,6 @@ class LuaFfi(LuaPackage):
commit="a1cb731b08c91643b0665935eb5622b3d621211b",
)
- depends_on("lua@5.1:5.1.99")
+ depends_on("c", type="build") # generated
+
+ depends_on("lua-lang@5.1")
diff --git a/var/spack/repos/builtin/packages/lua-lpeg/package.py b/var/spack/repos/builtin/packages/lua-lpeg/package.py
index 0e00475866..2615c4a9c8 100644
--- a/var/spack/repos/builtin/packages/lua-lpeg/package.py
+++ b/var/spack/repos/builtin/packages/lua-lpeg/package.py
@@ -4,18 +4,26 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
+import spack.build_systems.lua
from spack.package import *
class LuaLpeg(LuaPackage):
"""pattern-matching for lua"""
- homepage = "http://www.inf.puc-rio.br/~roberto/lpeg/"
+ homepage = "https://www.inf.puc-rio.br/~roberto/lpeg/"
url = "https://luarocks.org/manifests/gvvaughan/lpeg-1.0.2-1.src.rock"
license("MIT")
version(
+ "1.1.0-1",
+ sha256="6637fcf4d3ddef7be490a2f0155bd2dcd053272d1bb78c015498709ef9fa75dd",
+ expand=False,
+ )
+ version(
"1.0.2-1",
sha256="e0d0d687897f06588558168eeb1902ac41a11edd1b58f1aa61b99d0ea0abbfbc",
expand=False,
@@ -26,4 +34,37 @@ class LuaLpeg(LuaPackage):
expand=False,
)
- depends_on("lua@:5.1.9", when="@:0.12.1^lua")
+ depends_on("lua-lang@:5.1.9", when="@:0.12.1 ^[virtuals=lua-lang] lua")
+
+
+class LuaBuilder(spack.build_systems.lua.LuaBuilder):
+ # without this, the resulting library cannot be linked by a normal link phase, the
+ # way neovim expects to link it, works fine with lua loads though,
+ # * replaces `-bundle` from the default flags with `-shared`
+ @when("platform=darwin")
+ def generate_luarocks_config(self, pkg, spec, prefix):
+ path = super().generate_luarocks_config(pkg, spec, prefix)
+
+ with open(path, "a") as cfg:
+ cfg.write(
+ """
+
+ variables = {
+ LIBFLAG = "-shared -fPIC -undefined dynamic_lookup -all_load"
+ }
+ """
+ )
+
+ return path
+
+ # Builds searching for lpeg with darwin conventions can't find it without a dylib
+ # symlink, neovim is an example
+ @run_after("install", when="platform=darwin")
+ def create_dylib_link_and_fix_id(self):
+ lpeg_so = find(self.prefix, "lpeg.so")
+ assert len(lpeg_so) >= 1
+ dylib_path = os.path.join(self.prefix.lib, "liblpeg.dylib")
+ symlink(lpeg_so[0], dylib_path)
+ # can't use spack.filesystem.fix_darwin_install_name for this, doesn't work
+ install_name_tool = which("install_name_tool", required=True)
+ install_name_tool("-id", dylib_path, dylib_path)
diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
index 7e072a5f37..8eab6e7bee 100644
--- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@@ -31,6 +31,8 @@ class LuaLuafilesystem(LuaPackage):
version("1.7.0-2", sha256="23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59")
version("1.6.3", sha256="11c7b1fc2e560c0a521246b84e6257138d97dddde5a19e405714dbabcb9436ca")
+ depends_on("c", type="build") # generated
+
depends_on("lua-lang@:5.3", when="@:1.7")
diff --git a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
index e6d21a5c76..1f8356270f 100644
--- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
+++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
@@ -18,11 +18,17 @@ class LuaLuajitOpenresty(LuaImplPackage):
license("MIT")
version(
- "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3"
+ "2.1-20240626", sha256="1e53822a1105df216b9657ccb0293a152ac5afd875abc848453bfa353ca8181b"
)
version(
"2.1-20230410", sha256="77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff"
)
+ version(
+ "2.1-20220111", sha256="1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant(
"lualinks",
@@ -45,12 +51,10 @@ class LuaLuajitOpenresty(LuaImplPackage):
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
- makefile.filter("PREFIX= .*", "PREFIX = {0}".format(prefix))
+ makefile.filter("PREFIX= .*", f"PREFIX = {prefix}")
src_makefile = FileFilter(join_path("src", "Makefile"))
- src_makefile.filter("^DEFAULT_CC = .*", "DEFAULT_CC = {0}".format(spack_cc))
- src_makefile.filter(
- "^DYNAMIC_CC = .*", "DYNAMIC_CC = $(CC) {0}".format(self.compiler.cc_pic_flag)
- )
+ src_makefile.filter("^DEFAULT_CC = .*", f"DEFAULT_CC = {spack_cc}")
+ src_makefile.filter("^DYNAMIC_CC = .*", f"DYNAMIC_CC = $(CC) {self.compiler.cc_pic_flag}")
# Catalina and higher produce a non-functional luajit unless this is set
if spec.satisfies("platform=darwin"):
src_makefile.filter(
@@ -59,4 +63,12 @@ class LuaLuajitOpenresty(LuaImplPackage):
# Linking with the C++ compiler is a dirty hack to deal with the fact
# that unwinding symbols are not included by libc, this is necessary
# on some platforms for the final link stage to work
- src_makefile.filter("^TARGET_LD = .*", "TARGET_LD = {0}".format(spack_cxx))
+ src_makefile.filter("^TARGET_LD = .*", f"TARGET_LD = {spack_cxx}")
+
+ def setup_run_environment(self, env):
+ env.prepend_path(
+ "LUA_PATH",
+ os.path.join(self.spec.prefix, "share", f"luajit-{self.version[0:2]}", "?.lua"),
+ separator=";",
+ )
+ super().setup_run_environment(env)
diff --git a/var/spack/repos/builtin/packages/lua-luajit/package.py b/var/spack/repos/builtin/packages/lua-luajit/package.py
index d771de3e9a..f46748202d 100644
--- a/var/spack/repos/builtin/packages/lua-luajit/package.py
+++ b/var/spack/repos/builtin/packages/lua-luajit/package.py
@@ -27,6 +27,9 @@ class LuaLuajit(LuaImplPackage):
)
version("2.0.4", sha256="620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("@:2.0.5", when="target=aarch64:")
variant(
diff --git a/var/spack/repos/builtin/packages/lua-luaposix/package.py b/var/spack/repos/builtin/packages/lua-luaposix/package.py
index 1f2cc52f92..579b172ce3 100644
--- a/var/spack/repos/builtin/packages/lua-luaposix/package.py
+++ b/var/spack/repos/builtin/packages/lua-luaposix/package.py
@@ -23,4 +23,7 @@ class LuaLuaposix(LuaPackage):
version("33.4.0", sha256="e66262f5b7fe1c32c65f17a5ef5ffb31c4d1877019b4870a5d373e2ab6526a21")
version("33.2.1", sha256="4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1")
- depends_on("lua-bit32", when="^lua-lang@5.1:5.1.99")
+ depends_on("c", type="build")
+
+ depends_on("libxcrypt", when="platform=linux")
+ depends_on("lua-bit32", when="^lua-lang@5.1")
diff --git a/var/spack/repos/builtin/packages/lua-mpack/package.py b/var/spack/repos/builtin/packages/lua-mpack/package.py
index da4cd89c4d..2ce70fc23d 100644
--- a/var/spack/repos/builtin/packages/lua-mpack/package.py
+++ b/var/spack/repos/builtin/packages/lua-mpack/package.py
@@ -17,10 +17,13 @@ class LuaMpack(LuaPackage):
license("MIT")
+ version("1.0.12", sha256="06b662b1f14cfaf592ecb3fab425bef20e51439509b7a1736a790ecc929ef8bf")
version("1.0.9", sha256="0fd07e709c3f6f201c2ffc9f77cef1b303b02c12413f0c15670a32bf6c959e9e")
version("1.0.8", sha256="ed6b1b4bbdb56f26241397c1e168a6b1672f284989303b150f7ea8d39d1bc9e9")
version("1.0.7", sha256="68565484a3441d316bd51bed1cacd542b7f84b1ecfd37a8bd18dd0f1a20887e8")
version("1.0.6-0", sha256="9068d9d3f407c72a7ea18bc270b0fa90aad60a2f3099fa23d5902dd71ea4cd5f")
+ depends_on("c", type="build") # generated
+
def luarocks_args(self):
return ["CFLAGS=-fPIC -Wno-error=implicit-function-declaration"]
diff --git a/var/spack/repos/builtin/packages/lua-sol2/package.py b/var/spack/repos/builtin/packages/lua-sol2/package.py
index 50134e380e..cf7aa3ee91 100644
--- a/var/spack/repos/builtin/packages/lua-sol2/package.py
+++ b/var/spack/repos/builtin/packages/lua-sol2/package.py
@@ -9,11 +9,16 @@ from spack.package import *
class LuaSol2(CMakePackage):
"""sol2 is a C++ library binding to Lua."""
- homepage = "https://github.com/ThePhD/sol2"
+ homepage = "https://sol2.rtfd.io"
url = "https://github.com/ThePhD/sol2/archive/refs/tags/v3.2.2.tar.gz"
git = "https://github.com/ThePhD/sol2.git"
+ maintainers("rbberger")
+
+ license("MIT")
+
version("develop", branch="develop")
+ version("3.3.0", tag="v3.3.0", commit="eba86625b707e3c8c99bbfc4624e51f42dc9e561")
version("3.2.3", sha256="f74158f92996f476786be9c9e83f8275129bb1da2a8d517d050421ac160a4b9e")
version("3.2.2", sha256="141790dae0c1821dd2dbac3595433de49ba72545845efc3ec7d88de8b0a3b2da")
version("3.2.1", sha256="b10f88dc1246f74a10348faef7d2c06e2784693307df74dcd87c4641cf6a6828")
@@ -21,9 +26,16 @@ class LuaSol2(CMakePackage):
version("3.0.3", sha256="bf089e50387edfc70063e24fd7fbb693cceba4a50147d864fabedd1b33483582")
version("3.0.2", sha256="3f5f369eae6732ae9a315fe4370bbdc9900d2f2f4f291206aeb5b2d5533f0c99")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# Lua is not needed when building, since sol2 is headers-only
depends_on("lua", type=("link", "run"))
def cmake_args(self):
- args = ["-DSOL2_ENABLE_INSTALL=ON"]
+ args = [
+ self.define("SOL2_ENABLE_INSTALL", True),
+ self.define("SOL2_BUILD_LUA", False),
+ self.define("SOL2_LUA_VERSION", self.spec["lua"].version),
+ ]
return args
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py
index 94cb17f409..5a12e58e44 100644
--- a/var/spack/repos/builtin/packages/lua/package.py
+++ b/var/spack/repos/builtin/packages/lua/package.py
@@ -6,9 +6,27 @@
import glob
import os
+from llnl.util.symlink import readlink
+
import spack.build_environment
from spack.package import *
-from spack.util.executable import Executable
+
+# This is the template for a pkgconfig file for rpm
+# https://github.com/guix-mirror/guix/raw/dcaf70897a0bad38a4638a2905aaa3c46b1f1402/gnu/packages/patches/lua-pkgconfig.patch
+_LUA_PC_TEMPLATE = """prefix={0}
+libdir={0}/lib
+includedir={0}/include
+bindir={0}/bin
+INSTALL_LMOD={0}/share/lua/{1}
+INSTALL_CMOD={0}/lib/lua/{1}
+INTERPRETER=${{bindir}}/lua
+COMPILER=${{bindir}}/luac
+Name: Lua
+Description: A powerful, fast, lightweight, embeddable scripting language
+Version: {2}
+Libs: -L${{libdir}} -llua -lm
+Cflags: -I${{includedir}}
+"""
class LuaImplPackage(MakefilePackage):
@@ -62,8 +80,8 @@ class LuaImplPackage(MakefilePackage):
resource(
name="luarocks",
- url="https://luarocks.github.io/luarocks/releases/" "luarocks-3.8.0.tar.gz",
- sha256="56ab9b90f5acbc42eb7a94cf482e6c058a63e8a1effdf572b8b2a6323a06d923",
+ url="https://luarocks.github.io/luarocks/releases/luarocks-3.11.1.tar.gz",
+ sha256="c3fb3d960dffb2b2fe9de7e3cb004dc4d0b34bb3d342578af84f84325c669102",
destination="luarocks",
placement="luarocks",
)
@@ -79,7 +97,7 @@ class LuaImplPackage(MakefilePackage):
assert len(luajits) >= 1
luajit = luajits[0]
if os.path.islink(luajit):
- luajit = os.readlink(luajit)
+ luajit = readlink(luajit)
symlink(luajit, "lua")
with working_dir(self.prefix.include):
@@ -200,6 +218,7 @@ class Lua(LuaImplPackage):
homepage = "https://www.lua.org"
url = "https://www.lua.org/ftp/lua-5.3.4.tar.gz"
+ version("5.4.6", sha256="7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88")
version("5.4.4", sha256="164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61")
version("5.4.3", sha256="f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb")
version("5.4.2", sha256="11570d97e9d7303c0a59567ed1ac7c648340cd0db10d5fd594c09223ef2f524f")
@@ -220,7 +239,9 @@ class Lua(LuaImplPackage):
version("5.1.4", sha256="b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a")
version("5.1.3", sha256="6b5df2edaa5e02bf1a2d85e1442b2e329493b30b0c0780f77199d24f087d296d")
- variant("pcfile", default=False, description="Add patch for lua.pc generation")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
provides("lua-lang@5.1", when="@5.1:5.1.99")
@@ -231,12 +252,6 @@ class Lua(LuaImplPackage):
depends_on("ncurses+termlib")
depends_on("readline")
- patch(
- "http://lua.2524044.n2.nabble.com/attachment/7666421/0/pkg-config.patch",
- sha256="208316c2564bdd5343fa522f3b230d84bd164058957059838df7df56876cb4ae",
- when="+pcfile @:5.3.9999",
- )
-
def build(self, spec, prefix):
if spec.satisfies("platform=darwin"):
target = "macosx"
@@ -253,7 +268,7 @@ class Lua(LuaImplPackage):
def install(self, spec, prefix):
make("INSTALL_TOP=%s" % prefix, "install")
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
static_to_shared_library(
join_path(prefix.lib, "liblua.a"),
arguments=["-lm", "-ldl"],
@@ -263,7 +278,7 @@ class Lua(LuaImplPackage):
# compatibility with ax_lua.m4 from autoconf-archive
# https://www.gnu.org/software/autoconf-archive/ax_lua.html
- if "+shared" in spec:
+ if spec.satisfies("+shared"):
with working_dir(prefix.lib):
# e.g., liblua.so.5.1.5
src_path = "liblua.{0}.{1}".format(dso_suffix, str(self.version.up_to(3)))
@@ -283,10 +298,10 @@ class Lua(LuaImplPackage):
os.symlink(src_path, dest_path)
@run_after("install")
- def link_pkg_config(self):
- if "+pcfile" in self.spec:
- versioned_pc_file_name = "lua{0}.pc".format(self.version.up_to(2))
- symlink(
- join_path(self.prefix.lib, "pkgconfig", versioned_pc_file_name),
- join_path(self.prefix.lib, "pkgconfig", "lua.pc"),
- )
+ def generate_pkg_config(self):
+ mkdirp(self.prefix.lib.pkgconfig)
+ versioned_pc_file_name = "lua{0}.pc".format(self.version.up_to(2))
+ versioned_pc_file_path = join_path(self.prefix.lib.pkgconfig, versioned_pc_file_name)
+ with open(versioned_pc_file_path, "w") as pcfile:
+ pcfile.write(_LUA_PC_TEMPLATE.format(self.prefix, self.version.up_to(2), self.version))
+ symlink(versioned_pc_file_path, join_path(self.prefix.lib.pkgconfig, "lua.pc"))
diff --git a/var/spack/repos/builtin/packages/lucene/package.py b/var/spack/repos/builtin/packages/lucene/package.py
index 04991b6b8f..eebfef62db 100644
--- a/var/spack/repos/builtin/packages/lucene/package.py
+++ b/var/spack/repos/builtin/packages/lucene/package.py
@@ -17,15 +17,29 @@ class Lucene(Package):
list_url = "https://archive.apache.org/dist/lucene/java/"
list_depth = 1
- license("BSD-2-Clause")
-
- version("9.5.0", sha256="547277a2b6ce283422eccd14e9ee7ffb28b1af3975936959716c9b4d85843555")
- version("8.3.1", sha256="acd61ad458d16f3c98b9dd4653c6a34dd666a965842e461f7cdf8947fa041e1a")
- version("8.3.0", sha256="67c4f8081f24ff9f4eb4f2b999ac19f7a639b416e5b6f1c1c74e0524a481fc7e")
- version("8.2.0", sha256="505cad34698b217fd6ceee581a8215223a47df5af820c94ca70a6bdbba9d5d7c")
- version("8.1.1", sha256="d62b0acdf2b1ed7a25ccdb593ad8584caeaa20cc9870e22790d3ec7fa6240a8c")
-
- depends_on("java", type="run")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("10.0.0", sha256="b40c29039c363a9479947acfbc41efb381af7868233446412d625a197436a243")
+ version(
+ "9.12.0",
+ sha256="8d7c698e7bdee7580950c4323f091b996afb1b14c91d6d6e4e150ccff883c6c5",
+ preferred=True,
+ )
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-45772
+ version(
+ "9.10.0", sha256="c57b75ee0ea12b54337967b7854ebd12af3d7bad27245c1dc12a167ce2b1f8a7"
+ )
+ version("9.5.0", sha256="547277a2b6ce283422eccd14e9ee7ffb28b1af3975936959716c9b4d85843555")
+ version("8.3.1", sha256="acd61ad458d16f3c98b9dd4653c6a34dd666a965842e461f7cdf8947fa041e1a")
+ version("8.3.0", sha256="67c4f8081f24ff9f4eb4f2b999ac19f7a639b416e5b6f1c1c74e0524a481fc7e")
+ version("8.2.0", sha256="505cad34698b217fd6ceee581a8215223a47df5af820c94ca70a6bdbba9d5d7c")
+ version("8.1.1", sha256="d62b0acdf2b1ed7a25ccdb593ad8584caeaa20cc9870e22790d3ec7fa6240a8c")
+
+ # build.gradle minJavaVersion or versions.toml minJava
+ depends_on("java@8:", type="run")
+ depends_on("java@11:", type="run", when="@9:")
+ depends_on("java@21:", type="run", when="@10:")
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/luit/package.py b/var/spack/repos/builtin/packages/luit/package.py
index 1f9e7ca642..9c5596a715 100644
--- a/var/spack/repos/builtin/packages/luit/package.py
+++ b/var/spack/repos/builtin/packages/luit/package.py
@@ -19,6 +19,8 @@ class Luit(AutotoolsPackage, XorgPackage):
version("1.1.1", sha256="87b0be0bd01f3b857a53e6625bdd31cef18418c95394b7f4387f8ecef78e45da")
+ depends_on("c", type="build") # generated
+
depends_on("libfontenc")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/lulesh/package.py b/var/spack/repos/builtin/packages/lulesh/package.py
index d991975c2e..3548c66c52 100644
--- a/var/spack/repos/builtin/packages/lulesh/package.py
+++ b/var/spack/repos/builtin/packages/lulesh/package.py
@@ -18,6 +18,8 @@ class Lulesh(MakefilePackage):
version("2.0.3", tag="2.0.3", commit="46c2a1d6db9171f9637d79f407212e0f176e8194")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=True, description="Build with OpenMP support")
variant("visual", default=False, description="Build with Visualization support (Silo, hdf5)")
@@ -31,19 +33,19 @@ class Lulesh(MakefilePackage):
targets = []
cxxflag = " -g -O3 -I. "
ldflags = " -g -O3 "
- if "~mpi" in self.spec:
+ if self.spec.satisfies("~mpi"):
targets.append("CXX = {0} {1}".format(spack_cxx, " -DUSE_MPI=0 "))
else:
targets.append("CXX = {0} {1}".format(self.spec["mpi"].mpicxx, " -DUSE_MPI=1"))
targets.append("MPI_INC = {0}".format(self.spec["mpi"].prefix.include))
targets.append("MPI_LIB = {0}".format(self.spec["mpi"].prefix.lib))
- if "+visual" in self.spec:
+ if self.spec.satisfies("+visual"):
targets.append("SILO_INCDIR = {0}".format(self.spec["silo"].prefix.include))
targets.append("SILO_LIBDIR = {0}".format(self.spec["silo"].prefix.lib))
cxxflag = " -g -DVIZ_MESH -I${SILO_INCDIR} "
ldflags = " -g -L${SILO_LIBDIR} -Wl,-rpath=${SILO_LIBDIR} -lsiloh5 -lhdf5 "
- if "+openmp" in self.spec:
+ if self.spec.satisfies("+openmp"):
cxxflag += self.compiler.openmp_flag
ldflags += self.compiler.openmp_flag
diff --git a/var/spack/repos/builtin/packages/lumpy-sv/package.py b/var/spack/repos/builtin/packages/lumpy-sv/package.py
index 71f316db94..369072153c 100644
--- a/var/spack/repos/builtin/packages/lumpy-sv/package.py
+++ b/var/spack/repos/builtin/packages/lumpy-sv/package.py
@@ -16,6 +16,9 @@ class LumpySv(MakefilePackage):
version("0.2.13", sha256="3672b86ef0190ebe520648a6140077ee9f15b0549cb233dca18036e63bbf6375")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("htslib")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/lvarray/package.py b/var/spack/repos/builtin/packages/lvarray/package.py
index 86c7dd0780..9fdb78ebab 100644
--- a/var/spack/repos/builtin/packages/lvarray/package.py
+++ b/var/spack/repos/builtin/packages/lvarray/package.py
@@ -54,6 +54,9 @@ class Lvarray(CMakePackage, CudaPackage):
"0.1.0", tag="v0.1.0", commit="0bf5f7d077de4a08f58db24baed207f9dba95f6e", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build Shared Libs")
variant("umpire", default=False, description="Build Umpire support")
variant("chai", default=False, description="Build Chai support")
@@ -102,7 +105,7 @@ class Lvarray(CMakePackage, CudaPackage):
@run_after("build")
def build_docs(self):
- if "+docs" in self.spec:
+ if self.spec.satisfies("+docs"):
with working_dir(self.build_directory):
make("docs")
@@ -115,7 +118,7 @@ class Lvarray(CMakePackage, CudaPackage):
def _get_host_config_path(self, spec):
var = ""
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
var = "-".join([var, "cuda"])
hostname = socket.gethostname().rstrip("1234567890")
@@ -179,7 +182,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("# CMake executable path: %s\n" % cmake_exe)
cfg.write("#{0}\n\n".format("-" * 80))
- if "blt" in spec:
+ if spec.satisfies("^blt"):
cfg.write(cmake_cache_entry("BLT_SOURCE_DIR", spec["blt"].prefix))
#######################
@@ -196,7 +199,7 @@ class Lvarray(CMakePackage, CudaPackage):
cflags = " ".join(spec.compiler_flags["cflags"])
cxxflags = " ".join(spec.compiler_flags["cxxflags"])
- if "%intel" in spec:
+ if spec.satisfies("%intel"):
cflags += " -qoverride-limits"
cxxflags += " -qoverride-limits"
@@ -213,10 +216,10 @@ class Lvarray(CMakePackage, CudaPackage):
debug_flags = "-O0 -g"
cfg.write(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", debug_flags))
- if "%clang arch=linux-rhel7-ppc64le" in spec:
+ if spec.satisfies("%clang arch=linux-rhel7-ppc64le"):
cfg.write(cmake_cache_entry("CMAKE_EXE_LINKER_FLAGS", "-Wl,--no-toc-optimize"))
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# Cuda\n")
cfg.write("#{0}\n\n".format("-" * 80))
@@ -276,7 +279,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("# Umpire\n")
cfg.write("#{0}\n\n".format("-" * 80))
- if "+umpire" in spec:
+ if spec.satisfies("+umpire"):
cfg.write(cmake_cache_option("ENABLE_UMPIRE", True))
cfg.write(cmake_cache_entry("UMPIRE_DIR", spec["umpire"].prefix))
else:
@@ -286,7 +289,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("# CHAI\n")
cfg.write("#{0}\n\n".format("-" * 80))
- if "+chai" in spec:
+ if spec.satisfies("+chai"):
cfg.write(cmake_cache_option("ENABLE_CHAI", True))
cfg.write(cmake_cache_entry("CHAI_DIR", spec["chai"].prefix))
else:
@@ -296,7 +299,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("# Caliper\n")
cfg.write("#{0}\n\n".format("-" * 80))
- if "+caliper" in spec:
+ if spec.satisfies("+caliper"):
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# Caliper\n")
cfg.write("#{0}\n\n".format("-" * 80))
@@ -309,7 +312,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# Python\n")
cfg.write("#{0}\n\n".format("-" * 80))
- if "+pylvarray" in spec:
+ if spec.satisfies("+pylvarray"):
cfg.write(cmake_cache_option("ENABLE_PYLVARRAY", True))
python_exe = os.path.join(spec["python"].prefix.bin, "python3")
cfg.write(cmake_cache_entry("Python3_EXECUTABLE", python_exe))
@@ -319,7 +322,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# Documentation\n")
cfg.write("#{0}\n\n".format("-" * 80))
- if "+docs" in spec:
+ if spec.satisfies("+docs"):
cfg.write(cmake_cache_option("ENABLE_DOCS", True))
sphinx_dir = spec["py-sphinx"].prefix
cfg.write(
@@ -340,7 +343,7 @@ class Lvarray(CMakePackage, CudaPackage):
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# addr2line\n")
cfg.write("#{0}\n\n".format("-" * 80))
- cfg.write(cmake_cache_option("ENABLE_ADDR2LINE", "+addr2line" in spec))
+ cfg.write(cmake_cache_option("ENABLE_ADDR2LINE", spec.satisfies("+addr2line")))
cfg.write("#{0}\n".format("-" * 80))
cfg.write("# Other\n")
@@ -356,14 +359,14 @@ class Lvarray(CMakePackage, CudaPackage):
# Shared libs
options.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- if "~tests~examples~benchmarks" in spec:
+ if spec.satisfies("~tests~examples~benchmarks"):
options.append("-DENABLE_TESTS=OFF")
else:
options.append("-DENABLE_TESTS=ON")
- if "~test" in spec:
+ if spec.satisfies("~test"):
options.append("-DDISABLE_UNIT_TESTS=ON")
- elif "+tests" in spec and ("%intel" in spec or "%xl" in spec):
+ elif spec.satisfies("+tests") and (spec.satisfies("%intel") or spec.satisfies("%xl")):
warnings.warn(
"The LvArray unit tests take an excessive amount of"
" time to build with the Intel or IBM compilers."
diff --git a/var/spack/repos/builtin/packages/lvm2/package.py b/var/spack/repos/builtin/packages/lvm2/package.py
index cc005e970a..356faa1fc8 100644
--- a/var/spack/repos/builtin/packages/lvm2/package.py
+++ b/var/spack/repos/builtin/packages/lvm2/package.py
@@ -33,6 +33,9 @@ class Lvm2(AutotoolsPackage, SourcewarePackage):
version("2.03.01", sha256="424e58b074195ec08e0315fa1aff2550590998c33aea5c43bdceb8c1d135530b")
version("2.03.00", sha256="405992bf76960e60c7219d84d5f1e22edc34422a1ea812e21b2ac3c813d0da4e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://sourceware.org/pub/lvm2/releases/LVM2.{0}.tgz"
return url.format(version)
diff --git a/var/spack/repos/builtin/packages/lwgrp/package.py b/var/spack/repos/builtin/packages/lwgrp/package.py
index a22fcd5e71..eb0dc95ed7 100644
--- a/var/spack/repos/builtin/packages/lwgrp/package.py
+++ b/var/spack/repos/builtin/packages/lwgrp/package.py
@@ -14,14 +14,23 @@ class Lwgrp(AutotoolsPackage):
url = "https://github.com/LLNL/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz"
git = "https://github.com/LLNL/lwgrp.git"
+ maintainers("CamStan", "gonsie", "adammoody")
+
version("main", branch="main")
+ version("1.0.6", sha256="9f697978361b4bd9914beaaafffcee0b62a480a9a7dd3d75176910cebda81438")
version("1.0.5", sha256="16b579e13b8a5218f4fe1b8715f6aafb09133a0cefbcd6b2eaf73802955dee6b")
version("1.0.4", sha256="0c933df7658660a0225f8e3a940eb2621efa4421397859417c8d90d906d4e90a")
version("1.0.3", sha256="20b2fc3908bfdf04d1c177f86e227a147214cd155c548b3dd75e54c78e1c1c47")
version("1.0.2", sha256="c9d4233946e40f01efd0b4644fd9224becec51b9b5f8cbf45f5bac3129b5b536")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
+ depends_on("autoconf", type="build", when="@main build_system=autotools")
+ depends_on("automake", type="build", when="@main build_system=autotools")
+ depends_on("libtool", type="build", when="@main build_system=autotools")
+
variant("shared", default=True, description="Build with shared libraries")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/lwtnn/package.py b/var/spack/repos/builtin/packages/lwtnn/package.py
index a823f7cb9a..0087b298d3 100644
--- a/var/spack/repos/builtin/packages/lwtnn/package.py
+++ b/var/spack/repos/builtin/packages/lwtnn/package.py
@@ -20,6 +20,8 @@ class Lwtnn(CMakePackage):
version("2.12.1", sha256="b820e698d4ed60737e646ca87a42354e8ac548403348b7f2940e8fda1c0f8203")
version("2.10", sha256="bf84b290c44da582226344b0d5febf7fdbd1cbdee94fcc8bcac972c7355564ed")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.54:")
depends_on("eigen")
# https://github.com/lwtnn/lwtnn/issues/161
diff --git a/var/spack/repos/builtin/packages/lxc/package.py b/var/spack/repos/builtin/packages/lxc/package.py
index abc2c88f70..30af5b77ca 100644
--- a/var/spack/repos/builtin/packages/lxc/package.py
+++ b/var/spack/repos/builtin/packages/lxc/package.py
@@ -29,6 +29,8 @@ class Lxc(AutotoolsPackage):
version("2.0.11", sha256="31334ffe0e2d8e38779d80ce670a523f4f5559c2a02c9e085c2f0cf43995d0b0")
version("2.0.10", sha256="b748de0914467aafea18a568602735907fc95f4272609dba7b0f8c91d7dde776")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/lynx/package.py b/var/spack/repos/builtin/packages/lynx/package.py
index 7b8fb3673f..24053d9408 100644
--- a/var/spack/repos/builtin/packages/lynx/package.py
+++ b/var/spack/repos/builtin/packages/lynx/package.py
@@ -16,6 +16,8 @@ class Lynx(AutotoolsPackage):
version("2.8.9.1", sha256="a46e4167b8f02c066d2fe2eafcc5603367be0e3fe2e59e9fc4eb016f306afc8e")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py
index a1a59ff1a3..5063dccdc9 100644
--- a/var/spack/repos/builtin/packages/lz4/package.py
+++ b/var/spack/repos/builtin/packages/lz4/package.py
@@ -25,6 +25,7 @@ class Lz4(CMakePackage, MakefilePackage):
# liblz4 is BSD-2-clause; programs, manpages, and everything else are GPL2
license("BSD-2-Clause AND GPL-2.0-only", checked_by="tgamblin")
+ version("1.10.0", sha256="537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b")
version("1.9.4", sha256="0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b")
version("1.9.3", sha256="030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1")
version("1.9.2", sha256="658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc")
@@ -34,6 +35,9 @@ class Lz4(CMakePackage, MakefilePackage):
version("1.7.5", sha256="0190cacd63022ccb86f44fa5041dc6c3804407ad61550ca21c382827319e7e7e")
version("1.3.1", sha256="9d4d00614d6b9dec3114b33d1224b6262b99ace24434c53487a0c8fd0b18cfed")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("valgrind", type="test")
build_system("cmake", "makefile", default="makefile")
@@ -71,13 +75,13 @@ class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
args = [self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW")]
# # no pic on windows
- if "platform=windows" in self.spec:
+ if self.spec.satisfies("platform=windows"):
args.append(self.define("LZ4_POSITION_INDEPENDENT_LIB", False))
args.append(
- self.define("BUILD_SHARED_LIBS", True if "libs=shared" in self.spec else False)
+ self.define("BUILD_SHARED_LIBS", True if self.spec.satisfies("libs=shared") else False)
)
args.append(
- self.define("BUILD_STATIC_LIBS", True if "libs=static" in self.spec else False)
+ self.define("BUILD_STATIC_LIBS", True if self.spec.satisfies("libs=static") else False)
)
args.append(self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"))
return args
@@ -90,7 +94,7 @@ class MakefileBuilder(MakefileBuilder):
def build(self, pkg, spec, prefix):
par = True
- if spec.compiler.name == "nvhpc":
+ if spec.satisfies("%nvhpc"):
# relocation error when building shared and dynamic libs in
# parallel
par = False
@@ -104,8 +108,8 @@ class MakefileBuilder(MakefileBuilder):
make(
"install",
"PREFIX={0}".format(prefix),
- "BUILD_SHARED={0}".format("yes" if "libs=shared" in self.spec else "no"),
- "BUILD_STATIC={0}".format("yes" if "libs=static" in self.spec else "no"),
+ "BUILD_SHARED={0}".format("yes" if self.spec.satisfies("libs=shared") else "no"),
+ "BUILD_STATIC={0}".format("yes" if self.spec.satisfies("libs=static") else "no"),
)
@run_after("install", when="platform=darwin")
diff --git a/var/spack/repos/builtin/packages/lzma/package.py b/var/spack/repos/builtin/packages/lzma/package.py
index 46749cfcf4..1b08713e30 100644
--- a/var/spack/repos/builtin/packages/lzma/package.py
+++ b/var/spack/repos/builtin/packages/lzma/package.py
@@ -22,3 +22,6 @@ class Lzma(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("4.32.7", sha256="9f337a8c51e5ded198d1032f5087ba3fe438f2a54e9df419e513a151775b032c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py
index 6bb7f3b449..e0ff76808b 100644
--- a/var/spack/repos/builtin/packages/lzo/package.py
+++ b/var/spack/repos/builtin/packages/lzo/package.py
@@ -21,6 +21,8 @@ class Lzo(AutotoolsPackage):
version("2.06", sha256="ff79e6f836d62d3f86ef6ce893ed65d07e638ef4d3cb952963471b4234d43e73")
version("2.05", sha256="449f98186d76ba252cd17ff1241ca2a96b7f62e0d3e4766f88730dab0ea5f333")
+ depends_on("c", type="build") # generated
+
variant(
"libs",
default="shared,static",
diff --git a/var/spack/repos/builtin/packages/lzop/package.py b/var/spack/repos/builtin/packages/lzop/package.py
index 1d95066711..4fe4f819b7 100644
--- a/var/spack/repos/builtin/packages/lzop/package.py
+++ b/var/spack/repos/builtin/packages/lzop/package.py
@@ -21,5 +21,7 @@ class Lzop(CMakePackage):
version("1.03", sha256="c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9")
version("1.01", sha256="28acd94d933befbc3af986abcfe833173fb7563b66533fdb4ac592f38bb944c7")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("lzo")
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
index cfe1745549..cc4aa1d65d 100644
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -21,6 +21,9 @@ class M4(AutotoolsPackage, GNUMirrorPackage):
version("1.4.18", sha256="ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab")
version("1.4.17", sha256="3ce725133ee552b8b4baca7837fb772940b25e81b2a9dc92537aeaf733538c9e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("gnulib-pgi.patch", when="@1.4.18")
patch("pgi.patch", when="@1.4.17")
# The NVIDIA compilers do not currently support some GNU builtins.
diff --git a/var/spack/repos/builtin/packages/macfuse/package.py b/var/spack/repos/builtin/packages/macfuse/package.py
index 05de77cd74..fe1a2e80ef 100644
--- a/var/spack/repos/builtin/packages/macfuse/package.py
+++ b/var/spack/repos/builtin/packages/macfuse/package.py
@@ -17,7 +17,6 @@ class Macfuse(Package):
provides("fuse")
conflicts("platform=linux", msg="macfuse does not support linux, use libfuse instead")
- conflicts("platform=cray", msg="macfuse does not support cray, use libfuse instead")
def install(self, spec, prefix):
msg = """
diff --git a/var/spack/repos/builtin/packages/macsio/package.py b/var/spack/repos/builtin/packages/macsio/package.py
index 0e601b32d1..00b0256d22 100644
--- a/var/spack/repos/builtin/packages/macsio/package.py
+++ b/var/spack/repos/builtin/packages/macsio/package.py
@@ -20,6 +20,9 @@ class Macsio(CMakePackage):
version("1.1", sha256="a86249b0f10647c0b631773db69568388094605ec1a0af149d9e61e95e6961ec")
version("1.0", sha256="1dd0df28f9f31510329d5874c1519c745b5c6bec12e102cea3e9f4b05e5d3072")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("mpi", default=True, description="Build MPI plugin")
variant("silo", default=False, description="Build with SILO plugin")
# TODO: multi-level variants for hdf5
diff --git a/var/spack/repos/builtin/packages/mad-numdiff/package.py b/var/spack/repos/builtin/packages/mad-numdiff/package.py
index b08a180dad..5095cf818b 100644
--- a/var/spack/repos/builtin/packages/mad-numdiff/package.py
+++ b/var/spack/repos/builtin/packages/mad-numdiff/package.py
@@ -18,3 +18,5 @@ class MadNumdiff(CMakePackage):
version("develop", branch="master")
version("20150724", sha256="33130b48416f8dcb6402acbcb8906cdec35b7242fe2f3ad49b7d7c063d75377b")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/madgraph5amc/gcc14.patch b/var/spack/repos/builtin/packages/madgraph5amc/gcc14.patch
new file mode 100644
index 0000000000..d7cf655bbd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/madgraph5amc/gcc14.patch
@@ -0,0 +1,38 @@
+From b470cfe805e747204a86eedada1d90aae1ebceec Mon Sep 17 00:00:00 2001
+From: Joseph C Wang <joequant@gmail.com>
+Date: Sat, 24 Aug 2024 00:36:46 +0800
+Subject: [PATCH] add compile flags for gcc14 compilation
+
+This disables pointer mismatch warnings which are now errors in
+gcc14.
+---
+ vendor/StdHEP/mcfio/src/GNUmakefile | 2 +-
+ vendor/StdHEP/src/stdhep/GNUmakefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vendor/StdHEP/mcfio/src/GNUmakefile b/vendor/StdHEP/mcfio/src/GNUmakefile
+index 591007abe3..14862ba79e 100644
+--- a/vendor/StdHEP/mcfio/src/GNUmakefile
++++ b/vendor/StdHEP/mcfio/src/GNUmakefile
+@@ -13,7 +13,7 @@ BINDIR = ../../bin
+ include ../arch_mcfio
+
+ FFLAGS += -std=legacy
+-CFLAGS += -Wno-implicit-function-declaration
++CFLAGS += -Wno-implicit-function-declaration -Wno-incompatible-pointer-types
+
+ FINC = -I.
+ CINC = -I. -I/usr/include/tirpc
+diff --git a/vendor/StdHEP/src/stdhep/GNUmakefile b/vendor/StdHEP/src/stdhep/GNUmakefile
+index b1d7591ef0..d0421788c9 100644
+--- a/vendor/StdHEP/src/stdhep/GNUmakefile
++++ b/vendor/StdHEP/src/stdhep/GNUmakefile
+@@ -8,7 +8,7 @@ STDHEP_DIR = ../..
+ #this has been added by MZ
+ FFLAGS+= -fd-lines-as-code -fPIE
+ FFLAGS += -std=legacy
+-CFLAGS += -Wno-implicit-function-declaration
++CFLAGS += -Wno-implicit-function-declaration -Wno-incompatible-pointer-types
+
+ SLIB = $(STDHEP_DIR)/lib
+ SBIN = $(STDHEP_DIR)/bin
diff --git a/var/spack/repos/builtin/packages/madgraph5amc/package.py b/var/spack/repos/builtin/packages/madgraph5amc/package.py
index eb08e306bd..4847a81225 100644
--- a/var/spack/repos/builtin/packages/madgraph5amc/package.py
+++ b/var/spack/repos/builtin/packages/madgraph5amc/package.py
@@ -17,16 +17,38 @@ class Madgraph5amc(MakefilePackage):
event manipulation and analysis."""
homepage = "https://launchpad.net/mg5amcnlo"
- url = "https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v2.7.3.tar.gz"
+ url = "https://launchpad.net/mg5amcnlo/lts/2.9.x/+download/MG5_aMC_v2.9.20.tar.gz"
tags = ["hep"]
- version(
- "2.8.1",
- sha256="acda34414beba201e529b8c03f87f4893fb3f99ed2956a131d60a387e76c5b8c",
- url="https://launchpad.net/mg5amcnlo/2.0/2.8.x/+download/MG5_aMC_v2.8.1.tar.gz",
- )
- version("2.7.3.py3", sha256="400c26f9b15b07baaad9bd62091ceea785c2d3a59618fdc27cad213816bc7225")
+ # Launchpad can sometimes be slow to respond
+ timeout = {"timeout": 60}
+
+ with default_args(fetch_options=timeout):
+ version("3.5.6", sha256="d4f336196303df748074ac92f251db8e6592fca37b3059c2e0f2a764c7e50975")
+ version(
+ "2.9.20",
+ sha256="09a70e2e8b52e504bcaaa6527d3cec9641b043f5f853f2d11fa3c9970b7efae9",
+ preferred=True,
+ )
+ with default_args(deprecated=True):
+ version(
+ "2.9.19", sha256="ec95d40ec8845e57682400ef24a3b769a4d0542e3a849b7c5e10105d0a0f8e61"
+ )
+ version(
+ "2.9.17", sha256="6781c515ccc2005a953c35dcf9238632b761a937f1832bdfaa5514510b8c5a17"
+ )
+ # Older versions have been removed, only the latest LTS versions are available:
+ version(
+ "2.8.3.2",
+ sha256="4077eee75f9255fe627755fe0ac5da5d72f5d5c4f70b6e06e4e564e9c512b215",
+ url="https://launchpad.net/mg5amcnlo/lts/2.8.x/+download/MG5_aMC_v2.8.3.2.tar.gz",
+ )
+ version(
+ "2.7.3.py3",
+ sha256="400c26f9b15b07baaad9bd62091ceea785c2d3a59618fdc27cad213816bc7225",
+ url="https://launchpad.net/mg5amcnlo/lts/2.7.x/+download/MG5_aMC_v2.7.3.py3.tar.gz",
+ )
variant(
"atlas",
@@ -35,6 +57,7 @@ class Madgraph5amc(MakefilePackage):
)
variant("ninja", default=False, description="Use external installation" + " of Ninja")
variant("collier", default=False, description="Use external installation" + " of Collier")
+ variant("pythia8", default=False, description="Use external installation of Pythia8")
conflicts("%gcc@10:", when="@2.7.3")
@@ -46,15 +69,21 @@ class Madgraph5amc(MakefilePackage):
depends_on("py-six", when="@2.7.3.py3,2.8.0:", type=("build", "run"))
depends_on("python@3.7:", when="@2.7.3.py3", type=("build", "run"))
- depends_on("python@2.7.0:2.8.0,3.7:", when="@2.8.0:", type=("build", "run"))
depends_on("libtirpc")
+ depends_on("pythia8", when="+pythia8")
- patch("array-bounds.patch")
- patch("madgraph5amc.patch", level=0)
- patch("madgraph5amc-2.7.3.atlas.patch", level=0, when="@2.7.3.py2+atlas")
+ patch("gcc14.patch", when="@:3.5.5%gcc@14:")
+ patch("array-bounds.patch", when="@:2.8.1")
+ patch("madgraph5amc.patch", level=0, when="@:2.9")
patch("madgraph5amc-2.7.3.atlas.patch", level=0, when="@2.7.3.py3+atlas")
patch("madgraph5amc-2.8.0.atlas.patch", level=0, when="@2.8.0+atlas")
patch("madgraph5amc-2.8.0.atlas.patch", level=0, when="@2.8.1+atlas")
+ # Fix running from CVMFS on AFS, for example on lxplus at CERN
+ patch(
+ "https://patch-diff.githubusercontent.com/raw/mg5amcnlo/mg5amcnlo/pull/96.diff?full_index=1",
+ sha256="ac6644f1d0ef51d9bdb27a1519261f1cf27d075d39faa278fbc2849acbc5575d",
+ when="@3:3.5",
+ )
def edit(self, spec, prefix):
def set_parameter(name, value):
@@ -85,12 +114,6 @@ class Madgraph5amc(MakefilePackage):
with working_dir(join_path("vendor", "CutTools")):
make(parallel=False)
- with working_dir(join_path("vendor", "StdHEP")):
- for m in ["mcfio/arch_mcfio", "src/stdhep_arch"]:
- arch = FileFilter(m)
- arch.filter("CC.*=.*", "CC = {0}".format(spack_cc))
- make(parallel=False)
-
if "+atlas" in spec:
if os.path.exists(join_path("bin", "compile.py")):
compile_py = Executable(join_path("bin", "compile.py"))
@@ -120,3 +143,20 @@ class Madgraph5amc(MakefilePackage):
join_path("Template", "LO", "Source", ".make_opts"),
join_path(prefix, "Template", "LO", "Source", "make_opts"),
)
+
+ # TODO: Fix for reproducibility, see https://github.com/spack/spack/pull/41128#issuecomment-2305777485
+ if "+pythia8" in spec:
+ with open("install-pythia8-interface", "w") as f:
+ f.write(
+ f"""set pythia8_path {spec['pythia8'].prefix}
+ install mg5amc_py8_interface
+ """
+ )
+ mg5 = Executable(join_path(prefix, "bin", "mg5_aMC"))
+ mg5("install-pythia8-interface")
+
+ def url_for_version(self, version):
+ major = str(version).split(".")[0]
+ minor = str(version).split(".")[1]
+ url = f"https://launchpad.net/mg5amcnlo/{major}.0/{major}.{minor}.x/+download/MG5_aMC_v{version}.tar.gz"
+ return url
diff --git a/var/spack/repos/builtin/packages/madis/package.py b/var/spack/repos/builtin/packages/madis/package.py
index 7715debdda..0b5033dac8 100644
--- a/var/spack/repos/builtin/packages/madis/package.py
+++ b/var/spack/repos/builtin/packages/madis/package.py
@@ -23,6 +23,8 @@ class Madis(MakefilePackage):
version("4.3", sha256="5d1ee9800c84e623dcf4271653aa66d17a744143e58354e70f8a0646cd6b246c")
+ depends_on("fortran", type="build") # generated
+
variant("pic", default=True, description="Build with position-independent code (PIC)")
variant("pnetcdf", default=False, description="Build with parallel NetCDF")
diff --git a/var/spack/repos/builtin/packages/madx/package.py b/var/spack/repos/builtin/packages/madx/package.py
index d05ce5197e..fd42729b90 100644
--- a/var/spack/repos/builtin/packages/madx/package.py
+++ b/var/spack/repos/builtin/packages/madx/package.py
@@ -17,11 +17,16 @@ class Madx(CMakePackage):
maintainers("wdconinc")
# Supported MAD-X versions
+ version("5.09.03", sha256="cd57f9451e3541a820814ad9ef72b6e01d09c6f3be56802fa2e95b1742db7797")
version("5.09.00", sha256="fc2823cdb90a53c1422cca93a48b003c97c1e72641d9e925cd8f59b08f795c7a")
version("5.08.01", sha256="89c943fcb474344a4f7d28de98e8eae0aec40f779bf908daff79043bf3520555")
version("5.08.00", sha256="0b3fe2aca8899289ef7bfb98d745f13b8c4082e239f54f2662c9cad8d1e63a53")
version("5.07.00", sha256="77c0ec591dc3ea76cf57c60a5d7c73b6c0d66cca1fa7c4eb25a9071e8fc67e60")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("x11", default=True, description="Turn on plotting using X11")
# patch for gcc-11 to avoid error due to variable shadowing
diff --git a/var/spack/repos/builtin/packages/maeparser/package.py b/var/spack/repos/builtin/packages/maeparser/package.py
index da0ef74d0f..fc77b98433 100644
--- a/var/spack/repos/builtin/packages/maeparser/package.py
+++ b/var/spack/repos/builtin/packages/maeparser/package.py
@@ -19,6 +19,8 @@ class Maeparser(CMakePackage):
version("1.3.1", sha256="a8d80f67d1b9be6e23b9651cb747f4a3200132e7d878a285119c86bf44568e36")
version("1.3.0", sha256="fa8f9336de1e5d1cabec29a6da04547b1fb040bb32ba511ff30b4a14097c751c")
+ depends_on("cxx", type="build") # generated
+
variant(
"shared",
default=True,
diff --git a/var/spack/repos/builtin/packages/mafft/package.py b/var/spack/repos/builtin/packages/mafft/package.py
index 799dbbc352..173f51f300 100644
--- a/var/spack/repos/builtin/packages/mafft/package.py
+++ b/var/spack/repos/builtin/packages/mafft/package.py
@@ -15,6 +15,7 @@ class Mafft(Package):
homepage = "https://mafft.cbrc.jp/alignment/software/index.html"
url = "https://mafft.cbrc.jp/alignment/software/mafft-7.221-with-extensions-src.tgz"
+ version("7.525", sha256="2876f4adc1a2de4ed206bc40896763bf208bf1a02bda52f8bfdd91cf52d73e4a")
version("7.505", sha256="f54a78670fcd9960233bcc3b3dd359f395a71c0ced45a7be1cfeae19950ce6ff")
version("7.481", sha256="7397f1193048587a3d887e46a353418e67849f71729764e8195b218e3453dfa2")
version("7.475", sha256="bb6973ae089ea18cfbd3861a5b9d2c8b7e1543a1fdc78ac2d7cd8dbe3443f319")
@@ -22,6 +23,9 @@ class Mafft(Package):
version("7.407", sha256="1840b51a0b93f40b4d6076af996ee46396428d8dbaf7ba1d847abff9cb1463e5")
version("7.221", sha256="0bc78111966d9b00ddfa14fa217fa5bb0c593a558674a13f02dca7bcd51f7fcf")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
with working_dir("core"):
make("PREFIX=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/magic-enum/package.py b/var/spack/repos/builtin/packages/magic-enum/package.py
new file mode 100644
index 0000000000..fbd65c3d90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magic-enum/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2024 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.package import *
+
+
+class MagicEnum(CMakePackage):
+ """Header-only C++17 library provides static reflection for enums,
+ work with any enum type without any macro or boilerplate code."""
+
+ homepage = "https://github.com/Neargye/magic_enum"
+ url = "https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.6.tar.gz"
+
+ maintainers("pranav-sivaraman")
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.9.6", sha256="814791ff32218dc869845af7eb89f898ebbcfa18e8d81aa4d682d18961e13731")
+
+ variant("examples", default=False, description="Enable examples")
+
+ with default_args(msg="Compiler version is too old"):
+ conflicts("%clang@:4")
+ conflicts("%gcc@:8")
+ conflicts("%msvc@:14.10")
+ conflicts("%apple-clang@:9")
+
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.14:", type="build")
+
+ def cmake_args(self):
+ define = self.define
+ from_variant = self.define_from_variant
+
+ args = [
+ define("MAGIC_ENUM_OPT_BUILD_TESTS", self.run_tests),
+ from_variant("MAGIC_ENUM_OPT_BUILD_EXAMPLES", "examples"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py
index 2732831157..e895e44702 100644
--- a/var/spack/repos/builtin/packages/magics/package.py
+++ b/var/spack/repos/builtin/packages/magics/package.py
@@ -14,14 +14,15 @@ class Magics(CMakePackage):
software MAGICS. Although completely redesigned in C++, it is intended
to be as backwards-compatible as possible with the Fortran interface."""
- homepage = "https://software.ecmwf.int/wiki/display/MAGP/Magics"
+ homepage = "https://confluence.ecmwf.int/display/MAGP/Magics"
url = "https://confluence.ecmwf.int/download/attachments/3473464/Magics-4.2.4-Source.tar.gz?api=v2"
- list_url = "https://software.ecmwf.int/wiki/display/MAGP/Releases"
+ list_url = "https://confluence.ecmwf.int/display/MAGP/Releases"
license("Apache-2.0")
# The policy on which minor releases remain available and which get deleted
# after a newer version becomes available is unclear.
+ version("4.15.3", sha256="1836e1e37534c556f55b5b13812a513091c2fa508b8c4f5a8b6842f07741f1a7")
version("4.9.3", sha256="c01ee7c4b05c5512e93e573748d2766d299fa1a60c226f2a0d0989f3d7c5239b")
version("4.4.0", sha256="544058cd334f3e28a16d00ea7811e13cdf282f9c1ebec2ad7868171d925abd24")
version("4.3.3", sha256="27d3de71cf41f3d557fd85dabaea2baaab34c4c6422a5b5b15071a6a53387601")
@@ -31,6 +32,10 @@ class Magics(CMakePackage):
version("4.2.4", sha256="920c7dbb1aaabe65a31c6c18010829210f8b2f8d614b6c405dc5a4530e346f07")
version("4.1.0", sha256="da626c31f53716990754dd72ab7b2f3902a8ad924b23ef3309bd14900d170541")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
conflicts("%gcc@11:", when="@:4.4", msg="missing #include <limits>")
variant(
@@ -86,7 +91,7 @@ class Magics(CMakePackage):
# Even if netcdf is disabled and -DENABLE_NETCDF=OFF is set, building
# magics still requires legacy netcdf-cxx
- depends_on("netcdf-cxx", when="@4.1.0:4.3.1")
+ conflicts("~netcdf", when="@4.1.0:4.3.1,4.15.3:")
# Optional dependencies
depends_on("netcdf-cxx", when="+netcdf")
@@ -151,3 +156,13 @@ class Magics(CMakePackage):
args.append("-DENABLE_METVIEW=OFF")
return args
+
+ @property
+ def libs(self):
+ return find_libraries(["libMagPlus"], root=self.prefix, recursive=True)
+
+ @property
+ def headers(self):
+ hl = find_all_headers(self.prefix.include)
+ hl.directories = [self.prefix.include, self.prefix.include.magics]
+ return hl
diff --git a/var/spack/repos/builtin/packages/magma/0001-fix-magma-build-error-with-rocm-6.0.0.patch b/var/spack/repos/builtin/packages/magma/0001-fix-magma-build-error-with-rocm-6.0.0.patch
new file mode 100644
index 0000000000..accc271419
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magma/0001-fix-magma-build-error-with-rocm-6.0.0.patch
@@ -0,0 +1,99 @@
+From 4f7d9ff22996ba3000ee344a0f84f73c27257f47 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Wed, 17 Jan 2024 11:44:32 +0000
+Subject: [PATCH] Fix Build Failure with rocm-6.0.0 . Add extra parameter for
+ hipblasZtrmm(),hipblasCtrmm()etc
+
+---
+ interface_hip/blas_c_v2.cpp | 3 ++-
+ interface_hip/blas_d_v2.cpp | 3 ++-
+ interface_hip/blas_s_v2.cpp | 3 ++-
+ interface_hip/blas_z_v2.cpp | 3 ++-
+ interface_hip/interface.cpp | 5 ++---
+ 5 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/interface_hip/blas_c_v2.cpp b/interface_hip/blas_c_v2.cpp
+index 6147857..a406faf 100644
+--- a/interface_hip/blas_c_v2.cpp
++++ b/interface_hip/blas_c_v2.cpp
+@@ -1858,7 +1858,8 @@ magma_ctrmm(
+ hipblas_diag_const( diag ),
+ int(m), int(n),
+ (hipblasComplex*)&alpha, (const hipblasComplex*)dA, int(ldda),
+- (hipblasComplex*)dB, int(lddb) );
++ (hipblasComplex*)dB, int(lddb),
++ (hipblasComplex*)dB, int(lddb) ); /* C same as B; less efficient */
+ #else
+ hipblasCtrmm(
+ queue->hipblas_handle(),
+diff --git a/interface_hip/blas_d_v2.cpp b/interface_hip/blas_d_v2.cpp
+index 340f0b2..8c1ecd4 100644
+--- a/interface_hip/blas_d_v2.cpp
++++ b/interface_hip/blas_d_v2.cpp
+@@ -1858,7 +1858,8 @@ magma_dtrmm(
+ hipblas_diag_const( diag ),
+ int(m), int(n),
+ (double*)&alpha, (const double*)dA, int(ldda),
+- (double*)dB, int(lddb) );
++ (double*)dB, int(lddb),
++ (double*)dB, int(lddb) ); /* C same as B; less efficient */
+ #else
+ hipblasDtrmm(
+ queue->hipblas_handle(),
+diff --git a/interface_hip/blas_s_v2.cpp b/interface_hip/blas_s_v2.cpp
+index 87aeba3..a2cfc02 100644
+--- a/interface_hip/blas_s_v2.cpp
++++ b/interface_hip/blas_s_v2.cpp
+@@ -1858,7 +1858,8 @@ magma_strmm(
+ hipblas_diag_const( diag ),
+ int(m), int(n),
+ (float*)&alpha, (const float*)dA, int(ldda),
+- (float*)dB, int(lddb) );
++ (float*)dB, int(lddb),
++ (float*)dB, int(lddb) ); /* C same as B; less efficient */
+ #else
+ hipblasStrmm(
+ queue->hipblas_handle(),
+diff --git a/interface_hip/blas_z_v2.cpp b/interface_hip/blas_z_v2.cpp
+index 3c7e87a..eb9e2e6 100644
+--- a/interface_hip/blas_z_v2.cpp
++++ b/interface_hip/blas_z_v2.cpp
+@@ -1858,7 +1858,8 @@ magma_ztrmm(
+ hipblas_diag_const( diag ),
+ int(m), int(n),
+ (hipblasDoubleComplex*)&alpha, (const hipblasDoubleComplex*)dA, int(ldda),
+- (hipblasDoubleComplex*)dB, int(lddb) );
++ (hipblasDoubleComplex*)dB, int(lddb),
++ (hipblasDoubleComplex*)dB, int(lddb) ); /* C same as B; less efficient */
+ #else
+ hipblasZtrmm(
+ queue->hipblas_handle(),
+diff --git a/interface_hip/interface.cpp b/interface_hip/interface.cpp
+index 2b35b34..7c76426 100644
+--- a/interface_hip/interface.cpp
++++ b/interface_hip/interface.cpp
+@@ -209,11 +209,10 @@ magma_init()
+ else {
+ g_magma_devices[dev].memory = prop.totalGlobalMem;
+ g_magma_devices[dev].shmem_block = prop.sharedMemPerBlock;
+- #ifdef MAGMA_HAVE_CUDA
+ g_magma_devices[dev].cuda_arch = prop.major*100 + prop.minor*10;
++ #ifdef MAGMA_HAVE_CUDA
+ g_magma_devices[dev].shmem_multiproc = prop.sharedMemPerMultiprocessor;
+ #elif defined(MAGMA_HAVE_HIP)
+- g_magma_devices[dev].cuda_arch = prop.gcnArch;
+ g_magma_devices[dev].shmem_multiproc = prop.maxSharedMemoryPerMultiProcessor;
+ #endif
+
+@@ -464,7 +463,7 @@ magma_print_environment()
+ prop.name,
+ prop.clockRate / 1000.,
+ prop.totalGlobalMem / (1024.*1024.),
+- prop.gcnArch );
++ prop.gcnArchName );
+ #endif
+ }
+
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py
index 26ed916e72..e97d663fd2 100644
--- a/var/spack/repos/builtin/packages/magma/package.py
+++ b/var/spack/repos/builtin/packages/magma/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.util.environment
from spack.package import *
@@ -13,9 +14,9 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
current "Multicore+GPU" systems.
"""
- homepage = "https://icl.cs.utk.edu/magma/"
- git = "https://bitbucket.org/icl/magma"
- url = "https://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz"
+ homepage = "https://icl.utk.edu/magma/"
+ git = "https://github.com/icl-utk-edu/magma"
+ url = "https://icl.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz"
maintainers("stomov", "luszczek", "G-Ragghianti")
tags = ["e4s"]
@@ -23,6 +24,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
test_requires_compiler = True
version("master", branch="master")
+ version("2.8.0", sha256="f4e5e75350743fe57f49b615247da2cc875e5193cc90c11b43554a7c82cc4348")
version("2.7.2", sha256="729bc1a70e518a7422fe7a3a54537a4741035a77be3349f66eac5c362576d560")
version("2.7.1", sha256="d9c8711c047a38cae16efde74bee2eb3333217fd2711e1e9b8606cbbb4ae1a50")
version("2.7.0", sha256="fda1cbc4607e77cacd8feb1c0f633c5826ba200a018f647f1c5436975b39fd18")
@@ -38,6 +40,10 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
version("2.3.0", sha256="010a4a057d7aa1e57b9426bffc0958f3d06913c9151463737e289e67dd9ea608")
version("2.2.0", sha256="df5d4ace417e5bf52694eae0d91490c6bde4cde1b0da98e8d400c5c3a70d83a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enable Fortran bindings support")
variant("shared", default=True, description="Enable shared library")
variant("cuda", default=True, description="Build with CUDA")
@@ -47,6 +53,24 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cuda@8:", when="@2.5.1: +cuda") # See PR #14471
depends_on("hipblas", when="+rocm")
depends_on("hipsparse", when="+rocm")
+ # This ensures that rocm-core matches the hip package version in the case that
+ # hip is an external package.
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@2.8.0: +rocm ^hip@{ver}")
depends_on("python", when="@master", type="build")
conflicts("~cuda", when="~rocm", msg="magma: Either CUDA or HIP support must be enabled")
@@ -61,9 +85,13 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
# https://bitbucket.org/icl/magma/issues/25/error-cusparsesolveanalysisinfo_t-does-not
conflicts("^cuda@11:", when="@:2.5.3")
+ # currently not compatible with CUDA-12.6
+ # https://github.com/icl-utk-edu/magma/issues/7
+ conflicts("^cuda@12.6:", when="@:2.8.0")
+
# Many cuda_arch values are not yet recognized by MAGMA's CMakeLists.txt
for target in [10, 11, 12, 13, 21, 32, 52, 53, 61, 62, 72, 86]:
- conflicts("cuda_arch={}".format(target))
+ conflicts(f"cuda_arch={target}")
# Some cuda_arch values had support added recently
conflicts("cuda_arch=37", when="@:2.5", msg="magma: cuda_arch=37 needs a version > 2.5")
@@ -78,6 +106,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
patch("magma-2.5.0.patch", when="@2.5.0")
patch("magma-2.5.0-cmake.patch", when="@2.5.0")
patch("cmake-W.patch", when="@2.5.0:%nvhpc")
+ patch("0001-fix-magma-build-error-with-rocm-6.0.0.patch", when="@2.7.2 ^hip@6.0 + rocm")
@run_before("cmake")
def generate_gpu_config(self):
@@ -95,14 +124,14 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
gpu_target = ""
if "+cuda" in spec:
cuda_archs = spec.variants["cuda_arch"].value
- gpu_target = " ".join("sm_{0}".format(i) for i in cuda_archs)
+ gpu_target = " ".join(f"sm_{i}" for i in cuda_archs)
else:
gpu_target = spec.variants["amdgpu_target"].value
with open("make.inc", "w") as inc:
inc.write("FORT = true\n")
- inc.write("GPU_TARGET = {0}\n".format(gpu_target))
- inc.write("BACKEND = {0}\n".format(backend))
+ inc.write(f"GPU_TARGET = {gpu_target}\n")
+ inc.write(f"BACKEND = {backend}\n")
make("generate")
@@ -133,22 +162,24 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
if "+cuda" in spec:
cuda_arch = spec.variants["cuda_arch"].value
sep = "" if "@:2.2.0" in spec else "_"
- capabilities = " ".join("sm{0}{1}".format(sep, i) for i in cuda_arch)
+ capabilities = " ".join(f"sm{sep}{i}" for i in cuda_arch)
options.append(define("GPU_TARGET", capabilities))
archs = ";".join("%s" % i for i in cuda_arch)
options.append(define("CMAKE_CUDA_ARCHITECTURES", archs))
if "@2.5.0" in spec:
options.append(define("MAGMA_SPARSE", False))
- if spec.compiler.name in ["xl", "xl_r"]:
+ if spec.satisfies("%xl") or spec.satisfies("%xl_r"):
options.append(define("CMAKE_DISABLE_FIND_PACKAGE_OpenMP", True))
if "+rocm" in spec:
options.append(define("MAGMA_ENABLE_HIP", True))
options.append(define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
- # See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/322
+ # See https://github.com/ROCm/rocFFT/issues/322
if spec.satisfies("^cmake@3.21.0:3.21.2"):
options.append(define("__skip_rocmclang", True))
+ if spec.satisfies("@2.8.0:"):
+ options.append(define("ROCM_CORE", spec["rocm-core"].prefix))
else:
options.append(define("MAGMA_ENABLE_CUDA", True))
@@ -167,21 +198,40 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.test_src_dir])
+ cache_extra_test_sources(self, [self.test_src_dir])
- def test(self):
+ def test_c(self):
+ """Run C examples"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
- with working_dir(test_dir, create=False):
- pkg_config_path = "{0}/lib/pkgconfig".format(self.prefix)
+ with working_dir(test_dir):
+ pkg_config_path = self.prefix.lib.pkgconfig
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")
+ tests = [
+ ("example_sparse", "sparse solver"),
+ ("example_sparse_operator", "sparse operator"),
+ ("example_v1", "legacy v1 interface"),
+ ("example_v2", "v2 interface"),
+ ]
+
+ for test, desc in tests:
+ with test_part(self, f"test_c_{test}", purpose=f"Run {desc} example"):
+ exe = which(test)
+ exe()
+
+ make("clean")
+
+ def test_fortran(self):
+ """Run Fortran example"""
+ if "+fortran" not in self.spec:
+ raise SkipTest("Package must be installed with +fortran")
+
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
+ with working_dir(test_dir):
+ pkg_config_path = self.prefix.lib.pkgconfig
+ with spack.util.environment.set_env(PKG_CONFIG_PATH=pkg_config_path):
+ make("fortran")
+ example_f = which("example_f")
+ example_f()
make("clean")
diff --git a/var/spack/repos/builtin/packages/makedepend/package.py b/var/spack/repos/builtin/packages/makedepend/package.py
index ec6fc74c2a..5778c9eadf 100644
--- a/var/spack/repos/builtin/packages/makedepend/package.py
+++ b/var/spack/repos/builtin/packages/makedepend/package.py
@@ -9,13 +9,16 @@ from spack.package import *
class Makedepend(AutotoolsPackage, XorgPackage):
"""makedepend - create dependencies in makefiles."""
- homepage = "https://cgit.freedesktop.org/xorg/util/makedepend"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/makedepend"
xorg_mirror_path = "util/makedepend-1.0.5.tar.gz"
license("MIT-open-group")
+ version("1.0.9", sha256="bc94ffda6cd4671603a69c39dbe8f96b317707b9185b2aaa3b54b5d134b41884")
version("1.0.8", sha256="275f0d2b196bfdc740aab9f02bb48cb7a97e4dfea011a7b468ed5648d0019e54")
version("1.0.5", sha256="503903d41fb5badb73cb70d7b3740c8b30fe1cc68c504d3b6a85e6644c4e5004")
- depends_on("xproto@7.0.17:")
+ depends_on("c", type="build")
+
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/makedepf90/package.py b/var/spack/repos/builtin/packages/makedepf90/package.py
new file mode 100644
index 0000000000..79ad93eb98
--- /dev/null
+++ b/var/spack/repos/builtin/packages/makedepf90/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Makedepf90(AutotoolsPackage):
+ """Makedepf90 is a program for automatic creation of Makefile-style dependency lists for
+ Fortran source code."""
+
+ homepage = "https://salsa.debian.org/science-team/makedepf90"
+ url = "https://deb.debian.org/debian/pool/main/m/makedepf90/makedepf90_3.0.1.orig.tar.xz"
+
+ maintainers("tukss")
+
+ license("GPL-2.0-only", checked_by="tukss")
+
+ version("3.0.1", sha256="a11601ea14ad793f23fca9c7e7df694b6337f962ccc930d995d72e172edf29ee")
+
+ depends_on("c", type="build")
+ depends_on("flex", type="build")
+ depends_on("bison", type="build")
diff --git a/var/spack/repos/builtin/packages/mallocmc/package.py b/var/spack/repos/builtin/packages/mallocmc/package.py
index a9b0fbb2a8..7666b55e8a 100644
--- a/var/spack/repos/builtin/packages/mallocmc/package.py
+++ b/var/spack/repos/builtin/packages/mallocmc/package.py
@@ -35,6 +35,8 @@ class Mallocmc(CMakePackage):
version("2.0.0crp", sha256="1a6b5b4f9a890d4389703cb853868cc31a97457bfea3b62d6b3ae31e56d7bbd9")
version("1.0.2crp", sha256="696c5bb7e90a75937a2479c40e7cfddcc876f8fc634dca04b61d132ab1243f12")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.12.2:", type="build")
depends_on("boost@1.48.0:", type="link")
diff --git a/var/spack/repos/builtin/packages/maloc/package.py b/var/spack/repos/builtin/packages/maloc/package.py
index 19e94e98fa..f7149aa434 100644
--- a/var/spack/repos/builtin/packages/maloc/package.py
+++ b/var/spack/repos/builtin/packages/maloc/package.py
@@ -23,6 +23,9 @@ class Maloc(AutotoolsPackage):
version("1.1", sha256="b5dd7923e84f13e7ed43304ed1062de24171c5a7a042a12b0d1e501d6eaedf58")
version("1.0", sha256="23f3ea3215067fd8f1ba4c407375f387b5f1d11258f29508295e651828d32cb7")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("doc", default=False, description="Build documentation.")
depends_on("graphviz", type="build", when="+doc")
diff --git a/var/spack/repos/builtin/packages/malt/package.py b/var/spack/repos/builtin/packages/malt/package.py
index b2d1ba4c95..0532d6ded4 100644
--- a/var/spack/repos/builtin/packages/malt/package.py
+++ b/var/spack/repos/builtin/packages/malt/package.py
@@ -15,14 +15,22 @@ class Malt(CMakePackage):
# Project infos
homepage = "https://memtt.github.io/malt"
- url = "https://github.com/memtt/malt/archive/v1.2.2.tar.gz"
+ url = "https://github.com/memtt/malt/releases/download/v1.2.4/malt-1.2.4.tar.bz2"
maintainers("svalat")
license("CECILL-C")
# Versions
- version("1.2.2", sha256="e19f49ad97bf2deedf0557eb00267f4dcf1c932c494dd07ada07fcdf5421935f")
- version("1.2.1", sha256="0e4c0743561f9fcc04dc83457386167a9851fc9289765f8b4f9390384ae3618a")
+ version("1.2.4", sha256="47068fe981b4cbbfe30eeff37767d9057992f8515106d7809ce090d3390a712f")
+ version("1.2.3", sha256="edba5d9e6a11308f82b9c8b61871e47a8ae18493bf8bff7b6ff4f4a4369428de")
+ version("1.2.2", sha256="543cace664203fd9eb6b7d4945c573a3e507a43da105b5dc7ac03c78e9bb1a10")
+ version(
+ "1.2.1",
+ sha256="0e4c0743561f9fcc04dc83457386167a9851fc9289765f8b4f9390384ae3618a",
+ url="https://github.com/memtt/malt/archive/v1.2.1.tar.gz",
+ )
+
+ depends_on("cxx", type="build")
# Variants
variant(
diff --git a/var/spack/repos/builtin/packages/man-db/package.py b/var/spack/repos/builtin/packages/man-db/package.py
index 836c0c2a27..1139f51822 100644
--- a/var/spack/repos/builtin/packages/man-db/package.py
+++ b/var/spack/repos/builtin/packages/man-db/package.py
@@ -18,11 +18,15 @@ class ManDb(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("2.12.1", sha256="ddee249daeb78cf92bab794ccd069cc8b575992265ea20e239e887156e880265")
+ version("2.12.0", sha256="415a6284a22764ad22ff0f66710d853be7790dd451cd71436e3d25c74d996a95")
version("2.11.2", sha256="cffa1ee4e974be78646c46508e6dd2f37e7c589aaab2938cc1064f058fef9f8d")
version("2.10.2", sha256="ee97954d492a13731903c9d0727b9b01e5089edbd695f0cdb58d405a5af5514d")
version("2.10.1", sha256="2ffd8f2e80122fe72e60c740c851e6a3e15c9a7921185eb4752c1c672824bed6")
version("2.7.6.1", sha256="08edbc52f24aca3eebac429b5444efd48b9b90b9b84ca0ed5507e5c13ed10f3f")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("gettext")
depends_on("libpipeline@1.5.0:", when="@2.8.0:")
diff --git a/var/spack/repos/builtin/packages/mapl/package.py b/var/spack/repos/builtin/packages/mapl/package.py
index da0a2a021e..831fcb6750 100644
--- a/var/spack/repos/builtin/packages/mapl/package.py
+++ b/var/spack/repos/builtin/packages/mapl/package.py
@@ -5,6 +5,7 @@
import subprocess
+import spack.compiler
from spack.package import *
@@ -38,11 +39,41 @@ class Mapl(CMakePackage):
version("develop", branch="develop")
version("main", branch="main")
+ version("2.50.2", sha256="1c72f8598cf01bab6ef30c1f461444ba5a13f55c61164b7b3c15efb0cd1096c0")
+ version("2.50.1", sha256="26dd7a3ec82d484d60a559bb90a20ad9a2a717af52c25b6a752dd971aeeb5075")
+ version("2.50.0", sha256="12282e547936f667f85c95d466273dcbaccbd600add72fa5981c0c734ccb1f7d")
+ version("2.49.1", sha256="975e349c7ff8be65d4e63f2a6adf74ca96127628505dbce16c7ba7a3901edc70")
+ version("2.49.0", sha256="fdf4d48bd38abd1059180b123c5d9fdc2781992c783244ddc51ab0f2ef63dd67")
+ version("2.48.0", sha256="60a0fc4fd82b1a05050666ae478da7d79d86305aff1643a57bc09cb5347323b7")
+ version("2.47.1.2", sha256="ae9032b4c833887b9ddc932ea9eb7e59e713829f6c39f3152fee4caf2f3ba21f")
+ version("2.47.1.1", sha256="9553e91e0325dfe57856564e9970b3871069f902fb109fcced6ad87151f95be7")
+ version("2.47.2", sha256="d4ca384bf249b755454cd486a26bae76944a7cae3a706b9a7c9298825077cac0")
+ version("2.47.1", sha256="ca3e94c0caa78a91591fe63603d1836196f5294d4baad7cf1d83b229b3a85916")
+ version("2.47.0", sha256="66c862d2ab8bcd6969e9728091dbca54f1f420e97e41424c4ba93ef606088459")
+ version("2.46.4", sha256="f0c169254727d61bfc83beb3abd14f2562480c4cdbd2ad5bc1fe0419828a0ac2")
+ version("2.46.3", sha256="333e1382ab744302d28b6f39e7f5504c7919d77d2443d70af952f60cbd8f27e7")
+ version("2.46.2", sha256="6d397ad73042355967de8ef5b521d6135c004f96e93ae7b215f9ee325e75c6f0")
+ version("2.46.1", sha256="f3090281de6293b484259d58f852c45b98759de8291d36a4950e6d348ece6573")
+ version("2.46.0", sha256="726d9588b724bd43e5085d1a2f8d806d548f185ed6b22a1b13c0ed06212d7be2")
+ # NOTE: Due to issues with CMake and ESMF, versions 2.44 and 2.45 of MAPL were not
+ # correctly installable with spack. The versions are still available in the
+ # repository, but we are skipping them in spack. There are references to these
+ # versions below in case a 2.44 or 2.45 spack-compatible version is needed
+ # and changes backported.
+ version("2.43.2", sha256="966130931153a9a3974ad6ae011d1df194e057cb82301c8703ef69669b9f27ba")
+ version("2.43.1", sha256="62b7a8c438c960e47b83d9835cb37c7ce25f617d648f2affe9961b4a6e638abc")
+ version("2.43.0", sha256="1be99d64ca46001ac94f7db3607c345e144976dc34fe184e734e212bf3955d01")
+ version("2.42.4", sha256="f6b643cc45f2dc55df96a316c84d84ace341bb6e06f81f83b5de258d9978b3d4")
+ version("2.42.3", sha256="4ccac684dcbbca36cd7b30cb1515b52f05d7c06ca93399e60ccf42726d147018")
+ version("2.42.2", sha256="cc70be57942a3d7f7a53d4762cb972cebcb9ae1737be7e03f195e4d4eefbc68a")
+ version("2.42.1", sha256="78fdcc17f99f525feded05fc360f5b76e6f2c07057e0b16ce3177da2a534dc33")
version("2.42.0", sha256="9b6c3434919c14ef79004db5f76cb3dd8ef375584227101c230a372bb0470fdd")
version("2.41.2", sha256="73e1f0961f1b70e8159c0a2ce3499eb5158f3ca6d081f4c7826af7854ebfb44d")
version("2.41.1", sha256="2b384bd4fbaac1bff4ef009922c436c4ab54832172a5cd4d312ea44e32c1ae7c")
version("2.41.0", sha256="1142f9395e161174e3ec1654fba8bda1d0bd93edc7438b1927d8f5d7b42a0a86")
+ version("2.40.5", sha256="85b4a4ac0d843398452808b88d7a5c29435aa37b69b91a1f4bee664e9f367b7d")
version("2.40.4", sha256="fb843b118d6e56cd4fc4b114c4d6f91956d5c8b3d9389ada56da1dfdbc58904f")
+ version("2.40.3.1", sha256="1e5a9d6a84d23febe826b1adcd2c2b1681bcc2e61c2959a8bbf4756357e22187")
version("2.40.3", sha256="4b82a314c88a035fc2b91395750aa7950d6bee838786178ed16a3f39a1e45519")
version("2.40.2", sha256="7327f6f5bce6e09e7f7b930013fba86ee7cbfe8ed4c7c087fc9ab5acbf6640fd")
version("2.40.1", sha256="6f40f946fabea6ba73b0764092e495505d220455b191b4e454736a0a25ee058c")
@@ -121,19 +152,46 @@ class Mapl(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
# Versions later than 3.14 remove FindESMF.cmake
# from ESMA_CMake.
resource(
name="esma_cmake",
git="https://github.com/GEOS-ESM/ESMA_cmake.git",
+ tag="v3.51.0",
+ when="@2.48:",
+ )
+ resource(
+ name="esma_cmake",
+ git="https://github.com/GEOS-ESM/ESMA_cmake.git",
+ tag="v3.46.0",
+ when="@2.47",
+ )
+ resource(
+ name="esma_cmake",
+ git="https://github.com/GEOS-ESM/ESMA_cmake.git",
+ tag="v3.45.2",
+ when="@2.45:2.46",
+ )
+ resource(
+ name="esma_cmake",
+ git="https://github.com/GEOS-ESM/ESMA_cmake.git",
+ tag="v3.40.0",
+ when="@2.44",
+ )
+ resource(
+ name="esma_cmake",
+ git="https://github.com/GEOS-ESM/ESMA_cmake.git",
tag="v3.36.0",
- when="@2.42.0:",
+ when="@2.42.0:2.43",
)
resource(
name="esma_cmake",
git="https://github.com/GEOS-ESM/ESMA_cmake.git",
tag="v3.31.0",
- when="@2.40.0:",
+ when="@2.40.0:2.41",
)
resource(
name="esma_cmake",
@@ -178,6 +236,10 @@ class Mapl(CMakePackage):
conflicts("mpich@:3")
conflicts("mpich@4", when="@:2.41")
+ # MAPL only supports gcc 13 from MAPL 2.45 onwards, so we only allow
+ # builds with gcc 13 from that version onwards
+ conflicts("%gcc@13:", when="@:2.44")
+
variant("flap", default=False, description="Build with FLAP support", when="@:2.39")
variant("pflogger", default=True, description="Build with pFlogger support")
variant("fargparse", default=True, description="Build with fArgParse support")
@@ -186,6 +248,7 @@ class Mapl(CMakePackage):
variant("extdata2g", default=True, description="Use ExtData2G")
variant("pfunit", default=False, description="Build with pFUnit support")
variant("f2py", default=False, description="Build with f2py support")
+ variant("zstd", default=True, description="Build with ZSTD support", when="@2.49:")
variant(
"build_type",
@@ -194,45 +257,77 @@ class Mapl(CMakePackage):
values=("Debug", "Release", "Aggressive"),
)
- depends_on("cmake@3.17:", type="build")
+ # https://github.com/JCSDA/spack-stack/issues/769
+ conflicts("+pflogger", when="@:2.40.3 %intel@2021.7:")
+ conflicts("+extdata2g", when="@:2.40.3 %intel@2021.7:")
+
+ depends_on("cmake@3.23:", type="build", when="@2.50:")
+ depends_on("cmake@3.17:", type="build", when="@:2.49")
depends_on("mpi")
depends_on("hdf5")
depends_on("netcdf-c")
+ depends_on("netcdf-c +zstd", when="+zstd")
depends_on("netcdf-fortran")
- depends_on("esmf@8.5:", when="@2.40:")
+
+ # ESMF dependency
+ depends_on("esmf@8.6.1:", when="@2.45:")
+ depends_on("esmf@8.6.1:", when="@=2.40.3.1")
+ depends_on("esmf@8.6.0", when="@2.44")
+ depends_on("esmf@8.5:", when="@2.40:2.43")
depends_on("esmf@8.4", when="@2.34:2.39")
depends_on("esmf@8.3", when="@2.22:2.33")
depends_on("esmf", when="@:2.12.99")
depends_on("esmf~debug", when="~debug")
depends_on("esmf+debug", when="+debug")
- depends_on("gftl@1.10.0:", when="@2.40:")
+ # udunits dependency from MAPL 2.48 onwards
+ depends_on("udunits", when="@2.48:")
+
+ # gFTL dependency
+ depends_on("gftl@1.14.0:", when="@2.48:")
+ depends_on("gftl@1.13.0:", when="@2.45:2.47")
+ depends_on("gftl@1.11.0:", when="@2.44")
+ depends_on("gftl@1.10.0:", when="@2.40:2.43")
depends_on("gftl@1.5.5:1.9", when="@:2.39")
- # There was an interface change in gftl-shared, so we need to control versions
- # MAPL 2.39 and older can use up to 1.6.0 but MAPL 2.40+ needs 1.6.1 or higher
- depends_on("gftl-shared@1.6.1:", when="@2.40:")
+ # gFTL-Shared dependency
+ depends_on("gftl-shared@1.9.0:", when="@2.48:")
+ depends_on("gftl-shared@1.8.0:", when="@2.45:2.47")
+ depends_on("gftl-shared@1.7.0:", when="@2.44")
+ depends_on("gftl-shared@1.6.1:", when="@2.40:2.43")
depends_on("gftl-shared@1.3.1:1.6.0", when="@:2.39")
- # There was an interface change in yaFyaml, so we need to control versions
- # MAPL 2.22 and older uses older version, MAPL 2.23+ and higher uses newer
- # Note that MAPL 2.40+ no longer require yafyaml as we get yaml support
- # via esmf 8.5.0
- depends_on("yafyaml@1.0-beta5", when="@:2.22+extdata2g")
+ # yafyaml dependency
+ # Note that MAPL 2.40+ no longer directly requires yafyaml as
+ # extdata2g gets yaml support via esmf 8.5.0, but pflogger will
+ # bring in yafyaml as a dependency.
depends_on("yafyaml@1.0.4:", when="@2.23:2.39+extdata2g")
+ depends_on("yafyaml@1.0-beta5", when="@:2.22+extdata2g")
- # pFlogger depends on yaFyaml in the same way. MAPL 2.22 and below uses old
- # yaFyaml so we need to use old pFlogger, but MAPL 2.23+ uses new yaFyaml
- depends_on("pflogger@:1.6 +mpi", when="@:2.22+pflogger")
+ # pflogger dependency
+ depends_on("pflogger@1.15.0: +mpi", when="@2.48:+pflogger")
+ depends_on("pflogger@1.14.0: +mpi", when="@2.45:2.47+pflogger")
+ depends_on("pflogger@1.11.0: +mpi", when="@2.44+pflogger")
+ depends_on("pflogger@1.9.5: +mpi", when="@2.40:2.43+pflogger")
depends_on("pflogger@1.9.1: +mpi", when="@2.23:2.39+pflogger")
- depends_on("pflogger@1.9.5: +mpi", when="@2.40:+pflogger")
+ depends_on("pflogger@:1.6 +mpi", when="@:2.22+pflogger")
- # fArgParse v1.4.1 is the first usable version with MAPL
- # we now require 1.5.0 with MAPL 2.40+
- depends_on("fargparse@1.5.0:", when="@2.40:+fargparse")
+ # fargparse dependency
+ depends_on("fargparse@1.8.0:", when="@2.48:+fargparse")
+ depends_on("fargparse@1.7.0:", when="@2.45:2.47+fargparse")
+ depends_on("fargparse@1.6.0:", when="@2.44+fargparse")
+ depends_on("fargparse@1.5.0:", when="@2.40:43+fargparse")
depends_on("fargparse@1.4.1:1.4", when="@:2.39+fargparse")
- depends_on("pfunit@4.2: +mpi +fhamcrest", when="+pfunit")
+ # pfunit dependency
+ depends_on("pfunit@4.10: +mpi +fhamcrest", when="@2.48:+pfunit")
+ depends_on("pfunit@4.9: +mpi +fhamcrest", when="@2.45:2.47+pfunit")
+ depends_on("pfunit@4.8: +mpi +fhamcrest", when="@2.44+pfunit")
+ depends_on("pfunit@4.7.3: +mpi +fhamcrest", when="@2.40:+pfunit")
+ depends_on("pfunit@4.6.1: +mpi +fhamcrest", when="@2.32:+pfunit")
+ depends_on("pfunit@4.4.1: +mpi +fhamcrest", when="@2.26:+pfunit")
+ depends_on("pfunit@4.2: +mpi +fhamcrest", when="@:2.25+pfunit")
+
depends_on("flap", when="+flap")
depends_on("ecbuild", type="build")
@@ -241,19 +336,23 @@ class Mapl(CMakePackage):
depends_on("py-numpy", when="+f2py")
depends_on("perl")
+ # when using apple-clang version 15.x or newer, need to use the llvm-openmp library
+ depends_on("llvm-openmp", when="%apple-clang@15:", type=("build", "run"))
+
def cmake_args(self):
args = [
- self.define_from_variant("BUILD_WITH_FLAP", "flap"),
self.define_from_variant("BUILD_WITH_PFLOGGER", "pflogger"),
self.define_from_variant("BUILD_WITH_FARGPARSE", "fargparse"),
self.define_from_variant("BUILD_SHARED_MAPL", "shared"),
self.define_from_variant("USE_EXTDATA2G", "extdata2g"),
self.define_from_variant("USE_F2PY", "f2py"),
- "-DCMAKE_C_COMPILER=%s" % self.spec["mpi"].mpicc,
- "-DCMAKE_CXX_COMPILER=%s" % self.spec["mpi"].mpicxx,
- "-DCMAKE_Fortran_COMPILER=%s" % self.spec["mpi"].mpifc,
]
+ # We only want to add BUILD_WITH_FLAP if we are @:2.39 otherwise
+ # there is a weird empty string that gets added to the CMake command
+ if self.spec.satisfies("@:2.39"):
+ args.append(self.define("BUILD_WITH_FLAP", self.spec.satisfies("+flap")))
+
if self.spec.satisfies("@2.22.0:"):
args.append(self.define("CMAKE_MODULE_PATH", self.spec["esmf"].prefix.cmake))
@@ -272,6 +371,39 @@ class Mapl(CMakePackage):
if fflags:
args.append(self.define("CMAKE_Fortran_FLAGS", " ".join(fflags)))
+ # Scripts often need to know the MPI stack used to setup the environment.
+ # Normally, we can autodetect this, but building with Spack does not
+ # seem to work. We need to pass in the MPI stack used to CMake
+ # via -DMPI_STACK on the CMake command line. We use the following
+ # names for the MPI stacks:
+ #
+ # - MPICH --> mpich
+ # - Open MPI --> openmpi
+ # - Intel MPI --> intelmpi
+ # - MVAPICH --> mvapich
+ # - HPE MPT --> mpt
+ # - Cray MPICH --> mpich
+ # - HPC-X --> openmpi
+
+ if self.spec.satisfies("^mpich"):
+ args.append(self.define("MPI_STACK", "mpich"))
+ elif self.spec.satisfies("^mvapich2"):
+ args.append(self.define("MPI_STACK", "mvapich"))
+ elif self.spec.satisfies("^openmpi"):
+ args.append(self.define("MPI_STACK", "openmpi"))
+ elif self.spec.satisfies("^intel-oneapi-mpi"):
+ args.append(self.define("MPI_STACK", "intelmpi"))
+ elif self.spec.satisfies("^mvapich"):
+ args.append(self.define("MPI_STACK", "mvapich"))
+ elif self.spec.satisfies("^mpt"):
+ args.append(self.define("MPI_STACK", "mpt"))
+ elif self.spec.satisfies("^cray-mpich"):
+ args.append(self.define("MPI_STACK", "mpich"))
+ elif self.spec.satisfies("^hpcx-mpi"):
+ args.append(self.define("MPI_STACK", "openmpi"))
+ else:
+ raise InstallError("Unsupported MPI stack")
+
return args
def patch(self):
@@ -290,3 +422,14 @@ class Mapl(CMakePackage):
# name is common and used all over the place,
# and if it is set it breaks the mapl build.
env.unset("BASEDIR")
+
+ # We can run some tests to make sure the build is working
+ # but we can only do it if the pfunit variant is enabled
+ @when("+pfunit")
+ @run_after("build")
+ @on_package_attributes(run_tests=True)
+ def check(self):
+ with working_dir(self.build_directory):
+ # The test suite contains a lot of tests. We select only those
+ # that are cheap. Note this requires MPI and 6 processes
+ ctest("--output-on-failure", "-L", "ESSENTIAL")
diff --git a/var/spack/repos/builtin/packages/mapnik/package.py b/var/spack/repos/builtin/packages/mapnik/package.py
index ba8622595c..a5d35ecb6f 100644
--- a/var/spack/repos/builtin/packages/mapnik/package.py
+++ b/var/spack/repos/builtin/packages/mapnik/package.py
@@ -19,6 +19,8 @@ class Mapnik(AutotoolsPackage):
version("3.0.23", sha256="4b1352e01f7ce25ab099e586d7ae98e0b74145a3bf94dd365cb0a2bdab3b9dc2")
version("3.0.22", sha256="930612ad9e604b6a29b9cea1bc1de85cf7cf2b2b8211f57ec8b6b94463128ab9")
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type=("build", "run"))
depends_on(
"boost@:1.72.0 +regex+filesystem+system+icu+program_options cxxstd=11", when="@3.0.23"
diff --git a/var/spack/repos/builtin/packages/mapserver/package.py b/var/spack/repos/builtin/packages/mapserver/package.py
index e26951531e..66830e8a26 100644
--- a/var/spack/repos/builtin/packages/mapserver/package.py
+++ b/var/spack/repos/builtin/packages/mapserver/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
@@ -22,6 +20,9 @@ class Mapserver(CMakePackage):
version("8.0.1", sha256="79d23595ef95d61d3d728ae5e60850a3dbfbf58a46953b4fdc8e6e0ffe5748ba")
version("7.2.1", sha256="9459a7057d5a85be66a41096a5d804f74665381186c37077c94b56e784db6102")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Enable Python mapscript support")
variant(
"curl",
@@ -60,9 +61,7 @@ class Mapserver(CMakePackage):
# prefix. This hack patches the CMakeLists.txt for the Python
# bindings and hard-wires in the right destination. A bit ugly,
# sorry, but I don't speak cmake.
- pyversiondir = "python{0}".format(self.spec["python"].version.up_to(2))
- sitepackages = os.path.join(self.spec.prefix.lib, pyversiondir, "site-packages")
- filter_file(r"\${PYTHON_SITE_PACKAGES}", sitepackages, "mapscript/python/CMakeLists.txt")
+ filter_file(r"\${PYTHON_SITE_PACKAGES}", python_platlib, "mapscript/python/CMakeLists.txt")
def cmake_args(self):
args = []
diff --git a/var/spack/repos/builtin/packages/maq/package.py b/var/spack/repos/builtin/packages/maq/package.py
index 3c6dee69c3..e00336542f 100644
--- a/var/spack/repos/builtin/packages/maq/package.py
+++ b/var/spack/repos/builtin/packages/maq/package.py
@@ -10,7 +10,7 @@ class Maq(AutotoolsPackage):
"""Maq is a software that builds mapping assemblies from short reads
generated by the next-generation sequencing machines."""
- homepage = "http://maq.sourceforge.net/"
+ homepage = "https://maq.sourceforge.net/"
url = "https://downloads.sourceforge.net/project/maq/maq/0.7.1/maq-0.7.1.tar.bz2"
list_url = "https://sourceforge.net/projects/maq/files/maq/"
maintainers("snehring")
@@ -20,6 +20,9 @@ class Maq(AutotoolsPackage):
version("0.7.1", sha256="e1671e0408b0895f5ab943839ee8f28747cf5f55dc64032c7469b133202b6de2")
version("0.5.0", sha256="c292c19baf291b2415b460d687d43a71ece00a7d178cc5984bc8fc30cfce2dfb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type="run")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/margo/package.py b/var/spack/repos/builtin/packages/margo/package.py
deleted file mode 100644
index 2412849e50..0000000000
--- a/var/spack/repos/builtin/packages/margo/package.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class Margo(AutotoolsPackage):
- """A library that provides Argobots bindings to the Mercury RPC
- implementation. This name will be deprecated soon; please use the
- mochi-margo package instead."""
-
- homepage = "https://github.com/mochi-hpc/mochi-margo"
- git = "https://github.com/mochi-hpc/mochi-margo.git"
- url = "https://github.com/mochi-hpc/mochi-margo/archive/v0.9.tar.gz"
-
- maintainers("carns", "mdorier", "fbudin69500")
-
- version("master", branch="master", deprecated=True)
- version(
- "0.9.1",
- sha256="3fe933f2d758ef23d582bc776e4f8cfae9bf9d0849b8b1f9d73ee024e218f2bc",
- deprecated=True,
- )
- version(
- "0.9",
- sha256="a24376f66450cc8fd7a43043e189f8efce5a931585e53c1e2e41894a3e99b517",
- deprecated=True,
- )
- version(
- "0.7",
- sha256="492d1afe2e7984fa638614a5d34486d2ff761f5599b5984efd5ae3f55cafde54",
- deprecated=True,
- )
- version(
- "0.7.2",
- sha256="0ca796abdb82084813a5de033d92364910b5ad1a0df135534d6b1c36ef627859",
- deprecated=True,
- )
- version(
- "0.7.1",
- sha256="eebbe02c47ed4c65ef1d4f23ffdc6a8aa2e2348ca6c51bfc3c4dfbf78fbfc30b",
- deprecated=True,
- )
- version(
- "0.6",
- sha256="56feb718da2b155d7277a7b10b669516ebffaa034f811f3665ceed7ad0f19d1b",
- deprecated=True,
- )
- version(
- "0.6.4",
- sha256="5ba1c72ee05aa9738d3dc4d6d01bd59790284c6c77b909c5d7756fe7049d6177",
- deprecated=True,
- )
- version(
- "0.6.3",
- sha256="5f373cd554edd15cead58bd5d30093bd88d45039d06ff7738eb18b3674287c76",
- deprecated=True,
- )
- version(
- "0.6.2",
- sha256="c6a6909439e1d3ba1a1693d8da66057eb7e4ec4b239c04bc7f19fc487c4c58da",
- deprecated=True,
- )
- version(
- "0.6.1",
- sha256="80d8d15d0917b5522c31dc2d83136de2313d50ca05c71c5e5ad83c483a3214b7",
- deprecated=True,
- )
- version(
- "0.5",
- sha256="d3b768b8300bc2cb87964e74c39b4e8eb9822d8a2e56fc93dc475ddcb1a868e3",
- deprecated=True,
- )
- version(
- "0.5.2",
- sha256="73be3acaf012a85a91ac62824c93f5ee1ea0ffe4c25779ece19723f4baf9547d",
- deprecated=True,
- )
- version(
- "0.5.1",
- sha256="6fdf58e189538e22341c8361ab069fc80fe5460a6869882359b295a890febad7",
- deprecated=True,
- )
- version(
- "0.4.7",
- sha256="596d83b11fb2bd9950fd99c9ab12c14915ab2cda233084ae40ecae1e6c584333",
- deprecated=True,
- )
- version(
- "0.4.6",
- sha256="b27447a2050ae61091bae3ff6b4d23a56153947f18847face9f98facbdb4e329",
- deprecated=True,
- )
- version(
- "0.4.5",
- sha256="b0d02f73edf180f2393f54c5a980620b8d6dcd42b90efdea6866861824fa49cf",
- deprecated=True,
- )
- version(
- "0.4.4",
- sha256="2e2e6e2a8a7d7385e2fe204c113cb149f30847f0b1f48ec8dd708a74280bd89e",
- deprecated=True,
- )
- version(
- "0.4.3",
- sha256="61a634d6983bee2ffa06e1e2da4c541cb8f56ddd9dd9f8e04e8044fb38657475",
- deprecated=True,
- )
- version(
- "0.4.2",
- sha256="91085e28f50e373b9616e1ae5c3c8d40a19a7d3776259592d8f361766890bcaa",
- deprecated=True,
- )
-
- depends_on("json-c", when="@0.9:")
- depends_on("autoconf@2.65:", type=("build"))
- depends_on("m4", type=("build"))
- depends_on("automake", type=("build"))
- depends_on("libtool", type=("build"))
- depends_on("pkgconfig", type=("build"))
- depends_on("argobots@1.0:")
- # "breadcrumb" support not available in mercury-1.0
- depends_on("mercury@1.0.0:", type=("build", "link", "run"), when="@:0.5.1")
- depends_on("mercury@2.0.0:", type=("build", "link", "run"), when="@0.5.2:")
-
- # dependencies for develop version
- depends_on("mercury@master", type=("build", "link", "run"), when="@develop")
-
- def autoreconf(self, spec, prefix):
- sh = which("sh")
- sh("./prepare.sh")
diff --git a/var/spack/repos/builtin/packages/mariadb-c-client/package.py b/var/spack/repos/builtin/packages/mariadb-c-client/package.py
index 57db5bc17f..15ca777da0 100644
--- a/var/spack/repos/builtin/packages/mariadb-c-client/package.py
+++ b/var/spack/repos/builtin/packages/mariadb-c-client/package.py
@@ -24,6 +24,7 @@ class MariadbCClient(CMakePackage):
license("LGPL-2.1-or-later")
+ version("3.3.8", sha256="f9f076b4aa9fb22cc94b24f82c80f9ef063805ecd6533a2eb5d5060cf93833e8")
version("3.3.7", sha256="975a9a862fed80f84e0206373f7ef05537aada5b65d99b71b36ab892b44240bf")
version("3.3.5", sha256="ca72eb26f6db2befa77e48ff966f71bcd3cb44b33bd8bbb810b65e6d011c1e5c")
version("3.3.4", sha256="486e5fdf976a8e7fadf583ae912128655e013ac575fa79b2d1af0fb8827a78ed")
@@ -59,6 +60,9 @@ class MariadbCClient(CMakePackage):
version("2.2.0", sha256="3825b068d38bc19d6ad1eaecdd74bcd49d6ddd9d00559fb150e4e851a55bbbd4")
version("2.1.0", sha256="568050b89463af7610d458669fd9eee06dcc9405689aca8a526ac8c013b59167")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
provides("mariadb-client")
provides("mysql-client")
diff --git a/var/spack/repos/builtin/packages/mariadb/package.py b/var/spack/repos/builtin/packages/mariadb/package.py
index d1392fe893..5585600b9d 100644
--- a/var/spack/repos/builtin/packages/mariadb/package.py
+++ b/var/spack/repos/builtin/packages/mariadb/package.py
@@ -23,6 +23,9 @@ class Mariadb(CMakePackage):
license("GPL-2.0-or-later")
+ version("11.3.2", sha256="5570778f0a2c27af726c751cda1a943f3f8de96d11d107791be5b44a0ce3fb5c")
+ version("10.9.6", sha256="fe6f5287fccc6a65b8bbccae09e841e05dc076fcc13017078854ca387eab8ae9")
+ version("10.8.8", sha256="8de1a151842976a492d6331b543d0ed87259febbbc03b9ebce07c80d754d6361")
version("10.8.2", sha256="14e0f7f8817a41bbcb5ebdd2345a9bd44035fde7db45c028b6d4c35887ae956c")
version("10.4.12", sha256="fef1e1d38aa253dd8a51006bd15aad184912fce31c446bb69434fcde735aa208")
version("10.4.8", sha256="10cc2c3bdb76733c9c6fd1e3c6c860d8b4282c85926da7d472d2a0e00fffca9b")
@@ -33,6 +36,9 @@ class Mariadb(CMakePackage):
version("10.1.14", sha256="18e71974a059a268a3f28281599607344d548714ade823d575576121f76ada13")
version("5.5.49", sha256="2c82f2af71b88a7940d5ff647498ed78922c92e88004942caa213131e20f4706")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"nonblocking",
default=True,
@@ -65,6 +71,7 @@ class Mariadb(CMakePackage):
depends_on("krb5")
conflicts("%gcc@9.1.0:", when="@:5.5")
+ conflicts("%gcc@13:", when="@:10.8.7") # https://github.com/spack/spack/issues/41377
# patch needed for cmake-3.20
patch(
diff --git a/var/spack/repos/builtin/packages/masa/package.py b/var/spack/repos/builtin/packages/masa/package.py
index b14b700bc9..c7086a54a1 100644
--- a/var/spack/repos/builtin/packages/masa/package.py
+++ b/var/spack/repos/builtin/packages/masa/package.py
@@ -19,16 +19,27 @@ class Masa(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("master", branch="master")
+ version("0.51.0", tag="0.51.0")
+ version("0.50.0", tag="0.50.0")
+ version("0.44.0", tag="0.44.0")
+ version("0.43.1", tag="0.43.1")
+ version("0.43.0", tag="0.43.0")
+ version("0.42.0", tag="0.42.0")
- variant("fortran", default=True, description="Compile with Fortran interfaces")
- variant("python", default=True, description="Compile with Python interfaces")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+ variant("fortran", default=False, description="Compile with Fortran interfaces")
+ variant("python", default=False, description="Compile with Python interfaces")
+
+ depends_on("gettext")
+ depends_on("metaphysicl")
+ depends_on("python")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
- depends_on("swig", type="build")
- depends_on("python", when="+python")
- depends_on("metaphysicl")
+ depends_on("swig", type="build", when="+python")
def configure_args(self):
options = []
diff --git a/var/spack/repos/builtin/packages/mash/package.py b/var/spack/repos/builtin/packages/mash/package.py
index 8a33d72816..bcf554bbc1 100644
--- a/var/spack/repos/builtin/packages/mash/package.py
+++ b/var/spack/repos/builtin/packages/mash/package.py
@@ -18,6 +18,9 @@ class Mash(AutotoolsPackage):
version("2.3", sha256="f96cf7305e010012c3debed966ac83ceecac0351dbbfeaa6cd7ad7f068d87fe1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("gcc-11.patch", when="%gcc@11:")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/masurca/package.py b/var/spack/repos/builtin/packages/masurca/package.py
index a81f957b53..24d894e29a 100644
--- a/var/spack/repos/builtin/packages/masurca/package.py
+++ b/var/spack/repos/builtin/packages/masurca/package.py
@@ -12,11 +12,12 @@ class Masurca(Package):
of the de Bruijn graph and Overlap-Layout-Consensus (OLC)
approaches."""
- homepage = "http://www.genome.umd.edu/masurca.html"
+ homepage = "https://www.genome.umd.edu/masurca.html"
url = "https://github.com/alekseyzimin/masurca/releases/download/v3.3.1/MaSuRCA-3.3.1.tar.gz"
license("GPL-3.0-only")
+ version("4.1.1", sha256="8758f6196bf7f57e24e08bda84abddfff08feb4cea204c0eb5e1cb9fe8198573")
version("4.1.0", sha256="15078e24c79fe5aabe42748d64f95d15f3fbd7708e84d88fc07c4b7f2e4b0902")
version("4.0.9", sha256="a31c2f786452f207c0b0b20e646b6c85b7357dcfd522b697c1009d902d3ed4cf")
version("4.0.5", sha256="db525c26f2b09d6b359a2830fcbd4a3fdc65068e9a116c91076240fd1f5924ed")
@@ -24,6 +25,9 @@ class Masurca(Package):
version("3.3.1", sha256="587d0ee2c6b9fbd3436ca2a9001e19f251b677757fe5e88e7f94a0664231e020")
version("3.2.9", sha256="795ad4bd42e15cf3ef2e5329aa7e4f2cdeb7e186ce2e350a45127e319db2904b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on(Boost.with_default_variants)
depends_on("zlib-api")
@@ -39,11 +43,11 @@ class Masurca(Package):
filter_file("-minline-all-stringops", "", m)
def setup_build_environment(self, env):
- if "@4:" in self.spec:
+ if self.spec.satisfies("@4:"):
env.set("DEST", self.prefix)
def install(self, spec, prefix):
installer = Executable("./install.sh")
installer()
- if "@:4" in self.spec:
+ if self.spec.satisfies("@:4"):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py
index 5607fe29cd..460d700b91 100644
--- a/var/spack/repos/builtin/packages/matio/package.py
+++ b/var/spack/repos/builtin/packages/matio/package.py
@@ -15,6 +15,7 @@ class Matio(AutotoolsPackage):
license("BSD-2-Clause")
+ version("1.5.26", sha256="8b47c29f58e468dba7a5555371c6a72ad4c6aa8b15f459b2b0b65a303c063933")
version("1.5.17", sha256="5e455527d370ab297c4abe5a2ab4d599c93ac7c1a0c85d841cc5c22f8221c400")
version("1.5.16", sha256="47ba3d5d269d5709b8d9a7385c88c8b5fb5ff875ef781a1ced4892b5b03c4f44")
version("1.5.15", sha256="21bf4587bb7f0231dbb4fcc88728468f1764c06211d5a0415cd622036f09b1cf")
@@ -32,6 +33,8 @@ class Matio(AutotoolsPackage):
version("1.5.3", sha256="85ba46e192331473dc4d8a9d266679f8f81e60c06debdc4b6f9d7906bad46257")
version("1.5.2", sha256="db02d0fb3373c3d766a606309b17e64a5d8da55610e921a9f1a0ec171e911d45")
+ depends_on("c", type="build") # generated
+
variant("zlib", default=True, description="support for compressed mat files")
variant("hdf5", default=True, description="support for version 7.3 mat files via hdf5")
variant("shared", default=True, description="Enables the build of shared libraries.")
diff --git a/var/spack/repos/builtin/packages/matrix-switch/package.py b/var/spack/repos/builtin/packages/matrix-switch/package.py
new file mode 100644
index 0000000000..e29afca490
--- /dev/null
+++ b/var/spack/repos/builtin/packages/matrix-switch/package.py
@@ -0,0 +1,55 @@
+# Copyright 2013-2024 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.package import *
+
+
+class MatrixSwitch(CMakePackage):
+ """Intermediary interface between high-level routines for
+ physics-related algorithms and low-level routines dealing
+ with matrix storage and manipulation."""
+
+ homepage = "https://gitlab.com/ElectronicStructureLibrary/omm/matrixswitch"
+ url = "https://gitlab.com/ElectronicStructureLibrary/omm/matrixswitch/-/archive/1.2.1/matrixswitch-1.2.1.tar.gz"
+ git = "https://gitlab.com/ElectronicStructureLibrary/omm/matrixswitch.git"
+
+ maintainers("RMeli")
+
+ license("BSD-2-Clause", checked_by="RMeli")
+
+ version("1.2.1", sha256="a3c2bac20435a8217cd1a1abefa8b7f8c52b1c6f55a75b2861565ade5ecfe37f")
+ version("master", branch="master")
+
+ depends_on("fortran", type="build") # generated
+
+ variant("lapack", default=True, description="Build with LAPACK interface.")
+ variant("mpi", default=True, description="Build with MPI support.")
+ variant("scalapack", default=True, when="+mpi", description="Build with ScaLAPACK interface.")
+ variant("dbcsr", default=False, when="+mpi", description="Build with DBCSR interface.")
+
+ depends_on("cmake@3.22:", type="build")
+ generator("ninja")
+
+ depends_on("lapack", when="+lapack")
+ depends_on("mpi", when="+mpi")
+ depends_on("scalapack", when="+scalapack")
+ depends_on("dbcsr~shared", when="+dbcsr") # Expects static library (FindCustomDbcsr)
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("WITH_LAPACK", "lapack"),
+ self.define_from_variant("WITH_MPI", "mpi"),
+ self.define_from_variant("WITH_SCALAPACK", "scalapack"),
+ self.define_from_variant("WITH_DBCSR", "dbcsr"),
+ ]
+
+ if self.spec.satisfies("+dbcsr"):
+ args.append(self.define("DBCSR_ROOT", self.spec["dbcsr"].prefix))
+
+ return args
+
+ @property
+ def libs(self):
+ return find_libraries("libmatrixswitch", root=self.home, recursive=True, shared=False)
diff --git a/var/spack/repos/builtin/packages/maven/package.py b/var/spack/repos/builtin/packages/maven/package.py
index 348e88d521..08fc690658 100644
--- a/var/spack/repos/builtin/packages/maven/package.py
+++ b/var/spack/repos/builtin/packages/maven/package.py
@@ -13,9 +13,13 @@ class Maven(Package):
homepage = "https://maven.apache.org/index.html"
url = "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz"
+ list_url = "https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/"
+ list_depth = 1
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("3.9.8", sha256="067672629075b740e3d0a928e21021dd615a53287af36d4ccca44e87e081d102")
+ version("3.8.8", sha256="17811e108701af5985bf5167abbd47c06e92c6c6bd1c13a1a1c095c9b4ecc32a")
version("3.8.4", sha256="2cdc9c519427bb20fdc25bef5a9063b790e4abd930e7b14b4e9f4863d6f9f13c")
version("3.6.3", sha256="26ad91d751b3a9a53087aefa743f4e16a17741d3915b219cf74112bf87a438c5")
version("3.6.2", sha256="3fbc92d1961482d6fbd57fbf3dd6d27a4de70778528ee3fb44aa7d27eb32dfdc")
diff --git a/var/spack/repos/builtin/packages/maverick/package.py b/var/spack/repos/builtin/packages/maverick/package.py
index fa0df4f84a..7936a61bd3 100644
--- a/var/spack/repos/builtin/packages/maverick/package.py
+++ b/var/spack/repos/builtin/packages/maverick/package.py
@@ -15,13 +15,15 @@ class Maverick(MakefilePackage):
version("1.0.4", sha256="d4634c1b3f09cec9eb60d72348e2f479d74220ecbdebd940bb18b480db8df8cb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@:6.0")
conflicts("%cce")
conflicts("%apple-clang")
conflicts("%clang")
conflicts("%intel")
conflicts("%nag")
- conflicts("%pgi")
conflicts("%xl")
conflicts("%xl_r")
diff --git a/var/spack/repos/builtin/packages/mawk/package.py b/var/spack/repos/builtin/packages/mawk/package.py
index 614a240f33..deb5126d7c 100644
--- a/var/spack/repos/builtin/packages/mawk/package.py
+++ b/var/spack/repos/builtin/packages/mawk/package.py
@@ -15,8 +15,13 @@ class Mawk(AutotoolsPackage):
license("GPL-2.0-only")
version(
+ "1.3.4-20240123", sha256="a8e319a83744b1f1fb6988dfa189d61887f866e9140cc9a49eb003b2b0655e88"
+ )
+ version(
"1.3.4-20171017", sha256="db17115d1ed18ed1607c8b93291db9ccd4fe5e0f30d2928c3c5d127b23ec9e5b"
)
version("1.3.4", sha256="2f2ab8831c441a5793ad333193c888c9ba29c900f009aa23c9fffc100c405925")
+ depends_on("c", type="build") # generated
+
provides("awk")
diff --git a/var/spack/repos/builtin/packages/mbdyn/package.py b/var/spack/repos/builtin/packages/mbdyn/package.py
index c7276ad216..34222aab14 100644
--- a/var/spack/repos/builtin/packages/mbdyn/package.py
+++ b/var/spack/repos/builtin/packages/mbdyn/package.py
@@ -17,5 +17,9 @@ class Mbdyn(AutotoolsPackage):
version("1.7.3", sha256="3cf05cd1cb14c1af3d987aac119b6ecf0d835bc1aee06bc4cf7cc5a245c1f36d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Failed to build mbdyn with gcc@4.8.5 and gcc@9.2.0
conflicts("%gcc@:5.0,9.0:")
diff --git a/var/spack/repos/builtin/packages/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py
index 0585a2529c..2478192bc4 100644
--- a/var/spack/repos/builtin/packages/mbedtls/package.py
+++ b/var/spack/repos/builtin/packages/mbedtls/package.py
@@ -14,112 +14,35 @@ class Mbedtls(MakefilePackage):
"""
homepage = "https://tls.mbed.org"
- url = "https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.2.1.tar.gz"
+ url = "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2"
+
maintainers("haampie")
- license("Apache-2.0 OR GPL-2.0-or-later")
+ license("Apache-2.0 OR GPL-2.0-or-later", checked_by="wdconinc")
# version 3.x
- version("3.3.0", sha256="a22ff38512697b9cd8472faa2ea2d35e320657f6d268def3a64765548b81c3ec")
- version(
- "3.2.1",
- sha256="5850089672560eeaca03dc36678ee8573bb48ef6e38c94f5ce349af60c16da33",
- deprecated=True,
- )
- version(
- "3.1.0",
- sha256="64d01a3b22b91cf3a25630257f268f11bc7bfa37981ae6d397802dd4ccec4690",
- deprecated=True,
- )
- version(
- "3.0.0",
- sha256="377d376919be19f07c7e7adeeded088a525be40353f6d938a78e4f986bce2ae0",
- deprecated=True,
- )
+ version("3.6.2", sha256="8b54fb9bcf4d5a7078028e0520acddefb7900b3e66fec7f7175bb5b7d85ccdca")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-45159
+ version("3.6.1", sha256="fc8bef0991b43629b7e5319de6f34f13359011105e08e3e16eed3a9fe6ffd3a3")
+ version("3.6.0", sha256="3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38")
+ version("3.3.0", sha256="a22ff38512697b9cd8472faa2ea2d35e320657f6d268def3a64765548b81c3ec")
# version 2.x
+ version("2.28.9", sha256="e85ea97aaf78dd6c0a5ba2e54dd5932ffa15f39abfc189c26beef7684630c02b")
+ version("2.28.8", sha256="241c68402cef653e586be3ce28d57da24598eb0df13fcdea9d99bfce58717132")
version("2.28.2", sha256="1db6d4196178fa9f8264bef5940611cd9febcd5d54ec05f52f1e8400f792b5a4")
- version(
- "2.28.1",
- sha256="82ff5fda18ecbdee9053bdbeed6059c89e487f3024227131657d4c4536735ed1",
- deprecated=True,
- )
- version(
- "2.28.0",
- sha256="f644248f23cf04315cf9bb58d88c4c9471c16ca0533ecf33f86fb7749a3e5fa6",
- deprecated=True,
- )
- version(
- "2.27.0",
- sha256="4f6a43f06ded62aa20ef582436a39b65902e1126cbbe2fb17f394e9e9a552767",
- deprecated=True,
- )
+ version("2.7.19", sha256="3da12b1cebe1a25da8365d5349f67db514aefcaa75e26082d7cb2fa3ce9608aa")
+
+ # deprecated versions
+ # required by julia@1.6:1.7
version(
"2.24.0",
sha256="b5a779b5f36d5fc4cba55faa410685f89128702423ad07b36c5665441a06a5f3",
deprecated=True,
)
- version(
- "2.16.12",
- sha256="0afb4a4ce5b771f2fb86daee786362fbe48285f05b73cd205f46a224ec031783",
- deprecated=True,
- )
- version(
- "2.16.11",
- sha256="51bb9685c4f4ff9255da5659ff346b89dcaf129e3ba0f3b2b0c48a1a7495e701",
- deprecated=True,
- )
- version(
- "2.16.9",
- sha256="b7ca99ee10551b5b13242b7effebefd2a5cc38c287e5f5be1267d51ee45effe3",
- deprecated=True,
- )
- version(
- "2.16.7",
- sha256="4786b7d1676f5e4d248f3a7f2d28446876d64962634f060ff21b92c690cfbe86",
- deprecated=True,
- )
- version(
- "2.16.1",
- sha256="daf0d40f3016c34eb42d1e4b3b52be047e976d566aba8668977723c829af72f3",
- deprecated=True,
- )
- version("2.7.19", sha256="3da12b1cebe1a25da8365d5349f67db514aefcaa75e26082d7cb2fa3ce9608aa")
- version(
- "2.7.10",
- sha256="42b19b30b86a798bdb69c5da2f8bbd7d72ffede9a35b888ab986a29480f9dc3e",
- deprecated=True,
- )
- version(
- "2.3.0",
- sha256="1614ee70be99a18ca8298148308fb725aad4ad31c569438bb51655a4999b14f9",
- deprecated=True,
- )
- version(
- "2.2.1",
- sha256="32819c62c20e8740a11b49daa5d09ac6f179edf120a87ac559cd63120b66b699",
- deprecated=True,
- )
- version(
- "2.2.0",
- sha256="75494361e412444b38ebb9c908b7e17a5fb582eb9c3fadb2fe9b21e96f1bf8cb",
- deprecated=True,
- )
- version(
- "2.1.4",
- sha256="a0ee4d3dd135baf67a3cf5ad9e70d67575561704325d6c93d8f087181f4db338",
- deprecated=True,
- )
- version(
- "2.1.3",
- sha256="94da4618d5a518b99f7914a5e348be436e3571113d9a9978d130725a1fc7bfac",
- deprecated=True,
- )
- version(
- "1.3.16",
- sha256="0c2666222b66cf09c4630fa60a715aafd7decb1a09933b75c0c540b0625ac5df",
- deprecated=True,
- )
+
+ depends_on("c", type="build") # generated
variant("pic", default=False, description="Compile with position independent code.")
variant(
@@ -158,6 +81,14 @@ class Mbedtls(MakefilePackage):
# libs=shared building both shared and static libs.
# conflicts('libs=shared', msg='Makefile build cannot build shared libs only now')
+ def url_for_version(self, version):
+ if self.spec.satisfies("@:2.28.7,3:3.5"):
+ return f"https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v{version}.tar.gz"
+ if self.spec.satisfies("@2.28.8,3.6.0"):
+ return f"https://github.com/Mbed-TLS/mbedtls/releases/download/v{version}/mbedtls-{version}.tar.bz2"
+ # release tags for @2.28.9:2,3.6.1:
+ return f"https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-{version}/mbedtls-{version}.tar.bz2"
+
def flag_handler(self, name, flags):
# Compile with PIC, if requested.
if name == "cflags":
diff --git a/var/spack/repos/builtin/packages/mc/package.py b/var/spack/repos/builtin/packages/mc/package.py
index 890efee8c5..045eae0194 100644
--- a/var/spack/repos/builtin/packages/mc/package.py
+++ b/var/spack/repos/builtin/packages/mc/package.py
@@ -14,12 +14,15 @@ class Mc(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("4.8.31", sha256="f42f4114ed42f6cf9995f1d896fa6c797ccb36dac57760dda8dd9f78ac462841")
version("4.8.28", sha256="6bb47533d7a55bb21e46292d2f94786c9037bd7a70bf02b6a3c48adb0c9ce20c")
version("4.8.26", sha256="9d6358d0a351a455a1410aab57f33b6b48b0fcf31344b9a10b0ff497595979d1")
version("4.8.23", sha256="238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d")
version("4.8.21", sha256="251d9f0ef9309ef3eea0fdc4c12b8b61149e5056bef1b2de2ccc7f015d973444")
version("4.8.20", sha256="2d85daaa6ab26e524946df4823ac2f69802bc16bc967781b5e28d5b86fc3b979")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("pkgconfig", type="build")
depends_on("glib@2.14:")
@@ -33,7 +36,7 @@ class Mc(AutotoolsPackage):
def configure_args(self):
args = [
- "CFLAGS={0}".format(self.compiler.c99_flag),
+ f"CFLAGS={self.compiler.c99_flag}",
"--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
diff --git a/var/spack/repos/builtin/packages/mcl/package.py b/var/spack/repos/builtin/packages/mcl/package.py
index 8de3dcc57d..e17f5a98d5 100644
--- a/var/spack/repos/builtin/packages/mcl/package.py
+++ b/var/spack/repos/builtin/packages/mcl/package.py
@@ -18,6 +18,8 @@ class Mcl(AutotoolsPackage):
version("14-137", sha256="b5786897a8a8ca119eb355a5630806a4da72ea84243dba85b19a86f14757b497")
+ depends_on("c", type="build") # generated
+
@when("%gcc@10:")
def patch(self):
filter_file("^dim", "extern dim", "src/impala/iface.h")
diff --git a/var/spack/repos/builtin/packages/mcpp/package.py b/var/spack/repos/builtin/packages/mcpp/package.py
index bc0530cc51..f2ee6652a2 100644
--- a/var/spack/repos/builtin/packages/mcpp/package.py
+++ b/var/spack/repos/builtin/packages/mcpp/package.py
@@ -12,9 +12,14 @@ class Mcpp(AutotoolsPackage, SourceforgePackage):
homepage = "https://sourceforge.net/projects/mcpp/"
sourceforge_mirror_path = "mcpp/mcpp/V.2.7.2/mcpp-2.7.2.tar.gz"
+ git = "https://github.com/jbrandwood/mcpp.git"
+ # Versions from `git describe --tags`
+ version("2.7.2-25-g619046f", commit="619046fa0debac3f86ff173098aeb59b8f051d19")
version("2.7.2", sha256="3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864")
+ depends_on("c", type="build")
+
def configure_args(self):
config_args = ["--enable-mcpplib", "--disable-static"]
return config_args
diff --git a/var/spack/repos/builtin/packages/mct/package.py b/var/spack/repos/builtin/packages/mct/package.py
index 1f6852c551..53d1eb68ea 100644
--- a/var/spack/repos/builtin/packages/mct/package.py
+++ b/var/spack/repos/builtin/packages/mct/package.py
@@ -23,4 +23,7 @@ class Mct(AutotoolsPackage):
version("2.11.0", sha256="1b2a30bcba0081226ff1f1f5152e82afa3a2bb911215883965e669f776dcb365")
version("2.10.0", sha256="42f32e3ab8bba31d16a1c6c9533f717a9d950e42c9b03b864b3436335d4e1b71")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/mctc-lib/package.py b/var/spack/repos/builtin/packages/mctc-lib/package.py
index bcbed778e8..43eb1bd2bf 100644
--- a/var/spack/repos/builtin/packages/mctc-lib/package.py
+++ b/var/spack/repos/builtin/packages/mctc-lib/package.py
@@ -21,6 +21,8 @@ class MctcLib(MesonPackage):
version("0.3.1", sha256="a5032a0bbbbacc952037c5215b71aa6b438767a84bafb60fda25ba43c8835513")
version("0.3.0", sha256="81f3edbf322e6e28e621730a796278498b84af0f221f785c537a315312059bf0")
+ depends_on("fortran", type="build") # generated
+
variant("json", default=False, description="Enable support for JSON")
depends_on("meson@0.57.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/mcutils/package.py b/var/spack/repos/builtin/packages/mcutils/package.py
index 82526e0144..fbf48a56d3 100644
--- a/var/spack/repos/builtin/packages/mcutils/package.py
+++ b/var/spack/repos/builtin/packages/mcutils/package.py
@@ -33,6 +33,8 @@ class Mcutils(MakefilePackage):
version("1.0.1", tag="mcutils-1.0.1", commit="85bb1c9e2761a7c70bdd18955d6cccc120d9c523")
version("1.0.0", tag="mcutils-1.0.0", commit="7ae9d007493ce65f5eac432d0ea6f730512a0a8a")
+ depends_on("cxx", type="build") # generated
+
depends_on("heputils", when="@1.1.0:")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/mdb/package.py b/var/spack/repos/builtin/packages/mdb/package.py
new file mode 100644
index 0000000000..f10bf37084
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mdb/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Mdb(PythonPackage):
+ """mdb is a command line debugger aimed at parallel programs using the MPI
+ programming paradigm."""
+
+ homepage = "https://mdb.readthedocs.io/en/latest"
+ pypi = "mdb_debugger/mdb_debugger-1.0.3.tar.gz"
+
+ maintainers("tommelt")
+
+ license("MIT", checked_by="tommelt")
+
+ version("1.0.3", sha256="c45cffb320a51274519753b950b7b72cd91a8a5804941556120ed41bb8b491d8")
+
+ depends_on("python@3.10: +tkinter", type=("build", "run"))
+ depends_on("py-pip", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-click@8.1.7", type=("build", "run"))
+ depends_on("py-pexpect@4.9:", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
+ depends_on("py-matplotlib@3.8.3 backend=qt5agg", type=("build", "run"))
+ depends_on("py-pyqt5", type=("build", "run"))
+
+ depends_on("mpi", type=("run"))
+
+ variant("manpage", default=False, description="build and install manpage")
+ variant("termgraph", default=True, description="build with termgraph support")
+
+ with when("+termgraph"):
+ depends_on("py-termgraph", type=("build", "run"))
+
+ with when("+manpage"):
+ depends_on("py-sphinx", type=("build"))
+ depends_on("py-sphinx-rtd-theme", type=("build"))
+ depends_on("py-sphinx-click", type=("build"))
+
+ @run_after("install")
+ def build_docs(self):
+ if self.spec.satisfies("+manpage"):
+ make("-C", "docs", "man")
+
+ mkdirp(prefix.share.man.man1)
+ copy("docs/build/man/mdb.1", prefix.share.man.man1)
diff --git a/var/spack/repos/builtin/packages/mdspan/package.py b/var/spack/repos/builtin/packages/mdspan/package.py
index bb5be2536b..00c815e2c3 100644
--- a/var/spack/repos/builtin/packages/mdspan/package.py
+++ b/var/spack/repos/builtin/packages/mdspan/package.py
@@ -30,7 +30,7 @@ class Mdspan(CMakePackage):
if self.spec.satisfies("+tests"):
args.append("-DMDSPAN_ENABLE_TESTS=ON")
args.append("-DMDSPAN_USE_SYSTEM_GTEST=ON")
- if self.spec.satisfies("+bencmarks"):
+ if self.spec.satisfies("+benchmarks"):
args.append("-DMDSPAN_ENABLE_BENCHMARKS=ON")
if self.spec.satisfies("+examples"):
args.append("-DMDSPAN_ENABLE_EXAMPLES=ON")
diff --git a/var/spack/repos/builtin/packages/mdsplus/package.py b/var/spack/repos/builtin/packages/mdsplus/package.py
index f4dad7bc63..3f2ca7a83d 100644
--- a/var/spack/repos/builtin/packages/mdsplus/package.py
+++ b/var/spack/repos/builtin/packages/mdsplus/package.py
@@ -26,6 +26,10 @@ class Mdsplus(AutotoolsPackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("java", default=True, description="Build java libraries and applications")
variant("python", default=True, description="Install python module")
diff --git a/var/spack/repos/builtin/packages/mdtest/package.py b/var/spack/repos/builtin/packages/mdtest/package.py
index 9dc575f672..de0f92c104 100644
--- a/var/spack/repos/builtin/packages/mdtest/package.py
+++ b/var/spack/repos/builtin/packages/mdtest/package.py
@@ -16,6 +16,8 @@ class Mdtest(Package):
version("1.9.3", commit="49f3f047c254c62848c23226d6f1afa5fc3c6583")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/med/package.py b/var/spack/repos/builtin/packages/med/package.py
index 1d8aab4f53..8e22764f61 100644
--- a/var/spack/repos/builtin/packages/med/package.py
+++ b/var/spack/repos/builtin/packages/med/package.py
@@ -16,34 +16,67 @@ class Med(CMakePackage):
license("LGPL-3.0-only")
- # 4.1.0 does not compile in static mode
- version("4.1.0", sha256="847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce")
+ version(
+ "5.0.0",
+ sha256="267e76d0c67ec51c10e3199484ec1508baa8d5ed845c628adf660529dce7a3d4",
+ url="https://files.salome-platform.org/Salome/medfile/med-5.0.0.tar.bz2",
+ )
+ version(
+ "4.1.1",
+ sha256="a082b705d1aafe95d3a231d12c57f0b71df554c253e190acca8d26fc775fb1e6",
+ url="https://files.salome-platform.org/Salome/medfile/med-4.1.1.tar.gz",
+ )
+ # Older versions are no more available from the official provider
+ version(
+ "4.1.0",
+ sha256="847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce",
+ deprecated=True,
+ )
version(
"4.0.0",
sha256="a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004",
- preferred=True,
+ deprecated=True,
)
- version("3.2.0", sha256="d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138")
+ version(
+ "3.2.0",
+ sha256="d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("api23", default=True, description="Enable API2.3")
variant("mpi", default=True, description="Enable MPI")
variant("shared", default=False, description="Builds a shared version of the library")
variant("fortran", default=False, description="Enable Fortran support")
+ variant("doc", default=False, description="Install documentation")
+ variant("python", default=False, description="Build Python bindings")
+
+ depends_on("hdf5@:1.8.22", when="@3.2.0")
+ depends_on("hdf5@1.10.2:1.10.7", when="@4")
+ depends_on("hdf5@1.12.1:1.12", when="@5:")
+ depends_on("hdf5~mpi", when="~mpi")
+ depends_on("hdf5+mpi", when="+mpi")
depends_on("mpi", when="+mpi")
- depends_on("hdf5@:1.8.22+mpi", when="@3.2.0+mpi")
- depends_on("hdf5@1.10.2:1.10.7+mpi", when="@4.0.0:+mpi")
- depends_on("hdf5@:1.8.22~mpi", when="@3.2.0~mpi")
- depends_on("hdf5@1.10.2:1.10.7~mpi", when="@4.0.0:~mpi")
- # the "TARGET hdf5" patch below only works with HDF5 shared library builds
- depends_on("hdf5+shared", when="@4.0.0:4.1.99")
+
+ depends_on("doxygen", type="build", when="+doc")
+
+ depends_on("swig", type="build", when="+python")
+ depends_on("python", when="+python")
+ conflicts("~shared", when="+python", msg="Python bindings require shared libraries")
conflicts("@4.1.0", when="~shared", msg="Link error when static")
# C++11 requires a space between literal and identifier
patch("add_space.patch", when="@3.2.0")
- # fix problem where CMake "could not find TARGET hdf5"
- patch("med-4.1.0-hdf5-target.patch", when="@4.0.0:4.1.99")
+
+ # Fix problem where CMake "could not find TARGET hdf5"
+ # The patch only works with HDF5 shared library builds
+ patch("med-4.1.0-hdf5-target.patch", when="@4.0.0:4.1.0")
+ depends_on("hdf5+shared", when="@4.0.0:4.1.0")
def patch(self):
# resembles FindSalomeHDF5.patch as in salome-configuration
@@ -61,8 +94,8 @@ class Med(CMakePackage):
options = [
self.define("HDF5_ROOT_DIR", spec["hdf5"].prefix),
self.define("MEDFILE_BUILD_TESTS", self.run_tests),
- self.define("MEDFILE_BUILD_PYTHON", False),
- self.define("MEDFILE_INSTALL_DOC", False),
+ self.define_from_variant("MEDFILE_BUILD_PYTHON", "python"),
+ self.define_from_variant("MEDFILE_INSTALL_DOC", "doc"),
]
if "~fortran" in spec:
options.append("-DCMAKE_Fortran_COMPILER=")
diff --git a/var/spack/repos/builtin/packages/medipack/package.py b/var/spack/repos/builtin/packages/medipack/package.py
new file mode 100644
index 0000000000..ec07e792fb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/medipack/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Medipack(CMakePackage):
+ """MeDiPack (Message Differentiation Package) is a tool that handles the MPI communication
+ of Algorithmic Differentiation (AD) tools like CoDiPack."""
+
+ homepage = "https://github.com/SciCompKL/MeDiPack"
+ url = "https://github.com/SciCompKL/MeDiPack/archive/refs/tags/v1.2.2.tar.gz"
+
+ version("1.3.0", sha256="81daf8391ca00286a1276408badc7f1c9f76af889eb16940601c0ffb5f229e1d")
+ version("1.2.2", sha256="8937fa1025c6fb12f516cacf38a7f776221e7e818b30f17ce334c63f78513aa7")
+ version("1.2.1", sha256="c746196b98cfe24a212584cdb88bd12ebb14f4a54728070d605e0c6d0e75db8a")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.12:", type="build", when="@1.2.2:")
+ depends_on("mpi")
+
+ build_system(
+ conditional("cmake", when="@1.2.2:"),
+ conditional("generic", when="@:1.2.1"),
+ default="cmake",
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(self.prefix.include)
+ install_tree(join_path(self.stage.source_path, "include"), self.prefix.include)
+ mkdirp(self.prefix.src)
+ install_tree(join_path(self.stage.source_path, "src"), self.prefix.src)
diff --git a/var/spack/repos/builtin/packages/meep/package.py b/var/spack/repos/builtin/packages/meep/package.py
index 18771f50c5..768a5c7bab 100644
--- a/var/spack/repos/builtin/packages/meep/package.py
+++ b/var/spack/repos/builtin/packages/meep/package.py
@@ -18,6 +18,7 @@ class Meep(AutotoolsPackage):
version("master", branch="master")
+ version("1.29.0", sha256="f63bdf6a8fbae8aad87d4f683da3a466d687848a53bbebe1d6935fb268aeeffa")
version("1.28.0", sha256="fe79ec9b0d0cf87c3855a1661a38f23a3100120174f7e2df8add96cafe201544")
version("1.25.0", sha256="3e5d6c6ef69a8cc7810bdd6d681ae494bfe7a4e91041abe5494f5c8a82d02e6f")
version("1.21.0", sha256="71911cd2f38b15bdafe9a27ad111f706f24717894d5f9b6f9f19c6c10a0d5896")
@@ -37,6 +38,9 @@ class Meep(AutotoolsPackage):
url="http://ab-initio.mit.edu/meep/old/meep-1.1.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("blas", default=True, description="Enable BLAS support")
variant("lapack", default=True, description="Enable LAPACK support")
variant("harminv", default=True, description="Enable Harminv support")
diff --git a/var/spack/repos/builtin/packages/megadock/package.py b/var/spack/repos/builtin/packages/megadock/package.py
index c0aceac0b5..3d81a58bcf 100644
--- a/var/spack/repos/builtin/packages/megadock/package.py
+++ b/var/spack/repos/builtin/packages/megadock/package.py
@@ -20,6 +20,8 @@ class Megadock(MakefilePackage, CudaPackage):
version("4.1.1", sha256="5e08416ea86169be9f0a998f081f53c04aa8696ef83b9fcc5bf685fe45d52087")
version("4.0.3", sha256="c1409a411555f4f7b4eeeda81caf622d8a28259a599ea1d2181069c55f257664")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", description="Enable MPI", default=False)
depends_on("fftw")
diff --git a/var/spack/repos/builtin/packages/melissa-api/package.py b/var/spack/repos/builtin/packages/melissa-api/package.py
index 931460e22a..f40b2ddca2 100644
--- a/var/spack/repos/builtin/packages/melissa-api/package.py
+++ b/var/spack/repos/builtin/packages/melissa-api/package.py
@@ -21,6 +21,9 @@ class MelissaApi(CMakePackage):
version("develop", branch="develop")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.7.2:", type="build")
depends_on("libzmq@4.1.5:")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/melissa/package.py b/var/spack/repos/builtin/packages/melissa/package.py
index 58855d6f2c..dd1cfa45ef 100644
--- a/var/spack/repos/builtin/packages/melissa/package.py
+++ b/var/spack/repos/builtin/packages/melissa/package.py
@@ -31,6 +31,9 @@ class Melissa(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("no_mpi_api", default=False, description="Enable the deprecated no-MPI API")
variant("shared", default=True, description="Build shared libraries")
diff --git a/var/spack/repos/builtin/packages/memaxes/package.py b/var/spack/repos/builtin/packages/memaxes/package.py
index b6a2f16511..529a70bf63 100644
--- a/var/spack/repos/builtin/packages/memaxes/package.py
+++ b/var/spack/repos/builtin/packages/memaxes/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Memaxes(Package):
+class Memaxes(CMakePackage):
"""MemAxes is a visualizer for sampled memory trace data."""
homepage = "https://github.com/llnl/MemAxes"
@@ -19,11 +19,7 @@ class Memaxes(Package):
url="https://github.com/llnl/MemAxes/archive/v0.5.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.9:", type="build")
depends_on("qt@5:")
-
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- cmake("..", *std_cmake_args)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/memcached/package.py b/var/spack/repos/builtin/packages/memcached/package.py
index a4a7260ac1..c99ecd6747 100644
--- a/var/spack/repos/builtin/packages/memcached/package.py
+++ b/var/spack/repos/builtin/packages/memcached/package.py
@@ -26,6 +26,8 @@ class Memcached(AutotoolsPackage):
version("1.5.14", sha256="ae8ed2ed853b840a8430d8575d4e91b87c550b111874b416c551001403ac6a74")
version("1.5.13", sha256="ae59a8b49be17afb344e57c8a8d64f9ae38b6efbc3f9115a422dbcb2b23795fc")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/meme/package.py b/var/spack/repos/builtin/packages/meme/package.py
index 4aaf317f57..77b69170c2 100644
--- a/var/spack/repos/builtin/packages/meme/package.py
+++ b/var/spack/repos/builtin/packages/meme/package.py
@@ -22,6 +22,8 @@ class Meme(AutotoolsPackage):
version("4.12.0", sha256="49ff80f842b59d328588acfcd1d15bf94c55fed661d22b0f95f37430cc363a06")
version("4.11.4", sha256="3e869ff57e327a9c8615dbef784e3f1095f7f7a0120cecd55efe10c3f2ee8eb3")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("magick", default=False, description="Enable imagemagick for png output")
diff --git a/var/spack/repos/builtin/packages/memkind/package.py b/var/spack/repos/builtin/packages/memkind/package.py
index 21c2287eaa..4ab957483b 100644
--- a/var/spack/repos/builtin/packages/memkind/package.py
+++ b/var/spack/repos/builtin/packages/memkind/package.py
@@ -26,6 +26,7 @@ class Memkind(AutotoolsPackage):
license("BSD-3-Clause")
+ version("1.14.0", sha256="ab366b20b5a87ea655483631fc762ba6eb59eb6c3a08652e643f1ee3f06a6a12")
version("1.13.0", sha256="3f0d919b61fdd4d2ebce14e0b7dbb856e2144138778940107c13549523f3bdc0")
version("1.12.0", sha256="b0781d493dec0da0089884fd54bcfdde03311019c56f90505ed0b884100bfbad")
version("1.10.1", sha256="c203615d964a0bb151756ad8a5c9565391ee77d79c1f8b59d2ea8ff87989b294")
@@ -34,6 +35,9 @@ class Memkind(AutotoolsPackage):
version("1.8.0", sha256="8b57c5afa8afa6793e4662322e37620bbb11f119cd8d29654ec00945bbe13a17")
version("1.7.0", sha256="5048eaaa1bc484203c685a019f3f428ab6c9b1cf94ef6d264e299bc0127ec572")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -49,7 +53,7 @@ class Memkind(AutotoolsPackage):
def patch(self):
with open("VERSION", "w") as version_file:
- version_file.write("{0}\n".format(self.version))
+ version_file.write(f"{self.version}\n")
# Remove `-Werror`
filter_file(r" -Werror ", " ", "Makefile.am", "configure.ac")
diff --git a/var/spack/repos/builtin/packages/memsurfer/package.py b/var/spack/repos/builtin/packages/memsurfer/package.py
index b10bbf4e04..2b6e3b812b 100644
--- a/var/spack/repos/builtin/packages/memsurfer/package.py
+++ b/var/spack/repos/builtin/packages/memsurfer/package.py
@@ -19,7 +19,7 @@ class Memsurfer(PythonPackage):
version("master", branch="master", submodules=True)
version("develop", branch="develop", submodules=True)
- variant("osmesa", default=False, description="Enable OSMesa support (for VTK)")
+ depends_on("cxx", type="build") # generated
extends("python")
depends_on("python@3.7:", type=("build", "run"))
@@ -36,8 +36,6 @@ class Memsurfer(PythonPackage):
# vtk needs to know whether to build with mesa or opengl
depends_on("vtk@8.1.2 ~ffmpeg~mpi+opengl2~qt~xdmf+python")
- depends_on("vtk ~osmesa", when="~osmesa")
- depends_on("vtk +osmesa", when="+osmesa")
# memsurfer's setup needs path to these deps to build extension modules
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/mepo/package.py b/var/spack/repos/builtin/packages/mepo/package.py
new file mode 100644
index 0000000000..a0b598cd73
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mepo/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Mepo(PythonPackage):
+ """Tool to manage (m)ultiple git r(epo)sitories"""
+
+ homepage = "https://github.com/GEOS-ESM/mepo"
+ git = "https://github.com/GEOS-ESM/mepo.git"
+ pypi = "mepo/mepo-2.0.0.tar.gz"
+
+ maintainers("pchakraborty", "mathomp4")
+
+ license("Apache-2.0", checked_by="mathomp4")
+
+ version("2.1.0", sha256="24f94f7fbc15f740e13ace695e204d6370bf4156eca08c24bcbeacaacb1b6c12")
+ version("2.0.0", sha256="8ca4aabd8ca350183db3b8e117b0cd87d9a20277e39931e2799c86bfa910ae71")
+ version("2.0.0rc4", sha256="5f6113be565c561c08114355570a259042b25222a9e8e1dc6e6e44448381cd36")
+ version("2.0.0rc3", sha256="c0c897a33f5018489e6cc14892961831c8922a3378ac30436496c52bf877aff7")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-colorama@0.4.6:", type=("build", "run"))
+ depends_on("py-pyyaml@6.0.1:", type=("build", "run"))
+
+ depends_on("py-hatchling", type="build")
diff --git a/var/spack/repos/builtin/packages/meraculous/package.py b/var/spack/repos/builtin/packages/meraculous/package.py
index 1e17f87a8e..2e87d70a01 100644
--- a/var/spack/repos/builtin/packages/meraculous/package.py
+++ b/var/spack/repos/builtin/packages/meraculous/package.py
@@ -20,6 +20,9 @@ class Meraculous(CMakePackage, SourceforgePackage):
version("2.2.5.1", branch="release-2.2.5.1")
version("2.2.4", sha256="3b4b8848232be902af9ebc77b38b83bcc531f12120115be089bdd6371ad2bf5b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("boost@1.5.0:")
diff --git a/var/spack/repos/builtin/packages/mercurial/package.py b/var/spack/repos/builtin/packages/mercurial/package.py
index dcecc12893..c8c8036f75 100644
--- a/var/spack/repos/builtin/packages/mercurial/package.py
+++ b/var/spack/repos/builtin/packages/mercurial/package.py
@@ -16,6 +16,8 @@ class Mercurial(PythonPackage):
license("GPL-2.0-or-later")
+ version("6.7.3", sha256="00196944ea92738809317dc7a8ed7cb21287ca0a00a85246e66170955dcd9031")
+ version("6.6.3", sha256="f75d6a4a75823a1b7d713a4967eca2f596f466e58fc6bc06d72642932fd7e307")
version("6.4.5", sha256="b0b4b00b8b2639c8be387394796f0425beb339314df7e72937f8ddd2a41b1b8a")
version("6.3.3", sha256="13c97ff589c7605e80a488f336852ce1d538c5d4143cfb33be69bdaddd9157bd")
version("6.2.3", sha256="98d1ae002f68adf53d65c5947fe8b7a379f98cf05d9b8ea1f4077d2ca5dce9db")
@@ -27,6 +29,9 @@ class Mercurial(PythonPackage):
version("5.6.1", sha256="e55c254f4904c45226a106780e57f4279aee03368f6ff6a981d5d2a38243ffad")
version("5.3", sha256="e57ff61d6b67695149dd451922b40aa455ab02e01711806a131a1e95c544f9b9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python+bz2+ssl+zlib", type=("build", "run"))
depends_on("python@3.5:", when="@5.2:", type=("build", "run"))
depends_on("python@3.6:", when="@6.2:", type=("build", "run"))
@@ -90,7 +95,7 @@ class Mercurial(PythonPackage):
else:
# Write the global mercurial configuration file
with open(hgrc_filename, "w") as hgrc:
- hgrc.write("[web]\ncacerts = {0}".format(certificate))
+ hgrc.write(f"[web]\ncacerts = {certificate}")
@run_after("install")
@on_package_attributes(run_tests=True)
diff --git a/var/spack/repos/builtin/packages/mercury/package.py b/var/spack/repos/builtin/packages/mercury/package.py
index 4371ffdd14..a614623bce 100644
--- a/var/spack/repos/builtin/packages/mercury/package.py
+++ b/var/spack/repos/builtin/packages/mercury/package.py
@@ -19,6 +19,7 @@ class Mercury(CMakePackage):
license("GPL-2.0-only")
version("master", branch="master", submodules=True)
+ version("2.4.0", sha256="8926cd177f6e3c04e8ae1683d42f7c8b27163a93d4d99a305fe497fa8ca86e79")
version("2.3.1", sha256="36182d49f2db7e2b075240cab4aaa1d4ec87a7756450c87643ededd1e6f16104")
version("2.3.0", sha256="e9e62ce1bb2fd482f0e85ad75fa255d9750c6fed50ba441a03de93b3b8eae742")
version("2.2.0", sha256="e66490cf63907c3959bbb2932b5aaf51d96a481b17f0935f409f3a862eff97f6")
@@ -29,6 +30,9 @@ class Mercury(CMakePackage):
version("1.0.0", sha256="fb0e44d13f4652f53e21040435f91d452bc2b629b6e98dcf5292cd0bece899d4")
version("0.9.0", sha256="40868e141cac035213fe79400f8926823fb1f5a0651fd7027cbe162b063843ef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("bmi", default=False, description="Use BMI plugin")
variant("mpi", default=False, description="Use MPI plugin")
variant("ofi", default=True, when="@1.0.0:", description="Use OFI libfabric plugin")
@@ -157,5 +161,5 @@ class Mercury(CMakePackage):
def check(self):
"""Unit tests fail when run in parallel."""
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test", parallel=False)
diff --git a/var/spack/repos/builtin/packages/mesa-demos/package.py b/var/spack/repos/builtin/packages/mesa-demos/package.py
index c85b2eb2e3..6282ddf9e0 100644
--- a/var/spack/repos/builtin/packages/mesa-demos/package.py
+++ b/var/spack/repos/builtin/packages/mesa-demos/package.py
@@ -2,8 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import sys
-
from spack.package import *
@@ -20,17 +18,8 @@ class MesaDemos(AutotoolsPackage):
version("8.2.0", sha256="5a9f71b815d968d0c3b77edfcc3782d0211f8520b00da9e554ccfed80c8889f6")
version("8.1.0", sha256="cc5826105355830208c90047fc38c5b09fa3ab0045366e7e859104935b00b76d")
- variant(
- "gl",
- default="glx" if sys.platform.startswith("linux") else "osmesa",
- values=("glx", "osmesa", "other"),
- multi=False,
- description="The OpenGL provider to use",
- )
- conflicts("^osmesa", when="gl=glx")
- conflicts("^osmesa", when="gl=other")
- conflicts("^glx", when="gl=osmesa")
- conflicts("^glx", when="gl=other")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -39,10 +28,8 @@ class MesaDemos(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("gl")
- depends_on("osmesa", when="gl=osmesa")
- depends_on("glx", when="gl=glx")
- depends_on("libx11", when="gl=glx")
- depends_on("libxext", when="gl=glx")
+ depends_on("libx11", when="^[virtuals=gl] glx")
+ depends_on("libxext", when="^[virtuals=gl] glx")
depends_on("glu")
depends_on("glew@1.5.4:")
@@ -64,11 +51,11 @@ class MesaDemos(AutotoolsPackage):
"--disable-rbug",
"--without-glut",
]
- if "gl=glx" in spec:
+ if spec.satisfies("^[virtuals=gl] glx"):
args.append("--enable-x11")
else:
args.append("--disable-x11")
- if "gl=osmesa" in spec:
+ if spec.satisfies("^[virtuals=gl] osmesa"):
args.append("--enable-osmesa")
else:
args.append("--disable-osmesa")
diff --git a/var/spack/repos/builtin/packages/mesa-glu/package.py b/var/spack/repos/builtin/packages/mesa-glu/package.py
index 071703aa5f..4692ad4e6b 100644
--- a/var/spack/repos/builtin/packages/mesa-glu/package.py
+++ b/var/spack/repos/builtin/packages/mesa-glu/package.py
@@ -2,9 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import sys
-
from spack.package import *
@@ -18,22 +15,10 @@ class MesaGlu(AutotoolsPackage):
version("9.0.1", sha256="f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7")
version("9.0.0", sha256="4387476a1933f36fec1531178ea204057bbeb04cc2d8396c9ea32720a1f7e264")
- variant(
- "gl",
- default="glx" if sys.platform.startswith("linux") else "other",
- values=("glx", "osmesa", "other"),
- multi=False,
- description="The OpenGL provider to use",
- )
- conflicts("^osmesa", when="gl=glx")
- conflicts("^osmesa", when="gl=other")
- conflicts("^glx", when="gl=osmesa")
- conflicts("^glx", when="gl=other")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("gl@3:")
- depends_on("osmesa", when="gl=osmesa")
- depends_on("glx", when="gl=glx")
-
provides("glu@1.3")
# When using -std=c++17, using register long will throw an error. This
@@ -43,7 +28,7 @@ class MesaGlu(AutotoolsPackage):
def configure_args(self):
args = ["--disable-libglvnd"]
- if "gl=osmesa" in self.spec:
+ if self.spec.satisfies("^[virtuals=gl] osmesa"):
args.append("--enable-osmesa")
else:
args.append("--disable-osmesa")
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index f3e93c30e6..8bf240409d 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -5,6 +5,7 @@
import sys
import spack.build_systems.meson
+import spack.variant
from spack.package import *
@@ -22,10 +23,11 @@ class Mesa(MesonPackage):
version("main", branch="main")
version(
- "23.2.1",
- sha256="64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc",
+ "23.3.6",
+ sha256="cd3d6c60121dea73abbae99d399dc2facaecde1a8c6bd647e6d85410ff4b577b",
preferred=True,
)
+ version("23.2.1", sha256="64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc")
version("23.1.9", sha256="295ba27c28146ed09214e8ce79afa1659edf9d142decc3c91f804552d64f7510")
version("23.0.3", sha256="386362a5d80df3b096636b67f340e1ce67b705b44767d5bdd11d2ed1037192d5")
version("23.0.2", sha256="1b7d3399fc6f16f030361f925d33ebc7600cbf98094582f54775b6a1180529e7")
@@ -48,6 +50,9 @@ class Mesa(MesonPackage):
version("20.3.4", sha256="dc21a987ec1ff45b278fe4b1419b1719f1968debbb80221480e44180849b4084")
version("20.2.1", sha256="d1a46d9a3f291bc0e0374600bdcb59844fa3eafaa50398e472a36fc65fd0244a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("meson@0.52:", type="build")
depends_on("pkgconfig", type="build")
@@ -61,6 +66,7 @@ class Mesa(MesonPackage):
depends_on("unwind")
depends_on("expat")
depends_on("zlib-api")
+ depends_on("libxml2")
# Internal options
variant("llvm", default=True, description="Enable LLVM.")
@@ -101,22 +107,22 @@ class Mesa(MesonPackage):
# Provides
provides("libglx", when="+glx")
-
# provides('egl@1.5', when='+egl')
- provides("libosmesa", when="+osmesa")
# Variant dependencies
with when("+llvm"):
depends_on("libllvm@6:")
depends_on("libllvm@:11", when="@:20")
depends_on("libllvm@:12", when="@:21")
-
- depends_on("libx11", when="+glx")
- depends_on("libxcb", when="+glx")
- depends_on("libxext", when="+glx")
- depends_on("libxt", when="+glx")
- depends_on("xrandr", when="+glx")
- depends_on("glproto@1.4.14:", when="+glx")
+ depends_on("libllvm@:17", when="@:23")
+
+ with when("+glx"):
+ depends_on("libx11")
+ depends_on("libxcb")
+ depends_on("libxext")
+ depends_on("libxt")
+ depends_on("xrandr")
+ depends_on("glproto@1.4.14:")
# version specific issue
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130
diff --git a/var/spack/repos/builtin/packages/mesa18/autotools-x11-nodri.patch b/var/spack/repos/builtin/packages/mesa18/autotools-x11-nodri.patch
deleted file mode 100644
index a88f5f5113..0000000000
--- a/var/spack/repos/builtin/packages/mesa18/autotools-x11-nodri.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index cd9ff25..79bc511 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1859,7 +1859,9 @@ for plat in $platforms; do
- ;;
-
- x11)
-- PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
-+ if test "x$enable_dri" = "xyes"; then
-+ PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
-+ fi
- DEFINES="$DEFINES -DHAVE_X11_PLATFORM"
- ;;
diff --git a/var/spack/repos/builtin/packages/mesa18/multiple-symbols_hash.patch b/var/spack/repos/builtin/packages/mesa18/multiple-symbols_hash.patch
deleted file mode 100644
index 7c92326f37..0000000000
--- a/var/spack/repos/builtin/packages/mesa18/multiple-symbols_hash.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/src/gallium/auxiliary/util/u_debug_stack.c 2019-11-07 17:57:36.000000000 -0700
-+++ b/src/gallium/auxiliary/util/u_debug_stack.c 2020-07-23 15:30:46.033145497 -0600
-@@ -46,7 +46,7 @@
- #include "os/os_thread.h"
- #include "u_hash_table.h"
-
--struct util_hash_table* symbols_hash;
-+static struct util_hash_table* symbols_hash;
- static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
-
- static unsigned hash_ptr(void* p)
---- a/src/gallium/auxiliary/util/u_debug_symbol.c 2019-11-07 17:58:53.000000000 -0700
-+++ b/src/gallium/auxiliary/util/u_debug_symbol.c 2020-07-23 15:31:06.400146072 -0600
-@@ -270,7 +270,7 @@
- debug_printf("\t%s\n", buf);
- }
-
--struct util_hash_table* symbols_hash;
-+static struct util_hash_table* symbols_hash;
- static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
-
- static unsigned hash_ptr(void* p)
diff --git a/var/spack/repos/builtin/packages/mesa18/package.py b/var/spack/repos/builtin/packages/mesa18/package.py
deleted file mode 100644
index 17f6903c8d..0000000000
--- a/var/spack/repos/builtin/packages/mesa18/package.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 2013-2024 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 sys
-
-from spack.package import *
-
-
-class Mesa18(AutotoolsPackage):
- """Mesa is an open-source implementation of the OpenGL specification
- - a system for rendering interactive 3D graphics."""
-
- homepage = "https://www.mesa3d.org"
- maintainers("v-dobrev", "ChristianTackeGSI")
-
- # Note that we always want to build from the git repo instead of a
- # tarball since the tarball has pre-generated files for certain versions
- # of LLVM while the git repo doesn't so it can adapt at build time to
- # whatever version of LLVM you're using.
- git = "https://gitlab.freedesktop.org/mesa/mesa.git"
-
- version("18.3.6", tag="mesa-18.3.6", commit="11049bcff86da8013a4f63bd68daf637e3af22f3")
-
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
- depends_on("m4", type="build")
- depends_on("pkgconfig", type="build")
- depends_on("binutils+plugins", when=(sys.platform != "darwin"), type="build")
- depends_on("bison", type="build")
- depends_on("flex", type="build")
- depends_on("gettext", type="build")
- depends_on("pkgconfig", type="build")
- depends_on("python@:3.8", type="build") # https://github.com/spack/spack/issues/28219
- depends_on("py-mako@0.8.0:", type="build")
- depends_on("libxml2")
- depends_on("zlib-api")
- depends_on("expat")
- depends_on("ncurses+termlib")
-
- # Internal options
- variant("llvm", default=True, description="Enable LLVM.")
- variant(
- "swr",
- values=spack.variant.DisjointSetsOfValues(
- ("none",), ("auto",), ("avx", "avx2", "knl", "skx")
- )
- .with_non_feature_values("auto")
- .with_non_feature_values("none")
- .with_default("auto"),
- when="+llvm",
- description="Enable the SWR driver.",
- )
-
- # Front ends
- variant("osmesa", default=True, description="Enable the OSMesa frontend.")
-
- is_linux = sys.platform.startswith("linux")
- variant("glx", default=is_linux, description="Enable the GLX frontend.")
-
- # Additional backends
- variant("opengles", default=False, description="Enable OpenGL ES support.")
-
- # Provides
- provides("libglx", when="+glx")
- provides("libosmesa", when="+osmesa")
-
- # Variant dependencies
- depends_on("libllvm@6:10", when="+llvm")
- depends_on("libx11", when="+glx")
- depends_on("libxcb", when="+glx")
- depends_on("libxext", when="+glx")
- depends_on("glproto@1.4.14:", when="+glx")
-
- # Require at least 1 front-end
- conflicts("~osmesa ~glx")
-
- # Prevent an unnecessary xcb-dri dependency
- patch("autotools-x11-nodri.patch")
-
- # Backport Mesa MR#6053 to prevent multiply-defined symbols
- patch("multiple-symbols_hash.patch", when="@:20.1.4%gcc@10:")
-
- def setup_build_environment(self, env):
- env.set("PYTHON", self.spec["python"].command.path)
-
- def autoreconf(self, spec, prefix):
- which("autoreconf")("--force", "--verbose", "--install")
-
- def configure_args(self):
- spec = self.spec
- args = [
- "LDFLAGS={0}".format(self.spec["ncurses"].libs.search_flags),
- "--enable-shared",
- "--disable-static",
- "--disable-libglvnd",
- "--disable-nine",
- "--disable-omx-bellagio",
- "--disable-omx-tizonia",
- "--disable-opencl",
- "--disable-opencl-icd",
- "--disable-va",
- "--disable-vdpau",
- "--disable-xa",
- "--disable-xvmc",
- "--disable-osmesa",
- "--with-vulkan-drivers=",
- "--disable-egl",
- "--disable-gbm",
- "--disable-dri",
- "--enable-opengl",
- ]
-
- args_platforms = []
- args_gallium_drivers = ["swrast"]
- args_dri_drivers = []
-
- if spec.target.family == "arm" or spec.target.family == "aarch64":
- args.append("--disable-libunwind")
-
- num_frontends = 0
- if "+osmesa" in spec:
- num_frontends += 1
- args.append("--enable-gallium-osmesa")
- else:
- args.append("--disable-gallium-osmesa")
-
- if "+glx" in spec:
- num_frontends += 1
- args.append("--enable-glx=gallium-xlib")
- args_platforms.append("x11")
- else:
- args.append("--disable-glx")
-
- if "+opengles" in spec:
- args.extend(["--enable-gles1", "--enable-gles2"])
- else:
- args.extend(["--disable-gles1", "--disable-gles2"])
-
- if num_frontends > 1:
- args.append("--enable-shared-glapi")
- else:
- args.append("--disable-shared-glapi")
-
- if "+llvm" in spec:
- args.append("--enable-llvm")
- args.append("--with-llvm-prefix=%s" % spec["libllvm"].prefix)
- if "+llvm_dylib" in spec["libllvm"]:
- args.append("--enable-llvm-shared-libs")
- else:
- args.append("--disable-llvm-shared-libs")
- else:
- args.append("--disable-llvm")
-
- args_swr_arches = []
- if "swr=auto" in spec:
- if "avx" in spec.target:
- args_swr_arches.append("avx")
- if "avx2" in spec.target:
- args_swr_arches.append("avx2")
- if "avx512f" in spec.target:
- if "avx512er" in spec.target:
- args_swr_arches.append("knl")
- if "avx512bw" in spec.target:
- args_swr_arches.append("skx")
- else:
- if "swr=avx" in spec:
- args_swr_arches.append("avx")
- if "swr=avx2" in spec:
- args_swr_arches.append("avx2")
- if "swr=knl" in spec:
- args_swr_arches.append("knl")
- if "swr=skx" in spec:
- args_swr_arches.append("skx")
- if args_swr_arches:
- args_gallium_drivers.append("swr")
- args.append("--with-swr-archs=" + ",".join(args_swr_arches))
-
- # Add the remaining list args
- args.append("--with-platforms=" + ",".join(args_platforms))
- args.append("--with-gallium-drivers=" + ",".join(args_gallium_drivers))
- args.append("--with-dri-drivers=" + ",".join(args_dri_drivers))
-
- return args
-
- @property
- def libs(self):
- spec = self.spec
- libs_to_seek = set()
- if "platform=windows" in spec:
- libs_to_seek.add("opengl32")
- if "+osmesa" in spec:
- libs_to_seek.add("osmesa")
- else:
- libs_to_seek.add("libGL")
- if "+osmesa" in spec:
- libs_to_seek.add("libOSMesa")
- if "+glx" in spec:
- libs_to_seek.add("libGL")
- if "+opengles" in spec:
- libs_to_seek.add("libGLESv1_CM")
- libs_to_seek.add("libGLESv2")
-
- return find_libraries(
- list(libs_to_seek), root=self.spec.prefix, shared=True, recursive=True
- )
-
- @property
- def libglx_headers(self):
- return find_headers("GL/glx", root=self.spec.prefix.include, recursive=False)
-
- @property
- def libglx_libs(self):
- return find_libraries("libGL", root=self.spec.prefix, recursive=True)
-
- @property
- def libosmesa_headers(self):
- return find_headers("GL/osmesa", root=self.spec.prefix.include, recursive=False)
-
- @property
- def libosmesa_libs(self):
- if "platform=windows" in self.spec:
- lib_name = "osmesa"
- else:
- lib_name = "libOSMesa"
- return find_libraries(lib_name, root=self.spec.prefix, recursive=True)
diff --git a/var/spack/repos/builtin/packages/meshkit/package.py b/var/spack/repos/builtin/packages/meshkit/package.py
index 20262d8d08..bac6cbb77e 100644
--- a/var/spack/repos/builtin/packages/meshkit/package.py
+++ b/var/spack/repos/builtin/packages/meshkit/package.py
@@ -17,6 +17,8 @@ class Meshkit(AutotoolsPackage):
version("1.5.0", sha256="6a4c119af191e24ef40644acb7cfbe967af0678ac3412f38a943fb28d661cac7")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="enable mpi support")
variant("netgen", default=False, description="enable netgen support")
variant("debug", default=False, description="enable debug symbols")
diff --git a/var/spack/repos/builtin/packages/meshtool/package.py b/var/spack/repos/builtin/packages/meshtool/package.py
index bde4e0c990..dfa74a9c85 100644
--- a/var/spack/repos/builtin/packages/meshtool/package.py
+++ b/var/spack/repos/builtin/packages/meshtool/package.py
@@ -16,6 +16,10 @@ class Meshtool(MakefilePackage):
version("master", branch="master", preferred=True)
# Version to use with openCARP releases
+ # It is possible that different openCARP releases rely on the same
+ # meshtool version
+ version("oc16.0", commit="867431d6bde35ad41104f611aa57130ef58cfb79")
+ version("oc15.0", commit="867431d6bde35ad41104f611aa57130ef58cfb79")
version("oc13.0", commit="867431d6bde35ad41104f611aa57130ef58cfb79")
version("oc12.0", commit="867431d6bde35ad41104f611aa57130ef58cfb79")
version("oc11.0", commit="867431d6bde35ad41104f611aa57130ef58cfb79")
@@ -25,6 +29,8 @@ class Meshtool(MakefilePackage):
version("oc8.1", commit="6c5cfbd067120901f15a04bf63beec409bda6dc9")
version("oc7.0", commit="6c5cfbd067120901f15a04bf63beec409bda6dc9")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("meshtool", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py
index 15f7be44d7..e142fd0966 100644
--- a/var/spack/repos/builtin/packages/meson/package.py
+++ b/var/spack/repos/builtin/packages/meson/package.py
@@ -2,7 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
+import sys
from spack.package import *
@@ -20,51 +20,130 @@ class Meson(PythonPackage):
license("Apache-2.0")
+ version("1.5.1", sha256="55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390")
+ version("1.4.2", sha256="11d1336fe35e1ade57510a846a31d7dc2e3b6ac1e2491c2831bce5a2a192ba0d")
+ version("1.3.2", sha256="683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b")
version("1.2.2", sha256="1caa0ef6082e311bdca9836e7907f548b8c3f041a42ed41f0ff916b83ac7dddd")
- version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713")
- version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790")
version("1.1.1", sha256="1c3b9e1a3a36b51adb5de498d582fd5cbf6763fadbcf151de9f2a762e02bd2e6")
- version("1.1.0", sha256="f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc")
version("1.0.2", sha256="1f1239c3091668643f7d2086663d6afd8cc87fbab84fe7462bc18b9ba6d65de8")
- version("1.0.1", sha256="4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe")
- version("1.0.0", sha256="a2ada84d43c7e57400daee80a880a1f5003d062b2cb6c9be1747b0db38f2eb8d")
- version("0.64.1", sha256="1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315")
- version("0.64.0", sha256="6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347")
- version("0.63.3", sha256="7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659")
- version("0.63.2", sha256="023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e")
- version("0.63.1", sha256="f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a")
- version("0.62.2", sha256="97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6")
- version("0.62.1", sha256="9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107")
- version("0.62.0", sha256="72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80")
- version("0.61.4", sha256="c9cc34bcb15c19cfd5ee0d7b07111152701f602db2b59ef6b63d3628e0bbe719")
- version("0.61.2", sha256="33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8")
- version("0.60.3", sha256="6c191a9b4049e0c9a2a7d1275ab635b91f6ffec1912d75df4c5ec6acf35f74fe")
- version("0.60.0", sha256="5672a560fc4094c88ca5b8be0487e099fe84357e5045f5aecf1113084800e6fd")
- version("0.59.2", sha256="e6d5ccd503d41f938f6cfc4dc9e7326ffe28acabe091b1ff0c6535bdf09732dd")
- version("0.59.1", sha256="f256eb15329a6064f8cc1f23b29de1fa8d21e324f939041e1a4efe77cf1362ef")
- version("0.59.0", sha256="fdbbe8ea8a47f9e21cf4f578f85be8ec3d9c030df3d8cb17df1ae59d8683813a")
- version("0.58.2", sha256="58115604dea9c1f70811578df3c210f4d67cf795d21a4418f6e9bb35406953f5")
- version("0.58.1", sha256="78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4")
- version("0.58.0", sha256="991b882bfe4d37acc23c064a29ca209458764a580d52f044f3d50055a132bed4")
- version("0.57.2", sha256="cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096")
- version("0.57.1", sha256="0c043c9b5350e9087cd4f6becf6c0d10b1d618ca3f919e0dcca2cdf342360d5d")
- version("0.57.0", sha256="fd26a27c1a509240c668ebd29d280649d9239cf8684ead51d5cb499d1e1188bd")
- version("0.56.2", sha256="aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f")
- version("0.56.0", sha256="a9ca7adf66dc69fbb7e583f7c7aef16b9fe56ec2874a3d58747e69a3affdf300")
- version("0.55.3", sha256="2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e")
- version("0.55.2", sha256="56244896e56c2b619f819d047b6de412ecc5250975ee8717f1e329113d178e06")
- version("0.55.1", sha256="c7ebf2fff5934a974c7edd1aebb5fc9c3e1da5ae3184a29581fde917638eea39")
- version("0.55.0", sha256="9034c943c8cf4d734c0e18e5ba038dd762fcdcc614c45b41703305da8382e90c")
- version("0.54.3", sha256="c25caff342b5368bfe33fab6108f454fcf12e2f2cef70817205872ddef669e8b")
- version("0.54.2", sha256="85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb")
- version("0.54.1", sha256="854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e")
- version("0.54.0", sha256="95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9")
- version("0.53.2", sha256="eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888")
- version("0.49.1", sha256="a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced")
- version("0.49.0", sha256="11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74")
- version("0.42.0", sha256="6c318a2da3859326a37f8a380e3c50e97aaabff6990067218dffffea674ed76f")
- version("0.41.2", sha256="2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4")
- version("0.41.1", sha256="a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b")
+
+ with default_args(deprecated=True):
+ version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713")
+ version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790")
+ version("1.1.0", sha256="f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc")
+ version("1.0.1", sha256="4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe")
+ version("1.0.0", sha256="a2ada84d43c7e57400daee80a880a1f5003d062b2cb6c9be1747b0db38f2eb8d")
+ version(
+ "0.64.1", sha256="1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315"
+ )
+ version(
+ "0.64.0", sha256="6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347"
+ )
+ version(
+ "0.63.3", sha256="7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659"
+ )
+ version(
+ "0.63.2", sha256="023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e"
+ )
+ version(
+ "0.63.1", sha256="f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a"
+ )
+ version(
+ "0.62.2", sha256="97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6"
+ )
+ version(
+ "0.62.1", sha256="9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107"
+ )
+ version(
+ "0.62.0", sha256="72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80"
+ )
+ version(
+ "0.61.4", sha256="c9cc34bcb15c19cfd5ee0d7b07111152701f602db2b59ef6b63d3628e0bbe719"
+ )
+ version(
+ "0.61.2", sha256="33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8"
+ )
+ version(
+ "0.60.3", sha256="6c191a9b4049e0c9a2a7d1275ab635b91f6ffec1912d75df4c5ec6acf35f74fe"
+ )
+ version(
+ "0.60.0", sha256="5672a560fc4094c88ca5b8be0487e099fe84357e5045f5aecf1113084800e6fd"
+ )
+ version(
+ "0.59.2", sha256="e6d5ccd503d41f938f6cfc4dc9e7326ffe28acabe091b1ff0c6535bdf09732dd"
+ )
+ version(
+ "0.59.1", sha256="f256eb15329a6064f8cc1f23b29de1fa8d21e324f939041e1a4efe77cf1362ef"
+ )
+ version(
+ "0.59.0", sha256="fdbbe8ea8a47f9e21cf4f578f85be8ec3d9c030df3d8cb17df1ae59d8683813a"
+ )
+ version(
+ "0.58.2", sha256="58115604dea9c1f70811578df3c210f4d67cf795d21a4418f6e9bb35406953f5"
+ )
+ version(
+ "0.58.1", sha256="78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4"
+ )
+ version(
+ "0.58.0", sha256="991b882bfe4d37acc23c064a29ca209458764a580d52f044f3d50055a132bed4"
+ )
+ version(
+ "0.57.2", sha256="cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096"
+ )
+ version(
+ "0.57.1", sha256="0c043c9b5350e9087cd4f6becf6c0d10b1d618ca3f919e0dcca2cdf342360d5d"
+ )
+ version(
+ "0.57.0", sha256="fd26a27c1a509240c668ebd29d280649d9239cf8684ead51d5cb499d1e1188bd"
+ )
+ version(
+ "0.56.2", sha256="aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f"
+ )
+ version(
+ "0.56.0", sha256="a9ca7adf66dc69fbb7e583f7c7aef16b9fe56ec2874a3d58747e69a3affdf300"
+ )
+ version(
+ "0.55.3", sha256="2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e"
+ )
+ version(
+ "0.55.2", sha256="56244896e56c2b619f819d047b6de412ecc5250975ee8717f1e329113d178e06"
+ )
+ version(
+ "0.55.1", sha256="c7ebf2fff5934a974c7edd1aebb5fc9c3e1da5ae3184a29581fde917638eea39"
+ )
+ version(
+ "0.55.0", sha256="9034c943c8cf4d734c0e18e5ba038dd762fcdcc614c45b41703305da8382e90c"
+ )
+ version(
+ "0.54.3", sha256="c25caff342b5368bfe33fab6108f454fcf12e2f2cef70817205872ddef669e8b"
+ )
+ version(
+ "0.54.2", sha256="85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb"
+ )
+ version(
+ "0.54.1", sha256="854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e"
+ )
+ version(
+ "0.54.0", sha256="95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9"
+ )
+ version(
+ "0.53.2", sha256="eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888"
+ )
+ version(
+ "0.49.1", sha256="a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced"
+ )
+ version(
+ "0.49.0", sha256="11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74"
+ )
+ version(
+ "0.42.0", sha256="6c318a2da3859326a37f8a380e3c50e97aaabff6990067218dffffea674ed76f"
+ )
+ version(
+ "0.41.2", sha256="2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4"
+ )
+ version(
+ "0.41.1", sha256="a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b"
+ )
depends_on("python@3.7:", when="@0.62.0:", type=("build", "run"))
depends_on("python@3.6:", when="@0.57.0:", type=("build", "run"))
@@ -102,5 +181,11 @@ class Meson(PythonPackage):
if self.spec.satisfies("platform=darwin"):
env.set("STRIP", "strip -x")
+ def _meson_bin_dir(self):
+ bin_dir = self.spec.prefix.bin
+ if sys.platform == "win32":
+ bin_dir = self.spec.prefix.scripts
+ return bin_dir
+
def setup_dependent_package(self, module, dspec):
- module.meson = Executable(self.spec.prefix.bin.meson)
+ module.meson = Executable(self._meson_bin_dir().meson)
diff --git a/var/spack/repos/builtin/packages/met/package.py b/var/spack/repos/builtin/packages/met/package.py
index d0e196355d..c75ebe8cf1 100644
--- a/var/spack/repos/builtin/packages/met/package.py
+++ b/var/spack/repos/builtin/packages/met/package.py
@@ -30,6 +30,9 @@ class Met(AutotoolsPackage):
version("10.0.0", sha256="92f37c8bd83c951d86026cce294a16e4d3aa6dd41905629d0a729fa1bebe668a")
version("9.1.3", sha256="7356a5ad79ca961fd965cadd93a7bf6c73b3aa5fb1a01a932580b94e66d0d0c8")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP multithreading")
variant("grib2", default=False, description="Enable compilation of utilities using GRIB2")
variant("python", default=False, description="Enable python embedding")
diff --git a/var/spack/repos/builtin/packages/metabat/package.py b/var/spack/repos/builtin/packages/metabat/package.py
index b2a6526c84..3871b38b6c 100644
--- a/var/spack/repos/builtin/packages/metabat/package.py
+++ b/var/spack/repos/builtin/packages/metabat/package.py
@@ -30,6 +30,8 @@ class Metabat(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("cmake", type="build", when="@2.13:")
depends_on("boost@1.55.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/metacarpa/package.py b/var/spack/repos/builtin/packages/metacarpa/package.py
new file mode 100644
index 0000000000..6ec57d2fe0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/metacarpa/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+from spack.pkg.builtin.boost import Boost
+
+
+class Metacarpa(MakefilePackage):
+ """
+ METACARPA is designed for meta-analysing genetic
+ association studies with overlapping or related samples,
+ when details of the overlap or relatedness are unknown.
+ It implements and expands a method first described by Province and Borecki.
+ """
+
+ homepage = "https://www.sanger.ac.uk/tool/metacarpa/"
+ url = "https://github.com/hmgu-itg/metacarpa/archive/refs/tags/1.0.1.tar.gz"
+
+ version("1.0.1", sha256="7d8fc774a88bf75a53ef8f74462924abba9b99fccbaa9979654c01e4379fab91")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("boost@1.60.0")
+ depends_on(Boost.with_default_variants)
+ depends_on("cmake")
+ build_system = "Makefile"
+ build_directory = "src"
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter("src/Makefile")
+ makefile.filter(r"^IDIR.*", "IDIR=" + spec["boost"].prefix.include)
+ makefile.filter(r"^LDIR.*", "LDIR=" + spec["boost"].prefix.lib)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.src)
+
+ install_tree("src", prefix.src)
+
+ mkdirp(prefix.bin)
+
+ install("src/metacarpa", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/metaeuk/package.py b/var/spack/repos/builtin/packages/metaeuk/package.py
index cabccc9db2..7c2b87ad01 100644
--- a/var/spack/repos/builtin/packages/metaeuk/package.py
+++ b/var/spack/repos/builtin/packages/metaeuk/package.py
@@ -19,4 +19,7 @@ class Metaeuk(CMakePackage):
version("6-a5d39d9", sha256="be19c26f5bdb7dcdd7bc48172105afecf19e5a2e5555edb3ba0c4aa0e4aac126")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.12:", type="build")
diff --git a/var/spack/repos/builtin/packages/metal/package.py b/var/spack/repos/builtin/packages/metal/package.py
index bdb821b2e0..841c48b86d 100644
--- a/var/spack/repos/builtin/packages/metal/package.py
+++ b/var/spack/repos/builtin/packages/metal/package.py
@@ -18,6 +18,8 @@ class Metal(CMakePackage):
"2020-05-05", sha256="0ffa2419ca2ab43766e7e6e8c97822c8ce1f5b6233fb5f992d1b1be1955fede7"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("zlib-ng")
diff --git a/var/spack/repos/builtin/packages/metall/package.py b/var/spack/repos/builtin/packages/metall/package.py
index 454e7eee2f..8ca6ee468d 100644
--- a/var/spack/repos/builtin/packages/metall/package.py
+++ b/var/spack/repos/builtin/packages/metall/package.py
@@ -23,6 +23,9 @@ class Metall(CMakePackage):
version("master", branch="master")
version("develop", branch="develop")
+ version("0.28", sha256="770dedb7f8220c333688b232a22104ca9d8d5823e7a8a21152b58ef970eb85d0")
+ version("0.27", sha256="6e6f17a760778f9162def939701f9381a75e5275fd1eb1b2af4b2e89e86e1c58")
+ version("0.26", sha256="7453c87d99708be8542e354e582cbeefac1e5ba65e609cd85d7126c5b25a6d7b")
version("0.25", sha256="223cb54543b62a62fdbbe6274b02ddcc14b29806e344ee7e2fd3f055c2374295")
version("0.24", sha256="872de2a1b76d44e6876c0b672c0cc518c6f334959e4a229f2f18cc7e01edf477")
version("0.23.1", sha256="25e8fbc424e66d09e0faf60029288e4612685675bfd947cc142bd9d6d0645ac4")
@@ -42,7 +45,10 @@ class Metall(CMakePackage):
version("0.10", sha256="58b4b5507d4db5baca315b1bed2b728981755d755b91ef63bd0b6dfaf320f46b")
version("0.9", sha256="2d7bd9ea2f1e04136050f210884445a9e3dcb96c992cf42ff9ea4b392f85f927")
- depends_on("cmake@3.10:", type="build")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.12:", type="build")
depends_on("boost@1.75:", type=("build", "link"))
# googletest is required only for test
diff --git a/var/spack/repos/builtin/packages/metaphysicl/package.py b/var/spack/repos/builtin/packages/metaphysicl/package.py
index d1c85e22a9..3f16a3f376 100644
--- a/var/spack/repos/builtin/packages/metaphysicl/package.py
+++ b/var/spack/repos/builtin/packages/metaphysicl/package.py
@@ -15,10 +15,13 @@ class Metaphysicl(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("0.6.0", sha256="a1b8469de17ad9960b4c99a9dbe2db46b7da50f97c811467efce470585d3f7f2")
version("0.5.0", sha256="dbba0590970a128ae2ae7064b621f78f95ca2303b70a12b079a51702573840a6")
version("0.3.3", sha256="6581ec6512d3509bfca6f93052f7d47dd2d9e4b9f2b3580d778495ae381a0b0d")
version("0.2.0", sha256="ff4f9fad870dcdc85d56fb1f8d94123fecbef9189f967d254ba9607624b5f32e")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/methyldackel/package.py b/var/spack/repos/builtin/packages/methyldackel/package.py
index 35e03b872d..641c14f350 100644
--- a/var/spack/repos/builtin/packages/methyldackel/package.py
+++ b/var/spack/repos/builtin/packages/methyldackel/package.py
@@ -22,6 +22,8 @@ class Methyldackel(MakefilePackage):
version("0.6.1", sha256="eeb1da4c830bcd9f3e6663a764947d957c41337643069524a4b545812fcf4819")
+ depends_on("c", type="build") # generated
+
depends_on("htslib@1.11:")
depends_on("libbigwig")
depends_on("curl")
diff --git a/var/spack/repos/builtin/packages/metis/no_warning.patch b/var/spack/repos/builtin/packages/metis/no_warning.patch
new file mode 100644
index 0000000000..317150ec90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/metis/no_warning.patch
@@ -0,0 +1,13 @@
+diff --git a/libmetis/pmetis.c b/libmetis/pmetis.c
+index 9174aa3..f8ced79 100644
+--- a/libmetis/pmetis.c
++++ b/libmetis/pmetis.c
+@@ -163,8 +163,6 @@ idx_t MlevelRecursiveBisection(ctrl_t *ctrl, graph_t *graph, idx_t nparts,
+ real_t wsum, *tpwgts2;
+
+ if ((nvtxs = graph->nvtxs) == 0) {
+- printf("\t***Cannot bisect a graph with 0 vertices!\n"
+- "\t***You are trying to partition a graph into too many parts!\n");
+ return 0;
+ }
+
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index c77ef4b345..ea24d4950b 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -31,6 +31,16 @@ class Metis(CMakePackage, MakefilePackage):
version("5.1.0", sha256="76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2")
version("4.0.3", sha256="5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant(
+ "no_warning",
+ default=False,
+ description="Disable failed partition warning print on all ranks",
+ )
+ patch("no_warning.patch", when="@5:+no_warning")
+
build_system(
conditional("cmake", when="@5:"), conditional("makefile", when="@:4"), default="cmake"
)
@@ -98,12 +108,32 @@ class SetupEnvironment:
class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder, SetupEnvironment):
@property
- def build_targets(self):
+ def compile_options(self):
options = []
if "+shared" in self.spec:
- options.append("COPTIONS={0}".format(self.pkg.compiler.cc_pic_flag))
+ options.append(self.pkg.compiler.cc_pic_flag)
+ if self.spec.satisfies("%cce@17:"):
+ options.append("-std=c89")
+ return options
+
+ @property
+ def optimize_options(self):
+ options = []
if "+debug" in self.spec:
- options.append("OPTFLAGS=-g -O0")
+ options.extend(["-g", "-O0"])
+ else:
+ options.append("-O2") # default in Makefile.in
+ return options
+
+ @property
+ def build_targets(self):
+ options = []
+ copts = self.compile_options
+ oopts = self.optimize_options
+ if copts:
+ options.append("COPTIONS={0}".format(" ".join(copts)))
+ if oopts:
+ options.append("OPTFLAGS={0}".format(" ".join(oopts)))
return options
def install(self, pkg, spec, prefix):
@@ -156,6 +186,8 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder, SetupEnviron
# Set up and run tests on installation
ccompile(
+ *self.compile_options,
+ *self.optimize_options,
"-I%s" % prefix.include,
"-L%s" % prefix.lib,
(pkg.compiler.cc_rpath_arg + prefix.lib if "+shared" in spec else ""),
diff --git a/var/spack/repos/builtin/packages/metkit/package.py b/var/spack/repos/builtin/packages/metkit/package.py
index 2c859da0aa..05f4b33065 100644
--- a/var/spack/repos/builtin/packages/metkit/package.py
+++ b/var/spack/repos/builtin/packages/metkit/package.py
@@ -11,17 +11,21 @@ class Metkit(CMakePackage):
implementing the MARS language and associated processing and semantics."""
homepage = "https://github.com/ecmwf/metkit"
+ git = "https://github.com/ecmwf/metkit.git"
url = "https://github.com/ecmwf/metkit/archive/refs/tags/1.7.0.tar.gz"
maintainers("skosukhin", "victoria-cherkas", "dominichofer")
license("Apache-2.0")
+ version("1.11.5", sha256="717e0d92499d7a1b49338c3762d829aa83c75f8095dc9e7cdc7f49c209bb847b")
version("1.10.17", sha256="1c525891d77ed28cd4c87b065ba4d1aea24d0905452c18d885ccbd567bbfc9b1")
version("1.10.2", sha256="a038050962aecffda27b755c40b0a6ed0db04a2c22cad3d8c93e6109c8ab4b34")
version("1.9.2", sha256="35d5f67196197cc06e5c2afc6d1354981e7c85a441df79a2fbd774e0c343b0b4")
version("1.7.0", sha256="8c34f6d8ea5381bd1bcfb22462349d03e1592e67d8137e76b3cecf134a9d338c")
+ depends_on("cxx", type="build") # generated
+
variant("tools", default=True, description="Build the command line tools")
variant("grib", default=True, description="Enable support for GRIB format")
variant("odb", default=False, description="Enable support for ODB data")
@@ -31,6 +35,7 @@ class Metkit(CMakePackage):
depends_on("eckit@1.16:")
depends_on("eckit@1.21:", when="@1.10:")
+ depends_on("eckit@:1.21", when="@:1.10")
depends_on("eccodes@2.5:", when="+grib")
depends_on("eccodes@2.27:", when="@1.10.2: +grib")
diff --git a/var/spack/repos/builtin/packages/mfem/mfem-4.7-sundials-7.patch b/var/spack/repos/builtin/packages/mfem/mfem-4.7-sundials-7.patch
new file mode 100644
index 0000000000..59fc95a3dd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mfem/mfem-4.7-sundials-7.patch
@@ -0,0 +1,1129 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0be4f5d65d..1f8e13a8ec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -337,7 +337,10 @@ if (MFEM_USE_SUNDIALS)
+ if (MFEM_USE_HIP)
+ list(APPEND SUNDIALS_COMPONENTS NVector_Hip)
+ endif()
+- find_package(SUNDIALS REQUIRED ${SUNDIALS_COMPONENTS})
++ # The Core component was added in SUNDIALS v7, so we treat it as optional in
++ # order to support older versions.
++ find_package(SUNDIALS REQUIRED ${SUNDIALS_COMPONENTS}
++ OPTIONAL_COMPONENTS Core)
+ endif()
+
+ # SuperLU_DIST can only be enabled in parallel
+diff --git a/config/cmake/modules/FindSUNDIALS.cmake b/config/cmake/modules/FindSUNDIALS.cmake
+index 9a624a9c51..3617df7b24 100644
+--- a/config/cmake/modules/FindSUNDIALS.cmake
++++ b/config/cmake/modules/FindSUNDIALS.cmake
+@@ -31,4 +31,5 @@ mfem_find_package(SUNDIALS SUNDIALS SUNDIALS_DIR
+ ADD_COMPONENT CVODE "include" cvode/cvode.h "lib" sundials_cvode
+ ADD_COMPONENT CVODES "include" cvodes/cvodes.h "lib" sundials_cvodes
+ ADD_COMPONENT ARKODE "include" arkode/arkode.h "lib" sundials_arkode
+- ADD_COMPONENT KINSOL "include" kinsol/kinsol.h "lib" sundials_kinsol)
++ ADD_COMPONENT KINSOL "include" kinsol/kinsol.h "lib" sundials_kinsol
++ ADD_COMPONENT Core "include" sundials/sundials_core.h "lib" sundials_core)
+diff --git a/config/defaults.mk b/config/defaults.mk
+index f107f360de..d89344b9e8 100644
+--- a/config/defaults.mk
++++ b/config/defaults.mk
+@@ -284,6 +284,13 @@ endif
+ ifeq ($(MFEM_USE_HIP),YES)
+ SUNDIALS_LIB += -lsundials_nvechip
+ endif
++SUNDIALS_CORE_PAT = $(subst\
++ @MFEM_DIR@,$(MFEM_DIR),$(SUNDIALS_DIR))/lib*/libsundials_core.*
++ifeq ($(MFEM_USE_SUNDIALS),YES)
++ ifneq ($(wildcard $(SUNDIALS_CORE_PAT)),)
++ SUNDIALS_LIB += -lsundials_core
++ endif
++endif
+ # If SUNDIALS was built with KLU:
+ # MFEM_USE_SUITESPARSE = YES
+
+diff --git a/linalg/sundials.cpp b/linalg/sundials.cpp
+index 1f4c141477..c8982387aa 100644
+--- a/linalg/sundials.cpp
++++ b/linalg/sundials.cpp
+@@ -95,7 +95,7 @@ MFEM_DEPRECATED void* CVodeCreate(int lmm, SUNContext)
+
+ /// (DEPRECATED) Wrapper function for backwards compatibility with SUNDIALS
+ /// version < 6
+-MFEM_DEPRECATED void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi, realtype t0,
++MFEM_DEPRECATED void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi, sunrealtype t0,
+ N_Vector y0, SUNContext)
+ {
+ return ARKStepCreate(fe, fi, t0, y0);
+@@ -127,7 +127,7 @@ MFEM_DEPRECATED N_Vector N_VNewEmpty_Parallel(MPI_Comm comm,
+ /// (DEPRECATED) Wrapper function for backwards compatibility with SUNDIALS
+ /// version < 6
+ MFEM_DEPRECATED N_Vector SUN_Hip_OR_Cuda(N_VNewWithMemHelp)(sunindextype length,
+- booleantype use_managed_mem,
++ sunbooleantype use_managed_mem,
+ SUNMemoryHelper helper,
+ SUNContext)
+ {
+@@ -157,6 +157,16 @@ MFEM_DEPRECATED N_Vector N_VMake_MPIPlusX(MPI_Comm comm, N_Vector local_vector,
+
+ #endif // SUNDIALS_VERSION_MAJOR < 6
+
++#if MFEM_SUNDIALS_VERSION < 70100
++#define MFEM_ARKode(FUNC) ARKStep##FUNC
++#else
++#define MFEM_ARKode(FUNC) ARKode##FUNC
++#endif
++
++// Macro STR(): expand the argument and add double quotes
++#define STR1(s) #s
++#define STR(s) STR1(s)
++
+
+ namespace mfem
+ {
+@@ -187,11 +197,21 @@ SundialsMemHelper &Sundials::GetMemHelper()
+ Sundials::Sundials()
+ {
+ #ifdef MFEM_USE_MPI
+- MPI_Comm communicator = MPI_COMM_WORLD;
++ int mpi_initialized = 0;
++ MPI_Initialized(&mpi_initialized);
++ MPI_Comm communicator = mpi_initialized ? MPI_COMM_WORLD : MPI_COMM_NULL;
++#if SUNDIALS_VERSION_MAJOR < 7
+ int return_val = SUNContext_Create((void*) &communicator, &context);
+ #else
++ int return_val = SUNContext_Create(communicator, &context);
++#endif
++#else // #ifdef MFEM_USE_MPI
++#if SUNDIALS_VERSION_MAJOR < 7
+ int return_val = SUNContext_Create(nullptr, &context);
++#else
++ int return_val = SUNContext_Create((SUNComm)(0), &context);
+ #endif
++#endif // #ifdef MFEM_USE_MPI
+ MFEM_VERIFY(return_val == 0, "Call to SUNContext_Create failed");
+ SundialsMemHelper actual_helper(context);
+ memHelper = std::move(actual_helper);
+@@ -250,7 +270,11 @@ int SundialsMemHelper::SundialsMemHelper_Alloc(SUNMemoryHelper helper,
+ #endif
+ )
+ {
++#if (SUNDIALS_VERSION_MAJOR < 7)
+ SUNMemory sunmem = SUNMemoryNewEmpty();
++#else
++ SUNMemory sunmem = SUNMemoryNewEmpty(helper->sunctx);
++#endif
+
+ sunmem->ptr = NULL;
+ sunmem->own = SUNTRUE;
+@@ -631,7 +655,7 @@ static int LSFree(SUNLinearSolver LS)
+ // ---------------------------------------------------------------------------
+ // CVODE interface
+ // ---------------------------------------------------------------------------
+-int CVODESolver::RHS(realtype t, const N_Vector y, N_Vector ydot,
++int CVODESolver::RHS(sunrealtype t, const N_Vector y, N_Vector ydot,
+ void *user_data)
+ {
+ // At this point the up-to-date data for N_Vector y and ydot is on the device.
+@@ -648,7 +672,8 @@ int CVODESolver::RHS(realtype t, const N_Vector y, N_Vector ydot,
+ return (0);
+ }
+
+-int CVODESolver::root(realtype t, N_Vector y, realtype *gout, void *user_data)
++int CVODESolver::root(sunrealtype t, N_Vector y, sunrealtype *gout,
++ void *user_data)
+ {
+ CVODESolver *self = static_cast<CVODESolver*>(user_data);
+
+@@ -668,8 +693,9 @@ void CVODESolver::SetRootFinder(int components, RootFunction func)
+ MFEM_VERIFY(flag == CV_SUCCESS, "error in SetRootFinder()");
+ }
+
+-int CVODESolver::LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+- booleantype jok, booleantype *jcur, realtype gamma,
++int CVODESolver::LinSysSetup(sunrealtype t, N_Vector y, N_Vector fy,
++ SUNMatrix A, sunbooleantype jok,
++ sunbooleantype *jcur, sunrealtype gamma,
+ void*, N_Vector, N_Vector, N_Vector)
+ {
+ // Get data from N_Vectors
+@@ -683,7 +709,7 @@ int CVODESolver::LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+ }
+
+ int CVODESolver::LinSysSolve(SUNLinearSolver LS, SUNMatrix, N_Vector x,
+- N_Vector b, realtype tol)
++ N_Vector b, sunrealtype tol)
+ {
+ SundialsNVector mfem_x(x);
+ const SundialsNVector mfem_b(b);
+@@ -859,7 +885,7 @@ void CVODESolver::UseSundialsLinearSolver()
+ if (LSA != NULL) { SUNLinSolFree(LSA); LSA = NULL; }
+
+ // Create linear solver
+- LSA = SUNLinSol_SPGMR(*Y, PREC_NONE, 0, Sundials::GetContext());
++ LSA = SUNLinSol_SPGMR(*Y, SUN_PREC_NONE, 0, Sundials::GetContext());
+ MFEM_VERIFY(LSA, "error in SUNLinSol_SPGMR()");
+
+ // Attach linear solver
+@@ -1150,7 +1176,7 @@ void CVODESSolver::UseSundialsLinearSolverB()
+ if (LSB != NULL) { SUNLinSolFree(LSB); LSB = NULL; }
+
+ // Set default linear solver (Newton is the default Nonlinear Solver)
+- LSB = SUNLinSol_SPGMR(*yB, PREC_NONE, 0, Sundials::GetContext());
++ LSB = SUNLinSol_SPGMR(*yB, SUN_PREC_NONE, 0, Sundials::GetContext());
+ MFEM_VERIFY(LSB, "error in SUNLinSol_SPGMR()");
+
+ /* Attach the matrix and linear solver */
+@@ -1158,11 +1184,11 @@ void CVODESSolver::UseSundialsLinearSolverB()
+ MFEM_VERIFY(flag == CV_SUCCESS, "error in CVodeSetLinearSolverB()");
+ }
+
+-int CVODESSolver::LinSysSetupB(realtype t, N_Vector y, N_Vector yB,
++int CVODESSolver::LinSysSetupB(sunrealtype t, N_Vector y, N_Vector yB,
+ N_Vector fyB, SUNMatrix AB,
+- booleantype jokB, booleantype *jcurB,
+- realtype gammaB, void *user_data, N_Vector tmp1,
+- N_Vector tmp2, N_Vector tmp3)
++ sunbooleantype jokB, sunbooleantype *jcurB,
++ sunrealtype gammaB, void *user_data,
++ N_Vector tmp1, N_Vector tmp2, N_Vector tmp3)
+ {
+ // Get data from N_Vectors
+ const SundialsNVector mfem_y(y);
+@@ -1178,7 +1204,7 @@ int CVODESSolver::LinSysSetupB(realtype t, N_Vector y, N_Vector yB,
+ }
+
+ int CVODESSolver::LinSysSolveB(SUNLinearSolver LS, SUNMatrix AB, N_Vector yB,
+- N_Vector Rb, realtype tol)
++ N_Vector Rb, sunrealtype tol)
+ {
+ SundialsNVector mfem_yB(yB);
+ const SundialsNVector mfem_Rb(Rb);
+@@ -1216,7 +1242,7 @@ void CVODESSolver::SetWFTolerances(EWTFunction func)
+
+ // CVODESSolver static functions
+
+-int CVODESSolver::RHSQ(realtype t, const N_Vector y, N_Vector qdot,
++int CVODESSolver::RHSQ(sunrealtype t, const N_Vector y, N_Vector qdot,
+ void *user_data)
+ {
+ CVODESSolver *self = static_cast<CVODESSolver*>(user_data);
+@@ -1229,7 +1255,7 @@ int CVODESSolver::RHSQ(realtype t, const N_Vector y, N_Vector qdot,
+ return 0;
+ }
+
+-int CVODESSolver::RHSQB(realtype t, N_Vector y, N_Vector yB, N_Vector qBdot,
++int CVODESSolver::RHSQB(sunrealtype t, N_Vector y, N_Vector yB, N_Vector qBdot,
+ void *user_dataB)
+ {
+ CVODESSolver *self = static_cast<CVODESSolver*>(user_dataB);
+@@ -1243,7 +1269,7 @@ int CVODESSolver::RHSQB(realtype t, N_Vector y, N_Vector yB, N_Vector qBdot,
+ return 0;
+ }
+
+-int CVODESSolver::RHSB(realtype t, N_Vector y, N_Vector yB, N_Vector yBdot,
++int CVODESSolver::RHSB(sunrealtype t, N_Vector y, N_Vector yB, N_Vector yBdot,
+ void *user_dataB)
+ {
+ CVODESSolver *self = static_cast<CVODESSolver*>(user_dataB);
+@@ -1341,46 +1367,67 @@ CVODESSolver::~CVODESSolver()
+ // ARKStep interface
+ // ---------------------------------------------------------------------------
+
+-int ARKStepSolver::RHS1(realtype t, const N_Vector y, N_Vector ydot,
++int ARKStepSolver::RHS1(sunrealtype t, const N_Vector y, N_Vector result,
+ void *user_data)
+ {
+ // Get data from N_Vectors
+ const SundialsNVector mfem_y(y);
+- SundialsNVector mfem_ydot(ydot);
++ SundialsNVector mfem_result(result);
+ ARKStepSolver *self = static_cast<ARKStepSolver*>(user_data);
+
+- // Compute f(t, y) in y' = f(t, y) or fe(t, y) in y' = fe(t, y) + fi(t, y)
++ // Compute either f(t, y) in one of
++ // 1. y' = f(t, y)
++ // 2. M y' = f(t, y)
++ // or fe(t, y) in one of
++ // 1. y' = fe(t, y) + fi(t, y)
++ // 2. M y' = fe(t, y) + fi(t, y)
+ self->f->SetTime(t);
+ if (self->rk_type == IMEX)
+ {
+ self->f->SetEvalMode(TimeDependentOperator::ADDITIVE_TERM_1);
+ }
+- self->f->Mult(mfem_y, mfem_ydot);
++ if (self->f->isExplicit()) // ODE is in form 1
++ {
++ self->f->Mult(mfem_y, mfem_result);
++ }
++ else // ODE is in form 2
++ {
++ self->f->ExplicitMult(mfem_y, mfem_result);
++ }
+
+ // Return success
+ return (0);
+ }
+
+-int ARKStepSolver::RHS2(realtype t, const N_Vector y, N_Vector ydot,
++int ARKStepSolver::RHS2(sunrealtype t, const N_Vector y, N_Vector result,
+ void *user_data)
+ {
+ // Get data from N_Vectors
+ const SundialsNVector mfem_y(y);
+- SundialsNVector mfem_ydot(ydot);
++ SundialsNVector mfem_result(result);
+ ARKStepSolver *self = static_cast<ARKStepSolver*>(user_data);
+
+- // Compute fi(t, y) in y' = fe(t, y) + fi(t, y)
++ // Compute fi(t, y) in one of
++ // 1. y' = fe(t, y) + fi(t, y) (ODE is expressed in EXPLICIT form)
++ // 2. M y' = fe(t, y) + fi(y, t) (ODE is expressed in IMPLICIT form)
+ self->f->SetTime(t);
+ self->f->SetEvalMode(TimeDependentOperator::ADDITIVE_TERM_2);
+- self->f->Mult(mfem_y, mfem_ydot);
++ if (self->f->isExplicit())
++ {
++ self->f->Mult(mfem_y, mfem_result);
++ }
++ else
++ {
++ self->f->ExplicitMult(mfem_y, mfem_result);
++ }
+
+ // Return success
+ return (0);
+ }
+
+-int ARKStepSolver::LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+- SUNMatrix, booleantype jok, booleantype *jcur,
+- realtype gamma,
++int ARKStepSolver::LinSysSetup(sunrealtype t, N_Vector y, N_Vector fy,
++ SUNMatrix A, SUNMatrix, sunbooleantype jok,
++ sunbooleantype *jcur, sunrealtype gamma,
+ void*, N_Vector, N_Vector, N_Vector)
+ {
+ // Get data from N_Vectors
+@@ -1398,7 +1445,7 @@ int ARKStepSolver::LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+ }
+
+ int ARKStepSolver::LinSysSolve(SUNLinearSolver LS, SUNMatrix, N_Vector x,
+- N_Vector b, realtype tol)
++ N_Vector b, sunrealtype tol)
+ {
+ SundialsNVector mfem_x(x);
+ const SundialsNVector mfem_b(b);
+@@ -1412,7 +1459,7 @@ int ARKStepSolver::LinSysSolve(SUNLinearSolver LS, SUNMatrix, N_Vector x,
+ return (self->f->SUNImplicitSolve(mfem_b, mfem_x, tol));
+ }
+
+-int ARKStepSolver::MassSysSetup(realtype t, SUNMatrix M,
++int ARKStepSolver::MassSysSetup(sunrealtype t, SUNMatrix M,
+ void*, N_Vector, N_Vector, N_Vector)
+ {
+ ARKStepSolver *self = static_cast<ARKStepSolver*>(GET_CONTENT(M));
+@@ -1423,7 +1470,7 @@ int ARKStepSolver::MassSysSetup(realtype t, SUNMatrix M,
+ }
+
+ int ARKStepSolver::MassSysSolve(SUNLinearSolver LS, SUNMatrix, N_Vector x,
+- N_Vector b, realtype tol)
++ N_Vector b, sunrealtype tol)
+ {
+ SundialsNVector mfem_x(x);
+ const SundialsNVector mfem_b(b);
+@@ -1443,7 +1490,7 @@ int ARKStepSolver::MassMult1(SUNMatrix M, N_Vector x, N_Vector v)
+ return (self->f->SUNMassMult(mfem_x, mfem_v));
+ }
+
+-int ARKStepSolver::MassMult2(N_Vector x, N_Vector v, realtype t,
++int ARKStepSolver::MassMult2(N_Vector x, N_Vector v, sunrealtype t,
+ void* mtimes_data)
+ {
+ const SundialsNVector mfem_x(x);
+@@ -1514,7 +1561,7 @@ void ARKStepSolver::Init(TimeDependentOperator &f_)
+ // Free existing solver memory and re-create with new vector size
+ if (resize)
+ {
+- ARKStepFree(&sundials_mem);
++ MFEM_ARKode(Free)(&sundials_mem);
+ sundials_mem = NULL;
+ }
+ }
+@@ -1552,12 +1599,15 @@ void ARKStepSolver::Init(TimeDependentOperator &f_)
+ MFEM_VERIFY(sundials_mem, "error in ARKStepCreate()");
+
+ // Attach the ARKStepSolver as user-defined data
+- flag = ARKStepSetUserData(sundials_mem, this);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetUserData()");
++ flag = MFEM_ARKode(SetUserData)(sundials_mem, this);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetUserData)) "()");
+
+ // Set default tolerances
+- flag = ARKStepSStolerances(sundials_mem, default_rel_tol, default_abs_tol);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetSStolerances()");
++ flag = MFEM_ARKode(SStolerances)(sundials_mem, default_rel_tol,
++ default_abs_tol);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SStolerances)) "()");
+
+ // If implicit, attach MFEM linear solver by default
+ if (use_implicit) { UseMFEMLinearSolver(); }
+@@ -1567,7 +1617,7 @@ void ARKStepSolver::Init(TimeDependentOperator &f_)
+ reinit = true;
+ }
+
+-void ARKStepSolver::Step(Vector &x, double &t, double &dt)
++void ARKStepSolver::Step(Vector &x, real_t &t, real_t &dt)
+ {
+ Y->MakeRef(x, 0, x.Size());
+ MFEM_VERIFY(Y->Size() == x.Size(), "size mismatch");
+@@ -1596,15 +1646,16 @@ void ARKStepSolver::Step(Vector &x, double &t, double &dt)
+
+ // Integrate the system
+ double tout = t + dt;
+- flag = ARKStepEvolve(sundials_mem, tout, *Y, &t, step_mode);
+- MFEM_VERIFY(flag >= 0, "error in ARKStepEvolve()");
++ flag = MFEM_ARKode(Evolve)(sundials_mem, tout, *Y, &t, step_mode);
++ MFEM_VERIFY(flag >= 0, "error in " STR(MFEM_ARKode(Evolve)) "()");
+
+ // Make sure host is up to date
+ Y->HostRead();
+
+ // Return the last incremental step size
+- flag = ARKStepGetLastStep(sundials_mem, &dt);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepGetLastStep()");
++ flag = MFEM_ARKode(GetLastStep)(sundials_mem, &dt);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(GetLastStep)) "()");
+ }
+
+ void ARKStepSolver::UseMFEMLinearSolver()
+@@ -1630,12 +1681,14 @@ void ARKStepSolver::UseMFEMLinearSolver()
+ A->ops->destroy = MatDestroy;
+
+ // Attach the linear solver and matrix
+- flag = ARKStepSetLinearSolver(sundials_mem, LSA, A);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetLinearSolver()");
++ flag = MFEM_ARKode(SetLinearSolver)(sundials_mem, LSA, A);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetLinearSolver)) "()");
+
+ // Set the linear system evaluation function
+- flag = ARKStepSetLinSysFn(sundials_mem, ARKStepSolver::LinSysSetup);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetLinSysFn()");
++ flag = MFEM_ARKode(SetLinSysFn)(sundials_mem, ARKStepSolver::LinSysSetup);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetLinSysFn)) "()");
+ }
+
+ void ARKStepSolver::UseSundialsLinearSolver()
+@@ -1645,12 +1698,13 @@ void ARKStepSolver::UseSundialsLinearSolver()
+ if (LSA != NULL) { SUNLinSolFree(LSA); LSA = NULL; }
+
+ // Create linear solver
+- LSA = SUNLinSol_SPGMR(*Y, PREC_NONE, 0, Sundials::GetContext());
++ LSA = SUNLinSol_SPGMR(*Y, SUN_PREC_NONE, 0, Sundials::GetContext());
+ MFEM_VERIFY(LSA, "error in SUNLinSol_SPGMR()");
+
+ // Attach linear solver
+- flag = ARKStepSetLinearSolver(sundials_mem, LSA, NULL);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetLinearSolver()");
++ flag = MFEM_ARKode(SetLinearSolver)(sundials_mem, LSA, NULL);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetLinearSolver)) "()");
+ }
+
+ void ARKStepSolver::UseMFEMMassLinearSolver(int tdep)
+@@ -1666,7 +1720,7 @@ void ARKStepSolver::UseMFEMMassLinearSolver(int tdep)
+ LSM->content = this;
+ LSM->ops->gettype = LSGetType;
+ LSM->ops->solve = ARKStepSolver::MassSysSolve;
+- LSA->ops->free = LSFree;
++ LSM->ops->free = LSFree;
+
+ M = SUNMatNewEmpty(Sundials::GetContext());
+ MFEM_VERIFY(M, "error in SUNMatNewEmpty()");
+@@ -1677,12 +1731,17 @@ void ARKStepSolver::UseMFEMMassLinearSolver(int tdep)
+ M->ops->destroy = MatDestroy;
+
+ // Attach the linear solver and matrix
+- flag = ARKStepSetMassLinearSolver(sundials_mem, LSM, M, tdep);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetLinearSolver()");
++ flag = MFEM_ARKode(SetMassLinearSolver)(sundials_mem, LSM, M, tdep);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetMassLinearSolver)) "()");
+
+ // Set the linear system function
+- flag = ARKStepSetMassFn(sundials_mem, ARKStepSolver::MassSysSetup);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetMassFn()");
++ flag = MFEM_ARKode(SetMassFn)(sundials_mem, ARKStepSolver::MassSysSetup);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetMassFn)) "()");
++
++ // Check that the ODE is not expressed in EXPLICIT form
++ MFEM_VERIFY(!f->isExplicit(), "ODE operator is expressed in EXPLICIT form")
+ }
+
+ void ARKStepSolver::UseSundialsMassLinearSolver(int tdep)
+@@ -1692,17 +1751,22 @@ void ARKStepSolver::UseSundialsMassLinearSolver(int tdep)
+ if (LSM != NULL) { SUNLinSolFree(LSM); LSM = NULL; }
+
+ // Create linear solver
+- LSM = SUNLinSol_SPGMR(*Y, PREC_NONE, 0, Sundials::GetContext());
++ LSM = SUNLinSol_SPGMR(*Y, SUN_PREC_NONE, 0, Sundials::GetContext());
+ MFEM_VERIFY(LSM, "error in SUNLinSol_SPGMR()");
+
+ // Attach linear solver
+- flag = ARKStepSetMassLinearSolver(sundials_mem, LSM, NULL, tdep);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetMassLinearSolver()");
++ flag = MFEM_ARKode(SetMassLinearSolver)(sundials_mem, LSM, NULL, tdep);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetMassLinearSolver)) "()");
+
+ // Attach matrix multiplication function
+- flag = ARKStepSetMassTimes(sundials_mem, NULL, ARKStepSolver::MassMult2,
+- this);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetMassTimes()");
++ flag = MFEM_ARKode(SetMassTimes)(sundials_mem, NULL,
++ ARKStepSolver::MassMult2, this);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetMassTimes)) "()");
++
++ // Check that the ODE is not expressed in EXPLICIT form
++ MFEM_VERIFY(!f->isExplicit(), "ODE operator is expressed in EXPLICIT form")
+ }
+
+ void ARKStepSolver::SetStepMode(int itask)
+@@ -1712,20 +1776,23 @@ void ARKStepSolver::SetStepMode(int itask)
+
+ void ARKStepSolver::SetSStolerances(double reltol, double abstol)
+ {
+- flag = ARKStepSStolerances(sundials_mem, reltol, abstol);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSStolerances()");
++ flag = MFEM_ARKode(SStolerances)(sundials_mem, reltol, abstol);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SStolerances)) "()");
+ }
+
+ void ARKStepSolver::SetMaxStep(double dt_max)
+ {
+- flag = ARKStepSetMaxStep(sundials_mem, dt_max);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetMaxStep()");
++ flag = MFEM_ARKode(SetMaxStep)(sundials_mem, dt_max);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetMaxStep)) "()");
+ }
+
+ void ARKStepSolver::SetOrder(int order)
+ {
+- flag = ARKStepSetOrder(sundials_mem, order);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetOrder()");
++ flag = MFEM_ARKode(SetOrder)(sundials_mem, order);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetOrder)) "()");
+ }
+
+ void ARKStepSolver::SetERKTableNum(ARKODE_ERKTableID table_id)
+@@ -1749,8 +1816,9 @@ void ARKStepSolver::SetIMEXTableNum(ARKODE_ERKTableID etable_id,
+
+ void ARKStepSolver::SetFixedStep(double dt)
+ {
+- flag = ARKStepSetFixedStep(sundials_mem, dt);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepSetFixedStep()");
++ flag = MFEM_ARKode(SetFixedStep)(sundials_mem, dt);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(SetFixedStep)) "()");
+ }
+
+ void ARKStepSolver::PrintInfo() const
+@@ -1772,18 +1840,19 @@ void ARKStepSolver::PrintInfo() const
+ &netfails);
+ MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepGetTimestepperStats()");
+
+- flag = ARKStepGetStepStats(sundials_mem,
+- &nsteps,
+- &hinused,
+- &hlast,
+- &hcur,
+- &tcur);
++ flag = MFEM_ARKode(GetStepStats)(sundials_mem,
++ &nsteps,
++ &hinused,
++ &hlast,
++ &hcur,
++ &tcur);
+
+ // Get nonlinear solver stats
+- flag = ARKStepGetNonlinSolvStats(sundials_mem,
+- &nniters,
+- &nncfails);
+- MFEM_VERIFY(flag == ARK_SUCCESS, "error in ARKStepGetNonlinSolvStats()");
++ flag = MFEM_ARKode(GetNonlinSolvStats)(sundials_mem,
++ &nniters,
++ &nncfails);
++ MFEM_VERIFY(flag == ARK_SUCCESS,
++ "error in " STR(MFEM_ARKode(GetNonlinSolvStats)) "()");
+
+ mfem::out <<
+ "ARKStep:\n"
+@@ -1811,7 +1880,7 @@ ARKStepSolver::~ARKStepSolver()
+ SUNMatDestroy(A);
+ SUNLinSolFree(LSA);
+ SUNNonlinSolFree(NLS);
+- ARKStepFree(&sundials_mem);
++ MFEM_ARKode(Free)(&sundials_mem);
+ }
+
+ // ---------------------------------------------------------------------------
+@@ -1834,7 +1903,7 @@ int KINSolver::Mult(const N_Vector u, N_Vector fu, void *user_data)
+
+ // Wrapper for computing Jacobian-vector products
+ int KINSolver::GradientMult(N_Vector v, N_Vector Jv, N_Vector u,
+- booleantype *new_u, void *user_data)
++ sunbooleantype *new_u, void *user_data)
+ {
+ const SundialsNVector mfem_v(v);
+ SundialsNVector mfem_Jv(Jv);
+@@ -1874,7 +1943,7 @@ int KINSolver::LinSysSetup(N_Vector u, N_Vector, SUNMatrix J,
+
+ // Wrapper for solving linear systems J u = b
+ int KINSolver::LinSysSolve(SUNLinearSolver LS, SUNMatrix, N_Vector u,
+- N_Vector b, realtype)
++ N_Vector b, sunrealtype)
+ {
+ SundialsNVector mfem_u(u), mfem_b(b);
+ KINSolver *self = static_cast<KINSolver*>(GET_CONTENT(LS));
+@@ -1926,28 +1995,36 @@ int KINSolver::PrecSolve(N_Vector uu,
+
+ KINSolver::KINSolver(int strategy, bool oper_grad)
+ : global_strategy(strategy), use_oper_grad(oper_grad), y_scale(NULL),
+- f_scale(NULL), jacobian(NULL), maa(0)
++ f_scale(NULL), jacobian(NULL)
+ {
+ Y = new SundialsNVector();
+ y_scale = new SundialsNVector();
+ f_scale = new SundialsNVector();
+
+ // Default abs_tol and print_level
++#if MFEM_SUNDIALS_VERSION < 70000
+ abs_tol = pow(UNIT_ROUNDOFF, 1.0/3.0);
++#else
++ abs_tol = pow(SUN_UNIT_ROUNDOFF, 1.0/3.0);
++#endif
+ print_level = 0;
+ }
+
+ #ifdef MFEM_USE_MPI
+ KINSolver::KINSolver(MPI_Comm comm, int strategy, bool oper_grad)
+ : global_strategy(strategy), use_oper_grad(oper_grad), y_scale(NULL),
+- f_scale(NULL), jacobian(NULL), maa(0)
++ f_scale(NULL), jacobian(NULL)
+ {
+ Y = new SundialsNVector(comm);
+ y_scale = new SundialsNVector(comm);
+ f_scale = new SundialsNVector(comm);
+
+ // Default abs_tol and print_level
++#if MFEM_SUNDIALS_VERSION < 70000
+ abs_tol = pow(UNIT_ROUNDOFF, 1.0/3.0);
++#else
++ abs_tol = pow(SUN_UNIT_ROUNDOFF, 1.0/3.0);
++#endif
+ print_level = 0;
+ }
+ #endif
+@@ -2019,11 +2096,22 @@ void KINSolver::SetOperator(const Operator &op)
+ sundials_mem = KINCreate(Sundials::GetContext());
+ MFEM_VERIFY(sundials_mem, "Error in KINCreate().");
+
+- // Set number of acceleration vectors
+- if (maa > 0)
++ // Enable Anderson Acceleration
++ if (aa_n > 0)
+ {
+- flag = KINSetMAA(sundials_mem, maa);
++ flag = KINSetMAA(sundials_mem, aa_n);
+ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetMAA()");
++
++ flag = KINSetDelayAA(sundials_mem, aa_delay);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDelayAA()");
++
++ flag = KINSetDampingAA(sundials_mem, aa_damping);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDampingAA()");
++
++#if SUNDIALS_VERSION_MAJOR >= 6
++ flag = KINSetOrthAA(sundials_mem, aa_orth);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetOrthAA()");
++#endif
+ }
+
+ // Initialize KINSOL
+@@ -2034,6 +2122,9 @@ void KINSolver::SetOperator(const Operator &op)
+ flag = KINSetUserData(sundials_mem, this);
+ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetUserData()");
+
++ flag = KINSetDamping(sundials_mem, fp_damping);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDamping()");
++
+ // Set the linear solver
+ if (prec || jfnk)
+ {
+@@ -2045,7 +2136,7 @@ void KINSolver::SetOperator(const Operator &op)
+ if (A != NULL) { SUNMatDestroy(A); A = NULL; }
+ if (LSA != NULL) { SUNLinSolFree(LSA); LSA = NULL; }
+
+- LSA = SUNLinSol_SPGMR(*Y, PREC_NONE, 0, Sundials::GetContext());
++ LSA = SUNLinSol_SPGMR(*Y, SUN_PREC_NONE, 0, Sundials::GetContext());
+ MFEM_VERIFY(LSA, "error in SUNLinSol_SPGMR()");
+
+ flag = KINSetLinearSolver(sundials_mem, LSA, NULL);
+@@ -2114,12 +2205,12 @@ void KINSolver::SetJFNKSolver(Solver &solver)
+ if (LSA != NULL) { SUNLinSolFree(LSA); LSA = NULL; }
+
+ // Setup FGMRES
+- LSA = SUNLinSol_SPFGMR(*Y, prec ? PREC_RIGHT : PREC_NONE, maxli,
++ LSA = SUNLinSol_SPFGMR(*Y, prec ? SUN_PREC_RIGHT : SUN_PREC_NONE, maxli,
+ Sundials::GetContext());
+ MFEM_VERIFY(LSA, "error in SUNLinSol_SPFGMR()");
+
+ flag = SUNLinSol_SPFGMRSetMaxRestarts(LSA, maxlrs);
+- MFEM_VERIFY(flag == SUNLS_SUCCESS, "error in SUNLinSol_SPFGMR()");
++ MFEM_VERIFY(flag == SUN_SUCCESS, "error in SUNLinSol_SPFGMR()");
+
+ flag = KINSetLinearSolver(sundials_mem, LSA, NULL);
+ MFEM_VERIFY(flag == KIN_SUCCESS, "error in KINSetLinearSolver()");
+@@ -2145,15 +2236,52 @@ void KINSolver::SetMaxSetupCalls(int max_calls)
+ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetMaxSetupCalls()");
+ }
+
+-void KINSolver::SetMAA(int m_aa)
++void KINSolver::EnableAndersonAcc(int n, int orth, int delay, double damping)
+ {
+- // Store internally as maa must be set before calling KINInit() to
+- // set the maximum acceleration space size.
+- maa = m_aa;
+- if (sundials_mem)
++ if (sundials_mem != nullptr)
+ {
+- flag = KINSetMAA(sundials_mem, maa);
++ if (aa_n < n)
++ {
++ MFEM_ABORT("Subsequent calls to EnableAndersonAcc() must set"
++ " the subspace size to less or equal to the initially requested size."
++ " If SetOperator() has already been called, the subspace size can't be"
++ " increased.");
++ }
++
++ flag = KINSetMAA(sundials_mem, n);
+ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetMAA()");
++
++ flag = KINSetDelayAA(sundials_mem, delay);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDelayAA()");
++
++ flag = KINSetDampingAA(sundials_mem, damping);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDampingAA()");
++
++#if SUNDIALS_VERSION_MAJOR >= 6
++ flag = KINSetOrthAA(sundials_mem, orth);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetOrthAA()");
++#else
++ if (orth != KIN_ORTH_MGS)
++ {
++ MFEM_WARNING("SUNDIALS < v6 does not support setting the Anderson"
++ " acceleration orthogonalization routine!");
++ }
++#endif
++ }
++
++ aa_n = n;
++ aa_delay = delay;
++ aa_damping = damping;
++ aa_orth = orth;
++}
++
++void KINSolver::SetDamping(double damping)
++{
++ fp_damping = damping;
++ if (sundials_mem)
++ {
++ flag = KINSetDamping(sundials_mem, fp_damping);
++ MFEM_ASSERT(flag == KIN_SUCCESS, "error in KINSetDamping()");
+ }
+ }
+
+@@ -2239,18 +2367,21 @@ void KINSolver::Mult(Vector &x,
+
+ if (rank == 0)
+ {
++#if MFEM_SUNDIALS_VERSION < 70000
+ flag = KINSetPrintLevel(sundials_mem, print_level);
+ MFEM_VERIFY(flag == KIN_SUCCESS, "KINSetPrintLevel() failed!");
++#endif
++ // NOTE: there is no KINSetPrintLevel in SUNDIALS v7!
+
+ #ifdef SUNDIALS_BUILD_WITH_MONITORING
+ if (jfnk && print_level)
+ {
+ flag = SUNLinSolSetInfoFile_SPFGMR(LSA, stdout);
+- MFEM_VERIFY(flag == SUNLS_SUCCESS,
++ MFEM_VERIFY(flag == SUN_SUCCESS,
+ "error in SUNLinSolSetInfoFile_SPFGMR()");
+
+ flag = SUNLinSolSetPrintLevel_SPFGMR(LSA, 1);
+- MFEM_VERIFY(flag == SUNLS_SUCCESS,
++ MFEM_VERIFY(flag == SUN_SUCCESS,
+ "error in SUNLinSolSetPrintLevel_SPFGMR()");
+ }
+ #endif
+diff --git a/linalg/sundials.hpp b/linalg/sundials.hpp
+index f34b4deaf7..08a908c24c 100644
+--- a/linalg/sundials.hpp
++++ b/linalg/sundials.hpp
+@@ -54,6 +54,10 @@
+
+ #include <functional>
+
++#define MFEM_SUNDIALS_VERSION \
++ (SUNDIALS_VERSION_MAJOR*10000 + SUNDIALS_VERSION_MINOR*100 + \
++ SUNDIALS_VERSION_PATCH)
++
+ #if (SUNDIALS_VERSION_MAJOR < 6)
+
+ /// (DEPRECATED) Map SUNDIALS version >= 6 datatypes and constants to
+@@ -68,7 +72,30 @@ constexpr ARKODE_ERKTableID ARKODE_FEHLBERG_13_7_8 = FEHLBERG_13_7_8;
+ /// arbitrary type for more compact backwards compatibility
+ using SUNContext = void*;
+
+-#endif // SUNDIALS_VERSION_MAJOR < 6
++/// 'sunrealtype' was first introduced in v6.0.0
++typedef realtype sunrealtype;
++/// 'sunbooleantype' was first introduced in v6.0.0
++typedef booleantype sunbooleantype;
++
++/// New constant names introduced in v6.0.0
++enum { SUN_PREC_NONE, SUN_PREC_LEFT, SUN_PREC_RIGHT, SUN_PREC_BOTH };
++
++// KIN_ORTH_MGS was introduced in SUNDIALS v6; here, we define it just so that
++// it can be used as the default option in the second parameter of
++// KINSolver::EnableAndersonAcc -- the actual value of the parameter will be
++// ignored when using SUNDIALS < v6.
++#define KIN_ORTH_MGS 0
++
++#endif // #if SUNDIALS_VERSION_MAJOR < 6
++
++#if (SUNDIALS_VERSION_MAJOR < 7)
++
++/** @brief The enum constant SUN_SUCCESS was added in v7 as a replacement of
++ various *_SUCCESS macros that were removed in v7. */
++enum { SUN_SUCCESS = 0 };
++
++#endif // #if SUNDIALS_VERSION_MAJOR < 7
++
+
+ namespace mfem
+ {
+@@ -238,7 +265,14 @@ public:
+
+ #ifdef MFEM_USE_MPI
+ /// Returns the MPI communicator for the internal N_Vector x.
+- inline MPI_Comm GetComm() const { return *static_cast<MPI_Comm*>(N_VGetCommunicator(x)); }
++ inline MPI_Comm GetComm() const
++ {
++#if SUNDIALS_VERSION_MAJOR < 7
++ return *static_cast<MPI_Comm*>(N_VGetCommunicator(x));
++#else
++ return N_VGetCommunicator(x);
++#endif
++ }
+
+ /// Returns the MPI global length for the internal N_Vector x.
+ inline long GlobalSize() const { return N_VGetLength(x); }
+@@ -390,24 +424,26 @@ protected:
+ int root_components; /// Number of components in gout
+
+ /// Wrapper to compute the ODE rhs function.
+- static int RHS(realtype t, const N_Vector y, N_Vector ydot, void *user_data);
++ static int RHS(sunrealtype t, const N_Vector y, N_Vector ydot,
++ void *user_data);
+
+ /// Setup the linear system $ A x = b $.
+- static int LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+- booleantype jok, booleantype *jcur,
+- realtype gamma, void *user_data, N_Vector tmp1,
++ static int LinSysSetup(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix A,
++ sunbooleantype jok, sunbooleantype *jcur,
++ sunrealtype gamma, void *user_data, N_Vector tmp1,
+ N_Vector tmp2, N_Vector tmp3);
+
+ /// Solve the linear system $ A x = b $.
+ static int LinSysSolve(SUNLinearSolver LS, SUNMatrix A, N_Vector x,
+- N_Vector b, realtype tol);
++ N_Vector b, sunrealtype tol);
+
+ /// Prototype to define root finding for CVODE
+- static int root(realtype t, N_Vector y, realtype *gout, void *user_data);
++ static int root(sunrealtype t, N_Vector y, sunrealtype *gout,
++ void *user_data);
+
+ /// Typedef for root finding functions
+- typedef std::function<int(realtype t, Vector y, Vector gout, CVODESolver *)>
+- RootFunction;
++ typedef std::function<int(sunrealtype t, Vector y, Vector gout,
++ CVODESolver *)> RootFunction;
+
+ /// A class member to facilitate pointing to a user-specified root function
+ RootFunction root_func;
+@@ -415,7 +451,8 @@ protected:
+ /// Typedef declaration for error weight functions
+ typedef std::function<int(Vector y, Vector w, CVODESolver*)> EWTFunction;
+
+- /// A class member to facilitate pointing to a user-specified error weight function
++ /** @brief A class member to facilitate pointing to a user-specified error
++ weight function */
+ EWTFunction ewt_func;
+
+ public:
+@@ -449,7 +486,7 @@ public:
+ @note If this method is called a second time with a different problem
+ size, then any non-default user-set options will be lost and will need
+ to be set again. */
+- void Init(TimeDependentOperator &f_);
++ void Init(TimeDependentOperator &f_) override;
+
+ /// Integrate the ODE with CVODE using the specified step mode.
+ /** @param[in,out] x On output, the solution vector at the requested output
+@@ -460,7 +497,7 @@ public:
+ @note On input, the values of @a t and @a dt are used to compute desired
+ output time for the integration, tout = @a t + @a dt.
+ */
+- virtual void Step(Vector &x, double &t, double &dt);
++ void Step(Vector &x, double &t, double &dt) override;
+
+ /** @brief Attach the linear system setup and solve methods from the
+ TimeDependentOperator i.e., SUNImplicitSetup() and SUNImplicitSolve() to
+@@ -525,14 +562,15 @@ protected:
+ int indexB; ///< backward problem index
+
+ /// Wrapper to compute the ODE RHS Quadrature function.
+- static int RHSQ(realtype t, const N_Vector y, N_Vector qdot, void *user_data);
++ static int RHSQ(sunrealtype t, const N_Vector y, N_Vector qdot,
++ void *user_data);
+
+ /// Wrapper to compute the ODE RHS backward function.
+- static int RHSB(realtype t, N_Vector y,
++ static int RHSB(sunrealtype t, N_Vector y,
+ N_Vector yB, N_Vector yBdot, void *user_dataB);
+
+ /// Wrapper to compute the ODE RHS Backwards Quadrature function.
+- static int RHSQB(realtype t, N_Vector y, N_Vector yB,
++ static int RHSQB(sunrealtype t, N_Vector y, N_Vector yB,
+ N_Vector qBdot, void *user_dataB);
+
+ /// Error control function
+@@ -586,7 +624,7 @@ public:
+
+ @note On input, the values of t and dt are used to compute desired
+ output time for the integration, tout = t + dt. */
+- virtual void Step(Vector &x, double &t, double &dt);
++ void Step(Vector &x, double &t, double &dt) override;
+
+ /// Solve one adjoint time step
+ virtual void StepB(Vector &w, double &t, double &dt);
+@@ -648,15 +686,15 @@ public:
+ void SetSVtolerancesB(double reltol, Vector abstol);
+
+ /// Setup the linear system A x = b
+- static int LinSysSetupB(realtype t, N_Vector y, N_Vector yB, N_Vector fyB,
++ static int LinSysSetupB(sunrealtype t, N_Vector y, N_Vector yB, N_Vector fyB,
+ SUNMatrix A,
+- booleantype jok, booleantype *jcur,
+- realtype gamma, void *user_data, N_Vector tmp1,
++ sunbooleantype jok, sunbooleantype *jcur,
++ sunrealtype gamma, void *user_data, N_Vector tmp1,
+ N_Vector tmp2, N_Vector tmp3);
+
+ /// Solve the linear system A x = b
+ static int LinSysSolveB(SUNLinearSolver LS, SUNMatrix A, N_Vector x,
+- N_Vector b, realtype tol);
++ N_Vector b, sunrealtype tol);
+
+
+ /// Destroy the associated CVODES memory and SUNDIALS objects.
+@@ -689,33 +727,35 @@ protected:
+ RHS1 is explicit RHS and RHS2 the implicit RHS for IMEX integration. When
+ purely implicit or explicit only RHS1 is used. */
+ ///@{
+- static int RHS1(realtype t, const N_Vector y, N_Vector ydot, void *user_data);
+- static int RHS2(realtype t, const N_Vector y, N_Vector ydot, void *user_data);
++ static int RHS1(sunrealtype t, const N_Vector y, N_Vector ydot,
++ void *user_data);
++ static int RHS2(sunrealtype t, const N_Vector y, N_Vector ydot,
++ void *user_data);
+ ///@}
+
+ /// Setup the linear system $ A x = b $.
+- static int LinSysSetup(realtype t, N_Vector y, N_Vector fy, SUNMatrix A,
+- SUNMatrix M, booleantype jok, booleantype *jcur,
+- realtype gamma, void *user_data, N_Vector tmp1,
++ static int LinSysSetup(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix A,
++ SUNMatrix M, sunbooleantype jok, sunbooleantype *jcur,
++ sunrealtype gamma, void *user_data, N_Vector tmp1,
+ N_Vector tmp2, N_Vector tmp3);
+
+ /// Solve the linear system $ A x = b $.
+ static int LinSysSolve(SUNLinearSolver LS, SUNMatrix A, N_Vector x,
+- N_Vector b, realtype tol);
++ N_Vector b, sunrealtype tol);
+
+ /// Setup the linear system $ M x = b $.
+- static int MassSysSetup(realtype t, SUNMatrix M, void *user_data,
++ static int MassSysSetup(sunrealtype t, SUNMatrix M, void *user_data,
+ N_Vector tmp1, N_Vector tmp2, N_Vector tmp3);
+
+ /// Solve the linear system $ M x = b $.
+ static int MassSysSolve(SUNLinearSolver LS, SUNMatrix M, N_Vector x,
+- N_Vector b, realtype tol);
++ N_Vector b, sunrealtype tol);
+
+ /// Compute the matrix-vector product $ v = M x $.
+ static int MassMult1(SUNMatrix M, N_Vector x, N_Vector v);
+
+ /// Compute the matrix-vector product $v = M_t x $ at time t.
+- static int MassMult2(N_Vector x, N_Vector v, realtype t,
++ static int MassMult2(N_Vector x, N_Vector v, sunrealtype t,
+ void* mtimes_data);
+
+ public:
+@@ -751,7 +791,7 @@ public:
+ @note If this method is called a second time with a different problem
+ size, then any non-default user-set options will be lost and will need
+ to be set again. */
+- void Init(TimeDependentOperator &f_);
++ void Init(TimeDependentOperator &f_) override;
+
+ /// Integrate the ODE with ARKode using the specified step mode.
+ /**
+@@ -763,7 +803,7 @@ public:
+ @note On input, the values of @a t and @a dt are used to compute desired
+ output time for the integration, tout = @a t + @a dt.
+ */
+- virtual void Step(Vector &x, double &t, double &dt);
++ void Step(Vector &x, real_t &t, real_t &dt) override;
+
+ /** @brief Attach the linear system setup and solve methods from the
+ TimeDependentOperator i.e., SUNImplicitSetup() and SUNImplicitSolve() to
+@@ -850,18 +890,22 @@ protected:
+ bool use_oper_grad; ///< use the Jv prod function
+ mutable SundialsNVector *y_scale, *f_scale; ///< scaling vectors
+ const Operator *jacobian; ///< stores oper->GetGradient()
+- int maa; ///< number of acceleration vectors
+- bool jfnk = false; ///< enable JFNK
+- Vector wrk; ///< Work vector needed for the JFNK PC
+- int maxli = 5; ///< Maximum linear iterations
+- int maxlrs = 0; ///< Maximum linear solver restarts
++ int aa_n = 0; ///< number of acceleration vectors
++ int aa_delay; ///< Anderson Acceleration delay
++ double aa_damping; ///< Anderson Acceleration damping
++ int aa_orth; ///< Anderson Acceleration orthogonalization routine
++ double fp_damping = 1.0; ///< Fixed Point or Picard damping parameter
++ bool jfnk = false; ///< enable JFNK
++ Vector wrk; ///< Work vector needed for the JFNK PC
++ int maxli = 5; ///< Maximum linear iterations
++ int maxlrs = 0; ///< Maximum linear solver restarts
+
+ /// Wrapper to compute the nonlinear residual $ F(u) = 0 $.
+ static int Mult(const N_Vector u, N_Vector fu, void *user_data);
+
+ /// Wrapper to compute the Jacobian-vector product $ J(u) v = Jv $.
+ static int GradientMult(N_Vector v, N_Vector Jv, N_Vector u,
+- booleantype *new_u, void *user_data);
++ sunbooleantype *new_u, void *user_data);
+
+ /// Setup the linear system $ J u = b $.
+ static int LinSysSetup(N_Vector u, N_Vector fu, SUNMatrix J,
+@@ -869,7 +913,7 @@ protected:
+
+ /// Solve the linear system $ J u = b $.
+ static int LinSysSolve(SUNLinearSolver LS, SUNMatrix J, N_Vector u,
+- N_Vector b, realtype tol);
++ N_Vector b, sunrealtype tol);
+
+ /// Setup the preconditioner.
+ static int PrecSetup(N_Vector uu,
+@@ -916,7 +960,7 @@ public:
+ /** @note If this method is called a second time with a different problem
+ size, then non-default KINSOL-specific options will be lost and will need
+ to be set again. */
+- virtual void SetOperator(const Operator &op);
++ void SetOperator(const Operator &op) override;
+
+ /// Set the linear solver for inverting the Jacobian.
+ /** @note This function assumes that Operator::GetGradient(const Vector &)
+@@ -924,10 +968,10 @@ public:
+ SetOperator(const Operator &).
+
+ This method must be called after SetOperator(). */
+- virtual void SetSolver(Solver &solver);
++ void SetSolver(Solver &solver) override;
+
+ /// Equivalent to SetSolver(solver).
+- virtual void SetPreconditioner(Solver &solver) { SetSolver(solver); }
++ void SetPreconditioner(Solver &solver) override { SetSolver(solver); }
+
+ /// Set KINSOL's scaled step tolerance.
+ /** The default tolerance is $ U^\frac{2}{3} $ , where
+@@ -940,13 +984,22 @@ public:
+ @note This method must be called after SetOperator(). */
+ void SetMaxSetupCalls(int max_calls);
+
+- /// Set the number of acceleration vectors to use with KIN_FP or KIN_PICARD.
+- /** The default is 0.
+- @ note This method must be called before SetOperator() to set the
+- maximum size of the acceleration space. The value of @a maa can be
+- altered after SetOperator() is called but it can't be higher than initial
+- maximum. */
+- void SetMAA(int maa);
++ /// Enable Anderson Acceleration for KIN_FP or KIN_PICARD.
++ /** @note Has to be called once before SetOperator() in order to set up the
++ maximum subspace size. Subsequent calls need @a n less or equal to the
++ initial subspace size.
++ @param[in] n Anderson Acceleration subspace size
++ @param[in] orth Anderson Acceleration orthogonalization routine
++ @param[in] delay Anderson Acceleration delay
++ @param[in] damping Anderson Acceleration damping parameter valid from 0 <
++ d <= 1.0. Default is 1.0 (no damping) */
++ void EnableAndersonAcc(int n, int orth = KIN_ORTH_MGS, int delay = 0,
++ double damping = 1.0);
++
++ /// Specifies the value of the damping parameter in the fixed point or Picard
++ /// iteration.
++ /** param[in] damping fixed point iteration or Picard damping parameter */
++ void SetDamping(double damping);
+
+ /// Set the Jacobian Free Newton Krylov flag. The default is false.
+ /** This flag indicates to use JFNK as the linear solver for KINSOL. This
+@@ -967,10 +1020,10 @@ public:
+ void SetLSMaxRestarts(int m) { maxlrs = m; }
+
+ /// Set the print level for the KINSetPrintLevel function.
+- virtual void SetPrintLevel(int print_lvl) { print_level = print_lvl; }
++ void SetPrintLevel(int print_lvl) override { print_level = print_lvl; }
+
+ /// This method is not supported and will throw an error.
+- virtual void SetPrintLevel(PrintLevel);
++ void SetPrintLevel(PrintLevel) override;
+
+ /// Solve the nonlinear system $ F(x) = 0 $.
+ /** This method computes the x_scale and fx_scale vectors and calls the
+@@ -981,7 +1034,7 @@ public:
+ @param[in,out] x On input, initial guess, if @a #iterative_mode = true,
+ otherwise the initial guess is zero; on output, the
+ solution */
+- virtual void Mult(const Vector &b, Vector &x) const;
++ void Mult(const Vector &b, Vector &x) const override;
+
+ /// Solve the nonlinear system $ F(x) = 0 $.
+ /** Calls KINSol() to solve the nonlinear system. Before calling KINSol(),
diff --git a/var/spack/repos/builtin/packages/mfem/mfem-4.7.patch b/var/spack/repos/builtin/packages/mfem/mfem-4.7.patch
new file mode 100644
index 0000000000..6e0d3c7ef5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mfem/mfem-4.7.patch
@@ -0,0 +1,102 @@
+diff --git a/examples/hiop/ex9p.cpp b/examples/hiop/ex9p.cpp
+index 4facbb3c0b..f783b97a3b 100644
+--- a/examples/hiop/ex9p.cpp
++++ b/examples/hiop/ex9p.cpp
+@@ -96,6 +96,7 @@ public:
+ {
+ Vector w_glob(width);
+ pfes.Dof_TrueDof_Matrix()->MultTranspose(w, w_glob);
++ w_glob.HostReadWrite(); // read+write -> can use w_glob(i) (non-const)
+ for (int i = 0; i < width; i++) { grad(0, i) = w_glob(i); }
+ }
+
+diff --git a/linalg/sparsemat.cpp b/linalg/sparsemat.cpp
+index 0b5334d2a6..efe471d416 100644
+--- a/linalg/sparsemat.cpp
++++ b/linalg/sparsemat.cpp
+@@ -1267,24 +1267,32 @@ real_t SparseMatrix::InnerProduct(const Vector &x, const Vector &y) const
+
+ void SparseMatrix::GetRowSums(Vector &x) const
+ {
+- for (int i = 0; i < height; i++)
++ if (Finalized())
+ {
+- real_t a = 0.0;
+- if (A)
++ auto d_I = ReadI();
++ auto d_A = ReadData();
++ auto d_x = x.Write();
++ mfem::forall(height, [=] MFEM_HOST_DEVICE (int i)
+ {
+- for (int j = I[i], end = I[i+1]; j < end; j++)
++ real_t sum = 0.0;
++ for (int j = d_I[i], end = d_I[i+1]; j < end; j++)
+ {
+- a += A[j];
++ sum += d_A[j];
+ }
+- }
+- else
++ d_x[i] = sum;
++ });
++ }
++ else
++ {
++ for (int i = 0; i < height; i++)
+ {
++ real_t a = 0.0;
+ for (RowNode *np = Rows[i]; np != NULL; np = np->Prev)
+ {
+ a += np->Value;
+ }
++ x(i) = a;
+ }
+- x(i) = a;
+ }
+ }
+
+diff --git a/linalg/sparsemat.hpp b/linalg/sparsemat.hpp
+index 7042279663..dc2d773bc4 100644
+--- a/linalg/sparsemat.hpp
++++ b/linalg/sparsemat.hpp
+@@ -216,7 +216,7 @@ public:
+ void ClearCuSparse() { ClearGPUSparse(); }
+
+ /// Check if the SparseMatrix is empty.
+- bool Empty() const { return (A == NULL) && (Rows == NULL); }
++ bool Empty() const { return A.Empty() && (Rows == NULL); }
+
+ /// Return the array #I.
+ inline int *GetI() { return I; }
+diff --git a/tests/unit/general/test_umpire_mem.cpp b/tests/unit/general/test_umpire_mem.cpp
+index 84457669ec..d4a7b85093 100644
+--- a/tests/unit/general/test_umpire_mem.cpp
++++ b/tests/unit/general/test_umpire_mem.cpp
+@@ -18,12 +18,13 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include "umpire/Umpire.hpp"
++#include <umpire/strategy/QuickPool.hpp>
+
+ #ifdef MFEM_USE_CUDA
+ #include <cuda.h>
+ constexpr const char * device_name = "cuda";
+ #elif defined(MFEM_USE_HIP)
+-constexpr const char * device_name = "raja-hip";
++constexpr const char * device_name = "hip";
+ #endif
+
+ using namespace mfem;
+@@ -45,10 +46,12 @@ static bool is_pinned_host(void * h_p)
+ unsigned flags;
+ #ifdef MFEM_USE_CUDA
+ auto err = cudaHostGetFlags(&flags, h_p);
++ cudaGetLastError(); // also resets last error
+ if (err == cudaSuccess) { return true; }
+ else if (err == cudaErrorInvalidValue) { return false; }
+ #elif defined(MFEM_USE_HIP)
+ auto err = hipHostGetFlags(&flags, h_p);
++ hipGetLastError(); // also resets last error
+ if (err == hipSuccess) { return true; }
+ else if (err == hipErrorInvalidValue) { return false; }
+ #endif
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index 618b397181..93692ef580 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -6,7 +6,6 @@
import os
import shutil
import sys
-from platform import machine
from spack.package import *
@@ -52,6 +51,13 @@ class Mfem(Package, CudaPackage, ROCmPackage):
version("develop", branch="master")
version(
+ "4.7.0",
+ sha256="5e889493f5f79848f7b2d16afaae307c59880ac2a7ff2315551c60ca54717751",
+ url="https://bit.ly/mfem-4-7",
+ extension="tar.gz",
+ )
+
+ version(
"4.6.0",
sha256="5fa9465b5bec56bfb777a4d2826fba48d85fbace4aed8b64a2fd4059bf075b15",
url="https://bit.ly/mfem-4-6",
@@ -100,9 +106,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
extension="tar.gz",
)
- # Tagged development version used by xSDK
- version("4.0.1-xsdk", commit="c55c80d17b82d80de04b849dd526e17044f8c99a")
-
version(
"4.0.0",
sha256="df5bdac798ea84a263979f6fbf79de9013e1c55562f95f98644c3edcacfbc727",
@@ -155,14 +158,16 @@ class Mfem(Package, CudaPackage, ROCmPackage):
extension="tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
variant("static", default=True, description="Build static library")
variant("shared", default=False, description="Build shared library")
variant("mpi", default=True, sticky=True, description="Enable MPI parallelism")
- # Can we make the default value for 'metis' to depend on the 'mpi' value?
+ # Can we make the default value for "metis" to depend on the "mpi" value?
variant("metis", default=True, sticky=True, description="Enable METIS support")
variant("openmp", default=False, description="Enable OpenMP parallelism")
- # Note: '+cuda' and 'cuda_arch' variants are added by the CudaPackage
- # Note: '+rocm' and 'amdgpu_target' variants are added by the ROCmPackage
+ # Note: "+cuda" and "cuda_arch" variants are added by the CudaPackage
+ # Note: "+rocm" and "amdgpu_target" variants are added by the ROCmPackage
variant("occa", default=False, description="Enable OCCA backend")
variant("raja", default=False, description="Enable RAJA backend")
variant("libceed", default=False, description="Enable libCEED backend")
@@ -184,6 +189,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
variant("strumpack", default=False, description="Enable support for STRUMPACK")
variant("suite-sparse", default=False, description="Enable serial, sparse direct solvers")
variant("petsc", default=False, description="Enable PETSc solvers, preconditioners, etc.")
+ variant("mumps", default=False, description="Enable MUMPS solver.")
variant("slepc", default=False, description="Enable SLEPc integration")
variant("sundials", default=False, description="Enable Sundials time integrators")
variant("pumi", default=False, description="Enable functionality based on PUMI")
@@ -211,6 +217,21 @@ class Mfem(Package, CudaPackage, ROCmPackage):
variant("examples", default=False, description="Build and install examples")
variant("miniapps", default=False, description="Build and install miniapps")
variant("exceptions", default=False, description="Enable the use of exceptions")
+ variant(
+ "precision",
+ default="double",
+ values=("single", "double"),
+ multi=False,
+ description="Floating point precision",
+ when="@4.7.0:",
+ )
+ variant(
+ "cxxstd",
+ default="auto",
+ values=("auto", conditional("98", when="@:3"), "11", "14", "17"),
+ multi=False,
+ description="C++ language standard",
+ )
conflicts("+shared", when="@:3.3.2")
conflicts("~static~shared")
@@ -254,30 +275,28 @@ class Mfem(Package, CudaPackage, ROCmPackage):
conflicts("+slepc", when="~petsc")
conflicts("+pumi", when="~mpi")
conflicts("timer=mpi", when="~mpi")
+ conflicts("+mumps", when="~mpi")
# See https://github.com/mfem/mfem/issues/2957
conflicts("^mpich@4:", when="@:4.3+mpi")
depends_on("mpi", when="+mpi")
depends_on("hipsparse", when="@4.4.0:+rocm")
- depends_on("hypre@2.10.0:2.13", when="@:3.3+mpi")
- depends_on("hypre@:2.20.0", when="@3.4:4.2+mpi")
- depends_on("hypre@:2.23.0", when="@4.3.0+mpi")
- depends_on("hypre", when="+mpi")
- # Propagate 'cuda_arch' to 'hypre' without propagating the '+cuda'
- # variant because we want to allow 'mfem+cuda ^hypre~cuda':
+
+ with when("+mpi"):
+ depends_on("hypre")
+ depends_on("hypre@2.10.0:2.13", when="@:3.3")
+ depends_on("hypre@:2.20.0", when="@3.4:4.2")
+ depends_on("hypre@:2.23.0", when="@4.3.0")
+
+ # If hypre is built with +cuda, propagate cuda_arch
+ requires("^hypre@2.22.1:", when="+mpi+cuda ^hypre+cuda")
for sm_ in CudaPackage.cuda_arch_values:
- depends_on(
- "hypre@2.22.1:+cuda cuda_arch={0}".format(sm_),
- when="+mpi+cuda cuda_arch={0} ^hypre+cuda".format(sm_),
- )
- # Propagate 'amdgpu_target' to 'hypre' without propagating the '+rocm'
- # variant because we want to allow 'mfem+rocm ^hypre~rocm':
+ requires(f"^hypre cuda_arch={sm_}", when=f"+mpi+cuda cuda_arch={sm_} ^hypre+cuda")
+ # If hypre is built with +rocm, propagate amdgpu_target
+ requires("^hypre@2.23.0: ", when="+mpi+rocm ^hypre+rocm")
for gfx in ROCmPackage.amdgpu_targets:
- depends_on(
- "hypre@2.23.0:+rocm amdgpu_target={0}".format(gfx),
- when="+mpi+rocm amdgpu_target={0} ^hypre+rocm".format(gfx),
- )
+ requires(f"^hypre amdgpu_target={gfx}", when=f"+mpi+rocm amdgpu_target={gfx} ^hypre+rocm")
depends_on("metis", when="+metis")
depends_on("blas", when="+lapack")
@@ -287,10 +306,13 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("sundials@2.7.0+mpi+hypre", when="@:3.3.0+sundials+mpi")
depends_on("sundials@2.7.0:", when="@3.3.2:+sundials~mpi")
depends_on("sundials@2.7.0:+mpi+hypre", when="@3.3.2:+sundials+mpi")
- depends_on("sundials@5.0.0:5", when="@4.0.1-xsdk:4.4+sundials~mpi")
- depends_on("sundials@5.0.0:5+mpi+hypre", when="@4.0.1-xsdk:4.4+sundials+mpi")
- depends_on("sundials@5.0.0:", when="@4.5.0:+sundials~mpi")
- depends_on("sundials@5.0.0:+mpi+hypre", when="@4.5.0:+sundials+mpi")
+ depends_on("sundials@5.0.0:5", when="@4.1.0:4.4+sundials~mpi")
+ depends_on("sundials@5.0.0:5+mpi+hypre", when="@4.1.0:4.4+sundials+mpi")
+ depends_on("sundials@5.0.0:6.7.0", when="@4.5.0:4.6+sundials~mpi")
+ depends_on("sundials@5.0.0:6.7.0+mpi+hypre", when="@4.5.0:4.6+sundials+mpi")
+ depends_on("sundials@5.0.0:", when="@4.7.0:+sundials~mpi")
+ depends_on("sundials@5.0.0:+mpi+hypre", when="@4.7.0:+sundials+mpi")
+ conflicts("cxxstd=11", when="^sundials@6.4.0:")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
"sundials@5.4.0:+cuda cuda_arch={0}".format(sm_),
@@ -311,19 +333,17 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("gslib@1.0.7:", when="@4.3.0:+gslib")
depends_on("suite-sparse", when="+suite-sparse")
depends_on("superlu-dist", when="+superlu-dist")
- # Propagate 'cuda_arch' to 'superlu-dist' without propagating the '+cuda'
- # variant so we can build 'mfem+cuda+superlu-dist ^superlu-dist~cuda':
+ # If superlu-dist is built with +cuda, propagate cuda_arch
for sm_ in CudaPackage.cuda_arch_values:
- depends_on(
- "superlu-dist+cuda cuda_arch={0}".format(sm_),
- when="+superlu-dist+cuda cuda_arch={0} ^superlu-dist+cuda".format(sm_),
+ requires(
+ f"^superlu-dist cuda_arch={sm_}",
+ when=f"+superlu-dist+cuda cuda_arch={sm_} ^superlu-dist+cuda",
)
- # Propagate 'amdgpu_target' to 'superlu-dist' without propagating the '+rocm'
- # variant so we can build 'mfem+rocm+superlu-dist ^superlu-dist~rocm':
+ # If superlu-dist is built with +rocm, propagate amdgpu_target
for gfx in ROCmPackage.amdgpu_targets:
- depends_on(
- "superlu-dist+rocm amdgpu_target={0}".format(gfx),
- when="+superlu-dist+rocm amdgpu_target={0} ^superlu-dist+rocm".format(gfx),
+ requires(
+ f"^superlu-dist+rocm amdgpu_target={gfx}",
+ when=f"+superlu-dist+rocm amdgpu_target={gfx} ^superlu-dist+rocm",
)
depends_on("strumpack@3.0.0:", when="+strumpack~shared")
depends_on("strumpack@3.0.0:+shared", when="+strumpack+shared")
@@ -340,30 +360,23 @@ class Mfem(Package, CudaPackage, ROCmPackage):
# The PETSc tests in MFEM will fail if PETSc is not configured with
# MUMPS (and SuiteSparse in older versions). On the other hand, PETSc built
# with MUMPS is not strictly required, so we do not require it here.
- depends_on("petsc@3.8:+mpi+double+hypre", when="+petsc")
+ depends_on("petsc@3.8:+mpi+hypre", when="+petsc")
+ # rocPRIM is a dependency when using petsc+rocm and requires C++14 or newer:
+ conflicts("cxxstd=11", when="^rocprim@5.5.0:")
depends_on("slepc@3.8.0:", when="+slepc")
- # Propagate 'cuda_arch' to 'petsc'/'slepc' without propagating the '+cuda'
- # variant because we want to allow 'mfem+cuda+petsc ^petsc~cuda':
+ # If petsc is built with +cuda, propagate cuda_arch to petsc and slepc
for sm_ in CudaPackage.cuda_arch_values:
- depends_on(
- "petsc+cuda cuda_arch={0}".format(sm_),
- when="+cuda+petsc cuda_arch={0} ^petsc+cuda".format(sm_),
- )
- depends_on(
- "slepc+cuda cuda_arch={0}".format(sm_),
- when="+cuda+slepc cuda_arch={0} ^petsc+cuda".format(sm_),
- )
- # Propagate 'amdgpu_target' to 'petsc'/'slepc' without propagating the
- # '+rocm' variant because we want to allow 'mfem+rocm+petsc ^petsc~rocm':
+ requires(f"^petsc cuda_arch={sm_}", when=f"+cuda+petsc cuda_arch={sm_} ^petsc+cuda")
+ depends_on(f"slepc+cuda cuda_arch={sm_}", when=f"+cuda+slepc cuda_arch={sm_} ^petsc+cuda")
+ # If petsc is built with +rocm, propagate amdgpu_target to petsc and slepc
for gfx in ROCmPackage.amdgpu_targets:
- depends_on(
- "petsc+rocm amdgpu_target={0}".format(gfx),
- when="+rocm+petsc amdgpu_target={0} ^petsc+rocm".format(gfx),
+ requires(
+ f"^petsc amdgpu_target={gfx}", when=f"+rocm+petsc amdgpu_target={gfx} ^petsc+rocm"
)
depends_on(
- "slepc+rocm amdgpu_target={0}".format(gfx),
- when="+rocm+slepc amdgpu_target={0} ^petsc+rocm".format(gfx),
+ f"slepc+rocm amdgpu_target={gfx}", when=f"+rocm+slepc amdgpu_target={gfx} ^petsc+rocm"
)
+ depends_on("mumps@5.1.1:", when="+mumps")
depends_on("mpfr", when="+mpfr")
depends_on("netcdf-c@4.1.3:", when="+netcdf")
depends_on("unwind", when="+libunwind")
@@ -373,6 +386,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("conduit+mpi", when="+conduit+mpi")
depends_on("libfms@0.2.0:", when="+fms")
depends_on("ginkgo@1.4.0:", when="+ginkgo")
+ conflicts("cxxstd=11", when="^ginkgo")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
"ginkgo+cuda cuda_arch={0}".format(sm_), when="+ginkgo+cuda cuda_arch={0}".format(sm_)
@@ -407,13 +421,14 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("occa@1.0.8:", when="@:4.1+occa")
depends_on("occa@1.1.0", when="@4.2.0:+occa")
depends_on("occa+cuda", when="+occa+cuda")
- # TODO: propagate '+rocm' variant to occa when it is supported
+ # TODO: propagate "+rocm" variant to occa when it is supported
depends_on("raja@0.7.0:0.9.0", when="@4.0.0+raja")
depends_on("raja@0.10.0:0.12.1", when="@4.0.1:4.2.0+raja")
depends_on("raja@0.13.0", when="@4.3.0+raja")
depends_on("raja@0.14.0:2022.03", when="@4.4.0:4.5.0+raja")
depends_on("raja@2022.10.3:", when="@4.5.2:+raja")
+ conflicts("cxxstd=11", when="^raja@2022.03.0:")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
"raja+cuda cuda_arch={0}".format(sm_), when="+raja+cuda cuda_arch={0}".format(sm_)
@@ -441,6 +456,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("umpire@2.0.0:2.1.0", when="@:4.3.0+umpire")
depends_on("umpire@3.0.0:", when="@4.4.0:+umpire")
+ conflicts("cxxstd=11", when="^umpire@2022.03.0:")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
"umpire+cuda cuda_arch={0}".format(sm_), when="+umpire+cuda cuda_arch={0}".format(sm_)
@@ -460,6 +476,20 @@ class Mfem(Package, CudaPackage, ROCmPackage):
"amgx~mpi cuda_arch={0}".format(sm_), when="+amgx~mpi cuda_arch={0}".format(sm_)
)
+ for using_double_cond in ["@:4.6", "precision=double"]:
+ with when(using_double_cond):
+ # May need to enforce precision consistency on other packages in the
+ # future.
+ depends_on("hypre precision=double", when="+mpi")
+ depends_on("petsc+double", when="+petsc")
+ depends_on("mumps+double", when="+mumps")
+ with when("precision=single"):
+ # May need to enforce precision consistency on other packages in the
+ # future.
+ depends_on("hypre precision=single", when="+mpi")
+ depends_on("petsc~double", when="+petsc")
+ depends_on("mumps+float", when="+mumps")
+
patch("mfem_ppc_build.patch", when="@3.2:3.3.0 arch=ppc64le")
patch("mfem-3.4.patch", when="@3.4.0")
patch("mfem-3.3-3.4-petsc-3.9.patch", when="@3.3.0:3.4.0 +petsc ^petsc@3.9.0:")
@@ -480,6 +510,8 @@ class Mfem(Package, CudaPackage, ROCmPackage):
when="@4.6.0 +gslib+shared+miniapps",
sha256="2a31682d876626529e2778a216d403648b83b90997873659a505d982d0e65beb",
)
+ patch("mfem-4.7.patch", when="@4.7.0")
+ patch("mfem-4.7-sundials-7.patch", when="@4.7.0+sundials ^sundials@7:")
phases = ["configure", "build", "install"]
@@ -500,56 +532,16 @@ class Mfem(Package, CudaPackage, ROCmPackage):
# likely to be up to date in supporting *all* of MFEM's
# configuration options. So, don't use CMake
#
- def configure(self, spec, prefix):
+ def get_make_config_options(self, spec, prefix):
def yes_no(varstr):
return "YES" if varstr in self.spec else "NO"
- # See also find_system_libraries in lib/spack/llnl/util/filesystem.py
- # where the same list of paths is used.
- sys_lib_paths = [
- "/lib64",
- "/lib",
- "/usr/lib64",
- "/usr/lib",
- "/usr/local/lib64",
- "/usr/local/lib",
- "/usr/lib/x86_64-linux-gnu",
- ]
-
- def is_sys_lib_path(dir):
- return dir in sys_lib_paths
-
- xcompiler = ""
- xlinker = "-Wl,"
- if "+cuda" in spec:
- xcompiler = "-Xcompiler="
- xlinker = "-Xlinker="
- cuda_arch = None if "~cuda" in spec else spec.variants["cuda_arch"].value
+ xcompiler = "" if "~cuda" in spec else "-Xcompiler="
# We need to add rpaths explicitly to allow proper export of link flags
- # from within MFEM.
-
- # Similar to spec[pkg].libs.ld_flags but prepends rpath flags too.
- # Also does not add system library paths as defined by 'sys_lib_paths'
- # above -- this is done to avoid issues like this:
- # https://github.com/mfem/mfem/issues/1088.
- def ld_flags_from_library_list(libs_list):
- flags = [
- "%s-rpath,%s" % (xlinker, dir)
- for dir in libs_list.directories
- if not is_sys_lib_path(dir)
- ]
- flags += ["-L%s" % dir for dir in libs_list.directories if not is_sys_lib_path(dir)]
- flags += [libs_list.link_flags]
- return " ".join(flags)
-
- def ld_flags_from_dirs(pkg_dirs_list, pkg_libs_list):
- flags = [
- "%s-rpath,%s" % (xlinker, dir) for dir in pkg_dirs_list if not is_sys_lib_path(dir)
- ]
- flags += ["-L%s" % dir for dir in pkg_dirs_list if not is_sys_lib_path(dir)]
- flags += ["-l%s" % lib for lib in pkg_libs_list]
- return " ".join(flags)
+ # from within MFEM. We use the following two functions to do that.
+ ld_flags_from_library_list = self.ld_flags_from_library_list
+ ld_flags_from_dirs = self.ld_flags_from_dirs
def find_optional_library(name, prefix):
for shared in [True, False]:
@@ -592,8 +584,8 @@ class Mfem(Package, CudaPackage, ROCmPackage):
"PREFIX=%s" % prefix,
"MFEM_USE_MEMALLOC=YES",
"MFEM_DEBUG=%s" % yes_no("+debug"),
- # NOTE: env['CXX'] is the spack c++ compiler wrapper. The real
- # compiler is defined by env['SPACK_CXX'].
+ # NOTE: env["CXX"] is the spack c++ compiler wrapper. The real
+ # compiler is defined by env["SPACK_CXX"].
"CXX=%s" % env["CXX"],
"MFEM_USE_LIBUNWIND=%s" % yes_no("+libunwind"),
"%s=%s" % (zlib_var, yes_no("+zlib")),
@@ -628,7 +620,10 @@ class Mfem(Package, CudaPackage, ROCmPackage):
"MFEM_MPIEXEC=%s" % mfem_mpiexec,
"MFEM_MPIEXEC_NP=%s" % mfem_mpiexec_np,
"MFEM_USE_EXCEPTIONS=%s" % yes_no("+exceptions"),
+ "MFEM_USE_MUMPS=%s" % yes_no("+mumps"),
]
+ if spec.satisfies("@4.7.0:"):
+ options += ["MFEM_PRECISION=%s" % spec.variants["precision"].value]
# Determine C++ standard to use:
cxxstd = None
@@ -642,6 +637,14 @@ class Mfem(Package, CudaPackage, ROCmPackage):
cxxstd = "14"
if self.spec.satisfies("^ginkgo"):
cxxstd = "14"
+ # When rocPRIM is used (e.g. by PETSc + ROCm) we need C++14:
+ if self.spec.satisfies("^rocprim@5.5.0:"):
+ cxxstd = "14"
+ cxxstd_req = spec.variants["cxxstd"].value
+ if cxxstd_req != "auto":
+ # Constraints for valid standard level should be imposed during
+ # concretization based on 'conflicts' or other directives.
+ cxxstd = cxxstd_req
cxxstd_flag = None
if cxxstd:
if "+cuda" in spec:
@@ -649,6 +652,8 @@ class Mfem(Package, CudaPackage, ROCmPackage):
else:
cxxstd_flag = getattr(self.compiler, "cxx" + cxxstd + "_flag")
+ cuda_arch = None if "~cuda" in spec else spec.variants["cuda_arch"].value
+
cxxflags = spec.compiler_flags["cxxflags"].copy()
if cxxflags:
@@ -697,8 +702,10 @@ class Mfem(Package, CudaPackage, ROCmPackage):
if "+mpi" in spec:
options += ["MPICXX=%s" % spec["mpi"].mpicxx]
hypre = spec["hypre"]
- # The hypre package always links with 'blas' and 'lapack'.
- all_hypre_libs = hypre.libs + hypre["lapack"].libs + hypre["blas"].libs
+ all_hypre_libs = hypre.libs
+ if "+lapack" in hypre:
+ all_hypre_libs += hypre["lapack"].libs + hypre["blas"].libs
+
hypre_gpu_libs = ""
if "+cuda" in hypre:
hypre_gpu_libs = " -lcusparse -lcurand -lcublas"
@@ -767,7 +774,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
elif "^spectrum-mpi" in strumpack:
sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpi_ibm_mpifh"])]
if "+openmp" in strumpack:
- # The '+openmp' in the spec means strumpack will TRY to find
+ # The "+openmp" in the spec means strumpack will TRY to find
# OpenMP; if not found, we should not add any flags -- how do
# we figure out if strumpack found OpenMP?
if not self.spec.satisfies("%apple-clang"):
@@ -802,7 +809,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
)
sp_lib += [ld_flags_from_library_list(zfp_lib)]
if "+cuda" in strumpack:
- # assuming also ('+cuda' in spec)
+ # assuming also ("+cuda" in spec)
sp_lib += ["-lcusolver", "-lcublas"]
options += [
"STRUMPACK_OPT=%s" % " ".join(sp_opt),
@@ -917,7 +924,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
headers = find_headers("libunwind", libunwind.prefix.include)
headers.add_macro("-g")
libs = find_optional_library("libunwind", libunwind.prefix)
- # When mfem uses libunwind, it also needs 'libdl'.
+ # When mfem uses libunwind, it also needs "libdl".
libs += LibraryList(find_system_libraries("libdl"))
options += [
"LIBUNWIND_OPT=%s" % headers.cpp_flags,
@@ -976,14 +983,35 @@ class Mfem(Package, CudaPackage, ROCmPackage):
if "^rocthrust" in spec and not spec["hip"].external:
# petsc+rocm needs the rocthrust header path
hip_headers += spec["rocthrust"].headers
+ if "^rocprim" in spec and not spec["hip"].external:
+ # rocthrust [via petsc+rocm] has a dependency on rocprim
+ hip_headers += spec["rocprim"].headers
if "^hipblas" in spec and not spec["hip"].external:
# superlu-dist+rocm needs the hipblas header path
hip_headers += spec["hipblas"].headers
if "%cce" in spec:
# We assume the proper Cray CCE module (cce) is loaded:
- craylibs_path = env["CRAYLIBS_" + machine().upper()]
- craylibs = ["libmodules", "libfi", "libcraymath", "libf", "libu", "libcsup"]
+ proc = str(spec.target.family)
+ craylibs_var = "CRAYLIBS_" + proc.upper()
+ craylibs_path = env.get(craylibs_var, None)
+ if not craylibs_path:
+ raise InstallError(
+ f"The environment variable {craylibs_var} is not defined.\n"
+ "\tMake sure the 'cce' module is in the compiler spec."
+ )
+ craylibs = [
+ "libmodules",
+ "libfi",
+ "libcraymath",
+ "libf",
+ "libu",
+ "libcsup",
+ "libpgas-shmem",
+ ]
hip_libs += find_libraries(craylibs, craylibs_path)
+ craylibs_path2 = join_path(craylibs_path, "../../../cce-clang", proc, "lib")
+ hip_libs += find_libraries("libunwind", craylibs_path2)
+
if hip_headers:
options += ["HIP_OPT=%s" % hip_headers.cpp_flags]
if hip_libs:
@@ -1027,9 +1055,17 @@ class Mfem(Package, CudaPackage, ROCmPackage):
]
if "+umpire" in spec:
+ umpire = spec["umpire"]
+ umpire_opts = umpire.headers
+ umpire_libs = umpire.libs
+ if "^camp" in umpire:
+ umpire_opts += umpire["camp"].headers
+ if "^fmt" in umpire:
+ umpire_opts += umpire["fmt"].headers
+ umpire_libs += umpire["fmt"].libs
options += [
- "UMPIRE_OPT=-I%s" % spec["umpire"].prefix.include,
- "UMPIRE_LIB=%s" % ld_flags_from_library_list(spec["umpire"].libs),
+ "UMPIRE_OPT=%s" % umpire_opts.cpp_flags,
+ "UMPIRE_LIB=%s" % ld_flags_from_library_list(umpire_libs),
]
timer_ids = {"std": "0", "posix": "2", "mac": "4", "mpi": "6"}
@@ -1098,7 +1134,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
hiop_libs = hiop.libs
hiop_hdrs += spec["lapack"].headers + spec["blas"].headers
hiop_libs += spec["lapack"].libs + spec["blas"].libs
- hiop_opt_libs = ["magma", "umpire"]
+ hiop_opt_libs = ["magma", "umpire", "hipblas", "hiprand"]
for opt_lib in hiop_opt_libs:
if "^" + opt_lib in hiop:
hiop_hdrs += hiop[opt_lib].headers
@@ -1114,11 +1150,28 @@ class Mfem(Package, CudaPackage, ROCmPackage):
camp = raja["camp"]
hiop_hdrs += camp.headers
hiop_libs += find_optional_library("libcamp", camp.prefix)
+ if hiop.satisfies("@0.6:+cuda"):
+ hiop_libs += LibraryList(["cublas", "curand"])
options += [
"HIOP_OPT=%s" % hiop_hdrs.cpp_flags,
"HIOP_LIB=%s" % ld_flags_from_library_list(hiop_libs),
]
+ if "+mumps" in spec:
+ mumps = spec["mumps"]
+ mumps_opt = ["-I%s" % mumps.prefix.include]
+ if "+openmp" in mumps:
+ if not self.spec.satisfies("%apple-clang"):
+ mumps_opt += [xcompiler + self.compiler.openmp_flag]
+ options += [
+ "MUMPS_OPT=%s" % " ".join(mumps_opt),
+ "MUMPS_LIB=%s" % ld_flags_from_library_list(mumps.libs),
+ ]
+
+ return options
+
+ def configure(self, spec, prefix):
+ options = self.get_make_config_options(spec, prefix)
make("config", *options, parallel=False)
make("info", parallel=False)
@@ -1180,7 +1233,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
# Clean the 'examples' directory -- at least one example is always built
# and we do not want to cache executables.
make("examples/clean", parallel=False)
- self.cache_extra_test_sources([self.examples_src_dir, self.examples_data_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir, self.examples_data_dir])
def test_ex10(self):
"""build and run ex10(p)"""
@@ -1257,7 +1310,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
@property
def config_mk(self):
"""Export the location of the config.mk file.
- This property can be accessed using spec['mfem'].package.config_mk
+ This property can be accessed using spec["mfem"].package.config_mk
"""
dirs = [self.prefix, self.prefix.share.mfem]
for d in dirs:
@@ -1269,7 +1322,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
@property
def test_mk(self):
"""Export the location of the test.mk file.
- This property can be accessed using spec['mfem'].package.test_mk.
+ This property can be accessed using spec["mfem"].package.test_mk.
In version 3.3.2 and newer, the location of test.mk is also defined
inside config.mk, variable MFEM_TEST_MK.
"""
@@ -1279,3 +1332,46 @@ class Mfem(Package, CudaPackage, ROCmPackage):
if os.access(f, os.R_OK):
return FileList(f)
return FileList(find(self.prefix, "test.mk", recursive=True))
+
+ # See also find_system_libraries in lib/spack/llnl/util/filesystem.py
+ # where the similar list of paths is used.
+ sys_lib_paths = [
+ "/lib64",
+ "/lib",
+ "/usr/lib64",
+ "/usr/lib",
+ "/usr/local/lib64",
+ "/usr/local/lib",
+ "/usr/lib/x86_64-linux-gnu",
+ ]
+
+ def is_sys_lib_path(self, dir):
+ return dir in self.sys_lib_paths
+
+ @property
+ def xlinker(self):
+ return "-Wl," if "~cuda" in self.spec else "-Xlinker="
+
+ # Similar to spec[pkg].libs.ld_flags but prepends rpath flags too.
+ # Also does not add system library paths as defined by 'sys_lib_paths'
+ # above -- this is done to avoid issues like this:
+ # https://github.com/mfem/mfem/issues/1088.
+ def ld_flags_from_library_list(self, libs_list):
+ flags = [
+ "%s-rpath,%s" % (self.xlinker, dir)
+ for dir in libs_list.directories
+ if not self.is_sys_lib_path(dir)
+ ]
+ flags += ["-L%s" % dir for dir in libs_list.directories if not self.is_sys_lib_path(dir)]
+ flags += [libs_list.link_flags]
+ return " ".join(flags)
+
+ def ld_flags_from_dirs(self, pkg_dirs_list, pkg_libs_list):
+ flags = [
+ "%s-rpath,%s" % (self.xlinker, dir)
+ for dir in pkg_dirs_list
+ if not self.is_sys_lib_path(dir)
+ ]
+ flags += ["-L%s" % dir for dir in pkg_dirs_list if not self.is_sys_lib_path(dir)]
+ flags += ["-l%s" % lib for lib in pkg_libs_list]
+ return " ".join(flags)
diff --git a/var/spack/repos/builtin/packages/mfem/test_builds.sh b/var/spack/repos/builtin/packages/mfem/test_builds.sh
index cb658dd59c..be0d27bc0f 100755
--- a/var/spack/repos/builtin/packages/mfem/test_builds.sh
+++ b/var/spack/repos/builtin/packages/mfem/test_builds.sh
@@ -14,9 +14,9 @@ rocm_arch="gfx908"
spack_jobs=''
# spack_jobs='-j 128'
-mfem='mfem@4.6.0'${compiler}
+mfem='mfem@4.7.0'${compiler}
# mfem_dev='mfem@develop'${compiler}
-mfem_dev='mfem@4.6.0'${compiler}
+mfem_dev='mfem@4.7.0'${compiler}
backends='+occa+raja+libceed'
backends_specs='^occa~cuda ^raja~openmp'
@@ -31,44 +31,60 @@ petsc_spec_rocm='^petsc+rocm+mumps'
strumpack_spec='^strumpack~slate~openmp~cuda'
strumpack_cuda_spec='^strumpack+cuda~slate~openmp'
strumpack_rocm_spec='^strumpack+rocm~slate~openmp~cuda'
-# superlu specs with cuda and rocm
-superlu_cuda_spec='^superlu-dist+cuda'
-superlu_rocm_spec='^superlu-dist+rocm'
+# superlu specs with cpu, cuda and rocm
+# - v8.2.1 on CPU and GPU stalls in ex11p; works when superlu::PARMETIS is
+# replaced with superlu::METIS_AT_PLUS_A, at least on CPU
+superlu_spec='^superlu-dist@8.1.2'
+superlu_cuda_spec='^superlu-dist@8.1.2+cuda'
+superlu_rocm_spec='^superlu-dist@8.1.2+rocm'
+# FMS spec
+fms_spec='^libfms+conduit'
builds=(
# preferred version:
${mfem}
${mfem}'~mpi~metis~zlib'
- ${mfem}"$backends"'+superlu-dist+strumpack+suite-sparse+petsc+slepc+gslib \
- +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- '"$backends_specs $strumpack_spec $petsc_spec $conduit_spec"
+ # TODO: add back "+fms $fms_spec" when the FMS unit test is fixed
+ ${mfem}"$backends"'+superlu-dist+strumpack+mumps+suite-sparse+petsc+slepc \
+ +gslib+sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
+ +hiop \
+ '"$backends_specs $superlu_spec $strumpack_spec $petsc_spec"' \
+ '"$conduit_spec"
+ # TODO: add back "+fms $fms_spec" when the FMS unit test is fixed
${mfem}'~mpi \
'"$backends"'+suite-sparse+sundials+gslib+mpfr+netcdf \
+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
'"$backends_specs $conduit_spec"' ^sundials~mpi'
+ ${mfem}' precision=single +mumps+petsc '"$petsc_spec"
# develop version, shared builds:
${mfem_dev}'+shared~static'
${mfem_dev}'+shared~static~mpi~metis~zlib'
# NOTE: Shared build with +gslib works on mac but not on linux
# TODO: add back '+gslib' when the above NOTE is addressed.
+ # TODO: add back "+fms $fms_spec" when the FMS unit test is fixed
${mfem_dev}'+shared~static \
- '"$backends"'+superlu-dist+strumpack+suite-sparse+petsc+slepc \
+ '"$backends"'+superlu-dist+strumpack+mumps+suite-sparse+petsc+slepc \
+sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- '"$backends_specs $strumpack_spec $petsc_spec $conduit_spec"
+ '"$backends_specs $superlu_spec $strumpack_spec $petsc_spec"' \
+ '"$conduit_spec"
# NOTE: Shared build with +gslib works on mac but not on linux
# TODO: add back '+gslib' when the above NOTE is addressed.
+ # TODO: add back "+fms $fms_spec" when the FMS unit test is fixed
${mfem_dev}'+shared~static~mpi \
'"$backends"'+suite-sparse+sundials+mpfr+netcdf \
+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
'"$backends_specs $conduit_spec"' ^sundials~mpi'
+ ${mfem_dev}'+shared~static precision=single +mumps+petsc '"$petsc_spec"
)
builds2=(
# preferred version
${mfem}"$backends $backends_specs"
- ${mfem}'+superlu-dist'
+ ${mfem}' precision=single'
+ ${mfem}'+superlu-dist'" $superlu_spec"
${mfem}'+strumpack'" $strumpack_spec"
+ ${mfem}'+mumps'
${mfem}'+suite-sparse~mpi'
${mfem}'+suite-sparse'
${mfem}'+sundials~mpi ^sundials~mpi'
@@ -81,6 +97,8 @@ builds2=(
${mfem}'+gnutls'
${mfem}'+conduit~mpi'" $conduit_spec"
${mfem}'+conduit'" $conduit_spec"
+ # TODO: uncomment next line when the FMS unit test is fixed
+ # ${mfem}'+fms'" $fms_spec"
${mfem}'+umpire'
${mfem}'+petsc'" $petsc_spec"
${mfem}'+petsc+slepc'" $petsc_spec"
@@ -93,8 +111,10 @@ builds2=(
#
# develop version
${mfem_dev}"$backends $backends_specs"
- ${mfem_dev}'+superlu-dist'
+ ${mfem_dev}' precision=single'
+ ${mfem_dev}'+superlu-dist'" $superlu_spec"
${mfem_dev}'+strumpack'" $strumpack_spec"
+ ${mfem_dev}'+mumps'
${mfem_dev}'+suite-sparse~mpi'
${mfem_dev}'+suite-sparse'
${mfem_dev}'+sundials~mpi ^sundials~mpi'
@@ -107,6 +127,8 @@ builds2=(
${mfem_dev}'+gnutls'
${mfem_dev}'+conduit~mpi'" $conduit_spec"
${mfem_dev}'+conduit'" $conduit_spec"
+ # TODO: uncomment next line when the FMS unit test is fixed
+ # ${mfem_dev}'+fms'" $fms_spec"
${mfem_dev}'+umpire'
${mfem_dev}'+petsc'" $petsc_spec"
${mfem_dev}'+petsc+slepc'" $petsc_spec"
@@ -134,25 +156,37 @@ builds_cuda=(
# hypre without cuda:
# NOTE: PETSc tests may need PETSC_OPTIONS="-use_gpu_aware_mpi 0"
# TODO: restore '+libceed' when the libCEED CUDA unit tests take less time.
- # TODO: remove "^hiop+shared" when the default static build is fixed.
${mfem}'+cuda+openmp+raja+occa cuda_arch='"${cuda_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \
- +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \
+ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
+ ^raja+cuda+openmp'" $strumpack_cuda_spec"' \
'"$superlu_cuda_spec $petsc_spec_cuda $conduit_spec"
+ ${mfem}'+cuda cuda_arch='"${cuda_arch}"' +raja+umpire'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem}'+cuda cuda_arch='"${cuda_arch}"' +hiop'
+
# hypre with cuda:
# TODO: restore '+libceed' when the libCEED CUDA unit tests take less time.
# TODO: add back "+petsc+slepc $petsc_spec_cuda" when it works.
# NOTE: PETSc tests may need PETSC_OPTIONS="-use_gpu_aware_mpi 0"
# TODO: add back "+sundials" when it's supported with '^hypre+cuda'.
- # TODO: remove "^hiop+shared" when the default static build is fixed.
${mfem}'+cuda+openmp+raja+occa cuda_arch='"${cuda_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib \
- +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \
+ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
+ ^raja+cuda+openmp ^hypre+cuda \
'" $strumpack_cuda_spec $superlu_cuda_spec $conduit_spec"
+ ${mfem}'+cuda cuda_arch='"${cuda_arch}"' +raja+umpire ^hypre+cuda'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem}'+cuda cuda_arch='"${cuda_arch}"' +hiop ^hypre+cuda'
+
+ ${mfem}' precision=single +cuda cuda_arch='"${cuda_arch}"' ^hypre+cuda'
+
#
# same builds as above with ${mfem_dev}
#
@@ -171,24 +205,36 @@ builds_cuda=(
# hypre without cuda:
# NOTE: PETSc tests may need PETSC_OPTIONS="-use_gpu_aware_mpi 0"
# TODO: restore '+libceed' when the libCEED CUDA unit tests take less time.
- # TODO: remove "^hiop+shared" when the default static build is fixed.
${mfem_dev}'+cuda+openmp+raja+occa cuda_arch='"${cuda_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \
- +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \
+ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
+ ^raja+cuda+openmp'" $strumpack_cuda_spec"' \
'"$superlu_cuda_spec $petsc_spec_cuda $conduit_spec"
+ ${mfem_dev}'+cuda cuda_arch='"${cuda_arch}"' +raja+umpire'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem_dev}'+cuda cuda_arch='"${cuda_arch}"' +hiop'
+
# hypre with cuda:
# TODO: restore '+libceed' when the libCEED CUDA unit tests take less time.
# TODO: add back "+petsc+slepc $petsc_spec_cuda" when it works.
# NOTE: PETSc tests may need PETSC_OPTIONS="-use_gpu_aware_mpi 0"
# TODO: add back "+sundials" when it's supported with '^hypre+cuda'.
- # TODO: remove "^hiop+shared" when the default static build is fixed.
${mfem_dev}'+cuda+openmp+raja+occa cuda_arch='"${cuda_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib \
- +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \
- ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \
+ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
+ ^raja+cuda+openmp ^hypre+cuda \
'"$strumpack_cuda_spec $superlu_cuda_spec $conduit_spec"
+
+ ${mfem_dev}'+cuda cuda_arch='"${cuda_arch}"' +raja+umpire ^hypre+cuda'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem_dev}'+cuda cuda_arch='"${cuda_arch}"' +hiop ^hypre+cuda'
+
+ ${mfem_dev}' precision=single +cuda cuda_arch='"${cuda_arch}"' ^hypre+cuda'
)
@@ -204,27 +250,35 @@ builds_rocm=(
^raja+rocm~openmp ^occa~cuda~openmp ^hypre+rocm'
# hypre without rocm:
- # TODO: add back '+hiop' when it is no longer linked with tcmalloc* through
- # its magma dependency.
- # TODO: add back '+ginkgo' when the Ginkgo example works.
${mfem}'+rocm+openmp+raja+occa+libceed amdgpu_target='"${rocm_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \
- +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \
+ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
^raja+rocm~openmp ^occa~cuda'" $strumpack_rocm_spec"' \
'"$superlu_rocm_spec $petsc_spec_rocm $conduit_spec"
+ ${mfem}'+rocm amdgpu_target='"${rocm_arch}"' +raja+umpire'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem}'+rocm amdgpu_target='"${rocm_arch}"' +hiop'
+
# hypre with rocm:
# TODO: add back "+petsc+slepc $petsc_spec_rocm" when it works.
- # TODO: add back '+hiop' when it is no longer linked with tcmalloc* through
- # its magma dependency.
- # TODO: add back '+ginkgo' when the Ginkgo example works.
# TODO: add back "+sundials" when it's supported with '^hypre+rocm'.
${mfem}'+rocm+openmp+raja+occa+libceed amdgpu_target='"${rocm_arch}"' \
+superlu-dist+strumpack+suite-sparse+gslib \
- +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \
+ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo \
^raja+rocm~openmp ^occa~cuda ^hypre+rocm \
'"$strumpack_rocm_spec $superlu_rocm_spec $conduit_spec"
+ ${mfem}'+rocm amdgpu_target='"${rocm_arch}"' +raja+umpire ^hypre+rocm'
+
+ # hiop needs older versions of raja, umpire, etc
+ # TODO: combine this spec with the above spec when the combined spec works.
+ ${mfem}'+rocm amdgpu_target='"${rocm_arch}"' +hiop ^hypre+rocm'
+
+ ${mfem}' precision=single +rocm amdgpu_target='"${rocm_arch}"' ^hypre+rocm'
+
#
# same builds as above with ${mfem_dev}
#
@@ -244,6 +298,8 @@ run_builds=("${builds[@]}" "${builds2[@]}")
# PETSc CUDA tests on Lassen need this:
# export PETSC_OPTIONS="-use_gpu_aware_mpi 0"
+# STRUMPACK forces "^openblas threads=openmp" when using openblas:
+export OMP_NUM_THREADS=1
# spack files to clean in "$mfem_src_dir" when using 'dev-build'
clean_files=(
diff --git a/var/spack/repos/builtin/packages/mg/package.py b/var/spack/repos/builtin/packages/mg/package.py
index 81097f0a16..6a1c68807f 100644
--- a/var/spack/repos/builtin/packages/mg/package.py
+++ b/var/spack/repos/builtin/packages/mg/package.py
@@ -18,6 +18,8 @@ class Mg(MakefilePackage):
version("6.6", sha256="e8440353da1a52ec7d40fb88d4f145da49c320b5ba31daf895b0b0db5ccd0632")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/mgard/package.py b/var/spack/repos/builtin/packages/mgard/package.py
index d0f9bd7a7a..12ee2e071c 100644
--- a/var/spack/repos/builtin/packages/mgard/package.py
+++ b/var/spack/repos/builtin/packages/mgard/package.py
@@ -22,12 +22,16 @@ class Mgard(CMakePackage, CudaPackage):
license("Apache-2.0")
- version("2023-03-31", commit="a8a04a86ff30f91d0b430a7c52960a12fa119589", preferred=True)
+ version("2023-12-09", commit="d61d8c06c49a72b2e582cc02de88b7b27e1275d2", preferred=True)
+ version("2023-03-31", commit="a8a04a86ff30f91d0b430a7c52960a12fa119589")
version("2023-01-10", commit="3808bd8889a0f8e6647fc0251a3189bc4dfc920f")
version("2022-11-18", commit="72dd230ed1af88f62ed3c0f662e2387a6e587748")
version("2021-11-12", commit="3c05c80a45a51bb6cc5fb5fffe7b1b16787d3366")
version("2020-10-01", commit="b67a0ac963587f190e106cc3c0b30773a9455f7a")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant(
"serial",
when="@2022-11-18:",
@@ -46,25 +50,40 @@ class Mgard(CMakePackage, CudaPackage):
depends_on("python", type=("build",), when="@2022-11-18:")
depends_on("sed", type=("build",), when="@2022-11-18:")
depends_on("zlib-api")
+ depends_on("zlib@1.2.9:", when="^[virtuals=zlib-api] zlib") # crc32_z
depends_on("pkgconfig", type=("build",), when="@2022-11-18:")
depends_on("zstd")
- depends_on("protobuf@:3.21.12", when="@2022-11-18:")
+ depends_on("protobuf@3.4:", when="@2022-11-18:")
depends_on("libarchive", when="@2021-11-12:")
depends_on("tclap", when="@2021-11-12")
depends_on("yaml-cpp", when="@2021-11-12:")
depends_on("cmake@3.19:", type="build")
depends_on("nvcomp@2.2.0:", when="@2022-11-18:+cuda")
depends_on("nvcomp@2.0.2", when="@:2021-11-12+cuda")
+ with when("+openmp"):
+ depends_on("llvm-openmp", when="%apple-clang")
+
conflicts("cuda_arch=none", when="+cuda")
conflicts(
"~cuda", when="@2021-11-12", msg="without cuda MGARD@2021-11-12 has undefined symbols"
)
conflicts("%gcc@:7", when="@2022-11-18:", msg="requires std::optional and other c++17 things")
+ conflicts("protobuf@3.22:", when="target=ppc64le", msg="GCC 9.4 segfault in CI")
+ conflicts("protobuf@3.22:", when="+cuda target=aarch64:", msg="nvcc fails on ARM SIMD headers")
+ # https://github.com/abseil/abseil-cpp/issues/1629
+ conflicts("abseil-cpp@20240116.1", when="+cuda", msg="triggers nvcc parser bug")
def flag_handler(self, name, flags):
if name == "cxxflags":
- if self.spec.satisfies("@2020-10-01 %oneapi@2023:"):
- flags.append("-Wno-error=c++11-narrowing")
+ for a_spec in [
+ "@2020-10-01 %oneapi@2023:",
+ "@2020-10-01 %apple-clang@15:",
+ "@2020-10-01 %aocc@3:",
+ "@2020-10-01 %cce@15:",
+ "@2020-10-01 %rocmcc@4:",
+ ]:
+ if self.spec.satisfies(a_spec):
+ flags.append("-Wno-error=c++11-narrowing")
return (flags, None, None)
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/mgardx/package.py b/var/spack/repos/builtin/packages/mgardx/package.py
index ecbe45b209..8a105d123d 100644
--- a/var/spack/repos/builtin/packages/mgardx/package.py
+++ b/var/spack/repos/builtin/packages/mgardx/package.py
@@ -23,6 +23,9 @@ class Mgardx(CMakePackage):
version("2022-01-27", commit="aabe9de1a331eaeb8eec41125dd45e30c1d03af4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sz-cpp")
depends_on("pkgconfig")
depends_on("zstd")
diff --git a/var/spack/repos/builtin/packages/mgcfd-op2/package.py b/var/spack/repos/builtin/packages/mgcfd-op2/package.py
index 8ad20e6dd2..6eaa3b0794 100644
--- a/var/spack/repos/builtin/packages/mgcfd-op2/package.py
+++ b/var/spack/repos/builtin/packages/mgcfd-op2/package.py
@@ -23,6 +23,9 @@ class MgcfdOp2(MakefilePackage):
version("v1.0.0-rc1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI support")
depends_on("gmake@4.3:")
@@ -40,26 +43,21 @@ class MgcfdOp2(MakefilePackage):
env.set("COMPILER", self.spec.compiler.name)
# Set Fortran compiler to GCC if using Arm.
- if self.spec.compiler.name == "arm":
+ if self.spec.satisfies("%arm"):
env.set("OP2_F_COMPILER", "gnu")
# This overrides a flag issue in downstream OP2.
- if self.spec.compiler.name == "nvhpc":
+ if self.spec.satisfies("%nvhpc"):
env.set("CFLAGS", "-O3 -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK -DMPIPP_H")
def edit(self, spec, prefix):
# Makefile tweaks to ensure the correct compiler commands are called.
makefile = FileFilter("Makefile")
- if self.spec.compiler.name == "arm":
+ if self.spec.satisfies("%arm"):
makefile.filter(r"CPP := clang", r"CPP := armclang")
makefile.filter(r"-cxx=clang.*", "")
- # Cray systems require use of 'cc' and 'CC' to call correct mpi wrappers
- if self.spec.platform == "cray":
- makefile.filter("mpicc", "cc")
- makefile.filter("mpicxx", "CC")
-
- if self.spec.compiler.name == "nvhpc":
+ if self.spec.satisfies("%nvhpc"):
makefile.filter("pgc", "nvc")
@property
diff --git a/var/spack/repos/builtin/packages/mgis/package.py b/var/spack/repos/builtin/packages/mgis/package.py
index a4dcb003bb..3ed05d7db3 100644
--- a/var/spack/repos/builtin/packages/mgis/package.py
+++ b/var/spack/repos/builtin/packages/mgis/package.py
@@ -48,6 +48,10 @@ class Mgis(CMakePackage):
version("1.0.1", sha256="6102621455bc5d9b1591cd33e93b2e15a9572d2ce59ca6dfa30ba57ae1265c08")
version("1.0", sha256="279c98da00fa6855edf29c2b8f8bad6e7732298dc62ef67d028d6bbeaac043b3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# variants
variant("c", default=True, description="Enables c bindings")
variant("fortran", default=True, description="Enables fortran bindings")
diff --git a/var/spack/repos/builtin/packages/microbiomeutil/package.py b/var/spack/repos/builtin/packages/microbiomeutil/package.py
index 5bc771a1fb..9e62835cef 100644
--- a/var/spack/repos/builtin/packages/microbiomeutil/package.py
+++ b/var/spack/repos/builtin/packages/microbiomeutil/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Microbiomeutil(MakefilePackage, SourceforgePackage):
"""Microbiome analysis utilities"""
- homepage = "http://microbiomeutil.sourceforge.net/"
+ homepage = "https://microbiomeutil.sourceforge.net/"
sourceforge_mirror_path = "microbiomeutil/microbiomeutil-r20110519.tgz"
version("20110519", sha256="9233de80ea57bfb9e9371cbe7e3bfad2d4a51168fddaf60fa144c4046c80d823")
+ depends_on("c", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("blast-plus")
depends_on("cdbfasta")
diff --git a/var/spack/repos/builtin/packages/micromamba/package.py b/var/spack/repos/builtin/packages/micromamba/package.py
index 0effbe21e5..a157413c03 100644
--- a/var/spack/repos/builtin/packages/micromamba/package.py
+++ b/var/spack/repos/builtin/packages/micromamba/package.py
@@ -28,6 +28,8 @@ class Micromamba(CMakePackage):
version("1.4.2", sha256="dce034908d02d991c5e9aadeb9d01f139d027ba199aaeb1d47d543e3f24895d1")
version("1.1.0", sha256="e2392cd90221234ae8ea92b37f40829fbe36d80278056269aa1994a5efe7f530")
+ depends_on("cxx", type="build") # generated
+
variant(
"linkage",
default="dynamic",
diff --git a/var/spack/repos/builtin/packages/microsocks/package.py b/var/spack/repos/builtin/packages/microsocks/package.py
index cad5b337d0..86c0c0de87 100644
--- a/var/spack/repos/builtin/packages/microsocks/package.py
+++ b/var/spack/repos/builtin/packages/microsocks/package.py
@@ -23,6 +23,8 @@ class Microsocks(MakefilePackage):
version("develop", branch="master")
version("1.0.2", sha256="5ece77c283e71f73b9530da46302fdb4f72a0ae139aa734c07fe532407a6211a")
+ depends_on("c", type="build") # generated
+
def flag_handler(self, name, flags):
if name == "cflags":
flags.append(self.compiler.c99_flag)
diff --git a/var/spack/repos/builtin/packages/migraphx/0002-restrict-python-2.7-usage.patch b/var/spack/repos/builtin/packages/migraphx/0002-restrict-python-2.7-usage.patch
deleted file mode 100644
index 8cb736a9b5..0000000000
--- a/var/spack/repos/builtin/packages/migraphx/0002-restrict-python-2.7-usage.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cmake/PythonModules.cmake b/cmake/PythonModules.cmake
-index 96727cc..51a970c 100755
---- a/cmake/PythonModules.cmake
-+++ b/cmake/PythonModules.cmake
-@@ -53,7 +53,7 @@ function(py_add_module NAME)
- )
-
- endfunction()
--set(PYTHON_SEARCH_VERSIONS 2.7 3.5 3.6 3.7 3.8 3.9)
-+set(PYTHON_SEARCH_VERSIONS 3.5 3.6 3.7 3.8 3.9)
-
- set(_PYTHON_VERSIONS)
- foreach(PYTHON_VERSION ${PYTHON_SEARCH_VERSIONS})
diff --git a/var/spack/repos/builtin/packages/migraphx/0003-add-half-include-directory-migraphx-6.0.patch b/var/spack/repos/builtin/packages/migraphx/0003-add-half-include-directory-migraphx-6.0.patch
new file mode 100644
index 0000000000..6133a2f767
--- /dev/null
+++ b/var/spack/repos/builtin/packages/migraphx/0003-add-half-include-directory-migraphx-6.0.patch
@@ -0,0 +1,23 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a76fb11..0f589d0 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,7 +57,8 @@ else()
+ option(MIGRAPHX_ENABLE_PYTHON "Enable python bindings" ON)
+ endif()
+
+-find_path(HALF_INCLUDE_DIR half.hpp PATH_SUFFIXES half)
++find_path(HALF_INCLUDE_DIR half.hpp)
++
+ if (NOT HALF_INCLUDE_DIR)
+ message(FATAL_ERROR "Could not find half.hpp - Please check that the install path of half.hpp has been added to CMAKE_PREFIX_PATH")
+ else()
+@@ -278,7 +279,7 @@ if(BUILD_TESTING)
+ add_subdirectory(test)
+ endif()
+ add_subdirectory(tools)
+-
++target_include_directories(migraphx PUBLIC "${NLOHMANN_JSON_INCLUDE} ${HALF_INCLUDE_DIR}")
+ set(DEST_DIR ${CMAKE_BINARY_DIR})
+ file(GLOB backend_files ${CMAKE_SOURCE_DIR}/src/py/backend/*.py)
+ file(MAKE_DIRECTORY ${DEST_DIR}/lib/onnx_migraphx)
diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py
index 1245a48109..1d2c465c26 100644
--- a/var/spack/repos/builtin/packages/migraphx/package.py
+++ b/var/spack/repos/builtin/packages/migraphx/package.py
@@ -11,119 +11,63 @@ from spack.package import *
class Migraphx(CMakePackage):
"""AMD's graph optimization engine."""
- homepage = "https://github.com/ROCmSoftwarePlatform/AMDMIGraphX"
- git = "https://github.com/ROCmSoftwarePlatform/AMDMIGraphX.git"
- url = "https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/AMDMIGraphX"
+ git = "https://github.com/ROCm/AMDMIGraphX.git"
+ url = "https://github.com/ROCm/AMDMIGraphX/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["libmigraphx"]
license("MIT")
-
+ version("6.2.4", sha256="849cca3c7c98dc437e42ac17013f86ef0a5fd202cb87b7822778bd9a8f93d293")
+ version("6.2.1", sha256="a9479fd6846bae4a888f712c2fecee6a252951ae8979d9990b100450e4cd6c30")
+ version("6.2.0", sha256="7b36c1a0c44dd21f31ce6c9c4e7472923281aa7fdc693e75edd2670b101a6d48")
+ version("6.1.2", sha256="829f4a2bd9fe3dee130dfcca103ddc7691da18382f5b683aaca8f3ceceaef355")
+ version("6.1.1", sha256="e14a62678e97356236b45921e24f28ff430d670fb70456c3e5ebfeeb22160811")
+ version("6.1.0", sha256="2ba44146397624845c64f3898bb1b08837ad7a49f133329e58eb04c05d1f36ac")
+ version("6.0.2", sha256="13f393f8fdf25275994dda07091a93eec867233cd2f99f9cb0df16fbabd53483")
+ version("6.0.0", sha256="7bb3f5011da9b1f3b79707b06118c523c1259215f650c2ffa5622a7e1d88868f")
version("5.7.1", sha256="3e58c043a5a7d1357ee05725fd6cd41e190b070f1ba57f61300128429902089c")
version("5.7.0", sha256="14f13554367d2d6490d66f8b5b739203225e7acce25085559e7c4acf29e2a4d5")
version("5.6.1", sha256="b108c33f07572ffd880b20f6de06f1934ab2a1b41ae69095612322ac412fa91c")
version("5.6.0", sha256="eaec90535d62002fd5bb264677ad4a7e30c55f18d2a287680d0495c7e60432b2")
version("5.5.1", sha256="e71c4744f8ef6a1a99c179bbad94b8fe9bd7686eaa9397f376b70988c3341f0c")
version("5.5.0", sha256="6084eb596b170f5e38f22b5fa37e66aa43a8cbc626712c9f03cde48c8fecfc8f")
- version("5.4.3", sha256="f83e7bbe5d6d0951fb2cf0abf7e8b3530e9a5e45f7cec6d760da055d6905d568")
- version("5.4.0", sha256="b6e7f4a1bf445ea0dae644ed5722369cde66fbee82a5917722f5d3f8c48b0a8c")
- version("5.3.3", sha256="91d91902bbedd5e1951a231e8e5c9a328360b128c731912ed17c8059df38e02a")
- version("5.3.0", sha256="d0b7283f42e03fb38b612868b8c94f46f27a6e0b019ae95fde5b9086582a1c69")
- version("5.2.3", sha256="03f7d49f2efdd2c7a6afcaa5a5db5103edc15047b0ff5e146a775cfb36b36af2")
- version("5.2.1", sha256="300d990e1b92ad27c3eba3e94ef34538730ca9556398b8b9f7d61d28bf66c57d")
- version("5.2.0", sha256="33afcdf52c6e0e3a2f939fcf30e87f712b8e8ef3633a3dc03a19fea359704925")
- version("5.1.3", sha256="686e068774500a46b6e6488370bbf5bd0bba6d19ecdb00636f951704d19c9ef2")
- version("5.1.0", sha256="6398efaef18a74f2a475aa21bd34bc7c077332a430ee3f6ba4fde6e6a6aa9f89")
- version(
- "5.0.2",
- sha256="3ef48ac03b909d1a1aa1f91f365ce64af2ce66635b6efb5ad0b207dc51ff2fd6",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="779a91ccfa4c2576251189f0c646ff7707c3646319c7d5dd137872beb52d2953",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="ecfd9a8e7967076f056d5b6a90b22f8919b82226443769b181193f16ebf58b83",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="8d243a48406af7f960c03bc28a16fad931de8e008ae848799adae504cc5f1355",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="e0b04da37aed937a2b2218059c189559a15460c191b5e9b00c7366c81c90b06e",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="99cf202a5e86cf5502b0f8bf12f152dbd5a6aacc204b3d9d5efca67a54793408",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="93f22f6c641dde5d7fb8abcbd99621b3c81e332e125a6f3a258d5e4cf2055f55",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="f9b1d2e25cdbaf5d0bfb07d4c8ccef0abaa291757c4bce296c3b5b9488174045",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="b8b845249626e9169353dbfa2530db468972a7569b248c8118ff19e029a12e55",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="eda22b9af286afb7806e6b5d5ebb0d612dce87c9bad64ba5176fda1c2ed9c9b7",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="7649689e06522302c07b39abb88bdcc3d4de18a7559d4f6a9e238e92b2074032",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="08fa991349a2b95364b0a69be7960580c3e3fde2fda0f0c67bc41429ea2d67a0",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="697c3c7babaa025eaabec630dbd8a87d10dc4fe35fafa3b0d3463aaf1fc46399",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="5766f3b262468c500be5051a056811a8edfa741734a5c08c4ecb0337b7906377",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="f83e7bbe5d6d0951fb2cf0abf7e8b3530e9a5e45f7cec6d760da055d6905d568")
+ version("5.4.0", sha256="b6e7f4a1bf445ea0dae644ed5722369cde66fbee82a5917722f5d3f8c48b0a8c")
+ version("5.3.3", sha256="91d91902bbedd5e1951a231e8e5c9a328360b128c731912ed17c8059df38e02a")
+ version("5.3.0", sha256="d0b7283f42e03fb38b612868b8c94f46f27a6e0b019ae95fde5b9086582a1c69")
- def url_for_version(self, version):
- url = "https://github.com/ROCmSoftwarePlatform/AMDMIGraphX/archive/"
- if version <= Version("3.5.0"):
- url += "{0}.tar.gz".format(version)
- else:
- url += "rocm-{0}.tar.gz".format(version)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- return url
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
- patch("0001-Adding-nlohmann-json-include-directory.patch", when="@3.9.0:5.5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ patch("0001-Adding-nlohmann-json-include-directory.patch", when="@:5.5")
# Restrict Python 2.7 usage to fix the issue below
# https://github.com/spack/spack/issues/24429
- patch("0002-restrict-python-2.7-usage.patch", when="@3.9.0:5.1.3")
patch("0003-restrict-python-2.7-usage.patch", when="@5.2.0:5.4")
patch("0004-restrict-python2.7-usage-for-5.5.0.patch", when="@5.5.0")
- patch("0005-Adding-half-include-directory-path-migraphx.patch", when="@5.6.0:")
+ patch("0005-Adding-half-include-directory-path-migraphx.patch", when="@5.6.0:5.7")
patch("0006-add-option-to-turn-off-ck.patch", when="@5.7")
+ patch(
+ "https://github.com/ROCm/AMDMIGraphX/commit/728bea3489c97c9e1ddda0a0ae527ffd2d70cb97.patch?full_index=1",
+ sha256="3a8afd32208aa4f59fb31f898d243287771ebd409c7af7a4a785c586081e3711",
+ when="@6.0",
+ )
+
+ patch(
+ "https://github.com/ROCm/AMDMIGraphX/commit/624f8ef549522f64fdddad7f49a2afe1890b0b79.patch?full_index=1",
+ sha256="410d0fd49f5f65089cd4f540c530c85896708b4fd94c67d15c2c279158aea85d",
+ when="@6.0",
+ )
+ patch("0003-add-half-include-directory-migraphx-6.0.patch", when="@6.0:")
depends_on("cmake@3.5:", type="build")
depends_on("protobuf", type="link")
@@ -133,31 +77,11 @@ class Migraphx(CMakePackage):
depends_on("half@1.12.0", type="link", when="@:5.5")
depends_on("half@2:", when="@5.6:")
depends_on("python@3.5:", type="build")
- depends_on("py-pybind11", type="build", when="@:4.0.0")
depends_on("py-pybind11@2.6:", type="build", when="@4.1.0:")
depends_on("pkgconfig", type="build", when="@5.3.0:")
depends_on("abseil-cpp")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -168,15 +92,23 @@ class Migraphx(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
- depends_on("rocblas@" + ver, when="@" + ver)
- depends_on("miopen-hip@" + ver, when="@" + ver)
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+ depends_on(f"rocblas@{ver}", when=f"@{ver}")
+ depends_on(f"miopen-hip@{ver}", when=f"@{ver}")
- for ver in ["5.7.0", "5.7.1"]:
- depends_on("composable-kernel@" + ver, when="@" + ver)
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocmlir@{ver}", when=f"@{ver}")
@property
def cmake_python_hints(self):
@@ -197,27 +129,45 @@ class Migraphx(CMakePackage):
ver = None
return ver
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+
def cmake_args(self):
spec = self.spec
abspath = spec["abseil-cpp"].prefix.include
- args = ["-DCMAKE_CXX_COMPILER={0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix)]
- if "@3.9.0:" in self.spec:
- args.append(
- "-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include)
- )
+ args = [
+ self.define("CMAKE_CXX_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++"),
+ self.define("NLOHMANN_JSON_INCLUDE", self.spec["nlohmann-json"].prefix.include),
+ ]
if self.spec["cmake"].satisfies("@3.16.0:"):
args += self.cmake_python_hints
if "@5.5.0:" in self.spec:
args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}".format(abspath)))
args.append(self.define("MIGRAPHX_ENABLE_PYTHON", "OFF"))
- if "@5.7" in self.spec:
+ if "@5.7:" in self.spec:
args.append(self.define("MIGRAPHX_USE_COMPOSABLEKERNEL", "OFF"))
+ args.append(
+ self.define("GPU_TARGETS", "gfx906;gfx908;gfx90a;gfx1030;gfx1100;gfx1101;gfx1102")
+ )
+ if self.spec.satisfies("@6.1:") and self.spec.satisfies("+asan"):
+ args.append(
+ self.define(
+ "CMAKE_CXX_FLAGS", "-fsanitize=address -shared-libasan -I{0}".format(abspath)
+ )
+ )
+ args.append(self.define("BUILD_TESTING", self.run_tests))
return args
- def test(self):
+ def test_unit_tests(self):
+ """Run installed UnitTests"""
if self.spec.satisfies("@:5.5.0"):
- print("Skipping: stand-alone tests")
- return
- test_dir = join_path(self.spec["migraphx"].prefix, "bin")
- with working_dir(test_dir, create=True):
- self.run_test("UnitTests")
+ raise SkipTest("Package must be installed as version @5.5.1 or later")
+ unit_tests = which(self.prefix.bin.UnitTests)
+ assert unit_tests is not None, "UnitTests is not installed!"
+ unit_tests()
diff --git a/var/spack/repos/builtin/packages/migrate/package.py b/var/spack/repos/builtin/packages/migrate/package.py
index 33b408fb49..67c52b80fd 100644
--- a/var/spack/repos/builtin/packages/migrate/package.py
+++ b/var/spack/repos/builtin/packages/migrate/package.py
@@ -18,6 +18,9 @@ class Migrate(AutotoolsPackage):
version("3.6.11", sha256="a9ba06a4e995a45b8d04037f5f2da23e1fe64a2f3565189bdd50c62c6fe01fb8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Build MPI binaries")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/mii/package.py b/var/spack/repos/builtin/packages/mii/package.py
index c0f24d8bb2..45ef8531e0 100644
--- a/var/spack/repos/builtin/packages/mii/package.py
+++ b/var/spack/repos/builtin/packages/mii/package.py
@@ -23,5 +23,7 @@ class Mii(MakefilePackage):
version("1.1.2", sha256="bdf2cfe93b2b0989cd47f1447e8787d8339440295299c0a70d2646e2c02e29b8")
version("1.0.4", sha256="3c4e7e6e8c21969da8dade05fecab35be61f2bb82d75eeaf19db8cc97f8058b5")
+ depends_on("c", type="build") # generated
+
def setup_build_environment(self, env):
env.set("PREFIX", self.prefix)
diff --git a/var/spack/repos/builtin/packages/millepede/package.py b/var/spack/repos/builtin/packages/millepede/package.py
index 65edd50b89..31d21b9463 100644
--- a/var/spack/repos/builtin/packages/millepede/package.py
+++ b/var/spack/repos/builtin/packages/millepede/package.py
@@ -21,6 +21,10 @@ class Millepede(MakefilePackage):
version("04-13-03", sha256="669a6e46a6f02ba3c78b2760e2ffb2c90d25b582ccd1a5c0770eef81c7bcbbe9")
version("04-11-01", sha256="9869eb84d8d07cecfab15c396f3faa36aef10906e39f8641c48b58e0325b3205")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/mimalloc/package.py b/var/spack/repos/builtin/packages/mimalloc/package.py
index 53eefe6b4d..ff782be555 100644
--- a/var/spack/repos/builtin/packages/mimalloc/package.py
+++ b/var/spack/repos/builtin/packages/mimalloc/package.py
@@ -19,6 +19,7 @@ class Mimalloc(CMakePackage):
version("dev-slice", branch="dev-slice")
version("dev", branch="dev")
version("master", branch="master")
+ version("2.1.7", sha256="0eed39319f139afde8515010ff59baf24de9e47ea316a315398e8027d198202d")
version("2.1.2", sha256="2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb")
version("2.1.1", sha256="38b9660d0d1b8a732160191609b64057d8ccc3811ab18b7607bc93ca63a6010f")
version("2.1.0", sha256="86e5e53e38bace59a9eb20d27e7bd7c5f448cb246a887d4f99478fa4809731fc")
@@ -32,7 +33,11 @@ class Mimalloc(CMakePackage):
version("1.7.7", sha256="0f6663be1e1764851bf9563fcf7a6b3330e23b933eb4737dd07e3289b87895fe")
version("1.7.6", sha256="d74f86ada2329016068bc5a243268f1f555edd620b6a7d6ce89295e7d6cf18da")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.0:", type="build")
+ conflicts("^cmake@:3.17", when="@2.1.7:")
libs_values = ("shared", "static", "object")
variant(
diff --git a/var/spack/repos/builtin/packages/minc-toolkit/package.py b/var/spack/repos/builtin/packages/minc-toolkit/package.py
index 9739b7f4c3..3241b7175a 100644
--- a/var/spack/repos/builtin/packages/minc-toolkit/package.py
+++ b/var/spack/repos/builtin/packages/minc-toolkit/package.py
@@ -17,6 +17,9 @@ class MincToolkit(CMakePackage):
version("1.9.18.2", commit="b98e4972bdac2b78e3c1e412d75c97e2e7c5f6b9", submodules=True)
version("1.9.18.1", commit="38597c464b6e93eda680ab4a9e903366d53d7737", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant(
"visualisation", default=False, description="Build visual tools (Display, register, etc.)"
diff --git a/var/spack/repos/builtin/packages/mindthegap/package.py b/var/spack/repos/builtin/packages/mindthegap/package.py
index af37a73904..2ff1e7a1d5 100644
--- a/var/spack/repos/builtin/packages/mindthegap/package.py
+++ b/var/spack/repos/builtin/packages/mindthegap/package.py
@@ -25,6 +25,9 @@ class Mindthegap(CMakePackage):
"2.0.2", tag="v2.0.2", commit="8401af2a2bce9997396fbf0a04757ca7c887a1da", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build", when="@2.3.0")
depends_on("cmake@2.6:", type="build", when="@2.0.2")
diff --git a/var/spack/repos/builtin/packages/miniaero/package.py b/var/spack/repos/builtin/packages/miniaero/package.py
index 138d0a1b07..724cf9561f 100644
--- a/var/spack/repos/builtin/packages/miniaero/package.py
+++ b/var/spack/repos/builtin/packages/miniaero/package.py
@@ -19,6 +19,8 @@ class Miniaero(MakefilePackage):
version("2016-11-11", commit="f46d135479a5be19ec5d146ccaf0e581aeff4596")
+ depends_on("cxx", type="build") # generated
+
depends_on("kokkos-legacy")
@property
diff --git a/var/spack/repos/builtin/packages/miniamr/package.py b/var/spack/repos/builtin/packages/miniamr/package.py
index 166ba379c0..78bcce5084 100644
--- a/var/spack/repos/builtin/packages/miniamr/package.py
+++ b/var/spack/repos/builtin/packages/miniamr/package.py
@@ -21,6 +21,7 @@ class Miniamr(MakefilePackage):
license("LGPL-3.0-only")
version("master", branch="master")
+ version("1.7.0", sha256="f11aee04bc59f46c6894a07d365c9c3006c58739ac6abd2d9663843c01a8b62b")
version("1.6.6", sha256="a7f79fae49e433ef8350cbd34cbf57c486089cf7ac0d1f1f3b23c820d3e5bb9f")
version("1.6.5", sha256="c70f0f648c73ea4497817ceee158334eeb901fc5c32cf804deef3226cd9cf26a")
version("1.6.4", sha256="807d50608b69fb1a61924718964be96c0a2f9fa2e37fdc027bc3f0f116544732")
@@ -30,13 +31,15 @@ class Miniamr(MakefilePackage):
version("1.4.1", sha256="dd8e8d9fd0768cb4f2c5d7fe6989dfa6bb95a8461f04deaccdbb50b0dd51e97a")
version("1.4.0", sha256="f0b959c90416288c5ab51ed86b6ba49bc8a319006c2a74a070c94133267edc6f")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
@property
def build_targets(self):
targets = []
- targets.append("CC={0}".format(self.spec["mpi"].mpicc))
- targets.append("LD={0}".format(self.spec["mpi"].mpicc))
+ targets.append(f"CC={self.spec['mpi'].mpicc}")
+ targets.append(f"LD={self.spec['mpi'].mpicc}")
targets.append("LDLIBS=-lm")
targets.append("--directory=ref")
diff --git a/var/spack/repos/builtin/packages/miniasm/package.py b/var/spack/repos/builtin/packages/miniasm/package.py
index 2a908fc0b2..3aff8f964d 100644
--- a/var/spack/repos/builtin/packages/miniasm/package.py
+++ b/var/spack/repos/builtin/packages/miniasm/package.py
@@ -17,6 +17,8 @@ class Miniasm(MakefilePackage):
version("2018-3-30", commit="55cf0189e2f7d5bda5868396cebe066eec0a9547")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/miniconda3/package.py b/var/spack/repos/builtin/packages/miniconda3/package.py
index 7d5596e4d1..d620ce47c8 100644
--- a/var/spack/repos/builtin/packages/miniconda3/package.py
+++ b/var/spack/repos/builtin/packages/miniconda3/package.py
@@ -10,6 +10,78 @@ from spack.package import *
from spack.util.environment import EnvironmentModifications
_versions = {
+ "24.7.1": {
+ "Linux-x86_64": (
+ "33442cd3813df33dcbb4a932b938ee95398be98344dff4c30f7e757cd2110e4f",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-x86_64.sh",
+ )
+ },
+ "24.5.0": {
+ "Linux-x86_64": (
+ "4b3b3b1b99215e85fd73fb2c2d7ebf318ac942a457072de62d885056556eb83e",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh",
+ )
+ },
+ "24.4.0": {
+ "Linux-x86_64": (
+ "b6597785e6b071f1ca69cf7be6d0161015b96340b9a9e132215d5713408c3a7c",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.4.0-0-Linux-x86_64.sh",
+ )
+ },
+ "24.3.0": {
+ "Linux-x86_64": (
+ "96a44849ff17e960eeb8877ecd9055246381c4d4f2d031263b63fa7e2e930af1",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.3.0-0-Linux-x86_64.sh",
+ )
+ },
+ "24.1.2": {
+ "Linux-x86_64": (
+ "b978856ec3c826eb495b60e3fffe621f670c101150ebcbdeede4f961f22dc438",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.1.2-0-Linux-x86_64.sh",
+ )
+ },
+ "23.11.0": {
+ "Linux-x86_64": (
+ "c9ae82568e9665b1105117b4b1e499607d2a920f0aea6f94410e417a0eff1b9c",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py311_23.11.0-2-Linux-x86_64.sh",
+ )
+ },
+ "23.9.0": {
+ "Linux-x86_64": (
+ "43651393236cb8bb4219dcd429b3803a60f318e5507d8d84ca00dafa0c69f1bb",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py311_23.9.0-0-Linux-x86_64.sh",
+ )
+ },
+ "23.5.2": {
+ "Linux-x86_64": (
+ "634d76df5e489c44ade4085552b97bebc786d49245ed1a830022b0b406de5817",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh",
+ )
+ },
+ "23.5.1": {
+ "Linux-x86_64": (
+ "333779c9cae3fe14735949a8dcb9657b9e55ada69e9c60f191c5d582b2deac20",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.1-0-Linux-x86_64.sh",
+ )
+ },
+ "23.5.0": {
+ "Linux-x86_64": (
+ "61a5c087893f6210176045931b89ee6e8760c17abd9c862b2cab4c1b7d00f7c8",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.0-3-Linux-x86_64.sh",
+ )
+ },
+ "23.3.1": {
+ "Linux-x86_64": (
+ "aef279d6baea7f67940f16aad17ebe5f6aac97487c7c03466ff01f4819e5a651",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Linux-x86_64.sh",
+ )
+ },
+ "23.1.0": {
+ "Linux-x86_64": (
+ "32d73e1bc33fda089d7cd9ef4c1be542616bd8e437d1f77afeeaf7afdb019787",
+ "https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh",
+ )
+ },
"22.11.1": {
"Linux-x86_64": (
"00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6",
@@ -86,7 +158,7 @@ _versions = {
class Miniconda3(Package):
"""The minimalist bootstrap toolset for conda and Python3."""
- homepage = "https://conda.io/miniconda.html"
+ homepage = "https://docs.anaconda.com/miniconda/"
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())
diff --git a/var/spack/repos/builtin/packages/minife/package.py b/var/spack/repos/builtin/packages/minife/package.py
index beb587c7c7..25cec0c808 100644
--- a/var/spack/repos/builtin/packages/minife/package.py
+++ b/var/spack/repos/builtin/packages/minife/package.py
@@ -20,6 +20,9 @@ class Minife(MakefilePackage):
version("2.1.0", sha256="59f4c56d73d2a758cba86939db2d36e12705282cb4174ce78223d984527f5d15")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"build",
default="ref",
diff --git a/var/spack/repos/builtin/packages/miniforge3/package.py b/var/spack/repos/builtin/packages/miniforge3/package.py
index d1b22e4f9e..8f5d3c05e2 100644
--- a/var/spack/repos/builtin/packages/miniforge3/package.py
+++ b/var/spack/repos/builtin/packages/miniforge3/package.py
@@ -3,50 +3,78 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import platform
+from os.path import split
+
from spack.package import *
+from spack.util.environment import EnvironmentModifications
+
+_versions = {
+ "24.3.0-0": {
+ "Linux-x86_64": ("23367676b610de826f50f7ddc91139a816d4b59bd4c69cc9b6082d9b2e7fe8a3",)
+ },
+ "24.1.2-0": {
+ "Linux-x86_64": ("dbadb808edf4da00af35d888d3eeebbfdce71972b60bf4b16dbacaee2ab57f28",)
+ },
+ "4.8.3-4": {
+ "Linux-x86_64": ("24951262a126582f5f2e1cf82c9cd0fa20e936ef3309fdb8397175f29e647646",),
+ "Linux-aarch64": ("52a8dde14ecfb633800a2de26543a78315058e30f5883701da1ad2f2d5ba9ed8",),
+ },
+ "4.8.3-2": {
+ "Linux-x86_64": ("c8e5b894fe91ce0f86e61065d2247346af107f8d53de0ad89ec848701c4ec1f9",),
+ "Linux-aarch64": ("bfefc0ede6354568978b4198607edd7f17c2f50ca4c6a47e9f22f8c257c8230a",),
+ "MacOSX-x86_64": ("25ca082ab00a776db356f9bbc660edf6d24659e2aec1cbec5fd4ce992d4d193d"),
+ },
+}
class Miniforge3(Package):
- """Miniforge3 is a minimal installer for conda specific to conda-forge."""
+ """Miniforge3 is a minimal installer for conda and mamba specific to conda-forge."""
homepage = "https://github.com/conda-forge/miniforge"
- url = "https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge3-4.8.3-2-Linux-x86_64.sh"
-
- version(
- "4.8.3-4-Linux-x86_64",
- url="https://github.com/conda-forge/miniforge/releases/download/4.8.3-4/Miniforge3-4.8.3-4-Linux-x86_64.sh",
- sha256="24951262a126582f5f2e1cf82c9cd0fa20e936ef3309fdb8397175f29e647646",
- expand=False,
- )
- version(
- "4.8.3-4-Linux-aarch64",
- url="https://github.com/conda-forge/miniforge/releases/download/4.8.3-4/Miniforge3-4.8.3-4-Linux-aarch64.sh",
- sha256="52a8dde14ecfb633800a2de26543a78315058e30f5883701da1ad2f2d5ba9ed8",
- expand=False,
- )
- version(
- "4.8.3-2-Linux-x86_64",
- url="https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge3-4.8.3-2-Linux-x86_64.sh",
- sha256="c8e5b894fe91ce0f86e61065d2247346af107f8d53de0ad89ec848701c4ec1f9",
- expand=False,
- )
- version(
- "4.8.3-2-Linux-aarch64",
- url="https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge3-4.8.3-2-Linux-aarch64.sh",
- sha256="bfefc0ede6354568978b4198607edd7f17c2f50ca4c6a47e9f22f8c257c8230a",
- expand=False,
- )
- version(
- "4.8.3-2-MacOSX-x86_64",
- url="https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge3-4.8.3-2-MacOSX-x86_64.sh",
- sha256="25ca082ab00a776db356f9bbc660edf6d24659e2aec1cbec5fd4ce992d4d193d",
- expand=False,
- )
+
+ maintainers("ChristopherChristofi")
+
+ license("BSD-3-Clause")
+
+ for ver, packages in _versions.items():
+ key = f"{platform.system()}-{platform.machine()}"
+ pkg = packages.get(key)
+ if pkg:
+ version(ver, sha256=pkg[0], expand=False)
+
+ variant("mamba", default=True, description="Enable mamba support.")
+
+ conflicts("+mamba", when="@:22.3.1-0")
+
+ def url_for_version(self, version):
+ script = f"Miniforge3-{version}-{platform.system()}-{platform.machine()}.sh"
+ return f"https://github.com/conda-forge/miniforge/releases/download/{version}/{script}"
def install(self, spec, prefix):
- mkdirp(prefix)
- pkgname = "Miniforge3-{0}.sh".format(self.version)
- chmod = which("chmod")
- chmod("+x", pkgname)
- sh = which("sh")
- sh("./{0}".format(pkgname), "-b", "-f", "-s", "-p", prefix)
+ dir, script = split(self.stage.archive_file)
+ bash = which("bash")
+ bash(script, "-b", "-f", "-p", self.prefix)
+
+ @run_after("install")
+ def patch_sbang(self):
+ # Conda replaces the full path to the Python executable with `/usr/bin/env python`
+ # if the full path exceeds 127 characters. This does however break `conda deactivate`
+ # because the wrong Python interpreter is used after activating an environment.
+ # The 127 character limit is not relevant in Spack as Spack will automatically
+ # use the `sbang` script to deal with the overly long sbang line.
+ filter_file(
+ r"#!/usr/bin/env python", rf"#!{self.prefix.bin.python}", self.prefix.bin.conda
+ )
+ if "+mamba" in self.spec:
+ filter_file(
+ r"#!/usr/bin/env python", rf"#!{self.prefix.bin.python}", self.prefix.bin.mamba
+ )
+
+ def setup_run_environment(self, env):
+ filename = self.prefix.etc.join("profile.d").join("conda.sh")
+ env.extend(EnvironmentModifications.from_sourcing_file(filename))
+
+ if "+mamba" in self.spec:
+ filename = self.prefix.etc.join("profile.d").join("mamba.sh")
+ env.extend(EnvironmentModifications.from_sourcing_file(filename))
diff --git a/var/spack/repos/builtin/packages/minighost/package.py b/var/spack/repos/builtin/packages/minighost/package.py
index d894a8a554..5702a681ac 100644
--- a/var/spack/repos/builtin/packages/minighost/package.py
+++ b/var/spack/repos/builtin/packages/minighost/package.py
@@ -51,8 +51,6 @@ class Minighost(MakefilePackage):
targets.append("COMPILER_SUITE=cray")
elif "%intel" in self.spec:
targets.append("COMPILER_SUITE=intel")
- elif "%pgi" in self.spec:
- targets.append("COMPILER_SUITE=pgi")
return targets
diff --git a/var/spack/repos/builtin/packages/minigmg/package.py b/var/spack/repos/builtin/packages/minigmg/package.py
index 4a5e4605f7..f7da002cdf 100644
--- a/var/spack/repos/builtin/packages/minigmg/package.py
+++ b/var/spack/repos/builtin/packages/minigmg/package.py
@@ -23,7 +23,7 @@ class Minigmg(Package):
Note, miniGMG code has been supersceded by HPGMG."""
homepage = (
- "http://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/miniGMG/"
+ "https://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/miniGMG/"
)
url = "https://crd.lbl.gov/assets/Uploads/FTG/Projects/miniGMG/miniGMG.tar.gz"
@@ -31,6 +31,8 @@ class Minigmg(Package):
version("master", sha256="1c2d27496a881f655f5e849d6a7a132625e535739f82575991c511cc2cf899ac")
+ depends_on("c", type="build") # generated
+
variant(
"vec",
default="ompif",
diff --git a/var/spack/repos/builtin/packages/minimap2/package.py b/var/spack/repos/builtin/packages/minimap2/package.py
index 04de083fe3..142ef71fa4 100644
--- a/var/spack/repos/builtin/packages/minimap2/package.py
+++ b/var/spack/repos/builtin/packages/minimap2/package.py
@@ -15,8 +15,11 @@ class Minimap2(PythonPackage):
url = "https://github.com/lh3/minimap2/releases/download/v2.2/minimap2-2.2.tar.bz2"
git = "https://github.com/lh3/minimap2.git"
+ maintainers("snehring")
+
license("MIT")
+ version("2.28", sha256="ffa5712735d229119f8c05722a0638ae0cc15aeb8938e29a3e52d5da5c92a0b4")
version("2.26", sha256="6a588efbd273bff4f4808d5190957c50272833d2daeb4407ccf4c1b78143624c")
version("2.24", sha256="9dd4c31ff082182948944bcdad6d328f64f09295d10547d72eba24189880a615")
version("2.17", sha256="b68ac8882d33cc63e9e3246775062aeb159b6990ff7f38099172c3fe6f8a2742")
@@ -24,6 +27,8 @@ class Minimap2(PythonPackage):
version("2.10", sha256="52b36f726ec00bfca4a2ffc23036d1a2b5f96f0aae5a92fd826be6680c481c20")
version("2.2", sha256="7e8683aa74c4454a8cfe3821f405c4439082e24c152b4b834fdb56a117ecaed9")
+ depends_on("c", type="build") # generated
+
conflicts("target=aarch64:", when="@:2.10")
depends_on("zlib-api", type="link")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/minio/package.py b/var/spack/repos/builtin/packages/minio/package.py
index ec216a538f..185dbd881b 100644
--- a/var/spack/repos/builtin/packages/minio/package.py
+++ b/var/spack/repos/builtin/packages/minio/package.py
@@ -18,17 +18,23 @@ class Minio(MakefilePackage):
license("AGPL-3.0-or-later")
version(
- "2020-07-13T18-09-56Z",
- sha256="147fca3930389162cc7306a0fa5cf478ee2deba4b31a9317f3d35e82aa58d41e",
- )
- version(
- "2020-07-12T19-14-17Z",
- sha256="bb8ba5d93215ab37788171d8b9ce68e78d64e7b7c74aea508c15958158d85b03",
- )
- version(
- "2020-07-02T00-15-09Z",
- sha256="4255c4d95a3e010f16a3f1e974768dc68509075403a97a9b9882f7d9e89fedc5",
+ "2024-10-13T13-34-11Z",
+ sha256="53301a6822f8466da88e3b24252d2551c37e7f96e9d37a36121d0616a69af1dd",
)
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-24747
+ version(
+ "2020-07-13T18-09-56Z",
+ sha256="147fca3930389162cc7306a0fa5cf478ee2deba4b31a9317f3d35e82aa58d41e",
+ )
+ version(
+ "2020-07-12T19-14-17Z",
+ sha256="bb8ba5d93215ab37788171d8b9ce68e78d64e7b7c74aea508c15958158d85b03",
+ )
+ version(
+ "2020-07-02T00-15-09Z",
+ sha256="4255c4d95a3e010f16a3f1e974768dc68509075403a97a9b9882f7d9e89fedc5",
+ )
depends_on("go", type="build")
diff --git a/var/spack/repos/builtin/packages/miniqmc/package.py b/var/spack/repos/builtin/packages/miniqmc/package.py
index 7c827dc9d8..1f2d287575 100644
--- a/var/spack/repos/builtin/packages/miniqmc/package.py
+++ b/var/spack/repos/builtin/packages/miniqmc/package.py
@@ -18,6 +18,8 @@ class Miniqmc(CMakePackage):
version("0.3.0", sha256="3ba494ba1055df91e157cb426d1fbe4192aa3f04b019277d9e571d057664d5a9")
version("0.2.0", sha256="cdf6fc6df6ccc1e034c62f937c040bfd6a4e65a0974b95f6884edd004ae36ee4")
+ depends_on("cxx", type="build") # generated
+
tags = ["proxy-app", "ecp-proxy-app"]
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/minisign/package.py b/var/spack/repos/builtin/packages/minisign/package.py
index 666c31ec29..386c3ba62a 100644
--- a/var/spack/repos/builtin/packages/minisign/package.py
+++ b/var/spack/repos/builtin/packages/minisign/package.py
@@ -20,6 +20,8 @@ class Minisign(CMakePackage):
version("0.8", sha256="130eb5246076bc7ec42f13495a601382e566bb6733430d40a68de5e43a7f1082")
version("0.7", sha256="0c9f25ae647b6ba38cf7e6aea1da4e8fb20e1bc64ef0c679da737a38c8ad43ef")
+ depends_on("c", type="build") # generated
+
variant("static", default=True, description="builds a static version of the executable")
depends_on("libsodium")
diff --git a/var/spack/repos/builtin/packages/minismac2d/package.py b/var/spack/repos/builtin/packages/minismac2d/package.py
index f5161f669b..7aaf40a1d6 100644
--- a/var/spack/repos/builtin/packages/minismac2d/package.py
+++ b/var/spack/repos/builtin/packages/minismac2d/package.py
@@ -20,6 +20,8 @@ class Minismac2d(MakefilePackage):
version("2.0", sha256="ec01b74c06a2c0386efbbb61b14305327342a08fb92bf52e76f60a2063adf065")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
parallel = False
diff --git a/var/spack/repos/builtin/packages/minitri/package.py b/var/spack/repos/builtin/packages/minitri/package.py
index 0cf2ecc393..09ee7ea8aa 100644
--- a/var/spack/repos/builtin/packages/minitri/package.py
+++ b/var/spack/repos/builtin/packages/minitri/package.py
@@ -14,6 +14,8 @@ class Minitri(MakefilePackage):
version("1.0", sha256="e340dbb04b7c182804ebf6f5a946a392f1c68b7f798885c091c3f0d8aaa844ce")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/minivite/package.py b/var/spack/repos/builtin/packages/minivite/package.py
index 44c77e051d..2ae2c1722a 100644
--- a/var/spack/repos/builtin/packages/minivite/package.py
+++ b/var/spack/repos/builtin/packages/minivite/package.py
@@ -22,6 +22,8 @@ class Minivite(MakefilePackage):
version("1.0", tag="v1.0", commit="65ccaa8a4ec0b4bea516e2abdafbeb2f8a5f0c94")
version("1.1", tag="v1.1", commit="23476d9d41eb8a17bf4108ac56852dacda89b253")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP support")
variant("opt", default=True, description="Optimization flags")
diff --git a/var/spack/repos/builtin/packages/minixyce/package.py b/var/spack/repos/builtin/packages/minixyce/package.py
index 71cb49a979..de20e532a0 100644
--- a/var/spack/repos/builtin/packages/minixyce/package.py
+++ b/var/spack/repos/builtin/packages/minixyce/package.py
@@ -19,6 +19,8 @@ class Minixyce(MakefilePackage):
version("1.0", sha256="40e3b4ed5c65cb1d210e828460e99b755cac922a7e27e70c687d5bb6ed19a21b")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI Support")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/minizip/package.py b/var/spack/repos/builtin/packages/minizip/package.py
index d88a5e046b..af3ac94d21 100644
--- a/var/spack/repos/builtin/packages/minizip/package.py
+++ b/var/spack/repos/builtin/packages/minizip/package.py
@@ -14,7 +14,14 @@ class Minizip(AutotoolsPackage):
license("Zlib")
- version("1.2.11", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")
+ version("1.3.1", sha256="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-37434
+ version(
+ "1.2.11", sha256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
+ )
+
+ depends_on("c", type="build")
configure_directory = "contrib/minizip"
@@ -25,8 +32,9 @@ class Minizip(AutotoolsPackage):
depends_on("zlib-api")
# error: implicit declaration of function 'mkdir' is invalid in C99
- patch("implicit.patch", when="%apple-clang@12:")
- patch("implicit.patch", when="%gcc@7.3.0:")
+ with when("@:1.2.11"):
+ patch("implicit.patch", when="%apple-clang@12:")
+ patch("implicit.patch", when="%gcc@7.3.0:")
# statically link to libz.a
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/minizip.rb
diff --git a/var/spack/repos/builtin/packages/miopen-hip/0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch b/var/spack/repos/builtin/packages/miopen-hip/0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch
deleted file mode 100644
index b98304529f..0000000000
--- a/var/spack/repos/builtin/packages/miopen-hip/0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 985f59f..515e7e0 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -184,7 +184,8 @@ string(REGEX REPLACE --cuda-gpu-arch=[a-z0-9]+ "" HIP_COMPILER_FLAGS "${HIP_COMP
- message(STATUS "Hip compiler flags: ${HIP_COMPILER_FLAGS}")
-
- add_definitions("-DHIP_COMPILER_FLAGS=${HIP_COMPILER_FLAGS}")
--
-+add_definitions("--rocm-path=${HIP_PREFIX_PATH}")
-+add_definitions("--rocm-device-lib-path=${DEVICELIBS_PREFIX_PATH}")
-
-
- # HIP
diff --git a/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch b/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch
new file mode 100644
index 0000000000..e72924fd56
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch
@@ -0,0 +1,42 @@
+From ea1ff66e448c977da9c5cff74e201850d6b9b04c Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Thu, 7 Nov 2024 22:08:17 +0000
+Subject: [PATCH] link with roctracer when building miopendriver for 6.1.0
+
+---
+ driver/CMakeLists.txt | 4 ++++
+ src/CMakeLists.txt | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt
+index 7d4fdbb..9e5ede5 100644
+--- a/driver/CMakeLists.txt
++++ b/driver/CMakeLists.txt
+@@ -34,6 +34,10 @@ endif()
+ add_dependencies(MIOpenDriver generate_kernels)
+ target_include_directories(MIOpenDriver PRIVATE ../src/kernels)
+ target_link_libraries(MIOpenDriver MIOpen Threads::Threads)
++if(MIOPEN_USE_ROCTRACER)
++ target_include_directories(MIOpenDriver PRIVATE ${ROCTRACER_INCLUDE_DIR})
++ target_link_libraries(MIOpenDriver ${rocTracer})
++endif()
+ if(NOT MIOPEN_EMBED_DB STREQUAL "")
+ target_link_libraries(MIOpenDriver $<BUILD_INTERFACE:miopen_data> )
+ endif()
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0741a60..47573d4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -861,7 +861,8 @@ if(NOT WIN32 AND NOT APPLE)
+ endif()
+
+ if(MIOPEN_USE_ROCTRACER)
+- target_link_libraries(MIOpen PRIVATE roctx64)
++ target_include_directories(MIOpen PRIVATE ${ROCTRACER_INCLUDE_DIR})
++ target_link_libraries(MIOpen PRIVATE ${rocTracer})
+ endif()
+
+ ############################################################
+--
+2.43.5
+
diff --git a/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch b/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch
new file mode 100644
index 0000000000..2c2c7feda5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miopen-hip/0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch
@@ -0,0 +1,41 @@
+From 3cb81598fd66aab0fa5b0c6aac654a91ed90e872 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Thu, 7 Nov 2024 21:42:15 +0000
+Subject: [PATCH] link with roctracer when building miopendriver
+
+---
+ driver/CMakeLists.txt | 4 ++++
+ src/CMakeLists.txt | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt
+index 8f19a90..6d32b83 100644
+--- a/driver/CMakeLists.txt
++++ b/driver/CMakeLists.txt
+@@ -64,6 +64,10 @@ endif()
+ add_dependencies(MIOpenDriver generate_kernels)
+ target_include_directories(MIOpenDriver PRIVATE ../src/kernels)
+ target_link_libraries(MIOpenDriver MIOpen Threads::Threads roc::rocrand)
++if(MIOPEN_USE_ROCTRACER)
++ target_include_directories(MIOpenDriver PRIVATE ${ROCTRACER_INCLUDE_DIR})
++ target_link_libraries(MIOpenDriver ${rocTracer})
++endif()
+ if(NOT MIOPEN_EMBED_DB STREQUAL "")
+ target_link_libraries(MIOpenDriver $<BUILD_INTERFACE:miopen_data> )
+ endif()
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 66ac75f..69da1b9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -917,7 +917,8 @@ if(NOT WIN32 AND NOT APPLE)
+ endif()
+
+ if(MIOPEN_USE_ROCTRACER)
+- target_link_libraries(MIOpen PRIVATE roctx64)
++ target_include_directories(MIOpen PRIVATE ${ROCTRACER_INCLUDE_DIR})
++ target_link_libraries(MIOpen PRIVATE ${rocTracer})
+ endif()
+
+ ############################################################
+--
+2.43.5
diff --git a/var/spack/repos/builtin/packages/miopen-hip/0002-add-include-dir-miopen-hip-6.0.0.patch b/var/spack/repos/builtin/packages/miopen-hip/0002-add-include-dir-miopen-hip-6.0.0.patch
new file mode 100644
index 0000000000..6d0e12a1f3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miopen-hip/0002-add-include-dir-miopen-hip-6.0.0.patch
@@ -0,0 +1,34 @@
+From 710c4a97891a17b7c8a6ecde01c9ab747becc69b Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Tue, 13 Feb 2024 06:47:02 +0000
+Subject: [PATCH] adding roctracer-dev include and library path
+
+---
+ src/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7866ad1..8c83b3b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -714,6 +714,8 @@ set(MIOPEN_CK_LINK_FLAGS composable_kernel::device_operations hip::host)
+ endif()
+
+ target_include_directories(MIOpen SYSTEM PUBLIC $<BUILD_INTERFACE:${HALF_INCLUDE_DIR}>)
++target_include_directories(MIOpen SYSTEM PUBLIC "${NLOHMANN_JSON_INCLUDE}")
++target_include_directories(MIOpen SYSTEM PUBLIC "${ROCTRACER_INCLUDE_DIR}")
+ target_include_directories(MIOpen SYSTEM PRIVATE ${BZIP2_INCLUDE_DIR})
+ # Workaround : change in rocm-cmake was causing linking error so had to add ${CMAKE_DL_LIBS}
+ # We can remove ${CMAKE_DL_LIBS} once root cause is identified.
+@@ -855,7 +857,7 @@ if(NOT WIN32 AND NOT APPLE)
+ endif()
+
+ if(NOT WIN32)
+- target_link_libraries(MIOpen PRIVATE roctx64)
++ target_link_libraries(MIOpen PRIVATE "${ROCTRACER_LIB_DIR}/libroctx64.so")
+ endif()
+
+ ############################################################
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py
index ee3b78a5ff..d902c2529e 100644
--- a/var/spack/repos/builtin/packages/miopen-hip/package.py
+++ b/var/spack/repos/builtin/packages/miopen-hip/package.py
@@ -12,9 +12,9 @@ from spack.pkg.builtin.boost import Boost
class MiopenHip(CMakePackage):
"""AMD's library for high performance machine learning primitives."""
- homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen"
- git = "https://github.com/ROCmSoftwarePlatform/MIOpen.git"
- url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/MIOpen"
+ git = "https://github.com/ROCm/MIOpen.git"
+ url = "https://github.com/ROCm/MIOpen/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -22,91 +22,34 @@ class MiopenHip(CMakePackage):
license("MIT")
+ version("6.2.4", sha256="8e4836e007e5e66fa487288887a098aaeeb95f3c63a19c2b91f6e848c023a040")
+ version("6.2.1", sha256="c7abe5ae7a332813a3c3da849e9a50b91221fe05c6bb622413e5b048b1f15982")
+ version("6.2.0", sha256="f4473f724362732019d505a0e01c17b060b542350859cb1e4bd4e3898b609276")
+ version("6.1.2", sha256="c8ff4af72264b2049bfe2685d581ea0f3e43319db7bd00dc347159bcf2731614")
+ version("6.1.1", sha256="cf568ea16dd23b32fe89e250bb33ed4722fea8aa7f407cc66ff37c37aab037ce")
+ version("6.1.0", sha256="3b373117eaeaf618aab9b39bb22e9950fd49bd0e264c8587b0c51fa348afe0d1")
+ version("6.0.2", sha256="e6f671bd6af59f7470f42cda2ff9e77441d8f6c2105772bbf855d31da1085ffa")
+ version("6.0.0", sha256="a0718a48353be30ff98118ade511f0c1b454e394d8f934aefe7dd6946562b2e9")
version("5.7.1", sha256="912a658fe21ce6f1982b0f2ff251c3f7bb618f2e7e9876d983bcb54e3cd7129e")
version("5.7.0", sha256="5cd0b62254469e1c246d5890d2b78f8aedcf42cf8a327eabc1a391b83bcd14e1")
version("5.6.1", sha256="ff627d68ed9e52433a3c808b5d3ff179a398b77ce81b00cfea7b2c4da5162c6c")
version("5.6.0", sha256="d620ddab5b488bdf81242654fefa337c6b71dc410c2ff26d30a4ee86a8d22d11")
version("5.5.1", sha256="2cd75071b8ee876c69a94f028b6c8a9346d6d2fde7d4b64e6d635f3b6c994262")
version("5.5.0", sha256="791087242551669e546225e36123c21663f0dad14dbcfd6d0ce0e7bad0ab0de1")
- version("5.4.3", sha256="37ffe2ed3d7942da8ea2f6bdb85c7a2f58e3ccd31767db158a322769d3604efd")
- version("5.4.0", sha256="b4153791f9eeee4cbc5534bc6ad8b32c0947bcd38e08b77ebe144065a4fa5456")
- version("5.3.3", sha256="7efc98215d23a2caaf212378c37e9a6484f54a4ed3e9660719286e4f287d3715")
- version("5.3.0", sha256="c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6")
- version("5.2.3", sha256="28747847446955b3bab24f7fc65c1a6b863a12f12ad3a35e0312072482d38122")
- version("5.2.1", sha256="0977a8876d41bbd2fa268341c93892f35878d7efc1711194ad87582f877ff500")
- version("5.2.0", sha256="5fda69426e81df9f8fb6658e579176b9c4fcce3516fc8488d3cfd2b6f6f2b3b4")
- version("5.1.3", sha256="510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d")
- version("5.1.0", sha256="bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd")
- version(
- "5.0.2",
- sha256="e73c18c6e0791d6ca8958508d899072ce12fc6c27cf78792d0c2a5c7e34427be",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="4a46a2bdd11a2597c83cdb0c5e208b81728fab2ff7c585dabfca5aa05ee7a4f7",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="cb49bdf215ed9881755239b6312d72f829c1a0edf510e6d1fbb206c41f5406fc",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="be2f5ce962e15e62d427978422498c0ddf821b91fd40777a1ba915a2794d6fda",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="1fb2fd8b24f984174ec5338a58b7964e128b74dafb101373a41c8ed33955251a",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="034445470cfd44480a1d9854f9fdfe92cfb8efa3f002dee508eb9585e338486d",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="8ab02e784c8b3471159794766ed6303c333b33c69dc5186c0930e56504373b7c",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="612b30d4a967bf18c7fa7aa3ef12ed558314ed04cee2775b842bf6a96cd7276f",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="37ffe2ed3d7942da8ea2f6bdb85c7a2f58e3ccd31767db158a322769d3604efd")
+ version("5.4.0", sha256="b4153791f9eeee4cbc5534bc6ad8b32c0947bcd38e08b77ebe144065a4fa5456")
+ version("5.3.3", sha256="7efc98215d23a2caaf212378c37e9a6484f54a4ed3e9660719286e4f287d3715")
+ version("5.3.0", sha256="c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6")
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("cmake@3.5:", type="build")
depends_on("pkgconfig", type="build")
@@ -119,36 +62,19 @@ class MiopenHip(CMakePackage):
depends_on("bzip2")
depends_on("sqlite")
depends_on("half")
- depends_on("zlib-api", when="@3.9.0:")
+ depends_on("zlib-api")
- patch("0001-Add-rocm-path-and-rocm-device-lib-path-flags.patch", when="@3.9.0:5.0.2")
- patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:")
+ patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:5.7")
+ patch("0002-add-include-dir-miopen-hip-6.0.0.patch", when="@6.0")
+ patch("0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch", when="@6.1")
+ patch("0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch", when="@6.2:")
patch(
- "https://github.com/ROCmSoftwarePlatform/MIOpen/pull/2276/commits/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
- sha256="c777d9f4cd2bbfec632b38620c0f70bb0cce8da1",
- when="@5.7:",
+ "https://github.com/ROCm/MIOpen/commit/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
+ sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
+ when="@5.7",
)
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -159,35 +85,83 @@ class MiopenHip(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocblas@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.3.0",
+ "5.3.3",
+ "5.4.0",
+ "5.4.3",
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocm-clang-ocl@" + ver, when="@" + ver)
- depends_on("rocblas@" + ver, when="@" + ver)
+ depends_on(f"rocm-clang-ocl@{ver}", when=f"@{ver}")
- for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]:
- depends_on("mlirmiopen@" + ver, when="@" + ver)
+ for ver in ["5.3.0", "5.3.3"]:
+ depends_on(f"mlirmiopen@{ver}", when=f"@{ver}")
- for ver in ["5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
+ for ver in [
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
depends_on("nlohmann-json", type="link")
- depends_on("composable-kernel@" + ver, when="@" + ver)
+ depends_on(f"composable-kernel@{ver}", when=f"@{ver}")
for ver in ["5.4.0", "5.4.3", "5.5.0"]:
depends_on("nlohmann-json", type="link")
- depends_on("rocmlir@" + ver, when="@" + ver)
+ depends_on(f"rocmlir@{ver}", when=f"@{ver}")
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"roctracer-dev@{ver}", when=f"@{ver}")
+ for ver in ["6.1.0", "6.1.1", "6.1.2"]:
+ depends_on("googletest")
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocrand@{ver}", when=f"@{ver}")
def setup_build_environment(self, env):
- if "@3.9.0:" in self.spec:
- lib_dir = self.spec["zlib-api"].libs.directories[0]
- env.prepend_path("LIBRARY_PATH", lib_dir)
+ lib_dir = self.spec["zlib-api"].libs.directories[0]
+ env.prepend_path("LIBRARY_PATH", lib_dir)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+ if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"):
+ env.append_flags("LDFLAGS", "-lstdc++fs")
def get_bitcode_dir(self):
- spec = self.spec
-
- # and the exact location of its bitcode depends on the version
- if spec.version >= Version("3.9.0"):
- return spec["llvm-amdgpu"].prefix.amdgcn.bitcode
- else:
- return spec["llvm-amdgpu"].prefix.lib
+ return self.spec["llvm-amdgpu"].prefix.amdgcn.bitcode
@classmethod
def determine_version(cls, lib):
@@ -218,7 +192,7 @@ class MiopenHip(CMakePackage):
if self.spec.satisfies("@5.1.0:5.3"):
mlir_inc = spec["mlirmiopen"].prefix.include
args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}".format(mlir_inc)))
- if self.spec.satisfies("@5.4.0:"):
+ if self.spec.satisfies("@5.4.0:6.1"):
args.append(
"-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include)
)
@@ -232,7 +206,22 @@ class MiopenHip(CMakePackage):
args.append(self.define("MIOPEN_USE_MLIR", "OFF"))
if self.spec.satisfies("@5.7.0:"):
args.append(self.define("MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK", "OFF"))
- args.append(
- "-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include)
- )
+ if self.spec.satisfies("@6.0"):
+ args.append(
+ "-DROCTRACER_INCLUDE_DIR={0}".format(self.spec["roctracer-dev"].prefix.include)
+ )
+ args.append("-DROCTRACER_LIB_DIR={0}".format(self.spec["roctracer-dev"].prefix.lib))
+ args.append("-DSQLITE_INCLUDE_DIR={0}".format(self.spec["sqlite"].prefix.include))
+ if self.spec.satisfies("@6.1:"):
+ args.append(
+ "-DROCTRACER_INCLUDE_DIR={0}".format(self.spec["roctracer-dev"].prefix.include)
+ )
+ args.append(self.define("MIOPEN_USE_ROCTRACER", "ON"))
+ args.append(
+ self.define(
+ "CMAKE_CXX_FLAGS",
+ f"-I{self.spec['nlohmann-json'].prefix.include} "
+ f"-I{self.spec['sqlite'].prefix.include} ",
+ )
+ )
return args
diff --git a/var/spack/repos/builtin/packages/miopen-opencl/package.py b/var/spack/repos/builtin/packages/miopen-opencl/package.py
index ec5eac8a96..b9b5da9e53 100644
--- a/var/spack/repos/builtin/packages/miopen-opencl/package.py
+++ b/var/spack/repos/builtin/packages/miopen-opencl/package.py
@@ -12,9 +12,9 @@ from spack.pkg.builtin.boost import Boost
class MiopenOpencl(CMakePackage):
"""AMD's library for high performance machine learning primitives."""
- homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen"
- git = "https://github.com/ROCmSoftwarePlatform/MIOpen.git"
- url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/MIOpen"
+ git = "https://github.com/ROCm/MIOpen.git"
+ url = "https://github.com/ROCm/MIOpen/archive/rocm-6.0.0.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -24,85 +24,13 @@ class MiopenOpencl(CMakePackage):
version("5.5.1", sha256="2cd75071b8ee876c69a94f028b6c8a9346d6d2fde7d4b64e6d635f3b6c994262")
version("5.5.0", sha256="791087242551669e546225e36123c21663f0dad14dbcfd6d0ce0e7bad0ab0de1")
- version("5.4.3", sha256="37ffe2ed3d7942da8ea2f6bdb85c7a2f58e3ccd31767db158a322769d3604efd")
- version("5.4.0", sha256="b4153791f9eeee4cbc5534bc6ad8b32c0947bcd38e08b77ebe144065a4fa5456")
- version("5.3.3", sha256="7efc98215d23a2caaf212378c37e9a6484f54a4ed3e9660719286e4f287d3715")
- version("5.3.0", sha256="c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6")
- version("5.2.3", sha256="28747847446955b3bab24f7fc65c1a6b863a12f12ad3a35e0312072482d38122")
- version("5.2.1", sha256="0977a8876d41bbd2fa268341c93892f35878d7efc1711194ad87582f877ff500")
- version("5.2.0", sha256="5fda69426e81df9f8fb6658e579176b9c4fcce3516fc8488d3cfd2b6f6f2b3b4")
- version("5.1.3", sha256="510461f5c5bdbcf8dc889099d1e5960b9f84bd845a9fc9154588a9898c701c1d")
- version("5.1.0", sha256="bb50201334d68addf153b84b88ab803027c4913d71bdbda6f5ccde3f672f6fdd")
- version(
- "5.0.2",
- sha256="e73c18c6e0791d6ca8958508d899072ce12fc6c27cf78792d0c2a5c7e34427be",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="4a46a2bdd11a2597c83cdb0c5e208b81728fab2ff7c585dabfca5aa05ee7a4f7",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="cb49bdf215ed9881755239b6312d72f829c1a0edf510e6d1fbb206c41f5406fc",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="be2f5ce962e15e62d427978422498c0ddf821b91fd40777a1ba915a2794d6fda",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="1fb2fd8b24f984174ec5338a58b7964e128b74dafb101373a41c8ed33955251a",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="034445470cfd44480a1d9854f9fdfe92cfb8efa3f002dee508eb9585e338486d",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="8ab02e784c8b3471159794766ed6303c333b33c69dc5186c0930e56504373b7c",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="068b1bc33f90fe21d3aab5697d2b3b7b930e613c54d6c5ee820768579b2b41ee",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="84c6c17be9c1a9cd0d3a2af283433f64b07a4b9941349f498e40fed82fb205a6",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="926e43c5583cf70d6b247f9fe45971b8b1cc9668f9c8490c142c7e8b6e268f1a",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="f57d75a220c1094395cc1dccab2185c759d779751ddbb5369a6f041ec77b2156",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="612b30d4a967bf18c7fa7aa3ef12ed558314ed04cee2775b842bf6a96cd7276f",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="37ffe2ed3d7942da8ea2f6bdb85c7a2f58e3ccd31767db158a322769d3604efd")
+ version("5.4.0", sha256="b4153791f9eeee4cbc5534bc6ad8b32c0947bcd38e08b77ebe144065a4fa5456")
+ version("5.3.3", sha256="7efc98215d23a2caaf212378c37e9a6484f54a4ed3e9660719286e4f287d3715")
+ version("5.3.0", sha256="c5819f593d71beeda2eb24b89182912240cc40f83b2b8f9de695a8e230aa4ea6")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3.5:", type="build")
depends_on("boost@1.67.0:1.73.0", type="link")
@@ -115,48 +43,19 @@ class MiopenOpencl(CMakePackage):
depends_on("bzip2", type="link")
depends_on("sqlite", type="link")
depends_on("half", type="build")
- depends_on("miopengemm@1.1.6", type="link", when="@3.5.0")
-
- for ver in ["3.5.0"]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("rocm-opencl@" + ver, when="@" + ver)
-
- for ver in [
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- ]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("rocm-opencl@" + ver, when="@" + ver)
- depends_on("miopengemm@" + ver, when="@" + ver)
-
- for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]:
- depends_on("mlirmiopen@" + ver, when="@" + ver)
+
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
+ depends_on(f"miopengemm@{ver}", when=f"@{ver}")
+
+ for ver in ["5.3.0", "5.3.3"]:
+ depends_on(f"mlirmiopen@{ver}", when=f"@{ver}")
for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
depends_on("nlohmann-json", type="link")
depends_on("rocblas", type="link")
- depends_on("rocmlir@" + ver, when="@" + ver)
+ depends_on(f"rocmlir@{ver}", when=f"@{ver}")
@classmethod
def determine_version(cls, lib):
@@ -170,7 +69,7 @@ class MiopenOpencl(CMakePackage):
return ver
def cmake_args(self):
- args = [
+ return [
self.define("MIOPEN_BACKEND", "OpenCL"),
self.define(
"MIOPEN_HIP_COMPILER", "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix)
@@ -181,6 +80,5 @@ class MiopenOpencl(CMakePackage):
self.define(
"MIOPEN_AMDGCN_ASSEMBLER", "{0}/bin/clang".format(self.spec["llvm-amdgpu"].prefix)
),
- self.define("Boost_USE_STATIC_LIBS", "Off"),
+ self.define("Boost_USE_STATIC_LIBS", False),
]
- return args
diff --git a/var/spack/repos/builtin/packages/miopen-tensile/0002-Improve-compilation-by-using-local-tensile-path.patch b/var/spack/repos/builtin/packages/miopen-tensile/0002-Improve-compilation-by-using-local-tensile-path.patch
deleted file mode 100644
index be92505c18..0000000000
--- a/var/spack/repos/builtin/packages/miopen-tensile/0002-Improve-compilation-by-using-local-tensile-path.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e98d74d..de8740e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -55,7 +55,7 @@ macro(add_library NAME)
- endif()
- endmacro()
- find_package(hip)
--
-+set( Tensile_TEST_LOCAL_PATH "" CACHE PATH "Use local Tensile directory instead of fetching a GitHub branch" )
- if(CMAKE_CXX_COMPILER MATCHES ".*/hcc$")
- set(TENSILE_USE_LLVM ON CACHE BOOL "Use LLVM for parsing config files.")
- set(TENSILE_USE_MSGPACK OFF CACHE BOOL "Use msgpack for parsing config files.")
-@@ -79,11 +79,30 @@ endif()
- # set(MIOPEN_TENSILE_SRC dev)
- # endif()
- # Use the virtual-env setup and download package from specified repo:
--virtualenv_install(wheel)
--virtualenv_install("git+https://github.com/ROCmSoftwarePlatform/Tensile.git@${MIOPEN_TENSILE_TAG}")
--list(APPEND CMAKE_PREFIX_PATH ${VIRTUALENV_HOME_DIR})
-
--find_package(Tensile REQUIRED COMPONENTS HIP)
-+option(BUILD_USING_LOCAL_TENSILE "Build as a shared library" ON )
-+
-+if (WIN32)
-+ set( Tensile_ROOT "${CMAKE_BINARY_DIR}/virtualenv/Lib/site-packages/Tensile" )
-+endif()
-+
-+include(virtualenv)
-+if (BUILD_USING_LOCAL_TENSILE)
-+ virtualenv_install(${Tensile_TEST_LOCAL_PATH})
-+ message (STATUS "using local Tensile from ${Tensile_TEST_LOCAL_PATH}, copied to ${Tensile_ROOT}")
-+else()
-+ # Use the virtual-env setup and download package from specified repot:
-+ set( tensile_fork "ROCmSoftwarePlatform" CACHE STRING "Tensile fork to use" )
-+ virtualenv_install("git+https://github.com/${tensile_fork}/Tensile.git@${MIOPEN_TENSILE_TAG}")
-+ message (STATUS "using GIT Tensile fork=${tensile_fork} from branch=${MIOPEN_TENSILE_TAG}")
-+endif()
-+message(STATUS "Adding ${VIRTUALENV_HOME_DIR} to CMAKE_PREFIX_PATH")
-+list(APPEND CMAKE_PREFIX_PATH ${VIRTUALENV_HOME_DIR})
-+if (TENSILE_VERSION)
-+ find_package(Tensile ${TENSILE_VERSION} EXACT REQUIRED HIP LLVM PATHS "${INSTALLED_TENSILE_PATH}")
-+else()
-+ find_package(Tensile 4.28.0 EXACT REQUIRED HIP LLVM PATHS "${INSTALLED_TENSILE_PATH}")
-+endif()
-
- set_target_properties( TensileHost PROPERTIES POSITION_INDEPENDENT_CODE ON )
-
diff --git a/var/spack/repos/builtin/packages/miopen-tensile/package.py b/var/spack/repos/builtin/packages/miopen-tensile/package.py
deleted file mode 100644
index 11dece2143..0000000000
--- a/var/spack/repos/builtin/packages/miopen-tensile/package.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 2013-2024 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 re
-
-from spack.package import *
-
-
-class MiopenTensile(CMakePackage):
- """MIOpenTensile provides host-callable interfaces to Tensile library.
- MIOpenTensile supports one programming model: HIP"""
-
- homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenTensile"
- git = "https://github.com/ROCmSoftwarePlatform/MIOpenTensile.git"
- url = "https://github.com/ROCmSoftwarePlatform/MIOpentensile/archive/rocm-5.0.0.tar.gz"
- tags = ["rocm"]
-
- maintainers("srekolam")
- libraries = ["libMIOpenTensile"]
-
- version("5.1.0", sha256="f1ae57bd4df8c154357b3f17caf0cfd5f80ba16ffff67bf6219a56f1eb5f897d")
- version(
- "5.0.2",
- sha256="7b85a6a37d0905b0a3baa8361fd71a5a32ad90f3a562fd5e1af7e2ba68099fa6",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="276ada52e2e8431851296a60df538e0171f8a1c4e9894de8954ffa9306cda2d8",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="eae14b20aec5ad57815c85d0571b7aecc3704696147f3cdbe34287e88da0c9e9",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="5f181f536040c0612bf889600f75951e7ec031ae5c4cb9c2c44f6ac3b15b004b",
- deprecated=True,
- )
-
- tensile_architecture = ("all", "gfx906", "gfx908", "gfx803", "gfx900")
-
- variant(
- "tensile_architecture",
- default="all",
- description="AMD GPU architecture",
- values=tensile_architecture,
- multi=True,
- )
- variant(
- "build_type",
- default="Release",
- values=("Release", "Debug", "RelWithDebInfo"),
- description="CMake build type",
- )
-
- patch("0002-Improve-compilation-by-using-local-tensile-path.patch", when="@4.5.0:")
-
- depends_on("cmake@3.5:", type="build")
- depends_on("msgpack-c@3:")
- depends_on("python@3.6:", type="build")
- depends_on("py-virtualenv", type="build")
- depends_on("perl-file-which", type="build")
- depends_on("py-pyyaml", type="build")
- depends_on("py-wheel", type="build")
- depends_on("py-msgpack", type="build")
- depends_on("py-pip", type="build")
-
- resource(
- name="Tensile",
- git="https://github.com/ROCmSoftwarePlatform/Tensile.git",
- commit="9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf",
- when="@4.5.0:",
- )
-
- for ver in ["4.5.0", "4.5.2", "5.0.0", "5.0.2", "5.1.0"]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
- depends_on("rocminfo@" + ver, when="@" + ver)
-
- def setup_build_environment(self, env):
- env.set("CXX", self.spec["hip"].hipcc)
-
- @classmethod
- def determine_version(cls, lib):
- match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
- if match:
- ver = "{0}.{1}.{2}".format(
- int(match.group(1)), int(match.group(2)), int(match.group(3))
- )
- else:
- ver = None
- return ver
-
- def cmake_args(self):
- arch = self.spec.variants["tensile_architecture"].value
- tensile_path = join_path(self.stage.source_path, "Tensile")
- args = [
- self.define("TENSILE_USE_MSGPACK", "ON"),
- self.define("COMPILER", "hipcc"),
- self.define("TENSILE_USE_LLVM", "OFF"),
- self.define("CODE_OBJECT_VERSION", "V3"),
- self.define("TENSILE_LIBRARY_FORMAT", "msgpack"),
- self.define("MIOPEN_TENSILE_SRC", "asm_full"),
- self.define("Tensile_TEST_LOCAL_PATH", tensile_path),
- ]
- args.append(self.define("Tensile_ARCHITECTURE", arch))
-
- return args
diff --git a/var/spack/repos/builtin/packages/miopengemm/package.py b/var/spack/repos/builtin/packages/miopengemm/package.py
index 937210ec77..89e7399cbc 100644
--- a/var/spack/repos/builtin/packages/miopengemm/package.py
+++ b/var/spack/repos/builtin/packages/miopengemm/package.py
@@ -12,9 +12,9 @@ class Miopengemm(CMakePackage):
"""An OpenCL general matrix multiplication (GEMM) API
and kernel generator"""
- homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM"
- git = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM.git"
- url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/MIOpenGEMM"
+ git = "https://github.com/ROCm/MIOpenGEMM.git"
+ url = "https://github.com/ROCm/MIOpenGEMM/archive/rocm-6.0.0.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -22,126 +22,32 @@ class Miopengemm(CMakePackage):
def url_for_version(self, version):
if version == Version("1.1.6"):
- return "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/1.1.6.tar.gz"
- url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-{0}.tar.gz"
+ return "https://github.com/ROCm/MIOpenGEMM/archive/1.1.6.tar.gz"
+ url = "https://github.com/ROCm/MIOpenGEMM/archive/rocm-{0}.tar.gz"
return url.format(version)
license("MIT")
version("5.5.1", sha256="a997b560521641e7173613cf547ecde5d15ac6fac1786d392b0f133c91f99a40")
version("5.5.0", sha256="ffd9775129564662b338952588057a088f7e9723b4a9a766b2dd96fdc0992c26")
- version("5.4.3", sha256="5051051cab60ca0f6347a981da6c9dbeddf8b0de698d4e5409a0db0c622acafc")
- version("5.4.0", sha256="a39faa8f4ab73e0cd6505a667bf10c07f93b9612af0711405c65043c4755129d")
- version("5.3.3", sha256="4a9c92bebe59bf6e08bd48861b68b1801d9e8dc406250dc8637d36614a5884c8")
- version("5.3.0", sha256="7e299daaca8e514bdb5b5efd9d9d3fc5cbfda68ad0117fe7cdbbf946b3f842cd")
- version("5.2.3", sha256="de9eecf39e6620be1511923e990101e64c63c2f56d8491c8bf9ffd1033709c00")
- version("5.2.1", sha256="9cea190ee0a6645b6d3ce3e136a8e7d07cf4044e98014ccc82b5e5f8b468b1c1")
- version("5.2.0", sha256="10458fb07b56a7fbe165595d588b7bf5f1300c57bda2f3133c3687c7bae39ea8")
- version("5.1.3", sha256="c70fc9e2a6d47356a612e24f5757bf16fdf26e671bd53a0975c1a0978da740b6")
- version("5.1.0", sha256="e2b20cdc20a745bcb7a554852e6b4bd39274c7dcc13fc19a81a282fb4dfa475f")
- version(
- "5.0.2",
- sha256="64a6bf7c902af63d85563e29361763e9daa1fd3699490a91c222b057673612cc",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="122cfb4e79476092e84f73f48540701c90fb87e0dc20cdf39f202d92e9ff5544",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="e778e0ccb123cd637ac459b2aecdf0fdead158580479bc0adfc9a28879e1d1c9",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="54ec908109a91f9022b61e63e3a1b9706cdcf133ba6fb3b39a65ca0e79be7747",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="0aee2281d9b8c625e9bda8efff3067237d6155a53f6c720dcb4e3b3ec8bf8d14",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="d32b3b98e695b7db2fd2faa6587a57728d1252d6d649dcb2db3102f98cd5930e",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="a11fa063248ed339fe897ab4c5d338b7279035fa37fcbe0909e2c4c352aaefb1",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="389328eb4a16565853691bd5b01a0eab978d99e3217329236ddc63a38b8dd4eb",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="366d03facb1ec5f6f4894aa88859df1d7fea00fee0cbac5173d7577e9a8ba799",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="66d844a17729ab25c1c2a243667d9714eb89fd51e42bfc014e2faf54a8642064",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="8e1273c35d50e9fd92e303d9bcbdd42ddbfda20844b3248428e16b54928f6dc2",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="d76f5b4b3b9d1e3589a92f667f39eab5b5ab54ec3c4e04d412035be3ec623547",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="392b280ca564b120f6b24ec1fe8782cba08a8a5fb52938e8bc3dc887d3fd08fa",
- deprecated=True,
- )
- version(
- "1.1.6",
- sha256="9ab04903794c6a59432928eaec92c687d51e2b4fd29630cf227cbc49d56dc69b",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="5051051cab60ca0f6347a981da6c9dbeddf8b0de698d4e5409a0db0c622acafc")
+ version("5.4.0", sha256="a39faa8f4ab73e0cd6505a667bf10c07f93b9612af0711405c65043c4755129d")
+ version("5.3.3", sha256="4a9c92bebe59bf6e08bd48861b68b1801d9e8dc406250dc8637d36614a5884c8")
+ version("5.3.0", sha256="7e299daaca8e514bdb5b5efd9d9d3fc5cbfda68ad0117fe7cdbbf946b3f842cd")
+ version("5.2.3", sha256="de9eecf39e6620be1511923e990101e64c63c2f56d8491c8bf9ffd1033709c00")
+ version("5.2.1", sha256="9cea190ee0a6645b6d3ce3e136a8e7d07cf4044e98014ccc82b5e5f8b468b1c1")
+ version("5.2.0", sha256="10458fb07b56a7fbe165595d588b7bf5f1300c57bda2f3133c3687c7bae39ea8")
+ version("5.1.3", sha256="c70fc9e2a6d47356a612e24f5757bf16fdf26e671bd53a0975c1a0978da740b6")
+ version("5.1.0", sha256="e2b20cdc20a745bcb7a554852e6b4bd39274c7dcc13fc19a81a282fb4dfa475f")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
- depends_on("rocm-cmake@3.5.0", type="build", when="@1.1.6")
- depends_on("rocm-opencl@3.5.0", when="@1.1.6")
- for ver in [
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- ]:
- depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
- depends_on("rocm-opencl@" + ver, when="@" + ver)
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
+ depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
@classmethod
def determine_version(cls, lib):
diff --git a/var/spack/repos/builtin/packages/mira/package.py b/var/spack/repos/builtin/packages/mira/package.py
index 7c0cd23874..005a7a4a16 100644
--- a/var/spack/repos/builtin/packages/mira/package.py
+++ b/var/spack/repos/builtin/packages/mira/package.py
@@ -18,6 +18,8 @@ class Mira(AutotoolsPackage):
version("4.0.2", sha256="a32cb2b21e0968a5536446287c895fe9e03d11d78957554e355c1080b7b92a80")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.46:")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/mitos/package.py b/var/spack/repos/builtin/packages/mitos/package.py
index b9c12d9e5f..8090d9ec8d 100644
--- a/var/spack/repos/builtin/packages/mitos/package.py
+++ b/var/spack/repos/builtin/packages/mitos/package.py
@@ -19,6 +19,8 @@ class Mitos(CMakePackage):
version("0.9.2", commit="8cb143a2e8c00353ff531a781a9ca0992b0aaa3d")
version("0.9.1", sha256="67abe227d2f9b4d2f235031b526d3ceb2c4792ad98772b1b1d5af0d227a795fc")
+ depends_on("cxx", type="build") # generated
+
depends_on("dyninst@8.2.1:")
depends_on("hwloc")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.1.0.patch b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.1.0.patch
new file mode 100644
index 0000000000..80bbdff605
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.1.0.patch
@@ -0,0 +1,86 @@
+From 19f084566394c6556cacf1b812a9a64e1fe0610e Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Wed, 12 Jun 2024 23:33:53 +0000
+Subject: [PATCH] add half include path for tests in 6.1
+
+---
+ model_compiler/python/nnir_to_clib.py | 4 ++++
+ samples/mv_objdetect/CMakeLists.txt | 6 +++++-
+ utilities/rocAL/rocAL_unittests/CMakeLists.txt | 3 ++-
+ utilities/rocAL/rocAL_video_unittests/CMakeLists.txt | 3 ++-
+ 4 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/model_compiler/python/nnir_to_clib.py b/model_compiler/python/nnir_to_clib.py
+index 623bf43..544ed31 100644
+--- a/model_compiler/python/nnir_to_clib.py
++++ b/model_compiler/python/nnir_to_clib.py
+@@ -160,6 +160,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND)
+ include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers )
+ endif()
+
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
++include_directories(${HALF_INCLUDE_DIR})
++
+ find_package(OpenCV QUIET)
+ include_directories (${ROCM_PATH}/include ${ROCM_PATH}/include/mivisionx)
+ include_directories (${PROJECT_SOURCE_DIR}/lib)
+diff --git a/samples/mv_objdetect/CMakeLists.txt b/samples/mv_objdetect/CMakeLists.txt
+index 54d527b..c334ae4 100644
+--- a/samples/mv_objdetect/CMakeLists.txt
++++ b/samples/mv_objdetect/CMakeLists.txt
+@@ -29,6 +29,7 @@ project (mvobjdetect)
+ set (CMAKE_CXX_STANDARD 14)
+
+ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
++find_path(HALF_INCLUDE_DIR half.hpp)
+ find_package(OpenCV QUIET)
+
+ set(ROCM_PATH /opt/rocm CACHE PATH "ROCm Installation Path")
+@@ -50,7 +51,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND)
+ include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers )
+ endif()
+
+-include_directories (${ROCM_PATH}/include ${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} )
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
++
++include_directories (${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} ${HALF_INCLUDE_DIR} )
+ link_directories (${ROCM_PATH}/lib ${PROJECT_SOURCE_DIR}/lib)
+ option (USE_POSTPROC "Use postprocessing module implementation" ON)
+ set(SOURCES mvobjdetect.cpp mvdeploy_api.cpp visualize.cpp)
+diff --git a/utilities/rocAL/rocAL_unittests/CMakeLists.txt b/utilities/rocAL/rocAL_unittests/CMakeLists.txt
+index ba90dce..f3f2df9 100644
+--- a/utilities/rocAL/rocAL_unittests/CMakeLists.txt
++++ b/utilities/rocAL/rocAL_unittests/CMakeLists.txt
+@@ -43,11 +43,12 @@ include(GNUInstallDirs)
+
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake)
+
++find_path(HALF_INCLUDE_DIR half.hpp)
+ find_package(OpenCV QUIET)
+ find_package(AMDRPP QUIET)
+
+ include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR})
+-include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal)
++include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal ${HALF_INCLUDE_DIR})
+ link_directories(${ROCM_PATH}/lib/)
+ file(GLOB My_Source_Files ./*.cpp)
+ add_executable(${PROJECT_NAME} ${My_Source_Files})
+diff --git a/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt b/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt
+index 8f4c0fa..dd23135 100644
+--- a/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt
++++ b/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt
+@@ -48,7 +48,8 @@ find_package(OpenCV QUIET)
+ find_package(AMDRPP QUIET)
+
+ include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR})
+-include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal)
++find_path(HALF_INCLUDE_DIR half.hpp)
++include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal ${HALF_INCLUDE_DIR})
+ link_directories(${ROCM_PATH}/lib/)
+ file(GLOB My_Source_Files ./*.cpp)
+ add_executable(${PROJECT_NAME} ${My_Source_Files})
+--
+2.27.0
+
diff --git a/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.2.0.patch b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.2.0.patch
new file mode 100644
index 0000000000..b45580ef0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests-6.2.0.patch
@@ -0,0 +1,52 @@
+From 19f084566394c6556cacf1b812a9a64e1fe0610e Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Wed, 12 Jun 2024 23:33:53 +0000
+Subject: [PATCH] add half include path for tests in 6.1
+
+---
+ model_compiler/python/nnir_to_clib.py | 4 ++++
+ samples/mv_objdetect/CMakeLists.txt | 6 +++++-
+ utilities/rocAL/rocAL_unittests/CMakeLists.txt | 3 ++-
+ utilities/rocAL/rocAL_video_unittests/CMakeLists.txt | 3 ++-
+ 4 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/model_compiler/python/nnir_to_clib.py b/model_compiler/python/nnir_to_clib.py
+index 623bf43..544ed31 100644
+--- a/model_compiler/python/nnir_to_clib.py
++++ b/model_compiler/python/nnir_to_clib.py
+@@ -160,6 +160,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND)
+ include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers )
+ endif()
+
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
++include_directories(${HALF_INCLUDE_DIR})
++
+ find_package(OpenCV QUIET)
+ include_directories (${ROCM_PATH}/include ${ROCM_PATH}/include/mivisionx)
+ include_directories (${PROJECT_SOURCE_DIR}/lib)
+diff --git a/samples/mv_objdetect/CMakeLists.txt b/samples/mv_objdetect/CMakeLists.txt
+index 54d527b..c334ae4 100644
+--- a/samples/mv_objdetect/CMakeLists.txt
++++ b/samples/mv_objdetect/CMakeLists.txt
+@@ -29,6 +29,7 @@ project (mvobjdetect)
+ set (CMAKE_CXX_STANDARD 14)
+
+ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
++find_path(HALF_INCLUDE_DIR half.hpp)
+ find_package(OpenCV QUIET)
+
+ set(ROCM_PATH /opt/rocm CACHE PATH "ROCm Installation Path")
+@@ -50,7 +51,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND)
+ include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers )
+ endif()
+
+-include_directories (${ROCM_PATH}/include ${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} )
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
++
++include_directories (${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} ${HALF_INCLUDE_DIR} )
+ link_directories (${ROCM_PATH}/lib ${PROJECT_SOURCE_DIR}/lib)
+ option (USE_POSTPROC "Use postprocessing module implementation" ON)
+ set(SOURCES mvobjdetect.cpp mvdeploy_api.cpp visualize.cpp)
+2.27.0
diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py
index cd77fdca6b..2737c0ca7e 100644
--- a/var/spack/repos/builtin/packages/mivisionx/package.py
+++ b/var/spack/repos/builtin/packages/mivisionx/package.py
@@ -13,9 +13,9 @@ class Mivisionx(CMakePackage):
homepage = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX"
git = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX.git"
- url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/archive/rocm-5.5.0.tar.gz"
+ url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/archive/rocm-6.1.2.tar.gz"
- maintainers("srekolam", "renjithravindrankannath")
+ maintainers("srekolam", "renjithravindrankannath", "afzpatel")
tags = ["rocm"]
def url_for_version(self, version):
@@ -27,91 +27,27 @@ class Mivisionx(CMakePackage):
license("MIT")
+ version("6.2.4", sha256="7e65dc83f1b85e089c1218dff57211e64f3586bcb4415bda4798e4a434cba216")
+ version("6.2.1", sha256="591fe23ee1e2ab49f29aeeb835b5045e4ba00165c604ddfaa26bd8eb56cb367d")
+ version("6.2.0", sha256="ce28ac3aef76f28869c4dad9ffd9ef090e0b54ac58088f1f1eef803641125b51")
+ version("6.1.2", sha256="0afa664931f566b7f5a3abd474dd641e56077529a2a5d7c788f5e6700e957ed6")
+ version("6.1.1", sha256="3483b5167c47047cca78581cc6c9685138f9b5b25edb11618b720814788fc2a0")
+ version("6.1.0", sha256="f18a72c4d12c36ab50f9c3a5c22fc3641feb11c99fed513540a16a65cd149fd1")
+ version("6.0.2", sha256="e39521b3109aa0900f652ae95a4421df0fa29fd57e816268cc6602d243c50779")
+ version("6.0.0", sha256="01324a12f21ea0e29a4d7d7c60498ba9231723569fedcdd90f28ddffb5e0570e")
version("5.7.1", sha256="bfc074bc32ebe84c72149ee6abb30b5b6499023d5b98269232de82e35d0505a8")
version("5.7.0", sha256="07e4ec8a8c06a9a8bb6394a043c9c3e7176acd3b462a16de91ef9518a64df9ba")
version("5.6.1", sha256="b2ff95c1488e244f379482631dae4f9ab92d94a513d180e03607aa1e184b5b0a")
version("5.6.0", sha256="34c184e202b1a6da2398b66e33c384d5bafd8f8291089c18539715c5cb73eb1f")
version("5.5.1", sha256="e8209f87a57c4222003a936240e7152bbfa496862113358f29d4c3e80d4cdf56")
version("5.5.0", sha256="af266550ecccad80f08954f23e47e8264eb338b0928a5314bd6efca349fc5a14")
- version("5.4.3", sha256="4da82974962a70c326ce2427c664517b1efdff436efe222e6bc28817c222a082")
- version("5.4.0", sha256="caa28a30972704ddbf1a87cefdc0b0a35381d369961c43973d473a1573bd35cc")
- version("5.3.3", sha256="378fafcb327e17e0e11fe1d1029d1740d84aaef0fd59614ed7376499b3d716f6")
- version("5.3.0", sha256="58e68f1c78bbe5694e42bf61be177f9e94bfd3e0c113ec6284493c8684836c58")
- version("5.2.3", sha256="bbcdb5808d2bc880486dffa89f4111fb4b1d6dfe9b11fcd46fbd17939d057cf0")
- version("5.2.1", sha256="201996b31f59a8d5e4cc3f17d17a5b81158a34d2a1c833b65ccc3dceb21d176f")
- version("5.2.0", sha256="fee620a1edd3bce18b2cec9ef26ec2afe0a85d6da8a37ed713ab0d1342382503")
- version("5.1.3", sha256="62591d5caedc13832c3ccef629a88d9c2a43c884daad1124ddcb9c5f7d5470e9")
- version("5.1.0", sha256="e082415cc2fb859c53a6d6e5d72ca4529f6b4d56a4abe274dc374faaa5910513")
- version(
- "5.0.2",
- sha256="da730c2347b7f2d0cb7a262f8305750988f18e9f1eb206cf297bacaab2f6b408",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="935113feb71eced2b5f21fffc2a90a188b4ef2fe009c50f0445504cb27fbc58c",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="26fd7fbd2e319bf4a8657900ad2f81bba1ae66745c2ba95f2f87e33903cfe69c",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="518834893d3fcdb7ecff179b3f3992ca1aacb30b6d95711c74918abb6f80b925",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="d77d63c0f148870dcd2a39a823e94b28adef9e84d2c37dfc3b05db5de4d7af83",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="31f6ab9fb7f40b23d4b24c9a70f809623720943e0492c3d357dd22dcfa50efb2",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="172857b1b340373ae81ed6aa241559aa781e32250e75c82d7ba3c002930a8a3a",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="0b431a49807682b9a81adac6a64160a0712ddaa3963e0f05595c93b92be777ea",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="e09d4890b729740ded056b3974daea84c8eb1fc93714c52bf89f853c2eef1fb5",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="8a67fae77a05ef60a501e64a572a7bd2ccb9243518b1414112ccd1d1f78d08c8",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="892812cc6e6977ed8cd4b69c63f4c17be43b83c78eeafd9549236c17f6eaa2af",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="4e177a9b5dcae671d6ea9f0686cf5f73fcd1e3feb3c50425c8c6d43ac5d77feb",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="3ce13c6449739c653139fc121411d94eaa9d764d3d339c4c78fab4b8aa199965",
- deprecated=True,
- )
- version(
- "1.7",
- sha256="ff77142fd4d4a93136fd0ac17348861f10e8f5d5f656fa9dacee08d8fcd2b1d8",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="4da82974962a70c326ce2427c664517b1efdff436efe222e6bc28817c222a082")
+ version("5.4.0", sha256="caa28a30972704ddbf1a87cefdc0b0a35381d369961c43973d473a1573bd35cc")
+ version("5.3.3", sha256="378fafcb327e17e0e11fe1d1029d1740d84aaef0fd59614ed7376499b3d716f6")
+ version("5.3.0", sha256="58e68f1c78bbe5694e42bf61be177f9e94bfd3e0c113ec6284493c8684836c58")
+
+ depends_on("cxx", type="build") # generated
# Adding 2 variants OPENCL ,HIP which HIP as default. earlier to 5.0.0,OPENCL
# was the default but has change dto HIP from 5.0.0 onwards.
@@ -121,9 +57,17 @@ class Mivisionx(CMakePackage):
variant("opencl", default=False, description="Use OPENCL as the backend")
variant("hip", default=True, description="Use HIP as backend")
variant("add_tests", default=False, description="add tests and samples folder")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
patch("0001-add-half-include-path.patch", when="@5.5")
- patch("0001-add-half-include-path-5.6.patch", when="@5.6:")
- patch("0002-add-half-include-path-for-tests.patch", when="@5.5: +add_tests")
+ patch("0001-add-half-include-path-5.6.patch", when="@5.6:6.1")
+ patch("0002-add-half-include-path-for-tests.patch", when="@5.5:6.0 +add_tests")
+ patch("0002-add-half-include-path-for-tests-6.1.0.patch", when="@6.1 +add_tests")
+ patch("0002-add-half-include-path-for-tests-6.2.0.patch", when="@6.2.0: +add_tests")
patch(
"https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/commit/da24882438b91a0ae1feee23206b75c1a1256887.patch?full_index=1",
@@ -135,143 +79,97 @@ class Mivisionx(CMakePackage):
conflicts("+add_tests", when="@:5.4")
def patch(self):
- if self.spec.satisfies("@4.2.0"):
- filter_file(
- "${ROCM_PATH}/opencl",
- self.spec["rocm-opencl"].prefix,
- "amd_openvx/cmake/FindOpenCL.cmake",
- string=True,
- )
- filter_file(
- "/opt/rocm/mivisionx/include",
- self.spec["mivisionx"].prefix.include,
- "utilities/mv_deploy/CMakeLists.txt",
- string=True,
- )
- if self.spec.satisfies("@4.5.0:5.1 + hip"):
- filter_file(
- "${ROCM_PATH}/miopen",
- self.spec["miopen-hip"].prefix.miopen,
- "amd_openvx_extensions/CMakeLists.txt",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/bin",
- self.spec["hip"].prefix.bin,
- "amd_openvx/openvx/hipvx/CMakeLists.txt",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/bin",
- self.spec["hip"].prefix.bin,
- "amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt",
- string=True,
- )
if self.spec.satisfies("@5.1.3: + hip"):
filter_file(
- "${ROCM_PATH}/include/miopen/config.h",
+ r"${ROCM_PATH}/include/miopen/config.h",
"{0}/include/miopen/config.h".format(self.spec["miopen-hip"].prefix),
"amd_openvx_extensions/CMakeLists.txt",
string=True,
)
if self.spec.satisfies("@5.1.3: + opencl"):
filter_file(
- "${ROCM_PATH}/include/miopen/config.h",
+ r"${ROCM_PATH}/include/miopen/config.h",
"{0}/include/miopen/config.h".format(self.spec["miopen-opencl"].prefix),
"amd_openvx_extensions/CMakeLists.txt",
string=True,
)
if self.spec.satisfies("@5.3.0: + hip"):
filter_file(
- "${ROCM_PATH}/llvm/bin/clang++",
+ r"${ROCM_PATH}/llvm/bin/clang++",
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
"amd_openvx/openvx/hipvx/CMakeLists.txt",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/llvm/bin/clang++",
- "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
"amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt",
string=True,
)
- if self.spec.satisfies("@5.5.0: + hip"):
+ if self.spec.satisfies("@5.5.0:6.1 + hip"):
filter_file(
- "${ROCM_PATH}/llvm/bin/clang++",
+ r"${ROCM_PATH}/llvm/bin/clang++",
"{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
"rocAL/rocAL/rocAL_hip/CMakeLists.txt",
string=True,
)
- if self.spec.satisfies("+add_tests"):
+ if self.spec.satisfies("@5.5.0:6.0.0 +add_tests"):
filter_file(
- "${ROCM_PATH}/include/mivisionx",
+ r"${ROCM_PATH}/include/mivisionx",
"{0}/include/mivisionx".format(self.spec.prefix),
- "tests/amd_migraphx_tests/mnist/CMakeLists.txt",
+ "samples/inference/mv_objdetect/CMakeLists.txt",
string=True,
)
filter_file(
- "${ROCM_PATH}/lib",
+ r"${ROCM_PATH}/lib",
"{0}/lib".format(self.spec.prefix),
- "tests/amd_migraphx_tests/mnist/CMakeLists.txt",
+ "samples/inference/mv_objdetect/CMakeLists.txt",
string=True,
)
+ if self.spec.satisfies("@6.1.0: +add_tests"):
filter_file(
- "${ROCM_PATH}/include/mivisionx",
+ r"${ROCM_PATH}/include/mivisionx",
"{0}/include/mivisionx".format(self.spec.prefix),
- "tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
+ "samples/mv_objdetect/CMakeLists.txt",
string=True,
)
filter_file(
- "${ROCM_PATH}/lib",
+ r"${ROCM_PATH}/lib",
"{0}/lib".format(self.spec.prefix),
- "tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
+ "samples/mv_objdetect/CMakeLists.txt",
string=True,
)
+
+ if self.spec.satisfies("@:6.1 +add_tests"):
filter_file(
- "${ROCM_PATH}/include/mivisionx",
- "{0}/include/mivisionx".format(self.spec.prefix),
- "samples/inference/mv_objdetect/CMakeLists.txt",
+ r"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
+ "{0}/include/mivisionx/rocal".format(self.spec.prefix),
+ "utilities/rocAL/rocAL_unittests/CMakeLists.txt",
+ "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
string=True,
)
filter_file(
- "${ROCM_PATH}/lib",
+ r"${ROCM_PATH}/lib",
"{0}/lib".format(self.spec.prefix),
- "samples/inference/mv_objdetect/CMakeLists.txt",
+ "utilities/rocAL/rocAL_unittests/CMakeLists.txt",
+ "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
string=True,
)
+ if self.spec.satisfies("+add_tests"):
filter_file(
- "${ROCM_PATH}/include/mivisionx",
+ r"${ROCM_PATH}/include/mivisionx",
"{0}/include/mivisionx".format(self.spec.prefix),
+ "tests/amd_migraphx_tests/mnist/CMakeLists.txt",
+ "tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
"model_compiler/python/nnir_to_clib.py",
string=True,
)
filter_file(
- "/opt/rocm",
- "{0}".format(self.spec.prefix),
- "model_compiler/python/nnir_to_clib.py",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
- "{0}/include/mivisionx/rocal".format(self.spec.prefix),
- "utilities/rocAL/rocAL_unittests/CMakeLists.txt",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/lib",
+ r"${ROCM_PATH}/lib",
"{0}/lib".format(self.spec.prefix),
- "utilities/rocAL/rocAL_unittests/CMakeLists.txt",
- string=True,
- )
- filter_file(
- "${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal",
- "{0}/include/mivisionx/rocal".format(self.spec.prefix),
- "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
+ "tests/amd_migraphx_tests/mnist/CMakeLists.txt",
+ "tests/amd_migraphx_tests/resnet50/CMakeLists.txt",
string=True,
)
filter_file(
- "${ROCM_PATH}/lib",
- "{0}/lib".format(self.spec.prefix),
- "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt",
+ r"/opt/rocm",
+ "{0}".format(self.spec.prefix),
+ "model_compiler/python/nnir_to_clib.py",
string=True,
)
@@ -280,26 +178,15 @@ class Mivisionx(CMakePackage):
depends_on("ffmpeg@4.4", type="build", when="@5.4:")
depends_on("protobuf@:3", type="build")
depends_on(
- "opencv@:3.4"
- "+calib3d+features2d+highgui+imgcodecs+imgproc"
- "+video+videoio+flann+photo+objdetect",
- type="build",
- when="@:5.2",
- )
- depends_on(
"opencv@4.5:"
"+calib3d+features2d+highgui+imgcodecs+imgproc"
- "+video+videoio+flann+photo+objdetect",
+ "+video+videoio+flann+photo+objdetect+png+jpeg",
type="build",
when="@5.3:",
)
- depends_on("rocm-opencl@3.5.0", when="@1.7+opencl")
- depends_on("rocm-cmake@3.5.0", type="build", when="@1.7")
- depends_on("miopen-opencl@3.5.0", when="@1.7+opencl")
- depends_on("miopengemm@1.1.6", when="@1.7+opencl")
- depends_on("openssl", when="@4.0.0:")
- depends_on("libjpeg-turbo@2.0.6+partial_decoder", type="build")
- depends_on("rpp", when="@5.5:")
+ depends_on("openssl")
+ depends_on("libjpeg-turbo@2.0.6+partial_decoder", type="build", when="@:6.2.0")
+ depends_on("rpp@1.2.0", when="@5.5:5.6")
depends_on("lmdb", when="@5.5:")
depends_on("py-setuptools", when="@5.6:")
depends_on("py-wheel", when="@5.6:")
@@ -311,54 +198,18 @@ class Mivisionx(CMakePackage):
depends_on("py-pytz", when="+add_tests")
depends_on("rapidjson", when="@5.7:")
- conflicts("^cmake@3.22:", when="@:5.0.0")
# need to choose atleast one backend and both cannot be set
# HIP as backend did not build for older releases 5.1.0 where
# OPENCL was default backend.
conflicts("+opencl+hip")
- conflicts("+hip", when="@:5.1.0")
with when("+opencl"):
- for ver in [
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- ]:
- depends_on("rocm-opencl@" + ver, when="@" + ver)
- depends_on("miopengemm@" + ver, when="@" + ver)
- depends_on("miopen-opencl@" + ver, when="@" + ver)
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
+ depends_on(f"rocm-opencl@{ver}", when=f"@{ver}")
+ depends_on(f"miopengemm@{ver}", when=f"@{ver}")
+ depends_on(f"miopen-opencl@{ver}", when=f"@{ver}")
with when("+hip"):
for ver in [
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -369,8 +220,16 @@ class Mivisionx(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("miopen-hip@" + ver, when="@" + ver)
+ depends_on(f"miopen-hip@{ver}", when=f"@{ver}")
for ver in [
"5.3.3",
"5.4.0",
@@ -381,16 +240,64 @@ class Mivisionx(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("migraphx@" + ver, when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
+ depends_on(f"migraphx@{ver}", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
depends_on("python@3.5:", type="build")
+ for ver in [
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rpp@{ver}", when=f"@{ver}")
+
def setup_run_environment(self, env):
env.set("MIVISIONX_MODEL_COMPILER_PATH", self.spec.prefix.libexec.mivisionx.model_compiler)
+ if self.spec.satisfies("@6.1:"):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib)
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
def flag_handler(self, name, flags):
spec = self.spec
@@ -419,12 +326,13 @@ class Mivisionx(CMakePackage):
args.append(
self.define("AMDRPP_INCLUDE_DIRS", "{0}/include/rpp".format(spec["rpp"].prefix))
)
+ args.append(self.define("CMAKE_INSTALL_PREFIX_PYTHON", spec.prefix))
+ if self.spec.satisfies("@5.5:6.2.0"):
args.append(
self.define(
"TurboJpeg_LIBRARIES_DIRS", "{0}/lib64".format(spec["libjpeg-turbo"].prefix)
)
)
- args.append(self.define("CMAKE_INSTALL_PREFIX_PYTHON", spec.prefix))
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/mixcr/package.py b/var/spack/repos/builtin/packages/mixcr/package.py
index 7cd5658c98..0c3b311900 100644
--- a/var/spack/repos/builtin/packages/mixcr/package.py
+++ b/var/spack/repos/builtin/packages/mixcr/package.py
@@ -18,6 +18,7 @@ class Mixcr(Package):
homepage = "https://mixcr.readthedocs.io/en/master/index.html"
url = "https://github.com/milaboratory/mixcr/releases/download/v3.0.2/mixcr-3.0.2.zip"
+ version("4.6.0", sha256="05db1276951a2e656d0a7bf4e2b1fff326733a5f961a9d4829be139852fabe13")
version("4.3.2", sha256="8f67cda8e55eeee66b46db0f33308418b6ddb63ca8914623035809ccb5aae2c2")
version("3.0.2", sha256="b4dcad985053438d5f5590555f399edfbd8cb514e1b9717620ee0ad0b5eb6b33")
diff --git a/var/spack/repos/builtin/packages/mkfontscale/package.py b/var/spack/repos/builtin/packages/mkfontscale/package.py
index 045ebb4b4d..623ffe1132 100644
--- a/var/spack/repos/builtin/packages/mkfontscale/package.py
+++ b/var/spack/repos/builtin/packages/mkfontscale/package.py
@@ -10,17 +10,20 @@ class Mkfontscale(AutotoolsPackage, XorgPackage):
"""mkfontscale creates the fonts.scale and fonts.dir index files used by the
legacy X11 font system."""
- homepage = "https://cgit.freedesktop.org/xorg/app/mkfontscale"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/mkfontscale"
xorg_mirror_path = "app/mkfontscale-1.1.2.tar.gz"
license("MIT")
+ version("1.2.3", sha256="3a026b468874eb672a1d0a57dbd3ddeda4f0df09886caf97d30097b70c2df3f8")
version("1.2.2", sha256="4a5af55e670713024639a7f7d10826d905d86faf574cd77e0f5aef2d00e70168")
version("1.1.2", sha256="8bba59e60fbc4cb082092cf6b67e810b47b4fe64fbc77dbea1d7e7d55312b2e4")
+ depends_on("c", type="build")
+
depends_on("libfontenc")
- depends_on("freetype")
+ depends_on("freetype build_system=autotools")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/mlc-llm/package.py b/var/spack/repos/builtin/packages/mlc-llm/package.py
new file mode 100644
index 0000000000..c2e1194ddf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mlc-llm/package.py
@@ -0,0 +1,89 @@
+# Copyright 2013-2024 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.package import *
+
+
+class MlcLlm(CMakePackage, CudaPackage):
+ """MLC LLM is a machine learning compiler and high-performance deployment
+ engine for large language models. The mission of this project is to enable
+ everyone to develop, optimize, and deploy AI models natively on everyone's
+ platforms."""
+
+ homepage = "https://github.com/mlc-ai/mlc-llm"
+ git = "https://github.com/mlc-ai/mlc-llm.git"
+ url = "https://github.com/mlc-ai/mlc-llm/archive/refs/tags/v0.1.dev0.tar.gz"
+
+ license("Apache-2.0", checked_by="alex391")
+
+ version("2024-06-13", commit="ceba9511df3da06a8541916522d57fdc99cb6f54", submodules=True)
+
+ depends_on("cmake@3.24:", type="build")
+ depends_on("rust", type="build")
+ depends_on("cxx", type="build")
+ depends_on("python@3.11", type="build")
+ depends_on("apache-tvm")
+
+ depends_on("cuda@11.8:", when="+cuda")
+
+ variant(
+ "flash-infer",
+ default=False,
+ description="Use FlashInfer? (need CUDA w/ compute capability 80;86;89;90)",
+ when="+cuda",
+ )
+ conflicts("cuda_arch=none", when="+flash-infer")
+
+ unsupported_flash_infer_cuda_archs = filter(
+ lambda arch: arch not in ["80", "86", "89", "90"], CudaPackage.cuda_arch_values
+ )
+ for arch in unsupported_flash_infer_cuda_archs:
+ conflicts(
+ f"cuda_arch={arch}",
+ when="+flash-infer",
+ msg=f"CUDA architecture {arch} is not supported when +flash-infer",
+ )
+
+ def patch(self):
+ with open("cmake/config.cmake", "w") as f:
+ f.write(self._gen_cmake_config())
+
+ def _gen_cmake_config(self) -> str:
+ """
+ Generate string for cmake/config.cmake (based on cmake/gen_cmake_config.py)
+ """
+
+ tvm_home = self.spec["apache-tvm"].prefix
+
+ cmake_config_str = f"set(TVM_SOURCE_DIR {tvm_home})\n"
+ cmake_config_str += "set(CMAKE_BUILD_TYPE RelWithDebInfo)\n"
+
+ if self.spec.satisfies("+cuda"):
+ cmake_config_str += "set(USE_CUDA ON)\n"
+ cmake_config_str += "set(USE_THRUST ON)\n"
+ else:
+ cmake_config_str += "set(USE_CUDA OFF)\n"
+
+ # FlashInfer related
+ if self.spec.satisfies("+flash-infer"):
+ cmake_config_str += "set(USE_FLASHINFER ON)\n"
+ cmake_config_str += "set(FLASHINFER_ENABLE_FP8 OFF)\n"
+ cmake_config_str += "set(FLASHINFER_ENABLE_BF16 OFF)\n"
+ cmake_config_str += "set(FLASHINFER_GEN_GROUP_SIZES 1 4 6 8)\n"
+ cmake_config_str += "set(FLASHINFER_GEN_PAGE_SIZES 16)\n"
+ cmake_config_str += "set(FLASHINFER_GEN_HEAD_DIMS 128)\n"
+ cmake_config_str += "set(FLASHINFER_GEN_KV_LAYOUTS 0 1)\n"
+ cmake_config_str += "set(FLASHINFER_GEN_POS_ENCODING_MODES 0 1)\n"
+ cmake_config_str += 'set(FLASHINFER_GEN_ALLOW_FP16_QK_REDUCTIONS "false")\n'
+ cmake_config_str += 'set(FLASHINFER_GEN_CASUALS "false" "true")\n'
+
+ cuda_archs = ";".join(self.spec.variants["cuda_arch"].value)
+ cmake_config_str += f"set(FLASHINFER_CUDA_ARCHITECTURES {cuda_archs})\n"
+ cmake_config_str += f"set(CMAKE_CUDA_ARCHITECTURES {cuda_archs})\n"
+ else:
+ cmake_config_str += "set(USE_FLASHINFER OFF)\n"
+
+ return cmake_config_str
diff --git a/var/spack/repos/builtin/packages/mlhka/package.py b/var/spack/repos/builtin/packages/mlhka/package.py
index 807e7c3bb2..02b9bd521d 100644
--- a/var/spack/repos/builtin/packages/mlhka/package.py
+++ b/var/spack/repos/builtin/packages/mlhka/package.py
@@ -17,6 +17,8 @@ class Mlhka(Package):
version("2.1", commit="e735ddd39073af58da21b00b27dea203736e5467")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
cxx = which("c++")
cxx("MLHKA_version{0}.cpp".format(self.version), "-o", "MLHKA")
diff --git a/var/spack/repos/builtin/packages/mlirmiopen/package.py b/var/spack/repos/builtin/packages/mlirmiopen/package.py
index eeed27450d..d2766e8a93 100644
--- a/var/spack/repos/builtin/packages/mlirmiopen/package.py
+++ b/var/spack/repos/builtin/packages/mlirmiopen/package.py
@@ -10,21 +10,16 @@ from spack.package import *
class Mlirmiopen(CMakePackage):
"""Multi-Level Intermediate Representation for rocm miopen project."""
- homepage = "https://github.com/ROCmSoftwarePlatform/llvm-project-mlir"
- url = "https://github.com/ROCmSoftwarePlatform/llvm-project-mlir/archive/refs/tags/rocm-5.4.0.tar.gz"
- git = "https://github.com/ROCmSoftwarePlatform/llvm-project-mlir.git"
+ homepage = "https://github.com/ROCm/llvm-project-mlir"
+ url = "https://github.com/ROCm/llvm-project-mlir/archive/refs/tags/rocm-5.4.0.tar.gz"
+ git = "https://github.com/ROCm/llvm-project-mlir.git"
tags = ["rocm"]
maintainers("srekolam")
-
- version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60")
- version("5.3.3", sha256="e9aa407df775d00fdb9404689f69ac755575188f8b25c6bd0fa9599928c5c57f")
- version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d")
- version("5.2.3", sha256="29e1c352d203622fa083432d5d368caccb53ba141119fbb7e8d5247d99854625")
- version("5.2.1", sha256="9e305e05474076d84c78b7a796bca20b64c70ee3e2caa066c625216c5ee21d95")
- version("5.2.0", sha256="546121f203e7787d3501fbaf6673bdbeefbb39e0446b02c480454338362a1f01")
- version("5.1.3", sha256="936f92707ffe9a1973728503db6365bb7f14e5aeccfaef9f0924e54d25080c69")
- version("5.1.0", sha256="56dab11877295784cbb754c10bf2bd6535a3dfea31ec0b97ffe77b94115109dc")
+ with default_args(deprecated=True):
+ version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60")
+ version("5.3.3", sha256="e9aa407df775d00fdb9404689f69ac755575188f8b25c6bd0fa9599928c5c57f")
+ version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d")
variant(
"build_type",
@@ -51,7 +46,7 @@ class Mlirmiopen(CMakePackage):
depends_on("half")
depends_on("pkgconfig", type="build")
- for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0"]:
+ for ver in ["5.3.0", "5.3.3", "5.4.0"]:
depends_on("hip@" + ver, when="@" + ver)
depends_on("llvm-amdgpu@" + ver, when="@" + ver)
depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
diff --git a/var/spack/repos/builtin/packages/mlocate/package.py b/var/spack/repos/builtin/packages/mlocate/package.py
index b520e3b87e..0c9d6cca64 100644
--- a/var/spack/repos/builtin/packages/mlocate/package.py
+++ b/var/spack/repos/builtin/packages/mlocate/package.py
@@ -20,3 +20,5 @@ class Mlocate(AutotoolsPackage):
version("0.26", sha256="3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e")
version("0.25", sha256="ab95c111f9dba35b5690896180dd0a7639dbf07d70b862fcb0731264d9273951")
version("0.24", sha256="5787bee846735e21ff57df9e345d5db73d684d2cea9efc0f387462ccfbc6796f")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/mlpack/package.py b/var/spack/repos/builtin/packages/mlpack/package.py
index d84fdc3bc1..16b133680a 100644
--- a/var/spack/repos/builtin/packages/mlpack/package.py
+++ b/var/spack/repos/builtin/packages/mlpack/package.py
@@ -18,12 +18,18 @@ class Mlpack(CMakePackage):
maintainers("wdconinc")
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("4.5.0", sha256="aab70aee10c134ef3fe568843fe4b3bb5e8901af30ea666f57462ad950682317")
+ version("4.4.0", sha256="61c604026d05af26c244b0e47024698bbf150dfcc9d77b64057941d7d64d6cf6")
+ version("4.3.0", sha256="08cd54f711fde66fc3b6c9db89dc26776f9abf1a6256c77cfa3556e2a56f1a3d")
+ version("4.2.1", sha256="2d2b8d61dc2e3179e0b6fefd5c217c57aa168c4d0b9c6868ddb94f6395a80dd5")
version("4.2.0", sha256="f780df984a71029e62eeecdd145fb95deb71b133cefc7840de0ec706d116dd60")
version("4.1.0", sha256="e0c760baf15fd0af5601010b7cbc536e469115e9dd45f96712caa3b651b1852a")
version("4.0.1", sha256="4c746936ed9da9f16744240ed7b9f2815d3abb90c904071a1d1a628a9bbfb3a5")
+ depends_on("cxx", type="build") # generated
+
# TODO: Go bindings are not supported due to the absence of gonum in spack
# variant("go", default=False, description="Build Go bindings")
variant("julia", default=False, description="Build Julia bindings")
@@ -34,9 +40,14 @@ class Mlpack(CMakePackage):
# CMakeLists.txt
depends_on("cmake@3.6:", type="build")
depends_on("armadillo@9.800:")
+ depends_on("armadillo@10.8:", when="@4.5:")
depends_on("ensmallen@2.10.0:")
depends_on("cereal@1.1.2:")
+ # Compiler conflicts
+ conflicts("%gcc@:4", when="@4.0:", msg="mlpack 4.0+ requires at least gcc-5 with C++14")
+ conflicts("%gcc@:7", when="@4.4:", msg="mlpack 4.4+ requires at least gcc-8 with C++17")
+
# TODO: Go bindings are not supported due to the absence of gonum in spack
# with when("+go"):
# # ref: src/mlpack/bindings/go/CMakeLists.txt
@@ -49,10 +60,13 @@ class Mlpack(CMakePackage):
# ref: src/mlpack/bindings/python/CMakeLists.txt
depends_on("py-cython@0.24:")
depends_on("py-numpy")
+ depends_on("py-numpy@:1", when="@:4.4.0")
depends_on("py-pandas@0.15.0:")
# ref: src/mlpack/bindings/python/PythonInstall.cmake
depends_on("py-pip")
depends_on("py-wheel")
+ # ref: src/mlpack/bindings/python/setup.py.in
+ depends_on("py-setuptools", type="build")
with when("+r"):
# ref: src/mlpack/bindings/R/CMakeLists.txt
depends_on("r@4.0:")
@@ -64,8 +78,8 @@ class Mlpack(CMakePackage):
depends_on("r-pkgbuild")
patch(
- "https://github.com/mlpack/mlpack/pull/3502/commits/183396e51a6771d5d2b43f22b0d2a9a91785e533.patch?full_index=1",
- sha256="eaa1791ca874201cca5fb661f44e0038f9996b2d02dac6c71d42935eac56a2b4",
+ "https://github.com/mlpack/mlpack/commit/183396e51a6771d5d2b43f22b0d2a9a91785e533.patch?full_index=1",
+ sha256="bd726818a8932888f8d38548cab7f8dde15bacfbd8c58a36ce6a3be8d459578d",
when="@4:4.2.0",
)
diff --git a/var/spack/repos/builtin/packages/mlperf-deepcam/package.py b/var/spack/repos/builtin/packages/mlperf-deepcam/package.py
index 01ce1dbec6..5baed86ac3 100644
--- a/var/spack/repos/builtin/packages/mlperf-deepcam/package.py
+++ b/var/spack/repos/builtin/packages/mlperf-deepcam/package.py
@@ -22,7 +22,7 @@ class MlperfDeepcam(Package, CudaPackage):
depends_on("py-pycuda", type=("build", "run"))
depends_on("py-mpi4py", type=("build", "run"))
depends_on("py-torch+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch~cuda~cudnn~nccl", when="~cuda", type=("build", "run"))
+ depends_on("py-torch~cuda~nccl", when="~cuda", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-basemap", type=("build", "run"))
depends_on("py-pillow", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/mmg/package.py b/var/spack/repos/builtin/packages/mmg/package.py
index 10a8118106..9bd3d63cef 100644
--- a/var/spack/repos/builtin/packages/mmg/package.py
+++ b/var/spack/repos/builtin/packages/mmg/package.py
@@ -7,7 +7,6 @@ import os
import spack.build_systems.cmake
from spack.package import *
-from spack.util.executable import which
class Mmg(CMakePackage):
@@ -30,14 +29,23 @@ class Mmg(CMakePackage):
homepage = "https://www.mmgtools.org/"
url = "https://github.com/MmgTools/mmg/archive/v5.3.13.tar.gz"
+ maintainers("jcortial-safran")
+
license("LGPL-3.0-or-later")
+ version("5.8.0", sha256="686eaab84de79c072f3aedf26cd11ced44c84b435d51ce34e016ad203172922f")
+ version("5.7.3", sha256="b0a9c5ad6789df369a68f94295df5b324b6348020b73bcc395d32fdd44abe706")
+ version("5.7.2", sha256="4c396dd44aec69e0a171a04f857e28aad2e0bbfb733b48b6d81a2c6868e86840")
version("5.7.1", sha256="27c09477ebc080f54919f76f8533a343936677c81809fe37ce4e2d62fa97237b")
version("5.6.0", sha256="bbf9163d65bc6e0f81dd3acc5a51e4a8c47a7fdae849abc26277e01154fe2437")
version("5.5.2", sha256="58e3b866101e6f0686758e16bcf9fb5fb06c85184533fc5054ef1c8adfd4be73")
version("5.4.0", sha256="2b5cc505018859856766be901797ff5d4789f89377038a0211176a5571039750")
version("5.3.13", sha256="d9a5925b69b0433f942ab2c8e55659d9ccea758743354b43d54fdf88a6c3c191")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("scotch", default=True, description="Enable SCOTCH library support")
variant("doc", default=False, description="Build documentation")
@@ -54,6 +62,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
return [
self.define_from_variant("USE_SCOTCH", "scotch"),
self.define_from_variant("USE_VTK", "vtk"),
+ self.define("BUILD_SHARED_LIBS", shared_active),
self.define("LIBMMG3D_SHARED", shared_active),
self.define("LIBMMG2D_SHARED", shared_active),
self.define("LIBMMGS_SHARED", shared_active),
diff --git a/var/spack/repos/builtin/packages/mmseqs2/package.py b/var/spack/repos/builtin/packages/mmseqs2/package.py
index 86d18d45c6..5855899a78 100644
--- a/var/spack/repos/builtin/packages/mmseqs2/package.py
+++ b/var/spack/repos/builtin/packages/mmseqs2/package.py
@@ -16,9 +16,13 @@ class Mmseqs2(CMakePackage):
license("GPL-3.0-only")
+ version("15-6f452", sha256="7115ac5a7e2a49229466806aaa760d00204bb08c870e3c231b00e525c77531dc")
version("14-7e284", sha256="a15fd59b121073fdcc8b259fc703e5ce4c671d2c56eb5c027749f4bd4c28dfe1")
version("13-45111", sha256="6444bb682ebf5ced54b2eda7a301fa3e933c2a28b7661f96ef5bdab1d53695a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=False, description="build with OpenMP support")
variant("mpi", default=False, description="build with MPI support")
@@ -29,7 +33,7 @@ class Mmseqs2(CMakePackage):
patch(
"https://github.com/soedinglab/MMseqs2/commit/3e43617.patch?full_index=1",
sha256="673737ac545260e7800ca191c6eee14feef3318d9cfa5005db32bd2ab3c006fe",
- when="%gcc@13:",
+ when="@:14 %gcc@13:",
level=1,
)
diff --git a/var/spack/repos/builtin/packages/mmv/package.py b/var/spack/repos/builtin/packages/mmv/package.py
index dc7a255017..991503504a 100644
--- a/var/spack/repos/builtin/packages/mmv/package.py
+++ b/var/spack/repos/builtin/packages/mmv/package.py
@@ -20,6 +20,8 @@ class Mmv(MakefilePackage):
version("1.01b", sha256="0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef")
+ depends_on("c", type="build") # generated
+
patch("better-diagnostics-for-directories-584850.diff")
patch("format-security.diff")
patch("man-page-examples.diff")
diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py
index a0ed8f8b1d..6ad76aba07 100644
--- a/var/spack/repos/builtin/packages/moab/package.py
+++ b/var/spack/repos/builtin/packages/moab/package.py
@@ -41,6 +41,10 @@ class Moab(AutotoolsPackage):
version("4.9.0", sha256="267a7c05da847e4ea856db2c649a5484fb7bdc132ab56721ca50ee69a7389f4d")
version("4.8.2", sha256="b105cff42930058dc14eabb9a25e979df7289b175732fe319d2494e83e09e968")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallelism support")
variant("hdf5", default=True, description="Enable the HDF5 (default I/O) format")
variant("netcdf", default=False, description="Enable the ExodusII reader/writer support")
diff --git a/var/spack/repos/builtin/packages/mochi-margo/package.py b/var/spack/repos/builtin/packages/mochi-margo/package.py
index fa09436558..57813c1b9e 100644
--- a/var/spack/repos/builtin/packages/mochi-margo/package.py
+++ b/var/spack/repos/builtin/packages/mochi-margo/package.py
@@ -17,6 +17,8 @@ class MochiMargo(AutotoolsPackage):
maintainers("carns", "mdorier", "fbudin69500")
version("main", branch="main")
+ version("0.17.0", sha256="5c456cdc2e3156f902e5068468ee6d061eb252dcfdfcb2b570726e9cf84fc2e8")
+ version("0.16.0", sha256="5fb7ea3633b5bcc735e605dba27187ea893958bf86b8928184028735a338c61b")
version("0.15.0", sha256="f962f02ddaae125eaf15bf89126ee47b4f852d366b14248d2d67a0be8f661224")
version("0.14.1", sha256="69229a9126b76aff7fd47e25c4a8f72804f101c5c603c4e4ef93f4fb7a1b6662")
version("0.14.0", sha256="ff0e3fa786630b63280606243c35f1ea3a25fa2ba6f08bf9065cab9fcc7fa1c7")
@@ -56,6 +58,8 @@ class MochiMargo(AutotoolsPackage):
version("0.4.3", sha256="61a634d6983bee2ffa06e1e2da4c541cb8f56ddd9dd9f8e04e8044fb38657475")
version("0.4.2", sha256="91085e28f50e373b9616e1ae5c3c8d40a19a7d3776259592d8f361766890bcaa")
+ depends_on("c", type="build") # generated
+
depends_on("json-c", when="@0.9:")
depends_on("autoconf@2.65:", type=("build"))
depends_on("m4", type=("build"))
diff --git a/var/spack/repos/builtin/packages/mochi-thallium/package.py b/var/spack/repos/builtin/packages/mochi-thallium/package.py
index 905292e150..7bdcfc7665 100644
--- a/var/spack/repos/builtin/packages/mochi-thallium/package.py
+++ b/var/spack/repos/builtin/packages/mochi-thallium/package.py
@@ -47,6 +47,8 @@ class MochiThallium(CMakePackage):
version("0.3.1", sha256="61403b1ba5f4d205408e6a7e04c785df6dea02f59fe9fa1742db05aa752cc8a0")
version("0.3", sha256="4f9f78e52c1725f6ea5f933d7548bde36729dd9eff08f58fe7fe40682bc5f748")
+ depends_on("cxx", type="build") # generated
+
variant(
"cereal",
default=True,
diff --git a/var/spack/repos/builtin/packages/model-traits/package.py b/var/spack/repos/builtin/packages/model-traits/package.py
index c49ab28bff..2215190dac 100644
--- a/var/spack/repos/builtin/packages/model-traits/package.py
+++ b/var/spack/repos/builtin/packages/model-traits/package.py
@@ -23,6 +23,8 @@ class ModelTraits(CMakePackage):
version("0.1.0", sha256="ff7c1c5be6977f1d3dc592e8b6c5bff5a8b7ea80d0f059d85c02300bdb8faf2c")
version("main", branch="main")
+ depends_on("cxx", type="build") # generated
+
variant("yaml", default=True, description="build the Yaml IO backend")
variant("simmetrix", default=False, description="build the Simmetrix backend")
variant("pumi", default=False, description="build the pumi examples")
diff --git a/var/spack/repos/builtin/packages/modeltest-ng/package.py b/var/spack/repos/builtin/packages/modeltest-ng/package.py
index 3dd44a1496..023fd759d0 100644
--- a/var/spack/repos/builtin/packages/modeltest-ng/package.py
+++ b/var/spack/repos/builtin/packages/modeltest-ng/package.py
@@ -20,6 +20,9 @@ class ModeltestNg(CMakePackage):
version("20220721", commit="1066356b984100897b8bd38ac771c5c950984c01", submodules=True)
version("0.1.7", commit="cc028888f1d4222aaa53b99c6b02cd934a279001", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI")
depends_on("glib")
diff --git a/var/spack/repos/builtin/packages/modern-wheel/package.py b/var/spack/repos/builtin/packages/modern-wheel/package.py
index 692b1e49ee..a6c4fae52b 100644
--- a/var/spack/repos/builtin/packages/modern-wheel/package.py
+++ b/var/spack/repos/builtin/packages/modern-wheel/package.py
@@ -23,6 +23,8 @@ class ModernWheel(CMakePackage):
version("1.1", sha256="d8ba4891257b96108e9b9406a556f8ced3b71ce85c3fcdca6bfd9cc37bf010a3")
version("1.0", sha256="b90a1e29af0b67dfa4c07f9c19b2d04fa78cd878b29a9c42bc766dabd6cb1b90")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
# Test implementation files cause some issues on darwin,
# needs to be investigated.
diff --git a/var/spack/repos/builtin/packages/mokutil/package.py b/var/spack/repos/builtin/packages/mokutil/package.py
index 8ca6f5cede..06048ee285 100644
--- a/var/spack/repos/builtin/packages/mokutil/package.py
+++ b/var/spack/repos/builtin/packages/mokutil/package.py
@@ -18,6 +18,8 @@ class Mokutil(AutotoolsPackage):
version("0.3.0", sha256="70ccbffbbba0427dfd6b57902d667bf73d6223296c897ce3441fc2221352a773")
version("0.2.0", sha256="a51ef146b8f2169c4e4a0d2f86cae5f4d66cc520989fc2f70a7a620f9587a20b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/mold/package.py b/var/spack/repos/builtin/packages/mold/package.py
index 82e22a8a44..00b02c8ae9 100644
--- a/var/spack/repos/builtin/packages/mold/package.py
+++ b/var/spack/repos/builtin/packages/mold/package.py
@@ -12,22 +12,38 @@ class Mold(CMakePackage):
homepage = "https://github.com/rui314/mold"
url = "https://github.com/rui314/mold/archive/refs/tags/v1.11.0.tar.gz"
- maintainers("jabcross")
+ maintainers("msimberg")
license("MIT")
+ version("2.34.1", sha256="a8cf638045b4a4b2697d0bcc77fd96eae93d54d57ad3021bf03b0333a727a59d")
+ version("2.34.0", sha256="6067f41f624c32cb0f4e959ae7fabee5dd71dd06771e2c069c2b3a6a8eca3c8c")
+ version("2.33.0", sha256="37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155")
+ version("2.32.1", sha256="f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825")
+ version("2.32.0", sha256="4b7e4146ea0f52be9adae8b417399f3676a041e65b55e3f25f088120d30a320b")
+ version("2.31.0", sha256="3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5")
+ version("2.30.0", sha256="6e5178ccafe828fdb4ba0dd841d083ff6004d3cb41e56485143eb64c716345fd")
+ version("2.4.1", sha256="c9853d007d6a1b4f3e36b7314346751f4cc91bc43c76e30db51709b53b44dd68")
+ version("2.4.0", sha256="be65f3d785d32ece7b3204ecaa57810847fdd25c232cf704cbfff2dafb1ac107")
+ version("2.3.0", sha256="6cfc1af0214f993be1b0ae4a2f0278d32b7fc48155c15b2d03758f6d81e7250b")
+ version("2.2.0", sha256="78ddddaaa004e50f8d92a13d8e792a46a1b37745fab48d39ad16aeb5a776e7c6")
version("2.1.0", sha256="a32bec1282671b18ea4691855aed925ea2f348dfef89cb7689cd81273ea0c5df")
version("2.0.0", sha256="2ae8a22db09cbff626df74c945079fa29c1e5f60bbe02502dcf69191cf43527b")
version("1.11.0", sha256="99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f")
version("1.7.1", sha256="fa2558664db79a1e20f09162578632fa856b3cde966fbcb23084c352b827dfa9")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("blake3", when="@2.2:")
depends_on("mimalloc")
- depends_on("zlib-api")
- depends_on("openssl")
+ depends_on("openssl", when="@:2.1")
depends_on("tbb")
+ depends_on("zlib-api")
+ depends_on("zstd")
def cmake_args(self):
- args = []
- args.append(self.define("MOLD_USE_SYSTEM_MIMALLOC", True))
-
- return args
+ return [
+ self.define("MOLD_USE_SYSTEM_MIMALLOC", True),
+ self.define("MOLD_USE_SYSTEM_TBB", True),
+ ]
diff --git a/var/spack/repos/builtin/packages/molden/package.py b/var/spack/repos/builtin/packages/molden/package.py
index 98c8152334..25d7680f63 100644
--- a/var/spack/repos/builtin/packages/molden/package.py
+++ b/var/spack/repos/builtin/packages/molden/package.py
@@ -19,6 +19,9 @@ class Molden(MakefilePackage):
version("6.6", sha256="2a2a7a116a336b607b50e8135bc2cca764c50e4a6896013ee3c6f582b741ee72")
version("6.5", sha256="192631a0996b2bfa9f6b0769f83da38a9e4f83b1db9358982b23d6a594b4e8d4")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("libx11")
depends_on("libxmu")
depends_on("gl@3:")
diff --git a/var/spack/repos/builtin/packages/molgw/package.py b/var/spack/repos/builtin/packages/molgw/package.py
index 37262f9fc4..ed52c14dd3 100644
--- a/var/spack/repos/builtin/packages/molgw/package.py
+++ b/var/spack/repos/builtin/packages/molgw/package.py
@@ -18,16 +18,20 @@ class Molgw(MakefilePackage):
MOLGW employs standard Gaussian basis set.
"""
- homepage = "https://github.com/bruneval/molgw"
- url = "https://github.com/bruneval/molgw/archive/v3.2.tar.gz"
- git = "https://github.com/bruneval/molgw.git"
+ homepage = "https://github.com/molgw/molgw"
+ url = "https://github.com/molgw/molgw/archive/v3.3.tar.gz"
+ git = "https://github.com/molgw/molgw.git"
maintainers("bruneval")
license("GPL-3.0-only")
+ version("3.3", sha256="ff1c8eb736049e52608d4554a2d435ee9d15e47c4a9934d41712962748929e81")
version("3.2", sha256="a3f9a99db52d95ce03bc3636b5999e6d92b503ec2f4afca33d030480c3e10242")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=False, description="Build with OpenMP support")
variant("scalapack", default=False, description="Build with ScaLAPACK support")
@@ -40,15 +44,17 @@ class Molgw(MakefilePackage):
depends_on("mpi", when="+scalapack")
# enforce scalapack-capable mkl when asking +scalapack (and using intel-oneapi-mkl)
- depends_on("intel-oneapi-mkl+cluster", when="+scalapack ^intel-oneapi-mkl")
+ depends_on(
+ "intel-oneapi-mkl+cluster", when="+scalapack ^[virtuals=scalapack] intel-oneapi-mkl"
+ )
# enforce threaded mkl when asking +openmp (and using intel-oneapi-mkl)
- depends_on("intel-oneapi-mkl threads=openmp", when="+openmp ^intel-oneapi-mkl")
+ depends_on("intel-oneapi-mkl threads=openmp", when="+openmp ^[virtuals=blas] intel-oneapi-mkl")
# enforce threaded openblas when asking +openmp (and using openblas)
- depends_on("openblas threads=openmp", when="+openmp ^openblas")
+ depends_on("openblas threads=openmp", when="+openmp ^[virtuals=blas] openblas")
def _get_mkl_ld_flags(self, spec):
mklroot = str(getenv("MKLROOT"))
- command = [mklroot + "/bin/intel64/mkl_link_tool", "-libs", "--quiet"]
+ command = [mklroot + "/bin/mkl_link_tool", "-libs", "--quiet"]
if "+openmp" not in spec:
command.extend(["--parallel=no"])
@@ -80,7 +86,11 @@ class Molgw(MakefilePackage):
flags["PREFIX"] = prefix
# Set LAPACK and SCALAPACK
- if spec["lapack"].name not in INTEL_MATH_LIBRARIES:
+ if (
+ spec["scalapack"].name in INTEL_MATH_LIBRARIES
+ or spec["lapack"].name in INTEL_MATH_LIBRARIES
+ or spec["blas"].name in INTEL_MATH_LIBRARIES
+ ):
flags["LAPACK"] = self._get_mkl_ld_flags(spec)
else:
flags["LAPACK"] = spec["lapack"].libs.ld_flags + " " + spec["blas"].libs.ld_flags
@@ -91,7 +101,7 @@ class Molgw(MakefilePackage):
if "+scalapack" in spec:
flags["FC"] = "{0}".format(spec["mpi"].mpifc)
else:
- flags["FC"] = self.compiler.fc_names[0]
+ flags["FC"] = self.compiler.fc
# Set FCFLAGS
if self.compiler.flags.get("fflags") is not None:
@@ -107,7 +117,11 @@ class Molgw(MakefilePackage):
if "+scalapack" in spec:
flags["CPPFLAGS"] = flags.get("CPPFLAGS", "") + " -DHAVE_SCALAPACK -DHAVE_MPI "
- if spec["lapack"].name in INTEL_MATH_LIBRARIES:
+ if (
+ spec["lapack"].name in INTEL_MATH_LIBRARIES
+ or spec["scalapack"].name in INTEL_MATH_LIBRARIES
+ or spec["blas"].name in INTEL_MATH_LIBRARIES
+ ):
flags["CPPFLAGS"] = flags.get("CPPFLAGS", "") + " -DHAVE_MKL "
# Write configuration file
diff --git a/var/spack/repos/builtin/packages/mongo-c-driver/package.py b/var/spack/repos/builtin/packages/mongo-c-driver/package.py
index f53ee03166..add8e3c541 100644
--- a/var/spack/repos/builtin/packages/mongo-c-driver/package.py
+++ b/var/spack/repos/builtin/packages/mongo-c-driver/package.py
@@ -3,19 +3,21 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import autotools, cmake
from spack.package import *
-class MongoCDriver(Package):
+class MongoCDriver(AutotoolsPackage, CMakePackage):
"""libmongoc is a client library written in C for MongoDB."""
homepage = "https://github.com/mongodb/mongo-c-driver"
- url = "https://github.com/mongodb/mongo-c-driver/releases/download/1.7.0/mongo-c-driver-1.7.0.tar.gz"
+ url = "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.25.0.tar.gz"
maintainers("michaelkuhn")
license("Apache-2.0")
+ version("1.27.2", sha256="a53010803e2df097a2ea756be6ece34c8f52cda2c18e6ea21115097b75f5d4bf")
version("1.24.4", sha256="2f4a3e8943bfe3b8672c2053f88cf74acc8494dc98a45445f727901eee141544")
version("1.23.3", sha256="c8f951d4f965d455f37ae2e10b72914736fc0f25c4ffc14afc3cbadd1a574ef6")
version("1.21.0", sha256="840ff79480070f98870743fbb332e2c10dd021b6b9c952d08010efdda4d70ee4")
@@ -32,7 +34,14 @@ class MongoCDriver(Package):
version("1.7.0", sha256="48a0dbd44fef2124b51cf501f06be269b1a39452303b880b37473a6030c6e023")
version("1.6.3", sha256="82df03de117a3ccf563b9eccfd2e5365df8f215a36dea7446d439969033ced7b")
version("1.6.2", sha256="7ec27e9be4da2bf9e4b316374f8c29f816f0a0f019b984411777e9681e17f70e")
- version("1.6.1", sha256="1bdfb27944c6da8e56da209a5d56efac70df1f8c4ca4498b46f75bf3f9360898")
+ version(
+ "1.6.1",
+ sha256="1bdfb27944c6da8e56da209a5d56efac70df1f8c4ca4498b46f75bf3f9360898",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("ssl", default=True, description="Enable SSL support.")
variant("snappy", default=True, description="Enable Snappy support.")
@@ -45,16 +54,32 @@ class MongoCDriver(Package):
when="@1.8.1",
)
- depends_on("cmake@3.1:", type="build", when="@1.10.0:")
+ with when("build_system=cmake"):
+ depends_on("cmake@3.1:", type="build")
+
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build", when="@1.8.1")
+ depends_on("automake", type="build", when="@1.8.1")
+ depends_on("libtool", type="build", when="@1.8.1")
- depends_on("autoconf", type="build", when="@1.8.1")
- depends_on("automake", type="build", when="@1.8.1")
- depends_on("libtool", type="build", when="@1.8.1")
- depends_on("m4", type="build", when="@1.8.1")
+ build_system(
+ conditional("cmake", when="@1.10:"),
+ conditional("autotools", when="@:1.9"),
+ default="cmake",
+ )
+
+ def url_for_version(self, version):
+ if version >= Version("1.25.0"):
+ return f"https://github.com/mongodb/mongo-c-driver/archive/refs/tags/{version}.tar.gz"
+ if version >= Version("1.10.0"):
+ return f"https://github.com/mongodb/mongo-c-driver/releases/download/{version}/mongo-c-driver-{version}.tar.gz"
+ else:
+ return f"https://github.com/mongodb/libbson/releases/download/{version}/libbson-{version}.tar.gz"
depends_on("pkgconfig", type="build")
# When updating mongo-c-driver, libbson has to be kept in sync.
+ depends_on("libbson@1.27", when="@1.27")
depends_on("libbson@1.24", when="@1.24")
depends_on("libbson@1.23", when="@1.23")
depends_on("libbson@1.21", when="@1.21")
@@ -70,56 +95,42 @@ class MongoCDriver(Package):
depends_on("zlib-api", when="+zlib")
depends_on("zstd", when="+zstd")
- def cmake_args(self):
- spec = self.spec
-
- args = ["-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF"]
-
- if spec.satisfies("@1.24:"):
- args.append("-DUSE_SYSTEM_LIBBSON=ON")
- else:
- args.append("-DENABLE_BSON=SYSTEM")
+ @property
+ def force_autoreconf(self):
+ # Run autoreconf due to build system patch
+ return self.spec.satisfies("@1.8.1")
- if "+ssl" in spec:
- args.append("-DENABLE_SSL=OPENSSL")
- else:
- args.append("-DENABLE_SSL=OFF")
- if "+snappy" in spec:
- args.append("-DENABLE_SNAPPY=ON")
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ args = [
+ self.define("ENABLE_AUTOMATIC_INIT_AND_CLEANUP", False),
+ self.define("ENABLE_MONGOC", True),
+ self.define("MONGO_USE_CCACHE", False),
+ self.define("MONGO_USE_LLD", False),
+ self.define_from_variant("ENABLE_SNAPPY", "snappy"),
+ self.define_from_variant("ENABLE_ZSTD", "zstd"),
+ ]
+
+ if self.spec.satisfies("@1.24:"):
+ args.append(self.define("USE_SYSTEM_LIBBSON", True))
else:
- args.append("-DENABLE_SNAPPY=OFF")
+ args.append(self.define("ENABLE_BSON", "SYSTEM"))
- if "+zlib" in spec:
- args.append("-DENABLE_ZLIB=SYSTEM")
+ if self.spec.satisfies("+ssl"):
+ args.append(self.define("ENABLE_SSL", "OPENSSL"))
else:
- args.append("-DENABLE_ZLIB=OFF")
+ args.append(self.define("ENABLE_SSL", False))
- if "+zstd" in spec:
- args.append("-DENABLE_ZSTD=ON")
+ if self.spec.satisfies("+zlib"):
+ args.append(self.define("ENABLE_ZLIB", "SYSTEM"))
else:
- args.append("-DENABLE_ZSTD=OFF")
+ args.append(self.define("ENABLE_ZLIB", False))
return args
- def install(self, spec, prefix):
- with working_dir("spack-build", create=True):
- # We cannot simply do
- # cmake('..', *std_cmake_args, *self.cmake_args())
- # because that is not Python 2 compatible. Instead, collect
- # arguments into a temporary buffer first.
- args = []
- args.extend(std_cmake_args)
- args.extend(self.cmake_args())
- cmake("..", *args)
- make()
- make("install")
-
- @property
- def force_autoreconf(self):
- # Run autoreconf due to build system patch
- return self.spec.satisfies("@1.8.1")
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
spec = self.spec
@@ -143,13 +154,3 @@ class MongoCDriver(Package):
args.append("--with-zlib=system")
return args
-
- @when("@:1.9")
- def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix), *self.configure_args())
- make()
- if self.run_tests:
- make("check")
- make("install")
- if self.run_tests:
- make("installcheck")
diff --git a/var/spack/repos/builtin/packages/mongo-cxx-driver/package.py b/var/spack/repos/builtin/packages/mongo-cxx-driver/package.py
index b42b1827d7..06a7e8444e 100644
--- a/var/spack/repos/builtin/packages/mongo-cxx-driver/package.py
+++ b/var/spack/repos/builtin/packages/mongo-cxx-driver/package.py
@@ -16,6 +16,7 @@ class MongoCxxDriver(CMakePackage):
license("Apache-2.0")
+ version("3.10.1", sha256="0297d9d1a513f09438cc05254b14baa49edd1fa64a6ce5d7a80a1eb7677cf2be")
version("3.7.0", sha256="fb2da11178db728f63147fe4b0c7509eb49b1b02c5cb55f9bee5f927e451a0c7")
version("3.6.7", sha256="2c58005d4fe46f1973352fba821f7bb37e818cefc922377ce979a9fd1bff38ac")
version("3.6.6", sha256="d5906b9e308a8a353a2ef92b699c9b27ae28ec6b34fdda94e15d2981b27e64ca")
@@ -36,10 +37,12 @@ class MongoCxxDriver(CMakePackage):
version("3.2.1", sha256="d5e62797cbc48c6e5e18bc0a66c14556e78871d05db4bccc295074af51b8421e")
version("3.2.0", sha256="e26edd44cf20bd6be91907403b6d63a065ce95df4c61565770147a46716aad8c")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("mongo-c-driver@1.9.2:")
+
def url_for_version(self, version):
git_archive = self.git + "/archive/refs/tags/r{version}.tar.gz"
release_url = self.git + "/releases/download/r{version}/mongo-cxx-driver-r{version}.tar.gz"
- template_url = release_url if version >= Version("3.6.0") else git_archive
+ template_url = release_url if self.spec.satisfies("@3.6.0:") else git_archive
return template_url.format(version=version)
-
- depends_on("mongo-c-driver@1.9.2:")
diff --git a/var/spack/repos/builtin/packages/mongodb/package.py b/var/spack/repos/builtin/packages/mongodb/package.py
index 3c65647e84..408db7dabe 100644
--- a/var/spack/repos/builtin/packages/mongodb/package.py
+++ b/var/spack/repos/builtin/packages/mongodb/package.py
@@ -21,6 +21,9 @@ class Mongodb(SConsPackage):
version("6.2", git="https://github.com/mongodb/mongo.git", branch="v6.2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
requires(
"%gcc", "%clang", policy="one_of", msg="<myNicePackage> builds only with GCC or Clang"
)
diff --git a/var/spack/repos/builtin/packages/mono/package.py b/var/spack/repos/builtin/packages/mono/package.py
index 509790d898..30faee839d 100644
--- a/var/spack/repos/builtin/packages/mono/package.py
+++ b/var/spack/repos/builtin/packages/mono/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.util.environment import is_system_path
class Mono(AutotoolsPackage):
@@ -67,6 +66,10 @@ class Mono(AutotoolsPackage):
version("5.0.1.1", sha256="48d6ae71d593cd01bf0f499de569359d45856cda325575e1bacb5fabaa7e9718")
version("4.8.0.524", sha256="ca02614cfc9fe65e310631cd611d7b07d1ff205ce193006d4be0f9919c26bdcf")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def patch(self):
if "+patch-folder-path" in self.spec:
before = 'return "/usr/share";'
@@ -77,8 +80,8 @@ class Mono(AutotoolsPackage):
def configure_args(self):
args = []
- if self.spec["iconv"].name == "libc":
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(self.spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={p}".format(p=self.spec["iconv"].prefix))
return args
diff --git a/var/spack/repos/builtin/packages/montage/package.py b/var/spack/repos/builtin/packages/montage/package.py
index c50de9265a..47873700c3 100644
--- a/var/spack/repos/builtin/packages/montage/package.py
+++ b/var/spack/repos/builtin/packages/montage/package.py
@@ -18,6 +18,10 @@ class Montage(MakefilePackage):
version("6.0", sha256="1f540a7389d30fcf9f8cd9897617cc68b19350fbcde97c4d1cdc5634de1992c6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("freetype")
depends_on("bzip2")
depends_on("libnsl")
diff --git a/var/spack/repos/builtin/packages/moosefs/package.py b/var/spack/repos/builtin/packages/moosefs/package.py
index 60a9825298..c0fbe28222 100644
--- a/var/spack/repos/builtin/packages/moosefs/package.py
+++ b/var/spack/repos/builtin/packages/moosefs/package.py
@@ -25,6 +25,8 @@ class Moosefs(AutotoolsPackage):
version("3.0.104", sha256="b3209ecd8366038ba898c4642dd6fdf2fa5d50a37345f01ed209e078700db5bb")
version("3.0.103", sha256="c5f1f6f78c2b7d8d6563000deed704ead3deac77279cb13f9f16d7ee56ee7ff7")
+ depends_on("c", type="build") # generated
+
def configure_args(self):
args = ["--with-systemdsystemunitdir=" + self.spec["moosefs"].prefix.lib.systemd.system]
return args
diff --git a/var/spack/repos/builtin/packages/moreutils/package.py b/var/spack/repos/builtin/packages/moreutils/package.py
index 2495dc7405..c660882271 100644
--- a/var/spack/repos/builtin/packages/moreutils/package.py
+++ b/var/spack/repos/builtin/packages/moreutils/package.py
@@ -21,6 +21,8 @@ class Moreutils(MakefilePackage):
version("0.65", sha256="ba0cfaa1ff6ead2b15c62a67292de66a366f9b815a09697b54677f7e15f5a2b2")
version("0.63", sha256="01f0b331e07e62c70d58c2dabbb68f5c4ddae4ee6f2d8f070fd1e316108af72c")
+ depends_on("c", type="build") # generated
+
depends_on("perl", type="build")
depends_on("docbook-xsl", type="build")
depends_on("libxml2", type="build")
diff --git a/var/spack/repos/builtin/packages/mosesdecoder/package.py b/var/spack/repos/builtin/packages/mosesdecoder/package.py
index a797598658..2a87ab3bc6 100644
--- a/var/spack/repos/builtin/packages/mosesdecoder/package.py
+++ b/var/spack/repos/builtin/packages/mosesdecoder/package.py
@@ -17,6 +17,10 @@ class Mosesdecoder(Package):
version("4.0", sha256="357376cdbb225a17cdf17195625d0fa7e10d722807e9e0b8a633ffbd7eec9b8f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("git")
depends_on("subversion")
depends_on("cmake")
diff --git a/var/spack/repos/builtin/packages/mosquitto/package.py b/var/spack/repos/builtin/packages/mosquitto/package.py
index 46399d397f..4cc040287c 100644
--- a/var/spack/repos/builtin/packages/mosquitto/package.py
+++ b/var/spack/repos/builtin/packages/mosquitto/package.py
@@ -16,12 +16,16 @@ class Mosquitto(CMakePackage):
license("EPL-1.0 OR EPL-2.0")
+ version("2.0.18", sha256="d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a")
version("2.0.14", sha256="d0dde8fdb12caf6e2426b4f28081919a2fce3448773bdb8af0d3cd5fe5776925")
version("1.6.15", sha256="5ff2271512f745bf1a451072cd3768a5daed71e90c5179fae12b049d6c02aa0f")
version("1.5.11", sha256="4a3b8a8f5505d27a7a966dd68bfd76f1e69feb51796d1b46b7271d1bb5a1a299")
version("1.4.15", sha256="7d3b3e245a3b4ec94b05678c8199c806359737949f4cfe0bf936184f6ca89a83")
version("1.3.5", sha256="16eb3dbef183827665feee9288362c7352cd016ba04ca0402a0ccf857d1c2ab2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("tls", default=True, description="Build with TLS support")
variant("cjson", default=True, description="Build with cJSON support", when="@2.0.0:")
variant("static", default=False, description="Build with static libraries", when="@1.5.0:")
diff --git a/var/spack/repos/builtin/packages/mothur/package.py b/var/spack/repos/builtin/packages/mothur/package.py
index 8fc043cf49..f661642c98 100644
--- a/var/spack/repos/builtin/packages/mothur/package.py
+++ b/var/spack/repos/builtin/packages/mothur/package.py
@@ -22,6 +22,8 @@ class Mothur(MakefilePackage):
version("1.42.1", sha256="6b61591dda289ac2d8361f9c1547ffbeeba3b9fbdff877dd286bad850bbd5539")
version("1.40.5", sha256="a0fbdfa68b966d7adc4560e3787506a0dad8b47b4b996c2663cd6c0b416d101a")
version("1.39.5", sha256="9f1cd691e9631a2ab7647b19eb59cd21ea643f29b22cde73d7f343372dfee342")
+
+ depends_on("cxx", type="build") # generated
maintainers("snehring")
variant(
diff --git a/var/spack/repos/builtin/packages/motif/add_wmluiltok_option_main.patch b/var/spack/repos/builtin/packages/motif/add_wmluiltok_option_main.patch
new file mode 100644
index 0000000000..7aa2d8e122
--- /dev/null
+++ b/var/spack/repos/builtin/packages/motif/add_wmluiltok_option_main.patch
@@ -0,0 +1,8 @@
+diff -Naur motif-2.3.8/tools/wml/wmluiltok.l motif-2.3.8_patched/tools/wml/wmluiltok.l
+--- motif-2.3.8/tools/wml/wmluiltok.l 2024-01-18 17:19:43.997764906 -0600
++++ motif-2.3.8_patched/tools/wml/wmluiltok.l 2024-01-18 17:19:13.998702374 -0600
+@@ -1,3 +1,4 @@
++%option main
+ %{
+ /*
+ * Motif
diff --git a/var/spack/repos/builtin/packages/motif/package.py b/var/spack/repos/builtin/packages/motif/package.py
index 305803a043..8d2b39e861 100644
--- a/var/spack/repos/builtin/packages/motif/package.py
+++ b/var/spack/repos/builtin/packages/motif/package.py
@@ -21,6 +21,9 @@ class Motif(AutotoolsPackage):
version("2.3.8", sha256="859b723666eeac7df018209d66045c9853b50b4218cecadb794e2359619ebce7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("flex")
depends_on("libx11")
depends_on("libxt")
@@ -39,6 +42,8 @@ class Motif(AutotoolsPackage):
depends_on("pkgconfig", type="build")
patch("add_xbitmaps_dependency.patch")
+ # ensure tools/wml/wmluiltok.c has a main function
+ patch("add_wmluiltok_option_main.patch")
def patch(self):
# fix linking the simple_app demo program
diff --git a/var/spack/repos/builtin/packages/motioncor2/package.py b/var/spack/repos/builtin/packages/motioncor2/package.py
index 5c95cb0872..80d99c37d5 100644
--- a/var/spack/repos/builtin/packages/motioncor2/package.py
+++ b/var/spack/repos/builtin/packages/motioncor2/package.py
@@ -20,6 +20,7 @@ class Motioncor2(Package):
homepage = "http://msg.ucsf.edu/em/software"
manual_download = True
+ version("1.6.4", sha256="28bb3e6477abf34fe41a78bcb9da9d77d08e2e89ecd41240fab085a308e6c498")
version("1.4.7", sha256="8c33969b10916835b55f14f3c370f67ebe5c4b2a9df9ec487c5251710f038e6b")
# None of the below are available for download
@@ -41,18 +42,26 @@ class Motioncor2(Package):
deprecated=True,
)
- def url_for_version(self, version):
- return "file://{0}/MotionCor2_{1}.zip".format(os.getcwd(), version)
+ depends_on("patchelf", type="build")
- depends_on("cuda@10.2,11.1:11.5", type="run")
+ depends_on("cuda@10.2,11.1:11.8,12.1", type="run")
depends_on("libtiff", type="run")
+ def url_for_version(self, version):
+ return "file://{0}/MotionCor2_{1}.zip".format(os.getcwd(), version)
+
def install(self, spec, prefix):
cuda_version = spec["cuda"].version.up_to(2).joined
mkdirp(prefix.bin)
- with working_dir("MotionCor2_{0}".format(spec.version)):
- install(
- "MotionCor2_{0}_Cuda{1}_*".format(spec.version, cuda_version),
- join_path(prefix.bin, "MotionCor2"),
- )
+ install(
+ "MotionCor2_{0}_Cuda{1}_*".format(spec.version, cuda_version),
+ join_path(prefix.bin, "MotionCor2"),
+ )
+
+ @run_after("install")
+ def ensure_rpaths(self):
+ patchelf = which("patchelf")
+ patchelf(
+ "--set-rpath", self.spec["cuda"].prefix.lib64, join_path(self.prefix.bin, "MotionCor2")
+ )
diff --git a/var/spack/repos/builtin/packages/mount-point-attributes/package.py b/var/spack/repos/builtin/packages/mount-point-attributes/package.py
index 0c50cd9b72..a1a8688907 100644
--- a/var/spack/repos/builtin/packages/mount-point-attributes/package.py
+++ b/var/spack/repos/builtin/packages/mount-point-attributes/package.py
@@ -23,6 +23,8 @@ class MountPointAttributes(AutotoolsPackage):
)
version("1.1", sha256="bff84c75c47b74ea09b6cff949dd699b185ddba0463cb1ff39ab138003c96e02")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("libtool", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/mozjpeg/package.py b/var/spack/repos/builtin/packages/mozjpeg/package.py
index 8a7e46f759..aa802f5e50 100644
--- a/var/spack/repos/builtin/packages/mozjpeg/package.py
+++ b/var/spack/repos/builtin/packages/mozjpeg/package.py
@@ -20,6 +20,9 @@ class Mozjpeg(CMakePackage):
version("4.1.1", sha256="66b1b8d6b55d263f35f27f55acaaa3234df2a401232de99b6d099e2bb0a9d196")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
provides("jpeg")
variant("shared", default=True, description="Build shared libs")
diff --git a/var/spack/repos/builtin/packages/mpark-variant/package.py b/var/spack/repos/builtin/packages/mpark-variant/package.py
index f1e2148fef..c7c9652d59 100644
--- a/var/spack/repos/builtin/packages/mpark-variant/package.py
+++ b/var/spack/repos/builtin/packages/mpark-variant/package.py
@@ -21,6 +21,8 @@ class MparkVariant(CMakePackage):
version("1.4.0", sha256="8f6b28ab3640b5d76d5b6664dda7257a4405ce59179220431b8fd196c79b2ecb")
version("1.3.0", sha256="d0f7e41f818fcc839797a8017e76b8b66b323651c304cff641a83a56ae9943c6")
+ depends_on("cxx", type="build") # generated
+
# Ref.: https://github.com/mpark/variant/pull/73
patch("nvcc.patch", when="@:1.4.0")
# Ref.: https://github.com/mpark/variant/issues/60
diff --git a/var/spack/repos/builtin/packages/mpas-model/package.py b/var/spack/repos/builtin/packages/mpas-model/package.py
index 2e4a0e6a26..39a6dfa741 100644
--- a/var/spack/repos/builtin/packages/mpas-model/package.py
+++ b/var/spack/repos/builtin/packages/mpas-model/package.py
@@ -5,7 +5,6 @@
import os
from spack.package import *
-from spack.util.executable import Executable
class MpasModel(MakefilePackage):
@@ -25,15 +24,16 @@ class MpasModel(MakefilePackage):
version("6.3", sha256="e7f1d9ebfeb6ada37d42a286aaedb2e69335cbc857049dc5c5544bb51e7a8db8")
version("6.2", sha256="2a81825a62a468bf5c56ef9d9677aa2eb88acf78d4f996cb49a7db98b94a6b16")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# These targets are defined in the Makefile. Some can be auto-detected by the
# compiler name, others need to be explicitly set.
make_target = [
"xlf",
"ftn",
"titan-cray",
- "pgi",
- "pgi-nersc",
- "pgi-llnl",
"ifort",
"ifort-scorep",
"ifort-gcc",
@@ -65,6 +65,11 @@ class MpasModel(MakefilePackage):
depends_on("mpi")
depends_on("parallelio")
+ conflicts(
+ "%oneapi@:2024.1",
+ msg="ifx internal compiler error triggered by maps-model fixed in oneapi@2024.2",
+ )
+
patch("makefile.patch", when="@7.0")
parallel = False
@@ -104,19 +109,13 @@ class MpasModel(MakefilePackage):
fflags = [self.compiler.openmp_flag]
cppflags = ["-D_MPI"]
if satisfies("%gcc"):
- fflags.extend(
- [
- "-ffree-line-length-none",
- "-fconvert=big-endian",
- "-ffree-form",
- "-fdefault-real-8",
- "-fdefault-double-8",
- ]
- )
+ fflags.extend(["-ffree-line-length-none", "-fconvert=big-endian", "-ffree-form"])
+ if satisfies("precision=double"):
+ fflags.extend(["-fdefault-real-8", "-fdefault-double-8"])
cppflags.append("-DUNDERSCORE")
elif satisfies("%fj"):
fflags.extend(["-Free", "-Fwide", "-CcdRR8"])
- elif satisfies("%intel"):
+ elif satisfies("%intel") or satisfies("%oneapi"):
fflags.extend(["-convert big_endian", "-FR"])
if satisfies("precision=double"):
fflags.extend(["-r8"])
diff --git a/var/spack/repos/builtin/packages/mpb/package.py b/var/spack/repos/builtin/packages/mpb/package.py
index c117130c3a..5898c67895 100644
--- a/var/spack/repos/builtin/packages/mpb/package.py
+++ b/var/spack/repos/builtin/packages/mpb/package.py
@@ -17,6 +17,8 @@ class Mpb(AutotoolsPackage):
version("1.11.1", sha256="7311fc525214c1184cad3e0626b8540c0b53b3c31c28e61ce6ec2860088eca46")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py
index d5c795a058..7095dbe29f 100644
--- a/var/spack/repos/builtin/packages/mpc/package.py
+++ b/var/spack/repos/builtin/packages/mpc/package.py
@@ -11,7 +11,7 @@ class Mpc(AutotoolsPackage, GNUMirrorPackage):
with arbitrarily high precision and correct rounding of the
result."""
- homepage = "http://www.multiprecision.org"
+ homepage = "https://www.multiprecision.org"
gnu_mirror_path = "mpc/mpc-1.1.0.tar.gz"
list_url = "http://www.multiprecision.org/mpc/download.html"
@@ -23,6 +23,8 @@ class Mpc(AutotoolsPackage, GNUMirrorPackage):
version("1.0.3", sha256="617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3")
version("1.0.2", sha256="b561f54d8a479cee3bc891ee52735f18ff86712ba30f036f8b8537bae380c488")
+ depends_on("c", type="build") # generated
+
variant(
"libs",
default="shared,static",
diff --git a/var/spack/repos/builtin/packages/mpdecimal/package.py b/var/spack/repos/builtin/packages/mpdecimal/package.py
index 08a8bf372a..a08cb42d53 100644
--- a/var/spack/repos/builtin/packages/mpdecimal/package.py
+++ b/var/spack/repos/builtin/packages/mpdecimal/package.py
@@ -19,6 +19,9 @@ class Mpdecimal(AutotoolsPackage):
version("2.5.1", sha256="9f9cd4c041f99b5c49ffb7b59d9f12d95b683d88585608aa56a6307667b2b21f")
version("2.4.2", sha256="83c628b90f009470981cf084c5418329c88b19835d8af3691b930afccb7d79c7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmake", type="build")
@property
diff --git a/var/spack/repos/builtin/packages/mpe2/package.py b/var/spack/repos/builtin/packages/mpe2/package.py
index 85e001daa9..b5b9eca971 100644
--- a/var/spack/repos/builtin/packages/mpe2/package.py
+++ b/var/spack/repos/builtin/packages/mpe2/package.py
@@ -14,6 +14,9 @@ class Mpe2(AutotoolsPackage):
version("1.3.0", sha256="0faf32f9adab6fd882be30be913089ebf75272f8b5e4a012bb20c54abc21c0be")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("mpe2.patch")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py
index c44eb091ee..b20bb35a82 100644
--- a/var/spack/repos/builtin/packages/mpfr/package.py
+++ b/var/spack/repos/builtin/packages/mpfr/package.py
@@ -13,8 +13,11 @@ class Mpfr(AutotoolsPackage, GNUMirrorPackage):
homepage = "https://www.mpfr.org/"
gnu_mirror_path = "mpfr/mpfr-4.0.2.tar.bz2"
+ maintainers("cessenat")
+
license("LGPL-3.0-or-later")
+ version("4.2.1", sha256="b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0")
version("4.2.0", sha256="691db39178e36fc460c046591e4b0f2a52c8f2b3ee6d750cc2eab25f1eaa999d")
version("4.1.1", sha256="85fdf11614cc08e3545386d6b9c8c9035e3db1e506211a45f4e108117fe3c951")
version("4.1.0", sha256="feced2d430dd5a97805fa289fed3fc8ff2b094c02d05287fd6133e7f1f0ec926")
@@ -27,6 +30,8 @@ class Mpfr(AutotoolsPackage, GNUMirrorPackage):
version("3.1.3", sha256="f63bb459157cacd223caac545cb816bcdb5a0de28b809e7748b82e9eb89b0afd")
version("3.1.2", sha256="79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b")
+ depends_on("c", type="build") # generated
+
# mpir is a drop-in replacement for gmp
depends_on("gmp@4.1:") # 4.2.3 or higher is recommended
depends_on("gmp@5.0:", when="@4.0.0:") # https://www.mpfr.org/mpfr-4.0.0/
@@ -35,7 +40,7 @@ class Mpfr(AutotoolsPackage, GNUMirrorPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("autoconf-archive", when="@4.0.2:", type="build")
+ depends_on("autoconf-archive", when="@4.0.0:", type="build")
depends_on("texinfo", when="@4.1.0:", type="build")
variant(
diff --git a/var/spack/repos/builtin/packages/mpi-bash/package.py b/var/spack/repos/builtin/packages/mpi-bash/package.py
index f20c051a07..bd29bcf733 100644
--- a/var/spack/repos/builtin/packages/mpi-bash/package.py
+++ b/var/spack/repos/builtin/packages/mpi-bash/package.py
@@ -12,9 +12,12 @@ class MpiBash(AutotoolsPackage):
homepage = "https://github.com/lanl/MPI-Bash"
url = "https://github.com/lanl/MPI-Bash/releases/download/v1.2/mpibash-1.2.tar.gz"
+ version("1.4", sha256="1b7e55b15d55e37d596a39739a519dff0be8d711fa389c1e5d2e3f992a5eca57")
version("1.3", sha256="ab39dcc0eadce765abaf685e73d38f4351e3229fdb4302aee4b9e6e70d431d99")
version("1.2", sha256="5c2faaa74464111205dbae4799bd89c2425810ec3708d004237b42d620c8be57")
+ depends_on("c", type="build") # generated
+
depends_on("bash@4.4:")
# uses MPI_Exscan which is in MPI-1.2 and later
depends_on("mpi@1.2:")
@@ -23,7 +26,7 @@ class MpiBash(AutotoolsPackage):
def configure_args(self):
args = [
- "--with-bashdir={0}".format(self.spec["bash"].prefix.include.bash),
- "CC={0}".format(self.spec["mpi"].mpicc),
+ f"--with-bashdir={self.spec['bash'].prefix.include.bash}",
+ f"CC={self.spec['mpi'].mpicc}",
]
return args
diff --git a/var/spack/repos/builtin/packages/mpi-serial/package.py b/var/spack/repos/builtin/packages/mpi-serial/package.py
index 2d23ad8caa..583bb56a6e 100644
--- a/var/spack/repos/builtin/packages/mpi-serial/package.py
+++ b/var/spack/repos/builtin/packages/mpi-serial/package.py
@@ -20,6 +20,9 @@ class MpiSerial(AutotoolsPackage):
version("2.5.0", sha256="2faf459ea1f37020662067e7ab6c76b926501c4b94e8fdf77591c0040ba1f006")
version("2.3.0", sha256="cc55e6bf0ae5e1d93aafa31ba91bfc13e896642a511c3101695ea05eccf97988")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"fort-real-size",
values=int,
diff --git a/var/spack/repos/builtin/packages/mpi-test-suite/package.py b/var/spack/repos/builtin/packages/mpi-test-suite/package.py
index 9c0e858778..a07bbf86dc 100644
--- a/var/spack/repos/builtin/packages/mpi-test-suite/package.py
+++ b/var/spack/repos/builtin/packages/mpi-test-suite/package.py
@@ -28,6 +28,8 @@ class MpiTestSuite(AutotoolsPackage):
version("1.1.1", sha256="4cb7bdbdafa0855dab96d996f863b5d364c935e678c057ada3c8869c3666e926")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake@1.14:", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/mpibind/package.py b/var/spack/repos/builtin/packages/mpibind/package.py
index 34910ae201..945422c3a9 100644
--- a/var/spack/repos/builtin/packages/mpibind/package.py
+++ b/var/spack/repos/builtin/packages/mpibind/package.py
@@ -30,6 +30,9 @@ class Mpibind(AutotoolsPackage):
version("0.7.0", commit="3c437a97cd841b9c13abfbe1062a0285e1a29d3e", no_cache=True)
version("0.5.0", commit="8698f07412232e4dd4de4802b508374dc0de48c9", no_cache=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=False, description="Build w/support for NVIDIA GPUs.")
variant("rocm", default=False, description="Build w/support for AMD GPUs.")
variant("flux", default=False, description="Build the Flux plugin.")
diff --git a/var/spack/repos/builtin/packages/mpich/mpich33_slurm_hostlist.patch b/var/spack/repos/builtin/packages/mpich/mpich33_slurm_hostlist.patch
new file mode 100644
index 0000000000..8a79963721
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpich/mpich33_slurm_hostlist.patch
@@ -0,0 +1,22 @@
+From 28f617c8565ea862e140b9fa20ad309b3300f4f5 Mon Sep 17 00:00:00 2001
+From: Richard Berger <rberger@lanl.gov>
+Date: Mon, 22 Jan 2024 16:11:20 -0700
+Subject: [PATCH] hydra: slurm hostlist_t should be used as pointer
+
+---
+ src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+index f6639806c..cadbf4a87 100644
+--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
++++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+@@ -26,7 +26,7 @@ static struct HYD_node *global_node_list = NULL;
+ #if defined(HAVE_LIBSLURM)
+ static HYD_status list_to_nodes(char *str)
+ {
+- hostlist_t hostlist;
++ hostlist_t *hostlist;
+ char *host;
+ int k = 0;
+ HYD_status status = HYD_SUCCESS;
diff --git a/var/spack/repos/builtin/packages/mpich/mpich40_slurm_hostlist.patch b/var/spack/repos/builtin/packages/mpich/mpich40_slurm_hostlist.patch
new file mode 100644
index 0000000000..2de4935c6f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpich/mpich40_slurm_hostlist.patch
@@ -0,0 +1,22 @@
+From 15c0b2449136ffbdbdc6049a4a9553cf8c045e2c Mon Sep 17 00:00:00 2001
+From: Richard Berger <rberger@lanl.gov>
+Date: Mon, 22 Jan 2024 16:07:16 -0700
+Subject: [PATCH] hydra: slurm hostlist_t should be used as pointer
+
+---
+ src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+index 869d38b7a..953e8aa2d 100644
+--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
++++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+@@ -25,7 +25,7 @@ static struct HYD_node *global_node_list = NULL;
+ #if defined(HAVE_SLURM)
+ static HYD_status list_to_nodes(char *str)
+ {
+- hostlist_t hostlist;
++ hostlist_t *hostlist;
+ char *host;
+ int k = 0;
+ HYD_status status = HYD_SUCCESS;
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index be91593256..a1816d401a 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -7,6 +7,7 @@ import os
import re
import sys
+import spack.compilers
from spack.build_environment import dso_suffix
from spack.package import *
@@ -27,9 +28,13 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
keep_werror = "specific"
- license("Unlicense")
+ license("mpich2")
version("develop", submodules=True)
+ version("4.2.3", sha256="7a019180c51d1738ad9c5d8d452314de65e828ee240bcb2d1f80de9a65be88a8")
+ version("4.2.2", sha256="883f5bb3aeabf627cb8492ca02a03b191d09836bbe0f599d8508351179781d41")
+ version("4.2.1", sha256="23331b2299f287c3419727edc2df8922d7e7abbb9fd0ac74e03b9966f9ad42d7")
+ version("4.2.0", sha256="a64a66781b9e5312ad052d32689e23252f745b27ee8818ac2ac0c8209bc0b90e")
version("4.1.2", sha256="3492e98adab62b597ef0d292fb2459b6123bc80070a8aa0a30be6962075a12f0")
version("4.1.1", sha256="ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2")
version("4.1", sha256="8b1ec63bc44c7caa2afbb457bc5b3cd4a70dbe46baba700123d67c48dc5ab6a0")
@@ -53,6 +58,10 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
version("3.1", sha256="fcf96dbddb504a64d33833dc455be3dda1e71c7b3df411dfcf9df066d7c32c39")
version("3.0.4", sha256="cf638c85660300af48b6f776e5ecd35b5378d5905ec5d34c3da7a27da0acf0b3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build", when="+fortran")
+
variant("hwloc", default=True, description="Use external hwloc package")
variant("hydra", default=True, description="Build the hydra process manager")
variant("romio", default=True, description="Enable ROMIO MPI I/O implementation")
@@ -61,9 +70,9 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
variant("wrapperrpath", default=True, description="Enable wrapper rpath")
variant(
"pmi",
- default="pmi",
+ default="default",
description="""PMI interface.""",
- values=("off", "pmi", "pmi2", "pmix", "cray"),
+ values=("default", "pmi", "pmi2", "pmix", "cray"),
multi=False,
)
variant(
@@ -116,12 +125,19 @@ supported, and netmod is ignored if device is ch3:sock.""",
when="@3.4:",
multi=False,
)
- depends_on("yaksa", when="@4.0: device=ch4 datatype-engine=auto")
- depends_on("yaksa", when="@4.0: device=ch4 datatype-engine=yaksa")
- depends_on("yaksa+cuda", when="+cuda ^yaksa")
- depends_on("yaksa+rocm", when="+rocm ^yaksa")
+ for _yaksa_cond in (
+ "@4.0: device=ch4 datatype-engine=auto",
+ "@4.0: device=ch4 datatype-engine=yaksa",
+ ):
+ with when(_yaksa_cond):
+ depends_on("yaksa")
+ depends_on("yaksa+cuda", when="+cuda")
+ depends_on("yaksa+rocm", when="+rocm")
+
conflicts("datatype-engine=yaksa", when="device=ch3")
conflicts("datatype-engine=yaksa", when="device=ch3:sock")
+ conflicts("datatype-engine=dataloop", when="+cuda")
+ conflicts("datatype-engine=dataloop", when="+rocm")
variant(
"hcoll",
@@ -132,6 +148,9 @@ supported, and netmod is ignored if device is ch3:sock.""",
)
depends_on("hcoll", when="+hcoll")
+ variant("xpmem", default=False, when="@3.4:", description="Enable XPMEM support")
+ depends_on("xpmem", when="+xpmem")
+
# Todo: cuda can be a conditional variant, but it does not seem to work when
# overriding the variant from CudaPackage.
conflicts("+cuda", when="@:3.3")
@@ -185,6 +204,26 @@ supported, and netmod is ignored if device is ch3:sock.""",
when="@=3.3",
)
+ # Fix SLURM hostlist_t usage
+ # See https://github.com/pmodels/mpich/issues/6806
+ # and https://github.com/pmodels/mpich/pull/6820
+ patch(
+ "https://github.com/pmodels/mpich/commit/7a28682a805acfe84a4ea7b41cea079696407398.patch?full_index=1",
+ sha256="8cc80a8ffc3f1c907b1d8176129a0c1d01794a95adbed5b5357f50c13f6560e4",
+ when="@4.1:4.1.2 +slurm ^slurm@23-11-1-1:",
+ )
+ # backports of fix down to v3.3
+ patch(
+ "mpich40_slurm_hostlist.patch",
+ sha256="39aa1353305b7b03bc5c645c87d5299bd5d2ff676750898ba925f6cb9b716bdb",
+ when="@4.0 +slurm ^slurm@23-11-1-1:",
+ )
+ patch(
+ "mpich33_slurm_hostlist.patch",
+ sha256="d6ec26adcf2d08d0739be44ab65b928a7a88e9ff1375138a0593678eedd420ab",
+ when="@3.3:3.4 +slurm ^slurm@23-11-1-1:",
+ )
+
# Fix reduce operations for unsigned integers
# See https://github.com/pmodels/mpich/issues/6083
patch(
@@ -223,7 +262,6 @@ supported, and netmod is ignored if device is ch3:sock.""",
depends_on("hwloc@2.0.0:", when="@3.3: +hwloc")
depends_on("libfabric", when="netmod=ofi")
- depends_on("libfabric fabrics=gni", when="netmod=ofi pmi=cray")
# The ch3 ofi netmod results in crashes with libfabric 1.7
# See https://github.com/pmodels/mpich/issues/3665
depends_on("libfabric@:1.6", when="device=ch3 netmod=ofi")
@@ -360,12 +398,16 @@ supported, and netmod is ignored if device is ch3:sock.""",
if re.search(r"--with-thread-package=argobots", output):
variants.append("+argobots")
- if re.search(r"--with-pmi=no", output):
- variants.append("pmi=off")
+ if re.search(r"--with-pmi=default", output):
+ variants.append("pmi=default")
elif re.search(r"--with-pmi=simple", output):
variants.append("pmi=pmi")
elif re.search(r"--with-pmi=pmi2/simple", output):
variants.append("pmi=pmi2")
+ elif re.search(r"--with-pmi=pmi", output):
+ variants.append("pmi=pmi")
+ elif re.search(r"--with-pmi=pmi2", output):
+ variants.append("pmi=pmi2")
elif re.search(r"--with-pmix", output):
variants.append("pmi=pmix")
@@ -414,49 +456,28 @@ supported, and netmod is ignored if device is ch3:sock.""",
def setup_run_environment(self, env):
# Because MPI implementations provide compilers, they have to add to
# their run environments the code to make the compilers available.
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mpich"
- if self.spec.satisfies("platform=cray"):
- # This is intended to support external MPICH instances registered
- # by Spack on Cray machines prior to a879c87; users defining an
- # external MPICH entry for Cray should generally refer to the
- # "cray-mpich" package
- env.set("MPICC", spack_cc)
- env.set("MPICXX", spack_cxx)
- env.set("MPIF77", spack_fc)
- env.set("MPIF90", spack_fc)
- else:
- env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
- env.set("MPICXX", join_path(self.prefix.bin, "mpic++"))
- env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
- env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
+ env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
+ env.set("MPICXX", join_path(self.prefix.bin, "mpic++"))
+ env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
+ env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mpich"
- if self.spec.satisfies("platform=cray"):
- spec.mpicc = spack_cc
- spec.mpicxx = spack_cxx
- spec.mpifc = spack_fc
- spec.mpif77 = spack_f77
- else:
- spec.mpicc = join_path(self.prefix.bin, "mpicc")
- spec.mpicxx = join_path(self.prefix.bin, "mpic++")
+ spec.mpicc = join_path(self.prefix.bin, "mpicc")
+ spec.mpicxx = join_path(self.prefix.bin, "mpic++")
- if "+fortran" in spec:
- spec.mpifc = join_path(self.prefix.bin, "mpif90")
- spec.mpif77 = join_path(self.prefix.bin, "mpif77")
+ if "+fortran" in spec:
+ spec.mpifc = join_path(self.prefix.bin, "mpif90")
+ spec.mpif77 = join_path(self.prefix.bin, "mpif77")
spec.mpicxx_shared_libs = [
join_path(self.prefix.lib, "libmpicxx.{0}".format(dso_suffix)),
@@ -530,16 +551,32 @@ supported, and netmod is ignored if device is ch3:sock.""",
else:
config_args.append("--with-slurm=no")
- if "pmi=off" in spec:
- config_args.append("--with-pmi=no")
- elif "pmi=pmi" in spec:
- config_args.append("--with-pmi=simple")
- elif "pmi=pmi2" in spec:
- config_args.append("--with-pmi=pmi2/simple")
- elif "pmi=pmix" in spec:
- config_args.append("--with-pmix={0}".format(spec["pmix"].prefix))
- elif "pmi=cray" in spec:
- config_args.append("--with-pmi=cray")
+ # PMI options changed in 4.2.0
+ if spec.satisfies("@4.2:"):
+ # default (no option) is to build both PMIv1 and PMI2 client interfaces
+ if "pmi=pmi" in spec:
+ # make PMI1 the default client interface
+ config_args.append("--with-pmi=pmi")
+ elif "pmi=pmi2" in spec:
+ # make PMI2 the default client interface
+ config_args.append("--with-pmi=pmi2")
+ elif "pmi=pmix" in spec:
+ # use the PMIx client interface with an external PMIx library
+ config_args.append("--with-pmi=pmix")
+ config_args.append(f"--with-pmix={spec['pmix'].prefix}")
+ elif "pmi=cray" in spec:
+ # use PMI2 interface of the Cray PMI library
+ config_args.append("--with-pmi=pmi2")
+ config_args.append(f"--with-pmi2={spec['cray-pmi'].prefix}")
+ else:
+ if "pmi=pmi" in spec:
+ config_args.append("--with-pmi=simple")
+ elif "pmi=pmi2" in spec:
+ config_args.append("--with-pmi=pmi2/simple")
+ elif "pmi=pmix" in spec:
+ config_args.append(f"--with-pmix={spec['pmix'].prefix}")
+ elif "pmi=cray" in spec:
+ config_args.append("--with-pmi=cray")
if "+cuda" in spec:
config_args.append("--with-cuda={0}".format(spec["cuda"].prefix))
@@ -595,7 +632,6 @@ supported, and netmod is ignored if device is ch3:sock.""",
if "+vci" in spec:
config_args.append("--enable-thread-cs=per-vci")
- config_args.append("--with-ch4-max-vcis=default")
if "datatype-engine=yaksa" in spec:
config_args.append("--with-datatype-engine=yaksa")
@@ -607,13 +643,16 @@ supported, and netmod is ignored if device is ch3:sock.""",
if "+hcoll" in spec:
config_args.append("--with-hcoll=" + spec["hcoll"].prefix)
+ if "+xpmem" in spec:
+ config_args.append("--with-xpmem=" + spec["xpmem"].prefix)
+
return config_args
@run_after("install")
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(["examples", join_path("test", "mpi")])
+ cache_extra_test_sources(self, ["examples", join_path("test", "mpi")])
def mpi_launcher(self):
"""Determine the appropriate launcher."""
diff --git a/var/spack/repos/builtin/packages/mpidiff/package.py b/var/spack/repos/builtin/packages/mpidiff/package.py
new file mode 100644
index 0000000000..47ae0b8ee1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpidiff/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Mpidiff(CMakePackage):
+ """Library for comparing numerical differences between binaries."""
+
+ homepage = "https://github.com/LLNL/MPIDiff"
+ url = "https://github.com/LLNL/MPIDiff/archive/refs/tags/v0.2.0.tar.gz"
+
+ maintainers("adayton1")
+
+ license("BSD-3-Clause", checked_by="alecbcs")
+
+ version("0.2.0", sha256="726b59fe4af0bb0812fc34c456cb0d801e03313a8fdfb9dc63d23a9b316b6118")
+
+ variant("docs", default=False, description="Build and include documentation")
+ variant("examples", default=False, description="Build and include examples")
+ variant("tests", default=False, description="Build tests")
+
+ depends_on("cxx", type="build")
+
+ depends_on("blt", type="build")
+ depends_on("mpi")
+
+ def cmake_args(self):
+ spec = self.spec
+ return [
+ self.define("MPI_DIR", spec["mpi"].prefix),
+ self.define("BLT_SOURCE_DIR", spec["blt"].prefix),
+ self.define_from_variant("MPIDIFF_ENABLE_DOCS", "docs"),
+ self.define_from_variant("MPIDIFF_ENABLE_EXAMPLES", "examples"),
+ self.define_from_variant("MPIDIFF_ENABLE_TESTS", "tests"),
+ ]
diff --git a/var/spack/repos/builtin/packages/mpifileutils/package.py b/var/spack/repos/builtin/packages/mpifileutils/package.py
index 5b23f1dd1c..faa2a78b29 100644
--- a/var/spack/repos/builtin/packages/mpifileutils/package.py
+++ b/var/spack/repos/builtin/packages/mpifileutils/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Mpifileutils(Package):
+class Mpifileutils(CMakePackage):
"""mpiFileUtils is a suite of MPI-based tools to manage large datasets,
which may vary from large directory trees to large files.
High-performance computing users often generate large datasets with
@@ -32,17 +32,24 @@ class Mpifileutils(Package):
version("0.9.1", sha256="15a22450f86b15e7dc4730950b880fda3ef6f59ac82af0b268674d272aa61c69")
version("0.9", sha256="1b8250af01aae91c985ca5d61521bfaa4564e46efa15cee65cd0f82cf5a2bcfb")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("xattr", default=True, description="Enable code for extended attributes")
+ variant("lustre", default=False, description="Enable optimizations and features for Lustre")
+ variant("gpfs", default=False, description="Enable optimizations and features for GPFS")
+ variant("experimental", default=False, description="Install experimental tools")
+ variant("daos", default=False, description="Enable DAOS support", when="@0.11:")
+
patch("nosys_getdents.patch", when="@:0.10.1 target=aarch64:")
conflicts("platform=darwin")
depends_on("mpi")
- depends_on("libcircle@0.3:")
+ depends_on("libcircle")
- # need precise version of dtcmp, since DTCMP_Segmented_exscan added
- # in v1.0.3 but renamed in v1.1.0 and later
- depends_on("dtcmp@1.0.3", when="@:0.7")
- depends_on("dtcmp@1.1.0:", when="@0.8:")
+ # DTCMP_Segmented_exscan renamed in v1.1.0
+ depends_on("dtcmp@1.1.0:")
# fixes were added to libarchive somewhere between 3.1.2 and 3.5.0
# which helps with file names that start with "._", bumping to newer
@@ -51,124 +58,33 @@ class Mpifileutils(Package):
depends_on("libarchive@3.5.1:", when="@0.11:")
depends_on("attr", when="@0.11.1:+xattr")
-
depends_on("daos", when="+daos")
-
depends_on("bzip2")
-
depends_on("libcap")
-
depends_on("openssl")
-
- depends_on("cmake@3.1:", when="@0.9:", type="build")
-
- variant("xattr", default=True, description="Enable code for extended attributes")
-
- variant("lustre", default=False, description="Enable optimizations and features for Lustre")
-
- variant("gpfs", default=False, description="Enable optimizations and features for GPFS")
- conflicts("+gpfs", when="@:0.8.1")
-
- variant("experimental", default=False, description="Install experimental tools")
- conflicts("+experimental", when="@:0.6")
-
- variant("daos", default=False, description="Enable DAOS support", when="@0.11:")
+ depends_on("cmake@3.1:", type="build")
def flag_handler(self, name, flags):
spec = self.spec
- iflags = []
if name == "cflags":
- if spec.satisfies("%oneapi"):
- iflags.append("-Wno-error=implicit-function-declaration")
- return (iflags, None, None)
+ if spec.satisfies("%oneapi") or spec.satisfies("%cce"):
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
def cmake_args(self):
- args = std_cmake_args
- args.append("-DCMAKE_INSTALL_PREFIX=%s" % self.spec.prefix)
- args.append("-DWITH_DTCMP_PREFIX=%s" % self.spec["dtcmp"].prefix)
- args.append("-DWITH_LibCircle_PREFIX=%s" % self.spec["libcircle"].prefix)
-
- if self.spec.satisfies("+xattr"):
- args.append("-DENABLE_XATTRS=ON")
- else:
- args.append("-DENABLE_XATTRS=OFF")
-
- if self.spec.satisfies("+lustre"):
- args.append("-DENABLE_LUSTRE=ON")
- else:
- args.append("-DENABLE_LUSTRE=OFF")
-
- if self.spec.satisfies("+gpfs"):
- args.append("-DENABLE_GPFS=ON")
- else:
- args.append("-DENABLE_GPFS=OFF")
-
- if self.spec.satisfies("+experimental"):
- args.append("-DENABLE_EXPERIMENTAL=ON")
- else:
- args.append("-DENABLE_EXPERIMENTAL=OFF")
+ args = [
+ self.define("WITH_DTCMP_PREFIX", self.spec["dtcmp"].prefix),
+ self.define("WITH_LibCircle_PREFIX", self.spec["libcircle"].prefix),
+ self.define_from_variant("ENABLE_XATTRS", "xattr"),
+ self.define_from_variant("ENABLE_LUSTRE", "lustre"),
+ self.define_from_variant("ENABLE_GPFS", "gpfs"),
+ self.define_from_variant("ENABLE_EXPERIMENTAL", "experimental"),
+ ]
if self.spec.satisfies("+daos"):
- args.append("-DENABLE_DAOS=ON")
- args.append("-DWITH_DAOS_PREFIX=%s" % self.spec["daos"].prefix)
+ args.append(self.define("ENABLE_DAOS", True))
+ args.append(self.define("WITH_DAOS_PREFIX", self.spec["daos"].prefix))
else:
- args.append("-DENABLE_DAOS=OFF")
+ args.append(self.define("ENABLE_DAOS", False))
return args
-
- @when("@0.9:")
- def install(self, spec, prefix):
- args = self.cmake_args()
-
- source_directory = self.stage.source_path
- build_directory = join_path(source_directory, "build")
-
- with working_dir(build_directory, create=True):
- cmake(source_directory, *args)
- make()
- make("install")
-
- if self.run_tests:
- make("test")
-
- def configure_args(self):
- args = []
- args.append("--prefix=%s" % self.spec.prefix)
- args.append("CPPFLAGS=-I%s/src/common" % pwd())
- args.append("libarchive_CFLAGS=-I%s" % self.spec["libarchive"].prefix.include)
- args.append(
- "libarchive_LIBS=%s %s"
- % (self.spec["libarchive"].libs.search_flags, self.spec["libarchive"].libs.link_flags)
- )
- args.append("libcircle_CFLAGS=-I%s" % self.spec["libcircle"].prefix.include)
- args.append(
- "libcircle_LIBS=%s %s"
- % (self.spec["libcircle"].libs.search_flags, self.spec["libcircle"].libs.link_flags)
- )
- args.append("--with-dtcmp=%s" % self.spec["dtcmp"].prefix)
-
- if self.spec.satisfies("+xattr"):
- args.append("CFLAGS=-DDCOPY_USE_XATTRS")
-
- if self.spec.satisfies("+lustre"):
- args.append("--enable-lustre")
- else:
- args.append("--disable-lustre")
-
- if self.spec.satisfies("@0.7:"):
- if self.spec.satisfies("+experimental"):
- args.append("--enable-experimental")
- else:
- args.append("--disable-experimental")
- return args
-
- @when("@:0.8.1")
- def install(self, spec, prefix):
- args = self.configure_args()
-
- configure(*args)
- make()
- make("install")
-
- if self.run_tests:
- make("test")
diff --git a/var/spack/repos/builtin/packages/mpigraph/package.py b/var/spack/repos/builtin/packages/mpigraph/package.py
new file mode 100644
index 0000000000..485c07240a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpigraph/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Mpigraph(Package):
+ """LLNL mpigraph"""
+
+ homepage = "https://github.com/LLNL/mpiGraph"
+ git = "https://github.com/LLNL/mpiGraph.git"
+
+ version("main", branch="main")
+
+ depends_on("mpi")
+ maintainers("adammoody", "onewayforever", "rminnich")
+ license("BSD-3-Clause", checked_by="rminnich")
+
+ version("0.0.1")
+
+ depends_on("mpi")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ make()
+ install("mpiGraph", os.path.join(prefix.bin, "mpiGraph"))
diff --git a/var/spack/repos/builtin/packages/mpilander/package.py b/var/spack/repos/builtin/packages/mpilander/package.py
index 587b5e65d0..5df4b63c2d 100644
--- a/var/spack/repos/builtin/packages/mpilander/package.py
+++ b/var/spack/repos/builtin/packages/mpilander/package.py
@@ -18,6 +18,9 @@ class Mpilander(CMakePackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# variant('cuda', default=False, description='Enable CUDA support')
# variant(
# 'schedulers',
diff --git a/var/spack/repos/builtin/packages/mpileaks/package.py b/var/spack/repos/builtin/packages/mpileaks/package.py
index 8c07e68ae6..89da44e32e 100644
--- a/var/spack/repos/builtin/packages/mpileaks/package.py
+++ b/var/spack/repos/builtin/packages/mpileaks/package.py
@@ -15,6 +15,10 @@ class Mpileaks(AutotoolsPackage):
version("1.0", sha256="2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"stackstart",
values=int,
diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
index 1655c48360..4eed14cde5 100644
--- a/var/spack/repos/builtin/packages/mpip/package.py
+++ b/var/spack/repos/builtin/packages/mpip/package.py
@@ -7,7 +7,6 @@ from spack.package import *
class Mpip(AutotoolsPackage):
-
"""mpiP: Lightweight, Scalable MPI Profiling"""
homepage = "https://software.llnl.gov/mpiP/"
@@ -20,6 +19,10 @@ class Mpip(AutotoolsPackage):
version("master", branch="master")
version("3.5", sha256="e366843d53fa016fb03903e51c8aac901aa5155edabe64698a8d6fa618a03bbd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("demangling", default=True, description="Build with demangling support")
variant("setjmp", default=False, description="Use setjmp to generate stack trace")
diff --git a/var/spack/repos/builtin/packages/mpir/package.py b/var/spack/repos/builtin/packages/mpir/package.py
index ac0d0d41ab..830d12cdfd 100644
--- a/var/spack/repos/builtin/packages/mpir/package.py
+++ b/var/spack/repos/builtin/packages/mpir/package.py
@@ -19,6 +19,9 @@ class Mpir(Package):
version("2.7.0", sha256="2d0174aaccff918766215df00420f12929a6c376ab4e558af31f57c55193bcb7")
version("2.6.0", sha256="dedb336098d41d4e298909586cf351003bcd7aad9317e801f3e4c4838f6d7691")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# This setting allows mpir to act as a drop-in replacement for gmp
variant("gmp_compat", default=False, description="Compile with GMP library compatibility")
diff --git a/var/spack/repos/builtin/packages/mpitrampoline/package.py b/var/spack/repos/builtin/packages/mpitrampoline/package.py
index f3092c9388..7d61086b95 100644
--- a/var/spack/repos/builtin/packages/mpitrampoline/package.py
+++ b/var/spack/repos/builtin/packages/mpitrampoline/package.py
@@ -59,6 +59,9 @@ class Mpitrampoline(CMakePackage):
version("1.1.0", sha256="67fdb710d1ca49487593a9c023e94aa8ff0bec56de6005d1a437fca40833def9")
version("1.0.1", sha256="4ce91b99fb6d2dab481b5e477b6b6a0709add48cf0f287afbbb440fdf3232500")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build a shared version of the library")
provides("mpi @3.1")
@@ -81,20 +84,20 @@ class Mpitrampoline(CMakePackage):
def setup_run_environment(self, env):
# Because MPI implementations provide compilers, they have to add to
# their run environments the code to make the compilers available.
- env.set("MPITRAMPOLINE_CC", self.compiler.cc_names[0])
- env.set("MPITRAMPOLINE_CXX", self.compiler.cxx_names[0])
- env.set("MPITRAMPOLINE_FC", self.compiler.fc_names[0])
+ env.set("MPITRAMPOLINE_CC", self.compiler.cc)
+ env.set("MPITRAMPOLINE_CXX", self.compiler.cxx)
+ env.set("MPITRAMPOLINE_FC", self.compiler.fc)
env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
env.set("MPIF77", join_path(self.prefix.bin, "mpifc"))
env.set("MPIF90", join_path(self.prefix.bin, "mpifc"))
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
+ dependent_module = dependent_spec.package.module
# Use the Spack compiler wrappers under MPI
- env.set("MPITRAMPOLINE_CC", spack_cc)
- env.set("MPITRAMPOLINE_CXX", spack_cxx)
- env.set("MPITRAMPOLINE_FC", spack_fc)
+ env.set("MPITRAMPOLINE_CC", dependent_module.spack_cc)
+ env.set("MPITRAMPOLINE_CXX", dependent_module.spack_cxx)
+ env.set("MPITRAMPOLINE_FC", dependent_module.spack_fc)
fflags = []
if (
self.spec.satisfies("%apple-clang")
diff --git a/var/spack/repos/builtin/packages/mpiwrapper/package.py b/var/spack/repos/builtin/packages/mpiwrapper/package.py
index 50d18fc57f..2b6f7e9edd 100644
--- a/var/spack/repos/builtin/packages/mpiwrapper/package.py
+++ b/var/spack/repos/builtin/packages/mpiwrapper/package.py
@@ -39,4 +39,7 @@ class Mpiwrapper(CMakePackage):
version("2.0.0", sha256="cdc81f3fae459569d4073d99d068810689a19cf507d9c4e770fa91e93650dbe4")
version("1.0.1", sha256="29d5499a1a7a358d69dd744c581e57cac9223ebde94b52fa4a2b98c730ad47ff")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi @3.1:")
diff --git a/var/spack/repos/builtin/packages/mpix-launch-swift/package.py b/var/spack/repos/builtin/packages/mpix-launch-swift/package.py
index d8b9b59f61..a25f1ca576 100644
--- a/var/spack/repos/builtin/packages/mpix-launch-swift/package.py
+++ b/var/spack/repos/builtin/packages/mpix-launch-swift/package.py
@@ -16,6 +16,8 @@ class MpixLaunchSwift(MakefilePackage):
version("develop", branch="envs")
+ depends_on("c", type="build") # generated
+
depends_on("stc")
depends_on("tcl")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/mpl/package.py b/var/spack/repos/builtin/packages/mpl/package.py
index f39c81c76d..bff77e0465 100644
--- a/var/spack/repos/builtin/packages/mpl/package.py
+++ b/var/spack/repos/builtin/packages/mpl/package.py
@@ -22,4 +22,7 @@ class Mpl(CMakePackage):
version("0.2.0", tag="v0.2.0", commit="f322352c93627c1b91d8efb1c4ee2e4873aed016")
version("0.1", tag="v0.1", commit="970d0f3436ddbfcf2eba12c5bc7f4f7660e433ca")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/mppp/package.py b/var/spack/repos/builtin/packages/mppp/package.py
new file mode 100644
index 0000000000..ef4a7fbb2e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mppp/package.py
@@ -0,0 +1,113 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Mppp(CMakePackage):
+ """mp++ is a C++11/14/17/20 library for multiprecision arithmetic"""
+
+ # URL for package's homepage.
+ homepage = "https://bluescarni.github.io/mppp/index.html"
+ url = "https://github.com/bluescarni/mppp/archive/refs/tags/v1.0.1.tar.gz"
+
+ # List of GitHub accounts to notify when the package is updated.
+ maintainers("bluescarni", "agseaton")
+
+ # SPDX identifier of the project's license.
+ license("MPL-2.0")
+
+ version("1.0.1", sha256="90e8758bad2d9ebec04305d9cc394168de7bd563acc290e273dd68467e07de07")
+ version("1.0.0", sha256="e58b1a5fb8bdf095261eeb0861c3f46f96c71c4b043d19700e73ce3e4e639268")
+ version("0.27", sha256="a1e04f6605b3242d4361742159cf5ab273162fd7c105c2743a9bebcf44c846c3")
+ version("0.26", sha256="4dbfa68802d9a1365eda884f085418afc147d01b7a928e8333e4dcc1c3b3ce9e")
+ version("0.25", sha256="3e6142acd5c6d71405537311b0c800b6fa27a009a46af538ad07b7e6a115f95d")
+ version("0.24", sha256="c84cbe38545b7f3f20688791e0a7ce4020830ed84ab6a109ab13a208745be9dc")
+ version("0.23", sha256="76f4ee484afae4dbe00f4b0bf91063e4d5dc3eb2bbf5d34ecf174821965d5910")
+ version("0.22", sha256="92e34a393c7b6e61daec6a26827a2b73b9b61d961ab37bcabbf051cc7ff19ad2")
+ version("0.21", sha256="49a05fc6874a800cb42a3ac16eb46a50583f0b59d3b54008c58af766186a8c69")
+ version("0.20", sha256="c736daeaac30e38e1c09a19d249209ad49f8ec92ab1315a8fb9a47cc1f54e607")
+
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "mpfr",
+ default=True,
+ description=(
+ "Enable features relying on GNU MPFR library. Used in the"
+ " implementation of the real class and for providing "
+ "support for the long double type in integer and "
+ "rational"
+ ),
+ )
+ variant(
+ "mpc",
+ default=True,
+ when="+mpfr",
+ description=(
+ "Enable features relying on the GNU MPC library. Used in "
+ "the implementation of the complex class."
+ ),
+ )
+ variant(
+ "quadmath",
+ default=False,
+ description=(
+ "Enable features relying on the GNU quadmath library. "
+ "Used in the implementation of the real128 and complex128"
+ " classes."
+ ),
+ )
+ variant(
+ "serialization",
+ default=False,
+ when="@0.22:",
+ description="Enable support for serialization via the Boost.serialization library",
+ )
+ variant(
+ "fmt",
+ default=True,
+ when="@0.27:",
+ description="Enable support for formatting via the fmt library",
+ )
+ variant("tests", default=False, description="Build the test suite")
+ variant(
+ "benchmarks",
+ default=False,
+ when="+serialization +fmt",
+ description="Build the benchmarking suite",
+ )
+ variant(
+ "static",
+ default=False,
+ description="build mp++ as a static library, instead of a dynamic library",
+ )
+
+ # Dependencies
+ depends_on("cmake@3.8:", type="build")
+
+ # Required dependencies
+ depends_on("gmp@5:")
+
+ # Optional dependencies
+ depends_on("mpfr@3:", when="+mpfr")
+ depends_on("mpc", when="+mpc")
+ depends_on("gcc", when="+quadmath")
+ depends_on("boost@1.69: +serialization", when="+serialization")
+ depends_on("fmt@6.2:", when="+fmt")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("MPPP_WITH_MPFR", "mpfr"),
+ self.define_from_variant("MPPP_WITH_MPC", "mpc"),
+ self.define_from_variant("MPPP_WITH_QUADMATH", "quadmath"),
+ self.define_from_variant("MPPP_WITH_BOOST_S11N", "serialization"),
+ self.define_from_variant("MPPP_WITH_FMT", "fmt"),
+ self.define_from_variant("MPPP_BUILD_TESTS", "tests"),
+ self.define_from_variant("MPPP_BUILD_BENCHMARKS", "benchmarks"),
+ self.define_from_variant("MPPP_BUILD_STATIC_LIBRARY", "static"),
+ self.define_from_variant("MPPP_ENABLE_IPO", "ipo"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/mpt/package.py b/var/spack/repos/builtin/packages/mpt/package.py
index 237b35db32..1a45de40a0 100644
--- a/var/spack/repos/builtin/packages/mpt/package.py
+++ b/var/spack/repos/builtin/packages/mpt/package.py
@@ -35,12 +35,11 @@ class Mpt(BundlePackage):
return find_libraries(libraries, root=self.prefix, shared=True, recursive=True)
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
# use the Spack compiler wrappers under MPI
- env.set("MPICC_CC", spack_cc)
- env.set("MPICXX_CXX", spack_cxx)
- env.set("MPIF90_F90", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICC_CC", dependent_module.spack_cc)
+ env.set("MPICXX_CXX", dependent_module.spack_cxx)
+ env.set("MPIF90_F90", dependent_module.spack_fc)
def setup_run_environment(self, env):
# Because MPI is both runtime and compiler, we have to setup the mpi
@@ -51,13 +50,7 @@ class Mpt(BundlePackage):
env.set("MPIF90", self.prefix.bin.mpif90)
def setup_dependent_package(self, module, dependent_spec):
- if "platform=cray" in self.spec:
- self.spec.mpicc = spack_cc
- self.spec.mpicxx = spack_cxx
- self.spec.mpifc = spack_fc
- self.spec.mpif77 = spack_f77
- else:
- self.spec.mpicc = self.prefix.bin.mpicc
- self.spec.mpicxx = self.prefix.bin.mpicxx
- self.spec.mpifc = self.prefix.bin.mpif90
- self.spec.mpif77 = self.prefix.bin.mpif77
+ self.spec.mpicc = self.prefix.bin.mpicc
+ self.spec.mpicxx = self.prefix.bin.mpicxx
+ self.spec.mpifc = self.prefix.bin.mpif90
+ self.spec.mpif77 = self.prefix.bin.mpif77
diff --git a/var/spack/repos/builtin/packages/mptensor/package.py b/var/spack/repos/builtin/packages/mptensor/package.py
index 3fcae8fc5b..b3b3e97203 100644
--- a/var/spack/repos/builtin/packages/mptensor/package.py
+++ b/var/spack/repos/builtin/packages/mptensor/package.py
@@ -17,6 +17,8 @@ class Mptensor(CMakePackage):
version("0.3.0", sha256="819395a91551bddb77958615042fcb935a4b67ee37f912b9a2ca5b49c71befae")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Build with MPI library")
variant("doc", default=False, description="build documentation with Doxygen")
@@ -68,33 +70,41 @@ class Mptensor(CMakePackage):
def setup_build_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(".")
- def test(self):
+ # Tests only supported when spec built with mpi
if "+mpi" not in self.spec:
- print("Test of mptensor only runs with +mpi option.")
- else:
- with working_dir(join_path(self.install_test_root, "tests"), create=False):
- make("clean")
- makefile = FileFilter("Makefile")
- makefile.filter("g++", "{0}".format(spack_cxx), string=True)
-
- with working_dir(join_path(self.install_test_root), create=False):
- makefile = FileFilter("Makefile.option")
- makefile.filter("CXX =.*", "CXX ={0}".format(self.spec["mpi"].mpicxx))
- makefile.filter("CXXFLAGS =.*", "CXXFLAGS ={0}".format(self.compiler.cxx11_flag))
-
- math_libs = (
- self.spec["scalapack"].libs + self.spec["lapack"].libs + self.spec["blas"].libs
- )
+ print("Skipping copy of stand-alone test files: requires +mpi build")
+ return
+
+ cache_extra_test_sources(self, ".")
+
+ # Clean cached makefiles now so only done once
+ print("Converting cached Makefile for stand-alone test use")
+ with working_dir(join_path(install_test_root(self), "tests")):
+ make("clean")
+ makefile = FileFilter("Makefile")
+ makefile.filter("g++", f"{spack_cxx}", string=True)
+
+ print("Converting cached Makefile.option for stand-alone test use")
+ with working_dir(join_path(install_test_root(self))):
+ makefile = FileFilter("Makefile.option")
+ makefile.filter("CXX =.*", f"CXX ={self.spec['mpi'].mpicxx}")
+ makefile.filter("CXXFLAGS =.*", f"CXXFLAGS ={self.compiler.cxx11_flag}")
+
+ def test_tensor_test(self):
+ """build and run tensor_test"""
+ if "+mpi" not in self.spec:
+ raise SkipTest("Package must be installed with +mpi")
+
+ math_libs = self.spec["scalapack"].libs + self.spec["lapack"].libs + self.spec["blas"].libs
- with working_dir(join_path(self.install_test_root, "tests"), create=False):
- make("LDFLAGS={0}".format(math_libs.ld_flags))
+ with working_dir(self.test_suite.current_test_cache_dir.tests):
+ make = which("make")
+ make(f"LDFLAGS={math_libs.ld_flags}")
- mpirun = self.spec["mpi"].prefix.bin.mpirun
- mpiexec = Executable(mpirun)
- mpiexec("-n", "1", "tensor_test.out")
+ mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
+ mpirun("-n", "1", "tensor_test.out")
- # Test of mptensor has checker
- # and checker is abort when check detect any errors.
- print("Test of mptensor PASSED !")
+ # Test of mptensor has checker
+ # and checker is abort when check detect any errors.
+ print("Test of mptensor PASSED !")
diff --git a/var/spack/repos/builtin/packages/mrbayes/package.py b/var/spack/repos/builtin/packages/mrbayes/package.py
index ee3c846408..f658222ac3 100644
--- a/var/spack/repos/builtin/packages/mrbayes/package.py
+++ b/var/spack/repos/builtin/packages/mrbayes/package.py
@@ -12,7 +12,7 @@ class Mrbayes(AutotoolsPackage):
chain Monte Carlo (MCMC) methods to estimate the posterior distribution
of model parameters."""
- homepage = "http://mrbayes.sourceforge.net"
+ homepage = "https://mrbayes.sourceforge.net"
url = "https://github.com/NBISweden/MrBayes/releases/download/v3.2.7a/mrbayes-3.2.7a.tar.gz"
license("GPL-3.0-or-later")
@@ -20,12 +20,16 @@ class Mrbayes(AutotoolsPackage):
version("3.2.7a", sha256="1a4670be84e6b968d59382328294db4c8ceb73e0c19c702265deec6f2177815c")
version("3.2.7", sha256="39d9eb269969b501268d5c27f77687c6eaa2c71ccf15c724e6f330fc405f24b9")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
variant("beagle", default=True, description="Enable BEAGLE library for speed benefits")
variant(
"readline", default=False, description="Enable readline library, not recommended with MPI"
)
+ conflicts("+readline", when="+mpi", msg="MPI and readline support are exclusive")
+
depends_on("libbeagle", when="+beagle")
depends_on("mpi", when="+mpi")
depends_on("readline", when="+readline")
diff --git a/var/spack/repos/builtin/packages/mrchem/package.py b/var/spack/repos/builtin/packages/mrchem/package.py
index c73484c0f6..ada2c70ad9 100644
--- a/var/spack/repos/builtin/packages/mrchem/package.py
+++ b/var/spack/repos/builtin/packages/mrchem/package.py
@@ -25,6 +25,8 @@ class Mrchem(CMakePackage):
version("0.2.0", sha256="eea223db8275f9f2ce09601088264ec952ce2557a7050466301f53070ab03b82")
version("0.1.0", sha256="325fa45fe1918b4d394060f36d23432ab8139596ebc22b65b1284c1f673e8164")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Enable OpenMP support.")
variant("mpi", default=True, description="Enable MPI support")
diff --git a/var/spack/repos/builtin/packages/mrcpp/package.py b/var/spack/repos/builtin/packages/mrcpp/package.py
index 46dfbe6eef..05a94892de 100644
--- a/var/spack/repos/builtin/packages/mrcpp/package.py
+++ b/var/spack/repos/builtin/packages/mrcpp/package.py
@@ -33,6 +33,8 @@ class Mrcpp(CMakePackage):
version("1.0.1", sha256="b4d7120545da3531bc7aa0a4cb4eb579fdbe1f8e5d32b1fd1086976583e3e27c")
version("1.0.0", sha256="0858146141d3a60232e8874380390f9e9fa0b1bd6e67099d5833704478213efd")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Enable OpenMP support.")
variant("mpi", default=True, description="Enable MPI support")
diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py
index 16be03143c..a27b7bfa05 100644
--- a/var/spack/repos/builtin/packages/mrnet/package.py
+++ b/var/spack/repos/builtin/packages/mrnet/package.py
@@ -25,6 +25,9 @@ class Mrnet(AutotoolsPackage):
version("4.1.0", sha256="94758191ac46a9dbfea931a8e61167fe7e8a5f880caa418305c44f1d12af5e45")
version("4.0.0", sha256="7207c6d493b3f17c386667cfefa81364c96b9c8b831c67442d218d77813c5d38")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("lwthreads", default=False, description="Also build the MRNet LW threadsafe libraries")
parallel = False
diff --git a/var/spack/repos/builtin/packages/mrtrix3/package.py b/var/spack/repos/builtin/packages/mrtrix3/package.py
index a5a2b11831..38e8b7b6c0 100644
--- a/var/spack/repos/builtin/packages/mrtrix3/package.py
+++ b/var/spack/repos/builtin/packages/mrtrix3/package.py
@@ -26,6 +26,8 @@ class Mrtrix3(Package):
version("3.0.3", sha256="6ec7d5a567d8d7338e85575a74565189a26ec8971cbe8fb24a49befbc446542e")
version("2017-09-25", commit="72aca89e3d38c9d9e0c47104d0fb5bd2cbdb536d")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("glu")
diff --git a/var/spack/repos/builtin/packages/mruby/package.py b/var/spack/repos/builtin/packages/mruby/package.py
index 230a0b82e9..40b5f7d522 100644
--- a/var/spack/repos/builtin/packages/mruby/package.py
+++ b/var/spack/repos/builtin/packages/mruby/package.py
@@ -14,11 +14,11 @@ class Mruby(Package):
url = "https://github.com/mruby/mruby/archive/refs/tags/3.0.0.tar.gz"
git = "https://github.com/mruby/mruby.git"
- maintainers = ["mdorier"]
-
+ maintainers("mdorier")
license("MIT")
version("master", branch="master")
+ version("3.3.0", sha256="53088367e3d7657eb722ddfacb938f74aed1f8538b3717fe0b6eb8f58402af65")
version("3.2.0", sha256="3c198e4a31d31fe8524013066fac84a67fe6cd6067d92c25a1c79089744cb608")
version("3.1.0", sha256="64ce0a967028a1a913d3dfc8d3f33b295332ab73be6f68e96d0f675f18c79ca8")
version("3.0.0", sha256="95b798cdd931ef29d388e2b0b267cba4dc469e8722c37d4ef8ee5248bc9075b0")
@@ -26,6 +26,9 @@ class Mruby(Package):
version("2.1.1", sha256="bb27397ee9cb7e0ddf4ff51caf5b0a193d636b7a3c52399684c8c383b41c362a")
version("2.1.0", sha256="d6733742a07e553c52ab71df08b0604b3b571768bbc0c2729fbf0389d1bb5d13")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cxx_exception", description="Enable C++ exceptions", default=False, when="@3.1.0:")
depends_on("ruby@3.0.0:", type=("build"))
diff --git a/var/spack/repos/builtin/packages/mscgen/package.py b/var/spack/repos/builtin/packages/mscgen/package.py
index aae65bc5e9..6f533395ba 100644
--- a/var/spack/repos/builtin/packages/mscgen/package.py
+++ b/var/spack/repos/builtin/packages/mscgen/package.py
@@ -17,6 +17,8 @@ class Mscgen(AutotoolsPackage):
version("0.20", sha256="3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23")
+ depends_on("c", type="build") # generated
+
depends_on("flex")
depends_on("bison")
depends_on("pkgconfig")
diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py
index f8a041fbc7..223e639108 100644
--- a/var/spack/repos/builtin/packages/msgpack-c/package.py
+++ b/var/spack/repos/builtin/packages/msgpack-c/package.py
@@ -16,15 +16,24 @@ class MsgpackC(CMakePackage):
version("3.1.1", sha256="bda49f996a73d2c6080ff0523e7b535917cd28c8a79c3a5da54fc29332d61d1e")
version("3.0.1", sha256="1b834ab0b5b41da1dbfb96dd4a673f6de7e79dbd7f212f45a553ff9cc54abf3b")
- version("1.4.1", sha256="74324d696f9abb75d8a7cd5e77add5062592b7eac386c8102de78a6cc5309886")
-
- depends_on("cmake@2.8.12:", type="build")
+ version(
+ "1.4.1",
+ sha256="74324d696f9abb75d8a7cd5e77add5062592b7eac386c8102de78a6cc5309886",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("boost", when="@4:")
+ depends_on("cmake@2.8.0:", type="build")
+ depends_on("cmake@3.1.0:", type="build", when="@4:")
depends_on("googletest", type="test")
def cmake_args(self):
args = [
- "-DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough",
- "-DCMAKE_C_FLAGS=-Wno-implicit-fallthrough",
+ self.define("CMAKE_CXX_FLAGS", "-Wno-implicit-fallthrough"),
+ self.define("CMAKE_C_FLAGS", "-Wno-implicit-fallthrough"),
self.define("MSGPACK_BUILD_TESTS", self.run_tests),
]
return args
diff --git a/var/spack/repos/builtin/packages/mshadow/package.py b/var/spack/repos/builtin/packages/mshadow/package.py
index 652c454f5d..fdb61f72d8 100644
--- a/var/spack/repos/builtin/packages/mshadow/package.py
+++ b/var/spack/repos/builtin/packages/mshadow/package.py
@@ -18,6 +18,8 @@ class Mshadow(Package):
version("master", branch="master")
version("20170721", commit="20b54f068c1035f0319fa5e5bbfb129c450a5256")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
install_tree("mshadow", prefix.include.mshadow)
install_tree("make", prefix.make)
diff --git a/var/spack/repos/builtin/packages/msmpi/package.py b/var/spack/repos/builtin/packages/msmpi/package.py
index 5d05dd2c25..9b3dc8a788 100644
--- a/var/spack/repos/builtin/packages/msmpi/package.py
+++ b/var/spack/repos/builtin/packages/msmpi/package.py
@@ -24,12 +24,17 @@ class Msmpi(Package):
version("10.1.1", sha256="63c7da941fc4ffb05a0f97bd54a67968c71f63389a0d162d3182eabba1beab3d")
version("10.0.0", sha256="cfb53cf53c3cf0d4935ab58be13f013a0f7ccb1189109a5b8eea0fcfdcaef8c1")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
provides("mpi")
depends_on("win-wdk")
patch("ifort_compat.patch")
+ requires("platform=windows")
+
@classmethod
def determine_version(cls, exe):
# MSMPI is typically MS only, don't detect on other platforms
@@ -41,14 +46,14 @@ class Msmpi(Package):
return Version(ver_str.group(1)) if ver_str else None
def setup_dependent_package(self, module, dependent_spec):
- spec = self.spec
# MSMPI does not vendor compiler wrappers, instead arguments should
# be manually supplied to compiler by consuming package
# Note: This is not typical of MPI installations
- spec.mpicc = spack_cc
- spec.mpicxx = spack_cxx
- spec.mpifc = spack_fc
- spec.mpif77 = spack_f77
+ dependent_module = dependent_spec.package.module
+ self.spec.mpicc = dependent_module.spack_cc
+ self.spec.mpicxx = dependent_module.spack_cxx
+ self.spec.mpifc = dependent_module.spack_fc
+ self.spec.mpif77 = dependent_module.spack_f77
class GenericBuilder(GenericBuilder):
diff --git a/var/spack/repos/builtin/packages/msr-safe/package.py b/var/spack/repos/builtin/packages/msr-safe/package.py
new file mode 100644
index 0000000000..d0c4d44a6d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/msr-safe/package.py
@@ -0,0 +1,61 @@
+# Copyright 2013-2024 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.package import *
+
+
+class MsrSafe(MakefilePackage):
+ """msr_safe provides controlled userspace access to model-specific registers (MSRs).
+ It allows system administrators to give register-level read access and bit-level write
+ access to trusted users in production environments. This access is useful where kernel
+ drivers have not caught up with new processor features, or performance constraints
+ requires batch access across dozens or hundreds of registers."""
+
+ homepage = "https://github.com/LLNL/msr-safe"
+ url = "https://github.com/LLNL/msr-safe/archive/refs/tags/v1.7.0.tar.gz"
+
+ maintainers("kyotsukete", "rountree")
+
+ license("GPL-2.0-only", checked_by="kyotsukete")
+
+ variant(
+ "test_linux699",
+ default=False,
+ description="This variant is for testing against Linux kernel 6.9.9",
+ )
+
+ requires("@0.0.0_linux6.9.9", when="+test_linux699")
+ conflicts("@0.0.0_linux6.9.9", when="~test_linux699")
+
+ # Version 0.0.0_linux6.9.9 is based on msr-safe@1.7.0 and solves for conflicts between 1.7.0
+ # and the Linux kernel version 6.9.9.
+ version(
+ "0.0.0_linux6.9.9",
+ sha256="2b68670eda4467eaa9ddd7340522ab2000cf9d16d083607f9c481650ea1a2fc9",
+ url="https://github.com/rountree/msr-safe/archive/refs/heads/linux-6.9.9-cleanup.zip",
+ )
+ version("1.7.0", sha256="bdf4f96bde92a23dc3a98716611ebbe7d302005305adf6a368cb25da9c8a609a")
+ version("1.6.0", sha256="defe9d12e2cdbcb1a9aa29bb09376d4156c3dbbeb7afc33315ca4b0b6859f5bb")
+ version("1.5.0", sha256="e91bac281339bcb0d119a74d68a73eafb5944fd933a893e0e3209576b4c6f233")
+ version("1.4.0", sha256="3e5a913e73978c9ce15ec5d2bf1a4583e9e5c30e4e75da0f76d9a7a6153398c0")
+ version("1.3.0", sha256="718dcc78272b45ffddf520078e7e54b0b6ce272f1ef0376de009a133149982a0")
+ version("1.2.0", sha256="d3c2e5280f94d65866f82a36fea50562dc3eaccbcaa81438562caaf35989d8e8")
+ version("1.1.0", sha256="5b723e9d360e15f3ed854a84de7430b2b77be1eb1515db03c66456db43684a83")
+ version("1.0.2", sha256="9511d021ab6510195e8cc3b0353a0ac414ab6965a188f47fbb8581f9156a970e")
+
+ depends_on("linux-external-modules")
+
+ @property
+ def build_targets(self):
+ return [
+ "-C",
+ f"{self.spec['linux-external-modules'].prefix}",
+ f"M={self.build_directory}",
+ "modules",
+ ]
+
+ @property
+ def install_targets(self):
+ return [f"DESTDIR={self.prefix}", "spack-install"]
diff --git a/var/spack/repos/builtin/packages/mstk/package.py b/var/spack/repos/builtin/packages/mstk/package.py
index 5cc0be5f17..47af70a42f 100644
--- a/var/spack/repos/builtin/packages/mstk/package.py
+++ b/var/spack/repos/builtin/packages/mstk/package.py
@@ -49,6 +49,9 @@ class Mstk(CMakePackage):
version("3.0.1", sha256="d44e4bf01b118b1d19710aa839b3f5f0c1a8391264a435f641ba4bd23bcf45ec")
version("3.0.0", sha256="d993ff5fc6c431067eb97e4089835c7790397d9c1ad88a56523c0591d451df19")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("exodusii", default=False, description="Enable ExodusII")
variant("use_markers", default=True, description="Enable use of markers")
variant("parallel", default=False, description="Enable Parallel Support")
diff --git a/var/spack/repos/builtin/packages/msvc/detection_test.yaml b/var/spack/repos/builtin/packages/msvc/detection_test.yaml
new file mode 100644
index 0000000000..9ece6297ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/msvc/detection_test.yaml
@@ -0,0 +1,14 @@
+paths:
+- layout:
+ - executables:
+ - cl.bat
+ script: |
+ echo "Microsoft (R) C/C++ Optimizing Compiler Version 19.04.54321 for x86"
+ platforms: [windows]
+ results:
+ - spec: msvc@19.04.54321
+ extra_attributes:
+ compilers:
+ c: ".*cl.bat$"
+ cxx: ".*cl.bat"
+
diff --git a/var/spack/repos/builtin/packages/msvc/package.py b/var/spack/repos/builtin/packages/msvc/package.py
new file mode 100644
index 0000000000..4d25b87118
--- /dev/null
+++ b/var/spack/repos/builtin/packages/msvc/package.py
@@ -0,0 +1,67 @@
+# Copyright 2013-2024 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 re
+
+import spack.compiler
+from spack.package import *
+
+
+class Msvc(Package, CompilerPackage):
+ """
+ Microsoft Visual C++ is a compiler for the C, C++, C++/CLI and C++/CX programming languages.
+ """
+
+ homepage = "https://visualstudio.microsoft.com/vs/features/cplusplus/"
+
+ def install(self, spec, prefix):
+ raise InstallError(
+ "MSVC compilers are not installable with Spack, but can be "
+ "detected on a system where they are externally installed"
+ )
+
+ compiler_languages = ["c", "cxx"]
+ c_names = ["cl"]
+ cxx_names = ["cl"]
+ compiler_version_argument = ""
+ compiler_version_regex = r"([1-9][0-9]*\.[0-9]*\.[0-9]*)"
+
+ @classmethod
+ def determine_version(cls, exe):
+ # MSVC compiler does not have a proper version argument
+ # Errors out and prints version info with no args
+ match = re.search(
+ cls.compiler_version_regex,
+ spack.compiler.get_compiler_version_output(exe, version_arg=None, ignore_errors=True),
+ )
+ if match:
+ return match.group(1)
+
+ @classmethod
+ def determine_variants(cls, exes, version_str):
+ # MSVC uses same executable for both languages
+ spec, extras = super().determine_variants(exes, version_str)
+ extras["compilers"]["c"] = extras["compilers"]["cxx"]
+ return spec, extras
+
+ @property
+ def cc(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["c"]
+ msg = "cannot retrieve C compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
+
+ @property
+ def cxx(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["cxx"]
+ msg = "cannot retrieve C++ compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
+
+ @property
+ def fortran(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["fortran"]
+ msg = "cannot retrieve Fortran compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
diff --git a/var/spack/repos/builtin/packages/mt-metis/package.py b/var/spack/repos/builtin/packages/mt-metis/package.py
index 609c9634cc..acd534a79e 100644
--- a/var/spack/repos/builtin/packages/mt-metis/package.py
+++ b/var/spack/repos/builtin/packages/mt-metis/package.py
@@ -19,6 +19,9 @@ class MtMetis(CMakePackage):
version("0.6.0", sha256="cb8fb836b630a899edbeca4e1da19ec9eb47e89903bda83e7ec62cb0ffdcc284")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# avoid asm('pause') for no x86_64 familly.
patch("non_x8664.patch")
diff --git a/var/spack/repos/builtin/packages/mtn/package.py b/var/spack/repos/builtin/packages/mtn/package.py
index d92122211b..3ea59dd983 100644
--- a/var/spack/repos/builtin/packages/mtn/package.py
+++ b/var/spack/repos/builtin/packages/mtn/package.py
@@ -19,6 +19,8 @@ class Mtn(MakefilePackage):
version("3.4.2", sha256="19b2076c00f5b0ad70c2467189b17f335c6e7ece5d1a01ed8910779f6a5ca52a")
+ depends_on("c", type="build") # generated
+
depends_on("ffmpeg")
depends_on("libgd")
diff --git a/var/spack/repos/builtin/packages/mujoco/package.py b/var/spack/repos/builtin/packages/mujoco/package.py
index 44724042ff..14868e203c 100644
--- a/var/spack/repos/builtin/packages/mujoco/package.py
+++ b/var/spack/repos/builtin/packages/mujoco/package.py
@@ -28,6 +28,9 @@ class Mujoco(Package):
if pkg_sha256:
version(ver, sha256=pkg_sha256)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://mujoco.org/download/mujoco{0}-{1}-x86_64.tar.gz"
diff --git a/var/spack/repos/builtin/packages/multitime/package.py b/var/spack/repos/builtin/packages/multitime/package.py
index 38ce762525..497e2f841b 100644
--- a/var/spack/repos/builtin/packages/multitime/package.py
+++ b/var/spack/repos/builtin/packages/multitime/package.py
@@ -18,3 +18,5 @@ class Multitime(AutotoolsPackage):
license("MIT")
version("1.4", sha256="dd85c431c022d0b992f3a8816a1a3dfb414454a229c0ec22514761bf72d3ce47")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/multiverso/package.py b/var/spack/repos/builtin/packages/multiverso/package.py
index 22b8353237..18ceee7aee 100644
--- a/var/spack/repos/builtin/packages/multiverso/package.py
+++ b/var/spack/repos/builtin/packages/multiverso/package.py
@@ -20,6 +20,8 @@ class Multiverso(CMakePackage):
version("143187", commit="143187575d1cfa410100037b8aea2e767e0af637")
version("0.2", sha256="40e86543968faa2fe203cf0b004a4c7905303db0c860efe4ce4e1f27e46394fc")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
depends_on("boost+exception+test")
diff --git a/var/spack/repos/builtin/packages/mummer/package.py b/var/spack/repos/builtin/packages/mummer/package.py
index a1e8f1b538..52b4da1fef 100644
--- a/var/spack/repos/builtin/packages/mummer/package.py
+++ b/var/spack/repos/builtin/packages/mummer/package.py
@@ -9,13 +9,16 @@ from spack.package import *
class Mummer(Package):
"""MUMmer is a system for rapidly aligning entire genomes."""
- homepage = "http://mummer.sourceforge.net/"
+ homepage = "https://mummer.sourceforge.net/"
url = "https://sourceforge.net/projects/mummer/files/mummer/3.23/MUMmer3.23.tar.gz/download"
license("Artistic-1.0")
version("3.23", sha256="1efad4f7d8cee0d8eaebb320a2d63745bb3a160bb513a15ef7af46f330af662f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gnuplot")
depends_on("perl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/mummer4/package.py b/var/spack/repos/builtin/packages/mummer4/package.py
index 122f4229dc..98071ae52b 100644
--- a/var/spack/repos/builtin/packages/mummer4/package.py
+++ b/var/spack/repos/builtin/packages/mummer4/package.py
@@ -19,6 +19,8 @@ class Mummer4(AutotoolsPackage):
"4.0.0beta2", sha256="cece76e418bf9c294f348972e5b23a0230beeba7fd7d042d5584ce075ccd1b93"
)
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@:4.7")
depends_on("perl@5.6.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index df81143a25..0b33b6fa0e 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -13,11 +13,13 @@ from spack.package import *
class Mumps(Package):
"""MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
- homepage = "https://graal.ens-lyon.fr/MUMPS/index.php"
- url = "https://graal.ens-lyon.fr/MUMPS/MUMPS_5.5.1.tar.gz"
+ homepage = "https://mumps-solver.org/index.php"
+ url = "https://mumps-solver.org/MUMPS_5.5.1.tar.gz"
maintainers("jcortial-safran")
+ version("5.7.3", sha256="84a47f7c4231b9efdf4d4f631a2cae2bdd9adeaabc088261d15af040143ed112")
+ version("5.7.2", sha256="1362d377ce7422fc886c55212b4a4d2c381918b5ca4478f682a22d0627a8fbf8")
version("5.6.2", sha256="13a2c1aff2bd1aa92fe84b7b35d88f43434019963ca09ef7e8c90821a8f1d59a")
version("5.6.1", sha256="1920426d543e34d377604070fde93b8d102aa38ebdf53300cbce9e15f92e2896")
version("5.6.0", sha256="3e08c1bdea7aaaba303d3cf03059f3b4336fa49bef93f4260f478f067f518289")
@@ -36,6 +38,9 @@ class Mumps(Package):
# url='http://pkgs.fedoraproject.org/repo/pkgs/MUMPS/MUMPS_5.0.1.tar.gz/md5/b477573fdcc87babe861f62316833db0/MUMPS_5.0.1.tar.gz')
version("5.0.1", sha256="50355b2e67873e2239b4998a46f2bbf83f70cdad6517730ab287ae3aae9340a0")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Compile MUMPS with MPI support")
variant("scotch", default=False, description="Activate Scotch as a possible ordering library")
variant(
@@ -135,16 +140,18 @@ class Mumps(Package):
[
"IMETIS = -I%s" % self.spec["parmetis"].prefix.include,
(
- "LMETIS = -L%s -l%s -L%s -l%s"
- % (
- self.spec["parmetis"].prefix.lib,
- "parmetis",
- self.spec["metis"].prefix.lib,
- "metis",
+ (
+ "LMETIS = -L%s -l%s -L%s -l%s"
+ % (
+ self.spec["parmetis"].prefix.lib,
+ "parmetis",
+ self.spec["metis"].prefix.lib,
+ "metis",
+ )
)
- )
- if not shared
- else "LMETIS =",
+ if not shared
+ else "LMETIS ="
+ ),
]
)
@@ -153,9 +160,11 @@ class Mumps(Package):
makefile_conf.extend(
[
"IMETIS = -I%s" % self.spec["metis"].prefix.include,
- ("LMETIS = -L%s -l%s" % (self.spec["metis"].prefix.lib, "metis"))
- if not shared
- else "LMETIS =",
+ (
+ ("LMETIS = -L%s -l%s" % (self.spec["metis"].prefix.lib, "metis"))
+ if not shared
+ else "LMETIS ="
+ ),
]
)
@@ -165,7 +174,6 @@ class Mumps(Package):
# Determine which compiler suite we are using
using_gcc = self.compiler.name == "gcc"
- using_pgi = self.compiler.name == "pgi"
using_nvhpc = self.compiler.name == "nvhpc"
using_intel = self.compiler.name == "intel"
using_oneapi = self.compiler.name == "oneapi"
@@ -278,7 +286,7 @@ class Mumps(Package):
# TODO: change the value to the correct one according to the
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
- if using_intel or using_oneapi or using_pgi or using_nvhpc or using_fj:
+ if using_intel or using_oneapi or using_nvhpc or using_fj:
# Intel, PGI, and Fujitsu Fortran compiler provides
# the main() function so C examples linked with the Fortran
# compiler require a hack defined by _DMAIN_COMP
diff --git a/var/spack/repos/builtin/packages/munge/package.py b/var/spack/repos/builtin/packages/munge/package.py
index a2dd177475..56584f7e31 100644
--- a/var/spack/repos/builtin/packages/munge/package.py
+++ b/var/spack/repos/builtin/packages/munge/package.py
@@ -27,6 +27,8 @@ class Munge(AutotoolsPackage):
url="https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2",
)
+ depends_on("c", type="build") # generated
+
variant(
"localstatedir",
default="PREFIX/var",
diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py
index 3364f50a33..6190b6280f 100644
--- a/var/spack/repos/builtin/packages/muparser/package.py
+++ b/var/spack/repos/builtin/packages/muparser/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Muparser(Package):
+class Muparser(CMakePackage, Package):
"""C++ math expression parser library."""
homepage = "https://beltoforion.de/en/muparser/"
@@ -18,25 +18,36 @@ class Muparser(Package):
version("2.2.6.1", sha256="d2562853d972b6ddb07af47ce8a1cdeeb8bb3fa9e8da308746de391db67897b3")
version("2.2.5", sha256="0666ef55da72c3e356ca85b6a0084d56b05dd740c3c21d26d372085aa2c6e708")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Replace std::auto_ptr by std::unique_ptr
# https://github.com/beltoforion/muparser/pull/46
patch("auto_ptr.patch", when="@2.2.5")
- depends_on("cmake@3.1.0:", when="@2.2.6:", type="build")
-
- # Cmake build since 2.2.6
- @when("@2.2.6:")
- def install(self, spec, prefix):
- cmake_args = ["-DENABLE_SAMPLES=OFF", "-DENABLE_OPENMP=OFF", "-DBUILD_SHARED_LIBS=ON"]
-
- cmake_args.extend(std_cmake_args)
-
- with working_dir("spack-build", create=True):
- cmake("..", *cmake_args)
- make()
- make("install")
+ variant("samples", default=True, description="enable samples", when="build_system=cmake")
+ variant("openmp", default=True, description="enable OpenMP support", when="build_system=cmake")
+ variant(
+ "wide_char",
+ default=False,
+ description="enable wide character strings in place of ASCII",
+ when="build_system=cmake",
+ )
+ variant("shared", default=True, description="enable shared libs", when="build_system=cmake")
+
+ # Non-CMake build system is not supported by windows
+ conflicts("platform=windows", when="@:2.2.5")
+ build_system(conditional("cmake", when="@2.2.6:"), "generic", default="cmake")
+
+ def cmake_args(self):
+ return [
+ self.define_from_variant("ENABLE_SAMPLES", "samples"),
+ self.define_from_variant("ENABLE_OPENMP", "openmp"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("ENABLE_WIDE_CHAR", "wide_char"),
+ ]
- @when("@2.2.5")
+ @when("@:2.2.5")
def install(self, spec, prefix):
options = [
"--disable-debug",
diff --git a/var/spack/repos/builtin/packages/muparserx/package.py b/var/spack/repos/builtin/packages/muparserx/package.py
index 64b2d2491e..5d111cbc8b 100644
--- a/var/spack/repos/builtin/packages/muparserx/package.py
+++ b/var/spack/repos/builtin/packages/muparserx/package.py
@@ -16,4 +16,7 @@ class Muparserx(CMakePackage):
license("BSD-2-Clause")
+ version("4.0.12", sha256="941c79f9b8b924f2f22406af8587177b4b185da3c968dbe8dc371b9dbe117f6e")
version("4.0.8", sha256="5913e0a4ca29a097baad1b78a4674963bc7a06e39ff63df3c73fbad6fadb34e1")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/muscle/package.py b/var/spack/repos/builtin/packages/muscle/package.py
index 40460650b3..caabc6ac74 100644
--- a/var/spack/repos/builtin/packages/muscle/package.py
+++ b/var/spack/repos/builtin/packages/muscle/package.py
@@ -16,6 +16,8 @@ class Muscle(MakefilePackage):
version("3.8.31", sha256="43c5966a82133bd7da5921e8142f2f592c2b5f53d802f0527a2801783af809ad")
version("3.8.1551", sha256="c70c552231cd3289f1bad51c9bd174804c18bb3adcf47f501afec7a68f9c482e")
+ depends_on("cxx", type="build") # generated
+
@property
def build_directory(self):
if self.spec.satisfies("@3.8.31"):
diff --git a/var/spack/repos/builtin/packages/muscle5/package.py b/var/spack/repos/builtin/packages/muscle5/package.py
index 799bf10674..87a140ad55 100644
--- a/var/spack/repos/builtin/packages/muscle5/package.py
+++ b/var/spack/repos/builtin/packages/muscle5/package.py
@@ -20,6 +20,8 @@ class Muscle5(MakefilePackage):
version("5.1.0", sha256="2bba8b06e3ccabf6465fa26f459763b2029d7e7b9596881063e3aaba60d9e87d")
+ depends_on("cxx", type="build") # generated
+
depends_on("sed", type="build")
build_directory = "src"
diff --git a/var/spack/repos/builtin/packages/muse/package.py b/var/spack/repos/builtin/packages/muse/package.py
index e5f7928c98..796f56168e 100644
--- a/var/spack/repos/builtin/packages/muse/package.py
+++ b/var/spack/repos/builtin/packages/muse/package.py
@@ -16,6 +16,9 @@ class Muse(MakefilePackage):
version("1.0-rc", sha256="b48b8be0044a2249bdc0b625fe0192c65089c598bbd1b1142902dfa81e804023")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/music/package.py b/var/spack/repos/builtin/packages/music/package.py
index 8c7ce2e50e..cc0cee2be4 100644
--- a/var/spack/repos/builtin/packages/music/package.py
+++ b/var/spack/repos/builtin/packages/music/package.py
@@ -23,6 +23,9 @@ class Music(CMakePackage):
version("2021-12-01", commit="6747c54f3b73ec36719c265fd96362849a83cb45")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"hdf5",
default=False,
diff --git a/var/spack/repos/builtin/packages/musl/package.py b/var/spack/repos/builtin/packages/musl/package.py
index 13ce939b41..aff44c3b94 100644
--- a/var/spack/repos/builtin/packages/musl/package.py
+++ b/var/spack/repos/builtin/packages/musl/package.py
@@ -25,9 +25,17 @@ class Musl(MakefilePackage):
homepage = "https://www.musl-libc.org"
url = "https://www.musl-libc.org/releases/musl-1.1.23.tar.gz"
+ tags = ["runtime"]
license("MIT")
+ # This is used when the package is external and we need to find the actual default include path
+ # which may be in a multiarch subdir.
+ representative_headers = ["iso646.h"]
+
+ provides("libc")
+ provides("iconv")
+
version("1.2.4", sha256="7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039")
version("1.2.3", sha256="7d5b0b6062521e4627e099e4c9dc8248d32a30285e959b7eecaa780cf8cfd4a4")
version("1.2.2", sha256="9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd")
@@ -39,6 +47,8 @@ class Musl(MakefilePackage):
version("1.1.21", sha256="c742b66f6f49c9e5f52f64d8b79fecb5a0f6e0203fca176c70ca20f6be285f44")
version("1.1.20", sha256="44be8771d0e6c6b5f82dd15662eb2957c9a3173a19a8b49966ac0542bbd40d61")
+ depends_on("c", type="build") # generated
+
def patch(self):
config = FileFilter("configure")
if self.compiler.name == "gcc":
@@ -59,3 +69,11 @@ class Musl(MakefilePackage):
def edit(self, spec, prefix):
configure(*self.configure_args())
+
+ @property
+ def libs(self):
+ return LibraryList([])
+
+ @property
+ def headers(self):
+ return HeaderList([])
diff --git a/var/spack/repos/builtin/packages/must/package.py b/var/spack/repos/builtin/packages/must/package.py
index 5597157134..388edc7a6f 100644
--- a/var/spack/repos/builtin/packages/must/package.py
+++ b/var/spack/repos/builtin/packages/must/package.py
@@ -23,6 +23,10 @@ class Must(CMakePackage):
version("1.8.0", sha256="9754fefd2e4c8cba812f8b56a5dd929bc84aa599b2509305e1eb8518be0a8a39")
version("1.7.2", sha256="616c54b7487923959df126ac4b47ae8c611717d679fe7ec29f57a89bf0e2e0d0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("test", default=False, description="Enable must internal tests")
variant("tsan", default=True, description="Enable thread sanitizer")
variant("graphviz", default=False, description="Use to generate graphs")
diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py
index 13ebbd04f3..76c1c4f988 100644
--- a/var/spack/repos/builtin/packages/muster/package.py
+++ b/var/spack/repos/builtin/packages/muster/package.py
@@ -20,6 +20,8 @@ class Muster(CMakePackage):
version("1.0.1", sha256="71e2fcdd7abf7ae5cc648a5f310e1c5369e4889718eab2a045e747c590d2dd71")
version("1.0", sha256="370a670419e391494fcca0294882ee5f83c5d8af94ca91ac4182235332bd56d6")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost+exception+serialization+random")
depends_on("mpi")
depends_on("cmake@2.8:", type="build")
diff --git a/var/spack/repos/builtin/packages/mutationpp/package.py b/var/spack/repos/builtin/packages/mutationpp/package.py
index 0a7a01262e..449c701163 100644
--- a/var/spack/repos/builtin/packages/mutationpp/package.py
+++ b/var/spack/repos/builtin/packages/mutationpp/package.py
@@ -24,6 +24,10 @@ class Mutationpp(CMakePackage):
version("1.0.0", sha256="928df99accd1a02706a57246edeef8ebbf3bd91bb40492258ee18b810a7e0194")
version("0.3.1", sha256="a6da2816e145ac9fcfbd8920595b7f65ce7bc8df0bec572b32647720758cbe69")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Enable Fortran interface")
variant("data", default=True, description="Install default model data")
variant("examples", default=True, description="Install examples")
diff --git a/var/spack/repos/builtin/packages/mvapich/package.py b/var/spack/repos/builtin/packages/mvapich/package.py
index 46a43d5ec2..55aa19f3e2 100644
--- a/var/spack/repos/builtin/packages/mvapich/package.py
+++ b/var/spack/repos/builtin/packages/mvapich/package.py
@@ -17,7 +17,7 @@ class Mvapich(AutotoolsPackage):
platforms (x86 (Intel and AMD), ARM and OpenPOWER)"""
homepage = "https://mvapich.cse.ohio-state.edu/userguide/userguide_spack/"
- url = "https://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich-3.0b.tar.gz"
+ url = "https://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich-3.0.tar.gz"
list_url = "https://mvapich.cse.ohio-state.edu/downloads/"
maintainers("natshineman", "harisubramoni", "MatthewLieber")
@@ -27,7 +27,11 @@ class Mvapich(AutotoolsPackage):
license("Unlicense")
# Prefer the latest stable release
- version("3.0b", sha256="52d8a742e16eef69e944754fea7ebf8ba4ac572dac67dbda528443d9f32547cc")
+ version("3.0", sha256="ee076c4e672d18d6bf8dd2250e4a91fa96aac1db2c788e4572b5513d86936efb")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
provides("mpi")
provides("mpi@:3.1")
@@ -65,7 +69,7 @@ class Mvapich(AutotoolsPackage):
"pmi_version",
description="Which pmi version to be used. If using pmi2 add it to your CFLAGS",
default="simple",
- values=("simple", "pmi2"),
+ values=("simple", "pmi2", "pmix"),
multi=False,
)
@@ -109,6 +113,7 @@ class Mvapich(AutotoolsPackage):
depends_on("libfabric", when="netmod=ofi")
depends_on("slurm", when="process_managers=slurm")
depends_on("ucx", when="netmod=ucx")
+ depends_on("pmix", when="pmi_version=pmix")
with when("process_managers=slurm"):
conflicts("pmi_version=pmi2")
@@ -116,6 +121,10 @@ class Mvapich(AutotoolsPackage):
with when("process_managers=auto"):
conflicts("pmi_version=pmi2")
+ with when("process_managers=hydra"):
+ conflicts("pmi_version=pmi2")
+ conflicts("pmi_version=pmix")
+
filter_compiler_wrappers("mpicc", "mpicxx", "mpif77", "mpif90", "mpifort", relative_root="bin")
@classmethod
@@ -215,40 +224,24 @@ class Mvapich(AutotoolsPackage):
self.setup_compiler_environment(env)
# use the Spack compiler wrappers under MPI
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_compiler_environment(self, env):
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
- if self.spec.satisfies("platform=cray"):
- env.set("MPICC", spack_cc)
- env.set("MPICXX", spack_cxx)
- env.set("MPIF77", spack_fc)
- env.set("MPIF90", spack_fc)
- else:
- env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
- env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
- env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
- env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
+ env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
+ env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
+ env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
+ env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
def setup_dependent_package(self, module, dependent_spec):
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
- if self.spec.satisfies("platform=cray"):
- self.spec.mpicc = spack_cc
- self.spec.mpicxx = spack_cxx
- self.spec.mpifc = spack_fc
- self.spec.mpif77 = spack_f77
- else:
- self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
- self.spec.mpicxx = join_path(self.prefix.bin, "mpicxx")
- self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
- self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
-
+ self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
+ self.spec.mpicxx = join_path(self.prefix.bin, "mpicxx")
+ self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
+ self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
self.spec.mpicxx_shared_libs = [
os.path.join(self.prefix.lib, "libmpicxx.{0}".format(dso_suffix)),
os.path.join(self.prefix.lib, "libmpi.{0}".format(dso_suffix)),
@@ -277,6 +270,8 @@ class Mvapich(AutotoolsPackage):
args.extend(self.enable_or_disable("alloca"))
args.append("--with-pmi=" + spec.variants["pmi_version"].value)
+ if "pmi_version=pmix" in spec:
+ args.append("--with-pmix={0}".format(spec["pmix"].prefix))
if "+debug" in self.spec:
args.extend(
diff --git a/var/spack/repos/builtin/packages/mvapich2-gdr/package.py b/var/spack/repos/builtin/packages/mvapich2-gdr/package.py
index a284f6ffa0..ae9ad23d02 100755
--- a/var/spack/repos/builtin/packages/mvapich2-gdr/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2-gdr/package.py
@@ -166,13 +166,12 @@ class Mvapich2Gdr(AutotoolsPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_compiler_environment(env)
-
- # use the Spack compiler wrappers under MPI
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_compiler_environment(self, env):
env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 246d013e3b..c0ff3bb07f 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -7,6 +7,7 @@ import os.path
import re
import sys
+import spack.compilers
from spack.package import *
@@ -39,6 +40,10 @@ class Mvapich2(AutotoolsPackage):
version("2.2", sha256="791a6fc2b23de63b430b3e598bf05b1b25b82ba8bf7e0622fc81ba593b3bb131")
version("2.1", sha256="49f3225ad17d2f3b6b127236a0abdc979ca8a3efb8d47ab4b6cd4f5252d05d29")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
provides("mpi")
provides("mpi@:3.1", when="@2.3:")
provides("mpi@:3.0", when="@2.1:")
@@ -84,6 +89,15 @@ class Mvapich2(AutotoolsPackage):
)
variant(
+ "pmi_version",
+ description=("The pmi version to be used with slurm"),
+ when="process_managers=slurm",
+ default="pmi2",
+ values=("pmi1", "pmi2", "pmix"),
+ multi=False,
+ )
+
+ variant(
"fabrics",
description="Select the fabric to be enabled for this build."
"If you have verbs (either from OFED or MOFED), PSM or PSM2 "
@@ -133,6 +147,7 @@ class Mvapich2(AutotoolsPackage):
depends_on("rdma-core", when="fabrics=nemesisibtcp")
depends_on("libfabric", when="fabrics=nemesisofi")
depends_on("slurm", when="process_managers=slurm")
+ depends_on("pmix", when="pmi_version=pmix")
# Fix segmentation fault in `MPIR_Attr_delete_list`:
# <https://lists.osu.edu/pipermail/mvapich-discuss/2023-January/010695.html>.
@@ -277,11 +292,14 @@ class Mvapich2(AutotoolsPackage):
# See: http://slurm.schedmd.com/mpi_guide.html#mvapich2
if "process_managers=slurm" in spec:
- opts = [
- "--with-pmi=pmi2",
- "--with-pm=slurm",
- "--with-slurm={0}".format(spec["slurm"].prefix),
- ]
+ opts = ["--with-pm=slurm", "--with-slurm={0}".format(spec["slurm"].prefix)]
+ if "pmi_version=pmi1" in spec:
+ opts.append("--with-pmi=pmi1")
+ elif "pmi_version=pmi2" in spec:
+ opts.append("--with-pmi=pmi2")
+ elif "pmi_version=pmix" in spec:
+ opts.append("--with-pmi=pmix")
+ opts.append("--with-pmix={0}".format(spec["pmix"].prefix))
return opts
@@ -347,7 +365,12 @@ class Mvapich2(AutotoolsPackage):
def setup_run_environment(self, env):
if "process_managers=slurm" in self.spec:
- env.set("SLURM_MPI_TYPE", "pmi2")
+ if "pmi_version=pmi1" in self.spec:
+ env.set("SLURM_MPI_TYPE", "pmi1")
+ elif "pmi_version=pmi2" in self.spec:
+ env.set("SLURM_MPI_TYPE", "pmi2")
+ elif "pmi_version=pmix" in self.spec:
+ env.set("SLURM_MPI_TYPE", "pmix")
env.set("MPI_ROOT", self.prefix)
@@ -357,42 +380,25 @@ class Mvapich2(AutotoolsPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_compiler_environment(env)
-
# use the Spack compiler wrappers under MPI
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_compiler_environment(self, env):
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
- if self.spec.satisfies("platform=cray"):
- env.set("MPICC", spack_cc)
- env.set("MPICXX", spack_cxx)
- env.set("MPIF77", spack_fc)
- env.set("MPIF90", spack_fc)
- else:
- env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
- env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
- env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
- env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
+ env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
+ env.set("MPICXX", join_path(self.prefix.bin, "mpicxx"))
+ env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
+ env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
def setup_dependent_package(self, module, dependent_spec):
- # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
- # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
- if self.spec.satisfies("platform=cray"):
- self.spec.mpicc = spack_cc
- self.spec.mpicxx = spack_cxx
- self.spec.mpifc = spack_fc
- self.spec.mpif77 = spack_f77
- else:
- self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
- self.spec.mpicxx = join_path(self.prefix.bin, "mpicxx")
- self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
- self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
-
+ self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
+ self.spec.mpicxx = join_path(self.prefix.bin, "mpicxx")
+ self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
+ self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
self.spec.mpicxx_shared_libs = [
os.path.join(self.prefix.lib, "libmpicxx.{0}".format(dso_suffix)),
os.path.join(self.prefix.lib, "libmpi.{0}".format(dso_suffix)),
diff --git a/var/spack/repos/builtin/packages/mvapich2x/package.py b/var/spack/repos/builtin/packages/mvapich2x/package.py
index b817f3cd34..5962ef6968 100644
--- a/var/spack/repos/builtin/packages/mvapich2x/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2x/package.py
@@ -218,13 +218,13 @@ class Mvapich2x(AutotoolsPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_compiler_environment(env)
-
# use the Spack compiler wrappers under MPI
- env.set("MPICH_CC", spack_cc)
- env.set("MPICH_CXX", spack_cxx)
- env.set("MPICH_F77", spack_f77)
- env.set("MPICH_F90", spack_fc)
- env.set("MPICH_FC", spack_fc)
+ dependent_module = dependent_spec.package.module
+ env.set("MPICH_CC", dependent_module.spack_cc)
+ env.set("MPICH_CXX", dependent_module.spack_cxx)
+ env.set("MPICH_F77", dependent_module.spack_f77)
+ env.set("MPICH_F90", dependent_module.spack_fc)
+ env.set("MPICH_FC", dependent_module.spack_fc)
def setup_compiler_environment(self, env):
# For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
index 7ae66fbd23..40a892419e 100644
--- a/var/spack/repos/builtin/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -21,6 +21,9 @@ class Mxml(AutotoolsPackage):
version("2.9", sha256="cded54653c584b24c4a78a7fa1b3b4377d49ac4f451ddf170ebbc8161d85ff92")
version("2.8", sha256="0c9369f91a718d82e32cb007c0bd41b6642822c9a0ffe1d10eccbdea9a3011d5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version <= Version("2.7"):
return "https://github.com/michaelrsweet/mxml/archive/release-{0}.tar.gz".format(
diff --git a/var/spack/repos/builtin/packages/mxnet/package.py b/var/spack/repos/builtin/packages/mxnet/package.py
index 9558cc6b80..690b3803aa 100644
--- a/var/spack/repos/builtin/packages/mxnet/package.py
+++ b/var/spack/repos/builtin/packages/mxnet/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -14,8 +15,6 @@ class Mxnet(CMakePackage, CudaPackage, PythonExtension):
list_url = "https://mxnet.apache.org/get_started/download"
git = "https://github.com/apache/mxnet.git"
- maintainers("adamjstewart")
-
license("Apache-2.0")
version("master", branch="master", submodules=True)
@@ -25,6 +24,9 @@ class Mxnet(CMakePackage, CudaPackage, PythonExtension):
version("1.7.0", sha256="1d20c9be7d16ccb4e830e9ee3406796efaf96b0d93414d676337b64bc59ced18")
version("1.6.0", sha256="01eb06069c90f33469c7354946261b0a94824bbaf819fd5d5a7318e8ee596def")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="Distribution",
@@ -125,5 +127,4 @@ class Mxnet(CMakePackage, CudaPackage, PythonExtension):
def install_python(self):
if "+python" in self.spec:
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/mysql-connector-c/package.py b/var/spack/repos/builtin/packages/mysql-connector-c/package.py
index d0e4d1f218..874447d3ea 100644
--- a/var/spack/repos/builtin/packages/mysql-connector-c/package.py
+++ b/var/spack/repos/builtin/packages/mysql-connector-c/package.py
@@ -23,3 +23,6 @@ class MysqlConnectorC(CMakePackage):
license("GPL-2.0-or-later")
version("6.1.11", sha256="c8664851487200162b38b6f3c8db69850bd4f0e4c5ff5a6d161dbfb5cb76b6c4")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py
index 49b79ec40c..1e7cb834d3 100644
--- a/var/spack/repos/builtin/packages/mysql/package.py
+++ b/var/spack/repos/builtin/packages/mysql/package.py
@@ -50,6 +50,9 @@ class Mysql(CMakePackage):
version("5.6.43", sha256="1c95800bf0e1b7a19a37d37fbc5023af85c6bc0b41532433b3a886263a1673ef")
version("5.5.62", sha256="b1e7853bc1f04aabf6771e0ad947f35ac8d237f4b35d0706d1095c9526ff99d7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("client_only", default=False, description="Build and install client only.")
variant(
"cxxstd",
@@ -203,7 +206,7 @@ class Mysql(CMakePackage):
copy(dtrace, dtrace_copy)
filter_file(
"^#!/usr/bin/python",
- "#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command)),
+ "#!/usr/bin/env {0}".format(os.path.basename(str(self.spec["python"].command))),
dtrace_copy,
)
# To have our own copy of dtrace in PATH, we need to
@@ -223,3 +226,12 @@ class Mysql(CMakePackage):
if "python" in self.spec and self.spec.satisfies("@:7"):
self._fix_dtrace_shebang(env)
+
+ @run_before("install")
+ def fixup_mysqlconfig(self):
+ if not self.spec.satisfies("platform=windows"):
+ # mysql uses spack libz but exports -lzlib to its dependencies. Fix that:
+ with working_dir(self.build_directory):
+ for config in ("scripts/mysql_config", "scripts/mysqlclient.pc"):
+ if os.path.exists(config):
+ filter_file(" -lzlib ", " -lz ", config)
diff --git a/var/spack/repos/builtin/packages/mysqlpp/package.py b/var/spack/repos/builtin/packages/mysqlpp/package.py
index cec4a6d4dc..d34501bbf6 100644
--- a/var/spack/repos/builtin/packages/mysqlpp/package.py
+++ b/var/spack/repos/builtin/packages/mysqlpp/package.py
@@ -19,6 +19,8 @@ class Mysqlpp(AutotoolsPackage):
version("3.3.0", sha256="449cbc46556cc2cc9f9d6736904169a8df6415f6960528ee658998f96ca0e7cf")
version("3.2.5", sha256="839cfbf71d50a04057970b8c31f4609901f5d3936eaa86dab3ede4905c4db7a8")
+ depends_on("cxx", type="build") # generated
+
depends_on("mysql-client")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/n2p2/package.py b/var/spack/repos/builtin/packages/n2p2/package.py
index 1c30e9841c..8d27028eda 100644
--- a/var/spack/repos/builtin/packages/n2p2/package.py
+++ b/var/spack/repos/builtin/packages/n2p2/package.py
@@ -2,6 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
from spack.package import *
from spack.pkg.builtin.boost import Boost
@@ -22,6 +23,8 @@ class N2p2(MakefilePackage):
version("2.1.1", sha256="90fbc0756132984d0d7e6d92d2f53358c120e75f148910d90c027158163251b9")
version("2.1.0", sha256="283c00e9a5b964f4c84a70c5f1cef7167e9b881080b50a221da08799e5ede400")
+ depends_on("cxx", type="build") # generated
+
variant("doc", default=False, description="build documentation with Doxygen")
variant("shared", default=False, description="build shared libraries")
@@ -57,25 +60,26 @@ class N2p2(MakefilePackage):
def edit(self, spec, prefix):
makefile = FileFilter(join_path("src", "makefile"))
- makefile.filter("MODE=.*", "MODE={0}".format("shared" if "+shared" in spec else "static"))
+ makefile.filter("MODE=.*", f"MODE={'shared' if '+shared' in spec else 'static'}")
makefile = FileFilter(join_path("src", "makefile.gnu"))
blas_libs = self.spec["blas"].libs
- makefile.filter("PROJECT_CC=.*", "PROJECT_CC={0}".format(spack_cxx))
- makefile.filter("PROJECT_MPICC=.*", "PROJECT_MPICC={0}".format(self.spec["mpi"].mpicxx))
- makefile.filter("PROJECT_CFLAGS=.*", "PROJECT_CFLAGS={0}".format(self.compiler.cxx11_flag))
+ makefile.filter("PROJECT_CC=.*", f"PROJECT_CC={spack_cxx}")
+ makefile.filter("PROJECT_MPICC=.*", f"PROJECT_MPICC={self.spec['mpi'].mpicxx}")
+ makefile.filter("PROJECT_CFLAGS=.*", f"PROJECT_CFLAGS={self.compiler.cxx11_flag}")
makefile.filter(
- "PROJECT_LDFLAGS_BLAS.*",
- "PROJECT_LDFLAGS_BLAS={0} -lgsl -lgslcblas".format(blas_libs.ld_flags),
+ "PROJECT_LDFLAGS_BLAS.*", f"PROJECT_LDFLAGS_BLAS={blas_libs.ld_flags} -lgsl -lgslcblas"
)
def build(self, spec, prefix):
with working_dir("src"):
- make()
- make("lammps-nnp")
- make("pynnp")
+ # Add --no-print-directory flag to avoid issues when variables set
+ # to value of shell function with cd cmd used as target (see #43192)
+ make("--no-print-directory")
+ make("--no-print-directory", "lammps-nnp")
+ make("--no-print-directory", "pynnp")
if "+doc" in self.spec:
- make("doc")
+ make("--no-print-directory", "doc")
def install(self, spec, prefix):
install_tree("bin", prefix.bin)
@@ -90,46 +94,62 @@ class N2p2(MakefilePackage):
def setup_build_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(".")
+ cache_extra_test_sources(self, ["."])
+
+ def test_result_check(self):
+ """Build and run result-check.sh"""
+ # The results cannot be verified with the script without an expected
+ # results file added to the test subdirectory of the package repository.
+ expected_file = join_path(
+ self.test_suite.current_test_data_dir, f"expected-result-{self.version}.txt"
+ )
+ if not os.path.exists(expected_file):
+ raise SkipTest(
+ f"The expected results file is missing from the repository for {self.version}"
+ )
- def test(self):
- with working_dir(join_path(self.install_test_root, "test"), create=False):
+ result_check_script = join_path(self.test_suite.current_test_data_dir, "result-check.sh")
+ if not os.path.exists(result_check_script):
+ raise SkipTest("Required result-check.sh is missing from the repository directory")
+
+ make = which("make")
+ with working_dir(self.test_suite.current_test_cache_dir.test):
make("clean")
- with working_dir(join_path(self.install_test_root, "src"), create=False):
+ with working_dir(self.test_suite.current_test_cache_dir.src):
make("clean")
make(
"MODE=test",
- "PROJECT_GSL={0}".format(self.spec["gsl"].prefix.include),
- "PROJECT_EIGEN={0}".format(self.spec["eigen"].prefix.include.eigen3),
+ f"PROJECT_GSL={self.spec['gsl'].prefix.include}",
+ f"PROJECT_EIGEN={self.spec['eigen'].prefix.include.eigen3}",
)
make(
"MODE=test",
"lammps-nnp",
- "PROJECT_GSL={0}".format(self.spec["gsl"].prefix.include),
- "PROJECT_EIGEN={0}".format(self.spec["eigen"].prefix.include.eigen3),
+ f"PROJECT_GSL={self.spec['gsl'].prefix.include}",
+ f"PROJECT_EIGEN={self.spec['eigen'].prefix.include.eigen3}",
)
make("pynnp", "MODE=test")
- with working_dir(join_path(self.install_test_root, "test"), create=False):
+ with working_dir(self.test_suite.current_test_cache_dir.test):
if self.spec.satisfies("%fj"):
f = FileFilter(join_path("cpp", "nnp_test.h"))
- f.filter(
- "(example.co",
- '("{0} -n 1 " + example.co'.format(self.spec["mpi"].prefix.bin.mpirun),
- string=True,
- )
+ mpirun = self.spec["mpi"].prefix.bin.mpirun
+ f.filter("(example.co", f'("{mpirun} -n 1 " + example.co', string=True)
+ cpp_output = "output_cpp.txt"
f = FileFilter(join_path("cpp", "makefile"))
- f.filter("log_level=.*", "log_level=$(LOG_LEVEL) 2>&1 | tee -a ../output_cpp.txt")
+ f.filter("log_level=.*", f"log_level=$(LOG_LEVEL) 2>&1 | tee -a ../{cpp_output}")
+ python_output = "output_python.txt"
f = FileFilter(join_path("python", "makefile"))
- f.filter("term\\s-v.*", "term -v | tee -a ../output_python.txt")
+ f.filter("term\\s-v.*", f"term -v | tee -a ../{python_output}")
make("cpp", parallel=False)
+ assert os.path.isfile(cpp_output), f"{cpp_output} was not produced"
+
make("python", parallel=False)
+ assert os.path.isfile(python_output), f"{python_output} was not produced"
- test_dir = self.test_suite.current_test_data_dir
- expected_file = join_path(test_dir, "expected-result-{0}.txt".format(self.version))
- check_n2p2 = Executable(join_path(test_dir, "result-check.sh"))
- check_n2p2("./output_cpp.txt", "./output_python.txt", expected_file)
+ result_check = which(result_check_script)
+ result_check(cpp_output, python_output, expected_file)
diff --git a/var/spack/repos/builtin/packages/nag/detection_test.yaml b/var/spack/repos/builtin/packages/nag/detection_test.yaml
new file mode 100644
index 0000000000..df2bbe9bbd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nag/detection_test.yaml
@@ -0,0 +1,13 @@
+paths:
+- layout:
+ - executables:
+ - bin/nagfor
+ script: |
+ echo "NAG Fortran Compiler Release 6.0(Hibiya) Build 1037"
+ echo "Product NPL6A60NA for x86-64 Linux"
+ platforms: [linux]
+ results:
+ - spec: nag@6.0.1037
+ extra_attributes:
+ compilers:
+ fortran: ".*/bin/nagfor"
diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py
index eb437567ef..2fc265268a 100644
--- a/var/spack/repos/builtin/packages/nag/package.py
+++ b/var/spack/repos/builtin/packages/nag/package.py
@@ -3,20 +3,23 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
-import re
-import llnl.util.tty as tty
-
-import spack.compiler
from spack.package import *
-class Nag(Package):
+class Nag(Package, CompilerPackage):
"""The NAG Fortran Compiler."""
homepage = "https://www.nag.com/nagware/np.asp"
maintainers("skosukhin")
+ version("7.2.7203", sha256="775e2a10329bcf1c0ba35adb73d49db11b76698ede1f4ae070177216c9ee6e1e")
+ version(
+ "7.2.7200",
+ sha256="3c2179e073d6cf2aadaeaf9a6a5f3b7f1fdcfb85b99c6fb593445b28ddd44880",
+ url="file://{0}/npl6a72na_amd64.tgz".format(os.getcwd()),
+ deprecated=True,
+ )
version("7.1.7125", sha256="738ed9ed943ebeb05d337cfdc603b9c88b8642b3d0cafea8d2872f36201adb37")
version(
"7.1.7101",
@@ -33,6 +36,8 @@ class Nag(Package):
deprecated=True,
)
+ depends_on("fortran", type="build") # generated
+
# Licensing
license_required = True
license_comment = "!"
@@ -63,54 +68,10 @@ class Nag(Package):
env.set("F77", self.prefix.bin.nagfor)
env.set("FC", self.prefix.bin.nagfor)
- executables = ["^nagfor$"]
-
- @classmethod
- def determine_version(cls, exe):
- version_regex = re.compile(r"NAG Fortran Compiler Release ([0-9.]+)")
- # NAG does not support a flag that would enable verbose output and
- # compilation/linking at the same time (with either '-#' or '-dryrun'
- # the compiler only prints the commands but does not run them).
- # Therefore, the only thing we can do is to pass the '-v' argument to
- # the underlying GCC. In order to get verbose output from the latter
- # at both compile and linking stages, we need to call NAG with two
- # additional flags: '-Wc,-v' and '-Wl,-v'. However, we return only
- # '-Wl,-v' for the following reasons:
- # 1) the interface of this method does not support multiple flags in
- # the return value and, at least currently, verbose output at the
- # linking stage has a higher priority for us;
- # 2) NAG is usually mixed with GCC compiler, which also accepts
- # '-Wl,-v' and produces meaningful result with it: '-v' is passed
- # to the linker and the latter produces verbose output for the
- # linking stage ('-Wc,-v', however, would break the compilation
- # with a message from GCC that the flag is not recognized).
- #
- # This way, we at least enable the implicit rpath detection, which is
- # based on compilation of a C file (see method
- # spack.compiler._get_compiler_link_paths): in the case of a mixed
- # NAG/GCC toolchain, the flag will be passed to g++ (e.g.
- # 'g++ -Wl,-v ./main.c'), otherwise, the flag will be passed to nagfor
- # (e.g. 'nagfor -Wl,-v ./main.c' - note that nagfor recognizes '.c'
- # extension and treats the file accordingly). The list of detected
- # rpaths will contain only GCC-related directories and rpaths to
- # NAG-related directories are injected by nagfor anyway.
- try:
- output = spack.compiler.get_compiler_version_output(exe, "-Wl,-v")
- match = version_regex.search(output)
- if match:
- return match.group(1)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(e)
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- compilers = {}
- for exe in exes:
- if "nagfor" in exe:
- compilers["fortran"] = exe
- return "", {"compilers": compilers}
+ compiler_languages = ["fortran"]
+ fortran_names = ["nagfor"]
+ compiler_version_regex = r"NAG Fortran Compiler Release (\d+).(\d+)\(.*\) Build (\d+)"
+ compiler_version_argument = "-V"
@property
def fortran(self):
diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py
index f60fd8ddbf..f7a481f2d6 100644
--- a/var/spack/repos/builtin/packages/nalu-wind/package.py
+++ b/var/spack/repos/builtin/packages/nalu-wind/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import sys
-
from spack.package import *
@@ -15,17 +13,20 @@ def _parse_float(val):
return False
-class NaluWind(CMakePackage, CudaPackage):
+class NaluWind(CMakePackage, CudaPackage, ROCmPackage):
"""Nalu-Wind: Wind energy focused variant of Nalu."""
homepage = "https://nalu-wind.readthedocs.io"
git = "https://github.com/exawind/nalu-wind.git"
+ url = "https://github.com/Exawind/nalu-wind/archive/refs/tags/v2.0.0.tar.gz"
maintainers("jrood-nrel", "psakievich")
tags = ["ecp", "ecp-apps"]
- version("master", branch="master")
+ version("master", branch="master", submodules=True)
+ version("2.1.0", tag="v2.1.0", submodules=True)
+ version("2.0.0", tag="v2.0.0", submodules=True)
variant("pic", default=True, description="Position independent code")
variant(
@@ -43,85 +44,150 @@ class NaluWind(CMakePackage, CudaPackage):
variant("openfast", default=False, description="Compile with OpenFAST support")
variant("tioga", default=False, description="Compile with Tioga support")
variant("hypre", default=True, description="Compile with Hypre support")
- variant("trilinos-solvers", default=True, description="Compile with Trilinos Solvers support")
+ variant("trilinos-solvers", default=False, description="Compile with Trilinos Solvers support")
variant("catalyst", default=False, description="Compile with Catalyst support")
+ variant("shared", default=True, description="Build shared libraries")
variant("fftw", default=False, description="Compile with FFTW support")
+ variant("fsi", default=False, description="Enable fluid-structure-interaction models")
variant("boost", default=False, description="Enable Boost integration")
+ variant("gpu-aware-mpi", default=False, description="gpu-aware-mpi")
variant("wind-utils", default=False, description="Build wind-utils")
+ variant("umpire", default=False, description="Enable Umpire")
+ variant(
+ "tests", default=False, description="Enable regression tests and clone the mesh submodule"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+openfast")
depends_on("mpi")
- depends_on("yaml-cpp@0.5.3:")
+ depends_on("yaml-cpp@0.6.0:0.7.0")
+ depends_on("openfast@4.0.0:+cxx+netcdf", when="+fsi")
+ depends_on("trilinos@15.1.1", when="@=2.1.0")
+ depends_on("trilinos@13.4.1", when="@=2.0.0")
+ depends_on("hypre@2.29.0:", when="@2.0.0:+hypre")
depends_on(
- "trilinos@13:"
- "+exodus+tpetra+zoltan+stk+boost"
- "~superlu-dist~superlu+hdf5+shards~hypre+gtest"
+ "trilinos@13:+exodus+tpetra+zoltan+stk~superlu-dist~superlu+hdf5+shards~hypre+gtest "
+ "gotype=long cxxstd=17"
)
depends_on("trilinos~cuda~wrapper", when="~cuda")
- # 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"))
depends_on("openfast@2.6.0: +cxx", when="+openfast")
- depends_on("tioga@master:", when="+tioga")
+ depends_on("tioga@1.0.0:", when="+tioga")
depends_on("hypre@2.18.2: ~int64+mpi~superlu-dist", when="+hypre")
depends_on("trilinos+muelu+belos+amesos2+ifpack2", when="+trilinos-solvers")
- conflicts(
- "~hypre~trilinos-solvers",
- msg="nalu-wind: Must enable at least one of the linear-solvers: hypre or trilinos-solvers",
- )
depends_on("kokkos-nvcc-wrapper", type="build", when="+cuda")
+ depends_on("trilinos-catalyst-ioss-adapter", when="+catalyst")
+ depends_on("fftw+mpi", when="+fftw")
+ depends_on("nccmp")
+ depends_on("boost +filesystem +iostreams cxxstd=14", when="+boost")
+ depends_on("hypre+gpu-aware-mpi", when="+gpu-aware-mpi")
+ depends_on("hypre+umpire", when="+umpire")
+ depends_on("trilinos~shared", when="+trilinos-solvers")
+ # indirect dependency needed to make original concretizer work
+ depends_on("netcdf-c+parallel-netcdf")
+
for _arch in CudaPackage.cuda_arch_values:
depends_on(
"trilinos~shared+cuda+cuda_rdc+wrapper 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),
+ "hypre@2.30.0: +cuda cuda_arch={0}".format(_arch),
when="+hypre+cuda cuda_arch={0}".format(_arch),
)
- depends_on("trilinos-catalyst-ioss-adapter", when="+catalyst")
- depends_on("fftw+mpi", when="+fftw")
- depends_on("nccmp")
- # indirect dependency needed to make original concretizer work
- depends_on("netcdf-c+parallel-netcdf")
- depends_on("boost +filesystem +iostreams cxxstd=14", when="+boost")
+ for _arch in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "trilinos~shared+rocm+rocm_rdc amdgpu_target={0}".format(_arch),
+ when="+rocm amdgpu_target={0}".format(_arch),
+ )
+ depends_on(
+ "hypre@2.30.0: +rocm amdgpu_target={0}".format(_arch),
+ when="+hypre+rocm amdgpu_target={0}".format(_arch),
+ )
+
+ conflicts(
+ "~hypre~trilinos-solvers",
+ msg="nalu-wind: Must enable at least one of the linear-solvers: hypre or trilinos-solvers",
+ )
+ conflicts(
+ "+shared",
+ when="+cuda",
+ msg="invalid device functions are generated with shared libs and cuda",
+ )
+ conflicts(
+ "+shared",
+ when="+rocm",
+ msg="invalid device functions are generated with shared libs and rocm",
+ )
+ conflicts("+cuda", when="+rocm")
+ conflicts("+rocm", when="+cuda")
+ conflicts("^hypre+cuda", when="~cuda")
+ conflicts("^hypre+rocm", when="~rocm")
+ conflicts("^hypre+sycl")
+ conflicts("^trilinos+cuda", when="~cuda")
+ conflicts("^trilinos+rocm", when="~rocm")
+ conflicts("+shared", when="+trilinos-solvers")
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ spec = self.spec
+ if spec.satisfies("+cuda") or spec.satisfies("+rocm"):
+ env.set("CUDA_LAUNCH_BLOCKING", "1")
+ env.set("CUDA_MANAGED_FORCE_DEVICE_ALLOC", "1")
+ env.set("HIP_LAUNCH_BLOCKING", "1")
+ env.set("HIP_MANAGED_FORCE_DEVICE_ALLOC", "1")
+
+ def setup_build_environment(self, env):
+ spec = self.spec
+ env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE")
+ if spec.satisfies("+cuda"):
+ env.set("OMPI_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ env.set("MPICH_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ env.set("MPICXX_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
+ if spec.satisfies("+rocm"):
+ env.append_flags("CXXFLAGS", "-fgpu-rdc")
def cmake_args(self):
spec = self.spec
args = [
- self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx),
- self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc),
self.define("Trilinos_DIR", spec["trilinos"].prefix),
self.define("YAML_DIR", spec["yaml-cpp"].prefix),
+ self.define("CMAKE_CXX_STANDARD", "17"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
self.define_from_variant("ENABLE_CUDA", "cuda"),
self.define_from_variant("ENABLE_WIND_UTILS", "wind-utils"),
self.define_from_variant("ENABLE_BOOST", "boost"),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("ENABLE_OPENFAST", "openfast"),
+ self.define_from_variant("ENABLE_TIOGA", "tioga"),
+ self.define_from_variant("ENABLE_HYPRE", "hypre"),
+ self.define_from_variant("ENABLE_TRILINOS_SOLVERS", "trilinos-solvers"),
+ self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst"),
+ self.define_from_variant("ENABLE_FFTW", "fftw"),
+ self.define_from_variant("ENABLE_UMPIRE", "umpire"),
+ self.define_from_variant("ENABLE_TESTS", "tests"),
]
- args.append(self.define_from_variant("ENABLE_OPENFAST", "openfast"))
- if "+openfast" in spec:
+ if spec.satisfies("+openfast"):
args.append(self.define("OpenFAST_DIR", spec["openfast"].prefix))
+ args.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc))
- args.append(self.define_from_variant("ENABLE_TIOGA", "tioga"))
- if "+tioga" in spec:
+ if spec.satisfies("+tioga"):
args.append(self.define("TIOGA_DIR", spec["tioga"].prefix))
- args.append(self.define_from_variant("ENABLE_HYPRE", "hypre"))
- if "+hypre" in spec:
+ if spec.satisfies("+hypre"):
args.append(self.define("HYPRE_DIR", spec["hypre"].prefix))
- args.append(self.define_from_variant("ENABLE_TRILINOS_SOLVERS", "trilinos-solvers"))
- args.append(self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst"))
- if "+catalyst" in spec:
+ if spec.satisfies("+catalyst"):
args.append(
self.define(
"PARAVIEW_CATALYST_INSTALL_PATH", spec["trilinos-catalyst-ioss-adapter"].prefix
)
)
- args.append(self.define_from_variant("ENABLE_FFTW", "fftw"))
- if "+fftw" in spec:
+ if spec.satisfies("+fftw"):
args.append(self.define("FFTW_DIR", spec["fftw"].prefix))
args.append(self.define("ENABLE_TESTS", self.run_tests))
@@ -133,6 +199,15 @@ class NaluWind(CMakePackage, CudaPackage):
]
)
+ if spec.satisfies("+umpire"):
+ args.append(self.define("UMPIRE_DIR", spec["umpire"].prefix))
+
+ if spec.satisfies("+rocm"):
+ args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+ args.append(self.define("ENABLE_ROCM", True))
+ targets = spec.variants["amdgpu_target"].value
+ args.append(self.define("GPU_TARGETS", ";".join(str(x) for x in targets)))
+
if "darwin" in spec.architecture:
args.append(self.define("CMAKE_MACOSX_RPATH", "ON"))
@@ -140,6 +215,6 @@ class NaluWind(CMakePackage, CudaPackage):
@run_before("cmake")
def add_submodules(self):
- if self.run_tests or "+wind-utils" in self.spec:
+ if self.run_tests or self.spec.satisfies("+wind-utils"):
git = which("git")
git("submodule", "update", "--init", "--recursive")
diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py
index 0d3f3c9280..6d022f2b25 100644
--- a/var/spack/repos/builtin/packages/nalu/package.py
+++ b/var/spack/repos/builtin/packages/nalu/package.py
@@ -15,9 +15,17 @@ class Nalu(CMakePackage):
"""
homepage = "https://github.com/NaluCFD/Nalu"
+ url = "https://github.com/NaluCFD/Nalu/archive/refs/tags/v1.6.0.tar.gz"
git = "https://github.com/NaluCFD/Nalu.git"
version("master", branch="master")
+ version("1.6.0", sha256="2eafafe25ed44a7bc1429881f8f944b9794ca51b1e1b29c28a45b91520c7cf97")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("trilinos@master", when="@master")
+ depends_on("trilinos@14.0.0:14.2.0", when="@1.6.0")
# Options
variant(
@@ -31,16 +39,16 @@ class Nalu(CMakePackage):
# Required dependencies
depends_on("mpi")
- depends_on("yaml-cpp@0.5.3:", when="+shared")
- depends_on("yaml-cpp~shared@0.5.3:", when="~shared")
+ depends_on("yaml-cpp@0.5.3:0.6.2", when="+shared")
+ depends_on("yaml-cpp~shared@0.5.3:0.6.2", when="~shared")
# 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"
- "+mpi+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost"
- "~superlu-dist+superlu+hdf5+shards~hypre"
- "@master"
+ "+mpi+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost+gtest"
+ "~epetra~ml"
+ "~superlu-dist+superlu+hdf5+shards~hypre gotype=long"
)
depends_on("trilinos~shared", when="~shared")
# Optional dependencies
diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py
index edcc002659..47fcb3b03c 100644
--- a/var/spack/repos/builtin/packages/namd/package.py
+++ b/var/spack/repos/builtin/packages/namd/package.py
@@ -9,10 +9,11 @@ import sys
import llnl.util.tty as tty
+from spack.build_environment import optimization_flags
from spack.package import *
-class Namd(MakefilePackage, CudaPackage):
+class Namd(MakefilePackage, CudaPackage, ROCmPackage):
"""NAMD is a parallel molecular dynamics code designed for
high-performance simulation of large biomolecular systems."""
@@ -20,16 +21,38 @@ class Namd(MakefilePackage, CudaPackage):
url = "file://{0}/NAMD_2.12_Source.tar.gz".format(os.getcwd())
git = "https://charm.cs.illinois.edu/gerrit/namd.git"
manual_download = True
+ redistribute(source=False, binary=False)
maintainers("jcphill")
version("master", branch="master")
- version("3.0b3", sha256="20c32b6161f9c376536e3cb97c3bfe5367e1baaaace3c716ff79831fc2eb8199")
- version("2.15a2", sha256="8748cbaa93fc480f92fc263d9323e55bce6623fc693dbfd4a40f59b92669713e")
- version("2.15a1", branch="master", tag="release-2-15-alpha-1")
+ version("3.0", sha256="301c64f0f1db860f7336efdb26223ccf66b5ab42bfc9141df8d81ec1e20bf472")
+ version(
+ "3.0b7",
+ sha256="b18ff43b0f55ec59e137c62eba1812589dd88b2122c3a05ea652781667f438b4",
+ deprecated=True,
+ )
+ version(
+ "3.0b6",
+ sha256="8b5fb1dc8d5b5666c6a45d20ee7e8c9d1f5c186578e2cf148b68ba421d43b850",
+ deprecated=True,
+ )
+ version(
+ "3.0b3",
+ sha256="20c32b6161f9c376536e3cb97c3bfe5367e1baaaace3c716ff79831fc2eb8199",
+ deprecated=True,
+ )
+ version(
+ "2.15a2",
+ sha256="8748cbaa93fc480f92fc263d9323e55bce6623fc693dbfd4a40f59b92669713e",
+ deprecated=True,
+ )
+ version("2.15a1", branch="master", tag="release-2-15-alpha-1", deprecated=True)
# Same as above, but lets you use a local file instead of git
version(
- "2.15a1.manual", sha256="474006e98e32dddae59616b3b75f13a2bb149deaf7a0d617ce7fb9fd5a56a33a"
+ "2.15a1.manual",
+ sha256="474006e98e32dddae59616b3b75f13a2bb149deaf7a0d617ce7fb9fd5a56a33a",
+ deprecated=True,
)
version(
"2.14",
@@ -53,9 +76,24 @@ class Namd(MakefilePackage, CudaPackage):
description="Enables Tcl and/or python interface",
)
- variant("avxtiles", when="target=x86_64_v4:", default=False, description="Enable avxtiles")
+ variant(
+ "avxtiles",
+ when="target=x86_64_v4: @2.15:",
+ default=False,
+ description="Enable avxtiles supported with NAMD 2.15+",
+ )
variant("single_node_gpu", default=False, description="Single node GPU")
+ # Adding memopt variant to build memory-optimized mode that utilizes a compressed
+ # version of the molecular structure and also supports parallel I/O.
+ # Refer: https://www.ks.uiuc.edu/Research/namd/wiki/index.cgi?NamdMemoryReduction
+ variant(
+ "memopt",
+ when="@2.8:",
+ default=False,
+ description="Enable memory-optimized build supported with NAMD 2.8+",
+ )
+
# init_tcl_pointers() declaration and implementation are inconsistent
# "src/colvarproxy_namd.C", line 482: error: inherited member is not
# allowed
@@ -64,7 +102,7 @@ class Namd(MakefilePackage, CudaPackage):
# Handle change in python-config for python@3.8:
patch("namd-python38.patch", when="interface=python ^python@3.8:")
- depends_on("charmpp@7.0.0:", when="@3.0b3")
+ depends_on("charmpp@7.0.0:", when="@3.0:")
depends_on("charmpp@6.10.1:6", when="@2.14:2")
depends_on("charmpp@6.8.2", when="@2.13")
depends_on("charmpp@6.7.1", when="@2.12")
@@ -81,7 +119,13 @@ class Namd(MakefilePackage, CudaPackage):
depends_on("tcl", when="interface=python")
depends_on("python", when="interface=python")
- conflicts("+avxtiles", when="@:2.14,3:", msg="AVXTiles algorithm requires NAMD 2.15")
+ conflicts("+rocm", when="+cuda", msg="NAMD supports only one GPU backend at a time")
+ conflicts("+single_node_gpu", when="~cuda~rocm")
+ conflicts(
+ "+memopt",
+ when="+single_node_gpu",
+ msg="memopt mode is not compatible with GPU-resident builds",
+ )
# https://www.ks.uiuc.edu/Research/namd/2.12/features.html
# https://www.ks.uiuc.edu/Research/namd/2.13/features.html
@@ -132,7 +176,7 @@ class Namd(MakefilePackage, CudaPackage):
# this options are take from the default provided
# configuration files
# https://github.com/UIUC-PPL/charm/pull/2778
- archopt = spec.target.optimization_flags(spec.compiler.name, spec.compiler.version)
+ archopt = optimization_flags(self.compiler, spec.target)
if self.spec.satisfies("^charmpp@:6.10.1"):
optims_opts = {
@@ -272,6 +316,17 @@ class Namd(MakefilePackage, CudaPackage):
if "+single_node_gpu" in spec:
opts.extend(["--with-single-node-cuda"])
+ if "+rocm" in spec:
+ self._copy_arch_file("hip")
+ opts.append("--with-hip")
+ opts.extend(["--rocm-prefix", os.environ["ROCM_PATH"]])
+
+ if "+single_node_gpu" in spec:
+ opts.extend(["--with-single-node-hip"])
+
+ if spec.satisfies("+memopt"):
+ opts.append("--with-memopt")
+
config = Executable("./config")
config(self.build_directory, *opts)
@@ -288,6 +343,13 @@ class Namd(MakefilePackage, CudaPackage):
join_path(self.build_directory, "Make.config"),
)
+ @when("@3.0b3")
+ def build(self, spec, prefix):
+ # Disable parallel build
+ # https://github.com/spack/spack/pull/43215
+ with working_dir(self.build_directory):
+ make(parallel=False)
+
def install(self, spec, prefix):
with working_dir(self.build_directory):
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/nano/package.py b/var/spack/repos/builtin/packages/nano/package.py
index 3fd46110cb..1f0767e217 100644
--- a/var/spack/repos/builtin/packages/nano/package.py
+++ b/var/spack/repos/builtin/packages/nano/package.py
@@ -14,11 +14,16 @@ class Nano(AutotoolsPackage):
list_url = "https://www.nano-editor.org/dist/"
list_depth = 1
- license("GPL-3.0-or-later")
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+ # 8.x
+ version("8.2", sha256="d5ad07dd862facae03051c54c6535e54c7ed7407318783fcad1ad2d7076fffeb")
+ version("8.1", sha256="93b3e3e9155ae389fe9ccf9cb7ab380eac29602835ba3077b22f64d0f0cbe8cb")
+ version("8.0", sha256="c17f43fc0e37336b33ee50a209c701d5beb808adc2d9f089ca831b40539c9ac4")
# 7.x
version("7.2", sha256="86f3442768bd2873cec693f83cdf80b4b444ad3cc14760b74361474fc87a4526")
# 6.x
+ version("6.4", sha256="4199ae8ca78a7796de56de1a41b821dc47912c0307e9816b56cc317df34661c0")
version("6.3", sha256="eb532da4985672730b500f685dbaab885a466d08fbbf7415832b95805e6f8687")
version("6.2", sha256="2bca1804bead6aaf4ad791f756e4749bb55ed860eec105a97fba864bc6a77cb3")
version("6.1", sha256="3d57ec893fbfded12665b7f0d563d74431fc43abeaccacedea23b66af704db40")
@@ -80,6 +85,11 @@ class Nano(AutotoolsPackage):
version("2.6.2", sha256="22f79cc635458e0c0d110d211576f1edc03b112a62d73b914826a46547a6ac27")
version("2.6.1", sha256="45721fa6d6128068895ad71a6967ff7398d11b064b3f888e5073c97a2b6e9a81")
+ depends_on("c", type="build")
+
+ depends_on("pkgconfig", type="build")
+ depends_on("gettext@0.18.3:")
+ depends_on("gettext@0.20:", when="@8.1:")
depends_on("ncurses")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/nanoflann/package.py b/var/spack/repos/builtin/packages/nanoflann/package.py
index 10e1d7aa16..a307c71c6d 100644
--- a/var/spack/repos/builtin/packages/nanoflann/package.py
+++ b/var/spack/repos/builtin/packages/nanoflann/package.py
@@ -14,9 +14,13 @@ class Nanoflann(CMakePackage):
license("BSD-2-Clause")
+ version("1.5.5", sha256="fd28045eabaf0e7f12236092f80905a1750e0e6b580bb40eadd64dc4f75d641d")
+ version("1.5.4", sha256="a7f64d0bdff42614c561e52680b16de46c0edac9719f21f935c5e1f8b0654afc")
version("1.4.3", sha256="cbcecf22bec528a8673a113ee9b0e134f91f1f96be57e913fa1f74e98e4449fa")
version("1.2.3", sha256="5ef4dfb23872379fe9eb306aabd19c9df4cae852b72a923af01aea5e8d7a59c3")
+ depends_on("cxx", type="build") # generated
+
def patch(self):
filter_file("-mtune=native", "", "CMakeLists.txt")
diff --git a/var/spack/repos/builtin/packages/nanomsg/package.py b/var/spack/repos/builtin/packages/nanomsg/package.py
index c28a6f69f8..895e0d4d71 100644
--- a/var/spack/repos/builtin/packages/nanomsg/package.py
+++ b/var/spack/repos/builtin/packages/nanomsg/package.py
@@ -15,6 +15,9 @@ class Nanomsg(CMakePackage):
license("MIT")
+ version("1.2.1", sha256="2e6c20dbfcd4882e133c819ac77501e9b323cb17ae5b3376702c4446261fbc23")
version("1.2", sha256="6ef7282e833df6a364f3617692ef21e59d5c4878acea4f2d7d36e21c8858de67")
version("1.1.5", sha256="218b31ae1534ab897cb5c419973603de9ca1a5f54df2e724ab4a188eb416df5a")
version("1.0.0", sha256="24afdeb71b2e362e8a003a7ecc906e1b84fd9f56ce15ec567481d1bb33132cc7")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/nanopb/package.py b/var/spack/repos/builtin/packages/nanopb/package.py
index 83c6daa425..0f8c0ff587 100644
--- a/var/spack/repos/builtin/packages/nanopb/package.py
+++ b/var/spack/repos/builtin/packages/nanopb/package.py
@@ -17,5 +17,7 @@ class Nanopb(CMakePackage):
version("0.3.9.1", sha256="b22d1f86d4adb2aa0436a277c4a59a5adfc467cafeb9bf405c27ef136599bbb3")
+ depends_on("c", type="build") # generated
+
depends_on("protobuf", type=("build"))
depends_on("py-protobuf", type=("build"))
diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py
index d3f2fad668..4afa6ebe1c 100644
--- a/var/spack/repos/builtin/packages/nasm/package.py
+++ b/var/spack/repos/builtin/packages/nasm/package.py
@@ -5,6 +5,7 @@
import glob
import os
+import spack.build_systems.generic
from spack.package import *
@@ -22,11 +23,14 @@ class Nasm(AutotoolsPackage, Package):
license("BSD-2-Clause")
+ version("2.16.03", sha256="5bc940dd8a4245686976a8f7e96ba9340a0915f2d5b88356874890e207bdb581")
version("2.15.05", sha256="9182a118244b058651c576baa9d0366ee05983c4d4ae1d9ddd3236a9f2304997")
version("2.14.02", sha256="b34bae344a3f2ed93b2ca7bf25f1ed3fb12da89eeda6096e3551fd66adeae9fc")
version("2.13.03", sha256="23e1b679d64024863e2991e5c166e19309f0fe58a9765622b35bd31be5b2cc99")
version("2.11.06", sha256="3a72476f3cb45294d303f4d34f20961b15323ac24e84eb41bc130714979123bb")
+ depends_on("c", type="build") # generated
+
# Fix compilation with GCC 8
# https://bugzilla.nasm.us/show_bug.cgi?id=3392461
patch(
@@ -83,3 +87,8 @@ class GenericBuilder(spack.build_systems.generic.GenericBuilder):
for file in rdoff:
install(file, self.prefix.rdoff)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ # This is required as NASM installs its binaries into an
+ # atypical location (i.e. flat in the prefix)
+ env.prepend_path("PATH", self.pkg.prefix)
diff --git a/var/spack/repos/builtin/packages/nauty/package.py b/var/spack/repos/builtin/packages/nauty/package.py
index 056eff96a1..fd9371bcb3 100644
--- a/var/spack/repos/builtin/packages/nauty/package.py
+++ b/var/spack/repos/builtin/packages/nauty/package.py
@@ -20,6 +20,8 @@ class Nauty(AutotoolsPackage):
version("2.6r7", sha256="97b5648de17645895cbd56a9a0b3e23cf01f5332c476d013ea459f1a0363cdc6")
+ depends_on("c", type="build") # generated
+
# Debian/ Fedora patches for @2.6r7:
urls_for_patches = {
"@2.6r7": [
diff --git a/var/spack/repos/builtin/packages/nb/package.py b/var/spack/repos/builtin/packages/nb/package.py
new file mode 100644
index 0000000000..528d7d911f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nb/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Nb(Package):
+ """
+ nb is a command line and local web note‑taking, bookmarking, archiving,
+ and knowledge base application.
+ """
+
+ homepage = "https://xwmx.github.io/nb/"
+ url = "https://github.com/xwmx/nb/archive/refs/tags/7.12.1.tar.gz"
+
+ maintainers("taliaferro")
+
+ license("AGPL-3.0", checked_by="taliaferro")
+
+ version("7.12.1", sha256="c9b30448751dd726469ed3fde29e618c5747eb4a16ceaaf86d773989a6cf13f3")
+
+ depends_on("git")
+ depends_on("bash")
+
+ def patch(self):
+ filter_file(
+ r"^#!\s?.*bash",
+ "#!{}".format(self.spec["bash"].command.path),
+ "nb",
+ "bin/bookmark",
+ "bin/notes",
+ "etc/nb-completion.bash",
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix + "/share/bash-completion/completions")
+ install("nb", join_path(prefix, "bin/nb"))
+ install("bin/notes", join_path(prefix, "bin/notes"))
+ install("bin/bookmark", join_path(prefix, "bin/bookmark"))
+ install(
+ "etc/nb-completion.bash", join_path(prefix, "share/bash-completion/completions/nb")
+ )
diff --git a/var/spack/repos/builtin/packages/nbdkit/package.py b/var/spack/repos/builtin/packages/nbdkit/package.py
index 0f748b9c9e..8c2ad6041a 100644
--- a/var/spack/repos/builtin/packages/nbdkit/package.py
+++ b/var/spack/repos/builtin/packages/nbdkit/package.py
@@ -22,6 +22,9 @@ class Nbdkit(AutotoolsPackage):
version("1.23.4", sha256="6581e6cc6dbcb42451abad096efd4e1016b3a0f0d1c7a1724d0a76259ab96429")
version("1.23.3", sha256="78f14b00c771733047abcf882e715f62bb19820a6571cae0ccb5f965054697c6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ncbi-magicblast/package.py b/var/spack/repos/builtin/packages/ncbi-magicblast/package.py
index 1fb7379af0..15c3c23cfb 100644
--- a/var/spack/repos/builtin/packages/ncbi-magicblast/package.py
+++ b/var/spack/repos/builtin/packages/ncbi-magicblast/package.py
@@ -16,6 +16,9 @@ class NcbiMagicblast(AutotoolsPackage):
version("1.5.0", sha256="b261914d9f7ffc0e655079ceba3e348ba11df1a1f73c4e47a4b1ca154754985c")
version("1.3.0", sha256="47b9b65d595b5cb0c4fef22bc7f7c038fb8d4a0accdbe560d7232820575aff67")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cpio", type="build")
depends_on("lmdb")
diff --git a/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py b/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py
index 228c5fc6f6..4700e5e412 100644
--- a/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py
+++ b/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py
@@ -18,6 +18,9 @@ class NcbiRmblastn(AutotoolsPackage):
version("2.11.0", sha256="d88e1858ae7ce553545a795a2120e657a799a6d334f2a07ef0330cc3e74e1954")
version("2.9.0", sha256="a390cc2d7a09422759fc178db84de9def822cbe485916bbb2ec0d215dacdc257")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("snehring")
# There is a corresponding gzipped patch file associated with each version.
diff --git a/var/spack/repos/builtin/packages/ncbi-toolkit/package.py b/var/spack/repos/builtin/packages/ncbi-toolkit/package.py
index 2576cc2caf..c058ea4e53 100644
--- a/var/spack/repos/builtin/packages/ncbi-toolkit/package.py
+++ b/var/spack/repos/builtin/packages/ncbi-toolkit/package.py
@@ -37,6 +37,9 @@ class NcbiToolkit(AutotoolsPackage):
url="ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/ARCHIVE/2018/Apr_2_2018/ncbi_cxx--21_0_0.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("debug", default=False, description="Build debug versions of libs and apps")
depends_on("boost@1.35.0:+test+log")
diff --git a/var/spack/repos/builtin/packages/ncbi-vdb/package.py b/var/spack/repos/builtin/packages/ncbi-vdb/package.py
index 88b213c72a..32257c5c2e 100644
--- a/var/spack/repos/builtin/packages/ncbi-vdb/package.py
+++ b/var/spack/repos/builtin/packages/ncbi-vdb/package.py
@@ -17,6 +17,9 @@ class NcbiVdb(CMakePackage):
version("3.0.2", tag="3.0.2", commit="c4aa19632714c2f04af07505721fb16c71bba3d5")
version("3.0.0", tag="3.0.0", commit="2222d7727122d0cbad93344dd6a9044abff34280")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openjdk")
depends_on("flex@2.6:")
depends_on("libxml2")
diff --git a/var/spack/repos/builtin/packages/nccl-fastsocket/package.py b/var/spack/repos/builtin/packages/nccl-fastsocket/package.py
index ab69fb4b4b..12601c61f4 100644
--- a/var/spack/repos/builtin/packages/nccl-fastsocket/package.py
+++ b/var/spack/repos/builtin/packages/nccl-fastsocket/package.py
@@ -16,6 +16,8 @@ class NcclFastsocket(Package):
version("master", preferred=True)
+ depends_on("cxx", type="build") # generated
+
depends_on("bazel", type="build")
depends_on("nccl", type=["build", "run"])
diff --git a/var/spack/repos/builtin/packages/nccl-tests/package.py b/var/spack/repos/builtin/packages/nccl-tests/package.py
index 4ec1d9ffdc..0bd2104013 100644
--- a/var/spack/repos/builtin/packages/nccl-tests/package.py
+++ b/var/spack/repos/builtin/packages/nccl-tests/package.py
@@ -17,6 +17,8 @@ class NcclTests(MakefilePackage, CudaPackage):
version("2.13.6", sha256="52b472a58a4918d3221a9b8c4bd9335382643d7e241983918b64692d685cc3d1")
version("2.0.0", sha256="731fc3b7c37de59cfe880bf198349ac185639ef23570749ea6aef334c850c49c")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="with MPI support")
variant("cuda", default=True, description="with CUDA support, must be true")
conflicts("~cuda", msg="nccl-tests require cuda")
diff --git a/var/spack/repos/builtin/packages/nccl/package.py b/var/spack/repos/builtin/packages/nccl/package.py
index 1ddf803f88..d12a5fa4f5 100644
--- a/var/spack/repos/builtin/packages/nccl/package.py
+++ b/var/spack/repos/builtin/packages/nccl/package.py
@@ -17,6 +17,10 @@ class Nccl(MakefilePackage, CudaPackage):
maintainers("adamjstewart")
libraries = ["libnccl.so"]
+ version("2.23.4-1", sha256="6b946b70a9d2d01871842cbd15ec56488d358abe9a0f3767e372fddc3e241ba7")
+ version("2.22.3-1", sha256="45151629a9494460e73375281e8b0fe379141528879301899ece9b776faca024")
+ version("2.21.5-1", sha256="1923596984d85e310b5b6c52b2c72a1b93da57218f2bc5a5c7ac3d59297a3303")
+ version("2.20.3-1", sha256="19456bd63ca7d23a8319cbbdbaaf6c25949dd51161a9f8809f6b7453282983dd")
version("2.19.3-1", sha256="1c5474553afedb88e878c772f13d6f90b9226b3f2971dfa6f873adb9443100c2")
version("2.18.5-1", sha256="16ac98f3e926c024ce48e10ab220e19ce734adc48c423cfd55ad6f509bd1179f")
version("2.18.3-1", sha256="6477d83c9edbb34a0ebce6d751a1b32962bc6415d75d04972b676c6894ceaef9")
@@ -50,6 +54,9 @@ class Nccl(MakefilePackage, CudaPackage):
version("2.3.7-1", sha256="e6eff80d9d2db13c61f8452e1400ca2f098d2dfe42857cb23413ce081c5b9e9b")
version("2.3.5-5", sha256="bac9950b4d3980c25baa8e3e4541d2dfb4d21edf32ad3b89022d04920357142f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with CUDA")
depends_on("rdma-core")
diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py
index 7204eaff96..2401623cc1 100644
--- a/var/spack/repos/builtin/packages/nccmp/package.py
+++ b/var/spack/repos/builtin/packages/nccmp/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Nccmp(CMakePackage):
"""Compare NetCDF Files"""
- homepage = "http://nccmp.sourceforge.net/"
+ homepage = "https://nccmp.sourceforge.net/"
url = "https://gitlab.com/remikz/nccmp/-/archive/1.9.0.1/nccmp-1.9.0.1.tar.gz"
maintainers("ulmononian", "climbfuji")
@@ -21,6 +21,9 @@ class Nccmp(CMakePackage):
version("1.8.9.0", sha256="da5d2b4dcd52aec96e7d96ba4d0e97efebbd40fe9e640535e5ee3d5cd082ae50")
version("1.8.2.0", sha256="7f5dad4e8670568a71f79d2bcebb08d95b875506d3d5faefafe1a8b3afa14f18")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.12:", type="build")
depends_on("netcdf-c", type=("build", "run"))
depends_on("mpi", when="^netcdf-c+mpi~shared")
diff --git a/var/spack/repos/builtin/packages/ncdu/package.py b/var/spack/repos/builtin/packages/ncdu/package.py
index 392aaba487..1b57d8ef95 100644
--- a/var/spack/repos/builtin/packages/ncdu/package.py
+++ b/var/spack/repos/builtin/packages/ncdu/package.py
@@ -19,6 +19,7 @@ class Ncdu(Package):
license("MIT")
+ version("1.19", sha256="30363019180cde0752c7fb006c12e154920412f4e1b5dc3090654698496bb17d")
version("1.18.1", sha256="7c0fa1eb29d85aaed4ba174164bdbb8f011b5c390d017c57d668fc7231332405")
version("1.17", sha256="810745a8ed1ab3788c87d3aea4cc1a14edf6ee226f764bcc383e024ba56adbf1")
version("1.16", sha256="2b915752a183fae014b5e5b1f0a135b4b408de7488c716e325217c2513980fd4")
@@ -32,6 +33,8 @@ class Ncdu(Package):
version("1.8", sha256="42aaf0418c05e725b39b220166a9c604a9c54c0fbf7692c9c119b36d0ed5d099")
version("1.7", sha256="70dfe10b4c0843050ee17ab27b7ad4d65714682f117079b85d779f83431fb333")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/ncio/package.py b/var/spack/repos/builtin/packages/ncio/package.py
index 80d32a5014..665742c633 100644
--- a/var/spack/repos/builtin/packages/ncio/package.py
+++ b/var/spack/repos/builtin/packages/ncio/package.py
@@ -24,6 +24,8 @@ class Ncio(CMakePackage):
version("1.1.0", sha256="9de05cf3b8b1291010197737666cede3d621605806379b528d2146c4f02d08f6")
version("1.0.0", sha256="2e2630b26513bf7b0665619c6c3475fe171a9d8b930e9242f5546ddf54749bd4")
+ depends_on("fortran", type="build")
+
depends_on("mpi")
depends_on("netcdf-fortran")
@@ -32,3 +34,7 @@ class Ncio(CMakePackage):
env.set("NCIO_LIB", lib[0])
env.set("NCIO_INC", join_path(self.prefix, "include"))
env.set("NCIO_LIBDIR", lib[0])
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py
index 143cd32359..e3949f4d33 100644
--- a/var/spack/repos/builtin/packages/ncl/package.py
+++ b/var/spack/repos/builtin/packages/ncl/package.py
@@ -28,6 +28,9 @@ class Ncl(Package):
version("6.5.0", sha256="133446f3302eddf237db56bf349e1ebf228240a7320699acc339a3d7ee414591")
version("6.4.0", sha256="0962ae1a1d716b182b3b27069b4afe66bf436c64c312ddfcf5f34d4ec60153c8")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("for_aarch64.patch", when="target=aarch64:")
# Use Spack config file, which we generate during the installation:
@@ -58,11 +61,17 @@ class Ncl(Package):
# http://www.ncl.ucar.edu/Download/build_from_src.shtml
variant("hdf4", default=False, description="Enable HDF4 support.")
+ variant("hdf-eos2", default=False, when="+hdf4", description="Enable HDF-EOS2 support.")
+ variant("hdf-eos5", default=False, description="Enable HDF-EOS5 support.")
variant("gdal", default=False, description="Enable GDAL support.")
variant("triangle", default=True, description="Enable Triangle support.")
variant("udunits2", default=True, description="Enable UDUNITS-2 support.")
variant("openmp", default=True, description="Enable OpenMP support.")
variant("grib", default=True, description="Enable GRIB support.")
+ variant("eemd", default=False, description="Enable EEMD support.")
+
+ # The following variant is typically set for little-endian targets
+ variant("byteswapped", default=True, description="Use byteswapped mode for binary data.")
# Non-optional dependencies according to the manual:
depends_on("jpeg")
@@ -107,9 +116,12 @@ class Ncl(Package):
# Some of the optional dependencies according to the manual:
depends_on("hdf", when="+hdf4")
+ depends_on("hdf-eos2", when="+hdf-eos2")
+ depends_on("hdf-eos5", when="+hdf-eos5")
depends_on("gdal@:2.4", when="+gdal")
depends_on("udunits", when="+udunits2")
- depends_on("jasper@2.0.32", when="+grib")
+ depends_on("jasper@:2", when="+grib")
+ depends_on("gsl", when="+eemd")
# We need src files of triangle to appear in ncl's src tree if we want
# triangle's features.
@@ -127,18 +139,26 @@ class Ncl(Package):
# Make configure scripts use Spack's tcsh
files = ["Configure"] + glob.glob("config/*")
- filter_file("^#!/bin/csh -f", "#!/usr/bin/env csh", *files)
-
- @run_before("install")
- def filter_sbang(self):
# Filter sbang before install so Spack's sbang hook can fix it up
- files = glob.glob("ncarg2d/src/bin/scripts/*")
+ files += glob.glob("ncarg2d/src/bin/scripts/*")
files += glob.glob("ncarview/src/bin/scripts/*")
files += glob.glob("ni/src/scripts/*")
csh = join_path(self.spec["tcsh"].prefix.bin, "csh")
- filter_file("^#!/bin/csh", "#!{0}".format(csh), *files)
+ filter_file("^#!/bin/csh.*", "#!{0}".format(csh), *files)
+
+ if self.spec.satisfies("+grib"):
+ # Newer versions of libjasper do not provide the inmem property
+ if self.spec.satisfies("^jasper@2"):
+ filter_file("image.inmem_=1;", "", "external/g2clib-1.6.0/enc_jpeg2000.c")
+
+ filter_file("SUBDIRS = ", "SUBDIRS = g2clib-1.6.0 ", "external/yMakefile")
+ filter_file(
+ "INC=.*",
+ "INC=%s" % self.spec["jasper"].prefix.include,
+ "external/g2clib-1.6.0/makefile",
+ )
def install(self, spec, prefix):
if (self.compiler.fc is None) or (self.compiler.cc is None):
@@ -154,14 +174,45 @@ class Ncl(Package):
if "ncl" not in exes:
raise RuntimeError("Installation failed (ncl executable was not created)")
+ # NCL provides compiler wrappers, but they make assumptions that Spack build
+ # will not conform to. This section edits the wrappers to fix them.
+ c_wrappers = ["ncargcc", "nhlcc"]
+ f77_wrappers = ["ncargf77", "nhlf77"]
+ f90_wrappers = ["ncargf90", "nhlf90"]
+ lib_paths = []
+
+ for dep in spec.dependencies(deptype="link"):
+ lib_paths.append(spec[dep.name].prefix.lib)
+
+ with working_dir(spec.prefix.bin):
+ # Change NCARG compiler wrappers to use real compiler, not Spack wrappers
+ for wrapper in c_wrappers:
+ filter_file(spack_cc, self.compiler.cc, wrapper)
+ for wrapper in f77_wrappers:
+ filter_file(spack_f77, self.compiler.f77, wrapper)
+ for wrapper in f90_wrappers:
+ filter_file(spack_fc, self.compiler.fc, wrapper)
+
+ # Make library reference and corrections to wrappers
+ for wrapper in c_wrappers + f77_wrappers + f90_wrappers:
+ filter_file(
+ "^(set syslibdir[ ]*=).*",
+ r'\1 "{}"'.format(" ".join(["-L{}".format(p) for p in lib_paths])),
+ wrapper,
+ )
+ filter_file("^(set cairolib[ ]*=).*", r'\1 "-lcairo -lfreetype"', wrapper)
+
def setup_run_environment(self, env):
env.set("NCARG_ROOT", self.spec.prefix)
- env.set("ESMFBINDIR", self.spec["esmf"].prefix.bin)
+
+ # We cannot rely on Spack knowledge of esmf when NCL is an external
+ if not self.spec.external:
+ env.set("ESMFBINDIR", self.spec["esmf"].prefix.bin)
def prepare_site_config(self):
- fc_flags = []
- cc_flags = []
- c2f_flags = []
+ fc_flags = [self.compiler.fc_pic_flag]
+ cc_flags = [self.compiler.cc_pic_flag]
+ c2f_flags = [self.compiler.cc_pic_flag]
if "+openmp" in self.spec:
fc_flags.append(self.compiler.openmp_flag)
@@ -196,6 +247,11 @@ class Ncl(Package):
f.writelines(
[
"#define HdfDefines\n",
+ (
+ "#define StdDefines -DByteSwapped\n#define ByteSwapped\n"
+ if self.spec.satisfies("+byteswapped")
+ else ""
+ ),
"#define CppCommand '/usr/bin/env cpp -traditional'\n",
"#define CCompiler {0}\n".format(spack_cc),
"#define FCompiler {0}\n".format(spack_fc),
@@ -280,17 +336,17 @@ class Ncl(Package):
# Build GDAL support (optional) into NCL?
"y\n" if "+gdal" in self.spec else "n\n",
# Build EEMD support (optional) into NCL?
- "n\n",
+ "y\n" if "+eemd" in self.spec else "n\n",
# Build Udunits-2 support (optional) into NCL?
"y\n" if "+udunits2" in self.spec else "n\n",
# Build Vis5d+ support (optional) into NCL?
"n\n",
# Build HDF-EOS2 support (optional) into NCL?
- "n\n",
+ "y\n" if "+hdf-eos2" in self.spec else "n\n",
# Build HDF5 support (optional) into NCL?
"y\n",
# Build HDF-EOS5 support (optional) into NCL?
- "n\n",
+ "y\n" if "+hdf-eos5" in self.spec else "n\n",
# Build GRIB2 support (optional) into NCL?
"y\n" if self.spec.satisfies("+grib") else "n\n",
# Enter local library search path(s) :
@@ -300,7 +356,7 @@ class Ncl(Package):
+ " "
+ self.spec["bzip2"].prefix.lib
+ (
- (" " + self.spec["jasper"].prefix.lib64)
+ (" " + self.spec["jasper"].libs.directories[0])
if self.spec.satisfies("+grib")
else ""
)
@@ -324,13 +380,18 @@ class Ncl(Package):
with open(config_answers_filename, "r") as f:
config_script(input=f)
- if self.spec.satisfies("^hdf+external-xdr") and not self.spec["hdf"].satisfies("^libc"):
+ if self.spec.satisfies("^hdf+external-xdr ^libtirpc"):
hdf4 = self.spec["hdf"]
+ replace_str = hdf4["rpc"].libs.link_flags
+
+ if self.spec.satisfies("^hdf+szip"):
+ search_str = "#define HDFlib.*"
+ else:
+ search_str = "#define IncSearch.*"
+ replace_str = "\n#define HDFlib {} {}".format(hdf4.libs.link_flags, replace_str)
filter_file(
- "(#define HDFlib.*)",
- r"\1 {}".format(hdf4["rpc"].libs.link_flags),
- "config/Site.local",
+ "({})".format(search_str), r"\1 " + "{}".format(replace_str), "config/Site.local"
)
def prepare_src_tree(self):
@@ -348,13 +409,3 @@ class Ncl(Package):
os.remove(filename)
except OSError as e:
raise InstallError("Failed to delete file %s: %s" % (e.filename, e.strerror))
-
- @when("+grib")
- def patch(self):
- filter_file("image.inmem_=1;", "", "external/g2clib-1.6.0/enc_jpeg2000.c")
- filter_file("SUBDIRS = ", "SUBDIRS = g2clib-1.6.0 ", "external/yMakefile")
- filter_file(
- "INC=.*",
- "INC=%s" % self.spec["jasper"].prefix.include,
- "external/g2clib-1.6.0/makefile",
- )
diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py
index 1883a607d5..c00f4aac76 100644
--- a/var/spack/repos/builtin/packages/nco/package.py
+++ b/var/spack/repos/builtin/packages/nco/package.py
@@ -10,11 +10,15 @@ class Nco(AutotoolsPackage):
"""The NCO toolkit manipulates and analyzes data stored in
netCDF-accessible formats"""
- homepage = "http://nco.sourceforge.net/"
+ homepage = "https://nco.sourceforge.net/"
url = "https://github.com/nco/nco/archive/5.0.1.tar.gz"
license("BSD-3-Clause")
+ version("5.2.4", sha256="44efa9151825487fa0562fa5c6d68837624059a8e2da9d15c83ceb4d498f7902")
+ version("5.1.9", sha256="9cd90345c1e3860a690b53fd6c08b721d631a646d169431927884c99841c34e9")
+ version("5.1.8", sha256="f22c63a3cbe1947fbf06160a6ed7b6d1934aa242fbe3feeb8d1964eef266b7d5")
+ version("5.1.7", sha256="2b068558a605e30a465870166747e1d37726849814a5cfe41a000764b30e2ba1")
version("5.1.6", sha256="6b217156cb14f670c80d5de5c5b88905cdb281f6e239e83397f14eaf3d0b390b")
version("5.1.5", sha256="6a35c2d45744b427a424896d32066e483c0a49a46dba83ba90f2cc5ed3dca869")
version("5.1.4", sha256="4b1ec67b795b985990620be7b7422ecae6da77f5ec93e4407b799f0220dffc88")
@@ -37,6 +41,9 @@ class Nco(AutotoolsPackage):
version("4.6.1", sha256="7433fe5901f48eb5170f24c6d53b484161e1c63884d9350600070573baf8b8b0")
version("4.5.5", sha256="bc6f5b976fdfbdec51f2ebefa158fa54672442c2fd5f042ba884f9f32c2ad666")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# https://github.com/nco/nco/issues/43
patch("NUL-0-NULL.patch", when="@:4.6.7")
@@ -57,7 +64,7 @@ class Nco(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- return ["--{0}-doc".format("enable" if "+doc" in spec else "disable")]
+ return [f"--{'enable' if '+doc' in spec else 'disable'}-doc"]
def setup_build_environment(self, env):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/ncompress/package.py b/var/spack/repos/builtin/packages/ncompress/package.py
index 3d5bc1a347..5dbcbddded 100644
--- a/var/spack/repos/builtin/packages/ncompress/package.py
+++ b/var/spack/repos/builtin/packages/ncompress/package.py
@@ -14,8 +14,11 @@ class Ncompress(MakefilePackage):
license("Unlicense")
+ version("5.0", sha256="96ec931d06ab827fccad377839bfb91955274568392ddecf809e443443aead46")
version("4.2.4.6", sha256="112acfc76382e7b631d6cfc8e6ff9c8fd5b3677e5d49d3d9f1657bc15ad13d13")
version("4.2.4.5", sha256="2b532f02569e5557e1ed9cbe95c8db0e347a029517d3a50b906119808a996433")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
- make("install", "PREFIX={0}".format(prefix))
+ make("install", f"PREFIX={prefix}")
diff --git a/var/spack/repos/builtin/packages/ncurses/0001-Fix-errors-in-type-conversion.patch b/var/spack/repos/builtin/packages/ncurses/0001-Fix-errors-in-type-conversion.patch
new file mode 100644
index 0000000000..18ecf3051b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncurses/0001-Fix-errors-in-type-conversion.patch
@@ -0,0 +1,153 @@
+From 6e12cb73e23e8e9488c6db1c4710bb4b3d2b48c3 Mon Sep 17 00:00:00 2001
+From: Adam Jiang <jiang.adam@gmail.com>
+Date: Fri, 1 Aug 2014 19:58:40 +0900
+Subject: [PATCH 1/2] Fix errors in type conversion
+
+Basically, converting to 'void*' is not a good idea. However, if that
+conversion is unavoidable, it should be done in a proper way. 'const_cast'
+itself could not convert type 'T*' to 'void *', this patch adds
+'reintepret_cast' to do it correctly.
+
+At the same time, function that returns on 'const' member like 'void*' should
+not be declared as 'const'.
+---
+ c++/cursesf.h | 12 +++++++-----
+ c++/cursesm.h | 10 +++++-----
+ c++/cursesp.h | 9 +++++----
+ 3 files changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/c++/cursesf.h b/c++/cursesf.h
+index 70a30c3..23b3022 100644
+--- a/c++/cursesf.h
++++ b/c++/cursesf.h
+@@ -673,7 +673,8 @@ protected:
+ const T* p_UserData = STATIC_CAST(T*)(0))
+ : NCursesForm(nlines,ncols,begin_y,begin_x) {
+ if (form)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>
++ (p_UserData)));
+ }
+
+ public:
+@@ -683,7 +684,7 @@ public:
+ bool autoDelete_Fields=FALSE)
+ : NCursesForm (Fields, with_frame, autoDelete_Fields) {
+ if (form)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ };
+
+ NCursesUserForm (NCursesFormField Fields[],
+@@ -697,19 +698,20 @@ public:
+ : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
+ with_frame, autoDelete_Fields) {
+ if (form)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>
++ (p_UserData)));
+ };
+
+ virtual ~NCursesUserForm() {
+ };
+
+- inline T* UserData (void) const {
++ inline T* UserData (void) {
+ return reinterpret_cast<T*>(get_user ());
+ };
+
+ inline virtual void setUserData (const T* p_UserData) {
+ if (form)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ }
+
+ };
+diff --git a/c++/cursesm.h b/c++/cursesm.h
+index d9c2273..545ed49 100644
+--- a/c++/cursesm.h
++++ b/c++/cursesm.h
+@@ -631,7 +631,7 @@ protected:
+ const T* p_UserData = STATIC_CAST(T*)(0))
+ : NCursesMenu(nlines,ncols,begin_y,begin_x) {
+ if (menu)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ }
+
+ public:
+@@ -641,7 +641,7 @@ public:
+ bool autoDelete_Items=FALSE)
+ : NCursesMenu (Items, with_frame, autoDelete_Items) {
+ if (menu)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ };
+
+ NCursesUserMenu (NCursesMenuItem Items[],
+@@ -653,19 +653,19 @@ public:
+ bool with_frame=FALSE)
+ : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
+ if (menu)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ };
+
+ virtual ~NCursesUserMenu() {
+ };
+
+- inline T* UserData (void) const {
++ inline T* UserData (void) {
+ return reinterpret_cast<T*>(get_user ());
+ };
+
+ inline virtual void setUserData (const T* p_UserData) {
+ if (menu)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ }
+ };
+
+diff --git a/c++/cursesp.h b/c++/cursesp.h
+index 9b63d6d..661e4a9 100644
+--- a/c++/cursesp.h
++++ b/c++/cursesp.h
+@@ -236,7 +236,8 @@ public:
+ : NCursesPanel (nlines, ncols, begin_y, begin_x)
+ {
+ if (p)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>
++ (p_UserData)));
+ };
+ // This creates an user panel of the requested size with associated
+ // user data pointed to by p_UserData.
+@@ -244,14 +245,14 @@ public:
+ NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
+ {
+ if (p)
+- set_user(const_cast<void *>(p_UserData));
++ set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ };
+ // This creates an user panel associated with the ::stdscr and user data
+ // pointed to by p_UserData.
+
+ virtual ~NCursesUserPanel() {};
+
+- T* UserData (void) const
++ T* UserData (void)
+ {
+ return reinterpret_cast<T*>(get_user ());
+ };
+@@ -260,7 +261,7 @@ public:
+ virtual void setUserData (const T* p_UserData)
+ {
+ if (p)
+- set_user (const_cast<void *>(p_UserData));
++ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
+ }
+ // Associate the user panel with the user data pointed to by p_UserData.
+ };
+--
+1.8.5.2 (Apple Git-48)
+
diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py
index b7d3ff3d44..6f3b424ae3 100644
--- a/var/spack/repos/builtin/packages/ncurses/package.py
+++ b/var/spack/repos/builtin/packages/ncurses/package.py
@@ -24,6 +24,7 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
license("X11")
+ version("6.5", sha256="136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6")
version("6.4", sha256="6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159")
version("6.3", sha256="97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059")
version("6.2", sha256="30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d")
@@ -31,6 +32,9 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
version("6.0", sha256="f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260")
version("5.9", sha256="9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("symlinks", default=False, description="Enables symlinks. Needed on AFS filesystem.")
variant(
"termlib",
@@ -51,9 +55,12 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
depends_on("pkgconfig", type="build")
- patch("patch_gcc_5.txt", when="@6.0%gcc@5.0:")
+ # avoid disallowed const_cast from T* to void* and use reinterpret_cast
+ # Ref: https://lists.gnu.org/archive/html/bug-ncurses/2014-08/msg00008.html
+ patch("0001-Fix-errors-in-type-conversion.patch", when="@:5")
patch("sed_pgi.patch", when="@:6.0")
patch("nvhpc_fix_preprocessor_flag.patch", when="@6.0:6.2%nvhpc")
+ patch("rxvt_unicode_6_4.patch", when="@6.1:")
@classmethod
def determine_version(cls, exe):
@@ -104,6 +111,16 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
elif name == "cxxflags":
flags.append(self.compiler.cxx_pic_flag)
+ # ncurses@:6.0 fails in definition of macro 'mouse_trafo' without -P
+ if self.spec.satisfies("@:6.0 %gcc@5.0:"):
+ if name == "cppflags":
+ flags.append("-P")
+
+ # ncurses@:6.0 uses dynamic exception specifications not allowed in c++17
+ if self.spec.satisfies("@:5"):
+ if name == "cxxflags":
+ flags.append(self.compiler.cxx14_flag)
+
return (flags, None, None)
def configure(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ncurses/rxvt_unicode_6_4.patch b/var/spack/repos/builtin/packages/ncurses/rxvt_unicode_6_4.patch
new file mode 100644
index 0000000000..57bcd99499
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncurses/rxvt_unicode_6_4.patch
@@ -0,0 +1,203 @@
+--- a/misc/terminfo.src 2024-02-16 03:02:02.153142888 +0100
++++ b/misc/terminfo.src 2024-02-16 03:08:25.878807875 +0100
+@@ -6921,6 +6921,200 @@
+ mrxvt-256color|multitabbed rxvt with 256 colors,
+ use=xterm+256color, use=mrxvt,
+
++#### RXVT-UNICODE
++# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
++# Updated: Özgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
++# Updated: Marc Lehmann <schmorp@schmorp.de>, 17 Feb 2005
++# Updated: Marc Lehmann <schmorp@schmorp.de>, 04 Nov 2008: change init/reset sequences
++# Updated: Marc Lehmann <schmorp@schmorp.de>, 24 Nov 2014: implement cvvis as blinking cursor
++# Updated: Marc Lehmann <schmorp@schmorp.de>, 13 Dec 2014: removed superfluous 0 from sgr
++rxvt-unicode|rxvt-unicode terminal (X Window System),
++ am,
++ bce,
++ eo,
++ km,
++ msgr,
++ xenl,
++ hs,
++ cols#80,
++ it#8,
++ lines#24,
++ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~-A.B+C\,D0EhFiG,
++ bel=^G,
++ blink=\E[5m,
++ bold=\E[1m,
++ clear=\E[H\E[2J,
++ civis=\E[?25l,
++ cnorm=\E[?12l\E[?25h,
++ cvvis=\E[?12;25h,
++ cr=^M,
++ csr=\E[%i%p1%d;%p2%dr,
++ cub=\E[%p1%dD,
++ cub1=^H,
++ cud=\E[%p1%dB,
++ cud1=^J,
++ cuf=\E[%p1%dC,
++ cuf1=\E[C,
++ cup=\E[%i%p1%d;%p2%dH,
++ cuu=\E[%p1%dA,
++ cuu1=\E[A,
++ dch=\E[%p1%dP,
++ dch1=\E[P,
++ dl=\E[%p1%dM,
++ dl1=\E[M,
++ ed=\E[J,
++ el=\E[K,
++ el1=\E[1K,
++ flash=\E[?5h$<20/>\E[?5l,
++ home=\E[H,
++ hpa=\E[%i%p1%dG,
++ ht=^I,
++ hts=\EH,
++ ich=\E[%p1%d@,
++ ich1=\E[@,
++ il=\E[%p1%dL,
++ il1=\E[L,
++ ind=^J,
++ is1=\E[\041p,
++ is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
++ kDC=\E[3$,
++ kDC5=\E[3\^,
++ kDC6=\E[3@,
++ kDN=\E[b,
++ kDN5=\EOb,
++ kIC=\E[2$,
++ kIC5=\E[2\^,
++ kIC6=\E[2@,
++ kEND=\E[8$,
++ kEND5=\E[8\^,
++ kEND6=\E[8@,
++ kFND=\E[1$,
++ kFND5=\E[1\^,
++ kFND6=\E[1@,
++ kHOM=\E[7$,
++ kHOM5=\E[7\^,
++ kHOM6=\E[7@,
++ kLFT=\E[d,
++ kLFT5=\EOd,
++ kNXT=\E[6$,
++ kNXT5=\E[6\^,
++ kNXT6=\E[6@,
++ kPRV=\E[5$,
++ kPRV5=\E[5\^,
++ kPRV6=\E[5@,
++ kRIT=\E[c,
++ kRIT5=\EOc,
++ kUP=\E[a,
++ kUP5=\EOa,
++ kbs=\177,
++ ka1=\EOw,
++ ka3=\EOy,
++ kb2=\EOu,
++ kc1=\EOq,
++ kc3=\EOs,
++ kcbt=\E[Z,
++ kcub1=\E[D,
++ kcud1=\E[B,
++ kcuf1=\E[C,
++ kcuu1=\E[A,
++ kdch1=\E[3~,
++ kel=\E[8\^,
++ kend=\E[8~,
++ kent=\EOM,
++ kf1=\E[11~,
++ kf10=\E[21~,
++ kf11=\E[23~,
++ kf12=\E[24~,
++ kf13=\E[25~,
++ kf14=\E[26~,
++ kf15=\E[28~,
++ kf16=\E[29~,
++ kf17=\E[31~,
++ kf18=\E[32~,
++ kf19=\E[33~,
++ kf2=\E[12~,
++ kf20=\E[34~,
++ kf3=\E[13~,
++ kf4=\E[14~,
++ kf5=\E[15~,
++ kf6=\E[17~,
++ kf7=\E[18~,
++ kf8=\E[19~,
++ kf9=\E[20~,
++ kfnd=\E[1~,
++ khome=\E[7~,
++ kich1=\E[2~,
++ kmous=\E[M,
++ knp=\E[6~,
++ kpp=\E[5~,
++ kslt=\E[4~,
++ rc=\E8,
++ rev=\E[7m,
++ ri=\EM,
++ rmso=\E[27m,
++ rmul=\E[24m,
++ rs1=\Ec,
++ rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
++ sgr0=\E[m\E(B,
++ enacs=,
++ smacs=\E(0,
++ rmacs=\E(B,
++ smso=\E[7m,
++ smul=\E[4m,
++ tbc=\E[3g,
++ vpa=\E[%i%p1%dd,
++ colors#88,
++ pairs#7744,
++ btns#5,
++ lm#0,
++ ccc,
++ npc,
++ mc5i,
++ ncv#0,
++ mir,
++ xon,
++ bw,
++ ech=\E[%p1%dX,
++ mc0=\E[i,
++ mc4=\E[4i,
++ mc5=\E[5i,
++ sitm=\E[3m,
++ ritm=\E[23m,
++ smam=\E[?7h,
++ rmam=\E[?7l,
++ smir=\E[4h,
++ rmir=\E[4l,
++ smcup=\E[?1049h,
++ rmcup=\E[r\E[?1049l,
++ smkx=\E=,
++ rmkx=\E>,
++ indn=\E[%p1%dS,
++ rin=\E[%p1%dT,
++ sgr=\E[%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
++ op=\E[39;49m,
++ setaf=\E[38;5;%p1%dm,
++ setab=\E[48;5;%p1%dm,
++ setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
++ setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
++ initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
++ sc=\E7,
++ s0ds=\E(B,
++ s1ds=\E(0,
++ s2ds=\E*B,
++ s3ds=\E+B,
++ u6=\E[%i%d;%dR,
++ u7=\E[6n,
++ u8=\E[?1;2c,
++ u9=\E[c,
++ tsl=\E]2;,
++ fsl=\007,
++ dsl=\E]2;\007,
++
++rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
++ colors#256,
++ pairs#32767,
++ use=rxvt-unicode,
++
+ #### ETERM
+ # From: Michael Jennings <mej@valinux.com>
+ #
diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py
index 70fe309825..c5bca955b9 100644
--- a/var/spack/repos/builtin/packages/ncview/package.py
+++ b/var/spack/repos/builtin/packages/ncview/package.py
@@ -17,6 +17,8 @@ class Ncview(AutotoolsPackage):
version("2.1.8", sha256="e8badc507b9b774801288d1c2d59eb79ab31b004df4858d0674ed0d87dfc91be")
version("2.1.7", sha256="a14c2dddac0fc78dad9e4e7e35e2119562589738f4ded55ff6e0eca04d682c82")
+ depends_on("c", type="build") # generated
+
depends_on("netcdf-c")
depends_on("udunits")
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/ncvis/package.py b/var/spack/repos/builtin/packages/ncvis/package.py
new file mode 100644
index 0000000000..c44bd4b14d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncvis/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Ncvis(CMakePackage):
+ """A NetCDF file viewer. ncvis is inspired by David Pierce's
+ most excellent ncview utility."""
+
+ homepage = "https://github.com/SEATStandards/ncvis"
+ url = "https://github.com/SEATStandards/ncvis/archive/refs/tags/2022.08.28.tar.gz"
+ git = "https://github.com/SEATStandards/ncvis.git"
+
+ maintainers("vanderwb")
+
+ version(
+ "2022.08.28", sha256="a522926739b2a05ef0b436fe67a2014557f9e5fecf3b7d7700964e9006a4bf3e"
+ )
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake", type="build")
+ depends_on("netcdf-c", type="link")
+ depends_on("wxwidgets+opengl", type="link")
+
+ @run_after("install")
+ def install_resources(self):
+ install_tree("resources", self.prefix.resources)
+
+ def setup_run_environment(self, env):
+ env.set("NCVIS_RESOURCE_DIR", self.prefix.resources)
diff --git a/var/spack/repos/builtin/packages/ndiff/package.py b/var/spack/repos/builtin/packages/ndiff/package.py
index 41b7dbd4a5..1aa83a51b2 100644
--- a/var/spack/repos/builtin/packages/ndiff/package.py
+++ b/var/spack/repos/builtin/packages/ndiff/package.py
@@ -23,6 +23,8 @@ class Ndiff(Package):
version("2.00", sha256="f2bbd9a2c8ada7f4161b5e76ac5ebf9a2862cab099933167fe604b88f000ec2c")
version("1.00", sha256="d4be3ab38e4b87da8d689fe47413e01a7bfdf8c8627bfb673aac37953a463a92")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/ndzip/package.py b/var/spack/repos/builtin/packages/ndzip/package.py
index 867cb373dc..91dead20db 100644
--- a/var/spack/repos/builtin/packages/ndzip/package.py
+++ b/var/spack/repos/builtin/packages/ndzip/package.py
@@ -25,6 +25,9 @@ class Ndzip(CMakePackage, CudaPackage):
version("master", branch="master")
version("2021-11-30", commit="5b3c34991005c0924a339f2ec06750729ebbf015")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", description="build with cuda support", default=False)
variant("openmp", description="build with cuda support", default=False)
diff --git a/var/spack/repos/builtin/packages/neartree/Makefile-3.1.patch b/var/spack/repos/builtin/packages/neartree/Makefile-3.1.patch
new file mode 100644
index 0000000000..722eea809e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/neartree/Makefile-3.1.patch
@@ -0,0 +1,23 @@
+--- a/Makefile
++++ b/Makefile
+@@ -114,13 +114,13 @@ CPPLIBRARIES = -lm
+ #
+ CLIBRARIES = $(CVECTOR_LIBLOC) -lCVector -lm
+
+-COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
+-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
+-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
++COMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link --tag=CC $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CXX $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link --tag=CC $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
++BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
+
diff --git a/var/spack/repos/builtin/packages/neartree/Makefile.patch b/var/spack/repos/builtin/packages/neartree/Makefile.patch
new file mode 100644
index 0000000000..77023f687e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/neartree/Makefile.patch
@@ -0,0 +1,23 @@
+--- a/Makefile
++++ b/Makefile
+@@ -117,13 +117,13 @@ CPPLIBRARIES = -lm
+ #
+ CLIBRARIES = $(CVECTOR_LIBLOC) -lCVector -lm
+
+-COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
+-BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+-CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
+-BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
++COMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link --tag=CC $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(INCLUDES)
++CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link --tag=CXX $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link --tag=CC $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
++BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
+
diff --git a/var/spack/repos/builtin/packages/neartree/package.py b/var/spack/repos/builtin/packages/neartree/package.py
index a898593b6a..89fb15fe2a 100644
--- a/var/spack/repos/builtin/packages/neartree/package.py
+++ b/var/spack/repos/builtin/packages/neartree/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+
from spack.package import *
@@ -10,16 +12,28 @@ class Neartree(MakefilePackage):
"""This is a release of an API for finding nearest neighbors among
points in spaces of arbitrary dimensions."""
- homepage = "http://neartree.sourceforge.net/"
- url = "https://downloads.sourceforge.net/project/neartree/neartree/NearTree-3.1/NearTree-3.1.tar.gz"
+ homepage = "https://neartree.sourceforge.net/"
license("LGPL-2.1-or-later")
+ version("5.1.1", sha256="b951eb23bb4235ada82cef85b9f129bf74a14e45d992097431e7bfb6bdca6642")
version("3.1", sha256="07b668516f15a7c13c219fd005b14e73bced5dc6b23857edcc24d3e5cf0d3be3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libtool", type="build")
depends_on("cvector")
+ patch("Makefile.patch", when="@5.1.1")
+ patch("Makefile-3.1.patch", when="@3.1")
+
+ def url_for_version(self, version):
+ pattern = re.compile(r"^[0-9]+\.[0-9]+")
+ full_vers = str(version)
+ cropped_vers = pattern.search(full_vers).group()
+ return f"https://downloads.sourceforge.net/project/neartree/neartree/NearTree-{cropped_vers}/NearTree-{full_vers}.tar.gz"
+
def edit(self, spec, prefix):
mf = FileFilter("Makefile")
mf.filter(r"^CC.+", "CC = {0}".format(spack_cc))
diff --git a/var/spack/repos/builtin/packages/neic-finitefault/fortran-filename-length.patch b/var/spack/repos/builtin/packages/neic-finitefault/fortran-filename-length.patch
new file mode 100644
index 0000000000..c89ec14dcb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/neic-finitefault/fortran-filename-length.patch
@@ -0,0 +1,370 @@
+diff --git a/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_gf.f95 b/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_gf.f95
+index a87100b..658decf 100644
+--- a/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_gf.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_gf.f95
+@@ -139,9 +139,9 @@ contains
+ real omega, block, lat_e, lon_e, lat_s(nnsta), lon_s(nnsta), dt, depth, &
+ & weig, df, dt_sample, w, tlen
+ complex z0, z
+- character(len=80) path
++ character(len=255) path
+ character(len=6) sta_name(nnsta)
+- character(len=80) filename
++ character(len=255) filename
+ character(len=3) component(nnsta), comp
+
+ z0 = cmplx(0.0, 0.0)
+@@ -244,9 +244,9 @@ contains
+ real omega, block, lat_e, lon_e, lat_s(nnsta), lon_s(nnsta), dt, depth, &
+ & weig, df, dt_sample, w, low_freq, tlen
+ complex z0, z
+- character(len=80) path
++ character(len=255) path
+ character(len=6) sta_name(nnsta)
+- character(len=80) filename
++ character(len=255) filename
+ character(len=3) component(nnsta), comp
+
+ z0 = cmplx(0.0, 0.0)
+@@ -572,8 +572,8 @@ contains
+ complex :: kahan_y, kahan_t, kahan_c
+ complex sour_sub(npth), green_s(inptd, 10), www, wss, z0
+
+- character(len=250) modes
+- character(len=100) surf_gf_bank
++ character(len=255) modes
++ character(len=255) surf_gf_bank
+ character(len=6) sta_name(nnsta)
+
+ z0 = cmplx(0.0, 0.0)
+@@ -776,9 +776,9 @@ contains
+ & gf_imag(inptd), h, time, tsub(nnxy_m), a
+ complex z0, z, sour_sub(npth)
+ complex :: kahan_y, kahan_t, kahan_c
+- character(len=80) path
++ character(len=255) path
+ character(len=6) sta_name(nnsta)
+- character(len=80) filename
++ character(len=255) filename
+
+ z0 = cmplx(0.0, 0.0)
+ n_chan3 = 0
+diff --git a/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_surf_gf.f95 b/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_surf_gf.f95
+index 6123151..416d81d 100644
+--- a/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_surf_gf.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/docs/src/retrieve_surf_gf.f95
+@@ -15,8 +15,8 @@ contains
+
+ subroutine get_surf_gf_data(gf_file, gf_bank)
+ implicit none
+- character(len=100), intent(in) :: gf_file
+- character(len=100), intent(out) :: gf_bank
++ character(len=255), intent(in) :: gf_file
++ character(len=255), intent(out) :: gf_bank
+ integer :: int2, int3, int4
+ open(1, file=gf_file)
+ read(1, *) npt_bank, dt_bank, int2, int3, int4, nfmax, nblock2
+@@ -36,7 +36,7 @@ contains
+ !! Load to memory GF bank, from a specified location.
+ !!
+ implicit none
+- character(len=100) :: gf_bank
++ character(len=255) :: gf_bank
+ real :: d_min, d_max, z_min, z_max
+ integer :: nx_b, nx_e, nz_b, nz_e, ixx, izz
+ integer :: index_rec
+diff --git a/fortran_code/bin_inversion_gfortran_f95/get_stations_data.f95 b/fortran_code/bin_inversion_gfortran_f95/get_stations_data.f95
+index e47dea1..e6bd2d7 100755
+--- a/fortran_code/bin_inversion_gfortran_f95/get_stations_data.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/get_stations_data.f95
+@@ -153,8 +153,8 @@ contains
+ & n_wave_weight, stations, channels0, int1, int2, used_channels
+ real dt, weig(max_stations), wavelet_weight0(11), dt_sample, lat_s, lon_s
+ logical, parameter :: dart = .False.
+- character(len=20) filename, string2, string1
+- character(len=30) event_file, channels_file, wavelets_file, waveforms_file
++ character(len=255) filename, string2, string1
++ character(len=255) event_file, channels_file, wavelets_file, waveforms_file
+ logical :: is_file, strong, cgps
+ ! character(len=6) sta_name(max_stations)
+ ! character(len=3) component(max_stations)
+@@ -258,7 +258,7 @@ contains
+ real lat_sta, lon_sta, wavelet_weight0(11), dt, &
+ & rang, az, angle, float1, float2
+ logical, parameter :: cgps=.False., dart = .False.
+- character(len=20) filename, string1, string2
++ character(len=255) filename, string1, string2
+ character(len=30) event_file
+ character(len=6) earth, sttyp
+ character(len=14) fname
+@@ -361,10 +361,10 @@ contains
+ & weig(max_stations, 3), wavelet_weight0(11), dt_sample, &
+ & dip, rake, theta
+ logical, parameter :: cgps=.False., dart=.False.
+- character(len=20) filename, string1, string2
++ character(len=255) filename, string1, string2
+ character(len=30) event_file
+ ! character(len=6) sta_name(max_stations)
+- character(len=250) modes
++ character(len=255) modes
+ logical :: is_file
+
+ write(*,*)'Get stations metadata and waveforms for long period surface waves...'
+@@ -469,7 +469,7 @@ contains
+ & n_wave_weight, stations, channels0, int1, int2, used_channels
+ real :: lat_s, lon_s, dt, weig(max_stations), wavelet_weight0(11), dt_sample
+ logical, parameter :: cgps=.False., dart=.True.
+- character(len=20) filename
++ character(len=255) filename
+ ! character(len=6) sta_name(max_stations)
+ ! character(len=3) component(max_stations)
+
+@@ -544,7 +544,7 @@ contains
+ integer first, channel, i, j, channels0
+ real :: dto
+ character(len=40) string
+- character(len=20) filename
++ character(len=255) filename
+
+ filename = trim(filename)
+ open(13, file=filename, status='old')
+diff --git a/fortran_code/bin_inversion_gfortran_f95/retrieve_gf.f95 b/fortran_code/bin_inversion_gfortran_f95/retrieve_gf.f95
+index b37efeb..a47ffcd 100755
+--- a/fortran_code/bin_inversion_gfortran_f95/retrieve_gf.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/retrieve_gf.f95
+@@ -116,7 +116,7 @@ contains
+ & l, k, event
+ real :: omega, factor, start, dt, df, dt_sample, tlen
+ complex :: z0, z
+- character(len=80) filename, filename2
++ character(len=255) filename, filename2
+ character(len=3) comp
+ character(len=1) channel2
+ character(len=2) event2
+@@ -414,8 +414,8 @@ contains
+ complex :: kahan_y, kahan_t, kahan_c
+ complex start(wave_pts), green_s(wave_pts2, 10), green_dip0, green_stk0, z0
+
+- character(len=250) modes
+- character(len=100) surf_gf_bank
++ character(len=255) modes
++ character(len=255) surf_gf_bank
+ character(len=6) sta_name1
+ logical :: many_events
+
+@@ -632,7 +632,7 @@ contains
+ & k, l, etc
+ real :: omega, dt, df, dt_sample, start, tlen, real1, imag1, time
+ complex :: z0, z
+- character(len=80) filename
++ character(len=255) filename
+
+ write(*,*)'Store DART GF in memory...'
+ z0 = cmplx(0.0, 0.0)
+diff --git a/fortran_code/bin_inversion_gfortran_f95/retrieve_surf_gf.f95 b/fortran_code/bin_inversion_gfortran_f95/retrieve_surf_gf.f95
+index e07e1f3..bfc5250 100755
+--- a/fortran_code/bin_inversion_gfortran_f95/retrieve_surf_gf.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/retrieve_surf_gf.f95
+@@ -20,8 +20,8 @@ contains
+ ! gf_bank: location of GF bank
+ !
+ implicit none
+- character(len=100), intent(in) :: gf_file
+- character(len=100), intent(out) :: gf_bank
++ character(len=255), intent(in) :: gf_file
++ character(len=255), intent(out) :: gf_bank
+ integer :: int2, int3, int4
+ open(1, file=gf_file, status='old')
+ read(1, *) npt_bank, dt_bank, int2, int3, int4, nfmax, nblock2
+@@ -71,7 +71,7 @@ contains
+ ! z_max: maximum depth to get GF from Gf bank
+ !
+ implicit none
+- character(len=100) :: gf_bank
++ character(len=255) :: gf_bank
+ real :: d_min, d_max, z_min, z_max
+ integer :: nx_b, nx_e, nz_b, nz_e, ixx, izz
+ integer :: index_rec
+diff --git a/fortran_code/bin_inversion_gfortran_f95/save_forward.f95 b/fortran_code/bin_inversion_gfortran_f95/save_forward.f95
+index 987b115..b626166 100755
+--- a/fortran_code/bin_inversion_gfortran_f95/save_forward.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/save_forward.f95
+@@ -114,7 +114,7 @@ contains
+ real*8 t1, t2, df
+ complex forward(wave_pts2), z0, z
+ complex :: source2(wave_pts, max_rise_time_range, max_rise_time_range)
+- character(len=70) filename, filename2
++ character(len=255) filename, filename2
+ character(len=3) comp!component(max_stations), comp
+ logical :: strong, cgps
+
+diff --git a/fortran_code/bin_inversion_gfortran_f95/static_data.f95 b/fortran_code/bin_inversion_gfortran_f95/static_data.f95
+index 9e5bc3a..28e9085 100755
+--- a/fortran_code/bin_inversion_gfortran_f95/static_data.f95
++++ b/fortran_code/bin_inversion_gfortran_f95/static_data.f95
+@@ -52,7 +52,7 @@ contains
+ real :: cosal, sinal, angle
+ real*8 :: disp
+ logical is_file, is_file2, many_events
+- character(len=30) :: event_file, string1, string2
++ character(len=255) :: event_file, string1, string2
+ !
+ inquire( file = 'static_data.txt', exist = is_file )
+ if (is_file) then
+diff --git a/fortran_code/bin_str_f95/get_stations_data.f95 b/fortran_code/bin_str_f95/get_stations_data.f95
+index 49e5788..a43990c 100755
+--- a/fortran_code/bin_str_f95/get_stations_data.f95
++++ b/fortran_code/bin_str_f95/get_stations_data.f95
+@@ -66,7 +66,7 @@ contains
+ & n_wave_weight, ir_max, n_chan, &
+ & nos(nnsta), io_mod(nnsta), n_chan3
+ real dt, weig(nnsta), j_wig(11), dt_sample, lat_s, lon_s
+- character(len=20) filename
++ character(len=255) filename
+ ! character(len=6) sta_name(nnsta)
+ ! character(len=3) component(nnsta)
+
+@@ -144,7 +144,7 @@ contains
+ & n_wave_weight, ir_max, n_chan, &
+ & nos(nnsta), io_mod(nnsta), n_chan3
+ real :: lat_s, lon_s, dt, weig(nnsta), j_wig(11), dt_sample
+- character(len=20) filename
++ character(len=255) filename
+ ! character(len=6) sta_name(nnsta)
+ ! character(len=3) component(nnsta)
+
+@@ -221,7 +221,7 @@ contains
+ & nos, n_chan3, idts, nstaon, love, int1
+ real lat_sta, lon_sta, j_wig(11), dt, &
+ & rang, az, earth_angle, disp_or_vel(nnsta), float1, float2
+- character(len=20) filename
++ character(len=255) filename
+ character(len=6) earth, sttyp
+ character(len=14) fname
+
+@@ -303,9 +303,9 @@ contains
+ real lat_s(nnsta), lon_s(nnsta), dt, &
+ & ang_ns(nnsta), ang_ew(nnsta), weig(nnsta, 3), j_wig(11), dt_sample, &
+ & dip, rake, theta
+- character(len=20) filename
++ character(len=255) filename
+ ! character(len=6) sta_name(nnsta)
+- character(len=250) modes
++ character(len=255) modes
+
+ n_chan3 = 0
+ !
+@@ -401,7 +401,7 @@ contains
+ integer ll_in, ll_out, ll_g, j_con(11), k, ir, no, &
+ & n_wave_weight, ir_max, n_chan, nos, io_mod, n_chan3
+ real :: lat_s, lon_s, dt, weig(nnsta), j_wig(11), dt_sample
+- character(len=20) filename
++ character(len=255) filename
+ ! character(len=6) sta_name(nnsta)
+ ! character(len=3) component(nnsta)
+
+@@ -476,7 +476,7 @@ contains
+ real cr(inptd), cz(inptd), obser(n_data), &
+ & dto, amp_max, obse(n_data, nnsta)
+ character(len=40) string
+- character(len=20) filename
++ character(len=255) filename
+
+ filename = trim(filename)
+ open(13, file=filename, status='old')
+diff --git a/fortran_code/bin_str_f95/get_strong_motion.f95 b/fortran_code/bin_str_f95/get_strong_motion.f95
+index ff6f158..b13e734 100755
+--- a/fortran_code/bin_str_f95/get_strong_motion.f95
++++ b/fortran_code/bin_str_f95/get_strong_motion.f95
+@@ -14,10 +14,10 @@ program get_strong_motion
+ use bpfilter, only : bandpassfilter
+ use rad_pattern, only : rad_coef
+ implicit none
+- character(len=100) :: vel_model, gf_file, vel_file, gf_bank, filter_file, wave_file, stat_file
++ character(len=255) :: vel_model, gf_file, vel_file, gf_bank, filter_file, wave_file, stat_file
+ character(len=70) :: string1, input
+- character(len=200) :: directory,filterfile,risetimefile,pointsourcefile
+- character(len=200) :: channelsfile,waveformsfile,responsefile
++ character(len=255) :: directory,filterfile,risetimefile,pointsourcefile
++ character(len=255) :: channelsfile,waveformsfile,responsefile
+ character(len=10) :: sta_name(200)
+ character(len=12) :: filename
+ character(len=3) :: comp
+diff --git a/fortran_code/bin_str_f95/retrieve_gf.f95 b/fortran_code/bin_str_f95/retrieve_gf.f95
+index 6a80593..fac8795 100755
+--- a/fortran_code/bin_str_f95/retrieve_gf.f95
++++ b/fortran_code/bin_str_f95/retrieve_gf.f95
+@@ -22,8 +22,8 @@ contains
+ ! vel_model: file with velocity model
+ !
+ implicit none
+- character(len=100), intent(in) :: gf_file
+- character(len=100), intent(out) :: vel_model, gf_bank
++ character(len=255), intent(in) :: gf_file
++ character(len=255), intent(out) :: vel_model, gf_bank
+ open(1, file=gf_file, status='old')
+ read(1, *)vel_model
+ read(1, *)dep_max, dep_min, dep_step
+@@ -44,7 +44,7 @@ contains
+ ! z_max: maximum depth of point sources
+ !
+ implicit none
+- character(len=100) :: gf_bank
++ character(len=255) :: gf_bank
+ real :: z_min, z_max
+ integer :: npt, nx_b, nx_e, nz_b, nz_e, ixx, izz
+ integer :: index_rec
+diff --git a/fortran_code/bin_str_f95/store_gf.f95 b/fortran_code/bin_str_f95/store_gf.f95
+index b544795..8b92bc7 100644
+--- a/fortran_code/bin_str_f95/store_gf.f95
++++ b/fortran_code/bin_str_f95/store_gf.f95
+@@ -81,7 +81,7 @@ contains
+ ! disp: True if data to be used is cGPS, False otherwise
+ !
+ implicit none
+- character(len=100) :: filter_file, wave_file, stat_file, event_file
++ character(len=255) :: filter_file, wave_file, stat_file, event_file
+ character(len=70) :: string1, string2
+ real :: lat_e, lon_e, dep_e
+ integer :: ir, no
+diff --git a/fortran_code/src_dc_f95/green_bank_fk.f95 b/fortran_code/src_dc_f95/green_bank_fk.f95
+index aed84e9..76db003 100644
+--- a/fortran_code/src_dc_f95/green_bank_fk.f95
++++ b/fortran_code/src_dc_f95/green_bank_fk.f95
+@@ -20,7 +20,7 @@ program green_bank_fk
+ integer iz, k, ll, n_com, nd_max, npt, ntc, nx, nz
+ logical :: disp
+
+- character(len=100) gf_file, vel_model, gf_bank, input
++ character(len=255) gf_file, vel_model, gf_bank, input
+ !
+ call getarg(1, input)
+ disp = (input.eq.'cgps')
+diff --git a/fortran_code/src_dc_f95/green_bank_fk_openmp.f95 b/fortran_code/src_dc_f95/green_bank_fk_openmp.f95
+index 4d89e33..3f819b1 100644
+--- a/fortran_code/src_dc_f95/green_bank_fk_openmp.f95
++++ b/fortran_code/src_dc_f95/green_bank_fk_openmp.f95
+@@ -20,7 +20,7 @@ program green_bank_fk_openmp
+ integer iz, k, ll, n_com, nd_max, npt, ntc, nx, nz
+ logical :: disp
+
+- character(len=100) gf_file, vel_model, gf_bank, input, directory
++ character(len=255) gf_file, vel_model, gf_bank, input, directory
+ !
+ call getarg(1, input)
+ call getarg(2, directory)
+diff --git a/fortran_code/src_dc_f95/retrieve_gf.f95 b/fortran_code/src_dc_f95/retrieve_gf.f95
+index 94191d6..555ec59 100755
+--- a/fortran_code/src_dc_f95/retrieve_gf.f95
++++ b/fortran_code/src_dc_f95/retrieve_gf.f95
+@@ -24,8 +24,8 @@ contains
+ ! gf_bank: location of GF bank
+ !
+ implicit none
+- character(len=100), intent(in) :: gf_file
+- character(len=100), intent(out) :: vel_model, gf_bank
++ character(len=255), intent(in) :: gf_file
++ character(len=255), intent(out) :: vel_model, gf_bank
+ open(1, file=gf_file, status='old')
+ read(1, *)vel_model
+ read(1, *)dep_max, dep_min, dep_step
diff --git a/var/spack/repos/builtin/packages/neic-finitefault/package.py b/var/spack/repos/builtin/packages/neic-finitefault/package.py
new file mode 100644
index 0000000000..93607c6220
--- /dev/null
+++ b/var/spack/repos/builtin/packages/neic-finitefault/package.py
@@ -0,0 +1,145 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NeicFinitefault(PythonPackage):
+ """Wavelet and simulated Annealing SliP inversion (WASP).
+ This code uses a nonlinear simulated annealing inversion method to
+ model slip amplitude, rake, rupture time, and rise time on a discretized
+ fault plane, finding the solution that best fits the observations in
+ the wavelet domain."""
+
+ homepage = "https://code.usgs.gov/ghsc/neic/algorithms/neic-finitefault"
+
+ url = "https://code.usgs.gov/ghsc/neic/algorithms/neic-finitefault/-/archive/0.1.0/neic-finitefault-0.1.0.tar.gz"
+ git = "https://code.usgs.gov/ghsc/neic/algorithms/neic-finitefault"
+
+ maintainers("snehring")
+
+ license("CC0-1.0", checked_by="snehring")
+
+ version("20240410", commit="ef6a1a92d60549100885112e24a18e38d8d4ce0b")
+ version("0.1.0", sha256="36b400dfc418bf78a3099f6fc308681c87ae320e6d71c7d0e98a2738e72fb570")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ resource(
+ name="fd_bank",
+ url="https://zenodo.org/records/7236739/files/fd_bank",
+ sha256="fe0f1a392cb9b6623c981de2a4fae405d9820b14e274e287e64731aede8ecb40",
+ expand=False,
+ when="@0.1.0:",
+ )
+ resource(
+ name="LITHO1.0.nc",
+ url="https://ds.iris.edu/files/products/emc/emc-files/LITHO1.0.nc",
+ sha256="4429bdf3fc2a5402064b40b059faf3a79d9ce0818feb1b13122e169af56f4b43",
+ expand=False,
+ when="@0.1.0:",
+ )
+ resource(
+ name="tectonicplates",
+ url="https://github.com/fraxen/tectonicplates/archive/339b0c56563c118307b1f4542703047f5f698fae.zip",
+ sha256="694ebf7090db07e47b07f1ae21175c4a5fa9c85bb79815680e439c1032407b95",
+ when="@0.1.0:",
+ )
+
+ depends_on("python@3.9:3.12", type=("build", "run"))
+
+ depends_on("py-poetry-core@1:", type="build")
+
+ depends_on("py-cartopy@0.21.1:0", type=("build", "run"))
+ depends_on("py-ipykernel@6.15:6", type=("build", "run"))
+ depends_on("py-matplotlib@3.8.3:3", type=("build", "run"))
+ depends_on("py-matplotlib@3.7.2:3", type=("build", "run"), when="@0.1.0")
+ depends_on("py-netcdf4@1.6.4:1~mpi", type=("build", "run"))
+ depends_on("py-numpy@1.25:1", type=("build", "run"))
+ depends_on("py-obspy@1.4:1", type=("build", "run"))
+ depends_on("py-pygmt@0.9:0.9", type=("build", "run"))
+ depends_on("py-pyproj@3.3:3", type=("build", "run"))
+ depends_on("py-scipy@1.11.1:1", type=("build", "run"))
+ depends_on("py-shapely@=1.7.1", type=("build", "run"))
+ depends_on("py-pyrocko@=2023.6.29", type=("build", "run"))
+ depends_on("py-typer@0.9", type=("build", "run"))
+ depends_on("py-okada-wrapper@=18.12.07.3", type=("build", "run"))
+
+ # non python deps
+ depends_on("geos@=3.11.2", type=("build", "run"))
+ depends_on("gmt@=6.4.0", type=("build", "run"))
+ depends_on("proj@=9.2.0", type=("build", "run"))
+ # not a direct dep, but we do need gdal to have these variants
+ depends_on("gdal+jpeg+jxl+openjpeg", type=("build", "run"))
+
+ parallel = False
+
+ patch("fortran-filename-length.patch")
+
+ @run_before("install")
+ def build(self):
+ # place resources, couldn't figure out another way to do this
+ # that didn't result in symlinks
+ relevant_resources = [
+ resource
+ for resource_spec, resource_list in self.resources.items()
+ if self.spec.intersects(resource_spec)
+ for resource in resource_list
+ ]
+ for resource in relevant_resources:
+ res_path = resource.fetcher.stage.source_path
+ if resource.name == "fd_bank":
+ res_dst = join_path(self.build_directory, "fortran_code", "gfs_nm", "long")
+ elif resource.name == "LITHO1.0.nc":
+ res_dst = join_path(self.build_directory, "fortran_code", "info")
+ elif resource.name == "tectonicplates":
+ res_dst = self.build_directory
+
+ res_dst = join_path(res_dst, resource.name)
+
+ if resource.name == "tectonicplates":
+ copy_tree(res_path, res_dst)
+ else:
+ copy(join_path(res_path, resource.name), res_dst)
+
+ # everything about this seems to assume it's going to reside where it's compiled
+ mkdirp(self.prefix)
+ install_tree(".", self.prefix)
+
+ with working_dir(self.prefix.fortran_code):
+ with open(join_path("gfs_nm", "long", "low.in"), mode="a") as f:
+ f.write(f"\n{self.prefix.fortran_code.gfs_nm.long.fd_bank}")
+ # compile fortran code
+ with working_dir("bin_inversion_gfortran_f95"):
+ make("clean")
+ make()
+ with working_dir("bin_str_f95"):
+ make("clean")
+ make()
+ with working_dir("src_dc_f95"):
+ make("clean")
+ make()
+
+ @run_after("install")
+ def generate_config_file(self):
+ file = f"""[PATHS]
+code_path = {self.prefix}
+surf_gf_bank = {join_path(self.prefix.fortran_code.gfs_nm.long, "low.in")}
+modelling = {self.prefix.fortran_code.bin_inversion_gfortran_f95}
+get_near_gf = {self.prefix.fortran_code.bin_str_f95}
+compute_near_gf = {self.prefix.fortran_code.src_dc_f95}
+info = {self.prefix.fortran_code.info}
+cartopy_files = {self.prefix.tectonicplates}"""
+
+ with working_dir(self.prefix):
+ with open("config.ini", mode="w") as f:
+ f.write(file)
+ symlink(
+ join_path(self.prefix, "config.ini"),
+ join_path(
+ self.prefix.lib, f"python{self.spec['python'].version.up_to(2)}", "config.ini"
+ ),
+ )
diff --git a/var/spack/repos/builtin/packages/nek5000/package.py b/var/spack/repos/builtin/packages/nek5000/package.py
index 2936177d72..5221d0cb23 100644
--- a/var/spack/repos/builtin/packages/nek5000/package.py
+++ b/var/spack/repos/builtin/packages/nek5000/package.py
@@ -33,6 +33,9 @@ class Nek5000(Package):
version("17.0", sha256="4d8d4793ce3c926c54e09a5a5968fa959fe0ba46bd2e6b8043e099528ee35a60")
version("19.0", sha256="db129877a10ff568d49edc77cf65f9e732eecb1fce10edbd91ffc5ac10c41ad6")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# MPI, Profiling and Visit variants
variant("mpi", default=True, description="Build with MPI.")
variant("profiling", default=True, description="Build with profiling data.")
diff --git a/var/spack/repos/builtin/packages/nekbone/package.py b/var/spack/repos/builtin/packages/nekbone/package.py
index 23a494119d..e6d36687ce 100644
--- a/var/spack/repos/builtin/packages/nekbone/package.py
+++ b/var/spack/repos/builtin/packages/nekbone/package.py
@@ -27,6 +27,9 @@ class Nekbone(Package):
extension=".tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Variants
variant("mpi", default=True, description="Build with MPI")
diff --git a/var/spack/repos/builtin/packages/nekcem/package.py b/var/spack/repos/builtin/packages/nekcem/package.py
index 76fae8fd6c..d345438332 100644
--- a/var/spack/repos/builtin/packages/nekcem/package.py
+++ b/var/spack/repos/builtin/packages/nekcem/package.py
@@ -27,6 +27,9 @@ class Nekcem(Package):
version("0b8bedd", commit="0b8beddfdcca646bfcc866dfda1c5f893338399b")
version("7332619", commit="7332619b73d03868a256614b61794dce2d95b360")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# dependencies
depends_on("mpi", when="+mpi")
depends_on("blas")
@@ -81,9 +84,6 @@ class Nekcem(Package):
elif self.compiler.name == "xl" or self.compiler.name == "xl_r":
fflags += ["-qrealsize=8"]
cflags += ["-DPREFIX=jl_", "-DIBM"]
- elif self.compiler.name == "pgi":
- fflags += ["-r8"]
- cflags += ["-DUNDERSCORE"]
error = Executable(fc)("empty.f", output=str, error=str, fail_on_error=False)
diff --git a/var/spack/repos/builtin/packages/neko/package.py b/var/spack/repos/builtin/packages/neko/package.py
index 0683165c49..d7a9caa69d 100644
--- a/var/spack/repos/builtin/packages/neko/package.py
+++ b/var/spack/repos/builtin/packages/neko/package.py
@@ -16,6 +16,12 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
url = "https://github.com/ExtremeFLOW/neko/releases/download/v0.3.2/neko-0.3.2.tar.gz"
maintainers("njansson")
+ version("0.9.0", sha256="3cffe629ada1631d8774fa51d8bb14b95dc0cea21578c0e07e70deb611a5091a")
+ version("0.8.1", sha256="ac8162bc18e7112fd21b49c5a9c36f45c7b84896e90738be36a182990798baec")
+ version("0.8.0", sha256="09d0b253c8abda9f384bf8f03b17b50d774cb0a1f7b72744a8e863acac516a51")
+ version("0.7.2", sha256="5dd17fbae83d0b26dc46fafce4e5444be679cdce9493cef4ff7d504e2f854254")
+ version("0.7.1", sha256="c935c3d93b0975db46448045f97aced6ac2cab31a2b8803047f8086f98dcb981")
+ version("0.7.0", sha256="fe871e0a79f388073e0b3dc191d1c0d5da3a53883f5b1951d88b9423fc79a53c")
version("0.6.1", sha256="6282baaf9c8a201669e274cba23c37922f7ad701ba20ef086442e48f00dabf29")
version("0.6.0", sha256="ce37c7cea1a7bf1bf554c5717aa7fed35bbd079ff68c2fc9d3529facc717e31a")
version("0.5.2", sha256="8873f5ada106f92f21c9bb13ea8164550bccde9301589b9e7f1c1a82a2efe2b8")
@@ -26,9 +32,34 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
version("0.3.2", sha256="0628910aa9838a414f2f27d09ea9474d1b3d7dcb5a7715556049a2fdf81a71ae")
version("0.3.0", sha256="e46bef72f694e59945514ab8b1ad7d74f87ec9dca2ba2b230e2148662baefdc8")
version("develop", branch="develop")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("parmetis", default=False, description="Build with support for parmetis")
variant("xsmm", default=False, description="Build with support for libxsmm")
- variant("gslib", default=False, when="@develop", description="Build with support for gslib")
+ variant("gslib", default=False, when="@0.7.0:", description="Build with support for gslib")
+ variant("hdf5", default=False, when="@develop", description="Build with support for HDF5")
+ variant("hdf5", default=False, when="@0.9.0:", description="Build with support for HDF5")
+ variant(
+ "shared",
+ default=False,
+ when="@develop",
+ description="Builds a shared version of the library",
+ )
+ variant(
+ "shared",
+ default=False,
+ when="@0.9.0:",
+ description="Builds a shared version of the library",
+ )
+
+ # Requires cuda or rocm enabled MPI
+ variant(
+ "device-mpi",
+ default=False,
+ when="@0.4.0:",
+ description="Build with support for device-aware MPI",
+ )
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -41,7 +72,11 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("blas")
depends_on("lapack")
depends_on("json-fortran", when="@develop")
+ depends_on("json-fortran", when="@0.7.0:")
depends_on("gslib", when="+gslib")
+ depends_on("hdf5+fortran+mpi", when="+hdf5")
+ depends_on("libtool", type="build", when="@develop")
+ depends_on("libtool", type="build", when="@0.9.0:")
def configure_args(self):
args = []
@@ -51,8 +86,22 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
args += self.with_or_without("metis", variant="parmetis", activation_value="prefix")
args += self.with_or_without("libxsmm", variant="xsmm")
args += self.with_or_without("gslib", variant="gslib", activation_value="prefix")
+ args += self.with_or_without("hdf5", variant="hdf5", activation_value="prefix")
args += self.with_or_without("cuda", activation_value="prefix")
rocm_fn = lambda x: self.spec["hip"].prefix
args += self.with_or_without("hip", variant="rocm", activation_value=rocm_fn)
+ args += self.enable_or_disable("device-mpi", variant="device-mpi")
+ args += self.enable_or_disable("shared", variant="shared")
+
+ if self.spec.satisfies("+cuda"):
+ cuda_arch_list = self.spec.variants["cuda_arch"].value
+ cuda_arch = cuda_arch_list[0]
+ if cuda_arch != "none":
+ args.append(f"CUDA_ARCH=-arch=sm_{cuda_arch}")
+ if self.spec.satisfies("+rocm"):
+ rocm_arch_list = self.spec.variants["amdgpu_target"].value
+ rocm_arch = rocm_arch_list[0]
+ if rocm_arch != "none":
+ args.append(f"HIP_HIPCC_FLAGS=-O3 --offload-arch={rocm_arch}")
return args
diff --git a/var/spack/repos/builtin/packages/nekrs/package.py b/var/spack/repos/builtin/packages/nekrs/package.py
index d3c9c41b74..3376682772 100644
--- a/var/spack/repos/builtin/packages/nekrs/package.py
+++ b/var/spack/repos/builtin/packages/nekrs/package.py
@@ -5,16 +5,19 @@
import os
+import spack.build_systems.cmake
+import spack.build_systems.generic
from spack.package import *
-class Nekrs(Package, CudaPackage, ROCmPackage):
+class Nekrs(Package, CMakePackage, CudaPackage, ROCmPackage):
"""nekRS is an open-source Navier Stokes solver based on the spectral
element method targeting classical processors and hardware accelerators
like GPUs"""
homepage = "https://github.com/Nek5000/nekRS"
git = "https://github.com/Nek5000/nekRS.git"
+ url = "https://github.com/Nek5000/nekRS/archive/refs/tags/v23.0.tar.gz"
tags = [
"cfd",
@@ -32,8 +35,17 @@ class Nekrs(Package, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
+ build_system(
+ conditional("cmake", when="@23.0:"), conditional("generic", when="@=21.0"), default="cmake"
+ )
+
+ version("23.0", sha256="2cb4ded69551b9614036e1a9d5ac54c8535826eae8f8b6a00ddb89043b2c392a")
version("21.0", tag="v21.0", commit="bcd890bf3f9fb4d91224c83aeda75c33570f1eaa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("opencl", default=False, description="Activates support for OpenCL")
# Conflicts:
@@ -48,17 +60,35 @@ class Nekrs(Package, CudaPackage, ROCmPackage):
depends_on("git")
depends_on("cmake")
- @run_before("install")
- def fortran_check(self):
- if not self.compiler.f77:
- msg = "Cannot build NekRS without a Fortran 77 compiler."
- raise RuntimeError(msg)
+ def patch(self):
+ with working_dir("scripts"):
+ # Make sure nekmpi wrapper uses srun when we know OpenMPI
+ # is not built with mpiexec
+ if self.spec.satisfies("^openmpi~legacylaunchers"):
+ filter_file(r"mpirun -np", "srun -n", "nrsmpi")
+ filter_file(r"mpirun -np", "srun -n", "nrspre")
+ filter_file(r"mpirun -np", "srun -n", "nrsbmpi")
+
+ def setup_run_environment(self, env):
+ # The 'env' is included in the Spack generated module files.
+ spec = self.spec
+ env.set("OCCA_CXX", self.compiler.cxx)
+
+ cxxflags = spec.compiler_flags["cxxflags"]
+ if cxxflags:
+ # Run-time compiler flags:
+ env.set("OCCA_CXXFLAGS", " ".join(cxxflags))
+
+ if "+cuda" in spec:
+ cuda_dir = spec["cuda"].prefix
+ # Run-time CUDA compiler:
+ env.set("OCCA_CUDA_COMPILER", join_path(cuda_dir, "bin", "nvcc"))
+
- # Following 4 methods are stolen from OCCA since we are using OCCA
- # shipped with nekRS.
+class SetupEnvironment:
def _setup_runtime_flags(self, s_env):
spec = self.spec
- s_env.set("OCCA_CXX", self.compiler.cxx)
+ s_env.set("OCCA_CXX", self.pkg.compiler.cxx)
cxxflags = spec.compiler_flags["cxxflags"]
if cxxflags:
@@ -107,26 +137,14 @@ class Nekrs(Package, CudaPackage, ROCmPackage):
env.set("OCCA_VERBOSE", "1")
self._setup_runtime_flags(env)
- def setup_run_environment(self, env):
- # The 'env' is included in the Spack generated module files.
- self._setup_runtime_flags(env)
-
def setup_dependent_build_environment(self, env, dependent_spec):
# Export OCCA_* variables for everyone using this package from within
# Spack.
self._setup_runtime_flags(env)
- def install(self, spec, prefix):
- script_dir = "scripts"
-
- with working_dir(script_dir):
- # Make sure nekmpi wrapper uses srun when we know OpenMPI
- # is not built with mpiexec
- if "^openmpi~legacylaunchers" in spec:
- filter_file(r"mpirun -np", "srun -n", "nrsmpi")
- filter_file(r"mpirun -np", "srun -n", "nrspre")
- filter_file(r"mpirun -np", "srun -n", "nrsbmpi")
+class GenericBuilder(spack.build_systems.generic.GenericBuilder):
+ def install(self, pkg, spec, prefix):
makenrs = Executable(os.path.join(os.getcwd(), "makenrs"))
makenrs.add_default_env("NEKRS_INSTALL_DIR", prefix)
@@ -136,3 +154,17 @@ class Nekrs(Package, CudaPackage, ROCmPackage):
makenrs.add_default_env("TRAVIS", "true")
makenrs(output=str, error=str, fail_on_error=True)
+
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ cxxflags = self.spec.compiler_flags["cxxflags"]
+ args = [
+ self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx),
+ self.define("NEKRS_COMPILER_FLAGS", cxxflags),
+ self.define("OCCA_CXXFLAGS", cxxflags),
+ self.define_from_variant("ENABLE_CUDA", "cuda"),
+ self.define_from_variant("ENABLE_OPENCL", "opencl"),
+ self.define_from_variant("ENABLE_HIP", "rocm"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/nektar/package.py b/var/spack/repos/builtin/packages/nektar/package.py
index a236bd5c4e..482a66a31c 100644
--- a/var/spack/repos/builtin/packages/nektar/package.py
+++ b/var/spack/repos/builtin/packages/nektar/package.py
@@ -3,6 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
+import llnl.util.filesystem as fs
+
from spack.package import *
@@ -10,30 +14,109 @@ class Nektar(CMakePackage):
"""Nektar++: Spectral/hp Element Framework"""
homepage = "https://www.nektar.info/"
- url = "https://gitlab.nektar.info/nektar/nektar/-/archive/v4.4.1/nektar-v4.4.1.tar.bz2"
+ git = "https://gitlab.nektar.info/nektar/nektar.git"
- version("5.0.0", sha256="5c594453fbfaa433f732a55405da9bba27d4a00c32d7b9d7515767925fb4a818")
- version("4.4.1", sha256="71cfd93d848a751ae9ae5e5ba336cee4b4827d4abcd56f6b8dc5c460ed6b738c")
+ version("5.5.0", commit="4365d5d7156139f238db962deae5eb25e0437d12", preferred=True)
+ version("5.4.0", commit="002bf62648ec667e10524ceb8a98bb1c21804130")
+ version("5.3.0", commit="f286f809cfeb26cb73828c90a689a048898971d2")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("mpi", default=True, description="Builds with mpi support")
variant("fftw", default=True, description="Builds with fftw support")
variant("arpack", default=True, description="Builds with arpack support")
+ variant("tinyxml", default=True, description="Builds with external tinyxml support")
variant("hdf5", default=True, description="Builds with hdf5 support")
variant("scotch", default=False, description="Builds with scotch partitioning support")
+ variant("demos", default=False, description="Build demonstration codes")
+ variant("python", default=True, description="Enable python support")
+ # Solver variants
+ variant(
+ "acoustic_solver",
+ default=False,
+ description="Builds an executable associated with the Acoustic solver",
+ )
+ variant(
+ "adr_solver",
+ default=False,
+ description="Builds an executable associated with the ADR solver",
+ )
+ variant(
+ "cardiac_solver",
+ default=False,
+ description="Builds an executable associated with the Cardiac electrophysiology solver",
+ )
+ variant(
+ "compflow_solver",
+ default=False,
+ description="Builds an executable associated with the CompressibleFlow solver",
+ )
+ variant(
+ "diff_solver",
+ default=False,
+ description="Builds an executable associated with the Diffusion solver",
+ )
+ variant(
+ "dummy_solver",
+ default=False,
+ description="Builds an executable associated with the Dummy solver",
+ )
+ variant(
+ "elasticity_solver",
+ default=False,
+ description="Builds an executable associated with the Elasticity solver",
+ )
+ variant(
+ "imgwarp_solver",
+ default=False,
+ description="Builds an executable associated with the Image Warping solver",
+ )
+ variant(
+ "ins_solver",
+ default=False,
+ description="Builds an executable associated with the Incompressible Navier Stokes solver",
+ )
+ variant(
+ "mmf_solver",
+ default=False,
+ description="Builds an executable associated with the MMF solver",
+ )
+ variant(
+ "pulsewave_solver",
+ default=False,
+ description="Builds an executable associated with the Pulse Wave solver",
+ )
+ variant(
+ "shwater_solver",
+ default=False,
+ description="Builds an executable associated with the Shallow Water solver",
+ )
+ variant(
+ "vortexwave_solver",
+ default=False,
+ description="Builds an executable associated with the Vortex Wave solver",
+ )
depends_on("cmake@2.8.8:", type="build", when="~hdf5")
depends_on("cmake@3.2:", type="build", when="+hdf5")
depends_on("blas")
+ depends_on("zlib")
+ depends_on("tinyxml", when="+tinyxml")
depends_on("lapack")
depends_on(
- "boost@1.56.0:"
- "+iostreams+exception+filesystem+system+chrono+serialization"
- "+atomic+regex+math+thread+container"
+ "boost@1.74.0: +thread +iostreams +filesystem +system +program_options +regex +pic"
+ "+python +numpy",
+ when="+python",
+ )
+ depends_on(
+ "boost@1.74.0: +thread +iostreams +filesystem +system +program_options +regex +pic",
+ when="~python",
)
depends_on("tinyxml", when="platform=darwin")
- depends_on("mpi", when="+mpi")
+ depends_on("mpi", when="+mpi", type=("build", "link", "run"))
depends_on("fftw@3.0: +mpi", when="+mpi+fftw")
depends_on("fftw@3.0: ~mpi", when="~mpi+fftw")
depends_on("arpack-ng +mpi", when="+arpack+mpi")
@@ -42,18 +125,70 @@ class Nektar(CMakePackage):
depends_on("scotch ~mpi ~metis", when="~mpi+scotch")
depends_on("scotch +mpi ~metis", when="+mpi+scotch")
+ extends("python@3:", when="+python")
+
conflicts("+hdf5", when="~mpi", msg="Nektar's hdf5 output is for parallel builds only")
def cmake_args(self):
- args = []
-
def hasfeature(feature):
- return "ON" if feature in self.spec else "OFF"
-
- args.append("-DNEKTAR_USE_MPI=%s" % hasfeature("+mpi"))
- args.append("-DNEKTAR_USE_FFTW=%s" % hasfeature("+fftw"))
- args.append("-DNEKTAR_USE_ARPACK=%s" % hasfeature("+arpack"))
- args.append("-DNEKTAR_USE_HDF5=%s" % hasfeature("+hdf5"))
- args.append("-DNEKTAR_USE_SCOTCH=%s" % hasfeature("+scotch"))
- args.append("-DNEKTAR_USE_PETSC=OFF")
+ return True if feature in self.spec else False
+
+ args = [
+ self.define_from_variant("NEKTAR_BUILD_DEMOS", "demos"),
+ self.define_from_variant("NEKTAR_BUILD_PYTHON", "python"),
+ self.define("NEKTAR_BUILD_SOLVERS", True),
+ self.define("NEKTAR_BUILD_UTILITIES", True),
+ self.define("NEKTAR_ERROR_ON_WARNINGS", False),
+ self.define_from_variant("NEKTAR_SOLVER_ACOUSTIC", "acoustic_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_ADR", "adr_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_CARDIAC_EP", "cardiac_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_COMPRESSIBLE_FLOW", "compflow_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_DIFFUSION", "diff_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_DUMMY", "dummy_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_ELASTICITY", "elasticity_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_IMAGE_WARPING", "imgwarp_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_INCNAVIERSTOKES", "ins_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_MMF", "mmf_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_PULSEWAVE", "pulsewave_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_SHALLOW_WATER", "shwater_solver"),
+ self.define_from_variant("NEKTAR_SOLVER_VORTEXWAVE", "vortexwave_solver"),
+ self.define_from_variant("NEKTAR_USE_ARPACK", "arpack"),
+ self.define_from_variant("NEKTAR_USE_FFTW", "fftw"),
+ self.define_from_variant("NEKTAR_USE_HDF5", "hdf5"),
+ self.define_from_variant("NEKTAR_USE_MPI", "mpi"),
+ self.define("NEKTAR_USE_PETSC", False),
+ self.define_from_variant("NEKTAR_USE_SCOTCH", "scotch"),
+ self.define("NEKTAR_USE_THREAD_SAFETY", True),
+ self.define("NEKTAR_USE_MKL", hasfeature("^intel-oneapi-mkl")),
+ self.define("NEKTAR_USE_OPENBLAS", hasfeature("^openblas")),
+ ]
return args
+
+ def install(self, spec, prefix):
+ super(Nektar, self).install(spec, prefix)
+ if "+python" in spec:
+ python = which("python")
+ with fs.working_dir(self.build_directory):
+ python("setup.py", "install", "--prefix", prefix)
+
+ def setup_run_environment(self, env):
+ env.append_path(
+ "CMAKE_PREFIX_PATH",
+ os.path.join(
+ self.spec.prefix, os.path.join("lib64", os.path.join("nektar++", "cmake"))
+ ),
+ )
+ env.append_path(
+ "PYTHONPATH", os.path.abspath(os.path.join(self.spec.prefix, "build_tree"))
+ )
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ self.setup_run_environment(env)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ self.setup_run_environment(env)
+
+ def add_files_to_view(self, view, merge_map, skip_if_exists=True):
+ super(Nektar, self).add_files_to_view(view, merge_map, skip_if_exists)
+ path = self.view_destination(view)
+ view.link(os.path.join(path, "lib64", "nektar++"), os.path.join(path, "lib", "nektar++"))
diff --git a/var/spack/repos/builtin/packages/nektools/package.py b/var/spack/repos/builtin/packages/nektools/package.py
index 125b3838f3..90e7951449 100644
--- a/var/spack/repos/builtin/packages/nektools/package.py
+++ b/var/spack/repos/builtin/packages/nektools/package.py
@@ -40,6 +40,9 @@ class Nektools(Package):
version("19.0", sha256="db129877a10ff568d49edc77cf65f9e732eecb1fce10edbd91ffc5ac10c41ad6")
version("17.0", sha256="4d8d4793ce3c926c54e09a5a5968fa959fe0ba46bd2e6b8043e099528ee35a60")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Variant for MAXNEL, we need to read this from user
variant(
"MAXNEL",
diff --git a/var/spack/repos/builtin/packages/nemsio/package.py b/var/spack/repos/builtin/packages/nemsio/package.py
index 68b4edb15e..20696a70f6 100644
--- a/var/spack/repos/builtin/packages/nemsio/package.py
+++ b/var/spack/repos/builtin/packages/nemsio/package.py
@@ -28,6 +28,8 @@ class Nemsio(CMakePackage):
version("2.5.3", sha256="3fe8a781fc96197803d369cafe0138f3a5cbbca9816a7f8fd57567a1719a4d49")
version("2.5.2", sha256="c59e9379969690de8d030cbf4bbbbe3726faf13c304f3b88b0f6aec1496d2c08")
+ depends_on("fortran", type="build")
+
depends_on("bacio")
depends_on("mpi", when="+mpi")
@@ -44,3 +46,7 @@ class Nemsio(CMakePackage):
args.append(self.define("CMAKE_Fortran_COMPILER", self.spec["mpi"].mpifc))
return args
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/nemsiogfs/package.py b/var/spack/repos/builtin/packages/nemsiogfs/package.py
index cd632b01a2..21bb43c2ba 100644
--- a/var/spack/repos/builtin/packages/nemsiogfs/package.py
+++ b/var/spack/repos/builtin/packages/nemsiogfs/package.py
@@ -21,4 +21,10 @@ class Nemsiogfs(CMakePackage):
version("develop", branch="develop")
version("2.5.3", sha256="bf84206b08c8779787bef33e4aba18404df05f8b2fdd20fc40b3af608ae4b9af")
+ depends_on("fortran", type="build")
+
depends_on("nemsio")
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/neo4j/package.py b/var/spack/repos/builtin/packages/neo4j/package.py
index 68852cbeb6..cab9275612 100644
--- a/var/spack/repos/builtin/packages/neo4j/package.py
+++ b/var/spack/repos/builtin/packages/neo4j/package.py
@@ -17,13 +17,16 @@ class Neo4j(MavenPackage):
of magnitude performance benefits compared to relational DBs."""
homepage = "https://neo4j.com/"
- url = "https://github.com/neo4j/neo4j/archive/4.0.3.tar.gz"
+ url = "https://github.com/neo4j/neo4j/archive/5.17.0.tar.gz"
license("GPL-3.0-or-later")
+ version("5.17.0", sha256="13f43f099978ac639fd9008decaa783f04e3bd3d6957dd5109539e894dad879b")
version("4.0.3", sha256="19d79052657665dd661bbe906b3552b88108bf379d39fa007b883fff718cabee")
version("4.0.1", sha256="3f91f566e49000119c6a71d6127e73cfccdee37b68133a067b2ee05932c26dba")
version("4.0.0", sha256="7173b97baf53be82b46f95fa52f99af591606a318e03915917ddd7141936fec5")
version("3.5.16", sha256="1304fcd56b0f08f35b05d8b546fd844637ba1ffa5e00bb1e9a81a06b6242cb88")
+ depends_on("maven@3.8.2:", type="build", when="@5:")
+ depends_on("maven@3.6.2:", type="build", when="@4.4:")
depends_on("maven@3.5.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/neocmakelsp/package.py b/var/spack/repos/builtin/packages/neocmakelsp/package.py
new file mode 100644
index 0000000000..f0e2f2091b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/neocmakelsp/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Neocmakelsp(CargoPackage):
+ """Another cmake lsp"""
+
+ homepage = "https://neocmakelsp.github.io/"
+ url = "https://github.com/neocmakelsp/neocmakelsp/archive/refs/tags/v0.8.6.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.8.6", sha256="4ed270190eb08f5571da036fb0f91d53c1c3e09bf4631f77f2133d56fd8e2437")
+ version("0.8.5", sha256="3f3cb8736468bd0a9e9199b6913ae8b6f323d6ecdab932ba1da16a091a8b0de1")
+ version("0.8.4", sha256="cf395c16d14d16ad54deda0fc6d2e9f1160163417c716ad18030e611947f9600")
+ version("0.8.3", sha256="b679394030b670ed57be3b75c9818ef5ee4fa2eb2b8e7bd16a1e254feccd1a0e")
+ version("0.8.2", sha256="f463d20a28735bf131449f9e5ba790d24ee11badc6f017c3b99f803200c50f8c")
+ version("0.8.1", sha256="23d2fd6f6bd0152dad9b6bdf9b5d6932d97ccd106bfb47d6d6fee563ea5a7eec")
+ version("0.8.0", sha256="7fbe5501d36885e7a93b8d2122eb8506e6fa7d75d43718f0ee0fab09bc7ee5e8")
+ version("0.7.9", sha256="d1b6219e19f1ab630fbcb6d3179fcac5dc8dca1b7af355bb7516bc4345ce461b")
+ version("0.7.8", sha256="1026ab9f7c60b2c9f880df12830f2927b28b50a06bb5732d5047aefe22fa9b2f")
+ version("0.7.7", sha256="9c761a54ae8a6b298eabc9b7cb215fceafd27e9193eb61e1d69cd7a5dc6dd1c1")
diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py
index 3f9bbfc00d..5b7753876a 100644
--- a/var/spack/repos/builtin/packages/neovim/package.py
+++ b/var/spack/repos/builtin/packages/neovim/package.py
@@ -19,6 +19,9 @@ class Neovim(CMakePackage):
version("master", branch="master")
version("stable", tag="stable", commit="d772f697a281ce9c58bf933997b87c7f27428a60")
+ version("0.10.2", sha256="546cb2da9fffbb7e913261344bbf4cf1622721f6c5a67aa77609e976e78b8e89")
+ version("0.10.0", sha256="372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828")
+ version("0.9.5", sha256="fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719")
version("0.9.4", sha256="148356027ee8d586adebb6513a94d76accc79da9597109ace5c445b09d383093")
version("0.9.2", sha256="06b8518bad4237a28a67a4fbc16ec32581f35f216b27f4c98347acee7f5fb369")
version("0.9.1", sha256="8db17c2a1f4776dcda00e59489ea0d98ba82f7d1a8ea03281d640e58d8a3a00e")
@@ -77,6 +80,8 @@ class Neovim(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
variant(
"no_luajit",
default=False,
@@ -84,13 +89,12 @@ class Neovim(CMakePackage):
)
# depend on virtual, lua-luajit-openresty preferred
- depends_on("lua-lang")
depends_on("luajit", when="~no_luajit")
- depends_on("lua@5.1:5.1.99", when="+no_luajit")
+ depends_on("lua-lang@5.1", when="+no_luajit")
# dependencies to allow regular lua to work
- depends_on("lua-ffi", when="^lua", type=("link", "run"))
- depends_on("lua-bitlib", type=("link", "run"), when="^lua")
+ depends_on("lua-ffi", when="^[virtuals=lua-lang] lua", type=("link", "run"))
+ depends_on("lua-bitlib", when="^[virtuals=lua-lang] lua", type=("link", "run"))
# base dependencies
depends_on("cmake@3.0:", type="build")
@@ -136,6 +140,12 @@ class Neovim(CMakePackage):
depends_on("libvterm@0.3:", type="link")
with when("@0.9:"):
depends_on("tree-sitter@0.20.8:")
+ with when("@0.10:"):
+ depends_on("cmake@3.13:", type="build")
+ depends_on("libvterm@0.3.3:")
+ depends_on("tree-sitter@0.20.9:")
+ with when("@master"):
+ depends_on("utf8proc", type="link")
# Support for `libvterm@0.2:` has been added in neovim@0.8.0
# term: Add support for libvterm >= 0.2 (https://github.com/neovim/neovim/releases/tag/v0.8.0)
diff --git a/var/spack/repos/builtin/packages/nest/package.py b/var/spack/repos/builtin/packages/nest/package.py
index a664749bc6..416930ac7b 100644
--- a/var/spack/repos/builtin/packages/nest/package.py
+++ b/var/spack/repos/builtin/packages/nest/package.py
@@ -22,6 +22,9 @@ class Nest(CMakePackage):
version("3.0", sha256="d481ea67f3251fe3aadf5252ab0a999172f0cd5536c5985366d271d772e686e6")
version("2.20.1", sha256="df3d32b5899d5d444f708037b290f889ac6ff8eae6b7be9e9faee2c0d660d8e5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("ikitayama")
variant("python", default=False, description="Build the PyNest interface")
@@ -50,7 +53,7 @@ class Nest(CMakePackage):
depends_on("gsl", when="+gsl")
depends_on("readline")
- depends_on("libtool")
+ depends_on("libtool", type="link") # links against libltdl
depends_on("pkgconfig", type="build")
extends("python", when="+python")
diff --git a/var/spack/repos/builtin/packages/net-snmp/package.py b/var/spack/repos/builtin/packages/net-snmp/package.py
index d357340654..9c427f19c3 100644
--- a/var/spack/repos/builtin/packages/net-snmp/package.py
+++ b/var/spack/repos/builtin/packages/net-snmp/package.py
@@ -14,9 +14,12 @@ class NetSnmp(AutotoolsPackage):
license("Net-SNMP")
+ version("5.9.4", sha256="8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544")
version("5.9.1", sha256="eb7fd4a44de6cddbffd9a92a85ad1309e5c1054fb9d5a7dd93079c8953f48c3f")
version("5.9", sha256="04303a66f85d6d8b16d3cc53bde50428877c82ab524e17591dfceaeb94df6071")
+ depends_on("c", type="build")
+
depends_on("perl-extutils-makemaker")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/netcdf-c/netcdfc-mpi-win-support.patch b/var/spack/repos/builtin/packages/netcdf-c/netcdfc_correct_and_export_link_interface.patch
index 7075e39dfb..f1b826367d 100644
--- a/var/spack/repos/builtin/packages/netcdf-c/netcdfc-mpi-win-support.patch
+++ b/var/spack/repos/builtin/packages/netcdf-c/netcdfc_correct_and_export_link_interface.patch
@@ -1,8 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9b057311..37e96a96 100644
+index de95010c..25229f9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1471,6 +1471,7 @@ ENDIF()
+@@ -664,6 +664,7 @@ ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
+ # *
+ ##
+ SET(USE_HDF5 ${ENABLE_HDF5})
++SET(IMPORT_HDF5 "")
+ IF(USE_HDF5)
+
+ ##
+@@ -671,7 +672,6 @@ IF(USE_HDF5)
+ ##
+ SET(HDF5_VERSION_REQUIRED 1.8.10)
+
+-
+ ##
+ # Accommodate developers who have hdf5 libraries and
+ # headers on their system, but do not have a the hdf
+@@ -744,6 +744,9 @@ IF(USE_HDF5)
+ ELSE(MSVC)
+ FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ ENDIF(MSVC)
++ # Export HDF5 Dependency so consumers can properly use
++ # exported link interface
++ set(IMPORT_HDF5 "find_dependency(HDF5 COMPONENTS C HL)")
+
+ ##
+ # Next, check the HDF5 version. This will inform which
+@@ -1481,6 +1484,7 @@ ENDIF()
# Enable Parallel IO with netCDF-4/HDF5 files using HDF5 parallel I/O.
SET(STATUS_PARALLEL "OFF")
@@ -10,14 +36,23 @@ index 9b057311..37e96a96 100644
OPTION(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}")
IF(ENABLE_PARALLEL4 AND ENABLE_HDF5)
IF(NOT HDF5_PARALLEL)
-@@ -1492,6 +1493,7 @@ IF(ENABLE_PARALLEL4 AND ENABLE_HDF5)
+@@ -1502,6 +1506,7 @@ IF(ENABLE_PARALLEL4 AND ENABLE_HDF5)
FILE(COPY "${netCDF_BINARY_DIR}/tmp/run_par_tests.sh"
DESTINATION ${netCDF_BINARY_DIR}/h5_test
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-+ set(IMPORT_MPI "include(CMakeFindDependencyMacro)\nfind_dependency(mpi COMPONENTS C)")
++ set(IMPORT_MPI "find_dependency(MPI COMPONENTS C)")
ENDIF()
ENDIF()
+@@ -2652,6 +2657,8 @@ endif(DEFINED ENV{LIB_FUZZING_ENGINE})
+ # cmake should be able to find netcdf using find_package and find_library.
+ # The EXPORT call is paired with one in liblib.
+ set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF)
++set(IMPORT_FIND_DEP "include(CMakeFindDependencyMacro)")
++
+
+ install(EXPORT netCDFTargets
+ DESTINATION ${ConfigPackageLocation}
diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt
index e3eddc0f..0493cb9d 100644
--- a/liblib/CMakeLists.txt
@@ -31,14 +66,16 @@ index e3eddc0f..0493cb9d 100644
IF(MOD_NETCDF_NAME)
diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in
-index 9d68eec5..dae2429e 100644
+index 9d68eec5..eece09cb 100644
--- a/netCDFConfig.cmake.in
+++ b/netCDFConfig.cmake.in
-@@ -14,6 +14,8 @@ set(netCDF_LIBRARIES netCDF::netcdf)
+@@ -14,6 +14,10 @@ set(netCDF_LIBRARIES netCDF::netcdf)
# include target information
include("${CMAKE_CURRENT_LIST_DIR}/netCDFTargets.cmake")
++@IMPORT_FIND_DEP@
+@IMPORT_MPI@
++@IMPORT_HDF5@
+
# Compiling Options
#
diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py
index fcde80a296..d2d05a29d6 100644
--- a/var/spack/repos/builtin/packages/netcdf-c/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-c/package.py
@@ -9,7 +9,6 @@ import sys
from llnl.util.lang import dedupe
-import spack.builder
from spack.build_systems import autotools, cmake
from spack.package import *
from spack.util.environment import filter_system_paths
@@ -53,14 +52,20 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
version("4.3.3.1", sha256="f2ee78eb310637c007f001e7c18e2d773d23f3455242bde89647137b7344c2e2")
version("4.3.3", sha256="3f16e21bc3dfeb3973252b9addf5defb48994f84fc9c9356081f871526a680e7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
with when("build_system=cmake"):
# TODO: document why we need to revert https://github.com/Unidata/netcdf-c/pull/1731
# with the following patch:
patch("4.8.1-win-hdf5-with-zlib.patch", when="@4.8.1: platform=windows")
- # TODO: fetch from the upstream repo once https://github.com/Unidata/netcdf-c/pull/2595
- # is accepted:
- patch("netcdfc-mpi-win-support.patch", when="platform=windows")
+ # TODO: https://github.com/Unidata/netcdf-c/pull/2595 contains some of the changes
+ # made in this patch but is not sufficent to replace the patch. There is currently
+ # no upstream PR (or set of PRs) covering all changes in this path.
+ # When #2595 lands, this patch should be updated to include only
+ # the changes not incorporated into that PR
+ patch("netcdfc_correct_and_export_link_interface.patch")
# Some of the patches touch configure.ac and, therefore, require forcing the autoreconf stage:
_force_autoreconf_when = []
@@ -131,6 +136,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
variant("fsync", default=False, description="Enable fsync support")
variant("nczarr_zip", default=False, description="Enable NCZarr zipfile format storage")
variant("optimize", default=True, description="Enable -O2 for a more optimized lib")
+ variant("logging", default=False, description="Enable logging")
variant("szip", default=True, description="Enable Szip compression plugin")
variant("blosc", default=True, description="Enable Blosc compression plugin")
@@ -161,7 +167,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
# The man files are included in the release tarballs starting version 4.5.0 but they are not
# needed for the Windows platform:
- for __p in ["darwin", "cray", "linux"]:
+ for __p in ["darwin", "linux"]:
with when("platform={0}".format(__p)):
# It is possible to install the package with CMake and without M4 on a non-Windows
# platform but some of the man files will not be installed in that case (even if they
@@ -244,10 +250,10 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
# later is required for netCDF-4 compression. However, zlib became a direct dependency only
# starting NetCDF 4.9.0 (for the deflate plugin):
depends_on("zlib-api", when="@4.9.0:+shared")
- depends_on("zlib@1.2.5:", when="^zlib")
+ depends_on("zlib@1.2.5:", when="^[virtuals=zlib-api] zlib")
# Use the vendored bzip2 on Windows:
- for __p in ["darwin", "cray", "linux"]:
+ for __p in ["darwin", "linux"]:
depends_on("bzip2", when="@4.9.0:+shared platform={0}".format(__p))
del __p
@@ -284,7 +290,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
env.append_path("HDF5_PLUGIN_PATH", self.prefix.plugins)
def flag_handler(self, name, flags):
- if self.builder.build_system == "autotools":
+ if self.spec.satisfies("build_system=autotools"):
if name == "cflags":
if "+pic" in self.spec:
flags.append(self.compiler.cc_pic_flag)
@@ -298,9 +304,8 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
return find_libraries("libnetcdf", root=self.prefix, shared=shared, recursive=True)
-class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
+class AnyBuilder(BaseBuilder):
def setup_dependent_build_environment(self, env, dependent_spec):
- self.pkg.setup_run_environment(env)
# Some packages, e.g. ncview, refuse to build if the compiler path returned by nc-config
# differs from the path to the compiler that the package should be built with. Therefore,
# we have to shadow nc-config from self.prefix.bin, which references the real compiler,
@@ -323,7 +328,7 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
filter_compiler_wrappers("nc-config", relative_root="bin")
-class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
+class CMakeBuilder(AnyBuilder, cmake.CMakeBuilder):
def cmake_args(self):
base_cmake_args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
@@ -335,6 +340,7 @@ class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
self.define("ENABLE_PARALLEL_TESTS", False),
self.define_from_variant("ENABLE_FSYNC", "fsync"),
self.define("ENABLE_LARGE_FILE_SUPPORT", True),
+ self.define_from_variant("NETCDF_ENABLE_LOGGING", "logging"),
]
if "+parallel-netcdf" in self.pkg.spec:
base_cmake_args.append(self.define("ENABLE_PNETCDF", True))
@@ -343,10 +349,33 @@ class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
if "platform=windows" in self.pkg.spec:
# Enforce the usage of the vendored version of bzip2 on Windows:
base_cmake_args.append(self.define("Bz2_INCLUDE_DIRS", ""))
+ if "+shared" in self.pkg.spec["hdf5"]:
+ base_cmake_args.append(self.define("NC_FIND_SHARED_LIBS", True))
+ else:
+ base_cmake_args.append(self.define("NC_FIND_SHARED_LIBS", False))
return base_cmake_args
-
-class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
+ @run_after("install")
+ def patch_hdf5_pkgconfigcmake(self):
+ """
+ Incorrect hdf5 library names are put in the package config files
+ due to incorrectly using hdf5 target names
+ https://github.com/spack/spack/pull/42878
+ """
+ if sys.platform == "win32":
+ return
+
+ pkgconfig_file = find(self.prefix, "netcdf.pc", recursive=True)
+ ncconfig_file = find(self.prefix, "nc-config", recursive=True)
+ settingsconfig_file = find(self.prefix, "libnetcdf.settings", recursive=True)
+
+ files = pkgconfig_file + ncconfig_file + settingsconfig_file
+ config = "shared" if self.spec.satisfies("+shared") else "static"
+ filter_file(f"hdf5-{config}", "hdf5", *files, ignore_absent=True)
+ filter_file(f"hdf5_hl-{config}", "hdf5_hl", *files, ignore_absent=True)
+
+
+class AutotoolsBuilder(AnyBuilder, autotools.AutotoolsBuilder):
@property
def force_autoreconf(self):
return any(self.spec.satisfies(s) for s in self.pkg._force_autoreconf_when)
@@ -406,6 +435,8 @@ class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
config_args += self.enable_or_disable("fsync")
+ config_args += self.enable_or_disable("logging")
+
if any(self.spec.satisfies(s) for s in ["+mpi", "+parallel-netcdf", "^hdf5+mpi~shared"]):
config_args.append("CC={0}".format(self.spec["mpi"].mpicc))
@@ -434,7 +465,7 @@ class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
# introduced by the configure script:
if "+szip" in hdf:
extra_libs.append(hdf["szip"].libs)
- if "+external-xdr" in hdf:
+ if "+external-xdr ^libtirpc" in hdf:
extra_libs.append(hdf["rpc"].libs)
extra_libs.append(hdf["zlib-api"].libs)
diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py
index 876e85b30b..87652b559f 100644
--- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py
@@ -15,10 +15,15 @@ class NetcdfCxx(AutotoolsPackage):
homepage = "https://www.unidata.ucar.edu/software/netcdf"
url = "https://downloads.unidata.ucar.edu/netcdf-cxx/4.2/netcdf-cxx-4.2.tar.gz"
+ maintainers("climbfuji")
+
license("NetCDF")
version("4.2", sha256="95ed6ab49a0ee001255eac4e44aacb5ca4ea96ba850c08337a3e4c9a0872ccd1")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("netcdf-c")
variant("netcdf4", default=True, description="Compile with netCDF4 support")
diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
index a24a031732..8e9f29584e 100644
--- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
@@ -3,12 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
-class NetcdfCxx4(AutotoolsPackage):
+class NetcdfCxx4(CMakePackage):
"""NetCDF (network Common Data Form) is a set of software libraries and
machine-independent data formats that support the creation, access, and
sharing of array-oriented scientific data. This is the C++ distribution."""
@@ -26,120 +24,71 @@ class NetcdfCxx4(AutotoolsPackage):
variant("shared", default=True, description="Enable shared library")
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
variant("doc", default=False, description="Enable doxygen docs")
+ variant("tests", default=False, description="Enable CTest-based tests, dashboards.")
- depends_on("netcdf-c")
+ # If another cmake-built netcdf-c exists outside of spack e.g., homebrew's libnetcdf,
+ # then cmake will choose that external netcdf-c.
+ # This approach ensures the config.cmake exists, and thus ensures the spack version is
+ # found before the system's
+ depends_on("netcdf-c build_system=cmake")
+ depends_on("hdf5")
+ # if we link against an mpi-aware hdf5 then this needs to also be mpi aware for tests
+ depends_on("mpi", when="+tests ^hdf5+mpi")
depends_on("doxygen", when="+doc", type="build")
filter_compiler_wrappers("ncxx4-config", relative_root="bin")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
def flag_handler(self, name, flags):
if name == "cflags" and "+pic" in self.spec:
flags.append(self.compiler.cc_pic_flag)
if name == "cxxflags" and "+pic" in self.spec:
flags.append(self.compiler.cxx_pic_flag)
- elif name == "ldlibs":
- # Address the underlinking problem reported in
- # https://github.com/Unidata/netcdf-cxx4/issues/86, which also
- # results into a linking error on macOS:
- flags.append(self.spec["netcdf-c"].libs.link_flags)
-
- # Note that cflags and cxxflags should be added by the compiler wrapper
- # and not on the command line to avoid overriding the default
- # compilation flags set by the configure script:
+
return flags, None, None
@property
def libs(self):
libraries = ["libnetcdf_c++4"]
-
- query_parameters = self.spec.last_query.extra_parameters
-
- if "shared" in query_parameters:
- shared = True
- elif "static" in query_parameters:
- shared = False
- else:
- shared = "+shared" in self.spec
+ shared = "+shared" in self.spec
libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True)
-
if libs:
return libs
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
- @when("@4.3.1:+shared")
- @on_package_attributes(run_tests=True)
def patch(self):
- # We enable the filter tests only when the tests are requested by the
- # user. This, however, has a side effect: an extra file 'libh5bzip2.so'
- # gets installed (note that the file has .so extension even on darwin).
- # It's unclear whether that is intended but given the description of the
- # configure option --disable-filter-testing (Do not run filter test and
- # example; requires shared libraries and netCDF-4), we currently assume
- # that the file is not really meant for the installation. To make all
- # installations consistent and independent of whether the shared
- # libraries or the tests are requested, we prevent installation of
- # 'libh5bzip2.so':
+ # An incorrect value is queried post find_package(HDF5)
+ # This looks to be resolved in master, but not any of the tag releases
+ # https://github.com/Unidata/netcdf-cxx4/issues/88
filter_file(
- r"(^\s*)lib(_LTLIBRARIES\s*)(=\s*libh5bzip2\.la\s*$)",
- r"\1noinst\2+\3",
- join_path(self.stage.source_path, "plugins", "Makefile.in"),
+ r"HDF5_C_LIBRARY_hdf5",
+ "HDF5_C_LIBRARIES",
+ join_path(self.stage.source_path, "CMakeLists.txt"),
)
- def configure_args(self):
- config_args = self.enable_or_disable("shared")
-
- if "+doc" in self.spec:
- config_args.append("--enable-doxygen")
- else:
- config_args.append("--disable-doxygen")
-
- if self.spec.satisfies("@4.3.1:"):
- if self.run_tests and "+shared" in self.spec:
- config_args.append("--enable-filter-testing")
- if self.spec.satisfies("^hdf5+mpi"):
- # The package itself does not need the MPI libraries but
- # includes <hdf5.h> in the filter test C code, which
- # requires <mpi.h> when HDF5 is built with the MPI support.
- # Using the MPI wrapper introduces overlinking to MPI
- # libraries and we would prefer not to use it but it is the
- # only reliable way to provide the compiler with the correct
- # path to <mpi.h>. For example, <mpi.h> of a MacPorts-built
- # MPICH might reside in /opt/local/include/mpich-gcc10,
- # which Spack does not know about and cannot inject with its
- # compiler wrapper.
- config_args.append("CC={0}".format(self.spec["mpi"].mpicc))
- else:
- config_args.append("--disable-filter-testing")
-
- return config_args
-
- @run_after("configure")
- def rename_version(self):
- # See https://github.com/Unidata/netcdf-cxx4/issues/109
- # The issue is fixed upstream:
- # https://github.com/Unidata/netcdf-cxx4/commit/e7cc5bab02cf089dc79616456a0a951fee979fe9
- # We do not apply the upstream patch because we want to avoid running
- # autoreconf and introduce additional dependencies. We do not generate a
- # patch for the configure script because the patched string contains the
- # version and we would need a patch file for each supported version of
- # the library. We do not implement the patching with filter_file in the
- # patch method because writing a robust regexp seems to be more
- # difficult that simply renaming the file if exists. It also looks like
- # we can simply remove the file since it is not used anywhere.
- if not self.spec.satisfies("@:4.3.1 platform=darwin"):
- return
+ filter_file(
+ r"HDF5_C_LIBRARY_hdf5",
+ "HDF5_C_LIBRARIES",
+ join_path(self.stage.source_path, "cxx4", "CMakeLists.txt"),
+ )
- with working_dir(self.build_directory):
- fname = "VERSION"
- if os.path.exists(fname):
- os.rename(fname, "{0}.txt".format(fname))
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("ENABLE_DOXYGEN", "doc"),
+ self.define_from_variant("NCXX_ENABLE_TESTS", "tests"),
+ ]
+
+ return args
def check(self):
with working_dir(self.build_directory):
- make("check", parallel=False)
+ make("test", parallel=False)
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
index c30bf0b684..ba33ee5128 100644
--- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
@@ -32,6 +32,9 @@ class NetcdfFortran(AutotoolsPackage):
version("4.4.4", sha256="b2d395175f8d283e68c8be516e231a96b191ade67ad0caafaf7fa01b1e6b5d75")
version("4.4.3", sha256="330373aa163d5931e475b5e83da5c1ad041e855185f24e6a8b85d73b48d6cda9")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
variant("shared", default=True, description="Enable shared library")
variant("doc", default=False, description="Enable building docs")
@@ -40,6 +43,12 @@ class NetcdfFortran(AutotoolsPackage):
depends_on("netcdf-c@4.7.4:", when="@4.5.3:") # nc_def_var_szip required
depends_on("doxygen", when="+doc", type="build")
+ # We need to use MPI wrappers when building against static MPI-enabled NetCDF and/or HDF5:
+ with when("^netcdf-c~shared"):
+ depends_on("mpi", when="^netcdf-c+mpi")
+ depends_on("mpi", when="^netcdf-c+parallel-netcdf")
+ depends_on("mpi", when="^hdf5+mpi~shared")
+
# Enable 'make check' for NAG, which is too strict.
patch("nag_testing.patch", when="@4.4.5%nag")
@@ -103,7 +112,7 @@ class NetcdfFortran(AutotoolsPackage):
return libs
msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
)
@@ -129,6 +138,12 @@ class NetcdfFortran(AutotoolsPackage):
# configuration failure, we set the following cache variable:
config_args.append("ac_cv_func_MPI_File_open=yes")
+ if "~shared" in netcdf_c_spec:
+ nc_config = which("nc-config")
+ config_args.append("LIBS={0}".format(nc_config("--libs", output=str).strip()))
+ if any(s in netcdf_c_spec for s in ["+mpi", "+parallel-netcdf", "^hdf5+mpi~shared"]):
+ config_args.append("CC=%s" % self.spec["mpi"].mpicc)
+
return config_args
def check(self):
@@ -141,7 +156,7 @@ class NetcdfFortran(AutotoolsPackage):
# To avoid warning messages when compiler user applications in both
# cases, we create copies of all '*.mod' files in the prefix/include
# with names in upper- and lowercase.
- if self.spec.compiler.name != "cce":
+ if not self.spec.satisfies("%cce"):
return
with working_dir(self.spec.prefix.include):
diff --git a/var/spack/repos/builtin/packages/netcdf95/package.py b/var/spack/repos/builtin/packages/netcdf95/package.py
index 52a03c2b63..69df842571 100644
--- a/var/spack/repos/builtin/packages/netcdf95/package.py
+++ b/var/spack/repos/builtin/packages/netcdf95/package.py
@@ -19,4 +19,7 @@ class Netcdf95(CMakePackage):
version("0.3", tag="v0.3", commit="5b8db6bb66a22b6a080589ee1c11521ee3cae550", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("netcdf-fortran")
diff --git a/var/spack/repos/builtin/packages/netdata/package.py b/var/spack/repos/builtin/packages/netdata/package.py
index db657b7b64..e9dda6be8c 100644
--- a/var/spack/repos/builtin/packages/netdata/package.py
+++ b/var/spack/repos/builtin/packages/netdata/package.py
@@ -14,11 +14,16 @@ class Netdata(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("1.44.2", sha256="9b9267b03af90fe8754f2fb5d16f7f6c60f770d2e890dbc55fd9dcdfd2a4179a")
version("1.38.1", sha256="e32a5427f0c00550210dbbf0046c2621313955256edf836db686e2bc270b8d10")
version("1.31.0", sha256="ca68f725224e8bbec041b493891376fbf41aedb47c4ac06161c2eda990089c9f")
version("1.30.1", sha256="3df188ac04f17094cb929e2990841ba77f68aa6af484e0509b99db298fa206c9")
version("1.22.1", sha256="f169c8615a6823448c2f1923c87c286d798132ea29d26f366e96d26e0aec3697")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("json-c")
depends_on("judy")
diff --git a/var/spack/repos/builtin/packages/netgauge/package.py b/var/spack/repos/builtin/packages/netgauge/package.py
index 692ce5af1b..108abb8dd9 100644
--- a/var/spack/repos/builtin/packages/netgauge/package.py
+++ b/var/spack/repos/builtin/packages/netgauge/package.py
@@ -22,6 +22,9 @@ class Netgauge(AutotoolsPackage):
version("2.4.6", sha256="dc9398e4e042efec70881f2c7074ff18cc5b74bc5ffc4b8a4aaf813b39f83444")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/netgen/package.py b/var/spack/repos/builtin/packages/netgen/package.py
index 4430a25309..75b1fa6ee8 100644
--- a/var/spack/repos/builtin/packages/netgen/package.py
+++ b/var/spack/repos/builtin/packages/netgen/package.py
@@ -19,6 +19,8 @@ class Netgen(AutotoolsPackage):
version("5.3.1", sha256="cb97f79d8f4d55c00506ab334867285cde10873c8a8dc783522b47d2bc128bf9")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="enable mpi support")
variant("oce", default=False, description="enable oce geometry kernel")
variant("gui", default=False, description="enable gui")
diff --git a/var/spack/repos/builtin/packages/netkit-ftp/package.py b/var/spack/repos/builtin/packages/netkit-ftp/package.py
index beb565e4f1..8b2e373dbe 100644
--- a/var/spack/repos/builtin/packages/netkit-ftp/package.py
+++ b/var/spack/repos/builtin/packages/netkit-ftp/package.py
@@ -16,6 +16,8 @@ class NetkitFtp(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
mkdirp(prefix.man.man1)
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index 2b6eb12fa1..20d9a0664f 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -61,6 +61,9 @@ class NetlibLapack(CMakePackage):
version("3.4.0", sha256="a7139ef97004d0e3c4c30f1c52d508fd7ae84b5fbaf0dd8e792c167dc306c3e9")
version("3.3.1", sha256="56821ab51c29369a34e5085728f92c549a9aa926f26acf7eeac87b61eed329e4")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# netlib-lapack is the reference implementation of LAPACK
for ver in [
"3.10.1",
@@ -81,6 +84,7 @@ class NetlibLapack(CMakePackage):
provides("lapack@" + ver, when="@" + ver)
variant("shared", default=True, description="Build shared library version")
+ variant("pic", default=True, description="Produce position-independent code")
variant("external-blas", default=False, description="Build lapack with an external blas")
variant("lapacke", default=True, description="Activates the build of the LAPACKE C interface")
@@ -108,8 +112,9 @@ class NetlibLapack(CMakePackage):
# https://github.com/Reference-LAPACK/lapack/pull/268
patch("testing.patch", when="@3.7.0:3.8")
- # virtual dependency
- provides("blas", when="~external-blas")
+ # liblapack links to libblas, so if this package is used as a lapack
+ # provider, it must also provide blas.
+ provides("lapack", "blas", when="~external-blas")
provides("lapack")
depends_on("blas", when="+external-blas")
@@ -143,15 +148,22 @@ class NetlibLapack(CMakePackage):
if self.spec.satisfies("platform=windows @0:3.9.1"):
force_remove("LAPACKE/include/lapacke_mangling.h")
+ def xplatform_lib_name(self, lib):
+ return (
+ "lib" + lib
+ if not lib.startswith("lib") and not self.spec.satisfies("platform=windows")
+ else lib
+ )
+
@property
def blas_libs(self):
- shared = True if "+shared" in self.spec else False
+ shared = "+shared" in self.spec
query_parameters = self.spec.last_query.extra_parameters
query2libraries = {
- tuple(): ["libblas"],
- ("c", "fortran"): ["libcblas", "libblas"],
- ("c",): ["libcblas"],
- ("fortran",): ["libblas"],
+ tuple(): [self.xplatform_lib_name("blas")],
+ ("c", "fortran"): [self.xplatform_lib_name("cblas"), self.xplatform_lib_name("blas")],
+ ("c",): [self.xplatform_lib_name("cblas")],
+ ("fortran",): [self.xplatform_lib_name("blas")],
}
key = tuple(sorted(query_parameters))
libraries = query2libraries[key]
@@ -162,10 +174,13 @@ class NetlibLapack(CMakePackage):
shared = True if "+shared" in self.spec else False
query_parameters = self.spec.last_query.extra_parameters
query2libraries = {
- tuple(): ["liblapack"],
- ("c", "fortran"): ["liblapacke", "liblapack"],
- ("c",): ["liblapacke"],
- ("fortran",): ["liblapack"],
+ tuple(): [self.xplatform_lib_name("lapack")],
+ ("c", "fortran"): [
+ self.xplatform_lib_name("lapacke"),
+ self.xplatform_lib_name("lapack"),
+ ],
+ ("c",): [self.xplatform_lib_name("lapacke")],
+ ("fortran",): [self.xplatform_lib_name("lapack")],
}
key = tuple(sorted(query_parameters))
libraries = query2libraries[key]
@@ -183,6 +198,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
self.define_from_variant("LAPACKE", "lapacke"),
self.define_from_variant("LAPACKE_WITH_TMG", "lapacke"),
self.define("CBLAS", self.spec.satisfies("@3.6.0:")),
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index df3792b93b..d3b9787851 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -41,11 +41,16 @@ class ScalapackBase(CMakePackage):
patch("fix-build-macos.patch", when="@2.2.0")
def flag_handler(self, name, flags):
- iflags = []
- if name == "fflags":
+ if name == "cflags":
if self.spec.satisfies("%cce"):
- iflags.append("-hnopattern")
- return (iflags, None, None)
+ flags.append("-Wno-error=implicit-function-declaration")
+ if self.spec.satisfies("%gcc@14:"):
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2178710
+ flags.append("-std=gnu89")
+ elif name == "fflags":
+ if self.spec.satisfies("%cce"):
+ flags.append("-hnopattern")
+ return (flags, None, None)
@property
def libs(self):
@@ -87,6 +92,8 @@ class ScalapackBase(CMakePackage):
or spec.satisfies("%apple-clang")
or spec.satisfies("%oneapi")
or spec.satisfies("%arm")
+ or spec.satisfies("%cce")
+ or spec.satisfies("%rocmcc")
):
c_flags.append("-Wno-error=implicit-function-declaration")
@@ -111,6 +118,8 @@ class NetlibScalapack(ScalapackBase):
git = "https://github.com/Reference-ScaLAPACK/scalapack"
tags = ["e4s"]
+ maintainers("etiennemlb")
+
license("BSD-3-Clause-Open-MPI")
version("2.2.0", sha256="40b9406c20735a9a3009d863318cb8d3e496fb073d201c5463df810e01ab2a57")
@@ -119,5 +128,8 @@ class NetlibScalapack(ScalapackBase):
version("2.0.1", sha256="a9b34278d4e10b40cbe084c6d87d09af8845e874250719bfbbc497b2a88bfde1")
version("2.0.0", sha256="e51fbd9c3ef3a0dbd81385b868e2355900148eea689bf915c5383d72daf73114")
version("master", branch="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
# versions before 2.0.0 are not using cmake and requires blacs as
# a separated package
diff --git a/var/spack/repos/builtin/packages/netlib-xblas/package.py b/var/spack/repos/builtin/packages/netlib-xblas/package.py
index 787fe90024..0b04a8f895 100644
--- a/var/spack/repos/builtin/packages/netlib-xblas/package.py
+++ b/var/spack/repos/builtin/packages/netlib-xblas/package.py
@@ -27,6 +27,9 @@ class NetlibXblas(AutotoolsPackage):
version("1.0.248", sha256="b5fe7c71c2da1ed9bcdc5784a12c5fa9fb417577513fe8a38de5de0007f7aaa1")
+ depends_on("c", type="build")
+ depends_on("m4", type="build")
+
variant("fortran", default=True, description="Build Fortran interfaces")
variant("plain_blas", default=True, description="As part of XBLAS, build plain BLAS routines")
diff --git a/var/spack/repos/builtin/packages/netpbm/package.py b/var/spack/repos/builtin/packages/netpbm/package.py
index 320a414e2d..512a2251d4 100644
--- a/var/spack/repos/builtin/packages/netpbm/package.py
+++ b/var/spack/repos/builtin/packages/netpbm/package.py
@@ -19,7 +19,7 @@ class Netpbm(MakefilePackage):
editing tools such as magnifying and cropping.
"""
- homepage = "http://netpbm.sourceforge.net"
+ homepage = "https://netpbm.sourceforge.net"
url = "https://sourceforge.net/projects/netpbm/files/super_stable/10.73.35/netpbm-10.73.35.tgz"
maintainers("cessenat")
@@ -30,6 +30,8 @@ class Netpbm(MakefilePackage):
version("10.73.40", sha256="8542ae62aa744dfd52c8e425208f895f082955a0629ac1749f80278d6afc0344")
version("10.73.35", sha256="628dbe8490bc43557813d1fedb2720dfdca0b80dd3f2364cb2a45c6ff04b0f18")
+ depends_on("c", type="build") # generated
+
# As a default we wish to commpile absolutely everything at once.
# Variants are there in case compilation was a problem.
variant("all", default=True, description="Enable all 3rd party libs")
diff --git a/var/spack/repos/builtin/packages/netperf/package.py b/var/spack/repos/builtin/packages/netperf/package.py
index ce320812fc..aacf408c1a 100644
--- a/var/spack/repos/builtin/packages/netperf/package.py
+++ b/var/spack/repos/builtin/packages/netperf/package.py
@@ -17,3 +17,5 @@ class Netperf(AutotoolsPackage):
version("2.7.0", sha256="4569bafa4cca3d548eb96a486755af40bd9ceb6ab7c6abd81cc6aa4875007c4e")
version("2.6.0", sha256="560b9c0ef0eed826941f74708b3ac53d91ec13b0b8c565fb107a1b5e6d99ded4")
version("2.5.0", sha256="bebc94102fb74071cf289e0c116f83920dbd982f9e6c913ec0f1c7f6fcffbf77")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py
index 1ebcd3fc0d..df7f51d350 100644
--- a/var/spack/repos/builtin/packages/nettle/package.py
+++ b/var/spack/repos/builtin/packages/nettle/package.py
@@ -24,9 +24,16 @@ class Nettle(AutotoolsPackage, GNUMirrorPackage):
version("2.7.1", sha256="bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40")
version("2.7", sha256="c294ea133c05382cc2effb1734d49f4abeb1ad8515543a333de49a11422cd4d6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp")
depends_on("m4", type="build")
- depends_on("openssl")
+
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ flags.append(self.compiler.c99_flag)
+ return (flags, None, None)
def configure_args(self):
- return ["CFLAGS={0}".format(self.compiler.c99_flag)]
+ return ["--disable-openssl"]
diff --git a/var/spack/repos/builtin/packages/neuron/package.py b/var/spack/repos/builtin/packages/neuron/package.py
index aa3b0c76d5..2cb16fdd03 100644
--- a/var/spack/repos/builtin/packages/neuron/package.py
+++ b/var/spack/repos/builtin/packages/neuron/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_environment import optimization_flags
from spack.package import *
@@ -16,89 +17,141 @@ class Neuron(CMakePackage):
"""
homepage = "https://www.neuron.yale.edu/"
- url = "https://neuron.yale.edu/ftp/neuron/versions/v7.7/nrn-7.7.tar.gz"
+ url = "https://github.com/neuronsimulator/nrn/releases/download/8.2.3/nrn-full-src-package-8.2.3.tar.gz"
git = "https://github.com/neuronsimulator/nrn"
- maintainers("pramodk", "nrnhines", "iomaganaris", "alexsavulescu")
+ maintainers("pramodk", "nrnhines", "iomaganaris", "ohm314", "matz-e")
license("BSD-3-Clause")
version("develop", branch="master", submodules="True")
+
version(
- "8.0.0", tag="8.0.0", commit="429d11ef34b1d860b3ddbfffc9f7960acb399b0c", submodules="True"
+ "8.2.3", tag="8.2.3", commit="f0ed3701059aa53ce93387f3d73d13c45de6d87f", submodules="True"
)
version(
- "7.8.2", tag="7.8.2", commit="09b151ecb2b3984335c265932dc6ba3e4fcb318e", submodules="True"
+ "8.1.0", tag="8.1.0", commit="047dd8240c2badadf5ea154b563b29369db1303f", submodules="True"
)
version(
- "7.8.1", tag="7.8.1", commit="47cd8c85aa3fde5dbb7319facd6f475438235d7d", submodules="True"
+ "8.0.0", tag="8.0.0", commit="429d11ef34b1d860b3ddbfffc9f7960acb399b0c", submodules="True"
+ )
+ version(
+ "7.8.2", tag="7.8.2", commit="09b151ecb2b3984335c265932dc6ba3e4fcb318e", submodules="True"
)
- variant("coreneuron", default=False, description="Enable CoreNEURON as submodule")
- variant("cross-compile", default=False, description="Build for cross-compile environment")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("backtrace", default=False, description="Enable printing backtraces on failure")
variant("interviews", default=False, description="Enable GUI with INTERVIEWS")
variant("legacy-unit", default=False, description="Enable legacy units")
variant("mpi", default=True, description="Enable MPI parallelism")
variant("python", default=True, description="Enable python")
- variant("rx3d", default=False, description="Enable cython translated 3-d rxd")
- variant("tests", default=False, description="Enable unit tests")
- variant("caliper", default=False, description="Add LLNL/Caliper support")
+ variant("shared", default=True, description="Build shared library (CoreNEURON)")
+ variant("tests", default=False, description="Enable building tests")
+ variant("rx3d", default=False, description="Enable cython translated 3-d rxd.", when="+python")
+
+ # variants from coreneuron support
+ variant("coreneuron", default=True, description="Enable CoreNEURON support")
+ variant(
+ "gpu", default=False, description="Enable GPU build (with NVHPC)", when="@9:+coreneuron"
+ )
+ variant(
+ "openmp", default=False, description="Enable CoreNEURON OpenMP support", when="+coreneuron"
+ )
+ variant(
+ "sympy",
+ default=False,
+ description="Use NMODL with SymPy to solve ODEs",
+ when="@9:+coreneuron",
+ )
+ variant("caliper", default=False, description="Add Caliper support")
- depends_on("bison", type="build")
- depends_on("flex", type="build")
- depends_on("py-cython", when="+rx3d", type="build")
+ generator("ninja")
+
+ depends_on("bison@3:", type="build")
+ depends_on("flex@2.6:", type="build")
+ depends_on("ninja", type="build")
depends_on("gettext")
+ depends_on("libdwarf", when="+backtrace")
depends_on("mpi", when="+mpi")
depends_on("ncurses")
- depends_on("python@2.7:", when="+python")
+ depends_on("readline")
+
+ depends_on("python", when="+python")
depends_on("py-pytest", when="+python+tests")
depends_on("py-mpi4py", when="+mpi+python+tests")
- depends_on("readline")
+ depends_on("py-numpy", when="+python")
+ depends_on("py-cython", when="+rx3d", type="build")
+ depends_on("py-pytest-cov", when="+tests")
+
+ # next two needed after neuronsimulator/nrn#2235.
+ depends_on("py-pip", type="build")
+ depends_on("py-setuptools", type="build")
+ depends_on("py-packaging", type="run")
+
+ depends_on("boost", when="+coreneuron+tests")
+ depends_on("cuda", when="+coreneuron+gpu")
+ depends_on("py-sympy@1.3:", when="+coreneuron")
+
depends_on("caliper", when="+caliper")
- depends_on("py-numpy", type="run")
- conflicts("+rx3d", when="~python")
+ gpu_compiler_message = "neuron+gpu needs %nvhpc"
+ requires("%nvhpc", when="+gpu", msg=gpu_compiler_message)
patch("patch-v782-git-cmake-avx512.patch", when="@7.8.2")
def cmake_args(self):
spec = self.spec
+ args = []
+ for variant in ["backtrace", "coreneuron", "interviews", "mpi", "python", "rx3d", "tests"]:
+ args.append(self.define_from_variant("NRN_ENABLE_" + variant.upper(), variant))
- def cmake_options(spec_options):
- value = "TRUE" if spec_options in spec else "FALSE"
- cmake_name = spec_options[1:].upper().replace("-", "_")
- return "-DNRN_ENABLE_" + cmake_name + ":BOOL=" + value
-
- args = [
- cmake_options(variant)
- for variant in [
- "+coreneuron",
- "+interviews",
- "+mpi",
- "+python",
- "+rx3d",
- "+coreneuron",
- "+tests",
- ]
- ]
- args.append("-DNRN_ENABLE_BINARY_SPECIAL=ON")
+ args.append(self.define_from_variant("CORENRN_ENABLE_SHARED", "shared"))
- if "~mpi" in spec and "+coreneuron" in spec:
- args.append("-DCORENRN_ENABLE_MPI=OFF")
+ if spec.satisfies("@:8"):
+ args.append(self.define("NRN_ENABLE_BINARY_SPECIAL", "ON"))
if "+python" in spec:
- args.append("-DPYTHON_EXECUTABLE:FILEPATH=" + spec["python"].command.path)
+ args.append(self.define("PYTHON_EXECUTABLE", spec["python"].command.path))
- if spec.variants["build_type"].value == "Debug":
- args.append("-DCMAKE_C_FLAGS=-g -O0")
- args.append("-DCMAKE_CXX_FLAGS=-g -O0")
- args.append("-DCMAKE_BUILD_TYPE=Custom")
-
- if "+legacy-unit" in spec:
- args.append("-DNRN_DYNAMIC_UNITS_USE_LEGACY=ON")
+ if "+legacy-unit" in spec and spec.satisfies("@:8"):
+ args.append(self.define("NRN_DYNAMIC_UNITS_USE_LEGACY", "ON"))
if "+caliper" in spec:
- args.append("-DCORENRN_CALIPER_PROFILING=ON")
+ args.append(self.define("NRN_ENABLE_PROFILING", "ON"))
+ args.append(self.define("NRN_PROFILER", "caliper"))
+
+ if spec.satisfies("+coreneuron"):
+ options = [
+ self.define("CORENRN_ENABLE_SPLAYTREE_QUEUING", "ON"),
+ self.define("CORENRN_ENABLE_TIMEOUT", "OFF"),
+ self.define_from_variant("CORENRN_ENABLE_OPENMP", "openmp"),
+ self.define_from_variant("CORENRN_ENABLE_LEGACY_UNITS", "legacy-unit"),
+ self.define_from_variant("CORENRN_ENABLE_UNIT_TESTS", "tests"),
+ ]
+
+ nmodl_options = "codegen --force"
+ if spec.satisfies("+sympy"):
+ nmodl_options += " sympy --analytic"
+ options.append(self.define("CORENRN_NMODL_FLAGS", nmodl_options))
+
+ if spec.satisfies("+gpu"):
+ nvcc = spec["cuda"].prefix.bin.nvcc
+ options.append(self.define("CMAKE_CUDA_COMPILER", nvcc))
+ options.append(self.define("CORENRN_ENABLE_GPU", True))
+
+ args.extend(options)
+
+ # Enable math optimisations to enable SIMD/vectorisation in release modes
+ if spec.satisfies("build_type=Release") or spec.satisfies("build_type=RelWithDebInfo"):
+ args.append(self.define("NRN_ENABLE_MATH_OPT", "ON"))
+
+ # add cpu arch specific optimisation flags to CMake so that they are passed
+ # to embedded Makefile that neuron has for compiling MOD files
+ compilation_flags = optimization_flags(self.compiler, self.spec.target)
+ args.append(self.define("CMAKE_CXX_FLAGS", compilation_flags))
return args
@@ -109,10 +162,7 @@ class Neuron(CMakePackage):
spec = self.spec
- if "cray" in spec.architecture:
- cc_compiler = "cc"
- cxx_compiler = "CC"
- elif spec.satisfies("+mpi"):
+ if spec.satisfies("+mpi"):
cc_compiler = spec["mpi"].mpicc
cxx_compiler = spec["mpi"].mpicxx
else:
@@ -120,30 +170,21 @@ class Neuron(CMakePackage):
cxx_compiler = self.compiler.cxx
kwargs = {"backup": False, "string": True}
- nrnmech_makefile = join_path(self.prefix, "./bin/nrnmech_makefile")
+ nrnmech_makefile = join_path(self.prefix, "bin/nrnmech_makefile")
# assign_operator is changed to fix wheel support
- if self.spec.satisfies("@:7"):
- assign_operator = "?="
- else:
- assign_operator = "="
-
- filter_file(
- "CC {0} {1}".format(assign_operator, env["CC"]),
- "CC = {0}".format(cc_compiler),
- nrnmech_makefile,
- **kwargs,
- )
- filter_file(
- "CXX {0} {1}".format(assign_operator, env["CXX"]),
- "CXX = {0}".format(cxx_compiler),
- nrnmech_makefile,
- **kwargs,
- )
-
- if spec.satisfies("+coreneuron"):
- corenrn_makefile = join_path(self.prefix, "share/coreneuron/nrnivmodl_core_makefile")
- filter_file(env["CXX"], cxx_compiler, corenrn_makefile, **kwargs)
+ assign_operator = "?=" if spec.satisfies("@:7") else "="
+
+ # replace compilers from makefile
+ compilers = [("CC", "cc_compiler"), ("CXX", "cxx_compiler")]
+ for compiler_var, compiler_env in compilers:
+ pattern = "(?:^|\\s){0}\\s*{1}.+".format(compiler_var, assign_operator)
+ replacement = "{0} = {1}".format(compiler_var, locals()[compiler_env])
+ filter_file(pattern, replacement, nrnmech_makefile)
+
+ if spec.satisfies("@8:+coreneuron"):
+ nrnmakefile = join_path(self.prefix, "share/coreneuron/nrnivmodl_core_makefile")
+ filter_file("(?:^|\\s)CXX\\s*=.+", "CXX = {0}".format(cxx_compiler), nrnmakefile)
def setup_run_environment(self, env):
env.prepend_path("PATH", join_path(self.prefix, "bin"))
diff --git a/var/spack/repos/builtin/packages/neve/package.py b/var/spack/repos/builtin/packages/neve/package.py
index 916ad5091d..7e095a300c 100644
--- a/var/spack/repos/builtin/packages/neve/package.py
+++ b/var/spack/repos/builtin/packages/neve/package.py
@@ -17,6 +17,8 @@ class Neve(MakefilePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP support")
variant("opt", default=True, description="Optimization flags")
diff --git a/var/spack/repos/builtin/packages/newt/package.py b/var/spack/repos/builtin/packages/newt/package.py
index b92803eba2..5ef214d549 100644
--- a/var/spack/repos/builtin/packages/newt/package.py
+++ b/var/spack/repos/builtin/packages/newt/package.py
@@ -18,5 +18,7 @@ class Newt(AutotoolsPackage):
version("0.52.20", sha256="8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5adbb6dbc")
version("0.52.19", sha256="08c0db56c21996af6a7cbab99491b774c6c09cef91cd9b03903c84634bff2e80")
+ depends_on("c", type="build") # generated
+
depends_on("slang")
depends_on("popt")
diff --git a/var/spack/repos/builtin/packages/nextdenovo/package.py b/var/spack/repos/builtin/packages/nextdenovo/package.py
index fca9afd2ee..b9c242e156 100644
--- a/var/spack/repos/builtin/packages/nextdenovo/package.py
+++ b/var/spack/repos/builtin/packages/nextdenovo/package.py
@@ -16,6 +16,8 @@ class Nextdenovo(MakefilePackage):
version("2.5.2", sha256="f1d07c9c362d850fd737c41e5b5be9d137b1ef3f1aec369dc73c637790611190")
+ depends_on("c", type="build") # generated
+
depends_on("python", type="run")
depends_on("py-paralleltask", type="run")
diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py
index 833f84aea5..316e4da17c 100644
--- a/var/spack/repos/builtin/packages/nextflow/package.py
+++ b/var/spack/repos/builtin/packages/nextflow/package.py
@@ -15,6 +15,26 @@ class Nextflow(Package):
maintainers("dialvarezs", "marcodelapierre")
version(
+ "24.10.0",
+ sha256="e848918fb9b85762822c078435d9ff71979a88cccff81ce5babd75d5eee52fe6",
+ expand=False,
+ )
+ version(
+ "24.04.3",
+ sha256="e258f6395a38f044eb734cba6790af98b561aa521f63e2701fe95c050986e11c",
+ expand=False,
+ )
+ version(
+ "24.04.1",
+ sha256="d1199179e31d0701d86e6c38afa9ccade93f62d545e800824be7767a130510ba",
+ expand=False,
+ )
+ version(
+ "23.10.1",
+ sha256="9abc54f1ffb2b834a8135d44300404552d1e27719659cbb635199898677b660a",
+ expand=False,
+ )
+ version(
"23.10.0",
sha256="4b7fba61ecc6d53a6850390bb435455a54ae4d0c3108199f88b16b49e555afdd",
expand=False,
@@ -172,7 +192,7 @@ class Nextflow(Package):
deprecated=True,
)
- depends_on("java")
+ depends_on("java", type="run")
def install(self, spec, prefix):
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/nf-seqerakit/package.py b/var/spack/repos/builtin/packages/nf-seqerakit/package.py
new file mode 100644
index 0000000000..b2edcf2d9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nf-seqerakit/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NfSeqerakit(PythonPackage):
+ """A Python wrapper for the Seqera Platform CLI (formerly Tower CLI)."""
+
+ homepage = "https://github.com/seqeralabs/seqera-kit"
+ pypi = "seqerakit/seqerakit-0.4.5.tar.gz"
+ maintainers("marcodelapierre")
+
+ license("Apache-2.0")
+
+ version("0.4.5", sha256="792bd4fa53de4b3959929413d1ad8f39e20587971c9c5451419da1ff68cf3f49")
+
+ depends_on("nf-tower-cli", type="run")
+
+ depends_on("python@3.8:3", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-pyyaml@6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/nf-tower-cli/package.py b/var/spack/repos/builtin/packages/nf-tower-cli/package.py
index 83b757e114..bb9520f98b 100644
--- a/var/spack/repos/builtin/packages/nf-tower-cli/package.py
+++ b/var/spack/repos/builtin/packages/nf-tower-cli/package.py
@@ -17,9 +17,23 @@ class NfTowerCli(Package):
homepage = "https://github.com/seqeralabs/tower-cli"
maintainers("marcodelapierre")
+ skip_version_audit = ["platform=windows"]
+
if platform.machine() == "x86_64":
if platform.system() == "Darwin":
version(
+ "0.9.2",
+ sha256="e96c036401c21b4c9b0379a4099192161d94f7567ea16313e7147d6f75828394",
+ url="https://github.com/seqeralabs/tower-cli/releases/download/v0.9.2/tw-osx-x86_64",
+ expand=False,
+ )
+ version(
+ "0.8.0",
+ sha256="c32f9ad48a1a49f1aa62a496b253f24423ae361c1309740f22c429de7e9cc75a",
+ url="https://github.com/seqeralabs/tower-cli/releases/download/v0.8.0/tw-osx-x86_64",
+ expand=False,
+ )
+ version(
"0.7.2",
sha256="b72093af9c8d61e0150eb9d56cedb67afc982d2432221ae0819aaa0c8826ff2b",
url="https://github.com/seqeralabs/tower-cli/releases/download/v0.7.2/tw-0.7.2-osx-x86_64",
@@ -51,6 +65,18 @@ class NfTowerCli(Package):
)
elif platform.system() == "Linux":
version(
+ "0.9.2",
+ sha256="1b96696219d922aaa1a5e09f4a018b34c38806c134234b7f9bde19c92f04ab64",
+ url="https://github.com/seqeralabs/tower-cli/releases/download/v0.9.2/tw-linux-x86_64",
+ expand=False,
+ )
+ version(
+ "0.8.0",
+ sha256="c0d08bbf3059296e4819d33c6ff9282cfdd4d97087213c2d9aa0b5943ced60f4",
+ url="https://github.com/seqeralabs/tower-cli/releases/download/v0.8.0/tw-linux-x86_64",
+ expand=False,
+ )
+ version(
"0.7.2",
sha256="a66d1655d2f3d83db160a890e6b3f20f4573978aa9e8ea5d6e505958a2980e72",
url="https://github.com/seqeralabs/tower-cli/releases/download/v0.7.2/tw-0.7.2-linux-x86_64",
@@ -80,6 +106,14 @@ class NfTowerCli(Package):
url="https://github.com/seqeralabs/tower-cli/releases/download/v0.6.2/tw-0.6.2-linux-x86_64",
expand=False,
)
+ elif platform.machine() == "arm64":
+ if platform.system() == "Darwin":
+ version(
+ "0.9.2",
+ sha256="31ffa200aea3e70533222cab08a212080b889d933ac7ee2b8ece22c51d3e8c1a",
+ url="https://github.com/seqeralabs/tower-cli/releases/download/v0.9.2/tw-osx-arm64",
+ expand=False,
+ )
def install(self, spec, prefix):
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/nf-wave-cli/package.py b/var/spack/repos/builtin/packages/nf-wave-cli/package.py
new file mode 100644
index 0000000000..1d978894eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nf-wave-cli/package.py
@@ -0,0 +1,62 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NfWaveCli(Package):
+ """Command line tool for Wave containers provisioning service."""
+
+ homepage = "https://github.com/seqeralabs/wave-cli"
+ maintainers("marcodelapierre")
+
+ if platform.machine() == "x86_64":
+ if platform.system() == "Darwin":
+ version(
+ "1.2.0",
+ sha256="97152d86d6ffed9e97b4eea1dc369525bdbc9bb19f0fefca79a10cbcbb82c549",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.2.0/wave-1.2.0-macos-x86_64",
+ expand=False,
+ )
+ version(
+ "1.1.3",
+ sha256="8f57cfafaefe34a9aadb460e3ddfe911bdcf7a93296e7a00d29983c065366a2f",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.1.3/wave-1.1.3-macos-x86_64",
+ expand=False,
+ )
+ elif platform.system() == "Linux":
+ version(
+ "1.2.0",
+ sha256="12c572ec3384ddc07a623dcff5262398e0f7d50306b9f2bd35f779c7264a1c38",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.2.0/wave-1.2.0-linux-x86_64",
+ expand=False,
+ )
+ version(
+ "1.1.3",
+ sha256="953935159a5581e3a078528792651c12212302a609dffafe5a007d36f75049c0",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.1.3/wave-1.1.3-linux-x86_64",
+ expand=False,
+ )
+ elif platform.machine() == "arm64":
+ if platform.system() == "Darwin":
+ version(
+ "1.2.0",
+ sha256="813867e931d19f2452a1b8eee52dc976e08f4146001beed755b12ef44de29050",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.2.0/wave-1.2.0-macos-arm64",
+ expand=False,
+ )
+ version(
+ "1.1.3",
+ sha256="1ffdf6ff9d49d14ba38f563a57412e9a408e25c273ae9b11575243a032d101ed",
+ url="https://github.com/seqeralabs/wave-cli/releases/download/v1.1.3/wave-1.1.3-macos-arm64",
+ expand=False,
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install(self.stage.archive_file, join_path(prefix.bin, "wave"))
+ set_executable(join_path(prefix.bin, "wave"))
diff --git a/var/spack/repos/builtin/packages/nfft/package.py b/var/spack/repos/builtin/packages/nfft/package.py
index 2e06a50a45..8ae71152d4 100644
--- a/var/spack/repos/builtin/packages/nfft/package.py
+++ b/var/spack/repos/builtin/packages/nfft/package.py
@@ -16,6 +16,9 @@ class Nfft(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("3.5.3", sha256="caf1b3b3e5bf8c33a6bfd7eca811d954efce896605ecfd0144d47d0bebdf4371")
+ version("3.5.2", sha256="cf3b2f3b2eabd79e49a5fbabf7f8d73fc3c57c4f68ae71e29f6dead853ab2901")
+ version("3.5.1", sha256="bb95b2c240c6d972d4bb20740751a8efeba8b48b3be1d61fd59883909776fee3")
version("3.4.1", sha256="1cf6060eec0afabbbba323929d8222397a77fa8661ca74927932499db26b4aaf")
version("3.3.2", sha256="9dcebd905a82c4f0a339d0d5e666b68c507169d9173b66d5ac588aae5d50b57c")
version(
@@ -24,6 +27,8 @@ class Nfft(AutotoolsPackage):
url="https://www-user.tu-chemnitz.de/~potts/nfft/download/nfft-3.2.4.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("fftw")
_fftw_precisions = None
diff --git a/var/spack/repos/builtin/packages/nfs-ganesha/package.py b/var/spack/repos/builtin/packages/nfs-ganesha/package.py
index f5e0da3e6a..caf3e5da07 100644
--- a/var/spack/repos/builtin/packages/nfs-ganesha/package.py
+++ b/var/spack/repos/builtin/packages/nfs-ganesha/package.py
@@ -18,6 +18,9 @@ class NfsGanesha(CMakePackage):
version("3.0.3", sha256="fcc0361b9a2752be7eb4e990230765e17de373452ac24514be22c81a5447a460")
version("3.0", sha256="136c5642ff21ec6e8a4e77c037f6218a39b2eeba77798b13556f1abbb0923ccd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("py-stsci-distutils", type="build")
diff --git a/var/spack/repos/builtin/packages/nfs-utils/package.py b/var/spack/repos/builtin/packages/nfs-utils/package.py
index 48c7d8c33d..ddfb62dc72 100644
--- a/var/spack/repos/builtin/packages/nfs-utils/package.py
+++ b/var/spack/repos/builtin/packages/nfs-utils/package.py
@@ -20,6 +20,8 @@ class NfsUtils(AutotoolsPackage):
version("2.4.1", sha256="c0dda96318af554881f4eb1590bfe91f1aba2fba59ed2ac3ba099f80fdf838e9")
version("2.3.4", sha256="36e70b0a583751ead0034ebe5d8826caf2dcc7ee7c0beefe94d6ee5a3b0b2484")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("libtirpc")
depends_on("libevent")
diff --git a/var/spack/repos/builtin/packages/nghttp2/package.py b/var/spack/repos/builtin/packages/nghttp2/package.py
index d973a232e6..00caddbde7 100644
--- a/var/spack/repos/builtin/packages/nghttp2/package.py
+++ b/var/spack/repos/builtin/packages/nghttp2/package.py
@@ -15,6 +15,12 @@ class Nghttp2(AutotoolsPackage):
license("MIT")
+ version("1.64.0", sha256="20e73f3cf9db3f05988996ac8b3a99ed529f4565ca91a49eb0550498e10621e8")
+ version("1.63.0", sha256="9318a2cc00238f5dd6546212109fb833f977661321a2087f03034e25444d3dbb")
+ version("1.62.1", sha256="d0b0b9d00500ee4aa3bfcac00145d3b1ef372fd301c35bff96cf019c739db1b4")
+ version("1.62.0", sha256="482e41a46381d10adbdfdd44c1942ed5fd1a419e0ab6f4a5ff5b61468fe6f00d")
+ version("1.61.0", sha256="aa7594c846e56a22fbf3d6e260e472268808d3b49d5e0ed339f589e9cc9d484c")
+ version("1.59.0", sha256="90fd27685120404544e96a60ed40398a3457102840c38e7215dc6dec8684470f")
version("1.57.0", sha256="1e3258453784d3b7e6cc48d0be087b168f8360b5d588c66bfeda05d07ad39ffd")
version("1.52.0", sha256="9877caa62bd72dde1331da38ce039dadb049817a01c3bdee809da15b754771b8")
version("1.51.0", sha256="2a0bef286f65b35c24250432e7ec042441a8157a5b93519412d9055169d9ce54")
@@ -24,7 +30,11 @@ class Nghttp2(AutotoolsPackage):
version("1.44.0", sha256="3e4824d02ae27eca931e0bb9788df00a26e5fd8eb672cf52cbb89c1463ba16e9")
version("1.26.0", sha256="daf7c0ca363efa25b2cbb1e4bd925ac4287b664c3d1465f6a390359daa3f0cf1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
+ depends_on("diffutils", type="build")
def configure_args(self):
return [
@@ -42,4 +52,5 @@ class Nghttp2(AutotoolsPackage):
"--with-mruby=no",
"--with-neverbleed=no",
"--with-boost=no",
+ "--with-wolfssl=no",
]
diff --git a/var/spack/repos/builtin/packages/nginx/package.py b/var/spack/repos/builtin/packages/nginx/package.py
index 2f41d3e199..cdee6710cd 100644
--- a/var/spack/repos/builtin/packages/nginx/package.py
+++ b/var/spack/repos/builtin/packages/nginx/package.py
@@ -16,6 +16,7 @@ class Nginx(AutotoolsPackage):
license("BSD-2-Clause")
+ version("1.26.0", sha256="d2e6c8439d6c6db5015d8eaab2470ab52aef85a7bf363182879977e084370497")
version("1.24.0", sha256="77a2541637b92a621e3ee76776c8b7b40cf6d707e69ba53a940283e30ff2f55d")
version("1.23.4", sha256="d43300e36bb249a7e6edc60bca1b0fc372a0bafce2f346d76acfb677a8790fc0")
version("1.23.3", sha256="75cb5787dbb9fae18b14810f91cc4343f64ce4c24e27302136fb52498042ba54")
@@ -24,6 +25,9 @@ class Nginx(AutotoolsPackage):
version("1.13.8", sha256="8410b6c31ff59a763abf7e5a5316e7629f5a5033c95a3a0ebde727f9ec8464c5")
version("1.12.0", sha256="b4222e26fdb620a8d3c3a3a8b955e08b713672e1bc5198d1e4f462308a795b30")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openssl")
depends_on("openssl@:1", when="@:1.21.2")
depends_on("pcre")
diff --git a/var/spack/repos/builtin/packages/ngmerge/package.py b/var/spack/repos/builtin/packages/ngmerge/package.py
index 4114d071b9..7e627acfa2 100644
--- a/var/spack/repos/builtin/packages/ngmerge/package.py
+++ b/var/spack/repos/builtin/packages/ngmerge/package.py
@@ -16,6 +16,8 @@ class Ngmerge(MakefilePackage):
version("0.3", sha256="5928f727feebd0d1bcdbee0e631ba06fbe9ce88328bd58b6c8bf4e54cc742ac3")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ngmlr/package.py b/var/spack/repos/builtin/packages/ngmlr/package.py
index 51e5197f6a..748fbb262c 100644
--- a/var/spack/repos/builtin/packages/ngmlr/package.py
+++ b/var/spack/repos/builtin/packages/ngmlr/package.py
@@ -19,6 +19,9 @@ class Ngmlr(CMakePackage):
version("0.2.7", sha256="5126a6b3e726cac0da0713883daac688f38587f118428247a9a3ace5a55b29aa")
version("0.2.5", sha256="719944a35cc7ff9c321eedbf3385a7375ce2301f609b3fd7be0a850cabbb028b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/ngspice/package.py b/var/spack/repos/builtin/packages/ngspice/package.py
index 91ef268bd3..46394c9aa5 100644
--- a/var/spack/repos/builtin/packages/ngspice/package.py
+++ b/var/spack/repos/builtin/packages/ngspice/package.py
@@ -10,8 +10,10 @@ class Ngspice(AutotoolsPackage):
"""ngspice is the open source spice simulator for electric and
electronic circuits."""
- homepage = "http://ngspice.sourceforge.net/"
+ homepage = "https://ngspice.sourceforge.net/"
url = "https://sourceforge.net/projects/ngspice/files/ngspice-33.tar.gz"
+ list_url = "https://sourceforge.net/projects/ngspice/files/ng-spice-rework"
+ list_depth = 1
git = "git://git.code.sf.net/p/ngspice/ngspice"
maintainers("aweits", "cessenat")
@@ -20,6 +22,8 @@ class Ngspice(AutotoolsPackage):
# Master version by default adds the experimental adms feature
version("master", branch="master")
+ version("43", sha256="14dd6a6f08531f2051c13ae63790a45708bd43f3e77886a6a84898c297b13699")
+ version("42", sha256="737fe3846ab2333a250dfadf1ed6ebe1860af1d8a5ff5e7803c772cc4256e50a")
version("41", sha256="1ce219395d2f50c33eb223a1403f8318b168f1e6d1015a7db9dbf439408de8c4")
version("40", sha256="e303ca7bc0f594e2d6aa84f68785423e6bf0c8dad009bb20be4d5742588e890d")
version("39", sha256="bf94e811eaad8aaf05821d036a9eb5f8a65d21d30e1cab12701885e09618d771")
@@ -33,6 +37,9 @@ class Ngspice(AutotoolsPackage):
version("29", sha256="8d6d0ffbc15f248eb6ec3bde3b9d1397fbc95cb677e1c6a14ff46065c7f95c4a")
version("27", sha256="0c08c7d57a2e21cf164496f3237f66f139e0c78e38345fbe295217afaf150695")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# kicad needs build=lib, i.e. --with--ngshared
variant(
"build",
@@ -169,3 +176,7 @@ class Ngspice(AutotoolsPackage):
if "debug=yes" in self.spec:
flags.append("-g")
return (None, None, flags)
+
+ def setup_run_environment(self, env):
+ if "build=lib" in self.spec:
+ env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/nicstat/package.py b/var/spack/repos/builtin/packages/nicstat/package.py
index ef25505ae4..2018741df6 100644
--- a/var/spack/repos/builtin/packages/nicstat/package.py
+++ b/var/spack/repos/builtin/packages/nicstat/package.py
@@ -20,6 +20,8 @@ class Nicstat(MakefilePackage, SourceforgePackage):
version("1.95", sha256="c4cc33f8838f4523f27c3d7584eedbe59f4c587f0821612f5ac2201adc18b367")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
copy("Makefile.Linux", "makefile")
filter_file(r"CMODEL =\s+-m32", "", "makefile")
diff --git a/var/spack/repos/builtin/packages/nim/package.py b/var/spack/repos/builtin/packages/nim/package.py
index a00495a2ee..ee44d64684 100644
--- a/var/spack/repos/builtin/packages/nim/package.py
+++ b/var/spack/repos/builtin/packages/nim/package.py
@@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os.path
from spack.package import *
@@ -14,13 +13,22 @@ class Nim(Package):
"""
homepage = "https://nim-lang.org/"
- url = "https://nim-lang.org/download/nim-1.4.4.tar.xz"
+ url = "https://nim-lang.org/download/nim-2.2.0.tar.xz"
+ git = "https://github.com/nim-lang/Nim.git"
license("MIT")
+ version("devel", branch="devel")
+ version("2.2.0", sha256="ce9842849c9760e487ecdd1cdadf7c0f2844cafae605401c7c72ae257644893c")
+ version("2.0.12", sha256="c4887949c5eb8d7f9a9f56f0aeb2bf2140fabf0aee0f0580a319e2a09815733a")
+ version("2.0.4", sha256="71526bd07439dc8e378fa1a6eb407eda1298f1f3d4df4476dca0e3ca3cbe3f09")
version("1.9.3", sha256="d8de7515db767f853d9b44730f88ee113bfe9c38dcccd5afabc773e2e13bf87c")
+ version("1.6.20", sha256="ffed047504d1fcaf610f0dd7cf3e027be91a292b0c9c51161504c2f3b984ffb9")
+ version("1.4.8", sha256="b798c577411d7d95b8631261dbb3676e9d1afd9e36740d044966a0555b41441a")
version("1.4.4", sha256="6d73729def143f72fc2491ca937a9cab86d2a8243bd845a5d1403169ad20660e")
version("1.4.2", sha256="03a47583777dd81380a3407aa6a788c9aa8a67df4821025770c9ac4186291161")
+ version("1.2.18", sha256="a1739185508876f6e21a13f590a20e219ce3eec1b0583ea745e9058c37ad833e")
+ version("1.0.10", sha256="28045fb6dcd86bd79748ead7874482d665ca25edca68f63d6cebc925b1428da5")
version(
"0.20.0",
sha256="51f479b831e87b9539f7264082bb6a64641802b54d2691b3c6e68ac7e2699a90",
@@ -38,22 +46,45 @@ class Nim(Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pcre")
depends_on("openssl")
- def patch(self):
- install_sh_path = os.path.join(self.stage.source_path, "install.sh")
- filter_file("1/nim", "1", install_sh_path)
+ resource(
+ name="csources_v2",
+ git="https://github.com/nim-lang/csources_v2.git",
+ commit="86742fb02c6606ab01a532a0085784effb2e753e",
+ when="@devel",
+ )
- def install(self, spec, prefix):
+ phases = ["build", "install"]
+
+ def build(self, spec, prefix):
bash = which("bash")
- bash("./build.sh")
+ if spec.satisfies("@devel"):
+ with working_dir("csources_v2"):
+ bash("./build.sh")
+ else:
+ bash("./build.sh")
- nim = Executable(os.path.join("bin", "nim"))
- nim("c", "koch")
+ nim = Executable(join_path("bin", "nim"))
+ # Separate nimcache allows parallel compilation of different versions of the Nim compiler
+ nim_flags = ["--skipUserCfg", "--skipParentCfg", "--nimcache:nimcache"]
+ nim("c", *nim_flags, "koch")
koch = Executable("./koch")
- koch("boot", "-d:release")
- koch("tools")
+ koch("boot", "-d:release", *nim_flags)
+ koch("tools", *nim_flags)
+
+ if spec.satisfies("@devel"):
+ koch("geninstall")
+ def install(self, spec, prefix):
+ filter_file("1/nim", "1", "install.sh")
+
+ bash = which("bash")
bash("./install.sh", prefix)
+
+ install_tree("bin", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/nimrod-aai/package.py b/var/spack/repos/builtin/packages/nimrod-aai/package.py
index 280173bfca..2bfc608861 100644
--- a/var/spack/repos/builtin/packages/nimrod-aai/package.py
+++ b/var/spack/repos/builtin/packages/nimrod-aai/package.py
@@ -12,17 +12,18 @@ class NimrodAai(CMakePackage):
enabled by modern Fortran.
"""
- homepage = "https://gitlab.com/NIMRODteam/nimrod-abstract"
- url = (
- "https://gitlab.com/NIMRODteam/nimrod-abstract/-/archive/23.9/nimrod-abstract-23.9.tar.gz"
- )
- git = "https://gitlab.com/NIMRODteam/nimrod-abstract.git"
+ homepage = "https://gitlab.com/NIMRODteam/open/nimrod-abstract"
+ url = "https://gitlab.com/NIMRODteam/open/nimrod-abstract/-/archive/24.2/nimrod-abstract-24.2.tar.gz"
+ git = "https://gitlab.com/NIMRODteam/open/nimrod-abstract.git"
maintainers("jacobrking")
version("main", branch="main")
- version("23.9", sha256="212d591c5a5e7a394b56a5cf2f92cc69feafc49dd5f042fa95eeb6441649390b")
- version("23.6", sha256="1794b89a5a64ff2b3c548818b90d17eef85d819ba4f63a76c41a682d5b76c14f")
+ version("24.2", sha256="1dd4d51426f141c058e25cb29870eaf15e0edfb44d80df94e7c65c850ca78eda")
+ version("23.9", sha256="34f7ee00bbbe9a6d08304473e8893af9bd94af8dbd0bbd50b8b441057023e179")
+ version("23.6", sha256="de7e5c5cc2ad97dc0e66628d29c8153fa807821a316eb9aa8ee21a39c69df800")
+
+ depends_on("fortran", type="build") # generated
variant("debug", default=False, description="Whether to enable debug code")
variant("openacc", default=False, description="Whether to enable OpenACC")
@@ -43,8 +44,8 @@ class NimrodAai(CMakePackage):
depends_on("cmake", type="build")
depends_on("mpi", when="+mpi")
- depends_on("hdf5+fortran~mpi", type="build", when="~mpi")
- depends_on("hdf5+fortran+mpi", type="build", when="+mpi")
+ depends_on("hdf5+fortran~mpi", when="~mpi")
+ depends_on("hdf5+fortran+mpi", when="+mpi")
def cmake_args(self):
args = [
@@ -68,5 +69,5 @@ class NimrodAai(CMakePackage):
@run_after("build")
@on_package_attributes(run_tests=True)
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
ctest("--output-on-failure")
diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py
index 9cc2cbeb41..02fdac7128 100644
--- a/var/spack/repos/builtin/packages/ninja-fortran/package.py
+++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py
@@ -3,8 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.version
from spack.package import *
-from spack.util.executable import which_string
class NinjaFortran(Package):
@@ -46,6 +46,9 @@ class NinjaFortran(Package):
"1.7.1.0.g7ca7f", sha256="53472d0c3cf9c1cff7e991699710878be55d21a1c229956dea6a2c3e44edee80"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type="build")
phases = ["configure", "install"]
@@ -76,7 +79,7 @@ class NinjaFortran(Package):
@on_package_attributes(run_tests=True)
def configure_test(self):
ninja = Executable("./ninja")
- ninja("-j{0}".format(make_jobs), "ninja_test")
+ ninja(f"-j{make_jobs}", "ninja_test")
ninja_test = Executable("./ninja_test")
ninja_test()
diff --git a/var/spack/repos/builtin/packages/ninja-phylogeny/package.py b/var/spack/repos/builtin/packages/ninja-phylogeny/package.py
index f6251cf54e..f0c325ebae 100644
--- a/var/spack/repos/builtin/packages/ninja-phylogeny/package.py
+++ b/var/spack/repos/builtin/packages/ninja-phylogeny/package.py
@@ -18,6 +18,8 @@ class NinjaPhylogeny(MakefilePackage):
version("0.98", sha256="55675e1a9d51eddb3decc9a7570b6bcddb12e8a922cf1ca0a1ea43995793c9db")
+ depends_on("cxx", type="build") # generated
+
build_directory = "NINJA"
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py
index 5d9e7af81d..2249fcdbdb 100644
--- a/var/spack/repos/builtin/packages/ninja/package.py
+++ b/var/spack/repos/builtin/packages/ninja/package.py
@@ -5,7 +5,6 @@
import sys
from spack.package import *
-from spack.util.executable import which_string
class Ninja(Package):
@@ -26,6 +25,8 @@ class Ninja(Package):
version("kitware", branch="features-for-fortran", git="https://github.com/Kitware/ninja.git")
version("master", branch="master")
+ version("1.12.1", sha256="821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a")
+ version("1.12.0", sha256="8b2c86cd483dc7fcb7975c5ec7329135d210099a89bc7db0590a07b0bbfe49a5")
version("1.11.1", sha256="31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea")
version("1.11.0", sha256="3c6ba2e66400fe3f1ae83deb4b235faf3137ec20bd5b08c29bfc368db143e4c6")
version("1.10.2", sha256="ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed")
@@ -36,6 +37,9 @@ class Ninja(Package):
version("1.7.2", sha256="2edda0a5421ace3cf428309211270772dd35a91af60c96f93f90df6bc41b16d9")
version("1.6.0", sha256="b43e88fb068fe4d92a3dfd9eb4d19755dae5c33415db2e9b7b61b4659009cde7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"re2c", default=not sys.platform == "win32", description="Enable buidling Ninja with re2c"
)
@@ -57,7 +61,7 @@ class Ninja(Package):
@on_package_attributes(run_tests=True)
def configure_test(self):
ninja = Executable("./ninja")
- ninja("-j{0}".format(make_jobs), "ninja_test")
+ ninja(f"-j{make_jobs}", "ninja_test")
ninja_test = Executable("./ninja_test")
ninja_test()
diff --git a/var/spack/repos/builtin/packages/njet/package.py b/var/spack/repos/builtin/packages/njet/package.py
index d9f48c7dc0..25d1dca28a 100644
--- a/var/spack/repos/builtin/packages/njet/package.py
+++ b/var/spack/repos/builtin/packages/njet/package.py
@@ -20,6 +20,10 @@ class Njet(AutotoolsPackage):
version("2.1.1", sha256="3858ad37e84f3652711aa033819a6566352ecff04a1cb0189d6590af75b7bb56")
version("2.0.0", sha256="a1f5c171b8aff3553d9dde24d3ced5479bdaeec67f4c90c70a846ee3449b40ea")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("qd")
patch("njet-2.0.0.patch", when="@2.0.0", level=0)
diff --git a/var/spack/repos/builtin/packages/nlcglib/package.py b/var/spack/repos/builtin/packages/nlcglib/package.py
index 3383621518..5f85496900 100644
--- a/var/spack/repos/builtin/packages/nlcglib/package.py
+++ b/var/spack/repos/builtin/packages/nlcglib/package.py
@@ -13,16 +13,18 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/simonpintarelli/nlcglib.git"
url = "https://github.com/simonpintarelli/nlcglib/archive/v0.9.tar.gz"
- maintainers = ["simonpintarelli"]
+ maintainers("simonpintarelli")
license("BSD-3-Clause")
version("develop", branch="develop")
- version("master", branch="master")
+ version("1.1.0", sha256="9e7c2eea84a5ce191bd9af08f6c890717f7b6e88be7bd15cfe774eb0e0dabd8a")
version("1.0b", sha256="086c46f06a117f267cbdf1df4ad42a8512689a9610885763f463469fb15e82dc")
version("0.9", sha256="8d5bc6b85ee714fb3d6480f767e7f43e5e7d569116cf60e48f533a7f50a37a08")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP")
variant("tests", default=False, description="Build tests")
variant(
@@ -32,13 +34,26 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage):
values=("Debug", "Release", "RelWithDebInfo"),
)
+ with when("@1.1: +cuda"):
+ variant(
+ "gpu_direct",
+ default=False,
+ description="Enable GPU direct. Required to support distributed wave-functions.",
+ )
+
depends_on("cmake@3.21:", type="build")
depends_on("mpi")
depends_on("lapack")
+
depends_on("kokkos~cuda~rocm", when="~cuda~rocm")
depends_on("kokkos+openmp", when="+openmp")
+
depends_on("googletest", type="build", when="+tests")
depends_on("nlohmann-json")
+ depends_on("kokkos@4:", when="@1.1:")
+
+ # MKLConfig.cmake introduced in 2021.3
+ conflicts("intel-oneapi-mkl@:2021.2", when="^intel-oneapi-mkl")
with when("@:0.9"):
conflicts("+rocm")
@@ -51,18 +66,18 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage):
depends_on("rocblas")
depends_on("rocsolver")
- for arch in CudaPackage.cuda_arch_values:
- depends_on(
- f"kokkos+cuda+cuda_lambda+wrapper cuda_arch={arch}",
- when=f"%gcc +cuda cuda_arch={arch}",
- )
- depends_on(f"kokkos+cuda cuda_arch={arch}", when=f"+cuda cuda_arch={arch}")
+ with when("+cuda"):
+ depends_on("kokkos+cuda_lambda+wrapper", when="%gcc")
+ depends_on("kokkos+cuda")
+ for arch in CudaPackage.cuda_arch_values:
+ depends_on(f"kokkos cuda_arch={arch}", when=f"cuda_arch={arch}")
def cmake_args(self):
options = [
self.define_from_variant("USE_OPENMP", "openmp"),
self.define_from_variant("BUILD_TESTS", "tests"),
self.define_from_variant("USE_ROCM", "rocm"),
+ self.define_from_variant("USE_GPU_DIRECT", "gpu_direct"),
self.define_from_variant("USE_MAGMA", "magma"),
self.define_from_variant("USE_CUDA", "cuda"),
]
@@ -71,6 +86,29 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage):
options += [self.define("LAPACK_VENDOR", "MKL")]
elif self.spec["blas"].name in ["intel-oneapi-mkl"]:
options += [self.define("LAPACK_VENDOR", "MKLONEAPI")]
+ mkl_mapper = {
+ "threading": {"none": "sequential", "openmp": "gnu_thread", "tbb": "tbb_thread"},
+ "mpi": {"intel-mpi": "intelmpi", "mpich": "mpich", "openmpi": "openmpi"},
+ }
+
+ mkl_threads = mkl_mapper["threading"][
+ self.spec["intel-oneapi-mkl"].variants["threads"].value
+ ]
+
+ mpi_provider = self.spec["mpi"].name
+ if mpi_provider in ["mpich", "cray-mpich", "mvapich", "mvapich2"]:
+ mkl_mpi = mkl_mapper["mpi"]["mpich"]
+ else:
+ mkl_mpi = mkl_mapper["mpi"][mpi_provider]
+
+ options.extend(
+ [
+ self.define("MKL_INTERFACE", "lp64"),
+ self.define("MKL_THREADING", mkl_threads),
+ self.define("MKL_MPI", mkl_mpi),
+ ]
+ )
+
elif self.spec["blas"].name in ["openblas"]:
options += [self.define("LAPACK_VENDOR", "OpenBLAS")]
else:
diff --git a/var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py b/var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
index 9215ef3767..29f9946567 100644
--- a/var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
+++ b/var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
@@ -15,11 +15,15 @@ class NlohmannJsonSchemaValidator(CMakePackage):
license("MIT")
- version("master", branch="master")
+ version("main", branch="main")
+ version("2.3.0", sha256="2c00b50023c7d557cdaa71c0777f5bcff996c4efd7a539e58beaa4219fa2a5e1")
+ version("2.2.0", sha256="03897867bd757ecac1db7545babf0c6c128859655b496582a9cea4809c2260aa")
version("2.1.0", sha256="83f61d8112f485e0d3f1e72d51610ba3924b179926a8376aef3c038770faf202")
version("2.0.0", sha256="ca8e4ca5a88c49ea52b5f5c2a08a293dbf02b2fc66cb8c09d4cce5810ee98b57")
version("1.0.0", sha256="4bdcbf6ce98eda993d8a928dbe97a03f46643395cb872af875a908156596cc4b")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.2:", type="build")
depends_on("nlohmann-json")
diff --git a/var/spack/repos/builtin/packages/nlohmann-json/package.py b/var/spack/repos/builtin/packages/nlohmann-json/package.py
index 219e73c87a..cb8980f8a7 100644
--- a/var/spack/repos/builtin/packages/nlohmann-json/package.py
+++ b/var/spack/repos/builtin/packages/nlohmann-json/package.py
@@ -15,6 +15,7 @@ class NlohmannJson(CMakePackage):
license("MIT")
+ version("3.11.3", sha256="0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406")
version("3.11.2", sha256="d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273")
# v3.11.0 & v3.11.1 omitted; released with significant regressions
version("3.10.5", sha256="5daca6ca216495edf89d167f808d1d03c4a4d929cef7da5e10f135ae1540c7e4")
@@ -35,6 +36,9 @@ class NlohmannJson(CMakePackage):
version("3.1.2", sha256="e8fffa6cbdb3c15ecdff32eebf958b6c686bc188da8ad5c6489462d16f83ae54")
version("3.1.1", sha256="9f3549824af3ca7e9707a2503959886362801fb4926b869789d6929098a79e47")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"multiple_headers", default=True, description="Use non-amalgamated version of the library"
)
@@ -48,7 +52,6 @@ class NlohmannJson(CMakePackage):
# https://github.com/nlohmann/json/releases/tag/v3.3.0
conflicts("%gcc@:4.8", when="@:3.2.9")
conflicts("%intel@:16")
- conflicts("%pgi@:14")
def cmake_args(self):
return [
diff --git a/var/spack/repos/builtin/packages/nlopt/package.py b/var/spack/repos/builtin/packages/nlopt/package.py
index b4aa99199d..f2967c46f7 100644
--- a/var/spack/repos/builtin/packages/nlopt/package.py
+++ b/var/spack/repos/builtin/packages/nlopt/package.py
@@ -16,16 +16,23 @@ class Nlopt(CMakePackage):
url = "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
git = "https://github.com/stevengj/nlopt.git"
+ maintainers("cessenat")
+
license("LGPL-2.1-or-later")
version("master", branch="master")
-
+ version("2.8.0", sha256="e02a4956a69d323775d79fdaec7ba7a23ed912c7d45e439bc933d991ea3193fd")
+ version("2.7.1", sha256="db88232fa5cef0ff6e39943fc63ab6074208831dc0031cf1545f6ecd31ae2a1a")
version("2.7.0", sha256="b881cc2a5face5139f1c5a30caf26b7d3cb43d69d5e423c9d78392f99844499f")
version("2.6.2", sha256="cfa5981736dd60d0109c534984c4e13c615314d3584cf1c392a155bfe1a3b17e")
version("2.6.1", sha256="66d63a505187fb6f98642703bd0ef006fedcae2f9a6d1efa4f362ea919a02650")
version("2.6.0", sha256="a13077cdf5f5f1127eaaac0bf1e06744bfe98d8a4a3430a15e0af50a69f451ab")
version("2.5.0", sha256="c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("python", default=True, description="Build python wrappers")
variant("guile", default=False, description="Enable Guile support")
@@ -45,30 +52,14 @@ class Nlopt(CMakePackage):
extends("python", when="+python")
def cmake_args(self):
- # Add arguments other than
- # CMAKE_INSTALL_PREFIX and CMAKE_BUILD_TYPE
spec = self.spec
- args = []
-
- # Specify on command line to alter defaults:
- # eg: spack install nlopt@master +guile -octave +cxx
-
- # Spack should locate python by default - but to point to a build
- if "+python" in spec:
- args.append("-DPYTHON_EXECUTABLE=%s" % spec["python"].command.path)
-
- # On is default
- if "-shared" in spec:
- args.append("-DBUILD_SHARED_LIBS:Bool=OFF")
-
- # On is default
- if "-octave" in spec:
- args.append("-DNLOPT_OCTAVE:Bool=OFF")
-
- if "+cxx" in spec:
- args.append("-DNLOPT_CXX:BOOL=ON")
-
- if "+matlab" in spec:
- args.append("-DMatlab_ROOT_DIR=%s" % spec["matlab"].command.path)
+ args = [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("NLOPT_OCTAVE", "octave"),
+ self.define_from_variant("NLOPT_CXX", "cxx"),
+ ]
+
+ if spec.satisfies("+matlab"):
+ args.append(self.define("Matlab_ROOT_DIR", spec["matlab"].command.path))
return args
diff --git a/var/spack/repos/builtin/packages/nmap/package.py b/var/spack/repos/builtin/packages/nmap/package.py
index 47ef9de535..205ae5c56e 100644
--- a/var/spack/repos/builtin/packages/nmap/package.py
+++ b/var/spack/repos/builtin/packages/nmap/package.py
@@ -33,6 +33,9 @@ class Nmap(AutotoolsPackage):
version("6.40", sha256="491f77d8b3fb3bb38ba4e3850011fe6fb43bbe197f9382b88cb59fa4e8f7a401")
version("6.01", sha256="77f6635b677d28b546cbef97e4ead6c2d4a5aebcaa108fe3a3c135db6448617a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("liblua", default=True, description="Enable lua (required by all of NSE)")
variant("ncat", default=True, description="Enable ncat")
variant("nping", default=True, description="Enable nping")
diff --git a/var/spack/repos/builtin/packages/nn-c/package.py b/var/spack/repos/builtin/packages/nn-c/package.py
index d66c061de2..29e262e715 100644
--- a/var/spack/repos/builtin/packages/nn-c/package.py
+++ b/var/spack/repos/builtin/packages/nn-c/package.py
@@ -17,6 +17,8 @@ class NnC(AutotoolsPackage):
version("master", branch="master")
version("1.86.2", commit="343c7784d38d3270d75d450569fc0b64767c37e9")
+ depends_on("c", type="build") # generated
+
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
configure_directory = "nn"
diff --git a/var/spack/repos/builtin/packages/nnpack/package.py b/var/spack/repos/builtin/packages/nnpack/package.py
index 36110c6f4f..88c7398f61 100644
--- a/var/spack/repos/builtin/packages/nnpack/package.py
+++ b/var/spack/repos/builtin/packages/nnpack/package.py
@@ -20,6 +20,9 @@ class Nnpack(CMakePackage):
version("2018-05-21", commit="3eb0d453662d05a708f43b108bed9e17b705383e") # py-torch@0.4.1
version("2018-04-05", commit="b63fe1ba8963f1756b8decc593766615cee99c35") # py-torch@:0.4.0
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
generator("ninja")
depends_on("cmake@2.8.12:", type="build")
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/nnvm/package.py b/var/spack/repos/builtin/packages/nnvm/package.py
index ca57d8aa19..974177ffcd 100644
--- a/var/spack/repos/builtin/packages/nnvm/package.py
+++ b/var/spack/repos/builtin/packages/nnvm/package.py
@@ -18,6 +18,8 @@ class Nnvm(CMakePackage):
version("master", branch="master")
version("20170418", commit="b279286304ac954098d94a2695bca599e832effb")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build a shared NNVM lib.")
depends_on("dmlc-core")
diff --git a/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch b/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch
new file mode 100644
index 0000000000..9629a6bb0c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/node-js/fix-old-glibc-random-headers.patch
@@ -0,0 +1,22 @@
+diff --git a/deps/cares/config/linux/ares_config.h b/deps/cares/config/linux/ares_config.h
+index 3cb135a..88934ad 100644
+--- a/deps/cares/config/linux/ares_config.h
++++ b/deps/cares/config/linux/ares_config.h
+@@ -116,7 +116,7 @@
+ #define HAVE_GETNAMEINFO 1
+
+ /* Define to 1 if you have `getrandom` */
+-#define HAVE_GETRANDOM 1
++#undef HAVE_GETRANDOM
+
+ /* Define to 1 if you have `getservbyport_r` */
+ #define HAVE_GETSERVBYPORT_R 1
+@@ -329,7 +329,7 @@
+ #define HAVE_SYS_PARAM_H 1
+
+ /* Define to 1 if you have the <sys/random.h> header file. */
+-#define HAVE_SYS_RANDOM_H 1
++#undef HAVE_SYS_RANDOM_H
+
+ /* Define to 1 if you have the <sys/select.h> header file. */
+ #define HAVE_SYS_SELECT_H 1
diff --git a/var/spack/repos/builtin/packages/node-js/package.py b/var/spack/repos/builtin/packages/node-js/package.py
index 744304f466..8850255deb 100644
--- a/var/spack/repos/builtin/packages/node-js/package.py
+++ b/var/spack/repos/builtin/packages/node-js/package.py
@@ -22,17 +22,22 @@ class NodeJs(Package):
license("Unicode-TOU")
# Current (latest features) - odd major number
+ version("21.7.3", sha256="ce1f61347671ef219d9c2925313d629d3fef98fc8d7f5ef38dd4656f7d0f58e7")
version("19.2.0", sha256="aac9d1a366fb57d68f4639f9204d1de5d6387656959a97ed929a5ba9e62c033a")
+ version("17.9.1", sha256="1102f5e0aafaab8014d19c6c57142caf2ba3ef69d88d7a7f0f82798051796027")
version("15.3.0", sha256="cadfa384a5f14591b84ce07a1afe529f28deb0d43366fb0ae4e78afba96bfaf2")
version("13.8.0", sha256="815b5e1b18114f35da89e4d98febeaba97555d51ef593bd5175db2b05f2e8be6")
version("13.5.0", sha256="4b8078d896a7550d7ed399c1b4ac9043e9f883be404d9b337185c8d8479f2db8")
# LTS (recommended for most users) - even major number
version(
- "18.12.1",
- sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186",
+ "22.4.0",
+ sha256="b62cd83c9a57a11349883f89b1727a16e66c02eb6255a4bf32714ff5d93165f5",
preferred=True,
)
+ version("22.3.0", sha256="6326484853093ab6b8f361a267445f4a5bff469042cda11a3585497b13136b55")
+ version("20.15.0", sha256="01e2c034467a324a33e778c81f2808dff13d289eaa9307d3e9b06c171e4d932d")
+ version("18.12.1", sha256="ba8174dda00d5b90943f37c6a180a1d37c861d91e04a4cb38dc1c0c74981c186")
version("16.18.1", sha256="3d24c9c3a953afee43edc44569045eda56cd45cd58b0539922d17da62736189c")
version("14.21.1", sha256="76ba961536dc11e4dfd9b198c61ff3399e655eca959ae4b66d926f29bfcce9d3")
version("14.16.1", sha256="5f5080427abddde7f22fd2ba77cd2b8a1f86253277a1eec54bc98a202728ce80")
@@ -40,6 +45,9 @@ class NodeJs(Package):
version("14.13.0", sha256="8538b2e76aa06ee0e6eb1c118426c3c5ca53b2e49d66591738eacf76e89edd61")
version("14.10.0", sha256="7e0d7a1aa23697415e3588a1ca4f1c47496e6c88b9cf37c66be90353d3e4ac3e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("debug", default=False, description="Include debugger support")
variant("doc", default=False, description="Compile with documentation")
variant(
@@ -71,14 +79,30 @@ class NodeJs(Package):
depends_on("openssl@1.1:", when="+openssl")
depends_on("zlib-api", when="+zlib")
+ # https://github.com/nodejs/node/blob/main/BUILDING.md#supported-toolchains
+ conflicts("%gcc@:12.1", when="@23:")
+ conflicts("%gcc@:10.0", when="@20:")
+ conflicts("%gcc@:8.2", when="@16:")
+ conflicts("%gcc@:6.2", when="@12:")
+ conflicts("%apple-clang@:11", when="@21:")
+ conflicts("%apple-clang@:10", when="@16:")
+ conflicts("%apple-clang@:9", when="@13:")
+
phases = ["configure", "build", "install"]
# https://github.com/spack/spack/issues/19310
conflicts(
"%gcc@:4.8",
- msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310",
+ msg="fails to build with gcc 4.8 (see https://github.com/spack/spack/issues/19310)",
+ )
+
+ conflicts(
+ "%gcc@14:", when="@:19", msg="fails to build with gcc 14+ due to implicit conversions"
)
+ # See https://github.com/nodejs/node/issues/52223
+ patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24")
+
def setup_build_environment(self, env):
# Force use of experimental Python 3 support
env.set("PYTHON", self.spec["python"].command.path)
@@ -98,8 +122,14 @@ class NodeJs(Package):
#
# /usr/bin/libtool
# libtool: /usr/bin/libtool
+ #
+ # We specify -M -f (an empty list of man-path entries) to prevent man-page
+ # searching to avoid an Illegal seek error processing manpath results in CI,
+ # which prevents the last form:
# libtool: /usr/bin/libtool /Applications/Xcode.app/.../share/man/man1/libtool.1
- process_pipe = subprocess.Popen(["whereis", "libtool"], stdout=subprocess.PIPE)
+ process_pipe = subprocess.Popen(
+ ["whereis", "-M", "-f", "libtool"], stdout=subprocess.PIPE
+ )
result_whereis_list = process_pipe.communicate()[0].strip().split()
if len(result_whereis_list) == 1:
result_whereis = result_whereis_list[0]
diff --git a/var/spack/repos/builtin/packages/nopayloadclient/package.py b/var/spack/repos/builtin/packages/nopayloadclient/package.py
new file mode 100644
index 0000000000..0686d1b74e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nopayloadclient/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Nopayloadclient(CMakePackage):
+ """NoPayloadClient is the client-side library meant to communicate with NoPayloadDB."""
+
+ homepage = "https://github.com/BNLNPPS/nopayloadclient"
+ url = "https://github.com/BNLNPPS/nopayloadclient/archive/refs/tags/v0.0.3.tar.gz"
+ git = "https://github.com/BNLNPPS/nopayloadclient.git"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("main", branch="main")
+ version("0.0.3", sha256="9481981d0cfbe1727f08ae3d1129c142a952d5e67ddb9ad88224356040af2225")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("curl")
+ depends_on("nlohmann-json", type="build")
+
+ def cmake_args(self):
+ return [
+ self.define("BUILD_TESTING", self.run_tests),
+ self.define("INCLUDE_DIR_NLOHMANN_JSON", self.spec["nlohmann-json"].prefix.include),
+ ]
diff --git a/var/spack/repos/builtin/packages/notmuch/package.py b/var/spack/repos/builtin/packages/notmuch/package.py
index 744dbd029b..4b500fcb74 100644
--- a/var/spack/repos/builtin/packages/notmuch/package.py
+++ b/var/spack/repos/builtin/packages/notmuch/package.py
@@ -19,6 +19,9 @@ class Notmuch(AutotoolsPackage):
version("0.23.7", sha256="f11bb10d71945f6c3f16d23117afc70810aa485878e66bb4bf43cc3f08038913")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("talloc")
depends_on("gmime@2.6:")
diff --git a/var/spack/repos/builtin/packages/npb/package.py b/var/spack/repos/builtin/packages/npb/package.py
index 63275fd3c9..62d5b86d0e 100644
--- a/var/spack/repos/builtin/packages/npb/package.py
+++ b/var/spack/repos/builtin/packages/npb/package.py
@@ -35,6 +35,9 @@ class Npb(MakefilePackage):
version("3.3.1", sha256="4a8ea679b1df69f583c544c47198b3c26a50ec2bb6f8f69aef66c04c9a747d2d")
version("3.4.1", sha256="f3a43467da6e84a829ea869156d3ea86c17932136bb413a4b6dab23018a28881")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Valid Benchmark Names
valid_names = (
"is", # Integer Sort, random memory access
@@ -58,7 +61,7 @@ class Npb(MakefilePackage):
# ~4X size increase going from one class to the next
"D",
"E",
- "F" # large test problems
+ "F", # large test problems
# ~16X size increase from each of the previous classes
)
@@ -119,6 +122,10 @@ class Npb(MakefilePackage):
nprocs = spec.variants["nprocs"].value
if "implementation=mpi" in spec:
+ fflags = fflags = ["-O3"]
+ if spec.satisfies("%gcc@10:"):
+ fflags.append("-fallow-argument-mismatch")
+
definitions = {
# Parallel Fortran
"MPIFC": spec["mpi"].mpifc,
@@ -126,7 +133,7 @@ class Npb(MakefilePackage):
"FLINK": spec["mpi"].mpif77,
"FMPI_LIB": spec["mpi"].libs.ld_flags,
"FMPI_INC": "-I" + spec["mpi"].prefix.include,
- "FFLAGS": "-O3",
+ "FFLAGS": " ".join(fflags),
"FLINKFLAGS": "-O3",
# Parallel C
"MPICC": spec["mpi"].mpicc,
diff --git a/var/spack/repos/builtin/packages/npm/package.py b/var/spack/repos/builtin/packages/npm/package.py
index decade229c..d44566a3ab 100644
--- a/var/spack/repos/builtin/packages/npm/package.py
+++ b/var/spack/repos/builtin/packages/npm/package.py
@@ -23,6 +23,8 @@ class Npm(Package):
version("7.24.2", sha256="5b9eeea011f8bc3b76e55cc33339e87213800677f37e0756ad13ef0e9eaccd64")
version("6.14.18", sha256="c9b15f277e2a0b1b57e05bad04504296a27024555d56c2aa967f862e957ad2ed")
+ depends_on("cxx", type="build") # generated
+
depends_on("node-js", type=("build", "run"))
depends_on("libvips", when="@:7")
diff --git a/var/spack/repos/builtin/packages/npth/package.py b/var/spack/repos/builtin/packages/npth/package.py
index 24bb3e6829..317d1adf45 100644
--- a/var/spack/repos/builtin/packages/npth/package.py
+++ b/var/spack/repos/builtin/packages/npth/package.py
@@ -15,6 +15,9 @@ class Npth(AutotoolsPackage):
license("LGPL-2.0-or-later")
+ version("1.7", sha256="8589f56937b75ce33b28d312fccbf302b3b71ec3f3945fde6aaa74027914ad05")
version("1.6", sha256="1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1")
version("1.5", sha256="294a690c1f537b92ed829d867bee537e46be93fbd60b16c04630fbbfcd9db3c2")
version("1.4", sha256="8915141836a3169a502d65c1ebd785fcc6d406cae5ee84474272ebf2fa96f1f2")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ns-3-dev/package.py b/var/spack/repos/builtin/packages/ns-3-dev/package.py
index fe6f9ceac1..a6a8d6fc91 100644
--- a/var/spack/repos/builtin/packages/ns-3-dev/package.py
+++ b/var/spack/repos/builtin/packages/ns-3-dev/package.py
@@ -2,16 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
from spack.package import *
-from spack.pkg.builtin.boost import Boost
-class Ns3Dev(WafPackage):
- """
- ns-3 is a discrete-event network simulator,
- targeted primarily for research and educational use
- """
+class Ns3Dev(CMakePackage):
+ """ns-3 is a discrete-event network simulator"""
homepage = "https://www.nsnam.org/"
url = "https://gitlab.com/nsnam/ns-3-dev/-/archive/ns-3.30.1/ns-3-dev-ns-3.30.1.tar.bz2"
@@ -20,47 +15,32 @@ class Ns3Dev(WafPackage):
license("GPL-2.0-or-later")
- version("3.34", sha256="a565d46a73ff7de68808535d93884f59a6ed7c9faa94de1248ed4f59fb6d5d3d")
- version("3.33", sha256="0deb7da501fc19ba4818997c5aefd942be5ab1bbd3cfaa6ba28c07b387900275")
- version("3.32", sha256="a0e425c16748f909e10dce63275898508cb4f521739ec00a038316c148b8c3ee")
- version("3.31", sha256="41a18cd8bf0a8dffa1087535efa4921ec27b4ca02778646b9da8adb721296862")
- version("3.30.1", sha256="e8b3849d83a224f42c0cd2b9e692ec961455aca23f36fb86fcf6bbed2b495a3d")
- version("3.30", sha256="53cefcad74fec6cc332368a05ed1f8c1a29f86295cb44b6b0509c6d2d18d90d0")
- version("3.29", sha256="0254341487891421e4c6040476c6634c4c2931d4f7c6b9617a6ae494c8ee6ffd")
- version("3.28", sha256="5295e1f6e2ee1ff8cd92d3937c8b3266e0d5926adffc42c7fb0ea9ce549a91b7")
- version("3.27", sha256="26233011654043822b8ede525a52f8532ed181997b609a606681a0d5c8d64a26")
+ version("3.40", sha256="96526e7ae6cb746d02af0cad04f63daff926dad5d30a6fe0d3c7943989ba4e59")
+ version("3.37", sha256="d72defeeddbba14397cd4403565992d98cd7b7d9c680c22fee56022706878720")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
- variant("helics", default=False, description="Enable Helics support in ns-3")
variant("boost", default=True, description="Compile with Boost libraries")
- # Build dependency
- depends_on("helics", when="+helics")
+ depends_on("gsl")
+ depends_on("harfbuzz")
+ depends_on("libxml2")
+ depends_on("sqlite")
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants, when="+boost")
- depends_on("pkgconfig", type="build")
+ depends_on("boost", when="+boost")
- resource(
- name="helics",
- when="+helics",
- git="https://github.com/GMLC-TDC/helics-ns3.git",
- destination="contrib",
- placement="helics",
- )
+ depends_on("ccache", type="run")
- def configure_args(self):
- args = []
-
- if "+boost" in self.spec:
- args.extend(
- [
- "--boost-includes={0}".format(self.spec["boost"].prefix.include),
- "--boost-libs={0}".format(self.spec["boost"].prefix.lib),
- ]
- )
+ depends_on("pkgconfig", type="build")
- if "+helics" in self.spec:
- args.append("--with-helics={0}".format(self.spec["helics"].prefix))
- return args
+ def cmake_args(self):
+ return [
+ self.define("NS3_COLORED_OUTPUT", True),
+ self.define("NS3_GTK3", False),
+ self.define("NS3_MPI", False),
+ self.define("NS3_PYTHON_BINDINGS", False),
+ self.define("NS3_FAST_LINKERS", False),
+ self.define("NS3_SQLITE", True),
+ self.define("CCACHE", self.spec["ccache"].prefix.bin.ccache),
+ ]
diff --git a/var/spack/repos/builtin/packages/nsimd/package.py b/var/spack/repos/builtin/packages/nsimd/package.py
index d7981d1ff4..fc4f02baee 100644
--- a/var/spack/repos/builtin/packages/nsimd/package.py
+++ b/var/spack/repos/builtin/packages/nsimd/package.py
@@ -26,6 +26,9 @@ class Nsimd(CMakePackage):
# version('2.0', sha256='b239e98316f93257161b25c8232634884edcee358982a74742981cc9b68da642')
version("1.0", sha256="523dae83f1d93eab30114321f1c9a67e2006a52595da4c51f121ca139abe0857")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"simd",
default="auto",
diff --git a/var/spack/repos/builtin/packages/nspr/package.py b/var/spack/repos/builtin/packages/nspr/package.py
index f18f4c778d..a2fa85d11e 100644
--- a/var/spack/repos/builtin/packages/nspr/package.py
+++ b/var/spack/repos/builtin/packages/nspr/package.py
@@ -22,6 +22,9 @@ class Nspr(AutotoolsPackage):
version("4.31", sha256="5729da87d5fbf1584b72840751e0c6f329b5d541850cacd1b61652c95015abc8")
version("4.13.1", sha256="5e4c1751339a76e7c772c0c04747488d7f8c98980b434dc846977e43117833ab")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type="build")
configure_directory = "nspr"
diff --git a/var/spack/repos/builtin/packages/nss/package.py b/var/spack/repos/builtin/packages/nss/package.py
index 3f10701b42..189140250d 100644
--- a/var/spack/repos/builtin/packages/nss/package.py
+++ b/var/spack/repos/builtin/packages/nss/package.py
@@ -28,6 +28,9 @@ class Nss(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("nspr@4.24:")
depends_on("sqlite")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/ntirpc/package.py b/var/spack/repos/builtin/packages/ntirpc/package.py
index b35f256d49..6922fbe381 100644
--- a/var/spack/repos/builtin/packages/ntirpc/package.py
+++ b/var/spack/repos/builtin/packages/ntirpc/package.py
@@ -18,5 +18,7 @@ class Ntirpc(CMakePackage):
version("1.8.0", sha256="3bb642dccc8f2506b57a03b5d3358654f59f47b33fddfaa5a7330df4cf336f9f")
version("1.7.3", sha256="8713ef095efc44df426bbd2b260ad457e5335bf3008fb97f01b0775c8042e54b")
+ depends_on("c", type="build") # generated
+
depends_on("libnsl")
depends_on("userspace-rcu")
diff --git a/var/spack/repos/builtin/packages/ntl/package.py b/var/spack/repos/builtin/packages/ntl/package.py
index 2096c3334b..f7cf1c35f7 100644
--- a/var/spack/repos/builtin/packages/ntl/package.py
+++ b/var/spack/repos/builtin/packages/ntl/package.py
@@ -26,6 +26,8 @@ class Ntl(MakefilePackage):
version("11.5.0", sha256="9e1e6488b177c3e5d772fdd6279c890937a9d1c3b694a904ac1cfbe9cab836db")
version("11.4.4", sha256="2ce7a10fadbed6c3859d72c859612a4ca0dbdf6a9db99db4261422b7f0804bfa")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=False, description="Build shared library.")
depends_on("gmp")
diff --git a/var/spack/repos/builtin/packages/ntpoly/package.py b/var/spack/repos/builtin/packages/ntpoly/package.py
index eb9f0a2be3..69b22e948b 100644
--- a/var/spack/repos/builtin/packages/ntpoly/package.py
+++ b/var/spack/repos/builtin/packages/ntpoly/package.py
@@ -20,15 +20,29 @@ class Ntpoly(CMakePackage):
license("MIT")
+ version("3.1.0", sha256="71cd6827f20c68e384555dbcfc85422d0690e21d21d7b5d4f7375544a2755271")
+ version("2.7.2", sha256="968571a42e93827617c40c4ceefd29be52447c176309f801bb5a454527fe5f49")
version("2.3.1", sha256="af8c7690321607fbdee9671b9cb3acbed945148014e0541435858cf82bfd887e")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("shared", default=True, description="Build shared libraries.")
+
depends_on("cmake", type="build")
depends_on("blas", type="link")
depends_on("mpi@3")
def cmake_args(self):
- args = ["-DNOSWIG=Yes"]
+ args = ["-DNOSWIG=Yes", self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
+
if self.spec.satisfies("%fj"):
args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M")
return args
+
+ @property
+ def libs(self):
+ return find_libraries(
+ ["libNTPoly", "libNTPolyCPP", "libNTPolyWrapper"], root=self.home, recursive=True
+ )
diff --git a/var/spack/repos/builtin/packages/numactl/link-with-latomic-if-needed-v2.0.16.patch b/var/spack/repos/builtin/packages/numactl/link-with-latomic-if-needed-v2.0.16.patch
new file mode 100644
index 0000000000..995a42858c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/numactl/link-with-latomic-if-needed-v2.0.16.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,6 +24,8 @@ AM_CONDITIONAL([HAVE_TREE_VECTORIZE], [test x"${tree_vectorize}" = x"true"])
+
+ AC_CONFIG_FILES([Makefile])
+
++AC_SEARCH_LIBS([__atomic_fetch_and_1], [atomic])
++
+ # GCC tries to be "helpful" and only issue a warning for unrecognized
+ # attributes. So we compile the test with Werror, so that if the
+ # attribute is not recognized the compilation fails
diff --git a/var/spack/repos/builtin/packages/numactl/numactl-2.0.18-syscall-NR-ppc64.patch b/var/spack/repos/builtin/packages/numactl/numactl-2.0.18-syscall-NR-ppc64.patch
new file mode 100644
index 0000000000..b296e49e39
--- /dev/null
+++ b/var/spack/repos/builtin/packages/numactl/numactl-2.0.18-syscall-NR-ppc64.patch
@@ -0,0 +1,14 @@
+diff --git a/syscall.c b/syscall.c
+index 63b3e53..5b354c4 100644
+--- a/syscall.c
++++ b/syscall.c
+@@ -141,7 +141,7 @@
+
+ #if !defined(__NR_set_mempolicy_home_node)
+
+-#if defined(__x86_64__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__aarch64__) || defined(__PPC64__)
+ #define __NR_set_mempolicy_home_node 450
+ #else
+ #error "Add syscalls for your architecture or update kernel headers"
+
diff --git a/var/spack/repos/builtin/packages/numactl/package.py b/var/spack/repos/builtin/packages/numactl/package.py
index 1d50ca656e..6930f3f4f7 100644
--- a/var/spack/repos/builtin/packages/numactl/package.py
+++ b/var/spack/repos/builtin/packages/numactl/package.py
@@ -16,15 +16,22 @@ class Numactl(AutotoolsPackage):
license("LGPL-2.1-only")
+ version("2.0.18", sha256="8cd6c13f3096e9c2293c1d732f56e2aa37a7ada1a98deed3fac7bd6da1aaaaf6")
+ version("2.0.17", sha256="af22829cda8b5bdee3d280e61291697bbd3f9bd372afdf119c9348b88369d40b")
+ version("2.0.16", sha256="a35c3bdb3efab5c65927e0de5703227760b1101f5e27ab741d8f32b3d5f0a44c")
version("2.0.14", sha256="1ee27abd07ff6ba140aaf9bc6379b37825e54496e01d6f7343330cf1a4487035")
version("2.0.12", sha256="7c3e819c2bdeb883de68bafe88776a01356f7ef565e75ba866c4b49a087c6bdf")
version("2.0.11", sha256="3e099a59b2c527bcdbddd34e1952ca87462d2cef4c93da9b0bc03f02903f7089")
+ depends_on("c", type="build") # generated
+
patch("numactl-2.0.11-sysmacros.patch", when="@2.0.11")
# https://github.com/numactl/numactl/issues/94
patch("numactl-2.0.14-symver.patch", when="@2.0.14")
- patch("fix-empty-block.patch", when="@2.0.10:2.0.14")
+ patch("fix-empty-block.patch", when="@2.0.10:2.0.16")
patch("link-with-latomic-if-needed.patch", when="@2.0.14")
+ patch("link-with-latomic-if-needed-v2.0.16.patch", when="@2.0.16")
+ patch("numactl-2.0.18-syscall-NR-ppc64.patch", when="@2.0.18 target=ppc64le:")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -43,13 +50,6 @@ class Numactl(AutotoolsPackage):
@when("%nvhpc")
def patch(self):
- self._nvhpc_patch()
-
- @when("%pgi@20:")
- def patch(self):
- self._nvhpc_patch()
-
- def _nvhpc_patch(self):
# Remove flags not recognized by the NVIDIA compiler
filter_file("-ffast-math -funroll-loops", "", "Makefile.am")
filter_file("-std=gnu99", "-c99", "Makefile.am")
diff --git a/var/spack/repos/builtin/packages/numamma/package.py b/var/spack/repos/builtin/packages/numamma/package.py
index 01bfa7fe48..a560b619d7 100644
--- a/var/spack/repos/builtin/packages/numamma/package.py
+++ b/var/spack/repos/builtin/packages/numamma/package.py
@@ -18,6 +18,8 @@ class Numamma(CMakePackage):
version("1.1.1", sha256="f79ca22a95df33a1af529ddd653d043f7f0d32a6d196e559aee8bef8fc74771f")
+ depends_on("c", type="build") # generated
+
depends_on("numap")
depends_on("libbacktrace")
depends_on("numactl")
diff --git a/var/spack/repos/builtin/packages/numap/package.py b/var/spack/repos/builtin/packages/numap/package.py
index 85ebf348ca..6e5623ae34 100644
--- a/var/spack/repos/builtin/packages/numap/package.py
+++ b/var/spack/repos/builtin/packages/numap/package.py
@@ -17,4 +17,6 @@ class Numap(CMakePackage):
version("master", branch="master")
version("2019-09-06", commit="ffcdb88c64b59b7a3220eb1077d2b237029ca96a")
+ depends_on("c", type="build") # generated
+
depends_on("libpfm4")
diff --git a/var/spack/repos/builtin/packages/numaprof/package.py b/var/spack/repos/builtin/packages/numaprof/package.py
index bd7a2cd9e1..cb0282eca6 100644
--- a/var/spack/repos/builtin/packages/numaprof/package.py
+++ b/var/spack/repos/builtin/packages/numaprof/package.py
@@ -25,6 +25,9 @@ class Numaprof(CMakePackage):
version("1.1.5", sha256="7c479cc6d39f2fe685532b9aaeb9efce8153350177fdcc24133e447dd0776323")
version("1.1.4", sha256="96cc5e153895f43d8be58e052433c9e7c9842071cc6bf915b3b1b346908cbbff")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Variants
variant(
"qt", default=False, description="Build the QT embeded webview with Pyton + QT web toolkit"
diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py
index 2fee673edb..6d01acc677 100644
--- a/var/spack/repos/builtin/packages/numdiff/package.py
+++ b/var/spack/repos/builtin/packages/numdiff/package.py
@@ -19,6 +19,8 @@ class Numdiff(AutotoolsPackage):
version("5.9.0", sha256="87284a117944723eebbf077f857a0a114d818f8b5b54d289d59e73581194f5ef")
version("5.8.1", sha256="99aebaadf63325f5658411c09c6dde60d2990c5f9a24a51a6851cb574a4af503")
+ depends_on("c", type="build") # generated
+
variant("nls", default=False, description="Enable Natural Language Support")
variant("gmp", default=False, description="Use GNU Multiple Precision Arithmetic Library")
diff --git a/var/spack/repos/builtin/packages/nut/package.py b/var/spack/repos/builtin/packages/nut/package.py
index 42764b62bc..7c9a162f65 100644
--- a/var/spack/repos/builtin/packages/nut/package.py
+++ b/var/spack/repos/builtin/packages/nut/package.py
@@ -23,6 +23,8 @@ class Nut(CMakePackage):
version("master", branch="master")
version("0.1.1", sha256="9f1dca4a9d7003b170fd57d6720228ff25471616cf884e033652e90c49c089bb")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.0:", type="build")
depends_on("random123")
@@ -30,7 +32,6 @@ class Nut(CMakePackage):
# which is a C++ template library
conflicts("%nvhpc")
conflicts("%intel", when="@serial")
- conflicts("%pgi", when="@serial")
conflicts("%xl", when="@serial")
conflicts("%nag", when="@serial")
build_targets = ["VERBOSE=on"]
diff --git a/var/spack/repos/builtin/packages/nvbandwidth/package.py b/var/spack/repos/builtin/packages/nvbandwidth/package.py
new file mode 100644
index 0000000000..677574ba22
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvbandwidth/package.py
@@ -0,0 +1,52 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Nvbandwidth(CMakePackage, CudaPackage):
+ """
+ nvbandwidth: A tool for bandwidth measurements on NVIDIA GPUs.
+ """
+
+ git = "https://github.com/NVIDIA/nvbandwidth"
+
+ license("Apache-2.0")
+
+ version("main", branch="main")
+
+ version(
+ "v0.4",
+ url="https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.4.tar.gz",
+ sha256="c87eda04d5909d26c0d8756dd1a66ab048cf015dbb0d2719971dee182aa69212",
+ preferred=True,
+ )
+
+ version(
+ "v0.3",
+ url="https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.3.tar.gz",
+ sha256="744bcf9fbd007f4f71f7b5c2295aa223fe39eb5f048e6b1b6a3d0f942a19b3cc",
+ )
+
+ version(
+ "v0.2",
+ url="https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.2.tar.gz",
+ sha256="d41a45dc03dd2baf37b6c4ecdbca442c5e9f6f989fd3ffa90852e50ba9ded26c",
+ )
+
+ version(
+ "v0.1",
+ url="https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.1.tar.gz",
+ sha256="ce164f91e35d1b28ebb1f83b22f38199e430d18ebfb8e21fa8c5e53c38d82daf",
+ )
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("boost@1.66.0 +program_options")
+
+ def install(self, spec, prefix):
+ # We have no `make install` target, so move the files over explicitly
+ mkdirp(prefix.bin)
+ install(join_path(self.build_directory, "nvbandwidth"), join_path(prefix.bin))
diff --git a/var/spack/repos/builtin/packages/nvcomp/package.py b/var/spack/repos/builtin/packages/nvcomp/package.py
index 6dccb895bb..e8a05563eb 100644
--- a/var/spack/repos/builtin/packages/nvcomp/package.py
+++ b/var/spack/repos/builtin/packages/nvcomp/package.py
@@ -26,6 +26,9 @@ class Nvcomp(CMakePackage, CudaPackage):
version("2.2.0", commit="3737f6e5028ed1887b0023ad0fc033e139d57574")
version("2.0.2", commit="5d5c194f3449486d989057f632d10954b8d11d75")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cuda")
conflicts("~cuda")
diff --git a/var/spack/repos/builtin/packages/nvdimmsim/package.py b/var/spack/repos/builtin/packages/nvdimmsim/package.py
index 90cf100ab3..a8928e9dd3 100644
--- a/var/spack/repos/builtin/packages/nvdimmsim/package.py
+++ b/var/spack/repos/builtin/packages/nvdimmsim/package.py
@@ -20,6 +20,8 @@ class Nvdimmsim(MakefilePackage):
version("2.0.0", sha256="2a621ef10be5e52a1f543985d08354a2e6ee6532b5720e5f17ad6362cfd4adef")
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
with working_dir("src"):
if spec.satisfies("platform=darwin"):
diff --git a/var/spack/repos/builtin/packages/nvhpc/detection_test.yaml b/var/spack/repos/builtin/packages/nvhpc/detection_test.yaml
new file mode 100644
index 0000000000..fc8ccfafc8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvhpc/detection_test.yaml
@@ -0,0 +1,82 @@
+paths:
+- layout:
+ - executables:
+ - bin/nvc
+ script: |
+ echo "nvc 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvc++
+ script: |
+ echo "nvc++ 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvfortran
+ script: |
+ echo "nvfortran 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: nvhpc@20.9~blas~lapack~mpi
+ extra_attributes:
+ compilers:
+ c: ".*/bin/nvc"
+ cxx: ".*/bin/nvc\\+\\+"
+ fortran: ".*/bin/nvfortran"
+- layout:
+ - executables:
+ - bin/nvc
+ script: |
+ echo "nvc 20.9-0 linuxpower target on Linuxpower"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvc++
+ script: |
+ echo "nvc++ 20.9-0 linuxpower target on Linuxpower"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvfortran
+ script: |
+ echo "nvfortran 20.9-0 linuxpower target on Linuxpower"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: nvhpc@20.9~blas~lapack~mpi
+ extra_attributes:
+ compilers:
+ c: ".*/bin/nvc"
+ cxx: ".*/bin/nvc\\+\\+"
+ fortran: ".*/bin/nvfortran"
+- layout:
+ - executables:
+ - bin/nvc
+ script: |
+ echo "nvc 20.9-0 linuxarm64 target on aarch64 Linux"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvc++
+ script: |
+ echo "nvc++ 20.9-0 linuxarm64 target on aarch64 Linux"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ - executables:
+ - bin/nvfortran
+ script: |
+ echo "nvfortran 20.9-0 linuxarm64 target on aarch64 Linux"
+ echo "NVIDIA Compilers and Tools"
+ echo "Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved."
+ platforms: [linux]
+ results:
+ - spec: nvhpc@20.9~blas~lapack~mpi
+ extra_attributes:
+ compilers:
+ c: ".*/bin/nvc"
+ cxx: ".*/bin/nvc\\+\\+"
+ fortran: ".*/bin/nvfortran"
diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py
index 11da016ca0..4f03fe96af 100644
--- a/var/spack/repos/builtin/packages/nvhpc/package.py
+++ b/var/spack/repos/builtin/packages/nvhpc/package.py
@@ -21,6 +21,70 @@ from spack.util.prefix import Prefix
# - package key must be in the form '{os}-{arch}' where 'os' is in the
# format returned by platform.system() and 'arch' by platform.machine()
_versions = {
+ "24.11": {
+ "Linux-aarch64": (
+ "f2f64e5dec5e90dad5e12a31a992172b0aa19abf872ef1c54a1a437c7008eefb",
+ "https://developer.download.nvidia.com/hpc-sdk/24.11/nvhpc_2024_2411_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "0c27d66ed0e2d3007d30ac904922a9abf96475197dc0f4dcc6316d235a1dc0c3",
+ "https://developer.download.nvidia.com/hpc-sdk/24.11/nvhpc_2024_2411_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
+ "24.9": {
+ "Linux-aarch64": (
+ "8d900f798ef806c64993fd4fedf2c2c812dd1ccdbac2a0d33fabcd0cd36f19cf",
+ "https://developer.download.nvidia.com/hpc-sdk/24.9/nvhpc_2024_249_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "30c493350cf67481e84cea60a3a869e01fa0bcb71df8e898266273fbdf0a7f26",
+ "https://developer.download.nvidia.com/hpc-sdk/24.9/nvhpc_2024_249_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
+ "24.7": {
+ "Linux-aarch64": (
+ "256ae392ed961162f3f6dc633498db2b68441103a6192f5d4a1c18fa96e992e7",
+ "https://developer.download.nvidia.com/hpc-sdk/24.7/nvhpc_2024_247_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "bf2094aa2fc5bdbcbf9bfa0fddc1cbed1bfa6e9342980649db2350d9f675f853",
+ "https://developer.download.nvidia.com/hpc-sdk/24.7/nvhpc_2024_247_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
+ "24.5": {
+ "Linux-aarch64": (
+ "c52b5ba370e053472cbffb825ba1da5b6abaee93d4e15479ec12c32d6ebc47d5",
+ "https://developer.download.nvidia.com/hpc-sdk/24.5/nvhpc_2024_245_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "e26c5027ffd83fd9e854946670a97253e950cdbacd4894a6715aea91070042ae",
+ "https://developer.download.nvidia.com/hpc-sdk/24.5/nvhpc_2024_245_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
+ "24.3": {
+ "Linux-aarch64": (
+ "6385847de5f8725e5c56d2abf70c90fed5490f2e71a7bd13d3f4ada8720ef036",
+ "https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "a9fe5ec878e9c4cc332de732c6739f97ac064ce76ad3d0af6d282658d27124cb",
+ "https://developer.download.nvidia.com/hpc-sdk/24.3/nvhpc_2024_243_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
+ "24.1": {
+ "Linux-aarch64": (
+ "8c2ce561d5901a03eadce7f07dce5fbc55e8e88c87b74cf60e01e2eca231c41c",
+ "https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_aarch64_cuda_multi.tar.gz",
+ ),
+ "Linux-ppc64le": (
+ "e7330eb35e23dcd9b0b3bedc67c0d5443c4fd76b59caa894a76ecb0d17f71f43",
+ "https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_ppc64le_cuda_multi.tar.gz",
+ ),
+ "Linux-x86_64": (
+ "27992e5fd56af8738501830daddc5e9510ebd553326fea8730236fee4f0f1dd8",
+ "https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_x86_64_cuda_multi.tar.gz",
+ ),
+ },
"23.11": {
"Linux-aarch64": (
"cf744498d1d74ba0af4294388706644ad3669eb0cacea3b69e23739afa2806a0",
@@ -346,7 +410,7 @@ _versions = {
}
-class Nvhpc(Package):
+class Nvhpc(Package, CompilerPackage):
"""The NVIDIA HPC SDK is a comprehensive suite of compilers, libraries
and tools essential to maximizing developer productivity and the
performance and portability of HPC applications. The NVIDIA HPC
@@ -362,9 +426,11 @@ class Nvhpc(Package):
homepage = "https://developer.nvidia.com/hpc-sdk"
maintainers("samcmill")
- tags = ["e4s"]
+ tags = ["e4s", "compiler"]
+
+ skip_version_audit = ["platform=darwin", "platform=windows"]
- skip_version_audit = ["platform=darwin"]
+ redistribute(source=False, binary=False)
for ver, packages in _versions.items():
key = "{0}-{1}".format(platform.system(), platform.machine())
@@ -372,6 +438,10 @@ class Nvhpc(Package):
if pkg:
version(ver, sha256=pkg[0], url=pkg[1])
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("blas", default=True, description="Enable BLAS")
variant(
"install_type",
@@ -393,6 +463,20 @@ class Nvhpc(Package):
requires("%gcc", msg="nvhpc must be installed with %gcc")
+ # For now we only detect compiler components
+ # It will require additional work to detect mpi/lapack/blas components
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["nvc"]
+ cxx_names = ["nvc++"]
+ fortran_names = ["nvfortran"]
+ compiler_version_argument = "--version"
+ compiler_version_regex = r"nv[^ ]* (?:[^ ]+ Dev-r)?([0-9.]+)(?:-[0-9]+)?"
+
+ @classmethod
+ def determine_variants(cls, exes, version_str):
+ # TODO: use other exes to determine default_cuda/install_type/blas/lapack/mpi variants
+ return "~blas~lapack~mpi", {"compilers": cls.determine_compiler_paths(exes=exes)}
+
def _version_prefix(self):
return join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version)
diff --git a/var/spack/repos/builtin/packages/nvidia-nsight-systems/package.py b/var/spack/repos/builtin/packages/nvidia-nsight-systems/package.py
new file mode 100644
index 0000000000..945bbe92f4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvidia-nsight-systems/package.py
@@ -0,0 +1,127 @@
+# Copyright 2013-2024 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
+import re
+import shutil
+from glob import glob
+
+from spack.package import *
+
+# FIXME Remove hack for polymorphic versions
+# This package uses a ugly hack to be able to dispatch, given the same
+# version, to different binary packages based on the platform that is
+# running spack. See #13827 for context.
+# If you need to add a new version, please be aware that:
+# - versions in the following dict are automatically added to the package
+# - version tuple must be in the form (checksum, url)
+# - checksum must be sha256
+# - package key must be in the form '{os}-{arch}' where 'os' is in the
+# format returned by platform.system() and 'arch' by platform.machine()
+_versions = {
+ "2024.6.1": {
+ "Linux-aarch64": (
+ "24700c28dfda9f95d4e93de218b86ab1ba0ee8b74cb61c3c581767296159c75c",
+ "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2024_6/nsight-systems-2024.6.1-2024.6.1.90_3490548-0.aarch64.rpm",
+ ),
+ "Linux-x86_64": (
+ "dd4359a47ff3857395c55a0da483b64f5c0c3a1a2e57dd543a512dc3d2cd2674",
+ "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2024_6/nsight-systems-2024.6.1-2024.6.1.90_3490548-0.x86_64.rpm",
+ ),
+ },
+ "2024.1.1": {
+ "Linux-aarch64": (
+ "41dc15ae128ef1de8e582b66bb465ac6bd67b9d20ef77fc70528b735d80fb3ec",
+ "https://developer.download.nvidia.com/devtools/repos/rhel8/arm64/nsight-systems-2024.1.1-2024.1.1.59_3380207-0.aarch64.rpm",
+ ),
+ "Linux-ppc64le": (
+ "8c98b511df1747c4c782430504ae6fa4b3fce6fa72623083a828fc0a1e11f1b8",
+ "https://developer.download.nvidia.com/devtools/repos/rhel8/ppc64le/nsight-systems-cli-2024.1.1-2024.1.1.59_3380207-0.ppc64le.rpm",
+ ),
+ "Linux-x86_64": (
+ "96f57548e0bd69cb02cd1fe8c70ed4a650636ecb3a5ea5ec490c8049adc2beb5",
+ "https://developer.download.nvidia.com/devtools/repos/rhel8/x86_64/nsight-systems-2024.1.1-2024.1.1.59_3380207-0.x86_64.rpm",
+ ),
+ },
+}
+
+
+class NvidiaNsightSystems(Package):
+ """NVIDIA Nsightâ„¢ Systems is a system-wide performance analysis tool designed
+ to visualize an application’s algorithms, identify the largest opportunities
+ to optimize, and tune to scale efficiently across any quantity or size of CPUs
+ and GPUs, from large servers to the smallest system on a chip"""
+
+ homepage = "https://developer.nvidia.com/nsight-systems"
+ url = "https://developer.download.nvidia.com/devtools/repos/"
+ maintainers("scothalverson")
+ license("NVIDIA Software License Agreement")
+
+ executables = ["^nsys$"]
+
+ # Used to unpack the source RPM archives.
+ depends_on("libarchive programs='bsdtar'", type="build")
+
+ for ver, packages in _versions.items():
+ key = "{0}-{1}".format(platform.system(), platform.machine())
+ pkg = packages.get(key)
+ if pkg:
+ version(ver, sha256=pkg[0], url=pkg[1], expand=False)
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ # Example output:
+ # NVIDIA Nsight Systems version 2024.1.1.59-241133802077v0
+ # but we only want to match 2024.1.1
+ match = re.search(r"NVIDIA Nsight Systems version ((?:[0-9]+.){2}[0-9])", output)
+ return match.group(1) if match else None
+
+ def install(self, spec, prefix):
+ bsdtar = which("bsdtar")
+ rpm_file = glob(join_path(self.stage.source_path, "nsight-systems*.rpm"))[0]
+ params = ["-x", "-f", rpm_file]
+ ver = prefix.split("/")[-1].split("-")[-2]
+ bsdtar(*params)
+
+ arch = self.spec.target.family
+ if arch == "aarch64":
+ folders = ["documentation", "host-linux-armv8", "target-linux-sbsa-armv8"]
+ elif arch == "ppc64le":
+ folders = ["documentation", "host-linux-ppc64le", "target-linux-ppc64le"]
+ elif arch == "x86_64":
+ folders = ["documentation", "host-linux-x64", "target-linux-x64"]
+ if os.path.exists(join_path("opt", "nvidia", "nsight-systems-cli")):
+ base_path = join_path("opt", "nvidia", "nsight-systems-cli")
+ elif os.path.exists(join_path("opt", "nvidia", "nsight-systems")):
+ base_path = join_path("opt", "nvidia", "nsight-systems")
+ else:
+ raise InstallError("Couldn't determine subdirectories to install.")
+
+ for sd in folders:
+ shutil.copytree(join_path(base_path, ver, sd), join_path(prefix, sd))
+ os.mkdir(join_path(prefix, "bin"))
+ if arch == "aarch64":
+ os.symlink(
+ join_path(prefix, "host-linux-armv8", "nsys-ui"),
+ join_path(prefix, "bin", "nsys-ui"),
+ )
+ os.symlink(
+ join_path(prefix, "target-linux-sbsa-armv8", "nsys"),
+ join_path(prefix, "bin", "nsys"),
+ )
+ elif arch == "ppc64le":
+ # `nsys-ui` is missing in the PowerPC version of the package.
+ os.symlink(
+ join_path(prefix, "target-linux-ppc64le", "nsys"), join_path(prefix, "bin", "nsys")
+ )
+ elif arch == "x86_64":
+ os.symlink(
+ join_path(prefix, "host-linux-x64", "nsys-ui"), join_path(prefix, "bin", "nsys-ui")
+ )
+ os.symlink(
+ join_path(prefix, "target-linux-x64", "nsys"), join_path(prefix, "bin", "nsys")
+ )
diff --git a/var/spack/repos/builtin/packages/nvpl-blas/package.py b/var/spack/repos/builtin/packages/nvpl-blas/package.py
new file mode 100644
index 0000000000..0bd0a769df
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvpl-blas/package.py
@@ -0,0 +1,75 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NvplBlas(Package):
+ """
+ NVPL BLAS (NVIDIA Performance Libraries BLAS) is part of NVIDIA Performance Libraries
+ that provides standard Fortran 77 BLAS APIs as well as C (CBLAS).
+ """
+
+ homepage = "https://docs.nvidia.com/nvpl/_static/blas/index.html"
+ url = (
+ "https://developer.download.nvidia.com/compute/nvpl/redist"
+ "/nvpl_blas/linux-sbsa/nvpl_blas-linux-sbsa-0.1.0-archive.tar.xz"
+ )
+
+ maintainers("albestro", "rasolca")
+
+ license("UNKNOWN")
+
+ version("0.3.0", sha256="b51cb199a440c1e8673d3d845d395950c9a9020d4e83af2655eb96c23c6ec90d")
+ version("0.2.0.1", sha256="ba29f6a9d3831b6ae5c9265b4d124c13b9b9e0faea025359b02b41ad230975c2")
+ version("0.1.0", sha256="4ccc894593cbcbfaa1a4f3c54505982691971667acf191c9ab0f4252a37c8063")
+
+ provides("blas")
+
+ variant("ilp64", default=False, description="Force 64-bit Fortran native integers")
+ variant(
+ "threads",
+ default="none",
+ description="Multithreading support",
+ values=("openmp", "none"),
+ multi=False,
+ )
+
+ requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
+
+ conflicts("%gcc@:7")
+ conflicts("%clang@:13")
+
+ conflicts("threads=openmp", when="%clang")
+
+ def url_for_version(self, version):
+ url = "https://developer.download.nvidia.com/compute/nvpl/redist/nvpl_blas/linux-sbsa/nvpl_blas-linux-sbsa-{0}-archive.tar.xz"
+ return url.format(version)
+
+ @property
+ def blas_headers(self):
+ return find_all_headers(self.spec.prefix.include)
+
+ @property
+ def blas_libs(self):
+ spec = self.spec
+
+ if "+ilp64" in spec:
+ int_type = "ilp64"
+ else:
+ int_type = "lp64"
+
+ if spec.satisfies("threads=openmp"):
+ threading_type = "gomp"
+ else:
+ # threads=none
+ threading_type = "seq"
+
+ name = ["libnvpl_blas_core", f"libnvpl_blas_{int_type}_{threading_type}"]
+
+ return find_libraries(name, spec.prefix.lib, shared=True, recursive=True)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/nvpl-fft/package.py b/var/spack/repos/builtin/packages/nvpl-fft/package.py
new file mode 100644
index 0000000000..b7a9964f60
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvpl-fft/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NvplFft(Package):
+ """NVPL FFT (NVIDIA Performance Libraries FFT) is part of NVIDIA Performance Libraries
+ and provides Fast Fourier Transform (FFT) calculations on ARM CPUs.
+ """
+
+ homepage = "https://docs.nvidia.com/nvpl/_static/blas/index.html"
+ url = (
+ "https://developer.download.nvidia.com/compute/nvpl/redist"
+ "/nvpl_fft/linux-sbsa/nvpl_fft-linux-sbsa-0.1.0-archive.tar.xz"
+ )
+
+ license("UNKNOWN")
+
+ version("0.3.0", sha256="e20791b77fa705e5a4f7aa5dada39b2a41e898189e0e60e680576128d532269b")
+ version("0.2.0.2", sha256="264343405aad6aca451bf8bd0988b6217b2bb17fd8f99394b83e04d9ab2f7f91")
+ version("0.1.0", sha256="0344f8e15e5b40f4d552f7013fe04a32e54a092cc3ebede51ddfce74b44c6e7d")
+
+ provides("fftw-api@3")
+
+ requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
+
+ conflicts("%gcc@:7")
+ conflicts("%clang@:13")
+
+ def url_for_version(self, version):
+ url = "https://developer.download.nvidia.com/compute/nvpl/redist/nvpl_fft/linux-sbsa/nvpl_fft-linux-sbsa-{0}-archive.tar.xz"
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/nvpl-lapack/package.py b/var/spack/repos/builtin/packages/nvpl-lapack/package.py
new file mode 100644
index 0000000000..e76e098636
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nvpl-lapack/package.py
@@ -0,0 +1,83 @@
+# Copyright 2013-2024 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.package import *
+
+
+class NvplLapack(Package):
+ """
+ NVPL LAPACK (NVIDIA Performance Libraries LAPACK) is part of NVIDIA Performance Libraries
+ that provides standard Fortran 90 LAPACK APIs.
+ """
+
+ homepage = "https://docs.nvidia.com/nvpl/_static/lapack/index.html"
+ url = (
+ "https://developer.download.nvidia.com/compute/nvpl/redist"
+ "/nvpl_lapack/linux-sbsa/nvpl_lapack-linux-sbsa-0.2.0.1-archive.tar.xz"
+ )
+
+ maintainers("albestro", "rasolca")
+
+ license("UNKNOWN")
+
+ version("0.2.3.1", sha256="25927df133c5486fd71d5976c93917c96e62275a78dffc354bcaf1b022f56f8e")
+ version("0.2.2.1", sha256="cdfbf69517a044e99e3e6231c8b2f4e845fd0de57775ccad6b4b0b4fe7e91e84")
+ version("0.2.0.1", sha256="7054f775b18916ee662c94ad7682ace53debbe8ee36fa926000fe412961edb0b")
+
+ provides("lapack")
+
+ variant("ilp64", default=False, description="Force 64-bit Fortran native integers")
+
+ threadings = ("openmp", "none")
+ variant(
+ "threads",
+ default="none",
+ description="Multithreading support",
+ values=threadings,
+ multi=False,
+ )
+
+ requires("target=armv8.2a:", msg="Any CPU with Arm-v8.2a+ microarch")
+
+ # propagate variants for depends_on("nvpl-blas")
+ depends_on("nvpl-blas +ilp64", when="+ilp64")
+ depends_on("nvpl-blas ~ilp64", when="~ilp64")
+ for threads in threadings:
+ depends_on(f"nvpl-blas threads={threads}", when=f"threads={threads}")
+
+ conflicts("%gcc@:7")
+ conflicts("%clang@:13")
+
+ conflicts("threads=openmp", when="%clang")
+
+ def url_for_version(self, version):
+ url = "https://developer.download.nvidia.com/compute/nvpl/redist/nvpl_lapack/linux-sbsa/nvpl_lapack-linux-sbsa-{0}-archive.tar.xz"
+ return url.format(version)
+
+ @property
+ def lapack_headers(self):
+ return find_all_headers(self.spec.prefix.include)
+
+ @property
+ def lapack_libs(self):
+ spec = self.spec
+
+ if "+ilp64" in spec:
+ int_type = "ilp64"
+ else:
+ int_type = "lp64"
+
+ if spec.satisfies("threads=openmp"):
+ threading_type = "gomp"
+ else:
+ # threads=none
+ threading_type = "seq"
+
+ name = ["libnvpl_lapack_core", f"libnvpl_lapack_{int_type}_{threading_type}"]
+
+ return find_libraries(name, spec.prefix.lib, shared=True, recursive=True)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/nvptx-tools/package.py b/var/spack/repos/builtin/packages/nvptx-tools/package.py
index c7afc8cdfd..e442fbc17e 100644
--- a/var/spack/repos/builtin/packages/nvptx-tools/package.py
+++ b/var/spack/repos/builtin/packages/nvptx-tools/package.py
@@ -15,9 +15,13 @@ class NvptxTools(AutotoolsPackage):
homepage = "https://github.com/MentorEmbedded/nvptx-tools"
git = "https://github.com/MentorEmbedded/nvptx-tools"
+ version("2023-09-13", commit="c321f1a3573dd89a12e3291d690207685a34df6e")
version("2021-05-21", commit="d0524fbdc86dfca068db5a21cc78ac255b335be5")
version("2018-03-01", commit="5f6f343a302d620b0868edab376c00b15741e39e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("binutils")
depends_on("cuda")
diff --git a/var/spack/repos/builtin/packages/nvshmem/package.py b/var/spack/repos/builtin/packages/nvshmem/package.py
index 7bb13dd912..5d93c01afc 100644
--- a/var/spack/repos/builtin/packages/nvshmem/package.py
+++ b/var/spack/repos/builtin/packages/nvshmem/package.py
@@ -28,6 +28,9 @@ class Nvshmem(MakefilePackage, CudaPackage):
version("2.1.2-0", sha256="367211808df99b4575fb901977d9f4347065c61a26642d65887f24d60342a4ec")
version("2.0.3-0", sha256="20da93e8508511e21aaab1863cb4c372a3bec02307b932144a7d757ea5a1bad2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with CUDA")
variant("ucx", default=True, description="Build with UCX support")
variant("nccl", default=True, description="Build with NCCL support")
diff --git a/var/spack/repos/builtin/packages/nvtx/package.py b/var/spack/repos/builtin/packages/nvtx/package.py
index eff8c65b36..c6f6af4381 100644
--- a/var/spack/repos/builtin/packages/nvtx/package.py
+++ b/var/spack/repos/builtin/packages/nvtx/package.py
@@ -19,6 +19,8 @@ class Nvtx(Package, PythonExtension):
version("develop", branch="dev")
version("3.1.0", sha256="dc4e4a227d04d3da46ad920dfee5f7599ac8d6b2ee1809c9067110fb1cc71ced")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Install Python bindings.")
extends("python", when="+python")
depends_on("py-pip", type="build", when="+python")
@@ -46,6 +48,5 @@ class Nvtx(Package, PythonExtension):
install("./nvtx-config.cmake", prefix) # added by the patch above
- args = std_pip_args + ["--prefix=" + prefix, "."]
with working_dir(self.build_directory):
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/nwchem/package.py b/var/spack/repos/builtin/packages/nwchem/package.py
index 9be28311fe..b7d075b8c5 100644
--- a/var/spack/repos/builtin/packages/nwchem/package.py
+++ b/var/spack/repos/builtin/packages/nwchem/package.py
@@ -17,6 +17,19 @@ class Nwchem(Package):
tags = ["ecp", "ecp-apps"]
+ maintainers("jeffhammond")
+
+ version(
+ "7.2.3",
+ sha256="8cb4ec065215bc0316d8e01f67f1674a572f7d0f565c52e4a327975c04ddb6eb",
+ url="https://github.com/nwchemgit/nwchem/releases/download/v7.2.3-release/nwchem-7.2.3-release.revision-d690e065-srconly.2024-08-27.tar.bz2",
+ )
+
+ version(
+ "7.2.2",
+ sha256="6b68e9c12eec38c09d92472bdd1ff130b93c1b5e1f65e4702aa7ee36c80e4af7",
+ url="https://github.com/nwchemgit/nwchem/releases/download/v7.2.2-release/nwchem-7.2.2-release.revision-74936fb9-srconly.2023-11-03.tar.bz2",
+ )
version(
"7.2.0",
sha256="28ea70947e77886337c84e6fae3bdf88f25f0acfdeaf95e722615779c19f7a7e",
@@ -28,8 +41,29 @@ class Nwchem(Package):
url="https://github.com/nwchemgit/nwchem/releases/download/v7.0.2-release/nwchem-7.0.2-release.revision-b9985dfa-srconly.2020-10-12.tar.bz2",
)
+ resource(
+ name="dftd3.tgz",
+ url="https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3/dftd3.tgz",
+ destination="",
+ placement="dft-d3",
+ sha256="d97cf9758f61aa81fd85425448fbf4a6e8ce07c12e9236739831a3af32880f59",
+ expand=False,
+ )
+
variant("openmp", default=False, description="Enables OpenMP support")
- variant("mpipr", default=False, description="Enables ARMCI with progress rank")
+ variant("f90allocatable", default=False, description="Use F90 allocatable instead of MA")
+ variant(
+ "armci",
+ values=("mpi-ts", "mpi-pr", "armcimpi", "mpi3", "openib", "ofi"),
+ default="mpi-ts",
+ description="ARMCI runtime",
+ )
+ variant(
+ "extratce",
+ default=False,
+ description="Enables rarely-used TCE features (CCSDTQ, CCSDTLR, EACCSD, IPCCSD, MRCC)",
+ )
+ variant("tcecuda", default=False, description="Enable TCE CCSD(T) CUDA support")
variant("fftw3", default=False, description="Link against the FFTW library")
variant("libxc", default=False, description="Support additional functionals via libxc")
variant(
@@ -50,19 +84,35 @@ class Nwchem(Package):
# https://github.com/nwchemgit/nwchem/commit/376f86f96eb982e83f10514e9dcd994564f973b4
# https://github.com/nwchemgit/nwchem/commit/c89fc9d1eca6689bce12564a63fdea95d962a123
# Prior versions of NWChem, including 7.0.2, were not able to link with FFTW
- patch("fftw_splans.patch", when="@7.2.0 +fftw3")
+ patch("fftw_splans.patch", when="@7.2.0:7.2.3 +fftw3")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
depends_on("blas")
depends_on("lapack")
depends_on("mpi")
+ depends_on("cuda", when="+tcecuda")
+ depends_on("armcimpi", when="armci=armcimpi")
+ depends_on("libfabric", when="armci=ofi")
+ depends_on("rdma-core", when="armci=openib")
depends_on("scalapack")
depends_on("fftw-api@3", when="+fftw3")
depends_on("libxc", when="+libxc")
depends_on("elpa", when="+elpa")
- depends_on("python@3:3.9", type=("build", "link", "run"), when="@:7.0.2")
+ depends_on("python@:3.9", type=("build", "link", "run"), when="@:7.0.2")
depends_on("python@3", type=("build", "link", "run"), when="@7.2.0:")
+ depends_on("gmake", type="build")
+ # for the dftd3 resource (bash is also required, not listed here)
+ depends_on("tar", type="build")
+ depends_on("patch", type="build")
+
def install(self, spec, prefix):
+ # move the dft-d3/dftd3.tgz resource
+ os.rename("dft-d3/dftd3.tgz", "src/nwpw/nwpwlib/nwpwxc/dftd3.tgz")
+
scalapack = spec["scalapack"].libs
lapack = spec["lapack"].libs
blas = spec["blas"].libs
@@ -83,10 +133,6 @@ class Nwchem(Package):
f"LAPACK_LIB={lapack.ld_flags}",
f"SCALAPACK_LIB={scalapack.ld_flags}",
"USE_NOIO=Y", # skip I/O algorithms
- "MRCC_METHODS=y", # TCE extra module
- "IPCCSD=y", # TCE extra module
- "EACCSD=y", # TCE extra module
- "CCSDTQ=y", # TCE extra module
"V=1", # verbose build
]
)
@@ -116,11 +162,41 @@ class Nwchem(Package):
args.extend([f"NWCHEM_TARGET={target}"])
+ # These optional components of TCE are rarely used and in some cases
+ # increase the compilation time significantly (CCSDTLR and CCSDTQ).
+ if spec.satisfies("+extratce"):
+ args.extend(["MRCC_METHODS=y"])
+ args.extend(["IPCCSD=y"])
+ args.extend(["EACCSD=y"])
+ args.extend(["CCSDTLR=y"])
+ args.extend(["CCSDTQ=y"])
+
+ if spec.satisfies("+tcecuda"):
+ args.extend(["TCE_CUDA=y"])
+ args.extend(["CUDA_INCLUDE=-I{0}".format(self.spec["cuda"].headers.directories[0])])
+ # args.extend(["CUDA_LIBS={0}".format(self.spec["cuda"].libs)])
+ args.extend(["CUDA_LIBS=-L{0} -lcudart".format(self.spec["cuda"].libs.directories[0])])
+
if spec.satisfies("+openmp"):
args.extend(["USE_OPENMP=y"])
- if spec.satisfies("+mpipr"):
+ if spec.satisfies("+f90allocatable"):
+ args.extend(["USE_F90_ALLOCATABLE=1"])
+
+ if self.spec.variants["armci"].value == "armcimpi":
+ armcimpi = spec["armci"]
+ args.extend(["ARMCI_NETWORK=ARMCI"])
+ args.extend([f"EXTERNAL_ARMCI_PATH={armcimpi.prefix}"])
+ elif self.spec.variants["armci"].value == "mpi-pr":
args.extend(["ARMCI_NETWORK=MPI-PR"])
+ elif self.spec.variants["armci"].value == "mpi-ts":
+ args.extend(["ARMCI_NETWORK=MPI-TS"])
+ elif self.spec.variants["armci"].value == "mpi3":
+ args.extend(["ARMCI_NETWORK=MPI3"])
+ elif self.spec.variants["armci"].value == "openib":
+ args.extend(["ARMCI_NETWORK=OPENIB"])
+ elif self.spec.variants["armci"].value == "ofi":
+ args.extend(["ARMCI_NETWORK=OFI"])
if spec.satisfies("+fftw3"):
args.extend(["USE_FFTW3=y"])
@@ -128,8 +204,8 @@ class Nwchem(Package):
args.extend(["FFTW3_INCLUDE={0}".format(spec["fftw-api"].prefix.include)])
if spec.satisfies("+libxc"):
- args.extend([f"LIBXC_LIB={0}".format(spec["libxc"].libs.ld_flags)])
- args.extend([f"LIBXC_INCLUDE={0}".format(spec["libxc"].prefix.include)])
+ args.extend(["LIBXC_LIB={0}".format(spec["libxc"].libs.ld_flags)])
+ args.extend(["LIBXC_INCLUDE={0}".format(spec["libxc"].prefix.include)])
if spec.satisfies("+elpa"):
elpa = spec["elpa"]
diff --git a/var/spack/repos/builtin/packages/nyancat/package.py b/var/spack/repos/builtin/packages/nyancat/package.py
index 6aae264344..8eb8edaf34 100644
--- a/var/spack/repos/builtin/packages/nyancat/package.py
+++ b/var/spack/repos/builtin/packages/nyancat/package.py
@@ -18,6 +18,8 @@ class Nyancat(MakefilePackage):
version("1.5.0", sha256="9ae4f740060b77bba815d8d4e97712d822bd0812a118b88b7fd6b4136a971bce")
version("1.4.5", sha256="b26d752b95088be9d5caa73daea884572c0fc836ba55f0062e4d975301c4c661")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter(
diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py
index 175a5833cf..595853ef3b 100644
--- a/var/spack/repos/builtin/packages/ocaml/package.py
+++ b/var/spack/repos/builtin/packages/ocaml/package.py
@@ -14,6 +14,10 @@ class Ocaml(Package):
url = "https://caml.inria.fr/pub/distrib/ocaml-4.06/ocaml-4.06.0.tar.gz"
maintainers("scemama")
+ version("5.2.0", sha256="3a7b5fb6d81bb42bbda84aadf5d84ff8bcbb149988087e7863bf5c2f4b27b187")
+ version("5.1.1", sha256="33b8c1df88700ba1f5123aa4bdbc7a125482feafc77e5081ef1725fddf290be1")
+ version("5.1.0", sha256="5e91492d87b193728a0729122b679039c73e75820dcf2724a31b262390d210c2")
+ version("5.0.0", sha256="969e1f7939736d39f2af533cd12cc64b05f060dbed087d7b760ee2503bfe56de")
version("4.13.1", sha256="66a5353c5e7b33a8981446e857657aad45a3b82080ea5c67d4baa434eacfcf5f")
version("4.12.0", sha256="9825e5903b852a7a5edb71a1ed68f5d5d55d6417e2dda514dda602bc6efeed7b")
version("4.11.0", sha256="b5bd04bf794a676389b167633f01f8275acdd853149b137f7575f2c2ddef1377")
@@ -27,6 +31,9 @@ class Ocaml(Package):
version("4.06.0", sha256="c17578e243c4b889fe53a104d8927eb8749c7be2e6b622db8b3c7b386723bf50")
version("4.03.0", sha256="7fdf280cc6c0a2de4fc9891d0bf4633ea417046ece619f011fd44540fcfc8da2")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("fix-duplicate-defs.patch", when="@4.08.0:4.09.0 %gcc@10.0:")
# #9969, #9981: Added mergeable flag to ELF sections containing mergeable
# constants. Fixes compatibility with the integrated assembler in clang 11.0.0.
@@ -43,7 +50,7 @@ class Ocaml(Package):
variant("force-safe-string", default=True, description="Enforce safe (immutable) strings")
def url_for_version(self, version):
- url = "http://caml.inria.fr/pub/distrib/ocaml-{0}/ocaml-{1}.tar.gz"
+ url = "https://caml.inria.fr/pub/distrib/ocaml-{0}/ocaml-{1}.tar.gz"
return url.format(str(version)[:-2], version)
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/occa/package.py b/var/spack/repos/builtin/packages/occa/package.py
index bd56b8e3fa..941cbf3ca5 100644
--- a/var/spack/repos/builtin/packages/occa/package.py
+++ b/var/spack/repos/builtin/packages/occa/package.py
@@ -34,6 +34,10 @@ class Occa(Package):
version("0.2.0", tag="v0.2.0", commit="2eceaa5706ad6cf3a1b153c1f2a8a2fffa2d5945")
version("0.1.0", tag="v0.1.0", commit="381e886886dc87823769c5f20d0ecb29dd117afa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("cuda", default=True, description="Activates support for CUDA")
variant("openmp", default=True, description="Activates support for OpenMP")
variant("opencl", default=True, description="Activates support for OpenCL")
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index c945bae6f3..48f1ed0eeb 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -3,13 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import platform
-
-from spack.operating_systems.mac_os import macos_version
from spack.package import *
-class Oce(Package):
+class Oce(CMakePackage):
"""Open CASCADE Community Edition
UNMAINTAINED: see https://github.com/tpaviot/oce/issues/745#issuecomment-992285943
@@ -18,24 +15,40 @@ class Oce(Package):
homepage = "https://github.com/tpaviot/oce"
url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz"
- version("0.18.3", sha256="c553d6a7bf52f790abc3b6bb7a1e91a65947e92a426bb1a88a11960c31f0966c")
- version("0.18.2", sha256="dc21ddea678a500ad87c773e9a502ed7a71768cf83d9af0bd4c43294186a7fef")
- version("0.18.1", sha256="1acf5da4bffa3592ca9f3535af9b927b79fcfeadcb81e9963e89aec192929a6c")
- version("0.18", sha256="226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993")
- version("0.17.2", sha256="8d9995360cd531cbd4a7aa4ca5ed969f08ec7c7a37755e2f3d4ef832c1b2f56e")
- version("0.17.1", sha256="b1ff0cb8cf31339bbb30ac7ed2415d376b9b75810279d2f497e115f08c090928")
- version("0.17", sha256="9ab0dc2a2d125b46cef458b56c6d171dfe2218d825860d616c5ab17994b8f74d")
- version("0.16.1", sha256="d31030c8da4a1b33f767d0d59895a995c8eabc8fc65cbe0558734f6021ea2f57")
- version("0.16", sha256="841fe4337a5a4e733e36a2efc4fe60a4e6e8974917028df05d47a02f59787515")
+ with default_args(deprecated=True):
+ version(
+ "0.18.3", sha256="c553d6a7bf52f790abc3b6bb7a1e91a65947e92a426bb1a88a11960c31f0966c"
+ )
+ version(
+ "0.18.2", sha256="dc21ddea678a500ad87c773e9a502ed7a71768cf83d9af0bd4c43294186a7fef"
+ )
+ version(
+ "0.18.1", sha256="1acf5da4bffa3592ca9f3535af9b927b79fcfeadcb81e9963e89aec192929a6c"
+ )
+ version("0.18", sha256="226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993")
+ version(
+ "0.17.2", sha256="8d9995360cd531cbd4a7aa4ca5ed969f08ec7c7a37755e2f3d4ef832c1b2f56e"
+ )
+ version(
+ "0.17.1", sha256="b1ff0cb8cf31339bbb30ac7ed2415d376b9b75810279d2f497e115f08c090928"
+ )
+ version("0.17", sha256="9ab0dc2a2d125b46cef458b56c6d171dfe2218d825860d616c5ab17994b8f74d")
+ version(
+ "0.16.1", sha256="d31030c8da4a1b33f767d0d59895a995c8eabc8fc65cbe0558734f6021ea2f57"
+ )
+ version("0.16", sha256="841fe4337a5a4e733e36a2efc4fe60a4e6e8974917028df05d47a02f59787515")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("tbb", default=True, description="Build with Intel Threading Building Blocks")
variant("X11", default=False, description="Build with X11 enabled")
- depends_on("cmake@2.8:", type="build")
+ depends_on("cmake@3:", type="build")
with when("+tbb"):
depends_on("tbb")
- depends_on("intel-tbb@:2020 build_system=makefile", when="^intel-tbb")
+ depends_on("intel-tbb@:2020 build_system=makefile", when="^[virtuals=tbb] intel-tbb")
conflicts("^intel-oneapi-tbb@2021.1:")
# There is a bug in OCE which appears with Clang (version?) or GCC 6.0
@@ -50,43 +63,25 @@ class Oce(Package):
# see https://github.com/tpaviot/oce/issues/675
patch("xlocale.patch", level=0, when="@0.18.1:0.18.2")
- # fix build with Xcode 8 "previous definition of CLOCK_REALTIME"
- # reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
- if (platform.system() == "Darwin") and (macos_version() == Version("10.12")):
- patch("sierra.patch", when="@0.17.2:0.18.0")
-
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
- options.extend(
- [
- "-DOCE_INSTALL_PREFIX=%s" % prefix,
- "-DOCE_BUILD_SHARED_LIB:BOOL=ON",
- "-DCMAKE_BUILD_TYPE:STRING=Release",
- "-DOCE_DATAEXCHANGE:BOOL=ON",
- "-DOCE_DISABLE_X11:BOOL=%s" % ("OFF" if "+X11" in spec else "ON"),
- "-DOCE_DRAW:BOOL=OFF",
- "-DOCE_MODEL:BOOL=ON",
- "-DOCE_MULTITHREAD_LIBRARY:STRING=%s" % ("TBB" if "+tbb" in spec else "NONE"),
- "-DOCE_OCAF:BOOL=ON",
- "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF",
- "-DOCE_VISUALISATION:BOOL=OFF",
- "-DOCE_WITH_FREEIMAGE:BOOL=OFF",
- "-DOCE_WITH_GL2PS:BOOL=OFF",
- "-DOCE_WITH_OPENCL:BOOL=OFF",
- ]
- )
-
- if platform.system() == "Darwin":
- options.extend(["-DOCE_OSX_USE_COCOA:BOOL=ON"])
-
- if platform.system() == "Darwin" and (macos_version() >= Version("10.12")):
- # use @rpath on Sierra due to limit of dynamic loader
- options.append("-DCMAKE_MACOSX_RPATH=ON")
- else:
- options.append("-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib" % prefix)
-
- cmake(".", *options)
- make("install/strip")
- if self.run_tests:
- make("test")
+ def cmake_args(self):
+ args = [
+ self.define("OCE_INSTALL_PREFIX", self.prefix),
+ self.define("OCE_BUILD_SHARED_LIB", True),
+ self.define("OCE_DATAEXCHANGE", True),
+ self.define("OCE_DISABLE_X11", self.spec.satisfies("~X11")),
+ self.define("OCE_DRAW", False),
+ self.define("OCE_MODEL", True),
+ self.define(
+ "OCE_MULTITHREAD_LIBRARY", ("TBB" if self.spec.satisfies("+tbb") else "NONE")
+ ),
+ self.define("OCE_OCAF", True),
+ self.define("OCE_USE_TCL_TEST_FRAMEWORK", False),
+ self.define("OCE_VISUALISATION", False),
+ self.define("OCE_WITH_FREEIMAGE", False),
+ self.define("OCE_WITH_GL2PS", False),
+ self.define("OCE_WITH_OPENCL", False),
+ ]
+
+ if self.spec.satisfies("platform=darwin"):
+ args.append(self.define("OCE_OSX_USE_COCOA", True))
+ return args
diff --git a/var/spack/repos/builtin/packages/oce/sierra.patch b/var/spack/repos/builtin/packages/oce/sierra.patch
deleted file mode 100644
index 1c0c86569b..0000000000
--- a/var/spack/repos/builtin/packages/oce/sierra.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx
-index f7374fb..63ac140 100644
---- a/src/OSD/OSD_Chronometer.cxx.old
-+++ b/src/OSD/OSD_Chronometer.cxx
-@@ -51,7 +51,7 @@
- #include <mach/mach.h>
- #endif
-
--#if defined(__APPLE__) && defined(__MACH__)
-+#if defined(__APPLE__) && !defined(__MAC_10_12)
- #include "gettime_osx.h"
- #endif
diff --git a/var/spack/repos/builtin/packages/oci-systemd-hook/package.py b/var/spack/repos/builtin/packages/oci-systemd-hook/package.py
index 5d0c5c62bd..01d29d8bf7 100644
--- a/var/spack/repos/builtin/packages/oci-systemd-hook/package.py
+++ b/var/spack/repos/builtin/packages/oci-systemd-hook/package.py
@@ -19,6 +19,8 @@ class OciSystemdHook(AutotoolsPackage):
version("0.1.18", sha256="c17291bf5151e972c502ec3cc9b445967823444b1f3917481eb419c9e476649e")
version("0.1.5", sha256="53f773b055928d0f3d25ccc966d0d0b3ccb4dd00e8ff71a067b105142da22763")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ocl-icd/package.py b/var/spack/repos/builtin/packages/ocl-icd/package.py
index 80f500c61b..42efeef4e2 100644
--- a/var/spack/repos/builtin/packages/ocl-icd/package.py
+++ b/var/spack/repos/builtin/packages/ocl-icd/package.py
@@ -16,6 +16,7 @@ class OclIcd(AutotoolsPackage):
license("BSD-2-Clause")
+ version("2.3.2", sha256="ec47d7dcd961ea06695b067e8b7edb82e420ddce03e0081a908c62fd0b8535c5")
version("2.3.1", sha256="a32b67c2d52ffbaf490be9fc18b46428ab807ab11eff7664d7ff75e06cfafd6d")
version("2.3.0", sha256="469f592ccd9b0547fb7212b17e1553b203d178634c20d3416640c0209e3ddd50")
version("2.2.14", sha256="46df23608605ad548e80b11f4ba0e590cef6397a079d2f19adf707a7c2fbfe1b")
@@ -31,6 +32,8 @@ class OclIcd(AutotoolsPackage):
version("2.2.4", sha256="92853137ffff393cc74f829357fdd80ac46a82b46c970e80195db86164cca316")
version("2.2.3", sha256="46b8355d90f8cc240555e4e077f223c47b950abeadf3e1af52d6e68d2efc2ff3")
+ depends_on("c", type="build") # generated
+
variant(
"headers",
default=False,
diff --git a/var/spack/repos/builtin/packages/oclgrind/package.py b/var/spack/repos/builtin/packages/oclgrind/package.py
index 76dd8fd47a..fdf3bc69db 100644
--- a/var/spack/repos/builtin/packages/oclgrind/package.py
+++ b/var/spack/repos/builtin/packages/oclgrind/package.py
@@ -20,4 +20,7 @@ class Oclgrind(CMakePackage):
version("master", branch="master")
version("19.10", sha256="f9a8f22cb9f6d88670f2578c46ba0d728ba8eaee5c481c2811129dc157c43dc0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("llvm +clang @5.0:")
diff --git a/var/spack/repos/builtin/packages/oclint/package.py b/var/spack/repos/builtin/packages/oclint/package.py
index c278ea5751..2fa9c53596 100644
--- a/var/spack/repos/builtin/packages/oclint/package.py
+++ b/var/spack/repos/builtin/packages/oclint/package.py
@@ -18,6 +18,8 @@ class Oclint(Package):
version("0.13", sha256="a0fd188673863e6357d6585b9bb9c3affe737df134b9383a1a5ed021d09ed848")
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type=("build"))
depends_on("git", type=("build"))
depends_on("subversion", type=("build"))
diff --git a/var/spack/repos/builtin/packages/oclock/package.py b/var/spack/repos/builtin/packages/oclock/package.py
index c8816c7407..9622c8f887 100644
--- a/var/spack/repos/builtin/packages/oclock/package.py
+++ b/var/spack/repos/builtin/packages/oclock/package.py
@@ -17,6 +17,8 @@ class Oclock(AutotoolsPackage, XorgPackage):
version("1.0.4", sha256="cffc414cd0cf0b0e4a9bec3b5e707d9c2e2bcd109629d74bd6dd61381563dd35")
version("1.0.3", sha256="6628d1abe1612b87db9d0170cbe7f1cf4205cd764274f648c3c1bdb745bff877")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxmu")
depends_on("libxext")
diff --git a/var/spack/repos/builtin/packages/octave-arduino/package.py b/var/spack/repos/builtin/packages/octave-arduino/package.py
index 52857e761c..9dab93a2a9 100644
--- a/var/spack/repos/builtin/packages/octave-arduino/package.py
+++ b/var/spack/repos/builtin/packages/octave-arduino/package.py
@@ -17,5 +17,7 @@ class OctaveArduino(OctavePackage, SourceforgePackage):
version("0.2.0", sha256="0562ff48ea4b2cef28e2e03ccc4678dafa16f91d1580245bb7f9f488c4f56238")
+ depends_on("cxx", type="build") # generated
+
depends_on("octave-instrctl")
extends("octave@3.6.0:")
diff --git a/var/spack/repos/builtin/packages/octave-control/package.py b/var/spack/repos/builtin/packages/octave-control/package.py
index 629d2a1baf..e3da8de047 100644
--- a/var/spack/repos/builtin/packages/octave-control/package.py
+++ b/var/spack/repos/builtin/packages/octave-control/package.py
@@ -17,4 +17,6 @@ class OctaveControl(OctavePackage, SourceforgePackage):
version("3.2.0", sha256="faf1d510d16ab46e4fa91a1288f4a7839ee05469c33e4698b7a007a0bb965e3e")
+ depends_on("cxx", type="build") # generated
+
extends("octave@4.0.0:")
diff --git a/var/spack/repos/builtin/packages/octave-gsl/package.py b/var/spack/repos/builtin/packages/octave-gsl/package.py
index ca82c96056..0884768d82 100644
--- a/var/spack/repos/builtin/packages/octave-gsl/package.py
+++ b/var/spack/repos/builtin/packages/octave-gsl/package.py
@@ -16,6 +16,8 @@ class OctaveGsl(OctavePackage, SourceforgePackage):
version("2.1.1", sha256="d028c52579e251c3f21ebfdf065dffab3ad7893434efda33b501225ef1ea6ed3")
+ depends_on("cxx", type="build") # generated
+
depends_on("gsl@2.4:")
extends("octave@2.9.7:")
diff --git a/var/spack/repos/builtin/packages/octave-instrctl/package.py b/var/spack/repos/builtin/packages/octave-instrctl/package.py
index 3ee5ff878e..be6c23aba9 100644
--- a/var/spack/repos/builtin/packages/octave-instrctl/package.py
+++ b/var/spack/repos/builtin/packages/octave-instrctl/package.py
@@ -15,4 +15,6 @@ class OctaveInstrctl(OctavePackage, SourceforgePackage):
version("0.3.1", sha256="d9c3b2e258cc8245ebfdd282e6314af12987daf453f4356555f56ca5ec55873c")
+ depends_on("cxx", type="build") # generated
+
extends("octave@3.6.0:")
diff --git a/var/spack/repos/builtin/packages/octave-splines/package.py b/var/spack/repos/builtin/packages/octave-splines/package.py
index d6c515475b..d3cb070b7c 100644
--- a/var/spack/repos/builtin/packages/octave-splines/package.py
+++ b/var/spack/repos/builtin/packages/octave-splines/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class OctaveSplines(OctavePackage, SourceforgePackage):
"""Additional spline functions."""
- homepage = "http://octave.sourceforge.net/splines/index.html"
+ homepage = "https://octave.sourceforge.net/splines/index.html"
sourceforge_mirror_path = "octave/splines-1.3.1.tar.gz"
license("GPL-3.0-or-later")
diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py
index ef2e5e02e3..422664ef8d 100644
--- a/var/spack/repos/builtin/packages/octave/package.py
+++ b/var/spack/repos/builtin/packages/octave/package.py
@@ -30,6 +30,8 @@ class Octave(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("9.1.0", sha256="3f8c6c6ecfa249a47c97e18e651be4db8499be2f5de1a095a3eea53efc01d6a1")
+ version("8.4.0", sha256="6b38dd9751678424aeb3a9d666432b1f378eb3971a21290a90cd3d35119d56ad")
version("8.2.0", sha256="57d17f918a940d38ca3348211e110b34d735a322a87db71c177c4692a49a9c84")
version("8.1.0", sha256="8052074d17b0ef643d037de8ab389672c752bb201ee9cea4dfa69858fb6a213f")
version("7.3.0", sha256="6e14a4649d70af45ab660f8cbbf645aaf1ec33f25f88bfda4697cb17e440c4f5")
@@ -49,6 +51,10 @@ class Octave(AutotoolsPackage, GNUMirrorPackage):
version("4.0.2", sha256="39cd8fd36c218fc00adace28d74a6c7c9c6faab7113a5ba3c4372324c755bdc1")
version("4.0.0", sha256="4c7ee0957f5dd877e3feb9dfe07ad5f39b311f9373932f0d2a289dc97cca3280")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# patches
# see https://savannah.gnu.org/bugs/?50234
patch("patch_4.2.1_inline.diff", when="@4.2.1")
@@ -67,9 +73,10 @@ class Octave(AutotoolsPackage, GNUMirrorPackage):
variant("gnuplot", default=False, description="Use gnuplot")
variant("magick", default=False, description="Use magick")
variant("hdf5", default=False, description="Use HDF5")
- variant("jdk", default=False, description="Use JDK")
+ variant("jdk", default=False, description="Use Java")
variant("llvm", default=False, description="Use LLVM")
variant("opengl", default=False, description="Use OpenGL")
+ variant("pcre2", default=True, when="@8:", description="Use PCRE2 instead of PCRE")
variant("qhull", default=False, description="Use qhull")
variant("qrupdate", default=False, description="Use qrupdate")
variant("qscintilla", default=False, description="Use QScintill")
@@ -82,7 +89,9 @@ class Octave(AutotoolsPackage, GNUMirrorPackage):
depends_on("lapack")
# Octave does not configure with sed from darwin:
depends_on("sed", when=sys.platform == "darwin", type="build")
- depends_on("pcre")
+ depends_on("pcre", when="@:7")
+ depends_on("pcre", when="~pcre2")
+ depends_on("pcre2", when="+pcre2")
depends_on("pkgconfig", type="build")
depends_on("texinfo", type="build")
@@ -348,6 +357,8 @@ class Octave(AutotoolsPackage, GNUMirrorPackage):
else:
config_args.append("--without-z")
+ if spec.satisfies("~pcre2"):
+ config_args.append("--without-pcre2")
# If 64-bit BLAS is used:
if (
spec.satisfies("^openblas+ilp64")
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py
index 7098b163fa..8c8e2dd5d0 100644
--- a/var/spack/repos/builtin/packages/octopus/package.py
+++ b/var/spack/repos/builtin/packages/octopus/package.py
@@ -19,10 +19,12 @@ class Octopus(AutotoolsPackage, CudaPackage):
url = "https://octopus-code.org/download/6.0/octopus-6.0.tar.gz"
git = "https://gitlab.com/octopus-code/octopus"
- maintainers("fangohr", "RemiLacroix-IDRIS")
+ maintainers("fangohr", "RemiLacroix-IDRIS", "iamashwin99")
license("Apache-2.0")
+ version("14.1", sha256="6955f4020e69f038650a24509ff19ef35de4fd34e181539f92fa432db9b66ca7")
+ version("14.0", sha256="3cf6ef571ff97cc2c226016815d2ac4aa1e00ae3fb0cc693e0aff5620b80373e")
version("13.0", sha256="b4d0fd496c31a9c4aa4677360e631765049373131e61f396b00048235057aeb1")
version("12.2", sha256="e919e07703696eadb4ba59352d7a2678a9191b4586cb9da538661615e765a5a2")
version("12.1", sha256="e2214e958f1e9631dbe6bf020c39f1fe4d71ab0b6118ea9bd8dc38f6d7a7959a")
@@ -42,6 +44,10 @@ class Octopus(AutotoolsPackage, CudaPackage):
version("develop", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("scalapack", default=False, when="+mpi", description="Compile with Scalapack")
variant("berkeleygw", default=False, description="Compile with BerkeleyGW")
@@ -104,7 +110,12 @@ class Octopus(AutotoolsPackage, CudaPackage):
depends_on("arpack-ng+mpi", when="+arpack")
depends_on("elpa+mpi", when="+elpa")
depends_on("netcdf-c+mpi", when="+netcdf") # Link dependency of NetCDF fortran lib
- depends_on("berkeleygw@2.1+mpi", when="+berkeleygw")
+ with when("+berkeleygw"):
+ # From octopus@14:, upstream switched support from BerkeleyGW@2.1 to @3.0:
+ # see https://gitlab.com/octopus-code/octopus/-/merge_requests/2257
+ # BerkeleyGW 2.1 is the last supported version until octopus@14
+ depends_on("berkeleygw@3:+mpi", when="@14:")
+ depends_on("berkeleygw@2.1+mpi", when="@:13")
with when("~mpi"): # list all the serial dependencies
depends_on("fftw@3:+openmp~mpi", when="@8:9") # FFT library
@@ -114,7 +125,9 @@ class Octopus(AutotoolsPackage, CudaPackage):
depends_on("arpack-ng~mpi", when="+arpack")
depends_on("elpa~mpi", when="+elpa")
depends_on("netcdf-c~~mpi", when="+netcdf") # Link dependency of NetCDF fortran lib
- depends_on("berkeleygw@2.1~mpi", when="+berkeleygw")
+ with when("+berkeleygw"):
+ depends_on("berkeleygw@3:~~mpi", when="@14:")
+ depends_on("berkeleygw@2.1~~mpi", when="@:13")
depends_on("etsf-io", when="+etsf-io")
depends_on("py-numpy", when="+python")
@@ -292,58 +305,53 @@ class Octopus(AutotoolsPackage, CudaPackage):
args.append(f"{cxxflags} {gcc10_extra}")
args.append(f"{cflags} {gcc10_extra}")
+ # for octopus 14.1 and above autotools is deprecated in favour of cmake
+ # inorder to continue using autotools we pass `--enable-silent-deprecation`
+ if spec.satisfies("@14.1:"):
+ args.append("--enable-silent-deprecation")
+
+ # Disable flags
+ #
+ # disable gdlib explicitly to avoid
+ # autotools picking gdlib up from the system
+ args.append("--disable-gdlib")
+
return args
@run_after("install")
@on_package_attributes(run_tests=True)
- def smoke_tests_after_install(self):
+ def benchmark_tests_after_install(self):
"""Function stub to run tests after install if desired
(for example through `spack install --test=root octopus`)
"""
- self.smoke_tests()
+ self.test_version()
+ self.test_example()
+ self.test_he()
- def test(self):
- """Entry point for smoke tests run through `spack test run octopus`."""
- self.smoke_tests()
-
- def smoke_tests(self):
- """Actual smoke tests for Octopus."""
- #
- # run "octopus --version"
- #
- exe = join_path(self.spec.prefix.bin, "octopus")
- options = ["--version"]
- purpose = "Check octopus can execute (--version)"
+ def test_version(self):
+ """Check octopus can execute (--version)"""
# Example output:
#
# spack-v0.17.2$ octopus --version
# octopus 11.3 (git commit )
- expected = ["octopus "]
-
- self.run_test(
- exe,
- options=options,
- expected=expected,
- status=[0],
- installed=False,
- purpose=purpose,
- skip_missing=False,
- )
+
+ exe = which(self.spec.prefix.bin.octopus)
+ out = exe("--version", output=str.split, error=str.split)
+ assert "octopus " in out
+
+ def test_recipe(self):
+ """run recipe example"""
# Octopus expects a file with name `inp` in the current working
# directory to read configuration information for a simulation run from
# that file. We copy the relevant configuration file in a dedicated
- # subfolder for each test.
+ # subfolder for the test.
#
# As we like to be able to run these tests also with the
# `spack install --test=root` command, we cannot rely on
# self.test_suite.current_test_data_dir, and need to copy the test
# input files manually (see below).
- #
- # run recipe example
- #
-
expected = [
"Running octopus",
"CalculationMode = recipe",
@@ -351,24 +359,27 @@ class Octopus(AutotoolsPackage, CudaPackage):
"recipe leads to an edible dish, " 'for it is clearly "system-dependent".',
"Calculation ended on",
]
- options = []
- purpose = "Run Octopus recipe example"
+
with working_dir("example-recipe", create=True):
print("Current working directory (in example-recipe)")
fs.copy(join_path(os.path.dirname(__file__), "test", "recipe.inp"), "inp")
- self.run_test(
- exe,
- options=options,
- expected=expected,
- status=[0],
- installed=False,
- purpose=purpose,
- skip_missing=False,
- )
+ exe = which(self.spec.prefix.bin.octopus)
+ out = exe(output=str.split, error=str.split)
+ check_outputs(expected, out)
+ def test_he(self):
+ """run He example"""
+
+ # Octopus expects a file with name `inp` in the current working
+ # directory to read configuration information for a simulation run from
+ # that file. We copy the relevant configuration file in a dedicated
+ # subfolder for the test.
#
- # run He example
- #
+ # As we like to be able to run these tests also with the
+ # `spack install --test=root` command, we cannot rely on
+ # self.test_suite.current_test_data_dir, and need to copy the test
+ # input files manually (see below).
+
expected = [
"Running octopus",
"Info: Starting calculation mode.",
@@ -377,17 +388,10 @@ class Octopus(AutotoolsPackage, CudaPackage):
"Info: Writing states.",
"Calculation ended on",
]
- options = []
- purpose = "Run tiny calculation for He"
+
with working_dir("example-he", create=True):
print("Current working directory (in example-he)")
fs.copy(join_path(os.path.dirname(__file__), "test", "he.inp"), "inp")
- self.run_test(
- exe,
- options=options,
- expected=expected,
- status=[0],
- installed=False,
- purpose=purpose,
- skip_missing=False,
- )
+ exe = which(self.spec.prefix.bin.octopus)
+ out = exe(output=str.split, error=str.split)
+ check_outputs(expected, out)
diff --git a/var/spack/repos/builtin/packages/odc/package.py b/var/spack/repos/builtin/packages/odc/package.py
index 5022fd6b25..20a9026d18 100644
--- a/var/spack/repos/builtin/packages/odc/package.py
+++ b/var/spack/repos/builtin/packages/odc/package.py
@@ -12,13 +12,19 @@ class Odc(CMakePackage):
homepage = "https://github.com/ecmwf/odc"
url = "https://github.com/ecmwf/odc/archive/refs/tags/1.3.0.tar.gz"
- maintainers("skosukhin")
+ maintainers("skosukhin", "climbfuji")
license("Apache-2.0")
+ version("1.5.2", sha256="49575c3ef9ae8825d588357022d0ff6caf3e557849888c9d2f0677e9efe95869")
+ version("1.4.6", sha256="ff99d46175e6032ddd0bdaa3f6a5e2c4729d24b698ba0191a2a4aa418f48867c")
version("1.4.5", sha256="8532d0453531d62e1f15791d1c5c96540b842913bd211a8ef090211eaf4cccae")
version("1.3.0", sha256="97a4f10765b341cc8ccbbf203f5559cb1b838cbd945f48d4cecb1bc4305e6cd6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=False, description="Enable the Fortran interface")
depends_on("ecbuild@3.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/odgi/package.py b/var/spack/repos/builtin/packages/odgi/package.py
index 0f4177d315..c96761bcfc 100644
--- a/var/spack/repos/builtin/packages/odgi/package.py
+++ b/var/spack/repos/builtin/packages/odgi/package.py
@@ -21,6 +21,9 @@ class Odgi(CMakePackage):
# <<< Versions list starts here
version("0.8.3", commit="34f006f31c3f6b35a1eb8d58a4edb1c458583de3", submodules=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# >>> Versions list ends here
# compilation problem with ninja
@@ -41,8 +44,4 @@ class Odgi(CMakePackage):
# >>> Dependencies list ends here
def cmake_args(self):
- args = [
- "-DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON",
- "-DPYTHON_EXECUTABLE:FILEPATH={0}".format(self.spec["python"].command),
- ]
- return args
+ return ["-DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON"]
diff --git a/var/spack/repos/builtin/packages/of-catalyst/package.py b/var/spack/repos/builtin/packages/of-catalyst/package.py
index d7a3821736..7db9cb811a 100644
--- a/var/spack/repos/builtin/packages/of-catalyst/package.py
+++ b/var/spack/repos/builtin/packages/of-catalyst/package.py
@@ -28,11 +28,17 @@ class OfCatalyst(CMakePackage):
version("develop", branch="develop")
version("1806", tag="v1806", commit="d97babec3581bad413fd602e17fcd4bc1e312d26")
+ depends_on("cxx", type="build") # generated
+
variant("full", default=False, description="Build against paraview (full) or catalyst (light)")
depends_on("openfoam@1806", when="@1806", type=("build", "link", "run"))
depends_on("openfoam@develop", when="@develop", type=("build", "link", "run"))
- depends_on("paraview@5.5:+osmesa~qt", when="+full")
+
+ with when("+full"):
+ depends_on("paraview@5.5: ~qt")
+ depends_on("gl")
+ requires("^[virtuals=gl] osmesa")
root_cmakelists_dir = "src/catalyst"
diff --git a/var/spack/repos/builtin/packages/of-precice/package.py b/var/spack/repos/builtin/packages/of-precice/package.py
index 99947c8f77..ff7fd26827 100644
--- a/var/spack/repos/builtin/packages/of-precice/package.py
+++ b/var/spack/repos/builtin/packages/of-precice/package.py
@@ -16,15 +16,26 @@ class OfPrecice(Package):
homepage = "https://precice.org/"
git = "https://github.com/precice/openfoam-adapter.git"
+ url = "https://github.com/precice/openfoam-adapter/archive/v1.2.3.tar.gz"
+ maintainers("MakisH", "kjrstory")
license("GPL-3.0-only")
- # Currently develop only
- version("develop", branch="master")
+ version("develop", branch="develop")
+ version("master", branch="master")
+ version("1.2.3", sha256="e5fbbc633a573cd1a952a98f7f05078a384078a8ea9cd166825148538a23683e")
+ version("1.2.2", sha256="9d2d8d372b39c4e672e6311e92545d335c52c8eb3cefea34a794572523583aa5")
+ version("1.2.1", sha256="12772ddea1eb0155ebf6d0a2ea4cd9700dbe63a0df016771b39591ae12efad11")
+ version("1.2.0", sha256="4e7676cffe12380cda7af32e84a7727dc4c9133815d3b0e1c22150a2e7b34ce0")
+ version("1.1.0", sha256="c35340b50d1b01978635130da94a876e1fa846c80b62e45204aa727db2ef4983")
+ version("1.0.0", sha256="b70e5bdce47328f789f76dc6187604f8568b4a996158b5a6f6c11f111ff10308")
+
+ depends_on("cxx", type="build") # generated
depends_on("openfoam+source")
depends_on("precice")
depends_on("yaml-cpp")
+ depends_on("pkgconfig", type="build")
# General patches
common = ["change-userdir.sh", "spack-derived-Allwmake"]
@@ -83,7 +94,8 @@ export CPLUS_INCLUDE_PATH
if os.path.isfile(f):
install(f, join_path(self.prefix, f))
- install_tree("tutorials", join_path(self.prefix, "tutorials"))
-
# Place directly under 'lib' (no bin)
install_tree(join_path(self.build_userdir, "lib"), join_path(self.prefix, "lib"))
+
+ def setup_run_environment(self, env):
+ env.prepend_path("LD_LIBRARY_PATH", join_path(self.prefix, "lib"))
diff --git a/var/spack/repos/builtin/packages/ollama/package.py b/var/spack/repos/builtin/packages/ollama/package.py
new file mode 100644
index 0000000000..0c916b90bd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ollama/package.py
@@ -0,0 +1,57 @@
+# Copyright 2013-2024 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 spack.build_systems.go
+from spack.package import *
+
+
+class Ollama(GoPackage, CudaPackage):
+ """Run Llama 2, Code Llama, and other models. Customize and create your own."""
+
+ homepage = "https://ollama.com"
+ git = "https://github.com/ollama/ollama.git"
+
+ maintainers("teaguesterling", "brettviren")
+
+ # A shell script is run by `go generate` which assumes source is in a git
+ # repo. So we must use git VCS and not tarballs and defeat source caching.
+ with default_args(submodules=True, no_cache=True):
+ version("0.4.2", commit="d875e99e4639dc07af90b2e3ea0d175e2e692efb")
+ version("0.3.9", commit="a1cef4d0a5f31280ea82b350605775931a6163cb")
+ version("0.1.31", commit="dc011d16b9ff160c0be3829fc39a43054f0315d0")
+ # This is the last verified non-preview version as of 20240413
+ version("0.1.30", commit="756c2575535641f1b96d94b4214941b90f4c30c7")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ license("MIT", checked_by="teaguesterling")
+
+ depends_on("cmake@3.24:", type="build")
+ depends_on("go@1.4.0:", type="build")
+ depends_on("git", type="build")
+
+
+class GoBuilder(spack.build_systems.go.GoBuilder):
+ phases = ("generate", "build", "install")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+cuda"):
+ # These variables are consumed by gen_linux.sh which is called by
+ # "go generate".
+ cuda_prefix = self.spec["cuda"].prefix
+ env.set("CUDACXX", cuda_prefix.bin.nvcc)
+ env.set("CUDA_LIB_DIR", cuda_prefix.lib)
+ env.set("CMAKE_CUDA_ARCHITECTURES", self.spec.variants["cuda_arch"].value)
+
+ @property
+ def generate_args(self):
+ """Arguments for ``go generate``."""
+ return ["./..."]
+
+ def generate(self, pkg, spec, prefix):
+ """Runs ``go generate`` in the source directory"""
+ with working_dir(self.build_directory):
+ go("generate", *self.generate_args)
diff --git a/var/spack/repos/builtin/packages/ome-common-cpp/package.py b/var/spack/repos/builtin/packages/ome-common-cpp/package.py
index 7e4939d028..a13957de5b 100644
--- a/var/spack/repos/builtin/packages/ome-common-cpp/package.py
+++ b/var/spack/repos/builtin/packages/ome-common-cpp/package.py
@@ -25,6 +25,8 @@ class OmeCommonCpp(CMakePackage):
version("master", branch="master")
version("6.0.0", sha256="26f3ce6e0b9a022590eed2ade5519eca12a2507bb207cdfe9f29d360984a7e0d")
+ depends_on("cxx", type="build") # generated
+
depends_on("fmt")
depends_on("spdlog")
depends_on("xalan-c")
diff --git a/var/spack/repos/builtin/packages/ome-files-cpp/package.py b/var/spack/repos/builtin/packages/ome-files-cpp/package.py
index 96af69f7df..2edab104fd 100644
--- a/var/spack/repos/builtin/packages/ome-files-cpp/package.py
+++ b/var/spack/repos/builtin/packages/ome-files-cpp/package.py
@@ -24,6 +24,8 @@ class OmeFilesCpp(CMakePackage):
version("master", branch="master")
version("0.6.0", sha256="e0baf3eeb2ea639f426292a36b58adcaa42ce61a4a0f15f34690602f3f5d47c1")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.53: +filesystem +program_options")
depends_on("ome-model")
depends_on("ome-model@master", when="@master")
diff --git a/var/spack/repos/builtin/packages/ome-model/package.py b/var/spack/repos/builtin/packages/ome-model/package.py
index aa94521f26..93c58e086c 100644
--- a/var/spack/repos/builtin/packages/ome-model/package.py
+++ b/var/spack/repos/builtin/packages/ome-model/package.py
@@ -23,6 +23,8 @@ class OmeModel(CMakePackage):
version("master", branch="master")
version("6.0.0", sha256="d6644ff722411d3a8ac9f26a49c1afda30e4d4102e37b31593d2a9fdc8f96700")
+ depends_on("cxx", type="build") # generated
+
# Match version with ome-common-cpp. It would be nice to match versions in a
# more automated way.
depends_on("ome-common-cpp")
diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py
index 25887e0491..a1e3a2363d 100644
--- a/var/spack/repos/builtin/packages/omega-h/package.py
+++ b/var/spack/repos/builtin/packages/omega-h/package.py
@@ -20,17 +20,27 @@ class OmegaH(CMakePackage, CudaPackage):
tags = ["e4s"]
version("main", branch="main")
version(
- "scorec.10.7.0",
+ "10.8.6-scorec",
+ commit="a730c78e516d7f6cca4f8b4e4e0a5eb8020f9ad9",
+ git="https://github.com/SCOREC/omega_h.git",
+ )
+ version(
+ "10.8.5-scorec",
+ commit="62026fc305356abb5e02a9fce3fead9cf5077fbe",
+ git="https://github.com/SCOREC/omega_h.git",
+ )
+ version(
+ "10.7.0-scorec",
commit="0e5de8618c3370f702e08c1b1af476dbbc118892",
git="https://github.com/SCOREC/omega_h.git",
)
version(
- "scorec.10.6.0",
+ "10.6.0-scorec",
commit="f376fad4741b55a4b2482218eb3437d719b7c72e",
git="https://github.com/SCOREC/omega_h.git",
)
version(
- "scorec.10.1.0",
+ "10.1.0-scorec",
commit="e88912368e101d940f006019585701a704295ab0",
git="https://github.com/SCOREC/omega_h.git",
)
@@ -59,26 +69,28 @@ class OmegaH(CMakePackage, CudaPackage):
variant("gmsh", default=False, description="Use Gmsh C++ API")
variant("kokkos", default=False, description="Use Kokkos")
+ depends_on("cxx", type="build")
+ depends_on("c", type="build", when="+mpi")
+
depends_on("gmsh", when="+examples")
depends_on("gmsh@4.4.1:", when="+gmsh")
depends_on("mpi", when="+mpi")
depends_on("trilinos +kokkos", when="+trilinos")
depends_on("kokkos", when="+kokkos")
depends_on("zlib-api", when="+zlib")
- # Note: '+cuda' and 'cuda_arch' variants are added by the CudaPackage
- depends_on("cuda", when="+cuda")
- conflicts(
- "^cuda@11.2",
- when="@scorec.10.1.0:",
- msg="Thrust is broken in CUDA = 11.2.* see https://github.com/sandialabs/omega_h/issues/366",
- )
- # the sandia repo has a fix for cuda > 11.2 support
- # see github.com/sandialabs/omega_h/pull/373
- conflicts(
- "^cuda@11.2",
- when="@:9.34.4",
- msg="Thrust is broken in CUDA = 11.2.* see https://github.com/sandialabs/omega_h/issues/366",
- )
+
+ with when("+cuda"):
+ # https://github.com/SCOREC/omega_h/commit/40a2d36d0b747a7147aeed238a0323f40b227cb2
+ depends_on("cuda@11.4:", when="@10.8.3:")
+
+ # https://github.com/SCOREC/omega_h/commit/c2109d2900696974ee66c3fbe6a1ec0e93b66cb6
+ depends_on("cuda@:11", when="@:10.6")
+
+ # Single, broken CUDA version.
+ conflicts("^cuda@11.2", msg="See https://github.com/sandialabs/omega_h/issues/366")
+
+ # https://github.com/SCOREC/omega_h/pull/118
+ conflicts("@10.5:10.8.5 +cuda~kokkos")
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610
conflicts("%gcc@8:8.2", when="@:9.22.1")
@@ -106,9 +118,8 @@ class OmegaH(CMakePackage, CudaPackage):
args.append("-DBUILD_SHARED_LIBS:BOOL=OFF")
if "+mpi" in self.spec:
args.append("-DOmega_h_USE_MPI:BOOL=ON")
- ver = self.spec.version
# old versions don't call find_package(MPI)
- if ver < Version("9.33.2") and "scorec" not in str(ver):
+ if self.spec.satisfies("@:9.33.1"):
args.append("-DCMAKE_CXX_COMPILER:FILEPATH={0}".format(self.spec["mpi"].mpicxx))
else:
args.append("-DOmega_h_USE_MPI:BOOL=OFF")
@@ -117,7 +128,7 @@ class OmegaH(CMakePackage, CudaPackage):
cuda_arch_list = self.spec.variants["cuda_arch"].value
cuda_arch = cuda_arch_list[0]
if cuda_arch != "none":
- if "scorec" in str(self.spec.version):
+ if self.spec.satisfies("@10:"):
args.append("-DOmega_h_CUDA_ARCH={0}".format(cuda_arch))
else:
args.append("-DCMAKE_CUDA_FLAGS=-arch=sm_{0}".format(cuda_arch))
@@ -158,23 +169,20 @@ class OmegaH(CMakePackage, CudaPackage):
return (None, None, flags)
- def test(self):
- if self.spec.version < Version("9.34.1"):
- print("Skipping tests since only relevant for versions > 9.34.1")
- return
-
- exe = join_path(self.prefix.bin, "osh_box")
- options = ["1", "1", "1", "2", "2", "2", "box.osh"]
- description = "testing mesh construction"
- self.run_test(exe, options, purpose=description)
-
- exe = join_path(self.prefix.bin, "osh_scale")
- options = ["box.osh", "100", "box_100.osh"]
- expected = "adapting took"
- description = "testing mesh adaptation"
- self.run_test(exe, options, expected, purpose=description)
-
- exe = join_path(self.prefix.bin, "osh2vtk")
- options = ["box_100.osh", "box_100_vtk"]
- description = "testing mesh to vtu conversion"
- self.run_test(exe, options, purpose=description)
+ def test_mesh(self):
+ """test construction, adaptation, and conversion of a mesh"""
+ if self.spec.satisfies("@:9.34.0"):
+ raise SkipTest("Package must be installed as version 9.34.1 or later")
+
+ with test_part(self, "test_mesh_create", purpose="mesh construction"):
+ exe = which(self.prefix.bin.osh_box)
+ exe("1", "1", "1", "2", "2", "2", "box.osh")
+
+ with test_part(self, "test_mesh_adapt", purpose="mesh adaptation"):
+ exe = which(self.prefix.bin.osh_scale)
+ actual = exe("box.osh", "100", "box_100.osh", output=str.split, error=str.split)
+ assert "adapting took" in actual
+
+ with test_part(self, "test_mesh_convert", purpose="mesh to vtu conversion"):
+ exe = which(self.prefix.bin.osh2vtk)
+ exe("box_100.osh", "box_100_vtk")
diff --git a/var/spack/repos/builtin/packages/omm-bundle/fjmpi_pspBasicTool.patch b/var/spack/repos/builtin/packages/omm-bundle/fjmpi_pspBasicTool.patch
new file mode 100644
index 0000000000..700069b418
--- /dev/null
+++ b/var/spack/repos/builtin/packages/omm-bundle/fjmpi_pspBasicTool.patch
@@ -0,0 +1,15 @@
+--- a/pspBLAS/src/pspUtility/pspBasicTool.F90 2023-11-01 10:34:05.000000000 +0900
++++ b/pspBLAS/src/pspUtility/pspBasicTool.F90 2023-11-01 10:34:39.000000000 +0900
+@@ -15,9 +15,9 @@ MODULE pspBasicTool
+ use pspVariable
+ ! This module contains routines for indexing, generating, copying, transforming (sparse) data
+
+-#ifdef HAVE_MPI
+- include 'mpif.h'
+-#endif
++!#ifdef HAVE_MPI
++! include 'mpif.h'
++!#endif
+
+ private
+
diff --git a/var/spack/repos/builtin/packages/omm-bundle/package.py b/var/spack/repos/builtin/packages/omm-bundle/package.py
new file mode 100644
index 0000000000..f42ce9a7bb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/omm-bundle/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2023 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 shutil
+
+from spack.package import *
+
+
+class OmmBundle(MakefilePackage):
+ """Omm-bundle is a library implementing the orbital minimization method for
+ solving the Kohn-Sham equation as a generalized eigenvalue problem and
+ a bundle of four separate libraries: pspBLAS, MatrixSwitch, libOMM, tomato."""
+
+ homepage = "https://esl.cecam.org/"
+ git = "https://gitlab.com/ElectronicStructureLibrary/omm/omm-bundle.git"
+
+ version("master", branch="master")
+ version("1.0.0", tag="v1.0.0", commit="8b644267284695ff1a40b78d098bda6464a7b821")
+
+ depends_on("fortran", type="build") # generated
+
+ depends_on("mpi")
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("scalapack")
+ depends_on("dbcsr")
+
+ # Avoid duplicate include error in mpi.h in Fujitsu compiler
+ patch("fjmpi_pspBasicTool.patch", when="@: %fj")
+
+ def edit(self, spec, prefix):
+ # edit make.inc
+ shutil.copy("make.inc.example", "make.inc")
+ makeinc = FileFilter("make.inc")
+ makeinc.filter("FORTRAN =.*", "FORTRAN = {0}".format(spec["mpi"].mpifc))
+ linalg_libs = (
+ self.spec["lapack"].libs + self.spec["blas"].libs + self.spec["scalapack"].libs
+ )
+ makeinc.filter("LINALG_LIBS =.*", "LINALG_LIBS = {0}".format(linalg_libs.ld_flags))
+ makeinc.filter("#FPPFLAGS ", "FPPFLAGS ")
+ makeinc.filter("#DBCSR =.*", "DBCSR = {0}".format(spec["dbcsr"].prefix))
+ makeinc.filter("#DBCSRINC ", "DBCSRINC ")
+ makeinc.filter("#DBCSRLIB =.*", "DBCSRLIB = -L$(DBCSR)/lib64 -ldbcsr")
+
+ # fix Makefile of tomato to avoid error(cp: cannot stat '*.mod': No such file or directory)
+ tomato_makefile = FileFilter("tomato/src/Makefile.manual")
+ tomato_makefile.filter(" cp *.mod $(BUILDPATH)/include; \\\n", "")
+
+ def build(self, spec, prefix):
+ make("-f", "Makefile.manual", "all", parallel=False)
+
+ def install(self, spec, prefix):
+ for d in ["pspBLAS", "MatrixSwitch", "libOMM", "tomato"]:
+ install_tree("build_" + d, prefix + "/build_" + d)
diff --git a/var/spack/repos/builtin/packages/omm/package.py b/var/spack/repos/builtin/packages/omm/package.py
new file mode 100644
index 0000000000..c89b883f57
--- /dev/null
+++ b/var/spack/repos/builtin/packages/omm/package.py
@@ -0,0 +1,60 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Omm(CMakePackage):
+ """Solution of Kohn-Sham equations using the Orbital Minimization Method (OMM)."""
+
+ homepage = "https://gitlab.com/ElectronicStructureLibrary/omm/libomm"
+ url = "https://gitlab.com/ElectronicStructureLibrary/omm/libomm/-/archive/1.2.1/libomm-1.2.1.tar.gz"
+ git = "https://gitlab.com/ElectronicStructureLibrary/omm/libomm.git"
+
+ maintainers("RMeli")
+
+ license("BSD-2-Clause", checked_by="RMeli")
+
+ version("1.2.1", sha256="4876990056efabdd83b0caad52ed56632d9926b61d73fe3efbd04d0f8d242ede")
+ version("master", branch="master")
+
+ depends_on("fortran", type="build") # generated
+
+ variant("lapack", default=True, description="Build libOMM with LAPACK interface.")
+ variant("mpi", default=True, description="Build libOMM with MPI support.")
+ variant(
+ "scalapack",
+ default=True,
+ when="+mpi",
+ description="Build libOMM with ScaLAPACK interface.",
+ )
+ variant("dbcsr", default=False, when="+mpi", description="Build libOMM with DBCSR interface.")
+
+ depends_on("cmake@3.22:", type="build")
+ generator("ninja")
+
+ depends_on("lapack", when="+lapack")
+ depends_on("mpi", when="+mpi")
+ depends_on("scalapack", when="+scalapack")
+ depends_on("dbcsr~shared", when="+dbcsr") # Expects static library (FindCustomDbcsr)
+
+ depends_on("matrix-switch")
+ depends_on("matrix-switch+lapack", when="+lapack")
+ depends_on("matrix-switch+mpi", when="+mpi")
+ depends_on("matrix-switch+scalapack", when="+scalapack")
+ depends_on("matrix-switch+dbcsr", when="+dbcsr")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("WITH_LAPACK", "lapack"),
+ self.define_from_variant("WITH_MPI", "mpi"),
+ self.define_from_variant("WITH_SCALAPACK", "scalapack"),
+ self.define_from_variant("WITH_DBCSR", "dbcsr"),
+ ]
+
+ if self.spec.satisfies("+dbcsr"):
+ args.append(self.define("DBCSR_ROOT", self.spec["dbcsr"].prefix))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/omniperf/0001-remove-VERSION.sha-install.patch b/var/spack/repos/builtin/packages/omniperf/0001-remove-VERSION.sha-install.patch
new file mode 100644
index 0000000000..779dfa6763
--- /dev/null
+++ b/var/spack/repos/builtin/packages/omniperf/0001-remove-VERSION.sha-install.patch
@@ -0,0 +1,24 @@
+From 0672d33d7c449fe75b0be5d476d1151b26e39b99 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Thu, 5 Sep 2024 14:29:36 +0000
+Subject: [PATCH] Remove install for VERSION.sha
+
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05aac32..9cf588a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -278,7 +278,6 @@ install(
+ # support files and version info
+ install(
+ FILES src/argparser.py src/config.py src/omniperf_base.py src/roofline.py VERSION
+- VERSION.sha
+ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}
+ COMPONENT main)
+ # src/omniperf_analyze
+--
+2.43.5
+
diff --git a/var/spack/repos/builtin/packages/omniperf/package.py b/var/spack/repos/builtin/packages/omniperf/package.py
new file mode 100644
index 0000000000..e4bfa1120b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/omniperf/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Omniperf(CMakePackage):
+ """Advanced Profiling and Analytics for AMD Hardware"""
+
+ homepage = "https://github.com/ROCm/omniperf"
+ git = "https://github.com/ROCm/omniperf.git"
+ url = "https://github.com/ROCm/omniperf/archive/refs/tags/rocm-6.2.1.tar.gz"
+
+ tags = ["rocm"]
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ license("MIT")
+
+ version("6.2.4", sha256="2230260fce0838583899f4969b936ca047b30985a0fffad276ea353232538770")
+ version("6.2.1", sha256="56b795d471adad8ee9d7025544269e23929da31524d73db6f54396d3aca1445a")
+ version("6.2.0", sha256="febe9011e0628ad62367fdc6c81bdb0ad4ed45803f79c794757ecea8bcfab58c")
+
+ depends_on("python@3.8:")
+ depends_on("py-pip", type="run")
+ depends_on("py-astunparse@1.6.2", type=("build", "run")) # wants exact version
+ depends_on("py-colorlover", type=("build", "run"))
+ depends_on("py-pyyaml")
+ depends_on("py-matplotlib")
+ depends_on("py-pandas")
+ depends_on("py-pymongo")
+ depends_on("py-tabulate")
+ depends_on("py-tqdm")
+ depends_on("py-kaleido")
+ depends_on("py-plotille")
+ depends_on("py-dash-svg", type=("build", "run"))
+ depends_on("py-dash", type=("build", "run"))
+ depends_on("py-dash-bootstrap-components", type=("build", "run"))
+
+ # VERSION.sha is not in the auto-generated ROCm release tarball
+ patch("0001-remove-VERSION.sha-install.patch")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
+
+ @run_after("install")
+ def after_install(self):
+ touch(join_path(self.spec.prefix.libexec.omniperf, "VERSION.sha"))
diff --git a/var/spack/repos/builtin/packages/omnitrace/package.py b/var/spack/repos/builtin/packages/omnitrace/package.py
index c23ffc755e..48403d56dd 100644
--- a/var/spack/repos/builtin/packages/omnitrace/package.py
+++ b/var/spack/repos/builtin/packages/omnitrace/package.py
@@ -11,24 +11,67 @@ from spack.package import *
class Omnitrace(CMakePackage):
"""Application Profiling, Tracing, and Analysis"""
- homepage = "https://amdresearch.github.io/omnitrace"
- git = "https://github.com/AMDResearch/omnitrace.git"
- maintainers("jrmadsen")
+ homepage = "https://rocm.docs.amd.com/projects/omnitrace/en/latest/index.html"
+ git = "https://github.com/ROCm/omnitrace.git"
+ url = "https://github.com/ROCm/omnitrace/archive/refs/tags/rocm-6.2.0.tar.gz"
+ maintainers("dgaliffiAMD", "afzpatel", "srekolam", "renjithravindrankannath", "jrmadsen")
license("MIT")
- version("main", branch="main", submodules=True)
+ version("amd-mainline", branch="amd-mainline", submodules=True)
+ version("amd-staging", branch="amd-staging", submodules=True)
+ version(
+ "1.12.0", tag="v1.12.0", commit="abff23ac4238da6d7891d9ac9f36a919e30bf759", submodules=True
+ )
+ version(
+ "rocm-6.2.4",
+ tag="rocm-6.2.4",
+ commit="47597c1be3699c5aaaf6164061ee4189c6b32445",
+ submodules=True,
+ )
+ version(
+ "rocm-6.2.1",
+ tag="rocm-6.2.1",
+ commit="df91a342370401c93b5278bf082e520d6a0e22e9",
+ submodules=True,
+ )
+ version(
+ "1.11.4", tag="v1.11.4", commit="6b0627f5b7d4b05c3b7b1da581e474d48ebe36cf", submodules=True
+ )
+ version(
+ "rocm-6.2.0",
+ tag="rocm-6.2.0",
+ commit="f0bd9126a5456eb9e511d13261af262d17d9b61b",
+ submodules=True,
+ )
+ version(
+ "1.11.0", tag="v1.11.0", commit="77d52814e9050004cfb11d7917e155b00ab861b1", submodules=True
+ )
+ version(
+ "1.10.0", tag="v1.10.0", commit="9de3a6b0b4243bf8ec10164babdd99f64dbc65f2", submodules=True
+ )
+ version(
+ "1.9.0", tag="v1.9.0", commit="9eafb2360296277103d2ee706fb5f90b12722668", submodules=True
+ )
+ version(
+ "1.8.0", tag="v1.8.0", commit="7c73d981258cc3a29477756a95c1f90c5f8897dd", submodules=True
+ )
version("1.7.4", commit="12001d9633328f9f56210c7ebffce065bff06310", submodules=True)
version("1.7.3", commit="2ebfe3fc30f977559142509edc4ea190c975992a", submodules=True)
version("1.7.2", commit="a41a5c155e0d3780de4c83a76f28d7c8ffa6414f", submodules=True)
version("1.7.1", commit="67f7471253b8e031e476d80d2bc00e569285c1bf", submodules=True)
version("1.7.0", commit="2a387f909935d06c6a4874a5b11f38fb8521800e", submodules=True)
- version("1.6.0", commit="15e6e6d979fcd5f549d952862400f292ec735b8c", submodules=True)
- version("1.5.0", commit="2718596e5a6808a9278c3f6c8fddfaf977d3bcb6", submodules=True)
- version("1.4.0", commit="23fb3946c7f4c0702b1b168e1d78b8b62597e3f1", submodules=True)
- version("1.3.1", commit="641225f88304909fd2ca5407aec062d0fdf0ed8b", submodules=True)
- version("1.3.0", commit="4dd144a32c8b83c44e132ef53f2b44fe4b4d5569", submodules=True)
- version("1.2.0", commit="f82845388aab108ed1d1fc404f433a0def391bb3", submodules=True)
+ with default_args(deprecated=True):
+ version("1.6.0", commit="15e6e6d979fcd5f549d952862400f292ec735b8c", submodules=True)
+ version("1.5.0", commit="2718596e5a6808a9278c3f6c8fddfaf977d3bcb6", submodules=True)
+ version("1.4.0", commit="23fb3946c7f4c0702b1b168e1d78b8b62597e3f1", submodules=True)
+ version("1.3.1", commit="641225f88304909fd2ca5407aec062d0fdf0ed8b", submodules=True)
+ version("1.3.0", commit="4dd144a32c8b83c44e132ef53f2b44fe4b4d5569", submodules=True)
+ version("1.2.0", commit="f82845388aab108ed1d1fc404f433a0def391bb3", submodules=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"rocm",
@@ -85,11 +128,26 @@ class Omnitrace(CMakePackage):
depends_on("rocm-smi-lib", when="+rocm")
depends_on("roctracer-dev", when="+rocm")
depends_on("rocprofiler-dev", when="@1.3.0: +rocm")
+ depends_on("hip@5", when="@1:1.10 +rocm")
+ depends_on("rocm-smi-lib@5", when="@1:1.10 +rocm")
+ depends_on("roctracer-dev@5", when="@1:1.10 +rocm")
+ depends_on("rocprofiler-dev@5", when="@1.3.0:1.10 +rocm")
+
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocm-smi-lib@{ver}", when=f"@rocm-{ver} +rocm")
+ depends_on(f"hip@{ver}", when=f"@rocm-{ver} +rocm")
+ depends_on(f"roctracer-dev@{ver}", when=f"@rocm-{ver} +rocm")
+ depends_on(f"rocprofiler-dev@{ver}", when=f"@rocm-{ver} +rocm")
+
depends_on("papi+shared", when="+papi")
depends_on("mpi", when="+mpi")
depends_on("tau", when="+tau")
depends_on("caliper", when="+caliper")
depends_on("python@3:", when="+python", type=("build", "run"))
+ depends_on("dyninst@12", when="@1.8:,rocm-6.2:0 +rocm")
+ depends_on("m4", when="@1.8:,rocm-6.2:0 +rocm")
+ depends_on("texinfo", when="@1.8:,rocm-6.2:0 +rocm")
+ depends_on("libunwind", when="@1.8:,rocm-6.2:0 +rocm")
def cmake_args(self):
spec = self.spec
@@ -126,17 +184,23 @@ class Omnitrace(CMakePackage):
tau_root = spec["tau"].prefix
args.append(self.define("TAU_ROOT_DIR", tau_root))
- if "+python" in spec:
- 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(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
+ if spec.satisfies("@1.8:,rocm-6.2:0"):
+ args.append(self.define("dl_LIBRARY", "dl"))
+ args.append(
+ self.define("libunwind_INCLUDE_DIR", self.spec["libunwind"].prefix.include)
+ )
return args
+ def flag_handler(self, name, flags):
+ if self.spec.satisfies("@1.8:,rocm-6.2:0"):
+ if name == "ldflags":
+ flags.append("-lintl")
+ return (flags, None, None)
+
def setup_build_environment(self, env):
if "+tau" in self.spec:
import glob
@@ -146,7 +210,3 @@ class Omnitrace(CMakePackage):
files = glob.glob(pattern)
if files:
env.set("TAU_MAKEFILE", files[0])
-
- def setup_run_environment(self, env):
- if "+python" in self.spec:
- env.prepend_path("PYTHONPATH", join_path(self.prefix.lib, "python", "site-packages"))
diff --git a/var/spack/repos/builtin/packages/ompss-2/package.py b/var/spack/repos/builtin/packages/ompss-2/package.py
index 48ea331f9d..6ba60dd25b 100644
--- a/var/spack/repos/builtin/packages/ompss-2/package.py
+++ b/var/spack/repos/builtin/packages/ompss-2/package.py
@@ -24,6 +24,10 @@ class Ompss2(Package):
version("2022.11", sha256="2df1a5c0f01523ebee49596ca0939b3edeae50e6bd76680cc8777d92583e5a1e")
version("2021.11.1", sha256="9e0ee0c9f75cd558882465efc3d521c2fe93f1a6b50d4d9c8e614ab4eb3a9e6c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("extrae", default=False, description="Build with Extrae instrumentation support")
depends_on("hwloc")
diff --git a/var/spack/repos/builtin/packages/ompss/package.py b/var/spack/repos/builtin/packages/ompss/package.py
index 67986430bb..428162c589 100644
--- a/var/spack/repos/builtin/packages/ompss/package.py
+++ b/var/spack/repos/builtin/packages/ompss/package.py
@@ -27,6 +27,10 @@ class Ompss(Package):
version("14.10", sha256="5b38d3e6ce108e7ca73a2599bc698d75ea9f6d90a3be0349faf6d61022e62a38")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# all dependencies are optional, really
depends_on("mpi")
# depends_on("openmp")
diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py
index 5f67b63c6d..dbb7113ff0 100644
--- a/var/spack/repos/builtin/packages/ompt-openmp/package.py
+++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py
@@ -15,12 +15,16 @@ class OmptOpenmp(CMakePackage):
"""
homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp"
- url = "http://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz"
+ url = "https://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz"
license("MIT")
version("0.1", sha256="a35dd2a83777fce54386d54cea8d2df9b5f34309d66fbc1d1757d55f6048c7a7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
conflicts("%gcc@:4.7")
diff --git a/var/spack/repos/builtin/packages/oneapi-level-zero/package.py b/var/spack/repos/builtin/packages/oneapi-level-zero/package.py
index 120509dab3..4062244e13 100644
--- a/var/spack/repos/builtin/packages/oneapi-level-zero/package.py
+++ b/var/spack/repos/builtin/packages/oneapi-level-zero/package.py
@@ -23,6 +23,26 @@ class OneapiLevelZero(CMakePackage):
license("MIT")
+ version("1.17.2", sha256="f1b7414f468779a6c422d38bd06b2e5a59d861c9b1af826472724078b49b2277")
+ version("1.17.0", sha256="edf820eab84a5f746fee730604f0381c8811f7942302c0835226715e5ae93a25")
+ version("1.16.15", sha256="dba50f512c7da81c8d2c487f04c0fcf0ffff79a41f88a90658c96680e7c97be6")
+ version("1.16.14", sha256="afd1dfc4db6869a3e252bf15a2a6e1d59b4e511671ebc3e29becd4ac4dc4f03e")
+ version("1.16.11", sha256="885bc356d1ecb74e4d3406ece91503d998dd0b4ab484864c38fd41dac588afbb")
+ version("1.16.9", sha256="1d348370ba47a7047ae58805a7a33f219d78c8cbb1dd32a0b6c140be66f71d11")
+ version("1.16.1", sha256="f341dd6355d8da6ee9c29031642b8e8e4259f91c13c72d318c81663af048817e")
+ version("1.16.0", sha256="e5bf9caddeabf58b73252ada5390a78772001d91ec853ee12636811aeb66db41")
+ version("1.15.13", sha256="fadda7306dc05c279a9dfc0c60749846351ce5ac7186692201220acb02c59787")
+ version("1.15.8", sha256="80663dbd4d01d9519185c6e568f2e836bfea7484363f4da8cf5cf77c3bf58602")
+ version("1.15.7", sha256="3f82c83218cc047dc98a3b0767b874964d757b808d9954a2e8949edfcdddbf81")
+ version("1.15.1", sha256="aa96edb85a7953041baf8e7d0b0a0e10fa85673e52f5d0466bc2fc802beb9522")
+ version("1.15.0", sha256="0472f919435e72d93ef00239694c9380692f923fa1d3bf7e7ba79270cf78291c")
+ version("1.14.0", sha256="44b9cfa039625e4d9b273bebda26597a91d34c039ea22311530777ea386cfe6c")
+ version("1.13.5", sha256="bb0f37c40b1b2c1eb2c379928314539cac778d3accfc5de66d9f909a2f69fd32")
+ version("1.13.1", sha256="9c41640edd3738528911405ffe31c3caa9f9a747c43f6a7375a7b2e77eca3192")
+ version("1.13.0", sha256="8966e16f5152d14fed3b2d526d1a75eb99b8ef870499d8375c5d327345d09e48")
+ version("1.12.0", sha256="96e6f7ce0179833316f70582ebe4889619349cd4fb1a76efd49a71d8e8ac2e93")
+ version("1.11.0", sha256="eee9805bdf0973aff5858a32a8c3ac98e0337b64648d96bb8adeaecc0bdda5bd")
+ version("1.10.0", sha256="2811e4128ff6114020d0a147c2769b9b2e782e68ad49827685c33b9e716bf6ab")
version("1.9.9", sha256="3d1784e790bbaae5f160b920c07e7dc2941640d9c631aaa668ccfd57aafc7b56")
version("1.9.4", sha256="7f91ed993be1e643c752cf95a319a0fc64113d91ec481fbb8a2f478f433d3380")
version("1.8.12", sha256="9c5d3dd912882abe8e2e3ba72f8c27e2a2d86759ac48f6318a0df091204985eb")
@@ -40,3 +60,6 @@ class OneapiLevelZero(CMakePackage):
version("1.3.7", sha256="e84c7f36316257eb46f74b41aef5c37fb593a8821497e45dfeda81aceba0abbc")
version("1.3.6", sha256="c2b3bd6e4ee3cc874bdcc32bc8705bd217ffc46b194c77e27b23b8391c0c9704")
version("1.2.3", sha256="69689429fcdaef74fa8395785aca65f5652e410bd6c56f47b2b64692c098892b")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
diff --git a/var/spack/repos/builtin/packages/onednn/package.py b/var/spack/repos/builtin/packages/onednn/package.py
index 40708d41e0..4d2d2ac276 100644
--- a/var/spack/repos/builtin/packages/onednn/package.py
+++ b/var/spack/repos/builtin/packages/onednn/package.py
@@ -71,6 +71,9 @@ class Onednn(CMakePackage):
version("0.10", sha256="e783d6d085e4dd930a990cf02a76401071f606c6f40e47eae4dc638b54146430")
version("0.9", sha256="721ab6a14e05f9916645ebb410c3e97fae660d09a1c7df4da7958676504e572b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
default_cpu_runtime = "omp"
if sys.platform == "darwin":
default_cpu_runtime = "tbb"
@@ -85,7 +88,6 @@ class Onednn(CMakePackage):
"tbb",
"seq",
conditional("threadpool", when="@1.4:"),
- conditional("dpcpp", when="@2:"),
conditional("sycl", when="@2:"),
),
multi=False,
@@ -94,7 +96,7 @@ class Onednn(CMakePackage):
"gpu_runtime",
default="none",
description="Runtime to use for GPU engines",
- values=("ocl", "none", conditional("dpcpp", when="@2:"), conditional("sycl", when="@2:")),
+ values=("ocl", "none", conditional("sycl", when="@2:")),
multi=False,
)
variant(
diff --git a/var/spack/repos/builtin/packages/oniguruma/package.py b/var/spack/repos/builtin/packages/oniguruma/package.py
index de5be77f75..a7afee51cb 100644
--- a/var/spack/repos/builtin/packages/oniguruma/package.py
+++ b/var/spack/repos/builtin/packages/oniguruma/package.py
@@ -14,10 +14,13 @@ class Oniguruma(AutotoolsPackage):
license("BSD-2-Clause")
+ version("6.9.9", sha256="60162bd3b9fc6f4886d4c7a07925ffd374167732f55dce8c491bfd9cd818a6cf")
version("6.9.8", sha256="28cd62c1464623c7910565fb1ccaaa0104b2fe8b12bcd646e81f73b47535213e")
version("6.9.4", sha256="4669d22ff7e0992a7e93e116161cac9c0949cd8960d1c562982026726f0e6d53")
version("6.1.3", sha256="480c850cd7c7f2fcaad0942b4a488e2af01fbb8e65375d34908f558b432725cf")
+ depends_on("c", type="build") # generated
+
@property
def libs(self):
return find_libraries("libonig", root=self.prefix, recursive=True)
diff --git a/var/spack/repos/builtin/packages/onnx/package.py b/var/spack/repos/builtin/packages/onnx/package.py
index 5417e01127..d3f764786a 100644
--- a/var/spack/repos/builtin/packages/onnx/package.py
+++ b/var/spack/repos/builtin/packages/onnx/package.py
@@ -17,9 +17,15 @@ class Onnx(CMakePackage):
url = "https://github.com/onnx/onnx/archive/refs/tags/v1.9.0.tar.gz"
git = "https://github.com/onnx/onnx.git"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
version("master", branch="master")
+ version("1.16.2", sha256="84fc1c3d6133417f8a13af6643ed50983c91dacde5ffba16cc8bb39b22c2acbb")
+ version("1.16.1", sha256="0e6aa2c0a59bb2d90858ad0040ea1807117cc2f05b97702170f18e6cd6b66fb3")
+ version("1.16.0", sha256="0ce153e26ce2c00afca01c331a447d86fbf21b166b640551fe04258b4acfc6a4")
+ version("1.15.0", sha256="c757132e018dd0dd171499ef74fca88b74c5430a20781ec53da19eb7f937ef68")
+ version("1.14.1", sha256="e296f8867951fa6e71417a18f2e550a730550f8829bd35e947b4df5e3e777aa1")
+ version("1.14.0", sha256="1b02ad523f79d83f9678c749d5a3f63f0bcd0934550d5e0d7b895f9a29320003")
version(
"1.13.1", sha256="090d3e10ec662a98a2a72f1bf053f793efc645824f0d4b779e0ce47468a0890e"
) # py-torch@2:
@@ -56,16 +62,27 @@ class Onnx(CMakePackage):
"1.1.0_2018-04-19", commit="7e1bed51cc508a25b22130de459830b5d5063c41"
) # py-torch@0.4.0
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@3.1:", type="build")
depends_on("python", type="build")
depends_on("protobuf")
def patch(self):
- if self.spec.satisfies("@1.13 ^protobuf@3.22:"):
- filter_file("CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 14", "CMakeLists.txt")
+ if self.spec.satisfies("@1.13:1.14 ^protobuf@3.22:"):
+ # CMAKE_CXX_STANDARD is overridden in CMakeLists.txt until 1.14
+ cxxstd = self.spec["abseil-cpp"].variants["cxxstd"].value
+ filter_file("CMAKE_CXX_STANDARD 11", f"CMAKE_CXX_STANDARD {cxxstd}", "CMakeLists.txt")
def cmake_args(self):
- # Try to get ONNX to use the same version of python as the spec is using
- args = ["-DPY_VERSION={0}".format(self.spec["python"].version.up_to(2))]
+ args = [
+ # Try to get ONNX to use the same version of python as the spec is using
+ self.define("PY_VERSION", self.spec["python"].version.up_to(2)),
+ self.define("ONNX_BUILD_TESTS", self.run_tests),
+ ]
+ if self.spec.satisfies("@1.15: ^protobuf@3.22:"):
+ # CMAKE_CXX_STANDARD can be set on command line as of 1.15
+ cxxstd = self.spec["abseil-cpp"].variants["cxxstd"].value
+ args.append(self.define("CMAKE_CXX_STANDARD", cxxstd))
return args
diff --git a/var/spack/repos/builtin/packages/oommf/package.py b/var/spack/repos/builtin/packages/oommf/package.py
index fb181cba5e..e339b417df 100644
--- a/var/spack/repos/builtin/packages/oommf/package.py
+++ b/var/spack/repos/builtin/packages/oommf/package.py
@@ -108,6 +108,9 @@ class Oommf(Package):
url="https://github.com/fangohr/oommf/archive/refs/tags/1.2b0_20160930b1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("tk", type=("build", "link", "test", "run"))
depends_on("tcl", type=("build", "test", "run"))
depends_on("xproto", type=("build"))
diff --git a/var/spack/repos/builtin/packages/op2-dsl/package.py b/var/spack/repos/builtin/packages/op2-dsl/package.py
index 18df2a38eb..53618f814a 100644
--- a/var/spack/repos/builtin/packages/op2-dsl/package.py
+++ b/var/spack/repos/builtin/packages/op2-dsl/package.py
@@ -19,6 +19,10 @@ class Op2Dsl(MakefilePackage, CudaPackage):
version("master", branch="master")
version("1.1.0", tag="v1.1.0", commit="22c13b425976e32a6c904f3a5a95ffb761680eb3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
build_directory = "op2"
variant("mpi", default=False, description="Enable MPI support")
diff --git a/var/spack/repos/builtin/packages/opa-psm2/package.py b/var/spack/repos/builtin/packages/opa-psm2/package.py
index 795eeb7e69..aff8c73e6e 100644
--- a/var/spack/repos/builtin/packages/opa-psm2/package.py
+++ b/var/spack/repos/builtin/packages/opa-psm2/package.py
@@ -30,6 +30,8 @@ class OpaPsm2(MakefilePackage, CudaPackage):
version("10.2-235", sha256="052031ab87abadc2c11971e6aa53be363b38d58a496a6e54a820ca5bcd6545a5")
version("10.2-175", sha256="61b694191eca66e15e7ae1659bfacb10813e569d4e27182a88fb00b5661fb365")
+ depends_on("c", type="build") # generated
+
variant("avx2", default=True, description="Enable AVX2 instructions")
depends_on("numactl")
diff --git a/var/spack/repos/builtin/packages/opam/package.py b/var/spack/repos/builtin/packages/opam/package.py
index d1b6bff3fa..bae70b6d82 100644
--- a/var/spack/repos/builtin/packages/opam/package.py
+++ b/var/spack/repos/builtin/packages/opam/package.py
@@ -18,6 +18,11 @@ class Opam(AutotoolsPackage):
maintainers("scemama")
+ version("2.2.1", sha256="07ad3887f61e0bc61a0923faae16fcc141285ece5b248a9e2cd4f902523cc121")
+ version("2.2.0", sha256="39334f36adbe280683487cf204b7b0642080fc5965747f7d6f7cc7b83cd7a192")
+ version("2.1.6", sha256="d2af5edc85f552e0cf5ec0ddcc949d94f2dc550dc5df595174a06a4eaf8af628")
+ version("2.1.5", sha256="09f8d9e410b2f5723c2bfedbf7970e3b305f5017895fcd91759f05e753ddcea5")
+ version("2.1.4", sha256="1643609f4eea758eb899dc8df57b88438e525d91592056f135e6e045d0d916cb")
version("2.1.3", sha256="cb2ab00661566178318939918085aa4b5c35c727df83751fd92d114fdd2fa001")
version("2.0.6", sha256="7c4bff5e5f3628ad00c53ee1b044ced8128ffdcfbb7582f8773fb433e12e07f4")
version("2.0.5", sha256="776c7e64d6e24c2ef1efd1e6a71d36e007645efae94eaf860c05c1929effc76f")
@@ -29,15 +34,25 @@ class Opam(AutotoolsPackage):
version("1.2.2", sha256="15e617179251041f4bf3910257bbb8398db987d863dd3cfc288bdd958de58f00")
version("1.2.1", sha256="f210ece7a2def34b486c9ccfb75de8febd64487b2ea4a14a7fa0358f37eacc3b")
+ depends_on("c", type="build") # generated
+
# OCaml 4.10.0 has removed the -safe-string flag, which is necessary
# for OPAM 1i (see docstring of setup_build_environment).
depends_on("ocaml@:4.09.0", type="build", when="@:1.2.2")
depends_on("ocaml", type="build", when="@2.0.0:")
+ # While this package is a makefile package, 'make' is really only used to
+ # call the locally built copy of dune, which is itself parallel, so there's
+ # no sense in calling make with >1 job.
+ # See: ocaml/opam#3585 spack/spack#46535
parallel = False
sanity_check_is_file = ["bin/opam"]
+ @property
+ def build_directory(self):
+ return self.stage.source_path
+
@when("@:1.2.2")
def setup_build_environment(self, env):
"""In OCaml <4.06.1, the default was -safe-string=0, and this has
@@ -50,8 +65,27 @@ class Opam(AutotoolsPackage):
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/opam.rb
env.set("OCAMLPARAM", "safe-string=0,_") # OCaml 4.06.0 compat
+ def configure(self, spec, prefix):
+ args = ["--prefix={0}".format(prefix)]
+
+ with when("@:2.2"):
+ # NOTE: The config script really wants the vendored third party
+ # libraries to live in the <source prefix>/src_ext directory, not
+ # in the build directory when this flag is enabled. This is why the
+ # build directory must be set to the source path above.
+ args.append("--with-vendored-deps")
+
+ return configure(*args)
+
def build(self, spec, prefix):
- make("lib-ext")
+ # https://github.com/dbuenzli/cmdliner/issues/34#issuecomment-145236209
+ if spec.satisfies("@:2.1"):
+ make("lib-ext")
+
make()
+
if spec.satisfies("@:1.2.2"):
make("man")
+
+ def install(self, spec, prefix):
+ make("install")
diff --git a/var/spack/repos/builtin/packages/opari2/package.py b/var/spack/repos/builtin/packages/opari2/package.py
index ca08fa3ad8..5b000d5542 100644
--- a/var/spack/repos/builtin/packages/opari2/package.py
+++ b/var/spack/repos/builtin/packages/opari2/package.py
@@ -31,6 +31,10 @@ class Opari2(AutotoolsPackage):
version("1.1.4", sha256="b80c04fe876faaa4ee9a0654486ecbeba516b27fc14a90d20c6384e81060cffe")
version("1.1.2", sha256="8405c2903730d94c828724b3a5f8889653553fb8567045a6c54ac0816237835d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def url_for_version(self, version):
if version >= Version("2.0.6"):
url = "https://perftools.pages.jsc.fz-juelich.de/cicd/opari2/tags/opari2-{0}/opari2-{0}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/opdilib/package.py b/var/spack/repos/builtin/packages/opdilib/package.py
new file mode 100644
index 0000000000..9aa5f14ec2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/opdilib/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Opdilib(Package):
+ """OpDiLib (Open Multiprocessing Differentiation Library) is a universal add-on for
+ reverse mode operator overloading AD tools that enables the differentiation of
+ OpenMP parallel code."""
+
+ homepage = "https://github.com/SciCompKL/OpDiLib"
+ url = "https://github.com/SciCompKL/OpDiLib/archive/refs/tags/v1.5.tar.gz"
+
+ version("1.5.1", sha256="58bbd4c7105e519b553bd0cbcf1c9797e6e9ca5ea445e4cc55cd32f216300781")
+ version("1.5", sha256="47b345954df5e7ee8147e7b29db2ec160ba02ccc93b3b88af0b34bb880170248")
+ version("1.4", sha256="f1dd2575a8c3b2328df89b732dbeaa23657731d77e4bf7ee201c6571f20d13d5")
+ version("1.3.2", sha256="5da4a99ab1332e5c3746cb6d55ee4cd96ce578b06987e2b10e33ae6413b7cf7a")
+
+ depends_on("cxx", type="build") # generated
+
+ def install(self, spec, prefix):
+ mkdirp(join_path(prefix, "include"))
+ install_tree(join_path(self.stage.source_path, "include"), join_path(prefix, "include"))
+ mkdirp(join_path(prefix, "syntax"))
+ install_tree(join_path(self.stage.source_path, "syntax"), join_path(prefix, "syntax"))
diff --git a/var/spack/repos/builtin/packages/open-iscsi/package.py b/var/spack/repos/builtin/packages/open-iscsi/package.py
index fe0f354ab9..f93ecfae80 100644
--- a/var/spack/repos/builtin/packages/open-iscsi/package.py
+++ b/var/spack/repos/builtin/packages/open-iscsi/package.py
@@ -21,11 +21,16 @@ class OpenIscsi(MakefilePackage):
version("2.0.877", sha256="69eb95b0c39dee2da9d0d751bfdcdb8d11f9d37390de15c1a0b4558f9d0c4a57")
version("2.0.876", sha256="9f01327d5e100ed794dc5083fc18dc4a06a0c29c77b252e21abd1b8f56edd9a7")
+ depends_on("c", type="build")
+
depends_on("gettext")
depends_on("uuid")
depends_on("util-linux")
depends_on("kmod")
depends_on("open-isns")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
depends_on("libtool", type="build")
def setup_build_environment(self, env):
@@ -33,7 +38,7 @@ class OpenIscsi(MakefilePackage):
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
- env.prepend_path("LD_LIBRARY_PATH", self.prefix.usr.lib64)
def install(self, spec, prefix):
- make("install", "DESTDIR={0}".format(prefix))
+ etc_dir = join_path(prefix, "etc")
+ make("install", f"prefix={prefix}", f"exec_prefix={prefix}", f"etcdir={etc_dir}")
diff --git a/var/spack/repos/builtin/packages/open-isns/package.py b/var/spack/repos/builtin/packages/open-isns/package.py
index 38a9750419..3f9f7d10a5 100644
--- a/var/spack/repos/builtin/packages/open-isns/package.py
+++ b/var/spack/repos/builtin/packages/open-isns/package.py
@@ -21,11 +21,15 @@ class OpenIsns(AutotoolsPackage):
version("0.97", sha256="c1c9ae740172e55a1ff33bc22151ec3d916562bf5d60c8420cd64496343683a9")
version("0.96", sha256="487fd0d87826423ea99dc159826d0b654a5da016ed670d4395a77bfa4f62e2ec")
+ depends_on("c", type="build")
+
def configure_args(self):
args = ["--enable-shared"]
return args
def install(self, spec, prefix):
- make("install")
- make("install_hdrs")
- make("install_lib")
+ etc_dir = join_path(prefix, "etc")
+ var_dir = join_path(prefix, "var")
+ make("install", f"etcdir={etc_dir}", f"vardir={var_dir}")
+ make("install_hdrs", f"etcdir={etc_dir}", f"vardir={var_dir}")
+ make("install_lib", f"etcdir={etc_dir}", f"vardir={var_dir}")
diff --git a/var/spack/repos/builtin/packages/open3d/package.py b/var/spack/repos/builtin/packages/open3d/package.py
index 85fea1a181..01220d0c1b 100644
--- a/var/spack/repos/builtin/packages/open3d/package.py
+++ b/var/spack/repos/builtin/packages/open3d/package.py
@@ -11,7 +11,7 @@ from spack.package import *
class Open3d(CMakePackage, CudaPackage):
"""Open3D: A Modern Library for 3D Data Processing."""
- homepage = "http://www.open3d.org/"
+ homepage = "https://www.open3d.org/"
url = "https://github.com/isl-org/Open3D/archive/refs/tags/v0.13.0.tar.gz"
git = "https://github.com/isl-org/Open3D.git"
@@ -21,6 +21,10 @@ class Open3d(CMakePackage, CudaPackage):
"0.13.0", tag="v0.13.0", commit="c3f9de224e13838a72da0e5565a7ba51038b0f11", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("python", default=False, description="Build the Python module")
# http://www.open3d.org/docs/latest/compilation.html
@@ -70,7 +74,7 @@ class Open3d(CMakePackage, CudaPackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("BUILD_UNIT_TESTS", self.run_tests),
self.define_from_variant("BUILD_PYTHON_MODULE", "python"),
self.define_from_variant("BUILD_CUDA_MODULE", "cuda"),
@@ -95,11 +99,6 @@ class Open3d(CMakePackage, CudaPackage):
# self.define('USE_SYSTEM_TINYOBJLOADER', True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
-
- return args
-
def check(self):
with working_dir(self.build_directory):
tests = Executable(os.path.join("bin", "tests"))
@@ -121,11 +120,11 @@ class Open3d(CMakePackage, CudaPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
- def test(self):
- if "+python" in self.spec:
- self.run_test(
- self.spec["python"].command.path,
- ["-c", "import open3d"],
- purpose="checking import of open3d",
- work_dir="spack-test",
- )
+ def test_open3d_import(self):
+ """Checking import of open3d"""
+ if "+python" not in self.spec:
+ return
+
+ with working_dir("spack-test"):
+ python = which(python.path)
+ python("-c", "import open3d")
diff --git a/var/spack/repos/builtin/packages/openal-soft/package.py b/var/spack/repos/builtin/packages/openal-soft/package.py
index 51d62c2c6e..6e835e0395 100644
--- a/var/spack/repos/builtin/packages/openal-soft/package.py
+++ b/var/spack/repos/builtin/packages/openal-soft/package.py
@@ -21,6 +21,9 @@ class OpenalSoft(CMakePackage):
version("1.23.0", sha256="057dcf96c3cdfcf40159800a93f57740fe79c2956f76247bee10e436b6657183")
version("1.21.1", sha256="c8ad767e9a3230df66756a21cc8ebf218a9d47288f2514014832204e666af5d8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("alsa", default=False, description="ALSA support")
depends_on("alsa-lib", when="+alsa")
diff --git a/var/spack/repos/builtin/packages/openbabel/cmake-time.patch b/var/spack/repos/builtin/packages/openbabel/cmake-time.patch
new file mode 100644
index 0000000000..bc55894ff6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openbabel/cmake-time.patch
@@ -0,0 +1,15 @@
+diff --git a/src/config.h.cmake b/src/config.h.cmake
+index 1c59c6769..26e5dde94 100644
+--- a/src/config.h.cmake
++++ b/src/config.h.cmake
+@@ -182,8 +182,8 @@
+ #define OB_MODULE_PATH "@OB_MODULE_PATH@"
+
+ #ifndef TIME_WITH_SYS_TIME
+- #ifdef HAVE_SYS_TIME
+- #ifdef HAVE_TIME
++ #ifdef HAVE_SYS_TIME_H
++ #ifdef HAVE_TIME_H
+ #define TIME_WITH_SYS_TIME 1
+ #else
+ #define TIME_WITH_SYS_TIME 0
diff --git a/var/spack/repos/builtin/packages/openbabel/package.py b/var/spack/repos/builtin/packages/openbabel/package.py
index 346367cc15..e4e140faa3 100644
--- a/var/spack/repos/builtin/packages/openbabel/package.py
+++ b/var/spack/repos/builtin/packages/openbabel/package.py
@@ -12,7 +12,7 @@ class Openbabel(CMakePackage):
search, convert, analyze, or store data from molecular modeling, chemistry,
solid-state materials, biochemistry, or related areas."""
- homepage = "https://openbabel.org/wiki/Main_Page"
+ homepage = "https://openbabel.org/index.html"
url = "https://github.com/openbabel/openbabel/archive/openbabel-3-0-0.tar.gz"
git = "https://github.com/openbabel/openbabel.git"
@@ -25,6 +25,9 @@ class Openbabel(CMakePackage):
version("2.4.1", tag="openbabel-2-4-1", commit="701f6049c483b1349118c2ff736a7f609a84dedd")
version("2.4.0", tag="openbabel-2-4-0", commit="087f33320e6796f39e6a1da04f4de7ec46bec4af")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Build Python bindings")
variant("gui", default=True, description="Build with GUI")
variant("cairo", default=True, description="Build with Cairo (PNG output support)")
@@ -58,18 +61,15 @@ class Openbabel(CMakePackage):
# Convert tabs to spaces. Allows unit tests to pass
patch("testpdbformat-tabs-to-spaces.patch", when="@:2.4.1")
+ # https://github.com/openbabel/openbabel/pull/2493
+ patch("cmake-time.patch", when="@3.1.1")
+
def cmake_args(self):
spec = self.spec
args = []
if "+python" in spec:
- args.extend(
- [
- "-DPYTHON_BINDINGS=ON",
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path),
- "-DRUN_SWIG=ON",
- ]
- )
+ args.extend(["-DPYTHON_BINDINGS=ON", "-DRUN_SWIG=ON"])
else:
args.append("-DPYTHON_BINDINGS=OFF")
diff --git a/var/spack/repos/builtin/packages/openblas/openblas-0.3.28-thread-buffer.patch b/var/spack/repos/builtin/packages/openblas/openblas-0.3.28-thread-buffer.patch
new file mode 100644
index 0000000000..8c94a921a5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/openblas-0.3.28-thread-buffer.patch
@@ -0,0 +1,14 @@
+--- a/driver/others/blas_server.c 2024-09-18 17:09:48.362101394 -0700
++++ b/driver/others/blas_server.c 2024-09-18 17:12:59.690940586 -0700
+@@ -1076,6 +1076,11 @@
+ main_status[cpu] = MAIN_RUNNING1;
+ #endif
+
++if (buffer == NULL) {
++ blas_thread_buffer[cpu] = blas_memory_alloc(2);
++ buffer = blas_thread_buffer[cpu];
++}
++
+ //For target LOONGSON3R5, applying an offset to the buffer is essential
+ //for minimizing cache conflicts and optimizing performance.
+ #if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 92ab98c878..2785f3a06d 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -26,6 +26,9 @@ class Openblas(CMakePackage, MakefilePackage):
license("BSD-3-Clause")
version("develop", branch="develop")
+ version("0.3.28", sha256="f1003466ad074e9b0c8d421a204121100b0751c96fc6fcf3d1456bd12f8a00a1")
+ version("0.3.27", sha256="aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897")
+ version("0.3.26", sha256="4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68")
version("0.3.25", sha256="4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543")
version("0.3.24", sha256="ceadc5065da97bd92404cac7254da66cc6eb192679cf1002098688978d4d5132")
version("0.3.23", sha256="5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114")
@@ -70,6 +73,11 @@ class Openblas(CMakePackage, MakefilePackage):
variant("pic", default=True, description="Build position independent code")
variant("shared", default=True, description="Build shared libraries")
variant(
+ "dynamic_dispatch",
+ default=True,
+ description="Enable runtime cpu detection for best kernel selection",
+ )
+ variant(
"consistent_fpcsr",
default=False,
description="Synchronize FP CSR between threads (x86/x86_64 only)",
@@ -95,6 +103,14 @@ class Openblas(CMakePackage, MakefilePackage):
provides("lapack@3.9.1:", when="@0.3.15:")
provides("lapack@3.7.0", when="@0.2.20")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+ depends_on("perl", when="@:0.3.20", type="build")
+
+ # https://github.com/OpenMathLib/OpenBLAS/pull/4879
+ patch("openblas-0.3.28-thread-buffer.patch", when="@0.3.28")
+
# https://github.com/OpenMathLib/OpenBLAS/pull/4328
patch("xcode15-fortran.patch", when="@0.3.25 %apple-clang@15:")
@@ -215,6 +231,13 @@ class Openblas(CMakePackage, MakefilePackage):
when="@0.3.24 target=a64fx",
)
+ # Disable -fp-model=fast default on OneAPI (https://github.com/OpenMathLib/OpenBLAS/issues/4713)
+ patch(
+ "https://github.com/OpenMathLib/OpenBLAS/commit/834e633d796ba94ecb892acb32b6cdcee4e3771d.patch?full_index=1",
+ sha256="3e165d8cba4023cb2082b241eee41287dd6cbb66078c5e3cb5d246081b361ff3",
+ when="@0.3.27 %oneapi",
+ )
+
# See https://github.com/spack/spack/issues/19932#issuecomment-733452619
# Notice: fixed on Amazon Linux GCC 7.3.1 (which is an unofficial version
# as GCC only has major.minor releases. But the bound :7.3.0 doesn't hurt)
@@ -225,6 +248,7 @@ class Openblas(CMakePackage, MakefilePackage):
# See https://github.com/spack/spack/issues/3036
conflicts("%intel@16", when="@0.2.15:0.2.19")
+
conflicts(
"+consistent_fpcsr",
when="threads=none",
@@ -238,18 +262,23 @@ class Openblas(CMakePackage, MakefilePackage):
when="%clang",
msg="OpenBLAS @:0.2.19 does not support OpenMP with clang!",
)
+ # See https://github.com/OpenMathLib/OpenBLAS/issues/2826#issuecomment-688399162
+ conflicts(
+ "+dynamic_dispatch",
+ when="platform=windows",
+ msg="Visual Studio does not support OpenBLAS dynamic dispatch features",
+ )
- depends_on("perl", type="build")
+ conflicts("target=x86_64_v4:", when="%intel@2021")
build_system("makefile", "cmake", default="makefile")
def flag_handler(self, name, flags):
spec = self.spec
- iflags = []
if name == "cflags":
if spec.satisfies("@0.3.20: %oneapi") or spec.satisfies("@0.3.20: %arm"):
- iflags.append("-Wno-error=implicit-function-declaration")
- return (iflags, None, None)
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
@classmethod
def determine_version(cls, lib):
@@ -332,6 +361,16 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
# Get our build microarchitecture
microarch = self.spec.target
+ # We need to detect whether the target supports SVE before the magic for
+ # loop below which would change the value of `microarch`.
+ has_sve = (
+ self.spec.satisfies("@0.3.19:")
+ and microarch.family == "aarch64"
+ and "sve" in microarch
+ # Exclude A64FX, which has its own special handling in OpenBLAS.
+ and microarch.name != "a64fx"
+ )
+
# List of arguments returned by this function
args = []
@@ -367,7 +406,14 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
arch_name = openblas_arch_map.get(arch_name, arch_name)
args.append("ARCH=" + arch_name)
- if microarch.vendor == "generic" and microarch.name != "riscv64":
+ if has_sve:
+ # Check this before testing the value of `microarch`, which may have
+ # been altered by the magic for loop above. If SVE is available
+ # (but target isn't A64FX which is treated specially below), use the
+ # `ARMV8SVE` OpenBLAS target.
+ args.append("TARGET=ARMV8SVE")
+
+ elif microarch.vendor == "generic" and microarch.name != "riscv64":
# User requested a generic platform, or we couldn't find a good
# match for the requested one. Allow OpenBLAS to determine
# an optimized kernel at run time, including older CPUs, while
@@ -435,6 +481,9 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
# Add target and architecture flags
make_defs += self._microarch_target_args()
+ if self.spec.satisfies("+dynamic_dispatch"):
+ make_defs += ["DYNAMIC_ARCH=1"]
+
# Fortran-free compilation
if "~fortran" in self.spec:
make_defs += ["NOFORTRAN=1"]
@@ -498,6 +547,9 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
if self.spec.satisfies("+bignuma"):
make_defs.append("BIGNUMA=1")
+ if not self.spec.satisfies("target=x86_64_v4:"):
+ make_defs.append("NO_AVX512=1")
+
# Avoid that NUM_THREADS gets initialized with the host's number of CPUs.
if self.spec.satisfies("threads=openmp") or self.spec.satisfies("threads=pthreads"):
make_defs.append("NUM_THREADS=512")
@@ -525,17 +577,19 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
# Openblas may pass its own test but still fail to compile Lapack
# symbols. To make sure we get working Blas and Lapack, do a small
# test.
- source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c")
- blessed_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.output")
+ source_file = join_path(os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.c")
+ blessed_file = join_path(
+ os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.output"
+ )
include_flags = spec["openblas"].headers.cpp_flags
link_flags = spec["openblas"].libs.ld_flags
- if self.compiler.name == "intel":
+ if self.pkg.compiler.name == "intel":
link_flags += " -lifcore"
if self.spec.satisfies("threads=pthreads"):
link_flags += " -lpthread"
if spec.satisfies("threads=openmp"):
- link_flags += " -lpthread " + self.compiler.openmp_flag
+ link_flags += " -lpthread " + self.pkg.compiler.openmp_flag
output = compile_c_and_execute(source_file, [include_flags], link_flags.split())
compare_output_file(output, blessed_file)
@@ -543,7 +597,14 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
- cmake_defs = [self.define("TARGET", "GENERIC")]
+ cmake_defs = [
+ self.define("TARGET", "GENERIC"),
+ # ensure MACOSX_RPATH is set
+ self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"),
+ ]
+
+ if self.spec.satisfies("+dynamic_dispatch"):
+ cmake_defs += [self.define("DYNAMIC_ARCH", "ON")]
if self.spec.satisfies("platform=windows"):
cmake_defs += [
self.define("DYNAMIC_ARCH", "OFF"),
diff --git a/var/spack/repos/builtin/packages/opencarp/package.py b/var/spack/repos/builtin/packages/opencarp/package.py
index c6926bf064..289364536f 100644
--- a/var/spack/repos/builtin/packages/opencarp/package.py
+++ b/var/spack/repos/builtin/packages/opencarp/package.py
@@ -19,13 +19,19 @@ class Opencarp(CMakePackage):
maintainers("MarieHouillon")
version(
- "13.0",
- commit="e1e0deca7eddcfd210835f54430361c85a97a5a4",
+ "16.0",
+ commit="295055b6a3859709730f62fc8d4fe0e87c4e20b9",
submodules=False,
no_cache=True,
preferred=True,
)
version(
+ "15.0", commit="2271a3cccd7137f1e28c043c10adbd80480f1462", submodules=False, no_cache=True
+ )
+ version(
+ "13.0", commit="e1e0deca7eddcfd210835f54430361c85a97a5a4", submodules=False, no_cache=True
+ )
+ version(
"12.0", commit="a34c11af3e8c2afd6e123e586a446c6993e0b039", submodules=False, no_cache=True
)
version(
@@ -48,6 +54,9 @@ class Opencarp(CMakePackage):
)
version("master", branch="master", submodules=False, no_cache=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("carputils", default=False, description="Installs the carputils framework")
variant("meshtool", default=False, description="Installs the meshtool software")
@@ -66,7 +75,7 @@ class Opencarp(CMakePackage):
depends_on("py-carputils", when="+carputils", type=("build", "run"))
depends_on("meshtool", when="+meshtool", type=("build", "run"))
# Use specific versions of carputils and meshtool for releases
- for ver in ["13.0", "12.0", "11.0", "10.0", "9.0", "8.2", "7.0", "8.1"]:
+ for ver in ["16.0", "15.0", "13.0", "12.0", "11.0", "10.0", "9.0", "8.2", "8.1", "7.0"]:
depends_on("py-carputils@oc" + ver, when="@" + ver + " +carputils")
depends_on("meshtool@oc" + ver, when="@" + ver + " +meshtool")
diff --git a/var/spack/repos/builtin/packages/opencascade/package.py b/var/spack/repos/builtin/packages/opencascade/package.py
index 0759591684..7cd1ae20a5 100644
--- a/var/spack/repos/builtin/packages/opencascade/package.py
+++ b/var/spack/repos/builtin/packages/opencascade/package.py
@@ -23,56 +23,32 @@ class Opencascade(CMakePackage):
license("LGPL-2.1-only")
- version(
- "7.7.1",
- extension="tar.gz",
- sha256="f413d30a8a06d6164e94860a652cbc96ea58fe262df36ce4eaa92a9e3561fd12",
- )
- version(
- "7.7.0",
- extension="tar.gz",
- sha256="075ca1dddd9646fcf331a809904925055747a951a6afd07a463369b9b441b445",
- )
- version(
- "7.6.3",
- extension="tar.gz",
- sha256="baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200",
- )
- version(
- "7.6.0",
- extension="tar.gz",
- sha256="e7f989d52348c3b3acb7eb4ee001bb5c2eed5250cdcceaa6ae97edc294f2cabd",
- )
- version(
- "7.5.3p4",
- extension="tar.gz",
- sha256="f7571462041694f6bc7fadd94b0c251762078713cb5b0484845b6b8a4d8a0b99",
- )
- version(
- "7.5.3",
- extension="tar.gz",
- sha256="cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b",
- )
- version(
- "7.5.2",
- extension="tar.gz",
- sha256="1a32d2b0d6d3c236163cb45139221fb198f0f3cdad56606c5b1c9a2a8869b3ac",
- )
- version(
- "7.4.0p2",
- extension="tar.gz",
- sha256="93565f9bdc9575e0d6fcb34c11c8f06d8f9394250bb427870da65424e8537f60",
- )
- version(
- "7.4.0p1",
- extension="tar.gz",
- sha256="e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0",
- )
- version(
- "7.4.0",
- extension="tar.gz",
- sha256="655da7717dac3460a22a6a7ee68860c1da56da2fec9c380d8ac0ac0349d67676",
- )
+ with default_args(extension="tar.gz"):
+ version("7.8.1", sha256="33f2bdb67e3f6ae469f3fa816cfba34529a23a9cb736bf98a32b203d8531c523")
+ version("7.8.0", sha256="b9c8f0a9d523ac1a606697f95fc39d8acf1140d3728561b8010a604431b4e9cf")
+ version("7.7.2", sha256="2fb23c8d67a7b72061b4f7a6875861e17d412d524527b2a96151ead1d9cfa2c1")
+ version("7.7.1", sha256="f413d30a8a06d6164e94860a652cbc96ea58fe262df36ce4eaa92a9e3561fd12")
+ version("7.7.0", sha256="075ca1dddd9646fcf331a809904925055747a951a6afd07a463369b9b441b445")
+ version("7.6.3", sha256="baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200")
+ version("7.6.0", sha256="e7f989d52348c3b3acb7eb4ee001bb5c2eed5250cdcceaa6ae97edc294f2cabd")
+ version(
+ "7.5.3p5", sha256="29a4b4293f725bea2f32de5641b127452fc836a30e207d0daa5a0d1b746226b8"
+ )
+ version(
+ "7.5.3p4", sha256="f7571462041694f6bc7fadd94b0c251762078713cb5b0484845b6b8a4d8a0b99"
+ )
+ version("7.5.3", sha256="cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b")
+ version("7.5.2", sha256="1a32d2b0d6d3c236163cb45139221fb198f0f3cdad56606c5b1c9a2a8869b3ac")
+ version(
+ "7.4.0p2", sha256="93565f9bdc9575e0d6fcb34c11c8f06d8f9394250bb427870da65424e8537f60"
+ )
+ version(
+ "7.4.0p1", sha256="e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0"
+ )
+ version("7.4.0", sha256="655da7717dac3460a22a6a7ee68860c1da56da2fec9c380d8ac0ac0349d67676")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# fix for numeric_limits in gcc-12; applies cleanly to all older versions
patch(
diff --git a/var/spack/repos/builtin/packages/opencl-c-headers/package.py b/var/spack/repos/builtin/packages/opencl-c-headers/package.py
index 37623e65c0..afba470d0f 100644
--- a/var/spack/repos/builtin/packages/opencl-c-headers/package.py
+++ b/var/spack/repos/builtin/packages/opencl-c-headers/package.py
@@ -4,12 +4,10 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import sys
-
from spack.package import *
-class OpenclCHeaders(Package):
+class OpenclCHeaders(CMakePackage):
"""OpenCL (Open Computing Language) C header files"""
homepage = "https://www.khronos.org/registry/OpenCL/"
@@ -19,6 +17,27 @@ class OpenclCHeaders(Package):
license("Apache-2.0")
version(
+ "2024.05.08", sha256="3c3dd236d35f4960028f4f58ce8d963fb63f3d50251d1e9854b76f1caab9a309"
+ )
+ version(
+ "2023.12.14", sha256="407d5e109a70ec1b6cd3380ce357c21e3d3651a91caae6d0d8e1719c69a1791d"
+ )
+ version(
+ "2023.04.17", sha256="0ce992f4167f958f68a37918dec6325be18f848dee29a4521c633aae3304915d"
+ )
+ version(
+ "2023.02.06", sha256="464d1b04a5e185739065b2d86e4cebf02c154c416d63e6067a5060d7c053c79a"
+ )
+ version(
+ "2022.09.30", sha256="0ae857ecb28af95a420c800b21ed2d0f437503e104f841ab8db249df5f4fbe5c"
+ )
+ version(
+ "2022.09.23", sha256="dfaded8acf44473e47e7829373c6bb5fba148dc36a38ccd6ef7b6c1ebb78ae68"
+ )
+ version(
+ "2022.05.18", sha256="88a1177853b279eaf574e2aafad26a84be1a6f615ab1b00c20d5af2ace95c42e"
+ )
+ version(
"2022.01.04", sha256="6e716e2b13fc8d363b40a165ca75021b102f9328e2b38f8054d7db5884de29c9"
)
version(
@@ -37,8 +56,8 @@ class OpenclCHeaders(Package):
"2020.03.13", sha256="664bbe587e5a0a00aac267f645b7c413586e7bc56dca9ff3b00037050d06f476"
)
- def install(self, spec, prefix):
- install_tree("CL", prefix.include.CL)
- if sys.platform == "darwin":
- ln = which("ln")
- ln("-s", prefix.include.CL, prefix.include.OpenCL)
+ depends_on("c", type="build") # generated
+
+ def cmake_args(self):
+ # Disable testing the headers. They definitely work.
+ return ["-DBUILD_TESTING=OFF"]
diff --git a/var/spack/repos/builtin/packages/opencl-clhpp/package.py b/var/spack/repos/builtin/packages/opencl-clhpp/package.py
index 84e3b8dad4..4ecdb12157 100644
--- a/var/spack/repos/builtin/packages/opencl-clhpp/package.py
+++ b/var/spack/repos/builtin/packages/opencl-clhpp/package.py
@@ -27,6 +27,9 @@ class OpenclClhpp(CMakePackage):
version("2.0.10", sha256="fa27456295c3fa534ce824eb0314190a8b3ebd3ba4d93a0b1270fc65bf378f2b")
version("2.0.9", sha256="ba8ac4977650d833804f208a1b0c198006c65c5eac7c83b25dc32cea6199f58c")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
root_cmakelists_dir = "include"
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/opencl-icd-loader/package.py b/var/spack/repos/builtin/packages/opencl-icd-loader/package.py
new file mode 100644
index 0000000000..368eb1aa33
--- /dev/null
+++ b/var/spack/repos/builtin/packages/opencl-icd-loader/package.py
@@ -0,0 +1,68 @@
+# Copyright 2013-2024 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.package import *
+
+
+class OpenclIcdLoader(CMakePackage):
+ """Khronos official OpenCL ICD Loader"""
+
+ homepage = "https://github.com/KhronosGroup/OpenCL-ICD-Loader"
+ url = "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2024.05.08.tar.gz"
+
+ maintainers("uphoffc")
+
+ license("Apache-2.0", checked_by="uphoffc")
+
+ version(
+ "2024.05.08", sha256="eb2c9fde125ffc58f418d62ad83131ba686cccedcb390cc7e6bb81cc5ef2bd4f"
+ )
+ version(
+ "2023.12.14", sha256="af8df96f1e1030329e8d4892ba3aa761b923838d4c689ef52d97822ab0bd8917"
+ )
+ version(
+ "2023.04.17", sha256="173bdc4f321d550b6578ad2aafc2832f25fbb36041f095e6221025f74134b876"
+ )
+ version(
+ "2023.02.06", sha256="f31a932b470c1e115d6a858b25c437172809b939953dc1cf20a3a15e8785d698"
+ )
+ version(
+ "2022.09.30", sha256="e9522fb736627dd4feae2a9c467a864e7d25bb715f808de8a04eea5a7d394b74"
+ )
+ version(
+ "2022.09.23", sha256="937bbdb52819922e0e38ae765e3c3d76b63be185d62f25e256ea3f77fdaa9913"
+ )
+ version(
+ "2022.05.18", sha256="71f70bba797a501b13b6b0905dc852f3fd6e264d74ce294f2df98d29914c4303"
+ )
+ version(
+ "2022.01.04", sha256="9f21d958af68c1b625a03c2befddd79da95d610614ddab6c291f26f01a947dd8"
+ )
+ version(
+ "2021.06.30", sha256="a50557ed6ff18c81aa1ed5e74700521e389c84ca5cd9188d35d368936e0a4972"
+ )
+ version(
+ "2021.04.29", sha256="c2eb8a15b3d6d0795d609f55a4cea92eaa34571f6a21428d5593673b568ac6fd"
+ )
+
+ depends_on("c", type="build") # generated
+
+ depends_on("opencl-c-headers@2024.05.08", when="@2024.05.08")
+ depends_on("opencl-c-headers@2023.12.14", when="@2023.12.14")
+ depends_on("opencl-c-headers@2023.04.17", when="@2023.04.17")
+ depends_on("opencl-c-headers@2023.02.06", when="@2023.02.06")
+ depends_on("opencl-c-headers@2022.09.30", when="@2022.09.30")
+ depends_on("opencl-c-headers@2022.09.23", when="@2022.09.23")
+ depends_on("opencl-c-headers@2022.05.18", when="@2022.05.18")
+ depends_on("opencl-c-headers@2022.01.04", when="@2022.01.04")
+ depends_on("opencl-c-headers@2021.06.30", when="@2021.06.30")
+ depends_on("opencl-c-headers@2021.04.29", when="@2021.04.29")
+
+ provides("opencl@:3.0")
+
+ def cmake_args(self):
+ headers_include_dir = self.spec["opencl-c-headers"].prefix.include
+ args = [self.define("OPENCL_ICD_LOADER_HEADERS_DIR", headers_include_dir)]
+ return args
diff --git a/var/spack/repos/builtin/packages/opencoarrays/package.py b/var/spack/repos/builtin/packages/opencoarrays/package.py
index 22ff0f6400..9c5922f47b 100644
--- a/var/spack/repos/builtin/packages/opencoarrays/package.py
+++ b/var/spack/repos/builtin/packages/opencoarrays/package.py
@@ -19,6 +19,7 @@ class Opencoarrays(CMakePackage):
license("BSD-3-Clause")
+ version("2.10.2", sha256="e13f0dc54b966b0113deed7f407514d131990982ad0fe4dea6b986911d26890c")
version("2.10.1", sha256="b04b8fa724e7e4e5addbab68d81d701414e713ab915bafdf1597ec5dd9590cd4")
version("2.9.3", sha256="eeee0b3be665022ab6838c523ddab4af9c948d4147afd6cd7bc01f028583cfe1")
version("2.9.2", sha256="6c200ca49808c75b0a2dfa984304643613b6bc77cc0044bee093f9afe03698f7")
@@ -30,6 +31,9 @@ class Opencoarrays(CMakePackage):
version("1.7.4", sha256="1929dee793ce8f09e3b183e2b07c3e0008580cc76b460b1f7f7c066ad6672e14")
version("1.6.2", sha256="7855d42a01babc233a070cc87282b5f8ffd538a7c87ec5119605d4d7c6d7f67e")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="RelWithDebInfo",
@@ -44,6 +48,6 @@ class Opencoarrays(CMakePackage):
def cmake_args(self):
args = []
- args.append("-DCMAKE_C_COMPILER=%s" % self.spec["mpi"].mpicc)
- args.append("-DCMAKE_Fortran_COMPILER=%s" % self.spec["mpi"].mpifc)
+ args.append(f"-DCMAKE_C_COMPILER={self.spec['mpi'].mpicc}")
+ args.append(f"-DCMAKE_Fortran_COMPILER={self.spec['mpi'].mpifc}")
return args
diff --git a/var/spack/repos/builtin/packages/opencolorio/package.py b/var/spack/repos/builtin/packages/opencolorio/package.py
new file mode 100644
index 0000000000..bed7b22eb3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/opencolorio/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Opencolorio(CMakePackage):
+ """OpenColorIO (OCIO) is a complete color management solution geared towards motion
+ picture production with an emphasis on visual effects and computer animation."""
+
+ homepage = "https://opencolorio.readthedocs.io"
+ git = "https://github.com/AcademySoftwareFoundation/OpenColorIO"
+ url = (
+ "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v2.4.0.tar.gz"
+ )
+ license("Apache-2.0")
+
+ version("2.4.0", sha256="0ff3966b9214da0941b2b1cbdab3975a00a51fc6f3417fa860f98f5358f2c282")
+
+ # Core dependencies
+ depends_on("cmake@3.14:", type="build")
+ depends_on("expat@2.2.8:")
+ depends_on("yaml-cpp@0.6.3:")
+ depends_on("imath@3.0.5:")
+ depends_on("pystring@1.1.3:")
+
+ # Optional dependencies
+ variant("lcms", default=False, description="Little CMS for ociobakelut")
+ depends_on("lcms@2.2:", when="+lcms")
+
+ variant("python", default=False, description="Build python bindings")
+ extends("python", when="+python")
+ depends_on("py-pybind11", when="+python", type=("build", "run"))
+
+ def cmake_args(self):
+ args = ["-DOCIO_BUILD_PYTHON={0}".format("ON" if "+python" in self.spec else "OFF")]
+ return args
diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py
index 1f23970a7b..5811099885 100644
--- a/var/spack/repos/builtin/packages/opencv/package.py
+++ b/var/spack/repos/builtin/packages/opencv/package.py
@@ -15,12 +15,16 @@ class Opencv(CMakePackage, CudaPackage):
homepage = "https://opencv.org/"
url = "https://github.com/opencv/opencv/archive/4.5.0.tar.gz"
git = "https://github.com/opencv/opencv.git"
+ find_python_hints = False # opencv uses custom OpenCVDetectPython.cmake
maintainers("bvanessen", "adamjstewart")
license("BSD-3-Clause")
version("master", branch="master")
+ version("4.10.0", sha256="b2171af5be6b26f7a06b1229948bbb2bdaa74fcf5cd097e0af6378fce50a6eb9")
+ version("4.9.0", sha256="ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c")
+ version("4.8.1", sha256="62f650467a60a38794d681ae7e66e3e8cfba38f445e0bf87867e2f2cdc8be9d5")
version("4.8.0", sha256="cbf47ecc336d2bff36b0dcd7d6c179a9bb59e805136af6b9670ca944aef889bd")
version("4.7.0", sha256="8df0079cdbe179748a18d44731af62a245a45ebf5085223dc03133954c662973")
version("4.6.0", sha256="1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277")
@@ -45,6 +49,9 @@ class Opencv(CMakePackage, CudaPackage):
version("3.3.1", sha256="5dca3bb0d661af311e25a72b04a7e4c22c47c1aa86eb73e70063cd378a2aa6ee")
version("3.3.0", sha256="8bb312b9d9fd17336dc1f8b3ac82f021ca50e2034afc866098866176d985adc6")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
contrib_vers = [
"3.3.0",
"3.3.1",
@@ -69,6 +76,9 @@ class Opencv(CMakePackage, CudaPackage):
"4.6.0",
"4.7.0",
"4.8.0",
+ "4.8.1",
+ "4.9.0",
+ "4.10.0",
]
for cv in contrib_vers:
resource(
@@ -250,6 +260,8 @@ class Opencv(CMakePackage, CudaPackage):
depends_on("python@3.2:", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/opencv/opencv/issues/25455
+ depends_on("py-numpy@:1", when="@:4.9", type=("build", "run"))
extends("python", when="+python3")
with when("+stitching"):
@@ -480,6 +492,7 @@ class Opencv(CMakePackage, CudaPackage):
with when("+hdf"):
depends_on("hdf5")
+ depends_on("mpi", when="^hdf5+mpi")
with when("+hfs"):
with when("+cuda"):
@@ -780,41 +793,31 @@ class Opencv(CMakePackage, CudaPackage):
# using `OCV_OPTION(WITH_* ...)`
conflicts("+android_mediandk", when="platform=darwin", msg="Android only")
conflicts("+android_mediandk", when="platform=linux", msg="Android only")
- conflicts("+android_mediandk", when="platform=cray", msg="Android only")
conflicts("+android_native_camera", when="platform=darwin", msg="Android only")
conflicts("+android_native_camera", when="platform=linux", msg="Android only")
- conflicts("+android_native_camera", when="platform=cray", msg="Android only")
conflicts("+avfoundation", when="platform=linux", msg="iOS/macOS only")
- conflicts("+avfoundation", when="platform=cray", msg="iOS/macOS only")
conflicts("+cap_ios", when="platform=darwin", msg="iOS only")
conflicts("+cap_ios", when="platform=linux", msg="iOS only")
- conflicts("+cap_ios", when="platform=cray", msg="iOS only")
conflicts("+carotene", when="target=x86:", msg="ARM/AARCH64 only")
conflicts("+carotene", when="target=x86_64:", msg="ARM/AARCH64 only")
conflicts("+cpufeatures", when="platform=darwin", msg="Android only")
conflicts("+cpufeatures", when="platform=linux", msg="Android only")
- conflicts("+cpufeatures", when="platform=cray", msg="Android only")
conflicts("+cublas", when="~cuda")
conflicts("+cudnn", when="~cuda")
conflicts("+cufft", when="~cuda")
conflicts("+directx", when="platform=darwin", msg="Windows only")
conflicts("+directx", when="platform=linux", msg="Windows only")
- conflicts("+directx", when="platform=cray", msg="Windows only")
conflicts("+dshow", when="platform=darwin", msg="Windows only")
conflicts("+dshow", when="platform=linux", msg="Windows only")
- conflicts("+dshow", when="platform=cray", msg="Windows only")
conflicts("+gtk", when="platform=darwin", msg="Linux only")
conflicts("+ipp", when="target=aarch64:", msg="x86 or x86_64 only")
conflicts("+jasper", when="+openjpeg")
conflicts("+msmf", when="platform=darwin", msg="Windows only")
conflicts("+msmf", when="platform=linux", msg="Windows only")
- conflicts("+msmf", when="platform=cray", msg="Windows only")
conflicts("+msmf_dxva", when="platform=darwin", msg="Windows only")
conflicts("+msmf_dxva", when="platform=linux", msg="Windows only")
- conflicts("+msmf_dxva", when="platform=cray", msg="Windows only")
conflicts("+opencl_d3d11_nv", when="platform=darwin", msg="Windows only")
conflicts("+opencl_d3d11_nv", when="platform=linux", msg="Windows only")
- conflicts("+opencl_d3d11_nv", when="platform=cray", msg="Windows only")
conflicts("+opengl", when="~qt")
conflicts("+tengine", when="platform=darwin", msg="Linux only")
conflicts("+tengine", when="target=x86:", msg="ARM/AARCH64 only")
@@ -822,7 +825,6 @@ class Opencv(CMakePackage, CudaPackage):
conflicts("+v4l", when="platform=darwin", msg="Linux only")
conflicts("+win32ui", when="platform=darwin", msg="Windows only")
conflicts("+win32ui", when="platform=linux", msg="Windows only")
- conflicts("+win32ui", when="platform=cray", msg="Windows only")
# https://github.com/opencv/opencv/wiki/ChangeLog#version460
conflicts("%gcc@12:", when="@:4.5")
@@ -1026,14 +1028,13 @@ class Opencv(CMakePackage, CudaPackage):
)
# Python
- python_exe = spec["python"].command.path
python_lib = spec["python"].libs[0]
python_include_dir = spec["python"].headers.directories[0]
if "+python3" in spec:
args.extend(
[
- self.define("PYTHON3_EXECUTABLE", python_exe),
+ self.define("PYTHON3_EXECUTABLE", python.path),
self.define("PYTHON3_LIBRARY", python_lib),
self.define("PYTHON3_INCLUDE_DIR", python_include_dir),
self.define("PYTHON2_EXECUTABLE", ""),
diff --git a/var/spack/repos/builtin/packages/opendatadetector/package.py b/var/spack/repos/builtin/packages/opendatadetector/package.py
index 345c0c90e0..6953fbd115 100644
--- a/var/spack/repos/builtin/packages/opendatadetector/package.py
+++ b/var/spack/repos/builtin/packages/opendatadetector/package.py
@@ -24,16 +24,18 @@ class Opendatadetector(CMakePackage):
version("v2", tag="v2", commit="7041ae086dff4ee4a8d5b65f5d9559acc6dbec47")
version("v1", tag="v1", commit="81c43c6511723c13c15327479082d3dcfa1947c7")
+ depends_on("cxx", type="build") # generated
+
depends_on("dd4hep")
depends_on("root")
depends_on("boost")
def cmake_args(self):
args = []
- # C++ Standard
args.append("-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value)
return args
def setup_run_environment(self, env):
+ env.set("OPENDATADETECTOR_DATA", join_path(self.prefix.share, "OpenDataDetector"))
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib64)
diff --git a/var/spack/repos/builtin/packages/opendx/package.py b/var/spack/repos/builtin/packages/opendx/package.py
index 27a7052f30..0a92677f77 100644
--- a/var/spack/repos/builtin/packages/opendx/package.py
+++ b/var/spack/repos/builtin/packages/opendx/package.py
@@ -15,6 +15,9 @@ class Opendx(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("motif") # lesstif also works, but exhibits odd behaviors
depends_on("gl")
diff --git a/var/spack/repos/builtin/packages/openexr/package.py b/var/spack/repos/builtin/packages/openexr/package.py
index 90e291c912..3e9c6ac01e 100644
--- a/var/spack/repos/builtin/packages/openexr/package.py
+++ b/var/spack/repos/builtin/packages/openexr/package.py
@@ -16,6 +16,8 @@ class Openexr(CMakePackage, AutotoolsPackage):
license("BSD-3-Clause")
# New versions should come from github now
+ version("3.3.1", sha256="58aad2b32c047070a52f1205b309bdae007442e0f983120e4ff57551eb6f10f1")
+ version("3.2.3", sha256="f3f6c4165694d5c09e478a791eae69847cadb1333a2948ca222aa09f145eba63")
version("3.2.0", sha256="b1b200606640547fceff0d3ebe01ac05c4a7ae2a131be7e9b3e5b9f491ef35b3")
version("3.1.11", sha256="06b4a20d0791b5ec0f804c855d320a0615ce8445124f293616a086e093f1f1e1")
version("3.1.7", sha256="78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7")
@@ -69,6 +71,9 @@ class Openexr(CMakePackage, AutotoolsPackage):
url="http://download.savannah.nongnu.org/releases/openexr/openexr-1.3.2.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("imath", when="@3:")
depends_on("ilmbase", when="@:2")
@@ -84,6 +89,18 @@ class Openexr(CMakePackage, AutotoolsPackage):
with when("build_system=cmake"):
depends_on("cmake@3.12:", type="build")
+ depends_on("cmake@3.14:", type="build", when="@3.3:")
+
+ @property
+ def libs(self):
+ # Override because libs have different case than Spack package name
+ name = "libOpenEXR*"
+ # We expect libraries to be in either lib64 or lib directory
+ for root in (self.prefix.lib64, self.prefix.lib):
+ liblist = find_libraries(name, root=root, shared=True, recursive=False)
+ if liblist:
+ break
+ return liblist
class CMakeBuilder(CMakeBuilder):
diff --git a/var/spack/repos/builtin/packages/openfast/hub_seg_fault.patch b/var/spack/repos/builtin/packages/openfast/hub_seg_fault.patch
new file mode 100644
index 0000000000..a312f04b8d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openfast/hub_seg_fault.patch
@@ -0,0 +1,17 @@
+diff --git a/modules/openfast-library/src/FAST_Solver.f90 b/modules/openfast-library/src/FAST_Solver.f90
+index 364d0b78..10056965 100644
+--- a/modules/openfast-library/src/FAST_Solver.f90
++++ b/modules/openfast-library/src/FAST_Solver.f90
+@@ -607,9 +607,9 @@ SUBROUTINE AD_InputSolve_IfW( p_FAST, u_AD, y_IfW, y_OpFM, ErrStat, ErrMsg )
+ end if
+
+ if (u_AD%rotors(1)%NacelleMotion%NNodes > 0) then
+- u_AD%rotors(1)%InflowOnNacelle(1) = y_OpFM%u(node)
+- u_AD%rotors(1)%InflowOnNacelle(2) = y_OpFM%v(node)
+- u_AD%rotors(1)%InflowOnNacelle(3) = y_OpFM%w(node)
++ u_AD%rotors(1)%InflowOnNacelle(1) = y_OpFM%u(1)
++ u_AD%rotors(1)%InflowOnNacelle(2) = y_OpFM%v(1)
++ u_AD%rotors(1)%InflowOnNacelle(3) = y_OpFM%w(1)
+ node = node + 1
+ else
+ u_AD%rotors(1)%InflowOnNacelle = 0.0_ReKi
diff --git a/var/spack/repos/builtin/packages/openfast/package.py b/var/spack/repos/builtin/packages/openfast/package.py
index d00f560c60..2fd4344650 100644
--- a/var/spack/repos/builtin/packages/openfast/package.py
+++ b/var/spack/repos/builtin/packages/openfast/package.py
@@ -18,21 +18,29 @@ class Openfast(CMakePackage):
version("develop", branch="dev")
version("master", branch="main")
- version("3.4.1", tag="v3.4.1", commit="18704086dad861ab13daf804825da7c4b8d59428")
- version("3.4.0", tag="v3.4.0", commit="e8ec53f9c7f9d3f6a13bfb61dba12a0ca04d8a2f")
- version("3.3.0", tag="v3.3.0", commit="5f3fb6ef74f48e75ca94000090737a41866fb264")
- version("3.2.1", tag="v3.2.1", commit="08fffef240461a8334596179f1de462be43ad3e9")
- version("3.2.0", tag="v3.2.0", commit="90a1ffb626baf398d89681b9422bdbfef11cd3ad")
- version("3.1.0", tag="v3.1.0", commit="3456a645581456883e44d441eb285ed688e98797")
- version("3.0.0", tag="v3.0.0", commit="42a5a8196529ae0349eda6d797a79461c2c03ff0")
- version("2.6.0", tag="v2.6.0", commit="bbbb1ca7b28a4ba411613b5c85f5de02f8316754")
- version("2.5.0", tag="v2.5.0", commit="718d46f707d78e85edf1b49d3b1a63e8e23e1aae")
- version("2.4.0", tag="v2.4.0", commit="ff33ca1cf65f2e13c1de0ab78cc2396ec4a47ce0")
- version("2.3.0", tag="v2.3.0", commit="f2419c5d1c23caad9146b95a103d89e9dcaefe30")
- version("2.2.0", tag="v2.2.0", commit="e4faf27b774982df274b87c0570e4b58c4a13fe3")
- version("2.1.0", tag="v2.1.0", commit="f147b80521eff90c19f065eabeceac13de39ac59")
- version("2.0.0", tag="v2.0.0", commit="0769598a17e19b3ccd00a85cde389995f55024a8")
- version("1.0.0", tag="v1.0.0", commit="e788b9b18bd5ed96ea59d4bc0812d461bc430cfe")
+ version("3.5.4", tag="v3.5.4")
+ version("3.5.3", tag="v3.5.3")
+ version("3.4.1", tag="v3.4.1")
+ version("3.4.0", tag="v3.4.0")
+ version("3.3.0", tag="v3.3.0")
+ version("3.2.1", tag="v3.2.1")
+ version("3.2.0", tag="v3.2.0")
+ version("3.1.0", tag="v3.1.0")
+ version("3.0.0", tag="v3.0.0")
+ version("2.6.0", tag="v2.6.0")
+ version("2.5.0", tag="v2.5.0")
+ version("2.4.0", tag="v2.4.0")
+ version("2.3.0", tag="v2.3.0")
+ version("2.2.0", tag="v2.2.0")
+ version("2.1.0", tag="v2.1.0")
+ version("2.0.0", tag="v2.0.0")
+ version("1.0.0", tag="v1.0.0")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ patch("hub_seg_fault.patch", when="@2.7:3.2")
variant("shared", default=True, description="Build shared libraries")
variant("double-precision", default=True, description="Treat REAL as double precision")
@@ -41,18 +49,20 @@ class Openfast(CMakePackage):
variant("pic", default=True, description="Position independent code")
variant("openmp", default=False, description="Enable OpenMP support")
variant("netcdf", default=False, description="Enable NetCDF support")
+ variant("rosco", default=False, description="Build ROSCO controller")
+ variant("fastfarm", default=False, description="Enable FAST.Farm capabilities")
- # Dependencies for OpenFAST Fortran
depends_on("blas")
depends_on("lapack")
-
- # Additional dependencies when compiling C++ library
depends_on("mpi", when="+cxx")
- depends_on("yaml-cpp", when="+cxx")
+ depends_on("yaml-cpp@0.6.0:0.6.3", when="+cxx")
depends_on("hdf5+mpi+cxx+hl", when="+cxx")
depends_on("zlib-api", when="+cxx")
depends_on("libxml2", when="+cxx")
depends_on("netcdf-c", when="+cxx+netcdf")
+ depends_on("rosco", when="+rosco")
+
+ conflicts("~cxx", when="+netcdf")
def cmake_args(self):
spec = self.spec
@@ -67,7 +77,9 @@ class Openfast(CMakePackage):
self.define_from_variant("DOUBLE_PRECISION", "double-precision"),
self.define_from_variant("USE_DLL_INTERFACE", "dll-interface"),
self.define_from_variant("BUILD_OPENFAST_CPP_API", "cxx"),
+ self.define_from_variant("BUILD_OPENFAST_CPP_DRIVER", "cxx"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
+ self.define_from_variant("BUILD_FASTFARM", "fastfarm"),
]
)
diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py
index 44408134bf..d54c9e30bf 100644
--- a/var/spack/repos/builtin/packages/openfoam-org/package.py
+++ b/var/spack/repos/builtin/packages/openfoam-org/package.py
@@ -70,6 +70,7 @@ class OpenfoamOrg(Package):
license("GPL-3.0-or-later")
version("develop", branch="master")
+ version("11", sha256="ebc0f86ead699abba61290ba8aac5b730aa93256e675d1d93a5d5f116d51e0c0")
version("10", sha256="59d712ba798ca44b989b6ac50bcb7c534eeccb82bcf961e10ec19fc8d84000cf")
version("9", sha256="0c48fb56e2fbb4dd534112811364d3b2dc12106e670a6486b361e4f864b435ee")
version("8", sha256="94ba11cbaaa12fbb5b356e01758df403ac8832d69da309a5d79f76f42eb008fc")
@@ -84,6 +85,9 @@ class OpenfoamOrg(Package):
url="http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("int64", default=False, description="Compile with 64-bit label")
variant(
"source", default=True, description="Install library/application sources and tutorials"
@@ -103,6 +107,8 @@ class OpenfoamOrg(Package):
depends_on("zlib-api")
depends_on("flex")
depends_on("cmake", type="build")
+ # The setSet tool (removed in version 10) depends on readline
+ depends_on("readline", when="@:9")
# Require scotch with ptscotch - corresponds to standard OpenFOAM setup
depends_on("scotch~metis+mpi~int64", when="+scotch~int64")
diff --git a/var/spack/repos/builtin/packages/openfoam/package.py b/var/spack/repos/builtin/packages/openfoam/package.py
index 227fd34f03..d3de3823f6 100644
--- a/var/spack/repos/builtin/packages/openfoam/package.py
+++ b/var/spack/repos/builtin/packages/openfoam/package.py
@@ -333,6 +333,9 @@ class Openfoam(Package):
version("1706", sha256="7779048bb53798d9a5bd2b2be0bf302c5fd3dff98e29249d6e0ef7eeb83db79a")
version("1612", sha256="2909c43506a68e1f23efd0ca6186a6948ae0fc8fe1e39c78cc23ef0d69f3569d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("int64", default=False, description="With 64-bit labels")
variant("knl", default=False, description="Use KNL compiler settings")
variant("kahip", default=False, description="With kahip decomposition")
@@ -369,8 +372,12 @@ class Openfoam(Package):
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
- # OpenFOAM does not play nice with CGAL 5.X
- depends_on("cgal@:4")
+ # Earlier versions of OpenFOAM may not work with CGAL 5.6. I do
+ # not know which OpenFOAM added support for 5.x and conservatively
+ # use 2312 in the check.
+ depends_on("cgal", when="@2312:")
+ depends_on("cgal@:4", when="@:2306")
+
# The flex restriction is ONLY to deal with a spec resolution clash
# introduced by the restriction within scotch!
depends_on("flex@:2.6.1,2.6.4:")
@@ -689,11 +696,13 @@ class Openfoam(Package):
"CGAL": [
("BOOST_ARCH_PATH", spec["boost"].prefix),
("CGAL_ARCH_PATH", spec["cgal"].prefix),
+ ("MPFR_ARCH_PATH", spec["mpfr"].prefix),
(
"LD_LIBRARY_PATH",
foam_add_lib(
pkglib(spec["boost"], "${BOOST_ARCH_PATH}"),
pkglib(spec["cgal"], "${CGAL_ARCH_PATH}"),
+ pkglib(spec["mpfr"], "${MPFR_ARCH_PATH}"),
),
),
],
diff --git a/var/spack/repos/builtin/packages/openfst/package.py b/var/spack/repos/builtin/packages/openfst/package.py
index ec4271a0cf..de50be1135 100644
--- a/var/spack/repos/builtin/packages/openfst/package.py
+++ b/var/spack/repos/builtin/packages/openfst/package.py
@@ -12,9 +12,9 @@ class Openfst(AutotoolsPackage):
finite-state transducers are automata where each transition has
an input label, an output label, and a weight."""
- homepage = "http://www.openfst.org"
- url = "http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.1.tar.gz"
- list_url = "http://www.openfst.org/twiki/bin/view/FST/FstDownload"
+ homepage = "https://www.openfst.org"
+ url = "https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.1.tar.gz"
+ list_url = "https://www.openfst.org/twiki/bin/view/FST/FstDownload"
license("Apache-2.0")
@@ -33,11 +33,13 @@ class Openfst(AutotoolsPackage):
version(
"1.4.1-patch",
sha256="e671bf6bd4425a1fed4e7543a024201b74869bfdd029bdf9d10c53a3c2818277",
- url="http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.4.1.tar.gz",
+ url="https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.4.1.tar.gz",
)
version("1.4.1", sha256="e671bf6bd4425a1fed4e7543a024201b74869bfdd029bdf9d10c53a3c2818277")
version("1.4.0", sha256="eb557f37560438f03912b4e43335c4c9e72aa486d4f2046127131185eb88f17a")
+ depends_on("cxx", type="build") # generated
+
conflicts("%intel@16:")
conflicts("%gcc@6:", when="@:1.6.1")
diff --git a/var/spack/repos/builtin/packages/opengl/package.py b/var/spack/repos/builtin/packages/opengl/package.py
index 280b8efc63..7d16073ed4 100644
--- a/var/spack/repos/builtin/packages/opengl/package.py
+++ b/var/spack/repos/builtin/packages/opengl/package.py
@@ -106,6 +106,6 @@ class Opengl(BundlePackage):
lib_name = "opengl32"
elif "platform=darwin" in spec:
lib_name = "libOpenGL"
- else: # linux and cray
+ else:
lib_name = "libGL"
return find_libraries(lib_name, root=self.prefix, recursive=True)
diff --git a/var/spack/repos/builtin/packages/openimagedenoise/package.py b/var/spack/repos/builtin/packages/openimagedenoise/package.py
index 17354667cf..0b27196706 100644
--- a/var/spack/repos/builtin/packages/openimagedenoise/package.py
+++ b/var/spack/repos/builtin/packages/openimagedenoise/package.py
@@ -13,12 +13,12 @@ class Openimagedenoise(CMakePackage):
under the permissive Apache 2.0 license."""
homepage = "https://www.openimagedenoise.org/"
- url = "https://github.com/OpenImageDenoise/oidn/releases/download/v1.4.3/oidn-1.4.3.src.tar.gz"
-
- # maintainers("github_user1", "github_user2")
+ url = "https://github.com/RenderKit/oidn/releases/download/v1.4.3/oidn-1.4.3.src.tar.gz"
license("Apache-2.0")
+ version("2.3.0", sha256="cce3010962ec84e0ba1acd8c9055a3d8de402fedb1b463517cfeb920a276e427")
+ version("2.2.2", sha256="d26b75fa216165086f65bf48c80648290f2cfed7d3c4bfc1e86c247b46c96b7e")
version("2.1.0", sha256="ce144ba582ff36563d9442ee07fa2a4d249bc85aa93e5b25fc527ff4ee755ed6")
version("2.0.1", sha256="328eeb9809d18e835dca7203224af3748578794784c026940c02eea09c695b90")
version("1.4.3", sha256="3276e252297ebad67a999298d8f0c30cfb221e166b166ae5c955d88b94ad062a")
@@ -29,6 +29,9 @@ class Openimagedenoise(CMakePackage):
version("1.2.4", sha256="948b070c780b5de0d983e7d5d37f6d9454932cc278913d9ee5b0bd047d23864a")
version("1.2.3", sha256="469d20b093a73b18a54a2e559b0f18a6baac845ede864be62429737042ebe4f7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("ispc", type=("build"))
depends_on("python@3:", type=("build", "test"))
depends_on("tbb")
diff --git a/var/spack/repos/builtin/packages/openimageio/package.py b/var/spack/repos/builtin/packages/openimageio/package.py
index f2f2169e5b..fe48959156 100644
--- a/var/spack/repos/builtin/packages/openimageio/package.py
+++ b/var/spack/repos/builtin/packages/openimageio/package.py
@@ -4,32 +4,28 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.pkg.builtin.boost import Boost
class Openimageio(CMakePackage):
- """OpenImageIO is a library for reading and writing images, and a bunch of
- related classes, utilities, and applications."""
+ """Reading, writing, and processing images in a wide variety of file formats, using
+ a format-agnostic API, aimed at VFX applications."""
- homepage = "https://www.openimageio.org"
- url = "https://github.com/OpenImageIO/oiio/archive/Release-1.8.15.tar.gz"
+ homepage = "https://openimageio.readthedocs.io"
+ git = "https://github.com/AcademySoftwareFoundation/OpenImageIO"
+ url = "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.14.0.tar.gz"
license("Apache-2.0")
- version("2.2.7.0", sha256="857ac83798d6d2bda5d4d11a90618ff19486da2e5a4c4ff022c5976b5746fe8c")
- version("1.8.15", sha256="4d5b4ed3f2daaed69989f53c0f9364dd87c82dc0a09807b5b6e9008e2426e86f")
+ version("2.5.15.0", sha256="7779ef2c3d03c5ed95e13ff292de85c3f8cee301cd46baad0d2dc83c93bfe85c")
+
+ depends_on("cxx", type="build")
# Core dependencies
depends_on("cmake@3.2.2:", type="build")
- depends_on("boost@1.53:", type=("build", "link"))
-
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants, type=("build", "link"))
- depends_on("libtiff@4.0:", type=("build", "link"))
- depends_on("openexr@2.3:", type=("build", "link"))
- depends_on("libpng@1.6:", type=("build", "link"))
+ depends_on("boost+atomic+filesystem+thread+chrono@1.53:")
+ depends_on("libtiff@4.0:")
+ depends_on("openexr@3.1:")
+ depends_on("libpng@1.6:")
# Optional dependencies
variant("ffmpeg", default=False, description="Support video frames")
@@ -46,7 +42,13 @@ class Openimageio(CMakePackage):
variant("qt", default=False, description="Build qt viewer")
depends_on("qt@5.6.0:+opengl", when="+qt")
- conflicts("target=aarch64:", when="@:1.8.15")
+ variant("ocio", default=False, description="Support video frames")
+ depends_on("opencolorio@2.2:", when="+ocio")
+
+ def url_for_version(self, version):
+ if version >= Version("2"):
+ return super().url_for_version(version)
+ return f"https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/Release-{version}.tar.gz"
def cmake_args(self):
args = ["-DUSE_FFMPEG={0}".format("ON" if "+ffmpeg" in self.spec else "OFF")]
diff --git a/var/spack/repos/builtin/packages/openipmi/package.py b/var/spack/repos/builtin/packages/openipmi/package.py
index 7f4aea4d7e..6e64d5c552 100644
--- a/var/spack/repos/builtin/packages/openipmi/package.py
+++ b/var/spack/repos/builtin/packages/openipmi/package.py
@@ -14,10 +14,13 @@ class Openipmi(AutotoolsPackage):
homepage = "https://sourceforge.net/projects/openipmi/"
url = "https://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library/OpenIPMI-2.0.29.tar.gz"
+ version("2.0.35", sha256="b059114f6299d73f04ff6e76a0857a0ab81aa362dee99644d256b223872437ad")
version("2.0.29", sha256="2244124579afb14e569f34393e9ac61e658a28b6ffa8e5c0d2c1c12a8ce695cd")
version("2.0.28", sha256="8e8b1de2a9a041b419133ecb21f956e999841cf2e759e973eeba9a36f8b40996")
version("2.0.27", sha256="f3b1fafaaec2e2bac32fec5a86941ad8b8cb64543470bd6d819d7b166713d20b")
+ depends_on("c", type="build") # generated
+
depends_on("popt", type="link")
depends_on("python", type=("build", "link", "run"))
depends_on("perl", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/openjdk/package.py b/var/spack/repos/builtin/packages/openjdk/package.py
index 532e56ee1a..bcaec85a86 100644
--- a/var/spack/repos/builtin/packages/openjdk/package.py
+++ b/var/spack/repos/builtin/packages/openjdk/package.py
@@ -18,6 +18,40 @@ from spack.util.prefix import Prefix
# format returned by platform.system() and 'arch' by platform.machine()
_versions = {
+ "21.0.3_9": {
+ "Linux-x86_64": (
+ "fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340",
+ "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz",
+ ),
+ "Linux-aarch64": (
+ "7d3ab0e8eba95bd682cfda8041c6cb6fa21e09d0d9131316fd7c96c78969de31",
+ "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz",
+ ),
+ "Darwin-arm64": (
+ "b6be6a9568be83695ec6b7cb977f4902f7be47d74494c290bc2a5c3c951e254f",
+ "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.3_9.tar.gz",
+ ),
+ },
+ "21.0.0_35": {
+ "Linux-x86_64": (
+ "82f64c53acaa045370d6762ebd7441b74e6fda14b464d54d1ff8ca941ec069e6",
+ "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_x64_linux_hotspot_21_35.tar.gz",
+ )
+ },
+ "17.0.11_9": {
+ "Linux-x86_64": (
+ "aa7fb6bb342319d227a838af5c363bfa1b4a670c209372f9e6585bd79da6220c",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz",
+ ),
+ "Linux-aarch64": (
+ "a900acf3ae56b000afc35468a083b6d6fd695abec87a8abdb02743d5c72f6d6d",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.11_9.tar.gz",
+ ),
+ "Darwin-arm64": (
+ "09a162c58dd801f7cfacd87e99703ed11fb439adc71cfa14ceb2d3194eaca01c",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.11_9.tar.gz",
+ ),
+ },
"17.0.8.1_1": {
"Linux-x86_64": (
"c25dfbc334068a48c19c44ce39ad4b8427e309ae1cfa83f23c102e78b8a6dcc0",
@@ -31,7 +65,7 @@ _versions = {
"18be56732c1692ef131625d814dcb02ee091a43fdd6f214a33d87cc14842fc3f",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_x64_mac_hotspot_17.0.8.1_1.tar.gz",
),
- "Darwin-aarch64": (
+ "Darwin-arm64": (
"2e95eed48650f00650e963c8213b6c6ecda54458edf8d254ebc99d6a6966ffad",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.8.1_1.tar.gz",
),
@@ -63,7 +97,7 @@ _versions = {
"ac21a5a87f7cfa00212ab7c41f7eb80ca33640d83b63ad850be811c24095d61a",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_x64_mac_hotspot_17.0.4.1_1.tar.gz",
),
- "Darwin-aarch64": (
+ "Darwin-arm64": (
"3a976943a9e6a635e68e2b06bd093fc096aad9f5894acda673d3bea0cb3a6f38",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.4.1_1.tar.gz",
),
@@ -144,6 +178,30 @@ _versions = {
"https://download.java.net/java/GA/jdk16.0.2/d4a915d82b4c4fbb9bde534da945d746/7/GPL/openjdk-16.0.2_linux-aarch64_bin.tar.gz",
),
},
+ "15.0.2": {
+ "Linux-x86_64": (
+ "91ac6fc353b6bf39d995572b700e37a20e119a87034eeb939a6f24356fbcd207",
+ "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz",
+ ),
+ "Linux-aarch64": (
+ "3958f01858f9290c48c23e7804a0af3624e8eca6749b085c425df4c4f2f7dcbc",
+ "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-aarch64_bin.tar.gz",
+ ),
+ },
+ "11.0.23_9": {
+ "Linux-x86_64": (
+ "23e47ea7a3015be3240f21185fd902adebdcf76530757c9b482c7eb5bd3417c2",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.23_9.tar.gz",
+ ),
+ "Linux-aarch64": (
+ "e00476a7be3c4adfa9b3d55d30768967fd246a8352e518894e183fa444d4d3ce",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.23_9.tar.gz",
+ ),
+ "Darwin-arm64": (
+ "49122443bdeab2c9f468bd400f58f85a9ea462846faa79084fd6fd786d9b492d",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.23_9.tar.gz",
+ ),
+ },
"11.0.20.1_1": {
"Linux-x86_64": (
"398a64bff002f0e3b0c01ecd24a1a32c83cb72a5255344219e9757d4ddd9f857",
@@ -157,7 +215,7 @@ _versions = {
"42fd1373ee3f7c24f13551be20c8a5ae7ade778f83c45476ea333b2e3e025267",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.20.1_1.tar.gz",
),
- "Darwin-aarch64": (
+ "Darwin-arm64": (
"d36abd2f8a8cd2c73a7893306d65a5ae03eaa73565c1fc197a69d1d6fb02405e",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.20.1_1.tar.gz",
),
@@ -175,7 +233,7 @@ _versions = {
"18c636bd103e240d29cdb30d7867720ea9fb9ff7c645738bfb4d5b8027269263",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.17%2B8/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.17_8.tar.gz",
),
- "Darwin-aarch64": (
+ "Darwin-arm64": (
"79b18cbd398b67a52ebaf033dfca15c7af4c1a84ec5fa68a88f3bf742bb082f7",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.17%2B8/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.17_8.tar.gz",
),
@@ -197,7 +255,7 @@ _versions = {
"723548e36e0b3e0a5a2f36a38b22ea825d3004e26054a0e254854adc57045352",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.16.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.16.1_1.tar.gz",
),
- "Darwin-aarch64": (
+ "Darwin-arm64": (
"1953f06702d45eb54bae3ccf453b57c33de827015f5623a2dfc16e1c83e6b0a1",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.16.1%2B1/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.16.1_1.tar.gz",
),
@@ -334,8 +392,8 @@ _versions = {
class Openjdk(Package):
"""The free and opensource java implementation"""
- homepage = "https://jdk.java.net"
- preferred_prefix = "11."
+ homepage = "https://openjdk.org/"
+ preferred_prefix = "17."
preferred_defined = False
for ver, packages in _versions.items():
@@ -348,8 +406,18 @@ class Openjdk(Package):
version(ver, sha256=pkg[0], url=pkg[1], preferred=is_preferred)
+ variant(
+ "certs",
+ default="none",
+ values=("system", "none"),
+ multi=False,
+ description=("symlink system certs if requested, otherwise use default package version"),
+ )
+
+ provides("java@21", when="@21.0:21")
provides("java@17", when="@17.0:17")
provides("java@16", when="@16.0:16")
+ provides("java@15", when="@15.0:15")
provides("java@11", when="@11.0:11")
provides("java@10", when="@10.0:10")
provides("java@9", when="@9.0:9")
@@ -367,6 +435,8 @@ class Openjdk(Package):
executables = ["^java$"]
+ skip_version_audit = ["platform=windows"]
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("-version", output=str, error=str)
@@ -417,6 +487,37 @@ class Openjdk(Package):
top_dir = "Contents/Home/" if platform.system() == "Darwin" else "."
install_tree(top_dir, prefix)
+ @run_after("install")
+ def link_system_certs(self):
+ if self.spec.variants["certs"].value != "system":
+ return
+
+ system_dirs = [
+ # CentOS, Fedora, RHEL
+ "/etc/pki/java",
+ # Ubuntu
+ "/etc/ssl/certs/java",
+ # OpenSUSE
+ "/var/lib/ca-certificates/java-certs",
+ ]
+
+ for directory in system_dirs:
+ # Link configuration file
+ sys_certs = join_path(directory, "cacerts")
+
+ # path for 1.8.0 versions
+ pkg_dir = join_path(self.prefix, "jre", "lib", "security")
+ if not os.path.exists(pkg_dir):
+ # path for version 11 and newer
+ pkg_dir = join_path(self.prefix, "lib", "security")
+ if not os.path.exists(pkg_dir):
+ break
+ pkg_conf = join_path(pkg_dir, "cacerts")
+ if os.path.exists(sys_certs):
+ if os.path.exists(pkg_conf):
+ os.remove(pkg_conf)
+ os.symlink(sys_certs, pkg_conf)
+
def setup_run_environment(self, env):
"""Set JAVA_HOME."""
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index 4a00fcc42b..86d2af471a 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -21,6 +21,8 @@ class Openjpeg(CMakePackage):
license("BSD-2-Clause-NetBSD")
+ version("2.5.2", sha256="90e3896fed910c376aaf79cdd98bdfdaf98c6472efd8e1debf0a854938cbda6a")
+ version("2.5.1", sha256="c0b92dadd65e33b1cf94f39dd9157d5469846744c2e0afb8ca10961f51f61da6")
version("2.5.0", sha256="0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a")
version("2.4.0", sha256="8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d")
version("2.3.1", sha256="63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9")
@@ -34,8 +36,12 @@ class Openjpeg(CMakePackage):
version("1.5.2", sha256="3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d")
version("1.5.1", sha256="6a42fcc23cb179f69a1e94429089e5a5926aee1ffe582a0a6bd91299d297e61a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("codec", default=False, description="Build the CODEC executables")
+ depends_on("cmake@3.5:", when="@2.5.1:", type="build")
depends_on("zlib-api", when="+codec")
depends_on("libpng", when="+codec")
depends_on("libtiff", when="+codec")
diff --git a/var/spack/repos/builtin/packages/openkim-models/package.py b/var/spack/repos/builtin/packages/openkim-models/package.py
index dd2156ba32..c88290cbb5 100644
--- a/var/spack/repos/builtin/packages/openkim-models/package.py
+++ b/var/spack/repos/builtin/packages/openkim-models/package.py
@@ -41,6 +41,10 @@ class OpenkimModels(CMakePackage):
"2019-03-29", sha256="053dda2023fe4bb6d7c1d66530c758c4e633bbf1f1be17b6b075b276fe8874f6"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def cmake_args(self):
args = []
args.append(
diff --git a/var/spack/repos/builtin/packages/openldap/package.py b/var/spack/repos/builtin/packages/openldap/package.py
index b754e941f8..629a81950b 100644
--- a/var/spack/repos/builtin/packages/openldap/package.py
+++ b/var/spack/repos/builtin/packages/openldap/package.py
@@ -21,11 +21,15 @@ class Openldap(AutotoolsPackage):
license("OLDAP-2.8")
+ version("2.6.8", sha256="48969323e94e3be3b03c6a132942dcba7ef8d545f2ad35401709019f696c3c4e")
version("2.6.4", sha256="d51704e50178430c06cf3d8aa174da66badf559747a47d920bb54b2d4aa40991")
version("2.6.0", sha256="b71c580eac573e9aba15d95f33dd4dd08f2ed4f0d7fc09e08ad4be7ed1e41a4f")
version("2.4.49", sha256="e3b117944b4180f23befe87d0dcf47f29de775befbc469dcf4ac3dab3311e56e")
version("2.4.48", sha256="d9523ffcab5cd14b709fcf3cb4d04e8bc76bb8970113255f372bc74954c6074d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("client_only", default=True, description="Client only installation")
variant("icu", default=False, description="Build with unicode support")
# Below, tls=none is not an option from programming point of view
@@ -61,6 +65,11 @@ class Openldap(AutotoolsPackage):
depends_on("groff", type="build")
depends_on("pkgconfig", type="build")
depends_on("wiredtiger", when="@2.6.0:")
+ depends_on("findutils", type="build")
+ # see https://github.com/openldap/openldap/blob/OPENLDAP_REL_ENG_2_4_48/libraries/liblunicode/Makefile.in
+
+ # Newer C compilers (>= Clang 16 and >= GCC 14) reject some constructs removed in C99
+ conflicts("%gcc@14:", when="@:2.6.4", msg="Newer C compilers required 2.6.5 or newer")
# Ref: https://www.linuxfromscratch.org/blfs/view/svn/server/openldap.html
@when("+client_only")
diff --git a/var/spack/repos/builtin/packages/openlibm/package.py b/var/spack/repos/builtin/packages/openlibm/package.py
index 2645969ad9..7d1bf65682 100644
--- a/var/spack/repos/builtin/packages/openlibm/package.py
+++ b/var/spack/repos/builtin/packages/openlibm/package.py
@@ -21,6 +21,9 @@ class Openlibm(MakefilePackage):
version("0.8.0", sha256="03620768df4ca526a63dd675c6de95a5c9d167ff59555ce57a61c6bf49e400ee")
version("0.7.5", sha256="be983b9e1e40e696e8bbb7eb8f6376d3ca0ae675ae6d82936540385b0eeec15b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def make(self, spec, prefix):
args = [
"prefix={0}".format(prefix),
diff --git a/var/spack/repos/builtin/packages/openloops/package.py b/var/spack/repos/builtin/packages/openloops/package.py
index 3c82765fd4..97510a2c68 100644
--- a/var/spack/repos/builtin/packages/openloops/package.py
+++ b/var/spack/repos/builtin/packages/openloops/package.py
@@ -25,6 +25,10 @@ class Openloops(Package):
version("2.1.2", sha256="f52575cae3d70b6b51a5d423e9cd0e076ed5961afcc015eec00987e64529a6ae")
version("2.1.1", sha256="f1c47ece812227eab584e2c695fef74423d2f212873f762b8658f728685bcb91")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
all_processes = [
"tbln",
"tbln_ew",
diff --git a/var/spack/repos/builtin/packages/openmc/package.py b/var/spack/repos/builtin/packages/openmc/package.py
index 67ad7d6337..68e6f21423 100644
--- a/var/spack/repos/builtin/packages/openmc/package.py
+++ b/var/spack/repos/builtin/packages/openmc/package.py
@@ -18,12 +18,14 @@ class Openmc(CMakePackage):
programming model."""
homepage = "https://docs.openmc.org/"
- url = "https://github.com/openmc-dev/openmc/tarball/v0.13.3"
+ url = "https://github.com/openmc-dev/openmc/tarball/v0.15.0"
git = "https://github.com/openmc-dev/openmc.git"
maintainers("paulromano")
version("develop", branch="develop", submodules=True)
version("master", branch="master", submodules=True)
+ version("0.15.0", commit="55b52b7ef3c9415ce045712132bf31c2a013d8c8", submodules=True)
+ version("0.14.0", commit="fa2330103de61a864c958d1a7250f11e5dd91468", submodules=True)
version("0.13.3", commit="27cb0dc97960fe6d750eb5a93584a9a0ca532ac8", submodules=True)
version("0.13.2", commit="030f73a8690ed19e91806e46c8caf338d252e74a", submodules=True)
version("0.13.1", commit="33bc948f4b855c037975f16d16091fe4ecd12de3", submodules=True)
@@ -34,6 +36,9 @@ class Openmc(CMakePackage):
version("0.11.0", sha256="19a9d8e9c3b581e9060fbd96d30f1098312d217cb5c925eb6372a5786d9175af")
version("0.10.0", sha256="47650cb45e2c326ae439208d6f137d75ad3e5c657055912d989592c6e216178f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI support")
variant("openmp", default=True, description="Enable OpenMP support")
diff --git a/var/spack/repos/builtin/packages/openmm/package.py b/var/spack/repos/builtin/packages/openmm/package.py
index 9c8273cc6b..94d7cbb105 100644
--- a/var/spack/repos/builtin/packages/openmm/package.py
+++ b/var/spack/repos/builtin/packages/openmm/package.py
@@ -17,6 +17,7 @@ class Openmm(CMakePackage, CudaPackage):
homepage = "https://openmm.org/"
url = "https://github.com/openmm/openmm/archive/7.4.1.tar.gz"
+ version("8.1.1", sha256="347ad9f04dd88a673f7871127d9f23a75caf2c1a460a3f21f3328a24dc6547d0")
version("8.0.0", sha256="dc63d7b47c8bb7b169c409cfd63d909ed0ce1ae114d37c627bf7a4231acf488e")
version("7.7.0", sha256="51970779b8dc639ea192e9c61c67f70189aa294575acb915e14be1670a586c25")
version("7.6.0", sha256="5a99c491ded9ba83ecc3fb1d8d22fca550f45da92e14f64f25378fda0048a89d")
@@ -24,10 +25,14 @@ class Openmm(CMakePackage, CudaPackage):
version("7.5.0", sha256="516748b4f1ae936c4d70cc6401174fc9384244c65cd3aef27bc2c53eac6d6de5")
version("7.4.1", sha256="e8102b68133e6dcf7fcf29bc76a11ea54f30af71d8a7705aec0aee957ebe3a6d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
install_targets = ["install", "PythonInstall"]
depends_on("python@2.7:", type=("build", "run"))
- depends_on("cmake@3.17:", type="build", when="@7.6.0:")
+ depends_on("cmake@3.17:", type="build", when="@7.5.1:")
depends_on("cmake@3.1:", type="build")
# https://github.com/openmm/openmm/issues/3317
depends_on("doxygen@:1.9.1", type="build", when="@:7.6.0")
@@ -39,8 +44,17 @@ class Openmm(CMakePackage, CudaPackage):
depends_on("cuda", when="+cuda", type=("build", "link", "run"))
extends("python")
+ # Backport <https://github.com/openmm/openmm/pull/3154> to
+ # `openmm@7.5.1+cuda`, which is the version currently required by
+ # `py-alphafold`.
+ patch(
+ "https://github.com/openmm/openmm/pull/3154.patch?full_index=1",
+ sha256="90bc01b34cf998e90220669b3ed55cd3c42000ad364234033aac631ed754e9bd",
+ when="@7.5.1+cuda",
+ )
+
def patch(self):
- install_string = 'set(PYTHON_SETUP_COMMAND "install ' '--prefix={0}")'.format(self.prefix)
+ install_string = f'set(PYTHON_SETUP_COMMAND "install --prefix={self.prefix}")'
filter_file(
r"set\(PYTHON_SETUP_COMMAND \"install.*",
diff --git a/var/spack/repos/builtin/packages/openmolcas/package.py b/var/spack/repos/builtin/packages/openmolcas/package.py
index 7d53000ab7..d9e95fca8f 100644
--- a/var/spack/repos/builtin/packages/openmolcas/package.py
+++ b/var/spack/repos/builtin/packages/openmolcas/package.py
@@ -22,6 +22,9 @@ class Openmolcas(CMakePackage):
version("21.02", sha256="d0b9731a011562ff4740c0e67e48d9af74bf2a266601a38b37640f72190519ca")
version("19.11", sha256="8ebd1dcce98fc3f554f96e54e34f1e8ad566c601196ee68153763b6c0a04c7b9")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Build with mpi support.")
depends_on("hdf5")
@@ -44,11 +47,7 @@ class Openmolcas(CMakePackage):
env.append_path("PATH", self.prefix)
def cmake_args(self):
- args = [
- "-DLINALG=OpenBLAS",
- "-DOPENBLASROOT=%s" % self.spec["openblas"].prefix,
- "-DPYTHON_EXECUTABLE=%s" % self.spec["python"].command.path,
- ]
+ args = ["-DLINALG=OpenBLAS", "-DOPENBLASROOT=%s" % self.spec["openblas"].prefix]
if "+mpi" in self.spec:
mpi_args = [
"-DMPI=ON",
diff --git a/var/spack/repos/builtin/packages/openmpi/accelerator-build-components-as-dso-s-by-default.patch b/var/spack/repos/builtin/packages/openmpi/accelerator-build-components-as-dso-s-by-default.patch
new file mode 100644
index 0000000000..a4b5bf7342
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/accelerator-build-components-as-dso-s-by-default.patch
@@ -0,0 +1,81 @@
+From 7e2e390e468db44c8540d2510841a22d146fa6ed Mon Sep 17 00:00:00 2001
+From: Howard Pritchard <howardp@lanl.gov>
+Date: Tue, 7 Nov 2023 10:06:47 -0500
+Subject: [PATCH] accelerator: build components as dso's by default
+
+also need to switch rcache/gpsum and rcache/rgpusum
+
+to DSO by default.
+
+Fix a problem in opal_mca.m4 where the enable-mca-dso list wasn't being
+processed correctly starting with 5.0.0.
+
+related to #12036
+
+Signed-off-by: Howard Pritchard <howardp@lanl.gov>
+
+diff --git a/config/opal_mca.m4 b/config/opal_mca.m4
+index 935b8c65..b425fe63 100644
+--- a/config/opal_mca.m4
++++ b/config/opal_mca.m4
+@@ -13,7 +13,7 @@ dnl All rights reserved.
+ dnl Copyright (c) 2010-2021 Cisco Systems, Inc. All rights reserved
+ dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
+ dnl Copyright (c) 2018-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
+-dnl Copyright (c) 2021 Triad National Security, LLC. All rights
++dnl Copyright (c) 2021-2023 Triad National Security, LLC. All rights
+ dnl reserved.
+ dnl $COPYRIGHT$
+ dnl
+@@ -167,6 +167,9 @@ of type-component pairs. For example, --enable-mca-no-build=pml-ob1])
+ # Second, set the DSO_all and STATIC_all variables. conflict
+ # resolution (prefer static) is done in the big loop below
+ #
++ # Exception here is the components of the accelerator framework,
++ # which by default are built to be dynamic, except for null.
++ #
+ AC_MSG_CHECKING([which components should be run-time loadable])
+ if test "$enable_static" != "no"; then
+ DSO_all=0
+@@ -174,9 +177,6 @@ of type-component pairs. For example, --enable-mca-no-build=pml-ob1])
+ elif test "$OPAL_ENABLE_DLOPEN_SUPPORT" = 0; then
+ DSO_all=0
+ msg="none (dlopen disabled)"
+- elif test -z "$enable_mca_dso"; then
+- DSO_all=0
+- msg=default
+ elif test "$enable_mca_dso" = "no"; then
+ DSO_all=0
+ msg=none
+@@ -184,15 +184,19 @@ of type-component pairs. For example, --enable-mca-no-build=pml-ob1])
+ DSO_all=1
+ msg=all
+ else
+- DSO_all=0
+- ifs_save="$IFS"
+- IFS="${IFS}$PATH_SEPARATOR,"
+- msg=
+- for item in $enable_mca_dso; do
+- AS_VAR_SET([AS_TR_SH([DSO_$item])], [1])
+- msg="$item $msg"
+- done
+- IFS="$ifs_save"
++ msg=
++ if test -z "$enable_mca_dso"; then
++ enable_mca_dso="accelerator-cuda,accelerator-rocm,accelerator-ze,btl-smcuda,rcache-gpusm,rcache-rgpusm"
++ msg="(default)"
++ fi
++ DSO_all=0
++ ifs_save="$IFS"
++ IFS="${IFS}$PATH_SEPARATOR,"
++ for item in $enable_mca_dso; do
++ AS_VAR_SET([AS_TR_SH([DSO_$item])], [1])
++ msg="$item $msg"
++ done
++ IFS="$ifs_save"
+ fi
+ AC_MSG_RESULT([$msg])
+ unset msg
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/openmpi/accelerator-cuda-fix-bug-in-makefile.patch b/var/spack/repos/builtin/packages/openmpi/accelerator-cuda-fix-bug-in-makefile.patch
new file mode 100644
index 0000000000..f0681b6ad5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/accelerator-cuda-fix-bug-in-makefile.patch
@@ -0,0 +1,33 @@
+From be28fa6421094fcd0c544a6d457c6d748670959a Mon Sep 17 00:00:00 2001
+From: Howard Pritchard <howardp@lanl.gov>
+Date: Mon, 13 Nov 2023 08:12:28 -0700
+Subject: [PATCH] accelerator/cuda: fix bug in makefile.am
+
+that prevents correct linkage of libcuda.so if it is in
+a non standard location.
+
+Related to https://github.com/spack/spack/pull/40913
+
+Signed-off-by: Howard Pritchard <howardp@lanl.gov>
+
+diff --git a/opal/mca/accelerator/cuda/Makefile.am b/opal/mca/accelerator/cuda/Makefile.am
+index 5646890b..2c533ece 100644
+--- a/opal/mca/accelerator/cuda/Makefile.am
++++ b/opal/mca/accelerator/cuda/Makefile.am
+@@ -34,11 +34,11 @@ mcacomponentdir = $(opallibdir)
+ mcacomponent_LTLIBRARIES = $(component_install)
+
+ mca_accelerator_cuda_la_SOURCES = $(sources)
+-mca_accelerator_cuda_la_LDFLAGS = -module -avoid-version
++mca_accelerator_cuda_la_LDFLAGS = -module -avoid-version $(accelerator_cuda_LDFLAGS)
+ mca_accelerator_cuda_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_NAME@.la \
+ $(accelerator_cuda_LIBS)
+
+ noinst_LTLIBRARIES = $(component_noinst)
+ libmca_accelerator_cuda_la_SOURCES =$(sources)
+-libmca_accelerator_cuda_la_LDFLAGS = -module -avoid-version
++libmca_accelerator_cuda_la_LDFLAGS = -module -avoid-version $(accelerator_cuda_LDFLAGS)
+ libmca_accelerator_cuda_la_LIBADD = $(accelerator_cuda_LIBS)
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/openmpi/btlsmcuda-fix-problem-with-makefile.patch b/var/spack/repos/builtin/packages/openmpi/btlsmcuda-fix-problem-with-makefile.patch
new file mode 100644
index 0000000000..44b4d2766d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/btlsmcuda-fix-problem-with-makefile.patch
@@ -0,0 +1,73 @@
+From 27672784304d4c944e2e3c7d526dfd77f021a113 Mon Sep 17 00:00:00 2001
+From: Howard Pritchard <howardp@lanl.gov>
+Date: Thu, 16 Nov 2023 07:05:01 -0700
+Subject: [PATCH] btlsmcuda: fix problem with makefile
+
+when libcuda.so is in a non-standard location.
+
+also fix rcache/gpusm and rcache/rgpsum
+
+Similar fix to that in #12065
+
+Signed-off-by: Howard Pritchard <howardp@lanl.gov>
+
+diff --git a/opal/mca/btl/smcuda/Makefile.am b/opal/mca/btl/smcuda/Makefile.am
+index f1a89df8..8ee37add 100644
+--- a/opal/mca/btl/smcuda/Makefile.am
++++ b/opal/mca/btl/smcuda/Makefile.am
+@@ -51,7 +51,7 @@ endif
+ mcacomponentdir = $(opallibdir)
+ mcacomponent_LTLIBRARIES = $(component_install)
+ mca_btl_smcuda_la_SOURCES = $(libmca_btl_smcuda_la_sources)
+-mca_btl_smcuda_la_LDFLAGS = -module -avoid-version
++mca_btl_smcuda_la_LDFLAGS = -module -avoid-version $(btl_smcuda_LDFLAGS)
+ mca_btl_smcuda_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_NAME@.la \
+ $(OPAL_TOP_BUILDDIR)/opal/mca/common/sm/lib@OPAL_LIB_NAME@mca_common_sm.la \
+ $(btl_smcuda_LIBS)
+@@ -59,6 +59,6 @@ mca_btl_smcuda_la_CPPFLAGS = $(btl_smcuda_CPPFLAGS)
+
+ noinst_LTLIBRARIES = $(component_noinst)
+ libmca_btl_smcuda_la_SOURCES = $(libmca_btl_smcuda_la_sources)
+-libmca_btl_smcuda_la_LDFLAGS = -module -avoid-version
++libmca_btl_smcuda_la_LDFLAGS = -module -avoid-version $(btl_smcuda_LDFLAGS)
+ libmca_btl_smcuda_la_CPPFLAGS = $(btl_smcuda_CPPFLAGS)
+ libmca_btl_smcuda_la_LIBADD = $(btl_smcuda_LIBS)
+diff --git a/opal/mca/rcache/gpusm/Makefile.am b/opal/mca/rcache/gpusm/Makefile.am
+index 5645e5ea..1ff63b35 100644
+--- a/opal/mca/rcache/gpusm/Makefile.am
++++ b/opal/mca/rcache/gpusm/Makefile.am
+@@ -48,11 +48,11 @@ endif
+ mcacomponentdir = $(opallibdir)
+ mcacomponent_LTLIBRARIES = $(component_install)
+ mca_rcache_gpusm_la_SOURCES = $(sources)
+-mca_rcache_gpusm_la_LDFLAGS = -module -avoid-version
++mca_rcache_gpusm_la_LDFLAGS = -module -avoid-version $(rcache_gpusm_LDFLAGS)
+ mca_rcache_gpusm_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_NAME@.la \
+ $(rcache_gpusm_LIBS)
+
+ noinst_LTLIBRARIES = $(component_noinst)
+ libmca_rcache_gpusm_la_SOURCES = $(sources)
+-libmca_rcache_gpusm_la_LDFLAGS = -module -avoid-version
++libmca_rcache_gpusm_la_LDFLAGS = -module -avoid-version $(rcache_gpusm_LDFLAGS)
+ libmca_rcache_gpusm_la_LIBADD = $(rcache_gpusm_LIBS)
+diff --git a/opal/mca/rcache/rgpusm/Makefile.am b/opal/mca/rcache/rgpusm/Makefile.am
+index 6d2fdbc3..dde81411 100644
+--- a/opal/mca/rcache/rgpusm/Makefile.am
++++ b/opal/mca/rcache/rgpusm/Makefile.am
+@@ -46,11 +46,11 @@ endif
+ mcacomponentdir = $(opallibdir)
+ mcacomponent_LTLIBRARIES = $(component_install)
+ mca_rcache_rgpusm_la_SOURCES = $(sources)
+-mca_rcache_rgpusm_la_LDFLAGS = -module -avoid-version
++mca_rcache_rgpusm_la_LDFLAGS = -module -avoid-version $(rcache_rgpusm_LDFLAGS)
+ mca_rcache_rgpusm_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_NAME@.la \
+ $(rcache_rgpusm_LIBS)
+
+ noinst_LTLIBRARIES = $(component_noinst)
+ libmca_rcache_rgpusm_la_SOURCES = $(sources)
+-libmca_rcache_rgpusm_la_LDFLAGS = -module -avoid-version
++libmca_rcache_rgpusm_la_LDFLAGS = -module -avoid-version $(rcache_rgpusm_LDFLAGS)
+ libmca_rcache_rgpusm_la_LIBADD = $(rcache_rgpusm_LIBS)
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/openmpi/fix-for-dlopen-missing-symbol-problem.patch b/var/spack/repos/builtin/packages/openmpi/fix-for-dlopen-missing-symbol-problem.patch
new file mode 100644
index 0000000000..0a846b0326
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/fix-for-dlopen-missing-symbol-problem.patch
@@ -0,0 +1,32 @@
+From 50731f03c1ae9d375bfc2771fc402d54fd22e276 Mon Sep 17 00:00:00 2001
+From: Howard Pritchard <howardp@lanl.gov>
+Date: Sat, 4 Nov 2023 13:24:15 -0600
+Subject: [PATCH] spack:fix for dlopen missing symbol problem
+
+related to https://github.com/spack/spack/pull/40725
+
+Signed-off-by: Howard Pritchard <howardp@lanl.gov>
+
+diff --git a/opal/mca/dl/dlopen/configure.m4 b/opal/mca/dl/dlopen/configure.m4
+index 07fda82001..4ae625b1fb 100644
+--- a/opal/mca/dl/dlopen/configure.m4
++++ b/opal/mca/dl/dlopen/configure.m4
+@@ -27,7 +27,7 @@ AC_DEFUN([MCA_opal_dl_dlopen_CONFIG],[
+ AC_CONFIG_FILES([opal/mca/dl/dlopen/Makefile])
+
+ OAC_CHECK_PACKAGE([dlopen],
+- [dl_dlopen],
++ [opal_dl_dlopen],
+ [dlfcn.h],
+ [dl],
+ [dlopen],
+@@ -38,5 +38,5 @@ AC_DEFUN([MCA_opal_dl_dlopen_CONFIG],[
+ [$1],
+ [$2])
+
+- AC_SUBST(dl_dlopen_LIBS)
++ AC_SUBST(opal_dl_dlopen_LIBS)
+ ])
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 38bee519c8..889d903435 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -11,6 +11,8 @@ import sys
import llnl.util.tty as tty
+import spack.compilers
+import spack.version
from spack.package import *
@@ -44,11 +46,32 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# Current
version(
- "4.1.6", sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415"
- ) # libmpi.so.40.30.6
+ "5.0.5", sha256="6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776"
+ ) # libmpi.so.40.40.5
# Still supported
version(
+ "5.0.4", sha256="64526852cdd88b2d30e022087c16ab3e03806c451b10cd691d5c1ac887d8ef9d"
+ ) # libmpi.so.40.40.4
+ version(
+ "5.0.3", sha256="990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b"
+ ) # libmpi.so.40.40.3
+ version(
+ "5.0.2", sha256="ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f"
+ ) # libmpi.so.40.40.2
+ version(
+ "5.0.1", sha256="e357043e65fd1b956a47d0dae6156a90cf0e378df759364936c1781f1a25ef80"
+ ) # libmpi.so.40.40.1
+ version(
+ "5.0.0", sha256="9d845ca94bc1aeb445f83d98d238cd08f6ec7ad0f73b0f79ec1668dbfdacd613"
+ ) # libmpi.so.40.40.0
+ version(
+ "4.1.7", sha256="54a33cb7ad81ff0976f15a6cc8003c3922f0f3d8ceed14e1813ef3603f22cd34"
+ ) # libmpi.so.40.30.7
+ version(
+ "4.1.6", sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415"
+ ) # libmpi.so.40.30.6
+ version(
"4.1.5", sha256="a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3"
) # libmpi.so.40.30.5
version(
@@ -376,6 +399,10 @@ class Openmpi(AutotoolsPackage, CudaPackage):
"1.0", sha256="cf75e56852caebe90231d295806ac3441f37dc6d9ad17b1381791ebb78e21564"
) # libmpi.so.0.0.0
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("ad_lustre_rwcontig_open_source.patch", when="@1.6.5")
patch("llnl-platforms.patch", when="@1.6.5")
patch("configure.patch", when="@1.10.1")
@@ -405,41 +432,64 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# To fix performance regressions introduced while fixing a bug in older
# gcc versions on x86_64, Refs. open-mpi/ompi#8603
patch("opal_assembly_arch.patch", when="@4.0.0:4.0.5,4.1.0")
+ # Fix reduce operations for unsigned long integers
+ # See https://github.com/open-mpi/ompi/issues/10648
+ patch(
+ "https://github.com/open-mpi/ompi/commit/8e6d9ba8058a0c128438dbc0cd6476f1abb1d4f1.patch?full_index=1",
+ sha256="12f3aabbcdb02f28138e250273c2f62591db4b1f9f8aa3dcc3ef9ed551f4f587",
+ when="@4.0.7,4.1.2:4.1.4",
+ )
+ # To fix an error in Open MPI configury related to findng dl lib.
+ # This is specific to the 5.0.0 release.
+ patch("fix-for-dlopen-missing-symbol-problem.patch", when="@5.0.0")
+ # Patches to accelerator CUDA component to link in libcuda
+ # when in non-standard location
+ patch("accelerator-cuda-fix-bug-in-makefile.patch", when="@5.0.0")
+ patch("btlsmcuda-fix-problem-with-makefile.patch", when="@5.0.0")
+ patch("accelerator-build-components-as-dso-s-by-default.patch", when="@5.0.0:5.0.1")
+
+ # OpenMPI 5.0.0-5.0.3 needs to change PMIX version check to compile w/ PMIX > 4.2.5
+ # https://github.com/open-mpi/ompi/issues/12537#issuecomment-2103350910
+ # https://github.com/openpmix/prrte/pull/1957
+ patch("pmix_getline_pmix_version.patch", when="@5.0.0:5.0.3")
+ patch("pmix_getline_pmix_version-prte.patch", when="@5.0.3")
+
+ FABRICS = (
+ "psm",
+ "psm2",
+ "verbs",
+ "mxm",
+ "ucx",
+ "ofi",
+ "fca",
+ "hcoll",
+ "ucc",
+ "xpmem",
+ "cma",
+ "knem",
+ )
variant(
"fabrics",
values=disjoint_sets(
- ("auto",),
- (
- "psm",
- "psm2",
- "verbs",
- "mxm",
- "ucx",
- "ofi",
- "fca",
- "hcoll",
- "xpmem",
- "cma",
- "knem",
- ), # shared memory transports
+ ("auto",), FABRICS # shared memory transports
).with_non_feature_values("auto", "none"),
description="List of fabrics that are enabled; " "'auto' lets openmpi determine",
)
+ SCHEDULERS = ("alps", "lsf", "tm", "slurm", "sge", "loadleveler")
+
variant(
"schedulers",
- values=disjoint_sets(
- ("auto",), ("alps", "lsf", "tm", "slurm", "sge", "loadleveler")
- ).with_non_feature_values("auto", "none"),
+ values=disjoint_sets(("auto",), SCHEDULERS).with_non_feature_values("auto", "none"),
description="List of schedulers for which support is enabled; "
"'auto' lets openmpi determine",
)
# Additional support options
- variant("atomics", default=False, description="Enable built-in atomics")
+ variant("atomics", default=True, description="Enable built-in atomics")
variant("java", default=False, when="@1.7.4:", description="Build Java support")
- variant("static", default=True, description="Build static libraries")
+ variant("static", default=False, description="Build static libraries")
variant("sqlite3", default=False, when="@1.7.3:1", description="Build SQLite3 support")
variant("vt", default=True, description="Build VampirTrace support")
variant(
@@ -472,11 +522,33 @@ class Openmpi(AutotoolsPackage, CudaPackage):
description="Build deprecated support for the Singularity container",
)
variant("lustre", default=False, description="Lustre filesystem library support")
- variant("romio", default=True, description="Enable ROMIO support")
+ variant("romio", default=True, when="@:5", description="Enable ROMIO support")
+ variant("romio", default=False, when="@5:", description="Enable ROMIO support")
+ variant(
+ "romio-filesystem",
+ description="Add the filesystem to romio",
+ values=disjoint_sets(
+ (
+ "daos",
+ "nfs",
+ "ufs",
+ "pvfs2",
+ "testfs",
+ "xfs",
+ "panfs",
+ "lustre",
+ "gpfs",
+ "ime",
+ "quobytefs",
+ )
+ ).with_non_feature_values("none"),
+ )
+
variant("rsh", default=True, description="Enable rsh (openssh) process lifecycle management")
variant(
"orterunprefix",
default=False,
+ when="@1.3:4",
description="Prefix Open MPI to PATH and LD_LIBRARY_PATH on local and remote hosts",
)
# Adding support to build a debug version of OpenMPI that activates
@@ -495,6 +567,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant(
"legacylaunchers",
default=False,
+ when="@1.6:4 schedulers=slurm",
description="Do not remove mpirun/mpiexec when building with slurm",
)
# Variants to use internal packages
@@ -502,19 +575,38 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant("internal-pmix", default=False, description="Use internal pmix")
variant("internal-libevent", default=False, description="Use internal libevent")
variant("openshmem", default=False, description="Enable building OpenSHMEM")
+ variant("debug", default=False, description="Make debug build", when="build_system=autotools")
- provides("mpi")
- provides("mpi@:2.2", when="@1.6.5")
- provides("mpi@:3.0", when="@1.7.5:")
+ variant(
+ "two_level_namespace",
+ default=False,
+ description="""Build shared libraries and programs
+built with the mpicc/mpifort/etc. compiler wrappers
+with '-Wl,-commons,use_dylibs' and without
+'-Wl,-flat_namespace'.""",
+ )
+
+ # Patch to allow two-level namespace on a MacOS platform when building
+ # openmpi. Unfortuntately, the openmpi configure command has flat namespace
+ # hardwired in. In spack, this only works for openmpi up to versions 4,
+ # because for versions 5+ autoreconf is triggered (see below) and this
+ # patch needs to be applied (again) AFTER autoreconf ran.
+ @when("+two_level_namespace platform=darwin")
+ def patch(self):
+ filter_file(r"-flat_namespace", "-commons,use_dylibs", "configure")
+
+ provides("mpi@:2.0", when="@:1.2")
+ provides("mpi@:2.1", when="@1.3:1.7.2")
+ provides("mpi@:2.2", when="@1.7.3:1.7.4")
+ provides("mpi@:3.0", when="@1.7.5:1.10.7")
provides("mpi@:3.1", when="@2.0.0:")
if sys.platform != "darwin":
depends_on("numactl")
- depends_on("autoconf @2.69:", type="build", when="@main")
- depends_on("automake @1.13.4:", type="build", when="@main")
- depends_on("libtool @2.4.2:", type="build", when="@main")
- depends_on("m4", type="build", when="@main")
+ depends_on("autoconf @2.69:", type="build", when="@5.0.0:,main")
+ depends_on("automake @1.13.4:", type="build", when="@5.0.0:,main")
+ depends_on("libtool @2.4.2:", type="build", when="@5.0.0:,main")
depends_on("perl", type="build")
depends_on("pkgconfig", type="build")
@@ -549,6 +641,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
depends_on("libfabric", when="fabrics=ofi")
depends_on("fca", when="fabrics=fca")
depends_on("hcoll", when="fabrics=hcoll")
+ depends_on("ucc", when="fabrics=ucc")
depends_on("xpmem", when="fabrics=xpmem")
depends_on("knem", when="fabrics=knem")
@@ -561,7 +654,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
with when("~internal-pmix"):
depends_on("pmix@1", when="@2")
depends_on("pmix@3.2:", when="@4:")
- depends_on("pmix@4.2:", when="@5:")
+ depends_on("pmix@4.2.4:", when="@5:")
# pmix@4.2.3 contains a breaking change, compat fixed in openmpi@4.1.6
# See https://www.mail-archive.com/announce@lists.open-mpi.org//msg00158.html
@@ -572,6 +665,8 @@ class Openmpi(AutotoolsPackage, CudaPackage):
depends_on("openssh", type="run", when="+rsh")
+ depends_on("cuda", type=("build", "link", "run"), when="@5: +cuda")
+
conflicts("+cxx_exceptions", when="%nvhpc", msg="nvc does not ignore -fexceptions, but errors")
# CUDA support was added in 1.7, and since the variant is part of the
@@ -588,6 +683,8 @@ class Openmpi(AutotoolsPackage, CudaPackage):
conflicts("fabrics=fca", when="@:1.4,5:")
# hcoll support was added in 1.7.3:
conflicts("fabrics=hcoll", when="@:1.7.2")
+ # ucc support was added in 4.1.4:
+ conflicts("fabrics=ucc", when="@:4.1.3")
# xpmem support was added in 1.7
conflicts("fabrics=xpmem", when="@:1.6")
# cma support was added in 1.7
@@ -596,11 +693,6 @@ class Openmpi(AutotoolsPackage, CudaPackage):
conflicts("fabrics=knem", when="@:1.4")
conflicts(
- "schedulers=slurm ~pmi",
- when="@1.5.4",
- msg="+pmi is required for openmpi to work with Slurm.",
- )
- conflicts(
"schedulers=loadleveler",
when="@3:",
msg="The loadleveler scheduler is not supported with " "openmpi(>=3).",
@@ -735,24 +827,26 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variants.append("~pmi")
# fabrics
- fabrics = get_options_from_variant(cls, "fabrics")
used_fabrics = []
- for fabric in fabrics:
+ for fabric in cls.FABRICS:
match = re.search(r"\bMCA (?:mtl|btl|pml): %s\b" % fabric, output)
if match:
used_fabrics.append(fabric)
if used_fabrics:
variants.append("fabrics=" + ",".join(used_fabrics))
+ else:
+ variants.append("fabrics=none")
# schedulers
- schedulers = get_options_from_variant(cls, "schedulers")
used_schedulers = []
- for scheduler in schedulers:
+ for scheduler in cls.SCHEDULERS:
match = re.search(r"\bMCA (?:prrte|ras): %s\b" % scheduler, output)
if match:
used_schedulers.append(scheduler)
if used_schedulers:
variants.append("schedulers=" + ",".join(used_schedulers))
+ else:
+ variants.append("schedulers=none")
# Get the appropriate compiler
match = re.search(r"\bC compiler absolute: (\S+)", output)
@@ -792,15 +886,20 @@ class Openmpi(AutotoolsPackage, CudaPackage):
env.set("MPICXX", join_path(self.prefix.bin, "mpic++"))
env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
+ # Open MPI also has had mpifort since v1.7, so we can set MPIFC to that
+ # Note: that mpif77 and mpif90 are deprecated since v1.7, but careful
+ # testing would be needed to change the MPIF77 and MPIF90 above. For now
+ # we just *add* functionality
+ if self.spec.satisfies("@1.7:"):
+ env.set("MPIFC", join_path(self.prefix.bin, "mpifort"))
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
# Use the spack compiler wrappers under MPI
- env.set("OMPI_CC", spack_cc)
- env.set("OMPI_CXX", spack_cxx)
- env.set("OMPI_FC", spack_fc)
- env.set("OMPI_F77", spack_f77)
+ dependent_module = dependent_spec.package.module
+ env.set("OMPI_CC", dependent_module.spack_cc)
+ env.set("OMPI_CXX", dependent_module.spack_cxx)
+ env.set("OMPI_FC", dependent_module.spack_fc)
+ env.set("OMPI_F77", dependent_module.spack_f77)
# See https://www.open-mpi.org/faq/?category=building#installdirs
for suffix in [
@@ -822,7 +921,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
"PKGLIBDIR",
"PKGINCLUDEDIR",
]:
- env.unset("OPAL_%s" % suffix)
+ env.unset(f"OPAL_{suffix}")
def setup_dependent_package(self, module, dependent_spec):
self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
@@ -881,6 +980,11 @@ class Openmpi(AutotoolsPackage, CudaPackage):
return "--without-hcoll"
return "--with-hcoll={0}".format(self.spec["hcoll"].prefix)
+ def with_or_without_ucc(self, activated):
+ if not activated:
+ return "--without-ucc"
+ return "--with-ucc={0}".format(self.spec["ucc"].prefix)
+
def with_or_without_xpmem(self, activated):
if not activated:
return "--without-xpmem"
@@ -913,11 +1017,25 @@ class Openmpi(AutotoolsPackage, CudaPackage):
def autoreconf(self, spec, prefix):
perl = which("perl")
perl("autogen.pl")
+ if spec.satisfies("+two_level_namespace platform=darwin"):
+ filter_file(r"-flat_namespace", "-commons,use_dylibs", "configure")
+
+ @when("@5.0.0:5.0.1")
+ def autoreconf(self, spec, prefix):
+ perl = which("perl")
+ perl("autogen.pl", "--force")
+ if spec.satisfies("+two_level_namespace platform=darwin"):
+ filter_file(r"-flat_namespace", "-commons,use_dylibs", "configure")
def configure_args(self):
spec = self.spec
config_args = ["--enable-shared", "--disable-silent-rules", "--disable-sphinx"]
+ # Work around incompatibility with new apple-clang linker
+ # https://github.com/open-mpi/ompi/issues/12427
+ if spec.satisfies("@:4.1.6,5.0.0:5.0.3 %apple-clang@15:"):
+ config_args.append("--with-wrapper-fcflags=-Wl,-ld_classic")
+
# All rpath flags should be appended with self.compiler.cc_rpath_arg.
# Later, we might need to update share/openmpi/mpic++-wrapper-data.txt
# and mpifort-wrapper-data.txt (see filter_rpaths()).
@@ -941,9 +1059,9 @@ class Openmpi(AutotoolsPackage, CudaPackage):
config_args.append("--enable-mca-no-build=plm-rsh")
# Useful for ssh-based environments
- if spec.satisfies("@1.3:"):
- if spec.satisfies("+orterunprefix"):
- config_args.append("--enable-orterun-prefix-by-default")
+ # For v4 and lower
+ if spec.satisfies("+orterunprefix"):
+ config_args.append("--enable-orterun-prefix-by-default")
# some scientific packages ignore deprecated/remove symbols. Re-enable
# them for now, for discussion see
@@ -956,7 +1074,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
config_args.extend(self.with_or_without("fabrics"))
if spec.satisfies("@2.0.0:"):
- if "fabrics=xpmem platform=cray" in spec:
+ if "fabrics=xpmem" in spec:
config_args.append("--with-cray-xpmem")
else:
config_args.append("--without-cray-xpmem")
@@ -965,6 +1083,9 @@ class Openmpi(AutotoolsPackage, CudaPackage):
if "schedulers=auto" not in spec:
config_args.extend(self.with_or_without("schedulers"))
+ if spec.satisfies("schedulers=lsf"):
+ config_args.append("--with-lsf-libdir={0}".format(spec["lsf"].libs.directories[0]))
+
config_args.extend(self.enable_or_disable("memchecker"))
if spec.satisfies("+memchecker"):
config_args.extend(["--enable-debug"])
@@ -997,9 +1118,14 @@ class Openmpi(AutotoolsPackage, CudaPackage):
elif spec.satisfies("@1.7.4:"):
config_args.extend(["--disable-java", "--disable-mpi-java"])
+ # Romio
if "~romio" in spec:
config_args.append("--disable-io-romio")
+ if not spec.satisfies("romio-filesystem=none"):
+ args = "+".join(spec.variants["romio-filesystem"].value)
+ config_args.append(f"--with-io-romio-flags=--with-file-system={args}")
+
if "+gpfs" in spec:
config_args.append("--with-gpfs")
else:
@@ -1038,13 +1164,6 @@ class Openmpi(AutotoolsPackage, CudaPackage):
if spec.satisfies("@1.7.2"):
# There was a bug in 1.7.2 when --enable-static is used
config_args.append("--enable-mca-no-build=pml-bfo")
- if spec.satisfies("%pgi^cuda@7.0:7"):
- # OpenMPI has problems with CUDA 7 and PGI
- config_args.append("--with-wrapper-cflags=-D__LP64__ -ta:tesla")
- if spec.satisfies("%pgi@:15.8"):
- # With PGI 15.9 and later compilers, the
- # CFLAGS=-D__LP64__ is no longer needed.
- config_args.append("CFLAGS=-D__LP64__")
elif spec.satisfies("@1.7:"):
config_args.append("--without-cuda")
@@ -1084,6 +1203,42 @@ class Openmpi(AutotoolsPackage, CudaPackage):
if wrapper_ldflags:
config_args.append("--with-wrapper-ldflags={0}".format(" ".join(wrapper_ldflags)))
+ #
+ # the Spack path padding feature causes issues with Open MPI's lex based parsing system
+ # used by the compiler wrappers. Crank up lex buffer to 1MB to handle this.
+ # see https://spack.readthedocs.io/en/latest/binary_caches.html#relocation
+ #
+
+ if spec.satisfies("@5.0.0:"):
+ config_args.append("CFLAGS=-DYY_BUF_SIZE=1048576")
+
+ #
+ # disable romio for 5.0.0 or newer if using Intel OneAPI owing to a problem
+ # building ZE related components of the romio packaged with this release
+ #
+
+ # if spec.satisfies("@5.0.0:") and spec.satisfies("%oneapi"):
+ # config_args.append("--disable-io-romio")
+
+ # https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-c-compiler-release-notes.html :
+ # Key Features in Intel C++ Compiler Classic 2021.7
+ #
+ # The Intel C++ Classic Compiler is deprecated and an additional
+ # diagnostic message will be output with each invocation. This
+ # diagnostic may impact expected output during compilation. For
+ # example, using the compiler to produce preprocessed information
+ # (icpc -E) will produce the additional deprecation diagnostic,
+ # interfering with the expected preprocessed output.
+ #
+ # This output can be disabled by using -diag-disable=10441 on
+ # Linux/macOS or /Qdiag-disable:10441 on Windows. You can add this
+ # option on the command line, configuration file or option setting
+ # environment variables.
+ if spec.satisfies("%intel@2021.7.0:"):
+ config_args.append("CPPFLAGS=-diag-disable=10441")
+
+ config_args += self.enable_or_disable("debug")
+
return config_args
@run_after("install", when="+wrapper-rpath")
@@ -1133,6 +1288,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
if self.compiler.name == "nag":
x.filter("-Wl,--enable-new-dtags", "", string=True, backup=False)
+ # For v4 and lower
@run_after("install")
def delete_mpirun_mpiexec(self):
# The preferred way to run an application when Slurm is the
@@ -1142,7 +1298,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# applications via mpirun or mpiexec, and leaves srun as the
# only sensible choice (orterun is still present, but normal
# users don't know about that).
- if "@1.6: ~legacylaunchers schedulers=slurm" in self.spec:
+ if self.spec.satisfies("~legacylaunchers schedulers=slurm"):
exe_list = [
self.prefix.bin.mpirun,
self.prefix.bin.mpiexec,
@@ -1164,7 +1320,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
Copy the example files after the package is installed to an
install test subdirectory for use during `spack test run`.
"""
- self.cache_extra_test_sources(self.extra_install_tests)
+ cache_extra_test_sources(self, self.extra_install_tests)
def run_installed_binary(self, bin, options, expected):
"""run and check outputs for the installed binary"""
@@ -1182,7 +1338,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
self.run_installed_binary("mpirun", options, [f"openmpi-{self.spec.version}"])
def test_opmpi_info(self):
- """test installed mpirun"""
+ """test installed ompi_info"""
self.run_installed_binary("ompi_info", [], [f"Ident string: {self.spec.version}", "MCA"])
def test_version(self):
@@ -1276,12 +1432,3 @@ def is_enabled(text):
if text in set(["t", "true", "enabled", "yes", "1"]):
return True
return False
-
-
-# This code gets all the fabric names from the variants list
-# Idea taken from the AutotoolsPackage source.
-def get_options_from_variant(self, name):
- values = self.variants[name][0].values
- if getattr(values, "feature_values", None):
- values = values.feature_values
- return values
diff --git a/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version-prte.patch b/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version-prte.patch
new file mode 100644
index 0000000000..add0fb2c9b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version-prte.patch
@@ -0,0 +1,14 @@
+diff --git a/3rd-party/prrte/src/tools/prte/prte.c b/3rd-party/prrte/src/tools/prte/prte.c
+index 3c62ef4b66..d15347d324 100644
+--- a/3rd-party/prrte/src/tools/prte/prte.c
++++ b/3rd-party/prrte/src/tools/prte/prte.c
+@@ -256,7 +256,7 @@ static void shutdown_callback(int fd, short flags, void *arg)
+ exit(PRTE_ERROR_DEFAULT_EXIT_CODE);
+ }
+
+-#if PMIX_NUMERIC_VERSION < 0x00040208
++#if PMIX_NUMERIC_VERSION < 0x00040205
+ static char *pmix_getline(FILE *fp)
+ {
+ char *ret, *buff;
+
diff --git a/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version.patch b/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version.patch
new file mode 100644
index 0000000000..ccb854ce81
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/pmix_getline_pmix_version.patch
@@ -0,0 +1,52 @@
+diff --git a/3rd-party/prrte/src/mca/ess/base/ess_base_bootstrap.c b/3rd-party/prrte/src/mca/ess/base/ess_base_bootstrap.c
+index 48ce664915..f37bd7bea2 100644
+--- a/3rd-party/prrte/src/mca/ess/base/ess_base_bootstrap.c
++++ b/3rd-party/prrte/src/mca/ess/base/ess_base_bootstrap.c
+@@ -68,7 +68,7 @@ static pmix_status_t regex_parse_value_range(char *base, char *range,
+ char ***names);
+ static pmix_status_t read_file(char *regexp, char ***names);
+
+-#if PMIX_NUMERIC_VERSION < 0x00040208
++#if PMIX_NUMERIC_VERSION < 0x00040205
+ static char *pmix_getline(FILE *fp)
+ {
+ char *ret, *buff;
+diff --git a/3rd-party/prrte/src/mca/ras/base/ras_base_allocate.c b/3rd-party/prrte/src/mca/ras/base/ras_base_allocate.c
+index bc9db628f5..858f1397fb 100644
+--- a/3rd-party/prrte/src/mca/ras/base/ras_base_allocate.c
++++ b/3rd-party/prrte/src/mca/ras/base/ras_base_allocate.c
+@@ -59,7 +59,7 @@
+
+ #include "src/mca/ras/base/ras_private.h"
+
+-#if PMIX_NUMERIC_VERSION < 0x00040208
++#if PMIX_NUMERIC_VERSION < 0x00040205
+ static char *pmix_getline(FILE *fp)
+ {
+ char *ret, *buff;
+diff --git a/3rd-party/prrte/src/mca/rmaps/rank_file/rmaps_rank_file.c b/3rd-party/prrte/src/mca/rmaps/rank_file/rmaps_rank_file.c
+index b8316e0a8e..dfd0b847d0 100644
+--- a/3rd-party/prrte/src/mca/rmaps/rank_file/rmaps_rank_file.c
++++ b/3rd-party/prrte/src/mca/rmaps/rank_file/rmaps_rank_file.c
+@@ -71,7 +71,7 @@ static int prte_rmaps_rf_process_lsf_affinity_hostfile(prte_job_t *jdata, prte_r
+
+ char *prte_rmaps_rank_file_slot_list = NULL;
+
+-#if PMIX_NUMERIC_VERSION < 0x00040208
++#if PMIX_NUMERIC_VERSION < 0x00040205
+ static char *pmix_getline(FILE *fp)
+ {
+ char *ret, *buff;
+diff --git a/3rd-party/prrte/src/mca/rmaps/seq/rmaps_seq.c b/3rd-party/prrte/src/mca/rmaps/seq/rmaps_seq.c
+index 555aa39c42..356fb72aa9 100644
+--- a/3rd-party/prrte/src/mca/rmaps/seq/rmaps_seq.c
++++ b/3rd-party/prrte/src/mca/rmaps/seq/rmaps_seq.c
+@@ -109,7 +109,7 @@ static bool quickmatch(prte_node_t *nd, char *name)
+ return false;
+ }
+
+-#if PMIX_NUMERIC_VERSION < 0x00040208
++#if PMIX_NUMERIC_VERSION < 0x00040205
+ static char *pmix_getline(FILE *fp)
+ {
+ char *ret, *buff;
diff --git a/var/spack/repos/builtin/packages/openmx/package.py b/var/spack/repos/builtin/packages/openmx/package.py
index 96626672ec..3ec7c6b818 100644
--- a/var/spack/repos/builtin/packages/openmx/package.py
+++ b/var/spack/repos/builtin/packages/openmx/package.py
@@ -20,6 +20,9 @@ class Openmx(MakefilePackage):
version("3.9", sha256="27bb56bd4d1582d33ad32108fb239b546bdd1bdffd6f5b739b4423da1ab93ae2")
version("3.8", sha256="36ee10d8b1587b25a2ca1d57f110111be65c4fb4dc820e6d93e1ed2b562634a1")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
resource(
name="patch",
url="http://www.openmx-square.org/bugfixed/18June12/patch3.8.5.tar.gz",
diff --git a/var/spack/repos/builtin/packages/opennurbs/package.py b/var/spack/repos/builtin/packages/opennurbs/package.py
index cd583f0f88..c9110087a0 100644
--- a/var/spack/repos/builtin/packages/opennurbs/package.py
+++ b/var/spack/repos/builtin/packages/opennurbs/package.py
@@ -4,10 +4,11 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems import cmake, makefile
from spack.package import *
-class Opennurbs(Package):
+class Opennurbs(CMakePackage, MakefilePackage):
"""OpenNURBS is an open-source NURBS-based geometric modeling library
and toolset, with meshing and display / output functions.
"""
@@ -20,34 +21,34 @@ class Opennurbs(Package):
license("Zlib")
version("develop", branch="develop")
-
version(
"percept",
sha256="d12a8f14f0b27d286fb7a75ab3c4e300f77d1fbb028326d1c8d28e4641605538",
url="https://github.com/PerceptTools/percept/raw/master/build-cmake/opennurbs-percept.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ build_system(
+ conditional("cmake", when="@1:"), conditional("makefile", when="@:0"), default="cmake"
+ )
+
variant("shared", default=True, description="Build shared libraries")
- # CMake installation method
- def install(self, spec, prefix):
- cmake_args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
- cmake_args.extend(std_cmake_args)
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
+
- with working_dir("spack-build", create=True):
- cmake("..", *cmake_args)
- make()
- make("install")
+class MakefileBuilder(makefile.MakefileBuilder):
- # Pre-cmake installation method
- @when("@percept")
- def install(self, spec, prefix):
- make(parallel=False)
+ def build(self, pkg, spec, prefix):
+ make("RM=rm -f", "AR=ar cr", f"CC={spack_cc}", f"CCC={spack_cxx}", parallel=False)
- # Install manually
+ def install(self, pkg, spec, prefix):
mkdir(prefix.lib)
mkdir(prefix.include)
install("libopenNURBS.a", prefix.lib)
- install_tree("zlib", join_path(prefix.include, "zlib"))
install("*.h", prefix.include)
diff --git a/var/spack/repos/builtin/packages/openpa/package.py b/var/spack/repos/builtin/packages/openpa/package.py
index 63f73bbb74..7ab2d75413 100644
--- a/var/spack/repos/builtin/packages/openpa/package.py
+++ b/var/spack/repos/builtin/packages/openpa/package.py
@@ -14,8 +14,11 @@ class Openpa(AutotoolsPackage):
license("mpich2")
+ version("1.0.5", sha256="4a18c054970970a1baf477504053a49149f962329b70b481c2ec93e157c9093b")
version("1.0.4", sha256="9e5904b3bbdcb24e8429c12d613422e716a3479f3e0aeefbd9ce546852899e3a")
version("1.0.3", sha256="b73943f341b0d4475109f8f341a5229258e43510b62cb5d488cf7f0e84fa5557")
version("1.0.2", sha256="13b5ef8ea3502822ab03861bf9d047c3bda722b22605edf3f508fb355746db4f")
version("1.0.1", sha256="63fae765d44e5741506b92cd0ff55c237c1e19d20bd5539c77cea1c67d5b4303")
version("1.0.0", sha256="0f163da7fbe39a438c301b52bb876961bfedfe4ab6248a98297dd326fabee627")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/openpbs/package.py b/var/spack/repos/builtin/packages/openpbs/package.py
index 1a588e95b1..32ae590978 100644
--- a/var/spack/repos/builtin/packages/openpbs/package.py
+++ b/var/spack/repos/builtin/packages/openpbs/package.py
@@ -21,6 +21,9 @@ class Openpbs(AutotoolsPackage):
version("20.0.1", sha256="685a4abcea92bf518df02b544d25e237ae8cef76f86525f7bf3554812e9f50fa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/openpmd-api/package.py b/var/spack/repos/builtin/packages/openpmd-api/package.py
index 694b785094..54a1cabe28 100644
--- a/var/spack/repos/builtin/packages/openpmd-api/package.py
+++ b/var/spack/repos/builtin/packages/openpmd-api/package.py
@@ -10,7 +10,7 @@ class OpenpmdApi(CMakePackage):
"""C++ & Python API for Scientific I/O"""
homepage = "https://www.openPMD.org"
- url = "https://github.com/openPMD/openPMD-api/archive/0.15.2.tar.gz"
+ url = "https://github.com/openPMD/openPMD-api/archive/0.16.0.tar.gz"
git = "https://github.com/openPMD/openPMD-api.git"
maintainers("ax3l", "franzpoeschel")
@@ -21,6 +21,7 @@ class OpenpmdApi(CMakePackage):
# C++17 up until here
version("develop", branch="dev")
+ version("0.16.0", sha256="b52222a4ab2511f9e3f6e21af222f57ab4fb6228623024fc5d982066333e104f")
version("0.15.2", sha256="fbe3b356fe6f4589c659027c8056844692c62382e3ec53b953bed1c87e58ba13")
version("0.15.1", sha256="0e81652152391ba4d2b62cfac95238b11233a4f89ff45e1fcffcc7bcd79dabe1")
version("0.15.0", sha256="290e3a3c5814204ea6527d53423bfacf7a8dc490713227c9e0eaa3abf4756177")
@@ -40,21 +41,26 @@ class OpenpmdApi(CMakePackage):
version("0.12.0", tag="0.12.0-alpha", commit="23be484dd2570b5277779eafcc5f1eb70c6d98f2")
version("0.11.1", tag="0.11.1-alpha", commit="c40292aafbf564807710424d106304f9670a8304")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build a shared version of the library")
variant("mpi", default=True, description="Enable parallel I/O")
variant("hdf5", default=True, description="Enable HDF5 support")
- variant("adios1", default=False, description="Enable ADIOS1 support")
+ variant("adios1", default=False, description="Enable ADIOS1 support", when="@:0.15")
variant("adios2", default=True, description="Enable ADIOS2 support")
variant("python", default=False, description="Enable Python bindings")
depends_on("cmake@3.15.0:", type="build")
+ depends_on("cmake@3.22.0:", type="build", when="@0.16.0:")
depends_on("catch2@2.6.1:2", type="test")
depends_on("catch2@2.13.4:2", type="test", when="@0.14.0:")
depends_on("catch2@2.13.10:2", type="test", when="@0.15.0:")
depends_on("mpi@2.3:", when="+mpi") # might become MPI 3.0+
depends_on("nlohmann-json@3.9.1:")
depends_on("mpark-variant@1.4.0:", when="@:0.14") # pre C++17 releases
- depends_on("toml11@3.7.1:", when="@0.15.0:")
+ depends_on("toml11@3.7.1:3", when="@0.15")
+ depends_on("toml11@3.7.1:", when="@0.16:")
with when("+hdf5"):
depends_on("hdf5@1.8.13:")
depends_on("hdf5@1.8.13: ~mpi", when="~mpi")
@@ -71,6 +77,7 @@ class OpenpmdApi(CMakePackage):
depends_on("adios2@2.5.0: +mpi", when="+mpi")
with when("+python"):
depends_on("py-pybind11@2.6.2:", type="link")
+ depends_on("py-pybind11@2.13.0:", type="link", when="@0.16.0:")
depends_on("py-numpy@1.15.1:", type=["test", "run"])
depends_on("py-mpi4py@2.1.0:", when="+mpi", type=["test", "run"])
depends_on("python@3.7:", type=["link", "test", "run"])
@@ -103,6 +110,13 @@ class OpenpmdApi(CMakePackage):
when="@0.15.1",
)
+ # fix superbuild control in 0.16.0
+ patch(
+ "https://github.com/openPMD/openPMD-api/pull/1678.patch?full_index=1",
+ sha256="e49fe79691bbb5aae2224d218f29801630d33f3a923c518f6bfb39ec22fd6a72",
+ when="@0.16.0",
+ )
+
extends("python", when="+python")
def cmake_args(self):
@@ -123,13 +137,7 @@ class OpenpmdApi(CMakePackage):
# switch internally shipped third-party libraries for spack
if spec.satisfies("+python"):
- py_exe_define = (
- "Python_EXECUTABLE" if spec.version >= Version("0.13.0") else "PYTHON_EXECUTABLE"
- )
- args += [
- self.define(py_exe_define, self.spec["python"].command.path),
- self.define("openPMD_USE_INTERNAL_PYBIND11", False),
- ]
+ args.append(self.define("openPMD_USE_INTERNAL_PYBIND11", False))
args.append(self.define("openPMD_USE_INTERNAL_JSON", False))
if spec.satisfies("@:0.14"): # pre C++17 releases
@@ -178,17 +186,10 @@ class OpenpmdApi(CMakePackage):
# later tests
ctest("--output-on-failure", "-j1")
- def test(self):
- """Perform smoke tests on the installed package."""
- exes = ["openpmd-ls"] # in 0.11.1+
- for exe in exes:
- spec_vers_str = "{0}".format(self.spec.version)
- reason = "test version of {0} is {1}".format(exe, spec_vers_str)
- self.run_test(
- exe,
- ["--version"],
- [spec_vers_str],
- installed=True,
- purpose=reason,
- skip_missing=False,
- )
+ def test_run_openpmd_ls(self):
+ """Test if openpmd-ls runs correctly"""
+ if self.spec.satisfies("@:0.11.0"):
+ raise SkipTest("Package must be installed as version 0.11.1 or later")
+ exe = which(join_path(self.prefix.bin, "openpmd-ls"))
+ out = exe(output=str.split, error=str.split)
+ assert str(self.spec.version) in out
diff --git a/var/spack/repos/builtin/packages/openradioss-engine/package.py b/var/spack/repos/builtin/packages/openradioss-engine/package.py
index 9dcd359155..3fe45e5054 100644
--- a/var/spack/repos/builtin/packages/openradioss-engine/package.py
+++ b/var/spack/repos/builtin/packages/openradioss-engine/package.py
@@ -27,6 +27,10 @@ class OpenradiossEngine(CMakePackage):
maintainers("kjrstory")
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI support")
variant("sp", default=False, description="Using single precision option")
variant("debug", default=False, description="Debug Option")
@@ -54,59 +58,52 @@ class OpenradiossEngine(CMakePackage):
@property
def compiler_name(self):
compiler_mapping = {
- "aocc": "64_AOCC",
- "intel": "64_intel",
- "oneapi": "64_intel",
- "gcc": "64_gf",
- "arm": "a64_gf",
+ "aocc": "linux64_AOCC",
+ "intel": "linux64_intel",
+ "oneapi": "linux64_intel",
+ "gcc": "linux64_gf",
+ "arm": "linuxa64",
}
compiler_name = compiler_mapping[self.spec.compiler.name]
return compiler_name
def cmake_args(self):
args = [
- "-Dmpi_os=0",
- "-DCMAKE_Fortran_COMPILER={0}".format(spack_fc),
- "-DCMAKE_C_COMPILER={0}".format(spack_cc),
- "-DCMAKE_CPP_COMPILER={0}".format(spack_cxx),
- "-DCMAKE_CXX_COMPILER={0}".format(spack_cxx),
- "-Dsanitize=0",
+ self.define("mpi_os", False),
+ self.define("CMAKE_Fortran_COMPILER", spack_fc),
+ self.define("CMAKE_C_COMPILER", spack_cc),
+ self.define("CMAKE_CPP_COMPILER", spack_cxx),
+ self.define("CMAKE_CXX_COMPILER", spack_cxx),
+ self.define("sanitize", False),
+ self.define("arch", self.compiler_name),
+ self.define_from_variant("debug", "debug"),
+ self.define_from_variant("static_link", "static_link"),
]
- args.append("-Drach=linux" + self.compiler_name)
-
if "+sp" in self.spec:
- args.append("-Dprecision=sp")
+ args.append(self.define("precision", "sp"))
else:
- args.append("-Dprecision=dp")
+ args.append(self.define("precision", "dp"))
if "+mpi" in self.spec:
- args.append("-DMPI=ompi")
- args.append("-Dmpi_root=" + self.spec["mpi"].prefix)
- args.append("-Dmpi_incdir=" + self.spec["mpi"].prefix.include)
- args.append("-Dmpi_libdir=" + self.spec["mpi"].prefix.lib)
- else:
- args.append("-DMPI=smp")
-
- if "+debug" in self.spec:
- args.append("-Ddebug=1")
+ args.append(self.define("MPI", "ompi"))
+ args.append(self.define("mpi_root", self.spec["mpi"].prefix))
+ args.append(self.define("mpi_incdir", self.spec["mpi"].prefix.include))
+ args.append(self.define("mpi_libdir", self.spec["mpi"].prefix.lib))
else:
- args.append("-Ddebug=0")
+ args.append(self.define("MPI", "smp"))
- if "+static_link" in self.spec:
- args.append("-Dstatic_link=1")
- else:
- args.append("-Dstatic_link=0")
+ exec_file = f"engine_{self.compiler_name}"
+ exec_file += "_ompi" if "+mpi" in self.spec else ""
+ args.append(self.define("EXEC_NAME", exec_file))
return args
def install(self, spec, prefix):
mkdirp(join_path(prefix, "exec"))
- if "+mpi" in spec:
- exec_file = "engine_linux" + self.compiler_name + "_ompi"
- else:
- exec_file = "engine_linux" + self.compiler_name
+ exec_file = f"engine_{self.compiler_name}"
+ exec_file += "_ompi" if "+mpi" in self.spec else ""
install(
join_path(self.stage.source_path, "engine", exec_file),
diff --git a/var/spack/repos/builtin/packages/openradioss-starter/package.py b/var/spack/repos/builtin/packages/openradioss-starter/package.py
index edede265c9..b727c7e5c0 100644
--- a/var/spack/repos/builtin/packages/openradioss-starter/package.py
+++ b/var/spack/repos/builtin/packages/openradioss-starter/package.py
@@ -28,6 +28,10 @@ class OpenradiossStarter(CMakePackage):
maintainers("kjrstory")
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("sp", default=False, description="Using single precision option")
variant("debug", default=False, description="Debug Option")
variant("static_link", default=False, description="Static_link Option")
@@ -53,47 +57,39 @@ class OpenradiossStarter(CMakePackage):
@property
def compiler_name(self):
compiler_mapping = {
- "aocc": "64_AOCC",
- "intel": "64_intel",
- "oneapi": "64_intel",
- "gcc": "64_gf",
- "arm": "a64_gf",
+ "aocc": "linux64_AOCC",
+ "intel": "linux64_intel",
+ "oneapi": "linux64_intel",
+ "gcc": "linux64_gf",
+ "arm": "linuxa64",
}
compiler_name = compiler_mapping[self.spec.compiler.name]
return compiler_name
def cmake_args(self):
args = [
- "-DCMAKE_Fortran_COMPILER={0}".format(spack_fc),
- "-DCMAKE_C_COMPILER={0}".format(spack_cc),
- "-DCMAKE_CPP_COMPILER={0}".format(spack_cxx),
- "-DCMAKE_CXX_COMPILER={0}".format(spack_cxx),
- "-Dsanitize=0",
+ self.define("CMAKE_Fortran_COMPILER", spack_fc),
+ self.define("CMAKE_C_COMPILER", spack_cc),
+ self.define("CMAKE_CPP_COMPILER", spack_cxx),
+ self.define("CMAKE_CXX_COMPILER", spack_cxx),
+ self.define("santize", False),
+ self.define("arch", self.compiler_name),
+ self.define("EXEC_NAME", f"starter_{self.compiler_name}"),
+ self.define_from_variant("debug", "debug"),
+ self.define_from_variant("static_link", "static_link"),
]
- args.append("-Darch=linux" + self.compiler_name)
-
if "+sp" in self.spec:
- args.append("-Dprecision=sp")
- else:
- args.append("-Dprecision=dp")
-
- if "+debug" in self.spec:
- args.append("-Ddebug=1")
- else:
- args.append("-Ddebug=0")
-
- if "+static_link" in self.spec:
- args.append("-Dstatic_link=1")
+ args.append(self.define("precision", "sp"))
else:
- args.append("-Dstatic_link=0")
+ args.append(self.define("precision", "dp"))
return args
def install(self, spec, prefix):
mkdirp(join_path(prefix, "exec"))
- exec_file = "starter_linux" + self.compiler_name
+ exec_file = f"starter_{self.compiler_name}"
install(
join_path(self.stage.source_path, "starter", exec_file),
diff --git a/var/spack/repos/builtin/packages/openrasmol/package.py b/var/spack/repos/builtin/packages/openrasmol/package.py
index b7064e810b..f66dd35241 100644
--- a/var/spack/repos/builtin/packages/openrasmol/package.py
+++ b/var/spack/repos/builtin/packages/openrasmol/package.py
@@ -17,6 +17,8 @@ class Openrasmol(MakefilePackage):
version("2.7.5.2", sha256="b975e6e69d5c6b161a81f04840945d2f220ac626245c61bcc6c56181b73a5718")
+ depends_on("c", type="build") # generated
+
depends_on("imake", type="build")
depends_on("libxext", type="link")
depends_on("libxi", type="link")
diff --git a/var/spack/repos/builtin/packages/openresty/package.py b/var/spack/repos/builtin/packages/openresty/package.py
index 5c4ca053ee..df9cb91771 100644
--- a/var/spack/repos/builtin/packages/openresty/package.py
+++ b/var/spack/repos/builtin/packages/openresty/package.py
@@ -18,10 +18,14 @@ class Openresty(AutotoolsPackage):
license("BSD-2-Clause")
+ version("1.25.3.1", sha256="32ec1a253a5a13250355a075fe65b7d63ec45c560bbe213350f0992a57cd79df")
version("1.15.8.2", sha256="bf92af41d3ad22880047a8b283fc213d59c7c1b83f8dae82e50d14b64d73ac38")
version("1.15.8.1", sha256="89a1238ca177692d6903c0adbea5bdf2a0b82c383662a73c03ebf5ef9f570842")
version("1.13.6.2", sha256="946e1958273032db43833982e2cec0766154a9b5cb8e67868944113208ff2942")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pcre", type="build")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py
index 68067f6960..ed8cd8af66 100644
--- a/var/spack/repos/builtin/packages/openscenegraph/package.py
+++ b/var/spack/repos/builtin/packages/openscenegraph/package.py
@@ -29,6 +29,9 @@ class Openscenegraph(CMakePackage):
version("3.2.3", sha256="a1ecc6524197024834e1277916922b32f30246cb583e27ed19bf3bf889534362")
version("3.1.5", sha256="dddecf2b33302076712100af59b880e7647bc595a9a7cc99186e98d6e0eaeb5c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Builds a shared version of the library")
variant("apps", default=False, description="Build OpenSceneGraph tools")
variant("dcmtk", default=False, description="Build support for DICOM files using DCMTK")
@@ -55,8 +58,8 @@ class Openscenegraph(CMakePackage):
) # Qt windowing system was moved into separate osgQt project
depends_on("qt@4:", when="@3.2:3.5.4")
depends_on("qt@:4", when="@:3.1")
- depends_on("libxinerama")
- depends_on("libxrandr")
+ depends_on("libxinerama", when="platform=linux")
+ depends_on("libxrandr", when="platform=linux")
depends_on("libpng")
depends_on("jasper")
depends_on("libtiff")
@@ -74,11 +77,19 @@ class Openscenegraph(CMakePackage):
depends_on("poppler+glib", when="+pdf")
depends_on("librsvg", when="+svg")
- depends_on("ffmpeg@:4", when="+ffmpeg")
- depends_on("ffmpeg+avresample", when="^ffmpeg@:4")
- # https://github.com/openscenegraph/OpenSceneGraph/issues/167
- depends_on("ffmpeg@:2", when="@:3.4.0+ffmpeg")
-
+ with when("+ffmpeg"):
+ depends_on("ffmpeg")
+ requires("^ffmpeg +avresample", when="^ffmpeg@:4")
+ # https://github.com/openscenegraph/OpenSceneGraph/issues/167
+ depends_on("ffmpeg@:2", when="@:3.4.0")
+
+ # patch submitted for inclusion in OpenSceneGraph for extending compatibility
+ # with ffmpeg from versions up to 4 to versions 5 & 6
+ patch(
+ "https://github.com/openscenegraph/OpenSceneGraph/commit/759620a3b7b787c960a7e414ba26ab5497817d40.patch?full_index=1",
+ sha256="1e6daf0d15e916b69d62519a0ca4f8a722fe2144cbdab7dd182eaffb141e3c1a",
+ when="@3.6:",
+ )
patch("glibc-jasper.patch", when="@3.4%gcc")
# from gentoo: https://raw.githubusercontent.com/gentoo/gentoo/9523b20c27d12dd72d1fd5ced3ba4995099925a2/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch
patch("openscenegraph-3.6.5-openexr3.patch", when="@3.6:")
diff --git a/var/spack/repos/builtin/packages/openslide/package.py b/var/spack/repos/builtin/packages/openslide/package.py
index e9992484be..8133a6eea2 100644
--- a/var/spack/repos/builtin/packages/openslide/package.py
+++ b/var/spack/repos/builtin/packages/openslide/package.py
@@ -6,22 +6,43 @@
from spack.package import *
-class Openslide(AutotoolsPackage):
+class Openslide(AutotoolsPackage, MesonPackage):
"""OpenSlide reads whole slide image files."""
homepage = "https://openslide.org/"
url = "https://github.com/openslide/openslide/releases/download/v3.4.1/openslide-3.4.1.tar.xz"
+ maintainers("ChristopherChristofi")
+
license("LGPL-2.1-only")
+ version("4.0.0", sha256="cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562")
version("3.4.1", sha256="9938034dba7f48fadc90a2cdf8cfe94c5613b04098d1348a5ff19da95b990564")
+ build_system(
+ conditional("meson", when="@4:"), conditional("autotools", when="@3.4.1"), default="meson"
+ )
+
+ depends_on("c", type="build")
depends_on("pkgconfig", type="build")
- depends_on("openjpeg")
+
+ with when("build_system=meson"):
+ depends_on("meson@0.53:", type="build")
+
+ depends_on("cairo+pdf@1.2:")
+ depends_on("gdk-pixbuf")
depends_on("jpeg")
- depends_on("libtiff")
+ depends_on("libpng")
+ depends_on("libtiff@4.0:")
depends_on("libxml2")
- depends_on("sqlite@3.6:")
- depends_on("glib")
- depends_on("cairo+pdf")
- depends_on("gdk-pixbuf")
+ depends_on("openjpeg@1,2.1:")
+ depends_on("zlib-api")
+
+ with when("@4:"):
+ depends_on("libdicom")
+ depends_on("glib@2.56:")
+ depends_on("sqlite@3.14:")
+
+ with when("@3.4.1"):
+ depends_on("glib@2.16:")
+ depends_on("sqlite@3.6:")
diff --git a/var/spack/repos/builtin/packages/openslp/package.py b/var/spack/repos/builtin/packages/openslp/package.py
index 6e77b75dbf..f930d12723 100644
--- a/var/spack/repos/builtin/packages/openslp/package.py
+++ b/var/spack/repos/builtin/packages/openslp/package.py
@@ -18,6 +18,9 @@ class Openslp(AutotoolsPackage):
version("2.0.0", sha256="9dda45ff52cf8561ca1414ac8b4947ed2d9b43e66aec03478fa0ed37121a5ea2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/openspeedshop-utils/package.py b/var/spack/repos/builtin/packages/openspeedshop-utils/package.py
index 8df48bf495..c77a608fd2 100644
--- a/var/spack/repos/builtin/packages/openspeedshop-utils/package.py
+++ b/var/spack/repos/builtin/packages/openspeedshop-utils/package.py
@@ -38,6 +38,10 @@ class OpenspeedshopUtils(CMakePackage):
version("2.4.2", branch="2.4.2")
version("2.4.1", branch="2.4.1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"runtime", default=False, description="build only the runtime libraries and collectors."
)
@@ -86,7 +90,7 @@ class OpenspeedshopUtils(CMakePackage):
# Dependencies for openspeedshop that are common to all
# the variants of the OpenSpeedShop build
- depends_on("libtool", type="build")
+ depends_on("libtool", type="link") # links against libltdl
depends_on("bison", type="build")
depends_on("flex@2.6.1", type="build")
@@ -236,26 +240,19 @@ class OpenspeedshopUtils(CMakePackage):
# Appends to cmake_options the options that will enable
# the appropriate base level options to the openspeedshop
# cmake build.
- python_exe = spec["python"].command.path
- python_library = spec["python"].libs[0]
- python_include = spec["python"].headers.directories[0]
-
- base_options = []
-
- base_options.append("-DBINUTILS_DIR=%s" % spec["binutils"].prefix)
- base_options.append("-DLIBELF_DIR=%s" % spec["elfutils"].prefix)
- base_options.append("-DLIBDWARF_DIR=%s" % spec["libdwarf"].prefix)
- base_options.append("-DPYTHON_EXECUTABLE=%s" % python_exe)
- base_options.append("-DPYTHON_INCLUDE_DIR=%s" % python_include)
- base_options.append("-DPYTHON_LIBRARY=%s" % python_library)
- base_options.append("-DBoost_NO_SYSTEM_PATHS=TRUE")
- base_options.append("-DBoost_NO_BOOST_CMAKE=TRUE")
- base_options.append("-DBOOST_ROOT=%s" % spec["boost"].prefix)
- base_options.append("-DBoost_DIR=%s" % spec["boost"].prefix)
- base_options.append("-DBOOST_LIBRARYDIR=%s" % spec["boost"].prefix.lib)
- base_options.append("-DDYNINST_DIR=%s" % spec["dyninst"].prefix)
-
- cmake_options.extend(base_options)
+ cmake_options.extend(
+ [
+ self.define("BINUTILS_DIR", spec["binutils"].prefix),
+ self.define("LIBELF_DIR", spec["elfutils"].prefix),
+ self.define("LIBDWARF_DIR", spec["libdwarf"].prefix),
+ self.define("Boost_NO_SYSTEM_PATHS", True),
+ self.define("Boost_NO_BOOST_CMAKE", True),
+ self.define("BOOST_ROOT", spec["boost"].prefix),
+ self.define("Boost_DIR", spec["boost"].prefix),
+ self.define("BOOST_LIBRARYDIR", spec["boost"].prefix.lib),
+ self.define("DYNINST_DIR", spec["dyninst"].prefix),
+ ]
+ )
def set_mpi_cmake_options(self, spec, cmake_options):
# Appends to cmake_options the options that will enable
diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py
index 101cf783b6..6dddc60f97 100644
--- a/var/spack/repos/builtin/packages/openspeedshop/package.py
+++ b/var/spack/repos/builtin/packages/openspeedshop/package.py
@@ -35,6 +35,10 @@ class Openspeedshop(CMakePackage):
version("2.4.2", branch="2.4.2")
version("2.4.1", branch="2.4.1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"runtime", default=False, description="build only the runtime libraries and collectors."
)
@@ -90,7 +94,7 @@ class Openspeedshop(CMakePackage):
# Dependencies for openspeedshop that are common to all
# the variants of the OpenSpeedShop build
- depends_on("libtool", type="build")
+ depends_on("libtool", type="link") # links against libltdl
depends_on("bison", type="build")
depends_on("flex@2.6.1", type="build")
@@ -254,27 +258,19 @@ class Openspeedshop(CMakePackage):
# Appends to cmake_options the options that will enable
# the appropriate base level options to the openspeedshop
# cmake build.
- python_exe = spec["python"].command.path
- python_library = spec["python"].libs[0]
- python_include = spec["python"].headers.directories[0]
- true_value = "TRUE"
-
- base_options = []
-
- base_options.append("-DBINUTILS_DIR=%s" % spec["binutils"].prefix)
- base_options.append("-DLIBELF_DIR=%s" % spec["elfutils"].prefix)
- base_options.append("-DLIBDWARF_DIR=%s" % spec["libdwarf"].prefix)
- base_options.append("-DPYTHON_EXECUTABLE=%s" % python_exe)
- base_options.append("-DPYTHON_INCLUDE_DIR=%s" % python_include)
- base_options.append("-DPYTHON_LIBRARY=%s" % python_library)
- base_options.append("-DBoost_NO_SYSTEM_PATHS=%s" % true_value)
- base_options.append("-DBoost_NO_BOOST_CMAKE=%s" % true_value)
- base_options.append("-DBOOST_ROOT=%s" % spec["boost"].prefix)
- base_options.append("-DBoost_DIR=%s" % spec["boost"].prefix)
- base_options.append("-DBOOST_LIBRARYDIR=%s" % spec["boost"].prefix.lib)
- base_options.append("-DDYNINST_DIR=%s" % spec["dyninst"].prefix)
-
- cmake_options.extend(base_options)
+ cmake_options.extend(
+ [
+ self.define("BINUTILS_DIR", spec["binutils"].prefix),
+ self.define("LIBELF_DIR", spec["elfutils"].prefix),
+ self.define("LIBDWARF_DIR", spec["libdwarf"].prefix),
+ self.define("Boost_NO_SYSTEM_PATHS", True),
+ self.define("Boost_NO_BOOST_CMAKE", True),
+ self.define("BOOST_ROOT", spec["boost"].prefix),
+ self.define("Boost_DIR", spec["boost"].prefix),
+ self.define("BOOST_LIBRARYDIR", spec["boost"].prefix.lib),
+ self.define("DYNINST_DIR", spec["dyninst"].prefix),
+ ]
+ )
def set_mpi_cmake_options(self, spec, cmake_options):
# Appends to cmake_options the options that will enable
diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py
index 970a8da703..a31bbf46fb 100755
--- a/var/spack/repos/builtin/packages/openssh/package.py
+++ b/var/spack/repos/builtin/packages/openssh/package.py
@@ -25,32 +25,41 @@ class Openssh(AutotoolsPackage):
license("SSH-OpenSSH")
+ version("9.9p1", sha256="b343fbcdbff87f15b1986e6e15d6d4fc9a7d36066be6b7fb507087ba8f966c02")
+ version("9.8p1", sha256="dd8bd002a379b5d499dfb050dd1fa9af8029e80461f4bb6c523c49973f5a39f3")
+ version("9.7p1", sha256="490426f766d82a2763fcacd8d83ea3d70798750c7bd2aff2e57dc5660f773ffd")
+ version("9.6p1", sha256="910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c")
version("9.5p1", sha256="f026e7b79ba7fb540f75182af96dc8a8f1db395f922bbc9f6ca603672686086b")
version("9.4p1", sha256="3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85")
version("9.3p1", sha256="e9baba7701a76a51f3d85a62c383a3c9dcd97fa900b859bc7db114c1868af8a8")
- version("9.2p1", sha256="3f66dbf1655fb45f50e1c56da62ab01218c228807b21338d634ebcdf9d71cf46")
- version("9.1p1", sha256="19f85009c7e3e23787f0236fbb1578392ab4d4bf9f8ec5fe6bc1cd7e8bfdd288")
- version("9.0p1", sha256="03974302161e9ecce32153cfa10012f1e65c8f3750f573a73ab1befd5972a28a")
- version("8.9p1", sha256="fd497654b7ab1686dac672fb83dfb4ba4096e8b5ffcdaccd262380ae58bec5e7")
- version("8.8p1", sha256="4590890ea9bb9ace4f71ae331785a3a5823232435161960ed5fc86588f331fe9")
- version("8.7p1", sha256="7ca34b8bb24ae9e50f33792b7091b3841d7e1b440ff57bc9fabddf01e2ed1e24")
- version("8.6p1", sha256="c3e6e4da1621762c850d03b47eed1e48dff4cc9608ddeb547202a234df8ed7ae")
- version("8.5p1", sha256="f52f3f41d429aa9918e38cf200af225ccdd8e66f052da572870c89737646ec25")
- version("8.4p1", sha256="5a01d22e407eb1c05ba8a8f7c654d388a13e9f226e4ed33bd38748dafa1d2b24")
- version("8.3p1", sha256="f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2")
- version("8.1p1", sha256="02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff")
- version("7.9p1", sha256="6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad")
- version("7.6p1", sha256="a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723")
- version("7.5p1", sha256="9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0")
- version("7.4p1", sha256="1b1fc4a14e2024293181924ed24872e6f2e06293f3e8926a376b8aec481f19d1")
- version("7.3p1", sha256="3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc")
- version("7.2p2", sha256="a72781d1a043876a224ff1b0032daa4094d87565a68528759c1c2cab5482548c")
- version("7.1p2", sha256="dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd")
- version("7.0p1", sha256="fd5932493a19f4c81153d812ee4e042b49bbd3b759ab3d9344abecc2bc1485e5")
- version("6.9p1", sha256="6e074df538f357d440be6cf93dc581a21f22d39e236f217fcd8eacbb6c896cfe")
- version("6.8p1", sha256="3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e")
- version("6.7p1", sha256="b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507")
- version("6.6p1", sha256="48c1f0664b4534875038004cc4f3555b8329c2a81c1df48db5c517800de203bb")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-38408
+ version("9.2p1", sha256="3f66dbf1655fb45f50e1c56da62ab01218c228807b21338d634ebcdf9d71cf46")
+ version("9.1p1", sha256="19f85009c7e3e23787f0236fbb1578392ab4d4bf9f8ec5fe6bc1cd7e8bfdd288")
+ version("9.0p1", sha256="03974302161e9ecce32153cfa10012f1e65c8f3750f573a73ab1befd5972a28a")
+ version("8.9p1", sha256="fd497654b7ab1686dac672fb83dfb4ba4096e8b5ffcdaccd262380ae58bec5e7")
+ version("8.8p1", sha256="4590890ea9bb9ace4f71ae331785a3a5823232435161960ed5fc86588f331fe9")
+ version("8.7p1", sha256="7ca34b8bb24ae9e50f33792b7091b3841d7e1b440ff57bc9fabddf01e2ed1e24")
+ version("8.6p1", sha256="c3e6e4da1621762c850d03b47eed1e48dff4cc9608ddeb547202a234df8ed7ae")
+ version("8.5p1", sha256="f52f3f41d429aa9918e38cf200af225ccdd8e66f052da572870c89737646ec25")
+ version("8.4p1", sha256="5a01d22e407eb1c05ba8a8f7c654d388a13e9f226e4ed33bd38748dafa1d2b24")
+ version("8.3p1", sha256="f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2")
+ version("8.1p1", sha256="02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff")
+ version("7.9p1", sha256="6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad")
+ version("7.6p1", sha256="a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723")
+ version("7.5p1", sha256="9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0")
+ version("7.4p1", sha256="1b1fc4a14e2024293181924ed24872e6f2e06293f3e8926a376b8aec481f19d1")
+ version("7.3p1", sha256="3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc")
+ version("7.2p2", sha256="a72781d1a043876a224ff1b0032daa4094d87565a68528759c1c2cab5482548c")
+ version("7.1p2", sha256="dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd")
+ version("7.0p1", sha256="fd5932493a19f4c81153d812ee4e042b49bbd3b759ab3d9344abecc2bc1485e5")
+ version("6.9p1", sha256="6e074df538f357d440be6cf93dc581a21f22d39e236f217fcd8eacbb6c896cfe")
+ version("6.8p1", sha256="3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e")
+ version("6.7p1", sha256="b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507")
+ version("6.6p1", sha256="48c1f0664b4534875038004cc4f3555b8329c2a81c1df48db5c517800de203bb")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant(
"gssapi", default=True, description="Enable authentication via Kerberos through GSSAPI"
@@ -91,7 +100,13 @@ class Openssh(AutotoolsPackage):
patch(
"https://raw.githubusercontent.com/Homebrew/patches/d8b2d8c2612fd251ac6de17bf0cc5174c3aab94c/openssh/patch-sshd.c-apple-sandbox-named-external.diff",
sha256="3505c58bf1e584c8af92d916fe5f3f1899a6b15cc64a00ddece1dc0874b2f78f",
- when="platform=darwin",
+ when="@:9.7p1 platform=darwin",
+ )
+ # same as above, but against sshd-session.c instead of sshd.c
+ patch(
+ "https://raw.githubusercontent.com/Homebrew/patches/aa6c71920318f97370d74f2303d6aea387fb68e4/openssh/patch-sshd.c-apple-sandbox-named-external.diff",
+ sha256="3f06fc03bcbbf3e6ba6360ef93edd2301f73efcd8069e516245aea7c4fb21279",
+ when="@9.8p1: platform=darwin",
)
@classmethod
@@ -106,9 +121,13 @@ class Openssh(AutotoolsPackage):
# #39599: fix configure to parse zlib 1.3's version number to prevent build fail
filter_file(r"if \(n != 3 && n != 4\)", "if (n < 2)", "configure")
- # https://github.com/Homebrew/homebrew-core/blob/7aabdeb30506be9b01708793ae553502c115dfc8/Formula/o/openssh.rb#L71-L77
- if self.spec.target.family == "x86_64" and self.spec.platform == "darwin":
- filter_file(r"-fzero-call-used-regs=all", "-fzero-call-used-regs=used", "configure")
+ # Clang-based compilers (known at least 14-17) may randomly mis-compile
+ # openssh according to this thread even when -fzero-call-used-regs=used:
+ # https://www.mail-archive.com/openssh-bugs@mindrot.org/msg17461.html
+ # Therefore, remove -fzero-call-used-regs=all for these compilers:
+ spec = self.spec
+ if spec.version < Version("9.6p1") and self.compiler.name.endswith(("clang", "oneapi")):
+ filter_file("-fzero-call-used-regs=all", "", "configure")
def configure_args(self):
# OpenSSH's privilege separation path defaults to /var/empty. At
diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py
index d98b4ac25e..cf0e5544fb 100644
--- a/var/spack/repos/builtin/packages/openssl/package.py
+++ b/var/spack/repos/builtin/packages/openssl/package.py
@@ -12,15 +12,13 @@ from spack.package import *
class Openssl(Package): # Uses Fake Autotools, should subclass Package
- """OpenSSL is an open source project that provides a robust,
- commercial-grade, and full-featured toolkit for the Transport
- Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.
- It is also a general-purpose cryptography library."""
+ """OpenSSL is an open source project that provides a robust, commercial-grade, and
+ full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL)
+ protocols. It is also a general-purpose cryptography library."""
homepage = "https://www.openssl.org"
- # URL must remain http:// so Spack can bootstrap curl
- url = "http://www.openssl.org/source/openssl-1.1.1d.tar.gz"
+ url = "https://www.openssl.org/source/openssl-1.1.1d.tar.gz"
list_url = "https://www.openssl.org/source/old/"
list_depth = 1
@@ -32,329 +30,65 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
license("Apache-2.0")
- version("3.1.3", sha256="f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6")
- version("3.0.11", sha256="b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55")
+ version("3.4.0", sha256="e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf")
+ version("3.3.2", sha256="2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281")
+ version("3.2.3", sha256="52b5f1c6b8022bc5868c308c54fb77705e702d6c6f4594f99a0df216acf46239")
+ version("3.1.7", sha256="053a31fa80cf4aebe1068c987d2ef1e44ce418881427c4464751ae800c31d06c")
+ version("3.0.15", sha256="23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533")
version(
- "3.1.2",
- sha256="a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539",
+ "3.3.1",
+ sha256="777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e",
deprecated=True,
)
version(
- "3.1.1",
- sha256="b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674",
+ "3.3.0",
+ sha256="53e66b043322a606abf0087e7699a0e033a37fa13feb9742df35c3a33b18fb02",
deprecated=True,
)
version(
- "3.1.0",
- sha256="aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4",
+ "3.2.2",
+ sha256="197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7",
deprecated=True,
)
version(
- "3.0.10",
- sha256="1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323",
+ "3.2.1",
+ sha256="83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39",
deprecated=True,
)
version(
- "3.0.9",
- sha256="eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90",
+ "3.1.6",
+ sha256="5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7",
deprecated=True,
)
version(
- "3.0.8",
- sha256="6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e",
+ "3.1.5",
+ sha256="6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262",
deprecated=True,
)
version(
- "3.0.7",
- sha256="83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e",
+ "3.0.14",
+ sha256="eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca",
deprecated=True,
)
version(
- "3.0.5",
- sha256="aa7d8d9bef71ad6525c55ba11e5f4397889ce49c2c9349dcea6d3e4f0b024a7a",
- deprecated=True,
- )
- version(
- "3.0.4",
- sha256="2831843e9a668a0ab478e7020ad63d2d65e51f72977472dc73efcefbafc0c00f",
- deprecated=True,
- )
- version(
- "3.0.2",
- sha256="98e91ccead4d4756ae3c9cde5e09191a8e586d9f4d50838e7ec09d6411dfdb63",
- deprecated=True,
- )
- version(
- "3.0.1",
- sha256="c311ad853353bce796edad01a862c50a8a587f62e7e2100ef465ab53ec9b06d1",
- deprecated=True,
- )
- version(
- "3.0.0",
- sha256="59eedfcb46c25214c9bd37ed6078297b4df01d012267fe9e9eee31f61bc70536",
+ "3.0.13",
+ sha256="88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313",
deprecated=True,
)
+
version(
"1.1.1w",
sha256="cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8",
deprecated=True,
)
version(
- "1.1.1v",
- sha256="d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0",
- deprecated=True,
- )
- version(
- "1.1.1u",
- sha256="e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6",
- deprecated=True,
- )
- version(
- "1.1.1t",
- sha256="8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b",
- deprecated=True,
- )
- version(
- "1.1.1s",
- sha256="c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa",
- deprecated=True,
- )
- version(
- "1.1.1q",
- sha256="d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca",
- deprecated=True,
- )
- version(
- "1.1.1p",
- sha256="bf61b62aaa66c7c7639942a94de4c9ae8280c08f17d4eac2e44644d9fc8ace6f",
- deprecated=True,
- )
- version(
- "1.1.1o",
- sha256="9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f",
- deprecated=True,
- )
- version(
- "1.1.1n",
- sha256="40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a",
- deprecated=True,
- )
- version(
- "1.1.1m",
- sha256="f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96",
- deprecated=True,
- )
- version(
- "1.1.1l",
- sha256="0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1",
- deprecated=True,
- )
- version(
- "1.1.1k",
- sha256="892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5",
- deprecated=True,
- )
- version(
- "1.1.1j",
- sha256="aaf2fcb575cdf6491b98ab4829abf78a3dec8402b8b81efc8f23c00d443981bf",
- deprecated=True,
- )
- version(
- "1.1.1i",
- sha256="e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242",
- deprecated=True,
- )
- version(
- "1.1.1h",
- sha256="5c9ca8774bd7b03e5784f26ae9e9e6d749c9da2438545077e6b3d755a06595d9",
- deprecated=True,
- )
- version(
- "1.1.1g",
- sha256="ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46",
- deprecated=True,
- )
- version(
- "1.1.1f",
- sha256="186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35",
- deprecated=True,
- )
- version(
- "1.1.1e",
- sha256="694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe",
- deprecated=True,
- )
- version(
- "1.1.1d",
- sha256="1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2",
- deprecated=True,
- )
- version(
- "1.1.1c",
- sha256="f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90",
- deprecated=True,
- )
- version(
- "1.1.1b",
- sha256="5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b",
- deprecated=True,
- )
- version(
- "1.1.1a",
- sha256="fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41",
- deprecated=True,
- )
- version(
- "1.1.1",
- sha256="2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d",
- deprecated=True,
- )
- version(
- "1.1.0l",
- sha256="74a2f756c64fd7386a29184dc0344f4831192d61dc2481a93a4c5dd727f41148",
- deprecated=True,
- )
- version(
- "1.1.0k",
- sha256="efa4965f4f773574d6cbda1cf874dbbe455ab1c0d4f906115f867d30444470b1",
- deprecated=True,
- )
- version(
- "1.1.0j",
- sha256="31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246",
- deprecated=True,
- )
- version(
- "1.1.0i",
- sha256="ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99",
- deprecated=True,
- )
- version(
- "1.1.0g",
- sha256="de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af",
- deprecated=True,
- )
- version(
- "1.1.0e",
- sha256="57be8618979d80c910728cfc99369bf97b2a1abd8f366ab6ebdee8975ad3874c",
- deprecated=True,
- )
- version(
- "1.1.0d",
- sha256="7d5ebb9e89756545c156ff9c13cf2aa6214193b010a468a3bc789c3c28fe60df",
- deprecated=True,
- )
- version(
- "1.1.0c",
- sha256="fc436441a2e05752d31b4e46115eb89709a28aef96d4fe786abe92409b2fd6f5",
- deprecated=True,
- )
- version(
"1.0.2u",
sha256="ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16",
deprecated=True,
)
- version(
- "1.0.2t",
- sha256="14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc",
- deprecated=True,
- )
- version(
- "1.0.2s",
- sha256="cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96",
- deprecated=True,
- )
- version(
- "1.0.2r",
- sha256="ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6",
- deprecated=True,
- )
- version(
- "1.0.2p",
- sha256="50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00",
- deprecated=True,
- )
- version(
- "1.0.2o",
- sha256="ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d",
- deprecated=True,
- )
- version(
- "1.0.2n",
- sha256="370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe",
- deprecated=True,
- )
- version(
- "1.0.2m",
- sha256="8c6ff15ec6b319b50788f42c7abc2890c08ba5a1cdcd3810eb9092deada37b0f",
- deprecated=True,
- )
- version(
- "1.0.2k",
- sha256="6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0",
- deprecated=True,
- )
- version(
- "1.0.2j",
- sha256="e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431",
- deprecated=True,
- )
- version(
- "1.0.2i",
- sha256="9287487d11c9545b6efb287cdb70535d4e9b284dd10d51441d9b9963d000de6f",
- deprecated=True,
- )
- version(
- "1.0.2h",
- sha256="1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919",
- deprecated=True,
- )
- version(
- "1.0.2g",
- sha256="b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33",
- deprecated=True,
- )
- version(
- "1.0.2f",
- sha256="932b4ee4def2b434f85435d9e3e19ca8ba99ce9a065a61524b429a9d5e9b2e9c",
- deprecated=True,
- )
- version(
- "1.0.2e",
- sha256="e23ccafdb75cfcde782da0151731aa2185195ac745eea3846133f2e05c0e0bff",
- deprecated=True,
- )
- version(
- "1.0.2d",
- sha256="671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8",
- deprecated=True,
- )
- version(
- "1.0.1u",
- sha256="4312b4ca1215b6f2c97007503d80db80d5157f76f8f7d3febbe6b4c56ff26739",
- deprecated=True,
- )
- version(
- "1.0.1t",
- sha256="4a6ee491a2fdb22e519c76fdc2a628bb3cec12762cd456861d207996c8a07088",
- deprecated=True,
- )
- version(
- "1.0.1r",
- sha256="784bd8d355ed01ce98b812f873f8b2313da61df7c7b5677fcf2e57b0863a3346",
- deprecated=True,
- )
- version(
- "1.0.1h",
- sha256="9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093",
- deprecated=True,
- )
- version(
- "1.0.1e",
- sha256="f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3",
- deprecated=True,
- )
+
+ depends_on("c", type="build") # generated
# On Cray DVS mounts, we can't make symlinks to /etc/ssl/openssl.cnf,
# either due to a bug or because DVS is not intended to be POSIX compliant.
@@ -365,12 +99,10 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
values=("mozilla", "system", "none"),
multi=False,
description=(
- "Use certificates from the ca-certificates-mozilla "
- "package, symlink system certificates, or use none, "
- "respectively. The default is `mozilla`, since it is "
- "system agnostic. Instead of picking certs=system, "
- "one can mark openssl as an external package, to "
- "avoid compiling openssl entirely."
+ "Use certificates from the ca-certificates-mozilla package, symlink system "
+ "certificates, or use none, respectively. The default is `mozilla`, since it is "
+ "system agnostic. Instead of picking certs=system, one can mark openssl as an "
+ "external package, to avoid compiling openssl entirely."
),
)
variant("docs", default=False, description="Install docs and manpages")
@@ -384,15 +116,8 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
depends_on("nasm", when="platform=windows")
depends_on("gmake", type="build", when="platform=linux")
- depends_on("gmake", type="build", when="platform=cray")
depends_on("gmake", type="build", when="platform=darwin")
- patch(
- "https://github.com/openssl/openssl/commit/f9e578e720bb35228948564192adbe3bc503d5fb.patch?full_index=1",
- sha256="3fdcf2d1e47c34f3a012f23306322c5a35cad55b180c9b6fb34537b55884645c",
- when="@1.1.1q",
- )
-
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("version", output=str, error=str)
@@ -406,6 +131,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
root=self.prefix,
recursive=True,
shared=self.spec.variants["shared"].value,
+ runtime=False,
)
def handle_fetch_error(self, error):
@@ -454,9 +180,11 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
"--openssldir=%s" % join_path(prefix, "etc", "openssl"),
]
if spec.satisfies("platform=windows"):
- base_args.extend(
- ['CC="%s"' % os.environ.get("CC"), 'CXX="%s"' % os.environ.get("CXX"), "VC-WIN64A"]
- )
+ if spec.satisfies("@:1"):
+ base_args.extend([f'CC="{self.compiler.cc}"', f'CXX="{self.compiler.cxx}"'])
+ else:
+ base_args.extend([f"CC={self.compiler.cc}", f"CXX={self.compiler.cxx}"])
+ base_args.append("VC-WIN64A")
else:
base_args.extend(
[
diff --git a/var/spack/repos/builtin/packages/opensta/package.py b/var/spack/repos/builtin/packages/opensta/package.py
index 7b6db1c532..6dea137c24 100644
--- a/var/spack/repos/builtin/packages/opensta/package.py
+++ b/var/spack/repos/builtin/packages/opensta/package.py
@@ -28,6 +28,8 @@ class Opensta(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("zlib", default=True, description="build with zlib support")
variant("cudd", default=True, description="build with cudd support")
diff --git a/var/spack/repos/builtin/packages/opensubdiv/package.py b/var/spack/repos/builtin/packages/opensubdiv/package.py
index 9fcec75e07..b526ef9a1e 100644
--- a/var/spack/repos/builtin/packages/opensubdiv/package.py
+++ b/var/spack/repos/builtin/packages/opensubdiv/package.py
@@ -21,9 +21,13 @@ class Opensubdiv(CMakePackage, CudaPackage):
license("Apache-2.0")
version("develop", branch="dev")
+ version("3.5.1", sha256="42c7c89ffa552f37e9742d1ecfa4bd1d6a2892e01b68fc156775d104154d3d43")
+ version("3.5.0", sha256="8f5044f453b94162755131f77c08069004f25306fd6dc2192b6d49889efb8095")
version("3.4.3", sha256="7b22eb27d636ab0c1e03722c7a5a5bd4f11664ee65c9b48f341a6d0ce7f36745")
version("3.4.0", sha256="d932b292f83371c7518960b2135c7a5b931efb43cdd8720e0b27268a698973e4")
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v{0}.tar.gz"
return url.format(version.underscored)
@@ -37,6 +41,7 @@ class Opensubdiv(CMakePackage, CudaPackage):
depends_on("glfw@3.0.0:")
depends_on("intel-tbb@4.0:", when="+tbb")
depends_on("libxrandr")
+ depends_on("libxxf86vm")
depends_on("libxcursor")
depends_on("libxinerama")
depends_on("llvm-openmp", when="+openmp")
diff --git a/var/spack/repos/builtin/packages/openturns/package.py b/var/spack/repos/builtin/packages/openturns/package.py
index a40462c9cc..3e2d55d93e 100644
--- a/var/spack/repos/builtin/packages/openturns/package.py
+++ b/var/spack/repos/builtin/packages/openturns/package.py
@@ -30,40 +30,58 @@ class Openturns(CMakePackage):
variant("python", default=True, description="Build Python bindings")
variant("libxml2", default=False, description="Use LibXML2 for XML support")
- extends("python", when="+python")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
- depends_on("mpi", type=("build", "run"))
- depends_on("lapack", type=("build", "run"))
depends_on("cmake@2.8:", type="build")
- depends_on("swig", type=("build", "run"))
- depends_on("py-numpy@1.7:", type=("build", "run"))
- depends_on("py-pandas", type=("build", "run"))
- depends_on("py-matplotlib", type=("build", "run"))
- depends_on("boost+system+serialization+thread", type=("build", "run"))
- depends_on("intel-tbb", type=("build", "run"))
- depends_on("py-cloudpickle", type=("build", "run"))
- depends_on("py-urllib3", type=("build", "run"))
- depends_on("libxml2", type=("build", "run"), when="+libxml2")
+ depends_on("bison", type="build")
+ depends_on("flex", type="build")
- def cmake_args(self):
- spec = self.spec
+ depends_on("lapack")
+ depends_on("boost+system+serialization+thread")
+ depends_on("intel-tbb")
+ depends_on("libxml2", when="+libxml2")
+
+ with when("+python"):
+ extends("python")
+ depends_on("swig")
+ depends_on("py-numpy@1.7:", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-cloudpickle", type=("build", "run"))
+ depends_on("py-urllib3", type=("build", "run"))
+ def cmake_args(self):
args = [
- "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
- "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
- "-DCMAKE_INSTALL_LIBDIR:STRING=%s" % self.prefix.lib,
- "-DCMAKE_INSTALL_BINDIR:STRING=%s" % self.prefix.bin,
- "-DLAPACK_LIBRARIES=%s" % spec["lapack"].libs.joined(";"),
+ self.define("USE_BISON", True),
+ self.define("USE_BOOST", True),
+ self.define("USE_FLEX", True),
+ self.define("USE_OPENMP", True),
+ self.define("USE_TBB", True),
+ self.define("LAPACK_LIBRARIES", list(self.spec["lapack"].libs)),
+ self.define_from_variant("USE_LIBXML2", "libxml2"),
+ # disable optional features explicitly
+ self.define("USE_BONMIN", False),
+ self.define("USE_CERES", False),
+ self.define("USE_CMINPACK", False),
+ self.define("USE_CUBA", False),
+ self.define("USE_DLIB", False),
+ self.define("USE_DOXYGEN", False),
+ self.define("USE_HDF5", False),
+ self.define("USE_HMAT", False),
+ self.define("USE_IPOPT", False),
+ self.define("USE_MPC", False),
+ self.define("USE_MPFR", False),
+ self.define("USE_MUPARSER", False),
+ self.define("USE_NANOFLANN", False),
+ self.define("USE_NLOPT", False),
+ self.define("USE_PAGMO", False),
+ self.define("USE_PRIMESIEVE", False),
+ self.define("USE_SPECTRA", False),
+ self.define("USE_SPHINX", False),
]
- if "+python" in spec:
- args.extend(
- [
- # By default picks up the system python not the Spack build
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path),
- # By default installs to the python prefix
- "-DPYTHON_SITE_PACKAGES={0}".format(python_platlib),
- ]
- )
+ if self.spec.satisfies("+python"):
+ args.append(self.define("PYTHON_SITE_PACKAGES", python_platlib))
return args
diff --git a/var/spack/repos/builtin/packages/openvdb/package.py b/var/spack/repos/builtin/packages/openvdb/package.py
index 2b8f952ffb..0ef4cbb354 100644
--- a/var/spack/repos/builtin/packages/openvdb/package.py
+++ b/var/spack/repos/builtin/packages/openvdb/package.py
@@ -10,7 +10,6 @@ from spack.package import *
class Openvdb(CMakePackage):
-
"""OpenVDB - a sparse volume data format."""
homepage = "https://github.com/AcademySoftwareFoundation/openvdb"
@@ -29,6 +28,8 @@ class Openvdb(CMakePackage):
version("8.0.1", sha256="a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f")
version("7.1.0", sha256="0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116")
+ depends_on("cxx", type="build") # generated
+
# these variants were for 8.0.1 and probably could be updated...
variant("shared", default=True, description="Build as a shared library.")
variant("python", default=False, description="Build the pyopenvdb python extension.")
diff --git a/var/spack/repos/builtin/packages/openvkl/package.py b/var/spack/repos/builtin/packages/openvkl/package.py
index 8fee89b37b..165c5b39b2 100644
--- a/var/spack/repos/builtin/packages/openvkl/package.py
+++ b/var/spack/repos/builtin/packages/openvkl/package.py
@@ -14,10 +14,9 @@ class Openvkl(CMakePackage):
url = "https://www.github.com/OpenVKL/openvkl/archive/v1.0.0.tar.gz"
git = "https://www.github.com/OpenVKL/openvkl.git"
- # maintainers("github_user1", "github_user2")
-
license("Apache-2.0")
+ version("2.0.1", sha256="0c7faa9582a93e93767afdb15a6c9c9ba154af7ee83a6b553705797be5f8af62")
version("2.0.0", sha256="469c3fba254c4fcdd84f8a9763d2e1aaa496dc123b5a9d467cc0a561e284c4e6")
version("1.3.2", sha256="7704736566bf17497a3e51c067bd575316895fda96eccc682dae4aac7fb07b28")
version("1.3.1", sha256="c9cefb6c313f2b4c0331e9629931759a6bc204ec00deed6ec0becad1670a1933")
@@ -28,6 +27,9 @@ class Openvkl(CMakePackage):
version("1.0.0", sha256="81ccae679bfa2feefc4d4b1ce72bcd242ba34d2618fbb418a1c2a05d640d16b4")
version("0.13.0", sha256="974608259e3a5d8e29d2dfe81c6b2b1830aadeb9bbdc87127f3a7c8631e9f1bd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("embree@4", when="@1.3.2:")
depends_on("embree@3.13.0:3", when="@:1.3.1")
depends_on("embree@3.13.1:", when="@1.0.0:")
diff --git a/var/spack/repos/builtin/packages/openwsman/package.py b/var/spack/repos/builtin/packages/openwsman/package.py
index c6ec676f38..d9cdb2f80b 100644
--- a/var/spack/repos/builtin/packages/openwsman/package.py
+++ b/var/spack/repos/builtin/packages/openwsman/package.py
@@ -17,6 +17,9 @@ class Openwsman(CMakePackage):
version("2.6.11", sha256="895eaaae62925f9416766ea3e71a5368210e6cfe13b23e4e0422fa0e75c2541c")
version("2.6.10", sha256="d3c624a03d7bc1835544ce1af56efd010f77cbee0c02b34e0755aa9c9b2c317b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Enable python")
extends("python", when="+python")
@@ -31,13 +34,9 @@ class Openwsman(CMakePackage):
def patch(self):
"""Change python install directory."""
if self.spec.satisfies("+python"):
- python_spec = self.spec["python"]
- python_libdir = join_path(
- self.spec.prefix.lib, "python" + str(python_spec.version.up_to(2)), "site-packages"
- )
filter_file(
"DESTINATION .*",
- "DESTINATION {0} )".format(python_libdir),
+ "DESTINATION {0} )".format(python_platlib),
join_path("bindings", "python", "CMakeLists.txt"),
)
@@ -55,7 +54,6 @@ class Openwsman(CMakePackage):
arg.extend([define("BUILD_PYTHON", False), define("BUILD_PYTHON3", True)])
else:
arg.extend([define("BUILD_PYTHON", True), define("BUILD_PYTHON3", False)])
- arg.append(define("PYTHON_EXECUTABLE", spec["python"].command.path))
else:
arg.extend([define("BUILD_PYTHON", False), define("BUILD_PYTHON3", False)])
return arg
diff --git a/var/spack/repos/builtin/packages/ophidia-analytics-framework/package.py b/var/spack/repos/builtin/packages/ophidia-analytics-framework/package.py
index 443ecb3df5..dfc990efbd 100644
--- a/var/spack/repos/builtin/packages/ophidia-analytics-framework/package.py
+++ b/var/spack/repos/builtin/packages/ophidia-analytics-framework/package.py
@@ -18,6 +18,8 @@ class OphidiaAnalyticsFramework(AutotoolsPackage):
sha256="565050b90ce1cefc59136c835a335ca7981fec792df7a1ee9309b24c05b275d6",
deprecated=True,
)
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ophidia-io-server/package.py b/var/spack/repos/builtin/packages/ophidia-io-server/package.py
index c9215b0f6d..1d98f78271 100644
--- a/var/spack/repos/builtin/packages/ophidia-io-server/package.py
+++ b/var/spack/repos/builtin/packages/ophidia-io-server/package.py
@@ -18,6 +18,8 @@ class OphidiaIoServer(AutotoolsPackage):
sha256="8b203c44e0e5497c00f1fdb2322f0b0a41f36900b62a33d95a4570ae1ccc2971",
deprecated=True,
)
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ophidia-primitives/package.py b/var/spack/repos/builtin/packages/ophidia-primitives/package.py
index 5e010251f4..636854421d 100644
--- a/var/spack/repos/builtin/packages/ophidia-primitives/package.py
+++ b/var/spack/repos/builtin/packages/ophidia-primitives/package.py
@@ -14,6 +14,8 @@ class OphidiaPrimitives(AutotoolsPackage):
maintainers("eldoo", "SoniaScard")
version("1.7.1", sha256="efec5248dca8fb766abcd536344eefbe2e970fb551f03454a968e59e2df69116")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/ophidia-server/package.py b/var/spack/repos/builtin/packages/ophidia-server/package.py
index 174e68dafb..c300b2100c 100644
--- a/var/spack/repos/builtin/packages/ophidia-server/package.py
+++ b/var/spack/repos/builtin/packages/ophidia-server/package.py
@@ -14,6 +14,8 @@ class OphidiaServer(AutotoolsPackage):
maintainers("eldoo", "SoniaScard")
version("1.7.4", sha256="30128c99ae089ab766141397ea5098ac930cfe10d09b289ed120f6581d8bb07d")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/opium/package.py b/var/spack/repos/builtin/packages/opium/package.py
index 277acc74de..8f8a59ae3a 100644
--- a/var/spack/repos/builtin/packages/opium/package.py
+++ b/var/spack/repos/builtin/packages/opium/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Opium(AutotoolsPackage):
"""DFT pseudopotential generation project"""
- homepage = "http://opium.sourceforge.net"
+ homepage = "https://opium.sourceforge.net"
url = "https://downloads.sourceforge.net/project/opium/opium/opium-v3.8/opium-v3.8-src.tgz"
license("GPL-2.0-or-later")
@@ -17,6 +17,9 @@ class Opium(AutotoolsPackage):
version("4.1", sha256="e5a102b52601ad037d8a7b3e2dbd295baad23b8c1e4908b9014df2e432c23c60")
version("3.8", sha256="edee6606519330aecaee436ee8cfb0a33788b5677861d59e38aba936e87d5ad3")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("external-lapack", default=False, description="Links to externally installed LAPACK")
depends_on("lapack", when="+external-lapack")
diff --git a/var/spack/repos/builtin/packages/optional-lite/package.py b/var/spack/repos/builtin/packages/optional-lite/package.py
index 33b6c1cd70..b3ed4112cd 100644
--- a/var/spack/repos/builtin/packages/optional-lite/package.py
+++ b/var/spack/repos/builtin/packages/optional-lite/package.py
@@ -19,6 +19,7 @@ class OptionalLite(CMakePackage):
license("BSL-1.0")
+ version("3.6.0", sha256="2be17fcfc764809612282c3e728cabc42afe703b9dc333cc87c48d882fcfc2c2")
version("3.5.0", sha256="6077cee87e2812afd05a273645051e0b55397a25c220295ddc1d6f49d0cf5cc8")
version("3.2.0", sha256="069c92f6404878588be761d609b917a111b0231633a91f7f908288fc77eb24c8")
version("3.1.1", sha256="b61fe644b9f77d7cc1c555b3e40e973b135bf2c0350e5fa67bc6f379d9fc3158")
@@ -29,9 +30,11 @@ class OptionalLite(CMakePackage):
version("2.0.0", sha256="e8d803cbc7be241df41a9ab267b525b7941df09747cd5a7deb55f863bd8a4e8d")
version("1.0.3", sha256="7a2fb0fe20d61d091f6730237add9bab58bc0df1288cb96f3e8a61b859539067")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
return [
- "-DOPTIONAL_LITE_OPT_BUILD_TESTS=%s" % ("ON" if self.run_tests else "OFF"),
+ f"-DOPTIONAL_LITE_OPT_BUILD_TESTS={'ON' if self.run_tests else 'OFF'}",
"-DOPTIONAL_LITE_OPT_BUILD_EXAMPLES=OFF",
]
diff --git a/var/spack/repos/builtin/packages/optipng/for_aarch64.patch b/var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.7.patch
index b58cd4f185..b58cd4f185 100644
--- a/var/spack/repos/builtin/packages/optipng/for_aarch64.patch
+++ b/var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.7.patch
diff --git a/var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.8.patch b/var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.8.patch
new file mode 100644
index 0000000000..9fa2386b3c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/optipng/for_aarch64_0.7.8.patch
@@ -0,0 +1,11 @@
+--- spack-src/configure.bak 2017-12-27 20:57:00.000000000 +0900
++++ spack-src/configure 2020-09-28 17:04:51.030223443 +0900
+@@ -193,7 +193,7 @@
+ if test "$gccish" -ne 0
+ then
+ CC="${CC-$cc}"
+- CFLAGS="${CFLAGS--O2 -Wall -Wextra -Wundef}"
++ CFLAGS="${CFLAGS--O2 -Wall -Wextra -Wundef -DPNG_ARM_NEON_OPT=0}"
+ else
+ CC="${CC-cc}"
+ CFLAGS="${CFLAGS--O}"
diff --git a/var/spack/repos/builtin/packages/optipng/package.py b/var/spack/repos/builtin/packages/optipng/package.py
index ebef46e2ae..9223cce45c 100644
--- a/var/spack/repos/builtin/packages/optipng/package.py
+++ b/var/spack/repos/builtin/packages/optipng/package.py
@@ -14,11 +14,19 @@ class Optipng(AutotoolsPackage, SourceforgePackage):
integrity checks and corrections.
"""
- homepage = "http://optipng.sourceforge.net/"
+ homepage = "https://optipng.sourceforge.net/"
sourceforge_mirror_path = "optipng/optipng-0.7.7.tar.gz"
license("Zlib")
- version("0.7.7", sha256="4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452")
+ version("0.7.8", sha256="25a3bd68481f21502ccaa0f4c13f84dcf6b20338e4c4e8c51f2cefbd8513398c")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-43907
+ version("0.7.7", sha256="4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# See https://github.com/imagemin/optipng-bin/issues/97
- patch("for_aarch64.patch", when="target=aarch64:")
+ patch("for_aarch64_0.7.7.patch", when="@0.7.7")
+ patch("for_aarch64_0.7.8.patch", when="@0.7.8:")
diff --git a/var/spack/repos/builtin/packages/opus/package.py b/var/spack/repos/builtin/packages/opus/package.py
index 211fd6b7cf..4cfc0b897b 100644
--- a/var/spack/repos/builtin/packages/opus/package.py
+++ b/var/spack/repos/builtin/packages/opus/package.py
@@ -14,7 +14,15 @@ class Opus(AutotoolsPackage):
license("BSD-3-Clause")
+ version("1.5.2", sha256="65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1")
+ version("1.5.1", sha256="b84610959b8d417b611aa12a22565e0a3732097c6389d19098d844543e340f85")
+ version("1.5", sha256="d8230bbeb99e6d558645aaad25d79de8f4f28fdcc55f8af230050586d62c4f2c")
+ version("1.4", sha256="c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f")
version("1.3.1", sha256="65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d")
+ version("1.3", sha256="4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550")
+ version("1.2.1", sha256="cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732")
+ version("1.2", sha256="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9")
+ version("1.1.5", sha256="eb84981ca0f40a3e5d5e58d2e8582cb2fee05a022825a6dfe14d14b04eb563e4")
version("1.1.4", sha256="9122b6b380081dd2665189f97bfd777f04f92dc3ab6698eea1dbb27ad59d8692")
version("1.1.3", sha256="58b6fe802e7e30182e95d0cde890c0ace40b6f125cffc50635f0ad2eef69b633")
version("1.1.2", sha256="0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd")
@@ -36,4 +44,4 @@ class Opus(AutotoolsPackage):
version("0.9.1", sha256="206221afc47b87496588013bd4523e1e9f556336c0813f4372773fc536dd4293")
version("0.9.0", sha256="b2f75c4ac5ab837845eb028413fae2a28754bfb0a6d76416e2af1441ef447649")
- depends_on("libvorbis")
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/or-tools/package.py b/var/spack/repos/builtin/packages/or-tools/package.py
index 922b849d44..138d8d7cea 100644
--- a/var/spack/repos/builtin/packages/or-tools/package.py
+++ b/var/spack/repos/builtin/packages/or-tools/package.py
@@ -19,6 +19,8 @@ class OrTools(CMakePackage):
license("Apache-2.0")
version("7.8", sha256="d93a9502b18af51902abd130ff5f23768fcf47e266e6d1f34b3586387aa2de68")
+
+ depends_on("cxx", type="build") # generated
variant("coin", default=False, description="Enable COIN-OR solvers.")
depends_on("cmake@3.14:", type="build")
depends_on("gflags@2.2.2:")
diff --git a/var/spack/repos/builtin/packages/orbit2/package.py b/var/spack/repos/builtin/packages/orbit2/package.py
index 597e229a08..a911b64a67 100644
--- a/var/spack/repos/builtin/packages/orbit2/package.py
+++ b/var/spack/repos/builtin/packages/orbit2/package.py
@@ -17,6 +17,8 @@ class Orbit2(AutotoolsPackage):
version("2.14.19", sha256="55c900a905482992730f575f3eef34d50bda717c197c97c08fa5a6eafd857550")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("glib")
depends_on("libidl")
diff --git a/var/spack/repos/builtin/packages/orc/package.py b/var/spack/repos/builtin/packages/orc/package.py
index 4229796dfc..1c3487cb1a 100644
--- a/var/spack/repos/builtin/packages/orc/package.py
+++ b/var/spack/repos/builtin/packages/orc/package.py
@@ -7,8 +7,7 @@ from spack.package import *
class Orc(CMakePackage):
- """the smallest, fastest columnar storage for Hadoop
- workloads."""
+ """The smallest, fastest columnar storage for Hadoop workloads."""
homepage = "https://orc.apache.org/"
url = "https://github.com/apache/orc/archive/rel/release-1.6.5.tar.gz"
@@ -17,10 +16,12 @@ class Orc(CMakePackage):
version("1.6.5", sha256="df5885db8fa2e4435db8d486c6c7fc4e2c565d6197eee27729cf9cbdf36353c0")
+ depends_on("cxx", type="build") # generated
+
depends_on("maven")
depends_on("openssl")
depends_on("zlib-api")
- depends_on("zlib@1.2.11:", when="^zlib")
+ depends_on("zlib@1.2.11:", when="^[virtuals=zlib-api] zlib")
depends_on("pcre")
depends_on("protobuf@3.5.1:")
depends_on("zstd@1.4.5:")
diff --git a/var/spack/repos/builtin/packages/orca-faccts/package.py b/var/spack/repos/builtin/packages/orca-faccts/package.py
new file mode 100644
index 0000000000..92815f3a09
--- /dev/null
+++ b/var/spack/repos/builtin/packages/orca-faccts/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2023 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.package import *
+
+
+class OrcaFaccts(Package):
+ """An ab initio, DFT and semiempirical SCF-MO package
+
+ Note: Orca is licensed software. You will need to create an account
+ on the Orca homepage and download Orca yourself. Spack will search
+ your current directory for the download file. Alternatively, add this
+ file to a mirror so that Spack can find it. For instructions on how to
+ set up a mirror, see https://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://faccts.de"
+ url = "file://{0}/orca-5.0.4-f.1_linux_x86-64_openmpi41.tar.xz".format(os.getcwd())
+ manual_download = True
+
+ version(
+ "5.0.4.1",
+ sha256="256b446fca33ce637a87ee6f22951ae1bc167fbc6ee5cef033bbe0979279dbad",
+ url="file://{0}/orca-5.0.4-f.1_linux_x86-64_openmpi41.tar.xz".format(os.getcwd()),
+ )
+ version(
+ "5.0.3.4",
+ sha256="c53feb9d0f2ae998a79d7cfe91726598e38304bd86e80c772dfda011125d5b99",
+ url="file://{0}/orca-5.0.3-f.4_linux_x86-64_openmpi41.tar.xz".format(os.getcwd()),
+ )
+ version(
+ "5.0.3.1",
+ sha256="dea377459d61ef7d7e822e366420197ee2a4864991dfcdc4ea1a683f9be26c7f",
+ url="file://{0}/orca-5.0.3-f.1_linux_x86-64_openmpi41.tar.xz".format(os.getcwd()),
+ )
+
+ depends_on("libevent", type="run")
+ depends_on("libpciaccess", type="run")
+
+ # Map Orca version with the required OpenMPI version
+ openmpi_versions = {"5.0.3.1:5.0.4.1": "4.1.0:4.1.5"}
+ for orca_version, openmpi_version in openmpi_versions.items():
+ depends_on(
+ "openmpi@{0}".format(openmpi_version), type="run", when="@{0}".format(orca_version)
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+
+ install_tree("bin", prefix.bin)
+ install_tree("lib", prefix.lib)
+
+ def setup_run_environment(self, env):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libevent"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libpciaccess"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["openmpi"].prefix.lib)
diff --git a/var/spack/repos/builtin/packages/orca/package.py b/var/spack/repos/builtin/packages/orca/package.py
index 27d31a1bbb..80e3463703 100644
--- a/var/spack/repos/builtin/packages/orca/package.py
+++ b/var/spack/repos/builtin/packages/orca/package.py
@@ -18,49 +18,38 @@ class Orca(Package):
set up a mirror, see https://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://cec.mpg.de"
- url = "file://{0}/orca_4_0_1_2_linux_x86-64_openmpi202.tar.zst".format(os.getcwd())
maintainers("snehring")
manual_download = True
license("LGPL-2.1-or-later")
version(
- "5.0.3-f.1",
- sha256="dea377459d61ef7d7e822e366420197ee2a4864991dfcdc4ea1a683f9be26c7f",
- url="file://{0}/orca-5.0.3-f.1_linux_x86-64_shared_openmpi41.tar.xz".format(os.getcwd()),
+ "avx2-6.0.1", sha256="f31f98256a0c6727b6ddfe50aa3ac64c45549981138d670a57e90114b4b9c9d2"
)
+ version("6.0.1", sha256="5e9b49588375e0ce5bc32767127cc725f5425917804042cdecdfd5c6b965ef61")
version(
- "5.0.3",
- sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043",
- url="file://{0}/orca_5_0_3_linux_x86-64_shared_openmpi411.tar.xz".format(os.getcwd()),
- )
- version(
- "4.2.1",
- sha256="9bbb3bfdca8220b417ee898b27b2885508d8c82799adfa63dde9e72eab49a6b2",
- expand=False,
- )
- version(
- "4.2.0",
- sha256="55a5ca5aaad03396ac5ada2f14b61ffa735fdc2d98355e272465e07a6749d399",
- expand=False,
- )
- version(
- "4.0.1.2",
- sha256="cea442aa99ec0d7ffde65014932196b62343f7a6191b4bfc438bfb38c03942f7",
- expand=False,
+ "avx2-6.0.0", sha256="02c21294efe7b1b721e26cb90f98ee15ad682d02807201b7d217dfe67905a2fd"
)
+ version("6.0.0", sha256="219bd1deb6d64a63cb72471926cb81665cbbcdec19f9c9549761be67d49a29c6")
+ version("5.0.4", sha256="c4ea5aea60da7bcb18a6b7042609206fbeb2a765c6fa958c5689d450b588b036")
+ version("5.0.3", sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043")
+ version("4.2.1", sha256="a84b6d2706f0ddb2f3750951864502a5c49d081836b00164448b1d81c577f51a")
+ version("4.2.0", sha256="01096466e41a5232e5a18af7400e48c02a6e489f0d5d668a90cdd2746e8e22e2")
- depends_on("zstd", when="@:4.2.1", type="build")
depends_on("libevent", type="run")
depends_on("libpciaccess", type="run")
# Map Orca version with the required OpenMPI version
+ # OpenMPI@4.1.1 has issues in pmix environments, hence 4.1.2 here
openmpi_versions = {
- "4.0.1.2": "2.0.2",
"4.2.0": "3.1.4",
"4.2.1": "3.1.4",
"5.0.3": "4.1.2",
- "5.0.3-f.1": "4.1.2",
+ "5.0.4": "4.1.2",
+ "6.0.0": "4.1.6",
+ "6.0.1": "4.1.6",
+ "avx2-6.0.0": "4.1.6",
+ "avx2-6.0.1": "4.1.6",
}
for orca_version, openmpi_version in openmpi_versions.items():
depends_on(
@@ -68,28 +57,25 @@ class Orca(Package):
)
def url_for_version(self, version):
- out = "file://{0}/orca_{1}_linux_x86-64_openmpi{2}.tar.zst"
- return out.format(os.getcwd(), version.underscored, self.openmpi_versions[version.string])
+ openmpi_version = self.openmpi_versions[version.string].replace(".", "")
+ if openmpi_version == "412":
+ openmpi_version = "411"
- def install(self, spec, prefix):
- mkdirp(prefix.bin)
+ ver_parts = version.string.split("-")
+ ver_underscored = ver_parts[-1].replace(".", "_")
+ features = ver_parts[:-1] + ["shared"]
+ feature_text = "_".join(features)
- if self.spec.satisfies("@:4.2.1"):
- vername = os.path.basename(self.stage.archive_file).split(".")[0]
+ url = f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_{feature_text}_openmpi{openmpi_version}.tar.xz"
+ if self.spec.satisfies("@=avx2-6.0.1"):
+ url = f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_shared_openmpi{openmpi_version}_avx2.tar.xz"
- zstd = which("zstd")
- zstd("-d", self.stage.archive_file, "-o", vername + ".tar")
+ return url
- tar = which("tar")
- tar("-xvf", vername + ".tar")
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
- # there are READMEs in there but they don't hurt anyone
- install_tree(vername, prefix.bin)
- if self.spec.satisfies("@5.0.3-f.1"):
- install_tree("bin", prefix.bin)
- install_tree("lib", prefix.lib)
- else:
- install_tree(".", prefix.bin)
+ install_tree(".", prefix.bin)
# Check "mpirun" usability when building against OpenMPI
# with Slurm scheduler and add a "mpirun" wrapper that
@@ -99,9 +85,7 @@ class Orca(Package):
install(mpirun_srun, prefix.bin.mpirun)
def setup_run_environment(self, env):
- # In 5.0.3-f.1 an RPATH is set to $ORGIN/../lib
- if not self.spec.satisfies("@5.0.3-f.1"):
- env.prepend_path("LD_LIBRARY_PATH", self.prefix.bin)
- env.prepend_path("LD_LIBRARY_PATH", self.spec["libevent"].prefix.lib)
- env.prepend_path("LD_LIBRARY_PATH", self.spec["libpciaccess"].prefix.lib)
- env.prepend_path("LD_LIBRARY_PATH", self.spec["openmpi"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.prefix.bin)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libevent"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["libpciaccess"].prefix.lib)
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["openmpi"].prefix.lib)
diff --git a/var/spack/repos/builtin/packages/orfm/package.py b/var/spack/repos/builtin/packages/orfm/package.py
index 3b87e60842..9aeb4ada49 100644
--- a/var/spack/repos/builtin/packages/orfm/package.py
+++ b/var/spack/repos/builtin/packages/orfm/package.py
@@ -17,4 +17,6 @@ class Orfm(AutotoolsPackage):
version("0.7.1", sha256="19f39c72bcc48127b757613c5eef4abae95ee6c82dccf96b041db527b27f319a")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api", type="link")
diff --git a/var/spack/repos/builtin/packages/orthofinder/package.py b/var/spack/repos/builtin/packages/orthofinder/package.py
index c0e1b45cb1..df79d4e302 100644
--- a/var/spack/repos/builtin/packages/orthofinder/package.py
+++ b/var/spack/repos/builtin/packages/orthofinder/package.py
@@ -54,7 +54,7 @@ class Orthofinder(Package):
depends_on("blast-plus", type="run", when="+blast")
depends_on("mmseqs2", type="run", when="+mmseqs2")
depends_on("muscle5", type="run", when="+muscle")
- depends_on("iqtree2", type="run", when="+iqtree")
+ depends_on("iq-tree@2", type="run", when="+iqtree")
depends_on("raxml", type="run", when="+raxml")
depends_on("raxml-ng", type="run", when="+raxml-ng")
diff --git a/var/spack/repos/builtin/packages/osg-ca-certs/package.py b/var/spack/repos/builtin/packages/osg-ca-certs/package.py
index fa87cb10cc..7a36212ac6 100644
--- a/var/spack/repos/builtin/packages/osg-ca-certs/package.py
+++ b/var/spack/repos/builtin/packages/osg-ca-certs/package.py
@@ -11,9 +11,8 @@ class OsgCaCerts(Package):
in the OpenSSL 1.0.* format."""
homepage = "http://repo.opensciencegrid.org/cadist"
- url = "https://github.com/opensciencegrid/osg-certificates/archive/v1.109.igtf.1.117/osg-certificates-1.109.igtf.1.117.tar.gz"
+ git = "https://github.com/opensciencegrid/osg-certificates.git"
- _osg_base_url = "https://github.com/opensciencegrid/osg-certificates/archive/v{osg_version}.igtf.{igtf_version}/osg-certificates-{osg_version}.igtf.{igtf_version}.tar.gz"
_igtf_base_url = "https://dist.eugridpma.info/distribution/igtf/{igtf_version}/igtf-policy-installation-bundle-{igtf_version}.tar.gz"
_letsencrypt_base_url = "https://github.com/opensciencegrid/letsencrypt-certificates/archive/v{letsencrypt_version}/letsencrypt-certificates.tar.gz"
@@ -21,29 +20,17 @@ class OsgCaCerts(Package):
releases = [
{
- "osg_version": "1.110",
- "igtf_version": "1.119",
- "osg_sha256": "025969d415bf27c1609699caf63d0d79540a01df500187195f2bd973fe69e00d",
- "igtf_sha256": "cc4db07a86fc27f0e0dfd15c797d1a0da7b5620f4b611dbb686543712b2f335a",
- },
- {
- "osg_version": "1.109",
- "igtf_version": "1.117",
- "osg_sha256": "41e12c05aedb4df729bf326318cc29b9b79eb097564fd68c6af2e1448ec74f75",
- "igtf_sha256": "130d4d95cd65d01d2db250ee24c539341e3adc899b7eff1beafef1ba4674807d",
- },
+ "osg_version": "1.119",
+ "igtf_version": "1.128",
+ "osg_commit": "1f7abbe392e339aae28625a4016bc98d58ad7cab",
+ "igtf_sha256": "1385e2206b4088cbad94264e2c252ad431f075f88a427cdee4ed523df95b9ab7",
+ }
]
for release in releases:
_version = "{0}.igtf.{1}".format(release["osg_version"], release["igtf_version"])
- version(
- _version,
- url=_osg_base_url.format(
- osg_version=release["osg_version"], igtf_version=release["igtf_version"]
- ),
- sha256=release["osg_sha256"],
- )
+ version(_version, commit=release["osg_commit"])
resource(
name="igtf-{igtf_version}".format(igtf_version=release["igtf_version"]),
diff --git a/var/spack/repos/builtin/packages/osi/package.py b/var/spack/repos/builtin/packages/osi/package.py
index 83e12ebe3a..a29a9fea0f 100644
--- a/var/spack/repos/builtin/packages/osi/package.py
+++ b/var/spack/repos/builtin/packages/osi/package.py
@@ -30,4 +30,6 @@ class Osi(AutotoolsPackage):
version("0.108.7", sha256="f1bc53a498585f508d3f8d74792440a30a83c8bc934d0c8ecf8cd8bc0e486228")
version("0.108.6", sha256="984a5886825e2da9bf44d8a665f4b92812f0700e451c12baf9883eaa2315fad5")
+ depends_on("cxx", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/osmctools/package.py b/var/spack/repos/builtin/packages/osmctools/package.py
index a322d470db..c78837343c 100644
--- a/var/spack/repos/builtin/packages/osmctools/package.py
+++ b/var/spack/repos/builtin/packages/osmctools/package.py
@@ -18,6 +18,8 @@ class Osmctools(AutotoolsPackage):
version("0.9", sha256="2f5298be5b4ba840a04f360c163849b34a31386ccd287657885e21268665f413")
version("0.8", sha256="54ae48717afd05707c9b1fd750dd56c33c3bae0755424ce8ca3795ee28e0ece8")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/osmesa/package.py b/var/spack/repos/builtin/packages/osmesa/package.py
index b42564cc9c..682032655b 100644
--- a/var/spack/repos/builtin/packages/osmesa/package.py
+++ b/var/spack/repos/builtin/packages/osmesa/package.py
@@ -13,20 +13,20 @@ class Osmesa(BundlePackage):
version("11.2.0")
- depends_on("libosmesa")
+ depends_on("mesa+osmesa")
provides("gl@4.5")
@property
def home(self):
- return self.spec["libosmesa"].home
+ return self.spec["mesa"].home
@property
def headers(self):
- return self.spec["libosmesa"].headers
+ return self.spec["mesa"].package.libosmesa_headers
@property
def libs(self):
- return self.spec["libosmesa"].libs
+ return self.spec["mesa"].package.libosmesa_libs
@property
def gl_headers(self):
@@ -34,4 +34,4 @@ class Osmesa(BundlePackage):
@property
def gl_libs(self):
- return self.spec["libosmesa"].libs
+ return self.spec["mesa"].package.libosmesa_libs
diff --git a/var/spack/repos/builtin/packages/ospray/package.py b/var/spack/repos/builtin/packages/ospray/package.py
index e49bbf83ec..efa051d48f 100644
--- a/var/spack/repos/builtin/packages/ospray/package.py
+++ b/var/spack/repos/builtin/packages/ospray/package.py
@@ -11,11 +11,13 @@ class Ospray(CMakePackage):
high-performance, high-fidelity visualization on Intel Architecture CPUs."""
homepage = "https://www.ospray.org/"
- url = "https://github.com/ospray/ospray/archive/v2.10.0.tar.gz"
- git = "https://github.com/ospray/ospray.git"
+ url = "https://github.com/RenderKit/ospray/archive/v2.10.0.tar.gz"
+ git = "https://github.com/RenderKit/ospray.git"
# maintainers("aumuell")
+ version("3.2.0", sha256="2c8108df2950bc5d1bc2a62f74629233dbe4f36e3f6a8ea032907d4a3fdc6750")
+ version("3.1.0", sha256="0b9d7df900fe0474b12e5a2641bb9c3f5a1561217b2789834ebf994a15288a82")
version("3.0.0", sha256="d8d8e632d77171c810c0f38f8d5c8387470ca19b75f5b80ad4d3d12007280288")
version("2.12.0", sha256="268b16952b2dd44da2a1e40d2065c960bc2442dd09b63ace8b65d3408f596301")
version("2.11.0", sha256="55974e650d9b78989ee55adb81cffd8c6e39ce5d3cf0a3b3198c522bf36f6e81")
@@ -26,6 +28,9 @@ class Ospray(CMakePackage):
version("2.7.0", sha256="bcaeb221b5dd383d27587ffaca7f75d7e0064f64017a0d73df90862b14b5704b")
version("2.6.0", sha256="5efccd7eff5774b77f8894e68a6b803b535a0d12f32ab49edf13b954e2848f2e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("apps", default=False, description="Enable building OSPRay Apps")
variant("denoiser", default=True, description="Enable denoiser image operation")
variant("glm", default=False, description="Build ospray_cpp GLM tests/tutorial")
@@ -38,13 +43,16 @@ class Ospray(CMakePackage):
depends_on("rkcommon@1.7:1.9", when="@2.7.0:2.8")
depends_on("rkcommon@1.9", when="@2.9.0")
depends_on("rkcommon@1.10:", when="@2.10.0:")
- depends_on("rkcommon@1.11:", when="@2.11:")
- depends_on("rkcommon@1.12:", when="@3:")
+ depends_on("rkcommon@1.11.0", when="@2.11:2.12")
+ depends_on("rkcommon@1.12.0", when="@3.0")
+ depends_on("rkcommon@1.13.0", when="@3.1")
+ depends_on("rkcommon@1.14.0", when="@3.2")
depends_on("embree@3.12: +ispc")
depends_on("embree@3.13.1:", when="@2.7.0:")
depends_on("embree@:3", when="@:2.10")
depends_on("embree@4:", when="@2.11:")
depends_on("embree@4.3:", when="@3:")
+ depends_on("embree@4.3.3:", when="@3.2:")
with when("+volumes"):
depends_on("openvkl@0.13.0:1", when="@2")
depends_on("openvkl@1.0.1:", when="@2.7.0:")
@@ -52,22 +60,27 @@ class Ospray(CMakePackage):
depends_on("openvkl@1.3.0:", when="@2.10.0:")
depends_on("openvkl@1.3.2:", when="@2.11:2")
depends_on("openvkl@2:", when="@3:")
+ depends_on("openvkl@2.0.1:", when="@3.2:")
with when("+denoiser"):
depends_on("openimagedenoise@1.2.3:")
depends_on("openimagedenoise@1.3:", when="@2.5:")
depends_on("openimagedenoise@:1", when="@:2.11")
depends_on("openimagedenoise@2:", when="@2.12:")
depends_on("openimagedenoise@2.1:", when="@3:")
+ depends_on("openimagedenoise@2.3:", when="@3.2:")
depends_on("ispc@1.14.1:", type=("build"))
depends_on("ispc@1.16.0:", when="@2.7.0:", type=("build"))
depends_on("ispc@1.18.0:", when="@2.10.0:", type=("build"))
depends_on("ispc@1.19.0:", when="@2.11.0:", type=("build"))
depends_on("ispc@1.20.0:", when="@2.12.0:", type=("build"))
depends_on("ispc@1.21.1:", when="@3:", type=("build"))
+ depends_on("ispc@1.23.0:", when="@3.2:", type=("build"))
depends_on("tbb")
- depends_on("mpi", when="+mpi")
- depends_on("snappy@1.1.8:", when="+mpi")
+ with when("+mpi"):
+ depends_on("mpi")
+ depends_on("snappy@1.1.8:")
+ depends_on("snappy@1.2.1:", when="@3.2:")
def cmake_args(self):
args = [
diff --git a/var/spack/repos/builtin/packages/osqp/package.py b/var/spack/repos/builtin/packages/osqp/package.py
index 9fb9614d37..8506e50949 100644
--- a/var/spack/repos/builtin/packages/osqp/package.py
+++ b/var/spack/repos/builtin/packages/osqp/package.py
@@ -22,3 +22,5 @@ class Osqp(CMakePackage):
version("master", branch="master", submodules=True)
version("0.6.0", commit="0baddd36bd57ec1cace0a52c6dd9663e8f16df0a", submodules=True)
version("0.5.0", commit="97050184aa2cbebe446ae02d1f8b811243e180d6", submodules=True)
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ossp-uuid/package.py b/var/spack/repos/builtin/packages/ossp-uuid/package.py
index 24dd3c0809..1db80850dd 100644
--- a/var/spack/repos/builtin/packages/ossp-uuid/package.py
+++ b/var/spack/repos/builtin/packages/ossp-uuid/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -19,7 +21,11 @@ class OsspUuid(AutotoolsPackage):
version("1.6.2", sha256="11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0")
- provides("uuid")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ if sys.platform not in ["darwin", "win32"]:
+ provides("uuid")
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
index 0eaad99082..204e4e97f7 100644
--- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
+++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
@@ -20,6 +20,8 @@ class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage, ROCmPackage):
maintainers("natshineman", "harisubramoni", "MatthewLieber")
+ version("7.5", sha256="1cf84ac5419456202757a757c5f9a4f5c6ecd05c65783c7976421cfd6020b3b3")
+ version("7.4", sha256="1edd0c2efa61999409bfb28740a7f39689a5b42b1a1b4c66d1656e5637f7cefc")
version("7.3", sha256="8fa25b8aaa34e4b07ab3a4f30b7690ab46b038b08d204a853a9b6aa7bdb02f2f")
version("7.2", sha256="1a4e1f2aab0e65404b3414e23bd46616184b69b6231ce9313d9c630bd6e633c1")
version("7.1-1", sha256="85f4dd8be1df31255e232852769ae5b82e87a5fb14be2f8eba1ae9de8ffe391a")
@@ -43,6 +45,9 @@ class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage, ROCmPackage):
version("5.4", sha256="e1ca762e13a07205a59b59ad85e85ce0f826b70f76fd555ce5568efb1f2a8f33")
version("5.3", sha256="d7b3ad4bee48ac32f5bef39650a88f8f2c23a3050b17130c63966283edced89b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
variant("papi", description="Enable/Disable support for papi", default=False)
variant("graphing", description="Enable/Disable support for graphing", default=False)
diff --git a/var/spack/repos/builtin/packages/otf-cpt/package.py b/var/spack/repos/builtin/packages/otf-cpt/package.py
new file mode 100644
index 0000000000..4ad43a6b29
--- /dev/null
+++ b/var/spack/repos/builtin/packages/otf-cpt/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class OtfCpt(CMakePackage):
+ """Tool to collect and report model factors (aka. fundamental performance factors)
+ for hybrid MPI + OpenMP applications on-the-fly."""
+
+ # Add a proper url for your package's homepage here.
+ homepage = (
+ "https://github.com/RWTH-HPC/OTF-CPT?tab=readme-ov-file#on-the-fly-critical-path-tool"
+ )
+ git = "https://github.com/RWTH-HPC/OTF-CPT.git"
+
+ maintainers("jgraciahlrs", "jprotze")
+
+ license("Apache-2.0", checked_by="jgraciahlrs")
+
+ version("0.9", tag="v0.9")
+
+ depends_on("cxx", type="build")
+ depends_on("mpi")
+ conflicts(
+ "%gcc",
+ # Use a clang compiler with a matching libomp, e.g. 'sudo apt install libomp-14-dev':
+ msg="gcc currently does not support OMPT, please use a clang-like compiler with libomp",
+ )
+
+ patch(
+ "https://github.com/RWTH-HPC/OTF-CPT/commit/b58f83588a4c231b71ca48dcddd909e1ab318cc6.diff?full_index=1",
+ sha256="35fadc3e61e5b7aa3a68272f701af3a242e30a435f1ddd679577ba35c7496565",
+ when="@0.9",
+ )
diff --git a/var/spack/repos/builtin/packages/otf/package.py b/var/spack/repos/builtin/packages/otf/package.py
index 757d34d08a..56bfddac03 100644
--- a/var/spack/repos/builtin/packages/otf/package.py
+++ b/var/spack/repos/builtin/packages/otf/package.py
@@ -22,6 +22,9 @@ class Otf(AutotoolsPackage):
"1.12.5salmon", sha256="0a8427360dedb38e8ddca30f14d95f826420c550337c5a79dbb754904e194088"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/otf2/package.py b/var/spack/repos/builtin/packages/otf2/package.py
index 60d55d097c..ff16ea5dd4 100644
--- a/var/spack/repos/builtin/packages/otf2/package.py
+++ b/var/spack/repos/builtin/packages/otf2/package.py
@@ -59,21 +59,24 @@ class Otf2(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version < Version("2.3"):
- return "https://www.vi-hps.org/cms/upload/packages/otf2/otf2-{0}.tar.gz".format(
- version
- )
+ return f"https://www.vi-hps.org/cms/upload/packages/otf2/otf2-{version}.tar.gz"
+
+ return f"https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-{version}/otf2-{version}.tar.gz"
- return "https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-{0}/otf2-{0}.tar.gz".format(
- version
- )
+ extends("python")
+
+ # `imp` module required
+ depends_on("python@:3.11", type=("build", "run"))
with when("@2.2 %cce"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
- depends_on("m4", type="build")
# Fix missing initialization of variable resulting in issues when used by
# APEX/HPX: https://github.com/STEllAR-GROUP/hpx/issues/5239
@@ -86,14 +89,19 @@ class Otf2(AutotoolsPackage):
def force_autoreconf(self):
return self.spec.satisfies("@2.2 %cce")
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ flags.append(self.compiler.cc_pic_flag)
+ elif name == "cxxflags":
+ flags.append(self.compiler.cxx_pic_flag)
+ return (flags, None, None)
+
def configure_args(self):
return [
"--enable-shared",
- "CC={0}".format(spack_cc),
- "CXX={0}".format(spack_cxx),
- "F77={0}".format(spack_f77),
- "FC={0}".format(spack_fc),
- "CFLAGS={0}".format(self.compiler.cc_pic_flag),
- "CXXFLAGS={0}".format(self.compiler.cxx_pic_flag),
+ f"CC={spack_cc}",
+ f"CXX={spack_cxx}",
+ f"F77={spack_f77}",
+ f"FC={spack_fc}",
"PYTHON_FOR_GENERATOR=:",
]
diff --git a/var/spack/repos/builtin/packages/p11-kit/package.py b/var/spack/repos/builtin/packages/p11-kit/package.py
index 685d6aede5..b46bb62fac 100644
--- a/var/spack/repos/builtin/packages/p11-kit/package.py
+++ b/var/spack/repos/builtin/packages/p11-kit/package.py
@@ -24,6 +24,8 @@ class P11Kit(AutotoolsPackage):
version("0.23.20", sha256="8f6116f34735f6902e9db461c5dbe3e7e25b5cb8c38f42ea2a5aede1cf693749")
version("0.23.19", sha256="c27921404e82244d97b27f46bae654e5814b5963e0ce3c75ad37007ded46f700")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/p3dfft3/package.py b/var/spack/repos/builtin/packages/p3dfft3/package.py
index dc82a5ad27..8ce6d33e4e 100644
--- a/var/spack/repos/builtin/packages/p3dfft3/package.py
+++ b/var/spack/repos/builtin/packages/p3dfft3/package.py
@@ -20,6 +20,10 @@ class P3dfft3(AutotoolsPackage):
version("develop", branch="master")
version("3.0.0", sha256="1c549e78097d1545d18552b039be0d11cdb96be46efe99a16b65fd5d546dbfa7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fftw", default=True, description="Builds with FFTW library")
variant("essl", default=False, description="Builds with ESSL library")
variant("mpi", default=True, description="Enable MPI support.")
@@ -60,9 +64,6 @@ class P3dfft3(AutotoolsPackage):
if "%cce" in self.spec:
args.append("--enable-cray")
- if "%pgi" in self.spec:
- args.append("--enable-pgi")
-
if "+mpi" in self.spec:
args.append("CC=%s" % self.spec["mpi"].mpicc)
args.append("CXX=%s" % self.spec["mpi"].mpicxx)
diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py
index de98e31e1e..9b71294db3 100644
--- a/var/spack/repos/builtin/packages/p4est/package.py
+++ b/var/spack/repos/builtin/packages/p4est/package.py
@@ -29,6 +29,8 @@ class P4est(AutotoolsPackage):
version("2.0", sha256="c522c5b69896aab39aa5a81399372a19a6b03fc6200d2d5d677d9a22fe31029a")
version("1.1", sha256="0b5327a35f0c869bf920b8cab5f20caa4eb55692eaaf1f451d5de30285b25139")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI")
variant("openmp", default=False, description="Enable OpenMP")
diff --git a/var/spack/repos/builtin/packages/p7zip/package.py b/var/spack/repos/builtin/packages/p7zip/package.py
index bb6266286d..2a04e90c34 100644
--- a/var/spack/repos/builtin/packages/p7zip/package.py
+++ b/var/spack/repos/builtin/packages/p7zip/package.py
@@ -11,7 +11,7 @@ class P7zip(MakefilePackage):
"""A Unix port of the 7z file archiver"""
maintainers("vmiheer")
- homepage = "http://p7zip.sourceforge.net"
+ homepage = "https://p7zip.sourceforge.net"
license("DOC")
@@ -19,6 +19,9 @@ class P7zip(MakefilePackage):
version("17.04", sha256="ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef")
version("16.02", sha256="5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch(
"gcc10.patch",
when="@16.02%gcc@10:",
diff --git a/var/spack/repos/builtin/packages/pacbio-daligner/package.py b/var/spack/repos/builtin/packages/pacbio-daligner/package.py
index 28ede3ec50..b51a86435e 100644
--- a/var/spack/repos/builtin/packages/pacbio-daligner/package.py
+++ b/var/spack/repos/builtin/packages/pacbio-daligner/package.py
@@ -15,6 +15,8 @@ class PacbioDaligner(MakefilePackage):
version("2017-08-05", commit="0fe5240d2cc6b55bf9e04465b700b76110749c9d")
+ depends_on("c", type="build") # generated
+
depends_on("gmake", type="build")
depends_on("pacbio-dazz-db")
diff --git a/var/spack/repos/builtin/packages/pacbio-damasker/package.py b/var/spack/repos/builtin/packages/pacbio-damasker/package.py
index fbcff6696e..3a43194923 100644
--- a/var/spack/repos/builtin/packages/pacbio-damasker/package.py
+++ b/var/spack/repos/builtin/packages/pacbio-damasker/package.py
@@ -15,6 +15,8 @@ class PacbioDamasker(MakefilePackage):
version("2017-02-11", commit="144244b77d52cb785cb1b3b8ae3ab6f3f0c63264")
+ depends_on("c", type="build") # generated
+
depends_on("gmake", type="build")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py b/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
index 27a01e5ea0..8909dd66c8 100644
--- a/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
+++ b/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
@@ -16,6 +16,8 @@ class PacbioDazzDb(MakefilePackage):
version("2017-04-10", commit="f29d27d51f460563481cd227d17f4bdc5e288365")
+ depends_on("c", type="build") # generated
+
depends_on("gmake", type="build")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/pacbio-dextractor/package.py b/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
index 4b6f0eef1c..033a927fdf 100644
--- a/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
+++ b/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
@@ -15,6 +15,8 @@ class PacbioDextractor(MakefilePackage):
version("2016-08-09", commit="89726800346d0bed15d98dcc577f4c7733aab4b1")
+ depends_on("c", type="build") # generated
+
depends_on("hdf5")
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/packmol/package.py b/var/spack/repos/builtin/packages/packmol/package.py
index 2821ae6eec..0790f95086 100644
--- a/var/spack/repos/builtin/packages/packmol/package.py
+++ b/var/spack/repos/builtin/packages/packmol/package.py
@@ -17,3 +17,5 @@ class Packmol(CMakePackage):
version("20.0.0", sha256="4faa1c8d5e5db2e935fbc23e7167df7e0b85aa0993c57b74cb897d13e5cf2202")
version("18.169", sha256="8acf2cbc742a609e763eb00cae55aecd09af2edb4cc4e931706e2f06ac380de9")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/pacparser/package.py b/var/spack/repos/builtin/packages/pacparser/package.py
index f10dbee84b..02892853da 100644
--- a/var/spack/repos/builtin/packages/pacparser/package.py
+++ b/var/spack/repos/builtin/packages/pacparser/package.py
@@ -10,11 +10,12 @@ class Pacparser(MakefilePackage):
"""pacparser is a library to parse proxy auto-config (PAC) files."""
homepage = "https://pacparser.github.io/"
- url = "https://github.com/manugarg/pacparser/releases/download/v1.4.0/pacparser-v1.4.0.tar.gz"
+ url = "https://github.com/manugarg/pacparser/archive/refs/tags/v1.4.5.tar.gz"
git = "https://github.com/manugarg/pacparser.git"
license("LGPL-3.0-or-later")
+ version("1.4.5", sha256="fac205f41d000e245519244dc3e730e649a0ac1c61b5f2d1d0660056e1680b2d")
version("1.4.0", sha256="2e66c5fe635cd5dcb9bccca4aced925eca712632b81bada3b63682159c0f910e")
version("1.3.9", commit="4bbfb15c96ea0b2aede2f7371e59f66e15722d41")
version("1.3.8", sha256="4e2872de565b2b64ffc81ba503e0eba35b3f7ef4a023ddd4a328c7b9d2cac266")
@@ -24,6 +25,8 @@ class Pacparser(MakefilePackage):
url="https://github.com/manugarg/pacparser/releases/download/1.3.7/pacparser-1.3.7.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("python", when="+python")
depends_on("py-setuptools", when="+python", type=("build", "run"))
@@ -31,6 +34,12 @@ class Pacparser(MakefilePackage):
variant("python", default=False, description="Build and install python bindings")
+ def url_for_version(self, version):
+ if version <= Version("1.4.0"):
+ return f"https://github.com/manugarg/pacparser/releases/download/v{version}/pacparser-v{version}.tar.gz"
+ else:
+ return f"https://github.com/manugarg/pacparser/archive/refs/tags/v{version}.tar.gz"
+
def build(self, spec, prefix):
make('CC="%s"' % self.compiler.cc, 'CXX="%s"' % self.compiler.cxx, "-C", "src")
if "+python" in spec:
diff --git a/var/spack/repos/builtin/packages/pacvim/package.py b/var/spack/repos/builtin/packages/pacvim/package.py
index ac72eed956..582da1d9c3 100644
--- a/var/spack/repos/builtin/packages/pacvim/package.py
+++ b/var/spack/repos/builtin/packages/pacvim/package.py
@@ -16,6 +16,8 @@ class Pacvim(MakefilePackage):
version("1.1.1", sha256="c869c5450fbafdfe8ba8a8a9bba3718775926f276f0552052dcfa090d21acb28")
+ depends_on("cxx", type="build") # generated
+
depends_on("ncurses")
def edit(self, stage, prefix):
diff --git a/var/spack/repos/builtin/packages/paddle/package.py b/var/spack/repos/builtin/packages/paddle/package.py
new file mode 100644
index 0000000000..84baaad08c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paddle/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Paddle(CMakePackage):
+ """Parallel algebraic domain decomposition for linear algebra software package."""
+
+ homepage = "https://gitlab.inria.fr/solverstack/paddle"
+ git = "https://gitlab.inria.fr/solverstack/paddle.git"
+ maintainers("fpruvost")
+
+ version("master", branch="master", submodules=True)
+ version("0.3.7", tag="0.3.7", submodules=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("parmetis", default=False, description="Enable ParMETIS ordering")
+ variant("tests", default=False, description="Enable tests")
+
+ depends_on("mpi")
+ depends_on("scotch~metis+mpi")
+ depends_on("parmetis", when="+parmetis")
+
+ root_cmakelists_dir = "src"
+
+ def cmake_args(self):
+ args = [
+ self.define("BUILD_SHARED_LIBS", True),
+ self.define_from_variant("PADDLE_ORDERING_PARMETIS", "parmetis"),
+ self.define_from_variant("PADDLE_BUILD_TESTS", "tests"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/pagit/package.py b/var/spack/repos/builtin/packages/pagit/package.py
index 7cec37c0ee..723eb8bc7e 100644
--- a/var/spack/repos/builtin/packages/pagit/package.py
+++ b/var/spack/repos/builtin/packages/pagit/package.py
@@ -15,6 +15,8 @@ class Pagit(Package):
version("1.01", sha256="8069c1d236804cf4ea782495adcc50d18561ef466af06b21946b980b3c37ad55")
+ depends_on("c", type="build") # generated
+
depends_on("java", type=("build", "run"))
depends_on("perl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/pagmo/package.py b/var/spack/repos/builtin/packages/pagmo/package.py
index 05baf7bbf5..2bcebe0187 100644
--- a/var/spack/repos/builtin/packages/pagmo/package.py
+++ b/var/spack/repos/builtin/packages/pagmo/package.py
@@ -24,6 +24,9 @@ class Pagmo(CMakePackage):
version("1.1.7", sha256="6d8fab89ef9d5d5f30f148225bf9b84b2e5a38997f3d68b85547840e9fd95172")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("examples", default=False, description="Build examples")
variant("cxx", default=True, description="Build the C++ interface")
variant("python", default=True, description="Build Python bindings")
@@ -99,10 +102,8 @@ class Pagmo(CMakePackage):
if "+python" in spec:
args.extend(
[
- # By default picks up the system python not the Spack build
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path),
# By default installs to the python prefix not the pagmo prefix
- "-DPYTHON_MODULES_DIR={0}".format(python_platlib),
+ "-DPYTHON_MODULES_DIR={0}".format(python_platlib)
]
)
diff --git a/var/spack/repos/builtin/packages/pagmo2/package.py b/var/spack/repos/builtin/packages/pagmo2/package.py
index a72cb79676..d8569ac811 100644
--- a/var/spack/repos/builtin/packages/pagmo2/package.py
+++ b/var/spack/repos/builtin/packages/pagmo2/package.py
@@ -22,6 +22,9 @@ class Pagmo2(CMakePackage):
version("master", branch="master")
version("2.18.0", sha256="5ad40bf3aa91857a808d6b632d9e1020341a33f1a4115d7a2b78b78fd063ae31")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("boost+system+serialization+thread")
depends_on("intel-tbb")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/paintor/package.py b/var/spack/repos/builtin/packages/paintor/package.py
index 43ff1ae559..50fd6d86ef 100644
--- a/var/spack/repos/builtin/packages/paintor/package.py
+++ b/var/spack/repos/builtin/packages/paintor/package.py
@@ -15,6 +15,10 @@ class Paintor(MakefilePackage):
version("3.0", sha256="cc39d3c334cc6d787e4f04847192c9d0185025a2ca46910bd38901b6679d198f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("nlopt")
depends_on("eigen")
diff --git a/var/spack/repos/builtin/packages/pajeng/package.py b/var/spack/repos/builtin/packages/pajeng/package.py
index b607a24209..b718f4c9b3 100644
--- a/var/spack/repos/builtin/packages/pajeng/package.py
+++ b/var/spack/repos/builtin/packages/pajeng/package.py
@@ -33,6 +33,8 @@ class Pajeng(CMakePackage):
version("1.1", sha256="986d03e6deed20a3b9d0e076b1be9053c1bc86c8b41ca36cce3ba3b22dc6abca")
version("1.0", sha256="4d98d1a78669290d0a2e6bfe07a1eb4ab96bd05e5ef78da96d2c3cf03b023aa0")
+ depends_on("cxx", type="build") # generated
+
variant("static", default=False, description="Build as static library")
variant("doc", default=False, description="The Paje Trace File documentation")
variant("lib", default=True, description="Build libpaje")
diff --git a/var/spack/repos/builtin/packages/pal/package.py b/var/spack/repos/builtin/packages/pal/package.py
index 9edf9290ee..e4bc3af5ad 100644
--- a/var/spack/repos/builtin/packages/pal/package.py
+++ b/var/spack/repos/builtin/packages/pal/package.py
@@ -19,6 +19,8 @@ class Pal(AutotoolsPackage):
version("0.9.8", sha256="191fde8c4f45d6807d4b011511344014966bb46e44029a4481d070cd5e7cc697")
+ depends_on("c", type="build") # generated
+
depends_on("sofa-c")
depends_on("erfa")
diff --git a/var/spack/repos/builtin/packages/palace/package.py b/var/spack/repos/builtin/packages/palace/package.py
index f0625ead18..630645642f 100644
--- a/var/spack/repos/builtin/packages/palace/package.py
+++ b/var/spack/repos/builtin/packages/palace/package.py
@@ -17,16 +17,14 @@ class Palace(CMakePackage):
maintainers("sebastiangrimberg")
version("develop", branch="main")
+ version("0.12.0", tag="v0.12.0", commit="8c192071206466638d5818048ee712e1fada386f")
version("0.11.2", tag="v0.11.2", commit="6c3aa5f84a934a6ddd58022b2945a1bdb5fa329d")
- variant("shared", default=True, description="Enables the build of shared libraries")
+ depends_on("cxx", type="build") # generated
+
+ variant("shared", default=True, description="Build shared libraries")
variant("int64", default=False, description="Use 64 bit integers")
- variant("openmp", default=False, description="Use OpenMP")
- variant(
- "gslib",
- default=True,
- description="Build with GSLIB library for high-order field interpolation",
- )
+ variant("openmp", default=False, description="Use OpenMP for shared-memory parallelism")
variant(
"superlu-dist", default=True, description="Build with SuperLU_DIST sparse direct solver"
)
@@ -34,9 +32,16 @@ class Palace(CMakePackage):
variant("mumps", default=False, description="Build with MUMPS sparse direct solver")
variant("slepc", default=True, description="Build with SLEPc eigenvalue solver")
variant("arpack", default=False, description="Build with ARPACK eigenvalue solver")
+ variant("libxsmm", default=True, description="Build with LIBXSMM backend for libCEED")
+ variant("magma", default=True, description="Build with MAGMA backend for libCEED")
+ variant(
+ "gslib",
+ default=True,
+ description="Build with GSLIB library for high-order field interpolation",
+ )
# Dependencies
- depends_on("cmake@3.13:", type="build")
+ depends_on("cmake@3.21:", type="build")
depends_on("pkgconfig", type="build")
depends_on("mpi")
depends_on("zlib-api")
@@ -95,8 +100,19 @@ class Palace(CMakePackage):
depends_on("arpack-ng+shared", when="+shared")
depends_on("arpack-ng~shared", when="~shared")
- # Palace always builds its own internal MFEM, GSLIB
+ with when("+libxsmm"):
+ depends_on("libxsmm@main")
+ depends_on("libxsmm+shared", when="+shared")
+ depends_on("libxsmm~shared", when="~shared")
+
+ with when("+magma"):
+ depends_on("magma")
+ depends_on("magma+shared", when="+shared")
+ depends_on("magma~shared", when="~shared")
+
+ # Palace always builds its own internal MFEM, libCEED, and GSLIB
conflicts("mfem")
+ conflicts("libceed")
conflicts("gslib")
# More dependency variant conflicts
@@ -109,12 +125,14 @@ class Palace(CMakePackage):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("PALACE_WITH_64BIT_INT", "int64"),
self.define_from_variant("PALACE_WITH_OPENMP", "openmp"),
- self.define_from_variant("PALACE_WITH_GSLIB", "gslib"),
self.define_from_variant("PALACE_WITH_SUPERLU", "superlu-dist"),
self.define_from_variant("PALACE_WITH_STRUMPACK", "strumpack"),
self.define_from_variant("PALACE_WITH_MUMPS", "mumps"),
self.define_from_variant("PALACE_WITH_SLEPC", "slepc"),
self.define_from_variant("PALACE_WITH_ARPACK", "arpack"),
+ self.define_from_variant("PALACE_WITH_LIBXSMM", "libxsmm"),
+ self.define_from_variant("PALACE_WITH_MAGMA", "magma"),
+ self.define_from_variant("PALACE_WITH_GSLIB", "gslib"),
self.define("PALACE_BUILD_EXTERNAL_DEPS", False),
]
@@ -134,6 +152,12 @@ class Palace(CMakePackage):
if "+mumps" in self.spec:
args += [self.define("MUMPS_REQUIRED_PACKAGES", "LAPACK;BLAS;MPI;MPI_Fortran")]
+ # Allow internal libCEED build to find LIBXSMM, MAGMA
+ if "+libxsmm" in self.spec:
+ args += [self.define("LIBXSMM_DIR", self.spec["libxsmm"].prefix)]
+ if "+magma" in self.spec:
+ args += [self.define("MAGMA_DIR", self.spec["magma"].prefix)]
+
return args
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/palisade-development/package.py b/var/spack/repos/builtin/packages/palisade-development/package.py
index 05e523a13c..df1c75e05c 100644
--- a/var/spack/repos/builtin/packages/palisade-development/package.py
+++ b/var/spack/repos/builtin/packages/palisade-development/package.py
@@ -39,6 +39,9 @@ class PalisadeDevelopment(CMakePackage):
)
version("master", branch="master", preferred=True, submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared library.")
variant("static", default=True, description="Build static library.")
variant("with_be2", default=True, description="Build with backend 2.")
diff --git a/var/spack/repos/builtin/packages/paml/package.py b/var/spack/repos/builtin/packages/paml/package.py
index d941d45e06..1e98996774 100644
--- a/var/spack/repos/builtin/packages/paml/package.py
+++ b/var/spack/repos/builtin/packages/paml/package.py
@@ -11,24 +11,31 @@ class Paml(MakefilePackage):
protein sewuences using maximum likelihood."""
homepage = "http://abacus.gene.ucl.ac.uk/software/paml.html"
- url = "https://github.com/abacus-gene/paml/archive/refs/tags/v4.10.0.tar.gz"
+ url = "https://github.com/abacus-gene/paml/archive/refs/tags/4.10.7.tar.gz"
git = "https://github.com/abacus-gene/paml.git"
maintainers("snehring")
license("GPL-3.0-or-later")
+ version("4.10.7", sha256="0f29e768b3797b69eadc6332c3d046d8727702052d56c3b729883626c0a5a4e3")
version(
"4.10.3",
sha256="9b2a6e187e3f9f3bc55cd82db15eb701d43f031167d283a7c1b11c882b5d8a42",
url="https://github.com/abacus-gene/paml/archive/refs/tags/untagged-a5659203e8ec0ddb58b8.tar.gz",
)
- version("4.10.0", sha256="6ef6a116f254185eb1cf7a2b975946fc9179a4b7dcb60a82f8fa8bbe6931897c")
+ version(
+ "4.10.0",
+ sha256="6ef6a116f254185eb1cf7a2b975946fc9179a4b7dcb60a82f8fa8bbe6931897c",
+ url="https://github.com/abacus-gene/paml/archive/refs/tags/v4.10.0.tar.gz",
+ )
version(
"4.9h",
sha256="623bf6cf4a018a4e7b4dbba189c41d6c0c25fdca3a0ae24703b82965c772edb3",
url="http://abacus.gene.ucl.ac.uk/software/SoftOld/paml4.9h.tgz",
)
+ depends_on("c", type="build") # generated
+
build_directory = "src"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/panda/package.py b/var/spack/repos/builtin/packages/panda/package.py
index c97a5a21ad..127413bae3 100644
--- a/var/spack/repos/builtin/packages/panda/package.py
+++ b/var/spack/repos/builtin/packages/panda/package.py
@@ -19,6 +19,8 @@ class Panda(CMakePackage):
"2016-03-07", sha256="9fae1544626db417ade7318d26bc43c8af04151b9f7679b6d742dba598762037"
)
+ depends_on("cxx", type="build") # generated
+
# Note: Panda can also be built without MPI support
depends_on("cmake@2.6.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/pandaseq/package.py b/var/spack/repos/builtin/packages/pandaseq/package.py
index 15f6c64af0..98f6ab47ca 100644
--- a/var/spack/repos/builtin/packages/pandaseq/package.py
+++ b/var/spack/repos/builtin/packages/pandaseq/package.py
@@ -19,6 +19,8 @@ class Pandaseq(AutotoolsPackage):
version("2.11", sha256="6e3e35d88c95f57d612d559e093656404c1d48c341a8baa6bef7bb0f09fc8f82")
version("2.10", sha256="93cd34fc26a7357e14e386b9c9ba9b28361cf4da7cf62562dc8501e220f9a561")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/pandoc/package.py b/var/spack/repos/builtin/packages/pandoc/package.py
index 870490a587..81a93f5f57 100644
--- a/var/spack/repos/builtin/packages/pandoc/package.py
+++ b/var/spack/repos/builtin/packages/pandoc/package.py
@@ -20,6 +20,8 @@ class Pandoc(Package):
# the challenges with Haskell. Until the Haskell framework is in Spack this
# package will meet the needs of packages that have a dependency on pandoc.
+ skip_version_audit = ["platform=windows"]
+
if platform.system() == "Linux" and platform.machine() == "aarch64":
url = "https://github.com/jgm/pandoc/releases/download/2.14.0.3/pandoc-2.14.0.3-linux-arm64.tar.gz"
version(
diff --git a/var/spack/repos/builtin/packages/pandoramonitoring/package.py b/var/spack/repos/builtin/packages/pandoramonitoring/package.py
new file mode 100644
index 0000000000..7448a04ce4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pandoramonitoring/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Pandoramonitoring(CMakePackage):
+ """ROOT-based Event Visualisation Environment for Pandora with
+ tree-writing functionality"""
+
+ url = "https://github.com/PandoraPFA/PandoraMonitoring/archive/v03-04-00.tar.gz"
+ homepage = "https://github.com/PandoraPFA/PandoraMonitoring"
+ git = "https://github.com/PandoraPFA/PandoraMonitoring.git"
+
+ tags = ["hep"]
+
+ maintainers("jmcarcell", "wdconinc")
+
+ version("master", branch="master")
+ version("3.5.0", sha256="274562abb7c797194634d5460a56227444a1de07a240c88ae35ca806abcbaf60")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("root@6.18.04: +x +opengl")
+ depends_on("pandorasdk")
+
+ def cmake_args(self):
+ args = [
+ self.define("CMAKE_MODULE_PATH", self.spec["pandorapfa"].prefix.cmakemodules),
+ self.define("CMAKE_CXX_FLAGS", "-std=c++17"),
+ ]
+ return args
+
+ def url_for_version(self, version):
+ # contrary to iLCSoft packages, here the patch version is kept when 0
+ base_url = self.url[: self.url.rfind("/")]
+ major = str(version[0]).zfill(2)
+ minor = str(version[1]).zfill(2)
+ patch = str(version[2]).zfill(2)
+ url = base_url + "/v%s-%s-%s.tar.gz" % (major, minor, patch)
+ return url
diff --git a/var/spack/repos/builtin/packages/pandorapfa/package.py b/var/spack/repos/builtin/packages/pandorapfa/package.py
new file mode 100644
index 0000000000..7498e34cd4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pandorapfa/package.py
@@ -0,0 +1,62 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Pandorapfa(Package):
+ """Metadata package to bring together and build multiple Pandora libraries.
+ NOTE: this recipe is not used to install other pandora packages, for which
+ separate recipes exist. It only installs the cmakemodules directory."""
+
+ url = "https://github.com/PandoraPFA/PandoraPFA/archive/v03-14-00.tar.gz"
+ homepage = "https://github.com/PandoraPFA/PandoraPFA"
+ git = "https://github.com/PandoraPFA/PandoraPFA.git"
+
+ tags = ["hep"]
+
+ maintainers("jmcarcell", "wdconinc")
+
+ version("master", branch="master")
+ version("4.3.1", sha256="2f4757a6ed2e10d3effc300b330f67ba13c499dbf21ba720b29b50527332fcdb")
+ version("4.3.0", sha256="a794022c33b3a5afc1272740ac385e0c4ab96a112733012e7dfcbe80b5a3b445")
+ version("4.2.1", sha256="1d262417748d18e00466ae3f1714ab0d7452e903bd1430773a72c652cf4666e4")
+ version("4.2.0", sha256="5c1030db6047b2d6cef6b534a98f5293e0f97f8e35e92f254f2a61b4a20f5cee")
+ version("4.0.0", sha256="80fdb60ac53ebada9d6ed2c6d0cefe79174586ce82e2e3bee7eefb4dbacbfba3")
+ version("3.25.3", sha256="b390d85ef8081e3fe090862b084298344fc2a6f3c67e29cb4f2cdced7fa25628")
+ version("3.25.2", sha256="43eb43fd25bcba95ca391aa349058a3946551771e4373862a7b1a328cbfe3f4d")
+ version("3.25.1", sha256="dc1b4e910d27bc892be72a66696034bf63f9e5f4aa07d8c1799677b1a8261645")
+ version("3.24.0", sha256="a5a9d091e032a3bbdb383eb3bc5609fd3e57367907f3d07e3270f21ef6758074")
+ version("3.21.01", sha256="36dd20235d924b975c167a450943d5f70c9e76d95eea0f55c68b0eead6c99e47")
+ version("3.21.00", sha256="c36070916691bd4137a6a21aced2efd730cfe31a17819cf94511351b6edfec8d")
+ version("3.20.05", sha256="dae829821dbc4d662818f5593e9899b482878c993c4fdebcd6e7bfd4b6e0a9fe")
+ version("3.20.04", sha256="6ccec85d1c89e75a941dafd75fccba7ef205f44a79508d9deeca03337cd084aa")
+ version("3.20.03", sha256="3a7609f12f6da279e6dbef07986aa7128f4bd9876c80eaa44a1af089694c1f43")
+ version("3.20.02", sha256="f1afcd204890a0a5c26b192d36428581770d5855ee54db51b69b7a2c5ac0b944")
+ version("3.20.01", sha256="bd8862de38b972d27a802f1e69fee000fe8dd14e85fa10709ce9f897122ade13")
+ version("3.20.00", sha256="510998cb984fdbcb38b46711bef475df44dd04c5d72a083c4d28b1d5757e0539")
+ version("3.19.12", sha256="a908a93fbfada1faea605aad49082d5fd8b4c4d387658975313fb1441a15ae55")
+ version("3.19.11", sha256="c426324ca0be497619185ee066e62758d071672ce5402350bfe40eff91c9565d")
+ version("3.19.9", sha256="96e68f455989d523343cdd0513019c9cd9486bcc417962e80b6ffcc7daa3b78d")
+ version("3.14.0", sha256="1490f2504bdbd2960cba35fc552b762e3842d77ed5227f84ddabfde546fe6810")
+
+ def install(self, a, b):
+ install_tree("cmakemodules", self.prefix.cmakemodules)
+
+ def url_for_version(self, version):
+ # contrary to iLCSoft packages, here the patch version is kept when 0
+ base_url = self.url[: self.url.rfind("/")]
+ major = str(version[0]).zfill(2)
+ minor = str(version[1]).zfill(2)
+ patch = str(version[2]).zfill(2)
+ url = base_url + "/v%s-%s-%s.tar.gz" % (major, minor, patch)
+ return url
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set("PANDORAPFA", self.prefix)
+
+ def setup_run_environment(self, env):
+ env.set("PANDORAPFA", self.prefix)
diff --git a/var/spack/repos/builtin/packages/pandorasdk/package.py b/var/spack/repos/builtin/packages/pandorasdk/package.py
new file mode 100644
index 0000000000..92286d5b50
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pandorasdk/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Pandorasdk(CMakePackage):
+ """Pandora Software Development Kit for pattern-recognition algorithms"""
+
+ url = "https://github.com/PandoraPFA/PandoraSDK/archive/v03-04-00.tar.gz"
+ homepage = "https://github.com/PandoraPFA/PandoraSDK"
+ git = "https://github.com/PandoraPFA/PandoraSDK.git"
+
+ tags = ["hep"]
+
+ maintainers("jmcarcell", "wdconinc")
+
+ version("master", branch="master")
+ version("3.4.2", sha256="e076adb2e3d28d3ac5dcc06bcc6e96815d23ef7782e1a87842b1e3e96e194994")
+ version("3.4.1", sha256="9607bf52a9d79d88d28c45d4f3336e066338b36ab81b4d2d125226f4ad3a7aaf")
+ version("3.4.0", sha256="1e30db056d4a43f8659fccdda00270af14593425d933f91e91d5c97f1e124c6b")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("pandorapfa")
+
+ def cmake_args(self):
+ args = [
+ self.define("LC_PANDORA_CONTENT", True),
+ self.define("LAR_PANDORA_CONTENT", True),
+ self.define("CMAKE_MODULE_PATH", self.spec["pandorapfa"].prefix.cmakemodules),
+ self.define("CMAKE_CXX_FLAGS", "-std=c++17"),
+ ]
+ return args
+
+ def url_for_version(self, version):
+ # contrary to iLCSoft packages, here the patch version is kept when 0
+ base_url = self.url[: self.url.rfind("/")]
+ major = str(version[0]).zfill(2)
+ minor = str(version[1]).zfill(2)
+ patch = str(version[2]).zfill(2)
+ url = base_url + "/v%s-%s-%s.tar.gz" % (major, minor, patch)
+ return url
diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py
index 69ecc81f0d..ae032673aa 100644
--- a/var/spack/repos/builtin/packages/pango/package.py
+++ b/var/spack/repos/builtin/packages/pango/package.py
@@ -19,6 +19,11 @@ class Pango(MesonPackage):
license("LGPL-2.1-or-later")
+ # Do not upgrade to v1.90.x. It is a development release in preparation for
+ # v2.0 that will break API and ABI compatibility. For more information see
+ # https://download.gnome.org/sources/pango/1.90/pango-1.90.0.news
+ version("1.54.0", sha256="8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8")
+ version("1.52.2", sha256="d0076afe01082814b853deec99f9349ece5f2ce83908b8e58ff736b41f78a96b")
version("1.50.13", sha256="5cdcf6d761d26a3eb9412b6cb069b32bd1d9b07abf116321167d94c2189299fd")
version("1.50.7", sha256="0477f369a3d4c695df7299a6989dc004756a7f4de27eecac405c6790b7e3ad33")
version("1.49.4", sha256="1fda6c03161bd1eacfdc349244d26828c586d25bfc600b9cfe2494902fdf56cf")
@@ -26,36 +31,26 @@ class Pango(MesonPackage):
version("1.47.0", sha256="730db8652fc43188e03218c3374db9d152351f51fc7011b9acae6d0a6c92c367")
version("1.46.2", sha256="d89fab5f26767261b493279b65cfb9eb0955cd44c07c5628d36094609fc51841")
version("1.45.5", sha256="f61dd911de2d3318b43bbc56bd271637a46f9118a1ee4378928c06df8a1c1705")
- version("1.44.6", sha256="3e1e41ba838737e200611ff001e3b304c2ca4cdbba63d200a20db0b0ddc0f86c")
- version("1.42.4", sha256="1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d")
- version(
- "1.42.0",
- sha256="9924d88a3dcedff753f0763814a1605307c5c9c931413b8b47ea7267d1b19446",
- deprecated=True,
- )
- version(
- "1.41.0",
- sha256="1f76ef95953dc58ee5d6a53e5f1cb6db913f3e0eb489713ee9266695cae580ba",
- deprecated=True,
- )
- version(
- "1.40.3",
- sha256="abba8b5ce728520c3a0f1535eab19eac3c14aeef7faa5aded90017ceac2711d3",
- deprecated=True,
- )
- version(
- "1.40.1",
- sha256="e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40",
- deprecated=True,
- )
- version(
- "1.36.8",
- sha256="18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2019-1010238
+ version(
+ "1.44.6", sha256="3e1e41ba838737e200611ff001e3b304c2ca4cdbba63d200a20db0b0ddc0f86c"
+ )
+ version(
+ "1.42.4", sha256="1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("X", default=False, description="Enable an X toolkit")
+ depends_on("meson@0.48:", type="build", when="@1.43:")
+ depends_on("meson@0.50:", type="build", when="@1.44.4:")
+ depends_on("meson@0.54:", type="build", when="@1.48.0:")
+ depends_on("meson@0.55.3:", type="build", when="@1.48.1:")
+ depends_on("meson@0.60:", type="build", when="@1.50.13:")
+ depends_on("meson@0.63:", type="build", when="@1.54:")
depends_on("pkgconfig@0.9.0:", type="build")
depends_on("harfbuzz")
depends_on("harfbuzz+coretext", when="platform=darwin")
@@ -97,16 +92,19 @@ class Pango(MesonPackage):
return url.format(version.up_to(2), version)
def meson_args(self):
+ spec = self.spec
args = []
# xft is not a meson option, even when it is a configure option
- if self.spec.satisfies("@1.49: +X"):
+ if spec.satisfies("@1.49: +X"):
args.append("-Dxft=enabled")
- elif self.spec.satisfies("@1.49: -X"):
+ elif spec.satisfies("@1.49: -X"):
args.append("-Dxft=disabled")
# disable building of gtk-doc files following #9885 and #9771
- if self.spec.satisfies("@1.44:"):
+ if spec.satisfies("@1.54:"):
+ args.append("-Ddocumentation=false")
+ elif spec.satisfies("@1.44:"):
args.append("-Dgtk_doc=false")
else:
args.append("-Denable_docs=false")
@@ -124,10 +122,10 @@ class Pango(MesonPackage):
# disable building of gtk-doc files following #9885 and #9771
args.append("--disable-gtk-doc-html")
true = which("true")
- args.append("GTKDOC_CHECK={0}".format(true))
- args.append("GTKDOC_CHECK_PATH={0}".format(true))
- args.append("GTKDOC_MKPDF={0}".format(true))
- args.append("GTKDOC_REBASE={0}".format(true))
+ args.append(f"GTKDOC_CHECK={true}")
+ args.append(f"GTKDOC_CHECK_PATH={true}")
+ args.append(f"GTKDOC_MKPDF={true}")
+ args.append(f"GTKDOC_REBASE={true}")
return args
diff --git a/var/spack/repos/builtin/packages/pangolin/package.py b/var/spack/repos/builtin/packages/pangolin/package.py
index 1cde66335f..d7d7108c4b 100644
--- a/var/spack/repos/builtin/packages/pangolin/package.py
+++ b/var/spack/repos/builtin/packages/pangolin/package.py
@@ -18,6 +18,8 @@ class Pangolin(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
# Required dependencies
depends_on("cmake@2.8.12:", type="build")
depends_on("gl")
diff --git a/var/spack/repos/builtin/packages/pangomm/package.py b/var/spack/repos/builtin/packages/pangomm/package.py
index d09c682720..032694b8e0 100644
--- a/var/spack/repos/builtin/packages/pangomm/package.py
+++ b/var/spack/repos/builtin/packages/pangomm/package.py
@@ -32,6 +32,8 @@ class Pangomm(AutotoolsPackage):
version("2.14.1", sha256="2ea6cee273cca1aae2ee5a5dac0c416b4dc354e46debb51f20c6eeba828f5ed5")
version("2.14.0", sha256="baa3b231c9498fb1140254e3feb4eb93c638f07e6e26ae0e36c3699ec14d80fd")
+ depends_on("cxx", type="build") # generated
+
depends_on("pango")
depends_on("glibmm")
depends_on("cairomm")
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py
index e42471849f..8d068108b3 100644
--- a/var/spack/repos/builtin/packages/papi/package.py
+++ b/var/spack/repos/builtin/packages/papi/package.py
@@ -9,6 +9,7 @@ import sys
import llnl.util.filesystem as fs
+import spack.util.environment
from spack.package import *
@@ -33,7 +34,7 @@ class Papi(AutotoolsPackage, ROCmPackage):
license("BSD-3-Clause")
version("master", branch="master")
- version("7.1.0", sha256="950d0e997e9e908f58c103efd54983e905b6cffa75ef52ed8fdd1ab441977bb6")
+ version("7.1.0", sha256="5818afb6dba3ece57f51e65897db5062f8e3464e6ed294b654ebf34c3991bc4f")
version("7.0.1", sha256="c105da5d8fea7b113b0741a943d467a06c98db959ce71bdd9a50b9f03eecc43e")
# Note: version 7.0.0 is omitted due to build issues, see PR 33940 for more information
version("6.0.0.1", sha256="3cd7ed50c65b0d21d66e46d0ba34cd171178af4bbf9d94e693915c1aca1e287f")
@@ -46,6 +47,10 @@ class Papi(AutotoolsPackage, ROCmPackage):
version("5.4.1", sha256="e131c1449786fe870322a949e44f974a5963824f683232e653fb570cc65d4e87")
version("5.3.0", sha256="99f2f36398b370e75d100b4a189d5bc0ac4f5dd66df44d441f88fd32e1421524")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("example", default=True, description="Install the example files")
variant("infiniband", default=False, description="Enable Infiniband support")
variant("powercap", default=False, description="Enable powercap interface support")
@@ -55,6 +60,12 @@ class Papi(AutotoolsPackage, ROCmPackage):
variant("cuda", default=False, description="Enable CUDA support")
variant("nvml", default=False, description="Enable NVML support")
variant("rocm_smi", default=False, description="Enable ROCm SMI support")
+ variant(
+ "rdpmc",
+ default=True,
+ when="@6.0.0:",
+ description="Enable use of rdpmc for reading counters, when possible",
+ )
variant("shared", default=True, description="Build shared libraries")
# PAPI requires building static libraries, so there is no "static" variant
@@ -68,12 +79,16 @@ class Papi(AutotoolsPackage, ROCmPackage):
depends_on("cuda", when="+nvml")
depends_on("hsa-rocr-dev", when="+rocm")
depends_on("rocprofiler-dev", when="+rocm")
- depends_on("llvm-amdgpu +openmp", when="+rocm")
+ depends_on("llvm-amdgpu", when="+rocm")
+ depends_on("rocm-openmp-extras", when="+rocm")
depends_on("rocm-smi-lib", when="+rocm_smi")
conflicts("%gcc@8:", when="@5.3.0", msg="Requires GCC version less than 8.0")
conflicts("+sde", when="@:5", msg="Software defined events (SDE) added in 6.0.0")
conflicts("^cuda", when="@:5", msg="CUDA support for versions < 6.0.0 not implemented")
+ # https://github.com/icl-utk-edu/papi/pull/205
+ conflicts("^cuda@12.4:", when="@:7.1")
+ conflicts("%cce", when="@7.1:", msg="-ffree-form flag not recognized")
conflicts("@=6.0.0", when="+static_tools", msg="Static tools cannot build on version 6.0.0")
@@ -153,6 +168,9 @@ class Papi(AutotoolsPackage, ROCmPackage):
build_shared = "yes" if "+shared" in spec else "no"
options.append("--with-shared-lib=" + build_shared)
+ build_rdpmc_support = "yes" if "+rdpmc" in spec else "no"
+ options.append("--enable-perfevent-rdpmc=" + build_rdpmc_support)
+
if "+static_tools" in spec:
options.append("--with-static-tools")
@@ -203,7 +221,7 @@ class Papi(AutotoolsPackage, ROCmPackage):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
if os.path.exists(self.test_src_dir):
- self.cache_extra_test_sources([self.test_src_dir])
+ cache_extra_test_sources(self, [self.test_src_dir])
def test_smoke(self):
"""Compile and run simple code against the installed papi library."""
diff --git a/var/spack/repos/builtin/packages/papyrus/package.py b/var/spack/repos/builtin/packages/papyrus/package.py
index 76703751c4..4540559362 100644
--- a/var/spack/repos/builtin/packages/papyrus/package.py
+++ b/var/spack/repos/builtin/packages/papyrus/package.py
@@ -26,6 +26,9 @@ class Papyrus(CMakePackage):
depends_on("mpi")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
test_requires_compiler = True
def setup_run_environment(self, env):
@@ -42,7 +45,7 @@ class Papyrus(CMakePackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(join_path("kv", "tests"))
+ cache_extra_test_sources(self, join_path("kv", "tests"))
@property
def _lib_dir(self):
diff --git a/var/spack/repos/builtin/packages/parallel-hashmap/package.py b/var/spack/repos/builtin/packages/parallel-hashmap/package.py
index 327c9ce394..f402ef6d28 100644
--- a/var/spack/repos/builtin/packages/parallel-hashmap/package.py
+++ b/var/spack/repos/builtin/packages/parallel-hashmap/package.py
@@ -15,8 +15,20 @@ class ParallelHashmap(CMakePackage):
license("Apache-2.0")
+ version("1.3.12", sha256="0cc203144321924cfbfcc401f42d8204c0dd24e2760c7a1c091baa16d9777c08")
version("1.3.11", sha256="0515a681bfb24207013786a7737e9d8561302e656689d8a65ea480bbabab460f")
+ variant("examples", description="Build examples", default=False)
+
+ depends_on("cxx", type="build")
depends_on("cmake@3.8:", type="build")
patch("pthread.patch")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("PHMAP_BUILD_EXAMPLES", "examples"),
+ self.define("PHMAP_BUILD_TESTS", False), # disable due to vendored gtest
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
index ee67a43b0c..67b7cd867b 100644
--- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
@@ -5,6 +5,8 @@
import os
+import llnl.util.tty as tty
+
from spack.package import *
@@ -27,11 +29,11 @@ class ParallelNetcdf(AutotoolsPackage):
def url_for_version(self, version):
if version >= Version("1.11.0"):
- url = "https://parallel-netcdf.github.io/Release/pnetcdf-{0}.tar.gz"
+ url = f"https://parallel-netcdf.github.io/Release/pnetcdf-{version.dotted}.tar.gz"
else:
- url = "https://parallel-netcdf.github.io/Release/parallel-netcdf-{0}.tar.gz"
+ url = f"https://parallel-netcdf.github.io/Release/parallel-netcdf-{version.dotted}.tar.gz"
- return url.format(version.dotted)
+ return url
version("master", branch="master")
version("1.12.3", sha256="439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77")
@@ -47,6 +49,10 @@ class ParallelNetcdf(AutotoolsPackage):
version("1.7.0", sha256="52f0d106c470a843c6176318141f74a21e6ece3f70ee8fe261c6b93e35f70a94")
version("1.6.1", sha256="8cf1af7b640475e3cc931e5fbcfe52484c5055f2fab526691933c02eda388aae")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("cxx", default=True, description="Build the C++ Interface")
variant("fortran", default=True, description="Build the Fortran Interface")
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
@@ -97,10 +103,9 @@ class ParallelNetcdf(AutotoolsPackage):
if libs:
return libs
- msg = "Unable to recursively locate {0} {1} libraries in {2}"
- raise spack.error.NoLibrariesError(
- msg.format("shared" if shared else "static", self.spec.name, self.spec.prefix)
- )
+ msg = f"Unable to recursively locate {'shared' if shared else 'static'} \
+{self.spec.name} libraries in {self.spec.prefix}"
+ raise NoLibrariesError(msg)
@when("@master")
def autoreconf(self, spec, prefix):
@@ -130,7 +135,7 @@ class ParallelNetcdf(AutotoolsPackage):
for key, value in sorted(flags.items()):
if value:
- args.append("{0}={1}".format(key, " ".join(value)))
+ args.append(f"{key}={' '.join(value)}")
if self.version >= Version("1.8"):
args.append("--enable-relax-coord-bound")
@@ -153,46 +158,46 @@ class ParallelNetcdf(AutotoolsPackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
- def test(self):
+ def test_column_wise(self):
+ """build and run column_wise"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
# pnetcdf has many examples to serve as a suitable smoke check.
# column_wise was chosen based on the E4S test suite. Other
# examples should work as well.
test_exe = "column_wise"
options = [
- "{0}.cpp".format(test_exe),
+ f"{test_exe}.cpp",
"-o",
test_exe,
"-lpnetcdf",
- "-L{0}".format(self.prefix.lib),
- "-I{0}".format(self.prefix.include),
+ f"-L{self.prefix.lib}",
+ f"-I{self.prefix.include}",
]
- reason = "test: compiling and linking pnetcdf example"
- self.run_test(
- self.spec["mpi"].mpicxx,
- options,
- [],
- installed=False,
- purpose=reason,
- work_dir=test_dir,
- )
- mpiexe_list = [
- self.spec["mpi"].prefix.bin.srun,
- self.spec["mpi"].prefix.bin.mpirun,
- self.spec["mpi"].prefix.bin.mpiexec,
- ]
- for mpiexe in mpiexe_list:
- if os.path.isfile(mpiexe):
- self.run_test(
- mpiexe,
- ["-n", "1", test_exe],
- [],
- installed=False,
- purpose="test: pnetcdf smoke test",
- skip_missing=True,
- work_dir=test_dir,
- )
- break
- self.run_test("rm", ["-f", test_exe], work_dir=test_dir)
+
+ with working_dir(test_dir):
+ mpicxx = which(self.spec["mpi"].prefix.bin.mpicxx)
+ mpicxx(*options)
+
+ mpiexe_list = [
+ "srun",
+ self.spec["mpi"].prefix.bin.mpirun,
+ self.spec["mpi"].prefix.bin.mpiexec,
+ ]
+
+ for mpiexe in mpiexe_list:
+ tty.info(f"Attempting to build and launch with {os.path.basename(mpiexe)}")
+ try:
+ args = ["--immediate=30"] if mpiexe == "srun" else []
+ args += ["-n", "1", test_exe]
+ exe = which(mpiexe)
+ exe(*args)
+ rm = which("rm")
+ rm("-f", "column_wise")
+ return
+
+ except (Exception, ProcessError) as err:
+ tty.info(f"Skipping {mpiexe}: {str(err)}")
+
+ assert False, "No MPI executable was found"
diff --git a/var/spack/repos/builtin/packages/parallel/package.py b/var/spack/repos/builtin/packages/parallel/package.py
index 51b6b9ca89..ced0386a4d 100644
--- a/var/spack/repos/builtin/packages/parallel/package.py
+++ b/var/spack/repos/builtin/packages/parallel/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.hooks.sbang import filter_shebang
from spack.package import *
@@ -15,8 +16,9 @@ class Parallel(AutotoolsPackage, GNUMirrorPackage):
homepage = "https://www.gnu.org/software/parallel/"
gnu_mirror_path = "parallel/parallel-20220522.tar.bz2"
- license("GPL-3.0-or-later")
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+ version("20240822", sha256="d7bbd95b7631980b172be04cbd2138d5f7d8c063d6da5ad8f9f70dfd88c8309d")
version("20220522", sha256="bb6395f8d964e68f3bdb26a764d3c48b69bc5b759a92ac3ab2bd1895c7fa8c1f")
version("20220422", sha256="96e4b73fff1302fc141a889ae43ab2e93f6c9e86ac60ef62ced02dbe70b73ca7")
version("20220322", sha256="df93ccf6a9f529ad2126b7042aef0486603e938c77b405939c41702d38a4e6d8")
@@ -46,6 +48,9 @@ class Parallel(AutotoolsPackage, GNUMirrorPackage):
with working_dir("src"):
match = "^#!/usr/bin/env perl|^#!/usr/bin/perl.*"
- substitute = "#!{perl}".format(perl=perl)
+ substitute = f"#!{perl}"
files = ["parallel", "niceload", "parcat", "sql"]
filter_file(match, substitute, *files, **kwargs)
+ # Since scripts are run during installation, we need to add sbang
+ for file in files:
+ filter_shebang(file)
diff --git a/var/spack/repos/builtin/packages/parallelio/package.py b/var/spack/repos/builtin/packages/parallelio/package.py
index 2cf9f2c8c5..51a78a76cc 100644
--- a/var/spack/repos/builtin/packages/parallelio/package.py
+++ b/var/spack/repos/builtin/packages/parallelio/package.py
@@ -30,6 +30,10 @@ class Parallelio(CMakePackage):
version("2.5.3", sha256="205a0a128fd5262700efc230b3380dc5ab10e74bc5d273ae05db76c9d95487ca")
version("2.5.2", sha256="935bc120ef3bf4fe09fb8bfdf788d05fb201a125d7346bf6b09e27ac3b5f345c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("pnetcdf", default=False, description="enable pnetcdf")
variant("timing", default=False, description="enable GPTL timing")
variant("ncint", default=False, description="enable netcdf integration", when="@2.6.0:")
@@ -66,6 +70,11 @@ class Parallelio(CMakePackage):
# Allow argument mismatch in gfortran versions > 10 for mpi library compatibility
patch("gfortran.patch", when="@:2.5.8 +fortran %gcc@10:")
+ @run_after("install", when="platform=darwin")
+ def darwin_install_name(self):
+ # The shared library is not installed correctly on Darwin; fix this
+ fix_darwin_install_name(self.prefix.lib)
+
def cmake_args(self):
define = self.define
define_from_variant = self.define_from_variant
diff --git a/var/spack/repos/builtin/packages/parallelmergetree/package.py b/var/spack/repos/builtin/packages/parallelmergetree/package.py
index 639d768914..4e27759a58 100644
--- a/var/spack/repos/builtin/packages/parallelmergetree/package.py
+++ b/var/spack/repos/builtin/packages/parallelmergetree/package.py
@@ -57,6 +57,9 @@ class Parallelmergetree(CMakePackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("babelflow@1.1.0", when="@1.1.2")
depends_on("babelflow@1.1.0", when="@1.1.1")
depends_on("babelflow@1.1.0", when="@1.1.0")
diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py
index 530bb34017..3098ab8c46 100644
--- a/var/spack/repos/builtin/packages/paraver/package.py
+++ b/var/spack/repos/builtin/packages/paraver/package.py
@@ -32,6 +32,9 @@ class Paraver(Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.36: +serialization")
depends_on("wxwidgets@2.8:") # NOTE: using external for this one is usually simpler
depends_on("wxpropgrid@1.4:")
diff --git a/var/spack/repos/builtin/packages/paraview/kits_with_catalyst_5_12.patch b/var/spack/repos/builtin/packages/paraview/kits_with_catalyst_5_12.patch
new file mode 100644
index 0000000000..f61767fd64
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paraview/kits_with_catalyst_5_12.patch
@@ -0,0 +1,21 @@
+From 65ec5b0604576474141def0ba7f0c7b94f6b32ee Mon Sep 17 00:00:00 2001
+From: Ryan Krattiger <ryan.krattiger@kitware.com>
+Date: Fri, 8 Mar 2024 09:17:03 -0600
+
+---
+ VTK/IO/CatalystConduit/vtk.module | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/VTK/IO/CatalystConduit/vtk.module b/VTK/IO/CatalystConduit/vtk.module
+index c67f5a099d5..18e706e8c9f 100644
+--- a/VTK/IO/CatalystConduit/vtk.module
++++ b/VTK/IO/CatalystConduit/vtk.module
+@@ -5,7 +5,7 @@ LIBRARY_NAME
+ DESCRIPTION
+ Catalyst implementation for VTK, including Conduit to/from VTK conversion.
+ KIT
+- VTK::IO
++ VTK::Parallel
+ SPDX_LICENSE_IDENTIFIER
+ BSD-3-Clause
+ SPDX_COPYRIGHT_TEXT
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 4cd298af9a..442bd2b12c 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -5,10 +5,14 @@
import itertools
import os
+import re
import sys
+from subprocess import Popen
from spack.package import *
+IS_WINDOWS = sys.platform == "win32"
+
class Paraview(CMakePackage, CudaPackage, ROCmPackage):
"""ParaView is an open-source, multi-platform data analysis and
@@ -31,13 +35,14 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master", submodules=True)
version(
- "5.12.0-RC1", sha256="892eda2ae72831bbadd846be465d496ada35739779229c604cddd56e018a1aea"
- )
- version(
- "5.11.2",
- sha256="5c5d2f922f30d91feefc43b4a729015dbb1459f54c938896c123d2ac289c7a1e",
+ "5.13.1",
+ sha256="a16503ce37b999c2967d84234596e7bf67ac98221851a288bb1399c7e1dc2004",
preferred=True,
)
+ version("5.13.0", sha256="886f530bebd6b24c6a7f8a5f4b1afa72c53d4737ccaa4b5fd5946b4e5a758c91")
+ version("5.12.1", sha256="927f880c13deb6dde4172f4727d2b66f5576e15237b35778344f5dd1ddec863e")
+ version("5.12.0", sha256="d289afe7b48533e2ca4a39a3b48d3874bfe67cf7f37fdd2131271c57e64de20d")
+ version("5.11.2", sha256="5c5d2f922f30d91feefc43b4a729015dbb1459f54c938896c123d2ac289c7a1e")
version("5.11.1", sha256="5cc2209f7fa37cd3155d199ff6c3590620c12ca4da732ef7698dec37fa8dbb34")
version("5.11.0", sha256="9a0b8fe8b1a2cdfd0ace9a87fa87e0ec21ee0f6f0bcb1fdde050f4f585a25165")
version("5.10.1", sha256="520e3cdfba4f8592be477314c2f6c37ec73fb1d5b25ac30bdbd1c5214758b9c2")
@@ -60,6 +65,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
version("5.0.1", sha256="caddec83ec284162a2cbc46877b0e5a9d2cca59fb4ab0ea35b0948d2492950bb")
version("4.4.0", sha256="c2dc334a89df24ce5233b81b74740fc9f10bc181cd604109fd13f6ad2381fc73")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"development_files",
default=True,
@@ -68,8 +77,6 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
variant("python", default=False, description="Enable Python support", when="@5.6:")
variant("fortran", default=False, description="Enable Fortran support")
variant("mpi", default=True, description="Enable MPI support")
- variant("osmesa", default=False, description="Enable OSMesa support")
- variant("egl", default=False, description="Enable EGL in the OpenGL library being used")
variant("qt", default=False, description="Enable Qt (gui) support")
variant("opengl2", default=True, description="Enable OpenGL2 backend")
variant("examples", default=False, description="Build examples")
@@ -81,8 +88,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
variant("nvindex", default=False, description="Enable the pvNVIDIAIndeX plugin")
variant("tbb", default=False, description="Enable multi-threaded parallelism with TBB")
variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:")
+ variant("fides", default=False, description="Enable Fides support", when="@5.9:")
variant("visitbridge", default=False, description="Enable VisItBridge support")
variant("raytracing", default=False, description="Enable Raytracing support")
+ variant("cdi", default=False, description="Enable CDI support")
variant(
"openpmd",
default=False,
@@ -122,6 +131,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
conflicts("~hdf5", when="+visitbridge")
conflicts("+adios2", when="@:5.10 ~mpi")
+ conflicts("+fides", when="~adios2", msg="Fides needs ADIOS2")
+ conflicts("+fides", when="use_vtkm=off", msg="Fides needs VTK-m")
+ conflicts("+fides", when="use_vtkm=default", msg="Fides needs VTK-m")
conflicts("+openpmd", when="~adios2 ~hdf5", msg="openPMD needs ADIOS2 and/or HDF5")
conflicts("~shared", when="+cuda")
conflicts("+cuda", when="@5.8:5.10")
@@ -147,6 +159,43 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
msg="Use paraview@5.9.0 with %xl_r. Earlier versions are not able to build with xl.",
)
+ # CUDA ARCH
+
+ # This is (more or less) the mapping hard-coded in VTK-m logic
+ # see https://gitlab.kitware.com/vtk/vtk-m/-/blob/v2.1.0/CMake/VTKmDeviceAdapters.cmake?ref_type=tags#L221-247
+ supported_cuda_archs = {
+ "20": "fermi",
+ "21": "fermi",
+ "30": "kepler",
+ "32": "kepler",
+ "35": "kepler",
+ "37": "kepler",
+ "50": "maxwel",
+ "52": "maxwel",
+ "53": "maxwel",
+ "60": "pascal",
+ "61": "pascal",
+ "62": "pascal",
+ "70": "volta",
+ "72": "volta",
+ "75": "turing",
+ "80": "ampere",
+ "86": "ampere",
+ }
+
+ # VTK-m and transitively ParaView does not support Tesla Arch
+ for _arch in range(10, 14):
+ conflicts(f"cuda_arch={_arch}", when="+cuda", msg="ParaView requires cuda_arch >= 20")
+
+ # Starting from cmake@3.18, CUDA architecture managament can be delegated to CMake.
+ # Hence, it is possible to rely on it instead of relying on custom logic updates from VTK-m for
+ # newer architectures (wrt mapping).
+ pattern = re.compile(r"\d+")
+ for _arch in CudaPackage.cuda_arch_values:
+ _number = re.match(pattern, _arch).group()
+ if int(_number) > 86:
+ conflicts("cmake@:3.17", when=f"cuda_arch={_arch}")
+
# We only support one single Architecture
for _arch, _other_arch in itertools.permutations(CudaPackage.cuda_arch_values, 2):
conflicts(
@@ -155,9 +204,6 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
msg="Paraview only accepts one architecture value",
)
- for _arch in range(10, 14):
- conflicts("cuda_arch=%d" % _arch, when="+cuda", msg="ParaView requires cuda_arch >= 20")
-
depends_on("cmake@3.3:", type="build")
depends_on("cmake@3.21:", type="build", when="+rocm")
@@ -183,32 +229,37 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
depends_on("tbb", when="+tbb")
depends_on("mpi", when="+mpi")
- depends_on("qt+opengl", when="@5.3.0:+qt+opengl2")
- depends_on("qt~opengl", when="@5.3.0:+qt~opengl2")
+ conflicts("mpi", when="~mpi")
+
depends_on("qt@:4", when="@:5.2.0+qt")
+ depends_on("qt+sql", when="+qt")
+ with when("+qt"):
+ depends_on("qt+opengl", when="@5.3.0:+opengl2")
+ depends_on("qt~opengl", when="@5.3.0:~opengl2")
depends_on("gl@3.2:", when="+opengl2")
depends_on("gl@1.2:", when="~opengl2")
- depends_on("glew", when="~egl")
- depends_on("glew gl=egl", when="+egl")
+ depends_on("glew")
+ depends_on("libxt", when="platform=linux ^[virtuals=gl] glx")
- depends_on("osmesa", when="+osmesa")
- for p in ["linux", "cray"]:
- depends_on("glx", when="~egl ~osmesa platform={}".format(p))
- depends_on("libxt", when="~egl ~osmesa platform={}".format(p))
- conflicts("+qt", when="+osmesa")
- conflicts("+qt", when="+egl")
- conflicts("+egl", when="+osmesa")
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ requires(
+ "^[virtuals=gl] glx", when="+qt", msg="Qt support requires GLX on non Windows"
+ )
depends_on("ospray@2.1:2", when="+raytracing")
depends_on("openimagedenoise", when="+raytracing")
depends_on("ospray +mpi", when="+raytracing +mpi")
+ depends_on("cdi", when="+cdi")
+
depends_on("bzip2")
depends_on("double-conversion")
depends_on("expat")
depends_on("eigen@3:")
depends_on("freetype")
+ depends_on("freetype@:2.10.2", when="@:5.8")
# depends_on('hdf5+mpi', when='+mpi')
# depends_on('hdf5~mpi', when='~mpi')
depends_on("hdf5+hl+mpi", when="+hdf5+mpi")
@@ -227,7 +278,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
depends_on("libtheora")
depends_on("libtiff")
depends_on("netcdf-c")
- depends_on("pegtl")
+ depends_on("pegtl@2.8.3")
depends_on("protobuf@3.4:")
# Paraview 5.10 can't build with protobuf > 3.18
# https://github.com/spack/spack/issues/37437
@@ -236,8 +287,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
depends_on("protobuf@3.4:3.18", when="@:5.10%xl")
depends_on("protobuf@3.4:3.18", when="@:5.10%xl_r")
# protobuf requires newer abseil-cpp, which in turn requires C++14,
- # but paraview uses C++11 by default. Use for 5.11+ until ParaView updates
+ # but paraview uses C++11 by default. Use for 5.8+ until ParaView updates
# its C++ standard level.
+ depends_on("protobuf@3.4:3.21", when="@5.8:%gcc")
+ depends_on("protobuf@3.4:3.21", when="@5.8:%clang")
depends_on("protobuf@3.4:3.21", when="@5.11:")
depends_on("protobuf@3.4:3.21", when="@master")
depends_on("libxml2")
@@ -256,6 +309,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# and pre-5.9 is unable to handle that.
depends_on("pugixml@:1.10", when="@:5.8")
depends_on("pugixml", when="@5.9:")
+ # 5.13 uses 'remove_children': https://github.com/spack/spack/issues/47098
+ depends_on("pugixml@1.11:", when="@5.13:")
# ParaView depends on cli11 due to changes in MR
# https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4951
@@ -270,6 +325,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8474
depends_on("proj@8.1.0", when="@5.11:")
+ # Patches to vendored VTK-m are needed for forward compat with CUDA 12 (mr 2972 and 3259)
+ depends_on("cuda@:11", when="+cuda")
+
patch("stl-reader-pv440.patch", when="@4.4.0")
# Broken gcc-detection - improved in 5.1.0, redundant later
@@ -288,7 +346,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
patch("vtkm-findmpi-downstream.patch", when="@5.9.0")
# Include limits header wherever needed to fix compilation with GCC 11
- patch("paraview-gcc11-limits.patch", when="@5.9.1 %gcc@11.1.0:")
+ patch("paraview-gcc11-limits.patch", when="@5.8:5.9 %gcc@11.1.0:")
# Fix IOADIOS2 module to work with kits
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8653
@@ -301,10 +359,14 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# intel oneapi doesn't compile some code in catalyst
patch("catalyst-etc_oneapi_fix.patch", when="@5.10.0:5.10.1%oneapi")
- # Patch for paraview 5.10: +hdf5 ^hdf5@1.13.2:
+ # Patch for paraview 5.8: ^hdf5@1.13.2:
+ # Even with ~hdf5, hdf5 is part of the dependency tree due to netcdf-c
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690
- patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.10.0:5.10")
- patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.10:5.11.0")
+ patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.8:5.10")
+ patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.8:5.11.0")
+ # a patch with the same name is also applied to vtk
+ # the two patches are the same but for the path to the files they patch
+ patch("vtk_alias_hdf5.patch", when="@5.9.0: platform=windows")
# Fix VTK to work with external freetype using CONFIG mode for find_package
patch("FindFreetype.cmake.patch", when="@5.10.1:")
@@ -313,7 +375,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10113
patch("adios2-remove-deprecated-functions.patch", when="@5.10:5.11 ^adios2@2.9:")
- patch("exodusII-netcdf4.9.0.patch", when="@:5.10.2")
+ patch("exodusII-netcdf4.9.0.patch", when="@5.10.0:5.10.2")
+
+ patch("kits_with_catalyst_5_12.patch", when="@5.12.0")
generator("ninja", "make", default="ninja")
# https://gitlab.kitware.com/paraview/paraview/-/issues/21223
@@ -368,7 +432,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
elif self.spec.satisfies("@5.10: +hdf5"):
if self.spec["hdf5"].satisfies("@1.12:"):
flags.append("-DH5_USE_110_API")
- return (flags, None, None)
+
+ return flags, None, None
def setup_run_environment(self, env):
# paraview 5.5 and later
@@ -416,19 +481,17 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
def variant_bool(feature, on="ON", off="OFF"):
"""Ternary for spec variant to ON/OFF string"""
- if feature in spec:
+ if spec.satisfies(feature):
return on
return off
- def nvariant_bool(feature):
- """Negated ternary for spec variant to OFF/ON string"""
- return variant_bool(feature, on="OFF", off="ON")
-
def use_x11():
"""Return false if osmesa or egl are requested"""
- if "+osmesa" in spec or "+egl" in spec:
- return "OFF"
- if spec.satisfies("platform=windows"):
+ if (
+ spec.satisfies("^[virtuals=gl] osmesa")
+ or spec.satisfies("^[virtuals=gl] egl")
+ or spec.satisfies("platform=windows")
+ ):
return "OFF"
return "ON"
@@ -436,7 +499,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
includes = variant_bool("+development_files")
cmake_args = [
- "-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("+osmesa"),
+ "-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("^[virtuals=gl] osmesa"),
"-DVTK_USE_X:BOOL=%s" % use_x11(),
"-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s" % includes,
"-DBUILD_TESTING:BOOL=OFF",
@@ -445,7 +508,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("VISIT_BUILD_READER_Silo", "visitbridge"),
]
- if "+egl" in spec:
+ if spec.satisfies("^[virtuals=gl] egl"):
cmake_args.append("-DVTK_OPENGL_HAS_EGL:BOOL=ON")
if spec.satisfies("@5.12:"):
@@ -520,10 +583,16 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
if "+adios2" in spec:
cmake_args.extend(["-DPARAVIEW_ENABLE_ADIOS2:BOOL=ON"])
+ if "+fides" in spec:
+ cmake_args.append("-DPARAVIEW_ENABLE_FIDES:BOOL=ON")
+
# The assumed qt version changed to QT5 (as of paraview 5.2.1),
# so explicitly specify which QT major version is actually being used
- if "+qt" in spec:
+ if spec.satisfies("+qt"):
cmake_args.extend(["-DPARAVIEW_QT_VERSION=%s" % spec["qt"].version[0]])
+ if IS_WINDOWS:
+ # Windows does not currently support Qt Quick
+ cmake_args.append("-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick:STRING=NO")
if "+fortran" in spec:
cmake_args.append("-DPARAVIEW_USE_FORTRAN:BOOL=ON")
@@ -537,7 +606,6 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
cmake_args.extend(
[
"-DPARAVIEW_%s_PYTHON:BOOL=ON" % py_use_opt,
- "-DPYTHON_EXECUTABLE:FILEPATH=%s" % spec["python"].command.path,
"-D%s_PYTHON_VERSION:STRING=%d" % (py_ver_opt, py_ver_val),
]
)
@@ -547,11 +615,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
else:
cmake_args.append("-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF")
+ cmake_args.append("-DPARAVIEW_USE_MPI:BOOL=%s" % variant_bool("+mpi"))
if "+mpi" in spec:
- mpi_args = [
- "-DPARAVIEW_USE_MPI:BOOL=ON",
- "-DMPIEXEC:FILEPATH=%s/bin/mpiexec" % spec["mpi"].prefix,
- ]
+ mpi_args = ["-DMPIEXEC:FILEPATH=%s/bin/mpiexec" % spec["mpi"].prefix]
if not sys.platform == "win32":
mpi_args.extend(
[
@@ -579,38 +645,25 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# VTK-m expects cuda_arch to be the arch name vs. the arch version.
if spec.satisfies("+cuda"):
- supported_cuda_archs = {
- # VTK-m and transitively ParaView does not support Tesla Arch
- "20": "fermi",
- "21": "fermi",
- "30": "kepler",
- "32": "kepler",
- "35": "kepler",
- "37": "kepler",
- "50": "maxwel",
- "52": "maxwel",
- "53": "maxwel",
- "60": "pascal",
- "61": "pascal",
- "62": "pascal",
- "70": "volta",
- "72": "volta",
- "75": "turing",
- "80": "ampere",
- "86": "ampere",
- }
-
- cuda_arch_value = "native"
- requested_arch = spec.variants["cuda_arch"].value
-
- # ParaView/VTK-m only accepts one arch, default to first element
- if requested_arch[0] != "none":
- try:
- cuda_arch_value = supported_cuda_archs[requested_arch[0]]
- except KeyError:
- raise InstallError("Incompatible cuda_arch=" + requested_arch[0])
-
- cmake_args.append(self.define("VTKm_CUDA_Architecture", cuda_arch_value))
+ if spec["cmake"].satisfies("@3.18:"):
+ cmake_args.append(
+ self.define(
+ "CMAKE_CUDA_ARCHITECTURES", ";".join(spec.variants["cuda_arch"].value)
+ )
+ )
+ else:
+ # ParaView/VTK-m only accepts one arch, default to first element
+ requested_arch = spec.variants["cuda_arch"].value[0]
+
+ if requested_arch == "none":
+ cuda_arch_value = "native"
+ else:
+ try:
+ cuda_arch_value = supported_cuda_archs[requested_arch]
+ except KeyError:
+ raise InstallError("Incompatible cuda_arch=" + requested_arch)
+
+ cmake_args.append(self.define("VTKm_CUDA_Architecture", cuda_arch_value))
if "darwin" in spec.architecture:
cmake_args.extend(
@@ -682,4 +735,59 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
cmake_args.append(self.define_from_variant("VTK_ENABLE_OSPRAY", "raytracing"))
cmake_args.append(self.define_from_variant("VTKOSPRAY_ENABLE_DENOISER", "raytracing"))
+ # CDI
+ cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_ENABLE_CDIReader", "cdi"))
+ cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_AUTOLOAD_CDIReader", "cdi"))
+
return cmake_args
+
+ def test_smoke_test(self):
+ """Simple smoke test for ParaView"""
+ spec = self.spec
+
+ pvserver = Executable(spec["paraview"].prefix.bin.pvserver)
+ pvserver("--help")
+
+ def test_pvpython(self):
+ """Test pvpython"""
+ spec = self.spec
+
+ if "~python" in spec:
+ raise SkipTest("Package must be installed with +python")
+
+ pvpython = Executable(spec["paraview"].prefix.bin.pvpython)
+ pvpython("-c", "import paraview")
+
+ def test_mpi_ensemble(self):
+ """Test MPI ParaView Client/Server ensemble"""
+ spec = self.spec
+
+ if "~mpi" in spec or "~python" in spec:
+ raise SkipTest("Package must be installed with +mpi and +python")
+
+ mpirun = spec["mpi"].prefix.bin.mpirun
+ pvserver = spec["paraview"].prefix.bin.pvserver
+ pvpython = Executable(spec["paraview"].prefix.bin.pvpython)
+
+ with working_dir("smoke_test_build", create=True):
+ with Popen(
+ [mpirun, "-np", "3", pvserver, "--mpi", "--force-offscreen-rendering"]
+ ) as servers:
+ pvpython(
+ "--force-offscreen-rendering",
+ "-c",
+ "from paraview.simple import *;"
+ "Connect('127.0.0.1');"
+ "sphere = Sphere(ThetaResolution=16, PhiResolution=32);"
+ "sphere_remote = servermanager.Fetch(sphere);"
+ "Show(sphere);"
+ "Render()",
+ )
+ servers.terminate()
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def build_test(self):
+ self.test_smoke_test()
+ self.test_pvpython()
+ self.test_mpi_ensemble()
diff --git a/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch b/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch
new file mode 100644
index 0000000000..a580debfa1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch
@@ -0,0 +1,14 @@
+diff --git a/CMake/patches/99/FindHDF5.cmake b/CMake/patches/99/FindHDF5.cmake
+index b54877d519..adf5d84430 100644
+--- a/VTK/CMake/patches/99/FindHDF5.cmake
++++ b/VTK/CMake/patches/99/FindHDF5.cmake
+@@ -1150,6 +1150,9 @@ if (HDF5_FOUND)
+ endif ()
+ endif ()
+ endforeach ()
++ if(NOT TARGET "hdf5")
++ add_library(hdf5 ALIAS hdf5::hdf5)
++ endif()
+ unset(hdf5_lang)
+
+ if (HDF5_DIFF_EXECUTABLE AND NOT TARGET hdf5::h5diff)
diff --git a/var/spack/repos/builtin/packages/parflow/package.py b/var/spack/repos/builtin/packages/parflow/package.py
index 3906e6f8f4..937ab1786d 100644
--- a/var/spack/repos/builtin/packages/parflow/package.py
+++ b/var/spack/repos/builtin/packages/parflow/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
@@ -23,6 +21,10 @@ class Parflow(CMakePackage):
version("3.9.0", sha256="0ac610208baf973ac07ca93187ec289ba3f6e904d3f01d721ee96a2ace0f5e48")
version("3.8.0", sha256="5ad01457bb03265d1e221090450e3bac5a680d6290db7e3872c295ce6d6aaa08")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
# Using explicit versions to keep builds consistent
@@ -65,21 +67,16 @@ class Parflow(CMakePackage):
examples_dir = "examples"
- def test(self):
- """Perform smoke test on installed ParFlow package."""
- # Run the single phase flow test
+ def test_single_phase_flow(self):
+ """Run the single phase flow test"""
run_path = join_path(self.spec.prefix, self.examples_dir)
- if os.path.isdir(run_path):
- with working_dir(run_path):
- self.run_test(
- "{0}/tclsh".format(self.spec["tcl"].prefix.bin),
- ["default_single.tcl", "1", "1" "1"],
- )
- else:
- # If examples are not installed test if exe executes
- exes = ["parflow"]
- for exe in exes:
- reason = "test version of {0} is {1}".format(exe, self.spec.version)
- self.run_test(
- exe, ["-v"], [self.spec.version.string], installed=True, purpose=reason
- )
+ options = ["default_single.tcl", "1", "1" "1"]
+ with working_dir(run_path):
+ exe = which(f"{self.spec['tcl'].prefix.bin}/tclsh")
+ exe(*options)
+
+ def test_check_version(self):
+ """Test if exe executes"""
+ exe = which(join_path(self.prefix.bin, "parflow"))
+ out = exe("-v", output=str.split, error=str.split)
+ assert str(self.spec.version) in out
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index 9d18cd6951..fe6b00c654 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -21,6 +21,9 @@ class Parmetis(CMakePackage):
version("4.0.3", sha256="f2d9a231b7cf97f1fee6e8c9663113ebf6c240d407d3c118c55b3633d6be6e5f")
version("4.0.2", sha256="5acbb700f457d3bda7d4bb944b559d7f21f075bb6fa4c33f42c261019ef2f0b2")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Enables the build of shared libraries.")
variant("gdb", default=False, description="Enables gdb support.")
variant("int64", default=False, description="Sets the bit width of METIS's index type to 64.")
@@ -38,13 +41,6 @@ class Parmetis(CMakePackage):
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
patch("pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch")
- def flag_handler(self, name, flags):
- if name == "cflags":
- if "%pgi" in self.spec:
- my_flags = flags + ["-c11"]
- return (None, None, my_flags)
- return (None, None, flags)
-
def url_for_version(self, version):
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis"
if version < Version("3.2.0"):
diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py
index ee83f9622f..942e7be7ba 100644
--- a/var/spack/repos/builtin/packages/parmgridgen/package.py
+++ b/var/spack/repos/builtin/packages/parmgridgen/package.py
@@ -20,6 +20,8 @@ class Parmgridgen(Package):
version("1.0", sha256="62cdb6e48cfc59124e5d5d360c2841e0fc2feecafe65bda110b74e942740b395")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Activate the compilation of parallel libraries")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/parmmg/package.py b/var/spack/repos/builtin/packages/parmmg/package.py
index 5766f9b79b..e41f712940 100644
--- a/var/spack/repos/builtin/packages/parmmg/package.py
+++ b/var/spack/repos/builtin/packages/parmmg/package.py
@@ -21,6 +21,10 @@ class Parmmg(CMakePackage):
version("1.1.0", sha256="a5904f1f56b7809ab9ec2f6118b03a082ec2b5564355a73c74fc55426cc69600")
version("1.0.0", sha256="614feb815ff6cdfc9bced30e8105994f0bf3a812243619d3349203ec1851cf6d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mmg")
depends_on("metis")
depends_on("vtk")
diff --git a/var/spack/repos/builtin/packages/parquet-cpp/package.py b/var/spack/repos/builtin/packages/parquet-cpp/package.py
index 1525bd45f9..6c3719519f 100644
--- a/var/spack/repos/builtin/packages/parquet-cpp/package.py
+++ b/var/spack/repos/builtin/packages/parquet-cpp/package.py
@@ -17,6 +17,8 @@ class ParquetCpp(CMakePackage):
version("1.4.0", sha256="52899be6c9dc49a14976d4ad84597243696c3fa2882e5c802b56e912bfbcc7ce")
+ depends_on("cxx", type="build") # generated
+
depends_on("arrow")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/parsec/package.py b/var/spack/repos/builtin/packages/parsec/package.py
index c98ba1336f..e15068a15e 100644
--- a/var/spack/repos/builtin/packages/parsec/package.py
+++ b/var/spack/repos/builtin/packages/parsec/package.py
@@ -15,7 +15,7 @@ class Parsec(CMakePackage, CudaPackage):
parallel execution of micro-tasks on distributed, heterogeneous systems.
"""
- homepage = "https://icl.utk.edu/dte"
+ homepage = "https://github.com/icldisco/parsec"
git = "https://github.com/icldisco/parsec.git"
url = "https://github.com/ICLDisco/parsec/archive/refs/tags/parsec-3.0.2012.tar.gz"
list_url = "https://github.com/ICLDisco/parsec/tags"
@@ -27,20 +27,12 @@ class Parsec(CMakePackage, CudaPackage):
license("BSD-3-Clause-Open-MPI")
version("master", branch="master")
- version(
- "3.0.2209",
- sha256="67d383d076991484cb2a265f56420abdea7cc1f329c63ac65a3e96fbfb6cc295",
- url="https://bitbucket.org/icldistcomp/parsec/get/parsec-3.0.2209.tar.bz2",
- )
- version(
- "3.0.2012",
- sha256="f565bcfffe106be8237b6aea3e83a5770607b7236606414b6f270244fa6ec3bc",
- url="https://bitbucket.org/icldistcomp/parsec/get/parsec-3.0.2012.tar.bz2",
- )
+ version("3.0.2209", sha256="67d383d076991484cb2a265f56420abdea7cc1f329c63ac65a3e96fbfb6cc295")
+ version("3.0.2012", sha256="7a8403ca67305738f3974cbc7a51b64c4ec353ae9170f2468262a9a52035eff6")
version(
"1.1.0",
- sha256="d2928033c121000ae0a554f1e7f757c1f22274a8b74457ecd52744ae1f70b95a",
- url="https://bitbucket.org/icldistcomp/parsec/get/v1.1.0.tar.bz2",
+ sha256="d1e038713f2c1cd7db6765c891408d85648c46ee23e780fbd5e941b53c9eef85",
+ url="https://github.com/ICLDisco/parsec/archive/refs/tags/v1.1.0.tar.gz",
)
variant(
@@ -104,17 +96,29 @@ class Parsec(CMakePackage, CudaPackage):
warn += "https://bitbucket.org/icldistcomp/parsec/issues"
tty.msg(warn)
- def test(self):
- """Compile and run a user program with the installed library"""
- with working_dir(join_path(self.install_test_root, "contrib/build_with_parsec")):
- self.run_test(
- "cmake", options=["."], purpose="Check if CMake can find PaRSEC and its targets"
- )
- self.run_test("make", purpose="Check if tests can compile")
- self.run_test("./dtd_test_allreduce")
- self.run_test("./write_check")
+ contrib_dir = join_path("contrib", "build_with_parsec")
+
+ def test_contrib(self):
+ """build and run contrib examples"""
+ with working_dir(join_path(self.test_suite.current_test_cache_dir, self.contrib_dir)):
+ cmake = self.spec["cmake"].command
+ args = [
+ "-Wno-dev",
+ f"-DCMAKE_C_COMPILER={self.spec['mpi'].mpicc}",
+ f"-DCMAKE_PREFIX_PATH={self.prefix}",
+ ".",
+ ]
+ if "+cuda" in self.spec:
+ args.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix)
+
+ cmake(*args)
+ make()
+
+ for name in ["dtd_test_allreduce", "write_check"]:
+ with test_part(self, f"test_contrib_{name}", f"run {name}"):
+ exe = which(name)
+ exe()
@run_after("install")
def cache_test_sources(self):
- srcs = ["contrib/build_with_parsec"]
- self.cache_extra_test_sources(srcs)
+ cache_extra_test_sources(self, self.contrib_dir)
diff --git a/var/spack/repos/builtin/packages/parsimonator/package.py b/var/spack/repos/builtin/packages/parsimonator/package.py
index 472cbcb34c..b13e425f06 100644
--- a/var/spack/repos/builtin/packages/parsimonator/package.py
+++ b/var/spack/repos/builtin/packages/parsimonator/package.py
@@ -17,6 +17,8 @@ class Parsimonator(MakefilePackage):
version("1.0.2", commit="78368c6ab1e9adc7e9c6ec9256dd7ff2a5bb1b0a")
+ depends_on("c", type="build") # generated
+
patch("nox86.patch")
@property
diff --git a/var/spack/repos/builtin/packages/parsplice/package.py b/var/spack/repos/builtin/packages/parsplice/package.py
index cc04c1ad98..b4755313fd 100644
--- a/var/spack/repos/builtin/packages/parsplice/package.py
+++ b/var/spack/repos/builtin/packages/parsplice/package.py
@@ -25,6 +25,8 @@ class Parsplice(CMakePackage):
version("multisplice", branch="multisplice")
version("1.1", sha256="a011c4d14f66e7cdbc151cc74b5d40dfeae19ceea033ef48185d8f3b1bc2f86b")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("berkeley-db")
depends_on("nauty")
diff --git a/var/spack/repos/builtin/packages/parthenon/package.py b/var/spack/repos/builtin/packages/parthenon/package.py
new file mode 100644
index 0000000000..9d2cdfc5c3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/parthenon/package.py
@@ -0,0 +1,77 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Parthenon(CMakePackage):
+ """A performance portable block-structured adaptive mesh refinement framework."""
+
+ homepage = "https://github.com/parthenon-hpc-lab/parthenon"
+ git = "https://github.com/parthenon-hpc-lab/parthenon.git"
+ url = "https://github.com/parthenon-hpc-lab/parthenon/archive/v0.8.0.tar.gz"
+ maintainers("pbrady", "pgrete")
+
+ version("develop", branch="develop")
+ version("24.03", sha256="ec9109c6bf442237641e627f301567527eb5e756b6959b6747d35315d041727c")
+ version("23.11", sha256="76f79fb7d6556d94052829a8ac71f53cbda76f37fabd9233c5c0cd47ef561aee")
+ version("0.8.0", sha256="9ed7c9ebdc84927a43b86c1e061f925b57cef9b567c7275f22779ed4d98e858d")
+
+ depends_on("cxx", type="build") # generated
+
+ # ------------------------------------------------------------#
+ # Variants
+ # ------------------------------------------------------------#
+
+ variant("single", default=False, description="Run in single precision")
+ variant("mpi", default=True, description="Enable mpi")
+ variant(
+ "host_comm_buffers", default=False, description="Allocate communication buffers on host"
+ )
+ variant("hdf5", default=True, description="Enable hdf5")
+ with when("+hdf5"):
+ variant(
+ "compression",
+ default=True,
+ description="Enable compression in hdf5 output/restart files",
+ )
+ variant("sparse", default=True, description="Sparse capability")
+ variant("ascent", default=False, description="Enable Ascent for in-situ vis and analysis")
+ variant("examples", default=False, description="Build example drivers")
+ variant("python", default=False, description="Enable python for testing")
+ variant(
+ "pressure", default=False, description="Registry pressure check for Kokkos CUDA kernels"
+ )
+
+ # ------------------------------------------------------------#
+ # Dependencies
+ # ------------------------------------------------------------#
+
+ depends_on("cmake@3.16:", type="build")
+
+ depends_on("mpi", when="+mpi")
+ depends_on("hdf5", when="+hdf5")
+ depends_on("hdf5 +mpi", when="+mpi +hdf5")
+ depends_on("ascent", when="+ascent")
+ depends_on("python@3.5:", when="+python")
+ depends_on("kokkos@4:")
+
+ def cmake_args(self):
+ spec = self.spec
+ return [
+ self.define("PARTHENON_IMPORT_KOKKOS", True),
+ self.define_from_variant("PARTHENON_SINGLE_PRECISION", "single"),
+ self.define_from_variant("PARTHENON_ENABLE_HOST_COMM_BUFFERS", "host_comm_buffers"),
+ self.define_from_variant("CHECK_REGISTRY_PRESSURE", "pressure"),
+ self.define_from_variant("PARTHENON_ENABLE_ASCENT", "ascent"),
+ self.define("PARTHENON_DISABLE_MPI", not spec.variants["mpi"].value),
+ self.define("PARTHENON_DISABLE_HDF5", not spec.variants["hdf5"].value),
+ self.define(
+ "PARTHENON_DISABLE_HDF5_COMPRESSION", not spec.variants["compression"].value
+ ),
+ self.define("PARTHENON_DISABLE_SPARSE", not spec.variants["sparse"].value),
+ self.define("PARTHENON_DISABLE_EXAMPLES", not spec.variants["examples"].value),
+ self.define("BUILD_TESTING", self.run_tests),
+ ]
diff --git a/var/spack/repos/builtin/packages/pass/package.py b/var/spack/repos/builtin/packages/pass/package.py
new file mode 100644
index 0000000000..b5d953d4e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pass/package.py
@@ -0,0 +1,63 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Pass(MakefilePackage):
+ """A minimal password manager following the UNIX philosphy."""
+
+ homepage = "https://www.passwordstore.org/"
+ git = "https://git.zx2c4.com/password-store.git"
+
+ maintainers("alecbcs", "taliaferro")
+
+ license("GPL-2.0", checked_by="taliaferro")
+
+ version("1.7.4", tag="1.7.4", commit="1078f2514d579178d5df7042c6a790e9c9b731ad")
+
+ variant("xclip", default=False, description="install the X11 clipboard provider")
+
+ depends_on("bash")
+ depends_on("gnupg")
+ depends_on("git")
+ depends_on("tree")
+ depends_on("util-linux") # for GNU getopt
+ depends_on("libqrencode")
+ depends_on("openssl") # used for base64 only
+
+ depends_on("xclip", when="+xclip")
+
+ def setup_build_environment(self, env):
+ env.set("PREFIX", prefix)
+ env.set("WITH_ALLCOMP", "yes")
+
+ def edit(self, spec, prefix):
+ """
+ Pass's install process involves slotting in a small script snippet at
+ the start of the file, defining certain platform-specific behaviors
+ including the paths where some of its key dependencies are likely to
+ be found. Most of this logic still works when installed with Spack,
+ but the paths to the dependencies are wrong (for example, on MacOS
+ it looks for getopt in /opt/homebrew.) We can hardcode those paths here.
+ """
+
+ bash_exec = self.spec["bash"].command
+ gpg_exec = self.spec["gnupg"].prefix.bin.gpg
+ getopt_exec = self.spec["util-linux"].prefix.bin.getopt
+ openssl_exec = self.spec["openssl"].command
+
+ platform_files = FileFilter(
+ "src/password-store.sh",
+ "src/platform/darwin.sh",
+ "src/platform/freebsd.sh",
+ "src/platform/openbsd.sh",
+ "src/platform/cygwin.sh",
+ )
+
+ platform_files.filter("^#!.*$", f"#! {bash_exec}")
+ platform_files.filter('^GPG="gpg"$', f'GPG="{gpg_exec}"')
+ platform_files.filter('^GETOPT=".*"$', f'GETOPT="{getopt_exec}"')
+ platform_files.filter('^BASE64=".*"$', f'BASE64="{openssl_exec} base64"')
diff --git a/var/spack/repos/builtin/packages/pastix/package.py b/var/spack/repos/builtin/packages/pastix/package.py
index 06ec49caec..6112d51ba0 100644
--- a/var/spack/repos/builtin/packages/pastix/package.py
+++ b/var/spack/repos/builtin/packages/pastix/package.py
@@ -12,17 +12,21 @@ class Pastix(CMakePackage, CudaPackage):
based on direct methods"""
homepage = "https://gitlab.inria.fr/solverstack/pastix/blob/master/README.md"
- url = "https://files.inria.fr/pastix/releases/v6/pastix-6.3.2.tar.gz"
+ url = "https://files.inria.fr/pastix/releases/v6/pastix-6.4.0.tar.gz"
git = "https://gitlab.inria.fr/solverstack/pastix.git"
maintainers("fpruvost", "mfaverge", "ramet")
version("master", branch="master", submodules=True)
+ version("6.4.0", sha256="891d426188eed56c1075fb34d2d80132593a1536ffc05cf333567f68a4811e55")
version("6.3.2", sha256="c4da8802d1933eecf8c09d7e63c014c81ccf353fe623142e9f5c5fc65ed82ee0")
version("6.3.1", sha256="290464d73b7d43356e4735a29932bf6f23a88e94ec7139ba7744c21e42c52681")
version("6.3.0", sha256="a6bfec32a3279d7b24c5fc05885c6632d177e467f1584707c6fd7c42a8703c3e")
version("6.2.2", sha256="cce9a1fe4678b5733c9f1a5a52f77b040eadc3e254418c6fb03d8ab37dede508")
version("6.2.1", sha256="b680cbfc265df8cba18d3a7093fcc02e260198c4a2d6a86d1e684bb291e309dd")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# cmake's specific
variant("shared", default=True, description="Build Pastix as a shared library")
@@ -46,7 +50,7 @@ class Pastix(CMakePackage, CudaPackage):
depends_on("hwloc")
depends_on("lapack")
# ensure openblas use threads=openmp to be thread-safe
- depends_on("openblas threads=openmp", when="^openblas")
+ depends_on("openblas threads=openmp", when="^[virtuals=lapack] openblas")
with when("+metis"):
depends_on("metis@5.1:")
depends_on("metis@5.1:+int64", when="+int64")
diff --git a/var/spack/repos/builtin/packages/patch/package.py b/var/spack/repos/builtin/packages/patch/package.py
index f974ab01c2..50bbda43bc 100644
--- a/var/spack/repos/builtin/packages/patch/package.py
+++ b/var/spack/repos/builtin/packages/patch/package.py
@@ -22,4 +22,6 @@ class Patch(AutotoolsPackage, GNUMirrorPackage):
version("2.7.6", sha256="ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd")
version("2.7.5", sha256="fd95153655d6b95567e623843a0e77b81612d502ecf78a489a4aed7867caa299")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py
index 3aa78aa604..f5f2c97427 100644
--- a/var/spack/repos/builtin/packages/patchelf/package.py
+++ b/var/spack/repos/builtin/packages/patchelf/package.py
@@ -44,6 +44,9 @@ class Patchelf(AutotoolsPackage):
version("0.9", sha256="f2aa40a6148cb3b0ca807a1bf836b081793e55ec9e5540a5356d800132be7e0a")
version("0.8", sha256="14af06a2da688d577d64ff8dac065bb8903bbffbe01d30c62df7af9bf4ce72fe")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@:4.6", when="@0.10:", msg="Requires C++11 support")
conflicts("%gcc@:6", when="@0.14:", msg="Requires C++17 support")
conflicts("%clang@:3", when="@0.14:", msg="Requires C++17 support")
diff --git a/var/spack/repos/builtin/packages/patchutils/package.py b/var/spack/repos/builtin/packages/patchutils/package.py
index 407c7021ae..ef0ee22a9e 100644
--- a/var/spack/repos/builtin/packages/patchutils/package.py
+++ b/var/spack/repos/builtin/packages/patchutils/package.py
@@ -18,3 +18,5 @@ class Patchutils(AutotoolsPackage):
version("0.4.2", sha256="8875b0965fe33de62b890f6cd793be7fafe41a4e552edbf641f1fed5ebbf45ed")
version("0.4.0", sha256="da6df1fa662b635c2969e7d017e6f32f5b39f1b802673a0af635e4936d4bc2f4")
version("0.3.4", sha256="cf55d4db83ead41188f5b6be16f60f6b76a87d5db1c42f5459d596e81dabe876")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/pathfinder/package.py b/var/spack/repos/builtin/packages/pathfinder/package.py
index c6940f0192..26f34d2e1d 100644
--- a/var/spack/repos/builtin/packages/pathfinder/package.py
+++ b/var/spack/repos/builtin/packages/pathfinder/package.py
@@ -19,6 +19,8 @@ class Pathfinder(MakefilePackage):
version("1.0.0", sha256="e002ff7df1ee9a6ee8a892fc208e047e2daf4215ff0d77e7ddc6b09d0506be16")
+ depends_on("c", type="build") # generated
+
build_targets = ["--directory=PathFinder_ref", "CC=cc"]
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/pax-utils/package.py b/var/spack/repos/builtin/packages/pax-utils/package.py
index bf14c3c279..aee7b4ced6 100644
--- a/var/spack/repos/builtin/packages/pax-utils/package.py
+++ b/var/spack/repos/builtin/packages/pax-utils/package.py
@@ -17,3 +17,5 @@ class PaxUtils(AutotoolsPackage):
version("1.3.3", sha256="eeca7fbd98bc66bead4a77000c2025d9f17ea8201b84245882406ce00b9b6b14")
version("1.2.2", sha256="7f4a7f8db6b4743adde7582fa48992ad01776796fcde030683732f56221337d9")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/pbbam/package.py b/var/spack/repos/builtin/packages/pbbam/package.py
index 65d1f6467f..f0dc90cfaa 100644
--- a/var/spack/repos/builtin/packages/pbbam/package.py
+++ b/var/spack/repos/builtin/packages/pbbam/package.py
@@ -23,6 +23,8 @@ class Pbbam(MesonPackage):
)
version("0.18.0", sha256="45286e5f7deb7ff629e0643c8a416155915aec7b85d54c60b5cdc07f4d7b234a")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("boost@1.55.0:")
depends_on("htslib@1.3.1:")
diff --git a/var/spack/repos/builtin/packages/pblat/package.py b/var/spack/repos/builtin/packages/pblat/package.py
new file mode 100644
index 0000000000..3c82805097
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pblat/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Pblat(MakefilePackage):
+ """Parallelized blat with multi-threads support"""
+
+ homepage = "http://icebert.github.io/pblat/"
+ url = "https://github.com/icebert/pblat/archive/refs/tags/2.5.1.tar.gz"
+
+ # `pblat` shares the license for Jim Kent's `blat`. For-profit users must visit:
+ license_url = "https://kentinformatics.com/"
+
+ version("2.5.1", sha256="e85a4d752b8e159502d529f0f9e47579851a6b466b6c2f1f4d49f598642bc615")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("openssl")
+ depends_on("zlib-api")
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter("Makefile")
+ makefile.filter("MACHTYPE=x86_64", "MACHTYPE?=x86_64")
+ makefile.filter("CC=gcc", "")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install("pblat", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pbmpi/package.py b/var/spack/repos/builtin/packages/pbmpi/package.py
index f063f0cd84..a02903fbec 100644
--- a/var/spack/repos/builtin/packages/pbmpi/package.py
+++ b/var/spack/repos/builtin/packages/pbmpi/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Pbmpi(MakefilePackage):
"""A Bayesian software for phylogenetic reconstruction using mixture models"""
- homepage = "https://megasun.bch.umontreal.ca/People/lartillot/www/index.htm"
+ homepage = "https://github.com/bayesiancook/pbmpi"
url = "https://github.com/bayesiancook/pbmpi/archive/refs/tags/v1.8c.tar.gz"
git = "https://github.com/bayesiancook/pbmpi.git"
@@ -21,6 +21,8 @@ class Pbmpi(MakefilePackage):
version("1.8c", sha256="2a80ec4a98d92ace61c67ff9ba78249d45d03094b364959d490b1ad05797a279")
version("partition", branch="partition")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
depends_on("libfabric")
diff --git a/var/spack/repos/builtin/packages/pciutils/package.py b/var/spack/repos/builtin/packages/pciutils/package.py
index a2b8d2fdb3..b066d797d7 100644
--- a/var/spack/repos/builtin/packages/pciutils/package.py
+++ b/var/spack/repos/builtin/packages/pciutils/package.py
@@ -18,6 +18,8 @@ class Pciutils(MakefilePackage):
version("3.6.4", sha256="551d0ac33f030868b7e95c29e58dc2b1882455dbc9c15c15adf7086e664131f1")
version("3.6.3", sha256="7ab0fbb35cffa326eb852539260562bac14f3d27cda8c70bc2cf3211ed97c014")
+ depends_on("c", type="build") # generated
+
variant("lib", default=False, description="Install libraries with headers")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/pcl/package.py b/var/spack/repos/builtin/packages/pcl/package.py
index f0df251e5f..4cc74a437d 100644
--- a/var/spack/repos/builtin/packages/pcl/package.py
+++ b/var/spack/repos/builtin/packages/pcl/package.py
@@ -16,12 +16,16 @@ class Pcl(CMakePackage):
license("BSD-3-Clause")
+ version("1.14.1", sha256="cc3dc26a9ea176cb588fb1f182324399dbaf11e5ba1bea95c7d39005b7a5d352")
version("1.13.1", sha256="be4d499c066203a3c296e2f7e823d6209be5983415f2279310ed1c9abb361d30")
version("1.13.0", sha256="bd110789f6a7416ed1c58da302afbdb80f8d297a9e23cc02fd78ab78b4762698")
version("1.12.1", sha256="a9573efad5e024c02f2cc9180bb8f82605c3772c62463efbe25c5d6e634b91dc")
version("1.12.0", sha256="606a2d5c7af304791731d6b8ea79365bc8f2cd75908006484d71ecee01d9b51c")
version("1.11.1", sha256="19d1a0bee2bc153de47c05da54fc6feb23393f306ab2dea2e25419654000336e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
depends_on("cmake@3.10:", when="@1.12.1:", type="build")
depends_on("eigen@3.1:")
diff --git a/var/spack/repos/builtin/packages/pcma/package.py b/var/spack/repos/builtin/packages/pcma/package.py
index ce9a459056..0b7fc617a0 100644
--- a/var/spack/repos/builtin/packages/pcma/package.py
+++ b/var/spack/repos/builtin/packages/pcma/package.py
@@ -15,6 +15,8 @@ class Pcma(MakefilePackage):
version("2.0", sha256="4b92d412126d393baa3ede501cafe9606ada9a66af6217d56befd6ec2e0c01ba")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
makefile = FileFilter("makefile")
makefile.filter("gcc", spack_cc)
diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py
index 02d4ea0cd0..e9b4606ce8 100644
--- a/var/spack/repos/builtin/packages/pcre/package.py
+++ b/var/spack/repos/builtin/packages/pcre/package.py
@@ -27,6 +27,9 @@ class Pcre(AutotoolsPackage, CMakePackage):
version("8.39", sha256="b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b")
version("8.38", sha256="b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("drkennetz")
patch("intel.patch", when="@8.38")
@@ -54,6 +57,10 @@ class Pcre(AutotoolsPackage, CMakePackage):
variant("pic", default=True, description="Enable position-independent code (PIC)")
requires("+pic", when="+shared build_system=autotools")
+ with when("build_system=cmake"):
+ depends_on("zlib")
+ depends_on("bzip2")
+
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py
index d2bf686f89..67f0566385 100644
--- a/var/spack/repos/builtin/packages/pcre2/package.py
+++ b/var/spack/repos/builtin/packages/pcre2/package.py
@@ -3,10 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
-class Pcre2(AutotoolsPackage):
+class Pcre2(AutotoolsPackage, CMakePackage):
"""The PCRE2 package contains Perl Compatible Regular Expression
libraries. These are useful for implementing regular expression
pattern matching using the same syntax and semantics as Perl 5."""
@@ -14,8 +16,10 @@ class Pcre2(AutotoolsPackage):
homepage = "https://www.pcre.org"
url = "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.39/pcre2-10.39.tar.bz2"
- license("BSD-3-Clause")
+ license("BSD-3-Clause AND PCRE2-exception", when="@10:", checked_by="wdconinc")
+ version("10.44", sha256="d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96")
+ version("10.43", sha256="e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb")
version("10.42", sha256="8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840")
version("10.41", sha256="0f78cebd3e28e346475fb92e95fe9999945b4cbaad5f3b42aca47b887fb53308")
version("10.40", sha256="14e4b83c4783933dc17e964318e6324f7cae1bc75d8f3c79bc6969f00c159d68")
@@ -25,9 +29,37 @@ class Pcre2(AutotoolsPackage):
version("10.31", sha256="e07d538704aa65e477b6a392b32ff9fc5edf75ab9a40ddfc876186c4ff4d68ac")
version("10.20", sha256="332e287101c9e9567d1ed55391b338b32f1f72c5b5ee7cc81ef2274a53ad487a")
+ depends_on("c", type="build")
+
variant("multibyte", default=True, description="Enable support for 16 and 32 bit characters.")
variant("jit", default=False, description="enable Just-In-Time compiling support")
+ # Building static+shared can cause naming colisions and other problems
+ # for dependents on Windows. It generally does not cause problems on
+ # other systems, so this variant is not exposed for non-Windows.
+ variant("shared", default=True, description="build shared pcre2", when="platform=windows")
+ build_system("autotools", "cmake", default="autotools")
+
+ with when("build_system=cmake"):
+ depends_on("zlib")
+ depends_on("bzip2")
+
+ @property
+ def libs(self):
+ if "+multibyte" in self.spec:
+ name = "pcre2-32"
+ else:
+ name = "pcre2-8"
+ is_shared = self.spec.satisfies("+shared")
+ if not self.spec.satisfies("platform=windows"):
+ name = "lib" + name
+ if self.spec.satisfies("platform=windows") and not is_shared:
+ name += "-static"
+ return find_libraries(
+ name, root=self.prefix, recursive=True, shared=is_shared, runtime=False
+ )
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
args = []
@@ -40,11 +72,23 @@ class Pcre2(AutotoolsPackage):
return args
- @property
- def libs(self):
- if "+multibyte" in self.spec:
- name = "libpcre2-32"
- else:
- name = "libpcre2-8"
- return find_libraries(name, root=self.prefix, recursive=True)
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ args = []
+ args.append(self.define_from_variant("PCRE2_BUILD_PCRE2_16", "multibyte"))
+ args.append(self.define_from_variant("PCRE2_BUILD_PCRE2_32", "multibyte"))
+ args.append(self.define_from_variant("PCRE2_SUPPORT_JIT", "jit"))
+ # Don't need to check for on or off, just if the variant is available
+ # If not specified, the build system will build both static and shared
+ # by default, this is in parity with the autotools build, so on
+ # linux and MacOS, the produced binaries are identical, Windows is the
+ # only outlier
+ if self.spec.satisfies("platform=windows"):
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+ # PCRE allows building shared and static at the same time
+ # this is bad practice and a problem on some platforms
+ # Enforce mutual exclusivity here
+ args.append(self.define("BUILD_STATIC_LIBS", not self.spec.satisfies("+shared")))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/pcsclite/package.py b/var/spack/repos/builtin/packages/pcsclite/package.py
index a531d14def..50a785c1e2 100644
--- a/var/spack/repos/builtin/packages/pcsclite/package.py
+++ b/var/spack/repos/builtin/packages/pcsclite/package.py
@@ -22,6 +22,8 @@ class Pcsclite(AutotoolsPackage):
version("master", branch="master")
version("1.9.8", sha256="502d80c557ecbee285eb99fe8703eeb667bcfe067577467b50efe3420d1b2289")
+ depends_on("c", type="build") # generated
+
# no libudev/systemd package currently in spack
variant("libudev", default=False, description="Build with libudev")
diff --git a/var/spack/repos/builtin/packages/pdal/package.py b/var/spack/repos/builtin/packages/pdal/package.py
new file mode 100644
index 0000000000..58c78abb7c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pdal/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Pdal(CMakePackage):
+ """PDAL is a C++ library for translating and manipulating point cloud data.
+ It is very much like the GDAL library which handles raster and vector data.
+ """
+
+ homepage = "https://pdal.io"
+ url = "https://github.com/PDAL/PDAL/archive/refs/tags/2.6.2.tar.gz"
+
+ maintainers("adamjstewart")
+
+ license("BSD")
+
+ version("2.6.2", sha256="ec4175cfe19dc6b70a0434850f837317f7202f84b63cd8dcc65ca83e04678f57")
+ version("2.6.1", sha256="da6e615f01b6110414ef3e2250f112e49df129091abc91ba6866bb01dc68454e")
+ version("2.6.0", sha256="12eedeac16ec3aaef42f06078f03f657701c25781207a8e09a3547519228780e")
+ version("2.5.6", sha256="de4177305e380d21187da8ec90afda64756bbde5e925035bd53e54a6e349df18")
+ version("2.5.5", sha256="6bf4f34bc0bf1bce52b8daecb03a7f45d218c0374bfa00783c787b9e54d56d72")
+ version("2.4.3", sha256="e1a910d593311e68b51f32d1f4f8fe4327b97ae7a8de209147b6111091b6f75b")
+ version("2.3.0", sha256="8ae848e9b3fe5149a9277fe60e10b9858edb9a3cf1a40728f11712498e5da13a")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.13:", type="build")
+ depends_on("gdal@3:")
+ depends_on("gdal@3.4:", when="@2.6:")
+ depends_on("gdal@:3.6", when="@:2.4")
+ depends_on("libgeotiff@1.3.0:")
+ depends_on("proj@4.9.3:")
+
+ # https://github.com/PDAL/PDAL/issues/3826
+ patch("stdcppfs.patch", when="@:2.4 %gcc@:8")
+ msg = "a new stdc++fs patch is needed for version 2.6.2 onwards with gcc@8 or older"
+ conflicts("%gcc@:8", when="@2.6.2:", msg=msg)
+
+ def cmake_args(self):
+ return [self.define("PROJ_INCLUDE_DIR", self.spec["proj"].prefix.include)]
diff --git a/var/spack/repos/builtin/packages/pdal/stdcppfs.patch b/var/spack/repos/builtin/packages/pdal/stdcppfs.patch
new file mode 100644
index 0000000000..9560521844
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pdal/stdcppfs.patch
@@ -0,0 +1,8 @@
+--- spack-src/pdal/util/CMakeLists.txt 2022-08-05 10:29:13.000000000 -0700
++++ spack-src/pdal/util/CMakeLists.txt_new 2024-02-15 17:50:10.882186258 -0800
+@@ -46,3 +46,5 @@
+ CLEAN_DIRECT_OUTPUT 1)
+
+ set_property(GLOBAL PROPERTY _UTIL_INCLUDED TRUE)
++
++target_link_libraries(${PDAL_UTIL_LIB_NAME} PRIVATE -lstdc++fs)
diff --git a/var/spack/repos/builtin/packages/pdc/package.py b/var/spack/repos/builtin/packages/pdc/package.py
index 9b84135d5a..1c09eb56f6 100644
--- a/var/spack/repos/builtin/packages/pdc/package.py
+++ b/var/spack/repos/builtin/packages/pdc/package.py
@@ -14,26 +14,46 @@ class Pdc(CMakePackage):
metadata operations to find data objects."""
homepage = "https://pdc.readthedocs.io/en/latest/"
- url = "https://github.com/hpc-io/pdc/archive/refs/tags/0.3.tar.gz"
+ url = "https://github.com/hpc-io/pdc/archive/refs/tags/0.5.tar.gz"
git = "https://github.com/hpc-io/pdc.git"
- maintainers("houjun", "sbyna")
+ maintainers("houjun", "sbyna", "jeanbez")
license("BSD-3-Clause-LBNL")
+ version("0.5", sha256="d8ee6ad31670882dec8a9a131cd491a7134953acf3d18abf288605f3cc517636")
+ version("0.4", sha256="eb2c2b69e5cdbca3210b8d72a646c16a2aa004ca08792f28cc6290a9a3ad6c8a")
version("0.3", sha256="14a3abd5e1e604f9527105709fca545bcdebe51abd2b89884db74d48a38b5443")
- version("0.2", sha256="2829e74da227913a1a8e3e4f64e8f422ab9c0a049f8d73ff7b6ca12463959f8b")
- version("0.1", sha256="01b4207ecf71594a7f339c315f2869b3fa8fbd34b085963dc4c1bdc5b66bb93e")
+ version(
+ "0.2",
+ sha256="2829e74da227913a1a8e3e4f64e8f422ab9c0a049f8d73ff7b6ca12463959f8b",
+ deprecated=True,
+ )
+ version(
+ "0.1",
+ sha256="01b4207ecf71594a7f339c315f2869b3fa8fbd34b085963dc4c1bdc5b66bb93e",
+ deprecated=True,
+ )
version("stable", branch="stable")
version("develop", branch="develop")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("%clang")
+
depends_on("libfabric")
- depends_on("mercury")
+ depends_on("mercury@2.0.0", when="@0.1:0.3")
+ depends_on("mercury@2.2.0", when="@0.4:")
depends_on("mpi")
- root_cmakelists_dir = "src"
+ @property
+ def root_cmakelists_dir(self):
+ if "@0.4:" in self.spec:
+ return self.stage.source_path
+ else:
+ return "src"
def cmake_args(self):
args = [
@@ -44,7 +64,4 @@ class Pdc(CMakePackage):
self.define("PDC_ENABLE_MPI", "ON"),
self.define("CMAKE_C_COMPILER", self.spec["mpi"].mpicc),
]
-
- if self.spec.satisfies("platform=cray"):
- args.append("-DRANKSTR_LINK_STATIC=ON")
return args
diff --git a/var/spack/repos/builtin/packages/pdf2svg/package.py b/var/spack/repos/builtin/packages/pdf2svg/package.py
index b7a74e0e96..9f190a14ca 100644
--- a/var/spack/repos/builtin/packages/pdf2svg/package.py
+++ b/var/spack/repos/builtin/packages/pdf2svg/package.py
@@ -17,6 +17,8 @@ class Pdf2svg(AutotoolsPackage):
version("0.2.3", sha256="4fb186070b3e7d33a51821e3307dce57300a062570d028feccd4e628d50dea8a")
version("0.2.2", sha256="e5f1d9b78821e44cd85379fb07f38a42f00bb2bde3743b95301ff8c0a5ae229a")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig@0.9.0:", type="build")
depends_on("cairo@1.2.6:")
depends_on("poppler@0.5.4:+glib")
diff --git a/var/spack/repos/builtin/packages/pdsh/package.py b/var/spack/repos/builtin/packages/pdsh/package.py
index 58872d3a3a..77be9d6305 100644
--- a/var/spack/repos/builtin/packages/pdsh/package.py
+++ b/var/spack/repos/builtin/packages/pdsh/package.py
@@ -18,6 +18,8 @@ class Pdsh(AutotoolsPackage):
version("2.31", sha256="0ee066ce395703285cf4f6cf00b54b7097d12457a4b1c146bc6f33d8ba73caa7")
+ depends_on("c", type="build") # generated
+
variant("ssh", default=True, description="Build with ssh module")
variant("static_modules", default=True, description="Build with static modules")
diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py
index cccd240d11..30d2fadfaf 100644
--- a/var/spack/repos/builtin/packages/pdt/package.py
+++ b/var/spack/repos/builtin/packages/pdt/package.py
@@ -26,6 +26,7 @@ class Pdt(AutotoolsPackage):
license("GPL-2.0-only")
+ version("3.25.2", sha256="01c2d403bc6672b2b264a182c325806541066c5ed5713878eb598f5506428cbe")
version("3.25.1", sha256="0b6f8a6b8769c181b2ae6cae7298f04b8e3e3d68066f598ed24574e19500bc97")
version("3.25", sha256="1037628d854edfeded3d847150d3e8fbd3774e8146407ce32f5021c80f6299be")
version("3.24", sha256="4a2bb31f3f7f2e52ed49d9b7189ade05170a4386ef76771280a06e8b3ca97ab2")
@@ -37,6 +38,9 @@ class Pdt(AutotoolsPackage):
version("3.19", sha256="d57234077e2e999f2acf9860ea84369a4694b50cc17fa6728e5255dc5f4a2160")
version("3.18.1", sha256="d06c2d1793fadebf169752511e5046d7e02cf3fead6135a35c34b1fee6d6d3b2")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("pic", default=False, description="Builds with pic")
patch("cray_configure.patch", when="%cce")
@@ -47,18 +51,21 @@ class Pdt(AutotoolsPackage):
filter_file(r"PDT_GXX=g\+\+ ", r"PDT_GXX=clang++ ", "ductape/Makefile")
def configure(self, spec, prefix):
- options = ["-prefix=%s" % prefix]
- if self.compiler.name == "xl":
+ options = [f"-prefix={prefix}"]
+ if spec.satisfies("%xl"):
options.append("-XLC")
- elif self.compiler.name == "intel" or self.compiler.name == "oneapi":
+ elif spec.satisfies("%intel"):
options.append("-icpc")
- elif self.compiler.name == "pgi":
- options.append("-pgCC")
- elif self.compiler.name == "gcc":
+ elif spec.satisfies("%oneapi"):
+ if spec.satisfies("@3.25.2:"):
+ options.append("-icpx")
+ else:
+ options.append("-icpc")
+ elif spec.satisfies("%gcc"):
options.append("-GNU")
- elif self.compiler.name == "clang" or self.compiler.name == "apple-clang":
+ elif spec.satisfies("%clang") or spec.satisfies("%apple-clang") or spec.satisfies("%aocc"):
options.append("-clang")
- elif self.compiler.name == "cce":
+ elif spec.satisfies("%cce"):
options.append("-CC")
else:
raise InstallError("Unknown/unsupported compiler family: " + self.compiler.name)
diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py
index af038366f4..850e305afe 100644
--- a/var/spack/repos/builtin/packages/pegtl/package.py
+++ b/var/spack/repos/builtin/packages/pegtl/package.py
@@ -27,13 +27,15 @@ class Pegtl(CMakePackage):
version("2.1.4", sha256="d990dccc07b4d9ba548326d11c5c5e34fa88b34fe113cb5377da03dda29f23f2")
version("2.0.0", sha256="5aae0505077e051cae4d855c38049cc6cf71103a6cc8d0ddef01a576e8a60cc0")
+ depends_on("cxx", type="build") # generated
+
# Ref: https://github.com/taocpp/PEGTL/blob/master/src/example/pegtl/json_classes.hpp
patch("change_to_virtual_destructor.patch", when="@:2.4")
# Ref: https://bugs.gentoo.org/733678
patch_url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/pegtl/files/pegtl-2.8.3-gcc-10.patch"
patch_checksum = "fc40b0c7390f8c0473f2cb4821bda7a5e107f93ca9d2fafeff2065445bb39981"
- patch(patch_url, sha256=patch_checksum, level=0, when="@2.1.4:2.8.3")
+ patch(patch_url, sha256=patch_checksum, level=0, when="@2.1.4")
def cmake_args(self):
args = []
diff --git a/var/spack/repos/builtin/packages/pennant/package.py b/var/spack/repos/builtin/packages/pennant/package.py
index bfce36fc59..a903e0e6e7 100644
--- a/var/spack/repos/builtin/packages/pennant/package.py
+++ b/var/spack/repos/builtin/packages/pennant/package.py
@@ -25,6 +25,8 @@ class Pennant(MakefilePackage):
version("0.5", sha256="21ef5889731fad0075f9dab8ffa97af8fd8ff87f6a5fe6434916b6e28cf64e43")
version("0.4", sha256="65b81b92ed6fdbe407310948dd76ffb48cca155ee05c1f990a649faf81b45bb0")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=True, description="Build with OpenMP support")
variant("debug", default=False, description="Enable debug")
@@ -38,8 +40,6 @@ class Pennant(MakefilePackage):
if self.compiler.name == "intel":
opt += " -fast -fno-alias"
- if self.compiler.name == "pgi":
- opt += " -fastsse"
makefile.filter("CXXFLAGS_DEBUG .*", "CXXFLAGS_DEBUG := {0}".format(debug))
makefile.filter("CXXFLAGS_OPT .*", "CXXFLAGS_OPT := {0}".format(opt))
diff --git a/var/spack/repos/builtin/packages/percept/package.py b/var/spack/repos/builtin/packages/percept/package.py
index 2680fe33bd..7bfea43e80 100644
--- a/var/spack/repos/builtin/packages/percept/package.py
+++ b/var/spack/repos/builtin/packages/percept/package.py
@@ -20,6 +20,8 @@ class Percept(CMakePackage):
# here and the patch allows us to build the mesh_transfer exe and
# creates a make install target so Spack can install Percept
version("master", commit="363cdd0050443760d54162f140b2fb54ed9decf0")
+
+ depends_on("cxx", type="build") # generated
patch("cmakelists.patch")
depends_on("googletest~shared")
diff --git a/var/spack/repos/builtin/packages/percona-server/package.py b/var/spack/repos/builtin/packages/percona-server/package.py
index 6a7203cd5e..bd7de28d11 100644
--- a/var/spack/repos/builtin/packages/percona-server/package.py
+++ b/var/spack/repos/builtin/packages/percona-server/package.py
@@ -20,6 +20,9 @@ class PerconaServer(CMakePackage):
version("8.0.19-10", sha256="f2f979bd7dfb4d62aef79b7c488070d5d599341a6acbb295400f1d68257cbd80")
version("8.0.18-9", sha256="e79a8c1ae5f2271c0b344494a299a9bbbada88d3bce87449b7de274d17d1ccd0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.70.0")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/perfstubs/package.py b/var/spack/repos/builtin/packages/perfstubs/package.py
index 699521a631..993e156740 100644
--- a/var/spack/repos/builtin/packages/perfstubs/package.py
+++ b/var/spack/repos/builtin/packages/perfstubs/package.py
@@ -24,6 +24,10 @@ class Perfstubs(CMakePackage):
license("BSD-3-Clause")
version("master", branch="master")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("static", default=False, description="Build static executable support")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/perl-algorithm-c3/package.py b/var/spack/repos/builtin/packages/perl-algorithm-c3/package.py
new file mode 100644
index 0000000000..bb97eda68e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-algorithm-c3/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlAlgorithmC3(PerlPackage):
+ """A module for merging hierarchies using the C3 algorithm"""
+
+ homepage = "https://metacpan.org/pod/Algorithm::C3"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Algorithm-C3-0.11.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.11", sha256="aaf48467765deea6e48054bc7d43e46e4d40cbcda16552c629d37be098289309")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-alien-build-plugin-download-gitlab/package.py b/var/spack/repos/builtin/packages/perl-alien-build-plugin-download-gitlab/package.py
new file mode 100644
index 0000000000..6e55dc7925
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-alien-build-plugin-download-gitlab/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlAlienBuildPluginDownloadGitlab(PerlPackage):
+ """Alien::Build plugin to download from GitLab"""
+
+ homepage = "https://metacpan.org/pod/Alien::Build::Plugin::Download::GitLab"
+ url = "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Build-Plugin-Download-GitLab-0.01.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.01", sha256="c1f089c8ea152a789909d48a83dbfcf2626f773daf30431c8622582b26aba902")
+
+ depends_on("perl@5.8.4:", type=("build", "link", "run", "test"))
+ depends_on("perl-alien-build", type=("build", "run", "test"))
+ depends_on("perl-path-tiny", type=("build", "run", "test"))
+ depends_on("perl-test2-suite", type=("build", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-alien-build/package.py b/var/spack/repos/builtin/packages/perl-alien-build/package.py
index 74799af883..15f41fc09c 100644
--- a/var/spack/repos/builtin/packages/perl-alien-build/package.py
+++ b/var/spack/repos/builtin/packages/perl-alien-build/package.py
@@ -19,6 +19,8 @@ class PerlAlienBuild(PerlPackage):
version("2.78", sha256="9140671790a0696920b0a97acd812ab4d0b93ac69306d20679f027dd0c7caa27")
version("1.86", sha256="f856a46aea72fe77daea5b1788b4ea0dc215f5704f5a35fa063171be8523e4e9")
+ depends_on("c", type="build") # generated
+
depends_on("perl-capture-tiny", type=("build", "run"))
depends_on("perl-ffi-checklib", type=("build", "run"))
depends_on("perl-file-which", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-alien-libxml2/package.py b/var/spack/repos/builtin/packages/perl-alien-libxml2/package.py
index a48a7f88e9..033bbe4400 100644
--- a/var/spack/repos/builtin/packages/perl-alien-libxml2/package.py
+++ b/var/spack/repos/builtin/packages/perl-alien-libxml2/package.py
@@ -14,8 +14,10 @@ class PerlAlienLibxml2(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.19", sha256="f4a674099bbd5747c0c3b75ead841f3b244935d9ef42ba35368024bd611174c9")
version("0.10_01", sha256="2f45b308b33503292f48bf46a75fe1e653d6b209ba5caf0628d8cc103f8d61ac")
depends_on("libxml2")
depends_on("perl-alien-build", type=("build", "run"))
+ depends_on("perl-alien-build-plugin-download-gitlab", type=("build", "run"), when="@0.18:")
depends_on("pkgconfig", type=("build"))
diff --git a/var/spack/repos/builtin/packages/perl-alien-svn/package.py b/var/spack/repos/builtin/packages/perl-alien-svn/package.py
index 94b06b1bde..18b06469d5 100644
--- a/var/spack/repos/builtin/packages/perl-alien-svn/package.py
+++ b/var/spack/repos/builtin/packages/perl-alien-svn/package.py
@@ -11,7 +11,7 @@ from spack.package import *
class PerlAlienSvn(PerlPackage):
"""Perl SVN extension."""
- homepage = "http://metacpan.org/source/MSCHWERN/Alien-SVN-v1.8.11.0"
+ homepage = "https://metacpan.org/source/MSCHWERN/Alien-SVN-v1.8.11.0"
url = "https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/Alien-SVN-v1.8.11.0.tar.gz"
version("1.8.11.0", sha256="acf8ebce1cb6958ef24611a453abee32b8e4dfe767563834362891ef3f30fc68")
@@ -22,6 +22,9 @@ class PerlAlienSvn(PerlPackage):
version("1.7.3.0", sha256="02abbe17ad7db912001e6f1c5018cec08c3840e0c32700363a79274e144e74e5")
version("1.6.12.1", sha256="a89d8eeff61e34aa7b3d35dee3e6752b12dfa5f0f04bf69d796846cf0391f53d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl-module-build", type="build")
depends_on("apr@1.6.2", type="build")
depends_on("apr-util", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-any-uri-escape/package.py b/var/spack/repos/builtin/packages/perl-any-uri-escape/package.py
index 0f8e594c9a..3ed903a276 100644
--- a/var/spack/repos/builtin/packages/perl-any-uri-escape/package.py
+++ b/var/spack/repos/builtin/packages/perl-any-uri-escape/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlAnyUriEscape(PerlPackage):
version("0.01", sha256="e3813cec9f108fa5c0be66e08c1986bfba4d242151b0f9f4ec5e0c5e17108c4c")
depends_on("perl-uri", type=("run"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Any::URI::Escape; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-apache-logformat-compiler/package.py b/var/spack/repos/builtin/packages/perl-apache-logformat-compiler/package.py
new file mode 100644
index 0000000000..9b9fad0eae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-apache-logformat-compiler/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlApacheLogformatCompiler(PerlPackage):
+ """Compile a log format string to perl-code"""
+
+ homepage = "https://metacpan.org/pod/Apache::LogFormat::Compiler"
+ url = (
+ "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/Apache-LogFormat-Compiler-0.36.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.36", sha256="94509503ee74ea820183d070c11630ee5bc0fd8c12cb74fae953ed62e4a1ac17")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-http-message", type=("build", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
+ depends_on("perl-posix-strftime-compiler@0.30:", type=("build", "run", "test"))
+ depends_on("perl-test-mocktime", type=("build", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-try-tiny@0.12:", type=("build", "test"))
+ depends_on("perl-uri", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-b-cow/package.py b/var/spack/repos/builtin/packages/perl-b-cow/package.py
index 6906b227b5..869dc6fc54 100644
--- a/var/spack/repos/builtin/packages/perl-b-cow/package.py
+++ b/var/spack/repos/builtin/packages/perl-b-cow/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlBCow(PerlPackage):
version("0.007", sha256="1290daf227e8b09889a31cf182e29106f1cf9f1a4e9bf7752f9de92ed1158b44")
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use B::COW; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-b-hooks-endofscope/package.py b/var/spack/repos/builtin/packages/perl-b-hooks-endofscope/package.py
index 901ef364e4..20de5531ec 100644
--- a/var/spack/repos/builtin/packages/perl-b-hooks-endofscope/package.py
+++ b/var/spack/repos/builtin/packages/perl-b-hooks-endofscope/package.py
@@ -22,11 +22,3 @@ class PerlBHooksEndofscope(PerlPackage):
depends_on("perl@5.6.1:", type=("build", "link", "run", "test"))
depends_on("perl-module-implementation@0.05:", type=("build", "run", "test"))
depends_on("perl-sub-exporter-progressive@0.001006:", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use B::Hooks::EndOfScope; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-b-keywords/package.py b/var/spack/repos/builtin/packages/perl-b-keywords/package.py
new file mode 100644
index 0000000000..528d7dfd80
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-b-keywords/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBKeywords(PerlPackage):
+ """Lists of reserved barewords and symbol names"""
+
+ homepage = "https://metacpan.org/pod/B::Keywords"
+ url = "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/B-Keywords-1.26.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.26", sha256="2daa155d2f267fb0dedd87f8a4c4fb5663879fc106517b1ee258353ef87aed34")
diff --git a/var/spack/repos/builtin/packages/perl-bignum/package.py b/var/spack/repos/builtin/packages/perl-bignum/package.py
index 828fc8578b..3ddd4e8ec8 100644
--- a/var/spack/repos/builtin/packages/perl-bignum/package.py
+++ b/var/spack/repos/builtin/packages/perl-bignum/package.py
@@ -12,6 +12,7 @@ class PerlBignum(PerlPackage):
homepage = "https://github.com/pjacklam/p5-bignum"
url = "https://cpan.metacpan.org/authors/id/P/PJ/PJACKLAM/bignum-0.66.tar.gz"
+ version("0.67", sha256="1c9a824ab323e3e58d9808011c10ad27589dba1202806278215012ca7f522875")
version("0.66", sha256="26d48fb4b63a4b738ab84b577f9de7cdec164fe5f8a7089010a1ec17e127ed97")
depends_on("perl@5.6.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-bio-asn1-entrezgene/package.py b/var/spack/repos/builtin/packages/perl-bio-asn1-entrezgene/package.py
new file mode 100644
index 0000000000..b5793ec33a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-asn1-entrezgene/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioAsn1Entrezgene(PerlPackage):
+ """Regular expression-based Perl Parser for NCBI Entrez Gene."""
+
+ homepage = "https://metacpan.org/pod/Bio::ASN1::EntrezGene"
+ url = "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/Bio-ASN1-EntrezGene-1.73.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.73", sha256="f9e778db705ce5c35ad2798e38a8490b644edfdc14253aa1b74a1f5e79fc6a4b")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bio-cluster", type=("build", "run", "test"))
+ depends_on("perl-bioperl", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py b/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py
new file mode 100644
index 0000000000..b43d7ec1de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-bigfile/package.py
@@ -0,0 +1,80 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioBigfile(PerlPackage):
+ """Bio::DB::BigFile -- Low-level interface to BigWig & BigBed files for perl"""
+
+ homepage = "https://metacpan.org/pod/Bio::DB::BigFile"
+ url = "https://cpan.metacpan.org/authors/id/L/LD/LDS/Bio-BigFile-1.07.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later", checked_by="teaguesterling")
+
+ version("1.07", sha256="277b66ce8acbdd52399e2c5a0cf4e3bd5c74c12b94877cd383d0c4c97740d16d")
+ version("1.06", sha256="15f1ece2563096a301cff533a9ac91b8fc31af7643b4c4d7fd5d4fa75d4cb5ef")
+ version("1.05", sha256="1675662cfeff05a4e7289132481fd6cf8a15578bef0552b614047a03048fd057")
+ version("1.04", sha256="aef1db4cc4f4fb5b4d629719e16b50ec8d0b471d90e894060a88bd379647c4fa")
+ version("1.03", sha256="cb4c61c4d880661580f1964280a3731e31c952a3f7e973e7096b2377a6c62d29")
+ version("1.02", sha256="baab5010d2b1121c9f84fb1a8c873ced6e24882ef9bece1c3a2b455ed90925fd")
+ version("1.01", sha256="662310df5cad45f916c341e6b9a888323bd7b2d6a96957fdf8b0be73de7c3877")
+ version("1.00", sha256="925c9b94d5ea10db59911556fe87d4566e12032d13c70c574e74dc009cf73b91")
+
+ depends_on("perl-module-build", type="build")
+ depends_on("gmake", type="build")
+
+ with default_args(type=("build", "link")):
+ depends_on("kentutils")
+ depends_on("htslib+pic", when="^kentutils~builtin_htslib")
+ depends_on("openssl")
+
+ with default_args(type=("build", "run")):
+ depends_on("perl-bioperl")
+ depends_on("perl-io-string")
+
+ def build_pl_args(self):
+ # Need to tell the linker exactly where to find these
+ # dependencies as the perl build system hasn't been told
+ # they are needed. It explicitly searches for kentutils
+ # The includes will be recongized by CFLAGS but not the
+ # LIBS, which results in failures only once you try to
+ # to run the tests
+ incs = [
+ # This is usually set by Build.PL from KENT_SRC
+ f"-I{kentutils_include_dir}",
+ # Build system looks for tbx.h instead of htslib/tbx.h
+ # so we need to give it some special help for HTSLIB
+ f"-I{kentutils_htslib_include_dir.htslib}",
+ ]
+ libs = [
+ # This is usually set by Build.PL from KENT_SRC
+ join_path(kentutils_lib_dir, "jkweb.a"),
+ # These are being set in Build.PL so we need to reset here
+ "-lz",
+ "-lssl",
+ # This is an undocumented dependency from kentutils
+ "-lhts",
+ ]
+
+ return [
+ f"--extra_compiler_flags={' '.join(incs)}",
+ f"--extra_linker_flags={' '.join(libs)}",
+ ]
+
+ def setup_build_environment(self, env):
+ # These variables are exected by by the Build.PL file
+ # even though we override the results via PERL_MB_OPT
+ kent = self.spec["kentutils"]
+ env.set("KENT_SRC", kent.prefix)
+ env.set("MACHTYPE", kent.package.machtype)
+
+ # Overriding this explicitly as an environmental variable
+ # as the Build.PL script doesn't honnor the command line
+ # args and needs some extra coaxing to pass tests
+ # (The package builds fine without this but the tests fail)
+ args = [f"'{arg}'" for arg in self.build_pl_args()]
+ env.set("PERL_MB_OPT", " ".join(args))
diff --git a/var/spack/repos/builtin/packages/perl-bio-cluster/package.py b/var/spack/repos/builtin/packages/perl-bio-cluster/package.py
new file mode 100644
index 0000000000..ccc8a4f21b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-cluster/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioCluster(PerlPackage):
+ """BioPerl cluster modules"""
+
+ homepage = "https://metacpan.org/pod/Bio::Cluster"
+ url = "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/Bio-Cluster-1.7.3.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.7.3", sha256="1967fb3899b92f245b5bf6cb64ef076fc3f8427b1a96ca5f7b74d220b6191fbb")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bio-variation", type=("build", "run", "test"))
+ depends_on("perl-bioperl", type=("build", "run", "test"))
+ depends_on("perl-xml-sax", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py
new file mode 100644
index 0000000000..bede5949f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-ensembl-funcgen/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioEnsemblFuncgen(Package):
+ """Ensembl Funcgen Perl API and SQL schema."""
+
+ homepage = "http://ensembl.org/info/docs/api/funcgen/index.html"
+ url = "https://github.com/Ensembl/ensembl-funcgen/archive/release/111.zip"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ version("112", sha256="d7398921779a6865b5e2f0269d51d268f9b8cd96e4ca3577c88e6f34593e683d")
+ version("111", sha256="67b1b7d6efde9e8be7b4ef73c54c0b5e7e3eadcd590a94bc980984514ef746d0")
+ version("110", sha256="c9e85a423a8c8653741aed799aea9762fa1dfb301f50dc11d291925e81d7aeee")
+
+ extends("perl")
+
+ depends_on("perl-role-tiny", type=("build", "run"))
+ depends_on("perl-bio-ensembl")
+
+ variant("sql", default=False, description="Install SQL files")
+ variant("scripts", default=False, description="Install scripts")
+ variant("templates", default=False, description="Install templates")
+
+ def install(self, spec, prefix):
+ install_tree("modules", prefix.lib.perl5)
+ mkdirp(prefix.share.ensembl.variation)
+ for extra in ["sql", "scripts", "templates"]:
+ if spec.satisfies(f"+{extra}"):
+ target = join_path(prefix.share.ensembl, extra)
+ install_tree(extra, target)
diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl-io/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-io/package.py
new file mode 100644
index 0000000000..5793e3bd51
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-ensembl-io/package.py
@@ -0,0 +1,47 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioEnsemblIo(Package):
+ """File parsing and writing code for Ensembl."""
+
+ homepage = "https://github.com/Ensembl/ensembl-io/"
+ url = "https://github.com/Ensembl/ensembl-io/archive/release/111.zip"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ for vers, sha in [
+ ("112", "ccbffe7c15318075463db46be348655a5914762e05ff47da2d72a4c99414d39a"),
+ ("111", "f81d4c1aea88aac7105aaa3fec548e39b79f129c7abc08b55be7d0345aa5482c"),
+ ("110", "83cf00ecdb6184be480fc3cbf0ffc322d3e9411e14602396fda8d153345d6c2e"),
+ ]:
+ version(vers, sha256=sha)
+ depends_on(f"perl-bio-ensembl@{vers}", when=f"@{vers}")
+
+ extends("perl")
+
+ variant("scripts", default=False, description="Install scripts")
+
+ depends_on("perl-bio-bigfile")
+ depends_on("perl-bio-db-hts")
+ depends_on("perl-bio-ensembl")
+ depends_on("perl-bioperl@1.6.924")
+ depends_on("perl-compress-bzip2")
+ depends_on("perl-json")
+ depends_on("perl-try-tiny")
+ depends_on("perl-uri")
+ depends_on("vcftools")
+
+ def install(self, spec, prefix):
+ install_tree("modules", prefix.lib.perl5)
+ mkdirp(prefix.share.ensembl)
+ for extra in ["scripts"]:
+ if spec.satisfies(f"+{extra}"):
+ extra = extra.replace("_", "-")
+ target = join_path(prefix.share.ensembl, extra)
+ install_tree(extra, target)
diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py
new file mode 100644
index 0000000000..0078c28061
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py
@@ -0,0 +1,88 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioEnsemblVariation(Package):
+ """The Ensembl Variation Perl API and SQL schema."""
+
+ homepage = "http://www.ensembl.org/info/docs/api/variation/"
+ url = "https://github.com/Ensembl/ensembl-variation/archive/release/112.zip"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ for vers, sha in [
+ ("112", "ad75ff0a9efbf2d5c10ab5087d414bac685819664d01fbe4a9765393bd742a7c"),
+ ("111", "b2171b3f5f82a2b7e849c0ec8dc254f4bace4b3faba1b3ab75c5eea596e33bef"),
+ ("110", "210d627dcb867d9fda3a0d94428da256f394c32e34df5171b9b9e604507e1f05"),
+ ]:
+ version(vers, sha256=sha)
+ depends_on(f"perl-bio-ensembl@{vers}", when=f"@{vers}")
+ depends_on(f"perl-bio-ensembl-io@{vers}", when=f"@{vers}+tools", type="run")
+ depends_on(f"perl-bio-ensembl-funcgen@{vers}", when=f"@{vers}", type="run")
+
+ extends("perl")
+
+ variant("sql", default=False, description="Install SQL files")
+ variant("schema", default=False, description="Install schema documentation")
+ variant("nextflow", default=False, description="Install nextflow workflows")
+ variant("scripts", default=False, description="Install additional scripts")
+ variant("tools", default=False, description="Install additional tools")
+ variant("ld", default=False, description="Compile LD calculation tools")
+
+ depends_on("perl-bioperl@1.6.924")
+ depends_on("perl-bio-bigfile")
+ depends_on("perl-bio-db-hts")
+ depends_on("perl-sereal")
+ depends_on("perl-json")
+ depends_on("perl-set-intervaltree")
+ depends_on("perl-string-approx")
+ depends_on("perl-xml-hash-xs")
+ depends_on("perl-xml-libxml")
+ depends_on("perl-date-manip")
+
+ with when("+ld"):
+ depends_on("htslib", type="build")
+ depends_on("gmake", type="build")
+
+ phases = ("build", "install")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+ld"):
+ env.set("HTSLIB_DIR", self.spec["htslib"].prefix.include)
+
+ def build(self, spec, prefix):
+ if spec.satisfies("+ld"):
+ make = which("make")
+ with working_dir("C_code"):
+ make()
+ if spec.satisfies("+tools"):
+ # Fix the fact that phenotype_annotation isn't executable
+ chmod = which("chmod")
+ chmod("+x", "tools/phenotype_annotation/phenotype_annotation")
+
+ def install(self, spec, prefix):
+ install_tree("modules", prefix.lib.perl5)
+
+ mkdirp(prefix.share.ensembl.variation)
+ for extra in ["sql", "schema", "nextflow", "scripts"]:
+ if spec.satisfies(f"+{extra}"):
+ target = join_path(prefix.share.ensembl, extra)
+ install_tree(extra, target)
+
+ for requested, targets in {
+ "+ld": ["C_code/calc_genotypes", "C_code/ld_vcf"],
+ "+tools": [
+ "tools/linkage_disequilibrium/ld_tool",
+ "tools/variant_simulator/simulate_variation",
+ "tools/phenotype_annotation/phenotype_annotation",
+ ],
+ }.items():
+ if spec.satisfies(requested):
+ mkdirp(prefix.bin)
+ for target in targets:
+ install(target, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py
new file mode 100644
index 0000000000..8cf860e3d7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioEnsembl(Package):
+ """The Ensembl Core Perl API and SQL schema"""
+
+ homepage = "https://useast.ensembl.org/info/docs/api/index.html"
+ url = "https://github.com/Ensembl/ensembl/archive/release/111.zip"
+
+ def url_for_version(self, version):
+ return f"https://github.com/Ensembl/ensembl/archive/release/{version.up_to(1)}.zip"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ version("112", sha256="7c2c5265abe74b462cd4f8b26f140a4c4945cd0e2971f40711afbb4b38db5997")
+ version("111", sha256="346c47c75a6fa8dcfd9f9d22e9f1e0ccc35b2fb99f75980a0c74d892e4ab2b6d")
+ version("110", sha256="fdf725cad1a980ddf900f1af1a72bf1de355f15e408664930ed84aeccfefad15")
+
+ extends("perl")
+
+ variant("sql", default=False, description="Install SQL files")
+ variant("misc_scripts", default=False, description="Install misc Ensembl scripts")
+
+ depends_on("perl-dbi")
+ depends_on("perl-dbd-mysql@:4")
+ depends_on("perl-http-tiny")
+ depends_on("perl-io-compress")
+ depends_on("perl-uri")
+ depends_on("perl-config-inifiles")
+ depends_on("perl-gzip-faster")
+ depends_on("perl-list-moreutils")
+
+ def install(self, spec, prefix):
+ install_tree("modules", prefix.lib.perl5)
+ mkdirp(prefix.share.ensembl)
+ for extra in ["sql", "misc_scripts"]:
+ if spec.satisfies(f"+{extra}"):
+ extra = extra.replace("_", "-")
+ target = join_path(prefix.share.ensembl, extra)
+ install_tree(extra, target)
diff --git a/var/spack/repos/builtin/packages/perl-bio-eutilities/package.py b/var/spack/repos/builtin/packages/perl-bio-eutilities/package.py
new file mode 100644
index 0000000000..eeebe5a2d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-eutilities/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioEutilities(PerlPackage):
+ """BioPerl low-level API for retrieving and storing data from NCBI eUtils"""
+
+ homepage = "https://metacpan.org/pod/Bio::DB::EUtilities"
+ url = "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/Bio-EUtilities-1.77.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.77", sha256="4d018c8cbda73c3d71487165261a3dfc4e823f8e22747497f6a586d5ad6f737f")
+
+ depends_on("perl@5.10.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bio-asn1-entrezgene", type=("build", "run", "test"))
+ depends_on("perl-bioperl", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl", type=("build", "run", "test"))
+ depends_on("perl-text-csv", type=("build", "run", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
+ depends_on("perl-xml-simple", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-bio-variation/package.py b/var/spack/repos/builtin/packages/perl-bio-variation/package.py
new file mode 100644
index 0000000000..2ab5b421ce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bio-variation/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBioVariation(PerlPackage):
+ """BioPerl variation-related functionality"""
+
+ homepage = "https://metacpan.org/pod/Bio::Variation"
+ url = "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/Bio-Variation-1.7.5.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.7.5", sha256="4bffdd060b5e793919f700e46056eb3f0195ed4df2e60ad68b383c31e51f824f")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bioperl", type=("build", "run", "test"))
+ depends_on("perl-io-string", type=("build", "run", "test"))
+ depends_on("perl-xml-twig", type=("build", "run", "test"))
+ depends_on("perl-xml-writer@0.4:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-bioperl/package.py b/var/spack/repos/builtin/packages/perl-bioperl/package.py
index abe4ab450a..1385bd5911 100644
--- a/var/spack/repos/builtin/packages/perl-bioperl/package.py
+++ b/var/spack/repos/builtin/packages/perl-bioperl/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from spack.package import *
@@ -34,85 +32,81 @@ class PerlBioperl(PerlPackage):
and contribute your own if possible."""
homepage = "https://metacpan.org/pod/BioPerl"
- url = "https://cpan.metacpan.org/authors/id/C/CD/CDRAUG/BioPerl-1.7.6.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-1.7.8.tar.gz"
license("Artistic-1.0")
+ version("1.7.8", sha256="c490a3be7715ea6e4305efd9710e5edab82dabc55fd786b6505b550a30d71738")
version(
"1.7.6",
sha256="df2a3efc991b9b5d7cc9d038a1452c6dac910c9ad2a0e47e408dd692c111688d",
- preferred=True,
+ url="https://cpan.metacpan.org/authors/id/C/CD/CDRAUG/BioPerl-1.7.6.tar.gz",
)
+ version("1.6.924", sha256="616a7546bb3c58504de27304a0f6cb904e18b6bbcdb6a4ec8454f2bd37bb76d0")
+
+ # This is technically the same as 1.7.2, but with a more conventional version number.
version(
"1.007002",
sha256="17aa3aaab2f381bbcaffdc370002eaf28f2c341b538068d6586b2276a76464a1",
url="https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-1.007002.tar.gz",
+ deprecated=True,
)
- # According to cpandeps.grinnz.com Module-Build is both a build and run
- # time dependency for BioPerl
- depends_on("perl-module-build", type=("build", "run"))
- depends_on("perl-uri", type=("build", "run"))
- depends_on("perl-io-string", type=("build", "run"))
- depends_on("perl-data-stag", type=("build", "run"))
- depends_on("perl-test-most", type=("build", "run"))
- depends_on("perl-error", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-graph", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-http-message", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-io-stringy", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-ipc-run", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-list-moreutils", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-set-scalar", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-test-requiresinternet", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-dom", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-dom-xpath", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-libxml", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-sax", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-sax-base", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-sax-writer", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-twig", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-xml-writer", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-yaml", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-libwww-perl", when="@1.7.6:", type=("build", "run"))
- depends_on("perl-libxml-perl", when="@1.7.6:", type=("build", "run"))
-
- @when("@1.007002")
- def configure(self, spec, prefix):
- # Overriding default configure method in order to cater to interactive
- # Build.pl
- self.build_method = "Build.PL"
- self.build_executable = Executable(join_path(self.stage.source_path, "Build"))
-
- # Config questions consist of:
- # Do you want to run the Bio::DB::GFF or Bio::DB::SeqFeature::Store
- # live database tests? y/n [n]
- #
- # Install [a]ll BioPerl scripts, [n]one, or choose groups
- # [i]nteractively? [a]
- #
- # Do you want to run tests that require connection to servers across
- # the internet (likely to cause some failures)? y/n [n]
- #
- # Eventually, someone can add capability for the other options, but
- # the current answers are the most practical for a spack install.
-
- config_answers = ["n\n", "a\n", "n\n"]
- config_answers_filename = "spack-config.in"
-
- with open(config_answers_filename, "w") as f:
- f.writelines(config_answers)
-
- with open(config_answers_filename, "r") as f:
- inspect.getmodule(self).perl("Build.PL", "--install_base=%s" % self.prefix, input=f)
-
- # Need to also override the build and install methods to make sure that the
- # Build script is run through perl and not use the shebang, as it might be
- # too long. This is needed because this does not pick up the
- # `@run_after(configure)` step defined in `PerlPackage`.
- @when("@1.007002")
- def build(self, spec, prefix):
- inspect.getmodule(self).perl("Build")
-
- @when("@1.007002")
- def install(self, spec, prefix):
- inspect.getmodule(self).perl("Build", "install")
+ with default_args(type=("build", "run")):
+ depends_on("perl-data-stag")
+ depends_on("perl-error")
+ depends_on("perl-graph")
+ depends_on("perl-http-message")
+ depends_on("perl-io-string")
+ depends_on("perl-io-stringy")
+ depends_on("perl-ipc-run")
+ depends_on("perl-libwww-perl")
+ depends_on("perl-libxml-perl")
+ depends_on("perl-list-moreutils")
+ depends_on("perl-module-build")
+ depends_on("perl-set-scalar")
+ depends_on("perl-test-most")
+ depends_on("perl-test-requiresinternet")
+ depends_on("perl-uri")
+ depends_on("perl-xml-dom")
+ depends_on("perl-xml-dom-xpath")
+ depends_on("perl-xml-libxml")
+ depends_on("perl-xml-parser")
+ depends_on("perl-xml-sax")
+ depends_on("perl-xml-sax-base")
+ depends_on("perl-xml-sax-writer")
+ depends_on("perl-xml-simple")
+ depends_on("perl-xml-twig")
+ depends_on("perl-yaml")
+
+ with when("@:1.7.0"):
+ depends_on("perl-clone")
+ depends_on("perl-db-file")
+ depends_on("perl-dbd-mysql")
+ depends_on("perl-dbd-pg")
+ depends_on("perl-dbd-sqlite")
+ depends_on("perl-dbi")
+ depends_on("perl-gd")
+ depends_on("perl-graphviz")
+ depends_on("perl-scalar-list-utils")
+ depends_on("perl-set-scalar")
+ depends_on("perl-svg")
+
+ # TODO:
+ # variant("optionaldeps", default=False, description="Add optional dependencies")
+ # with when("@:1.7.0+optionaldeps"):
+ # depends_on("perl-sort-naturally")
+ # depends_on("perl-test-harness")
+ # depends_on("perl-text-parsewords")
+ # depends_on("perl-algorithm-munkres")
+ # depends_on("perl-array-compare")
+ # depends_on("perl-bio-phylo")
+ # depends_on("perl-convert-binary-c")
+ # depends_on("perl-html-entities")
+ # depends_on("perl-html-headparser")
+ # depends_on("perl-html-tableextract")
+ # depends_on("perl-svg-graph")
+
+ def configure_args(self):
+ args = ["--accept=1"]
+ return args
diff --git a/var/spack/repos/builtin/packages/perl-bit-vector/package.py b/var/spack/repos/builtin/packages/perl-bit-vector/package.py
index f48e8c993a..ecf719976e 100644
--- a/var/spack/repos/builtin/packages/perl-bit-vector/package.py
+++ b/var/spack/repos/builtin/packages/perl-bit-vector/package.py
@@ -16,4 +16,6 @@ class PerlBitVector(PerlPackage):
version("7.4", sha256="3c6daa671fecfbc35f92a9385b563d65f50dfc6bdc8b4805f9ef46c0d035a926")
+ depends_on("c", type="build") # generated
+
depends_on("perl-carp-clan", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-bsd-resource/package.py b/var/spack/repos/builtin/packages/perl-bsd-resource/package.py
new file mode 100644
index 0000000000..b1c384c7b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-bsd-resource/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlBsdResource(PerlPackage):
+ """BSD process resource limit and priority functions"""
+
+ homepage = "https://metacpan.org/pod/BSD::Resource"
+ url = "https://cpan.metacpan.org/authors/id/J/JH/JHI/BSD-Resource-1.2911.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.2911", sha256="9d1cfba063cc18f72427a22451f7908836b7331ac8785dbe07553c5b043a0c3d")
diff --git a/var/spack/repos/builtin/packages/perl-cache-cache/package.py b/var/spack/repos/builtin/packages/perl-cache-cache/package.py
new file mode 100644
index 0000000000..c3de294570
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-cache-cache/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCacheCache(PerlPackage):
+ """Extends Cache::SizeAwareMemoryCache"""
+
+ homepage = "https://metacpan.org/pod/Cache::Cache"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Cache-Cache-1.08.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.08", sha256="d2c7fd5dba5dd010b7d8923516890bb6ccf6b5f188ccb69f35cb0fd6c031d1e8")
+
+ depends_on("perl-digest-sha1@2.02:", type=("build", "run", "test"))
+ depends_on("perl-error@0.15:", type=("build", "run", "test"))
+ depends_on("perl-ipc-sharelite@0.09:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-cache-memcached/package.py b/var/spack/repos/builtin/packages/perl-cache-memcached/package.py
new file mode 100644
index 0000000000..6a3c4f473e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-cache-memcached/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCacheMemcached(PerlPackage):
+ """Client library for memcached (memory cache daemon)"""
+
+ homepage = "https://metacpan.org/pod/Cache::Memcached"
+ url = "https://cpan.metacpan.org/authors/id/D/DO/DORMANDO/Cache-Memcached-1.30.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.30", sha256="31b3c51ec0eaaf03002e2cc8e3d7d5cbe61919cfdada61c008eb9853acac42a9")
+
+ depends_on("perl-string-crc32", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-cairo/package.py b/var/spack/repos/builtin/packages/perl-cairo/package.py
index 828cbc64ae..343f902c62 100644
--- a/var/spack/repos/builtin/packages/perl-cairo/package.py
+++ b/var/spack/repos/builtin/packages/perl-cairo/package.py
@@ -14,6 +14,7 @@ class PerlCairo(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.109", sha256="8219736e401c2311da5f515775de43fd87e6384b504da36a192f2b217643077f")
version("1.106", sha256="e64803018bc7cba49e73e258547f5378cc4249797beafec524852140f49c45c4")
depends_on("cairo")
diff --git a/var/spack/repos/builtin/packages/perl-canary-stability/package.py b/var/spack/repos/builtin/packages/perl-canary-stability/package.py
new file mode 100644
index 0000000000..be17d1e21b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-canary-stability/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCanaryStability(PerlPackage):
+ """Canary to check perl compatibility for schmorp's modules"""
+
+ homepage = "https://metacpan.org/pod/Canary::Stability"
+ url = "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Canary-Stability-2013.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("2013", sha256="a5c91c62cf95fcb868f60eab5c832908f6905221013fea2bce3ff57046d7b6ea")
diff --git a/var/spack/repos/builtin/packages/perl-carp-clan/package.py b/var/spack/repos/builtin/packages/perl-carp-clan/package.py
index 08f43e817e..ce0f79ee1a 100644
--- a/var/spack/repos/builtin/packages/perl-carp-clan/package.py
+++ b/var/spack/repos/builtin/packages/perl-carp-clan/package.py
@@ -10,11 +10,18 @@ class PerlCarpClan(PerlPackage):
"""Report errors from perspective of caller of a "clan" of modules"""
homepage = "https://metacpan.org/pod/Carp::Clan"
- url = "http://search.cpan.org/CPAN/authors/id/K/KE/KENTNL/Carp-Clan-6.06.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Carp-Clan-6.08.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.08", sha256="c75f92e34422cc5a65ab05d155842b701452434e9aefb649d6e2289c47ef6708")
version("6.06", sha256="ea4ac8f611354756d43cb369880032901e9cc4cc7e0bebb7b647186dac00c9d4")
depends_on("perl-test-exception", type=("build", "run"))
depends_on("perl-sub-uplevel", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.08:"):
+ return f"https://cpan.metacpan.org/authors/id/E/ET/ETHER/Carp-Clan-{version}.tar.gz"
+ else:
+ return f"https://cpan.metacpan.org/authors/id/K/KE/KENTNL/Carp-Clan-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-action-renderview/package.py b/var/spack/repos/builtin/packages/perl-catalyst-action-renderview/package.py
new file mode 100644
index 0000000000..878a3de6b2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-action-renderview/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystActionRenderview(PerlPackage):
+ """Sensible default end action."""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Action::RenderView"
+ url = (
+ "https://cpan.metacpan.org/authors/id/B/BO/BOBTFISH/Catalyst-Action-RenderView-0.16.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="8565203950a057d43ecd64e9593715d565c2fbd8b02c91f43c53b2111acd3948")
+
+ depends_on("perl-catalyst-runtime@5.80030:", type=("build", "run", "test"))
+ depends_on("perl-data-visitor@0.24:", type=("build", "run", "test"))
+ depends_on("perl-http-request-ascgi", type=("build", "link"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-action-rest/package.py b/var/spack/repos/builtin/packages/perl-catalyst-action-rest/package.py
new file mode 100644
index 0000000000..b6937ca986
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-action-rest/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystActionRest(PerlPackage):
+ """Automated REST Method Dispatching"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Action::REST"
+ url = "https://cpan.metacpan.org/authors/id/J/JJ/JJNAPIORK/Catalyst-Action-REST-1.21.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.21", sha256="ccf81bba5200d3a0ad6901f923af173a3d4416618aea08a6938baaffdef4cb20")
+
+ depends_on("perl-catalyst-runtime@5.80030:", type=("build", "run", "test"))
+ depends_on("perl-class-inspector@1.13:", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl", type=("build", "test"))
+ depends_on("perl-module-pluggable", type=("build", "run", "test"))
+ depends_on("perl-moose@1.03:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.10:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-params-validate@0.76:", type=("build", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-uri-find", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-component-instancepercontext/package.py b/var/spack/repos/builtin/packages/perl-catalyst-component-instancepercontext/package.py
new file mode 100644
index 0000000000..272f37942e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-component-instancepercontext/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystComponentInstancepercontext(PerlPackage):
+ """Moose role to create only one instance of component per context"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Component::InstancePerContext"
+ url = "https://cpan.metacpan.org/authors/id/G/GR/GRODITI/Catalyst-Component-InstancePerContext-0.001001.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.001001", sha256="7f63f930e1e613f15955c9e6d73873675c50c0a3bc2a61a034733361ed26d271")
+
+ depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
+ depends_on("perl-moose", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-devel/package.py b/var/spack/repos/builtin/packages/perl-catalyst-devel/package.py
new file mode 100644
index 0000000000..376a7af2a8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-devel/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystDevel(PerlPackage):
+ """Catalyst Development Tools"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Devel"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Catalyst-Devel-1.42.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.42", sha256="7ec6f0b6cab5b8c097e47769fc73a4d4c015a58c41fdb40fc24df3ee77c48abd")
+
+ depends_on("perl-catalyst-action-renderview@0.10:", type=("build", "run", "test"))
+ depends_on("perl-catalyst-plugin-configloader@0.30:", type=("build", "run", "test"))
+ depends_on("perl-catalyst-plugin-static-simple@0.28:", type=("build", "run", "test"))
+ depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
+ depends_on("perl-config-general@2.42:", type=("build", "run", "test"))
+ depends_on("perl-file-changenotify@0.07:", type=("build", "run", "test"))
+ depends_on("perl-file-copy-recursive", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir-install", type=("build"))
+ depends_on("perl-module-install@1.02:", type=("build", "run", "test"))
+ depends_on("perl-moose", type=("build", "run", "test"))
+ depends_on("perl-moosex-emulate-class-accessor-fast", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean", type=("build", "run", "test"))
+ depends_on("perl-path-class@0.09:", type=("build", "run", "test"))
+ depends_on("perl-template-toolkit", type=("build", "run", "test"))
+ depends_on("perl-test-fatal@0.003:", type=("build", "test"))
+ depends_on("perl-yaml-tiny", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-plugin-cache/package.py b/var/spack/repos/builtin/packages/perl-catalyst-plugin-cache/package.py
new file mode 100644
index 0000000000..8d524524cb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-plugin-cache/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystPluginCache(PerlPackage):
+ """Flexible caching support for Catalyst."""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Plugin::Cache"
+ url = "https://cpan.metacpan.org/authors/id/B/BO/BOBTFISH/Catalyst-Plugin-Cache-0.12.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.12", sha256="295fed449c9324b06578fd468e3391e04fbf64ad24376a004408d1bc6f5443e0")
+
+ depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
+ depends_on("perl-task-weaken", type=("build", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "link"))
+ depends_on("perl-test-exception", type=("build", "link"))
+ depends_on("perl-class-accessor", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-plugin-configloader/package.py b/var/spack/repos/builtin/packages/perl-catalyst-plugin-configloader/package.py
new file mode 100644
index 0000000000..9f03292418
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-plugin-configloader/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystPluginConfigloader(PerlPackage):
+ """Load config files of various types"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Plugin::ConfigLoader"
+ url = (
+ "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Catalyst-Plugin-ConfigLoader-0.35.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.35", sha256="9e2a698a6f2d046e0dc5e57512929cd423c807d4a36ba3f29e9e5adcd71a1971")
+
+ depends_on("perl-catalyst-runtime@5.7008:", type=("build", "run", "test"))
+ depends_on("perl-config-any@0.20:", type=("build", "run", "test"))
+ depends_on("perl-data-visitor@0.24:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.09:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-plugin-static-simple/package.py b/var/spack/repos/builtin/packages/perl-catalyst-plugin-static-simple/package.py
new file mode 100644
index 0000000000..4325cf3e21
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-plugin-static-simple/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystPluginStaticSimple(PerlPackage):
+ """Make serving static pages painless."""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Plugin::Static::Simple"
+ url = "https://cpan.metacpan.org/authors/id/I/IL/ILMARI/Catalyst-Plugin-Static-Simple-0.37.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.37", sha256="5a4d85a3588cd4e83f1b002581412e7d71b7d57f66056e5d87a36f93d89c9e7c")
+
+ depends_on("perl-catalyst-runtime@5.80008:", type=("build", "run", "test"))
+ depends_on("perl-mime-types@2.03:", type=("build", "run", "test"))
+ depends_on("perl-moose", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-runtime/package.py b/var/spack/repos/builtin/packages/perl-catalyst-runtime/package.py
new file mode 100644
index 0000000000..3736b5ed81
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-runtime/package.py
@@ -0,0 +1,62 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystRuntime(PerlPackage):
+ """The Catalyst Framework Runtime"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::Test"
+ url = "https://cpan.metacpan.org/authors/id/J/JJ/JJNAPIORK/Catalyst-Runtime-5.90131.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("5.90131", sha256="9d641efacf0f9935e6ecb98f5a3b476c961b1f819bd2f8f23a647d1d867e1849")
+
+ depends_on("perl@5.8.3:", type=("build", "link", "run", "test"))
+ depends_on("perl-cgi-simple", type=("build", "run", "test"))
+ depends_on("perl-cgi-struct", type=("build", "run", "test"))
+ depends_on("perl-class-c3-adopt-next@0.07:", type=("build", "run", "test"))
+ depends_on("perl-class-load@0.12:", type=("build", "run", "test"))
+ depends_on("perl-data-dump", type=("build", "run", "test"))
+ depends_on("perl-data-optlist", type=("build", "run", "test"))
+ depends_on("perl-hash-multivalue", type=("build", "run", "test"))
+ depends_on("perl-html-parser", type=("build", "run", "test"))
+ depends_on("perl-http-body@1.22:", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs@1.000000:", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl@5.837:", type=("build", "run", "test"))
+ depends_on("perl-module-pluggable@4.7:", type=("build", "run", "test"))
+ depends_on("perl-moose@2.1400:", type=("build", "run", "test"))
+ depends_on("perl-moosex-emulate-class-accessor-fast@0.00903:", type=("build", "run", "test"))
+ depends_on("perl-moosex-getopt@0.48:", type=("build", "run", "test"))
+ depends_on("perl-moosex-methodattributes", type=("build", "run", "test"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean@0.23:", type=("build", "run", "test"))
+ depends_on("perl-path-class@0.09:", type=("build", "run", "test"))
+ depends_on("perl-perlio-utf8-strict", type=("build", "run", "test"))
+ depends_on("perl-plack@0.9991:", type=("build", "run", "test"))
+ depends_on(
+ "perl-plack-middleware-fixmissingbodyinredirect@0.09:", type=("build", "run", "test")
+ )
+ depends_on("perl-plack-middleware-methodoverride@0.12:", type=("build", "run", "test"))
+ depends_on("perl-plack-middleware-removeredundantbody@0.03:", type=("build", "run", "test"))
+ depends_on("perl-plack-middleware-reverseproxy@0.04:", type=("build", "run", "test"))
+ depends_on("perl-plack-test-externalserver", type=("build", "run", "test"))
+ depends_on("perl-safe-isa", type=("build", "run", "test"))
+ depends_on("perl-stream-buffered", type=("build", "run", "test"))
+ depends_on("perl-string-rewriteprefix@0.004:", type=("build", "run", "test"))
+ depends_on("perl-sub-exporter", type=("build", "run", "test"))
+ depends_on("perl-task-weaken", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-text-simpletable@0.03:", type=("build", "run", "test"))
+ depends_on("perl-tree-simple@1.15:", type=("build", "run", "test"))
+ depends_on("perl-tree-simple-visitorfactory", type=("build", "run", "test"))
+ depends_on("perl-try-tiny@0.17:", type=("build", "run", "test"))
+ depends_on("perl-uri@1.65:", type=("build", "run", "test"))
+ depends_on("perl-uri-ws@0.03:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-catalyst-view-json/package.py b/var/spack/repos/builtin/packages/perl-catalyst-view-json/package.py
new file mode 100644
index 0000000000..83b53d9416
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-catalyst-view-json/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCatalystViewJson(PerlPackage):
+ """JSON view for your data"""
+
+ homepage = "https://metacpan.org/pod/Catalyst::View::JSON"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Catalyst-View-JSON-0.37.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.37", sha256="c5da3f6e8a77b1c99855de37d58802c0b194e29a7d86c60ed3831cfdd59f9dec")
+
+ depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs@1.003000:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-cgi-simple/package.py b/var/spack/repos/builtin/packages/perl-cgi-simple/package.py
new file mode 100644
index 0000000000..66721af26c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-cgi-simple/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCgiSimple(PerlPackage):
+ """A Simple totally OO CGI interface that is CGI.pm compliant"""
+
+ homepage = "https://metacpan.org/pod/CGI::Simple"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/CGI-Simple-1.281.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.281", sha256="4d58103fdfa5c8e1ed076b15d5cafb7001b2886cb3396f00564a881eb324e5a7")
+
+ depends_on("perl-test-exception", type=("build", "test"))
+ depends_on("perl-test-nowarnings", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-cgi-struct/package.py b/var/spack/repos/builtin/packages/perl-cgi-struct/package.py
new file mode 100644
index 0000000000..4ce07e2ae1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-cgi-struct/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCgiStruct(PerlPackage):
+ """Build structures from CGI data"""
+
+ homepage = "https://metacpan.org/pod/CGI::Struct"
+ url = "https://cpan.metacpan.org/authors/id/F/FU/FULLERMD/CGI-Struct-1.21.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("BSD")
+
+ version("1.21", sha256="d13d8da7fdcd6d906054e4760fc28a718aec91bd3cf067a58927fb7cb1c09d6c")
+
+ depends_on("perl-test-deep", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py b/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py
new file mode 100644
index 0000000000..29757e90bf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlChartGnuplot(PerlPackage):
+ """Plot graph using Gnuplot in Perl on the fly"""
+
+ homepage = "https://metacpan.org/pod/Chart::Gnuplot"
+ url = "https://cpan.metacpan.org/authors/id/K/KW/KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.23.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.23", sha256="dcb46c0f93436464bdc3403469c828c6c33e954123a2adf4092fbb30bb244b6c")
diff --git a/var/spack/repos/builtin/packages/perl-chi-driver-memcached/package.py b/var/spack/repos/builtin/packages/perl-chi-driver-memcached/package.py
new file mode 100644
index 0000000000..c256afb22b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-chi-driver-memcached/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlChiDriverMemcached(PerlPackage):
+ """Use Memcached for cache storage"""
+
+ homepage = "https://metacpan.org/pod/CHI::Driver::Memcached"
+ url = "https://cpan.metacpan.org/authors/id/J/JS/JSWARTZ/CHI-Driver-Memcached-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="cff9857fbf3f83247b8fc3ab41bdbf141ea0afe23b45109ee0b415f6baadb3c6")
+
+ depends_on("perl-chi@0.33:", type=("build", "run", "test"))
+ depends_on("perl-moose@0.66:", type=("build", "run", "test"))
+ depends_on("perl-test-class", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-chi/package.py b/var/spack/repos/builtin/packages/perl-chi/package.py
new file mode 100644
index 0000000000..1bebe79f94
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-chi/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlChi(PerlPackage):
+ """Unified cache handling interface"""
+
+ homepage = "https://metacpan.org/pod/CHI"
+ url = "https://cpan.metacpan.org/authors/id/A/AS/ASB/CHI-0.61.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.61", sha256="583545c9e5312bb4193ab16de9f55ff8f4b4a7ded128cee8dd2cb021d4678b5b")
+
+ depends_on("perl-cache-cache", type=("build", "run", "test"))
+ depends_on("perl-carp-assert@0.20:", type=("build", "run", "test"))
+ depends_on("perl-class-load", type=("build", "run", "test"))
+ depends_on("perl-data-uuid", type=("build", "run", "test"))
+ depends_on("perl-digest-jhash", type=("build", "run", "test"))
+ depends_on("perl-hash-moreutils", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs@1.003003:", type=("build", "run", "test"))
+ depends_on("perl-list-moreutils@0.13:", type=("build", "run", "test"))
+ depends_on("perl-log-any@0.08:", type=("build", "run", "test"))
+ depends_on("perl-module-mask", type=("build", "run", "test"))
+ depends_on("perl-moo@1.003:", type=("build", "run", "test"))
+ depends_on("perl-moox-types-mooselike@0.23:", type=("build", "run", "test"))
+ depends_on("perl-moox-types-mooselike-numeric", type=("build", "run", "test"))
+ depends_on("perl-string-rewriteprefix", type=("build", "run", "test"))
+ depends_on("perl-task-weaken", type=("build", "run", "test"))
+ depends_on("perl-test-class", type=("build", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "run", "test"))
+ depends_on("perl-test-exception", type=("build", "run", "test"))
+ depends_on("perl-test-warn", type=("build", "run", "test"))
+ depends_on("perl-time-duration@1.06:", type=("build", "run", "test"))
+ depends_on("perl-time-duration-parse@0.03:", type=("build", "run", "test"))
+ depends_on("perl-timedate", type=("build", "run", "test"))
+ depends_on("perl-try-tiny@0.05:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-accessor-grouped/package.py b/var/spack/repos/builtin/packages/perl-class-accessor-grouped/package.py
new file mode 100644
index 0000000000..d2cc5d6ff9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-accessor-grouped/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassAccessorGrouped(PerlPackage):
+ """Lets you build groups of accessors"""
+
+ homepage = "https://metacpan.org/pod/Class::Accessor::Grouped"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Class-Accessor-Grouped-0.10014.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.10014", sha256="35d5b03efc09f67f3a3155c9624126c3e162c8e3ca98ff826db358533a44c4bb")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-runtime@0.012:", type=("build", "run", "test"))
+ depends_on("perl-test-exception@0.31:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-accessor-lvalue/package.py b/var/spack/repos/builtin/packages/perl-class-accessor-lvalue/package.py
new file mode 100644
index 0000000000..997dc30887
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-accessor-lvalue/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassAccessorLvalue(PerlPackage):
+ """Create Lvalue accessors"""
+
+ homepage = "https://metacpan.org/pod/Class::Accessor::Lvalue"
+ url = "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Class-Accessor-Lvalue-0.11.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.11", sha256="ea5b1bcfbc1c3c63004eb280a5415f7dad2a82257675ab033382814fe168913c")
+
+ depends_on("perl-class-accessor", type=("build", "run", "test"))
+ depends_on("perl-want", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-accessor/package.py b/var/spack/repos/builtin/packages/perl-class-accessor/package.py
new file mode 100644
index 0000000000..2a9ff0a993
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-accessor/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassAccessor(PerlPackage):
+ """Automated accessor generation"""
+
+ homepage = "https://metacpan.org/pod/Class::Accessor"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KASEI/Class-Accessor-0.51.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.51", sha256="bf12a3e5de5a2c6e8a447b364f4f5a050bf74624c56e315022ae7992ff2f411c")
diff --git a/var/spack/repos/builtin/packages/perl-class-c3-adopt-next/package.py b/var/spack/repos/builtin/packages/perl-class-c3-adopt-next/package.py
new file mode 100644
index 0000000000..47609d56e4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-c3-adopt-next/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassC3AdoptNext(PerlPackage):
+ """Make NEXT suck less"""
+
+ homepage = "https://metacpan.org/pod/Class::C3::Adopt::NEXT"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-C3-Adopt-NEXT-0.14.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.14", sha256="85676225aadb76e8666a6abe2e0659d40eb4581ad6385b170eea4e1d6bf34bf7")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-build-tiny@0.039:", type=("build"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
+ depends_on("perl-test-exception@0.27:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-c3-componentised/package.py b/var/spack/repos/builtin/packages/perl-class-c3-componentised/package.py
new file mode 100644
index 0000000000..0f7f9a73e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-c3-componentised/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassC3Componentised(PerlPackage):
+ """Load mix-ins or components to your C3-based class"""
+
+ homepage = "https://metacpan.org/pod/Class::C3::Componentised"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Class-C3-Componentised-1.001002.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.001002", sha256="3051b146dc1efeaea1a9a2e9e6b1773080995b898ab583f155658d5fc80b9693")
+
+ depends_on("perl@5.6.2:", type=("build", "link", "run", "test"))
+ depends_on("perl-class-c3@0.20:", type=("build", "run", "test"))
+ depends_on("perl-class-inspector@1.32:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.09:", type=("build", "run", "test"))
+ depends_on("perl-test-exception@0.31:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-c3/package.py b/var/spack/repos/builtin/packages/perl-class-c3/package.py
new file mode 100644
index 0000000000..96e26d7c38
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-class-c3/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlClassC3(PerlPackage):
+ """A pragma to use the C3 method resolution order algorithm"""
+
+ homepage = "https://metacpan.org/pod/Class::C3"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Class-C3-0.35.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.35", sha256="84053cf1a68fcc8c12056c2f120adf04f7f68e3be34f4408e95d026fee67e33e")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-algorithm-c3@0.07:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py b/var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py
index f80a9e744b..565c58520b 100644
--- a/var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py
+++ b/var/spack/repos/builtin/packages/perl-class-data-inheritable/package.py
@@ -10,8 +10,15 @@ class PerlClassDataInheritable(PerlPackage):
"""For creating accessor/mutators to class data."""
homepage = "https://metacpan.org/pod/Class::Data::Inheritable"
- url = "http://search.cpan.org/CPAN/authors/id/T/TM/TMTM/Class-Data-Inheritable-0.08.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/R/RS/RSHERER/Class-Data-Inheritable-0.09.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.09", sha256="44088d6e90712e187b8a5b050ca5b1c70efe2baa32ae123e9bd8f59f29f06e4d")
version("0.08", sha256="9967feceea15227e442ec818723163eb6d73b8947e31f16ab806f6e2391af14a")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@0.09:"):
+ return f"https://cpan.metacpan.org/authors/id/R/RS/RSHERER/Class-Data-Inheritable-{version}.tar.gz"
+ else:
+ return f"https://cpan.metacpan.org/authors/id/T/TM/TMTM/Class-Data-Inheritable-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-class-singleton/package.py b/var/spack/repos/builtin/packages/perl-class-singleton/package.py
index 3e97feec1a..7cac1f7668 100644
--- a/var/spack/repos/builtin/packages/perl-class-singleton/package.py
+++ b/var/spack/repos/builtin/packages/perl-class-singleton/package.py
@@ -19,11 +19,3 @@ class PerlClassSingleton(PerlPackage):
version("1.6", sha256="27ba13f0d9512929166bbd8c9ef95d90d630fc80f0c9a1b7458891055e9282a4")
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Class::Singleton; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-class-tiny/package.py b/var/spack/repos/builtin/packages/perl-class-tiny/package.py
index 8db029955d..47b69c0a38 100644
--- a/var/spack/repos/builtin/packages/perl-class-tiny/package.py
+++ b/var/spack/repos/builtin/packages/perl-class-tiny/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
diff --git a/var/spack/repos/builtin/packages/perl-clone-pp/package.py b/var/spack/repos/builtin/packages/perl-clone-pp/package.py
index 76936f1170..65318674fc 100644
--- a/var/spack/repos/builtin/packages/perl-clone-pp/package.py
+++ b/var/spack/repos/builtin/packages/perl-clone-pp/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlClonePp(PerlPackage):
version("1.08", sha256="57203094a5d8574b6a00951e8f2399b666f4e74f9511d9c9fb5b453d5d11f578")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Clone::PP; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-common-sense/package.py b/var/spack/repos/builtin/packages/perl-common-sense/package.py
index 930445579f..7a598ff533 100644
--- a/var/spack/repos/builtin/packages/perl-common-sense/package.py
+++ b/var/spack/repos/builtin/packages/perl-common-sense/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlCommonSense(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("3.75", sha256="a86a1c4ca4f3006d7479064425a09fa5b6689e57261fcb994fe67d061cba0e7e")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use common::sense; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py b/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py
new file mode 100644
index 0000000000..5eac90503a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCompressBzip2(PerlPackage):
+ """Interface to Bzip2 compression library"""
+
+ homepage = "https://metacpan.org/pod/Compress::Bzip2"
+ url = "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Compress-Bzip2-2.28.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.28", sha256="859f835c3f5c998810d8b2a6f9e282ff99d6cb66ccfa55cae7e66dafb035116e")
+
+ depends_on("c", type="build")
+ depends_on("bzip2", type=("build", "test", "run"))
+
+ def setup_build_environment(self, env):
+ env.set("BZLIB_INCLUDE", self.spec["bzip2"].prefix.include)
+ env.set("BZLIB_LIB", self.spec["bzip2"].prefix.lib)
+ env.set("BZLIB_BIN", self.spec["bzip2"].prefix.bin)
+
+ def test_use(self):
+ """Test 'use module'"""
+ options = ["-we", 'use strict; use Compress::Bzip2; print("OK\n")']
+
+ perl = self.spec["perl"].command
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-compress-lzo/package.py b/var/spack/repos/builtin/packages/perl-compress-lzo/package.py
index d9850b3860..08154eb0e8 100644
--- a/var/spack/repos/builtin/packages/perl-compress-lzo/package.py
+++ b/var/spack/repos/builtin/packages/perl-compress-lzo/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlCompressLzo(PerlPackage):
depends_on("perl@5.4.0:", type=("build", "link", "run", "test"))
depends_on("perl-devel-checklib@0.9:", type=("build"))
depends_on("lzo", type=("build", "link", "run"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Compress::LZO; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py b/var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py
index e3d5727399..21791aa842 100644
--- a/var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py
+++ b/var/spack/repos/builtin/packages/perl-compress-raw-bzip2/package.py
@@ -14,8 +14,11 @@ class PerlCompressRawBzip2(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.212", sha256="6caeee843c428f45fa9646ea98dc675470db63dbac0ee3e2d8e9ee4eb58a856d")
version("2.204", sha256="ee7b490e67e7e2a7a0e8c1e1aa29a9610066149f46b836921149ad1813f70c69")
version("2.081", sha256="8692b5c9db91954408e24e805fbfda222879da80d89d9410791421e3e5bc3520")
+ depends_on("c", type="build") # generated
+
depends_on("bzip2")
depends_on("perl-extutils-makemaker", type="build")
diff --git a/var/spack/repos/builtin/packages/perl-compress-raw-zlib/package.py b/var/spack/repos/builtin/packages/perl-compress-raw-zlib/package.py
index 8f4416bbb9..8006b3a58f 100644
--- a/var/spack/repos/builtin/packages/perl-compress-raw-zlib/package.py
+++ b/var/spack/repos/builtin/packages/perl-compress-raw-zlib/package.py
@@ -14,8 +14,12 @@ class PerlCompressRawZlib(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.212", sha256="6d9de0c11921fd520dfd99a3f6b0ca9f1fd9850274f8bec10bbaa4f6803cc049")
+ version("2.206", sha256="46785a6a383a1c843895b7f9f25d5d759e7c305159f9d1e04a3604eb74c77374")
version("2.204", sha256="f161f4297efadbed79c8b096a75951784fc5ccd3170bd32866a19e5c6876d13f")
version("2.081", sha256="e156de345bd224bbdabfcab0eeb3f678a3099a4e86c9d1b6771d880b55aa3a1b")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("perl-extutils-makemaker", type="build")
diff --git a/var/spack/repos/builtin/packages/perl-config-any/package.py b/var/spack/repos/builtin/packages/perl-config-any/package.py
new file mode 100644
index 0000000000..556c1c92e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-config-any/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlConfigAny(PerlPackage):
+ """Load configuration from different file formats, transparently"""
+
+ homepage = "https://metacpan.org/pod/Config::Any"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Config-Any-0.33.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.33", sha256="c0668eb5f2cd355bf20557f04dc18a25474b7a0bcfa79562e3165d9a3c789333")
+
+ depends_on("perl-module-pluggable", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-config-general/package.py b/var/spack/repos/builtin/packages/perl-config-general/package.py
index 3397394fb0..e7371fd1a2 100644
--- a/var/spack/repos/builtin/packages/perl-config-general/package.py
+++ b/var/spack/repos/builtin/packages/perl-config-general/package.py
@@ -16,3 +16,5 @@ class PerlConfigGeneral(PerlPackage):
version("2.65", sha256="4d6d5754be3a9f30906836f0cc10e554c8832e14e7a1341efb15b05d706fc58f")
version("2.63", sha256="0a9bf977b8aabe76343e88095d2296c8a422410fd2a05a1901f2b20e2e1f6fad")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-config-inifiles/package.py b/var/spack/repos/builtin/packages/perl-config-inifiles/package.py
new file mode 100644
index 0000000000..11b749914d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-config-inifiles/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlConfigInifiles(PerlPackage):
+ """A module for reading .ini-style configuration files."""
+
+ homepage = "https://metacpan.org/pod/Config::IniFiles"
+ url = "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-3.000003.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("3.000003", sha256="3c457b65d98e5ff40bdb9cf814b0d5983eb0c53fb8696bda3ba035ad2acd6802")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-io-stringy", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-config-tiny/package.py b/var/spack/repos/builtin/packages/perl-config-tiny/package.py
index 40d2d90c6d..44bb6ef7f3 100644
--- a/var/spack/repos/builtin/packages/perl-config-tiny/package.py
+++ b/var/spack/repos/builtin/packages/perl-config-tiny/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlConfigTiny(PerlPackage):
version("2.30", sha256="b2f7345619b3b8e636dd39ea010731c9dc2bfb8f022bcbd86ae6ad17866e110d")
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Config::Tiny; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-context-preserve/package.py b/var/spack/repos/builtin/packages/perl-context-preserve/package.py
new file mode 100644
index 0000000000..d7ff3d21d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-context-preserve/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlContextPreserve(PerlPackage):
+ """Run code after a subroutine call, preserving the context the subroutine
+ would have seen if it were the last statement in the caller"""
+
+ homepage = "https://metacpan.org/pod/Context::Preserve"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Context-Preserve-0.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.03", sha256="09914a4c2c7bdb99cab680c183cbf492ec98d6e23fbcc487fcc4ae10567dfd1f")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-exception", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-convert-nls-date-format/package.py b/var/spack/repos/builtin/packages/perl-convert-nls-date-format/package.py
index cc4e9095b5..d593842fe8 100644
--- a/var/spack/repos/builtin/packages/perl-convert-nls-date-format/package.py
+++ b/var/spack/repos/builtin/packages/perl-convert-nls-date-format/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -19,11 +18,3 @@ class PerlConvertNlsDateFormat(PerlPackage):
depends_on("perl@5.6.1:", type=("build", "link", "run", "test"))
depends_on("perl-module-build-tiny@0.035:", type=("build"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Convert::NLS_DATE_FORMAT; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-cookie-baker/package.py b/var/spack/repos/builtin/packages/perl-cookie-baker/package.py
new file mode 100644
index 0000000000..b7c69e8f4f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-cookie-baker/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCookieBaker(PerlPackage):
+ """Cookie string generator / parser"""
+
+ homepage = "https://metacpan.org/pod/Cookie::Baker"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/Cookie-Baker-0.12.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.12", sha256="9b04df5d47dcd45ac4299626a10ec990fb40c94ee5a6300c3a88bdfb3575ec29")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
+ depends_on("perl-test-time", type=("build", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py b/var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py
index f9fe89ff84..1aff7abd8a 100644
--- a/var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py
+++ b/var/spack/repos/builtin/packages/perl-cpan-meta-check/package.py
@@ -15,6 +15,7 @@ class PerlCpanMetaCheck(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.018", sha256="f619d2df5ea0fd91c8cf83eb54acccb5e43d9e6ec1a3f727b3d0ac15d0cf378a")
version("0.017", sha256="0454ab93f12780b1d579df15b5f939e09702e954be82028fadd40e8bc9b0f091")
version("0.014", sha256="28a0572bfc1c0678d9ce7da48cf521097ada230f96eb3d063fcbae1cfe6a351f")
diff --git a/var/spack/repos/builtin/packages/perl-cpanel-json-xs/package.py b/var/spack/repos/builtin/packages/perl-cpanel-json-xs/package.py
index 908cf1f274..c9249899d7 100644
--- a/var/spack/repos/builtin/packages/perl-cpanel-json-xs/package.py
+++ b/var/spack/repos/builtin/packages/perl-cpanel-json-xs/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlCpanelJsonXs(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("4.37", sha256="c241615a0e17ff745aaa86bbf466a6e29cd240515e65f06a7a05017b619e6d4b")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Cpanel::JSON::XS; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-css-minifier-xs/package.py b/var/spack/repos/builtin/packages/perl-css-minifier-xs/package.py
new file mode 100644
index 0000000000..c01e5b4d87
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-css-minifier-xs/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlCssMinifierXs(PerlPackage):
+ """XS based CSS minifier"""
+
+ homepage = "https://metacpan.org/pod/CSS::Minifier::XS"
+ url = "https://cpan.metacpan.org/authors/id/G/GT/GTERMARS/CSS-Minifier-XS-0.13.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.13", sha256="c419e308cdc82af1c25d6b8d07b2ff26347a622b7a63ec20856abe8db4051f82")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-diaginc@0.002:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-data-dump/package.py b/var/spack/repos/builtin/packages/perl-data-dump/package.py
new file mode 100644
index 0000000000..5597544a14
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-data-dump/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDataDump(PerlPackage):
+ """Pretty printing of data structures"""
+
+ homepage = "https://metacpan.org/pod/Data::Dump"
+ url = "https://cpan.metacpan.org/authors/id/G/GA/GARU/Data-Dump-1.25.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.25", sha256="a4aa6e0ddbf39d5ad49bddfe0f89d9da864e3bc00f627125d1bc580472f53fbd")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-data-dumper-concise/package.py b/var/spack/repos/builtin/packages/perl-data-dumper-concise/package.py
new file mode 100644
index 0000000000..1424582e27
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-data-dumper-concise/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDataDumperConcise(PerlPackage):
+ """Less indentation and newlines plus sub deparsing"""
+
+ homepage = "https://metacpan.org/pod/Data::Dumper::Concise"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Data-Dumper-Concise-2.023.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.023", sha256="a6c22f113caf31137590def1b7028a7e718eface3228272d0672c25e035d5853")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-data-optlist/package.py b/var/spack/repos/builtin/packages/perl-data-optlist/package.py
index 6d5ecb4d5a..46b533f6a7 100644
--- a/var/spack/repos/builtin/packages/perl-data-optlist/package.py
+++ b/var/spack/repos/builtin/packages/perl-data-optlist/package.py
@@ -14,6 +14,7 @@ class PerlDataOptlist(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.114", sha256="9fd1093b917a21fb79ae1607db53d113b4e0ad8fe0ae776cb077a7e50044fdf3")
version("0.113", sha256="36aebc5817b7d4686b649434c2ee41f45c8bf97d4ca5a99f607cc40f695a4285")
version("0.110", sha256="366117cb2966473f2559f2f4575ff6ae69e84c69a0f30a0773e1b51a457ef5c3")
diff --git a/var/spack/repos/builtin/packages/perl-data-predicate/package.py b/var/spack/repos/builtin/packages/perl-data-predicate/package.py
new file mode 100644
index 0000000000..bd148a9ed8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-data-predicate/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDataPredicate(PerlPackage):
+ """Predicate objects for Perl. A predicate object is an object that encapsulates conditions."""
+
+ homepage = "https://metacpan.org/pod/Data::Predicate"
+ url = "https://cpan.metacpan.org/authors/id/A/AY/AYATES/data/Data-Predicate-2.1.1.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("2.1.1", sha256="26d40a54dd3ba3409e847562ef2564a5598bfb3f81c7bd784b608d9bf2222173")
+
+ depends_on("perl-test-exception", type=("build", "test"))
+ depends_on("perl-readonly", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-data-stag/package.py b/var/spack/repos/builtin/packages/perl-data-stag/package.py
index 94d8e5e7f8..3184c82779 100644
--- a/var/spack/repos/builtin/packages/perl-data-stag/package.py
+++ b/var/spack/repos/builtin/packages/perl-data-stag/package.py
@@ -14,4 +14,6 @@ class PerlDataStag(PerlPackage):
version("0.14", sha256="4ab122508d2fb86d171a15f4006e5cf896d5facfa65219c0b243a89906258e59")
+ depends_on("c", type="build") # generated
+
depends_on("perl-io-string", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-data-uuid/package.py b/var/spack/repos/builtin/packages/perl-data-uuid/package.py
new file mode 100644
index 0000000000..b1161b51d6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-data-uuid/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDataUuid(PerlPackage):
+ """Globally/Universally Unique Identifiers (GUIDs/UUIDs)"""
+
+ homepage = "https://metacpan.org/pod/Data::UUID"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Data-UUID-1.226.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("BSD")
+
+ version("1.226", sha256="093d57ffa0d411a94bafafae495697db26f5c9d0277198fe3f7cf2be22996453")
diff --git a/var/spack/repos/builtin/packages/perl-data-visitor/package.py b/var/spack/repos/builtin/packages/perl-data-visitor/package.py
new file mode 100644
index 0000000000..8f9be9d64f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-data-visitor/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDataVisitor(PerlPackage):
+ """Visitor style traversal of Perl data structures"""
+
+ homepage = "https://metacpan.org/pod/Data::Visitor"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Data-Visitor-0.32.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.32", sha256="b194290f257cc6275a039374111554c666a1650e4c01ad799c1e0a277f47917d")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-moose@0.89:", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean@0.19:", type=("build", "run", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
+ depends_on("perl-tie-toobject@0.01:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-date-exception/package.py b/var/spack/repos/builtin/packages/perl-date-exception/package.py
new file mode 100644
index 0000000000..82d51bed84
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-date-exception/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDateException(PerlPackage):
+ """Base exception package as Moo Role for Date::* packages."""
+
+ homepage = "https://metacpan.org/pod/Date::Exception"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Date-Exception-0.08.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("0.08", sha256="329327e1071123b9b50f31e54202c1f48b866a538cb93aeab193e92eb0c847f8")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-moo@2.000000:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean@0.28:", type=("build", "run", "test"))
+ depends_on("perl-throwable@0.200011:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-date-utils/package.py b/var/spack/repos/builtin/packages/perl-date-utils/package.py
new file mode 100644
index 0000000000..3023284c55
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-date-utils/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDateUtils(PerlPackage):
+ """Common date functions as Moo Role."""
+
+ homepage = "https://metacpan.org/pod/Date::Utils"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Date-Utils-0.28.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("0.28", sha256="1ed50713512498e88a54bc7dcf70372763b63196ecf7d9a54668e535d22f03ad")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-date-exception@0.08:", type=("build", "run", "test"))
+ depends_on("perl-moo", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean@0.28:", type=("build", "run", "test"))
+ depends_on("perl-term-ansicolor-markup@0.06:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-builder/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-builder/package.py
new file mode 100644
index 0000000000..21139d10f9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-builder/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDatetimeFormatBuilder(PerlPackage):
+ """Create DateTime parser classes and objects."""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::Builder"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-0.83.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("0.83", sha256="61ffb23d85b3ca1786b2da3289e99b57e0625fe0e49db02a6dc0cb62c689e2f2")
+
+ depends_on("perl-datetime@1.00:", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-strptime@1.04:", type=("build", "run", "test"))
+ depends_on("perl-params-validate@0.72:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-iso8601/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-iso8601/package.py
new file mode 100644
index 0000000000..4094e9d7cf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-iso8601/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDatetimeFormatIso8601(PerlPackage):
+ """Parses ISO8601 formats"""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::ISO8601"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-ISO8601-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="582847f6e029065334a00564f20cd7c28f4e5cd4ec21513d0f692531ed3b56e1")
+
+ depends_on("perl-datetime@1.45:", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-builder@0.77:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-params-validationcompiler@0.26:", type=("build", "run", "test"))
+ depends_on("perl-specio@0.18:", type=("build", "run", "test"))
+ depends_on("perl-test2-suite", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-mysql/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-mysql/package.py
new file mode 100644
index 0000000000..991d05da28
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-mysql/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDatetimeFormatMysql(PerlPackage):
+ """Parse and format MySQL dates and times"""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::MySQL"
+ url = "https://cpan.metacpan.org/authors/id/X/XM/XMIKEW/DateTime-Format-MySQL-0.08.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.08", sha256="19cb70e98584655e354d2d6a8e71cc5ca902dddc3ac44416712f9163d122b9e8")
+
+ depends_on("perl-datetime", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-builder@0.6:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-oracle/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-oracle/package.py
new file mode 100644
index 0000000000..61608a8139
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-oracle/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDatetimeFormatOracle(PerlPackage):
+ """Parse and format Oracle dates and timestamps"""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::Oracle"
+ url = "https://cpan.metacpan.org/authors/id/K/KO/KOLIBRIE/DateTime-Format-Oracle-0.06.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.06", sha256="9f18d1eb3dff38e046ba063d6b54cc7d68464640ce69d7d1578a2ccd285ca8d4")
+
+ depends_on("perl-convert-nls-date-format@0.03:", type=("build", "run", "test"))
+ depends_on("perl-datetime", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-builder", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py
new file mode 100644
index 0000000000..4725928c75
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-pg/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDatetimeFormatPg(PerlPackage):
+ """Parse and format PostgreSQL dates and times"""
+
+ homepage = "https://metacpan.org/pod/DateTime::Format::Pg"
+ url = "https://cpan.metacpan.org/authors/id/D/DM/DMAKI/DateTime-Format-Pg-0.16014.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16014", sha256="38bb9666524dc384c3366f6342cb9656c50bac0f9716a3d44f1cf552ccbe0eb9")
+
+ depends_on("perl-datetime@0.10:", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-builder@0.72:", type=("build", "run", "test"))
+ depends_on("perl-datetime-timezone@0.05:", type=("build", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
diff --git a/var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py b/var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py
index 9cef02cae8..80485a3f8d 100644
--- a/var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py
+++ b/var/spack/repos/builtin/packages/perl-datetime-format-strptime/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -27,11 +26,3 @@ class PerlDatetimeFormatStrptime(PerlPackage):
depends_on("perl-test-fatal", type=("build", "test"))
depends_on("perl-test-warnings", type=("build", "test"))
depends_on("perl-try-tiny", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use DateTime::Format::Strptime; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-datetime-locale/package.py b/var/spack/repos/builtin/packages/perl-datetime-locale/package.py
index 92f6480d0f..224e173639 100644
--- a/var/spack/repos/builtin/packages/perl-datetime-locale/package.py
+++ b/var/spack/repos/builtin/packages/perl-datetime-locale/package.py
@@ -31,11 +31,3 @@ class PerlDatetimeLocale(PerlPackage):
depends_on("perl-test-file-sharedir", type=("build", "test"))
depends_on("perl-test2-plugin-nowarnings", type=("build", "test"))
depends_on("perl-test2-suite", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use DateTime::Locale; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py b/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py
index 6ff3a78233..84076555fd 100644
--- a/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py
+++ b/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py
@@ -27,11 +27,3 @@ class PerlDatetimeTimezone(PerlPackage):
depends_on("perl-test-fatal", type=("build", "test"))
depends_on("perl-test-requires", type=("build", "test"))
depends_on("perl-try-tiny", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use DateTime::TimeZone; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-datetime/package.py b/var/spack/repos/builtin/packages/perl-datetime/package.py
index 9f8dfbcc43..4ea80f0833 100644
--- a/var/spack/repos/builtin/packages/perl-datetime/package.py
+++ b/var/spack/repos/builtin/packages/perl-datetime/package.py
@@ -10,10 +10,28 @@ class PerlDatetime(PerlPackage):
"""DateTime - A date and time object for Perl"""
homepage = "https://metacpan.org/pod/DateTime"
- url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.63.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.65.tar.gz"
+
+ maintainers("EbiArnie")
license("Artistic-2.0")
- version("1.63", sha256="1b11e49ec6e184ae2a10eccd05eda9534f32458fc644c12ab710c29a3a816f6f")
+ version("1.65", sha256="0bfda7ff0253fb3d88cf4bdb5a14afb8cea24d147975d5bdf3c88b40e7ab140e")
+ version(
+ "1.63",
+ sha256="1b11e49ec6e184ae2a10eccd05eda9534f32458fc644c12ab710c29a3a816f6f",
+ deprecated=True,
+ )
- depends_on("perl-namespace-autoclean", type=("run"))
+ depends_on("perl@5.8.4:", type=("build", "link", "run", "test"))
+ depends_on("perl-cpan-meta-check@0.011:", type=("build", "test"))
+ depends_on("perl-datetime-locale@1.06:", type=("build", "run", "test"))
+ depends_on("perl-datetime-timezone@2.44:", type=("build", "run", "test"))
+ depends_on("perl-dist-checkconflicts@0.02:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean@0.19:", type=("build", "run", "test"))
+ depends_on("perl-params-validationcompiler@0.26:", type=("build", "run", "test"))
+ depends_on("perl-specio@0.18:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-warnings@0.005:", type=("build", "test"))
+ depends_on("perl-test-without-module", type=("build", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-db-file/package.py b/var/spack/repos/builtin/packages/perl-db-file/package.py
index c28ff8ad00..08725e63c3 100644
--- a/var/spack/repos/builtin/packages/perl-db-file/package.py
+++ b/var/spack/repos/builtin/packages/perl-db-file/package.py
@@ -17,9 +17,12 @@ class PerlDbFile(PerlPackage):
homepage = "https://metacpan.org/pod/DB_File"
url = "https://cpan.metacpan.org/authors/id/P/PM/PMQS/DB_File-1.840.tar.gz"
+ version("1.859", sha256="5674e0d2cd0b060c4d1253670ea022c64d842a55257f9eb8edb19c0f53e2565c")
version("1.858", sha256="ceb7a2868bd71f87b31e8b7c38d6f8cc0a31fb0322a377ee448994f094d0a7f6")
version("1.840", sha256="b7864707fad0f2d1488c748c4fa08f1fb8bcfd3da247c36909fd42f20bfab2c4")
+ depends_on("c", type="build") # generated
+
depends_on("perl-extutils-makemaker", type="build")
depends_on("berkeley-db", type="build")
diff --git a/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py b/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py
index 0cdf051ce0..9ce4fbe00c 100644
--- a/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py
+++ b/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py
@@ -15,13 +15,38 @@ class PerlDbdMysql(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version(
+ "5.005",
+ sha256="1558c203b3911e273d3f83249535b312165be2ca8edba6b6c210645d769d0541",
+ url="https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.005.tar.gz",
+ )
+ version(
+ "4.052",
+ sha256="a83f57af7817787de0ef56fb15fdfaf4f1c952c8f32ff907153b66d2da78ff5b",
+ url="https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.052.tar.gz",
+ )
+
+ version(
"4.050",
sha256="4f48541ff15a0a7405f76adc10f81627c33996fbf56c95c26c094444c0928d78",
url="https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz",
)
version("4.043", sha256="629f865e8317f52602b2f2efd2b688002903d2e4bbcba5427cb6188b043d6f99")
+ depends_on("c", type="build") # generated
+
depends_on("perl-devel-checklib", type="build", when="@4.050:")
- depends_on("perl-test-deep", type=("build", "run"))
- depends_on("perl-dbi", type=("build", "run"))
- depends_on("mysql-client")
+
+ with default_args(type=("build", "link", "run")):
+ # Does it's own version check and mariadb doesn't conform to it's
+ # strict checking. This could probably be patched in the future.
+ depends_on("mysql@4:", when="@4")
+ depends_on("mysql@8", when="@5")
+
+ with default_args(type=("build", "run")):
+ depends_on("perl-test-deep")
+ depends_on("perl-dbi")
+
+ def configure_args(self):
+ # Work around mysql_config providing incorrect linker args
+ mysql = self.spec["mysql-client"].prefix
+ return [f"--cflags=-I{mysql.include}", f"--libs=-L{mysql.lib} -lmysqlclient"]
diff --git a/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py b/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py
index 7c0cac106b..05d00d17e0 100644
--- a/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py
+++ b/var/spack/repos/builtin/packages/perl-dbd-oracle/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -17,6 +16,8 @@ class PerlDbdOracle(PerlPackage):
version("1.83", sha256="51fe9c158955fda0ca917a806863f0bc51068b533fbbc7423b3cc4ad595ed153")
+ depends_on("c", type="build") # generated
+
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
depends_on("perl-dbi@1.623:", type=("build", "run", "test"))
depends_on("perl-test-nowarnings", type=("build", "link"))
@@ -24,11 +25,3 @@ class PerlDbdOracle(PerlPackage):
def setup_build_environment(self, env):
env.set("ORACLE_HOME", self.spec["oracle-instant-client"].prefix)
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use DBD::Oracle; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-dbd-pg/package.py b/var/spack/repos/builtin/packages/perl-dbd-pg/package.py
index 7b6e708bc1..272e1fd6d5 100644
--- a/var/spack/repos/builtin/packages/perl-dbd-pg/package.py
+++ b/var/spack/repos/builtin/packages/perl-dbd-pg/package.py
@@ -15,8 +15,11 @@ class PerlDbdPg(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("3.18.0", sha256="92bbe8a363040f8ce6a3f1963f128132e245861a9b4dc5a84178b42d625a7807")
version("3.16.1", sha256="8e917a746dacb1edce5832d8911e5938cc4863aeac4a52820382e7d174e9c3b9")
version("3.10.0", sha256="e103268a63e2828e3d43659bdba5f743446cbbe047a766f843112eedae105f80")
+ depends_on("c", type="build") # generated
+
depends_on("postgresql")
depends_on("perl-dbi", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py b/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py
index 36f8bfce69..8d96305c7e 100644
--- a/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py
+++ b/var/spack/repos/builtin/packages/perl-dbd-sqlite/package.py
@@ -14,10 +14,13 @@ class PerlDbdSqlite(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.74", sha256="8994997d84b9feb4547795f78746c661fb72e3cb6a25dbdd789b731f5688a4dd")
version("1.72", sha256="5ca41e61eb52b52bd862a3088b912a75fe70910ac789b9a9983e0a449e94f551")
version("1.59_01", sha256="b6f331e4054688572c2010e72c355f7ba3f30d86051e50d9925d34d9df1001e2")
version("1.58", sha256="7120dd99d0338dea2802fda8bfe3fbf10077d5af559f6c67ae35e9270d1a1d3b")
version("1.57_01", sha256="fa7fb111fa8bfc257c3208f8980ac802a9cac4531ab98afc1988b88929672184")
version("1.56", sha256="c5f831a67a94f9bb2fb3c44051f309fc7994b2725d1896c018ad5d4cd865e991")
+ depends_on("c", type="build") # generated
+
depends_on("perl-dbi", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-dbi/package.py b/var/spack/repos/builtin/packages/perl-dbi/package.py
index 319cc53bbb..1064d147d3 100644
--- a/var/spack/repos/builtin/packages/perl-dbi/package.py
+++ b/var/spack/repos/builtin/packages/perl-dbi/package.py
@@ -12,9 +12,16 @@ class PerlDbi(PerlPackage):
database interface independent of the actual database being used."""
homepage = "https://dbi.perl.org/"
- url = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.636.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-1.645.tgz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.645", sha256="e38b7a5efee129decda12383cf894963da971ffac303f54cc1b93e40e3cf9921")
version("1.643", sha256="8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa")
version("1.636", sha256="8f7ddce97c04b4b7a000e65e5d05f679c964d62c8b02c94c1a7d815bb2dd676c")
+
+ def url_for_version(self, version):
+ if version <= Version("1.643"):
+ return f"http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-{version}.tar.gz"
+ else:
+ return f"https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-{version}.tgz"
diff --git a/var/spack/repos/builtin/packages/perl-dbix-class/package.py b/var/spack/repos/builtin/packages/perl-dbix-class/package.py
new file mode 100644
index 0000000000..7683c6d91e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-dbix-class/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDbixClass(PerlPackage):
+ """Extensible and flexible object <-> relational mapper."""
+
+ homepage = "https://metacpan.org/pod/DBIx::Class"
+ url = "https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.082843.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.082843", sha256="341e0b6ecb29d8c49174a6c09d7c6dbf38729ba4015ee7fd70360a4ffee1f251")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-class-accessor-grouped@0.10012:", type=("build", "run", "test"))
+ depends_on("perl-class-c3-componentised@1.0009:", type=("build", "run", "test"))
+ depends_on("perl-class-inspector@1.24:", type=("build", "run", "test"))
+ depends_on("perl-config-any@0.20:", type=("build", "run", "test"))
+ depends_on("perl-context-preserve@0.01:", type=("build", "run", "test"))
+ depends_on("perl-data-dumper-concise@2.020:", type=("build", "run", "test"))
+ depends_on("perl-dbd-sqlite@1.29:", type=("build", "link"))
+ depends_on("perl-dbi@1.57:", type=("build", "run", "test"))
+ depends_on("perl-devel-globaldestruction@0.09:", type=("build", "run", "test"))
+ depends_on("perl-hash-merge@0.12:", type=("build", "run", "test"))
+ depends_on("perl-module-find@0.07:", type=("build", "run", "test"))
+ depends_on("perl-moo@2.000:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.12:", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean@0.24:", type=("build", "run", "test"))
+ depends_on("perl-package-stash@0.28:", type=("build", "link"))
+ depends_on("perl-path-class@0.18:", type=("build", "run", "test"))
+ depends_on("perl-scope-guard@0.03:", type=("build", "run", "test"))
+ depends_on("perl-sql-abstract-classic@1.91:", type=("build", "run", "test"))
+ depends_on("perl-sub-name@0.04:", type=("build", "run", "test"))
+ depends_on("perl-test-deep@0.101:", type=("build", "link"))
+ depends_on("perl-test-exception@0.31:", type=("build", "link"))
+ depends_on("perl-test-warn@0.21:", type=("build", "link"))
+ depends_on("perl-try-tiny@0.07:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-devel-cover/package.py b/var/spack/repos/builtin/packages/perl-devel-cover/package.py
index 0734d38345..dd5704ffd3 100644
--- a/var/spack/repos/builtin/packages/perl-devel-cover/package.py
+++ b/var/spack/repos/builtin/packages/perl-devel-cover/package.py
@@ -14,4 +14,5 @@ class PerlDevelCover(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.42", sha256="cb9c45dee359f3d259856450389df270e2ecea1b49f5f8800fdb972ff50bbebb")
version("1.40", sha256="26e2f431fbcf7bff3851f352f83b84067c09ff206f40ab975cad8d2bafe711a8")
diff --git a/var/spack/repos/builtin/packages/perl-devel-stacktrace-ashtml/package.py b/var/spack/repos/builtin/packages/perl-devel-stacktrace-ashtml/package.py
new file mode 100644
index 0000000000..2415292140
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-devel-stacktrace-ashtml/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDevelStacktraceAshtml(PerlPackage):
+ """Displays stack trace in HTML"""
+
+ homepage = "https://metacpan.org/pod/Devel::StackTrace::AsHTML"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Devel-StackTrace-AsHTML-0.15.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.15", sha256="6283dbe2197e2f20009cc4b449997742169cdd951bfc44cbc6e62c2a962d3147")
+
+ depends_on("perl-devel-stacktrace", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py b/var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py
index 4b7c3184bc..11d7a409dd 100644
--- a/var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py
+++ b/var/spack/repos/builtin/packages/perl-devel-stacktrace/package.py
@@ -14,5 +14,6 @@ class PerlDevelStacktrace(PerlPackage):
license("Artistic-2.0")
+ version("2.05", sha256="63cb6196e986a7e578c4d28b3c780e7194835bfc78b68eeb8f00599d4444888c")
version("2.04", sha256="cd3c03ed547d3d42c61fa5814c98296139392e7971c092e09a431f2c9f5d6855")
version("2.02", sha256="cbbd96db0ecf194ed140198090eaea0e327d9a378a4aa15f9a34b3138a91931f")
diff --git a/var/spack/repos/builtin/packages/perl-digest-jhash/package.py b/var/spack/repos/builtin/packages/perl-digest-jhash/package.py
new file mode 100644
index 0000000000..81521c28eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-digest-jhash/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDigestJhash(PerlPackage):
+ """Perl extension for 32 bit Jenkins Hashing Algorithm"""
+
+ homepage = "https://metacpan.org/pod/Digest::JHash"
+ url = "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Digest-JHash-0.10.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("0.10", sha256="c746cf0a861a004090263cd54d7728d0c7595a0cf90cbbfd8409b396ee3b0063")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-digest-sha1/package.py b/var/spack/repos/builtin/packages/perl-digest-sha1/package.py
new file mode 100644
index 0000000000..970d9f06e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-digest-sha1/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlDigestSha1(PerlPackage):
+ """Perl interface to the SHA-1 algorithm"""
+
+ homepage = "https://metacpan.org/pod/Digest::SHA1"
+ url = "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Digest-SHA1-2.13.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.13", sha256="68c1dac2187421f0eb7abf71452a06f190181b8fc4b28ededf5b90296fb943cc")
+
+ depends_on("perl@5.4.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-abstract/package.py b/var/spack/repos/builtin/packages/perl-email-abstract/package.py
new file mode 100644
index 0000000000..a368a75488
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-abstract/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailAbstract(PerlPackage):
+ """Unified interface to mail representations"""
+
+ homepage = "https://metacpan.org/pod/Email::Abstract"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Abstract-3.010.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("3.010", sha256="8c12f68b5974cafc99d74942abefc8597193035aafd2763128e6aaafca4b7ed6")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-email-simple@1.998:", type=("build", "run", "test"))
+ depends_on("perl-module-pluggable@1.5:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-address-xs/package.py b/var/spack/repos/builtin/packages/perl-email-address-xs/package.py
new file mode 100644
index 0000000000..2847f52b52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-address-xs/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailAddressXs(PerlPackage):
+ """Parse and format RFC 5322 email addresses and groups"""
+
+ homepage = "https://metacpan.org/pod/Email::Address::XS"
+ url = "https://cpan.metacpan.org/authors/id/P/PA/PALI/Email-Address-XS-1.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.05", sha256="1510b7f10d67201037cd50d22c9d6b26eeca55ededa4cdb46bbca27e59a4ea16")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-date-format/package.py b/var/spack/repos/builtin/packages/perl-email-date-format/package.py
index 45bbc6ee4b..ea24585caf 100644
--- a/var/spack/repos/builtin/packages/perl-email-date-format/package.py
+++ b/var/spack/repos/builtin/packages/perl-email-date-format/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlEmailDateFormat(PerlPackage):
version("1.008", sha256="432b7c83ff88749af128003f5257c573aec1a463418db90ed22843cbbc258b4f")
depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Email::Date::Format; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-email-messageid/package.py b/var/spack/repos/builtin/packages/perl-email-messageid/package.py
new file mode 100644
index 0000000000..bc99b4c985
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-messageid/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailMessageid(PerlPackage):
+ """Generate world unique message-ids."""
+
+ homepage = "https://metacpan.org/pod/Email::MessageID"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-MessageID-1.408.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.408", sha256="1f3d5b4ff0b1c7b39e9ac7c318fb37adcd0bac9556036546494d14f06dc5643c")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-mime-contenttype/package.py b/var/spack/repos/builtin/packages/perl-email-mime-contenttype/package.py
new file mode 100644
index 0000000000..bb93ac9f3d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-mime-contenttype/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailMimeContenttype(PerlPackage):
+ """Parse and build a MIME Content-Type or Content-Disposition Header"""
+
+ homepage = "https://metacpan.org/pod/Email::MIME::ContentType"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-MIME-ContentType-1.028.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.028", sha256="e7950246433f7ed6c3e4fd4df2227e0f2341137c3cab1989018fc370f58145c4")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-text-unidecode", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-mime-encodings/package.py b/var/spack/repos/builtin/packages/perl-email-mime-encodings/package.py
new file mode 100644
index 0000000000..4f732f1c3a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-mime-encodings/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailMimeEncodings(PerlPackage):
+ """A unified interface to MIME encoding and decoding"""
+
+ homepage = "https://metacpan.org/pod/Email::MIME::Encodings"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-MIME-Encodings-1.317.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.317", sha256="4a9a41671a9d1504c4da241be419a9503fa3486262526edb81eca9e2ebea0baf")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-mime/package.py b/var/spack/repos/builtin/packages/perl-email-mime/package.py
new file mode 100644
index 0000000000..76a22c0b4e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-mime/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailMime(PerlPackage):
+ """Easy MIME message handling"""
+
+ homepage = "https://metacpan.org/pod/Email::MIME"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-MIME-1.953.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.953", sha256="98fb067850699a224babc348f1cefe30d744c60da8902e7a5ce9d8b7e73df735")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-email-address-xs", type=("build", "run", "test"))
+ depends_on("perl-email-messageid", type=("build", "run", "test"))
+ depends_on("perl-email-mime-contenttype@1.023:", type=("build", "run", "test"))
+ depends_on("perl-email-mime-encodings@1.314:", type=("build", "run", "test"))
+ depends_on("perl-email-simple@2.212:", type=("build", "run", "test"))
+ depends_on("perl-mime-types@1.13:", type=("build", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-sender/package.py b/var/spack/repos/builtin/packages/perl-email-sender/package.py
new file mode 100644
index 0000000000..1027cc9c08
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-sender/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailSender(PerlPackage):
+ """A library for sending email"""
+
+ homepage = "https://metacpan.org/pod/Email::Sender"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Sender-2.600.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.600", sha256="ecc675d030d79d9a4fb064567ea885c66b17c3862379ad30f8205a281cd8ee29")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-capture-tiny@0.08:", type=("build", "test"))
+ depends_on("perl-email-abstract@3.006:", type=("build", "run", "test"))
+ depends_on("perl-email-address-xs", type=("build", "run", "test"))
+ depends_on("perl-email-simple@1.998:", type=("build", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-moo@2.000000:", type=("build", "run", "test"))
+ depends_on("perl-moox-types-mooselike@0.15:", type=("build", "run", "test"))
+ depends_on("perl-sub-exporter", type=("build", "run", "test"))
+ depends_on("perl-throwable", type=("build", "run", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-simple/package.py b/var/spack/repos/builtin/packages/perl-email-simple/package.py
new file mode 100644
index 0000000000..7bf3dffea8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-simple/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailSimple(PerlPackage):
+ """Simple parsing of RFC2822 message format and headers"""
+
+ homepage = "https://metacpan.org/pod/Email::Simple"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Simple-2.218.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("2.218", sha256="2dce1d68fde99d53db9ca43e211b69b169ba2efaecf87a55cb33a9336047c96d")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-email-date-format", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-email-stuffer/package.py b/var/spack/repos/builtin/packages/perl-email-stuffer/package.py
new file mode 100644
index 0000000000..434bee2bb8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-email-stuffer/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlEmailStuffer(PerlPackage):
+ """A more casual approach to creating and sending Email:: emails"""
+
+ homepage = "https://metacpan.org/pod/Email::Stuffer"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Stuffer-0.020.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.020", sha256="0a1efb7f2dedd39052b126f718ca2d3b5845a4123a39392fd9dfa0c76e6057c7")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-email-mime@1.943:", type=("build", "run", "test"))
+ depends_on("perl-email-sender", type=("build", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-moo", type=("build", "test"))
+ depends_on("perl-params-util@1.05:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-exporter-auto/package.py b/var/spack/repos/builtin/packages/perl-exporter-auto/package.py
new file mode 100644
index 0000000000..d191aa5bbb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-exporter-auto/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlExporterAuto(PerlPackage):
+ """Export all public functions from your package"""
+
+ homepage = "https://metacpan.org/pod/Exporter::Auto"
+ url = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Exporter-Auto-0.04.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.04", sha256="6009710ee628ca7d7c3bfa6721190ded4a7a5db2cdda789cd05731edc40edcd7")
+
+ depends_on("perl@5.8.5:", type=("build", "link", "run", "test"))
+ depends_on("perl-b-hooks-endofscope", type=("build", "run", "test"))
+ depends_on("perl-sub-identify", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-extutils-config/package.py b/var/spack/repos/builtin/packages/perl-extutils-config/package.py
index 6f8ec7c689..9143a9485c 100644
--- a/var/spack/repos/builtin/packages/perl-extutils-config/package.py
+++ b/var/spack/repos/builtin/packages/perl-extutils-config/package.py
@@ -14,4 +14,6 @@ class PerlExtutilsConfig(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.010", sha256="82e7e4e90cbe380e152f5de6e3e403746982d502dd30197a123652e46610c66d")
+ version("0.009", sha256="4ef84e73aad50a3be332885d2a3b12f3cab1b1e0bad24e88297a123b4f39f3ce")
version("0.008", sha256="ae5104f634650dce8a79b7ed13fb59d67a39c213a6776cfdaa3ee749e62f1a8c")
diff --git a/var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py b/var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py
index cb583055ee..747ff747fa 100644
--- a/var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py
+++ b/var/spack/repos/builtin/packages/perl-extutils-installpaths/package.py
@@ -14,6 +14,7 @@ class PerlExtutilsInstallpaths(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.013", sha256="65969d3ad8a3a2ea8ef5b4213ed5c2c83961bb5bd12f7ad35128f6bd5b684aa0")
version("0.012", sha256="84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed")
depends_on("perl-extutils-config", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-file-changenotify/package.py b/var/spack/repos/builtin/packages/perl-file-changenotify/package.py
new file mode 100644
index 0000000000..a237ef8b4a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-file-changenotify/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlFileChangenotify(PerlPackage):
+ """Watch for changes to files, cross-platform style"""
+
+ homepage = "https://metacpan.org/pod/File::ChangeNotify"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/File-ChangeNotify-0.31.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("0.31", sha256="192bdb1ce76266c6a694a8e962d039e3adeeb829b6ac1e23f5057f2b506392bd")
+
+ depends_on("perl-module-pluggable", type=("build", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-moo@1.006:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-test-without-module", type=("build", "test"))
+ depends_on("perl-test2-suite", type=("build", "test"))
+ depends_on("perl-type-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-file-listing/package.py b/var/spack/repos/builtin/packages/perl-file-listing/package.py
index ff5f316dba..6ac982ae13 100644
--- a/var/spack/repos/builtin/packages/perl-file-listing/package.py
+++ b/var/spack/repos/builtin/packages/perl-file-listing/package.py
@@ -10,10 +10,21 @@ class PerlFileListing(PerlPackage):
"""Parse directory listing"""
homepage = "https://metacpan.org/pod/File::Listing"
- url = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/File-Listing-6.04.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.16", sha256="189b3a13fc0a1ba412b9d9ec5901e9e5e444cc746b9f0156d4399370d33655c6")
version("6.04", sha256="1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5")
depends_on("perl-http-date", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.05:"):
+ return (
+ f"https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-{version}.tar.gz"
+ )
+ else:
+ return (
+ f"http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/File-Listing-{version}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-file-sharedir/package.py b/var/spack/repos/builtin/packages/perl-file-sharedir/package.py
index 27199ac509..110e3d86fa 100644
--- a/var/spack/repos/builtin/packages/perl-file-sharedir/package.py
+++ b/var/spack/repos/builtin/packages/perl-file-sharedir/package.py
@@ -20,11 +20,3 @@ class PerlFileSharedir(PerlPackage):
depends_on("perl-class-inspector@1.12:", type=("build", "run", "test"))
depends_on("perl-file-sharedir-install@0.13:", type=("build", "link"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use File::ShareDir; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-filesys-notify-simple/package.py b/var/spack/repos/builtin/packages/perl-filesys-notify-simple/package.py
new file mode 100644
index 0000000000..d2c7e99a37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-filesys-notify-simple/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlFilesysNotifySimple(PerlPackage):
+ """Simple and dumb file system watcher"""
+
+ homepage = "https://metacpan.org/pod/Filesys::Notify::Simple"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Filesys-Notify-Simple-0.14.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.14", sha256="1fda712d4ba5e1868159ed35f6f8efbfae9d435d6376f5606d533bcb080555a4")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-sharedfork", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-fth/package.py b/var/spack/repos/builtin/packages/perl-fth/package.py
index 865e5693b5..1fd728ec2a 100644
--- a/var/spack/repos/builtin/packages/perl-fth/package.py
+++ b/var/spack/repos/builtin/packages/perl-fth/package.py
@@ -23,10 +23,11 @@ class PerlFth(Package):
"""
homepage = "https://sourceforge.net/projects/ftagshtml/"
- url = "https://downloads.sourceforge.net/project/ftagshtml/ftagshtml-0.524.tgz"
+ url = "https://downloads.sourceforge.net/project/ftagshtml/ftagshtml-0.529.tgz"
maintainers("cessenat")
+ version("0.529", sha256="3cc2030372cf88dad257bd0cfbe662873a454d55035c54a76090e0da860074c4")
version("0.527", sha256="df98e9e2f4dbef863b09a22ed92681dff028a6f345ba530bc3afd8221efe633c")
version("0.526", sha256="ada1c7306111d59d64572fe8a9b038026fd0daebaff630924997ef2dc22d87a8")
version("0.525", sha256="378116febeb20f4b0c1e298de90305e8494335949d853c7e390d1b6386c1326a")
@@ -39,6 +40,9 @@ class PerlFth(Package):
version("0.518", sha256="7aed7c831270bb1935d4ccd090ef1360ec9446dd773c10350645985047f8879b")
version("0.517", sha256="e24488a7edbfa764060f007693329d5ee3154e1ce49a627ec109c41a9d7abcbe")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"hevea", default=False, description="Use hevea when inputting LaTeX files (fth.pl -hevea)"
)
diff --git a/var/spack/repos/builtin/packages/perl-gd/package.py b/var/spack/repos/builtin/packages/perl-gd/package.py
index be7651d7ae..0bb317073f 100644
--- a/var/spack/repos/builtin/packages/perl-gd/package.py
+++ b/var/spack/repos/builtin/packages/perl-gd/package.py
@@ -14,6 +14,7 @@ class PerlGd(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.81", sha256="21df5d9c5ced9971f661a69d1c80312bc59d27afdba17a242ac2e8c870b635d5")
version("2.77", sha256="b56c88b8ef3be016ce29bb62dd1f1b6f6b5fbcaa57fea59e9468af6901016fb5")
version("2.53", sha256="d05d01fe95e581adb3468cf05ab5d405db7497c0fb3ec7ecf23d023705fab7aa")
diff --git a/var/spack/repos/builtin/packages/perl-getopt-long-descriptive/package.py b/var/spack/repos/builtin/packages/perl-getopt-long-descriptive/package.py
new file mode 100644
index 0000000000..ac7476e426
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-getopt-long-descriptive/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlGetoptLongDescriptive(PerlPackage):
+ """Getopt::Long, but simpler and more powerful"""
+
+ homepage = "https://metacpan.org/pod/Getopt::Long::Descriptive"
+ url = "https://cpan.metacpan.org/authors/id/H/HD/HDP/Getopt-Long-Descriptive-0.088.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.088", sha256="5008d3694280087e03280208637916ba968013c54bee863a3c3e1185368f9e65")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-params-validate@0.97:", type=("build", "run", "test"))
+ depends_on("perl-sub-exporter@0.972:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-graph/package.py b/var/spack/repos/builtin/packages/perl-graph/package.py
index 67d26e8f8e..63d7568ae8 100644
--- a/var/spack/repos/builtin/packages/perl-graph/package.py
+++ b/var/spack/repos/builtin/packages/perl-graph/package.py
@@ -14,7 +14,11 @@ class PerlGraph(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version(
+ "0.9704",
+ sha256="325e8eb07be2d09a909e450c13d3a42dcb2a2e96cc3ac780fe4572a0d80b2a25",
+ preferred=True,
+ )
version("0.20105", sha256="d72d6512e5a637a64b879a7b74cf3822278b4917e1a0317d340523a6a3936b67")
- version("0.9704", sha256="325e8eb07be2d09a909e450c13d3a42dcb2a2e96cc3ac780fe4572a0d80b2a25")
depends_on("perl@5.6.0:")
diff --git a/var/spack/repos/builtin/packages/perl-graphviz/package.py b/var/spack/repos/builtin/packages/perl-graphviz/package.py
new file mode 100644
index 0000000000..2b882c584c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-graphviz/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlGraphviz(PerlPackage):
+ """Interface to AT&T's GraphViz. Deprecated. See GraphViz2"""
+
+ homepage = "https://metacpan.org/pod/GraphViz"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETJ/GraphViz-2.26.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.26", sha256="9a5d2520b3262bf30475272dd764a445f8e7f931bef88be0e3d3bff445da7328")
+
+ depends_on("graphviz", type=("build", "run", "test"))
+ depends_on("perl-file-which@1.09:", type=("build", "run", "test"))
+ depends_on("perl-ipc-run@0.6:", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl", type=("build", "run", "test"))
+ depends_on("perl-parse-recdescent@1.965001:", type=("build", "run", "test"))
+ depends_on("perl-xml-twig@3.52:", type=("build", "run", "test"))
+ depends_on("perl-xml-xpath@1.13:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-gzip-faster/package.py b/var/spack/repos/builtin/packages/perl-gzip-faster/package.py
new file mode 100644
index 0000000000..bf0a140804
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-gzip-faster/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlGzipFaster(PerlPackage):
+ """Simple and fast gzip and gunzip"""
+
+ homepage = "https://metacpan.org/pod/Gzip::Faster"
+ url = "https://cpan.metacpan.org/authors/id/B/BK/BKB/Gzip-Faster-0.21.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.21", sha256="c65f41ca108e7e53ec34c30dbb1b5d614bf4b8100673646cf301d0caf82c7aa5")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-hash-moreutils/package.py b/var/spack/repos/builtin/packages/perl-hash-moreutils/package.py
new file mode 100644
index 0000000000..005534254e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-hash-moreutils/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHashMoreutils(PerlPackage):
+ """Provide the stuff missing in Hash::Util"""
+
+ homepage = "https://metacpan.org/pod/Hash::MoreUtils"
+ url = "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Hash-MoreUtils-0.06.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.06", sha256="db9a8fb867d50753c380889a5e54075651b5e08c9b3b721cb7220c0883547de8")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-hash-multivalue/package.py b/var/spack/repos/builtin/packages/perl-hash-multivalue/package.py
new file mode 100644
index 0000000000..e9ed0868c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-hash-multivalue/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHashMultivalue(PerlPackage):
+ """Store multiple values per key"""
+
+ homepage = "https://metacpan.org/pod/Hash::MultiValue"
+ url = "https://cpan.metacpan.org/authors/id/A/AR/ARISTOTLE/Hash-MultiValue-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="66181df7aa68e2786faf6895c88b18b95c800a8e4e6fb4c07fd176410a3c73f4")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-heap/package.py b/var/spack/repos/builtin/packages/perl-heap/package.py
index 57264878e1..f5dbd8c87b 100644
--- a/var/spack/repos/builtin/packages/perl-heap/package.py
+++ b/var/spack/repos/builtin/packages/perl-heap/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlHeap(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("0.80", sha256="ccda29f3c93176ad0fdfff4dd6f5e4ac90b370cba4b028386b7343bf64139bde")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Heap; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-hook-lexwrap/package.py b/var/spack/repos/builtin/packages/perl-hook-lexwrap/package.py
new file mode 100644
index 0000000000..530f8b8b23
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-hook-lexwrap/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHookLexwrap(PerlPackage):
+ """Lexically scoped subroutine wrappers"""
+
+ homepage = "https://metacpan.org/pod/Hook::LexWrap"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Hook-LexWrap-0.26.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.26", sha256="b60bdc5f98f94f9294b06adef82b1d996da192d5f183f9f434b610fd1137ec2d")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-html-parser/package.py b/var/spack/repos/builtin/packages/perl-html-parser/package.py
index 6f1cbfc160..09b9139501 100644
--- a/var/spack/repos/builtin/packages/perl-html-parser/package.py
+++ b/var/spack/repos/builtin/packages/perl-html-parser/package.py
@@ -16,4 +16,6 @@ class PerlHtmlParser(PerlPackage):
version("3.72", sha256="ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b")
+ depends_on("c", type="build") # generated
+
depends_on("perl-html-tagset", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-html-tagset/package.py b/var/spack/repos/builtin/packages/perl-html-tagset/package.py
index c9061bc57e..38dbf56dcb 100644
--- a/var/spack/repos/builtin/packages/perl-html-tagset/package.py
+++ b/var/spack/repos/builtin/packages/perl-html-tagset/package.py
@@ -14,4 +14,5 @@ class PerlHtmlTagset(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("3.24", sha256="eb89e145a608ed1f8f141a57472ee5f69e67592a432dcd2e8b1dbb445f2b230b")
version("3.20", sha256="adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2")
diff --git a/var/spack/repos/builtin/packages/perl-html-template/package.py b/var/spack/repos/builtin/packages/perl-html-template/package.py
new file mode 100644
index 0000000000..8485db8eb0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-html-template/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHtmlTemplate(PerlPackage):
+ """Perl module to use HTML-like templating language"""
+
+ homepage = "https://metacpan.org/pod/HTML::Template"
+ url = "https://cpan.metacpan.org/authors/id/S/SA/SAMTREGAR/HTML-Template-2.97.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.97", sha256="6547af61f3aa85793f8616190938d677d7995fb3b720c16258040bc935e2129f")
+
+ depends_on("perl-cgi", type=("build", "run", "test"))
+ depends_on("perl-test-pod", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-http-body/package.py b/var/spack/repos/builtin/packages/perl-http-body/package.py
new file mode 100644
index 0000000000..77ba68b8f8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-body/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpBody(PerlPackage):
+ """HTTP Body Parser"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Body"
+ url = "https://cpan.metacpan.org/authors/id/G/GE/GETTY/HTTP-Body-1.22.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.22", sha256="fc0d2c585b3bd1532d92609965d589e0c87cd380e7cca42fb9ad0a1311227297")
+
+ depends_on("perl-http-message", type=("build", "link", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-http-cookiejar/package.py b/var/spack/repos/builtin/packages/perl-http-cookiejar/package.py
index 8195c5b3e8..627dc00fea 100644
--- a/var/spack/repos/builtin/packages/perl-http-cookiejar/package.py
+++ b/var/spack/repos/builtin/packages/perl-http-cookiejar/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -24,11 +23,3 @@ class PerlHttpCookiejar(PerlPackage):
depends_on("perl-test-deep", type=("test"))
depends_on("perl-test-requires", type=("test"))
depends_on("perl-uri", type=("test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use HTTP::CookieJar; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-http-cookies/package.py b/var/spack/repos/builtin/packages/perl-http-cookies/package.py
index 86e2eedf50..bef18fd969 100644
--- a/var/spack/repos/builtin/packages/perl-http-cookies/package.py
+++ b/var/spack/repos/builtin/packages/perl-http-cookies/package.py
@@ -14,6 +14,7 @@ class PerlHttpCookies(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.11", sha256="8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8")
version("6.10", sha256="e36f36633c5ce6b5e4b876ffcf74787cc5efe0736dd7f487bdd73c14f0bd7007")
version("6.04", sha256="0cc7f079079dcad8293fea36875ef58dd1bfd75ce1a6c244cd73ed9523eb13d4")
diff --git a/var/spack/repos/builtin/packages/perl-http-daemon/package.py b/var/spack/repos/builtin/packages/perl-http-daemon/package.py
index 4f078746af..4c4bb39589 100644
--- a/var/spack/repos/builtin/packages/perl-http-daemon/package.py
+++ b/var/spack/repos/builtin/packages/perl-http-daemon/package.py
@@ -10,13 +10,24 @@ class PerlHttpDaemon(PerlPackage):
"""A simple http server class"""
homepage = "https://metacpan.org/pod/HTTP::Daemon"
- url = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTTP-Daemon-6.01.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.16.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.16", sha256="b38d092725e6fa4e0c4dc2a47e157070491bafa0dbe16c78a358e806aa7e173d")
version("6.01", sha256="43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2")
depends_on("perl-lwp-mediatypes", type=("build", "run"))
depends_on("perl-http-message", type=("build", "run"))
depends_on("perl-http-date", type=("build", "run"))
depends_on("perl-module-build-tiny", type="build")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.02:"):
+ return (
+ f"https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-{version}.tar.gz"
+ )
+ elif self.spec.satisfies("@6.05"):
+ return f"https://cpan.metacpan.org/authors/id/E/ET/ETHER/HTTP-Daemon-{version}.tar.gz"
+ else:
+ return f"http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTTP-Daemon-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-http-date/package.py b/var/spack/repos/builtin/packages/perl-http-date/package.py
index b524951a51..4bc6d30456 100644
--- a/var/spack/repos/builtin/packages/perl-http-date/package.py
+++ b/var/spack/repos/builtin/packages/perl-http-date/package.py
@@ -10,8 +10,15 @@ class PerlHttpDate(PerlPackage):
"""Date conversion routines"""
homepage = "https://metacpan.org/pod/HTTP::Date"
- url = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTTP-Date-6.02.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.06", sha256="7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52")
version("6.02", sha256="e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.03:"):
+ return f"https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-{version}.tar.gz"
+ else:
+ return f"http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTTP-Date-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-http-entity-parser/package.py b/var/spack/repos/builtin/packages/perl-http-entity-parser/package.py
new file mode 100644
index 0000000000..9cd61aef73
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-entity-parser/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpEntityParser(PerlPackage):
+ """PSGI compliant HTTP Entity Parser"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Entity::Parser"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/HTTP-Entity-Parser-0.25.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.25", sha256="3a8cd0d8cba3d17cd8c04ee82d7341dfaa247dbdd94a49eb94b53f69e483ec3a")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-hash-multivalue", type=("build", "run", "test"))
+ depends_on("perl-http-message@6:", type=("build", "test"))
+ depends_on("perl-http-multipartparser", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs@1.003007:", type=("build", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
+ depends_on("perl-stream-buffered", type=("build", "run", "test"))
+ depends_on("perl-www-form-urlencoded@0.23:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-http-headers-fast/package.py b/var/spack/repos/builtin/packages/perl-http-headers-fast/package.py
new file mode 100644
index 0000000000..841e287351
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-headers-fast/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpHeadersFast(PerlPackage):
+ """Faster implementation of HTTP::Headers"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Headers::Fast"
+ url = "https://cpan.metacpan.org/authors/id/T/TO/TOKUHIROM/HTTP-Headers-Fast-0.22.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.22", sha256="cc431db68496dd884db4bc0c0b7112c1f4a4f1dc68c4f5a3caa757a1e7481b48")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-http-date", type=("build", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
+ depends_on("perl-test-requires", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-http-message/package.py b/var/spack/repos/builtin/packages/perl-http-message/package.py
index 202080cd03..e548cd55ea 100644
--- a/var/spack/repos/builtin/packages/perl-http-message/package.py
+++ b/var/spack/repos/builtin/packages/perl-http-message/package.py
@@ -14,6 +14,7 @@ class PerlHttpMessage(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.45", sha256="01cb8406612a3f738842d1e97313ae4d874870d1b8d6d66331f16000943d4cbe")
version("6.44", sha256="398b647bf45aa972f432ec0111f6617742ba32fc773c6612d21f64ab4eacbca1")
version("6.13", sha256="f25f38428de851e5661e72f124476494852eb30812358b07f1c3a289f6f5eded")
diff --git a/var/spack/repos/builtin/packages/perl-http-multipartparser/package.py b/var/spack/repos/builtin/packages/perl-http-multipartparser/package.py
new file mode 100644
index 0000000000..936b2b3bf7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-multipartparser/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpMultipartparser(PerlPackage):
+ """HTTP MultiPart Parser"""
+
+ homepage = "https://metacpan.org/pod/HTTP::MultiPartParser"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHANSEN/HTTP-MultiPartParser-0.02.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.02", sha256="5eddda159f54d16f868e032440ac2b024e55aac48931871b62627f1a16d00b12")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py
new file mode 100644
index 0000000000..9bae76faa4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpParserXs(PerlPackage):
+ """A fast, primitive HTTP request parser"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Parser::XS"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZUHO/HTTP-Parser-XS-0.17.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.17", sha256="794e6833e326b10d24369f9cdbfc1667105ef6591e8f41e561a3d41a7027a809")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-http-request-ascgi/package.py b/var/spack/repos/builtin/packages/perl-http-request-ascgi/package.py
new file mode 100644
index 0000000000..34d12125f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-request-ascgi/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpRequestAscgi(PerlPackage):
+ """Set up a CGI environment from an HTTP::Request"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Request::AsCGI"
+ url = "https://cpan.metacpan.org/authors/id/F/FL/FLORA/HTTP-Request-AsCGI-1.2.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.2", sha256="945bfb07c6d1af52773fb7845ba62e3a74111b35cbd2d5e43ef8319e55acbcea")
+
+ depends_on("perl-class-accessor", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "run", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-http-server-simple/package.py b/var/spack/repos/builtin/packages/perl-http-server-simple/package.py
new file mode 100644
index 0000000000..9678e5152a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-server-simple/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpServerSimple(PerlPackage):
+ """Lightweight HTTP server"""
+
+ homepage = "https://metacpan.org/pod/HTTP::Server::Simple"
+ url = "https://cpan.metacpan.org/authors/id/B/BP/BPS/HTTP-Server-Simple-0.52.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.52", sha256="d8939fa4f12bd6b8c043537fd0bf96b055ac3686b9cdd9fa773dca6ae679cb4c")
+
+ depends_on("perl-cgi", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-http-tiny/package.py b/var/spack/repos/builtin/packages/perl-http-tiny/package.py
new file mode 100644
index 0000000000..1a32502529
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-http-tiny/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlHttpTiny(PerlPackage):
+ """HTTP::Tiny: A small, simple, correct HTTP/1.1 client perl module"""
+
+ homepage = "https://github.com/Perl-Toolchain-Gang/HTTP-Tiny"
+ url = "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/HTTP-Tiny-0.088.tar.gz"
+
+ maintainers("teaguesterling")
+
+ # Stated: same as perl5
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later", checked_by="teaguesterling")
+
+ version("0.088", sha256="7ce6367e861883b6868d6dd86168af33524717d8cc94100c2abf9bd86a82b4d8")
+ version("0.086", sha256="c616e0ff9ec808a7a92f47edb7d017fc45ef0c2cddd21a9bab194096cb6b7b32")
+
+ with default_args(type=("build", "run")):
+ depends_on("perl-carp")
diff --git a/var/spack/repos/builtin/packages/perl-import-into/package.py b/var/spack/repos/builtin/packages/perl-import-into/package.py
new file mode 100644
index 0000000000..b510563b6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-import-into/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlImportInto(PerlPackage):
+ """Import packages into other packages"""
+
+ homepage = "https://metacpan.org/pod/Import::Into"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Import-Into-1.002005.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.002005", sha256="bd9e77a3fb662b40b43b18d3280cd352edf9fad8d94283e518181cc1ce9f0567")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py b/var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py
index 7463880ad4..9035a38fa9 100644
--- a/var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py
+++ b/var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from spack.package import *
@@ -16,13 +14,15 @@ class PerlIoSocketSsl(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.089", sha256="f683112c1642967e9149f51ad553eccd017833b2f22eb23a9055609d2e3a14d1")
+ version("2.085", sha256="95b2f7c0628a7e246a159665fbf0620d0d7835e3a940f22d3fdd47c3aa799c2e")
version("2.052", sha256="e4897a9b17cb18a3c44aa683980d52cef534cdfcb8063d6877c879bfa2f26673")
depends_on("perl-net-ssleay", type=("build", "run"))
def configure(self, spec, prefix):
self.build_method = "Makefile.PL"
- self.build_executable = inspect.getmodule(self).make
+ self.build_executable = make
# Should I do external tests?
config_answers = ["n\n"]
config_answers_filename = "spack-config.in"
@@ -31,4 +31,4 @@ class PerlIoSocketSsl(PerlPackage):
f.writelines(config_answers)
with open(config_answers_filename, "r") as f:
- inspect.getmodule(self).perl("Makefile.PL", "INSTALL_BASE={0}".format(prefix), input=f)
+ perl("Makefile.PL", f"INSTALL_BASE={prefix}", input=f)
diff --git a/var/spack/repos/builtin/packages/perl-io-stringy/package.py b/var/spack/repos/builtin/packages/perl-io-stringy/package.py
index 4db1550b32..e8d1c1f7ca 100644
--- a/var/spack/repos/builtin/packages/perl-io-stringy/package.py
+++ b/var/spack/repos/builtin/packages/perl-io-stringy/package.py
@@ -21,6 +21,15 @@ class PerlIoStringy(PerlPackage):
globref, or a FileHandle."""
homepage = "https://metacpan.org/pod/IO::Stringy"
- url = "https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/IO-stringy-2.111.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/IO-Stringy-2.112.tar.gz"
+ version("2.113", sha256="51220fcaf9f66a639b69d251d7b0757bf4202f4f9debd45bdd341a6aca62fe4e")
version("2.111", sha256="8c67fd6608c3c4e74f7324f1404a856c331dbf48d9deda6aaa8296ea41bf199d")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@2.112:"):
+ return (
+ f"https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/IO-Stringy-{version}.tar.gz"
+ )
+ else:
+ return f"https://cpan.metacpan.org/authors/id/D/DS/DSKOLL/IO-stringy-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-io-tty/package.py b/var/spack/repos/builtin/packages/perl-io-tty/package.py
index 4be01b572c..af0da3ed9c 100644
--- a/var/spack/repos/builtin/packages/perl-io-tty/package.py
+++ b/var/spack/repos/builtin/packages/perl-io-tty/package.py
@@ -16,5 +16,6 @@ class PerlIoTty(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.20", sha256="b15309fc85623893289cb9b2b88dfa9ed1e69156b75f29938553a45be6d730af")
version("1.17", sha256="a5f1a83020bc5b5dd6c1b570f48c7546e0a8f7fac10a068740b03925ad9e14e8")
version("1.13_01", sha256="89798eba7c31d9c169ef2f38ff49490aa769b1d9a68033de365595cfaf9cc258")
diff --git a/var/spack/repos/builtin/packages/perl-ipc-run/package.py b/var/spack/repos/builtin/packages/perl-ipc-run/package.py
index c951d3b315..b7256ba707 100644
--- a/var/spack/repos/builtin/packages/perl-ipc-run/package.py
+++ b/var/spack/repos/builtin/packages/perl-ipc-run/package.py
@@ -18,6 +18,9 @@ class PerlIpcRun(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version(
+ "20231003.0", sha256="eb25bbdf5913d291797ef1bfe998f15130b455d3ed02aacde6856f0b25e4fe57"
+ )
+ version(
"20220807.0", sha256="277d781dbbc98af18e979c7ef36f222513d7361742c52507c3348b265f6f5e69"
)
version(
diff --git a/var/spack/repos/builtin/packages/perl-ipc-run3/package.py b/var/spack/repos/builtin/packages/perl-ipc-run3/package.py
index 12aa070ba3..ae4e4feca3 100644
--- a/var/spack/repos/builtin/packages/perl-ipc-run3/package.py
+++ b/var/spack/repos/builtin/packages/perl-ipc-run3/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -15,12 +14,5 @@ class PerlIpcRun3(PerlPackage):
maintainers("EbiArnie")
+ version("0.049", sha256="9d048ae7b9ae63871bae976ba01e081d887392d904e5d48b04e22d35ed22011a")
version("0.048", sha256="3d81c3cc1b5cff69cca9361e2c6e38df0352251ae7b41e2ff3febc850e463565")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use IPC::Run3; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py b/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py
new file mode 100644
index 0000000000..fa6d590818
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-ipc-sharelite/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlIpcSharelite(PerlPackage):
+ """Lightweight interface to shared memory"""
+
+ homepage = "https://metacpan.org/pod/IPC::ShareLite"
+ url = "https://cpan.metacpan.org/authors/id/A/AN/ANDYA/IPC-ShareLite-0.17.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.17", sha256="14d406b91da96d6521d0d1a82d22a306274765226b86b0a56e7ffddcf96ae7bf")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-ipc-system-simple/package.py b/var/spack/repos/builtin/packages/perl-ipc-system-simple/package.py
index d99977a5e1..c9d2a6e199 100644
--- a/var/spack/repos/builtin/packages/perl-ipc-system-simple/package.py
+++ b/var/spack/repos/builtin/packages/perl-ipc-system-simple/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlIpcSystemSimple(PerlPackage):
version("1.30", sha256="22e6f5222b505ee513058fdca35ab7a1eab80539b98e5ca4a923a70a8ae9ba9e")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use IPC::System::Simple; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-javascript-minifier-xs/package.py b/var/spack/repos/builtin/packages/perl-javascript-minifier-xs/package.py
new file mode 100644
index 0000000000..4e88e10c5e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-javascript-minifier-xs/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlJavascriptMinifierXs(PerlPackage):
+ """XS based JavaScript minifier"""
+
+ homepage = "https://metacpan.org/pod/JavaScript::Minifier::XS"
+ url = "https://cpan.metacpan.org/authors/id/G/GT/GTERMARS/JavaScript-Minifier-XS-0.15.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.15", sha256="5d9b034f58f0b6ff5b64647bd3c5a9ce05b2a70edee339fbc3173aee747cc050")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-diaginc@0.002:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-json-any/package.py b/var/spack/repos/builtin/packages/perl-json-any/package.py
new file mode 100644
index 0000000000..87857a95a6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-json-any/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlJsonAny(PerlPackage):
+ """(DEPRECATED) Wrapper Class for the various JSON classes"""
+
+ homepage = "https://metacpan.org/pod/JSON::Any"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/JSON-Any-1.40.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.40", sha256="083256255a48094fd9ac1239e0fea8a10a2383a9cd1ef4b1c7264ede1b4400ab")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
+ depends_on("perl-test-warnings@0.009:", type=("build", "test"))
+ depends_on("perl-test-without-module", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-json-maybexs/package.py b/var/spack/repos/builtin/packages/perl-json-maybexs/package.py
index 83449a15bb..762e128fa0 100644
--- a/var/spack/repos/builtin/packages/perl-json-maybexs/package.py
+++ b/var/spack/repos/builtin/packages/perl-json-maybexs/package.py
@@ -19,11 +19,3 @@ class PerlJsonMaybexs(PerlPackage):
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-cpanel-json-xs@2.3310:", type=("build", "run", "test"))
depends_on("perl-test-needs@0.002006:", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use JSON::MaybeXS; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-json-xs/package.py b/var/spack/repos/builtin/packages/perl-json-xs/package.py
new file mode 100644
index 0000000000..083d58cb65
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-json-xs/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlJsonXs(PerlPackage):
+ """JSON serialising/deserialising, done correctly and fast"""
+
+ homepage = "https://metacpan.org/pod/JSON::XS"
+ url = "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/JSON-XS-4.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("4.03", sha256="515536f45f2fa1a7e88c8824533758d0121d267ab9cb453a1b5887c8a56b9068")
+
+ depends_on("perl-canary-stability", type=("build"))
+ depends_on("perl-common-sense", type=("build", "run", "test"))
+ depends_on("perl-types-serialiser", type=("build", "run", "test"))
+
+ def setup_build_environment(self, env):
+ env.set("PERL_CANARY_STABILITY_NOPROMPT", "1")
diff --git a/var/spack/repos/builtin/packages/perl-json/package.py b/var/spack/repos/builtin/packages/perl-json/package.py
index 1638778997..5ffad50b64 100644
--- a/var/spack/repos/builtin/packages/perl-json/package.py
+++ b/var/spack/repos/builtin/packages/perl-json/package.py
@@ -16,3 +16,12 @@ class PerlJson(PerlPackage):
version("4.10", sha256="df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35")
version("2.97001", sha256="e277d9385633574923f48c297e1b8acad3170c69fa590e31fa466040fc6f8f5a")
+
+ variant(
+ "json-xs",
+ default=True,
+ description="""Makes the preferred backend JSON::XS available to avoid defaulting to the
+ slower JSON::PP""",
+ )
+
+ depends_on("perl-json-xs", when="+json-xs", type=("run"))
diff --git a/var/spack/repos/builtin/packages/perl-kyotocabinet/package.py b/var/spack/repos/builtin/packages/perl-kyotocabinet/package.py
new file mode 100644
index 0000000000..a27bbb4e37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-kyotocabinet/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlKyotocabinet(PerlPackage):
+ """Kyoto Cabinet is a library of routines for managing a database."""
+
+ homepage = "https://dbmx.net/kyotocabinet/"
+ url = "https://dbmx.net/kyotocabinet/perlpkg/kyotocabinet-perl-1.20.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("GPL-3.0-or-later")
+
+ version("1.20", sha256="19b3654dc6febfd0b91e54f36b2a0ebdaeaefaf7875f5aab337ad846a4095c32")
+
+ depends_on("kyotocabinet", type=("build", "link", "run", "test"))
+ depends_on("zlib-api", type=("build", "link", "run", "test"))
+ depends_on("lzo", type=("build", "link", "run", "test"))
+ depends_on("xz", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-lingua-en-inflect/package.py b/var/spack/repos/builtin/packages/perl-lingua-en-inflect/package.py
new file mode 100644
index 0000000000..83137cb39b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-lingua-en-inflect/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlLinguaEnInflect(PerlPackage):
+ """Convert singular to plural. Select "a" or "an"."""
+
+ homepage = "https://metacpan.org/pod/Lingua::EN::Inflect"
+ url = "https://cpan.metacpan.org/authors/id/D/DC/DCONWAY/Lingua-EN-Inflect-1.905.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.905", sha256="05c29ec3482e572313a60da2181b0b30c5db7cf01f8ae7616ad67e1b66263296")
diff --git a/var/spack/repos/builtin/packages/perl-list-compare/package.py b/var/spack/repos/builtin/packages/perl-list-compare/package.py
new file mode 100644
index 0000000000..f14b025d59
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-list-compare/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlListCompare(PerlPackage):
+ """Compare elements of two or more lists"""
+
+ homepage = "https://metacpan.org/pod/List::Compare"
+ url = "https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/List-Compare-0.55.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.55", sha256="cc719479836579d52b02bc328ed80a98f679df043a99b5710ab2c191669eb837")
+
+ depends_on("perl-capture-tiny", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-list-someutils/package.py b/var/spack/repos/builtin/packages/perl-list-someutils/package.py
new file mode 100644
index 0000000000..7519154768
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-list-someutils/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlListSomeutils(PerlPackage):
+ """Provide the stuff missing in List::Util"""
+
+ homepage = "https://metacpan.org/pod/List::SomeUtils"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/List-SomeUtils-0.59.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.59", sha256="fab30372e4c67bf5a46062da38d1d0c8756279feada866eb439fa29571a2dc7b")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-implementation@0.04:", type=("build", "run", "test"))
+ depends_on("perl-test-leaktrace", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-log-any-adapter-callback/package.py b/var/spack/repos/builtin/packages/perl-log-any-adapter-callback/package.py
new file mode 100644
index 0000000000..74698844de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-log-any-adapter-callback/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlLogAnyAdapterCallback(PerlPackage):
+ """Send Log::Any logs to a subroutine"""
+
+ homepage = "https://metacpan.org/pod/Log::Any::Adapter::Callback"
+ url = (
+ "https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/Log-Any-Adapter-Callback-0.102.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ # Note: Author marked package as deprecated
+ version("0.102", sha256="7c01883265bdab65344257c1b1d1e69fbe300e7693dddeebb98f9f67310e07cd")
+
+ depends_on("perl-log-any", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-log-any/package.py b/var/spack/repos/builtin/packages/perl-log-any/package.py
index 9a7f88ffb7..a858cbdaa3 100644
--- a/var/spack/repos/builtin/packages/perl-log-any/package.py
+++ b/var/spack/repos/builtin/packages/perl-log-any/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlLogAny(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("1.717", sha256="56649da0f3900230c9e3d29252cb0a74806fb2ddebd22805acd7368959a65bca")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Log::Any; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-log-dispatch-filerotate/package.py b/var/spack/repos/builtin/packages/perl-log-dispatch-filerotate/package.py
new file mode 100644
index 0000000000..278ab02fb7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-log-dispatch-filerotate/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlLogDispatchFilerotate(PerlPackage):
+ """Log to Files that Archive/Rotate Themselves"""
+
+ homepage = "https://metacpan.org/pod/Log::Dispatch::FileRotate"
+ url = "https://cpan.metacpan.org/authors/id/M/MS/MSCHOUT/Log-Dispatch-FileRotate-1.38.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.38", sha256="b55d6cede3f0a06426488fbfa554f4561320b014c1023893ced29508e5bce4ec")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-date-manip", type=("build", "run", "test"))
+ depends_on("perl-log-dispatch@2.60:", type=("build", "run", "test"))
+ depends_on("perl-sub-uplevel", type=("build", "run", "test"))
+ depends_on("perl-path-tiny@0.018:", type=("build", "test"))
+ depends_on("perl-test-warn", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-log-dispatch/package.py b/var/spack/repos/builtin/packages/perl-log-dispatch/package.py
new file mode 100644
index 0000000000..d26952ee2a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-log-dispatch/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlLogDispatch(PerlPackage):
+ """Dispatches messages to one or more outputs"""
+
+ homepage = "https://metacpan.org/pod/Log::Dispatch"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-2.71.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("2.71", sha256="9d60d9648c35ce2754731eb4deb7f05809ece1bd633b74d74795aed9ec732570")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-devel-globaldestruction", type=("build", "run", "test"))
+ depends_on("perl-dist-checkconflicts@0.02:", type=("build", "run", "test"))
+ depends_on("perl-ipc-run3", type=("build", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-params-validationcompiler", type=("build", "run", "test"))
+ depends_on("perl-specio@0.32:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py b/var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py
index 1a6d3c9c5b..28593cb247 100644
--- a/var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py
+++ b/var/spack/repos/builtin/packages/perl-lwp-mediatypes/package.py
@@ -10,8 +10,17 @@ class PerlLwpMediatypes(PerlPackage):
"""Guess media type for a file or a URL"""
homepage = "https://metacpan.org/pod/LWP::MediaTypes"
- url = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/LWP-MediaTypes-6.02.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.04", sha256="8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9")
version("6.02", sha256="18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.03:"):
+ return f"https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-{version}.tar.gz"
+ else:
+ return (
+ f"http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/LWP-MediaTypes-{version}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-lwp-protocol-https/package.py b/var/spack/repos/builtin/packages/perl-lwp-protocol-https/package.py
index 71fb1209e6..df240e2eb2 100644
--- a/var/spack/repos/builtin/packages/perl-lwp-protocol-https/package.py
+++ b/var/spack/repos/builtin/packages/perl-lwp-protocol-https/package.py
@@ -10,10 +10,11 @@ class PerlLwpProtocolHttps(PerlPackage):
"""Provide https support for LWP::UserAgent"""
homepage = "https://metacpan.org/pod/LWP::Protocol::https"
- url = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/LWP-Protocol-https-6.04.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-6.14.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.14", sha256="59cdeabf26950d4f1bef70f096b0d77c5b1c5a7b5ad1b66d71b681ba279cbb2a")
version("6.04", sha256="1ef67750ee363525cf729b59afde805ac4dc80eaf8d36ca01082a4d78a7af629")
depends_on("perl-test-requiresinternet", type=("build", "run"))
@@ -21,3 +22,9 @@ class PerlLwpProtocolHttps(PerlPackage):
depends_on("perl-net-http", type=("build", "run"))
depends_on("perl-mozilla-ca", type=("build", "run"))
depends_on("perl-libwww-perl", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@6.07:"):
+ return f"https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-{version}.tar.gz"
+ else:
+ return f"http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/LWP-Protocol-https-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-math-bigint/package.py b/var/spack/repos/builtin/packages/perl-math-bigint/package.py
index 655ea9fe89..ec09e393dd 100644
--- a/var/spack/repos/builtin/packages/perl-math-bigint/package.py
+++ b/var/spack/repos/builtin/packages/perl-math-bigint/package.py
@@ -12,5 +12,6 @@ class PerlMathBigint(PerlPackage):
homepage = "https://metacpan.org/pod/Math::BigInt"
url = "https://cpan.metacpan.org/authors/id/P/PJ/PJACKLAM/Math-BigInt-1.999837.tar.gz"
+ version("2.003002", sha256="5ac1fd255cca29d7cf5cb9283e6bb8177cdb07c5bb97502a58084b1c6eace35c")
version("1.999838", sha256="d3c2fb37d412ac8d126452caad5764f02193147261b59c56e652167c41d1e9d5")
version("1.999837", sha256="038f9aad6318f20a84a7b1afe3087a1b02406c9988ce5919311a797f85a32962")
diff --git a/var/spack/repos/builtin/packages/perl-math-cdf/package.py b/var/spack/repos/builtin/packages/perl-math-cdf/package.py
index 1b29e2f11c..01df08643d 100644
--- a/var/spack/repos/builtin/packages/perl-math-cdf/package.py
+++ b/var/spack/repos/builtin/packages/perl-math-cdf/package.py
@@ -14,3 +14,5 @@ class PerlMathCdf(PerlPackage):
url = "http://search.cpan.org/CPAN/authors/id/C/CA/CALLAHAN/Math-CDF-0.1.tar.gz"
version("0.1", sha256="7896bf250835ce47dcc813cb8cf9dc576c5455de42e822dcd7d8d3fef2125565")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-math-cephes/package.py b/var/spack/repos/builtin/packages/perl-math-cephes/package.py
index 3bc0714775..1389c02e9d 100644
--- a/var/spack/repos/builtin/packages/perl-math-cephes/package.py
+++ b/var/spack/repos/builtin/packages/perl-math-cephes/package.py
@@ -16,3 +16,5 @@ class PerlMathCephes(PerlPackage):
license("Artistic-1.0")
version("0.5305", sha256="561a800a4822e748d2befc366baa4b21e879a40cc00c22293c7b8736caeb83a1")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-math-symbolic/package.py b/var/spack/repos/builtin/packages/perl-math-symbolic/package.py
index 886dcce52a..8bb76a66c1 100644
--- a/var/spack/repos/builtin/packages/perl-math-symbolic/package.py
+++ b/var/spack/repos/builtin/packages/perl-math-symbolic/package.py
@@ -12,6 +12,9 @@ class PerlMathSymbolic(PerlPackage):
homepage = "https://metacpan.org/pod/Math::Symbolic"
url = "https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/Math-Symbolic-0.612.tar.gz"
+ license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+
version("0.612", sha256="a9af979956c4c28683c535b5e5da3cde198c0cac2a11b3c9a129da218b3b9c08")
depends_on("perl-module-build", type="build")
+ depends_on("perl-parse-recdescent", type="run")
diff --git a/var/spack/repos/builtin/packages/perl-mce/package.py b/var/spack/repos/builtin/packages/perl-mce/package.py
index 7ca21f4107..ca6497a2da 100644
--- a/var/spack/repos/builtin/packages/perl-mce/package.py
+++ b/var/spack/repos/builtin/packages/perl-mce/package.py
@@ -21,5 +21,6 @@ class PerlMce(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.889", sha256="db6153e474d046fc253050bf53c54002d84cd4ca77d21c2b9df56feeb809bbed")
version("1.884", sha256="c830c0e548094f19c620049e744258be2c121d4a86cf7c94a37599ad016daf33")
version("1.874", sha256="d809e3018475115ad7eccb8bef49bde3bf3e75abbbcd80564728bbcfab86d3d0")
diff --git a/var/spack/repos/builtin/packages/perl-metacpan-client/package.py b/var/spack/repos/builtin/packages/perl-metacpan-client/package.py
new file mode 100644
index 0000000000..e0b2935158
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-metacpan-client/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMetacpanClient(PerlPackage):
+ """A comprehensive, DWIM-featured client to the MetaCPAN API"""
+
+ homepage = "https://metacpan.org/pod/MetaCPAN::Client"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MICKEY/MetaCPAN-Client-2.031000.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.031000", sha256="c6ceaf886a74120e2bffe2ec1f09d0fdc330acbfdb9ec876ef925ee687ec7cf5")
+
+ depends_on("perl@5.10.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-io-socket-ssl@1.42:", type=("build", "run", "test"))
+ depends_on("perl-json-maybexs", type=("build", "run", "test"))
+ depends_on("perl-lwp-protocol-https", type=("build", "test"))
+ depends_on("perl-moo", type=("build", "run", "test"))
+ depends_on("perl-net-ssleay@1.49:", type=("build", "run", "test"))
+ depends_on("perl-ref-util", type=("build", "run", "test"))
+ depends_on("perl-safe-isa", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs@0.002005:", type=("build", "test"))
+ depends_on("perl-type-tiny", type=("build", "run", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-mime-types/package.py b/var/spack/repos/builtin/packages/perl-mime-types/package.py
index 997d7a4d31..1991172a71 100644
--- a/var/spack/repos/builtin/packages/perl-mime-types/package.py
+++ b/var/spack/repos/builtin/packages/perl-mime-types/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlMimeTypes(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("2.24", sha256="629e361f22b220be50c2da7354e23c0451757709a03c25a22f3160edb94cb65f")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use MIME::Types; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-mock-config/package.py b/var/spack/repos/builtin/packages/perl-mock-config/package.py
index 8bee80e323..b779e382ad 100644
--- a/var/spack/repos/builtin/packages/perl-mock-config/package.py
+++ b/var/spack/repos/builtin/packages/perl-mock-config/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlMockConfig(PerlPackage):
version("0.03", sha256="a5b8345757ca4f2b9335f5be14e93ebbb502865233a755bf53bc7156deec001b")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Mock::Config; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-module-build-tiny/package.py b/var/spack/repos/builtin/packages/perl-module-build-tiny/package.py
index e7475e213b..333c7448ef 100644
--- a/var/spack/repos/builtin/packages/perl-module-build-tiny/package.py
+++ b/var/spack/repos/builtin/packages/perl-module-build-tiny/package.py
@@ -14,6 +14,7 @@ class PerlModuleBuildTiny(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.048", sha256="79a73e506fb7badabdf79137a45c6c5027daaf6f9ac3dcfb9d4ffcce92eb36bd")
version("0.044", sha256="cb053a3049cb717dbf4fd7f3c7ab7c0cb1015b22e2d93f38b1ffc47c078322fd")
version("0.039", sha256="7d580ff6ace0cbe555bf36b86dc8ea232581530cbeaaea09bccb57b55797f11c")
diff --git a/var/spack/repos/builtin/packages/perl-module-build/package.py b/var/spack/repos/builtin/packages/perl-module-build/package.py
index 62c1822d59..248c78789f 100644
--- a/var/spack/repos/builtin/packages/perl-module-build/package.py
+++ b/var/spack/repos/builtin/packages/perl-module-build/package.py
@@ -20,6 +20,7 @@ class PerlModuleBuild(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.4234", sha256="66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f")
version("0.4232", sha256="67c82ee245d94ba06decfa25572ab75fdcd26a9009094289d8f45bc54041771b")
version("0.4224", sha256="a6ca15d78244a7b50fdbf27f85c85f4035aa799ce7dd018a0d98b358ef7bc782")
version("0.4220", sha256="fb1207c7e799366f7a8adda3f135bf8141c4d6068505650d4db2b2d3ce34b5a2")
diff --git a/var/spack/repos/builtin/packages/perl-module-corelist/package.py b/var/spack/repos/builtin/packages/perl-module-corelist/package.py
index b4b0a27cf1..3ff083a146 100644
--- a/var/spack/repos/builtin/packages/perl-module-corelist/package.py
+++ b/var/spack/repos/builtin/packages/perl-module-corelist/package.py
@@ -13,6 +13,9 @@ class PerlModuleCorelist(PerlPackage):
url = "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Module-CoreList-5.20220820.tar.gz"
version(
+ "5.20240420", sha256="ce3b4548774c6761d91b479cf5b80b10dc74b0c07054dcf3b6252c22639aee8d"
+ )
+ version(
"5.20230320", sha256="324a28f755bd10abc26e0e8b6564ae2623276ae99cbb28ee09ced647fa80f87b"
)
version(
diff --git a/var/spack/repos/builtin/packages/perl-module-find/package.py b/var/spack/repos/builtin/packages/perl-module-find/package.py
new file mode 100644
index 0000000000..dd7ef93e6b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-module-find/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlModuleFind(PerlPackage):
+ """Find and use installed modules in a (sub)category"""
+
+ homepage = "https://metacpan.org/pod/Module::Find"
+ url = "https://cpan.metacpan.org/authors/id/C/CR/CRENZ/Module-Find-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="4bcaaa376915014728d4f533a98c5b59d665051cd3cdbafc960e5a66fd131092")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-module-install/package.py b/var/spack/repos/builtin/packages/perl-module-install/package.py
index e237f8a0ae..7d9ce4cd47 100644
--- a/var/spack/repos/builtin/packages/perl-module-install/package.py
+++ b/var/spack/repos/builtin/packages/perl-module-install/package.py
@@ -12,6 +12,8 @@ class PerlModuleInstall(PerlPackage):
homepage = "https://metacpan.org/pod/Module::Install"
url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.19.tar.gz"
+ skip_modules = ["Module::Install"] # requires prepend "inc::"
+
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("1.21", sha256="fbf91007f30565f3920e106055fd0d4287981d5e7dad8b35323ce4b733f15a7b")
diff --git a/var/spack/repos/builtin/packages/perl-module-mask/package.py b/var/spack/repos/builtin/packages/perl-module-mask/package.py
new file mode 100644
index 0000000000..f83d47f36d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-module-mask/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlModuleMask(PerlPackage):
+ """Pretend certain modules are not installed"""
+
+ homepage = "https://metacpan.org/pod/Module::Mask"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MATTLAW/Module-Mask-0.06.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.06", sha256="2d73f81ff21c9fa28102791e546ff257164b3025f7832544c8223fb87c1e7e77")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-util@1.00:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-module-pluggable/package.py b/var/spack/repos/builtin/packages/perl-module-pluggable/package.py
index ef4e767182..7f98773b25 100644
--- a/var/spack/repos/builtin/packages/perl-module-pluggable/package.py
+++ b/var/spack/repos/builtin/packages/perl-module-pluggable/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlModulePluggable(PerlPackage):
version("5.2", sha256="b3f2ad45e4fd10b3fb90d912d78d8b795ab295480db56dc64e86b9fa75c5a6df")
depends_on("perl@5.5.30:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Module::Pluggable; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-module-util/package.py b/var/spack/repos/builtin/packages/perl-module-util/package.py
new file mode 100644
index 0000000000..d41cb1f868
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-module-util/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlModuleUtil(PerlPackage):
+ """Module name tools and transformations"""
+
+ homepage = "https://metacpan.org/pod/Module::Util"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MATTLAW/Module-Util-1.09.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.09", sha256="6cfbcb6a45064446ec8aa0ee1a7dddc420b54469303344187aef84d2c7f3e2c6")
+
+ depends_on("perl@5.5.3:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-mojolicious/package.py b/var/spack/repos/builtin/packages/perl-mojolicious/package.py
new file mode 100644
index 0000000000..5c43aff8b9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-mojolicious/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMojolicious(PerlPackage):
+ """Real-time web framework"""
+
+ homepage = "https://metacpan.org/pod/Mojolicious"
+ url = "https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-9.35.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("9.35", sha256="6a4a446ee07fca7c6db72f5d817540d6833009cb8de7cce4c6fb24a15ee7d46b")
+
+ depends_on("perl@5.16.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-moose/package.py b/var/spack/repos/builtin/packages/perl-moose/package.py
index 234cc6167c..d3b08f943b 100644
--- a/var/spack/repos/builtin/packages/perl-moose/package.py
+++ b/var/spack/repos/builtin/packages/perl-moose/package.py
@@ -14,12 +14,15 @@ class PerlMoose(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.2207", sha256="7c2daddc49754ded93f65b8ce9e3ac9b6d11ab27d111ec77f95a8528cf4ac409")
version("2.2203", sha256="fa7814acf4073fa434c148d403cbbf8a7b62f73ad396fa8869f3036d6e3241a7")
version("2.2010", sha256="af0905b69f18c27de1177c9bc7778ee495d4ec91be1f223e8ca8333af4de08c5")
version("2.2009", sha256="63ba8a5e27dbcbdbac2cd8f4162fff50a31e9829d8955a196a5898240c02d194")
version("2.2007", sha256="bc75a320b55ba26ac9e60e11a77b3471066cb615bf7097537ed22e20df88afe8")
version("2.2006", sha256="a4e00ab25cc41bebc5e7a11d71375fb5e64b56d5f91159afee225d698e06392b")
+ depends_on("c", type="build") # generated
+
depends_on("perl-cpan-meta-check", type=("build", "run"))
depends_on("perl-test-cleannamespaces", type=("build", "run"))
depends_on("perl-devel-overloadinfo", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-moosex-emulate-class-accessor-fast/package.py b/var/spack/repos/builtin/packages/perl-moosex-emulate-class-accessor-fast/package.py
new file mode 100644
index 0000000000..908b24cebc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moosex-emulate-class-accessor-fast/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMoosexEmulateClassAccessorFast(PerlPackage):
+ """Emulate Class::Accessor::Fast behavior using Moose attributes"""
+
+ homepage = "https://metacpan.org/pod/MooseX::Emulate::Class::Accessor::Fast"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/MooseX-Emulate-Class-Accessor-Fast-0.009032.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.009032", sha256="82eeb7ef1f0d25418ae406ea26912b241428d4b2ab9510d5e9deb3f72c187994")
+
+ depends_on("perl-moose@0.84:", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean", type=("build", "run", "test"))
+ depends_on("perl-test-exception", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-moosex-getopt/package.py b/var/spack/repos/builtin/packages/perl-moosex-getopt/package.py
new file mode 100644
index 0000000000..7b67566982
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moosex-getopt/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMoosexGetopt(PerlPackage):
+ """A Moose role for processing command line options"""
+
+ homepage = "https://metacpan.org/pod/MooseX::Getopt"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/MooseX-Getopt-0.76.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.76", sha256="ff8731bd2b1df83347dfb6afe9ca15c04d2ecd8b288e5793d095eaf956b6b028")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-getopt-long-descriptive@0.088:", type=("build", "run", "test"))
+ depends_on("perl-module-build-tiny@0.034:", type=("build"))
+ depends_on("perl-module-runtime", type=("build", "test"))
+ depends_on("perl-moose", type=("build", "run", "test"))
+ depends_on("perl-moosex-role-parameterized@1.01:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-path-tiny@0.009:", type=("build", "test"))
+ depends_on("perl-test-deep", type=("build", "test"))
+ depends_on("perl-test-fatal@0.003:", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
+ depends_on("perl-test-trap", type=("build", "test"))
+ depends_on("perl-test-warnings@0.009:", type=("build", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-moosex-methodattributes/package.py b/var/spack/repos/builtin/packages/perl-moosex-methodattributes/package.py
new file mode 100644
index 0000000000..0411b9e2f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moosex-methodattributes/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMoosexMethodattributes(PerlPackage):
+ """Code attribute introspection"""
+
+ homepage = "https://metacpan.org/pod/MooseX::MethodAttributes"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/MooseX-MethodAttributes-0.32.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.32", sha256="cb33886574b7d2dd39c42c0dcdc707acdb0aec7dbbde9a21c0422660368c197b")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-moose", type=("build", "run", "test"))
+ depends_on("perl-moosex-role-parameterized", type=("build", "test"))
+ depends_on("perl-namespace-autoclean@0.08:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-moosex-role-parameterized/package.py b/var/spack/repos/builtin/packages/perl-moosex-role-parameterized/package.py
new file mode 100644
index 0000000000..ba8f87521c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moosex-role-parameterized/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMoosexRoleParameterized(PerlPackage):
+ """Moose roles with composition parameters"""
+
+ homepage = "https://metacpan.org/pod/MooseX::Role::Parameterized"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/MooseX-Role-Parameterized-1.11.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.11", sha256="1cfe766c5d7f0ecab57f733dcca430a2a2acd6b995757141b940ade3692bec9e")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-cpan-meta-check@0.011:", type=("build", "test"))
+ depends_on("perl-module-build-tiny@0.034:", type=("build"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-moose@2.0300:", type=("build", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean@0.19:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-moox-types-mooselike-numeric/package.py b/var/spack/repos/builtin/packages/perl-moox-types-mooselike-numeric/package.py
new file mode 100644
index 0000000000..839aed7d51
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moox-types-mooselike-numeric/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMooxTypesMooselikeNumeric(PerlPackage):
+ """Moo types for numbers"""
+
+ homepage = "https://metacpan.org/pod/MooX::Types::MooseLike::Numeric"
+ url = (
+ "https://cpan.metacpan.org/authors/id/M/MA/MATEU/MooX-Types-MooseLike-Numeric-1.03.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.03", sha256="16adeb617b963d010179922c2e4e8762df77c75232e17320b459868c4970c44b")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-moo@1.004002:", type=("build", "link"))
+ depends_on("perl-moox-types-mooselike@0.23:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal@0.003:", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-moox-types-mooselike/package.py b/var/spack/repos/builtin/packages/perl-moox-types-mooselike/package.py
new file mode 100644
index 0000000000..3a4a4ae20a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-moox-types-mooselike/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlMooxTypesMooselike(PerlPackage):
+ """Some Moosish types and a type builder"""
+
+ homepage = "https://metacpan.org/pod/MooX::Types::MooseLike"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MATEU/MooX-Types-MooseLike-0.29.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.29", sha256="1d3780aa9bea430afbe65aa8c76e718f1045ce788aadda4116f59d3b7a7ad2b4")
+
+ depends_on("perl-module-runtime@0.014:", type=("build", "run", "test"))
+ depends_on("perl-moo@1.004002:", type=("build", "test"))
+ depends_on("perl-test-fatal@0.003:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py b/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py
index 410c3e821b..63e48fe89d 100644
--- a/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py
+++ b/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py
@@ -23,11 +23,3 @@ class PerlNamespaceAutoclean(PerlPackage):
depends_on("perl-namespace-clean@0.20:", type=("build", "run", "test"))
depends_on("perl-sub-identify", type=("build", "run", "test"))
depends_on("perl-test-needs", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use namespace::autoclean; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-namespace-clean/package.py b/var/spack/repos/builtin/packages/perl-namespace-clean/package.py
index 768d74c428..7bc66201af 100644
--- a/var/spack/repos/builtin/packages/perl-namespace-clean/package.py
+++ b/var/spack/repos/builtin/packages/perl-namespace-clean/package.py
@@ -21,11 +21,3 @@ class PerlNamespaceClean(PerlPackage):
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
depends_on("perl-b-hooks-endofscope@0.12:", type=("build", "run", "test"))
depends_on("perl-package-stash@0.23:", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use namespace::clean; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-net-cidr-lite/package.py b/var/spack/repos/builtin/packages/perl-net-cidr-lite/package.py
new file mode 100644
index 0000000000..a647fdb65b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-net-cidr-lite/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlNetCidrLite(PerlPackage):
+ """Perl extension for merging IPv4 or IPv6 CIDR addresses"""
+
+ homepage = "https://metacpan.org/pod/Net::CIDR::Lite"
+ url = "https://cpan.metacpan.org/authors/id/S/ST/STIGTSP/Net-CIDR-Lite-0.22.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.22", sha256="4317d8cb341a617b9e0888da43c09cdffffcb0c9edf7b8c9928d742a563b8517")
diff --git a/var/spack/repos/builtin/packages/perl-net-http/package.py b/var/spack/repos/builtin/packages/perl-net-http/package.py
index 27a18f0598..42cdb6ca5a 100644
--- a/var/spack/repos/builtin/packages/perl-net-http/package.py
+++ b/var/spack/repos/builtin/packages/perl-net-http/package.py
@@ -14,6 +14,7 @@ class PerlNetHttp(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("6.23", sha256="0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e")
version("6.22", sha256="62faf9a5b84235443fe18f780e69cecf057dea3de271d7d8a0ba72724458a1a2")
version("6.17", sha256="1e8624b1618dc6f7f605f5545643ebb9b833930f4d7485d4124aa2f2f26d1611")
diff --git a/var/spack/repos/builtin/packages/perl-net-ip/package.py b/var/spack/repos/builtin/packages/perl-net-ip/package.py
index f9a67ada5f..ce41fd85b0 100644
--- a/var/spack/repos/builtin/packages/perl-net-ip/package.py
+++ b/var/spack/repos/builtin/packages/perl-net-ip/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -16,11 +15,3 @@ class PerlNetIp(PerlPackage):
maintainers("EbiArnie")
version("1.26", sha256="040f16f3066647d761b724a3b70754d28cbd1e6fe5ea01c63ed1cd857117d639")
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Net::IP; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-net-server-ss-prefork/package.py b/var/spack/repos/builtin/packages/perl-net-server-ss-prefork/package.py
new file mode 100644
index 0000000000..869fc57b9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-net-server-ss-prefork/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlNetServerSsPrefork(PerlPackage):
+ """A hot-deployable variant of Net::Server::PreFork"""
+
+ homepage = "https://metacpan.org/pod/Net::Server::SS::PreFork"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZUHO/Net-Server-SS-PreFork-0.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.05", sha256="6d22b3a84eb3e01fb238f566bdb3014847d30e0d51ec1e86a0b6e043e367968b")
+
+ depends_on("perl-http-server-simple", type=("build", "link"))
+ depends_on("perl-libwww-perl", type=("build", "link"))
+ depends_on("perl-net-server", type=("build", "run", "test"))
+ depends_on("perl-server-starter@0.02:", type=("build", "run", "test"))
+ depends_on("perl-test-tcp@0.06:", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-net-server/package.py b/var/spack/repos/builtin/packages/perl-net-server/package.py
new file mode 100644
index 0000000000..092f20576e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-net-server/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlNetServer(PerlPackage):
+ """Extensible Perl internet server"""
+
+ homepage = "https://metacpan.org/pod/Net::Server"
+ url = "https://cpan.metacpan.org/authors/id/R/RH/RHANDOM/Net-Server-2.014.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.014", sha256="3406b9ca5a662a0075eed47fb78de1316b601c94f62a0ee34a5544db9baa3720")
diff --git a/var/spack/repos/builtin/packages/perl-net-ssleay/package.py b/var/spack/repos/builtin/packages/perl-net-ssleay/package.py
index cd6a8168b1..f6f4090597 100644
--- a/var/spack/repos/builtin/packages/perl-net-ssleay/package.py
+++ b/var/spack/repos/builtin/packages/perl-net-ssleay/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-
from spack.package import *
@@ -12,18 +10,21 @@ class PerlNetSsleay(PerlPackage):
"""Perl extension for using OpenSSL"""
homepage = "https://metacpan.org/pod/Net::SSLeay"
- url = "http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-1.82.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz"
license("Artistic-2.0")
+ version("1.94", sha256="9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d")
version("1.85", sha256="9d8188b9fb1cae3bd791979c20554925d5e94a138d00414f1a6814549927b0c8")
version("1.82", sha256="5895c519c9986a5e5af88e3b8884bbdc70e709ee829dc6abb9f53155c347c7e5")
+ depends_on("c", type="build") # generated
+
depends_on("openssl")
def configure(self, spec, prefix):
self.build_method = "Makefile.PL"
- self.build_executable = inspect.getmodule(self).make
+ self.build_executable = make
# Do you want to run external tests?
config_answers = ["\n"]
config_answers_filename = "spack-config.in"
@@ -33,4 +34,10 @@ class PerlNetSsleay(PerlPackage):
with open(config_answers_filename, "r") as f:
env["OPENSSL_PREFIX"] = self.spec["openssl"].prefix
- inspect.getmodule(self).perl("Makefile.PL", "INSTALL_BASE={0}".format(prefix), input=f)
+ perl("Makefile.PL", "INSTALL_BASE={0}".format(prefix), input=f)
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.86:"):
+ return f"https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-{version}.tar.gz"
+ else:
+ return f"http://search.cpan.org/CPAN/authors/id/M/MI/MIKEM/Net-SSLeay-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-package-stash-xs/package.py b/var/spack/repos/builtin/packages/perl-package-stash-xs/package.py
index 8f22bba758..68ab65abea 100644
--- a/var/spack/repos/builtin/packages/perl-package-stash-xs/package.py
+++ b/var/spack/repos/builtin/packages/perl-package-stash-xs/package.py
@@ -10,8 +10,15 @@ class PerlPackageStashXs(PerlPackage):
"""Faster and more correct implementation of the Package::Stash API"""
homepage = "https://metacpan.org/pod/Package::Stash::XS"
- url = "http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-0.28.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-0.30.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.30", sha256="26bad65c1959c57379b3e139dc776fbec5f702906617ef27cdc293ddf1239231")
version("0.28", sha256="23d8c5c25768ef1dc0ce53b975796762df0d6e244445d06e48d794886c32d486")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@0.29:"):
+ return f"https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-{version}.tar.gz"
+ else:
+ return f"http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-package-stash/package.py b/var/spack/repos/builtin/packages/perl-package-stash/package.py
index 8678271714..1709bc3a18 100644
--- a/var/spack/repos/builtin/packages/perl-package-stash/package.py
+++ b/var/spack/repos/builtin/packages/perl-package-stash/package.py
@@ -10,13 +10,24 @@ class PerlPackageStash(PerlPackage):
"""Routines for manipulating stashes"""
homepage = "https://metacpan.org/pod/Package::Stash"
- url = "http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-0.37.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-0.40.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.40", sha256="5a9722c6d9cb29ee133e5f7b08a5362762a0b5633ff5170642a5b0686e95e066")
version("0.37", sha256="06ab05388f9130cd377c0e1d3e3bafeed6ef6a1e22104571a9e1d7bfac787b2c")
depends_on("perl-test-requires", type=("build", "run"))
depends_on("perl-test-fatal", type=("build", "run"))
depends_on("perl-module-implementation", type=("build", "run"))
depends_on("perl-dist-checkconflicts", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@0.38:"):
+ return (
+ f"https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-{version}.tar.gz"
+ )
+ else:
+ return (
+ f"http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-{version}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-package-variant/package.py b/var/spack/repos/builtin/packages/perl-package-variant/package.py
new file mode 100644
index 0000000000..6928301e40
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-package-variant/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPackageVariant(PerlPackage):
+ """Parameterizable packages"""
+
+ homepage = "https://metacpan.org/pod/Package::Variant"
+ url = "https://cpan.metacpan.org/authors/id/M/MS/MSTROUT/Package-Variant-1.003002.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.003002", sha256="b2ed849d2f4cdd66467512daa3f143266d6df810c5fae9175b252c57bc1536dc")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-import-into@1.000000:", type=("build", "run", "test"))
+ depends_on("perl-module-runtime@0.013:", type=("build", "run", "test"))
+ depends_on("perl-strictures@2.000000:", type=("build", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-params-util/package.py b/var/spack/repos/builtin/packages/perl-params-util/package.py
index 55281d4775..e56f1a3cd9 100644
--- a/var/spack/repos/builtin/packages/perl-params-util/package.py
+++ b/var/spack/repos/builtin/packages/perl-params-util/package.py
@@ -10,8 +10,19 @@ class PerlParamsUtil(PerlPackage):
"""Simple, compact and correct param-checking functions"""
homepage = "https://metacpan.org/pod/Params::Util"
- url = "http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Params-Util-1.07.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Params-Util-1.102.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.102", sha256="499bb1b482db24fda277a51525596ad092c2bd51dd508fa8fec2e9f849097402")
version("1.07", sha256="30f1ec3f2cf9ff66ae96f973333f23c5f558915bb6266881eac7423f52d7c76c")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.099:"):
+ return (
+ f"https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Params-Util-{version}.tar.gz"
+ )
+ else:
+ return (
+ f"http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Params-Util-{version}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py b/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py
index 00f562ef24..0116221fbe 100644
--- a/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py
+++ b/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py
@@ -25,11 +25,3 @@ class PerlParamsValidationcompiler(PerlPackage):
depends_on("perl-test-without-module", type=("build", "test"))
depends_on("perl-test2-plugin-nowarnings", type=("build", "test"))
depends_on("perl-test2-suite", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Params::ValidationCompiler; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-parse-recdescent/package.py b/var/spack/repos/builtin/packages/perl-parse-recdescent/package.py
index 491b8f42f6..90e87a4dc2 100644
--- a/var/spack/repos/builtin/packages/perl-parse-recdescent/package.py
+++ b/var/spack/repos/builtin/packages/perl-parse-recdescent/package.py
@@ -14,4 +14,6 @@ class PerlParseRecdescent(PerlPackage):
version("1.967015", sha256="1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37")
+ depends_on("c", type="build") # generated
+
depends_on("perl-module-build", type="build")
diff --git a/var/spack/repos/builtin/packages/perl-parsetemplate/package.py b/var/spack/repos/builtin/packages/perl-parsetemplate/package.py
new file mode 100644
index 0000000000..9084638ec0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-parsetemplate/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlParsetemplate(PerlPackage):
+ """Parse::Template - Processor for templates containing Perl expressions."""
+
+ homepage = "https://metacpan.org/pod/Parse::Template"
+ url = "https://cpan.metacpan.org/authors/id/P/PS/PSCUST/ParseTemplate-3.08.tar.gz"
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("3.08", sha256="3c7734f53999de8351a77cb09631d7a4a0482b6f54bca63d69d5a4eec8686d51")
diff --git a/var/spack/repos/builtin/packages/perl-path-class/package.py b/var/spack/repos/builtin/packages/perl-path-class/package.py
new file mode 100644
index 0000000000..5c3ceec441
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-path-class/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPathClass(PerlPackage):
+ """Cross-platform path specification manipulation"""
+
+ homepage = "https://metacpan.org/pod/Path::Class"
+ url = "https://cpan.metacpan.org/authors/id/K/KW/KWILLIAMS/Path-Class-0.37.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.37", sha256="654781948602386f2cb2e4473a739f17dc6953d92aabc2498a4ca2561bc248ce")
diff --git a/var/spack/repos/builtin/packages/perl-path-tiny/package.py b/var/spack/repos/builtin/packages/perl-path-tiny/package.py
index ec90934c53..19fbc6ba70 100644
--- a/var/spack/repos/builtin/packages/perl-path-tiny/package.py
+++ b/var/spack/repos/builtin/packages/perl-path-tiny/package.py
@@ -18,5 +18,6 @@ class PerlPathTiny(PerlPackage):
license("Apache-2.0")
+ version("0.146", sha256="861ef09bca68254e9ab24337bb6ec9d58593a792e9d68a27ee6bec2150f06741")
version("0.144", sha256="f6ea094ece845c952a02c2789332579354de8d410a707f9b7045bd241206487d")
version("0.108", sha256="3c49482be2b3eb7ddd7e73a5b90cff648393f5d5de334ff126ce7a3632723ff5")
diff --git a/var/spack/repos/builtin/packages/perl-perl-critic-moose/package.py b/var/spack/repos/builtin/packages/perl-perl-critic-moose/package.py
new file mode 100644
index 0000000000..cd8523ab3c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-perl-critic-moose/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPerlCriticMoose(PerlPackage):
+ """Policies for Perl::Critic concerned with using Moose"""
+
+ homepage = "https://metacpan.org/pod/Perl::Critic::Moose"
+ url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Perl-Critic-Moose-1.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.05", sha256="52eb8e22c42643f17fe297a21714017efdb9e2986c24e3337e030f3650f92201")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-namespace-autoclean", type=("build", "run", "test"))
+ depends_on("perl-perl-critic", type=("build", "run", "test"))
+ depends_on("perl-readonly", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-perl-critic/package.py b/var/spack/repos/builtin/packages/perl-perl-critic/package.py
new file mode 100644
index 0000000000..e5509f523a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-perl-critic/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPerlCritic(PerlPackage):
+ """Critique Perl source code for best-practices."""
+
+ homepage = "https://metacpan.org/pod/Perl::Critic"
+ url = "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/Perl-Critic-1.152.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.152", sha256="e5bfaf67f61a2a6a0ed343f0403b19f515b4890eed6272abaab707749c5e5e1e")
+
+ depends_on("perl@5.10.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-b-keywords@1.23:", type=("build", "run", "test"))
+ depends_on("perl-config-tiny@2:", type=("build", "run", "test"))
+ depends_on("perl-exception-class@1.23:", type=("build", "run", "test"))
+ depends_on("perl-file-which", type=("build", "run", "test"))
+ depends_on("perl-list-someutils@0.55:", type=("build", "run", "test"))
+ depends_on("perl-module-pluggable@3.1:", type=("build", "run", "test"))
+ depends_on("perl-perl-tidy", type=("build", "run", "test"))
+ depends_on("perl-pod-parser", type=("build", "run", "test"))
+ depends_on("perl-pod-spell@1:", type=("build", "run", "test"))
+ depends_on("perl-ppi@1.277:", type=("build", "run", "test"))
+ depends_on("perl-ppix-quotelike", type=("build", "run", "test"))
+ depends_on("perl-ppix-regexp@0.027:", type=("build", "run", "test"))
+ depends_on("perl-ppix-utils", type=("build", "run", "test"))
+ depends_on("perl-readonly@2:", type=("build", "run", "test"))
+ depends_on("perl-string-format@1.18:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-perl-tidy/package.py b/var/spack/repos/builtin/packages/perl-perl-tidy/package.py
new file mode 100644
index 0000000000..e5cfe1afd8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-perl-tidy/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPerlTidy(PerlPackage):
+ """Indent and reformat perl scripts"""
+
+ homepage = "https://metacpan.org/pod/Perl::Tidy"
+ url = "https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-20240202.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("GPL-2.0-only")
+
+ version("20240202", sha256="9451adde47c2713652d39b150fb3eeb3ccc702add46913e989125184cd7ec57d")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-perl-version/package.py b/var/spack/repos/builtin/packages/perl-perl-version/package.py
index f81f02b846..c65fe2763b 100644
--- a/var/spack/repos/builtin/packages/perl-perl-version/package.py
+++ b/var/spack/repos/builtin/packages/perl-perl-version/package.py
@@ -12,6 +12,7 @@ class PerlPerlVersion(PerlPackage):
homepage = "https://metacpan.org/pod/Perl::Version"
url = "http://search.cpan.org/CPAN/authors/id/B/BD/BDFOY/Perl-Version-1.013_03.tar.gz"
+ version("1.017", sha256="3d85283bc5411af0f71fd75284a0b2e1ff3a7ec13f16464046f1fd77aa8647e4")
version("1.013_03", sha256="6b5978f598dcdf8a304500c1b7bcdce967ca05e7b38673cebfdb4237531c2ff9")
depends_on("perl-file-slurp-tiny", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-assets/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-assets/package.py
new file mode 100644
index 0000000000..f6ae56fd20
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-assets/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareAssets(PerlPackage):
+ """Concatenate and minify JavaScript and CSS files"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::Assets"
+ url = "https://cpan.metacpan.org/authors/id/P/PE/PERLER/Plack-Middleware-Assets-1.0.0.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("BSD")
+
+ version("1.0.0", sha256="fb43c9fb7e395efcb75baeed9dc1a4546d6d7ad387761238b0568673ace0ce84")
+
+ depends_on("perl-css-minifier-xs", type=("build", "run", "test"))
+ depends_on("perl-http-date", type=("build", "run", "test"))
+ depends_on("perl-javascript-minifier-xs", type=("build", "run", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-crossorigin/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-crossorigin/package.py
new file mode 100644
index 0000000000..cf367cce25
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-crossorigin/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareCrossorigin(PerlPackage):
+ """Adds headers to allow Cross-Origin Resource Sharing"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::CrossOrigin"
+ url = (
+ "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Plack-Middleware-CrossOrigin-0.014.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.014", sha256="35e80fabcc8455a6bc1aee0820fde9c4ae94baab7a795ce79932abc93004f3b7")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py
new file mode 100644
index 0000000000..66c81bf6a8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareDeflater(PerlPackage):
+ """Compress response body with Gzip or Deflate"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::Deflater"
+ url = (
+ "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/Plack-Middleware-Deflater-0.12.tar.gz"
+ )
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.12", sha256="28da95e7da4c8b5591ac454509c92176cd0842960ce074fde30f9a1075dcc275")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-fixmissingbodyinredirect/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-fixmissingbodyinredirect/package.py
new file mode 100644
index 0000000000..2d066c9a88
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-fixmissingbodyinredirect/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareFixmissingbodyinredirect(PerlPackage):
+ """Plack::Middleware which sets body for redirect response, if it's not already set"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::FixMissingBodyInRedirect"
+ url = "https://cpan.metacpan.org/authors/id/S/SW/SWEETKID/Plack-Middleware-FixMissingBodyInRedirect-0.12.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.12", sha256="6c22d069f5a57ac206d4659b28b8869bb9270640bb955efddd451dcc58cdb391")
+
+ depends_on("perl-html-parser", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-methodoverride/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-methodoverride/package.py
new file mode 100644
index 0000000000..0849c1106a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-methodoverride/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareMethodoverride(PerlPackage):
+ """Override REST methods to Plack apps via POST"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::MethodOverride"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Plack-Middleware-MethodOverride-0.20.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.20", sha256="dbfb5a2efb48bfeb01cb3ae1e1c677e155dc7bfe210c7e7f221bae3cb6aab5f1")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
+ depends_on("perl-uri", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-removeredundantbody/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-removeredundantbody/package.py
new file mode 100644
index 0000000000..248c11f346
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-removeredundantbody/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareRemoveredundantbody(PerlPackage):
+ """Plack::Middleware which removes body for HTTP response if it's not required"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::RemoveRedundantBody"
+ url = "https://cpan.metacpan.org/authors/id/S/SW/SWEETKID/Plack-Middleware-RemoveRedundantBody-0.09.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.09", sha256="80d45f93d6b7290b0bd8b3cedd84a37fc501456cc3dec02ec7aad81c0018087e")
+
+ depends_on("perl-http-message", type=("build", "test"))
+ depends_on("perl-plack", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-reverseproxy/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-reverseproxy/package.py
new file mode 100644
index 0000000000..ee86311339
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-middleware-reverseproxy/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackMiddlewareReverseproxy(PerlPackage):
+ """Supports app to run as a reverse proxy backend"""
+
+ homepage = "https://metacpan.org/pod/Plack::Middleware::ReverseProxy"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Plack-Middleware-ReverseProxy-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="874931d37d07667ba0d0f37903b94511071f4191feb73fa45765da2b8c15a128")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-plack@0.9988:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack-test-externalserver/package.py b/var/spack/repos/builtin/packages/perl-plack-test-externalserver/package.py
new file mode 100644
index 0000000000..c6eeb05cff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack-test-externalserver/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlackTestExternalserver(PerlPackage):
+ """Run HTTP tests on external live servers"""
+
+ homepage = "https://metacpan.org/pod/Plack::Test::ExternalServer"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Plack-Test-ExternalServer-0.02.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.02", sha256="5baf5c57fe0c06412deec9c5abe7952ab8a04f8c47b4bbd8e9e9982268903ed0")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-http-message", type=("build", "test"))
+ depends_on("perl-libwww-perl", type=("build", "run", "test"))
+ depends_on("perl-plack", type=("build", "test"))
+ depends_on("perl-test-tcp", type=("build", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-plack/package.py b/var/spack/repos/builtin/packages/perl-plack/package.py
new file mode 100644
index 0000000000..11b74f19fc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-plack/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPlack(PerlPackage):
+ """Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)"""
+
+ homepage = "https://metacpan.org/pod/Plack"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Plack-1.0051.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.0051", sha256="bebde91c42298ed6ec8e6c82b21433a1b49aa39412c247f3905b80f955acf77b")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-apache-logformat-compiler@0.33:", type=("build", "run", "test"))
+ depends_on("perl-cookie-baker@0.07:", type=("build", "run", "test"))
+ depends_on("perl-devel-stacktrace@1.23:", type=("build", "run", "test"))
+ depends_on("perl-devel-stacktrace-ashtml@0.11:", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir@1.00:", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir-install@0.06:", type=("build"))
+ depends_on("perl-filesys-notify-simple", type=("build", "run", "test"))
+ depends_on("perl-hash-multivalue@0.05:", type=("build", "run", "test"))
+ depends_on("perl-http-entity-parser@0.25:", type=("build", "run", "test"))
+ depends_on("perl-http-headers-fast@0.18:", type=("build", "run", "test"))
+ depends_on("perl-http-message@5.814:", type=("build", "run", "test"))
+ depends_on("perl-stream-buffered@0.02:", type=("build", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-test-tcp@2.15:", type=("build", "run", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
+ depends_on("perl-uri@1.59:", type=("build", "run", "test"))
+ depends_on("perl-www-form-urlencoded@0.23:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-pod-coverage/package.py b/var/spack/repos/builtin/packages/perl-pod-coverage/package.py
new file mode 100644
index 0000000000..5d05a36b4c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-pod-coverage/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPodCoverage(PerlPackage):
+ """Checks if the documentation of a module is comprehensive"""
+
+ homepage = "https://metacpan.org/pod/Pod::Coverage"
+ url = "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Pod-Coverage-0.23.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.23", sha256="30b7a0b0c942f44a7552c0d34e9b1f2e0ba0b67955c61e3b1589ec369074b107")
+
+ depends_on("perl-devel-symdump@2.01:", type=("build", "run", "test"))
+ depends_on("perl-pod-parser@1.13:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-pod-parser/package.py b/var/spack/repos/builtin/packages/perl-pod-parser/package.py
new file mode 100644
index 0000000000..bd3a6097d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-pod-parser/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPodParser(PerlPackage):
+ """Modules for parsing/translating POD format documents"""
+
+ homepage = "https://metacpan.org/pod/Pod::Parser"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.67", sha256="5deccbf55d750ce65588cd211c1a03fa1ef3aaa15d1ac2b8d85383a42c1427ea")
diff --git a/var/spack/repos/builtin/packages/perl-pod-spell/package.py b/var/spack/repos/builtin/packages/perl-pod-spell/package.py
new file mode 100644
index 0000000000..51464e5096
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-pod-spell/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPodSpell(PerlPackage):
+ """A formatter for spellchecking Pod"""
+
+ homepage = "https://metacpan.org/pod/Pod::Spell"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Pod-Spell-1.26.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("1.26", sha256="2f05bfc9cfb04b96fcbfa2c8544d1e6ae908596d3696c46e0e26556b750afbbf")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-class-tiny", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir-install@0.06:", type=("build"))
+ depends_on("perl-lingua-en-inflect", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-posix-strftime-compiler/package.py b/var/spack/repos/builtin/packages/perl-posix-strftime-compiler/package.py
new file mode 100644
index 0000000000..b681a87cb5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-posix-strftime-compiler/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPosixStrftimeCompiler(PerlPackage):
+ """GNU C library compatible strftime for loggers and servers"""
+
+ homepage = "https://metacpan.org/pod/POSIX::strftime::Compiler"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/POSIX-strftime-Compiler-0.46.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.46", sha256="bf88873248ef88cc5e68ed074493496be684ec334e11273d4654306dd9dae485")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-build-tiny@0.035:", type=("build"))
diff --git a/var/spack/repos/builtin/packages/perl-ppi/package.py b/var/spack/repos/builtin/packages/perl-ppi/package.py
new file mode 100644
index 0000000000..63958f6735
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-ppi/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPpi(PerlPackage):
+ """Parse, Analyze and Manipulate Perl (without perl)"""
+
+ homepage = "https://metacpan.org/pod/PPI"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MITHALDU/PPI-1.277.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.277", sha256="87c79f83b6876e206051965d5019d2507c551f819a86750080ec7ec43b2e0af8")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-class-inspector@1.22:", type=("build", "test"))
+ depends_on("perl-clone@0.30:", type=("build", "run", "test"))
+ depends_on("perl-params-util@1.00:", type=("build", "run", "test"))
+ depends_on("perl-task-weaken", type=("build", "run", "test"))
+ depends_on("perl-test-nowarnings", type=("build", "test"))
+ depends_on("perl-test-object@0.07:", type=("build", "test"))
+ depends_on("perl-test-subcalls@1.07:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-ppix-quotelike/package.py b/var/spack/repos/builtin/packages/perl-ppix-quotelike/package.py
new file mode 100644
index 0000000000..7f03aeac17
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-ppix-quotelike/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPpixQuotelike(PerlPackage):
+ """Parse Perl string literals and string-literal-like things."""
+
+ homepage = "https://metacpan.org/pod/PPIx::QuoteLike"
+ url = "https://cpan.metacpan.org/authors/id/W/WY/WYANT/PPIx-QuoteLike-0.023.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.023", sha256="3576a3149d2c53e07e9737b7892be5cfb84a499a6ef1df090b713b0544234d21")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-ppi", type=("build", "run", "test"))
+ depends_on("perl-readonly", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-ppix-regexp/package.py b/var/spack/repos/builtin/packages/perl-ppix-regexp/package.py
new file mode 100644
index 0000000000..29f65880d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-ppix-regexp/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPpixRegexp(PerlPackage):
+ """Parse regular expressions"""
+
+ homepage = "https://metacpan.org/pod/PPIx::Regexp"
+ url = "https://cpan.metacpan.org/authors/id/W/WY/WYANT/PPIx-Regexp-0.088.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.088", sha256="885433f9b102fad4fd36b21c7320bb036036111caf998131bf416f7cd5ee9764")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-ppi", type=("build", "run", "test"))
+ depends_on("perl-task-weaken", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-ppix-utils/package.py b/var/spack/repos/builtin/packages/perl-ppix-utils/package.py
new file mode 100644
index 0000000000..285d9fb1ef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-ppix-utils/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlPpixUtils(PerlPackage):
+ """Utility functions for PPI"""
+
+ homepage = "https://metacpan.org/pod/PPIx::Utils"
+ url = "https://cpan.metacpan.org/authors/id/D/DB/DBOOK/PPIx-Utils-0.003.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.003", sha256="2a9bccfc8ead03be01b67248fe8e152522040f798286fa4ef4432b7f2efdba11")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-b-keywords@1.09:", type=("build", "run", "test"))
+ depends_on("perl-ppi@1.250:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-proc-daemon/package.py b/var/spack/repos/builtin/packages/perl-proc-daemon/package.py
index 293abce793..42b513e0e7 100644
--- a/var/spack/repos/builtin/packages/perl-proc-daemon/package.py
+++ b/var/spack/repos/builtin/packages/perl-proc-daemon/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlProcDaemon(PerlPackage):
version("0.23", sha256="34c0b85b7948b431cbabc97cee580835e515ccf43badbd8339eb109474089b69")
depends_on("perl-proc-processtable", type=("build", "link"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Proc::Daemon; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-proc-processtable/package.py b/var/spack/repos/builtin/packages/perl-proc-processtable/package.py
index cb927d587b..7b133d55a4 100644
--- a/var/spack/repos/builtin/packages/perl-proc-processtable/package.py
+++ b/var/spack/repos/builtin/packages/perl-proc-processtable/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -19,12 +18,6 @@ class PerlProcProcesstable(PerlPackage):
version("0.636", sha256="944224ffb00fc1ef35069633770a0afda8623b5c7532d1e4ab48a9df394890fd")
- depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Proc::ProcessTable; print("OK\n")']
+ depends_on("c", type="build") # generated
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-readonly-xs/package.py b/var/spack/repos/builtin/packages/perl-readonly-xs/package.py
new file mode 100644
index 0000000000..6fb89a9776
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-readonly-xs/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlReadonlyXs(PerlPackage):
+ """Companion module for Readonly.pm, to speed up read-only scalar variables."""
+
+ homepage = "https://metacpan.org/pod/Readonly::XS"
+ url = "https://cpan.metacpan.org/authors/id/R/RO/ROODE/Readonly-XS-1.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.05", sha256="8ae5c4e85299e5c8bddd1b196f2eea38f00709e0dc0cb60454dc9114ae3fff0d")
+
+ depends_on("perl-readonly@1.02:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-ref-util/package.py b/var/spack/repos/builtin/packages/perl-ref-util/package.py
index fec27f14d0..7dccc336ad 100644
--- a/var/spack/repos/builtin/packages/perl-ref-util/package.py
+++ b/var/spack/repos/builtin/packages/perl-ref-util/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlRefUtil(PerlPackage):
version("0.204", sha256="415fa73dbacf44f3d5d79c14888cc994562720ab468e6f71f91cd1f769f105e1")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Ref::Util; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-rose-datetime/package.py b/var/spack/repos/builtin/packages/perl-rose-datetime/package.py
new file mode 100644
index 0000000000..c64da2ef5d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-rose-datetime/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlRoseDatetime(PerlPackage):
+ """DateTime helper functions and objects."""
+
+ homepage = "https://metacpan.org/pod/Rose::DateTime"
+ url = "https://cpan.metacpan.org/authors/id/J/JS/JSIRACUSA/Rose-DateTime-0.540.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.540", sha256="1e42802d0944e9669599b7d0dea1e77a0d17a42123f8ca555180db4e7218e34a")
+
+ depends_on("perl-datetime", type=("build", "run", "test"))
+ depends_on("perl-rose-object@0.82:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-rose-db-object/package.py b/var/spack/repos/builtin/packages/perl-rose-db-object/package.py
new file mode 100644
index 0000000000..1425d742f4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-rose-db-object/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlRoseDbObject(PerlPackage):
+ """Extensible, high performance object-relational mapper (ORM)."""
+
+ homepage = "https://metacpan.org/pod/Rose::DB::Object"
+ url = "https://cpan.metacpan.org/authors/id/J/JS/JSIRACUSA/Rose-DB-Object-0.820.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.820", sha256="a0077609250966636f1411bcce2493cf1e1166ba935071738eb4b713104da83b")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bit-vector", type=("build", "run", "test"))
+ depends_on("perl-clone@0.29:", type=("build", "run", "test"))
+ depends_on("perl-datetime", type=("build", "run", "test"))
+ depends_on("perl-dbi@1.40:", type=("build", "run", "test"))
+ depends_on("perl-list-moreutils", type=("build", "run", "test"))
+ depends_on("perl-rose-datetime", type=("build", "run", "test"))
+ depends_on("perl-rose-db@0.782:", type=("build", "run", "test"))
+ depends_on("perl-rose-object@0.854:", type=("build", "run", "test"))
+ depends_on("perl-time-clock@1.00:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-rose-db/package.py b/var/spack/repos/builtin/packages/perl-rose-db/package.py
new file mode 100644
index 0000000000..1a662fe74e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-rose-db/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlRoseDb(PerlPackage):
+ """A DBI wrapper and abstraction layer."""
+
+ homepage = "https://metacpan.org/pod/Rose::DB"
+ url = "https://cpan.metacpan.org/authors/id/J/JS/JSIRACUSA/Rose-DB-0.785.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.785", sha256="7849307d748d9672b42ef3cd78f83d44dec034cdc94f4d4251d2761e27c67a3c")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-bit-vector", type=("build", "run", "test"))
+ depends_on("perl-clone-pp", type=("build", "run", "test"))
+ depends_on("perl-datetime", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-mysql", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-oracle", type=("build", "run", "test"))
+ depends_on("perl-datetime-format-pg@0.11:", type=("build", "run", "test"))
+ depends_on("perl-dbi", type=("build", "run", "test"))
+ depends_on("perl-rose-datetime", type=("build", "run", "test"))
+ depends_on("perl-rose-object@0.854:", type=("build", "run", "test"))
+ depends_on("perl-sql-reservedwords", type=("build", "run", "test"))
+ depends_on("perl-time-clock", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-rose-object/package.py b/var/spack/repos/builtin/packages/perl-rose-object/package.py
index 03e9227543..2da6683be5 100644
--- a/var/spack/repos/builtin/packages/perl-rose-object/package.py
+++ b/var/spack/repos/builtin/packages/perl-rose-object/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlRoseObject(PerlPackage):
version("0.860", sha256="f3ff294097b1a4b02a4bae6dc3544ded744a08972e831c1d2741083403197f47")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Rose::Object; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-safe-isa/package.py b/var/spack/repos/builtin/packages/perl-safe-isa/package.py
index d3ff3e4d1e..3fd08f6914 100644
--- a/var/spack/repos/builtin/packages/perl-safe-isa/package.py
+++ b/var/spack/repos/builtin/packages/perl-safe-isa/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlSafeIsa(PerlPackage):
version("1.000010", sha256="87f4148aa0ff1d5e652723322eab7dafa3801c967d6f91ac9147a3c467b8a66a")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Safe::Isa; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-scope-guard/package.py b/var/spack/repos/builtin/packages/perl-scope-guard/package.py
index 90c70b2944..486bc04f4a 100644
--- a/var/spack/repos/builtin/packages/perl-scope-guard/package.py
+++ b/var/spack/repos/builtin/packages/perl-scope-guard/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlScopeGuard(PerlPackage):
version("0.21", sha256="8c9b1bea5c56448e2c3fadc65d05be9e4690a3823a80f39d2f10fdd8f777d278")
depends_on("perl@5.6.1:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Scope::Guard; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-search-elasticsearch/package.py b/var/spack/repos/builtin/packages/perl-search-elasticsearch/package.py
new file mode 100644
index 0000000000..eac00923ab
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-search-elasticsearch/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSearchElasticsearch(PerlPackage):
+ """The official client for Elasticsearch"""
+
+ homepage = "https://metacpan.org/pod/Search::Elasticsearch"
+ url = "https://cpan.metacpan.org/authors/id/E/EZ/EZIMUEL/Search-Elasticsearch-8.00.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Apache-2.0")
+
+ version("8.00", sha256="4b95357072b7432e02cc9ef897881976650e03030c15ec752789299284ce30ab")
+
+ depends_on("perl-any-uri-escape", type=("build", "run", "test"))
+ depends_on("perl-devel-globaldestruction", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "run", "test"))
+ depends_on("perl-io-socket-ssl", type=("build", "test"))
+ depends_on("perl-json-maybexs@1.002002:", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl", type=("build", "run", "test"))
+ depends_on("perl-log-any@1.02:", type=("build", "run", "test"))
+ depends_on("perl-log-any-adapter-callback@0.09:", type=("build", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-moo@2.001000:", type=("build", "run", "test"))
+ depends_on("perl-namespace-clean", type=("build", "run", "test"))
+ depends_on("perl-net-ip", type=("build", "run", "test"))
+ depends_on("perl-package-stash@0.34:", type=("build", "run", "test"))
+ depends_on("perl-sub-exporter", type=("build", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "test"))
+ depends_on("perl-test-exception", type=("build", "test"))
+ depends_on("perl-test-pod", type=("build", "test"))
+ depends_on("perl-test-sharedfork", type=("build", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py b/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py
new file mode 100644
index 0000000000..74d9b3c705
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sereal-decoder/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSerealDecoder(PerlPackage):
+ """Fast, compact, powerful binary deserialization"""
+
+ homepage = "https://metacpan.org/pod/Sereal::Decoder"
+ url = "https://cpan.metacpan.org/authors/id/Y/YV/YVES/Sereal-Decoder-5.004.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("5.004", sha256="68ef0314d87d1a6e60bb0f66fcf43eb2cacdeb1754432f5e25e784e39d3e6784")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-devel-checklib@1.16:", type=("build"))
+ depends_on("perl-test-deep", type=("build", "link", "test"))
+ depends_on("perl-test-differences", type=("build", "link", "test"))
+ depends_on("perl-test-longstring", type=("build", "link", "test"))
+ depends_on("perl-test-warn", type=("build", "link", "test"))
+ depends_on("zstd", type=("build", "link", "run", "test"))
+
+ def setup_build_environment(self, env):
+ # These are not currently available in Spack
+ env.set("SEREAL_USE_BUNDLED_CSNAPPY", "1")
+ env.set("SEREAL_USE_BUNDLED_MINIZ", "1")
+ env.set("USE_UNALIGNED", "1")
+ env.set("USE_UNALIGNED", "1")
+ env.set("NO_ASM", "0")
+ env.set("ZSTD_DISABLE_ASM", "0")
diff --git a/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py b/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py
new file mode 100644
index 0000000000..891d617187
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sereal-encoder/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSerealEncoder(PerlPackage):
+ """Fast, compact, powerful binary serialization"""
+
+ homepage = "https://metacpan.org/pod/Sereal::Encoder"
+ url = "https://cpan.metacpan.org/authors/id/Y/YV/YVES/Sereal-Encoder-5.004.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("5.004", sha256="5e5a86ccd32dae34ed80932ecbe5c68e29752b5de0e9b0a793ab7eb2ca55cb1b")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-devel-checklib@1.16:", type=("build"))
+ depends_on("perl-sereal-decoder@5.004:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "link", "test"))
+ depends_on("perl-test-differences", type=("build", "link", "test"))
+ depends_on("perl-test-longstring", type=("build", "link", "test"))
+ depends_on("perl-test-warn", type=("build", "link", "test"))
+ depends_on("zstd", type=("build", "link", "run", "test"))
+
+ def setup_build_environment(self, env):
+ # These are not currently available in Spack
+ env.set("SEREAL_USE_BUNDLED_CSNAPPY", "1")
+ env.set("SEREAL_USE_BUNDLED_MINIZ", "1")
+ env.set("USE_UNALIGNED", "1")
+ env.set("USE_UNALIGNED", "1")
+ env.set("NO_ASM", "0")
+ env.set("ZSTD_DISABLE_ASM", "0")
diff --git a/var/spack/repos/builtin/packages/perl-sereal/package.py b/var/spack/repos/builtin/packages/perl-sereal/package.py
new file mode 100644
index 0000000000..65f995087f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sereal/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSereal(PerlPackage):
+ """Fast, compact, powerful binary (de-)serialization"""
+
+ homepage = "https://metacpan.org/pod/Sereal"
+ url = "https://cpan.metacpan.org/authors/id/Y/YV/YVES/Sereal-5.004.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("5.004", sha256="9c25bb7ae4bd736d24b1ad1d93d77395b0c65ca8741e266bfc0cbe542261d76f")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-sereal-decoder@5.004:", type=("build", "run", "test"))
+ depends_on("perl-sereal-encoder@5.004:", type=("build", "run", "test"))
+ depends_on("perl-test-deep", type=("build", "test"))
+ depends_on("perl-test-differences", type=("build", "test"))
+ depends_on("perl-test-longstring", type=("build", "test"))
+ depends_on("perl-test-warn", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-server-starter/package.py b/var/spack/repos/builtin/packages/perl-server-starter/package.py
new file mode 100644
index 0000000000..842f59d700
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-server-starter/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlServerStarter(PerlPackage):
+ """A superdaemon for hot-deploying server programs"""
+
+ homepage = "https://metacpan.org/pod/Server::Starter"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZUHO/Server-Starter-0.35.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.35", sha256="676dc0d6cff4648538332c63c32fb88ad09ed868213ea9e62e3f19fad41b9c40")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-test-sharedfork", type=("build", "test"))
+ depends_on("perl-test-tcp@2.08:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-set-intervaltree/package.py b/var/spack/repos/builtin/packages/perl-set-intervaltree/package.py
index aa788637b0..fa45c04a00 100644
--- a/var/spack/repos/builtin/packages/perl-set-intervaltree/package.py
+++ b/var/spack/repos/builtin/packages/perl-set-intervaltree/package.py
@@ -15,4 +15,6 @@ class PerlSetIntervaltree(PerlPackage):
version("0.10", sha256="e3bd9ccf0d074b5f879eef1ed88254983697bf83d02744fce62150ee46553ebc")
+ depends_on("cxx", type="build") # generated
+
depends_on("perl-extutils-makemaker", type="build")
diff --git a/var/spack/repos/builtin/packages/perl-set-object/package.py b/var/spack/repos/builtin/packages/perl-set-object/package.py
new file mode 100644
index 0000000000..c480cf9b90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-set-object/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSetObject(PerlPackage):
+ """Unordered collections (sets) of Perl Objects"""
+
+ homepage = "https://metacpan.org/pod/Set::Object"
+ url = "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Set-Object-1.42.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.42", sha256="d18c5a8a233eabbd0206cf3da5b00fcdd7b37febf12a93dcc3d1c026e6fdec45")
diff --git a/var/spack/repos/builtin/packages/perl-sort-naturally/package.py b/var/spack/repos/builtin/packages/perl-sort-naturally/package.py
new file mode 100644
index 0000000000..a4ba950b05
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sort-naturally/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSortNaturally(PerlPackage):
+ """Sort lexically, but sort numeral parts numerically"""
+
+ homepage = "https://metacpan.org/pod/Sort::Naturally"
+ url = "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Sort-Naturally-1.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.03", sha256="eaab1c5c87575a7826089304ab1f8ffa7f18e6cd8b3937623e998e865ec1e746")
+
+ depends_on("perl@5.0.0:", type=("build", "link", "run", "test"))
+
+ use_modules = ["Sort::Naturally"]
diff --git a/var/spack/repos/builtin/packages/perl-specio/package.py b/var/spack/repos/builtin/packages/perl-specio/package.py
index 3a50251d99..1de1d5bc17 100644
--- a/var/spack/repos/builtin/packages/perl-specio/package.py
+++ b/var/spack/repos/builtin/packages/perl-specio/package.py
@@ -28,11 +28,3 @@ class PerlSpecio(PerlPackage):
depends_on("perl-test-fatal", type=("build", "run", "test"))
depends_on("perl-test-needs", type=("build", "test"))
depends_on("perl-try-tiny", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Specio; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-spiffy/package.py b/var/spack/repos/builtin/packages/perl-spiffy/package.py
index 004a4c0f4d..41fe2463a5 100644
--- a/var/spack/repos/builtin/packages/perl-spiffy/package.py
+++ b/var/spack/repos/builtin/packages/perl-spiffy/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlSpiffy(PerlPackage):
version("0.46", sha256="8f58620a8420255c49b6c43c5ff5802bd25e4f09240c51e5bf2b022833d41da3")
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Spiffy; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-sql-abstract-classic/package.py b/var/spack/repos/builtin/packages/perl-sql-abstract-classic/package.py
new file mode 100644
index 0000000000..5b7a2a19eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sql-abstract-classic/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSqlAbstractClassic(PerlPackage):
+ """Generate SQL from Perl data structures"""
+
+ homepage = "https://metacpan.org/pod/SQL::Abstract::Classic"
+ url = "https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/SQL-Abstract-Classic-1.91.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.91", sha256="4e3d1dfd095b2123268586bb06b86929ea571388d4e941acccbdcda1e108ef28")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-mro-compat@0.12:", type=("build", "run", "test"))
+ depends_on("perl-sql-abstract@1.79:", type=("build", "run", "test"))
+ depends_on("perl-test-deep@0.101:", type=("build", "link"))
+ depends_on("perl-test-exception@0.31:", type=("build", "link"))
+ depends_on("perl-test-warn", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-sql-abstract/package.py b/var/spack/repos/builtin/packages/perl-sql-abstract/package.py
new file mode 100644
index 0000000000..cf2d4ad58e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sql-abstract/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSqlAbstract(PerlPackage):
+ """Generate SQL from Perl data structures"""
+
+ homepage = "https://metacpan.org/pod/SQL::Abstract"
+ url = "https://cpan.metacpan.org/authors/id/M/MS/MSTROUT/SQL-Abstract-2.000001.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.000001", sha256="35a642662c349420d44be6e0ef7d8765ea743eb12ad14399aa3a232bb94e6e9a")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-data-dumper-concise", type=("build", "test"))
+ depends_on("perl-hash-merge@0.12:", type=("build", "run", "test"))
+ depends_on("perl-moo@2.000001:", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.12:", type=("build", "run", "test"))
+ depends_on("perl-sub-quote@2.000001:", type=("build", "run", "test"))
+ depends_on("perl-test-deep@0.101:", type=("build", "run", "test"))
+ depends_on("perl-test-exception@0.31:", type=("build", "test"))
+ depends_on("perl-test-warn", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-sql-reservedwords/package.py b/var/spack/repos/builtin/packages/perl-sql-reservedwords/package.py
index d6574973ed..169049de29 100644
--- a/var/spack/repos/builtin/packages/perl-sql-reservedwords/package.py
+++ b/var/spack/repos/builtin/packages/perl-sql-reservedwords/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlSqlReservedwords(PerlPackage):
version("0.8", sha256="09f4aecf1bd8efdd3f9b39f16a240c4e9ceb61eb295b88145c96eb9d58504a2a")
depends_on("perl-sub-exporter", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use SQL::ReservedWords; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-sql-translator/package.py b/var/spack/repos/builtin/packages/perl-sql-translator/package.py
new file mode 100644
index 0000000000..34b5544a68
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-sql-translator/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlSqlTranslator(PerlPackage):
+ """SQL DDL transformations and more"""
+
+ homepage = "https://metacpan.org/pod/SQL::Translator"
+ url = "https://cpan.metacpan.org/authors/id/V/VE/VEESH/SQL-Translator-1.65.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.65", sha256="606750db6a4ebf2693aa9bc8444c998c169b76bc308f3d314ead5eac17bede4a")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-carp-clan", type=("build", "run", "test"))
+ depends_on("perl-dbi@1.54:", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir@1.0:", type=("build", "run", "test"))
+ depends_on("perl-file-sharedir-install", type=("build"))
+ depends_on("perl-json-maybexs@1.003003:", type=("build", "test"))
+ depends_on("perl-moo@1.000003:", type=("build", "run", "test"))
+ depends_on("perl-package-variant@1.001001:", type=("build", "run", "test"))
+ depends_on("perl-parse-recdescent@1.967009:", type=("build", "run", "test"))
+ depends_on("perl-sub-quote", type=("build", "run", "test"))
+ depends_on("perl-test-differences", type=("build", "test"))
+ depends_on("perl-test-exception@0.42:", type=("build", "test"))
+ depends_on("perl-try-tiny@0.04:", type=("build", "run", "test"))
+ depends_on("perl-xml-writer@0.500:", type=("build", "test"))
+ depends_on("perl-yaml@0.66:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-starman/package.py b/var/spack/repos/builtin/packages/perl-starman/package.py
new file mode 100644
index 0000000000..f1639a23c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-starman/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStarman(PerlPackage):
+ """High-performance preforking PSGI/Plack web server"""
+
+ homepage = "https://metacpan.org/pod/Starman"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Starman-0.4017.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.4017", sha256="6ffab915f323f60089e3ebf852b9b9707d6917266df8afd7370fac04bfdfee4e")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-data-dump", type=("build", "run", "test"))
+ depends_on("perl-http-date", type=("build", "run", "test"))
+ depends_on("perl-http-message", type=("build", "run", "test"))
+ depends_on("perl-http-parser-xs", type=("build", "run", "test"))
+ depends_on("perl-libwww-perl", type=("build", "test"))
+ depends_on("perl-module-build-tiny@0.034:", type=("build"))
+ depends_on("perl-net-server@2.007:", type=("build", "run", "test"))
+ depends_on("perl-plack@0.9971:", type=("build", "run", "test"))
+ depends_on("perl-test-requires", type=("build", "test"))
+ depends_on("perl-test-tcp@2.00:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-stream-buffered/package.py b/var/spack/repos/builtin/packages/perl-stream-buffered/package.py
new file mode 100644
index 0000000000..ea58d9b8be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-stream-buffered/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStreamBuffered(PerlPackage):
+ """Temporary buffer to save bytes"""
+
+ homepage = "https://metacpan.org/pod/Stream::Buffered"
+ url = "https://cpan.metacpan.org/authors/id/D/DO/DOY/Stream-Buffered-0.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.03", sha256="9b2d4390b5de6b0cf4558e4ad04317a73c5e13dd19af29149c4e47c37fb2423b")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-strictures/package.py b/var/spack/repos/builtin/packages/perl-strictures/package.py
new file mode 100644
index 0000000000..534da2cb8c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-strictures/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStrictures(PerlPackage):
+ """Turn on strict and make most warnings fatal"""
+
+ homepage = "https://metacpan.org/pod/strictures"
+ url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/strictures-2.000006.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.000006", sha256="09d57974a6d1b2380c802870fed471108f51170da81458e2751859f2714f8d57")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-string-approx/package.py b/var/spack/repos/builtin/packages/perl-string-approx/package.py
new file mode 100644
index 0000000000..9d41cbc788
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-string-approx/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStringApprox(PerlPackage):
+ """Perl extension for approximate matching (fuzzy matching)"""
+
+ homepage = "https://metacpan.org/pod/String::Approx"
+ url = "https://cpan.metacpan.org/authors/id/J/JH/JHI/String-Approx-3.28.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("3.28", sha256="43201e762d8699cb0ac2c0764a5454bdc2306c0771014d6c8fba821480631342")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-string-crc32/package.py b/var/spack/repos/builtin/packages/perl-string-crc32/package.py
new file mode 100644
index 0000000000..7b7a544329
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-string-crc32/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStringCrc32(PerlPackage):
+ """Perl interface for cyclic redundancy check generation"""
+
+ homepage = "https://metacpan.org/pod/String::CRC32"
+ url = "https://cpan.metacpan.org/authors/id/L/LE/LEEJO/String-CRC32-2.100.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("CC0-1.0 OR SSLeay")
+
+ version("2.100", sha256="9706093b2d068b6715d35b4c58f51558e37960083202129fbb00a57e19a74713")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-string-format/package.py b/var/spack/repos/builtin/packages/perl-string-format/package.py
new file mode 100644
index 0000000000..3e0dfe1c08
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-string-format/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStringFormat(PerlPackage):
+ """Sprintf-like string formatting capabilities with arbitrary format definitions"""
+
+ homepage = "https://metacpan.org/pod/String::Format"
+ url = "https://cpan.metacpan.org/authors/id/S/SR/SREZIC/String-Format-1.18.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.18", sha256="9e417a8f8d9ea623beea2d13a47c0d5a696fc8602c0509b826cd45f97b76e778")
diff --git a/var/spack/repos/builtin/packages/perl-string-numeric/package.py b/var/spack/repos/builtin/packages/perl-string-numeric/package.py
new file mode 100644
index 0000000000..06cc52ba51
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-string-numeric/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStringNumeric(PerlPackage):
+ """Determine whether a string represents a numeric value"""
+
+ homepage = "https://metacpan.org/pod/String::Numeric"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHANSEN/String-Numeric-0.9.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.9", sha256="b992b6611a070e8cd887bc1c7409f22443c115e44245a5c67fb43535b5e0cfdb")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-exception", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-string-rewriteprefix/package.py b/var/spack/repos/builtin/packages/perl-string-rewriteprefix/package.py
new file mode 100644
index 0000000000..e58378fa54
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-string-rewriteprefix/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlStringRewriteprefix(PerlPackage):
+ """Rewrite strings based on a set of known prefixes"""
+
+ homepage = "https://metacpan.org/pod/String::RewritePrefix"
+ url = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/String-RewritePrefix-0.009.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.009", sha256="44918bec96a54af8ca37ca897e436709ec284a07b28516ef3cce4666869646d5")
+
+ depends_on("perl@5.12.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-sub-exporter@0.972:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-sub-exporter/package.py b/var/spack/repos/builtin/packages/perl-sub-exporter/package.py
index b559099b99..e22b2790cf 100644
--- a/var/spack/repos/builtin/packages/perl-sub-exporter/package.py
+++ b/var/spack/repos/builtin/packages/perl-sub-exporter/package.py
@@ -14,6 +14,7 @@ class PerlSubExporter(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.991", sha256="2a95695d35c5d0d5373a7e145c96b9b016113b74e94116835ac05450cae4d445")
version("0.989", sha256="334896e0af5e0643fc3799cbbcf01f933d4ca6324cd644c0b6660e71cdbd01c9")
version("0.987", sha256="543cb2e803ab913d44272c7da6a70bb62c19e467f3b12aaac4c9523259b083d6")
diff --git a/var/spack/repos/builtin/packages/perl-sub-name/package.py b/var/spack/repos/builtin/packages/perl-sub-name/package.py
index db7125162b..95cd7be1ab 100644
--- a/var/spack/repos/builtin/packages/perl-sub-name/package.py
+++ b/var/spack/repos/builtin/packages/perl-sub-name/package.py
@@ -14,5 +14,6 @@ class PerlSubName(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.27", sha256="ecf36fba1c47ca93e1daa394968ed39c4186867459d9cd173c421e2b972043e8")
version("0.26", sha256="2d2f2d697d516c89547e7c4307f1e79441641cae2c7395e7319b306d390df105")
version("0.21", sha256="bd32e9dee07047c10ae474c9f17d458b6e9885a6db69474c7a494ccc34c27117")
diff --git a/var/spack/repos/builtin/packages/perl-swissknife/package.py b/var/spack/repos/builtin/packages/perl-swissknife/package.py
index 33ff9f5951..9d44c19943 100644
--- a/var/spack/repos/builtin/packages/perl-swissknife/package.py
+++ b/var/spack/repos/builtin/packages/perl-swissknife/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PerlSwissknife(PerlPackage):
"""An object-oriented Perl library to handle Swiss-Prot entries"""
- homepage = "http://swissknife.sourceforge.net"
+ homepage = "https://swissknife.sourceforge.net"
url = "https://downloads.sourceforge.net/project/swissknife/swissknife/1.75/Swissknife_1.75.tar.gz"
license("GPL-2.0-only")
diff --git a/var/spack/repos/builtin/packages/perl-task-weaken/package.py b/var/spack/repos/builtin/packages/perl-task-weaken/package.py
index a3a7a68229..e5445de3bb 100644
--- a/var/spack/repos/builtin/packages/perl-task-weaken/package.py
+++ b/var/spack/repos/builtin/packages/perl-task-weaken/package.py
@@ -10,8 +10,19 @@ class PerlTaskWeaken(PerlPackage):
"""Ensure that a platform has weaken support"""
homepage = "https://metacpan.org/pod/Task::Weaken"
- url = "http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Task-Weaken-1.04.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Task-Weaken-1.06.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.06", sha256="2383fedb9dbaef646468ea824afbf7c801076720cfba0df2a7a074726dcd66be")
version("1.04", sha256="67e271c55900fe7889584f911daa946e177bb60c8af44c32f4584b87766af3c4")
+
+ depends_on("perl-module-install", type="build", when="@:1.04")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.05:"):
+ return f"https://cpan.metacpan.org/authors/id/E/ET/ETHER/Task-Weaken-{version}.tar.gz"
+ else:
+ return (
+ f"http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Task-Weaken-{version}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-term-ansicolor-markup/package.py b/var/spack/repos/builtin/packages/perl-term-ansicolor-markup/package.py
new file mode 100644
index 0000000000..dfd878a3fd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-term-ansicolor-markup/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTermAnsicolorMarkup(PerlPackage):
+ """Colorize tagged strings for screen output"""
+
+ homepage = "https://metacpan.org/pod/Term::ANSIColor::Markup"
+ url = "https://cpan.metacpan.org/authors/id/K/KE/KENTARO/Term-ANSIColor-Markup-0.06.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("MIT")
+
+ version("0.06", sha256="66f1c2f2f403fdaae0902b36202d57356b6b5b5a57b3cca8d0248ffbe78c753f")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-class-accessor-lvalue", type=("build", "run", "test"))
+ depends_on("perl-html-parser", type=("build", "run", "test"))
+ depends_on("perl-test-exception", type=("build", "link"))
+ depends_on("perl-module-install", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py b/var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py
index 80ec3394a8..a14da8ac59 100644
--- a/var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py
+++ b/var/spack/repos/builtin/packages/perl-term-readline-gnu/package.py
@@ -13,6 +13,7 @@ class PerlTermReadlineGnu(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("1.46", sha256="b13832132e50366c34feac12ce82837c0a9db34ca530ae5d27db97cf9c964c7b")
version("1.36", sha256="9a08f7a4013c9b865541c10dbba1210779eb9128b961250b746d26702bab6925")
depends_on("readline")
diff --git a/var/spack/repos/builtin/packages/perl-term-table/package.py b/var/spack/repos/builtin/packages/perl-term-table/package.py
index 06df4362f3..9dda145518 100644
--- a/var/spack/repos/builtin/packages/perl-term-table/package.py
+++ b/var/spack/repos/builtin/packages/perl-term-table/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlTermTable(PerlPackage):
version("0.018", sha256="9159b9131ee6b3f3956b74f45422985553574babbfaeba60be5c17bc114ac011")
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Term::Table; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-base/package.py b/var/spack/repos/builtin/packages/perl-test-base/package.py
index 6a75f78c8a..2aa5da5cd1 100644
--- a/var/spack/repos/builtin/packages/perl-test-base/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-base/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -23,11 +22,3 @@ class PerlTestBase(PerlPackage):
depends_on("perl-algorithm-diff@1.15:", type=("build", "test"))
depends_on("perl-spiffy@0.40:", type=("run", "test"))
depends_on("perl-text-diff@0.35:", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test::Base; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-class/package.py b/var/spack/repos/builtin/packages/perl-test-class/package.py
new file mode 100644
index 0000000000..5e6c571ca5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-class/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestClass(PerlPackage):
+ """Easily create test classes in an xUnit/JUnit style"""
+
+ homepage = "https://metacpan.org/pod/Test::Class"
+ url = "https://cpan.metacpan.org/authors/id/S/SZ/SZABGAB/Test-Class-0.52.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.52", sha256="40c1b1d388f0a8674769c27529f0cc3634ca0fd9d8f72b196c0531611934bc82")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-runtime", type=("build", "run", "test"))
+ depends_on("perl-mro-compat@0.11:", type=("build", "run", "test"))
+ depends_on("perl-test-exception@0.25:", type=("build", "test"))
+ depends_on("perl-try-tiny", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-diaginc/package.py b/var/spack/repos/builtin/packages/perl-test-diaginc/package.py
new file mode 100644
index 0000000000..447430c43a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-diaginc/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestDiaginc(PerlPackage):
+ """List modules and versions loaded if tests fail"""
+
+ homepage = "https://metacpan.org/pod/Test::DiagINC"
+ url = "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Test-DiagINC-0.010.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Apache-2.0")
+
+ version("0.010", sha256="5bcb8d356c509e359d53d869c07efdaa8fee5d6cf99897018b9a914ceb21222e")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-capture-tiny@0.21:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-differences/package.py b/var/spack/repos/builtin/packages/perl-test-differences/package.py
index 177aece837..6c3d2d5b93 100644
--- a/var/spack/repos/builtin/packages/perl-test-differences/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-differences/package.py
@@ -14,6 +14,7 @@ class PerlTestDifferences(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.71", sha256="cac16a56cd843b0809e5b49199d60d75a8dbad7ca9a08380dbf3f5cc3aaa38d9")
version("0.69", sha256="18f644fdd4a1fef93ef3f7f67df8e95b593d811899f34bcbbaba4d717222f58f")
version("0.64", sha256="9f459dd9c2302a0a73e2f5528a0ce7d09d6766f073187ae2c69e603adf2eb276")
diff --git a/var/spack/repos/builtin/packages/perl-test-file-contents/package.py b/var/spack/repos/builtin/packages/perl-test-file-contents/package.py
new file mode 100644
index 0000000000..a3f4140b4c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-file-contents/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestFileContents(PerlPackage):
+ """Test routines for examining the contents of files"""
+
+ homepage = "https://metacpan.org/pod/Test::File::Contents"
+ url = "https://cpan.metacpan.org/authors/id/A/AR/ARISTOTLE/Test-File-Contents-0.242.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.242", sha256="a838ac0b6f6e10e89613b50ca61773cdba9ba4787ba82e7bb65daaf7084aa50b")
+
+ depends_on("perl@5.8.3:", type=("build", "link", "run", "test"))
+ depends_on("perl-text-diff@0.35:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-file-sharedir/package.py b/var/spack/repos/builtin/packages/perl-test-file-sharedir/package.py
index 021a5bc210..731e7b61e0 100644
--- a/var/spack/repos/builtin/packages/perl-test-file-sharedir/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-file-sharedir/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -26,11 +25,3 @@ class PerlTestFileSharedir(PerlPackage):
depends_on("perl-path-tiny@0.018:", type=("build", "run", "test"))
depends_on("perl-scope-guard", type=("build", "run", "test"))
depends_on("perl-test-fatal", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test::File::ShareDir; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-file/package.py b/var/spack/repos/builtin/packages/perl-test-file/package.py
index e7e8054f63..516d2826b8 100644
--- a/var/spack/repos/builtin/packages/perl-test-file/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-file/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
diff --git a/var/spack/repos/builtin/packages/perl-test-json/package.py b/var/spack/repos/builtin/packages/perl-test-json/package.py
new file mode 100644
index 0000000000..197f262f72
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-json/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestJson(PerlPackage):
+ """Test JSON data"""
+
+ homepage = "https://metacpan.org/pod/Test::JSON"
+ url = "https://cpan.metacpan.org/authors/id/O/OV/OVID/Test-JSON-0.11.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.11", sha256="07c08ab2fcc12850d1ad54fcf6afe9ad1a25a098310c3e7142af1d3cb821d7b3")
+
+ depends_on("perl-json-any@1.2:", type=("build", "run", "test"))
+ depends_on("perl-test-differences@0.47:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-longstring/package.py b/var/spack/repos/builtin/packages/perl-test-longstring/package.py
new file mode 100644
index 0000000000..8534afdc9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-longstring/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestLongstring(PerlPackage):
+ """Tests strings for equality, with more helpful failures"""
+
+ homepage = "https://metacpan.org/pod/Test::LongString"
+ url = "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Test-LongString-0.17.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.17", sha256="abc4349eaf04d1bec1e464166a3018591ea846d8f3c5c9c8af4ac4905d3e974f")
diff --git a/var/spack/repos/builtin/packages/perl-test-mockobject/package.py b/var/spack/repos/builtin/packages/perl-test-mockobject/package.py
new file mode 100644
index 0000000000..451860f89d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-mockobject/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestMockobject(PerlPackage):
+ """Perl extension for emulating troublesome interfaces"""
+
+ homepage = "https://metacpan.org/pod/Test::MockObject"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHROMATIC/Test-MockObject-1.20200122.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version(
+ "1.20200122", sha256="2b7f80da87f5a6fe0360d9ee521051053017442c3a26e85db68dfac9f8307623"
+ )
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-exception@0.31:", type=("build", "test"))
+ depends_on("perl-test-warn@0.23:", type=("build", "test"))
+ depends_on("perl-universal-can@1.20110617:", type=("build", "run", "test"))
+ depends_on("perl-universal-isa@1.20110614:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-mocktime/package.py b/var/spack/repos/builtin/packages/perl-test-mocktime/package.py
new file mode 100644
index 0000000000..92fd8bfe0b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-mocktime/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestMocktime(PerlPackage):
+ """Replaces actual time with simulated time"""
+
+ homepage = "https://metacpan.org/pod/Test::MockTime"
+ url = "https://cpan.metacpan.org/authors/id/D/DD/DDICK/Test-MockTime-0.17.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.17", sha256="3363e118b2606f1d6abc956f22b0d09109772b7086155fb5c9c7f983350602f9")
diff --git a/var/spack/repos/builtin/packages/perl-test-nowarnings/package.py b/var/spack/repos/builtin/packages/perl-test-nowarnings/package.py
index f6f4e744e8..5b437e115c 100644
--- a/var/spack/repos/builtin/packages/perl-test-nowarnings/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-nowarnings/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
diff --git a/var/spack/repos/builtin/packages/perl-test-object/package.py b/var/spack/repos/builtin/packages/perl-test-object/package.py
new file mode 100644
index 0000000000..1517be0882
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-object/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestObject(PerlPackage):
+ """Thoroughly testing objects via registered handlers"""
+
+ homepage = "https://metacpan.org/pod/Test::Object"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Object-0.08.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.08", sha256="65278964147837313f4108e55b59676e8a364d6edf01b3dc198aee894ab1d0bb")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-output/package.py b/var/spack/repos/builtin/packages/perl-test-output/package.py
index 437a6d7965..f17327ee22 100644
--- a/var/spack/repos/builtin/packages/perl-test-output/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-output/package.py
@@ -11,9 +11,9 @@ class PerlTestOutput(PerlPackage):
homepage = "https://github.com/briandfoy/test-output"
url = "https://github.com/briandfoy/test-output/archive/release-1.033.tar.gz"
-
license("Artistic-2.0")
+ version("1.034", sha256="cc016f9c89d3a22f461cb88318f53b03645eaec4025d483ae3bd52a166af5f72")
version("1.033", sha256="35f0a4ef2449fc78886b4c99e1c1d23f432c2fae98538a4489439eb17223bfc2")
version("1.032", sha256="8b87e16b40199c9d62f07a821e1ff17a2701e42adffb281a649ed631823d5771")
version("1.031", sha256="1bb5847f26bee90e71b0af2a9d3a5eec4e17a63aacaf18ce5215f350961c5bf7")
diff --git a/var/spack/repos/builtin/packages/perl-test-perl-critic/package.py b/var/spack/repos/builtin/packages/perl-test-perl-critic/package.py
new file mode 100644
index 0000000000..e502267ab5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-perl-critic/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestPerlCritic(PerlPackage):
+ """Use Perl::Critic in test programs."""
+
+ homepage = "https://metacpan.org/pod/Test::Perl::Critic"
+ url = "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/Test-Perl-Critic-1.04.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.04", sha256="28f806b5412c7908b56cf1673084b8b44ce1cb54c9417d784d91428e1a04096e")
+
+ depends_on("perl-mce@1.827:", type=("build", "run", "test"))
+ depends_on("perl-perl-critic@1.105:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-pod-coverage/package.py b/var/spack/repos/builtin/packages/perl-test-pod-coverage/package.py
new file mode 100644
index 0000000000..7b4b593857
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-pod-coverage/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestPodCoverage(PerlPackage):
+ """Check for pod coverage in your distribution"""
+
+ homepage = "https://metacpan.org/pod/Test::Pod::Coverage"
+ url = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Test-Pod-Coverage-1.10.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("1.10", sha256="48c9cca9f7d99eee741176445b431adf09c029e1aa57c4703c9f46f7601d40d4")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-pod-coverage", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-pod/package.py b/var/spack/repos/builtin/packages/perl-test-pod/package.py
index 44dbdaa264..5deb242ccd 100644
--- a/var/spack/repos/builtin/packages/perl-test-pod/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-pod/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -20,11 +19,3 @@ class PerlTestPod(PerlPackage):
version("1.52", sha256="60a8dbcc60168bf1daa5cc2350236df9343e9878f4ab9830970a5dde6fe8e5fc")
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test::Pod; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-sharedfork/package.py b/var/spack/repos/builtin/packages/perl-test-sharedfork/package.py
index f78a764538..6d99d5acb5 100644
--- a/var/spack/repos/builtin/packages/perl-test-sharedfork/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-sharedfork/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -21,11 +20,3 @@ class PerlTestSharedfork(PerlPackage):
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
depends_on("perl-test-requires", type=("test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test::SharedFork; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-subcalls/package.py b/var/spack/repos/builtin/packages/perl-test-subcalls/package.py
new file mode 100644
index 0000000000..1c4b684083
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-subcalls/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestSubcalls(PerlPackage):
+ """Track the number of times subs are called"""
+
+ homepage = "https://metacpan.org/pod/Test::SubCalls"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-SubCalls-1.10.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.10", sha256="cbc1e9b35a05e71febc13e5ef547a31c8249899bb6011dbdc9d9ff366ddab6c2")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-hook-lexwrap@0.20:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-tcp/package.py b/var/spack/repos/builtin/packages/perl-test-tcp/package.py
new file mode 100644
index 0000000000..108833965d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-tcp/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestTcp(PerlPackage):
+ """Testing TCP program"""
+
+ homepage = "https://metacpan.org/pod/Test::TCP"
+ url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Test-TCP-2.22.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("2.22", sha256="3e53c3c06d6d0980a2bfeb915602b714e682ee211ae88c11748cf2cc714e7b57")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-sharedfork@0.29:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-time-hires/package.py b/var/spack/repos/builtin/packages/perl-test-time-hires/package.py
new file mode 100644
index 0000000000..bcfcb11432
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-time-hires/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestTimeHires(PerlPackage):
+ """Drop-in replacement for Test::Time to work with Time::HiRes"""
+
+ homepage = "https://metacpan.org/pod/Test::Time::HiRes"
+ url = "https://cpan.metacpan.org/authors/id/M/MJ/MJEMMESON/Test-Time-HiRes-0.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.05", sha256="c9d692fdb7aed618c54a9d38f27edea148874421281b571b9686d2c5a5a8ff63")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-module-build-tiny@0.034:", type=("build"))
+ depends_on("perl-test-time@0.07:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-time/package.py b/var/spack/repos/builtin/packages/perl-test-time/package.py
new file mode 100644
index 0000000000..ae7658de16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-time/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestTime(PerlPackage):
+ """Overrides the time() and sleep() core functions for testing"""
+
+ homepage = "https://metacpan.org/pod/Test::Time"
+ url = "https://cpan.metacpan.org/authors/id/A/AN/ANATOFUZ/Test-Time-0.092.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.092", sha256="30d90f54ce840893c7ba2cac2a4d1eecd4c9cdf805910c595e3ae89dfd644738")
diff --git a/var/spack/repos/builtin/packages/perl-test-trap/package.py b/var/spack/repos/builtin/packages/perl-test-trap/package.py
new file mode 100644
index 0000000000..7a1c2be000
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-trap/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestTrap(PerlPackage):
+ """Trap exit codes, exceptions, output, etc."""
+
+ homepage = "https://metacpan.org/pod/Test::Trap"
+ url = "https://cpan.metacpan.org/authors/id/E/EB/EBHANSSEN/Test-Trap-v0.3.5.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("v0.3.5", sha256="54f99016562b5b1d72110100f1f2be437178cdf84376f495ffd0376f1d7ecb9a")
+
+ depends_on("perl@5.6.2:", type=("build", "link", "run", "test"))
+ depends_on("perl-data-dump", type=("build", "run", "test"))
+
+ def url_for_version(self, version):
+ return (
+ f"https://cpan.metacpan.org/authors/id/E/EB/EBHANSSEN/Test-Trap-{str(version)}.tar.gz"
+ )
diff --git a/var/spack/repos/builtin/packages/perl-test-warn/package.py b/var/spack/repos/builtin/packages/perl-test-warn/package.py
index f87bfdc2b5..f1fb60b782 100644
--- a/var/spack/repos/builtin/packages/perl-test-warn/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-warn/package.py
@@ -10,8 +10,19 @@ class PerlTestWarn(PerlPackage):
"""Perl extension to test methods for warnings"""
homepage = "https://metacpan.org/pod/Test::Warn"
- url = "http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/Test-Warn-0.30.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/B/BI/BIGJ/Test-Warn-0.37.tar.gz"
- license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ maintainers("EbiArnie")
- version("0.30", sha256="8197555b94189d919349a03f7058f83861f145af9bee59f505bfe47562144e41")
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.37", sha256="98ca32e7f2f5ea89b8bfb9a0609977f3d153e242e2e51705126cb954f1a06b57")
+ version(
+ "0.30",
+ sha256="8197555b94189d919349a03f7058f83861f145af9bee59f505bfe47562144e41",
+ url="https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Test-Warn-0.30.tar.gz",
+ deprecated=True,
+ )
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-sub-uplevel@0.12:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-warnings/package.py b/var/spack/repos/builtin/packages/perl-test-warnings/package.py
index 27a4f34048..62e16d23f1 100644
--- a/var/spack/repos/builtin/packages/perl-test-warnings/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-warnings/package.py
@@ -14,5 +14,6 @@ class PerlTestWarnings(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.033", sha256="b9c375719f2c61c5f97aa5ee6cf4c901a972347c415969379b0b51f67c48bbcb")
version("0.031", sha256="1e542909fef305e45563e9878ea1c3b0c7cef1b28bb7ae07eba2e1efabec477b")
version("0.026", sha256="ae2b68b1b5616704598ce07f5118efe42dc4605834453b7b2be14e26f9cc9a08")
diff --git a/var/spack/repos/builtin/packages/perl-test-weaken/package.py b/var/spack/repos/builtin/packages/perl-test-weaken/package.py
index deea1123a5..4d94495d35 100644
--- a/var/spack/repos/builtin/packages/perl-test-weaken/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-weaken/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
diff --git a/var/spack/repos/builtin/packages/perl-test-without-module/package.py b/var/spack/repos/builtin/packages/perl-test-without-module/package.py
index 09e021df15..6ac7f60188 100644
--- a/var/spack/repos/builtin/packages/perl-test-without-module/package.py
+++ b/var/spack/repos/builtin/packages/perl-test-without-module/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
diff --git a/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py b/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py
new file mode 100644
index 0000000000..1c367ce69a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestXmlSimple(PerlPackage):
+ """Easy testing for XML"""
+
+ homepage = "https://metacpan.org/pod/Test::XML::Simple"
+ url = "https://cpan.metacpan.org/authors/id/M/MC/MCMAHON/Test-XML-Simple-1.05.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0")
+
+ version("1.05", sha256="c60801a3459e7bdad4cd8007a3c94aede818a829d74e70261e6c2758b227bd53")
+
+ depends_on("perl-test-longstring", type=("build", "run", "test"))
+ depends_on("perl-xml-libxml@1.99:", type=("build", "run", "test"))
+
+ # The test suite from upstream is failing, so we just skip the tests
+ def check(self):
+ pass
diff --git a/var/spack/repos/builtin/packages/perl-test-xml/package.py b/var/spack/repos/builtin/packages/perl-test-xml/package.py
new file mode 100644
index 0000000000..45b5831eeb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-xml/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestXml(PerlPackage):
+ """Compare XML in perl tests"""
+
+ homepage = "https://metacpan.org/pod/Test::XML"
+ url = "https://cpan.metacpan.org/authors/id/S/SE/SEMANTICO/Test-XML-0.08.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.08", sha256="eb54cc23cdec860d3ad8ac8a697cbf038d0dec95229912d975c301890ca83ee2")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-xml-parser@2.34:", type=("build", "run", "test"))
+ depends_on("perl-xml-semanticdiff@0.95:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-xpath/package.py b/var/spack/repos/builtin/packages/perl-test-xpath/package.py
new file mode 100644
index 0000000000..95802ff279
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-xpath/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestXpath(PerlPackage):
+ """Test XML and HTML content and structure with XPath expressions"""
+
+ homepage = "https://metacpan.org/pod/Test::XPath"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Test-XPath-0.20.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.20", sha256="dfaa611e7146ad9c9769b5bcf688949976b8372df7e787a40b933a148d892039")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-xml-libxml@1.70:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test-yaml/package.py b/var/spack/repos/builtin/packages/perl-test-yaml/package.py
new file mode 100644
index 0000000000..36652df3b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-yaml/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTestYaml(PerlPackage):
+ """Testing Module for YAML Implementations"""
+
+ homepage = "https://metacpan.org/pod/Test::YAML"
+ url = "https://cpan.metacpan.org/authors/id/T/TI/TINITA/Test-YAML-1.07.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.07", sha256="1f300d034f46298cb92960912cc04bac33fb27f05b8852d8f051e110b9cd995f")
+
+ depends_on("perl-test-base@0.89:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-test2-plugin-nowarnings/package.py b/var/spack/repos/builtin/packages/perl-test2-plugin-nowarnings/package.py
index 61639daa32..3062e04783 100644
--- a/var/spack/repos/builtin/packages/perl-test2-plugin-nowarnings/package.py
+++ b/var/spack/repos/builtin/packages/perl-test2-plugin-nowarnings/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -21,11 +20,3 @@ class PerlTest2PluginNowarnings(PerlPackage):
depends_on("perl-ipc-run3", type=("build", "test"))
depends_on("perl-test2-suite", type=("build", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test2::Plugin::NoWarnings; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test2-suite/package.py b/var/spack/repos/builtin/packages/perl-test2-suite/package.py
index fd7a7304db..57d5c67328 100644
--- a/var/spack/repos/builtin/packages/perl-test2-suite/package.py
+++ b/var/spack/repos/builtin/packages/perl-test2-suite/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -21,11 +20,3 @@ class PerlTest2Suite(PerlPackage):
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
depends_on("perl-term-table@0.013:", type=("build", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Test2::Suite; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-text-csv-xs/package.py b/var/spack/repos/builtin/packages/perl-text-csv-xs/package.py
new file mode 100644
index 0000000000..e35ccda27c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-text-csv-xs/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTextCsvXs(PerlPackage):
+ """Comma-Separated Values manipulation routines"""
+
+ homepage = "https://metacpan.org/pod/Text::CSV_XS"
+ url = "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.53.tgz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.53", sha256="ba3231610fc755a69e14eb4a3c6d8cce46cc4fd32853777a6c9ce485a8878b42")
+
+ depends_on("perl@5.6.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-text-csv/package.py b/var/spack/repos/builtin/packages/perl-text-csv/package.py
index 8cc0254d8c..9f8f3e3f36 100644
--- a/var/spack/repos/builtin/packages/perl-text-csv/package.py
+++ b/var/spack/repos/builtin/packages/perl-text-csv/package.py
@@ -14,5 +14,6 @@ class PerlTextCsv(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.04", sha256="4f80122e4ea0b05079cad493e386564030f18c8d7b1f9af561df86985a653fe3")
version("2.02", sha256="84120de3e10489ea8fbbb96411a340c32cafbe5cdff7dd9576b207081baa9d24")
version("1.95", sha256="7e0a11d9c1129a55b68a26aa4b37c894279df255aa63ec8341d514ab848dbf61")
diff --git a/var/spack/repos/builtin/packages/perl-throwable/package.py b/var/spack/repos/builtin/packages/perl-throwable/package.py
index e09188edfd..621ec40ac4 100644
--- a/var/spack/repos/builtin/packages/perl-throwable/package.py
+++ b/var/spack/repos/builtin/packages/perl-throwable/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -23,11 +22,3 @@ class PerlThrowable(PerlPackage):
depends_on("perl-module-runtime@0.002:", type=("run"))
depends_on("perl-moo@1.000001:", type=("run"))
depends_on("perl-sub-quote", type=("run"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Throwable; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-tie-ixhash/package.py b/var/spack/repos/builtin/packages/perl-tie-ixhash/package.py
new file mode 100644
index 0000000000..71557440fe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-tie-ixhash/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTieIxhash(PerlPackage):
+ """Ordered associative arrays for Perl"""
+
+ homepage = "https://metacpan.org/pod/Tie::IxHash"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Tie-IxHash-1.23.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.23", sha256="fabb0b8c97e67c9b34b6cc18ed66f6c5e01c55b257dcf007555e0b027d4caf56")
+
+ depends_on("perl@5.5.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-tie-toobject/package.py b/var/spack/repos/builtin/packages/perl-tie-toobject/package.py
new file mode 100644
index 0000000000..80a4ff6205
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-tie-toobject/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTieToobject(PerlPackage):
+ """Tie to an existing object."""
+
+ homepage = "https://metacpan.org/pod/Tie::ToObject"
+ url = "https://cpan.metacpan.org/authors/id/N/NU/NUFFIN/Tie-ToObject-0.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("0.03", sha256="a31a0d4430fe14f59622f31db7f25b2275dad2ec52f1040beb030d3e83ad3af4")
diff --git a/var/spack/repos/builtin/packages/perl-time-clock/package.py b/var/spack/repos/builtin/packages/perl-time-clock/package.py
index ade5d73ed6..b8cff2a1fd 100644
--- a/var/spack/repos/builtin/packages/perl-time-clock/package.py
+++ b/var/spack/repos/builtin/packages/perl-time-clock/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,11 +17,3 @@ class PerlTimeClock(PerlPackage):
version("1.03", sha256="35e8a8bbfcdb35d86dd4852a9cd32cfb455a9b42e22669186e920c8aca017aef")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Time::Clock; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-time-duration-parse/package.py b/var/spack/repos/builtin/packages/perl-time-duration-parse/package.py
new file mode 100644
index 0000000000..2dc6fc65b1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-time-duration-parse/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTimeDurationParse(PerlPackage):
+ """Parse string that represents time duration"""
+
+ homepage = "https://metacpan.org/pod/Time::Duration::Parse"
+ url = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Time-Duration-Parse-0.16.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="1084a6463ee2790f99215bd76b135ca45afe2bfa6998fa6fd5470b69e1babc12")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-time-duration", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-time-duration/package.py b/var/spack/repos/builtin/packages/perl-time-duration/package.py
new file mode 100644
index 0000000000..3c26ccfc9b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-time-duration/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTimeDuration(PerlPackage):
+ """Rounded or exact English expression of durations"""
+
+ homepage = "https://metacpan.org/pod/Time::Duration"
+ url = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Time-Duration-1.21.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.21", sha256="fe340eba8765f9263694674e5dff14833443e19865e5ff427bbd79b7b5f8a9b8")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-timedate/package.py b/var/spack/repos/builtin/packages/perl-timedate/package.py
index 8049cfe27c..d698a1630d 100644
--- a/var/spack/repos/builtin/packages/perl-timedate/package.py
+++ b/var/spack/repos/builtin/packages/perl-timedate/package.py
@@ -12,8 +12,15 @@ class PerlTimedate(PerlPackage):
modules by David Muir on CPAN."""
homepage = "https://metacpan.org/release/TimeDate"
- url = "https://cpan.metacpan.org/authors/id/G/GB/GBARR/TimeDate-2.30.tar.gz"
+ url = "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz"
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.33", sha256="c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2")
version("2.30", sha256="75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86")
+
+ def url_for_version(self, version):
+ if self.spec.satisfies("@2.31:"):
+ return f"https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-{version}.tar.gz"
+ else:
+ return f"https://cpan.metacpan.org/authors/id/G/GB/GBARR/TimeDate-{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/perl-tk/package.py b/var/spack/repos/builtin/packages/perl-tk/package.py
index f8410200cd..146b7260b1 100644
--- a/var/spack/repos/builtin/packages/perl-tk/package.py
+++ b/var/spack/repos/builtin/packages/perl-tk/package.py
@@ -18,6 +18,9 @@ class PerlTk(PerlPackage):
version("804.035", sha256="4d2b80291ba6de34d8ec886a085a6dbd2b790b926035a087e99025614c5ffdd4")
version("804.033", sha256="84756e9b07a2555c8eecf88e63d5cbbba9b1aa97b1e71a3d4aa524a7995a88ad")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl-extutils-makemaker", type="build")
depends_on("libx11")
depends_on("libxcb")
diff --git a/var/spack/repos/builtin/packages/perl-tree-simple-visitorfactory/package.py b/var/spack/repos/builtin/packages/perl-tree-simple-visitorfactory/package.py
new file mode 100644
index 0000000000..d04e727fb9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-tree-simple-visitorfactory/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTreeSimpleVisitorfactory(PerlPackage):
+ """A factory object for dispensing Visitor objects"""
+
+ homepage = "https://metacpan.org/pod/Tree::Simple::VisitorFactory"
+ url = "https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/Tree-Simple-VisitorFactory-0.16.tgz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.16", sha256="9cf538faa12c54ffb4a91439945e488f1856f62b89ac5072a922119e01880da6")
+
+ depends_on("perl-test-exception@0.15:", type=("build", "test"))
+ depends_on("perl-tree-simple@1.12:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-tree-simple/package.py b/var/spack/repos/builtin/packages/perl-tree-simple/package.py
new file mode 100644
index 0000000000..d91888fe92
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-tree-simple/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTreeSimple(PerlPackage):
+ """A simple tree object"""
+
+ homepage = "https://metacpan.org/pod/Tree::Simple"
+ url = "https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/Tree-Simple-1.34.tgz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.34", sha256="b7e9799bd222bb94cff993f7d765980cbea1b6cd2aaa5ecbead635abdf47d29c")
+
+ depends_on("perl-test-exception@0.15:", type=("build", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-type-tiny/package.py b/var/spack/repos/builtin/packages/perl-type-tiny/package.py
index 952e989509..2800625876 100644
--- a/var/spack/repos/builtin/packages/perl-type-tiny/package.py
+++ b/var/spack/repos/builtin/packages/perl-type-tiny/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -21,11 +20,3 @@ class PerlTypeTiny(PerlPackage):
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
depends_on("perl-exporter-tiny@1.006000:", type=("run"))
-
- def test_use(self):
- """Test 'use module'"""
- options = ["-we", 'use strict; use Type::Tiny; print("OK\n")']
-
- perl = self.spec["perl"].command
- out = perl(*options, output=str.split, error=str.split)
- assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-types-serialiser/package.py b/var/spack/repos/builtin/packages/perl-types-serialiser/package.py
new file mode 100644
index 0000000000..13292c4a9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-types-serialiser/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlTypesSerialiser(PerlPackage):
+ """Simple data types for common serialisation formats"""
+
+ homepage = "https://metacpan.org/pod/Types::Serialiser"
+ url = "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Types-Serialiser-1.01.tar.gz"
+
+ maintainers("EbiArnie")
+
+ version("1.01", sha256="f8c7173b0914d0e3d957282077b366f0c8c70256715eaef3298ff32b92388a80")
+
+ depends_on("perl-common-sense", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-universal-can/package.py b/var/spack/repos/builtin/packages/perl-universal-can/package.py
new file mode 100644
index 0000000000..59b1959dd6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-universal-can/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlUniversalCan(PerlPackage):
+ """Work around buggy code calling UNIVERSAL::can() as a function"""
+
+ homepage = "https://metacpan.org/pod/UNIVERSAL::can"
+ url = "https://cpan.metacpan.org/authors/id/C/CH/CHROMATIC/UNIVERSAL-can-1.20140328.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version(
+ "1.20140328", sha256="522da9f274786fe2cba99bc77cc1c81d2161947903d7fad10bd62dfb7f11990f"
+ )
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-universal-isa/package.py b/var/spack/repos/builtin/packages/perl-universal-isa/package.py
new file mode 100644
index 0000000000..91b3eed7a0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-universal-isa/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlUniversalIsa(PerlPackage):
+ """Attempt to recover from people calling UNIVERSAL::isa as a function"""
+
+ homepage = "https://metacpan.org/pod/UNIVERSAL::isa"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/UNIVERSAL-isa-1.20171012.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version(
+ "1.20171012", sha256="d16956036cb01c819dec7d294f6ef891be0bb64876989601354b293164da7f2b"
+ )
+
+ depends_on("perl@5.6.2:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-uri-find/package.py b/var/spack/repos/builtin/packages/perl-uri-find/package.py
new file mode 100644
index 0000000000..5f303d2ee7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-uri-find/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlUriFind(PerlPackage):
+ """Find URIs in arbitrary text"""
+
+ homepage = "https://metacpan.org/pod/URI::Find"
+ url = "https://cpan.metacpan.org/authors/id/M/MS/MSCHWERN/URI-Find-20160806.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("20160806", sha256="e213a425a51b5f55324211f37909d78749d0bacdea259ba51a9855d0d19663d6")
+
+ depends_on("perl@5.8.8:", type=("build", "link", "run", "test"))
+ depends_on("perl-uri@1.60:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-uri-ws/package.py b/var/spack/repos/builtin/packages/perl-uri-ws/package.py
new file mode 100644
index 0000000000..bed492854f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-uri-ws/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlUriWs(PerlPackage):
+ """WebSocket support for URI package"""
+
+ homepage = "https://metacpan.org/pod/URI::ws"
+ url = "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/URI-ws-0.03.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.03", sha256="6e6b0e4172acb6a53c222639c000608c2dd61d50848647482ac8600d50e541ef")
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-uri", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-uri/package.py b/var/spack/repos/builtin/packages/perl-uri/package.py
index 5ef474fd7f..0f28eab7e5 100644
--- a/var/spack/repos/builtin/packages/perl-uri/package.py
+++ b/var/spack/repos/builtin/packages/perl-uri/package.py
@@ -12,6 +12,8 @@ class PerlUri(PerlPackage):
homepage = "https://metacpan.org/pod/URI"
url = "http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/URI-1.72.tar.gz"
+ skip_modules = ["URI::urn::isbn"] # required missing Business::ISBN
+
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
version("5.08", sha256="7e2c6fe3b1d5947da334fa558a96e748aaa619213b85bcdce5b5347d4d26c46e")
diff --git a/var/spack/repos/builtin/packages/perl-www-form-urlencoded/package.py b/var/spack/repos/builtin/packages/perl-www-form-urlencoded/package.py
new file mode 100644
index 0000000000..435bda8df4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-www-form-urlencoded/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlWwwFormUrlencoded(PerlPackage):
+ """Parser and builder for application/x-www-form-urlencoded"""
+
+ homepage = "https://metacpan.org/pod/WWW::Form::UrlEncoded"
+ url = "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/WWW-Form-UrlEncoded-0.26.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.26", sha256="c0480b5f1f15b71163ec327b8e7842298f0cb3ace97e63d7034af1e94a2d90f4")
+
+ depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py b/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py
new file mode 100644
index 0000000000..06f1dd0ed5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-xml-hash-xs/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlXmlHashXs(PerlPackage):
+ """Simple and fast hash to XML and XML to hash conversion written in C"""
+
+ homepage = "https://metacpan.org/pod/XML::Hash::XS"
+ url = "https://cpan.metacpan.org/authors/id/Y/YO/YOREEK/XML-Hash-XS-0.56.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.56", sha256="be4c60ded94c5ebe53a81ef74928dfbec9613986d2a6056dd253665c6ae9802f")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-xml-libxml/package.py b/var/spack/repos/builtin/packages/perl-xml-libxml/package.py
index be125ef471..c789f96409 100644
--- a/var/spack/repos/builtin/packages/perl-xml-libxml/package.py
+++ b/var/spack/repos/builtin/packages/perl-xml-libxml/package.py
@@ -19,10 +19,16 @@ class PerlXmlLibxml(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.0210", sha256="a29bf3f00ab9c9ee04218154e0afc8f799bf23674eb99c1a9ed4de1f4059a48d")
+ version("2.0209", sha256="b4a5abbcd689aa2fbbc8b7b45339e961c4984e48108494eb6c282b4748222425")
version("2.0201", sha256="e008700732502b3f1f0890696ec6e2dc70abf526cd710efd9ab7675cae199bc2")
+ depends_on("c", type="build") # generated
+
depends_on("libxml2")
depends_on("perl-xml-namespacesupport", type=("build", "run"))
depends_on("perl-xml-sax", type=("build", "run"))
depends_on("perl-xml-sax-base", type=("build", "run"))
depends_on("perl-alien-libxml2", type="build")
+
+ conflicts("%gcc@14:", when="@:2.0209")
diff --git a/var/spack/repos/builtin/packages/perl-xml-libxslt/package.py b/var/spack/repos/builtin/packages/perl-xml-libxslt/package.py
index d096df2d5a..c16a3c83f8 100644
--- a/var/spack/repos/builtin/packages/perl-xml-libxslt/package.py
+++ b/var/spack/repos/builtin/packages/perl-xml-libxslt/package.py
@@ -13,7 +13,10 @@ class PerlXmlLibxslt(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.002001", sha256="df8927c4ff1949f62580d1c1e6f00f0cd56b53d3a957ee4b171b59bffa63b2c0")
version("1.96", sha256="2a5e374edaa2e9f9d26b432265bfea9b4bb7a94c9fbfef9047b298fce844d473")
+ depends_on("c", type="build") # generated
+
depends_on("libxslt")
depends_on("perl-xml-libxml")
diff --git a/var/spack/repos/builtin/packages/perl-xml-parser/package.py b/var/spack/repos/builtin/packages/perl-xml-parser/package.py
index 86e2027e0f..f199fd8073 100644
--- a/var/spack/repos/builtin/packages/perl-xml-parser/package.py
+++ b/var/spack/repos/builtin/packages/perl-xml-parser/package.py
@@ -14,6 +14,7 @@ class PerlXmlParser(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("2.47", sha256="ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8")
version("2.46", sha256="d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d")
version("2.44", sha256="1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216")
@@ -24,8 +25,8 @@ class PerlXmlParser(PerlPackage):
args = []
p = self.spec["expat"].prefix.lib
- args.append("EXPATLIBPATH={0}".format(p))
+ args.append(f"EXPATLIBPATH={p}")
p = self.spec["expat"].prefix.include
- args.append("EXPATINCPATH={0}".format(p))
+ args.append(f"EXPATINCPATH={p}")
return args
diff --git a/var/spack/repos/builtin/packages/perl-xml-semanticdiff/package.py b/var/spack/repos/builtin/packages/perl-xml-semanticdiff/package.py
new file mode 100644
index 0000000000..f2780c6547
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-xml-semanticdiff/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlXmlSemanticdiff(PerlPackage):
+ """Perl extension for comparing XML documents."""
+
+ homepage = "https://metacpan.org/pod/XML::SemanticDiff"
+ url = "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-SemanticDiff-1.0007.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.0007", sha256="05fdefefbbc3f6b62fc7c9b5fabafb6b695ed68f0a3d958577251d1f0402a0f5")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-xml-parser", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-xml-xpath/package.py b/var/spack/repos/builtin/packages/perl-xml-xpath/package.py
new file mode 100644
index 0000000000..124761b549
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-xml-xpath/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlXmlXpath(PerlPackage):
+ """Parse and evaluate XPath statements."""
+
+ homepage = "https://metacpan.org/pod/XML::XPath"
+ url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/XML-XPath-1.48.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-2.0")
+
+ version("1.48", sha256="7bc75be36b239e5b2e700a9570d2b53b43093d467f2abe6a743f9ff9093790cd")
+
+ depends_on("perl@5.10.1:", type=("build", "link", "run", "test"))
+ depends_on("perl-path-tiny@0.076:", type=("build", "link"))
+ depends_on("perl-xml-parser@2.23:", type=("build", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py b/var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py
index 9b2276c4cc..0e37d54ab1 100644
--- a/var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py
+++ b/var/spack/repos/builtin/packages/perl-yaml-libyaml/package.py
@@ -14,5 +14,8 @@ class PerlYamlLibyaml(PerlPackage):
license("GPL-1.0-or-later OR Artistic-1.0-Perl")
+ version("0.89", sha256="155ab83675345c50add03311acf9dd915955707f909a2abd8b17d7792859b2ec")
version("0.84", sha256="225bcb39be2d5e3d02df7888d5f99fd8712f048ba539b09232ca1481e70bfd05")
version("0.67", sha256="e65a22abc912a46a10abddf3b88d806757f44f164ab3167c8f0ff6aa30648187")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/perl-yaml-syck/package.py b/var/spack/repos/builtin/packages/perl-yaml-syck/package.py
new file mode 100644
index 0000000000..a58c078a9b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-yaml-syck/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PerlYamlSyck(PerlPackage):
+ """Fast, lightweight YAML loader and dumper"""
+
+ homepage = "https://metacpan.org/pod/YAML::Syck"
+ url = "https://cpan.metacpan.org/authors/id/T/TO/TODDR/YAML-Syck-1.34.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("MIT")
+
+ version("1.34", sha256="cc9156ccaebda798ebfe2f31b619e806577f860ed1704262f17ffad3c6e34159")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index 9bba259fa1..8b608e04d2 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -3,19 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-#
-# Author: Milton Woods <milton.woods@bom.gov.au>
-# Date: March 22, 2017
-# Author: George Hartzell <hartzell@alerce.com>
-# Date: July 21, 2016
-# Author: Justin Too <justin@doubleotoo.com>
-# Date: September 6, 2015
-#
import os
import re
import sys
from contextlib import contextmanager
+from llnl.util.filesystem import windows_sfn
from llnl.util.lang import match_predicate
from llnl.util.symlink import symlink
@@ -30,93 +23,151 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
homepage = "https://www.perl.org"
# URL must remain http:// so Spack can bootstrap curl
url = "http://www.cpan.org/src/5.0/perl-5.34.0.tar.gz"
- tags = ["windows"]
+ tags = ["windows", "build-tools"]
maintainers("LydDeb")
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
executables = [r"^perl(-?\d+.*)?$"]
# see https://www.cpan.org/src/README.html for
# explanation of version numbering scheme
- license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+ # Maintenance releases (even numbers)
+ version("5.40.0", sha256="c740348f357396327a9795d3e8323bafd0fe8a5c7835fc1cbaba0cc8dfe7161f")
+ version("5.38.2", sha256="a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e")
+ version("5.38.0", sha256="213ef58089d2f2c972ea353517dc60ec3656f050dcc027666e118b508423e517")
+ version("5.36.3", sha256="f2a1ad88116391a176262dd42dfc52ef22afb40f4c0e9810f15d561e6f1c726a")
+ version("5.36.1", sha256="68203665d8ece02988fc77dc92fccbb297a83a4bb4b8d07558442f978da54cc1")
+ version("5.36.0", sha256="e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a")
- # Maintenance releases (even numbers, preferred)
- version(
- "5.38.0",
- sha256="213ef58089d2f2c972ea353517dc60ec3656f050dcc027666e118b508423e517",
- preferred=True,
- )
- version(
- "5.36.1",
- sha256="68203665d8ece02988fc77dc92fccbb297a83a4bb4b8d07558442f978da54cc1",
- preferred=True,
- )
- version(
- "5.36.0",
- sha256="e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a",
- preferred=True,
- )
+ # End of life releases (deprecated)
version(
"5.34.1",
sha256="357951a491b0ba1ce3611263922feec78ccd581dddc24a446b033e25acf242a1",
- preferred=True,
+ deprecated=True,
)
version(
"5.34.0",
sha256="551efc818b968b05216024fb0b727ef2ad4c100f8cb6b43fab615fa78ae5be9a",
- preferred=True,
+ deprecated=True,
)
version(
"5.32.1",
sha256="03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c",
- preferred=True,
+ deprecated=True,
)
version(
"5.32.0",
sha256="efeb1ce1f10824190ad1cadbcccf6fdb8a5d37007d0100d2d9ae5f2b5900c0b4",
- preferred=True,
+ deprecated=True,
)
version(
"5.30.3",
sha256="32e04c8bb7b1aecb2742a7f7ac0eabac100f38247352a73ad7fa104e39e7406f",
- preferred=True,
+ deprecated=True,
)
version(
"5.30.2",
sha256="66db7df8a91979eb576fac91743644da878244cf8ee152f02cd6f5cd7a731689",
- preferred=True,
+ deprecated=True,
)
version(
"5.30.1",
sha256="bf3d25571ff1ee94186177c2cdef87867fd6a14aa5a84f0b1fb7bf798f42f964",
- preferred=True,
+ deprecated=True,
)
version(
"5.30.0",
sha256="851213c754d98ccff042caa40ba7a796b2cee88c5325f121be5cbb61bbf975f2",
- preferred=True,
+ deprecated=True,
+ )
+ version(
+ "5.28.0",
+ sha256="7e929f64d4cb0e9d1159d4a59fc89394e27fa1f7004d0836ca0d514685406ea8",
+ deprecated=True,
+ )
+ version(
+ "5.26.2",
+ sha256="572f9cea625d6062f8a63b5cee9d3ee840800a001d2bb201a41b9a177ab7f70d",
+ deprecated=True,
+ )
+ version(
+ "5.24.1",
+ sha256="e6c185c9b09bdb3f1b13f678999050c639859a7ef39c8cad418448075f5918af",
+ deprecated=True,
+ )
+ version(
+ "5.22.4",
+ sha256="ba9ef57c2b709f2dad9c5f6acf3111d9dfac309c484801e0152edbca89ed61fa",
+ deprecated=True,
+ )
+ version(
+ "5.22.3",
+ sha256="1b351fb4df7e62ec3c8b2a9f516103595b2601291f659fef1bbe3917e8410083",
+ deprecated=True,
+ )
+ version(
+ "5.22.2",
+ sha256="81ad196385aa168cb8bd785031850e808c583ed18a7901d33e02d4f70ada83c2",
+ deprecated=True,
+ )
+ version(
+ "5.22.1",
+ sha256="2b475d0849d54c4250e9cba4241b7b7291cffb45dfd083b677ca7b5d38118f27",
+ deprecated=True,
+ )
+ version(
+ "5.22.0",
+ sha256="0c690807f5426bbd1db038e833a917ff00b988bf03cbf2447fa9ffdb34a2ab3c",
+ deprecated=True,
+ )
+ version(
+ "5.20.3",
+ sha256="3524e3a76b71650ab2f794fd68e45c366ec375786d2ad2dca767da424bbb9b4a",
+ deprecated=True,
+ )
+ version(
+ "5.18.4",
+ sha256="01a4e11a9a34616396c4a77b3cef51f76a297e1a2c2c490ae6138bf0351eb29f",
+ deprecated=True,
+ )
+ version(
+ "5.16.3",
+ sha256="69cf08dca0565cec2c5c6c2f24b87f986220462556376275e5431cc2204dedb6",
+ deprecated=True,
)
# Development releases (odd numbers)
- version("5.37.9", sha256="9884fa8a4958bf9434b50f01cbfd187f9e2738f38fe1ae37f844e9950c5117c1")
- version("5.35.0", sha256="d6c0eb4763d1c73c1d18730664d43fcaf6100c31573c3b81e1504ec8f5b22708")
- version("5.33.3", sha256="4f4ba0aceb932e6cf7c05674d05e51ef759d1c97f0685dee65a8f3d190f737cd")
- version("5.31.7", sha256="d05c4e72128f95ef6ffad42728ecbbd0d9437290bf0f88268b51af011f26b57d")
- version("5.31.4", sha256="418a7e6fe6485cc713a86d1227ef112f0bb3f80322e3b715ffe42851d97804a5")
-
- # End of life releases
- version("5.28.0", sha256="7e929f64d4cb0e9d1159d4a59fc89394e27fa1f7004d0836ca0d514685406ea8")
- version("5.26.2", sha256="572f9cea625d6062f8a63b5cee9d3ee840800a001d2bb201a41b9a177ab7f70d")
- version("5.24.1", sha256="e6c185c9b09bdb3f1b13f678999050c639859a7ef39c8cad418448075f5918af")
- version("5.22.4", sha256="ba9ef57c2b709f2dad9c5f6acf3111d9dfac309c484801e0152edbca89ed61fa")
- version("5.22.3", sha256="1b351fb4df7e62ec3c8b2a9f516103595b2601291f659fef1bbe3917e8410083")
- version("5.22.2", sha256="81ad196385aa168cb8bd785031850e808c583ed18a7901d33e02d4f70ada83c2")
- version("5.22.1", sha256="2b475d0849d54c4250e9cba4241b7b7291cffb45dfd083b677ca7b5d38118f27")
- version("5.22.0", sha256="0c690807f5426bbd1db038e833a917ff00b988bf03cbf2447fa9ffdb34a2ab3c")
- version("5.20.3", sha256="3524e3a76b71650ab2f794fd68e45c366ec375786d2ad2dca767da424bbb9b4a")
- version("5.18.4", sha256="01a4e11a9a34616396c4a77b3cef51f76a297e1a2c2c490ae6138bf0351eb29f")
- version("5.16.3", sha256="69cf08dca0565cec2c5c6c2f24b87f986220462556376275e5431cc2204dedb6")
+ version("5.39.10", sha256="4b7ffb3e068583fa5c8413390c998b2c15214f205ce737acc485b40932b9f419")
+ version(
+ "5.37.9",
+ sha256="9884fa8a4958bf9434b50f01cbfd187f9e2738f38fe1ae37f844e9950c5117c1",
+ deprecated=True,
+ )
+ version(
+ "5.35.0",
+ sha256="d6c0eb4763d1c73c1d18730664d43fcaf6100c31573c3b81e1504ec8f5b22708",
+ deprecated=True,
+ )
+ version(
+ "5.33.3",
+ sha256="4f4ba0aceb932e6cf7c05674d05e51ef759d1c97f0685dee65a8f3d190f737cd",
+ deprecated=True,
+ )
+ version(
+ "5.31.7",
+ sha256="d05c4e72128f95ef6ffad42728ecbbd0d9437290bf0f88268b51af011f26b57d",
+ deprecated=True,
+ )
+ version(
+ "5.31.4",
+ sha256="418a7e6fe6485cc713a86d1227ef112f0bb3f80322e3b715ffe42851d97804a5",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
extendable = True
@@ -213,7 +264,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
@classmethod
def determine_version(cls, exe):
- perl = spack.util.executable.Executable(exe)
+ perl = Executable(exe)
output = perl("--version", output=str, error=str)
if output:
match = re.search(r"perl.*\(v([0-9.]+)\)", output)
@@ -224,7 +275,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
@classmethod
def determine_variants(cls, exes, version):
for exe in exes:
- perl = spack.util.executable.Executable(exe)
+ perl = Executable(exe)
output = perl("-V", output=str, error=str)
variants = ""
if output:
@@ -287,7 +338,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
args.append("CCTYPE=%s" % self.compiler.short_msvc_version)
else:
raise RuntimeError("Perl unsupported for non MSVC compilers on Windows")
- args.append("INST_TOP=%s" % self.prefix.replace("/", "\\"))
+ args.append("INST_TOP=%s" % windows_sfn(self.prefix.replace("/", "\\")))
args.append("INST_ARCH=\\$(ARCHNAME)")
if self.spec.satisfies("~shared"):
args.append("ALL_STATIC=%s" % "define")
@@ -368,6 +419,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
def build_test(self):
if sys.platform == "win32":
win32_dir = os.path.join(self.stage.source_path, "win32")
+ win32_dir = windows_sfn(win32_dir)
with working_dir(win32_dir):
nmake("test", ignore_quotes=True)
else:
@@ -376,6 +428,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
def install(self, spec, prefix):
if sys.platform == "win32":
win32_dir = os.path.join(self.stage.source_path, "win32")
+ win32_dir = windows_sfn(win32_dir)
with working_dir(win32_dir):
nmake("install", *self.nmake_arguments(), ignore_quotes=True)
else:
@@ -409,6 +462,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
if sys.platform == "win32":
maker = nmake
cpan_dir = join_path(self.stage.source_path, cpan_dir)
+ cpan_dir = windows_sfn(cpan_dir)
if "+cpanm" in spec:
with working_dir(cpan_dir):
perl = spec["perl"].command
@@ -451,10 +505,6 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
# Add variables for library directory
module.perl_lib_dir = dependent_spec.prefix.lib.perl5
- # Make the site packages directory for extensions,
- # if it does not exist already.
- mkdirp(module.perl_lib_dir)
-
def setup_build_environment(self, env):
if sys.platform == "win32":
env.append_path("PATH", self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pestpp/package.py b/var/spack/repos/builtin/packages/pestpp/package.py
index 9f9f4786c7..f4b0c5a75a 100644
--- a/var/spack/repos/builtin/packages/pestpp/package.py
+++ b/var/spack/repos/builtin/packages/pestpp/package.py
@@ -16,9 +16,14 @@ class Pestpp(CMakePackage):
homepage = "https://pesthomepage.org"
url = "https://github.com/usgs/pestpp/archive/5.0.5.tar.gz"
+ version("5.2.9", sha256="401db5eec509c6771cd509a43c1710ac76b1ebe533f4cbaa1df26375aa167e60")
version("5.2.3", sha256="6b86a7db863a034e730480046a4b7b4a8dc7cc798658a5404a961be379c05dc3")
version("5.0.5", sha256="b9695724758f69c1199371608b01419973bd1475b1788039a2fab6313f6ed67c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
depends_on("cmake@3.9:", type="build")
diff --git a/var/spack/repos/builtin/packages/petaca/package.py b/var/spack/repos/builtin/packages/petaca/package.py
index 4c78092b1a..1dd72a24dd 100644
--- a/var/spack/repos/builtin/packages/petaca/package.py
+++ b/var/spack/repos/builtin/packages/petaca/package.py
@@ -28,9 +28,16 @@ class Petaca(CMakePackage):
license("MIT")
version("develop", branch="master")
+ version("24.04", sha256="951a0ba3380502fa09009af8613471256bbcb4edc14fe810f7e3afe7adc21b7e")
+ version("23.12", sha256="8d7f1c7170500db52a624c891fb1563b8cfc322d138d935a5b4c6f12d9bdbd23")
+ version("23.11.1", sha256="5c0809965046be5391b476edf1bc0c80584c3bc4fc5ecbf915a2344c6c5b9914")
+ version("23.11", sha256="2230ea8e90ee00bd571c557be4f208077e1606310bef2e43a0257102cc875c45")
version("22.03", sha256="e6559e928c7cca6017ef0582c204eee775f6bb3f927f1c224c515c2ad574cc32")
version("21.03", commit="f17df95193ca1a3879687a59a91a123be25e3efa")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.3:", type="build")
depends_on("yajl@2.0.1:")
diff --git a/var/spack/repos/builtin/packages/petsc/0001-Handle-the-hipsparse-api-changes-for-rocm-6.0.patch b/var/spack/repos/builtin/packages/petsc/0001-Handle-the-hipsparse-api-changes-for-rocm-6.0.patch
new file mode 100644
index 0000000000..ed89687723
--- /dev/null
+++ b/var/spack/repos/builtin/packages/petsc/0001-Handle-the-hipsparse-api-changes-for-rocm-6.0.patch
@@ -0,0 +1,70 @@
+From 039f025988871b36b46867db67ea82c52a645409 Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Thu, 8 Feb 2024 09:35:38 +0000
+Subject: [PATCH] Handle the hipsparse api changes for rocm 6.0
+
+---
+ .../impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp b/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp
+index e6f878f..411b24e 100644
+--- a/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp
++++ b/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp
+@@ -1258,7 +1258,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Vec x)
+ /* Solve L*y = b */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray));
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* L Y = X */
+ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_L)); // hipsparseSpSV_solve() secretely uses the external buffer used in hipsparseSpSV_analysis()!
+ #else
+@@ -1267,7 +1267,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Vec x)
+ #endif
+ /* Solve U*x = y */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_U, /* U X = Y */
+ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_U));
+ #else
+@@ -1316,7 +1316,7 @@ static PetscErrorCode MatSolveTranspose_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Ve
+ /* Solve Ut*y = b */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray));
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_U, /* Ut Y = X */
+ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Ut));
+ #else
+@@ -1325,7 +1325,7 @@ static PetscErrorCode MatSolveTranspose_SeqAIJHIPSPARSE_ILU0(Mat fact, Vec b, Ve
+ #endif
+ /* Solve Lt*x = y */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* Lt X = Y */
+ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Lt));
+ #else
+@@ -1559,7 +1559,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ICC0(Mat fact, Vec b, Vec x)
+ /* Solve L*y = b */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, (void *)barray));
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_Y, fs->Y));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* L Y = X */
+ fs->dnVecDescr_X, fs->dnVecDescr_Y, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_L));
+ #else
+@@ -1568,7 +1568,7 @@ static PetscErrorCode MatSolve_SeqAIJHIPSPARSE_ICC0(Mat fact, Vec b, Vec x)
+ #endif
+ /* Solve Lt*x = y */
+ PetscCallHIPSPARSE(hipsparseDnVecSetValues(fs->dnVecDescr_X, xarray));
+- #if PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061) // i.e., 5.6.0
++ #if (PETSC_PKG_HIP_VERSION_EQ(5, 6, 31061)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32830)||PETSC_PKG_HIP_VERSION_EQ(6, 0, 32831))
+ PetscCallHIPSPARSE(hipsparseSpSV_solve(fs->handle, HIPSPARSE_OPERATION_TRANSPOSE, &PETSC_HIPSPARSE_ONE, fs->spMatDescr_L, /* Lt X = Y */
+ fs->dnVecDescr_Y, fs->dnVecDescr_X, hipsparse_scalartype, HIPSPARSE_SPSV_ALG_DEFAULT, fs->spsvDescr_Lt));
+ #else
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 5a4c011002..da0e3d0be3 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import llnl.util.tty as tty
+
from spack.package import *
@@ -21,7 +23,20 @@ class Petsc(Package, CudaPackage, ROCmPackage):
tags = ["e4s"]
version("main", branch="main")
-
+ version("3.22.2", sha256="83624de0178b42d37ca1f7f905e1093556c6919fe5accd3e9f11d00a66e11256")
+ version("3.22.1", sha256="7117d3ae6827f681ed9737939d4e86896b4751e27cca941bb07e5703f19a0a7b")
+ version("3.22.0", sha256="2c03f7c0f7ad2649240d4989355cf7fb7f211b75156cd7d424e1d9dd7dfb290b")
+ version("3.21.6", sha256="cb2dc00742a89cf8acf9ff8aae189e6864e8b90f4997f087be6e54ff39c30d74")
+ version("3.21.5", sha256="4eb1ec04c1a8988bd524f71f8d7d980dc1853d5be8791c0f19f3c09eef71fdd2")
+ version("3.21.4", sha256="a9ae076d4617c7d84ce2bed37194022319c19f19b3930edf148b2bc8ecf2248d")
+ version("3.21.3", sha256="6d9ceb99d84d275250c614192dad45955d4a7610e12d8292a07dc49403556d26")
+ version("3.21.2", sha256="a1ac62b6204bdf2f7f9b637abf45e6cff24d372d4d3d3702c50e157bdb56eb21")
+ version("3.21.1", sha256="7ff8b692bceb7d7a8f51e2f45ccb20af00ba9395d7e1eee8816d46eb1c4c4b27")
+ version("3.21.0", sha256="1e0c2f92514c72f80d4a4d0e6439a3aba0ceda7a0bcbc7ad9c44ce4cd8b14c28")
+ version("3.20.6", sha256="20e6c260765f9593924bc5b1783bd152ec5c47246b47ce516cded7b505b34795")
+ version("3.20.5", sha256="fb4e637758737af910b05f30a785245633916cd0a929b7b6447ad1028da4ea5a")
+ version("3.20.4", sha256="b0d03a5595ee0a5696dd6683321e1dbfe9fea85238d3016a847b3d0bcdcfb3d9")
+ version("3.20.3", sha256="75a94fb44df0512f51ad093fa784e56b61f51b7ead5956fbe49185c203f8c245")
version("3.20.2", sha256="2a2d08b5f0e3d0198dae2c42ce1fd036f25c153ef2bb4a2d320ca141ac7cd30b")
version("3.20.1", sha256="3d54f13000c9c8ceb13ca4f24f93d838319019d29e6de5244551a3ec22704f32")
version("3.20.0", sha256="c152ccb12cb2353369d27a65470d4044a0c67e0b69814368249976f5bb232bd4")
@@ -84,6 +99,10 @@ class Petsc(Package, CudaPackage, ROCmPackage):
version("3.11.1", sha256="cb627f99f7ce1540ebbbf338189f89a5f1ecf3ab3b5b0e357f9e46c209f1fb23")
version("3.11.0", sha256="b3bed2a9263193c84138052a1b92d47299c3490dd24d1d0bf79fb884e71e678a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant("mpi", default=True, description="Activates MPI support")
variant("double", default=True, description="Switches between single and double precision")
@@ -170,8 +189,22 @@ class Petsc(Package, CudaPackage, ROCmPackage):
when="@3.20.0",
sha256="ba327f8b2a0fa45209dfb7a4278f3e9a323965b5a668be204c1c77c17a963a7f",
)
+ patch(
+ "https://gitlab.com/petsc/petsc/-/commit/20d5ecbf88175ced320006c488dcefa2efb1e67f.diff",
+ when="@3.21 ^hip@6:",
+ sha256="2904ea20c71e2f21b8475513c3e5de7465e328e2485ae706b003aa79314e3e7c",
+ )
+ patch(
+ "https://gitlab.com/petsc/petsc/-/commit/bdb83d9f3e3c55b3bd4c8732bfe2066c23f10f61.diff",
+ when="@3.21 ^hip@6:",
+ sha256="89cf2c9a01d4a3233c889dd98496a29bf43db1bc69195892f9e5405c537b87e3",
+ )
patch("hip-5.6.0-for-3.18.diff", when="@3.18:3.19 ^hipsparse@5.6.0")
patch("hip-5.7-plus-for-3.18.diff", when="@3.18:3.19 ^hipsparse@5.7:")
+ patch(
+ "0001-Handle-the-hipsparse-api-changes-for-rocm-6.0.patch",
+ when="@3.20.2:3.20.4 ^hipsparse@6.0",
+ )
# 3.8.0 has a build issue with MKL - so list this conflict explicitly
conflicts("^intel-mkl", when="@3.8.0")
@@ -221,7 +254,7 @@ class Petsc(Package, CudaPackage, ROCmPackage):
# Virtual dependencies
# Git repository needs sowing to build Fortran interface
- depends_on("sowing", when="@main")
+ depends_on("sowing@master", when="@main")
# PETSc, hypre, superlu_dist when built with int64 use 32 bit integers
# with BLAS/LAPACK
@@ -229,9 +262,14 @@ class Petsc(Package, CudaPackage, ROCmPackage):
depends_on("lapack")
depends_on("mpi", when="+mpi")
depends_on("cuda", when="+cuda")
+ # Fixed in https://gitlab.com/petsc/petsc/-/merge_requests/7354
+ conflicts(
+ "^cuda@12.4:", when="@:3.20.5 +cuda", msg="Deprecation in CCCL 2.3 causes build failure."
+ )
depends_on("hip", when="+rocm")
with when("+rocm"):
+ depends_on("rocm-core")
depends_on("hipblas")
depends_on("hipsparse")
depends_on("hipsolver")
@@ -242,10 +280,11 @@ class Petsc(Package, CudaPackage, ROCmPackage):
depends_on("rocthrust")
depends_on("rocprim")
- # Build dependencies
- depends_on("python@2.6:2.8,3.4:3.8", when="@:3.13", type="build")
- depends_on("python@2.6:2.8,3.4:", when="@3.14:3.17", type="build")
- depends_on("python@3.4:", when="@3.18:", type="build")
+ with default_args(type="build"):
+ depends_on("python@2.6:2.8,3.4:")
+ depends_on("python@3.4:", when="@3.18:")
+ depends_on("python@:3.8", when="@:3.13")
+ depends_on("python@:3.12", when="@:3.21") # import xdrlib
# Other dependencies
depends_on("metis@5:~int64+real64", when="@:3.7+metis~int64+double")
@@ -336,7 +375,10 @@ class Petsc(Package, CudaPackage, ROCmPackage):
depends_on("libyaml", when="+libyaml")
depends_on("hwloc", when="+hwloc")
depends_on("kokkos", when="+kokkos")
+ depends_on("kokkos~complex_align", when="+kokkos+complex")
depends_on("kokkos-kernels", when="+kokkos")
+ conflicts("kokkos@4.5:", when="@:3.22")
+ conflicts("kokkos-kernels@4.5:", when="@:3.22")
for cuda_arch in CudaPackage.cuda_arch_values:
depends_on(
"kokkos+cuda+cuda_lambda cuda_arch=%s" % cuda_arch,
@@ -476,6 +518,9 @@ class Petsc(Package, CudaPackage, ROCmPackage):
else:
hdf5libs = ":hl"
+ if "+exodusii+fortran" in spec and "+fortran" in spec:
+ options.append("--with-exodusii-fortran-bindings")
+
# tuple format (spacklibname, petsclibname, useinc, uselib)
# default: 'gmp', => ('gmp', 'gmp', True, True)
# any other combination needs a full tuple
@@ -502,7 +547,7 @@ class Petsc(Package, CudaPackage, ROCmPackage):
True,
),
("hdf5" + hdf5libs, "hdf5", True, True),
- "zlib",
+ ("zlib-api", "zlib", True, True),
"mumps",
("trilinos", "trilinos", False, False),
("fftw:mpi", "fftw", True, True),
@@ -515,7 +560,7 @@ class Petsc(Package, CudaPackage, ROCmPackage):
("parallel-netcdf", "pnetcdf", True, True),
("moab", "moab", False, False),
("random123", "random123", False, False),
- "exodusii",
+ ("exodusii", "exodusii", False, False),
"cgns",
"memkind",
"p4est",
@@ -581,7 +626,7 @@ class Petsc(Package, CudaPackage, ROCmPackage):
hip_arch = spec.variants["amdgpu_target"].value
options.append("--with-hip-arch={0}".format(hip_arch[0]))
hip_pkgs = ["hipsparse", "hipblas", "hipsolver", "rocsparse", "rocsolver", "rocblas"]
- hip_ipkgs = hip_pkgs + ["rocthrust", "rocprim"]
+ hip_ipkgs = hip_pkgs + ["rocthrust", "rocprim", "rocm-core"]
hip_lpkgs = hip_pkgs
if spec.satisfies("^rocrand@5.1:"):
hip_ipkgs.extend(["rocrand"])
@@ -599,6 +644,10 @@ class Petsc(Package, CudaPackage, ROCmPackage):
if "superlu-dist" in spec:
if spec.satisfies("@3.10.3:3.15"):
options.append("--with-cxx-dialect=C++11")
+ if spec["superlu-dist"].satisfies("+rocm"):
+ # Suppress HIP header warning message, otherwise the PETSc
+ # configuration fails:
+ options.append("CXXPPFLAGS=-DROCM_NO_WRAPPER_HEADER_WARNING")
if "+mkl-pardiso" in spec:
options.append("--with-mkl_pardiso-dir=%s" % spec["mkl"].prefix)
@@ -673,8 +722,9 @@ class Petsc(Package, CudaPackage, ROCmPackage):
tty.warn("Stand-alone tests only available for v3.13:")
return
- self.cache_extra_test_sources(
- [join_path("src", "ksp", "ksp", "tutorials"), join_path("src", "snes", "tutorials")]
+ cache_extra_test_sources(
+ self,
+ [join_path("src", "ksp", "ksp", "tutorials"), join_path("src", "snes", "tutorials")],
)
def get_runner(self):
diff --git a/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch b/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch
new file mode 100644
index 0000000000..2a2f6e7716
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch
@@ -0,0 +1,11 @@
+diff -Nur spack-src.org/fortran/CMakeLists.txt spack-src/fortran/CMakeLists.txt
+--- spack-src.org/fortran/CMakeLists.txt 2023-06-06 17:55:44.000000000 +0900
++++ spack-src/fortran/CMakeLists.txt 2023-06-06 15:50:05.000000000 +0900
+@@ -47,6 +47,7 @@
+
+ endmacro()
+
++set (CMAKE_EXE_LINKER_FLAGS "--linkfortran")
+
+ add_pexsi_f_example_exe( f_driver_ksdft )
+ add_pexsi_f_example_exe( f_driver_pselinv_real )
diff --git a/var/spack/repos/builtin/packages/pexsi/package.py b/var/spack/repos/builtin/packages/pexsi/package.py
index 88728a5c5e..04d1350d5e 100644
--- a/var/spack/repos/builtin/packages/pexsi/package.py
+++ b/var/spack/repos/builtin/packages/pexsi/package.py
@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
-import os.path
-
import spack.build_systems.cmake
import spack.build_systems.makefile
from spack.package import *
@@ -38,6 +35,12 @@ class Pexsi(MakefilePackage, CMakePackage):
version("0.10.2", sha256="8714c71b76542e096211b537a9cb1ffb2c28f53eea4f5a92f94cc1ca1e7b499f")
version("0.9.0", sha256="e5efe0c129013392cdac3234e37f1f4fea641c139b1fbea47618b4b839d05029")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ patch("fujitsu-add-link-flags.patch", when="%fj")
+
depends_on("parmetis")
depends_on("superlu-dist@5.1.2:5.3", when="@0.10.2:0")
depends_on("superlu-dist@:6.1.0", when="@1") # Upper limit from CP2K toolchain
@@ -88,7 +91,7 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
substitutions.append(("@FLDFLAGS", fldflags.lstrip()))
- template = join_path(os.path.dirname(inspect.getmodule(self).__file__), "make.inc")
+ template = join_path(os.path.dirname(__file__), "make.inc")
makefile = join_path(pkg.stage.source_path, "make.inc")
copy(template, makefile)
for key, value in substitutions:
@@ -123,4 +126,8 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("PEXSI_ENABLE_FORTRAN", "fortran"),
self.define_from_variant("PEXSI_ENABLE_OPENMP ", "openmp"),
]
+
+ if self.spec.satisfies("%fj"):
+ args.append(self.define("BLAS_LIBRARIES", self.spec["blas"].libs.link_flags))
+
return args
diff --git a/var/spack/repos/builtin/packages/pfapack/package.py b/var/spack/repos/builtin/packages/pfapack/package.py
index a86549949c..bcc5a87594 100644
--- a/var/spack/repos/builtin/packages/pfapack/package.py
+++ b/var/spack/repos/builtin/packages/pfapack/package.py
@@ -19,6 +19,10 @@ class Pfapack(MakefilePackage):
"2014-09-17", sha256="b68fc35dda23ee24c358641b1a92ef701c4ffa0b3f0b0808b24e68afeb58ef07"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
parallel = False
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/pfft/package.py b/var/spack/repos/builtin/packages/pfft/package.py
index 4a9796067f..f2545593b5 100644
--- a/var/spack/repos/builtin/packages/pfft/package.py
+++ b/var/spack/repos/builtin/packages/pfft/package.py
@@ -23,6 +23,9 @@ class Pfft(AutotoolsPackage):
"1.0.8-alpha", sha256="6c43960ad72fcff7e49b87c604c5f471fb5890f1bd11ce750ab52f035e7c5317"
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("fftw+mpi+pfft_patches")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/pflask/package.py b/var/spack/repos/builtin/packages/pflask/package.py
index f7831f6140..392edadf67 100644
--- a/var/spack/repos/builtin/packages/pflask/package.py
+++ b/var/spack/repos/builtin/packages/pflask/package.py
@@ -16,3 +16,5 @@ class Pflask(CMakePackage):
version("0.2", sha256="dabbd060d1c50174de5fffae9ec97dc1d41b22de898a8280166cba768c940ebd")
version("0.1", sha256="3c41c670fd8c48b7b6a41d697b444df8bf95380937ba4f734b41af135d5c5816")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/pflogger/package.py b/var/spack/repos/builtin/packages/pflogger/package.py
index 2075ec9252..7271a1b946 100644
--- a/var/spack/repos/builtin/packages/pflogger/package.py
+++ b/var/spack/repos/builtin/packages/pflogger/package.py
@@ -22,6 +22,12 @@ class Pflogger(CMakePackage):
version("develop", branch="develop")
version("main", branch="main")
+ version("1.15.0", sha256="454f05731a3ba50c7ae3ef9463b642c53248ae84ccb3b93455ef2ae2b6858235")
+ version("1.14.0", sha256="63422493136f66f61d5148b7b1d278b1e5ca76bd37c578e45e4ae0e967351823")
+ version("1.13.2", sha256="934e573134f7f1a22b14eb582ea38dd68eb9dccb10526bfabe51229efe106352")
+ version("1.13.1", sha256="d2246d1bf3e5186045ae84c52656168856f693f743700f473cf3d1c99eecae02")
+ version("1.13.0", sha256="d46b61162496e227d2982bcdfe9b2c8af6a5734d0fbad9305b1a1547abeac06e")
+ version("1.12.0", sha256="ff29b0ce4baf50675edb69c3c7493be5410839b5f81e3ce5405f04925503fb0d")
version("1.11.0", sha256="bf197b6f223a75c7d3eee23888cdde204b5aea053c308852a3f8f677784b8899")
version("1.10.0", sha256="8e25564699c0adcbe9a23fded6637668ce659480b39420be5a4c8181cd44ad53")
version("1.9.5", sha256="baa3ebb83962f1b6c8c5b0413fe9d02411d3e379c76b8c190112e158c10ac0ac")
@@ -32,6 +38,8 @@ class Pflogger(CMakePackage):
version("1.8.0", sha256="28ce9ac8af374253b6dfd8f53f8fd271c787d432645ec9bc6a5a01601dc56e19")
version("1.6.1", sha256="114a15daa7994ab7d4eea463c3a9b8fe7df3da7d07a0004b5c40cf155e374916")
+ depends_on("fortran", type="build")
+
variant(
"build_type",
default="Release",
@@ -56,6 +64,16 @@ class Pflogger(CMakePackage):
depends_on("mpi", when="+mpi")
+ # Using pFlogger with MPICH 4 is only supported from version 1.11
+ conflicts("^mpich@4:", when="@:1.10")
+
+ # pflogger only works with the Fujitsu compiler from 1.13.0 onwards
+ conflicts(
+ "%fj",
+ when="@:1.12",
+ msg="pFlogger only works with the Fujitsu compiler from version 1.13.0 onwards",
+ )
+
depends_on("cmake@3.12:", type="build")
def cmake_args(self):
@@ -65,4 +83,10 @@ class Pflogger(CMakePackage):
if spec.satisfies("+mpi"):
args.extend(["-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc])
+ # From version 1.12 on, there is an `ENABLE_MPI` option that
+ # defaults to `ON`. If we don't want MPI, we need to set it to
+ # `OFF`
+ if spec.satisfies("@1.12: ~mpi"):
+ args.append("-DENABLE_MPI=OFF")
+
return args
diff --git a/var/spack/repos/builtin/packages/pflotran/package.py b/var/spack/repos/builtin/packages/pflotran/package.py
index 71ff9d1b94..8d53304067 100644
--- a/var/spack/repos/builtin/packages/pflotran/package.py
+++ b/var/spack/repos/builtin/packages/pflotran/package.py
@@ -23,23 +23,19 @@ class Pflotran(AutotoolsPackage):
version("5.0.0", commit="f0fe931c72c03580e489724afeb8c5451406b942") # tag v5.0.0
version("4.0.1", commit="fd351a49b687e27f46eae92e9259156eea74897d") # tag v4.0.1
version("3.0.2", commit="9e07f416a66b0ad304c720b61aa41cba9a0929d5") # tag v3.0.2
- version("xsdk-0.6.0", commit="46e14355c1827c057f2e1b3e3ae934119ab023b2")
- version("xsdk-0.5.0", commit="98a959c591b72f73373febf5f9735d2c523b4c20")
- version("xsdk-0.4.0", commit="c851cbc94fc56a32cfdb0678f3c24b9936a5584e")
- version("xsdk-0.3.0", branch="release/xsdk-0.3.0")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("rxn", default=False, description="Use inbuilt reaction code, useful with cray ftn")
depends_on("mpi")
depends_on("hdf5@1.8.12:+mpi+fortran+hl")
depends_on("petsc@main:+hdf5+metis", when="@develop")
- depends_on("petsc@3.20:+hdf5+metis", when="@5.0.0")
+ depends_on("petsc@3.20:3.21+hdf5+metis", when="@5.0.0")
depends_on("petsc@3.18:+hdf5+metis", when="@4.0.1")
depends_on("petsc@3.16:+hdf5+metis", when="@3.0.2")
- depends_on("petsc@3.14:+hdf5+metis", when="@xsdk-0.6.0")
- depends_on("petsc@3.12:+hdf5+metis", when="@xsdk-0.5.0")
- depends_on("petsc@3.10:+hdf5+metis", when="@xsdk-0.4.0")
- depends_on("petsc@3.8.0:+hdf5+metis", when="@xsdk-0.3.0")
# https://github.com/spack/spack/pull/37579#issuecomment-1545998141
conflicts("^hdf5@1.14.1", when="%oneapi")
@@ -51,10 +47,6 @@ class Pflotran(AutotoolsPackage):
else:
make("all")
- @property
- def parallel(self):
- return self.spec.satisfies("@xsdk-0.4.0:")
-
def flag_handler(self, name, flags):
if "%gcc@10:" in self.spec and name == "fflags":
flags.append("-fallow-argument-mismatch")
diff --git a/var/spack/repos/builtin/packages/pfunit/package.py b/var/spack/repos/builtin/packages/pfunit/package.py
index ac19168b50..a635dd96ec 100644
--- a/var/spack/repos/builtin/packages/pfunit/package.py
+++ b/var/spack/repos/builtin/packages/pfunit/package.py
@@ -19,6 +19,8 @@ class Pfunit(CMakePackage):
maintainers("mathomp4", "tclune")
+ version("4.10.0", sha256="ee5e899dfb786bac46e3629b272d120920bafdb7f6a677980fc345f6acda0f99")
+ version("4.9.0", sha256="caea019f623d4e02dd3e8442cee88e6087b4c431a2628e9ec2de55b527b51ab6")
version("4.8.0", sha256="b5c66ab949fd23bee5c3b4d93069254f7ea40decb8d21f622fd6aa45ee68ef10")
version("4.7.4", sha256="ac850e33ea99c283f503f75293bf238b4b601885d7adba333066e6185dad5c04")
version("4.7.3", sha256="247239298b55e847417b7830183d7fc62cca93dc92c8ec7c0067784b7ce34544")
@@ -76,6 +78,9 @@ class Pfunit(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("mpi", default=False, description="Enable MPI")
variant(
"use_comm_world",
@@ -112,6 +117,7 @@ class Pfunit(CMakePackage):
depends_on("mpi", when="+mpi")
depends_on("esmf", when="+esmf")
depends_on("m4", when="@4.1.5:", type="build")
+ depends_on("fargparse@1.8.0:", when="@4.10.0:")
depends_on("fargparse", when="@4:")
depends_on("cmake@3.12:", type="build")
@@ -125,6 +131,11 @@ class Pfunit(CMakePackage):
conflicts("%gcc@:8.3.9", when="@4.0.0:", msg="pFUnit requires GCC 8.4.0 or newer")
+ # pfunit only works with the Fujitsu compiler from 4.9.0 onwards
+ conflicts(
+ "%fj", when="@:4.8.0", msg="pfunit only works with the Fujitsu compiler from 4.9.0 onwards"
+ )
+
patch("mpi-test.patch", when="+use_comm_world")
def patch(self):
@@ -152,7 +163,6 @@ class Pfunit(CMakePackage):
def cmake_args(self):
spec = self.spec
args = [
- self.define("Python_EXECUTABLE", spec["python"].command),
self.define("BUILD_SHARED_LIBS", False),
self.define("CMAKE_Fortran_MODULE_DIRECTORY", spec.prefix.include),
self.define_from_variant("ENABLE_BUILD_DOXYGEN", "docs"),
@@ -215,7 +225,6 @@ class Pfunit(CMakePackage):
"%gcc": "GNU",
"%clang": "GNU",
"%intel": "Intel",
- "%pgi": "PGI",
"%nag": "NAG",
"%cce": "Cray",
}
diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py
deleted file mode 100644
index 995e27ee39..0000000000
--- a/var/spack/repos/builtin/packages/pgi/package.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2013-2024 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.package import *
-from spack.util.prefix import Prefix
-
-
-class Pgi(Package):
- """PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows
- with support for debugging and profiling of local MPI processes.
-
- Note: The PGI compilers are licensed software. You will need to create an
- account on the PGI homepage and download PGI yourself. Spack will search
- your current directory for the download tarball. Alternatively, add this
- file to a mirror so that Spack can find it. For instructions on how to
- set up a mirror, see https://spack.readthedocs.io/en/latest/mirrors.html"""
-
- homepage = "https://www.pgroup.com/"
- manual_download = True
-
- version("20.4", sha256="f3ecc2104b304cd5c8b20e3ffdb5da88f2b5f7cc148e8daf00561928a5cbbc2e")
- version("19.10", sha256="ac9db73ba80a66fe3bc875f63aaa9e16f54674a4e88b25416432430ba8cf203d")
- version("19.7", sha256="439692aeb51eff464b968c3bfed4536ed7bd3ba6f8174bc0ebe2219a78fe62ae")
- version("19.4", sha256="23eee0d4da751dd6f247d624b68b03538ebd172e63a053c41bb67013f07cf68e")
- version("19.1", sha256="3e05a6db2bf80b5d15f6ff83188f20cb89dc23e233417921e5c0822e7e57d34f")
- version("18.10", sha256="4b3ff83d2a13de6001bed599246eff8e63ef711b8952d4a9ee12efd666b3e326")
- version("18.4", sha256="81e0dcf6000b026093ece180d42d77854c23269fb8409cedcf51c674ca580a0f")
- version("17.10", sha256="9da8f869fb9b70c0c4423c903d40a9e22d54b997af359a43573c0841165cd1b6")
- version("17.4", sha256="115c212d526695fc116fe44f1e722793e60b6f7d1b341cd7e77a95da8e7f6c34")
-
- variant("network", default=True, description="Perform a network install")
- variant("single", default=False, description="Perform a single system install")
- variant(
- "nvidia", default=False, description="Enable installation of optional NVIDIA components"
- )
- variant("amd", default=False, description="Enable installation of optional AMD components")
- variant("java", default=False, description="Enable installation of Java Runtime Environment")
- variant("mpi", default=False, description="Enable installation of Open MPI")
-
- # Licensing
- license_required = True
- license_comment = "#"
- license_files = ["license.dat"]
- license_vars = ["PGROUPD_LICENSE_FILE", "LM_LICENSE_FILE"]
- license_url = "http://www.pgroup.com/doc/pgiinstall.pdf"
-
- def url_for_version(self, version):
- if int(str(version.up_to(1))) <= 17:
- return "file://{0}/pgilinux-20{1}-{2}-x86_64.tar.gz".format(
- os.getcwd(), version.up_to(1), version.joined
- )
- else:
- return "file://{0}/pgilinux-20{1}-{2}-x86-64.tar.gz".format(
- os.getcwd(), version.up_to(1), version.joined
- )
-
- def install(self, spec, prefix):
- # Enable the silent installation feature
- os.environ["PGI_SILENT"] = "true"
- os.environ["PGI_ACCEPT_EULA"] = "accept"
- os.environ["PGI_INSTALL_DIR"] = prefix
-
- if "+network" in spec and "~single" in spec:
- os.environ["PGI_INSTALL_TYPE"] = "network"
- os.environ["PGI_INSTALL_LOCAL_DIR"] = "%s/%s/share_objects" % (prefix, self.version)
- elif "+single" in spec and "~network" in spec:
- os.environ["PGI_INSTALL_TYPE"] = "single"
- else:
- msg = "You must choose either a network install or a single "
- msg += "system install.\nYou cannot choose both."
- raise RuntimeError(msg)
-
- if "+nvidia" in spec:
- os.environ["PGI_INSTALL_NVIDIA"] = "true"
-
- if "+amd" in spec:
- os.environ["PGI_INSTALL_AMD"] = "true"
-
- if "+java" in spec:
- os.environ["PGI_INSTALL_JAVA"] = "true"
-
- if "+mpi" in spec:
- os.environ["PGI_INSTALL_MPI"] = "true"
-
- # Run install script
- os.system("./install")
-
- def setup_run_environment(self, env):
- prefix = Prefix(join_path(self.prefix, "linux86-64", self.version))
-
- env.prepend_path("PATH", prefix.bin)
- env.prepend_path("MANPATH", prefix.man)
- env.prepend_path("LD_LIBRARY_PATH", prefix.lib)
- env.set("CC", join_path(prefix.bin, "pgcc"))
- env.set("CXX", join_path(prefix.bin, "pgc++"))
- env.set("F77", join_path(prefix.bin, "pgfortran"))
- env.set("FC", join_path(prefix.bin, "pgfortran"))
-
- if "+mpi" in self.spec:
- ompi_dir = os.listdir(prefix.mpi)[0]
- env.prepend_path("PATH", join_path(prefix.mpi, ompi_dir, "bin"))
- env.prepend_path("LD_LIBRARY_PATH", join_path(prefix.mpi, ompi_dir, "lib"))
- env.prepend_path("C_INCLUDE_PATH", join_path(prefix.mpi, ompi_dir, "include"))
- env.prepend_path("MANPATH", join_path(prefix.mpi, ompi_dir, "share/man"))
diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py
index 4821370345..f3204fc95f 100644
--- a/var/spack/repos/builtin/packages/pgplot/package.py
+++ b/var/spack/repos/builtin/packages/pgplot/package.py
@@ -28,6 +28,9 @@ class Pgplot(MakefilePackage):
sha256="a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Replace hard-coded compilers and options by tokens, so that Spack can
# edit the file more easily
patch("g77_gcc.conf.patch")
diff --git a/var/spack/repos/builtin/packages/ph5concat/package.py b/var/spack/repos/builtin/packages/ph5concat/package.py
new file mode 100644
index 0000000000..949d86d24b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ph5concat/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Ph5concat(AutotoolsPackage):
+ """Parallel Data Concatenation for High Energy Physics Data Analysis"""
+
+ homepage = "https://github.com/NU-CUCIS/ph5concat"
+ url = "https://github.com/NU-CUCIS/ph5concat/archive/v1.1.0.tar.gz"
+
+ maintainers("vhewes")
+
+ version("1.1.0", sha256="cecc22325a56771cda1fc186e6bd1f9bde2957beca3fa9a387d55462efd5254f")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ depends_on("zlib")
+ depends_on("hdf5+hl+mpi@1.10.4:1.12")
+ depends_on("mpich")
+
+ variant("profiling", default=False, description="Enable profiling support")
+
+ def setup_build_environment(self, env):
+ env.set("LIBS", "-ldl -lz")
+
+ def configure_args(self):
+ args = [f"--with-{pkg}={self.spec[pkg].prefix}" for pkg in ("hdf5", "mpich")]
+ args.extend(self.enable_or_disable("profiling"))
+ return args
diff --git a/var/spack/repos/builtin/packages/phast/package.py b/var/spack/repos/builtin/packages/phast/package.py
index 5626a79f69..4e35bc6d1c 100644
--- a/var/spack/repos/builtin/packages/phast/package.py
+++ b/var/spack/repos/builtin/packages/phast/package.py
@@ -18,6 +18,8 @@ class Phast(MakefilePackage):
version("1.6", sha256="8100f6582008c5de46d2de05cee038f0f1ca3a50147031da1bc5e8744883cbe4")
version("1.4", sha256="287c77599c51256a3adbd62ed217cb6d6a547fcec2c29262e9d61fa32ed92b99")
+ depends_on("c", type="build") # generated
+
# phast cannot build with clapack using external blas
depends_on("clapack~external-blas")
diff --git a/var/spack/repos/builtin/packages/phasta/package.py b/var/spack/repos/builtin/packages/phasta/package.py
index 6cf303420c..8ffb91f89b 100644
--- a/var/spack/repos/builtin/packages/phasta/package.py
+++ b/var/spack/repos/builtin/packages/phasta/package.py
@@ -18,6 +18,10 @@ class Phasta(CMakePackage):
version("develop", branch="master")
version("0.0.1", commit="11f431f2d1a53a529dab4b0f079ab8aab7ca1109")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py
index d96c72a858..9b5c05b981 100644
--- a/var/spack/repos/builtin/packages/phist/package.py
+++ b/var/spack/repos/builtin/packages/phist/package.py
@@ -21,7 +21,7 @@ class Phist(CMakePackage):
"""
homepage = "https://bitbucket.org/essex/phist/"
- url = "https://bitbucket.org/essex/phist/get/phist-1.11.2.tar.gz"
+ url = "https://bitbucket.org/essex/phist/get/phist-1.12.1.tar.gz"
git = "https://bitbucket.org/essex/phist.git"
maintainers("jthies")
@@ -36,6 +36,9 @@ class Phist(CMakePackage):
version("develop", branch="devel")
version("master", branch="master")
+ # fixes for tpetra/ghost, clang/Intel-LLVM
+ version("1.12.1", sha256="6b8fe8a994bf6baf698aa691fc2cbecd62cc60219073e48bfe6fd954c0303b9f")
+
# compatible with trilinos@14:
version("1.12.0", sha256="0f02e39b16d14cf7c47a3c468e788c7c0e71857eb1c0a4edb601e1e5b67e8668")
@@ -71,6 +74,10 @@ class Phist(CMakePackage):
version("1.6.0", sha256="667a967b37d248242c275226c96efc447ef73a2b15f241c6a588d570d7fac07b")
version("1.4.3", sha256="9cc1c7ba7f7a04e94f4497da14199e4631a0d02d0e4187f3e16f4c242dc777c1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
name="kernel_lib",
default="builtin",
@@ -136,6 +143,9 @@ class Phist(CMakePackage):
description="generate Fortran 2003 bindings (requires Python3 and " "a Fortran compiler)",
)
+ # Build error with LLVM and recent Trilinos, fixed in phist-1.12.1
+ conflicts("%clang", when="kernel_lib=tpetra @:1.12.0")
+ conflicts("%oneapi", when="kernel_lib=tpetra @:1.12.0")
# Trilinos 14 had some tpetra/kokkos API changes that are reflected in the phist 1.12 tag
conflicts("^trilinos@14:", when="@:1.11.2")
# Build error with cray-libsci because they define macro 'I', workaround in phist-1.11.2
@@ -313,7 +323,7 @@ class Phist(CMakePackage):
tty.warn("========================== %s =======================" % hint)
try:
make("check")
- except spack.util.executable.ProcessError:
+ except ProcessError:
raise InstallError("run-test of phist ^mpich: Hint: " + hint)
else:
make("check")
@@ -321,6 +331,7 @@ class Phist(CMakePackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def test_install(self):
+ """run 'make test_install'"""
# The build script of test_install expects the sources to be copied here:
install_tree(
join_path(self.stage.source_path, "exampleProjects"),
diff --git a/var/spack/repos/builtin/packages/photos-f/package.py b/var/spack/repos/builtin/packages/photos-f/package.py
index ce86f30fe2..3abeb51245 100644
--- a/var/spack/repos/builtin/packages/photos-f/package.py
+++ b/var/spack/repos/builtin/packages/photos-f/package.py
@@ -20,6 +20,8 @@ class PhotosF(MakefilePackage):
version("215.5", sha256="3e2b3f60ffe2d3a6a95cf2f156aa24b93e1fa3c439a85fa0ae780ca2f6e0dbb5")
+ depends_on("fortran", type="build") # generated
+
patch("photos-215.5-update-configure.patch", level=2)
def do_stage(self, mirror_only=False):
diff --git a/var/spack/repos/builtin/packages/photos/package.py b/var/spack/repos/builtin/packages/photos/package.py
index ea07db9e10..2ee8af60cf 100644
--- a/var/spack/repos/builtin/packages/photos/package.py
+++ b/var/spack/repos/builtin/packages/photos/package.py
@@ -20,6 +20,9 @@ class Photos(AutotoolsPackage):
version("3.64", sha256="cb4096b4804289fc4d54a992caa566cbbd33f41f65f8906deb01200dc5163027")
version("3.61", sha256="acd3bcb769ba2a3e263de399e9b89fd6296405c9cbc5045b83baba3e60db4b26")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("hepmc", default=True, description="Build with HepMC2 support")
variant("hepmc3", default=False, description="Build with HepMC3 support")
diff --git a/var/spack/repos/builtin/packages/photospline/package.py b/var/spack/repos/builtin/packages/photospline/package.py
index 1453479542..ecfbab8373 100644
--- a/var/spack/repos/builtin/packages/photospline/package.py
+++ b/var/spack/repos/builtin/packages/photospline/package.py
@@ -25,4 +25,7 @@ class Photospline(CMakePackage):
version("2.0.3", sha256="7045a631c41489085037b05fac98fd9cad73dc4262b7eead143d09e5f8265dec")
version("2.0.2", sha256="0a3368205a7971a6919483ad5b5f0fbebb74614ec1891c95bb6a4fc9d3b950d4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cfitsio")
diff --git a/var/spack/repos/builtin/packages/php/package.py b/var/spack/repos/builtin/packages/php/package.py
index 441fe3af7b..6de2f97c2b 100644
--- a/var/spack/repos/builtin/packages/php/package.py
+++ b/var/spack/repos/builtin/packages/php/package.py
@@ -19,15 +19,35 @@ class Php(AutotoolsPackage):
license("PHP-3.01")
- version("7.4.1", sha256="4d9d7c5681bec3af38a935d033657dce09a9913498f8022d7ca163a7f2f493a7")
- version("7.4.0", sha256="91d34b48025ab9789216df89e247b6904912eeeaeff38c300ef314bdda8920b0")
- version("7.3.13", sha256="e68b8d9e659f2993eee912f05860e546fdc18e459f31cd2771f404df21285f0b")
- version("7.3.12", sha256="d0672ea84c0ab184f636acff3230d376d89a2067d59a87a2f1842361ee1f97d6")
- version("7.3.11", sha256="4d861b2f3bc640ded8b591ce87250161392a6244a3c84042da0c06fd8c500eb2")
- version("7.2.26", sha256="da132a836cec8021c00f22952e6044d91628ee3d2ef92a95d65cf91bad810600")
- version("7.2.25", sha256="049b2d291c45cb889d15fcd2bac6da7d15ca5d535d272d2f8879fb834bbf276e")
- version("7.2.24", sha256="334c9915733f6a29e1462f64038b1b4b1b21cb18f4f5f980add86792b5550ab3")
- version("7.1.33", sha256="f80a795a09328a9441bae4a8a60fa0d6d43ec5adc98f5aa5f51d06f4522c07fe")
+ version("8.3.12", sha256="d5d4e6ffc6d6b2f02a87c45741623e08045ec6509ade44a1033e0f8bbb374119")
+ version("7.4.33", sha256="dfbb2111160589054768a37086bda650a0041c89878449d078684d70d6a0e411")
+ with default_args(deprecated=True):
+ version("7.4.1", sha256="4d9d7c5681bec3af38a935d033657dce09a9913498f8022d7ca163a7f2f493a7")
+ version("7.4.0", sha256="91d34b48025ab9789216df89e247b6904912eeeaeff38c300ef314bdda8920b0")
+ version(
+ "7.3.13", sha256="e68b8d9e659f2993eee912f05860e546fdc18e459f31cd2771f404df21285f0b"
+ )
+ version(
+ "7.3.12", sha256="d0672ea84c0ab184f636acff3230d376d89a2067d59a87a2f1842361ee1f97d6"
+ )
+ version(
+ "7.3.11", sha256="4d861b2f3bc640ded8b591ce87250161392a6244a3c84042da0c06fd8c500eb2"
+ )
+ version(
+ "7.2.26", sha256="da132a836cec8021c00f22952e6044d91628ee3d2ef92a95d65cf91bad810600"
+ )
+ version(
+ "7.2.25", sha256="049b2d291c45cb889d15fcd2bac6da7d15ca5d535d272d2f8879fb834bbf276e"
+ )
+ version(
+ "7.2.24", sha256="334c9915733f6a29e1462f64038b1b4b1b21cb18f4f5f980add86792b5550ab3"
+ )
+ version(
+ "7.1.33", sha256="f80a795a09328a9441bae4a8a60fa0d6d43ec5adc98f5aa5f51d06f4522c07fe"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -36,10 +56,13 @@ class Php(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("bison", type="build")
depends_on("re2c", type="build")
+ depends_on("bash", type="build")
+ depends_on("libiconv", when="@8:")
depends_on("libxml2")
depends_on("sqlite")
- patch("sbang.patch")
+ patch("sbang-7.patch", when="@7")
+ patch("sbang-8.patch", when="@8")
def patch(self):
"""
@@ -65,3 +88,8 @@ class Php(AutotoolsPackage):
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./buildconf", "--force")
+
+ @when("@8:")
+ def configure_args(self):
+ args = [f"--with-iconv={self.spec['libiconv'].prefix}"]
+ return args
diff --git a/var/spack/repos/builtin/packages/php/sbang.patch b/var/spack/repos/builtin/packages/php/sbang-7.patch
index aca17c8ff3..aca17c8ff3 100644
--- a/var/spack/repos/builtin/packages/php/sbang.patch
+++ b/var/spack/repos/builtin/packages/php/sbang-7.patch
diff --git a/var/spack/repos/builtin/packages/php/sbang-8.patch b/var/spack/repos/builtin/packages/php/sbang-8.patch
new file mode 100644
index 0000000000..c9afec864a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/php/sbang-8.patch
@@ -0,0 +1,42 @@
+--- a/ext/phar/phar/pharcommand.inc.org
++++ b/ext/phar/phar/pharcommand.inc
+@@ -68,6 +68,12 @@ class PharCommand extends CLICommand
+ 'inf' => '<bang> Hash-bang line to start the archive (e.g. #!/usr/bin/php). The hash '
+ .' mark itself \'#!\' and the newline character are optional.'
+ ),
++ 'z' => array(
++ 'typ' => 'any',
++ 'val' => NULL,
++ 'inf' => '<bang> Hash-bang line to start the archive for spack. The hash '
++ .' mark itself \'#!\' and the newline character are optional.'
++ ),
+ 'c' => array(
+ 'typ' => 'compalg',
+ 'val' => NULL,
+@@ -467,7 +473,7 @@ class PharCommand extends CLICommand
+ */
+ static function cli_cmd_arg_pack()
+ {
+- $args = self::phar_args('abcFhilpsxy', 'pharnew');
++ $args = self::phar_args('azbcFhilpsxy', 'pharnew');
+
+ $args[''] = array(
+ 'typ' => 'any',
+@@ -572,6 +578,7 @@ class PharCommand extends CLICommand
+ }
+
+ $alias = $this->args['a']['val'];
++ $spack_hb = $this->args['z']['val'];
+ $hashbang = $this->args['b']['val'];
+ $archive = $this->args['f']['val'];
+ $hash = $this->args['h']['val'];
+@@ -583,6 +590,9 @@ class PharCommand extends CLICommand
+ $invregex = $this->args['x']['val'];
+ $input = $this->args['']['val'];
+
++ if (isset($spack_hb)) {
++ $hashbang = "$spack_hb\n<?php #!$hashbang ?>";
++ }
+ $hash = self::phar_check_hash($hash, $privkey);
+
+ $phar = new Phar($archive, 0, $alias);
diff --git a/var/spack/repos/builtin/packages/phylobayesmpi/package.py b/var/spack/repos/builtin/packages/phylobayesmpi/package.py
index dadbb37a42..8cd32e1c22 100644
--- a/var/spack/repos/builtin/packages/phylobayesmpi/package.py
+++ b/var/spack/repos/builtin/packages/phylobayesmpi/package.py
@@ -15,8 +15,11 @@ class Phylobayesmpi(MakefilePackage):
license("GPL-2.0-only")
+ version("1.9", sha256="567d8db995f23b2b0109c1e6088a7e5621e38fec91d6b2f27abd886b90ea31ce")
version("1.8b", sha256="7ff017bf492c1d8b42bfff3ee8e998ba1c50f4e4b3d9d6125647b91738017324")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
build_directory = "sources"
diff --git a/var/spack/repos/builtin/packages/picard/package.py b/var/spack/repos/builtin/packages/picard/package.py
index 8962cafc40..0a2e1ffd36 100644
--- a/var/spack/repos/builtin/packages/picard/package.py
+++ b/var/spack/repos/builtin/packages/picard/package.py
@@ -27,6 +27,11 @@ class Picard(Package):
# They started distributing a single jar file at v2.6.0, prior to
# that it was a .zip file with multiple .jar and .so files
version(
+ "3.1.1",
+ sha256="15c79f51fd0ac001049f9dd7b9bac1dbdf759dcb0230a89c7f6d1f246e8bbab4",
+ expand=False,
+ )
+ version(
"3.0.0",
sha256="0d5e28ab301fad3b02030d01923888129ba82c5f722ac5ccb2d418ab76ac5499",
expand=False,
diff --git a/var/spack/repos/builtin/packages/picsar/package.py b/var/spack/repos/builtin/packages/picsar/package.py
index 522551fa1c..bfc3673915 100644
--- a/var/spack/repos/builtin/packages/picsar/package.py
+++ b/var/spack/repos/builtin/packages/picsar/package.py
@@ -18,6 +18,10 @@ class Picsar(MakefilePackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("prod", default=True, description="Production mode (without FFTW)")
variant(
"prod_spectral", default=False, description="Production mode with spectral solver and FFTW"
diff --git a/var/spack/repos/builtin/packages/picsarlite/package.py b/var/spack/repos/builtin/packages/picsarlite/package.py
index 79e6fd58e2..98365c4f42 100644
--- a/var/spack/repos/builtin/packages/picsarlite/package.py
+++ b/var/spack/repos/builtin/packages/picsarlite/package.py
@@ -21,6 +21,9 @@ class Picsarlite(MakefilePackage):
version("develop", branch="PICSARlite")
version("0.1", tag="PICSARlite-0.1", commit="3c9cee9bdf32da0998f504bff7af31fcae2f0452")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("prod", default=True, description="Production mode (without FFTW)")
variant(
"prod_spectral", default=False, description="Production mode with spectral solver and FFTW"
diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py
index b9f0fa4f9c..e16cb06af6 100644
--- a/var/spack/repos/builtin/packages/pidx/package.py
+++ b/var/spack/repos/builtin/packages/pidx/package.py
@@ -20,5 +20,8 @@ class Pidx(CMakePackage):
version("1.0", commit="6afa1cf71d1c41263296dc049c8fabaf73c296da")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.4:", type="build")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/pigz/package.py b/var/spack/repos/builtin/packages/pigz/package.py
index d1d5dc6ab2..bad604900e 100644
--- a/var/spack/repos/builtin/packages/pigz/package.py
+++ b/var/spack/repos/builtin/packages/pigz/package.py
@@ -15,11 +15,14 @@ class Pigz(MakefilePackage):
license("Zlib")
+ version("2.8", sha256="2f7f6a6986996d21cb8658535fff95f1c7107ddce22b5324f4b41890e2904706")
version("2.7", sha256="d2045087dae5e9482158f1f1c0f21c7d3de6f7cdc7cc5848bdabda544e69aa58")
version("2.6", sha256="577673676cd5c7219f94b236075451220bae3e1ca451cf849947a2998fbf5820")
version("2.4", sha256="e228e7d18b34c4ece8d596eb6eee97bde533c6beedbb728d07d3abe90b4b1b52")
version("2.3.4", sha256="763f2fdb203aa0b7b640e63385e38e5dd4e5aaa041bc8e42aa96f2ef156b06e8")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/pika-algorithms/package.py b/var/spack/repos/builtin/packages/pika-algorithms/package.py
index 3442ff8aba..b96ab2c764 100644
--- a/var/spack/repos/builtin/packages/pika-algorithms/package.py
+++ b/var/spack/repos/builtin/packages/pika-algorithms/package.py
@@ -24,6 +24,8 @@ class PikaAlgorithms(CMakePackage):
version("0.1.0", sha256="64da008897dfa7373155595c46d2ce6b97a8a3cb5bea33ae7f2d1ff359f0d9b6")
version("main", branch="main")
+ depends_on("cxx", type="build")
+
generator("ninja")
map_cxxstd = lambda cxxstd: "2a" if cxxstd == "20" else cxxstd
diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py
index ae1d771176..3d2793568b 100644
--- a/var/spack/repos/builtin/packages/pika/package.py
+++ b/var/spack/repos/builtin/packages/pika/package.py
@@ -19,6 +19,19 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
license("BSL-1.0")
+ version("0.30.1", sha256="b0f3689a3edd30f8d674e19b5134fc5013813f843c45797c1015163e51989ac0")
+ version("0.30.0", sha256="1798bf7de2505bc707bf95716fda8de5630b2e2ae54a6c4ef59f9931394d31cc")
+ version("0.29.0", sha256="2c61079f52f3e135a8d0845a993e6e4fb64031fbee9b5cef0ead57efb6175e3c")
+ version("0.28.0", sha256="a64ebac04135c0c8d392ddcd8d683fe02e2c0782abfe130754244d58f27ae6cf")
+ version("0.27.0", sha256="4a58dc4014edc2074399e4a6ecfa244537c89ce1319b3e14ff3dfe617fb9f9e8")
+ version("0.26.1", sha256="d7cc842238754019abdb536e22325e9a57186cd2ac8cc9c7140a5385f9d730f6")
+ version("0.26.0", sha256="bbec5472c71006c1f55e7946c8dc517dae76c41cacb36fa98195312c74a1bb9a")
+ version("0.25.0", sha256="6646e12f88049116d84ce0caeedaa039a13caaa0431964caea4660b739767b2e")
+ version("0.24.0", sha256="3b97c684107f892a633f598d94bcbd1e238d940e88e1c336f205e81b99326cc3")
+ version("0.23.0", sha256="d1981e198ac4f8443770cebbeff7a132b8f6c1a42e32b0b06fea02cc9df99595")
+ version("0.22.2", sha256="eeffa8584336b239aca167f0056e815b1b6d911e46cbb3cd6b8b811d101c1052")
+ version("0.22.1", sha256="b0de0649bee336847622f97b59b34a80cb3cfd9a931bbdb38299bc4904f19b92")
+ version("0.22.0", sha256="75f8932f3a233958c69802b483335eeeb39032ea66f12442f6f77048e259bdea")
version("0.21.0", sha256="0ab24966e6ae026b355147f02354af4bd2117c342915fe844addf8e493735a33")
version("0.20.0", sha256="f338cceea66a0e3954806b2aca08f6560bba524ecea222f04bc18b483851c877")
version("0.19.1", sha256="674675abf0dd4c6f5a0b2fa3db944b277ed65c62f654029d938a8cab608a9c1d")
@@ -44,8 +57,13 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
version("0.1.0", sha256="aa0ae2396cd264d821a73c4c7ecb118729bb3de042920c9248909d33755e7327")
version("main", branch="main")
+ depends_on("cxx", type="build")
+
generator("ninja")
+ variant("shared", default=True, description="Build shared libraries")
+ conflicts("~shared", when="@:0.25")
+
cxxstds = ("17", "20", "23")
variant(
"cxxstd",
@@ -54,11 +72,12 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
description="Use the specified C++ standard when building",
)
+ mallocs = ("system", "jemalloc", "mimalloc", "tbbmalloc", "tcmalloc")
variant(
"malloc",
default="mimalloc",
description="Define which allocator will be linked in",
- values=("system", "jemalloc", "mimalloc", "tbbmalloc", "tcmalloc"),
+ values=mallocs,
)
default_generic_coroutines = True
@@ -76,6 +95,13 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
variant("apex", default=False, description="Enable APEX support", when="@0.2:")
variant("tracy", default=False, description="Enable Tracy support", when="@0.7:")
variant(
+ "sanitizers",
+ default=False,
+ description="Enable support for sanitizers. "
+ "Specific sanitizers must be explicitly enabled with -fsanitize=*.",
+ )
+ variant("valgrind", default=False, description="Enable support for valgrind")
+ variant(
"stdexec",
default=False,
description="Use stdexec for sender/receiver functionality",
@@ -83,7 +109,6 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
)
# Build dependencies
- depends_on("git", type="build")
depends_on("cmake@3.18:", type="build")
depends_on("cmake@3.22:", when="@0.8:", type="build")
@@ -94,9 +119,11 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
conflicts("%clang@:8", when="@0.2:")
conflicts("+stdexec", when="cxxstd=17")
conflicts("cxxstd=23", when="^cmake@:3.20.2")
- # CUDA version <= 11 does not support C++20 and newer
+ conflicts("cxxstd=20", when="+cuda ^cmake@:3.25.1")
+ conflicts("cxxstd=23", when="+cuda")
+ # nvcc version <= 11 does not support C++20 and newer
for cxxstd in filter(lambda x: x != "17", cxxstds):
- conflicts(f"cxxstd={cxxstd}", when="^cuda@:11")
+ requires("%nvhpc", when=f"cxxstd={cxxstd} ^cuda@:11")
# Other dependencies
depends_on("boost@1.71:")
@@ -104,19 +131,31 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
# https://github.com/pika-org/pika/issues/686
conflicts("^fmt@10:", when="@:0.15 +cuda")
conflicts("^fmt@10:", when="@:0.15 +rocm")
+ # https://github.com/pika-org/pika/pull/1074
+ conflicts("^fmt@11:", when="@:0.23")
+ depends_on("spdlog@1.9.2:", when="@0.25:")
depends_on("hwloc@1.11.5:")
+ # https://github.com/pika-org/pika/issues/1223
+ conflicts("^hwloc@2.11:", when="@:0.27 target=aarch64:")
depends_on("gperftools", when="malloc=tcmalloc")
depends_on("jemalloc", when="malloc=jemalloc")
depends_on("mimalloc", when="malloc=mimalloc")
depends_on("tbb", when="malloc=tbbmalloc")
+ for malloc in filter(lambda x: x != "system", mallocs):
+ conflicts("^apex +gperftools", when=f"+apex malloc={malloc}")
+ conflicts("^apex +jemalloc", when=f"+apex malloc={malloc}")
depends_on("apex", when="+apex")
depends_on("cuda@11:", when="+cuda")
depends_on("hip@5.2:", when="@0.8: +rocm")
+ # https://github.com/pika-org/pika/issues/1238
+ conflicts("%gcc@13:", when="+rocm")
depends_on("hipblas", when="@:0.8 +rocm")
depends_on("mpi", when="+mpi")
- depends_on("stdexec", when="+stdexec")
+ with when("+stdexec"):
+ depends_on("stdexec")
+ depends_on("stdexec@24.09:", when="@0.29:")
depends_on("rocblas", when="+rocm")
depends_on("rocsolver", when="@0.5: +rocm")
depends_on("tracy-client", when="+tracy")
@@ -124,6 +163,8 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
depends_on("whip@0.1: +rocm", when="@0.9: +rocm")
depends_on("whip@0.1: +cuda", when="@0.9: +cuda")
+ depends_on("valgrind", when="+valgrind")
+
with when("+rocm"):
for val in ROCmPackage.amdgpu_targets:
depends_on(f"whip@0.1: amdgpu_target={val}", when=f"@0.9: amdgpu_target={val}")
@@ -174,6 +215,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
spec, args = self.spec, []
args += [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("PIKA_WITH_CXX_STANDARD", spec.variants["cxxstd"].value),
self.define_from_variant("PIKA_WITH_EXAMPLES", "examples"),
self.define_from_variant("PIKA_WITH_MALLOC", "malloc"),
@@ -182,6 +224,8 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("PIKA_WITH_MPI", "mpi"),
self.define_from_variant("PIKA_WITH_APEX", "apex"),
self.define_from_variant("PIKA_WITH_TRACY", "tracy"),
+ self.define_from_variant("PIKA_WITH_SANITIZERS", "sanitizers"),
+ self.define_from_variant("PIKA_WITH_VALGRIND", "valgrind"),
self.define("PIKA_WITH_TESTS", self.run_tests),
self.define_from_variant("PIKA_WITH_GENERIC_CONTEXT_COROUTINES", "generic_coroutines"),
self.define("BOOST_ROOT", spec["boost"].prefix),
diff --git a/var/spack/repos/builtin/packages/pilercr/package.py b/var/spack/repos/builtin/packages/pilercr/package.py
index a25737b242..9a9189b853 100644
--- a/var/spack/repos/builtin/packages/pilercr/package.py
+++ b/var/spack/repos/builtin/packages/pilercr/package.py
@@ -15,6 +15,8 @@ class Pilercr(MakefilePackage):
version("1.06", sha256="50175f7aa171674cda5ba255631f340f9cc7f80e8cc25135a4cb857147d91068")
+ depends_on("cxx", type="build") # generated
+
@property
def build_targets(self):
targets = []
diff --git a/var/spack/repos/builtin/packages/pindel/package.py b/var/spack/repos/builtin/packages/pindel/package.py
index 484228f498..f43ae2c122 100644
--- a/var/spack/repos/builtin/packages/pindel/package.py
+++ b/var/spack/repos/builtin/packages/pindel/package.py
@@ -22,6 +22,8 @@ class Pindel(MakefilePackage):
version("0.2.5a7", sha256="0a270483dee9ef617d422eb61d3478334ee8f55e952d0a439529c2b21fcf8fb4")
version("0.2.5", sha256="9908940d090eff23d940c3b6f2f6b3fc2bb1fd3b7a2d553cc81eed240a23fd9f")
+ depends_on("cxx", type="build") # generated
+
depends_on("htslib@1.7:")
# GCC > 4.8 seems to dislike calling abs on an unsigned integer
diff --git a/var/spack/repos/builtin/packages/pinentry/package.py b/var/spack/repos/builtin/packages/pinentry/package.py
index eb52d3385f..d4d9876766 100644
--- a/var/spack/repos/builtin/packages/pinentry/package.py
+++ b/var/spack/repos/builtin/packages/pinentry/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
from spack.package import *
@@ -22,11 +21,16 @@ class Pinentry(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("1.3.1", sha256="bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04")
+ version("1.3.0", sha256="9b3cd5226e7597f2fded399a3bc659923351536559e9db0826981bca316494de")
version("1.2.1", sha256="457a185e5a85238fb945a955dc6352ab962dc8b48720b62fc9fa48c7540a4067")
version("1.2.0", sha256="10072045a3e043d0581f91cd5676fcac7ffee957a16636adedaa4f583a616470")
version("1.1.1", sha256="cd12a064013ed18e2ee8475e669b9f58db1b225a0144debdb85a68cecddba57f")
version("1.1.0", sha256="68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
supported_guis = [
"curses",
"tty",
@@ -51,6 +55,7 @@ class Pinentry(AutotoolsPackage):
depends_on("libgpg-error@1.16:")
depends_on("libassuan@2.1.0:")
+ depends_on("libassuan@:2", when="@:1.2")
# Optional GUI dependencies
depends_on("ncurses", when="gui=curses")
@@ -89,17 +94,24 @@ class Pinentry(AutotoolsPackage):
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)
+ def check_version(self, exe_name):
+ """Version check"""
+ exe = which(join_path(self.prefix.bin, exe_name))
+ out = exe("--version", output=str.split, error=str.split)
+ assert str(self.version) in out
+
+ def test_pinentry(self):
+ """Confirm pinentry version"""
+ self.check_version("pinentry")
+
+ def test_guis(self):
+ """Check gui versions"""
for gui in self.supported_guis:
- if "gui=" + gui in self.spec:
- kwargs["exe"] = self.prefix.bin.pinentry + "-" + gui
- self.run_test(**kwargs)
+ if f"gui={gui}" not in self.spec:
+ continue
+
+ exe_name = f"pinentry-{gui}"
+ with test_part(self, f"test_guis_{gui}", purpose=f"Check {exe_name} version"):
+ self.check_version(exe_name)
diff --git a/var/spack/repos/builtin/packages/pinfo/package.py b/var/spack/repos/builtin/packages/pinfo/package.py
index 39b66c9ee7..62e5e06875 100644
--- a/var/spack/repos/builtin/packages/pinfo/package.py
+++ b/var/spack/repos/builtin/packages/pinfo/package.py
@@ -16,6 +16,8 @@ class Pinfo(AutotoolsPackage):
version("0.6.12", sha256="82af48ba23b8c26b1f4e67b45f718142eb0f760326b782f80c765801d3532077")
version("0.6.11", sha256="fd26017ac9db179d709b49e450c3097e7d6f99cd94de7b5da824ec757c6992b2")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/piranha/package.py b/var/spack/repos/builtin/packages/piranha/package.py
index 8ae15b3d82..19a5fd9763 100644
--- a/var/spack/repos/builtin/packages/piranha/package.py
+++ b/var/spack/repos/builtin/packages/piranha/package.py
@@ -21,6 +21,8 @@ class Piranha(CMakePackage):
version("develop", branch="master")
version("0.5", sha256="34a89bda8208ff48cfb116efa7d53c09e8a9b3838af4bb96ba2e19e4930b3a58")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Build the Python bindings")
# Build dependencies
diff --git a/var/spack/repos/builtin/packages/pism/package.py b/var/spack/repos/builtin/packages/pism/package.py
index 641e985ddb..d7c7be75be 100644
--- a/var/spack/repos/builtin/packages/pism/package.py
+++ b/var/spack/repos/builtin/packages/pism/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Pism(CMakePackage):
"""Parallel Ice Sheet Model"""
- homepage = "http://pism-docs.org/wiki/doku.php:="
+ homepage = "https://pism-docs.org/wiki/doku.php:="
url = "https://github.com/pism/pism/archive/v1.1.4.tar.gz"
git = "https://github.com/pism/pism.git"
@@ -22,6 +22,10 @@ class Pism(CMakePackage):
version("0.7.x", branch="stable0.7")
version("icebin", branch="efischer/dev")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("extra", default=False, description="Build extra executables (testing/verification)")
variant("shared", default=True, description="Build shared Pism libraries")
variant("python", default=False, description="Build python bindings", when="@1.1:")
diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py
index 422996cb01..d4323eb469 100644
--- a/var/spack/repos/builtin/packages/pixman/package.py
+++ b/var/spack/repos/builtin/packages/pixman/package.py
@@ -5,19 +5,22 @@
import sys
+import spack.build_systems.autotools
+import spack.build_systems.meson
from spack.package import *
-class Pixman(AutotoolsPackage):
+class Pixman(AutotoolsPackage, MesonPackage):
"""The Pixman package contains a library that provides low-level
pixel manipulation features such as image compositing and
trapezoid rasterization."""
- homepage = "http://www.pixman.org"
+ homepage = "https://www.pixman.org"
url = "https://cairographics.org/releases/pixman-0.32.6.tar.gz"
license("MIT")
+ version("0.44.0", sha256="89a4c1e1e45e0b23dffe708202cb2eaffde0fe3727d7692b2e1739fec78a7dac")
version("0.42.2", sha256="ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e")
version("0.42.0", sha256="07f74c8d95e4a43eb2b08578b37f40b7937e6c5b48597b3a0bb2c13a53f46c13")
version("0.40.0", sha256="6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc")
@@ -26,11 +29,26 @@ class Pixman(AutotoolsPackage):
version("0.34.0", sha256="21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e")
version("0.32.6", sha256="3dfed13b8060eadabf0a4945c7045b7793cc7e3e910e748a8bb0f0dc3e794904")
+ build_system(
+ conditional("autotools", when="@:0.42"),
+ conditional("meson", when="@0.38:"),
+ default="meson",
+ )
+
+ # https://github.com/spack/spack/issues/47917
+ conflicts("%intel")
+
+ depends_on("c", type="build")
+ with when("build_system=meson"):
+ depends_on("meson@0.52:", type="build")
depends_on("pkgconfig", type="build")
depends_on("flex", type="build")
depends_on("bison@3:", type="build")
+
depends_on("libpng")
+ variant("shared", default=True, description="Build shared library")
+
# As discussed here:
# https://bugs.freedesktop.org/show_bug.cgi?id=104886
# __builtin_shuffle was removed in clang 5.0.
@@ -60,10 +78,38 @@ class Pixman(AutotoolsPackage):
@property
def libs(self):
- return find_libraries("libpixman-1", self.prefix, shared=True, recursive=True)
+ return find_libraries(
+ "libpixman-1", self.prefix, shared=self.spec.satisfies("+shared"), recursive=True
+ )
+
+
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+ def meson_args(self):
+ args = ["-Dlibpng=enabled", "-Dgtk=disabled", "-Db_staticpic=true"]
+
+ if sys.platform == "darwin":
+ args += ["-Dmmx=disabled"]
+
+ # From homebrew, see:
+ # https://gitlab.freedesktop.org/pixman/pixman/-/issues/59
+ # https://gitlab.freedesktop.org/pixman/pixman/-/issues/69
+ if self.spec.target.family == "aarch64":
+ args.append("-Da64-neon=disabled")
+
+ # The Fujitsu compiler does not support assembler macros.
+ if self.spec.satisfies("%fj"):
+ args.append("-Da64-neon=disabled")
+
+ args.append(
+ "-Ddefault_library=" + ("shared" if self.spec.satisfies("+shared") else "static")
+ )
+ return args
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
- args = ["--enable-libpng", "--disable-gtk"]
+ args = ["--enable-libpng", "--disable-gtk", "--with-pic"]
if sys.platform == "darwin":
args += ["--disable-mmx", "--disable-silent-rules"]
@@ -74,4 +120,10 @@ class Pixman(AutotoolsPackage):
if self.spec.target.family == "aarch64":
args.append("--disable-arm-a64-neon")
+ # The Fujitsu compiler does not support assembler macros.
+ if self.spec.satisfies("%fj"):
+ args.append("--disable-arm-a64-neon")
+
+ args.extend(self.enable_or_disable("shared"))
+
return args
diff --git a/var/spack/repos/builtin/packages/pixz/package.py b/var/spack/repos/builtin/packages/pixz/package.py
index 932128da27..e4b91b99d9 100644
--- a/var/spack/repos/builtin/packages/pixz/package.py
+++ b/var/spack/repos/builtin/packages/pixz/package.py
@@ -17,5 +17,7 @@ class Pixz(AutotoolsPackage):
version("1.0.7", sha256="e5e32c6eb0bf112b98e74a5da8fb63b9f2cae71800f599d97ce540e150c8ddc5")
version("1.0.6", sha256="02c50746b134fa1b1aae41fcc314d7c6f1919b3d48bcdea01bf11769f83f72e8")
+ depends_on("c", type="build") # generated
+
depends_on("xz")
depends_on("libarchive")
diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py
index b86996f731..6122182c39 100644
--- a/var/spack/repos/builtin/packages/pkg-config/package.py
+++ b/var/spack/repos/builtin/packages/pkg-config/package.py
@@ -20,6 +20,8 @@ class PkgConfig(AutotoolsPackage):
version("0.29.1", sha256="beb43c9e064555469bd4390dcfd8030b1536e0aa103f08d7abf7ae8cac0cb001")
version("0.28", sha256="6b6eb31c6ec4421174578652c7e141fdaae2dabad1021f420d8713206ac1f845")
+ depends_on("c", type="build") # generated
+
provides("pkgconfig")
variant("internal_glib", default=True, description="Builds with internal glib")
@@ -27,9 +29,6 @@ class PkgConfig(AutotoolsPackage):
# The following patch is needed for gcc-6.1
patch("g_date_strftime.patch", when="@:0.29.1")
- # https://github.com/spack/spack/issues/3525
- conflicts("%pgi")
-
parallel = False
tags = ["build-tools"]
@@ -53,12 +52,18 @@ class PkgConfig(AutotoolsPackage):
env.append_path("ACLOCAL_PATH", self.prefix.share.aclocal)
def configure_args(self):
+ spec = self.spec
config_args = ["--enable-shared"]
- if "+internal_glib" in self.spec:
+ if spec.satisfies("+internal_glib"):
# There's a bootstrapping problem here;
# glib uses pkg-config as well, so break
# the cycle by using the internal glib.
config_args.append("--with-internal-glib")
+ for strict_compiler in ("%oneapi", "%cce", "%apple-clang@15:", "%clang@15:"):
+ if spec.satisfies(strict_compiler):
+ config_args.append("CFLAGS=-Wno-error=int-conversion")
+ break
+
return config_args
diff --git a/var/spack/repos/builtin/packages/pkgconf/package.py b/var/spack/repos/builtin/packages/pkgconf/package.py
index 45e8bfa89a..abf731d41b 100644
--- a/var/spack/repos/builtin/packages/pkgconf/package.py
+++ b/var/spack/repos/builtin/packages/pkgconf/package.py
@@ -15,9 +15,11 @@ class Pkgconf(AutotoolsPackage):
homepage = "http://pkgconf.org/"
# URL must remain http:// so Spack can bootstrap curl
url = "https://distfiles.ariadne.space/pkgconf/pkgconf-1.6.3.tar.xz"
+ tags = ["build-tools"]
license("ISC")
+ version("2.2.0", sha256="b06ff63a83536aa8c2f6422fa80ad45e4833f590266feb14eaddfe1d4c853c69")
version("1.9.5", sha256="1ac1656debb27497563036f7bffc281490f83f9b8457c0d60bcfb638fb6b6171")
version("1.8.0", sha256="ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf")
version("1.7.4", sha256="d73f32c248a4591139a6b17777c80d4deab6b414ec2b3d21d0a24be348c476ab")
@@ -31,17 +33,13 @@ class Pkgconf(AutotoolsPackage):
version("1.3.10", sha256="62577d265fa9415a57a77a59dede5526b7ece3ef59a750434b281b262f0c1da9")
version("1.3.8", sha256="fc06f058e6905435481f649865ca51000192c91808f307b1053ca5e859cb1488")
+ depends_on("c", type="build") # generated
+
provides("pkgconfig")
# https://github.com/spack/spack/issues/11704
patch("nvhpc.patch", when="@1.7.3%nvhpc")
- # TODO: Add a package for the kyua testing framework
- # depends_on('kyua', type='test')
-
- # https://github.com/spack/spack/issues/3525
- conflicts("%pgi")
-
tags = ["build-tools"]
executables = ["^pkgconf$", "^pkg-config$"]
@@ -70,5 +68,5 @@ class Pkgconf(AutotoolsPackage):
@run_after("install")
def link_pkg_config(self):
- symlink("pkgconf", "{0}/pkg-config".format(self.prefix.bin))
- symlink("pkgconf.1", "{0}/pkg-config.1".format(self.prefix.share.man.man1))
+ symlink("pkgconf", f"{self.prefix.bin}/pkg-config")
+ symlink("pkgconf.1", f"{self.prefix.share.man.man1}/pkg-config.1")
diff --git a/var/spack/repos/builtin/packages/pktools/package.py b/var/spack/repos/builtin/packages/pktools/package.py
index 59c2d1ef23..131911892e 100644
--- a/var/spack/repos/builtin/packages/pktools/package.py
+++ b/var/spack/repos/builtin/packages/pktools/package.py
@@ -19,6 +19,9 @@ class Pktools(CMakePackage):
version("2.6.7.1", sha256="519b6a500ce3c5ef3793c1cda1f5377f13b7d7591b5ccc376b2bd1de4bd4f7e5")
version("2.6.7", sha256="f566647e93037cc01cebfe17ea554d798177fe5081887c70223dcca817f4fe7f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("fann", default=True, description="Build with libfann to enable related programs")
variant("liblas", default=False, description="Build with libLAS support")
diff --git a/var/spack/repos/builtin/packages/planck-likelihood/package.py b/var/spack/repos/builtin/packages/planck-likelihood/package.py
index 7315b7f9e2..30629a7ec3 100644
--- a/var/spack/repos/builtin/packages/planck-likelihood/package.py
+++ b/var/spack/repos/builtin/packages/planck-likelihood/package.py
@@ -21,6 +21,9 @@ class PlanckLikelihood(Package):
url="https://irsa.ipac.caltech.edu/data/Planck/release_2/software/COM_Likelihood_Code-v2.0.R2.00.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("lensing-ext", default=False, description="Provide lensing-ext data")
variant("plik-DS", default=False, description="Provide plik-DS data")
variant("plik-HM-ext", default=False, description="Provide plik-HM-ext data")
@@ -80,9 +83,9 @@ class PlanckLikelihood(Package):
filter_file("^\t@", "\t", "Makefile")
makeflags = [
- "PREFIX=%s" % prefix,
+ f"PREFIX={prefix}",
"COLORS=0",
- "CFITSIOPATH=%s" % spec["cfitsio"].prefix,
+ f"CFITSIOPATH={spec['cfitsio'].prefix}",
"CC=cc",
"FC=fc",
"IFORTLIBPATH=",
@@ -90,9 +93,9 @@ class PlanckLikelihood(Package):
"GFORTRANLIBPATH=",
"GFORTRANRUNTIME=-lgfortran -lgomp",
"LAPACKLIBPATH=",
- "LAPACK=%s" % (spec["lapack"].libs + spec["blas"].libs).ld_flags,
- "COPENMP=%s" % self.compiler.openmp_flag,
- "FOPENMP=%s" % self.compiler.openmp_flag,
+ f"LAPACK={(spec['lapack'].libs + spec['blas'].libs).ld_flags}",
+ f"COPENMP={self.compiler.openmp_flag}",
+ f"FOPENMP={self.compiler.openmp_flag}",
]
# Build
diff --git a/var/spack/repos/builtin/packages/plasma/package.py b/var/spack/repos/builtin/packages/plasma/package.py
index 1ff83f6201..65825a781f 100644
--- a/var/spack/repos/builtin/packages/plasma/package.py
+++ b/var/spack/repos/builtin/packages/plasma/package.py
@@ -27,6 +27,7 @@ class Plasma(CMakePackage):
license("BSD-3-Clause")
version("develop", git=git)
+ version("24.8.7", sha256="748464deb08642d2ea7309fb667e1383d85127c2cd8f0d134180b39c17834503")
version("23.8.2", sha256="2db34de0575f3e3d16531bdcf1caddef146f68e71335977a3e8ec193003ab943")
version("22.9.29", sha256="78827898b7e3830eee2e388823b9180858279f77c5eda5aa1be173765c53ade5")
version("21.8.29", sha256="e0bb4d9143c8540f9f46cbccac9ed0cbea12500a864e6954fce2fe94ea057a10")
@@ -43,6 +44,9 @@ class Plasma(CMakePackage):
url="https://github.com/icl-utk-edu/plasma/releases/download/17.01/plasma-17.01.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
build_system(
conditional("makefile", when="@:17.1"),
conditional("cmake", when="@18.9:"),
@@ -78,7 +82,6 @@ class Plasma(CMakePackage):
conflicts("%clang")
conflicts("%intel")
conflicts("%nag")
- conflicts("%pgi")
conflicts("%xl")
conflicts("%xl_r")
diff --git a/var/spack/repos/builtin/packages/plink2/package.py b/var/spack/repos/builtin/packages/plink2/package.py
index 569d76ee65..498ef092b0 100644
--- a/var/spack/repos/builtin/packages/plink2/package.py
+++ b/var/spack/repos/builtin/packages/plink2/package.py
@@ -11,12 +11,23 @@ class Plink2(MakefilePackage):
range of basic, large-scale analyses in a computationally efficient manner."""
homepage = "https://www.cog-genomics.org/plink/2.0/"
- git = "https://github.com/chrchang/plink-ng.git"
+ url = "https://github.com/chrchang/plink-ng/archive/refs/tags/v2.00a5.11.tar.gz"
+ list_url = "https://github.com/chrchang/plink-ng/tags"
- version("2.00a4.3", tag="v2.00a4.3", commit="59fca48f6f8135886ff68962fbe31ae0c6413228")
+ maintainers("teaguesterling")
+
+ license("GPLv3", checked_by="teaguesterling")
+ # See: https://github.com/chrchang/plink-ng/blob/master/2.0/COPYING
+
+ version("2.00a5.11", sha256="8b664baa0b603f374123c32818ea2f053272840ba60e998d06cb864f3a6f1c38")
+ version("2.00a5.10", sha256="53d845c6a04f8fc701e6f58f6431654e36cbf6b79bff25099862d169a8199a45")
+ version("2.00a4.3", sha256="3cd1d26ac6dd1c451b42440f479789aa19d2b57642c118aac530a5ff1b0b4ce6")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("zlib-api")
- depends_on("zlib@1.2.12:", when="^zlib")
+ depends_on("zlib@1.2.12:", when="^[virtuals=zlib-api] zlib")
depends_on("zstd@1.5.2:")
depends_on("libdeflate@1.10:")
depends_on("blas")
diff --git a/var/spack/repos/builtin/packages/ploticus/package.py b/var/spack/repos/builtin/packages/ploticus/package.py
index c473a926dd..dc2b034577 100644
--- a/var/spack/repos/builtin/packages/ploticus/package.py
+++ b/var/spack/repos/builtin/packages/ploticus/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Ploticus(MakefilePackage):
"""Ploticus can produce various types of plots and graphs."""
- homepage = "http://ploticus.sourceforge.net/doc/welcome.html"
+ homepage = "https://ploticus.sourceforge.net/doc/welcome.html"
maintainers("Christoph-TU")
version("2.42", sha256="3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/plplot/package.py b/var/spack/repos/builtin/packages/plplot/package.py
index 1035a45d25..4e3d148399 100644
--- a/var/spack/repos/builtin/packages/plplot/package.py
+++ b/var/spack/repos/builtin/packages/plplot/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Plplot(CMakePackage):
"""PLplot is a cross-platform package for creating scientific plots."""
- homepage = "http://plplot.sourceforge.net/"
+ homepage = "https://plplot.sourceforge.net/"
url = "https://sourceforge.net/projects/plplot/files/plplot/5.13.0%20Source/plplot-5.13.0.tar.gz/download"
license("LGPL-2.0-or-later")
@@ -20,6 +20,10 @@ class Plplot(CMakePackage):
version("5.12.0", sha256="8dc5da5ef80e4e19993d4c3ef2a84a24cc0e44a5dade83201fca7160a6d352ce")
version("5.11.0", sha256="bfa8434e6e1e7139a5651203ec1256c8581e2fac3122f907f7d8d25ed3bd5f7e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("java", default=False, description="Enable Java binding")
variant("lua", default=False, description="Enable Lua binding")
variant("pango", default=False, description="Enable Pango")
diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py
index df734349c1..2c7fa8de66 100644
--- a/var/spack/repos/builtin/packages/plumed/package.py
+++ b/var/spack/repos/builtin/packages/plumed/package.py
@@ -32,6 +32,8 @@ class Plumed(AutotoolsPackage):
version("master", branch="master")
+ version("2.9.2", sha256="301fbc958374f81d9b8c7a1eac73095f6dded52cce73ce33d64bdbebf51ac63d")
+ version("2.9.1", sha256="e24563ad1eb657611918e0c978d9c5212340f128b4f1aa5efbd439a0b2e91b58")
version("2.9.0", sha256="612d2387416b5f82dd8545709921440370e144fd46cef633654cf0ee43bac5f8")
version("2.8.3", sha256="e98da486e252cdf290b0b5b2f3f021409ea0d2d775ab609a6ad68fc1ab143a3b")
@@ -113,6 +115,10 @@ class Plumed(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Variants. PLUMED by default builds a number of optional modules.
# The ones listed here are not built by default for various reasons,
# such as stability, lack of testing, or lack of demand.
@@ -256,8 +262,8 @@ class Plumed(AutotoolsPackage):
def patch(self):
# Ensure Spack's wrappers are used to compile the Python interface
env = (
- 'CXX={0} LDSHARED="{0} -pthread -shared" '
- 'LDCXXSHARED="{0} -pthread -shared"'.format(spack_cxx)
+ 'CC="{0}" LDSHARED="{0} -pthread -shared" '
+ 'CXX="{1}" LDCXXSHARED="{1} -pthread -shared"'.format(spack_cc, spack_cxx)
)
filter_file(
"plumed_program_name=plumed",
diff --git a/var/spack/repos/builtin/packages/ply/package.py b/var/spack/repos/builtin/packages/ply/package.py
index fde3b9787f..19c74c75d8 100644
--- a/var/spack/repos/builtin/packages/ply/package.py
+++ b/var/spack/repos/builtin/packages/ply/package.py
@@ -18,6 +18,8 @@ class Ply(AutotoolsPackage):
version("2.1.1", commit="899afb0c35ba2191dd7aa21f13bc7fde2655c475")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/pmdk/package.py b/var/spack/repos/builtin/packages/pmdk/package.py
index ab6728754f..033e833d7a 100644
--- a/var/spack/repos/builtin/packages/pmdk/package.py
+++ b/var/spack/repos/builtin/packages/pmdk/package.py
@@ -31,6 +31,9 @@ class Pmdk(Package):
version("1.6", sha256="3b99e6c30709326a94d2e73a9247a8dfb58d0a394c5b7714e5c3d8a3ad2e2e9f")
version("1.5", sha256="6b069d7207febeb62440e89245e8b18fcdf40b6170d2ec2ef33c252ed16db2d4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("ndctl", default=False, description="Build components requiring ndctl")
variant("doc", default=False, description="Build documentation")
variant("experimental", default=False, description="Build experimental stuff")
diff --git a/var/spack/repos/builtin/packages/pmemkv/package.py b/var/spack/repos/builtin/packages/pmemkv/package.py
index 73d4cf99ab..1c09754003 100644
--- a/var/spack/repos/builtin/packages/pmemkv/package.py
+++ b/var/spack/repos/builtin/packages/pmemkv/package.py
@@ -23,6 +23,9 @@ class Pmemkv(CMakePackage):
version("1.0.3", sha256="cae393a01ba69364271c5894046bf2c611f677ac88012f2473fadf6fcd20ff29")
version("1.0.2", sha256="a0cbbb60c0342d6fd0b73d2cee1a1423c6a894b8d21daf669016809961fe23b8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libpmemobj-cpp@develop", when="@master")
depends_on("libpmemobj-cpp@1.12:", when="@1.4:")
depends_on("libpmemobj-cpp@1.11:", when="@1.3:")
diff --git a/var/spack/repos/builtin/packages/pmerge/package.py b/var/spack/repos/builtin/packages/pmerge/package.py
index 5262493d54..ce51a38c74 100644
--- a/var/spack/repos/builtin/packages/pmerge/package.py
+++ b/var/spack/repos/builtin/packages/pmerge/package.py
@@ -21,6 +21,8 @@ class Pmerge(AutotoolsPackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("automake@1.14.0:1.14", type="build")
depends_on("autoconf", type="build")
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/pmgr-collective/package.py b/var/spack/repos/builtin/packages/pmgr-collective/package.py
index 2f8b0f1246..99d862a789 100644
--- a/var/spack/repos/builtin/packages/pmgr-collective/package.py
+++ b/var/spack/repos/builtin/packages/pmgr-collective/package.py
@@ -11,10 +11,12 @@ class PmgrCollective(Package):
MPI jobs."""
homepage = "https://www.sourceforge.net/projects/pmgrcollective"
- url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz"
+ url = "https://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz"
version("1.0", sha256="c8022d1128ce5e8f637166af6e55c13700e665550e468b8cdb1531441c6bb7f5")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make('PREFIX="' + prefix + '"')
make('PREFIX="' + prefix + '"', "install")
diff --git a/var/spack/repos/builtin/packages/pmix/package.py b/var/spack/repos/builtin/packages/pmix/package.py
index 9985078278..c1b41a78ac 100644
--- a/var/spack/repos/builtin/packages/pmix/package.py
+++ b/var/spack/repos/builtin/packages/pmix/package.py
@@ -2,6 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
import os
import platform
@@ -30,76 +31,169 @@ class Pmix(AutotoolsPackage):
while maintaining strict separation between it and the standard
itself."""
- homepage = "https://pmix.org"
- url = "https://github.com/pmix/pmix/releases/download/v3.1.3/pmix-3.1.3.tar.bz2"
+ homepage = "https://openpmix.github.io/"
+ url = "https://github.com/openpmix/openpmix/releases/download/v5.0.3/pmix-5.0.3.tar.bz2"
git = "https://github.com/openpmix/openpmix.git"
+
maintainers("rhc54")
license("BSD-3-Clause-Open-MPI")
- # Branches 4.2 & 5.0 will also need submodules
version("master", branch="master", submodules=True)
+ version("5.0.3", sha256="3f779434ed59fc3d63e4f77f170605ac3a80cd40b1f324112214b0efbdc34f13")
+ version("5.0.2", sha256="28227ff2ba925da2c3fece44502f23a91446017de0f5a58f5cea9370c514b83c")
version("5.0.1", sha256="d4371792d4ba4c791e1010100b4bf9a65500ababaf5ff25d681f938527a67d4a")
version("5.0.0", sha256="92a85c4946346816c297ac244fbaf4f723bba87fb7e4424a057c2dabd569928d")
+ version("4.2.9", sha256="6b11f4fd5c9d7f8e55fc6ebdee9af04b839f44d06044e58cea38c87c168784b3")
+ version("4.2.8", sha256="09b442878e233f3d7f11168e129b32e5c8573c3ab6aaa9f86cf2d59c31a43dc9")
+ version("4.2.7", sha256="ac9cf58a0bf01bfacd51d342100234f04c740ec14257e4492d1dd0207ff2a917")
version("4.2.6", sha256="10b0d5a7fca70272e9427c677557578ac452cea02aeb00e30dec2116d20c3cd0")
version("4.2.5", sha256="a89c2c5dc69715a4df1e76fdc4318299386c184623a1d0d5eb1fb062e14b0d2b")
version("4.2.4", sha256="c4699543f2278d3a78bdac72b4b2da9cd92d11d18478d66522b8991764b021c8")
version("4.2.3", sha256="c3d9d6885ae39c15627a86dc4718e050baf604acda71b8b9e2ee3b12ad5c2d2a")
version("4.2.2", sha256="935b2f492e4bc409017f1425a83366aa72a7039605ea187c9fac7bb1371cd73c")
version("4.2.1", sha256="3c992fa0d653b56e0e409bbaec9de8fc1b82c948364dbb28545442315ed2a179")
- version("4.1.2", sha256="670d3a02b39fb2126fe8084174cf03c484e027b5921b5c98a851108134e2597a")
- version("4.1.1", sha256="0527a15d616637b95975d238bbc100b244894518fbba822cd8f46589ca61ccec")
- version("4.1.0", sha256="145f05a6c621bfb3fc434776b615d7e6d53260cc9ba340a01f55b383e07c842e")
- version("3.2.3", sha256="9b835f23c2f94a193c14012ee68b3657a61c568598cdd1212a3716b32d41a135")
- version("3.2.2", sha256="7e7fafe2b338dab42a94002d99330a5bb0ebbdd06381ec65953a87c94db3dd23")
- version("3.2.1", sha256="7e5db8ada5828cf85c12f70db6bfcf777d13e5c4c73b2206bb5e394d47066a2b")
- version("3.1.6", sha256="3df0e0cb0cae67b59edba1d90f55d73467be8404874fe89056690739e039a840")
- version("3.1.5", sha256="88934195174455df478b996313095df25b51d0caf5a5cce01b22f0ccdc6c5cf7")
- version("3.1.3", sha256="118acb9c4e10c4e481406dcffdfa762f314af50db75336bf8460e53b56dc439d")
- version("3.1.2", sha256="28aed0392d4ca2cdfbdd721e6210c94dadc9830677fea37a0abe9d592c00f9c3")
- version("3.0.2", sha256="df68f35a3ed9517eeade80b13855cebad8fde2772b36a3f6be87559b6d430670")
- version("3.0.1", sha256="b81055d2c0d61ef5a451b63debc39c820bcd530490e2e4dcb4cdbacb618c157c")
- version("3.0.0", sha256="ee8f68107c24b706237a53333d832445315ae37de6773c5413d7fda415a6e2ee")
- version("2.2.3", sha256="6fa5d45eb089e29101190c645e986342a24a03a4ea3a936db0b120aafa45b1f0")
- version("2.2.2", sha256="cd951dbda623fadc5b32ae149d8cc41f9462eac4d718d089340911b1a7c20714")
- version("2.1.4", sha256="eb72d292e76e200f02cf162a477eecea2559ef3ac2edf50ee95b3fe3983d033e")
- version("2.1.3", sha256="281283133498e7e5999ed5c6557542c22408bc9eb51ecbcf7696160616782a41")
- version("2.1.2", sha256="94bb9c801c51a6caa1b8cef2b85ecf67703a5dfa4d79262e6668c37c744bb643")
- version("2.0.1", sha256="ba6e0f32936b1859741adb221e18b2c1ee7dc53a6b374b9f7831adf1692b15fd")
- version("1.2.5", sha256="a2b02d489ee730c06ee40e7f9ffcebb6c35bcb4f95153fab7c4276a3add6ae31")
-
- variant(
- "pmi_backwards_compatibility",
- default=True,
- description="Toggle pmi backwards compatibility",
+ version(
+ "4.1.2",
+ sha256="670d3a02b39fb2126fe8084174cf03c484e027b5921b5c98a851108134e2597a",
+ deprecated=True,
+ )
+ version(
+ "4.1.1",
+ sha256="0527a15d616637b95975d238bbc100b244894518fbba822cd8f46589ca61ccec",
+ deprecated=True,
+ )
+ version(
+ "4.1.0",
+ sha256="145f05a6c621bfb3fc434776b615d7e6d53260cc9ba340a01f55b383e07c842e",
+ deprecated=True,
+ )
+ version(
+ "3.2.3",
+ sha256="9b835f23c2f94a193c14012ee68b3657a61c568598cdd1212a3716b32d41a135",
+ deprecated=True,
+ )
+ version(
+ "3.2.2",
+ sha256="7e7fafe2b338dab42a94002d99330a5bb0ebbdd06381ec65953a87c94db3dd23",
+ deprecated=True,
+ )
+ version(
+ "3.2.1",
+ sha256="7e5db8ada5828cf85c12f70db6bfcf777d13e5c4c73b2206bb5e394d47066a2b",
+ deprecated=True,
+ )
+ version(
+ "3.1.6",
+ sha256="3df0e0cb0cae67b59edba1d90f55d73467be8404874fe89056690739e039a840",
+ deprecated=True,
+ )
+ version(
+ "3.1.5",
+ sha256="88934195174455df478b996313095df25b51d0caf5a5cce01b22f0ccdc6c5cf7",
+ deprecated=True,
+ )
+ version(
+ "3.1.3",
+ sha256="118acb9c4e10c4e481406dcffdfa762f314af50db75336bf8460e53b56dc439d",
+ deprecated=True,
+ )
+ version(
+ "3.1.2",
+ sha256="28aed0392d4ca2cdfbdd721e6210c94dadc9830677fea37a0abe9d592c00f9c3",
+ deprecated=True,
+ )
+ version(
+ "3.0.2",
+ sha256="df68f35a3ed9517eeade80b13855cebad8fde2772b36a3f6be87559b6d430670",
+ deprecated=True,
+ )
+ version(
+ "3.0.1",
+ sha256="b81055d2c0d61ef5a451b63debc39c820bcd530490e2e4dcb4cdbacb618c157c",
+ deprecated=True,
+ )
+ version(
+ "3.0.0",
+ sha256="ee8f68107c24b706237a53333d832445315ae37de6773c5413d7fda415a6e2ee",
+ deprecated=True,
+ )
+ version(
+ "2.2.3",
+ sha256="6fa5d45eb089e29101190c645e986342a24a03a4ea3a936db0b120aafa45b1f0",
+ deprecated=True,
+ )
+ version(
+ "2.2.2",
+ sha256="cd951dbda623fadc5b32ae149d8cc41f9462eac4d718d089340911b1a7c20714",
+ deprecated=True,
+ )
+ version(
+ "2.1.4",
+ sha256="eb72d292e76e200f02cf162a477eecea2559ef3ac2edf50ee95b3fe3983d033e",
+ deprecated=True,
+ )
+ version(
+ "2.1.3",
+ sha256="281283133498e7e5999ed5c6557542c22408bc9eb51ecbcf7696160616782a41",
+ deprecated=True,
+ )
+ version(
+ "2.1.2",
+ sha256="94bb9c801c51a6caa1b8cef2b85ecf67703a5dfa4d79262e6668c37c744bb643",
+ deprecated=True,
+ )
+ version(
+ "2.0.1",
+ sha256="ba6e0f32936b1859741adb221e18b2c1ee7dc53a6b374b9f7831adf1692b15fd",
+ deprecated=True,
+ )
+ version(
+ "1.2.5",
+ sha256="a2b02d489ee730c06ee40e7f9ffcebb6c35bcb4f95153fab7c4276a3add6ae31",
+ deprecated=True,
)
+ variant("docs", default=False, when="@master", description="Build documentation")
+ variant("munge", default=False, description="Enable MUNGE support")
+ variant("python", default=False, when="@4.1.2:", description="Enable Python bindings")
variant(
"restful",
default=False,
when="@4:",
- description="allow a PMIx server to request services from " "a system-level REST server",
+ description="Allow a PMIx server to request services from a system-level REST server",
+ )
+ variant(
+ "pmi_backwards_compatibility",
+ default=True,
+ when="@1.2.5:3",
+ description="Enable PMI backwards compatibility",
)
- variant("python", default=False, when="@4.1.2:", description="Enable python bindigs")
-
- variant("docs", default=False, description="Build manpages")
-
+ depends_on("c", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("m4", type="build", when="@master")
- depends_on("autoconf", type="build", when="@master")
- depends_on("automake", type="build", when="@master")
- depends_on("libtool", type="build", when="@master")
+ depends_on("autoconf@2.69:", type="build", when="@master")
+ depends_on("automake@1.13.4:", type="build", when="@master")
+ depends_on("libtool@2.4.2:", type="build", when="@master")
+ depends_on("flex@2.5.39:", type="build", when="@master")
depends_on("perl", type="build", when="@master")
- depends_on("pandoc", type="build", when="+docs")
- depends_on("pkgconfig", type="build")
+ depends_on("python@3.7:", type="build", when="+docs")
+ depends_on("py-sphinx@5:", type="build", when="+docs")
+ depends_on("py-recommonmark", type="build", when="+docs")
+ depends_on("py-docutils", type="build", when="+docs")
+ depends_on("py-sphinx-rtd-theme", type="build", when="+docs")
depends_on("libevent@2.0.20:")
- depends_on("hwloc@1.0:1", when="@:2")
- depends_on("hwloc@1.11:1,2:", when="@3:")
+ depends_on("hwloc@1.11:", when="@3:")
+ depends_on("hwloc@1", when="@:2")
+ depends_on("zlib-api", when="@2:")
depends_on("curl", when="+restful")
depends_on("jansson@2.11:", when="+restful")
depends_on("python", when="+python")
depends_on("py-cython", when="+python")
+ depends_on("py-setuptools", when="+python")
+ depends_on("munge", when="+munge")
def autoreconf(self, spec, prefix):
"""Only needed when building from git checkout"""
@@ -125,7 +219,13 @@ class Pmix(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- config_args = ["--enable-shared", "--enable-static", "--disable-sphinx", "--without-munge"]
+ config_args = ["--enable-shared", "--enable-static"]
+
+ if spec.satisfies("~docs") or spec.satisfies("@4.2.3:5"):
+ config_args.append("--disable-sphinx")
+
+ if spec.satisfies("@2:"):
+ config_args.append("--with-zlib=" + spec["zlib-api"].prefix)
config_args.append("--with-libevent=" + spec["libevent"].prefix)
config_args.append("--with-hwloc=" + spec["hwloc"].prefix)
@@ -145,15 +245,21 @@ class Pmix(AutotoolsPackage):
config_args.extend(self.enable_or_disable("python-bindings", variant="python"))
+ if spec.satisfies("+munge"):
+ config_args.append("--with-munge=" + spec["munge"].prefix)
+ else:
+ config_args.append("--without-munge")
+
+ if spec.satisfies("+restful"):
+ config_args.append("--with-curl=" + spec["curl"].prefix)
+ config_args.append("--with-jansson=" + spec["jansson"].prefix)
+
config_args.extend(
self.enable_or_disable(
"pmi-backward-compatibility", variant="pmi_backwards_compatibility"
)
)
- if "~docs" in self.spec:
- config_args.append("--disable-man-pages")
-
# Versions < 2.1.1 have a bug in the test code that *sometimes*
# causes problems on strict alignment architectures such as
# aarch64. Work-around is to just not build the test code.
diff --git a/var/spack/repos/builtin/packages/pmlib/package.py b/var/spack/repos/builtin/packages/pmlib/package.py
index 2ff509ad00..01fd746cf5 100644
--- a/var/spack/repos/builtin/packages/pmlib/package.py
+++ b/var/spack/repos/builtin/packages/pmlib/package.py
@@ -21,6 +21,10 @@ class Pmlib(CMakePackage):
version("master", branch="master")
version("6.4.1", commit="0a35f5bec8c12e532e5a1bdac8c32c659fd3ee11")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Activate MPI support")
variant("example", default=False, description="This option turns on compiling sample codes.")
variant("fortran", default=False, description="This option tells a compiler to use a Fortran.")
diff --git a/var/spack/repos/builtin/packages/pnfft/package.py b/var/spack/repos/builtin/packages/pnfft/package.py
index e3d765f8cb..ae7530cabd 100644
--- a/var/spack/repos/builtin/packages/pnfft/package.py
+++ b/var/spack/repos/builtin/packages/pnfft/package.py
@@ -21,6 +21,9 @@ class Pnfft(AutotoolsPackage):
"1.0.7-alpha", sha256="fda558ff57ee3119754363bb6e6739338680d2d6860fe7dc42009d85562bd67a"
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("pfft")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/pngquant/package.py b/var/spack/repos/builtin/packages/pngquant/package.py
index 4d58346a98..1cbfd08658 100644
--- a/var/spack/repos/builtin/packages/pngquant/package.py
+++ b/var/spack/repos/builtin/packages/pngquant/package.py
@@ -19,4 +19,6 @@ class Pngquant(AutotoolsPackage):
version("2.12.5", sha256="3638936cf6270eeeaabcee42e10768d78e4dc07cac9310307835c1f58b140808")
+ depends_on("c", type="build") # generated
+
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/pngwriter/package.py b/var/spack/repos/builtin/packages/pngwriter/package.py
index 84bb9b3c38..e11fb3f121 100644
--- a/var/spack/repos/builtin/packages/pngwriter/package.py
+++ b/var/spack/repos/builtin/packages/pngwriter/package.py
@@ -16,7 +16,7 @@ class Pngwriter(CMakePackage):
bezier curves, opening existing PNG images and more.
"""
- homepage = "http://pngwriter.sourceforge.net/"
+ homepage = "https://pngwriter.sourceforge.net/"
url = "https://github.com/pngwriter/pngwriter/archive/0.5.6.tar.gz"
git = "https://github.com/pngwriter/pngwriter.git"
@@ -28,6 +28,8 @@ class Pngwriter(CMakePackage):
version("0.6.0", sha256="5107c6be0bfadf76ba4d01a553f7e060b5a7763ca7d9374ef3e7e59746b3911e")
version("0.5.6", sha256="0c5f3c1fd6f2470e88951f4b8add64cf5f5a7e7038115dba69604139359b08f1")
+ depends_on("cxx", type="build") # generated
+
depends_on("libpng")
depends_on("zlib-api")
depends_on("freetype")
diff --git a/var/spack/repos/builtin/packages/pnmpi/package.py b/var/spack/repos/builtin/packages/pnmpi/package.py
index 331ca93767..c875fd9070 100644
--- a/var/spack/repos/builtin/packages/pnmpi/package.py
+++ b/var/spack/repos/builtin/packages/pnmpi/package.py
@@ -17,6 +17,10 @@ class Pnmpi(CMakePackage):
version("1.7", sha256="523228bdc220ae417d6812c0766bba698a240d71c69981cb0cb2b09a75ef4a9e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=False, description="Configure PnMPI with Fortran support")
variant(
"tests", default=False, description='Build test cases and enable "test" makefile target'
diff --git a/var/spack/repos/builtin/packages/poamsa/package.py b/var/spack/repos/builtin/packages/poamsa/package.py
index 1193865c68..cf9deefd35 100644
--- a/var/spack/repos/builtin/packages/poamsa/package.py
+++ b/var/spack/repos/builtin/packages/poamsa/package.py
@@ -12,11 +12,13 @@ class Poamsa(MakefilePackage):
sensitivity, and the superior ability to handle branching / indels
in the alignment."""
- homepage = "https://sourceforge.net/projects/poamsa"
+ homepage = "https://sourceforge.net/projects/poamsa/"
url = "https://downloads.sourceforge.net/project/poamsa/poamsa/2.0/poaV2.tar.gz"
version("2.0", sha256="d98d8251af558f442d909a6527694825ef6f79881b7636cad4925792559092c2")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
url = "https://downloads.sourceforge.net/project/poamsa/poamsa/{0}/poaV{1}.tar.gz"
return url.format(version.dotted, version.up_to(1))
diff --git a/var/spack/repos/builtin/packages/pocl/package.py b/var/spack/repos/builtin/packages/pocl/package.py
index da8ad4e6a6..1c51cfb5e5 100644
--- a/var/spack/repos/builtin/packages/pocl/package.py
+++ b/var/spack/repos/builtin/packages/pocl/package.py
@@ -15,13 +15,17 @@ class Pocl(CMakePackage):
and devices, both for homogeneous CPU and heterogeneous
GPUs/accelerators."""
- homepage = "http://portablecl.org"
+ homepage = "https://portablecl.org"
url = "https://github.com/pocl/pocl/archive/v1.1.tar.gz"
git = "https://github.com/pocl/pocl.git"
license("MIT")
- version("master", branch="master")
+ version("main", branch="main")
+ version("6.0", sha256="de9710223fc1855f833dbbf42ea2681e06aa8ec0464f0201104dc80a74dfd1f2")
+ version("5.0", sha256="fd0bb6e50c2286278c11627b71177991519e1f7ab2576bd8d8742974db414549")
+ version("4.0", sha256="7f4e8ab608b3191c2b21e3f13c193f1344b40aba7738f78762f7b88f45e8ce03")
+ version("3.1", sha256="82314362552e050aff417318dd623b18cf0f1d0f84f92d10a7e3750dd12d3a9a")
version("3.0", sha256="a3fd3889ef7854b90b8e4c7899c5de48b7494bf770e39fba5ad268a5cbcc719d")
version("1.8", sha256="0f63377ae1826e16e90038fc8e7f65029be4ff6f9b059f6907174b5c0d1f8ab2")
version("1.7", sha256="5f6bbc391ba144bc7becc3b90888b25468460d5aa6830f63a3b066137e7bfac3")
@@ -33,6 +37,9 @@ class Pocl(CMakePackage):
version("1.1", sha256="1e8dd0693a88c84937754df947b202871a40545b1b0a97ebefa370b0281c3c53")
version("1.0", sha256="94bd86a2f9847c03e6c3bf8dca12af3734f8b272ffeacbc3fa8fcca58844b1d4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
conflicts("@:1.5", when="target=a64fx", msg="a64fx is supported by pocl v1.6 and above.")
# < 3.0 provided full OpenCL 1.2 support and some intermediate level of
@@ -41,14 +48,23 @@ class Pocl(CMakePackage):
provides("opencl@2.0", when="^llvm@:13")
provides("opencl@3.0", when="@3: ^llvm@14:")
+ depends_on("cmake @3.12:", type="build", when="@4:")
+ depends_on("cmake @3.9:", type="build", when="@3:")
+ depends_on("cmake @3.3:", type="build", when="@1.6:")
depends_on("cmake @2.8.12:", type="build")
depends_on("hwloc")
depends_on("hwloc@:1", when="@:1.1")
- depends_on("libtool", type=("build", "link", "run"))
+ depends_on("libtool", type="link", when="@:1.3") # links against libltdl
depends_on("pkgconfig", type="build")
depends_on("llvm +clang")
- depends_on("llvm @14:15", when="@master")
+ # PoCL aims to support **the latest LLVM version** at the time of PoCL release,
+ # **plus the previous** LLVM version
+ depends_on("llvm @18:19", when="@master")
+ depends_on("llvm @17:18", when="@6.0")
+ depends_on("llvm @16:17", when="@5.0")
+ depends_on("llvm @15:16", when="@4.0")
+ depends_on("llvm @14:15", when="@3.1")
depends_on("llvm @13:14", when="@3.0")
depends_on("llvm @12:13", when="@1.8")
depends_on("llvm @11:12", when="@1.7")
@@ -77,7 +93,7 @@ class Pocl(CMakePackage):
if version >= Version("1.0"):
url = "https://github.com/pocl/pocl/archive/v{0}.tar.gz"
else:
- url = "http://portablecl.org/downloads/pocl-{0}.tar.gz"
+ url = "https://portablecl.org/downloads/pocl-{0}.tar.gz"
return url.format(version.up_to(2))
diff --git a/var/spack/repos/builtin/packages/podio/cpack.patch b/var/spack/repos/builtin/packages/podio/cpack.patch
deleted file mode 100644
index e685f9bc13..0000000000
--- a/var/spack/repos/builtin/packages/podio/cpack.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -86,7 +86,7 @@ include(cmake/podioMacros.cmake)
- include(CTest)
-
- #--- enable CPack --------------------------------------------------------------
--include(cmake/podioCPack.cmake)
-+#include(cmake/podioCPack.cmake)
-
- #--- target for Doxygen documentation ------------------------------------------
- if(CREATE_DOC)
diff --git a/var/spack/repos/builtin/packages/podio/dictloading.patch b/var/spack/repos/builtin/packages/podio/dictloading.patch
deleted file mode 100644
index 15ec301b13..0000000000
--- a/var/spack/repos/builtin/packages/podio/dictloading.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 120a899..05991f1 100755
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -41,7 +41,7 @@ SET(headers
- ${CMAKE_SOURCE_DIR}/include/podio/PythonEventStore.h
- )
- PODIO_GENERATE_DICTIONARY(podioDict ${headers} SELECTION selection.xml
-- OPTIONS --library ${CMAKE_SHARED_LIBRARY_PREFIX}podio${CMAKE_SHARED_LIBRARY_SUFFIX}
-+ OPTIONS --library ${CMAKE_SHARED_LIBRARY_PREFIX}podioDict${CMAKE_SHARED_LIBRARY_SUFFIX}
- )
- # prevent generating dictionary twice
- set_target_properties(podioDict-dictgen PROPERTIES EXCLUDE_FROM_ALL TRUE)
-@@ -58,5 +58,5 @@ install(TARGETS podio podioDict podioRootIO
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/podio DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/podioDictDict.rootmap
-- ${CMAKE_CURRENT_BINARY_DIR}/libpodio_rdict.pcm
-+ ${CMAKE_CURRENT_BINARY_DIR}/libpodioDict_rdict.pcm
- DESTINATION "${CMAKE_INSTALL_LIBDIR}")
diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py
index 6fc0e46b79..8b76e75f99 100644
--- a/var/spack/repos/builtin/packages/podio/package.py
+++ b/var/spack/repos/builtin/packages/podio/package.py
@@ -20,108 +20,58 @@ class Podio(CMakePackage):
tags = ["hep", "key4hep"]
version("master", branch="master")
- version("0.17.4", sha256="3ca86323c86e05e901f596a98fe84aeb2476ceed8c0b0e0b37049c23b903a9ad")
- version("0.17.3", sha256="079517eba9c43d01255ef8acd88468c3ead7bb9d8fed11792e121bb481d54dee")
- version("0.17.2", sha256="5b519335c4e1708f71ed85b3cac8ca81e544cc4572a5c37019ce9fc414c5e74d")
- version("0.17.1", sha256="97d6c5f81d50ee42bf7c01f041af2fd333c806f1bbf0a4828ca961a24cea6bb2")
- version("0.17", sha256="0c19f69970a891459cab227ab009514f1c1ce102b70e8c4b7d204eb6a0c643c1")
- version("0.16.7", sha256="8af7c947e2637f508b7af053412bacd9218d41a455d69addd7492f05b7a4338d")
+ version("1.1", sha256="2cb5040761f3da4383e1f126da25d68e99ecd8398e0ff12e7475a3745a7030a6")
+ version("1.0.1", sha256="915531a2bcf638011bb6cc19715bbc46d846ec8b985555a1afdcd6abc017e21b")
+ version("1.0", sha256="491f335e148708e387e90e955a6150e1fc2e01bf6b4980b65e257ab0619559a9")
+ version("0.99", sha256="c823918a6ec1365d316e0a753feb9d492e28903141dd124a1be06efac7c1877a")
version(
- "0.16.6",
- sha256="859f7cd16bd2b833bee9c1f33eb4cdbc2a0c2b1a48a853f67c30e8a0301d16df",
- deprecated=True,
- )
- version(
- "0.16.5",
- sha256="42135e4d0e11be6f0d88748799fa2ec985514d4b4c979a10a56a00a378f65ee0",
- deprecated=True,
- )
- version(
- "0.16.3",
- sha256="d8208f98496af68ca8d02d302f428aab510e50d07575b90c3477fff7e499335b",
- deprecated=True,
- )
- version(
- "0.16.2",
- sha256="faf7167290faf322f23c734adff19904b10793b5ab14e1dfe90ce257c225114b",
- deprecated=True,
- )
- version(
- "0.16.1",
- sha256="23cd8dfd00f9cd5ae0b473ae3279fa2c22a2d90fb6c07b37d56e63a80dd76ab2",
- deprecated=True,
- )
- version(
- "0.16",
- sha256="4e149c2c9be9f9ca3a6d863498bb0f642dda1a43a19ac1afe7f99854ded5c510",
- deprecated=True,
- )
- version(
- "0.15",
- sha256="6c1520877ba1bce250e35a2a56c0a3da89fae0916c5ed7d5548d658237e067d9",
- deprecated=True,
- )
- version(
- "0.14.3",
- sha256="2a7a405dedc7f6980a0aad7df87b427a1f43bcf6d923a9bcce1698fd296359f7",
- deprecated=True,
- )
- version(
- "0.14.1",
- sha256="361ac3f3ec6f5a4830729ab45f96c19f0f62e9415ff681f7c6cdb4ebdb796f72",
- deprecated=True,
- )
- version(
- "0.14",
- sha256="47f99f1190dc71d6deb52a2b1831250515dbd5c9e0f263c3c8553ffc5b260dfb",
+ "0.17.4",
+ sha256="3ca86323c86e05e901f596a98fe84aeb2476ceed8c0b0e0b37049c23b903a9ad",
deprecated=True,
)
version(
- "0.13.2",
- sha256="645f6915ca6f34789157c0a9dc8b0e9ec901e019b96eb8a68fb39011602e92eb",
+ "0.17.3",
+ sha256="079517eba9c43d01255ef8acd88468c3ead7bb9d8fed11792e121bb481d54dee",
deprecated=True,
)
version(
- "0.13.1",
- sha256="2ae561c2a0e46c44245aa2098772374ad246c9fcb1956875c95c69c963501353",
+ "0.17.2",
+ sha256="5b519335c4e1708f71ed85b3cac8ca81e544cc4572a5c37019ce9fc414c5e74d",
deprecated=True,
)
version(
- "0.13",
- sha256="e9cbd4e25730003d3706ad82e28b15cb5bdc524a78b0a26e90b89ea852101498",
+ "0.17.1",
+ sha256="97d6c5f81d50ee42bf7c01f041af2fd333c806f1bbf0a4828ca961a24cea6bb2",
deprecated=True,
)
version(
- "0.12",
- sha256="1729a2ce21e8b307fc37dfb9a9f5ae031e9f4be4992385cf99dba3e5fdf5323a",
+ "0.17",
+ sha256="0c19f69970a891459cab227ab009514f1c1ce102b70e8c4b7d204eb6a0c643c1",
deprecated=True,
)
version(
- "0.11",
- sha256="4b2765566a14f0ddece2c894634e0a8e4f42f3e44392addb9110d856f6267fb6",
+ "0.16.7",
+ sha256="8af7c947e2637f508b7af053412bacd9218d41a455d69addd7492f05b7a4338d",
deprecated=True,
)
version(
- "0.10",
- sha256="b5b42770ec8b96bcd2748abc05669dd3e4d4cc84f81ed57d57d2eda1ade90ef2",
- deprecated=True,
- )
- version(
- "0.9.2",
- sha256="8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240",
+ "0.16.6",
+ sha256="859f7cd16bd2b833bee9c1f33eb4cdbc2a0c2b1a48a853f67c30e8a0301d16df",
deprecated=True,
)
version(
- "0.9",
- sha256="3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f",
+ "0.16.5",
+ sha256="42135e4d0e11be6f0d88748799fa2ec985514d4b4c979a10a56a00a378f65ee0",
deprecated=True,
)
version(
- "0.8",
- sha256="9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327",
+ "0.16.3",
+ sha256="d8208f98496af68ca8d02d302f428aab510e50d07575b90c3477fff7e499335b",
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default="17",
@@ -131,14 +81,16 @@ class Podio(CMakePackage):
)
variant("sio", default=False, description="Build the SIO I/O backend")
variant("rntuple", default=False, description="Build the RNTuple backend")
-
- # cpack config throws an error on some systems
- patch("cpack.patch", when="@:0.10.0")
- patch("dictloading.patch", when="@0.10.0")
- patch("python-tests.patch", when="@:0.14.0")
+ variant(
+ "datasource",
+ default=False,
+ description="Build the RDataSource for reading podio collections",
+ when="@1.0.2:",
+ )
depends_on("root@6.08.06: cxxstd=17", when="cxxstd=17")
- depends_on("root@6.28.04:", when="+rntuple")
+ depends_on("root@6.14:", when="+datasource")
+ depends_on("root@6.28.04: +root7", when="+rntuple")
depends_on("root@6.28:", when="@0.17:")
for cxxstd in ("17", "20"):
depends_on("root cxxstd={}".format(cxxstd), when="cxxstd={}".format(cxxstd))
@@ -146,38 +98,53 @@ class Podio(CMakePackage):
depends_on("cmake@3.12:", type="build")
depends_on("python", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-jinja2@2.10.1:", type=("build", "run"), when="@0.12.0:")
+ depends_on("py-jinja2@2.10.1:", type=("build", "run"))
depends_on("sio", type=("build", "link"), when="+sio")
- depends_on("catch2@3.0.1:", type=("test"), when="@0.13:0.16.5")
+ depends_on("catch2@3.0.1:", type=("test"), when="@:0.16.5")
depends_on("catch2@3.1:", type=("test"), when="@0.16.6:")
+ depends_on("py-graphviz", type=("run"))
depends_on("py-tabulate", type=("run", "test"), when="@0.16.6:")
- conflicts("+sio", when="@:0.12", msg="sio support requires at least podio@0.13")
conflicts("+rntuple", when="@:0.16", msg="rntuple support requires at least podio@0.17")
+ # See https://github.com/AIDASoft/podio/pull/600
+ patch(
+ "https://github.com/AIDASoft/podio/commit/0222a077aaff817b21a46a590af0f8329dd27d67.patch?full_index=1",
+ when="@0.17:0.99",
+ sha256="9e42e0995634f2afdd358cd19383e882dc9143cce1b6afb0d2c4a1ec9add6e15",
+ )
+
+ # See https://github.com/AIDASoft/podio/pull/599 that landed after 0.99
+ extends("python", when="@1.0:")
+
def cmake_args(self):
args = [
self.define_from_variant("ENABLE_SIO", "sio"),
self.define_from_variant("ENABLE_RNTUPLE", "rntuple"),
+ self.define_from_variant("ENABLE_DATASOURCE", "datasource"),
self.define("CMAKE_CXX_STANDARD", self.spec.variants["cxxstd"].value),
self.define("BUILD_TESTING", self.run_tests),
]
return args
def setup_run_environment(self, env):
- env.prepend_path("PYTHONPATH", self.prefix.python)
+ if self.spec.satisfies("@:0.99"):
+ # After 0.99 podio installs its python bindings into a more standard place
+ env.prepend_path("PYTHONPATH", self.prefix.python)
+
env.prepend_path("LD_LIBRARY_PATH", self.spec["podio"].libs.directories[0])
- if "+sio" in self.spec and self.version >= Version("0.16"):
+ if "+sio" in self.spec:
# sio needs to be on LD_LIBRARY_PATH for ROOT to be able to
# dynamicaly load the python bindings library
env.prepend_path("LD_LIBRARY_PATH", self.spec["sio"].libs.directories[0])
- if self.spec.satisfies("@0.16.1:"):
- # Frame header needs to be available for python bindings
- env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include)
+ # Frame header needs to be available for python bindings
+ env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include)
def setup_dependent_build_environment(self, env, dependent_spec):
- env.prepend_path("PYTHONPATH", self.prefix.python)
+ if self.spec.satisfies("@:0.99"):
+ env.prepend_path("PYTHONPATH", self.prefix.python)
+
env.prepend_path("LD_LIBRARY_PATH", self.spec["podio"].libs.directories[0])
env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include)
if self.spec.satisfies("+sio @0.17:"):
diff --git a/var/spack/repos/builtin/packages/podio/python-tests.patch b/var/spack/repos/builtin/packages/podio/python-tests.patch
deleted file mode 100644
index 06d14c6e61..0000000000
--- a/var/spack/repos/builtin/packages/podio/python-tests.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-index 5b6e13e..ac9ccf5 100644
---- a/tests/CMakeLists.txt
-+++ b/tests/CMakeLists.txt
-@@ -106,7 +106,7 @@ endif()
- add_test( NAME pyunittest COMMAND python -m unittest discover -s ${CMAKE_SOURCE_DIR}/python)
- set_property(TEST pyunittest
- PROPERTY ENVIRONMENT
-- LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/src:$ENV{LD_LIBRARY_PATH}
-+ LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree>
- PYTHONPATH=${CMAKE_SOURCE_DIR}/python:$ENV{PYTHONPATH}
- ROOT_INCLUDE_PATH=${CMAKE_SOURCE_DIR}/tests/datamodel:${ROOT_INCLUDE_PATH})
- set_property(TEST pyunittest PROPERTY DEPENDS write)
diff --git a/var/spack/repos/builtin/packages/podman/package.py b/var/spack/repos/builtin/packages/podman/package.py
index bbc739a362..1d39221de5 100644
--- a/var/spack/repos/builtin/packages/podman/package.py
+++ b/var/spack/repos/builtin/packages/podman/package.py
@@ -20,6 +20,8 @@ class Podman(Package):
version("3.4.7", sha256="4af6606dd072fe946960680611ba65201be435b43edbfc5cc635b2a01a899e6e")
version("3.4.2", sha256="b0c4f9a11eb500b1d440d5e51a6c0c632aa4ac458e2dc0362f50f999eb7fbf31")
+ depends_on("c", type="build") # generated
+
# See <https://github.com/containers/podman/issues/16996> for the
# respective issue and the suggested patch
# issue was fixed as of 4.4.0
diff --git a/var/spack/repos/builtin/packages/poke/package.py b/var/spack/repos/builtin/packages/poke/package.py
index f9e24428ea..a3dbde71a1 100644
--- a/var/spack/repos/builtin/packages/poke/package.py
+++ b/var/spack/repos/builtin/packages/poke/package.py
@@ -21,6 +21,8 @@ class Poke(AutotoolsPackage, GNUMirrorPackage):
version("3.0", sha256="79a9b2f33c9f8c327c499afadaeeabfeecf6ad4988924d2c6c6f317e50317add")
version("1.0", sha256="de930b8700c0772b3c2cd0d0ca35f50fd3d77bdf82c6251eb516b49e8ca25b0a")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig")
depends_on("readline")
depends_on("bdw-gc")
diff --git a/var/spack/repos/builtin/packages/polymake/package.py b/var/spack/repos/builtin/packages/polymake/package.py
index 8fe1425874..c8933eace7 100644
--- a/var/spack/repos/builtin/packages/polymake/package.py
+++ b/var/spack/repos/builtin/packages/polymake/package.py
@@ -18,6 +18,10 @@ class Polymake(Package):
version("3.0r2", sha256="e7c0f8e3a45ea288d2fb4ae781a1dcea913ef9c275fed401632cdb11a672d6dc")
version("3.0r1", sha256="cdc223716b1cc3f4f3cc126089a438f9d12390caeed78291a87565717c7b504d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Note: Could also be built with nauty instead of bliss
depends_on("bliss")
diff --git a/var/spack/repos/builtin/packages/polyml/package.py b/var/spack/repos/builtin/packages/polyml/package.py
new file mode 100644
index 0000000000..658dbf3a6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/polyml/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Polyml(AutotoolsPackage):
+ """The Poly/ML implementation of Standard ML."""
+
+ homepage = "https://polyml.org/"
+ url = "https://github.com/polyml/polyml/archive/refs/tags/v5.9.1.tar.gz"
+
+ license("LGPL-2.1-only", checked_by="draenog")
+
+ version("5.9.1", sha256="52f56a57a4f308f79446d479e744312195b298aa65181893bce2dfc023a3663c")
+
+ variant(
+ "gmp", default=True, description="Use the GMP library for arbitrary precision arithmetic"
+ )
+ depends_on("gmp", when="+gmp")
+
+ filter_compiler_wrappers("polyc", relative_root="bin")
+
+ def configure_args(self):
+ config_args = self.with_or_without("gmp")
+ return config_args
diff --git a/var/spack/repos/builtin/packages/poorjit/package.py b/var/spack/repos/builtin/packages/poorjit/package.py
new file mode 100755
index 0000000000..ac03c79676
--- /dev/null
+++ b/var/spack/repos/builtin/packages/poorjit/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Poorjit(CMakePackage):
+ """A poorman's JIT library"""
+
+ homepage = "https://github.com/robertu94/poorjit"
+ url = "https://github.com/robertu94/poorjit/archive/refs/tags/0.0.2.tar.gz"
+ git = "https://github.com/robertu94/poorjit"
+
+ maintainers("robertu94")
+
+ license("BSD-4-Clause", checked_by="robertu94")
+
+ version("0.0.2", sha256="d7d43ba3b343ac8a6b0fb4928d5882f64a8c13c6fccfc37e1a3f3cd581c2739a")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("boost+filesystem")
+ depends_on("zlib")
+ depends_on("fmt")
+
+ def cmake_args(self):
+ args = []
+ return args
diff --git a/var/spack/repos/builtin/packages/poppler/package.py b/var/spack/repos/builtin/packages/poppler/package.py
index b71c5b30ff..09d6ab47cf 100644
--- a/var/spack/repos/builtin/packages/poppler/package.py
+++ b/var/spack/repos/builtin/packages/poppler/package.py
@@ -29,6 +29,9 @@ class Poppler(CMakePackage):
version("0.64.0", sha256="b21df92ca99f78067785cf2dc8e06deb04726b62389c0ee1f5d8b103c77f64b1")
version("0.61.1", sha256="1266096343f5163c1a585124e9a6d44474e1345de5cdfe55dc7b47357bcfcda9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
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")
@@ -74,9 +77,7 @@ class Poppler(CMakePackage):
# Only needed to run `make test`
resource(
- name="test",
- git="https://anongit.freedesktop.org/git/poppler/test.git",
- placement="testdata",
+ name="test", git="git://git.freedesktop.org/git/poppler/test.git", placement="testdata"
)
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/popt/package.py b/var/spack/repos/builtin/packages/popt/package.py
index 75cd3a348d..97f6ed023a 100644
--- a/var/spack/repos/builtin/packages/popt/package.py
+++ b/var/spack/repos/builtin/packages/popt/package.py
@@ -9,15 +9,24 @@ from spack.package import *
class Popt(AutotoolsPackage):
"""The popt library parses command line options."""
- homepage = "https://launchpad.net/popt"
- url = "https://launchpad.net/popt/head/1.16/+download/popt-1.16.tar.gz"
+ homepage = "https://github.com/rpm-software-management/popt"
+ url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-1.19.tar.gz"
license("MIT")
+ version("1.19", sha256="c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9")
version("1.16", sha256="e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8")
+ depends_on("c", type="build")
+
depends_on("iconv")
+ def url_for_version(self, version):
+ if self.spec.satisfies("@1.18:"):
+ return f"https://ftp.osuosl.org/pub/rpm/popt/releases/popt-{version.up_to(1)}.x/popt-{version}.tar.gz"
+ else:
+ return f"https://launchpad.net/popt/head/{version}/+download/popt-{version}.tar.gz"
+
def patch(self):
# Remove flags not recognized by the NVIDIA compilers
if self.spec.satisfies("%nvhpc@:20.11"):
diff --git a/var/spack/repos/builtin/packages/portage/package.py b/var/spack/repos/builtin/packages/portage/package.py
index f410856558..971ee1388e 100644
--- a/var/spack/repos/builtin/packages/portage/package.py
+++ b/var/spack/repos/builtin/packages/portage/package.py
@@ -23,6 +23,8 @@ class Portage(CMakePackage):
version("3.0.0", sha256="7a5a21ffbc35fa54a5136d937cfda6f836c7496ff2b5adf54deb4107501333da")
version("master", branch="master", submodules=True)
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Support MPI")
variant("tangram", default=False, description="Use Tangram interface reconstruction package")
variant("jali", default=False, description="Include support for Jali mesh framework")
diff --git a/var/spack/repos/builtin/packages/portcullis/package.py b/var/spack/repos/builtin/packages/portcullis/package.py
index 7944a6ea35..95df2d493a 100644
--- a/var/spack/repos/builtin/packages/portcullis/package.py
+++ b/var/spack/repos/builtin/packages/portcullis/package.py
@@ -18,6 +18,9 @@ class Portcullis(AutotoolsPackage):
version("1.2.3", sha256="172452b5cef12a8dcc2c1c68527000743114136ee63a0dbe307ac4e2a816bc99")
version("1.1.2", sha256="5c581a7f827ffeecfe68107b7fe27ed60108325fd2f86a79d93f61b328687749")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf@2.53:", type="build")
depends_on("automake@1.11:", type="build")
depends_on("libtool@2.4.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/ports-of-call/package.py b/var/spack/repos/builtin/packages/ports-of-call/package.py
index 699f4007cc..2ba749532b 100644
--- a/var/spack/repos/builtin/packages/ports-of-call/package.py
+++ b/var/spack/repos/builtin/packages/ports-of-call/package.py
@@ -34,6 +34,9 @@ class PortsOfCall(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # todo: disable cmake default?
+ depends_on("cxx", type="build")
+
variant(
"portability_strategy",
description="Portability strategy backend",
diff --git a/var/spack/repos/builtin/packages/possvm/package.py b/var/spack/repos/builtin/packages/possvm/package.py
new file mode 100644
index 0000000000..771256460b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/possvm/package.py
@@ -0,0 +1,47 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Possvm(Package):
+ """Possvm (Phylogenetic Ortholog Sorting with Species oVerlap and MCL)
+ is a python tool to analyse pre-computed gene trees and identify pairs
+ and clusters of orthologous genes. It takes advantage of the species
+ overlap algorithm implemented in the ETE toolkit to parse the phylogeny
+ and identify orthologous gene pairs, and MCL clustering for orthogroup
+ identification."""
+
+ homepage = "https://github.com/xgrau/possvm-orthology"
+ git = "https://github.com/xgrau/possvm-orthology.git"
+
+ license("GPL-3.0-only", checked_by="A-N-Other")
+
+ # version number is taken from -v/--version argparse info in possvm.py
+ version("1.2", commit="3158757423edafc29aa29bf3ae0cc63a93a56df9")
+
+ depends_on("python@3.10:", type="run")
+
+ # dependencies from GitHub README.md
+ depends_on("py-ete3@3.1.2", type="run")
+ depends_on("py-markov-clustering@0.0.6.dev0", type="run")
+ depends_on("py-matplotlib@3.7.1", type="run")
+ depends_on("py-networkx@3.0", type="run")
+ depends_on("py-scipy@1.10.0", type="run")
+ depends_on("py-numpy@1.23.5", type="run")
+ depends_on("py-pandas@1.5.3", type="run")
+
+ def install(self, spec, prefix):
+ # This package has no setup.py ...
+ # Add shebangs, ensure +x, and move the scripts to prefix.bin
+ mkdirp(prefix.bin)
+ sed = Executable("sed")
+ targets = ("possvm.py", join_path("scripts", "possvm_reconstruction.py"))
+ for script in targets:
+ sed("-i", rf'1 i\#! {self.spec["python"].command.path}\n', script)
+ os.chmod(script, 0o755)
+ install(script, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/postgis/package.py b/var/spack/repos/builtin/packages/postgis/package.py
index 5fe76b8889..1fdc91b9d3 100644
--- a/var/spack/repos/builtin/packages/postgis/package.py
+++ b/var/spack/repos/builtin/packages/postgis/package.py
@@ -18,10 +18,14 @@ class Postgis(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("3.1.2", sha256="2cdd3760176926704b4eb25ff3357543c9637dee74425a49082906857c7e0732")
version("3.0.1", sha256="5a5432f95150d9bae9215c6d1c7bb354e060482a7c379daa9b8384e1d03e6353")
version("3.0.0", sha256="c06fd2cd5cea0119106ffe17a7235d893c2bbe6f4b63c8617c767630973ba594")
version("2.5.3", sha256="72e8269d40f981e22fb2b78d3ff292338e69a4f5166e481a77b015e1d34e559a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"gui",
default=False,
diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py
index fc13e3e1d5..3dafdc5ecd 100644
--- a/var/spack/repos/builtin/packages/postgresql/package.py
+++ b/var/spack/repos/builtin/packages/postgresql/package.py
@@ -21,9 +21,15 @@ class Postgresql(AutotoolsPackage):
license("PostgreSQL")
+ version("16.4", sha256="971766d645aa73e93b9ef4e3be44201b4f45b5477095b049125403f9f3386d6f")
+ version("16.3", sha256="331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585")
+ version("15.8", sha256="4403515f9a69eeb3efebc98f30b8c696122bfdf895e92b3b23f5b8e769edcb6a")
version("15.2", sha256="99a2171fc3d6b5b5f56b757a7a3cb85d509a38e4273805def23941ed2b8468c7")
+ version("14.13", sha256="59aa3c4b495ab26a9ec69f3ad0a0228c51f0fe6facf3634dfad4d1197d613a56")
version("14.0", sha256="ee2ad79126a7375e9102c4db77c4acae6ae6ffe3e082403b88826d96d927a122")
+ version("13.16", sha256="c9cbbb6129f02328204828066bb3785c00a85c8ca8fd329c2a8a53c1f5cd8865")
version("13.1", sha256="12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f")
+ version("12.20", sha256="2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9")
version("12.2", sha256="ad1dcc4c4fc500786b745635a9e1eba950195ce20b8913f50345bb7d5369b5de")
version("11.2", sha256="2676b9ce09c21978032070b6794696e0aa5a476e3d21d60afc036dc0a9c09405")
version("11.1", sha256="90815e812874831e9a4bf6e1136bf73bc2c5a0464ef142e2dfea40cda206db08")
@@ -41,6 +47,9 @@ class Postgresql(AutotoolsPackage):
version("9.5.3", sha256="7385c01dc58acba8d7ac4e6ad42782bd7c0b59272862a3a3d5fe378d4503a0b4")
version("9.3.4", sha256="9ee819574dfc8798a448dc23a99510d2d8924c2f8b49f8228cd77e4efc8a6621")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("client_only", default=False, description="Build and install client only.")
variant("threadsafe", default=False, description="Build with thread safe.")
variant(
@@ -55,7 +64,9 @@ class Postgresql(AutotoolsPackage):
variant("tcl", default=False, description="Enable Tcl bindings.")
variant("gssapi", default=False, description="Build with GSSAPI functionality.")
variant("xml", default=False, description="Build with XML support.")
+ variant("icu", default=True, description="Build with ICU support.", when="@16:")
+ depends_on("icu4c", when="@16: +icu")
depends_on("readline", when="lineedit=readline")
depends_on("libedit", when="lineedit=libedit")
depends_on("openssl")
@@ -69,37 +80,38 @@ class Postgresql(AutotoolsPackage):
return Executable(self.prefix.bin.pg_config)
def configure_args(self):
- config_args = ["--with-openssl"]
+ spec = self.spec
+ args = ["--with-openssl"]
- if "+threadsafe" in self.spec:
- config_args.append("--enable-thread-safety")
- else:
- config_args.append("--disable-thread-safety")
+ args.extend(self.enable_or_disable("thread-safety", variant="threadsafe"))
- if self.spec.variants["lineedit"].value == "libedit":
- config_args.append("--with-libedit-preferred")
- elif self.spec.variants["lineedit"].value == "none":
- config_args.append("--without-readline")
+ if spec.variants["lineedit"].value == "libedit":
+ args.append("--with-libedit-preferred")
+ elif spec.variants["lineedit"].value == "none":
+ args.append("--without-readline")
- if "+gssapi" in self.spec:
- config_args.append("--with-gssapi")
+ if spec.satisfies("+gssapi"):
+ args.append("--with-gssapi")
- if "+python" in self.spec:
- config_args.append("--with-python")
+ if spec.satisfies("+python"):
+ args.append("--with-python")
- if "+perl" in self.spec:
- config_args.append("--with-perl")
+ if spec.satisfies("+perl"):
+ args.append("--with-perl")
- if "+tcl" in self.spec:
- config_args.append("--with-tcl")
+ if spec.satisfies("+tcl"):
+ args.append("--with-tcl")
+
+ if spec.satisfies("+xml"):
+ args.append("--with-libxml")
- if "+xml" in self.spec:
- config_args.append("--with-libxml")
+ if spec.satisfies("~icu"):
+ args.append("--without-icu")
- return config_args
+ return args
def install(self, spec, prefix):
- if "+client_only" in self.spec:
+ if spec.satisfies("+client_only"):
for subdir in ("bin", "include", "interfaces", "pl"):
with working_dir(os.path.join("src", subdir)):
make("install")
@@ -109,31 +121,31 @@ class Postgresql(AutotoolsPackage):
def setup_run_environment(self, env):
spec = self.spec
- if "+perl" in spec:
+ if spec.satisfies("+perl"):
env.prepend_path("PERL5LIB", self.prefix.lib)
- if "+tcl" in spec:
+ if spec.satisfies("+tcl"):
env.prepend_path("TCLLIBPATH", self.prefix.lib)
- if "+python" in spec:
+ if spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", self.prefix.lib)
def setup_dependent_build_environment(self, env, dependent_spec):
spec = self.spec
- if "+perl" in spec:
+ if spec.satisfies("+perl"):
env.prepend_path("PERL5LIB", self.prefix.lib)
- if "+tcl" in spec:
+ if spec.satisfies("+tcp"):
env.prepend_path("TCLLIBPATH", self.prefix.lib)
- if "+python" in spec:
+ if spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", self.prefix.lib)
def setup_dependent_run_environment(self, env, dependent_spec):
spec = self.spec
- if "+perl" in spec:
+ if spec.satisfies("+perl"):
env.prepend_path("PERL5LIB", self.prefix.lib)
- if "+tcl" in spec:
+ if spec.satisfies("+tcl"):
env.prepend_path("TCLLIBPATH", self.prefix.lib)
- if "+python" in spec:
+ if spec.satisfies("+python"):
env.prepend_path("PYTHONPATH", self.prefix.lib)
@property
diff --git a/var/spack/repos/builtin/packages/povray/package.py b/var/spack/repos/builtin/packages/povray/package.py
index d77bafd9d5..e2ce62d7d1 100644
--- a/var/spack/repos/builtin/packages/povray/package.py
+++ b/var/spack/repos/builtin/packages/povray/package.py
@@ -23,16 +23,22 @@ class Povray(AutotoolsPackage):
realistic reflections, shading, perspective and other effects.
"""
- # Add a proper url for your package's homepage here.
homepage = "http://povray.org/download/"
url = "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz"
git = "https://github.com/POV-Ray/povray.git"
- # maintainers('payerle' )
-
license("AGPL-3.0-or-later")
- version("3.7.0.8", sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4")
+ version("3.7.0.10", sha256="7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff")
+ # The following version no longer builds
+ version(
+ "3.7.0.8",
+ sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("boost", default=True, description="Build with boost support")
variant("debug", default=False, description="Enable compiler debugging mode")
@@ -102,8 +108,8 @@ class Povray(AutotoolsPackage):
# We generate a generic using process owner and fqdn of build host.
fqdn = socket.getfqdn()
uname = getpass.getuser()
- compiled_by = "Installed by spack <{0}@{1}>".format(uname, fqdn)
- extra_args.append("COMPILED_BY={0}".format(compiled_by))
+ compiled_by = f"Installed by spack <{uname}@{fqdn}>"
+ extra_args.append(f"COMPILED_BY={compiled_by}")
extra_args.append("--disable-silent-rules") # Verbose make output
extra_args += self.enable_or_disable("debug")
@@ -112,32 +118,32 @@ class Povray(AutotoolsPackage):
extra_args += self.enable_or_disable("static")
if "+boost" in self.spec:
- extra_args.append("--with-boost={0}".format(self.spec["boost"].prefix))
+ extra_args.append(f"--with-boost={self.spec['boost'].prefix}")
else:
extra_args.append("--without-boost")
if "+jpeg" in self.spec:
- extra_args.append("--with-libjpeg={0}".format(self.spec["jpeg"].prefix))
+ extra_args.append(f"--with-libjpeg={self.spec['jpeg'].prefix}")
else:
extra_args.append("--without-libjpeg")
if "+libpng" in self.spec:
- extra_args.append("--with-libpng={0}".format(self.spec["libpng"].prefix))
+ extra_args.append(f"--with-libpng={self.spec['libpng'].prefix}")
else:
extra_args.append("--without-libpng")
if "+libtiff" in self.spec:
- extra_args.append("--with-libtiff={0}".format(self.spec["libtiff"].prefix))
+ extra_args.append(f"--with-libtiff={self.spec['libtiff'].prefix}")
else:
extra_args.append("--without-libtiff")
if "+mkl" in self.spec:
- extra_args.append("--with-libmkl={0}".format(self.spec["mkl"].prefix))
+ extra_args.append(f"--with-libmkl={self.spec['mkl'].prefix}")
else:
extra_args.append("--without-libmkl")
if "+openexr" in self.spec:
- extra_args.append("--with-openexr={0}".format(self.spec["openexr"].prefix))
+ extra_args.append(f"--with-openexr={self.spec['openexr'].prefix}")
else:
extra_args.append("--without-openexr")
@@ -148,12 +154,11 @@ class Povray(AutotoolsPackage):
return extra_args
- def test(self):
+ def test_render_sample(self):
+ """Render sample file"""
povs = find(self.prefix.share, "biscuit.pov")[0]
copy(povs, ".")
- self.run_test(
- "povray",
- options=["biscuit.pov"],
- purpose="test: render sample file",
- expected=["POV-Ray finished"],
- )
+ exe = which("povray")
+ out = exe("biscuit.pov", output=str.split, error=str.split)
+ expected = "POV-Ray finished"
+ assert expected in out
diff --git a/var/spack/repos/builtin/packages/powerapi/package.py b/var/spack/repos/builtin/packages/powerapi/package.py
index 9943a94d5a..02bc31c81e 100644
--- a/var/spack/repos/builtin/packages/powerapi/package.py
+++ b/var/spack/repos/builtin/packages/powerapi/package.py
@@ -16,6 +16,9 @@ class Powerapi(AutotoolsPackage):
version("2020-01-30", commit="21f75b1469261d99e604f7ddc18f30513ebdd048")
version("1.1.1", commit="93f66dfa29f014067823f2b790a1862e5841a11c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("hwloc", default=False, description="Build hwloc support")
variant("debug", default=False, description="Enable debug support")
variant("mpi", default=False, description="Enable MPI support")
diff --git a/var/spack/repos/builtin/packages/ppl/package.py b/var/spack/repos/builtin/packages/ppl/package.py
index c0c918b11c..72cc2a26a6 100644
--- a/var/spack/repos/builtin/packages/ppl/package.py
+++ b/var/spack/repos/builtin/packages/ppl/package.py
@@ -28,6 +28,9 @@ class Ppl(Package):
version("1.2", sha256="6bc36dd4a87abc429d8f9c00c53e334e5041a9b0857cfc00dbad6ef14294aac8")
version("1.1", sha256="46f073c0626234f0b1a479356c0022fe5dc3c9cf10df1a246c9cde81f7cf284d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py
index 17000ee5ba..1ce03db9af 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py
@@ -18,6 +18,8 @@ class PpopenApplAmrFdm(MakefilePackage):
version("master", branch="APPL/FDM_AMR")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
parallel = False
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py
index 5fae5b5269..ebeac29834 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py
@@ -17,6 +17,8 @@ class PpopenApplBemAt(MakefilePackage):
git = "https://github.com/Post-Peta-Crest/ppOpenHPC.git"
version("master", branch="ATA/BEM")
+
+ depends_on("fortran", type="build") # generated
# In OAT_bem-bb-fw-dense-0.1.0.f90 the 2 variables are defined.
# But ame variables are already defined in include file DAT.h.
# This patch is deleted the variables definitions
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
index 20e2d01f6c..6d26c656c6 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
@@ -26,6 +26,8 @@ class PpopenApplBem(MakefilePackage):
version("master", branch="APPL/BEM")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
parallel = False
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py b/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py
index afe2c21e92..235f3c308d 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py
@@ -22,6 +22,8 @@ class PpopenApplDemUtil(MakefilePackage):
version("master", branch="APPL/DEM")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py
index a61f9c9de8..2c35211ecb 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py
@@ -14,6 +14,8 @@ class PpopenApplFdmAt(MakefilePackage):
version("master", branch="ATA/FDM")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
# depends_on('ppopen-appl-fdm', type='build')
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py
index c9aa471a1d..7199b19688 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py
@@ -19,6 +19,10 @@ class PpopenApplFdm(MakefilePackage):
version("master", branch="APPL/FDM")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# remove unused variable definition
patch("unused.patch")
# remove iargc external definition
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fem/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fem/package.py
index 2286b3f5cc..a1036df347 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-fem/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-fem/package.py
@@ -21,6 +21,9 @@ class PpopenApplFem(MakefilePackage):
version("master", branch="APPL/FEM")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("metis")
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py
index 903254e683..9637d6b265 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py
@@ -32,6 +32,8 @@ class PpopenApplFvm(MakefilePackage):
version("master", branch="APPL/FVM")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("metis@:4")
diff --git a/var/spack/repos/builtin/packages/ppopen-at/package.py b/var/spack/repos/builtin/packages/ppopen-at/package.py
index 685d3ba376..cce600e0ef 100644
--- a/var/spack/repos/builtin/packages/ppopen-at/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-at/package.py
@@ -17,6 +17,10 @@ class PpopenAt(MakefilePackage):
version("master", branch="AT")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def edit(self, spec, prefix):
makefile_in = FileFilter("Makefile.in")
makefile_in.filter("gcc", spack_cxx)
diff --git a/var/spack/repos/builtin/packages/ppopen-math-mp/package.py b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py
index 5f7e964d12..dbe294a815 100644
--- a/var/spack/repos/builtin/packages/ppopen-math-mp/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py
@@ -29,6 +29,8 @@ class PpopenMathMp(MakefilePackage):
version("master", branch="MATH/MP")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
build_directory = "src"
diff --git a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py
index c9ff21b666..eb32035682 100644
--- a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py
@@ -26,6 +26,9 @@ class PpopenMathVis(MakefilePackage):
version("master", branch="MATH/VIS")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/prank/package.py b/var/spack/repos/builtin/packages/prank/package.py
index a04576cb48..2a1c837667 100644
--- a/var/spack/repos/builtin/packages/prank/package.py
+++ b/var/spack/repos/builtin/packages/prank/package.py
@@ -14,6 +14,8 @@ class Prank(Package):
version("170427", sha256="623eb5e9b5cb0be1f49c3bf715e5fabceb1059b21168437264bdcd5c587a8859")
+ depends_on("cxx", type="build") # generated
+
depends_on("mafft")
depends_on("exonerate")
depends_on("bpp-suite") # for bppancestor
diff --git a/var/spack/repos/builtin/packages/precice/package.py b/var/spack/repos/builtin/packages/precice/package.py
index 185a0a9d72..b333271365 100644
--- a/var/spack/repos/builtin/packages/precice/package.py
+++ b/var/spack/repos/builtin/packages/precice/package.py
@@ -23,6 +23,11 @@ class Precice(CMakePackage):
license("LGPL-3.0-or-later")
version("develop", branch="develop")
+ version("3.1.2", sha256="e06d5e183f584c51812dcddf958210d1195bea38fa2df13be72303dcb06c869b")
+ version("3.1.1", sha256="fe759293942ebc9cb2e6127f356a8c795ab7383c1b074595994ebc92466e478d")
+ version("3.1.0", sha256="11e7d3d4055ee30852c0e83692ca7563acaa095bd223ebdbd5c8c851b3646d37")
+ version("3.0.0", sha256="efe6cf505d9305af89c6da1fdba246199a75a1c63a6a22103773ed95341879ba")
+ version("2.5.1", sha256="a5a37d3430eac395e885eb9cbbed9d0980a15e96c3e44763a3769fa7301e3b3a")
version("2.5.0", sha256="76ec6ee0d1a66f6f3d3d2d11f03cfc5aa7ef4d9e5deb9b7a4b4455ec7f796c00")
version("2.4.0", sha256="762e603fbcaa96c4fb0b378b7cb6789d09da0cf6193325603e5eeb13e4c7601c")
version("2.3.0", sha256="57bab08e8b986f5faa364689d470940dbd9c138e5cfa7b861793e7db56b89da3")
@@ -42,6 +47,10 @@ class Precice(CMakePackage):
version("1.4.0", sha256="3499bfc0941fb9f004d5e32eb63d64f93e17b4057fab3ada1cde40c8311bd466")
version("1.3.0", sha256="610322ba1b03df8e8f7d060d57a6a5afeabd5db4e8c4a638d04ba4060a3aec96")
version("1.2.0", sha256="0784ecd002092949835151b90393beb6e9e7a3e9bd78ffd40d18302d6da4b05b")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# Skip version 1.1.1 entirely, the cmake was lacking install.
variant("mpi", default=True, description="Enable MPI support")
@@ -66,16 +75,19 @@ class Precice(CMakePackage):
depends_on("cmake@3.5:", type="build")
depends_on("cmake@3.10.2:", type="build", when="@1.4:")
depends_on("cmake@3.16.3:", type="build", when="@2.4:")
+ depends_on("cmake@3.22.1:", type="build", when="@3.2:")
depends_on("pkgconfig", type="build", when="@2.2:")
# Boost components
- depends_on("boost+filesystem+log+program_options+system+test+thread")
+ depends_on("boost+log+program_options+system+test+thread")
+ depends_on("boost+filesystem", when="@:3.0.0")
depends_on("boost+signals", when="@:2.3")
# Baseline versions
depends_on("boost@1.60.0:")
depends_on("boost@1.65.1:", when="@1.4:")
depends_on("boost@1.71.0:", when="@2.4:")
+ depends_on("boost@1.74.0:", when="@3.2:")
# Forward compatibility
depends_on("boost@:1.72", when="@:2.0.2")
@@ -83,21 +95,27 @@ class Precice(CMakePackage):
depends_on("boost@:1.78", when="@:2.3.0")
depends_on("eigen@3.2:")
+ depends_on("eigen@3.4:", when="@3.2:")
depends_on("eigen@:3.3.7", type="build", when="@:1.5") # bug in prettyprint
+
depends_on("libxml2")
+ depends_on("libxml2@:2.11.99", type="build", when="@:2.5.0")
+
depends_on("mpi", when="+mpi")
+
depends_on("petsc@3.6:", when="+petsc")
depends_on("petsc@3.12:", when="+petsc@2.1.0:")
+ depends_on("petsc@3.15:", when="+petsc@3.2:")
depends_on("python@3:", when="+python", type=("build", "run"))
depends_on("py-numpy@1.17:", when="+python", type=("build", "run"))
+ depends_on("py-numpy@1.21.5:", when="+python@3.2:", type=("build", "run"))
# We require C++14 compiler support
conflicts("%gcc@:4")
conflicts("%apple-clang@:5")
conflicts("%clang@:3.7")
conflicts("%intel@:16")
- conflicts("%pgi@:17.3")
def xsdk_tpl_args(self):
return [
@@ -172,11 +190,12 @@ class Precice(CMakePackage):
cmake_args.extend(["-DPETSC_DIR=%s" % spec["petsc"].prefix, "-DPETSC_ARCH=."])
# Python
- if "+python" in spec:
+ if "@:2.3 +python" in spec:
+ # 2.4.0 and higher use find_package(Python3).
python_library = spec["python"].libs[0]
python_include = spec["python"].headers.directories[0]
numpy_include = join_path(
- spec["py-numpy"].prefix, spec["python"].package.platlib, "numpy", "core", "include"
+ spec["py-numpy"].package.module.python_platlib, "numpy", "core", "include"
)
cmake_args.extend(
[
diff --git a/var/spack/repos/builtin/packages/predixy/package.py b/var/spack/repos/builtin/packages/predixy/package.py
index 4b62b48698..6a9bb0a605 100644
--- a/var/spack/repos/builtin/packages/predixy/package.py
+++ b/var/spack/repos/builtin/packages/predixy/package.py
@@ -15,10 +15,13 @@ class Predixy(MakefilePackage):
license("BSD-3-Clause")
+ # Predixy is no longer open source starting with @7: releases.
version("1.0.5", sha256="0670d0b80f991b415a6dc6df107e5f223e3b41dc5d6b18bf73e26578178dd9e0")
version("1.0.4", sha256="30a7dd44ce507a7a2f8a570c59c9133df239a7f8bad14ef1b97df92b2ee96d40")
version("1.0.3", sha256="d815d0ffcd33b16bfee76fe5523bdd47cf9acca0419eaa284d5ccda4cf62b828")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(self.prefix.bin)
install("src/predixy", self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/premake-core/package.py b/var/spack/repos/builtin/packages/premake-core/package.py
index 6bd9c53ba9..c072adba3c 100644
--- a/var/spack/repos/builtin/packages/premake-core/package.py
+++ b/var/spack/repos/builtin/packages/premake-core/package.py
@@ -28,6 +28,9 @@ class PremakeCore(MakefilePackage):
"5.0.0-alpha13", sha256="bfe983e24686c50cada935f74adad2aefe6581649734b2ab8c1aaa2de4d473c6"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def build(self, spec, prefix):
make("-f", "Bootstrap.mak", self.architecture.platform.name)
diff --git a/var/spack/repos/builtin/packages/preseq/package.py b/var/spack/repos/builtin/packages/preseq/package.py
index 60a6dd20bd..811e262cf9 100644
--- a/var/spack/repos/builtin/packages/preseq/package.py
+++ b/var/spack/repos/builtin/packages/preseq/package.py
@@ -21,6 +21,9 @@ class Preseq(MakefilePackage):
version("2.0.3", sha256="747ddd4227515a96a45fcff0709f26130386bff3458c829c7bc1f3306b4f3d91")
version("2.0.2", sha256="1d7ea249bf4e5826e09697256643e6a2473bc302cd455f31d4eb34c23c10b97c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("samtools")
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/prettier/package.py b/var/spack/repos/builtin/packages/prettier/package.py
new file mode 100644
index 0000000000..bb71668d7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/prettier/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Prettier(Package):
+ """Prettier is an opinionated code formatter."""
+
+ homepage = "https://prettier.io/"
+ url = "https://github.com/prettier/prettier/archive/refs/tags/3.2.5.tar.gz"
+
+ maintainers("adamjstewart")
+ license("MIT")
+
+ version("3.2.5", sha256="0ac58fbe50859feb06099670526460cef7f51c83fee458b02fc67e53ffd23f57")
+
+ depends_on("node-js", type=("build", "run"))
+ depends_on("npm", type="build")
+
+ def install(self, spec, prefix):
+ npm = which("npm", required=True)
+ npm("install", "--global", f"--prefix={prefix}")
diff --git a/var/spack/repos/builtin/packages/price/package.py b/var/spack/repos/builtin/packages/price/package.py
index 80941a1280..248a3bd744 100644
--- a/var/spack/repos/builtin/packages/price/package.py
+++ b/var/spack/repos/builtin/packages/price/package.py
@@ -15,6 +15,8 @@ class Price(MakefilePackage):
version("140408", sha256="12276b2b15f4e020a772944a19fd2aaf089d3437cbc71e7486fa8db95014843f")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("PriceTI", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/primer3/package.py b/var/spack/repos/builtin/packages/primer3/package.py
index 8bee8d7529..c763db1555 100644
--- a/var/spack/repos/builtin/packages/primer3/package.py
+++ b/var/spack/repos/builtin/packages/primer3/package.py
@@ -21,6 +21,10 @@ class Primer3(MakefilePackage):
version("2.5.0", sha256="7581e2fa3228ef0ee1ffa427b2aa0a18fc635d561208327471daf59d1b804da0")
version("2.3.7", sha256="f7ac3e64dc89b7c80882bf0f52c2c0a58572f5fdafd178680d4a7ae91b6c465b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
build_directory = "src"
# Prior to May 15, 2018, the code contained invalid pointer/int
diff --git a/var/spack/repos/builtin/packages/prinseq-lite/package.py b/var/spack/repos/builtin/packages/prinseq-lite/package.py
index 0737bb4a37..97c22661cf 100644
--- a/var/spack/repos/builtin/packages/prinseq-lite/package.py
+++ b/var/spack/repos/builtin/packages/prinseq-lite/package.py
@@ -10,7 +10,7 @@ class PrinseqLite(Package):
"""PRINSEQ will help you to preprocess your genomic or metagenomic
sequence data in FASTA or FASTQ format."""
- homepage = "http://prinseq.sourceforge.net"
+ homepage = "https://prinseq.sourceforge.net"
url = "https://sourceforge.net/projects/prinseq/files/standalone/prinseq-lite-0.20.4.tar.gz"
license("GPL-3.0-only")
diff --git a/var/spack/repos/builtin/packages/prism/package.py b/var/spack/repos/builtin/packages/prism/package.py
index 080e387c9b..ffa2b155f2 100644
--- a/var/spack/repos/builtin/packages/prism/package.py
+++ b/var/spack/repos/builtin/packages/prism/package.py
@@ -20,6 +20,9 @@ class Prism(MakefilePackage):
version("4.7", sha256="16186047ba49efc6532de6e9c3993c8c73841a7c76c99758d6ee769e72092d6d")
version("4.5", sha256="1cb7a77538b5c997d98a8c209030c46f9e8f021f7a8332e5eb2fd3b4a23936fd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_directory = "prism"
depends_on("java@9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/prmon/package.py b/var/spack/repos/builtin/packages/prmon/package.py
index c194c1d975..179a2a74a1 100644
--- a/var/spack/repos/builtin/packages/prmon/package.py
+++ b/var/spack/repos/builtin/packages/prmon/package.py
@@ -19,6 +19,7 @@ class Prmon(CMakePackage):
license("Apache-2.0")
version("main", branch="main")
+ version("3.1.0", sha256="02f25f1ea82300c93e5af14137e366b31c8d615283768d5f3f98616a0d6e507c")
version("3.0.2", sha256="ea9ff521689fecb8c395e35e9540be18c7ab37812354c4a5c0ba505e2ab467c1")
version("3.0.0", sha256="fd6f4e3a95e055d265fbbaba08d680826cb4770eb8830cc987898d6504ac7474")
version("2.2.1", sha256="7c95538a0ddcfc71b5c581979a5bb298873fdf16966fd6951aaa2b2639b08319")
diff --git a/var/spack/repos/builtin/packages/prng/package.py b/var/spack/repos/builtin/packages/prng/package.py
index b3d039283f..5bba9faa04 100644
--- a/var/spack/repos/builtin/packages/prng/package.py
+++ b/var/spack/repos/builtin/packages/prng/package.py
@@ -16,6 +16,8 @@ class Prng(AutotoolsPackage):
version("3.0.2", sha256="8299182b97c24b7891d74590a8a8438641a6c681ce34d6c3f7bc98a0649da48b")
+ depends_on("c", type="build") # generated
+
depends_on("automake", type="build")
depends_on("autoconf", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/probconsrna/package.py b/var/spack/repos/builtin/packages/probconsrna/package.py
index 6353022a16..c0231f5e47 100644
--- a/var/spack/repos/builtin/packages/probconsrna/package.py
+++ b/var/spack/repos/builtin/packages/probconsrna/package.py
@@ -15,6 +15,8 @@ class Probconsrna(Package):
version("2005-6-7", sha256="7fe4494bd423db1d5f33f5ece2c70f9f66a0d9112e28d3eaa7dfdfe7fa66eba8")
+ depends_on("cxx", type="build") # generated
+
def install(self, build, prefix):
mkdirp(prefix.bin)
install("compare", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/procenv/package.py b/var/spack/repos/builtin/packages/procenv/package.py
index b4be9e3862..6df01c967d 100644
--- a/var/spack/repos/builtin/packages/procenv/package.py
+++ b/var/spack/repos/builtin/packages/procenv/package.py
@@ -20,6 +20,8 @@ class Procenv(AutotoolsPackage):
version("0.60", sha256="fac0438bf08ed73b10ace78d85acb83cf81ade5ecf866762c2c6e92e41dbde43")
version("0.51", sha256="b831c14729e06a285cc13eba095817ce3b6d0ddf484b1264951b03ee4fe25bc9")
+ depends_on("c", type="build") # generated
+
# https://github.com/jamesodhunt/procenv/pull/16
patch("7cafed1316ddb16fe0689d54ba10c05dd2edd347.patch", when="@:0.51")
diff --git a/var/spack/repos/builtin/packages/process-in-process/package.py b/var/spack/repos/builtin/packages/process-in-process/package.py
index 283fd52064..e2775ea78f 100644
--- a/var/spack/repos/builtin/packages/process-in-process/package.py
+++ b/var/spack/repos/builtin/packages/process-in-process/package.py
@@ -31,6 +31,8 @@ class ProcessInProcess(Package):
# PiP version 3 is experimental and unstable yet
version("3", branch="pip-3", deprecated=True)
+ depends_on("c", type="build") # generated
+
conflicts("%gcc@:3", when="os=centos7")
conflicts("%gcc@5:", when="os=centos7")
conflicts("%gcc@:3", when="os=rhel7")
diff --git a/var/spack/repos/builtin/packages/procps-ng/package.py b/var/spack/repos/builtin/packages/procps-ng/package.py
index e66376242f..25624f8ea3 100644
--- a/var/spack/repos/builtin/packages/procps-ng/package.py
+++ b/var/spack/repos/builtin/packages/procps-ng/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class ProcpsNg(AutotoolsPackage):
"""Utilities that provide system information."""
- homepage = "https://sourceforge.net/projects/procps-ng"
+ homepage = "https://sourceforge.net/projects/procps-ng/"
url = "https://udomain.dl.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.16.tar.xz"
license("GPL-2.0-or-later AND LGPL-2.1-or-later", checked_by="tgamblin")
version("3.3.16", sha256="925eacd65dedcf9c98eb94e8978bbfb63f5de37294cc1047d81462ed477a20af")
+ depends_on("c", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/procps/package.py b/var/spack/repos/builtin/packages/procps/package.py
index bfb0432488..55ee0c554b 100644
--- a/var/spack/repos/builtin/packages/procps/package.py
+++ b/var/spack/repos/builtin/packages/procps/package.py
@@ -29,6 +29,8 @@ class Procps(AutotoolsPackage):
version("3.3.15", sha256="14dfa751517dd844efa9f492e3ad8071f908a269c6aea643b9a1759235fa2053")
version("3.3.14", sha256="1ff716e7bde6b3841b8519831690b10b644ed344490369c55e410edc8db2fe18")
+ depends_on("c", type="build") # generated
+
variant("nls", default=True, description="Enable Native Language Support.")
depends_on("autoconf", type="build")
@@ -70,9 +72,9 @@ class Procps(AutotoolsPackage):
else:
args.append("--disable-nls")
- if spec["iconv"].name == "libc":
+ if spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={spec['iconv'].prefix}")
+ else:
args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
return args
diff --git a/var/spack/repos/builtin/packages/prod-util/package.py b/var/spack/repos/builtin/packages/prod-util/package.py
index aa2ee1d528..0fe46740f1 100644
--- a/var/spack/repos/builtin/packages/prod-util/package.py
+++ b/var/spack/repos/builtin/packages/prod-util/package.py
@@ -14,9 +14,25 @@ class ProdUtil(CMakePackage):
homepage = "https://github.com/NOAA-EMC/NCEPLIBS-prod_util"
url = "https://github.com/NOAA-EMC/NCEPLIBS-prod_util/archive/refs/tags/v1.2.2.tar.gz"
+ git = "https://github.com/NOAA-EMC/NCEPLIBS-prod_util"
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
- version("1.2.2", sha256="c51b903ea5a046cb9b545b5c04fd28647c58b4ab6182e61710f0287846350ef8")
+ version("develop", branch="develop")
+ version("2.1.1", sha256="2f7507fa378a44f42b971f60de8152387c311bfa9c5c05a274c87b43a143aacd")
+ version("2.1.0", sha256="fa7df4a82dae269ffb347b9007376fb0d9979c17c4974814ea82204b12d70ea5")
+ version(
+ "1.2.2",
+ sha256="c51b903ea5a046cb9b545b5c04fd28647c58b4ab6182e61710f0287846350ef8",
+ deprecated=True,
+ )
- depends_on("w3nco")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
+ depends_on("w3nco", when="@1")
+ depends_on("w3emc", when="@2:")
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/prodigal/package.py b/var/spack/repos/builtin/packages/prodigal/package.py
index 1c670bd973..6d7693d10b 100644
--- a/var/spack/repos/builtin/packages/prodigal/package.py
+++ b/var/spack/repos/builtin/packages/prodigal/package.py
@@ -17,6 +17,8 @@ class Prodigal(MakefilePackage):
version("2.6.3", sha256="89094ad4bff5a8a8732d899f31cec350f5a4c27bcbdd12663f87c9d1f0ec599f")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
make("INSTALLDIR={0}".format(self.prefix), "install")
diff --git a/var/spack/repos/builtin/packages/professor/package.py b/var/spack/repos/builtin/packages/professor/package.py
index b021c7e957..7848bfcafb 100644
--- a/var/spack/repos/builtin/packages/professor/package.py
+++ b/var/spack/repos/builtin/packages/professor/package.py
@@ -17,6 +17,8 @@ class Professor(Package):
version("2.3.3", sha256="60c5ba00894c809e2c31018bccf22935a9e1f51c0184468efbdd5d27b211009f")
+ depends_on("cxx", type="build") # generated
+
variant(
"interactive",
default=True,
diff --git a/var/spack/repos/builtin/packages/profugusmc/package.py b/var/spack/repos/builtin/packages/profugusmc/package.py
index 18cc276502..6347665a1a 100644
--- a/var/spack/repos/builtin/packages/profugusmc/package.py
+++ b/var/spack/repos/builtin/packages/profugusmc/package.py
@@ -17,6 +17,10 @@ class Profugusmc(CMakePackage, CudaPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI")
variant("cuda", default=False, description="Enable CUDA")
diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py
index e8b5959bbd..17d7da99ec 100644
--- a/var/spack/repos/builtin/packages/proj/package.py
+++ b/var/spack/repos/builtin/packages/proj/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import spack.builder
from spack.build_systems import autotools, cmake
from spack.package import *
@@ -25,6 +24,10 @@ class Proj(CMakePackage, AutotoolsPackage):
license("MIT")
+ version("9.4.1", sha256="ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7")
+ version("9.4.0", sha256="3643b19b1622fe6b2e3113bdb623969f5117984b39f173b4e3fb19a8833bd216")
+ version("9.3.1", sha256="b0f919cb9e1f42f803a3e616c2b63a78e4d81ecfaed80978d570d3a5e29d10bc")
+ version("9.3.0", sha256="91a3695a004ea28db0448a34460bed4cc3b130e5c7d74339ec999efdab0e547d")
version("9.2.1", sha256="15ebf4afa8744b9e6fccb5d571fc9f338dc3adcf99907d9e62d1af815d4971a1")
version("9.2.0", sha256="dea816f5aa732ae6b2ee3977b9bdb28b1d848cf56a1aad8faf6708b89f0ed50e")
version("9.1.1", sha256="003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39")
@@ -41,7 +44,11 @@ class Proj(CMakePackage, AutotoolsPackage):
version("7.2.0", sha256="2957798e5fe295ff96a2af1889d0428e486363d210889422f76dd744f7885763")
version("7.1.0", sha256="876151e2279346f6bdbc63bd59790b48733496a957bccd5e51b640fdd26eaa8d")
version("7.0.1", sha256="a7026d39c9c80d51565cfc4b33d22631c11e491004e19020b3ff5a0791e1779f")
- version("7.0.0", sha256="ee0e14c1bd2f9429b1a28999240304c0342ed739ebaea3d4ff44c585b1097be8")
+ version(
+ "7.0.0",
+ sha256="ee0e14c1bd2f9429b1a28999240304c0342ed739ebaea3d4ff44c585b1097be8",
+ deprecated=True,
+ )
version("6.3.2", sha256="cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311")
version("6.3.1", sha256="6de0112778438dcae30fcc6942dee472ce31399b9e5a2b67e8642529868c86f8")
version("6.2.0", sha256="b300c0f872f632ad7f8eb60725edbf14f0f8f52db740a3ab23e7b94f1cd22a50")
@@ -52,12 +59,27 @@ class Proj(CMakePackage, AutotoolsPackage):
version("5.0.1", sha256="a792f78897482ed2c4e2af4e8a1a02e294c64e32b591a635c5294cb9d49fdc8c")
version("4.9.2", sha256="60bf9ad1ed1c18158e652dfff97865ba6fb2b67f1511bc8dceae4b3c7e657796")
version("4.9.1", sha256="fca0388f3f8bc5a1a803d2f6ff30017532367992b30cf144f2d39be88f36c319")
- version("4.8.0", sha256="2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5")
- version("4.7.0", sha256="fc5440002a496532bfaf423c28bdfaf9e26cc96c84ccefcdefde911efbd98986")
- version("4.6.1", sha256="76d174edd4fdb4c49c1c0ed8308a469216c01e7177a4510b1b303ef3c5f97b47")
+ version(
+ "4.8.0",
+ sha256="2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5",
+ deprecated=True,
+ )
+ version(
+ "4.7.0",
+ sha256="fc5440002a496532bfaf423c28bdfaf9e26cc96c84ccefcdefde911efbd98986",
+ deprecated=True,
+ )
+ version(
+ "4.6.1",
+ sha256="76d174edd4fdb4c49c1c0ed8308a469216c01e7177a4510b1b303ef3c5f97b47",
+ deprecated=True,
+ )
- variant("tiff", default=True, description="Enable TIFF support")
- variant("curl", default=True, description="Enable curl support")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("tiff", default=True, when="@7:", description="Enable TIFF support")
+ variant("curl", default=True, when="@7:", description="Enable curl support")
variant("shared", default=True, description="Enable shared libraries")
variant("pic", default=False, description="Enable position-independent code (PIC)")
@@ -84,14 +106,19 @@ class Proj(CMakePackage, AutotoolsPackage):
patch(
"https://github.com/OSGeo/PROJ/commit/3f38a67a354a3a1e5cca97793b9a43860c380d95.patch?full_index=1",
sha256="dc620ff1bbcc0ef4130d53a40a8693a1e2e72ebf83bd6289f1139d0f1aad2a40",
- when="@7:7.2.1",
+ when="@6.2:9.1",
)
- patch("proj.cmakelists.5.0.patch", when="@5.0")
- patch("proj.cmakelists.5.1.patch", when="@5.1:5.2")
-
# https://proj.org/install.html#build-requirements
with when("build_system=cmake"):
+ # https://github.com/OSGeo/PROJ/pull/3374
+ patch("proj-8-tiff.patch", when="@8:9.1")
+ patch("proj-7-tiff.patch", when="@7")
+ # https://github.com/spack/spack/pull/41065
+ patch("proj.cmakelists.5.0.patch", when="@5.0")
+ patch("proj.cmakelists.5.1.patch", when="@5.1:5.2")
+
+ depends_on("cmake@3.16:", when="@9.4:", type="build")
depends_on("cmake@3.9:", when="@6:", type="build")
depends_on("cmake@3.5:", when="@5", type="build")
depends_on("cmake@2.6:", when="@:4", type="build")
@@ -116,14 +143,8 @@ class Proj(CMakePackage, AutotoolsPackage):
# * https://rasterio.readthedocs.io/en/latest/faq.html
env.set("PROJ_LIB", self.prefix.share.proj)
- def setup_dependent_run_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
-
-class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
- def setup_dependent_build_environment(self, env, dependent_spec):
- self.pkg.setup_run_environment(env)
+class AnyBuilder(BaseBuilder):
def setup_build_environment(self, env):
env.set("PROJ_LIB", join_path(self.pkg.stage.source_path, "nad"))
@@ -132,12 +153,15 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
install_tree(join_path("share", "proj"), self.prefix.share.proj)
-class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
+class CMakeBuilder(AnyBuilder, cmake.CMakeBuilder):
def cmake_args(self):
+ shared_arg = "BUILD_SHARED_LIBS" if self.spec.satisfies("@7:") else "BUILD_LIBPROJ_SHARED"
args = [
self.define_from_variant("ENABLE_TIFF", "tiff"),
self.define_from_variant("ENABLE_CURL", "curl"),
- self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant(shared_arg, "shared"),
+ # projsync needs curl
+ self.define_from_variant("BUILD_PROJSYNC", "curl"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
if self.spec.satisfies("@6:") and self.pkg.run_tests:
@@ -152,7 +176,7 @@ class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
return args
-class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):
+class AutotoolsBuilder(AnyBuilder, autotools.AutotoolsBuilder):
def configure_args(self):
args = []
diff --git a/var/spack/repos/builtin/packages/proj/proj-7-tiff.patch b/var/spack/repos/builtin/packages/proj/proj-7-tiff.patch
new file mode 100644
index 0000000000..d6597a3e93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/proj/proj-7-tiff.patch
@@ -0,0 +1,19 @@
+--- a/src/lib_proj.cmake 2024-06-12 13:29:53
++++ b/src/lib_proj.cmake 2024-06-12 13:30:27
+@@ -406,8 +406,14 @@
+
+ if(TIFF_ENABLED)
+ target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DTIFF_ENABLED)
+- target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${TIFF_INCLUDE_DIR})
+- target_link_libraries(${PROJ_CORE_TARGET} ${TIFF_LIBRARY})
++ if( CMAKE_VERSION VERSION_LESS 3.11 AND CMAKE_CROSSCOMPILING )
++ # Hack needed for ubuntu:18.04 mingw64 cross compiling to avoid
++ # -isystem to be emitted (similar to https://discourse.cmake.org/t/use-of-isystem/1574)
++ target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIRS})
++ target_link_libraries(proj ${TIFF_LIBRARIES})
++ else()
++ target_link_libraries(proj TIFF::TIFF)
++ endif()
+ endif()
+
+ if(CURL_ENABLED)
diff --git a/var/spack/repos/builtin/packages/proj/proj-8-tiff.patch b/var/spack/repos/builtin/packages/proj/proj-8-tiff.patch
new file mode 100644
index 0000000000..e223d860c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/proj/proj-8-tiff.patch
@@ -0,0 +1,19 @@
+--- a/src/lib_proj.cmake 2024-06-12 13:07:41
++++ b/src/lib_proj.cmake 2024-06-12 13:08:16
+@@ -404,8 +404,14 @@
+
+ if(TIFF_ENABLED)
+ target_compile_definitions(proj PRIVATE -DTIFF_ENABLED)
+- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR})
+- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY})
++ if( CMAKE_VERSION VERSION_LESS 3.11 AND CMAKE_CROSSCOMPILING )
++ # Hack needed for ubuntu:18.04 mingw64 cross compiling to avoid
++ # -isystem to be emitted (similar to https://discourse.cmake.org/t/use-of-isystem/1574)
++ target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIRS})
++ target_link_libraries(proj PRIVATE ${TIFF_LIBRARIES})
++ else()
++ target_link_libraries(proj PRIVATE TIFF::TIFF)
++ endif()
+ endif()
+
+ if(CURL_ENABLED)
diff --git a/var/spack/repos/builtin/packages/prometheus-cpp/package.py b/var/spack/repos/builtin/packages/prometheus-cpp/package.py
new file mode 100644
index 0000000000..fc1a62b150
--- /dev/null
+++ b/var/spack/repos/builtin/packages/prometheus-cpp/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PrometheusCpp(CMakePackage):
+ """Prometheus Client Library for Modern C++."""
+
+ homepage = "https://jupp0r.github.io/prometheus-cpp/"
+ url = "https://github.com/jupp0r/prometheus-cpp/releases/download/v1.2.4/prometheus-cpp-with-submodules.tar.gz"
+ git = "https://github.com/jupp0r/prometheus-cpp.git"
+
+ license("MIT", checked_by="mdorier")
+
+ version("master", branch="master", submodules=True)
+ version("1.2.4", sha256="0d6852291063c35853e88805c73b52f73c0c08b78c1e7bc4d588fcf72a7172eb")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.14.0:", type="build")
+ depends_on("zlib")
+ depends_on("curl")
+
+ def cmake_args(self):
+ args = ["-DBUILD_SHARED_LIBS=ON", "-DENABLE_TESTING=OFF"]
+ return args
diff --git a/var/spack/repos/builtin/packages/prometheus/package.py b/var/spack/repos/builtin/packages/prometheus/package.py
index 7b0f0fdb53..1a818f8a49 100644
--- a/var/spack/repos/builtin/packages/prometheus/package.py
+++ b/var/spack/repos/builtin/packages/prometheus/package.py
@@ -15,15 +15,19 @@ class Prometheus(MakefilePackage):
license("Apache-2.0")
+ version("2.55.1", sha256="f48251f5c89eea6d3b43814499d558bacc4829265419ee69be49c5af98f79573")
version("2.19.2", sha256="d4e84cae2fed6761bb8a80fcc69b6e0e9f274d19dffc0f38fb5845f11da1bbc3")
version("2.19.1", sha256="b72b9b6bdbae246dcc29ef354d429425eb3c0a6e1596fc8b29b502578a4ce045")
version("2.18.2", sha256="a26c106c97d81506e3a20699145c11ea2cce936427a0e96eb2fd0dc7cd1945ba")
version("2.17.1", sha256="d0b53411ea0295c608634ca7ef1d43fa0f5559e7ad50705bf4d64d052e33ddaf")
version("2.17.0", sha256="b5e508f1c747aaf50dd90a48e5e2a3117fec2e9702d0b1c7f97408b87a073009")
+ depends_on("c", type="build") # generated
+
depends_on("go", type="build")
depends_on("node-js@11.10.1:", type="build")
depends_on("yarn", type="build")
+ depends_on("npm", type="build", when="@2.55.1:")
def build(self, spec, prefix):
make("build", parallel=False)
@@ -32,5 +36,6 @@ class Prometheus(MakefilePackage):
mkdirp(prefix.bin)
install("prometheus", prefix.bin)
install("promtool", prefix.bin)
- install("tsdb/tsdb", prefix.bin)
+ if spec.satisfies("@:2.19.2"):
+ install("tsdb/tsdb", prefix.bin)
install_tree("documentation", prefix.documentation)
diff --git a/var/spack/repos/builtin/packages/prophecy4f/package.py b/var/spack/repos/builtin/packages/prophecy4f/package.py
index 4e9ce114ed..be8ac6ed48 100644
--- a/var/spack/repos/builtin/packages/prophecy4f/package.py
+++ b/var/spack/repos/builtin/packages/prophecy4f/package.py
@@ -19,6 +19,9 @@ class Prophecy4f(MakefilePackage):
version("3.0.2", sha256="01e6ad4d7e913082c1dcabd589173f5d962086dd7860c710f14a0528d8d80eb7")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("collier")
@property
diff --git a/var/spack/repos/builtin/packages/protobuf-c/package.py b/var/spack/repos/builtin/packages/protobuf-c/package.py
index 86f590b525..953026c6fe 100644
--- a/var/spack/repos/builtin/packages/protobuf-c/package.py
+++ b/var/spack/repos/builtin/packages/protobuf-c/package.py
@@ -22,5 +22,8 @@ class ProtobufC(AutotoolsPackage):
version("1.4.1", sha256="4cc4facd508172f3e0a4d3a8736225d472418aee35b4ad053384b137b220339f")
version("1.3.2", sha256="53f251f14c597bdb087aecf0b63630f434d73f5a10fc1ac545073597535b9e74")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("protobuf@:3.21.12")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index a87a0db616..2ab08b01ff 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -16,6 +16,10 @@ class Protobuf(CMakePackage):
license("BSD-3-Clause")
+ version("3.28.2", sha256="1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e")
+ version("3.27.5", sha256="a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c")
+ version("3.26.1", sha256="f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf")
+ version("3.25.3", sha256="da82be8acc5347c7918ef806ebbb621b24988f7e1a19b32cd7fc73bc29b59186")
version("3.24.3", sha256="2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe")
version("3.23.3", sha256="5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33")
version("3.22.2", sha256="2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc")
@@ -76,6 +80,9 @@ class Protobuf(CMakePackage):
version("3.1.0", sha256="fb2a314f4be897491bb2446697be693d489af645cb0e165a85e7e64e07eb134d")
version("3.0.2", sha256="a0a265bcc9d4e98c87416e59c33afc37cede9fb277292523739417e449b18c1e")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Enables the build of shared libraries")
variant(
"build_type",
@@ -109,13 +116,29 @@ class Protobuf(CMakePackage):
# fix build on Centos 8, see also https://github.com/protocolbuffers/protobuf/issues/5144
patch(
- "https://github.com/protocolbuffers/protobuf/pull/11032/commits/3039f932aaf212bcf2f14a3f2fd00dbfb881e46b.patch?full_index=1",
- when="@:3.21",
- sha256="cefc4bf4aadf9ca33a336b2aa6d0d82006b6563e85122ae8cfb70345f85321dd",
+ "https://github.com/protocolbuffers/protobuf/commit/462964ed322503af52638d54c00a0a67d7133349.patch?full_index=1",
+ when="@3.4:3.21",
+ sha256="9b6dcfa30dd3ae0abb66ab0f252a4fc1e1cc82a9820d2bdb72da35c4f80c3603",
)
patch("msvc-abseil-target-namespace.patch", when="@3.22 %msvc")
+ # Misisng #include "absl/container/internal/layout.h"
+ # See https://github.com/protocolbuffers/protobuf/pull/14042
+ patch(
+ "https://github.com/protocolbuffers/protobuf/commit/e052928c94f5a9a6a6cbdb82e09ab4ee92b7815f.patch?full_index=1",
+ when="@3.22:3.24.3 ^abseil-cpp@20240116:",
+ sha256="20e3cc99a9513b256e219653abe1bfc7d6b6a5413e269676e3d442830f99a1af",
+ )
+
+ # Missing #include "absl/strings/str_cat.h"
+ # See https://github.com/protocolbuffers/protobuf/pull/14054
+ patch(
+ "https://github.com/protocolbuffers/protobuf/commit/38a24729ec94e6576a1425951c898ad0b91ad2d2.patch?full_index=1",
+ when="@3.22:3.24.3 ^abseil-cpp@20240116:",
+ sha256="c061356db31cdce29c8cdd98a3a8219ef048ebc2318d0dec26c1f2c5e5dae29b",
+ )
+
def fetch_remote_versions(self, *args, **kwargs):
"""Ignore additional source artifacts uploaded with releases,
only keep known versions
diff --git a/var/spack/repos/builtin/packages/proxymngr/package.py b/var/spack/repos/builtin/packages/proxymngr/package.py
index 30c8f5e73f..1563fbeb0e 100644
--- a/var/spack/repos/builtin/packages/proxymngr/package.py
+++ b/var/spack/repos/builtin/packages/proxymngr/package.py
@@ -12,16 +12,18 @@ class Proxymngr(AutotoolsPackage, XorgPackage):
appropriate, and keeping track of all of the available proxy services.
The proxy manager strives to reuse existing proxies whenever possible."""
- homepage = "https://cgit.freedesktop.org/xorg/app/proxymngr"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/proxymngr"
xorg_mirror_path = "app/proxymngr-1.0.4.tar.gz"
version("1.0.4", sha256="d40f2d15985ee8e8ef5320a85c0b1899a7bc95974a65137ae886e499bced86f4")
+ depends_on("c", type="build")
+
depends_on("libice")
depends_on("libxt")
depends_on("lbxproxy")
- depends_on("xproto@7.0.17:")
- depends_on("xproxymanagementprotocol")
+ depends_on("xproto@7.0.17:", type="build")
+ depends_on("xproxymanagementprotocol", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/prrte/package.py b/var/spack/repos/builtin/packages/prrte/package.py
index e233a5102d..c882188f0f 100644
--- a/var/spack/repos/builtin/packages/prrte/package.py
+++ b/var/spack/repos/builtin/packages/prrte/package.py
@@ -26,6 +26,8 @@ class Prrte(AutotoolsPackage):
version("develop", branch="master")
version("1.0.0", sha256="a9b3715e059c10ed091bd6e3a0d8896f7752e43ee731abcc95fb962e67132a2d")
+ depends_on("c", type="build") # generated
+
depends_on("pmix")
depends_on("libevent")
depends_on("hwloc")
diff --git a/var/spack/repos/builtin/packages/pruners-ninja/package.py b/var/spack/repos/builtin/packages/pruners-ninja/package.py
index 931eac9951..f91ca34dc9 100644
--- a/var/spack/repos/builtin/packages/pruners-ninja/package.py
+++ b/var/spack/repos/builtin/packages/pruners-ninja/package.py
@@ -20,6 +20,9 @@ class PrunersNinja(AutotoolsPackage):
version("1.0.1", sha256="53df5c019054b60c68e63d3e249127f1d5f267a70539c8809fb42a8ddbfcb29b")
version("1.0.0", sha256="f25c189783b57801f298dfff8770f42733a43f926668aceff4abd287b6e3a4d1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/ps-lite/package.py b/var/spack/repos/builtin/packages/ps-lite/package.py
index 84360da878..cdc2a11109 100644
--- a/var/spack/repos/builtin/packages/ps-lite/package.py
+++ b/var/spack/repos/builtin/packages/ps-lite/package.py
@@ -18,6 +18,8 @@ class PsLite(CMakePackage):
version("master", branch="master")
version("20170328", commit="acdb698fa3bb80929ef83bb37c705f025e119b82")
+ depends_on("cxx", type="build") # generated
+
depends_on("protobuf@3:")
depends_on("libzmq")
diff --git a/var/spack/repos/builtin/packages/psalg/package.py b/var/spack/repos/builtin/packages/psalg/package.py
index 295f38b21a..be4bfc7511 100644
--- a/var/spack/repos/builtin/packages/psalg/package.py
+++ b/var/spack/repos/builtin/packages/psalg/package.py
@@ -16,6 +16,9 @@ class Psalg(CMakePackage):
version("3.3.37", sha256="127a5ae44c9272039708bd877849a3af354ce881fde093a2fc6fe0550b698b72")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("xtcdata")
depends_on("rapidjson")
depends_on("curl")
diff --git a/var/spack/repos/builtin/packages/pscmc/package.py b/var/spack/repos/builtin/packages/pscmc/package.py
index 03b08534d7..0e8b321630 100644
--- a/var/spack/repos/builtin/packages/pscmc/package.py
+++ b/var/spack/repos/builtin/packages/pscmc/package.py
@@ -23,6 +23,8 @@ class Pscmc(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
def setup_run_environment(self, env):
env.set("SCMC_COMPILE_ROOT", self.prefix.source)
env.set("SCMC_ROOT", join_path(self.prefix.source, "runtime_passes"))
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
index 497adbf65a..b1ff4187fd 100644
--- a/var/spack/repos/builtin/packages/psi4/package.py
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -20,6 +20,8 @@ class Psi4(CMakePackage):
version("1.3.2", sha256="ed76c67803b6420f35f57a6dd31c47108b9145b8c9fced5c94cdc179f6b5fbf3")
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/psipred/package.py b/var/spack/repos/builtin/packages/psipred/package.py
new file mode 100644
index 0000000000..86fefdc679
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psipred/package.py
@@ -0,0 +1,73 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Psipred(MakefilePackage):
+ """PSIPRED is a simple and accurate secondary structure prediction method, incorporating
+ two feed-forward neural networks which perform an analysis on output obtained from
+ PSI-BLAST (Position Specific Iterated - BLAST). Using a very stringent cross validation
+ method to evaluate the methods performance"""
+
+ homepage = "http://bioinf.cs.ucl.ac.uk/psipred/"
+ url = "http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/psipred.4.02.tar.gz"
+
+ license_url = "http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/LICENSE"
+
+ version("4.02", sha256="b4009b6a5f8b76c6d60ac91c4a743512d844864cf015c492fb6d1dc0d092c467")
+
+ depends_on("c", type="build") # generated
+
+ variant("blast-plus", default=False, description="Use blast-plus in place of blast-legacy")
+
+ depends_on("blast-legacy", type="run", when="~blast-plus")
+ depends_on("blast-plus", type="run", when="+blast-plus")
+
+ build_directory = "src"
+
+ # patch to fix segfault on input lines >256 chars
+ # https://github.com/psipred/psipred/pull/8
+ patch(
+ "https://github.com/psipred/psipred/commit/cee0f2c.patch?full_index=1",
+ sha256="ef75999f688eaf7984e17f663c17c13e4eaba98912a904be128f562a7eaf8315",
+ when="@:1.10.1%gcc@13:",
+ level=1,
+ )
+
+ def edit(self, spec, prefix):
+ with working_dir(self.build_directory):
+ filter_file(r"CC\s+= cc", f"CC = {spack_cc}", "Makefile")
+
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make("all")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir(self.build_directory):
+ for f in ("psipred", "psipass2", "chkparse", "seq2mtx"):
+ install(f, prefix.bin)
+
+ @run_after("install")
+ def configure(self):
+ # install data sources
+ install_tree("data", prefix.data)
+ # modify and install the relevant helper script examples
+ mkdir(self.prefix.scripts)
+ if self.spec.satisfies("~blast-plus"):
+ script = FileFilter("runpsipred")
+ blast_location = self.spec["blast-legacy"].prefix.bin
+ else: # +blast-plus
+ script = FileFilter(join_path("BLAST+", "runpsipredplus"))
+ blast_location = self.spec["blast-plus"].prefix.bin
+ script.filter("set dbname .*", "set dbname = ")
+ script.filter("set ncbidir .*", f"set ncbidir = {blast_location}")
+ script.filter("set execdir .*", f"set execdir = {self.prefix.bin}")
+ script.filter("set datadir .*", f"set datadir = {self.prefix.data}")
+ if self.spec.satisfies("~blast-plus"):
+ install("runpsipred", self.prefix.scripts)
+ else: # +blast-plus
+ install(join_path("BLAST+", "runpsipredplus"), self.prefix.scripts)
diff --git a/var/spack/repos/builtin/packages/pslib/package.py b/var/spack/repos/builtin/packages/pslib/package.py
index 99031d78e7..7b591f60f9 100644
--- a/var/spack/repos/builtin/packages/pslib/package.py
+++ b/var/spack/repos/builtin/packages/pslib/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Pslib(AutotoolsPackage):
"""C-library to create PostScript files on the fly."""
- homepage = "http://pslib.sourceforge.net/"
+ homepage = "https://pslib.sourceforge.net/"
url = "https://sourceforge.net/projects/pslib/files/pslib/0.4.5/pslib-0.4.5.tar.gz"
license("GPL-2.0-only")
version("0.4.5", sha256="7a33928982b281660206bb3749a4a563e3ac987eea64f41696f212df345212be")
+ depends_on("c", type="build") # generated
+
depends_on("jpeg")
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/psm/package.py b/var/spack/repos/builtin/packages/psm/package.py
index 5946f552d1..992ff39fa5 100644
--- a/var/spack/repos/builtin/packages/psm/package.py
+++ b/var/spack/repos/builtin/packages/psm/package.py
@@ -22,6 +22,8 @@ class Psm(MakefilePackage):
)
version("2017-04-28", commit="604758e76dc31e68d1de736ccf5ddf16cb22355b")
+ depends_on("c", type="build") # generated
+
conflicts("%gcc@6:", when="@3.3")
depends_on("uuid")
diff --git a/var/spack/repos/builtin/packages/psmc/package.py b/var/spack/repos/builtin/packages/psmc/package.py
index 2398433563..2ab456639f 100644
--- a/var/spack/repos/builtin/packages/psmc/package.py
+++ b/var/spack/repos/builtin/packages/psmc/package.py
@@ -17,6 +17,8 @@ class Psmc(MakefilePackage):
version("2016-1-21", commit="e5f7df5d00bb75ec603ae0beff62c0d7e37640b9")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api", type="link")
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/psrcat/package.py b/var/spack/repos/builtin/packages/psrcat/package.py
index df8cb88bd4..087f7410da 100644
--- a/var/spack/repos/builtin/packages/psrcat/package.py
+++ b/var/spack/repos/builtin/packages/psrcat/package.py
@@ -16,6 +16,8 @@ class Psrcat(MakefilePackage):
version("1.68", sha256="fbe4710c9122e4f93dbca54cf42cc2906f948f76885b241d1da2f8caecfbc657")
+ depends_on("c", type="build") # generated
+
def build(self, spec, prefix):
makeit = which("./makeit")
makeit()
diff --git a/var/spack/repos/builtin/packages/psrchive/package.py b/var/spack/repos/builtin/packages/psrchive/package.py
index f96a70cbd5..5298872bc0 100644
--- a/var/spack/repos/builtin/packages/psrchive/package.py
+++ b/var/spack/repos/builtin/packages/psrchive/package.py
@@ -14,7 +14,7 @@ class Psrchive(AutotoolsPackage):
single-pulse work, RFI mitigation, etc. These tools are utilized by a
powerful suite of user-end programs that come with the library."""
- homepage = "http://psrchive.sourceforge.net/"
+ homepage = "https://psrchive.sourceforge.net/"
url = "https://sourceforge.net/projects/psrchive/files/psrchive/2022-05-14/psrchive-2022-05-14.tar.gz/download"
git = "https://git.code.sf.net/p/psrchive/code.git"
@@ -29,6 +29,10 @@ class Psrchive(AutotoolsPackage):
# as of Nov 23 2022
version("2020-10-17", commit="ca12b4a279f3d4adcca223508116d9d270df8cc6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Compile with MPI")
variant("mkl", default=False, description="Compile with MKL")
variant("armadillo", default=False, description="Compile with armadillo")
diff --git a/var/spack/repos/builtin/packages/psrdada/package.py b/var/spack/repos/builtin/packages/psrdada/package.py
new file mode 100644
index 0000000000..e2d3d62e70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psrdada/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Psrdada(AutotoolsPackage, CudaPackage):
+ """Open source software to process some types of astronomy data."""
+
+ homepage = "https://psrdada.sourceforge.net/"
+ git = "https://git.code.sf.net/p/psrdada/code"
+
+ maintainers("aweaver1fandm")
+
+ version("master", branch="master", preferred=True)
+
+ depends_on("c", type="build") # generated
+
+ conflicts("~cuda", msg="You must specify +cuda")
+ conflicts("cuda@11.8")
+ conflicts("cuda_arch=none", msg="You must specify the CUDA architecture")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("nasm", type="build")
+ depends_on("pkgconf", type="build")
+ depends_on("fftw@3.3:", type="build")
+ depends_on("python")
+ depends_on("cuda", type="build")
diff --git a/var/spack/repos/builtin/packages/pstreams/package.py b/var/spack/repos/builtin/packages/pstreams/package.py
index 2fc2bdaa90..21e69832bd 100644
--- a/var/spack/repos/builtin/packages/pstreams/package.py
+++ b/var/spack/repos/builtin/packages/pstreams/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class Pstreams(Package):
"""C++ wrapper for the POSIX.2 functions popen(3) and pclose(3)"""
- homepage = "http://pstreams.sourceforge.net/"
+ homepage = "https://pstreams.sourceforge.net/"
url = "https://sourceforge.net/projects/pstreams/files/pstreams/Release%201.0/pstreams-1.0.1.tar.gz"
license("BSL-1.0")
@@ -18,6 +18,8 @@ class Pstreams(Package):
version("1.0.3", sha256="e9ca807bc6046840deae63207183f9ac516e67187d035429772a5fc7bd3e8fc8")
version("1.0.1", sha256="a5f1f2e014392cd0e2cdb508a429e11afe64140db05b7f0a83d7534faa1a9226")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.include)
install("pstream.h", prefix.include)
diff --git a/var/spack/repos/builtin/packages/pthreadpool/package.py b/var/spack/repos/builtin/packages/pthreadpool/package.py
index 7f95850d18..5ccb439496 100644
--- a/var/spack/repos/builtin/packages/pthreadpool/package.py
+++ b/var/spack/repos/builtin/packages/pthreadpool/package.py
@@ -15,13 +15,17 @@ class Pthreadpool(CMakePackage):
license("BSD-2-Clause")
version("master", branch="master")
- version("2021-04-13", commit="a134dd5d4cee80cce15db81a72e7f929d71dd413") # py-torch@1.9
+ version("2023-08-29", commit="4fe0e1e183925bf8cfa6aae24237e724a96479b8") # py-torch@2.2:
+ version("2021-04-13", commit="a134dd5d4cee80cce15db81a72e7f929d71dd413") # py-torch@1.9:2.1
version("2020-10-05", commit="fa75e65a58a5c70c09c30d17a1fe1c1dff1093ae") # py-torch@1.8
version("2020-06-15", commit="029c88620802e1361ccf41d1970bd5b07fd6b7bb") # py-torch@1.6:1.7
version("2019-10-29", commit="d465747660ecf9ebbaddf8c3db37e4a13d0c9103") # py-torch@1.5
version("2018-10-08", commit="13da0b4c21d17f94150713366420baaf1b5a46f4") # py-torch@1.0:1.4
version("2018-02-25", commit="2b06b31f6a315162348e1f3c24325eedaf6cc559") # py-torch@:0.4
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
@@ -35,8 +39,8 @@ class Pthreadpool(CMakePackage):
)
resource(
name="googletest",
- url="https://github.com/google/googletest/archive/release-1.10.0.zip",
- sha256="94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91",
+ url="https://github.com/google/googletest/archive/release-1.12.0.zip",
+ sha256="ce7366fe57eb49928311189cb0e40e0a8bf3d3682fca89af30d884c25e983786",
destination="deps",
placement="googletest",
)
@@ -50,7 +54,6 @@ 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", join_path(self.stage.source_path, "deps", "googletest")
@@ -59,6 +62,10 @@ class Pthreadpool(CMakePackage):
"GOOGLEBENCHMARK_SOURCE_DIR",
join_path(self.stage.source_path, "deps", "googlebenchmark"),
),
- self.define("PTHREADPOOL_BUILD_TESTS", self.run_tests),
- self.define("PTHREADPOOL_BUILD_BENCHMARKS", self.run_tests),
+ # https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake
+ self.define("PTHREADPOOL_BUILD_TESTS", False),
+ self.define("PTHREADPOOL_BUILD_BENCHMARKS", False),
+ self.define("PTHREADPOOL_LIBRARY_TYPE", "static"),
+ self.define("PTHREADPOOL_ALLOW_DEPRECATED_API", True),
+ self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
]
diff --git a/var/spack/repos/builtin/packages/pugixml/package.py b/var/spack/repos/builtin/packages/pugixml/package.py
index 3cb7ae0e64..dab9c1aa8a 100644
--- a/var/spack/repos/builtin/packages/pugixml/package.py
+++ b/var/spack/repos/builtin/packages/pugixml/package.py
@@ -15,12 +15,15 @@ class Pugixml(CMakePackage):
license("MIT")
+ version("1.14", sha256="2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015")
version("1.13", sha256="40c0b3914ec131485640fa57e55bf1136446026b41db91c1bef678186a12abbe")
version("1.11.4", sha256="8ddf57b65fb860416979a3f0640c2ad45ddddbbafa82508ef0a0af3ce7061716")
version("1.11", sha256="26913d3e63b9c07431401cf826df17ed832a20d19333d043991e611d23beaa2c")
version("1.10", sha256="55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a")
version("1.8.1", sha256="929c4657c207260f8cc28e5b788b7499dffdba60d83d59f55ea33d873d729cd4")
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=True, description="Build position-independent code")
variant("shared", default=True, description="Build shared libraries")
diff --git a/var/spack/repos/builtin/packages/pulseaudio/package.py b/var/spack/repos/builtin/packages/pulseaudio/package.py
index a8056319fc..81e6db06b4 100644
--- a/var/spack/repos/builtin/packages/pulseaudio/package.py
+++ b/var/spack/repos/builtin/packages/pulseaudio/package.py
@@ -24,6 +24,9 @@ class Pulseaudio(AutotoolsPackage):
version("13.0", sha256="961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("alsa", default=False, description="alsa support")
variant("fftw", default=False, description="FFTW support")
variant("gconf", default=False, description="Gconf support")
@@ -41,7 +44,7 @@ class Pulseaudio(AutotoolsPackage):
depends_on("libcap")
depends_on("iconv")
depends_on("libsndfile@1.0.18:")
- depends_on("libtool@2.4:") # links to libltdl.so
+ depends_on("libtool@2.4:", type="link") # links to libltdl.so
depends_on("libsm", when="+x11")
depends_on("uuid", when="+x11")
depends_on("libx11", when="+x11")
@@ -52,6 +55,7 @@ class Pulseaudio(AutotoolsPackage):
depends_on("libxtst", when="+x11")
depends_on("openssl", when="+openssl")
depends_on("perl-xml-parser", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("speexdsp@1.2:")
depends_on("m4", type="build")
diff --git a/var/spack/repos/builtin/packages/pumi/package.py b/var/spack/repos/builtin/packages/pumi/package.py
index f06b007833..76bb0a7618 100644
--- a/var/spack/repos/builtin/packages/pumi/package.py
+++ b/var/spack/repos/builtin/packages/pumi/package.py
@@ -31,6 +31,9 @@ class Pumi(CMakePackage):
# to the added instability.
version("master", submodules=True, branch="master")
version(
+ "2.2.9", submodules=True, commit="f87525cae7597322edfb2ccf1c7d4437402d9481"
+ ) # tag 2.2.9
+ version(
"2.2.8", submodules=True, commit="736bb87ccd8db51fc499a1b91e53717a88841b1f"
) # tag 2.2.8
version(
@@ -45,6 +48,10 @@ class Pumi(CMakePackage):
version("2.2.0", commit="8c7e6f13943893b2bc1ece15003e4869a0e9634f") # tag 2.2.0
version("2.1.0", commit="840fbf6ec49a63aeaa3945f11ddb224f6055ac9f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("int64", default=False, description="Enable 64bit mesh entity ids")
variant("shared", default=False, description="Build shared libraries")
variant("zoltan", default=False, description="Enable Zoltan Features")
@@ -65,6 +72,10 @@ class Pumi(CMakePackage):
"Disable the check for testing new versions.",
)
+ depends_on("cxx", type="build")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
depends_on("mpi")
depends_on("cmake@3:", type="build")
depends_on("zoltan", when="+zoltan")
@@ -111,25 +122,34 @@ class Pumi(CMakePackage):
args.append("-DSIM_DISCRETE=ON")
return args
- def test(self):
- if self.spec.version <= Version("2.2.6"):
- return
- exe = "uniform"
- options = ["../testdata/pipe.dmg", "../testdata/pipe.smb", "pipe_unif.smb"]
- expected = "mesh pipe_unif.smb written"
- description = "testing pumi uniform mesh refinement"
- self.run_test(exe, options, expected, purpose=description, work_dir=self.prefix.bin)
-
- mpiexec = Executable(join_path(self.spec["mpi"].prefix.bin, "mpiexec")).command
- mpiopt = ["-n", "2"]
- exe = ["split"]
- options = ["../testdata/pipe.dmg", "../testdata/pipe.smb", "pipe_2_.smb", "2"]
- expected = "mesh pipe_2_.smb written"
- description = "testing pumi mesh partitioning"
- self.run_test(
- mpiexec,
- mpiopt + exe + options,
- expected,
- purpose=description,
- work_dir=self.prefix.bin,
- )
+ def test_partition(self):
+ """Testing pumi mesh partitioning"""
+ if self.spec.satisfies("@:2.2.6"):
+ raise SkipTest("Package must be installed as version @2.2.7 or later")
+
+ options = [
+ "-n",
+ "2",
+ join_path(self.prefix.bin, "split"),
+ join_path(self.prefix.share.testdata, "pipe.dmg"),
+ join_path(self.prefix.share.testdata, "pipe.smb"),
+ "pipe_2_.smb",
+ "2",
+ ]
+ exe = which(self.spec["mpi"].prefix.bin.mpiexec)
+ out = exe(*options, output=str.split, error=str.split)
+ assert "mesh pipe_2_.smb written" in out
+
+ def test_refine(self):
+ """Testing pumi uniform mesh refinement"""
+ if self.spec.satisfies("@:2.2.6"):
+ raise SkipTest("Package must be installed as version @2.2.7 or later")
+
+ options = [
+ join_path(self.prefix.share.testdata, "pipe.dmg"),
+ join_path(self.prefix.share.testdata, "pipe.smb"),
+ "pipe_unif.smb",
+ ]
+ exe = which(self.prefix.bin.uniform)
+ out = exe(*options, output=str.split, error=str.split)
+ assert "mesh pipe_unif.smb written" in out
diff --git a/var/spack/repos/builtin/packages/purify/package.py b/var/spack/repos/builtin/packages/purify/package.py
new file mode 100644
index 0000000000..3a2fdc7c75
--- /dev/null
+++ b/var/spack/repos/builtin/packages/purify/package.py
@@ -0,0 +1,73 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Purify(CMakePackage):
+ """PURIFY is an open-source collection of routines written in C++ available under the
+ license below. It implements different tools and high-level to perform radio interferometric
+ imaging, i.e. to recover images from the Fourier measurements taken by radio interferometric
+ telescopes.
+ """
+
+ homepage = "https://astro-informatics.github.io/purify/"
+ url = "https://github.com/astro-informatics/purify/archive/refs/tags/v4.2.0.tar.gz"
+ git = "https://github.com/astro-informatics/purify"
+
+ maintainers("tkoskela", "mmcleod89", "20DM")
+ license("GPL-2.0")
+
+ version("4.2.0", sha256="4d674007efc727628839fb6c8864e74f22adb39ee6405d3dab273f65b31b37e6")
+
+ variant("tests", default=True, description="Build tests")
+ variant("openmp", default=True, description="Enable multithreading with OpenMP")
+ variant("mpi", default=True, description="Enable parallelisation with MPI")
+ variant("benchmarks", default=False, description="Build benchmarks")
+ variant("docs", default=False, description="Enable multithreading with OpenMP")
+ variant("coverage", default=False, description="Enable code coverage")
+
+ depends_on("cmake@3")
+ depends_on("eigen@3.4:3")
+ depends_on("libtiff@4.7:")
+ depends_on("fftw-api")
+ depends_on("yaml-cpp@0.7:")
+ depends_on("boost@1.82+system+filesystem")
+ depends_on("cfitsio@4")
+ depends_on("cubature@1")
+ depends_on("sopt~mpi", when="~mpi")
+ depends_on("sopt+mpi", when="+mpi")
+ depends_on("sopt~openmp", when="~openmp")
+ depends_on("sopt+openmp", when="+openmp")
+ depends_on("catch2@3.4:3", when="+tests")
+ depends_on("mpi", when="+mpi")
+ depends_on("benchmark@1.8~performance_counters", when="+benchmarks")
+ depends_on("doxygen@1.9:1.12+graphviz", when="+docs")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("docs", "docs"),
+ self.define_from_variant("tests", "tests"),
+ self.define_from_variant("benchmarks", "benchmarks"),
+ self.define_from_variant("openmp", "openmp"),
+ self.define_from_variant("dompi", "mpi"),
+ self.define_from_variant("coverage", "coverage"),
+ ]
+ return args
+
+ def setup_run_environment(self, env):
+ if "+tests" in self.spec:
+ env.prepend_path("PATH", self.spec.prefix.tests)
+ if "+benchmarks" in self.spec:
+ env.prepend_path("PATH", join_path(self.spec.prefix, "benchmarks"))
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make("install")
+ if "+tests" in spec:
+ install_tree("cpp/tests", spec.prefix.tests)
+ install_tree("data", join_path(spec.prefix, "data"))
+ if "+benchmarks" in spec:
+ install_tree("cpp/benchmarks", join_path(spec.prefix, "benchmarks"))
diff --git a/var/spack/repos/builtin/packages/pv/package.py b/var/spack/repos/builtin/packages/pv/package.py
index bfefec34fe..9168d2177d 100644
--- a/var/spack/repos/builtin/packages/pv/package.py
+++ b/var/spack/repos/builtin/packages/pv/package.py
@@ -12,9 +12,13 @@ class Pv(AutotoolsPackage):
"""
homepage = "https://www.ivarch.com/programs/pv.shtml"
- url = "https://www.ivarch.com/programs/sources/pv-1.6.6.tar.bz2"
+ url = "https://www.ivarch.com/programs/sources/pv-1.6.6.tar.gz"
- license("Artistic-2.0")
+ license("GPL-3.0-or-later", when="@1.8.0:", checked_by="RemiLacroix-IDRIS")
+ license("Artistic-2.0", when="@:1.7.24", checked_by="RemiLacroix-IDRIS")
- version("1.6.20", sha256="e831951eff0718fba9b1ef286128773b9d0e723e1fbfae88d5a3188814fdc603")
- version("1.6.6", sha256="608ef935f7a377e1439c181c4fc188d247da10d51a19ef79bcdee5043b0973f1")
+ version("1.8.5", sha256="d22948d06be06a5be37336318de540a2215be10ab0163f8cd23a20149647b780")
+ version("1.6.20", sha256="b5f1ee79a370c5287e092b6e8f1084f026521fe0aecf25c44b9460b870319a9e")
+ version("1.6.6", sha256="94defb4183ae07c44219ba298d43c4991d6e203c29f74393d72ecad3b090508a")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/pvm/package.py b/var/spack/repos/builtin/packages/pvm/package.py
index 0000c87e81..d546b4ce9c 100644
--- a/var/spack/repos/builtin/packages/pvm/package.py
+++ b/var/spack/repos/builtin/packages/pvm/package.py
@@ -18,6 +18,9 @@ class Pvm(MakefilePackage):
version("3.4.6", sha256="482665e9bc975d826bcdacf1df1d42e43deda9585a2c430fd3b7b7ed08eada44")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("m4", type="build")
depends_on("libtirpc", type="link")
diff --git a/var/spack/repos/builtin/packages/pwgen/package.py b/var/spack/repos/builtin/packages/pwgen/package.py
index dde641f069..6c36e5119a 100644
--- a/var/spack/repos/builtin/packages/pwgen/package.py
+++ b/var/spack/repos/builtin/packages/pwgen/package.py
@@ -10,7 +10,7 @@ class Pwgen(AutotoolsPackage):
"""Pwgen is a small, GPL'ed password generator which creates passwords
which can be easily memorized by a human."""
- homepage = "https://sourceforge.net/projects/pwgen"
+ homepage = "https://sourceforge.net/projects/pwgen/"
url = "https://downloads.sourceforge.net/project/pwgen/pwgen/2.08/pwgen-2.08.tar.gz"
maintainers("cessenat")
@@ -19,4 +19,6 @@ class Pwgen(AutotoolsPackage):
version("2.08", sha256="dab03dd30ad5a58e578c5581241a6e87e184a18eb2c3b2e0fffa8a9cf105c97b")
+ depends_on("c", type="build") # generated
+
depends_on("coreutils", type="build")
diff --git a/var/spack/repos/builtin/packages/pxz/package.py b/var/spack/repos/builtin/packages/pxz/package.py
index 8d49db024c..60af37c6fa 100644
--- a/var/spack/repos/builtin/packages/pxz/package.py
+++ b/var/spack/repos/builtin/packages/pxz/package.py
@@ -19,6 +19,8 @@ class Pxz(MakefilePackage):
sha256="df69f91103db6c20f0b523bb7f026d86ee662c49fe714647ed63f918cd39767a",
)
+ depends_on("c", type="build") # generated
+
depends_on("xz")
conflicts("platform=darwin", msg="Pxz runs only on Linux.")
diff --git a/var/spack/repos/builtin/packages/py-4suite-xml/package.py b/var/spack/repos/builtin/packages/py-4suite-xml/package.py
index ffb1a78e43..474c4ed2ac 100644
--- a/var/spack/repos/builtin/packages/py-4suite-xml/package.py
+++ b/var/spack/repos/builtin/packages/py-4suite-xml/package.py
@@ -15,6 +15,8 @@ class Py4suiteXml(PythonPackage):
version("1.0.2", sha256="f0c24132eb2567e64b33568abff29a780a2f0236154074d0b8f5262ce89d8c03")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.2.1:", type=("build", "run"))
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-accimage/package.py b/var/spack/repos/builtin/packages/py-accimage/package.py
index 46f226676a..da85b97d06 100644
--- a/var/spack/repos/builtin/packages/py-accimage/package.py
+++ b/var/spack/repos/builtin/packages/py-accimage/package.py
@@ -20,6 +20,8 @@ class PyAccimage(PythonPackage):
version("0.1.1", sha256="573c56866a42683c7cf25185620fe82ec2ce78468e0621c29fac8f4134a785f5")
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "link", "run"))
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-adios/package.py b/var/spack/repos/builtin/packages/py-adios/package.py
index be61bec771..173e6df7e0 100644
--- a/var/spack/repos/builtin/packages/py-adios/package.py
+++ b/var/spack/repos/builtin/packages/py-adios/package.py
@@ -20,6 +20,10 @@ class PyAdios(PythonPackage):
version("develop", branch="master")
version("1.13.1", sha256="b1c6949918f5e69f701cabfe5987c0b286793f1057d4690f04747852544e157b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
for v in ["1.13.1", "develop"]:
diff --git a/var/spack/repos/builtin/packages/py-aiobotocore/package.py b/var/spack/repos/builtin/packages/py-aiobotocore/package.py
index 6892f98978..b3cf5ba550 100644
--- a/var/spack/repos/builtin/packages/py-aiobotocore/package.py
+++ b/var/spack/repos/builtin/packages/py-aiobotocore/package.py
@@ -14,14 +14,19 @@ class PyAiobotocore(PythonPackage):
license("Apache-2.0")
+ version("2.12.1", sha256="8706b28f16f93c541f6ed50352115a79d8f3499539f8d0bb70aa0f7a5379c1fe")
version("2.5.0", sha256="6a5b397cddd4f81026aa91a14c7dd2650727425740a5af8ba75127ff663faf67")
version("2.4.2", sha256="0603b74a582dffa7511ce7548d07dc9b10ec87bc5fb657eb0b34f9bd490958bf")
version("1.2.1", sha256="58cc422e65fc89f7cb78eca740d241ac8e15f39f6b308cc23152711e8a987d45")
depends_on("py-setuptools", type="build")
+ depends_on("py-botocore@1.34.41:1.34.51", when="@2.12.1", type=("build", "run"))
depends_on("py-botocore@1.27.59", when="@2.4.2", type=("build", "run"))
depends_on("py-botocore@1.19.52", when="@1.2.1", type=("build", "run"))
depends_on("py-botocore@1.29.76", when="@2.5.0", type=("build", "run"))
- depends_on("py-aiohttp@3.3.1:", type=("build", "run"))
- depends_on("py-wrapt@1.10.10:", type=("build", "run"))
- depends_on("py-aioitertools@0.5.1:", type=("build", "run"))
+ depends_on("py-aiohttp@3.7.4:3", when="@2.12:", type=("build", "run"))
+ depends_on("py-aiohttp@3.3.1:", when="@:2.5", type=("build", "run"))
+ depends_on("py-wrapt@1.10.10:1", when="@2.12:", type=("build", "run"))
+ depends_on("py-wrapt@1.10.10:", when="@:2.5", type=("build", "run"))
+ depends_on("py-aioitertools@0.5.1:0", when="@2.12:", type=("build", "run"))
+ depends_on("py-aioitertools@0.5.1:", when="@:2.5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-aiohttp/package.py b/var/spack/repos/builtin/packages/py-aiohttp/package.py
index 28fe3f58a3..da787028e3 100644
--- a/var/spack/repos/builtin/packages/py-aiohttp/package.py
+++ b/var/spack/repos/builtin/packages/py-aiohttp/package.py
@@ -18,12 +18,18 @@ class PyAiohttp(PythonPackage):
license("Apache-2.0")
+ version("3.9.5", sha256="edea7d15772ceeb29db4aff55e482d4bcfb6ae160ce144f2682de02f6d693551")
+ version("3.9.4", sha256="6ff71ede6d9a5a58cfb7b6fffc83ab5d4a63138276c771ac91ceaaddf5459644")
+ version("3.9.0", sha256="09f23292d29135025e19e8ff4f0a68df078fe4ee013bca0105b2e803989de92d")
version("3.8.4", sha256="bf2e1a9162c1e441bf805a1fd166e249d574ca04e03b34f97e2928769e91ab5c")
version("3.8.1", sha256="fc5471e1a54de15ef71c1bc6ebe80d4dc681ea600e68bfd1cbce40427f0b7578")
version("3.8.0", sha256="d3b19d8d183bcfd68b25beebab8dc3308282fe2ca3d6ea3cb4cd101b3c279f8d")
version("3.7.4", sha256="5d84ecc73141d0a0d61ece0742bb7ff5751b0657dab8405f899d3ceb104cc7de")
version("3.6.2", sha256="259ab809ff0727d0e834ac5e8a283dc5e3e0ecc30c4d80b3cd17a4139ce1f326")
+ depends_on("c", type="build") # generated
+
+ depends_on("python@3.8:", when="@3.9:")
depends_on("py-setuptools@46.4:", type="build")
depends_on("py-attrs@17.3.0:", type=("build", "run"))
@@ -31,8 +37,8 @@ class PyAiohttp(PythonPackage):
depends_on("py-charset-normalizer@2", when="@3.8.0:3.8.3", type=("build", "run"))
depends_on("py-multidict@4.5:6", when="@3.6.3:", type=("build", "run"))
depends_on("py-multidict@4.5:4", when="@:3.6.2", type=("build", "run"))
- depends_on("py-async-timeout@4", when="@3.8.0:", type=("build", "run"))
- depends_on("py-async-timeout@3", when="@:3.7.4", type=("build", "run"))
+ depends_on("py-async-timeout@4", when="@3.8.0 ^python@:3.10", type=("build", "run"))
+ depends_on("py-async-timeout@3", when="@:3.7.4 ^python@:3.10", type=("build", "run"))
depends_on("py-asynctest@0.13.0", when="@3.8.0: ^python@:3.7", type=("build", "run"))
depends_on("py-yarl@1", type=("build", "run"))
depends_on("py-typing-extensions@3.7.4:", when="@3.8: ^python@:3.7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-alabaster/package.py b/var/spack/repos/builtin/packages/py-alabaster/package.py
index 44fc988f00..1c2c026136 100644
--- a/var/spack/repos/builtin/packages/py-alabaster/package.py
+++ b/var/spack/repos/builtin/packages/py-alabaster/package.py
@@ -14,9 +14,12 @@ class PyAlabaster(PythonPackage):
pypi = "alabaster/alabaster-0.7.10.tar.gz"
git = "https://github.com/sphinx-doc/alabaster.git"
+ version("0.7.16", sha256="75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65")
version("0.7.13", sha256="a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2")
version("0.7.12", sha256="a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02")
version("0.7.10", sha256="37cdcb9e9954ed60912ebc1ca12a9d12178c26637abdf124e3cde2341c257fe0")
version("0.7.9", sha256="47afd43b08a4ecaa45e3496e139a193ce364571e7e10c6a87ca1a4c57eb7ea08")
- depends_on("py-setuptools", type="build")
+ depends_on("python@3.9:", when="@0.7.16:", type=("build", "run"))
+ depends_on("py-flit-core@3.7:", when="@0.7.16:", type="build")
+ depends_on("py-setuptools", when="@:0.7.13", type="build")
diff --git a/var/spack/repos/builtin/packages/py-alive-progress/package.py b/var/spack/repos/builtin/packages/py-alive-progress/package.py
index 944dce0a95..0342326115 100644
--- a/var/spack/repos/builtin/packages/py-alive-progress/package.py
+++ b/var/spack/repos/builtin/packages/py-alive-progress/package.py
@@ -16,12 +16,15 @@ class PyAliveProgress(PythonPackage):
license("MIT")
+ version("3.2.0", sha256="ede29d046ff454fe56b941f686f89dd9389430c4a5b7658e445cb0b80e0e4deb")
version("2.4.1", sha256="089757c8197f27ad972ba27e1060f6db92368d83c736884e159034fd74865323")
version("1.6.2", sha256="642e1ce98becf226c8c36bf24e10221085998c5465a357a66fb83b7dc618b43e")
- depends_on("python@2.7:3.8", type=("build", "run"))
+ depends_on("python@2.7:3", type=("build", "run"))
depends_on("python@3.6:3", type=("build", "run"), when="@2:")
depends_on("python@3.7:3", type=("build", "run"), when="@2.2:")
+ depends_on("python@3.9:3", type=("build", "run"), when="@3.2:")
depends_on("py-setuptools", type="build")
- depends_on("py-about-time@3.1.1", type=("build", "run"), when="@2.4.1:")
+ depends_on("py-about-time@3.1.1", type=("build", "run"), when="@2.4.1")
+ depends_on("py-about-time@4.2.1", type=("build", "run"), when="@3:")
depends_on("py-grapheme@0.6.0", type=("build", "run"), when="@2.4.1:")
diff --git a/var/spack/repos/builtin/packages/py-alphafold/package.py b/var/spack/repos/builtin/packages/py-alphafold/package.py
index 37bc178562..0269a2abdf 100644
--- a/var/spack/repos/builtin/packages/py-alphafold/package.py
+++ b/var/spack/repos/builtin/packages/py-alphafold/package.py
@@ -53,7 +53,7 @@ class PyAlphafold(PythonPackage, CudaPackage):
type="run",
patches=[
patch(
- "https://raw.githubusercontent.com/deepmind/alphafold/main/docker/openmm.patch",
+ "https://raw.githubusercontent.com/google-deepmind/alphafold/2819de4ddd075340b81d36bcf7932a0ff0fbe404/docker/openmm.patch",
sha256="a5a0ced820f3ecc56ae634c3111f80614863559b0587954a2658c8d4b2a07ae3",
working_dir="wrappers/python",
level=0,
@@ -77,7 +77,7 @@ class PyAlphafold(PythonPackage, CudaPackage):
@run_after("install")
def install_scripts(self):
mkdirp(self.prefix.bin)
- shebang = "#!{0}\n".format(self.spec["python"].command)
+ shebang = f"#!{python.path}\n"
for fname in glob.glob("run_alphafold*.py"):
destfile = join_path(self.prefix.bin, fname)
with open(fname, "r") as src:
diff --git a/var/spack/repos/builtin/packages/py-altair/package.py b/var/spack/repos/builtin/packages/py-altair/package.py
index 71d99f1c50..4fcccc4816 100644
--- a/var/spack/repos/builtin/packages/py-altair/package.py
+++ b/var/spack/repos/builtin/packages/py-altair/package.py
@@ -9,17 +9,41 @@ from spack.package import *
class PyAltair(PythonPackage):
"""Declarative statistical visualization library for Python"""
- pypi = "altair/altair-4.2.0.tar.gz"
+ pypi = "altair/altair-5.4.1.tar.gz"
license("BSD-3-Clause")
+ version("5.4.1", sha256="0ce8c2e66546cb327e5f2d7572ec0e7c6feece816203215613962f0ec1d76a82")
+ version("5.2.0", sha256="2ad7f0c8010ebbc46319cc30febfb8e59ccf84969a201541c207bc3a4fa6cf81")
+ version("5.1.2", sha256="e5f52a71853a607c61ce93ad4a414b3d486cd0d46ac597a24ae8bd1ac99dd460")
+ version("5.1.1", sha256="ad6cd6983c8db69a34dd68e42653f6172b7fc3775b7190005107f1b4fc60d64d")
+ version("5.1.0", sha256="46d2b1a9fa29eeed24513262cb1de13a40d55c04580fc21799d5de3991fea8ff")
+ version("5.0.1", sha256="087d7033cb2d6c228493a053e12613058a5d47faf6a36aea3ff60305fd8b4cb0")
+ version("5.0.0", sha256="394c3d8be96f9cc90e15a0eee3634cc5b6f19e470fd2045759892623bd9a3fb2")
+ version("4.2.2", sha256="39399a267c49b30d102c10411e67ab26374156a84b1aeb9fcd15140429ba49c5")
+ version("4.2.1", sha256="4939fd9119c57476bf305af9ca0bd1aa7779b2450b874d3623660e879d0fcad1")
version("4.2.0", sha256="d87d9372e63b48cd96b2a6415f0cf9457f50162ab79dc7a31cd7e024dd840026")
+ variant("pandas", default=True, description="Enable pandas support")
+
+ conflicts("~pandas", when="@:5.3.0")
+
depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-setuptools@40.6:", type="build")
- depends_on("py-entrypoints", type=("build", "run"))
- depends_on("py-jsonschema@3:", type=("build", "run"))
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-pandas@0.18:", type=("build", "run"))
- depends_on("py-toolz", type=("build", "run"))
+ depends_on("py-setuptools@40.6:", type="build", when="@:4")
+ depends_on("py-entrypoints", type=("build", "run"), when="@2.0.0:4")
+
+ depends_on("py-hatchling", type=("build"), when="@5.0.0:")
+
+ depends_on("py-importlib-metadata", type=("build", "run"), when="@5.0.0:5.0")
+ depends_on(
+ "py-typing-extensions@4.0.1:", type=("build", "run"), when="@5.0.0:5.3.0 ^python@:3.10"
+ )
+ depends_on("py-typing-extensions@4.10.0:", type=("build", "run"), when="@5.4.0: ^python@:3.13")
depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-jsonschema@3.0.0:", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"), when="+pandas")
+ depends_on("py-pandas@0.18:", type=("build", "run"), when="+pandas")
+ depends_on("py-pandas@0.25:", type=("build", "run"), when="@5.1.0:+pandas")
+ depends_on("py-toolz", type=("build", "run"), when="@:5.3.0")
+ depends_on("py-packaging", type=("build", "run"), when="@5.1.0:")
+ depends_on("py-narwhals@1.5.2:", type=("build", "run"), when="@5.4.0:")
diff --git a/var/spack/repos/builtin/packages/py-amici/package.py b/var/spack/repos/builtin/packages/py-amici/package.py
index 7b6bac8e88..731734daa5 100644
--- a/var/spack/repos/builtin/packages/py-amici/package.py
+++ b/var/spack/repos/builtin/packages/py-amici/package.py
@@ -15,6 +15,9 @@ class PyAmici(PythonPackage):
version("0.16.0", sha256="1a2d6633ec34241d8d8b496d18d4318482cffe125e9ddf3ca6cac5d36d235f38")
version("0.11.28", sha256="a8ddda70d8ebdc40600b4ad2ea02eb26e765ca0e594b957f61866b8c84255d5b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("boost", default=True, description="Enable boost support")
variant("hdf5", default=True, description="Enable HDF5 support")
diff --git a/var/spack/repos/builtin/packages/py-amplpy/package.py b/var/spack/repos/builtin/packages/py-amplpy/package.py
index cc9d0c069b..77f0f3fa82 100644
--- a/var/spack/repos/builtin/packages/py-amplpy/package.py
+++ b/var/spack/repos/builtin/packages/py-amplpy/package.py
@@ -22,6 +22,8 @@ class PyAmplpy(PythonPackage):
version("0.8.6", sha256="ad0945d69f75e7762802bb54849009717fbcf226a6da6f37b539d9534bdcf68d")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-future@0.15.0:", type=("build", "run"))
depends_on("py-ampltools@0.4.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-amqp/package.py b/var/spack/repos/builtin/packages/py-amqp/package.py
index 13b5e912ea..41905eb056 100644
--- a/var/spack/repos/builtin/packages/py-amqp/package.py
+++ b/var/spack/repos/builtin/packages/py-amqp/package.py
@@ -13,12 +13,20 @@ class PyAmqp(PythonPackage):
license("BSD-3-Clause")
+ version("5.2.0", sha256="a1ecff425ad063ad42a486c902807d1482311481c8ad95a72694b2975e75f7fd")
+ version("5.1.1", sha256="2c1b13fecc0893e946c65cbd5f36427861cffa4ea2201d8f6fca22e2a373b5e2")
version("5.0.9", sha256="1e5f707424e544078ca196e72ae6a14887ce74e02bd126be54b7c03c971bef18")
+ version("5.0.6", sha256="03e16e94f2b34c31f8bf1206d8ddd3ccaa4c315f7f6a1879b7b1210d229568c2")
version("5.0.1", sha256="9881f8e6fe23e3db9faa6cfd8c05390213e1d1b95c0162bc50552cad75bffa5f")
+ version("5.0.0", sha256="1183b66e54a5c533b679d9f557b31c5b31d26701761f2bbd144054cce58f3588")
version("2.6.1", sha256="70cdb10628468ff14e57ec2f751c7aa9e48e7e3651cfd62d431213c0c4e58f21")
+ version("2.6.0", sha256="24dbaff8ce4f30566bb88976b398e8c4e77637171af3af6f1b9650f48890e60b")
version("2.5.2", sha256="77f1aef9410698d20eaeac5b73a87817365f457a507d82edf292e12cbb83b08d")
+ version("2.5.1", sha256="19a917e260178b8d410122712bac69cb3e6db010d68f6101e7307508aded5e68")
+ version("2.5.0", sha256="cbb6f87d53cac612a594f982b717cc1c54c6a1e17943a0a0d32dc6cc9e2120c8")
version("2.4.2", sha256="043beb485774ca69718a35602089e524f87168268f0d1ae115f28b88d27f92d7")
version("2.4.1", sha256="6816eed27521293ee03aa9ace300a07215b11fee4e845588a9b863a7ba30addb")
+ version("2.4.0", sha256="9f181e4aef6562e6f9f45660578fc1556150ca06e836ecb9e733e6ea10b48464")
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@5.0.9:")
diff --git a/var/spack/repos/builtin/packages/py-amrex/package.py b/var/spack/repos/builtin/packages/py-amrex/package.py
index 218a3b4ac8..b3ea902a4d 100644
--- a/var/spack/repos/builtin/packages/py-amrex/package.py
+++ b/var/spack/repos/builtin/packages/py-amrex/package.py
@@ -3,13 +3,15 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
-class PyAmrex(PythonPackage, CudaPackage, ROCmPackage):
+class PyAmrex(CMakePackage, PythonExtension, CudaPackage, ROCmPackage):
"""AMReX Python Bindings with pybind11"""
homepage = "https://amrex-codes.github.io/amrex/"
+ url = "https://github.com/AMReX-Codes/pyamrex/archive/refs/tags/24.10.tar.gz"
git = "https://github.com/AMReX-Codes/pyamrex.git"
maintainers("ax3l", "RTSandberg", "sayerhs", "WeiqunZhang")
@@ -17,8 +19,37 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause-LBNL")
version("develop", branch="development")
+ version("24.10", sha256="dc1752ed3fbd5113dcfdbddcfe6c3c458e572b288ac9d41ed3ed7db130591d74")
+ version(
+ "24.08",
+ sha256="e7179d88261f64744f392a2194ff2744fe323fe0e21d0742ba60458709a1b47e",
+ deprecated=True,
+ )
+ version(
+ "24.04",
+ sha256="ab85695bb9644b702d0fc84e77205d264d27ba94999cab912c8a3212a7eb77fc",
+ deprecated=True,
+ )
+
+ version(
+ "24.03",
+ sha256="bf85b4ad35b623278cbaae2c07e22138545dec0732d15c4ab7c53be76a7f2315",
+ deprecated=True,
+ )
+
+ for v in ["24.10", "24.08", "24.04", "24.03"]:
+ depends_on("amrex@{0}".format(v), when="@{0}".format(v), type=("build", "link"))
- variant("dimensions", default="3", description="Dimensionality", values=("1", "2", "3"))
+ variant(
+ "dimensions",
+ default="1,2,3",
+ values=("1", "2", "3"),
+ multi=True,
+ description="Dimensionality",
+ )
+ # Spack defaults to False but pybind11 defaults to True (and IPO is highly
+ # encouraged to be used with pybind11 projects)
+ variant("ipo", default=True, description="CMake interprocedural optimization")
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=False, description="Build with OpenMP support")
variant(
@@ -28,22 +59,27 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage):
values=("single", "double"),
)
variant("tiny_profile", default=False, description="Enable tiny profiling")
+ variant("sycl", default=False, description="Enable SYCL backend")
+
+ extends("python")
- depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-numpy@1.15.0:1", type=("build", "run"))
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("cmake@3.20:3", type="build", when="@:24.08")
+ depends_on("cmake@3.24:3", type="build", when="@24.09:")
+ depends_on("python@3.8:", type=("build", "run"))
depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi")
+ depends_on("py-numpy@1.15:", type=("build", "run"))
+ depends_on("py-packaging@23:", type="build")
+ depends_on("py-pip@23:", type="build")
depends_on("py-setuptools@42:", type="build")
- # We just need a CMake binary, and py-cmake is notoriously hard to build on
- # exotic architectures. So ignore the pyproject.toml declaration and use
- # Spack's cmake package.
- # depends_on('py-cmake@3.20:3', type='build')
- depends_on("cmake@3.20:3", type="build")
- depends_on("py-pybind11@2.9.1:", type="link")
+ depends_on("py-pybind11@2.12.0:", type=("build", "link"))
+ depends_on("py-wheel@0.40:", type="build")
# AMReX options
- depends_on("amrex@22.08:", type=("build", "link"))
# required variants
- depends_on("amrex +pic +particles")
+ depends_on("amrex +shared +pic +particles")
# controllable variants
with when("dimensions=1"):
depends_on("amrex dimensions=1")
@@ -53,35 +89,75 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage):
depends_on("amrex dimensions=3")
with when("+mpi"):
depends_on("amrex +mpi")
+ with when("~mpi"):
+ depends_on("amrex ~mpi")
with when("+openmp"):
depends_on("amrex +openmp")
+ with when("~openmp"):
+ depends_on("amrex ~openmp")
with when("+tiny_profile"):
depends_on("amrex +tiny_profile")
with when("+cuda"):
depends_on("amrex +cuda")
# todo: how to forward cuda_arch?
+ with when("~cuda"):
+ depends_on("amrex ~cuda")
with when("+rocm"):
depends_on("amrex +rocm")
# todo: how to forward amdgpu_target?
+ with when("~rocm"):
+ depends_on("amrex ~rocm")
+ with when("+sycl"):
+ depends_on("amrex +sycl")
+ with when("~sycl"):
+ depends_on("amrex ~sycl")
+
+ depends_on("py-pytest", type="test")
+ depends_on("py-pandas", type="test")
+ depends_on("py-cupy", type="test", when="+cuda")
+
+ phases = ("cmake", "build", "install", "pip_install_nodeps")
+ build_targets = ["all", "pip_wheel"]
+
+ tests_src_dir = "tests/"
+
+ def cmake_args(self):
+ args = ["-DpyAMReX_amrex_internal=OFF", "-DpyAMReX_pybind11_internal=OFF"]
+ return args
+
+ def pip_install_nodeps(self, spec, prefix):
+ """Install everything from build directory."""
+ pip = spec["python"].command
+ pip.add_default_arg("-m", "pip")
+
+ args = PythonPipBuilder.std_args(self) + [
+ f"--prefix={prefix}",
+ "--find-links=amrex-whl",
+ "amrex",
+ ]
+
+ with working_dir(self.build_directory):
+ pip(*args)
+
+ # todo: from PythonPipBuilder
+ # ....execute_install_time_tests()
+
+ def check(self):
+ """Checks after the build phase"""
+ pytest = which("pytest")
+ pytest(join_path(self.stage.source_path, self.tests_src_dir))
+
+ @run_after("pip_install_nodeps")
+ def copy_test_sources(self):
+ """Copy the example test files after the package is installed to an
+ install test subdirectory for use during `spack test run`."""
+ cache_extra_test_sources(self, [self.tests_src_dir])
- def setup_build_environment(self, env):
- spec = self.spec
-
- # disable superbuilds: use external dependencies
- env.set("AMREX_INTERNAL", "OFF")
- env.set("PYBIND11_INTERNAL", "OFF")
-
- # configure to require the exact AMReX configs provided by Spack
- env.set("AMREX_SPACEDIM", spec.variants["dimensions"].value)
- env.set("AMREX_MPI", "ON" if spec.satisfies("+mpi") else "OFF")
- env.set("AMREX_OMP", "ON" if spec.satisfies("+omp") else "OFF")
- env.set("AMREX_PRECISION", spec.variants["precision"].value.upper())
- with when("+cuda"):
- env.set("AMREX_GPU_BACKEND", "CUDA")
- with when("+rocm"):
- env.set("AMREX_GPU_BACKEND", "HIP")
- # with when("+sycl"):
- # env.set("AMREX_GPU_BACKEND", "SYCL")
-
- # control build parallelism
- env.set("CMAKE_BUILD_PARALLEL_LEVEL", make_jobs)
+ def test_pytest(self):
+ """Perform smoke tests on the installed package."""
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.tests_src_dir)
+ with working_dir(test_dir):
+ pytest = which("pytest")
+ # TODO: Remove once test dependencies made available
+ assert pytest is not None, "Make sure a suitable 'pytest' is in your path"
+ pytest()
diff --git a/var/spack/repos/builtin/packages/py-angel/package.py b/var/spack/repos/builtin/packages/py-angel/package.py
index c1e5da3b2a..4f0babecf5 100644
--- a/var/spack/repos/builtin/packages/py-angel/package.py
+++ b/var/spack/repos/builtin/packages/py-angel/package.py
@@ -16,6 +16,8 @@ class PyAngel(PythonPackage):
version("3.0", sha256="a0319553055d3dfc84a4f732ed246c180c23ee9c397810c96acd7940721ae57d")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-annotated-types/package.py b/var/spack/repos/builtin/packages/py-annotated-types/package.py
new file mode 100644
index 0000000000..f368a9c90c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-annotated-types/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyAnnotatedTypes(PythonPackage):
+ """Reusable constraint types to use with typing.Annotated."""
+
+ homepage = "https://github.com/annotated-types/annotated-types"
+ pypi = "annotated_types/annotated_types-0.7.0.tar.gz"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.7.0", sha256="aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89")
+
+ depends_on("py-hatchling", type="build")
+ depends_on("py-typing-extensions@4.0.0:", when="^python@:3.8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-annoy/package.py b/var/spack/repos/builtin/packages/py-annoy/package.py
index 6d65d9ae8c..00abc22c0e 100644
--- a/var/spack/repos/builtin/packages/py-annoy/package.py
+++ b/var/spack/repos/builtin/packages/py-annoy/package.py
@@ -19,5 +19,7 @@ class PyAnnoy(PythonPackage):
version("1.17.1", sha256="bf177dbeafb81f63b2ac1e1246b1f26a2acc82e73ba46638734d29d8258122da")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-nose@1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-ansible/package.py b/var/spack/repos/builtin/packages/py-ansible/package.py
index a72ce01006..33eb1f9259 100644
--- a/var/spack/repos/builtin/packages/py-ansible/package.py
+++ b/var/spack/repos/builtin/packages/py-ansible/package.py
@@ -17,6 +17,7 @@ class PyAnsible(PythonPackage):
license("GPL-3.0-or-later")
+ version("2.16.3", sha256="1ea5d3110f19d11bd1f330ab00bcc0dbfc51a5146349da849b8496be50b0bff7")
version("2.9.2", sha256="27673726435e8773ef031ef6ffb121b8ec75b85b07b7684454b430c3c9a848a9")
version("2.9.1", sha256="087a7644890e27c26171b0d24fc5d64024f12201ffb81d222aaa5704987e4c12")
version("2.9.0", sha256="a2a9b1a74f3d47b82f9ea9da10ebf3573fa10c1783b7ed9b7eb937c7052fcb13")
@@ -26,8 +27,19 @@ class PyAnsible(PythonPackage):
version("2.7.14", sha256="92f0be1de4f9d1c0a3a35963fb853a6d7831360fd1e734cb36d601495a71770c")
version("2.6.20", sha256="55962e79e24a67a5534bf08aa0482d5f7322ad3f112a3ebffc4a58ae02b82277")
- depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"), when="@2.12.0:")
+ depends_on("python@3.9:", type=("build", "run"), when="@2.14.0:")
+ depends_on("python@3.10:", type=("build", "run"), when="@2.16.0:")
+
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@39.2.0:", type="build", when="@2.13.0:")
+ depends_on("py-setuptools@45.2.0:", type="build", when="@2.14.9:")
+ depends_on("py-setuptools@66.1.0:", type="build", when="@2.16.0:")
+
depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-jinja2@3:", type=("build", "run"), when="@2.13.0:")
depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-pyyaml@5.1:", type=("build", "run"))
depends_on("py-cryptography", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"), when="@2.10.0:")
+ depends_on("py-resolvelib@0.5.3:1.0", type=("build", "run"), when="@2.11.0:")
diff --git a/var/spack/repos/builtin/packages/py-antimeridian/package.py b/var/spack/repos/builtin/packages/py-antimeridian/package.py
new file mode 100644
index 0000000000..31b2d20308
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-antimeridian/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyAntimeridian(PythonPackage):
+ """Fix shapes that cross the antimeridian."""
+
+ homepage = "https://antimeridian.readthedocs.io/"
+ pypi = "antimeridian/antimeridian-0.3.11.tar.gz"
+ git = "https://github.com/gadomski/antimeridian.git"
+
+ license("Apache-2.0")
+
+ version("0.3.11", sha256="fde0134e6799676ec68765d3e588f5f32cabd4041b1f969b923758d0a6cd0c7f")
+
+ depends_on("python@3.10:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+
+ depends_on("py-numpy@1.22.4:", type="run")
+ depends_on("py-shapely@2:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-anuga/package.py b/var/spack/repos/builtin/packages/py-anuga/package.py
index bae0e394e8..97e83db416 100644
--- a/var/spack/repos/builtin/packages/py-anuga/package.py
+++ b/var/spack/repos/builtin/packages/py-anuga/package.py
@@ -20,6 +20,10 @@ class PyAnuga(PythonPackage):
# The git main branch of the repo is now python3-only
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Non-versioned dependencies for Anuga main and future versions based on python@3.5:
depends_on("python@3.5:", type=("build", "run"), when="@2.2:")
depends_on("gdal+geos+python", type=("build", "run"), when="@2.2:")
diff --git a/var/spack/repos/builtin/packages/py-anvio/package.py b/var/spack/repos/builtin/packages/py-anvio/package.py
new file mode 100644
index 0000000000..2a6de3f404
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-anvio/package.py
@@ -0,0 +1,55 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyAnvio(PythonPackage):
+ """Anvi’o is a comprehensive platform that brings together many aspects of
+ today’s cutting-edge computational strategies of data-enabled microbiology,
+ including genomics, metagenomics, metatranscriptomics, pangenomics,
+ metapangenomics, phylogenomics, and microbial population genetics in an
+ integrated and easy-to-use fashion through extensive interactive
+ visualization capabilities."""
+
+ homepage = "https://anvio.org/"
+
+ # Not available on pypi
+ url = "https://github.com/merenlab/anvio/releases/download/v8/anvio-8.tar.gz"
+
+ maintainers("alex391", "meren")
+
+ version("8", sha256="4ced91773648d9ca27a20b725ab64bc213d80b33726940f5f818240033912c04")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@:1.24", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-bottle", type=("build", "run"))
+ depends_on("py-pysam", type=("build", "run"))
+ depends_on("py-ete3", type=("build", "run"))
+ depends_on("py-scikit-learn@1.2.2", type=("build", "run"))
+ depends_on("py-django", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-mistune", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-statsmodels", type=("build", "run"))
+ # Needs a version of py-colored newer than 1.4.2 (not listed in
+ # requirements.txt)
+ depends_on("py-colored@2:", type=("build", "run"))
+ depends_on("py-illumina-utils", type=("build", "run"))
+ depends_on("py-tabulate", type=("build", "run"))
+ depends_on("py-rich-argparse", type=("build", "run"))
+ depends_on("py-numba", type=("build", "run"))
+ depends_on("py-paste", type=("build", "run"))
+ depends_on("py-pyani", type=("build", "run"))
+ depends_on("py-psutil", type=("build", "run"))
+ depends_on("py-pandas@1.4.4", type=("build", "run"))
+ depends_on("snakemake", type=("build", "run"))
+ depends_on("py-multiprocess", type=("build", "run"))
+ depends_on("py-plotext", type=("build", "run"))
+ depends_on("py-networkx", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-anybadge/package.py b/var/spack/repos/builtin/packages/py-anybadge/package.py
new file mode 100644
index 0000000000..d69572cb42
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-anybadge/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyAnybadge(PythonPackage):
+ """Python project for generating badges for your projects"""
+
+ homepage = "https://github.com/jongracecox/anybadge"
+ pypi = "anybadge/anybadge-1.14.0.tar.gz"
+
+ version("1.14.0", sha256="47f06e0a6320d3e5eac55c712dc0bab71b9ed85353c591d448653c5a0740783f")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-packaging", type="run")
diff --git a/var/spack/repos/builtin/packages/py-arch/package.py b/var/spack/repos/builtin/packages/py-arch/package.py
new file mode 100644
index 0000000000..c752127384
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-arch/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyArch(PythonPackage):
+ """Autoregressive Conditional Heteroskedasticity (ARCH) and other tools
+ for financial econometrics, written in Python (with Cython and/or Numba
+ used to improve performance)"""
+
+ homepage = "https://pypi.org/project/arch"
+ pypi = "arch/arch-7.0.0.tar.gz"
+ git = "https://github.com/bashtage/arch.git"
+
+ maintainers("climbfuji")
+
+ license("NCSA", checked_by="climbfuji")
+
+ version("7.0.0", sha256="353c0dba5242287b8b6b587a70250d788436630bf3b7ef6106f577e45d1ec247")
+
+ variant("numba", default=False, description="Enable numba backend")
+ variant("tutorial", default=True, description="Include dependencies for online tutorials")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@0.61:", type="build")
+ depends_on("py-setuptools-scm@8.0.3:8 +toml", type="build")
+ depends_on("py-cython@3.0.10:", type="build")
+ # https://github.com/bashtage/arch/blob/9ced09e2566c0ebcad962d2441b1e79e2aaa7c9f/pyproject.toml#L59
+ # "numpy>=2.0.0rc1,<3" ???
+ # https://github.com/bashtage/arch/blob/9ced09e2566c0ebcad962d2441b1e79e2aaa7c9f/requirements.txt#L1
+ # numpy>=1.22.3 ???
+ depends_on("py-numpy@1.22.3", type=("build", "run"))
+
+ depends_on("py-scipy@1.8:", type="run")
+ depends_on("py-pandas@1.4:", type="run")
+ depends_on("py-statsmodels@0.12:", type="run")
+ depends_on("py-matplotlib@3:", type="run")
+ depends_on("py-numba@0.49:", type="run", when="+numba")
+
+ # Note. py-arch does not depend on py-pandas-datareader,
+ # but all examples in the py-arch documentation use it.
+ depends_on("py-pandas-datareader@0.10:", type="run", when="+tutorial")
diff --git a/var/spack/repos/builtin/packages/py-archspec/package.py b/var/spack/repos/builtin/packages/py-archspec/package.py
index 7eadf9534a..cd1ffca626 100644
--- a/var/spack/repos/builtin/packages/py-archspec/package.py
+++ b/var/spack/repos/builtin/packages/py-archspec/package.py
@@ -17,6 +17,8 @@ class PyArchspec(PythonPackage):
license("Apache-2.0")
+ version("0.2.4", sha256="eabbae22f315d24cc2ce786a092478ec8e245208c9877fb213c2172a6ecb9302")
+ version("0.2.3", sha256="d07deb5b6e2ab3b74861e217523d02e69be8522f6e6565f4cc5d2062eb1a5d2c")
version("0.2.2", sha256="d922c9fd80a5234d8cef883fbe0e146b381c449062c0405f91714ebad1edc035")
version("0.2.1", sha256="0974a8a95831d2d43cce906c5b79a35d5fd2bf9be478b0e3b7d83ccc51ac815e")
version("0.2.0", sha256="6aaba5ebdb5c3633c400d8c221a6a18716da0c64b367a8509f4217b22e91a5f5")
diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py
index e1b2a57c5f..1340b9b48d 100644
--- a/var/spack/repos/builtin/packages/py-argcomplete/package.py
+++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py
@@ -12,6 +12,8 @@ class PyArgcomplete(PythonPackage):
homepage = "https://github.com/kislyuk/argcomplete"
pypi = "argcomplete/argcomplete-1.12.0.tar.gz"
+ version("3.5.0", sha256="4349400469dccfb7950bb60334a680c58d88699bff6159df61251878dc6bf74b")
+ version("3.1.6", sha256="3b1f07d133332547a53c79437527c00be48cca3807b1d4ca5cab1b26313386a6")
version("3.1.2", sha256="d5d1e5efd41435260b8f85673b74ea2e883affcbec9f4230c582689e8e78251b")
version("3.0.8", sha256="b9ca96448e14fa459d7450a4ab5a22bbf9cee4ba7adddf03e65c398b5daeea28")
version("2.0.0", sha256="6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20")
diff --git a/var/spack/repos/builtin/packages/py-argon2-cffi-bindings/package.py b/var/spack/repos/builtin/packages/py-argon2-cffi-bindings/package.py
index fe684841fa..e65da55147 100644
--- a/var/spack/repos/builtin/packages/py-argon2-cffi-bindings/package.py
+++ b/var/spack/repos/builtin/packages/py-argon2-cffi-bindings/package.py
@@ -16,6 +16,8 @@ class PyArgon2CffiBindings(PythonPackage):
version("21.2.0", sha256="bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@45:", type="build")
depends_on("py-setuptools-scm@6.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-argparse-dataclass/package.py b/var/spack/repos/builtin/packages/py-argparse-dataclass/package.py
new file mode 100644
index 0000000000..5e89dc1e92
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-argparse-dataclass/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyArgparseDataclass(PythonPackage):
+ """An immutable mapping type for Python."""
+
+ homepage = "https://github.com/mivade/argparse_dataclass"
+ pypi = "argparse_dataclass/argparse_dataclass-2.0.0.tar.gz"
+
+ license("MIT")
+
+ version("2.0.0", sha256="09ab641c914a2f12882337b9c3e5086196dbf2ee6bf0ef67895c74002cc9297f")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-arm-pyart/package.py b/var/spack/repos/builtin/packages/py-arm-pyart/package.py
index 433e7298fe..3ed8511fb4 100644
--- a/var/spack/repos/builtin/packages/py-arm-pyart/package.py
+++ b/var/spack/repos/builtin/packages/py-arm-pyart/package.py
@@ -22,6 +22,8 @@ class PyArmPyart(PythonPackage):
version("1.12.7", sha256="b7b23ecef270c60b017d94603941f0c117de072a10125c5f58c0685d801f9161")
+ depends_on("c", type="build") # generated
+
variant("cartopy", description="Plot grids on maps", default=False)
variant("cylp", description="Linear programming solver", default=False)
variant("gdal", description="Output GeoTIFFs from grid objects", default=False)
@@ -39,6 +41,8 @@ class PyArmPyart(PythonPackage):
depends_on("py-cython", type="build")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/ARM-DOE/pyart/issues/1550
+ depends_on("py-numpy@:1", when="@:1.18.1", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-netcdf4", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-arpeggio/package.py b/var/spack/repos/builtin/packages/py-arpeggio/package.py
new file mode 100644
index 0000000000..ade277aac2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-arpeggio/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyArpeggio(PythonPackage):
+ """Packrat parser interpreter."""
+
+ homepage = "https://github.com/textX/Arpeggio"
+ pypi = "Arpeggio/Arpeggio-2.0.2.tar.gz"
+
+ license("MIT")
+
+ version("2.0.2", sha256="c790b2b06e226d2dd468e4fbfb5b7f506cec66416031fde1441cf1de2a0ba700")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-arrow/package.py b/var/spack/repos/builtin/packages/py-arrow/package.py
index d37264f825..c6ba2131f1 100644
--- a/var/spack/repos/builtin/packages/py-arrow/package.py
+++ b/var/spack/repos/builtin/packages/py-arrow/package.py
@@ -19,6 +19,7 @@ class PyArrow(PythonPackage):
license("Apache-2.0")
+ version("1.3.0", sha256="d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85")
version("1.2.3", sha256="3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1")
version("1.2.2", sha256="05caf1fd3d9a11a1135b2b6f09887421153b94558e5ef4d090b567b47173ac2b")
version("1.2.1", sha256="c2dde3c382d9f7e6922ce636bf0b318a7a853df40ecb383b29192e6c5cc82840")
@@ -26,9 +27,12 @@ class PyArrow(PythonPackage):
version("0.14.7", sha256="67f8be7c0cf420424bc62d8d7dc40b44e4bb2f7b515f9cc2954fb36e35797656")
version("0.14.1", sha256="2d30837085011ef0b90ff75aa0a28f5c7d063e96b7e76b6cbc7e690310256685")
+ depends_on("python@3.8:", type=("build", "run"), when="@1.3:")
depends_on("python@3.6:", type=("build", "run"), when="@1.2.1:")
depends_on("python@2.7:2.8,3.5:", type=("build", "run"), when="@:0.16.0")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="build", when="@:1.2")
+ depends_on("py-flit-core@3.2:3", type="build", when="@1.3:")
depends_on("py-python-dateutil", type=("build", "run"))
- depends_on("py-typing-extensions", type=("build", "run"), when="@1.2.1: ^python@:3.7")
+ depends_on("py-typing-extensions", type=("build", "run"), when="@1.2.1:1.2 ^python@:3.7")
depends_on("py-python-dateutil@2.7.0:", type=("build", "run"), when="@1.2.1:")
+ depends_on("py-types-python-dateutil@2.8.10:", type=("build", "run"), when="@1.3:")
diff --git a/var/spack/repos/builtin/packages/py-art/package.py b/var/spack/repos/builtin/packages/py-art/package.py
new file mode 100644
index 0000000000..c5b6a48eeb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-art/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyArt(PythonPackage):
+ """ASCII art library for Python."""
+
+ homepage = "https://www.ascii-art.site"
+ pypi = "art/art-6.1.tar.gz"
+
+ license("MIT")
+
+ version("6.1", sha256="6ab3031e3b7710039e73497b0e750cadfe04d4c1279ce3a123500dbafb9e1b64")
+
+ depends_on("python@3.5:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-asdf-standard/package.py b/var/spack/repos/builtin/packages/py-asdf-standard/package.py
index e31384bddc..d6dfe2a80c 100644
--- a/var/spack/repos/builtin/packages/py-asdf-standard/package.py
+++ b/var/spack/repos/builtin/packages/py-asdf-standard/package.py
@@ -16,11 +16,17 @@ class PyAsdfStandard(PythonPackage):
license("BSD-3-Clause")
+ version("1.1.1", sha256="01535bc2b15bfc09ec8a62d4999f9cf32dc49dc71660c8425640228fd8776102")
version("1.0.3", sha256="afd8ff9a70e7b17f6bcc64eb92a544867d5d4fe1f0076719142fdf62b96cfd44")
+ with when("@1.1.1:"):
+ depends_on("python@3.9:", type=("build", "run"))
+
+ depends_on("py-setuptools@61:", type="build")
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@3.4: +toml", type="build")
- depends_on("py-importlib-resources@3:", type=("build", "run"), when="^python@:3.8")
+ depends_on("py-importlib-resources@3:", type=("build", "run"), when="@1.0.3 ^python@:3.8")
diff --git a/var/spack/repos/builtin/packages/py-asdf-transform-schemas/package.py b/var/spack/repos/builtin/packages/py-asdf-transform-schemas/package.py
index 7593dae246..d714dbb409 100644
--- a/var/spack/repos/builtin/packages/py-asdf-transform-schemas/package.py
+++ b/var/spack/repos/builtin/packages/py-asdf-transform-schemas/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyAsdfTransformSchemas(PythonPackage):
"""ASDF schemas for transforms"""
- homepage = "asdf-transform-schemas.readthedocs.io"
+ homepage = "https://asdf-transform-schemas.readthedocs.io"
pypi = "asdf_transform_schemas/asdf_transform_schemas-0.3.0.tar.gz"
maintainers("lgarrison")
diff --git a/var/spack/repos/builtin/packages/py-asdf/package.py b/var/spack/repos/builtin/packages/py-asdf/package.py
index cd5ddf2563..236d0894a2 100644
--- a/var/spack/repos/builtin/packages/py-asdf/package.py
+++ b/var/spack/repos/builtin/packages/py-asdf/package.py
@@ -18,6 +18,7 @@ class PyAsdf(PythonPackage):
license("BSD-3-Clause")
+ version("3.5.0", sha256="047ad7bdd8f40b04b8625abfd119a35d18b344301c60ea9ddf63964e7ce19669")
version("2.15.0", sha256="686f1c91ebf987d41f915cfb6aa70940d7ad17f87ede0be70463147ad2314587")
version("2.4.2", sha256="6ff3557190c6a33781dae3fd635a8edf0fa0c24c6aca27d8679af36408ea8ff2")
@@ -25,7 +26,15 @@ class PyAsdf(PythonPackage):
depends_on("py-lz4@0.10:", when="+lz4", type=("build", "run"))
- with when("@2.15:"):
+ with when("@3.5.0:"):
+ depends_on("python@3.9:", type=("build", "run"))
+
+ depends_on("py-asdf-standard@1.1.0:", type=("build", "run"))
+ depends_on("py-importlib-metadata@4.11.4:", type=("build", "run"), when="^python@:3.11")
+ depends_on("py-numpy@1.22:", type=("build", "run"))
+ depends_on("py-attrs@22.2.0:", type=("build", "run"))
+
+ with when("@2.15.0:"):
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools@60:", type="build")
@@ -33,17 +42,19 @@ class PyAsdf(PythonPackage):
depends_on("py-asdf-standard@1.0.1:", type=("build", "run"))
depends_on("py-asdf-transform-schemas@0.3:", type=("build", "run"))
- depends_on("py-asdf-unit-schemas@0.1:", type=("build", "run"))
- depends_on("py-importlib-metadata@4.11.4:", type=("build", "run"))
- depends_on("py-importlib-resources@3:", type=("build", "run"), when="^python@:3.8")
depends_on("py-jmespath@0.6.2:", type=("build", "run"))
- depends_on("py-jsonschema@4.0.1:4.17", type=("build", "run"))
depends_on("py-numpy@1.20:", type=("build", "run"))
- depends_on("py-numpy@1.20:1.24", type=("build", "run"), when="^python@:3.8")
depends_on("py-packaging@19:", type=("build", "run"))
depends_on("py-pyyaml@5.4.1:", type=("build", "run"))
depends_on("py-semantic-version@2.8:", type=("build", "run"))
+ with when("@2.15.0"):
+ depends_on("py-asdf-unit-schemas@0.1:", type=("build", "run"))
+ depends_on("py-importlib-metadata@4.11.4:", type=("build", "run"))
+ depends_on("py-importlib-resources@3:", type=("build", "run"), when="^python@:3.8")
+ depends_on("py-jsonschema@4.0.1:4.17", type=("build", "run"))
+ depends_on("py-numpy@1.20:1.24", type=("build", "run"), when="^python@:3.8")
+
with when("@2.4.2"):
depends_on("python@3.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-asdfghjkl/package.py b/var/spack/repos/builtin/packages/py-asdfghjkl/package.py
new file mode 100644
index 0000000000..c9aab6fa6c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-asdfghjkl/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyAsdfghjkl(PythonPackage):
+ """ASDL: Automatic Second-order Differentiation (for Fisher, Gradient covariance, Hessian,
+ Jacobian, and Kernel) Library."""
+
+ homepage = "https://github.com/kazukiosawa/asdl"
+ pypi = "asdfghjkl/asdfghjkl-0.1a4.tar.gz"
+
+ license("MIT")
+
+ version("0.1a4", sha256="a934411a0ffdee6fcdccb19672196498ea6a8e55e3e67abbe67200c84b46ddee")
+
+ depends_on("py-setuptools@42:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch@1.13:")
+ depends_on("py-numpy")
diff --git a/var/spack/repos/builtin/packages/py-ase/package.py b/var/spack/repos/builtin/packages/py-ase/package.py
index e949990ea4..fb091295e0 100644
--- a/var/spack/repos/builtin/packages/py-ase/package.py
+++ b/var/spack/repos/builtin/packages/py-ase/package.py
@@ -16,6 +16,7 @@ class PyAse(PythonPackage):
license("LGPL-2.1-or-later")
+ version("3.23.0", sha256="91a2aa31d89bd90b0efdfe4a7e84264f32828b2abfc9f38e65e041ad76fec8ae")
version("3.21.1", sha256="78b01d88529d5f604e76bc64be102d48f058ca50faad72ac740d717545711c7b")
version("3.21.0", sha256="2c561e9b767cf16fc8ce198ea9326d77c6b67d33a85f44b68455e23466a64608")
version("3.20.1", sha256="72c81f21b6adb907595fce8d883c0231301cbd8e9f6e5ce8e98bab927054daca")
@@ -32,8 +33,12 @@ class PyAse(PythonPackage):
depends_on("python@2.6:", type=("build", "run"), when="@:3.15.0")
depends_on("python@3.5:", type=("build", "run"), when="@3.18.0:")
depends_on("python@3.6:", type=("build", "run"), when="@3.20.0:")
+ depends_on("python@3.8:", type=("build", "run"), when="@3.23.0:")
depends_on("py-numpy@1.11.3:", type=("build", "run"))
+ depends_on("py-numpy@1.18.5:", type=("build", "run"), when="@3.23.0:")
depends_on("py-matplotlib@2.0.0:", type=("build", "run"))
+ depends_on("py-matplotlib@3.3.4:", type=("build", "run"), when="@3.23.0:")
depends_on("py-scipy@0.18.1:", type=("build", "run"))
+ depends_on("py-scipy@1.6.0:", type=("build", "run"), when="@3.23.0:")
depends_on("py-flask", type=("build", "run"), when="@:3.18.0")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-asgiref/package.py b/var/spack/repos/builtin/packages/py-asgiref/package.py
index 076dadd88a..cc595f3418 100644
--- a/var/spack/repos/builtin/packages/py-asgiref/package.py
+++ b/var/spack/repos/builtin/packages/py-asgiref/package.py
@@ -10,24 +10,25 @@ class PyAsgiref(PythonPackage):
"""ASGI specification and utilities."""
homepage = "https://asgi.readthedocs.io/en/latest/"
- url = "https://github.com/django/asgiref/archive/3.2.7.tar.gz"
+ pypi = "asgiref/asgiref-3.7.2.tar.gz"
license("BSD-3-Clause")
- version("3.5.2", sha256="62f04f81110898e471a7d5b37f88c923c2864d43fa6abb66a95980becb1a2ba4")
+ version("3.8.1", sha256="c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590")
+ version("3.7.2", sha256="9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed")
+ version("3.5.2", sha256="4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424")
version("3.5.0", sha256="2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0")
- version("3.2.7", sha256="8a0b556b9e936418475f6670d59e14592c41d15d00b5ea4ad26f2b46f9f4fb9a")
- version("3.2.6", sha256="29788163bdad8d494475a0137eba39b111fd86fbe825534a9376f9f2ab44251a")
- version("3.2.5", sha256="eeb01ba02e86859746ee2a7bc8a75c484a006dc9575723563f24642a12b2bba8")
- version("3.2.4", sha256="89e47532340338b7eafd717ab28658e8b48f4565d8384628c88d2d41565c8da0")
- version("3.2.3", sha256="d38e16141c7189e23bfe03342d9cd3dbfd6baab99217892bfa7bc5646315b6bd")
- version("3.2.2", sha256="47edf327aa70f317c9bc810d469ce681f1b35a7f499f68cf2b5da3ba6a651e69")
- version("3.2.1", sha256="06a21df1f4456d29079f3c475c09ac31167bcc5f024c637dedf4e00d2dd9020b")
- version("3.2.0", sha256="5db8c7a6c1ff54ea04a52f994d8af959427f1cab8e427aa802492a89fb0b635a")
- version("3.1.4", sha256="bf01c52111ef7af2adc1e6d90282d2a32c5ebe09e84ae448389ceff7cef53fa9")
- version("3.1.3", sha256="5b8bb7b3719b8c12a6c2363784a4d8c0eb5e980d8b4fdb6f38eccb52071dfab5")
+ version("3.2.7", sha256="8036f90603c54e93521e5777b2b9a39ba1bad05773fcf2d208f0299d1df58ce5")
+ version("3.2.6", sha256="63007b556233381c5f22ae4c7e4292c9f1b953dc8909ae8fd268f611dc23cbd0")
+ version("3.2.5", sha256="c8f49dd3b42edcc51d09dd2eea8a92b3cfc987ff7e6486be734b4d0cbfd5d315")
+ version("3.2.4", sha256="f07043512078c76bb28a62fd1e327876599062b5f0aea60ed1d9cabc42e95fe2")
+ version("3.2.3", sha256="7e06d934a7718bf3975acbf87780ba678957b87c7adc056f13b6215d610695a0")
+ version("3.2.2", sha256="f62b1c88ebf5fe95db202a372982970edcf375c1513d7e70717df0750f5c2b98")
+ version("3.2.1", sha256="57ed0d07634a23bebfa1b02a1aa05eba09c37aab3fc93893e4039e7bc2d96d9e")
+ version("3.2.0", sha256="cefcbd64acbfc9f38913566824ef070dd9a50e63f1b4cc5a7f1c44be809d7ff3")
+ version("3.1.4", sha256="865b7ccce5a6e815607b08d9059fe9c058cd75c77f896f5e0b74ff6c1ba81818")
+ version("3.1.3", sha256="566126b4cbf190c315121965253ecb2159499197ff4afd686e0921f4dd987999")
depends_on("py-setuptools", type="build")
- depends_on("python@3.5:", type=("build", "run"))
- depends_on("python@3.7:", type=("build", "run"), when="@3.5.0:")
- depends_on("py-typing-extensions", type=("build", "run"), when="@3.5: ^python@:3.7")
+ depends_on("py-typing-extensions@4:", type=("build", "run"), when="@3.7: ^python@:3.10")
+ depends_on("py-typing-extensions", type=("build", "run"), when="@3.5 ^python@:3.7")
diff --git a/var/spack/repos/builtin/packages/py-astor/package.py b/var/spack/repos/builtin/packages/py-astor/package.py
index 8b7703fc7e..6664b48b42 100644
--- a/var/spack/repos/builtin/packages/py-astor/package.py
+++ b/var/spack/repos/builtin/packages/py-astor/package.py
@@ -25,7 +25,7 @@ class PyAstor(PythonPackage):
# https://github.com/berkerpeksag/astor/issues/162
# https://github.com/berkerpeksag/astor/pull/163
patch(
- "https://github.com/berkerpeksag/astor/pull/163/commits/30059dac4eb832e58ab2109db84508b294ba366d.patch?full_index=1",
- sha256="edc5eeddabe153b08e938f52edaeb2d880ee3128082967f310db0f98510fe6e0",
+ "https://github.com/berkerpeksag/astor/commit/30059dac4eb832e58ab2109db84508b294ba366d.patch?full_index=1",
+ sha256="4993c8d7e36b7fbad7586ff49e57fd8e7abe79724936445db2eed2d91398e82d",
when="@0.8.0",
)
diff --git a/var/spack/repos/builtin/packages/py-astropy-healpix/package.py b/var/spack/repos/builtin/packages/py-astropy-healpix/package.py
index 35a01f483c..68791eed29 100644
--- a/var/spack/repos/builtin/packages/py-astropy-healpix/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy-healpix/package.py
@@ -21,7 +21,11 @@ class PyAstropyHealpix(PythonPackage):
version("0.5", sha256="5ae15da796a840f221fb83e25de791e827b6921bc21a365d99bc1a59c7c0cdad")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-astropy@2.0:", type=("build", "run"))
depends_on("py-numpy@1.11:", type=("build", "run"))
+ # https://github.com/astropy/astropy-healpix/pull/214
+ depends_on("py-numpy@:1", when="@:1.0.2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-astropy-helpers/package.py b/var/spack/repos/builtin/packages/py-astropy-helpers/package.py
index bb88d9e98d..00b2d6a7a2 100644
--- a/var/spack/repos/builtin/packages/py-astropy-helpers/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy-helpers/package.py
@@ -19,5 +19,7 @@ class PyAstropyHelpers(PythonPackage):
version("4.0.1", sha256="88602971c3b63d6aaa6074d013f995d1e234acb3d517d70d7fcebd30cdaf5c89")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@30.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-astropy-iers-data/package.py b/var/spack/repos/builtin/packages/py-astropy-iers-data/package.py
new file mode 100644
index 0000000000..06345c0a21
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-astropy-iers-data/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyAstropyIersData(PythonPackage):
+ """IERS Earth rotation and leap second table
+
+ Note: This package is not meant for standalone purposes
+ but is needed by AstroPy."""
+
+ homepage = "https://github.com/astropy/astropy-iers-data"
+ pypi = "astropy-iers-data/astropy_iers_data-0.2024.4.29.0.28.48.tar.gz"
+
+ version(
+ "0.2024.5.20.0.29.40",
+ sha256="7fff3d3404ae8560533ac0e685db7acc02c4d8984faa4ac3d607096879fba2d1",
+ )
+ version(
+ "0.2024.4.29.0.28.48",
+ sha256="a2d5acf97e731f1d4a0eab1c8e4c7f454ddc166af06797b141202dd901bd1dfc",
+ )
+
+ depends_on("python@3.8:")
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-wheel", type="build")
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index 7bb70a8fd9..b60afb07f2 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -19,6 +19,7 @@ class PyAstropy(PythonPackage):
license("BSD-3-Clause")
+ version("6.1.0", sha256="6c3b915f10b1576190730ddce45f6245f9927dda3de6e3f692db45779708950f")
version("5.1", sha256="1db1b2c7eddfc773ca66fa33bd07b25d5b9c3b5eee2b934e0ca277fa5b1b7b7e")
version(
"4.0.1.post1", sha256="5c304a6c1845ca426e7bc319412b0363fccb4928cb4ba59298acd1918eec44b5"
@@ -28,15 +29,23 @@ class PyAstropy(PythonPackage):
version("1.1.2", sha256="6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1")
version("1.1.post1", sha256="64427ec132620aeb038e4d8df94d6c30df4cc8b1c42a6d8c5b09907a31566a21")
+ depends_on("c", type="build") # generated
+
variant("all", default=False, when="@3.2:", description="Enable all functionality")
# Required dependencies
+ depends_on("python@3.10:", when="@6.1.0:", type=("build", "run"))
depends_on("python@3.8:", when="@5.1:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.13:", type="build")
+ depends_on("py-cython@0.29.30", when="@5.1:6.0", type="build")
+ depends_on("py-cython@3.0.0", when="@6.1.0:", type="build")
+
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", type="build")
+ depends_on("py-astropy-iers-data", when="@6:", type=("build", "run"))
+ depends_on("py-numpy@1.23:", when="@6.1:", type=("build", "run"))
depends_on("py-numpy@1.18:", when="@5.1:", type=("build", "run"))
depends_on("py-numpy@1.16:", when="@4.0:", type=("build", "run"))
depends_on("py-numpy@1.13:", when="@3.1:", type=("build", "run"))
@@ -44,11 +53,13 @@ class PyAstropy(PythonPackage):
depends_on("py-numpy@1.9:", when="@2.0:", type=("build", "run"))
depends_on("py-numpy@1.7:", when="@1.2:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/astropy/astropy/issues/16200
+ depends_on("py-numpy@:1", when="@:6.0")
depends_on("py-packaging@19.0:", when="@5.1:", type=("build", "run"))
depends_on("py-pyyaml@3.13:", when="@5.1:", type=("build", "run"))
depends_on("py-pyerfa@2.0:", when="@5.1:", type=("build", "run"))
+ depends_on("py-pyerfa@2.0.1.1:", when="@6.1.0:", type=("build", "run"))
depends_on("py-setuptools-scm@6.2:", when="@5.1:", type="build")
- depends_on("py-cython@0.29.30", when="@5.1:", type="build")
depends_on("py-extension-helpers", when="@5.1:", type="build")
depends_on("pkgconfig", type="build")
@@ -60,8 +71,10 @@ class PyAstropy(PythonPackage):
# Optional dependencies
with when("+all"):
+ depends_on("py-scipy@1.8:", when="@6:", type=("build", "run"))
depends_on("py-scipy@1.3:", when="@5:", type=("build", "run"))
depends_on("py-scipy@0.18:", type=("build", "run"))
+ depends_on("py-matplotlib@3.3:", when="@6:", type=("build", "run"))
depends_on("py-matplotlib@3.1:", when="@5:", type=("build", "run"))
depends_on("py-matplotlib@2.1:", when="@4:", type=("build", "run"))
depends_on("py-matplotlib@2.0:", type=("build", "run"))
@@ -85,6 +98,8 @@ class PyAstropy(PythonPackage):
depends_on("py-ipython", type=("build", "run"))
depends_on("py-pytest@7:", when="@5.0.2:", type=("build", "run"))
depends_on("py-pytest", type=("build", "run"))
+ depends_on("py-fsspec+http@2023.4:", when="@6.1:", type=("build", "run"))
+ depends_on("py-s3fs@2023.4:", when="@6.1:", type=("build", "run"))
depends_on("py-typing-extensions@3.10.0.1:", when="@5.0.2:", type=("build", "run"))
# Historical optional dependencies
diff --git a/var/spack/repos/builtin/packages/py-asyncio/package.py b/var/spack/repos/builtin/packages/py-asyncio/package.py
index 6ccaabf25b..df4549681b 100644
--- a/var/spack/repos/builtin/packages/py-asyncio/package.py
+++ b/var/spack/repos/builtin/packages/py-asyncio/package.py
@@ -21,5 +21,7 @@ class PyAsyncio(PythonPackage):
version("3.4.2", sha256="ba28d351c579875e2a1cb1989e310285d3eb76c5bb749694b6ddd3901f8d39de")
version("3.4.1", sha256="51cdfbd4964ef8286cbef7d88f9b7abcc8b710ecec0a0794aa354f94ef703126")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-atropos/package.py b/var/spack/repos/builtin/packages/py-atropos/package.py
index ac4c4717b3..80f38b89ce 100644
--- a/var/spack/repos/builtin/packages/py-atropos/package.py
+++ b/var/spack/repos/builtin/packages/py-atropos/package.py
@@ -18,6 +18,8 @@ class PyAtropos(PythonPackage):
version("1.1.22", sha256="05e40cb9337421479c692e1154b962fbf811d7939b72c197a024929b7ae88b78")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.3:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-cython@0.25.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-ats/package.py b/var/spack/repos/builtin/packages/py-ats/package.py
index bceb259e24..a37ac30690 100644
--- a/var/spack/repos/builtin/packages/py-ats/package.py
+++ b/var/spack/repos/builtin/packages/py-ats/package.py
@@ -23,6 +23,9 @@ class PyAts(PythonPackage):
version("7.0.100", tag="7.0.100", commit="202c18d11b8f1c14f1a3361a6e45c9e4f83a3fa1")
version("7.0.5", tag="7.0.5", commit="86b0b18b96b179f97008393170f5e5bc95118867")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# TODO: Add flux variant when Flux functionality works in ATS
depends_on("python@3.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-attrs/package.py b/var/spack/repos/builtin/packages/py-attrs/package.py
index 60530d5c58..ade9b43b63 100644
--- a/var/spack/repos/builtin/packages/py-attrs/package.py
+++ b/var/spack/repos/builtin/packages/py-attrs/package.py
@@ -27,6 +27,7 @@ class PyAttrs(PythonPackage):
version("19.2.0", sha256="f913492e1663d3c36f502e5e9ba6cd13cf19d7fab50aa13239e420fef95e1396")
version("19.1.0", sha256="f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399")
version("18.1.0", sha256="e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b")
+ version("17.4.0", sha256="1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9")
version("16.3.0", sha256="80203177723e36f3bbe15aa8553da6e80d47bfe53647220ccaa9ad7a5e473ccc")
depends_on("py-hatchling", when="@23.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-auditwheel/package.py b/var/spack/repos/builtin/packages/py-auditwheel/package.py
index 66b216c3c0..85fc947c1e 100644
--- a/var/spack/repos/builtin/packages/py-auditwheel/package.py
+++ b/var/spack/repos/builtin/packages/py-auditwheel/package.py
@@ -18,6 +18,10 @@ class PyAuditwheel(PythonPackage):
version("5.1.2", sha256="3ee5830014931ea84af5cd065c637b6614efa03d9b88bd8fbfc924e7ed01d6ba")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@45:", type="build")
depends_on("py-setuptools-scm@6.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-autograd/package.py b/var/spack/repos/builtin/packages/py-autograd/package.py
index 5151216800..68773c366f 100644
--- a/var/spack/repos/builtin/packages/py-autograd/package.py
+++ b/var/spack/repos/builtin/packages/py-autograd/package.py
@@ -21,12 +21,20 @@ class PyAutograd(PythonPackage):
examples directory."""
homepage = "https://github.com/HIPS/autograd"
- pypi = "autograd/autograd-1.3.tar.gz"
+ pypi = "autograd/autograd-1.6.2.tar.gz"
license("MIT")
+ version("1.6.2", sha256="8731e08a0c4e389d8695a40072ada4512641c113b6cace8f4cfbe8eb7e9aedeb")
+ version("1.6.1", sha256="dd0068f3f78fd76cf28cee94358737c3b5e8a1d2acac0b850e14d14e1bca84ac")
+ version("1.6", sha256="b10ad7598bab69251a496210370f7802a21da0ae6a7710197eaae99c3a59b30a")
+ version("1.5", sha256="d80bd225154d1db13cb4eaccf7a18c358be72092641b68717f96fcf1d16acd0b")
+ version("1.4", sha256="383de0f537ef2e38b85ff9692593b0cfae8958c9b3bd451b52c255fd9171ffce")
version("1.3", sha256="a15d147577e10de037de3740ca93bfa3b5a7cdfbc34cfb9105429c3580a33ec4")
+ version("1.2", sha256="a08bfa6d539b7a56e7c9f4d0881044afbef5e75f324a394c2494de963ea4a47d")
depends_on("py-setuptools", type="build")
depends_on("py-future@0.15.2:", type=("build", "run"))
depends_on("py-numpy@1.12:", type=("build", "run"))
+ # https://github.com/HIPS/autograd/releases/tag/v1.7.0
+ depends_on("py-numpy@:1", when="@:1.6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-autoray/package.py b/var/spack/repos/builtin/packages/py-autoray/package.py
index e9043a7e90..b413f91e28 100644
--- a/var/spack/repos/builtin/packages/py-autoray/package.py
+++ b/var/spack/repos/builtin/packages/py-autoray/package.py
@@ -15,6 +15,18 @@ class PyAutoray(PythonPackage):
license("Apache-2.0")
+ version("0.6.12", sha256="721328aa06fc3577155d988052614a7b4bd6e4d01b340695344031ee4abd2a1e")
+ version("0.6.11", sha256="23e6dc013913de318952580cfbf054920ebd5eacd060fc48edebb678307b4b0d")
+ version("0.6.10", sha256="afff46ed3a001daad1bed917aecda75a8f0d36c0c8823eed877db4e8d55a8b20")
+ version("0.6.9", sha256="9f41759f6a286bc280c4f6aece436da1c87ce75eb00efe7dc7319860c43654fa")
+ version("0.6.8", sha256="8e31832597cb2075e5f9f65894fafff9d726d9287718415d3c8b008e592f0197")
+ version("0.6.7", sha256="8945cfdf3aa8a35f9fe1abc03d84925db61f58bbd386623206dd8e9ba1d9e377")
+ version("0.6.6", sha256="a31cd03f983a6e80b58f40618a652b7979fa09c762050f5dc4b7e6b6a0a3b62d")
+ version("0.6.5", sha256="093f151539769b03374f67bd2296cf76d359ac190ab6fd8ebe26984a2dc88a4c")
+ version("0.6.4", sha256="b8e38ff87e2ea1dd8bd17ddd1174f02c41dc4cfec933a3aac9f0516288548e81")
+ version("0.6.3", sha256="6729f49c8787778fd8bc2a3b57a625c8c21577c6e92628cad4b13aefd7531355")
+ version("0.6.1", sha256="857cbd4d60d47511ab9956f8765d5fd3c68a538d317cda7d829b00982c599140")
+ version("0.6.0", sha256="ba3f30812549209bbba9d4976528f3f84bf84c22374699fd2e6aa84bf496d295")
version("0.5.3", sha256="ecbecbc1ab65dd704234b3307fa7c7a511a36f6b9339a0ffcdaa4e5a7aab826b")
depends_on("python@3.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-avro/package.py b/var/spack/repos/builtin/packages/py-avro/package.py
index d082432f55..6598787a91 100644
--- a/var/spack/repos/builtin/packages/py-avro/package.py
+++ b/var/spack/repos/builtin/packages/py-avro/package.py
@@ -12,6 +12,8 @@ class PyAvro(PythonPackage):
homepage = "https://avro.apache.org/docs/current/"
pypi = "avro/avro-1.8.2.tar.gz"
+ version("1.12.0", sha256="cad9c53b23ceed699c7af6bddced42e2c572fd6b408c257a7d4fc4e8cf2e2d6b")
+ version("1.11.3", sha256="3393bb5139f9cf0791d205756ce1e39a5b58586af5b153d6a3b5a199610e9d17")
version("1.11.1", sha256="f123623ecc648d0e20ce14f8ed85162140c13cc4b108865d1b2529fbfa06c008")
version("1.11.0", sha256="1206365cc30ad561493f735329857dd078533459cee4e928aec2505f341ce445")
version("1.10.2", sha256="381b990cc4c4444743c3297348ffd46e0c3a5d7a17e15b2f4a9042f6e955c31a")
@@ -21,4 +23,5 @@ class PyAvro(PythonPackage):
depends_on("py-setuptools@40.8.0:", when="@1.11.1:", type="build")
depends_on("python@2.7:", type=("build", "run"))
depends_on("python@3.6:", when="@1.11.1:", type=("build", "run"))
+ depends_on("python@3.7:", when="@1.12:", type=("build", "run"))
depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-awkward-cpp/package.py b/var/spack/repos/builtin/packages/py-awkward-cpp/package.py
index 1f6402633b..cc149dd981 100644
--- a/var/spack/repos/builtin/packages/py-awkward-cpp/package.py
+++ b/var/spack/repos/builtin/packages/py-awkward-cpp/package.py
@@ -18,6 +18,7 @@ class PyAwkwardCpp(PythonPackage):
license("BSD-3-Clause")
+ version("35", sha256="1f8b112a597bd2438794e1a721a63aa61869fa9598a17ac6bd811ad6f6400d06")
version("12", sha256="429f7fcc37a671afa67fe9680f2edc3a123d1c74d399e5889c654f9529f9f8f2")
version("11", sha256="02d719a4da7487564b29b8e8b78925a32ac818b6f5572c2f55912b4e0e59c7a4")
version("10", sha256="d1c856cb6ef5cf3d4f67506a7efc59239f595635865cc9f4ab18440b8bfb11c6")
@@ -30,11 +31,18 @@ class PyAwkwardCpp(PythonPackage):
version("3", sha256="6070557762bd95d3642ad9c585609db51f899a1e79ce4f41568835efd7d6e066")
version("2", sha256="5e63f43e3135f76db81e0924a74ecf4870f585c11a9f432568b377c04028868c")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"), when="@19:")
depends_on("py-scikit-build-core@0.2.0:+pyproject", when="@11:", type="build")
depends_on("py-pybind11", type=("build", "link"))
depends_on("py-numpy@1.17.0:", when="@12:", type=("build", "run"))
+ depends_on("py-numpy@1.18.0:", when="@19:", type=("build", "run"))
# older versions
depends_on("py-numpy@1.14.5:", when="@:11", type=("build", "run"))
depends_on("py-scikit-build-core@0.1.3:+pyproject", when="@:9", type="build")
+
+ # https://github.com/scikit-hep/awkward/issues/3132#issuecomment-2136042870
+ conflicts("%gcc@14:", when="@:33")
diff --git a/var/spack/repos/builtin/packages/py-awkward/package.py b/var/spack/repos/builtin/packages/py-awkward/package.py
index eac61100ab..218c67b60a 100644
--- a/var/spack/repos/builtin/packages/py-awkward/package.py
+++ b/var/spack/repos/builtin/packages/py-awkward/package.py
@@ -18,6 +18,7 @@ class PyAwkward(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("2.6.6", sha256="6eeb426ca41b51fe3c36fbe767b90259979b08c14e3562497a71195a447c8b3c")
version("2.1.1", sha256="fda8e1634161b8b46b151c074ff0fc631fc0feaec2ec277c4b40a2095110b0dd")
version("2.1.0", sha256="73f7a76a1fb43e2557befee54b1381f3e6d90636983cdc54da1c2bcb9ad4c1a8")
version("2.0.10", sha256="8dae67afe50f5cf1677b4062f9b29dc7e6893420d0af5a0649364b117a3502af")
@@ -66,7 +67,8 @@ class PyAwkward(PythonPackage):
("@2.0.8", "@9"),
("@2.0.9", "@10"),
("@2.0.10", "@11"),
- ("@2.1.0:", "@12"),
+ ("@2.1.0:2.1.1", "@12"),
+ ("@2.6.6:", "@35"),
]
for _awkward, _awkward_cpp in _awkward_to_awkward_cpp_map:
depends_on("py-awkward-cpp{}".format(_awkward_cpp), when=_awkward, type=("build", "run"))
@@ -74,9 +76,11 @@ class PyAwkward(PythonPackage):
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("python@3.6:", when="@1.9:", type=("build", "run"))
depends_on("python@3.7:", when="@1.10:", type=("build", "run"))
+ depends_on("python@3.8:", when="@2.3:", type=("build", "run"))
depends_on("py-numpy@1.13.1:", when="@:1", type=("build", "run"))
depends_on("py-numpy@1.14.5:", when="@2.0", type=("build", "run"))
depends_on("py-numpy@1.17.0:", when="@2.1:", type=("build", "run"))
+ depends_on("py-numpy@1.18.0:", when="@2.3:", type=("build", "run"))
depends_on("py-pybind11", type=("build", "link"))
depends_on("py-importlib-resources", when="@2: ^python@:3.8", type=("build", "run"))
depends_on("py-typing-extensions@4.1:", when="@2: ^python@:3.10", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-awscrt/package.py b/var/spack/repos/builtin/packages/py-awscrt/package.py
index 490c99d4a3..972477c775 100644
--- a/var/spack/repos/builtin/packages/py-awscrt/package.py
+++ b/var/spack/repos/builtin/packages/py-awscrt/package.py
@@ -12,12 +12,18 @@ class PyAwscrt(PythonPackage):
homepage = "https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html"
pypi = "awscrt/awscrt-0.16.16.tar.gz"
- maintainers("climbfuji")
+ maintainers("climbfuji", "teaguesterling")
license("Apache-2.0")
+ version("0.20.9", sha256="243785ac9ee64945e0479c2384325545f29597575743ce84c371556d1014e63e")
+ version("0.19.19", sha256="1c1511535dee146a6c26a382ed3ead56259a105b3b7d7d823553ae567d038dfe")
+ version("0.19.18", sha256="350b6efd8ebee082ea3f3e52c59a3c3ec594cdaf01db8b4853dceb9fec90c89d")
version("0.16.16", sha256="13075df2c1d7942fe22327b6483274517ee0f6ae765c4e6b6ae9ef5b4c43a827")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type=("build"))
depends_on("openssl", type=("build"), when="platform=linux")
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-azure-batch/package.py b/var/spack/repos/builtin/packages/py-azure-batch/package.py
index 816ca62f6a..467bfcb806 100644
--- a/var/spack/repos/builtin/packages/py-azure-batch/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-batch/package.py
@@ -11,11 +11,31 @@ class PyAzureBatch(PythonPackage):
"""Microsoft Azure Batch Client Library for Python."""
homepage = "https://github.com/Azure/azure-sdk-for-python"
- pypi = "azure-batch/azure-batch-9.0.0.zip"
+ pypi = "azure-batch/azure-batch-14.2.0.tar.gz"
+ version("14.2.0", sha256="c79267d6c3d3fe14a16a422ab5bbfabcbd68ed0b58b6bbcdfa0c8345c4c78532")
+ version("14.0.0", sha256="165b1e99b86f821024c4fae85fb34869d407aa0ebb0ca4b96fb26d859c26c934")
+ version("13.0.0", sha256="e9295de70404d276eda0dd2253d76397439abe5d8f18c1fca199c49b8d6ae30a")
+ version("12.0.0", sha256="1a9b1e178984a7bf495af67bcce51f0db1e4a8a957afb29e33554a14a9674deb")
+ version("11.0.0", sha256="ce5fdb0ec962eddfe85cd82205e9177cb0bbdb445265746e38b3bbbf1f16dc73")
+ version("10.0.0", sha256="83d7a2b0be42ca456ac2b56fa3dc6ce704c130e888d37d924072c1d3718f32d0")
version("9.0.0", sha256="47ca6f50a640915e1cdc5ce3c1307abe5fa3a636236e561119cf62d9df384d84")
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-batch_14.2.0/sdk/batch/azure-batch/setup.py
+
depends_on("py-setuptools", type="build")
- depends_on("py-msrest@0.5.0:", type=("build", "run"))
+
depends_on("py-msrestazure@0.4.32:1", type=("build", "run"))
depends_on("py-azure-common@1.1:1", type=("build", "run"))
+
+ with when("@:12"):
+ depends_on("py-msrest@0.6.21:", when="@11:", type=("build", "run"))
+ depends_on("py-msrest@0.5.0:", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if version < Version("14.1.0"):
+ return "https://pypi.io/packages/source/a/azure-batch/azure-batch-{0}.zip".format(
+ version
+ )
+
+ return super().url_for_version(version)
diff --git a/var/spack/repos/builtin/packages/py-azure-cli/package.py b/var/spack/repos/builtin/packages/py-azure-cli/package.py
index 43f8f546a8..27cb5a34c5 100644
--- a/var/spack/repos/builtin/packages/py-azure-cli/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-cli/package.py
@@ -76,7 +76,7 @@ class PyAzureCli(PythonPackage):
depends_on("py-azure-mgmt-recoveryservices@0.4.0:0.4", type=("build", "run"))
depends_on("py-azure-mgmt-recoveryservicesbackup@0.6.0:0.6", type=("build", "run"))
depends_on("py-azure-mgmt-redhatopenshift@0.1.0", type=("build", "run"))
- depends_on("py-azure-mgmt-redis@7.0.0:7.0", type=("build", "run"))
+ depends_on("py-azure-mgmt-redis@7.0", type=("build", "run"))
depends_on("py-azure-mgmt-relay@0.1.0:0.1", type=("build", "run"))
depends_on("py-azure-mgmt-reservations@0.6.0", type=("build", "run"))
depends_on("py-azure-mgmt-search@2.0:2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azure-core/package.py b/var/spack/repos/builtin/packages/py-azure-core/package.py
index de1542547b..19db3d0f1c 100644
--- a/var/spack/repos/builtin/packages/py-azure-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-core/package.py
@@ -11,18 +11,39 @@ class PyAzureCore(PythonPackage):
"""Microsoft Azure Core Library for Python."""
homepage = "https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/core/azure-core"
- pypi = "azure-core/azure-core-1.7.0.zip"
+ pypi = "azure-core/azure-core-1.30.0.tar.gz"
license("MIT")
+ version("1.30.2", sha256="a14dc210efcd608821aa472d9fb8e8d035d29b68993819147bc290a8ac224472")
+ version("1.30.0", sha256="6f3a7883ef184722f6bd997262eddaf80cfe7e5b3e0caaaf8db1695695893d35")
+ version("1.29.7", sha256="2944faf1a7ff1558b1f457cabf60f279869cabaeef86b353bed8eb032c7d8c5e")
+ version("1.29.2", sha256="beb0fe88d1043d8457318e8fb841d9caa648211092eda213c16b376401f3710d")
+ version("1.28.0", sha256="e9eefc66fc1fde56dab6f04d4e5d12c60754d5a9fa49bdcfd8534fc96ed936bd")
+ version("1.27.1", sha256="5975c20808fa388243f01a8b79021bfbe114f503a27c543f002c5fc8bbdd73dd")
+ version("1.26.4", sha256="075fe06b74c3007950dd93d49440c2f3430fd9b4a5a2756ec8c79454afc989c6")
version("1.26.1", sha256="223b0e90cbdd1f03c41b195b03239899843f20d00964dbb85e64386873414a2d")
version("1.21.1", sha256="88d2db5cf9a135a7287dc45fdde6b96f9ca62c9567512a3bb3e20e322ce7deb2")
version("1.7.0", sha256="a66da240a287f447f9867f54ba09ea235895cec13ea38c5f490ce4eedefdd75c")
version("1.6.0", sha256="d10b74e783cff90d56360e61162afdd22276d62dc9467e657ae866449eae7648")
- # https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/setup.py
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-core_1.30.2/sdk/core/azure-core/setup.py
+
+ depends_on("python@3.8:", type=("build", "run"), when="@1.30.2:")
depends_on("py-setuptools", type="build")
+ depends_on("py-anyio@3:4", when="@1.29.6", type=("build", "run"))
+ depends_on("py-requests@2.21:", when="@1.29.6:", type=("build", "run"))
depends_on("py-requests@2.18.4:", type=("build", "run"))
- depends_on("py-six@1.6:", when="@:1.21", type=("build", "run"))
depends_on("py-six@1.11:", when="@1.21:", type=("build", "run"))
+ depends_on("py-six@1.6:", when="@:1.21", type=("build", "run"))
+ depends_on("py-typing-extensions@4.6:", when="@1.29.2:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.3:", when="@1.26.4:", type=("build", "run"))
depends_on("py-typing-extensions@4.0.1:", when="@1.26:", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if version < Version("1.29.3"):
+ return "https://pypi.io/packages/source/a/azure-core/azure-core-{0}.zip".format(
+ version
+ )
+
+ return super().url_for_version(version)
diff --git a/var/spack/repos/builtin/packages/py-azure-identity/package.py b/var/spack/repos/builtin/packages/py-azure-identity/package.py
index c18df945b5..00c18e24d6 100644
--- a/var/spack/repos/builtin/packages/py-azure-identity/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-identity/package.py
@@ -13,7 +13,7 @@ class PyAzureIdentity(PythonPackage):
homepage = (
"https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity"
)
- pypi = "azure-identity/azure-identity-1.3.1.zip"
+ pypi = "azure-identity/azure-identity-1.15.0.tar.gz"
# 'azure.identity.aio' import doesn't work for some reason, leave out of
# 'import_modules' list to ensure that tests still pass for other imports.
@@ -21,22 +21,43 @@ class PyAzureIdentity(PythonPackage):
license("MIT")
+ version("1.17.1", sha256="32ecc67cc73f4bd0595e4f64b1ca65cd05186f4fe6f98ed2ae9f1aa32646efea")
+ version("1.15.0", sha256="4c28fc246b7f9265610eb5261d65931183d019a23d4b0e99357facb2e6c227c8")
+ version("1.14.1", sha256="48e2a9dbdc59b4f095f841d867d9a8cbe4c1cdbbad8251e055561afd47b4a9b8")
+ version("1.13.0", sha256="c931c27301ffa86b07b4dcf574e29da73e3deba9ab5d1fe4f445bb6a3117e260")
version("1.12.0", sha256="7f9b1ae7d97ea7af3f38dd09305e19ab81a1e16ab66ea186b6579d85c1ca2347")
version("1.3.1", sha256="5a59c36b4b05bdaec455c390feda71b6495fc828246593404351b9a41c2e877a")
version("1.2.0", sha256="b32acd1cdb6202bfe10d9a0858dc463d8960295da70ae18097eb3b85ab12cb91")
- # https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.12.0/sdk/identity/azure-identity/setup.py
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.17.1/sdk/identity/azure-identity/setup.py
+
+ depends_on("python@3.8:", type=("build", "run"), when="@1.16:")
depends_on("py-setuptools", type="build")
- with when("@1.12:"):
- depends_on("py-azure-core@1.11:1", type=("build", "run"))
- depends_on("py-cryptography@2.5:", type=("build", "run"))
- depends_on("py-msal@1.12:1", type=("build", "run"))
- depends_on("py-msal-extensions@0.3:1", type=("build", "run"))
- depends_on("py-six@1.12:", type=("build", "run"))
-
- with when("@:1.11"):
- depends_on("py-azure-core@1", type=("build", "run"))
- depends_on("py-cryptography@2.1.4:", type=("build", "run"))
- depends_on("py-msal@1", type=("build", "run"))
- depends_on("py-msal-extensions@0.1.3:0.1", type=("build", "run"))
- depends_on("py-six@1.6:", type=("build", "run"))
+ depends_on("py-azure-core@1.23:", type=("build", "run"), when="@1.16:")
+ depends_on("py-azure-core@1.23:1", type=("build", "run"), when="@1.15")
+ depends_on("py-azure-core@1.11:1", type=("build", "run"), when="@1.12:1.14")
+ depends_on("py-azure-core@1", type=("build", "run"), when="@:1.15")
+ depends_on("py-cryptography@2.5:", type=("build", "run"), when="@1.12:")
+ depends_on("py-cryptography@2.1.4:", type=("build", "run"))
+ depends_on("py-msal@1.24:", type=("build", "run"), when="@1.16:")
+ depends_on("py-msal@1.24:1", type=("build", "run"), when="@1.15")
+ depends_on("py-msal@1.20:1", type=("build", "run"), when="@1.13:1.14")
+ depends_on("py-msal@1.12:1", type=("build", "run"), when="@1.12")
+ depends_on("py-msal@1", type=("build", "run"), when="@:1.15")
+ depends_on("py-msal-extensions@0.3:", type=("build", "run"), when="@1.16:")
+ depends_on("py-msal-extensions@0.3:1", type=("build", "run"), when="@1.12:1.15")
+ depends_on("py-msal-extensions@0.1.3:0.1", type=("build", "run"), when="@:1.11")
+ depends_on("py-typing-extensions@4:", type=("build", "run"), when="@1.17:")
+
+ depends_on("py-six@1.12:", type=("build", "run"), when="@1.12")
+ depends_on("py-six@1.6:", type=("build", "run"), when="@:1.11")
+
+ def url_for_version(self, version):
+ if version < Version("1.15"):
+ return (
+ "https://pypi.io/packages/source/a/azure-identity/azure-identity-{0}.zip".format(
+ version
+ )
+ )
+
+ return super().url_for_version(version)
diff --git a/var/spack/repos/builtin/packages/py-azure-mgmt-batch/package.py b/var/spack/repos/builtin/packages/py-azure-mgmt-batch/package.py
index 3168d664e4..87f435fa6f 100644
--- a/var/spack/repos/builtin/packages/py-azure-mgmt-batch/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-mgmt-batch/package.py
@@ -11,11 +11,28 @@ class PyAzureMgmtBatch(PythonPackage):
"""Microsoft Azure Batch Management Client Library for Python."""
homepage = "https://github.com/Azure/azure-sdk-for-python"
- pypi = "azure-mgmt-batch/azure-mgmt-batch-9.0.0.zip"
+ pypi = "azure-mgmt-batch/azure-mgmt-batch-17.1.0.zip"
+ version("17.1.0", sha256="385bf920898dc2d5807865fbe45019f10cdfbef651c6dbfa4745a842525dbafb")
+ version("16.2.0", sha256="69691066cd5a2c86e8fdaaefbb80e2940381acedfc8053df193b5214d2ece682")
+ version("15.0.0", sha256="9b793bb31a0d4dc8c29186db61db24d83795851a75846aadb187cf95bf853ccb")
+ version("14.0.0", sha256="1d3b2c9ebd57c8874e11d29e7dd05a1f078d2156fc9683e2f2ad41024e448bf6")
+ version("10.0.1", sha256="455e2f1010a59163bfd25d72e9d8dc7847df566795bc35655bcb2de925763d33")
version("9.0.0", sha256="03417eecfa1fac906e674cb1cb43ed7da27a96277277b091d7c389ba39f6c3fe")
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-batch_14.0.0/sdk/batch/azure-mgmt-batch/setup.py
+
depends_on("py-setuptools", type="build")
- depends_on("py-msrest@0.5.0:", type=("build", "run"))
- depends_on("py-msrestazure@0.4.32:1", type=("build", "run"))
+
+ depends_on("py-isodate@0.6.1:0", type=("build", "run"), when="@17.1:")
depends_on("py-azure-common@1.1:1", type=("build", "run"))
+ depends_on("py-azure-mgmt-core@1.2:1", type=("build", "run"), when="@14:")
+ depends_on("py-azure-mgmt-core@1.3:1", type=("build", "run"), when="@16.1:")
+ depends_on("py-azure-mgmt-core@1.3.2:1", type=("build", "run"), when="@17:")
+
+ with when("@:17.0"):
+ depends_on("py-msrest@0.5.0:", type=("build", "run"))
+ depends_on("py-msrest@0.6.21:", type=("build", "run"), when="@16:")
+ depends_on("py-msrest@0.7.1:", type=("build", "run"), when="@17:")
+
+ depends_on("py-msrestazure@0.4.32:1", type=("build", "run"), when="@:10")
diff --git a/var/spack/repos/builtin/packages/py-azure-mgmt-core/package.py b/var/spack/repos/builtin/packages/py-azure-mgmt-core/package.py
index f1ad352cf8..1b288622f2 100644
--- a/var/spack/repos/builtin/packages/py-azure-mgmt-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-mgmt-core/package.py
@@ -15,9 +15,20 @@ class PyAzureMgmtCore(PythonPackage):
license("MIT")
+ version("1.4.0", sha256="d195208340094f98e5a6661b781cde6f6a051e79ce317caabd8ff97030a9b3ae")
+ version("1.3.2", sha256="07f4afe823a55d704b048d61edfdc1318c051ed59f244032126350be95e9d501")
+ version("1.2.2", sha256="4246810996107f72482a9351cf918d380c257e90942144ec9c0c2abda1d0a312")
version("1.2.0", sha256="8fe3b59446438f27e34f7b24ea692a982034d9e734617ca1320eedeee1939998")
version("1.0.0", sha256="510faf49a10daec8346cc086143d8e667ef3b4f8c8022a8e710091027631a55e")
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-core_1.4.0/sdk/core/azure-mgmt-core/setup.py
+
depends_on("py-setuptools", type="build")
+ depends_on("py-azure-core@1.26.2:1", when="@1.4.0:", type=("build", "run"))
+ depends_on("py-azure-core@1.24:1", when="@1.3.2:", type=("build", "run"))
+ depends_on("py-azure-core@1.23:1", when="@1.3.1:", type=("build", "run"))
+ depends_on("py-azure-core@1.15:1", when="@1.3:", type=("build", "run"))
+ depends_on("py-azure-core@1.9:1", when="@1.2.2:", type=("build", "run"))
+ depends_on("py-azure-core@1.8.2:1", when="@1.2.1:", type=("build", "run"))
depends_on("py-azure-core@1.7.0:1", when="@1.2:", type=("build", "run"))
depends_on("py-azure-core@1.4.0:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py b/var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py
index 5e16d38518..9fccff50ac 100644
--- a/var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-mgmt-storage/package.py
@@ -13,6 +13,8 @@ class PyAzureMgmtStorage(PythonPackage):
homepage = "https://github.com/Azure/azure-sdk-for-python"
pypi = "azure-mgmt-storage/azure-mgmt-storage-11.1.0.zip"
+ version("21.0.0", sha256="6eb13eeecf89195b2b5f47be0679e3f27888efd7bd2132eec7ebcbce75cb1377")
+ version("20.1.0", sha256="214f3fde8c91e27d53f2e654a28d15003ad3f6f15c8438a8205f0c88a48d9451")
version("11.1.0", sha256="ef23587c1b6dc0866ebf0e91e83ba05d7f7e4fea7951b704781b9cd9f5f27f1c")
version("11.0.0", sha256="f9791c2a84eee0a55bbf757632a2a4d1e102db958e75422d5e0e7306041129b8")
diff --git a/var/spack/repos/builtin/packages/py-azure-nspkg/package.py b/var/spack/repos/builtin/packages/py-azure-nspkg/package.py
index 7153b8b926..e7b85a8cee 100644
--- a/var/spack/repos/builtin/packages/py-azure-nspkg/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-nspkg/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class PyAzureNspkg(PythonPackage):
"""Microsoft Azure Namespace Package [Internal]."""
- homepage = "hhttps://github.com/Azure/azure-sdk-for-python"
+ homepage = "https://github.com/Azure/azure-sdk-for-python"
pypi = "azure-nspkg/azure-nspkg-3.0.2.zip"
version("3.0.2", sha256="e7d3cea6af63e667d87ba1ca4f8cd7cb4dfca678e4c55fc1cedb320760e39dd0")
diff --git a/var/spack/repos/builtin/packages/py-azure-storage-blob/package.py b/var/spack/repos/builtin/packages/py-azure-storage-blob/package.py
index b8d5ab38ab..30307250ec 100644
--- a/var/spack/repos/builtin/packages/py-azure-storage-blob/package.py
+++ b/var/spack/repos/builtin/packages/py-azure-storage-blob/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
from spack.package import *
@@ -10,14 +11,47 @@ class PyAzureStorageBlob(PythonPackage):
"""Microsoft Azure Blob Storage Client Library for Python"""
homepage = "https://github.com/Azure/azure-storage-python"
- pypi = "azure-storage-blob/azure-storage-blob-12.9.0.zip"
+ pypi = "azure-storage-blob/azure-storage-blob-12.19.0.tar.gz"
maintainers("marcusboden")
license("MIT")
+ version("12.22.0", sha256="b3804bb4fe8ab1c32771fa464053da772a682c2737b19da438a3f4e5e3b3736e")
+ version("12.19.0", sha256="26c0a4320a34a3c2a1b74528ba6812ebcb632a04cd67b1c7377232c4b01a5897")
+ version("12.18.3", sha256="d8ced0deee3367fa3d4f3d1a03cd9edadf4440c0a371f503d623fa6c807554ee")
+ version("12.17.0", sha256="c14b785a17050b30fc326a315bdae6bc4a078855f4f94a4c303ad74a48dc8c63")
+ version("12.16.0", sha256="43b45f19a518a5c6895632f263b3825ebc23574f25cc84b66e1630a6160e466f")
+ version("12.15.0", sha256="f8b8d582492740ab16744455408342fb8e4c8897b64a8a3fc31743844722c2f2")
+ version("12.14.0", sha256="a72dd9923e4b38a552f2bc1749d1fa5b820f497a8fb3cd2d77e7045bbe87bb4d")
+ version("12.13.1", sha256="899c4b8e2671812d2cf78f107556a27dbb128caaa2bb06094e72a3d5836740af")
+ version("12.12.0", sha256="f6daf07d1ca86d189ae15c9b1859dff5b7127bf24a07a4bbe41e0b81e01d62f7")
+ version("12.11.0", sha256="49535b3190bb69d0d9ff7a383246b14da4d2b1bdff60cae5f9173920c67ca7ee")
+ version("12.10.0", sha256="3c7dc2c93e7ff2a731acd66a36a1f0a6266072b4154deba4894dab891285ea3a")
version("12.9.0", sha256="cff66a115c73c90e496c8c8b3026898a3ce64100840276e9245434e28a864225")
+ # https://github.com/Azure/azure-sdk-for-python/blob/azure-storage-blob_12.22.0/sdk/storage/azure-storage-blob/setup.py
+
+ depends_on("python@3.8:", type=("build", "run"), when="@12.20:")
depends_on("py-setuptools", type="build")
- depends_on("py-azure-core@1.10:1", type=("build", "run"))
- depends_on("py-msrest@0.6.21:", type=("build", "run"))
+ depends_on("py-azure-core@1.28:", type=("build", "run"), when="@12.20:")
+ depends_on("py-azure-core@1.28:1", type=("build", "run"), when="@12.17:12.19")
+ depends_on("py-azure-core@1.26:1", type=("build", "run"), when="@12.15:12.16")
+ depends_on("py-azure-core@1.24.2:1", type=("build", "run"), when="@12.14")
+ depends_on("py-azure-core@1.23.1:1", type=("build", "run"), when="@12.12:12.13")
+ depends_on("py-azure-core@1.15:1", type=("build", "run"), when="@12.10:12.11")
+ depends_on("py-azure-core@1.10:1", type=("build", "run"), when="@:12.19")
depends_on("py-cryptography@2.1.4:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.6:", type=("build", "run"), when="@12.20:")
+ depends_on("py-typing-extensions@4.3:", type=("build", "run"), when="@12.17:")
+ depends_on("py-typing-extensions@4.0.1:", type=("build", "run"), when="@12.15:")
+ depends_on("py-isodate@0.6.1:", type=("build", "run"), when="@12.15:")
+ depends_on("py-msrest@0.7.1:", type=("build", "run"), when="@12.14")
+ depends_on("py-msrest@0.6.21:", type=("build", "run"), when="@:12.13")
+
+ def url_for_version(self, version):
+ if version < Version("12.18"):
+ return "https://pypi.io/packages/source/a/azure-storage-blob/azure-storage-blob-{0}.zip".format(
+ version
+ )
+
+ return super().url_for_version(version)
diff --git a/var/spack/repos/builtin/packages/py-azureml-automl-core/package.py b/var/spack/repos/builtin/packages/py-azureml-automl-core/package.py
index 1f1730659c..87d51dfccd 100644
--- a/var/spack/repos/builtin/packages/py-azureml-automl-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-automl-core/package.py
@@ -14,11 +14,7 @@ class PyAzuremlAutomlCore(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_automl_core/azureml_automl_core-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="1fa4a900856b15e1ec9a6bb949946ed0c873a5a54da3db592f03dbb46a117ceb",
- expand=False,
- )
+ version("1.23.0", sha256="1fa4a900856b15e1ec9a6bb949946ed0c873a5a54da3db592f03dbb46a117ceb")
depends_on("python@3.5:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-core/package.py b/var/spack/repos/builtin/packages/py-azureml-core/package.py
index f5c5559780..2ce6c6b727 100644
--- a/var/spack/repos/builtin/packages/py-azureml-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-core/package.py
@@ -17,21 +17,9 @@ class PyAzuremlCore(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_core/azureml_core-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="0965d0741e39cdb95cff5880dbf1a55fdd87cd9fc316884f965668e6cc36e628",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="df8a01b04bb156852480de0bdd78434ed84f386e1891752bdf887faeaa2ca417",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="a0f2b0977f18fb7dcb88c314594a4a85c636a36be3d582be1cae25655fea6105",
- expand=False,
- )
+ version("1.23.0", sha256="0965d0741e39cdb95cff5880dbf1a55fdd87cd9fc316884f965668e6cc36e628")
+ version("1.11.0", sha256="df8a01b04bb156852480de0bdd78434ed84f386e1891752bdf887faeaa2ca417")
+ version("1.8.0", sha256="a0f2b0977f18fb7dcb88c314594a4a85c636a36be3d582be1cae25655fea6105")
depends_on("python@3.5:3.8", type=("build", "run"))
depends_on("py-pytz", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-dataprep-native/package.py b/var/spack/repos/builtin/packages/py-azureml-dataprep-native/package.py
index 214d8c7751..405dcac633 100644
--- a/var/spack/repos/builtin/packages/py-azureml-dataprep-native/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-dataprep-native/package.py
@@ -13,17 +13,17 @@ class PyAzuremlDataprepNative(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py"
+ skip_version_audit = ["platform=windows"]
+
if sys.platform == "darwin":
version(
"30.0.0-py3.9",
sha256="eaf3fcd9f965e87b03fe89d7c6fe6abce53483a79afc963e4981061f4c250e85",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_native/azureml_dataprep_native-30.0.0-cp39-cp39-macosx_10_9_x86_64.whl",
)
version(
"30.0.0-py3.8",
sha256="6772b638f9d03a041b17ce4343061f5d543019200904b9d361b2b2629c3595a7",
- expand=False,
preferred=True,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_native/azureml_dataprep_native-30.0.0-cp38-cp38-macosx_10_9_x86_64.whl",
)
@@ -31,13 +31,11 @@ class PyAzuremlDataprepNative(PythonPackage):
version(
"30.0.0-py3.9",
sha256="b8673136948f682c84d047feacbfee436df053cba4f386f31c4c3a245a4e3646",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_native/azureml_dataprep_native-30.0.0-cp39-cp39-manylinux1_x86_64.whl",
)
version(
"30.0.0-py3.8",
sha256="d07cf20f22b14c98576e135bbad9bb8aaa3108941d2beaadf050b4238bc93a18",
- expand=False,
preferred=True,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_native/azureml_dataprep_native-30.0.0-cp38-cp38-manylinux1_x86_64.whl",
)
diff --git a/var/spack/repos/builtin/packages/py-azureml-dataprep-rslex/package.py b/var/spack/repos/builtin/packages/py-azureml-dataprep-rslex/package.py
index f45d451a0b..c7ade72fee 100644
--- a/var/spack/repos/builtin/packages/py-azureml-dataprep-rslex/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-dataprep-rslex/package.py
@@ -16,17 +16,17 @@ class PyAzuremlDataprepRslex(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py"
+ skip_version_audit = ["platform=windows"]
+
if sys.platform == "darwin":
version(
"1.9.0-py3.9",
sha256="9bdaa31d129dac19ee20d5a3aad1726397e90d8d741b4f6de4554040800fefe8",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl",
)
version(
"1.9.0-py3.8",
sha256="9b2e741ac1c53d3f7e6061d264feccf157d97e404c772933a176e6021014484e",
- expand=False,
preferred=True,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl",
)
@@ -34,26 +34,22 @@ class PyAzuremlDataprepRslex(PythonPackage):
version(
"1.8.0-py3.9",
sha256="677c25a7e23ec7f91d25aa596f382f7f3b6d60fbc3258bead2b2a6aa42f3a16d",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl",
)
version(
"1.8.0-py3.8",
sha256="d7f2dec06296544b1707f5b01c6a4eaad744b4abfe9e8e89830b561c84d95a7a",
- expand=False,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl",
)
elif sys.platform.startswith("linux"):
version(
"1.9.0-py3.9",
sha256="79d52bb427e3ca781a645c4f11f7a8e5e2c8f61e61bfc162b4062d8e47bcf3d6",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.9.0-cp39-cp39-manylinux1_x86_64.whl",
)
version(
"1.9.0-py3.8",
sha256="a52461103b45867dd919bab593bb6f2426c9b5f5a435081e82a3c57c54c3add6",
- expand=False,
preferred=True,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.9.0-cp38-cp38-manylinux1_x86_64.whl",
)
@@ -61,13 +57,11 @@ class PyAzuremlDataprepRslex(PythonPackage):
version(
"1.8.0-py3.9",
sha256="e251a077669703ca117b157b225fbc20832169f913476cf79c01a5c6f8ff7a50",
- expand=False,
url="https://pypi.io/packages/cp39/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.8.0-cp39-cp39-manylinux1_x86_64.whl",
)
version(
"1.8.0-py3.8",
sha256="2ebfa164f0933a5cec383cd27ba10d33861a73237ef481ada5a9a822bb55514a",
- expand=False,
url="https://pypi.io/packages/cp38/a/azureml_dataprep_rslex/azureml_dataprep_rslex-1.8.0-cp38-cp38-manylinux1_x86_64.whl",
)
diff --git a/var/spack/repos/builtin/packages/py-azureml-dataprep/package.py b/var/spack/repos/builtin/packages/py-azureml-dataprep/package.py
index bbeeb76ccc..90bfdae74e 100644
--- a/var/spack/repos/builtin/packages/py-azureml-dataprep/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-dataprep/package.py
@@ -13,16 +13,8 @@ class PyAzuremlDataprep(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py"
url = "https://pypi.io/packages/py3/a/azureml_dataprep/azureml_dataprep-2.0.2-py3-none-any.whl"
- version(
- "2.11.0",
- sha256="755c0d7cfe228705aee7adc97813fb6d7d6ecb048b66f47c1fd5897f2709c3a2",
- expand=False,
- )
- version(
- "2.10.1",
- sha256="a36f807112ff1e64d21265b8e7f40154c93e3bead539e2a74c9d74200fd77c86",
- expand=False,
- )
+ version("2.11.0", sha256="755c0d7cfe228705aee7adc97813fb6d7d6ecb048b66f47c1fd5897f2709c3a2")
+ version("2.10.1", sha256="a36f807112ff1e64d21265b8e7f40154c93e3bead539e2a74c9d74200fd77c86")
variant("fuse", default=False, description="Build with FUSE support")
diff --git a/var/spack/repos/builtin/packages/py-azureml-dataset-runtime/package.py b/var/spack/repos/builtin/packages/py-azureml-dataset-runtime/package.py
index 56878089a0..7399b0832a 100644
--- a/var/spack/repos/builtin/packages/py-azureml-dataset-runtime/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-dataset-runtime/package.py
@@ -14,11 +14,7 @@ class PyAzuremlDatasetRuntime(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml-dataset-runtime/azureml_dataset_runtime-1.11.0.post1-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="96ca73d03ffedc0dd336d9383d2e17cf74548a89fc7ca4c201c599817c97bbc6",
- expand=False,
- )
+ version("1.23.0", sha256="96ca73d03ffedc0dd336d9383d2e17cf74548a89fc7ca4c201c599817c97bbc6")
variant("fuse", default=False, description="Build with FUSE support")
diff --git a/var/spack/repos/builtin/packages/py-azureml-pipeline-core/package.py b/var/spack/repos/builtin/packages/py-azureml-pipeline-core/package.py
index 4542e001fb..8a9f3bd402 100644
--- a/var/spack/repos/builtin/packages/py-azureml-pipeline-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-pipeline-core/package.py
@@ -13,21 +13,9 @@ class PyAzuremlPipelineCore(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_pipeline_core/azureml_pipeline_core-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="347e3e41559879611d53eeff5c05dd133db6fa537edcf2b9f70d91aad461df02",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="98012195e3bba12bf42ac69179549038b3563b39e3dadab4f1d06407a00ad8b3",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="24e1c57a57e75f9d74ea6f45fa4e93c1ee3114c8ed9029d538f9cc8e4f8945b2",
- expand=False,
- )
+ version("1.23.0", sha256="347e3e41559879611d53eeff5c05dd133db6fa537edcf2b9f70d91aad461df02")
+ version("1.11.0", sha256="98012195e3bba12bf42ac69179549038b3563b39e3dadab4f1d06407a00ad8b3")
+ version("1.8.0", sha256="24e1c57a57e75f9d74ea6f45fa4e93c1ee3114c8ed9029d538f9cc8e4f8945b2")
depends_on("python@3.5:3", type=("build", "run"))
depends_on("py-azureml-core@1.23.0:1.23", when="@1.23.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-pipeline-steps/package.py b/var/spack/repos/builtin/packages/py-azureml-pipeline-steps/package.py
index 6598be7b57..e2dcd81f77 100644
--- a/var/spack/repos/builtin/packages/py-azureml-pipeline-steps/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-pipeline-steps/package.py
@@ -13,11 +13,7 @@ class PyAzuremlPipelineSteps(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_pipeline_steps/azureml_pipeline_steps-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="72154c2f75624a1e7500b8e2239ae1354eeedf66d2cabb11e213b7eb80aedddb",
- expand=False,
- )
+ version("1.23.0", sha256="72154c2f75624a1e7500b8e2239ae1354eeedf66d2cabb11e213b7eb80aedddb")
depends_on("python@3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-pipeline/package.py b/var/spack/repos/builtin/packages/py-azureml-pipeline/package.py
index cecf981ab9..e8d732cb59 100644
--- a/var/spack/repos/builtin/packages/py-azureml-pipeline/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-pipeline/package.py
@@ -16,11 +16,7 @@ class PyAzuremlPipeline(PythonPackage):
"https://pypi.io/packages/py3/a/azureml_pipeline/azureml_pipeline-1.11.0-py3-none-any.whl"
)
- version(
- "1.23.0",
- sha256="ed0fae96771840d3ffd63d63df1b1eed2f50c3b8dbe7b672a4f1ba6e66d0a392",
- expand=False,
- )
+ version("1.23.0", sha256="ed0fae96771840d3ffd63d63df1b1eed2f50c3b8dbe7b672a4f1ba6e66d0a392")
depends_on("python@3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-sdk/package.py b/var/spack/repos/builtin/packages/py-azureml-sdk/package.py
index 8e613aee9e..9c9f571ec8 100644
--- a/var/spack/repos/builtin/packages/py-azureml-sdk/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-sdk/package.py
@@ -15,11 +15,7 @@ class PyAzuremlSdk(PythonPackage):
maintainers("adamjstewart")
- version(
- "1.23.0",
- sha256="b9520f426831acb99fafa1ecd154b6bfd4f73fbf71e918d819f9db4a75438ab9",
- expand=False,
- )
+ version("1.23.0", sha256="b9520f426831acb99fafa1ecd154b6bfd4f73fbf71e918d819f9db4a75438ab9")
# https://github.com/Azure/MachineLearningNotebooks/issues/1285
depends_on("python@3.5:3.8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-telemetry/package.py b/var/spack/repos/builtin/packages/py-azureml-telemetry/package.py
index 89e5f6a5a5..69f2d1bd81 100644
--- a/var/spack/repos/builtin/packages/py-azureml-telemetry/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-telemetry/package.py
@@ -14,21 +14,9 @@ class PyAzuremlTelemetry(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_telemetry/azureml_telemetry-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="68f9aac77e468db80e60f75d0843536082e2884ab251b6d3054dd623bd9c9e0d",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="0d46c4a7bb8c0b188f1503504a6029384bc2237d82a131e7d1e9e89c3491b1fc",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="de657efe9773bea0de76c432cbab34501ac28606fe1b380d6883562ebda3d804",
- expand=False,
- )
+ version("1.23.0", sha256="68f9aac77e468db80e60f75d0843536082e2884ab251b6d3054dd623bd9c9e0d")
+ version("1.11.0", sha256="0d46c4a7bb8c0b188f1503504a6029384bc2237d82a131e7d1e9e89c3491b1fc")
+ version("1.8.0", sha256="de657efe9773bea0de76c432cbab34501ac28606fe1b380d6883562ebda3d804")
depends_on("python@3.5:3", type=("build", "run"))
depends_on("py-applicationinsights", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-train-automl-client/package.py b/var/spack/repos/builtin/packages/py-azureml-train-automl-client/package.py
index bd676ef78c..baabe2705a 100644
--- a/var/spack/repos/builtin/packages/py-azureml-train-automl-client/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-train-automl-client/package.py
@@ -15,11 +15,7 @@ class PyAzuremlTrainAutomlClient(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_train_automl_client/azureml_train_automl_client-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="ac5f1ce9b04b4e61e2e28e0fa8d2d8e47937a546f624d1cd3aa6bc4f9110ecbe",
- expand=False,
- )
+ version("1.23.0", sha256="ac5f1ce9b04b4e61e2e28e0fa8d2d8e47937a546f624d1cd3aa6bc4f9110ecbe")
depends_on("python@3.5:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-train-core/package.py b/var/spack/repos/builtin/packages/py-azureml-train-core/package.py
index 55a18dc625..d67049ca7d 100644
--- a/var/spack/repos/builtin/packages/py-azureml-train-core/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-train-core/package.py
@@ -14,21 +14,9 @@ class PyAzuremlTrainCore(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_train_core/azureml_train_core-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="5c384ea0bea3ecd8bf2a1832dda906fd183cf2a03ad3372cb824ce8fa417979e",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="1b5fd813d21e75cd522d3a078eba779333980a309bcff6fc72b74ddc8e7a26f1",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="5a8d90a08d4477527049d793feb40d07dc32fafc0e4e57b4f0729d3c50b408a2",
- expand=False,
- )
+ version("1.23.0", sha256="5c384ea0bea3ecd8bf2a1832dda906fd183cf2a03ad3372cb824ce8fa417979e")
+ version("1.11.0", sha256="1b5fd813d21e75cd522d3a078eba779333980a309bcff6fc72b74ddc8e7a26f1")
+ version("1.8.0", sha256="5a8d90a08d4477527049d793feb40d07dc32fafc0e4e57b4f0729d3c50b408a2")
depends_on("python@3.5:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-train-restclients-hyperdrive/package.py b/var/spack/repos/builtin/packages/py-azureml-train-restclients-hyperdrive/package.py
index e0ec281e5e..2d0d2186a5 100644
--- a/var/spack/repos/builtin/packages/py-azureml-train-restclients-hyperdrive/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-train-restclients-hyperdrive/package.py
@@ -14,21 +14,9 @@ class PyAzuremlTrainRestclientsHyperdrive(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_train_restclients_hyperdrive/azureml_train_restclients_hyperdrive-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="8ecee0cdb92a4a431b778ebcc7f9fe7c5bf63ea4cae9caa687980bc34ae3a42c",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="8bc6f9676a9f75e6ee06d201c418ea904c24e854f26cf799b08c259c3ac92d13",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="1633c7eb0fd96714f54f72072ccf1c5ee1ef0a8ba52680793f20d27e0fd43c87",
- expand=False,
- )
+ version("1.23.0", sha256="8ecee0cdb92a4a431b778ebcc7f9fe7c5bf63ea4cae9caa687980bc34ae3a42c")
+ version("1.11.0", sha256="8bc6f9676a9f75e6ee06d201c418ea904c24e854f26cf799b08c259c3ac92d13")
+ version("1.8.0", sha256="1633c7eb0fd96714f54f72072ccf1c5ee1ef0a8ba52680793f20d27e0fd43c87")
depends_on("python@3.5:3", type=("build", "run"))
depends_on("py-requests@2.19.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-azureml-train/package.py b/var/spack/repos/builtin/packages/py-azureml-train/package.py
index 9c2ae18093..329387fe06 100644
--- a/var/spack/repos/builtin/packages/py-azureml-train/package.py
+++ b/var/spack/repos/builtin/packages/py-azureml-train/package.py
@@ -15,21 +15,9 @@ class PyAzuremlTrain(PythonPackage):
homepage = "https://docs.microsoft.com/en-us/azure/machine-learning/service/"
url = "https://pypi.io/packages/py3/a/azureml_train/azureml_train-1.11.0-py3-none-any.whl"
- version(
- "1.23.0",
- sha256="e16cb8673d9c9c70966c37c7362ceed3514e9797b0816c0aa449730da3b9c857",
- expand=False,
- )
- version(
- "1.11.0",
- sha256="7800a3067979972b976c81082dc509e23c04405129cc1fdef0f9cd7895bcafc7",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="124e5b7d8d64bac61db022f305bd31c25e57fdcb4be93eefd4244a04a13deab3",
- expand=False,
- )
+ version("1.23.0", sha256="e16cb8673d9c9c70966c37c7362ceed3514e9797b0816c0aa449730da3b9c857")
+ version("1.11.0", sha256="7800a3067979972b976c81082dc509e23c04405129cc1fdef0f9cd7895bcafc7")
+ version("1.8.0", sha256="124e5b7d8d64bac61db022f305bd31c25e57fdcb4be93eefd4244a04a13deab3")
depends_on("python@3.5:3", type=("build", "run"))
depends_on("py-azureml-train-core@1.23.0:1.23", when="@1.23.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-babel/package.py b/var/spack/repos/builtin/packages/py-babel/package.py
index 1c73663fed..c1a56e434b 100644
--- a/var/spack/repos/builtin/packages/py-babel/package.py
+++ b/var/spack/repos/builtin/packages/py-babel/package.py
@@ -12,11 +12,12 @@ class PyBabel(PythonPackage):
emphasis on web-based applications."""
homepage = "https://babel.pocoo.org/en/latest/"
- pypi = "Babel/Babel-2.7.0.tar.gz"
+ pypi = "Babel/babel-2.15.0.tar.gz"
git = "https://github.com/python-babel/babel"
license("BSD-3-Clause")
+ version("2.15.0", sha256="8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413")
version("2.12.1", sha256="cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455")
version("2.10.3", sha256="7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51")
version("2.9.1", sha256="bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0")
@@ -28,3 +29,10 @@ class PyBabel(PythonPackage):
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-pytz@2015.7:", when="@2.12: ^python@:3.8", type=("build", "run"))
depends_on("py-pytz@2015.7:", when="@:2.10", type=("build", "run"))
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/B/Babel/{}-{}.tar.gz"
+ name = "Babel"
+ if version >= Version("2.15"):
+ name = name.lower()
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-backpack-for-pytorch/package.py b/var/spack/repos/builtin/packages/py-backpack-for-pytorch/package.py
new file mode 100644
index 0000000000..c8579d87ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-backpack-for-pytorch/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBackpackForPytorch(PythonPackage):
+ """BackPACK: Packing more into backprop."""
+
+ homepage = "https://github.com/f-dangel/backpack"
+ pypi = "backpack-for-pytorch/backpack-for-pytorch-1.6.0.tar.gz"
+
+ license("MIT")
+
+ version("1.6.0", sha256="af6495b71bacf82a1c7cab01aa85bebabccfe74d87d89f108ea72a4a0d384de3")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@38.3:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch@1.9:")
+ depends_on("py-torchvision@0.7:")
+ depends_on("py-einops@0.3:0")
+ depends_on("py-unfoldnd@0.2:0")
diff --git a/var/spack/repos/builtin/packages/py-backports-lzma/package.py b/var/spack/repos/builtin/packages/py-backports-lzma/package.py
index d0fd466db7..5539e26a85 100644
--- a/var/spack/repos/builtin/packages/py-backports-lzma/package.py
+++ b/var/spack/repos/builtin/packages/py-backports-lzma/package.py
@@ -26,5 +26,7 @@ class PyBackportsLzma(PythonPackage):
version("0.0.6", sha256="8e70936641398a6814d70f6eae6399be2ae514578d38b7f9b15c277438bbd853")
version("0.0.4", sha256="7c973edbd50c1467fed2247117e128a924d25404394a57e30d5b6c52cfcd342d")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:3.0,3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-backports-zoneinfo/package.py b/var/spack/repos/builtin/packages/py-backports-zoneinfo/package.py
index 546c9e993b..cebdb80ab4 100644
--- a/var/spack/repos/builtin/packages/py-backports-zoneinfo/package.py
+++ b/var/spack/repos/builtin/packages/py-backports-zoneinfo/package.py
@@ -16,4 +16,6 @@ class PyBackportsZoneinfo(PythonPackage):
version("0.2.1", sha256="fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@40.8.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bakta/package.py b/var/spack/repos/builtin/packages/py-bakta/package.py
index 57dcbc64bb..edec5d634f 100644
--- a/var/spack/repos/builtin/packages/py-bakta/package.py
+++ b/var/spack/repos/builtin/packages/py-bakta/package.py
@@ -18,21 +18,42 @@ class PyBakta(PythonPackage):
license("GPL-3.0-only")
+ version("1.9.4", sha256="10330a10e459144dc78daa26f3a73674799706e2e1653e080366b1bbb9e5a5d9")
version("1.5.1", sha256="36781612c4eaa99e6e24a00e8ab5b27dadf21c98ae6d16432f3e78c96a4adb5d")
- depends_on("python@3.8:", type=("build", "run"))
+ variant("deepsig", default=True, description="builds with deepsig to predict signal peptides")
+
+ depends_on("python@3.8:3.10", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-biopython@1.78:", type=("build", "run"))
- depends_on("py-xopen@1.1.0:", type=("build", "run"))
+ depends_on("py-xopen@1.5.0:", when="@1.8.2:", type=("build", "run"))
+ depends_on("py-xopen@1.1.0:", when="@:1.8.1", type=("build", "run"))
depends_on("py-requests@2.25.1:", type=("build", "run"))
- depends_on("py-alive-progress@1.6.2", type=("build", "run"))
- depends_on("trnascan-se@2.0.8:", type=("build", "run"))
- depends_on("aragorn@1.2.38:", type=("build", "run"))
+ depends_on("py-alive-progress@3.0.1:", when="@1.7.0:", type=("build", "run"))
+ depends_on("py-alive-progress@1.6.2", when="@:1.6.1", type=("build", "run"))
+ depends_on("py-pyyaml@6.0:", when="@1.6.0:", type=("build", "run"))
+ depends_on("trnascan-se@2.0.11:", when="@1.6.0:", type=("build", "run"))
+ depends_on("trnascan-se@2.0.8:", when="@:1.5.1", type=("build", "run"))
+ depends_on("aragorn@1.2.41:", when="@1.7.0:", type=("build", "run"))
+ depends_on("aragorn@1.2.38:", when="@:1.6.1", type=("build", "run"))
depends_on("infernal@1.1.4:", type=("build", "run"))
depends_on("pilercr@1.06:", type=("build", "run"))
- depends_on("prodigal@2.6.3:", type=("build", "run"))
- depends_on("hmmer@3.3.2:", type=("build", "run"))
- depends_on("diamond@2.0.14:", type=("build", "run"))
- depends_on("blast-plus@2.12.0:", type=("build", "run"))
- depends_on("amrfinder@3.10.23:", type=("build", "run"))
- depends_on("py-deepsig-biocomp@1.2.5:", type=("build", "run"))
+ depends_on("py-pyrodigal@3.1.0:", when="@1.9.0:", type=("build", "run"))
+ depends_on("py-pyrodigal@2.1.0:", when="@1.7.0:1.8.2", type=("build", "run"))
+ depends_on("py-pyrodigal@2.0.2:", when="@1.6.0:1.6.1", type=("build", "run"))
+ depends_on("prodigal@2.6.3:", when="@:1.5.1", type=("build", "run"))
+ depends_on("hmmer@3.3.2:", when="@:1.8.1", type=("build", "run"))
+ depends_on("py-pyhmmer@0.10.4:", when="@1.9.4:", type=("build", "run"))
+ depends_on("py-pyhmmer@0.10.0:", when="@1.8.2:1.9.3", type=("build", "run"))
+ # known bug with diamond v2.1.9
+ # see https://github.com/oschwengers/bakta/issues/290
+ depends_on("diamond@2.1.8,2.1.10:", when="@1.9.0:", type=("build", "run"))
+ depends_on("diamond@2.0.14:", when="@:1.8.2", type=("build", "run"))
+ depends_on("blast-plus@2.14.0:", when="@1.9.0:", type=("build", "run"))
+ depends_on("blast-plus@2.12.0:", when="@:1.8.2", type=("build", "run"))
+ depends_on("amrfinder@3.11.26:", when="@1.9.0:", type=("build", "run"))
+ depends_on("amrfinder@3.10.23:", when="@1.5.1", type=("build", "run"))
+ depends_on("circos@0.69.8:", when="@1.6.0:", type=("build", "run"))
+ depends_on("py-deepsig-biocomp@1.2.5:", when="+deepsig", type=("build", "run"))
+
+ conflicts("platform=darwin", when="+deepsig")
diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py
index b5b4bae220..424d696e46 100644
--- a/var/spack/repos/builtin/packages/py-basemap/package.py
+++ b/var/spack/repos/builtin/packages/py-basemap/package.py
@@ -17,6 +17,9 @@ class PyBasemap(PythonPackage):
version("1.2.1", sha256="3fb30424f18cd4ffd505e30fd9c810ae81b999bb92f950c76553e1abc081faa7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Per Github issue #3813, setuptools is required at runtime in order
# to make mpl_toolkits a namespace package that can span multiple
# directories (i.e., matplotlib and basemap)
diff --git a/var/spack/repos/builtin/packages/py-bcolz/package.py b/var/spack/repos/builtin/packages/py-bcolz/package.py
index 9bfbd7839b..208f2ff90a 100644
--- a/var/spack/repos/builtin/packages/py-bcolz/package.py
+++ b/var/spack/repos/builtin/packages/py-bcolz/package.py
@@ -20,6 +20,9 @@ class PyBcolz(PythonPackage):
version("1.2.1", sha256="c017d09bb0cb5bbb07f2ae223a3f3638285be3b574cb328e91525b2880300bd1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("py-numpy@1.7:", type=("build", "run"))
depends_on("py-setuptools@18.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bcrypt/package.py b/var/spack/repos/builtin/packages/py-bcrypt/package.py
index d2021ea9e0..ca94d6cc16 100644
--- a/var/spack/repos/builtin/packages/py-bcrypt/package.py
+++ b/var/spack/repos/builtin/packages/py-bcrypt/package.py
@@ -19,6 +19,8 @@ class PyBcrypt(PythonPackage):
version("3.1.6", sha256="169d3e6edbf8717e8856748b72fb02abe8ce8e0b65d733b1509ae9942e77f2a9")
version("3.1.4", sha256="ca122a2cdcdffb0fd04f9dfe3493766f298bef02dea2f190f35ea6fdee222b96")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", when="@3.2:", type="build")
depends_on("python@2.7:2,3.4:", when="@3.1.6:", type="build")
depends_on("py-setuptools@40.8:", when="@3.1.7:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-beancount/package.py b/var/spack/repos/builtin/packages/py-beancount/package.py
index 9c9ec496e8..1f9594defb 100644
--- a/var/spack/repos/builtin/packages/py-beancount/package.py
+++ b/var/spack/repos/builtin/packages/py-beancount/package.py
@@ -19,6 +19,8 @@ class PyBeancount(PythonPackage):
version("2.3.3", sha256="d9a29839ea867d1dda7af1f4bf5d3959aa7c1574cd4a0bc86f69ee64c555c71c")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
index 2906db7e3b..072a987a73 100644
--- a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
+++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
@@ -17,6 +17,7 @@ class PyBeautifulsoup4(PythonPackage):
# Requires pytest
skip_modules = ["bs4.tests"]
+ version("4.12.3", sha256="74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051")
version("4.12.2", sha256="492bbc69dca35d12daac71c4db1bfff0c876c00ef4a2ffacce226d4638eb72da")
version("4.11.1", sha256="ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693")
version("4.10.0", sha256="c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891")
diff --git a/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch b/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch
new file mode 100644
index 0000000000..cb945a9759
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-bigdft/bad_string.patch
@@ -0,0 +1,22 @@
+From e12f8694bb40ef4f0d984df67bf2c6e7c6d0a81b Mon Sep 17 00:00:00 2001
+From: Luigi Genovese <luigi.genovese@cea.fr>
+Date: Wed, 19 Jun 2024 13:51:33 +0200
+Subject: [PATCH] type corrected
+
+---
+ PyBigDFT/BigDFT/BioQM.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/PyBigDFT/BigDFT/BioQM.py b/PyBigDFT/BigDFT/BioQM.py
+index 6bb2985fc..20323c535 100644
+--- a/PyBigDFT/BigDFT/BioQM.py
++++ b/PyBigDFT/BigDFT/BioQM.py
+@@ -1,4 +1,4 @@
+-long_ra"""A module to define typical operations that can be done on biological systems
++"""A module to define typical operations that can be done on biological systems
+
+ """
+ from BigDFT.Systems import System
+--
+2.45.1
+
diff --git a/var/spack/repos/builtin/packages/py-bigdft/package.py b/var/spack/repos/builtin/packages/py-bigdft/package.py
index cae97858e1..3274c43575 100644
--- a/var/spack/repos/builtin/packages/py-bigdft/package.py
+++ b/var/spack/repos/builtin/packages/py-bigdft/package.py
@@ -15,15 +15,33 @@ class PyBigdft(PythonPackage):
git = "https://gitlab.com/l_sim/bigdft-suite.git"
version("develop", branch="devel")
+ version("1.9.5", sha256="5fe51e92bb746569207295feebbcd154ce4f1b364a3981bace75c45e983b2741")
+ version("1.9.4", sha256="fa22115e6353e553d2277bf054eb73a4710e92dfeb1ed9c5bf245337187f393d")
+ version("1.9.3", sha256="f5f3da95d7552219f94366b4d2a524b2beac988fb2921673a65a128f9a8f0489")
version("1.9.2", sha256="dc9e49b68f122a9886fa0ef09970f62e7ba21bb9ab1b86be9b7d7e22ed8fbe0f")
version("1.9.1", sha256="3c334da26d2a201b572579fc1a7f8caad1cbf971e848a3e10d83bc4dc8c82e41")
version("1.9.0", sha256="4500e505f5a29d213f678a91d00a10fef9dc00860ea4b3edf9280f33ed0d1ac8")
- depends_on("python@3.0:", type=("build", "run"))
- depends_on("py-numpy")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("python@3.0:", type=("build", "run"), when="@:1.9.3")
+ depends_on("python@3.6:", type=("build", "run"), when="@1.9.4:")
+
depends_on("py-setuptools")
+ depends_on("py-hatchling")
+
+ depends_on("py-numpy", type=("run"))
+ depends_on("py-ase", when="@1.9.3", type=("run"))
+ depends_on("py-matplotlib", when="@1.9.3", type=("run"))
- for vers in ["1.9.0", "1.9.1", "1.9.2", "develop"]:
+ depends_on("py-scipy", when="@1.9.4:", type=("run"))
+
+ for vers in ["1.9.0", "1.9.1", "1.9.2", "1.9.3", "1.9.4", "1.9.5", "develop"]:
depends_on("bigdft-futile@{0}".format(vers), type="run", when="@{0}".format(vers))
build_directory = "PyBigDFT"
+
+ patch("pyproject_fix.patch", when="@1.9.4") # based on cb66dd0c4
+ patch("bad_string.patch", when="@1.9.5")
diff --git a/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch b/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch
new file mode 100644
index 0000000000..18b75e8b7f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-bigdft/pyproject_fix.patch
@@ -0,0 +1,9 @@
+--- a/PyBigDFT/pyproject.toml
++++ b/PyBigDFT/pyproject.toml
+@@ -33,3 +33,6 @@ viz = ["py3dmol", "matplotlib"]
+
+ [tool.hatch.build]
+ artifacts = ["*.xyz", "psppar*.yaml", "postprocess.yaml"]
++
++[tool.hatch.build.targets.wheel]
++packages = ["BigDFT"]
diff --git a/var/spack/repos/builtin/packages/py-bigfloat/package.py b/var/spack/repos/builtin/packages/py-bigfloat/package.py
index 1044b75292..83c35e24ae 100644
--- a/var/spack/repos/builtin/packages/py-bigfloat/package.py
+++ b/var/spack/repos/builtin/packages/py-bigfloat/package.py
@@ -16,6 +16,8 @@ class PyBigfloat(PythonPackage):
version("0.4.0", sha256="58b96bde872aca5989d13d82eba3acf2aa1b94e22117dd72a16ba5911b0c0cb8")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-six", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-billiard/package.py b/var/spack/repos/builtin/packages/py-billiard/package.py
index 3a7802d4e6..1dad47a3c4 100644
--- a/var/spack/repos/builtin/packages/py-billiard/package.py
+++ b/var/spack/repos/builtin/packages/py-billiard/package.py
@@ -13,10 +13,13 @@ class PyBilliard(PythonPackage):
license("BSD-3-Clause")
+ version("4.2.0", sha256="9a3c3184cb275aa17a732f93f65b20c525d3d9f253722d26a82194803ade5a2c")
version("3.6.4.0", sha256="299de5a8da28a783d51b197d496bef4f1595dd023a93a4f59dde1886ae905547")
version("3.6.3.0", sha256="d91725ce6425f33a97dfa72fb6bfef0e47d4652acd98a032bd1a7fbf06d5fa6a")
version("3.6.1.0", sha256="b8809c74f648dfe69b973c8e660bcec00603758c9db8ba89d7719f88d5f01f26")
version("3.6.0.0", sha256="756bf323f250db8bf88462cd042c992ba60d8f5e07fc5636c24ba7d6f4261d84")
version("3.5.0.5", sha256="42d9a227401ac4fba892918bba0a0c409def5435c4b483267ebfe821afaaba0e")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-biobb-common/package.py b/var/spack/repos/builtin/packages/py-biobb-common/package.py
new file mode 100644
index 0000000000..64887f8d97
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-common/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbCommon(PythonPackage):
+ """Biobb_common is the base package required to use the biobb packages"""
+
+ pypi = "biobb_common/biobb_common-4.1.0.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("4.1.0", sha256="97637f359a3bb8ad79aca72b6c26f73fe2424845dc7f43005643971046e9d117")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-biopython", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biobb-gromacs/package.py b/var/spack/repos/builtin/packages/py-biobb-gromacs/package.py
new file mode 100644
index 0000000000..f0fe13caf0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-gromacs/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbGromacs(PythonPackage):
+ """Biobb_gromacs is the Biobb module collection to perform
+ molecular dynamics simulations using the GROMACS MD suite"""
+
+ pypi = "biobb_gromacs/biobb_gromacs-4.1.1.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("4.1.1", sha256="270cce747fc214471527438c8319bda0613be5b76da9f4684e6f138d1927d2f7")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-biobb-common@4.1.0", type=("build", "run"))
+ depends_on("gromacs", type=("run"))
diff --git a/var/spack/repos/builtin/packages/py-biobb-io/package.py b/var/spack/repos/builtin/packages/py-biobb-io/package.py
new file mode 100644
index 0000000000..528c8af9e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-io/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbIo(PythonPackage):
+ """Biobb_io is the Biobb module collection to fetch data to be
+ consumed by the rest of the Biobb building blocks"""
+
+ pypi = "biobb_io/biobb_io-4.1.0.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("4.1.0", sha256="074ea97a3682731e13d559b7f91b04e4a3f0f02ee798503089e4af79a730bf72")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("py-biobb-common@4.1.0", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biobb-model/package.py b/var/spack/repos/builtin/packages/py-biobb-model/package.py
new file mode 100644
index 0000000000..d017da758c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-model/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbModel(PythonPackage):
+ """Biobb_model is the Biobb module collection to check and model 3d structures,
+ create mutations or reconstruct missing atoms"""
+
+ pypi = "biobb_model/biobb_model-4.1.0.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("4.1.0", sha256="616898c26c8196fcf109c97fc03103d1cf5c9cf3eda22bdef5420393cc1906c6")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-biobb-common@4.1.0", type=("build", "run"))
+ depends_on("py-biobb-structure-checking@3.13.4:", type=("build", "run"))
+ depends_on("py-xmltodict", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biobb-structure-checking/package.py b/var/spack/repos/builtin/packages/py-biobb-structure-checking/package.py
new file mode 100644
index 0000000000..e67b4d089e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-structure-checking/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbStructureChecking(PythonPackage):
+ """Biobb_structure_checking provides a series of functions
+ to check the quality of a 3D structure intended to facilitate
+ the setup of a molecular dynamics simulation of protein or nucleic acids systems"""
+
+ pypi = "biobb_structure_checking/biobb_structure_checking-3.14.4.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("3.13.4", sha256="d819819d13c7ad219411b70b043555dcd65d5535f696a1121db562646931f445")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-psutil", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-biopython@1.79:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biobb-structure-utils/package.py b/var/spack/repos/builtin/packages/py-biobb-structure-utils/package.py
new file mode 100644
index 0000000000..aabc475fc0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biobb-structure-utils/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiobbStructureUtils(PythonPackage):
+ """Biobb_structure_utils is the Biobb module collection to modify or extract information
+ from a PDB structure file, such as pulling out a particular model or chain, removing water
+ molecules or ligands, or renumbering or sorting atoms or residues"""
+
+ pypi = "biobb_structure_utils/biobb_structure_utils-4.1.0.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("4.1.0", sha256="07c6268e2f40de595325aaf88839dd180950ba5bd7e51acbf726a9b982fe69cd")
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-biobb-common@4.1.0", type=("build", "run"))
+ depends_on("py-biobb-structure-checking@3.13.4", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py
index fa3cdeefcc..822321ba88 100644
--- a/var/spack/repos/builtin/packages/py-biopython/package.py
+++ b/var/spack/repos/builtin/packages/py-biopython/package.py
@@ -27,10 +27,14 @@ class PyBiopython(PythonPackage):
version("1.70", sha256="4a7c5298f03d1a45523f32bae1fffcff323ea9dce007fb1241af092f5ab2e45b")
version("1.65", sha256="6d591523ba4d07a505978f6e1d7fac57e335d6d62fb5b0bcb8c40bdde5c8998e")
- depends_on("python@2.6:2.7,3.3:", type=("build", "run"), when="@1.63:1.68")
- depends_on("python@2.7,3.3:", type=("build", "run"), when="@1.69")
- depends_on("python@2.7,3.4:", type=("build", "run"), when="@1.70:1.74")
- depends_on("python@2.7,3.5:", type=("build", "run"), when="@1.75:1.76")
+ depends_on("c", type="build") # generated
+
+ depends_on("python@2.6:2.7,3.3:3.9", type=("build", "run"), when="@1.63:1.68")
+ depends_on("python@2.7,3.3:3.9", type=("build", "run"), when="@1.69")
+ depends_on("python@2.7,3.4:3.9", type=("build", "run"), when="@1.70:1.74")
+ depends_on("python@2.7,3.5:3.9", type=("build", "run"), when="@1.75:1.76")
depends_on("python@3.6:", type=("build", "run"), when="@1.77:")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/biopython/biopython/issues/4676
+ depends_on("py-numpy@:1", when="@:1.83", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-biotite/package.py b/var/spack/repos/builtin/packages/py-biotite/package.py
new file mode 100644
index 0000000000..4d78b7c443
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biotite/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiotite(PythonPackage):
+ """Biotite is your Swiss army knife for bioinformatics. \
+ Whether you want to identify homologous sequence regions in a protein family or you would \
+ like to find disulfide bonds in a protein structure: Biotite has the right tool for you. \
+ This package bundles popular tasks in computational molecular biology into a uniform Python \
+ library."""
+
+ homepage = "https://www.biotite-python.org/latest/"
+ pypi = "biotite/biotite-1.0.1.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("1.0.1", sha256="7012158431fd488c26d78d33032550eea1d7af7afd01b48549a7fd239f63dab5")
+
+ depends_on("python@3.10:", type=("build", "run"))
+
+ depends_on("py-hatch-vcs@0.3.0:", type="build")
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch", type="build")
+ depends_on("py-hatch-cython@0.5", type="build")
+ depends_on("py-cython@3.0", type="build")
+
+ depends_on("py-numpy@1.25:", type=("build", "run"))
+ depends_on("py-msgpack@0.5.6:", type=("build", "run"))
+ depends_on("py-biotraj@1:1", type=("build", "run"))
+ depends_on("py-requests@2.12:", type=("build", "run"))
+ depends_on("py-networkx@2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-biotraj/package.py b/var/spack/repos/builtin/packages/py-biotraj/package.py
new file mode 100644
index 0000000000..e6fd921b11
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biotraj/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBiotraj(PythonPackage):
+ """Reading structures from trajectory files."""
+
+ homepage = "https://pypi.org/project/biotraj/"
+ pypi = "biotraj/biotraj-1.1.0.tar.gz"
+
+ license("LGPL-2.1")
+
+ version("1.2.1", sha256="4d7ad33ad940dbcfb3c2bd228a18f33f88e04657786a9562173b58dc2dd05349")
+
+ depends_on("python@3.10:", type=("build", "run"))
+
+ depends_on("py-setuptools@64:", type=("build", "run"))
+
+ depends_on("py-setuptools-scm@8:", type=("build", "run"))
+ depends_on("py-wheel", type=("build", "run"))
+ depends_on("py-cython@3.0:", type=("build", "run"))
+
+ depends_on("py-numpy@1.25:", when="@1.2.1", type=("build", "run"))
+ depends_on("py-scipy@1.13:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-bitarray/package.py b/var/spack/repos/builtin/packages/py-bitarray/package.py
index 47ae50a3dc..0724fb3b49 100644
--- a/var/spack/repos/builtin/packages/py-bitarray/package.py
+++ b/var/spack/repos/builtin/packages/py-bitarray/package.py
@@ -16,4 +16,6 @@ class PyBitarray(PythonPackage):
version("2.6.0", sha256="56d3f16dd807b1c56732a244ce071c135ee973d3edc9929418c1b24c5439a0fd")
version("0.8.1", sha256="7da501356e48a83c61f479393681c1bc4b94e5a34ace7e08cb29e7dd9290ab18")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bitshuffle/package.py b/var/spack/repos/builtin/packages/py-bitshuffle/package.py
index b41636ab2d..357d9bbabe 100644
--- a/var/spack/repos/builtin/packages/py-bitshuffle/package.py
+++ b/var/spack/repos/builtin/packages/py-bitshuffle/package.py
@@ -17,6 +17,8 @@ class PyBitshuffle(PythonPackage):
version("0.4.2", sha256="df7d7dc0add8a37f0c5f4704475db60a3c843171a49aa4e3301d1d7e827b2536")
+ depends_on("c", type="build") # generated
+
depends_on("py-cython@0.19:", type="build")
depends_on("py-setuptools@0.7:", type="build")
depends_on("py-numpy@1.6.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-bitstruct/package.py b/var/spack/repos/builtin/packages/py-bitstruct/package.py
index d009d50c4e..d510b7c766 100644
--- a/var/spack/repos/builtin/packages/py-bitstruct/package.py
+++ b/var/spack/repos/builtin/packages/py-bitstruct/package.py
@@ -20,4 +20,6 @@ class PyBitstruct(PythonPackage):
version("8.17.0", sha256="eb94b40e4218a23aa8f90406b836a9e6ed83e48b8d112ce3f96408463bd1b874")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-black/package.py b/var/spack/repos/builtin/packages/py-black/package.py
index 530ef49573..d68ecc57e6 100644
--- a/var/spack/repos/builtin/packages/py-black/package.py
+++ b/var/spack/repos/builtin/packages/py-black/package.py
@@ -15,10 +15,13 @@ class PyBlack(PythonPackage):
homepage = "https://github.com/psf/black"
pypi = "black/black-22.1.0.tar.gz"
- maintainers("adamjstewart")
-
license("MIT", checked_by="tgamblin")
+ maintainers("spack/spack-releasers")
+ version("24.3.0", sha256="a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f")
+ version("24.2.0", sha256="bce4f25c27c3435e4dace4815bcb2008b87e167e3bf4ee47ccdc5ce906eb4894")
+ version("24.1.1", sha256="48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b")
+ version("24.1.0", sha256="30fbf768cd4f4576598b1db0202413fafea9a227ef808d1a12230c643cefe9fc")
version("23.12.1", sha256="4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5")
version("23.12.0", sha256="330a327b422aca0634ecd115985c1c7fd7bdb5b5a2ef8aa9888a82e2ebe9437a")
version("23.11.0", sha256="4c68855825ff432d197229846f971bc4d6666ce90492e5b02013bcaca4d9ab05")
diff --git a/var/spack/repos/builtin/packages/py-blis/package.py b/var/spack/repos/builtin/packages/py-blis/package.py
index e2a158a11e..46108428b2 100644
--- a/var/spack/repos/builtin/packages/py-blis/package.py
+++ b/var/spack/repos/builtin/packages/py-blis/package.py
@@ -20,6 +20,8 @@ class PyBlis(PythonPackage):
version("0.7.9", sha256="29ef4c25007785a90ffc2f0ab3d3bd3b75cd2d7856a9a482b7d0dac8d511a09d")
version("0.4.1", sha256="d69257d317e86f34a7f230a2fd1f021fd2a1b944137f40d8cdbb23bd334cd0c4")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.25:", when="@0.7.9:", type="build")
depends_on("py-numpy@1.15:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-blosc/package.py b/var/spack/repos/builtin/packages/py-blosc/package.py
index 7d6b26ac6f..ddd2f55732 100644
--- a/var/spack/repos/builtin/packages/py-blosc/package.py
+++ b/var/spack/repos/builtin/packages/py-blosc/package.py
@@ -17,9 +17,12 @@ class PyBlosc(PythonPackage):
version("1.9.1", sha256="ffc884439a12409aa4e8945e21dc920d6bc21807357c51d24c7f0a27ae4f79b9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-scikit-build", type="build")
- depends_on("py-cmake@3.11:", type="build")
- depends_on("py-ninja", type="build")
+ depends_on("cmake@3.11:", type="build")
+ depends_on("ninja", type="build")
# depends_on('c-blosc') # shipped internally
diff --git a/var/spack/repos/builtin/packages/py-blosc2/package.py b/var/spack/repos/builtin/packages/py-blosc2/package.py
index 238a963f36..d8b08dd868 100644
--- a/var/spack/repos/builtin/packages/py-blosc2/package.py
+++ b/var/spack/repos/builtin/packages/py-blosc2/package.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import shlex
+
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -14,19 +17,31 @@ class PyBlosc2(PythonPackage):
license("BSD-3-Clause")
+ version("2.6.2", sha256="8ca29d9aa988b85318bd8a9b707a7a06c8d6604ae1304cae059170437ae4f53a")
version("2.2.8", sha256="59065aac5e9b01b0e9f3825d8e7f69f64b59bbfab148a47c54e4115f62a97474")
version("2.0.0", sha256="f19b0b3674f6c825b490f00d8264b0c540c2cdc11ec7e81178d38b83c57790a1")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("python@3.9:3", when="@2.2:", type=("build", "link", "run"))
depends_on("python@3.8:3", when="@2.0", type=("build", "link", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-scikit-build", type="build")
- depends_on("py-cython", type="build")
- # FIXME: why doesn't this work?
- # depends_on("py-cmake", type="build")
- depends_on("cmake@3.11:", type="build")
- depends_on("py-ninja", type="build")
depends_on("py-numpy@1.20.3:", type=("build", "link", "run"))
depends_on("py-ndindex@1.4:", when="@2.2:", type=("build", "run"))
depends_on("py-msgpack", type=("build", "run"))
depends_on("py-py-cpuinfo", when="@2.2:", type=("build", "run"))
+ depends_on("c-blosc2", type="link")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-scikit-build")
+ depends_on("py-cython")
+ depends_on("cmake@3.11:")
+ depends_on("ninja")
+ depends_on("pkgconfig")
+
+ def setup_build_environment(self, env):
+ cmake_args = [*CMakeBuilder.std_args(self), CMakeBuilder.define("USE_SYSTEM_BLOSC2", True)]
+ # scikit-build does not want a CMAKE_INSTALL_PREFIX
+ cmake_args = [arg for arg in cmake_args if "CMAKE_INSTALL_PREFIX" not in arg]
+ env.set("SKBUILD_CONFIGURE_OPTIONS", " ".join(shlex.quote(arg) for arg in cmake_args))
diff --git a/var/spack/repos/builtin/packages/py-blosum/package.py b/var/spack/repos/builtin/packages/py-blosum/package.py
new file mode 100644
index 0000000000..79d175cec4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-blosum/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBlosum(PythonPackage):
+ """The BLOcks SUbstitution Matrices (BLOSUM) are used to score alignments between protein \
+ sequences and are therefore mainly used in bioinformatics."""
+
+ homepage = "https://github.com/not-a-feature/blosum"
+ pypi = "blosum/blosum-2.0.3.tar.gz"
+
+ license("GPL-3.0", checked_by="ashim-mahara")
+
+ version("2.0.3", sha256="6fee68975c04211fc7c298f58cbf1e5b021ea2879e51456d934238e89ea2ae9b")
+
+ depends_on("py-setuptools@42:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bluepyefe/package.py b/var/spack/repos/builtin/packages/py-bluepyefe/package.py
index 613f85d67c..25d2759c21 100644
--- a/var/spack/repos/builtin/packages/py-bluepyefe/package.py
+++ b/var/spack/repos/builtin/packages/py-bluepyefe/package.py
@@ -12,14 +12,18 @@ class PyBluepyefe(PythonPackage):
pypi = "bluepyefe/bluepyefe-2.2.18.tar.gz"
git = "https://github.com/BlueBrain/BluePyEfe.git"
+ version("2.3.6", sha256="e52117372c41bfa3796e7a340d04b9c4b14f9ebcaacb9d36e947f3d041eb7e35")
version("2.2.18", sha256="bfb50c6482433ec2ffb4b65b072d2778bd89ae50d92dd6830969222aabb30275")
depends_on("py-setuptools", type="build")
- depends_on("py-numpy@:1.23", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
depends_on("py-neo", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-efel", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-h5py", type=("build", "run"))
- depends_on("py-igor", type=("build", "run"))
+ depends_on("py-igor2", type=("build", "run"), when="@2.3.6:")
+
+ depends_on("py-numpy@:1.23", type=("build", "run"), when="@2.2.18")
+ depends_on("py-igor", type=("build", "run"), when="@2.2.18")
diff --git a/var/spack/repos/builtin/packages/py-bluepyemodel/package.py b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py
index f3787ef407..5689b9a1e2 100644
--- a/var/spack/repos/builtin/packages/py-bluepyemodel/package.py
+++ b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py
@@ -14,6 +14,10 @@ class PyBluepyemodel(PythonPackage):
license("Apache-2.0")
+ version("0.0.64", sha256="14fec4f77fb79295ce7cfe1711cd32f66e5d3e0ebc8da9404491ab7f59da1e71")
+ version("0.0.59", sha256="5e8869522d82e719f9775c2d95cfe953cedc66bc44355765a6f406289baf6791")
+ version("0.0.58", sha256="327de9d2c49e7ff83cc77850873293299d4eacf95b3cf33716e5a8501685f08c")
+ version("0.0.57", sha256="0b91e39e5066ab4a996bd932577b49648169e549c5f05bb3f93e345b4b186093")
version("0.0.46", sha256="ad4c125e491f3337fcc341a4f389b8a616d883ce50fd77d9fb0ea6e13be5da61")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/package.py b/var/spack/repos/builtin/packages/py-bluepyopt/package.py
index 826fc265ba..67cfa6b65e 100644
--- a/var/spack/repos/builtin/packages/py-bluepyopt/package.py
+++ b/var/spack/repos/builtin/packages/py-bluepyopt/package.py
@@ -14,6 +14,7 @@ class PyBluepyopt(PythonPackage):
license("LGPL-3.0-only")
# NOTE : while adding new release check pmi_rank.patch compatibility
+ version("1.14.11", sha256="fe2830c36699a93d2ef9ddef316da42f9c57ca6654c92356eab973ee2298ebf7")
version("1.14.4", sha256="7567fd736053250ca06030f67ad93c607b100c2b98df8dc588c26b64cb3e171c")
# patch required to avoid hpe-mpi linked mechanism library
@@ -32,7 +33,8 @@ class PyBluepyopt(PythonPackage):
depends_on("py-future", type=("build", "run"))
depends_on("py-pebble@4.6:", type=("build", "run"))
depends_on("py-scoop@0.7:", type=("build", "run"), when="+scoop")
- depends_on("neuron@7.4:", type=("build", "run"))
+ depends_on("neuron@7.4:", type=("build", "run"), when="@:1.14.4")
+ depends_on("neuron@7.8:", type=("build", "run"), when="@1.14.11:")
def setup_run_environment(self, env):
env.unset("PMI_RANK")
diff --git a/var/spack/repos/builtin/packages/py-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py
index 8f79fb16c9..429dfd8ddf 100644
--- a/var/spack/repos/builtin/packages/py-bokeh/package.py
+++ b/var/spack/repos/builtin/packages/py-bokeh/package.py
@@ -14,6 +14,7 @@ class PyBokeh(PythonPackage):
license("BSD-3-Clause")
+ version("3.5.2", sha256="03a54a67db677b8881834271c620a781b383ae593af5c3ea2149164754440d07")
version("3.3.1", sha256="2a7b3702d7e9f03ef4cd801b02b7380196c70cff2773859bcb84fa565218955c")
version("2.4.3", sha256="ef33801161af379665ab7a34684f2209861e3aefd5c803a21fbbb99d94874b03")
version("2.4.1", sha256="d0410717d743a0ac251e62480e2ea860a7341bdcd1dbe01499a904f233c90512")
@@ -33,6 +34,7 @@ class PyBokeh(PythonPackage):
depends_on("python@3.7:", type=("build", "run"), when="@2.4.0:")
depends_on("python@3.8:", type=("build", "run"), when="@3.0.0:")
depends_on("python@3.9:", type=("build", "run"), when="@3.2.0:")
+ depends_on("python@3.10:", type=("build", "run"), when="@3.5.0:")
depends_on("py-requests@1.2.3:", type=("build", "run"), when="@0.12.2")
depends_on("py-six@1.5.2:", type=("build", "run"), when="@:1.3.4")
@@ -42,10 +44,13 @@ class PyBokeh(PythonPackage):
depends_on("py-jinja2@2.9:", type=("build", "run"), when="@2.3.3:")
depends_on("py-contourpy@1:", type=("build", "run"), when="@3:")
+ depends_on("py-contourpy@1.2:", type=("build", "run"), when="@3.5:")
depends_on("py-numpy@1.7.1:", type=("build", "run"))
depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@2.3.3:")
depends_on("py-numpy@1.16:", type=("build", "run"), when="@3.1:")
+ # https://github.com/bokeh/bokeh/issues/13835
+ depends_on("py-numpy@:1", when="@:3.4.0", type=("build", "run"))
depends_on("py-packaging@16.8:", type=("build", "run"), when="@1.3.4:")
@@ -58,6 +63,7 @@ class PyBokeh(PythonPackage):
depends_on("py-tornado@4.3:", type=("build", "run"))
depends_on("py-tornado@5.1:", type=("build", "run"), when="@2.3.3:")
+ depends_on("py-tornado@6.2:", type=("build", "run"), when="@3.5:")
depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@2.3.3:3.0.0")
depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@2.4.0:3.0.0")
diff --git a/var/spack/repos/builtin/packages/py-boost-histogram/package.py b/var/spack/repos/builtin/packages/py-boost-histogram/package.py
index bd74376041..4dff0fc12e 100644
--- a/var/spack/repos/builtin/packages/py-boost-histogram/package.py
+++ b/var/spack/repos/builtin/packages/py-boost-histogram/package.py
@@ -18,8 +18,12 @@ class PyBoostHistogram(PythonPackage):
version("1.3.1", sha256="31cd396656f3a37834e07d304cdb84d9906bc2172626a3d92fe577d08bcf410f")
version("1.2.1", sha256="a27842b2f1cfecc509382da2b25b03056354696482b38ec3c0220af0fc9b7579")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@45:", type="build")
depends_on("py-setuptools-scm@4.1.2:+toml", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "run"))
+ # https://github.com/numpy/numpy/issues/26191#issuecomment-2179127999
+ depends_on("py-numpy@:1", when="@:1.4.0", type=("build", "run"))
depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-boto3/package.py b/var/spack/repos/builtin/packages/py-boto3/package.py
index 401af84037..8aadc297a1 100644
--- a/var/spack/repos/builtin/packages/py-boto3/package.py
+++ b/var/spack/repos/builtin/packages/py-boto3/package.py
@@ -12,6 +12,8 @@ class PyBoto3(PythonPackage):
homepage = "https://github.com/boto/boto3"
pypi = "boto3/boto3-1.10.44.tar.gz"
+ version("1.34.162", sha256="873f8f5d2f6f85f1018cbb0535b03cceddc7b655b61f66a0a56995238804f41f")
+ version("1.34.44", sha256="86bcf79a56631609a9f8023fe8f53e2869702bdd4c9047c6d9f091eb39c9b0fa")
version("1.26.26", sha256="a2349d436db6f6aa1e0def5501e4884572eb6f008f35063a359a6fa8ba3539b7")
version("1.25.5", sha256="aec7db139429fe0f3fbe723170461192b0483b0070114a4b56351e374e0f294d")
version("1.24.96", sha256="6b8899542cff82becceb3498a2240bf77c96def0515b0a31f7f6a9d5b92e7a3d")
@@ -36,6 +38,8 @@ class PyBoto3(PythonPackage):
depends_on("python@2.6:", when="@1.9:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ depends_on("py-botocore@1.34.162:1.34", when="@1.34.162", type=("build", "run"))
+ depends_on("py-botocore@1.34.44:1.34", when="@1.34.44", type=("build", "run"))
depends_on("py-botocore@1.29.26:1.29", when="@1.26", type=("build", "run"))
depends_on("py-botocore@1.28.5:1.28", when="@1.25", type=("build", "run"))
depends_on("py-botocore@1.27.96:1.27", when="@1.24", type=("build", "run"))
@@ -52,7 +56,12 @@ class PyBoto3(PythonPackage):
depends_on("py-jmespath@0.7.1:0", when="@:1.20", type=("build", "run"))
depends_on("py-jmespath@0.7.1:1", type=("build", "run"))
- depends_on("py-s3transfer@0.6", when="@1.24:", type=("build", "run"))
+ depends_on("py-s3transfer@0.10", when="@1.34.6:", type=("build", "run"))
+ depends_on("py-s3transfer@0.9", when="@1.34:1.34.5", type=("build", "run"))
+ depends_on("py-s3transfer@0.8.2:0.8", when="@1.33.4:1.33", type=("build", "run"))
+ depends_on("py-s3transfer@0.8", when="@1.29.7:1.33.3", type=("build", "run"))
+ depends_on("py-s3transfer@0.7", when="@1.28.55:1.29.6", type=("build", "run"))
+ depends_on("py-s3transfer@0.6", when="@1.24:1.28.54", type=("build", "run"))
depends_on("py-s3transfer@0.5", when="@1.18:1.23", type=("build", "run"))
depends_on("py-s3transfer@0.3", when="@1.17", type=("build", "run"))
depends_on("py-s3transfer@0.2", when="@:1.10", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-botocore/package.py b/var/spack/repos/builtin/packages/py-botocore/package.py
index feca4380de..016692c011 100644
--- a/var/spack/repos/builtin/packages/py-botocore/package.py
+++ b/var/spack/repos/builtin/packages/py-botocore/package.py
@@ -12,6 +12,8 @@ class PyBotocore(PythonPackage):
homepage = "https://github.com/boto/botocore"
pypi = "botocore/botocore-1.13.44.tar.gz"
+ version("1.34.162", sha256="adc23be4fb99ad31961236342b7cbf3c0bfc62532cd02852196032e8c0d682f3")
+ version("1.34.44", sha256="b0f40c54477e8e0a5c43377a927b8959a86bb8824aaef2d28db7c9c367cdefaa")
version("1.31.41", sha256="4dad7c5a5e70940de54ebf8de3955450c1f092f43cacff8103819d1e7d5374fa")
version("1.29.84", sha256="a36f7f6f8eae5dbd4a1cc8cb6fc747f6315500541181eff2093ee0529fc8e4bc")
version("1.29.76", sha256="c2f67b6b3f8acf2968eafca06526f07b9fb0d27bac4c68a635d51abb675134a7")
@@ -45,4 +47,11 @@ class PyBotocore(PythonPackage):
depends_on("py-urllib3@1.20:1.25", type=("build", "run"), when="@:1.14.11")
depends_on("py-urllib3@1.20:1.25", type=("build", "run"), when="@1.14.12:1.18")
depends_on("py-urllib3@1.25.4:1.25", type=("build", "run"), when="@1.19.0:1.19.15")
- depends_on("py-urllib3@1.25.4:1.26", type=("build", "run"), when="@1.19.16:")
+ depends_on("py-urllib3@1.25.4:1.26", type=("build", "run"), when="@1.19.16:1.31.61")
+ depends_on("py-urllib3@1.25.4:1.26", type=("build", "run"), when="@1.31.62: ^python@:3.9")
+ depends_on(
+ "py-urllib3@1.25.4:2.0", type=("build", "run"), when="@1.31.62:1.34.62 ^python@3.10:"
+ )
+ depends_on(
+ "py-urllib3@1.25.4:2.1,2.2.1:2", type=("build", "run"), when="@1.34.63: ^python@3.10:"
+ )
diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py
index 334975f9e1..82599607ff 100644
--- a/var/spack/repos/builtin/packages/py-bottleneck/package.py
+++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py
@@ -22,6 +22,10 @@ class PyBottleneck(PythonPackage):
version("1.2.1", sha256="6efcde5f830aed64feafca0359b51db0e184c72af8ba6675b4a99f263922eb36")
version("1.0.0", sha256="8d9b7ad4fadf9648acc924a6ee522c7cb5b474e75faaad9d90dfd55e2805b495")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-versioneer", when="@1.3.3:", type="build")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/pydata/bottleneck/issues/453
+ depends_on("py-numpy@:1", when="@:1.3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-braceexpand/package.py b/var/spack/repos/builtin/packages/py-braceexpand/package.py
new file mode 100644
index 0000000000..6da0bfbfc7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-braceexpand/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBraceexpand(PythonPackage):
+ """Bash-style brace expansion"""
+
+ homepage = "https://github.com/trendels/braceexpand"
+ url = "https://github.com/trendels/braceexpand/archive/refs/tags/v0.1.7.tar.gz"
+
+ license("MIT")
+
+ version("0.1.7", sha256="72eb91b62b2fa2dd7f6044b7a4b46a3761ac61fe5945a2a86a4538447ab47e05")
+
+ # Requires py-typing with python@:3.4 but Spack's minimum python is higher
+ depends_on("py-setuptools")
+
+ @run_after("install")
+ def copy_test_files(self):
+ cache_extra_test_sources(self, "test_braceexpand.py")
+
+ def test_unittests(self):
+ """run the unit tests"""
+ with working_dir(self.test_suite.current_test_cache_dir):
+ python("test_braceexpand.py")
diff --git a/var/spack/repos/builtin/packages/py-brain-indexer/package.py b/var/spack/repos/builtin/packages/py-brain-indexer/package.py
new file mode 100644
index 0000000000..28381e6f95
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-brain-indexer/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBrainIndexer(PythonPackage):
+ """Spatial indexer for geometries and morphologies"""
+
+ homepage = "https://github.com/BlueBrain/brain-indexer"
+ pypi = "brain-indexer/brain_indexer-3.0.0.tar.gz"
+
+ license("Apache-2.0", checked_by="matz-e")
+
+ maintainers("matz-e")
+
+ version("3.0.0", sha256="23947519df5f87c65781d1776f02e8e17798c40c617399b02e6ecae8e09a0a72")
+
+ variant("mpi", default=True, description="Enable MPI parallelism")
+
+ depends_on("py-scikit-build-core+pyproject@:0.7", type="build")
+ depends_on("py-setuptools-scm@8.0:", type="build")
+ depends_on("cmake@3.5:")
+ depends_on("boost@1.79.0: +filesystem+serialization")
+ depends_on("py-docopt-ng", type=("build", "run"))
+ depends_on("py-libsonata", type=("build", "run"))
+ depends_on("py-morphio", type=("build", "run"))
+ depends_on("py-numpy-quaternion", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+
+ depends_on("mpi", when="+mpi")
+ depends_on("py-mpi4py", type=("build", "run"), when="+mpi")
+
+ def config_settings(self, spec, prefix):
+ return {"cmake.define.CMAKE_INSTALL_RPATH_USE_LINK_PATH": "ON"}
diff --git a/var/spack/repos/builtin/packages/py-branca/package.py b/var/spack/repos/builtin/packages/py-branca/package.py
new file mode 100644
index 0000000000..c4cafd9ee3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-branca/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBranca(PythonPackage):
+ """Generate complex HTML+JS pages with Python."""
+
+ homepage = "https://python-visualization.github.io/branca"
+ pypi = "branca/branca-0.7.1.tar.gz"
+
+ license("MIT")
+
+ version("0.7.1", sha256="e6b6f37a37bc0abffd960c68c045a7fe025d628eff87fedf6ab6ca814812110c")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools@41.2:", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-jinja2@3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-bravado-core/package.py b/var/spack/repos/builtin/packages/py-bravado-core/package.py
new file mode 100644
index 0000000000..ae657c1bef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-bravado-core/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBravadoCore(PythonPackage):
+ """
+ bravado-core is a Python library that adds client-side and server-side
+ support for the OpenAPI Specification v2.0.
+ """
+
+ homepage = "https://github.com/Yelp/bravado-core"
+ pypi = "bravado-core/bravado-core-5.17.1.tar.gz"
+
+ version("5.17.1", sha256="0da9c6f3814734622a55db3f62d08db6e188b25f3ebd087de370c91afb66a7f4")
+
+ depends_on("python@:2,3.5.1:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-jsonref", type=("build", "run"))
+ depends_on("py-jsonschema@2.5.1:", type=("build", "run"))
+ depends_on("py-python-dateutil", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-simplejson", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-swagger-spec-validator@2.0.1:", type=("build", "run"))
+ depends_on("py-pytz", type=("build", "run"))
+ depends_on("py-msgpack@0.5.2:", type=("build", "run"))
+
+ depends_on("py-pyrsistent@0.17:", when="^python@:3.4", type="build")
diff --git a/var/spack/repos/builtin/packages/py-bravado/package.py b/var/spack/repos/builtin/packages/py-bravado/package.py
new file mode 100644
index 0000000000..7dd2494f1b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-bravado/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyBravado(PythonPackage):
+ """
+ Bravado is a Yelp maintained fork of digium/swagger-py for use with
+ OpenAPI Specification version 2.0 (previously known as Swagger).
+ """
+
+ homepage = "https://github.com/Yelp/bravado"
+ pypi = "bravado/bravado-11.0.3.tar.gz"
+
+ version("11.0.3", sha256="1bb6ef75d84140c851fffe6420baaee5037d840070cfe11d60913be6ab8e0530")
+
+ depends_on("python@:2,3.5.1:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-bravado-core@5.16.1:", type=("build", "run"))
+ depends_on("py-msgpack", type=("build", "run"))
+ depends_on("py-python-dateutil", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-requests@2.17:", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-simplejson", type=("build", "run"))
+ depends_on("py-monotonic", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-breathe/package.py b/var/spack/repos/builtin/packages/py-breathe/package.py
index 8bc1fc6db7..2b1b515fdd 100644
--- a/var/spack/repos/builtin/packages/py-breathe/package.py
+++ b/var/spack/repos/builtin/packages/py-breathe/package.py
@@ -30,6 +30,9 @@ class PyBreathe(PythonPackage):
version("4.7.1", sha256="afb1ab0084b25d3670fa8f5cf2eeaee6fe61bfc77876e3816b140eacd4949875")
version("4.7.0", sha256="5629c67f5adb41f39375d36c5f0d60d34b1230be268125e535205d77f69211e4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@3.5:", type=("build", "run"), when="@4.21:4.32")
diff --git a/var/spack/repos/builtin/packages/py-brian/package.py b/var/spack/repos/builtin/packages/py-brian/package.py
index 4b7888e3f5..32bf478f93 100644
--- a/var/spack/repos/builtin/packages/py-brian/package.py
+++ b/var/spack/repos/builtin/packages/py-brian/package.py
@@ -14,6 +14,9 @@ class PyBrian(PythonPackage):
version("1.4.3", sha256="c881dcfcd1a21990f9cb3cca76cdd868111cfd9e227ef5c1b13bb372d2efeaa4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-matplotlib@0.90.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-brian2/package.py b/var/spack/repos/builtin/packages/py-brian2/package.py
index 911377cd8a..b57f9f1795 100644
--- a/var/spack/repos/builtin/packages/py-brian2/package.py
+++ b/var/spack/repos/builtin/packages/py-brian2/package.py
@@ -21,6 +21,9 @@ class PyBrian2(PythonPackage):
version("2.0.1", sha256="195d8ced0d20e9069917776948f92aa70b7457bbc6b5222b8199654402ee1153")
version("2.0rc3", sha256="05f347f5fa6b25d1ce5ec152a2407bbce033599eb6664f32f5331946eb3c7d66")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@2.4:")
depends_on("python@3.7:", type=("build", "run"), when="@2.5:")
diff --git a/var/spack/repos/builtin/packages/py-brotli/package.py b/var/spack/repos/builtin/packages/py-brotli/package.py
index eece9c58da..49c91d980f 100644
--- a/var/spack/repos/builtin/packages/py-brotli/package.py
+++ b/var/spack/repos/builtin/packages/py-brotli/package.py
@@ -16,4 +16,6 @@ class PyBrotli(PythonPackage):
version("1.1.0", sha256="81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-brotlipy/package.py b/var/spack/repos/builtin/packages/py-brotlipy/package.py
index 8cb3c407b3..d526fb37c1 100644
--- a/var/spack/repos/builtin/packages/py-brotlipy/package.py
+++ b/var/spack/repos/builtin/packages/py-brotlipy/package.py
@@ -16,6 +16,8 @@ class PyBrotlipy(PythonPackage):
version("0.7.0", sha256="36def0b859beaf21910157b4c33eb3b06d8ce459c942102f16988cca6ea164df")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cffi@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-bsddb3/package.py b/var/spack/repos/builtin/packages/py-bsddb3/package.py
index 97db040831..d13d3e149e 100644
--- a/var/spack/repos/builtin/packages/py-bsddb3/package.py
+++ b/var/spack/repos/builtin/packages/py-bsddb3/package.py
@@ -18,6 +18,8 @@ class PyBsddb3(PythonPackage):
version("6.2.5", sha256="784bf40ad935258507594a89b32ea11f362cde120751c8b96de163955ced7db8")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:")
depends_on("py-setuptools", type="build")
depends_on("berkeley-db")
diff --git a/var/spack/repos/builtin/packages/py-build/package.py b/var/spack/repos/builtin/packages/py-build/package.py
index 6d67ad3c07..85a738316c 100644
--- a/var/spack/repos/builtin/packages/py-build/package.py
+++ b/var/spack/repos/builtin/packages/py-build/package.py
@@ -14,6 +14,9 @@ class PyBuild(PythonPackage):
license("MIT")
+ version("1.2.1", sha256="526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d")
+ version("1.1.1", sha256="8eea65bb45b1aac2e734ba2cc8dad3a6d97d97901a395bd0ed3e7b46953d2a31")
+ version("1.1.0", sha256="f8da3eebb19668bb338b6eb256b1896ef4e87a5398bbdda97ee29ec474569f16")
version("1.0.3", sha256="538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b")
version("1.0.0", sha256="49a60f212df4d9925727c2118e1cbe3abf30b393eff7d0e7287d2170eb36844d")
version("0.10.0", sha256="d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269")
diff --git a/var/spack/repos/builtin/packages/py-bx-python/package.py b/var/spack/repos/builtin/packages/py-bx-python/package.py
index e37f48f4f7..a96821f349 100644
--- a/var/spack/repos/builtin/packages/py-bx-python/package.py
+++ b/var/spack/repos/builtin/packages/py-bx-python/package.py
@@ -18,6 +18,8 @@ class PyBxPython(PythonPackage):
version("0.9.0", sha256="fe545c44d2ea74b239d41e9090618aaf6a859d1a1f64b4a21b133cb602dfdb49")
version("0.8.8", sha256="ad0808ab19c007e8beebadc31827e0d7560ac0e935f1100fb8cc93607400bb47")
+ depends_on("c", type="build") # generated
+
# See https://pypi.org/project/bx-python/(version)/#files for which Python versions
# work with which releases.
depends_on("python@3.7:3.11", when="@=0.9.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cairosvg/package.py b/var/spack/repos/builtin/packages/py-cairosvg/package.py
new file mode 100644
index 0000000000..7310465482
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cairosvg/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCairosvg(PythonPackage):
+ """
+ CairoSVG is an SVG converter based on Cairo.
+ It can export SVG files to PDF, EPS, PS, and PNG files.
+ """
+
+ homepage = "https://cairosvg.org/"
+ pypi = "CairoSVG/CairoSVG-2.7.1.tar.gz"
+
+ version("2.7.1", sha256="432531d72347291b9a9ebfb6777026b607563fd8719c46ee742db0aef7271ba0")
+
+ depends_on("python@3.5:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-cairocffi", type=("build", "run"))
+ depends_on("py-cssselect2", type=("build", "run"))
+ depends_on("py-defusedxml", type=("build", "run"))
+ depends_on("py-pillow", type=("build", "run"))
+ depends_on("py-tinycss2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-caliper-reader/package.py b/var/spack/repos/builtin/packages/py-caliper-reader/package.py
new file mode 100644
index 0000000000..018736812a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-caliper-reader/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCaliperReader(PythonPackage):
+ """A Python library for reading Caliper .cali files."""
+
+ homepage = "https://github.com/LLNL/Caliper"
+ pypi = "caliper-reader/caliper-reader-0.4.0.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("0.4.0", sha256="00c2c0165a0665dbae58579a1477cb785b3f11350f060e95a6e5ce42f02d5c37")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-carputils/package.py b/var/spack/repos/builtin/packages/py-carputils/package.py
index 9a50582c53..00bfde67ce 100644
--- a/var/spack/repos/builtin/packages/py-carputils/package.py
+++ b/var/spack/repos/builtin/packages/py-carputils/package.py
@@ -19,6 +19,8 @@ class PyCarputils(PythonPackage):
version("master", branch="master")
# Version to use with openCARP releases
+ version("oc16.0", commit="c40783d884de5ad8ae1b5102b68013b28e14cbe4")
+ version("oc15.0", commit="50e2580b3f75711388eb55982a9b43871c3201f3")
version("oc13.0", commit="216c3802c2ac2d14c739164dcd57f2e59aa2ede3")
version("oc12.0", commit="4d7a1f0c604a2ad232e70cf9aa3a8daff5ffb195")
version("oc11.0", commit="a02f9b846c6e852b7315b20e925d55c355f239b8")
@@ -28,6 +30,8 @@ class PyCarputils(PythonPackage):
version("oc8.1", commit="a4210fcb0fe17226a1744ee9629f85b629decba3")
version("oc7.0", commit="4c04db61744f2fb7665594d7c810699c5c55c77c")
+ depends_on("c", type="build") # generated
+
depends_on("git", type=("build", "run"))
depends_on("py-numpy@1.14.5:", type=("build", "run"))
@@ -36,7 +40,7 @@ class PyCarputils(PythonPackage):
depends_on("py-scipy@1.5.0:", type=("build", "run"))
depends_on("py-matplotlib@3.0.0:", type=("build", "run"))
depends_on("py-pandas", type=("build", "run"))
- depends_on("py-tables@3.6.1:", type=("build", "run"))
+ depends_on("py-tables@3.8.0:", type=("build", "run"))
depends_on("py-six@1.12.0:", type=("build", "run"))
depends_on("py-pydoe@0.3.8", type=("build", "run"))
depends_on("py-ruamel-yaml@0.17.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cartopy/package.py b/var/spack/repos/builtin/packages/py-cartopy/package.py
index ef7f72b482..836a28b789 100644
--- a/var/spack/repos/builtin/packages/py-cartopy/package.py
+++ b/var/spack/repos/builtin/packages/py-cartopy/package.py
@@ -10,13 +10,15 @@ class PyCartopy(PythonPackage):
"""Cartopy - a cartographic python library with matplotlib support."""
homepage = "https://scitools.org.uk/cartopy/docs/latest/"
- pypi = "Cartopy/Cartopy-0.20.2.tar.gz"
-
- maintainers("adamjstewart")
+ pypi = "Cartopy/cartopy-0.20.2.tar.gz"
skip_modules = ["cartopy.tests"]
license("LGPL-3.0-or-later")
+ maintainers("adamjstewart")
+ version("0.24.1", sha256="01c910d5634c69a7efdec46e0a17d473d2328767f001d4dc0b5c4b48e585c8bd")
+ version("0.24.0", sha256="e044e0e0fa76bb7afde937bec541743dcbf6b6f23b933a21ebddcd20cfffb755")
+ version("0.23.0", sha256="231f37b35701f2ba31d94959cca75e6da04c2eea3a7f14ce1c75ee3b0eae7676")
version("0.22.0", sha256="b300f90120931d43f11ef87c064ea1dacec1b59a4940aa76ebf82cf09548bb49")
version("0.21.1", sha256="89d5649712c8582231c6e11825a04c85f6f0cee94dbb89e4db23eabca1cc250a")
version("0.21.0", sha256="ce1d3a28a132e94c89ac33769a50f81f65634ab2bd40556317e15bd6cad1ce42")
@@ -31,6 +33,8 @@ class PyCartopy(PythonPackage):
version("0.17.0", sha256="424bd9e9ddef6e48cbdee694ce589ec431be8591f15b6cb93cb2b333a29b2c61")
version("0.16.0", sha256="f23dffa101f43dd91e866a49ebb5f5048be2a24ab8a921a5c07edabde746d9a4")
+ depends_on("cxx", type="build")
+
variant("epsg", default=False, when="@:0.19", description="Add support for epsg.io")
variant(
"ows",
@@ -40,55 +44,77 @@ class PyCartopy(PythonPackage):
variant("plotting", default=False, description="Add plotting functionality")
# Based on wheel availability on PyPI
- depends_on("python@3.9:3.11", when="@0.22:", type=("build", "link", "run"))
- depends_on("python@3.8:3.11", when="@0.21", type=("build", "link", "run"))
- depends_on("python@:3.11", when="@0.20", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@0.19", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@:0.18", type=("build", "link", "run"))
-
- # Required dependencies
- depends_on("py-setuptools@40.6:", when="@0.19:", type="build")
- depends_on("py-setuptools@0.7.2:", type="build")
- depends_on("py-cython@0.29.24:", when="@0.22:", type="build")
- depends_on("py-cython@0.29.13:", when="@0.20:", type="build")
- depends_on("py-cython@0.29.2:", when="@0.19:", type="build")
- depends_on("py-cython@0.28:", when="@0.18:", type="build")
- depends_on("py-cython@0.15.1:", when="@0.17:", type="build")
- depends_on("py-cython", type="build")
- depends_on("py-setuptools-scm@7:", when="@0.20.3:", type="build")
- depends_on("py-setuptools-scm", when="@0.19:", type="build")
- depends_on("py-numpy@1.21:", when="@0.22:", type=("build", "link", "run"))
- depends_on("py-numpy@1.18:", when="@0.20:", type=("build", "link", "run"))
- depends_on("py-numpy@1.13.3:", when="@0.19:", type=("build", "link", "run"))
- depends_on("py-numpy@1.10:", when="@0.17:", type=("build", "link", "run"))
- depends_on("py-numpy@1.6:", type=("build", "link", "run"))
- depends_on("py-matplotlib@3.4:", when="@0.22:", type=("build", "run"))
- depends_on("py-matplotlib@3.1:", when="@0.21", type=("build", "run"))
- # https://github.com/SciTools/cartopy/issues/2086
- depends_on("py-matplotlib@3.1:3.5", when="@0.20", type=("build", "run"))
- depends_on("py-shapely@1.7:", when="@0.22:", type=("build", "run"))
- depends_on("py-shapely@1.6.4:", when="@0.21.1:0.21", type=("build", "run"))
- depends_on("py-shapely@1.6.4:1", when="@0.20:0.21.0", type=("build", "run"))
- depends_on("py-shapely@1.5.6:1", when="@:0.19", type=("build", "run"))
- depends_on("py-packaging@20:", when="@0.22:", type=("build", "run"))
- depends_on("py-pyshp@2.1:", when="@0.20:", type=("build", "run"))
- depends_on("py-pyshp@2:", when="@0.19:", type=("build", "run"))
- depends_on("py-pyshp@1.1.4:", type=("build", "run"))
- depends_on("py-pyproj@3.1:", when="@0.22:", type=("build", "run"))
- depends_on("py-pyproj@3:", when="@0.20:", type=("build", "run"))
-
- with when("+ows"):
- depends_on("py-owslib@0.20:", when="@0.22:", type="run")
- depends_on("py-owslib@0.18:", when="@0.20:", type="run")
- depends_on("py-owslib@0.8.11:", type="run")
- depends_on("pil@6.1:", when="@0.20:", type="run")
- depends_on("pil@1.7.8:", type="run")
-
- with when("+plotting"):
- depends_on("pil@6.1:", when="@0.20:", type="run")
- depends_on("pil@1.7.8:", type="run")
- depends_on("py-scipy@1.3.1:", when="@0.20:", type="run")
- depends_on("py-scipy@0.10:", type="run")
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.10:3.13", when="@0.24.1:")
+ depends_on("python@3.10:3.12", when="@0.24.0")
+ depends_on("python@3.9:3.12", when="@0.23")
+ depends_on("python@3.9:3.11", when="@0.22")
+ depends_on("python@3.8:3.11", when="@0.21")
+ depends_on("python@:3.11", when="@0.20")
+ depends_on("python@:3.10", when="@0.19")
+ depends_on("python@:3.9", when="@:0.18")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@40.6:", when="@0.19:")
+ depends_on("py-setuptools@0.7.2:")
+ depends_on("py-cython@0.29.24:", when="@0.22:")
+ depends_on("py-cython@0.29.13:", when="@0.20:")
+ depends_on("py-cython@0.29.2:", when="@0.19:")
+ depends_on("py-cython@0.28:", when="@0.18:")
+ depends_on("py-cython@0.15.1:", when="@0.17:")
+ depends_on("py-cython")
+ depends_on("py-setuptools-scm@7:", when="@0.20.3:")
+ depends_on("py-setuptools-scm", when="@0.19:")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-numpy@1.23:", when="@0.24:")
+ depends_on("py-numpy@1.21:", when="@0.22:0.23")
+ depends_on("py-numpy@1.18:", when="@0.20:21")
+ depends_on("py-numpy@1.13.3:", when="@0.19")
+ depends_on("py-numpy@1.10:", when="@0.17:0.18")
+ depends_on("py-numpy@1.6:", when="@0.16")
+ # https://github.com/SciTools/cartopy/issues/2339
+ depends_on("py-numpy@:1", when="@:0.22")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-matplotlib@3.6:", when="@0.24:")
+ depends_on("py-matplotlib@3.5:", when="@0.23:")
+ depends_on("py-matplotlib@3.4:", when="@0.22:")
+ depends_on("py-matplotlib@3.1:", when="@0.21")
+ # https://github.com/SciTools/cartopy/issues/2086
+ depends_on("py-matplotlib@3.1:3.5", when="@0.20")
+ depends_on("py-shapely@1.8:", when="@0.24:")
+ depends_on("py-shapely@1.7:", when="@0.22:")
+ depends_on("py-shapely@1.6.4:", when="@0.21.1:0.21")
+ depends_on("py-shapely@1.6.4:1", when="@0.20:0.21.0")
+ depends_on("py-shapely@1.5.6:1", when="@:0.19")
+ depends_on("py-packaging@21:", when="@0.24:")
+ depends_on("py-packaging@20:", when="@0.22:")
+ depends_on("py-pyshp@2.3:", when="@0.23:")
+ depends_on("py-pyshp@2.1:", when="@0.20:")
+ depends_on("py-pyshp@2:", when="@0.19:")
+ depends_on("py-pyshp@1.1.4:")
+ depends_on("py-pyproj@3.3.1:", when="@0.23:")
+ depends_on("py-pyproj@3.1:", when="@0.22:")
+ depends_on("py-pyproj@3:", when="@0.20:")
+
+ with default_args(type="run"):
+ with when("+ows"):
+ depends_on("py-owslib@0.27:", when="@0.24:")
+ depends_on("py-owslib@0.20:", when="@0.22:")
+ depends_on("py-owslib@0.18:", when="@0.20:")
+ depends_on("py-owslib@0.8.11:")
+ depends_on("pil@9.1:", when="@0.24:")
+ depends_on("pil@6.1:", when="@0.20:")
+ depends_on("pil@1.7.8:")
+
+ with when("+plotting"):
+ depends_on("pil@9.1:", when="@0.24:")
+ depends_on("pil@6.1:", when="@0.20:")
+ depends_on("pil@1.7.8:")
+ depends_on("py-scipy@1.9:", when="@0.24:")
+ depends_on("py-scipy@1.3.1:", when="@0.20:")
+ depends_on("py-scipy@0.10:")
# Historical dependencies
depends_on("py-setuptools-scm-git-archive", when="@0.19:0.20.2", type="build")
@@ -111,6 +137,14 @@ class PyCartopy(PythonPackage):
patch("proj6.patch", when="@0.17.0")
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/C/Cartopy/{}-{}.tar.gz"
+ if version >= Version("0.24"):
+ name = "cartopy"
+ else:
+ name = "Cartopy"
+ return url.format(name, version)
+
def setup_build_environment(self, env):
# Needed for `spack install --test=root py-cartopy`
library_dirs = []
diff --git a/var/spack/repos/builtin/packages/py-casadi/package.py b/var/spack/repos/builtin/packages/py-casadi/package.py
index f4f47b771c..0239dd4aca 100644
--- a/var/spack/repos/builtin/packages/py-casadi/package.py
+++ b/var/spack/repos/builtin/packages/py-casadi/package.py
@@ -16,5 +16,9 @@ class PyCasadi(PythonPackage):
version("3.6.4", sha256="affdca1a99c14580992cdf34d247754b7d851080b712c2922ad2e92442eeaa35")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cdsapi/package.py b/var/spack/repos/builtin/packages/py-cdsapi/package.py
index 11e966f27a..cbd979a8ab 100644
--- a/var/spack/repos/builtin/packages/py-cdsapi/package.py
+++ b/var/spack/repos/builtin/packages/py-cdsapi/package.py
@@ -7,13 +7,14 @@ from spack.package import *
class PyCdsapi(PythonPackage):
- """The Climate Data Store Application Program Interface is a service providing programmatic access to CDS data. Get your UID and API key from the CDS portal at the address https://cds.climate.copernicus.eu/user and write it into the configuration file. Look at https://pypi.org/project/cdsapi/ for an example"""
+ """Climate Data Store API."""
homepage = "https://cds.climate.copernicus.eu"
pypi = "cdsapi/cdsapi-0.2.3.tar.gz"
license("Apache-2.0")
+ version("0.6.1", sha256="7d40c58e3fd3e75a8acdcdc81eab4ef9b6f763b2902ba01d7d1738f3652a5a30")
version("0.2.3", sha256="333b31ec263224399635db9b21a2e1a50cd73451f5179f8d967437e7c9161d9b")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-celery/package.py b/var/spack/repos/builtin/packages/py-celery/package.py
index 7cbe513c97..fa0fb1e252 100644
--- a/var/spack/repos/builtin/packages/py-celery/package.py
+++ b/var/spack/repos/builtin/packages/py-celery/package.py
@@ -9,10 +9,11 @@ from spack.package import *
class PyCelery(PythonPackage):
"""Celery - Distributed Task Queue."""
- pypi = "celery/celery-4.2.1.tar.gz"
+ pypi = "celery/celery-5.3.6.tar.gz"
license("BSD-3-Clause")
+ version("5.3.6", sha256="870cc71d737c0200c397290d730344cc991d13a057534353d124c9380267aab9")
version("5.2.3", sha256="e2cd41667ad97d4f6a2f4672d1c6a6ebada194c619253058b5f23704aaadaa82")
version("5.0.0", sha256="313930fddde703d8e37029a304bf91429cd11aeef63c57de6daca9d958e1f255")
version("4.4.7", sha256="d220b13a8ed57c78149acf82c006785356071844afe0b27012a4991d44026f9f")
@@ -53,24 +54,34 @@ class PyCelery(PythonPackage):
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-setuptools@59.1.1:59.6", type=("build", "run"), when="@5.2.3:")
+ depends_on("py-setuptools@59.1.1:59.6", type=("build", "run"), when="@5.2.3:5.2.4")
depends_on("py-redis@3.2.0:", when="+redis", type=("build", "run"))
depends_on("py-redis@3.4.1:3,4.0.2:", when="@5.2.3:+redis", type=("build", "run"))
depends_on("py-sqlalchemy", when="+sqlalchemy", type=("build", "run"))
depends_on("py-click@7.0:7", when="@5.0.0:5.0", type=("build", "run"))
- depends_on("py-click@8.0.3:8", when="@5.2.0:", type=("build", "run"))
+ depends_on("py-click@8.0.3:8", when="@5.2", type=("build", "run"))
+ depends_on("py-click@8.1.2:", when="@5.3:", type=("build", "run"))
depends_on("py-click-didyoumean@0.0.3:", when="@5.0.0:5", type=("build", "run"))
depends_on("py-click-plugins@1.1.1:", when="@5.0.3:", type=("build", "run"))
depends_on("py-click-repl@:0.1.6", when="@5.0.0:5.0", type=("build", "run"))
depends_on("py-click-repl@0.2.0:", when="@5.2.0:", type=("build", "run"))
- depends_on("py-pytz@2019.3:", type=("build", "run"))
- depends_on("py-pytz@2021.3:", type=("build", "run"), when="@5.2.3")
- depends_on("py-billiard@3.6.3.0:3", type=("build", "run"))
- depends_on("py-billiard@3.6.4.0:3", type=("build", "run"), when="@5.2.3")
+ depends_on("py-pytz@2019.3:", type=("build", "run"), when="@:5.2")
+ depends_on("py-pytz@2021.3:", type=("build", "run"), when="@5.2.3:5.2.99")
+ depends_on("py-billiard@3.6.3", type=("build", "run"), when="@:5.0.99")
+ depends_on("py-billiard@3.6.4.0:3.99", type=("build", "run"), when="@5.1.0:5.2")
+ depends_on("py-billiard@4.2.0:5.0", type=("build", "run"), when="@5.3.0:")
depends_on("py-kombu@4.6.11", when="@4.3.0:4", type=("build", "run"))
- depends_on("py-kombu@5.0.0:", when="@5.0.0:5.0", type=("build", "run"))
- depends_on("py-kombu@5.2.3:5", when="@5.2.0:5.2", type=("build", "run"))
+ depends_on("py-kombu@5.0.0:", when="@5.0", type=("build", "run"))
+ depends_on("py-kombu@5.1.0:", when="@5.1", type=("build", "run"))
+ depends_on("py-kombu@5.2.1", when="@5.2.0", type=("build", "run"))
+ depends_on("py-kombu@5.2.2", when="@5.2.1:5.2.2", type=("build", "run"))
+ depends_on("py-kombu@5.2.3", when="@5.2.3:5.2.99", type=("build", "run"))
+ depends_on("py-kombu@5.3.0", when="@5.3.0", type=("build", "run"))
+ depends_on("py-kombu@5.3.1", when="@5.3.1", type=("build", "run"))
+ depends_on("py-kombu@5.3.2", when="@5.3.4", type=("build", "run"))
+ depends_on("py-kombu@5.3.3", when="@5.3.5", type=("build", "run"))
+ depends_on("py-kombu@5.3.4:5.3.5", when="@5.3.6", type=("build", "run"))
depends_on("py-vine@1.3.0", when="@4.3.0:4", type=("build", "run"))
depends_on("py-vine@5.0.0:5", when="@5.0.0:5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cellprofiler-core/package.py b/var/spack/repos/builtin/packages/py-cellprofiler-core/package.py
new file mode 100644
index 0000000000..f7729b8540
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cellprofiler-core/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCellprofilerCore(PythonPackage):
+ """Core classes and components used by CellProfiler."""
+
+ homepage = "https://github.com/CellProfiler/core"
+ pypi = "cellprofiler-core/cellprofiler-core-4.2.6.tar.gz"
+
+ maintainers("omsai")
+
+ license("BSD-3-Clause", checked_by="omsai")
+
+ version("4.2.6", sha256="91993485783bbab87d89a728260f10e57fda3f7335e6057393702cea774db2d7")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-boto3@1.12.28:", type=("build", "run"))
+ depends_on("py-centrosome@1.2.2:", type=("build", "run"))
+ depends_on("py-docutils@0.15.2:", type=("build", "run"))
+ depends_on("py-h5py@3.6:3.7~mpi", type=("build", "run"))
+ depends_on("py-matplotlib@3.1.3:", type=("build", "run"))
+ depends_on("py-numpy@1.18.2:", type=("build", "run"))
+ depends_on("py-prokaryote@2.4.4:", type=("build", "run"))
+ depends_on("py-psutil@5.7:", type=("build", "run"))
+ depends_on("py-python-bioformats@4.0.7:", type=("build", "run"))
+ depends_on("py-python-javabridge@4.0.3:", type=("build", "run"))
+ depends_on("py-pyzmq@22.3:22", type=("build", "run"))
+ depends_on("py-scikit-image@0.18.3:0", type=("build", "run"))
+ depends_on("py-scipy@1.4.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cellprofiler/package.py b/var/spack/repos/builtin/packages/py-cellprofiler/package.py
new file mode 100644
index 0000000000..8c3010cce1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cellprofiler/package.py
@@ -0,0 +1,153 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCellprofiler(PythonPackage):
+ """CellProfiler cell image analysis software.
+
+ CellProfiler is a free open-source software designed to enable biologists
+ without training in computer vision or programming to quantitatively
+ measure phenotypes from thousands of images automatically.
+
+ """
+
+ homepage = "https://cellprofiler.org"
+ pypi = "cellprofiler/CellProfiler-4.2.6.tar.gz"
+ git = "https://github.com/CellProfiler/CellProfiler.git"
+
+ maintainers("omsai")
+
+ license("BSD-3-Clause", checked_by="omsai")
+
+ version("4.2.6", sha256="37e2a35dccff456afda96a4442dff2d23809c8ee271607a347e386aeb4af2628")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-setuptools@64:", type="build")
+ depends_on("py-setuptools-scm@8:", type="build")
+
+ depends_on("py-boto3@1.12.28:", type=("build", "run"))
+ depends_on("py-cellprofiler-core@4.2.6", type=("build", "run"))
+ depends_on("py-centrosome@1.2.2:", type=("build", "run"))
+ depends_on("py-docutils@0.15.2:", type=("build", "run"))
+ # More recent versions of h5py cause:
+ # AttributeError: module 'h5py' has no attribute 'Dataset
+ depends_on("py-h5py@3.6:3.7~mpi", type=("build", "run"))
+ depends_on("py-imageio@2.5:", type=("build", "run"))
+ depends_on("py-inflect@2.1:6", type=("build", "run"))
+ depends_on("py-jinja2@2.11.2:", type=("build", "run"))
+ depends_on("py-joblib@0.13:", type=("build", "run"))
+ depends_on("py-mahotas@1.4:", type=("build", "run"))
+ # matplotlib.cm.get_cmap does not exist in 3.9.0 onwards.
+ depends_on("py-matplotlib@3.1.3:3.8", type=("build", "run"))
+ depends_on("py-mysqlclient@1.4.6", type=("build", "run"))
+ depends_on("py-numpy@1.20.1:", type=("build", "run"))
+ depends_on("py-pillow@7.1:", type=("build", "run"))
+ depends_on("py-prokaryote@2.4.4:", type=("build", "run"))
+ depends_on("py-python-bioformats@4.0.7:", type=("build", "run"))
+ depends_on("py-python-javabridge@4.0.3:", type=("build", "run"))
+ depends_on("py-pyzmq@22.3:22", type=("build", "run"))
+ depends_on("py-sentry-sdk@0.18:", type=("build", "run"))
+ depends_on("py-requests@2.22:", type=("build", "run"))
+ depends_on("py-scikit-image@0.18.3:", type=("build", "run"))
+ depends_on("py-scikit-learn@0.20:0", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-tifffile@:2022.4.21", type=("build", "run"))
+ depends_on("py-wxpython@4.1.0:4", type=("build", "run"))
+
+ depends_on("py-pytest", type=("run", "test"), when="@4.2.6 +tests")
+
+ # Run the post-install tests with `spack test run py-cellprofiler`. We
+ # need the variant to add the pytest executable to the PATH.
+ variant("tests", default=False, description="Post-install tests.")
+
+ # The pypi tests directory is incomplete.
+ resource(
+ name="tests-upstream",
+ destination="",
+ placement={
+ "tests/conftest.py": "tests/conftest.py",
+ "tests/gui": "tests/gui",
+ "tests/__init__.py": "tests/__init__.py",
+ "tests/modules": "tests/modules",
+ "tests/resources": "tests/resources",
+ "tests/test_cellprofiler.py": "tests/test_cellprofiler.py",
+ "tests/test_haralick.py": "tests/test_haralick.py",
+ "tests/test_knime_bridge.py": "tests/test_knime_bridge.py",
+ "tests/test_main.py": "tests/test_main.py",
+ "tests/test_nowx.py": "tests/test_nowx.py",
+ "tests/utilities": "tests/utilities",
+ },
+ git=git,
+ tag="v4.2.6",
+ sha256="5fb562774044d1dc8cffcddf6072d706f71e6649d566980efaab5b30f52ddfa2",
+ when="@4.2.6 +tests",
+ )
+
+ dir_tests = "tests"
+
+ # Leave 'gui' out of 'import_modules' to avoid the curently broken wxpython
+ # dependency.
+ import_modules = [
+ "cellprofiler",
+ "cellprofiler.icons",
+ "cellprofiler.library",
+ "cellprofiler.library.functions",
+ "cellprofiler.library.modules",
+ # "cellprofiler.gui",
+ # "cellprofiler.gui.html",
+ # "cellprofiler.gui.help",
+ # "cellprofiler.gui.module_view",
+ # "cellprofiler.gui.constants",
+ # "cellprofiler.gui.figure",
+ # "cellprofiler.gui.workspace_view",
+ # "cellprofiler.gui.preferences_view",
+ # "cellprofiler.gui.utilities",
+ # "cellprofiler.gui.preferences_dialog",
+ "cellprofiler.modules",
+ "cellprofiler.modules.plugins",
+ "cellprofiler.utilities",
+ ]
+
+ @when("+tests")
+ def patch(self):
+ """Install tests from git."""
+ # Install the tests module. Using a module name like "tests" may
+ # create a namespace collision with other spack packages in the DAG,
+ # but the alternative would moving tests into cellprofiler and
+ # extensively patching the tests to be a submodule of cellprofiler
+ # instead of a standalone module.
+ filter_file(r"find_packages\([^)]+\)", "find_packages()", "setup.py")
+ # Include required test data files.
+ with open("MANIFEST.in", "a") as h:
+ h.writelines("graft tests")
+
+ # For interactive unittest debugging, run:
+ #
+ # spack env create cp
+ # spack env activate cp
+ # spack add cellprofiler+tests ^hdf5~mpi
+ # spack install
+ # git clone --branch v4.2.6 --depth 1 \
+ # https://github.com/cellprofiler/cellprofiler
+ # cd cellprofiler/
+ # pytest --pdb -k "not TestExportToDatabase" tests/
+ #
+ # [...]
+ # 1412 passed, 16 skipped, 75 deselected
+ def test_cellprofiler_no_gui(self):
+ """Test installed package."""
+ pytest = which("pytest")
+ prefix = join_path(python_purelib, self.dir_tests)
+ pytest(
+ "-v",
+ # Don't test against the live MySQL database.
+ "-k",
+ "not TestExportToDatabase",
+ prefix,
+ )
diff --git a/var/spack/repos/builtin/packages/py-centrosome/package.py b/var/spack/repos/builtin/packages/py-centrosome/package.py
new file mode 100644
index 0000000000..f89c66d71f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-centrosome/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCentrosome(PythonPackage):
+ """An open source image processing library."""
+
+ homepage = "https://github.com/CellProfiler/centrosome"
+ pypi = "centrosome/centrosome-1.2.2.tar.gz"
+
+ maintainers("omsai")
+
+ license("BSD-3-Clause", checked_by="omsai")
+
+ version("1.2.2", sha256="4b38181d6648cb8b0e896aa2e54b5a6da2e9ebc19a8110582307f5c6da9d9964")
+
+ depends_on("python@2.7:,3.5:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-deprecation", type=("build", "run"))
+ depends_on("py-matplotlib@3.1.3:", type=("build", "run"))
+ depends_on("py-numpy@1.18.2:", type=("build", "run"))
+ depends_on("py-pillow@7.1:", type=("build", "run"))
+ depends_on("py-scikit-image@0.17.2:", type=("build", "run"))
+ depends_on("py-scipy@1.4.1:1.10", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cf-units/package.py b/var/spack/repos/builtin/packages/py-cf-units/package.py
index 8638fb9480..d303c66f0b 100644
--- a/var/spack/repos/builtin/packages/py-cf-units/package.py
+++ b/var/spack/repos/builtin/packages/py-cf-units/package.py
@@ -21,6 +21,8 @@ class PyCfUnits(PythonPackage):
version("2.1.4", sha256="25f81ad994af30713ee8f5ef18ffddd83c6ec1ac308e1bd89d45de9d2e0f1c31")
version("2.1.1", sha256="fa0ef8efd84546e61088aa23e76ebbaf7043167dc3a7f35f34549c234b543530")
+ depends_on("c", type="build") # generated
+
depends_on("python@3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-six", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cf-xarray/package.py b/var/spack/repos/builtin/packages/py-cf-xarray/package.py
new file mode 100644
index 0000000000..87da7d1104
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cf-xarray/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCfXarray(PythonPackage):
+ """A convenience wrapper for using CF attributes on xarray objects."""
+
+ homepage = "https://cf-xarray.readthedocs.io/"
+ pypi = "cf_xarray/cf_xarray-0.9.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.9.0", sha256="01213bdc5ed4d41eeb5da179d99076f49a905b1995daef2a0c7ec402b148675c")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@45:", type="build")
+ depends_on("py-setuptools-scm@6.2:+toml", type="build")
+ depends_on("py-xarray@2022.03:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py
index 5e840d3c9e..c32e5ccd7c 100644
--- a/var/spack/repos/builtin/packages/py-cffi/package.py
+++ b/var/spack/repos/builtin/packages/py-cffi/package.py
@@ -16,25 +16,56 @@ class PyCffi(PythonPackage):
license("MIT")
+ version("1.17.1", sha256="1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824")
+ version("1.16.0", sha256="bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0")
version("1.15.1", sha256="d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9")
version("1.15.0", sha256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954")
version("1.14.6", sha256="c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd")
version("1.14.3", sha256="f92f789e4f9241cd262ad7a555ca2c648a98178a953af117ef7fad46aa1d5591")
- version("1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226")
- version("1.12.2", sha256="e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7")
- version("1.11.5", sha256="e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4")
- version("1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5")
- version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339")
-
- # ./spack-src/cffi/ffiplatform.py has _hack_at_distutils which imports
- # setuptools before distutils, but only on Windows. This could be made
- # unconditional to support Python 3.12
- depends_on("python@:3.11", type=("build", "run"))
+ with default_args(deprecated=True):
+ version(
+ "1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226"
+ )
+ version(
+ "1.12.2", sha256="e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7"
+ )
+ version(
+ "1.11.5", sha256="e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4"
+ )
+ version(
+ "1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5"
+ )
+ version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339")
+
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.8:", when="@1.16:")
+
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:1.16")
+ depends_on("python@:3.11", when="@:1.15")
+ depends_on("python@:3.10", when="@:1.15.0")
+ depends_on("python@:3.9", when="@:1.14")
+ depends_on("python@:3.8", when="@:1.14.2")
+ depends_on("python@:3.7", when="@:1.12")
+
depends_on("pkgconfig", type="build")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="run", when="^python@3.12:")
+ depends_on("py-setuptools@66.1:", type="build", when="@1.16:")
depends_on("py-pycparser", type=("build", "run"))
depends_on("libffi")
+ # This patch enables allocate write+execute memory for ffi.callback() on macos
+ # https://github.com/conda-forge/cffi-feedstock/pull/47/files
+ patch(
+ "https://raw.githubusercontent.com/conda-forge/cffi-feedstock/refs/heads/main/recipe/0003-apple-api.patch",
+ when="@1.16: platform=darwin",
+ sha256="db836e67e2973ba7d3f4185b385fda49e2398281fc10362e5e413b75fdf93bf0",
+ )
+
def flag_handler(self, name, flags):
if self.spec.satisfies("%clang@13:"):
if name in ["cflags", "cxxflags", "cppflags"]:
diff --git a/var/spack/repos/builtin/packages/py-cfgrib/package.py b/var/spack/repos/builtin/packages/py-cfgrib/package.py
index cbbeba01fd..c091dc3c0a 100644
--- a/var/spack/repos/builtin/packages/py-cfgrib/package.py
+++ b/var/spack/repos/builtin/packages/py-cfgrib/package.py
@@ -15,21 +15,30 @@ class PyCfgrib(PythonPackage):
license("Apache-2.0")
+ version("0.9.14.1", sha256="a6e66e8a3d8f9823d3eef0c2c6ebca602d5bcc324f0baf4f3d13f68b0b40501e")
+ version("0.9.10.4", sha256="b490078192aa13ec89c77296110355521442325866b16a996f4b3cf421542909")
version("0.9.9.0", sha256="6ff0227df9c5ee34aa7d6ab1f7af3fbe6838523a8a9891c74040b419b03ad289")
version("0.9.8.5", sha256="07c224d7ac823a1df5738b96b9d3621515538f51f67e55044f9cc8ec1668e1bd")
# Warning: can create infinite dependency loop with xarray+io ^cfgrib+xarray
variant("xarray", default=False, description="Add xarray support")
- depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-pytest-runner", when="@0.9.8.5", type="build")
depends_on("py-attrs@19.2:", type=("build", "run"))
- depends_on("py-cffi", when="@0.9.8.5", type=("build", "run"))
depends_on("py-click", type=("build", "run"))
+ depends_on("py-eccodes@0.9.8:", when="@0.9.10:", type=("build", "run"))
depends_on("py-eccodes", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
- depends_on("py-xarray@0.12.0:", when="+xarray", type=("build", "run"))
+
+ # 0.9.14.1 enables support for xarray @2024.09.0:
+ # https://github.com/ecmwf/cfgrib/commit/46a79025146b3847e81629748fc3fe16e56097cf
+ depends_on("py-xarray@0.15:", when="@0.9.14.1:+xarray", type=("build", "run"))
+ depends_on("py-xarray@0.15:2024.08.0", when="@0.9.10:0.9.14.0+xarray", type=("build", "run"))
+ depends_on("py-xarray@0.12:2024.08.0", when="@:0.9.14.0+xarray", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-pytest-runner", when="@0.9.8.5", type="build")
+ depends_on("py-cffi", when="@0.9.8.5", type=("build", "run"))
@property
def import_modules(self):
diff --git a/var/spack/repos/builtin/packages/py-cftime/package.py b/var/spack/repos/builtin/packages/py-cftime/package.py
index 7bc37434c1..7c343d92a3 100644
--- a/var/spack/repos/builtin/packages/py-cftime/package.py
+++ b/var/spack/repos/builtin/packages/py-cftime/package.py
@@ -12,7 +12,7 @@ class PyCftime(PythonPackage):
netCDF conventions"""
homepage = "https://unidata.github.io/cftime/"
- url = "https://github.com/Unidata/cftime/archive/v1.0.3.4rel.tar.gz"
+ url = "https://github.com/Unidata/cftime/archive/refs/tags/v1.0.3.4rel.tar.gz"
version("1.0.3.4", sha256="f261ff8c65ceef4799784cd999b256d608c177d4c90b083553aceec3b6c23fd3")
diff --git a/var/spack/repos/builtin/packages/py-chainer/package.py b/var/spack/repos/builtin/packages/py-chainer/package.py
index 1f78c76a30..538a5604f7 100644
--- a/var/spack/repos/builtin/packages/py-chainer/package.py
+++ b/var/spack/repos/builtin/packages/py-chainer/package.py
@@ -31,6 +31,8 @@ class PyChainer(PythonPackage):
version("7.2.0", sha256="6e2fba648cc5b8a5421e494385b76fe5ec154f1028a1c5908557f5d16c04f0b3")
version("6.7.0", sha256="87cb3378a35e7c5c695028ec91d58dc062356bc91412384ea939d71374610389")
+ depends_on("cxx", type="build") # generated
+
variant("mn", default=False, description="run with ChainerMN")
depends_on("python@3.5.1:", when="@7:", type=("build", "run"))
@@ -50,16 +52,16 @@ class PyChainer(PythonPackage):
@run_after("install")
def cache_test_sources(self):
if "+mn" in self.spec:
- self.cache_extra_test_sources("examples")
+ cache_extra_test_sources(self, "examples")
def test_chainermn(self):
"""run the ChainerMN test"""
if "+mn" not in self.spec:
raise SkipTest("Test only supported when built with +mn")
- mnist_file = join_path(self.install_test_root.examples.chainermn.mnist, "train_mnist.py")
+ mnist_file = join_path(install_test_root(self).examples.chainermn.mnist, "train_mnist.py")
mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
- opts = ["-n", "4", self.spec["python"].command.path, mnist_file, "-o", "."]
+ opts = ["-n", "4", python.path, mnist_file, "-o", "."]
env["OMP_NUM_THREADS"] = "4"
mpirun(*opts)
diff --git a/var/spack/repos/builtin/packages/py-chainforgecodegen/package.py b/var/spack/repos/builtin/packages/py-chainforgecodegen/package.py
new file mode 100644
index 0000000000..2734f053d3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-chainforgecodegen/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyChainforgecodegen(PythonPackage):
+ """A code generator that fuses subsequent batched matrix multiplications (GEMMs)
+ into a single GPU kernel, holding intermediate results in shared memory as long as necessary.
+ """
+
+ git = "https://github.com/SeisSol/chainforge.git"
+
+ maintainers("davschneller", "Thomas-Ulrich")
+ license("BSD-3-Clause")
+
+ version("master", branch="master")
+ depends_on("py-numpy")
+ depends_on("py-graphviz", type=("build", "run"))
+ depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-lark", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.spec.prefix)
+ env.prepend_path("PYTHONPATH", self.spec.prefix)
diff --git a/var/spack/repos/builtin/packages/py-charm4py/package.py b/var/spack/repos/builtin/packages/py-charm4py/package.py
index 0dc5d217bf..994f153722 100644
--- a/var/spack/repos/builtin/packages/py-charm4py/package.py
+++ b/var/spack/repos/builtin/packages/py-charm4py/package.py
@@ -36,7 +36,7 @@ class PyCharm4py(PythonPackage):
depends_on("py-setuptools", type="build")
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", type="build")
- depends_on("py-cython", type="build")
+ depends_on("py-cython@:2", type="build")
depends_on("py-cffi@1.7:", type="build")
depends_on("py-numpy@1.10.0:", type=("build", "run"))
depends_on("py-greenlet", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cheap-repr/package.py b/var/spack/repos/builtin/packages/py-cheap-repr/package.py
new file mode 100644
index 0000000000..6b33e9734e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cheap-repr/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCheapRepr(PythonPackage):
+ """This library provides short, fast, configurable string representations,
+ and an easy API for registering your own. It's an improvement of the
+ standard library module reprlib (repr in Python 2)."""
+
+ pypi = "cheap-repr/cheap_repr-0.5.1.tar.gz"
+
+ license("MIT", checked_by="jmlapre")
+
+ version("0.5.1", sha256="31ec63b9d8394aa23d746c8376c8307f75f9fca0b983566b8bcf13cc661fe6dd")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm+toml", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cheetah3/package.py b/var/spack/repos/builtin/packages/py-cheetah3/package.py
index 373ae463f4..2c387534fe 100644
--- a/var/spack/repos/builtin/packages/py-cheetah3/package.py
+++ b/var/spack/repos/builtin/packages/py-cheetah3/package.py
@@ -15,5 +15,7 @@ class PyCheetah3(PythonPackage):
version("3.2.6", sha256="f1c2b693cdcac2ded2823d363f8459ae785261e61c128d68464c8781dba0466b")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-markdown@2.0.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-chemfiles/package.py b/var/spack/repos/builtin/packages/py-chemfiles/package.py
index 5cb22d838e..ee03273c34 100644
--- a/var/spack/repos/builtin/packages/py-chemfiles/package.py
+++ b/var/spack/repos/builtin/packages/py-chemfiles/package.py
@@ -18,11 +18,14 @@ class PyChemfiles(PythonPackage):
version("0.10.3", sha256="4bbb8b116492a57dbf6ddb4c84aad0133cd782e0cc0e53e4b957f2d93e6806ea")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("chemfiles@0.10.3+shared", when="@0.10.3")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-setuptools@44:", type="build")
depends_on("py-wheel@0.36:", type="build")
- depends_on("py-cmake", type="build")
- depends_on("py-ninja", type="build")
+ depends_on("cmake", type="build")
+ depends_on("ninja", type="build")
diff --git a/var/spack/repos/builtin/packages/py-chex/package.py b/var/spack/repos/builtin/packages/py-chex/package.py
index abc993fad1..feef3a4a22 100644
--- a/var/spack/repos/builtin/packages/py-chex/package.py
+++ b/var/spack/repos/builtin/packages/py-chex/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
from spack.package import *
@@ -13,16 +12,32 @@ class PyChex(PythonPackage):
homepage = "https://github.com/deepmind/chex"
pypi = "chex/chex-0.1.0.tar.gz"
+ maintainers("ChristopherChristofi")
+
license("Apache-2.0")
+ version("0.1.86", sha256="e8b0f96330eba4144659e1617c0f7a57b161e8cbb021e55c6d5056c7378091d1")
+ version("0.1.85", sha256="a27cfe87119d6e1fe24ccc1438a59195e6dc1d6e0e10099fcf618c3f64771faf")
version("0.1.5", sha256="686858320f8f220c82a6c7eeb54dcdcaa4f3d7f66690dacd13a24baa1ee8299e")
version("0.1.0", sha256="9e032058f5fed2fc1d5e9bf8e12ece5910cf6a478c12d402b6d30984695f2161")
- depends_on("python@3.7:", type=("build", "run"))
+ # AttributeError: module 'jax.interpreters.pxla' has no attribute 'ShardedDeviceArray'
+ conflicts("^py-jax@0.4.14:", when="@:0.1.5")
+
depends_on("py-setuptools", type="build")
- depends_on("py-absl-py@0.9.0:", type=("build", "run"))
- depends_on("py-dm-tree@0.1.5:", type=("build", "run"))
- depends_on("py-jax@0.1.55:", type=("build", "run"))
- depends_on("py-jaxlib@0.1.37:", type=("build", "run"))
- depends_on("py-numpy@1.18.0:", type=("build", "run"))
- depends_on("py-toolz@0.9.0:", type=("build", "run"))
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:", when="@0.1.85:")
+ depends_on("py-absl-py@0.9:")
+ depends_on("py-dataclasses@0.7:", when="@:0.1.5 ^python@3.6")
+ depends_on("py-jax@0.4.16:", when="@0.1.85:")
+ depends_on("py-jax@0.1.55:")
+ depends_on("py-jaxlib@0.1.37:")
+ depends_on("py-numpy@1.24.1:", when="@0.1.85:")
+ depends_on("py-numpy@1.18.0:")
+ depends_on("py-setuptools", when="@0.1.85: ^python@3.12:")
+ depends_on("py-toolz@0.9:")
+ depends_on("py-typing-extensions@4.2:", when="@0.1.85:")
+
+ # Historical dependencies
+ depends_on("py-dm-tree@0.1.5:", when="@:0.1.5")
diff --git a/var/spack/repos/builtin/packages/py-cig-pythia/package.py b/var/spack/repos/builtin/packages/py-cig-pythia/package.py
new file mode 100644
index 0000000000..7058481de6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cig-pythia/package.py
@@ -0,0 +1,47 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCigPythia(AutotoolsPackage, PythonExtension):
+ """This is the Computational Infrastructure for Geodynamics (CIG) fork of
+ Pythia/Pyre originally written by Michael Aivazis (California Institute of Technology).
+
+ Pythia/Pyre provides a Python framework for scientific simulations. This
+ fork focuses (and maintains) functionality for:
+
+ specification of simulation parameters
+ specification of units and unit conversions
+ user-friendly interface to popular batch job schedulers
+ Python and C++ interfaces for logging"""
+
+ homepage = "https://github.com/geodynamics/pythia/"
+ url = "https://github.com/geodynamics/pythia/releases/download/v1.1.0/pythia-1.1.0.tar.gz"
+
+ license("BSD-3-Clause", checked_by="downloadico")
+
+ version("1.1.0", sha256="d8e941d2d0fa4772c3c0cb3d1d9b6acbb5fa01ef346dc0706a8da541a8f97731")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("mpi", default=True, description="Build with MPI support.")
+
+ depends_on("mpi", when="+mpi")
+ depends_on("python@3.8:")
+ depends_on("py-pip")
+ depends_on("py-setuptools")
+
+ def configure_args(self):
+ spec = self.spec
+ args = []
+ if "+mpi" in spec:
+ args.append("--enable-mpi")
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ else:
+ args.append("--disable-mpi")
+ return args
diff --git a/var/spack/repos/builtin/packages/py-click-option-group/package.py b/var/spack/repos/builtin/packages/py-click-option-group/package.py
new file mode 100644
index 0000000000..b562b34192
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-click-option-group/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyClickOptionGroup(PythonPackage):
+ """click-option-group is a Click-extension package that adds option groups missing in Click."""
+
+ homepage = "https://github.com/click-contrib/click-option-group/"
+
+ pypi = "click-option-group/click-option-group-0.5.6.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("0.5.6", sha256="97d06703873518cc5038509443742b25069a3c7562d1ea72ff08bfadde1ce777")
+ version("0.5.5", sha256="78ee474f07a0ca0ef6c0317bb3ebe79387aafb0c4a1e03b1d8b2b0be1e42fc78")
+ version("0.5.4", sha256="d4b8d808a1998f0f277ebe13c33d64863a5b2a619b1e54f67bc6e3723d91b910")
+ version("0.5.3", sha256="a6e924f3c46b657feb5b72679f7e930f8e5b224b766ab35c91ae4019b4e0615e")
+ version("0.5.2", sha256="743733a0f564438b6b761f49ddf37d845f9a662294ecabe0e832e597208bcf31")
+ version("0.5.1", sha256="764eb49094dc864e28afbf36c6bb140d09ef714a915c0c5972c982113ed70fab")
+ version("0.5.0", sha256="07cc8fec3adfd2cd2af99c2105cefcefa730e0281669753cc9ab6f6515a108d0")
+ version("0.4.0", sha256="7867689533ea52cb3494a2ea02d77c42494583d99746ff1dd24674f6ec208820")
+ version("0.3.0", sha256="36c7f30ef1f3c0d3d378aa8805004d93dec6e97010e4dae4ec66bde4e906c2fa")
+
+ depends_on("python@3.6:3", type=("build", "run"))
+
+ depends_on("py-setuptools", type=("build", "run"))
+
+ depends_on("py-click@7:8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-climate/package.py b/var/spack/repos/builtin/packages/py-climate/package.py
index 37e1f94069..76e69a668a 100644
--- a/var/spack/repos/builtin/packages/py-climate/package.py
+++ b/var/spack/repos/builtin/packages/py-climate/package.py
@@ -14,10 +14,6 @@ class PyClimate(PythonPackage):
license("Apache-2.0")
- version(
- "0.1.0",
- sha256="01026c764b34d8204b8f527a730ef667fa5827fca765993ff1ed3e9dab2c11ae",
- expand=False,
- )
+ version("0.1.0", sha256="01026c764b34d8204b8f527a730ef667fa5827fca765993ff1ed3e9dab2c11ae")
depends_on("python@3.7:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-climax/package.py b/var/spack/repos/builtin/packages/py-climax/package.py
new file mode 100644
index 0000000000..7d6d348327
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-climax/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyClimax(PythonPackage):
+ """ClimaX: A foundation model for weather and climate."""
+
+ homepage = "https://github.com/microsoft/ClimaX"
+ url = "https://github.com/microsoft/ClimaX/archive/refs/tags/v0.3.1.tar.gz"
+ git = "https://github.com/microsoft/ClimaX.git"
+
+ license("MIT")
+
+ version("main", branch="main")
+ version("0.3.1", sha256="1a8ab02fd1083de4340e26889ceea75f9dbc6e56433c731ba616cb46767872fc")
+
+ # pyproject.toml
+ depends_on("py-setuptools", type="build")
+
+ # docker/environment.yml
+ # (only including deps that are actually imported, ignoring version)
+ with default_args(type=("build", "run")):
+ depends_on("py-click")
+ depends_on("py-numpy")
+ depends_on("py-pytorch-lightning")
+ depends_on("py-scipy")
+ depends_on("py-timm")
+ depends_on("py-torch")
+ depends_on("py-torchdata")
+ depends_on("py-tqdm")
+ depends_on("py-xarray")
+ depends_on("py-xesmf")
diff --git a/var/spack/repos/builtin/packages/py-clip-anytorch/package.py b/var/spack/repos/builtin/packages/py-clip-anytorch/package.py
new file mode 100644
index 0000000000..283adbfeea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-clip-anytorch/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyClipAnytorch(PythonPackage):
+ """CLIP (Contrastive Language-Image Pre-Training) is a neural network
+ trained on a variety of (image, text) pairs. It can be instructed in
+ natural language to predict the most relevant text snippet, given an image,
+ without directly optimizing for the task, similarly to the zero-shot
+ capabilities of GPT-2 and 3. We found CLIP matches the performance of the
+ original ResNet50 on ImageNet "zero-shot" without using any of the original
+ 1.28M labeled examples, overcoming several major challenges in computer
+ vision."""
+
+ homepage = "https://github.com/rom1504/CLIP"
+ # PyPI source is missing requirements.txt
+ url = "https://github.com/rom1504/CLIP/archive/refs/tags/2.6.0.tar.gz"
+
+ license("MIT", checked_by="qwertos")
+
+ version("2.6.0", sha256="1ac1f6ca47dfb5d4e55be8f45cc2f3bdf6415b91973a04b4529e812a8ae29bea")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-ftfy", type=("build", "run"))
+ depends_on("py-regex", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-torch", type=("build", "run"))
+ depends_on("py-torchvision", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cloudpickle/package.py b/var/spack/repos/builtin/packages/py-cloudpickle/package.py
index 044f472b7d..5627cbafb9 100644
--- a/var/spack/repos/builtin/packages/py-cloudpickle/package.py
+++ b/var/spack/repos/builtin/packages/py-cloudpickle/package.py
@@ -14,6 +14,8 @@ class PyCloudpickle(PythonPackage):
license("BSD-3-Clause")
+ version("3.0.0", sha256="996d9a482c6fb4f33c1a35335cf8afd065d2a56e973270364840712d9131a882")
+ version("2.2.1", sha256="d89684b8de9e34a2a43b3460fbca07d09d6e25ce858df4d5a44240403b6178f5")
version("2.2.0", sha256="3f4219469c55453cfe4737e564b67c2a149109dabf7f242478948b895f61106f")
version("1.6.0", sha256="9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32")
version("1.2.1", sha256="603244e0f552b72a267d47a7d9b347b27a3430f58a0536037a290e7e0e212ecf")
@@ -22,4 +24,6 @@ class PyCloudpickle(PythonPackage):
depends_on("python@3.5:", type=("build", "run"), when="@1.6.0:")
depends_on("python@3.6:", type=("build", "run"), when="@2.2.0:")
- depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"), when="@3:")
+ depends_on("py-setuptools", type="build", when="@:2")
+ depends_on("py-flit-core", type="build", when="@3:")
diff --git a/var/spack/repos/builtin/packages/py-cmake/package.py b/var/spack/repos/builtin/packages/py-cmake/package.py
index 15311893f2..3d0ec8d761 100644
--- a/var/spack/repos/builtin/packages/py-cmake/package.py
+++ b/var/spack/repos/builtin/packages/py-cmake/package.py
@@ -5,10 +5,19 @@
from spack.package import *
+pycmake_versions = {
+ "3.27.9": "d8a40eef1268c91e5b520b28fd5fe0591d750e48e44276dbfd493a14ee595c41",
+ "3.22.2": "b5bd5eeb488b13cf64ec963800f3d979eaeb90b4382861b86909df503379e219",
+ "3.21.4": "30fa5ed8a5ad66dcd263adb87f3ce3dc2d0ec0ac3958f5becff577e4b62cd065",
+ "3.18.0": "52b98c5ee70b5fa30a8623e96482227e065292f78794eb085fdf0fecb204b79b",
+}
+
class PyCmake(PythonPackage):
"""CMake is an open-source, cross-platform family of tools designed to
- build, test and package software
+ build, test and package software.
+
+ Deprecated: use cmake instead.
"""
homepage = "https://cmake.org"
@@ -17,24 +26,24 @@ class PyCmake(PythonPackage):
license("Apache-2.0")
- version("3.22.2", sha256="b5bd5eeb488b13cf64ec963800f3d979eaeb90b4382861b86909df503379e219")
- version("3.21.4", sha256="30fa5ed8a5ad66dcd263adb87f3ce3dc2d0ec0ac3958f5becff577e4b62cd065")
- version("3.18.0", sha256="52b98c5ee70b5fa30a8623e96482227e065292f78794eb085fdf0fecb204b79b")
+ for v, sha in pycmake_versions.items():
+ version(v, sha256=sha, deprecated=True)
depends_on("ninja", type="build")
depends_on("py-scikit-build@0.12:", type="build")
depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm+toml", when="@3.27.9:", type="build")
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", type="build")
depends_on("git", type="build")
- depends_on("cmake@3.22.2", type=("build", "link", "run"), when="@3.22.2")
- depends_on("cmake@3.21.4", type=("build", "link", "run"), when="@3.21.4")
- depends_on("cmake@3.18.0", type=("build", "link", "run"), when="@3.18.0")
+
+ for v in pycmake_versions.keys():
+ depends_on(f"cmake@{v}", type=("build", "link", "run"), when=f"@{v}")
# see:
# https://github.com/scikit-build/cmake-python-distributions/issues/227
# https://github.com/spack/spack/pull/28760#issuecomment-1029362288
- for v in ["3.22.2", "3.21.4", "3.18.0"]:
+ for v in pycmake_versions.keys():
resource(
name="cmake-src",
git="https://gitlab.kitware.com/cmake/cmake.git",
@@ -46,3 +55,16 @@ class PyCmake(PythonPackage):
def install_options(self, spec, prefix):
return ["-DBUILD_CMAKE_FROM_SOURCE=ON", "-DCMakeProject_SOURCE_DIR=cmake-src"]
+
+ def setup_build_environment(self, env):
+ if self.run_tests:
+ env.set(
+ "SKBUILD_CONFIGURE_OPTIONS",
+ # BootstrapTest is already exlcude upstream,
+ # The rest are (non-understood) known failures, disabled to get test suite working
+ # todo: investigate test failures / check if still needed in newer versions
+ "-DRUN_CMAKE_TEST=ON -DRUN_CMAKE_TEST_EXCLUDE=BootstrapTest|CompileWarningAsError"
+ "|GET_RUNTIME_DEPENDENCIES",
+ )
+ else:
+ env.set("SKBUILD_CONFIGURE_OPTIONS", "-DRUN_CMAKE_TEST=OFF")
diff --git a/var/spack/repos/builtin/packages/py-cmocean/package.py b/var/spack/repos/builtin/packages/py-cmocean/package.py
index c8b235ebbf..2d20f5d1dc 100644
--- a/var/spack/repos/builtin/packages/py-cmocean/package.py
+++ b/var/spack/repos/builtin/packages/py-cmocean/package.py
@@ -15,6 +15,7 @@ class PyCmocean(PythonPackage):
license("MIT")
+ version("4.0.3", sha256="37868399fb5f41b4eac596e69803f9bfaea49946514dfb2e7f48886854250d7c")
version("3.0.3", sha256="abaf99383c1a60f52970c86052ae6c14eafa84fc16984488040283c02db77c0b")
version("2.0", sha256="13eea3c8994d8e303e32a2db0b3e686f6edfb41cb21e7b0e663c2b17eea9b03a")
@@ -23,3 +24,6 @@ class PyCmocean(PythonPackage):
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-packaging", when="@3:", type=("build", "run"))
+
+ # https://github.com/matplotlib/cmocean/pull/99
+ conflicts("^py-numpy@2:", when="@:3.0")
diff --git a/var/spack/repos/builtin/packages/py-coca-pytorch/package.py b/var/spack/repos/builtin/packages/py-coca-pytorch/package.py
new file mode 100644
index 0000000000..e759919fd6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-coca-pytorch/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCocaPytorch(PythonPackage):
+ """CoCa, Contrastive Captioners are Image-Text Foundation Models -
+ Pytorch"""
+
+ homepage = "https://github.com/lucidrains/CoCa-pytorch"
+ pypi = "CoCa-pytorch/CoCa-pytorch-0.1.0.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("0.1.0", sha256="119c83812d140ad197cf4e992db8c373d908af0bffd0a87015546b6a1cf0a316")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-einops@0.4:", type=("build", "run"))
+ depends_on("py-torch@1.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-codepy/package.py b/var/spack/repos/builtin/packages/py-codepy/package.py
index 342c3ce52a..542ebb2ed6 100644
--- a/var/spack/repos/builtin/packages/py-codepy/package.py
+++ b/var/spack/repos/builtin/packages/py-codepy/package.py
@@ -21,6 +21,8 @@ class PyCodepy(PythonPackage):
version("2019.1", sha256="384f22c37fe987c0ca71951690c3c2fd14dacdeddbeb0fde4fd01cd84859c94e")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-pytools@2015.1.2:", type=("build", "run"))
depends_on("py-numpy@1.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-codespell/package.py b/var/spack/repos/builtin/packages/py-codespell/package.py
new file mode 100644
index 0000000000..fae9709c4c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-codespell/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCodespell(PythonPackage):
+ """check code for common misspellings"""
+
+ homepage = "https://github.com/codespell-project/codespell"
+ pypi = "codespell/codespell-2.2.6.tar.gz"
+
+ license("GPL-2.0", checked_by="cmelone")
+
+ version("2.3.0", sha256="360c7d10f75e65f67bad720af7007e1060a5d395670ec11a7ed1fed9dd17471f")
+ version("2.2.6", sha256="a8c65d8eb3faa03deabab6b3bbe798bea72e1799c7e9e955d57eca4096abcff9")
+
+ depends_on("py-setuptools@64.0:", type="build")
+ depends_on("py-setuptools-scm@6.2: +toml", type="build")
+ conflicts("^py-setuptools-scm@8.0.0")
diff --git a/var/spack/repos/builtin/packages/py-colabtools/package.py b/var/spack/repos/builtin/packages/py-colabtools/package.py
new file mode 100644
index 0000000000..6d6d362111
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-colabtools/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyColabtools(PythonPackage):
+ """Tools to work with colab from google."""
+
+ homepage = "https://github.com/zuuuhkrit/colabtools"
+ pypi = "colabtools/colabtools-0.0.1.tar.gz"
+
+ license("LGPL-3.0-only")
+
+ version("0.0.1", sha256="b6f7c0050e5924f4ad7e4762d46be663e21d417a39fc4adf6c6c90e8d9be47ec")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-colored/package.py b/var/spack/repos/builtin/packages/py-colored/package.py
index e94f5d857d..4e8d1fe034 100644
--- a/var/spack/repos/builtin/packages/py-colored/package.py
+++ b/var/spack/repos/builtin/packages/py-colored/package.py
@@ -17,6 +17,8 @@ class PyColored(PythonPackage):
homepage = "https://gitlab.com/dslackw/colored"
pypi = "colored/colored-1.4.2.tar.gz"
+ version("2.2.4", sha256="595e1dd7f3b472ea5f12af21d2fec8a2ea2cf8f9d93e67180197330b26df9b61")
version("1.4.2", sha256="056fac09d9e39b34296e7618897ed1b8c274f98423770c2980d829fd670955ed")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="build", when="@1.4.2")
+ depends_on("py-flit-core@3.2.0:3", type="build", when="@2.2.4:")
diff --git a/var/spack/repos/builtin/packages/py-colorlog/package.py b/var/spack/repos/builtin/packages/py-colorlog/package.py
index 8c8810dd26..c9c85097a0 100644
--- a/var/spack/repos/builtin/packages/py-colorlog/package.py
+++ b/var/spack/repos/builtin/packages/py-colorlog/package.py
@@ -12,7 +12,9 @@ class PyColorlog(PythonPackage):
homepage = "https://github.com/borntyping/python-colorlog"
pypi = "colorlog/colorlog-4.0.2.tar.gz"
+ version("6.8.2", sha256="3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44")
version("4.0.2", sha256="3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42")
version("3.1.4", sha256="418db638c9577f37f0fae4914074f395847a728158a011be2a193ac491b9779d")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@38.6.0:", when="@6.8.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-conda-inject/package.py b/var/spack/repos/builtin/packages/py-conda-inject/package.py
new file mode 100644
index 0000000000..c8930df701
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-conda-inject/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCondaInject(PythonPackage):
+ """Helper functions for injecting a conda environment into the current python environment."""
+
+ pypi = "conda_inject/conda_inject-1.3.1.tar.gz"
+
+ license("MIT")
+
+ version("1.3.1", sha256="9e8d902230261beba74083aae12c2c5a395e29b408469fefadc8aaf51ee441e5")
+
+ depends_on("py-pyyaml@6", type=("build", "run"))
+
+ depends_on("python@3.9:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-configargparse/package.py b/var/spack/repos/builtin/packages/py-configargparse/package.py
index 59925f8305..63069c1b65 100644
--- a/var/spack/repos/builtin/packages/py-configargparse/package.py
+++ b/var/spack/repos/builtin/packages/py-configargparse/package.py
@@ -18,11 +18,13 @@ class PyConfigargparse(PythonPackage):
features."""
homepage = "https://github.com/bw2/ConfigArgParse"
- url = "https://github.com/bw2/ConfigArgParse/archive/1.2.3.tar.gz"
+ url = "https://github.com/bw2/ConfigArgParse/archive/1.7.tar.gz"
license("MIT")
+ version("1.7", sha256="4549d105790386d01f71beebc3aa457d4177315680b75415f05bc22e1e28183a")
+ version("1.5.7", sha256="2156f15ef4ccce4377427046789ce93e0b09ac425c7297f1c9572655bf11bdfe")
+ version("1.5.5", sha256="5b8316f11985aa169e51126086d3d6d24d7ba976585266311491015ddffbd717")
version("1.2.3", sha256="0f1144a204e3b896d6ac900e151c1d13bde3103d6b7d541e3bb57514a94083bf")
- depends_on("python@2.2:2,3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-configspace/package.py b/var/spack/repos/builtin/packages/py-configspace/package.py
index e02780b25c..78d56f17ad 100644
--- a/var/spack/repos/builtin/packages/py-configspace/package.py
+++ b/var/spack/repos/builtin/packages/py-configspace/package.py
@@ -10,17 +10,47 @@ class PyConfigspace(PythonPackage):
"""Creation and manipulation of parameter configuration spaces for
automated algorithm configuration and hyperparameter tuning."""
- maintainers("Kerilk")
+ maintainers("Kerilk", "mdorier")
- homepage = "https://automl.github.io/ConfigSpace/master/"
- pypi = "ConfigSpace/ConfigSpace-0.4.20.tar.gz"
+ homepage = "https://automl.github.io/ConfigSpace/latest/"
+ pypi = "configspace/configspace-1.0.0.tar.gz"
license("BSD-3-Clause")
+ version("main", git="https://github.com/automl/ConfigSpace.git", branch="main")
+ version("1.1.4", sha256="afd625a9bcf4c01efa06114ce9dcc718cf9cba68910b602849b1c59654415762")
+ version("1.1.3", sha256="8b77e77bd1c286a57e35da87552e33052f6793ddbcc696a9fc62425f60739ac2")
+ version("1.1.2", sha256="8cd77438f976ce65ce2d056fbd659d12ca1425fe230b737942261879b7c542f0")
+ version("1.1.1", sha256="450e5dccb52ffc56ec5ade131eaa95207412e1fa44883d611e024fc185a54bf0")
+ version("1.1.0", sha256="84f20d2b78365a33820558749975667e9bb81d8fb283fcf2ef5bae6052745481")
+ version("1.0.1", sha256="ffaf2c02db1df47589d5501178827e945d3f953f2812e7e44a9c3029ea13a543")
+ version("1.0.0", sha256="cc55ac8a550c86bee7853417f1eda22d46185fb911b5875754619735966e2736")
+ version("0.7.1", sha256="57b5b8e28ed6ee14ecf6206fdca43ca698ef63bc1531f081d482b26acf4edf1a")
+ version("0.6.1", sha256="b0a9487c7997481a041feee46f2c8fc9fb9787e1ff553250838d62624dfb0d5a")
+ version("0.6.0", sha256="9b6c95d8839fcab220372673214b3129b45dcd8b1179829eb2c65746cacb72a9")
+ version("0.5.0", sha256="c8b61fe119829c29c47fc8719bb5f5740ae3034c793040f7bff67dbc9eb9c754")
+ version("0.4.21", sha256="09c5ee343f2850865609cc91f2ab27da0a6182f7f196354f9550f6da578ea827")
version("0.4.20", sha256="2e4ca06f5a6a61e5322a73dd7545468c79f2a3e8385cab92fdada317af41d9e9")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
- depends_on("py-cython", type="build")
+ depends_on("py-cython@:0.29.36", type="build", when="@:0.9.9")
depends_on("py-pyparsing", type=("build", "run"))
+ depends_on("py-scipy", when="@0.4.21:")
+ depends_on("py-typing-extensions", when="@0.6.0:")
+ depends_on("py-more-itertools", when="@0.6.1:")
+
+ def url_for_version(self, version):
+ new_url = (
+ "https://files.pythonhosted.org/packages/source/c/configspace/configspace-{0}.tar.gz"
+ )
+ old_url = (
+ "https://files.pythonhosted.org/packages/source/C/ConfigSpace/ConfigSpace-{0}.tar.gz"
+ )
+ if version >= Version("1.0.0"):
+ return new_url.format(version)
+ else:
+ return old_url.format(version)
diff --git a/var/spack/repos/builtin/packages/py-constantly/package.py b/var/spack/repos/builtin/packages/py-constantly/package.py
index b569b52434..4e6216ee5a 100644
--- a/var/spack/repos/builtin/packages/py-constantly/package.py
+++ b/var/spack/repos/builtin/packages/py-constantly/package.py
@@ -14,6 +14,8 @@ class PyConstantly(PythonPackage):
license("MIT")
+ version("23.10.4", sha256="aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd")
version("15.1.0", sha256="586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35")
depends_on("py-setuptools", type="build")
+ depends_on("py-versioneer+toml@0.29", type="build", when="@23.10.4:")
diff --git a/var/spack/repos/builtin/packages/py-contourpy/package.py b/var/spack/repos/builtin/packages/py-contourpy/package.py
index 9d13c9957a..b51d9b9cbf 100644
--- a/var/spack/repos/builtin/packages/py-contourpy/package.py
+++ b/var/spack/repos/builtin/packages/py-contourpy/package.py
@@ -14,13 +14,33 @@ class PyContourpy(PythonPackage):
license("BSD-3-Clause")
+ version("1.3.0", sha256="7ffa0db17717a8ffb127efd0c95a4362d996b892c2904db72428d5b52e1938a4")
version("1.0.7", sha256="d8165a088d31798b59e91117d1f5fc3df8168d8b48c4acc10fc0df0d0bdbcc5e")
version("1.0.5", sha256="896631cd40222aef3697e4e51177d14c3709fda49d30983269d584f034acc8a4")
- depends_on("python@3.8:", when="@1.0.7:", type=("build", "link", "run"))
- depends_on("python@3.7:", type=("build", "link", "run"))
- depends_on("py-pybind11@2.6:", type=("build", "link"))
- depends_on("py-setuptools@42:", type="build")
- depends_on("py-numpy@1.16:", type=("build", "run"))
+ depends_on("py-pybind11", type=("build", "link"))
+ depends_on("cxx", type="build")
- depends_on("py-build", when="@:1.0.5", type="build")
+ with default_args(type="build"):
+ depends_on("meson@1.2:")
+ depends_on("py-meson-python@0.13.1:")
+ with default_args(type=("build", "link")):
+ depends_on("py-pybind11@2.13.1:", when="@1.3:")
+ depends_on("py-pybind11@2.6:")
+
+ # Historical dependencies
+ depends_on("py-setuptools@42:", when="@:1.0")
+ depends_on("py-build", when="@:1.0.5")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.9:", when="@1.3:")
+ depends_on("python@3.8:", when="@1.0.7:")
+ depends_on("python@3.7:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy@1.23:", when="@1.3:")
+ depends_on("py-numpy@1.16:")
+
+ # https://github.com/numpy/numpy/issues/26191
+ conflicts("py-numpy@2:", when="@:1.2.0")
+ conflicts("py-pybind11@2.13.3")
diff --git a/var/spack/repos/builtin/packages/py-cookiecutter/package.py b/var/spack/repos/builtin/packages/py-cookiecutter/package.py
index 75e0d3e29d..5278444389 100644
--- a/var/spack/repos/builtin/packages/py-cookiecutter/package.py
+++ b/var/spack/repos/builtin/packages/py-cookiecutter/package.py
@@ -16,14 +16,32 @@ class PyCookiecutter(PythonPackage):
license("BSD-3-Clause")
- version("1.6.0", sha256="0c9018699b556b83d7c37b27fe0cc17485b90b6e1f47365b3cdddf77f6ca9d36")
+ version("2.6.0", sha256="da014a94d85c1b1be14be214662982c8c90d860834cbf9ddb2391a37ad7d08be")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-24065
+ version("1.7.3", sha256="5c16f9e33875f49bb091ef836b71ced63372aadc49799d78315db1d91d17d76d")
+ version("1.6.0", sha256="0c9018699b556b83d7c37b27fe0cc17485b90b6e1f47365b3cdddf77f6ca9d36")
depends_on("py-setuptools", type="build")
- depends_on("py-future@0.15.2:", type=("build", "run"))
depends_on("py-binaryornot@0.2.0:", type=("build", "run"))
- depends_on("py-jinja2@2.7:", type=("build", "run"))
+ depends_on("py-binaryornot@0.4.4:", type=("build", "run"), when="@1.7.1:")
+ depends_on("py-jinja2@2.7:3", type=("build", "run"))
depends_on("py-click@5.0:", type=("build", "run"))
- depends_on("py-whichcraft@0.4.0:", type=("build", "run"))
- depends_on("py-poyo@0.1.0:", type=("build", "run"))
- depends_on("py-jinja2-time@0.1.0:", type=("build", "run"))
+ depends_on("py-click@7.0:", type=("build", "run"), when="@1.7:")
+ depends_on("py-click@:7", type=("build", "run"), when="@:2.0")
+ depends_on("py-click@:8", type=("build", "run"), when="@2.1:")
+ depends_on("py-pyyaml@5.3.1:", type=("build", "run"), when="@2:")
+ depends_on("py-python-slugify@4:", type=("build", "run"), when="@1.7.1:")
depends_on("py-requests@2.18.0:", type=("build", "run"))
+ depends_on("py-requests@2.23.0:", type=("build", "run"), when="@1.7.1:")
+ depends_on("py-arrow", type=("build", "run"), when="@2.2:")
+ depends_on("py-rich", type=("build", "run"), when="@2.3:")
+
+ # Historical dependencies
+ depends_on("py-future@0.15.2:", type=("build", "run"), when="@:1.7.0")
+ depends_on("py-whichcraft@0.4.0:", type=("build", "run"), when="@:1")
+ depends_on("py-poyo@0.1.0:", type=("build", "run"), when="@:1")
+ depends_on("py-poyo@0.5.0:", type=("build", "run"), when="@1.7.1:1")
+ depends_on("py-jinja2-time@0.1.0:", type=("build", "run"), when="@:2.1")
+ depends_on("py-jinja2-time@0.2.0:", type=("build", "run"), when="@1.7.1:2.1")
+ depends_on("py-six@1.10:", type=("build", "run"), when="@1.7.2:1")
diff --git a/var/spack/repos/builtin/packages/py-correctionlib/package.py b/var/spack/repos/builtin/packages/py-correctionlib/package.py
index 677e75fa88..8757d244b0 100644
--- a/var/spack/repos/builtin/packages/py-correctionlib/package.py
+++ b/var/spack/repos/builtin/packages/py-correctionlib/package.py
@@ -17,6 +17,8 @@ class PyCorrectionlib(PythonPackage):
version("2.1.0", sha256="edf79644dc1d9d94f12b4b45366331e5da3f1e21d4cbcd3bb8b0d4b1421b0c44")
version("2.0.0", sha256="e4d240cbdb2633a8955ddcd02d5b9bfb33d7e1a33554d6f7957f2dec56988a67")
+ depends_on("cxx", type="build") # generated
+
variant(
"convert",
default=False,
@@ -27,7 +29,7 @@ class PyCorrectionlib(PythonPackage):
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
depends_on("py-scikit-build", type="build")
- depends_on("py-cmake@3.11:", type="build")
+ depends_on("cmake@3.11:", type="build")
depends_on("py-make", type="build")
depends_on("py-pybind11@2.6.1:", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-coverage/package.py b/var/spack/repos/builtin/packages/py-coverage/package.py
index 19d7d28d83..4a3995bf01 100644
--- a/var/spack/repos/builtin/packages/py-coverage/package.py
+++ b/var/spack/repos/builtin/packages/py-coverage/package.py
@@ -26,6 +26,8 @@ class PyCoverage(PythonPackage):
version("4.3.4", sha256="eaaefe0f6aa33de5a65f48dd0040d7fe08cac9ac6c35a56d0a7db109c3e733df")
version("4.0a6", sha256="85c7f3efceb3724ab066a3fcccc05b9b89afcaefa5b669a7e2222d31eac4728d")
+ depends_on("c", type="build") # generated
+
variant("toml", default=False, description="Enable pyproject.toml support")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-crcmod/package.py b/var/spack/repos/builtin/packages/py-crcmod/package.py
index 77b755b192..df6441df33 100644
--- a/var/spack/repos/builtin/packages/py-crcmod/package.py
+++ b/var/spack/repos/builtin/packages/py-crcmod/package.py
@@ -10,7 +10,7 @@ class PyCrcmod(PythonPackage):
"""Python module for generating objects that
compute the Cyclic Redundancy Check (CRC)"""
- homepage = "http://crcmod.sourceforge.net/"
+ homepage = "https://crcmod.sourceforge.net/"
pypi = "crcmod/crcmod-1.7.tar.gz"
license("MIT")
@@ -18,5 +18,7 @@ class PyCrcmod(PythonPackage):
version("1.7", sha256="dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e")
version("1.6", sha256="56d27d035ea029c6ed96779ca042c0136d39d106e3c30baa6422738c7d86aaa5")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.4:2.7,3.1:", type=("build", "run"))
depends_on("py-setuptools@40.0.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-croniter/package.py b/var/spack/repos/builtin/packages/py-croniter/package.py
index f0763e4ab7..29eecc2c6d 100644
--- a/var/spack/repos/builtin/packages/py-croniter/package.py
+++ b/var/spack/repos/builtin/packages/py-croniter/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyCroniter(PythonPackage):
"""croniter provides iteration for datetime object with cron like format."""
- homepage = "http://github.com/kiorky/croniter"
+ homepage = "https://github.com/kiorky/croniter"
pypi = "croniter/croniter-1.3.8.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-crossmap/package.py b/var/spack/repos/builtin/packages/py-crossmap/package.py
index b109d34989..dfa5814200 100644
--- a/var/spack/repos/builtin/packages/py-crossmap/package.py
+++ b/var/spack/repos/builtin/packages/py-crossmap/package.py
@@ -10,7 +10,7 @@ class PyCrossmap(PythonPackage, SourceforgePackage):
"""CrossMap is a program for convenient conversion of genome coordinates
(or annotation files) between different assemblies"""
- homepage = "http://crossmap.sourceforge.net/"
+ homepage = "https://crossmap.sourceforge.net/"
sourceforge_mirror_path = "crossmap/CrossMap-0.3.3.tar.gz"
version("0.3.9", sha256="e20a4653e9fc313ac0f5a6cfc37b42e83c3cf2b42f9483706cfb9ec9ff72c74c")
diff --git a/var/spack/repos/builtin/packages/py-cryptography/package.py b/var/spack/repos/builtin/packages/py-cryptography/package.py
index 84d63a84cc..5049fbf3e1 100644
--- a/var/spack/repos/builtin/packages/py-cryptography/package.py
+++ b/var/spack/repos/builtin/packages/py-cryptography/package.py
@@ -15,6 +15,10 @@ class PyCryptography(PythonPackage):
license("Apache-2.0")
+ version("43.0.3", sha256="315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805")
+ version("43.0.1", sha256="203e92a75716d8cfb491dc47c79e17d0d9207ccffcbcb35f598fbe463ae3444d")
+ version("42.0.8", sha256="8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2")
+ version("41.0.7", sha256="13f93ce9bea8016c253b34afc6bd6a75993e5c40672ed5405a9c832f0d4a00bc")
version("41.0.3", sha256="6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34")
version("40.0.2", sha256="c33c0d32b8594fa647d2e01dbccc303478e16fdd7cf98652d5b3ed11aa5e5c99")
version("38.0.1", sha256="1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7")
@@ -32,6 +36,8 @@ class PyCryptography(PythonPackage):
variant("idna", default=False, when="@2.5:3.0", description="Deprecated U-label support")
+ # pyo3 <= 0.22 required in version <= 42
+ depends_on("python@:3.12", when="@:42", type=("build", "run"))
# distutils required in version <= 40
depends_on("python@:3.11", when="@:40", type=("build", "run"))
depends_on("py-setuptools@61.0:", when="@41:", type="build")
@@ -39,8 +45,16 @@ class PyCryptography(PythonPackage):
depends_on("py-setuptools@40.6:", when="@2.7:36", 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.2:", type="build")
- depends_on("py-setuptools-rust@0.11.4:", when="@3.4:3.4.1", type=("build", "run"))
+ with when("@43:"):
+ depends_on("py-maturin@1", type="build")
+ conflicts(
+ "^py-setuptools@74.0.0,74.1.0,74.1.1,74.1.2,74.1.3,75.0.0,75.1.0,75.2.0",
+ msg="some setuptools version are incompatible",
+ )
+ with when("@:42"):
+ depends_on("py-setuptools-rust@1.7.0:", when="@42", type=("build", "run"))
+ depends_on("py-setuptools-rust@0.11.4:", when="@3.4.2:", type="build")
+ depends_on("py-setuptools-rust@0.11.4:", when="@3.4:3.4.1", type=("build", "run"))
depends_on("rust@1.56:", when="@41:", type="build")
depends_on("rust@1.48:", when="@38:", type="build")
depends_on("rust@1.41:", when="@3.4.5:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cssselect2/package.py b/var/spack/repos/builtin/packages/py-cssselect2/package.py
new file mode 100644
index 0000000000..a3acb25daf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cssselect2/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCssselect2(PythonPackage):
+ """
+ cssselect2 is a straightforward implementation of CSS4 Selectors for markup
+ documents (HTML, XML, etc.) that can be read by ElementTree-like parsers
+ (including cElementTree, lxml, html5lib, etc.)
+ """
+
+ homepage = "https://github.com/Kozea/cssselect2"
+ pypi = "cssselect2/cssselect2-0.7.0.tar.gz"
+
+ version("0.7.0", sha256="1ccd984dab89fc68955043aca4e1b03e0cf29cad9880f6e28e3ba7a74b14aa5a")
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-flit-core@3.2:3", type="build")
+ depends_on("py-tinycss2", type=("build", "run"))
+ depends_on("py-webencodings", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cudf/package.py b/var/spack/repos/builtin/packages/py-cudf/package.py
index 0bf97fbfed..36bc72bdc3 100644
--- a/var/spack/repos/builtin/packages/py-cudf/package.py
+++ b/var/spack/repos/builtin/packages/py-cudf/package.py
@@ -20,6 +20,8 @@ class PyCudf(PythonPackage):
version("0.15.0", sha256="2570636b72cce4c52f71e36307f51f630e2f9ea94a1abc018d40ce919ba990e4")
+ depends_on("cxx", type="build") # generated
+
build_directory = "python/cudf"
depends_on("cmake@3.14:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cuml/package.py b/var/spack/repos/builtin/packages/py-cuml/package.py
index 4ad9862b89..a3afb09999 100644
--- a/var/spack/repos/builtin/packages/py-cuml/package.py
+++ b/var/spack/repos/builtin/packages/py-cuml/package.py
@@ -18,6 +18,8 @@ class PyCuml(PythonPackage):
version("0.15.0", sha256="5c9c656ae4eaa94a426e07d7385fd5ea0e5dc7abff806af2941aee10d4ca99c7")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cupy/package.py b/var/spack/repos/builtin/packages/py-cupy/package.py
index 1ba1c3b37b..1e54a36779 100644
--- a/var/spack/repos/builtin/packages/py-cupy/package.py
+++ b/var/spack/repos/builtin/packages/py-cupy/package.py
@@ -18,6 +18,7 @@ class PyCupy(PythonPackage, CudaPackage, ROCmPackage):
homepage = "https://cupy.dev/"
pypi = "cupy/cupy-8.0.0.tar.gz"
+ version("13.1.0", sha256="5caf62288481a27713384523623045380ff42e618be4245f478238ed1786f32d")
version("12.1.0", sha256="f6d31989cdb2d96581da12822e28b102f29e254427195c2017eac327869b7320")
version("12.0.0", sha256="61ddbbef73d50d606bd5087570645f3c91ec9176c2566784c1d486d6a3404545")
version("11.6.0", sha256="53dbb840072bb32d4bfbaa6bfa072365a30c98b1fcd1f43e48969071ad98f1a7")
@@ -26,6 +27,8 @@ class PyCupy(PythonPackage, CudaPackage, ROCmPackage):
version("11.3.0", sha256="d057cc2f73ecca06fae8b9c270d9e14116203abfd211a704810cc50a453b4c9e")
version("11.2.0", sha256="c33361f117a347a63f6996ea97446d17f1c038f1a1f533e502464235076923e2")
+ depends_on("cxx", type="build") # generated
+
variant("all", default=False, description="Enable optional py-scipy, optuna, and cython")
depends_on("python@3.7:", when="@:11", type=("build", "run"))
@@ -35,20 +38,25 @@ class PyCupy(PythonPackage, CudaPackage, ROCmPackage):
depends_on("py-fastrlock@0.5:", type=("build", "run"))
depends_on("py-numpy@1.20:1.25", when="@:11", type=("build", "run"))
depends_on("py-numpy@1.20:1.26", when="@12:", type=("build", "run"))
+ depends_on("py-numpy@1.22:1.28", when="@13:", type=("build", "run"))
- depends_on("py-scipy@1.6:1.12", when="+all", type=("build", "run"))
+ depends_on("py-scipy@1.6:1.12", when="@:12+all", type=("build", "run"))
+ depends_on("py-scipy@1.7:1.13", when="@13:+all", type=("build", "run"))
depends_on("py-cython@0.29.22:2", when="+all", type=("build", "run"))
depends_on("py-optuna@2:", when="+all", type=("build", "run"))
# Based on https://github.com/cupy/cupy/releases
depends_on("cuda@:11.9", when="@:11 +cuda")
- depends_on("cuda@:12.1", when="@12: +cuda")
+ depends_on("cuda@:12.1", when="@12:12.1.0 +cuda")
+ depends_on("cuda@:12.4", when="@13: +cuda")
for a in CudaPackage.cuda_arch_values:
depends_on("nccl +cuda cuda_arch={0}".format(a), when="+cuda cuda_arch={0}".format(a))
- depends_on("cudnn", when="+cuda")
- depends_on("cutensor", when="+cuda")
+ depends_on("cudnn@8.8", when="@12.0.0: +cuda")
+ depends_on("cudnn@8.5", when="@11.2.0:11.6.0 +cuda")
+ depends_on("cutensor", when="@:12.1.0 +cuda")
+ depends_on("cutensor@2.0.1.2", when="@13.1: +cuda")
for _arch in ROCmPackage.amdgpu_targets:
arch_str = "amdgpu_target={0}".format(_arch)
diff --git a/var/spack/repos/builtin/packages/py-curvlinops-for-pytorch/package.py b/var/spack/repos/builtin/packages/py-curvlinops-for-pytorch/package.py
new file mode 100644
index 0000000000..8197e8291e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-curvlinops-for-pytorch/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyCurvlinopsForPytorch(PythonPackage):
+ """scipy Linear operators for curvature matrices in PyTorch."""
+
+ homepage = "https://github.com/f-dangel/curvlinops"
+ pypi = "curvlinops_for_pytorch/curvlinops_for_pytorch-2.0.0.tar.gz"
+
+ license("MIT")
+
+ version("2.0.0", sha256="01f9925db9454fc9b0a31c7b83fc8ec2534c2eb12b7de7825a5298fc14e460e7")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-backpack-for-pytorch@1.6:1")
+ depends_on("py-torch@2:")
+ depends_on("py-scipy@1.7.1:1")
+ depends_on("py-tqdm@4.61:4")
+ depends_on("py-einops")
+ depends_on("py-einconv")
diff --git a/var/spack/repos/builtin/packages/py-cutadapt/package.py b/var/spack/repos/builtin/packages/py-cutadapt/package.py
index a5f20ddf1c..2afd46a92f 100644
--- a/var/spack/repos/builtin/packages/py-cutadapt/package.py
+++ b/var/spack/repos/builtin/packages/py-cutadapt/package.py
@@ -17,6 +17,7 @@ class PyCutadapt(PythonPackage):
license("MIT")
+ version("4.7", sha256="8738a35b363eaf615665a4e7d1b4beb385cd93fb7ffdcf82cd4ab6457acc879b")
version("4.4", sha256="4554157c673022e1c433fcd6e3b803008fef60c8e71c01215e4aa04b0f09fe83")
version("4.3", sha256="319de860f975977e080ea42d9d255322060693ca39b7be51187831311702fe29")
version("4.2", sha256="ab0ac450baecc1576cc5ccbc06eab2685be9ee7676763938237d954a644237f1")
@@ -27,12 +28,14 @@ class PyCutadapt(PythonPackage):
version("1.13", sha256="aa9f2c1f33dc081fe94f42b1250e4382b8fb42cabbf6e70a76ff079f211d5fc0")
# version 4 deps
- depends_on("py-setuptools@63:", type=("build", "run"), when="@4.2:")
- depends_on("py-setuptools@43:", type=("build", "run"), when="@:4.1")
+ depends_on("python@3.8:", type=("build", "run"), when="@4.7:")
+ depends_on("python@3.7:", type=("build", "run"), when="@4.1:4.6")
+ depends_on("py-setuptools@63:", type="build", when="@4.2:")
+ depends_on("py-setuptools@43:", type="build", when="@:4.1")
depends_on("py-setuptools-scm@6.2:+toml", type="build", when="@2.0:")
- depends_on("python@3.7:", type=("build", "run"), when="@4.1:")
depends_on("py-cython@0.29.20:", type="build")
- depends_on("py-dnaio@0.10:", type=("build", "run"), when="@4.3:")
+ depends_on("py-dnaio@1.2.0:", type=("build", "run"), when="@4.7:")
+ depends_on("py-dnaio@0.10:", type=("build", "run"), when="@4.3:4.6")
depends_on("py-dnaio@0.9.1:", type=("build", "run"), when="@4.2")
depends_on("py-dnaio@0.7.1:", type=("build", "run"), when="@4.1")
depends_on("py-xopen@1.6:", type=("build", "run"), when="@4.2:")
diff --git a/var/spack/repos/builtin/packages/py-cvxopt/package.py b/var/spack/repos/builtin/packages/py-cvxopt/package.py
index 2fcf1433e6..30b6201245 100644
--- a/var/spack/repos/builtin/packages/py-cvxopt/package.py
+++ b/var/spack/repos/builtin/packages/py-cvxopt/package.py
@@ -17,6 +17,8 @@ class PyCvxopt(PythonPackage):
version("1.2.5", sha256="94ec8c36bd6628a11de9014346692daeeef99b3b7bae28cef30c7490bbcb2d72")
+ depends_on("c", type="build") # generated
+
variant(
"gsl",
default=False,
diff --git a/var/spack/repos/builtin/packages/py-cvxpy/package.py b/var/spack/repos/builtin/packages/py-cvxpy/package.py
index 828982503d..fcf3856ace 100644
--- a/var/spack/repos/builtin/packages/py-cvxpy/package.py
+++ b/var/spack/repos/builtin/packages/py-cvxpy/package.py
@@ -18,6 +18,8 @@ class PyCvxpy(PythonPackage):
version("1.1.13", sha256="a9c781e74ad76097b47b86456cb3a943898f7ec9ac8f47bcefc922051cdc4a04")
version("1.0.25", sha256="8535529ddb807067b0d59661dce1d9a6ddb2a218398a38ea7772328ad8a6ea13")
+ depends_on("cxx", type="build") # generated
+
# Dependency versions based on README.md in python packages
depends_on("python@3.4:", type=("build", "run"), when="@1.1:")
depends_on("python@3.6:", type=("build", "run"), when="@1.1.13:")
diff --git a/var/spack/repos/builtin/packages/py-cx-oracle/package.py b/var/spack/repos/builtin/packages/py-cx-oracle/package.py
index 34c6b76002..c93c005b57 100644
--- a/var/spack/repos/builtin/packages/py-cx-oracle/package.py
+++ b/var/spack/repos/builtin/packages/py-cx-oracle/package.py
@@ -14,6 +14,8 @@ class PyCxOracle(PythonPackage):
version("8.3.0", sha256="3b2d215af4441463c97ea469b9cc307460739f89fdfa8ea222ea3518f1a424d9")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("oracle-instant-client", type="run")
depends_on("py-setuptools@40.6.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cylp/package.py b/var/spack/repos/builtin/packages/py-cylp/package.py
index ac9301f0dd..90b0254768 100644
--- a/var/spack/repos/builtin/packages/py-cylp/package.py
+++ b/var/spack/repos/builtin/packages/py-cylp/package.py
@@ -21,6 +21,8 @@ class PyCylp(PythonPackage):
version("0.91.5", sha256="d68ab1dde125be60abf45c8fd9edd24ab880c8144ad881718ddfa01ff6674c77")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython@:2", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cyordereddict/package.py b/var/spack/repos/builtin/packages/py-cyordereddict/package.py
index debfa13e6a..11be0d688e 100644
--- a/var/spack/repos/builtin/packages/py-cyordereddict/package.py
+++ b/var/spack/repos/builtin/packages/py-cyordereddict/package.py
@@ -18,4 +18,6 @@ class PyCyordereddict(PythonPackage):
version("1.0.0", sha256="d9b2c31796999770801a9a49403b8cb49510ecb64e5d1e9d4763ed44f2d5a76e")
version("0.2.2", sha256="f8387caaffba695d704311842291ede696080a5ed306f07f1825de126fb7f1ec")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-cython-bbox/package.py b/var/spack/repos/builtin/packages/py-cython-bbox/package.py
index 9320d12e3c..58978a1408 100644
--- a/var/spack/repos/builtin/packages/py-cython-bbox/package.py
+++ b/var/spack/repos/builtin/packages/py-cython-bbox/package.py
@@ -19,6 +19,8 @@ class PyCythonBbox(PythonPackage):
pypi = "cython-bbox/cython_bbox-0.1.3.tar.gz"
version("0.1.3", sha256="82e2d887534ecc10d3507489a05b11259f3baacd29eee37e6d8c97e1ffb16554")
+
+ depends_on("c", type="build") # generated
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py
index 602347bde4..a410fdb4fb 100644
--- a/var/spack/repos/builtin/packages/py-cython/package.py
+++ b/var/spack/repos/builtin/packages/py-cython/package.py
@@ -10,11 +10,17 @@ class PyCython(PythonPackage):
"""The Cython compiler for writing C extensions for the Python language."""
homepage = "https://github.com/cython/cython"
- pypi = "cython/Cython-0.29.21.tar.gz"
+ pypi = "cython/cython-3.0.11.tar.gz"
tags = ["build-tools"]
license("Apache-2.0")
+ version("3.0.11", sha256="7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff")
+ version("3.0.10", sha256="dcc96739331fb854dcf503f94607576cfe8488066c61ca50dfd55836f132de99")
+ version("3.0.8", sha256="8333423d8fd5765e7cceea3a9985dd1e0a5dfeb2734629e1a2ed2d6233d39de6")
+ version("3.0.7", sha256="fb299acf3a578573c190c858d49e0cf9d75f4bc49c3f24c5a63804997ef09213")
+ version("3.0.6", sha256="399d185672c667b26eabbdca420c98564583798af3bc47670a8a09e9f19dd660")
+ version("3.0.5", sha256="39318348db488a2f24e7c84e08bdc82f2624853c0fea8b475ea0b70b27176492")
version("3.0.4", sha256="2e379b491ee985d31e5faaf050f79f4a8f59f482835906efe4477b33b4fbe9ff")
version("3.0.0", sha256="350b18f9673e63101dbbfcf774ee2f57c20ac4636d255741d76ca79016b1bd82")
version("0.29.36", sha256="41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f")
@@ -27,39 +33,83 @@ class PyCython(PythonPackage):
version("0.29.23", sha256="6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e")
version("0.29.22", sha256="df6b83c7a6d1d967ea89a2903e4a931377634a297459652e4551734c48195406")
version("0.29.21", sha256="e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad")
- version("0.29.20", sha256="22d91af5fc2253f717a1b80b8bb45acb655f643611983fd6f782b9423f8171c7")
- version("0.29.16", sha256="232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05")
- version("0.29.15", sha256="60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30")
- version("0.29.14", sha256="e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414")
- version("0.29.13", sha256="c29d069a4a30f472482343c866f7486731ad638ef9af92bfe5fca9c7323d638e")
- version("0.29.10", sha256="26229570d6787ff3caa932fe9d802960f51a89239b990d275ae845405ce43857")
- version("0.29.7", sha256="55d081162191b7c11c7bfcb7c68e913827dfd5de6ecdbab1b99dab190586c1e8")
- version("0.29.5", sha256="9d5290d749099a8e446422adfb0aa2142c711284800fb1eb70f595101e32cbf1")
- version("0.29", sha256="94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97")
- version("0.28.6", sha256="68aa3c00ef1deccf4dd50f0201d47c268462978c12c42943bc33dc9dc816ac1b")
- version("0.28.3", sha256="1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526")
- version("0.28.1", sha256="152ee5f345012ca3bb7cc71da2d3736ee20f52cd8476e4d49e5e25c5a4102b12")
- version("0.25.2", sha256="f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306")
- version("0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6")
- version("0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e")
-
- # https://github.com/cython/cython/issues/5751 (distutils not yet dropped)
- depends_on("python@:3.11", type=("build", "link", "run"))
-
- # https://github.com/cython/cython/commit/1cd24026e9cf6d63d539b359f8ba5155fd48ae21
- # collections.Iterable was removed in Python 3.10
- depends_on("python@:3.9", when="@:0.29.14", type=("build", "link", "run"))
-
- # https://github.com/cython/cython/commit/430e2ca220c8fed49604daf578df98aadb33a87d
- depends_on("python@:3.8", when="@:0.29.13", type=("build", "link", "run"))
-
- depends_on("py-setuptools", type=("build", "run"))
+ with default_args(deprecated=True):
+ version(
+ "0.29.20", sha256="22d91af5fc2253f717a1b80b8bb45acb655f643611983fd6f782b9423f8171c7"
+ )
+ version(
+ "0.29.16", sha256="232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05"
+ )
+ version(
+ "0.29.15", sha256="60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30"
+ )
+ version(
+ "0.29.14", sha256="e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414"
+ )
+ version(
+ "0.29.13", sha256="c29d069a4a30f472482343c866f7486731ad638ef9af92bfe5fca9c7323d638e"
+ )
+ version(
+ "0.29.10", sha256="26229570d6787ff3caa932fe9d802960f51a89239b990d275ae845405ce43857"
+ )
+ version(
+ "0.29.7", sha256="55d081162191b7c11c7bfcb7c68e913827dfd5de6ecdbab1b99dab190586c1e8"
+ )
+ version(
+ "0.29.5", sha256="9d5290d749099a8e446422adfb0aa2142c711284800fb1eb70f595101e32cbf1"
+ )
+ version("0.29", sha256="94916d1ede67682638d3cc0feb10648ff14dc51fb7a7f147f4fedce78eaaea97")
+ version(
+ "0.28.6", sha256="68aa3c00ef1deccf4dd50f0201d47c268462978c12c42943bc33dc9dc816ac1b"
+ )
+ version(
+ "0.28.3", sha256="1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526"
+ )
+ version(
+ "0.28.1", sha256="152ee5f345012ca3bb7cc71da2d3736ee20f52cd8476e4d49e5e25c5a4102b12"
+ )
+ version(
+ "0.25.2", sha256="f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306"
+ )
+ version(
+ "0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6"
+ )
+ version(
+ "0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:3.0.10")
+ depends_on("python@:3.11", when="@:3.0.3") # Cythonize still used distutils
+ depends_on("python@:3.10", when="@:0.29.28")
+ depends_on("python@:3.9", when="@:0.29.24")
+ depends_on("python@:3.8", when="@:0.29.20")
+ depends_on("python@:3.7", when="@:0.29.13")
+
+ # https://github.com/cython/cython/issues/5751
+ # https://github.com/cython/cython/commit/0000fb4c319ef8f7e8eabcc99677f99a8c503cc3
+ depends_on("py-setuptools@66:", when="^python@3.12:", type="run")
+
+ depends_on("py-setuptools", type="build")
depends_on("gdb@7.2:", type="test")
# Backports CYTHON_FORCE_REGEN environment variable
patch("5307.patch", when="@0.29:0.29.33")
patch("5712.patch", when="@0.29")
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/c/cython/{}-{}.tar.gz"
+ if version >= Version("3.0.11"):
+ name = "cython"
+ else:
+ name = "Cython"
+ return url.format(name, version)
+
@property
def command(self):
"""Returns the Cython command"""
diff --git a/var/spack/repos/builtin/packages/py-cyvcf2/package.py b/var/spack/repos/builtin/packages/py-cyvcf2/package.py
index f00894b9e5..d8954dc6c3 100644
--- a/var/spack/repos/builtin/packages/py-cyvcf2/package.py
+++ b/var/spack/repos/builtin/packages/py-cyvcf2/package.py
@@ -16,6 +16,8 @@ class PyCyvcf2(PythonPackage):
version("0.11.7", sha256="a4b6229b89a0a1043684c65cbdd702c366a8800dc3591fb44c4b5a08640cbeec")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-d2to1/package.py b/var/spack/repos/builtin/packages/py-d2to1/package.py
index c8e89103b0..6931eef27e 100644
--- a/var/spack/repos/builtin/packages/py-d2to1/package.py
+++ b/var/spack/repos/builtin/packages/py-d2to1/package.py
@@ -19,4 +19,6 @@ class PyD2to1(PythonPackage):
)
version("0.2.12", sha256="04ab9f3ac255d367ecda1eb59379e5031816740c3a3eda95d0dba9f6bb3b7ca4")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dace/package.py b/var/spack/repos/builtin/packages/py-dace/package.py
index bfa8bf0d80..2eae218cde 100644
--- a/var/spack/repos/builtin/packages/py-dace/package.py
+++ b/var/spack/repos/builtin/packages/py-dace/package.py
@@ -21,6 +21,8 @@ class PyDace(PythonPackage):
version("master", branch="master", submodules=True)
version("0.15.1", sha256="69bfdbbd5c7177f2926a874f5fa82fcdef61fc532c022b4bc12e1e9218724093")
+ depends_on("cxx", type="build") # generated
+
variant(
"counters",
description="Optional requirements that enable performance counter collection.",
diff --git a/var/spack/repos/builtin/packages/py-dadi/package.py b/var/spack/repos/builtin/packages/py-dadi/package.py
index e059fb9411..906db1628f 100644
--- a/var/spack/repos/builtin/packages/py-dadi/package.py
+++ b/var/spack/repos/builtin/packages/py-dadi/package.py
@@ -21,6 +21,8 @@ class PyDadi(PythonPackage):
version("2020-12-02", commit="047bac0db5245009d9c724e91a851149c34c9de0")
version("2.1.0", sha256="97a15aa7ef501850cad4cff66b11b66ecb65d5d68acbf2ff713585c81c3a1038")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type=("build"))
depends_on("python@3:", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-damask/package.py b/var/spack/repos/builtin/packages/py-damask/package.py
index ca2ab0ae54..a51e98a7ca 100644
--- a/var/spack/repos/builtin/packages/py-damask/package.py
+++ b/var/spack/repos/builtin/packages/py-damask/package.py
@@ -10,13 +10,21 @@ from spack.package import *
class PyDamask(PythonPackage):
"""Pre- and post-processing tools for DAMASK"""
- homepage = "https://damask.mpie.de"
- url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
+ homepage = "https://damask-multiphysics.org"
+ url = "https://damask-multiphysics.org/download/damask-3.0.0.tar.xz"
maintainers("MarDiehl")
- license("AGPL-3.0-only")
+ license("AGPL-3.0-or-later")
+ version("3.0.1", sha256="3db1231f6763356e71b3bb91f66f1abb4fdae2721ce85754fc468446f3d74882")
+ version("3.0.0", sha256="aaebc65b3b10e6c313132ee97cfed427c115079b7e438cc0727c5207e159019f")
+ version(
+ "3.0.0-beta2", sha256="513567b4643f39e27ae32b9f75463fc6f388c1548d42f0393cc87ba02d075f6a"
+ )
+ version(
+ "3.0.0-beta", sha256="1e25e409ac559fc437d1887c6ca930677a732db89a3a32499d545dd75e93925c"
+ )
version(
"3.0.0-alpha8", sha256="f62c38123213d1c1fe2eb8910b0ffbdc1cac56273c2520f3b64a553363190b9d"
)
@@ -33,6 +41,9 @@ class PyDamask(PythonPackage):
"3.0.0-alpha4", sha256="0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493"
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-pandas@0.24:", type=("build", "run"), when="@3.0.0-alpha8:")
depends_on("py-numpy@1.17:", type=("build", "run"), when="@3.0.0-alpha8:")
depends_on("py-scipy@1.2:", type=("build", "run"), when="@3.0.0-alpha8:")
diff --git a/var/spack/repos/builtin/packages/py-darshan/package.py b/var/spack/repos/builtin/packages/py-darshan/package.py
index 4b9c929e25..9740c10220 100644
--- a/var/spack/repos/builtin/packages/py-darshan/package.py
+++ b/var/spack/repos/builtin/packages/py-darshan/package.py
@@ -14,14 +14,21 @@ class PyDarshan(PythonPackage):
maintainers("jeanbez", "shanedsnyder")
+ # NOTE: don't forget to update the version array further down that sets the appropriate
+ # darshan-util dependency
+ version("3.4.6.0", sha256="a105ec5c9bcd4a20469470ca51db8016336ede34a1c33f4488d1ba263a73c378")
+ version("3.4.5.0", sha256="1419e246b2383d3e71da14942d6579a86fb298bf6dbbc3f507accefa614c6e50")
version("3.4.4.0", sha256="2d218a1b2a450934698a78148c6603e453c246ec852679432bf217981668e56b")
version("3.4.3.0", sha256="e0708fc5445f2d491ebd381a253cd67534cef13b963f1d749dd605a10f5c0f8f")
version("3.4.2.0", sha256="eb00eb758c96899c0d523b71eb00caa3b967509c27fd504c579ac8c9b521845c")
version("3.4.1.0", sha256="41a033ebac6fcd0ca05b8ccf07e11191286dee923ec334b876a7ec8e8a6add84")
version("3.4.0.1", sha256="0142fc7c0b12a9e5c22358aa26cca7083d28af42aeea7dfcc5698c56b6aee6b7")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-setuptools@:63", type="build")
+ depends_on("py-setuptools@:63", when="@:3.4.4", type="build")
+ depends_on("py-setuptools@64:", when="@3.4.5:", type="build")
depends_on("py-pytest-runner", type="build")
depends_on("py-cffi", type=("build", "run"))
# NOTE: SciPy is an indirect dependency needed for interpolate usage in pandas
@@ -34,11 +41,14 @@ class PyDarshan(PythonPackage):
depends_on("py-mako", type=("build", "run"))
depends_on("py-humanize", when="@3.4.3.0:", type=("build", "run"))
depends_on("py-pytest", type="test")
+ depends_on("py-packaging", type="test")
+ depends_on("py-lxml", type="test")
+ depends_on("py-importlib-resources", when="^python@:3.8", type="test")
# py-darshan depends on specific darshan-util versions corresponding
# to the first 3 parts of the py-darshan version string
# (i.e., py-darshan@3.4.3.0 requires darshan-util@3.4.3, etc.)
- for v in ["3.4.0", "3.4.1", "3.4.2", "3.4.3"]:
+ for v in ["3.4.0", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6"]:
depends_on(f"darshan-util@{v}", when=f"@{v}", type=("build", "run"))
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/py-dasbus/package.py b/var/spack/repos/builtin/packages/py-dasbus/package.py
new file mode 100644
index 0000000000..7f34384f9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dasbus/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDasbus(PythonPackage):
+ """Dasbus is a DBus library written in Python 3, based on GLib and inspired by pydbus."""
+
+ homepage = "https://dasbus.readthedocs.io/en/latest/"
+ pypi = "dasbus/dasbus-1.7.tar.gz"
+ license("LGPL-2.1-or-later")
+
+ version("1.7", sha256="a8850d841adfe8ee5f7bb9f82cf449ab9b4950dc0633897071718e0d0036b6f6")
+
+ depends_on("python@3.6:3", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pygobject", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dash-bootstrap-components/package.py b/var/spack/repos/builtin/packages/py-dash-bootstrap-components/package.py
new file mode 100644
index 0000000000..0872af0ee3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dash-bootstrap-components/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDashBootstrapComponents(PythonPackage):
+ """Bootstrap themed components for use in Plotly Dash"""
+
+ homepage = "https://dash-bootstrap-components.opensource.faculty.ai/"
+ pypi = "dash_bootstrap_components/dash_bootstrap_components-1.6.0.tar.gz"
+ git = "https://github.com/facultyai/dash-bootstrap-components/"
+
+ license("Apache-2.0")
+
+ version("1.6.0", sha256="960a1ec9397574792f49a8241024fa3cecde0f5930c971a3fc81f016cbeb1095")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dash-svg/package.py b/var/spack/repos/builtin/packages/py-dash-svg/package.py
new file mode 100644
index 0000000000..c3e5cd7e8f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dash-svg/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDashSvg(PythonPackage):
+ """SVG support library for Plotly/Dash"""
+
+ homepage = "https://github.com/stevej2608/dash-svg"
+ pypi = "dash_svg/dash_svg-0.0.12.tar.gz"
+
+ license("MIT")
+
+ version("0.0.12", sha256="a7115bf437d770b822c2dd53b9d9a981210619b7d17c925cbee04905fc761b4e")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dash/package.py b/var/spack/repos/builtin/packages/py-dash/package.py
new file mode 100644
index 0000000000..b68ae73d5b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dash/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDash(PythonPackage):
+ """Dash is the most downloaded, trusted Python framework
+ for building ML & data science web apps."""
+
+ homepage = "https://dash.plotly.com/"
+ pypi = "dash/dash-2.17.1.tar.gz"
+ git = "https://github.com/plotly/dash.git"
+
+ license("MIT")
+
+ version("2.17.1", sha256="ee2d9c319de5dcc1314085710b72cd5fa63ff994d913bf72979b7130daeea28e")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-typing-extensions")
+ depends_on("py-flask")
+ depends_on("py-plotly")
+ depends_on("py-importlib-metadata")
diff --git a/var/spack/repos/builtin/packages/py-dask-expr/package.py b/var/spack/repos/builtin/packages/py-dask-expr/package.py
new file mode 100644
index 0000000000..bed0fe2010
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dask-expr/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDaskExpr(PythonPackage):
+ """Dask DataFrames with query optimization."""
+
+ homepage = "https://github.com/dask/dask-expr"
+ url = "https://github.com/dask/dask-expr/archive/refs/tags/v1.1.9.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("1.1.9", sha256="e5a1b82de1142c29fed899a80541a98ca5e12cb85ce9d86bc8ada204a22599d3")
+
+ depends_on("python@3.10:", type=("build", "run"))
+ depends_on("py-setuptools@62.6:", type="build")
+ depends_on("py-versioneer@0.28+toml", type="build")
+
+ # Can't do circular run-time dependencies yet?
+ # depends_on("py-dask@2024.7.1", type="run")
+ depends_on("py-pyarrow@7: +dataset", type="run")
+ depends_on("py-pandas@2:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py
index 5980a9efe4..8783a8b8b8 100644
--- a/var/spack/repos/builtin/packages/py-dask/package.py
+++ b/var/spack/repos/builtin/packages/py-dask/package.py
@@ -16,6 +16,7 @@ class PyDask(PythonPackage):
license("BSD-3-Clause")
+ version("2024.7.1", sha256="dbaef2d50efee841a9d981a218cfeb50392fc9a95e0403b6d680450e4f50d531")
version("2023.4.1", sha256="9dc72ebb509f58f3fe518c12dd5a488c67123fdd66ccb0b968b34fd11e512153")
version("2022.10.2", sha256="42cb43f601709575fa46ce09e74bea83fdd464187024f56954e09d9b428ceaab")
version("2021.6.2", sha256="8588fcd1a42224b7cfcd2ebc8ad616734abb6b1a4517efd52d89c7dd66eb91f8")
@@ -29,6 +30,7 @@ class PyDask(PythonPackage):
variant("dataframe", default=True, description="Install requirements for dask.dataframe")
variant("distributed", default=True, description="Install requirements for dask.distributed")
variant("diagnostics", default=False, description="Install requirements for dask.diagnostics")
+
variant(
"delayed",
default=True,
@@ -36,6 +38,8 @@ class PyDask(PythonPackage):
description="Install requirements for dask.delayed (dask.imperative)",
)
+ conflicts("~array", when="@2023.8: +dataframe", msg="From 2023.8, +dataframe requires +array")
+
depends_on("python@3.8:", type=("build", "run"), when="@2022.10.2:")
depends_on("py-setuptools", type="build")
@@ -54,6 +58,7 @@ class PyDask(PythonPackage):
depends_on("py-toolz@0.10.0:", type=("build", "run"), when="@2023.4.1:")
depends_on("py-partd@0.3.10:", type=("build", "run"), when="@2021.3.1:")
depends_on("py-partd@1.2.0:", type=("build", "run"), when="@2023.4.0:")
+ depends_on("py-partd@1.4.0:", type=("build", "run"), when="@2024.7.1:")
depends_on("py-click@7.0:", type=("build", "run"), when="@2022.10.2:")
depends_on("py-click@8.0:", type=("build", "run"), when="@2023.4.1:")
depends_on("py-importlib-metadata@4.13.0:", type=("build", "run"), when="@2023.4.0:")
@@ -63,6 +68,8 @@ class PyDask(PythonPackage):
depends_on("py-numpy@1.16.0:", type=("build", "run"), when="@2021.3.1: +array")
depends_on("py-numpy@1.18.0:", type=("build", "run"), when="@2022.10.2: +array")
depends_on("py-numpy@1.21.0:", type=("build", "run"), when="@2023.4.0: +array")
+ # https://github.com/dask/dask/issues/11066
+ depends_on("py-numpy@:1", when="@:2024.5.0+array", type=("build", "run"))
# The dependency on py-toolz is non-optional starting version 2021.3.1
depends_on("py-toolz@0.8.2:", type=("build", "run"), when="@:2021.3.0 +array")
@@ -82,15 +89,21 @@ class PyDask(PythonPackage):
depends_on("py-numpy@1.16.0:", type=("build", "run"), when="@2021.3.1: +dataframe")
depends_on("py-numpy@1.18.0:", type=("build", "run"), when="@2022.10.2: +dataframe")
depends_on("py-numpy@1.21.0:", type=("build", "run"), when="@2023.4.0: +dataframe")
+ # https://github.com/dask/dask/issues/11066
+ depends_on("py-numpy@:1", when="@:2024.5.0+dataframe", type=("build", "run"))
depends_on("py-pandas@0.25.0:", type=("build", "run"), when="@2020.12.0: +dataframe")
depends_on("py-pandas@1.0:", type=("build", "run"), when="@2022.10.2: +dataframe")
depends_on("py-pandas@1.3:", type=("build", "run"), when="@2023.4.0: +dataframe")
+ depends_on("py-pandas@2.0:", type=("build", "run"), when="@2024.7.1: +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="@:2021.3.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="@:2021.3.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="@:2021.3.0 +dataframe")
+ # Starting with version 2024.3.0, dataframe requires a separate package py-dask-expr
+ depends_on("py-dask-expr", type=("build", "run"), when="@2024.3: +dataframe")
+ depends_on("py-dask-expr@1.1.9", type=("build", "run"), when="@2024.7.1 +dataframe")
# Requirements for dask.distributed
depends_on(
@@ -99,6 +112,7 @@ class PyDask(PythonPackage):
depends_on("py-distributed@2021.6.2", type=("build", "run"), when="@2021.6.2 +distributed")
depends_on("py-distributed@2022.10.2", type=("build", "run"), when="@2022.10.2 +distributed")
depends_on("py-distributed@2023.4.1", type=("build", "run"), when="@2023.4.1 +distributed")
+ depends_on("py-distributed@2024.7.1", type=("build", "run"), when="@2024.7.1 +distributed")
# Requirements for dask.diagnostics
depends_on("py-bokeh@1.0.0:1,2.0.1:", type=("build", "run"), when="+diagnostics")
diff --git a/var/spack/repos/builtin/packages/py-datasets/package.py b/var/spack/repos/builtin/packages/py-datasets/package.py
index a85a40531c..03ecf1c792 100644
--- a/var/spack/repos/builtin/packages/py-datasets/package.py
+++ b/var/spack/repos/builtin/packages/py-datasets/package.py
@@ -18,30 +18,46 @@ class PyDatasets(PythonPackage):
license("Apache-2.0")
+ version("2.20.0", sha256="3c4dbcd27e0f642b9d41d20ff2efa721a5e04b32b2ca4009e0fc9139e324553f")
version("2.8.0", sha256="a843b69593914071f921fc1086fde939f30a63415a34cdda5db3c0acdd58aff2")
version("1.8.0", sha256="d57c32bb29e453ee7f3eb0bbca3660ab4dd2d0e4648efcfa987432624cab29d3")
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.17:", type=("build", "run"))
- depends_on("py-pyarrow@1:3+parquet", type=("build", "run"), when="@:1.8.0")
- depends_on("py-pyarrow@6:+parquet", type=("build", "run"), when="@2.8.0:")
- depends_on("py-dill@:0.3.6", type=("build", "run"))
- depends_on("py-pandas", type=("build", "run"))
- depends_on("py-requests@2.19:", type=("build", "run"))
- depends_on("py-tqdm@4.27:4.49", type=("build", "run"), when="@:1.8.0")
- depends_on("py-tqdm@4.62.1:", type=("build", "run"), when="@2.8.0:")
- depends_on("py-xxhash", type=("build", "run"))
- depends_on("py-multiprocess", type=("build", "run"))
- depends_on("py-importlib-metadata", when="^python@:3.7", type=("build", "run"))
- depends_on("py-huggingface-hub@:0.0", type=("build", "run"), when="@:1.8.0")
- depends_on("py-huggingface-hub@0.2:0", type=("build", "run"), when="@2.8.0:")
- depends_on("py-packaging", type=("build", "run"))
- depends_on("py-aiohttp", type=("build", "run"), when="@2.8.0:")
- depends_on("py-responses@:0.18", type=("build", "run"), when="@2.8.0:")
- depends_on("py-pyyaml@5.1:", type=("build", "run"), when="@2.8.0:")
-
- with when("@:1.8.0"):
- depends_on("py-fsspec", type=("build", "run"), when="^python@3.8:")
- depends_on("py-fsspec@:0.8.0", type=("build", "run"), when="^python@:3.7")
- depends_on("py-fsspec@2021.11.1:+http", type=("build", "run"), when="@2.8.0:")
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.6:")
+ depends_on("py-numpy@1.17:")
+ depends_on("py-pandas")
+ depends_on("py-requests@2.19:")
+ depends_on("py-xxhash")
+ depends_on("py-multiprocess")
+ depends_on("py-packaging")
+ with when("@:1.8.0"):
+ depends_on("py-dill@:0.3.6")
+ depends_on("py-fsspec", when="^python@3.8:")
+ depends_on("py-fsspec@:0.8.0", when="^python@:3.7")
+ depends_on("py-huggingface-hub@:0.0")
+ depends_on("py-importlib-metadata", when="^python@:3.7")
+ depends_on("py-pyarrow@1:3+parquet")
+ depends_on("py-tqdm@4.27:4.49", when="@:1.8.0")
+ with when("@2.8.0:"):
+ depends_on("py-aiohttp")
+ depends_on("py-pyyaml@5.1:")
+ depends_on("python@3.7:")
+ with when("@2.8.0"):
+ depends_on("py-dill@:0.3.6")
+ depends_on("py-fsspec@2021.11.1:+http")
+ depends_on("py-huggingface-hub@0.2:0")
+ depends_on("py-pyarrow@6:+parquet")
+ depends_on("py-responses@:0.18")
+ depends_on("py-tqdm@4.62.1:")
+ with when("@2.20.0:"):
+ depends_on("py-filelock")
+ depends_on("py-dill@0.3.0:0.3.8") # temporary upper bound
+ depends_on("py-fsspec@2023.1.0:2024.5.0+http")
+ depends_on("py-huggingface-hub@0.21.2:")
+ depends_on("py-pyarrow@15:+parquet")
+ depends_on("py-requests@2.32.2:")
+ depends_on("py-tqdm@4.66.3:")
+ depends_on("python@3.8:")
diff --git a/var/spack/repos/builtin/packages/py-datashader/package.py b/var/spack/repos/builtin/packages/py-datashader/package.py
new file mode 100644
index 0000000000..6b87b7c407
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-datashader/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDatashader(PythonPackage):
+ """Datashader is a data rasterization pipeline for automating the process of creating
+ meaningful representations of large amounts of data"""
+
+ homepage = "https://datashader.org"
+ pypi = "datashader/datashader-0.16.3.tar.gz"
+ git = "https://github.com/holoviz/datashader.git"
+
+ license("BSD-3-Clause", checked_by="climbfuji")
+
+ version("0.16.3", sha256="9d0040c7887f7a5a5edd374c297402fd208a62bf6845e87631b54f03b9ae479d")
+
+ # pyproject.toml
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-pyct", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ depends_on("py-param", type=("build", "run"))
+
+ depends_on("py-colorcet", type="run")
+ depends_on("py-dask", type="run")
+ depends_on("py-multipledispatch", type="run")
+ depends_on("py-numba", type="run")
+ depends_on("py-numpy", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-pandas", type="run")
+ depends_on("py-pillow", type="run")
+ depends_on("py-requests", type="run")
+ depends_on("py-scipy", type="run")
+ depends_on("py-toolz", type="run")
+ depends_on("py-xarray", type="run")
diff --git a/var/spack/repos/builtin/packages/py-datrie/package.py b/var/spack/repos/builtin/packages/py-datrie/package.py
index 9bb763aed5..e7a77f128b 100644
--- a/var/spack/repos/builtin/packages/py-datrie/package.py
+++ b/var/spack/repos/builtin/packages/py-datrie/package.py
@@ -16,7 +16,14 @@ class PyDatrie(PythonPackage):
version("0.8.2", sha256="525b08f638d5cf6115df6ccd818e5a01298cd230b2dac91c8ff2e6499d18765d")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-setuptools@40.8:", type=("build"))
depends_on("py-cython@0.28:", type="build")
depends_on("py-pytest-runner", type="build")
+
+ @when("@:0.8.2")
+ def patch(self):
+ # fix failure to compile on gcc-14, https://github.com/pytries/datrie/pull/99
+ filter_file(r"(\s*)(struct AlphaMap:)", r"\1ctypedef \2", "src/cdatrie.pxd")
diff --git a/var/spack/repos/builtin/packages/py-deap/package.py b/var/spack/repos/builtin/packages/py-deap/package.py
index cc4085cc65..22589fcb86 100644
--- a/var/spack/repos/builtin/packages/py-deap/package.py
+++ b/var/spack/repos/builtin/packages/py-deap/package.py
@@ -17,6 +17,9 @@ class PyDeap(PythonPackage):
version("1.3.3", sha256="8772f1b0fff042d5e516b0aebac2c706243045aa7d0de8e0b8658f380181cf31")
version("1.3.1", sha256="11f54493ceb54aae10dde676577ef59fc52d52f82729d5a12c90b0813c857a2f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
# uses 2to3
depends_on("py-setuptools@:57", type="build", when="@1.3.1")
diff --git a/var/spack/repos/builtin/packages/py-deephyper/package.py b/var/spack/repos/builtin/packages/py-deephyper/package.py
index 2bde1cff74..80b67dfb91 100644
--- a/var/spack/repos/builtin/packages/py-deephyper/package.py
+++ b/var/spack/repos/builtin/packages/py-deephyper/package.py
@@ -20,22 +20,32 @@ class PyDeephyper(PythonPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("0.6.0", sha256="cda2dd7c74bdca4203d9cd637c4f441595f77bae6d77ef8e4a056b005357de34")
version("0.4.2", sha256="ee1811a22b08eff3c9098f63fbbb37f7c8703e2f878f2bdf2ec35a978512867f")
depends_on("python@3.7:3.9", type=("build", "run"))
+ depends_on("python@3.7:3.11", type=("build", "run"), when="@0.6.0")
+ depends_on("py-setuptools@42:", type="build", when="@0.6.0")
depends_on("py-setuptools@40:49.1", type="build")
depends_on("py-wheel@0.36.2", type="build")
- depends_on("py-cython@0.29.24:2", type="build")
+ depends_on("py-cython@0.29.24:", type="build", when="@0.6.0")
+ depends_on("py-cython@0.29.24:2", type="build", when="@0.4.2")
depends_on("py-configspace@0.4.20:", type=("build", "run"))
depends_on("py-dm-tree", type=("build", "run"))
- depends_on("py-jinja2@:3.0", type=("build", "run"))
+ depends_on("py-jinja2@:3.1", type=("build", "run"), when="@0.6.0")
+ depends_on("py-jinja2@:3.0", type=("build", "run"), when="@0.4.2")
+ depends_on("py-numpy@1.20:", type=("build", "run"), when="@0.6.0")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-pandas@0.24.2:", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"))
+ depends_on(
+ "py-packaging@20.5:", type=("build", "run"), when="@0.6.0 target=aarch64: platform=darwin"
+ )
depends_on("py-scikit-learn@0.23.1:", type=("build", "run"))
+ depends_on("py-scipy@1.7:", type=("build", "run"), when="@0.6.0")
depends_on("py-scipy@0.19.1:", type=("build", "run"))
depends_on("py-tqdm@4.64.0:", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-tinydb", type=("build", "run"))
+ depends_on("py-tinydb", type=("build", "run"), when="@0.4.2")
diff --git a/var/spack/repos/builtin/packages/py-deepsig-biocomp/package.py b/var/spack/repos/builtin/packages/py-deepsig-biocomp/package.py
index 01b527251f..8c1abc2e8f 100644
--- a/var/spack/repos/builtin/packages/py-deepsig-biocomp/package.py
+++ b/var/spack/repos/builtin/packages/py-deepsig-biocomp/package.py
@@ -19,11 +19,11 @@ class PyDeepsigBiocomp(PythonPackage):
version("1.2.5", sha256="e954b815d63c221c564c7d3fe27123d7cd2c39b191d6107369ab095d506496e0")
- depends_on("python@3.8", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-biopython@1.78:", type=("build", "run"))
- depends_on("py-keras@2.4.3", type=("build", "run"))
- depends_on("py-tensorflow@2.2.0", type=("build", "run"))
+ depends_on("py-keras@2.4.3:", type=("build", "run"))
+ depends_on("py-tensorflow@2.2.0:", type=("build", "run"))
depends_on("py-tensorboard", type=("build", "run"))
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/py-deepspeed/package.py b/var/spack/repos/builtin/packages/py-deepspeed/package.py
index e73d955286..5b4321f248 100644
--- a/var/spack/repos/builtin/packages/py-deepspeed/package.py
+++ b/var/spack/repos/builtin/packages/py-deepspeed/package.py
@@ -21,9 +21,11 @@ class PyDeepspeed(PythonPackage):
version("0.10.0", sha256="afb06a97fde2a33d0cbd60a8357a70087c037b9f647ca48377728330c35eff3e")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-hjson", type=("build", "run"))
- depends_on("py-ninja", type=("build", "run"))
+ depends_on("ninja", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-packaging@20:", type=("build", "run"))
depends_on("py-psutil", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-deeptools/package.py b/var/spack/repos/builtin/packages/py-deeptools/package.py
index 6b143c287b..9a53e65542 100644
--- a/var/spack/repos/builtin/packages/py-deeptools/package.py
+++ b/var/spack/repos/builtin/packages/py-deeptools/package.py
@@ -10,16 +10,17 @@ class PyDeeptools(PythonPackage):
"""deepTools addresses the challenge of handling the large amounts of data
that are now routinely generated from DNA sequencing centers."""
- # The test suite and associated test data is missing in the pypi tarball.
homepage = "https://pypi.python.org/pypi/deepTools/"
- url = "https://github.com/deeptools/deepTools/archive/3.3.0.tar.gz"
+ pypi = "deepTools/deepTools-3.5.3.tar.gz"
- version("3.5.2", sha256="4d8be1bafa1e8f54a26f5eaac54da6c6e50709f3a3a72a57cd96ac0f22c30383")
- version("3.3.0", sha256="a7aaf79fe939ca307fe6ec5e156750389fdfa4324bf0dd6bf5f53d5fda109358")
- version("3.2.1", sha256="dbee7676951a9fdb1b88956fe4a3294c99950ef193ea1e9edfba1ca500bd6a75")
- version("2.5.2", sha256="16d0cfed29af37eb3c4cedd9da89b4952591dc1a7cd8ec71fcba87c89c62bf79")
+ version("3.5.3", sha256="d57ede59417dcde09763d3c4e2aabd45abba1155200777a73a9cb0e94df73ff9")
+ version("3.5.2", sha256="9367f9037b1822b7d69d5abaf47ca25bf0e5dc4cb8be85bd55b6f63c90781941")
+ version("3.3.0", sha256="a9a6d2aff919f45e869acfb477e977db627da84f8136e4b4af0a5100057e6bc3")
+ version("3.2.1", sha256="ccbabb46d6c17c927e96fadc43d8d4770efeaf40b9bcba3b94915a211007378e")
+ version("2.5.2", sha256="305d0b85d75bd8af19dbe8947bb76c399fd5aaebd02f441455f4ba9e6c66ad9b")
depends_on("py-setuptools", type="build")
+
depends_on("py-numpy@1.9.0:", type=("build", "run"))
depends_on("py-scipy@0.17.0:", type=("build", "run"))
depends_on("py-matplotlib@3.3.0:", when="@3.5.1:", type=("build", "run"))
@@ -31,13 +32,4 @@ class PyDeeptools(PythonPackage):
depends_on("py-plotly@4.9:", when="@3.5.1:", type=("build", "run"))
depends_on("py-plotly@2.0.0:", when="@:3.5.0", type=("build", "run"))
depends_on("py-deeptoolsintervals@0.1.8:", type=("build", "run"))
-
- def patch(self):
- # Add nosetest hook for "python setup.py test" argument.
- filter_file(
- r"^setup\(",
- r"""setup(
- tests_require='nose',
- test_suite='nose.collector',""",
- "setup.py",
- )
+ depends_on("py-importlib-metadata", when="@3.5.3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py b/var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py
index ac13c36108..c8b7c62907 100644
--- a/var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py
+++ b/var/spack/repos/builtin/packages/py-deeptoolsintervals/package.py
@@ -16,5 +16,7 @@ class PyDeeptoolsintervals(PythonPackage):
version("0.1.9", sha256="7d94c36fd2b6f10d8b99e536d2672e8228971f1fc810497d33527bba2c40d4f6")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-devlib/package.py b/var/spack/repos/builtin/packages/py-devlib/package.py
index 941590e0e1..8b88231ba7 100644
--- a/var/spack/repos/builtin/packages/py-devlib/package.py
+++ b/var/spack/repos/builtin/packages/py-devlib/package.py
@@ -23,6 +23,8 @@ class PyDevlib(PythonPackage):
version("0.0.3", sha256="29ec5f1de481783ab0b9efc111dfeb67c890187d56fca8592b25ee756ff32902")
version("0.0.2", sha256="972f33be16a06572a19b67d909ee0ed6cb6f21f9a9da3c43fd0ff5851421051d")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-python-dateutil", type=("build", "run"))
depends_on("py-pexpect@3.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dgl/package.py b/var/spack/repos/builtin/packages/py-dgl/package.py
index 10c6cc2e3e..814041b93b 100644
--- a/var/spack/repos/builtin/packages/py-dgl/package.py
+++ b/var/spack/repos/builtin/packages/py-dgl/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -34,6 +35,10 @@ class PyDgl(CMakePackage, PythonExtension, CudaPackage):
"0.4.2", tag="0.4.2", commit="55e056fbae8f25f3da4aab0a0d864d72c2a445ff", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("cuda", default=True, description="Build with CUDA")
variant("openmp", default=True, description="Build with OpenMP")
variant(
@@ -128,8 +133,7 @@ class PyDgl(CMakePackage, PythonExtension, CudaPackage):
def install(self, spec, prefix):
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
# Older versions do not install correctly
if self.spec.satisfies("@:0.4.3"):
diff --git a/var/spack/repos/builtin/packages/py-dinosaur/package.py b/var/spack/repos/builtin/packages/py-dinosaur/package.py
new file mode 100644
index 0000000000..a5e37777b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dinosaur/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDinosaur(PythonPackage):
+ """Dinosaur: differentiable dynamics for global atmospheric modeling."""
+
+ homepage = "https://github.com/google-research/dinosaur"
+ git = "https://github.com/google-research/dinosaur.git"
+
+ license("Apache-2.0")
+
+ version("main", branch="main")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:")
+ depends_on("py-fsspec")
+ depends_on("py-jax")
+ depends_on("py-jaxlib")
+ depends_on("py-numpy")
+ depends_on("py-pandas")
+ depends_on("py-pint")
+ depends_on("py-scipy")
+ depends_on("py-scikit-learn")
+ depends_on("py-tree-math")
+ depends_on("py-xarray")
+ depends_on("py-xarray-tensorstore")
diff --git a/var/spack/repos/builtin/packages/py-dipy/package.py b/var/spack/repos/builtin/packages/py-dipy/package.py
index dfc95a71b7..23d5d4ff32 100644
--- a/var/spack/repos/builtin/packages/py-dipy/package.py
+++ b/var/spack/repos/builtin/packages/py-dipy/package.py
@@ -22,6 +22,8 @@ class PyDipy(PythonPackage):
version("1.7.0", sha256="59bb647128aae7793215c813bb8ea35dae260ac9f0d938c724064f0af5a05cc3")
version("1.4.1", sha256="b4bf830feae751f3f985d54cb71031fc35cea612838320f1f74246692b8a3cc0")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("python@:3.9", type=("build", "run"), when="@:1.4")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dirtyjson/package.py b/var/spack/repos/builtin/packages/py-dirtyjson/package.py
new file mode 100644
index 0000000000..369dc26a62
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dirtyjson/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDirtyjson(PythonPackage):
+ """JSON decoder for Python that can extract data from the muck"""
+
+ homepage = "https://github.com/codecobblers/dirtyjson"
+ pypi = "dirtyjson/dirtyjson-1.0.8.tar.gz"
+
+ license("MIT or AFL-2.1", checked_by="qwertos")
+
+ version("1.0.8", sha256="90ca4a18f3ff30ce849d100dcf4a003953c79d3a2348ef056f1d9c22231a25fd")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-distance/package.py b/var/spack/repos/builtin/packages/py-distance/package.py
index 214471881b..447a0c9abe 100644
--- a/var/spack/repos/builtin/packages/py-distance/package.py
+++ b/var/spack/repos/builtin/packages/py-distance/package.py
@@ -19,4 +19,6 @@ class PyDistance(PythonPackage):
version("0.1.3", sha256="60807584f5b6003f5c521aa73f39f51f631de3be5cccc5a1d67166fcbf0d4551")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-distlib/package.py b/var/spack/repos/builtin/packages/py-distlib/package.py
index 664f6621aa..91bb8bbbbd 100644
--- a/var/spack/repos/builtin/packages/py-distlib/package.py
+++ b/var/spack/repos/builtin/packages/py-distlib/package.py
@@ -19,6 +19,8 @@ class PyDistlib(PythonPackage):
version("0.3.4", sha256="e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579")
version("0.3.3", sha256="d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@44:", when="@0.3.6:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-distributed/package.py b/var/spack/repos/builtin/packages/py-distributed/package.py
index 2ee3139845..54d53552dd 100644
--- a/var/spack/repos/builtin/packages/py-distributed/package.py
+++ b/var/spack/repos/builtin/packages/py-distributed/package.py
@@ -32,6 +32,7 @@ class PyDistributed(PythonPackage):
license("BSD-3-Clause")
+ version("2024.7.1", sha256="7bce7fa745163b55bdd67fd632b3edf57b31827640390b92d0ee3f73436429d3")
version("2023.4.1", sha256="0140376338efdcf8db1d03f7c1fdbb5eab2a337b03e955d927c116824ee94ac5")
version("2022.10.2", sha256="53f0a5bf6efab9a5ab3345cd913f6d3f3d4ea444ee2edbea331c7fef96fd67d0")
version("2022.2.1", sha256="fb62a75af8ef33bbe1aa80a68c01a33a93c1cd5a332dd017ab44955bf7ecf65b")
@@ -57,6 +58,7 @@ class PyDistributed(PythonPackage):
depends_on("py-packaging@20.0:", type=("build", "run"), when="@2022.2.1:")
depends_on("py-psutil@5.0:", type=("build", "run"))
depends_on("py-psutil@5.7.0:", type=("build", "run"), when="@2023.4.1:")
+ depends_on("py-psutil@5.7.2:", type=("build", "run"), when="@2024.7.1:")
depends_on("py-sortedcontainers@:1,2.0.2:", type=("build", "run"))
depends_on("py-sortedcontainers@2.0.5:", type=("build", "run"), when="@2023.4.1:")
depends_on("py-tblib@1.6:", type=("build", "run"))
@@ -67,8 +69,10 @@ class PyDistributed(PythonPackage):
depends_on("py-tornado@5:", type=("build", "run"), when="^python@:3.7")
depends_on("py-tornado@6.0.3:", type=("build", "run"), when="^python@3.8:")
depends_on("py-tornado@6.0.3:6.1", type=("build", "run"), when="@2022.10.2:")
+ depends_on("py-tornado@6.0.4:", type=("build", "run"), when="@2024.7.1:")
depends_on("py-zict@0.1.3:", type=("build", "run"))
depends_on("py-zict@2.2.0:", type=("build", "run"), when="@2023.4.1:")
+ depends_on("py-zict@3.0.0:", type=("build", "run"), when="@2024.7.1:")
depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-pyyaml@5.3.1:", type=("build", "run"), when="@2023.4.1:")
depends_on("py-urllib3", type=("build", "run"), when="@2022.10.2:")
diff --git a/var/spack/repos/builtin/packages/py-django/package.py b/var/spack/repos/builtin/packages/py-django/package.py
index 96b8e4cf73..6d2a8c2cbe 100644
--- a/var/spack/repos/builtin/packages/py-django/package.py
+++ b/var/spack/repos/builtin/packages/py-django/package.py
@@ -10,21 +10,32 @@ class PyDjango(PythonPackage):
"""The Web framework for perfectionists with deadlines."""
homepage = "https://www.djangoproject.com/"
- url = "https://github.com/django/django/archive/3.0.5.tar.gz"
+ pypi = "Django/Django-5.0.1.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
- version("3.0.5", sha256="ef2d4f26414dc9598afce9c56cee4578313b88861cedfc5b3d9a71078e5cc79b")
- version("3.0.4", sha256="99699643d83acfab51d3ad73c2c2904173e03a4f59fe24c3d494e4fafc0b679f")
- version("3.0.3", sha256="d953c950f0c395db065c8bc39d20e87faded376632a3aacf889ae92d5adaac8b")
- version("3.0.2", sha256="ca316b1179a16931ed872ce970aabefcf3d41fe0d4b1a8e1301ec59e1e0ab45b")
- version("3.0.1", sha256="85349b9366364847264b2b707ffcff5a27a022afa29aac0e904ca672cbe5ee65")
- version("2.2.12", sha256="ec490c67bd2780b4ec4f5355cd99fa2fa6007f81695dd45a9e8f7ccc5ff17772")
- version("2.2.11", sha256="f4274181973f0f021cc00419cfa342f1a6f862406e766ae93e7fbba9d84c680c")
- version("2.2.10", sha256="3741536cf122d6695e8575b2fcf67c18812751fd3143393ea75c01a277afdacc")
+ version("5.1.1", sha256="021ffb7fdab3d2d388bc8c7c2434eb9c1f6f4d09e6119010bbb1694dda286bc2")
+ version("5.0.9", sha256="6333870d342329b60174da3a60dbd302e533f3b0bb0971516750e974a99b5a39")
+ version("5.0.1", sha256="8c8659665bc6e3a44fefe1ab0a291e5a3fb3979f9a8230be29de975e57e8f854")
+ version("3.0.5", sha256="d4666c2edefa38c5ede0ec1655424c56dc47ceb04b6d8d62a7eac09db89545c1")
+ version("3.0.4", sha256="50b781f6cbeb98f673aa76ed8e572a019a45e52bdd4ad09001072dfd91ab07c8")
+ version("3.0.3", sha256="2f1ba1db8648484dd5c238fb62504777b7ad090c81c5f1fd8d5eb5ec21b5f283")
+ version("3.0.2", sha256="8c3575f81e11390893860d97e1e0154c47512f180ea55bd84ce8fa69ba8051ca")
+ version("3.0.1", sha256="315b11ea265dd15348d47f2cbb044ef71da2018f6e582fed875c889758e6f844")
+ version("2.2.12", sha256="69897097095f336d5aeef45b4103dceae51c00afa6d3ae198a2a18e519791b7a")
+ version("2.2.11", sha256="65e2387e6bde531d3bb803244a2b74e0253550a9612c64a60c8c5be267b30f50")
+ version("2.2.10", sha256="1226168be1b1c7efd0e66ee79b0e0b58b2caa7ed87717909cd8a57bb13a7079a")
+ depends_on("python@3.10:", when="@5:", type=("build", "run"))
+ depends_on("py-setuptools@61:69.2", when="@5.1:", type="build")
+ depends_on("py-setuptools@40.8:", when="@5:5.0", type="build")
depends_on("py-setuptools", type="build")
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-pytz", type=("build", "run"))
- depends_on("py-sqlparse", type=("build", "run"))
+ depends_on("py-asgiref@3.8.1:3", when="@5.1:", type=("build", "run"))
+ depends_on("py-asgiref@3.7:3", when="@5:", type=("build", "run"))
depends_on("py-asgiref", type=("build", "run"))
+ depends_on("py-sqlparse@0.3.1:", when="@5:", type=("build", "run"))
+ depends_on("py-sqlparse", type=("build", "run"))
+ depends_on("py-tzdata", when="@5: platform=windows", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-pytz", when="@:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py
index 4c408c5ebf..4785092136 100644
--- a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py
+++ b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py
@@ -15,25 +15,50 @@ class PyDlioProfilerPy(PythonPackage):
license("MIT")
- version("develop", branch="dev")
- version("master", branch="master")
- version("0.0.2", tag="v0.0.2", commit="b72144abf1499e03d1db87ef51e780633e9e9533")
- version("0.0.1", tag="v0.0.1", commit="28affe716211315dd6936ddc8e25ce6c43cdf491")
+ version(
+ "0.0.7", tag="v0.0.7", commit="e47ec476b58e14157b807cbadb4187bd4fe811d9", deprecated=True
+ )
+ version(
+ "0.0.6", tag="v0.0.6", commit="3be111c973883387418ad96f63a18de63555c540", deprecated=True
+ )
+ version(
+ "0.0.5", tag="v0.0.5", commit="08f1a43c67c8dbb458d547020674c86118c9742e", deprecated=True
+ )
+ version(
+ "0.0.4", tag="v0.0.4", commit="f9ba207f4c3e3789eb7759653a94013e6b76c91c", deprecated=True
+ )
+ version(
+ "0.0.3", tag="v0.0.3", commit="531f4475cf03312e121c78bf644445882b51ad57", deprecated=True
+ )
+ version(
+ "0.0.2", tag="v0.0.2", commit="b72144abf1499e03d1db87ef51e780633e9e9533", deprecated=True
+ )
+ version(
+ "0.0.1", tag="v0.0.1", commit="28affe716211315dd6936ddc8e25ce6c43cdf491", deprecated=True
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cpp-logger@0.0.1", when="@:0.0.1")
- depends_on("cpp-logger@0.0.2", when="@0.0.2:")
+ depends_on("cpp-logger@0.0.2", when="@0.0.2")
+ depends_on("cpp-logger@0.0.3", when="@0.0.3:0.0.5")
+ depends_on("cpp-logger@0.0.4", when="@0.0.6:")
depends_on("brahma@0.0.1", when="@:0.0.1")
- depends_on("brahma@0.0.2", when="@0.0.2:")
- depends_on("gotcha@1.0.4", when="@:0.0.1")
- depends_on("gotcha@1.0.5", when="@0.0.2:")
- depends_on("gotcha@1.0.5", when="@0.0.2:")
+ depends_on("brahma@0.0.2", when="@0.0.2")
+ depends_on("brahma@0.0.3", when="@0.0.3:0.0.5")
+ depends_on("brahma@0.0.5", when="@0.0.6:")
depends_on("yaml-cpp@0.6.3", when="@0.0.2:")
depends_on("py-setuptools@42:", type="build")
depends_on("py-pybind11", type=("build", "run"))
- depends_on("py-ninja", type="build")
- depends_on("py-cmake@3.12:", type="build")
+ depends_on("ninja", type="build")
+ depends_on("cmake@3.12:", type="build")
def setup_build_environment(self, env):
- env.set("DLIO_PROFILER_DIR", self.prefix)
- env.set("DLIO_PYTHON_SITE", python_purelib)
+ if self.spec.satisfies("@0.0.6:"):
+ env.set("DLIO_PROFILER_INSTALL_DIR", self.prefix)
+ env.set("DLIO_PROFILER_PYTHON_SITE", python_purelib)
+ else:
+ env.set("DLIO_PROFILER_DIR", self.prefix)
+ env.set("DLIO_PYTHON_SITE", python_purelib)
env.set("DLIO_BUILD_DEPENDENCIES", "0")
diff --git a/var/spack/repos/builtin/packages/py-dm-haiku/package.py b/var/spack/repos/builtin/packages/py-dm-haiku/package.py
index 45adb2b7fc..add015e959 100644
--- a/var/spack/repos/builtin/packages/py-dm-haiku/package.py
+++ b/var/spack/repos/builtin/packages/py-dm-haiku/package.py
@@ -15,16 +15,31 @@ class PyDmHaiku(PythonPackage):
license("Apache-2.0")
+ version("0.0.12", sha256="ba0b3acf71433156737fe342c486da11727e5e6c9e054245f4f9b8f0b53eb608")
version("0.0.7", sha256="86c34af6952a305a4bbfda6b9925998577acc4aa2ad9333da3d6047f4f8ed7c1")
version("0.0.5", sha256="e986237e1f840aa3bd26217ecad84b611bf1456e2139f0f79ea71f9c6222d231")
- depends_on("python@3.7:", type=("build", "run"))
+
+ variant("jax", default=False, description="Build with JAX support", when="@0.0.12:")
+
+ # setup.py
+ depends_on("python@3.9:", when="@0.0.12:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+
+ # requirements.txt
depends_on("py-absl-py@0.7.1:", type=("build", "run"))
depends_on("py-jmp@0.0.2:", type=("build", "run"))
depends_on("py-numpy@1.18.0:", type=("build", "run"))
depends_on("py-tabulate@0.8.9:", type=("build", "run"))
+ depends_on("py-flax@0.7.1:", when="@0.0.12:", type=("build", "run"))
+
+ # requirements-jax.txt
+ with when("+jax"):
+ depends_on("py-jax@0.4.24:", type=("build", "run"))
+ depends_on("py-jaxlib@0.4.24:", type=("build", "run"))
+
+ # Historical dependencies
depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run"))
- # from README.md:
- # Because JAX installation is different depending on your CUDA version, Haiku does
- # not list JAX as a dependency in `requirements.txt`.
- depends_on("py-jax", type=("build", "run"))
+ depends_on("py-jax", when="@:0.0.7", type=("build", "run"))
+
+ # AttributeError: module 'jax' has no attribute 'xla'
+ conflicts("^py-jax@0.4.14:", when="@:0.0.7")
diff --git a/var/spack/repos/builtin/packages/py-dm-tree/package.py b/var/spack/repos/builtin/packages/py-dm-tree/package.py
index bd2d7e4eb3..c44acd8e30 100644
--- a/var/spack/repos/builtin/packages/py-dm-tree/package.py
+++ b/var/spack/repos/builtin/packages/py-dm-tree/package.py
@@ -23,11 +23,37 @@ class PyDmTree(PythonPackage):
version("0.1.8", sha256="0fcaabbb14e7980377439e7140bd05552739ca5e515ecb3119f234acee4b9430")
version("0.1.7", sha256="30fec8aca5b92823c0e796a2f33b875b4dccd470b57e91e6c542405c5f77fd2a")
- version("0.1.6", sha256="6776404b23b4522c01012ffb314632aba092c9541577004ab153321e87da439a")
- version("0.1.5", sha256="a951d2239111dfcc468071bc8ff792c7b1e3192cab5a3c94d33a8b2bda3127fa")
+ version(
+ "0.1.6",
+ sha256="6776404b23b4522c01012ffb314632aba092c9541577004ab153321e87da439a",
+ deprecated=True,
+ )
+ version(
+ "0.1.5",
+ sha256="a951d2239111dfcc468071bc8ff792c7b1e3192cab5a3c94d33a8b2bda3127fa",
+ deprecated=True,
+ )
+
+ depends_on("cxx", type="build")
+
+ # Based on PyPI wheel availability
+ depends_on("python@:3.12", when="@0.1.8:", type=("build", "run"))
+ depends_on("python@:3.10", when="@0.1.6:0.1.7", type=("build", "run"))
+ depends_on("python@:3.8", when="@0.1.5", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("cmake", when="@0.1.7:", type="build")
+ depends_on("cmake@3.12:", when="@0.1.7:", type="build")
+ depends_on("py-pybind11@2.10.1:", when="@0.1.8:")
+ depends_on("abseil-cpp", when="@0.1.8:")
+
+ patch(
+ "https://github.com/google-deepmind/tree/pull/73.patch?full_index=1",
+ sha256="77dbd895611d412da99a5afbf312c3c49984ad02bd0e56ad342b2002a87d789c",
+ when="@0.1.8",
+ )
+ conflicts("%gcc@13:", when="@:0.1.7")
+
+ # Historical dependencies
depends_on("bazel@:5", when="@:0.1.6", type="build")
depends_on("py-six@1.12.0:", when="@:0.1.6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dnaio/package.py b/var/spack/repos/builtin/packages/py-dnaio/package.py
index f5c9494ab5..a53a4d3110 100644
--- a/var/spack/repos/builtin/packages/py-dnaio/package.py
+++ b/var/spack/repos/builtin/packages/py-dnaio/package.py
@@ -15,17 +15,18 @@ class PyDnaio(PythonPackage):
license("MIT")
+ version("1.2.0", sha256="d0528c23516fe4e947970bdef33c423f0a30ab3b083bd4f6f049fd66d8cef803")
version("0.10.0", sha256="de51a50948f00b864297d74eddb588fbee5ac229855754e77564d18b24619d18")
version("0.9.1", sha256="a1a14181995b27197b7e2b8897994a3107c649b9fc2dfe263caff3c455b0d0c4")
version("0.4.2", sha256="fa55a45bfd5d9272409b714158fb3a7de5dceac1034a0af84502c7f503ee84f8")
version("0.3", sha256="47e4449affad0981978fe986684fc0d9c39736f05a157f6cf80e54dae0a92638")
- depends_on("py-setuptools@52:", type=("build", "run"))
- depends_on("py-setuptools-scm@6.2:", when="@0.4:", type="build")
- # 0.9.1 deps
depends_on("python@3.7:", type=("build", "run"), when="@0.9.1:")
+ # build deps
+ depends_on("py-setuptools@52:", type="build")
+ depends_on("py-setuptools-scm@6.2:", type="build", when="@0.4:")
depends_on("py-cython@0.29.20:", type="build", when="@0.9.1:")
+ # run deps
depends_on("py-xopen@1.4.0:", type=("build", "run"), when="@0.9.1:")
- # older deps
+ depends_on("py-xopen@0.8.2:", type=("build", "run"), when="@0.4:")
depends_on("py-xopen", type=("build", "run"))
- depends_on("py-xopen@0.8.2:", when="@0.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dnspython/package.py b/var/spack/repos/builtin/packages/py-dnspython/package.py
index 5b4dc07610..e445071890 100644
--- a/var/spack/repos/builtin/packages/py-dnspython/package.py
+++ b/var/spack/repos/builtin/packages/py-dnspython/package.py
@@ -15,7 +15,12 @@ class PyDnspython(PythonPackage):
license("ISC")
+ version("2.6.1", sha256="e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc")
version("2.2.1", sha256="0f7569a4a6ff151958b64304071d370daa3243d15941a7beedf0c9fe5105603e")
- depends_on("python@3.6:3", type=("build", "run"))
- depends_on("py-poetry-core", type="build")
+ depends_on("python@3.8:", type=("build", "run"), when="@2.5:")
+ depends_on("python@3.7:", type=("build", "run"), when="@2.4:")
+ depends_on("python@3.6:3", type=("build", "run"), when="@:2.3")
+ depends_on("py-poetry-core", type="build", when="@:2.3")
+ depends_on("py-hatchling@1.17:", type="build", when="@2.4:")
+ depends_on("py-hatchling@1.21:", type="build", when="@2.6:")
diff --git a/var/spack/repos/builtin/packages/py-docopt-ng/package.py b/var/spack/repos/builtin/packages/py-docopt-ng/package.py
new file mode 100644
index 0000000000..7a0c927469
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-docopt-ng/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDocoptNg(PythonPackage):
+ """Command-line interface description language."""
+
+ homepage = "https://github.com/jazzband/docopt-ng"
+ pypi = "docopt-ng/docopt_ng-0.6.2.tar.gz"
+
+ license("MIT", checked_by="matz-e")
+
+ version("0.9.0", sha256="91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7")
+
+ depends_on("py-pdm-backend", type="build")
diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py
index 537c0ea2ec..23cf1ef04f 100644
--- a/var/spack/repos/builtin/packages/py-docutils/package.py
+++ b/var/spack/repos/builtin/packages/py-docutils/package.py
@@ -15,7 +15,7 @@ class PyDocutils(PythonPackage):
easy to read, easy to use, what-you-see-is-what-you-get plaintext
markup language."""
- homepage = "http://docutils.sourceforge.net/"
+ homepage = "https://docutils.sourceforge.net/"
pypi = "docutils/docutils-0.15.2.tar.gz"
license("BSD-3-Clause")
diff --git a/var/spack/repos/builtin/packages/py-dogpile-cache/package.py b/var/spack/repos/builtin/packages/py-dogpile-cache/package.py
new file mode 100644
index 0000000000..1d14e0638c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dogpile-cache/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDogpileCache(PythonPackage):
+ """dogpile.cache is a Python caching API which provides a generic
+ interface to caching backends of any variety."""
+
+ homepage = "https://dogpilecache.sqlalchemy.org/en/latest/"
+ pypi = "dogpile.cache/dogpile.cache-1.3.3.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("1.3.3", sha256="f84b8ed0b0fb297d151055447fa8dcaf7bae566d4dbdefecdcc1f37662ab588b")
+
+ depends_on("py-setuptools@61.2:", type="build")
+ depends_on("py-decorator@4.0.0:", type=("build", "run"))
+ depends_on("py-stevedore@3.0.0:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.0.1:", type=("build", "run"), when="^python@:3.10")
diff --git a/var/spack/repos/builtin/packages/py-doit/package.py b/var/spack/repos/builtin/packages/py-doit/package.py
index fdd111efcd..c99091254f 100644
--- a/var/spack/repos/builtin/packages/py-doit/package.py
+++ b/var/spack/repos/builtin/packages/py-doit/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class PyDoit(PythonPackage):
"""doit - Automation Tool."""
- homepage = "http://pydoit.org/"
+ homepage = "https://pydoit.org/"
pypi = "doit/doit-0.36.0.tar.gz"
license("MIT")
version("0.36.0", sha256="71d07ccc9514cb22fe59d98999577665eaab57e16f644d04336ae0b4bae234bc")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cloudpickle", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-dotmap/package.py b/var/spack/repos/builtin/packages/py-dotmap/package.py
new file mode 100644
index 0000000000..e9033412ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dotmap/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyDotmap(PythonPackage):
+ """`DotMap` is a dot-access `dict` subclass that allows dot access to items."""
+
+ homepage = "https://github.com/drgrib/dotmap"
+ pypi = "dotmap/dotmap-1.3.30.tar.gz"
+
+ maintainers("jonas-eschle")
+ license("MIT", checked_by="jonas-eschle")
+
+ version("1.3.30", sha256="5821a7933f075fb47563417c0e92e0b7c031158b4c9a6a7e56163479b658b368")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dotnetcore2/package.py b/var/spack/repos/builtin/packages/py-dotnetcore2/package.py
index 901f10bcc3..7838bc1d02 100644
--- a/var/spack/repos/builtin/packages/py-dotnetcore2/package.py
+++ b/var/spack/repos/builtin/packages/py-dotnetcore2/package.py
@@ -13,18 +13,18 @@ class PyDotnetcore2(PythonPackage):
homepage = "https://github.com/dotnet/core"
+ skip_version_audit = ["platform=windows"]
+
if sys.platform == "darwin":
version(
"2.1.14",
sha256="68182f4b704db401b2012c10ed8a19561f8d487063632f8731c2e58960ca9242",
- expand=False,
url="https://pypi.io/packages/py3/d/dotnetcore2/dotnetcore2-2.1.14-py3-none-macosx_10_9_x86_64.whl",
)
elif sys.platform.startswith("linux"):
version(
"2.1.14",
sha256="d8d83ac30c22a0e48a9a881e117d98da17f95c4098cb9500a35e323b8e4ab737",
- expand=False,
url="https://pypi.io/packages/py3/d/dotnetcore2/dotnetcore2-2.1.14-py3-none-manylinux1_x86_64.whl",
)
diff --git a/var/spack/repos/builtin/packages/py-downhill/package.py b/var/spack/repos/builtin/packages/py-downhill/package.py
index 26fdfb3364..601a8bd821 100644
--- a/var/spack/repos/builtin/packages/py-downhill/package.py
+++ b/var/spack/repos/builtin/packages/py-downhill/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyDownhill(PythonPackage):
"""Stochastic optimization routines for Theano"""
- homepage = "http://github.com/lmjohns3/downhill"
+ homepage = "https://github.com/lmjohns3/downhill"
pypi = "downhill/downhill-0.4.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-dpath/package.py b/var/spack/repos/builtin/packages/py-dpath/package.py
index fca145be19..b6d544b544 100644
--- a/var/spack/repos/builtin/packages/py-dpath/package.py
+++ b/var/spack/repos/builtin/packages/py-dpath/package.py
@@ -8,16 +8,14 @@ from spack.package import *
class PyDpath(PythonPackage):
- """A python library for accessing and searching dictionaries via
- /slashed/paths ala xpath."""
+ """Filesystem-like pathing and searching for dictionaries."""
- homepage = "https://github.com/akesterson/dpath-python"
- pypi = "dpath/dpath-2.0.1.tar.gz"
+ homepage = "https://github.com/dpath-maintainers/dpath-python"
+ pypi = "dpath/dpath-2.1.6.tar.gz"
license("MIT")
+ version("2.1.6", sha256="f1e07c72e8605c6a9e80b64bc8f42714de08a789c7de417e49c3f87a19692e47")
version("2.0.1", sha256="bea06b5f4ff620a28dfc9848cf4d6b2bfeed34238edeb8ebe815c433b54eb1fa")
- depends_on("python@2.7:", type=("build", "run"))
- # pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-dulwich/package.py b/var/spack/repos/builtin/packages/py-dulwich/package.py
index 928e7d5eff..6e9c5027a1 100644
--- a/var/spack/repos/builtin/packages/py-dulwich/package.py
+++ b/var/spack/repos/builtin/packages/py-dulwich/package.py
@@ -24,6 +24,8 @@ class PyDulwich(PythonPackage):
version("0.20.15", sha256="fb1773373ec2af896031f8312af6962a1b8b0176a2de3fb3d84a84ec04498888")
version("0.20.14", sha256="21d6ee82708f7c67ce3fdcaf1f1407e524f7f4f7411a410a972faa2176baec0d")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@61.2:", when="@0.21.6", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-certifi", when="@:0.20.44", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-earth2mip/package.py b/var/spack/repos/builtin/packages/py-earth2mip/package.py
new file mode 100644
index 0000000000..c6cfc0e796
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-earth2mip/package.py
@@ -0,0 +1,83 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEarth2mip(PythonPackage):
+ """Earth-2 Model Intercomparison Project (MIP).
+
+ A python framework that enables climate researchers and scientists to explore
+ and experiment with AI models for weather and climate.
+ """
+
+ homepage = "https://github.com/NVIDIA/earth2mip"
+ url = "https://github.com/NVIDIA/earth2mip/archive/refs/tags/v0.1.0.tar.gz"
+ git = "https://github.com/NVIDIA/earth2mip.git"
+
+ maintainers("adamjstewart")
+
+ license("Apache-2.0")
+
+ version("main", branch="main")
+ version("0.1.0", sha256="a49d0607893013783d30bfcb2f80412014ab535fbcc1e96dd139b78819bd98ab")
+
+ variant("pangu", default=False, description="Build dependencies needed for Pangu-Weather")
+ variant("graphcast", default=False, description="Build dependencies needed for GraphCast")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:")
+ depends_on("py-altair@4.2.2:")
+ depends_on("py-boto3@1.26.0:", when="@main")
+ depends_on("py-cdsapi@0.6.1:")
+ depends_on("py-cfgrib@0.9.10.3:")
+ depends_on("py-cftime")
+ depends_on("py-dask@2023.1.0:")
+ depends_on("py-distributed@2023.1.0:")
+ depends_on("py-eccodes@1.4.0:")
+ depends_on("py-ecmwflibs@0.5.2:")
+ depends_on("py-ecmwf-opendata@0.2.0:", when="@main")
+ depends_on("py-einops")
+ depends_on("py-fsspec")
+ depends_on("py-h5py@3.2.0:")
+ depends_on("py-h5netcdf@1.0.0:")
+ depends_on("py-importlib-metadata@6.7.0:")
+ depends_on("py-joblib@1.1.0:")
+ depends_on("py-loguru@0.6.0:", when="@main")
+ depends_on("py-netcdf4@1.6.4:")
+ depends_on("py-numpy")
+ depends_on("py-nvidia-modulus@0.4.0:")
+ depends_on("py-pandas@1.5.3:")
+ depends_on("py-properscoring@0.1:")
+ depends_on("py-pydantic@1.10:1.10.11")
+ depends_on("py-pytest-timeout@2.1.0:", when="@main")
+ depends_on("py-pytest-asyncio@0.21.0:")
+ depends_on("py-pytest-regtest")
+ depends_on("py-pytest@7.0.0:")
+ depends_on("py-python-dotenv@1.0.0:")
+ depends_on("py-s3fs")
+ depends_on("py-setuptools@38.4:")
+ depends_on("py-torch@1.13:")
+ depends_on("py-torch-harmonics@0.5.0:")
+ depends_on("py-tqdm@4.65.0:")
+ depends_on("py-typer")
+ depends_on("py-xarray")
+ depends_on("py-xskillscore@0.0.24:")
+ depends_on("py-zarr@2.14.2:")
+
+ with default_args(type="run"):
+ with when("+pangu"):
+ depends_on("py-onnxruntime@1.15.1:")
+
+ with when("+graphcast"):
+ depends_on("py-flax@0.7.3", when="@main")
+ depends_on("py-jax@0.4.16")
+ depends_on("py-graphcast@0.1")
+ depends_on("py-gcsfs")
+ depends_on("py-gcsfs@2023.6.0:", when="@0.1.0")
diff --git a/var/spack/repos/builtin/packages/py-easybuild-framework/package.py b/var/spack/repos/builtin/packages/py-easybuild-framework/package.py
index 7f18df00f3..233009c960 100644
--- a/var/spack/repos/builtin/packages/py-easybuild-framework/package.py
+++ b/var/spack/repos/builtin/packages/py-easybuild-framework/package.py
@@ -21,4 +21,6 @@ class PyEasybuildFramework(PythonPackage):
version("4.0.0", sha256="f5c40345cc8b9b5750f53263ade6c9c3a8cd3dfab488d58f76ac61a8ca7c5a77")
depends_on("python@3.5:", type=("build", "run"))
+ # https://github.com/easybuilders/easybuild-framework/issues/3963
+ depends_on("python@:3.11", type=("build", "run"), when="@:4")
depends_on("py-setuptools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-eccodes/package.py b/var/spack/repos/builtin/packages/py-eccodes/package.py
index bff8f2fdc0..b53c545e4a 100644
--- a/var/spack/repos/builtin/packages/py-eccodes/package.py
+++ b/var/spack/repos/builtin/packages/py-eccodes/package.py
@@ -15,6 +15,7 @@ class PyEccodes(PythonPackage):
license("Apache-2.0")
version("1.5.0", sha256="e70c8f159140c343c215fd608ddf533be652ff05ad2ff17243c7b66cf92127fa")
+ version("1.4.2", sha256="63fa80a1d1b445904f486bc396a6a6605df029f4e215acc28ceb1a1ff5eb664f")
version("1.3.2", sha256="f282adfdc1bc658356163c9cef1857d4b2bae99399660d3d4fcb145a52d3b2a6")
depends_on("py-setuptools", type="build")
@@ -42,5 +43,4 @@ class PyEccodes(PythonPackage):
def test_selfcheck(self):
"""checking system setup"""
- python = self.spec["python"].command
python("-m", "eccodes", "selfcheck")
diff --git a/var/spack/repos/builtin/packages/py-ecmwf-opendata/package.py b/var/spack/repos/builtin/packages/py-ecmwf-opendata/package.py
new file mode 100644
index 0000000000..65636fee6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ecmwf-opendata/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEcmwfOpendata(PythonPackage):
+ """A package to download ECMWF open data."""
+
+ homepage = "https://github.com/ecmwf/ecmwf-opendata"
+ pypi = "ecmwf-opendata/ecmwf-opendata-0.3.3.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.3.3", sha256="6f3181c7872b72e5529d2b4b7ec6ff08d37c37beee0a498f7f286410be178c6a")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-multiurl@0.2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ecmwflibs/package.py b/var/spack/repos/builtin/packages/py-ecmwflibs/package.py
new file mode 100644
index 0000000000..5257a909e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ecmwflibs/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEcmwflibs(PythonPackage):
+ """A Python package that wraps some of ECMWF libraries to be used by
+ Python interfaces to ECMWF software.
+ """
+
+ homepage = "https://github.com/ecmwf/ecmwflibs"
+ url = "https://github.com/ecmwf/ecmwflibs/archive/refs/tags/0.6.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.6.1", sha256="9f2153d1b4a07038b975b7d6bb89bbf9e88d6bc4e2ef4d4e067e58a2fb5270d3")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-findlibs", type=("build", "run"))
+ depends_on("eccodes")
+ depends_on("magics")
+
+ def patch(self):
+ # Instruct setup.py where to find dependencies
+ library_dirs = self.spec["eccodes"].libs.directories + self.spec["magics"].libs.directories
+ include_dirs = (
+ self.spec["eccodes"].headers.directories + self.spec["magics"].headers.directories
+ )
+ setup = FileFilter("setup.py")
+ setup.filter("library_dirs=.*", f"library_dirs={library_dirs},")
+ setup.filter("include_dirs=.*", f"include_dirs={include_dirs},")
diff --git a/var/spack/repos/builtin/packages/py-ecos/package.py b/var/spack/repos/builtin/packages/py-ecos/package.py
index d1e44f9ff1..3eca689c11 100644
--- a/var/spack/repos/builtin/packages/py-ecos/package.py
+++ b/var/spack/repos/builtin/packages/py-ecos/package.py
@@ -22,6 +22,8 @@ class PyEcos(PythonPackage):
"2.0.7.post1", sha256="83e90f42b3f32e2a93f255c3cfad2da78dbd859119e93844c45d2fca20bdc758"
)
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.6:", type=("build", "run"))
depends_on("py-scipy@0.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-edfio/package.py b/var/spack/repos/builtin/packages/py-edfio/package.py
new file mode 100644
index 0000000000..6fcf40459f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-edfio/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEdfio(PythonPackage):
+ """Read and write EDF/EDF+ files."""
+
+ homepage = "https://github.com/the-siesta-group/edfio"
+ pypi = "edfio/edfio-0.4.3.tar.gz"
+ git = "https://github.com/the-siesta-group/edfio"
+
+ license("Apache-2.0")
+
+ version("0.4.3", sha256="9250e67af190379bb3432356b23c441a99682e97159ea58d4507b0827175b487")
+
+ depends_on("python@3.9:3", type=("build", "run"))
+ depends_on("py-poetry-core@1:", type="build")
+ depends_on("py-poetry-dynamic-versioning@1", type="build")
+
+ depends_on("py-numpy@1.22.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-edflib-python/package.py b/var/spack/repos/builtin/packages/py-edflib-python/package.py
new file mode 100644
index 0000000000..cb540ec79b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-edflib-python/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEdflibPython(PythonPackage):
+ """Library to read/write EDF+/BDF+ files written in pure Python by the same
+ author as the original EDFlib."""
+
+ homepage = "https://www.teuniz.net/edflib_python/"
+ pypi = "EDFlib-Python/EDFlib-Python-1.0.8.tar.gz"
+ git = "https://gitlab.com/Teuniz/EDFlib-Python"
+
+ license("BSD-3-Clause")
+
+ version("1.0.8", sha256="42de3b7980809f37fcc44e3cddc837a3237b69b937a81335dd1f9ffaaf3f2e19")
+
+ depends_on("py-setuptools@42:", type="build")
+
+ depends_on("py-numpy@1.17:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-editables/package.py b/var/spack/repos/builtin/packages/py-editables/package.py
index 990b2db11f..8cc8f18bd9 100644
--- a/var/spack/repos/builtin/packages/py-editables/package.py
+++ b/var/spack/repos/builtin/packages/py-editables/package.py
@@ -12,7 +12,10 @@ class PyEditables(PythonPackage):
homepage = "https://github.com/pfmoore/editables"
pypi = "editables/editables-0.3.tar.gz"
+ version("0.5", sha256="309627d9b5c4adc0e668d8c6fa7bac1ba7c8c5d415c2d27f60f081f8e80d1de2")
+ version("0.4", sha256="dc322c42e7ccaf19600874035a4573898d88aadd07e177c239298135b75da772")
version("0.3", sha256="167524e377358ed1f1374e61c268f0d7a4bf7dbd046c656f7b410cde16161b1a")
depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools@42:", type="build", when="@:0.3")
+ depends_on("py-flit-core@3.3:", type="build", when="@0.4:")
diff --git a/var/spack/repos/builtin/packages/py-editdistance/package.py b/var/spack/repos/builtin/packages/py-editdistance/package.py
index ca627c3161..7c717519c8 100644
--- a/var/spack/repos/builtin/packages/py-editdistance/package.py
+++ b/var/spack/repos/builtin/packages/py-editdistance/package.py
@@ -22,6 +22,8 @@ class PyEditdistance(PythonPackage):
version("0.6.2", tag="v0.6.2", commit="3f5a5b0299f36662349df0917352a42c620e3dd4")
version("0.4", sha256="c765db6f8817d38922e4a50be4b9ab338b2c539377b6fcf0bca11dea72eeb8c1")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython", when="@0.6.2:", type="build")
depends_on("python@3.6:", when="@0.6.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-edlib/package.py b/var/spack/repos/builtin/packages/py-edlib/package.py
index f9f070eb78..c4cf4feaaa 100644
--- a/var/spack/repos/builtin/packages/py-edlib/package.py
+++ b/var/spack/repos/builtin/packages/py-edlib/package.py
@@ -18,4 +18,6 @@ class PyEdlib(PythonPackage):
version("1.3.9", sha256="64c3dfab3ebe3e759565a0cc71eb4df23cf3ce1713fd558af3c473dddc2a3766")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-eeglabio/package.py b/var/spack/repos/builtin/packages/py-eeglabio/package.py
new file mode 100644
index 0000000000..3a31cf77b3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-eeglabio/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEeglabio(PythonPackage):
+ """I/O support for EEGLAB files in Python."""
+
+ homepage = "https://github.com/jackz314/eeglabio"
+ pypi = "eeglabio/eeglabio-0.0.2.post4.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version(
+ "0.0.2.post4", sha256="64ccaca0ec1b0aa78ca6569ed3581ea601dec51ae6a3b2971e9dc82f54d95f39"
+ )
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-efel/package.py b/var/spack/repos/builtin/packages/py-efel/package.py
index 2a1282c389..26fa4ce358 100644
--- a/var/spack/repos/builtin/packages/py-efel/package.py
+++ b/var/spack/repos/builtin/packages/py-efel/package.py
@@ -22,5 +22,7 @@ class PyEfel(PythonPackage):
version("5.2.0", sha256="ed2c5efe22a4c703a4d9e47775b939009e1456713ac896898ebabf177c60b1dc")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-einconv/package.py b/var/spack/repos/builtin/packages/py-einconv/package.py
new file mode 100644
index 0000000000..6a6c23dacd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-einconv/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEinconv(PythonPackage):
+ """Convolutions as tensor contractions (einsums) for PyTorch."""
+
+ homepage = "https://github.com/f-dangel/einconv"
+ pypi = "einconv/einconv-0.1.0.tar.gz"
+
+ license("MIT")
+
+ version("0.1.0", sha256="6b103881b1268e43d581f285da4fa72b073c95f31b92575133bafed9929b6d98")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@38.3:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch")
+ depends_on("py-einops")
diff --git a/var/spack/repos/builtin/packages/py-einops/package.py b/var/spack/repos/builtin/packages/py-einops/package.py
index 7bb19aafbf..d2c3770e3a 100644
--- a/var/spack/repos/builtin/packages/py-einops/package.py
+++ b/var/spack/repos/builtin/packages/py-einops/package.py
@@ -15,7 +15,9 @@ class PyEinops(PythonPackage):
pypi = "einops/einops-0.3.2.tar.gz"
license("MIT")
+ maintainers("adamjstewart")
+ version("0.8.0", sha256="63486517fed345712a8385c100cb279108d9d47e6ae59099b07657e983deae85")
version("0.7.0", sha256="b2b04ad6081a3b227080c9bf5e3ace7160357ff03043cd66cc5b2319eb7031d1")
version("0.6.1", sha256="f95f8d00f4ded90dbc4b19b6f98b177332614b0357dde66997f3ae5d474dc8c8")
version("0.6.0", sha256="6f6c78739316a2e3ccbce8052310497e69da092935e4173f2e76ec4e3a336a35")
diff --git a/var/spack/repos/builtin/packages/py-elephant/package.py b/var/spack/repos/builtin/packages/py-elephant/package.py
index 2b8a0abfc1..9190398cfc 100644
--- a/var/spack/repos/builtin/packages/py-elephant/package.py
+++ b/var/spack/repos/builtin/packages/py-elephant/package.py
@@ -33,6 +33,8 @@ class PyElephant(PythonPackage):
version("0.4.1", sha256="86b21a44cbacdc09a6ba6f51738dcd5b42ecd553d73acb29f71a0be7c82eac81")
version("0.3.0", sha256="747251ccfb5820bdead6391411b5faf205b4ddf3ababaefe865f50b16540cfef")
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Install documentation dependencies")
variant(
"extras", default=False, description="Build with extras for GPFA, ASSET", when="@0.6.4:"
diff --git a/var/spack/repos/builtin/packages/py-ema-pytorch/package.py b/var/spack/repos/builtin/packages/py-ema-pytorch/package.py
new file mode 100644
index 0000000000..dadf3aaecf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ema-pytorch/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEmaPytorch(PythonPackage):
+ """Easy way to keep track of exponential moving average version of your
+ pytorch module"""
+
+ homepage = "https://github.com/lucidrains/ema-pytorch"
+ pypi = "ema_pytorch/ema_pytorch-0.5.1.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("0.7.3", sha256="de640f1d1a054c79607aebfcfd4b8dfff1fba1110bf0c8f7d37517637450938a")
+ version("0.5.1", sha256="e825212a44e8faae5d2cf2a1349961c4416cba0496ffa64d37718d8b06f206b2")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch@2:", when="@0.7:", type=("build", "run"))
+ depends_on("py-torch@1.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-email-validator/package.py b/var/spack/repos/builtin/packages/py-email-validator/package.py
index 130824d5c3..151f65c7ec 100644
--- a/var/spack/repos/builtin/packages/py-email-validator/package.py
+++ b/var/spack/repos/builtin/packages/py-email-validator/package.py
@@ -12,10 +12,13 @@ class PyEmailValidator(PythonPackage):
homepage = "https://github.com/JoshData/python-email-validator"
pypi = "email_validator/email_validator-1.3.1.tar.gz"
- license("CC0-1.0")
+ license("Unlicense", when="@2.1.1:", checked_by="wdconinc")
+ license("CC0-1.0", when="@:2.1.0", checked_by="wdconinc")
+ version("2.2.0", sha256="cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7")
version("1.3.1", sha256="d178c5c6fa6c6824e9b04f199cf23e79ac15756786573c190d2ad13089411ad2")
depends_on("py-setuptools", type="build")
+ depends_on("py-dnspython@2:", type=("build", "run"), when="@2:")
depends_on("py-dnspython@1.15:", type=("build", "run"))
depends_on("py-idna@2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-embedding-reader/package.py b/var/spack/repos/builtin/packages/py-embedding-reader/package.py
new file mode 100644
index 0000000000..5468cebc11
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-embedding-reader/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEmbeddingReader(PythonPackage):
+ """Embedding reader is a module to make it easy to read efficiently a large
+ collection of embeddings stored in any file system."""
+
+ homepage = "https://github.com/rom1504/embedding-reader"
+ # PyPI source is missing requirements.txt
+ url = "https://github.com/rom1504/embedding-reader/archive/refs/tags/1.7.0.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("1.7.0", sha256="3bae324a06d795ea025317fdcfeb6ef1632e37786bf171973e83543700bbef73")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-tqdm@4.62.3:4", type=("build", "run"))
+ depends_on("py-fsspec@2022.1.0:", type=("build", "run"))
+ depends_on("py-numpy@1.19.5:1", type=("build", "run"))
+ depends_on("py-pandas@1.1.5:2", type=("build", "run"))
+ depends_on("py-pyarrow@6.0.1:15", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ephem/package.py b/var/spack/repos/builtin/packages/py-ephem/package.py
index 74025e66cb..659d344c3c 100644
--- a/var/spack/repos/builtin/packages/py-ephem/package.py
+++ b/var/spack/repos/builtin/packages/py-ephem/package.py
@@ -17,5 +17,7 @@ class PyEphem(PythonPackage):
version("3.7.7.1", sha256="d9d05d85c0d38a79169acaef25964ac9df2d808f0d833354545b9ef681ff584d")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-eprosima-fastdds/package.py b/var/spack/repos/builtin/packages/py-eprosima-fastdds/package.py
index 1d65cd5f6c..ec965a1a25 100644
--- a/var/spack/repos/builtin/packages/py-eprosima-fastdds/package.py
+++ b/var/spack/repos/builtin/packages/py-eprosima-fastdds/package.py
@@ -21,6 +21,8 @@ class PyEprosimaFastdds(CMakePackage, PythonExtension):
version("1.2.2", sha256="78c53739a66544b8c91d0016560c267e11bd7fdaf727b3bfbffd44ae65c93c62")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.15:", type="build")
extends("python")
depends_on("py-pytest", type="test")
diff --git a/var/spack/repos/builtin/packages/py-espresso/package.py b/var/spack/repos/builtin/packages/py-espresso/package.py
index c189bb4540..ffa05d3a10 100644
--- a/var/spack/repos/builtin/packages/py-espresso/package.py
+++ b/var/spack/repos/builtin/packages/py-espresso/package.py
@@ -31,6 +31,8 @@ class PyEspresso(CMakePackage):
version("4.0.1", sha256="17b7268eeba652a77f861bc534cdd05d206e7641d203a9dd5029b44bd422304b")
version("4.0.0", sha256="8e128847447eebd843de24be9b4ad14aa19c028ae48879a5a4535a9683836e6b")
+ depends_on("cxx", type="build") # generated
+
# espressomd/espresso#2244 merge upstream
patch("2244.patch", when="@4.0.0")
diff --git a/var/spack/repos/builtin/packages/py-espressopp/package.py b/var/spack/repos/builtin/packages/py-espressopp/package.py
index ecb9512620..e52ffe7084 100644
--- a/var/spack/repos/builtin/packages/py-espressopp/package.py
+++ b/var/spack/repos/builtin/packages/py-espressopp/package.py
@@ -23,6 +23,9 @@ class PyEspressopp(CMakePackage):
version("master", branch="master")
version("3.0.0", sha256="63518e768a98179ad5ef3be96eabaa4d38063b34962e2278db7d59ed2bb8a32e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("ug", default=False, description="Build user guide")
variant("pdf", default=False, description="Build user guide in pdf format")
variant("dg", default=False, description="Build developer guide")
diff --git a/var/spack/repos/builtin/packages/py-ete3/package.py b/var/spack/repos/builtin/packages/py-ete3/package.py
index 07a5711870..a2dade451b 100644
--- a/var/spack/repos/builtin/packages/py-ete3/package.py
+++ b/var/spack/repos/builtin/packages/py-ete3/package.py
@@ -20,8 +20,11 @@ class PyEte3(PythonPackage):
license("GPL-3.0-only")
+ version("3.1.3", sha256="06a3b7fa8ed90187b076a8dbbe5b1b62acee94201d3c6e822f55f449601ef6f2")
version("3.1.2", sha256="4fc987b8c529889d6608fab1101f1455cb5cbd42722788de6aea9c7d0a8e59e9")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-etils/package.py b/var/spack/repos/builtin/packages/py-etils/package.py
index 59f1e0386d..ced24d6ab3 100644
--- a/var/spack/repos/builtin/packages/py-etils/package.py
+++ b/var/spack/repos/builtin/packages/py-etils/package.py
@@ -15,14 +15,23 @@ class PyEtils(PythonPackage):
license("Apache-2.0")
+ version("1.7.0", sha256="97b68fd25e185683215286ef3a54e38199b6245f5fe8be6bedc1189be4256350")
version("0.9.0", sha256="489103e9e499a566765c60458ee15d185cf0065f2060a4d16a68f8f46962ed0d")
variant("epath", default=False, description="with epath module")
+ variant("epy", default=False, description="with epy module")
- depends_on("python@3.7:", type=("build", "run"))
+ depends_on("python@3.10:", type=("build", "run"), when="@1.7:")
+ depends_on("py-flit-core@3.8:3", type="build", when="@1.7:")
+ depends_on("py-flit-core@3.5:3", type="build")
- depends_on("py-importlib-resources", type=("build", "run"), when="+epath")
- depends_on("py-typing-extensions", type=("build", "run"), when="+epath")
- depends_on("py-zipp", type=("build", "run"), when="+epath")
+ conflicts("~epy", when="+epath")
- depends_on("py-flit-core@3.5:3", type="build")
+ with when("+epath"):
+ depends_on("py-fsspec", type=("build", "run"), when="@1.7:")
+ depends_on("py-importlib-resources", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
+ depends_on("py-zipp", type=("build", "run"))
+
+ with when("+epy"):
+ depends_on("py-typing-extensions", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-eventlet/package.py b/var/spack/repos/builtin/packages/py-eventlet/package.py
index 03e440844d..e5bf12d6f8 100644
--- a/var/spack/repos/builtin/packages/py-eventlet/package.py
+++ b/var/spack/repos/builtin/packages/py-eventlet/package.py
@@ -10,11 +10,11 @@ class PyEventlet(PythonPackage):
"""Concurrent networking library for Python"""
homepage = "https://github.com/eventlet/eventlet"
- url = "https://github.com/eventlet/eventlet/releases/download/v0.22.0/eventlet-0.22.0.tar.gz"
+ url = "https://github.com/eventlet/eventlet/archive/refs/tags/v0.22.0.tar.gz"
license("MIT")
- version("0.22.0", sha256="6d22464f448fdf144a9d566c157299d686bbe324554dd7729df9ccd05ca66439")
+ version("0.22.0", sha256="c4cc92268b82eb94d5e0de0592159157d68122d394f480e3f9a9d6ddb695655e")
depends_on("py-setuptools", type="build")
depends_on("py-greenlet@0.3:")
diff --git a/var/spack/repos/builtin/packages/py-evodiff/package.py b/var/spack/repos/builtin/packages/py-evodiff/package.py
new file mode 100644
index 0000000000..814f40510a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-evodiff/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyEvodiff(PythonPackage):
+ """Python package for generation of protein sequences and evolutionary alignments via \
+ discrete diffusion models"""
+
+ homepage = "https://github.com/microsoft/evodiff"
+ pypi = "evodiff/evodiff-1.1.0.tar.gz"
+
+ license("MIT", checked_by="ashim-mahara")
+
+ version("1.1.0", sha256="c1f2d7bd0e46ad244f1c55066caefc5ad9b1bcf4e836be1832311b8cd74e923f")
+
+ depends_on("py-setuptools@61.0:", type=("build"))
+
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-lmdb", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-sequence-models", type=("build", "run"))
+ depends_on("py-scikit-learn", type=("build", "run"))
+ depends_on("py-blosum", type=("build", "run"))
+ depends_on("py-seaborn", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-fair-esm", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-biotite", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-mdanalysis", type=("build", "run"))
+ depends_on("py-pdb-tools", type=("build", "run"))
+
+ # listed in the file setup.py but is not used anywhere in the source code
+ # depends_on("py-mlflow", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-exarl/package.py b/var/spack/repos/builtin/packages/py-exarl/package.py
index a4fde23a02..9a3db4675f 100644
--- a/var/spack/repos/builtin/packages/py-exarl/package.py
+++ b/var/spack/repos/builtin/packages/py-exarl/package.py
@@ -23,6 +23,8 @@ class PyExarl(PythonPackage):
version("update-spack", branch="update-spack")
version("0.1.0", tag="v0.1.0", commit="5f5b99884a92f86ea9f637524eca6f4393b9635f")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("git-lfs", type=("build"))
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-exodus-bundler/package.py b/var/spack/repos/builtin/packages/py-exodus-bundler/package.py
index cbb4fb6d43..8ac56eb41b 100644
--- a/var/spack/repos/builtin/packages/py-exodus-bundler/package.py
+++ b/var/spack/repos/builtin/packages/py-exodus-bundler/package.py
@@ -17,6 +17,8 @@ class PyExodusBundler(PythonPackage):
version("2.0.2", sha256="4e896a2034b94cf7b4fb33d86a68e29a7d3b08e57541e444db34dddc6ac1ef68")
+ depends_on("c", type="build") # generated
+
depends_on("musl", type="run", when="%apple-clang")
depends_on("musl", type="run", when="%clang")
depends_on("musl", type="run", when="%gcc")
diff --git a/var/spack/repos/builtin/packages/py-expandvars/package.py b/var/spack/repos/builtin/packages/py-expandvars/package.py
new file mode 100644
index 0000000000..7d88ca2a93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-expandvars/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyExpandvars(PythonPackage):
+ """Expand system variables Unix style."""
+
+ homepage = "https://github.com/sayanarijit/expandvars"
+ pypi = "expandvars/expandvars-0.12.0.tar.gz"
+
+ license("MIT")
+
+ version("0.12.0", sha256="7d1adfa55728cf4b5d812ece3d087703faea953e0c0a1a78415de9df5024d844")
+
+ depends_on("py-hatchling", type="build")
diff --git a/var/spack/repos/builtin/packages/py-extension-helpers/package.py b/var/spack/repos/builtin/packages/py-extension-helpers/package.py
index 298d78a8b2..4005310244 100644
--- a/var/spack/repos/builtin/packages/py-extension-helpers/package.py
+++ b/var/spack/repos/builtin/packages/py-extension-helpers/package.py
@@ -20,5 +20,7 @@ class PyExtensionHelpers(PythonPackage):
version("0.1", sha256="ac8a6fe91c6d98986a51a9f08ca0c7945f8fd70d95b662ced4040ae5eb973882")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@30.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-f90wrap/package.py b/var/spack/repos/builtin/packages/py-f90wrap/package.py
index 705cddc2e8..096defc24d 100644
--- a/var/spack/repos/builtin/packages/py-f90wrap/package.py
+++ b/var/spack/repos/builtin/packages/py-f90wrap/package.py
@@ -19,6 +19,9 @@ class PyF90wrap(PythonPackage):
version("0.2.6", sha256="e0748eb5e288be7f47829a272fc230373469fb40afccddf91e9973c56da43dd4")
version("0.2.3", sha256="5577ea92934c5aad378df21fb0805b5fb433d6f2b8b9c1bf1a9ec1e3bf842cff")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# TODO errors with python 3.6 due to UnicodeDecodeError
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fair-esm/package.py b/var/spack/repos/builtin/packages/py-fair-esm/package.py
new file mode 100644
index 0000000000..a157ebbc0f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fair-esm/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFairEsm(PythonPackage):
+ """Evolutionary Scale Modeling"""
+
+ homepage = "https://github.com/facebookresearch/esm"
+ pypi = "fair-esm/fair-esm-2.0.0.tar.gz"
+
+ license("MIT")
+
+ version("2.0.0", sha256="4ed34d4598ec75ed6550a4e581d023bf8d4a8375317ecba6269bb68135f80c85")
+
+ depends_on("py-setuptools@59.5.0:", type=("build"))
+
+ variant("esmfold", default=True, description="Enable dependencies for OpenFold")
+ depends_on("py-biopython@1.79:", when="+esmfold", type=("build", "run"))
+
+ depends_on("py-deepspeed", type=("build", "run"))
+ depends_on("py-dm-tree", type=("build", "run"))
+ depends_on("py-pytorch-lightning", type=("build", "run"))
+ depends_on("py-omegaconf", type=("build", "run"))
+ depends_on("py-ml-collections", type=("build", "run"))
+ depends_on("py-einops", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-falcon/package.py b/var/spack/repos/builtin/packages/py-falcon/package.py
index c6475fd12b..2383ae4bfe 100644
--- a/var/spack/repos/builtin/packages/py-falcon/package.py
+++ b/var/spack/repos/builtin/packages/py-falcon/package.py
@@ -11,7 +11,7 @@ class PyFalcon(PythonPackage):
building large-scale app backends and microservices."""
homepage = "https://github.com/falconry/falcon"
- url = "https://github.com/falconry/falcon/archive/3.0.0a2.tar.gz"
+ url = "https://github.com/falconry/falcon/archive/refs/tags/3.0.0a2.tar.gz"
license("Apache-2.0")
diff --git a/var/spack/repos/builtin/packages/py-fallocate/package.py b/var/spack/repos/builtin/packages/py-fallocate/package.py
index ad9927e94f..6946b25f6e 100644
--- a/var/spack/repos/builtin/packages/py-fallocate/package.py
+++ b/var/spack/repos/builtin/packages/py-fallocate/package.py
@@ -16,5 +16,7 @@ class PyFallocate(PythonPackage):
version("1.6.4", sha256="85ebeb2786761fbe80d88c52590a610bd3425fc89e188c208a3f261a5bd6acb3")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fastapi/package.py b/var/spack/repos/builtin/packages/py-fastapi/package.py
index 36e48025b3..359a0f8153 100644
--- a/var/spack/repos/builtin/packages/py-fastapi/package.py
+++ b/var/spack/repos/builtin/packages/py-fastapi/package.py
@@ -10,34 +10,60 @@ from spack.package import *
class PyFastapi(PythonPackage):
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
- homepage = "https://github.com/tiangolo/fastapi"
+ homepage = "https://github.com/fastapi/fastapi"
pypi = "fastapi/fastapi-0.88.0.tar.gz"
license("MIT")
- version("0.98.0", sha256="0d3c18886f652038262b5898fec6b09f4ca92ee23e9d9b1d1d24e429f84bf27b")
- version("0.88.0", sha256="915bf304180a0e7c5605ec81097b7d4cd8826ff87a02bb198e336fb9f3b5ff02")
+ version("0.115.4", sha256="db653475586b091cb8b2fec2ac54a680ac6a158e07406e1abae31679e8826349")
+ version("0.110.2", sha256="b53d673652da3b65e8cd787ad214ec0fe303cad00d2b529b86ce7db13f17518d")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-24762
+ version(
+ "0.98.0", sha256="0d3c18886f652038262b5898fec6b09f4ca92ee23e9d9b1d1d24e429f84bf27b"
+ )
+ version(
+ "0.88.0", sha256="915bf304180a0e7c5605ec81097b7d4cd8826ff87a02bb198e336fb9f3b5ff02"
+ )
variant("all", default=False, description="Build all optional dependencies")
- depends_on("py-hatchling@1.13:", when="@0.98:", type="build")
- depends_on("py-hatchling", type="build")
- depends_on("py-starlette@0.27", when="@0.95.2:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.104:", type=("build", "run"))
+
+ depends_on("py-pdm-backend", when="@0.110.3:", type="build")
+ depends_on("py-hatchling@1.13:", when="@0.98:0.110.2", type="build")
+ depends_on("py-hatchling", when="@:0.110.2", type="build")
+
+ depends_on("py-starlette@0.40:0.41", when="@0.115.3:", type=("build", "run"))
+ depends_on("py-starlette@0.37.2:0.40", when="@0.115.2", type=("build", "run"))
+ depends_on("py-starlette@0.37.2:0.38", when="@0.112.1:0.115.1", type=("build", "run"))
+ depends_on("py-starlette@0.37.2:0.37", when="@0.110.1:0.112.0", type=("build", "run"))
+ depends_on("py-starlette@0.36.3:0.36", when="@0.109.2:0.110.0", type=("build", "run"))
+ depends_on("py-starlette@0.35:0.35", when="@0.109.0:0.109.1", type=("build", "run"))
+ depends_on("py-starlette@0.29:0.32", when="@0.108.0:0.108", type=("build", "run"))
+ depends_on("py-starlette@0.28", when="@0.107.0:0.107", type=("build", "run"))
+ depends_on("py-starlette@0.27", when="@0.95.2:0.106", type=("build", "run"))
depends_on("py-starlette@0.22.0", when="@:0.89.1", type=("build", "run"))
+ depends_on("py-pydantic@1.7.4:1,2.1.1:2", when="@0.101:", type=("build", "run"))
depends_on("py-pydantic@1.7.4:1", when="@0.96.1:", type=("build", "run"))
depends_on("py-pydantic@1.6.2:1", when="@:0.96.0", type=("build", "run"))
+ depends_on("py-typing-extensions@4.8.0:", when="@0.104:", type=("build", "run"))
- conflicts("^py-pydantic@1.7.0:1.7.3,1.8.0:1.8.1")
+ conflicts("^py-pydantic@1.7.0:1.7.3,1.8.0:1.8.1,2.0,2.1.0")
with when("+all"):
depends_on("py-httpx@0.23:", type=("build", "run"))
depends_on("py-jinja2@2.11.2:", type=("build", "run"))
+ depends_on("py-python-multipart@0.0.7:", when="@0.109.1:", type=("build", "run"))
depends_on("py-python-multipart@0.0.5:", type=("build", "run"))
depends_on("py-itsdangerous@1.1:", type=("build", "run"))
depends_on("py-pyyaml@5.3.1:", type=("build", "run"))
depends_on("py-ujson@4.0.1:", type=("build", "run"))
depends_on("py-orjson@3.2.1:", type=("build", "run"))
+ depends_on("py-email-validator@2.0.0:", when="@0.100:", type=("build", "run"))
depends_on("py-email-validator@1.1.1:", type=("build", "run"))
depends_on("py-uvicorn@0.12:+standard", type=("build", "run"))
+ depends_on("py-pydantic-settings@2.0.0:", when="@0.100:", type=("build", "run"))
+ depends_on("py-pydantic-extra-types@2.0.0:", when="@0.100:", type=("build", "run"))
conflicts("^py-ujson@4.0.2,4.1.0,4.2.0,4.3.0,5.0.0,5.1.0")
diff --git a/var/spack/repos/builtin/packages/py-fastcache/package.py b/var/spack/repos/builtin/packages/py-fastcache/package.py
index 0137184e1a..f0fa374068 100644
--- a/var/spack/repos/builtin/packages/py-fastcache/package.py
+++ b/var/spack/repos/builtin/packages/py-fastcache/package.py
@@ -16,4 +16,6 @@ class PyFastcache(PythonPackage):
version("1.1.0", sha256="6de1b16e70335b7bde266707eb401a3aaec220fb66c5d13b02abf0eab8be782b")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fastcluster/package.py b/var/spack/repos/builtin/packages/py-fastcluster/package.py
index 0eb63dc1a1..824913fb23 100644
--- a/var/spack/repos/builtin/packages/py-fastcluster/package.py
+++ b/var/spack/repos/builtin/packages/py-fastcluster/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class PyFastcluster(PythonPackage):
"""Fast hierarchical clustering routines for R and Python."""
- homepage = "http://danifold.net/"
+ homepage = "https://danifold.net/"
pypi = "fastcluster/fastcluster-1.1.26.tar.gz"
license("BSD-2-Clause")
version("1.1.26", sha256="a202f44a3b06f5cf9cdba3c67d6c523288922d6e6a1cdf737292f93759aa82f7")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-fastdtw/package.py b/var/spack/repos/builtin/packages/py-fastdtw/package.py
index a7dd56cd65..6341b00db3 100644
--- a/var/spack/repos/builtin/packages/py-fastdtw/package.py
+++ b/var/spack/repos/builtin/packages/py-fastdtw/package.py
@@ -21,6 +21,8 @@ class PyFastdtw(PythonPackage):
version("0.3.4", sha256="2350fa6ec36bcad186eaf81f46eff35181baf04e324f522de8aeb43d0243f64f")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fastfold/package.py b/var/spack/repos/builtin/packages/py-fastfold/package.py
index 6d741ead6c..4a49c573df 100644
--- a/var/spack/repos/builtin/packages/py-fastfold/package.py
+++ b/var/spack/repos/builtin/packages/py-fastfold/package.py
@@ -17,6 +17,8 @@ class PyFastfold(PythonPackage):
version("0.2.0", sha256="6760dbae9809b8b26219c9477489d34325807be504098901d0375fbdc3103f88")
+ depends_on("cxx", type="build") # generated
+
# From README:
depends_on("python@3.8:", type=("build", "run")) # Req Relaxed (was @3.8:3.9)
depends_on("cuda@11.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-fastpath/package.py b/var/spack/repos/builtin/packages/py-fastpath/package.py
index a94b8d545f..44d97624d4 100644
--- a/var/spack/repos/builtin/packages/py-fastpath/package.py
+++ b/var/spack/repos/builtin/packages/py-fastpath/package.py
@@ -19,5 +19,7 @@ class PyFastpath(PythonPackage):
version("1.9", sha256="3372d306a3c4e4e764b3995946132333726a229e9002879b9112779dd442b31a")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fastremap/package.py b/var/spack/repos/builtin/packages/py-fastremap/package.py
new file mode 100644
index 0000000000..4e3d1bb683
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fastremap/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFastremap(PythonPackage):
+ """Renumber and relabel Numpy arrays at C++ speed and physically convert rectangular
+ Numpy arrays between C and Fortran order using an in-place transposition"""
+
+ homepage = "https://github.com/seung-lab/fastremap/"
+ pypi = "fastremap/fastremap-1.14.1.tar.gz"
+
+ license("LGPL-3.0", checked_by="A-N-Other")
+
+ version("1.14.1", sha256="067d42d6cb3b1b0789889efd1d7fae58006c82ada4a8446d40e9e838b358ee7c")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("python@3.7:3", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pbr", type="build")
+ depends_on("py-cython", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-fastrlock/package.py b/var/spack/repos/builtin/packages/py-fastrlock/package.py
index e45bc5f3a7..02081e1d50 100644
--- a/var/spack/repos/builtin/packages/py-fastrlock/package.py
+++ b/var/spack/repos/builtin/packages/py-fastrlock/package.py
@@ -18,6 +18,8 @@ class PyFastrlock(PythonPackage):
version("0.8.1", sha256="8a5f2f00021c4ac72e4dab910dc1863c0e008a2e7fb5c843933ae9bcfc3d0802")
version("0.5", sha256="9ae1a31f6e069b5f0f28ba63c594d0c952065de0a375f7b491d21ebaccc5166f")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
# in newer pip versions --install-option does not exist
diff --git a/var/spack/repos/builtin/packages/py-faststructure/package.py b/var/spack/repos/builtin/packages/py-faststructure/package.py
index 256dc429cb..b9b90c490a 100644
--- a/var/spack/repos/builtin/packages/py-faststructure/package.py
+++ b/var/spack/repos/builtin/packages/py-faststructure/package.py
@@ -17,6 +17,8 @@ class PyFaststructure(PythonPackage):
version("1.0", sha256="f1bfb24bb5ecd108bc3a90145fad232012165c1e60608003f1c87d200f867b81")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
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 b3f011451f..5752cffa2a 100644
--- a/var/spack/repos/builtin/packages/py-fenics-basix/package.py
+++ b/var/spack/repos/builtin/packages/py-fenics-basix/package.py
@@ -17,29 +17,33 @@ class PyFenicsBasix(PythonPackage):
license("MIT")
version("main", branch="main")
+ version("0.9.0", sha256="60e96b2393084729b261cb10370f0e44d12735ab3dbd1f15890dec23b9e85329")
+ version("0.8.0", sha256="b299af82daf8fa3e4845e17f202491fe71b313bf6ab64c767a5287190b3dd7fe")
version("0.7.0", sha256="9bee81b396ee452eec8d9735f278cb44cb6994c6bc30aec8ed9bb4b12d83fa7f")
version("0.6.0", sha256="687ae53153c98facac4080dcdc7081701db1dcea8c5e7ae3feb72aec17f83304")
- version("0.5.1", sha256="69133476ac35f0bd0deccb480676030378c341d7dfb2adaca22cd16b7e1dc1cb")
- version("0.4.2", sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f")
+
+ depends_on("cxx", type="build") # generated
depends_on("fenics-basix@main", type=("build", "run"), when="@main")
+ depends_on("fenics-basix@0.9.0", type=("build", "run"), when="@0.9.0")
+ depends_on("fenics-basix@0.8.0", type=("build", "run"), when="@0.8.0")
depends_on("fenics-basix@0.7.0", type=("build", "run"), when="@0.7.0")
depends_on("fenics-basix@0.6.0", type=("build", "run"), when="@0.6.0")
- depends_on("fenics-basix@0.5.1", type=("build", "run"), when="@0.5.1")
- depends_on("fenics-basix@0.4.2", type=("build", "run"), when="@0.4.2")
# See python/CMakeLists.txt
+ depends_on("cmake@3.21:", when="@0.9:", type="build")
+ depends_on("cmake@3.19:", when="@0.8", type="build")
depends_on("cmake@3.16:", when="@:0.7", type="build")
- depends_on("cmake@3.19:", when="@0.8:", type="build")
# See python/pyproject.toml
- depends_on("python@3.8:", when="@0.7:", type=("build", "run"))
+ depends_on("python@3.9:", when="@0.8:", type=("build", "run"))
+ depends_on("python@3.8:", when="@:0.7", type=("build", "run"))
depends_on("py-numpy@1.21:", type=("build", "run"))
depends_on("py-pybind11@2.9.1:", when="@:0.7", type="build")
depends_on("py-setuptools@42:", when="@:0.7", type="build")
- depends_on("py-nanobind@1.6.0:", when="@0.8:", type="build")
- depends_on("py-scikit-build-core+pyproject@0.5.0:", when="@0.8:", type="build")
-
- depends_on("xtensor@0.23.10:", type="build", when="@:0.4")
+ depends_on("py-nanobind@2:", when="@0.10:", type="build")
+ depends_on("py-nanobind@1.6.0:", when="@0.8:0.9", type="build")
+ depends_on("py-scikit-build-core+pyproject@0.10:", when="@0.10:", type="build")
+ depends_on("py-scikit-build-core+pyproject@0.5.0:", when="@0.8:0.9", type="build")
build_directory = "python"
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 a54a5a694b..7ccfd32ddb 100644
--- a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py
+++ b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py
@@ -18,56 +18,61 @@ class PyFenicsDolfinx(PythonPackage):
license("LGPL-3.0-only")
version("main", branch="main")
+ version("0.9.0", sha256="b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1")
+ version("0.8.0", sha256="acf3104d9ecc0380677a6faf69eabfafc58d0cce43f7777e1307b95701c7cad9")
version("0.7.2", sha256="7d9ce1338ce66580593b376327f23ac464a4ce89ef63c105efc1a38e5eae5c0b")
version("0.6.0", sha256="eb8ac2bb2f032b0d393977993e1ab6b4101a84d54023a67206e3eac1a8d79b80")
- version("0.5.1", sha256="a570e3f6ed8e7c570e7e61d0e6fd44fa9dad2c5f8f1f48a6dc9ad22bacfbc973")
- version("0.5.0", sha256="503c70c01a44d1ffe48e052ca987693a49f8d201877652cabbe2a44eb3b7c040")
- version("0.4.1", sha256="68dcf29a26c750fcea5e02d8d58411e3b054313c3bf6fcbc1d0f08dd2851117f")
- depends_on("cmake@3.19:", type="build")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.21:", when="@0.9:", type="build")
+ depends_on("cmake@3.19:", when="@:0.8", type="build")
depends_on("hdf5", type="build")
depends_on("pkgconfig", type="build")
- depends_on("python@3.8:", when="@0.6.1:", type=("build", "run"))
- depends_on("python@3.8:3.10", when="@0.5:0.6.0", type=("build", "run"))
- depends_on("python@3.7:3.10", when="@0.4", type=("build", "run"))
+ depends_on("python@3.9:", when="@0.8:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.7", type=("build", "run"))
+ depends_on("python@3.8:3.10", when="@0.6.0", type=("build", "run"))
depends_on("fenics-dolfinx@main", when="@main")
+ depends_on("fenics-dolfinx@0.9.0", when="@0.9.0")
+ depends_on("fenics-dolfinx@0.8.0", when="@0.8.0")
depends_on("fenics-dolfinx@0.7.2", when="@0.7.2")
depends_on("fenics-dolfinx@0.6.0", when="@0.6.0")
- depends_on("fenics-dolfinx@0.5.1", when="@0.5.1")
- depends_on("fenics-dolfinx@0.5.0", when="@0.5.0")
- depends_on("fenics-dolfinx@0.4.1", when="@0.4.1")
depends_on("py-fenics-basix@main", type=("build", "run"), when="@main")
+ depends_on("py-fenics-basix@0.9", type=("build", "link"), when="@0.9")
+ depends_on("py-fenics-basix@0.8", type=("build", "link"), when="@0.8")
+
depends_on("fenics-basix@main", type=("build", "link"), when="@main")
+ depends_on("fenics-basix@0.9", type=("build", "link"), when="@0.9")
+ depends_on("fenics-basix@0.8", type=("build", "link"), when="@0.8")
depends_on("fenics-basix@0.7", type=("build", "link"), when="@0.7")
- depends_on("fenics-basix@0.6.0:0.6", type=("build", "link"), when="@0.6.0:0.6")
- depends_on("fenics-basix@0.5.1:0.5", type=("build", "link"), when="@0.5.0:0.5")
- depends_on("fenics-basix@0.4.2", type=("build", "link"), when="@0.4.1")
+ depends_on("fenics-basix@0.6", type=("build", "link"), when="@0.6")
depends_on("py-fenics-ffcx@main", type=("build", "run"), when="@main")
+ depends_on("py-fenics-ffcx@0.9", type=("build", "run"), when="@0.9")
+ depends_on("py-fenics-ffcx@0.8", type=("build", "run"), when="@0.8")
depends_on("py-fenics-ffcx@0.7", type=("build", "run"), when="@0.7")
depends_on("py-fenics-ffcx@0.6", type=("build", "run"), when="@0.6")
- depends_on("py-fenics-ffcx@0.5.0.post0", type=("build", "run"), when="@0.5.0:0.5")
- depends_on("py-fenics-ffcx@0.4.2", type=("build", "run"), when="@0.4.1")
depends_on("py-fenics-ufl@main", type=("build", "run"), when="@main")
+ depends_on("py-fenics-ufl@2024.2", type=("build", "run"), when="@0.9")
+ depends_on("py-fenics-ufl@2024.1", type=("build", "run"), when="@0.8")
depends_on("py-fenics-ufl@2023.2", type=("build", "run"), when="@0.7")
depends_on("py-fenics-ufl@2023.1", type=("build", "run"), when="@0.6")
- depends_on("py-fenics-ufl@2022.2.0", type=("build", "run"), when="@0.5.0:0.5")
- depends_on("py-fenics-ufl@2022.1.0", type=("build", "run"), when="@0.4.1")
depends_on("py-numpy@1.21:", type=("build", "run"))
depends_on("py-mpi4py", type=("build", "run"))
depends_on("py-petsc4py", type=("build", "run"))
- depends_on("py-cffi", type=("build", "run"))
+ depends_on("py-cffi@:1.16", type=("build", "run"))
- depends_on("py-nanobind@1.8:", when="@0.8:", type="build")
- depends_on("py-scikit-build-core+pyproject@0.5:", when="@0.8:", type="build")
+ depends_on("py-nanobind@2:", when="@0.9:", type="build")
+ depends_on("py-nanobind@1.8:1.9", when="@0.8", type="build")
+ depends_on("py-scikit-build-core+pyproject@0.10:", when="@0.10:", type="build")
+ depends_on("py-scikit-build-core+pyproject@0.5:", when="@0.8:0.9", type="build")
depends_on("py-pybind11@2.7.0:", when="@:0.7", type=("build", "run"))
depends_on("py-setuptools@42:", when="@:0.7", type="build")
- depends_on("xtensor@0.23.10:", type="build", when="@:0.5")
build_directory = "python"
diff --git a/var/spack/repos/builtin/packages/py-fenics-ffc/package.py b/var/spack/repos/builtin/packages/py-fenics-ffc/package.py
index aea3d1ac14..f77114e9e2 100644
--- a/var/spack/repos/builtin/packages/py-fenics-ffc/package.py
+++ b/var/spack/repos/builtin/packages/py-fenics-ffc/package.py
@@ -18,7 +18,7 @@ class PyFenicsFfc(PythonPackage):
maintainers("emai-imcs")
license("LGPL-3.0-or-later")
-
+ version("master", branch="master")
version(
"2019.1.0.post0", sha256="306e1179630200a34202975a5369194939b3482eebfc34bc44ad74dab1f109e8"
)
@@ -28,7 +28,7 @@ class PyFenicsFfc(PythonPackage):
)
version("2016.2.0", sha256="097c284780447ea7bb47d4d51956648a1efb2cb9047eb1382944421dde351ecb")
- depends_on("python@3.5:", type=("build", "run"))
+ depends_on("cxx", type="build") # generated
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
@@ -43,3 +43,7 @@ class PyFenicsFfc(PythonPackage):
else:
depends_on("py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver)
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver)
+
+ depends_on("py-fenics-fiat@2019.1.0", type=("build", "run"), when="@master")
+ depends_on("py-fenics-dijitso@master", type=("build", "run"), when="@master")
+ depends_on("py-fenics-ufl-legacy@main", type=("build", "run"), when="@master")
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 e6ab11fc8b..b696a0abb4 100644
--- a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py
+++ b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py
@@ -17,36 +17,32 @@ class PyFenicsFfcx(PythonPackage):
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("0.9.0", sha256="afa517272a3d2249f513cb711c50b77cf8368dd0b8f5ea4b759142229204a448")
+ version("0.8.0", sha256="8a854782dbd119ec1c23c4522a2134d5281e7f1bd2f37d64489f75da055282e3")
version("0.7.0", sha256="7f3c3ca91d63ce7831d37799cc19d0551bdcd275bdfa4c099711679533dd1c71")
version("0.6.0", sha256="076fad61d406afffd41019ae1abf6da3f76406c035c772abad2156127667980e")
- version(
- "0.5.0.post0", sha256="039908c9998b51ba53e5deb3a97016062c262f0a4285218644304f7d3cd35882"
- )
- version("0.4.2", sha256="3be6eef064d6ef907245db5b6cc15d4e603762e68b76e53e099935ca91ef1ee4")
- depends_on("python@3.8:", when="@0.7:", type=("build", "run"))
+ depends_on("python@3.9:", when="@0.8:", type=("build", "run"))
+ depends_on("python@3.8:", when="@:0.7", type=("build", "run"))
depends_on("py-setuptools@62:", when="@0.7:", type="build")
# Runtime dependency on pkg_resources from setuptools at 0.6.0
- depends_on("py-setuptools@58:", when="@0.4.2:0.6", type=("build", "run"))
+ depends_on("py-setuptools@58:", when="@:0.6", type=("build", "run"))
# CFFI is required at runtime for JIT support
depends_on("py-cffi", type=("build", "run"))
- # py-numpy>=1.21 required because FFCx uses NumPy typing (version
- # requirement not properly set in the FFCx pyproject.toml file)
depends_on("py-numpy@1.21:", type=("build", "run"))
depends_on("py-fenics-ufl@main", type=("build", "run"), when="@main")
- depends_on("py-fenics-ufl@2023.3.0:", type=("build", "run"), when="@0.8")
+ depends_on("py-fenics-ufl@2024.2.0:", type=("build", "run"), when="@0.9")
+ depends_on("py-fenics-ufl@2024.1.0:", type=("build", "run"), when="@0.8")
depends_on("py-fenics-ufl@2023.2.0", type=("build", "run"), when="@0.7")
depends_on("py-fenics-ufl@2023.1", type=("build", "run"), when="@0.6")
- depends_on("py-fenics-ufl@2022.2.0", type=("build", "run"), when="@0.5.0:0.5")
- depends_on("py-fenics-ufl@2022.1.0", type=("build", "run"), when="@0.4.2")
depends_on("py-fenics-basix@main", type=("build", "run"), when="@main")
+ depends_on("py-fenics-basix@0.9", type=("build", "run"), when="@0.9")
+ depends_on("py-fenics-basix@0.8", type=("build", "run"), when="@0.8")
depends_on("py-fenics-basix@0.7", type=("build", "run"), when="@0.7")
- depends_on("py-fenics-basix@0.6.0:0.6", type=("build", "run"), when="@0.6.0:0.6")
- depends_on("py-fenics-basix@0.5.1:0.5", type=("build", "run"), when="@0.5.0:0.5")
- depends_on("py-fenics-basix@0.4.2", type=("build", "run"), when="@0.4.2")
+ depends_on("py-fenics-basix@0.6", type=("build", "run"), when="@0.6")
depends_on("py-pytest@6:", type="test")
depends_on("py-sympy", type="test")
diff --git a/var/spack/repos/builtin/packages/py-fenics-ufl-legacy/package.py b/var/spack/repos/builtin/packages/py-fenics-ufl-legacy/package.py
new file mode 100644
index 0000000000..53765e0f0b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fenics-ufl-legacy/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFenicsUflLegacy(PythonPackage):
+ """The Unified Form Language (UFL) is a domain specific language for
+ declaration of finite element discretizations of variational forms. More
+ precisely, it defines a flexible interface for choosing finite element
+ spaces and defining expressions for weak forms in a notation close to
+ mathematical notation."""
+
+ homepage = "https://fenicsproject.org/"
+ url = "https://github.com/FEniCS/ufl-legacy/archive/2022.3.0.tar.gz"
+ git = "https://github.com/FEniCS/ufl-legacy.git"
+ maintainers("chrisrichardson", "garth-wells", "jhale")
+
+ license("LGPL-3.0-or-later")
+
+ version("main", branch="main")
+ version("2022.3.0", sha256="2d0f4c88fe151d631e1d389faf61f58bbbe649fd08106e756fd5d6c53213660a")
+
+ depends_on("py-setuptools@58:", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+
+ depends_on("py-pytest", type="test")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check_build(self):
+ with working_dir("test"):
+ Executable("py.test")()
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 252e87af12..418b875ad3 100644
--- a/var/spack/repos/builtin/packages/py-fenics-ufl/package.py
+++ b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py
@@ -21,6 +21,10 @@ class PyFenicsUfl(PythonPackage):
license("LGPL-3.0-or-later")
version("main", branch="main")
+ version("2024.2.0", sha256="d9353d23ccbdd9887f8d6edab74c04fe06d818da972072081dbf0c25bc86f5a7")
+ version(
+ "2024.1.0.post1", sha256="6e38e93a2c8417271c9fb316e0d0ea5fe1101c6a37b2496fff8290e7ea7ead74"
+ )
version("2023.2.0", sha256="d1d3209e8ebd4bd70513c26890f51823bac90edc956233c47bd8e686e064436e")
version(
"2023.1.1.post0", sha256="9e6e87f1447635029cec42604f62a76bba84899beb4b8822af10389d1f93a9b6"
diff --git a/var/spack/repos/builtin/packages/py-find-libpython/package.py b/var/spack/repos/builtin/packages/py-find-libpython/package.py
new file mode 100644
index 0000000000..e8668dc69e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-find-libpython/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFindLibpython(PythonPackage):
+ """Finds the libpython associated with your environment, wherever it may be hiding"""
+
+ homepage = "https://github.com/ktbarrett/find_libpython"
+ pypi = "find_libpython/find_libpython-0.3.0.tar.gz"
+
+ license("MIT")
+
+ version("0.3.1", sha256="4dd75e54c0828cfa8e97287565d2499a6bd6216140afdf251c87a456e8e52cd3")
+ version("0.3.0", sha256="6e7fe5d9af7fad6dc066cb5515a0e9c90a71f1feb2bb2f8e4cdbb4f83276e9e5")
+
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools@43:", when="@0.3.1:", type="build")
+ depends_on("py-setuptools-scm+toml", when="@:0.3.0", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fiona/package.py b/var/spack/repos/builtin/packages/py-fiona/package.py
index 1b65c3c15b..6d59878ab5 100644
--- a/var/spack/repos/builtin/packages/py-fiona/package.py
+++ b/var/spack/repos/builtin/packages/py-fiona/package.py
@@ -18,6 +18,9 @@ class PyFiona(PythonPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("1.10.1", sha256="b00ae357669460c6491caba29c2022ff0acfcbde86a95361ea8ff5cd14a86b68")
+ version("1.10.0", sha256="3529fd46d269ff3f70aeb9316a93ae95cf2f87d7e148a8ff0d68532bf81ff7ae")
+ version("1.9.6", sha256="791b3494f8b218c06ea56f892bd6ba893dfa23525347761d066fb7738acda3b1")
version("1.9.5", sha256="99e2604332caa7692855c2ae6ed91e1fffdf9b59449aa8032dd18e070e59a2f7")
version("1.9.4", sha256="49f18cbcd3b1f97128c1bb038c3451b2e1be25baa52f02ce906c25cf75af95b6")
version("1.9.3", sha256="60f3789ad9633c3a26acf7cbe39e82e3c7a12562c59af1d599fc3e4e8f7f8f25")
@@ -29,34 +32,38 @@ class PyFiona(PythonPackage):
version("1.8.20", sha256="a70502d2857b82f749c09cb0dea3726787747933a2a1599b5ab787d74e3c143b")
version("1.8.18", sha256="b732ece0ff8886a29c439723a3e1fc382718804bb057519d537a81308854967a")
- # pyproject.toml
- depends_on("python@:3.10", when="@1.8.21", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@:1.8.20", type=("build", "link", "run"))
- depends_on("py-cython", type="build")
- # Overly strict version requirements
- # depends_on("py-cython@3.0.2:3", when="@1.9.5:", type="build")
- # depends_on("py-cython@0.29.29:0.29", when="@1.9.0:1.9.4", type="build")
- depends_on("py-setuptools@67.8:", when="@1.9.5:", type="build")
- depends_on("py-setuptools@61:", when="@1.9:", type="build")
- depends_on("py-attrs@19.2:", when="@1.9:", type=("build", "run"))
- depends_on("py-attrs@17:", type=("build", "run"))
- depends_on("py-certifi", type=("build", "run"))
- depends_on("py-click@8", when="@1.9:", type=("build", "run"))
- depends_on("py-click@4:", type=("build", "run"))
- depends_on("py-click-plugins@1:", type=("build", "run"))
- depends_on("py-cligj@0.5:", type=("build", "run"))
- depends_on("py-importlib-metadata", when="@1.9.2: ^python@:3.9", type=("build", "run"))
- depends_on("py-six", when="@1.9.4:", type=("build", "run"))
- depends_on("py-six@1.7:", when="@:1.8", type=("build", "run"))
- depends_on("py-setuptools", when="@:1.9.1,1.9.5:", type="run")
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.10", when="@1.8.21")
+ depends_on("python@:3.9", when="@:1.8.20")
- # setup.py or release notes
- depends_on("gdal@3.1:", when="@1.9:", type=("build", "link", "run"))
- depends_on("gdal@1.8:", type=("build", "link", "run"))
+ # setup.py or release notes
+ depends_on("gdal@3.4:", when="@1.10:")
+ depends_on("gdal@3.1:", when="@1.9:")
+ depends_on("gdal@1.8:")
- # Historical dependencies
- depends_on("py-munch@2.3.2:", when="@1.9.0:1.9.3", type=("build", "run"))
- depends_on("py-munch", when="@:1.8", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools@67.8:", when="@1.9.5:")
+ depends_on("py-setuptools@61:", when="@1.9:")
+ depends_on("py-cython@3.0.2:3", when="@1.9.5:")
+ depends_on("py-cython@0.29.29:0.29", when="@1.9.0:1.9.4")
+ depends_on("py-cython")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-attrs@19.2:", when="@1.9:")
+ depends_on("py-attrs@17:")
+ depends_on("py-certifi")
+ depends_on("py-click@8", when="@1.9:")
+ depends_on("py-click@4:")
+ depends_on("py-click-plugins@1:")
+ depends_on("py-cligj@0.5:")
+ depends_on("py-importlib-metadata", when="@1.9.2: ^python@:3.9")
+
+ # Historical dependencies
+ depends_on("py-munch@2.3.2:", when="@1.9.0:1.9.3")
+ depends_on("py-munch", when="@:1.8")
+ depends_on("py-setuptools", when="@:1.9.1,1.9.5")
+ depends_on("py-six", when="@1.9.4:1.9")
+ depends_on("py-six@1.7:", when="@:1.8")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/{0}/{0}iona/{0}iona-{1}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/py-flash-attn/package.py b/var/spack/repos/builtin/packages/py-flash-attn/package.py
new file mode 100644
index 0000000000..8d4c043cf9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-flash-attn/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFlashAttn(PythonPackage):
+ """
+ This package provides the official implementation of FlashAttention.
+ """
+
+ homepage = "https://github.com/Dao-AILab/flash-attention.git"
+ pypi = "flash-attn/flash_attn-0.0.0.tar.gz"
+ git = "https://github.com/Dao-AILab/flash-attention.git"
+
+ maintainers("aurianer")
+
+ license("BSD")
+
+ version("main", branch="main")
+ version("2.6.3", sha256="5bfae9500ad8e7d2937ebccb4906f3bc464d1bf66eedd0e4adabd520811c7b52")
+ version(
+ "2.5.9.post1", sha256="a92db1683a5b141a0f4371d251ae9f73e9aef629b3a58a50d0ef430266c68782"
+ )
+ version("2.5.8", sha256="2e5b2bcff6d5cff40d494af91ecd1eb3c5b4520a6ce7a0a8b1f9c1ed129fb402")
+ version("2.5.7", sha256="7c079aef4e77c4e9a71a3cd88662362e0fe82f658db0b2dbff6f279de2a387a8")
+ version("2.5.6", sha256="d25801aa060877cad997939bd7130faf620fdbeda947c3ffde5865906d430c36")
+ version("2.5.5", sha256="751cee17711d006fe7341cdd78584af86a6239afcfe43b9ed11c84db93126267")
+ version("2.5.4", sha256="d83bb427b517b07e9db655f6e5166eb2607dccf4d6ca3229e3a3528c206b0175")
+ version("2.4.2", sha256="eb822a8c4219b610e9d734cbc8cd9ee4547f27433815a2b90dc1462766feefc1")
+
+ depends_on("cxx", type="build") # generated
+
+ with default_args(type="build"):
+ depends_on("py-packaging")
+ depends_on("py-psutil")
+ depends_on("py-setuptools")
+ depends_on("ninja")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch+cuda")
+ depends_on("py-einops")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-pybind11")
+
+ depends_on("python@3.7:", type=("build", "run"), when="@:2.5")
+ depends_on("python@3.8:", type=("build", "run"), when="@2.6:")
+
+ def setup_build_environment(self, env):
+ # If oom error, try lowering the number of jobs with `spack install -j`
+ env.set("MAX_JOBS", make_jobs)
diff --git a/var/spack/repos/builtin/packages/py-flask-compress/package.py b/var/spack/repos/builtin/packages/py-flask-compress/package.py
index 2b037a3da4..fa5395f9a3 100644
--- a/var/spack/repos/builtin/packages/py-flask-compress/package.py
+++ b/var/spack/repos/builtin/packages/py-flask-compress/package.py
@@ -15,7 +15,11 @@ class PyFlaskCompress(PythonPackage):
license("MIT")
+ version("1.14", sha256="e46528f37b91857012be38e24e65db1a248662c3dc32ee7808b5986bf1d123ee")
version("1.4.0", sha256="468693f4ddd11ac6a41bca4eb5f94b071b763256d54136f77957cfee635badb3")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@0.42:", type="build", when="@1.10:")
+ depends_on("py-setuptools-scm@3.4: +toml", type="build", when="@1.10:")
depends_on("py-flask@0.9:", type=("build", "run"))
+ depends_on("py-brotli", type="run", when="@1.5:")
diff --git a/var/spack/repos/builtin/packages/py-flask-cors/package.py b/var/spack/repos/builtin/packages/py-flask-cors/package.py
index 6eac377c7b..4f708db276 100644
--- a/var/spack/repos/builtin/packages/py-flask-cors/package.py
+++ b/var/spack/repos/builtin/packages/py-flask-cors/package.py
@@ -16,6 +16,7 @@ class PyFlaskCors(PythonPackage):
license("MIT")
+ version("4.0.0", sha256="f268522fcb2f73e2ecdde1ef45e2fd5c71cc48fe03cffb4b441c6d1b40684eb0")
version("3.0.10", sha256="b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py
index 950351e578..fd243f6332 100644
--- a/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py
+++ b/var/spack/repos/builtin/packages/py-flask-sqlalchemy/package.py
@@ -18,10 +18,19 @@ class PyFlaskSqlalchemy(PythonPackage):
license("BSD-3-Clause")
+ # If py-slqalchemy@1.4.18: is too restrictive, consider downgrading py-flask-sqlalchemy to @2.
version("3.0.2", sha256="16199f5b3ddfb69e0df2f52ae4c76aedbfec823462349dabb21a1b2e0a2b65e9")
-
- # https://github.com/pallets-eco/flask-sqlalchemy/blob/3.0.2/pyproject.toml
- depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-flask@2.2:", type=("build", "run"))
- depends_on("py-sqlalchemy@1.4.18:", type=("build", "run"))
- depends_on("py-pdm-pep517@1:", type="build")
+ version("2.5.1", sha256="2bda44b43e7cacb15d4e05ff3cc1f8bc97936cc464623424102bfc2c35e95912")
+
+ with when("@3"):
+ # https://github.com/pallets-eco/flask-sqlalchemy/blob/3.0.2/pyproject.toml
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-flask@2.2:", type=("build", "run"))
+ depends_on("py-sqlalchemy@1.4.18:", type=("build", "run"))
+ depends_on("py-pdm-pep517@1:", type="build")
+
+ with when("@2"):
+ # https://github.com/pallets-eco/flask-sqlalchemy/blob/2.5.1/setup.py
+ depends_on("py-flask@0.10:", type=("build", "run"))
+ depends_on("py-sqlalchemy@0.8.0:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-flask/package.py b/var/spack/repos/builtin/packages/py-flask/package.py
index 091ebed06b..6c7786f2d1 100644
--- a/var/spack/repos/builtin/packages/py-flask/package.py
+++ b/var/spack/repos/builtin/packages/py-flask/package.py
@@ -10,24 +10,37 @@ class PyFlask(PythonPackage):
"""A simple framework for building complex web applications."""
homepage = "https://palletsprojects.com/p/flask/"
- pypi = "Flask/Flask-1.1.1.tar.gz"
+ pypi = "flask/flask-3.0.3.tar.gz"
git = "https://github.com/pallets/flask.git"
license("BSD-3-Clause")
+ version("3.0.3", sha256="ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842")
version("2.3.2", sha256="8c2f9abd47a9e8df7f0c3f091ce9497d011dc3b31effcf4c85a6e2b50f4114ef")
- version("2.2.2", sha256="642c450d19c4ad482f96729bd2a8f6d32554aa1e231f4f6b4e7e5264b16cca2b")
- version("2.0.2", sha256="7b2fb8e934ddd50731893bdcdb00fc8c0315916f9fcd50d22c7cc1a95ab634e2")
- version("1.1.2", sha256="4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060")
- version("1.1.1", sha256="13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52")
- version("0.12.4", sha256="2ea22336f6d388b4b242bc3abf8a01244a8aa3e236e7407469ef78c16ba355dd")
- version("0.12.2", sha256="49f44461237b69ecd901cc7ce66feea0319b9158743dd27a2899962ab214dac1")
- version("0.12.1", sha256="9dce4b6bfbb5b062181d3f7da8f727ff70c1156cbb4024351eafd426deb5fb88")
- version("0.11.1", sha256="b4713f2bfb9ebc2966b8a49903ae0d3984781d5c878591cf2f7b484d28756b0e")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-30861
+ version("2.2.2", sha256="642c450d19c4ad482f96729bd2a8f6d32554aa1e231f4f6b4e7e5264b16cca2b")
+ version("2.0.2", sha256="7b2fb8e934ddd50731893bdcdb00fc8c0315916f9fcd50d22c7cc1a95ab634e2")
+ version("1.1.2", sha256="4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060")
+ version("1.1.1", sha256="13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52")
+ version(
+ "0.12.4", sha256="2ea22336f6d388b4b242bc3abf8a01244a8aa3e236e7407469ef78c16ba355dd"
+ )
+ version(
+ "0.12.2", sha256="49f44461237b69ecd901cc7ce66feea0319b9158743dd27a2899962ab214dac1"
+ )
+ version(
+ "0.12.1", sha256="9dce4b6bfbb5b062181d3f7da8f727ff70c1156cbb4024351eafd426deb5fb88"
+ )
+ version(
+ "0.11.1", sha256="b4713f2bfb9ebc2966b8a49903ae0d3984781d5c878591cf2f7b484d28756b0e"
+ )
depends_on("python@3.8:", when="@2.3:", type=("build", "run"))
- depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"), when="@:2")
+ depends_on("py-flit-core@:3", type=("build", "run"), when="@3:")
+ depends_on("py-werkzeug@3:", when="@3:", type=("build", "run"))
depends_on("py-werkzeug@2.3.3:", when="@2.3.2:", type=("build", "run"))
depends_on("py-werkzeug@2.2.2:", when="@2.2.2:", type=("build", "run"))
depends_on("py-werkzeug@2:", when="@2:", type=("build", "run"))
@@ -44,3 +57,11 @@ class PyFlask(PythonPackage):
depends_on("py-click@5.1:", type=("build", "run"))
depends_on("py-blinker@1.6.2:", when="@2.3:", type=("build", "run"))
depends_on("py-importlib-metadata@3.6:", when="@2.1: ^python@:3.9", type=("build", "run"))
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/f/flask/{}-{}.tar.gz"
+ if self.spec.satisfies("@:0.18.3"):
+ name = "Flask"
+ else:
+ name = "flask"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-flatbuffers/package.py b/var/spack/repos/builtin/packages/py-flatbuffers/package.py
index d91f04e672..3b2d6249bd 100644
--- a/var/spack/repos/builtin/packages/py-flatbuffers/package.py
+++ b/var/spack/repos/builtin/packages/py-flatbuffers/package.py
@@ -20,6 +20,7 @@ class PyFlatbuffers(PythonPackage):
license("Apache-2.0")
+ version("24.3.25", sha256="de2ec5b203f21441716617f38443e0a8ebf3d25bf0d9c0bb0ce68fa00ad546a4")
version("23.5.26", sha256="9ea1144cac05ce5d86e2859f431c6cd5e66cd9c78c558317c7955fb8d4c78d89")
version("2.0.7", sha256="0ae7d69c5b82bf41962ca5fde9cc43033bc9501311d975fd5a25e8a7d29c1245")
version("2.0", sha256="12158ab0272375eab8db2d663ae97370c33f152b27801fa6024e1d6105fd4dd2")
diff --git a/var/spack/repos/builtin/packages/py-flawfinder/package.py b/var/spack/repos/builtin/packages/py-flawfinder/package.py
index 56a6a80e3c..c566daa7a2 100644
--- a/var/spack/repos/builtin/packages/py-flawfinder/package.py
+++ b/var/spack/repos/builtin/packages/py-flawfinder/package.py
@@ -9,12 +9,15 @@ from spack.package import *
class PyFlawfinder(PythonPackage, SourceforgePackage):
"""a program that examines source code looking for security weaknesses"""
- homepage = "http://dwheeler.com/flawfinder/"
+ homepage = "https://dwheeler.com/flawfinder/"
sourceforge_mirror_path = "project/flawfinder/flawfinder-2.0.19.tar.gz"
license("GPL-2.0+")
version("2.0.19", sha256="fe550981d370abfa0a29671346cc0b038229a9bd90b239eab0f01f12212df618")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-flax/package.py b/var/spack/repos/builtin/packages/py-flax/package.py
new file mode 100644
index 0000000000..108ddfcc65
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-flax/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFlax(PythonPackage):
+ """Flax: A neural network library for JAX designed for flexibility."""
+
+ homepage = "https://github.com/google/flax"
+ pypi = "flax/flax-0.8.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.8.5", sha256="4a9cb7950ece54b0addaa73d77eba24e46138dbe783d01987be79d20ccb2b09b")
+ version("0.8.1", sha256="ce3d99e9b4c0d2e4d9fc28bc56cced8ba953adfd695aabd24f096b4c8a7e2f92")
+ version("0.7.3", sha256="e9dbc7eb6c80d31277f97b626c07978d2a84f1bb635cf05957a02a3a496493e6")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:", when="@0.8:")
+ depends_on("py-numpy@1.26.0:", when="@0.8: ^python@3.12:")
+ depends_on("py-numpy@1.23.2:", when="@0.8: ^python@3.11:")
+ depends_on("py-numpy@1.22:", when="@0.8:")
+ depends_on("py-numpy@1.12:")
+ depends_on("py-jax@0.4.27:", when="@0.8.5:")
+ depends_on("py-jax@0.4.19:", when="@0.8:")
+ depends_on("py-jax@0.4.2:")
+ depends_on("py-msgpack")
+ depends_on("py-optax")
+ depends_on("py-orbax-checkpoint")
+ depends_on("py-tensorstore")
+ depends_on("py-rich@11.1:")
+ depends_on("py-typing-extensions@4.2:")
+ depends_on("py-pyyaml@5.4.1:")
diff --git a/var/spack/repos/builtin/packages/py-flit-core/package.py b/var/spack/repos/builtin/packages/py-flit-core/package.py
index 162fdff298..1046c7cc80 100644
--- a/var/spack/repos/builtin/packages/py-flit-core/package.py
+++ b/var/spack/repos/builtin/packages/py-flit-core/package.py
@@ -14,6 +14,7 @@ class PyFlitCore(PythonPackage):
# Tests import of a non-existing package
skip_modules = ["flit_core.tests"]
+ tags = ["build-tools"]
maintainers("takluyver")
diff --git a/var/spack/repos/builtin/packages/py-fluiddyn/package.py b/var/spack/repos/builtin/packages/py-fluiddyn/package.py
new file mode 100644
index 0000000000..af76b81705
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluiddyn/package.py
@@ -0,0 +1,42 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluiddyn(PythonPackage):
+ """Framework for studying fluid dynamics."""
+
+ pypi = "fluiddyn/fluiddyn-0.6.5.tar.gz"
+
+ maintainers("paugier")
+
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.6.5", sha256="ad0df4c05855bd2ae702731983d310bfbb13802874ce83e2da6454bb7100b5df")
+ version("0.6.4", sha256="576eb0fa50012552b3a68dd17e81ce4f08ddf1e276812b02316016bb1c3a1342")
+ version("0.6.3", sha256="3c4c57ac8e48c55498aeafaf8b26daecefc03e6ac6e2c03a591e0f7fec13bb69")
+ version("0.6.2", sha256="40f772cfdf111797ae1c6cf7b67272207f2bc7c4f599085634cc1d74eb748ee5")
+ version("0.6.1", sha256="af75ed3adfaaa0f0d82822619ced2f9e0611ad15351c9cdbc1d802d67249c3de")
+ version("0.6.0", sha256="47ad53b3723487d3711ec4ea16bca2d7c270b5c5c5a0255f7684558d7397850e")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-pdm-backend", type="build")
+
+ with default_args(type="run"):
+ depends_on("py-numpy")
+ depends_on("py-matplotlib")
+ depends_on("py-h5py")
+ depends_on("py-h5netcdf")
+ depends_on("py-distro")
+ depends_on("py-simpleeval@0.9.13:")
+ depends_on("py-psutil@5.2.1:")
+ depends_on("py-ipython")
+ depends_on("py-scipy")
+
+ with default_args(type="test"):
+ depends_on("py-pytest")
+ depends_on("py-pytest-allclose")
+ depends_on("py-pytest-mock")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-builder/package.py b/var/spack/repos/builtin/packages/py-fluidfft-builder/package.py
new file mode 100644
index 0000000000..76ec14428e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-builder/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftBuilder(PythonPackage):
+ """Fluidfft plugin dependencies"""
+
+ pypi = "fluidfft-builder/fluidfft_builder-0.0.2.tar.gz"
+
+ maintainers("paugier")
+ license("MIT", checked_by="paugier")
+
+ version("0.0.2", sha256="c0af9ceca27ae3a00ccf2f160703be9e394d8b886b8a02653b6c0a12a4f54a90")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-flit-core@3.2:3", type="build")
+ depends_on("py-cython@3.0:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-fftw/package.py b/var/spack/repos/builtin/packages/py-fluidfft-fftw/package.py
new file mode 100644
index 0000000000..de0980d74f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-fftw/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftFftw(PythonPackage):
+ """Fluidfft plugin using fftw."""
+
+ pypi = "fluidfft_fftw/fluidfft_fftw-0.0.1.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.0.1", sha256="59967846e1d976508db30ff65987e9c1e6c024ec9c095849608ee8913b96d3ff")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+
+ with default_args(type="link"):
+ depends_on("fftw")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-transonic@0.6.4:")
+ depends_on("py-fluidfft-builder")
+ depends_on("py-cython@3.0:")
+
+ depends_on("py-fluidfft", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-fftwmpi/package.py b/var/spack/repos/builtin/packages/py-fluidfft-fftwmpi/package.py
new file mode 100644
index 0000000000..2fb41dc98c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-fftwmpi/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftFftwmpi(PythonPackage):
+ """Fluidfft plugin using fftwmpi."""
+
+ pypi = "fluidfft-fftwmpi/fluidfft_fftwmpi-0.0.1.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.0.1", sha256="af3c606852e991c2c1b3ea4f7558c69ab9138b713a7166a6eedf48ef1af660d3")
+
+ with default_args(type=("build", "run")):
+ extends("python@3.9:")
+ depends_on("py-mpi4py")
+
+ with default_args(type="link"):
+ depends_on("fftw")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-transonic@0.6.4:")
+ depends_on("py-fluidfft-builder")
+ depends_on("py-cython@3.0:")
+
+ depends_on("py-fluidfft", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-mpi-with-fftw/package.py b/var/spack/repos/builtin/packages/py-fluidfft-mpi-with-fftw/package.py
new file mode 100644
index 0000000000..8384533023
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-mpi-with-fftw/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftMpiWithFftw(PythonPackage):
+ """Fluidfft MPI plugin using fftw."""
+
+ pypi = "fluidfft-mpi_with_fftw/fluidfft_mpi_with_fftw-0.0.1.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.0.1", sha256="ab8c1867e745715892f8d30c9409e9509467a610f5a702ac7b5cfa003787f6ce")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-mpi4py")
+
+ with default_args(type="link"):
+ depends_on("fftw")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-transonic@0.6.4:")
+ depends_on("py-fluidfft-builder")
+ depends_on("py-cython@3.0:")
+
+ depends_on("py-fluidfft", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-p3dfft/package.py b/var/spack/repos/builtin/packages/py-fluidfft-p3dfft/package.py
new file mode 100644
index 0000000000..95b6382ace
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-p3dfft/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftP3dfft(PythonPackage):
+ """Fluidfft MPI plugin using p3dfft."""
+
+ pypi = "fluidfft-p3dfft/fluidfft_p3dfft-0.0.1.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.0.1", sha256="1c291236a43045b9f8b9725e568277c5f405d2e2d9f811ba1bc9c5e1d9f2f827")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-mpi4py")
+
+ with default_args(type="link"):
+ depends_on("p3dfft3")
+ depends_on("fftw")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-transonic@0.6.4:")
+ depends_on("py-fluidfft-builder")
+ depends_on("py-cython@3.0:")
+
+ depends_on("py-fluidfft", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft-pfft/package.py b/var/spack/repos/builtin/packages/py-fluidfft-pfft/package.py
new file mode 100644
index 0000000000..d55c3845fc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft-pfft/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfftPfft(PythonPackage):
+ """Fluidfft MPI plugin using pfft."""
+
+ pypi = "fluidfft-pfft/fluidfft_pfft-0.0.1.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.0.1", sha256="ef8255bd78c9d2dbfb11715542b221d457eedfa0a5b0bbdd1b95e8fbe64043c5")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-mpi4py")
+
+ with default_args(type="link"):
+ depends_on("fftw")
+ depends_on("pfft")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-transonic@0.6.4:")
+ depends_on("py-fluidfft-builder")
+ depends_on("py-cython@3.0:")
+
+ depends_on("py-fluidfft", type="run")
diff --git a/var/spack/repos/builtin/packages/py-fluidfft/package.py b/var/spack/repos/builtin/packages/py-fluidfft/package.py
new file mode 100644
index 0000000000..e674665785
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidfft/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidfft(PythonPackage):
+ """Efficient and easy Fast Fourier Transform (FFT) for Python."""
+
+ pypi = "fluidfft/fluidfft-0.4.2.tar.gz"
+
+ maintainers("paugier")
+
+ license("CECILL-B", checked_by="paugier")
+
+ version("0.4.2", sha256="5e35f1fb647da2fa65c116bb0d598fc9cb975cd95c41022644c27dc726c36073")
+ version("0.4.1", sha256="b17e64c7b2be47c61d6ac7b713e0e8992cf900d2367381288c93a56090e6c0c1")
+
+ variant("native", default=False, description="Compile with -march=native and -Ofast.")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-transonic@0.6.4:")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-pythran@0.9.7:")
+
+ with default_args(type="run"):
+ depends_on("py-fluiddyn@0.2.3:")
+ depends_on("py-pyfftw@0.10.4:")
+ depends_on("py-importlib_metadata", when="^python@:3.10")
+
+ def config_settings(self, spec, prefix):
+ settings = {"setup-args": {"-Dnative": spec.variants["native"].value}}
+ return settings
diff --git a/var/spack/repos/builtin/packages/py-fluidsim-core/package.py b/var/spack/repos/builtin/packages/py-fluidsim-core/package.py
new file mode 100644
index 0000000000..c6c86d0e23
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidsim-core/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFluidsimCore(PythonPackage):
+ """Pure-Python core library for FluidSim framework."""
+
+ pypi = "fluidsim-core/fluidsim_core-0.8.3.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL", checked_by="paugier")
+
+ version("0.8.3", sha256="2c829486d640f921e42b690b824fe52ce6fcb678a36535f06d76b872e353d211")
+ version("0.8.2", sha256="62a8b43fc7ede8c6efc5cc109ae5caca2c1f54891dff547511c8fe94caf0bd7c")
+ version("0.8.1", sha256="3dfb51d5db1a574089738a4b8e1c76e75da32b25dceb349207dcece73d1b1646")
+ version("0.8.0", sha256="4b7a23649df9d10cde6510280fb8683550549d4cbbc1ebb0bc6adc6e559915f7")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-flit-core@3.2:3", type="build")
+
+ with default_args(type="run"):
+ depends_on("py-fluiddyn")
+ depends_on("py-importlib_metadata", when="^python@:3.9")
diff --git a/var/spack/repos/builtin/packages/py-fluidsim/package.py b/var/spack/repos/builtin/packages/py-fluidsim/package.py
new file mode 100644
index 0000000000..bf538c1772
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fluidsim/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+from spack.pkg.builtin.py_fluidsim_core import PyFluidsimCore
+
+
+class PyFluidsim(PythonPackage):
+ """Framework for studying fluid dynamics with simulations."""
+
+ pypi = "fluidsim/fluidsim-0.8.3.tar.gz"
+
+ maintainers("paugier")
+ license("CECILL", checked_by="paugier")
+
+ version("0.8.3", sha256="ff3df8c2e8c96a694b5656125e778fc5f6561699bae3b264cbb75e2070b94169")
+ version("0.8.2", sha256="eb36c2d7d588fbb088af026683a12bb14aa126bbbc91b999009130d6cb7920f9")
+ version("0.8.1", sha256="44c70f388c429856f5df24705cddb2e024d7d1376d2153e113ef111af90b857b")
+ version("0.8.0", sha256="01f6d489ce44fe4dc47357506ba227ae0e87b346758d8f067c13f319d0a9a881")
+
+ variant("native", default=False, description="Compile with -march=native and -Ofast.")
+
+ with default_args(type=("build", "run")):
+ extends("python@3.9:")
+ depends_on("py-transonic@0.6.4:")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python")
+ depends_on("py-pythran@0.9.7:")
+
+ with default_args(type="run"):
+ for _v in PyFluidsimCore.versions:
+ depends_on(f"py-fluidsim-core@{_v}", when=f"@{_v}")
+ depends_on("py-fluidfft@0.4.0:")
+ depends_on("py-xarray")
+ depends_on("py-rich")
+ depends_on("py-scipy")
+
+ def config_settings(self, spec, prefix):
+ settings = {"setup-args": {"-Dnative": spec.variants["native"].value}}
+ return settings
diff --git a/var/spack/repos/builtin/packages/py-flye/package.py b/var/spack/repos/builtin/packages/py-flye/package.py
index 8ec6ca4c9f..83529bae78 100644
--- a/var/spack/repos/builtin/packages/py-flye/package.py
+++ b/var/spack/repos/builtin/packages/py-flye/package.py
@@ -23,6 +23,9 @@ class PyFlye(PythonPackage):
version("2.7.1", sha256="0e826261c81537a7fa8fd37dc583edd75535eee0f30429d6bdb55f37b5722dbb")
version("2.6", sha256="5bdc44b84712794fa4264eed690d8c65c0d72f495c7bbf2cd15b634254809131")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# https://github.com/fenderglass/Flye/blob/flye/docs/INSTALL.md
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-folium/package.py b/var/spack/repos/builtin/packages/py-folium/package.py
new file mode 100644
index 0000000000..0b8eab4b87
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-folium/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFolium(PythonPackage):
+ """Make beautiful maps with Leaflet.js & Python."""
+
+ homepage = "https://python-visualization.github.io/folium"
+ pypi = "folium/folium-0.16.0.tar.gz"
+
+ license("MIT")
+
+ version("0.16.0", sha256="2585ee9253dc758d3a365534caa6fb5fa0c244646db4dc5819afc67bbd4daabb")
+
+ depends_on("py-setuptools@41.2:", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-branca@0.6.0:", type=("build", "run"))
+ depends_on("py-jinja2@2.9:", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-xyzservices", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ford/package.py b/var/spack/repos/builtin/packages/py-ford/package.py
index 0bab66112a..43455c69cf 100644
--- a/var/spack/repos/builtin/packages/py-ford/package.py
+++ b/var/spack/repos/builtin/packages/py-ford/package.py
@@ -20,6 +20,8 @@ class PyFord(PythonPackage):
version("6.1.12", sha256="101191e1aa33cfe780ea5b2d66d02c7281b9b314e82bb138d76809a49c08506a")
version("6.1.11", sha256="feb9a88040e717e84c632e4b023904ab36a463fc9a8ff80c8c7f86454e5d8043")
+ depends_on("fortran", type="build") # generated
+
depends_on("py-wheel@0.29:", type="build")
depends_on("py-setuptools@48:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fortls/package.py b/var/spack/repos/builtin/packages/py-fortls/package.py
index 47e9aafed3..ccb5133bfb 100644
--- a/var/spack/repos/builtin/packages/py-fortls/package.py
+++ b/var/spack/repos/builtin/packages/py-fortls/package.py
@@ -16,12 +16,17 @@ class PyFortls(PythonPackage):
license("MIT")
+ version("3.1.0", sha256="e38f9f6af548f78151d54bdbb9884166f8d717f8e147ab1e2dbf06b985df2c6d")
version("2.13.0", sha256="23c5013e8dd8e1d65bf07be610d0827bc48aa7331a7a7ce13612d4c646d0db31")
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools@45:", type="build")
+ depends_on("py-setuptools@61:", when="@3:", type="build")
depends_on("py-packaging", type=("build", "run"))
depends_on("py-setuptools-scm@6.2:+toml", type="build")
- depends_on("py-setuptools-scm-git-archive", type="build")
+ depends_on("py-setuptools-scm@7:+toml", when="@3:", type="build")
+ depends_on("py-setuptools-scm-git-archive", when="@:2", type="build")
depends_on("py-json5", type=("build", "run"))
depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7")
diff --git a/var/spack/repos/builtin/packages/py-fortran-language-server/package.py b/var/spack/repos/builtin/packages/py-fortran-language-server/package.py
index 7187cea8db..3e872f85ab 100644
--- a/var/spack/repos/builtin/packages/py-fortran-language-server/package.py
+++ b/var/spack/repos/builtin/packages/py-fortran-language-server/package.py
@@ -20,5 +20,7 @@ class PyFortranLanguageServer(PythonPackage):
version("1.12.0", sha256="5cda6341b1d2365cce3d80ba40043346c5dcbd0b35f636bfa57cb34df789ff17")
version("1.11.1", sha256="8f03782dd992d6652a3f2d349115fdad3aa3464fee3fafbbc4f8ecf780166e3c")
+ depends_on("fortran", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-fortranformat/package.py b/var/spack/repos/builtin/packages/py-fortranformat/package.py
index c08935be40..2480bbe473 100644
--- a/var/spack/repos/builtin/packages/py-fortranformat/package.py
+++ b/var/spack/repos/builtin/packages/py-fortranformat/package.py
@@ -9,11 +9,14 @@ from spack.package import *
class PyFortranformat(PythonPackage):
"""Mimics Fortran textual IO in Python"""
- homepage = "http://bitbucket.org/brendanarnold/py-fortranformat"
- pypi = "fortranformat/fortranformat-0.2.5.tar.gz"
+ homepage = "https://github.com/brendanarnold/py-fortranformat"
+ pypi = "fortranformat/fortranformat-2.0.0.tar.gz"
license("MIT")
+ version("2.0.0", sha256="52473831d6f6bad7c2de0f26ad51856ea5d0ef097bcba5af3b855b871b815b0d")
+ version("1.2.2", sha256="a8c41ab39bb40444e6ca17f38755d64df51799b064206833c137a28bbdca1b2b")
+ version("1.1.1", sha256="9b7aa2148af7a5f4f5fd955d121bd6869d44b82ac2182d459813b849aa87d831")
version("0.2.5", sha256="6b5fbc1f129c7a70543c3a81f334fb4d57f07df2834b22ce69f6d7e8539cd3f9")
# pip silently replaces distutils with setuptools
diff --git a/var/spack/repos/builtin/packages/py-fparser/package.py b/var/spack/repos/builtin/packages/py-fparser/package.py
index 68d022c17b..c211c83a5b 100644
--- a/var/spack/repos/builtin/packages/py-fparser/package.py
+++ b/var/spack/repos/builtin/packages/py-fparser/package.py
@@ -7,40 +7,58 @@ from spack.package import *
class PyFparser(PythonPackage):
- """Parser for Fortran 77..2003 code."""
+ """
+ This project is based upon the Fortran (77..2003) parser
+ originally developed by Pearu Peterson for the F2PY project,
+ www.f2py.com. It provides a parser for Fortran source code
+ implemented purely in Python with minimal dependencies.
+ """
+
+ # Links
homepage = "https://github.com/stfc/fparser"
git = "https://github.com/stfc/fparser.git"
- pypi = "fparser/fparser-0.1.3.tar.gz"
+ pypi = "fparser/fparser-0.1.4.tar.gz"
+ # License
license("BSD-3-Clause")
+ # Releases
version("develop", branch="master")
+ version("0.1.4", sha256="00d4f7e9bbd8a9024c3c2f308dd3be9b0eeff3cb852772c9f3cf0c4909dbafd4")
version("0.1.3", sha256="10ba8b2803632846f6f011278e3810188a078d89afcb4a38bed0cbf10f775736")
version("0.0.16", sha256="a06389b95a1b9ed12f8141b69c67343da5ba0a29277b2997b02573a93af14e13")
+ version("0.0.15", sha256="53a7f3e3a651b6d2a83c6cc8194d7de0abdc3bd54b2b83b0f379739b0dc74a9e")
+ version("0.0.14", sha256="ed8ffcd4aecb7e1f09d019c9663aa0effb44f489e96a60759e83e6a3834220eb")
+ version("0.0.13", sha256="3c7e939fcc6b010de717eb6bd5102750dea26f15b6f6346cb285652b6a55818a")
+ version("0.0.12", sha256="9ea2cf3cdf64e440ab9d5b526dda2dc3528fe5aa7a85634e81b0ee3c0c39886f")
version("0.0.6", sha256="bf8a419cb528df1bfc24ddd26d63f2ebea6f1e103f1a259d8d3a6c9b1cd53012")
version("0.0.5", sha256="f3b5b0ac56fd22abed558c0fb0ba4f28edb8de7ef24cfda8ca8996562215822f")
- depends_on("py-setuptools@42:", type="build", when="@0.1:")
+ depends_on("fortran", type="build") # generated
+
+ # Dependencies for latest version
+ depends_on("py-setuptools@61:", type="build", when="@0.1.4:")
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm@6.2:+toml", type=("build", "run"), when="@0.1:")
depends_on("py-setuptools-scm-git-archive", type="build", when="@0.1:")
depends_on("py-wheel@0.29:", type="build", when="@0.1:")
-
depends_on("py-importlib-metadata", type=("build", "run"), when="@0.1:")
+ # Historical dependencies
+ depends_on("py-setuptools@42:", type="build", when="@0.1:")
depends_on("py-numpy", type=("build", "run"), when="@:0.0.5")
depends_on("py-nose", type=("build", "run"), when="@:0.0.7")
- # six is unused as of 0.0.15, but still listed in setup.py
depends_on("py-six", type=("build", "run"), when="@0.0.6:0.0.16")
- depends_on("py-pytest", type="test")
+ # Dependencies only required for tests:
+ depends_on("py-pytest@3.3:", type="test")
+ # Test
@run_after("install")
@on_package_attributes(run_tests=True)
def check_build(self):
- # Ensure that pytest.ini exists inside the source tree,
- # otherwise an external pytest.ini can cause havoc:
- touch("pytest.ini")
+ pytest = which("pytest")
+ # Limit pystest to search inside the build tree
with working_dir("src"):
- Executable("py.test")()
+ pytest()
diff --git a/var/spack/repos/builtin/packages/py-frozendict/package.py b/var/spack/repos/builtin/packages/py-frozendict/package.py
index cfe5a80225..c3f5de6d01 100644
--- a/var/spack/repos/builtin/packages/py-frozendict/package.py
+++ b/var/spack/repos/builtin/packages/py-frozendict/package.py
@@ -9,13 +9,22 @@ from spack.package import *
class PyFrozendict(PythonPackage):
"""An immutable dictionary"""
- homepage = "An immutable dictionary"
+ homepage = "https://github.com/Marco-Sulla/python-frozendict"
pypi = "frozendict/frozendict-1.2.tar.gz"
license("LGPL-3.0-only")
+ version("2.3.10", sha256="aadc83510ce82751a0bb3575231f778bc37cbb373f5f05a52b888e26cbb92f79")
version("2.3.4", sha256="15b4b18346259392b0d27598f240e9390fafbff882137a9c48a1e0104fb17f78")
version("1.2", sha256="774179f22db2ef8a106e9c38d4d1f8503864603db08de2e33be5b778230f6e45")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+
+ def setup_build_environment(self, env):
+ # C extension is not supported for 3.11+. See also
+ # https://github.com/Marco-Sulla/python-frozendict/issues/68
+ if self.spec.satisfies("^python@3.11:"):
+ env.set("FROZENDICT_PURE_PY", "1")
diff --git a/var/spack/repos/builtin/packages/py-frozenlist/package.py b/var/spack/repos/builtin/packages/py-frozenlist/package.py
index 619c8981fb..89382f32b2 100644
--- a/var/spack/repos/builtin/packages/py-frozenlist/package.py
+++ b/var/spack/repos/builtin/packages/py-frozenlist/package.py
@@ -15,12 +15,27 @@ class PyFrozenlist(PythonPackage):
license("Apache-2.0")
+ version("1.5.0", sha256="81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817")
version("1.3.1", sha256="3a735e4211a04ccfa3f4833547acdf5d2f863bfeb01cfd3edaffbc251f15cec8")
version("1.3.0", sha256="ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b")
version("1.2.0", sha256="68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de")
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("python@3.7:", when="@1.3.1:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools@46.4.0:", when="@1.3.1:", type="build")
- depends_on("py-wheel@0.37.0:", when="@1.3.1:", type="build")
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:1.4.1")
+ depends_on("python@:3.11", when="@:1.4.0")
+ depends_on("python@:3.10", when="@:1.3.1")
+
+ with default_args(type="build"):
+ depends_on("py-expandvars", when="@1.4.1:")
+ depends_on("py-setuptools@47:", when="@1.4.1:")
+ depends_on("py-setuptools@46.4:", when="@1.3.1:")
+ depends_on("py-setuptools")
+ depends_on("py-tomli", when="@1.4.1: ^python@:3.10")
+ depends_on("py-wheel@0.37:", when="@1.3:1.4.0")
+
+ # Not documented but still needed to cythonize files
+ depends_on("py-cython", when="@1.4.1:")
diff --git a/var/spack/repos/builtin/packages/py-fsspec-xrootd/package.py b/var/spack/repos/builtin/packages/py-fsspec-xrootd/package.py
new file mode 100644
index 0000000000..b14291a6b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fsspec-xrootd/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyFsspecXrootd(PythonPackage):
+ """An XRootD implementation for fsspec."""
+
+ homepage = "https://coffeateam.github.io/fsspec-xrootd/"
+ pypi = "fsspec_xrootd/fsspec_xrootd-0.4.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("BSD-3-Clause", checked_by="wdconinc")
+
+ version("0.4.0", sha256="d7f124430d26ab9139d33bc50fa8abfde3624db5dcaa5c18f56af9bf17f16f13")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build")
+
+ depends_on("py-fsspec", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-fsspec/package.py b/var/spack/repos/builtin/packages/py-fsspec/package.py
index 0b234b3ecb..d24069a32b 100644
--- a/var/spack/repos/builtin/packages/py-fsspec/package.py
+++ b/var/spack/repos/builtin/packages/py-fsspec/package.py
@@ -14,6 +14,13 @@ class PyFsspec(PythonPackage):
license("BSD-3-Clause")
+ # Requires pytest
+ skip_modules = ["fsspec.tests"]
+
+ version("2024.10.0", sha256="eda2d8a4116d4f2429db8550f2457da57279247dd930bb12f821b58391359493")
+ version("2024.5.0", sha256="1d021b0b0f933e3b3029ed808eb400c08ba101ca2de4b3483fbc9ca23fcee94a")
+ version("2024.3.1", sha256="f39780e282d7d117ffb42bb96992f8a90795e4d0fb0f661a70ca39fe9c43ded9")
+ version("2024.2.0", sha256="b6ad1a679f760dda52b1168c859d01b7b80648ea6f7f7c7f5a8a91dc3f3ecb84")
version("2023.10.0", sha256="330c66757591df346ad3091a53bd907e15348c2ba17d63fd54f5c39c4457d2a5")
version("2023.1.0", sha256="fbae7f20ff801eb5f7d0bedf81f25c787c0dfac5e982d98fa3884a9cde2b5411")
version("2022.11.0", sha256="259d5fd5c8e756ff2ea72f42e7613c32667dc2049a4ac3d84364a7ca034acb8b")
@@ -26,6 +33,8 @@ class PyFsspec(PythonPackage):
variant("http", default=False, description="HTTPFileSystem support", when="@0.8.1:")
- depends_on("py-setuptools", type="build")
- depends_on("py-requests", type=("build", "run"), when="+http")
+ depends_on("py-setuptools", type="build", when="@:2024.4")
+ depends_on("py-hatchling", type="build", when="@2024.5:")
+ depends_on("py-hatch-vcs", type="build", when="@2024.5:")
+ depends_on("py-requests", type=("build", "run"), when="@:2023+http")
depends_on("py-aiohttp", type=("build", "run"), when="+http")
diff --git a/var/spack/repos/builtin/packages/py-furo/package.py b/var/spack/repos/builtin/packages/py-furo/package.py
index 09c36a1b2d..681268df93 100644
--- a/var/spack/repos/builtin/packages/py-furo/package.py
+++ b/var/spack/repos/builtin/packages/py-furo/package.py
@@ -14,6 +14,10 @@ class PyFuro(PythonPackage):
license("MIT")
+ version("2024.7.18", sha256="37b08c5fccc95d46d8712c8be97acd46043963895edde05b0f4f135d58325c83")
+ version("2024.5.6", sha256="81f205a6605ebccbb883350432b4831c0196dd3d1bc92f61e1f459045b3d2b0b")
+ version("2024.4.27", sha256="15a9b65269038def2cefafb86c71c6616e3969b8f07ba231f588c10c4aee6d88")
+ version("2024.1.29", sha256="4d6b2fe3f10a6e36eb9cc24c1e7beb38d7a23fc7b3c382867503b7fcac8a1e02")
version("2023.9.10", sha256="5707530a476d2a63b8cad83b4f961f3739a69f4b058bcf38a03a39fa537195b2")
version("2023.5.20", sha256="40e09fa17c6f4b22419d122e933089226dcdb59747b5b6c79363089827dea16f")
@@ -21,5 +25,5 @@ class PyFuro(PythonPackage):
depends_on("py-beautifulsoup4", type=("build", "run"))
depends_on("py-sphinx@6:7", type=("build", "run"))
- depends_on("py-sphinx-basic-ng", type=("build", "run"))
+ depends_on("py-sphinx-basic-ng@1.0.0b2:", type=("build", "run"))
depends_on("py-pygments@2.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-future/package.py b/var/spack/repos/builtin/packages/py-future/package.py
index 14a51ad53b..9ed6394c0f 100644
--- a/var/spack/repos/builtin/packages/py-future/package.py
+++ b/var/spack/repos/builtin/packages/py-future/package.py
@@ -15,6 +15,7 @@ class PyFuture(PythonPackage):
license("MIT")
+ version("1.0.0", sha256="bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05")
version("0.18.3", sha256="34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307")
version("0.18.2", sha256="b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d")
version("0.17.1", sha256="67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8")
diff --git a/var/spack/repos/builtin/packages/py-gcovr/package.py b/var/spack/repos/builtin/packages/py-gcovr/package.py
index bd26134bc2..017346357c 100644
--- a/var/spack/repos/builtin/packages/py-gcovr/package.py
+++ b/var/spack/repos/builtin/packages/py-gcovr/package.py
@@ -15,9 +15,11 @@ class PyGcovr(PythonPackage):
homepage = "https://gcovr.com/"
pypi = "gcovr/gcovr-4.2.tar.gz"
+ version("7.2", sha256="e3e95cb56ca88dbbe741cb5d69aa2be494eb2fc2a09ee4f651644a670ee5aeb3")
version("5.2", sha256="217195085ec94346291a87b7b1e6d9cfdeeee562b3e0f9a32b25c9530b3bce8f")
version("4.2", sha256="5aae34dc81e51600cfecbbbce3c3a80ce3f7548bc0aa1faa4b74ecd18f6fca3f")
+ depends_on("python@3.8:", when="@7.2:", type=("build", "run"))
depends_on("python@3.7:", when="@5.1:", type=("build", "run"))
depends_on("python@3.6:", when="@5.0", type=("build", "run"))
depends_on("python@2.7:2,3.5:", when="@:4", type=("build", "run"))
@@ -26,3 +28,6 @@ class PyGcovr(PythonPackage):
depends_on("py-jinja2", type=("build", "run"))
depends_on("py-lxml", type=("build", "run"))
depends_on("py-pygments", when="@5:", type=("build", "run"))
+ depends_on("py-pygments@2.13.0:", when="@7.2:", type=("build", "run"))
+ depends_on("py-colorlog", when="@7.2:", type=("build", "run"))
+ depends_on("py-tomli@1.1:", when="@7.2: ^python@:3.10", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-gcsfs/package.py b/var/spack/repos/builtin/packages/py-gcsfs/package.py
index fbd53aef29..873753d629 100644
--- a/var/spack/repos/builtin/packages/py-gcsfs/package.py
+++ b/var/spack/repos/builtin/packages/py-gcsfs/package.py
@@ -14,12 +14,14 @@ class PyGcsfs(PythonPackage):
license("BSD-3-Clause")
+ version("2024.2.0", sha256="f7cffd7cae2fb50c56ef883f8aef9792be045b5059f06c1902c3a6151509f506")
version("2023.1.0", sha256="0a7b7ca8c1affa126a14ba35d7b7dff81c49e2aaceedda9732c7f159a4837a26")
depends_on("py-setuptools", type="build")
depends_on("py-aiohttp", type=("build", "run"))
depends_on("py-decorator@4.1.3:", type=("build", "run"))
- depends_on("py-fsspec@2023.1.0", type=("build", "run"))
+ depends_on("py-fsspec@2024.2.0", type=("build", "run"), when="@2024.2.0")
+ depends_on("py-fsspec@2023.1.0", type=("build", "run"), when="@2023.1.0")
depends_on("py-google-auth@1.2:", type=("build", "run"))
depends_on("py-google-auth-oauthlib", type=("build", "run"))
depends_on("py-google-cloud-storage", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-gdown/package.py b/var/spack/repos/builtin/packages/py-gdown/package.py
new file mode 100644
index 0000000000..4c7e0cef98
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-gdown/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGdown(PythonPackage):
+ """Google Drive Public File/Folder Downloader."""
+
+ homepage = "https://github.com/wkentaro/gdown"
+ pypi = "gdown/gdown-5.2.0.tar.gz"
+
+ license("MIT")
+
+ version("5.2.0", sha256="2145165062d85520a3cd98b356c9ed522c5e7984d408535409fd46f94defc787")
+
+ with default_args(type="build"):
+ depends_on("py-hatchling@1.20:")
+ depends_on("py-hatch-vcs")
+ depends_on("py-hatch-fancy-pypi-readme")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-filelock")
+ depends_on("py-requests+socks")
+ depends_on("py-tqdm")
+ depends_on("py-beautifulsoup4")
diff --git a/var/spack/repos/builtin/packages/py-gemmforge/package.py b/var/spack/repos/builtin/packages/py-gemmforge/package.py
new file mode 100644
index 0000000000..d368ca717b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-gemmforge/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGemmforge(PythonPackage):
+ """GPU-GEMM generator for the Discontinuous Galerkin method"""
+
+ homepage = "https://github.com/SeisSol/gemmforge/blob/master/README.md"
+ git = "https://github.com/SeisSol/gemmforge.git"
+
+ maintainers("davschneller", "Thomas-Ulrich")
+ license("BSD-3-Clause")
+
+ version("master", branch="master")
+ depends_on("py-numpy")
+ depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.spec.prefix)
+ env.prepend_path("PYTHONPATH", self.spec.prefix)
diff --git a/var/spack/repos/builtin/packages/py-genders/package.py b/var/spack/repos/builtin/packages/py-genders/package.py
index b548d374b1..dbaf2d715b 100644
--- a/var/spack/repos/builtin/packages/py-genders/package.py
+++ b/var/spack/repos/builtin/packages/py-genders/package.py
@@ -21,6 +21,9 @@ class PyGenders(Package):
sha256="0ff292825a29201106239c4d47d9ce4c6bda3f51c78c0463eb2634ecc337b774",
url="https://github.com/chaos/genders/releases/download/genders-1-22-1/genders-1.22.tar.gz",
)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
extends("python")
# FIXME: Missing a dependency on genders
diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py
index 66c8de0fd0..d9112609a5 100644
--- a/var/spack/repos/builtin/packages/py-genshi/package.py
+++ b/var/spack/repos/builtin/packages/py-genshi/package.py
@@ -15,8 +15,11 @@ class PyGenshi(PythonPackage):
version("0.7.7", sha256="c100520862cd69085d10ee1a87e91289e7f59f6b3d9bd622bf58b2804e6b9aab")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-six", type=("build", "run", "test"))
def test_testsuite(self):
+ """run unittest suite"""
python("-m", "unittest", "-v", "genshi.tests.suite")
diff --git a/var/spack/repos/builtin/packages/py-gensim/package.py b/var/spack/repos/builtin/packages/py-gensim/package.py
index c5ac143f0e..c4d4124257 100644
--- a/var/spack/repos/builtin/packages/py-gensim/package.py
+++ b/var/spack/repos/builtin/packages/py-gensim/package.py
@@ -23,6 +23,9 @@ class PyGensim(PythonPackage):
version("3.8.1", sha256="33277fc0a8d7b0c7ce70fcc74bb82ad39f944c009b334856c6e86bf552b1dfdc")
version("3.8.0", sha256="ec5de7ff2bfa8692fa96a846bb5aae52f267fc322fbbe303c1f042d258af5766")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("python@3.8:", type=("build", "run"), when="@4.3.1:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-geocube/package.py b/var/spack/repos/builtin/packages/py-geocube/package.py
index 6f691751c6..ea34cf9ddc 100644
--- a/var/spack/repos/builtin/packages/py-geocube/package.py
+++ b/var/spack/repos/builtin/packages/py-geocube/package.py
@@ -12,25 +12,28 @@ class PyGeocube(PythonPackage):
homepage = "https://github.com/corteva/geocube"
pypi = "geocube/geocube-0.0.17.tar.gz"
- maintainers("adamjstewart")
-
license("BSD-3-Clause")
+ maintainers("adamjstewart")
+ version("0.7.0", sha256="986ff46e78d7dede09a1c93bff1642c24aaa5590acdc774049436f86f0989ca4")
version("0.3.2", sha256="71ff0228f1ef44e3a649d29a045ff7e2a2094a5cfca30fadab8f88f4ec23a41d")
version("0.3.1", sha256="5c97131010cd8d556a5fad2a3824452120640ac33a6a45b6ca9ee3c28f2e266f")
version("0.0.17", sha256="bf8da0fa96d772ebaea0b98bafa0ba5b8639669d5feb07465d4255af177bddc0")
- depends_on("python@3.7:", type=("build", "run"))
- depends_on("python@3.8:", when="@0.1.1:", type=("build", "run"))
+ depends_on("python@3.10:", when="@0.4.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-appdirs", type=("build", "run"))
depends_on("py-click@6.0:", type=("build", "run"))
- depends_on("py-datacube", when="@:0.1", type=("build", "run"))
+ depends_on("py-geopandas@1:", when="@0.6:", type=("build", "run"))
depends_on("py-geopandas@0.7:", type=("build", "run"))
depends_on("py-odc-geo", when="@0.2:", type=("build", "run"))
+ depends_on("py-rasterio@1.3:", when="@0.4.3:", type=("build", "run"))
depends_on("py-rasterio", type=("build", "run"))
depends_on("py-rioxarray@0.4:", type=("build", "run"))
depends_on("py-scipy", when="@0.0.18:", type=("build", "run"))
depends_on("py-xarray@0.17:", type=("build", "run"))
depends_on("py-pyproj@2:", type=("build", "run"))
depends_on("py-numpy@1.20:", when="@0.3:", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-datacube", when="@:0.1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-geopandas/package.py b/var/spack/repos/builtin/packages/py-geopandas/package.py
index 4b11243b27..47194df24f 100644
--- a/var/spack/repos/builtin/packages/py-geopandas/package.py
+++ b/var/spack/repos/builtin/packages/py-geopandas/package.py
@@ -22,6 +22,9 @@ class PyGeopandas(PythonPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("1.0.1", sha256="b8bf70a5534588205b7a56646e2082fb1de9a03599651b3d80c99ea4c2ca08ab")
+ version("1.0.0", sha256="386d42c028047e2b0f09191d7859268304761c4711a247173a88891b6161f711")
+ version("0.14.3", sha256="748af035d4a068a4ae00cab384acb61d387685c833b0022e0729aa45216b23ac")
version("0.11.1", sha256="f0f0c8d0423d30cf81de2056d853145c4362739350a7f8f2d72cc7409ef1eca1")
version("0.11.0", sha256="562fe7dc19a6e0f61532d654c4752f7bf46e0714990c5844fe3de3f9c99cb873")
version("0.10.2", sha256="efbf47e70732e25c3727222019c92b39b2e0a66ebe4fe379fbe1aa43a2a871db")
@@ -38,18 +41,30 @@ class PyGeopandas(PythonPackage):
depends_on("python@3.6:", type=("build", "run"), when="@0.9:")
depends_on("python@3.7:", type=("build", "run"), when="@0.10:")
depends_on("python@3.8:", type=("build", "run"), when="@0.11:")
+ depends_on("python@3.9:", type=("build", "run"), when="@0.14:")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@61.0.0:", type="build", when="@0.14:")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-numpy@1.22:", type=("build", "run"), when="@0.14.4:")
+ # Only for versions 0.x.y - replaced by py-pyogrio
+ depends_on("py-fiona", type=("build", "run"), when="@:0.99")
+ depends_on("py-fiona@1.8:", type=("build", "run"), when="@0.9:0.99")
+ depends_on("py-fiona@1.8.21:", type=("build", "run"), when="@0.14:0.99")
+ # Only for versions 1.x.y - replaces py-fiona
+ depends_on("py-pyogrio@0.7.2:", type=("build", "run"), when="@1:")
+ depends_on("py-packaging", type=("build", "run"), when="@0.11:")
depends_on("py-pandas", type=("build", "run"))
depends_on("py-pandas@0.23.0:", type=("build", "run"), when="@0.6:")
depends_on("py-pandas@0.24.0:", type=("build", "run"), when="@0.9:")
depends_on("py-pandas@0.25.0:", type=("build", "run"), when="@0.10:")
depends_on("py-pandas@1.0.0:", type=("build", "run"), when="@0.11:")
- depends_on("py-shapely@:1", type=("build", "run"))
- depends_on("py-shapely@1.6:1", type=("build", "run"), when="@0.9:0.10")
- depends_on("py-shapely@1.7:1", type=("build", "run"), when="@0.11:")
- depends_on("py-fiona", type=("build", "run"))
- depends_on("py-fiona@1.8:", type=("build", "run"), when="@0.9:")
+ depends_on("py-pandas@1.4.0:", type=("build", "run"), when="@0.14:")
depends_on("py-pyproj", type=("build", "run"))
depends_on("py-pyproj@2.2.0:", type=("build", "run"), when="@0.7:")
depends_on("py-pyproj@2.6.1.post1:", type=("build", "run"), when="@0.11:")
- depends_on("py-packaging", type=("build", "run"), when="@0.11:")
+ depends_on("py-pyproj@3.3.0:", type=("build", "run"), when="@0.14:")
+ depends_on("py-shapely@:1", type=("build", "run"), when="@:0.99")
+ depends_on("py-shapely@1.6:1", type=("build", "run"), when="@0.9:0.10")
+ depends_on("py-shapely@1.7:1", type=("build", "run"), when="@0.11:0.99")
+ depends_on("py-shapely@1.8.0:", type=("build", "run"), when="@0.14:")
+ depends_on("py-shapely@2.0.0:", type=("build", "run"), when="@1:")
diff --git a/var/spack/repos/builtin/packages/py-geopmdpy/package.py b/var/spack/repos/builtin/packages/py-geopmdpy/package.py
new file mode 100644
index 0000000000..a67981826d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-geopmdpy/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGeopmdpy(PythonPackage):
+ """The Global Extensible Open Power Manager (GEOPM) Service provides a
+ user interface for accessing hardware telemetry and settings securely."""
+
+ homepage = "https://geopm.github.io"
+ git = "https://github.com/geopm/geopm.git"
+ url = "https://github.com/geopm/geopm/tarball/v3.1.0"
+
+ maintainers("bgeltz", "cmcantalupo")
+ license("BSD-3-Clause")
+ tags = ["e4s"]
+
+ version("develop", branch="dev", get_full_repo=True)
+ version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e")
+ version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("py-dasbus@1.6.0:", type=("build", "run"))
+ depends_on("py-cffi@1.14.5:", type="run")
+ depends_on("py-psutil@5.8.0:", type="run")
+ depends_on("py-jsonschema@3.2.0:", type="run")
+ depends_on("py-pyyaml@6.0:", type="run")
+ depends_on("py-setuptools@53.0.0:", type="build")
+ depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build")
+ depends_on("py-build@0.9.0:", when="@3.1:", type="build")
+
+ @property
+ def build_directory(self):
+ if self.version == Version("3.0.1"):
+ return "service"
+ else:
+ return "geopmdpy"
+
+ def setup_build_environment(self, env):
+ if not self.spec.version.isdevelop():
+ env.set("SETUPTOOLS_SCM_PRETEND_VERSION", self.version)
+
+ @run_before("install")
+ def populate_version(self):
+ if self.version == Version("3.0.1"):
+ with working_dir(join_path(self.build_directory, "geopmdpy")):
+ with open("version.py", "w") as fd:
+ fd.write(f"__version__ = '{self.spec.version}'")
diff --git a/var/spack/repos/builtin/packages/py-geopmpy/package.py b/var/spack/repos/builtin/packages/py-geopmpy/package.py
new file mode 100644
index 0000000000..7a7e13f734
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-geopmpy/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGeopmpy(PythonPackage):
+ """The Global Extensible Open Power Manager (GEOPM) Service provides a
+ user interface for accessing hardware telemetry and settings securely."""
+
+ homepage = "https://geopm.github.io"
+ git = "https://github.com/geopm/geopm.git"
+ url = "https://github.com/geopm/geopm/tarball/v3.1.0"
+
+ maintainers("bgeltz", "cmcantalupo")
+ license("BSD-3-Clause")
+ tags = ["e4s"]
+
+ version("develop", branch="dev", get_full_repo=True)
+ version("3.1.0", sha256="2d890cad906fd2008dc57f4e06537695d4a027e1dc1ed92feed4d81bb1a1449e")
+
+ depends_on("python@3.6:3", type=("build", "run"))
+ depends_on("py-setuptools@53.0.0:", type="build")
+ depends_on("py-setuptools-scm@7.0.3:", when="@3.1:", type="build")
+ depends_on("py-build@0.9.0:", when="@3.1:", type="build")
+ depends_on("py-cffi@1.14.5:", type="run")
+ depends_on("py-natsort@8.2.0:", type="run")
+ depends_on("py-numpy@1.19.5:", type="run")
+ depends_on("py-pandas@1.1.5:", type="run")
+ depends_on("py-tables@3.7.0:", type="run")
+ depends_on("py-psutil@5.8.0:", type="run")
+ depends_on("py-pyyaml@6.0:", type="run")
+ depends_on("py-docutils@0.18:", type="run")
+
+ build_directory = "geopmpy"
+
+ def setup_build_environment(self, env):
+ if not self.spec.version.isdevelop():
+ env.set("SETUPTOOLS_SCM_PRETEND_VERSION", self.version)
diff --git a/var/spack/repos/builtin/packages/py-geoviews/package.py b/var/spack/repos/builtin/packages/py-geoviews/package.py
new file mode 100644
index 0000000000..03c2b7fb4d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-geoviews/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGeoviews(PythonPackage):
+ """A Python library designed to make data analysis and visualization seamless and simple."""
+
+ homepage = "https://geoviews.org/"
+ pypi = "geoviews/geoviews-1.13.0.tar.gz"
+ git = "https://github.com/holoviz/geoviews.git"
+
+ license("BSD-3-Clause", checked_by="climbfuji")
+
+ version("1.13.0", sha256="7554a1e9114995acd243546fac6c6c7f157fc28529fde6ab236a72a6e77fe0bf")
+ # version("1.12.0", sha256="e2cbef0605e8fd1529bc643a31aeb61997f8f93c9b41a5aff8b2b355a76fa789")
+
+ depends_on("python@3.10:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ depends_on("py-bokeh@3.5", type=("build", "run"))
+
+ depends_on("py-cartopy@0.18:", type="run")
+ depends_on("py-holoviews@1.16:", type="run")
+ depends_on("py-numpy", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-panel@1:", type="run")
+ depends_on("py-param", type="run")
+ depends_on("py-pyproj", type="run")
+ depends_on("py-shapely", type="run")
+ depends_on("py-xyzservices", type="run")
diff --git a/var/spack/repos/builtin/packages/py-gevent/cython.patch b/var/spack/repos/builtin/packages/py-gevent/cython.patch
new file mode 100644
index 0000000000..91e751f2f9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-gevent/cython.patch
@@ -0,0 +1,9 @@
+--- a/src/gevent/_gevent_cqueue.pxd
++++ b/src/gevent/_gevent_cqueue.pxd
+@@ -75,7 +75,6 @@ cdef class ItemWaiter(Waiter):
+ cdef readonly Queue queue
+
+
+-@cython.final
+ cdef class UnboundQueue(Queue):
+ pass \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/py-gevent/package.py b/var/spack/repos/builtin/packages/py-gevent/package.py
index 85b6d5ff20..703bd2f751 100644
--- a/var/spack/repos/builtin/packages/py-gevent/package.py
+++ b/var/spack/repos/builtin/packages/py-gevent/package.py
@@ -15,20 +15,32 @@ class PyGevent(PythonPackage):
license("MIT")
+ version("24.11.1", sha256="8bd1419114e9e4a3ed33a5bad766afff9a3cf765cb440a582a1b3a9bc80c1aca")
+ version("24.10.3", sha256="aa7ee1bd5cabb2b7ef35105f863b386c8d5e332f754b60cfc354148bd70d35d1")
+ version("24.2.1", sha256="432fc76f680acf7cf188c2ee0f5d3ab73b63c1f03114c7cd8a34cebbe5aa2056")
version("23.7.0", sha256="d0d3630674c1b344b256a298ab1ff43220f840b12af768131b5d74e485924237")
version("21.12.0", sha256="f48b64578c367b91fa793bf8eaaaf4995cb93c8bc45860e473bf868070ad094e")
version("21.8.0", sha256="43e93e1a4738c922a2416baf33f0afb0a20b22d3dba886720bc037cd02a98575")
version("1.5.0", sha256="b2814258e3b3fb32786bb73af271ad31f51e1ac01f33b37426b66cb8491b4c29")
+ depends_on("c", type="build") # generated
+
+ depends_on("python@3.9:", when="@24.10.1:", type=("build", "run"))
depends_on("python@3.8:", when="@23.7.0:", type=("build", "run"))
depends_on("python@:3.10", when="@:21.12", type=("build", "run"))
depends_on("py-setuptools@40.8:", when="@20.5.1:", type=("build", "run"))
depends_on("py-setuptools@40.8:", when="@1.5:", type="build")
depends_on("py-setuptools@24.2:", when="@:1.4", type="build")
+ depends_on("py-cython@3.0.11:", when="@24.10.1:", type="build")
+ depends_on("py-cython@3.0.8:", when="@24.2.1:", type="build")
+ depends_on("py-cython@3.0.2:", when="@23.9.0:", type="build")
depends_on("py-cython@3:", when="@20.5.1:", type="build")
depends_on("py-cython@0.29.14:", when="@1.5:", type="build")
+ depends_on("py-cffi@1.17.1:", when="@24.10.1:", type=("build", "run"))
depends_on("py-cffi@1.12.3:", type=("build", "run"))
+ depends_on("py-greenlet@3.1.1:", when="@24.10.1:", type=("build", "run")) # setup.py
+ depends_on("py-greenlet@3.0.3:", when="@24.2.1:", type=("build", "run"))
depends_on("py-greenlet@3:", when="@23.7: ^python@3.12:", type=("build", "run"))
depends_on("py-greenlet@2:", when="@22.10.2: ^python@:3.11", type=("build", "run"))
depends_on("py-greenlet@1.1:1", when="@21.8:21.12.0", type=("build", "run"))
@@ -43,6 +55,9 @@ class PyGevent(PythonPackage):
# Deprecated compiler options. upstream PR: https://github.com/gevent/gevent/pull/1896
patch("icc.patch", when="@:21.12.0 %intel")
+ # https://github.com/gevent/gevent/issues/2031
+ patch("cython.patch", when="@:24.2.1^py-cython@3.0.10:3.0.11")
+
@run_before("install")
def recythonize(self):
# Clean pre-generated cython files -- we've seen issues with Python 3.8 due to
@@ -56,6 +71,6 @@ class PyGevent(PythonPackage):
if name == "cflags":
if self.spec.satisfies("%oneapi@2023:"):
flags.append("-Wno-error=incompatible-function-pointer-types")
- if self.spec.compiler.name in ["intel", "oneapi"]:
+ if self.spec.satisfies("%oneapi") or self.spec.satisfies("%intel"):
flags.append("-we147")
return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/py-gimmik/package.py b/var/spack/repos/builtin/packages/py-gimmik/package.py
index 2d14aca41e..4c9617994d 100644
--- a/var/spack/repos/builtin/packages/py-gimmik/package.py
+++ b/var/spack/repos/builtin/packages/py-gimmik/package.py
@@ -19,6 +19,7 @@ class PyGimmik(PythonPackage):
license("BSD-3-Clause")
+ version("3.2.1", sha256="048644bd71497eb07e144f2c22fdee49ba23e1cde5fb954c3c30c4e3ea23687a")
version("3.0", sha256="45c2da7acff3201b7796ba731e4be7f3b4f39469ff1f1bc0ddf4f19c4a6af010")
version("2.3", sha256="c019c85316bcf0d5e84de9b7d10127355dfe8037c0e37f1880a9819ce92b74e1")
version("2.2", sha256="9144640f94aab92f9c5dfcaf16885a79428ab97337cf503a4b2dddeb870f3cf0")
diff --git a/var/spack/repos/builtin/packages/py-gitpython/package.py b/var/spack/repos/builtin/packages/py-gitpython/package.py
index 6a6e41a8ea..7af7dd8a56 100644
--- a/var/spack/repos/builtin/packages/py-gitpython/package.py
+++ b/var/spack/repos/builtin/packages/py-gitpython/package.py
@@ -14,35 +14,72 @@ class PyGitpython(PythonPackage):
license("BSD-3-Clause")
- version("3.1.40", sha256="22b126e9ffb671fdd0c129796343a02bf67bf2994b35449ffc9321aa755e18a4")
- version("3.1.34", sha256="85f7d365d1f6bf677ae51039c1ef67ca59091c7ebd5a3509aa399d4eda02d6dd")
- version("3.1.27", sha256="1c885ce809e8ba2d88a29befeb385fcea06338d3640712b59ca623c220bb5704")
- version("3.1.24", sha256="df83fdf5e684fef7c6ee2c02fc68a5ceb7e7e759d08b694088d0cacb4eba59e5")
- version("3.1.23", sha256="aaae7a3bfdf0a6db30dc1f3aeae47b71cd326d86b936fe2e158aa925fdf1471c")
- version("3.1.22", sha256="e1589f27c3cd1f33b22db1df194201b5abca6b4cc5450f13f9c371e099c1b24f")
- version("3.1.20", sha256="df0e072a200703a65387b0cfdf0466e3bab729c0458cf6b7349d0e9877636519")
- version("3.1.19", sha256="18f4039b96b5567bc4745eb851737ce456a2d499cecd71e84f5c0950e92d0e53")
- version("3.1.18", sha256="b838a895977b45ab6f0cc926a9045c8d1c44e2b653c1fcc39fe91f42c6e8f05b")
- version("3.1.17", sha256="ee24bdc93dce357630764db659edaf6b8d664d4ff5447ccfeedd2dc5c253f41e")
- version("3.1.16", sha256="2bfcd25e6b81fe431fa3ab1f0975986cfddabf7870a323c183f3afbc9447c0c5")
- version("3.1.15", sha256="05af150f47a5cca3f4b0af289b73aef8cf3c4fe2385015b06220cbcdee48bb6e")
- version("3.1.14", sha256="be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61")
- version("3.1.13", sha256="8621a7e777e276a5ec838b59280ba5272dd144a18169c36c903d8b38b99f750a")
- version("3.1.12", sha256="42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac")
- version("3.1.11", sha256="befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8")
- version("3.1.10", sha256="f488d43600d7299567b59fe41497d313e7c1253a9f2a8ebd2df8af2a1151c71d")
- version("3.1.9", sha256="a03f728b49ce9597a6655793207c6ab0da55519368ff5961e4a74ae475b9fa8e")
- version("3.1.8", sha256="080bf8e2cf1a2b907634761c2eaefbe83b69930c94c66ad11b65a8252959f912")
- version("3.1.7", sha256="2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858")
- version("3.1.6", sha256="b54969b3262d4647f80ace8e9dd4e3f99ac30cc0f3e766415b349208f810908f")
- version("3.1.5", sha256="90400ecfa87bac36ac75dfa7b62e83a02017b51759f6eef4494e4de775b2b4be")
- version("3.1.4", sha256="fa98ce1f05805d59bbc3adb16c0780e5ca43b5ea9422feecf1cd0949a61d947e")
- version("3.1.3", sha256="e107af4d873daed64648b4f4beb89f89f0cfbe3ef558fc7821ed2331c2f8da1a")
- version("3.1.2", sha256="864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94")
- version("3.1.1", sha256="6d4f10e2aaad1864bb0f17ec06a2c2831534140e5883c350d58b4e85189dab74")
- version("3.1.0", sha256="e426c3b587bd58c482f0b7fe6145ff4ac7ae6c82673fc656f489719abca6f4cb")
- version("3.0.9", sha256="7e5df21bfef38505115ad92544fb379e6fedb2753f3b709174c4358cecd0cb97")
- version("0.3.6", sha256="e6599fcb939cb9b25a015a429702db39de10f2b493655ed5669c49c37707d233")
+ version("3.1.43", sha256="35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-22190
+ version(
+ "3.1.40", sha256="22b126e9ffb671fdd0c129796343a02bf67bf2994b35449ffc9321aa755e18a4"
+ )
+ version(
+ "3.1.34", sha256="85f7d365d1f6bf677ae51039c1ef67ca59091c7ebd5a3509aa399d4eda02d6dd"
+ )
+ version(
+ "3.1.27", sha256="1c885ce809e8ba2d88a29befeb385fcea06338d3640712b59ca623c220bb5704"
+ )
+ version(
+ "3.1.24", sha256="df83fdf5e684fef7c6ee2c02fc68a5ceb7e7e759d08b694088d0cacb4eba59e5"
+ )
+ version(
+ "3.1.23", sha256="aaae7a3bfdf0a6db30dc1f3aeae47b71cd326d86b936fe2e158aa925fdf1471c"
+ )
+ version(
+ "3.1.22", sha256="e1589f27c3cd1f33b22db1df194201b5abca6b4cc5450f13f9c371e099c1b24f"
+ )
+ version(
+ "3.1.20", sha256="df0e072a200703a65387b0cfdf0466e3bab729c0458cf6b7349d0e9877636519"
+ )
+ version(
+ "3.1.19", sha256="18f4039b96b5567bc4745eb851737ce456a2d499cecd71e84f5c0950e92d0e53"
+ )
+ version(
+ "3.1.18", sha256="b838a895977b45ab6f0cc926a9045c8d1c44e2b653c1fcc39fe91f42c6e8f05b"
+ )
+ version(
+ "3.1.17", sha256="ee24bdc93dce357630764db659edaf6b8d664d4ff5447ccfeedd2dc5c253f41e"
+ )
+ version(
+ "3.1.16", sha256="2bfcd25e6b81fe431fa3ab1f0975986cfddabf7870a323c183f3afbc9447c0c5"
+ )
+ version(
+ "3.1.15", sha256="05af150f47a5cca3f4b0af289b73aef8cf3c4fe2385015b06220cbcdee48bb6e"
+ )
+ version(
+ "3.1.14", sha256="be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61"
+ )
+ version(
+ "3.1.13", sha256="8621a7e777e276a5ec838b59280ba5272dd144a18169c36c903d8b38b99f750a"
+ )
+ version(
+ "3.1.12", sha256="42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac"
+ )
+ version(
+ "3.1.11", sha256="befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8"
+ )
+ version(
+ "3.1.10", sha256="f488d43600d7299567b59fe41497d313e7c1253a9f2a8ebd2df8af2a1151c71d"
+ )
+ version("3.1.9", sha256="a03f728b49ce9597a6655793207c6ab0da55519368ff5961e4a74ae475b9fa8e")
+ version("3.1.8", sha256="080bf8e2cf1a2b907634761c2eaefbe83b69930c94c66ad11b65a8252959f912")
+ version("3.1.7", sha256="2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858")
+ version("3.1.6", sha256="b54969b3262d4647f80ace8e9dd4e3f99ac30cc0f3e766415b349208f810908f")
+ version("3.1.5", sha256="90400ecfa87bac36ac75dfa7b62e83a02017b51759f6eef4494e4de775b2b4be")
+ version("3.1.4", sha256="fa98ce1f05805d59bbc3adb16c0780e5ca43b5ea9422feecf1cd0949a61d947e")
+ version("3.1.3", sha256="e107af4d873daed64648b4f4beb89f89f0cfbe3ef558fc7821ed2331c2f8da1a")
+ version("3.1.2", sha256="864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94")
+ version("3.1.1", sha256="6d4f10e2aaad1864bb0f17ec06a2c2831534140e5883c350d58b4e85189dab74")
+ version("3.1.0", sha256="e426c3b587bd58c482f0b7fe6145ff4ac7ae6c82673fc656f489719abca6f4cb")
+ version("3.0.9", sha256="7e5df21bfef38505115ad92544fb379e6fedb2753f3b709174c4358cecd0cb97")
+ version("0.3.6", sha256="e6599fcb939cb9b25a015a429702db39de10f2b493655ed5669c49c37707d233")
depends_on("python@3.4:", type=("build", "run"))
depends_on("python@3.5:", type=("build", "run"), when="@3.1.15:")
diff --git a/var/spack/repos/builtin/packages/py-glean-parser/package.py b/var/spack/repos/builtin/packages/py-glean-parser/package.py
new file mode 100644
index 0000000000..515398f61c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-glean-parser/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGleanParser(PythonPackage):
+ """Parser tools for Mozilla's Glean telemetry."""
+
+ homepage = "https://mozilla.github.io/glean_parser/"
+ pypi = "glean_parser/glean_parser-14.3.0.tar.gz"
+
+ license("MPL-2.0", checked_by="teaguesterling")
+
+ version("14.3.0", sha256="b48d643029fb824b0b76adb2b4a00e88a49de4ec479ac9c5add52c511e9be481")
+ version("14.0.1", sha256="3e9e5f99ad8592300e364b70d6247b21c445774a73a2ad274677fb58a0065809")
+
+ depends_on("py-appdirs@1.4:")
+ depends_on("py-click@7:")
+ depends_on("py-diskcache@4:")
+ depends_on("py-jinja2@2.10.1:")
+ depends_on("py-jsonschema@3.0.2:")
+ depends_on("py-pyyaml@5.3.1:")
+ depends_on("py-pytest-runner", type="build")
+ depends_on("py-setuptools-scm@7:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-glean-sdk/package.py b/var/spack/repos/builtin/packages/py-glean-sdk/package.py
new file mode 100644
index 0000000000..364df91278
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-glean-sdk/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGleanSdk(PythonPackage):
+ """Mozilla's Glean Telemetry SDK"""
+
+ homepage = "https://mozilla.github.io/glean/book/index.html"
+ url = "https://github.com/mozilla/glean/archive/refs/tags/v60.4.0.tar.gz"
+
+ license("MPL-2.0", checked_by="teaguesterling")
+
+ version("60.5.0", sha256="0a23adad449c05d2cc522dc28ef98287b59a42ff112e53e3c8b4cfe9c938f6ae")
+ version("60.4.0", sha256="24bc608e06580962ce029cc4c09a51af75e4a29b3d889232b298f87208acbf62")
+ version("60.0.1", sha256="ba7fb8b1e4ecd50da4dc2e02ef887a71d93f848580e17a6f3e947ed3bcf68726")
+
+ depends_on("python@3.8:")
+ depends_on("py-semver@2.13.0:")
+ depends_on("py-glean-parser@14.0", when="@:60.3")
+ depends_on("py-glean-parser@14.3:", when="@60.4:")
+ depends_on("py-maturin@1")
diff --git a/var/spack/repos/builtin/packages/py-glmnet-python/package.py b/var/spack/repos/builtin/packages/py-glmnet-python/package.py
new file mode 100644
index 0000000000..8b6e5cbfe5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-glmnet-python/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGlmnetPython(PythonPackage):
+ """This is a python version of the popular glmnet library (beta release).
+ Glmnet fits the entire lasso or elastic-net regularization path for linear
+ regression, logistic and multinomial regression models, poisson regression
+ and the cox model."""
+
+ # Not to be confused with py-glmnet
+
+ homepage = "https://github.com/johnlees/glmnet_python/"
+ # Not availible on PyPI. Note that this is a fork of
+ # https://github.com/bbalasub1/glmnet_python, as required for py-pyseer
+ url = "https://github.com/johnlees/glmnet_python/archive/v1.0.2.zip"
+
+ version("1.0.2", sha256="cc80020dcebc5366dcc061aec59318efac69d23578066326d925bfc27a23cb27")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-joblib@0.10.3:", type=("build", "run"))
+ # Not in setup.py, but imported and used:
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-glmnet/package.py b/var/spack/repos/builtin/packages/py-glmnet/package.py
index f4f11ce611..ed41241b82 100644
--- a/var/spack/repos/builtin/packages/py-glmnet/package.py
+++ b/var/spack/repos/builtin/packages/py-glmnet/package.py
@@ -19,6 +19,8 @@ class PyGlmnet(PythonPackage):
version("2.2.1", sha256="3222bca2e901b3f60c2dc22df7aeba6bb9c7b6451b44cbbe1b91084b66f14481")
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-glmsingle/package.py b/var/spack/repos/builtin/packages/py-glmsingle/package.py
index 3b3e3c28c1..aeb694ac75 100644
--- a/var/spack/repos/builtin/packages/py-glmsingle/package.py
+++ b/var/spack/repos/builtin/packages/py-glmsingle/package.py
@@ -16,6 +16,7 @@ class PyGlmsingle(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("1.2", sha256="1826e716d29451c6f64912f180e3c5aa5b1e45957f1df75d0bce32711448cc9b")
version("1.1", sha256="3fe3cb1f0d1e96976f2c707b1f9e8ddb932b74f58e99debbfa6f17761fdbd37b")
version("1.0", sha256="0481f8ea7637d7e9cb53a7f22c73ba67b9fb8aefebc8c6c98bd4712de95db6aa")
@@ -29,6 +30,7 @@ class PyGlmsingle(PythonPackage):
depends_on("py-fracridge", type=("build", "run"))
depends_on("py-nibabel", when="@1.1:", type=("build", "run"))
depends_on("py-h5py", when="@1.1:", type=("build", "run"))
+ depends_on("py-pandas", when="@1.2:", type=("build", "run"))
with when("@:1.0"):
depends_on("py-twine", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-glob2/package.py b/var/spack/repos/builtin/packages/py-glob2/package.py
index 03bc375a98..ef2efd23df 100644
--- a/var/spack/repos/builtin/packages/py-glob2/package.py
+++ b/var/spack/repos/builtin/packages/py-glob2/package.py
@@ -10,7 +10,7 @@ class PyGlob2(PythonPackage):
"""Version of the glob module that can capture patterns
and supports recursive wildcards."""
- homepage = "http://github.com/miracle2k/python-glob2/"
+ homepage = "https://github.com/miracle2k/python-glob2/"
pypi = "glob2/glob2-0.7.tar.gz"
version("0.7", sha256="85c3dbd07c8aa26d63d7aacee34fa86e9a91a3873bc30bf62ec46e531f92ab8c")
diff --git a/var/spack/repos/builtin/packages/py-globus-cli/package.py b/var/spack/repos/builtin/packages/py-globus-cli/package.py
new file mode 100644
index 0000000000..c945eddaba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-globus-cli/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGlobusCli(PythonPackage):
+ """Globus CLI is a standalone application that can be installed on the user's machine
+ and is used to access the Globus service. The CLI provides an interface to Globus
+ services from the shell, and is suited to both interactive and simple scripting use cases."""
+
+ homepage = "https://docs.globus.org/cli"
+ git = "https://github.com/globus/globus-cli.git"
+ url = "https://github.com/globus/globus-cli/archive/refs/tags/3.16.0.zip"
+
+ maintainers("climbfuji")
+
+ version("3.16.0", sha256="0ef721060870d9346505e52b9bf30c7bed6ae136cc08762deb2f8893bd25d8c5")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-globus-sdk@3.25.0", type=("build", "run"))
+ depends_on("py-click@8", type=("build", "run"))
+ depends_on("py-jmespath@1.0.1", type=("build", "run"))
+ depends_on("py-packaging@17:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-globus-sdk/package.py b/var/spack/repos/builtin/packages/py-globus-sdk/package.py
index 63479391f8..dbc275e30a 100644
--- a/var/spack/repos/builtin/packages/py-globus-sdk/package.py
+++ b/var/spack/repos/builtin/packages/py-globus-sdk/package.py
@@ -13,12 +13,30 @@ class PyGlobusSdk(PythonPackage):
"""
homepage = "https://github.com/globus/globus-sdk-python"
- pypi = "globus-sdk/globus-sdk-3.0.2.tar.gz"
-
- maintainers("hategan")
-
- license("Apache-2.0")
-
+ pypi = "globus_sdk/globus_sdk-3.0.2.tar.gz"
+
+ maintainers("hategan", "climbfuji")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("3.42.0", sha256="7f239acf26cd98c72568b07cc69d7e8d84511004881435c83129bf37c9495f43")
+ version("3.41.0", sha256="a097829e7516735675c1535bd17a8d9137636678bdbf50e95b3e7af8b32638ef")
+ version("3.40.0", sha256="6394f01c35b2b3275622f4f7c194eaf6750cb6c1e82cb2448dac2eb4ec394d75")
+ version("3.39.0", sha256="10af5291ba261e817665d5951948206232ecebccdc2aa8adc0528f0031ab80c3")
+ version("3.38.0", sha256="b83faacc103e3d3d3ac2ae33fd73a20a09d4d566cfa0cb03716b3fd8f51adcff")
+ version("3.37.0", sha256="87cd4cc191bca5912138c1f992589c735e13436208db10f2de5831efbebc83a7")
+ version("3.36.0", sha256="7693954a9ee3d69d09a0914c934ebcf4b4f47f016baa5c33612a03e367ee65a3")
+ version("3.35.0", sha256="9da40d5f251f98d89297c2a92abd9f24bfa3c041dfd0e957579884ef0c882cf2")
+ version("3.34.0", sha256="4db2ff439de9bd650bc2ba2d7c00614bd3dee34bd9b79da708951b8148236a36")
+ version("3.33.0", sha256="38b048590cf7bbd01c5ac82346401c3f42c3f105c81421d61bcb771aa788f481")
+ version("3.32.0", sha256="fe9df4ca2f2d16bbf40098df482e1713070946c70e2d6ec6a687c7086c1b559c")
+ version("3.31.0", sha256="5f077a8e532828a137a54f2858e63695af16d02577de058278da4ec873556cc1")
+ version("3.30.0", sha256="29d25f83d3b250d28a3a4bca8d046601a4bbb725330f409e6401295fa6bfb0ce")
+ version("3.29.0", sha256="a5f3c2da86ac6e7165841c9364ae80893f2ae667add5af5cd2237fc3fa14a1be")
+ version("3.28.0", sha256="249423dda76f162bb0d5515509135b68d6a779ad0cf2cd02a8204b2c7903e365")
+ version("3.27.0", sha256="1e9afac3bcce7dd69199c6e85372b0d6cadcc0906b27129d88db7e41dc32f195")
+ version("3.26.0", sha256="5a2bca267635c62e0f7c60fce10c47c7fd0fa8923c3363d44871c4abca8a68d1")
+ version("3.25.0", sha256="d9be275d4ec18054db04732f75649c4227800c79b31fbcfb3f4f31eccfa5f4f7")
version("3.10.1", sha256="c20fec55fc7e099f4d0c8224a36e194604577539445c5985cb465b23779baee8")
version("3.10.0", sha256="7a7e7cd5cfbc40c6dc75bdb92b050c4191f992b5f7081cd08895bf119fd97bbf")
version("3.9.0", sha256="456f707b25a8c502607134f1d699b5970ef1aa9d17877474db73fc6d87c711e9")
@@ -27,8 +45,18 @@ class PyGlobusSdk(PythonPackage):
version("3.0.2", sha256="765b577b37edac70c513179607f1c09de7b287baa855165c9dd68de076d67f16")
depends_on("python@3.6:", type=("build", "run"))
+ depends_on("python@3.7:", type=("build", "run"), when="@3.17:")
+ depends_on("python@3.8:", type=("build", "run"), when="@3.42:")
depends_on("py-setuptools", type="build")
depends_on("py-requests@2.19.1:2", type=("build", "run"))
depends_on("py-pyjwt@2.0.0:2+crypto", type=("build", "run"))
depends_on("py-cryptography@3.3.1:3.3,3.4.1:", when="@3.7:", type=("build", "run"))
depends_on("py-cryptography@2:3.3,3.4.1:3.6", when="@:3.0", type=("build", "run"))
+ depends_on("py-typing-extensions@4:", when="@3.25: ^python@:3.9", type=("build", "run"))
+ depends_on("py-importlib-resources@5.12.0:", when="@3.41: ^python@:3.8", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if version <= Version("3.39"):
+ return super().url_for_version(version).replace("_", "-")
+ else:
+ return super().url_for_version(version)
diff --git a/var/spack/repos/builtin/packages/py-gmsh/package.py b/var/spack/repos/builtin/packages/py-gmsh/package.py
new file mode 100644
index 0000000000..b1e3ce20bf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-gmsh/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGmsh(PythonPackage):
+ """Pythonic interface to GMSH."""
+
+ homepage = "https://pypi.org/project/gmsh"
+ url = "https://files.pythonhosted.org/packages/30/cb/44245b93105e93ca0223f4dfbfd199803b10770e79dee63f63cb755570e0/gmsh-4.13.1-py2.py3-none-manylinux_2_24_x86_64.whl"
+
+ maintainers("tech-91")
+
+ license("GPL-2.0-or-later")
+
+ version("4.13.1", sha256="89ab53b6ec28f099b723da35bcdb6f5df779b10a9c0e6b09e8059906c3a48b27")
+ depends_on("gmsh+opencascade", type=("build", "run"))
+ depends_on("python@3.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-gmxapi/package.py b/var/spack/repos/builtin/packages/py-gmxapi/package.py
index 77a03d6fd4..27f3f7bf93 100644
--- a/var/spack/repos/builtin/packages/py-gmxapi/package.py
+++ b/var/spack/repos/builtin/packages/py-gmxapi/package.py
@@ -26,9 +26,11 @@ class PyGmxapi(PythonPackage):
version("0.4.1", sha256="cc7a2e509ab8a59c187d388dcfd21ea78b785c3b355149b1818085f34dbda62a")
version("0.4.0", sha256="7fd58e6a4b1391043379e8ba55555ebeba255c5b394f5df9d676e6a5571d7eba")
+ depends_on("cxx", type="build") # generated
+
depends_on("gromacs@2022.1:~mdrun_only+shared")
depends_on("mpi")
- depends_on("py-cmake@3.16:", type="build")
+ depends_on("cmake@3.16:", type="build")
depends_on("py-importlib-metadata", type="test", when="^python@:3.7")
depends_on("py-mpi4py", type=("build", "run"))
depends_on("py-networkx@2.0:", type=("build", "run"))
@@ -49,5 +51,4 @@ class PyGmxapi(PythonPackage):
def install_test(self):
with working_dir("spack-test", create=True):
# test include helper points to right location
- python = self.spec["python"].command
python("-m", "pytest", "-x", os.path.join(self.build_directory, "test"))
diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py
index 4b87213469..93edb94388 100644
--- a/var/spack/repos/builtin/packages/py-gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py
@@ -10,7 +10,7 @@ class PyGnuplot(PythonPackage):
"""Gnuplot.py is a Python package that allows you to create graphs from
within Python using the gnuplot plotting program."""
- homepage = "http://gnuplot-py.sourceforge.net/"
+ homepage = "https://gnuplot-py.sourceforge.net/"
url = (
"http://downloads.sourceforge.net/project/gnuplot-py/Gnuplot-py/1.8/gnuplot-py-1.8.tar.gz"
)
diff --git a/var/spack/repos/builtin/packages/py-google-api-core/package.py b/var/spack/repos/builtin/packages/py-google-api-core/package.py
index be636c3553..f0ad49eed8 100644
--- a/var/spack/repos/builtin/packages/py-google-api-core/package.py
+++ b/var/spack/repos/builtin/packages/py-google-api-core/package.py
@@ -9,8 +9,8 @@ from spack.package import *
class PyGoogleApiCore(PythonPackage):
"""Google API client core library."""
- homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"
- pypi = "google-api-core/google-api-core-1.14.2.tar.gz"
+ homepage = "https://github.com/googleapis/python-api-core"
+ pypi = "google-api-core/google-api-core-2.17.0.tar.gz"
# 'google.api_core.operations_v1' and 'google.api_core.gapic_v1' require 'grpc'.
# Leave them out of 'import_modules' to avoid optional dependency.
@@ -18,9 +18,22 @@ class PyGoogleApiCore(PythonPackage):
license("Apache-2.0")
+ version("2.17.0", sha256="de7ef0450faec7c75e0aea313f29ac870fdc44cfaec9d6499a9a17305980ef66")
+ version("2.16.2", sha256="032d37b45d1d6bdaf68fb11ff621e2593263a239fa9246e2e94325f9c47876d2")
+ version("2.15.0", sha256="abc978a72658f14a2df1e5e12532effe40f94f868f6e23d95133bd6abcca35ca")
+ version("2.14.0", sha256="5368a4502b793d9bbf812a5912e13e4e69f9bd87f6efb508460c43f5bbd1ce41")
+ version("2.13.1", sha256="f2bcb43c98329f558dd13b3cd745cef04f07a107446f4f2bfc69adf09b02b994")
+ version("2.12.0", sha256="c22e01b1e3c4dcd90998494879612c38d0a3411d1f7b679eb89e2abe3ce1f553")
+ version("2.11.1", sha256="25d29e05a0058ed5f19c61c0a78b1b53adea4d9364b464d014fbda941f6d1c9a")
version("2.11.0", sha256="4b9bb5d5a380a0befa0573b302651b8a9a89262c1730e37bf423cec511804c22")
version("1.14.2", sha256="2c23fbc81c76b941ffb71301bb975ed66a610e9b03f918feacd1ed59cf43a6ec")
+ variant(
+ "grpc",
+ default=False,
+ description="Enable support for gRPC Remote Procedure Call framework.",
+ )
+
with when("@2:"):
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-googleapis-common-protos@1.56.2:1", type=("build", "run"))
@@ -28,6 +41,12 @@ class PyGoogleApiCore(PythonPackage):
depends_on("py-google-auth@2.14.1:2", type=("build", "run"))
depends_on("py-requests@2.18:2", type=("build", "run"))
+ with when("+grpc"):
+ depends_on("py-grpcio-status@1.49.1:1", when="^python@3.11:", type="run")
+ depends_on("py-grpcio-status@1.33.2:1", when="@2.2.0:", type="run")
+ depends_on("py-grpcio@1.49.1:1", when="^python@3.11:", type="run")
+ depends_on("py-grpcio@1.33.2:1", type="run")
+
with when("@:1"):
depends_on("py-googleapis-common-protos@1.6:1", type=("build", "run"))
depends_on("py-protobuf@3.4.0:", type=("build", "run"))
@@ -36,3 +55,9 @@ class PyGoogleApiCore(PythonPackage):
depends_on("py-setuptools@34.0.0:", type=("build", "run"))
depends_on("py-six@1.10.0:", type=("build", "run"))
depends_on("py-pytz", type=("build", "run"))
+
+ with when("+grpc"):
+ depends_on("py-grpcio-status@1.33.2:1", when="@1.33:", type="run")
+ depends_on("py-grpcio@1.33.2:1", when="@1.33:", type="run")
+ depends_on("py-grpcio@1.29.0:1", when="@1.19.1", type="run")
+ depends_on("py-grpcio@1.8.2:1", type="run")
diff --git a/var/spack/repos/builtin/packages/py-google-auth/package.py b/var/spack/repos/builtin/packages/py-google-auth/package.py
index e115907e96..15ecfb44c9 100644
--- a/var/spack/repos/builtin/packages/py-google-auth/package.py
+++ b/var/spack/repos/builtin/packages/py-google-auth/package.py
@@ -15,6 +15,7 @@ class PyGoogleAuth(PythonPackage):
license("Apache-2.0")
+ version("2.27.0", sha256="e863a56ccc2d8efa83df7a80272601e43487fa9a728a376205c86c26aaefa821")
version("2.20.0", sha256="030af34138909ccde0fbce611afc178f1d65d32fbff281f25738b1fe1c6f3eaa")
version("2.16.2", sha256="07e14f34ec288e3f33e00e2e3cc40c8942aa5d4ceac06256a28cd8e786591420")
version("2.11.0", sha256="ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb")
@@ -30,8 +31,9 @@ class PyGoogleAuth(PythonPackage):
depends_on("py-pyasn1-modules@0.2.1:", type=("build", "run"))
depends_on("py-rsa@3.1.4:4", when="@2.3:", type=("build", "run"))
depends_on("py-rsa@3.1.4:", type=("build", "run"))
- depends_on("py-six@1.9:", type=("build", "run"))
- depends_on("py-urllib3@:1", when="@2.18:", type=("build", "run"))
+ depends_on("py-six@1.9:", when="@:2.22", type=("build", "run"))
+ depends_on("py-urllib3@2.0.5:", when="@2.23.1", type=("build", "run"))
+ depends_on("py-urllib3@:1", when="@2.18:2.23.0", type=("build", "run"))
with when("+aiohttp"):
depends_on("py-aiohttp@3.6.2:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-google-cloud-appengine-logging/package.py b/var/spack/repos/builtin/packages/py-google-cloud-appengine-logging/package.py
new file mode 100644
index 0000000000..7d8eb8c6e3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-google-cloud-appengine-logging/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGoogleCloudAppengineLogging(PythonPackage):
+ """Google Cloud Appengine Logging API client library."""
+
+ homepage = "https://googleapis.github.io/google-cloud-python"
+ pypi = "google_cloud_appengine_logging/google-cloud-appengine-logging-1.4.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("1.4.1", sha256="9905c7c30c3c2bbedd0b132e2b271fc8247333ebc931d2d23af1bbbd11b435fe")
+
+ # https://github.com/googleapis/google-cloud-python/blob/google-cloud-appengine-logging-v1.4.1/packages/google-cloud-appengine-logging/setup.py
+
+ depends_on("py-google-api-core+grpc@1.34.0:2", type=("build", "run"))
+ conflicts("py-google-api-core@2.0:2.10")
+
+ depends_on("py-google-auth@2.14.1:2", type=("build", "run"))
+ depends_on("py-proto-plus@1.22.3:1", type=("build", "run"))
+
+ depends_on("py-protobuf@3.19.5:4", type=("build", "run"))
+ conflicts("py-protobuf@3.20.0,3.20.1,4.21.0:4.21.5")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-google-cloud-audit-log/package.py b/var/spack/repos/builtin/packages/py-google-cloud-audit-log/package.py
new file mode 100644
index 0000000000..533645b37f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-google-cloud-audit-log/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGoogleCloudAuditLog(PythonPackage):
+ """Google Cloud Audit Protos."""
+
+ homepage = "https://github.com/googleapis/python-audit-log"
+ pypi = "google_cloud_audit_log/google-cloud-audit-log-0.2.5.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.2.5", sha256="86e2faba3383adc8fd04a5bd7fd4f960b3e4aedaa7ed950f2f891ce16902eb6b")
+
+ # https://github.com/googleapis/python-audit-log/blob/v0.2.5/setup.py
+
+ depends_on("py-protobuf@3.19.5:4", type=("build", "run"))
+ conflicts("py-protobuf@3.20.0,3.20.1,4.21.1:4.21.5")
+
+ depends_on("py-googleapis-common-protos@1.56.2:1", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-google-cloud-batch/package.py b/var/spack/repos/builtin/packages/py-google-cloud-batch/package.py
new file mode 100644
index 0000000000..1eba2b9d01
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-google-cloud-batch/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGoogleCloudBatch(PythonPackage):
+ """Google Cloud Batch API client library."""
+
+ homepage = (
+ "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-batch"
+ )
+
+ pypi = "google-cloud-batch/google-cloud-batch-0.17.11.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.17.11", sha256="76e40e0605d3823965f1610210100d9c9b180cd721d11bd57782435d47769a09")
+
+ # https://github.com/googleapis/google-cloud-python/blob/google-cloud-batch-v0.17.11/packages/google-cloud-batch/setup.py
+
+ depends_on("py-google-api-core+grpc@1.34.0:2", type=("build", "run"))
+ conflicts("py-google-api-core@2.0:2.10")
+
+ depends_on("py-google-auth@2.14.1:2", type=("build", "run"))
+ depends_on("py-proto-plus@1.22.3:1", type=("build", "run"))
+
+ depends_on("py-protobuf@3.19.5:4", type=("build", "run"))
+ conflicts("py-protobuf@3.20.0:3.20.1,4.21.0:4.21.5")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-google-cloud-logging/package.py b/var/spack/repos/builtin/packages/py-google-cloud-logging/package.py
new file mode 100644
index 0000000000..af83b1d019
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-google-cloud-logging/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGoogleCloudLogging(PythonPackage):
+ """Stackdriver Logging API client library."""
+
+ homepage = "https://github.com/googleapis/python-logging"
+ pypi = "google-cloud-logging/google-cloud-logging-3.9.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("3.9.0", sha256="4decb1b0bed4a0e3c0e58a376646e6002d6be7cad039e3466822e8665072ea33")
+
+ depends_on("py-google-api-core+grpc@1.33.2:2", type=("build", "run"))
+ conflicts("py-google-api-core@2.0:2.7")
+
+ depends_on("py-google-cloud-appengine-logging@0.1.0:1", type=("build", "run"))
+ depends_on("py-google-cloud-audit-log@0.1.0:0", type=("build", "run"))
+ depends_on("py-google-cloud-core@2", type=("build", "run"))
+ depends_on("py-grpc-google-iam-v1@0.12.4:0", type=("build", "run"))
+ depends_on("py-proto-plus@1.22.2:1", type=("build", "run"), when="^python@3.11:")
+ depends_on("py-proto-plus@1.22:1", type=("build", "run"))
+
+ depends_on("py-protobuf@3.19.5:4", type=("build", "run"))
+ conflicts("py-protobuf@3.20.0:3.20.1,4.21.0:4.21.5")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-google-cloud-storage/package.py b/var/spack/repos/builtin/packages/py-google-cloud-storage/package.py
index f62f3f561e..bb4de6eb64 100644
--- a/var/spack/repos/builtin/packages/py-google-cloud-storage/package.py
+++ b/var/spack/repos/builtin/packages/py-google-cloud-storage/package.py
@@ -9,22 +9,32 @@ from spack.package import *
class PyGoogleCloudStorage(PythonPackage):
"""Google Cloud Storage API client library."""
- homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"
- pypi = "google-cloud-storage/google-cloud-storage-1.18.0.tar.gz"
+ homepage = "https://github.com/googleapis/python-storage"
+ pypi = "google-cloud-storage/google-cloud-storage-2.14.0.tar.gz"
license("Apache-2.0")
+ version("2.14.0", sha256="2d23fcf59b55e7b45336729c148bb1c464468c69d5efbaee30f7201dd90eb97e")
+ version("2.13.0", sha256="f62dc4c7b6cd4360d072e3deb28035fbdad491ac3d9b0b1815a12daea10f37c7")
+ version("2.12.0", sha256="57c0bcda2f5e11f008a155d8636d8381d5abab46b58e0cae0e46dd5e595e6b46")
+ version("2.11.0", sha256="6fbf62659b83c8f3a0a743af0d661d2046c97c3a5bfb587c4662c4bc68de3e31")
+ version("2.10.0", sha256="934b31ead5f3994e5360f9ff5750982c5b6b11604dc072bc452c25965e076dc7")
+ version("2.9.0", sha256="9b6ae7b509fc294bdacb84d0f3ea8e20e2c54a8b4bbe39c5707635fec214eff3")
+ version("2.8.0", sha256="4388da1ff5bda6d729f26dbcaf1bfa020a2a52a7b91f0a8123edbda51660802c")
version("2.7.0", sha256="1ac2d58d2d693cb1341ebc48659a3527be778d9e2d8989697a2746025928ff17")
version("1.18.0", sha256="9fb3dc68948f4c893c2b16f5a3db3daea2d2f3b8e9d5c2d505fe1523758009b6")
depends_on("py-setuptools", type="build")
with when("@2:"):
+ depends_on("py-google-auth@2.23.3:2", type=("build", "run"), when="@2.12:")
depends_on("py-google-auth@1.25:2", type=("build", "run"))
depends_on("py-google-api-core@1.31.5:1,2.3.1:2", type=("build", "run"))
depends_on("py-google-cloud-core@2.3:2", type=("build", "run"))
+ depends_on("py-google-resumable-media@2.6:", type=("build", "run"), when="@2.11:")
depends_on("py-google-resumable-media@2.3.2:", type=("build", "run"))
depends_on("py-requests@2.18:2", type=("build", "run"))
+ depends_on("py-google-crc32c@1", type=("build", "run"), when="@2.12:")
with when("@:1"):
depends_on("py-google-auth@1.2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-google-crc32c/package.py b/var/spack/repos/builtin/packages/py-google-crc32c/package.py
index a083dd9cbc..2926fce25a 100644
--- a/var/spack/repos/builtin/packages/py-google-crc32c/package.py
+++ b/var/spack/repos/builtin/packages/py-google-crc32c/package.py
@@ -19,6 +19,8 @@ class PyGoogleCrc32c(PythonPackage):
version("1.3.0", sha256="276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("google-crc32c", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-google-resumable-media/package.py b/var/spack/repos/builtin/packages/py-google-resumable-media/package.py
index 1ccd243485..ef79bfb548 100644
--- a/var/spack/repos/builtin/packages/py-google-resumable-media/package.py
+++ b/var/spack/repos/builtin/packages/py-google-resumable-media/package.py
@@ -14,9 +14,10 @@ class PyGoogleResumableMedia(PythonPackage):
license("Apache-2.0")
+ version("2.7.0", sha256="5f18f5fa9836f4b083162064a1c2c98c17239bfda9ca50ad970ccf905f3e625b")
version("2.4.1", sha256="15b8a2e75df42dc6502d1306db0bce2647ba6013f9cd03b6e17368c0886ee90a")
version("0.3.2", sha256="3e38923493ca0d7de0ad91c31acfefc393c78586db89364e91cb4f11990e51ba")
depends_on("py-setuptools", type="build")
- depends_on("py-google-crc32c@1:", when="@2:", type=("build", "run"))
+ depends_on("py-google-crc32c@1", when="@2:", type=("build", "run"))
depends_on("py-six", when="@0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py b/var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py
index 2bc2e4f57d..2adba921f7 100644
--- a/var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py
+++ b/var/spack/repos/builtin/packages/py-googleapis-common-protos/package.py
@@ -9,18 +9,40 @@ from spack.package import *
class PyGoogleapisCommonProtos(PythonPackage):
"""Common protobufs used in Google APIs."""
- homepage = "https://github.com/googleapis/googleapis"
+ homepage = "https://github.com/googleapis/python-api-common-protos"
pypi = "googleapis-common-protos/googleapis-common-protos-1.6.0.tar.gz"
license("Apache-2.0")
+ version("1.63.0", sha256="17ad01b11d5f1d0171c06d3ba5c04c54474e883b66b949722b4938ee2694ef4e")
version("1.58.0", sha256="c727251ec025947d545184ba17e3578840fc3a24a0516a020479edab660457df")
+ version("1.56.4", sha256="c25873c47279387cfdcbdafa36149887901d36202cb645a0e4f29686bf6e4417")
version("1.55.0", sha256="53eb313064738f45d5ac634155ae208e121c963659627b90dfcb61ef514c03e1")
version("1.6.0", sha256="e61b8ed5e36b976b487c6e7b15f31bb10c7a0ca7bd5c0e837f4afab64b53a0c6")
- depends_on("py-setuptools", type="build")
- depends_on(
- "py-protobuf@3.19.5:3.19,3.20.2:4.21.0,4.21.6:4", when="@1.58:", type=("build", "run")
+ # https://github.com/googleapis/python-api-common-protos/blob/v1.58.0/setup.py
+
+ variant(
+ "grpc",
+ default=False,
+ description="Enable support for gRPC Remote Procedure Call framework.",
)
- depends_on("py-protobuf@3.12.0:3", when="@1.55", type=("build", "run"))
- depends_on("py-protobuf@3.6.0:3", when="@:1.6", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ # https://github.com/googleapis/python-api-common-protos/blob/main/setup.py
+ # May be able to rais max version to :5 in next release
+ depends_on("py-protobuf@3.19.5:4", when="@1.58:")
+ depends_on("py-protobuf@3.15.0:4", when="@1.56:1.57")
+ depends_on("py-protobuf@3.12.0:4", when="@1.55")
+ depends_on("py-protobuf@3.6.0:", when="@1.6.0:")
+
+ # Explicitly incompatibile versions per setup.py
+ # https://github.com/googleapis/python-api-common-protos/issues/128
+ conflicts("py-protobuf@3.20:3.20.1")
+ conflicts("py-protobuf@4.21.1:4.21.5")
+
+ with when("+grpc"), default_args(type="run"):
+ depends_on("py-grpcio@1.44:1", when="@1.57:")
+ depends_on("py-grpcio@1:")
diff --git a/var/spack/repos/builtin/packages/py-gosam/package.py b/var/spack/repos/builtin/packages/py-gosam/package.py
index 22e8f70f15..c5f5433383 100644
--- a/var/spack/repos/builtin/packages/py-gosam/package.py
+++ b/var/spack/repos/builtin/packages/py-gosam/package.py
@@ -21,11 +21,20 @@ class PyGosam(Package):
license("GPL-3.0-only")
version(
+ "2.1.2",
+ url="https://github.com/gudrunhe/gosam/releases/download/2.1.2/gosam-2.1.2+c307997.tar.gz",
+ sha256="53601ab203c3d572764439018f976baff9c83b87abe1fcbbe15c07caf174680c",
+ )
+ version(
"2.1.1",
url="https://github.com/gudrunhe/gosam/releases/download/2.1.1/gosam-2.1.1-4b98559.tar.gz",
sha256="4a2b9160d51e3532025b9579a4d17d0e0f8a755b8481aeb8271c1f58eb97ab01",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("form", type="run")
depends_on("qgraf", type="run")
depends_on("gosam-contrib", type="link")
diff --git a/var/spack/repos/builtin/packages/py-gpaw/package.py b/var/spack/repos/builtin/packages/py-gpaw/package.py
index 8a94a37b1d..c8e3c0a8e2 100644
--- a/var/spack/repos/builtin/packages/py-gpaw/package.py
+++ b/var/spack/repos/builtin/packages/py-gpaw/package.py
@@ -22,6 +22,8 @@ class PyGpaw(PythonPackage):
version("19.8.1", sha256="79dee367d695d68409c4d69edcbad5c8679137d6715da403f6c2500cb2178c2a")
version("1.3.0", sha256="cf601c69ac496421e36111682bcc1d23da2dba2aabc96be51accf73dea30655c")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("scalapack", default=True, description="Build with ScaLAPACK support")
variant("fftw", default=True, description="Build with FFTW support")
@@ -59,7 +61,7 @@ class PyGpaw(PythonPackage):
python_include = spec["python"].headers.directories[0]
numpy_include = join_path(
- spec["py-numpy"].prefix, spec["python"].package.platlib, "numpy", "core", "include"
+ spec["py-numpy"].package.module.python_platlib, "numpy", "core", "include"
)
libs = blas.libs + lapack.libs + libxc.libs
diff --git a/var/spack/repos/builtin/packages/py-gpy/package.py b/var/spack/repos/builtin/packages/py-gpy/package.py
index 18cf0f24ef..b2e8abf38d 100644
--- a/var/spack/repos/builtin/packages/py-gpy/package.py
+++ b/var/spack/repos/builtin/packages/py-gpy/package.py
@@ -19,6 +19,10 @@ class PyGpy(PythonPackage):
version("1.9.9", sha256="04faf0c24eacc4dea60727c50a48a07ddf9b5751a3b73c382105e2a31657c7ed")
version("0.8.8", sha256="e135d928cf170e2ec7fb058a035b5a7e334dc6b84d0bfb981556782528341988")
+ depends_on("c", type="build") # generated
+
+ variant("plotting", default=False, description="Enable plotting")
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.7:", type=("build", "run"))
depends_on("py-scipy@0.16:", type=("build", "run"))
@@ -28,6 +32,10 @@ class PyGpy(PythonPackage):
# cython is install_requires, but not used at runtime, so stick to build type
depends_on("py-cython@0.29:", type="build")
+ with when("+plotting"):
+ depends_on("py-matplotlib@3.0:", type=("build", "run"))
+ depends_on("py-plotly@1.8.6:", type=("build", "run"))
+
@run_before("install")
def touch_sources(self):
# This packages uses deprecated build_ext, for which we cannot
diff --git a/var/spack/repos/builtin/packages/py-gpytorch/package.py b/var/spack/repos/builtin/packages/py-gpytorch/package.py
index c4a98153f6..a8bdb28538 100644
--- a/var/spack/repos/builtin/packages/py-gpytorch/package.py
+++ b/var/spack/repos/builtin/packages/py-gpytorch/package.py
@@ -19,6 +19,7 @@ class PyGpytorch(PythonPackage):
license("MIT")
+ version("1.13", sha256="f4a488633a2a7a4ab37d12553d1d1dd39690043dbceef14ca428b7d5f89f73ba")
version("1.10", sha256="6dc978ab9fbf220a845a4f1ea13104180fc50e6934081f421b37f6120afb7f18")
version("1.9.1", sha256="0bdbba6f6d5957a0f43ef6dc7fec39c47e8a55f632ca33760c6189f259b3ccc3")
version("1.9.0", sha256="a0608184c18a1f518d6a102473427abf00f5351421e12a934530953f6887b34b")
@@ -30,21 +31,28 @@ class PyGpytorch(PythonPackage):
version("1.2.0", sha256="fcb216e0c1f128a41c91065766508e91e487d6ffadf212a51677d8014aefca84")
version("1.1.1", sha256="76bd455db2f17af5425f73acfaa6d61b8adb1f07ad4881c0fa22673f84fb571a")
- depends_on("python@3.8:", when="@1.9:", type=("build", "run"))
- depends_on("python@3.7:", when="@1.7:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-scm", when="@1.9:", type="build")
- depends_on("py-torch@1.11:", when="@1.9:", type=("build", "run"))
- depends_on("py-torch@1.10:", when="@1.7:", type=("build", "run"))
- depends_on("py-torch@1.9:", when="@1.6:", type=("build", "run"))
- depends_on("py-torch@1.8.1:", when="@1.5:", type=("build", "run"))
- depends_on("py-torch@1.7:", when="@1.3:", type=("build", "run"))
- depends_on("py-torch@1.6:", when="@1.2:", type=("build", "run"))
- depends_on("py-torch@1.5:", type=("build", "run"))
- depends_on("py-scikit-learn", when="@1.2:", type=("build", "run"))
- depends_on("py-linear-operator@0.1.1:", when="@1.9:", type=("build", "run"))
- depends_on("py-linear-operator@0.2.0:", when="@1.9.1:", type=("build", "run"))
- depends_on("py-linear-operator@0.4.0:", when="@1.10:", type=("build", "run"))
- depends_on("py-numpy", when="@1.7:1.8", type=("build", "run"))
- depends_on("py-scipy", when="@1.2:1.8", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm", when="@1.9:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch@2:", when="@1.13:")
+ depends_on("py-torch@1.11:", when="@1.9:")
+ depends_on("py-torch@1.10:", when="@1.7:")
+ depends_on("py-torch@1.9:", when="@1.6:")
+ depends_on("py-torch@1.8.1:", when="@1.5:")
+ depends_on("py-torch@1.7:", when="@1.3:")
+ depends_on("py-torch@1.6:", when="@1.2:")
+ depends_on("py-torch@1.5:")
+ depends_on("py-jaxtyping@0.2.19", when="@1.13:")
+ depends_on("py-mpmath@0.19:1.3", when="@1.12:")
+ depends_on("py-scikit-learn", when="@1.2:")
+ depends_on("py-scipy@1.6:", when="@1.13:")
+ depends_on("py-scipy", when="@1.2:1.8")
+ depends_on("py-linear-operator@0.5.3:", when="@1.13:")
+ depends_on("py-linear-operator@0.1.1:", when="@1.9:")
+ depends_on("py-linear-operator@0.2.0:", when="@1.9.1:")
+ depends_on("py-linear-operator@0.4.0:", when="@1.10:")
+
+ # Historical dependencies
+ depends_on("py-numpy", when="@1.7:1.8")
diff --git a/var/spack/repos/builtin/packages/py-gradio/package.py b/var/spack/repos/builtin/packages/py-gradio/package.py
index 3070071ab7..720e47dbeb 100644
--- a/var/spack/repos/builtin/packages/py-gradio/package.py
+++ b/var/spack/repos/builtin/packages/py-gradio/package.py
@@ -14,7 +14,18 @@ class PyGradio(PythonPackage):
license("Apache-2.0")
- version("3.36.1", sha256="1d821cee15da066c24c197248ba9aaed5f5e59505d17754561c2f96f90e73a89")
+ version("5.1.0", sha256="d2153668e6de2df7a01bb33f01a074fc7716ec863c40f472d8e439439ef1e153")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-47871
+ version(
+ "4.44.1", sha256="a68a52498ac6b63f8864ef84bf7866a70e7d07ebe913edf921e1d2a3708ad5ae"
+ )
+ version(
+ "3.50.2", sha256="c6c81320566ba3e5688a1a58201d0729565a97b828b2bf6895e54f7bf25c01de"
+ )
+ version(
+ "3.36.1", sha256="1d821cee15da066c24c197248ba9aaed5f5e59505d17754561c2f96f90e73a89"
+ )
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-hatchling", type="build")
diff --git a/var/spack/repos/builtin/packages/py-graphcast/package.py b/var/spack/repos/builtin/packages/py-graphcast/package.py
new file mode 100644
index 0000000000..11f9d3746f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-graphcast/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGraphcast(PythonPackage):
+ """GraphCast: Learning skillful medium-range global weather forecasting."""
+
+ homepage = "https://github.com/google-deepmind/graphcast"
+ url = "https://github.com/google-deepmind/graphcast/archive/refs/tags/v0.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.1", sha256="a51a59b9ee42586ec2883257ae42a23b5653f643a47c608096f497524a17af48")
+
+ depends_on("py-setuptools", type="build")
+ with default_args(type=("build", "run")):
+ depends_on("py-cartopy")
+ depends_on("py-chex")
+ depends_on("py-colabtools")
+ depends_on("py-dask")
+ depends_on("py-dm-haiku")
+ depends_on("py-jax")
+ depends_on("py-jraph")
+ depends_on("py-matplotlib")
+ depends_on("py-numpy")
+ depends_on("py-pandas")
+ depends_on("py-rtree")
+ depends_on("py-scipy")
+ depends_on("py-tree")
+ depends_on("py-trimesh")
+ depends_on("py-typing-extensions")
+ depends_on("py-xarray")
diff --git a/var/spack/repos/builtin/packages/py-grapheme/package.py b/var/spack/repos/builtin/packages/py-grapheme/package.py
index 2670c50dc5..02e67b0575 100644
--- a/var/spack/repos/builtin/packages/py-grapheme/package.py
+++ b/var/spack/repos/builtin/packages/py-grapheme/package.py
@@ -20,4 +20,6 @@ class PyGrapheme(PythonPackage):
version("0.6.0", sha256="44c2b9f21bbe77cfb05835fec230bd435954275267fea1858013b102f8603cca")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-grayskull/package.py b/var/spack/repos/builtin/packages/py-grayskull/package.py
index 50ad9904be..cd0534daf7 100644
--- a/var/spack/repos/builtin/packages/py-grayskull/package.py
+++ b/var/spack/repos/builtin/packages/py-grayskull/package.py
@@ -14,6 +14,7 @@ class PyGrayskull(PythonPackage):
license("Apache-2.0")
+ version("2.7.3", sha256="9396245439584b92d656fdefb03d6911b5987f91a5ae714772ddcb338768cbb9")
version("2.5.0", sha256="b021138655be550fd1b93b8db08b9c66169fac9cba6bcdad1411263e12fc703f")
depends_on("python@3.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-greenlet/package.py b/var/spack/repos/builtin/packages/py-greenlet/package.py
index 920fa2f490..7d5474da3b 100644
--- a/var/spack/repos/builtin/packages/py-greenlet/package.py
+++ b/var/spack/repos/builtin/packages/py-greenlet/package.py
@@ -17,6 +17,8 @@ class PyGreenlet(PythonPackage):
license("MIT AND PSF-2.0", checked_by="tgamblin")
+ version("3.1.1", sha256="4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467")
+ version("3.0.3", sha256="43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491")
version("3.0.0a1", sha256="1bd4ea36f0aeb14ca335e0c9594a5aaefa1ac4e2db7d86ba38f0be96166b3102")
version(
"2.0.2",
@@ -29,5 +31,13 @@ class PyGreenlet(PythonPackage):
version("0.4.17", sha256="41d8835c69a78de718e466dd0e6bfd4b46125f21a67c3ff6d76d8d8059868d6b")
version("0.4.13", sha256="0fef83d43bf87a5196c91e73cb9772f945a4caaff91242766c5916d1dd1381e4")
- depends_on("python", type=("build", "link", "run"))
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("python")
+ depends_on("python@:3.11", when="@:2")
+ depends_on("python@:3.12", when="@:3.0")
+
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@40.8.0:", type="build", when="@3.0.2:")
diff --git a/var/spack/repos/builtin/packages/py-griddataformats/package.py b/var/spack/repos/builtin/packages/py-griddataformats/package.py
index d91e53a05e..d6a807cbf6 100644
--- a/var/spack/repos/builtin/packages/py-griddataformats/package.py
+++ b/var/spack/repos/builtin/packages/py-griddataformats/package.py
@@ -19,10 +19,13 @@ class PyGriddataformats(PythonPackage):
license("LGPL-3.0-only")
+ version("1.0.2", sha256="b93cf7f36fce33dbc428026f26dba560d5c7ba2387caca495bad920f90094502")
version("1.0.1", sha256="ad2c9ab7d672a6d8c426de7d083eee4f3e2b0bd59391675d30683c768ab83cc4")
depends_on("py-setuptools", type="build")
- depends_on("python@3.8:", type=("build", "run"))
- depends_on("py-numpy@1.19:", type=("build", "run"))
+ depends_on("python@3.8:3.11", when="@1.0.1", type=("build", "run"))
+ depends_on("python@3.9:3.12", when="@1.0.2:", type=("build", "run"))
+ depends_on("py-numpy@1.19:", when="@1.0.1", type=("build", "run"))
+ depends_on("py-numpy@1.21:", when="@1.0.2:", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-mrcfile", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-grpc-google-iam-v1/package.py b/var/spack/repos/builtin/packages/py-grpc-google-iam-v1/package.py
new file mode 100644
index 0000000000..c5b2cd34af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-grpc-google-iam-v1/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGrpcGoogleIamV1(PythonPackage):
+ """IAM API client library."""
+
+ homepage = "https://github.com/googleapis/python-grpc-google-iam-v1"
+ pypi = "grpc_google_iam_v1/grpc-google-iam-v1-0.13.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.13.0", sha256="fad318608b9e093258fbf12529180f400d1c44453698a33509cc6ecf005b294e")
+
+ # A workaround for invalid URL due to presence of v1 in the name.
+ def url_for_version(self, version):
+ return super().url_for_version(f"1-{version}")
+
+ # https://github.com/googleapis/python-grpc-google-iam-v1/blob/v0.13.0/setup.py
+
+ depends_on("py-grpcio@1.44:1", type=("build", "run"))
+ depends_on("py-googleapis-common-protos+grpc@1.56:1", type=("build", "run"))
+
+ depends_on("py-protobuf@3.19.5:4", type=("build", "run"))
+ conflicts("py-protobuf@3.20.0,3.20.1,4.21.1:4.21.5")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-grpcio-status/package.py b/var/spack/repos/builtin/packages/py-grpcio-status/package.py
new file mode 100644
index 0000000000..7302b259cc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-grpcio-status/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyGrpcioStatus(PythonPackage):
+ """Status proto mapping for gRPC."""
+
+ homepage = "https://grpc.io/"
+ pypi = "grpcio_status/grpcio-status-1.60.1.tar.gz"
+
+ license("Apache-2.0")
+
+ # Versions 1.63.0 and 1.64.0 are released but not yet on pypi
+
+ version("1.62.2", sha256="62e1bfcb02025a1cd73732a2d33672d3e9d0df4d21c12c51e0bbcaf09bab742a")
+ version("1.60.1", sha256="61b5aab8989498e8aa142c20b88829ea5d90d18c18c853b9f9e6d407d37bf8b4")
+ version("1.56.2", sha256="a046b2c0118df4a5687f4585cca9d3c3bae5c498c4dff055dcb43fb06a1180c8")
+
+ # https://github.com/grpc/grpc/blob/v1.60.1/src/python/grpcio_status/setup.py
+
+ with default_args(type=("build", "run")):
+ depends_on("py-protobuf@4.21.6:")
+ for grpcio in ("1.62.2", "1.60.1", "1.56.2"):
+ depends_on(f"py-grpcio@{grpcio}", when=f"@{grpcio}")
+ depends_on("py-googleapis-common-protos@1.5.5:")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-grpcio-tools/package.py b/var/spack/repos/builtin/packages/py-grpcio-tools/package.py
index b46a70255e..55069ba1c5 100644
--- a/var/spack/repos/builtin/packages/py-grpcio-tools/package.py
+++ b/var/spack/repos/builtin/packages/py-grpcio-tools/package.py
@@ -12,14 +12,23 @@ class PyGrpcioTools(PythonPackage):
homepage = "https://grpc.io/"
pypi = "grpcio-tools/grpcio-tools-1.42.0.tar.gz"
+ version("1.62.2", sha256="5fd5e1582b678e6b941ee5f5809340be5e0724691df5299aae8226640f94e18f")
+ version("1.56.2", sha256="82af2f4040084141a732f0ef1ecf3f14fdf629923d74d850415e4d09a077e77a")
+ version("1.48.2", sha256="8902a035708555cddbd61b5467cea127484362decc52de03f061a1a520fe90cd")
version("1.48.1", sha256="1178f2ea531f80cc2027ec64728df6ffc8e98cf1df61652a496eafd612127183")
version("1.42.0", sha256="d0a0daa82eb2c2fb8e12b82a458d1b7c5516fe1135551da92b1a02e2cba93422")
version("1.39.0", sha256="39dfe7415bc0d3860fdb8dd90607594b046b88b57dbe64284efa4820f951c805")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-protobuf@3.12.0:3", when="@1.48.1:", type=("build", "run"))
depends_on("py-protobuf@3.5.0.post1:3", type=("build", "run"))
+ depends_on("py-grpcio@1.62.2:", when="@1.62.2:", type=("build", "run"))
+ depends_on("py-grpcio@1.56.2:", when="@1.56.2:", type=("build", "run"))
+ depends_on("py-grpcio@1.48.2:", when="@1.48.2:", type=("build", "run"))
depends_on("py-grpcio@1.48.1:", when="@1.48.1:", type=("build", "run"))
depends_on("py-grpcio@1.42.0:", when="@1.42.0:", type=("build", "run"))
depends_on("py-grpcio@1.39.0:", when="@1.39.0:1.41", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-grpcio/30522.diff b/var/spack/repos/builtin/packages/py-grpcio/30522.diff
new file mode 100644
index 0000000000..f0c9813fad
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-grpcio/30522.diff
@@ -0,0 +1,21 @@
+diff --git a/setup.py b/setup.py
+index 8c428cb7f32b4..2646af5fd5ebb 100644
+--- a/setup.py
++++ b/setup.py
+@@ -214,11 +214,11 @@ def check_linker_need_libatomic():
+ return False
+ # Double-check to see if -latomic actually can solve the problem.
+ # https://github.com/grpc/grpc/issues/22491
+- cpp_test = subprocess.Popen(
+- [cxx, '-x', 'c++', '-std=c++14', '-', '-latomic'],
+- stdin=PIPE,
+- stdout=PIPE,
+- stderr=PIPE)
++ cpp_test = subprocess.Popen(cxx +
++ ['-x', 'c++', '-std=c++14', '-', '-latomic'],
++ stdin=PIPE,
++ stdout=PIPE,
++ stderr=PIPE)
+ cpp_test.communicate(input=code_test)
+ return cpp_test.returncode == 0
+
diff --git a/var/spack/repos/builtin/packages/py-grpcio/package.py b/var/spack/repos/builtin/packages/py-grpcio/package.py
index 7a7f8f6e91..2163a87a0d 100644
--- a/var/spack/repos/builtin/packages/py-grpcio/package.py
+++ b/var/spack/repos/builtin/packages/py-grpcio/package.py
@@ -14,8 +14,22 @@ class PyGrpcio(PythonPackage):
license("Apache-2.0")
- version("1.52.0", sha256="a5d4a83d29fc39af429c10b9b326c174fec49b73398e4a966a1f2a4f30aa4fdb")
- version("1.48.1", sha256="660217eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e")
+ version("1.64.0", sha256="257baf07f53a571c215eebe9679c3058a313fd1d1f7c4eede5a8660108c52d9c")
+ version("1.63.0", sha256="f3023e14805c61bc439fb40ca545ac3d5740ce66120a678a3c6c2c55b70343d1")
+ version("1.62.2", sha256="c77618071d96b7a8be2c10701a98537823b9c65ba256c0b9067e0594cdbd954d")
+ version("1.60.1", sha256="dd1d3a8d1d2e50ad9b59e10aa7f07c7d1be2b367f3f2d33c5fade96ed5460962")
+ version("1.56.2", sha256="0ff789ae7d8ddd76d2ac02e7d13bfef6fc4928ac01e1dcaa182be51b6bcc0aaa")
+ version(
+ "1.52.0",
+ sha256="a5d4a83d29fc39af429c10b9b326c174fec49b73398e4a966a1f2a4f30aa4fdb",
+ deprecated=True, # https://github.com/grpc/grpc/issues/32306
+ )
+ version("1.48.2", sha256="90e5da224c6b9b23658adf6f36de6f435ef7dbcc9c5c12330314d70d6f8de1f7")
+ version(
+ "1.48.1",
+ sha256="660217eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e",
+ deprecated=True, # https://github.com/grpc/grpc/issues/30372
+ )
version("1.43.0", sha256="735d9a437c262ab039d02defddcb9f8f545d7009ae61c0114e19dda3843febe5")
version("1.42.0", sha256="4a8f2c7490fe3696e0cdd566e2f099fb91b51bc75446125175c55581c2f7bc11")
version("1.39.0", sha256="57974361a459d6fe04c9ae0af1845974606612249f467bbd2062d963cb90f407")
@@ -35,16 +49,41 @@ class PyGrpcio(PythonPackage):
version("1.28.1", sha256="cbc322c5d5615e67c2a15be631f64e6c2bab8c12505bc7c150948abdaa0bdbac")
version("1.27.2", sha256="5ae532b93cf9ce5a2a549b74a2c35e3b690b171ece9358519b3039c7b84c887e")
version("1.25.0", sha256="c948c034d8997526011960db54f512756fb0b4be1b81140a15b4ef094c6594a4")
- version("1.16.0", sha256="d99db0b39b490d2469a8ef74197d5f211fa740fc9581dccecbb76c56d080fce1")
+ version(
+ "1.16.0",
+ sha256="0cc5f2d3ee21c642d8982f197c83053fd3a8cbcd6a60240d8c87c6c256b10d57",
+ deprecated=True,
+ # Released 6ish years ago and does not install for python 3.8 with gcc11
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("py-setuptools", type="build")
- depends_on("py-six@1.5.2:", when="@:1.48", type=("build", "run"))
- depends_on("py-cython@0.23:2", type="build")
+ with default_args(type=("build", "run")):
+ depends_on("py-coverage@4:")
+ depends_on("py-wheel@0.29:")
+
+ depends_on("py-cython@3:", when="@1.63.0:")
+ depends_on("py-cython@0.29.8:2", when="@1.56.0:1.62")
+ depends_on("py-cython@0.29.8:", when="@1.49.0:1.55")
+ # States dependency in setup.py >=0.23
+ # Package states >=0.23 but doesn't compile w/ >=3
+ depends_on("py-cython@0.23:2", when="@:1.48")
+
+ depends_on("py-protobuf@5.26.1:5", when="@1.63.0:")
+ depends_on("py-protobuf@4.21.3:4", when="@1.49.0:1.62")
+ depends_on("py-protobuf@3.5.0:3", when="@:1.48")
+
+ depends_on("py-six@1.10:", when="@:1.48")
+
depends_on("openssl")
depends_on("zlib-api")
depends_on("c-ares")
depends_on("re2+shared")
+ patch("30522.diff", when="@1.48") # https://github.com/grpc/grpc/issues/30372
+
def setup_build_environment(self, env):
env.set("GRPC_PYTHON_BUILD_WITH_CYTHON", True)
env.set("GRPC_PYTHON_BUILD_SYSTEM_OPENSSL", True)
diff --git a/var/spack/repos/builtin/packages/py-gsd/package.py b/var/spack/repos/builtin/packages/py-gsd/package.py
index 2ab33471af..85eaa50c5b 100644
--- a/var/spack/repos/builtin/packages/py-gsd/package.py
+++ b/var/spack/repos/builtin/packages/py-gsd/package.py
@@ -15,18 +15,26 @@ class PyGsd(PythonPackage):
trajectory output with a script. Read a GSD trajectory with a visualization
tool to explore the behavior of the simulation."""
- homepage = "https://gsd.readthedocs.io/en/stable/#"
+ homepage = "https://gsd.readthedocs.io/en/stable/"
pypi = "gsd/gsd-1.9.3.tar.gz"
maintainers("RMeli")
license("BSD-2-Clause")
+ version("3.2.1", sha256="cf05148e23f169a00c073eb7d8151e8b521e0f962ce460b55d812cae5be326aa")
+ version("3.2.0", sha256="cf3c8419ec66085b2b9853577058861d9e738bfe397b0170ead821b866ab49b9")
+ version("3.1.1", sha256="6802b79d7f078536faf5a96ac300518613dd285cf3bc21ed81e1f2d0f7155bf5")
+ version("3.1.0", sha256="35a70419c6a519825afd9d5e47a570d98cec7273c39f43e2ab0aa3e7166ad198")
+ version("3.0.1", sha256="7b3ce7428d9f9f708618b3a2ef19ab122cc36b658ea53b70d0de40189d19647c")
version("2.8.0", sha256="f2b031a26a7a5bee5f3940dc2f36c5a5b6670307b297c526adf2e26c1f5b46ae")
version("1.9.3", sha256="c6b37344e69020f69fda2b8d97f894cb41fd720840abeda682edd680d1cff838")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@42:", type="build", when="@2.8.0:")
+ depends_on("py-setuptools@64:", type="build", when="@3.0.1:")
depends_on("py-cython", type="build")
depends_on("py-numpy@1.9.3:", type=("build", "run"))
depends_on("py-numpy@1.9.3:1", when="@:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-gssapi/package.py b/var/spack/repos/builtin/packages/py-gssapi/package.py
index 0811964753..a236f3f345 100644
--- a/var/spack/repos/builtin/packages/py-gssapi/package.py
+++ b/var/spack/repos/builtin/packages/py-gssapi/package.py
@@ -15,9 +15,13 @@ class PyGssapi(PythonPackage):
maintainers("wdconinc")
+ version("1.9.0", sha256="f468fac8f3f5fca8f4d1ca19e3cd4d2e10bd91074e7285464b22715d13548afe")
+ version("1.8.3", sha256="aa3c8d0b1526f52559552bb2c9d2d6be013d76a8e5db00b39a1db5727e93b0b0")
version("1.8.2", sha256="b78e0a021cc91158660e4c5cc9263e07c719346c35a9c0f66725e914b235c89a")
- depends_on("py-cython@0.29.29:2", type="build")
+ depends_on("py-cython@0.29.29:2", type="build", when="@:1.8.2")
+ depends_on("py-cython@0.29.29:3", type="build", when="@1.8.3:")
+ depends_on("py-cython@3.0.3:3", type="build", when="@1.9.0:")
depends_on("py-setuptools@40.6.0:", type="build")
depends_on("py-decorator", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-gtdbtk/package.py b/var/spack/repos/builtin/packages/py-gtdbtk/package.py
index a78e86eed0..08eda2bc7d 100644
--- a/var/spack/repos/builtin/packages/py-gtdbtk/package.py
+++ b/var/spack/repos/builtin/packages/py-gtdbtk/package.py
@@ -28,7 +28,7 @@ class PyGtdbtk(PythonPackage):
depends_on("py-pydantic@1.9.2:1", type=("build", "run"), when="@2.3.0:")
depends_on("prodigal@2.6.2:", type=("build", "run"))
depends_on("hmmer@3.1b2:", type=("build", "run"))
- depends_on("pplacer@1.1:", type=("build", "run"))
+ depends_on("pplacer@1.1alpha:", type=("build", "run"))
depends_on("fastani@1.32:", type=("build", "run"))
depends_on("fasttree@2.1.9:", type=("build", "run"))
depends_on("mash@2.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-h5netcdf/package.py b/var/spack/repos/builtin/packages/py-h5netcdf/package.py
index 3c2a2193cd..0e306a5102 100644
--- a/var/spack/repos/builtin/packages/py-h5netcdf/package.py
+++ b/var/spack/repos/builtin/packages/py-h5netcdf/package.py
@@ -16,8 +16,12 @@ class PyH5netcdf(PythonPackage):
license("BSD-3-Clause")
+ version("1.3.0", sha256="a171c027daeb34b24c24a3b6304195b8eabbb6f10c748256ed3cfe19806383cf")
version("0.10.0", sha256="fc1cfec33bb9f730c412f87fcbc259167fd7620635679ccfc6e31971730dbd60")
- depends_on("python@3.6:", type=("build", "run"))
+ depends_on("python@3.9:", when="@1.3:", type=("build", "run"))
+ depends_on("py-setuptools@42:", when="@1.3:", type="build")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm@7:+toml", when="@1.3:", type="build")
depends_on("py-h5py", type=("build", "run"))
+ depends_on("py-packaging", when="@1.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index 9aad3c0396..16d5506f8d 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -18,6 +18,11 @@ class PyH5py(PythonPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("3.12.1", sha256="326d70b53d31baa61f00b8aa5f95c2fcb9621a3ee8365d770c551a13dbbcbfdf")
+ version("3.12.0", sha256="00955a079e9f86c5ae2cd08accb54396c69cda87152312ddd1528e3f90acc866")
+ version("3.11.0", sha256="7b7e8f78072a2edec87c9836f25f34203fd492a4475709a18b417a33cfb21fa9")
+ version("3.10.0", sha256="d93adc48ceeb33347eb24a634fb787efc7ae4644e6ea4ba733d099605045c049")
+ version("3.9.0", sha256="e604db6521c1e367c6bd7fad239c847f53cc46646f2d2651372d05ae5e95f817")
version("3.8.0", sha256="6fead82f0c4000cf38d53f9c030780d81bfa0220218aee13b90b7701c937d95f")
version("3.7.0", sha256="3fcf37884383c5da64846ab510190720027dca0768def34dd8dcb659dbe5cbf3")
version("3.6.0", sha256="8752d2814a92aba4e2b2a5922d2782d0029102d99caaf3c201a566bc0b40db29")
@@ -37,43 +42,54 @@ class PyH5py(PythonPackage):
version("2.5.0", sha256="9833df8a679e108b561670b245bcf9f3a827b10ccb3a5fa1341523852cfac2f6")
version("2.4.0", sha256="faaeadf4b8ca14c054b7568842e0d12690de7d5d68af4ecce5d7b8fc104d8e60")
+ depends_on("c", type="build")
+
variant("mpi", default=True, description="Build with MPI support")
# Python versions
- depends_on("python@3.7:", type=("build", "run"), when="@3.2:")
- depends_on("python@3.6:", type=("build", "run"), when="@3:3.1")
+ depends_on("python@3.9:", type=("build", "run"), when="@3.12:")
depends_on("python@:3.9", type=("build", "run"), when="@:2.8")
# Build dependencies
+ # h5py@3.11 can build with cython@3.x
+ depends_on("py-cython@0.29.31:3", type="build", when="@3.11:")
+ depends_on("py-cython@0.29.31:0", type="build", when="@3.9:3.10")
depends_on("py-cython@0.29.15:0", type=("build"), when="@3:3.7 ^python@3.9.0:")
depends_on("py-cython@0.29.14:0", type=("build"), when="@3:3.7 ^python@3.8.0:3.8")
- depends_on("py-cython@0.29:0", type=("build"), when="@3:")
+ depends_on("py-cython@0.29:0", type=("build"), when="@3.0:3.10")
depends_on("py-cython@0.23:0", type="build", when="@:2")
depends_on("py-pkgconfig", type="build")
depends_on("py-setuptools@61:", type="build", when="@3.8.0:")
depends_on("py-setuptools", type="build")
- depends_on("py-wheel", type="build", when="@3:")
# Build and runtime dependencies
- depends_on("py-cached-property@1.5:", type=("build", "run"), when="@:3.6 ^python@:3.7")
- depends_on("py-numpy@1.19.3:", type=("build", "run"), when="@3:3.5 ^python@3.9.0:")
+ depends_on("py-numpy@1.19.3:", type=("build", "run"), when="@3:3.5,3.12: ^python@3.9.0:")
depends_on("py-numpy@1.17.5:", type=("build", "run"), when="@3:3.5 ^python@3.8.0:3.8")
+ depends_on("py-numpy@1.17.3:", type=("build", "run"), when="@3.9:3.11")
depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@3:")
depends_on("py-numpy@1.7:", type=("build", "run"), when="@:2")
- depends_on("py-six", type=("build", "run"), when="@:2")
+ # https://github.com/h5py/h5py/issues/2353
+ depends_on("py-numpy@:1", when="@:3.10", type=("build", "run"))
# Link dependencies (py-h5py v2 cannot build against HDF5 1.12 regardless
# of API setting)
- depends_on("hdf5@1.8.4:1.14 +hl", when="@3.8:")
+ depends_on("hdf5@1.10.6:1.14 +hl", when="@3.12:")
+ depends_on("hdf5@1.10.4:1.14 +hl", when="@3.10:3.11")
+ depends_on("hdf5@1.8.4:1.14 +hl", when="@3.8:3.9")
depends_on("hdf5@1.8.4:1.12 +hl", when="@3:3.7")
depends_on("hdf5@1.8.4:1.11 +hl", when="@:2")
# MPI dependencies
depends_on("hdf5+mpi", when="+mpi")
depends_on("mpi", when="+mpi")
+ depends_on("py-mpi4py@3.1.1:", when="@3.8: +mpi", type=("build", "run"))
depends_on("py-mpi4py@3.0.2:", when="@3: +mpi", type=("build", "run"))
depends_on("py-mpi4py", when="@:2 +mpi", type=("build", "run"))
+ # Historical dependencies
+ depends_on("py-cached-property@1.5:", type=("build", "run"), when="@:3.6 ^python@:3.7")
+ depends_on("py-six", type=("build", "run"), when="@:2")
+
def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi@2023.0.0:"):
diff --git a/var/spack/repos/builtin/packages/py-hail/package.py b/var/spack/repos/builtin/packages/py-hail/package.py
new file mode 100644
index 0000000000..53a0d4f4f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-hail/package.py
@@ -0,0 +1,236 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHail(MakefilePackage):
+ """Cloud-native genomic dataframes and batch computing (Python API)"""
+
+ homepage = "https://hail.is"
+ git = "https://github.com/hail-is/hail.git"
+ # We can't use tarballs because HAIL needs to look up git commit metadata
+ # to determine its version. We could patch this, but that is not yet
+ # implemented.
+ # url = "https://github.com/hail-is/hail/archive/refs/tags/0.2.130.tar.gz"
+
+ maintainers("teaguesterling")
+ license("MIT", checked_by="teaguesterling")
+
+ version("0.2.132", commit="678e1f52b9999cb05ebf03fd360e5c4506bd6dad")
+ version("0.2.131", commit="11d9b2ff89da9ef6a4f576be89f1f06959580ea4")
+ version("0.2.130", commit="bea04d9c79b5ca739364e8c121132845475f617a")
+ version("0.2.129", commit="41126be2df04e4ef823cefea40fba4cadbe5db8a")
+
+ resource(
+ name="catch",
+ url="https://github.com/catchorg/Catch2/releases/download/v2.6.0/catch.hpp",
+ sha256="a86133b34d4721b6e1cf7171981ea469789f83f2475907b4033012577e4975fe",
+ destination="hail/src/main/resources/include/catch.hpp",
+ expand=False,
+ )
+
+ resource(
+ name="libsimdpp-2.1",
+ extension="tar.gz",
+ url="https://storage.googleapis.com/hail-common/libsimdpp-2.1.tar.gz",
+ sha256="b0e986b20bef77cd17004dd02db0c1ad9fab9c70d4e99594a9db1ee6a345be93",
+ destination="hail/src/main/c",
+ )
+
+ resource(
+ name="mill-0.11.7",
+ url="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.11.7/mill-dist-0.11.7.jar",
+ sha256="278b430150af899495d360d1f886e223e78bb4a20e67144a240bfb7e2d4f6085",
+ destination="hail/mill",
+ expand=False,
+ )
+
+ variant("native", default=True, description="Compile C & C++ HAIL optimizations")
+ variant(
+ "query_backend",
+ values=["undefined", "spark", "batch"],
+ default="spark",
+ description="Configure HAIL query backend at build",
+ )
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-pip", type="build")
+ depends_on("py-wheel", type="build")
+ depends_on("py-build@1.1+virtualenv", type="build", when="@0.2.131:")
+ depends_on("c", type="build", when="+native")
+ depends_on("cxx", type="build", when="+native")
+
+ # HAIL bundle is tied to specific runtime versions
+ # HAIL spec, Java sec, Spark spec, Scala spec
+ # We're not accurately capturing previous versions
+ for hail, java, spark, scala in [
+ # 0.2.130 and before (to somwhere around 0.2.64) used Spark 3.3
+ # And either Java 8 or Java 11
+ (":0.2.130", "8,11", "3.3", "2.12"),
+ # 0.2.131 updated to Java 11 and Spark 3.5
+ # Undocumented bump was to scala 2.12.13 for scala.annotation.noerror
+ ("0.2.131:", "11", "3.5", "2.12.18:2.12"),
+ ]:
+ with default_args(type=("build", "run"), when=f"@{hail}"):
+ depends_on(f"java@{java}")
+ depends_on(f"scala@{scala}")
+ depends_on(f"spark@{spark}")
+ # This should match spark but isn't actually enforced
+ # by the PySpark package and they can conflit.
+ depends_on(f"py-pyspark@{spark}")
+
+ with default_args(type=("build", "link"), when="+native"):
+ # Hail build requirements
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("lz4")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-avro@1.10:1.11")
+ depends_on("py-bokeh@3:3.3")
+ depends_on("py-decorator@:4")
+ depends_on("py-deprecated@1.2.10:1.2")
+ depends_on("py-numpy@:1")
+ depends_on("py-pandas@2:2")
+ depends_on("py-parsimonious@:0")
+ depends_on("py-plotly@5.18:5")
+ depends_on("py-protobuf@3.20.2")
+ depends_on("py-requests@2.31:2")
+ depends_on("py-scipy@1.3:1.11")
+
+ # hailtop requirements
+ depends_on("py-aiodns@2")
+ depends_on("py-aiohttp@3.9")
+ depends_on("py-azure-identity@1.6:1")
+ depends_on("py-azure-mgmt-storage@20.1.0")
+ depends_on("py-azure-storage-blob@12.11:12")
+ depends_on("py-boto3@1.17:1")
+ depends_on("py-botocore@1.20:1")
+ depends_on("py-dill@0.3.6:0.3")
+ depends_on("py-frozenlist@1.3.1:1")
+ depends_on("py-google-auth@2.14.1:2")
+ depends_on("py-google-auth-oauthlib@0.5.2:0")
+ depends_on("py-humanize@1.0.0:1")
+ depends_on("py-janus@0.6:1.0")
+ depends_on("py-nest-asyncio@1.5.8:1")
+ depends_on("py-rich@12.6.0:12")
+ depends_on("py-orjson@3.9.15:3")
+ depends_on("py-typer@0.9.0:0")
+ depends_on("py-python-json-logger@2.0.2:2")
+ depends_on("py-pyyaml@6.0:7")
+ depends_on("py-sortedcontainers@2.4.0:2")
+ depends_on("py-tabulate@0.8.9:0")
+ depends_on("py-uvloop@0.19.0:0")
+ depends_on("py-jproperties@2.1.1:2")
+ # Undocumented runtime requirements for hailtop
+ # These are also required to use the HAIL API
+ # but are not explicitly mentioned anywhere
+ depends_on("py-azure-mgmt-core")
+ depends_on("py-typing-extensions")
+
+ build_directory = "hail"
+
+ def patch(self):
+ # Hail will fail to build if it cannot determine a commit hash from git
+ # which will not be available in a spack cache. Since we know it from
+ # the package, we can inject it in the failure and move forward.
+ revision = self.hail_revision
+ version = self.hail_pip_version
+
+ filter_file(
+ r'\$\(error "git rev-parse HEAD" failed to produce output\)',
+ f"REVISION := {revision}",
+ "hail/version.mk",
+ )
+ filter_file(
+ r'\$\(error "git rev-parse --short=12 HEAD" failed to produce output\)',
+ f"SHORT_REVISION := {revision[:12]}",
+ "hail/version.mk",
+ )
+ filter_file(
+ r'\$\(error "git rev-parse --abbrev-ref HEAD" failed to produce output\)',
+ f"BRANCH := tags/{version}",
+ "hail/version.mk",
+ )
+
+ # Also need to make sure that build-info.properties gets the right revision
+ # which ends up improperly calculated in scala and will crash at runtime
+ filter_file(
+ r"val revision = VcsVersion\.vcsState\(\)\.currentRevision",
+ "val vcs_revision = VcsVersion.vcsState().currentRevision\n"
+ f' val revision = if(vcs_revision == "no-vcs") "{revision}" else vcs_revision\n',
+ "hail/build.sc",
+ )
+
+ @property
+ def hail_revision(self):
+ version = self.version
+ version_info = self.versions[version]
+ # REVISION must look like a hash or Hail crashes at startup
+ # Technically, it needs to be at least 12 characters
+ revision = version_info.get("commit", version.joined.string.ljust(40, "0"))
+ return revision
+
+ @property
+ def hail_pip_version(self):
+ # This is the same behavior is as is defined in hail/version.mk
+ return f"{self.spec.version.up_to(3)}"
+
+ @property
+ def build_wheel_file_path(self):
+ wheel_file = f"hail-{self.hail_pip_version}-py3-none-any.whl"
+ wheel_dir = join_path("build", "deploy", "dist")
+ return join_path(wheel_dir, wheel_file)
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags" and self.spec.satisfies("+native"):
+ # HAIL build doesn't find lz4: https://discuss.hail.is/t/ld-pruning-repeated-errors/1838/14
+ flags.append(f"-I{self.spec['lz4'].prefix.include}")
+ return (flags, None, None)
+
+ @property
+ def build_targets(self):
+ spec = self.spec
+
+ # Hail likes variables passed in to Make
+ variables = [
+ f"HAIL_PYTHON3={spec['python'].home.bin.python3}",
+ f"PIP={spec['py-pip'].home.bin.pip}",
+ f"SCALA_VERSION={spec['scala'].version}",
+ f"SPARK_VERSION={spec['spark'].version}",
+ ]
+ if spec.satisfies("+native"):
+ variables += ["HAIL_COMPILE_NATIVES=1"]
+
+ # We're not using the documented target to
+ # because it depends on pip to install and resolve
+ # dependencies directly. This does everything in one step.
+ # and ends up downloading all of the dependencies via pip.
+ # The documented target is `install-on-cluster`
+ targets = [
+ # This may be too specific but it would detect failures
+ # and fail to build instead of taking a long time to build
+ # and then failing at install time.
+ self.build_wheel_file_path
+ ]
+
+ return targets + variables
+
+ def install(self, spec, prefix):
+ spec = self.spec
+ pip = which("pip")
+ wheel = self.build_wheel_file_path
+
+ # This mimics the install-on-cluster target but avoids anything
+ # that utilizes pip to resolve dependencies
+ with working_dir(join_path(self.stage.source_path, "hail")):
+ pip("install", "--use-pep517", "--no-deps", f"--prefix={prefix}", wheel)
+
+ backend = spec.variants["query_backend"].value
+ if backend != "undefined":
+ hailctl = which("hailctl") # Should be installed from above
+ if hailctl is not None: # but it might not be
+ hailctl("config", "set", "query/backend", f"{backend}")
diff --git a/var/spack/repos/builtin/packages/py-hatch-cython/package.py b/var/spack/repos/builtin/packages/py-hatch-cython/package.py
new file mode 100644
index 0000000000..2aa6b3b65d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-hatch-cython/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHatchCython(PythonPackage):
+ """cython hooks for hatch"""
+
+ homepage = "https://github.com/joshua-auchincloss/hatch-cython"
+ pypi = "hatch_cython/hatch_cython-0.5.1.tar.gz"
+
+ license("MIT")
+
+ version("0.5.1", sha256="d01135e092544069c3e61f6dc36748ee369beacb893a5c43b9593a533f839703")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-hatchling", type=("build", "run"))
+ depends_on("py-hatch", type=("build", "run"))
+ depends_on("py-cython", type=("build", "run"))
+ depends_on("py-typing-extensions", when="@:3.9", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatch-jupyter-builder/package.py b/var/spack/repos/builtin/packages/py-hatch-jupyter-builder/package.py
index 0bd62053a1..47d97c4d18 100644
--- a/var/spack/repos/builtin/packages/py-hatch-jupyter-builder/package.py
+++ b/var/spack/repos/builtin/packages/py-hatch-jupyter-builder/package.py
@@ -16,5 +16,7 @@ class PyHatchJupyterBuilder(PythonPackage):
version("0.8.3", sha256="0dbd14a8aef6636764f88a8fd1fcc9a91921e5c50356e6aab251782f264ae960")
+ depends_on("npm", type="run")
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-hatchling@1.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatch-nodejs-version/package.py b/var/spack/repos/builtin/packages/py-hatch-nodejs-version/package.py
index 5648c0c247..09f2be4283 100644
--- a/var/spack/repos/builtin/packages/py-hatch-nodejs-version/package.py
+++ b/var/spack/repos/builtin/packages/py-hatch-nodejs-version/package.py
@@ -14,6 +14,7 @@ class PyHatchNodejsVersion(PythonPackage):
license("MIT")
+ version("0.3.2", sha256="8a7828d817b71e50bbbbb01c9bfc0b329657b7900c56846489b9c958de15b54c")
version("0.3.1", sha256="0e55fd713d92c5c1ccfee778efecaa780fd8bcd276d4ca7aff9f6791f6f76d9c")
depends_on("python@3.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatch-requirements-txt/package.py b/var/spack/repos/builtin/packages/py-hatch-requirements-txt/package.py
index e36bb88f62..46e85b25d3 100644
--- a/var/spack/repos/builtin/packages/py-hatch-requirements-txt/package.py
+++ b/var/spack/repos/builtin/packages/py-hatch-requirements-txt/package.py
@@ -14,6 +14,7 @@ class PyHatchRequirementsTxt(PythonPackage):
license("MIT")
+ version("0.4.1", sha256="2c686e5758fd05bb55fa7d0c198fdd481f8d3aaa3c693260f5c0d74ce3547d20")
version("0.4.0", sha256="800509946e85d9e56d73242fab223ec36db50372e870a04e2dd1fd9bad98455d")
depends_on("python@3.6.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatch-vcs/package.py b/var/spack/repos/builtin/packages/py-hatch-vcs/package.py
index fe34688b98..8347b91072 100644
--- a/var/spack/repos/builtin/packages/py-hatch-vcs/package.py
+++ b/var/spack/repos/builtin/packages/py-hatch-vcs/package.py
@@ -14,9 +14,11 @@ class PyHatchVcs(PythonPackage):
license("MIT")
+ version("0.4.0", sha256="093810748fe01db0d451fabcf2c1ac2688caefd232d4ede967090b1c1b07d9f7")
version("0.3.0", sha256="cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee")
version("0.2.0", sha256="9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff")
+ depends_on("py-hatchling@1.24.2:", when="@0.4:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.4:", type=("build", "run"))
depends_on("py-hatchling@1.1:", when="@0.3:", type=("build", "run"))
- depends_on("py-hatchling@0.21.0:", type=("build", "run"))
depends_on("py-setuptools-scm@6.4.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatch/package.py b/var/spack/repos/builtin/packages/py-hatch/package.py
new file mode 100644
index 0000000000..19b9f99d43
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-hatch/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHatch(PythonPackage):
+ """Modern, extensible Python project management"""
+
+ homepage = "https://hatch.pypa.io/latest/"
+ pypi = "hatch/hatch-1.12.0.tar.gz"
+
+ license("MIT")
+
+ version("1.12.0", sha256="ae80478d10312df2b44d659c93bc2ed4d33aecddce4b76378231bdf81c8bf6ad")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-hatchling@1.24.2:", type="build")
+ depends_on("py-hatch-vcs@0.3.0:", type="build")
+ depends_on("py-pyproject-hooks", type=("build"))
+
+ depends_on("py-click@8.0.6:", type=("build", "run"))
+ depends_on("py-httpx@0.22.0:", type=("build", "run"))
+ depends_on("py-hyperlink@21.0.0:", type=("build", "run"))
+ depends_on("py-keyring@23.5.0:", type=("build", "run"))
+ depends_on("py-packaging@23.2:", type=("build", "run"))
+ depends_on("py-pexpect@4.8:4.8", type=("build", "run"))
+ depends_on("py-platformdirs@2.5.0:", type=("build", "run"))
+ depends_on("py-rich@11.2.0:", type=("build", "run"))
+ depends_on("py-shellingham@1.4.0:", type=("build", "run"))
+ depends_on("py-tomli-w@1.0:", type=("build", "run"))
+ depends_on("py-tomlkit@0.11.1:", type=("build", "run"))
+ depends_on("py-userpath@1.7:1.7", type=("build", "run"))
+ depends_on("py-uv@0.1.35:", type=("build", "run"))
+ depends_on("py-virtualenv@20.26.1:", type=("build", "run"))
+ depends_on("py-zstandard@:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatchet/package.py b/var/spack/repos/builtin/packages/py-hatchet/package.py
index 1a3a69b543..3360a7b439 100644
--- a/var/spack/repos/builtin/packages/py-hatchet/package.py
+++ b/var/spack/repos/builtin/packages/py-hatchet/package.py
@@ -18,19 +18,27 @@ class PyHatchet(PythonPackage):
license("MIT")
+ version("1.4.0", sha256="9f934f128666703d30818e9a091493df1bf1819bf7445ffb35a0f46871501b55")
version("1.3.0", sha256="d77d071fc37863fdc9abc3fd9ea1088904cd98c6980a014a31e44595d2deac5e")
version("1.2.0", sha256="1d5f80abfa69d1a379dff7263908c5c915023f18f26d50b639556e2f43ac755e")
version("1.1.0", sha256="71bfa2881ef295294e5b4493acb8cce98d14c354e9ae59b42fb56a76d8ec7056")
version("1.0.1", sha256="e5a4b455ab6bfbccbce3260673d9af8d1e4b21e19a2b6d0b6c1e1d7727613b7a")
version("1.0.0", sha256="efd218bc9152abde0a8006489a2c432742f00283a114c1eeb6d25abc10f5862d")
+ depends_on("c", type="build") # generated
+
# https://github.com/hatchet/hatchet/issues/428
depends_on("python@2.7:3.8", when="@:1.3.0", type=("build", "run"))
depends_on("python@2.7:", when="@1.3.1:", type=("build", "run"))
+ depends_on("py-cython", when="@1.4:", type="build")
depends_on("py-setuptools", type="build")
+ depends_on("py-pydot", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-pandas", type=("build", "run"))
- depends_on("py-pydot", type=("build", "run"))
- depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-textx", when="@1.4:", type=("build", "run"))
+ depends_on("py-multiprocess", when="@1.4:", type=("build", "run"))
+ depends_on("py-caliper-reader", when="@1.4:", type=("build", "run"))
+ depends_on("py-pycubexr", when="@1.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hatchling/package.py b/var/spack/repos/builtin/packages/py-hatchling/package.py
index 930a7067ae..dc6610f0a0 100644
--- a/var/spack/repos/builtin/packages/py-hatchling/package.py
+++ b/var/spack/repos/builtin/packages/py-hatchling/package.py
@@ -15,6 +15,8 @@ class PyHatchling(PythonPackage):
license("MIT", checked_by="tgamblin")
+ version("1.25.0", sha256="7064631a512610b52250a4d3ff1bd81551d6d1431c4eb7b72e734df6c74f4262")
+ version("1.24.2", sha256="41ddc27cdb25db9ef7b68bef075f829c84cb349aa1bff8240797d012510547b0")
version("1.21.0", sha256="5c086772357a50723b825fd5da5278ac7e3697cdf7797d07541a6c90b6ff754c")
version("1.18.0", sha256="50e99c3110ce0afc3f7bdbadff1c71c17758e476731c27607940cfa6686489ca")
version("1.17.0", sha256="b1244db3f45b4ef5a00106a46612da107cdfaf85f1580b8e1c059fefc98b0930")
@@ -26,6 +28,7 @@ class PyHatchling(PythonPackage):
depends_on("py-editables@0.3:", type=("build", "run"))
depends_on("py-packaging@21.3:", type=("build", "run"))
+ depends_on("py-packaging@23.2:", when="@1.24.2:", type=("build", "run"))
depends_on("py-pathspec@0.10.1:", when="@1.9:", type=("build", "run"))
depends_on("py-pathspec@0.9:", type=("build", "run"))
depends_on("py-pluggy@1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-healpy/package.py b/var/spack/repos/builtin/packages/py-healpy/package.py
index eb7931bf25..19fe0f5367 100644
--- a/var/spack/repos/builtin/packages/py-healpy/package.py
+++ b/var/spack/repos/builtin/packages/py-healpy/package.py
@@ -18,6 +18,10 @@ class PyHealpy(PythonPackage):
version("1.13.0", sha256="d0ae02791c2404002a09c643e9e50bc58e3d258f702c736dc1f39ce1e6526f73")
version("1.7.4", sha256="3cca7ed7786ffcca70e2f39f58844667ffb8521180ac890d4da651b459f51442")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools@3.2:", type="build")
depends_on("py-pkgconfig", type="build")
depends_on("py-numpy@1.13:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-heat/package.py b/var/spack/repos/builtin/packages/py-heat/package.py
index 90e5bcaf4c..babfb05e9d 100644
--- a/var/spack/repos/builtin/packages/py-heat/package.py
+++ b/var/spack/repos/builtin/packages/py-heat/package.py
@@ -18,6 +18,10 @@ class PyHeat(PythonPackage):
license("MIT")
+ version("1.4.2", sha256="d6714428a9c5204c1c44a2b246f228effaddc688f812277f229f4acdbcfeb7c5")
+ version("1.4.1", sha256="ecd871717c372a6983f643c0178dda44bc017d6b32b9258dbf3775af95f580ce")
+ version("1.4.0", sha256="6836fa10f9ce62ea61cf1bdc3283d7ad0c305836cc5a08c4edfd30695708e788")
+ version("1.3.1", sha256="8997ddc56a1d3078b44a1e2933adc0a7fbf678bd19bade3ae015bc0e13d40d3b")
version("1.3.0", sha256="fa247539a559881ffe574a70227d3c72551e7c4a9fb29b0945578d6a840d1c87")
variant("docutils", default=False, description="Use the py-docutils package")
@@ -32,15 +36,26 @@ class PyHeat(PythonPackage):
description="Use py-scikit-learn and py-matplotlib for the example tests",
)
- depends_on("python@3.8:", type=("build", "run"))
- depends_on("py-numpy@1.20:", type=("build", "run"))
- depends_on("py-torch@1.8:2.0.1", type=("build", "run"))
- depends_on("py-scipy@0.14:", type=("build", "run"))
- depends_on("pil@6:", type=("build", "run"))
- depends_on("py-torchvision@0.8:", type=("build", "run"))
- depends_on("py-mpi4py@3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ with when("@1.3"):
+ depends_on("python@3.8:3.10", type=("build", "run"))
+ depends_on("py-mpi4py@3:", type=("build", "run"))
+ depends_on("py-numpy@1.20:1", type=("build", "run"))
+ depends_on("py-torch@1.8:2.0.1", type=("build", "run"))
+ depends_on("py-scipy@0.14:", type=("build", "run"))
+ depends_on("pil@6:", type=("build", "run"))
+ depends_on("py-torchvision@0.8:", type=("build", "run"))
+
+ with when("@1.4"):
+ depends_on("python@3.8:3.11", type=("build", "run"))
+ depends_on("py-mpi4py@3:", type=("build", "run"))
+ depends_on("py-numpy@1.22:1", type=("build", "run"))
+ depends_on("py-torch@1.11:2.3.2", type=("build", "run"))
+ depends_on("py-scipy@1.10:", type=("build", "run"))
+ depends_on("pil@6:", type=("build", "run"))
+ depends_on("py-torchvision@0.12:", type=("build", "run"))
+
depends_on("py-docutils@0.16:", when="+docutils", type=("build", "link", "run"))
depends_on("py-h5py@2.8.0:", when="+hdf5", type=("build", "link", "run"))
depends_on("py-netcdf4@1.5.6:", when="+netcdf", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hepdata-lib/package.py b/var/spack/repos/builtin/packages/py-hepdata-lib/package.py
index d1b9fe2c4a..9512559ad2 100644
--- a/var/spack/repos/builtin/packages/py-hepdata-lib/package.py
+++ b/var/spack/repos/builtin/packages/py-hepdata-lib/package.py
@@ -19,6 +19,8 @@ class PyHepdataLib(PythonPackage):
version("0.10.1", sha256="71c635963883c51e7be18e03d80bfe42c5de350852b01010e3e45cbd1bff7a81")
version("0.9.0", sha256="c9238e45c603d7c061ed670cf197ff03ad9d370ab50419b6916fda2cd86d6150")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("root+python", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hf-transfer/package.py b/var/spack/repos/builtin/packages/py-hf-transfer/package.py
new file mode 100644
index 0000000000..3dab2ffe99
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-hf-transfer/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHfTransfer(PythonPackage):
+ """Speed up file transfers with the Hugging Face Hub."""
+
+ homepage = "https://github.com/huggingface/hf_transfer"
+ pypi = "hf_transfer/hf_transfer-0.1.8.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.1.8", sha256="26d229468152e7a3ec12664cac86b8c2800695fd85f9c9a96677a775cc04f0b3")
+
+ with default_args(type="build"):
+ depends_on("py-maturin@1.4:1")
diff --git a/var/spack/repos/builtin/packages/py-hiredis/package.py b/var/spack/repos/builtin/packages/py-hiredis/package.py
index 03379ae677..0b783b1ce0 100644
--- a/var/spack/repos/builtin/packages/py-hiredis/package.py
+++ b/var/spack/repos/builtin/packages/py-hiredis/package.py
@@ -18,5 +18,7 @@ class PyHiredis(PythonPackage):
version("1.1.0", sha256="996021ef33e0f50b97ff2d6b5f422a0fe5577de21a8873b58a779a5ddd1c3132")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-hmmlearn/package.py b/var/spack/repos/builtin/packages/py-hmmlearn/package.py
index cbb457b6e7..6eca677529 100644
--- a/var/spack/repos/builtin/packages/py-hmmlearn/package.py
+++ b/var/spack/repos/builtin/packages/py-hmmlearn/package.py
@@ -19,6 +19,8 @@ class PyHmmlearn(PythonPackage):
version("0.3.0", sha256="d13a91ea3695df881465e3d36132d7eef4e84d483f4ba538a4b46e24b5ea100f")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm@3.3:", type="build")
depends_on("py-pybind11@2.6:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-holoviews/package.py b/var/spack/repos/builtin/packages/py-holoviews/package.py
new file mode 100644
index 0000000000..428fdae648
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-holoviews/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHoloviews(PythonPackage):
+ """A Python library designed to make data analysis and visualization seamless and simple."""
+
+ homepage = "https://holoviews.org/"
+ pypi = "holoviews/holoviews-1.19.1.tar.gz"
+ git = "https://github.com/holoviz/holoviews.git"
+
+ license("BSD-3-Clause", checked_by="climbfuji")
+
+ version("1.19.1", sha256="b9e85e8c07275a456c0ef8d06bc157d02b37eff66fb3602aa12f5c86f084865c")
+ # version("1.19.0", sha256="cab1522f75a9b46377f9364b675befd79812e220059714470a58e21475d531ba")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+
+ depends_on("py-bokeh@3.1:", type="run")
+ depends_on("py-colorcet", type="run")
+ depends_on("py-numpy@1.21:", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-pandas@1.3:", type="run")
+ depends_on("py-panel@1:", type="run")
+ depends_on("py-param@2", type="run")
+ depends_on("py-pyviz-comms@2.1:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-horovod/package.py b/var/spack/repos/builtin/packages/py-horovod/package.py
index 56effd1982..d7a2e9b3bb 100644
--- a/var/spack/repos/builtin/packages/py-horovod/package.py
+++ b/var/spack/repos/builtin/packages/py-horovod/package.py
@@ -13,117 +13,51 @@ class PyHorovod(PythonPackage, CudaPackage):
homepage = "https://github.com/horovod"
git = "https://github.com/horovod/horovod.git"
+ submodules = True
+ license("Apache-2.0")
maintainers("adamjstewart", "aweits", "tgaddair", "thomas-bouvier")
- license("Apache-2.0")
-
- version("master", branch="master", submodules=True)
- version(
- "0.28.1", tag="v0.28.1", commit="1d217b59949986d025f6db93c49943fb6b6cc78f", submodules=True
- )
- version(
- "0.28.0", tag="v0.28.0", commit="587d72004736209a93ebda8cec0acdb7870db583", submodules=True
- )
- version(
- "0.27.0", tag="v0.27.0", commit="bfaca90d5cf66780a97d8799d4e1573855b64560", submodules=True
- )
- version(
- "0.26.1", tag="v0.26.1", commit="34604870eabd9dc670c222deb1da9acc6b9d7c03", submodules=True
- )
- version(
- "0.26.0", tag="v0.26.0", commit="c638dcec972750d4a75b229bc208cff9dc76b00a", submodules=True
- )
- version(
- "0.25.0", tag="v0.25.0", commit="48e0affcba962831668cd1222866af2d632920c2", submodules=True
- )
- version(
- "0.24.3", tag="v0.24.3", commit="a2d9e280c1210a8e364a7dc83ca6c2182fefa99d", submodules=True
- )
- version(
- "0.24.2", tag="v0.24.2", commit="b4c191c8d05086842517b3836285a85c6f96ab22", submodules=True
- )
- version(
- "0.24.1", tag="v0.24.1", commit="ebd135098571722469bb6290a6d098a9e1c96574", submodules=True
- )
- version(
- "0.24.0", tag="v0.24.0", commit="b089df66a29d3ba6672073eef3d42714d9d3626b", submodules=True
- )
- version(
- "0.23.0", tag="v0.23.0", commit="66ad6d5a3586decdac356e8ec95c204990bbc3d6", submodules=True
- )
- version(
- "0.22.1", tag="v0.22.1", commit="93a2f2583ed63391a904aaeb03b602729be90f15", submodules=True
- )
- version(
- "0.22.0", tag="v0.22.0", commit="3ff94801fbb4dbf6bc47c23888c93cad4887435f", submodules=True
- )
- version(
- "0.21.3", tag="v0.21.3", commit="6916985c9df111f36864724e2611827f64de8e11", submodules=True
- )
- version(
- "0.21.2", tag="v0.21.2", commit="c64b1d60c6bad7834f3315f12707f8ebf11c9c3d", submodules=True
- )
- version(
- "0.21.1", tag="v0.21.1", commit="a9dea74abc1f0b8e81cd2b6dd9fe81e2c4244e39", submodules=True
- )
- version(
- "0.21.0", tag="v0.21.0", commit="7d71874258fc8625ad8952defad0ea5b24531248", submodules=True
- )
- version(
- "0.20.3", tag="v0.20.3", commit="b3c4d81327590c9064d544622b6250d9a19ce2c2", submodules=True
- )
- version(
- "0.20.2", tag="v0.20.2", commit="cef4393eb980d4137bb91256da4dd847b7f44d1c", submodules=True
- )
- version(
- "0.20.1", tag="v0.20.1", commit="4099c2b7f34f709f0db1c09f06b2594d7b4b9615", submodules=True
- )
- version(
- "0.20.0", tag="v0.20.0", commit="396c1319876039ad8f5a56c007a020605ccb8277", submodules=True
- )
- version(
- "0.19.5", tag="v0.19.5", commit="b52e4b3e6ce5b1b494b77052878a0aad05c2e3ce", submodules=True
- )
- version(
- "0.19.4", tag="v0.19.4", commit="31f1f700b8fa6d3b6df284e291e302593fbb4fa3", submodules=True
- )
- version(
- "0.19.3", tag="v0.19.3", commit="ad63bbe9da8b41d0940260a2dd6935fa0486505f", submodules=True
- )
- version(
- "0.19.2", tag="v0.19.2", commit="f8fb21e0ceebbdc6ccc069c43239731223d2961d", submodules=True
- )
- version(
- "0.19.1", tag="v0.19.1", commit="9ad69e78e83c34568743e8e97b1504c6c7af34c3", submodules=True
- )
- version(
- "0.19.0", tag="v0.19.0", commit="1a805d9b20224069b294f361e47f5d9b55f426ff", submodules=True
- )
- version(
- "0.18.2", tag="v0.18.2", commit="bb2134b427e0e0c5a83624d02fafa4f14de623d9", submodules=True
- )
- version(
- "0.18.1", tag="v0.18.1", commit="0008191b3e61b5dfccddabe0129bbed7cd544c56", submodules=True
- )
- version(
- "0.18.0", tag="v0.18.0", commit="a639de51e9a38d5c1f99f458c045aeaebe70351e", submodules=True
- )
- version(
- "0.17.1", tag="v0.17.1", commit="399e70adc0f74184b5848d9a46b9b6ad67b5fe6d", submodules=True
- )
- version(
- "0.17.0", tag="v0.17.0", commit="2fed0410774b480ad19057320be9027be06b309e", submodules=True
- )
- version(
- "0.16.4", tag="v0.16.4", commit="2aac48c95c035bee7d68f9aff30e59319f46c21e", submodules=True
- )
- version(
- "0.16.3", tag="v0.16.3", commit="30a2148784478415dc31d65a6aa08d237f364b42", submodules=True
- )
- version(
- "0.16.2", tag="v0.16.2", commit="217774652eeccfcd60aa6e268dfd6b766d71b768", submodules=True
- )
+ version("master", branch="master")
+ version("0.28.1", tag="v0.28.1", commit="1d217b59949986d025f6db93c49943fb6b6cc78f")
+ version("0.28.0", tag="v0.28.0", commit="587d72004736209a93ebda8cec0acdb7870db583")
+ version("0.27.0", tag="v0.27.0", commit="bfaca90d5cf66780a97d8799d4e1573855b64560")
+ version("0.26.1", tag="v0.26.1", commit="34604870eabd9dc670c222deb1da9acc6b9d7c03")
+ version("0.26.0", tag="v0.26.0", commit="c638dcec972750d4a75b229bc208cff9dc76b00a")
+ version("0.25.0", tag="v0.25.0", commit="48e0affcba962831668cd1222866af2d632920c2")
+ version("0.24.3", tag="v0.24.3", commit="a2d9e280c1210a8e364a7dc83ca6c2182fefa99d")
+ version("0.24.2", tag="v0.24.2", commit="b4c191c8d05086842517b3836285a85c6f96ab22")
+ version("0.24.1", tag="v0.24.1", commit="ebd135098571722469bb6290a6d098a9e1c96574")
+ version("0.24.0", tag="v0.24.0", commit="b089df66a29d3ba6672073eef3d42714d9d3626b")
+ version("0.23.0", tag="v0.23.0", commit="66ad6d5a3586decdac356e8ec95c204990bbc3d6")
+ version("0.22.1", tag="v0.22.1", commit="93a2f2583ed63391a904aaeb03b602729be90f15")
+ version("0.22.0", tag="v0.22.0", commit="3ff94801fbb4dbf6bc47c23888c93cad4887435f")
+ version("0.21.3", tag="v0.21.3", commit="6916985c9df111f36864724e2611827f64de8e11")
+ version("0.21.2", tag="v0.21.2", commit="c64b1d60c6bad7834f3315f12707f8ebf11c9c3d")
+ version("0.21.1", tag="v0.21.1", commit="a9dea74abc1f0b8e81cd2b6dd9fe81e2c4244e39")
+ version("0.21.0", tag="v0.21.0", commit="7d71874258fc8625ad8952defad0ea5b24531248")
+ version("0.20.3", tag="v0.20.3", commit="b3c4d81327590c9064d544622b6250d9a19ce2c2")
+ version("0.20.2", tag="v0.20.2", commit="cef4393eb980d4137bb91256da4dd847b7f44d1c")
+ version("0.20.1", tag="v0.20.1", commit="4099c2b7f34f709f0db1c09f06b2594d7b4b9615")
+ version("0.20.0", tag="v0.20.0", commit="396c1319876039ad8f5a56c007a020605ccb8277")
+ version("0.19.5", tag="v0.19.5", commit="b52e4b3e6ce5b1b494b77052878a0aad05c2e3ce")
+ version("0.19.4", tag="v0.19.4", commit="31f1f700b8fa6d3b6df284e291e302593fbb4fa3")
+ version("0.19.3", tag="v0.19.3", commit="ad63bbe9da8b41d0940260a2dd6935fa0486505f")
+ version("0.19.2", tag="v0.19.2", commit="f8fb21e0ceebbdc6ccc069c43239731223d2961d")
+ version("0.19.1", tag="v0.19.1", commit="9ad69e78e83c34568743e8e97b1504c6c7af34c3")
+ version("0.19.0", tag="v0.19.0", commit="1a805d9b20224069b294f361e47f5d9b55f426ff")
+ version("0.18.2", tag="v0.18.2", commit="bb2134b427e0e0c5a83624d02fafa4f14de623d9")
+ version("0.18.1", tag="v0.18.1", commit="0008191b3e61b5dfccddabe0129bbed7cd544c56")
+ version("0.18.0", tag="v0.18.0", commit="a639de51e9a38d5c1f99f458c045aeaebe70351e")
+ version("0.17.1", tag="v0.17.1", commit="399e70adc0f74184b5848d9a46b9b6ad67b5fe6d")
+ version("0.17.0", tag="v0.17.0", commit="2fed0410774b480ad19057320be9027be06b309e")
+ version("0.16.4", tag="v0.16.4", commit="2aac48c95c035bee7d68f9aff30e59319f46c21e")
+ version("0.16.3", tag="v0.16.3", commit="30a2148784478415dc31d65a6aa08d237f364b42")
+ version("0.16.2", tag="v0.16.2", commit="217774652eeccfcd60aa6e268dfd6b766d71b768")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
# https://github.com/horovod/horovod/blob/master/docs/install.rst
variant(
@@ -228,7 +162,20 @@ class PyHorovod(PythonPackage, CudaPackage):
"controllers=gloo", when="@:0.20.0 platform=darwin", msg="Gloo cannot be compiled on MacOS"
)
# https://github.com/horovod/horovod/issues/3996
- conflicts("^py-torch@2.1:")
+ patch(
+ "https://github.com/horovod/horovod/pull/3998.patch?full_index=1",
+ sha256="9ecd4e8e315764afab20f2086e24baccf8178779a3c663196b24dc55a23a6aca",
+ when="@0.25:0.28.1",
+ )
+ conflicts("^py-torch@2.1:", when="@:0.24")
+
+ # https://github.com/horovod/horovod/pull/3957
+ patch(
+ "https://github.com/horovod/horovod/pull/3957.patch?full_index=1",
+ sha256="9e22e312c0cbf224b4135ba70bd4fd2e4170d8316c996643e360112abaac8f93",
+ when="@0.21:0.28.1",
+ )
+ conflicts("%gcc@13:", when="@:0.20")
# https://github.com/horovod/horovod/pull/1835
patch("fma.patch", when="@0.19.0:0.19.1")
diff --git a/var/spack/repos/builtin/packages/py-htgettoken/package.py b/var/spack/repos/builtin/packages/py-htgettoken/package.py
index 152da6f44c..ba1c0a8c6e 100644
--- a/var/spack/repos/builtin/packages/py-htgettoken/package.py
+++ b/var/spack/repos/builtin/packages/py-htgettoken/package.py
@@ -22,10 +22,12 @@ class PyHtgettoken(PythonPackage):
license("BSD-3-Clause")
+ version("2.0-2", sha256="80b1b15cc4957f9d1cb5e71a1fbdc5d0ac82de46a888aeb7fa503b1465978b13")
# The following versions refer to setuptools-buildable commits after 1.16;
# they are special reproducible version numbers from `git describe`
version("1.16-33-g3788bb4", commit="3788bb4733e5e8f856cee51566df9a36cbfe097d")
version("1.16-20-g8b72f48", commit="8b72f4800ef99923dac99dbe0756a26266a27886")
+
# Older versions do not have a python build system
depends_on("py-setuptools@30.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-htseq/package.py b/var/spack/repos/builtin/packages/py-htseq/package.py
index 8b90b77564..0a524e543a 100644
--- a/var/spack/repos/builtin/packages/py-htseq/package.py
+++ b/var/spack/repos/builtin/packages/py-htseq/package.py
@@ -19,6 +19,9 @@ class PyHtseq(PythonPackage):
version("0.11.2", sha256="65c4c13968506c7df92e97124df96fdd041c4476c12a548d67350ba8b436bcfc")
version("0.9.1", sha256="af5bba775e3fb45ed4cde64c691ebef36b0bf7a86efd35c884ad0734c27ad485")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("qa", default=True, description="Quality assessment")
variant("mtx", default=True, description="BigWig manipulation", when="@2:")
variant("mtx", default=True, description="mtx output files", when="@2:")
diff --git a/var/spack/repos/builtin/packages/py-httpcore/package.py b/var/spack/repos/builtin/packages/py-httpcore/package.py
index 8a72e47aa0..45fbf4b22b 100644
--- a/var/spack/repos/builtin/packages/py-httpcore/package.py
+++ b/var/spack/repos/builtin/packages/py-httpcore/package.py
@@ -15,15 +15,24 @@ class PyHttpcore(PythonPackage):
license("BSD-3-Clause")
+ version("1.0.5", sha256="34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61")
+ version("0.18.0", sha256="13b5e5cd1dca1a6636a6aaea212b19f4f85cd88c366a2b82304181b769aab3c9")
version("0.16.3", sha256="c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb")
version("0.14.7", sha256="7503ec1c0f559066e7e39bc4003fd2ce023d01cf51793e3c173b864eb456ead1")
version("0.11.0", sha256="35ffc735d746b83f8fc6d36f82600e56117b9e8adc65d0c0423264b6ebfef7bf")
- depends_on("py-setuptools", type="build")
- depends_on("py-h11@0.13:0.14", when="@0.16.3", type=("build", "run"))
- depends_on("py-h11@0.11:0.12", type=("build", "run"), when="@0.14.7")
- depends_on("py-h11@0.8:0.9", type=("build", "run"), when="@0.11.0")
- depends_on("py-sniffio@1", type=("build", "run"))
- depends_on("py-anyio@3:4", when="@0.16.3", type=("build", "run"))
- depends_on("py-anyio@3", type=("build", "run"), when="@0.14.7")
- depends_on("py-certifi", type=("build", "run"), when="@0.14.7:")
+ depends_on("py-setuptools", when="@:1.16.3", type="build")
+ depends_on("py-hatchling", when="@0.18:", type="build")
+ depends_on("py-hatch-fancy-pypi-readme", when="@0.18:", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-certifi", when="@0.14.7:")
+
+ depends_on("py-h11@0.8:0.9", when="@0.11.0")
+ depends_on("py-h11@0.11:0.12", when="@0.14.7")
+ depends_on("py-h11@0.13:0.14", when="@0.16.3:")
+
+ depends_on("py-sniffio@1", when="@0")
+
+ depends_on("py-anyio@3", when="@0.14.7")
+ depends_on("py-anyio@3:4", when="@0.16.3:0.18")
diff --git a/var/spack/repos/builtin/packages/py-httpstan/package.py b/var/spack/repos/builtin/packages/py-httpstan/package.py
index efa08de811..f4ecbbe8d5 100644
--- a/var/spack/repos/builtin/packages/py-httpstan/package.py
+++ b/var/spack/repos/builtin/packages/py-httpstan/package.py
@@ -20,6 +20,8 @@ class PyHttpstan(PythonPackage):
version("4.7.2", sha256="94f6631d969cbd91d136194b074d02642d8c9e2a05674877a39059be87c5bf7b")
version("4.6.1", sha256="703e5e04e60651e0004574bb9695827d759fd13eb0d6bd67f827c1bfa0a1fd31")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.8:3", type=("build", "run"), when="@4.7:")
depends_on("python@3.7:3", type=("build", "run"), when="@:4.6")
depends_on("py-setuptools@41.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-httptools/package.py b/var/spack/repos/builtin/packages/py-httptools/package.py
index d4708c117b..cfba153d52 100644
--- a/var/spack/repos/builtin/packages/py-httptools/package.py
+++ b/var/spack/repos/builtin/packages/py-httptools/package.py
@@ -17,5 +17,7 @@ class PyHttptools(PythonPackage):
version("0.5.0", sha256="295874861c173f9101960bba332429bb77ed4dcd8cdf5cee9922eb00e4f6bc09")
version("0.1.1", sha256="41b573cf33f64a8f8f3400d0a7faf48e1888582b6f6e02b82b9bd4f0bf7497ce")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.24:0.29", type="build")
diff --git a/var/spack/repos/builtin/packages/py-httpx/package.py b/var/spack/repos/builtin/packages/py-httpx/package.py
index 4da435bbd3..37be8063c4 100644
--- a/var/spack/repos/builtin/packages/py-httpx/package.py
+++ b/var/spack/repos/builtin/packages/py-httpx/package.py
@@ -11,10 +11,12 @@ class PyHttpx(PythonPackage):
and async APIs, and support for both HTTP/1.1 and HTTP/2."""
homepage = "https://github.com/encode/httpx"
- pypi = "httpx/httpx-0.15.2.tar.gz"
+ pypi = "httpx/httpx-0.27.0.tar.gz"
license("BSD-3-Clause")
+ version("0.27.2", sha256="f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2")
+ version("0.27.0", sha256="a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5")
version("0.23.3", sha256="9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9")
version("0.22.0", sha256="d8e778f76d9bbd46af49e7f062467e3157a5a3d2ae4876a4bbfd8a51ed9c9cb4")
version("0.15.2", sha256="713a2deaf96d85bbd4a1fbdf0edb27d6b4ee2c9aaeda8433042367e4b9e1628d")
@@ -22,26 +24,36 @@ class PyHttpx(PythonPackage):
variant("http2", default=False, when="@0.15.2:", description="Enable http2 support")
+ depends_on("python@3.8:", when="@0.27:", type=("build", "run"))
+ depends_on("py-setuptools", when="@:0.22", type="build")
depends_on("py-hatchling", when="@0.23:", type="build")
depends_on("py-hatch-fancy-pypi-readme", when="@0.23:", type="build")
- depends_on("py-certifi", type=("build", "run"))
- depends_on("py-httpcore@0.15:0.16", when="@0.23:", type=("build", "run"))
- depends_on("py-httpcore@0.14.5:0.14", type=("build", "run"), when="@0.22")
- depends_on("py-httpcore@0.11.0:0.11", type=("build", "run"), when="@0.15.2")
- depends_on("py-rfc3986+idna2008@1.3:1", type=("build", "run"), when="@0.15.2:")
- depends_on("py-rfc3986@1.3:1", type=("build", "run"), when="@0.11.1")
- depends_on("py-sniffio", type=("build", "run"), when="@0.15.2:")
- depends_on("py-sniffio@1.0:1", type=("build", "run"), when="@0.11.1")
-
- depends_on("py-h2@3.0:4", type=("build", "run"), when="@0.22.0:+http2")
- depends_on("py-h2@3.0:3", type=("build", "run"), when="@0.15.2+http2")
- depends_on("py-h2@3.0:3", type=("build", "run"), when="@0.11.1")
-
- # Historical dependencies
- depends_on("py-setuptools", when="@:0.22", type="build")
- depends_on("py-charset-normalizer", type=("build", "run"), when="@0.22")
- depends_on("py-hstspreload", type=("build", "run"), when="@0.11.1")
- depends_on("py-chardet@3.0:3", type=("build", "run"), when="@0.11.1")
- depends_on("py-h11@0.8:0.9", type=("build", "run"), when="@0.11.1")
- depends_on("py-idna@2.0:2", type=("build", "run"), when="@0.11.1")
- depends_on("py-urllib3@1.0:1", type=("build", "run"), when="@0.11.1")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-certifi")
+
+ depends_on("py-httpcore@0.11", when="@0.15.2")
+ depends_on("py-httpcore@0.14.5:0.14", when="@0.22")
+ depends_on("py-httpcore@0.15:0.16", when="@0.23")
+ depends_on("py-httpcore@1", when="@0.27:")
+
+ depends_on("py-anyio", when="@0.27:")
+ depends_on("py-idna", when="@0.27:")
+
+ depends_on("py-sniffio@1", when="@0.11.1")
+ depends_on("py-sniffio", when="@0.15.2:")
+
+ depends_on("py-h2@3", when="@0.11.1")
+ depends_on("py-h2@3", when="@0.15.2+http2")
+ depends_on("py-h2@3:4", when="@0.22.0:+http2")
+
+ # Historical dependencies
+ depends_on("py-hstspreload", when="@0.11.1")
+ depends_on("py-chardet@3", when="@0.11.1")
+ depends_on("py-h11@0.8:0.9", when="@0.11.1")
+ depends_on("py-idna@2", when="@0.11.1")
+ depends_on("py-urllib3@1", when="@0.11.1")
+ depends_on("py-charset-normalizer", when="@0.22")
+
+ depends_on("py-rfc3986@1.3:1", when="@0.11.1")
+ depends_on("py-rfc3986+idna2008@1.3:1", when="@0.15.2:2.23.3")
diff --git a/var/spack/repos/builtin/packages/py-huggingface-hub/package.py b/var/spack/repos/builtin/packages/py-huggingface-hub/package.py
index d9ee1717de..f73029b429 100644
--- a/var/spack/repos/builtin/packages/py-huggingface-hub/package.py
+++ b/var/spack/repos/builtin/packages/py-huggingface-hub/package.py
@@ -7,15 +7,18 @@ from spack.package import *
class PyHuggingfaceHub(PythonPackage):
- """This library allows anyone to work with the Hub
- repositories: you can clone them, create them and upload
- your models to them."""
+ """Client library to download and publish models, datasets and other repos
+ on the huggingface.co hub."""
homepage = "https://github.com/huggingface/huggingface_hub"
pypi = "huggingface_hub/huggingface_hub-0.0.10.tar.gz"
license("Apache-2.0")
+ maintainers("adamjstewart")
+ version("0.26.2", sha256="b100d853465d965733964d123939ba287da60a547087783ddff8a323f340332b")
+ version("0.24.6", sha256="cc2579e761d070713eaa9c323e3debe39d5b464ae3a7261c39a9195b27bb8000")
+ version("0.23.4", sha256="35d99016433900e44ae7efe1c209164a5a81dbbcd53a52f99c281dcd7ce22431")
version("0.19.4", sha256="176a4fc355a851c17550e7619488f383189727eab209534d7cef2114dae77b22")
version("0.14.1", sha256="9ab899af8e10922eac65e290d60ab956882ab0bf643e3d990b1394b6b47b7fbc")
version("0.10.1", sha256="5c188d5b16bec4b78449f8681f9975ff9d321c16046cc29bcf0d7e464ff29276")
@@ -28,17 +31,34 @@ class PyHuggingfaceHub(PythonPackage):
when="@0.10:",
description="Install dependencies for CLI-specific features",
)
+ variant(
+ "hf_transfer",
+ default=False,
+ when="@0.21:",
+ description="Install hf_transfer to speed up downloads/uploads",
+ )
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-filelock")
+ depends_on("py-fsspec@2023.5:", when="@0.18:")
+ depends_on("py-fsspec", when="@0.14:")
+ depends_on("py-packaging@20.9:", when="@0.10:")
+ depends_on("py-pyyaml@5.1:", when="@0.10:")
+ depends_on("py-requests")
+ depends_on("py-tqdm@4.42.1:", when="@0.12:")
+ depends_on("py-tqdm")
+ depends_on("py-typing-extensions@3.7.4.3:", when="@0.10:")
+ depends_on("py-typing-extensions", when="@0.0.10:")
+
+ with when("+cli"):
+ depends_on("py-inquirerpy@0.3.4")
+
+ with when("+hf_transfer"):
+ depends_on("py-hf-transfer@0.1.4:")
- depends_on("py-setuptools", type="build")
- depends_on("py-filelock", type=("build", "run"))
- depends_on("py-fsspec@2023.5:", when="@0.18:", type=("build", "run"))
- depends_on("py-fsspec", when="@0.14:", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-tqdm@4.42.1:", when="@0.12:", type=("build", "run"))
- depends_on("py-tqdm", type=("build", "run"))
- depends_on("py-pyyaml@5.1:", when="@0.10:", type=("build", "run"))
- depends_on("py-typing-extensions@3.7.4.3:", when="@0.10:", type=("build", "run"))
- depends_on("py-typing-extensions", when="@0.0.10:", type=("build", "run"))
- depends_on("py-packaging@20.9:", when="@0.10:", type=("build", "run"))
-
- depends_on("py-inquirerpy@0.3.4", when="@0.14:+cli", type=("build", "run"))
+ def setup_run_environment(self, env):
+ if "+hf_transfer" in self.spec:
+ env.set("HF_HUB_ENABLE_HF_TRANSFER", 1)
diff --git a/var/spack/repos/builtin/packages/py-humanize/package.py b/var/spack/repos/builtin/packages/py-humanize/package.py
index d9efe5ef12..f12a12996c 100644
--- a/var/spack/repos/builtin/packages/py-humanize/package.py
+++ b/var/spack/repos/builtin/packages/py-humanize/package.py
@@ -18,12 +18,19 @@ class PyHumanize(PythonPackage):
license("MIT")
+ version("4.9.0", sha256="582a265c931c683a7e9b8ed9559089dea7edcf6cc95be39a3cbc2c5d5ac2bcfa")
+ version("4.8.0", sha256="9783373bf1eec713a770ecaa7c2d7a7902c98398009dfa3d8a2df91eec9311e8")
version("4.6.0", sha256="5f1f22bc65911eb1a6ffe7659bd6598e33dcfeeb904eb16ee1e705a09bf75916")
version("4.4.0", sha256="efb2584565cc86b7ea87a977a15066de34cdedaf341b11c851cfcfd2b964779c")
version("4.0.0", sha256="ee1f872fdfc7d2ef4a28d4f80ddde9f96d36955b5d6b0dac4bdeb99502bddb00")
+ version("3.14.0", sha256="60dd8c952b1df1ad83f0903844dec50a34ba7a04eea22a6b14204ffb62dbb0a4")
version("3.12.0", sha256="5ec1a66e230a3e31fb3f184aab9436ea13d4e37c168e0ffc345ae5bb57e58be6")
+ version("2.6.0", sha256="8ee358ea6c23de896b9d1925ebe6a8504bb2ba7e98d5ccf4d07ab7f3b28f3819")
+ version("1.1.0", sha256="ad83016fae2453a7486f5be5dba8e19883020c77f6c12c63702f3b6c15ae3c5e")
+ version("1.0.0", sha256="38ace9b66bcaeb7f8186b9dbf0b3448e00148e5b4fbaf726f96c789e52c3e741")
version("0.5.1", sha256="a43f57115831ac7c70de098e6ac46ac13be00d69abbf60bdcac251344785bb19")
+ depends_on("python@3.8:", when="@4.6:")
depends_on("py-hatch-vcs", when="@4.6:", type=("build", "run"))
depends_on("py-hatchling", when="@4.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-hvplot/package.py b/var/spack/repos/builtin/packages/py-hvplot/package.py
new file mode 100644
index 0000000000..291d38723c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-hvplot/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyHvplot(PythonPackage):
+ """A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews."""
+
+ homepage = "https://hvplot.holoviz.org/"
+ pypi = "hvplot/hvplot-1.19.1.tar.gz"
+ git = "http://github.com/holoviz/hvplot.git"
+
+ license("BSD-3-Clause", checked_by="climbfuji")
+
+ version("0.11.1", sha256="989ed0389189adc47edcd2601d2eab18bf366e74b07f5e2873e021323c4a14bb")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@30.3:", type="build")
+ depends_on("py-setuptools-scm@6:", type="build")
+
+ depends_on("py-bokeh@3.1:", type="run")
+ depends_on("py-colorcet", type="run")
+ depends_on("py-holoviews@1.19:", type="run")
+ depends_on("py-numpy@1.21:", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-pandas@1.3:", type="run")
+ depends_on("py-panel@1:", type="run")
+ depends_on("py-param@1.12:2", type="run")
diff --git a/var/spack/repos/builtin/packages/py-hypothesis/package.py b/var/spack/repos/builtin/packages/py-hypothesis/package.py
index 90469c997b..cbec4e5c52 100644
--- a/var/spack/repos/builtin/packages/py-hypothesis/package.py
+++ b/var/spack/repos/builtin/packages/py-hypothesis/package.py
@@ -14,6 +14,7 @@ class PyHypothesis(PythonPackage):
license("MPL-2.0")
+ version("6.96.2", sha256="524a0ac22c8dfff640f21f496b85ee193a470e8570ab7707b8e3bfccd7da34a6")
version("6.23.1", sha256="23a1b0488aec5719e2f9e399342e10f30d497cbb9fd39470ef0975c1b502ae35")
version("5.3.0", sha256="c9fdb53fe3bf1f8e7dcca1a7dd6e430862502f088aca2903d141511212e79429")
version("4.57.1", sha256="3c4369a4b0a1348561048bcda5f1db951a1b8e2a514ea8e8c70d36e656bf6fa0")
@@ -22,42 +23,33 @@ class PyHypothesis(PythonPackage):
version("4.7.2", sha256="87944c6379f77634474b88abbf1e5ed5fe966637cc926131eda5e2af5b54a608")
version("3.7.0", sha256="0fea49d08f2d5884f014151a5af6fb48d862f6ad567ffc4a2e84abf2f186c423")
- depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"), when="@6:")
- depends_on("py-setuptools@36.2:", type=("build"))
- depends_on("py-attrs@19.2.0:", when="@4.38.2:", type=("build", "run"))
- depends_on("py-attrs@16.0.0:", when="@3.44.22:", type=("build", "run"))
+ variant("django", default=False, description="Enable django support")
+ variant("numpy", default=False, description="Enable numpy support")
+ variant("pandas", default=False, description="Enable pandas support")
+
+ depends_on("py-setuptools@36.2:", type="build")
+ depends_on("py-attrs@22.2:", when="@6.96:", type=("build", "run"))
+ depends_on("py-attrs@19.2:", when="@4.38.2:", type=("build", "run"))
+ depends_on("py-attrs@16.0:", when="@3.44.22:", type=("build", "run"))
depends_on("py-attrs", when="@3.28.0:", type=("build", "run"))
- depends_on("py-sortedcontainers@2.1.0:2", type=("build", "run"), when="@4.57.1:")
+ depends_on("py-exceptiongroup@1:", when="@6.96: ^python@:3.10", type=("build", "run"))
+ depends_on("py-sortedcontainers@2.1:2", type=("build", "run"), when="@4.57.1:")
+ depends_on("py-django@3.2:", type="run", when="@6.96: +django")
depends_on("py-django@2.2:", type="run", when="+django")
depends_on("py-pytz@2014.1:", type="run", when="+django")
+ depends_on("py-numpy@1.17.3:", type="run", when="@6.96: +numpy")
depends_on("py-numpy@1.9.0:", type="run", when="+numpy")
+ # https://github.com/HypothesisWorks/hypothesis/issues/3950
+ depends_on("py-numpy@:1", when="@:6.100.1+numpy", type="run")
+ depends_on("py-pandas@1.1:", type="run", when="@6.96: +pandas")
depends_on("py-pandas@0.25:", type="run", when="+pandas")
- variant("django", default=False, description="Enable django support")
- variant("numpy", default=False, description="Enable numpy support")
- variant("pandas", default=False, description="Enable pandas support")
-
- # All modules except for 'hypothesis.extra.pandas' and 'hypothesis.extra.django',
- # which are optional and are only added when their variants are enabled:
- import_test_modules = [
- "hypothesis",
- "hypothesis.extra",
- "hypothesis.utils",
- "hypothesis.strategies",
- "hypothesis.strategies._internal",
- "hypothesis.vendor",
- "hypothesis.internal",
- "hypothesis.internal.conjecture",
- "hypothesis.internal.conjecture.shrinking",
- "hypothesis.internal.conjecture.dfa",
- ]
-
@property
- def import_modules(self):
- if self.spec.satisfies("+pandas"):
- self.import_test_modules.append("hypothesis.extra.pandas")
- if self.spec.satisfies("+django"):
- self.import_test_modules.append("hypothesis.extra.django")
- return self.import_test_modules
+ def skip_modules(self):
+ modules = []
+ if "+django" not in self.spec:
+ modules.append("hypothesis.extra.django")
+ if "+pandas" not in self.spec:
+ modules.append("hypothesis.extra.pandas")
+ return modules
diff --git a/var/spack/repos/builtin/packages/py-igor2/package.py b/var/spack/repos/builtin/packages/py-igor2/package.py
new file mode 100644
index 0000000000..5e03507d7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-igor2/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyIgor2(PythonPackage):
+ """igor2: interface for reading binary IGOR files."""
+
+ # pypi only has no sdist
+ homepage = "https://github.com/AFM-analysis/igor2"
+ url = "https://pypi.io/packages/py3/i/igor2/igor2-0.5.3-py3-none-any.whl"
+
+ license("LGPL-3.0-or-later")
+
+ version("0.5.3", sha256="bb7b54a5926ec640e0e9176f46e0dd88ad956fec2d17ba3b0a7687eba82cefee")
+
+ depends_on("python@3.8:3", type=("build", "run"))
+ depends_on("py-numpy@1.25.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-igraph/package.py b/var/spack/repos/builtin/packages/py-igraph/package.py
index 7d3b4b3226..36708d10ee 100644
--- a/var/spack/repos/builtin/packages/py-igraph/package.py
+++ b/var/spack/repos/builtin/packages/py-igraph/package.py
@@ -15,16 +15,22 @@ class PyIgraph(PythonPackage):
license("GPL-2.0-or-later")
+ version("0.11.6", sha256="837f233256c3319f2a35a6a80d94eafe47b43791ef4c6f9e9871061341ac8e28")
version("0.10.6", sha256="76f7aad294514412f835366a7d9a9c1e7a34c3e6ef0a6c3a1a835234323228e8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("matplotlib", default=False, description="Enable plotting with Matplotlib")
depends_on("cmake", type="build")
depends_on("igraph+shared@0.10.6", when="@0.10.6")
+ depends_on("igraph+shared@0.10.13", when="@0.11.6")
depends_on("pkgconfig", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-texttable@1.6.2:", type=("build", "run"))
- depends_on("py-matplotlib@3.5", type="run", when="+matplotlib")
+ depends_on("py-matplotlib@3.5:", type="run", when="+matplotlib")
def setup_build_environment(self, env):
env.set("IGRAPH_USE_PKG_CONFIG", "1")
diff --git a/var/spack/repos/builtin/packages/py-igv-notebook/package.py b/var/spack/repos/builtin/packages/py-igv-notebook/package.py
new file mode 100644
index 0000000000..ffee7c8af8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-igv-notebook/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyIgvNotebook(PythonPackage):
+ """Module for embedding igv.js in an IPython notebook"""
+
+ homepage = "https://github.com/igvteam/igv-notebook"
+ pypi = "igv-notebook/igv-notebook-0.5.2.tar.gz"
+
+ license("MIT license", checked_by="ashim-mahara")
+
+ version("0.5.2", sha256="8b47a1a6c41f11359a07264815401cc4000c99722c77cbb749182bf6b66cf69c")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-ipykernel", type=("build", "run"))
+ depends_on("py-ipython", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ilmbase/package.py b/var/spack/repos/builtin/packages/py-ilmbase/package.py
index 7b55335768..16c8cd3679 100644
--- a/var/spack/repos/builtin/packages/py-ilmbase/package.py
+++ b/var/spack/repos/builtin/packages/py-ilmbase/package.py
@@ -14,6 +14,8 @@ class PyIlmbase(AutotoolsPackage):
version("2.3.0", sha256="9c898bb16e7bc916c82bebdf32c343c0f2878fc3eacbafa49937e78f2079a425")
+ depends_on("cxx", type="build") # generated
+
depends_on("ilmbase")
depends_on("boost+python")
depends_on("py-numpy")
diff --git a/var/spack/repos/builtin/packages/py-imagecodecs/package.py b/var/spack/repos/builtin/packages/py-imagecodecs/package.py
index 86360d53d1..b6f1bb6c19 100644
--- a/var/spack/repos/builtin/packages/py-imagecodecs/package.py
+++ b/var/spack/repos/builtin/packages/py-imagecodecs/package.py
@@ -20,8 +20,13 @@ class PyImagecodecs(PythonPackage):
version("2022.2.22", sha256="062bef6b003290a8163abed2744b406854238208dfdd41cf7165253c6e01c0bd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-numpy@1.19.2:", type=("build", "run"))
+ # https://github.com/cgohlke/imagecodecs/issues/100
+ depends_on("py-numpy@:1", when="@:2024.6.0", type=("build", "run"))
depends_on("py-setuptools@18.0:", type="build")
depends_on("py-cython@0.29.27:", type="build")
depends_on("py-bitshuffle@0.3.5:", type=("build", "run"))
@@ -45,7 +50,7 @@ class PyImagecodecs(PythonPackage):
depends_on("openjpeg@2.4.0:")
depends_on("snappy@1.1.9:")
depends_on("zlib-api")
- depends_on("zlib@1.2.11:", when="^zlib")
+ depends_on("zlib@1.2.11:", when="^[virtuals=zlib-api] zlib")
depends_on("zopfli@1.0.3: +shared")
depends_on("zstd@1.5.2:")
diff --git a/var/spack/repos/builtin/packages/py-imageio/package.py b/var/spack/repos/builtin/packages/py-imageio/package.py
index c82511a03b..9e2f04478c 100644
--- a/var/spack/repos/builtin/packages/py-imageio/package.py
+++ b/var/spack/repos/builtin/packages/py-imageio/package.py
@@ -19,6 +19,8 @@ class PyImageio(PythonPackage):
license("BSD-2-Clause")
+ version("2.35.1", sha256="4952dfeef3c3947957f6d5dedb1f4ca31c6e509a476891062396834048aeed2a")
+ version("2.34.0", sha256="ae9732e10acf807a22c389aef193f42215718e16bd06eed0c5bb57e1034a4d53")
version("2.30.0", sha256="7fc6ad5b5677cb1e58077875a72512aa8c392b6d40885eca0a6ab250efb4b8f4")
version("2.22.0", sha256="a332d127ec387b2d3dca967fd065a90f1c1a4ba2343570b03fe2cebb6ed064ea")
version("2.16.0", sha256="7f7d8d8e1eb6f8bb1d15e0dd93bee3f72026a4c3b96e9c690e42f403f7bdea3e")
@@ -34,6 +36,8 @@ class PyImageio(PythonPackage):
depends_on("py-numpy", type=("build", "run"))
depends_on("py-numpy@1.20:", when="@2.16", type=("build", "run"))
+ # https://github.com/imageio/imageio/issues/1077
+ depends_on("py-numpy@:1", when="@:2.34.1", type=("build", "run"))
depends_on("pil@8.3.2:", when="@2.10:", type=("build", "run"))
depends_on("pil", type=("build", "run"))
depends_on("ffmpeg", type="run")
diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py
index 45311c7595..b66aaa0938 100644
--- a/var/spack/repos/builtin/packages/py-iminuit/package.py
+++ b/var/spack/repos/builtin/packages/py-iminuit/package.py
@@ -17,9 +17,13 @@ class PyIminuit(PythonPackage):
version("1.3.6", sha256="d79a197f305d4708a0e3e52b0a6748c1a6997360d2fbdfd09c022995a6963b5e")
version("1.2", sha256="7651105fc3f186cfb5742f075ffebcc5088bf7797d8ed124c00977eebe0d1c64")
+ depends_on("cxx", type="build") # generated
+
# Required dependencies
depends_on("python@3.6:", type=("build", "run"), when="@2.6.1:")
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"), when="@1.3:1.3.6")
depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@1.3.7:")
- depends_on("py-cmake", type="build", when="@2.8.4")
+ # https://github.com/numpy/numpy/issues/26191#issuecomment-2179127999
+ depends_on("py-numpy@:1", when="@:2.25", type=("build", "run"))
+ depends_on("cmake", type="build", when="@2.8.4")
diff --git a/var/spack/repos/builtin/packages/py-immutables/package.py b/var/spack/repos/builtin/packages/py-immutables/package.py
index 02fe3e6a1e..e2b53d484c 100644
--- a/var/spack/repos/builtin/packages/py-immutables/package.py
+++ b/var/spack/repos/builtin/packages/py-immutables/package.py
@@ -15,12 +15,19 @@ class PyImmutables(PythonPackage):
license("Apache-2.0")
+ version("0.20", sha256="1d2f83e6a6a8455466cd97b9a90e2b4f7864648616dfa6b19d18f49badac3876")
+ version("0.19", sha256="df17942d60e8080835fcc5245aa6928ef4c1ed567570ec019185798195048dcf")
version("0.18", sha256="5336c7974084cce62f7e29aaff81a3c3f75e0fd0a23a2faeb986ae0ea08d8cf4")
version("0.16", sha256="d67e86859598eed0d926562da33325dac7767b7b1eff84e232c22abea19f4360")
version("0.14", sha256="a0a1cc238b678455145bae291d8426f732f5255537ed6a5b7645949704c70a78")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@0.16:")
depends_on("py-setuptools", type="build")
+ # setuptools 68 is more strict about the format of pyproject.toml and fails to install older
+ # versions of this package
+ depends_on("py-setuptools@:67", type="build", when="@:0.18")
depends_on("py-setuptools@42:", type="build", when="@0.16:")
depends_on("py-typing-extensions@3.7.4.3:", when="@0.16: ^python@:3.7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py
index d4ce2ae07d..1e04856e17 100644
--- a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py
+++ b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py
@@ -15,6 +15,7 @@ class PyImportlibMetadata(PythonPackage):
license("Apache-2.0")
+ version("7.0.1", sha256="f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc")
version("6.6.0", sha256="92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705")
version("5.1.0", sha256="d5059f9f1e8e41f80e9c56c2ee58811450c31984dfa625329ffd7c0dad88a73b")
version("4.12.0", sha256="637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670")
diff --git a/var/spack/repos/builtin/packages/py-incremental/package.py b/var/spack/repos/builtin/packages/py-incremental/package.py
index 8550e37598..5e05689b84 100644
--- a/var/spack/repos/builtin/packages/py-incremental/package.py
+++ b/var/spack/repos/builtin/packages/py-incremental/package.py
@@ -14,6 +14,9 @@ class PyIncremental(PythonPackage):
license("MIT")
+ version("24.7.2", sha256="fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9")
version("21.3.0", sha256="02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@61.0:", type="build", when="@24.7:")
+ depends_on("py-tomli", type=("build", "run"), when="@24.7: ^python@:3.10")
diff --git a/var/spack/repos/builtin/packages/py-installer/package.py b/var/spack/repos/builtin/packages/py-installer/package.py
index 7de649a5e9..6ecf2c5b4e 100644
--- a/var/spack/repos/builtin/packages/py-installer/package.py
+++ b/var/spack/repos/builtin/packages/py-installer/package.py
@@ -17,16 +17,8 @@ class PyInstaller(Package, PythonExtension):
)
list_url = "https://pypi.org/simple/installer/"
- version(
- "0.7.0",
- sha256="05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53",
- expand=False,
- )
- version(
- "0.6.0",
- sha256="ae7c62d1d6158b5c096419102ad0d01fdccebf857e784cee57f94165635fe038",
- expand=False,
- )
+ version("0.7.0", sha256="05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53")
+ version("0.6.0", sha256="ae7c62d1d6158b5c096419102ad0d01fdccebf857e784cee57f94165635fe038")
extends("python")
@@ -44,6 +36,4 @@ class PyInstaller(Package, PythonExtension):
python(*args)
def setup_dependent_package(self, module, dependent_spec):
- installer = dependent_spec["python"].command
- installer.add_default_arg("-m", "installer")
- setattr(module, "installer", installer)
+ setattr(module, "installer", python.with_default_args("-m", "installer"))
diff --git a/var/spack/repos/builtin/packages/py-intbitset/package.py b/var/spack/repos/builtin/packages/py-intbitset/package.py
index 01a55114bc..93c72606f0 100644
--- a/var/spack/repos/builtin/packages/py-intbitset/package.py
+++ b/var/spack/repos/builtin/packages/py-intbitset/package.py
@@ -20,4 +20,6 @@ class PyIntbitset(PythonPackage):
version("3.0.1", sha256="f1e6d03c6729922a223c51849df65b9e916e625aefb911784e7f9acd4c207d53")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-intel-openmp/package.py b/var/spack/repos/builtin/packages/py-intel-openmp/package.py
index bfb28c441c..5fdfe9449b 100644
--- a/var/spack/repos/builtin/packages/py-intel-openmp/package.py
+++ b/var/spack/repos/builtin/packages/py-intel-openmp/package.py
@@ -23,7 +23,6 @@ class PyIntelOpenmp(PythonPackage):
"2021.1.2",
url="https://pypi.io/packages/py2.py3/i/intel-openmp/intel_openmp-2021.1.2-py2.py3-none-manylinux1_x86_64.whl",
sha256="8796797ecae99f39b27065e4a7f1f435e2ca08afba654ca57a77a2717f864dca",
- expand=False,
)
if sys.platform.startswith("darwin"):
@@ -31,5 +30,4 @@ class PyIntelOpenmp(PythonPackage):
"2021.1.2",
url="https://pypi.io/packages/py2.py3/i/intel-openmp/intel_openmp-2021.1.2-py2.py3-none-macosx_10_15_x86_64.whl",
sha256="2af893738b4b06cb0183746f2992169111031340b59c84a0fd4dec1ed66b80f2",
- expand=False,
)
diff --git a/var/spack/repos/builtin/packages/py-interlap/package.py b/var/spack/repos/builtin/packages/py-interlap/package.py
new file mode 100644
index 0000000000..0990810990
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-interlap/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyInterlap(PythonPackage):
+ """interlap: fast, simple interval overlap"""
+
+ homepage = "https://brentp.github.io/interlap/index.html"
+ pypi = "interlap/interlap-0.2.7.tar.gz"
+
+ maintainers("snehring")
+
+ license("MIT", checked_by="snehring")
+
+ version("0.2.7", sha256="31e4f30c54b067c4939049f5d8131ae5e2fa682ec71aa56f89c0e5b900806ec9")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-invoke/package.py b/var/spack/repos/builtin/packages/py-invoke/package.py
index 53c54538aa..91b01f47cd 100644
--- a/var/spack/repos/builtin/packages/py-invoke/package.py
+++ b/var/spack/repos/builtin/packages/py-invoke/package.py
@@ -14,8 +14,10 @@ class PyInvoke(PythonPackage):
license("BSD-2-Clause")
+ version("2.2.0", sha256="ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5")
version("1.4.1", sha256="de3f23bfe669e3db1085789fd859eb8ca8e0c5d9c20811e2407fa042e8a5e15d")
version("1.2.0", sha256="dc492f8f17a0746e92081aec3f86ae0b4750bf41607ea2ad87e5a7b5705121b7")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
+ depends_on("python@3.6:", type=("build", "run"), when="@2:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-ipykernel/package.py b/var/spack/repos/builtin/packages/py-ipykernel/package.py
index 2357fbb56d..b46ac89868 100644
--- a/var/spack/repos/builtin/packages/py-ipykernel/package.py
+++ b/var/spack/repos/builtin/packages/py-ipykernel/package.py
@@ -13,8 +13,18 @@ class PyIpykernel(PythonPackage):
homepage = "https://github.com/ipython/ipykernel"
pypi = "ipykernel/ipykernel-5.3.4.tar.gz"
+ maintainers("ChristopherChristofi")
+
license("BSD-3-Clause")
+ version("6.29.5", sha256="f093a22c4a40f8828f8e330a9c297cb93dcab13bd9678ded6de8e5cf81c56215")
+ version("6.29.4", sha256="3d44070060f9475ac2092b760123fadf105d2e2493c24848b6691a7c4f42af5c")
+ version("6.28.0", sha256="69c11403d26de69df02225916f916b37ea4b9af417da0a8c827f84328d88e5f3")
+ version("6.27.1", sha256="7d5d594b6690654b4d299edba5e872dc17bb7396a8d0609c97cb7b8a1c605de6")
+ version("6.26.0", sha256="553856658eb8430bbe9653ea041a41bff63e9606fc4628873fc92a6cf3abd404")
+ version("6.25.2", sha256="f468ddd1f17acb48c8ce67fcfa49ba6d46d4f9ac0438c1f441be7c3d1372230b")
+ version("6.24.0", sha256="29cea0a716b1176d002a61d0b0c851f34536495bc4ef7dd0222c88b41b816123")
+ version("6.23.3", sha256="dd4e18116357f36a1e459b3768412371bee764c51844cbf25c4ed1eb9cae4a54")
version("6.23.1", sha256="1aba0ae8453e15e9bc6b24e497ef6840114afcdb832ae597f32137fa19d42a6f")
version("6.22.0", sha256="302558b81f1bc22dc259fb2a0c5c7cf2f4c0bdb21b50484348f7bafe7fb71421")
version("6.16.0", sha256="7fe42c0d58435e971dc15fd42189f20d66bf35f3056bda4f6554271bc1fa3d0d")
@@ -28,52 +38,114 @@ class PyIpykernel(PythonPackage):
version("5.3.4", sha256="9b2652af1607986a1b231c62302d070bc0534f564c393a5d9d130db9abbbe89d")
version("5.1.1", sha256="f0e962052718068ad3b1d8bcc703794660858f58803c3798628817f492a8769c")
version("5.1.0", sha256="0fc0bf97920d454102168ec2008620066878848fcfca06c22b669696212e292f")
- version("4.10.0", sha256="699103c8e64886e3ec7053f2a6aa83bb90426063526f63a818732ff385202bad")
- version("4.5.0", sha256="245a798edb8fd751b95750d8645d736dd739a020e7fc7d5627dac4d1c35d8295")
- version("4.4.1", sha256="6d48398b3112efb733b254edede4b7f3262c28bd19f665b64ef1acf6ec5cd74f")
- version("4.4.0", sha256="d516427c3bd689205e6693c9616302ef34017b91ada3c9ea3fca6e90702b7ffe")
- version("4.3.1", sha256="8219d3eaa3e4d4efc5f349114e41a40f0986c91a960846bb81d5da817fb7cc3f")
- version("4.3.0", sha256="f214c661328c836e02b6f185f98f3eccd7ce396791937493ffa1babf5e3267ab")
- version("4.2.2", sha256="a876da43e01acec2c305abdd8e6aa55f052bab1196171ccf1cb9a6aa230298b0")
- version("4.2.1", sha256="081a5d4db33db58697be2d682b92f79b2c239493445f13dd457c15bc3e52c874")
- version("4.2.0", sha256="723b3d4baac20f0c9cd91fc75c3e813636ecb6c6e303fb34d628c3df078985a7")
- version("4.1.1", sha256="d8c5555386d0f18f1336dea9800f9f0fe96dcecc9757c0f980e11fdfadb661ff")
- version("4.1.0", sha256="e0e150ad55e487e49054efc9a4b0e2e17f27e1de77444b26760789077b146d86")
-
- depends_on("python@3.8:", when="@6.22:", type=("build", "run"))
+ version(
+ "4.10.0",
+ sha256="699103c8e64886e3ec7053f2a6aa83bb90426063526f63a818732ff385202bad",
+ deprecated=True,
+ )
+ version(
+ "4.5.0",
+ sha256="245a798edb8fd751b95750d8645d736dd739a020e7fc7d5627dac4d1c35d8295",
+ deprecated=True,
+ )
+ version(
+ "4.4.1",
+ sha256="6d48398b3112efb733b254edede4b7f3262c28bd19f665b64ef1acf6ec5cd74f",
+ deprecated=True,
+ )
+ version(
+ "4.4.0",
+ sha256="d516427c3bd689205e6693c9616302ef34017b91ada3c9ea3fca6e90702b7ffe",
+ deprecated=True,
+ )
+ version(
+ "4.3.1",
+ sha256="8219d3eaa3e4d4efc5f349114e41a40f0986c91a960846bb81d5da817fb7cc3f",
+ deprecated=True,
+ )
+ version(
+ "4.3.0",
+ sha256="f214c661328c836e02b6f185f98f3eccd7ce396791937493ffa1babf5e3267ab",
+ deprecated=True,
+ )
+ version(
+ "4.2.2",
+ sha256="a876da43e01acec2c305abdd8e6aa55f052bab1196171ccf1cb9a6aa230298b0",
+ deprecated=True,
+ )
+ version(
+ "4.2.1",
+ sha256="081a5d4db33db58697be2d682b92f79b2c239493445f13dd457c15bc3e52c874",
+ deprecated=True,
+ )
+ version(
+ "4.2.0",
+ sha256="723b3d4baac20f0c9cd91fc75c3e813636ecb6c6e303fb34d628c3df078985a7",
+ deprecated=True,
+ )
+ version(
+ "4.1.1",
+ sha256="d8c5555386d0f18f1336dea9800f9f0fe96dcecc9757c0f980e11fdfadb661ff",
+ deprecated=True,
+ )
+ version(
+ "4.1.0",
+ sha256="e0e150ad55e487e49054efc9a4b0e2e17f27e1de77444b26760789077b146d86",
+ deprecated=True,
+ )
+
depends_on("py-hatchling@1.4:", when="@6.13.1:", type="build")
- depends_on("py-debugpy@1.6.5:", when="@6.22:", type=("build", "run"))
- depends_on("py-debugpy@1:", when="@6.11:", type=("build", "run"))
- depends_on("py-debugpy@1.0:1", when="@6:6.10", type=("build", "run"))
- depends_on("py-ipython@7.23.1:", when="@6.5.1:", type=("build", "run"))
- depends_on("py-ipython@7.23.1:7", when="@6.0.0:6.5.0", type=("build", "run"))
- depends_on("py-ipython@5.0:", when="@5", type=("build", "run"))
- depends_on("py-ipython@4.0:", when="@:4", type=("build", "run"))
- depends_on("py-comm@0.1.1:", when="@6.22:", type=("build", "run"))
- depends_on("py-traitlets@5.4:", when="@6.22:", type=("build", "run"))
- depends_on("py-traitlets@5.1:", when="@6.11:", type=("build", "run"))
- depends_on("py-traitlets@5.1.0:5", when="@6.5:6.10", type=("build", "run"))
- depends_on("py-traitlets@4.1.0:5", when="@6.0:6.4", type=("build", "run"))
- depends_on("py-traitlets@4.1.0:", type=("build", "run"))
- depends_on("py-jupyter-client@6.1.12:", when="@6.11:", type=("build", "run"))
- depends_on("py-jupyter-client@:7", when="@6.2:6.10", type=("build", "run"))
- depends_on("py-jupyter-client@:6", when="@6.0.2:6.1", type=("build", "run"))
- depends_on("py-jupyter-client", type=("build", "run"))
- depends_on("py-jupyter-core@4.12:", when="@6.22:", type=("build", "run"))
- depends_on("py-nest-asyncio", when="@6.6.1:", type=("build", "run"))
- depends_on("py-tornado@6.1:", when="@6.11:", type=("build", "run"))
- depends_on("py-tornado@5:6", when="@6.10", type=("build", "run"))
- depends_on("py-tornado@4.2:6", when="@6:6.9", type=("build", "run"))
- depends_on("py-tornado@4.2:", when="@5", type=("build", "run"))
- depends_on("py-tornado@4:", when="@:4", type=("build", "run"))
- depends_on("py-matplotlib-inline@0.1:", when="@6.11:", type=("build", "run"))
- depends_on("py-matplotlib-inline@0.1.0:0.1", when="@6:6.10", type=("build", "run"))
- depends_on("py-appnope", when="@5.1.3: platform=darwin", type=("build", "run"))
- depends_on("py-pyzmq@20:", when="@6.22:", type=("build", "run"))
- depends_on("py-pyzmq@17:", when="@6.15:", type=("build", "run"))
- depends_on("py-psutil", when="@6.9.2:", type=("build", "run"))
- depends_on("py-packaging", when="@6.12:", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("python@3.8:", when="@6.11:")
+ depends_on("python@3.8:3.11", when="@6:6.10")
+ depends_on("python@3.6:3.9", when="@5.5:5")
+ depends_on("python@3.5:3.8", when="@5.4")
+ depends_on("python@3.5:3.7", when="@5:5.3")
+ # depends_on("python@3.4:3.5", when="@4")
+
+ with when("@6:"):
+ depends_on("py-debugpy@1.6.5:", when="@6.22:")
+ depends_on("py-debugpy@1:")
+ depends_on("py-debugpy@:1", when="@:6.10")
+
+ depends_on("py-matplotlib-inline@0.1:")
+ depends_on("py-matplotlib-inline@:0.1", when="@:6.10")
+
+ depends_on("py-ipython@7.23.1:", when="@6.5.1:")
+ depends_on("py-ipython@7.23.1:7", when="@6:6.5.0")
+ depends_on("py-ipython@5:", when="@5:")
+ depends_on("py-ipython@4:")
+ depends_on("py-ipython@:7", when="@:6.5")
+
+ depends_on("py-comm@0.1.1:", when="@6.22:")
+
+ depends_on("py-traitlets@5.4:", when="@6.22:")
+ depends_on("py-traitlets@5.1:", when="@6.5:")
+ depends_on("py-traitlets@4.1.0:")
+ depends_on("py-traitlets@:5", when="@:6.10")
+
+ depends_on("py-jupyter-client@6.1.12:", when="@6.11:")
+ depends_on("py-jupyter-client")
+ depends_on("py-jupyter-client@:7", when="@:6.10")
+ depends_on("py-jupyter-client@:6", when="@:6.1")
+
+ depends_on("py-jupyter-core@4.12:", when="@6.22:")
+
+ depends_on("py-nest-asyncio", when="@6.6.1:")
+
+ depends_on("py-tornado@6.1:", when="@6.11:")
+ depends_on("py-tornado@5:", when="@6.10:")
+ depends_on("py-tornado@4.2:", when="@5:")
+ depends_on("py-tornado@4:")
+ depends_on("py-tornado@:6", when="@:6.10")
+
+ depends_on("py-appnope", when="@5.1.3: platform=darwin")
+ depends_on("py-pyzmq@24:", when="@6.28:")
+ depends_on("py-pyzmq@20:", when="@6.22:")
+ depends_on("py-pyzmq@17:", when="@6.15:")
+ depends_on("py-psutil", when="@6.9.2:")
+ depends_on("py-packaging", when="@6.12:")
conflicts("^py-jupyter-core@5.0")
@@ -89,4 +161,4 @@ class PyIpykernel(PythonPackage):
@run_after("install")
def install_data(self):
"""install the Jupyter kernel spec"""
- self.spec["python"].command("-m", "ipykernel", "install", "--prefix=" + self.prefix)
+ python("-m", "ipykernel", "install", "--prefix=" + self.prefix)
diff --git a/var/spack/repos/builtin/packages/py-ipympl/package.py b/var/spack/repos/builtin/packages/py-ipympl/package.py
index c83d6392b0..a45799610d 100644
--- a/var/spack/repos/builtin/packages/py-ipympl/package.py
+++ b/var/spack/repos/builtin/packages/py-ipympl/package.py
@@ -15,16 +15,37 @@ class PyIpympl(PythonPackage):
license("BSD-3-Clause")
- version("0.8.8", sha256="5bf5d780b07fafe7924922ac6b2f3abd22721f341e5e196b3b82737dfbd0e1c9")
-
- depends_on("py-setuptools@40.8:", type="build")
- depends_on("py-ipython@:8", type=("build", "run"))
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-ipython-genutils", type=("build", "run"))
- depends_on("pil", type=("build", "run"))
- depends_on("py-traitlets@:5", type=("build", "run"))
- depends_on("py-ipywidgets@7.6:7", type=("build", "run"))
- depends_on("py-matplotlib@2:3", type=("build", "run"))
- depends_on("py-jupyter-packaging@0.7", type="build")
- depends_on("py-jupyterlab@3", type="build")
- depends_on("yarn", type="build")
+ version("0.9.4", sha256="cfb53c5b4fcbcee6d18f095eecfc6c6c474303d5b744e72cc66e7a2804708907")
+ # Build failures
+ version(
+ "0.8.8",
+ sha256="5bf5d780b07fafe7924922ac6b2f3abd22721f341e5e196b3b82737dfbd0e1c9",
+ deprecated=True,
+ )
+
+ with default_args(type="build"):
+ with when("@0.9:"):
+ depends_on("py-hatchling")
+ depends_on("py-jupyterlab@4")
+ depends_on("py-hatch-nodejs-version@0.3.2:")
+
+ # Historical dependencies
+ with when("@:0.8"):
+ depends_on("py-jupyter-packaging@0.7")
+ depends_on("py-jupyterlab@3")
+ depends_on("py-setuptools@40.8:")
+ depends_on("yarn")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-ipython@:8")
+ depends_on("py-ipython-genutils")
+ depends_on("py-ipywidgets@7.6:8", when="@0.9:")
+ depends_on("py-ipywidgets@7.6:7", when="@:0.8")
+ depends_on("py-matplotlib@3.4:3", when="@0.9:")
+ depends_on("py-matplotlib@2:3", when="@:0.8")
+ depends_on("py-numpy")
+ depends_on("pil")
+ depends_on("py-traitlets@:5")
+
+ # Necessary for jupyter extension env vars
+ depends_on("py-jupyter-core")
diff --git a/var/spack/repos/builtin/packages/py-ipyrad/package.py b/var/spack/repos/builtin/packages/py-ipyrad/package.py
index 0e0c3fa309..b1ede89ae5 100644
--- a/var/spack/repos/builtin/packages/py-ipyrad/package.py
+++ b/var/spack/repos/builtin/packages/py-ipyrad/package.py
@@ -17,6 +17,9 @@ class PyIpyrad(PythonPackage):
license("GPL-3.0-only")
+ version("0.9.93", sha256="7f42396c0baa284dde0e9896270006f3c7e2211fa93bb149decccd39b4ab557e")
+ version("0.9.92", sha256="f9cb5eca40d5fc1d93364815af7608d0b2e89fcf675724541a50e7159617395f")
+ version("0.9.91", sha256="0308b829a8995db90608e8f45b76709d394d9153ec5edee568acdd41ecfab59c")
version("0.9.90", sha256="8b95aa3bae30da15baba90abb03176932411ff708c54d5e4481b811cceb8a4a8")
version("0.9.85", sha256="17b07466531655db878919e426743ac649cfab2e92c06c4e45f76ee1517633f9")
@@ -30,7 +33,10 @@ class PyIpyrad(PythonPackage):
depends_on("py-notebook", type=("build", "run"))
depends_on("samtools", type=("build", "run"))
depends_on("vsearch", type=("build", "run"))
- depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-numpy@:1.23", when="@:0.9.90", type=("build", "run"))
+ # https://github.com/spack/spack/pull/42098 indicates 0.9.90 and below use
+ # np.int and related functions, deprecated in 1.20 and expired in 1.24.
+ depends_on("py-numpy", when="@0.9.91:", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-pandas", type=("build", "run"))
depends_on("py-h5py", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py
index d1f1044e76..7ce1a3b013 100644
--- a/var/spack/repos/builtin/packages/py-ipython/package.py
+++ b/var/spack/repos/builtin/packages/py-ipython/package.py
@@ -22,6 +22,20 @@ class PyIpython(PythonPackage):
license("BSD-3-Clause")
+ version("8.28.0", sha256="0d0d15ca1e01faeb868ef56bc7ee5a0de5bd66885735682e8a322ae289a13d1a")
+ version("8.27.0", sha256="0b99a2dc9f15fd68692e898e5568725c6d49c527d36a9fb5960ffbdeaa82ff7e")
+ version("8.26.0", sha256="1cec0fbba8404af13facebe83d04436a7434c7400e59f47acf467c64abd0956c")
+ version("8.25.0", sha256="c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716")
+ version("8.24.0", sha256="010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501")
+ version("8.23.0", sha256="7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d")
+ version("8.22.2", sha256="2dcaad9049f9056f1fef63514f176c7d41f930daa78d05b82a176202818f2c14")
+ version("8.21.0", sha256="48fbc236fbe0e138b88773fa0437751f14c3645fb483f1d4c5dee58b37e5ce73")
+ version("8.20.0", sha256="2f21bd3fc1d51550c89ee3944ae04bbc7bc79e129ea0937da6e6c68bfdbf117a")
+ version("8.19.0", sha256="ac4da4ecf0042fb4e0ce57c60430c2db3c719fa8bdf92f8631d6bd8a5785d1f0")
+ version("8.18.1", sha256="ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27")
+ version("8.17.2", sha256="126bb57e1895594bb0d91ea3090bbd39384f6fe87c3d57fd558d0670f50339bb")
+ version("8.16.1", sha256="ad52f58fca8f9f848e256c629eff888efc0528c12fe0f8ec14f33205f23ef938")
+ version("8.15.0", sha256="2baeb5be6949eeebf532150f81746f8333e2ccce02de1c7eedde3f23ed5e9f1e")
version("8.14.0", sha256="1d197b907b6ba441b692c48cf2a3a2de280dc0ac91a3405b39349a50272ca0a1")
version("8.11.0", sha256="735cede4099dbc903ee540307b9171fbfef4aa75cfcacc5a273b2cda2f02be04")
version("8.5.0", sha256="097bdf5cd87576fd066179c9f7f208004f7a6864ee1b20f37d346c0bcb099f84")
@@ -37,26 +51,25 @@ class PyIpython(PythonPackage):
version("5.8.0", sha256="4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906")
version("5.1.0", sha256="7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961")
+ depends_on("python@3.10:", when="@8.19:", type=("build", "run"))
depends_on("python@3.9:", when="@8.13.1:", type=("build", "run"))
- depends_on("python@3.8:", when="@8:", type=("build", "run"))
+ depends_on("python@3.8: +sqlite3", when="@8:", type=("build", "run"))
+ depends_on("py-setuptools@61.2:", when="@8.22:", type="build")
depends_on("py-setuptools@51:", when="@8:", type="build")
depends_on("py-setuptools@18.5:", when="@:7", type="run")
depends_on("py-setuptools", type="build")
- depends_on("py-appnope", when="platform=darwin", type=("build", "run"))
- depends_on("py-backcall", when="@7.3.0:", type=("build", "run"))
depends_on("py-colorama", when="platform=windows", type=("build", "run"))
depends_on("py-decorator", type=("build", "run"))
- depends_on("py-jedi@0.16:", when="@7.18,7.20:", type=("build", "run"))
+ depends_on("py-exceptiongroup", when="@8.15: ^python@:3.10", type=("build", "run"))
+ depends_on("py-jedi@0.16:0.18", when="@7.18,7.20:", type=("build", "run"))
depends_on("py-jedi@0.10:", when="@7.5:7.17,7.19", type=("build", "run"))
depends_on("py-matplotlib-inline", when="@7.23:", type=("build", "run"))
depends_on("py-pexpect@4.4:", when="@7.18: platform=linux", type=("build", "run"))
depends_on("py-pexpect@4.4:", when="@7.18: platform=darwin", type=("build", "run"))
- depends_on("py-pexpect@4.4:", when="@7.18: platform=cray", type=("build", "run"))
depends_on("py-pexpect", when="platform=linux", type=("build", "run"))
depends_on("py-pexpect", when="platform=darwin", type=("build", "run"))
- depends_on("py-pexpect", when="platform=cray", type=("build", "run"))
- depends_on("py-pickleshare", type=("build", "run"))
+ depends_on("py-prompt-toolkit@3.0.41:3.0", when="@8.18.1:", type=("build", "run"))
depends_on("py-prompt-toolkit@3.0.30:3.0.36,3.0.38:3.0", when="@8.11:", type=("build", "run"))
depends_on("py-prompt-toolkit@3.0.2:3.0", when="@8.5:", type=("build", "run"))
depends_on("py-prompt-toolkit@2.0.0:2,3.0.2:3.0", when="@7.26:", type=("build", "run"))
@@ -68,11 +81,17 @@ class PyIpython(PythonPackage):
depends_on("py-pygments@2.4:", when="@8.1:", type=("build", "run"))
depends_on("py-pygments", type=("build", "run"))
depends_on("py-stack-data", when="@8:", type=("build", "run"))
+ depends_on("py-traitlets@5.13:", when="@8.22.1:", type=("build", "run"))
depends_on("py-traitlets@5:", when="@8:", type=("build", "run"))
depends_on("py-traitlets@4.2:", type=("build", "run"))
depends_on("py-traitlets", type=("build", "run"))
+ depends_on("py-typing-extensions@4.6:", when="@8.24: ^python@:3.11", type=("build", "run"))
+ depends_on("py-typing-extensions", when="@8.23: ^python@:3.11", type=("build", "run"))
depends_on("py-typing-extensions", when="@8.12: ^python@:3.9", type=("build", "run"))
# Historical dependencies
+ depends_on("py-appnope", when="@:8.17 platform=darwin", type=("build", "run"))
+ depends_on("py-backcall", when="@7.3.0:8.16", type=("build", "run"))
depends_on("py-black", when="@8.0", type=("build", "run"))
+ depends_on("py-pickleshare", when="@:8.16", type=("build", "run"))
depends_on("py-simplegeneric@0.8:", when="@:7.0.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ipyvue/package.py b/var/spack/repos/builtin/packages/py-ipyvue/package.py
new file mode 100644
index 0000000000..7f9230786b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ipyvue/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyIpyvue(PythonPackage):
+ """
+ Jupyter widgets base for Vue libraries.
+ """
+
+ homepage = "https://github.com/widgetti/ipyvue"
+ pypi = "ipyvue/ipyvue-1.10.1.tar.gz"
+
+ license("MIT")
+
+ maintainers("jeremyfix")
+
+ version("1.10.1", sha256="20615ce86ba516cf0b7aad84cc607e4e2c9104232e954cd0eccbf33530a5e1d4")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-ipywidgets@7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ipyvuetify/package.py b/var/spack/repos/builtin/packages/py-ipyvuetify/package.py
new file mode 100644
index 0000000000..a0706c0b3d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ipyvuetify/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyIpyvuetify(PythonPackage):
+ """
+ Jupyter widgets based on vuetify UI components which implement Google's
+ Material Design Spec with the Vue.js framework.
+ """
+
+ homepage = "https://github.com/widgetti/ipyvuetify/tree/master"
+ pypi = "ipyvuetify/ipyvuetify-1.9.0.tar.gz"
+
+ license("MIT")
+
+ maintainers("jeremyfix")
+
+ version("1.9.0", sha256="9c537e218299de32194b1da949d6b96bffe6c00f36bb6035409f2485feb881e7")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools@40.8.0:", type="build")
+
+ depends_on("py-jupyter-packaging@0.7.9:0.7", type="build")
+ depends_on("py-jupyterlab@3", type="build")
+ depends_on("py-pynpm", type="build")
+ depends_on("py-ipyvue@1.7:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-isal/package.py b/var/spack/repos/builtin/packages/py-isal/package.py
index 1a8bbcb444..0d8ecf1659 100644
--- a/var/spack/repos/builtin/packages/py-isal/package.py
+++ b/var/spack/repos/builtin/packages/py-isal/package.py
@@ -19,6 +19,8 @@ class PyIsal(PythonPackage):
version("1.1.0", sha256="1364f4e3255a57d51c01422ab3ae785a43c076d516ebf49f6a25adecf8232105")
version("1.0.0", sha256="a30369de6852109eef8ca1bdd46d7e4b5c4517846a25acfc707cbb19db66ac80")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools@51:", type="build")
depends_on("libisal")
diff --git a/var/spack/repos/builtin/packages/py-itk/package.py b/var/spack/repos/builtin/packages/py-itk/package.py
index b76245a204..92e89c09eb 100644
--- a/var/spack/repos/builtin/packages/py-itk/package.py
+++ b/var/spack/repos/builtin/packages/py-itk/package.py
@@ -15,13 +15,14 @@ class PyItk(PythonPackage):
homepage = "https://itk.org/"
+ skip_version_audit = ["platform=windows"]
+
if sys.platform == "darwin":
# version 5.1.1
version(
"5.1.1-cp38",
url="https://pypi.io/packages/cp35/i/itk/itk-5.1.1-cp38-cp38-macosx_10_9_x86_64.whl",
sha256="94b09ab9dd59ceaecc456ede2b719a44b8f0d54d92409eede372c6004395ae7b",
- expand=False,
)
# version 5.1.2
@@ -29,13 +30,11 @@ class PyItk(PythonPackage):
"5.1.2-cp38",
url="https://pypi.io/packages/cp38/i/itk/itk-5.1.2-cp38-cp38-macosx_10_9_x86_64.whl",
sha256="e8dec75b4452bd2ee65beb4901b245fc3a2a2ccc46dfa008ae0b5b757718d458",
- expand=False,
)
version(
"5.1.2-cp39",
url="https://pypi.io/packages/cp39/i/itk/itk-5.1.2-cp39-cp39-macosx_10_9_x86_64.whl",
sha256="e8dec75b4452bd2ee65beb4901b245fc3a2a2ccc46dfa008ae0b5b757718d458",
- expand=False,
)
# version 5.3.0
@@ -43,25 +42,21 @@ class PyItk(PythonPackage):
"5.3.0-cp38",
url="https://pypi.io/packages/cp38/i/itk/itk-5.3.0-cp38-cp38-macosx_10_9_x86_64.whl",
sha256="1fbcde6f6612b13d2934722707fd7194b1d5900a655efa191dfc130bbb94df09",
- expand=False,
)
version(
"5.3.0-cp39",
url="https://pypi.io/packages/cp39/i/itk/itk-5.3.0-cp39-cp39-macosx_10_9_x86_64.whl",
sha256="155581581929dfe834af6c6233a8c83e2ca2b1f52d6c7b2c81f04dc249aab1a5",
- expand=False,
)
version(
"5.3.0-cp310",
url="https://pypi.io/packages/cp310/i/itk/itk-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl",
sha256="f92ec860173c82eb458764b4b5b771783b690c3aa3a01d15c6f3d008fc2bb493",
- expand=False,
)
version(
"5.3.0-cp311",
url="https://pypi.io/packages/cp311/i/itk/itk-5.3.0-cp311-cp311-macosx_10_9_x86_64.whl",
sha256="9dcfd9721ff6022e91eb98dc4004d437de2912dfd50d707d1ee72b89c334a3d4",
- expand=False,
)
elif sys.platform.startswith("linux"):
# version 5.1.1
@@ -69,7 +64,6 @@ class PyItk(PythonPackage):
"5.1.1-cp38",
url="https://pypi.io/packages/cp38/i/itk/itk-5.1.1-cp38-cp38-manylinux1_x86_64.whl",
sha256="14cd6c3a25f0d69f45eda74b006eceeaf8e2b2fcbe7c343e49683edf97e0fb14",
- expand=False,
)
# version 5.1.2
@@ -77,13 +71,11 @@ class PyItk(PythonPackage):
"5.1.2-cp38",
url="https://pypi.io/packages/cp38/i/itk/itk-5.1.2-cp38-cp38-manylinux1_x86_64.whl",
sha256="fe9225ac353116f4000c0a3440bf151200beb4a65deec5b2e626edda5b498f16",
- expand=False,
)
version(
"5.1.2-cp39",
url="https://pypi.io/packages/cp39/i/itk/itk-5.1.2-cp39-cp39-manylinux1_x86_64.whl",
sha256="5781b74410b7189a825c89d370411595e5e3d5dbb480201907f751f26698df83",
- expand=False,
)
# version 5.3.0
@@ -91,25 +83,21 @@ class PyItk(PythonPackage):
"5.3.0-cp38",
url="https://pypi.io/packages/cp38/i/itk/itk-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl",
sha256="d83dc2b0f5d673226ef6eacac012d1da6dd36c6126f2b3cffc7ed62231c29bf2",
- expand=False,
)
version(
"5.3.0-cp39",
url="https://pypi.io/packages/cp39/i/itk/itk-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl",
sha256="bcc4449f2df35224cbc26472475d2afeb8a92886a81db950b2305f911bc2a38c",
- expand=False,
)
version(
"5.3.0-cp310",
url="https://pypi.io/packages/cp310/i/itk/itk-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl",
sha256="272708ee5ed5d09a519b2e98ac9c130f3146630257506ea440c83501c16f9580",
- expand=False,
)
version(
"5.3.0-cp311",
url="https://pypi.io/packages/cp311/i/itk/itk-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl",
sha256="ba8361a8ed1c5462e690ee893f624c0babb7a1072a15609c26790eea717e3f77",
- expand=False,
)
depends_on("python@3.8.0:3.8", when="@5.1.1-cp38,5.1.2-cp38,5.3.0-cp38", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jacobi/package.py b/var/spack/repos/builtin/packages/py-jacobi/package.py
new file mode 100644
index 0000000000..9867d8bb8b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jacobi/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJacobi(PythonPackage):
+ """Fast numerical derivatives for analytic functions
+ with arbitrary round-off error and error propagation."""
+
+ homepage = "https://github.com/hdembinski/jacobi"
+ pypi = "jacobi/jacobi-0.9.2.tar.gz"
+
+ maintainers("jonas-eschle")
+ license("MIT", checked_by="jonas-eschle")
+
+ version("0.9.2", sha256="c11f481663246ef1c2da915b9f9ab4ef229051fb14e0afc232d4668301320828")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build")
+ depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-janus/package.py b/var/spack/repos/builtin/packages/py-janus/package.py
new file mode 100644
index 0000000000..62f2771111
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-janus/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJanus(PythonPackage):
+ """Thread-safe asyncio-aware queue for Python"""
+
+ homepage = "https://github.com/aio-libs/janus"
+ pypi = "janus/janus-1.0.0.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ version("1.0.0", sha256="df976f2cdcfb034b147a2d51edfc34ff6bfb12d4e2643d3ad0e10de058cb1612")
+ version("0.7.0", sha256="f10dcf5776e8d49cc30ec86d5eb7268eeec39abaa24fe0332ee8fb8fa3611845")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools@51:", type="build")
+ depends_on("py-wheel@0.36:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-jarowinkler/package.py b/var/spack/repos/builtin/packages/py-jarowinkler/package.py
index 1ae633e44e..8974c1dc58 100644
--- a/var/spack/repos/builtin/packages/py-jarowinkler/package.py
+++ b/var/spack/repos/builtin/packages/py-jarowinkler/package.py
@@ -18,6 +18,8 @@ class PyJarowinkler(PythonPackage):
version("1.2.3", sha256="af28ea284cfbd1b21b29ff94b759f20e94e4f7c06f424b0b4702e701c2a21668")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@42:", type="build")
depends_on("py-scikit-build@0.15.0", type="build")
depends_on("py-rapidfuzz-capi@1.0.5", type="build")
diff --git a/var/spack/repos/builtin/packages/py-jarvis-util/package.py b/var/spack/repos/builtin/packages/py-jarvis-util/package.py
index 48bab75678..beb3554e94 100644
--- a/var/spack/repos/builtin/packages/py-jarvis-util/package.py
+++ b/var/spack/repos/builtin/packages/py-jarvis-util/package.py
@@ -17,6 +17,7 @@ class PyJarvisUtil(PythonPackage):
url = "https://github.com/scs-lab/jarvis-util/archive/refs/tags/v0.0.1.tar.gz"
maintainers("lukemartinlogan", "hyoklee")
+ version("master", branch="master")
version("0.0.1", sha256="1c5fbbfec410f1df8dc28edc87dd4421c3708f5bd22bf7ef010138d5c4a1ff8f")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-jax/package.py b/var/spack/repos/builtin/packages/py-jax/package.py
index 76c6ce28e7..499b906573 100644
--- a/var/spack/repos/builtin/packages/py-jax/package.py
+++ b/var/spack/repos/builtin/packages/py-jax/package.py
@@ -19,29 +19,111 @@ class PyJax(PythonPackage):
arbitrarily to any order."""
homepage = "https://github.com/google/jax"
- pypi = "jax/jax-0.2.25.tar.gz"
+ pypi = "jax/jax-0.4.27.tar.gz"
license("Apache-2.0")
+ maintainers("adamjstewart", "jonas-eschle")
+ version("0.4.31", sha256="fd2d470643a0073d822737f0788f71391656af7e62cc5b2e7995ee390ceac287")
+ version("0.4.30", sha256="94d74b5b2db0d80672b61d83f1f63ebf99d2ab7398ec12b2ca0c9d1e97afe577")
+ version("0.4.29", sha256="12904571eaefddcdc8c3b8d4936482b783d5a216e99ef5adcd3522fdfb4fc186")
+ version("0.4.28", sha256="dcf0a44aff2e1713f0a2b369281cd5b79d8c18fc1018905c4125897cb06b37e9")
+ version("0.4.27", sha256="f3d7f19bdc0a17ccdb305086099a5a90c704f904d4272a70debe06ae6552998c")
+ version("0.4.26", sha256="2cce025d0a279ec630d550524749bc8efe25d2ff47240d2a7d4cfbc5090c5383")
+ version("0.4.25", sha256="a8ee189c782de2b7b2ffb64a8916da380b882a617e2769aa429b71d79747b982")
+ version("0.4.24", sha256="4a6b6fd026ddd22653c7fa2fac1904c3de2dbe845b61ede08af9a5cc709662ae")
+ version("0.4.23", sha256="2a229a5a758d1b803891b2eaed329723f6b15b4258b14dc0ccb1498c84963685")
+ version("0.4.22", sha256="801434dda6e14f82a45fff753969a33281ab22fb2a50fe801b651390321057ba")
+ version("0.4.21", sha256="c97fd0d2751d6e1eb15aa2052ff7cfdc129f8fafc2c14cd779720658926a587b")
+ version("0.4.20", sha256="ea96a763a8b1a9374639d1159ab4de163461d01cd022f67c34c09581b71ed2ac")
+ version("0.4.19", sha256="29f87f9a50964d3ca5eeb2973de3462f0e8b4eca6d46027894a0e9a903420601")
+ version("0.4.18", sha256="776cf33890100803e98f45f9af10aa727271c6993d4e766c069118733c928132")
+ version("0.4.17", sha256="d7508a69e87835f534cb07a2f21d79cc1cb8c4cfdcf7fb010927267ef7355f1d")
+ version("0.4.16", sha256="e2ca82c9bf973c2c1c01f5340a583692b31f277aa3abd0544229c1fe5fa44b02")
+ version("0.4.15", sha256="2aa123ccef591e355dea94a6e714b6559f8e1d6368a576a223f97d031ece0d15")
+ version("0.4.14", sha256="18fed3881f26e8b13c8cb46eeeea3dba9eb4d48e3714d8e8f2304dd6e237083d")
+ version("0.4.13", sha256="03bfe6749dfe647f16f15f6616638adae6c4a7ca7167c75c21961ecfd3a3baaa")
+ version("0.4.12", sha256="d2de9a2388ffe002f16506d3ad1cc6e34d7536b98948e49c7e05bbcfe8e57998")
+ version("0.4.11", sha256="8b1cd443b698339df8d8807578ee141e5b67e36125b3945b146f600177d60d79")
+ version("0.4.10", sha256="1bf0f2720f778f2937301a16a4d5cd3497f13a4d6c970c24a88918a81816a888")
+ version("0.4.9", sha256="1ed135cd08f48e4baf10f6eafdb4a4cdae781f9052b5838c09c91a9f4fa75f09")
+ version("0.4.8", sha256="08116481f7336db16c24812bfb5e6f9786915f4c2f6ff4028331fa69e7535202")
+ version("0.4.7", sha256="5e7002d74db25f97c99b979d4ba1233b1ef26e1597e5fc468ad11d1c8a9dc4f8")
+ version("0.4.6", sha256="d06ea8fba4ed315ec55110396058cb48c8edb2ab0b412f28c8a123beee9e58ab")
+ version("0.4.5", sha256="1633e56d34b18ddfa7d2a216ce214fa6fa712d36552532aaa71da416aede7268")
+ version("0.4.4", sha256="39b07e07343ed7c74492ee5e75db77456d3afdd038a322671f09fc748f6392cb")
version("0.4.3", sha256="d43f08f940aa30eb339965cfb3d6bee2296537b0dc2f0c65ccae3009279529ae")
- version("0.3.23", sha256="bff436e15552a82c0ebdef32737043b799e1e10124423c57a6ae6118c3a7b6cd")
- version("0.2.25", sha256="822e8d1e06257eaa0fdc4c0a0686c4556e9f33647fa2a766755f984786ae7446")
- depends_on("python@3.8:", when="@0.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.20:", when="@0.3:", type=("build", "run"))
- depends_on("py-numpy@1.18:", type=("build", "run"))
- depends_on("py-opt-einsum", type=("build", "run"))
- depends_on("py-scipy@1.5:", when="@0.3:", type=("build", "run"))
- depends_on("py-scipy@1.2.1:", type=("build", "run"))
-
- # See _minimum_jaxlib_version in jax/version.py
- jax_to_jaxlib = {"0.4.3": "0.4.2", "0.3.23": "0.3.15", "0.2.25": "0.1.69"}
-
- for jax, jaxlib in jax_to_jaxlib.items():
- depends_on(f"py-jaxlib@{jaxlib}:", when=f"@{jax}", type=("build", "run"))
-
- # Historical dependencies
- depends_on("py-absl-py", when="@:0.3", type=("build", "run"))
- depends_on("py-typing-extensions", when="@:0.3", type=("build", "run"))
- depends_on("py-etils+epath", when="@0.3", type=("build", "run"))
+
+ with default_args(type=("build", "run")):
+ # setup.py
+ depends_on("python@3.10:", when="@0.4.31:")
+ depends_on("python@3.9:", when="@0.4.14:")
+ depends_on("py-ml-dtypes@0.2:", when="@0.4.14:")
+ depends_on("py-ml-dtypes@0.1:", when="@0.4.9:")
+ depends_on("py-ml-dtypes@0.0.3:", when="@0.4.7:")
+ depends_on("py-numpy@1.24:", when="@0.4.31:")
+ depends_on("py-numpy@1.22:", when="@0.4.14:")
+ depends_on("py-numpy@1.21:", when="@0.4.7:")
+ depends_on("py-numpy@1.20:", when="@0.3:")
+ # https://github.com/google/jax/issues/19246
+ depends_on("py-numpy@:1", when="@:0.4.25")
+ depends_on("py-opt-einsum")
+ depends_on("py-scipy@1.10:", when="@0.4.31:")
+ depends_on("py-scipy@1.9:", when="@0.4.19:")
+ depends_on("py-scipy@1.7:", when="@0.4.7:")
+ depends_on("py-scipy@1.5:", when="@0.3:")
+
+ # jax/_src/lib/__init__.py
+ # https://github.com/google/jax/commit/8be057de1f50756fe7522f7e98b2f30fad56f7e4
+ for v in [
+ "0.4.31",
+ "0.4.30",
+ "0.4.29",
+ "0.4.28",
+ "0.4.27",
+ "0.4.26",
+ "0.4.25",
+ "0.4.24",
+ "0.4.23",
+ "0.4.22",
+ "0.4.21",
+ "0.4.20",
+ "0.4.19",
+ "0.4.18",
+ "0.4.17",
+ "0.4.16",
+ "0.4.15",
+ "0.4.14",
+ "0.4.13",
+ "0.4.12",
+ "0.4.11",
+ "0.4.10",
+ "0.4.9",
+ "0.4.8",
+ "0.4.7",
+ "0.4.6",
+ "0.4.5",
+ "0.4.4",
+ "0.4.3",
+ ]:
+ depends_on(f"py-jaxlib@:{v}", when=f"@{v}")
+
+ # See _minimum_jaxlib_version in jax/version.py
+ depends_on("py-jaxlib@0.4.30:", when="@0.4.31:")
+ depends_on("py-jaxlib@0.4.27:", when="@0.4.28:")
+ depends_on("py-jaxlib@0.4.23:", when="@0.4.27:")
+ depends_on("py-jaxlib@0.4.20:", when="@0.4.25:")
+ depends_on("py-jaxlib@0.4.19:", when="@0.4.21:")
+ depends_on("py-jaxlib@0.4.14:", when="@0.4.15:")
+ depends_on("py-jaxlib@0.4.11:", when="@0.4.12:")
+ depends_on("py-jaxlib@0.4.7:", when="@0.4.8:")
+ depends_on("py-jaxlib@0.4.6:", when="@0.4.7:")
+ depends_on("py-jaxlib@0.4.4:", when="@0.4.5:")
+ depends_on("py-jaxlib@0.4.2:", when="@0.4.3:")
+ depends_on("py-jaxlib@0.4.1:", when="@0.4.2:")
+
+ # Historical dependencies
+ depends_on("py-ml-dtypes@0.4:", when="@0.4.29")
+ depends_on("py-importlib-metadata@4.6:", when="@0.4.11:0.4.30 ^python@:3.9")
diff --git a/var/spack/repos/builtin/packages/py-jaxlib/jaxxlatsl.patch b/var/spack/repos/builtin/packages/py-jaxlib/jaxxlatsl.patch
new file mode 100644
index 0000000000..e96cc32e26
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jaxlib/jaxxlatsl.patch
@@ -0,0 +1,100 @@
+From 8fce7378ed8ce994107568449806cd99274ab22b Mon Sep 17 00:00:00 2001
+From: Andrew Elble <aweits@rit.edu>
+Date: Mon, 21 Oct 2024 19:42:31 -0400
+Subject: [PATCH] patchit
+
+---
+ ...ch-for-Abseil-to-fix-build-on-Jetson.patch | 68 +++++++++++++++++++
+ third_party/xla/workspace.bzl | 1 +
+ 2 files changed, 69 insertions(+)
+ create mode 100644 third_party/xla/0001-Add-patch-for-Abseil-to-fix-build-on-Jetson.patch
+
+diff --git a/third_party/xla/0001-Add-patch-for-Abseil-to-fix-build-on-Jetson.patch b/third_party/xla/0001-Add-patch-for-Abseil-to-fix-build-on-Jetson.patch
+new file mode 100644
+index 000000000000..5138a045082b
+--- /dev/null
++++ b/third_party/xla/0001-Add-patch-for-Abseil-to-fix-build-on-Jetson.patch
+@@ -0,0 +1,68 @@
++From 40da87a0476436ca1da2eafe08935787a05e9a61 Mon Sep 17 00:00:00 2001
++From: David Dunleavy <ddunleavy@google.com>
++Date: Mon, 5 Aug 2024 11:42:53 -0700
++Subject: [PATCH] Add patch for Abseil to fix build on Jetson
++
++Patches in https://github.com/abseil/abseil-cpp/commit/372124e6af36a540e74a2ec31d79d7297a831f98
++
++PiperOrigin-RevId: 659627531
++---
++ .../tsl/third_party/absl/nvidia_jetson.patch | 35 +++++++++++++++++++
++ .../tsl/third_party/absl/workspace.bzl | 1 +
++ 2 files changed, 36 insertions(+)
++ create mode 100644 third_party/tsl/third_party/absl/nvidia_jetson.patch
++
++diff --git a/third_party/tsl/third_party/absl/nvidia_jetson.patch b/third_party/tsl/third_party/absl/nvidia_jetson.patch
++new file mode 100644
++index 000000000000..5328c3a0d605
++--- /dev/null
+++++ b/third_party/tsl/third_party/absl/nvidia_jetson.patch
++@@ -0,0 +1,35 @@
+++From 372124e6af36a540e74a2ec31d79d7297a831f98 Mon Sep 17 00:00:00 2001
+++From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bastien?= <frederic.bastien@gmail.com>
+++Date: Thu, 1 Aug 2024 12:38:52 -0700
+++Subject: [PATCH] PR #1732: Fix build on NVIDIA Jetson board. Fix #1665
+++
+++Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1732
+++
+++Fix build on NVIDIA Jetson board. Fix #1665
+++
+++This patch is already used by the spark project.
+++I'm fixing this as this break the build of Tensorflow and JAX on Jetson board.
+++Merge 7db2d2ab9fbed1f0fabad10a6ec73533ba71bfff into 6b8ebb35c0414ef5a2b6fd4a0f59057e41beaff9
+++
+++Merging this change closes #1732
+++
+++COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1732 from nouiz:fix_neon_on_jetson 7db2d2ab9fbed1f0fabad10a6ec73533ba71bfff
+++PiperOrigin-RevId: 658501520
+++Change-Id: If502ede4efc8c877fb3fed227eca6dc7622dd181
+++---
+++ absl/base/config.h | 2 +-
+++ 1 file changed, 1 insertion(+), 1 deletion(-)
+++
+++diff --git a/absl/base/config.h b/absl/base/config.h
+++index 97c9a22a109..ab1e9860a91 100644
+++--- a/absl/base/config.h
++++++ b/absl/base/config.h
+++@@ -926,7 +926,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
+++ // https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code
+++ #ifdef ABSL_INTERNAL_HAVE_ARM_NEON
+++ #error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set
+++-#elif defined(__ARM_NEON) && !defined(__CUDA_ARCH__)
++++#elif defined(__ARM_NEON) && !(defined(__NVCC__) && defined(__CUDACC__))
+++ #define ABSL_INTERNAL_HAVE_ARM_NEON 1
+++ #endif
+++
++diff --git a/third_party/tsl/third_party/absl/workspace.bzl b/third_party/tsl/third_party/absl/workspace.bzl
++index 06f75166ce4b..9565a82c3319 100644
++--- a/third_party/tsl/third_party/absl/workspace.bzl
+++++ b/third_party/tsl/third_party/absl/workspace.bzl
++@@ -44,4 +44,5 @@ def repo():
++ system_link_files = SYS_LINKS,
++ strip_prefix = "abseil-cpp-{commit}".format(commit = ABSL_COMMIT),
++ urls = tf_mirror_urls("https://github.com/abseil/abseil-cpp/archive/{commit}.tar.gz".format(commit = ABSL_COMMIT)),
+++ patch_file = ["//third_party/absl:nvidia_jetson.patch"],
++ )
++--
++2.31.1
++
+diff --git a/third_party/xla/workspace.bzl b/third_party/xla/workspace.bzl
+index af52e7671507..70481bc970a5 100644
+--- a/third_party/xla/workspace.bzl
++++ b/third_party/xla/workspace.bzl
+@@ -29,6 +29,7 @@ def repo():
+ name = "xla",
+ sha256 = XLA_SHA256,
+ strip_prefix = "xla-{commit}".format(commit = XLA_COMMIT),
++ patch_file = ["//third_party/xla:0001-Add-patch-for-Abseil-to-fix-build-on-Jetson.patch"],
+ urls = tf_mirror_urls("https://github.com/openxla/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT)),
+ )
+
+--
+2.31.1
+
diff --git a/var/spack/repos/builtin/packages/py-jaxlib/package.py b/var/spack/repos/builtin/packages/py-jaxlib/package.py
index 23ddc076d4..8d894c6c5e 100644
--- a/var/spack/repos/builtin/packages/py-jaxlib/package.py
+++ b/var/spack/repos/builtin/packages/py-jaxlib/package.py
@@ -5,49 +5,135 @@
import tempfile
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
-
-class PyJaxlib(PythonPackage, CudaPackage):
+rocm_dependencies = [
+ "hsa-rocr-dev",
+ "hip",
+ "rccl",
+ "rocprim",
+ "hipcub",
+ "rocthrust",
+ "roctracer-dev",
+ "rocrand",
+ "hipsparse",
+ "hipfft",
+ "rocfft",
+ "rocblas",
+ "miopen-hip",
+ "rocminfo",
+]
+
+
+class PyJaxlib(PythonPackage, CudaPackage, ROCmPackage):
"""XLA library for Jax"""
homepage = "https://github.com/google/jax"
- url = "https://github.com/google/jax/archive/refs/tags/jaxlib-v0.1.74.tar.gz"
+ url = "https://github.com/google/jax/archive/refs/tags/jaxlib-v0.4.27.tar.gz"
tmp_path = ""
buildtmp = ""
license("Apache-2.0")
-
+ maintainers("adamjstewart", "jonas-eschle")
+
+ version("0.4.31", sha256="022ea1347f9b21cbea31410b3d650d976ea4452a48ea7317a5f91c238031bf94")
+ version("0.4.30", sha256="0ef9635c734d9bbb44fcc87df4f1c3ccce1cfcfd243572c80d36fcdf826fe1e6")
+ version("0.4.29", sha256="3a8005f4f62d35a5aad7e3dbd596890b47c81cc6e34fcfe3dcb93b3ca7cb1246")
+ version("0.4.28", sha256="4dd11577d4ba5a095fbc35258ddd4e4c020829ed6e6afd498c9e38ccbcdfe20b")
+ version("0.4.27", sha256="c2c82cd9ad3b395d5cbc0affa26a2938e52677a69ca8f0b9ef9922a52cac4f0c")
+ version("0.4.26", sha256="ddc14da1eaa34f23430d40ad9b9585088575cac439a2fa1c6833a247e1b221fd")
+ version("0.4.25", sha256="fc1197c401924942eb14185a61688d0c476e3e81ff71f9dc95e620b57c06eec8")
+ version("0.4.24", sha256="c4e6963c2c36f634a9a1765e476a1ed4e6c4a7954465ebf72e29f344c28ddc28")
+ version("0.4.23", sha256="e4c06d62ba54becffd91abc862627b8b11b79c5a77366af8843b819665b6d568")
+ version("0.4.21", sha256="8d57f66d00b9c0b824b1eff84adda5b765a412b3f316ef7c773632d1edbf9477")
+ version("0.4.20", sha256="058410d2bc12f7562c7b01e0c8cd587cb68059c12f78bc945055e5ddc445f5fd")
+ version("0.4.19", sha256="51242b217a1f82474e42d24f09ed5dedff951eeb4579c6e49e706d1adfd6949d")
+ version("0.4.16", sha256="85c8bc050abe0a2cf62e8cfc7edb4904dd3807924b5714ec6277f291c576b5ca")
+ version("0.4.14", sha256="9f309476a8f6337717b059b8d10b5859b4134c30cf8f1220bb70379b5e2744a4")
+ version("0.4.11", sha256="bdfc45f33970beba5caf28d061668a4863f05994deea26791db50ea605fc2e36")
+ version("0.4.7", sha256="0578d5dd5035b5225cadb6a62ca5f93dd76b70292268502fc01a0fd9ca7001d0")
+ version("0.4.6", sha256="2c9bf8962815bc54ef524e33dc8eda9d165d379fe87e0df210f316adead27787")
+ version("0.4.4", sha256="881f402c7983b56b185e182d5315dd64c9f5320be96213d0415996ece1826806")
version("0.4.3", sha256="2104735dc22be2b105e5517bd5bc6ae97f40e8e9e54928cac1585c6112a3d910")
- version("0.3.22", sha256="680a6f5265ba26d5515617a95ae47244005366f879a5c321782fde60f34e6d0d")
- version("0.1.74", sha256="bbc78c7a4927012dcb1b7cd135c7521f782d7dad516a2401b56d3190f81afe35")
-
- variant("cuda", default=True, description="Build with CUDA")
-
- # jaxlib/setup.py
- depends_on("python@3.8:", when="@0.4:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.20:", when="@0.3:", type=("build", "run"))
- depends_on("py-numpy@1.18:", type=("build", "run"))
- depends_on("py-scipy@1.5:", type=("build", "run"))
-
- # .bazelversion
- depends_on("bazel@5.1.1:5.9", when="@0.3:", type="build")
- # https://github.com/google/jax/issues/8440
- depends_on("bazel@4.1:4", when="@0.1", type="build")
-
- # README.md
- depends_on("cuda@11.4:", when="@0.4:+cuda")
- depends_on("cuda@11.1:", when="@0.3+cuda")
- # https://github.com/google/jax/issues/12614
- depends_on("cuda@11.1:11.7.0", when="@0.1+cuda")
- depends_on("cudnn@8.2:", when="@0.4:+cuda")
- depends_on("cudnn@8.0.5:", when="+cuda")
-
- # Historical dependencies
- depends_on("py-absl-py", when="@:0.3", type=("build", "run"))
- depends_on("py-flatbuffers@1.12:2", when="@0.1", type=("build", "run"))
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("cuda", default=True, description="Build with CUDA enabled")
+ variant("nccl", default=True, description="Build with NCCL enabled", when="+cuda")
+
+ # docs/installation.md (Compatible with)
+ with when("+cuda"):
+ depends_on("cuda@12.1:", when="@0.4.26:")
+ depends_on("cuda@11.8:", when="@0.4.11:")
+ depends_on("cuda@11.4:", when="@0.4.0:0.4.7")
+ depends_on("cudnn@9.1:9", when="@0.4.31:")
+ depends_on("cudnn@9", when="@0.4.29:0.4.30")
+ depends_on("cudnn@8.9:8", when="@0.4.26:0.4.28")
+ depends_on("cudnn@8.8:8", when="@0.4.11:0.4.25")
+ depends_on("cudnn@8.2:8", when="@0.4:0.4.7")
+
+ with when("+nccl"):
+ depends_on("nccl@2.18:", when="@0.4.26:")
+ depends_on("nccl@2.16:", when="@0.4.18:")
+ depends_on("nccl")
+
+ with when("+rocm"):
+ for pkg_dep in rocm_dependencies:
+ depends_on(f"{pkg_dep}@6:", when="@0.4.28:")
+ depends_on(pkg_dep)
+ depends_on("py-nanobind")
+
+ with default_args(type="build"):
+ # .bazelversion
+ depends_on("bazel@6.5.0", when="@0.4.28:")
+ depends_on("bazel@6.1.2", when="@0.4.11:0.4.27")
+ depends_on("bazel@5.1.1", when="@0.3.7:0.4.10")
+
+ # jaxlib/setup.py
+ depends_on("py-setuptools")
+
+ # build/build.py
+ depends_on("py-build", when="@0.4.14:")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@0.4.31:")
+ depends_on("python@3.9:", when="@0.4.14:")
+ depends_on("python@3.8:", when="@0.4.6:")
+ # Based on PyPI wheels
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:0.4.33")
+ depends_on("python@:3.11", when="@:0.4.16")
+
+ # jaxlib/setup.py
+ depends_on("py-scipy@1.10:", when="@0.4.31:")
+ depends_on("py-scipy@1.9:", when="@0.4.19:")
+ depends_on("py-scipy@1.7:", when="@0.4.7:")
+ depends_on("py-scipy@1.5:")
+ depends_on("py-numpy@1.24:", when="@0.4.31:")
+ depends_on("py-numpy@1.22:", when="@0.4.14:")
+ depends_on("py-numpy@1.21:", when="@0.4.7:")
+ depends_on("py-numpy@1.20:", when="@0.3:")
+ depends_on("py-ml-dtypes@0.2:", when="@0.4.14:")
+ depends_on("py-ml-dtypes@0.1:", when="@0.4.9:")
+ depends_on("py-ml-dtypes@0.0.3:", when="@0.4.7:")
+
+ # Historical dependencies
+ # https://github.com/google/jax/issues/19246
+ depends_on("py-numpy@:1", when="@:0.4.25")
+ depends_on("py-ml-dtypes@0.4:", when="@0.4.29")
+
+ patch(
+ "https://github.com/google/jax/pull/20101.patch?full_index=1",
+ sha256="4dfb9f32d4eeb0a0fb3a6f4124c4170e3fe49511f1b768cd634c78d489962275",
+ when="@:0.4.25",
+ )
+
+ # Might be able to be applied to earlier versions
+ # backports https://github.com/abseil/abseil-cpp/pull/1732
+ patch("jaxxlatsl.patch", when="@0.4.28:0.4.32 target=aarch64:")
conflicts(
"cuda_arch=none",
@@ -56,6 +142,9 @@ class PyJaxlib(PythonPackage, CudaPackage):
"https://developer.nvidia.com/cuda-gpus",
)
+ # https://github.com/google/jax/issues/19992
+ conflicts("@0.4.4:", when="target=ppc64le:")
+
def patch(self):
self.tmp_path = tempfile.mkdtemp(prefix="spack")
self.buildtmp = tempfile.mkdtemp(prefix="spack")
@@ -79,10 +168,13 @@ build --local_cpu_resources={make_jobs}
"build/build.py",
string=True,
)
+ build_wheel = join_path("build", "build_wheel.py")
+ if self.spec.satisfies("@0.4.14:"):
+ build_wheel = join_path("jaxlib", "tools", "build_wheel.py")
filter_file(
"args = parser.parse_args()",
"args, junk = parser.parse_known_args()",
- "build/build_wheel.py",
+ build_wheel,
string=True,
)
@@ -93,17 +185,18 @@ build --local_cpu_resources={make_jobs}
args.append("--enable_cuda")
args.append("--cuda_path={0}".format(self.spec["cuda"].prefix))
args.append("--cudnn_path={0}".format(self.spec["cudnn"].prefix))
- capabilities = ",".join(
- "{0:.1f}".format(float(i) / 10.0) for i in spec.variants["cuda_arch"].value
- )
- args.append("--cuda_compute_capabilities={0}".format(capabilities))
+ capabilities = CudaPackage.compute_capabilities(spec.variants["cuda_arch"].value)
+ args.append("--cuda_compute_capabilities={0}".format(",".join(capabilities)))
args.append(
"--bazel_startup_options="
"--output_user_root={0}".format(self.wrapped_package_object.buildtmp)
)
+ if "+rocm" in spec:
+ args.append("--enable_rocm")
+ args.append("--rocm_path={0}".format(self.spec["hip"].prefix))
+
python(*args)
with working_dir(self.wrapped_package_object.tmp_path):
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
remove_linked_tree(self.wrapped_package_object.tmp_path)
remove_linked_tree(self.wrapped_package_object.buildtmp)
diff --git a/var/spack/repos/builtin/packages/py-jaxtyping/package.py b/var/spack/repos/builtin/packages/py-jaxtyping/package.py
new file mode 100644
index 0000000000..a64a87d158
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jaxtyping/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJaxtyping(PythonPackage):
+ """Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees."""
+
+ homepage = "https://docs.kidger.site/jaxtyping/"
+ pypi = "jaxtyping/jaxtyping-0.2.33.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.2.33", sha256="9a9cfccae4fe05114b9fb27a5ea5440be4971a5a075bbd0526f6dd7d2730f83e")
+ version("0.2.19", sha256="21ff4c3caec6781cadfe980b019dde856c1011e17d11dfe8589298040056325a")
+
+ depends_on("py-hatchling", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:3", when="@0.2.33:")
+ depends_on("python@3.8:3", when="@0.2.19")
+ depends_on("py-typeguard@2.13.3", when="@0.2.33:")
+ depends_on("py-typeguard@2.13.3:", when="@0.2.19")
+
+ # Historical dependencies
+ depends_on("py-numpy@1.12:", when="@0.2.19")
+ depends_on("py-typing-extensions@3.7.4.1:", when="@0.2.19")
diff --git a/var/spack/repos/builtin/packages/py-jcb/package.py b/var/spack/repos/builtin/packages/py-jcb/package.py
new file mode 100644
index 0000000000..a13c134b3c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jcb/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJcb(PythonPackage):
+ """
+ JEDI Configuration Builder
+ """
+
+ homepage = "https://github.com/NOAA-EMC/jcb"
+ git = "https://github.com/NOAA-EMC/jcb"
+
+ maintainers("danholdaway", "CoryMartin-NOAA", "AlexanderRichert-NOAA")
+
+ license("GPL-3.0-only", checked_by="AlexanderRichert-NOAA")
+
+ version("develop", branch="develop", commit="16399323e36df6f17bfd4740a2330ca7fae31537")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-pyyaml@6:", type=("build", "run"))
+ depends_on("py-jinja2@3.1.2:", type=("build", "run"))
+ depends_on("py-click@8:", type=("build", "run"))
+
+ depends_on("py-pytest@7:", type="test")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check(self):
+ env["PYTHONPATH"] = ":".join(
+ (join_path(self.build_directory, "build/lib"), env["PYTHONPATH"])
+ )
+ pytest = which(join_path(self.spec["py-pytest"].prefix.bin, "pytest"))
+ pytest("-v", self.build_directory)
diff --git a/var/spack/repos/builtin/packages/py-jedi/package.py b/var/spack/repos/builtin/packages/py-jedi/package.py
index 4ac1c9574c..672714b1df 100644
--- a/var/spack/repos/builtin/packages/py-jedi/package.py
+++ b/var/spack/repos/builtin/packages/py-jedi/package.py
@@ -12,38 +12,102 @@ class PyJedi(PythonPackage):
homepage = "https://github.com/davidhalter/jedi"
pypi = "jedi/jedi-0.9.0.tar.gz"
+ maintainers("alecbcs")
+
license("MIT")
+ version("0.19.2", sha256="4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0")
version("0.18.2", sha256="bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612")
version("0.18.1", sha256="74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab")
version("0.18.0", sha256="92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707")
version("0.17.2", sha256="86ed7d9b750603e4ba582ea8edc678657fb4007894a12bcf6f4bb97892f31d20")
version("0.17.1", sha256="807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63")
- version("0.15.1", sha256="ba859c74fa3c966a22f2aeebe1b74ee27e2a462f56d3f5f7ca4a59af61bfe42e")
- version("0.15.0", sha256="9f16cb00b2aee940df2efc1d7d7c848281fd16391536a3d4561f5aea49db1ee6")
- version("0.14.1", sha256="53c850f1a7d3cfcd306cc513e2450a54bdf5cacd7604b74e42dd1f0758eaaf36")
- version("0.14.0", sha256="49ccb782651bb6f7009810d17a3316f8867dde31654c750506970742e18b553d")
- version("0.13.3", sha256="2bb0603e3506f708e792c7f4ad8fc2a7a9d9c2d292a358fbbd58da531695595b")
- version("0.13.2", sha256="571702b5bd167911fe9036e5039ba67f820d6502832285cde8c881ab2b2149fd")
- version("0.13.1", sha256="b7493f73a2febe0dc33d51c99b474547f7f6c0b2c8fb2b21f453eef204c12148")
- version("0.13.0", sha256="e4db7a2e08980e48c6aec6588483629c81fdcf9b6d9e6a372b40ed7fec91f310")
- version("0.12.1", sha256="b409ed0f6913a701ed474a614a3bb46e6953639033e31f769ca7581da5bd1ec1")
- version("0.12.0", sha256="1972f694c6bc66a2fac8718299e2ab73011d653a6d8059790c3476d2353b99ad")
- version("0.10.2", sha256="7abb618cac6470ebbd142e59c23daec5e6e063bfcecc8a43a037d2ab57276f4e")
- version("0.10.1", sha256="2420daf6fd00e80caf1bc22903598b5bf5560c900113dcc120eaefc7b4d50e06")
+ version(
+ "0.15.1",
+ sha256="ba859c74fa3c966a22f2aeebe1b74ee27e2a462f56d3f5f7ca4a59af61bfe42e",
+ deprecated=True,
+ )
+ version(
+ "0.15.0",
+ sha256="9f16cb00b2aee940df2efc1d7d7c848281fd16391536a3d4561f5aea49db1ee6",
+ deprecated=True,
+ )
+ version(
+ "0.14.1",
+ sha256="53c850f1a7d3cfcd306cc513e2450a54bdf5cacd7604b74e42dd1f0758eaaf36",
+ deprecated=True,
+ )
+ version(
+ "0.14.0",
+ sha256="49ccb782651bb6f7009810d17a3316f8867dde31654c750506970742e18b553d",
+ deprecated=True,
+ )
+ version(
+ "0.13.3",
+ sha256="2bb0603e3506f708e792c7f4ad8fc2a7a9d9c2d292a358fbbd58da531695595b",
+ deprecated=True,
+ )
+ version(
+ "0.13.2",
+ sha256="571702b5bd167911fe9036e5039ba67f820d6502832285cde8c881ab2b2149fd",
+ deprecated=True,
+ )
+ version(
+ "0.13.1",
+ sha256="b7493f73a2febe0dc33d51c99b474547f7f6c0b2c8fb2b21f453eef204c12148",
+ deprecated=True,
+ )
+ version(
+ "0.13.0",
+ sha256="e4db7a2e08980e48c6aec6588483629c81fdcf9b6d9e6a372b40ed7fec91f310",
+ deprecated=True,
+ )
+ version(
+ "0.12.1",
+ sha256="b409ed0f6913a701ed474a614a3bb46e6953639033e31f769ca7581da5bd1ec1",
+ deprecated=True,
+ )
+ version(
+ "0.12.0",
+ sha256="1972f694c6bc66a2fac8718299e2ab73011d653a6d8059790c3476d2353b99ad",
+ deprecated=True,
+ )
+ version(
+ "0.10.2",
+ sha256="7abb618cac6470ebbd142e59c23daec5e6e063bfcecc8a43a037d2ab57276f4e",
+ deprecated=True,
+ )
+ version(
+ "0.10.1",
+ sha256="2420daf6fd00e80caf1bc22903598b5bf5560c900113dcc120eaefc7b4d50e06",
+ deprecated=True,
+ )
# unfortunately pypi.io only offers a .whl for 0.10.0
version(
"0.10.0",
sha256="d6a7344df9c80562c3f62199278004ccc7c5889be9f1a6aa5abde117ec085123",
url="https://github.com/davidhalter/jedi/archive/v0.10.0.tar.gz",
+ deprecated=True,
)
- version("0.9.0", sha256="3b4c19fba31bdead9ab7350fb9fa7c914c59b0a807dcdd5c00a05feb85491d31")
+ version(
+ "0.9.0",
+ sha256="3b4c19fba31bdead9ab7350fb9fa7c914c59b0a807dcdd5c00a05feb85491d31",
+ deprecated=True,
+ )
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.5:3.9", when="@0.17.1:")
+ depends_on("python@3.6:3.10", when="@0.18.1:")
+ depends_on("python@3.6:3.11", when="@0.19.0:")
+ depends_on("python@3.6:3.12", when="@0.19.1:")
+ depends_on("python@3.6:3.13", when="@0.19.2:")
- depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-setuptools")
- depends_on("py-parso@0.8", when="@0.18.0:", type=("build", "run"))
- depends_on("py-parso@0.7", when="@0.17", type=("build", "run"))
- depends_on("py-parso@0.5.2:", when="@0.15.2:0.16", type=("build", "run"))
- depends_on("py-parso@0.5.0:", when="@0.14.1:0.15.1", type=("build", "run"))
- depends_on("py-parso@0.3.0:", when="@0.12.1:0.14.0", type=("build", "run"))
- depends_on("py-parso@0.2.0:", when="@0.12.0", type=("build", "run"))
+ depends_on("py-parso@0.2.0:", when="@0.12.0")
+ depends_on("py-parso@0.3.0:", when="@0.12.1:0.14.0")
+ depends_on("py-parso@0.5.0:", when="@0.14.1:0.15.1")
+ depends_on("py-parso@0.5.2:", when="@0.15.2:0.16")
+ depends_on("py-parso@0.7", when="@0.17")
+ depends_on("py-parso@0.8", when="@0.18.0:")
+ depends_on("py-parso@0.8.4:0.8", when="@0.19.2:")
diff --git a/var/spack/repos/builtin/packages/py-jellyfish/package.py b/var/spack/repos/builtin/packages/py-jellyfish/package.py
index d0ccd6ba39..85e916c21f 100644
--- a/var/spack/repos/builtin/packages/py-jellyfish/package.py
+++ b/var/spack/repos/builtin/packages/py-jellyfish/package.py
@@ -17,4 +17,6 @@ class PyJellyfish(PythonPackage):
version("0.6.1", sha256="5104e45a2b804b48a46a92a5e6d6e86830fe60ae83b1da32c867402c8f4c2094")
version("0.5.6", sha256="887a9a49d0caee913a883c3e7eb185f6260ebe2137562365be422d1316bd39c9")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py
index 07ac0c8acf..fe6afd0773 100644
--- a/var/spack/repos/builtin/packages/py-jinja2/package.py
+++ b/var/spack/repos/builtin/packages/py-jinja2/package.py
@@ -12,11 +12,12 @@ class PyJinja2(PythonPackage):
and an optional sandboxed environment."""
homepage = "https://palletsprojects.com/p/jinja/"
- pypi = "Jinja2/Jinja2-2.10.3.tar.gz"
+ pypi = "jinja2/jinja2-3.1.4.tar.gz"
git = "https://github.com/pallets/jinja"
license("BSD-3-Clause")
+ version("3.1.4", sha256="4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369")
version("3.1.2", sha256="31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852")
version("3.0.3", sha256="611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7")
version("3.0.1", sha256="703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4")
@@ -33,10 +34,12 @@ class PyJinja2(PythonPackage):
variant("i18n", default=False, description="Enables I18N support with Babel")
+ depends_on("python@3.8:", when="@3.1.4:", type=("build", "run"))
depends_on("python@3.7:", when="@3.1:", type=("build", "run"))
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-setuptools", when="@:3.1.3", type="build")
+ depends_on("py-flit-core@:3", when="@3.1.4:", 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@2.7:", when="@3:+i18n", type=("build", "run"))
@@ -44,3 +47,11 @@ class PyJinja2(PythonPackage):
# https://github.com/pallets/jinja/issues/1585
conflicts("^py-markupsafe@2.1:", when="@:2")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/j/jinja2/"
+ if self.spec.satisfies("@:3.1.3"):
+ url += "Jinja2-{0}.tar.gz"
+ else:
+ url += "jinja2-{0}.tar.gz"
+ return url.format(version)
diff --git a/var/spack/repos/builtin/packages/py-jiter/package.py b/var/spack/repos/builtin/packages/py-jiter/package.py
new file mode 100644
index 0000000000..466dff204c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jiter/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJiter(PythonPackage):
+ """Fast iterable JSON parser."""
+
+ homepage = "https://github.com/pydantic/jiter/"
+ pypi = "jiter/jiter-0.5.0.tar.gz"
+
+ license("MIT", checked_by="qwertos")
+
+ version("0.5.0", sha256="1d916ba875bcab5c5f7d927df998c4cb694d27dceddf3392e58beaf10563368a")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-maturin@1", type="build")
+ depends_on("rust@1.73:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-joblib/package.py b/var/spack/repos/builtin/packages/py-joblib/package.py
index 4e85d0030b..9c02f5e922 100644
--- a/var/spack/repos/builtin/packages/py-joblib/package.py
+++ b/var/spack/repos/builtin/packages/py-joblib/package.py
@@ -19,6 +19,7 @@ class PyJoblib(PythonPackage):
license("BSD-3-Clause")
+ version("1.4.2", sha256="2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e")
version("1.2.0", sha256="e1cee4a79e4af22881164f218d4311f60074197fb707e082e803b61f6d137018")
version("1.1.0", sha256="4158fcecd13733f8be669be0683b96ebdbbd38d23559f54dca7205aea1bf1e35")
version("1.0.1", sha256="9c17567692206d2f3fb9ecf5e991084254fe631665c450b443761c4186a613f7")
@@ -35,7 +36,10 @@ class PyJoblib(PythonPackage):
version("0.10.2", sha256="3123553bdad83b143428033537c9e1939caf4a4d8813dade6a2246948c94494b")
version("0.10.0", sha256="49b3a0ba956eaa2f077e1ebd230b3c8d7b98afc67520207ada20a4d8b8efd071")
- depends_on("python@3.7:", when="@1.2:", type=("build", "run"))
- depends_on("python@3.6:", when="@0.15:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
- depends_on("py-setuptools", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ # https://github.com/joblib/joblib/pull/1361
+ depends_on("python@:3.11", when="@:1.2")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@61.2:", when="@1.4:")
+ depends_on("py-setuptools")
diff --git a/var/spack/repos/builtin/packages/py-jproperties/package.py b/var/spack/repos/builtin/packages/py-jproperties/package.py
new file mode 100644
index 0000000000..df024a6ed6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jproperties/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJproperties(PythonPackage):
+ """Java Property file parser and writer for Python"""
+
+ homepage = "https://github.com/Tblue/python-jproperties"
+ pypi = "jproperties/jproperties-2.1.1.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("BSD", checked_by="teaguesterling")
+
+ version("2.1.1", sha256="40b71124e8d257e8954899a91cd2d5c0f72e0f67f1b72048a5ba264567604f29")
+ version("2.1.0", sha256="504d7b8d3b2f5f0f52c22c1f72bd50576dca17b01b4cd00d4359c6b0607a59ce")
+ version("2.0.0", sha256="b6709652f5c602e5271f519cf14cb9bf5d5a101df06e6c1d300123477a239588")
+ version("1.0.1", sha256="327e14082653a4f2212ff81a96fbf141382f727f421e8afc933bf56ff7c010f4")
+
+ depends_on("py-setuptools", type="build")
+ with default_args(type=("build", "run")):
+ depends_on("python@2.7,3:")
+ depends_on("py-six@1.10:1", when="@2.0.0")
+ depends_on("py-six@1.12:1", when="@2.1.0")
+ depends_on("py-six@1.13:1", when="@2.1.1")
+ depends_on("py-setuptools-scm@3.3:3", when="@2.1.1")
diff --git a/var/spack/repos/builtin/packages/py-jpype1/package.py b/var/spack/repos/builtin/packages/py-jpype1/package.py
index 8c2f32f41a..aa12e7c9de 100644
--- a/var/spack/repos/builtin/packages/py-jpype1/package.py
+++ b/var/spack/repos/builtin/packages/py-jpype1/package.py
@@ -18,6 +18,9 @@ class PyJpype1(PythonPackage):
version("0.6.1", sha256="0d366228b7b37b0266184161cc7ea1ce58f60199f6ec9451985149ea873774be")
version("0.6.0", sha256="f5d783520cb4c30595c3bc509065e30fc292ec7cfb57045141eae77c518bcdb0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("numpy", default=False, description="Build numpy extensions")
depends_on("python@2.6:")
diff --git a/var/spack/repos/builtin/packages/py-jraph/package.py b/var/spack/repos/builtin/packages/py-jraph/package.py
new file mode 100644
index 0000000000..e72cc9a505
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jraph/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJraph(PythonPackage):
+ """Jraph: A library for Graph Neural Networks in Jax."""
+
+ homepage = "https://github.com/deepmind/jraph"
+ pypi = "jraph/jraph-0.0.6.dev0.tar.gz"
+
+ license("Apache-2.0")
+
+ version(
+ "0.0.6.dev0", sha256="c3ac3a0b224b344eb6d367e8bc312d95ea41bf825d01ea31b80dd8c22c0dd8b8"
+ )
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-jax@0.1.55:", type=("build", "run"))
+ depends_on("py-jaxlib@0.1.37:", type=("build", "run"))
+ depends_on("py-numpy@1.18:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jsonargparse/package.py b/var/spack/repos/builtin/packages/py-jsonargparse/package.py
index d618b5f637..f71830fd3f 100644
--- a/var/spack/repos/builtin/packages/py-jsonargparse/package.py
+++ b/var/spack/repos/builtin/packages/py-jsonargparse/package.py
@@ -17,6 +17,8 @@ class PyJsonargparse(PythonPackage):
license("MIT")
+ version("4.28.0", sha256="ac835a290ef18cc2a5309e6bfa8ada9c5d63f46ff18701583fc8f3e95314679c")
+ version("4.27.5", sha256="88ad908387ea5c8285a48e7d94bfd025e6f536b0dbae616d755d701248ab85d9")
version("4.25.0", sha256="4eaadae69c387a3d83a76b1eaf20ca98d5274d8637f180dca0754ce5405adb6b")
version("4.19.0", sha256="63aa3c7bbdb219d0f254a5ae86f3d54384ebc1ffa905e776cc19283bc843787b")
diff --git a/var/spack/repos/builtin/packages/py-jsonlines/package.py b/var/spack/repos/builtin/packages/py-jsonlines/package.py
new file mode 100644
index 0000000000..f0a6fc5483
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jsonlines/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJsonlines(PythonPackage):
+ """Library with helpers for the jsonlines file format"""
+
+ homepage = "https://github.com/wbolster/jsonlines"
+ pypi = "jsonlines/jsonlines-4.0.0.tar.gz"
+
+ license("BSD-3-Clause", checked_by="alex391")
+
+ version("4.0.0", sha256="0c6d2c09117550c089995247f605ae4cf77dd1533041d366351f6f298822ea74")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-attrs@19.2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jsonschema-specifications/package.py b/var/spack/repos/builtin/packages/py-jsonschema-specifications/package.py
new file mode 100644
index 0000000000..d595550b83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jsonschema-specifications/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJsonschemaSpecifications(PythonPackage):
+ """The JSON Schema meta-schemas and vocabularies, exposed as a Registry."""
+
+ homepage = "https://jsonschema-specifications.readthedocs.io/"
+ pypi = "jsonschema_specifications/jsonschema_specifications-2023.12.1.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("2023.12.1", sha256="48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc")
+
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+
+ depends_on("py-referencing@0.31.0:", type=("build", "run"))
+ depends_on("py-importlib-resources@1.4.0:", type=("build", "run"), when="^python@:3.8")
diff --git a/var/spack/repos/builtin/packages/py-jsonschema/package.py b/var/spack/repos/builtin/packages/py-jsonschema/package.py
index 2ba338975b..e2c5e3c6fd 100644
--- a/var/spack/repos/builtin/packages/py-jsonschema/package.py
+++ b/var/spack/repos/builtin/packages/py-jsonschema/package.py
@@ -9,11 +9,16 @@ from spack.package import *
class PyJsonschema(PythonPackage):
"""Jsonschema: An(other) implementation of JSON Schema for Python."""
- homepage = "https://github.com/Julian/jsonschema"
+ homepage = "https://github.com/python-jsonschema/jsonschema"
pypi = "jsonschema/jsonschema-3.2.0.tar.gz"
- license("MIT")
+ license("MIT", checked_by="wdconinc")
+ version("4.22.0", sha256="5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7")
+ version("4.21.1", sha256="85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5")
+ version("4.20.0", sha256="4f614fd46d8d61258610998997743ec5492a648b33cf478c1ddc23ed4598a5fa")
+ version("4.19.2", sha256="c9ff4d7447eed9592c23a12ccee508baf0dd0d59650615e847feb6cdca74f392")
+ version("4.18.6", sha256="ce71d2f8c7983ef75a756e568317bf54bc531dc3ad7e66a128eae0d51623d8a3")
version("4.17.3", sha256="0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d")
version("4.16.0", sha256="165059f076eff6971bae5b742fc029a7b4ef3f9bcf04c14e4776a7605de14b23")
version("4.10.0", sha256="8ff7b44c6a99c6bfd55ca9ac45261c649cefd40aaba1124c29aaef1bcb378d84")
@@ -33,14 +38,17 @@ class PyJsonschema(PythonPackage):
description="Enable format-nongpl functionality",
)
+ depends_on("python@3.8:", when="@4.18:", type="build")
+
depends_on("py-hatchling", when="@4.10:", type="build")
depends_on("py-hatch-vcs", when="@4.10:", type="build")
depends_on("py-hatch-fancy-pypi-readme", when="@4.11:", type="build")
depends_on("py-attrs@17.4:", when="@3:", type=("build", "run"))
- depends_on("py-pyrsistent@0.14:", when="@3:", type=("build", "run"))
- depends_on("py-importlib-metadata", when="@3.1.1: ^python@:3.7", type=("build", "run"))
- depends_on("py-typing-extensions", when="@4.3: ^python@:3.7", type=("build", "run"))
+ depends_on("py-attrs@22.2:", when="@4.18:", type=("build", "run"))
+ depends_on("py-jsonschema-specifications@2023.03.6:", when="@4.18:", type=("build", "run"))
+ depends_on("py-referencing@0.28.4:", when="@4.18:", type=("build", "run"))
+ depends_on("py-rpds-py@0.7.1:", when="@4.18:", type=("build", "run"))
depends_on("py-importlib-resources@1.4:", when="@4.2.1: ^python@:3.8", type=("build", "run"))
depends_on("py-importlib-resources", when="@4.2.0 ^python@:3.8", type=("build", "run"))
depends_on("py-pkgutil-resolve-name@1.3.10:", when="@4.10.0: ^python@:3.8")
@@ -53,6 +61,9 @@ class PyJsonschema(PythonPackage):
depends_on("py-setuptools-scm+toml@3.4:", when="@4.4.0", type="build")
depends_on("py-setuptools-scm", when="@3", type="build")
depends_on("py-six@1.11:", when="@3", type=("build", "run"))
+ depends_on("py-pyrsistent@0.14:", when="@3:4.17", type=("build", "run"))
+ depends_on("py-importlib-metadata", when="@3.1.1:4.17 ^python@:3.7", type=("build", "run"))
+ depends_on("py-typing-extensions", when="@4.3:4.17 ^python@:3.7", type=("build", "run"))
conflicts("^py-pyrsistent@0.17.0:0.17.2")
diff --git a/var/spack/repos/builtin/packages/py-junit2html/package.py b/var/spack/repos/builtin/packages/py-junit2html/package.py
new file mode 100644
index 0000000000..d6965674b8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-junit2html/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyJunit2html(PythonPackage):
+ """
+ Simple self-contained python tool to produce a single html file from a single junit xml file.
+ """
+
+ homepage = "https://gitlab.com/inorton/junit2html"
+
+ url = "https://gitlab.com/inorton/junit2html/-/archive/v31.0.2/junit2html-v31.0.2.tar.gz"
+
+ maintainers("LydDeb")
+
+ version("31.0.2", sha256="8d90ae83163dde6bf0bde9c3e8d21c0ab0796de7c5f33917cfdbb9d319212213")
+
+ depends_on("py-setuptools", type=("build"))
+ depends_on("py-jinja2@3.0:", type=("build", "run"))
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 8303cadb9a..c41bbd45d8 100644
--- a/var/spack/repos/builtin/packages/py-jupyter-core/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter-core/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -45,3 +47,10 @@ class PyJupyterCore(PythonPackage):
# Historical dependencies
depends_on("py-setuptools", when="@:4.9.2", type=("build", "run"))
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ # https://docs.jupyter.org/en/stable/use/jupyter-directories.html
+ if os.path.exists(dependent_spec.prefix.etc.jupyter):
+ env.prepend_path("JUPYTER_CONFIG_PATH", dependent_spec.prefix.etc.jupyter)
+ if os.path.exists(dependent_spec.prefix.share.jupyter):
+ env.prepend_path("JUPYTER_PATH", dependent_spec.prefix.share.jupyter)
diff --git a/var/spack/repos/builtin/packages/py-jupyter-events/package.py b/var/spack/repos/builtin/packages/py-jupyter-events/package.py
index e87818492b..f1bd940b9d 100644
--- a/var/spack/repos/builtin/packages/py-jupyter-events/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter-events/package.py
@@ -12,10 +12,13 @@ class PyJupyterEvents(PythonPackage):
homepage = "https://github.com/jupyter/jupyter_events"
pypi = "jupyter_events/jupyter_events-0.6.3.tar.gz"
+ version("0.10.0", sha256="670b8229d3cc882ec782144ed22e0d29e1c2d639263f92ca8383e66682845e22")
version("0.6.3", sha256="9a6e9995f75d1b7146b436ea24d696ce3a35bfa8bfe45e0c33c334c79464d0b3")
depends_on("py-hatchling@1.5:", type="build")
+ depends_on("py-referencing", type=("build", "run"), when="@0.7:")
+ depends_on("py-jsonschema+format-nongpl@4.18:", type=("build", "run"), when="@0.7:")
depends_on("py-jsonschema+format-nongpl@3.2:", type=("build", "run"))
depends_on("py-python-json-logger@2.0.4:", type=("build", "run"))
depends_on("py-pyyaml@5.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py
index c45a7b86dc..7c9df4e9ac 100644
--- a/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py
@@ -16,6 +16,7 @@ class PyJupyterPackaging(PythonPackage):
license("BSD-3-Clause")
+ version("0.12.3", sha256="9d9b2b63b97ffd67a8bc5391c32a421bc415b264a32c99e4d8d8dd31daae9cf4")
version("0.12.0", sha256="b27455d60adc93a7baa2e0b8f386be81b932bb4e3c0116046df9ed230cd3faac")
version("0.11.1", sha256="6f5c7eeea98f7f3c8fb41d565a94bf59791768a93f93148b3c2dfb7ebade8eec")
version("0.10.6", sha256="a8a2c90bf2e0cae83be63ccb0b7035032a1589f268cc08b1d479e37ce50fc940")
@@ -27,8 +28,9 @@ class PyJupyterPackaging(PythonPackage):
url="https://files.pythonhosted.org/packages/source/j/jupyter_packaging/jupyter-packaging-0.7.12.tar.gz",
)
- depends_on("python@3.7:", when="@0.11:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"))
+ # https://github.com/jupyter/jupyter-packaging/pull/153
+ depends_on("python@:3.12", when="@:0.12.1", type=("build", "run"))
+ depends_on("py-hatchling@0.25:", when="@0.12.1:", type="build")
depends_on("py-packaging", type=("build", "run"))
depends_on("py-tomlkit", when="@0.8:", type=("build", "run"))
depends_on("py-setuptools@60.2:", when="@0.12:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py
index 18cf661996..8a5da89cde 100644
--- a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyJupyterServerMathjax(PythonPackage):
"""MathJax resources as a Jupyter Server Extension."""
- homepage = "http://jupyter.org/"
+ homepage = "https://jupyter.org/"
pypi = "jupyter_server_mathjax/jupyter_server_mathjax-0.2.3.tar.gz"
license("BSD-3-Clause")
diff --git a/var/spack/repos/builtin/packages/py-jupyter-server/no_npm_node.patch b/var/spack/repos/builtin/packages/py-jupyter-server/no_npm_node.patch
new file mode 100644
index 0000000000..251acbd44b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jupyter-server/no_npm_node.patch
@@ -0,0 +1,14 @@
+--- a/pyproject.toml 2024-03-19 15:58:20.000000000 -0600
++++ b/pyproject.toml 2024-03-19 15:59:15.000000000 -0600
+@@ -5,6 +5,11 @@
+ [tool.jupyter-packaging.builder]
+ factory = "jupyter_packaging.npm_builder"
+
++# Injected by spack to solve problems with hidden npm/node dependencies
++# https://github.com/spack/spack/issues/41899
++[tool.jupyter-packaging.build-args]
++npm = "/dev/null"
++
+ [tool.check-manifest]
+ ignore = ["tbump.toml", ".*", "*.yml", "package-lock.json", "bootstrap*", "conftest.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
index 87afeb95f6..c8a4c422e1 100644
--- a/var/spack/repos/builtin/packages/py-jupyter-server/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter-server/package.py
@@ -16,17 +16,37 @@ class PyJupyterServer(PythonPackage):
license("BSD-3-Clause")
+ version("2.14.2", sha256="66095021aa9638ced276c248b1d81862e4c50f292d575920bbe960de1c56b12b")
version("2.6.0", sha256="ae4af349f030ed08dd78cb7ac1a03a92d886000380c9ea6283f3c542a81f4b06")
version("1.21.0", sha256="d0adca19913a3763359be7f0b8c2ea8bfde356f4b8edd8e3149d7d0fbfaa248b")
version("1.18.1", sha256="2b72fc595bccae292260aad8157a0ead8da2c703ec6ae1bb7b36dbad0e267ea7")
- version("1.17.0", sha256="7b3aa524790ab0da64f06dfe0b2af149d0a3f59aad71fdedcf1d8bae6508018c")
- version("1.13.5", sha256="9e3e9717eea3bffab8cfb2ff330011be6c8bbd9cdae5b71cef169fcece2f19d3")
- version("1.11.2", sha256="c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95")
- version("1.11.1", sha256="ab7ab1cc38512f15026cbcbb96300fb46ec8b24aa162263d9edd00e0a749b1e8")
- version("1.11.0", sha256="8ab4f484a4a2698f757cff0769d27b5d991e0232a666d54f4d6ada4e6a61330b")
- version("1.10.2", sha256="d3a3b68ebc6d7bfee1097f1712cf7709ee39c92379da2cc08724515bb85e72bf")
- version("1.9.0", sha256="7d19006380f6217458a9db309b54e3dab87ced6c06329c61823907bef2a6f51b")
- version("1.6.1", sha256="242ddd0b644f10e030f917019b47c381e0f2d2b950164af45cbd791d572198ac")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-29241
+ version(
+ "1.17.0", sha256="7b3aa524790ab0da64f06dfe0b2af149d0a3f59aad71fdedcf1d8bae6508018c"
+ )
+ version(
+ "1.13.5", sha256="9e3e9717eea3bffab8cfb2ff330011be6c8bbd9cdae5b71cef169fcece2f19d3"
+ )
+ version(
+ "1.11.2", sha256="c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95"
+ )
+ version(
+ "1.11.1", sha256="ab7ab1cc38512f15026cbcbb96300fb46ec8b24aa162263d9edd00e0a749b1e8"
+ )
+ version(
+ "1.11.0", sha256="8ab4f484a4a2698f757cff0769d27b5d991e0232a666d54f4d6ada4e6a61330b"
+ )
+ version(
+ "1.10.2", sha256="d3a3b68ebc6d7bfee1097f1712cf7709ee39c92379da2cc08724515bb85e72bf"
+ )
+ version("1.9.0", sha256="7d19006380f6217458a9db309b54e3dab87ced6c06329c61823907bef2a6f51b")
+ version("1.6.1", sha256="242ddd0b644f10e030f917019b47c381e0f2d2b950164af45cbd791d572198ac")
+
+ variant("typescript", default=False, description="Build the typescript code", when="@1.10.2:1")
+
+ # https://github.com/spack/spack/issues/41899
+ patch("no_npm_node.patch", when="@1.10.2:1 ~typescript")
depends_on("python@3.8:", when="@2:", type=("build", "run"))
depends_on("py-hatchling@1.11:", when="@2:", type="build")
@@ -38,9 +58,12 @@ class PyJupyterServer(PythonPackage):
depends_on("py-pre-commit", when="@1.16:", type="build")
depends_on("py-setuptools", type="build")
+ depends_on("npm", type="build", when="+typescript")
depends_on("py-anyio@3.1.0:", when="@2.2.1:", type=("build", "run"))
depends_on("py-anyio@3.1.0:3", when="@:2.2.0", type=("build", "run"))
+ depends_on("py-argon2-cffi@21.1:", when="@2.14:", type=("build", "run"))
depends_on("py-argon2-cffi", type=("build", "run"))
+ depends_on("py-jinja2@3.0.3:", when="@2.14:", type=("build", "run"))
depends_on("py-jinja2", type=("build", "run"))
depends_on("py-jupyter-client@7.4.4:", when="@2:", type=("build", "run"))
depends_on("py-jupyter-client@6.1.12:", when="@1.16:", type=("build", "run"))
@@ -48,18 +71,23 @@ class PyJupyterServer(PythonPackage):
depends_on("py-jupyter-core@4.12:4,5.1:", when="@1.23.5:", type=("build", "run"))
depends_on("py-jupyter-core@4.7:", when="@1.16:", type=("build", "run"))
depends_on("py-jupyter-core@4.6:", type=("build", "run"))
+ depends_on("py-jupyter-server-terminals@0.4.4:", when="@2.14:", type=("build", "run"))
depends_on("py-jupyter-server-terminals", when="@2:", type=("build", "run"))
depends_on("py-nbconvert@6.4.4:", when="@1.16:", type=("build", "run"))
depends_on("py-nbconvert", type=("build", "run"))
depends_on("py-nbformat@5.3:", when="@2:", type=("build", "run"))
depends_on("py-nbformat@5.2:", when="@1.15:", type=("build", "run"))
depends_on("py-nbformat", type=("build", "run"))
+ depends_on("py-packaging@22.0:", when="@2.14:", type=("build", "run"))
depends_on("py-packaging", when="@1.13.2:", type=("build", "run"))
+ depends_on("py-prometheus-client@0.9:", when="@2.14:", type=("build", "run"))
depends_on("py-prometheus-client", type=("build", "run"))
+ # for windows depends_on pywinpty@2.0.1:, when='@2.14:'
# for windows depends_on pywinpty, when='@1.13.2:'
# py-pywinpty is not in spack and requires the build system maturin
depends_on("py-pyzmq@24:", when="@2:", type=("build", "run"))
depends_on("py-pyzmq@17:", type=("build", "run"))
+ depends_on("py-send2trash@1.8.2:", when="@2.7.1:", type=("build", "run"))
depends_on("py-send2trash", type=("build", "run"))
depends_on("py-terminado@0.8.3:", type=("build", "run"))
depends_on("py-tornado@6.2:", when="@2:", type=("build", "run"))
@@ -68,8 +96,11 @@ class PyJupyterServer(PythonPackage):
depends_on("py-traitlets@5.1:", when="@1.16:", type=("build", "run"))
depends_on("py-traitlets@5:", when="@1.13.3:", type=("build", "run"))
depends_on("py-traitlets@4.2.1:", type=("build", "run"))
+ depends_on("py-websocket-client@1.7:", when="@2.14:", type=("build", "run"))
depends_on("py-websocket-client", type=("build", "run"))
+ depends_on("py-jupyter-events@0.9:", when="@2.10.1:", type=("build", "run"))
depends_on("py-jupyter-events@0.6:", when="@2.6:", type=("build", "run"))
+ depends_on("py-overrides@5.0:", when="@2.14:", type=("build", "run"))
depends_on("py-overrides", when="@2.6:", type=("build", "run"))
# old
diff --git a/var/spack/repos/builtin/packages/py-jupyter/package.py b/var/spack/repos/builtin/packages/py-jupyter/package.py
index 9569b16c03..d71d6bd1a9 100644
--- a/var/spack/repos/builtin/packages/py-jupyter/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyter/package.py
@@ -14,13 +14,20 @@ class PyJupyter(PythonPackage):
license("BSD-3-Clause")
- version("1.0.0", sha256="d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f")
+ version("1.1.1", sha256="d55467bceabdea49d7e3624af7e33d59c37fff53ed3a350e1ac957bed731de7a")
+ version(
+ "1.0.0",
+ sha256="d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f",
+ deprecated=True,
+ )
- # pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
- depends_on("py-notebook", type=("build", "run"))
- depends_on("py-qtconsole", type=("build", "run"))
- depends_on("py-jupyter-console", type=("build", "run"))
- depends_on("py-nbconvert", type=("build", "run"))
- depends_on("py-ipykernel", type=("build", "run"))
- depends_on("py-ipywidgets", type=("build", "run"))
+
+ with default_args(type=("build", "run")):
+ depends_on("py-notebook")
+ depends_on("py-qtconsole", when="@:1.0")
+ depends_on("py-jupyter-console")
+ depends_on("py-nbconvert")
+ depends_on("py-ipykernel")
+ depends_on("py-ipywidgets")
+ depends_on("py-jupyterlab", when="@1.1:")
diff --git a/var/spack/repos/builtin/packages/py-jupyterlab-pygments/package.py b/var/spack/repos/builtin/packages/py-jupyterlab-pygments/package.py
index a0b96f0c5c..22905b7252 100644
--- a/var/spack/repos/builtin/packages/py-jupyterlab-pygments/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyterlab-pygments/package.py
@@ -18,21 +18,9 @@ class PyJupyterlabPygments(PythonPackage):
# -> py-jupyter-server -> py-nbconvert
# Reported here: https://github.com/jupyterlab/jupyterlab_pygments/issues/23
- version(
- "0.2.2",
- sha256="2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f",
- expand=False,
- )
- version(
- "0.1.2",
- sha256="abfb880fd1561987efaefcb2d2ac75145d2a5d0139b1876d5be806e32f630008",
- expand=False,
- )
- version(
- "0.1.1",
- sha256="c9535e5999f29bff90bd0fa423717dcaf247b71fad505d66b17d3217e9021fc5",
- expand=False,
- )
+ version("0.2.2", sha256="2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f")
+ version("0.1.2", sha256="abfb880fd1561987efaefcb2d2ac75145d2a5d0139b1876d5be806e32f630008")
+ version("0.1.1", sha256="c9535e5999f29bff90bd0fa423717dcaf247b71fad505d66b17d3217e9021fc5")
depends_on("python@3.7:", when="@0.2.2:", type=("build", "run"))
depends_on("py-pygments@2.4.1:2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-jupyterlab-widgets/package.py b/var/spack/repos/builtin/packages/py-jupyterlab-widgets/package.py
index 5aada203f6..9de987a0f7 100644
--- a/var/spack/repos/builtin/packages/py-jupyterlab-widgets/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyterlab-widgets/package.py
@@ -16,21 +16,9 @@ class PyJupyterlabWidgets(PythonPackage):
license("BSD-3-Clause")
- version(
- "3.0.3",
- sha256="6aa1bc0045470d54d76b9c0b7609a8f8f0087573bae25700a370c11f82cb38c8",
- expand=False,
- )
- version(
- "1.1.0",
- sha256="c2a9bd3789f120f64d73268c066ed3b000c56bc1dda217be5cdc43e7b4ebad3f",
- expand=False,
- )
- version(
- "1.0.2",
- sha256="f5d9efface8ec62941173ba1cffb2edd0ecddc801c11ae2931e30b50492eb8f7",
- expand=False,
- )
+ version("3.0.3", sha256="6aa1bc0045470d54d76b9c0b7609a8f8f0087573bae25700a370c11f82cb38c8")
+ version("1.1.0", sha256="c2a9bd3789f120f64d73268c066ed3b000c56bc1dda217be5cdc43e7b4ebad3f")
+ version("1.0.2", sha256="f5d9efface8ec62941173ba1cffb2edd0ecddc801c11ae2931e30b50492eb8f7")
depends_on("python@3.6:", type=("build", "run"))
depends_on("python@3.7:", when="@3.0.3:", 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 08c57c99a9..195ee27e29 100644
--- a/var/spack/repos/builtin/packages/py-jupyterlab/package.py
+++ b/var/spack/repos/builtin/packages/py-jupyterlab/package.py
@@ -29,6 +29,10 @@ class PyJupyterlab(PythonPackage):
version("2.2.7", sha256="a72ffd0d919cba03a5ef8422bc92c3332a957ff97b0490494209c83ad93826da")
version("2.1.0", sha256="8c239aababf5baa0b3d36e375fddeb9fd96f3a9a24a8cda098d6a414f5bbdc81")
+ # Optional dependencies needed to install jupyterlab extensions
+ depends_on("node-js", type="run")
+ depends_on("npm", type="run")
+
depends_on("python@3.8:", when="@4:", type=("build", "run"))
depends_on("py-hatchling@1.5:", when="@4:", type=("build", "run"))
# under [tool.hatch.build.hooks.jupyter-builder] in pyproject.toml
diff --git a/var/spack/repos/builtin/packages/py-jupytext/package.py b/var/spack/repos/builtin/packages/py-jupytext/package.py
index 42298b11b5..b7556f3648 100644
--- a/var/spack/repos/builtin/packages/py-jupytext/package.py
+++ b/var/spack/repos/builtin/packages/py-jupytext/package.py
@@ -18,19 +18,31 @@ class PyJupytext(PythonPackage):
license("MIT")
+ version("1.16.0", sha256="94c7e67775e90e1792c39ab7fca4e0459bf7c35656123e8dc2e9e1b3e953baf8")
version("1.14.1", sha256="314fa0e732b1d14764271843b676938ef8a7b9d53c3575ade636b45d13f341c8")
version("1.13.6", sha256="c6c25918ddb6403d0d8504e08d35f6efc447baf0dbeb6a28b73adf39e866a0c4")
version("1.13.0", sha256="fb220af65d2bd32d01c779b0e935c4c2b71e3f5f2f01bf1bab10d5f23fe121d4")
- depends_on("python@3.6:3", type=("build", "run"))
- depends_on("py-setuptools@40.8.0:", type="build")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("python@3.8:", type=("build", "run"), when="@1.16:")
+ depends_on("python@3.6:3", type=("build", "run"), when="@:1.14")
+
+ depends_on("py-hatchling@1.5.0:", type="build", when="@1.16:")
+ depends_on("py-setuptools@40.8.0:", type="build", when="@:1.14.1")
+
depends_on("py-nbformat", type=("build", "run"))
- depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-toml", type=("build", "run"))
depends_on("py-mdit-py-plugins", type=("build", "run"))
- depends_on("py-markdown-it-py@1.0:2", type=("build", "run"), when="@1.14.1:")
+ depends_on("py-markdown-it-py@1.0:", type=("build", "run"), when="@1.16:")
+ depends_on("py-markdown-it-py@1.0:2", type=("build", "run"), when="@1.14.1")
depends_on("py-markdown-it-py@1.0:1", type=("build", "run"), when="@:1.13.6")
+ depends_on("py-packaging", type=("build", "run"), when="@1.16:")
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-toml", type=("build", "run"))
+
# todo: in order to use jupytext as a jupyterlab extension,
# some additional dependencies need to be added (and checked):
- depends_on("py-jupyterlab@3", type=("build", "run"))
- depends_on("py-jupyter-packaging@0.7.9:0.7", type="build")
+ depends_on("py-jupyterlab@4", type=("build", "run"), when="@1.16:")
+ depends_on("py-jupyterlab@3", type=("build", "run"), when="@:1.14")
+ depends_on("py-hatch-jupyter-builder@0.5:", type=("build", "run"), when="@1.16:")
+ depends_on("py-jupyter-packaging@0.7.9:0.7", type="build", when="@:1.14")
diff --git a/var/spack/repos/builtin/packages/py-jwcrypto/package.py b/var/spack/repos/builtin/packages/py-jwcrypto/package.py
new file mode 100644
index 0000000000..4220f3aed4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-jwcrypto/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyJwcrypto(PythonPackage):
+ """
+ JWCrypto is an implementation of the Javascript Object Signing and Encryption (JOSE)
+ Web Standards as they are being developed in the JOSE IETF Working Group and related
+ technology.
+
+ JWCrypto uses the Cryptography package for all the crypto functions.
+ """
+
+ homepage = "https://jwcrypto.readthedocs.io/en/latest/"
+ pypi = "jwcrypto/jwcrypto-1.5.4.tar.gz"
+ git = "https://github.com/latchset/jwcrypto"
+
+ maintainers("jeremyfix")
+
+ license("LGPL-3.0")
+
+ version("1.5.4", sha256="0815fbab613db99bad85691da5f136f8860423396667728a264bcfa6e1db36b0")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-cryptography@3.4:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-kaleido/package.py b/var/spack/repos/builtin/packages/py-kaleido/package.py
new file mode 100644
index 0000000000..a58a207ddf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-kaleido/package.py
@@ -0,0 +1,74 @@
+# Copyright 2013-2023 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
+import sys
+
+from spack.package import *
+
+arch, os = platform.machine(), sys.platform
+arch64_32, _ = platform.architecture()
+
+
+class PyKaleido(PythonPackage):
+ """Static image export for web-based visualization libraries with zero dependencies"""
+
+ homepage = "https://github.com/plotly/Kaleido"
+ pypi = "kaleido/kaleido-0.2.1-py2.py3-none-manylinux1_x86_64.whl"
+
+ maintainers("Pandapip1")
+
+ if (arch == "x86_64" or arch == "x64") and os == "linux": # Linux on x86_64
+ version(
+ "0.2.1",
+ sha256="aa21cf1bf1c78f8fa50a9f7d45e1003c387bd3d6fe0a767cfbbf344b95bdc3a8",
+ url="https://files.pythonhosted.org/packages/ae/b3/a0f0f4faac229b0011d8c4a7ee6da7c2dca0b6fd08039c95920846f23ca4/kaleido-0.2.1-py2.py3-none-manylinux1_x86_64.whl",
+ expand=False,
+ )
+ elif arch == "arm7l" and os == "linux": # Linux on ARMv7
+ version(
+ "0.2.1.post1",
+ sha256="d313940896c24447fc12c74f60d46ea826195fc991f58569a6e73864d53e5c20",
+ url="https://files.pythonhosted.org/packages/86/4b/d668e288b694661d2fbfc2b972db69cf1f30f8b8a91be14dcf9f000cab16/kaleido-0.2.1.post1-py2.py3-none-manylinux2014_armv7l.whl",
+ expand=False,
+ )
+ elif arch == "aarch64" and os == "linux": # Linux on 64-bit ARM
+ version(
+ "0.2.1",
+ sha256="845819844c8082c9469d9c17e42621fbf85c2b237ef8a86ec8a8527f98b6512a",
+ url="https://files.pythonhosted.org/packages/a1/2b/680662678a57afab1685f0c431c2aba7783ce4344f06ec162074d485d469/kaleido-0.2.1-py2.py3-none-manylinux2014_aarch64.whl",
+ expand=False,
+ )
+ elif (arch == "x86_64" or arch == "x64") and os == "darwin": # MacOS on x86_64
+ version(
+ "0.2.1",
+ sha256="ca6f73e7ff00aaebf2843f73f1d3bacde1930ef5041093fe76b83a15785049a7",
+ url="https://files.pythonhosted.org/packages/e0/f7/0ccaa596ec341963adbb4f839774c36d5659e75a0812d946732b927d480e/kaleido-0.2.1-py2.py3-none-macosx_10_11_x86_64.whl",
+ expand=False,
+ )
+ elif not (arch == "x86_64" or arch == "x64") and os == "darwin": # MacOS on Apple Silicon
+ version(
+ "0.2.1",
+ sha256="bb9a5d1f710357d5d432ee240ef6658a6d124c3e610935817b4b42da9c787c05",
+ url="https://files.pythonhosted.org/packages/45/8e/4297556be5a07b713bb42dde0f748354de9a6918dee251c0e6bdcda341e7/kaleido-0.2.1-py2.py3-none-macosx_11_0_arm64.whl",
+ expand=False,
+ )
+ elif arch64_32 == "64bit" and os == "win32": # 64-bit windows
+ version(
+ "0.2.1",
+ sha256="4670985f28913c2d063c5734d125ecc28e40810141bdb0a46f15b76c1d45f23c",
+ url="https://files.pythonhosted.org/packages/f7/9a/0408b02a4bcb3cf8b338a2b074ac7d1b2099e2b092b42473def22f7b625f/kaleido-0.2.1-py2.py3-none-win_amd64.whl",
+ expand=False,
+ )
+ elif arch64_32 == "32bit" and os == "win32": # 32-bit windows
+ version(
+ "0.2.1",
+ sha256="ecc72635860be616c6b7161807a65c0dbd9b90c6437ac96965831e2e24066552",
+ url="https://files.pythonhosted.org/packages/88/89/4b6f8bb3f9ab036fd4ad1cb2d628ab5c81db32ac9aa0641d7b180073ba43/kaleido-0.2.1-py2.py3-none-win32.whl",
+ expand=False,
+ )
+
+ depends_on("python", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-keras/package.py b/var/spack/repos/builtin/packages/py-keras/package.py
index d09fb4a723..4edf51a82e 100644
--- a/var/spack/repos/builtin/packages/py-keras/package.py
+++ b/var/spack/repos/builtin/packages/py-keras/package.py
@@ -5,6 +5,7 @@
import tempfile
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -19,9 +20,29 @@ class PyKeras(PythonPackage):
git = "https://github.com/keras-team/keras.git"
pypi = "keras/keras-3.0.0.tar.gz"
+ maintainers("adamjstewart")
+ license("Apache-2.0")
+
+ version("3.7.0", sha256="a4451a5591e75dfb414d0b84a3fd2fb9c0240cc87ebe7e397f547ce10b0e67b7")
+ version("3.6.0", sha256="405727525a3522ed8f9ec0b46e0667e4c65fcf714a067322c16a00d902ded41d")
+ version("3.5.0", sha256="53ae4f9472ec9d9c6941c82a3fda86969724ace3b7630a94ba0a1f17ba1065c3")
+ version("3.4.1", sha256="34cd9aeaa008914715149234c215657ca758e1b473bd2aab2e211ac967d1f8fe")
+ version("3.4.0", sha256="c4b05b150b1c4df27b4a17efd137b2d5e20f385f146fd48636791d675e75059d")
+ version("3.3.3", sha256="f2fdffc8434fd77045cf8fb21816dbaa2308d5f76974ca924b2f60b40433b1a0")
+ version("3.3.2", sha256="e7e2ccba2dfe2cf10b82e3c75ea971b82a4c62560dc562c43b33f7790127c92f")
+ version("3.3.1", sha256="03531beb01b108b867683762ceaacd0f28efc40cb92eee3c8c988b80cf718bbe")
+ version("3.3.0", sha256="46763bd84696aa5e326734ee0ccfde12bef73b27f1e5e241bbf539cb6411e78d")
+ version("3.2.1", sha256="966abbf0dfc1f9725f6293fb2a04ec83f56cd2a800990b38d1a03041255214a7")
+ version("3.2.0", sha256="e3ff572c872ebb24d2ae62d4e12c3579ccd0019d0f0adaf3cb7dc610e77e84c1")
+ version("3.1.1", sha256="55558ea228dc38e7667874fd2e83eaf7faeb026e2e8615b36a8616830f7e303b")
+ version("3.1.0", sha256="cac46e053f0493da313e7c9b16379a532b1a38f9f19c7a5fe4578759f4c6aa4d")
+ version("3.0.5", sha256="df3d3795e12c3f6035e811c43c13f1eb41e37241796a0fea120ede4ebe1c4496")
+ version("3.0.4", sha256="ff2204792582e3889c51c77722cc6e8258dbb1ece7db192f5a9bcd1887cf3385")
+ version("3.0.3", sha256="1e455a82be63b7fb4f699e26bd1e04b7dbcbf66fa3a799117afca9ab067b5d61")
version("3.0.2", sha256="526b6c053cdd880a33467c5bfd5c460a5bdc0c58869c2683171c2dec2ad3c2d0")
version("3.0.1", sha256="d993721510fa654582132192193f69b1b3165418a6e00a73c3edce615b3cc672")
version("3.0.0", sha256="82a9fa4b32a049b38151d11188ed15d74f21f853f163e78da0950dce1f244ccc")
+ version("2.15.0", sha256="b281ce09226576e0593b8dab0d9e5d42c334e053ce6f4f154dc6cd745ab93d2f")
version("2.14.0", sha256="a845d446b6ae626f61dde5ab2fa952530b6c17b4f9ed03e9362bd20172d00cca")
version("2.13.1", sha256="b3591493cce75a69adef7b192cec6be222e76e2386d132cd4e34aa190b0ecbd5")
version("2.12.0", sha256="6336cebb6b2b0a91f7efd3ff3a9db3a94f2abccf07a40323138afb80826aec62")
@@ -53,55 +74,78 @@ class PyKeras(PythonPackage):
when="@3:",
)
- # setup.py
- depends_on("python@3.9:", type=("build", "run"), when="@3:")
- depends_on("python@3.8:", type=("build", "run"), when="@2.12:")
- depends_on("py-setuptools", type="build")
- depends_on("py-absl-py", type=("build", "run"), when="@2.6:")
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-rich", type=("build", "run"), when="@3:")
- depends_on("py-namex", type=("build", "run"), when="@3:")
- depends_on("py-h5py", type=("build", "run"))
- depends_on("py-dm-tree", type=("build", "run"), when="@3:")
-
- # requirements-common.txt
- depends_on("py-scipy", type=("build", "run"))
- depends_on("py-pandas", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"), when="@3:")
- depends_on("py-protobuf", type=("build", "run"), when="@3:")
-
- # requirements-tensorflow-cuda.txt
- conflicts("backend=tensorflow", msg="Requires TensorFlow 2.16, not yet released")
- # depends_on("py-tensorflow@2.16.0", type=("build", "run"), when="@3.0 backend=tensorflow")
-
- # requirements-jax-cuda.txt
- depends_on("py-jax", type=("build", "run"), when="@3: backend=jax")
-
- # requirements-torch-cuda.txt
- depends_on("py-torch@2.1.1", type=("build", "run"), when="@3.0.1: backend=torch")
- depends_on("py-torch@2.1.0", type=("build", "run"), when="@3.0.0 backend=torch")
- depends_on("py-torchvision@0.16.1", type=("build", "run"), when="@3.0.1: backend=torch")
- depends_on("py-torchvision@0.16.0", type=("build", "run"), when="@3.0.0 backend=torch")
+ with default_args(type="build"):
+ # pyproject.toml
+ depends_on("py-setuptools@61:", when="@3.7:")
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ # pyproject.toml
+ depends_on("python@3.9:", when="@3:")
+ depends_on("python@3.8:", when="@2.12:")
+ depends_on("py-absl-py", when="@2.6:")
+ depends_on("py-numpy")
+ depends_on("py-rich", when="@3:")
+ depends_on("py-namex@0.0.8:", when="@3.3.3:")
+ depends_on("py-namex", when="@3:")
+ depends_on("py-h5py")
+ depends_on("py-optree", when="@3.1:")
+ depends_on("py-ml-dtypes", when="@3.0.5:")
+ depends_on("py-packaging", when="@3.4:")
+
+ # requirements-common.txt
+ depends_on("py-scipy")
+ depends_on("py-pandas")
+ depends_on("py-requests", when="@3:")
+ depends_on("py-protobuf", when="@3:")
+
+ # requirements-tensorflow-cuda.txt
+ with when("backend=tensorflow"):
+ depends_on("py-tensorflow@2.18", when="@3.7:")
+ depends_on("py-tensorflow@2.17", when="@3.5:3.6")
+ depends_on("py-tensorflow@2.16.1:2.16", when="@3.0:3.4")
+
+ # requirements-jax-cuda.txt
+ with when("backend=jax"):
+ depends_on("py-jax@0.4.28", when="@3.6:")
+ depends_on("py-jax@0.4.23", when="@3.0.5:3.5")
+ depends_on("py-jax", when="@3:")
+
+ # requirements-torch-cuda.txt
+ with when("backend=torch"):
+ depends_on("py-torch@2.5.1", when="@3.7:")
+ depends_on("py-torch@2.4.1", when="@3.6")
+ depends_on("py-torch@2.4.0", when="@3.5")
+ depends_on("py-torch@2.2.1", when="@3.1:3.4")
+ depends_on("py-torch@2.1.2", when="@3.0.3:3.0.5")
+ depends_on("py-torch@2.1.1", when="@3.0.1:3.0.2")
+ depends_on("py-torch@2.1.0", when="@3.0.0")
+ depends_on("py-torchvision@0.20.1", when="@3.7:")
+ depends_on("py-torchvision@0.19.1", when="@3.6")
+ depends_on("py-torchvision@0.19.0", when="@3.5")
+ depends_on("py-torchvision@0.17.1", when="@3.1:3.4")
+ depends_on("py-torchvision@0.16.2", when="@3.0.3:3.0.5")
+ depends_on("py-torchvision@0.16.1", when="@3.0.1:3.0.2")
+ depends_on("py-torchvision@0.16.0", when="@3.0.0")
# Historical dependencies
- depends_on("bazel", type="build", when="@2.5:2")
- depends_on("protobuf", type="build", when="@2.5:2")
- depends_on("pil", type=("build", "run"), when="@:2")
- depends_on("py-portpicker", type=("build", "run"), when="@2.10:2")
- depends_on("py-pydot", type=("build", "run"), when="@:2")
- depends_on("py-pyyaml", type=("build", "run"), when="@:2")
- depends_on("py-six", type=("build", "run"), when="@:2")
- for minor_ver in range(6, 15):
- depends_on(
- "py-tensorflow@2.{}".format(minor_ver),
- type=("build", "run"),
- when="@2.{}".format(minor_ver),
- )
- depends_on(
- "py-tensorboard@2.{}".format(minor_ver),
- type=("build", "run"),
- when="@2.{}".format(minor_ver),
- )
+ with default_args(type="build"):
+ depends_on("bazel", when="@2.5:2")
+ depends_on("protobuf", when="@2.5:2")
+
+ with default_args(type=("build", "run")):
+ depends_on("pil", when="@:2")
+ depends_on("py-dm-tree", when="@3.0")
+ # https://github.com/keras-team/keras/issues/19691
+ depends_on("py-numpy@:1", when="@:3.4")
+ depends_on("py-portpicker", when="@2.10:2")
+ depends_on("py-pydot", when="@:2")
+ depends_on("py-pyyaml", when="@:2")
+ depends_on("py-six", when="@:2")
+
+ for minor_ver in range(6, 16):
+ depends_on("py-tensorflow@2.{}".format(minor_ver), when="@2.{}".format(minor_ver))
+ depends_on("py-tensorboard@2.{}".format(minor_ver), when="@2.{}".format(minor_ver))
def url_for_version(self, version):
if version >= Version("3"):
@@ -162,6 +206,5 @@ class PyKeras(PythonPackage):
build_pip_package("--src", buildpath)
with working_dir(buildpath):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
remove_linked_tree(self.tmp_path)
diff --git a/var/spack/repos/builtin/packages/py-kerberos/package.py b/var/spack/repos/builtin/packages/py-kerberos/package.py
index f6f62be681..e63f285941 100644
--- a/var/spack/repos/builtin/packages/py-kerberos/package.py
+++ b/var/spack/repos/builtin/packages/py-kerberos/package.py
@@ -18,8 +18,11 @@ class PyKerberos(PythonPackage):
homepage = "https://github.com/apple/ccs-pykerberos"
pypi = "kerberos/kerberos-1.3.0.tar.gz"
+ version("1.3.1", sha256="cdd046142a4e0060f96a00eb13d82a5d9ebc0f2d7934393ed559bac773460a2c")
version("1.3.0", sha256="f039b7dd4746df56f6102097b3dc250fe0078be75130b9dc4211a85a3b1ec6a4")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("keyutils", when="platform=linux")
depends_on("krb5@1.3.0:")
diff --git a/var/spack/repos/builtin/packages/py-kiwisolver/package.py b/var/spack/repos/builtin/packages/py-kiwisolver/package.py
index 3447cf310f..703af1eef1 100644
--- a/var/spack/repos/builtin/packages/py-kiwisolver/package.py
+++ b/var/spack/repos/builtin/packages/py-kiwisolver/package.py
@@ -21,6 +21,8 @@ class PyKiwisolver(PythonPackage):
version("1.1.0", sha256="53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75")
version("1.0.1", sha256="ce3be5d520b4d2c3e5eeb4cd2ef62b9b9ab8ac6b6fedbaa0e39cdb6f50644278")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@1.2.0:")
depends_on("python@3.7:", type=("build", "run"), when="@1.3.2:")
diff --git a/var/spack/repos/builtin/packages/py-kneaddata/package.py b/var/spack/repos/builtin/packages/py-kneaddata/package.py
new file mode 100644
index 0000000000..6be478c15d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-kneaddata/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyKneaddata(PythonPackage):
+ """
+ Quality control tool on metagenomic and metatranscriptomic sequencing data,
+ especially data from microbiome experiments
+ """
+
+ homepage = "https://github.com/biobakery/kneaddata"
+ pypi = "kneaddata/kneaddata-0.12.0.tar.gz"
+
+ version("0.12.0", sha256="b211bf973ea50cc89dd5935761ca3b101d422cfb62b215aae08f5ed92a624a58")
+
+ maintainers("Pandapip1")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("trimmomatic@0.33", type=("build", "run"))
+ depends_on("bowtie2@2.2:", type=("build", "run"))
+ depends_on("python", type=("build", "run"))
+ depends_on("java", type=("build", "run"))
+
+ variant("bam", default=True, description="Enable support for input files in BAM format")
+ depends_on("samtools", when="+bam", type=("build", "run"))
+
+ variant("trf", default=True, description="Enable support for Tandem Repeats Finder")
+ depends_on("trf", when="+trf", type=("build", "run"))
+
+ variant("fastqc", default=True, description="Enable support for FastQC")
+ depends_on("fastqc", when="+fastqc", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-kombu/package.py b/var/spack/repos/builtin/packages/py-kombu/package.py
index f3ddf98eee..8ebb97fed3 100644
--- a/var/spack/repos/builtin/packages/py-kombu/package.py
+++ b/var/spack/repos/builtin/packages/py-kombu/package.py
@@ -13,7 +13,17 @@ class PyKombu(PythonPackage):
license("BSD-3-Clause")
+ version("5.3.5", sha256="30e470f1a6b49c70dc6f6d13c3e4cc4e178aa6c469ceb6bcd55645385fc84b93")
+ version("5.3.4", sha256="0bb2e278644d11dea6272c17974a3dbb9688a949f3bb60aeb5b791329c44fadc")
+ version("5.3.3", sha256="1491df826cfc5178c80f3e89dd6dfba68e484ef334db81070eb5cb8094b31167")
+ version("5.3.2", sha256="0ba213f630a2cb2772728aef56ac6883dc3a2f13435e10048f6e97d48506dbbd")
+ version("5.3.1", sha256="fbd7572d92c0bf71c112a6b45163153dea5a7b6a701ec16b568c27d0fd2370f2")
+ version("5.3.0", sha256="d084ec1f96f7a7c37ba9e816823bdbc08f0fc7ddb3a5be555805e692102297d8")
+ version("5.2.4", sha256="37cee3ee725f94ea8bb173eaab7c1760203ea53bbebae226328600f9d2799610")
version("5.2.3", sha256="81a90c1de97e08d3db37dbf163eaaf667445e1068c98bfd89f051a40e9f6dbbd")
+ version("5.2.2", sha256="0f5d0763fb916808f617b886697b2be28e6bc35026f08e679697fc814b48a608")
+ version("5.2.1", sha256="f262a2adc71b53e5b7dad4933bbdee65d8766ca4df6a9043b13edaad2144aaec")
+ version("5.1.0", sha256="01481d99f4606f6939cdc9b637264ed353ee9e3e4f62cfb582324142c41a572d")
version("5.0.2", sha256="f4965fba0a4718d47d470beeb5d6446e3357a62402b16c510b6a2f251e05ac3c")
version("4.6.11", sha256="ca1b45faac8c0b18493d02a8571792f3c40291cf2bcf1f55afed3d8f3aa7ba74")
version("4.6.6", sha256="1760b54b1d15a547c9a26d3598a1c8cdaf2436386ac1f5561934bc8a3cbbbd86")
@@ -26,15 +36,19 @@ class PyKombu(PythonPackage):
variant("redis", default=False, description="Use redis transport")
depends_on("py-setuptools", type="build")
- # "pytz>dev" in tests_require: setuptools parser changed in v60 and errors.
- depends_on("py-setuptools@:59", when="@4.6:5.2", type="build")
+ depends_on("py-amqp@2.4", when="@4.3.0:4.5.0", type=("build", "run"))
+ depends_on("py-amqp@2.5.0", when="@4.6.0:4.6.3", type=("build", "run"))
+ depends_on("py-amqp@2.5.1", when="@4.6.4:4.6.5", type=("build", "run"))
+ depends_on("py-amqp@2.5.2:2.5.99", when="@4.6.6:4.6.8", type=("build", "run"))
+ depends_on("py-amqp@2.6.0:2.99", when="@4.6.9:5.0.1", type=("build", "run"))
+ depends_on("py-amqp@5.0.0:5.0.5", when="@5.0.2:5.0.99", type=("build", "run"))
+ depends_on("py-amqp@5.0.6:5.0.8", when="@5.1.0:5.2.2", type=("build", "run"))
+ depends_on("py-amqp@5.0.9:5.1.0", when="@5.2.3:5.2.4", type=("build", "run"))
+ depends_on("py-amqp@5.1.1:5.1.99", when="@5.3.0:5.3.5", type=("build", "run"))
- depends_on("py-amqp@2.5.2:2.5", when="@:4.6.6", type=("build", "run"))
- depends_on("py-amqp@2.6.0:2.6", when="@4.6.7:4", type=("build", "run"))
- depends_on("py-amqp@5.0.0:5", when="@5.0.0:5.0.2", type=("build", "run"))
- depends_on("py-amqp@5.0.9:5.0", when="@5.2.3", type=("build", "run"))
depends_on("py-vine", when="@5.1.0:", type=("build", "run"))
depends_on("py-importlib-metadata@0.18:", type=("build", "run"), when="^python@:3.7")
depends_on("py-cached-property", type=("build", "run"), when="^python@:3.7")
depends_on("py-redis@3.4.1:3,4.0.2:", when="+redis", type=("build", "run"))
+ depends_on("py-backports-zoneinfo@0.2.1:", when="^python@:3.8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-kornia-rs/package.py b/var/spack/repos/builtin/packages/py-kornia-rs/package.py
new file mode 100644
index 0000000000..21f54eb79b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-kornia-rs/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyKorniaRs(PythonPackage):
+ """Low level implementations for computer vision in Rust."""
+
+ homepage = "http://www.kornia.org/"
+ url = "https://github.com/kornia/kornia-rs/archive/refs/tags/v0.1.1.tar.gz"
+
+ license("Apache-2.0")
+ maintainers(
+ "edgarriba",
+ "ducha-aiki",
+ "lferraz",
+ "shijianjian",
+ "cjpurackal",
+ "johnnv1",
+ "adamjstewart",
+ )
+
+ version("0.1.1", sha256="b9ac327fae6e982e6d7df9faeadd1d4f6453e65521819ae9ae5b90e9da0ed1a5")
+ version("0.1.0", sha256="0fca64f901dddff49b72e51fc92a25f0a7606e9a1a72ef283606245ea6b4f90d")
+
+ build_directory = "py-kornia"
+
+ depends_on("py-maturin@1.3.2:", type="build")
+
+ # rav1e needs rustdoc
+ depends_on("rust+dev", type="build")
+
+ # pyo3 needs cmake
+ depends_on("cmake", type="build")
+
+ # turbojpeg-sys needs an assembly compiler
+ depends_on("nasm", type="build")
+
+ # dlpack-rs needs libclang
+ depends_on("llvm+clang")
diff --git a/var/spack/repos/builtin/packages/py-kornia/package.py b/var/spack/repos/builtin/packages/py-kornia/package.py
index 52c8899110..06a0c26298 100644
--- a/var/spack/repos/builtin/packages/py-kornia/package.py
+++ b/var/spack/repos/builtin/packages/py-kornia/package.py
@@ -9,11 +9,24 @@ from spack.package import *
class PyKornia(PythonPackage):
"""Open Source Differentiable Computer Vision Library for PyTorch."""
- homepage = "https://www.kornia.org/"
+ homepage = "http://www.kornia.org/"
pypi = "kornia/kornia-0.5.10.tar.gz"
license("Apache-2.0")
-
+ maintainers(
+ "edgarriba",
+ "ducha-aiki",
+ "lferraz",
+ "shijianjian",
+ "cjpurackal",
+ "johnnv1",
+ "adamjstewart",
+ )
+
+ version("0.7.4", sha256="1f8dd6268ca5a2f2ec04b13c48da4dfb90ba2cfae7e31e0cc80d37f6520fa3f1")
+ version("0.7.3", sha256="0eb861ea5d7e6c3891ae699a8b7103a5783af0a7c41888ca482420dd3d055306")
+ version("0.7.2", sha256="f834ccd51188d071ed286a6727471c94344ea2a718903cc6f0e56a92f9c66ac5")
+ version("0.7.1", sha256="65b54a50f70c1f88240b557fda3fdcc1ab866982a5d062e52213130f5a48465c")
version("0.7.0", sha256="72cba6a0965a15caf10a664647654412effb7c0b9afcf40e458bc005f976ffac")
version("0.6.12", sha256="e30bd3d830226f7a159dff1f7757c6200e8f27d1333f06e9d2f98bdb33ce18d3")
version("0.6.11", sha256="ba77198f2c2e4044c87e4503ff277aadbfc0db20495da5a5289663f380b4be32")
@@ -30,11 +43,11 @@ class PyKornia(PythonPackage):
version("0.5.10", sha256="428b4b934a2ba7360cc6cba051ed8fd96c2d0f66611fdca0834e82845f14f65d")
# pyproject.toml
- depends_on("python@3.8:", when="@0.7:", type=("build", "run"))
depends_on("py-setuptools@61.2:", when="@0.6.11:", type="build")
depends_on("py-setuptools", type="build")
# requirements/requirements.txt
+ depends_on("py-kornia-rs@0.1:", when="@0.7.2:", type=("build", "run"))
depends_on("py-packaging", when="@0.6:", type=("build", "run"))
depends_on("py-torch@1.9.1:", when="@0.6.9:", type=("build", "run"))
depends_on("py-torch@1.8.1:", when="@0.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-krb5/package.py b/var/spack/repos/builtin/packages/py-krb5/package.py
new file mode 100644
index 0000000000..f87a1b7762
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-krb5/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyKrb5(PythonPackage):
+ """Kerberos API bindings for Python."""
+
+ homepage = "https://github.com/jborean93/pykrb5"
+ pypi = "krb5/krb5-0.6.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.7.0", sha256="6a308f2e17d151c395b24e6aec7bdff6a56fe3627a32042fc86d412398a92ddd")
+ version("0.6.0", sha256="712ba092fbe3a28ec18820bb1b1ed2cc1037b75c5c7033f970c6a8c97bbd1209")
+
+ depends_on("python@3.8:", type=("build", "run"), when="@0.7.0:")
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-cython@0.29.32:3", type=("build", "run"))
+ depends_on("krb5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-kubernetes/package.py b/var/spack/repos/builtin/packages/py-kubernetes/package.py
index de2dd819b8..75e44f2405 100644
--- a/var/spack/repos/builtin/packages/py-kubernetes/package.py
+++ b/var/spack/repos/builtin/packages/py-kubernetes/package.py
@@ -18,6 +18,10 @@ class PyKubernetes(PythonPackage):
license("Apache-2.0")
+ version("29.0.0", sha256="c4812e227ae74d07d53c88293e564e54b850452715a59a927e7e1bc6b9a60459")
+ version("28.1.0", sha256="1468069a573430fb1cb5ad22876868f57977930f80a6749405da31cd6086a7e9")
+ version("27.2.0", sha256="d479931c6f37561dbfdf28fc5f46384b1cb8b28f9db344ed4a232ce91990825a")
+ version("26.1.0", sha256="5854b0c508e8d217ca205591384ab58389abdae608576f9c9afc35a3c76a366c")
version("25.3.0", sha256="213befbb4e5aed95f94950c7eed0c2322fc5a2f8f40932e58d28fdd42d90836c")
version("21.7.0", sha256="c9849afc2eafdce60efa210049ee7a94e7ef6cf3a7afa14a69b3bf0447825977")
version("20.13.0", sha256="ce5e881c13dc56f21a243804f90bc3c507af93c380f505c00e392c823968e4de")
@@ -31,7 +35,6 @@ class PyKubernetes(PythonPackage):
version("10.0.1", sha256="3770a496663396ad1def665eeadb947b3f45217a08b64b10c01a57e981ac8592")
version("9.0.0", sha256="a8b0aed55ba946faea660712595a52ae53a8854df773d96f47a63fa0c9d4e3bf")
- depends_on("python@3.6:", type=("build", "run"))
depends_on("py-certifi@14.05.14:", type=("build", "run"))
depends_on("py-six@1.9.0:", type=("build", "run"))
depends_on("py-python-dateutil@2.5.3:", type=("build", "run"))
@@ -42,4 +45,6 @@ class PyKubernetes(PythonPackage):
depends_on("py-websocket-client@0.32:0.39,0.43:", type=("build", "run"))
depends_on("py-requests", type=("build", "run"))
depends_on("py-requests-oauthlib", type=("build", "run"))
+ depends_on("py-oauthlib@3.2.2:", type=("build", "run"), when="@27.2:")
+ depends_on("py-urllib3@1.24.2:1", type=("build", "run"), when="@28.1.0")
depends_on("py-urllib3@1.24.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-langsmith/package.py b/var/spack/repos/builtin/packages/py-langsmith/package.py
index 2066c16a4a..4c08c78aba 100644
--- a/var/spack/repos/builtin/packages/py-langsmith/package.py
+++ b/var/spack/repos/builtin/packages/py-langsmith/package.py
@@ -13,11 +13,19 @@ class PyLangsmith(PythonPackage):
license("MIT")
+ version("0.1.81", sha256="585ef3a2251380bd2843a664c9a28da4a7d28432e3ee8bcebf291ffb8e1f0af0")
+ version(
+ "0.1.1",
+ sha256="09df0c2ca9085105f97a4e4f281b083e312c99d162f3fe2b2d5eefd5c3692e60",
+ expand=False,
+ )
version("0.0.11", sha256="7c1be28257d6c7279c85f81e6d8359d1006af3b1238fc198d13ca75c8fe421c8")
version("0.0.10", sha256="11e5db0d8e29ee5583cabd872eeece8ce50738737b1f52f316ac984f4a1a58c5")
version("0.0.7", sha256="2f18e51cfd4e42f2b3cf00fa87e9d03012eb7269cdafd8e7c0cf7aa828dcc03e")
depends_on("python@3.8.1:3", type=("build", "run"))
depends_on("py-poetry-core", type="build")
- depends_on("py-pydantic@1", type=("build", "run"))
+ depends_on("py-pydantic@1", type=("build", "run"), when="@:0.1.1")
+ depends_on("py-pydantic@1:2", type=("build", "run"), when="@0.1.81:")
depends_on("py-requests@2", type=("build", "run"))
+ depends_on("py-orjson@3.9.14:3", type=("build", "run"), when="@0.1.81:")
diff --git a/var/spack/repos/builtin/packages/py-lap/package.py b/var/spack/repos/builtin/packages/py-lap/package.py
index 61202d4f97..b68ba7ef72 100644
--- a/var/spack/repos/builtin/packages/py-lap/package.py
+++ b/var/spack/repos/builtin/packages/py-lap/package.py
@@ -18,6 +18,8 @@ class PyLap(PythonPackage):
license("BSD-2-Clause")
version("0.4.0", sha256="c4dad9976f0e9f276d8a676a6d03632c3cb7ab7c80142e3b27303d49f0ed0e3b")
+
+ depends_on("cxx", type="build") # generated
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.21:", type="build")
depends_on("py-numpy@1.10.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-laplace-torch/package.py b/var/spack/repos/builtin/packages/py-laplace-torch/package.py
new file mode 100644
index 0000000000..82a95a462c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-laplace-torch/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyLaplaceTorch(PythonPackage):
+ """laplace - Laplace approximations for deep learning."""
+
+ homepage = "https://github.com/aleximmer/Laplace"
+ pypi = "laplace_torch/laplace_torch-0.2.1.tar.gz"
+
+ license("MIT")
+
+ version("0.2.1", sha256="641823a6d3e1dcb8297202b896ae2969334bf96df9a4a6f8cf688896d67d96f2")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@42:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch@2:")
+ depends_on("py-torchvision")
+ depends_on("py-torchaudio")
+ depends_on("py-backpack-for-pytorch")
+ depends_on("py-asdfghjkl@0.1a4")
+ depends_on("py-torchmetrics")
+ depends_on("py-opt-einsum")
+ depends_on("py-curvlinops-for-pytorch@2:")
diff --git a/var/spack/repos/builtin/packages/py-laspy/package.py b/var/spack/repos/builtin/packages/py-laspy/package.py
index babd8bf528..f78b90fa3c 100644
--- a/var/spack/repos/builtin/packages/py-laspy/package.py
+++ b/var/spack/repos/builtin/packages/py-laspy/package.py
@@ -14,6 +14,7 @@ class PyLaspy(PythonPackage):
license("BSD-2-Clause")
+ version("2.5.4", sha256="eebdbf3379afbc0b24e7e4812fac567bff880d1e851f70175d22375aaecdf7e1")
version("2.2.0", sha256="69d36f01acecd719cbe3c3cf58353f247f391ccadb1da37731d45bfe919685df")
version("2.0.3", sha256="95c6367bc3a7c1e0d8dc118ae4a6b038bf9e8ad3e60741ecb8d59c36d32f822a")
@@ -21,3 +22,5 @@ class PyLaspy(PythonPackage):
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/laspy/laspy/pull/313
+ depends_on("py-numpy@:1", when="@:2.5.3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-lazy-loader/package.py b/var/spack/repos/builtin/packages/py-lazy-loader/package.py
index 305eb740c8..641f95875b 100644
--- a/var/spack/repos/builtin/packages/py-lazy-loader/package.py
+++ b/var/spack/repos/builtin/packages/py-lazy-loader/package.py
@@ -14,6 +14,13 @@ class PyLazyLoader(PythonPackage):
license("BSD-3-Clause")
+ version("0.4", sha256="47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1")
+ version("0.3", sha256="3b68898e34f5b2a29daaaac172c6555512d0f32074f147e2254e4a6d9d838f37")
version("0.1", sha256="77ce7f2737ebabf9c0ff73b4a99c947876d74d24c2f026544e32246ecca5feca")
- depends_on("py-flit-core@3.7:3", type="build")
+ depends_on("py-setuptools@61.2:", when="@0.4:", type="build")
+ depends_on("py-packaging", when="@0.4:", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-flit-core@3.8:3", when="@0.3", type="build")
+ depends_on("py-flit-core@3.7:3", when="@0.1", type="build")
diff --git a/var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py b/var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py
index 89cbbfb726..c8b247ad92 100644
--- a/var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py
+++ b/var/spack/repos/builtin/packages/py-lazy-object-proxy/package.py
@@ -20,6 +20,8 @@ class PyLazyObjectProxy(PythonPackage):
version("1.4.3", sha256="f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0")
version("1.3.1", sha256="eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("python@2.7:2.8,3.6:", type=("build", "run"), when="@1.6.0:")
depends_on("python@3.6:", type=("build", "run"), when="@1.7.0:")
diff --git a/var/spack/repos/builtin/packages/py-lhsmdu/package.py b/var/spack/repos/builtin/packages/py-lhsmdu/package.py
index b6386e0b7e..39ee3a8bc2 100644
--- a/var/spack/repos/builtin/packages/py-lhsmdu/package.py
+++ b/var/spack/repos/builtin/packages/py-lhsmdu/package.py
@@ -13,7 +13,7 @@ class PyLhsmdu(PythonPackage):
from Deutsch and Deutsch, Latin hypercube sampling with multidimensional
uniformity."""
- homepage = "http://github.com/sahilm89/lhsmdu"
+ homepage = "https://github.com/sahilm89/lhsmdu"
pypi = "lhsmdu/lhsmdu-1.1.tar.gz"
maintainers("liuyangzhuan")
diff --git a/var/spack/repos/builtin/packages/py-libclang/package.py b/var/spack/repos/builtin/packages/py-libclang/package.py
index 0ce9997290..ce39c4b9b7 100644
--- a/var/spack/repos/builtin/packages/py-libclang/package.py
+++ b/var/spack/repos/builtin/packages/py-libclang/package.py
@@ -16,6 +16,8 @@ class PyLibclang(PythonPackage):
license("Apache-2.0")
+ version("16.0.0", sha256="a3eae57519209ed6fca4e76425f3159e54a08cbb2918d92a7a35640d4c28ec07")
+ version("15.0.6.1", sha256="f8ac6e30868e9eb92bb1001920230381565f9a3cf415411d3b67bb2339640d81")
version("14.0.6", sha256="3666679d9f23270a230a4d4dae49bc48fc2515c272ff5855b2618e23daa50100")
version("14.0.1", sha256="58a255381d6360aca8d4978c8bb2e6be55ac0bdd18bc10372da0febe0a7f9472")
version("13.0.0", sha256="2638e81fe3976f4ad487dc6094dacf306dcb161e11b0830391d58d1ae1e05c80")
@@ -28,7 +30,7 @@ class PyLibclang(PythonPackage):
depends_on("python@2.7:2.8,3.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- for ver in ["9", "10", "11", "13", "14"]:
+ for ver in ["9", "10", "11", "13", "14", "15", "16"]:
depends_on("llvm+clang@" + ver, when="@" + ver, type="build")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py
index 9895ff575c..7c472b0b15 100644
--- a/var/spack/repos/builtin/packages/py-libensemble/package.py
+++ b/var/spack/repos/builtin/packages/py-libensemble/package.py
@@ -12,7 +12,7 @@ class PyLibensemble(PythonPackage):
"""Library for managing ensemble-like collections of computations."""
homepage = "https://libensemble.readthedocs.io"
- pypi = "libensemble/libensemble-1.1.0.tar.gz"
+ pypi = "libensemble/libensemble-1.4.2.tar.gz"
git = "https://github.com/Libensemble/libensemble.git"
maintainers("shuds13", "jlnav")
@@ -21,6 +21,13 @@ class PyLibensemble(PythonPackage):
license("BSD-3-Clause")
version("develop", branch="develop")
+ version("1.4.2", sha256="d283935594333793112f65cec1070137e0a87e31cd2bf1baec4a1261ac06ab63")
+ version("1.4.1", sha256="fd39d5c4010f9cb1728af1666d0f10d0da7dd43c12e411badcbc53aab42ab183")
+ version("1.4.0", sha256="0d9f76175dcd5ca7a5e0076a8e64ea59b504055779100d259114468630e82fa2")
+ version("1.3.0", sha256="4a2f47de9ab57c577f3de5dd849ec1b621effde7206a54b2aa29aaf309c87532")
+ version("1.2.2", sha256="936e34ed4e8129a9980187b21d586472b6362403889a739595d6b631335a8678")
+ version("1.2.1", sha256="b80e77548a1e2a71483352b3b00e22b47191e45ca5741324c2b0f20b05579a3d")
+ version("1.2.0", sha256="e1076e8eea7844d3799f92d136586eca4da34ec753bf41a8d1be04d7a45ec4c1")
version("1.1.0", sha256="3e3ddc4233272d3651e9d62c7bf420018930a4b9b135ef9ede01d5356235c1c6")
version("1.0.0", sha256="b164e044f16f15b68fd565684ad8ce876c93aaeb84e5078f4ea2a29684b110ca")
version("0.10.2", sha256="ef8dfe5d233dcae2636a3d6aa38f3c2ad0f42c65bd38f664e99b3e63b9f86622")
@@ -44,6 +51,9 @@ class PyLibensemble(PythonPackage):
version("0.2.0", sha256="ecac7275d4d0f4a5e497e5c9ef2cd998da82b2c020a0fb87546eeea262f495ff")
version("0.1.0", sha256="0b27c59ae80f7af8b1bee92fcf2eb6c9a8fd3494bf2eb6b3ea17a7c03d3726bb")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Install with MPI") # Optional communications method
# The following variants are for optional built-in generators
@@ -60,6 +70,7 @@ class PyLibensemble(PythonPackage):
depends_on("py-psutil", when="@0.7.1:", type=("build", "run"))
depends_on("py-setuptools", when="@0.10.2:", type="build")
depends_on("py-setuptools", when="@:0.10.1", type=("build", "run"))
+ depends_on("py-pydantic@1.10:", when="@1.2.0:", type=("build", "run"))
depends_on("py-pydantic@:1", when="@0.10:", type=("build", "run"))
depends_on("py-tomli@1.2.1:", when="@1:", type=("build", "run"))
depends_on("py-tomli", when="@0.10:", type=("build", "run"))
@@ -82,7 +93,9 @@ class PyLibensemble(PythonPackage):
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(join_path("examples", "calling_scripts", "regression_tests"))
+ cache_extra_test_sources(
+ self, join_path("examples", "calling_scripts", "regression_tests")
+ )
def run_tutorial_script(self, script):
"""run the tutorial example regression test"""
@@ -95,7 +108,6 @@ class PyLibensemble(PythonPackage):
if not os.path.isfile(exe):
raise SkipTest(f"{script} is missing")
- python = self.spec["python"].command
python(exe, "--comms", "local", "--nworkers", "2")
def test_uniform_sampling(self):
diff --git a/var/spack/repos/builtin/packages/py-libsonata/package.py b/var/spack/repos/builtin/packages/py-libsonata/package.py
new file mode 100644
index 0000000000..da74fde4f2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-libsonata/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyLibsonata(PythonPackage):
+ """SONATA files reader"""
+
+ homepage = "https://github.com/BlueBrain/libsonata"
+ git = "https://github.com/BlueBrain/libsonata.git"
+ pypi = "libsonata/libsonata-0.1.14.tar.gz"
+
+ maintainers("tristan0x")
+
+ version("master", branch="master")
+ version("0.1.29", sha256="321878f28c7d64a65683443f832dfa2f21ff8ed69e700d2dde62ccb5f87d4525")
+ version("0.1.25", sha256="b332efa718123ee265263e1583a5998eaa945a13b8a22903873764cf1d8173fa")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("python@3.9:", type=("build", "run"), when="@0.1.29:")
+
+ depends_on("catch2@2.13:", type="test")
+ depends_on("cmake@3.16:", type="build")
+ depends_on("fmt@7.1:")
+ depends_on("hdf5@1.14:")
+ depends_on("highfive@2.9:")
+ depends_on("nlohmann-json@3.9.1")
+ depends_on("py-pybind11@2.11.1:")
+
+ depends_on("py-numpy@1.17.3:", type=("build", "run"))
+ depends_on("py-setuptools@42:", type="build", when="@0.1:")
+ depends_on("py-setuptools-scm@3.4:", type="build", when="@0.1:")
+
+ def patch(self):
+ filter_file("-DEXTLIB_FROM_SUBMODULES=ON", "-DEXTLIB_FROM_SUBMODULES=OFF", "setup.py")
diff --git a/var/spack/repos/builtin/packages/py-lightgbm/package.py b/var/spack/repos/builtin/packages/py-lightgbm/package.py
index 0596e07ecc..cb4a17d8ee 100644
--- a/var/spack/repos/builtin/packages/py-lightgbm/package.py
+++ b/var/spack/repos/builtin/packages/py-lightgbm/package.py
@@ -17,6 +17,8 @@ class PyLightgbm(PythonPackage):
version("3.1.1", sha256="babece2e3613e97748a67ed45387bb0e984bdb1f4126e39f010fbfe7503c7b20")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Build with mpi support")
depends_on("py-setuptools", type="build")
@@ -24,6 +26,9 @@ class PyLightgbm(PythonPackage):
depends_on("py-pip@:23.0", when="+mpi", type="build")
depends_on("py-wheel", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/microsoft/LightGBM/issues/6454
+ # https://github.com/microsoft/LightGBM/pull/6439
+ depends_on("py-numpy@:1", when="@:4.3", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-scikit-learn@:0.21,0.22.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-lightly/package.py b/var/spack/repos/builtin/packages/py-lightly/package.py
index 04d06b663d..81fe84015f 100644
--- a/var/spack/repos/builtin/packages/py-lightly/package.py
+++ b/var/spack/repos/builtin/packages/py-lightly/package.py
@@ -17,6 +17,10 @@ class PyLightly(PythonPackage):
license("MIT")
+ version("1.5.11", sha256="2c19c0e5841b7477323ef3ffca234a60a57c0aaf6753a55c2a75d72cde9c0719")
+ version("1.5.0", sha256="db49e2bafe3bc70df7f3248ad08bef4948e957c1bc5cde3769ec2b190b51eedb")
+ version("1.4.26", sha256="7bbcf0a358f23659eb4089043c559c4584ef339266b1c0a9a2598c3100f2f3b8")
+ version("1.4.25", sha256="c16449ee5788a7ac98dd78c1fa32702a426c718519d79522d726469d6ca119a0")
version("1.4.18", sha256="41794f6815db178b031236793b379e5573e074fdf730506872b73766396a6bdf")
version("1.4.17", sha256="1533ddf28c8a08b3eafd404964d03f9a62fe76405fcf8dc7206ca4093725285e")
version("1.4.16", sha256="9bd2af53e144e4f9823409cd33b39651f579ed671ff242a1445640c9df504d92")
@@ -31,42 +35,60 @@ class PyLightly(PythonPackage):
version("1.4.7", sha256="dce719996d9b01b2a3c652e9cbab3ff80d078c4ed86d1adb39220d20e1f3fdf2")
version("1.4.6", sha256="1c8b904a96fadaefbaa00296eea0ac1e8b50cb10e94595c74b0abada5f4f5a64")
version("1.4.5", sha256="67b1de64950ff5bc35ef86fec3049f437ed1c9cb4a191c43b52384460207535f")
- version("1.4.4", sha256="e726120437ee61754da8e1c384d2ed27d9a7004e037c74d98e3debbc98cbd4a4")
- version("1.4.3", sha256="ff2cfded234bc5338519bdb2de774c59a55200159f4429b009b7a3923bc0be0e")
- version("1.4.2", sha256="bae451fcd04fbd3cc14b044a2583ae24591533d4a8a6ff51e5f1477f9a077648")
- version("1.4.1", sha256="4c64657639c66ee5c8b4b8d300fc9b5287dc7e14a260f3a2e04917dca7f57f5b")
+ version(
+ "1.4.4",
+ sha256="e726120437ee61754da8e1c384d2ed27d9a7004e037c74d98e3debbc98cbd4a4",
+ deprecated=True,
+ )
+ version(
+ "1.4.3",
+ sha256="ff2cfded234bc5338519bdb2de774c59a55200159f4429b009b7a3923bc0be0e",
+ deprecated=True,
+ )
+ version(
+ "1.4.2",
+ sha256="bae451fcd04fbd3cc14b044a2583ae24591533d4a8a6ff51e5f1477f9a077648",
+ deprecated=True,
+ )
+ version(
+ "1.4.1",
+ sha256="4c64657639c66ee5c8b4b8d300fc9b5287dc7e14a260f3a2e04917dca7f57f5b",
+ deprecated=True,
+ )
- # setup.py
- depends_on("py-setuptools@21:", when="@1.4.2:", type="build")
+ with default_args(type="build"):
+ depends_on("py-setuptools@21:", when="@1.4.2:")
+ depends_on("py-setuptools-scm", when="@1.5.11:")
- # requirements/base.txt
- depends_on("py-certifi@14.05.14:", type=("build", "run"))
- depends_on("py-hydra-core@1:", type=("build", "run"))
- depends_on("py-lightly-utils@0.0", type=("build", "run"))
- depends_on("py-numpy@1.18.1:", type=("build", "run"))
- depends_on("py-python-dateutil@2.5.3:", type=("build", "run"))
- depends_on("py-requests@2.23:", type=("build", "run"))
- depends_on("py-six@1.10:", type=("build", "run"))
- depends_on("py-tqdm@4.44:", type=("build", "run"))
- depends_on("py-urllib3@1.15.1:", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("py-certifi@14.05.14:")
+ depends_on("py-hydra-core@1:")
+ depends_on("py-lightly-utils@0.0")
+ depends_on("py-numpy@1.18.1:")
+ depends_on("py-python-dateutil@2.5.3:")
+ depends_on("py-requests@2.23:")
+ depends_on("py-six@1.10:")
+ depends_on("py-tqdm@4.44:")
+ depends_on("py-torch")
+ depends_on("py-torch@:1", when="@:1.4.1")
+ depends_on("py-torchvision")
+ depends_on("py-pytorch-lightning@1.0.4:")
+ depends_on("py-pytorch-lightning@1.0.4:1", when="@:1.4.1")
+ depends_on("py-urllib3@1.25.3:", when="@1.4.8:")
+ depends_on("py-urllib3@1.15.1:")
+ depends_on("py-pydantic@1.10.5:", when="@1.5.11:")
+ depends_on("py-pydantic@1.10.5:1", when="@1.4.8:1.5.0")
+ depends_on("py-aenum@3.1.11:", when="@1.4.8:")
- # requirements/openapi.txt
- depends_on("py-python-dateutil@2.5.3:", when="@1.4.8:", type=("build", "run"))
- depends_on("py-setuptools@21:", when="@1.4.15:", type=("build", "run"))
- depends_on("py-urllib3@1.25.3:", when="@1.4.8:", type=("build", "run"))
- depends_on("py-pydantic@1.10.5:1", when="@1.4.8:", type=("build", "run"))
- depends_on("py-aenum@3.1.11:", when="@1.4.8:", type=("build", "run"))
+ # Historical dependencies
+ depends_on("py-setuptools@21:", when="@1.4.8,1.4.15:1.4.25")
+ depends_on("py-setuptools@21:65.5.1", when="@:1.4.1")
- # requirements/torch.txt
- depends_on("py-torch", type=("build", "run"))
- depends_on("py-torch@:1", when="@:1.4.1", type=("build", "run"))
- depends_on("py-torchvision", type=("build", "run"))
- depends_on("py-pytorch-lightning@1.0.4:", type=("build", "run"))
- depends_on("py-pytorch-lightning@1.0.4:1", when="@:1.4.1", type=("build", "run"))
+ # https://github.com/lightly-ai/lightly/issues/1558
+ depends_on("py-numpy@:1", when="@:1.5.10")
- # https://github.com/lightly-ai/lightly/issues/1153
- depends_on("py-torch+distributed", when="@:1.4.4", type=("build", "run"))
+ # https://github.com/lightly-ai/lightly/issues/1153
+ depends_on("py-torch+distributed", when="@:1.4.4")
- # Historical dependencies
- depends_on("py-setuptools@21:", when="@1.4.8", type=("build", "run"))
- depends_on("py-setuptools@21:65.5.1", when="@:1.4.1", type=("build", "run"))
+ # https://github.com/microsoft/torchgeo/issues/1824
+ conflicts("py-timm@:0.9.8", when="@1.4.26")
diff --git a/var/spack/repos/builtin/packages/py-lightning-api-access/package.py b/var/spack/repos/builtin/packages/py-lightning-api-access/package.py
index a61f0f87a5..75c6533d7f 100644
--- a/var/spack/repos/builtin/packages/py-lightning-api-access/package.py
+++ b/var/spack/repos/builtin/packages/py-lightning-api-access/package.py
@@ -15,8 +15,4 @@ class PyLightningApiAccess(PythonPackage):
url = "https://files.pythonhosted.org/packages/py3/l/lightning-api-access/lightning_api_access-0.0.5-py3-none-any.whl"
list_url = "https://pypi.org/simple/lightning-api-access/"
- version(
- "0.0.5",
- sha256="08657fee636377534332df92e0bee893d46cb877f9642cba09ce560aed95fd40",
- expand=False,
- )
+ version("0.0.5", sha256="08657fee636377534332df92e0bee893d46cb877f9642cba09ce560aed95fd40")
diff --git a/var/spack/repos/builtin/packages/py-lightning-uq-box/package.py b/var/spack/repos/builtin/packages/py-lightning-uq-box/package.py
new file mode 100644
index 0000000000..ec4eab6acc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-lightning-uq-box/package.py
@@ -0,0 +1,47 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyLightningUqBox(PythonPackage):
+ """Lighning-UQ-Box: A toolbox for uncertainty quantification in deep learning."""
+
+ homepage = "https://github.com/lightning-uq-box/lightning-uq-box"
+ pypi = "lightning-uq-box/lightning-uq-box-0.1.0.tar.gz"
+ git = "https://github.com/lightning-uq-box/lightning-uq-box.git"
+
+ license("Apache-2.0")
+ maintainers("nilsleh", "adamjstewart")
+
+ version("main", branch="main")
+ version("0.1.0", sha256="ce44860db75b4fbe487a009bee91c886be2e1835edee93479a6a8633ef2152b1")
+
+ depends_on("py-setuptools@61:", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@0.2:")
+ depends_on("python@3.9:")
+ depends_on("py-einops@0.3:")
+ depends_on("py-lightning@2.4:", when="@0.2:")
+ depends_on("py-lightning@2.1.1:")
+ depends_on("py-matplotlib@3.5:", when="@0.2:")
+ depends_on("py-matplotlib@3.3.3:")
+ depends_on("py-numpy@1.21.1:", when="@0.2:")
+ depends_on("py-numpy@1.19.3:")
+ depends_on("py-pandas@1.1.3:")
+ depends_on("py-torch@2:")
+ depends_on("py-torchmetrics@1.2:")
+ depends_on("py-torchvision@0.16.1:")
+ depends_on("py-scikit-learn@1.3:")
+ depends_on("py-gpytorch@1.11:")
+ depends_on("py-laplace-torch@0.2.1:", when="@0.2:")
+ depends_on("py-laplace-torch@0.1:")
+ depends_on("py-uncertainty-toolbox@0.1.1:")
+ depends_on("py-kornia@0.6.9:")
+ depends_on("py-timm@0.9.2:")
+ depends_on("py-torchseg@0.0.1:")
+ depends_on("py-h5py@3.12.1:", when="@0.2:")
+ depends_on("py-ema-pytorch@0.7:", when="@0.2:")
diff --git a/var/spack/repos/builtin/packages/py-lightning-utilities/package.py b/var/spack/repos/builtin/packages/py-lightning-utilities/package.py
index f93c80f2ec..36502f236c 100644
--- a/var/spack/repos/builtin/packages/py-lightning-utilities/package.py
+++ b/var/spack/repos/builtin/packages/py-lightning-utilities/package.py
@@ -16,6 +16,7 @@ class PyLightningUtilities(PythonPackage):
license("Apache-2.0")
+ version("0.11.2", sha256="adf4cf9c5d912fe505db4729e51d1369c6927f3a8ac55a9dff895ce5c0da08d9")
version("0.8.0", sha256="8e5d95c7c57f026cdfed7c154303e88c93a7a5e868c9944cb02cf71f1db29720")
version(
"0.6.0.post0", sha256="6f02cfe59e6576487e709a0e66e07671563bde9e21b40e1c567918e4d753278c"
@@ -26,13 +27,11 @@ class PyLightningUtilities(PythonPackage):
version("0.4.0", sha256="961c29774c2c8303e0a2f6e6512a2e21e1d8acaf6df182865667af4a51bc176c")
version("0.3.0", sha256="d769ab9b76ebdee3243d1051d509aafee57d7947734ddc22977deef8a6427f2f")
- # setup.py
- depends_on("py-setuptools", type=("build", "run"))
-
- # requirements/base.txt
+ # requirements/core.txt
depends_on("py-importlib-metadata@4:", when="@0.4.1: ^python@:3.7", type=("build", "run"))
depends_on("py-packaging@17.1:", when="@0.6.0.post0:", type=("build", "run"))
depends_on("py-packaging@20:", when="@0.5:0.6.0.a", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
depends_on("py-typing-extensions", when="@0.5:", type=("build", "run"))
# Historical dependencies
diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py
index 2abba277d9..f48326981f 100644
--- a/var/spack/repos/builtin/packages/py-lightning/package.py
+++ b/var/spack/repos/builtin/packages/py-lightning/package.py
@@ -7,9 +7,9 @@ from spack.package import *
class PyLightning(PythonPackage):
- """The Deep Learning framework to train, deploy, and ship AI products Lightning fast."""
+ """The deep learning framework to pretrain, finetune and deploy AI models."""
- homepage = "https://github.com/Lightning-AI/lightning"
+ homepage = "https://github.com/Lightning-AI/pytorch-lightning"
pypi = "lightning/lightning-2.0.0.tar.gz"
skip_modules = ["lightning.app", "lightning.data", "lightning.store"]
@@ -17,6 +17,18 @@ class PyLightning(PythonPackage):
license("Apache-2.0")
+ version("2.4.0", sha256="9156604cc56e4b2b603f34fa7f0fe5107375c8e6d85e74544b319a15faa9ed0e")
+ version("2.3.3", sha256="7f454711895c1c6e455766f01fa39522e25e5ab54c15c5e5fbad342fa92bc93c")
+ version("2.3.2", sha256="6d02862e7e8c9e6903c06314296d0950e677f7e67ad615c3262fe7c73d95f4b8")
+ version("2.3.1", sha256="29cf87270a1779984d3614f7f748af57e3695396a25e814119840894505c334c")
+ version("2.3.0", sha256="4bb4d6e3650d2d5f544ad60853a22efc4e164aa71b9596d13f0454b29df05130")
+ version("2.2.5", sha256="a6c31a2052fc30fee34aec7e31ea2a117a005d049c3593fc9cfb867a34f962bf")
+ version("2.2.4", sha256="4cc3fb3edf04fcd63c0ecf75087d2fa06163759fc8c1fc500b16404ac1854f77")
+ version("2.2.3", sha256="9f208d57ad9c1ae40918136dbef673f02d8e9ab519d33237a6e74984bcd73d96")
+ version("2.2.2", sha256="799e933bf51f3f10516b3f1acf3650e4bc063682eb5b5dc9dcbd1ebd38e03e3a")
+ version("2.2.1", sha256="b3e46d596b32cafd1fb9b21fdba1b1767df97b1af5cc702693d1c51df60b19aa")
+ version("2.2.0", sha256="acf47bebc924f443f90a860b84a3f5566933a930adde42e3021abb5cf466c45f")
+ version("2.1.4", sha256="0e45098c700fa28c604a11ae233ce181b44aeffce2404debebc2616118431d9f")
version("2.1.3", sha256="70867a59e6b67e7720958ceb14476a2a00f34c12ad03680faed3163ed70138e2")
version("2.1.2", sha256="3b2599a8a719916cb03526e6570356809729680c6cda09391232e2aba0a4ed4b")
version("2.1.1", sha256="865491940d20a9754eac7494aa18cab893e0c2b31e83743349eeeaf31dfb52db")
@@ -31,75 +43,91 @@ class PyLightning(PythonPackage):
version("2.0.2", sha256="fa32d671850a5be2d961c6705c927f6f48d1cf9696f61f7d865244142e684430")
version("2.0.1", sha256="abf4f9e10b0d97348336038db79f4efc75daa2f3f81876822273023294d6ef3e")
version("2.0.0", sha256="dfe158aa91ac139d8bdfccc7cdb627072e0052076ae9c0459c8fa12a028dbe6c")
- version("1.9.5", sha256="4a6ee1bf338f7677f04d339b84dd0c9c0fa407c3dacea366a111dc86476d4dec")
+ version(
+ "1.9.5",
+ sha256="4a6ee1bf338f7677f04d339b84dd0c9c0fa407c3dacea366a111dc86476d4dec",
+ deprecated=True,
+ )
- # src/lightning/__setup__.py
- depends_on("python@3.8:", when="@2:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- # src/lightning.egg-info/requires.txt
- depends_on("py-pyyaml@5.4:7", type=("build", "run"))
- depends_on("py-fsspec@2022.5:2024+http", when="@2.1.3:", type=("build", "run"))
- depends_on("py-fsspec@2021.6.1:2024+http", when="@2.1.0:2.1.2", type=("build", "run"))
- depends_on("py-fsspec@2022.5:2024+http", when="@2.0.5:2.0", type=("build", "run"))
- depends_on("py-fsspec@2022.5:2023+http", when="@:2.0.4", type=("build", "run"))
- depends_on("py-lightning-utilities@0.8:1", when="@2.1:", type=("build", "run"))
- depends_on("py-lightning-utilities@0.7:1", when="@2.0", type=("build", "run"))
- depends_on("py-lightning-utilities@0.6.0.post0:1", when="@:1", type=("build", "run"))
- depends_on("py-numpy@1.17.2:2", type=("build", "run"))
- depends_on("py-packaging@20:24", when="@2.1:", type=("build", "run"))
- depends_on("py-packaging@17.1:24", when="@:2.0", type=("build", "run"))
- depends_on("py-torch@1.12:3", when="@2.1:", type=("build", "run"))
- depends_on("py-torch@1.11:3", when="@2.0", type=("build", "run"))
- depends_on("py-torch@1.10:3", when="@:1", type=("build", "run"))
- depends_on("py-torchmetrics@0.7:2", when="@2.0.9:", type=("build", "run"))
- depends_on("py-torchmetrics@0.7:1", when="@:2.0.8", type=("build", "run"))
- depends_on("py-tqdm@4.57:5", type=("build", "run"))
- depends_on("py-typing-extensions@4:5", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ # src/lightning/__setup__.py
+ depends_on("python@3.9:", when="@2.4:")
+ depends_on("python@3.8:", when="@2:")
- # Only an alias, not actually used by the library
- # depends_on("py-pytorch-lightning", when="@2:", type=("build", "run"))
+ # src/lightning.egg-info/requires.txt
+ depends_on("py-pyyaml@5.4:7")
+ depends_on("py-fsspec@2022.5:2025+http", when="@2.3:")
+ depends_on("py-fsspec@2022.5:2024+http", when="@2.1.3:2.2")
+ depends_on("py-fsspec@2021.6.1:2024+http", when="@2.1.0:2.1.2")
+ depends_on("py-fsspec@2022.5:2024+http", when="@2.0.5:2.0")
+ depends_on("py-fsspec@2022.5:2023+http", when="@:2.0.4")
+ depends_on("py-lightning-utilities@0.10:1", when="@2.4:")
+ depends_on("py-lightning-utilities@0.8:1", when="@2.1:2.3")
+ depends_on("py-lightning-utilities@0.7:1", when="@2.0")
+ depends_on("py-lightning-utilities@0.6.0.post0:1", when="@:1")
+ depends_on("py-packaging@20:24", when="@2.1:")
+ depends_on("py-packaging@17.1:24", when="@:2.0")
+ depends_on("py-torch@2.1:3", when="@2.4:")
+ depends_on("py-torch@2:3", when="@2.3")
+ depends_on("py-torch@1.13:3", when="@2.2:")
+ depends_on("py-torch@1.12:3", when="@2.1")
+ depends_on("py-torch@1.11:3", when="@2.0")
+ depends_on("py-torch@1.10:3", when="@:1")
+ depends_on("py-torchmetrics@0.7:2", when="@2.0.9:")
+ depends_on("py-torchmetrics@0.7:1", when="@:2.0.8")
+ depends_on("py-tqdm@4.57:5")
+ depends_on("py-typing-extensions@4.4:5", when="@2.2:")
+ depends_on("py-typing-extensions@4:5")
- # Historical requirements
- with when("@:2.0"):
- depends_on("py-jinja2@:4", type=("build", "run"))
- depends_on("py-arrow@1.2:2", type=("build", "run"))
- depends_on("py-backoff@2.2.1:3", when="@2.0.5:", type=("build", "run"))
- depends_on("py-beautifulsoup4@4.8:5", type=("build", "run"))
- depends_on("py-click@:9", type=("build", "run"))
- depends_on("py-croniter@1.3:1.4", when="@2.0.5:", type=("build", "run"))
- depends_on("py-croniter@1.3", when="@:2.0.4", type=("build", "run"))
- depends_on("py-dateutils@:1", type=("build", "run"))
- depends_on("py-deepdiff@5.7:7", type=("build", "run"))
- depends_on("py-fastapi@0.92:1", when="@2.0.4:", type=("build", "run"))
- depends_on("py-fastapi@0.69:0.88", when="@2.0.3", type=("build", "run"))
- depends_on("py-fastapi@:0.88", when="@:2.0.2", type=("build", "run"))
- depends_on("py-inquirer@2.10:4", type=("build", "run"))
- depends_on("py-lightning-cloud@0.5.38:", when="@2.0.9:", type=("build", "run"))
- depends_on("py-lightning-cloud@0.5.37:", when="@2.0.5:", type=("build", "run"))
- depends_on("py-lightning-cloud@0.5.34:", when="@2.0.3:", type=("build", "run"))
- depends_on("py-lightning-cloud@0.5.31:", when="@2:", type=("build", "run"))
- depends_on("py-lightning-cloud@0.5.27:", when="@:1", type=("build", "run"))
- depends_on("py-psutil@:6", type=("build", "run"))
- depends_on("py-pydantic@1.7.4:2.1", when="@2.0.7:", type=("build", "run"))
- depends_on("py-pydantic@1.7.4:2.0", when="@2.0.6", type=("build", "run"))
- depends_on("py-pydantic@1.7.4:1", when="@2.0.5", type=("build", "run"))
- depends_on("py-pydantic@1.7.4:3", when="@2.0.3:2.0.4", type=("build", "run"))
- depends_on("py-pydantic@:2", when="@:2.0.2", type=("build", "run"))
- depends_on("py-python-multipart@0.0.5:1", type=("build", "run"))
- depends_on("py-requests@:3", type=("build", "run"))
- depends_on("py-rich@12.3:14", when="@2:", type=("build", "run"))
- depends_on("py-rich@:14", when="@:1", type=("build", "run"))
- depends_on("py-starlette", when="@2.0.3:", type=("build", "run"))
- depends_on("py-starlette@:1", when="@:2.0.2", type=("build", "run"))
- depends_on("py-starsessions@1.2.1:1", type=("build", "run"))
- depends_on("py-traitlets@5.3:6", type=("build", "run"))
- depends_on("py-urllib3@:3", when="@2.0.4:", type=("build", "run"))
- depends_on("py-urllib3@:2", when="@:2.0.3", type=("build", "run"))
- depends_on("py-uvicorn@:1", type=("build", "run"))
- depends_on("py-websocket-client@:2", type=("build", "run"))
- depends_on("py-websockets@:12", when="@2.0.5:", type=("build", "run"))
- depends_on("py-websockets@:11", when="@:2.0.4", type=("build", "run"))
+ # Only an alias, not actually used by the library
+ # depends_on("py-pytorch-lightning", when="@2:")
+
+ # Historical requirements
+ # https://github.com/Lightning-AI/pytorch-lightning/pull/20081
+ depends_on("py-setuptools", when="@:2.3")
+ depends_on("py-numpy@1.17.2:2", when="@:2.3")
+
+ with when("@:2.0"):
+ depends_on("py-jinja2@:4")
+ depends_on("py-arrow@1.2:2")
+ depends_on("py-backoff@2.2.1:3", when="@2.0.5:")
+ depends_on("py-beautifulsoup4@4.8:5")
+ depends_on("py-click@:9")
+ depends_on("py-croniter@1.3:1.4", when="@2.0.5:")
+ depends_on("py-croniter@1.3", when="@:2.0.4")
+ depends_on("py-dateutils@:1")
+ depends_on("py-deepdiff@5.7:7")
+ depends_on("py-fastapi@0.92:1", when="@2.0.4:")
+ depends_on("py-fastapi@0.69:0.88", when="@2.0.3")
+ depends_on("py-fastapi@:0.88", when="@:2.0.2")
+ depends_on("py-inquirer@2.10:4")
+ depends_on("py-lightning-cloud@0.5.38:", when="@2.0.9:")
+ depends_on("py-lightning-cloud@0.5.37:", when="@2.0.5:")
+ depends_on("py-lightning-cloud@0.5.34:", when="@2.0.3:")
+ depends_on("py-lightning-cloud@0.5.31:", when="@2:")
+ depends_on("py-lightning-cloud@0.5.27:", when="@:1")
+ depends_on("py-psutil@:6")
+ depends_on("py-pydantic@1.7.4:2.1", when="@2.0.7:")
+ depends_on("py-pydantic@1.7.4:2.0", when="@2.0.6")
+ depends_on("py-pydantic@1.7.4:1", when="@2.0.5")
+ depends_on("py-pydantic@1.7.4:3", when="@2.0.3:2.0.4")
+ depends_on("py-pydantic@:2", when="@:2.0.2")
+ depends_on("py-python-multipart@0.0.5:1")
+ depends_on("py-requests@:3")
+ depends_on("py-rich@12.3:14", when="@2:")
+ depends_on("py-rich@:14", when="@:1")
+ depends_on("py-starlette", when="@2.0.3:")
+ depends_on("py-starlette@:1", when="@:2.0.2")
+ depends_on("py-starsessions@1.2.1:1")
+ depends_on("py-traitlets@5.3:6")
+ depends_on("py-urllib3@:3", when="@2.0.4:")
+ depends_on("py-urllib3@:2", when="@:2.0.3")
+ depends_on("py-uvicorn@:1")
+ depends_on("py-websocket-client@:2")
+ depends_on("py-websockets@:12", when="@2.0.5:")
+ depends_on("py-websockets@:11", when="@:2.0.4")
# https://github.com/Lightning-AI/lightning/issues/18858
conflicts("^py-torch~distributed", when="@2.1.0")
diff --git a/var/spack/repos/builtin/packages/py-ligo-segments/package.py b/var/spack/repos/builtin/packages/py-ligo-segments/package.py
index 0182330d79..491c7468a4 100644
--- a/var/spack/repos/builtin/packages/py-ligo-segments/package.py
+++ b/var/spack/repos/builtin/packages/py-ligo-segments/package.py
@@ -15,5 +15,7 @@ class PyLigoSegments(PythonPackage):
version("1.2.0", sha256="5edbcb88cae007c4e154a61cb2c9d0a6d6d4016c1ecaf0a59a667a267bd20e7a")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-six", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch b/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch
new file mode 100644
index 0000000000..50f9c8b9dd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-line-profiler/gettimeofday_py39.patch
@@ -0,0 +1,24 @@
+--- spack-src/timers.c.orig 2024-03-12 23:42:29.017345816 -0700
++++ spack-src/timers.c 2024-03-12 23:43:55.329454579 -0700
+@@ -32,9 +32,6 @@
+
+ #else /* !MS_WINDOWS */
+
+-#ifndef HAVE_GETTIMEOFDAY
+-#error "This module requires gettimeofday() on non-Windows platforms!"
+-#endif
+
+ #if (defined(PYOS_OS2) && defined(PYCC_GCC))
+ #include <sys/time.h>
+@@ -48,11 +45,7 @@
+ {
+ struct timeval tv;
+ PY_LONG_LONG ret;
+-#ifdef GETTIMEOFDAY_NO_TZ
+- gettimeofday(&tv);
+-#else
+ gettimeofday(&tv, (struct timezone *)NULL);
+-#endif
+ ret = tv.tv_sec;
+ ret = ret * 1000000 + tv.tv_usec;
+ return ret;
diff --git a/var/spack/repos/builtin/packages/py-line-profiler/package.py b/var/spack/repos/builtin/packages/py-line-profiler/package.py
index 8adc110618..4001fef2e0 100644
--- a/var/spack/repos/builtin/packages/py-line-profiler/package.py
+++ b/var/spack/repos/builtin/packages/py-line-profiler/package.py
@@ -11,18 +11,31 @@ from spack.package import *
class PyLineProfiler(PythonPackage):
"""Line-by-line profiler."""
- homepage = "https://github.com/rkern/line_profiler"
+ homepage = "https://github.com/pyutils/line_profiler"
pypi = "line_profiler/line_profiler-2.0.tar.gz"
license("PSF-2.0")
+ version("4.1.2", sha256="aa56578b0ff5a756fe180b3fda7bd67c27bbd478b3d0124612d8cf00e4a21df2")
+ version("3.5.1", sha256="77400208bfbd5d4341938a9a3a4fb5194f5af7fc23b2d496c913755f8310e8b8")
version("2.1.2", sha256="efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c")
version("2.0", sha256="739f8ad0e4bcd0cb82e99afc09e00a0351234f6b3f0b1f7f0090a8a2fbbf8381")
+ depends_on("c", type="build") # generated
+
+ # see pyproject.toml
depends_on("python@2.5:", type=("build", "run"))
+ depends_on("python@:3.10", type=("build", "run"), when="@:3")
depends_on("py-setuptools", type="build")
- depends_on("py-cython", type="build")
+ depends_on("py-setuptools@68.2.2", type="build", when="@4.1.2:")
+ depends_on("py-cython@0.29.24:2", type="build", when="@:4.1.1")
+ depends_on("py-cython@3.0.3:", type="build", when="@4.1.2:")
depends_on("py-ipython@0.13:", type=("build", "run"))
+ depends_on("cmake", type="build", when="@3")
+ depends_on("ninja", type="build", when="@3")
+ depends_on("py-scikit-build@0.9.0:", type="build", when="@3")
+
+ patch("gettimeofday_py39.patch", when="@:2.1.2 ^python@3.9:")
# See https://github.com/rkern/line_profiler/issues/166
@run_before("install")
diff --git a/var/spack/repos/builtin/packages/py-linear-operator/package.py b/var/spack/repos/builtin/packages/py-linear-operator/package.py
index 00c7899413..89034f15c7 100644
--- a/var/spack/repos/builtin/packages/py-linear-operator/package.py
+++ b/var/spack/repos/builtin/packages/py-linear-operator/package.py
@@ -17,6 +17,7 @@ class PyLinearOperator(PythonPackage):
license("MIT")
+ version("0.5.3", sha256="16122661cd8b8a89ea965c845f650affe0f688f315893bb8dfa1182f148a1a41")
version("0.4.0", sha256="7c57c9f8f258c9785c0db4dd7625f4dd03a340313d7314cba0b633644909f5c6")
version("0.3.0", sha256="84bf572631a7e1576de6920d81600ca0fedcf6bda2f29dbaf440d6e72ce6abab")
version("0.1.1", sha256="81adc1aea9e98f3c4f07f5608eb77b689bc61793e9beebfea82155e9237bf1be")
@@ -26,3 +27,5 @@ class PyLinearOperator(PythonPackage):
depends_on("py-setuptools-scm", type="build")
depends_on("py-torch@1.11:", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-jaxtyping@0.2.19", when="@0.5.3:", type=("build", "run"))
+ depends_on("py-mpmath@0.19:1.3", when="@0.5.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-linkchecker/package.py b/var/spack/repos/builtin/packages/py-linkchecker/package.py
new file mode 100644
index 0000000000..ac0de717a6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-linkchecker/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyLinkchecker(PythonPackage):
+ """Check for broken links in web sites."""
+
+ homepage = "https://linkchecker.github.io/linkchecker/"
+ pypi = "LinkChecker/LinkChecker-10.5.0.tar.gz"
+
+ maintainers("rbberger")
+
+ license("GPL-2.0")
+
+ version("10.5.0", sha256="978b42b803e58b7a8f6ffae1ff88fa7fd1e87b944403b5dc82380dd59f516bb9")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-requests@2.20:", type=("build", "run"))
+ depends_on("py-dnspython@2:", type=("build", "run"))
+ depends_on("py-beautifulsoup4@4.8.1:", type=("build", "run"))
+ depends_on("py-hatchling@1.8.0:", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ depends_on("py-setuptools-scm@7.1.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-llnl-sina/package.py b/var/spack/repos/builtin/packages/py-llnl-sina/package.py
index d55adb4510..4670788828 100644
--- a/var/spack/repos/builtin/packages/py-llnl-sina/package.py
+++ b/var/spack/repos/builtin/packages/py-llnl-sina/package.py
@@ -31,6 +31,8 @@ class PyLlnlSina(PythonPackage):
version("1.11.0", tag="v1.11.0", commit="f3e9bb3a122cfae2a9fd82c3c5613cff939d3aa1")
version("1.10.0", tag="v1.10.0", commit="9c3c0acca5f0d4ac02470571688f00ab0bd61a30")
+ depends_on("cxx", type="build") # generated
+
# let's remove dependency on orjson
patch("no_orjson.patch")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-llvmlite/package.py b/var/spack/repos/builtin/packages/py-llvmlite/package.py
index d8fae01eb0..758e942337 100644
--- a/var/spack/repos/builtin/packages/py-llvmlite/package.py
+++ b/var/spack/repos/builtin/packages/py-llvmlite/package.py
@@ -28,6 +28,8 @@ class PyLlvmlite(PythonPackage):
version("0.33.0", sha256="9c8aae96f7fba10d9ac864b443d1e8c7ee4765c31569a2b201b3d0b67d8fc596")
version("0.31.0", sha256="22ab2b9d7ec79fab66ac8b3d2133347de86addc2e2df1b3793e523ac84baa3c8")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@3.8:3.11", when="@0.40:", type=("build", "run"))
depends_on("python@:3.10", when="@0.38:0.39", type=("build", "run"))
@@ -55,6 +57,9 @@ class PyLlvmlite(PythonPackage):
depends_on("llvm@7.0:7.1,8.0", when="@0.29:0.32")
depends_on("binutils", type="build")
+ # TODO: investigate
+ conflicts("%apple-clang@15:")
+
def setup_build_environment(self, env):
if self.spec.satisfies("%fj"):
env.set("CXX_FLTO_FLAGS", "{0}".format(self.compiler.cxx_pic_flag))
diff --git a/var/spack/repos/builtin/packages/py-lmdb/package.py b/var/spack/repos/builtin/packages/py-lmdb/package.py
index 9a953753e3..2707bda7f5 100644
--- a/var/spack/repos/builtin/packages/py-lmdb/package.py
+++ b/var/spack/repos/builtin/packages/py-lmdb/package.py
@@ -18,6 +18,8 @@ class PyLmdb(PythonPackage):
version("1.3.0", sha256="60a11efc21aaf009d06518996360eed346f6000bfc9de05114374230879f992e")
version("1.1.1", sha256="165cd1669b29b16c2d5cc8902b90fede15a7ee475c54d466f1444877a3f511ac")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2,3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("lmdb")
diff --git a/var/spack/repos/builtin/packages/py-lpips/package.py b/var/spack/repos/builtin/packages/py-lpips/package.py
new file mode 100644
index 0000000000..84472f699f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-lpips/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyLpips(PythonPackage):
+ """LPIPS Similarity metric"""
+
+ homepage = "https://github.com/richzhang/PerceptualSimilarity"
+ pypi = "lpips/lpips-0.1.4.tar.gz"
+
+ license("BSD-2-Clause", checked_by="qwertos")
+
+ version("0.1.4", sha256="3846331df6c69688aec3d300a5eeef6c529435bc8460bd58201c3d62e56188fa")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch@0.4:", type=("build", "run"))
+ depends_on("py-torchvision@0.2.1:", type=("build", "run"))
+ depends_on("py-numpy@1.14.3:", type=("build", "run"))
+ depends_on("py-scipy@1.0.1:", type=("build", "run"))
+ depends_on("py-tqdm@4.28.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-lru-dict/package.py b/var/spack/repos/builtin/packages/py-lru-dict/package.py
index d5d88abb93..2153da2db5 100644
--- a/var/spack/repos/builtin/packages/py-lru-dict/package.py
+++ b/var/spack/repos/builtin/packages/py-lru-dict/package.py
@@ -17,5 +17,7 @@ class PyLruDict(PythonPackage):
version("1.1.6", sha256="365457660e3d05b76f1aba3e0f7fedbfcd6528e97c5115a351ddd0db488354cc")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-lscsoft-glue/package.py b/var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
index d35d554432..42f55fb5a2 100644
--- a/var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
+++ b/var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
@@ -18,6 +18,8 @@ class PyLscsoftGlue(PythonPackage):
version("2.0.0", sha256="9bdfaebe4c921d83d1e3d1ca24379a644665e9d7530e7070665f387767c66923")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-six", type=("build", "run"))
depends_on("py-pyopenssl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-lws/package.py b/var/spack/repos/builtin/packages/py-lws/package.py
index 783fc91e00..25e778e6af 100644
--- a/var/spack/repos/builtin/packages/py-lws/package.py
+++ b/var/spack/repos/builtin/packages/py-lws/package.py
@@ -17,6 +17,8 @@ class PyLws(PythonPackage):
version("1.2.6", sha256="ac94834832aadfcd53fcf4a77e1d95155063b39adbce14c733f8345bdac76e87")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3:", type=("build", "run"))
depends_on("py-cython", type="build")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-lxml/package.py b/var/spack/repos/builtin/packages/py-lxml/package.py
index 7b6c31b08f..cda0bd25f6 100644
--- a/var/spack/repos/builtin/packages/py-lxml/package.py
+++ b/var/spack/repos/builtin/packages/py-lxml/package.py
@@ -16,6 +16,8 @@ class PyLxml(PythonPackage):
license("BSD-3-Clause")
+ version("5.3.0", sha256="4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f")
+ version("5.2.2", sha256="bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87")
version("4.9.2", sha256="2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67")
version("4.9.1", sha256="fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f")
version("4.9.0", sha256="520461c36727268a989790aef08884347cd41f2d8ae855489ccf40b50321d8d7")
@@ -31,6 +33,8 @@ class PyLxml(PythonPackage):
version("3.7.3", sha256="aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7")
version("2.3", sha256="eea1b8d29532739c1383cb4794c5eacd6176f0972b59e8d29348335b87ff2e66")
+ depends_on("c", type="build") # generated
+
variant("html5", default=False, description="Enable html5lib backend")
variant("htmlsoup", default=False, description="Enable BeautifulSoup4 backend")
variant("cssselect", default=False, description="Enable cssselect module")
@@ -42,3 +46,8 @@ class PyLxml(PythonPackage):
depends_on("py-html5lib", when="+html5", type=("build", "run"))
depends_on("py-beautifulsoup4", when="+htmlsoup", type=("build", "run"))
depends_on("py-cssselect@0.7:", when="+cssselect", type=("build", "run"))
+ depends_on("py-cython@3.0.11:", type="build", when="@5.3:")
+ depends_on("py-cython@3.0.10:", type="build", when="@5.2:")
+ depends_on("py-cython@3.0.9:", type="build", when="@5.1.1:")
+ depends_on("py-cython@3.0.8:", type="build", when="@5:")
+ depends_on("py-cython@0.29.7:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-lz4/package.py b/var/spack/repos/builtin/packages/py-lz4/package.py
index f3b889859d..79a7caea39 100644
--- a/var/spack/repos/builtin/packages/py-lz4/package.py
+++ b/var/spack/repos/builtin/packages/py-lz4/package.py
@@ -18,6 +18,8 @@ class PyLz4(PythonPackage):
version("3.1.3", sha256="081ef0a3b5941cb03127f314229a1c78bd70c9c220bb3f4dd80033e707feaa18")
version("3.1.0", sha256="debe75513db3eb9e5cdcd82a329ff38374b6316ab65b848b571e0404746c1e05")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("python@3.7:", when="@4.0.2:", type=("build", "run"))
depends_on("py-setuptools@45:", when="@4.0.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-macs2/package.py b/var/spack/repos/builtin/packages/py-macs2/package.py
index ffddbafe0e..d76360b04e 100644
--- a/var/spack/repos/builtin/packages/py-macs2/package.py
+++ b/var/spack/repos/builtin/packages/py-macs2/package.py
@@ -21,6 +21,8 @@ class PyMacs2(PythonPackage):
version("2.2.7.1", sha256="ad2ca69bdd02a8942a68aae23133289b5c16ba382bcbe20c39fabf3948929de5")
version("2.2.4", sha256="b131aadc8f5fd94bec35308b821e1f7585def788d2e7c756fc8cac402ffee25b")
+ depends_on("c", type="build") # generated
+
# patch to correctly identify python-3.10 as greater than required version
patch(
"https://github.com/macs3-project/MACS/pull/497.patch?full_index=1",
diff --git a/var/spack/repos/builtin/packages/py-macs3/package.py b/var/spack/repos/builtin/packages/py-macs3/package.py
index 0c547d66d5..cdc6091851 100644
--- a/var/spack/repos/builtin/packages/py-macs3/package.py
+++ b/var/spack/repos/builtin/packages/py-macs3/package.py
@@ -18,6 +18,8 @@ class PyMacs3(PythonPackage):
version("3.0.0b3", sha256="caa794d4cfcd7368447eae15878505315dac44c21546e8fecebb3561e9cee362")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.9:", type=("build", "run"))
depends_on("py-setuptools@60.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mahotas/package.py b/var/spack/repos/builtin/packages/py-mahotas/package.py
index 0a8badbe14..ff8406b5bb 100644
--- a/var/spack/repos/builtin/packages/py-mahotas/package.py
+++ b/var/spack/repos/builtin/packages/py-mahotas/package.py
@@ -18,5 +18,7 @@ class PyMahotas(PythonPackage):
version("1.4.13", sha256="a78dfe15045a20a0d9e01538b80f874580cd3525ae3eaa2c83ced51eb455879c")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mapbox-earcut/package.py b/var/spack/repos/builtin/packages/py-mapbox-earcut/package.py
index 4b529cd9c5..f07e5f22fc 100644
--- a/var/spack/repos/builtin/packages/py-mapbox-earcut/package.py
+++ b/var/spack/repos/builtin/packages/py-mapbox-earcut/package.py
@@ -18,6 +18,8 @@ class PyMapboxEarcut(PythonPackage):
version("1.0.1", sha256="9f155e429a22e27387cfd7a6372c3a3865aafa609ad725e2c4465257f154a438")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@42:", type="build")
depends_on("py-pybind11@2.6:2", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mariadb/package.py b/var/spack/repos/builtin/packages/py-mariadb/package.py
index 1082fd0f42..a167278203 100644
--- a/var/spack/repos/builtin/packages/py-mariadb/package.py
+++ b/var/spack/repos/builtin/packages/py-mariadb/package.py
@@ -22,6 +22,8 @@ class PyMariadb(PythonPackage):
url="https://www.pypi.org/packages/source/m/mariadb/mariadb-1.0.10.zip",
)
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-packaging", type=("build", "run"))
depends_on("mariadb-c-client", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-markov-clustering/package.py b/var/spack/repos/builtin/packages/py-markov-clustering/package.py
new file mode 100644
index 0000000000..15bc937b01
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-markov-clustering/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMarkovClustering(PythonPackage):
+ """Implementation of the Markov clustering (MCL) algorithm in python"""
+
+ homepage = "https://github.com/GuyAllard/markov_clustering"
+ pypi = "markov_clustering/markov_clustering-0.0.6.dev0.tar.gz"
+
+ license("MIT", checked_by="A-N-Other")
+
+ version(
+ "0.0.6.dev0", sha256="8f72eee0ee5d9bfbab1b28bbfa95eaa020b2bba64b528ce45030b8b4300ecf33"
+ )
+
+ variant("drawing", default=False, description="Include graphing capabilities")
+
+ depends_on("python@3", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy@0.19.0:", type=("build", "run"))
+ depends_on("py-scikit-learn", type=("build", "run"))
+
+ depends_on("py-networkx", type=("build", "run"), when="+drawing")
+ depends_on("py-matplotlib", type=("build", "run"), when="+drawing")
diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py
index 1dee1e7b4c..59a1099651 100644
--- a/var/spack/repos/builtin/packages/py-markupsafe/package.py
+++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py
@@ -29,4 +29,7 @@ class PyMarkupsafe(PythonPackage):
version("0.20", sha256="f6cf3bd233f9ea6147b21c7c02cac24e5363570ce4fd6be11dab9f499ed6a7d8")
version("0.19", sha256="62fcc5d641df8b5ad271ebbd6b77a19cd92eceba1e1a990de4e96c867789f037")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
+ depends_on("python@3.7:", when="@2.0:")
diff --git a/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch b/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch
deleted file mode 100644
index 7007c88d0d..0000000000
--- a/var/spack/repos/builtin/packages/py-matplotlib/freetype-include-path.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/setupext.py b/setupext.py
-index 6d363012eb4..00ef3fe5a3d 100644
---- a/setupext.py
-+++ b/setupext.py
-@@ -162,8 +162,10 @@ def get_include_dirs():
- """
- include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()]
- if sys.platform != 'win32':
-- # gcc includes this dir automatically, so also look for headers in
-+ # gcc includes these dirs automatically, so also look for headers in
- # these dirs
-+ include_dirs.extend(
-+ os.environ.get('CPATH', '').split(os.pathsep))
- include_dirs.extend(
- os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep))
- return include_dirs
diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py
index 30e0ed2558..28db0d5fa5 100644
--- a/var/spack/repos/builtin/packages/py-matplotlib/package.py
+++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py
@@ -16,7 +16,6 @@ class PyMatplotlib(PythonPackage):
homepage = "https://matplotlib.org/"
pypi = "matplotlib/matplotlib-3.3.2.tar.gz"
- maintainers("adamjstewart")
skip_modules = [
"matplotlib.tests",
"mpl_toolkits.axes_grid1.tests",
@@ -25,10 +24,17 @@ class PyMatplotlib(PythonPackage):
]
license("Apache-2.0")
+ maintainers("adamjstewart", "rgommers")
+ version("3.9.2", sha256="96ab43906269ca64a6366934106fa01534454a69e471b7bf3d79083981aaab92")
+ version("3.9.1", sha256="de06b19b8db95dd33d0dc17c926c7c9ebed9f572074b6fac4f65068a6814d010")
+ version("3.9.0", sha256="e6d29ea6c19e34b30fb7d88b7081f869a03014f66fe06d62cc77d5a6ea88ed7a")
+ version("3.8.4", sha256="8aac397d5e9ec158960e31c381c5ffc52ddd52bd9a47717e2a694038167dffea")
+ version("3.8.3", sha256="7b416239e9ae38be54b028abbf9048aff5054a9aba5416bef0bd17f9162ce161")
version("3.8.2", sha256="01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1")
version("3.8.1", sha256="044df81c1f6f3a8e52d70c4cfcb44e77ea9632a10929932870dfaa90de94365d")
version("3.8.0", sha256="df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69")
+ version("3.7.5", sha256="1e5c971558ebc811aa07f54c7b7c677d78aa518ef4c390e14673a09e0860184a")
version("3.7.4", sha256="7cd4fef8187d1dd0d9dcfdbaa06ac326d396fb8c71c647129f0bf56835d77026")
version("3.7.3", sha256="f09b3dd6bdeb588de91f853bbb2d6f0ff8ab693485b0c49035eaa510cb4f142e")
version("3.7.2", sha256="a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b")
@@ -58,56 +64,53 @@ class PyMatplotlib(PythonPackage):
version("3.1.2", sha256="8e8e2c2fe3d873108735c6ee9884e6f36f467df4a143136209cff303b183bada")
version("3.1.1", sha256="1febd22afe1489b13c6749ea059d392c03261b2950d1d45c17e3aed812080c93")
version("3.1.0", sha256="1e0213f87cc0076f7b0c4c251d7e23601e2419cd98691df79edb95517ba06f0c")
+ version("3.0.3", sha256="e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7")
version("3.0.2", sha256="c94b792af431f6adb6859eb218137acd9a35f4f7442cea57e4a59c54751c36af")
+ version("3.0.1", sha256="70f8782c50ac2c7617aad0fa5ba59fc49f690a851d6afc0178813c49767644dd")
version("3.0.0", sha256="b4e2333c98a7c2c1ff6eb930cd2b57d4b818de5437c5048802096b32f66e65f9")
- version("2.2.5", sha256="a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea")
- version("2.2.4", sha256="029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126")
- version("2.2.3", sha256="7355bf757ecacd5f0ac9dd9523c8e1a1103faadf8d33c22664178e17533f8ce5")
- version("2.2.2", sha256="4dc7ef528aad21f22be85e95725234c5178c0f938e2228ca76640e5e84d8cde8")
- version("2.0.2", sha256="0ffbc44faa34a8b1704bc108c451ecf87988f900ef7ce757b8e2e84383121ff1")
- version("2.0.0", sha256="36cf0985829c1ab2b8b1dae5e2272e53ae681bf33ab8bedceed4f0565af5f813")
-
- # https://matplotlib.org/tutorials/introductory/usage.html#backends
- # From `lib/matplotlib/rcsetup.py`:
- interactive_bk = [
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # https://matplotlib.org/stable/users/explain/figure/backends.html
+ # matplotlib 3.9+: lib/matplotlib/backends/registry.py
+ # matplotlib 3.8-: lib/matplotlib/rcsetup.py
+ all_backends = [
# GTK
- conditional("gtk", when="@:2"),
- conditional("gtkagg", when="@:2"),
- conditional("gtkcairo", when="@:2"),
"gtk3agg",
"gtk3cairo",
conditional("gtk4agg", when="@3.5:"),
conditional("gtk4cairo", when="@3.5:"),
+ # Cocoa
+ "macosx",
+ # Jupyter Notebook
+ "nbagg",
+ conditional("notebook", when="@3.9:"),
# Qt
conditional("qtagg", when="@3.5:"),
conditional("qtcairo", when="@3.5:"),
conditional("qt4agg", when="@:3.4"),
- conditional("qt4cairo", when="@2.2:3.4"),
+ conditional("qt4cairo", when="@:3.4"),
"qt5agg",
- conditional("qt5cairo", when="@2.2:"),
+ "qt5cairo",
# Tk
"tkagg",
"tkcairo",
+ # WebAgg
+ "webagg",
# Wx
"wx",
"wxagg",
- conditional("wxcairo", when="@2.2:"),
- # Other
- "macosx",
- "nbagg",
- "webagg",
- ]
- non_interactive_bk = [
+ "wxcairo",
+ # Headless
"agg",
"cairo",
- conditional("gdk", when="@:2"),
"pdf",
"pgf",
"ps",
"svg",
"template",
]
- all_backends = interactive_bk + non_interactive_bk
default_backend = "agg"
if sys.platform == "darwin":
@@ -132,7 +135,7 @@ class PyMatplotlib(PythonPackage):
variant("latex", default=False, description="Enable LaTeX text rendering support")
variant("fonts", default=False, description="Enable support for system font detection")
- # https://matplotlib.org/stable/devel/dependencies.html
+ # https://matplotlib.org/stable/install/dependencies.html
# Runtime dependencies
# Mandatory dependencies
depends_on("python@3.9:", when="@3.8:", type=("build", "link", "run"))
@@ -142,14 +145,17 @@ class PyMatplotlib(PythonPackage):
depends_on("py-cycler@0.10:", type=("build", "run"))
depends_on("py-fonttools@4.22:", when="@3.5:", type=("build", "run"))
depends_on("py-kiwisolver@1.3.1:", when="@3.8.1:", type=("build", "run"))
- depends_on("py-kiwisolver@1.0.1:", when="@2.2:", type=("build", "run"))
- depends_on("py-numpy@1.21:1", when="@3.8:", type=("build", "link", "run"))
- depends_on("py-numpy@1.20:", when="@3.7:", type=("build", "link", "run"))
- depends_on("py-numpy@1.19:", when="@3.6:", type=("build", "link", "run"))
- depends_on("py-numpy@1.17:", when="@3.5:", type=("build", "link", "run"))
- depends_on("py-numpy@1.16:", when="@3.4:", type=("build", "link", "run"))
- depends_on("py-numpy@1.15:", when="@3.3:", type=("build", "link", "run"))
- depends_on("py-numpy@1.11:", type=("build", "run"))
+ depends_on("py-kiwisolver@1.0.1:", type=("build", "run"))
+ depends_on("py-numpy@1.23:", when="@3.9:", type=("build", "link", "run"))
+ depends_on("py-numpy@1.21:", when="@3.8", type=("build", "link", "run"))
+ depends_on("py-numpy@1.20:", when="@3.7", type=("build", "link", "run"))
+ depends_on("py-numpy@1.19:", when="@3.6", type=("build", "link", "run"))
+ depends_on("py-numpy@1.17:", when="@3.5", type=("build", "link", "run"))
+ depends_on("py-numpy@1.16:", when="@3.4", type=("build", "link", "run"))
+ depends_on("py-numpy@1.15:", when="@3.3", type=("build", "link", "run"))
+ depends_on("py-numpy@1.11:", when="@:3.2", type=("build", "link", "run"))
+ # https://github.com/matplotlib/matplotlib/issues/26778
+ depends_on("py-numpy@:1", when="@:3.8.3", type=("build", "link", "run"))
depends_on("py-packaging@20:", when="@3.6:", type=("build", "run"))
depends_on("py-packaging", when="@3.5:", type=("build", "run"))
depends_on("pil@8:", when="@3.8.1:", type=("build", "run"))
@@ -162,16 +168,13 @@ class PyMatplotlib(PythonPackage):
depends_on("py-python-dateutil@2.1:", type=("build", "run"))
depends_on("py-importlib-resources@3.2:", when="@3.7: ^python@:3.9", type=("build", "run"))
- # Historical dependencies
- depends_on("py-pytz", type=("build", "run"), when="@:2")
- depends_on("py-six@1.10.0:", type=("build", "run"), when="@2")
- depends_on("py-six@1.9.0:", type=("build", "run"), when="@:1")
-
# Optional dependencies
# Backends
# Tk
for backend in ["tkagg", "tkcairo"]:
- depends_on("tk@8.4:8.5,8.6.2:", when="backend=" + backend, type="run")
+ depends_on("tk@8.5:", when="@3.8: backend=" + backend, type="run")
+ depends_on("tk@8.4:", when="@3.5: backend=" + backend, type="run")
+ depends_on("tk@8.3:", when="backend=" + backend, type="run")
depends_on("python+tkinter", when="backend=" + backend, type="run")
# Qt
# matplotlib/backends/qt_compat.py
@@ -185,12 +188,13 @@ class PyMatplotlib(PythonPackage):
depends_on("py-pyqt6@6.1:", when="backend=" + backend, type="run")
depends_on("qt-base+gui+widgets", when="backend=" + backend, type="run")
# GTK
- for backend in ["gtk", "gtkagg", "gtkcairo", "gtk3agg", "gtk3cairo", "gtk4agg", "gtk4cairo"]:
+ for backend in ["gtk3agg", "gtk3cairo", "gtk4agg", "gtk4cairo"]:
depends_on("py-pygobject", when="backend=" + backend, type="run")
- depends_on("py-pycairo@1.14:", when="backend=" + backend, type="run")
+ depends_on("py-pycairo@1.14:", when="@3.6: backend=" + backend, type="run")
+ depends_on("py-pycairo@1.11:", when="@3.3: backend=" + backend, type="run")
+ depends_on("py-pycairo", when="backend=" + backend, type="run")
# Cairo
for backend in [
- "gtkcairo",
"gtk3cairo",
"gtk4cairo",
"qtcairo",
@@ -200,12 +204,15 @@ class PyMatplotlib(PythonPackage):
"wxcairo",
"cairo",
]:
- depends_on("py-pycairo@1.14:", when="backend=" + backend, type="run")
+ depends_on("py-pycairo@1.14:", when="@3.6: backend=" + backend, type="run")
+ depends_on("py-pycairo@1.11:", when="@3.3: backend=" + backend, type="run")
+ depends_on("py-pycairo", when="backend=" + backend, type="run")
# Wx
for backend in ["wx", "wxagg", "wxcairo"]:
depends_on("py-wxpython@4:", when="backend=" + backend, type="run")
# Other
- depends_on("py-tornado@5:", when="backend=webagg", type="run")
+ depends_on("py-tornado@5:", when="@3.5: backend=webagg", type="run")
+ depends_on("py-tornado", when="backend=webagg", type="run")
depends_on("py-ipykernel", when="backend=nbagg", type="run")
# Optional dependencies
@@ -218,7 +225,7 @@ class PyMatplotlib(PythonPackage):
depends_on("pkgconfig", type="build")
# C libraries
- depends_on("freetype@2.3:") # freetype 2.6.1 needed for tests to pass
+ depends_on("freetype@2.3: build_system=autotools")
depends_on("qhull@2020.2:", when="@3.4:")
# starting from qhull 2020.2 libqhull.so on which py-matplotlib@3.3 versions
# rely on does not exist anymore, only libqhull_r.so
@@ -227,41 +234,43 @@ class PyMatplotlib(PythonPackage):
# Dependencies for building matplotlib
# Setup dependencies
- depends_on("py-certifi@2020.6.20:", when="@3.3.1:", type="build")
- depends_on("py-numpy@1.25:", when="@3.8:", type="build")
- depends_on("py-pybind11@2.6:", when="@3.7:", type="build")
- depends_on("py-setuptools@64:", when="@3.8.1:", type="build")
- depends_on("py-setuptools@42:", when="@3.8:", type="build")
- depends_on("py-setuptools@42:", when="@3.7.2:3.7", type=("build", "run"))
- depends_on("py-setuptools", when="@:3.7.1", type=("build", "run"))
+ depends_on("py-meson-python@0.13.1:", when="@3.9:", type="build")
+ depends_on("ninja@1.8.2:", when="@3.9:", type="build")
+ depends_on("py-pybind11@2.6:", when="@3.7:", type=("build", "link"))
depends_on("py-setuptools-scm@7:", when="@3.6:", type="build")
depends_on("py-setuptools-scm@4:6", when="@3.5", type="build")
+
+ # Historical dependencies
+ depends_on("py-certifi@2020.6.20:", when="@3.3.1:3.8", type="build")
+ depends_on("py-setuptools@64:", when="@3.8.1:3.8", type="build")
+ depends_on("py-setuptools@42:", when="@3.8.0", type="build")
+ depends_on("py-setuptools@42:", when="@3.7.2:3.7", type=("build", "run"))
+ depends_on("py-setuptools", when="@:3.7.1", type=("build", "run"))
depends_on("py-setuptools-scm-git-archive", when="@3.5", type="build")
# Testing dependencies
- # https://matplotlib.org/stable/devel/development_setup.html#additional-dependencies-for-testing
- depends_on("py-pytest@3.6:", type="test")
- depends_on("ghostscript@9.0:", type="test")
- # depends_on("inkscape@:0", type="test")
+ # Required
+ # https://github.com/spack/spack/issues/43597
+ # depends_on("freetype@2.6.1 build_system=autotools", type="test")
+ depends_on("py-pytest@7:", type="test")
msg = "MacOSX backend requires macOS 10.12+"
conflicts("platform=linux", when="backend=macosx", msg=msg)
- conflicts("platform=cray", when="backend=macosx", msg=msg)
conflicts("platform=windows", when="backend=macosx", msg=msg)
+ conflicts("^tk@8.6.0:8.6.1")
+
# https://github.com/matplotlib/matplotlib/pull/21662
patch("matplotlibrc.patch", when="@3.5.0")
- # Patch to pick up correct freetype headers
- patch("freetype-include-path.patch", when="@2.2.2:2.9.9")
-
- @property
- def config_file(self):
- # https://github.com/matplotlib/matplotlib/pull/20871
- return "mplsetup.cfg" if self.spec.satisfies("@3.5:") else "setup.cfg"
@property
def archive_files(self):
- return [os.path.join(self.build_directory, self.config_file)]
+ if self.spec.satisfies("@3.9:"):
+ return [os.path.join(self.stage.source_path, "build", "meson-logs", "meson-log.txt")]
+ elif self.spec.satisfies("@3.5:"):
+ return [os.path.join(self.build_directory, "mplsetup.cfg")]
+ else:
+ return [os.path.join(self.build_directory, "setup.cfg")]
def flag_handler(self, name, flags):
if name == "cxxflags":
@@ -269,13 +278,62 @@ class PyMatplotlib(PythonPackage):
flags.append("-Wno-error=register")
return (flags, None, None)
+ @when("@3.9:")
+ def config_settings(self, spec, prefix):
+ return {
+ "builddir": "build",
+ "compile-args": f"-j{make_jobs}",
+ "setup-args": {
+ "-Dsystem-freetype": True,
+ "-Dsystem-qhull": True,
+ "-DrcParams-backend": spec.variants["backend"].value,
+ # Avoids error where link time opt is used for compile but not link
+ "-Db_lto": not (self.spec.satisfies("%clang") or self.spec.satisfies("%oneapi")),
+ },
+ }
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def copy_reference_images(self):
+ # https://matplotlib.org/devdocs/devel/testing.html#obtain-the-reference-images
+ install_tree(
+ join_path("lib", "matplotlib", "tests", "baseline_images"),
+ join_path(python_platlib, "matplotlib", "tests", "baseline_images"),
+ )
+ if self.spec.satisfies("@3.7:"):
+ for toolkit in ["axes_grid1", "axisartist", "mplot3d"]:
+ install_tree(
+ join_path("lib", "mpl_toolkits", toolkit, "tests", "baseline_images"),
+ join_path(python_platlib, "mpl_toolkits", toolkit, "tests", "baseline_images"),
+ )
+ else:
+ install_tree(
+ join_path("lib", "mpl_toolkits", "tests", "baseline_images"),
+ join_path(python_platlib, "mpl_toolkits", "tests", "baseline_images"),
+ )
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def install_test(self):
+ # https://matplotlib.org/devdocs/devel/testing.html#run-the-tests
+ python("-m", "pytest", "--pyargs", "matplotlib.tests")
+ if self.spec.satisfies("@3.7:"):
+ for toolkit in ["axes_grid1", "axisartist", "mplot3d"]:
+ python("-m", "pytest", "--pyargs", f"mpl_toolkits.{toolkit}.tests")
+ else:
+ python("-m", "pytest", "--pyargs", "mpl_toolkits.tests")
+
+ @when("@:3.8")
def setup_build_environment(self, env):
include = []
library = []
for dep in self.spec.dependencies(deptype="link"):
query = self.spec[dep.name]
include.extend(query.headers.directories)
- library.extend(query.libs.directories)
+ try:
+ library.extend(query.libs.directories)
+ except NoLibrariesError:
+ pass
# Build uses a mix of Spack's compiler wrapper and the actual compiler,
# so this is needed to get parts of the build working.
@@ -283,13 +341,19 @@ class PyMatplotlib(PythonPackage):
env.set("CPATH", ":".join(include))
env.set("LIBRARY_PATH", ":".join(library))
+ @when("@:3.8")
@run_before("install")
def configure(self):
"""Set build options with regards to backend GUI libraries."""
backend = self.spec.variants["backend"].value
- with open(self.config_file, "w") as config:
+ if self.spec.satisfies("@3.5:"):
+ config_file = "mplsetup.cfg"
+ else:
+ config_file = "setup.cfg"
+
+ with open(config_file, "w") as config:
# Default backend
config.write("[rc_options]\n")
config.write("backend = " + backend + "\n")
@@ -303,9 +367,3 @@ class PyMatplotlib(PythonPackage):
# avoids error where link time opt is used for compile but not link
if self.spec.satisfies("%clang") or self.spec.satisfies("%oneapi"):
config.write("enable_lto = False\n")
-
- @run_after("install")
- @on_package_attributes(run_tests=True)
- def build_test(self):
- pytest = which("pytest")
- pytest()
diff --git a/var/spack/repos/builtin/packages/py-maturin/package.py b/var/spack/repos/builtin/packages/py-maturin/package.py
index 92331b91c3..ab2858ec7d 100644
--- a/var/spack/repos/builtin/packages/py-maturin/package.py
+++ b/var/spack/repos/builtin/packages/py-maturin/package.py
@@ -14,14 +14,33 @@ class PyMaturin(PythonPackage):
homepage = "https://github.com/pyo3/maturin"
pypi = "maturin/maturin-0.13.7.tar.gz"
+ maintainers("teaguesterling")
+
license("Apache-2.0")
+ version("1.6.0", sha256="b955025c24c8babc808db49e0ff90db8b4b1320dcc16b14eb26132841737230d")
+ version("1.5.1", sha256="3dd834ece80edb866af18cbd4635e0ecac40139c726428d5f1849ae154b26dca")
+ version("1.4.0", sha256="ed12e1768094a7adeafc3a74ebdb8dc2201fa64c4e7e31f14cfc70378bf93790")
version("1.1.0", sha256="4650aeaa8debd004b55aae7afb75248cbd4d61cd7da2dcf4ead8b22b58cecae0")
version("0.14.17", sha256="fb4e3311e8ce707843235fbe8748a05a3ae166c3efd6d2aa335b53dfc2bd3b88")
version("0.13.7", sha256="c0a77aa0c57f945649ca711c806203a1b6888ad49c2b8b85196ffdcf0421db77")
- depends_on("py-setuptools", type="build")
- depends_on("py-wheel@0.36.2:", type="build")
- depends_on("py-setuptools-rust@1.4:", type="build")
- depends_on("py-tomli@1.1:", when="^python@:3.10", type=("build", "run"))
- depends_on("rust", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-wheel@0.36.2:")
+ depends_on("py-setuptools-rust@1.4:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-tomli@1.1:", when="^python@:3.10")
+ for rust, maturin in [
+ ("1.70", "1.5.0"),
+ ("1.64", "1.0.0"),
+ ("1.62", "0.14.3"),
+ ("1.59", "0.13.3"),
+ ]:
+ depends_on(f"rust@{rust}:", when=f"@{maturin}:")
+
+ # May be an accidental dependency, remove in the future
+ # https://git.alpinelinux.org/aports/commit/?id=7ad298b467403b96a6b97d050170e367f147a75f
+ # https://patchwork.yoctoproject.org/project/oe-core/patch/8803dc101b641c948805cab9e5784c38f43b0e51.1702791173.git.tim.orling@konsulko.com/
+ depends_on("bzip2", when="platform=darwin")
diff --git a/var/spack/repos/builtin/packages/py-mayavi/package.py b/var/spack/repos/builtin/packages/py-mayavi/package.py
index 31e6c2bd43..5f91cb917e 100644
--- a/var/spack/repos/builtin/packages/py-mayavi/package.py
+++ b/var/spack/repos/builtin/packages/py-mayavi/package.py
@@ -22,6 +22,9 @@ class PyMayavi(PythonPackage):
url="https://files.pythonhosted.org/packages/source/m/mayavi/mayavi-4.7.1.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-apptools", type=("build", "run"))
depends_on("py-envisage", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mdanalysis/package.py b/var/spack/repos/builtin/packages/py-mdanalysis/package.py
index 6950060f38..56edcbb764 100644
--- a/var/spack/repos/builtin/packages/py-mdanalysis/package.py
+++ b/var/spack/repos/builtin/packages/py-mdanalysis/package.py
@@ -20,12 +20,16 @@ class PyMdanalysis(PythonPackage):
license("CC-BY-ND-3.0")
+ version("2.7.0", sha256="572e82945e5d058e3749ec5f18e6b3831ef7f2119cb54672567ae9a977201e93")
version("2.6.1", sha256="9cc69b94bddd026f26ffcaf5bdbed6d568c1c10e19a341d84f8d37a2a70222f2")
version("2.6.0", sha256="210b198a115165004c36fbbbe5eb83a13323f52b10ccaef30dd40bfe25ba3e61")
version("2.5.0", sha256="06ce4efab6ca1dbd2ee2959fc668049e1d574a8fe94ab948a4608244da1d016b")
version("2.4.3", sha256="c4fbdc414e4fdda69052fff2a6e412180fe6fa90a42c24793beee04123648c92")
version("2.4.2", sha256="ae2ee5627391e73f74eaa3c547af3ec6ab8b040d27dedffe3a7ece8e0cd27636")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"analysis",
default=True,
@@ -41,42 +45,46 @@ class PyMdanalysis(PythonPackage):
depends_on("py-cython@0.28:", type="build")
# MDAnalysis required dependencies (install_requires)
- depends_on("py-numpy@1.22.3:1", when="@2.6.0:", type=("build", "run"))
+ depends_on("py-numpy@1.22.3:", when="@2.6.0:", type=("build", "run"))
depends_on("py-numpy@1.21.0:", when="@2.5.0:", type=("build", "run"))
depends_on("py-numpy@1.20.0:", type=("build", "run"))
+ # https://github.com/MDAnalysis/mdanalysis/pull/4482
+ depends_on("py-numpy@:1", type=("build", "run"))
- depends_on("py-biopython@1.80:", type=("build", "run"))
- depends_on("py-networkx@2.0:", type=("build", "run"))
depends_on("py-griddataformats@0.4.0:", type=("build", "run"))
depends_on("py-mmtf-python@1.0.0:", type=("build", "run"))
depends_on("py-joblib@0.12:", type=("build", "run"))
depends_on("py-scipy@1.5.0:", type=("build", "run"))
-
depends_on("py-matplotlib@1.5.1:", type=("build", "run"))
depends_on("py-tqdm@4.43.0:", type=("build", "run"))
depends_on("py-threadpoolctl", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"))
depends_on("py-fasteners", type=("build", "run"))
- depends_on("py-gsd@1.9.3:", when="@:2.5.0", type=("build", "run"))
+ depends_on("py-mda-xdrlib", when="@2.7.0:", type=("build", "run"))
# extra_format (extras_require)
depends_on("py-netcdf4@1.0:", when="+extra_formats", type=("build", "run"))
depends_on("py-h5py@2.10:", when="+extra_formats", type=("build", "run"))
- depends_on("py-pytng@0.2.3:", when="+extra_formats", type=("build", "run"))
depends_on("py-chemfiles@0.10:", when="+extra_formats", type=("build", "run"))
+ depends_on("py-parmed", when="+extra_formats @2.6.0:", type=("build", "run"))
depends_on("py-pyedr@0.7.0:", when="+extra_formats", type=("build", "run"))
- # py-gsd is now an optional dependency and requires >3.0.0
- # gsd>=2.9.0 requires setuptools>=64 and can't be concretised with py-numpy
- # depends_on("py-gsd@3.0.1:", when="+extra_formats @2.6.0:", type=("build", "run"))
+ depends_on("py-pytng@0.2.3:", when="+extra_formats", type=("build", "run"))
+ depends_on("py-gsd@3.0.1:", when="+extra_formats @2.6.0:", type=("build", "run"))
depends_on(
"rdkit@2020.03.1: +python ~coordgen ~maeparser ~yaehmop ~descriptors3d",
when="+extra_formats @2.6.0:",
type=("build", "run"),
)
- depends_on("py-parmed", when="+extra_formats @2.6.0:", type=("build", "run"))
# analysis (extras_require)
+ depends_on("py-biopython@1.80:", when="@2.7.0: +analysis", type=("build", "run"))
depends_on("py-seaborn", when="+analysis", type=("build", "run"))
depends_on("py-scikit-learn", when="+analysis", type=("build", "run"))
depends_on("py-tidynamics@1:", when="+analysis", type=("build", "run"))
+ depends_on("py-networkx@2.0:", when="@2.7.0 +analysis", type=("build", "run"))
+
+ # historical dependencies
+ depends_on("py-gsd@1.9.3:", when="@:2.5.0", type=("build", "run"))
+ depends_on("py-biopython@1.80:", when="@:2.6.1", type=("build", "run"))
+ depends_on("py-networkx@2.0:", when="@:2.6.1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mdanalysistests/package.py b/var/spack/repos/builtin/packages/py-mdanalysistests/package.py
index 97facba4e5..a45dcd3035 100644
--- a/var/spack/repos/builtin/packages/py-mdanalysistests/package.py
+++ b/var/spack/repos/builtin/packages/py-mdanalysistests/package.py
@@ -16,6 +16,7 @@ class PyMdanalysistests(PythonPackage):
license("GPL-3.0-or-later")
+ version("2.7.0", sha256="326d65d7f14da8d1b047aab87ca312a68459a5fd18ddf6d8cb9ac9c3ca51d9e5")
version("2.6.1", sha256="043f7451f4d9c42ea9e6609a81a6002948e2c74fd268282e0831416789b22e5e")
version("2.6.0", sha256="16fdd10e5240b606e8f9210b7cbd9e4be110e6b8d79bb6e72ce6250c4731a817")
version("2.5.0", sha256="a15b53b7f8bed67900a2bf542bbb3cab81dc71674fa6cddb3248dd11880e4c9d")
@@ -23,6 +24,7 @@ class PyMdanalysistests(PythonPackage):
version("2.4.2", sha256="6e8fb210a4268691c77717ea5157e82d85874a4f7ee0f8f177718451a44ee793")
# Version need to match MDAnalysis'
+ depends_on("py-mdanalysis@2.7.0", when="@2.7.0", type=("build", "run"))
depends_on("py-mdanalysis@2.6.1", when="@2.6.1", type=("build", "run"))
depends_on("py-mdanalysis@2.6.0", when="@2.6.0", type=("build", "run"))
depends_on("py-mdanalysis@2.5.0", when="@2.5.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mechanize/package.py b/var/spack/repos/builtin/packages/py-mechanize/package.py
index 87d28468fa..e794a7f874 100644
--- a/var/spack/repos/builtin/packages/py-mechanize/package.py
+++ b/var/spack/repos/builtin/packages/py-mechanize/package.py
@@ -12,8 +12,9 @@ class PyMechanize(PythonPackage):
homepage = "https://github.com/python-mechanize/mechanize"
pypi = "mechanize/mechanize-0.4.3.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("0.4.10", sha256="1dea947f9be7ea0ab610f7bbc4a4e36b45d6bfdfceea29ad3d389a88a1957ddf")
version("0.4.3", sha256="d7d7068be5e1b3069575c98c870aaa96dd26603fe8c8697b470e2f65259fddbf")
version("0.2.5", sha256="2e67b20d107b30c00ad814891a095048c35d9d8cb9541801cebe85684cc84766")
diff --git a/var/spack/repos/builtin/packages/py-meldmd/package.py b/var/spack/repos/builtin/packages/py-meldmd/package.py
index d831c2d056..4160aad0b4 100644
--- a/var/spack/repos/builtin/packages/py-meldmd/package.py
+++ b/var/spack/repos/builtin/packages/py-meldmd/package.py
@@ -5,6 +5,7 @@
import os
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -20,6 +21,8 @@ class PyMeldmd(CMakePackage, PythonExtension, CudaPackage):
version("0.6.1", sha256="aae8e5bfbdacc1e6de61768a3298314c51575cda477a511e98dc11f5730fd918")
version("0.4.20", sha256="8c8d2b713f8dc0ecc137d19945b3957e12063c8dda569696e47c8820eeac6c92")
+ depends_on("cxx", type="build") # generated
+
extends("python")
depends_on("python@3.6:", type=("build", "run"))
@@ -50,11 +53,10 @@ class PyMeldmd(CMakePackage, PythonExtension, CudaPackage):
@run_after("install")
def install_python(self):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
with working_dir(join_path(self.build_directory, "python")):
make("MeldPluginPatch")
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
for _, _, files in os.walk(self.spec["openmm"].prefix.lib.plugins):
for f in files:
os.symlink(
diff --git a/var/spack/repos/builtin/packages/py-melissa-core/package.py b/var/spack/repos/builtin/packages/py-melissa-core/package.py
index 78358c4401..f6b6b3c9c4 100644
--- a/var/spack/repos/builtin/packages/py-melissa-core/package.py
+++ b/var/spack/repos/builtin/packages/py-melissa-core/package.py
@@ -23,6 +23,9 @@ class PyMelissaCore(PythonPackage):
version("joss", tag="JOSS_v2", commit="20bbe68c1a7b73aa2ea3ad35681c332c7a5fc516")
version("sc23", tag="SC23", commit="8bb5b6817d4abe4eaa5893552d711150e53535f3")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# define variants for the deep learning server (torch, tf)
variant(
"torch", default=False, description="Install Deep Learning requirements with Pytorch only"
diff --git a/var/spack/repos/builtin/packages/py-memray/package.py b/var/spack/repos/builtin/packages/py-memray/package.py
index c8f7527293..e5c6bbba0c 100644
--- a/var/spack/repos/builtin/packages/py-memray/package.py
+++ b/var/spack/repos/builtin/packages/py-memray/package.py
@@ -16,6 +16,9 @@ class PyMemray(PythonPackage):
version("1.1.0", sha256="876e46e0cd42394be48b33f81314bc946f4eb023b04bf1def084c25ccf1d2bb6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-merlin/package.py b/var/spack/repos/builtin/packages/py-merlin/package.py
index 344b31ae57..74a5cc7090 100644
--- a/var/spack/repos/builtin/packages/py-merlin/package.py
+++ b/var/spack/repos/builtin/packages/py-merlin/package.py
@@ -20,6 +20,8 @@ class PyMerlin(PythonPackage):
version("master", branch="master")
version("1.10.3", sha256="6edaf17b502db090cef0bc53ae0118c55f77d7a16f43c7a235e0dd1770decadb")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-cached-property", type=("build", "run"))
depends_on("py-celery@5.0.3:+redis+sqlalchemy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-meshpy/package.py b/var/spack/repos/builtin/packages/py-meshpy/package.py
index 8e1832b114..8d171f36f5 100644
--- a/var/spack/repos/builtin/packages/py-meshpy/package.py
+++ b/var/spack/repos/builtin/packages/py-meshpy/package.py
@@ -19,6 +19,8 @@ class PyMeshpy(PythonPackage):
version("2022.1.3", sha256="a7158e31ece25fa6c6cebce9fd1e968157d661dc8769fb30ceba69c351478475")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:3", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-pybind11", type="build")
diff --git a/var/spack/repos/builtin/packages/py-meson-python/package.py b/var/spack/repos/builtin/packages/py-meson-python/package.py
index 9ce8cc07a5..d9df736858 100644
--- a/var/spack/repos/builtin/packages/py-meson-python/package.py
+++ b/var/spack/repos/builtin/packages/py-meson-python/package.py
@@ -11,11 +11,14 @@ class PyMesonPython(PythonPackage):
homepage = "https://github.com/mesonbuild/meson-python"
pypi = "meson_python/meson_python-0.7.0.tar.gz"
+ tags = ["build-tools"]
maintainers("eli-schwartz", "adamjstewart", "rgommers")
license("MIT")
+ version("0.16.0", sha256="9068c17e36c89d6c7ff709fffb2a8a9925e8cd0b02629728e5ceaf2ec505cb5f")
+ version("0.15.0", sha256="fddb73eecd49e89c1c41c87937cd89c2d0b65a1c63ba28238681d4bd9484d26f")
version("0.13.1", sha256="63b3170001425c42fa4cfedadb9051cbd28925ff8eed7c40d36ba0099e3c7618")
version("0.12.0", sha256="8cb159a8093a2e73cfa897f8092ec93b74e3842f94dff7fde381c6fe0e0b064d")
version("0.11.0", sha256="110258837c2ffe762f5f855c7ea5385f1edd44074e93a0f317ffefc7aab42b09")
@@ -23,18 +26,25 @@ class PyMesonPython(PythonPackage):
version("0.9.0", sha256="6aa5a09ff5cce1c5308938ebbf3eab5529413c8677055ace1ac8c83d8a07b29d")
version("0.8.1", sha256="442f1fa4cf5db50eea61170a6059c10fafd70977f5dbdf3441c106cd23b05e4c")
version("0.8.0", sha256="b5c8a2727e6f6feaffc1db513244c9bdb5d0f689b45e24f4529b649b7710daf7")
- version("0.7.0", sha256="9fcfa350f44ca80dd4f5f9c3d251725434acf9a07d9618f382e6cc4629dcbe84")
+ version(
+ "0.7.0",
+ sha256="9fcfa350f44ca80dd4f5f9c3d251725434acf9a07d9618f382e6cc4629dcbe84",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
depends_on("py-colorama", when="platform=windows", type=("build", "run"))
depends_on("meson@0.63.3:", when="@0.11:", type=("build", "run"))
depends_on("meson@0.63:", when="@0.9:0.10", type=("build", "run"))
depends_on("meson@0.62:", type=("build", "run"))
+ depends_on("py-packaging@19:", when="@0.16:", type=("build", "run"))
depends_on("py-pyproject-metadata@0.7.1:", when="@0.13:", type=("build", "run"))
depends_on("py-pyproject-metadata@0.6.1:", when="@0.12:", type=("build", "run"))
depends_on("py-pyproject-metadata@0.5:", type=("build", "run"))
depends_on("py-tomli@1:", when="@0.11: ^python@:3.10", type=("build", "run"))
depends_on("py-tomli@1:", when="@:0.10", type=("build", "run"))
- depends_on("py-setuptools@60:", when="@0.13: ^python@3.12:", type=("build", "run"))
+ depends_on("py-setuptools@60:", when="@0.13 ^python@3.12:", type=("build", "run"))
# https://github.com/mesonbuild/meson-python/pull/111
conflicts("platform=darwin os=ventura", when="@:0.7")
diff --git a/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py b/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py
index c59eb9723f..2aca4f4386 100644
--- a/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py
+++ b/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py
@@ -10,6 +10,7 @@ class PyMetomiIsodatetime(PythonPackage):
"""Python ISO 8601 date time parser and data model/manipulation utilities."""
homepage = "https://github.com/metomi/isodatetime"
+ # NOTE: spack checksum does not yet work for epoch versions
pypi = "metomi-isodatetime/metomi-isodatetime-1!3.0.0.tar.gz"
maintainers("LydDeb")
@@ -18,3 +19,6 @@ class PyMetomiIsodatetime(PythonPackage):
version("3.0.0", sha256="2141e8aaa526ea7f7f1cb883e6c8ed83ffdab73269658d84d0624f63a6e1357e")
depends_on("py-setuptools", type="build")
+
+ def url_for_version(self, version):
+ return f"https://files.pythonhosted.org/packages/source/m/metomi-isodatetime/metomi-isodatetime-1!{version}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/py-metomi-rose/package.py b/var/spack/repos/builtin/packages/py-metomi-rose/package.py
index d6a6ae2cac..c9d35f1185 100644
--- a/var/spack/repos/builtin/packages/py-metomi-rose/package.py
+++ b/var/spack/repos/builtin/packages/py-metomi-rose/package.py
@@ -18,6 +18,8 @@ class PyMetomiRose(PythonPackage):
version("2.1.0", sha256="1b60135a434fe4325d364a57e8f5e81e90f39b373b9d68733458c1adc2513c05")
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-aiofiles", type=("build", "run"))
depends_on("py-jinja2@2.10.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-metpy/package.py b/var/spack/repos/builtin/packages/py-metpy/package.py
index f6bd28c139..59ab20a012 100644
--- a/var/spack/repos/builtin/packages/py-metpy/package.py
+++ b/var/spack/repos/builtin/packages/py-metpy/package.py
@@ -20,19 +20,47 @@ class PyMetpy(PythonPackage):
license("BSD-3-Clause")
+ version("1.6.2", sha256="eb065bac0d7818587fa38fa6c96dfe720d9d15b59af4e4866541894e267476bb")
version("1.0.1", sha256="16fa9806facc24f31f454b898741ec5639a72ba9d4ff8a19ad0e94629d93cb95")
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-scm", type="build")
- depends_on("py-importlib-metadata@1.0.0:", when="^python@:3.7", type=("build", "run"))
- depends_on("py-importlib-resources@1.3.0:", when="^python@:3.8", type=("build", "run"))
- depends_on("py-matplotlib@2.1.0:", type=("build", "run"))
- depends_on("py-numpy@1.16.0:", type=("build", "run"))
- depends_on("py-pandas@0.24.0:", type=("build", "run"))
- depends_on("py-pint@0.10.1:", type=("build", "run"))
- depends_on("py-pooch@0.1:", type=("build", "run"))
- depends_on("py-pyproj@2.3.0:", type=("build", "run"))
- depends_on("py-scipy@1.0:", type=("build", "run"))
- depends_on("py-traitlets@4.3.0:", type=("build", "run"))
- depends_on("py-xarray@0.14.1:", type=("build", "run"))
+ variant(
+ "extras",
+ default=False,
+ when="@1.6.2:",
+ description="Enable xarray lazy-loading and advanced plotting",
+ )
+
+ with when("@1.6.2"):
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@61:", type="build")
+ depends_on("py-setuptools-scm@3.4:", type="build")
+ depends_on("py-matplotlib@3.5.0:", type=("build", "run"))
+ depends_on("py-numpy@1.20.0:", type=("build", "run"))
+ depends_on("py-pandas@1.4.0:", type=("build", "run"))
+ depends_on("py-pint@0.17:", type=("build", "run"))
+ depends_on("py-pooch@1.2.0:", type=("build", "run"))
+ depends_on("py-pyproj@3.0.0:", type=("build", "run"))
+ depends_on("py-scipy@1.8.0:", type=("build", "run"))
+ depends_on("py-traitlets@5.0.5:", type=("build", "run"))
+ depends_on("py-xarray@0.21.0:", type=("build", "run"))
+
+ depends_on("py-cartopy@0.12.0:", when="+extras")
+ depends_on("py-dask@2020.12.0:", when="+extras")
+ depends_on("py-shapely@1.6.4:", when="+extras")
+
+ with when("@1.0.1"):
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-importlib-metadata@1.0.0:", when="^python@:3.7", type=("build", "run"))
+ depends_on("py-importlib-resources@1.3.0:", when="^python@:3.8", type=("build", "run"))
+ depends_on("py-matplotlib@2.1.0:", type=("build", "run"))
+ depends_on("py-numpy@1.16.0:", type=("build", "run"))
+ depends_on("py-pandas@0.24.0:", type=("build", "run"))
+ # Unable to Find "pint.unit" -- Module Not Found Error with py-pint@0.20:
+ depends_on("py-pint@0.10.1:0.19", type=("build", "run"))
+ depends_on("py-pooch@0.1:", type=("build", "run"))
+ depends_on("py-pyproj@2.3.0:", type=("build", "run"))
+ depends_on("py-scipy@1.0:", type=("build", "run"))
+ depends_on("py-traitlets@4.3.0:", type=("build", "run"))
+ depends_on("py-xarray@0.14.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-metric-learn/package.py b/var/spack/repos/builtin/packages/py-metric-learn/package.py
new file mode 100644
index 0000000000..16b637c435
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-metric-learn/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMetricLearn(PythonPackage):
+ """metric-learn contains efficient Python implementations of several
+ popular supervised and weakly-supervised metric learning algorithms. As
+ part of scikit-learn-contrib, the API of metric-learn is compatible with
+ scikit-learn, the leading library for machine learning in Python. This
+ allows to use all the scikit-learn routines (for pipelining, model
+ selection, etc) with metric learning algorithms through a unified
+ interface."""
+
+ homepage = "https://github.com/scikit-learn-contrib/metric-learn"
+ pypi = "metric-learn/metric-learn-0.7.0.tar.gz"
+
+ version("0.7.0", sha256="2b35246a1098d74163b16cc7779e0abfcbf9036050f4caa258e4fee55eb299cc")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy@1.11.0:", type=("build", "run"))
+ depends_on("py-scipy@0.17.0:", type=("build", "run"))
+ depends_on("py-scikit-learn@0.21.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-metrics/package.py b/var/spack/repos/builtin/packages/py-metrics/package.py
new file mode 100644
index 0000000000..71ae1d32f4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-metrics/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMetrics(PythonPackage):
+ """metrics for Python, C, C++, Go and Javascript code"""
+
+ homepage = "https://github.com/finklabs/metrics/"
+ pypi = "metrics/metrics-0.3.3.tar.gz"
+
+ version("0.3.3", sha256="60a2bceea8b56f3c408c4ea5d2e9891f5ddb17e4754f7ebc3feb8844faef9ecf")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pygments@2.2.0", type=("build", "run"))
+ depends_on("py-pathspec@0.5.5", type=("build", "run"))
+ depends_on("py-pathlib2@2.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mgmetis/package.py b/var/spack/repos/builtin/packages/py-mgmetis/package.py
new file mode 100644
index 0000000000..2d67385311
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mgmetis/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMgmetis(PythonPackage):
+ """METIS partitioner for mesh and graphMETIS partitioner for mesh and graph"""
+
+ homepage = "https://github.com/chiao45/mgmetis"
+ git = "https://github.com/chiao45/mgmetis.git"
+ maintainers("tech-91")
+
+ license("MIT")
+
+ version("master", branch="master")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy@1.20.0:1.26.4", type=("build", "run"))
+ depends_on("py-cython", type=("build"))
+ depends_on("py-mpi4py@3.0.3:3", type=("build", "run"))
+ depends_on("py-pytest")
+ depends_on("metis+shared", type="all")
diff --git a/var/spack/repos/builtin/packages/py-mikado/package.py b/var/spack/repos/builtin/packages/py-mikado/package.py
index 0a0b8e3e39..60a383fe1d 100644
--- a/var/spack/repos/builtin/packages/py-mikado/package.py
+++ b/var/spack/repos/builtin/packages/py-mikado/package.py
@@ -16,6 +16,8 @@ class PyMikado(PythonPackage):
version("1.2.4", sha256="c0485dba3b7c285599809e058c83f33b5efa9522d20d9f980423410604207f61")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-wheel@0.28.0:", type="build")
depends_on("py-pyyaml", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-minisom/package.py b/var/spack/repos/builtin/packages/py-minisom/package.py
new file mode 100644
index 0000000000..37925b0414
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-minisom/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMinisom(PythonPackage):
+ """MiniSom is a minimalistic and Numpy based implementation of the Self
+ Organizing Maps (SOM). SOM is a type of Artificial Neural Network able to
+ convert complex, nonlinear statistical relationships between
+ high-dimensional data items into simple geometric relationships on a
+ low-dimensional display. Minisom is designed to allow researchers to easily
+ build on top of it and to give students the ability to quickly grasp its
+ details.
+
+ The project initially aimed for a minimalistic implementation of the
+ Self-Organizing Map (SOM) algorithm, focusing on simplicity in features,
+ dependencies, and code style. Although it has expanded in terms of
+ features, it remains minimalistic by relying only on the numpy library and
+ emphasizing vectorization in coding style."""
+
+ homepage = "https://github.com/JustGlowing/minisom"
+ pypi = "MiniSom/MiniSom-2.3.1.tar.gz"
+
+ version("2.3.1", sha256="c0f1411616d7614fbd440a811975c12c7dfc091baea33efb49f5f4eabad7b966")
+
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-minkowskiengine/package.py b/var/spack/repos/builtin/packages/py-minkowskiengine/package.py
index 41fa2afc87..6ae752d6fe 100644
--- a/var/spack/repos/builtin/packages/py-minkowskiengine/package.py
+++ b/var/spack/repos/builtin/packages/py-minkowskiengine/package.py
@@ -17,6 +17,8 @@ class PyMinkowskiengine(PythonPackage, CudaPackage):
version("0.5.4", sha256="b1879c00d0b0b1d30ba622cce239886a7e3c78ee9da1064cdfe2f64c2ab15f94")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-pybind11", type="link")
# in newer pip versions --install-option does not exist
diff --git a/var/spack/repos/builtin/packages/py-misk/package.py b/var/spack/repos/builtin/packages/py-misk/package.py
new file mode 100644
index 0000000000..cd4835229f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-misk/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMisk(PythonPackage):
+ """Miscellaneous useful bits for Python 3."""
+
+ homepage = "https://github.com/marzer/misk"
+ url = "https://github.com/marzer/misk/archive/refs/tags/v0.8.1.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.8.1", sha256="35f3cceaefc5f1c3f379b5387a41ef4e57f487ec1b2bc4d8fdde72b2144f0060")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-misopy/package.py b/var/spack/repos/builtin/packages/py-misopy/package.py
index 61d42fff95..12f2433c6b 100644
--- a/var/spack/repos/builtin/packages/py-misopy/package.py
+++ b/var/spack/repos/builtin/packages/py-misopy/package.py
@@ -17,6 +17,8 @@ class PyMisopy(PythonPackage):
version("0.5.4", sha256="377a28b0c254b1920ffdc2d89cf96c3a21cadf1cf148ee6d6ef7a88ada067dfc")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@2.6:", type=("build", "run"))
depends_on("py-numpy@1.5.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ml-dtypes/package.py b/var/spack/repos/builtin/packages/py-ml-dtypes/package.py
index 5e3f85ab7b..eed59d4fbc 100644
--- a/var/spack/repos/builtin/packages/py-ml-dtypes/package.py
+++ b/var/spack/repos/builtin/packages/py-ml-dtypes/package.py
@@ -17,11 +17,18 @@ class PyMlDtypes(PythonPackage):
license("Apache-2.0")
+ version("0.4.0", tag="v0.4.0", commit="9fc7e6773acb66fa496ed8d476a008a489a4da49")
version("0.3.1", tag="v0.3.1", commit="bbeedd470ecac727c42e97648c0f27bfc312af30")
version("0.2.0", tag="v0.2.0", commit="5b9fc9ad978757654843f4a8d899715dbea30e88")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.9:", when="@0.3:", type=("build", "link", "run"))
depends_on("py-numpy@1.21:", type=("build", "link", "run"))
+ # https://github.com/jax-ml/ml_dtypes/pull/143
+ depends_on("py-numpy@:1", when="@:0.3", type=("build", "link", "run"))
# Build dependencies are overconstrained, older versions work just fine
- depends_on("py-pybind11", type=("build", "link"))
+ depends_on("py-pybind11", when="@:0.3.1", type=("build", "link"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mlflow/package.py b/var/spack/repos/builtin/packages/py-mlflow/package.py
index b108dd9cf6..b1bd083144 100644
--- a/var/spack/repos/builtin/packages/py-mlflow/package.py
+++ b/var/spack/repos/builtin/packages/py-mlflow/package.py
@@ -43,14 +43,14 @@ class PyMlflow(PythonPackage):
depends_on("py-pandas@:1", type=("build", "run"))
depends_on("py-querystring-parser@:1", type=("build", "run"))
depends_on("py-sqlalchemy@1.4.0:1", type=("build", "run"))
- for platform in ["linux", "darwin", "cray"]:
+ for platform in ["linux", "darwin"]:
depends_on("py-gunicorn@:20", type=("build", "run"), when=f"platform={platform}")
depends_on("py-waitress@:2", type=("build", "run"), when="platform=windows")
depends_on("py-scikit-learn@:1", type=("build", "run"))
depends_on("py-pyarrow@4.0.0:10", type=("build", "run"))
depends_on("py-shap@0.40:0", type=("build", "run"))
depends_on("py-markdown@3.3:3", type=("build", "run"))
- for platform in ["linux", "darwin", "cray"]:
+ for platform in ["linux", "darwin"]:
depends_on("py-jinja2@2.11:3", type=("build", "run"), when=f"platform={platform}")
depends_on("py-jinja2@3.0:3", type=("build", "run"), when="platform=windows")
depends_on("py-matplotlib@:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mmcv/package.py b/var/spack/repos/builtin/packages/py-mmcv/package.py
index 015c8ded2a..1d62e15c55 100644
--- a/var/spack/repos/builtin/packages/py-mmcv/package.py
+++ b/var/spack/repos/builtin/packages/py-mmcv/package.py
@@ -18,6 +18,8 @@ class PyMmcv(PythonPackage):
version("0.5.1", sha256="7c5ad30d9b61e44019e81ef46c406aa85dd08b5d0ba12ddd5cdc9c445835a55e")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-addict", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mne-bids/package.py b/var/spack/repos/builtin/packages/py-mne-bids/package.py
new file mode 100644
index 0000000000..4531015272
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mne-bids/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMneBids(PythonPackage):
+ """MNE-BIDS: Organizing MEG, EEG, and iEEG data according to the BIDS
+ specification and facilitating their analysis with MNE-Python."""
+
+ homepage = "https://mne.tools/mne-bids"
+ pypi = "mne_bids/mne_bids-0.15.0.tar.gz"
+ git = "https://github.com/mne-tools/mne-bids"
+
+ license("BSD-3-Clause")
+
+ version("0.15.0", sha256="8a3ac7fb586ba2be70eb687c67ae060b42693078c56232180b27161124c22f72")
+
+ variant("full", default=False, description="Enable full functionality.")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+
+ depends_on("py-mne@1.5:", type=("build", "run"))
+ depends_on("py-numpy@1.21.2:", type=("build", "run"))
+ depends_on("py-scipy@1.7.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mne/package.py b/var/spack/repos/builtin/packages/py-mne/package.py
index e5fd29ebd5..05255703b5 100644
--- a/var/spack/repos/builtin/packages/py-mne/package.py
+++ b/var/spack/repos/builtin/packages/py-mne/package.py
@@ -9,12 +9,16 @@ from spack.package import *
class PyMne(PythonPackage):
"""MNE python project for MEG and EEG data analysis."""
- homepage = "http://mne.tools/"
+ homepage = "https://mne.tools/"
pypi = "mne/mne-0.23.4.tar.gz"
git = "https://github.com/mne-tools/mne-python.git"
+ maintainers("ChristopherChristofi")
+
license("BSD-3-Clause")
+ version("1.7.1", sha256="a87bbc998b792532d2c87add8b0f7bbf28a4d8cf5db1bdfb6d6e260791754498")
+ version("1.6.1", sha256="e4f5683d01cef675eddad788bdb6b44cc015dff0fb1ddfca3c4105edfb757ef8")
version("1.4.2", sha256="dd2bf35a90d951bef15ff3a651045b0373eff26018a821667109c727d55c7d63")
version("1.4.0", sha256="7834f5b79c2c9885ca601bbddd8db3c2b2f37c34443fc0caf0447751f6c37a2a")
version("1.3.1", sha256="0d0626d3187dd0ee6f8740d054660a1b5fce4c879f814b745b13c5a587baf32b")
@@ -27,20 +31,24 @@ class PyMne(PythonPackage):
variant("full", default=False, when="@:0.23", description="Enable full functionality.")
variant("hdf5", default=False, when="@1:", description="Enable hdf5 functionality.")
+ depends_on("python@3.9:", when="@1.7:", type=("build", "run"))
depends_on("python@3.8:", when="@1.4:", type=("build", "run"))
- depends_on("py-setuptools@45:", when="@1.4:", type="build")
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-scm@6.2:", when="@1.4:", type="build")
+ depends_on("py-hatchling", when="@1.7:", type="build")
+ depends_on("py-hatch-vcs", when="@1.7:", type="build")
# requirements_base.txt with versions specified in README.rst (marked with *)
+ depends_on("py-numpy@1.21.2:", when="@1.6.1:", type=("build", "run"))
depends_on("py-numpy@1.20.2:", when="@1.4:", type=("build", "run")) # *
depends_on("py-numpy@1.18.1:", when="@1:", type=("build", "run")) # *
depends_on("py-numpy@1.15.4:", when="@0.23:", type=("build", "run"))
depends_on("py-numpy@1.11.3:", type=("build", "run"))
+ depends_on("py-numpy@:1", when="@:1.6", type=("build", "run"))
+ depends_on("py-scipy@1.7.1:", when="@1.6.1:", type=("build", "run"))
depends_on("py-scipy@1.6.3:", when="@1.4:", type=("build", "run"))
depends_on("py-scipy@1.4.1:", when="@1:", type=("build", "run")) # *
depends_on("py-scipy@1.1.0:", when="@0.23:", type=("build", "run"))
depends_on("py-scipy@0.17.1:", type=("build", "run"))
+ depends_on("py-matplotlib@3.5:", when="@1.6.1:", type=("build", "run"))
depends_on("py-matplotlib@3.4:", when="@1:", type=("build", "run")) # *
depends_on("py-matplotlib@3.1:", when="@1:", type=("build", "run")) # *
depends_on("py-tqdm", when="@1:", type=("build", "run"))
@@ -48,18 +56,25 @@ class PyMne(PythonPackage):
depends_on("py-decorator", when="@1:", type=("build", "run"))
depends_on("py-packaging", when="@1:", type=("build", "run"))
depends_on("py-jinja2", when="@1:", type=("build", "run"))
- depends_on("py-importlib-resources@5.10.2:", when="@1.4: ^python@:3.8", type=("build", "run"))
+ depends_on("py-lazy-loader@0.3:", when="@1.6.1:", type=("build", "run"))
with when("+hdf5"):
depends_on("py-h5io", type=("build", "run"))
depends_on("py-pymatreader", type=("build", "run"))
+ # Historical dependencies
+ depends_on("py-setuptools@45:", when="@1.4:1.6", type="build")
+ depends_on("py-setuptools", when="@:1.6", type="build")
+ depends_on("py-setuptools-scm@6.2:", when="@1.4:1.6", type="build")
+ depends_on(
+ "py-importlib-resources@5.10.2:", when="@1.4:1.6 ^python@:3.9", type=("build", "run")
+ )
+
with when("+full"):
# requirements.txt with versions specified in README.rst (marked with *)
depends_on("py-matplotlib@3.0.3:", type=("build", "run")) # *
depends_on("py-pyqt5@5.10:,:5.15.1,5.15.4:", when="platform=linux", type=("build", "run"))
depends_on("py-pyqt5@5.10:,:5.13", when="platform=darwin", type=("build", "run"))
- depends_on("py-pyqt5@5.10:,:5.15.2,5.15.4:", when="platform=cray", type=("build", "run"))
depends_on("py-pyqt5@5.10:,:5.15.2,5.15.4:", when="platform=win32", type=("build", "run"))
depends_on("py-pyqt5-sip", type=("build", "run"))
depends_on("py-sip", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-modin/package.py b/var/spack/repos/builtin/packages/py-modin/package.py
index db594d0051..b353982e1e 100644
--- a/var/spack/repos/builtin/packages/py-modin/package.py
+++ b/var/spack/repos/builtin/packages/py-modin/package.py
@@ -30,6 +30,8 @@ class PyModin(PythonPackage):
depends_on("py-pandas@1.1.5", when="^python@:3.7", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"))
depends_on("py-numpy@1.18.5:", type=("build", "run"))
+ # https://github.com/modin-project/modin/issues/7310
+ depends_on("py-numpy@:1", when="@:0.30", type=("build", "run"))
depends_on("py-fsspec", type=("build", "run"))
depends_on("py-psutil", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-modules-gui/package.py b/var/spack/repos/builtin/packages/py-modules-gui/package.py
new file mode 100644
index 0000000000..f241e27d63
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-modules-gui/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyModulesGui(PythonPackage):
+ """MoGui is a Graphical User Interface (GUI) for Environment Modules.
+ It helps users selecting modules to load and save module collections."""
+
+ homepage = "https://github.com/cea-hpc/mogui"
+ pypi = "modules-gui/modules-gui-0.2.tar.gz"
+
+ maintainers("adrien-cotte")
+
+ license("GPL-2.0")
+
+ version("0.2", sha256="d58a3943f4631756afa4f84c13b70fae67a72365ab3cad28014f972b8d023aec")
+
+ depends_on("py-setuptools@61:", type=("build"))
+ depends_on("py-setuptools-scm", type=("build"))
+ depends_on("py-pyqt5", type=("run"))
+ depends_on("environment-modules@5.2:", type=("run"))
diff --git a/var/spack/repos/builtin/packages/py-monai/package.py b/var/spack/repos/builtin/packages/py-monai/package.py
new file mode 100644
index 0000000000..78f8771c75
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-monai/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMonai(PythonPackage):
+ """AI Toolkit for Healthcare Imaging"""
+
+ homepage = "https://monai.io/"
+ url = "https://github.com/Project-MONAI/MONAI/archive/refs/tags/0.8.1.tar.gz"
+
+ license("Apache-2.0", checked_by="qwertos")
+
+ version("1.3.2", sha256="e370e1fcd78854fb22c2414fa7419c15ff5afce67b923ce666d0f12979015136")
+ version("0.8.1", sha256="e1227e6406cc47c23f6846f617350879ceba353915b948d917bf4308b17ea861")
+ version("0.8.0", sha256="a63df7d5a680d9641c223ea090ff843a7d6f20bdb62095bd44f3b0480a4706ed")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("python@3.8:", when="@1.2:", type=("build", "run"))
+ depends_on("py-ninja", type="build")
+ depends_on("py-wheel", type="build")
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch@1.6:", type=("build", "run"))
+ depends_on("py-torch@1.9:", when="@1.3.2:", type=("build", "run"))
+ depends_on("py-numpy@1.17:", type=("build", "run"))
+ depends_on("py-numpy@1.20:", when="@1.3.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-morphio/package.py b/var/spack/repos/builtin/packages/py-morphio/package.py
index 80705367d7..15f269967f 100644
--- a/var/spack/repos/builtin/packages/py-morphio/package.py
+++ b/var/spack/repos/builtin/packages/py-morphio/package.py
@@ -15,12 +15,18 @@ class PyMorphio(PythonPackage):
git = "https://github.com/BlueBrain/MorphIO.git"
pypi = "morphio/MorphIO-3.3.2.tar.gz"
- license("LGPL-3.0-or-later")
+ license("LGPL-3.0-or-later", when="@:3.3.6")
+ license("Apache-2.0", when="@3.3.7:")
+
+ maintainers("tristan0x")
version("master", branch="master", submodules=True)
+ version("3.3.7", sha256="7cb6676fcbaa2ac154742ca8aed3fcb03bb4643852e36e368858580133b61732")
version("3.3.6", sha256="0f2e55470d92a3d89f2141ae905ee104fd16257b93dafb90682d90171de2f4e6")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@24.2:", type="build")
depends_on("py-setuptools-scm", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
index 76e4891780..430e32c57b 100644
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -2,6 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
from spack.package import *
@@ -16,9 +17,13 @@ class PyMpi4py(PythonPackage):
pypi = "mpi4py/mpi4py-3.0.3.tar.gz"
git = "https://github.com/mpi4py/mpi4py.git"
- license("BSD-2-Clause")
+ license("BSD-3-Clause", when="@4:")
+ license("BSD-2-Clause", when="@:3")
version("master", branch="master")
+ version("4.0.1", sha256="f3174b245775d556f4fddb32519a2066ef0592edc810c5b5a59238f9a0a40c89")
+ version("4.0.0", sha256="820d31ae184d69c17d9b5d55b1d524d56be47d2e6cb318ea4f3e7007feff2ccc")
+ version("3.1.6", sha256="c8fa625e0f92b082ef955bfb52f19fa6691d29273d7d71135d295aa143dee6cb")
version("3.1.5", sha256="a706e76db9255135c2fb5d1ef54cb4f7b0e4ad9e33cbada7de27626205f2a153")
version("3.1.4", sha256="17858f2ebc623220d0120d1fa8d428d033dde749c4bc35b33d81a66ad7f93480")
version("3.1.3", sha256="f1e9fae1079f43eafdd9f817cdb3fd30d709edc093b5d5dada57a461b2db3008")
@@ -31,8 +36,12 @@ class PyMpi4py(PythonPackage):
version("2.0.0", sha256="6543a05851a7aa1e6d165e673d422ba24e45c41e4221f0993fe1e5924a00cb81")
version("1.3.1", sha256="e7bd2044aaac5a6ea87a87b2ecc73b310bb6efe5026031e33067ea3c2efc3507")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@40.9:", type="build")
- depends_on("py-cython@0.27:2", type="build")
+ depends_on("py-cython@3:", when="@4:", type="build")
+ depends_on("py-cython@0.27:2", when="@:3.1.6", type="build")
+ depends_on("py-cython@0.27:3", when="@master", type="build")
depends_on("mpi")
def setup_build_environment(self, env):
@@ -42,3 +51,35 @@ class PyMpi4py(PythonPackage):
def cythonize(self):
with working_dir(self.build_directory):
python(join_path("conf", "cythonize.py"))
+
+ def create_mpi_config_file(self, cfg_fn):
+ """
+ create mpi.cfg file introduced since version 4.0.0.
+ see https://mpi4py.readthedocs.io/en/stable/mpi4py.html#mpi4py.get_config
+ """
+ mpi_spec = self.spec["mpi"]
+ include_dirs = mpi_spec.headers.directories
+ library_dirs = mpi_spec.libs.directories
+ with open(cfg_fn, "w") as cfg:
+ cfg.write("[mpi]\n")
+ cfg.write("mpi_dir = {}\n".format(mpi_spec.prefix))
+ cfg.write("mpicc = {}\n".format(mpi_spec.mpicc))
+ cfg.write("mpicxx = {}\n".format(mpi_spec.mpicxx))
+ cfg.write("\n")
+ cfg.write("## define_macros =\n")
+ cfg.write("## undef_macros =\n")
+ cfg.write("include_dirs = {}\n".format(include_dirs))
+ cfg.write("## libraries = mpi\n")
+ cfg.write("library_dirs = {}\n".format(library_dirs))
+ cfg.write("## runtime_library_dirs = %(mpi_dir)s/lib\n")
+ cfg.write("\n")
+ cfg.write("## extra_compile_args =\n")
+ cfg.write("## extra_link_args =\n")
+ cfg.write("## extra_objects =\n")
+
+ @run_after("install", when="@4:")
+ def install_cfg(self):
+ python_dir = join_path(self.prefix, python_platlib, "mpi4py")
+ cfg_fn = join_path(python_dir, "mpi.cfg")
+ if not os.path.isfile(cfg_fn):
+ self.create_mpi_config_file(cfg_fn)
diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py
index f38a363292..9a10d0fb17 100644
--- a/var/spack/repos/builtin/packages/py-mpmath/package.py
+++ b/var/spack/repos/builtin/packages/py-mpmath/package.py
@@ -14,10 +14,12 @@ class PyMpmath(PythonPackage):
license("BSD-3-Clause")
+ version("1.3.0", sha256="7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f")
version("1.2.1", sha256="79ffb45cf9f4b101a807595bcb3e72e0396202e0b1d25d689134b48c4216a81a")
version("1.1.0", sha256="fc17abe05fbab3382b61a123c398508183406fa132e0223874578e20946499f6")
version("1.0.0", sha256="04d14803b6875fe6d69e6dccea87d5ae5599802e4b1df7997bddd2024001050c")
version("0.19", sha256="68ddf6426dcda445323467d89892d2cffbbd1ae0b31ac1241b1b671749d63222")
+ depends_on("py-setuptools", type="build")
depends_on("py-setuptools@36.7.0:", type="build", when="@1.2.0:")
- depends_on("py-setuptools-scm@1.7.0:", type="build", when="@1.2.0:")
+ depends_on("py-setuptools-scm@1.7.0:", type="build", when="@1.2.0:1.2")
diff --git a/var/spack/repos/builtin/packages/py-mrcfile/package.py b/var/spack/repos/builtin/packages/py-mrcfile/package.py
index a07b505c57..833b730e5a 100644
--- a/var/spack/repos/builtin/packages/py-mrcfile/package.py
+++ b/var/spack/repos/builtin/packages/py-mrcfile/package.py
@@ -17,8 +17,10 @@ class PyMrcfile(PythonPackage):
license("BSD-3-Clause")
+ version("1.4.3", sha256="0c2c702167c50c8b67e4ff7b1ec825a6bb60c0bff388950af08c79c5fd49e28b")
version("1.3.0", sha256="034f1868abf87f4e494b8b039030b50045cabccf352b8b3e88a6bd3a6d665715")
depends_on("python@3.4.0:")
depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.12.0:", type=("build", "run"))
+ depends_on("py-numpy@1.16.0:", when="@1.4.3:", type=("build", "run"))
+ depends_on("py-numpy@1.12.0:", when="@1.3.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-msal/package.py b/var/spack/repos/builtin/packages/py-msal/package.py
index b742cfd284..518dcf6bea 100644
--- a/var/spack/repos/builtin/packages/py-msal/package.py
+++ b/var/spack/repos/builtin/packages/py-msal/package.py
@@ -14,19 +14,25 @@ class PyMsal(PythonPackage):
Accounts (MSA) using industry standard OAuth2 and OpenID Connect."""
homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python"
- pypi = "msal/msal-1.3.0.tar.gz"
+ pypi = "msal/msal-1.26.0.tar.gz"
license("MIT")
- # If you get diamond dependency problems on py-pyjwt,
- # consider using v1.20.0, which has looser constraints
+ version("1.26.0", sha256="224756079fe338be838737682b49f8ebc20a87c1c5eeaf590daae4532b83de15")
version("1.20.0", sha256="78344cd4c91d6134a593b5e3e45541e666e37b747ff8a6316c3668dd1e6ab6b2")
version("1.3.0", sha256="5442a3a9d006506e653d3c4daff40538bdf067bf07b6b73b32d1b231d5e77a92")
version("1.0.0", sha256="ecbe3f5ac77facad16abf08eb9d8562af3bc7184be5d4d90c9ef4db5bde26340")
- # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/1.20.0/setup.py
+ # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/1.26.0/setup.cfg
+
depends_on("py-setuptools", type="build")
- depends_on("py-requests@2.0.0:2", type=("build", "run"))
- depends_on("py-pyjwt@1.0.0:1+crypto", type=("build", "run"), when="@:1.3")
- depends_on("py-pyjwt@1.0.0:2+crypto", type=("build", "run"), when="@1.20:")
- depends_on("py-cryptography@0.6:40", type=("build", "run"), when="@1.20:")
+ depends_on("py-requests@2", type=("build", "run"))
+ depends_on("py-pyjwt@1:2+crypto", type=("build", "run"), when="@1.9:")
+ depends_on("py-pyjwt@1+crypto", type=("build", "run"), when="@:1.8")
+ depends_on("py-cryptography@0.6:43", type=("build", "run"), when="@1.24:")
+ depends_on("py-cryptography@0.6:42", type=("build", "run"), when="@1.22:1.23")
+ depends_on("py-cryptography@0.6:40", type=("build", "run"), when="@1.19:1.21")
+ depends_on("py-cryptography@0.6:39", type=("build", "run"), when="@1.18")
+ depends_on("py-cryptography@0.6:38", type=("build", "run"), when="@1.17")
+ depends_on("py-cryptography@0.6:37", type=("build", "run"), when="@1.15:1.16")
+ depends_on("py-cryptography@0.6:3", type=("build", "run"), when="@1.6:1.14")
diff --git a/var/spack/repos/builtin/packages/py-msgpack/package.py b/var/spack/repos/builtin/packages/py-msgpack/package.py
index 44e6e84ec0..961e8d0a45 100644
--- a/var/spack/repos/builtin/packages/py-msgpack/package.py
+++ b/var/spack/repos/builtin/packages/py-msgpack/package.py
@@ -26,6 +26,8 @@ class PyMsgpack(PythonPackage):
version("0.6.1", sha256="734e1abc6f14671f28acd5266de336ae6d8de522fe1c8d0b7146365ad1fe6b0f")
version("0.6.0", sha256="4478a5f68142414084cd43af8f21cef9619ad08bb3c242ea505330dade6ca9ea")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@35.0.2:", when="@1.0.4:", type="build")
depends_on("py-cython@0.29.30:0.29", when="@1.0.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-msrest/package.py b/var/spack/repos/builtin/packages/py-msrest/package.py
index 7466a510be..bad5e43cfa 100644
--- a/var/spack/repos/builtin/packages/py-msrest/package.py
+++ b/var/spack/repos/builtin/packages/py-msrest/package.py
@@ -11,8 +11,15 @@ class PyMsrest(PythonPackage):
"""AutoRest swagger generator Python client runtime."""
homepage = "https://github.com/Azure/msrest-for-python"
- pypi = "msrest/msrest-0.6.16.tar.gz"
+ pypi = "msrest/msrest-0.7.1.zip"
+ def url_for_version(self, version):
+ if Version("0.4.8") < version < Version("0.7"):
+ return "https://pypi.io/packages/source/m/msrest/msrest-{0}.tar.gz".format(version)
+
+ return super().url_for_version(version)
+
+ version("0.7.1", sha256="6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9")
version("0.6.21", sha256="72661bc7bedc2dc2040e8f170b6e9ef226ee6d3892e01affd4d26b06474d68d8")
version("0.6.16", sha256="214c5be98954cb45feb6a6a858a7ae6d41a664e80294b65db225bbaa33d9ca3c")
@@ -21,3 +28,4 @@ class PyMsrest(PythonPackage):
depends_on("py-requests-oauthlib@0.5.0:", type=("build", "run"))
depends_on("py-isodate@0.6.0:", type=("build", "run"))
depends_on("py-certifi@2017.4.17:", type=("build", "run"))
+ depends_on("py-azure-core@1.24:", type=("build", "run"), when="@0.7.1:")
diff --git a/var/spack/repos/builtin/packages/py-multi-imbalance/package.py b/var/spack/repos/builtin/packages/py-multi-imbalance/package.py
new file mode 100644
index 0000000000..02cdad82eb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-multi-imbalance/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyMultiImbalance(PythonPackage):
+ """Multi-class imbalance is a common problem occurring in real-world
+ supervised classifications tasks. While there has already been some
+ research on the specialized methods aiming to tackle that challenging
+ problem, most of them still lack coherent Python implementation that is
+ simple, intuitive and easy to use. multi-imbalance is a python package
+ tackling the problem of multi-class imbalanced datasets in machine
+ learnin"""
+
+ homepage = "https://github.com/damianhorna/multi-imbalance"
+ pypi = "multi-imbalance/multi-imbalance-0.0.14.tar.gz"
+
+ version("0.0.14", sha256="5b9e1ba5e012e0343c588fa5a4b9d69ca99464d2126f1392bac3fca24370498f")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy@1.17.0:", type=("build", "run"))
+ depends_on("py-scikit-learn@0.22:", type=("build", "run"))
+ depends_on("py-pandas@0.25.1:", type=("build", "run"))
+ depends_on("py-pytest@5.1.2:", type=("build", "run"))
+ depends_on("py-imbalanced-learn@0.6.1:", type=("build", "run"))
+ depends_on("py-coverage@5.1:", type=("build", "run"))
+ depends_on("py-pytest-cov@2.8.1:", type=("build", "run"))
+ depends_on("py-ipython@7.13.0:", type=("build", "run"))
+ depends_on("py-seaborn@0.10.1:", type=("build", "run"))
+ depends_on("py-matplotlib@3.2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-multidict/package.py b/var/spack/repos/builtin/packages/py-multidict/package.py
index f37228dc19..ff6677668c 100644
--- a/var/spack/repos/builtin/packages/py-multidict/package.py
+++ b/var/spack/repos/builtin/packages/py-multidict/package.py
@@ -15,13 +15,27 @@ class PyMultidict(PythonPackage):
license("Apache-2.0")
+ version("6.1.0", sha256="22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a")
version("6.0.4", sha256="3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49")
version("6.0.2", sha256="5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013")
version("5.2.0", sha256="0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce")
version("5.1.0", sha256="25b4e5f22d3a37ddf3effc0710ba692cfc792c2b9edfb9c05aefe823256e84d5")
- version("4.7.6", sha256="fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430")
+ with default_args(deprecated=True):
+ version("4.7.6", sha256="fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430")
+
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:6.0")
+ depends_on("python@:3.11", when="@:6.0.4")
+ depends_on("python@:3.10", when="@:6.0.2")
+ depends_on("python@:3.9", when="@:5.1")
+ depends_on("python@:3.8", when="@:4")
depends_on("py-setuptools@40:", type="build")
+ depends_on("py-typing-extensions@4.1:", when="@6.1: ^python@:3.10", type=("build", "run"))
# Historical dependencies
depends_on("py-pip@18:", when="@:4", type="build")
diff --git a/var/spack/repos/builtin/packages/py-multiecho/package.py b/var/spack/repos/builtin/packages/py-multiecho/package.py
index f1b5e7e8e1..f9619d0aba 100644
--- a/var/spack/repos/builtin/packages/py-multiecho/package.py
+++ b/var/spack/repos/builtin/packages/py-multiecho/package.py
@@ -14,11 +14,16 @@ class PyMultiecho(PythonPackage):
license("MIT")
+ version("0.29", sha256="df4860fe4478c162f976bdc4bdd2dc1c51ba2c33cb23658ac7218cf1597c4f0a")
version("0.28", sha256="d0459bd03398547116d8e989b2d2b7922af0ae7ae77e233794dd7253a2abced3")
- depends_on("python@3.6:3.9", type=("build", "run"))
+ depends_on("py-setuptools@62.2.0:", type="build", when="@0.29:")
depends_on("py-setuptools", type="build")
+ depends_on("py-argparse-manpage+setuptools", type="build", when="@0.29:")
depends_on("py-coloredlogs", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-nibabel", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("python@3.6:3.9", type=("build", "run"), when="@0.28")
diff --git a/var/spack/repos/builtin/packages/py-multiqc/package.py b/var/spack/repos/builtin/packages/py-multiqc/package.py
index 161d46cb35..0325b941f0 100644
--- a/var/spack/repos/builtin/packages/py-multiqc/package.py
+++ b/var/spack/repos/builtin/packages/py-multiqc/package.py
@@ -14,38 +14,37 @@ class PyMultiqc(PythonPackage):
homepage = "https://multiqc.info"
pypi = "multiqc/multiqc-1.0.tar.gz"
- license("GPL-3.0-only")
-
- version("1.15", sha256="ce5359a12226cf4ce372c6fdad142cfe2ae7501ffa97ac7aab544ced4db5ea3c")
- version("1.14", sha256="dcbba405f0c9521ed2bbd7e8f7a9200643047311c9619878b81d167300149362")
- version("1.13", sha256="0564fb0f894e6ca0822a0f860941b3ed2c33dce407395ac0c2103775d45cbfa0")
- version("1.7", sha256="02e6a7fac7cd9ed036dcc6c92b8f8bcacbd28983ba6be53afb35e08868bd2d68")
- version("1.5", sha256="fe0ffd2b0d1067365ba4e54ae8991f2f779c7c684b037549b617020ea883310a")
- version("1.3", sha256="cde17845680131e16521ace04235bb9496c78c44cdc7b5a0fb6fd93f4ad7a13b")
- version("1.0", sha256="1a49331a3d3f2e591a6e9902bc99b16e9205731f0cd2d6eaeee0da3d0f0664c9")
-
- depends_on("python@2.7:", when="@:1.7", type=("build", "run"))
- depends_on("python@3:", when="@1.9:", type=("build", "run"))
+ license("GPL-3.0-only", checked_by="A_N_Other")
+ maintainers("ewels", "vladsavelyev")
+
+ version("1.23", sha256="4e84664000fec69a0952a0457a8d780dcc1ce9e36d14680dbdba5610b9766265")
+
+ # dependency defintions move from setup.py to pyproject.toml as of @1.23:
+
+ # build deps
depends_on("py-setuptools", type="build")
- depends_on("py-matplotlib@2.1.1:", type=("build", "run"), when="@1.13:")
- depends_on("py-matplotlib@2.1.1:2", type=("build", "run"), when="@1.7")
- depends_on("py-matplotlib@:2.1.0", type=("build", "run"), when="@1.5")
- depends_on("py-matplotlib", type=("build", "run"), when="@:1.3")
- depends_on("py-networkx@2.5.1:", type=("build", "run"), when="@1.13:")
- depends_on("py-networkx@:1", type=("build", "run"), when="@1.3")
- depends_on("py-numpy", type=("build", "run"))
+
+ # current run deps
depends_on("py-click", type=("build", "run"))
- depends_on("py-coloredlogs", type=("build", "run"), when="@1.13:")
- depends_on("py-future@0.14.1:", type=("build", "run"))
+ depends_on("py-humanize", type=("build", "run"), when="@1.18:")
+ depends_on("py-importlib-metadata", type=("build", "run"), when="@1.16:")
depends_on("py-jinja2@3.0.0:", type=("build", "run"), when="@1.14:")
depends_on("py-jinja2@2.9:", type=("build", "run"), when="@:1.13")
- depends_on("py-lzstring", type=("build", "run"))
+ depends_on("py-kaleido", type=("build", "run"), when="@1.20:")
depends_on("py-markdown", type=("build", "run"), when="@1.3:")
- depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-pyyaml@4:", type=("build", "run"), when="@1.13:")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"), when="@1.16:")
depends_on("py-requests", type=("build", "run"), when="@1.3:")
+ depends_on("py-pillow@10:", type=("build", "run"), when="@1.20:")
+ depends_on("py-plotly@5.18:", type=("build", "run"), when="@1.21:")
+ depends_on("py-plotly", type=("build", "run"), when="@1.20")
+ depends_on("py-pyyaml@4:", type=("build", "run"), when="@1.13:")
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-pyaml-env", type=("build", "run"), when="@1.18:")
depends_on("py-rich@10:", type=("build", "run"), when="@1.13:")
depends_on("py-rich-click", type=("build", "run"), when="@1.13:")
- depends_on("py-simplejson", type=("build", "run"))
- depends_on("py-spectra@0.0.10:", type=("build", "run"), when="@1.5:")
- depends_on("py-spectra", type=("build", "run"))
+ depends_on("py-coloredlogs", type=("build", "run"), when="@1.13:")
+ depends_on("py-spectra@0.0.10:", type=("build", "run"), when="@1.4:")
+ depends_on("py-spectra", type=("build", "run"), when="@1.18:")
+ depends_on("py-typeguard", type=("build", "run"), when="@1.23:")
+ depends_on("py-tqdm", type=("build", "run"), when="@1.23:")
diff --git a/var/spack/repos/builtin/packages/py-multiurl/package.py b/var/spack/repos/builtin/packages/py-multiurl/package.py
new file mode 100644
index 0000000000..736e4188f6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-multiurl/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyMultiurl(PythonPackage):
+ """A package to download several URL as one, as well as supporting multi-part URLs."""
+
+ homepage = "https://github.com/ecmwf/multiurl"
+ pypi = "multiurl/multiurl-0.2.3.2.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.2.3.2", sha256="b625892ef3a5b8d4bd323f1dcd4750b6ea7e4e2e2e4574b6e88cdf92e10579e9")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-requests")
+ depends_on("py-tqdm")
+ depends_on("py-pytz")
+ depends_on("py-python-dateutil")
diff --git a/var/spack/repos/builtin/packages/py-murmurhash/package.py b/var/spack/repos/builtin/packages/py-murmurhash/package.py
index ecd8d65d1e..fb4e74b0d6 100644
--- a/var/spack/repos/builtin/packages/py-murmurhash/package.py
+++ b/var/spack/repos/builtin/packages/py-murmurhash/package.py
@@ -17,5 +17,7 @@ class PyMurmurhash(PythonPackage):
version("1.0.2", sha256="c7a646f6b07b033642b4f52ae2e45efd8b80780b3b90e8092a0cec935fbf81e2")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-wheel@0.32.0:0.32", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mx/package.py b/var/spack/repos/builtin/packages/py-mx/package.py
index f247ea1b0d..684903fadb 100644
--- a/var/spack/repos/builtin/packages/py-mx/package.py
+++ b/var/spack/repos/builtin/packages/py-mx/package.py
@@ -21,5 +21,7 @@ class PyMx(PythonPackage):
version("3.2.8", sha256="0da55233e45bc3f88870e62e60a79c2c86bad4098b8128343fd7be877f44a3c0")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mxfold2/package.py b/var/spack/repos/builtin/packages/py-mxfold2/package.py
index 92df3ac7f2..184247aef8 100644
--- a/var/spack/repos/builtin/packages/py-mxfold2/package.py
+++ b/var/spack/repos/builtin/packages/py-mxfold2/package.py
@@ -19,6 +19,8 @@ class PyMxfold2(PythonPackage):
version("0.1.1", sha256="9f39c6ff4138212d1ad2639005f5c05ffb4df0f7e22f5e7ad49466a05aa047e5")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-torch@1.7:~valgrind", type=("build", "run"))
depends_on("py-torchvision", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-myhdl/package.py b/var/spack/repos/builtin/packages/py-myhdl/package.py
index 0b669e6529..2716d8b9d2 100644
--- a/var/spack/repos/builtin/packages/py-myhdl/package.py
+++ b/var/spack/repos/builtin/packages/py-myhdl/package.py
@@ -10,12 +10,14 @@ from spack.package import *
class PyMyhdl(PythonPackage):
"""Python as a Hardware Description Language"""
- homepage = "http://www.myhdl.org"
+ homepage = "https://www.myhdl.org"
pypi = "myhdl/myhdl-0.9.0.tar.gz"
license("LGPL-2.1-or-later")
version("0.9.0", sha256="52d12a5fe2cda22558806272af3c2b519b6f7095292b8e6c8ad255fb604507a5")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:2.8,3.4:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-mypy/package.py b/var/spack/repos/builtin/packages/py-mypy/package.py
index 3c7164f651..18065a7880 100644
--- a/var/spack/repos/builtin/packages/py-mypy/package.py
+++ b/var/spack/repos/builtin/packages/py-mypy/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyMypy(PythonPackage):
"""Optional static typing for Python."""
- homepage = "http://www.mypy-lang.org/"
+ homepage = "https://www.mypy-lang.org/"
pypi = "mypy/mypy-0.740.tar.gz"
git = "https://github.com/python/mypy.git"
@@ -17,6 +17,10 @@ class PyMypy(PythonPackage):
license("MIT AND PSF-2.0", checked_by="tgamblin")
+ version("1.11.2", sha256="7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79")
+ version("1.11.1", sha256="f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08")
+ version("1.10.1", sha256="1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0")
+ version("1.9.0", sha256="3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974")
version("1.8.0", sha256="6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07")
version("1.7.1", sha256="fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2")
version("1.7.0", sha256="1e280b5697202efa698372d2f39e9a6713a0395a756b1c6bd48995f8d72690dc")
@@ -53,6 +57,9 @@ class PyMypy(PythonPackage):
version("0.740", sha256="48c8bc99380575deb39f5d3400ebb6a8a1cb5cc669bbba4d3bb30f904e0a0e7d")
version("0.670", sha256="e80fd6af34614a0e898a57f14296d0dacb584648f0339c2e000ddbf0f4cc2f8d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# pyproject.toml
depends_on("py-setuptools@40.6.2:", when="@0.790:", type="build")
depends_on("py-setuptools", type="build")
@@ -63,6 +70,7 @@ class PyMypy(PythonPackage):
# setup.py
depends_on("python@3.8:", when="@1.5:", type=("build", "run"))
depends_on("python@3.7:", when="@0.981:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.6:", when="@1.11:", type=("build", "run"))
depends_on("py-typing-extensions@4.1:", when="@1.5:", type=("build", "run"))
depends_on("py-typing-extensions@3.10:", when="@0.930:", type=("build", "run"))
depends_on("py-typing-extensions@3.7.4:", when="@0.700:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mysql-connector-python/package.py b/var/spack/repos/builtin/packages/py-mysql-connector-python/package.py
index 81f152e53b..926d45d551 100644
--- a/var/spack/repos/builtin/packages/py-mysql-connector-python/package.py
+++ b/var/spack/repos/builtin/packages/py-mysql-connector-python/package.py
@@ -20,5 +20,8 @@ class PyMysqlConnectorPython(PythonPackage):
version("8.0.13", sha256="d4c0834c583cdb90c0aeae90b1917d58355a4bf9b0266c16fd58874a5607f9d4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-protobuf@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-mysqlclient/package.py b/var/spack/repos/builtin/packages/py-mysqlclient/package.py
index c864f5a32b..ffc210d589 100644
--- a/var/spack/repos/builtin/packages/py-mysqlclient/package.py
+++ b/var/spack/repos/builtin/packages/py-mysqlclient/package.py
@@ -17,10 +17,19 @@ class PyMysqlclient(PythonPackage):
license("GPL-2.0-or-later")
+ version("2.2.4", sha256="33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41")
version("1.4.6", sha256="f3fdaa9a38752a3b214a6fe79d7cae3653731a53e577821f9187e67cbecb2e16")
version("1.4.5", sha256="e80109b0ae8d952b900b31b623181532e5e89376d707dcbeb63f99e69cefe559")
version("1.4.4", sha256="9c737cc55a5dc8dd3583a942d5a9b21be58d16f00f5fefca4e575e7d9682e98c")
version("1.3.13", sha256="ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("mysql")
+
+ # Fix "library not found for -lzlib" as described in
+ # https://github.com/PyMySQL/mysqlclient/issues/584 by backporting the
+ # patch from @2.2.0rc1 that uses pkg-config instead of mysql_config
+ # https://github.com/PyMySQL/mysqlclient/pull/586/files
+ patch("use-pkg-config.patch", when="@1.4:2.1")
diff --git a/var/spack/repos/builtin/packages/py-mysqlclient/use-pkg-config.patch b/var/spack/repos/builtin/packages/py-mysqlclient/use-pkg-config.patch
new file mode 100644
index 0000000000..fc2a3bde15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mysqlclient/use-pkg-config.patch
@@ -0,0 +1,172 @@
+--- a/setup_posix.py 2019-11-06 02:21:07.000000000 -0500
++++ b/setup_posix.py 2024-05-13 18:22:02.200012959 -0400
+@@ -1,56 +1,31 @@
+-import os, sys
++import os, subprocess, sys
+ try:
+ from ConfigParser import SafeConfigParser
+ except ImportError:
+ from configparser import ConfigParser as SafeConfigParser
+
+-# This dequote() business is required for some older versions
+-# of mysql_config
+
+-def dequote(s):
+- if not s:
+- raise Exception("Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?")
+- if s[0] in "\"'" and s[0] == s[-1]:
+- s = s[1:-1]
+- return s
+-
+-_mysql_config_path = "mysql_config"
+-
+-def mysql_config(what):
+- from os import popen
+-
+- f = popen("%s --%s" % (_mysql_config_path, what))
+- data = f.read().strip().split()
+- ret = f.close()
+- if ret:
+- if ret/256:
+- data = []
+- if ret/256 > 1:
+- raise EnvironmentError("%s not found" % (_mysql_config_path,))
+- return data
++def find_package_name():
++ """Get available pkg-config package name"""
++ packages = ["mysqlclient", "mariadb"]
++ for pkg in packages:
++ try:
++ cmd = f"pkg-config --exists {pkg}"
++ print(f"Trying {cmd}")
++ subprocess.check_call(cmd, shell=True)
++ except subprocess.CalledProcessError as err:
++ print(err)
++ else:
++ return pkg
++ raise Exception("Cannot find valid pkg-config")
++
+
+ def get_config():
+ from setup_common import get_metadata_and_options, enabled, create_release_file
+- global _mysql_config_path
+
+ metadata, options = get_metadata_and_options()
+
+- if 'mysql_config' in options:
+- _mysql_config_path = options['mysql_config']
+- else:
+- try:
+- mysql_config('version')
+- except EnvironmentError:
+- # try mariadb_config
+- _mysql_config_path = "mariadb_config"
+- try:
+- mysql_config('version')
+- except EnvironmentError:
+- _mysql_config_path = "mysql_config"
+-
+- extra_objects = []
+ static = enabled(options, 'static')
+-
+ # allow a command-line option to override the base config file to permit
+ # a static build to be created via requirements.txt
+ #
+@@ -58,65 +33,51 @@
+ static = True
+ sys.argv.remove('--static')
+
+- libs = mysql_config("libs")
+- library_dirs = [dequote(i[2:]) for i in libs if i.startswith('-L')]
+- libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
+- extra_link_args = [x for x in libs if not x.startswith(('-l', '-L'))]
+-
+- removable_compile_args = ('-I', '-L', '-l')
+- extra_compile_args = [i.replace("%", "%%") for i in mysql_config("cflags")
+- if i[:2] not in removable_compile_args]
+-
+- # Copy the arch flags for linking as well
+- for i in range(len(extra_compile_args)):
+- if extra_compile_args[i] == '-arch':
+- extra_link_args += ['-arch', extra_compile_args[i + 1]]
++ ldflags = os.environ.get("MYSQLCLIENT_LDFLAGS")
++ cflags = os.environ.get("MYSQLCLIENT_CFLAGS")
+
+- include_dirs = [dequote(i[2:])
+- for i in mysql_config('include') if i.startswith('-I')]
+-
+- if static:
+- # properly handle mysql client libraries that are not called libmysqlclient
+- client = None
+- CLIENT_LIST = ['mysqlclient', 'mysqlclient_r', 'mysqld', 'mariadb',
+- 'mariadbclient', 'perconaserverclient', 'perconaserverclient_r']
+- for c in CLIENT_LIST:
+- if c in libraries:
+- client = c
+- break
+-
+- if client == 'mariadb':
+- client = 'mariadbclient'
+- if client is None:
+- raise ValueError("Couldn't identify mysql client library")
+-
+- extra_objects.append(os.path.join(library_dirs[0], 'lib%s.a' % client))
+- if client in libraries:
+- libraries.remove(client)
++ pkg_name = None
++ static_opt = " --static" if static else ""
++ if not (cflags and ldflags):
++ pkg_name = find_package_name()
++ if not cflags:
++ cflags = subprocess.check_output(
++ f"pkg-config{static_opt} --cflags {pkg_name}", encoding="utf-8", shell=True
++ )
++ if not ldflags:
++ ldflags = subprocess.check_output(
++ f"pkg-config{static_opt} --libs {pkg_name}", encoding="utf-8", shell=True
++ )
++
++ cflags = cflags.split()
++ for f in cflags:
++ if f.startswith("-std="):
++ break
++ else:
++ cflags += ["-std=c99"]
+
+- name = "mysqlclient"
+- metadata['name'] = name
++ ldflags = ldflags.split()
+
+ define_macros = [
+ ('version_info', metadata['version_info']),
+ ('__version__', metadata['version']),
+ ]
+- create_release_file(metadata)
+- del metadata['version_info']
+ ext_options = dict(
+- library_dirs = library_dirs,
+- libraries = libraries,
+- extra_compile_args = extra_compile_args,
+- extra_link_args = extra_link_args,
+- include_dirs = include_dirs,
+- extra_objects = extra_objects,
+- define_macros = define_macros,
++ extra_compile_args=cflags,
++ extra_link_args=ldflags,
++ define_macros=define_macros,
+ )
+-
+ # newer versions of gcc require libstdc++ if doing a static build
+ if static:
+ ext_options['language'] = 'c++'
+
++ print("Options for building extention module:")
++ for k, v in ext_options.items():
++ print(f" {k}: {v}")
++
++ create_release_file(metadata)
++ del metadata['version_info']
++
+ return metadata, ext_options
+
+ if __name__ == "__main__":
diff --git a/var/spack/repos/builtin/packages/py-mysqldb1/package.py b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
index 8a332fa90f..355aa30d9e 100644
--- a/var/spack/repos/builtin/packages/py-mysqldb1/package.py
+++ b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
@@ -18,5 +18,7 @@ class PyMysqldb1(PythonPackage):
url="https://github.com/farcepest/MySQLdb1/archive/MySQLdb-1.2.5.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("mysql@:6")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-namex/package.py b/var/spack/repos/builtin/packages/py-namex/package.py
index de93e1e98c..4a5b73a0f3 100644
--- a/var/spack/repos/builtin/packages/py-namex/package.py
+++ b/var/spack/repos/builtin/packages/py-namex/package.py
@@ -14,6 +14,7 @@ class PyNamex(PythonPackage):
license("Apache-2.0")
+ version("0.0.8", sha256="32a50f6c565c0bb10aa76298c959507abdc0e850efe085dc38f3440fcb3aa90b")
version("0.0.7", sha256="84ba65bc4d22bd909e3d26bf2ffb4b9529b608cb3f9a4336f776b04204ced69b")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py
index eaf5572a36..1147671f6f 100644
--- a/var/spack/repos/builtin/packages/py-nanobind/package.py
+++ b/var/spack/repos/builtin/packages/py-nanobind/package.py
@@ -7,9 +7,7 @@ from spack.package import *
class PyNanobind(PythonPackage):
- """nanobind -- Seamless operability between C++11 and Python.
-
- nanobind is a small binding library that exposes C++ types in
+ """nanobind is a small binding library that exposes C++ types in
Python and vice versa. It is reminiscent of Boost.Python and pybind11
and uses near-identical syntax. In contrast to these existing tools,
nanobind is more efficient: bindings compile in a shorter amount of time,
@@ -26,6 +24,18 @@ class PyNanobind(PythonPackage):
version("master", branch="master", submodules=True)
version(
+ "2.2.0", tag="v2.2.0", commit="784efa2a0358a4dc5432c74f5685ee026e20f2b6", submodules=True
+ )
+ version(
+ "2.1.0", tag="v2.1.0", commit="9641bb7151f04120013b812789b3ebdfa7e7324f", submodules=True
+ )
+ version(
+ "2.0.0", tag="v2.0.0", commit="8d7f1ee0621c17fa370b704b2100ffa0243d5bfb", submodules=True
+ )
+ version(
+ "1.9.2", tag="v1.9.2", commit="80a30c8efb093b14f0e744bc7f6a9ef34beb3f7f", submodules=True
+ )
+ version(
"1.8.0", tag="v1.8.0", commit="1a309ba444a47e081dc6213d72345a2fbbd20795", submodules=True
)
version(
@@ -50,14 +60,20 @@ class PyNanobind(PythonPackage):
"1.2.0", tag="v1.2.0", commit="ec9350b805d2fe568f65746fd69225eedc5e37ae", submodules=True
)
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.8:", type=("build", "run"))
- depends_on("py-setuptools@42:", type="build")
- depends_on("py-scikit-build", type="build")
- depends_on("cmake@3.17:", type="build")
- depends_on("ninja", type="build")
+ depends_on("py-setuptools@42:", when="@:2.0", type="build")
+ depends_on("py-scikit-build", when="@:2.0", type="build")
+ depends_on("py-typing-extensions", when="@2.0", type="build")
+ depends_on("ninja", when="@2.0", type="build")
+ depends_on("cmake@3.17:", when="@:2.0", type="build")
+
+ depends_on("py-scikit-build-core+pyproject@0.9:", when="@2.1", type="build")
+ depends_on("py-scikit-build-core+pyproject@0.10:", when="@2.2:", type="build")
@property
def cmake_prefix_paths(self):
- paths = [join_path(self.prefix, self.spec["python"].package.platlib, "nanobind", "cmake")]
+ paths = [join_path(python_platlib, "nanobind", "cmake")]
return paths
diff --git a/var/spack/repos/builtin/packages/py-nanoget/package.py b/var/spack/repos/builtin/packages/py-nanoget/package.py
new file mode 100644
index 0000000000..dfb86cfbdd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nanoget/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyNanoget(PythonPackage):
+ """Functions to extract information from Oxford Nanopore sequencing data and alignments"""
+
+ homepage = "https://github.com/wdecoster/nanoget"
+ pypi = "nanoget/nanoget-1.19.3.tar.gz"
+
+ maintainers("Pandapip1")
+
+ version("1.19.3", sha256="da981810edb1cbe42cbbfbe5fcf753f29bf5555204cd51256b28a284a036a71b")
+
+ depends_on("py-setuptools", type=("build",))
+ depends_on("py-pandas@2.0.0:", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-biopython", type=("build", "run"))
+ depends_on("py-pysam@0.10.0.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nanomath/package.py b/var/spack/repos/builtin/packages/py-nanomath/package.py
new file mode 100644
index 0000000000..d67eefff52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nanomath/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyNanomath(PythonPackage):
+ """A few simple math function for other Oxford Nanopore processing scripts"""
+
+ homepage = "https://github.com/wdecoster/nanomath"
+ pypi = "nanomath/nanomath-1.3.0.tar.gz"
+
+ maintainers("Pandapip1")
+
+ version("1.4.0", sha256="ed7a38fbb156d9a68a95c2570fe3c2035321d0a3e234580496750afca4927ced")
+ version("1.3.0", sha256="c35a024b10b34dd8f539cefed1fd69e0a46d18037ca48bed63c7941c67ae028e")
+
+ depends_on("py-setuptools", type=("build",))
+ depends_on("py-python-deprecated", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-numpy@1.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nanoplot/package.py b/var/spack/repos/builtin/packages/py-nanoplot/package.py
new file mode 100644
index 0000000000..c7a3ddeda7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nanoplot/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyNanoplot(PythonPackage):
+ """Plotting scripts for long read sequencing data"""
+
+ homepage = "https://github.com/wdecoster/NanoPlot"
+ pypi = "NanoPlot/nanoplot-1.43.0.tar.gz"
+
+ maintainers("Pandapip1")
+
+ version("1.43.0", sha256="0f94096d689b552c32fd7246ad87cb6d5e5e2499dad5acc551091e0ff67f48df")
+ version("1.42.0", sha256="0f8fd2cffd33a346b3306716058c6cb4091c931e8ab502f10b17a28749e8b6d9")
+
+ depends_on("py-setuptools", type=("build",))
+ depends_on("py-biopython", type=("build", "run"))
+ depends_on("py-pysam@0.10.0.1:", type=("build", "run"))
+ depends_on("py-pandas@1.1.0:", type=("build", "run"))
+ depends_on("py-numpy@1.16.5:", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-python-dateutil", type=("build", "run"))
+ depends_on("py-nanoget@1.19.1:", type=("build", "run"))
+ depends_on("py-nanomath@1.0.0:", type=("build", "run"), when="@:1.42")
+ depends_on("py-plotly@5.4.0:", type=("build", "run"))
+ depends_on("py-pyarrow", type=("build", "run"))
+ depends_on("py-kaleido", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nanostat/package.py b/var/spack/repos/builtin/packages/py-nanostat/package.py
new file mode 100644
index 0000000000..d15151d530
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nanostat/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyNanostat(PythonPackage):
+ """Calculate statistics for Oxford Nanopore sequencing data and alignments"""
+
+ homepage = "https://github.com/wdecoster/nanostat"
+ pypi = "NanoStat/NanoStat-1.6.0.tar.gz"
+
+ maintainers("Pandapip1")
+
+ version("1.6.0", sha256="e45fa8d1ab49bdaed17596c26c0af148b44e4af46238391a8bb7a1b4cc940079")
+
+ depends_on("py-setuptools", type=("build",))
+ depends_on("py-nanoget@1.13.2:", type=("build", "run"))
+ depends_on("py-nanomath@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-narwhals/package.py b/var/spack/repos/builtin/packages/py-narwhals/package.py
new file mode 100644
index 0000000000..48899ac9d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-narwhals/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNarwhals(PythonPackage):
+ """Extremely lightweight compatibility layer between dataframe libraries"""
+
+ homepage = "https://github.com/narwhals-dev/narwhals"
+ pypi = "narwhals/narwhals-1.8.1.tar.gz"
+
+ version("1.8.1", sha256="97527778e11f39a1e5e2113b8fbb9ead788be41c0337f21852e684e378f583e8")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-hatchling", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-natsort/package.py b/var/spack/repos/builtin/packages/py-natsort/package.py
index d360b11b8e..23c8499c55 100644
--- a/var/spack/repos/builtin/packages/py-natsort/package.py
+++ b/var/spack/repos/builtin/packages/py-natsort/package.py
@@ -14,6 +14,8 @@ class PyNatsort(PythonPackage):
license("MIT")
+ version("8.4.0", sha256="e42c6730e93382f743e09eb24b8d48034d81d089bd259183a88e2c4190e3db90")
+ version("8.2.0", sha256="0ce4562913d89a6f413fc68c9937cb0fc32be1268f73ac4b68e2646aeae458c6")
version("7.1.1", sha256="ada96d9ca0db0d44b891718ff7baff5ac34cf5b6d9def356c0f7a8ea67ae2113")
version("7.1.0", sha256="c3de32c8e5e91cf4f2dd1655b4c167ca4676cc28ce397050fc8d229582a71f0d")
version("7.0.1", sha256="1a422a344d089f7a2acba788087ca6253ca47a544bda677721f99516cdfd8668")
diff --git a/var/spack/repos/builtin/packages/py-nbconvert/package.py b/var/spack/repos/builtin/packages/py-nbconvert/package.py
index af19eb9f22..bd480cfd6c 100644
--- a/var/spack/repos/builtin/packages/py-nbconvert/package.py
+++ b/var/spack/repos/builtin/packages/py-nbconvert/package.py
@@ -15,6 +15,7 @@ class PyNbconvert(PythonPackage):
license("BSD-3-Clause")
+ version("7.14.1", sha256="20cba10e0448dc76b3bebfe1adf923663e3b98338daf77b97b42511ef5a88618")
version("7.4.0", sha256="51b6c77b507b177b73f6729dba15676e42c4e92bcb00edc8cc982ee72e7d89d7")
version("7.0.0", sha256="fd1e361da30e30e4c5a5ae89f7cae95ca2a4d4407389672473312249a7ba0060")
version("6.5.1", sha256="2c01f3f518fee736c3d3f999dd20e0a16febba17a0d60a3b0fd28fbdec14115d")
@@ -23,15 +24,36 @@ class PyNbconvert(PythonPackage):
version("6.3.0", sha256="5e77d6203854944520105e38f2563a813a4a3708e8563aa598928a3b5ee1081a")
version("6.2.0", sha256="16ceecd0afaa8fd26c245fa32e2c52066c02f13aa73387fffafd84750baea863")
version("6.0.1", sha256="db94117fbac29153834447e31b30cda337d4450e46e0bdb1a36eafbbf4435156")
- version("5.6.0", sha256="427a468ec26e7d68a529b95f578d5cbf018cb4c1f889e897681c2b6d11897695")
- version("5.5.0", sha256="138381baa41d83584459b5cfecfc38c800ccf1f37d9ddd0bd440783346a4c39c")
- version("4.2.0", sha256="55946d7522741294fcdd50799bd1777d16673ce721fecca0610cdb86749863c6")
- version("4.1.0", sha256="e0296e45293dd127d028f678e3b6aba3f1db3283a134178bdb49eea402d4cf1c")
- version("4.0.0", sha256="472ad15d1a71f1ef00c4094c11bb93638858fc89fb2c5838b3aa6b67d981b437")
+ version(
+ "5.6.0",
+ sha256="427a468ec26e7d68a529b95f578d5cbf018cb4c1f889e897681c2b6d11897695",
+ deprecated=True,
+ )
+ version(
+ "5.5.0",
+ sha256="138381baa41d83584459b5cfecfc38c800ccf1f37d9ddd0bd440783346a4c39c",
+ deprecated=True,
+ )
+ version(
+ "4.2.0",
+ sha256="55946d7522741294fcdd50799bd1777d16673ce721fecca0610cdb86749863c6",
+ deprecated=True,
+ )
+ version(
+ "4.1.0",
+ sha256="e0296e45293dd127d028f678e3b6aba3f1db3283a134178bdb49eea402d4cf1c",
+ deprecated=True,
+ )
+ version(
+ "4.0.0",
+ sha256="472ad15d1a71f1ef00c4094c11bb93638858fc89fb2c5838b3aa6b67d981b437",
+ deprecated=True,
+ )
variant("serve", default=True, description="Include a webserver")
depends_on("python@3.7:", when="@6.2.0:", type=("build", "run"))
+ depends_on("py-hatchling@1.5:", when="@7.14:", type="build")
depends_on("py-hatchling@0.25:", when="@7:", type="build")
depends_on("py-beautifulsoup4", when="@6.4.4:", type=("build", "run"))
@@ -45,10 +67,12 @@ class PyNbconvert(PythonPackage):
depends_on("py-jupyter-core", type=("build", "run"))
depends_on("py-jupyterlab-pygments", when="@6:", type=("build", "run"))
depends_on("py-markupsafe@2:", when="@6.4.5:", type=("build", "run"))
- depends_on("py-mistune@2.0.3:2", when="@7:", type=("build", "run"))
+ depends_on("py-mistune@2.0.3:3", when="@7.4:", type=("build", "run"))
+ depends_on("py-mistune@2.0.3:2", when="@7:7.3", type=("build", "run"))
depends_on("py-mistune@0.8.1:1", when="@:6", type=("build", "run"))
depends_on("py-nbclient@0.5:", when="@6.5:", type=("build", "run"))
depends_on("py-nbclient@0.5", when="@6:6.4", type=("build", "run"))
+ depends_on("py-nbformat@5.7:", when="@7.14:", type=("build", "run"))
depends_on("py-nbformat@5.1:", when="@6.5:", type=("build", "run"))
depends_on("py-nbformat@4.4:", when="@5:", type=("build", "run"))
depends_on("py-nbformat", type=("build", "run"))
@@ -57,6 +81,7 @@ class PyNbconvert(PythonPackage):
depends_on("py-pygments@2.4.1:", when="@6:", type=("build", "run"))
depends_on("py-pygments", type=("build", "run"))
depends_on("py-tinycss2", when="@6.5:", type=("build", "run"))
+ depends_on("py-traitlets@5.1:", when="@7.14:", type=("build", "run"))
depends_on("py-traitlets@5:", when="@6.2.0:", type=("build", "run"))
depends_on("py-traitlets@4.2:", when="@5:", type=("build", "run"))
depends_on("py-traitlets", type=("build", "run"))
@@ -75,13 +100,63 @@ class PyNbconvert(PythonPackage):
depends_on("py-testpath", when="@5:6.4", type=("build", "run"))
depends_on("py-lxml", when="@6.5.1:7.0", type=("build", "run"))
+ conflicts("^bleach@5.0.0")
+
+ resource(
+ name="index.css",
+ url="https://unpkg.com/@jupyterlab/nbconvert-css@4.0.2/style/index.css",
+ sha256="917ff47850a7cc08fd0658026fda7672a85220aaab258e8849e891b37426f947",
+ placement="resource_index.css",
+ when="@6:",
+ expand=False,
+ )
+ resource(
+ name="theme-light.css",
+ url="https://unpkg.com/@jupyterlab/theme-light-extension@4.0.2/style/variables.css",
+ sha256="11bf3558fd3ed353a4c1401ac0c1730d01df073f6436d357c5bbf02a03bd6962",
+ placement="resource_theme-light.css",
+ when="@6:",
+ expand=False,
+ )
+ resource(
+ name="theme-dark.css",
+ url="https://unpkg.com/@jupyterlab/theme-dark-extension@4.0.2/style/variables.css",
+ sha256="795f2d5069737cbeb5cba01e6b5c7cadbde227c909e43004c5a60f58d5160aec",
+ placement="resource_theme-dark.css",
+ when="@6:",
+ expand=False,
+ )
+ resource(
+ name="style.css",
+ url="https://cdn.jupyter.org/notebook/5.4.0/style/style.min.css",
+ sha256="5865a609f4437b0464bc121cd567b619074e540a0515a3b82f222f764eb51e01",
+ placement="resource_style.css",
+ when="@6:",
+ expand=False,
+ )
+
+ @run_before("install")
+ @when("@6:")
+ def install_css(self):
+ css = {
+ # target filename: [subdir, source filename]
+ "index.css": ["lab", "index.css"],
+ "theme-light.css": ["lab", "variables.css"],
+ "theme-dark.css": ["lab", "variables.css"],
+ "style.css": ["classic", "style.min.css"],
+ }
+ for target, (subdir, source) in css.items():
+ dest = join_path(self.stage.source_path, "share", "templates", subdir, "static")
+ mkdirp(dest)
+ install(
+ join_path(self.stage.source_path, "resource_%s" % target, source),
+ join_path(dest, target),
+ )
+
+ @when("@7:")
def patch(self):
- # We bundle this with the spack package so that the installer
- # doesn't try to download it.
- install(
- join_path(self.package_dir, "style.min.css"),
- join_path("nbconvert", "resources", "style.min.css"),
- )
+ # Avoid install-time downloads of css files.
+ filter_file("css = urlopen(url).read()", "assert False", "hatch_build.py", string=True)
def setup_run_environment(self, env):
env.prepend_path("JUPYTER_PATH", self.prefix.share.jupyter)
diff --git a/var/spack/repos/builtin/packages/py-nbconvert/style.min.css b/var/spack/repos/builtin/packages/py-nbconvert/style.min.css
deleted file mode 100644
index 6a9626dd8e..0000000000
--- a/var/spack/repos/builtin/packages/py-nbconvert/style.min.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/*!
-*
-* Twitter Bootstrap
-*
-*//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:10px;-webkit-tap-highlight-color:transparent}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0;vertical-align:middle}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}abbr[title]:after{content:" (" attr(title)")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../components/bootstrap/fonts/glyphicons-halflings-regular.eot);src:url(../components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix)format('embedded-opentype'),url(../components/bootstrap/fonts/glyphicons-halflings-regular.woff2)format('woff2'),url(../components/bootstrap/fonts/glyphicons-halflings-regular.woff)format('woff'),url(../components/bootstrap/fonts/glyphicons-halflings-regular.ttf)format('truetype'),url(../components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular)format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.42857143;color:#000;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:3px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:18px;margin-bottom:18px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:18px;margin-bottom:9px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:9px;margin-bottom:9px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:33px}.h2,h2{font-size:27px}.h3,h3{font-size:23px}.h4,h4{font-size:17px}.h5,h5{font-size:13px}.h6,h6{font-size:12px}p{margin:0 0 9px}.lead{margin-bottom:18px;font-size:14px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:19.5px}}.small,small{font-size:92%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:8px;margin:36px 0 18px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:9px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:18px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:541px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:9px 18px;margin:0 0 18px;font-size:inherit;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:18px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:monospace}code{padding:2px 4px;font-size:90%;background-color:#f9f2f4;border-radius:2px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:1px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:8.5px;margin:0 0 9px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:2px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:0;padding-right:0}@media (min-width:768px){.container{width:768px}}@media (min-width:992px){.container{width:940px}}@media (min-width:1200px){.container{width:1140px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:0;padding-right:0}.row{margin-left:0;margin-right:0}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:0;padding-right:0}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:18px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:13.5px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:18px;font-size:19.5px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:13px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:32px;padding:6px 12px;font-size:13px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:32px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:45px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:18px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px \9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:31px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:30px}.input-lg{height:45px;padding:10px 16px;font-size:17px;line-height:1.3333333;border-radius:3px}select.input-lg{height:45px;line-height:45px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:45px;padding:10px 16px;font-size:17px;line-height:1.3333333;border-radius:3px}select.form-group-lg .form-control{height:45px;line-height:45px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:45px;padding:10px 16px;font-size:17px;line-height:1.3333333;min-height:35px}.has-feedback{position:relative}.has-feedback .form-control{padding-right:40px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:32px;height:32px;line-height:32px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:45px;height:45px;line-height:45px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:23px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#404040}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:25px}.form-horizontal .form-group{margin-left:0;margin-right:0}.form-horizontal .has-feedback .form-control-feedback{right:0}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.33px}.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:13px;line-height:1.42857143;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:17px;line-height:1.3333333;border-radius:3px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:1px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:13px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:2px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:8px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:541px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:2px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:45px;padding:10px 16px;font-size:17px;line-height:1.3333333;border-radius:3px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:45px;line-height:45px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:13px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:2px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:1px}.input-group-addon.input-lg{padding:10px 16px;font-size:17px;border-radius:3px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:8px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:2px 2px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px;margin-right:0;border-radius:2px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:2px 2px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:2px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:2px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:2px 2px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:30px;margin-bottom:18px;border:1px solid transparent}.navbar-collapse{overflow-x:visible;padding-right:0;padding-left:0;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:540px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:541px){.navbar{border-radius:2px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:6px 0;font-size:17px;line-height:18px;height:30px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}.navbar-toggle{position:relative;float:right;margin-right:0;padding:9px 10px;margin-top:-2px;margin-bottom:-2px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:2px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:541px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:0}.navbar-toggle{display:none}}.navbar-nav{margin:3px 0}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:18px}@media (max-width:540px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:18px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:541px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:6px;padding-bottom:6px}}.navbar-form{padding:10px 0;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:-1px 0}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:540px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:2px 2px 0 0}.navbar-btn{margin-top:-1px;margin-bottom:-1px}.navbar-btn.btn-sm{margin-top:0;margin-bottom:0}.navbar-btn.btn-xs{margin-top:4px;margin-bottom:4px}.navbar-text{margin-top:6px;margin-bottom:6px}@media (min-width:541px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-text{float:left;margin-left:0;margin-right:0}.navbar-left{float:left!important;float:left}.navbar-right{float:right!important;float:right;margin-right:0}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}@media (max-width:540px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:540px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:18px;list-style:none;background-color:#f5f5f5;border-radius:2px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#5e5e5e}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:18px 0;border-radius:2px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:2px;border-top-left-radius:2px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:2px;border-top-right-radius:2px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:17px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:1px;border-top-left-radius:1px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:1px;border-top-right-radius:1px}.pager{padding-left:0;margin:18px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:20px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:3px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:58.5px}}.thumbnail{display:block;padding:4px;margin-bottom:18px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-left:auto;margin-right:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#000}.alert{padding:15px;margin-bottom:18px;border:1px solid transparent;border-radius:2px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f5f5f5;border-radius:2px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:18px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:2px;border-top-left-radius:2px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:2px;border-bottom-left-radius:2px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:18px;background-color:#fff;border:1px solid transparent;border-radius:2px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:1px;border-top-left-radius:1px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:15px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:1px;border-bottom-left-radius:1px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:1px;border-top-left-radius:1px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:1px;border-bottom-left-radius:1px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-right-radius:1px;border-top-left-radius:1px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:1px;border-top-right-radius:1px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:1px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:1px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:1px;border-bottom-left-radius:1px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:1px;border-bottom-right-radius:1px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:1px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:1px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:18px}.panel-group .panel{margin-bottom:0;border-radius:2px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:3px}.well-sm{padding:9px;border-radius:1px}.close{float:right;font-size:19.5px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:3px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.43px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:2px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.42857143;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:3px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:13px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:2px 2px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;-moz-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.item_buttons:after,.item_buttons:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:" ";display:table}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.item_buttons:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}/*!
-*
-* Font Awesome
-*
-*//*!
- * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
- * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:'FontAwesome';src:url(../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.2.0);src:url(../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0)format('embedded-opentype'),url(../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0)format('woff'),url(../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.2.0)format('truetype'),url(../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular)format('svg');font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}/*!
-*
-* IPython base
-*
-*/.modal.fade .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}code{color:#000}pre{font-size:inherit;line-height:inherit}label{font-weight:400}.border-box-sizing{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.corner-all{border-radius:2px}.no-padding{padding:0}.hbox{display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}.hbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;flex:none}.vbox{display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}.vbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;flex:none}.hbox.reverse,.reverse,.vbox.reverse{-webkit-box-direction:reverse;-moz-box-direction:reverse;box-direction:reverse;flex-direction:row-reverse}.box-flex0,.hbox.box-flex0,.vbox.box-flex0{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;flex:none;width:auto}.box-flex1,.hbox.box-flex1,.vbox.box-flex1{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}.box-flex,.hbox.box-flex,.vbox.box-flex{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}.box-flex2,.hbox.box-flex2,.vbox.box-flex2{-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;flex:2}.box-group1{-webkit-box-flex-group:1;-moz-box-flex-group:1;box-flex-group:1}.box-group2{-webkit-box-flex-group:2;-moz-box-flex-group:2;box-flex-group:2}.hbox.start,.start,.vbox.start{-webkit-box-pack:start;-moz-box-pack:start;box-pack:start;justify-content:flex-start}.end,.hbox.end,.vbox.end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;justify-content:flex-end}.center,.hbox.center,.vbox.center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;justify-content:center}.baseline,.hbox.baseline,.vbox.baseline{-webkit-box-pack:baseline;-moz-box-pack:baseline;box-pack:baseline;justify-content:baseline}.hbox.stretch,.stretch,.vbox.stretch{-webkit-box-pack:stretch;-moz-box-pack:stretch;box-pack:stretch;justify-content:stretch}.align-start,.hbox.align-start,.vbox.align-start{-webkit-box-align:start;-moz-box-align:start;box-align:start;align-items:flex-start}.align-end,.hbox.align-end,.vbox.align-end{-webkit-box-align:end;-moz-box-align:end;box-align:end;align-items:flex-end}.align-center,.hbox.align-center,.vbox.align-center{-webkit-box-align:center;-moz-box-align:center;box-align:center;align-items:center}.align-baseline,.hbox.align-baseline,.vbox.align-baseline{-webkit-box-align:baseline;-moz-box-align:baseline;box-align:baseline;align-items:baseline}.align-stretch,.hbox.align-stretch,.vbox.align-stretch{-webkit-box-align:stretch;-moz-box-align:stretch;box-align:stretch;align-items:stretch}div.error{margin:2em;text-align:center}div.error>h1{font-size:500%;line-height:normal}div.error>p{font-size:200%;line-height:normal}div.traceback-wrapper{text-align:left;max-width:800px;margin:auto}body{position:absolute;left:0;right:0;top:0;bottom:0;overflow:visible}#header{display:none;background-color:#fff;position:relative;z-index:100}#header #header-container{padding-bottom:5px;padding-top:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}#header .header-bar{width:100%;height:1px;background:#e7e7e7;margin-bottom:-1px}#header-spacer{width:100%;visibility:hidden}@media print{#header{display:none!important}#header-spacer{display:none}}#ipython_notebook{padding-left:0;padding-top:1px;padding-bottom:1px}@media (max-width:991px){#ipython_notebook{margin-left:10px}}#noscript{width:auto;padding-top:16px;padding-bottom:16px;text-align:center;font-size:22px;color:red;font-weight:700}#ipython_notebook img{height:28px}#site{width:100%;display:none;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:auto}@media print{#site{height:auto!important}}.ui-button .ui-button-text{padding:.2em .8em;font-size:77%}input.ui-button{padding:.3em .9em}span#login_widget{float:right}#logout,span#login_widget>.button{color:#333;background-color:#fff;border-color:#ccc}#logout.active,#logout.focus,#logout:active,#logout:focus,#logout:hover,.open>.dropdown-toggle#logout,.open>.dropdown-togglespan#login_widget>.button,span#login_widget>.button.active,span#login_widget>.button.focus,span#login_widget>.button:active,span#login_widget>.button:focus,span#login_widget>.button:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}#logout.active,#logout:active,.open>.dropdown-toggle#logout,.open>.dropdown-togglespan#login_widget>.button,span#login_widget>.button.active,span#login_widget>.button:active{background-image:none}#logout.disabled,#logout.disabled.active,#logout.disabled.focus,#logout.disabled:active,#logout.disabled:focus,#logout.disabled:hover,#logout[disabled],#logout[disabled].active,#logout[disabled].focus,#logout[disabled]:active,#logout[disabled]:focus,#logout[disabled]:hover,fieldset[disabled] #logout,fieldset[disabled] #logout.active,fieldset[disabled] #logout.focus,fieldset[disabled] #logout:active,fieldset[disabled] #logout:focus,fieldset[disabled] #logout:hover,fieldset[disabled] span#login_widget>.button,fieldset[disabled] span#login_widget>.button.active,fieldset[disabled] span#login_widget>.button.focus,fieldset[disabled] span#login_widget>.button:active,fieldset[disabled] span#login_widget>.button:focus,fieldset[disabled] span#login_widget>.button:hover,span#login_widget>.button.disabled,span#login_widget>.button.disabled.active,span#login_widget>.button.disabled.focus,span#login_widget>.button.disabled:active,span#login_widget>.button.disabled:focus,span#login_widget>.button.disabled:hover,span#login_widget>.button[disabled],span#login_widget>.button[disabled].active,span#login_widget>.button[disabled].focus,span#login_widget>.button[disabled]:active,span#login_widget>.button[disabled]:focus,span#login_widget>.button[disabled]:hover{background-color:#fff;border-color:#ccc}#logout .badge,span#login_widget>.button .badge{color:#fff;background-color:#333}.nav-header{text-transform:none}#header>span{margin-top:10px}.modal_stretch .modal-dialog{display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch;min-height:80vh}.modal_stretch .modal-dialog .modal-body{max-height:calc(100vh - 200px);overflow:auto;flex:1}@media (min-width:768px){.modal .modal-dialog{width:700px}select.form-control{margin-left:12px;margin-right:12px}}/*!
-*
-* IPython auth
-*
-*/.center-nav{display:inline-block;margin-bottom:-4px}/*!
-*
-* IPython tree view
-*
-*/.alternate_upload{background-color:none;display:inline}.alternate_upload.form{padding:0;margin:0}.alternate_upload input.fileinput{text-align:center;vertical-align:middle;display:inline;opacity:0;z-index:2;width:12ex;margin-right:-12ex}.alternate_upload .btn-upload{height:22px}ul#tabs{margin-bottom:4px}ul#tabs a{padding-top:6px;padding-bottom:4px}ul.breadcrumb a:focus,ul.breadcrumb a:hover{text-decoration:none}ul.breadcrumb i.icon-home{font-size:16px;margin-right:4px}ul.breadcrumb span{color:#5e5e5e}.list_toolbar{padding:4px 0;vertical-align:middle}.list_toolbar .tree-buttons{padding-top:1px}.dynamic-buttons{padding-top:3px;display:inline-block}.list_toolbar [class*=span]{min-height:24px}.list_header{font-weight:700;background-color:#eee}.list_placeholder{font-weight:700;padding:4px 7px}.list_container{margin-top:4px;margin-bottom:20px;border:1px solid #ddd;border-radius:2px}.list_container>div{border-bottom:1px solid #ddd}.list_container>div:hover .list-item{background-color:red}.list_container>div:last-child{border:none}.list_item:hover .list_item{background-color:#ddd}.list_item a{text-decoration:none}.list_item:hover{background-color:#fafafa}.action_col{text-align:right}.list_header>div,.list_item>div{line-height:22px;padding:4px 7px}.list_header>div input,.list_item>div input{margin-right:7px;margin-left:14px;vertical-align:baseline;line-height:22px;position:relative;top:-1px}.list_header>div .item_link,.list_item>div .item_link{margin-left:-1px;vertical-align:baseline;line-height:22px}.new-file input[type=checkbox]{visibility:hidden}.item_name{line-height:22px;height:24px}.item_icon{font-size:14px;color:#5e5e5e;margin-right:7px;margin-left:7px;line-height:22px;vertical-align:baseline}.item_buttons{line-height:1em;margin-left:-5px}.item_buttons .btn-group,.item_buttons .input-group{float:left}.item_buttons>.btn,.item_buttons>.btn-group,.item_buttons>.input-group{margin-left:5px}.item_buttons .btn{min-width:13ex}.item_buttons .running-indicator{padding-top:4px;color:#5cb85c}.toolbar_info{height:24px;line-height:24px}input.engine_num_input,input.nbname_input{padding-top:3px;padding-bottom:3px;height:22px;line-height:14px;margin:0}input.engine_num_input{width:60px}.highlight_text{color:#00f}#project_name{display:inline-block;padding-left:7px;margin-left:-2px}#project_name>.breadcrumb{padding:0;margin-bottom:0;background-color:transparent;font-weight:700}#tree-selector{padding-right:0}#button-select-all{min-width:50px}#select-all{margin-left:7px;margin-right:2px}.menu_icon{margin-right:2px}.tab-content .row{margin-left:0;margin-right:0}.folder_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f114"}.folder_icon:before.pull-left{margin-right:.3em}.folder_icon:before.pull-right{margin-left:.3em}.notebook_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f02d";position:relative;top:-1px}.notebook_icon:before.pull-left{margin-right:.3em}.notebook_icon:before.pull-right{margin-left:.3em}.running_notebook_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f02d";position:relative;top:-1px;color:#5cb85c}.running_notebook_icon:before.pull-left{margin-right:.3em}.running_notebook_icon:before.pull-right{margin-left:.3em}.file_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f016";position:relative;top:-2px}.file_icon:before.pull-left{margin-right:.3em}.file_icon:before.pull-right{margin-left:.3em}#notebook_toolbar .pull-right{padding-top:0;margin-right:-1px}ul#new-menu{left:auto;right:0}.kernel-menu-icon{padding-right:12px;width:24px;content:"\f096"}.kernel-menu-icon:before{content:"\f096"}.kernel-menu-icon-current:before{content:"\f00c"}#tab_content{padding-top:20px}#running .panel-group .panel{margin-top:3px;margin-bottom:1em}#running .panel-group .panel .panel-heading{background-color:#eee;line-height:22px;padding:4px 7px}#running .panel-group .panel .panel-heading a:focus,#running .panel-group .panel .panel-heading a:hover{text-decoration:none}#running .panel-group .panel .panel-body{padding:0}#running .panel-group .panel .panel-body .list_container{margin-top:0;margin-bottom:0;border:0;border-radius:0}#running .panel-group .panel .panel-body .list_container .list_item{border-bottom:1px solid #ddd}#running .panel-group .panel .panel-body .list_container .list_item:last-child{border-bottom:0}.delete-button,.duplicate-button,.rename-button,.shutdown-button{display:none}.dynamic-instructions{display:inline-block;padding-top:4px}/*!
-*
-* IPython text editor webapp
-*
-*/.selected-keymap i.fa{padding:0 5px}.selected-keymap i.fa:before{content:"\f00c"}#mode-menu{overflow:auto;max-height:20em}.edit_app #header{-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2)}.edit_app #menubar .navbar{margin-bottom:-1px}.dirty-indicator{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px}.dirty-indicator.pull-left{margin-right:.3em}.dirty-indicator.pull-right{margin-left:.3em}.dirty-indicator-dirty{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px}.dirty-indicator-dirty.pull-left{margin-right:.3em}.dirty-indicator-dirty.pull-right{margin-left:.3em}.dirty-indicator-clean{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px}.dirty-indicator-clean.pull-left{margin-right:.3em}.dirty-indicator-clean.pull-right{margin-left:.3em}.dirty-indicator-clean:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f00c"}.dirty-indicator-clean:before.pull-left{margin-right:.3em}.dirty-indicator-clean:before.pull-right{margin-left:.3em}#filename{font-size:16pt;display:table;padding:0 5px}#current-mode{padding-left:5px;padding-right:5px}#texteditor-backdrop{padding-top:20px;padding-bottom:20px}@media not print{#texteditor-backdrop{background-color:#eee}}@media print{#texteditor-backdrop #texteditor-container .CodeMirror-gutter,#texteditor-backdrop #texteditor-container .CodeMirror-gutters{background-color:#fff}}@media not print{#texteditor-backdrop #texteditor-container .CodeMirror-gutter,#texteditor-backdrop #texteditor-container .CodeMirror-gutters{background-color:#fff}#texteditor-backdrop #texteditor-container{padding:0;background-color:#fff;-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2)}}/*!
-*
-* IPython notebook
-*
-*/.ansibold{font-weight:700}.ansiblack{color:#000}.ansired{color:#8b0000}.ansigreen{color:#006400}.ansiyellow{color:#c4a000}.ansiblue{color:#00008b}.ansipurple{color:#9400d3}.ansicyan{color:#4682b4}.ansigray{color:gray}.ansibgblack{background-color:#000}.ansibgred{background-color:red}.ansibggreen{background-color:green}.ansibgyellow{background-color:#ff0}.ansibgblue{background-color:#00f}.ansibgpurple{background-color:#ff00ff}.ansibgcyan{background-color:#0ff}.ansibggray{background-color:gray}div.cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch;border-radius:2px;box-sizing:border-box;-moz-box-sizing:border-box;border-width:thin;border-style:solid;width:100%;padding:5px;margin:0;outline:0}div.cell.selected{border-color:#ababab}@media print{div.cell.selected{border-color:transparent}}.edit_mode div.cell.selected{border-color:green}.prompt{min-width:14ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.21429em}div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}@-moz-document url-prefix(){div.inner_cell{overflow-x:hidden}}div.input_area{border:1px solid #cfcfcf;border-radius:2px;background:#f7f7f7;line-height:1.21429em}div.prompt:empty{padding-top:0;padding-bottom:0}div.unrecognized_cell{padding:5px 5px 5px 0;display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}div.unrecognized_cell .inner_cell{border-radius:2px;padding:5px;font-weight:700;color:red;border:1px solid #cfcfcf;background:#eaeaea}div.unrecognized_cell .inner_cell a,div.unrecognized_cell .inner_cell a:hover{color:inherit;text-decoration:none}@media (max-width:540px){.prompt{text-align:left}div.unrecognized_cell>div.prompt{display:none}}div.code_cell{}div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}@media (max-width:540px){div.input{-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}}div.input_prompt{color:navy;border-top:1px solid transparent}div.input_area>div.highlight{margin:.4em;border:none;padding:0;background-color:transparent}div.input_area>div.highlight>pre{margin:0;border:none;padding:0;background-color:transparent}.CodeMirror{line-height:1.21429em;font-size:14px;height:auto;background:0 0}.CodeMirror-scroll{overflow-y:hidden;overflow-x:auto}.CodeMirror-lines{padding:.4em}.CodeMirror-linenumber{padding:0 8px 0 4px}.CodeMirror-gutters{border-bottom-left-radius:2px;border-top-left-radius:2px}.CodeMirror pre{padding:0;border:0;border-radius:0}.highlight-base,.highlight-variable{color:#000}.highlight-variable-2{color:#1a1a1a}.highlight-variable-3{color:#333}.highlight-string{color:#BA2121}.highlight-comment{color:#408080;font-style:italic}.highlight-number{color:#080}.highlight-atom{color:#88F}.highlight-keyword{color:green;font-weight:700}.highlight-builtin{color:green}.highlight-error{color:red}.highlight-operator{color:#A2F;font-weight:700}.highlight-meta{color:#A2F}.highlight-def{color:#00f}.highlight-string-2{color:#f50}.highlight-qualifier{color:#555}.highlight-bracket{color:#997}.highlight-tag{color:#170}.highlight-attribute{color:#00c}.highlight-header{color:#00f}.highlight-quote{color:#090}.highlight-link{color:#00c}.cm-s-ipython span.cm-keyword{color:green;font-weight:700}.cm-s-ipython span.cm-atom{color:#88F}.cm-s-ipython span.cm-number{color:#080}.cm-s-ipython span.cm-def{color:#00f}.cm-s-ipython span.cm-variable{color:#000}.cm-s-ipython span.cm-operator{color:#A2F;font-weight:700}.cm-s-ipython span.cm-variable-2{color:#1a1a1a}.cm-s-ipython span.cm-variable-3{color:#333}.cm-s-ipython span.cm-comment{color:#408080;font-style:italic}.cm-s-ipython span.cm-string{color:#BA2121}.cm-s-ipython span.cm-string-2{color:#f50}.cm-s-ipython span.cm-meta{color:#A2F}.cm-s-ipython span.cm-qualifier{color:#555}.cm-s-ipython span.cm-builtin{color:green}.cm-s-ipython span.cm-bracket{color:#997}.cm-s-ipython span.cm-tag{color:#170}.cm-s-ipython span.cm-attribute{color:#00c}.cm-s-ipython span.cm-header{color:#00f}.cm-s-ipython span.cm-quote{color:#090}.cm-s-ipython span.cm-link{color:#00c}.cm-s-ipython span.cm-error{color:red}.cm-s-ipython span.cm-tab{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=')right no-repeat}div.output_wrapper{display:-webkit-box;-webkit-box-align:stretch;display:-moz-box;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch;z-index:1}div.output_scroll{height:24em;width:100%;overflow:auto;border-radius:2px;-webkit-box-shadow:inset 0 2px 8px rgba(0,0,0,.8);box-shadow:inset 0 2px 8px rgba(0,0,0,.8);display:block}div.output_collapsed{margin:0;padding:0;display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}div.out_prompt_overlay{height:100%;padding:0 .4em;position:absolute;border-radius:2px}div.out_prompt_overlay:hover{-webkit-box-shadow:inset 0 0 1px #000;box-shadow:inset 0 0 1px #000;background:rgba(240,240,240,.5)}div.output_prompt{color:#8b0000}div.output_area{padding:0;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}div.output_area .MathJax_Display{text-align:left!important}div.output_area .rendered_html img,div.output_area .rendered_html table{margin-left:0;margin-right:0}div.output_area img,div.output_area svg{max-width:100%;height:auto}div.output_area img.unconfined,div.output_area svg.unconfined{max-width:none}.output{display:-webkit-box;-webkit-box-orient:vertical;display:-moz-box;-moz-box-orient:vertical;display:box;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}@media (max-width:540px){div.output_area{-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;box-align:stretch;display:flex;flex-direction:column;align-items:stretch}}div.output_area pre{margin:0;padding:0;border:0;vertical-align:baseline;color:#000;background-color:transparent;border-radius:0}div.output_subarea{overflow-x:auto;padding:.4em;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1;max-width:calc(100% - 14ex)}div.output_text{text-align:left;color:#000;line-height:1.21429em}div.output_stderr{background:#fdd}div.output_latex{text-align:left}div.output_javascript:empty{padding:0}.js-error{color:#8b0000}div.raw_input_container{font-family:monospace;padding-top:5px}span.raw_input_prompt{}input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;vertical-align:baseline;padding:0 .25em;margin:0 .25em}input.raw_input:focus{box-shadow:none}p.p-space{margin-bottom:10px}div.output_unrecognized{padding:5px;font-weight:700;color:red}div.output_unrecognized a,div.output_unrecognized a:hover{color:inherit;text-decoration:none}.rendered_html{color:#000}.rendered_html em{font-style:italic}.rendered_html strong{font-weight:700}.rendered_html :link,.rendered_html :visited,.rendered_html u{text-decoration:underline}.rendered_html h1{font-size:185.7%;margin:1.08em 0 0;font-weight:700;line-height:1}.rendered_html h2{font-size:157.1%;margin:1.27em 0 0;font-weight:700;line-height:1}.rendered_html h3{font-size:128.6%;margin:1.55em 0 0;font-weight:700;line-height:1}.rendered_html h4{font-size:100%;margin:2em 0 0;font-weight:700;line-height:1}.rendered_html h5,.rendered_html h6{font-size:100%;margin:2em 0 0;font-weight:700;line-height:1;font-style:italic}.rendered_html h1:first-child{margin-top:.538em}.rendered_html h2:first-child{margin-top:.636em}.rendered_html h3:first-child{margin-top:.777em}.rendered_html h4:first-child,.rendered_html h5:first-child,.rendered_html h6:first-child{margin-top:1em}.rendered_html ul{list-style:disc;margin:0 2em;padding-left:0}.rendered_html ul ul{list-style:square;margin:0 2em}.rendered_html ul ul ul{list-style:circle;margin:0 2em}.rendered_html ol{list-style:decimal;margin:0 2em;padding-left:0}.rendered_html ol ol{list-style:upper-alpha;margin:0 2em}.rendered_html ol ol ol{list-style:lower-alpha;margin:0 2em}.rendered_html ol ol ol ol{list-style:lower-roman;margin:0 2em}.rendered_html ol ol ol ol ol{list-style:decimal;margin:0 2em}.rendered_html *+ol,.rendered_html *+ul{margin-top:1em}.rendered_html hr{color:#000;background-color:#000}.rendered_html pre{margin:1em 2em}.rendered_html code,.rendered_html pre{border:0;background-color:#fff;color:#000;font-size:100%;padding:0}.rendered_html blockquote{margin:1em 2em}.rendered_html table{margin-left:auto;margin-right:auto;border:1px solid #000;border-collapse:collapse}.rendered_html td,.rendered_html th,.rendered_html tr{border:1px solid #000;border-collapse:collapse;margin:1em 2em}.rendered_html td,.rendered_html th{text-align:left;vertical-align:middle;padding:4px}.rendered_html th{font-weight:700}.rendered_html *+table{margin-top:1em}.rendered_html p{text-align:left}.rendered_html *+p{margin-top:1em}.rendered_html img{display:block;margin-left:auto;margin-right:auto}.rendered_html *+img{margin-top:1em}.rendered_html img,.rendered_html svg{max-width:100%;height:auto}.rendered_html img.unconfined,.rendered_html svg.unconfined{max-width:none}div.text_cell{display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}@media (max-width:540px){div.text_cell>div.prompt{display:none}}div.text_cell_render{outline:0;resize:none;width:inherit;border-style:none;padding:.5em .5em .5em .4em;color:#000;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}.text_cell.rendered .input_area{display:none}.text_cell.rendered .rendered_html{overflow-x:auto}.text_cell.unrendered .text_cell_render{display:none}.cm-header-1,.cm-header-2,.cm-header-3,.cm-header-4,.cm-header-5,.cm-header-6{font-weight:700;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.cm-header-1{font-size:185.7%}.cm-header-2{font-size:157.1%}.cm-header-3{font-size:128.6%}.cm-header-4{font-size:110%}.cm-header-5,.cm-header-6{font-size:100%;font-style:italic}/*!
-*
-* IPython notebook webapp
-*
-*/@media (max-width:767px){.notebook_app{padding-left:0;padding-right:0}}#ipython-main-app{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;height:100%}div#notebook_panel{margin:0;padding:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;height:100%}#notebook{font-size:14px;line-height:20px;overflow-y:hidden;overflow-x:auto;width:100%;padding-top:20px;margin:0;outline:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;min-height:100%}@media not print{#notebook-container{padding:15px;background-color:#fff;min-height:0;-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2)}}div.ui-widget-content{border:1px solid #ababab;outline:0}pre.dialog{background-color:#f7f7f7;border:1px solid #ddd;border-radius:2px;padding:.4em .4em .4em 2em}p.dialog{padding:.2em}code,kbd,pre,samp{white-space:pre-wrap}#fonttest{font-family:monospace}p{margin-bottom:0}.end_space{min-height:100px;transition:height .2s ease}.notebook_app #header{-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2)}@media not print{.notebook_app{background-color:#eee}}.celltoolbar{border:thin solid #CFCFCF;border-bottom:none;background:#EEE;border-radius:2px 2px 0 0;width:100%;height:29px;padding-right:4px;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch;-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;justify-content:flex-end;font-size:87%;padding-top:3px}@media print{.edit_mode div.cell.selected{border-color:transparent}div.code_cell{page-break-inside:avoid}#notebook-container{width:100%}.celltoolbar{display:none}}.ctb_hideshow{display:none;vertical-align:bottom}.ctb_global_show .ctb_show.ctb_hideshow{display:block}.ctb_global_show .ctb_show+.input_area,.ctb_global_show .ctb_show+div.text_cell_input,.ctb_global_show .ctb_show~div.text_cell_render{border-top-right-radius:0;border-top-left-radius:0}.ctb_global_show .ctb_show~div.text_cell_render{border:1px solid #cfcfcf}.celltoolbar select{color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;line-height:1.5;border-radius:1px;width:inherit;font-size:inherit;height:22px;padding:0;display:inline-block}.celltoolbar select:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.celltoolbar select::-moz-placeholder{color:#999;opacity:1}.celltoolbar select:-ms-input-placeholder{color:#999}.celltoolbar select::-webkit-input-placeholder{color:#999}.celltoolbar select[disabled],.celltoolbar select[readonly],fieldset[disabled] .celltoolbar select{background-color:#eee;opacity:1}.celltoolbar select[disabled],fieldset[disabled] .celltoolbar select{cursor:not-allowed}textarea.celltoolbar select{height:auto}select.celltoolbar select{height:30px;line-height:30px}select[multiple].celltoolbar select,textarea.celltoolbar select{height:auto}.celltoolbar label{margin-left:5px;margin-right:5px}.completions{position:absolute;z-index:10;overflow:hidden;border:1px solid #ababab;border-radius:2px;-webkit-box-shadow:0 6px 10px -1px #adadad;box-shadow:0 6px 10px -1px #adadad;line-height:1}.completions select{background:#fff;outline:0;border:none;padding:0;margin:0;overflow:auto;font-family:monospace;font-size:110%;color:#000;width:auto}.completions select option.context{color:#286090}#kernel_logo_widget{float:right!important;float:right}#kernel_logo_widget .current_kernel_logo{display:none;margin-top:-1px;margin-bottom:-1px;width:32px;height:32px}#menubar{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-top:1px}#menubar .navbar{border-top:1px;border-radius:0 0 2px 2px;margin-bottom:0}#menubar .navbar-toggle{float:left;padding-top:7px;padding-bottom:7px;border:none}#menubar .navbar-collapse{clear:left}.nav-wrapper{border-bottom:1px solid #e7e7e7}i.menu-icon{padding-top:4px}ul#help_menu li a{overflow:hidden;padding-right:2.2em}ul#help_menu li a i{margin-right:-1.2em}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;content:"\f0da";float:right;color:#333;margin-top:2px;margin-right:-10px}.dropdown-submenu>a:after.pull-left{margin-right:.3em}.dropdown-submenu>a:after.pull-right{margin-left:.3em}.dropdown-submenu:hover>a:after{color:#262626}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px}#notification_area{float:right!important;float:right;z-index:10}.indicator_area{float:right!important;float:right;color:#777;margin-left:5px;margin-right:5px;z-index:10;text-align:center;width:auto}#kernel_indicator{float:right!important;float:right;color:#777;margin-left:5px;margin-right:5px;z-index:10;text-align:center;width:auto;border-left:1px solid}#kernel_indicator .kernel_indicator_name{padding-left:5px;padding-right:5px}#modal_indicator{float:right!important;float:right;color:#777;margin-left:5px;margin-right:5px;z-index:10;text-align:center;width:auto}#readonly-indicator{float:right!important;float:right;color:#777;z-index:10;text-align:center;width:auto;display:none;margin:2px 0 0}.modal_indicator:before{width:1.28571429em;text-align:center}.edit_mode .modal_indicator:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f040"}.edit_mode .modal_indicator:before.pull-left{margin-right:.3em}.edit_mode .modal_indicator:before.pull-right{margin-left:.3em}.command_mode .modal_indicator:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:' '}.command_mode .modal_indicator:before.pull-left{margin-right:.3em}.command_mode .modal_indicator:before.pull-right{margin-left:.3em}.kernel_idle_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f10c"}.kernel_idle_icon:before.pull-left{margin-right:.3em}.kernel_idle_icon:before.pull-right{margin-left:.3em}.kernel_busy_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f111"}.kernel_busy_icon:before.pull-left{margin-right:.3em}.kernel_busy_icon:before.pull-right{margin-left:.3em}.kernel_dead_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f1e2"}.kernel_dead_icon:before.pull-left{margin-right:.3em}.kernel_dead_icon:before.pull-right{margin-left:.3em}.kernel_disconnected_icon:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f127"}.kernel_disconnected_icon:before.pull-left{margin-right:.3em}.kernel_disconnected_icon:before.pull-right{margin-left:.3em}.notification_widget{z-index:10;background:rgba(240,240,240,.5);margin-right:4px;color:#333;background-color:#fff;border-color:#ccc}.notification_widget.active,.notification_widget.focus,.notification_widget:active,.notification_widget:focus,.notification_widget:hover,.open>.dropdown-toggle.notification_widget{color:#333;background-color:#e6e6e6;border-color:#adadad}.notification_widget.active,.notification_widget:active,.open>.dropdown-toggle.notification_widget{background-image:none}.notification_widget.disabled,.notification_widget.disabled.active,.notification_widget.disabled.focus,.notification_widget.disabled:active,.notification_widget.disabled:focus,.notification_widget.disabled:hover,.notification_widget[disabled],.notification_widget[disabled].active,.notification_widget[disabled].focus,.notification_widget[disabled]:active,.notification_widget[disabled]:focus,.notification_widget[disabled]:hover,fieldset[disabled] .notification_widget,fieldset[disabled] .notification_widget.active,fieldset[disabled] .notification_widget.focus,fieldset[disabled] .notification_widget:active,fieldset[disabled] .notification_widget:focus,fieldset[disabled] .notification_widget:hover{background-color:#fff;border-color:#ccc}.notification_widget .badge{color:#fff;background-color:#333}.notification_widget.warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.notification_widget.warning.active,.notification_widget.warning.focus,.notification_widget.warning:active,.notification_widget.warning:focus,.notification_widget.warning:hover,.open>.dropdown-toggle.notification_widget.warning{color:#fff;background-color:#ec971f;border-color:#d58512}.notification_widget.warning.active,.notification_widget.warning:active,.open>.dropdown-toggle.notification_widget.warning{background-image:none}.notification_widget.warning.disabled,.notification_widget.warning.disabled.active,.notification_widget.warning.disabled.focus,.notification_widget.warning.disabled:active,.notification_widget.warning.disabled:focus,.notification_widget.warning.disabled:hover,.notification_widget.warning[disabled],.notification_widget.warning[disabled].active,.notification_widget.warning[disabled].focus,.notification_widget.warning[disabled]:active,.notification_widget.warning[disabled]:focus,.notification_widget.warning[disabled]:hover,fieldset[disabled] .notification_widget.warning,fieldset[disabled] .notification_widget.warning.active,fieldset[disabled] .notification_widget.warning.focus,fieldset[disabled] .notification_widget.warning:active,fieldset[disabled] .notification_widget.warning:focus,fieldset[disabled] .notification_widget.warning:hover{background-color:#f0ad4e;border-color:#eea236}.notification_widget.warning .badge{color:#f0ad4e;background-color:#fff}.notification_widget.success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.notification_widget.success.active,.notification_widget.success.focus,.notification_widget.success:active,.notification_widget.success:focus,.notification_widget.success:hover,.open>.dropdown-toggle.notification_widget.success{color:#fff;background-color:#449d44;border-color:#398439}.notification_widget.success.active,.notification_widget.success:active,.open>.dropdown-toggle.notification_widget.success{background-image:none}.notification_widget.success.disabled,.notification_widget.success.disabled.active,.notification_widget.success.disabled.focus,.notification_widget.success.disabled:active,.notification_widget.success.disabled:focus,.notification_widget.success.disabled:hover,.notification_widget.success[disabled],.notification_widget.success[disabled].active,.notification_widget.success[disabled].focus,.notification_widget.success[disabled]:active,.notification_widget.success[disabled]:focus,.notification_widget.success[disabled]:hover,fieldset[disabled] .notification_widget.success,fieldset[disabled] .notification_widget.success.active,fieldset[disabled] .notification_widget.success.focus,fieldset[disabled] .notification_widget.success:active,fieldset[disabled] .notification_widget.success:focus,fieldset[disabled] .notification_widget.success:hover{background-color:#5cb85c;border-color:#4cae4c}.notification_widget.success .badge{color:#5cb85c;background-color:#fff}.notification_widget.info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.notification_widget.info.active,.notification_widget.info.focus,.notification_widget.info:active,.notification_widget.info:focus,.notification_widget.info:hover,.open>.dropdown-toggle.notification_widget.info{color:#fff;background-color:#31b0d5;border-color:#269abc}.notification_widget.info.active,.notification_widget.info:active,.open>.dropdown-toggle.notification_widget.info{background-image:none}.notification_widget.info.disabled,.notification_widget.info.disabled.active,.notification_widget.info.disabled.focus,.notification_widget.info.disabled:active,.notification_widget.info.disabled:focus,.notification_widget.info.disabled:hover,.notification_widget.info[disabled],.notification_widget.info[disabled].active,.notification_widget.info[disabled].focus,.notification_widget.info[disabled]:active,.notification_widget.info[disabled]:focus,.notification_widget.info[disabled]:hover,fieldset[disabled] .notification_widget.info,fieldset[disabled] .notification_widget.info.active,fieldset[disabled] .notification_widget.info.focus,fieldset[disabled] .notification_widget.info:active,fieldset[disabled] .notification_widget.info:focus,fieldset[disabled] .notification_widget.info:hover{background-color:#5bc0de;border-color:#46b8da}.notification_widget.info .badge{color:#5bc0de;background-color:#fff}.notification_widget.danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.notification_widget.danger.active,.notification_widget.danger.focus,.notification_widget.danger:active,.notification_widget.danger:focus,.notification_widget.danger:hover,.open>.dropdown-toggle.notification_widget.danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.notification_widget.danger.active,.notification_widget.danger:active,.open>.dropdown-toggle.notification_widget.danger{background-image:none}.notification_widget.danger.disabled,.notification_widget.danger.disabled.active,.notification_widget.danger.disabled.focus,.notification_widget.danger.disabled:active,.notification_widget.danger.disabled:focus,.notification_widget.danger.disabled:hover,.notification_widget.danger[disabled],.notification_widget.danger[disabled].active,.notification_widget.danger[disabled].focus,.notification_widget.danger[disabled]:active,.notification_widget.danger[disabled]:focus,.notification_widget.danger[disabled]:hover,fieldset[disabled] .notification_widget.danger,fieldset[disabled] .notification_widget.danger.active,fieldset[disabled] .notification_widget.danger.focus,fieldset[disabled] .notification_widget.danger:active,fieldset[disabled] .notification_widget.danger:focus,fieldset[disabled] .notification_widget.danger:hover{background-color:#d9534f;border-color:#d43f3a}.notification_widget.danger .badge{color:#d9534f;background-color:#fff}div#pager{background-color:#fff;font-size:14px;line-height:20px;overflow:hidden;display:none;position:fixed;bottom:0;width:100%;max-height:50%;padding-top:8px;-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2);z-index:100;top:auto!important}div#pager pre{line-height:1.21429em;color:#000;background-color:#f7f7f7;padding:.4em}div#pager #pager-button-area{position:absolute;top:8px;right:20px}div#pager #pager-contents{position:relative;overflow:auto;width:100%;height:100%}div#pager #pager-contents #pager-container{position:relative;padding:15px 0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div#pager .ui-resizable-handle{top:0;height:8px;background:#f7f7f7;border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf}div#pager .ui-resizable-handle::after{content:'';top:2px;left:50%;height:3px;width:30px;margin-left:-15px;position:absolute;border-top:1px solid #cfcfcf}.quickhelp{display:-webkit-box;-webkit-box-orient:horizontal;display:-moz-box;-moz-box-orient:horizontal;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}.shortcut_key{display:inline-block;width:20ex;text-align:right;font-family:monospace}.shortcut_descr{display:inline-block;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}span.save_widget{margin-top:6px}span.save_widget span.filename{height:1em;line-height:1em;padding:3px;margin-left:16px;border:none;font-size:146.5%;border-radius:2px}span.save_widget span.filename:hover{background-color:#e6e6e6}span.autosave_status,span.checkpoint_status{font-size:small}@media (max-width:767px){span.save_widget{font-size:small}span.autosave_status,span.checkpoint_status{display:none}}@media (min-width:768px)and (max-width:991px){span.checkpoint_status{display:none}span.autosave_status{font-size:x-small}}.toolbar{padding:0;margin-left:-5px;margin-top:2px;margin-bottom:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toolbar label,.toolbar select{width:auto;vertical-align:middle;margin-bottom:0;display:inline;font-size:92%;margin-left:.3em;margin-right:.3em;padding:3px 0 0}.toolbar .btn{padding:2px 8px}.toolbar .btn-group{margin-top:0;margin-left:5px}#maintoolbar{margin-bottom:-3px;margin-top:-8px;border:0;min-height:27px;margin-left:0;padding-top:11px;padding-bottom:3px}#maintoolbar .navbar-text{float:none;vertical-align:middle;text-align:right;margin-left:5px;margin-right:0;margin-top:0}.select-xs{height:24px}@-moz-keyframes fadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}.bigtooltip{overflow:auto;height:200px;-webkit-transition-property:height;-webkit-transition-duration:500ms;-moz-transition-property:height;-moz-transition-duration:500ms;transition-property:height;transition-duration:500ms}.smalltooltip{-webkit-transition-property:height;-webkit-transition-duration:500ms;-moz-transition-property:height;-moz-transition-duration:500ms;transition-property:height;transition-duration:500ms;text-overflow:ellipsis;overflow:hidden;height:80px}.tooltipbuttons{position:absolute;padding-right:15px;top:0;right:0}.tooltiptext{padding-right:30px}.ipython_tooltip{max-width:700px;animation:fadeOut 400ms;-webkit-animation:fadeIn 400ms;-moz-animation:fadeIn 400ms;animation:fadeIn 400ms;vertical-align:middle;background-color:#f7f7f7;overflow:visible;border:1px solid #ababab;outline:0;padding:3px 3px 3px 7px;padding-left:7px;font-family:monospace;min-height:50px;-moz-box-shadow:0 6px 10px -1px #adadad;-webkit-box-shadow:0 6px 10px -1px #adadad;box-shadow:0 6px 10px -1px #adadad;border-radius:2px;position:absolute;z-index:1000}.ipython_tooltip a{float:right}.ipython_tooltip .tooltiptext pre{border:0;border-radius:0;font-size:100%;background-color:#f7f7f7}.pretooltiparrow{left:0;margin:0;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute}.pretooltiparrow:before{background-color:#f7f7f7;border:1px solid #ababab;z-index:11;content:"";position:absolute;left:15px;top:10px;width:25px;height:25px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg)}.terminal-app{background:#eee}.terminal-app #header{background:#fff;-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.2);box-shadow:0 0 12px 1px rgba(87,87,87,.2)}.terminal-app .terminal{float:left;font-family:monospace;color:#fff;background:#000;padding:.4em;border-radius:2px;-webkit-box-shadow:0 0 12px 1px rgba(87,87,87,.4);box-shadow:0 0 12px 1px rgba(87,87,87,.4)}.terminal-app .terminal,.terminal-app .terminal dummy-screen{line-height:1em;font-size:14px}.terminal-app .terminal-cursor{color:#000;background:#fff}.terminal-app #terminado-container{margin-top:20px}
-/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/py-nbdime/package.py b/var/spack/repos/builtin/packages/py-nbdime/package.py
index deb6039b93..e4e25dd827 100644
--- a/var/spack/repos/builtin/packages/py-nbdime/package.py
+++ b/var/spack/repos/builtin/packages/py-nbdime/package.py
@@ -12,7 +12,10 @@ class PyNbdime(PythonPackage):
homepage = "https://nbdime.readthedocs.io/"
pypi = "nbdime/nbdime-3.1.1.tar.gz"
- version("3.1.1", sha256="67767320e971374f701a175aa59abd3a554723039d39fae908e72d16330d648b")
+ version("3.2.1", sha256="31409a30f848ffc6b32540697e82d5a0a1b84dcc32716ca74e78bcc4b457c453")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2021-41134
+ version("3.1.1", sha256="67767320e971374f701a175aa59abd3a554723039d39fae908e72d16330d648b")
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@40.8.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-ndg-httpsclient/package.py b/var/spack/repos/builtin/packages/py-ndg-httpsclient/package.py
index 6f94088cbb..c61a3b269a 100644
--- a/var/spack/repos/builtin/packages/py-ndg-httpsclient/package.py
+++ b/var/spack/repos/builtin/packages/py-ndg-httpsclient/package.py
@@ -15,6 +15,7 @@ class PyNdgHttpsclient(PythonPackage):
pypi = "ndg_httpsclient/ndg_httpsclient-0.5.1.tar.gz"
version("0.5.1", sha256="d72faed0376ab039736c2ba12e30695e2788c4aa569c9c3e3d72131de2592210")
+ version("0.5.0", sha256="c009f5430790936b3a97eaf9f968516664d97e146ab2bda991f0caadb7cc088b")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-neobolt/package.py b/var/spack/repos/builtin/packages/py-neobolt/package.py
index 6cf9fd00b5..7cc399be5a 100644
--- a/var/spack/repos/builtin/packages/py-neobolt/package.py
+++ b/var/spack/repos/builtin/packages/py-neobolt/package.py
@@ -14,5 +14,7 @@ class PyNeobolt(PythonPackage):
version("1.7.16", sha256="ca4e87679fe3ed39aec23638658e02dbdc6bbc3289a04e826f332e05ab32275d")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-neptune-client/package.py b/var/spack/repos/builtin/packages/py-neptune-client/package.py
new file mode 100644
index 0000000000..af0196746e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-neptune-client/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNeptuneClient(PythonPackage):
+ """
+ Flexible metadata store for MLOps, built for research and
+ production teams that run a lot of experiments.
+ """
+
+ homepage = "https://neptune.ai/"
+ pypi = "neptune-client/neptune-client-0.16.7.tar.gz"
+
+ version("0.16.7", sha256="9b8bf2f59cb6b7ed6d96ea221b68ea20d9d481a1a4672d8173648ef998134454")
+ version("0.16.1", sha256="821238f510486feacd87c745f4646916259a416545ab678b47195729c071f249")
+
+ depends_on("python@3.7.0:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-versioneer", type="build")
+ depends_on("py-bravado", type=("build", "run"))
+ depends_on("py-click@7.0:", type=("build", "run"))
+ depends_on("py-future@0.17.1:", type=("build", "run"))
+ depends_on("py-oauthlib@2.1.0:", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("pil@1.1.6:", type=("build", "run"))
+ depends_on("py-pyjwt", type=("build", "run"))
+ depends_on("py-requests@2.20.0:", type=("build", "run"))
+ depends_on("py-requests-oauthlib@1.0.0:", type=("build", "run"))
+ depends_on("py-six@1.12.0:", type=("build", "run"))
+ depends_on("py-websocket-client@0.35:0,1.0.1:", type=("build", "run"))
+ depends_on("py-gitpython@2.0.8:", type=("build", "run"))
+ depends_on("py-boto3@1.16.0:", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"))
+ depends_on("py-urllib3", type=("build", "run"))
+ depends_on("py-dataclasses@0.6:", when="^python@:3.6", type=("build", "run"))
+ depends_on("py-swagger-spec-validator@2.7.4:", type=("build", "run"))
+ depends_on("py-psutil", type=("build", "run"))
+ depends_on("py-jsonschema@:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nest-asyncio/package.py b/var/spack/repos/builtin/packages/py-nest-asyncio/package.py
index 9cf65d6e33..6bba7b02ca 100644
--- a/var/spack/repos/builtin/packages/py-nest-asyncio/package.py
+++ b/var/spack/repos/builtin/packages/py-nest-asyncio/package.py
@@ -15,6 +15,9 @@ class PyNestAsyncio(PythonPackage):
license("BSD-2-Clause")
+ version("1.6.0", sha256="6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe")
+ version("1.5.9", sha256="d1e1144e9c6e3e6392e0fcf5211cb1c8374b5648a98f1ebe48e5336006b41907")
+ version("1.5.8", sha256="25aa2ca0d2a5b5531956b9e273b45cf664cae2b145101d73b86b199978d48fdb")
version("1.5.6", sha256="d267cc1ff794403f7df692964d1d2a3fa9418ffea2a3f6859a439ff482fef290")
version("1.5.5", sha256="e442291cd942698be619823a17a86a5759eabe1f8613084790de189fe9e16d65")
version("1.5.4", sha256="f969f6013a16fadb4adcf09d11a68a4f617c6049d7af7ac2c676110169a63abd")
diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py
index a51c62546a..d3559439d4 100644
--- a/var/spack/repos/builtin/packages/py-netcdf4/package.py
+++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py
@@ -10,12 +10,16 @@ class PyNetcdf4(PythonPackage):
"""Python interface to the netCDF Library."""
homepage = "https://github.com/Unidata/netcdf4-python"
- pypi = "netCDF4/netCDF4-1.2.7.tar.gz"
+ pypi = "netCDF4/netcdf4-1.2.7.tar.gz"
maintainers("skosukhin")
license("MIT")
+ version(
+ "1.7.1.post2", sha256="37d557e36654889d7020192bfb56f9d5f93894cb32997eb837ae586c538fd7b6"
+ )
+ version("1.6.5", sha256="824881d0aacfde5bd982d6adedd8574259c85553781e7b83e0ce82b890bfa0ef")
version("1.6.2", sha256="0382b02ff6a288419f6ffec85dec40f451f41b8755547154c575ddd9f0f4ae53")
version("1.5.8", sha256="ca3d468f4812c0999df86e3f428851fb0c17ac34ce0827115c246b0b690e4e84")
version("1.5.3", sha256="2a3ca855848f4bbf07fac366da77a681fcead18c0a8813d91d46302f562dc3be")
@@ -23,22 +27,23 @@ class PyNetcdf4(PythonPackage):
variant("mpi", default=True, description="Parallel IO support")
- depends_on("python@2.6:2.7,3.3:", when="@1.2.8:1.5.1", type=("build", "link", "run"))
- depends_on("python@2.7,3.5:", when="@1.5.2:1.5.3", type=("build", "link", "run"))
- depends_on("python@3.6:", when="@1.5.4:", type=("build", "link", "run"))
-
- depends_on("py-setuptools@18:", when="@1.4.2:1.5.8", type="build")
- depends_on("py-setuptools@41.2:", when="@1.6.2:", type="build")
+ depends_on("python", type=("build", "link", "run"))
+ depends_on("py-cython@0.29:", when="@1.6.5:", type="build")
depends_on("py-cython@0.19:", type="build")
-
- depends_on("py-numpy@1.7:", type=("build", "link", "run"))
- depends_on("py-numpy@1.9:", when="@1.5.4:", type=("build", "link", "run"))
+ depends_on("py-setuptools@61:", when="@1.6.5:", type="build")
+ depends_on("py-setuptools@41.2:", when="@1.6.2:", type="build")
+ depends_on("py-setuptools@18:", when="@1.4.2:1.5.8", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", when="@1.7:", type="build")
depends_on("py-cftime", type=("build", "run"))
+ depends_on("py-certifi", when="@1.6.5:", type=("build", "run"))
+ depends_on("py-numpy", when="@1.6.5:", type=("build", "link", "run"))
+ depends_on("py-numpy@1.9:", when="@1.5.4:1.6.2", type=("build", "link", "run"))
+ depends_on("py-numpy@1.7:", type=("build", "link", "run"))
+ # https://github.com/Unidata/netcdf4-python/pull/1317
+ depends_on("py-numpy@:1", when="@:1.6", type=("build", "link", "run"))
depends_on("py-mpi4py", when="+mpi", type=("build", "run"))
-
depends_on("netcdf-c", when="-mpi")
depends_on("netcdf-c+mpi", when="+mpi")
-
depends_on("hdf5@1.8.0:+hl", when="-mpi")
depends_on("hdf5@1.8.0:+hl+mpi", when="+mpi")
@@ -49,6 +54,28 @@ class PyNetcdf4(PythonPackage):
# following patch disables the usage of pkg-config at all.
patch("disable_pkgconf.patch")
+ # https://github.com/Unidata/netcdf4-python/pull/1322
+ patch(
+ "https://github.com/Unidata/netcdf4-python/commit/49dcd0b5bd25824c254770c0d41445133fc13a46.patch?full_index=1",
+ sha256="71eefe1d3065ad050fb72eb61d916ae1374a3fafd96ddaee6499cda952d992c4",
+ when="@1.6: %gcc@14:",
+ )
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/n/netCDF4/{}-{}.tar.gz"
+ if version >= Version("1.7"):
+ name = "netcdf4"
+ else:
+ name = "netCDF4"
+ return url.format(name, version)
+
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"):
+ flags.append("-Wno-error=int-conversion")
+
+ return flags, None, None
+
def setup_build_environment(self, env):
"""Ensure installed netcdf and hdf5 libraries are used"""
# Explicitly set these variables so setup.py won't erroneously pick up
diff --git a/var/spack/repos/builtin/packages/py-netifaces/package.py b/var/spack/repos/builtin/packages/py-netifaces/package.py
index 5cf1394c7b..e4f193b78a 100644
--- a/var/spack/repos/builtin/packages/py-netifaces/package.py
+++ b/var/spack/repos/builtin/packages/py-netifaces/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class PyNetifaces(PythonPackage):
"""Portable network interface information"""
- homepage = (
- "https://0xbharath.github.io/python-network-programming/libraries/netifaces/index.html"
- )
+ homepage = "https://github.com/al45tair/netifaces"
pypi = "netifaces/netifaces-0.10.5.tar.gz"
- license("Unlicense")
+ license("MIT", checked_by="wdconinc")
+ version("0.11.0", sha256="043a79146eb2907edf439899f262b3dfe41717d34124298ed281139a8b93ca32")
+ version("0.10.9", sha256="2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3")
version("0.10.5", sha256="59d8ad52dd3116fcb6635e175751b250dc783fb011adba539558bd764e5d628b")
+ depends_on("c", type="build")
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-netket/package.py b/var/spack/repos/builtin/packages/py-netket/package.py
index 02f8377329..a8322db54f 100644
--- a/var/spack/repos/builtin/packages/py-netket/package.py
+++ b/var/spack/repos/builtin/packages/py-netket/package.py
@@ -26,9 +26,11 @@ class PyNetket(PythonPackage):
version("1.0.3", sha256="b8e54d7ad8b379b740def640d748c6560943aed473755389fc5cf1020b9007de")
version("1.0.2", sha256="229c906e92a432bbbd0ff0527874f41318f8fc480d12a33c8184f30960ae628b")
+ depends_on("cxx", type="build") # generated
+
# build only deps
depends_on("py-setuptools", type="build")
- depends_on("py-cmake@3.12:", type="build")
+ depends_on("cmake@3.12:", type="build")
depends_on("blas")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/py-netpyne/package.py b/var/spack/repos/builtin/packages/py-netpyne/package.py
index 1b4c0bb01e..4eee7c0c73 100644
--- a/var/spack/repos/builtin/packages/py-netpyne/package.py
+++ b/var/spack/repos/builtin/packages/py-netpyne/package.py
@@ -11,7 +11,7 @@ class PyNetpyne(PythonPackage):
parallel simulation, optimization and analysis of multiscale
biological neuronal networks in NEURON."""
- homepage = "http://www.netpyne.org/"
+ homepage = "https://www.netpyne.org/"
url = "https://github.com/suny-downstate-medical-center/netpyne/archive/refs/tags/v1.0.3.1.tar.gz"
git = "https://github.com/suny-downstate-medical-center/netpyne.git"
diff --git a/var/spack/repos/builtin/packages/py-networkit/package.py b/var/spack/repos/builtin/packages/py-networkit/package.py
index 283ba61173..4f360c4484 100644
--- a/var/spack/repos/builtin/packages/py-networkit/package.py
+++ b/var/spack/repos/builtin/packages/py-networkit/package.py
@@ -31,6 +31,8 @@ class PyNetworkit(PythonPackage):
version("7.0", sha256="eea4b5e565d6990b674e1c7f4d598be9377d57b61d0d82883ecc39edabaf3631")
version("6.1", sha256="f7fcb50dec66a8253f85c10ff9314100de013c7578d531c81d3f71bc6cf8f093")
+ depends_on("cxx", type="build") # generated
+
# Required dependencies
depends_on("cmake", type="build")
depends_on("libnetworkit@9.0", type=("build", "link"), when="@9.0")
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
index 693761d3ab..c8bf1ac0f9 100644
--- a/var/spack/repos/builtin/packages/py-networkx/package.py
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -17,6 +17,7 @@ class PyNetworkx(PythonPackage):
license("BSD-3-Clause")
version("3.1", sha256="de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61")
+ version("3.0", sha256="9a9992345353618ae98339c2b63d8201c381c2944f38a2ab49cb45a4c667e412")
version("2.8.6", sha256="bd2b7730300860cbd2dafe8e5af89ff5c9a65c3975b352799d87a6238b4301a6")
version("2.7.1", sha256="d1194ba753e5eed07cdecd1d23c5cd7a3c772099bd8dbd2fea366788cf4de7ba")
version("2.6.3", sha256="c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51")
@@ -49,6 +50,8 @@ class PyNetworkx(PythonPackage):
# From requirements/default.txt
depends_on("py-numpy@1.20:", when="@3:", type=("build", "run"))
depends_on("py-numpy@1.19:", when="@2.8.6:", type=("build", "run"))
+ # https://github.com/networkx/networkx/pull/7390
+ depends_on("py-numpy@:1", when="@:3.2", type=("build", "run"))
depends_on("py-scipy@1.8:", when="@2.8.6:", type=("build", "run"))
depends_on("py-matplotlib@3.4:", when="@2.8.6:", type=("build", "run"))
depends_on("py-pandas@1.3:", when="@2.8.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-neuralgcm/package.py b/var/spack/repos/builtin/packages/py-neuralgcm/package.py
new file mode 100644
index 0000000000..af57eb8ee2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-neuralgcm/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNeuralgcm(PythonPackage):
+ """NeuralGCM: Hybrid ML + Physics model of Earth's atmosphere."""
+
+ homepage = "https://github.com/google-research/neuralgcm"
+ git = "https://github.com/google-research/neuralgcm.git"
+
+ license("Apache-2.0")
+
+ version("main", branch="main")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:")
+ depends_on("py-dinosaur")
+ depends_on("py-dm-haiku")
+ depends_on("py-gin-config")
+ depends_on("py-jax")
+ depends_on("py-jaxlib")
+ depends_on("py-numpy")
+ depends_on("py-optax")
+ depends_on("py-pandas")
+ depends_on("py-tensorflow-probability")
+ depends_on("py-xarray")
diff --git a/var/spack/repos/builtin/packages/py-nexusforge/package.py b/var/spack/repos/builtin/packages/py-nexusforge/package.py
index 8b7384b4c0..6a84838cca 100644
--- a/var/spack/repos/builtin/packages/py-nexusforge/package.py
+++ b/var/spack/repos/builtin/packages/py-nexusforge/package.py
@@ -17,6 +17,7 @@ class PyNexusforge(PythonPackage):
license("Apache-2.0")
+ version("0.8.1", sha256="eb2909cbec185e7a73191c1be1e62902a0d8534f0d93454ef3e4e3b18b5129cf")
version("0.8.0", sha256="4358505ead26e41c2a0c4e6113cf3a486c9661e2a3899394497a2b5a94b70424")
version("0.7.0", sha256="a8d2951d9ad18df9f2f4db31a4c18fcdd27bfcec929b03a3c91f133ea439413c")
@@ -31,6 +32,8 @@ class PyNexusforge(PythonPackage):
depends_on("py-nexus-sdk", type=("build", "run"))
depends_on("py-aiohttp", type=("build", "run"))
depends_on("py-rdflib@6.0.0:", type=("build", "run"))
+ depends_on("py-rdflib@6.2.0", type=("build", "run"), when="@0.8.1")
+ depends_on("py-rdflib@6.3.2", type=("build", "run"), when="@0.8.2:")
depends_on("py-pyld", type=("build", "run"))
depends_on("py-pyshacl@0.17.2", type=("build", "run"))
depends_on("py-nest-asyncio@1.5.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nglview/package.py b/var/spack/repos/builtin/packages/py-nglview/package.py
new file mode 100644
index 0000000000..b6d81c1819
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nglview/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNglview(PythonPackage):
+ """Jupyter widget to interactively view molecular structures and trajectories."""
+
+ homepage = "http://nglviewer.org"
+ pypi = "nglview/nglview-3.0.8.tar.gz"
+
+ maintainers("w8jcik")
+
+ version("3.0.8", sha256="f9e468cd813dac319cbeca6ae20ae099008ff3a06399f5d23d75582dde28623a")
+
+ depends_on("py-ipywidgets@7:", type=("build", "run"))
+ depends_on("py-jupyterlab-widgets", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+
+ depends_on("py-setuptools@40.8.0:", type="build")
+ depends_on("py-jupyter-packaging@0.7.9:0.7", type="build")
+ depends_on("py-versioneer-518", type="build")
diff --git a/var/spack/repos/builtin/packages/py-nibabel/package.py b/var/spack/repos/builtin/packages/py-nibabel/package.py
index 382e95ac3b..6b17213491 100644
--- a/var/spack/repos/builtin/packages/py-nibabel/package.py
+++ b/var/spack/repos/builtin/packages/py-nibabel/package.py
@@ -13,8 +13,12 @@ class PyNibabel(PythonPackage):
pypi = "nibabel/nibabel-3.2.1.tar.gz"
git = "https://github.com/nipy/nibabel"
- license("PDDL-1.0")
+ maintainers("ChristopherChristofi")
+ # As detailed: https://nipy.org/nibabel/legal.html
+ license("MIT AND BSD-3-Clause AND PSF-2.0 AND PDDL-1.0")
+
+ version("5.2.1", sha256="b6c80b2e728e4bc2b65f1142d9b8d2287a9102a8bf8477e115ef0d8334559975")
version("5.1.0", sha256="ce73ca5e957209e7219a223cb71f77235c9df2acf4d3f27f861ba38e9481ac53")
version("4.0.2", sha256="45c49b5349351b45f6c045a91aa02b4f0d367686ff3284632ef95ac65b930786")
version("3.2.2", sha256="b0dcc174b30405ce9e8fec1eab3cbbb20f5c5e4920976c08b22e050b7c124f94")
@@ -26,12 +30,14 @@ class PyNibabel(PythonPackage):
depends_on("py-hatchling", when="@5:", type="build")
depends_on("py-hatch-vcs", when="@5:", type="build")
+ depends_on("py-numpy@1.20:", when="@5.2.1:", type=("build", "run"))
depends_on("py-numpy@1.19:", when="@5:", type=("build", "run"))
depends_on("py-numpy@1.17:", when="@4:", type=("build", "run"))
depends_on("py-numpy@1.14:", when="@3.2:", type=("build", "run"))
depends_on("py-numpy@1.8:", type=("build", "run"))
depends_on("py-packaging@17:", when="@4:", type=("build", "run"))
depends_on("py-packaging@14.3:", when="@3.1:", type=("build", "run"))
+ depends_on("py-importlib-resources@1.3:", when="@5.2.1: ^python@:3.9", type=("build", "run"))
depends_on("py-importlib-resources@1.3:", when="@5.1: ^python@:3.8", type=("build", "run"))
depends_on("py-pytest", type="test")
diff --git a/var/spack/repos/builtin/packages/py-nilearn/package.py b/var/spack/repos/builtin/packages/py-nilearn/package.py
index b98c4bc749..ea5884fa6b 100644
--- a/var/spack/repos/builtin/packages/py-nilearn/package.py
+++ b/var/spack/repos/builtin/packages/py-nilearn/package.py
@@ -13,6 +13,11 @@ class PyNilearn(PythonPackage):
pypi = "nilearn/nilearn-0.7.1.tar.gz"
git = "https://github.com/nilearn/nilearn"
+ maintainers("ChristopherChristofi")
+
+ license("BSD")
+
+ version("0.10.3", sha256="77819331314c4ca5c15c07634f69f855fafdf9add051b1882e3a600ad52757d8")
version("0.10.1", sha256="928a364e7ed77d15d02b7f227197ea7c78f44f2fe780feb555d6d7cf9232f846")
version("0.10.0", sha256="cc7f1068e038076527ead1bd363436f88f5e8d21e8bb57b323b30b926fc7553a")
version("0.9.2", sha256="8da8d3835d92cd7b8a6cc92455a489d7e7f5994cf64fc71bce653e362773b9e4")
@@ -23,8 +28,6 @@ class PyNilearn(PythonPackage):
version("0.6.2", sha256="cfc6cfda59a6f4247189f8ccf92e364de450460a15c0ec21bdb857c420dd198c")
version("0.4.2", sha256="5049363eb6da2e7c35589477dfc79bf69929ca66de2d7ed2e9dc07acf78636f4")
- depends_on("python@3.7:", when="@0.10:", type=("build", "run"))
-
depends_on("py-hatchling", when="@0.10.1:", type="build")
depends_on("py-hatch-vcs", when="@0.10.1:", type="build")
depends_on("py-setuptools", when="@:0.10.0", type="build")
@@ -36,6 +39,7 @@ class PyNilearn(PythonPackage):
depends_on("py-joblib@0.12:", when="@0.7:", type=("build", "run"))
depends_on("py-joblib@0.11:", when="@0.6:", type=("build", "run"))
depends_on("py-lxml", when="@0.9.1:", type=("build", "run"))
+ depends_on("py-nibabel@4.0.0:", when="@0.10.3:", type=("build", "run"))
depends_on("py-nibabel@3.2:", when="@0.10:", type=("build", "run"))
depends_on("py-nibabel@3:", when="@0.9.1:", type=("build", "run"))
depends_on("py-nibabel@2.5:", when="@0.8:", type=("build", "run"))
@@ -60,6 +64,7 @@ class PyNilearn(PythonPackage):
# older py-nilearn versions use import sklearn.external.joblib which was
# deprecated in py-scikit-learn@0.23:
depends_on("py-scikit-learn@0.15:0.22", when="@:0.5", type=("build", "run"))
+ depends_on("py-scipy@1.8:", when="@0.10.3:", type=("build", "run"))
depends_on("py-scipy@1.6:", when="@0.10:", type=("build", "run"))
depends_on("py-scipy@1.5:", when="@0.9.1:", type=("build", "run"))
depends_on("py-scipy@1.2:", when="@0.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ninja/package.py b/var/spack/repos/builtin/packages/py-ninja/package.py
index db6cbd2417..5153281d74 100644
--- a/var/spack/repos/builtin/packages/py-ninja/package.py
+++ b/var/spack/repos/builtin/packages/py-ninja/package.py
@@ -9,14 +9,21 @@ from spack.package import *
class PyNinja(PythonPackage):
- """Ninja is a small build system with a focus on speed."""
+ """Ninja is a small build system with a focus on speed.
+
+ Deprecated: use ninja instead.
+ """
homepage = "https://ninja-build.org"
pypi = "ninja/ninja-1.10.2.tar.gz"
license("Apache-2.0")
- version("1.10.2", sha256="bb5e54b9a7343b3a8fc6532ae2c169af387a45b0d4dd5b72c2803e21658c5791")
+ version(
+ "1.10.2",
+ sha256="bb5e54b9a7343b3a8fc6532ae2c169af387a45b0d4dd5b72c2803e21658c5791",
+ deprecated=True,
+ )
depends_on("cmake@3.6:", type="build")
depends_on("py-setuptools@42:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-nltk/package.py b/var/spack/repos/builtin/packages/py-nltk/package.py
index db9cc2c5b8..35c9bc5cf9 100644
--- a/var/spack/repos/builtin/packages/py-nltk/package.py
+++ b/var/spack/repos/builtin/packages/py-nltk/package.py
@@ -16,13 +16,22 @@ class PyNltk(PythonPackage):
license("Apache-2.0")
+ version("3.9.1", sha256="87d127bd3de4bd89a4f81265e5fa59cb1b199b27440175370f7417d2bc7ae868")
version("3.8.1", sha256="1834da3d0682cba4f2cede2f9aad6b0fafb6461ba451db0efb6f9c39798d64d3")
version("3.5", sha256="845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35")
+ def url_for_version(self, version):
+ url = "https://pypi.io/packages/source/n/nltk/nltk-{0}.{1}"
+ extension = "zip"
+ if version >= Version("3.9.1"):
+ extension = "tar.gz"
+ return url.format(version.dotted, extension)
+
maintainers("meyersbs")
variant("data", default=False, description="Download the NLTK data")
+ depends_on("python@3.8:", when="@3.9.1:", type=("build", "run"))
depends_on("python@3.7:", when="@3.8.1:", type=("build", "run"))
depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
@@ -53,13 +62,22 @@ class PyNltk(PythonPackage):
resource(
name="punkt",
url="https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt.zip",
- when="+data",
+ when="+data@:3.8.1",
sha256="51c3078994aeaf650bfc8e028be4fb42b4a0d177d41c012b6a983979653660ec",
destination="nltk_data/tokenizers",
placement="punkt",
)
resource(
+ name="punkt_tab",
+ url="https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt_tab.zip",
+ when="+data@3.8.2:",
+ sha256="c2b16c23d738effbdc5789d7aa601397c13ba2819bf922fb904687f3f16657ed",
+ destination="nltk_data/tokenizers",
+ placement="punkt_tab",
+ )
+
+ resource(
name="rslp",
url="https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/stemmers/rslp.zip",
when="+data",
diff --git a/var/spack/repos/builtin/packages/py-nodeenv/package.py b/var/spack/repos/builtin/packages/py-nodeenv/package.py
index ef8028d21f..d5dbadfa0a 100644
--- a/var/spack/repos/builtin/packages/py-nodeenv/package.py
+++ b/var/spack/repos/builtin/packages/py-nodeenv/package.py
@@ -12,9 +12,15 @@ class PyNodeenv(PythonPackage):
homepage = "https://github.com/ekalinin/nodeenv"
pypi = "nodeenv/nodeenv-1.3.3.tar.gz"
+ version("1.9.1", sha256="6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f")
version("1.8.0", sha256="d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2")
version("1.7.0", sha256="e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b")
version("1.3.3", sha256="ad8259494cf1c9034539f6cced78a1da4840a4b157e23640bc4a0c0546b0cb7a")
- depends_on("py-setuptools", when="@1.7:", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ # https://github.com/ekalinin/nodeenv/commit/c1dffc5c64377cfcda9f2befd357e4791903bf39
+ depends_on("python@:3.12", when="@:1.8")
+ depends_on("python +ssl", when="@1.5:")
+ depends_on("py-setuptools", when="@1.7:")
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-non-regression-test-tools/package.py b/var/spack/repos/builtin/packages/py-non-regression-test-tools/package.py
new file mode 100644
index 0000000000..2c76e2c956
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-non-regression-test-tools/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNonRegressionTestTools(PythonPackage):
+ """non regression test tools."""
+
+ homepage = "https://gitlab.com/Te_ch/non-regression-test-tools"
+ git = "https://gitlab.com/Te_ch/non-regression-test-tools.git"
+
+ maintainers("tech-91")
+
+ license("GPL-2.0-or-later")
+
+ version("develop", branch="develop")
+ version("main", branch="main")
+ version("1.1.6", tag="v1.1.6")
+ version("1.1.4", tag="v1.1.4")
+
+ depends_on("py-numpy", type="run")
+ depends_on("python@3.10:", type="run")
+ depends_on("py-setuptools@61:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-notebook/package.py b/var/spack/repos/builtin/packages/py-notebook/package.py
index 1f62831bfc..3c029772d6 100644
--- a/var/spack/repos/builtin/packages/py-notebook/package.py
+++ b/var/spack/repos/builtin/packages/py-notebook/package.py
@@ -38,8 +38,12 @@ class PyNotebook(PythonPackage):
version("4.0.4", sha256="a57852514bce1b1cf41fa0311f6cf894960cf68b083b55e6c408316b598d5648")
version("4.0.2", sha256="8478d7e2ab474855b0ff841f693983388af8662d3af1adcb861acb900274f22a")
- depends_on("python@3.7:", type=("build", "run"), when="@6.4:")
- depends_on("python@3.6:", type=("build", "run"), when="@6.3:")
+ with default_args(type=("build", "run")):
+ depends_on("python@3.7:", when="@6.4:")
+ depends_on("python@3.6:", when="@6.3:")
+ # import pipes in setupbase.py
+ depends_on("python@:3.12", when="@:6")
+
depends_on("py-jupyter-packaging@0.9:0", when="@6.4.1:", type="build")
depends_on("py-setuptools", when="@5:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-nugraph/package.py b/var/spack/repos/builtin/packages/py-nugraph/package.py
new file mode 100644
index 0000000000..e1e7852a3c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nugraph/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNugraph(PythonPackage):
+ """Graph Neural Network for neutrino physics event reconstruction"""
+
+ homepage = "https://github.com/nugraph/nugraph"
+ git = "https://github.com/nugraph/nugraph"
+ url = "https://github.com/nugraph/nugraph/archive/v24.7.1.tar.gz"
+ build_directory = "nugraph"
+
+ maintainers("vhewes")
+
+ license("MIT", checked_by="vhewes")
+
+ version("main", branch="main")
+ version("24.7.1", sha256="a51c0576ab969c404024b734e5507712e5a9d1d29e14077fee121415779c78f0")
+ version("24.7.0", sha256="7e44fbc1eb75a9302d57cabfffd559ddaddb44d0b7198168cbacbeed5e11dd7e")
+ version("24.4.0", sha256="927da53b28630921d31ca3b71676ef392b9ff847796b76d593239c6af9276b4c")
+ version("24.2.0", sha256="6ff9204bc0817619e7317e7a0d7ddfbea1842b261938f1718c3949539c8719df")
+ version("23.11.0", sha256="db77e0c723caf4ac9fb5c41d250aee1d03e623e861c73120b23aff194902bf09")
+ version("23.10.0", sha256="ee36625d5215406a199420d8fa262b720c5d191c0346d2b4aaab6808b47e80ad")
+
+ depends_on("py-flit-core", type="build")
+
+ depends_on("py-matplotlib")
+ depends_on("py-numl")
+ depends_on("py-pynvml")
+ depends_on("py-seaborn")
+ depends_on("py-pytorch-lightning")
+
+ extends("python")
diff --git a/var/spack/repos/builtin/packages/py-nuitka/package.py b/var/spack/repos/builtin/packages/py-nuitka/package.py
new file mode 100644
index 0000000000..c51300eafd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nuitka/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNuitka(PythonPackage):
+ """Nuitka is the Python compiler. It is written in Python. It is a
+ seamless replacement or extension to the Python interpreter and
+ compiles every construct that Python has, when itself run with that
+ Python version."""
+
+ homepage = "https://nuitka.net/"
+ pypi = "Nuitka/Nuitka-2.2.1.tar.gz"
+ git = "https://github.com/Nuitka/Nuitka.git"
+
+ license("Apache-2.0")
+
+ version("2.2.1", sha256="7bf67e80f94c93017fbaacfe1e277b92422d234a3c849a1555e43848f5fb27a1")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-ordered-set", type="build")
diff --git a/var/spack/repos/builtin/packages/py-numba/package.py b/var/spack/repos/builtin/packages/py-numba/package.py
index add71b169e..edab57b2c3 100644
--- a/var/spack/repos/builtin/packages/py-numba/package.py
+++ b/var/spack/repos/builtin/packages/py-numba/package.py
@@ -28,6 +28,11 @@ class PyNumba(PythonPackage):
version("0.50.1", sha256="89e81b51b880f9b18c82b7095beaccc6856fcf84ba29c4f0ced42e4e5748a3a7")
version("0.48.0", sha256="9d21bc77e67006b5723052840c88cc59248e079a907cc68f1a1a264e1eaba017")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("tbb", default=False, description="Build with Intel Threading Building Blocks")
+
depends_on("python@3.8:3.11", when="@0.57:", type=("build", "run"))
depends_on("python@3.7:3.10", when="@0.55:0.56", type=("build", "run"))
depends_on("python@3.7:3.9", when="@0.54", type=("build", "run"))
@@ -53,6 +58,12 @@ class PyNumba(PythonPackage):
depends_on("py-llvmlite@0.31", when="@0.48", type=("build", "run"))
depends_on("py-importlib-metadata", when="@0.56:^python@:3.8", type=("build", "run"))
+ depends_on("tbb", when="+tbb")
+ conflicts("~tbb", when="@:0.50") # No way to disable TBB
# Version 6.0.0 of llvm had a hidden symbol which breaks numba at runtime.
# See https://reviews.llvm.org/D44140
conflicts("^llvm@6.0.0")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("~tbb"):
+ env.set("NUMBA_DISABLE_TBB", "yes")
diff --git a/var/spack/repos/builtin/packages/py-numba4jax/package.py b/var/spack/repos/builtin/packages/py-numba4jax/package.py
new file mode 100644
index 0000000000..ab24f93237
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-numba4jax/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNumba4jax(PythonPackage):
+ """Use numba-compiled kernels from within Jax"""
+
+ homepage = "https://github.com/PhilipVinc/numba4jax"
+ pypi = "numba4jax/numba4jax-0.0.12.tar.gz"
+
+ license("MIT")
+
+ version("0.0.12", sha256="e1faf6a0566f4fb941abf8821b9c854b7398eb08a0c8157927f8b4717a393446")
+
+ with default_args(type="build"):
+ depends_on("py-hatchling@1.8.0:")
+ depends_on("py-hatch-vcs")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-numpy@1.22:1.23")
+ depends_on("py-numba@0.53:0.61")
+ depends_on("py-cffi@1.14.4:")
+ depends_on("py-jax@0.4.16:0.5")
+ depends_on("py-jaxlib@0.4.16:0.5")
diff --git a/var/spack/repos/builtin/packages/py-numcodecs/package.py b/var/spack/repos/builtin/packages/py-numcodecs/package.py
index 5414661794..15da017a92 100644
--- a/var/spack/repos/builtin/packages/py-numcodecs/package.py
+++ b/var/spack/repos/builtin/packages/py-numcodecs/package.py
@@ -22,14 +22,21 @@ class PyNumcodecs(PythonPackage):
license("MIT")
- version("master", branch="master", submodules=True)
+ version("main", branch="main", submodules=True)
+ version("master", branch="main", submodules=True, deprecated=True)
+ version("0.13.0", sha256="ba4fac7036ea5a078c7afe1d4dffeb9685080d42f19c9c16b12dad866703aa2e")
+ version("0.12.1", sha256="05d91a433733e7eef268d7e80ec226a0232da244289614a8f3826901aec1098e")
+ version("0.12.0", sha256="6388e5f4e94d18a7165fbd1c9d3637673b74157cff8bc644005f9e2a4c717d6e")
version("0.11.0", sha256="6c058b321de84a1729299b0eae4d652b2e48ea1ca7f9df0da65cb13470e635eb")
version("0.7.3", sha256="022b12ad83eb623ec53f154859d49f6ec43b15c36052fa864eaf2d9ee786dd85")
version("0.6.4", sha256="ef4843d5db4d074e607e9b85156835c10d006afc10e175bda62ff5412fca6e4d")
+ depends_on("c", type="build") # generated
+
variant("msgpack", default=False, description="Codec to encode data as msgpacked bytes.")
- depends_on("python@3.8:", when="@0.11:", type=("build", "link", "run"))
+ depends_on("python@3.10:", when="@0.13:", type=("build", "link", "run"))
+ depends_on("python@3.8:", when="@0.11:0.12", type=("build", "link", "run"))
depends_on("python@3.6:3", when="@0.7:0.10", type=("build", "link", "run"))
depends_on("py-setuptools@64:", when="@0.11:", type="build")
depends_on("py-setuptools@18.1:", type="build")
@@ -37,6 +44,8 @@ class PyNumcodecs(PythonPackage):
depends_on("py-setuptools-scm@1.5.5: +toml", type="build")
depends_on("py-cython", type="build")
depends_on("py-numpy@1.7:", type=("build", "run"))
+ # https://github.com/zarr-developers/numcodecs/issues/521
+ depends_on("py-numpy@:1", when="@:0.12.0", type=("build", "run"))
depends_on("py-py-cpuinfo", when="@0.11:", type="build")
depends_on("py-entrypoints", when="@0.10.1:0.11", type=("build", "run"))
depends_on("py-msgpack", type=("build", "run"), when="+msgpack")
diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py
index 9e340b58fc..adb2f75115 100644
--- a/var/spack/repos/builtin/packages/py-numexpr/package.py
+++ b/var/spack/repos/builtin/packages/py-numexpr/package.py
@@ -14,6 +14,8 @@ class PyNumexpr(PythonPackage):
license("MIT")
+ version("2.9.0", sha256="4df4163fcab20030137e8f2aa23e88e1e42e6fe702387cfd95d7675e1d84645e")
+ version("2.8.8", sha256="10b377c6ec6d9c01349d00e16dd82e6a6f4439c8c2b1945e490df1436c1825f5")
version("2.8.4", sha256="0e21addd25db5f62d60d97e4380339d9c1fb2de72c88b070c279776ee6455d10")
version("2.8.3", sha256="389ceefca74eff30ec3fd03fc4c3b7ab3df8f22d1f235117a392ce702ed208c0")
version("2.7.3", sha256="00d6b1518605afe0ed10417e0ff07123e5d531c02496c6eed7dd4b9923238e1e")
@@ -25,12 +27,18 @@ class PyNumexpr(PythonPackage):
version("2.5", sha256="4ca111a9a27c9513c2e2f5b70c0a84ea69081d7d8e4512d4c3f26a485292de0d")
version("2.4.6", sha256="2681faf55a3f19ba4424cc3d6f0a10610ebd49f029f8453f0ba64dd5c0fe4e0f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", when="@2.8.3:", type=("build", "run"))
+ depends_on("python@3.9:", when="@2.8.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.13.3:", type=("build", "run"), when="@2.8.3:")
+ depends_on("py-numpy@1.13.3:1.25", type=("build", "run"), when="@2.8.3:")
# https://github.com/pydata/numexpr/issues/397
depends_on("py-numpy@1.7:1.22", type=("build", "run"), when="@:2.7")
+ # https://github.com/pydata/numexpr/pull/478
+ depends_on("py-numpy@:1", when="@:2.9", type=("build", "run"))
# Historical dependencies
depends_on("py-packaging", type=("build", "run"), when="@2.8.3")
diff --git a/var/spack/repos/builtin/packages/py-numexpr3/package.py b/var/spack/repos/builtin/packages/py-numexpr3/package.py
index 5162eca2a3..478ec2c5cb 100644
--- a/var/spack/repos/builtin/packages/py-numexpr3/package.py
+++ b/var/spack/repos/builtin/packages/py-numexpr3/package.py
@@ -24,6 +24,9 @@ class PyNumexpr3(PythonPackage):
license("BSD-3-Clause")
version("3.0.1a1", sha256="de06f1b4206704b5bc19ea09b5c94350b97c211c26bc866f275252a8461b87e6")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# TODO: Add CMake build system for better control of passing flags related
# to CPU ISA.
diff --git a/var/spack/repos/builtin/packages/py-numl/package.py b/var/spack/repos/builtin/packages/py-numl/package.py
new file mode 100644
index 0000000000..af7e003e92
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-numl/package.py
@@ -0,0 +1,42 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNuml(PythonPackage):
+ """Standardised ML input processing for particle physics"""
+
+ homepage = "https://github.com/nugraph/nugraph"
+ git = "https://github.com/nugraph/nugraph"
+ url = "https://github.com/nugraph/nugraph/archive/v24.7.1.tar.gz"
+ build_directory = "pynuml"
+
+ maintainers("vhewes")
+
+ license("MIT", checked_by="vhewes")
+
+ version("main", branch="main")
+ version("24.7.1", sha256="a51c0576ab969c404024b734e5507712e5a9d1d29e14077fee121415779c78f0")
+ version("24.7.0", sha256="7e44fbc1eb75a9302d57cabfffd559ddaddb44d0b7198168cbacbeed5e11dd7e")
+ version("24.4.0", sha256="927da53b28630921d31ca3b71676ef392b9ff847796b76d593239c6af9276b4c")
+ version("24.2.0", sha256="6ff9204bc0817619e7317e7a0d7ddfbea1842b261938f1718c3949539c8719df")
+ version("23.11.0", sha256="db77e0c723caf4ac9fb5c41d250aee1d03e623e861c73120b23aff194902bf09")
+ version("23.10.0", sha256="ee36625d5215406a199420d8fa262b720c5d191c0346d2b4aaab6808b47e80ad")
+ version("23.9.0", sha256="2cc77356a1061b7271c3c5da69009f0d2ef0df09a18ab6466049ea901231909c")
+ version("23.7.0", sha256="8598f65b7fcc76fc3f0f41f7ca44bfb134daa627693f1ada61c8106b26db4d84")
+ version("23.6.1", sha256="74c41b34eba1d80548a0ec1b36aee5948f3ee0e9df80d6864b38aed99964263c")
+ version("23.6.0", sha256="93ebbaf0a55e22d06fc06e8a93e29a0e875985f4b3801d391db853d1fceb3d6c")
+
+ depends_on("py-flit-core", type="build")
+
+ depends_on("mpich")
+ depends_on("py-h5py +mpi")
+ depends_on("py-pandas")
+ depends_on("py-particle")
+ depends_on("py-plotly")
+ depends_on("py-torch-geometric")
+
+ extends("python")
diff --git a/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py b/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py
index fffb983756..e4dbee34d1 100644
--- a/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy-quaternion/package.py
@@ -17,19 +17,32 @@ class PyNumpyQuaternion(PythonPackage):
C for speed."""
homepage = "https://github.com/moble/quaternion"
- pypi = "numpy-quaternion/numpy-quaternion-2021.11.4.15.26.3.tar.gz"
+ pypi = "numpy-quaternion/numpy_quaternion-2024.0.3.tar.gz"
license("MIT")
+ version("2024.0.3", sha256="cf39a8a4506eeda297ca07a508c10c08b3487df851a0e34f070a7bf8fab9f290")
version(
"2021.11.4.15.26.3",
sha256="b0dc670b2adc8ff2fb8d6105a48769873f68d6ccbe20af6a19e899b1e8d48aaf",
+ url="https://pypi.io/packages/source/n/numpy-quaternion/numpy-quaternion-2021.11.4.15.26.3.tar.gz",
)
+ depends_on("c", type="build") # generated
+
variant("scipy", default=True, description="Build with scipy support")
variant("numba", default=True, description="Build with numba support")
+ depends_on("python@3.10:", when="@2024:")
+
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@0.61:", type="build", when="@2024:")
+ depends_on("py-hatchling", type="build", when="@2024:")
+
depends_on("py-numpy@1.13:", type=("build", "run"))
+ depends_on("py-numpy@2", type=("build"), when="@2024:")
+ depends_on("py-numpy@1.25:2", type=("run"), when="@2024:")
depends_on("py-scipy", type=("build", "run"), when="+scipy")
+ depends_on("py-scipy@1.5:1", type=("build", "run"), when="@2024:+scipy")
depends_on("py-numba", type=("build", "run"), when="+numba")
+ depends_on("py-numba@0.55:", type=("build", "run"), when="@2024:+numba")
diff --git a/var/spack/repos/builtin/packages/py-numpy-stl/package.py b/var/spack/repos/builtin/packages/py-numpy-stl/package.py
index 827b524162..559fa83fd4 100644
--- a/var/spack/repos/builtin/packages/py-numpy-stl/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy-stl/package.py
@@ -17,6 +17,8 @@ class PyNumpyStl(PythonPackage):
version("3.0.0", sha256="578b78eacb0529ac9aba2f17dcc363d58c7c3c5708710c18f8c1e9965f2e81ac")
version("2.10.1", sha256="f6b529b8a8112dfe456d4f7697c7aee0aca62be5a873879306afe4b26fca963c")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index cf26fe4209..b90e044306 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -22,6 +22,14 @@ class PyNumpy(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("2.1.2", sha256="13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c")
+ version("2.1.1", sha256="d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd")
+ version("2.1.0", sha256="7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2")
+ version("2.0.2", sha256="883c987dee1880e2a864ab0dc9892292582510604156762362d9326444636e78")
+ version("2.0.1", sha256="485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3")
+ version("2.0.0", sha256="cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864")
+ version("1.26.4", sha256="2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010")
+ version("1.26.3", sha256="697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4")
version("1.26.2", sha256="f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea")
version("1.26.1", sha256="c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe")
version("1.26.0", sha256="f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf")
@@ -71,41 +79,56 @@ class PyNumpy(PythonPackage):
version("1.17.4", sha256="f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316")
version("1.17.3", sha256="a0678793096205a4d784bd99f32803ba8100f639cf3b932dc63b21621390ea7e")
- depends_on("python@3.9:3.12", when="@1.26:", type=("build", "link", "run"))
- depends_on("python@3.9:3.11", when="@1.25", type=("build", "link", "run"))
- depends_on("python@3.8:3.11", when="@1.23.2:1.24", type=("build", "link", "run"))
- depends_on("python@3.8:3.10", when="@1.22:1.23.1", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@1.21.2:1.21", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@1.19.3:1.21.1", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@1.17.3:1.19.2", type=("build", "link", "run"))
-
- depends_on("py-cython@0.29.34:3", when="@1.26:", type="build")
- depends_on("py-cython@0.29.34:2", when="@1.25", type="build")
- depends_on("py-cython@0.29.30:2", when="@1.22.4:1.24", type="build")
- depends_on("py-cython@0.29.24:2", when="@1.21.2:1.22.3", type="build")
- depends_on("py-cython@0.29.21:2", when="@1.19.1:1.21.1", type="build")
- depends_on("py-cython@0.29.14:2", when="@1.18.1:1.19.0", type="build")
- depends_on("py-cython@0.29.13:2", when="@1.18.0", type="build")
- depends_on("py-pyproject-metadata@0.7.1:", when="@1.26:", type="build")
- depends_on("py-tomli@1:", when="@1.26: ^python@:3.10", type="build")
- depends_on("py-setuptools@60:", when="@1.26: ^python@3.12:", type="build")
- # https://github.com/spack/spack/pull/32078
- depends_on("py-setuptools@:63", when="@:1.25", type=("build", "run"))
- depends_on("py-setuptools@:59", when="@:1.22.1", type=("build", "run"))
- depends_on("py-colorama", when="@1.26: platform=windows", type="build")
-
- # Required to use --config-settings
- depends_on("py-pip@23.1:", when="@1.26:", type="build")
- # meson is vendored, ninja and pkgconfig are not
- depends_on("ninja@1.8.2:", when="@1.26:", type="build")
- depends_on("pkgconfig", when="@1.26:", type="build")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.10:3.13", when="@2.1:")
+ depends_on("python@3.9:3.12", when="@1.26:2.0")
+ depends_on("python@3.9:3.11", when="@1.25")
+ depends_on("python@3.8:3.11", when="@1.23.2:1.24")
+ depends_on("python@3.8:3.10", when="@1.22:1.23.1")
+ depends_on("python@:3.10", when="@1.21.2:1.21")
+ depends_on("python@:3.9", when="@1.19.3:1.21.1")
+ depends_on("python@:3.8", when="@1.17.3:1.19.2")
+
+ with default_args(type="build"):
+ # Required to use --config-settings
+ depends_on("py-pip@23.1:", when="@1.26:")
+
+ # Build dependencies (do not include upper bound unless known issues)
+ depends_on("py-cython@3.0.6:", when="@2:")
+ depends_on("py-cython@0.29.34:", when="@1.26:")
+ depends_on("py-cython@0.29.34:2", when="@1.25")
+ depends_on("py-cython@0.29.30:2", when="@1.22.4:1.24")
+ depends_on("py-cython@0.29.24:2", when="@1.21.2:1.22.3")
+ depends_on("py-cython@0.29.21:2", when="@1.19.1:1.21.1")
+ depends_on("py-cython@0.29.14:2", when="@1.18.1:1.19.0")
+ depends_on("py-cython@0.29.13:2", when="@1.18.0")
+ depends_on("py-meson-python@0.15:", when="@1.26.4:")
+
depends_on("blas")
depends_on("lapack")
- # test_requirements.txt
- depends_on("py-pytest", type="test")
- depends_on("py-hypothesis", when="@1.19:", type="test")
- depends_on("py-typing-extensions@4.2:", when="@1.23:", type="test")
+ # requirements/test_requirements.txt
+ with default_args(type="test"):
+ depends_on("py-pytest")
+ depends_on("py-hypothesis", when="@1.19:")
+ depends_on("py-typing-extensions@4.2:", when="@1.23:")
+
+ # Historical dependencies
+ with default_args(type="build"):
+ depends_on("py-pyproject-metadata@0.7.1:", when="@1.26.0:1.26.3")
+ depends_on("py-tomli@1:", when="@1.26.0:1.26.3 ^python@:3.10")
+ depends_on("py-setuptools@60:", when="@1.26.0:1.26.3 ^python@3.12:")
+ depends_on("py-colorama", when="@1.26.0:1.26.3 platform=windows")
+ depends_on("ninja@1.8.2:", when="@1.26.0:1.26.3")
+ depends_on("pkgconfig", when="@1.26.0:1.26.3")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-setuptools@:63", when="@:1.25")
+ depends_on("py-setuptools@:59", when="@:1.22.1")
# Add Fujitsu Fortran compiler
patch("add_fj_compiler.patch", when="@1.19.3:1.19.5%fj")
@@ -130,9 +153,20 @@ class PyNumpy(PythonPackage):
when="@1.22.0:1.22.3",
)
+ # Patch to fix AVX512 build flags on Intel Classic Compiler
+ # See https://github.com/spack/spack/issues/42204
+ # Numpy before 1.26 did not use meson, so the patch does not work for older versions
+ with when("%intel"):
+ patch(
+ "https://github.com/numpy/numpy/commit/953cc2dfc0f0e063a01778d1392c931d9031c469.patch?full_index=1",
+ sha256="fe42a018a69cfafb7c4efc183a7c73835a298e45a8f9a585cb411170871ff596",
+ when="@1.26:1.26.3",
+ )
+
# meson.build
# https://docs.scipy.org/doc/scipy/dev/toolchain.html#compilers
conflicts("%gcc@:8.3", when="@1.26:", msg="NumPy requires GCC >= 8.4")
+ conflicts("%gcc@:6.4", when="@1.23:", msg="NumPy requires GCC >= 6.5")
conflicts("%gcc@:4.7", msg="NumPy requires GCC >= 4.8")
conflicts(
"%msvc@:19.19",
@@ -151,6 +185,8 @@ class PyNumpy(PythonPackage):
# See https://github.com/numpy/numpy/issues/22011
conflicts("%intel", when="@1.23.0:1.23.3")
conflicts("%oneapi", when="@1.23.0:1.23.3")
+ # https://github.com/spack/spack/pull/44735
+ conflicts("%oneapi", when="@2:")
@property
def archive_files(self):
@@ -340,42 +376,36 @@ class PyNumpy(PythonPackage):
if "^netlib-lapack" in spec or "^cray-libsci" in spec:
# netlib and Cray require blas and lapack listed
# separately so that scipy can find them
- if spec.satisfies("+blas"):
- f.write("[blas]\n")
- f.write("libraries = {0}\n".format(blas_lib_names))
- write_library_dirs(f, blas_lib_dirs)
- f.write("include_dirs = {0}\n".format(blas_header_dirs))
- if spec.satisfies("+lapack"):
- f.write("[lapack]\n")
- f.write("libraries = {0}\n".format(lapack_lib_names))
- write_library_dirs(f, lapack_lib_dirs)
- f.write("include_dirs = {0}\n".format(lapack_header_dirs))
+ f.write("[blas]\n")
+ f.write("libraries = {0}\n".format(blas_lib_names))
+ write_library_dirs(f, blas_lib_dirs)
+ f.write("include_dirs = {0}\n".format(blas_header_dirs))
+ f.write("[lapack]\n")
+ f.write("libraries = {0}\n".format(lapack_lib_names))
+ write_library_dirs(f, lapack_lib_dirs)
+ f.write("include_dirs = {0}\n".format(lapack_header_dirs))
if "^fujitsu-ssl2" in spec:
- if spec.satisfies("+blas"):
- f.write("[blas]\n")
- f.write("libraries = {0}\n".format(spec["blas"].libs.names[0]))
- write_library_dirs(f, blas_lib_dirs)
- f.write("include_dirs = {0}\n".format(blas_header_dirs))
- f.write("extra_link_args = {0}\n".format(self.spec["blas"].libs.ld_flags))
- if spec.satisfies("+lapack"):
- f.write("[lapack]\n")
- f.write("libraries = {0}\n".format(spec["lapack"].libs.names[0]))
- write_library_dirs(f, lapack_lib_dirs)
- f.write("include_dirs = {0}\n".format(lapack_header_dirs))
- f.write("extra_link_args = {0}\n".format(self.spec["lapack"].libs.ld_flags))
+ f.write("[blas]\n")
+ f.write("libraries = {0}\n".format(spec["blas"].libs.names[0]))
+ write_library_dirs(f, blas_lib_dirs)
+ f.write("include_dirs = {0}\n".format(blas_header_dirs))
+ f.write("extra_link_args = {0}\n".format(self.spec["blas"].libs.ld_flags))
+ f.write("[lapack]\n")
+ f.write("libraries = {0}\n".format(spec["lapack"].libs.names[0]))
+ write_library_dirs(f, lapack_lib_dirs)
+ f.write("include_dirs = {0}\n".format(lapack_header_dirs))
+ f.write("extra_link_args = {0}\n".format(self.spec["lapack"].libs.ld_flags))
if "^armpl-gcc" in spec or "^acfl" in spec:
- if spec.satisfies("+blas"):
- f.write("[blas]\n")
- f.write("libraries = {0}\n".format(blas_lib_names))
- write_library_dirs(f, blas_lib_dirs)
- f.write("include_dirs = {0}\n".format(blas_header_dirs))
- if spec.satisfies("+lapack"):
- f.write("[lapack]\n")
- f.write("libraries = {0}\n".format(lapack_lib_names))
- write_library_dirs(f, lapack_lib_dirs)
- f.write("include_dirs = {0}\n".format(lapack_header_dirs))
+ f.write("[blas]\n")
+ f.write("libraries = {0}\n".format(blas_lib_names))
+ write_library_dirs(f, blas_lib_dirs)
+ f.write("include_dirs = {0}\n".format(blas_header_dirs))
+ f.write("[lapack]\n")
+ f.write("libraries = {0}\n".format(lapack_lib_names))
+ write_library_dirs(f, lapack_lib_dirs)
+ f.write("include_dirs = {0}\n".format(lapack_header_dirs))
@when("@:1.25")
@run_before("install")
@@ -384,9 +414,11 @@ class PyNumpy(PythonPackage):
@when("@1.26:")
def setup_build_environment(self, env):
- # https://github.com/scipy/scipy/issues/19357
- if self.spec.satisfies("%apple-clang@15:"):
- env.append_flags("LDFLAGS", "-Wl,-ld_classic")
+ if self.spec.satisfies("%msvc"):
+ # For meson build system, compiler paths must be in quotes
+ # to prevent paths from being split by spaces.
+ env.set("CC", f'"{self.compiler.cc}"')
+ env.set("CXX", f'"{self.compiler.cxx}"')
@when("@:1.25")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/py-nvidia-dali/package.py b/var/spack/repos/builtin/packages/py-nvidia-dali/package.py
index b67fe5c01e..248d78fc49 100644
--- a/var/spack/repos/builtin/packages/py-nvidia-dali/package.py
+++ b/var/spack/repos/builtin/packages/py-nvidia-dali/package.py
@@ -16,160 +16,210 @@ class PyNvidiaDali(PythonPackage):
homepage = "https://developer.nvidia.com/dali"
url = "https://developer.download.nvidia.com/compute/redist/"
+ skip_version_audit = ["platform=darwin", "platform=windows"]
+
maintainers("thomas-bouvier")
system = platform.system().lower()
arch = platform.machine()
if "linux" in system and arch == "x86_64":
version(
+ "1.41.0-cuda120",
+ sha256="240b4135e7c71c5f669d2f2970fa350f7ad1a0a4aab588a3ced578f9b6d7abd9",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.41.0-17427117-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
+ )
+ version(
+ "1.41.0.cuda110",
+ sha256="6b12993384b694463c651a6c22621e6982b8834946eefcc864ab061b5c6e972e",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.41.0-17427118-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
+ )
+ version(
+ "1.36.0-cuda120",
+ sha256="9a7754aacb245785462592aec89cbaec72e0a84d84399a061a563546bbf44805",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.36.0-13435171-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
+ )
+ version(
+ "1.36.0-cuda110",
+ sha256="aa0e4a6def4b25ec1110e3488b020bc9997e0fde376a123e0b6414fc16684673",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.36.0-13435172-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
+ )
+ version(
"1.27.0-cuda120",
sha256="d8def4361bd9f888ddac3e2316b9eb89ee216f280c0973be12b8e1061d1ff108",
- expand=False,
- preferred=True,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.27.0-8625314-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.27.0-cuda110",
sha256="9edf5097787cb1bbbbabc291d814bf367c5f5a986cffa101205fe31c86418a66",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.27.0-8625303-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.26.0-cuda120",
sha256="784dbad4e4e1399b4d2f51bfa1a01e3e23f6fb37e8f327cf136df9c1b5fb8470",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.26.0-8269288-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.26.0-cuda110",
sha256="545b56c104def627d6c2ead747875eaadba2e12610850b4480f718dc3e8a9177",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.26.0-8269290-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.25.0-cuda120",
sha256="72591f0db9fe6dd82035b2b6cc41aed478e48656ba99e81344a9cb59123710aa",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.25.0-7922358-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.25.0-cuda110",
sha256="9901cfa0f67674e5d2b77dbd90d3506b42390d12fc5996593fd395c0370ea46f",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.25.0-7922357-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.24.0-cuda120",
sha256="f280fba3e917a0c47e705fa488c6d53e5c50629b3664fe6cf95d0913213f3b13",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.24.0-7582307-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.24.0-cuda110",
sha256="5988317a5f17fdefa9254bebb6f8dc344c2b0bd958badf6688172e537d324d60",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.24.0-7582302-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.23.0-cuda120",
sha256="d10a14074df6cdd38adb1181785372ab8ace677323fdf62d2bc07e28a8469ef0",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.23.0-7355174-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.23.0-cuda110",
sha256="ede8245d3f7df181abdc5c5109a79be1ba9b6d888ca9f693f62db2c95efad267",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.23.0-7355173-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.22.0-cuda120",
sha256="6cbd9e3139d4c203f61f960f5ad1fc4b461621a60b7fa7ef0ba6d77c780b35f4",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.22.0-6971317-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
version(
"1.22.0-cuda110",
sha256="8c3ccc7eddc1f63d3f858448c5c384ab129273e0c140e091aca2a98d48c5a80c",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.22.0-6988993-py3-none-manylinux2014_x86_64.whl",
+ expand=False,
)
elif "linux" in system and arch == "aarch64":
version(
+ "1.41.0-cuda120",
+ sha256="5b9eddcd6433244a1c5bec44db71c5dccede7d81f929711c634c4d79f6ce5f81",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.41.0-17427117-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
+ )
+ version(
+ "1.41.0-cuda110",
+ sha256="7ec004a65ea7c1bd1272f27b3a5aea9f0d74e95e5d54523db2fabbf8b6efedc9",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.41.0-17427118-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
+ )
+ version(
+ "1.36.0-cuda120",
+ sha256="575ae1ff9b7633c847182163e2d339f2bdafe8dd0ca4ca6e3092a02890f803c2",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.36.0-13435171-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
+ )
+ version(
+ "1.36.0-cuda110",
+ sha256="505301223134b7efd8522a949f9b33725701579a775c9abcdd8b11f1118cec3a",
+ url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.36.0-13435172-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
+ )
+ version(
"1.27.0-cuda120",
sha256="57700656c4dd411497d3f8c690d409c71d6a8e9c2cc5e70499098dd0a01fd56b",
- expand=False,
- preferred=True,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.27.0-8625314-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.27.0-cuda110",
sha256="8c28429f979c3fcb45f40f08efdae4b6ed3f4743634d41722a6c94d18c4cd995",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.27.0-8625303-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.26.0-cuda120",
sha256="9672969cab3d1a009b9e2bf3b139aec06af46f67a45a128098f8279736848079",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.26.0-8269288-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.26.0-cuda110",
sha256="e90fcb896cc0ee22a0fa5476a8fde8227412683796367334636c3f844e208975",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.26.0-8269290-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.25.0-cuda120",
sha256="f497ce8bf0df83e5c72b393a621d910bc712c6cdc4bbba6db50cf1cbc47d881b",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.25.0-7922358-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.25.0-cuda110",
sha256="2eb94223ac980658606af6a56720ce963f4fd877c1291d08517f82ce435b4155",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.25.0-7922357-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.24.0-cuda120",
sha256="2a7fab1d94b23edde1cee5b93918aca6b86417e3ffb4544adcb9961c73375014",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.24.0-7582307-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.24.0-cuda110",
sha256="84711689dacc787dfd90bfc66da7ce4b1884a006b763109e9ecf0b07aefacbc2",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.24.0-7582302-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.23.0-cuda120",
sha256="911d16b40c95b8cc700d3c96b40d3144953e7ffbb191ec22a75990c76cf638c3",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.23.0-7355174-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.23.0-cuda110",
sha256="ca58f2990825d18736c872f48d3f5e5dbda8de136ab6339f1f9f6984d7b3dffe",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.23.0-7355173-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.22.0-cuda120",
sha256="5e496eebeba3bc1cddd18e081c8c45121283478931cbe9b64912d2394d0942ca",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda120/nvidia_dali_cuda120-1.22.0-6971317-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
version(
"1.22.0-cuda110",
sha256="0da47629fec01abf418fda0eeb393998820e40f6fae6b4c7d3e625aa4cdba6bd",
- expand=False,
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda110/nvidia_dali_cuda110-1.22.0-6988993-py3-none-manylinux2014_aarch64.whl",
+ expand=False,
)
cuda120_versions = (
+ "@1.41.0-cuda120",
+ "@1.36.0-cuda120",
"@1.27.0-cuda120",
"@1.26.0-cuda120",
"@1.25.0-cuda120",
@@ -178,6 +228,8 @@ class PyNvidiaDali(PythonPackage):
"@1.22.0-cuda120",
)
cuda110_versions = (
+ "@1.41.0-cuda110",
+ "@1.36.0-cuda110",
"@1.27.0-cuda110",
"@1.26.0-cuda110",
"@1.25.0-cuda110",
@@ -191,7 +243,8 @@ class PyNvidiaDali(PythonPackage):
for v in cuda110_versions:
depends_on("cuda@11", when=v, type=("build", "run"))
- depends_on("python@3.6:3.11", when="@1.23:", type=("build", "run"))
+ depends_on("python@3.8:3.12", when="@1.36:", type=("build", "run"))
+ depends_on("python@3.6:3.11", when="@1.23:1.27", type=("build", "run"))
depends_on("python@3.6:3.10", when="@:1.22", type=("build", "run"))
depends_on("py-astunparse@1.6.0:", type=("build", "run"))
depends_on("py-gast@0.3.3:", when="@1.27:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-nvidia-modulus/package.py b/var/spack/repos/builtin/packages/py-nvidia-modulus/package.py
new file mode 100644
index 0000000000..c0a998fbc9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nvidia-modulus/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNvidiaModulus(PythonPackage):
+ """A deep learning framework for AI-driven multi-physics systems."""
+
+ homepage = "https://github.com/NVIDIA/modulus"
+ url = "https://github.com/NVIDIA/modulus/archive/refs/tags/v0.5.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.5.0", sha256="ff2c7d47227b8cba59b075cac89599f8c1ec7cde60fd2db6e6874d0143828832")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch@2.0.0:")
+ # Remove upper bound on numpy version
+ # https://github.com/NVIDIA/modulus/issues/383
+ depends_on("py-numpy@1.22.4:")
+ depends_on("py-xarray@2023.1.0:")
+ depends_on("py-zarr@2.14.2:")
+ depends_on("py-fsspec@2023.1.0:")
+ depends_on("py-s3fs@2023.5.0:")
+ depends_on("py-nvidia-dali@1.16.0:")
+ depends_on("py-setuptools@67.6.0:")
+ depends_on("py-certifi@2023.7.22:")
+ depends_on("py-pytz@2023.3:")
+ depends_on("py-treelib@1.2.5:")
+ depends_on("py-tqdm@4.60.0:")
+ depends_on("py-nvtx@0.2.8:")
diff --git a/var/spack/repos/builtin/packages/py-nvtx/package.py b/var/spack/repos/builtin/packages/py-nvtx/package.py
new file mode 100644
index 0000000000..b4d653d345
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nvtx/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyNvtx(PythonPackage):
+ """PyNVTX - Python code annotation library."""
+
+ homepage = "https://github.com/NVIDIA/nvtx"
+ pypi = "nvtx/nvtx-0.2.10.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.2.10", sha256="58b89cd69079fda1ceef8441eec5c5c189d6a1ff94c090a3afe03aedd0bbd140")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-cython", type="build")
+ depends_on("nvtx")
diff --git a/var/spack/repos/builtin/packages/py-oauthlib/package.py b/var/spack/repos/builtin/packages/py-oauthlib/package.py
index afb835bcfa..c45867f69c 100644
--- a/var/spack/repos/builtin/packages/py-oauthlib/package.py
+++ b/var/spack/repos/builtin/packages/py-oauthlib/package.py
@@ -17,6 +17,7 @@ class PyOauthlib(PythonPackage):
license("BSD-3-Clause")
+ version("3.2.2", sha256="9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918")
version("3.2.1", sha256="1565237372795bf6ee3e5aba5e2a85bd5a65d0e2aa5c628b9a97b7d7a0da3721")
version("3.1.1", sha256="8f0215fcc533dd8dd1bee6f4c412d4f0cd7297307d43ac61666389e3bc3198a3")
version("3.1.0", sha256="bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889")
diff --git a/var/spack/repos/builtin/packages/py-obspy/package.py b/var/spack/repos/builtin/packages/py-obspy/package.py
new file mode 100644
index 0000000000..956b80e830
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-obspy/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyObspy(PythonPackage):
+ """ObsPy is an open-source project dedicated to provide a Python
+ framework for processing seismological data"""
+
+ homepage = "https://github.com/obspy/obspy"
+ pypi = "obspy/obspy-1.4.0.tar.gz"
+
+ maintainers("snehring")
+
+ license("LGPL-3.0-only", checked_by="snehring")
+
+ version("1.4.1", sha256="9cf37b0ce03de43d80398703c006bfddbd709f32e8460a9404b27df998d3f747")
+ version("1.4.0", sha256="336a6e1d9a485732b08173cb5dc1dd720a8e53f3b54c180a62bb8ceaa5fe5c06")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("python@3.8:3", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@1.20:", type=("build", "run"))
+ # importing hann from scipy.signal is deprecated, removed in 1.13
+ # to be fixed in 1.4.1
+ depends_on("py-scipy@1.7:1", type=("build", "run"), when="@1.4.1:")
+ depends_on("py-scipy@1.7:1.12.0", type=("build", "run"), when="@1.4.0")
+ depends_on("py-matplotlib@3.3:", type=("build", "run"))
+ depends_on("py-lxml", type=("build", "run"))
+ depends_on("py-sqlalchemy", type=("build", "run"))
+ depends_on("py-decorator", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-okada-wrapper/package.py b/var/spack/repos/builtin/packages/py-okada-wrapper/package.py
new file mode 100644
index 0000000000..5d404f4677
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-okada-wrapper/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOkadaWrapper(PythonPackage):
+ """Python and MATLAB wrappers for the Okada Green's function codes"""
+
+ homepage = "https://github.com/tbenthompson/okada_wrapper"
+ pypi = "okada_wrapper/okada_wrapper-18.12.07.3.tar.gz"
+
+ maintainers("snehring")
+
+ license("MIT", checked_by="snehring")
+
+ version(
+ "18.12.07.3", sha256="ee296ad6e347c8df400f6f3d1badc371925add8d1af33854634c2fe1a2b2c855"
+ )
+
+ depends_on("fortran", type="build") # generated
+
+ # https://github.com/tbenthompson/okada_wrapper/issues/8
+ depends_on("python@3:3.11", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-olcf-velocity/package.py b/var/spack/repos/builtin/packages/py-olcf-velocity/package.py
new file mode 100644
index 0000000000..6a36cb6049
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-olcf-velocity/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOlcfVelocity(PythonPackage):
+ """A tool to help with the maintenance of container build scripts on multiple systems,
+ backends (e.g podman or apptainer) and distros."""
+
+ homepage = "https://olcf.github.io/velocity/index.html"
+ pypi = "olcf_velocity/olcf_velocity-0.1.3.tar.gz"
+
+ maintainers("AcerP-py")
+
+ license("UNKNOWN", checked_by="AcerP-py")
+
+ version("0.1.3", sha256="08bd82d464e8cab6c61cab095d460b927a18e082cadb663bd5f935cf651b5c03")
+
+ depends_on("python@3.10:", type=("build", "run"))
+
+ depends_on("py-pyyaml", type="run")
+ depends_on("py-networkx", type="run")
+ depends_on("py-colorama", type="run")
+ depends_on("py-loguru", type="run")
+ depends_on("py-typing-extensions", type="run")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-onnx-opcounter/package.py b/var/spack/repos/builtin/packages/py-onnx-opcounter/package.py
new file mode 100644
index 0000000000..5c2408346b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-onnx-opcounter/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOnnxOpcounter(PythonPackage):
+ """ONNX flops / params counter."""
+
+ homepage = "https://github.com/gmalivenko/onnx-opcounter"
+ pypi = "onnx_opcounter/onnx_opcounter-0.0.3.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.0.3", sha256="c75e76d066eb777e4855c486beb402b1fef83783a6634237b8ca20eb75cce8c9")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy")
+ depends_on("py-onnx")
+ depends_on("py-onnxruntime")
diff --git a/var/spack/repos/builtin/packages/py-onnx/package.py b/var/spack/repos/builtin/packages/py-onnx/package.py
index 3b0044e57c..6ce7596a8d 100644
--- a/var/spack/repos/builtin/packages/py-onnx/package.py
+++ b/var/spack/repos/builtin/packages/py-onnx/package.py
@@ -19,8 +19,14 @@ class PyOnnx(PythonPackage):
homepage = "https://github.com/onnx/onnx"
pypi = "Onnx/onnx-1.6.0.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("1.16.2", sha256="b33a282b038813c4b69e73ea65c2909768e8dd6cc10619b70632335daf094646")
+ version("1.16.1", sha256="8299193f0f2a3849bfc069641aa8e4f93696602da8d165632af8ee48ec7556b6")
+ version("1.16.0", sha256="237c6987c6c59d9f44b6136f5819af79574f8d96a760a1fa843bede11f3822f7")
+ version("1.15.0", sha256="b18461a7d38f286618ca2a6e78062a2a9c634ce498e631e708a8041b00094825")
+ version("1.14.1", sha256="70903afe163643bd71195c78cedcc3f4fa05a2af651fd950ef3acbb15175b2d1")
+ version("1.14.0", sha256="43b85087c6b919de66872a043c7f4899fe6f840e11ffca7e662b2ce9e4cc2927")
version("1.13.1", sha256="0bdcc25c2c1ce4a8750e4ffbd93ae945442e7fac6e51176f38e366b74a97dfd9")
version("1.13.0", sha256="410b39950367857f97b65093681fe2495a2e23d63777a8aceaf96c56a16d166e")
version("1.12.0", sha256="13b3e77d27523b9dbf4f30dfc9c959455859d5e34e921c44f712d69b8369eff9")
@@ -30,30 +36,66 @@ class PyOnnx(PythonPackage):
version("1.6.0", sha256="3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345")
version("1.5.0", sha256="1a584a4ef62a6db178c257fffb06a9d8e61b41c0a80bfd8bcd8a253d72c4b0b4")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ # CMakeLists.txt
+ depends_on("cmake@3.1:", type="build")
+ depends_on("py-pybind11@2.2:", type=("build", "link"))
+
+ # requirements.txt
+ depends_on("py-setuptools@64:", type="build")
depends_on("py-setuptools", type="build")
depends_on("protobuf")
- depends_on("py-protobuf+cpp", type=("build", "run"))
+ depends_on("py-protobuf@3.20.2:", type=("build", "run"), when="@1.15:")
+ depends_on("py-protobuf@3.20.2:3", type=("build", "run"), when="@1.13")
+ depends_on("py-protobuf@3.12.2:3.20.1", type=("build", "run"), when="@1.12")
+ depends_on("py-protobuf@3.12.2:", type=("build", "run"), when="@1.11")
+ # https://github.com/protocolbuffers/protobuf/issues/10051
+ # https://github.com/onnx/onnx/issues/4222
+ depends_on("py-protobuf@:3", type=("build", "run"), when="@1.10")
# Protobuf version limit is due to removal of SetTotalBytesLimit in
# https://github.com/protocolbuffers/protobuf/pull/8794, fixed in
# https://github.com/onnx/onnx/pull/3112
- depends_on("protobuf@:3.17", when="@:1.8")
- depends_on("py-protobuf@:3.17", when="@:1.8", type=("build", "run"))
- # https://github.com/protocolbuffers/protobuf/issues/10051
- # https://github.com/onnx/onnx/issues/4222
- depends_on("protobuf@:3", when="@1.10.1")
- depends_on("py-protobuf@:3", type=("build", "run"), when="@1.10.1")
- depends_on("protobuf@3.12.2:", when="@1.11.0")
- depends_on("py-protobuf@3.12.2:", type=("build", "run"), when="@1.11.0")
- depends_on("protobuf@3.12.2:3.20.1", when="@1.12.0")
- depends_on("py-protobuf@3.12.2:3.20.1", type=("build", "run"), when="@1.12.0")
- depends_on("protobuf@3.20.2:3", when="@1.13.0:")
- depends_on("py-protobuf@3.20.2:3", type=("build", "run"), when="@1.13.0:")
+ depends_on("py-protobuf@:3.17", type=("build", "run"), when="@:1.8")
depends_on("py-numpy", type=("build", "run"))
- depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@1.8.1:")
+ depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@1.8.1:1.13")
+ depends_on("py-numpy@1.20:", type=("build", "run"), when="@1.16.0:")
+ depends_on("py-numpy@1.21:", type=("build", "run"), when="@1.16.2:")
+ depends_on("py-numpy@:1", type=("build", "run"), when="@:1.16")
+
+ # Historical dependencies
depends_on("py-six", type=("build", "run"), when="@:1.8.1")
- depends_on("py-typing-extensions@3.6.2.1:", type=("build", "run"))
- depends_on("cmake@3.1:", type="build")
- depends_on("py-pytest-runner", type="build")
+ depends_on("py-typing-extensions@3.6.2.1:", type=("build", "run"), when="@:1.14")
+ depends_on("py-pytest-runner", type="build", when="@:1.14")
# 'python_out' does not recognize dllexport_decl.
patch("remove_dllexport_decl.patch", when="@:1.6.0")
+
+ # Switch the CMAKE_CXX_STANDARD to 17 if abseil-cpp has been built with
+ # either of those. (abseil-cpp is pulled in via protobuf)
+ patch(
+ "https://github.com/onnx/onnx/commit/1f6e43cb4d7366b2dffa7f70ae88198306e12c6c.patch?full_index=1",
+ sha256="be12f589bc4113982e4162efcdbd95835a6c161a9a7e10cd1dde026cadedf8aa",
+ when="@1.15.0 ^abseil-cpp cxxstd=17",
+ )
+ patch(
+ "https://github.com/onnx/onnx/commit/1f6e43cb4d7366b2dffa7f70ae88198306e12c6c.patch?full_index=1",
+ sha256="be12f589bc4113982e4162efcdbd95835a6c161a9a7e10cd1dde026cadedf8aa",
+ when="@1.15.0 ^abseil-cpp cxxstd=20",
+ )
+
+ # By default, ONNX always uses .setuptools-cmake-build/ under the source path,
+ # so we allow overriding with a build environment variable
+ def patch(self):
+ filter_file(
+ r"^CMAKE_BUILD_DIR = (.*)$",
+ r"CMAKE_BUILD_DIR = os.getenv('CMAKE_BUILD_DIR', default=\1)",
+ "setup.py",
+ )
+
+ def setup_build_environment(self, env):
+ # Build in a similar directory as the CMake packages
+ env.set(
+ "CMAKE_BUILD_DIR", join_path(self.stage.path, f"spack-build-{self.spec.dag_hash(7)}")
+ )
diff --git a/var/spack/repos/builtin/packages/py-onnxruntime/0001-Find-ROCm-Packages-Individually.patch b/var/spack/repos/builtin/packages/py-onnxruntime/0001-Find-ROCm-Packages-Individually.patch
new file mode 100644
index 0000000000..a48c192182
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-onnxruntime/0001-Find-ROCm-Packages-Individually.patch
@@ -0,0 +1,45 @@
+From c4930c939cc1c8b4c6122b1e9530942ecd517fb2 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Tue, 17 Sep 2024 19:33:51 +0000
+Subject: [PATCH] Find individual ROCm dependencies
+
+---
+ cmake/onnxruntime_providers_rocm.cmake | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/onnxruntime_providers_rocm.cmake b/cmake/onnxruntime_providers_rocm.cmake
+index b662682915..2e9574c04d 100644
+--- a/cmake/onnxruntime_providers_rocm.cmake
++++ b/cmake/onnxruntime_providers_rocm.cmake
+@@ -11,6 +11,12 @@
+ find_package(rocblas REQUIRED)
+ find_package(MIOpen REQUIRED)
+ find_package(hipfft REQUIRED)
++ find_package(rocrand REQUIRED)
++ find_package(hipsparse REQUIRED)
++ find_package(hipcub REQUIRED)
++ find_package(rocprim REQUIRED)
++ find_package(rocthrust REQUIRED)
++ find_package(hipblas REQUIRED)
+
+ # MIOpen version
+ if(NOT DEFINED ENV{MIOPEN_PATH})
+@@ -147,7 +153,14 @@
+ ${eigen_INCLUDE_DIRS}
+ PUBLIC
+ ${onnxruntime_ROCM_HOME}/include
+- ${onnxruntime_ROCM_HOME}/include/roctracer)
++ ${onnxruntime_ROCM_HOME}/include/roctracer
++ ${HIPRAND_INCLUDE_DIR}
++ ${ROCRAND_INCLUDE_DIR}
++ ${HIPSPARSE_INCLUDE_DIR}
++ ${HIPCUB_INCLUDE_DIR}
++ ${ROCPRIM_INCLUDE_DIR}
++ ${ROCTHRUST_INCLUDE_DIR}
++ ${HIPBLAS_INCLUDE_DIR})
+
+ set_target_properties(onnxruntime_providers_rocm PROPERTIES LINKER_LANGUAGE CXX)
+ set_target_properties(onnxruntime_providers_rocm PROPERTIES FOLDER "ONNXRuntime")
+--
+2.43.5
+
diff --git a/var/spack/repos/builtin/packages/py-onnxruntime/package.py b/var/spack/repos/builtin/packages/py-onnxruntime/package.py
index b3fb62d0db..a5d375f816 100644
--- a/var/spack/repos/builtin/packages/py-onnxruntime/package.py
+++ b/var/spack/repos/builtin/packages/py-onnxruntime/package.py
@@ -3,10 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
-class PyOnnxruntime(CMakePackage, PythonExtension):
+class PyOnnxruntime(CMakePackage, PythonExtension, ROCmPackage):
"""ONNX Runtime is a performance-focused complete scoring
engine for Open Neural Network Exchange (ONNX) models, with
an open extensible architecture to continually address the
@@ -18,42 +19,90 @@ class PyOnnxruntime(CMakePackage, PythonExtension):
homepage = "https://github.com/microsoft/onnxruntime"
git = "https://github.com/microsoft/onnxruntime.git"
+ submodules = True
license("MIT")
- version(
- "1.10.0", tag="v1.10.0", commit="0d9030e79888d1d5828730b254fedc53c7b640c1", submodules=True
- )
- version(
- "1.7.2", tag="v1.7.2", commit="5bc92dff16b0ddd5063b717fb8522ca2ad023cb0", submodules=True
- )
+ version("1.18.2", tag="v1.18.2", commit="9691af1a2a17b12af04652f4d8d2a18ce9507025")
+ version("1.18.1", tag="v1.18.1", commit="387127404e6c1d84b3468c387d864877ed1c67fe")
+ version("1.18.0", tag="v1.18.0", commit="45737400a2f3015c11f005ed7603611eaed306a6")
+ version("1.17.3", tag="v1.17.3", commit="56b660f36940a919295e6f1e18ad3a9a93a10bf7")
+ version("1.17.1", tag="v1.17.1", commit="8f5c79cb63f09ef1302e85081093a3fe4da1bc7d")
+ version("1.10.0", tag="v1.10.0", commit="0d9030e79888d1d5828730b254fedc53c7b640c1")
+ version("1.7.2", tag="v1.7.2", commit="5bc92dff16b0ddd5063b717fb8522ca2ad023cb0")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("cuda", default=False, description="Build with CUDA support")
+ # cmake/CMakeLists.txt
+ depends_on("cmake@3.26:", when="@1.17:", type="build")
depends_on("cmake@3.1:", type="build")
+ # Needs absl/strings/has_absl_stringify.h
+ # cxxstd=20 may also work, but cxxstd=14 does not
+ depends_on("abseil-cpp@20240116.0: cxxstd=17", when="@1.17:")
+
+ extends("python")
depends_on("python", type=("build", "run"))
depends_on("py-pip", type="build")
- depends_on("protobuf")
- # https://github.com/microsoft/onnxruntime/pull/11639
- depends_on("protobuf@:3.19", when="@:1.11")
- depends_on("py-protobuf", type=("build", "run"))
+ depends_on("py-wheel", type="build")
depends_on("py-setuptools", type="build")
+ depends_on("py-pybind11", type="build")
+
+ # requirements.txt
+ depends_on("py-coloredlogs", when="@1.17:", type=("build", "run"))
+ depends_on("py-flatbuffers", type=("build", "run"))
depends_on("py-numpy@1.16.6:", type=("build", "run"))
- depends_on("py-sympy@1.1:", type=("build", "run"))
+ depends_on("py-numpy@1.21.6:", when="@1.18:", type=("build", "run"))
+ depends_on("py-numpy@:1", when="@:1.18", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"))
+ depends_on("py-protobuf", type=("build", "run"))
+ depends_on("py-sympy@1.1:", type=("build", "run"))
+
+ depends_on("protobuf")
+ # https://github.com/microsoft/onnxruntime/pull/11639
+ depends_on("protobuf@:3.19", when="@:1.11")
depends_on("py-cerberus", type=("build", "run"))
- depends_on("py-wheel", type="build")
depends_on("py-onnx", type=("build", "run"))
- depends_on("py-flatbuffers", type=("build", "run"))
+ depends_on("py-onnx@:1.15.0", type=("build", "run"), when="@:1.17")
+ depends_on("py-onnx@:1.16", type=("build", "run"), when="@:1.18")
depends_on("zlib-api")
depends_on("libpng")
- depends_on("py-pybind11", type="build")
depends_on("cuda", when="+cuda")
depends_on("cudnn", when="+cuda")
depends_on("iconv", type=("build", "link", "run"))
depends_on("re2+shared")
- extends("python")
+ rocm_dependencies = [
+ "hsa-rocr-dev",
+ "hip",
+ "hiprand",
+ "hipsparse",
+ "hipfft",
+ "hipcub",
+ "hipblas",
+ "llvm-amdgpu",
+ "miopen-hip",
+ "migraphx",
+ "rocblas",
+ "rccl",
+ "rocprim",
+ "rocminfo",
+ "rocm-core",
+ "rocm-cmake",
+ "roctracer-dev",
+ "rocthrust",
+ "rocrand",
+ "rocsparse",
+ ]
+
+ with when("+rocm"):
+ for pkg_dep in rocm_dependencies:
+ depends_on(f"{pkg_dep}@5.7:6.1", when="@1.17")
+ depends_on(f"{pkg_dep}@6.1:", when="@1.18:")
+ depends_on(pkg_dep)
+
# Adopted from CMS experiment's fork of onnxruntime
# https://github.com/cms-externals/onnxruntime/compare/5bc92df...d594f80
patch("cms.patch", level=1, when="@1.7.2")
@@ -72,6 +121,10 @@ class PyOnnxruntime(CMakePackage, PythonExtension):
when="@1.10:1.15",
)
+ # ORT is assuming all ROCm components are installed in a single path,
+ # this patch finds the packages individually
+ patch("0001-Find-ROCm-Packages-Individually.patch", when="@1.17: +rocm")
+
dynamic_cpu_arch_values = ("NOAVX", "AVX", "AVX2", "AVX512")
variant(
@@ -86,10 +139,28 @@ class PyOnnxruntime(CMakePackage, PythonExtension):
root_cmakelists_dir = "cmake"
build_directory = "."
+ def patch(self):
+ if self.spec.satisfies("@1.17 +rocm"):
+ filter_file(
+ r"${onnxruntime_ROCM_HOME}/.info/version-dev",
+ "{0}/.info/version".format(self.spec["rocm-core"].prefix),
+ "cmake/CMakeLists.txt",
+ string=True,
+ )
+ if self.spec.satisfies("@1.18: +rocm"):
+ filter_file(
+ r"${onnxruntime_ROCM_HOME}/.info/version",
+ "{0}/.info/version".format(self.spec["rocm-core"].prefix),
+ "cmake/CMakeLists.txt",
+ string=True,
+ )
+
def setup_build_environment(self, env):
value = self.spec.variants["dynamic_cpu_arch"].value
value = self.dynamic_cpu_arch_values.index(value)
env.set("MLAS_DYNAMIC_CPU_ARCH", str(value))
+ if self.spec.satisfies("+rocm"):
+ env.set("MIOPEN_PATH", self.spec["miopen-hip"].prefix)
def setup_run_environment(self, env):
value = self.spec.variants["dynamic_cpu_arch"].value
@@ -105,41 +176,41 @@ class PyOnnxruntime(CMakePackage, PythonExtension):
define("onnxruntime_BUILD_SHARED_LIB", True),
define_from_variant("onnxruntime_USE_CUDA", "cuda"),
define("onnxruntime_BUILD_CSHARP", False),
- define("onnxruntime_USE_EIGEN_FOR_BLAS", True),
- define("onnxruntime_USE_OPENBLAS", False),
- define("onnxruntime_USE_MKLML", False),
- define("onnxruntime_USE_NGRAPH", False),
- define("onnxruntime_USE_OPENMP", False),
define("onnxruntime_USE_TVM", False),
- define("onnxruntime_USE_LLVM", False),
define("onnxruntime_ENABLE_MICROSOFT_INTERNAL", False),
- define("onnxruntime_USE_BRAINSLICE", False),
- define("onnxruntime_USE_NUPHAR", False),
define("onnxruntime_USE_TENSORRT", False),
define("onnxruntime_CROSS_COMPILING", False),
define("onnxruntime_USE_FULL_PROTOBUF", True),
define("onnxruntime_DISABLE_CONTRIB_OPS", False),
- define("onnxruntime_USE_PREINSTALLED_PROTOBUF", True),
- define("onnxruntime_PREFER_SYSTEM_LIB", True),
]
if self.spec.satisfies("+cuda"):
args.extend(
(
- define("onnxruntime_CUDA_VERSION", str(self.spec["cuda"].version)),
define("onnxruntime_CUDA_HOME", self.spec["cuda"].prefix),
define("onnxruntime_CUDNN_HOME", self.spec["cudnn"].prefix),
define("CMAKE_CUDA_FLAGS", "-cudart shared"),
define("CMAKE_CUDA_RUNTIME_LIBRARY", "Shared"),
- define("DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES", "CMAKE_CUDA_RUNTIME_LIBRARY"),
+ define("CMAKE_TRY_COMPILE_PLATFORM_VARIABLES", "CMAKE_CUDA_RUNTIME_LIBRARY"),
)
)
+ if self.spec.satisfies("+rocm"):
+ args.extend(
+ (
+ define("CMAKE_HIP_COMPILER", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++"),
+ define("onnxruntime_USE_MIGRAPHX", "ON"),
+ define("onnxruntime_MIGRAPHX_HOME", self.spec["migraphx"].prefix),
+ define("onnxruntime_USE_ROCM", "ON"),
+ define("onnxruntime_ROCM_HOME", self.spec["hip"].prefix),
+ define("onnxruntime_ROCM_VERSION", self.spec["hip"].version),
+ define("onnxruntime_USE_COMPOSABLE_KERNEL", "OFF"),
+ )
+ )
return args
@run_after("install")
def install_python(self):
"""Install everything from build directory."""
- args = std_pip_args + ["--prefix=" + prefix, "."]
with working_dir(self.build_directory):
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/py-open-clip-torch/package.py b/var/spack/repos/builtin/packages/py-open-clip-torch/package.py
new file mode 100644
index 0000000000..45fa3a0ee7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-open-clip-torch/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOpenClipTorch(PythonPackage):
+ """Welcome to an open source implementation of OpenAI's CLIP (Contrastive
+ Language-Image Pre-training)."""
+
+ homepage = "https://github.com/mlfoundations/open_clip"
+ url = "https://github.com/mlfoundations/open_clip/archive/refs/tags/v2.24.0.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("2.24.0", sha256="83d78a78f756685e80fdb8baa2f2fb308c791fabdbfe1c0ddcd6fed7d22de7b6")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch@1.9.0:", type=("build", "run"))
+ depends_on("py-torchvision", type=("build", "run"))
+ depends_on("py-regex", type=("build", "run"))
+ depends_on("py-ftfy", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-huggingface-hub", type=("build", "run"))
+ depends_on("py-sentencepiece", type=("build", "run"))
+ depends_on("py-protobuf", type=("build", "run"))
+ depends_on("py-timm", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-opencensus-context/package.py b/var/spack/repos/builtin/packages/py-opencensus-context/package.py
index 4364138728..dc9a0f28d3 100644
--- a/var/spack/repos/builtin/packages/py-opencensus-context/package.py
+++ b/var/spack/repos/builtin/packages/py-opencensus-context/package.py
@@ -15,8 +15,4 @@ class PyOpencensusContext(PythonPackage):
license("Apache-2.0")
- version(
- "0.1.1",
- sha256="1a3fdf6bec537031efcc93d51b04f1edee5201f8c9a0c85681d63308b76f5702",
- expand=False,
- )
+ version("0.1.1", sha256="1a3fdf6bec537031efcc93d51b04f1edee5201f8c9a0c85681d63308b76f5702")
diff --git a/var/spack/repos/builtin/packages/py-openmc/package.py b/var/spack/repos/builtin/packages/py-openmc/package.py
index 1ace8bc018..3272eae617 100644
--- a/var/spack/repos/builtin/packages/py-openmc/package.py
+++ b/var/spack/repos/builtin/packages/py-openmc/package.py
@@ -17,12 +17,14 @@ class PyOpenmc(PythonPackage):
programming model."""
homepage = "https://docs.openmc.org/"
- url = "https://github.com/openmc-dev/openmc/tarball/v0.13.3"
+ url = "https://github.com/openmc-dev/openmc/tarball/v0.15.0"
git = "https://github.com/openmc-dev/openmc.git"
maintainers("paulromano")
version("develop", branch="develop")
version("master", branch="master")
+ version("0.15.0", commit="55b52b7ef3c9415ce045712132bf31c2a013d8c8", submodules=True)
+ version("0.14.0", commit="fa2330103de61a864c958d1a7250f11e5dd91468", submodules=True)
version("0.13.3", commit="27cb0dc97960fe6d750eb5a93584a9a0ca532ac8", submodules=True)
version("0.13.2", commit="030f73a8690ed19e91806e46c8caf338d252e74a", submodules=True)
version("0.13.1", commit="33bc948f4b855c037975f16d16091fe4ecd12de3", submodules=True)
@@ -32,12 +34,17 @@ class PyOpenmc(PythonPackage):
version("0.12.0", commit="93d6165ecb455fc57242cd03a3f0805089c0e0b9", submodules=True)
version("0.11.0", sha256="19a9d8e9c3b581e9060fbd96d30f1098312d217cb5c925eb6372a5786d9175af")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI support")
# keep py-openmc and openmc at the same version
for ver in [
"develop",
"master",
+ "0.15.0",
+ "0.14.0",
"0.13.3",
"0.13.2",
"0.13.1",
@@ -55,7 +62,8 @@ class PyOpenmc(PythonPackage):
)
depends_on("git", type="build")
- depends_on("python@3.7:", type=("build", "run"), when="@0.13.2:")
+ depends_on("python@3.10:", type=("build", "run"), when="@0.15.0:")
+ depends_on("python@3.7:", type=("build", "run"), when="@0.13.2:0.14.0")
depends_on("python@3.6:", type=("build", "run"), when="@0.13.0:0.13.1")
depends_on("python@3.5:", type=("build", "run"), when="@:0.12")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-openmesh/package.py b/var/spack/repos/builtin/packages/py-openmesh/package.py
index 3dcd44e890..09fc0273c3 100644
--- a/var/spack/repos/builtin/packages/py-openmesh/package.py
+++ b/var/spack/repos/builtin/packages/py-openmesh/package.py
@@ -18,6 +18,9 @@ class PyOpenmesh(PythonPackage):
version("1.2.1", sha256="6fd3fa41a68148e4a7523f562426aa9758bf65ccc6642abcf79c37bae9c6af3c")
version("1.1.3", sha256="c1d24abc85b7b518fe619639f89750bf19ed3b8938fed4dd739a72f1e6f8b0f6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm", type="build")
depends_on("cmake@3.1:", when="@1.1.3 platform=windows", type="build")
diff --git a/var/spack/repos/builtin/packages/py-openslide-python/package.py b/var/spack/repos/builtin/packages/py-openslide-python/package.py
index 16806c586f..12e29e4f24 100644
--- a/var/spack/repos/builtin/packages/py-openslide-python/package.py
+++ b/var/spack/repos/builtin/packages/py-openslide-python/package.py
@@ -17,6 +17,8 @@ class PyOpenslidePython(PythonPackage):
version("1.1.2", sha256="83e064ab4a29658e7ddf86bf1d3e54d2508cc19ece35d55b55519c826e45d83f")
version("1.1.1", sha256="33c390fe43e3d7d443fafdd66969392d3e9efd2ecd5d4af73c3dbac374485ed5")
+ depends_on("c", type="build") # generated
+
depends_on("openslide@3.4.0:")
depends_on("python@2.6:2.8,3.3:", type=("build", "run"))
# https://github.com/openslide/openslide-python/pull/76
diff --git a/var/spack/repos/builtin/packages/py-opentuner/package.py b/var/spack/repos/builtin/packages/py-opentuner/package.py
index 1547f1f152..f96bc803b4 100644
--- a/var/spack/repos/builtin/packages/py-opentuner/package.py
+++ b/var/spack/repos/builtin/packages/py-opentuner/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyOpentuner(PythonPackage):
"""An extensible framework for program autotuning."""
- homepage = "http://opentuner.org/"
+ homepage = "https://opentuner.org/"
git = "https://github.com/jansel/opentuner.git"
maintainers("matthiasdiener")
@@ -19,6 +19,8 @@ class PyOpentuner(PythonPackage):
version("0.8.7", commit="070c5cef6d933eb760a2f9cd5cd08c95f27aee75")
version("0.8.2", commit="8e720a2094e7964d7a1225e58aca40b0e78bff7d")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3:", type=("build", "run"), when="@0.8.1:")
depends_on("py-fn-py@0.2.12:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ops/package.py b/var/spack/repos/builtin/packages/py-ops/package.py
new file mode 100644
index 0000000000..f8b0a07ae3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ops/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOps(PythonPackage):
+ """The Python library behind great charms"""
+
+ homepage = "https://github.com/canonical/operator"
+ pypi = "ops/ops-1.4.0.tar.gz"
+
+ license("Apache-2.0", checked_by="qwertos")
+
+ version("2.16.0", sha256="c4405185744c82589fca4752a76cd7eabd667cf2d3f07d2700b82777186b8de9")
+ version("1.4.0", sha256="6bb7c8d8cd3eb1da99469564e37a04f9677205c4c07ef97167e0b93a17ccb59a")
+
+ depends_on("python@3.8:", when="@2.16:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-pyyaml@6", when="@2.16:", type=("build", "run"))
+ depends_on("py-websocket-client@1", when="@2.16:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-opt-einsum/package.py b/var/spack/repos/builtin/packages/py-opt-einsum/package.py
index e333973426..ff61076570 100644
--- a/var/spack/repos/builtin/packages/py-opt-einsum/package.py
+++ b/var/spack/repos/builtin/packages/py-opt-einsum/package.py
@@ -14,11 +14,21 @@ class PyOptEinsum(PythonPackage):
license("MIT")
+ version("3.4.0", sha256="96ca72f1b886d148241348783498194c577fa30a8faac108586b14f1ba4473ac")
version("3.3.0", sha256="59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549")
version("3.2.1", sha256="83b76a98d18ae6a5cc7a0d88955a7f74881f0e567a0f4c949d24c942753eb998")
version("3.2.0", sha256="738b0a1db1d3084d360081bb64d826f9db06d2df7cc0bf8e2c9356028da1fa31")
version("3.1.0", sha256="edfada4b1d0b3b782ace8bc14e80618ff629abf53143e1e6bbf9bd00b11ece77")
- depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-numpy@1.7:", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("python@3.8:", when="@3.4:")
+ # https://github.com/dgasmith/opt_einsum/commit/7c8f193f90b6771a6b3065bb5cf6ec2747af8209
+ depends_on("python@:3.11", when="@:3.3")
+
+ depends_on("py-numpy@1.7:", when="@:3.3")
+
+ depends_on("py-setuptools", when="@:3.3", type="build")
+
+ depends_on("py-hatchling", when="@3.4:", type="build")
+ depends_on("py-hatch-fancy-pypi-readme@22.5:", when="@3.4:", type="build")
+ depends_on("py-hatch-vcs", when="@3.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-optax/package.py b/var/spack/repos/builtin/packages/py-optax/package.py
index 683a2d9cce..4306524a7a 100644
--- a/var/spack/repos/builtin/packages/py-optax/package.py
+++ b/var/spack/repos/builtin/packages/py-optax/package.py
@@ -14,12 +14,15 @@ class PyOptax(PythonPackage):
license("Apache-2.0")
+ version("0.2.1", sha256="fc9f430fa057377140d00aa50611dabbd7e8f4999e3c7543f641f9db6997cb1a")
version("0.1.7", sha256="6a5a848bc5e55e619b187c749fdddc4a5443ea14be85cc769f995779865c110d")
- depends_on("python@3.8:", type=("build", "run"))
+ depends_on("python@3.9:", when="@0.2.1:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.1.7", type=("build", "run"))
depends_on("py-flit-core@3.2:3", type="build")
depends_on("py-absl-py@0.7.1:", type=("build", "run"))
- depends_on("py-chex@0.1.5:", type=("build", "run"))
+ depends_on("py-chex@0.1.7:", when="@0.2.1:", type=("build", "run"))
+ depends_on("py-chex@0.1.5:", when="@0.1.7", type=("build", "run"))
depends_on("py-jax@0.1.55:", type=("build", "run"))
depends_on("py-jaxlib@0.1.37:", type=("build", "run"))
depends_on("py-numpy@1.18.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-optree/package.py b/var/spack/repos/builtin/packages/py-optree/package.py
new file mode 100644
index 0000000000..96e10b8fff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-optree/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOptree(PythonPackage):
+ """Optimized PyTree Utilities."""
+
+ homepage = "https://github.com/metaopt/optree"
+ pypi = "optree/optree-0.10.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.10.0", sha256="dc7e8880f997365083191784d141c790833877af71aec8825c7f2b7f7f43c98e")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.11:", type="build")
+ depends_on("python", type=("build", "link", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pybind11", type=("build", "link"))
+ depends_on("py-typing-extensions@4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-or-tools/package.py b/var/spack/repos/builtin/packages/py-or-tools/package.py
index a9debf9a3b..8400f7ae21 100644
--- a/var/spack/repos/builtin/packages/py-or-tools/package.py
+++ b/var/spack/repos/builtin/packages/py-or-tools/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -19,6 +20,8 @@ class PyOrTools(CMakePackage):
version("7.8", sha256="d93a9502b18af51902abd130ff5f23768fcf47e266e6d1f34b3586387aa2de68")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.14:", type="build")
depends_on("py-pip", type="build")
depends_on("py-wheel", type="build")
@@ -55,5 +58,4 @@ class PyOrTools(CMakePackage):
with working_dir(self.build_directory):
make("install")
with working_dir(join_path(self.build_directory, "python")):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/py-oracledb/package.py b/var/spack/repos/builtin/packages/py-oracledb/package.py
index f53f97fd38..2e690e36be 100644
--- a/var/spack/repos/builtin/packages/py-oracledb/package.py
+++ b/var/spack/repos/builtin/packages/py-oracledb/package.py
@@ -12,15 +12,23 @@ class PyOracledb(PythonPackage):
Python programs to access Oracle Database."""
homepage = "https://oracle.github.io/python-oracledb/"
- pypi = "oracledb/oracledb-1.2.2.tar.gz"
+ pypi = "oracledb/oracledb-1.4.2.tar.gz"
license("Apache-2.0")
- version("1.2.2", sha256="dd9f63084e44642b484a46b2fcfb4fc921f39facf494a1bab00628fa6409f4fc")
+ version("2.4.1", sha256="bd5976bef0e466e0f9d1b9f6531fb5b8171dc8534717ccb04b26e680b6c7571d")
+ version("2.3.0", sha256="b9b0c4ec280b10063e6789bed23ddc2435ae98569ebe64e0b9a270780b9103d5")
+ version("1.4.2", sha256="e28ed9046f2735dc2dd5bbcdf3667f284e384e0ec7eed3eeb3798fa8a7d47e36")
+
+ depends_on("python@3.8:3.13", when="@2.4:")
+ depends_on("python@3.8:3.12", when="@2.0:2.3")
+ depends_on("python@3.8:3.11", when="@:1.4")
+
+ depends_on("c", type="build")
depends_on("py-setuptools@40.6.0:", type="build")
depends_on("py-cryptography@3.2.1:", type=("build", "run"))
- depends_on("py-cython", type="build")
+ depends_on("py-cython@3:", type="build")
depends_on("python@3.6:", type=("build", "run"))
depends_on("oracle-instant-client", type="run", when="impl=thick")
diff --git a/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py
new file mode 100644
index 0000000000..99d1af70c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-orbax-checkpoint/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyOrbaxCheckpoint(PythonPackage):
+ """Orbax includes a checkpointing library oriented towards JAX users, supporting a variety
+ of different features required by different frameworks, including asynchronous checkpointing
+ various types, and various storage formats. We aim to provide a highly customizable and
+ composable API which maximizes flexibility for diverse use cases.
+ """
+
+ homepage = "https://github.com/google/orbax"
+ pypi = "orbax_checkpoint/orbax_checkpoint-0.5.3.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.5.3", sha256="1572904cbbfe8513927e0d80f80b730e0ef2f680332d3c2810d8443532938b45")
+
+ depends_on("py-flit-core@3.5:3", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-absl-py")
+ depends_on("py-etils+epath+epy")
+ depends_on("py-typing-extensions")
+ depends_on("py-msgpack")
+ depends_on("py-jax@0.4.9:")
+ depends_on("py-jaxlib")
+ depends_on("py-numpy")
+ depends_on("py-pyyaml")
+ depends_on("py-tensorstore@0.1.51:")
+ depends_on("py-nest-asyncio")
+ depends_on("py-protobuf")
diff --git a/var/spack/repos/builtin/packages/py-ordered-set/package.py b/var/spack/repos/builtin/packages/py-ordered-set/package.py
index 4ef84915c7..dc06702eb3 100644
--- a/var/spack/repos/builtin/packages/py-ordered-set/package.py
+++ b/var/spack/repos/builtin/packages/py-ordered-set/package.py
@@ -16,7 +16,10 @@ class PyOrderedSet(PythonPackage):
license("MIT")
+ version("4.1.0", sha256="694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8")
version("4.0.2", sha256="ba93b2df055bca202116ec44b9bead3df33ea63a7d5827ff8e16738b97f33a95")
depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ depends_on("python@3.7:", type=("build", "run"), when="@4.1:")
+ depends_on("py-setuptools", type="build", when="@:4.0")
+ depends_on("py-flit-core@3.2:3", type="build", when="@4.1:")
diff --git a/var/spack/repos/builtin/packages/py-orjson/package.py b/var/spack/repos/builtin/packages/py-orjson/package.py
index 4bddb15e50..b3e966897e 100644
--- a/var/spack/repos/builtin/packages/py-orjson/package.py
+++ b/var/spack/repos/builtin/packages/py-orjson/package.py
@@ -14,6 +14,19 @@ class PyOrjson(PythonPackage):
license("Apache-2.0")
+ version("3.10.3", sha256="2b166507acae7ba2f7c315dcf185a9111ad5e992ac81f2d507aac39193c2c818")
+ version("3.9.15", sha256="95cae920959d772f30ab36d3b25f83bb0f3be671e986c72ce22f8fa700dae061")
+ version("3.8.14", sha256="5ea93fd3ef7be7386f2516d728c877156de1559cda09453fc7dd7b696d0439b3")
version("3.8.7", sha256="8460c8810652dba59c38c80d27c325b5092d189308d8d4f3e688dbd8d4f3b2dc")
- depends_on("py-maturin@0.13:0.14", type="build")
+ depends_on("c", type="build") # generated
+
+ with default_args(type="build"):
+ with when("@3.8"):
+ depends_on("rust@1.60:")
+ depends_on("python@3.7:")
+ depends_on("py-maturin@0.13:0.14")
+ with when("@03.9:"):
+ depends_on("rust@1.72:")
+ depends_on("python@3.8:")
+ depends_on("py-maturin@1")
diff --git a/var/spack/repos/builtin/packages/py-osqp/package.py b/var/spack/repos/builtin/packages/py-osqp/package.py
index e23c1a9cbe..3c8f5fe811 100644
--- a/var/spack/repos/builtin/packages/py-osqp/package.py
+++ b/var/spack/repos/builtin/packages/py-osqp/package.py
@@ -22,6 +22,8 @@ class PyOsqp(PythonPackage):
)
version("0.6.1", sha256="47b17996526d6ecdf35cfaead6e3e05d34bc2ad48bcb743153cefe555ecc0e8c")
+ depends_on("c", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@40.8.0:", when="@0.6.2.post8:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-outdated/package.py b/var/spack/repos/builtin/packages/py-outdated/package.py
index f7137d0288..f5203a22ce 100644
--- a/var/spack/repos/builtin/packages/py-outdated/package.py
+++ b/var/spack/repos/builtin/packages/py-outdated/package.py
@@ -10,7 +10,7 @@ class PyOutdated(PythonPackage):
"""This is a mini-library which, given a package name and a version, checks if
it's the latest version available on PyPI."""
- homepage = "http://github.com/alexmojaki/outdated"
+ homepage = "https://github.com/alexmojaki/outdated"
pypi = "outdated/outdated-0.2.2.tar.gz"
maintainers("meyersbs")
diff --git a/var/spack/repos/builtin/packages/py-owslib/package.py b/var/spack/repos/builtin/packages/py-owslib/package.py
index 47a9c79065..9cd6265bbe 100644
--- a/var/spack/repos/builtin/packages/py-owslib/package.py
+++ b/var/spack/repos/builtin/packages/py-owslib/package.py
@@ -16,6 +16,7 @@ class PyOwslib(PythonPackage):
license("BSD-3-Clause")
+ version("0.31.0", sha256="2ed6540087445cc57d905138a590b6ae58624ec7661b5c1682ed4e3303bcd150")
version("0.25.0", sha256="20d79bce0be10277caa36f3134826bd0065325df0301a55b2c8b1c338d8d8f0a")
version("0.17.1", sha256="b2e7fd694d3cffcee79317bad492d60c0aa887aea6916517c051c3247b33b5a5")
version("0.16.0", sha256="ec95a5e93c145a5d84b0074b9ea27570943486552a669151140debf08a100554")
@@ -23,9 +24,10 @@ class PyOwslib(PythonPackage):
depends_on("python@3.6:", when="@0.19.2:", type=("build", "run"))
depends_on("python@3.5:", when="@0.19.1:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ depends_on("py-lxml", when="@0.31:", type=("build", "run"))
depends_on("py-python-dateutil@1.5:", type=("build", "run"))
depends_on("py-pytz", type=("build", "run"))
- depends_on("py-requests@1:", type=("build", "run"))
- depends_on("py-pyproj", type=("build", "run"))
- depends_on("py-pyproj@2:", when="@0.19.2:", type=("build", "run"))
depends_on("py-pyyaml", when="@0.19.2:", type=("build", "run"))
+ depends_on("py-requests@1:", type=("build", "run"))
+ depends_on("py-pyproj@2:", when="@0.19.2:0.25", type=("build", "run"))
+ depends_on("py-pyproj", when="@:0.25", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-packaging/package.py b/var/spack/repos/builtin/packages/py-packaging/package.py
index 240e8c4894..ed01a54331 100644
--- a/var/spack/repos/builtin/packages/py-packaging/package.py
+++ b/var/spack/repos/builtin/packages/py-packaging/package.py
@@ -13,7 +13,8 @@ class PyPackaging(PythonPackage):
pypi = "packaging/packaging-19.2.tar.gz"
license("BSD-2-Clause")
-
+ version("24.1", sha256="026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002")
+ version("23.2", sha256="048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5")
version("23.1", sha256="a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f")
version("23.0", sha256="b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97")
version("21.3", sha256="dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb")
@@ -29,6 +30,7 @@ class PyPackaging(PythonPackage):
# Needed to bootstrap Spack correctly on Python 3.6 (rhel8 platform-python)
depends_on("python@3.7:", when="@22:", type=("build", "run"))
+ depends_on("python@3.8:", when="@24.1", type=("build", "run"))
# Historical dependencies
depends_on("py-setuptools@40.8.0:", when="@20.8:21", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pandas-datareader/package.py b/var/spack/repos/builtin/packages/py-pandas-datareader/package.py
new file mode 100644
index 0000000000..6da8b1d9dc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pandas-datareader/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPandasDatareader(PythonPackage):
+ """Up-to-date remote data access for pandas. Works for multiple versions of pandas"""
+
+ homepage = "https://pypi.org/project/pandas-datareader"
+ pypi = "pandas-datareader/pandas-datareader-0.10.0.tar.gz"
+ git = "https://github.com/pydata/pandas-datareader.git"
+
+ maintainers("climbfuji")
+
+ license("BSD-3-Clause", checked_by="climbfuji")
+
+ version("0.10.0", sha256="9fc3c63d39bc0c10c2683f1c6d503ff625020383e38f6cbe14134826b454d5a6")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools@0.64:", type="build")
+ depends_on("py-setuptools-scm@8", type="build")
+
+ depends_on("py-lxml", type="run")
+ depends_on("py-pandas@1.5.3:", type="run")
+ depends_on("py-statsmodels@0.12:", type="run")
+ depends_on("py-requests@2.19:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py
index 8c3441805c..eade1219c2 100644
--- a/var/spack/repos/builtin/packages/py-pandas/package.py
+++ b/var/spack/repos/builtin/packages/py-pandas/package.py
@@ -15,10 +15,15 @@ class PyPandas(PythonPackage):
homepage = "https://pandas.pydata.org/"
pypi = "pandas/pandas-1.2.0.tar.gz"
- maintainers("adamjstewart")
+ skip_modules = ["pandas.tests", "pandas.plotting._matplotlib", "pandas.core._numba.kernels"]
license("Apache-2.0")
+ maintainers("adamjstewart", "rgommers")
+ version("2.2.3", sha256="4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667")
+ version("2.2.2", sha256="9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54")
+ version("2.2.1", sha256="0ab90f87093c13f3e8fa45b48ba9f39181046e8f3317d3aadb2fffbb1b978572")
+ version("2.2.0", sha256="30b83f7c3eb217fb4d1b494a57a2fda5444f17834f5df2de6b2ffff68dc3c8e2")
version("2.1.4", sha256="fcb68203c833cc735321512e13861358079a96c174a61f5116a1de89c58c0ef7")
version("2.1.3", sha256="22929f84bca106921917eb73c1521317ddd0a4c71b395bcf767a106e3494209f")
version("2.1.2", sha256="52897edc2774d2779fbeb6880d2cfb305daa0b1a29c16b91f531a18918a6e0f3")
@@ -64,88 +69,96 @@ class PyPandas(PythonPackage):
version("0.25.3", sha256="52da74df8a9c9a103af0a72c9d5fdc8e0183a90884278db7f386b5692a2220a4")
version("0.25.2", sha256="ca91a19d1f0a280874a24dca44aadce42da7f3a7edb7e9ab7c7baad8febee2be")
+ variant("performance", default=True, description="Build recommended performance dependencies")
variant("excel", when="@1.4:", default=False, description="Build with support for Excel")
- # Required dependencies
- # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#python-version-support
- depends_on("python@3.9:3.12", when="@2.1.1:", type=("build", "run"))
- depends_on("python@3.9:3.11", when="@2.1.0", type=("build", "run"))
- depends_on("python@3.8:3.11", when="@1.5:2.0", type=("build", "run"))
- depends_on("python@3.8:3.10", when="@1.4", type=("build", "run"))
- depends_on("python@:3.10", when="@1.3.3:1.3", type=("build", "run"))
- depends_on("python@:3.9", when="@1.1.3:1.3.2", type=("build", "run"))
- depends_on("python@:3.8", when="@0.25.2:1.1.2", type=("build", "run"))
-
- # pyproject.toml
- depends_on("py-meson-python@0.13.1", when="@2.1:", type="build")
- depends_on("meson@1.2.1", when="@2.1.1:", type="build")
- depends_on("meson@1.0.1", when="@2.1.0", type="build")
- depends_on("py-cython@0.29.33:2", when="@2:", type="build")
- depends_on("py-cython@0.29.32:2", when="@1.4.4:", type="build")
- depends_on("py-cython@0.29.30:2", when="@1.4.3:", type="build")
- depends_on("py-cython@0.29.24:2", when="@1.3.4:", type="build")
- depends_on("py-cython@0.29.21:2", when="@1.1.3:", type="build")
- depends_on("py-cython@0.29.16:2", when="@1.1:", type="build")
- depends_on("py-cython@0.29.13:2", when="@1:", type="build")
- depends_on("py-versioneer+toml", when="@2:", type="build")
-
- # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#dependencies
- depends_on("py-numpy@1.22.4:2", when="@2.1.2:", type=("build", "run"))
- depends_on("py-numpy@1.22.4:", when="@2.1:", type=("build", "run"))
- depends_on("py-numpy@1.20.3:", when="@1.5:", type=("build", "run"))
- depends_on("py-numpy@1.18.5:", when="@1.4:", type=("build", "run"))
- depends_on("py-numpy@1.17.3:", when="@1.3:", type=("build", "run"))
- depends_on("py-numpy@1.16.5:", when="@1.2:", type=("build", "run"))
- depends_on("py-numpy@1.15.4:", when="@1.1:", type=("build", "run"))
- depends_on("py-numpy@1.13.3:", when="@0.25:", type=("build", "run"))
- # 'NUMPY_IMPORT_ARRAY_RETVAL' was removed in numpy@1.19
- depends_on("py-numpy@:1.18", when="@:0.25", type=("build", "run"))
- depends_on("py-python-dateutil@2.8.2:", when="@2:", type=("build", "run"))
- depends_on("py-python-dateutil@2.8.1:", when="@1.4:", type=("build", "run"))
- depends_on("py-python-dateutil@2.7.3:", when="@1.1:", type=("build", "run"))
- depends_on("py-python-dateutil@2.6.1:", when="@0.25:", type=("build", "run"))
- depends_on("py-python-dateutil", type=("build", "run"))
- depends_on("py-pytz@2020.1:", when="@1.4:", type=("build", "run"))
- depends_on("py-pytz@2017.3:", when="@1.2:", type=("build", "run"))
- depends_on("py-pytz@2017.2:", type=("build", "run"))
- depends_on("py-tzdata@2022.1:", when="@2:", type=("build", "run"))
-
- # Recommended dependencies
- # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#performance-dependencies-recommended
- depends_on("py-numexpr@2.8.0:", when="@2.1:", type=("build", "run"))
- depends_on("py-numexpr@2.7.3:", when="@1.5:", type=("build", "run"))
- depends_on("py-numexpr@2.7.1:", when="@1.4:", type=("build", "run"))
- depends_on("py-numexpr@2.7.0:", when="@1.3:", type=("build", "run"))
- depends_on("py-numexpr@2.6.8:", when="@1.2:", type=("build", "run"))
- depends_on("py-numexpr@2.6.2:", when="@0.25:", type=("build", "run"))
- depends_on("py-bottleneck@1.3.4:", when="@2.1:", type=("build", "run"))
- depends_on("py-bottleneck@1.3.2:", when="@1.5:", type=("build", "run"))
- depends_on("py-bottleneck@1.3.1:", when="@1.4:", type=("build", "run"))
- depends_on("py-bottleneck@1.2.1:", when="@0.25:", type=("build", "run"))
- depends_on("py-numba@0.55.2:", when="@2.1:", type=("build", "run"))
- depends_on("py-numba@0.53.1:", when="@2.0:", type=("build", "run"))
-
- # Optional dependencies
- # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies
-
- # Excel dependencies for 1.4+ (not coded up for earlier versions)
- depends_on("py-odfpy@1.4.1:", type=("run"), when="@2.0: +excel")
- depends_on("py-openpyxl@3.0.10:", type=("run"), when="@2.1: +excel")
- depends_on("py-openpyxl@3.0.7:", type=("run"), when="@1.5: +excel")
- depends_on("py-openpyxl@3.0.3:", type=("run"), when="@1.4: +excel")
- depends_on("py-pyxlsb@1.0.9:", type=("run"), when="@2.1: +excel")
- depends_on("py-pyxlsb@1.0.8:", type=("run"), when="@1.5: +excel")
- depends_on("py-pyxlsb@1.0.6:", type=("run"), when="@1.4: +excel")
- depends_on("py-xlrd@2.0.1:", type=("run"), when="@1.4: +excel")
- depends_on("py-xlwt@1.3.0:", type=("run"), when="@1.4:1.5 +excel")
- depends_on("py-xlsxwriter@3.0.3:", type=("run"), when="@2.1: +excel")
- depends_on("py-xlsxwriter@1.4.3:", type=("run"), when="@1.5: +excel")
- depends_on("py-xlsxwriter@1.2.2:", type=("run"), when="@1.4: +excel")
-
- # Historical dependencies
- depends_on("py-setuptools@61:", when="@2.0", type="build")
- depends_on("py-setuptools@51:", when="@1.3.2:1", type="build")
- depends_on("py-setuptools@38.6:", when="@1.3.0:1.3.1", type="build")
- depends_on("py-setuptools@24.2:", when="@:1.2", type="build")
-
- skip_modules = ["pandas.tests", "pandas.plotting._matplotlib", "pandas.core._numba.kernels"]
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python@0.13.1:", when="@2.1:")
+ depends_on("meson@1.2.1:", when="@2.1.1:")
+ depends_on("meson@1.0.1:", when="@2.1.0")
+ depends_on("py-cython@3.0.5:", when="@2.2:")
+ depends_on("py-cython@0.29.33:2", when="@2.0:2.1")
+ depends_on("py-cython@0.29.32:2", when="@1.4.4:1")
+ depends_on("py-cython@0.29.30:2", when="@1.4.3")
+ depends_on("py-cython@0.29.24:2", when="@1.3.4:1.4.2")
+ depends_on("py-cython@0.29.21:2", when="@1.1.3:1.3.3")
+ depends_on("py-cython@0.29.16:2", when="@1.1.0:1.1.2")
+ depends_on("py-cython@0.29.13:2", when="@1.0")
+ depends_on("py-versioneer+toml", when="@2:")
+
+ # Historical dependencies
+ depends_on("py-setuptools@61:", when="@2.0")
+ depends_on("py-setuptools@51:", when="@1.3.2:1")
+ depends_on("py-setuptools@38.6:", when="@1.3.0:1.3.1")
+ depends_on("py-setuptools@24.2:", when="@:1.2")
+
+ with default_args(type=("build", "run")):
+ # Based on PyPI wheel availability
+ depends_on("python@3.9:", when="@2.1:")
+ depends_on("python@3.8:", when="@1.4:")
+
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:2.2.2")
+ depends_on("python@:3.11", when="@:2.1.0")
+ depends_on("python@:3.10", when="@:1.4")
+ depends_on("python@:3.9", when="@:1.3.2")
+ depends_on("python@:3.8", when="@:1.1.2")
+
+ depends_on("py-numpy@1.22.4:", when="@2.1:")
+ depends_on("py-numpy@1.20.3:", when="@1.5:")
+ depends_on("py-numpy@1.18.5:", when="@1.4")
+ depends_on("py-numpy@1.17.3:", when="@1.3")
+ depends_on("py-numpy@1.16.5:", when="@1.2")
+ depends_on("py-numpy@1.15.4:", when="@1.1")
+ depends_on("py-numpy@1.13.3:", when="@1.0")
+ # 'NUMPY_IMPORT_ARRAY_RETVAL' was removed in numpy@1.19
+ depends_on("py-numpy@1.13.3:1.18", when="@0.25")
+ # https://github.com/pandas-dev/pandas/issues/55519
+ depends_on("py-numpy@:1", when="@:2.2.1")
+ depends_on("py-python-dateutil@2.8.2:", when="@2:")
+ depends_on("py-python-dateutil@2.8.1:", when="@1.4:")
+ depends_on("py-python-dateutil@2.7.3:", when="@1.1:")
+ depends_on("py-python-dateutil@2.6.1:", when="@0.25:")
+ depends_on("py-python-dateutil")
+ depends_on("py-pytz@2020.1:", when="@1.4:")
+ depends_on("py-pytz@2017.3:", when="@1.2:")
+ depends_on("py-pytz@2017.2:")
+ depends_on("py-tzdata@2022.1:", when="@2:")
+
+ with default_args(type="run"):
+ with when("+performance"):
+ depends_on("py-bottleneck@1.3.4:", when="@2.1:")
+ depends_on("py-bottleneck@1.3.2:", when="@1.5:")
+ depends_on("py-bottleneck@1.3.1:", when="@1.4:")
+ depends_on("py-bottleneck@1.2.1:", when="@0.25:")
+ depends_on("py-numba@0.55.2:", when="@2.1:")
+ depends_on("py-numba@0.53.1:", when="@2.0:")
+ depends_on("py-numexpr@2.8.0:", when="@2.1:")
+ depends_on("py-numexpr@2.7.3:", when="@1.5:")
+ depends_on("py-numexpr@2.7.1:", when="@1.4:")
+ depends_on("py-numexpr@2.7.0:", when="@1.3:")
+ depends_on("py-numexpr@2.6.8:", when="@1.2:")
+ depends_on("py-numexpr@2.6.2:", when="@0.25:")
+
+ with when("+excel"):
+ # Excel dependencies for 1.4+ (not coded up for earlier versions)
+ depends_on("py-odfpy@1.4.1:", when="@2.0:")
+ depends_on("py-openpyxl@3.1:", when="@2.2:")
+ depends_on("py-openpyxl@3.0.10:", when="@2.1:")
+ depends_on("py-openpyxl@3.0.7:", when="@1.5:")
+ depends_on("py-openpyxl@3.0.3:", when="@1.4:")
+ depends_on("py-python-calamine@0.1.7:", when="@2.2:")
+ depends_on("py-pyxlsb@1.0.10:", when="@2.2:")
+ depends_on("py-pyxlsb@1.0.9:", when="@2.1:")
+ depends_on("py-pyxlsb@1.0.8:", when="@1.5:")
+ depends_on("py-pyxlsb@1.0.6:", when="@1.4:")
+ depends_on("py-xlrd@2.0.1:", when="@2.2:")
+ depends_on("py-xlrd@2.0.1:", when="@1.4:")
+ depends_on("py-xlwt@1.3.0:", when="@1.4:1.5")
+ depends_on("py-xlsxwriter@3.0.5:", when="@2.2:")
+ depends_on("py-xlsxwriter@3.0.3:", when="@2.1:")
+ depends_on("py-xlsxwriter@1.4.3:", when="@1.5:")
+ depends_on("py-xlsxwriter@1.2.2:", when="@1.4:")
diff --git a/var/spack/repos/builtin/packages/py-panel/package.py b/var/spack/repos/builtin/packages/py-panel/package.py
index 52bff696fc..4108967c02 100644
--- a/var/spack/repos/builtin/packages/py-panel/package.py
+++ b/var/spack/repos/builtin/packages/py-panel/package.py
@@ -9,21 +9,48 @@ from spack.package import *
class PyPanel(PythonPackage):
"""A high level app and dashboarding solution for Python."""
- homepage = "http://panel.holoviz.org/"
+ homepage = "https://panel.holoviz.org/"
pypi = "panel/panel-0.14.4.tar.gz"
license("BSD-3-Clause")
+ version("1.5.2", sha256="30a45f314716bdde2de5c002fbd3a0b4d6ff85459e2179284df559455ff1534b")
version("0.14.4", sha256="b853d2f53d7738ec6372525360c5bf9427a71ed990685ccac703bc9b442e9951")
- depends_on("py-param@1.12:", type=("build", "run"))
- depends_on("py-pyct@0.4.4:", type=("build", "run"))
- depends_on("py-setuptools@42:", type=("build", "run"))
- depends_on("py-bokeh@2.4.3:2.4", type=("build", "run"))
- depends_on("py-pyviz-comms@0.7.4:", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-bleach", type=("build", "run"))
- depends_on("py-packaging", type="build")
- depends_on("py-tqdm@4.48:", type=("build", "run"))
- depends_on("py-markdown", type=("build", "run"))
- depends_on("py-typing-extensions", type=("build", "run"))
+ with when("@0.14.4"):
+ depends_on("py-param@1.12:", type=("build", "run"))
+ depends_on("py-pyct@0.4.4:", type=("build", "run"))
+ depends_on("py-setuptools@42:", type=("build", "run"))
+ depends_on("py-bokeh@2.4.3:2.4", type=("build", "run"))
+ depends_on("py-pyviz-comms@0.7.4:", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-bleach", type=("build", "run"))
+ depends_on("py-packaging", type="build")
+ depends_on("py-tqdm@4.48:", type=("build", "run"))
+ depends_on("py-markdown", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
+
+ with when("@1.5.2"):
+ depends_on("python@3.10:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ depends_on("py-param@2.1:2", type=("build", "run"))
+ depends_on("py-bokeh@3.5:3.6", type=("build", "run"))
+ depends_on("py-pyviz-comms@2:", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"))
+ # Version 18 or later are requested by py-panel
+ depends_on("node-js@18:", type=("build", "run"))
+ # Version 9 is not requested explicitly, it's
+ # a guess that the more recent version of node-js
+ # should go with a more recent version of npm
+ depends_on("npm@9:", type=("build", "run"))
+
+ depends_on("py-markdown", type="run")
+ depends_on("py-markdown-it-py", type="run")
+ depends_on("py-linkify-it-py", type="run")
+ depends_on("py-mdit-py-plugins", type="run")
+ depends_on("py-bleach", type="run")
+ depends_on("py-typing-extensions", type="run")
+ depends_on("py-pandas@1.2:", type="run")
+ depends_on("py-tqdm", type="run")
diff --git a/var/spack/repos/builtin/packages/py-param/package.py b/var/spack/repos/builtin/packages/py-param/package.py
index 840c2279cf..706fcb7032 100644
--- a/var/spack/repos/builtin/packages/py-param/package.py
+++ b/var/spack/repos/builtin/packages/py-param/package.py
@@ -19,7 +19,13 @@ class PyParam(PythonPackage):
license("BSD-3-Clause")
+ version("2.1.1", sha256="3b1da14abafa75bfd908572378a58696826b3719a723bc31b40ffff2e9a5c852")
version("1.12.0", sha256="35d0281c8e3beb6dd469f46ff0b917752a54bed94d1b0c567346c76d0ff59c4a")
- depends_on("python@2.7:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ depends_on("python@2.7:", when="@1", type=("build", "run"))
+ depends_on("python@3.8:", when="@2:", type=("build", "run"))
+
+ depends_on("py-setuptools", when="@1", type="build")
+
+ depends_on("py-hatchling", when="@2", type="build")
+ depends_on("py-hatch-vcs", when="@2", type="build")
diff --git a/var/spack/repos/builtin/packages/py-paramiko/package.py b/var/spack/repos/builtin/packages/py-paramiko/package.py
index 2f2675656f..3f586403d0 100644
--- a/var/spack/repos/builtin/packages/py-paramiko/package.py
+++ b/var/spack/repos/builtin/packages/py-paramiko/package.py
@@ -14,6 +14,12 @@ class PyParamiko(PythonPackage):
license("LGPL-2.1-or-later")
+ version("3.4.0", sha256="aac08f26a31dc4dffd92821527d1682d99d52f9ef6851968114a8728f3c274d3")
+ version("3.3.1", sha256="6a3777a961ac86dbef375c5f5b8d50014a1a96d0fd7f054a43bc880134b0ff77")
+ version("3.3.0", sha256="ef639f5b97cf7bde57b6e1706e85b7e3f5561f632e180c6c155f53560ff1701b")
+ version("3.2.0", sha256="93cdce625a8a1dc12204439d45033f3261bdb2c201648cfcdc06f9fd0f94ec29")
+ version("3.1.0", sha256="6950faca6819acd3219d4ae694a23c7a87ee38d084f70c1724b0c0dbb8b75769")
+ version("3.0.0", sha256="fedc9b1dd43bc1d45f67f1ceca10bc336605427a46dcdf8dec6bfea3edf57965")
version("2.12.0", sha256="376885c05c5d6aa6e1f4608aac2a6b5b0548b1add40274477324605903d9cd49")
version("2.9.2", sha256="944a9e5dbdd413ab6c7951ea46b0ab40713235a9c4c5ca81cfe45c6f14fa677b")
version("2.7.1", sha256="920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f")
@@ -23,11 +29,15 @@ class PyParamiko(PythonPackage):
depends_on("py-setuptools", type="build")
depends_on("py-bcrypt@3.1.3:", when="@2.7:", type=("build", "run"))
+ depends_on("py-bcrypt@3.2:", when="@3:", type=("build", "run"))
depends_on("py-cryptography@1.1:", type=("build", "run"))
depends_on("py-cryptography@2.5:", when="@2.7:", type=("build", "run"))
+ depends_on("py-cryptography@3.3:", when="@3:", type=("build", "run"))
depends_on("py-pyasn1@0.1.7:", when="@:2.1", type=("build", "run"))
depends_on("py-pynacl@1.0.1:", when="@2.7:", type=("build", "run"))
- depends_on("py-six", when="@2.9.3:", type=("build", "run"))
+ depends_on("py-pynacl@1.5:", when="@3:", type=("build", "run"))
+ depends_on("py-six", when="@2.9.3:2", type=("build", "run"))
depends_on("py-invoke@1.3:", when="+invoke", type=("build", "run"))
+ depends_on("py-invoke@2:", when="@3: +invoke", type=("build", "run"))
conflicts("+invoke", when="@2.1.2")
diff --git a/var/spack/repos/builtin/packages/py-parmed/package.py b/var/spack/repos/builtin/packages/py-parmed/package.py
index d7d281012f..755d097f99 100644
--- a/var/spack/repos/builtin/packages/py-parmed/package.py
+++ b/var/spack/repos/builtin/packages/py-parmed/package.py
@@ -19,5 +19,7 @@ class PyParmed(PythonPackage):
version("3.4.3", sha256="90afb155e3ffe69230a002922b28968464126d4450059f0bd97ceca679c6627c")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-parsl/package.py b/var/spack/repos/builtin/packages/py-parsl/package.py
index edc2b4b055..2e128a25e9 100644
--- a/var/spack/repos/builtin/packages/py-parsl/package.py
+++ b/var/spack/repos/builtin/packages/py-parsl/package.py
@@ -24,6 +24,8 @@ class PyParsl(PythonPackage):
version("1.2.0", sha256="342c74ee39fa210d74b8adfb455f0a9c20d9f059ec5bd9d60c5bdc9929abcdcc")
version("1.1.0", sha256="6a623d3550329f028775950d23a2cafcb0f82b199f15940180410604aa5d102c")
+ depends_on("c", type="build") # generated
+
variant("monitoring", default=False, description="enable live monitoring")
# See https://parsl.readthedocs.io/en/stable/userguide/monitoring.html
diff --git a/var/spack/repos/builtin/packages/py-parso/package.py b/var/spack/repos/builtin/packages/py-parso/package.py
index aea20abad2..abcd9771fe 100644
--- a/var/spack/repos/builtin/packages/py-parso/package.py
+++ b/var/spack/repos/builtin/packages/py-parso/package.py
@@ -16,6 +16,7 @@ class PyParso(PythonPackage):
license("MIT")
+ version("0.8.4", sha256="eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d")
version("0.8.3", sha256="8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0")
version("0.8.2", sha256="12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398")
version("0.8.1", sha256="8519430ad07087d4c997fda3a7918f7cfa27cb58972a8c89c2a0295a1c940e9e")
@@ -23,7 +24,11 @@ class PyParso(PythonPackage):
version("0.6.1", sha256="56b2105a80e9c4df49de85e125feb6be69f49920e121406f15e7acde6c9dfc57")
version("0.4.0", sha256="2e9574cb12e7112a87253e14e2c380ce312060269d04bd018478a3c92ea9a376")
- depends_on("python@3.6:", type=("build", "run"), when="@0.8.1:")
- depends_on("python@2.7:2.8,3.4:", type=("build", "run"), when="@0.6.1:")
- depends_on("python@2.6:2.8,3.3:", type=("build", "run"), when="@0.4.0:")
+ with default_args(type=("build", "run")):
+ depends_on("python@:3.13", when="@:0.8.4")
+ # https://github.com/davidhalter/parso/commit/f7bea28bcc3a1862075e5b61a08d703d72be94aa
+ depends_on("python@:3.12", when="@:0.8.3")
+ # https://github.com/davidhalter/parso/commit/285492f4ed25f145859630ee6c5625e60aff6e2e
+ depends_on("python@:3.11", when="@:0.8.2")
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-partd/package.py b/var/spack/repos/builtin/packages/py-partd/package.py
index 13fdca33db..19a507574c 100644
--- a/var/spack/repos/builtin/packages/py-partd/package.py
+++ b/var/spack/repos/builtin/packages/py-partd/package.py
@@ -12,8 +12,10 @@ class PyPartd(PythonPackage):
homepage = "https://github.com/dask/partd/"
pypi = "partd/partd-0.3.8.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("1.4.2", sha256="d022c33afbdc8405c226621b015e8067888173d85f7f5ecebb3cafed9a20f02c")
+ version("1.4.1", sha256="56c25dd49e6fea5727e731203c466c6e092f308d8f0024e199d02f6aa2167f67")
version("1.4.0", sha256="aa0ff35dbbcc807ae374db56332f4c1b39b46f67bf2975f5151e0b4186aed0d5")
version("1.1.0", sha256="6e258bf0810701407ad1410d63d1a15cfd7b773fd9efe555dac6bb82cc8832b0")
version("0.3.10", sha256="33722a228ebcd1fa6f44b1631bdd4cff056376f89eb826d7d880b35b637bcfba")
@@ -21,6 +23,9 @@ class PyPartd(PythonPackage):
depends_on("python@3.5:", type=("build", "run"), when="@1.1.0:")
depends_on("python@3.7:", type=("build", "run"), when="@1.4.0:")
+ depends_on("python@3.9:", type=("build", "run"), when="@1.4.2:")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@61.2:", type="build", when="@1.4.2:")
+ depends_on("py-versioneer@0.29 +toml", type="build", when="@1.4.2:")
depends_on("py-locket", type=("build", "run"))
depends_on("py-toolz", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-particle/package.py b/var/spack/repos/builtin/packages/py-particle/package.py
index ab4aedaa66..b2be054548 100644
--- a/var/spack/repos/builtin/packages/py-particle/package.py
+++ b/var/spack/repos/builtin/packages/py-particle/package.py
@@ -22,6 +22,8 @@ class PyParticle(PythonPackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("0.24.0", sha256="8ab4b5dd4547ba2dae8354955a435210892a575dff46f323cac6cf40600b976a")
+ version("0.23.1", sha256="eee28b0e846bfea4dfd70e9ec5ffe3244613db08b6b6a9b773f55a4310752fab")
version("0.23.0", sha256="d810f8fc27deb8e7fd64174017d9607d50522249c0973a0008e580f93db11750")
version("0.22.1", sha256="dcb45025cf7cff901e2c94922d150e1103245c46f2671eae4193c5fa767cc56c")
version("0.22.0", sha256="567bb3017cb7526f9c9ef4399e9ba5acbdb5b9ce93eb18e4da6479d3181c93a5")
@@ -41,13 +43,15 @@ class PyParticle(PythonPackage):
depends_on("python@2.7:2.8,3.5:", when="@:0.19", type=("build", "run"))
depends_on("python@3.6:", when="@0.20:", type=("build", "run"))
depends_on("python@3.7:", when="@0.21:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.24:", type=("build", "run"))
depends_on("py-setuptools", when="@:0.20", type="build")
depends_on("py-setuptools-scm@3.4:+toml", when="@:0.20", type="build")
depends_on("py-hatchling", when="@0.21:", type="build")
depends_on("py-hatch-vcs", when="@0.21:", type="build")
depends_on("py-importlib-resources@2:", when="@0.16: ^python@:3.8", type=("build", "run"))
- depends_on("py-typing-extensions", when="@0.16: ^python@:3.7", type=("build", "run"))
- depends_on("py-deprecated", when="@0.22.0:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.5:", when="@0.23.1: ^python@:3.12", type=("build", "run"))
+ depends_on("py-typing-extensions", when="@0.16:0.23.0 ^python@:3.7", type=("build", "run"))
+ depends_on("py-deprecated", when="@0.22.0:0.23.0", type=("build", "run"))
depends_on("py-attrs@19.2.0:", type=("build", "run"))
depends_on("py-hepunits@1.2.0:", when="@:0.12", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pathspec/package.py b/var/spack/repos/builtin/packages/py-pathspec/package.py
index 3921b4770f..ce6044f647 100644
--- a/var/spack/repos/builtin/packages/py-pathspec/package.py
+++ b/var/spack/repos/builtin/packages/py-pathspec/package.py
@@ -22,6 +22,7 @@ class PyPathspec(PythonPackage):
version("0.10.1", sha256="7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d")
version("0.9.0", sha256="e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1")
version("0.8.1", sha256="86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd")
+ version("0.5.5", sha256="72c495d1bbe76674219e307f6d1c6062f2e1b0b483a5e4886435127d0df3d0d3")
version("0.3.4", sha256="7605ca5c26f554766afe1d177164a2275a85bb803b76eba3428f422972f66728")
depends_on("python@3.7:", when="@0.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py
index 41621f4a02..e5bac4262e 100644
--- a/var/spack/repos/builtin/packages/py-pbr/package.py
+++ b/var/spack/repos/builtin/packages/py-pbr/package.py
@@ -24,5 +24,7 @@ class PyPbr(PythonPackage):
version("1.10.0", sha256="186428c270309e6fdfe2d5ab0949ab21ae5f7dea831eab96701b86bd666af39c")
version("1.8.1", sha256="e2127626a91e6c885db89668976db31020f0af2da728924b56480fc7ccf09649")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pdb-tools/package.py b/var/spack/repos/builtin/packages/py-pdb-tools/package.py
new file mode 100644
index 0000000000..8cf360160b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pdb-tools/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPdbTools(PythonPackage):
+ """A swiss army knife for manipulating and editing PDB files."""
+
+ homepage = "https://haddocking.github.io/pdb-tools/"
+ pypi = "pdb-tools/pdb-tools-2.5.0.tar.gz"
+
+ license("Apache 2.0")
+
+ version("2.5.0", sha256="b76c4cd6304a15e545eff2737a76b71db31b881573e5ba3a93dba9a71a79653b")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pdm-backend/package.py b/var/spack/repos/builtin/packages/py-pdm-backend/package.py
new file mode 100644
index 0000000000..220e1b5a37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pdm-backend/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPdmBackend(PythonPackage):
+ """The build backend used by PDM that supports latest packaging standards"""
+
+ homepage = "https://backend.pdm-project.org/"
+ pypi = "pdm_backend/pdm_backend-2.3.0.tar.gz"
+
+ license("MIT", checked_by="matz-e")
+
+ version("2.4.3", sha256="dbd9047a7ac10d11a5227e97163b617ad5d665050476ff63867d971758200728")
+ version("2.3.0", sha256="e39ed2da206d90d4a6e9eb62f6dce54ed4fa65ddf172a7d5700960d0f8a09e09")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-importlib-metadata@3.6:", type=("build", "run"), when="^python@:3.9")
diff --git a/var/spack/repos/builtin/packages/py-pdm-pep517/package.py b/var/spack/repos/builtin/packages/py-pdm-pep517/package.py
index 488972ed50..59f4a6fff5 100644
--- a/var/spack/repos/builtin/packages/py-pdm-pep517/package.py
+++ b/var/spack/repos/builtin/packages/py-pdm-pep517/package.py
@@ -17,4 +17,6 @@ class PyPdmPep517(PythonPackage):
version("1.0.4", sha256="392f8c2b47c6ec20550cb8e19e24b9dbd27373413f067b56ecd75f9767f93015")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-peachpy/package.py b/var/spack/repos/builtin/packages/py-peachpy/package.py
index c2026641b6..ea98e2ce6a 100644
--- a/var/spack/repos/builtin/packages/py-peachpy/package.py
+++ b/var/spack/repos/builtin/packages/py-peachpy/package.py
@@ -16,6 +16,9 @@ class PyPeachpy(PythonPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-opcodes@0.3.13:", type="build")
depends_on("py-six", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py
index 22a0d776bf..34b01dac5c 100644
--- a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py
+++ b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py
@@ -2,8 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-
+import spack.build_systems.cmake
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -13,21 +13,31 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC
homepage = "https://docs.pennylane.ai/projects/lightning-kokkos"
git = "https://github.com/PennyLaneAI/pennylane-lightning-kokkos.git"
- url = "https://github.com/PennyLaneAI/pennylane-lightning-kokkos/archive/refs/tags/v0.32.0.tar.gz"
maintainers("AmintorDusko", "vincentmr")
license("Apache-2.0")
version("main", branch="main")
-
+ version("master", branch="master")
+ version("0.37.0", sha256="3f70e3e3b7e4d0f6a679919c0c83e451e129666b021bb529dd02eb915d0666a0")
+ version("0.36.0", sha256="c5fb24bdaf2ebdeaf614bfb3a8bcc07ee83c2c7251a3893399bb0c189d2d1d01")
+ version("0.35.1", sha256="d39a2749d08ef2ba336ed2d6f77b3bd5f6d1b25292263a41b97943ae7538b7da")
+ version("0.35.0", sha256="1a16fd3dbf03788e4f8dd510bbb668e7a7073ca62be4d9414e2c32e0166e8bda")
+ version("0.34.0", sha256="398c3a1d4450a9f3e146204c22329da9adc3f83a1685ae69187f3b25f47824c0")
+ version("0.33.1", sha256="878f63cd1afadd52386b1aca9c0e3fb0a097b64ce8e347b325ebc7cac722e5e0")
+ version("0.33.0", sha256="c4cab4a8a1a53edc0990a2a429805dca1c6a46a7ffcc6f77c985b88cd6ff6247")
version("0.32.0", sha256="06f19dfb1073387ef9ee30c38ea44884844a771373256b694a0e1ceb87195bb2")
version("0.31.0", sha256="fe10322fee0fa7df45cd3a81d6c229a79c7dfa7f20ff7d67c65c9a28f494dc89")
version("0.30.0", sha256="7c8f0e0431f8052993cd8033a316f53590c7bf5419445d0725e214b93cbc661b")
version("0.29.1", sha256="f51ba7718defc7bb5064f690f381e04b2ec58cb09f22a171ae5f410860716e30")
+ depends_on("cxx", type="build") # generated
+
depends_on("kokkos@:3.7.2", when="@:0.30", type=("run", "build"))
- depends_on("kokkos@4:", when="@0.31:", type=("run", "build"))
+ depends_on("kokkos@4:4.1", when="@0.31", type=("run", "build"))
+ depends_on("kokkos@4:4.2", when="@0.32:0.36", type=("run", "build"))
+ depends_on("kokkos@4.3:", when="@0.37:", type=("run", "build"))
# kokkos backends
backends = {
@@ -70,16 +80,20 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC
depends_on("cmake@3.20:", type="build")
depends_on("ninja", type="build")
depends_on("python@3.8:", type=("build", "run"))
+ depends_on("python@3.9:", type=("build", "run"), when="@0.32:")
depends_on("py-setuptools", type="build")
depends_on("py-pybind11", type="link")
depends_on("py-pip", type="build")
depends_on("py-wheel", type="build")
- depends_on("py-pennylane@0.28:", type=("build", "run"), when="@:0.30")
- depends_on("py-pennylane@0.30:", type=("build", "run"), when="@0.31:")
+ depends_on("py-pennylane@0.28:0.30", type=("build", "run"), when="@:0.30")
+ depends_on("py-pennylane@0.30:", type=("build", "run"), when="@0.31")
# This requirement differs from `pennylane>=0.30` in `setup.py`,
# but the introduction of `StatePrep` demands `pennylane>=0.32`
- depends_on("py-pennylane@0.32:", type=("build", "run"), when="@0.32:")
+ depends_on("py-pennylane@0.32:", type=("build", "run"), when="@0.32")
depends_on("py-pennylane-lightning~kokkos", type=("build", "run"), when="@:0.31")
+ for v in range(33, 38):
+ depends_on(f"py-pennylane@0.{v}:", type="run", when=f"@0.{v}")
+ depends_on(f"py-pennylane-lightning@0.{v}", type=("build", "run"), when=f"@0.{v}")
# variant defined dependencies
depends_on("llvm-openmp", when="+openmp %apple-clang")
@@ -89,16 +103,27 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC
depends_on("py-pytest-mock", type="test")
depends_on("py-flaky", type="test")
+ def url_for_version(self, version):
+ extra = "-kokkos" if version <= Version("0.32.0") else ""
+ return f"https://github.com/PennyLaneAI/pennylane-lightning{extra}/archive/refs/tags/v{version}.tar.gz"
+
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
build_directory = "build"
+ def setup_build_environment(self, env):
+ env.set("PL_BACKEND", "lightning_kokkos")
+ cm_args = " ".join([s[2:] for s in self.cmake_args()])
+ env.set("CMAKE_ARGS", f"{cm_args}")
+
def cmake_args(self):
"""
Here we specify all variant options that can be dynamically specified at build time
"""
+ args_prefix = "PLKOKKOS_" if self.spec.version < Version("0.33") else ""
+
args = [
- self.define_from_variant("PLKOKKOS_BUILD_TESTS", "cpptests"),
+ self.define_from_variant(f"{args_prefix}BUILD_TESTS", "cpptests"),
self.define_from_variant("PLKOKKOS_ENABLE_NATIVE", "native"),
self.define_from_variant("PLKOKKOS_ENABLE_SANITIZER", "sanitize"),
]
@@ -108,17 +133,19 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
args.append(
"-DPLKOKKOS_ENABLE_WARNINGS=OFF"
) # otherwise build might fail due to Kokkos::InitArguments deprecated
+ if self.spec.version >= Version("0.33"):
+ args.append("-DPL_BACKEND=lightning_kokkos")
return args
def build(self, pkg, spec, prefix):
- super().build(pkg, spec, prefix)
- cm_args = ";".join([s[2:] for s in self.cmake_args()])
- args = ["-i", f"--define={cm_args}"]
- python("setup.py", "build_ext", *args)
+ if self.spec.version < Version("0.32"):
+ super().build(pkg, spec, prefix)
+ cm_args = ";".join([s[2:] for s in self.cmake_args()])
+ args = ["-i", f"--define={cm_args}"]
+ python("setup.py", "build_ext", *args)
def install(self, pkg, spec, prefix):
- pip_args = std_pip_args + [f"--prefix={prefix}", "."]
- pip(*pip_args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
super().install(pkg, spec, prefix)
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py
index d2cf5c0d4e..3e950aad45 100644
--- a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py
+++ b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.cmake
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -12,18 +14,27 @@ class PyPennylaneLightning(CMakePackage, PythonExtension):
homepage = "https://docs.pennylane.ai/projects/lightning"
git = "https://github.com/PennyLaneAI/pennylane-lightning.git"
- url = "https://github.com/PennyLaneAI/pennylane-lightning/archive/refs/tags/v0.32.0.tar.gz"
+ url = "https://github.com/PennyLaneAI/pennylane-lightning/archive/refs/tags/v0.37.0.tar.gz"
- maintainers("mlxd", "AmintorDusko")
+ maintainers("mlxd", "AmintorDusko", "vincentmr")
license("Apache-2.0")
version("master", branch="master")
+ version("0.37.0", sha256="3f70e3e3b7e4d0f6a679919c0c83e451e129666b021bb529dd02eb915d0666a0")
+ version("0.36.0", sha256="c5fb24bdaf2ebdeaf614bfb3a8bcc07ee83c2c7251a3893399bb0c189d2d1d01")
+ version("0.35.1", sha256="d39a2749d08ef2ba336ed2d6f77b3bd5f6d1b25292263a41b97943ae7538b7da")
+ version("0.35.0", sha256="1a16fd3dbf03788e4f8dd510bbb668e7a7073ca62be4d9414e2c32e0166e8bda")
+ version("0.34.0", sha256="398c3a1d4450a9f3e146204c22329da9adc3f83a1685ae69187f3b25f47824c0")
+ version("0.33.1", sha256="878f63cd1afadd52386b1aca9c0e3fb0a097b64ce8e347b325ebc7cac722e5e0")
+ version("0.33.0", sha256="c4cab4a8a1a53edc0990a2a429805dca1c6a46a7ffcc6f77c985b88cd6ff6247")
version("0.32.0", sha256="124edae1828c7e72e7b3bfbb0e75e98a07a490d7f1eab19eebb3311bfa8a23d4")
version("0.31.0", sha256="b177243625b6fdac0699d163bbc330c92ca87fb9f427643785069273d2a255f6")
version("0.30.0", sha256="0f4032409d20d00991b5d14fe0b2b928baca4a13c5a1b16eab91f61f9273e58d")
version("0.29.0", sha256="da9912f0286d1a54051cc19cf8bdbdcd732795636274c95f376db72a88e52d85")
+ depends_on("cxx", type="build") # generated
+
variant("blas", default=True, description="Build with BLAS support")
variant(
"dispatcher",
@@ -64,6 +75,11 @@ class PyPennylaneLightning(CMakePackage, PythonExtension):
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
build_directory = "build"
+ def setup_build_environment(self, env):
+ env.set("PL_BACKEND", "lightning_qubit")
+ cm_args = " ".join([s[2:] for s in self.cmake_args()])
+ env.set("CMAKE_ARGS", f"{cm_args}")
+
def cmake_args(self):
"""
Here we specify all variant options that can be dynamicaly specified at build time
@@ -74,9 +90,10 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("ENABLE_BLAS", "blas"),
self.define_from_variant("CMAKE_VERBOSE_MAKEFILE:BOOL", "verbose"),
self.define_from_variant("BUILD_TESTS", "cpptests"),
- self.define_from_variant("BUILD_BENCHMARKS", "cppbenchmarks"),
self.define_from_variant("ENABLE_GATE_DISPATCHER", "dispatcher"),
]
+ if self.spec.version < Version("0.32"):
+ args.append(self.define_from_variant("BUILD_BENCHMARKS", "cppbenchmarks"))
if "+kokkos" in self.spec:
args += [
@@ -90,20 +107,15 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
return args
def build(self, pkg, spec, prefix):
- super().build(pkg, spec, prefix)
- cm_args = ";".join(
- [
- s[2:]
- for s in self.cmake_args()
- if s[2:] not in ["BUILD_TESTS:BOOL=ON", "BUILD_BENCHMARKS:BOOL=ON"]
- ]
- )
- args = ["-i", f"--define={cm_args}"]
- python("setup.py", "build_ext", *args)
+ if self.spec.version < Version("0.32"):
+ super().build(pkg, spec, prefix)
+ skipped_args = ["BUILD_TESTS:BOOL=ON", "BUILD_BENCHMARKS:BOOL=ON"]
+ cm_args = ";".join([s[2:] for s in self.cmake_args() if s[2:] not in skipped_args])
+ args = ["-i", f"--define={cm_args}"]
+ python("setup.py", "build_ext", *args)
def install(self, pkg, spec, prefix):
- pip_args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*pip_args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
super().install(pkg, spec, prefix)
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/py-pennylane/package.py b/var/spack/repos/builtin/packages/py-pennylane/package.py
index 0464309adb..9d8620e322 100644
--- a/var/spack/repos/builtin/packages/py-pennylane/package.py
+++ b/var/spack/repos/builtin/packages/py-pennylane/package.py
@@ -12,13 +12,20 @@ class PyPennylane(PythonPackage):
homepage = "https://docs.pennylane.ai/"
git = "https://github.com/PennyLaneAI/pennylane.git"
- url = "https://github.com/PennyLaneAI/pennylane/archive/refs/tags/v0.32.0.tar.gz"
+ url = "https://github.com/PennyLaneAI/pennylane/archive/refs/tags/v0.37.0.tar.gz"
- maintainers("mlxd", "AmintorDusko", "marcodelapierre")
+ maintainers("mlxd", "AmintorDusko", "marcodelapierre", "vincentmr")
license("Apache-2.0")
version("master", branch="master")
+ version("0.37.0", sha256="3e5eaab9da28ac43099e5850fde0c5763bc4e37271804463fc35dab8b08e2f15")
+ version("0.36.0", sha256="10ae174b8fd47de12c1174fd5236c26b50ff40e679b658b3446660e063fb64e1")
+ version("0.35.1", sha256="5a234d0605012f3d0201fdcfd2bfe84205a09c8ac42801fe7123eddddec71366")
+ version("0.35.0", sha256="3b99185661e8a0d0f7bc2dcc9cfa51dde20e99708c3c7d858c4732f0eb774716")
+ version("0.34.0", sha256="f76f544212c028a8f882ce7f66639e7f7c4c9213277bde0454c7f3a7d9d46538")
+ version("0.33.1", sha256="89d02bfe3a37abd13dcdb2f34f00a38e9e60a13af66a97911c8558f77ff4e32e")
+ version("0.33.0", sha256="b41c843a432c5869fc63dc35c9e9d53bec64d296ca0e0eeb1c9b83d95a68c3f1")
version("0.32.0", sha256="8a2206268d7cae0a59f9067b6075175eec93f4843519b371f02716c49a22e750")
version("0.31.0", sha256="f3b68700825c120e44434ed2b2ab71d0be9d3111f3043077ec0598661ec33477")
version("0.30.0", sha256="7fe4821fbc733e3e40d7011e054bd2e31edde3151fd9539025c827a5a3579d6b")
@@ -28,32 +35,40 @@ class PyPennylane(PythonPackage):
depends_on("python@3.9:", type=("build", "run"), when="@0.32.0:")
depends_on("py-pip", type=("build", "run")) # Runtime req for pennylane.about()
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type=("build", "run"), when="@0.33")
- depends_on("py-numpy@:1.23", type=("build", "run"))
+ depends_on("py-numpy@:1.23", type=("build", "run"), when="@:0.32.0")
+ depends_on("py-numpy@:1.26", type=("build", "run"), when="@0.33.0:")
depends_on("py-scipy", type=("build", "run"))
- depends_on("py-scipy@:1.10", type=("build", "run"), when="@:0.31.0")
+ depends_on("py-scipy@:1.10.0", type=("build", "run"), when="@:0.31")
depends_on("py-networkx", type=("build", "run"))
depends_on("py-rustworkx", type=("build", "run"), when="@0.30.0:")
depends_on("py-retworkx", type=("build", "run"), when="@0.28.0:0.29.1")
- depends_on("py-autograd@:1.5", type=("build", "run"))
+ depends_on("py-autograd@:1.5", type=("build", "run"), when="@:0.32.0")
+ depends_on("py-autograd", type=("build", "run"), when="@0.33.0:")
depends_on("py-toml", type=("build", "run"))
depends_on("py-appdirs", type=("build", "run"))
depends_on("py-semantic-version@2.7:", type=("build", "run"))
- depends_on("py-autoray@0.3.1:", type=("build", "run"))
+ depends_on("py-autoray@0.3.1:", type=("build", "run"), when="@:0.32.0")
+ depends_on("py-autoray@0.6.1:", type=("build", "run"), when="@0.33.0:")
+ depends_on("py-autoray@0.6.11:", type=("build", "run"), when="@0.37.0:")
depends_on("py-cachetools", type=("build", "run"))
- for v in range(30, 33):
- depends_on(f"py-pennylane-lightning@0.{v}.0:", type=("build", "run"), when=f"@0.{v}.0:")
depends_on(
"py-pennylane-lightning@0.28.0:0.29.0", type=("build", "run"), when="@0.28.0:0.29.1"
)
+ for v in range(30, 38):
+ depends_on(f"py-pennylane-lightning@0.{v}:", type=("build", "run"), when=f"@0.{v}:")
depends_on("py-requests", type=("build", "run"))
depends_on("py-typing-extensions", type=("build", "run"), when="@0.32.0:")
+ depends_on("py-packaging", type=("build", "run"), when="@0.37.0:")
- # Test deps
+ # The following packages are required by the `pl-device-test binary`
depends_on("py-pytest", type="test")
- depends_on("py-pytest-xdist@3.2:", type="test")
depends_on("py-pytest-mock", type="test")
depends_on("py-flaky", type="test")
+ depends_on("py-pytest-benchmark", type="test", when="@0.34.0:")
+ # Additional test deps
+ depends_on("py-pytest-xdist@3.2:", type="test")
@run_after("install")
@on_package_attributes(run_tests=True)
diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py
index ede2ff11b5..16f6ac35cb 100644
--- a/var/spack/repos/builtin/packages/py-petsc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py
@@ -20,6 +20,20 @@ class PyPetsc4py(PythonPackage):
license("BSD-2-Clause")
version("main", branch="main")
+ version("3.22.2", sha256="6c56f62ae8819069062436d362a2cc7e44f700026eed72a903c3803afbe59fc3")
+ version("3.22.1", sha256="a7fd321458b72356e46c4bc5bd93d173c9c2f91018cf21f614a631fe2aa6466a")
+ version("3.22.0", sha256="b35fc833d41c7969be8a530494fcc81741d77e0dc33fba2f4050cdbd0ad881ae")
+ version("3.21.6", sha256="d7a6d41e1463b04b9711b53b347d15f590f9354fae37aae14ad69100286129aa")
+ version("3.21.5", sha256="70e6fa795e9abd8014faec0203cd0cc3efd79f4647c97cafc33776421c9ab1e8")
+ version("3.21.4", sha256="4ba702558cc91186912eeacef26b171255f3adaa7ea02bec40c2f4c919eccecd")
+ version("3.21.3", sha256="1c3664d5b527354171077c89c4b1fef3df4a41be7196d12bca74b2759c7e2648")
+ version("3.21.2", sha256="6ce1e1a45407da300c6869d0d9abe17b5b077424aa4895713642dda0bb19ab4e")
+ version("3.21.1", sha256="ea8c6afb16541167d39f87d5fcad98c32d856fe8a2173504ef2a31c16647d53d")
+ version("3.21.0", sha256="b2000a3f8ef60920e1f82fa4772372d7941bc737bcc421a234a2507097a44d00")
+ version("3.20.6", sha256="bcc4cb35231ba6664309ea195cc8ce8a9bb61f3e24b39be480eee59c52139dc2")
+ version("3.20.5", sha256="2f40a6a7bfdaa2bca7c1f3e739ab7c74aba8d95db05aa1d120826eec904bbc16")
+ version("3.20.4", sha256="3ebdb4c605ad59d71b7b7adc5f06b6d2a7ce9225c9b56e672923cb5bd6e43440")
+ version("3.20.3", sha256="8e10884df5ca38191b71294dc7e89f7479b18cca83fedfe27f89105e57c40785")
version("3.20.2", sha256="d3f24aa6612ded3e9b9ae11d5533f319d1df1705bea6d81385fea023d01175c9")
version("3.20.1", sha256="dcc9092040d13130496f1961b79c36468f383b6ede398080e004f1966c06ad38")
version("3.20.0", sha256="c2461eef3977ae5c214ad252520adbb92ec3a31d00e79391dd92535077bbf03e")
@@ -62,10 +76,14 @@ class PyPetsc4py(PythonPackage):
version("3.12.0", sha256="4c94a1dbbf244b249436b266ac5fa4e67080d205420805deab5ec162b979df8d")
version("3.11.0", sha256="ec114b303aadaee032c248a02021e940e43c6437647af0322d95354e6f2c06ad")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Activates MPI support")
patch("ldshared.patch", when="@:3.18")
+ depends_on("py-cython@3:", when="@3.20:", type="build")
depends_on("py-cython@0.29.32:", when="^python@3.11:", type="build")
depends_on("py-cython@0.24:", type="build")
depends_on("python@2.6:2.8,3.3:", type=("build", "run"))
@@ -76,7 +94,19 @@ class PyPetsc4py(PythonPackage):
depends_on("petsc+mpi", when="+mpi")
depends_on("petsc~mpi", when="~mpi")
depends_on("petsc@main", when="@main")
- for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]:
+ for ver in [
+ "3.22",
+ "3.21",
+ "3.20",
+ "3.19",
+ "3.18",
+ "3.17",
+ "3.16",
+ "3.15",
+ "3.13",
+ "3.12",
+ "3.11",
+ ]:
depends_on(f"petsc@{ver}", when=f"@{ver}")
depends_on("petsc@3.14.2:3.14", when="@3.14.1:3.14")
depends_on("petsc@3.14.0:3.14.1", when="@3.14.0")
diff --git a/var/spack/repos/builtin/packages/py-pexpect/package.py b/var/spack/repos/builtin/packages/py-pexpect/package.py
index 5a6346338a..d6b7759fef 100644
--- a/var/spack/repos/builtin/packages/py-pexpect/package.py
+++ b/var/spack/repos/builtin/packages/py-pexpect/package.py
@@ -9,14 +9,22 @@ from spack.package import *
class PyPexpect(PythonPackage):
"""Pexpect allows easy control of interactive console applications."""
+ homepage = "https://pexpect.readthedocs.io/en/stable/"
pypi = "pexpect/pexpect-4.2.1.tar.gz"
+ maintainers("TomMelt")
+
+ license("ISC", checked_by="tommelt")
+
+ version("4.9.0", sha256="ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f")
version("4.8.0", sha256="fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c")
version("4.7.0", sha256="9e2c1fd0e6ee3a49b28f95d4b33bc389c89b20af6a1255906e90ff1262ce62eb")
version("4.6.0", sha256="2a8e88259839571d1251d278476f3eec5db26deb73a70be5ed5dc5435e418aba")
version("4.2.1", sha256="3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92")
version("3.3", sha256="dfea618d43e83cfff21504f18f98019ba520f330e4142e5185ef7c73527de5ba")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-ptyprocess", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-phanotate/package.py b/var/spack/repos/builtin/packages/py-phanotate/package.py
index 3f88711942..3dfa74297c 100644
--- a/var/spack/repos/builtin/packages/py-phanotate/package.py
+++ b/var/spack/repos/builtin/packages/py-phanotate/package.py
@@ -21,6 +21,8 @@ class PyPhanotate(PythonPackage):
version("1.5.0", sha256="589e441d2369e5550aef98b8d99fd079d130363bf881a70ac862fc7a8e0d2c88")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-fastpath@1.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-phonopy/package.py b/var/spack/repos/builtin/packages/py-phonopy/package.py
index a92e563e61..770bc90c67 100644
--- a/var/spack/repos/builtin/packages/py-phonopy/package.py
+++ b/var/spack/repos/builtin/packages/py-phonopy/package.py
@@ -17,6 +17,8 @@ class PyPhonopy(PythonPackage):
version("1.10.0", sha256="6b7c540bbbb033203c45b8472696db02a3a55913a0e5eb23de4dc9a3bee473f7")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-photutils/package.py b/var/spack/repos/builtin/packages/py-photutils/package.py
index c0b56c9ba4..455ebd3ec1 100644
--- a/var/spack/repos/builtin/packages/py-photutils/package.py
+++ b/var/spack/repos/builtin/packages/py-photutils/package.py
@@ -19,6 +19,8 @@ class PyPhotutils(PythonPackage):
version("1.5.0", sha256="014f7aa5a571401094d5cf9ffb57803b48869233feb80476ce377ecb91113689")
+ depends_on("c", type="build") # generated
+
maintainers("meyersbs")
# From setup.cfg
diff --git a/var/spack/repos/builtin/packages/py-phydms/package.py b/var/spack/repos/builtin/packages/py-phydms/package.py
index bd8e1826cc..3fafdb822a 100644
--- a/var/spack/repos/builtin/packages/py-phydms/package.py
+++ b/var/spack/repos/builtin/packages/py-phydms/package.py
@@ -20,6 +20,8 @@ class PyPhydms(PythonPackage):
version("2.4.1", sha256="04eb50bdb07907214050d19214d9bc8cf2002e24ca30fbe6e0f23f013d584d5c")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-phylophlan/package.py b/var/spack/repos/builtin/packages/py-phylophlan/package.py
index 648f4924a3..4c31ba94d9 100644
--- a/var/spack/repos/builtin/packages/py-phylophlan/package.py
+++ b/var/spack/repos/builtin/packages/py-phylophlan/package.py
@@ -34,5 +34,5 @@ class PyPhylophlan(PythonPackage):
depends_on("mafft@7.310:", type=("build", "run"))
depends_on("fasttree@2.1.8:", type=("build", "run"))
depends_on("raxml@8.2.10:", type=("build", "run"))
- depends_on("iqtree2", type=("build", "run"))
+ depends_on("iq-tree@2", type=("build", "run"))
depends_on("mash", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pickle5/package.py b/var/spack/repos/builtin/packages/py-pickle5/package.py
index e5b6372aa7..f2c03dc108 100644
--- a/var/spack/repos/builtin/packages/py-pickle5/package.py
+++ b/var/spack/repos/builtin/packages/py-pickle5/package.py
@@ -18,5 +18,7 @@ class PyPickle5(PythonPackage):
version("0.0.11", sha256="7e013be68ba7dde1de5a8dbcc241f201dab1126e326715916ce4a26c27919ffc")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-picmistandard/package.py b/var/spack/repos/builtin/packages/py-picmistandard/package.py
index bdcf00d81c..b35dc0a4ee 100644
--- a/var/spack/repos/builtin/packages/py-picmistandard/package.py
+++ b/var/spack/repos/builtin/packages/py-picmistandard/package.py
@@ -11,30 +11,46 @@ class PyPicmistandard(PythonPackage):
homepage = "https://picmi-standard.github.io"
git = "https://github.com/picmi-standard/picmi.git"
- pypi = "picmistandard/picmistandard-0.26.0.tar.gz"
+ pypi = "picmistandard/picmistandard-0.30.0.tar.gz"
maintainers("ax3l", "dpgrote", "RemiLehe")
version("master", branch="master")
+ version("0.30.0", sha256="28b892b242e0cc044ad987d6bdc12811fe4a478d5096d6bc5989038ee9d9dab6")
+ version("0.29.0", sha256="dc0bf3ddd3635df9935ac569b3085de387150c4f8e9851897078bb12d123dde8")
+ version("0.28.0", sha256="aa980b0fb49fc3ff9c7e32b5927b3700c4660aefbf96567bac1f8c9c93bb7831")
version("0.26.0", sha256="b22689f576d064bf0cd8f435621e912359fc2ee9347350eab845d2d36ebb62eb")
version("0.25.0", sha256="3fe6a524822d382e52bfc9d3378249546075d28620969954c5ffb43e7968fb02")
version("0.24.0", sha256="55a82adcc14b41eb612caf0d9e47b0e2a56ffc196a58b41fa0cc395c6924be9a")
version("0.23.2", sha256="2853fcfaf2f226a88bb6063ae564832b7e69965294fd652cd2ac04756fa4599a")
version("0.23.1", sha256="c7375010b7a3431b519bc0accf097f2aafdb520e2a0126f42895cb96dcc7dcf1")
- version("0.0.22", sha256="e234a431274254b22cd70be64d6555b383d98426b2763ea0c174cf77bf4d0890")
- version("0.0.21", sha256="930056a23ed92dac7930198f115b6248606b57403bffebce3d84579657c8d10b")
- version("0.0.20", sha256="9c1822eaa2e4dd543b5afcfa97940516267dda3890695a6cf9c29565a41e2905")
- version("0.0.19", sha256="4b7ba1330964fbfd515e8ea2219966957c1386e0896b92d36bd9e134afb02f5a")
- version("0.0.18", sha256="68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71")
-
- depends_on("python@3.6:", type=("build", "run"))
+ version(
+ "0.0.22",
+ sha256="e234a431274254b22cd70be64d6555b383d98426b2763ea0c174cf77bf4d0890",
+ deprecated=True,
+ )
+ version(
+ "0.0.21",
+ sha256="930056a23ed92dac7930198f115b6248606b57403bffebce3d84579657c8d10b",
+ deprecated=True,
+ )
+ version(
+ "0.0.20",
+ sha256="9c1822eaa2e4dd543b5afcfa97940516267dda3890695a6cf9c29565a41e2905",
+ deprecated=True,
+ )
+ version(
+ "0.0.19",
+ sha256="4b7ba1330964fbfd515e8ea2219966957c1386e0896b92d36bd9e134afb02f5a",
+ deprecated=True,
+ )
+ version(
+ "0.0.18",
+ sha256="68c208c0c54b4786e133bb13eef0dd4824998da4906285987ddee84e6d195e71",
+ deprecated=True,
+ )
+
+ depends_on("python@3.8:", type=("build", "run"))
depends_on("py-numpy@1.15:1", type=("build", "run"))
depends_on("py-scipy@1.5:1", type=("build", "run"))
depends_on("py-setuptools", type="build")
-
- @property
- def build_directory(self):
- if self.spec.satisfies("@develop") or self.spec.satisfies("@0.0.16"):
- return "PICMI_Python"
- else:
- return "./"
diff --git a/var/spack/repos/builtin/packages/py-pillow-simd/package.py b/var/spack/repos/builtin/packages/py-pillow-simd/package.py
index cdcdc09364..59dd312678 100644
--- a/var/spack/repos/builtin/packages/py-pillow-simd/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow-simd/package.py
@@ -16,8 +16,9 @@ class PyPillowSimd(PyPillowBase):
homepage = "https://github.com/uploadcare/pillow-simd"
pypi = "Pillow-SIMD/Pillow-SIMD-7.0.0.post3.tar.gz"
- license("HPND")
-
+ version(
+ "9.5.0.post1", sha256="8c89b85c4085532752625f2cc066a28547cebb98529acf932d5d84c1a7ab2abc"
+ )
version(
"9.0.0.post1", sha256="918541cfaa90ba3c0e1bae5da31ba1b1f52b09c0009bd90183b787af4e018263"
)
@@ -28,7 +29,9 @@ class PyPillowSimd(PyPillowBase):
"6.2.2.post1", sha256="d29b673ac80091797f1e8334458be307e4ac4ab871b0e495cfe56cb7b1d7704e"
)
- for ver in ["6.2.2.post1", "7.0.0.post3", "9.0.0.post1"]:
+ depends_on("c", type="build") # generated
+
+ for ver in ["6.2.2.post1", "7.0.0.post3", "9.0.0.post1", "9.5.0.post1"]:
provides("pil@" + ver, when="@" + ver)
conflicts("target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py
index eb380ea75a..3bd7e9399e 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -9,17 +9,18 @@ from spack.package import *
class PyPillowBase(PythonPackage):
"""Base class for Pillow and its fork Pillow-SIMD."""
+ license("HPND")
maintainers("adamjstewart")
-
provides("pil")
# These defaults correspond to Pillow defaults
- # https://pillow.readthedocs.io/en/stable/installation.html#external-libraries
- VARIANTS_IN_SETUP_CFG = (
+ # https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
+ VARIANTS = (
"zlib",
"jpeg",
"tiff",
"freetype",
+ "raqm",
"lcms",
"webp",
"webpmux",
@@ -31,46 +32,68 @@ class PyPillowBase(PythonPackage):
variant("jpeg", default=True, description="JPEG functionality")
variant("tiff", default=False, description="Compressed TIFF functionality")
variant("freetype", default=False, description="Type related services")
+ variant("raqm", when="@8.2:+freetype", default=False, description="RAQM support")
variant("lcms", default=False, description="Color management")
variant("webp", default=False, description="WebP format")
- variant("webpmux", when="+webp", default=False, description="WebP metadata")
+ variant("webpmux", when="@:10+webp", default=False, description="WebP metadata")
variant("jpeg2000", default=False, description="JPEG 2000 functionality")
variant("imagequant", when="@3.3:", default=False, description="Improved color quantization")
variant("xcb", when="@7.1:", default=False, description="X11 screengrab support")
- variant("raqm", when="@8.2:", default=False, description="RAQM support")
# Required dependencies
- # https://pillow.readthedocs.io/en/latest/installation.html#python-support
- depends_on("python@3.8:3.11", when="@10:", type=("build", "link", "run"))
- depends_on("python@3.7:3.11", when="@9.3:9.5", type=("build", "link", "run"))
- depends_on("python@3.7:3.10", when="@9.0:9.2", type=("build", "link", "run"))
- depends_on("python@3.6:3.10", when="@8.3.2:8.4", type=("build", "link", "run"))
- depends_on("python@3.6:3.9", when="@8:8.3.1", type=("build", "link", "run"))
- depends_on("python@3.5:3.8", when="@7.0:7.2", type=("build", "link", "run"))
- depends_on("python@2.7:2.8,3.5:3.8", when="@6.2.1:6.2.2", type=("build", "link", "run"))
- depends_on("py-setuptools", type="build")
+ # https://pillow.readthedocs.io/en/stable/installation/python-support.html
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.9:3.13", when="@11:")
+ depends_on("python@3.8:3.13", when="@10.4")
+ depends_on("python@3.8:3.12", when="@10.1:10.3")
+ depends_on("python@3.8:3.11", when="@10.0")
+ depends_on("python@3.7:3.11", when="@9.3:9.5")
+ depends_on("python@3.7:3.10", when="@9.0:9.2")
+ depends_on("python@3.6:3.10", when="@8.3.2:8.4")
+ depends_on("python@3.6:3.9", when="@8:8.3.1")
+ depends_on("python@3.5:3.8", when="@7.0:7.2")
+ depends_on("python@2.7:2.8,3.5:3.8", when="@6.2.1:6.2.2")
+
+ # pyproject.toml
+ with default_args(type="build"):
+ depends_on("py-pip@22.1:", when="@10:")
+ depends_on("py-setuptools@67.8:", when="@10:")
+ depends_on("py-setuptools")
# Optional dependencies
- # https://pillow.readthedocs.io/en/latest/installation.html#external-libraries
+ # https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
depends_on("zlib-api", when="+zlib")
depends_on("jpeg", when="+jpeg")
depends_on("libtiff", when="+tiff")
depends_on("freetype", when="+freetype")
+ depends_on("libraqm", when="+raqm")
depends_on("lcms@2:", when="+lcms")
depends_on("libwebp", when="+webp")
depends_on("libwebp+libwebpmux+libwebpdemux", when="+webpmux")
depends_on("openjpeg", when="+jpeg2000")
depends_on("libimagequant", when="+imagequant")
depends_on("libxcb", when="+xcb")
- depends_on("libraqm", when="+raqm")
- # Conflicting options
- conflicts("+raqm", when="~freetype")
+ patch(
+ "https://github.com/python-pillow/Pillow/commit/1c11d4581c5705dfa21bc5a4f3b6980c556978bf.patch?full_index=1",
+ sha256="599f37e6a5a8d1adb9f4025ffc7cae5f5b61cad60a04e7c7a3015f9e350047bb",
+ when="@11.0.0",
+ )
- def patch(self):
- """Patch setup.py to provide library and include directories
- for dependencies."""
+ @when("@10:")
+ def config_settings(self, spec, prefix):
+ settings = {"parallel": make_jobs}
+
+ for variant in self.VARIANTS:
+ if spec.satisfies(f"+{variant}"):
+ settings[variant] = "enable"
+ elif spec.satisfies(f"~{variant}"):
+ settings[variant] = "disable"
+ return settings
+
+ def patch(self):
+ """Patch setup.py to provide library and include directories for dependencies."""
library_dirs = []
include_dirs = []
for dep in self.spec.dependencies(deptype="link"):
@@ -79,23 +102,42 @@ class PyPillowBase(PythonPackage):
include_dirs.extend(query.headers.directories)
setup = FileFilter("setup.py")
- setup.filter("library_dirs = []", "library_dirs = {0}".format(library_dirs), string=True)
- setup.filter("include_dirs = []", "include_dirs = {0}".format(include_dirs), string=True)
-
- def variant_to_cfg(variant):
- able = "enable" if "+" + variant in self.spec else "disable"
- return "{0}_{1}=1\n".format(able, variant)
-
- with open("setup.cfg", "a") as setup:
- setup.write("[build_ext]\n")
- for variant in self.VARIANTS_IN_SETUP_CFG:
- setup.write(variant_to_cfg(variant))
-
- setup.write("rpath={0}\n".format(":".join(self.rpath)))
- setup.write("[install]\n")
-
+ if self.version >= Version("11"):
+ setup.filter(
+ "library_dirs: list[str] = []",
+ "library_dirs = {0}".format(library_dirs),
+ string=True,
+ )
+ setup.filter(
+ "include_dirs: list[str] = []",
+ "include_dirs = {0}".format(include_dirs),
+ string=True,
+ )
+ else:
+ setup.filter(
+ "library_dirs = []", "library_dirs = {0}".format(library_dirs), string=True
+ )
+ setup.filter(
+ "include_dirs = []", "include_dirs = {0}".format(include_dirs), string=True
+ )
+
+ if self.spec.satisfies("@:9"):
+
+ def variant_to_cfg(variant):
+ able = "enable" if "+" + variant in self.spec else "disable"
+ return "{0}_{1}=1\n".format(able, variant)
+
+ with open("setup.cfg", "a") as setup:
+ setup.write("[build_ext]\n")
+ for variant in self.VARIANTS:
+ setup.write(variant_to_cfg(variant))
+
+ setup.write("rpath={0}\n".format(":".join(self.rpath)))
+ setup.write("[install]\n")
+
+ @when("@:9")
def setup_build_environment(self, env):
- env.set("MAX_CONCURRENCY", str(make_jobs))
+ env.set("MAX_CONCURRENCY", make_jobs)
class PyPillow(PyPillowBase):
@@ -105,10 +147,14 @@ class PyPillow(PyPillowBase):
capabilities."""
homepage = "https://python-pillow.org/"
- pypi = "Pillow/Pillow-7.2.0.tar.gz"
-
- license("HPND")
-
+ pypi = "pillow/pillow-10.2.0.tar.gz"
+
+ version("11.0.0", sha256="72bacbaf24ac003fea9bff9837d1eedb6088758d41e100c1552930151f677739")
+ version("10.4.0", sha256="166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06")
+ version("10.3.0", sha256="9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d")
+ version("10.2.0", sha256="e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e")
+ version("10.1.0", sha256="e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38")
+ version("10.0.1", sha256="d72967b06be9300fed5cfbc8b5bafceec48bf7cdc7dab66b1d2549035287191d")
version("10.0.0", sha256="9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396")
version("9.5.0", sha256="bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1")
version("9.4.0", sha256="a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e")
@@ -125,7 +171,15 @@ class PyPillow(PyPillowBase):
version("6.2.2", sha256="db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950")
version("6.2.1", sha256="bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1")
+ depends_on("c", type="build")
+
for ver in [
+ "11.0.0",
+ "10.4.0",
+ "10.3.0",
+ "10.2.0",
+ "10.1.0",
+ "10.0.1",
"10.0.0",
"9.5.0",
"9.4.0",
@@ -143,3 +197,11 @@ class PyPillow(PyPillowBase):
"6.2.1",
]:
provides("pil@" + ver, when="@" + ver)
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/{0}/{0}illow/{0}illow-{1}.tar.gz"
+ if version >= Version("10.2"):
+ letter = "p"
+ else:
+ letter = "P"
+ return url.format(letter, version)
diff --git a/var/spack/repos/builtin/packages/py-pint/package.py b/var/spack/repos/builtin/packages/py-pint/package.py
index cbd8f48575..3d5aa15591 100644
--- a/var/spack/repos/builtin/packages/py-pint/package.py
+++ b/var/spack/repos/builtin/packages/py-pint/package.py
@@ -21,6 +21,7 @@ class PyPint(PythonPackage):
version("0.22", sha256="2d139f6abbcf3016cad7d3cec05707fe908ac4f99cf59aedfd6ee667b7a64433")
version("0.21.1", sha256="5d5b6b518d0c5a7ab03a776175db500f1ed1523ee75fb7fafe38af8149431c8d")
version("0.20.1", sha256="387cf04078dc7dfe4a708033baad54ab61d82ab06c4ee3d4922b1e45d5626067")
+ version("0.19.2", sha256="e1d4989ff510b378dad64f91711e7bdabe5ca78d75b06a18569ac454678c4baf")
version("0.18", sha256="8c4bce884c269051feb7abc69dbfd18403c0c764abc83da132e8a7222f8ba801")
version("0.17", sha256="f4d0caa713239e6847a7c6eefe2427358566451fe56497d533f21fb590a3f313")
version("0.11", sha256="308f1070500e102f83b6adfca6db53debfce2ffc5d3cbe3f6c367da359b5cf4d")
diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py
index de4bff43cc..467ccf4c0d 100644
--- a/var/spack/repos/builtin/packages/py-pip/package.py
+++ b/var/spack/repos/builtin/packages/py-pip/package.py
@@ -2,9 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
import os
+import sys
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -24,78 +25,51 @@ class PyPip(Package, PythonExtension):
license("MIT")
- version(
- "23.1.2",
- sha256="3ef6ac33239e4027d9a5598a381b9d30880a1477e50039db2eac6e8a8f6d1b18",
- expand=False,
- )
- version(
- "23.0",
- sha256="b5f88adff801f5ef052bcdef3daa31b55eb67b0fccd6d0106c206fa248e0463c",
- expand=False,
- )
- version(
- "22.2.2",
- sha256="b61a374b5bc40a6e982426aede40c9b5a08ff20e640f5b56977f4f91fed1e39a",
- expand=False,
- )
- version(
- "22.1.2",
- sha256="a3edacb89022ef5258bf61852728bf866632a394da837ca49eb4303635835f17",
- expand=False,
- )
- version(
- "21.3.1",
- sha256="deaf32dcd9ab821e359cd8330786bcd077604b5c5730c0b096eda46f95c24a2d",
- expand=False,
- )
- version(
- "21.1.2",
- sha256="f8ea1baa693b61c8ad1c1d8715e59ab2b93cd3c4769bacab84afcc4279e7a70e",
- expand=False,
- )
- version(
- "20.2",
- sha256="d75f1fc98262dabf74656245c509213a5d0f52137e40e8f8ed5cc256ddd02923",
- expand=False,
- )
- version(
- "19.3",
- sha256="e100a7eccf085f0720b4478d3bb838e1c179b1e128ec01c0403f84e86e0e2dfb",
- expand=False,
- )
- version(
- "19.1.1",
- sha256="993134f0475471b91452ca029d4390dc8f298ac63a712814f101cd1b6db46676",
- expand=False,
- )
- version(
- "19.0.3",
- sha256="bd812612bbd8ba84159d9ddc0266b7fbce712fc9bc98c82dee5750546ec8ec64",
- expand=False,
- )
- version(
- "18.1",
- sha256="7909d0a0932e88ea53a7014dfd14522ffef91a464daaaf5c573343852ef98550",
- expand=False,
- )
- version(
- "10.0.1",
- sha256="717cdffb2833be8409433a93746744b59505f42146e8d37de6c62b430e25d6d7",
- expand=False,
- )
- version(
- "9.0.1",
- sha256="690b762c0a8460c303c089d5d0be034fb15a5ea2b75bdf565f40421f542fefb0",
- expand=False,
- )
+ version("24.3.1", sha256="3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed")
+ version("24.2", sha256="2cd581cf58ab7fcfca4ce8efa6dcacd0de5bf8d0a3eb9ec927e07405f4d9e2a2")
+ version("24.1.2", sha256="7cd207eed4c60b0f411b444cd1464198fe186671c323b6cd6d433ed80fc9d247")
+ version("24.0", sha256="ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc")
+ version("23.3.2", sha256="5052d7889c1f9d05224cd41741acb7c5d6fa735ab34e339624a614eaaa7e7d76")
+ version("23.2.1", sha256="7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be")
+ version("23.1.2", sha256="3ef6ac33239e4027d9a5598a381b9d30880a1477e50039db2eac6e8a8f6d1b18")
+ version("23.0", sha256="b5f88adff801f5ef052bcdef3daa31b55eb67b0fccd6d0106c206fa248e0463c")
+ version("22.2.2", sha256="b61a374b5bc40a6e982426aede40c9b5a08ff20e640f5b56977f4f91fed1e39a")
+ version("22.1.2", sha256="a3edacb89022ef5258bf61852728bf866632a394da837ca49eb4303635835f17")
+ version("21.3.1", sha256="deaf32dcd9ab821e359cd8330786bcd077604b5c5730c0b096eda46f95c24a2d")
+ version("21.1.2", sha256="f8ea1baa693b61c8ad1c1d8715e59ab2b93cd3c4769bacab84afcc4279e7a70e")
+ version("20.2", sha256="d75f1fc98262dabf74656245c509213a5d0f52137e40e8f8ed5cc256ddd02923")
+ version("19.3", sha256="e100a7eccf085f0720b4478d3bb838e1c179b1e128ec01c0403f84e86e0e2dfb")
+ version("19.1.1", sha256="993134f0475471b91452ca029d4390dc8f298ac63a712814f101cd1b6db46676")
+ version("19.0.3", sha256="bd812612bbd8ba84159d9ddc0266b7fbce712fc9bc98c82dee5750546ec8ec64")
+ version("18.1", sha256="7909d0a0932e88ea53a7014dfd14522ffef91a464daaaf5c573343852ef98550")
+ version("10.0.1", sha256="717cdffb2833be8409433a93746744b59505f42146e8d37de6c62b430e25d6d7")
+ version("9.0.1", sha256="690b762c0a8460c303c089d5d0be034fb15a5ea2b75bdf565f40421f542fefb0")
extends("python")
+ depends_on("python@3.8:", when="@24.1:", type=("build", "run"))
depends_on("python@3.7:", when="@22:", type=("build", "run"))
# Uses collections.MutableMapping
depends_on("python@:3.9", when="@:19.1", type=("build", "run"))
+ resource(
+ name="pip-bootstrap",
+ url="https://bootstrap.pypa.io/pip/zipapp/pip-22.3.1.pyz",
+ checksum="c9363c70ad91d463f9492a8a2c89f60068f86b0239bd2a6aa77367aab5fefb3e",
+ when="platform=windows ^python@:3.11",
+ placement={"pip-22.3.1.pyz": "pip.pyz"},
+ expand=False,
+ )
+
+ resource(
+ name="pip-bootstrap",
+ url="https://bootstrap.pypa.io/pip/zipapp/pip-23.1.pyz",
+ checksum="d9f2fe58c472f9107964df35954f8b74e68c307497a12364b00dc28f36f96816",
+ when="platform=windows ^python@3.12:",
+ placement={"pip-23.1.pyz": "pip.pyz"},
+ expand=False,
+ )
+
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/{0}/p/pip/pip-{1}-{0}-none-any.whl"
if version >= Version("21"):
@@ -110,10 +84,14 @@ class PyPip(Package, PythonExtension):
# itself, see:
# https://discuss.python.org/t/bootstrapping-a-specific-version-of-pip/12306
whl = self.stage.archive_file
- args = [os.path.join(whl, "pip")] + std_pip_args + ["--prefix=" + prefix, whl]
- python(*args)
+ if sys.platform == "win32":
+ # On Windows for newer versions of pip, you must bootstrap pip first.
+ # In order to achieve this, use the pip.pyz zipapp version of pip to
+ # bootstrap the pip wheel install.
+ script = os.path.join(self.stage.source_path, "pip.pyz")
+ else:
+ script = os.path.join(whl, "pip")
+ python(script, *PythonPipBuilder.std_args(self), f"--prefix={prefix}", whl)
- def setup_dependent_package(self, module, dependent_spec):
- pip = dependent_spec["python"].command
- pip.add_default_arg("-m", "pip")
- setattr(module, "pip", pip)
+ def setup_dependent_package(self, module, dependent_spec: Spec):
+ setattr(module, "pip", python.with_default_args("-m", "pip"))
diff --git a/var/spack/repos/builtin/packages/py-pivy/package.py b/var/spack/repos/builtin/packages/py-pivy/package.py
index 1df73c9419..95c5ab871b 100644
--- a/var/spack/repos/builtin/packages/py-pivy/package.py
+++ b/var/spack/repos/builtin/packages/py-pivy/package.py
@@ -16,6 +16,8 @@ class PyPivy(PythonPackage):
version("0.6.8", sha256="c443dd7dd724b0bfa06427478b9d24d31e0c3b5138ac5741a2917a443b28f346")
+ depends_on("cxx", type="build") # generated
+
depends_on("coin3d")
depends_on("py-setuptools", type="build")
depends_on("cmake@3.18:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-plotille/package.py b/var/spack/repos/builtin/packages/py-plotille/package.py
new file mode 100644
index 0000000000..a232da9a56
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-plotille/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPlotille(PythonPackage):
+ """Plot in the terminal using braille dots."""
+
+ homepage = "https://github.com/tammoippen/plotille"
+ pypi = "plotille/plotille-5.0.0.tar.gz"
+ git = "https://github.com/tammoippen/plotille.git"
+
+ version("5.0.0", sha256="99e5ca51a2e4c922ead3a3b0863cc2c6a9a4b3f701944589df10f42ce02ab3dc")
+
+ license("MIT")
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-plotly/package.py b/var/spack/repos/builtin/packages/py-plotly/package.py
index 2b2a02adb1..25cb44c4db 100644
--- a/var/spack/repos/builtin/packages/py-plotly/package.py
+++ b/var/spack/repos/builtin/packages/py-plotly/package.py
@@ -16,11 +16,18 @@ class PyPlotly(PythonPackage):
license("MIT")
+ version("5.20.0", sha256="bf901c805d22032cfa534b2ff7c5aa6b0659e037f19ec1e0cca7f585918b5c89")
+ version("5.19.0", sha256="5ea91a56571292ade3e3bc9bf712eba0b95a1fb0a941375d978cc79432e055f4")
+ version("5.18.0", sha256="360a31e6fbb49d12b007036eb6929521343d6bee2236f8459915821baefa2cbb")
+ version("5.17.0", sha256="290d796bf7bab87aad184fe24b86096234c4c95dcca6ecbca02d02bdf17d3d97")
+ version("5.16.1", sha256="295ac25edeb18c893abb71dcadcea075b78fd6fdf07cee4217a4e1009667925b")
+ version("5.15.0", sha256="822eabe53997d5ebf23c77e1d1fcbf3bb6aa745eb05d532afd4b6f9a2e2ab02f")
version("5.14.1", sha256="bcac86d7fcba3eff7260c1eddc36ca34dae2aded10a0709808446565e0e53b93")
version("5.2.2", sha256="809f0674a7991daaf4f287964d617d24e9fa44463acd5a5352ebd874cfd98b07")
version("2.2.0", sha256="ca668911ffb4d11fed6d7fbb12236f8ecc6a7209db192326bcb64bdb41451a58")
- depends_on("python@3.6:", when="@5.2.2:", type=("build", "run"))
+ depends_on("python@3.6:3.11", when="@5.2.2:5.18.0", type=("build", "run"))
+ depends_on("python@3.8:3.11", when="@5.19.0:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@40.8.0:", when="@5.14.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pluggy/package.py b/var/spack/repos/builtin/packages/py-pluggy/package.py
index 0308e22d2d..4c68dc482a 100644
--- a/var/spack/repos/builtin/packages/py-pluggy/package.py
+++ b/var/spack/repos/builtin/packages/py-pluggy/package.py
@@ -14,6 +14,8 @@ class PyPluggy(PythonPackage):
license("MIT")
+ version("1.5.0", sha256="2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1")
+ version("1.4.0", sha256="8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be")
version("1.0.0", sha256="4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159")
version("0.13.0", sha256="fa5fa1622fa6dd5c030e9cad086fa19ef6a0cf6d7a2d12318e10cb49d6d68f34")
version("0.12.0", sha256="0825a152ac059776623854c1543d65a4ad408eb3d33ee114dff91e57ec6ae6fc")
@@ -22,9 +24,13 @@ class PyPluggy(PythonPackage):
version("0.7.1", sha256="95eb8364a4708392bae89035f45341871286a333f749c3141c20573d2b3876e1")
version("0.6.0", sha256="7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff")
- depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"), when="@1.0.0:")
+ with default_args(type="build"):
+ depends_on("py-setuptools@45:", when="@1.1:")
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm@6.2.3:+toml", when="@1.1:")
+ depends_on("py-setuptools-scm")
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-scm", type="build")
- depends_on("py-importlib-metadata@0.12:", when="^python@:3.7", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("python@3.8:", when="@1.3:")
+ depends_on("python@3.7:", when="@1.1:")
+ depends_on("py-importlib-metadata@0.12:", when="^python@:3.7")
diff --git a/var/spack/repos/builtin/packages/py-poetry-core/package.py b/var/spack/repos/builtin/packages/py-poetry-core/package.py
index 0362efcbc3..9e82b28a78 100644
--- a/var/spack/repos/builtin/packages/py-poetry-core/package.py
+++ b/var/spack/repos/builtin/packages/py-poetry-core/package.py
@@ -14,6 +14,7 @@ class PyPoetryCore(PythonPackage):
license("MIT")
+ version("1.8.1", sha256="67a76c671da2a70e55047cddda83566035b701f7e463b32a2abfeac6e2a16376")
version("1.7.0", sha256="8f679b83bd9c820082637beca1204124d5d2a786e4818da47ec8acefd0353b74")
version("1.6.1", sha256="0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3")
version("1.2.0", sha256="ceccec95487e46c63a41761fbac5211b809bca22658e25a049f4c7da96269f71")
@@ -21,6 +22,8 @@ class PyPoetryCore(PythonPackage):
version("1.0.8", sha256="951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118")
version("1.0.7", sha256="98c11c755a16ef6c5673c22ca94a3802a7df4746a0853a70b6fae8b9f5cac206")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:3", when="@1.7.0:", type=("build", "run"))
depends_on("python@3.7:3", when="@1.1.0:", type=("build", "run"))
depends_on("python@:3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py b/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py
index 1386413016..c2baa0b5cb 100644
--- a/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py
+++ b/var/spack/repos/builtin/packages/py-poetry-dynamic-versioning/package.py
@@ -10,10 +10,11 @@ class PyPoetryDynamicVersioning(PythonPackage):
"""Plugin for Poetry to enable dynamic versioning based on VCS tags."""
homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning"
- pypi = "poetry-dynamic-versioning/poetry-dynamic-versioning-0.19.0.tar.gz"
+ pypi = "poetry_dynamic_versioning/poetry_dynamic_versioning-1.4.0.tar.gz"
license("MIT")
+ version("1.4.0", sha256="725178bd50a22f2dd4035de7f965151e14ecf8f7f19996b9e536f4c5559669a7")
version("0.19.0", sha256="a11a7eba6e7be167c55a1dddec78f52b61a1832275c95519ad119c7a89a7f821")
depends_on("python@3.7:3", type=("build", "run"))
@@ -22,3 +23,11 @@ class PyPoetryDynamicVersioning(PythonPackage):
depends_on("py-dunamai@1.12:1", type=("build", "run"))
depends_on("py-tomlkit@0.4:", type=("build", "run"))
depends_on("py-jinja2@2.11.1:3", type=("build", "run"))
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/p/{0}/{0}-{1}.tar.gz"
+ if version >= Version("1"):
+ letter = "poetry_dynamic_versioning"
+ else:
+ letter = "poetry-dynamic-versioning"
+ return url.format(letter, version)
diff --git a/var/spack/repos/builtin/packages/py-poetry-plugin-tweak-dependencies-version/package.py b/var/spack/repos/builtin/packages/py-poetry-plugin-tweak-dependencies-version/package.py
new file mode 100644
index 0000000000..3b8cc706a4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-poetry-plugin-tweak-dependencies-version/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyPoetryPluginTweakDependenciesVersion(PythonPackage):
+ """Poetry plugin used to tweak dependency versions."""
+
+ homepage = "https://github.com/sbrunner/poetry-plugin-tweak-dependencies-version"
+ pypi = "poetry_plugin_tweak_dependencies_version/"
+ pypi += "poetry_plugin_tweak_dependencies_version-1.5.1.tar.gz"
+
+ maintainers("LydDeb")
+
+ version("1.5.1", sha256="4e0be2b8e23a04e542c5090deb5b6e191750ec45bace98ea8b55150844c6026b")
+
+ depends_on("python@3.9:3.11", type=("build", "run"))
+ depends_on("py-poetry-core@1.0.0:", type="build")
+ depends_on("py-poetry-dynamic-versioning", type="build")
+ depends_on("py-poetry@1.6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-poetry/package.py b/var/spack/repos/builtin/packages/py-poetry/package.py
index 68b2ae95e4..0191c806bb 100644
--- a/var/spack/repos/builtin/packages/py-poetry/package.py
+++ b/var/spack/repos/builtin/packages/py-poetry/package.py
@@ -20,6 +20,8 @@ class PyPoetry(PythonPackage):
version("1.1.13", sha256="b905ed610085f568aa61574e0e09260c02bff9eae12ff672af39e9f399357ac4")
version("1.1.12", sha256="5c66e2357fe37b552462a88b7d31bfa2ed8e84172208becd666933c776252567")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:3", when="@1.6.0:", type=("build", "run"))
depends_on("python@3.7:3", when="@1.2.0:", type=("build", "run"))
depends_on("python@2.7,3.5:3", type=("build", "run"))
@@ -71,7 +73,7 @@ class PyPoetry(PythonPackage):
depends_on("py-virtualenv@20.4.3:20.4.4,20.4.7:", when="@1.2", type=("build", "run"))
depends_on("py-virtualenv@20.0.26:20", when="@:1.1", type=("build", "run"))
depends_on("py-xattr@0.10", when="platform=darwin @1.6.1", type=("build", "run"))
- depends_on("py-xattr@0.9.7:0.9", when="platform=darwin @1.2:")
+ depends_on("py-xattr@0.9.7:0.9", when="platform=darwin @1.2")
depends_on("py-urllib3@1.26.0:1", when="@1.2")
depends_on("py-dulwich@0.21.2:0.21", when="@1.6.1", type=("build", "run"))
depends_on("py-dulwich@0.20.46:0.20", when="@1.2.1")
diff --git a/var/spack/repos/builtin/packages/py-polars/package.py b/var/spack/repos/builtin/packages/py-polars/package.py
new file mode 100644
index 0000000000..422f07c048
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-polars/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPolars(PythonPackage):
+ """Blazingly fast DataFrame library."""
+
+ homepage = "https://www.pola.rs/"
+ pypi = "polars/polars-0.20.5.tar.gz"
+
+ license("MIT")
+
+ version("0.20.5", sha256="fa4abc22cee024b5872961ddcd8a13a0a76150df345e21ce4308c2b1a36b47aa")
+
+ # pyproject.toml
+ depends_on("py-maturin@1.3.2:", type="build")
+
+ # README.md
+ depends_on("rust@1.71:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pomegranate/package.py b/var/spack/repos/builtin/packages/py-pomegranate/package.py
index 00055adcd2..0a5af32a44 100644
--- a/var/spack/repos/builtin/packages/py-pomegranate/package.py
+++ b/var/spack/repos/builtin/packages/py-pomegranate/package.py
@@ -16,6 +16,8 @@ class PyPomegranate(PythonPackage):
version("0.12.0", sha256="8b00c88f7cf9cad8d38ea00ea5274821376fefb217a1128afe6b1fcac54c975a")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.22.1:", type="build")
depends_on("py-numpy@1.8.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-postcactus/package.py b/var/spack/repos/builtin/packages/py-postcactus/package.py
new file mode 100644
index 0000000000..b33fcbd40a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-postcactus/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPostcactus(PythonPackage):
+ """This repository contains a Python package named PostCactus for
+ postprocessing data from numerical simulations performed with the Einstein
+ Toolkit."""
+
+ homepage = "https://github.com/wokast/PyCactus"
+ url = "https://github.com/wokast/PyCactus/archive/refs/tags/2.2.zip"
+
+ version("2.2", sha256="303108835d7652b37f43871c735b99dc7a60c28a24de35a09e9d2bb0f28f93fb")
+
+ # pyproject.toml
+ depends_on("py-setuptools@40.6.0:", type="build")
+ # setup.cfg
+ depends_on("py-h5py", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-future", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-tables", type=("build", "run"))
+ depends_on("py-jupyter", type=("build", "run"), when="+jupyter")
+ depends_on("vtk", type=("build", "run"), when="+vtk")
+
+ # Variants for the optional requirements in README.md
+ variant("jupyter", default=False, description="Support for jupyter")
+ variant("vtk", default=False, description="VTK for 3D plots")
+
+ def patch(self):
+ # Commenting out build-backend in order to ignore a ModuleNotFoundError
+ # for setuptools.build-meta
+ filter_file("^build-backend", "# build-backend", "PostCactus/pyproject.toml")
+
+ build_directory = "PostCactus"
diff --git a/var/spack/repos/builtin/packages/py-pot/package.py b/var/spack/repos/builtin/packages/py-pot/package.py
index 4f7c63b602..5468559b7a 100644
--- a/var/spack/repos/builtin/packages/py-pot/package.py
+++ b/var/spack/repos/builtin/packages/py-pot/package.py
@@ -20,6 +20,8 @@ class PyPot(PythonPackage):
version("0.7.0", sha256="d4ac2bc8791f049a3166820d51e218d6c299885449b735eafef8d18c76d4ad06")
+ depends_on("cxx", type="build") # generated
+
# Avoid that CC and CXX are overridden with g++ in setup.py.
patch("175.patch", when="@0.7.0")
diff --git a/var/spack/repos/builtin/packages/py-poxy/package.py b/var/spack/repos/builtin/packages/py-poxy/package.py
new file mode 100644
index 0000000000..9a4dcf5d56
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-poxy/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPoxy(PythonPackage):
+ """Documentation generator for C++"""
+
+ homepage = "https://github.com/marzer/poxy"
+ pypi = "poxy/poxy-0.18.0.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.18.0", sha256="f5da8ff04ec08859bfd1c8ec6ef61b70e3af630915a4cce6a3e377eec3bcd3d4")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.7:")
+ depends_on("py-misk@0.8.1:")
+ depends_on("py-beautifulsoup4")
+ depends_on("py-jinja2")
+ depends_on("py-pygments")
+ depends_on("py-html5lib")
+ depends_on("py-lxml")
+ depends_on("py-tomli")
+ depends_on("py-schema")
+ depends_on("py-requests")
+ depends_on("py-trieregex")
+ depends_on("py-colorama")
+
+ conflicts("py-schema@=0.7.5")
diff --git a/var/spack/repos/builtin/packages/py-poyo/package.py b/var/spack/repos/builtin/packages/py-poyo/package.py
index d6011ec5ce..9a3c1fe27d 100644
--- a/var/spack/repos/builtin/packages/py-poyo/package.py
+++ b/var/spack/repos/builtin/packages/py-poyo/package.py
@@ -14,6 +14,7 @@ class PyPoyo(PythonPackage):
license("MIT")
+ version("0.5.0", sha256="cf75b237ff3efdde8a573512d7356c428033c77a6ccee50a89496b2654cf9420")
version("0.4.1", sha256="9f069dc9c8ee359abc8ef9e7304cb1b1c23556d1f4ae64f4247c1e45de43c1f1")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pre-commit/package.py b/var/spack/repos/builtin/packages/py-pre-commit/package.py
index 4b288178bc..8ebe37d091 100644
--- a/var/spack/repos/builtin/packages/py-pre-commit/package.py
+++ b/var/spack/repos/builtin/packages/py-pre-commit/package.py
@@ -15,6 +15,7 @@ class PyPreCommit(PythonPackage):
license("MIT")
+ version("3.6.0", sha256="d30bad9abf165f7785c15a21a1f46da7d0677cb00ee7ff4c579fd38922efe15d")
version("3.5.0", sha256="5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32")
version("3.3.3", sha256="a2256f489cd913d575c145132ae196fe335da32d91a8294b7afe6622335dd023")
version("2.20.0", sha256="a978dac7bc9ec0bcee55c18a277d553b0f419d259dadb4b9418ff2d00eb43959")
@@ -22,6 +23,7 @@ class PyPreCommit(PythonPackage):
version("2.10.1", sha256="399baf78f13f4de82a29b649afd74bef2c4e28eb4f021661fc7f29246e8c7a3a")
version("1.20.0", sha256="9f152687127ec90642a2cc3e4d9e1e6240c4eb153615cb02aa1ad41d331cbb6e")
+ depends_on("python@3.9:", when="@3.6:", type=("build", "run"))
depends_on("python@3.8:", when="@3:", type=("build", "run"))
depends_on("python@3.7:", when="@2.20.0:", type=("build", "run"))
depends_on("python@3.6.1:", when="@2.1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pretty-errors/package.py b/var/spack/repos/builtin/packages/py-pretty-errors/package.py
new file mode 100644
index 0000000000..87ad191a49
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pretty-errors/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPrettyErrors(PythonPackage):
+ """Prettifies Python exception output to make it legible."""
+
+ homepage = "https://github.com/onelivesleft/PrettyErrors/"
+ pypi = "pretty-errors/pretty_errors-1.2.25.tar.gz"
+
+ license("MIT")
+
+ version("1.2.25", sha256="a16ba5c752c87c263bf92f8b4b58624e3b1e29271a9391f564f12b86e93c6755")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-colorama", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py
index d3b7561c49..65eec28736 100644
--- a/var/spack/repos/builtin/packages/py-prettytable/package.py
+++ b/var/spack/repos/builtin/packages/py-prettytable/package.py
@@ -15,13 +15,16 @@ class PyPrettytable(PythonPackage):
homepage = "https://github.com/jazzband/prettytable"
pypi = "prettytable/prettytable-0.7.2.tar.gz"
+ version("3.7.0", sha256="ef8334ee40b7ec721651fc4d37ecc7bb2ef55fde5098d994438f0dfdaa385c0c")
version("3.4.1", sha256="7d7dd84d0b206f2daac4471a72f299d6907f34516064feb2838e333a4e2567bd")
version("3.2.0", sha256="ae7d96c64100543dc61662b40a28f3b03c0f94a503ed121c6fca2782c5816f81")
version("2.4.0", sha256="18e56447f636b447096977d468849c1e2d3cfa0af8e7b5acfcf83a64790c0aca")
version("2.2.1", sha256="6d465005573a5c058d4ca343449a5b28c21252b86afcdfa168cdc6a440f0b24c")
version("0.7.2", sha256="2d5460dc9db74a32bcc8f9f67de68b2c4f4d2f01fa3bd518764c69156d9cacd9")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="build", when="@:3.4")
+ depends_on("py-hatchling", type="build", when="@3.7:")
+ depends_on("py-hatch-vcs", type="build", when="@3.7:")
depends_on("py-wcwidth", type=("build", "run"), when="@2.4.0:")
depends_on("py-importlib-metadata", type=("build", "run"), when="@2: ^python@:3.7")
- depends_on("py-setuptools-scm", type="build", when="@2.4.0:")
+ depends_on("py-setuptools-scm", type="build", when="@2.4.0:3.4")
diff --git a/var/spack/repos/builtin/packages/py-projectq/package.py b/var/spack/repos/builtin/packages/py-projectq/package.py
index eac6aec7f0..488e540cd6 100644
--- a/var/spack/repos/builtin/packages/py-projectq/package.py
+++ b/var/spack/repos/builtin/packages/py-projectq/package.py
@@ -25,6 +25,8 @@ class PyProjectq(PythonPackage):
version("develop", branch="develop")
version("0.3.6", commit="fa484fe037a3a1772127bbd00fe4628ddba34611")
+ depends_on("cxx", type="build") # generated
+
# Dependencies
depends_on("py-setuptools", type=("build"))
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-prokaryote/package.py b/var/spack/repos/builtin/packages/py-prokaryote/package.py
new file mode 100644
index 0000000000..9bca54cbff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-prokaryote/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyProkaryote(PythonPackage):
+ """CellProfiler's Java dependencies."""
+
+ homepage = "https://github.com/CellProfiler/prokaryote"
+ pypi = "prokaryote/prokaryote-2.4.4.tar.gz"
+
+ maintainers("omsai")
+
+ license("GPL-3.0-or-later", checked_by="omsai")
+
+ version("2.4.4", sha256="0a147b8b9a0a7279aa773e6a8fe459eb49f6de479f7afe7203dc4ac10dc8b587")
+
+ depends_on("python@2.7:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-prompt-toolkit/package.py b/var/spack/repos/builtin/packages/py-prompt-toolkit/package.py
index 70146e632a..e0f2933f60 100644
--- a/var/spack/repos/builtin/packages/py-prompt-toolkit/package.py
+++ b/var/spack/repos/builtin/packages/py-prompt-toolkit/package.py
@@ -18,6 +18,7 @@ class PyPromptToolkit(PythonPackage):
license("BSD-3-Clause")
+ version("3.0.43", sha256="3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d")
version("3.0.38", sha256="23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b")
version("3.0.31", sha256="9ada952c9d1787f52ff6d5f3484d0b4df8952787c087edf6a1f7c2cb1ea88148")
version("3.0.29", sha256="bd640f60e8cecd74f0dc249713d433ace2ddc62b65ee07f96d358e0b152b6ea7")
diff --git a/var/spack/repos/builtin/packages/py-properscoring/package.py b/var/spack/repos/builtin/packages/py-properscoring/package.py
new file mode 100644
index 0000000000..9f7e05b0af
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-properscoring/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyProperscoring(PythonPackage):
+ """Proper scoring rules in Python."""
+
+ homepage = "https://github.com/properscoring/properscoring"
+ pypi = "properscoring/properscoring-0.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.1", sha256="b0cc4963cc218b728d6c5f77b3259c8f835ae00e32e82678cdf6936049b93961")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-proto-plus/package.py b/var/spack/repos/builtin/packages/py-proto-plus/package.py
new file mode 100644
index 0000000000..7c5663319a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-proto-plus/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyProtoPlus(PythonPackage):
+ """Beautiful, Pythonic protocol buffers."""
+
+ homepage = "https://github.com/googleapis/proto-plus-python"
+ pypi = "proto-plus/proto-plus-1.23.0.tar.gz"
+
+ version("1.23.0", sha256="89075171ef11988b3fa157f5dbd8b9cf09d65fffee97e29ce403cd8defba19d2")
+
+ depends_on("py-protobuf@3.19:4", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
index b5f0171d01..dbd674eac1 100644
--- a/var/spack/repos/builtin/packages/py-protobuf/package.py
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -17,6 +17,10 @@ class PyProtobuf(PythonPackage):
homepage = "https://developers.google.com/protocol-buffers/"
pypi = "protobuf/protobuf-3.11.0.tar.gz"
+ version("5.28.2", sha256="59379674ff119717404f7454647913787034f03fe7049cbef1d74a97bb4593f0")
+ version("5.27.5", sha256="7fa81bc550201144a32f4478659da06e0b2ebe4d5303aacce9a202a1c3d5178d")
+ version("5.26.1", sha256="8ca2a1d97c290ec7b16e4e5dff2e5ae150cc1582f55b5ab300d45cb0dfa90e51")
+ version("4.25.3", sha256="25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c")
version("4.24.3", sha256="12e9ad2ec079b833176d2921be2cb24281fa591f0b119b208b788adc48c2561d")
version("4.23.3", sha256="7a92beb30600332a52cdadbedb40d33fd7c8a0d7f549c440347bc606fb3fe34b")
version("4.21.9", sha256="61f21493d96d2a77f9ca84fefa105872550ab5ef71d21c458eb80edcf4885a99")
@@ -42,6 +46,7 @@ class PyProtobuf(PythonPackage):
version("3.15.6", sha256="2b974519a2ae83aa1e31cff9018c70bbe0e303a46a598f982943c49ae1d4fcd3")
version("3.15.5", sha256="be8a929c6178bb6cbe9e2c858be62fa08966a39ae758a8493a88f0ed1efb6097")
version("3.15.1", sha256="824dbae3390fcc3ea1bf96748e6da951a601802894cf7e1465e72b4732538cab")
+ version("3.13.0", sha256="6a82e0c8bb2bf58f606040cc5814e07715b2094caeba281e2e7d0b0e2e397db5")
version("3.12.2", sha256="49ef8ab4c27812a89a76fa894fe7a08f42f2147078392c0dee51d4a444ef6df5")
version("3.11.2", sha256="3d7a7d8d20b4e7a8f63f62de2d192cfd8b7a53c56caba7ece95367ca2b80c574")
version("3.11.1", sha256="aecdf12ef6dc7fd91713a6da93a86c2f2a8fe54840a3b1670853a2b7402e77c9")
@@ -59,35 +64,18 @@ class PyProtobuf(PythonPackage):
version("3.3.0", sha256="1cbcee2c45773f57cb6de7ee0eceb97f92b9b69c0178305509b162c0160c1f04")
version("3.0.0", sha256="ecc40bc30f1183b418fe0ec0c90bc3b53fa1707c4205ee278c6b90479e5b6ff5")
- variant("cpp", default=False, when="@:4.21", description="Enable the cpp implementation")
+ depends_on("c", type="build")
depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools", type=("build", "run"))
- # in newer pip versions --install-option does not exist
- depends_on("py-pip@:23.0", when="+cpp", type=("build", "run"))
depends_on("py-six@1.9:", when="@3.0:3.17", type=("build", "run"))
- # Setup dependencies for protobuf to use the same minor version as py-protobuf
- # Handle mapping the 4.x release to the protobuf 3.x releases
- depends_on("protobuf@3.21", when="+cpp @4.21")
- # Handle the 3.x series releases
- for ver in list(range(0, 21)):
- depends_on(f"protobuf@3.{ver}", when=f"@3.{ver}+cpp")
+ # Minor version must match protobuf
+ for ver in range(26, 29):
+ depends_on(f"protobuf@3.{ver}", when=f"@5.{ver}")
+ for ver in range(21, 26):
+ depends_on(f"protobuf@3.{ver}", when=f"@4.{ver}")
+ for ver in range(0, 21):
+ depends_on(f"protobuf@3.{ver}", when=f"@3.{ver}")
- conflicts("+cpp", when="^python@3.11:")
-
- @property
- def build_directory(self):
- if self.spec.satisfies("@3.1.0"):
- return "python"
- else:
- return "."
-
- @when("+cpp")
- def setup_build_environment(self, env):
- protobuf_dir = self.spec["protobuf"].libs.directories[0]
- env.prepend_path("LIBRARY_PATH", protobuf_dir)
-
- @when("+cpp")
- def install_options(self, spec, prefix):
- return ["--cpp_implementation"]
+ conflicts("%gcc@14:", when="@:4.24.3")
diff --git a/var/spack/repos/builtin/packages/py-prov/package.py b/var/spack/repos/builtin/packages/py-prov/package.py
index fa68b56dae..8c62abeef1 100644
--- a/var/spack/repos/builtin/packages/py-prov/package.py
+++ b/var/spack/repos/builtin/packages/py-prov/package.py
@@ -13,7 +13,7 @@ class PyProv(PythonPackage):
PROV-O (RDF)
"""
- homepage = "prov.readthedocs.io/"
+ homepage = "https://prov.readthedocs.io/"
pypi = "prov/prov-2.0.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-psalg/package.py b/var/spack/repos/builtin/packages/py-psalg/package.py
index 9302655371..98a464a2c6 100644
--- a/var/spack/repos/builtin/packages/py-psalg/package.py
+++ b/var/spack/repos/builtin/packages/py-psalg/package.py
@@ -16,6 +16,9 @@ class PyPsalg(PythonPackage):
version("3.3.37", sha256="127a5ae44c9272039708bd877849a3af354ce881fde093a2fc6fe0550b698b72")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("psalg")
diff --git a/var/spack/repos/builtin/packages/py-psana/package.py b/var/spack/repos/builtin/packages/py-psana/package.py
index a35d1e08a3..b9f2e4a9e9 100644
--- a/var/spack/repos/builtin/packages/py-psana/package.py
+++ b/var/spack/repos/builtin/packages/py-psana/package.py
@@ -17,6 +17,9 @@ class PyPsana(PythonPackage):
version("3.3.37", sha256="127a5ae44c9272039708bd877849a3af354ce881fde093a2fc6fe0550b698b72")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("setup.patch")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-psutil/package.py b/var/spack/repos/builtin/packages/py-psutil/package.py
index 4441e53003..78f0e9802b 100644
--- a/var/spack/repos/builtin/packages/py-psutil/package.py
+++ b/var/spack/repos/builtin/packages/py-psutil/package.py
@@ -27,6 +27,8 @@ class PyPsutil(PythonPackage):
version("5.4.5", sha256="ebe293be36bb24b95cdefc5131635496e88b17fabbcf1e4bc9b5c01f5e489cfe")
version("5.0.1", sha256="9d8b7f8353a2b2eb6eb7271d42ec99d0d264a9338a37be46424d56b4e473b39e")
+ depends_on("c", type="build") # generated
+
# pyproject.toml
depends_on("py-setuptools@43:", when="@5.9.4:", type="build")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-psyclone/package.py b/var/spack/repos/builtin/packages/py-psyclone/package.py
index e8965d43b0..a2a41482d4 100644
--- a/var/spack/repos/builtin/packages/py-psyclone/package.py
+++ b/var/spack/repos/builtin/packages/py-psyclone/package.py
@@ -7,36 +7,75 @@ from spack.package import *
class PyPsyclone(PythonPackage):
- """Code generation for the PSyKAl framework from the GungHo project,
- as used by the LFRic model at the UK Met Office."""
+ """
+ Code generation system developed to support domain-specific languages
+ (DSLs) for finite element, finite volume and finite difference codes.
+ Notably, it is used in the LFRic Project from the UK Met Office, and
+ it also supports the GOcean (2D, finite difference) DSL.
+ """
+
+ # Links
homepage = "https://github.com/stfc/PSyclone"
- url = "https://github.com/stfc/PSyclone/archive/1.5.1.tar.gz"
git = "https://github.com/stfc/PSyclone.git"
+ pypi = "PSyclone/PSyclone-2.5.0.tar.gz"
+
+ # License
+ license("BSD-3-Clause")
+ # Releases
version("develop", branch="master")
- version("1.5.1", commit="eba7a097175b02f75dec70616cf267b7b3170d78")
+ version("2.5.0", sha256="dd1b40d635423c6b23effd2c569908d319afa6153680692e1cbae27f7b5bf4dc")
+ version("2.4.0", sha256="14fd3717f99b317471356c59c1d4c4c22c41fd264af11b78ed831dd2eb71a270")
+ version("2.3.1", sha256="eee70b3069d71fcf95e9bc8796f0333bd502e0202a98df051b635b133432a082")
+ version("2.3.0", sha256="a2cb3f03ad827de99af6acef794d354146443f21623830e4ff62282a81b7cdb3")
+ version("2.2.0", sha256="da829e3b88bf8df7bdb1f261cfc9b20c119eae79fbbd92d970eefee7390ca159")
+ version("2.1.0", sha256="7ef967146d0e2f4662d1d68472242d12f2097adb90646c5646c962ea2e0f187c")
+ version("2.0.0", sha256="94766ffda760404af99f85d70341376192e4a1b8e16e7ae5df980038898a9c41")
+ version("1.5.1", sha256="f053ad7316623b2a4002afc79607abda3b22306645e86f2312d9f3fe56d312dc")
+ depends_on("fortran", type="build") # generated
+
+ # Current dependencies
depends_on("py-setuptools", type="build")
depends_on("py-pyparsing", type=("build", "run"))
+ depends_on("py-fparser@0.1.4:", type=("build", "run"), when="@2.5.0")
+ depends_on("py-configparser", type=("build", "run"))
+ depends_on("py-jsonschema", type=("build", "run"), when="@2.5.0")
+ depends_on("py-sympy", type=("build", "run"), when="@2.2.0:")
+
+ # Historical dependencies
+ depends_on("py-six", type=("build", "run"), when="@2.0.0:2.3.1")
+ depends_on("py-jsonschema@3.0.2", type=("build", "run"), when="@2.1.0:2.4.0")
# Test cases fail without compatible versions of py-fparser:
- depends_on("py-fparser@0.0.5", type=("build", "run"), when="@1.5.1")
- depends_on("py-fparser", type=("build", "run"), when="@1.5.2:")
+ depends_on("py-fparser@0.1.3", type=("build", "run"), when="@2.4.0")
+ depends_on("py-fparser@0.0.16", type=("build", "run"), when="@2.3.1")
+ depends_on("py-fparser@0.0.15", type=("build", "run"), when="@2.3.0")
+ depends_on("py-fparser@0.0.14", type=("build", "run"), when="@2.2.0")
+ depends_on("py-fparser@0.0.13", type=("build", "run"), when="@2.1.0")
+ depends_on("py-fparser@0.0.12", type=("build", "run"), when="@2.0.0")
# Dependencies only required for tests:
- depends_on("py-numpy", type="test")
- depends_on("py-nose", type="test")
+ depends_on("py-pep8", type="test")
+ depends_on("py-flake8", type="test")
+ depends_on("py-pylint@:2", type="test")
+ depends_on("py-pytest-cov", type="test")
+ depends_on("py-pytest-pep8", type="test")
+ depends_on("py-pytest-pylint", type="test")
+ depends_on("py-pytest-flakes", type="test")
+ depends_on("py-pytest-xdist", type="test")
depends_on("py-pytest", type="test")
+ # Test
@run_after("install")
@on_package_attributes(run_tests=True)
def check_build(self):
- # Limit py.test to search inside the build tree:
- touch("pytest.ini")
+ pytest = which("pytest")
+ # Limit pytest to search inside the build tree
with working_dir("src"):
- Executable("py.test")()
+ pytest()
def setup_build_environment(self, env):
- # Allow testing with installed executables:
+ # Allow testing with installed executables
env.prepend_path("PATH", self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/py-psycopg2/package.py b/var/spack/repos/builtin/packages/py-psycopg2/package.py
index cc6e805592..ca4d21ca8a 100644
--- a/var/spack/repos/builtin/packages/py-psycopg2/package.py
+++ b/var/spack/repos/builtin/packages/py-psycopg2/package.py
@@ -16,6 +16,8 @@ class PyPsycopg2(PythonPackage):
version("2.9.1", sha256="de5303a6f1d0a7a34b9d40e4d3bef684ccc44a49bbe3eb85e3c0bffb4a131b7c")
version("2.8.6", sha256="fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543")
+ depends_on("c", type="build") # generated
+
# https://www.psycopg.org/docs/install.html#prerequisites
# https://github.com/psycopg/psycopg2/blob/master/doc/src/install.rst
# https://www.psycopg.org/docs/news.html#news
diff --git a/var/spack/repos/builtin/packages/py-py-spy/package.py b/var/spack/repos/builtin/packages/py-py-spy/package.py
index 4c588a79bf..a13c6d4e09 100644
--- a/var/spack/repos/builtin/packages/py-py-spy/package.py
+++ b/var/spack/repos/builtin/packages/py-py-spy/package.py
@@ -17,12 +17,14 @@ class PyPySpy(Package):
version("0.3.8", sha256="9dbfd0ea79ef31a2966891e86cf6238ed3831938cf562e71848e07b7009cf57d")
version("0.3.3", sha256="41454d3d9132da45c72f7574faaff65f40c757720293a277ffa5ec5a4b44f902")
+ depends_on("c", type="build") # generated
+
# TODO: uses cargo to download and build dozens of dependencies.
# Need to figure out how to manage these with Spack once we have a
# CargoPackage base class.
depends_on("rust", type="build")
depends_on("unwind")
- depends_on("libunwind components=ptrace", when="^libunwind")
+ depends_on("libunwind components=ptrace", when="^[virtuals=unwind] libunwind")
def install(self, spec, prefix):
cargo = which("cargo")
diff --git a/var/spack/repos/builtin/packages/py-py-tes/package.py b/var/spack/repos/builtin/packages/py-py-tes/package.py
new file mode 100644
index 0000000000..63e00d31e6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-py-tes/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyTes(PythonPackage):
+ """Library for communicating with the GA4GH Task Execution API."""
+
+ pypi = "py-tes/py-tes-0.4.2.tar.gz"
+
+ license("MIT")
+
+ version("0.4.2", sha256="f6926cd59b7dfc8e37840955bf1cc7c43ad4d99ba5eae100b6156c918617472c")
+
+ depends_on("py-attrs@17.4:", type=("build", "run"))
+ depends_on("py-future@0.16:", type=("build", "run"))
+ depends_on("py-python-dateutil@2.6.1:", type=("build", "run"))
+ depends_on("py-requests@2.18.1:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-py2bit/package.py b/var/spack/repos/builtin/packages/py-py2bit/package.py
index ea15abb9e1..08ad9f8ebc 100644
--- a/var/spack/repos/builtin/packages/py-py2bit/package.py
+++ b/var/spack/repos/builtin/packages/py-py2bit/package.py
@@ -15,4 +15,6 @@ class PyPy2bit(PythonPackage):
version("0.2.1", sha256="34f7ac22be0eb4b5493063826bcc2016a78eb216bb7130890b50f3572926aeb1")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-py4j/package.py b/var/spack/repos/builtin/packages/py-py4j/package.py
index 17a251913b..26b4076f45 100644
--- a/var/spack/repos/builtin/packages/py-py4j/package.py
+++ b/var/spack/repos/builtin/packages/py-py4j/package.py
@@ -15,6 +15,9 @@ class PyPy4j(PythonPackage):
license("BSD-3-Clause")
+ maintainers("teaguesterling")
+
+ version("0.10.9.7", sha256="0b6e5315bb3ada5cf62ac651d107bb2ebc02def3dee9d9548e3baac644ea8dbb")
version("0.10.9.5", sha256="276a4a3c5a2154df1860ef3303a927460e02e97b047dc0a47c1c3fb8cce34db6")
version("0.10.9.3", sha256="0d92844da4cb747155b9563c44fc322c9a1562b3ef0979ae692dbde732d784dd")
version("0.10.9", sha256="36ec57f43ff8ced260a18aa9a4e46c3500a730cac8860e259cbaa546c2b9db2f")
@@ -23,7 +26,10 @@ class PyPy4j(PythonPackage):
version("0.10.4", sha256="406fbfdbcbbb398739f61fafd25724670a405a668eb08c1721d832eadce06aae")
version("0.10.3", sha256="f4570108ad014dd52a65c2288418e31cb8227b5ecc39ad7fc7fe98314f7a26f2")
+ variant("java", default=True, description="Require java via Spack instead of using system JRE")
+
depends_on("py-setuptools", type="build")
+ depends_on("java", when="+java", type="run")
def url_for_version(self, version):
url = "https://pypi.io/packages/source/p/py4j/"
diff --git a/var/spack/repos/builtin/packages/py-pyamg/package.py b/var/spack/repos/builtin/packages/py-pyamg/package.py
index 3d74f9d476..7a3731880f 100644
--- a/var/spack/repos/builtin/packages/py-pyamg/package.py
+++ b/var/spack/repos/builtin/packages/py-pyamg/package.py
@@ -13,7 +13,6 @@ class PyPyamg(PythonPackage):
homepage = "https://github.com/pyamg/pyamg"
url = "https://github.com/pyamg/pyamg/archive/refs/tags/v4.0.0.zip"
- # A list of GitHub accounts to notify when the package is updated.
maintainers("benc303")
license("MIT")
@@ -23,8 +22,7 @@ class PyPyamg(PythonPackage):
version("4.1.0", sha256="9e340aef5da11280a1e28f28deeaac390f408e38ee0357d0fdbb77503747bbc4")
version("4.0.0", sha256="015d5e706e6e54d3de82e05fdb173c30d8b27cb8a117ab584cd62ad41d9ea042")
- # Dependencies. A generic python dependency is added implicity by the
- # PythonPackage class.
+ depends_on("python", type=("build", "link", "run"))
depends_on("py-numpy@1.7:", type=("build", "run"))
depends_on("py-scipy@0.12:", type=("build", "run"))
depends_on("py-setuptools@42:", type="build", when="@4.2.0:")
@@ -32,4 +30,4 @@ class PyPyamg(PythonPackage):
# https://github.com/pypa/setuptools_scm/issues/758
depends_on("py-setuptools-scm@7.1:+toml", type="build", when="@5.0.0:")
depends_on("py-setuptools-scm@5:+toml", type="build", when="@4.2.0:")
- depends_on("py-pybind11@2.8.0:", type=("build"), when="@4.2.0:")
+ depends_on("py-pybind11@2.8.0:", type=("build", "link"), when="@4.2.0:")
diff --git a/var/spack/repos/builtin/packages/py-pyaml-env/package.py b/var/spack/repos/builtin/packages/py-pyaml-env/package.py
new file mode 100644
index 0000000000..298fc9f778
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyaml-env/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyamlEnv(PythonPackage):
+ """Provides yaml file parsing with environment variable resolution"""
+
+ homepage = "https://github.com/mkaranasou/pyaml_env"
+ pypi = "pyaml_env/pyaml_env-1.2.1.tar.gz"
+
+ license("MIT", checked_by="A_N_Other")
+
+ version("1.2.1", sha256="6d5dc98c8c82df743a132c196e79963050c9feb05b0a6f25f3ad77771d3d95b0")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pyyaml@5:7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyarrow/package.py b/var/spack/repos/builtin/packages/py-pyarrow/package.py
index 0be8e772fc..3d6bf8acde 100644
--- a/var/spack/repos/builtin/packages/py-pyarrow/package.py
+++ b/var/spack/repos/builtin/packages/py-pyarrow/package.py
@@ -16,8 +16,16 @@ class PyPyarrow(PythonPackage, CudaPackage):
pypi = "pyarrow/pyarrow-0.17.1.tar.gz"
git = "https://github.com/apache/arrow"
+ maintainers("thomas-bouvier")
+
license("Apache-2.0")
+ version("16.1.0", sha256="15fbb22ea96d11f0b5768504a3f961edab25eaf4197c341720c4a387f6c60315")
+ version("15.0.2", sha256="9c9bc803cb3b7bfacc1e96ffbfd923601065d9d3f911179d81e72d99fd74a3d9")
+ version("14.0.2", sha256="36cef6ba12b499d864d1def3e990f97949e0b79400d08b7cf74504ffbd3eb025")
+ version("13.0.0", sha256="83333726e83ed44b0ac94d8d7a21bbdee4a05029c3b1e8db58a863eec8fd8a33")
+ version("12.0.1", sha256="cce317fc96e5b71107bf1f9f184d5e54e2bd14bbf3f9a3d62819961f0af86fec")
+ version("11.0.0", sha256="5461c57dbdb211a632a48facb9b39bbeb8a7905ec95d768078525283caef5f6d")
version("10.0.1", sha256="1a14f57a5f472ce8234f2964cd5184cccaa8df7e04568c64edc33b23eb285dd5")
version("8.0.0", sha256="4a18a211ed888f1ac0b0ebcb99e2d9a3e913a481120ee9b1fe33d3fedb945d4e")
version("7.0.0", sha256="da656cad3c23a2ebb6a307ab01d35fce22f7850059cffafcb90d12590f8f4f38")
@@ -29,6 +37,8 @@ class PyPyarrow(PythonPackage, CudaPackage):
version("0.11.0", sha256="07a6fd71c5d7440f2c42383dd2c5daa12d7f0a012f1e88288ed08a247032aead")
version("0.9.0", sha256="7db8ce2f0eff5a00d6da918ce9f9cfec265e13f8a119b4adb1595e5b19fd6242")
+ depends_on("cxx", type="build") # generated
+
variant("parquet", default=False, description="Build with Parquet support")
variant("orc", default=False, description="Build with orc support")
variant("dataset", default=False, description="Build with Dataset support")
@@ -37,21 +47,29 @@ class PyPyarrow(PythonPackage, CudaPackage):
depends_on("cmake@3.0.0:", type="build")
depends_on("pkgconfig", type="build")
+ depends_on("python@3.8:", type=("build", "run"), when="@13:")
+ depends_on("python@3.7:", type=("build", "run"), when="@7:")
+ depends_on("python@3.6:", type=("build", "run"), when="@3:")
depends_on("python@3.5:", type=("build", "run"), when="@0.17:")
- depends_on("python@3.6:", type=("build", "run"), when="@3.0.0:")
- depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:")
depends_on("py-setuptools", type="build")
- depends_on("py-setuptools@38.6.0:", type="build", when="@7.0.0:")
depends_on("py-setuptools@40.1.0:", type="build", when="@10.0.1:")
- depends_on("py-setuptools-scm", type="build", when="@0.15.0:")
+ depends_on("py-setuptools@38.6.0:", type="build", when="@7:")
+ depends_on("py-setuptools-scm@:7", type="build", when="@0.15:")
depends_on("py-cython", type="build")
- depends_on("py-cython@0.29:", type="build", when="@0.15.0:")
- depends_on("py-cython@0.29.22:", type="build", when="@8.0.0:")
+ depends_on("py-cython@0.29.31:", type="build", when="@14:")
+ depends_on("py-cython@0.29.31:2", type="build", when="@12:13")
+ depends_on("py-cython@0.29.22:2", type="build", when="@8:11")
+ depends_on("py-cython@0.29:2", type="build", when="@0.15:7")
+ depends_on("py-cython@:2", type="build", when="@:0.14")
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", type="build")
- depends_on("py-numpy@1.14:", type=("build", "run"), when="@0.15.0:")
- depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@3.0.0:")
+ depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@3:")
+ # Prior to python 3.9 numpy must be >=0.14,<1.25
+ depends_on("py-numpy@0.14:1.24", when="^python@:3.8", type=("build", "run"))
+ depends_on("py-numpy@1.25:", when="^python@3.9:", type=("build", "run"))
+ # https://github.com/apache/arrow/issues/39532
+ depends_on("py-numpy@:1", when="@:15", type=("build", "run"))
arrow_versions = (
"@0.9.0",
@@ -64,6 +82,12 @@ class PyPyarrow(PythonPackage, CudaPackage):
"@7.0.0",
"@8.0.0",
"@10.0.1",
+ "@11.0.0",
+ "@12.0.1",
+ "@13.0.0",
+ "@14.0.2",
+ "@15.0.2",
+ "@16.1.0",
)
for v in arrow_versions:
depends_on("arrow+python" + v, when=v)
diff --git a/var/spack/repos/builtin/packages/py-pybedtools/package.py b/var/spack/repos/builtin/packages/py-pybedtools/package.py
index 5b15211bec..b0690d4d30 100644
--- a/var/spack/repos/builtin/packages/py-pybedtools/package.py
+++ b/var/spack/repos/builtin/packages/py-pybedtools/package.py
@@ -14,6 +14,7 @@ class PyPybedtools(PythonPackage):
license("MIT")
+ version("0.10.0", sha256="1a6fbaad23b013becc741d7d5922a2df03e391bc44ff92772ffb7dd456711161")
version("0.9.0", sha256="9267c92cd764173449d9c31baedac0659b4eccc3d7c05e22ec378f86c0fc30a3")
version("0.8.0", sha256="4eebd2cd1764ee1c604fd881703c3e329195485350b987b7fb8db42d232984f6")
version("0.7.10", sha256="518a2311bd33f29cf2ee8fc1a028dda8c8e380c9fc83fcb0fbaa206933174b50")
@@ -25,6 +26,8 @@ class PyPybedtools(PythonPackage):
version("0.7.4", sha256="15cfae9e8a207ded403ad9fa2e77f09d14c2fe377d1bc5f8b063647e2d0554e0")
version("0.6.9", sha256="56915b3e2200c6fb56260a36f839e66ce27d7dd3ef55fba278c3931b786fbfd1")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@0.6c5:", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pybigwig/package.py b/var/spack/repos/builtin/packages/py-pybigwig/package.py
index 814fa8d37f..cab48156ac 100644
--- a/var/spack/repos/builtin/packages/py-pybigwig/package.py
+++ b/var/spack/repos/builtin/packages/py-pybigwig/package.py
@@ -16,6 +16,8 @@ class PyPybigwig(PythonPackage):
version("0.3.12", sha256="e01991790ece496bf6d3f00778dcfb136dd9ca0fd28acc1b3fb43051ad9b8403")
version("0.3.4", sha256="8c97a19218023190041c0e426f1544f7a4944a7bb4568faca1d85f1975af9ee2")
+ depends_on("c", type="build") # generated
+
variant("numpy", default=True, description="Enable support for numpy integers and vectors")
patch("python3_curl.patch", when="@:0.3.12 ^python@3:")
diff --git a/var/spack/repos/builtin/packages/py-pybind11-stubgen/package.py b/var/spack/repos/builtin/packages/py-pybind11-stubgen/package.py
index 8f04cae03b..f4218428e1 100644
--- a/var/spack/repos/builtin/packages/py-pybind11-stubgen/package.py
+++ b/var/spack/repos/builtin/packages/py-pybind11-stubgen/package.py
@@ -10,8 +10,9 @@ class PyPybind11Stubgen(PythonPackage):
"""Generates stubs for pybind11-wrapped python modules"""
homepage = "https://github.com/sizmailov/pybind11-stubgen"
- pypi = "pybind11-stubgen/pybind11-stubgen-0.3.0.tar.gz"
+ pypi = "pybind11-stubgen/pybind11-stubgen-2.5.1.tar.gz"
+ version("2.5.1", sha256="4427a67038a00c5ac1637ffa6c65728c67c5b1251ecc23c7704152be0b14cc0b")
version("0.8.7", sha256="79e24009137cd51ef7201c5b9f4d0d072824b260cff751ec8200a8886e06adbf")
version("0.3.0", sha256="fb9bc977df46d7f1aecd33258e34abbbd01f1f461862c8a2a85341b96e6e6bdf")
diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py
index 9aceb4b02a..b14b50a8e6 100644
--- a/var/spack/repos/builtin/packages/py-pybind11/package.py
+++ b/var/spack/repos/builtin/packages/py-pybind11/package.py
@@ -27,6 +27,13 @@ class PyPybind11(CMakePackage, PythonExtension):
maintainers("ax3l")
version("master", branch="master")
+ version("2.13.5", sha256="b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252")
+ version("2.13.4", sha256="efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240")
+ version("2.13.3", sha256="6e7a84ec241544f2f5e30c7a82c09c81f0541dd14e9d9ef61051e07105f9c445")
+ version("2.13.2", sha256="50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3")
+ version("2.13.1", sha256="51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc")
+ version("2.13.0", sha256="8ac2bd138ea3c12683d3496361af6bee0f7754f86bf050e6c61e3966de688215")
+ version("2.12.0", sha256="bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7")
version("2.11.1", sha256="d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c")
version("2.11.0", sha256="7af30a84c6810e721829c4646e31927af9d8861e085aa5dd37c3c8b8169fcda1")
version("2.10.4", sha256="832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970")
@@ -52,12 +59,18 @@ class PyPybind11(CMakePackage, PythonExtension):
version("2.1.1", sha256="f2c6874f1ea5b4ad4ffffe352413f7d2cd1a49f9050940805c2a082348621540")
version("2.1.0", sha256="2860f2b8d0c9f65f0698289a161385f59d099b7ead1bf64e8993c486f2b93ee0")
+ depends_on("cxx", type="build")
+
depends_on("py-setuptools@42:", type="build")
depends_on("py-pytest", type="test")
depends_on("py-pip", type="build")
depends_on("py-wheel", type="build")
extends("python")
+ # Spack defaults to False but pybind11 defaults to True (and IPO is highly
+ # encouraged to be used)
+ variant("ipo", default=True, description="CMake interprocedural optimization")
+
with when("build_system=cmake"):
generator("ninja")
depends_on("cmake@3.13:", type="build")
@@ -70,6 +83,9 @@ class PyPybind11(CMakePackage, PythonExtension):
conflicts("%msvc@:16")
conflicts("%intel@:17")
+ # https://github.com/pybind/pybind11/pull/5208
+ conflicts("%gcc@14:", when="@:2.13.1")
+
# https://github.com/pybind/pybind11/pull/1995
@when("@:2.4")
def patch(self):
@@ -85,8 +101,8 @@ class PyPybind11(CMakePackage, PythonExtension):
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
return [
- self.define("PYTHON_EXECUTABLE:FILEPATH", self.spec["python"].command.path),
self.define("PYBIND11_TEST", self.pkg.run_tests),
+ self.define("prefix_for_pc_file", self.prefix),
]
def install(self, pkg, spec, prefix):
@@ -104,7 +120,6 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
with working_dir("spack-test", create=True):
# test include helper points to right location
- python = self.spec["python"].command
py_inc = python(
"-c", "import pybind11 as py; print(py.get_include())", output=str
).strip()
diff --git a/var/spack/repos/builtin/packages/py-pybrain/package.py b/var/spack/repos/builtin/packages/py-pybrain/package.py
index 17d34438a0..0fc1558d43 100644
--- a/var/spack/repos/builtin/packages/py-pybrain/package.py
+++ b/var/spack/repos/builtin/packages/py-pybrain/package.py
@@ -18,5 +18,7 @@ class PyPybrain(PythonPackage):
version("0.3.3.post", commit="dcdf32ba1805490cefbc0bdeb227260d304fdb42")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pybv/package.py b/var/spack/repos/builtin/packages/py-pybv/package.py
new file mode 100644
index 0000000000..97caab42ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pybv/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPybv(PythonPackage):
+ """A lightweight I/O utility for the BrainVision data format."""
+
+ homepage = "https://github.com/bids-standard/pybv"
+ pypi = "pybv/pybv-0.7.5.tar.gz"
+ git = "https://github.com/bids-standard/pybv"
+
+ license("BSD-3-Clause")
+
+ version("0.7.5", sha256="57bb09305c1255b11dd5c6a75d0e6b3c81675cf0469d6a757b148ac332ac05d5")
+
+ depends_on("python@3.7:3", type=("build", "run"))
+ depends_on("py-setuptools@46.4:", type="build")
+
+ depends_on("py-numpy@1.18.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pycairo/package.py b/var/spack/repos/builtin/packages/py-pycairo/package.py
index c9eccce807..1f8d0e6106 100644
--- a/var/spack/repos/builtin/packages/py-pycairo/package.py
+++ b/var/spack/repos/builtin/packages/py-pycairo/package.py
@@ -20,6 +20,8 @@ class PyPycairo(PythonPackage):
version("1.24.0", sha256="1444d52f1bb4cc79a4a0c0fe2ccec4bd78ff885ab01ebe1c0f637d8392bcafb6")
version("1.20.0", sha256="5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:", when="@1.23:", type=("build", "run"))
depends_on("python@3.6:3", when="@1.20:1.22", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pycares/package.py b/var/spack/repos/builtin/packages/py-pycares/package.py
index e8dba26fb7..c13e54cdef 100644
--- a/var/spack/repos/builtin/packages/py-pycares/package.py
+++ b/var/spack/repos/builtin/packages/py-pycares/package.py
@@ -18,6 +18,8 @@ class PyPycares(PythonPackage):
version("3.0.0", sha256="28dc2bd59cf20399a6af4383cc8f57970cfca8b808ca05d6493812862ef0ca9c")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cffi", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py
index 4deba1e149..11984b1abb 100644
--- a/var/spack/repos/builtin/packages/py-pychecker/package.py
+++ b/var/spack/repos/builtin/packages/py-pychecker/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyPychecker(PythonPackage):
"""Python source code checking tool."""
- homepage = "http://pychecker.sourceforge.net/"
+ homepage = "https://pychecker.sourceforge.net/"
url = (
"http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz"
)
diff --git a/var/spack/repos/builtin/packages/py-pycifrw/package.py b/var/spack/repos/builtin/packages/py-pycifrw/package.py
index 9d9474cf7b..8262fca5bc 100644
--- a/var/spack/repos/builtin/packages/py-pycifrw/package.py
+++ b/var/spack/repos/builtin/packages/py-pycifrw/package.py
@@ -15,6 +15,9 @@ class PyPycifrw(PythonPackage):
license("Python-2.0")
+ version("4.4.6", sha256="02bf5975e70ab71540bff62fbef3e8354ac707a0f0ab914a152047962891ef15")
version("4.4.1", sha256="cef7662f475e0eb78a55c2d55774d474e888c96b0539e5f08550afa902cdc4e1")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pycm/package.py b/var/spack/repos/builtin/packages/py-pycm/package.py
new file mode 100644
index 0000000000..657047c438
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pycm/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPycm(PythonPackage):
+ """Multi-class confusion matrix library in Python."""
+
+ homepage = "https://www.pycm.io"
+ pypi = "pycm/pycm-4.0.tar.gz"
+
+ license("MIT")
+
+ version("4.0", sha256="839e217eeb9a093be633ea746c5ca8b7ab6591d978762face892473c9f28959d")
+
+ depends_on("py-art@1.8:", type=("build", "run"))
+ depends_on("py-numpy@1.9.0:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pycocotools/package.py b/var/spack/repos/builtin/packages/py-pycocotools/package.py
index a751e5e935..f082d4bcbf 100644
--- a/var/spack/repos/builtin/packages/py-pycocotools/package.py
+++ b/var/spack/repos/builtin/packages/py-pycocotools/package.py
@@ -12,9 +12,14 @@ class PyPycocotools(PythonPackage):
homepage = "https://github.com/cocodataset/cocoapi"
pypi = "pycocotools/pycocotools-2.0.2.tar.gz"
+ version("2.0.8", sha256="8f2bcedb786ba26c367a3680f9c4eb5b2ad9dccb2b34eaeb205e0a021e1dfb8d")
version("2.0.6", sha256="7fe089b05cc18e806dcf3bd764708d86dab922a100f3734eb77fb77a70a1d18c")
version("2.0.2", sha256="24717a12799b4471c2e54aa210d642e6cd4028826a1d49fcc2b0e3497e041f1a")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("python@3.9:", when="@2.0.8:", type=("build", "link", "run"))
depends_on("python", type=("build", "link", "run"))
depends_on("py-cython@0.27.3:", when="@2.0.4:", type="build")
depends_on("py-cython@0.27.3:", when="@:2.0.3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pycompadre/package.py b/var/spack/repos/builtin/packages/py-pycompadre/package.py
index b749b164c5..559cb5f0e7 100644
--- a/var/spack/repos/builtin/packages/py-pycompadre/package.py
+++ b/var/spack/repos/builtin/packages/py-pycompadre/package.py
@@ -22,6 +22,10 @@ class PyPycompadre(PythonPackage):
version("master", branch="master", preferred=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("trilinos", default=False, description="Use Kokkos from Trilinos")
variant(
"debug",
diff --git a/var/spack/repos/builtin/packages/py-pycortex/package.py b/var/spack/repos/builtin/packages/py-pycortex/package.py
index 9817e95d5d..261af67f21 100644
--- a/var/spack/repos/builtin/packages/py-pycortex/package.py
+++ b/var/spack/repos/builtin/packages/py-pycortex/package.py
@@ -20,6 +20,8 @@ class PyPycortex(PythonPackage):
version("1.2.2", sha256="ac46ed6a1dc727c3126c2b5d7916fc0ac21a6510c32a5edcd3b8cfb7b2128414")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
depends_on("py-future", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py
index e5f085dee1..3626a5f755 100644
--- a/var/spack/repos/builtin/packages/py-pycparser/package.py
+++ b/var/spack/repos/builtin/packages/py-pycparser/package.py
@@ -21,5 +21,7 @@ class PyPycparser(PythonPackage):
version("2.17", sha256="0aac31e917c24cb3357f5a4d5566f2cc91a19ca41862f6c3c22dc60a629673b6")
version("2.13", sha256="b399599a8a0e386bfcbc5e01a38d79dd6e926781f9e358cd5512f41ab7d20eb7")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pycrypto/package.py b/var/spack/repos/builtin/packages/py-pycrypto/package.py
index acfd315a04..a047548c08 100644
--- a/var/spack/repos/builtin/packages/py-pycrypto/package.py
+++ b/var/spack/repos/builtin/packages/py-pycrypto/package.py
@@ -14,5 +14,7 @@ class PyPycrypto(PythonPackage):
version("2.6.1", sha256="f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c")
+ depends_on("c", type="build") # generated
+
# depends_on('py-setuptools', type='build')
depends_on("gmp")
diff --git a/var/spack/repos/builtin/packages/py-pycryptodome/package.py b/var/spack/repos/builtin/packages/py-pycryptodome/package.py
index 73298b196d..4ebcb3ae67 100644
--- a/var/spack/repos/builtin/packages/py-pycryptodome/package.py
+++ b/var/spack/repos/builtin/packages/py-pycryptodome/package.py
@@ -13,6 +13,11 @@ class PyPycryptodome(PythonPackage):
homepage = "https://www.pycryptodome.org"
pypi = "pycryptodome/pycryptodome-3.16.0.tar.gz"
+ license("Unlicense AND BSD-2-Clause", checked_by="wdconinc")
+
+ version("3.20.0", sha256="09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7")
version("3.16.0", sha256="0e45d2d852a66ecfb904f090c3f87dc0dfb89a499570abad8590f10d9cffb350")
+ depends_on("c", type="build")
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pycubexr/package.py b/var/spack/repos/builtin/packages/py-pycubexr/package.py
new file mode 100644
index 0000000000..63edbb2a70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pycubexr/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPycubexr(PythonPackage):
+ """pyCubexR is a Python package for reading the Cube4 file format."""
+
+ homepage = "https://github.com/extra-p/pycubexr"
+ pypi = "pycubexr/pycubexr-2.0.0.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("2.0.0", sha256="03504fbbc9cbd514943e8aeb57919ad49731fe264bdbab86711bf10851276924")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy@1.18:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pycuda/package.py b/var/spack/repos/builtin/packages/py-pycuda/package.py
index 3cb89290b8..2115934ea6 100644
--- a/var/spack/repos/builtin/packages/py-pycuda/package.py
+++ b/var/spack/repos/builtin/packages/py-pycuda/package.py
@@ -22,6 +22,8 @@ class PyPycuda(PythonPackage):
version("2019.1.2", sha256="ada56ce98a41f9f95fe18809f38afbae473a5c62d346cfa126a2d5477f24cc8a")
version("2016.1.2", sha256="a7dbdac7e2f0c0d2ad98f5f281d5a9d29d6673b3c20210e261b96e9a2d0b6e37")
+ depends_on("cxx", type="build") # generated
+
@run_before("install")
def configure(self):
pyver = self.spec["python"].version.up_to(2).joined
diff --git a/var/spack/repos/builtin/packages/py-pycurl/package.py b/var/spack/repos/builtin/packages/py-pycurl/package.py
index 79a95c8573..2a2e099313 100644
--- a/var/spack/repos/builtin/packages/py-pycurl/package.py
+++ b/var/spack/repos/builtin/packages/py-pycurl/package.py
@@ -19,6 +19,8 @@ class PyPycurl(PythonPackage):
version("7.44.1", sha256="5bcef4d988b74b99653602101e17d8401338d596b9234d263c728a0c3df003e8")
version("7.43.0", sha256="aa975c19b79b6aa6c0518c0cc2ae33528900478f0b500531dbcdbf05beec584c")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:", type=("build", "run"))
depends_on("python@3.5:", when="@7.44.1:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pydantic-core/package.py b/var/spack/repos/builtin/packages/py-pydantic-core/package.py
new file mode 100644
index 0000000000..5bc50895c9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pydantic-core/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPydanticCore(PythonPackage):
+ """Core functionality for Pydantic validation and serialization"""
+
+ homepage = "https://github.com/pydantic/pydantic-core"
+ pypi = "pydantic_core/pydantic_core-2.18.4.tar.gz"
+
+ license("MIT", checked_by="qwertos")
+
+ version("2.27.1", sha256="62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235")
+ version("2.18.4", sha256="ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864")
+
+ # Based on PyPI wheel availability
+ depends_on("python@:3.13", type=("build", "run"))
+ depends_on("python@:3.12", when="@:2.19", type=("build", "run"))
+ depends_on("rust@1.76:", type="build")
+ depends_on("py-maturin@1", type="build")
+ depends_on("py-typing-extensions@4.6,4.7.1:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pydantic-extra-types/package.py b/var/spack/repos/builtin/packages/py-pydantic-extra-types/package.py
new file mode 100644
index 0000000000..03636a1bd6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pydantic-extra-types/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPydanticExtraTypes(PythonPackage):
+ """A place for pydantic types that probably shouldn't
+ exist in the main pydantic lib."""
+
+ homepage = "https://github.com/pydantic/pydantic-extra-types"
+ pypi = "pydantic_extra_types/pydantic_extra_types-2.10.0.tar.gz"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("2.10.0", sha256="552c47dd18fe1d00cfed75d9981162a2f3203cf7e77e55a3d3e70936f59587b9")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-pydantic@2.5.2:", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pydantic-settings/package.py b/var/spack/repos/builtin/packages/py-pydantic-settings/package.py
new file mode 100644
index 0000000000..5881eb5dc7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pydantic-settings/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPydanticSettings(PythonPackage):
+ """Settings management using Pydantic."""
+
+ homepage = "https://github.com/pydantic/pydantic-settings"
+ pypi = "pydantic_settings/pydantic_settings-2.6.1.tar.gz"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("2.6.1", sha256="e0f92546d8a9923cb8941689abf85d6601a8c19a23e97a34b2964a2e3f813ca0")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-pydantic@2.7.0:", type=("build", "run"))
+ depends_on("py-python-dotenv@0.21:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pydantic/package.py b/var/spack/repos/builtin/packages/py-pydantic/package.py
index 1819998e46..a5fe38e4f7 100644
--- a/var/spack/repos/builtin/packages/py-pydantic/package.py
+++ b/var/spack/repos/builtin/packages/py-pydantic/package.py
@@ -14,6 +14,8 @@ class PyPydantic(PythonPackage):
license("MIT")
+ version("2.10.1", sha256="a4daca2dc0aa429555e0656d6bf94873a7dc5f54ee42b1f5873d666fb3f35560")
+ version("2.7.4", sha256="0c84efd9548d545f63ac0060c1e4d39bb9b14db8b3c0652338aecc07b5adec52")
version("1.10.9", sha256="95c70da2cd3b6ddf3b9645ecaa8d98f3d80c606624b6d245558d202cd23ea3be")
version("1.10.2", sha256="91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410")
version("1.9.2", sha256="8cb0bc509bfb71305d7a59d00163d5f9fc4530f0881ea32c74ff4f74c85f3d3d")
@@ -21,9 +23,16 @@ class PyPydantic(PythonPackage):
variant("dotenv", default=False, description="Install requirements for pydantic.dotenv")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="build", when="@1")
+ depends_on("py-hatchling", type="build", when="@2")
+ depends_on("py-hatch-fancy-pypi-readme@22.5.0:", type="build", when="@2")
+ depends_on("py-typing-extensions@4.12.2:", when="@2.10:", type=("build", "run"))
+ depends_on("py-typing-extensions@4.6.1:", when="@2.7.1:", type=("build", "run"))
depends_on("py-typing-extensions@4.2:", when="@1.10.9:", type=("build", "run"))
depends_on("py-typing-extensions@4.1:", when="@1.10:", type=("build", "run"))
depends_on("py-typing-extensions@3.7.4.3:", type=("build", "run"))
-
- depends_on("py-python-dotenv@0.10.4:", when="+dotenv", type=("build", "run"))
+ depends_on("py-annotated-types@0.6:", type=("build", "run"), when="@2.10:")
+ depends_on("py-annotated-types@0.4.0:", type=("build", "run"), when="@2.7.4:")
+ depends_on("py-pydantic-core@2.27.1", type=("build", "run"), when="@2.10.1")
+ depends_on("py-pydantic-core@2.18.4", type=("build", "run"), when="@2.7.4")
+ depends_on("py-python-dotenv@0.10.4:", when="@1 +dotenv", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pydftracer/package.py b/var/spack/repos/builtin/packages/py-pydftracer/package.py
new file mode 100644
index 0000000000..2b34fbfa98
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pydftracer/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPydftracer(PythonPackage):
+ """A low-level profiler for capture I/O calls from deep learning applications."""
+
+ homepage = "https://github.com/hariharan-devarajan/dlio-profiler.git"
+ git = "https://github.com/hariharan-devarajan/dlio-profiler.git"
+ maintainers("hariharan-devarajan")
+
+ license("MIT")
+
+ version("develop", branch="develop")
+ version("master", branch="master")
+ version("1.0.3", tag="v1.0.3", commit="856de0b958a22081d80a9a25bea3f74e2759d9ee")
+ version("1.0.2", tag="v1.0.2", commit="8a15f09ff54a909605eda0070689c0b99401db20")
+ version("1.0.1", tag="v1.0.1", commit="dc1ce44042e669e6da495f906ca5f8b155c9f155")
+ version("1.0.0", tag="v1.0.0", commit="b6df57d81ffb043b468e2bd3e8df9959fdb4af53")
+
+ depends_on("cpp-logger@0.0.4", when="@1.0.0:")
+ depends_on("brahma@0.0.5", when="@1.0.0:")
+ depends_on("yaml-cpp@0.6.3", when="@1.0.0:")
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-pybind11", type=("build", "run"))
+ depends_on("ninja", type="build")
+ depends_on("cmake@3.12:", type="build")
+
+ def setup_build_environment(self, env):
+ env.set("DFTRACER_INSTALL_DIR", self.prefix)
+ env.set("DFTRACER_PYTHON_SITE", python_purelib)
+ env.set("DFTRACER_BUILD_DEPENDENCIES", "0")
diff --git a/var/spack/repos/builtin/packages/py-pydispatcher/package.py b/var/spack/repos/builtin/packages/py-pydispatcher/package.py
index 9822d78d68..68c369909c 100644
--- a/var/spack/repos/builtin/packages/py-pydispatcher/package.py
+++ b/var/spack/repos/builtin/packages/py-pydispatcher/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyPydispatcher(PythonPackage):
"""Multi-producer-multi-consumer signal dispatching mechanism."""
- homepage = "http://pydispatcher.sourceforge.net/"
+ homepage = "https://pydispatcher.sourceforge.net/"
pypi = "PyDispatcher/PyDispatcher-2.0.5.tar.gz"
version("2.0.5", sha256="5570069e1b1769af1fe481de6dd1d3a388492acddd2cdad7a3bde145615d5caf")
diff --git a/var/spack/repos/builtin/packages/py-pyeda/package.py b/var/spack/repos/builtin/packages/py-pyeda/package.py
index 83f9bc1a6f..01627e5c18 100644
--- a/var/spack/repos/builtin/packages/py-pyeda/package.py
+++ b/var/spack/repos/builtin/packages/py-pyeda/package.py
@@ -16,5 +16,7 @@ class PyPyeda(PythonPackage):
version("0.28.0", sha256="07185f458d5d0b2ba5058da8b95dad6ab7684ceaf41237a25bcd3f005490f59d")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@3.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyee/package.py b/var/spack/repos/builtin/packages/py-pyee/package.py
new file mode 100644
index 0000000000..34d26b7b57
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyee/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyee(PythonPackage):
+ """A rough port of Node.js's EventEmitter to Python
+ with a few tricks of its own."""
+
+ homepage = "https://github.com/jfhbrook/pyee"
+ pypi = "pyee/pyee-12.0.0.tar.gz"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("12.0.0", sha256="c480603f4aa2927d4766eb41fa82793fe60a82cbfdb8d688e0d08c55a534e145")
+ version("11.1.1", sha256="82e1eb1853f8497c4ff1a0c7fa26b9cd2f1253e2b6ffb93b4700fda907017302")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm", type="build")
+ depends_on("py-wheel", type="build")
+ depends_on("py-typing-extensions", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py
index 5699b1b14e..bbaf9d8b44 100644
--- a/var/spack/repos/builtin/packages/py-pyelftools/package.py
+++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py
@@ -23,4 +23,7 @@ class PyPyelftools(PythonPackage):
version("0.24", sha256="e9dd97d685a5b96b88a988dabadb88e5a539b64cd7d7927fac9a7368dc4c459c")
version("0.23", sha256="fc57aadd096e8f9b9b03f1a9578f673ee645e1513a5ff0192ef439e77eab21de")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyenchant/package.py b/var/spack/repos/builtin/packages/py-pyenchant/package.py
new file mode 100644
index 0000000000..a97afb66ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyenchant/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyenchant(PythonPackage):
+ """Sphinx Documentation Generator."""
+
+ homepage = "https://pyenchant.github.io/pyenchant/"
+ pypi = "pyenchant/pyenchant-3.2.2.tar.gz"
+ git = "https://github.com/pyenchant/pyenchant.git"
+
+ license("LGPL-2.1")
+
+ version("3.2.2", sha256="1cf830c6614362a78aab78d50eaf7c6c93831369c52e1bb64ffae1df0341e637")
+
+ depends_on("enchant")
+ depends_on("python@3.5:")
+ depends_on("py-setuptools")
diff --git a/var/spack/repos/builtin/packages/py-pyerfa/package.py b/var/spack/repos/builtin/packages/py-pyerfa/package.py
index 6b7e51ed2e..719fd60d75 100644
--- a/var/spack/repos/builtin/packages/py-pyerfa/package.py
+++ b/var/spack/repos/builtin/packages/py-pyerfa/package.py
@@ -22,12 +22,18 @@ class PyPyerfa(PythonPackage):
license("BSD-3-Clause")
+ version("2.0.1.1", sha256="dbac74ef8d3d3b0f22ef0ad3bbbdb30b2a9e10570b1fa5a98be34c7be36c9a6b")
version("2.0.0.1", sha256="2fd4637ffe2c1e6ede7482c13f583ba7c73119d78bef90175448ce506a0ede30")
+ depends_on("c", type="build") # generated
+
# From setup.cfg
depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-numpy@1.25:2", when="@2.0.1.1", type=("build", "run"))
depends_on("py-numpy@1.17:", type=("build", "run"))
+ depends_on("py-setuptools-scm@6.2:", when="@2.0.1.1", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
+
# From pyproject.toml
depends_on("py-setuptools@42:", type="build")
depends_on("py-packaging", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyfaidx/package.py b/var/spack/repos/builtin/packages/py-pyfaidx/package.py
index 205f4e6a7f..3c3ebf2bf7 100644
--- a/var/spack/repos/builtin/packages/py-pyfaidx/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfaidx/package.py
@@ -11,9 +11,20 @@ class PyPyfaidx(PythonPackage):
pypi = "pyfaidx/pyfaidx-0.5.5.2.tar.gz"
+ maintainers("snehring")
+
license("BSD-3-Clause")
+ version("0.8.1.2", sha256="d8452470455b1e778f93969447db8ea24deb4624c7c40769516459cb6f87bc33")
+ version("0.6.4", sha256="7ba3bdcb1df4ba749f7665b34e6a052aa4e842406a0df95e6df4717cc123f392")
version("0.5.5.2", sha256="9ac22bdc7b9c5d995d32eb9dc278af9ba970481636ec75c0d687d38c26446caa")
- depends_on("py-setuptools@0.7:", type=("build", "run"))
- depends_on("py-six", type=("build", "run"))
+ depends_on("python@3.7:", type=("build", "run"), when="@0.8.1.2:")
+
+ depends_on("py-setuptools@0.7:", type="build")
+ depends_on("py-setuptools@45:", type="build", when="@0.8.1.2:")
+ depends_on("py-setuptools-scm", type="build", when="@0.8.1.2:")
+ depends_on("py-importlib-metadata", type="build", when="@0.8.1.2:")
+ depends_on("py-packaging", type=("build", "run"), when="@0.8.1.2:")
+
+ depends_on("py-six", type=("build", "run"), when="@:0.6.4")
diff --git a/var/spack/repos/builtin/packages/py-pyfastaq/package.py b/var/spack/repos/builtin/packages/py-pyfastaq/package.py
new file mode 100644
index 0000000000..8317a1448f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyfastaq/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyfastaq(PythonPackage):
+ """Manipulate FASTA and FASTQ files."""
+
+ homepage = "https://github.com/sanger-pathogens/Fastaq"
+
+ pypi = "pyfastaq/pyfastaq-3.12.1.tar.gz"
+
+ version("3.17.0", sha256="40c6dc0cea72c0ab91d10e5627a26dea1783b7e5e3edcfff8e1dc960bfd71cdc")
+ version("3.16.0", sha256="368f3f1752668283f5d1aac4ea80e9595a57dc92a7d4925d723407f862af0e4e")
+ version("3.15.0", sha256="30013f38956535fddddedda03dc072e808704f6e026231dd1539869a08afcbe8")
+ version("3.14.0", sha256="54dc8cc8b3d24111f6939cf563833b8e9e78777b9cf7b82ca8ddec04aa1c05f2")
+ version("3.13.0", sha256="79bfe342e053d51efbc7a901489c62e996566b4baf0f33cde1caff3a387756af")
+ version("3.12.1", sha256="996dee7c5583b9c06c0a96a9e539d5f4218c084a3b2ee757fb245b4222b2a829")
+ version("3.12.0", sha256="a3a03db385e6eaffa44b659594877bf95d78ac1b1c93d5498a7f0b9e4c4fe2aa")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("samtools", type="run")
+ depends_on("gzip", type="run")
diff --git a/var/spack/repos/builtin/packages/py-pyfftw/package.py b/var/spack/repos/builtin/packages/py-pyfftw/package.py
index 6e89e8886e..56ed3b16cd 100644
--- a/var/spack/repos/builtin/packages/py-pyfftw/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfftw/package.py
@@ -10,20 +10,44 @@ class PyPyfftw(PythonPackage):
"""A pythonic wrapper around FFTW, the FFT library,
presenting a unified interface for all the supported transforms."""
- homepage = "http://hgomersall.github.com/pyFFTW"
- pypi = "pyFFTW/pyFFTW-0.10.4.tar.gz"
+ homepage = "https://pyfftw.readthedocs.io/en/latest/"
+ pypi = "pyFFTW/pyfftw-0.14.0.tar.gz"
+
+ maintainers("paugier")
license("BSD-3-Clause")
+ version("0.14.0", sha256="a55f94d3da9b5c04de1bc96932a93f922910f3984557931356173a515277b65b")
+ version("0.13.1", sha256="09155e90a0c6d0c1f2d1f3668180a7de95fb9f83fef5137a112fb05978e87320")
+ version("0.13.0", sha256="da85102405c0bd95d57eb19e99b01a0729d8406cb204c3900894b873784253da")
version("0.12.0", sha256="60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0")
version("0.11.1", sha256="05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926")
version("0.10.4", sha256="739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a")
- depends_on("fftw")
- depends_on("py-setuptools", type="build")
- depends_on("py-cython@0.29:0", type="build")
- depends_on("py-numpy@1.6:", type=("build", "run"), when="@:0.10.4")
- depends_on("py-numpy@1.10:1", type=("build", "run"), when="@0.11.0:")
+ depends_on("python@3.9:", type=("build", "run"), when="@0.14.0:")
+ depends_on("python@3.8:3.11", type=("build", "run"), when="@:0.13.1")
+
+ depends_on("py-setuptools@:59.4.0", type="build")
+
+ depends_on("py-cython@3.0:3", type="build", when="@0.14.0:")
+ depends_on("py-cython@0.29.18:0", type="build", when="@0.13.0:0.13")
+ depends_on("py-cython@0.29:0", type="build", when="@:0.13")
+
+ depends_on("py-numpy@2.0:2", type=("build", "run"), when="@0.14.0:")
+ depends_on("py-numpy@1.20:1", type=("build", "run"), when="@0.13.1")
+ depends_on("py-numpy@1.16:1", type=("build", "run"), when="@0.13.0")
+ depends_on("py-numpy@1.10:1", type=("build", "run"), when="@0.11:0.12")
+ depends_on("py-numpy@1.6:1", type=("build", "run"), when="@:0.10.4")
+
+ depends_on("fftw@3.3:")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/p/pyfftw/{0}-{1}.tar.gz"
+ if version >= Version("0.14.0"):
+ name = "pyfftw"
+ else:
+ name = "pyFFTW"
+ return url.format(name, version)
def setup_build_environment(self, env):
env.append_flags("LDFLAGS", self.spec["fftw"].libs.search_flags)
diff --git a/var/spack/repos/builtin/packages/py-pyfits/package.py b/var/spack/repos/builtin/packages/py-pyfits/package.py
index 8abe148fdb..cc21bd31a9 100644
--- a/var/spack/repos/builtin/packages/py-pyfits/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfits/package.py
@@ -15,5 +15,7 @@ class PyPyfits(PythonPackage):
version("3.5", sha256="fd32596ee09170a70ddc87d0dfc5503d860ef6b68abcff486d7aa6993dff6162")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyfr/package.py b/var/spack/repos/builtin/packages/py-pyfr/package.py
index 48c328be64..e1a9962c1c 100644
--- a/var/spack/repos/builtin/packages/py-pyfr/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfr/package.py
@@ -12,7 +12,7 @@ class PyPyfr(PythonPackage, CudaPackage, ROCmPackage):
advection-diffusion type problems on streaming architectures
using the Flux Reconstruction approach of Huynh."""
- homepage = "http://www.pyfr.org/"
+ homepage = "https://www.pyfr.org/"
pypi = "pyfr/pyfr-1.13.0.tar.gz"
git = "https://github.com/PyFR/PyFR/"
maintainers("MichaelLaufer")
@@ -24,46 +24,56 @@ class PyPyfr(PythonPackage, CudaPackage, ROCmPackage):
version("master", branch="master")
# pypi releases
+ version(
+ "2.0.3",
+ sha256="1fd2ca377596ab541d929d2c7b2d27e376e21b5dd6c4c0e7653bbb53864dee61",
+ preferred=True,
+ )
+ version("2.0.2", sha256="2c6bf460ffec446a933451792c09d3cd85d6703f14636d99810d61823b8d92c7")
version("1.15.0", sha256="6a634b9d32447f45d3c24c9de0ed620a0a0a781be7cc5e57b1c1bf44a4650d8d")
version("1.14.0", sha256="ebf40ce0896cce9ac802e03fd9430b5be30ea837c31224531a6d5fd68f820766")
version("1.13.0", sha256="ac6ecec738d4e23799ab8c50dea9bdbd7d37bc971bd33f22720c5a230b8e7b2f")
- variant("metis", default=True, description="Metis for mesh partitioning")
- variant("scotch", default=False, description="Scotch for mesh partitioning")
+ variant("metis", default=False, when="@:1.15.0", description="Metis for mesh partitioning")
+ variant("scotch", default=True, description="Scotch for mesh partitioning")
variant("cuda", default=False, description="CUDA backend support")
variant("hip", default=False, description="HIP backend support")
variant("libxsmm", default=True, description="LIBXSMM for OpenMP backend")
- variant("scipy", default=True, description="Scipy acceleration for point sampling")
# Required dependencies
- depends_on("python@3.9:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ depends_on("python@3.9:", when="@:1.15.0", type=("build", "run"))
+ depends_on("python@3.10:", when="@2.0.2:", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
depends_on("py-gimmik@2.3:2", when="@:1.14.0", type=("build", "run"))
- depends_on("py-gimmik@3", when="@1.15.0:", type=("build", "run"))
+ depends_on("py-gimmik@3", when="@1.15.0", type=("build", "run"))
+ depends_on("py-gimmik@3.2.1:", when="@2.0.2:", type=("build", "run"))
depends_on("py-h5py@2.10:", type=("build", "run"))
depends_on("py-mako@1.0.0:", type=("build", "run"))
depends_on("py-mpi4py@3.1.0:", type=("build", "run"))
- depends_on("py-numpy@1.20:", type=("build", "run"))
+ depends_on("py-numpy@1.20:", when="@:1.15.0", type=("build", "run"))
+ depends_on("py-numpy@1.26.4:", when="@2.0.2:", type=("build", "run"))
depends_on("py-platformdirs@2.2.0:", type=("build", "run"))
depends_on("py-pytools@2016.2.1:", type=("build", "run"))
+ depends_on("py-rtree@1.0.1:", when="@2.0.2:", type=("build", "run"))
# Optional dependencies
- depends_on("py-scipy", when="+scipy", type=("build", "run"))
- depends_on("metis@5.0:", when="+metis", type=("run"))
+ depends_on("metis@5.0.0:5.1.0", when="@:1.15.0 +metis", type=("run"))
depends_on("scotch@7.0.1: +link_error_lib", when="+scotch", type=("run"))
depends_on("cuda@8.0: +allow-unsupported-compilers", when="@:1.14.0 +cuda", type=("run"))
depends_on("cuda@11.4.0: +allow-unsupported-compilers", when="@1.15.0: +cuda", type=("run"))
- depends_on("rocblas@5.2.0:", when="+hip", type=("run"))
+ depends_on("rocblas@5.2.0:", when="@:1.15.0 +hip", type=("run"))
+ depends_on("rocblas@6.0.0:", when="@2.0.2: +hip", type=("run"))
depends_on("libxsmm@1.18:+shared blas=0", when="+libxsmm", type=("run"))
- # Conflicts for compilers not supporting OpenMP 5.1+ from v1.15.0:
- conflicts("%gcc@:11", when="@1.15.0: +libxsmm", msg="OpenMP 5.1+ supported compiler required!")
-
- # Explicitly add dependencies to PYFR_LIBRARY_PATH environment variable
+ # Explicitly add dependencies to environment variables
def setup_run_environment(self, env):
- deps = ["metis", "scotch", "libxsmm", "cuda", "hip", "rocblas"]
+ deps = ["metis", "scotch", "libxsmm", "hip", "rocblas"]
pyfr_library_path = []
for dep in deps:
if "+{}".format(dep) in self.spec:
pyfr_library_path.extend(self.spec[dep].libs.directories)
env.set("PYFR_LIBRARY_PATH", ":".join(pyfr_library_path))
+
+ # LD_LIBRARY_PATH needed for cuda
+ if "+cuda" in self.spec:
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["cuda"].libs.directories[0])
diff --git a/var/spack/repos/builtin/packages/py-pygdal/package.py b/var/spack/repos/builtin/packages/py-pygdal/package.py
index 2e995e8bbe..50fef6a1ce 100644
--- a/var/spack/repos/builtin/packages/py-pygdal/package.py
+++ b/var/spack/repos/builtin/packages/py-pygdal/package.py
@@ -30,6 +30,9 @@ class PyPygdal(PythonPackage):
version("2.4.1.6", sha256="5d1af98ad09f59e34e3b332cf20630b532b33c7120295aaaabbccebf58a11aa4")
version("2.4.0.6", sha256="728d11f3ecae0cd3493cd27dab599a0b6184f5504cc172d49400d88ea2b24a9c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", when="@3.3:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pygeos/package.py b/var/spack/repos/builtin/packages/py-pygeos/package.py
index 773d42c94d..2b4a843dbd 100644
--- a/var/spack/repos/builtin/packages/py-pygeos/package.py
+++ b/var/spack/repos/builtin/packages/py-pygeos/package.py
@@ -25,6 +25,8 @@ class PyPygeos(PythonPackage):
version("0.9", sha256="c0584b20e95f80ee57277a6eb1e5d7f86600f8b1ef3c627d238e243afdcc0cc7")
version("0.8", sha256="45b7e1aaa5fc9ff53565ef089fb75c53c419ace8cee18385ec1d7c1515c17cbc")
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "link", "run"))
depends_on("py-cython@0.29:0", when="@0.14:", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pygit2/package.py b/var/spack/repos/builtin/packages/py-pygit2/package.py
index f5cf5c4e3f..0ce4e292d8 100644
--- a/var/spack/repos/builtin/packages/py-pygit2/package.py
+++ b/var/spack/repos/builtin/packages/py-pygit2/package.py
@@ -20,6 +20,8 @@ class PyPygit2(PythonPackage):
version("1.4.0", sha256="cbeb38ab1df9b5d8896548a11e63aae8a064763ab5f1eabe4475e6b8a78ee1c8")
version("1.3.0", sha256="0be93f6a8d7cbf0cc79ae2f0afb1993fc055fc0018c27e2bd01ba143e51d4452")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
# https://www.pygit2.org/install.html#version-numbers
depends_on("libgit2@1.6", when="@1.12")
diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py
index 3b661527f1..c2837796e6 100644
--- a/var/spack/repos/builtin/packages/py-pygments/package.py
+++ b/var/spack/repos/builtin/packages/py-pygments/package.py
@@ -10,11 +10,12 @@ class PyPygments(PythonPackage):
"""Pygments is a syntax highlighting package written in Python."""
homepage = "https://pygments.org/"
- pypi = "Pygments/Pygments-2.4.2.tar.gz"
+ pypi = "Pygments/pygments-2.18.0.tar.gz"
git = "https://github.com/pygments/pygments.git"
license("BSD-2-Clause")
+ version("2.18.0", sha256="786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199")
version("2.16.1", sha256="1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29")
version("2.16.0", sha256="4f6df32f21dca07a54a0a130bda9a25d2241e9e0a206841d061c85a60cc96145")
version("2.15.1", sha256="8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c")
@@ -29,6 +30,13 @@ class PyPygments(PythonPackage):
version("2.0.1", sha256="5e039e1d40d232981ed58914b6d1ac2e453a7e83ddea22ef9f3eeadd01de45cb")
version("2.0.2", sha256="7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51")
- depends_on("python@3.7:", when="@2.15:", type=("build", "run"))
- depends_on("py-setuptools@61:", when="@2.15:", type=("build", "run"))
- depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-hatchling", when="@2.17:", type="build")
+ depends_on("py-setuptools@61:", when="@2.15:2.16", type=("build", "run"))
+ depends_on("py-setuptools", when="@:2.14", type=("build", "run"))
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/P/Pygments/{}-{}.tar.gz"
+ name = "Pygments"
+ if version >= Version("2.17"):
+ name = name.lower()
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-pygmsh/package.py b/var/spack/repos/builtin/packages/py-pygmsh/package.py
new file mode 100644
index 0000000000..66480f2602
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pygmsh/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPygmsh(PythonPackage):
+ """Easier Pythonic interface to GMSH."""
+
+ homepage = "https://github.com/nschloe/pygmsh"
+ url = "https://github.com/nschloe/pygmsh/archive/refs/tags/v7.1.17.tar.gz"
+
+ maintainers("tech-91")
+
+ license("GPL-3.0-only")
+
+ version("7.1.17", sha256="9c9c0fb507eb5c0d0f1f64a23909b3bda25652df737e935ea9336b08773afc4e")
+
+ depends_on("py-flit-core@3.2:4", type="build", when="@1.3:")
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-meshio@4.3.2:6", type=("build", "run"))
+ depends_on("py-gmsh", type=("build", "run"))
+ depends_on("py-numpy@1.20.0:1.26.4", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pygmt/package.py b/var/spack/repos/builtin/packages/py-pygmt/package.py
new file mode 100644
index 0000000000..a900cd043c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pygmt/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPygmt(PythonPackage):
+ """A Python interface for the Generic Mapping Tools."""
+
+ homepage = "https://github.com/GenericMappingTools/pygmt"
+ pypi = "pygmt/pygmt-0.9.0.tar.gz"
+
+ maintainers("snehring")
+
+ license("BSD-3-Clause", checked_by="snehring")
+
+ version("0.9.0", sha256="1090be7a3745e982af130a0289b9ceb60289b9c2c50fc2e0f681004ed7a1a20e")
+
+ depends_on("python@3.9:3", type=("build", "run"))
+
+ depends_on("py-setuptools@64:", type="build")
+ depends_on("py-setuptools-scm@6.2:", type="build")
+
+ depends_on("py-numpy@1.21:", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-xarray", type=("build", "run"))
+ depends_on("py-netcdf4", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"))
+ depends_on("gmt@6.3.0:+graphicsmagick", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pygobject/package.py b/var/spack/repos/builtin/packages/py-pygobject/package.py
index 80886aeccb..a853bf860d 100644
--- a/var/spack/repos/builtin/packages/py-pygobject/package.py
+++ b/var/spack/repos/builtin/packages/py-pygobject/package.py
@@ -10,24 +10,47 @@ class PyPygobject(PythonPackage):
"""bindings for the GLib, and GObject,
to be used in Python."""
- homepage = "https://pypi.python.org/pypi/pygobject"
+ homepage = "https://pygobject.readthedocs.io/en/latest/"
license("LGPL-2.1-or-later")
- version("3.38.0", sha256="0372d1bb9122fc19f500a249b1f38c2bb67485000f5887497b4b205b3e7084d5")
- version("3.28.3", sha256="3dd3e21015d06e00482ea665fc1733b77e754a6ab656a5db5d7f7bfaf31ad0b0")
- version("2.28.6", sha256="fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8")
+ version("3.46.0", sha256="426008b2dad548c9af1c7b03b59df0440fde5c33f38fb5406b103a43d653cafc")
+ version(
+ "3.38.0",
+ sha256="0372d1bb9122fc19f500a249b1f38c2bb67485000f5887497b4b205b3e7084d5",
+ deprecated=True,
+ )
+ version(
+ "3.28.3",
+ sha256="3dd3e21015d06e00482ea665fc1733b77e754a6ab656a5db5d7f7bfaf31ad0b0",
+ deprecated=True,
+ )
+ version(
+ "2.28.6",
+ sha256="fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
extends("python")
depends_on("py-setuptools", type="build")
depends_on("pkgconfig", type="build")
- depends_on("libffi")
- depends_on("glib")
- depends_on("py-pycairo", type=("build", "run"))
- depends_on("gobject-introspection")
depends_on("gtkplus")
+ # meson.build
+ depends_on("python@3.8:3", type=("build", "run"), when="@3.46.0")
+ depends_on("glib@2.64.0:", when="@3.46.0")
+ depends_on("gobject-introspection@1.64.0:", when="@3.46.0")
+ depends_on("py-pycairo@1.16:1", type=("build", "run"), when="@3.46.0")
+ depends_on("libffi@3.0.0:", when="@3.46.0")
+
+ depends_on("glib", when="@:3.46.0")
+ depends_on("gobject-introspection", when="@:3.46.0")
+ depends_on("py-pycairo", type=("build", "run"), when="@:3.46.0")
+ depends_on("libffi", when="@:3.46.0")
+
# pygobject links directly using the compiler, not spack's wrapper.
# This causes it to fail to add the appropriate rpaths. This patch modifies
# pygobject's setup.py file to add -Wl,-rpath arguments for dependent
diff --git a/var/spack/repos/builtin/packages/py-pygpu/package.py b/var/spack/repos/builtin/packages/py-pygpu/package.py
index f045733595..3a92491d5b 100644
--- a/var/spack/repos/builtin/packages/py-pygpu/package.py
+++ b/var/spack/repos/builtin/packages/py-pygpu/package.py
@@ -22,6 +22,8 @@ class PyPygpu(PythonPackage):
version("0.6.1", sha256="b2466311e0e3bacdf7a586bba0263f6d232bf9f8d785e91ddb447653741e6ea5")
version("0.6.0", sha256="a58a0624e894475a4955aaea25e82261c69b4d22c8f15ec07041a4ba176d35af")
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "link", "run"))
depends_on("libgpuarray@0.7.6", when="@0.7.6")
depends_on("libgpuarray@0.7.5", when="@0.7.5")
diff --git a/var/spack/repos/builtin/packages/py-pygresql/package.py b/var/spack/repos/builtin/packages/py-pygresql/package.py
index ef723799c3..6e9fe6d7da 100644
--- a/var/spack/repos/builtin/packages/py-pygresql/package.py
+++ b/var/spack/repos/builtin/packages/py-pygresql/package.py
@@ -10,8 +10,8 @@ class PyPygresql(PythonPackage):
"""PyGreSQL is an open-source Python module that interfaces to a
PostgreSQL database"""
- homepage = "http://www.pygresql.org"
- url = "http://www.pygresql.org/files/PyGreSQL-5.0.5.tar.gz"
+ homepage = "https://www.pygresql.org"
+ url = "https://www.pygresql.org/files/PyGreSQL-5.0.5.tar.gz"
version("5.0.5", sha256="ff5e76b840600d4912b79daf347b44274a1c0368663e7b57529c406f8426479c")
diff --git a/var/spack/repos/builtin/packages/py-pyhdf/package.py b/var/spack/repos/builtin/packages/py-pyhdf/package.py
new file mode 100644
index 0000000000..c7631f64c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyhdf/package.py
@@ -0,0 +1,52 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyhdf(PythonPackage):
+ """pyhdf is a python wrapper around the NCSA HDF version 4 library.
+ The SD (Scientific Dataset), VS (Vdata) and V (Vgroup) APIs are
+ currently implemented. NetCDF files can also be read and modified."""
+
+ homepage = "https://github.com/fhs/pyhdf"
+ pypi = "pyhdf/pyhdf-0.10.4.tar.gz"
+ git = "https://github.com/fhs/pyhdf.git"
+
+ maintainers("climbfuji")
+
+ license("MIT")
+
+ version("master", branch="master")
+ version("0.11.4", sha256="f4d48ee6f297be76e07b1a31710ef898caa31757dfdf173e5a4b94988ea76164")
+ version("0.10.4", sha256="ea09b2bdafc9be0f7f43d72ff122d8efbde61881f4da3a659b33be5e29215f93")
+
+ depends_on("c", type="build") # generated
+
+ # Python versions
+ depends_on("py-setuptools", type="build")
+
+ # Dependencies
+ depends_on("zlib-api", type=("build", "run"))
+ depends_on("hdf@4.2", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/fhs/pyhdf/issues/63
+ depends_on("py-numpy@:1.24", when="@0.10.4", type=("build", "run"))
+ depends_on("jpeg", type=("build", "run"))
+
+ def setup_build_environment(self, env):
+ inc_dirs = []
+ lib_dirs = []
+ # Strip -I and -L from spec include_flags / search_flags
+ inc_dirs.append(self.spec["zlib-api"].headers.include_flags.lstrip("-I"))
+ inc_dirs.append(self.spec["hdf"].headers.include_flags.lstrip("-I"))
+ inc_dirs.append(self.spec["jpeg"].headers.include_flags.lstrip("-I"))
+ lib_dirs.append(self.spec["zlib-api"].libs.search_flags.lstrip("-L"))
+ lib_dirs.append(self.spec["hdf"].libs.search_flags.lstrip("-L"))
+ lib_dirs.append(self.spec["jpeg"].libs.search_flags.lstrip("-L"))
+ env.set("INCLUDE_DIRS", ":".join(inc_dirs))
+ env.set("LIBRARY_DIRS", ":".join(lib_dirs))
+ if self.spec["hdf"].satisfies("@:4.1"):
+ env.set("NO_COMPRESS", "1")
diff --git a/var/spack/repos/builtin/packages/py-pyheadtail/package.py b/var/spack/repos/builtin/packages/py-pyheadtail/package.py
index 3908fcf2f4..35ed6f6c32 100644
--- a/var/spack/repos/builtin/packages/py-pyheadtail/package.py
+++ b/var/spack/repos/builtin/packages/py-pyheadtail/package.py
@@ -13,13 +13,19 @@ class PyPyheadtail(PythonPackage):
homepage = "https://github.com/PyCOMPLETE/PyHEADTAIL"
pypi = "PyHEADTAIL/PyHEADTAIL-1.14.1.tar.gz"
+ version("1.16.1", sha256="bbe69eeb2f57fffee455a35dc14cca95a9c650ba334982fa9ba62a1ebd5b5606")
version("1.14.1", sha256="bf90ac7e8764176c55e82c363cad7ab43543863b6ef482760ced23b78e917bb4")
version("1.13.1", sha256="29c742573a918126b5a9c21806ee0ec6a34ec642a0e6ad200f6d4551bf1bb310")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python", type=("build", "run"))
depends_on("python@3:", when="@1.13.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
+ # cython@3: support was added in 1.16.1
+ depends_on("py-cython@:2", when="@:1.16.0", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-h5py", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyhmmer/package.py b/var/spack/repos/builtin/packages/py-pyhmmer/package.py
new file mode 100644
index 0000000000..b263e89389
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyhmmer/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyhmmer(PythonPackage):
+ """HMMER is a biological sequence analysis tool that uses profile hidden
+ Markov models to search for sequence homologs. HMMER3 is developed and
+ maintained by the Eddy/Rivas Laboratory at Harvard University. pyhmmer
+ is a Python package, implemented using the Cython language, that provides
+ bindings to HMMER3."""
+
+ homepage = "https://github.com/althonos/pyhmmer"
+ pypi = "pyhmmer/pyhmmer-0.10.14.tar.gz"
+
+ license("MIT", checked_by="luke-dt")
+
+ version("0.10.15", sha256="bf8e97ce8da6fb5850298f3074640f3e998d5a655877f865c1592eb057dc7921")
+ version("0.10.14", sha256="eb50bdfdf67a3b1fecfe877d7ca6d9bade9a9f3dea3ad60c959453bbb235573d")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools@46.4:", type="build")
+ depends_on("py-cython@3.0", type="build")
+ depends_on("py-psutil@5.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyhull/package.py b/var/spack/repos/builtin/packages/py-pyhull/package.py
index 3db784d4d8..307416ddf5 100644
--- a/var/spack/repos/builtin/packages/py-pyhull/package.py
+++ b/var/spack/repos/builtin/packages/py-pyhull/package.py
@@ -21,6 +21,8 @@ class PyPyhull(PythonPackage):
version("2015.2.1", sha256="d2ff0aa3298b548287587609a24f4e2aae7f7b8b1df152a90cd313260abc3a24")
+ depends_on("c", type="build") # generated
+
# From setup.py:
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyinstrument-cext/package.py b/var/spack/repos/builtin/packages/py-pyinstrument-cext/package.py
index 83bbdedd5b..c10fea144f 100644
--- a/var/spack/repos/builtin/packages/py-pyinstrument-cext/package.py
+++ b/var/spack/repos/builtin/packages/py-pyinstrument-cext/package.py
@@ -16,4 +16,6 @@ class PyPyinstrumentCext(PythonPackage):
version("0.2.2", sha256="f29e25f71d74c0415ca9310e5567fff0f5d29f4240a09a885abf8b0eed71cc5b")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyinstrument/package.py b/var/spack/repos/builtin/packages/py-pyinstrument/package.py
index 39a2048a4e..6c2a128fbb 100644
--- a/var/spack/repos/builtin/packages/py-pyinstrument/package.py
+++ b/var/spack/repos/builtin/packages/py-pyinstrument/package.py
@@ -19,6 +19,8 @@ class PyPyinstrument(PythonPackage):
version("3.1.3", sha256="353c7000a6563b16c0be0c6a04104d42b3154c5cd7c1979ab66efa5fdc5f5571")
version("3.1.0", sha256="10c1fed4996a72c3e1e2bac1940334756894dbd116df3cc3b2d9743f2ae43016")
+ depends_on("c", type="build") # generated
+
variant("jupyter", default=False, description="Support Jupyter/IPython magic", when="@4.1:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyke/package.py b/var/spack/repos/builtin/packages/py-pyke/package.py
index 1368dd7185..865c03ce9b 100644
--- a/var/spack/repos/builtin/packages/py-pyke/package.py
+++ b/var/spack/repos/builtin/packages/py-pyke/package.py
@@ -12,7 +12,7 @@ class PyPyke(PythonPackage):
engine (expert system) written in 100% Python.
"""
- homepage = "https://sourceforge.net/projects/pyke"
+ homepage = "https://sourceforge.net/projects/pyke/"
url = "https://sourceforge.net/projects/pyke/files/pyke/1.1.1/pyke-1.1.1.zip"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-pykerberos/package.py b/var/spack/repos/builtin/packages/py-pykerberos/package.py
index 729216c85c..a3be907887 100644
--- a/var/spack/repos/builtin/packages/py-pykerberos/package.py
+++ b/var/spack/repos/builtin/packages/py-pykerberos/package.py
@@ -16,6 +16,8 @@ class PyPykerberos(PythonPackage):
version("1.2.4", sha256="9d701ebd8fc596c99d3155d5ba45813bd5908d26ef83ba0add250edb622abed4")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("krb5", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/py-pykokkos-base/package.py b/var/spack/repos/builtin/packages/py-pykokkos-base/package.py
index 381a1fd111..2428793eb4 100644
--- a/var/spack/repos/builtin/packages/py-pykokkos-base/package.py
+++ b/var/spack/repos/builtin/packages/py-pykokkos-base/package.py
@@ -21,6 +21,8 @@ class PyPykokkosBase(CMakePackage, PythonExtension):
version("0.0.4", commit="2efe1220d0128d3f2d371c9ed5234c4978d73a77", submodules=False)
version("0.0.3", commit="4fe4421ac624ba2efe1eee265153e690622a18a5", submodules=False)
+ depends_on("cxx", type="build") # generated
+
variant(
"layouts", default=True, description="Build Kokkos View/DynRankView with layout variants"
)
@@ -44,13 +46,9 @@ class PyPykokkosBase(CMakePackage, PythonExtension):
depends_on("python@3:", type=("build", "run"))
def cmake_args(self):
- spec = self.spec
-
args = [
self.define("ENABLE_INTERNAL_KOKKOS", False),
self.define("ENABLE_INTERNAL_PYBIND11", False),
- self.define("PYTHON_EXECUTABLE", spec["python"].command.path),
- self.define("Python3_EXECUTABLE", spec["python"].command.path),
self.define_from_variant("ENABLE_VIEW_RANKS", "view_ranks"),
]
diff --git a/var/spack/repos/builtin/packages/py-pylev/package.py b/var/spack/repos/builtin/packages/py-pylev/package.py
index 5eebc9e109..cc005f40ce 100644
--- a/var/spack/repos/builtin/packages/py-pylev/package.py
+++ b/var/spack/repos/builtin/packages/py-pylev/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyPylev(PythonPackage):
"""A pure Python Levenshtein implementation that's not freaking GPL'd."""
- homepage = "http://github.com/toastdriven/pylev"
+ homepage = "https://github.com/toastdriven/pylev"
pypi = "pylev/pylev-1.4.0.tar.gz"
license("BSD-3-Clause")
diff --git a/var/spack/repos/builtin/packages/py-pylikwid/package.py b/var/spack/repos/builtin/packages/py-pylikwid/package.py
index b76aa855fa..58cb767071 100644
--- a/var/spack/repos/builtin/packages/py-pylikwid/package.py
+++ b/var/spack/repos/builtin/packages/py-pylikwid/package.py
@@ -22,6 +22,8 @@ class PyPylikwid(PythonPackage):
version("0.4.0", sha256="f7894a6d7ebcea7da133ef639599a314f850f55cd6c5ffdd630bb879bd2aa0b8")
+ depends_on("c", type="build") # generated
+
variant("cuda", default=False, description="with Nvidia GPU profiling support")
# pip silently replaces distutils with setuptools
diff --git a/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py b/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py
new file mode 100644
index 0000000000..1af4498832
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pylint-gitlab/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyPylintGitlab(PythonPackage):
+ """This project provides pylint formatters for a nice integration with GitLab CI."""
+
+ homepage = "https://gitlab.com/smueller18/pylint-gitlab"
+ pypi = "pylint-gitlab/pylint-gitlab-2.0.0.tar.gz"
+
+ git = "https://gitlab.com/smueller18/pylint-gitlab.git"
+
+ # Unfortunately, this just installs from git.
+ # The setup needs the file "Pipfile.lock" which is only
+ # available in git, not in a tarball.
+ version("2.0.0", tag="2.0.0")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pylint", type=("build", "run"))
+ depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-anybadge", type=("build", "run"))
+ depends_on("py-importlib-metadata", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
+ depends_on("py-wrapt", type=("build", "run"))
+ depends_on("py-tomli", type=("build", "run"))
+ depends_on("py-dill", type=("build", "run"))
+
+ def setup_build_environment(self, env):
+ env.set("CI_COMMIT_TAG", self.spec.version.string)
diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py
index 57d1e14587..d8584445ed 100644
--- a/var/spack/repos/builtin/packages/py-pylint/package.py
+++ b/var/spack/repos/builtin/packages/py-pylint/package.py
@@ -33,10 +33,7 @@ class PyPylint(PythonPackage):
version("2.13.5", sha256="dab221658368c7a05242e673c275c488670144123f4bd262b2777249c1c0de9b")
version("2.11.1", sha256="2c9843fff1a88ca0ad98a256806c82c5a8f86086e7ccbdb93297d86c3f90c436")
version("2.8.2", sha256="586d8fa9b1891f4b725f587ef267abe2a1bad89d6b184520c7f07a253dd6e217")
- version("2.3.1", sha256="723e3db49555abaf9bf79dc474c6b9e2935ad82230b10c1138a71ea41ac0fff1")
- version("2.3.0", sha256="ee80c7af4f127b2a480d83010c9f0e97beb8eaa652b78c2837d3ed30b12e1182")
- depends_on("python@3.4:", when="@2:2.7", type=("build", "run"))
depends_on("python@3.6:", when="@2.8.2:", type=("build", "run"))
depends_on("python@3.6.2:", when="@2.13.5:", type=("build", "run"))
depends_on("python@3.7.2:", when="@2.14.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pylith/package.py b/var/spack/repos/builtin/packages/py-pylith/package.py
new file mode 100644
index 0000000000..401a5e5eff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pylith/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPylith(AutotoolsPackage, PythonExtension):
+ """PyLith does dynamic and quasi-static simulations of crustal deformation.
+ PyLith is an open-source finite-element code for dynamic and quasi-static
+ simulations of crustal deformation, primarily earthquakes and volcanoes."""
+
+ homepage = "https://geodynamics.org/resources/pylith"
+ url = "https://github.com/geodynamics/pylith/releases/download/v4.0.0/pylith-4.0.0.tar.gz"
+
+ license("MIT", checked_by="downloadico")
+
+ version("4.0.0", sha256="31e0131683292ee2e62f2c818cc2777f026104ae73d7a8368975dd6560292689")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("py-setuptools")
+ depends_on("py-cig-pythia")
+ depends_on("spatialdata")
+ depends_on("netcdf-c")
+ depends_on("petsc@=3.20.2+hdf5")
+ depends_on("py-h5py")
diff --git a/var/spack/repos/builtin/packages/py-pymatgen/package.py b/var/spack/repos/builtin/packages/py-pymatgen/package.py
index 083724ddb3..1af08be7c9 100644
--- a/var/spack/repos/builtin/packages/py-pymatgen/package.py
+++ b/var/spack/repos/builtin/packages/py-pymatgen/package.py
@@ -52,3 +52,8 @@ class PyPymatgen(PythonPackage):
depends_on("py-uncertainties@3.1.4:", when="@2021.1.1:", type=("build", "run"))
depends_on("py-pybtex", when="@2022.1.9:", type=("build", "run"))
depends_on("py-tqdm", when="@2022.1.9:", type=("build", "run"))
+
+ # <<< manual changes
+ # https://github.com/materialsproject/pymatgen/commit/29b5b909e109cb04d4b118d0de5b3929819b9378
+ depends_on("py-cython@:2", when="@:2023.7.16", type="build")
+ # manual changes >>>
diff --git a/var/spack/repos/builtin/packages/py-pymatreader/package.py b/var/spack/repos/builtin/packages/py-pymatreader/package.py
index dd89849644..19973fb46b 100644
--- a/var/spack/repos/builtin/packages/py-pymatreader/package.py
+++ b/var/spack/repos/builtin/packages/py-pymatreader/package.py
@@ -14,6 +14,7 @@ class PyPymatreader(PythonPackage):
license("BSD-2-Clause")
+ version("0.0.32", sha256="34a5b4812635c98d3e5776fc21cd7f85b045784539363674d178dfb1158a617f")
version("0.0.30", sha256="c8187b6ee77a9b1ec0d8ccae9b22c9031d01104a412737cc4a71e6d993a1a12b")
depends_on("py-setuptools", type="build")
@@ -22,4 +23,6 @@ class PyPymatreader(PythonPackage):
depends_on("py-scipy@:1.6,1.7.1:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-xmltodict", type=("build", "run"))
- depends_on("py-future", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-future", type=("build", "run"), when="@:0.0.30")
diff --git a/var/spack/repos/builtin/packages/py-pymol/package.py b/var/spack/repos/builtin/packages/py-pymol/package.py
index fe9bcce3a8..1889677b20 100644
--- a/var/spack/repos/builtin/packages/py-pymol/package.py
+++ b/var/spack/repos/builtin/packages/py-pymol/package.py
@@ -19,6 +19,9 @@ class PyPymol(PythonPackage):
version("2.4.0", sha256="5ede4ce2e8f53713c5ee64f5905b2d29bf01e4391da7e536ce8909d6b9116581")
version("2.3.0", sha256="62aa21fafd1db805c876f89466e47513809f8198395e1f00a5f5cc40d6f40ed0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python+tkinter@2.7:", type=("build", "link", "run"), when="@2.3.0:2.4.0")
depends_on("python+tkinter@3.6:", type=("build", "link", "run"), when="@2.5.0:")
# in newer pip versions --install-option does not exist
@@ -58,7 +61,7 @@ class PyPymol(PythonPackage):
script = join_path(python_platlib, "pymol", "__init__.py")
shebang = "#!/bin/sh\n"
- fdata = 'exec {0} {1} "$@"'.format(self.spec["python"].command, script)
+ fdata = f'exec {python.path} {script} "$@"'
with open(fname, "w") as new:
new.write(shebang + fdata)
set_executable(fname)
diff --git a/var/spack/repos/builtin/packages/py-pymongo/package.py b/var/spack/repos/builtin/packages/py-pymongo/package.py
index 7c7469e628..137cd96850 100644
--- a/var/spack/repos/builtin/packages/py-pymongo/package.py
+++ b/var/spack/repos/builtin/packages/py-pymongo/package.py
@@ -11,20 +11,31 @@ class PyPymongo(PythonPackage):
MongoDB database from Python. The bson package is an implementation
of the BSON format for Python. The pymongo package is a native
Python driver for MongoDB. The gridfs package is a gridfs
- implementation on top of pymongo.
-
- PyMongo supports MongoDB 2.6, 3.0, 3.2, 3.4, 3.6, 4.0 and 4.2."""
+ implementation on top of pymongo."""
pypi = "pymongo/pymongo-3.9.0.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("4.10.1", sha256="a9de02be53b6bb98efe0b9eda84ffa1ec027fcb23a2de62c4f941d9a2f2f3330")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-5629
+ version("4.2.0", sha256="72f338f6aabd37d343bd9d1fdd3de921104d395766bcc5cdc4039e4c2dd97766")
+ version(
+ "3.12.1", sha256="704879b6a54c45ad76cea7c6789c1ae7185050acea7afd15b58318fa1932ed45"
+ )
+ version("3.9.0", sha256="4249c6ba45587b959292a727532826c5032d59171f923f7f823788f413c2a5a3")
+ version("3.6.0", sha256="c6de26d1e171cdc449745b82f1addbc873d105b8e7335097da991c0fc664a4a8")
+ version("3.3.0", sha256="3d45302fc2622fabf34356ba274c69df41285bac71bbd229f1587283b851b91e")
- version("4.2.0", sha256="72f338f6aabd37d343bd9d1fdd3de921104d395766bcc5cdc4039e4c2dd97766")
- version("3.12.1", sha256="704879b6a54c45ad76cea7c6789c1ae7185050acea7afd15b58318fa1932ed45")
- version("3.9.0", sha256="4249c6ba45587b959292a727532826c5032d59171f923f7f823788f413c2a5a3")
- version("3.6.0", sha256="c6de26d1e171cdc449745b82f1addbc873d105b8e7335097da991c0fc664a4a8")
- version("3.3.0", sha256="3d45302fc2622fabf34356ba274c69df41285bac71bbd229f1587283b851b91e")
+ depends_on("c", type="build") # generated
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
- depends_on("python@3.7:", when="@4.2.0:", type=("build", "run"))
+ depends_on("python@3.7:", when="@4.2:", type=("build", "run"))
+ depends_on("python@3.8:", when="@4.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@63:", type="build", when="@4.5:")
+ depends_on("py-setuptools@65:", type="build", when="@4.8:")
+ depends_on("py-hatchling@1.24:", type="build", when="@4.8:")
+ depends_on("py-hatch-requirements-txt@0.4.1:", type="build", when="@4.8:")
+ depends_on("py-dnspython@1.16.0:2", type="build", when="@4.3:")
diff --git a/var/spack/repos/builtin/packages/py-pymoo/package.py b/var/spack/repos/builtin/packages/py-pymoo/package.py
index 023f81d859..51bed56742 100644
--- a/var/spack/repos/builtin/packages/py-pymoo/package.py
+++ b/var/spack/repos/builtin/packages/py-pymoo/package.py
@@ -22,6 +22,8 @@ class PyPymoo(PythonPackage):
version("0.5.0", sha256="2fbca1716f6b45e430197ce4ce2210070fd3b6b9ec6b17bb25d98486115272c2")
version("0.4.2", sha256="6ec382a7d29c8775088eec7f245a30fd384b42c40f230018dea0e3bcd9aabdf1")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.4:", type=("build", "run"))
depends_on("py-autograd", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pymorph/package.py b/var/spack/repos/builtin/packages/py-pymorph/package.py
index 3931bab495..4284aec21d 100644
--- a/var/spack/repos/builtin/packages/py-pymorph/package.py
+++ b/var/spack/repos/builtin/packages/py-pymorph/package.py
@@ -11,7 +11,7 @@ class PyPymorph(PythonPackage):
morphology functions.
"""
- homepage = "http://luispedro.org/software/pymorph/"
+ homepage = "https://luispedro.org/software/pymorph/"
pypi = "pymorph/pymorph-0.96.tar.gz"
version("0.96", sha256="5dd648e4cb4c3495ee6031bc8020ed8216f3d6cb8c0dcd0427b215b75d7d29ad")
diff --git a/var/spack/repos/builtin/packages/py-pymummer/package.py b/var/spack/repos/builtin/packages/py-pymummer/package.py
new file mode 100644
index 0000000000..66b27ce1a9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pymummer/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPymummer(PythonPackage):
+ """Python3 module for running MUMmer and reading the output"""
+
+ homepage = "https://github.com/sanger-pathogens/pymummer"
+
+ pypi = "pymummer/pymummer-0.11.0.tar.gz"
+
+ version("0.11.0", sha256="199b8391348ff83760e9f63fdcee6208f8aa29da6506ee1654f1933e60665259")
+ version("0.10.3", sha256="986555d36828bd90bf0e63d9d472e5b20c191f0e51123b5252fa924761149fc2")
+ version("0.10.2", sha256="80ea1af917d8a683460a9dbe75a54a099515d0a8f0a74dd7eeced41adbb9f460")
+ version("0.10.1", sha256="04a06d2faecf5b972b3a60e1493520e384cb10dd5c00bf7d643a1d059c4e8f87")
+ version("0.10.0", sha256="bec0649cf0e4016949f49b46b789697f8cff043d5dfc6b6bb54ddff2cba83679")
+ version("0.9.0", sha256="9c1fd30623202889a45d2d5124c24d0e4fcf1746aed82d22b292b6d6c5568e26")
+ version("0.8.1", sha256="8e6d9759bedb216453eb7e94a2ea3b79a39b96fde716a35b4aadcf523ca1f313")
+ version("0.8.0", sha256="dbb2817cb63873a408ba3e818d17d068633d401b21db9881503358a23792b4f3")
+ version("0.7.1", sha256="7aab311c60fcb9fc5a2bce658e949d80f4801e73107eb2e835f46caed02cfedf")
+ version("0.7.0", sha256="2d02cb60e6aa8e1fcfc5e07c36ce3bcf52cf447e6315cd6371a549adc20529d9")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("mummer", type=("build", "run"))
+ depends_on("py-pyfastaq@3.10.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pynacl/package.py b/var/spack/repos/builtin/packages/py-pynacl/package.py
index 8c564b421c..2e2a0c632a 100644
--- a/var/spack/repos/builtin/packages/py-pynacl/package.py
+++ b/var/spack/repos/builtin/packages/py-pynacl/package.py
@@ -16,6 +16,8 @@ class PyPynacl(PythonPackage):
version("1.5.0", sha256="8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba")
version("1.4.0", sha256="54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@1.5.0:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pynio/package.py b/var/spack/repos/builtin/packages/py-pynio/package.py
index 59ea20288f..a7e4b5f1a3 100644
--- a/var/spack/repos/builtin/packages/py-pynio/package.py
+++ b/var/spack/repos/builtin/packages/py-pynio/package.py
@@ -18,6 +18,9 @@ class PyPynio(PythonPackage):
version("1.5.4", sha256="e5bb57d902740d25e4781a9f89e888149f55f2ffe60f9a5ad71069f017c89e1a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("hdf5", default=False, description="Include HDF5 support")
variant("gdal", default=False, description="Include GDAL support")
diff --git a/var/spack/repos/builtin/packages/py-pynn/package.py b/var/spack/repos/builtin/packages/py-pynn/package.py
index 8b7e40fed7..67949ae15e 100644
--- a/var/spack/repos/builtin/packages/py-pynn/package.py
+++ b/var/spack/repos/builtin/packages/py-pynn/package.py
@@ -24,6 +24,8 @@ class PyPynn(PythonPackage):
version("0.8.1", sha256="ce94246284588414d1570c1d5d697805f781384e771816727c830b01ee30fe39")
version("0.7.5", sha256="15f75f422f3b71c6129ecef23f29d8baeb3ed6502e7a321b8a2596c78ef7e03c")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.6:2.8,3.3:", type=("build", "run"))
depends_on("python@3.7:", type=("build", "run"), when="@0.10.0:")
diff --git a/var/spack/repos/builtin/packages/py-pynpm/package.py b/var/spack/repos/builtin/packages/py-pynpm/package.py
new file mode 100644
index 0000000000..f14fabb4ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pynpm/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPynpm(PythonPackage):
+ """Python interface to your NPM and package.json."""
+
+ homepage = "https://pynpm.readthedocs.io/en/latest/"
+ pypi = "pynpm/pynpm-0.2.0.tar.gz"
+ git = "https://github.com/inveniosoftware/pynpm"
+ maintainers("jeremyfix")
+
+ license("BSD-3-Clause")
+
+ version("0.2.0", sha256="212a1e5f86fe8b790945dd856682c6dcd8eddc6f8803a51e7046fe427d7f801b")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-babel@2.9:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pynucleus/package.py b/var/spack/repos/builtin/packages/py-pynucleus/package.py
index 9664e7ce9f..a70fb4dfd6 100644
--- a/var/spack/repos/builtin/packages/py-pynucleus/package.py
+++ b/var/spack/repos/builtin/packages/py-pynucleus/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -59,11 +60,9 @@ class PyPynucleus(PythonPackage):
@run_before("install")
def install_python(self):
- prefix = self.prefix
for subpackage in ["packageTools", "base", "metisCy", "fem", "multilevelSolver", "nl"]:
with working_dir(subpackage):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
@run_after("install")
def install_additional_files(self):
diff --git a/var/spack/repos/builtin/packages/py-pynvtx/package.py b/var/spack/repos/builtin/packages/py-pynvtx/package.py
index 86065133e7..15c25c30ad 100644
--- a/var/spack/repos/builtin/packages/py-pynvtx/package.py
+++ b/var/spack/repos/builtin/packages/py-pynvtx/package.py
@@ -22,5 +22,7 @@ class PyPynvtx(PythonPackage):
version("0.3.3", sha256="8877b2d90bbf9d279d517a80a8f35a0a0a8179ebabf0729e806798a84bee6c72")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@40.8:", type="build")
depends_on("py-pybind11", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyodbc/package.py b/var/spack/repos/builtin/packages/py-pyodbc/package.py
index 05cc05cf01..ad2e8d9c5b 100644
--- a/var/spack/repos/builtin/packages/py-pyodbc/package.py
+++ b/var/spack/repos/builtin/packages/py-pyodbc/package.py
@@ -18,6 +18,8 @@ class PyPyodbc(PythonPackage):
version("4.0.26", sha256="e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
depends_on("unixodbc")
diff --git a/var/spack/repos/builtin/packages/py-pyogrio/package.py b/var/spack/repos/builtin/packages/py-pyogrio/package.py
new file mode 100644
index 0000000000..2c0a7c8766
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyogrio/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyogrio(PythonPackage):
+ """Vectorized spatial vector file format I/O using GDAL/OGR"""
+
+ homepage = "https://pypi.org/project/pyogrio"
+ pypi = "pyogrio/pyogrio-0.9.0.tar.gz"
+ git = "https://github.com/geopandas/pyogrio.git"
+
+ maintainers("climbfuji")
+
+ license("MIT", checked_by="climbfuji")
+
+ version("0.9.0", sha256="6a6fa2e8cf95b3d4a7c0fac48bce6e5037579e28d3eb33b53349d6e11f15e5a8")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("gdal@2.4:", type=("build", "link", "run"))
+ depends_on("py-cython@0.29:", type="build")
+ depends_on("py-versioneer@0.28 +toml", type="build")
+ # this is an implicit dependency already listed in py-versioneer, not needed
+ # depends_on("py-tomli", when="^python@:3.10", type="build")
+
+ depends_on("py-certifi", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyomo/package.py b/var/spack/repos/builtin/packages/py-pyomo/package.py
index 25a9de064c..212a50eb0b 100644
--- a/var/spack/repos/builtin/packages/py-pyomo/package.py
+++ b/var/spack/repos/builtin/packages/py-pyomo/package.py
@@ -15,9 +15,11 @@ class PyPyomo(PythonPackage):
pypi = "Pyomo/Pyomo-5.6.6.tar.gz"
git = "https://github.com/Pyomo/pyomo.git"
- # Maintainer accurate as of 11/21/2023
+ # Maintainer accurate as of 2024-02-21
maintainers("mrmundt")
+ version("6.7.2", sha256="53bef766854f7607ca1fcfe3f218594ab382f137a275cee3d925d2b2f96876bf")
+ version("6.7.1", sha256="735b66c45937f1caa43f073d8218a4918b6de658914a699397d38d5b8c219a40")
version("6.7.0", sha256="a245ec609ef2fd907269f0b8e0923f74d5bf868b2ec0e62bf2a30b3f253bd17b")
version("6.6.2", sha256="c8ad55213ff8b1a2c4e469110db8079722d5a6f364c6c46a42e2f750fc9e4d26")
version("6.6.1", sha256="3fb0aba7b0f4120e6ce0f242502c0e61478d61e326bc90b7dc392bbefd114b34")
@@ -44,6 +46,9 @@ class PyPyomo(PythonPackage):
version("5.6.7", sha256="fc97cc9d5a55c5185358ba65c1f9530c9af17e67a9aae7b36c3414f159030ae0")
version("5.6.6", sha256="813e14a604b9d3ac63bdd0880c07f5f4e1b8f0a8a10345f1b42bee762219c001")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cython", default=False, description="Enable cythonization of Pyomo.")
variant("tests", default=False, description="Install testing dependencies.", when="@6.1:")
variant(
@@ -51,6 +56,10 @@ class PyPyomo(PythonPackage):
)
variant("optional", default=False, description="Install optional dependencies.", when="@6.1:")
+ ############################
+ # UPDATE THESE AS REQUIRED
+ ############################
+
# python_requires
depends_on("python@3.8:3.12", when="@6.7:", type=("build", "run"))
depends_on("python@3.7:3.11", when="@6.4:6.6", type=("build", "run"))
@@ -80,25 +89,32 @@ class PyPyomo(PythonPackage):
depends_on("py-pybind11", when="@6.1:+tests", type=("run"))
# when docs is requested
- depends_on("py-sphinx@4:", when="@6.1:+docs", type=("run"))
+ depends_on("py-sphinx@3:", when="@:6.6+docs", type=("run"))
+ depends_on("py-sphinx@5:", when="@6.7:+docs", type=("run"))
depends_on("py-sphinx-copybutton", when="@6.1:+docs", type=("run"))
- depends_on("py-sphinx-rtd-theme@0.5:", when="@6.1:+docs", type=("run"))
+ depends_on("py-sphinx-rtd-theme@0.6:", when="@6.1:+docs", type=("run"))
depends_on("py-sphinxcontrib-jsmath", when="@6.1:+docs", type=("run"))
depends_on("py-sphinxcontrib-napoleon", when="@6.1:+docs", type=("run"))
- depends_on("py-numpy", when="@6.1:+docs", type=("run"))
+ depends_on("py-sphinx-toolbox@2.16:", when="@6.7.1:+docs", type=("run"))
+ depends_on("py-sphinx-jinja2-compat@0.1.1:", when="@6.7.1:+docs", type=("run"))
+ depends_on("py-enum-tools", when="@6.7.1:+docs", type=("run"))
+ # Pyomo does not support NumPy2 (May 9, 2024)
+ depends_on("py-numpy@1", when="@6.1:+docs", type=("run"))
depends_on("py-scipy", when="@6.4.2:+docs", type=("run"))
# when optional is requested
depends_on("py-dill", when="@6.1:+optional", type=("run"))
depends_on("py-ipython", when="@6.1:+optional", type=("run"))
- depends_on("py-matplotlib@3.6.2:", when="@6.1:+optional", type=("run"))
+ depends_on("py-matplotlib@:3.6.0,3.6.2:", when="@6.1:+optional", type=("run"))
depends_on("py-networkx", when="@6.1:+optional", type=("run"))
- depends_on("py-numpy", when="@6.1:+optional", type=("run"))
+ # Pyomo does not support NumPy2 (May 9, 2024)
+ depends_on("py-numpy@1", when="@6.1:+optional", type=("run"))
depends_on("py-openpyxl", when="@6.1:+optional", type=("run"))
depends_on("py-pint", when="@6.1:+optional", type=("run"))
depends_on("py-plotly", when="@6.6:+optional", type=("run"))
depends_on("py-python-louvain", when="@6.1:+optional", type=("run"))
depends_on("py-pyyaml", when="@6.1:+optional", type=("run"))
+ depends_on("py-qtconsole", when="@6.7.1:+optional", type=("run"))
depends_on("py-scipy", when="@6.1:+optional", type=("run"))
depends_on("py-sympy", when="@6.1:+optional", type=("run"))
depends_on("py-xlrd", when="@6.1:+optional", type=("run"))
diff --git a/var/spack/repos/builtin/packages/py-pyopencl/package.py b/var/spack/repos/builtin/packages/py-pyopencl/package.py
index 48cf56912e..5e2c6ed30f 100644
--- a/var/spack/repos/builtin/packages/py-pyopencl/package.py
+++ b/var/spack/repos/builtin/packages/py-pyopencl/package.py
@@ -19,6 +19,8 @@ class PyPyopencl(PythonPackage):
version("2020.2.2", sha256="31fcc79fb6862998e98d91a624c0bd4f0ab4c5d418d199912d4d312c64e437ec")
+ depends_on("cxx", type="build") # generated
+
depends_on("ocl-icd", type=("build", "link", "run"))
depends_on("opencl", type=("build", "link", "run"))
depends_on("python@3.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyopengl/package.py b/var/spack/repos/builtin/packages/py-pyopengl/package.py
new file mode 100644
index 0000000000..0f973c7b8b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyopengl/package.py
@@ -0,0 +1,68 @@
+# Copyright 2013-2024 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 sys
+
+from spack.package import *
+
+
+class PyPyopengl(PythonPackage):
+ """PyOpenGL is the most common cross platform Python binding to OpenGL and related APIs."""
+
+ homepage = "https://pyopengl.sourceforge.net"
+ pypi = "pyopengl/PyOpenGL-3.1.6.tar.gz"
+
+ version("3.1.6", sha256="8ea6c8773927eda7405bffc6f5bb93be81569a7b05c8cac50cd94e969dce5e27")
+
+ variant("glu", default=True, description="Enable OpenGL Utility (GLU) binding.")
+ variant("glut", default=True, description="Enable OpenGL Utility Toolkit (GLUT) binding.")
+
+ conflicts("osmesa", when="^glx")
+
+ depends_on("py-setuptools", type="build")
+ # actually installing PyOpenGL itself just requires python
+ # but tests (and possibly dependent packages) need OpenGL libraries
+ depends_on("gl", type="link")
+ depends_on("glu", when="+glu", type="link")
+ depends_on("freeglut+shared", when="+glut", type="link")
+
+ def setup_run_environment(self, env):
+ # PyOpenGL uses ctypes.cdll (or similar), which searches LD_LIBRARY_PATH
+ lib_dirs = self.spec["gl"].libs.directories
+ if "^glx" in self.spec:
+ lib_dirs.extend(self.spec["glx"].libs.directories)
+ env.set("PYOPENGL_PLATFORM", "glx")
+ if "^osmesa" in self.spec:
+ lib_dirs.extend(self.spec["osmesa"].libs.directories)
+ env.set("PYOPENGL_PLATFORM", "osmesa")
+ if "+glu" in self.spec:
+ lib_dirs.extend(self.spec["glu"].libs.directories)
+ if "+glut" in self.spec:
+ lib_dirs.extend(self.spec["freeglut"].libs.directories)
+ libs = ":".join(lib_dirs)
+ if sys.platform == "darwin":
+ env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs)
+ else:
+ env.prepend_path("LD_LIBRARY_PATH", libs)
+
+ def setup_dependent_build_environment_(self, env, dependent_spec):
+ self.setup_run_environment(env)
+
+ # only test import available module
+ @property
+ def import_modules(self):
+ modules = ["OpenGL", "OpenGL.GL"]
+ if "gl=glx" in self.spec:
+ modules.append("OpenGL.GLX")
+ if "gl=osmesa" in self.spec:
+ modules.append("OpenGL.osmesa")
+ if "+glu" in self.spec:
+ modules.append("OpenGL.GLU")
+ if "+glut" in self.spec:
+ modules.append("OpenGL.GLUT")
+ if "^python+tkinter" in self.spec:
+ modules.append("OpenGL.Tk")
+
+ return modules
diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py
index 49d9d4fba5..804b25c862 100644
--- a/var/spack/repos/builtin/packages/py-pypar/package.py
+++ b/var/spack/repos/builtin/packages/py-pypar/package.py
@@ -18,6 +18,8 @@ class PyPypar(PythonPackage):
version("2.1.5_108", sha256="6076c47d32d48424a07c7b7b29ac16e12cc4b2d28b681b895f94fa76cd82fa12")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyparsing/package.py b/var/spack/repos/builtin/packages/py-pyparsing/package.py
index 4210a17aee..46b980da8a 100644
--- a/var/spack/repos/builtin/packages/py-pyparsing/package.py
+++ b/var/spack/repos/builtin/packages/py-pyparsing/package.py
@@ -14,6 +14,9 @@ class PyPyparsing(PythonPackage):
license("MIT")
+ version("3.1.2", sha256="a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad")
+ version("3.1.1", sha256="ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db")
+ version("3.1.0", sha256="edb662d6fe322d6e990b1594b5feaeadf806803359e3d4d42f11e295e588f0ea")
version("3.0.9", sha256="2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb")
version("3.0.6", sha256="d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81")
version("2.4.7", sha256="c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1")
diff --git a/var/spack/repos/builtin/packages/py-pypdf/package.py b/var/spack/repos/builtin/packages/py-pypdf/package.py
new file mode 100644
index 0000000000..7a9896d17d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pypdf/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPypdf(PythonPackage):
+ """A pure-python PDF library capable of splitting, merging, cropping, and
+ transforming PDF files"""
+
+ homepage = "https://github.com/py-pdf/pypdf"
+ pypi = "pypdf/pypdf-4.3.1.tar.gz"
+
+ license("BSD-3-Clause", checked_by="qwertos")
+
+ version("4.3.1", sha256="b2f37fe9a3030aa97ca86067a56ba3f9d3565f9a791b305c7355d8392c30d91b")
+
+ depends_on("py-flit-core@3.9:3", type="build")
+ depends_on("py-typing-extensions@4:", when="^python@:3.10", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyppeteer/package.py b/var/spack/repos/builtin/packages/py-pyppeteer/package.py
new file mode 100644
index 0000000000..64a999c3e4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyppeteer/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyppeteer(PythonPackage):
+ """Headless chrome/chromium automation library
+ (unofficial port of puppeteer)."""
+
+ homepage = "https://github.com/pyppeteer/pyppeteer"
+ pypi = "pyppeteer/pyppeteer-2.0.0.tar.gz"
+
+ license("MIT")
+
+ version("2.0.0", sha256="4af63473ff36a746a53347b2336a49efda669bcd781e400bc1799b81838358d9")
+
+ depends_on("py-poetry-core", type="build")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-appdirs@1.4.3:1", type=("build", "run"))
+ depends_on("py-importlib-metadata@1.4:", type=("build", "run"))
+ depends_on("py-pyee@11", type=("build", "run"))
+ depends_on("py-tqdm@4.42.1:4", type=("build", "run"))
+ depends_on("py-urllib3@1.25.8:1", type=("build", "run"))
+ depends_on("py-websockets@10", type=("build", "run"))
+ depends_on("py-certifi@2023:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyprecice/package.py b/var/spack/repos/builtin/packages/py-pyprecice/package.py
index 19b81e0628..7df2a049f3 100644
--- a/var/spack/repos/builtin/packages/py-pyprecice/package.py
+++ b/var/spack/repos/builtin/packages/py-pyprecice/package.py
@@ -14,15 +14,20 @@ class PyPyprecice(PythonPackage):
homepage = "https://precice.org"
git = "https://github.com/precice/python-bindings.git"
- url = "https://github.com/precice/python-bindings/archive/v2.4.0.0.tar.gz"
+ url = "https://github.com/precice/python-bindings/archive/v3.1.1.tar.gz"
maintainers("ajaust", "BenjaminRodenberg", "IshaanDesai")
license("LGPL-3.0")
# Always prefer final version of release candidate
version("develop", branch="develop")
+ version("3.1.1", sha256="112fccfbb223eb8df341221531f89943a14f75ee1e44dfb3276ebb38f21047de")
+ version("3.1.0", sha256="8d9bd9e28859001ab503a1e2f90e54b3c000079f04c14dc7c0c04c61c5666641")
+ version("3.0.0.0", sha256="7e2c4b106a231b0df2a430d86d4a7b295f85adbe3478c425f863d1a4bebee9f7")
+ version("2.5.0.4", sha256="7f9449573eb52ce48ca3f0ab35529ea0064942487842515ae0a2c9299aa0f0db")
+ version("2.5.0.3", sha256="b983229b9fdf6bd4605ae8710985eb681025f6fb28ad8d7736cdf92593eef6df")
version("2.5.0.2", sha256="6d7b78da830db6c5133b44617196ee90be8c7d6c8e14c8994a4800b3d4856416")
- version("2.5.0.1", sha256="e2602f828d4f907ea93e34f7d4adb8db086044a75a446592a4099423d56ed62c")
+ version("2.5.0.1", sha256="d7c666e6ebff9e007c3703d8e3c3fcdf0f45289e36c2c17223b3aedc3259ab6c")
version("2.5.0.0", sha256="9f55a22594bb602cde8a5987217728569f16d9576ea53ed00497e9046a2e1794")
version("2.4.0.0", sha256="e80d16417b8ce1fdac80c988cb18ae1e16f785c5eb1035934d8b37ac18945242")
version("2.3.0.1", sha256="ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789")
@@ -37,8 +42,12 @@ class PyPyprecice(PythonPackage):
version("2.0.0.2", sha256="5f055d809d65ec2e81f4d001812a250f50418de59990b47d6bcb12b88da5f5d7")
version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e")
+ depends_on("cxx", type="build") # generated
+
for ver in [
"develop",
+ "3.1", # only consider major.minor from 3.1.0. See https://github.com/precice/python-bindings/pull/199
+ "3.0.0",
"2.5.0",
"2.4.0",
"2.3.0",
diff --git a/var/spack/repos/builtin/packages/py-pyproj/package.py b/var/spack/repos/builtin/packages/py-pyproj/package.py
index 60839d2733..7064777249 100644
--- a/var/spack/repos/builtin/packages/py-pyproj/package.py
+++ b/var/spack/repos/builtin/packages/py-pyproj/package.py
@@ -14,10 +14,10 @@ class PyPyproj(PythonPackage):
pypi = "pyproj/pyproj-2.2.0.tar.gz"
git = "https://github.com/pyproj4/pyproj.git"
- maintainers("citibeth", "adamjstewart")
-
license("MIT")
+ maintainers("citibeth", "adamjstewart")
+ version("3.7.0", sha256="bf658f4aaf815d9d03c8121650b6f0b8067265c36e31bc6660b98ef144d81813")
version("3.6.1", sha256="44aa7c704c2b7d8fb3d483bbf75af6cb2350d30a63b144279a09b75fead501bf")
version("3.6.0", sha256="a5b111865b3f0f8b77b3983f2fbe4dd6248fc09d3730295949977c8dcd988062")
version("3.5.0", sha256="9859d1591c1863414d875ae0759e72c2cffc01ab989dc64137fbac572cc81bf6")
@@ -36,16 +36,23 @@ class PyPyproj(PythonPackage):
version("2.1.3", sha256="99c52788b01a7bb9a88024bf4d40965c0a66a93d654600b5deacf644775f424d")
# In pyproject.toml
- depends_on("py-setuptools@61:", when="@3.4:", type="build")
- depends_on("py-setuptools", type="build")
- depends_on("py-cython@3:", when="@3.6.1:", type="build")
- depends_on("py-cython@0.28.4:2", when="@2:3.6.0", type="build")
- depends_on("python@3.9:", when="@3.6:", type=("build", "link", "run"))
- depends_on("python@3.8:", when="@3.3:", type=("build", "link", "run"))
- depends_on("py-certifi", when="@3:", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:", when="@3.4:")
+ depends_on("py-setuptools")
+ depends_on("py-cython@3:", when="@3.6.1:")
+ depends_on("py-cython@0.28.4:2", when="@2:3.6.0")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.10:", when="@3.7:")
+ depends_on("python@3.9:", when="@3.6:")
+ depends_on("python@3.8:", when="@3.3:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-certifi", when="@3:")
# In setup.py (PROJ_MIN_VERSION)
# https://pyproj4.github.io/pyproj/stable/installation.html#installing-from-source
+ depends_on("proj@9.2:", when="@3.7:")
depends_on("proj@9:", when="@3.5:")
depends_on("proj@8.2:", when="@3.4")
depends_on("proj@8.0:9.1", when="@3.3")
@@ -54,7 +61,6 @@ class PyPyproj(PythonPackage):
depends_on("proj@6.2:7", when="@2.4:2.6")
depends_on("proj@6.1:7", when="@2.2:2.3")
depends_on("proj@6.0:7", when="@2.0:2.1")
- depends_on("proj@:5.2", when="@:1.9")
depends_on("proj")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/py-pyqt4/package.py b/var/spack/repos/builtin/packages/py-pyqt4/package.py
index 31e481d305..1c28fd8b24 100644
--- a/var/spack/repos/builtin/packages/py-pyqt4/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt4/package.py
@@ -19,6 +19,8 @@ class PyPyqt4(SIPPackage):
version("4.12.3", sha256="a00f5abef240a7b5852b7924fa5fdf5174569525dc076cd368a566619e56d472")
+ depends_on("cxx", type="build") # generated
+
# API files can be installed regardless if QScintilla is installed or not
variant("qsci_api", default=False, description="Install PyQt API file for QScintilla")
@@ -48,7 +50,7 @@ class PyPyqt4(SIPPackage):
"--destdir",
python_platlib,
"--pyuic4-interpreter",
- self.spec["python"].command.path,
+ python.path,
"--sipdir",
self.prefix.share.sip.PyQt4,
"--stubsdir",
diff --git a/var/spack/repos/builtin/packages/py-pyqt5-sip/package.py b/var/spack/repos/builtin/packages/py-pyqt5-sip/package.py
index e93543146b..c6612970b3 100644
--- a/var/spack/repos/builtin/packages/py-pyqt5-sip/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt5-sip/package.py
@@ -14,7 +14,17 @@ class PyPyqt5Sip(PythonPackage):
license("GPL-2.0-only")
+ version("12.13.0", sha256="7f321daf84b9c9dbca61b80e1ef37bdaffc0e93312edae2cd7da25b953971d91")
version("12.12.1", sha256="8fdc6e0148abd12d977a1d3828e7b79aae958e83c6cb5adae614916d888a6b10")
version("12.9.0", sha256="d3e4489d7c2b0ece9d203ae66e573939f7f60d4d29e089c9f11daa17cfeaae32")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@30.3:", type="build")
+
+ patch(
+ "https://src.fedoraproject.org/rpms/python-pyqt5-sip/raw/841f58ce66df4dfcf11713e7adb6bd301403d5a8/f/afc99fa84d0d.patch",
+ sha256="82a326749b145b30eda3f0040cd7099c4c06a57a5e9626687b0a983de1ebfc3e",
+ when="@12.12: %gcc@14:",
+ )
diff --git a/var/spack/repos/builtin/packages/py-pyqt5/package.py b/var/spack/repos/builtin/packages/py-pyqt5/package.py
index 1f74582a44..4f1c904396 100644
--- a/var/spack/repos/builtin/packages/py-pyqt5/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt5/package.py
@@ -19,6 +19,8 @@ class PyPyqt5(SIPPackage):
version("5.15.9", sha256="dc41e8401a90dc3e2b692b411bd5492ab559ae27a27424eed4bd3915564ec4c0")
+ depends_on("cxx", type="build") # generated
+
# pyproject.toml
depends_on("py-sip@6.6.2:6", type="build")
depends_on("py-pyqt-builder@1.14.1:1", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyqt6-sip/package.py b/var/spack/repos/builtin/packages/py-pyqt6-sip/package.py
index 36a42e1317..5b853be73f 100644
--- a/var/spack/repos/builtin/packages/py-pyqt6-sip/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt6-sip/package.py
@@ -14,6 +14,10 @@ class PyPyqt6Sip(PythonPackage):
license("GPL-2.0-or-later")
+ version("13.6.0", sha256="2486e1588071943d4f6657ba09096dc9fffd2322ad2c30041e78ea3f037b5778")
version("13.5.1", sha256="d1e9141752966669576d04b37ba0b122abbc41cc9c35493751028d7d91c4dd49")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@30.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyqt6/package.py b/var/spack/repos/builtin/packages/py-pyqt6/package.py
index 6e6de0ead7..ac47010487 100644
--- a/var/spack/repos/builtin/packages/py-pyqt6/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt6/package.py
@@ -15,15 +15,22 @@ class PyPyqt6(SIPPackage):
license("GPL-3.0-or-later")
+ version("6.7.0", sha256="3d31b2c59dc378ee26e16586d9469842483588142fc377280aad22aaf2fa6235")
+ version("6.6.1", sha256="9f158aa29d205142c56f0f35d07784b8df0be28378d20a97bcda8bd64ffd0379")
version("6.5.2", sha256="1487ee7350f9ffb66d60ab4176519252c2b371762cbe8f8340fd951f63801280")
version("6.5.1", sha256="e166a0568c27bcc8db00271a5043936226690b6a4a74ce0a5caeb408040a97c3")
+ depends_on("cxx", type="build") # generated
+
# pyproject.toml
- depends_on("py-sip@6.5:6", type="build")
+ depends_on("python@3.8:", type=("build", "run"), when="@6.7:")
+ depends_on("py-sip@6.8:6", type="build", when="@6.7:")
+ depends_on("py-sip@6.5:6", type="build", when="@:6.6")
depends_on("py-pyqt-builder@1.15:1", type="build")
# PKG-INFO
- depends_on("py-pyqt6-sip@13.4:13", type=("build", "run"))
+ depends_on("py-pyqt6-sip@13.6:13", type=("build", "run"), when="@5.3:")
+ depends_on("py-pyqt6-sip@13.4:13", type=("build", "run"), when="@:5.2")
# README
depends_on("qt-base@6")
diff --git a/var/spack/repos/builtin/packages/py-pyqtgraph/package.py b/var/spack/repos/builtin/packages/py-pyqtgraph/package.py
new file mode 100644
index 0000000000..a457935443
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyqtgraph/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyqtgraph(PythonPackage):
+ """PyQtGraph is a pure-python graphics and GUI library intended for use in mathematics,
+ scientific, and engineering applications"""
+
+ homepage = "https://www.pyqtgraph.org/"
+ pypi = "pyqtgraph/pyqtgraph-0.13.3.tar.gz"
+
+ license("MIT", checked_by="A-N-Other")
+
+ version("0.13.3", sha256="58108d8411c7054e0841d8b791ee85e101fc296b9b359c0e01dde38a98ff2ace")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@1.20:", type=("build", "run"))
+ # This dependency listed in README.md ...
+ depends_on("py-pyqt6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyrevolve/package.py b/var/spack/repos/builtin/packages/py-pyrevolve/package.py
index 12c053a157..c72a3f2264 100644
--- a/var/spack/repos/builtin/packages/py-pyrevolve/package.py
+++ b/var/spack/repos/builtin/packages/py-pyrevolve/package.py
@@ -19,6 +19,8 @@ class PyPyrevolve(PythonPackage):
version("2.2", sha256="b49aea5cd6c520ac5fcd1d25fa23fe2c5502741d2965f3eee10be067e7b0efb4")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-contexttimer", type=("build", "run"))
depends_on("py-cython@0.17:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyrfr/package.py b/var/spack/repos/builtin/packages/py-pyrfr/package.py
index 7d1c1e992a..c4840f8409 100644
--- a/var/spack/repos/builtin/packages/py-pyrfr/package.py
+++ b/var/spack/repos/builtin/packages/py-pyrfr/package.py
@@ -17,6 +17,8 @@ class PyPyrfr(PythonPackage):
version("0.8.2", sha256="c18a6e8f0bd971c1ea449b6dd0997a6ec1fe9a031883400bdcc95fa5ddd65975")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("swig")
diff --git a/var/spack/repos/builtin/packages/py-pyro-ppl/package.py b/var/spack/repos/builtin/packages/py-pyro-ppl/package.py
index 9ba34d0eca..68441e21e9 100644
--- a/var/spack/repos/builtin/packages/py-pyro-ppl/package.py
+++ b/var/spack/repos/builtin/packages/py-pyro-ppl/package.py
@@ -20,6 +20,8 @@ class PyPyroPpl(PythonPackage):
version("1.8.1", sha256="d7c049eb2e7485a612b4dd99c24c309cc860c7cbc6b1973387034f5436d1c8d6")
version("1.8.0", sha256="68e4ea30f219227dd88e55de2550d3f8c20a20adbdb67ad1e13b50868bb2ac0c")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.7:", when="@1.8.1:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyrocko/package.py b/var/spack/repos/builtin/packages/py-pyrocko/package.py
new file mode 100644
index 0000000000..4b9ad7292e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyrocko/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyrocko(PythonPackage):
+ """Pyrocko is an open source seismology toolbox and library, written in the
+ Python programming language"""
+
+ homepage = "https://pyrocko.org/"
+ pypi = "pyrocko/pyrocko-2023.6.29.tar.gz"
+
+ maintainers("snehring")
+
+ license("GPL-3.0", checked_by="snehring")
+
+ version("2024.1.10", sha256="4fb2c72d0b036ce3c70bfd066e1ce4946eb93d9190d202e9fc689c1f29e4845f")
+ version("2023.6.29", sha256="779a234592bfcfa1c96939fee53d0dfc5cadf111432a2679f08166cfd8bcae41")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("python@3.7:", type=("build", "run"))
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@1.16:", type=("build", "run"))
+ depends_on("py-scipy@1:", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyrodigal/package.py b/var/spack/repos/builtin/packages/py-pyrodigal/package.py
new file mode 100644
index 0000000000..6bd206f58b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyrodigal/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyrodigal(PythonPackage):
+ """Cython bindings and Python interface to Prodigal, an ORF finder for
+ genomes and metagenomes"""
+
+ homepage = "https://github.com/althonos/pyrodigal"
+ pypi = "pyrodigal/pyrodigal-3.5.2.tar.gz"
+
+ license("GPL-3.0", checked_by="luke-dt")
+
+ version("3.5.2", sha256="2a40eb6113e720ada51c326958b295944cdc33ecee9f25d5bad4e9a8e6e6f7f5")
+
+ depends_on("c", type="build")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools@46.4:", type="build")
+ depends_on("py-archspec@0.2.0:", type="build")
+ depends_on("py-cython@3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyrsistent/package.py b/var/spack/repos/builtin/packages/py-pyrsistent/package.py
index 9ef98a0f4d..f305f5f5da 100644
--- a/var/spack/repos/builtin/packages/py-pyrsistent/package.py
+++ b/var/spack/repos/builtin/packages/py-pyrsistent/package.py
@@ -21,8 +21,13 @@ class PyPyrsistent(PythonPackage):
version("0.18.0", sha256="773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b")
version("0.16.0", sha256="28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3")
version("0.15.7", sha256="cdc7b5e3ed77bed61270a47d35434a30617b9becdf2478af76ad2c6ade307280")
+ version("0.14.0", sha256="297714c609506494650eea704d70cbe1b156259a578a98b97864ab9a8cbad39f")
+
+ depends_on("c", type="build") # generated
depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools@42:", when="@0.18.0:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-six", when="@:0.17", type=("build", "run"))
+
+ conflicts("python@3.10:", when="@0.14")
diff --git a/var/spack/repos/builtin/packages/py-pysam/package.py b/var/spack/repos/builtin/packages/py-pysam/package.py
index 42993ca040..7e83b7f0bf 100644
--- a/var/spack/repos/builtin/packages/py-pysam/package.py
+++ b/var/spack/repos/builtin/packages/py-pysam/package.py
@@ -24,6 +24,8 @@ class PyPysam(PythonPackage):
version("0.14.1", sha256="2e86f5228429d08975c8adb9030296699012a8deba8ba26cbfc09b374f792c97")
version("0.7.7", sha256="c9f3018482eec99ee199dda3fdef2aa7424dde6574672a4c0d209a10985755cc")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@59.0:", when="@0.21:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.30:2", when="@0.21:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyscf/package.py b/var/spack/repos/builtin/packages/py-pyscf/package.py
index 790027cf4d..c94a68252a 100644
--- a/var/spack/repos/builtin/packages/py-pyscf/package.py
+++ b/var/spack/repos/builtin/packages/py-pyscf/package.py
@@ -12,12 +12,20 @@ class PyPyscf(PythonPackage):
by Python."""
homepage = "https://pyscf.org"
- pypi = "pyscf/pyscf-2.2.0.tar.gz"
+ pypi = "pyscf/pyscf-2.5.0.tar.gz"
maintainers("naromero77")
license("Apache-2.0")
+ version("2.7.0", sha256="ca8efc2f28d72c3130f26a967e7fa8d0bbc4a6b47d16a7c4c732ec85a31b7eec")
+ version("2.6.2", sha256="744c89a8e4d38c4b5562f75fa68f9d079faeb23602d255fba0eb6d1bac97bca2")
+ version("2.6.1", sha256="faeaeeb0c07fec5018937655511709a9c2445e3d7c421c0fa1ae5d889e4ab455")
+ version("2.6.0", sha256="08ff920fedd4b257273d235fb4492535147c1e3154de5ab02b5446de93e200d8")
+ version("2.5.0", sha256="9596603c914fb3fba853607e96366fa541012faffd59a4ea052f0122dcea5343")
+ version("2.4.0", sha256="af0597c481851b5448e7055c3160aef28dc12a1e0b35dda8279555c0780c0d45")
+ version("2.3.0", sha256="71781de62c25924fd4e93ffeb0451ec0d0b3646fe426c75023f4f519f0f35d85")
+ version("2.2.1", sha256="4ff6851351caadc5dfa543b6b2c5fbd926ded87e3cc39faa0054e1e5090ed69a")
version("2.2.0", sha256="8f65042cf7e86aa5088756988eb90418befcd18f07a6b8c597229a5f2ba4f644")
version("2.1.1", sha256="608442171f5db106b02a95c878c65798fbbd87dc0ce50551a2e081e7d206adb0")
version("2.1.0", sha256="45feecc9c9a0ce18dee73c5b178fb0faa3f0c0d3dd5f98b48dc2370c9e13d05b")
@@ -25,6 +33,8 @@ class PyPyscf(PythonPackage):
version("1.7.5", sha256="52856b39f0ada2f6340757caa65dc5c1d9a3cdfceea2a6615ad8af92664a6c69")
version("1.7.3", sha256="62a26146a222140395b276ea33182f87809a21989ddcf78e2dcb8e35ebc57af2")
+ depends_on("c", type="build") # generated
+
# dependencies
depends_on("cmake@3.10:", type="build", when="@2.1:")
depends_on("cmake@2.8:", type="build")
@@ -33,9 +43,12 @@ class PyPyscf(PythonPackage):
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.8.0:", type=("build", "run"))
depends_on("py-numpy@1.13.0:", type=("build", "run"), when="@2:")
+ depends_on("py-numpy@1", type=("build", "run"), when="@:2.6.0")
conflicts("^py-numpy@1.16:1.17", when="@2:")
- depends_on("py-scipy@0.12:", type=("build", "run"))
- depends_on("py-scipy@0.19:", type=("build", "run"), when="@2.1:")
+ depends_on("py-scipy@0.12:1.10", type=("build", "run"), when="@:2.0")
+ depends_on("py-scipy@0.19:1.10", type=("build", "run"), when="@2.1:2.2")
+ # https://github.com/pyscf/pyscf/issues/1783
+ depends_on("py-scipy@0.19:", type=("build", "run"), when="@2.3:")
conflicts("^py-scipy@1.5.0:1.5.1", when="@2:")
depends_on("py-h5py@2.3.0:", type=("build", "run"))
depends_on("py-h5py@2.7.0:", type=("build", "run"), when="@2:")
diff --git a/var/spack/repos/builtin/packages/py-pyscipopt/package.py b/var/spack/repos/builtin/packages/py-pyscipopt/package.py
index a7a23dd147..ac333be5ad 100644
--- a/var/spack/repos/builtin/packages/py-pyscipopt/package.py
+++ b/var/spack/repos/builtin/packages/py-pyscipopt/package.py
@@ -16,6 +16,8 @@ class PyPyscipopt(PythonPackage):
version("3.4.0", sha256="8da4db57b21010e0d5a863292dd455c88dd71ecec12a8439171c213a8092f88a")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
depends_on("py-wheel", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyseer/package.py b/var/spack/repos/builtin/packages/py-pyseer/package.py
new file mode 100644
index 0000000000..53c7c7fc0c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyseer/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyseer(PythonPackage):
+ """Sequence Elements Enrichment Analysis (SEER), python implementation"""
+
+ homepage = "https://pyseer.readthedocs.io/en/master/"
+
+ # Not availible on PyPI
+ url = "https://github.com/mgalardini/pyseer/releases/download/1.3.11/pyseer-1.3.11.tar.gz"
+
+ version("1.3.11", sha256="384313a3a14b92f873eaad53f77a319d90b584b9253785a7ca1dfc7d9220c91e")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("py-statsmodels@0.10.0:", type=("build", "run"))
+ depends_on("py-scikit-learn", type=("build", "run"))
+ depends_on("py-pysam", type=("build", "run"))
+ depends_on("py-dendropy", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-pybedtools", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-glmnet-python@1.0.2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pysftp/package.py b/var/spack/repos/builtin/packages/py-pysftp/package.py
new file mode 100644
index 0000000000..8fe4107743
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pysftp/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPysftp(PythonPackage):
+ """A simple interface to SFTP."""
+
+ pypi = "pysftp/pysftp-0.2.9.tar.gz"
+
+ version("0.2.9", sha256="fbf55a802e74d663673400acd92d5373c1c7ee94d765b428d9f977567ac4854a")
+
+ depends_on("py-paramiko@1.17:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyshacl/package.py b/var/spack/repos/builtin/packages/py-pyshacl/package.py
index e76d43fd3a..10fd8f2cd2 100644
--- a/var/spack/repos/builtin/packages/py-pyshacl/package.py
+++ b/var/spack/repos/builtin/packages/py-pyshacl/package.py
@@ -13,18 +13,25 @@ class PyPyshacl(PythonPackage):
license("Apache-2.0")
+ version("0.25.0", sha256="91e87ed04ccb29aa47abfcf8a3e172d35a8831fce23a011cfbf35534ce4c940b")
version("0.20.0", sha256="47f014c52cc69167b902c89b3940dd400f7f5d2169a62f97f837f3419b4a737d")
version("0.17.2", sha256="46f31c7a7f7298aa5b483d92dbc850ff79a144d26f1f41e83267ed84b4d6ae23")
depends_on("py-poetry-core@1.1:1", type="build")
+ depends_on("py-poetry-core@1.8.1:1", when="@0.25.0:", type="build")
depends_on("python@3.7:3", type=("build", "run"))
+ depends_on("python@3.8.1:3", when="@0.25.0:", type=("build", "run"))
depends_on("py-rdflib@6.0.0:6", when="@0.17.2", type=("build", "run"))
- depends_on("py-rdflib@6.2.0:6", when="@0.20.0:", type=("build", "run"))
+ depends_on("py-rdflib@6.2.0:6", when="@0.20.0", type=("build", "run"))
+ depends_on("py-rdflib@6.3.2:7", when="@0.25.0:", type=("build", "run"))
depends_on("py-html5lib@1.1:1", when="@0.20.0:", type=("build", "run"))
+ depends_on("py-importlib-metadata@7:", when="@0.25.0: ^python@:3.11", type=("build", "run"))
depends_on("py-owlrl@5.2.3:6", when="@0.17.2", type=("build", "run"))
depends_on("py-owlrl@6.0.2:6", when="@0.20.0:", type=("build", "run"))
depends_on("py-packaging@21.3:", when="@0.20.0:", type=("build", "run"))
- depends_on("py-prettytable@2.2.1:2", type=("build", "run"))
+ depends_on("py-prettytable@2.2.1:2", when="@:0.20", type=("build", "run"))
+ depends_on("py-prettytable@3.5.0:", when="@0.25.0: ^python@:3.11", type=("build", "run"))
+ depends_on("py-prettytable@3.7.0:", when="@0.25.0: ^python@3.12:", type=("build", "run"))
def patch(self):
if self.spec.satisfies("@0.17.2"):
diff --git a/var/spack/repos/builtin/packages/py-pyshp/package.py b/var/spack/repos/builtin/packages/py-pyshp/package.py
index 02591e1251..24fa0e83fa 100644
--- a/var/spack/repos/builtin/packages/py-pyshp/package.py
+++ b/var/spack/repos/builtin/packages/py-pyshp/package.py
@@ -15,6 +15,7 @@ class PyPyshp(PythonPackage):
license("MIT")
+ version("2.3.1", sha256="4caec82fd8dd096feba8217858068bacb2a3b5950f43c048c6dc32a3489d5af1")
version("2.1.0", sha256="e65c7f24d372b97d0920b864bbeb78322bb37b83f2606e2a2212631d5d51e5c0")
version("1.2.12", sha256="8dcd65e0aa2aa2951527ddb7339ea6e69023543d8a20a73fc51e2829b9ed6179")
diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py
index 16e95b4f71..bb33a8d495 100644
--- a/var/spack/repos/builtin/packages/py-pyside/package.py
+++ b/var/spack/repos/builtin/packages/py-pyside/package.py
@@ -28,6 +28,8 @@ class PyPyside(PythonPackage):
version("1.2.2", sha256="53129fd85e133ef630144c0598d25c451eab72019cdcb1012f2aec773a3f25be")
+ depends_on("cxx", type="build") # generated
+
# to prevent error: 'PyTypeObject' {aka 'struct _typeobject'} has no member
# named 'tp_print'
depends_on("python@:3.8", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pyside2/package.py b/var/spack/repos/builtin/packages/py-pyside2/package.py
index a1bbd619ae..2443694ada 100644
--- a/var/spack/repos/builtin/packages/py-pyside2/package.py
+++ b/var/spack/repos/builtin/packages/py-pyside2/package.py
@@ -11,6 +11,7 @@ class PyPyside2(PythonPackage):
homepage = "https://www.pyside.org/"
git = "https://code.qt.io/pyside/pyside-setup.git"
+ url = "https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.14-src/pyside-setup-opensource-src-5.15.14.tar.xz"
# More recent versions of PySide2 (for Qt5) have been taken under
# the offical Qt umbrella. For more information, see:
@@ -19,6 +20,7 @@ class PyPyside2(PythonPackage):
license("LGPL-3.0-or-later")
version("develop", tag="dev")
+ version("5.15.14", sha256="32651194f6a6b7bce42f04e68b1401ad2087e4789a4c8f3fb8649e86189c6372")
version(
"5.15.2.1",
tag="v5.15.2.1",
@@ -44,19 +46,28 @@ class PyPyside2(PythonPackage):
"5.12.5", tag="v5.12.5", commit="af0953e0d261ab9b1fc498d63e8d790a329dd285", submodules=True
)
+ depends_on("cxx", type="build") # generated
+
variant(
"doc",
default=False,
description="Enables the generation of html and man page documentation",
)
- depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:", type=("build", "run"))
- depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.8", when="@:5.14", type=("build", "run"))
+ # see https://wiki.qt.io/Qt_for_Python#Python_compatibility_matrix
+ depends_on("python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.8", when="@:5.15.0", type=("build", "run"))
+ depends_on(
+ "python@2.7.0:2.7,3.5.0:3.5,3.6.1:3.9", when="@5.15.1:5.15.7", type=("build", "run")
+ )
+ depends_on("python@2.7:3.10", when="@5.15.8", type=("build", "run"))
+ depends_on("python@3.5:3.10", when="@5.15.9:5.15.10", type=("build", "run"))
+ depends_on("python@3.6:3.11", when="@5.15.11:5.15.15", type=("build", "run"))
depends_on("cmake@3.1:", type="build")
# libclang versioning from sources/shiboken2/doc/gettingstarted.rst
depends_on("llvm@6", type="build", when="@5.12:5.13")
- depends_on("llvm@10:", type="build", when="@5.15:")
+ # clang >= 16 doesn't work, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270715#c6
+ depends_on("llvm@10:15 +clang", type="build", when="@5.15")
depends_on("py-setuptools", type="build")
depends_on("py-packaging", type="build")
depends_on("py-wheel", type="build")
@@ -96,9 +107,14 @@ class PyPyside2(PythonPackage):
# "--verbose-build",
"--qmake={0}".format(spec["qt"].prefix.bin.qmake),
]
- if spec.satisfies("^python@3.10:"):
+ # older versions allow some limited api for @3.10:
+ # (prevented currently by dependency matrix above!)
+ if spec.satisfies("@:5.15.2 ^python@3.10:"):
args.append("--limited-api=yes")
+ # fix rpaths
+ args.append("--rpath={0}".format(":".join(self.rpath)))
+
if self.run_tests:
args.append("--build-tests")
return args
diff --git a/var/spack/repos/builtin/packages/py-pysimdjson/package.py b/var/spack/repos/builtin/packages/py-pysimdjson/package.py
index 48685e6dc9..885b96721c 100644
--- a/var/spack/repos/builtin/packages/py-pysimdjson/package.py
+++ b/var/spack/repos/builtin/packages/py-pysimdjson/package.py
@@ -11,7 +11,7 @@ class PyPysimdjson(PythonPackage):
JSON parser. If SIMD instructions are unavailable a fallback parser
is used, making pysimdjson safe to use anywhere."""
- homepage = "http://github.com/TkTech/pysimdjson"
+ homepage = "https://github.com/TkTech/pysimdjson"
pypi = "pysimdjson/pysimdjson-4.0.3.tar.gz"
maintainers("haralmha")
@@ -21,6 +21,8 @@ class PyPysimdjson(PythonPackage):
version("4.0.3", sha256="61900992d7f992b073a8c5f93cafa4af9bfd3209624baa775699b0fdd6f67517")
version("3.2.0", sha256="643baa0941752367761dbc091bf552bf4ca196cf67bf41ef89c90c2db2ec1477")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"), when="@4.0.3:")
depends_on("python@3.5:", type=("build", "run"), when="@:4.0.2")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyspark/package.py b/var/spack/repos/builtin/packages/py-pyspark/package.py
index 087378d753..b7097230fa 100644
--- a/var/spack/repos/builtin/packages/py-pyspark/package.py
+++ b/var/spack/repos/builtin/packages/py-pyspark/package.py
@@ -12,6 +12,11 @@ class PyPyspark(PythonPackage):
homepage = "https://spark.apache.org"
pypi = "pyspark/pyspark-3.0.1.tar.gz"
+ maintainers("teaguesterling")
+
+ version("3.5.1", sha256="dd6569e547365eadc4f887bf57f153e4d582a68c4b490de475d55b9981664910")
+ version("3.4.3", sha256="8d7025fa274830cb6c3bd592228be3d9345cb3b8b1e324018c2aa6e75f48a208")
+ version("3.3.4", sha256="1f866be47130a522355240949ed50d9812a8f327bd7619f043ffe07fbcf7f7b6")
version("3.3.1", sha256="e99fa7de92be406884bfd831c32b9306a3a99de44cfc39a2eefb6ed07445d5fa")
version("3.3.0", sha256="7ebe8e9505647b4d124d5a82fca60dfd3891021cf8ad6c5ec88777eeece92cf7")
version("3.2.1", sha256="0b81359262ec6e9ac78c353344e7de026027d140c6def949ff0d80ab70f89a54")
@@ -19,11 +24,40 @@ class PyPyspark(PythonPackage):
version("3.1.2", sha256="5e25ebb18756e9715f4d26848cc7e558035025da74b4fc325a0ebc05ff538e65")
version("3.0.1", sha256="38b485d3634a86c9a2923c39c8f08f003fdd0e0a3d7f07114b2fb4392ce60479")
+ variant("java", default=True, description="Include Java requirements via py-py4j")
+ variant("pandas", default=True, description="Include Pandas support")
+ variant("connect", default=True, description="Include SparkConnect support", when="@3.4:")
+
+ # Noted on https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies
+ with default_args(type="run"):
+ depends_on("py-pyarrow@4:", when="+pandas@3.5:")
+ depends_on("py-pyarrow@1:", when="+pandas@:3.4")
+ depends_on("py-pandas@1.0.5:", when="+pandas")
+ depends_on("py-numpy@1.15:", when="+pandas")
+
+ with when("@3.5:"):
+ depends_on("py-grpcio@1.56:", when="+connect")
+ depends_on("py-grpcio-status@1.56:", when="+connect")
+ depends_on("py-googleapis-common-protos@1.56.4:", when="+connect")
+
+ with when("@3.4:"):
+ depends_on("py-grpcio@1.48.1:", when="+connect")
+ depends_on("py-grpcio-status@1.48.1:", when="+connect")
+ depends_on("py-googleapis-common-protos@1.56.4:", when="+connect")
+
depends_on("py-setuptools", type="build")
- depends_on("py-py4j@0.10.9.5", when="@3.3.0:", type=("build", "run"))
- depends_on("py-py4j@0.10.9.3", when="@3.2.1", type=("build", "run"))
- depends_on("py-py4j@0.10.9", when="@3.0.1:3.1.3", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("py-py4j~java", when="~java")
+ for py4j_version, pyspark_version in [
+ ("0.10.9.7", "3.4:"),
+ ("0.10.9.5", "3.3:"),
+ ("0.10.9.3", "3.2.1"),
+ ("0.10.9", "3.0.1:3.1.3"),
+ ]:
+ depends_on(f"py-py4j@{py4j_version}:", when=f"@{pyspark_version}")
def setup_run_environment(self, env):
- env.set("PYSPARK_PYTHON", self.spec["python"].command.path)
- env.set("PYSPARK_DRIVER_PYTHON", self.spec["python"].command.path)
+ env.set("PYSPARK_PYTHON", python.path)
+ env.set("PYSPARK_DRIVER_PYTHON", python.path)
+ if self.spec.satisfies("+pandas ^java@11:"):
+ env.append_flags("SPARK_SUBMIT_OPTS", "-Dio.netty.tryReflectionSetAccessible=true")
diff --git a/var/spack/repos/builtin/packages/py-pyspnego/package.py b/var/spack/repos/builtin/packages/py-pyspnego/package.py
new file mode 100644
index 0000000000..071bd61a90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyspnego/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPyspnego(PythonPackage):
+ """Python SPNEGO authentication library."""
+
+ homepage = "https://github.com/jborean93/pyspnego"
+ pypi = "pyspnego/pyspnego-0.11.1.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.11.1", sha256="e92ed8b0a62765b9d6abbb86a48cf871228ddb97678598dc01c9c39a626823f6")
+
+ variant("kerberos", default=False, description="Enable Kerberos authentication on Linux")
+
+ depends_on("py-setuptools@61:", type="build")
+ depends_on("py-cryptography", type=("build", "run"))
+ depends_on("py-sspilib", type=("build", "run"), when="platform=windows")
+
+ with when("+kerberos"):
+ depends_on("py-gssapi@1.6.0:", type=("build", "run"))
+ depends_on("py-krb5@0.3.0:", type=("build", "run"))
+ conflicts("+kerberos", when="platform=windows", msg="kerberos support unavailable on windows")
diff --git a/var/spack/repos/builtin/packages/py-pyspoa/package.py b/var/spack/repos/builtin/packages/py-pyspoa/package.py
index 8a8d218743..dc309fd3b9 100644
--- a/var/spack/repos/builtin/packages/py-pyspoa/package.py
+++ b/var/spack/repos/builtin/packages/py-pyspoa/package.py
@@ -17,6 +17,9 @@ class PyPyspoa(PythonPackage):
version("0.0.8", sha256="8299d18066b498a6ef294c5a33a99266ded06eeb022f67488d2caecba974b0a4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
- depends_on("cmake@3.18.4", type="build")
+ depends_on("cmake@3:", type="build")
depends_on("py-pybind11@2.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pysqlite3/package.py b/var/spack/repos/builtin/packages/py-pysqlite3/package.py
index c7d57dd2e3..efab982077 100644
--- a/var/spack/repos/builtin/packages/py-pysqlite3/package.py
+++ b/var/spack/repos/builtin/packages/py-pysqlite3/package.py
@@ -17,6 +17,8 @@ class PyPysqlite3(PythonPackage):
version("0.4.7", sha256="0352864898aa406beb762f4a620594c950a9a4430caab679bce574065698c8ac")
version("0.4.6", sha256="7ec4d4c477fa96609c1517afbc33bf02747588e528e79c695de95907cea7bf30")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("sqlite", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pystac-client/package.py b/var/spack/repos/builtin/packages/py-pystac-client/package.py
index 7d657fd221..7d3eb546c6 100644
--- a/var/spack/repos/builtin/packages/py-pystac-client/package.py
+++ b/var/spack/repos/builtin/packages/py-pystac-client/package.py
@@ -10,13 +10,30 @@ class PyPystacClient(PythonPackage):
"""Python library for working with Spatiotemporal Asset Catalog (STAC)."""
homepage = "https://github.com/stac-utils/pystac-client.git"
- pypi = "pystac-client/pystac-client-0.5.1.tar.gz"
+ pypi = "pystac-client/pystac_client-0.8.5.tar.gz"
license("Apache-2.0")
- version("0.5.1", sha256="f585bd9bcd52ee399c8a292dbb7e0405c0da359a73bc07c1ef82a65c17124d94")
+ version("0.8.5", sha256="7fba8d4f3c641ff7e840084fc3a53c96443a227f8a5889ae500fc38183ccd994")
+ version(
+ "0.5.1",
+ sha256="f585bd9bcd52ee399c8a292dbb7e0405c0da359a73bc07c1ef82a65c17124d94",
+ url="https://files.pythonhosted.org/packages/source/p/pystac-client/pystac-client-0.5.1.tar.gz",
+ deprecated=True,
+ )
- depends_on("py-setuptools", type="build")
- depends_on("py-requests@2.27.1:", type=("build", "run"))
- depends_on("py-pystac@1.4:", type=("build", "run"))
- depends_on("py-python-dateutil@2.7:", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:", when="@0.8:")
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@0.8:")
+ # setup.py imports 'imp', removed in Python 3.12
+ depends_on("python@:3.11", when="@:0.6")
+
+ depends_on("py-requests@2.28.2:", when="@0.8:")
+ depends_on("py-requests@2.27.1:")
+ depends_on("py-pystac@1.10:+validation", when="@0.8:")
+ depends_on("py-pystac@1.4:")
+ depends_on("py-python-dateutil@2.8.2:", when="@0.8:")
+ depends_on("py-python-dateutil@2.7:")
diff --git a/var/spack/repos/builtin/packages/py-pystac/package.py b/var/spack/repos/builtin/packages/py-pystac/package.py
index 6ddba4bca1..24994341ca 100644
--- a/var/spack/repos/builtin/packages/py-pystac/package.py
+++ b/var/spack/repos/builtin/packages/py-pystac/package.py
@@ -14,6 +14,7 @@ class PyPystac(PythonPackage):
license("Apache-2.0")
+ version("1.11.0", sha256="acb1e04be398a0cda2d8870ab5e90457783a8014a206590233171d8b2ae0d9e7")
version("1.4.0", sha256="6ec43e1c6bec50fbfbdede49c3ccb83ecd112072a938001b5c9c581fc2945e83")
version("1.3.0", sha256="b0244641ef2a29a7b7929266b0d1eda2b0a0ef826dadb1aed93404a14e6e313b")
version("1.2.0", sha256="8a60be2a30e1e28f8617a88f9f8fddc00c519be494a02ec111dc8fba62bf26e7")
@@ -21,7 +22,14 @@ class PyPystac(PythonPackage):
version("1.0.1", sha256="3927f2104cd2077638e046b9c258d5e6b442bfabf2d179cbefbf10f509efae85")
version("0.5.4", sha256="9fc3359364685adf54e3bc78c87550a8bc8b0a927405419bd8e4bbd42a8efc79")
- depends_on("python@3.7:", when="@1:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-python-dateutil@2.7:", type=("build", "run"))
- depends_on("py-typing-extensions@3.7:", when="@1: ^python@:3.7", type=("build", "run"))
+ variant("validation", default=False, description="Install an additional jsonschema dependency")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:", when="@1.11:")
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@1.11:")
+ depends_on("py-python-dateutil@2.7:")
+
+ depends_on("py-jsonschema@4.18:4", when="+validation")
diff --git a/var/spack/repos/builtin/packages/py-pytest-aiohttp/package.py b/var/spack/repos/builtin/packages/py-pytest-aiohttp/package.py
new file mode 100644
index 0000000000..b45485487c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-aiohttp/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytestAiohttp(PythonPackage):
+ """Pytest plugin for aiohttp support."""
+
+ homepage = "https://github.com/aio-libs/pytest-aiohttp"
+ pypi = "pytest-aiohttp/pytest-aiohttp-1.0.5.tar.gz"
+
+ license("Apache-2.0")
+
+ version("1.0.5", sha256="880262bc5951e934463b15e3af8bb298f11f7d4d3ebac970aab425aff10a780a")
+
+ depends_on("py-setuptools@51.0:", type="build")
+ depends_on("py-setuptools-scm@6.2:", type="build")
+ depends_on("py-wheel@0.36:", type="build")
+
+ depends_on("py-pytest@6.1.0:", type=("build", "run"))
+ depends_on("py-aiohttp@3.8.1:", type=("build", "run"))
+ depends_on("py-pytest-asyncio@0.17.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytest-allclose/package.py b/var/spack/repos/builtin/packages/py-pytest-allclose/package.py
new file mode 100644
index 0000000000..9b96c44bc0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-allclose/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytestAllclose(PythonPackage):
+ """Pytest fixture extending Numpy's allclose function."""
+
+ pypi = "pytest-allclose/pytest-allclose-1.0.0.tar.gz"
+
+ maintainers("paugier")
+
+ license("MIT", checked_by="paugier")
+
+ version("1.0.0", sha256="b2f0c521fa652281400d4a105c84454db3c50b993bcfee9861380be69cc6b041")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@:63", type="build")
+
+ depends_on("py-pytest", type="run")
+ depends_on("py-numpy@1.11:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-pytest-asyncio/package.py b/var/spack/repos/builtin/packages/py-pytest-asyncio/package.py
index 2275fdf11f..19857525d8 100644
--- a/var/spack/repos/builtin/packages/py-pytest-asyncio/package.py
+++ b/var/spack/repos/builtin/packages/py-pytest-asyncio/package.py
@@ -15,6 +15,7 @@ class PyPytestAsyncio(PythonPackage):
license("Apache-2.0")
+ version("0.23.5", sha256="3a048872a9c4ba14c3e90cc1aa20cbc2def7d01c7c8db3777ec281ba9c057675")
version("0.18.3", sha256="7659bdb0a9eb9c6e3ef992eef11a2b3e69697800ad02fb06374a210d85b29f91")
version("0.9.0", sha256="fbd92c067c16111174a1286bfb253660f1e564e5146b39eeed1133315cf2c2cf")
@@ -24,6 +25,6 @@ class PyPytestAsyncio(PythonPackage):
depends_on("py-setuptools", type="build", when="@0.9.0:")
depends_on("py-wheel@0.36:", type="build", when="@0.18.3:")
depends_on("py-setuptools-scm@6.2:+toml", type="build", when="@0.18.3:")
- depends_on("py-pytest@6.1.0:", type=("build", "run"), when="@0.18.3:")
- depends_on("py-pytest@3.0.6:", type=("build", "run"), when="@0.9.0:")
- depends_on("py-typing-extensions@3.7.2:", type=("build", "run"), when="@0.18.3:^python@:3.7")
+ depends_on("py-pytest@7:8", type=("build", "run"), when="@0.23:")
+ depends_on("py-pytest@6.1.0:", type=("build", "run"), when="@0.18.3")
+ depends_on("py-pytest@3.0.6:", type=("build", "run"), when="@0.9.0")
diff --git a/var/spack/repos/builtin/packages/py-pytest-cpp/package.py b/var/spack/repos/builtin/packages/py-pytest-cpp/package.py
index a277ffc310..5503cfbbd5 100644
--- a/var/spack/repos/builtin/packages/py-pytest-cpp/package.py
+++ b/var/spack/repos/builtin/packages/py-pytest-cpp/package.py
@@ -18,6 +18,8 @@ class PyPytestCpp(PythonPackage):
version("1.5.0", sha256="efb7eaac30f9f61515be181d04b70d80d60ce8871426f726ef1844e2db4f3353")
version("1.4.0", sha256="aa3a04fe7906e50094d1a9b8d38bc10eb59d0a8330a11a0f7a660405228b48ca")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm", type="build")
depends_on("py-pytest@:5.3,5.4.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytest-mpi/package.py b/var/spack/repos/builtin/packages/py-pytest-mpi/package.py
new file mode 100644
index 0000000000..3efc1c6803
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-mpi/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytestMpi(PythonPackage):
+ """Pytest plugin to collect information from tests."""
+
+ homepage = "https://pytest-mpi.readthedocs.io"
+ pypi = "pytest-mpi/pytest-mpi-0.6.tar.gz"
+
+ license("BSD-3-Clause")
+
+ maintainers("tristan0x")
+
+ version("0.6", sha256="09b3cd3511f8f3cd4d205f54d4a7223724fed0ab68b872ed1123d312152325a9")
+
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-pytest@3.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytest-pylint/package.py b/var/spack/repos/builtin/packages/py-pytest-pylint/package.py
new file mode 100644
index 0000000000..597a26f123
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-pylint/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytestPylint(PythonPackage):
+ """Run pylint with pytest and have configurable rule types (i.e.
+ Convention, Warn, and Error) fail the build. You can also specify a
+ pylintrc file.
+
+ """
+
+ homepage = "https://pypi.org/project/pytest-pylint/"
+ pypi = "pytest-pylint/pytest-pylint-0.21.0.tar.gz"
+ git = "https://github.com/pytest-dev/pytest"
+
+ license("MIT")
+
+ version("0.21.0", sha256="88764b8e1d5cfa18809248e0ccc2fc05035f08c35f0b0222ddcfea1c3c4e553e")
+
+ # python_requires
+ depends_on("python@3.7:", type=("build", "run"))
+
+ # install_requires
+ depends_on("py-setuptools", type=("build"))
+ depends_on("py-pytest@7.0.0:", type=("build", "run"))
+ depends_on("py-pylint@2.15.0:", type=("build", "run"))
+ depends_on("py-tomli@1.1.0:", type=("build", "run"), when="^python@:3.10")
diff --git a/var/spack/repos/builtin/packages/py-pytest-regtest/package.py b/var/spack/repos/builtin/packages/py-pytest-regtest/package.py
new file mode 100644
index 0000000000..c70e415d2d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-regtest/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytestRegtest(PythonPackage):
+ """pytest plugin for snapshot regression testing."""
+
+ homepage = "https://gitlab.com/uweschmitt/pytest-regtest"
+ pypi = "pytest_regtest/pytest_regtest-2.1.1.tar.gz"
+
+ license("MIT")
+
+ version("2.1.1", sha256="bd08a6161832378b59ecd4f5815fbe26af7cd091db4a1e710e30476d5f3b8832")
+
+ depends_on("py-hatchling", type="build")
+ depends_on("py-pytest@7.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytest-timeout/package.py b/var/spack/repos/builtin/packages/py-pytest-timeout/package.py
index 65810daefb..72479d9509 100644
--- a/var/spack/repos/builtin/packages/py-pytest-timeout/package.py
+++ b/var/spack/repos/builtin/packages/py-pytest-timeout/package.py
@@ -16,8 +16,9 @@ class PyPytestTimeout(PythonPackage):
license("MIT")
+ version("2.2.0", sha256="3b0b95dabf3cb50bac9ef5ca912fa0cfc286526af17afc806824df20c2f72c90")
version("1.4.2", sha256="20b3113cf6e4e80ce2d403b6fb56e9e1b871b510259206d40ff8d609f48bda76")
- depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ depends_on("py-pytest@5:", when="@2:", type=("build", "run"))
depends_on("py-pytest@3.6.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytest/package.py b/var/spack/repos/builtin/packages/py-pytest/package.py
index c1cee93543..1e50386ac6 100644
--- a/var/spack/repos/builtin/packages/py-pytest/package.py
+++ b/var/spack/repos/builtin/packages/py-pytest/package.py
@@ -14,7 +14,11 @@ class PyPytest(PythonPackage):
git = "https://github.com/pytest-dev/pytest"
license("MIT")
+ maintainers("adamjstewart")
+ version("8.2.1", sha256="5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd")
+ version("8.0.0", sha256="249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c")
+ version("7.4.4", sha256="2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280")
version("7.3.2", sha256="ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b")
version("7.2.1", sha256="d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42")
version("7.1.3", sha256="4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39")
@@ -37,51 +41,56 @@ class PyPytest(PythonPackage):
version("3.0.7", sha256="b70696ebd1a5e6b627e7e3ac1365a4bc60aaf3495e843c1e70448966c5224cab")
version("3.0.2", sha256="64d8937626dd2a4bc15ef0edd307d26636a72a3f3f9664c424d78e40efb1e339")
- # python_requires
- depends_on("python@3.7:", when="@7.1:", type=("build", "run"))
- # see https://github.com/pytest-dev/pytest/releases/tag/7.3.2
- depends_on("python@:3.11", when="@:7.3.1", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:", when="@8.1:")
+ depends_on("py-setuptools@45:", when="@7:")
+ depends_on("py-setuptools@42:", when="@6.2:")
+ depends_on("py-setuptools@40:", when="@3.9.2:6.1")
+ depends_on("py-setuptools@30.3:", when="@3.9.0:3.9.1")
+ depends_on("py-setuptools")
+ depends_on("py-setuptools-scm@6.2.3:+toml", when="@7:")
+ depends_on("py-setuptools-scm@3.4:+toml", when="@6.2:")
+ depends_on("py-setuptools-scm", when="@3.1:")
- # setup_requires
- depends_on("py-setuptools@45.0:", when="@7:", type=("build", "run"))
- depends_on("py-setuptools@42.0:", when="@6.2:", type=("build", "run"))
- depends_on("py-setuptools@40.0:", when="@3.9.2:6.1", type=("build", "run"))
- depends_on("py-setuptools@30.3:", when="@3.9.0:3.9.1", type=("build", "run"))
- depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-setuptools-scm@6.2.3: +toml", when="@7:", type="build")
- depends_on("py-setuptools-scm@3.4: +toml", when="@6.2:", type="build")
- depends_on("py-setuptools-scm", when="@3.1:", type="build")
+ with default_args(type=("build", "run")):
+ depends_on("python@3.8:", when="@8:")
+ depends_on("python@3.7:", when="@7.1:")
+ # see https://github.com/pytest-dev/pytest/releases/tag/8.2.1
+ depends_on("python@:3.12", when="@:8.2.0")
+ # see https://github.com/pytest-dev/pytest/releases/tag/7.3.2
+ depends_on("python@:3.11", when="@:7.3.1")
- # install_requires
- depends_on("py-iniconfig", when="@6.0:", type=("build", "run"))
- depends_on("py-packaging", when="@4.6:", type=("build", "run"))
- depends_on("py-pluggy@0.12:1", when="@6.2:", type=("build", "run"))
- depends_on("py-pluggy@0.12:0", when="@4.6:6.1", type=("build", "run"))
- depends_on("py-pluggy@0.9.0:0.9,0.11:0", when="@4.5.0:4.5", type=("build", "run"))
- depends_on("py-pluggy@0.11:", when="@4.4.2:4.4", type=("build", "run"))
- depends_on("py-pluggy@0.9:", when="@4.4.0:4.4.1", type=("build", "run"))
- depends_on("py-pluggy@0.7:", when="@3.7:4.3", type=("build", "run"))
- depends_on("py-pluggy@0.5:0.7", when="@3.6.4:3.6", type=("build", "run"))
- depends_on("py-pluggy@0.5:0.6", when="@:3.6.3", type=("build", "run"))
- depends_on("py-colorama", when="platform=windows", type=("build", "run"))
- depends_on("py-exceptiongroup@1:", when="@7: ^python@:3.10", type=("build", "run"))
- depends_on("py-importlib-metadata@0.12:", when="@5.1: ^python@:3.7", type=("build", "run"))
- depends_on("py-importlib-metadata@0.12:", when="@4.6:5.0", type=("build", "run"))
- depends_on("py-tomli@1:", when="@7.1: ^python@:3.10", type=("build", "run"))
- depends_on("py-tomli@1:", when="@7.0", type=("build", "run"))
+ depends_on("py-colorama", when="platform=windows")
+ depends_on("py-exceptiongroup@1:", when="@7:^python@:3.10")
+ depends_on("py-iniconfig", when="@6.0:")
+ depends_on("py-packaging", when="@4.6:")
+ depends_on("py-pluggy@1.5:1", when="@8.2:")
+ depends_on("py-pluggy@1.3:1", when="@8:")
+ depends_on("py-pluggy@0.12:1", when="@6.2:7")
+ depends_on("py-pluggy@0.12:0", when="@4.6:6.1")
+ depends_on("py-pluggy@0.9.0:0.9,0.11:0", when="@4.5.0:4.5")
+ depends_on("py-pluggy@0.11:", when="@4.4.2:4.4")
+ depends_on("py-pluggy@0.9:", when="@4.4.0:4.4.1")
+ depends_on("py-pluggy@0.7:", when="@3.7:4.3")
+ depends_on("py-pluggy@0.5:0.7", when="@3.6.4:3.6")
+ depends_on("py-pluggy@0.5:0.6", when="@:3.6.3")
+ depends_on("py-tomli@1:", when="@7.1: ^python@:3.10")
+ depends_on("py-tomli@1:", when="@7.0")
- # Historic dependencies
- depends_on("py-attrs@19.2.0:", when="@6.2:7.2", type=("build", "run"))
- depends_on("py-attrs@17.4.0:", when="@3.5:6.1", type=("build", "run"))
- depends_on("py-attrs@17.2.0:", when="@3.3:3.4", type=("build", "run"))
- depends_on("py-py@1.8.2:", when="@6:7.1", type=("build", "run"))
- depends_on("py-py@1.5.0:", when="@3.3:5", type=("build", "run"))
- depends_on("py-py@1.4.33:", when="@3.1.2:3.2.3,3.2.5:3.2", type=("build", "run"))
- depends_on("py-py@1.4.33:1.4", when="@3.2.4", type=("build", "run"))
- depends_on("py-py@1.4.29:", when="@:3.1.1", type=("build", "run"))
- depends_on("py-atomicwrites@1.0:", when="@5.3:7.1.2 platform=windows", type=("build", "run"))
- depends_on("py-atomicwrites@1.0:", when="@3.6:5.2", type=("build", "run"))
- depends_on("py-toml", when="@6", type=("build", "run"))
- depends_on("py-six@1.10.0:", when="@3.3:4", type=("build", "run"))
- depends_on("py-more-itertools@4.0.0:", when="@3.5.1:5", type=("build", "run"))
- depends_on("py-wcwidth", when="@4.5:5", type=("build", "run"))
+ # Historic dependencies
+ depends_on("py-importlib-metadata@0.12:", when="@5.1:^python@:3.7")
+ depends_on("py-importlib-metadata@0.12:", when="@4.6:5.0")
+ depends_on("py-attrs@19.2.0:", when="@6.2:7.2")
+ depends_on("py-attrs@17.4.0:", when="@3.5:6.1")
+ depends_on("py-attrs@17.2.0:", when="@3.3:3.4")
+ depends_on("py-py@1.8.2:", when="@6:7.1")
+ depends_on("py-py@1.5.0:", when="@3.3:5")
+ depends_on("py-py@1.4.33:", when="@3.1.2:3.2.3,3.2.5:3.2")
+ depends_on("py-py@1.4.33:1.4", when="@3.2.4")
+ depends_on("py-py@1.4.29:", when="@:3.1.1")
+ depends_on("py-atomicwrites@1.0:", when="@5.3:7.1.2 platform=windows")
+ depends_on("py-atomicwrites@1.0:", when="@3.6:5.2")
+ depends_on("py-toml", when="@6")
+ depends_on("py-six@1.10.0:", when="@3.3:4")
+ depends_on("py-more-itertools@4.0.0:", when="@3.5.1:5")
+ depends_on("py-wcwidth", when="@4.5:5")
diff --git a/var/spack/repos/builtin/packages/py-python-bioformats/package.py b/var/spack/repos/builtin/packages/py-python-bioformats/package.py
index 0139a94ea7..02fa6b7416 100644
--- a/var/spack/repos/builtin/packages/py-python-bioformats/package.py
+++ b/var/spack/repos/builtin/packages/py-python-bioformats/package.py
@@ -17,6 +17,7 @@ class PyPythonBioformats(PythonPackage):
license("GPL-2.0-only")
+ version("4.0.7", sha256="9cdadd06e2453566bfcc512eb9f774654e9fd35ee02a7fb5e8fb097812c5733b")
version("4.0.5", sha256="f9fa3a2b3c0f1eac6070dff6c513444e9fde9a1f794ec4c21fca85833dbb5192")
version("4.0.0", sha256="9a952de4d326d961af0a497753a4b71b2f7844605023d170c931d3624e036506")
diff --git a/var/spack/repos/builtin/packages/py-python-calamine/package.py b/var/spack/repos/builtin/packages/py-python-calamine/package.py
new file mode 100644
index 0000000000..89e254e80f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-python-calamine/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPythonCalamine(PythonPackage):
+ """Python binding for Rust's library for reading excel and odf file - calamine."""
+
+ homepage = "https://github.com/dimastbk/python-calamine"
+ pypi = "python_calamine/python_calamine-0.1.7.tar.gz"
+
+ license("MIT")
+
+ version("0.1.7", sha256="57199dc84522001bdefd0e87e6c50c5a88bf3425dbc3d8fb52c0dec77c218ba2")
+
+ depends_on("py-maturin@1", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-crfsuite/package.py b/var/spack/repos/builtin/packages/py-python-crfsuite/package.py
index 6c8fd4fd69..f61a582959 100644
--- a/var/spack/repos/builtin/packages/py-python-crfsuite/package.py
+++ b/var/spack/repos/builtin/packages/py-python-crfsuite/package.py
@@ -16,5 +16,8 @@ class PyPythonCrfsuite(PythonPackage):
version("0.9.7", sha256="3b4538d2ce5007e4e42005818247bf43ade89ef08a66d158462e2f7c5d63cee7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-deprecated/package.py b/var/spack/repos/builtin/packages/py-python-deprecated/package.py
new file mode 100644
index 0000000000..3af97f84c1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-python-deprecated/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyPythonDeprecated(PythonPackage):
+ """Python @deprecated decorator to deprecate old python classes, functions or methods."""
+
+ homepage = "https://github.com/vrcmarcos/python-deprecated"
+ pypi = "Python-Deprecated/Python-Deprecated-1.1.0.tar.gz"
+
+ maintainers("Pandapip1")
+
+ version("1.1.0", sha256="a242b3c1721f97912330b12cd5529abfa5b3876084a6c60a2c683a87d4b0dd6f")
+
+ depends_on("py-setuptools", type=("build",))
diff --git a/var/spack/repos/builtin/packages/py-python-dotenv/package.py b/var/spack/repos/builtin/packages/py-python-dotenv/package.py
index a9e8d5e8cb..b3aebc3df9 100644
--- a/var/spack/repos/builtin/packages/py-python-dotenv/package.py
+++ b/var/spack/repos/builtin/packages/py-python-dotenv/package.py
@@ -16,11 +16,10 @@ class PyPythonDotenv(PythonPackage):
license("BSD-3-Clause")
+ version("1.0.1", sha256="e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca")
version("0.19.2", sha256="a5de49a31e953b45ff2d2fd434bbc2670e8db5273606c1e737cc6b93eff3655f")
variant("cli", default=False, description="Add commandline tools")
- depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
-
depends_on("py-click@5:", when="+cli", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-python-fmask/package.py b/var/spack/repos/builtin/packages/py-python-fmask/package.py
index d2a931c858..d475e36414 100644
--- a/var/spack/repos/builtin/packages/py-python-fmask/package.py
+++ b/var/spack/repos/builtin/packages/py-python-fmask/package.py
@@ -13,14 +13,19 @@ class PyPythonFmask(PythonPackage):
homepage = "https://www.pythonfmask.org/en/latest/"
url = "https://github.com/ubarsc/python-fmask/releases/download/pythonfmask-0.5.8/python-fmask-0.5.8.tar.gz"
+ maintainers("gillins", "neilflood")
+
license("GPL-3.0-only")
+ version("0.5.9", sha256="7e2875abab87da545d3ec06b9dad704105729977ad1e479a3d9d3b8294c49e44")
version("0.5.8", sha256="d55f54d3fecde818374017fdbe0ad173c893ef74c79ba2a7bc1890b7ec416c2f")
version("0.5.7", sha256="da9dad1b977a50599d068dedaed007100b20322a79ca5d78f702712647c2c3f3")
version("0.5.6", sha256="a63abd12d36fb4ec010e618bcabd5e2f782a0479ebcbf40aec1bcef943c00c5c")
version("0.5.5", sha256="8257227d2527ea5fbd229f726d06d05986914beafd090acef05772a27dbbf062")
version("0.5.4", sha256="ed20776f6b63615f664da89a9e3951c79437b66c2bf88fe19a93c2cc7dc40c82")
+ depends_on("c", type="build") # generated
+
# Note: Dependencies are listed here: https://github.com/ubarsc/python-fmask/blob/master/doc/source/index.rst#introduction
# pip silently replaces distutils with setuptools
diff --git a/var/spack/repos/builtin/packages/py-python-javabridge/package.py b/var/spack/repos/builtin/packages/py-python-javabridge/package.py
index 172ceb9eb5..debdad7c59 100644
--- a/var/spack/repos/builtin/packages/py-python-javabridge/package.py
+++ b/var/spack/repos/builtin/packages/py-python-javabridge/package.py
@@ -15,6 +15,8 @@ class PyPythonJavabridge(PythonPackage):
version("4.0.3", sha256="3fee0c235efcfe866f95695fdc0b6289eab2371043b32ff4ca6feff098de59c5")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.29.16:", type="build")
depends_on("py-numpy@1.20.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-python-jose/package.py b/var/spack/repos/builtin/packages/py-python-jose/package.py
index f418761f49..5447a212f9 100644
--- a/var/spack/repos/builtin/packages/py-python-jose/package.py
+++ b/var/spack/repos/builtin/packages/py-python-jose/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class PyPythonJose(PythonPackage):
"""JOSE implementation in Python"""
- homepage = "http://github.com/mpdavis/python-jose"
+ homepage = "https://github.com/mpdavis/python-jose"
pypi = "python-jose/python-jose-3.3.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-python-json-logger/package.py b/var/spack/repos/builtin/packages/py-python-json-logger/package.py
index e5ce437c83..424c9c6c63 100644
--- a/var/spack/repos/builtin/packages/py-python-json-logger/package.py
+++ b/var/spack/repos/builtin/packages/py-python-json-logger/package.py
@@ -15,6 +15,7 @@ class PyPythonJsonLogger(PythonPackage):
license("BSD-2-Clause")
version("2.0.7", sha256="23e7ec02d34237c5aa1e29a070193a4ea87583bb4e7f8fd06d3de8264c4b2e1c")
+ version("2.0.2", sha256="202a4f29901a4b8002a6d1b958407eeb2dd1d83c18b18b816f5b64476dde9096")
version("0.1.11", sha256="b7a31162f2a01965a5efb94453ce69230ed208468b0bbc7fdfc56e6d8df2e281")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-ldap/package.py b/var/spack/repos/builtin/packages/py-python-ldap/package.py
index a5e675e069..3d1126d469 100644
--- a/var/spack/repos/builtin/packages/py-python-ldap/package.py
+++ b/var/spack/repos/builtin/packages/py-python-ldap/package.py
@@ -22,6 +22,8 @@ class PyPythonLdap(PythonPackage):
version("3.2.0", sha256="7d1c4b15375a533564aad3d3deade789221e450052b21ebb9720fb822eccdb8e")
version("3.0.0", sha256="86746b912a2cd37a54b06c694f021b0c8556d4caeab75ef50435ada152e2fbe1")
+ depends_on("c", type="build") # generated
+
# See https://github.com/python-ldap/python-ldap/issues/432
depends_on("openldap+client_only @:2.4", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-levenshtein/package.py b/var/spack/repos/builtin/packages/py-python-levenshtein/package.py
index db5641154d..d834a0ec44 100644
--- a/var/spack/repos/builtin/packages/py-python-levenshtein/package.py
+++ b/var/spack/repos/builtin/packages/py-python-levenshtein/package.py
@@ -17,4 +17,6 @@ class PyPythonLevenshtein(PythonPackage):
version("0.12.0", sha256="033a11de5e3d19ea25c9302d11224e1a1898fe5abd23c61c7c360c25195e3eb1")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-libsbml/package.py b/var/spack/repos/builtin/packages/py-python-libsbml/package.py
index 44ccf7db16..4678079a97 100644
--- a/var/spack/repos/builtin/packages/py-python-libsbml/package.py
+++ b/var/spack/repos/builtin/packages/py-python-libsbml/package.py
@@ -19,6 +19,9 @@ class PyPythonLibsbml(PythonPackage):
"5.19.5", tag="v5.19.5", commit="6081d9e1b0aa2b3ff4198b39680b726094c47e85", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("swig", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-lsp-jsonrpc/package.py b/var/spack/repos/builtin/packages/py-python-lsp-jsonrpc/package.py
index 9c507d367d..e3ec86ab1a 100644
--- a/var/spack/repos/builtin/packages/py-python-lsp-jsonrpc/package.py
+++ b/var/spack/repos/builtin/packages/py-python-lsp-jsonrpc/package.py
@@ -16,7 +16,11 @@ class PyPythonLspJsonrpc(PythonPackage):
license("MIT")
+ version("1.1.2", sha256="4688e453eef55cd952bff762c705cedefa12055c0aec17a06f595bcc002cc912")
version("1.0.0", sha256="7bec170733db628d3506ea3a5288ff76aa33c70215ed223abdb0d95e957660bd")
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@61.2.0:", type="build", when="@1.1.0:")
+ depends_on("py-setuptools-scm@3.4.3:+toml", type="build", when="@1.1.0:")
+
depends_on("py-ujson@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-python-lsp-server/package.py b/var/spack/repos/builtin/packages/py-python-lsp-server/package.py
index 1292ae77fe..3c1e23e990 100644
--- a/var/spack/repos/builtin/packages/py-python-lsp-server/package.py
+++ b/var/spack/repos/builtin/packages/py-python-lsp-server/package.py
@@ -16,15 +16,22 @@ class PyPythonLspServer(PythonPackage):
license("MIT")
+ version("1.10.0", sha256="0c9a52dcc16cd0562404d529d50a03372db1ea6fb8dfcc3792b3265441c814f4")
version("1.7.1", sha256="67473bb301f35434b5fa8b21fc5ed5fac27dc8a8446ccec8bae456af52a0aef6")
version("1.7.0", sha256="401ce78ea2e98cadd02d94962eb32c92879caabc8055b9a2f36d7ef44acc5435")
version("1.6.0", sha256="d75cdff9027c4212e5b9e861e9a0219219c8e2c69508d9f24949951dabd0dc1b")
depends_on("python@3.7:", type=("build", "run"))
- depends_on("py-setuptools@61.2.0:", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"), when="@1.8.0:")
+ depends_on("py-setuptools@61.2.0:", type=("build", "run"), when="@:1.7")
+ depends_on("py-setuptools@61.2.0:", type="build", when="@1.8.0:")
depends_on("py-setuptools-scm@3.4.3:+toml", type="build")
+
depends_on("py-docstring-to-markdown", type=("build", "run"))
- depends_on("py-jedi@0.17.2:0.18", type=("build", "run"))
+ depends_on("py-importlib-metadata@4.8.3:", type=("build", "run"), when="@1.8.0: ^python@:3.9")
+ depends_on("py-jedi@0.17.2:0.18", type=("build", "run"), when="@:1.7")
+ depends_on("py-jedi@0.17.2:0.19", type=("build", "run"), when="@1.8.0:")
depends_on("py-pluggy@1.0.0:", type=("build", "run"))
- depends_on("py-python-lsp-jsonrpc@1.0.0:", type=("build", "run"))
+ depends_on("py-python-lsp-jsonrpc@1.0.0:1", type=("build", "run"))
+ depends_on("py-python-lsp-jsonrpc@1.1.0:1", type=("build", "run"), when="@1.8.0:")
depends_on("py-ujson@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-python-lzo/package.py b/var/spack/repos/builtin/packages/py-python-lzo/package.py
index 4b0c83fa67..482c74ad12 100644
--- a/var/spack/repos/builtin/packages/py-python-lzo/package.py
+++ b/var/spack/repos/builtin/packages/py-python-lzo/package.py
@@ -18,6 +18,8 @@ class PyPythonLzo(PythonPackage):
version("1.15", sha256="a57aaa00c5c3a0515dd9f7426ba2cf601767dc19dc023d8b99d4a13b0a327b49")
version("1.12", sha256="97a8e46825e8f1abd84c2a3372bc09adae9745a5be5d3af2692cd850dac35345")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@42:", when="@1.13:", type="build")
depends_on("py-setuptools", type="build")
depends_on("lzo")
diff --git a/var/spack/repos/builtin/packages/py-python-magic/package.py b/var/spack/repos/builtin/packages/py-python-magic/package.py
index 71a6fb25f2..fc34c262e4 100644
--- a/var/spack/repos/builtin/packages/py-python-magic/package.py
+++ b/var/spack/repos/builtin/packages/py-python-magic/package.py
@@ -18,6 +18,7 @@ class PyPythonMagic(PythonPackage):
license("MIT")
+ version("0.4.27", sha256="c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b")
version("0.4.24", sha256="de800df9fb50f8ec5974761054a708af6e4246b03b4bdaee993f948947b0ebcf")
version("0.4.15", sha256="f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5")
diff --git a/var/spack/repos/builtin/packages/py-python-mapnik/package.py b/var/spack/repos/builtin/packages/py-python-mapnik/package.py
index 199f20295b..fb042f45f9 100644
--- a/var/spack/repos/builtin/packages/py-python-mapnik/package.py
+++ b/var/spack/repos/builtin/packages/py-python-mapnik/package.py
@@ -20,6 +20,8 @@ class PyPythonMapnik(PythonPackage):
version("3.0.16", sha256="643117752fa09668a1e26a360d13cd137329ae2013eb14ad92ab72fbc479fc70")
version("3.0.13", sha256="ced684745e778c0cac0edba89c09c6f9b9f1db18fc12744ed4710a88b78a3389")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("mapnik", type=("build", "link", "run"))
depends_on("boost +python+thread")
diff --git a/var/spack/repos/builtin/packages/py-python-multipart/package.py b/var/spack/repos/builtin/packages/py-python-multipart/package.py
index 0af95b14b7..5dd5780011 100644
--- a/var/spack/repos/builtin/packages/py-python-multipart/package.py
+++ b/var/spack/repos/builtin/packages/py-python-multipart/package.py
@@ -15,8 +15,18 @@ class PyPythonMultipart(PythonPackage):
license("Apache-2.0")
+ version("0.0.17", sha256="41330d831cae6e2f22902704ead2826ea038d0419530eadff3ea80175aec5538")
version("0.0.5", sha256="f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", type="build", when="@:0.0.5")
+ depends_on("py-hatchling", type="build", when="@0.0.6:")
depends_on("py-six@1.4.0:", type=("build", "run"))
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/p/python-multipart/{}-{}.tar.gz"
+ if self.spec.satisfies("@:0.0.5"):
+ name = "python-multipart"
+ else:
+ name = "python_multipart"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-python-pptx/package.py b/var/spack/repos/builtin/packages/py-python-pptx/package.py
index fa83144501..db22fec768 100644
--- a/var/spack/repos/builtin/packages/py-python-pptx/package.py
+++ b/var/spack/repos/builtin/packages/py-python-pptx/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyPythonPptx(PythonPackage):
"""Generate and manipulate Open XML PowerPoint (.pptx) files."""
- homepage = "http://github.com/scanny/python-pptx"
+ homepage = "https://github.com/scanny/python-pptx"
pypi = "python-pptx/python-pptx-0.6.21.tar.gz"
maintainers("LydDeb")
diff --git a/var/spack/repos/builtin/packages/py-python-ptrace/package.py b/var/spack/repos/builtin/packages/py-python-ptrace/package.py
index 5f9260bb27..be67cc059b 100644
--- a/var/spack/repos/builtin/packages/py-python-ptrace/package.py
+++ b/var/spack/repos/builtin/packages/py-python-ptrace/package.py
@@ -14,6 +14,12 @@ class PyPythonPtrace(PythonPackage):
license("GPL-2.0-only")
+ version("0.9.9", sha256="56bbfef44eaf3a77be48138cca5767cdf471e8278fe1499f9b72f151907f25cf")
version("0.9.8", sha256="1e3bc6223f626aaacde8a7979732691c11b13012e702fee9ae16c87f71633eaa")
+ depends_on("c", type="build")
+
depends_on("py-setuptools", type="build")
+
+ # uses imp
+ depends_on("python@:3.11", when="@:0.9.8")
diff --git a/var/spack/repos/builtin/packages/py-python-rapidjson/package.py b/var/spack/repos/builtin/packages/py-python-rapidjson/package.py
index 0925652e60..ed6c3f3de1 100644
--- a/var/spack/repos/builtin/packages/py-python-rapidjson/package.py
+++ b/var/spack/repos/builtin/packages/py-python-rapidjson/package.py
@@ -20,6 +20,8 @@ class PyPythonRapidjson(PythonPackage):
version("1.5", sha256="04323e63cf57f7ed927fd9bcb1861ef5ecb0d4d7213f2755969d4a1ac3c2de6f")
version("0.9.1", sha256="ad80bd7e4bb15d9705227630037a433e2e2a7982b54b51de2ebabdd1611394a1")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.4:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@1.5:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-python-swiftclient/package.py b/var/spack/repos/builtin/packages/py-python-swiftclient/package.py
index f596a79460..f6e1561a3c 100644
--- a/var/spack/repos/builtin/packages/py-python-swiftclient/package.py
+++ b/var/spack/repos/builtin/packages/py-python-swiftclient/package.py
@@ -14,6 +14,7 @@ class PyPythonSwiftclient(PythonPackage):
maintainers("ajkotobi")
+ version("4.6.0", sha256="d4d18540413893fc16ad87791d740f823f763435e8212e68eb53d60da2638233")
version("3.12.0", sha256="313b444a14d0f9b628cbf3e8c52f2c4271658f9e8a33d4222851c2e4f0f7b7a0")
version("3.11.1", sha256="06919d59676d3e215f4da4f3f930d71880dda3528289842b25199509df712411")
version("3.10.0", sha256="66227eaf29a691c70675fb9982022980b92797c273dd5e6dc7e680425e9a3634")
@@ -25,10 +26,13 @@ class PyPythonSwiftclient(PythonPackage):
variant("keystone", default=False, description="Enable keystone authentication")
depends_on("python@2.7:", type=("build", "run"))
+ depends_on("python@3.6:", type=("build", "run"), when="@4:")
depends_on("py-setuptools", type="build")
depends_on("py-pbr", type="build")
depends_on("py-requests@1.1.0:", type=("build", "run"))
- depends_on("py-six@1.9:", type=("build", "run"))
+ depends_on("py-requests@2.4.0:", type=("build", "run"), when="@4:")
depends_on("py-python-keystoneclient@0.7.0:", when="+keystone", type=("build", "run"))
+
+ depends_on("py-six@1.9:", type=("build", "run"), when="@:3")
diff --git a/var/spack/repos/builtin/packages/py-pythonsollya/package.py b/var/spack/repos/builtin/packages/py-pythonsollya/package.py
index 84a715c8d1..1603ea1dce 100644
--- a/var/spack/repos/builtin/packages/py-pythonsollya/package.py
+++ b/var/spack/repos/builtin/packages/py-pythonsollya/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyPythonsollya(PythonPackage):
"""Python wrapper for the Sollya library"""
- homepage = "Python wrapper for the Sollya library"
+ homepage = "https://gitlab.com/metalibm-dev/pythonsollya"
url = "https://gitlab.com/metalibm-dev/pythonsollya/-/archive/release-0.4.0-alpha0/pythonsollya-release-0.4.0-alpha0.tar.gz"
license("CECILL-2.1")
@@ -34,9 +34,4 @@ class PyPythonsollya(PythonPackage):
@run_before("install")
def patch(self):
- filter_file(
- "PYTHON ?= python2",
- "PYTHON ?= " + self.spec["python"].command.path,
- "GNUmakefile",
- string=True,
- )
+ filter_file("PYTHON ?= python2", f"PYTHON ?= {python.path}", "GNUmakefile", string=True)
diff --git a/var/spack/repos/builtin/packages/py-pythran/package.py b/var/spack/repos/builtin/packages/py-pythran/package.py
index 990edc4104..11828a77c3 100644
--- a/var/spack/repos/builtin/packages/py-pythran/package.py
+++ b/var/spack/repos/builtin/packages/py-pythran/package.py
@@ -15,9 +15,14 @@ class PyPythran(PythonPackage):
homepage = "https://github.com/serge-sans-paille/pythran"
pypi = "pythran/pythran-0.9.11.tar.gz"
+ tags = ["build-tools"]
license("BSD-3-Clause")
+ maintainers("rgommers")
+ version("0.16.1", sha256="861748c0f9c7d422b32724b114b3817d818ed4eab86c09781aa0a3f7ceabb7f9")
+ version("0.16.0", sha256="37dcf6aa9713b352b05004e3a20d14b3de7399bb0d7fe2027bd2b9e2833fe65a")
+ version("0.15.0", sha256="f9bc61bcb96df2cd4b578abc5a62dfb3fbb0b0ef02c264513dfb615c5f87871c")
version("0.12.2", sha256="2344c7ad76255f31f79d87877cc6bb8bddc5e5593015dae29b3f821c6c06a627")
version("0.12.0", sha256="eff3dd0d3eebe57372f0d14f82985525e9bcdfb5b1d1010e1932cf9207060f9f")
version("0.11.0", sha256="0b2cba712e09f7630879dff69f268460bfe34a6d6000451b47d598558a92a875")
@@ -33,15 +38,22 @@ class PyPythran(PythonPackage):
version("0.9.4", sha256="ec9c91f5331454263b064027292556a184a9f55a50f8615e09b08f57a4909855")
version("0.9.3", sha256="217427a8225a331fdc8f3efe57871aed775cdf2c6e847a0a83df0aaae4b02493")
- depends_on("py-setuptools", type="build")
+ depends_on("cxx", type="build") # generated
+
+ # https://github.com/serge-sans-paille/pythran/pull/2196
+ depends_on("py-setuptools@62:", when="@0.15:", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
depends_on("py-ply@3.4:", type=("build", "run"))
+ depends_on("py-gast@0.5", when="@0.15:", type=("build", "run"))
# upper bound due to https://github.com/scipy/scipy/issues/18390
- depends_on("py-gast@0.5:0.5.3", when="@0.9.12:", type=("build", "run"))
+ depends_on("py-gast@0.5:0.5.3", when="@0.9.12:0.12", type=("build", "run"))
depends_on("py-gast@0.4", when="@0.9.7:0.9.11", type=("build", "run"))
depends_on("py-gast@0.3.3:0.3", when="@0.9.6", type=("build", "run"))
depends_on("py-gast@0.3:", when="@0.9.4:0.9.5", type=("build", "run"))
depends_on("py-gast", when="@:0.9.3", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/serge-sans-paille/pythran/issues/2189
+ depends_on("py-numpy@:1", when="@:0.15", type=("build", "run"))
depends_on("py-beniget@0.4", when="@0.9.12:", type=("build", "run"))
depends_on("py-beniget@0.3", when="@0.9.7:0.9.11", type=("build", "run"))
depends_on("py-beniget@0.2.1:0.2", when="@0.9.6", type=("build", "run"))
@@ -58,8 +70,19 @@ class PyPythran(PythonPackage):
# https://github.com/serge-sans-paille/pythran/pull/1856
patch("omp.patch", when="@0.9.10:0.9.12")
+ # https://github.com/serge-sans-paille/pythran/pull/2029
+ patch(
+ "https://github.com/serge-sans-paille/pythran/commit/00a454a9c33ff05852c8d36a73cc1aadb9690c9a.patch?full_index=1",
+ sha256="5ccf989a259e33e942b7dde39f8e90917e12afd7fda16ec90e9adad8ccf444fb",
+ when="@:0.12.0",
+ )
+
# https://github.com/serge-sans-paille/pythran/issues/1937
conflicts("%apple-clang@13:", when="@:0.10")
+ # https://github.com/serge-sans-paille/pythran/issues/2101
+ conflicts("^python@3.11:", when="@:0.12.1")
+ # from distutils.errors import CompileError in run.py
+ conflicts("^python@3.12:", when="@:0.15")
@property
def headers(self):
diff --git a/var/spack/repos/builtin/packages/py-pytng/package.py b/var/spack/repos/builtin/packages/py-pytng/package.py
index d499861c06..6a1f605db6 100644
--- a/var/spack/repos/builtin/packages/py-pytng/package.py
+++ b/var/spack/repos/builtin/packages/py-pytng/package.py
@@ -20,6 +20,9 @@ class PyPytng(PythonPackage):
version("0.3.0", sha256="f563f9ea260ca8c8e17b3bcf9458bae35aedd5c58e1c5ac4dfff77a1e036506e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-cython@0.28:2", type="build")
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 de9c0bcb19..133f882e37 100644
--- a/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py
+++ b/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py
@@ -16,6 +16,7 @@ class PyPytorchLightning(PythonPackage):
license("Apache-2.0")
+ version("2.0.7", sha256="4e6bc1e1f7b0c69016ea2fe0616b18fa62bd3d8661c7ff02c11d317746cfc5f5")
version("2.0.0", sha256="632dec9af8036f726904e691c505d7650658ef0f4054a062c9e6a940ca09dfd8")
version("1.9.4", sha256="188a7f4468acf23512e7f4903253d86fc7929a49f0c09d699872e364162001e8")
version("1.9.3", sha256="479164caea190d49ee2a218eef7e001888be56db912b417639b047e8f9ca8a07")
@@ -51,7 +52,8 @@ class PyPytorchLightning(PythonPackage):
# src/pytorch_lightning/__setup__.py
depends_on("python@3.8:", when="@2:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ # https://github.com/Lightning-AI/pytorch-lightning/pull/20081
+ depends_on("py-setuptools", type=("build", "run"))
# requirements/pytorch/base.txt
depends_on("py-numpy@1.17.2:", when="@1.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytorch-warmup/package.py b/var/spack/repos/builtin/packages/py-pytorch-warmup/package.py
new file mode 100644
index 0000000000..362e4f0b09
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytorch-warmup/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyPytorchWarmup(PythonPackage):
+ """This library contains PyTorch implementations of the warmup schedules
+ described in On the adequacy of untuned warmup for adaptive
+ optimization."""
+
+ homepage = "https://github.com/Tony-Y/pytorch_warmup"
+ pypi = "pytorch-warmup/pytorch-warmup-0.1.1.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("0.1.1", sha256="c594760b29657a127aa6a8c3424dd0b5068140b3b7d4988118f4a9f3e99b1457")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch@1.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py
index 952e8347f0..66128890a9 100644
--- a/var/spack/repos/builtin/packages/py-pytz/package.py
+++ b/var/spack/repos/builtin/packages/py-pytz/package.py
@@ -15,6 +15,7 @@ class PyPytz(PythonPackage):
license("MIT")
+ version("2024.2", sha256="2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a")
version("2023.3", sha256="1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588")
version("2022.2.1", sha256="cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5")
version("2021.3", sha256="acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326")
diff --git a/var/spack/repos/builtin/packages/py-pyuwsgi/package.py b/var/spack/repos/builtin/packages/py-pyuwsgi/package.py
index 17ddbb0075..d5f059604b 100644
--- a/var/spack/repos/builtin/packages/py-pyuwsgi/package.py
+++ b/var/spack/repos/builtin/packages/py-pyuwsgi/package.py
@@ -17,4 +17,7 @@ class PyPyuwsgi(PythonPackage):
version("2.0.21", sha256="211e8877f5191e347ba905232d04ab30e05ce31ba7a6dac4bfcb48de9845bb52")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyvista/package.py b/var/spack/repos/builtin/packages/py-pyvista/package.py
index 2fbe353637..9b63423343 100644
--- a/var/spack/repos/builtin/packages/py-pyvista/package.py
+++ b/var/spack/repos/builtin/packages/py-pyvista/package.py
@@ -12,21 +12,29 @@ class PyPyvista(PythonPackage):
homepage = "https://github.com/pyvista/pyvista"
pypi = "pyvista/pyvista-0.32.1.tar.gz"
+ # Requires optional trame dependency
+ skip_modules = ["pyvista.ext", "pyvista.jupyter", "pyvista.trame"]
+
maintainers("banesullivan")
license("MIT")
+ version("0.44.1", sha256="63976f5d57d151b3f7e1616dde40dcf56a66d1f37f6db067087fa9cc9667f512")
version("0.42.3", sha256="00159cf0dea05c1ecfd1695c8c6ccfcfff71b0744c9997fc0276e661dc052351")
version("0.37.0", sha256="d36a2c6d5f53f473ab6a9241669693acee7a5179394dc97595da14cc1de23141")
version("0.32.1", sha256="585ac79524e351924730aff9b7207d6c5ac4175dbb5d33f7a9a2de22ae53dbf9")
depends_on("py-setuptools", type="build")
depends_on("py-matplotlib@3.0.1:", when="@0.39:", type=("build", "run"))
+ depends_on("py-numpy@1.21:", when="@0.44:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/pyvista/pyvista/releases/tag/v0.44.0
+ depends_on("py-numpy@:1", when="@:0.43", type=("build", "run"))
depends_on("pil", type=("build", "run"))
depends_on("py-pooch", when="@0.37:", type=("build", "run"))
depends_on("py-scooby@0.5.1:", type=("build", "run"))
- depends_on("vtk+python", type=("build", "run"))
+ # https://github.com/pyvista/pyvista/issues/6857
+ depends_on("vtk@:9.3+python", type=("build", "run"))
depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run"))
# Historical dependencies
diff --git a/var/spack/repos/builtin/packages/py-pywavelets/package.py b/var/spack/repos/builtin/packages/py-pywavelets/package.py
index 88fb787939..bcbd942707 100644
--- a/var/spack/repos/builtin/packages/py-pywavelets/package.py
+++ b/var/spack/repos/builtin/packages/py-pywavelets/package.py
@@ -20,6 +20,8 @@ class PyPywavelets(PythonPackage):
version("1.1.1", sha256="1a64b40f6acb4ffbaccce0545d7fc641744f95351f62e4c6aaa40549326008c9")
version("0.5.2", sha256="ce36e2f0648ea1781490b09515363f1f64446b0eac524603e5db5e180113bed9")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:", when="@1.4.1:", type=("build", "run"))
depends_on("python@3.5:", when="@1.1.1:", type=("build", "run"))
depends_on("py-setuptools@:64", type="build")
@@ -29,3 +31,5 @@ class PyPywavelets(PythonPackage):
depends_on("py-numpy@1.17.3:", when="@1.2:", type=("build", "run"))
depends_on("py-numpy@1.13.3:", when="@1.1.1:", type=("build", "run"))
depends_on("py-numpy@1.9.1:", type=("build", "run"))
+ # https://github.com/PyWavelets/pywt/pull/731
+ depends_on("py-numpy@:1", when="@:1.5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pywcs/package.py b/var/spack/repos/builtin/packages/py-pywcs/package.py
index 8b4ca6624a..a6c1c39bce 100644
--- a/var/spack/repos/builtin/packages/py-pywcs/package.py
+++ b/var/spack/repos/builtin/packages/py-pywcs/package.py
@@ -15,6 +15,9 @@ class PyPywcs(PythonPackage):
version("1.12.1", sha256="efd4e0ea190e3a2521ebcde583452e126acdeac85cc8a9c78c8a96f10805b5e1")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-d2to1@0.2.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pywin32/package.py b/var/spack/repos/builtin/packages/py-pywin32/package.py
index da6f0d7439..c006661699 100644
--- a/var/spack/repos/builtin/packages/py-pywin32/package.py
+++ b/var/spack/repos/builtin/packages/py-pywin32/package.py
@@ -16,4 +16,6 @@ class PyPywin32(PythonPackage):
version("306", sha256="16e5ad3efbbf997080f67c3010bd4eb0067d499bbade9be1b240b7e85325c167")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyworld/package.py b/var/spack/repos/builtin/packages/py-pyworld/package.py
index 5f6f656252..e8b20d7acf 100644
--- a/var/spack/repos/builtin/packages/py-pyworld/package.py
+++ b/var/spack/repos/builtin/packages/py-pyworld/package.py
@@ -19,6 +19,8 @@ class PyPyworld(PythonPackage):
version("0.3.0", sha256="e19b5d8445e0c4fc45ded71863aeaaf2680064b4626b0e7c90f72e9ace9f6b5b")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@:1.19", type=("build", "run"))
depends_on("py-cython@0.24.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py
index 048b3e7d9f..7093ec8dd8 100644
--- a/var/spack/repos/builtin/packages/py-pyyaml/package.py
+++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py
@@ -10,11 +10,20 @@ class PyPyyaml(PythonPackage):
"""PyYAML is a YAML parser and emitter for Python."""
homepage = "https://pyyaml.org/wiki/PyYAML"
- pypi = "PyYAML/PyYAML-5.3.1.tar.gz"
+ pypi = "pyyaml/pyyaml-6.0.2.tar.gz"
git = "https://github.com/yaml/pyyaml.git"
+ maintainers("mathomp4")
+
license("MIT")
+ # Advice for Maintainers:
+ # PyYAML went from a mixed case tarfile name to a lowercase one in 6.0.2
+ # (see url_for_version below). Since "spack checksum" does not use url_for_version,
+ # for versions older than 6.0.2, you'll need to use "spack checksum py-pyyaml x.y.z"
+ # as we changed the pypi url above to lowercase.
+ version("6.0.2", sha256="d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e")
+ version("6.0.1", sha256="bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43")
version("6.0", sha256="68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2")
version("5.4.1", sha256="607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e")
version("5.3.1", sha256="b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d")
@@ -37,7 +46,16 @@ class PyPyyaml(PythonPackage):
conflicts("^python@3.11:", when="@:5.3")
# https://github.com/yaml/pyyaml/issues/601
- conflicts("^py-cython@3:")
+ # 6.0.2+ do now support Cython 3 per release notes
+ conflicts("^py-cython@3:", when="@:6.0.1")
+
+ # With pyyaml 6.0.2, the tarfile changed from PyYAML-6.0.1.tar.gz to pyyaml-6.0.2.tar.gz
+ def url_for_version(self, version):
+ if version >= Version("6.0.2"):
+ url = "https://pypi.io/packages/source/p/pyyaml/pyyaml-{0}.tar.gz"
+ else:
+ url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-{0}.tar.gz"
+ return url.format(version.dotted)
@property
def import_modules(self):
diff --git a/var/spack/repos/builtin/packages/py-pyzmq/package.py b/var/spack/repos/builtin/packages/py-pyzmq/package.py
index 63956fb6e9..bac8d3be16 100644
--- a/var/spack/repos/builtin/packages/py-pyzmq/package.py
+++ b/var/spack/repos/builtin/packages/py-pyzmq/package.py
@@ -24,6 +24,10 @@ class PyPyzmq(PythonPackage):
license("BSD-3-Clause")
+ version("26.2.0", sha256="070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f")
+ version("26.1.1", sha256="a7db05d8b7cd1a8c6610e9e9aa55d525baae7a44a43e18bc3260eb3f92de96c6")
+ version("26.0.3", sha256="dba7d9f2e047dfa2bca3b01f4f84aa5246725203d6284e3790f2ca15fba6b40a")
+ version("25.1.2", sha256="93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226")
version("25.0.2", sha256="6b8c1bbb70e868dc88801aa532cae6bd4e3b5233784692b786f17ad2962e5149")
version("24.0.1", sha256="216f5d7dbb67166759e59b0479bca82b8acf9bed6015b526b8eb10143fb08e77")
version("22.3.0", sha256="8eddc033e716f8c91c6a2112f0a8ebc5e00532b4a6ae1eb0ccc48e027f9c671c")
@@ -33,16 +37,23 @@ class PyPyzmq(PythonPackage):
version("16.0.2", sha256="0322543fff5ab6f87d11a8a099c4c07dd8a1719040084b6ce9162bcdf5c45c9d")
version("14.7.0", sha256="77994f80360488e7153e64e5959dc5471531d1648e3a4bff14a714d074a38cc2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.6:2.7,3.2:3.8", type=("build", "run"), when="@:14")
# pyproject.toml
- depends_on("py-setuptools", type="build")
- # https://github.com/zeromq/pyzmq/issues/1278
- # https://github.com/zeromq/pyzmq/pull/1317
- depends_on("py-setuptools@:59", when="@17:18.0", type="build")
- depends_on("py-packaging", type="build")
+ with when("@26:"):
+ depends_on("py-scikit-build-core +pyproject", type="build")
+ with when("@:25"):
+ depends_on("py-setuptools", type="build")
+ # https://github.com/zeromq/pyzmq/issues/1278
+ # https://github.com/zeromq/pyzmq/pull/1317
+ depends_on("py-setuptools@:59", when="@17:18.0", type="build")
- # setup.py
+ depends_on("py-packaging", type="build")
+ depends_on("py-cython@3:", type="build", when="@26:")
+ depends_on("py-cython@0.29.35:", type="build", when="@25.1.1: ^python@3.12:")
depends_on("py-cython@0.29:", type="build", when="@22.3.0:")
depends_on("py-cython@0.20:", type="build", when="@18:")
depends_on("py-cython@0.16:", type="build")
@@ -63,7 +74,7 @@ class PyPyzmq(PythonPackage):
for f in find(".", "*.pyx"):
touch(f)
- @run_before("install")
+ @run_before("install", when="@:25")
def setup(self):
"""Create config file listing dependency information."""
diff --git a/var/spack/repos/builtin/packages/py-qdldl/package.py b/var/spack/repos/builtin/packages/py-qdldl/package.py
index acd5cc9b99..3609976d89 100644
--- a/var/spack/repos/builtin/packages/py-qdldl/package.py
+++ b/var/spack/repos/builtin/packages/py-qdldl/package.py
@@ -21,6 +21,9 @@ class PyQdldl(PythonPackage):
"0.1.5.post3", sha256="69c092f6e1fc23fb779a80a62e6fcdfe2eba05c925860248c4d6754f4736938f"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@18.0:", type="build")
depends_on("py-pybind11", type="build")
depends_on("py-numpy@1.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-qiskit-aer/package.py b/var/spack/repos/builtin/packages/py-qiskit-aer/package.py
index 0d5d5a0d9a..2c1a2b4011 100644
--- a/var/spack/repos/builtin/packages/py-qiskit-aer/package.py
+++ b/var/spack/repos/builtin/packages/py-qiskit-aer/package.py
@@ -19,6 +19,8 @@ class PyQiskitAer(PythonPackage, CudaPackage):
version("0.11.1", sha256="ff136a086d0473346e5f5309ae34cc78b103dcd8a898344c6e5f86de91af41a1")
version("0.9.1", sha256="3bf5f615aaae7cc5f816c39a4e9108aabaed0cc894fb6f841e48ffd56574e7eb")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"), when="@0.9.1")
depends_on("python@3.7:", type=("build", "run"), when="@0.11.1")
depends_on("py-setuptools@40.1.0:", type="build")
@@ -30,7 +32,7 @@ class PyQiskitAer(PythonPackage, CudaPackage):
depends_on("py-qiskit-terra@0.21.0:", type=("build", "run"), when="@0.11.1")
depends_on("py-scipy@1.0:", type=("build", "run"))
depends_on("py-scikit-build@0.11.0:", type="build")
- depends_on("py-cmake@:3.16,3.18:", type="build")
+ depends_on("cmake@:3.16,3.18:", type="build")
depends_on("mpi", when="+mpi")
depends_on("nlohmann-json@3.1.1:")
depends_on("spdlog@1.5.0:")
diff --git a/var/spack/repos/builtin/packages/py-qiskit-nature/package.py b/var/spack/repos/builtin/packages/py-qiskit-nature/package.py
index 566edca7d4..be640acc06 100644
--- a/var/spack/repos/builtin/packages/py-qiskit-nature/package.py
+++ b/var/spack/repos/builtin/packages/py-qiskit-nature/package.py
@@ -19,6 +19,8 @@ class PyQiskitNature(PythonPackage):
version("0.2.2", sha256="ce3558d4acf2511111cc398361146af36391d67e5a9fe9c4bd0f727cb56022bf")
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@40.1.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-qmtest/package.py b/var/spack/repos/builtin/packages/py-qmtest/package.py
index 01bad9ce4c..d938ef1fc1 100644
--- a/var/spack/repos/builtin/packages/py-qmtest/package.py
+++ b/var/spack/repos/builtin/packages/py-qmtest/package.py
@@ -18,6 +18,9 @@ class PyQmtest(PythonPackage):
version("2.4.1", sha256="098f705aea9c8f7f5b6b5fe131974cee33b50cad3e13977e39708f306ce9ac91")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Patch to fix python 3.10 and above compatibility
patch("wininst.patch", when="@2.4.1^python@3.10:")
diff --git a/var/spack/repos/builtin/packages/py-qrcode/package.py b/var/spack/repos/builtin/packages/py-qrcode/package.py
index 3fc90ef805..f825b75f87 100644
--- a/var/spack/repos/builtin/packages/py-qrcode/package.py
+++ b/var/spack/repos/builtin/packages/py-qrcode/package.py
@@ -12,8 +12,6 @@ class PyQrcode(PythonPackage):
homepage = "https://github.com/lincolnloop/python-qrcode"
pypi = "qrcode/qrcode-7.3.1.tar.gz"
- maintainers("sethrj")
-
license("BSD-3-Clause")
version("7.3.1", sha256="375a6ff240ca9bd41adc070428b5dfc1dcfbb0f2507f1ac848f6cded38956578")
diff --git a/var/spack/repos/builtin/packages/py-quantiphy/package.py b/var/spack/repos/builtin/packages/py-quantiphy/package.py
new file mode 100644
index 0000000000..528ce4dc5b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-quantiphy/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyQuantiphy(PythonPackage):
+ """physical quantities (numbers with units)"""
+
+ homepage = "https://quantiphy.readthedocs.io"
+ pypi = "quantiphy/quantiphy-2.20.tar.gz"
+
+ maintainers("ax3l")
+
+ license("MIT", checked_by="ax3l")
+
+ version("2.20", sha256="ba5375ac55c3b90077a793588dd5a88aaf81b2c3b0fc9c9359513ac39f6ed84d")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-flit-core@2:3", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-quantum-blackbird/package.py b/var/spack/repos/builtin/packages/py-quantum-blackbird/package.py
index adf5ab6dbd..d4d1baa679 100644
--- a/var/spack/repos/builtin/packages/py-quantum-blackbird/package.py
+++ b/var/spack/repos/builtin/packages/py-quantum-blackbird/package.py
@@ -20,6 +20,8 @@ class PyQuantumBlackbird(PythonPackage):
version("0.5.0", sha256="065c73bf5263ce8f9b72dcd2b434f3bfbb471f0a6907c97a617ec0c8bde01db3")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.16:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-quart/package.py b/var/spack/repos/builtin/packages/py-quart/package.py
index 60ac08264c..a3d49bac24 100644
--- a/var/spack/repos/builtin/packages/py-quart/package.py
+++ b/var/spack/repos/builtin/packages/py-quart/package.py
@@ -11,21 +11,40 @@ class PyQuart(PythonPackage):
Flask."""
homepage = "https://gitlab.com/pgjones/quart/"
- pypi = "Quart/Quart-0.16.3.tar.gz"
+ pypi = "quart/quart-0.16.3.tar.gz"
license("MIT")
+ version("0.19.8", sha256="ef567d0be7677c99890d5c6ff30e679699fe7e5fca1a90fa3b6974edd8421794")
version("0.16.3", sha256="16521d8cf062461b158433d820fff509f98fb997ae6c28740eda061d9cba7d5e")
+ depends_on("python@3.8:", type=("build", "run"), when="@0.19:")
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-poetry-core@1:", type="build")
depends_on("py-aiofiles", type=("build", "run"))
+ depends_on("py-blinker@1.6:", type=("build", "run"), when="@0.19:")
depends_on("py-blinker", type=("build", "run"))
+ depends_on("py-click@8.0.0:", type=("build", "run"), when="@0.18.1:")
depends_on("py-click", type=("build", "run"))
+ depends_on("py-flask@3.0.0:", type=("build", "run"), when="@0.19:")
depends_on("py-hypercorn@0.11.2:", type=("build", "run"))
depends_on("py-itsdangerous", type=("build", "run"))
depends_on("py-jinja2", type=("build", "run"))
- depends_on("py-toml", type=("build", "run"))
+ depends_on("py-markupsafe", type=("build", "run"), when="@0.17:")
+ depends_on("py-werkzeug@3:", type=("build", "run"), when="@0.19:")
depends_on("py-werkzeug@2:", type=("build", "run"))
+ depends_on("py-importlib-metadata", type=("build", "run"), when="@0.18: ^python@:3.9")
depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7")
+ depends_on("py-typing-extensions", type=("build", "run"), when="@0.19: ^python@:3.9")
depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.7")
+
+ # Historical dependencies
+ depends_on("py-toml", type=("build", "run"), when="@:0.17")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/q/quart/{}-{}.tar.gz"
+ if self.spec.satisfies("@:0.18.3"):
+ name = "Quart"
+ else:
+ name = "quart"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-quast/package.py b/var/spack/repos/builtin/packages/py-quast/package.py
index 46032d7dd1..c6ddc7f9fd 100644
--- a/var/spack/repos/builtin/packages/py-quast/package.py
+++ b/var/spack/repos/builtin/packages/py-quast/package.py
@@ -23,6 +23,9 @@ class PyQuast(PythonPackage):
version("4.6.1", sha256="7ace5bebebe9d2a70ad45e5339f998bd651c1c6b9025f7a3b51f44c87ea5bae0")
version("4.6.0", sha256="3a7ee7a2abfeb0541b299b67f263ba95f9743f8809ddf5dfaca9c3c8f9b6a215")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.56.0")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/py-qutip/package.py b/var/spack/repos/builtin/packages/py-qutip/package.py
index 2b3237341d..fce20b2198 100644
--- a/var/spack/repos/builtin/packages/py-qutip/package.py
+++ b/var/spack/repos/builtin/packages/py-qutip/package.py
@@ -18,9 +18,13 @@ class PyQutip(PythonPackage):
version("4.7.1", sha256="9a87178e68b145c2145b526caa943ccc8400a111325ced45bd17f9b893663af2")
version("4.7.0", sha256="a9dde64457991ef1c5a7d4186b5348a16a71480a610f1c0902e4d656ddc12e31")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-packaging", type=("build", "run"))
depends_on("py-cython@0.29.20:", type="build")
depends_on("py-numpy@1.16.6:", type=("build", "run"))
+ # https://github.com/qutip/qutip/pull/2421
+ depends_on("py-numpy@:1", type=("build", "run"))
depends_on("py-scipy@1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-radical-entk/package.py b/var/spack/repos/builtin/packages/py-radical-entk/package.py
index 845a86e5c8..4892f5b899 100644
--- a/var/spack/repos/builtin/packages/py-radical-entk/package.py
+++ b/var/spack/repos/builtin/packages/py-radical-entk/package.py
@@ -12,38 +12,89 @@ class PyRadicalEntk(PythonPackage):
homepage = "https://radical-cybertools.github.io"
git = "https://github.com/radical-cybertools/radical.entk.git"
- pypi = "radical.entk/radical.entk-1.20.0.tar.gz"
+ pypi = "radical.entk/radical.entk-1.47.0.tar.gz"
maintainers("andre-merzky")
license("MIT")
version("develop", branch="devel")
- version("1.20.0", sha256="1b9fc470b926a93528fd2a898636bdcd1c565bd58ba47608f9bead811d8a46d7")
- version("1.18.0", sha256="049f70ec7e95819ec0ea706ee6275db04799ceff119dd7b675ef0d36d814de6f")
- version("1.17.0", sha256="695e162b8b6209384660400920f4a2e613d01f0b904e44cfe5b5d012dcc35af9")
- version("1.16.0", sha256="6611b4634ad554651601d9aed3a6d8b8273073da6218112bb472ce51f771ac8e")
- version("1.14.0", sha256="beb6de5625b52b3aeeace52f7b4ac608e9f1bb761d8e9cdfe85d3e36931ce9f3")
- version("1.13.0", sha256="5489338173409777d69885fd5fdb296552937d5a539a8182321bebe273647e1c")
- version("1.12.0", sha256="1ea4814c8324e28cc2b86e6f44d26aaa09c8257ed58f50d1d2eada99adaa17da")
- version("1.11.0", sha256="a912ae3aee4c1a323910dbbb33c87a65f02bb30da94e64d81bb3203c2109fb83")
- version("1.9.0", sha256="918c716ac5eecb012a57452f45f5a064af7ea72f70765c7b0c60be4322b23557")
- version("1.8.0", sha256="47a3f7f1409612d015a3e6633853d31ec4e4b0681aecb7554be16ebf39c7f756")
- version("1.6.7", sha256="9384568279d29b9619a565c075f287a08bca8365e2af55e520af0c2f3595f8a2")
-
- depends_on("py-radical-utils", type=("build", "run"))
- depends_on("py-radical-pilot", type=("build", "run"))
-
- depends_on("py-radical-pilot@1.18:", type=("build", "run"), when="@1.20:")
-
- depends_on("py-radical-utils@1.12:", type=("build", "run"), when="@1.12:")
+ version("1.47.0", sha256="a4338e3a87147c032fb3a16a03990155742cc64c6625cfb4e1588ae0e51aafda")
+ version("1.39.0", sha256="72d64b25df9f3cb1dcbc32323a669d86d947cf07d15bed91cfedca2a99fb3ef1")
+
+ version(
+ "1.20.0",
+ sha256="1b9fc470b926a93528fd2a898636bdcd1c565bd58ba47608f9bead811d8a46d7",
+ deprecated=True,
+ )
+ version(
+ "1.18.0",
+ sha256="049f70ec7e95819ec0ea706ee6275db04799ceff119dd7b675ef0d36d814de6f",
+ deprecated=True,
+ )
+ version(
+ "1.17.0",
+ sha256="695e162b8b6209384660400920f4a2e613d01f0b904e44cfe5b5d012dcc35af9",
+ deprecated=True,
+ )
+ version(
+ "1.16.0",
+ sha256="6611b4634ad554651601d9aed3a6d8b8273073da6218112bb472ce51f771ac8e",
+ deprecated=True,
+ )
+ version(
+ "1.14.0",
+ sha256="beb6de5625b52b3aeeace52f7b4ac608e9f1bb761d8e9cdfe85d3e36931ce9f3",
+ deprecated=True,
+ )
+ version(
+ "1.13.0",
+ sha256="5489338173409777d69885fd5fdb296552937d5a539a8182321bebe273647e1c",
+ deprecated=True,
+ )
+ version(
+ "1.12.0",
+ sha256="1ea4814c8324e28cc2b86e6f44d26aaa09c8257ed58f50d1d2eada99adaa17da",
+ deprecated=True,
+ )
+ version(
+ "1.11.0",
+ sha256="a912ae3aee4c1a323910dbbb33c87a65f02bb30da94e64d81bb3203c2109fb83",
+ deprecated=True,
+ )
+ version(
+ "1.9.0",
+ sha256="918c716ac5eecb012a57452f45f5a064af7ea72f70765c7b0c60be4322b23557",
+ deprecated=True,
+ )
+ version(
+ "1.8.0",
+ sha256="47a3f7f1409612d015a3e6633853d31ec4e4b0681aecb7554be16ebf39c7f756",
+ deprecated=True,
+ )
+ version(
+ "1.6.7",
+ sha256="9384568279d29b9619a565c075f287a08bca8365e2af55e520af0c2f3595f8a2",
+ deprecated=True,
+ )
+
+ depends_on("py-radical-utils@1.40:", type=("build", "run"), when="@1.40:")
+ depends_on("py-radical-pilot@1.40:", type=("build", "run"), when="@1.40:")
+
+ depends_on("py-radical-utils@1.39", type=("build", "run"), when="@1.39")
+ depends_on("py-radical-pilot@1.39", type=("build", "run"), when="@1.39")
+
+ depends_on("py-radical-pilot@1.18:1.20", type=("build", "run"), when="@1.20")
+
+ depends_on("py-radical-utils@1.12:1.20", type=("build", "run"), when="@1.12:1.20")
depends_on("py-radical-pilot@1.12:1.17", type=("build", "run"), when="@1.12:1.19")
depends_on("py-radical-utils@:1.11", type=("build", "run"), when="@:1.11")
depends_on("py-radical-pilot@:1.11", type=("build", "run"), when="@:1.11")
+ depends_on("py-packaging", type=("build", "run"), when="@:1.20")
+ depends_on("py-pika@0.13.0", type=("build", "run"), when="@:1.20")
+ depends_on("py-requests", type=("build", "run"), when="@:1.20")
+
depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-packaging", type=("build", "run"))
- depends_on("py-pika@0.13.0", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-radical-gtod/package.py b/var/spack/repos/builtin/packages/py-radical-gtod/package.py
index d67b6561bd..1b5ec63007 100644
--- a/var/spack/repos/builtin/packages/py-radical-gtod/package.py
+++ b/var/spack/repos/builtin/packages/py-radical-gtod/package.py
@@ -14,17 +14,38 @@ class PyRadicalGtod(PythonPackage):
homepage = "https://radical-cybertools.github.io"
git = "https://github.com/radical-cybertools/radical.gtod.git"
- pypi = "radical.gtod/radical.gtod-1.20.0.tar.gz"
+ pypi = "radical.gtod/radical.gtod-1.47.0.tar.gz"
maintainers("andre-merzky")
license("LGPL-3.0-or-later")
version("develop", branch="devel")
- version("1.20.0", sha256="8d0846de7a5d094146c01fbb7c137f343e4da06af51efafeba79dd3fdfe421dc")
- version("1.16.0", sha256="1fe9da598a965c7194ed9c7df49d5b30632a11a7f9ece12152bea9aaa91bd4b8")
- version("1.13.0", sha256="15df4ae728a8878b111cfdedffb9457aecc8003c2cfbdf2c918dfcb6b836cc93")
- version("1.6.7", sha256="8d7d32e3d0bcf6d7cf176454a9892a46919b03e1ed96bee389380e6d75d6eff8")
+ version("1.47.0", sha256="52e75bf14faf352165ffa0d9e32ca472bd63f479020cd78f832baa34f8acfe6d")
+ version("1.39.0", sha256="254f1e805b58a33b93c6180f018904db25538710ec9e75b3a3a9969d7206ecf6")
+
+ version(
+ "1.20.0",
+ sha256="8d0846de7a5d094146c01fbb7c137f343e4da06af51efafeba79dd3fdfe421dc",
+ deprecated=True,
+ )
+ version(
+ "1.16.0",
+ sha256="1fe9da598a965c7194ed9c7df49d5b30632a11a7f9ece12152bea9aaa91bd4b8",
+ deprecated=True,
+ )
+ version(
+ "1.13.0",
+ sha256="15df4ae728a8878b111cfdedffb9457aecc8003c2cfbdf2c918dfcb6b836cc93",
+ deprecated=True,
+ )
+ version(
+ "1.6.7",
+ sha256="8d7d32e3d0bcf6d7cf176454a9892a46919b03e1ed96bee389380e6d75d6eff8",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build") # generated
depends_on("py-radical-utils", type=("build", "run"), when="@1.13:")
diff --git a/var/spack/repos/builtin/packages/py-radical-pilot/package.py b/var/spack/repos/builtin/packages/py-radical-pilot/package.py
index 1af0f33a70..398c1df066 100644
--- a/var/spack/repos/builtin/packages/py-radical-pilot/package.py
+++ b/var/spack/repos/builtin/packages/py-radical-pilot/package.py
@@ -13,35 +13,102 @@ class PyRadicalPilot(PythonPackage):
homepage = "https://radical-cybertools.github.io"
git = "https://github.com/radical-cybertools/radical.pilot.git"
- pypi = "radical.pilot/radical.pilot-1.20.0.tar.gz"
+ pypi = "radical.pilot/radical.pilot-1.47.0.tar.gz"
maintainers("andre-merzky")
license("MIT")
version("develop", branch="devel")
- version("1.20.0", sha256="a0747e573a01a856dc330797dbee158f7e1cf8652001dc26f06a1d6c5e553bc6")
- version("1.18.1", sha256="fd6a0ffaa727b6b9bab35d8f2dc300bf4d9c4ff3541136d83560aa7b853d6100")
- version("1.17.0", sha256="0bfbb321a623a684e6694241aa3b7804208846515d23afa3b930553274f4a69f")
- version("1.16.0", sha256="057941a206ee96b62b97a63a507c1136b7fe821ae9f9e5eebe7949a3f53941f9")
- version("1.15.1", sha256="35c3b179a0bc85f52d2165e98e19acf2bf79037dd14f4d9ff3fc55ae0122d17e")
- version("1.14.0", sha256="462471065de25f6d6e8baee705790828444c2eebb2073f5faf67a8da800d15a9")
- version("1.13.0", sha256="5bd9eef1884ccca09c242ab6d1361588a442d9cd980613c66604ba140786bde5")
- version("1.12.0", sha256="a266355d30d838f20b6cac190ce589ca919acd41883ad06aec62386239475133")
- version("1.11.2", sha256="9d239f747589b8ae5d6faaea90ea5304b6f230a1edfd8d4efb440bc3799c8a9d")
- version("1.10.2", sha256="56e9d8b1ce7ed05eff471d7df660e4940f485027e5f353aa36fd17425846a499")
- version("1.10.1", sha256="003f4c519b991bded31693026b69dd51547a5a69a5f94355dc8beff766524b3c")
- version("1.9.2", sha256="7c872ac9103a2aed0c5cd46057048a182f672191e194e0fd42794b0012e6e947")
- version("1.8.0", sha256="a4c3bca163db61206e15a2d820d9a64e888da5c72672448ae975c26768130b9d")
- version("1.6.8", sha256="fa8fd3f348a68b54ee8338d5c5cf1a3d99c10c0b6da804424a839239ee0d313d")
- version("1.6.7", sha256="6ca0a3bd3cda65034fa756f37fa05681d5a43441c1605408a58364f89c627970")
-
- depends_on("py-radical-utils", type=("build", "run"))
- depends_on("py-radical-saga", type=("build", "run"))
+ version("1.47.0", sha256="58f41a0c42fe61381f15263a63424294732606ab7cee717540c0b730308f7908")
+ version("1.39.0", sha256="7ba0bfa3258b861db71e73d52f0915bfb8b3ac1099badacf69628307cab3b913")
+
+ version(
+ "1.20.0",
+ sha256="a0747e573a01a856dc330797dbee158f7e1cf8652001dc26f06a1d6c5e553bc6",
+ deprecated=True,
+ )
+ version(
+ "1.18.1",
+ sha256="fd6a0ffaa727b6b9bab35d8f2dc300bf4d9c4ff3541136d83560aa7b853d6100",
+ deprecated=True,
+ )
+ version(
+ "1.17.0",
+ sha256="0bfbb321a623a684e6694241aa3b7804208846515d23afa3b930553274f4a69f",
+ deprecated=True,
+ )
+ version(
+ "1.16.0",
+ sha256="057941a206ee96b62b97a63a507c1136b7fe821ae9f9e5eebe7949a3f53941f9",
+ deprecated=True,
+ )
+ version(
+ "1.15.1",
+ sha256="35c3b179a0bc85f52d2165e98e19acf2bf79037dd14f4d9ff3fc55ae0122d17e",
+ deprecated=True,
+ )
+ version(
+ "1.14.0",
+ sha256="462471065de25f6d6e8baee705790828444c2eebb2073f5faf67a8da800d15a9",
+ deprecated=True,
+ )
+ version(
+ "1.13.0",
+ sha256="5bd9eef1884ccca09c242ab6d1361588a442d9cd980613c66604ba140786bde5",
+ deprecated=True,
+ )
+ version(
+ "1.12.0",
+ sha256="a266355d30d838f20b6cac190ce589ca919acd41883ad06aec62386239475133",
+ deprecated=True,
+ )
+ version(
+ "1.11.2",
+ sha256="9d239f747589b8ae5d6faaea90ea5304b6f230a1edfd8d4efb440bc3799c8a9d",
+ deprecated=True,
+ )
+ version(
+ "1.10.2",
+ sha256="56e9d8b1ce7ed05eff471d7df660e4940f485027e5f353aa36fd17425846a499",
+ deprecated=True,
+ )
+ version(
+ "1.10.1",
+ sha256="003f4c519b991bded31693026b69dd51547a5a69a5f94355dc8beff766524b3c",
+ deprecated=True,
+ )
+ version(
+ "1.9.2",
+ sha256="7c872ac9103a2aed0c5cd46057048a182f672191e194e0fd42794b0012e6e947",
+ deprecated=True,
+ )
+ version(
+ "1.8.0",
+ sha256="a4c3bca163db61206e15a2d820d9a64e888da5c72672448ae975c26768130b9d",
+ deprecated=True,
+ )
+ version(
+ "1.6.8",
+ sha256="fa8fd3f348a68b54ee8338d5c5cf1a3d99c10c0b6da804424a839239ee0d313d",
+ deprecated=True,
+ )
+ version(
+ "1.6.7",
+ sha256="6ca0a3bd3cda65034fa756f37fa05681d5a43441c1605408a58364f89c627970",
+ deprecated=True,
+ )
+
+ depends_on("py-radical-utils@1.44:", type=("build", "run"), when="@1.47:")
+ depends_on("py-radical-saga@1.40:", type=("build", "run"), when="@1.47:")
depends_on("py-radical-gtod", type=("build", "run"), when="@1.14:")
- depends_on("py-radical-utils@1.12:", type=("build", "run"), when="@1.12:")
- depends_on("py-radical-saga@1.12:", type=("build", "run"), when="@1.12:")
+ depends_on("py-radical-utils@1.39", type=("build", "run"), when="@1.39")
+ depends_on("py-radical-saga@1.39", type=("build", "run"), when="@1.39")
+ depends_on("py-radical-gtod@1.39", type=("build", "run"), when="@1.39")
+
+ depends_on("py-radical-utils@1.12:1.20", type=("build", "run"), when="@1.12:1.20")
+ depends_on("py-radical-saga@1.12:1.20", type=("build", "run"), when="@1.12:1.20")
depends_on("py-radical-utils@1.8.4:1.11", type=("build", "run"), when="@1.11")
depends_on("py-radical-saga@1.8:1.11", type=("build", "run"), when="@1.11")
@@ -49,8 +116,9 @@ class PyRadicalPilot(PythonPackage):
depends_on("py-radical-utils@:1.8.3", type=("build", "run"), when="@:1.10")
depends_on("py-radical-saga@:1.7", type=("build", "run"), when="@:1.10")
+ depends_on("py-pymongo@:3", type=("build", "run"), when="@:1.39")
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-dill", type=("build", "run"), when="@1.14:")
- depends_on("py-pymongo@:3", type=("build", "run"))
depends_on("py-setproctitle", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-radical-saga/package.py b/var/spack/repos/builtin/packages/py-radical-saga/package.py
index 0b0944e489..a13f85a194 100644
--- a/var/spack/repos/builtin/packages/py-radical-saga/package.py
+++ b/var/spack/repos/builtin/packages/py-radical-saga/package.py
@@ -14,28 +14,77 @@ class PyRadicalSaga(PythonPackage):
homepage = "https://radical-cybertools.github.io"
git = "https://github.com/radical-cybertools/radical.saga.git"
- pypi = "radical.saga/radical.saga-1.20.0.tar.gz"
+ pypi = "radical.saga/radical.saga-1.47.0.tar.gz"
maintainers("andre-merzky")
license("MIT")
version("develop", branch="devel")
- version("1.20.0", sha256="d85f3ed564d9eaf3ead2aa349c854e944ca459492ebf88542404106fce4204ab")
- version("1.18.0", sha256="544d4ffafc0b311151724db371ee11e27744103068748962866351ce31ccb810")
- version("1.17.0", sha256="e48b42c232ac0ad53a410c1317746a5f15214fd3108fad773d098714fb4c40a0")
- version("1.16.0", sha256="d269e2e7043f05e8f1d45ca3d50be973857150d7928d53bedd6844f39b224786")
- version("1.14.0", sha256="337d8778bf392fd54845b1876de903c4c12f6fa938ef16220e1847561b66731a")
- version("1.13.0", sha256="90d8e875f48402deab87314ea5c08d591264fb576c461bd9663ac611fc2e547e")
- version("1.12.0", sha256="769c83bab95c0e3ef970da0fa6cb30878d7a31216ff8b542e894686357f7cb5b")
- version("1.11.1", sha256="edb1def63fadd192a4be4f508e9e65669745843e158ce27a965bf2f43d18b84d")
- version("1.8.0", sha256="6edf94897102a08dcb994f7f107a0e25e7f546a0a9488af3f8b92ceeeaaf58a6")
- version("1.6.10", sha256="8fe7e281e9f81234f34f5c7c7986871761e9e37230d2a874c65d18daeccd976a")
- version("1.6.8", sha256="d5e9f95a027087fb637cef065ff3af848e5902e403360189e36c9aa7c3f6f29b")
-
- depends_on("py-radical-utils", type=("build", "run"))
-
- depends_on("py-radical-utils@1.12:", type=("build", "run"), when="@1.12:")
+ version("1.47.0", sha256="fc9a8fc060e708852ce6c40b08a65111f8d72b9ad5f8afef9ceaa866c1351233")
+ version("1.39.0", sha256="0fea8103d3f96c821c977bcb55ff1c6a9844de727539b182dda4cbc2570df791")
+
+ version(
+ "1.20.0",
+ sha256="d85f3ed564d9eaf3ead2aa349c854e944ca459492ebf88542404106fce4204ab",
+ deprecated=True,
+ )
+ version(
+ "1.18.0",
+ sha256="544d4ffafc0b311151724db371ee11e27744103068748962866351ce31ccb810",
+ deprecated=True,
+ )
+ version(
+ "1.17.0",
+ sha256="e48b42c232ac0ad53a410c1317746a5f15214fd3108fad773d098714fb4c40a0",
+ deprecated=True,
+ )
+ version(
+ "1.16.0",
+ sha256="d269e2e7043f05e8f1d45ca3d50be973857150d7928d53bedd6844f39b224786",
+ deprecated=True,
+ )
+ version(
+ "1.14.0",
+ sha256="337d8778bf392fd54845b1876de903c4c12f6fa938ef16220e1847561b66731a",
+ deprecated=True,
+ )
+ version(
+ "1.13.0",
+ sha256="90d8e875f48402deab87314ea5c08d591264fb576c461bd9663ac611fc2e547e",
+ deprecated=True,
+ )
+ version(
+ "1.12.0",
+ sha256="769c83bab95c0e3ef970da0fa6cb30878d7a31216ff8b542e894686357f7cb5b",
+ deprecated=True,
+ )
+ version(
+ "1.11.1",
+ sha256="edb1def63fadd192a4be4f508e9e65669745843e158ce27a965bf2f43d18b84d",
+ deprecated=True,
+ )
+ version(
+ "1.8.0",
+ sha256="6edf94897102a08dcb994f7f107a0e25e7f546a0a9488af3f8b92ceeeaaf58a6",
+ deprecated=True,
+ )
+ version(
+ "1.6.10",
+ sha256="8fe7e281e9f81234f34f5c7c7986871761e9e37230d2a874c65d18daeccd976a",
+ deprecated=True,
+ )
+ version(
+ "1.6.8",
+ sha256="d5e9f95a027087fb637cef065ff3af848e5902e403360189e36c9aa7c3f6f29b",
+ deprecated=True,
+ )
+
+ depends_on("py-radical-utils@1.40:", type=("build", "run"), when="@1.40:")
+
+ depends_on("py-radical-utils@1.39", type=("build", "run"), when="@1.39")
+
+ depends_on("py-radical-utils@1.12:1.20", type=("build", "run"), when="@1.12:1.20")
depends_on("py-radical-utils@:1.11", type=("build", "run"), when="@:1.11")
diff --git a/var/spack/repos/builtin/packages/py-radical-utils/package.py b/var/spack/repos/builtin/packages/py-radical-utils/package.py
index 4ac4290792..391dbde783 100644
--- a/var/spack/repos/builtin/packages/py-radical-utils/package.py
+++ b/var/spack/repos/builtin/packages/py-radical-utils/package.py
@@ -12,36 +12,96 @@ class PyRadicalUtils(PythonPackage):
homepage = "https://radical-cybertools.github.io"
git = "https://github.com/radical-cybertools/radical.utils.git"
- pypi = "radical.utils/radical.utils-1.20.0.tar.gz"
+ pypi = "radical.utils/radical.utils-1.47.0.tar.gz"
maintainers("andre-merzky")
license("MIT")
version("develop", branch="devel")
- version("1.20.0", sha256="9b39dd616d70c387fb3f97d3510a506bac92c159b6482c3aebd3d11eeaeebcc9")
- version("1.18.1", sha256="5b3ab15417a1ef82f63f8a77763a177d6bc59b61a80823be0df8c0f7502d9b3e")
- version("1.17.0", sha256="ee3fec190e89522f648e191d2e380689842746f1eacda27772a9471215908cfe")
- version("1.16.0", sha256="6eddfba5c73e71c7c5ddeba6c8ebe5260616d66b26d1f7123613c3cd543d61e9")
- version("1.15.0", sha256="22e5028de75c0a471bfed587d437dded214625b150deaca0289474a3619d395b")
- version("1.14.0", sha256="f61f0e335bbdc51e4023458e7e6959551686ebf170adc5353220dcc83fd677c9")
- version("1.13.0", sha256="84c1cad8be988dad7fb2b8455d19a4fb0c979fab02c5b7a7b531a4ae8fe52580")
- version("1.12.0", sha256="1474dbe4d94cdf3e992e1711e10d73dffa352c1c29ff51d81c1686e5081e9398")
- version("1.11.1", sha256="4fec3f6d45d7309c891ab4f8aeda0257f06f9a8404ca87c7eb643cd8d7415804")
- version("1.11.0", sha256="81537c2a2f8a1a409b4a1aac67323c6b49cc994e2b70052425e2bc8d4622e2de")
- version("1.9.1", sha256="0837d75e7f9dcce5ba5ac63151ab1683d6ba9ab3954b076d1f170cc4a3cdb1b4")
- version("1.8.4", sha256="4777ba20e9f881bf3e73ad917638fdeca5a4b253d57ed7b321a07f670e3f737b")
- version("1.8.0", sha256="8582c65593f51d394fc263c6354ec5ad9cc7173369dcedfb2eef4f5e8146cf03")
- version("1.6.7", sha256="552f6c282f960ccd9d2401d686b0b3bfab35dfa94a26baeb2d3b4e45211f05a9")
+ version("1.47.0", sha256="f85a4a452561dd018217f1ed38d97c9be96fa448437cfeb1b879121174fd5311")
+ version("1.39.0", sha256="fade87ee4c6ccf335d5e26d5158ce22ee891e4d4c576464274999ddf36dc4977")
+
+ version(
+ "1.20.0",
+ sha256="9b39dd616d70c387fb3f97d3510a506bac92c159b6482c3aebd3d11eeaeebcc9",
+ deprecated=True,
+ )
+ version(
+ "1.18.1",
+ sha256="5b3ab15417a1ef82f63f8a77763a177d6bc59b61a80823be0df8c0f7502d9b3e",
+ deprecated=True,
+ )
+ version(
+ "1.17.0",
+ sha256="ee3fec190e89522f648e191d2e380689842746f1eacda27772a9471215908cfe",
+ deprecated=True,
+ )
+ version(
+ "1.16.0",
+ sha256="6eddfba5c73e71c7c5ddeba6c8ebe5260616d66b26d1f7123613c3cd543d61e9",
+ deprecated=True,
+ )
+ version(
+ "1.15.0",
+ sha256="22e5028de75c0a471bfed587d437dded214625b150deaca0289474a3619d395b",
+ deprecated=True,
+ )
+ version(
+ "1.14.0",
+ sha256="f61f0e335bbdc51e4023458e7e6959551686ebf170adc5353220dcc83fd677c9",
+ deprecated=True,
+ )
+ version(
+ "1.13.0",
+ sha256="84c1cad8be988dad7fb2b8455d19a4fb0c979fab02c5b7a7b531a4ae8fe52580",
+ deprecated=True,
+ )
+ version(
+ "1.12.0",
+ sha256="1474dbe4d94cdf3e992e1711e10d73dffa352c1c29ff51d81c1686e5081e9398",
+ deprecated=True,
+ )
+ version(
+ "1.11.1",
+ sha256="4fec3f6d45d7309c891ab4f8aeda0257f06f9a8404ca87c7eb643cd8d7415804",
+ deprecated=True,
+ )
+ version(
+ "1.11.0",
+ sha256="81537c2a2f8a1a409b4a1aac67323c6b49cc994e2b70052425e2bc8d4622e2de",
+ deprecated=True,
+ )
+ version(
+ "1.9.1",
+ sha256="0837d75e7f9dcce5ba5ac63151ab1683d6ba9ab3954b076d1f170cc4a3cdb1b4",
+ deprecated=True,
+ )
+ version(
+ "1.8.4",
+ sha256="4777ba20e9f881bf3e73ad917638fdeca5a4b253d57ed7b321a07f670e3f737b",
+ deprecated=True,
+ )
+ version(
+ "1.8.0",
+ sha256="8582c65593f51d394fc263c6354ec5ad9cc7173369dcedfb2eef4f5e8146cf03",
+ deprecated=True,
+ )
+ version(
+ "1.6.7",
+ sha256="552f6c282f960ccd9d2401d686b0b3bfab35dfa94a26baeb2d3b4e45211f05a9",
+ deprecated=True,
+ )
depends_on("py-radical-gtod", type=("build", "run"), when="@:1.13")
+ depends_on("py-pymongo@:3", type=("build", "run"), when="@:1.39")
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-colorama", type=("build", "run"))
depends_on("py-msgpack", type=("build", "run"))
depends_on("py-netifaces", type=("build", "run"))
depends_on("py-ntplib", type=("build", "run"))
- depends_on("py-pymongo@:3", type=("build", "run"))
depends_on("py-pyzmq", type=("build", "run"))
depends_on("py-regex", type=("build", "run"))
depends_on("py-setproctitle", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py
index 37c7925f8d..189c3e4484 100644
--- a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py
+++ b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py
@@ -18,6 +18,8 @@ class PyRapidfuzz(PythonPackage):
version("2.2.0", sha256="acb8839aac452ec61a419fdc8799e8a6e6cd21bed53d04678cdda6fba1247e2f")
version("1.8.2", sha256="d6efbb2b6b18b3a67d7bdfbcd9bb72732f55736852bbef823bdf210f9e0c6c90")
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools@42:", when="@2:", type="build")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-rarfile/package.py b/var/spack/repos/builtin/packages/py-rarfile/package.py
index 34f09c3e66..17847df62a 100644
--- a/var/spack/repos/builtin/packages/py-rarfile/package.py
+++ b/var/spack/repos/builtin/packages/py-rarfile/package.py
@@ -13,7 +13,9 @@ class PyRarfile(PythonPackage):
pypi = "rarfile/rarfile-4.0.tar.gz"
license("ISC")
+ maintainers("adamjstewart")
+ version("4.2", sha256="8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef")
version("4.1", sha256="db60b3b5bc1c4bdeb941427d50b606d51df677353385255583847639473eda48")
version("4.0", sha256="67548769229c5bda0827c1663dce3f54644f9dbfba4ae86d4da2b2afd3e602a1")
diff --git a/var/spack/repos/builtin/packages/py-rasterio/package.py b/var/spack/repos/builtin/packages/py-rasterio/package.py
index db5a1ec0e6..4362ee17d8 100644
--- a/var/spack/repos/builtin/packages/py-rasterio/package.py
+++ b/var/spack/repos/builtin/packages/py-rasterio/package.py
@@ -17,11 +17,17 @@ class PyRasterio(PythonPackage):
pypi = "rasterio/rasterio-1.1.8.tar.gz"
git = "https://github.com/rasterio/rasterio.git"
- maintainers("adamjstewart")
-
license("BSD-3-Clause")
+ maintainers("adamjstewart")
- version("master", branch="master")
+ version("main", branch="main")
+ version("master", branch="master", deprecated=True)
+ version("1.4.3", sha256="201f05dbc7c4739dacb2c78a1cf4e09c0b7265b0a4d16ccbd1753ce4f2af350a")
+ version("1.4.2", sha256="1be35ccb4d998a4c48fa51bbee9e37927ecd9b9e954a2b2581b8f3e9bb165332")
+ version("1.4.1", sha256="d750362bb792d2311f94803ff309baec48486ecba75c9b905ea9b1f5eb06ef9f")
+ version("1.4.0", sha256="e0d2ff540a4e06016cca2fb46691a10afe71343ea998c50ad8247bb125542133")
+ version("1.3.11", sha256="47aa70b4718ebc80d825bb7db3127577d74e31c53048ce215145c0baf530ece9")
+ version("1.3.10", sha256="ce182c735b4f9e8735d90600607ecab15ef895eb8aa660bf665751529477e326")
version("1.3.9", sha256="fc6d0d290492fa1a5068711cfebb21cc936968891b7ed9da0690c8a7388885c5")
version("1.3.8", sha256="ffdd18e78efdf8ad5861065fd812a66dd34264293317ff6540a078ea891cdef8")
version("1.3.7", sha256="abfdcb8f10210b8fad939f40d545d6c47e9e3b5cf4a43773ca8dd11c58204304")
@@ -38,29 +44,47 @@ class PyRasterio(PythonPackage):
version("1.1.5", sha256="ebe75c71f9257c780615caaec8ef81fa4602702cf9290a65c213e1639284acc9")
# From pyproject.toml
- depends_on("py-setuptools@67.8:", when="@1.3.9:", type="build")
- depends_on("py-cython@0.29.29:", when="@1.3.3:", type="build")
- depends_on("py-cython@0.29.24:0.29", when="@1.3.0:1.3.2", type="build")
+ with default_args(type="build"):
+ depends_on("py-setuptools@67.8:", when="@1.3.9:")
+ depends_on("py-cython@3.0.2:3", when="@1.3.10:")
+ depends_on("py-cython@0.29.29:", when="@1.3.3:1.3.9")
+ depends_on("py-cython@0.29.24:0.29", when="@1.3.0:1.3.2")
# From setup.py
- depends_on("python@3.8:", when="@1.3:", type=("build", "link", "run"))
- depends_on("python@3.6:3.9", when="@1.2", type=("build", "link", "run"))
- depends_on("python@2.7:2.8,3.5:3.8", when="@1.1", type=("build", "link", "run"))
- depends_on("py-affine", type=("build", "run"))
- depends_on("py-attrs", type=("build", "run"))
- depends_on("py-certifi", when="@1.2:", type=("build", "run"))
- depends_on("py-click@4:", when="@1.2.4:", type=("build", "run"))
- depends_on("py-click@4:7", when="@:1.2.3", type=("build", "run"))
- depends_on("py-cligj@0.5:", type=("build", "run"))
- depends_on("py-numpy@1.18:", when="@1.3:", type=("build", "link", "run"))
- depends_on("py-numpy@1.15:", when="@1.2:", type=("build", "link", "run"))
- depends_on("py-numpy", type=("build", "link", "run"))
- depends_on("py-snuggs@1.4.1:", type=("build", "run"))
- depends_on("py-click-plugins", type=("build", "run"))
- depends_on("py-setuptools", type=("build", "run"))
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.9:", when="@1.4:")
+ depends_on("python@3.8:", when="@1.3:")
+ depends_on("python@3.6:3.9", when="@1.2")
+ depends_on("python@2.7:2.8,3.5:3.8", when="@1.1")
+
+ depends_on("py-numpy@1.24:", when="@1.4:")
+ depends_on("py-numpy@1.18:", when="@1.3:")
+ depends_on("py-numpy@1.15:", when="@1.2:")
+ depends_on("py-numpy")
+ # https://github.com/rasterio/rasterio/issues/3024
+ depends_on("py-numpy@:1", when="@:1.3.9")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-affine")
+ depends_on("py-attrs")
+ depends_on("py-certifi", when="@1.2:")
+ depends_on("py-click@4:", when="@1.2.4:")
+ depends_on("py-click@4:7", when="@:1.2.3")
+ depends_on("py-cligj@0.5:")
+ depends_on("py-importlib-metadata", when="@1.3.10: ^python@:3.9")
+ depends_on("py-click-plugins")
+ depends_on("py-pyparsing")
+
+ # Historical dependencies
+ depends_on("py-setuptools", when="@:1.3.9")
+ depends_on("py-snuggs@1.4.1:", when="@:1.3")
# From README.rst and setup.py
+ depends_on("gdal@3.5:", when="@1.4:")
depends_on("gdal@3.1:", when="@1.3:")
depends_on("gdal@2.4:3.3", when="@1.2.7:1.2")
depends_on("gdal@2.3:3.2", when="@1.2.0:1.2.6")
depends_on("gdal@1.11:3.2", when="@1.1.0:1.1")
+
+ # https://github.com/rasterio/rasterio/pull/3212
+ conflicts("^gdal@3.10:", when="@:1.4.1")
diff --git a/var/spack/repos/builtin/packages/py-ray/package.py b/var/spack/repos/builtin/packages/py-ray/package.py
index b434096c43..c79a391c49 100644
--- a/var/spack/repos/builtin/packages/py-ray/package.py
+++ b/var/spack/repos/builtin/packages/py-ray/package.py
@@ -18,6 +18,9 @@ class PyRay(PythonPackage):
version("2.0.1", sha256="b8b2f0a99d2ac4c001ff11c78b4521b217e2a02df95fb6270fd621412143f28b")
version("0.8.7", sha256="2df328f1bcd3eeb4fa33119142ea0d669396f4ab2a3e78db90178757aa61534b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("default", default=False, description="Install default extras", when="@2.0.1")
depends_on("python@3.6:3.10", when="@2.0.1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-rdflib/package.py b/var/spack/repos/builtin/packages/py-rdflib/package.py
index 4d603f27f0..62bc7d07db 100644
--- a/var/spack/repos/builtin/packages/py-rdflib/package.py
+++ b/var/spack/repos/builtin/packages/py-rdflib/package.py
@@ -23,12 +23,14 @@ class PyRdflib(PythonPackage):
license("BSD-3-Clause")
+ version("7.0.0", sha256="9995eb8569428059b8c1affd26b25eac510d64f5043d9ce8c84e0d0036e995ae")
version("6.3.2", sha256="72af591ff704f4caacea7ecc0c5a9056b8553e0489dd4f35a9bc52dbd41522e0")
version("6.2.0", sha256="62dc3c86d1712db0f55785baf8047f63731fa59b2682be03219cb89262065942")
version("6.0.2", sha256="6136ae056001474ee2aff5fc5b956e62a11c3a9c66bb0f3d9c0aaa5fbb56854e")
version("5.0.0", sha256="78149dd49d385efec3b3adfbd61c87afaf1281c30d3fcaf1b323b34f603fb155")
depends_on("python@3.7:3", when="@6.3:", type=("build", "run"))
+ depends_on("python@3.8.1:3", when="@7:", type=("build", "run"))
depends_on("py-poetry-core@1.4:", when="@6.3:", type="build")
depends_on("py-isodate@0.6", when="@6.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-reacton/package.py b/var/spack/repos/builtin/packages/py-reacton/package.py
new file mode 100644
index 0000000000..d8b14d1bb7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-reacton/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyReacton(PythonPackage):
+ """
+ A way to write reusable components in a React-like way, to make Python-based UI's using
+ the ipywidgets ecosystem (ipywidgets, ipyvolume, bqplot, threejs, leaflet, ipyvuetify, ...).
+ """
+
+ homepage = "https://reacton.solara.dev/en/latest/"
+ pypi = "reacton/reacton-1.8.2.tar.gz"
+
+ license("MIT")
+
+ maintainers("jeremyfix")
+
+ version("1.8.2", sha256="eaa4eeeffd11688d2b60a49a9895fd299f2ecbe8614f1ad61d144c56edaf7304")
+
+ depends_on("py-hatchling", type="build")
+
+ depends_on("py-ipywidgets", type=("build", "run"))
+ depends_on("py-typing-extensions@4.1.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-referencing/package.py b/var/spack/repos/builtin/packages/py-referencing/package.py
new file mode 100644
index 0000000000..cdf0fad659
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-referencing/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyReferencing(PythonPackage):
+ """JSON Referencing + Python."""
+
+ homepage = "https://referencing.readthedocs.io/"
+ pypi = "referencing/referencing-0.35.1.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.35.1", sha256="25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c")
+
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+
+ depends_on("py-attrs@22.2.0:", type=("build", "run"))
+ depends_on("py-rpds-py@0.7.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-regex/package.py b/var/spack/repos/builtin/packages/py-regex/package.py
index 57d7619b24..7f5d2c99e3 100644
--- a/var/spack/repos/builtin/packages/py-regex/package.py
+++ b/var/spack/repos/builtin/packages/py-regex/package.py
@@ -29,5 +29,7 @@ class PyRegex(PythonPackage):
"2017.07.11", sha256="dbda8bdc31a1c85445f1a1b29d04abda46e5c690f8f933a9cc3a85a358969616"
)
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@3.6:", when="@2022.8.17:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-regionmask/package.py b/var/spack/repos/builtin/packages/py-regionmask/package.py
new file mode 100644
index 0000000000..fd91af1214
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-regionmask/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyRegionmask(PythonPackage):
+ """Create masks of geospatial regions for arbitrary grids"""
+
+ homepage = "https://pypi.org/project/regionmask"
+ pypi = "regionmask/regionmask-0.12.1.tar.gz"
+ git = "https://github.com/regionmask/regionmask.git"
+
+ maintainers("climbfuji")
+
+ license("MIT", checked_by="climbfuji")
+
+ version("0.12.1", sha256="7ef1e70c6ebab7bfc6a80e13f6fe771945b8b6a31b7f8980fc88c8b8505bb854")
+
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm@7:", type="build")
+
+ depends_on("py-geopandas@0.13:", type=("build", "run"))
+ depends_on("py-numpy@1.24:", type=("build", "run"))
+ depends_on("py-packaging@23.1:", type=("build", "run"))
+ depends_on("py-pooch@1.7:", type=("build", "run"))
+ depends_on("py-rasterio@1.3:", type=("build", "run"))
+ depends_on("py-shapely@2.0:", type=("build", "run"))
+ depends_on("py-xarray@2023.7:", type=("build", "run"))
+
+ # "Optional" dependencies for plotting, but that's what this package is really useful for
+ depends_on("py-matplotlib@3.7:", type="run")
+ depends_on("py-cartopy@0.22:", type="run")
diff --git a/var/spack/repos/builtin/packages/py-reproject/package.py b/var/spack/repos/builtin/packages/py-reproject/package.py
index b4595518ce..30b2e6aeb8 100644
--- a/var/spack/repos/builtin/packages/py-reproject/package.py
+++ b/var/spack/repos/builtin/packages/py-reproject/package.py
@@ -26,6 +26,8 @@ class PyReproject(PythonPackage):
version("0.7.1", sha256="95c0fa49e6b4e36455b91fa09ad1b71b230c990ad91d948af67ea3509a1a4ccb")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm", type="build")
diff --git a/var/spack/repos/builtin/packages/py-requests-file/package.py b/var/spack/repos/builtin/packages/py-requests-file/package.py
index 3c35eb0e0f..a104a57ec1 100644
--- a/var/spack/repos/builtin/packages/py-requests-file/package.py
+++ b/var/spack/repos/builtin/packages/py-requests-file/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyRequestsFile(PythonPackage):
"""File transport adapter for Requests."""
- homepage = "http://github.com/dashea/requests-file"
+ homepage = "https://github.com/dashea/requests-file"
pypi = "requests-file/requests-file-1.5.1.tar.gz"
maintainers("LydDeb")
diff --git a/var/spack/repos/builtin/packages/py-requests-kerberos/package.py b/var/spack/repos/builtin/packages/py-requests-kerberos/package.py
new file mode 100644
index 0000000000..61c9645469
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-requests-kerberos/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyRequestsKerberos(PythonPackage):
+ """An authentication handler for using Kerberos with Python Requests."""
+
+ homepage = "https://github.com/requests/requests-kerberos"
+ pypi = "requests_kerberos/requests_kerberos-0.15.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("ISC", checked_by="wdconinc")
+
+ version("0.15.0", sha256="437512e424413d8113181d696e56694ffa4259eb9a5fc4e803926963864eaf4e")
+
+ depends_on("py-setuptools@61:", type="build")
+ depends_on("py-requests@1.1.0:", type=("build", "run"))
+ depends_on("py-cryptography@1.3:", type=("build", "run"))
+ depends_on("py-pyspnego +kerberos", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-requests/package.py b/var/spack/repos/builtin/packages/py-requests/package.py
index 4b88746a53..1ca04979ce 100644
--- a/var/spack/repos/builtin/packages/py-requests/package.py
+++ b/var/spack/repos/builtin/packages/py-requests/package.py
@@ -15,6 +15,8 @@ class PyRequests(PythonPackage):
license("Apache-2.0")
+ version("2.32.3", sha256="55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760")
+ version("2.32.2", sha256="dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289")
version("2.31.0", sha256="942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1")
version("2.28.2", sha256="98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf")
version("2.28.1", sha256="7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983")
diff --git a/var/spack/repos/builtin/packages/py-reretry/package.py b/var/spack/repos/builtin/packages/py-reretry/package.py
index 76409ffff5..cd3b566d3e 100644
--- a/var/spack/repos/builtin/packages/py-reretry/package.py
+++ b/var/spack/repos/builtin/packages/py-reretry/package.py
@@ -10,12 +10,14 @@ class PyReretry(PythonPackage):
"""Easy to use retry decorator."""
homepage = "https://github.com/leshchenko1979/reretry"
- pypi = "reretry/reretry-0.11.1.tar.gz"
+ pypi = "reretry/reretry-0.11.8.tar.gz"
maintainers("charmoniumQ")
license("Apache-2.0")
+ version("0.11.8", sha256="f2791fcebe512ea2f1d153a2874778523a8064860b591cd90afc21a8bed432e3")
version("0.11.1", sha256="4ae1840ae9e443822bb70543c485bb9c45d1d009e32bd6809f2a9f2839149f5d")
+ depends_on("python@3.7:", type=("build", "run"), when="@0.11.4:")
depends_on("py-setuptools", type="build")
- depends_on("py-pbr", type="build")
+ depends_on("py-pbr", type="build", when="@:0.11.7")
diff --git a/var/spack/repos/builtin/packages/py-resize-right/package.py b/var/spack/repos/builtin/packages/py-resize-right/package.py
new file mode 100644
index 0000000000..4e737f2d83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-resize-right/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyResizeRight(PythonPackage):
+ """This is a resizing packge for images or tensors, that supports both
+ Numpy and PyTorch (fully differentiable) seamlessly. The main motivation
+ for creating this is to address some crucial incorrectness issues (see item
+ 3 in the list below) that exist in all other resizing packages I am
+ aware of. As far as I know, it is the only one that performs correctly
+ in all cases. ResizeRight is specially made for machine learning,
+ image enhancement and restoration challenges."""
+
+ homepage = "https://github.com/assafshocher/ResizeRight"
+ pypi = "resize-right/resize-right-0.0.2.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("0.0.2", sha256="7dc35b72ce4012b77f7cc9049835163793ab98a58ab8893610fb119fe59af520")
+
+ depends_on("py-setuptools", type="build")
+ # needs py-numpy, py-torch, or both. py-numpy is lighter to install, so
+ # always use py-numpy
+ depends_on("py-numpy", type=("build", "run"))
+ # and optionally use py-torch
+ variant("torch", default=True, description="Enable py-torch")
+ depends_on("py-torch", type=("build", "run"), when="+torch")
diff --git a/var/spack/repos/builtin/packages/py-resolvelib/package.py b/var/spack/repos/builtin/packages/py-resolvelib/package.py
new file mode 100644
index 0000000000..248c829274
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-resolvelib/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyResolvelib(PythonPackage):
+ """Resolve abstract dependencies into concrete ones."""
+
+ homepage = "https://github.com/sarugaku/resolvelib"
+ pypi = "resolvelib/resolvelib-1.0.1.tar.gz"
+
+ license("ISC")
+
+ version("1.0.1", sha256="04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309")
+
+ depends_on("py-setuptools@36.2.2:", type="build")
+ depends_on("py-wheel@0.28:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-rich-argparse/package.py b/var/spack/repos/builtin/packages/py-rich-argparse/package.py
new file mode 100644
index 0000000000..efc24f7b6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-rich-argparse/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyRichArgparse(PythonPackage):
+ """rich-argparse improves the look and readability of argparse's help while
+ requiring minimal changes to the code."""
+
+ homepage = "https://github.com/hamdanal/rich-argparse"
+ pypi = "rich_argparse/rich_argparse-1.4.0.tar.gz"
+
+ version("1.4.0", sha256="c275f34ea3afe36aec6342c2a2298893104b5650528941fb53c21067276dba19")
+
+ depends_on("python@3.7:", type=("build", "run"))
+
+ depends_on("py-hatchling@1.11.0:", type="build")
+
+ depends_on("py-rich@11.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-rich/package.py b/var/spack/repos/builtin/packages/py-rich/package.py
index 51ef332d7f..fe40bdf31e 100644
--- a/var/spack/repos/builtin/packages/py-rich/package.py
+++ b/var/spack/repos/builtin/packages/py-rich/package.py
@@ -16,7 +16,9 @@ class PyRich(PythonPackage):
license("MIT")
+ version("13.7.1", sha256="9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432")
version("13.4.2", sha256="d653d6bccede5844304c605d5aac802c7cf9621efd700b46c7ec2b51ea914898")
+ version("12.6.0", sha256="ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0")
version("12.5.1", sha256="63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca")
version("10.14.0", sha256="8bfe4546d56b4131298d3a9e571a0742de342f1593770bd0d4707299f772a0af")
version("10.9.0", sha256="ba285f1c519519490034284e6a9d2e6e3f16dc7690f2de3d9140737d81304d22")
diff --git a/var/spack/repos/builtin/packages/py-rios/package.py b/var/spack/repos/builtin/packages/py-rios/package.py
index a91712e25e..7b2830201e 100644
--- a/var/spack/repos/builtin/packages/py-rios/package.py
+++ b/var/spack/repos/builtin/packages/py-rios/package.py
@@ -17,8 +17,13 @@ class PyRios(PythonPackage):
homepage = "https://www.rioshome.org/en/latest/"
url = "https://github.com/ubarsc/rios/releases/download/rios-1.4.16/rios-1.4.16.tar.gz"
+ maintainers("neilflood", "gillins")
+
license("GPL-3.0-only")
+ version("2.0.2", sha256="c5949f581fd6657e3257c69b382971ce5831a403a2edc8971b61197bdc78e5a4")
+ version("2.0.1", sha256="8b8bcbf11a45af46d25b95d9d4a402ec0466ed117b3464f4226a6a466d9687b5")
+ version("1.4.17", sha256="81007af2d0bcf2a3bf064dc2445087f8b2264c941fa66441b2b1b503168e677d")
version("1.4.16", sha256="2f553d85ff4ff26bfda2a8c6bd3d9dcce5ace847f7d9bd2f072c8943f3758ded")
version("1.4.15", sha256="71670508dbffcd8f5d24fbb25e6a2b7e1d23b5e899ddc78c90d403bd65981cf4")
version("1.4.14", sha256="ea22fde3fe70004aa1ad46bd36fad58f3346e9c161ca44ac913518a6e4fcad82")
@@ -27,10 +32,28 @@ class PyRios(PythonPackage):
version("1.4.11", sha256="b7ae5311f987b32f1afe1fabc16f25586de8d15c17a69405d1950aeada7b748e")
version("1.4.10", sha256="6324acccc6018f9e06c40370bc366dc459890e8c09d26e0ebd245f6fd46dad71")
- variant("parallel", default=True, description="Enables the parallel processing module")
+ # https://github.com/ubarsc/rios/pull/90
+ conflicts("^py-numpy@2:", when="@:2.0.1")
+
+ # In 1.4.x, parallel processing was an extra add-on
+ variant(
+ "parallel",
+ default=True,
+ when="@1.4.16:1.4",
+ description="Enables the 1.4.x parallel processing module (deprecated)",
+ )
+ # In 2.x, there is substantial concurrency always built-in, but using it
+ # across multiple machines requires an extra dependency.
+ variant(
+ "multimachine",
+ default=False,
+ when="@2:",
+ description="Enable compute worker kinds that run across multiple machines",
+ )
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("gdal+python", type=("build", "run"))
- depends_on("py-cloudpickle", type=("build", "run"), when="@1.4.16:+parallel")
+ depends_on("py-cloudpickle", type="run", when="@1.4.16:1.4+parallel")
+ depends_on("py-cloudpickle", type="run", when="@2:+multimachine")
diff --git a/var/spack/repos/builtin/packages/py-rioxarray/package.py b/var/spack/repos/builtin/packages/py-rioxarray/package.py
index 0eba71e8a7..720937c102 100644
--- a/var/spack/repos/builtin/packages/py-rioxarray/package.py
+++ b/var/spack/repos/builtin/packages/py-rioxarray/package.py
@@ -16,13 +16,30 @@ class PyRioxarray(PythonPackage):
license("Apache-2.0")
+ version("0.17.0", sha256="46c29938827fff268d497f7ae277077066fcfbac4e53132ed3d4e2b96455be62")
version(
"0.4.1.post0", sha256="f043f846724a58518f87dd3fa84acbe39e15a1fac7e64244be3d5dacac7fe62b"
)
- depends_on("python@3.7:", type=("build", "run"))
+ # interpolation variant
+ variant("interp", default=False, when="@0.17.0:", description="Enable interpolation routines")
+
depends_on("py-setuptools", type="build")
- depends_on("py-rasterio", type=("build", "run"))
- depends_on("py-scipy", type=("build", "run"))
- depends_on("py-xarray@0.17:", type=("build", "run"))
- depends_on("py-pyproj@2.2:", type=("build", "run"))
+
+ with when("@0.17.0"):
+ depends_on("python@3.10:", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"))
+ depends_on("py-rasterio@1.3:", type=("build", "run"))
+ depends_on("py-xarray@2022.3.0:", type=("build", "run"))
+ depends_on("py-pyproj@3.3:", type=("build", "run"))
+ depends_on("py-numpy@1.23:", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"), when="+interp")
+
+ with when("@0.4.1.post0"):
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-rasterio", type=("build", "run"))
+ depends_on("py-xarray@0.17:", type=("build", "run"))
+ depends_on("py-pyproj@2.2:", type=("build", "run"))
+
+ # not an optional in this version
+ depends_on("py-scipy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-river/package.py b/var/spack/repos/builtin/packages/py-river/package.py
index 02550c3dd3..973411a1dd 100644
--- a/var/spack/repos/builtin/packages/py-river/package.py
+++ b/var/spack/repos/builtin/packages/py-river/package.py
@@ -18,6 +18,8 @@ class PyRiver(PythonPackage):
version("0.13.0", sha256="9d068b7a9db32302fbd581af81315681dfe61774a5d777fb3d5982d3c3061340")
+ depends_on("c", type="build") # generated
+
# pyproject.toml
depends_on("py-cython", type="build")
depends_on("py-setuptools", type="build")
@@ -28,3 +30,6 @@ class PyRiver(PythonPackage):
depends_on("py-numpy@1.22:", type=("build", "run"))
depends_on("py-scipy@1.5:", type=("build", "run"))
depends_on("py-pandas@1.3:", type=("build", "run"))
+
+ # https://github.com/online-ml/river/pull/1632
+ depends_on("py-numpy@:1", when="@:0.21", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-rmm/package.py b/var/spack/repos/builtin/packages/py-rmm/package.py
index f5f7df552d..f5ed07409f 100644
--- a/var/spack/repos/builtin/packages/py-rmm/package.py
+++ b/var/spack/repos/builtin/packages/py-rmm/package.py
@@ -18,6 +18,8 @@ class PyRmm(PythonPackage):
version("0.15.0", sha256="599f97b95d169a90d11296814763f7e151a8a1e060ba10bc6c8f4684a5cd7972")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-roifile/package.py b/var/spack/repos/builtin/packages/py-roifile/package.py
new file mode 100644
index 0000000000..47f4600748
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-roifile/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyRoifile(PythonPackage):
+ """Roifile is a Python library to read, write, create, and plot ImageJ ROIs"""
+
+ homepage = "https://www.cgohlke.com/"
+ pypi = "roifile/roifile-2024.1.10.tar.gz"
+
+ license("BSD-3-Clause", checked_by="A-N-Other")
+
+ version("2024.1.10", sha256="8bbc05a96c0a291429214cb6829426378e89931d1a7d3ad945aa2fea5765e434")
+
+ variant("all", default=True, description="Enable TIFF support")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
+
+ depends_on("py-matplotlib", type=("build", "run"), when="+all")
+ depends_on("py-tifffile", type=("build", "run"), when="+all")
diff --git a/var/spack/repos/builtin/packages/py-rotary-embedding-torch/package.py b/var/spack/repos/builtin/packages/py-rotary-embedding-torch/package.py
new file mode 100644
index 0000000000..c307b827be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-rotary-embedding-torch/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyRotaryEmbeddingTorch(PythonPackage):
+ """A standalone library for adding rotary embeddings to transformers in Pytorch,
+ following its success as relative positional encoding. Specifically it will make
+ rotating information into any axis of a tensor easy and efficient, whether they
+ be fixed positional or learned. This library will give you state of the art
+ results for positional embedding, at little costs."""
+
+ homepage = "https://github.com/lucidrains/rotary-embedding-torch"
+ pypi = "rotary-embedding-torch/rotary-embedding-torch-0.5.3.tar.gz"
+
+ maintainers("meyersbs")
+
+ version("0.5.3", sha256="45db29b19bd7025f09d202752c26bf6921b05d8b5a977cfcdc625ce96ddf2b5c")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-beartype", type=("build", "run"))
+ depends_on("py-einops@0.7:", type=("build", "run"))
+ depends_on("py-torch@2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-rpds-py/package.py b/var/spack/repos/builtin/packages/py-rpds-py/package.py
new file mode 100644
index 0000000000..5c948bafbe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-rpds-py/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyRpdsPy(PythonPackage):
+ """Python bindings to the Rust rpds crate for persistent data structures."""
+
+ homepage = "https://rpds.readthedocs.io/"
+ pypi = "rpds_py/rpds_py-0.20.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.20.0", sha256="d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121")
+ version("0.18.1", sha256="dc48b479d540770c811fbd1eb9ba2bb66951863e448efec2e2c102625328e92f")
+
+ depends_on("rust@1.76:", when="@0.19:")
+ depends_on("py-maturin@1.0:1", type="build")
+ depends_on("py-maturin@1.2:", type="build", when="@0.20:")
diff --git a/var/spack/repos/builtin/packages/py-rsatoolbox/package.py b/var/spack/repos/builtin/packages/py-rsatoolbox/package.py
index 9c84fb749f..ef0dde2854 100644
--- a/var/spack/repos/builtin/packages/py-rsatoolbox/package.py
+++ b/var/spack/repos/builtin/packages/py-rsatoolbox/package.py
@@ -16,23 +16,27 @@ class PyRsatoolbox(PythonPackage):
license("MIT")
version("main", branch="main")
+ version("0.2.0", sha256="ecdcb50387c4b6330077ec2a3a221696078071319b8a0c32ed8128cd38da6863")
+ version("0.1.5", sha256="439839fb20e2efa0c7c975ad305df8995a509ed3426ad0384ebfff20663fd58b")
version("0.1.2", sha256="2d091cbaa33373bf9da4df5ca8d127f0e427431a3db726076090ab2d54fe1213")
version("0.1.0", sha256="245f909d31909ba896b765fa51ea019510dd690c6bb8d04b178a9c76ec36dce9")
version("0.0.5", sha256="7ede9309755a6173c26f08fd36fa436a11993c7ae0fa9fce05f38be7af0dc6eb")
version("0.0.4", sha256="84153fa4c686c95f3e83f2cb668b97b82b53dc2a565856db80aa5f8c96d09359")
version("0.0.3", sha256="9bf6e16d9feadc081f9daaaaab7ef38fc1cd64dd8ef0ccd9f74adb5fe6166649")
- depends_on("python@:3.10", when="@:0.1.2", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"), when="@0.1.5:")
+ depends_on("python@:3.10", type=("build", "run"), when="@:0.1.2")
- # version restriction from pyproject.toml cannot be concretized at the
- # moment but package also builds with older versions
+ depends_on("py-setuptools@68:", type="build", when="@0.1.5:")
depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-scm+toml@7.0", when="@0.0.5:", type="build")
- # version restriction: same as for py-setuptools
- depends_on("py-cython", when="@0.0.5:", type="build")
- depends_on("py-twine@4.0.1:4.0", when="@0.0.5:", type="build")
+ depends_on("py-setuptools-scm+toml@8.0:", type="build", when="@0.1.5:")
+ depends_on("py-setuptools-scm+toml@7.0", type="build", when="@0.0.5:0.1.4")
+ depends_on("py-cython@3", type="build", when="@0.0.5:")
+ depends_on("py-twine@4.0.1:", type="build", when="@0.1.5:")
+ depends_on("py-twine@4.0.1:4.0", type="build", when="@0.0.5:0.1.4")
depends_on("py-numpy@1.21.2:", type=("build", "run"))
+ depends_on("py-scipy@1.10.1:", type=("build", "run"), when="@0.2:")
depends_on("py-scipy", type=("build", "run"))
depends_on("py-scikit-learn", type=("build", "run"))
depends_on("py-scikit-image", type=("build", "run"))
@@ -41,10 +45,14 @@ class PyRsatoolbox(PythonPackage):
depends_on("py-h5py", type=("build", "run"))
depends_on("py-tqdm", type=("build", "run"))
depends_on("py-joblib", type=("build", "run"))
+ depends_on("py-importlib-resources@5.12:", type=("build", "run"), when="^python@:3.8")
+ depends_on("py-networkx@3:", type=("build", "run"), when="@0.2:")
+
+ conflicts("^py-matplotlib@3.9.1")
# old dependcies
- depends_on("py-coverage", when="@:0.1.1", type=("build", "run"))
- depends_on("py-petname@2.2", when="@0.0.4", type=("build", "run"))
+ depends_on("py-coverage", type=("build", "run"), when="@:0.1.1")
+ depends_on("py-petname@2.2", type=("build", "run"), when="@0.0.4")
@when("@:0.0.3")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/py-rseqc/package.py b/var/spack/repos/builtin/packages/py-rseqc/package.py
index ef39393113..4f86b692f6 100644
--- a/var/spack/repos/builtin/packages/py-rseqc/package.py
+++ b/var/spack/repos/builtin/packages/py-rseqc/package.py
@@ -11,7 +11,7 @@ class PyRseqc(PythonPackage):
comprehensively evaluate high throughput sequence data especially RNA-seq
data."""
- homepage = "http://rseqc.sourceforge.net"
+ homepage = "https://rseqc.sourceforge.net"
pypi = "RSeQC/RSeQC-2.6.4.tar.gz"
version("5.0.1", sha256="3c7d458784861af352d8da3f4f1cc8941934b37643164e9b74f929a32bd9ca80")
diff --git a/var/spack/repos/builtin/packages/py-rtree/package.py b/var/spack/repos/builtin/packages/py-rtree/package.py
index 5cc8d7601a..cff9e27399 100644
--- a/var/spack/repos/builtin/packages/py-rtree/package.py
+++ b/var/spack/repos/builtin/packages/py-rtree/package.py
@@ -10,12 +10,14 @@ class PyRtree(PythonPackage):
"""R-Tree spatial index for Python GIS."""
homepage = "https://github.com/Toblerity/rtree"
- pypi = "Rtree/Rtree-0.8.3.tar.gz"
+ pypi = "Rtree/rtree-1.3.0.tar.gz"
maintainers("adamjstewart", "hobu")
license("MIT")
+ version("1.3.0", sha256="b36e9dd2dc60ffe3d02e367242d2c26f7281b00e1aaf0c39590442edaaadd916")
+ version("1.2.0", sha256="f5145f7852bf7f95c126fb16bf1a4c2ca9300ae151b07f8a0f7083ea47912675")
version("1.1.0", sha256="6f8ee504dde5d005b25b08aaf5be0b3404af3ad5fece6e1ddcde35908a798a95")
version("1.0.1", sha256="222121699c303a64065d849bf7038b1ecabc37b65c7fa340bedb38ef0e805429")
version("1.0.0", sha256="d0483482121346b093b9a42518d40f921adf445915b7aea307eb26768c839682")
@@ -29,6 +31,13 @@ class PyRtree(PythonPackage):
depends_on("py-typing-extensions@3.7:", when="@1: ^python@:3.7", type=("build", "run"))
depends_on("libspatialindex@1.8.5:")
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/R/Rtree/{}-{}.tar.gz"
+ name = "Rtree"
+ if version >= Version("1.3.0"):
+ name = name.lower()
+ return url.format(name, version)
+
def setup_build_environment(self, env):
env.set("SPATIALINDEX_C_LIBRARY", self.spec["libspatialindex"].libs[0])
diff --git a/var/spack/repos/builtin/packages/py-ruamel-ordereddict/package.py b/var/spack/repos/builtin/packages/py-ruamel-ordereddict/package.py
index b29f6a1441..6d1916affa 100644
--- a/var/spack/repos/builtin/packages/py-ruamel-ordereddict/package.py
+++ b/var/spack/repos/builtin/packages/py-ruamel-ordereddict/package.py
@@ -21,4 +21,6 @@ class PyRuamelOrdereddict(PythonPackage):
version("0.4.14", sha256="281051d26eb2b18ef3d920e1e260716a52bd058a6b1a2f324102fc6a15cb8d4a")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py b/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py
index c9fc6572a0..9f1ec1844a 100644
--- a/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py
+++ b/var/spack/repos/builtin/packages/py-ruamel-yaml-clib/package.py
@@ -8,24 +8,32 @@ from spack.package import *
class PyRuamelYamlClib(PythonPackage):
- """C version of reader, parser and emitter for ruamel.yaml derived from
- libyaml."""
+ """C version of reader, parser and emitter for ruamel.yaml derived from libyaml."""
homepage = "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree/"
pypi = "ruamel.yaml.clib/ruamel.yaml.clib-0.2.0.tar.gz"
license("MIT")
+ version("0.2.12", sha256="6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f")
version("0.2.7", sha256="1f08fd5a2bea9c4180db71678e850b995d2a5f4537be0e94557668cf0f5f9497")
version("0.2.0", sha256="b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c")
- depends_on("python", type=("build", "link", "run"))
- # to prevent legacy-install-failure
- depends_on("python@:3.9", when="@0.2.0", type=("build", "link", "run"))
- depends_on("py-setuptools@28.7.0:", type="build")
+ depends_on("c", type="build")
+
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:0.2.8")
+ depends_on("python@:3.11", when="@:0.2.7")
+ depends_on("python@:3.10", when="@:0.2.6")
+ depends_on("python@:3.9", when="@:0.2.4")
+ depends_on("python@:3.8", when="@:0.2.0")
+
+ depends_on("py-setuptools", type="build")
def flag_handler(self, name, flags):
if name == "cflags":
- if self.spec.satisfies("%oneapi"):
+ if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"):
flags.append("-Wno-error=incompatible-function-pointer-types")
return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/py-rucio-clients/package.py b/var/spack/repos/builtin/packages/py-rucio-clients/package.py
new file mode 100644
index 0000000000..efda0e4bf4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-rucio-clients/package.py
@@ -0,0 +1,47 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyRucioClients(PythonPackage):
+ """Rucio Client Lite Package"""
+
+ homepage = "https://rucio.cern.ch/"
+ pypi = "rucio_clients/rucio_clients-35.4.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("35.4.0", sha256="f8771ee39d0d496109586ddbb4000ce006a193fd33cdac8a654661ae0b7346c0")
+
+ variant("ssh", default=False, description="Enable SSH2 protocol library")
+ variant("kerberos", default=False, description="Enable kerberos authentication")
+ variant("swift", default=False, description="Enable support for swift service")
+ variant("argcomplete", default=False, description="Enable bash tab completion for argparse")
+ variant("dumper", default=False, description="Enable file type identification using libmagic")
+
+ # requirements/requirements.client.txt
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-requests@2.32.2:", type=("build", "run"))
+ depends_on("py-urllib3@1.26.18:", type=("build", "run"))
+ depends_on("py-dogpile-cache@1.2.2:", type=("build", "run"))
+ depends_on("py-tabulate@0.9.0:", type=("build", "run"))
+ depends_on("py-jsonschema@4.20.0:", type=("build", "run"))
+
+ with when("+ssh"):
+ depends_on("py-paramiko@3.4.0:")
+ with when("+kerberos"):
+ depends_on("py-kerberos@1.3.1:")
+ depends_on("py-pykerberos@1.2.4:")
+ depends_on("py-requests-kerberos@0.14.0:")
+ with when("+swift"):
+ depends_on("py-python-swiftclient@4.4.0:")
+ with when("+argcomplete"):
+ depends_on("py-argcomplete@3.1.6:")
+ with when("+dumper"):
+ depends_on("py-python-magic@0.4.27:")
diff --git a/var/spack/repos/builtin/packages/py-ruff/package.py b/var/spack/repos/builtin/packages/py-ruff/package.py
index 2237111452..33c9ef094c 100644
--- a/var/spack/repos/builtin/packages/py-ruff/package.py
+++ b/var/spack/repos/builtin/packages/py-ruff/package.py
@@ -7,19 +7,29 @@ from spack.package import *
class PyRuff(PythonPackage):
- """An extremely fast Python linter, written in Rust."""
+ """An extremely fast Python linter and code formatter, written in Rust."""
- homepage = "https://beta.ruff.rs/docs"
+ homepage = "https://docs.astral.sh/ruff"
pypi = "ruff/ruff-0.0.276.tar.gz"
git = "https://github.com/astral-sh/ruff.git"
license("MIT")
-
+ maintainers("adamjstewart")
+
+ version("0.8.1", sha256="3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f")
+ version("0.8.0", sha256="a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44")
+ version("0.6.5", sha256="4d32d87fab433c0cf285c3683dd4dae63be05fd7a1d65b3f5bf7cdd05a6b96fb")
+ version("0.5.7", sha256="8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5")
+ version("0.4.5", sha256="286eabd47e7d4d521d199cab84deca135557e6d1e0f0d01c29e757c3cb151b54")
+ version("0.4.0", sha256="7457308d9ebf00d6a1c9a26aa755e477787a636c90b823f91cd7d4bea9e89260")
+ version("0.3.7", sha256="d5c1aebee5162c2226784800ae031f660c350e7a3402c4d1f8ea4e97e232e3ba")
+ version("0.3.0", sha256="0886184ba2618d815067cf43e005388967b67ab9c80df52b32ec1152ab49f53a")
version("0.1.6", sha256="1b09f29b16c6ead5ea6b097ef2764b42372aebe363722f1605ecbcd2b9207184")
- version("0.0.276", sha256="d456c86eb6ce9225507f24fcc7bf72fa031bb7cc750023310e62889bf4ad4b6a")
- depends_on("py-maturin@1", type="build")
+ with default_args(type="build"):
+ depends_on("py-maturin@1")
- # Found in Cargo.toml
- depends_on("rust@1.71:", when="@0.1.6:", type="build")
- depends_on("rust@1.70:", when="@0.0.276:", type="build")
+ # Found in Cargo.toml
+ depends_on("rust@1.80:", when="@0.7.1:")
+ depends_on("rust@1.76:", when="@0.5.6:")
+ depends_on("rust@1.71:")
diff --git a/var/spack/repos/builtin/packages/py-rustworkx/package.py b/var/spack/repos/builtin/packages/py-rustworkx/package.py
index 314e7a153a..0e9c7515fc 100644
--- a/var/spack/repos/builtin/packages/py-rustworkx/package.py
+++ b/var/spack/repos/builtin/packages/py-rustworkx/package.py
@@ -20,7 +20,16 @@ class PyRustworkx(PythonPackage):
license("Apache-2.0")
+ version("0.15.1", sha256="0e0cc86599f979285b2ab9c357276f3272f3fcb3b2df5651a6bf9704c570d4c1")
+ version("0.15.0", sha256="41a50586c48367c80eebc26809105c0c47db47b1d12a5078efa94d8d1f3850a4")
+ version("0.14.2", sha256="bd649322c0649b71fa18cc70a9af027b549560415fa860d6894736029c277b13")
+ version("0.14.1", sha256="62104ecb0b3d4c2cfdb8b45dc38646bd45760c43fabc70ded9112712d01ea1c9")
+ version("0.14.0", sha256="d630e3dd2984bb3dfa1cc9af5d960c3b970a5c0512551d8340996e9e61e2ca44")
+ version("0.13.2", sha256="0276cf0b989211859e8797b67d4c16ed6ac9eb32edb67e0a47e70d7d71e80574")
+ version("0.13.1", sha256="e76c67896030c9edd9823c2937ac6bfa1ce58bae580a8214596b687b6011a487")
+ version("0.13.0", sha256="9d42059f57a9794c9cbe1c9fc3bca3b72ab00f9d8f24a0efb5ac3829c7f7d6b8")
version("0.12.1", sha256="13a19a2f64dff086b3bffffb294c4630100ecbc13634b4995d9d36a481ae130e")
+ version("0.12.0", sha256="0b871e1463a6677d0fd2fc00adfb774283045d38740bd1b7ea5a1a729de06aa1")
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-rx/package.py b/var/spack/repos/builtin/packages/py-rx/package.py
index 206b2387cf..565f22c630 100644
--- a/var/spack/repos/builtin/packages/py-rx/package.py
+++ b/var/spack/repos/builtin/packages/py-rx/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyRx(PythonPackage):
"""Reactive Extensions (Rx) for Python"""
- homepage = "http://reactivex.io/"
+ homepage = "https://reactivex.io/"
pypi = "Rx/Rx-3.2.0.tar.gz"
maintainers("dorton21")
diff --git a/var/spack/repos/builtin/packages/py-s3fs/package.py b/var/spack/repos/builtin/packages/py-s3fs/package.py
index 12a5c3d784..371b416f79 100644
--- a/var/spack/repos/builtin/packages/py-s3fs/package.py
+++ b/var/spack/repos/builtin/packages/py-s3fs/package.py
@@ -15,12 +15,15 @@ class PyS3fs(PythonPackage):
license("BSD-3-Clause")
+ version("2024.2.0", sha256="f8064f522ad088b56b043047c825734847c0269df19f2613c956d4c20de15b62")
version("2022.11.0", sha256="10c5ac283a4f5b67ffad6d1f25ff7ee026142750c5c5dc868746cd904f617c33")
version("0.5.2", sha256="87e5210415db17b9de18c77bcfc4a301570cc9030ee112b77dc47ab82426bae1")
depends_on("py-setuptools", type="build")
- depends_on("py-aiobotocore@2.4", when="@2022:", type=("build", "run"))
+ depends_on("py-aiobotocore@2.5.4:2", when="@2024:", type=("build", "run"))
+ depends_on("py-aiobotocore@2.4", when="@2022", type=("build", "run"))
depends_on("py-aiobotocore@1.0.1:", when="@:0", type=("build", "run"))
+ depends_on("py-fsspec@2024.2.0", when="@2024.2.0", type=("build", "run"))
depends_on("py-fsspec@2022.11.0", when="@2022.11.0", type=("build", "run"))
depends_on("py-fsspec@0.8.0:", when="@0", type=("build", "run"))
depends_on("py-aiohttp", when="@2022:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-s3transfer/package.py b/var/spack/repos/builtin/packages/py-s3transfer/package.py
index 742340122a..27359867f3 100644
--- a/var/spack/repos/builtin/packages/py-s3transfer/package.py
+++ b/var/spack/repos/builtin/packages/py-s3transfer/package.py
@@ -12,13 +12,13 @@ class PyS3transfer(PythonPackage):
homepage = "https://github.com/boto/s3transfer"
pypi = "s3transfer/s3transfer-0.2.1.tar.gz"
- depends_on("python@3.7:", when="@0.6.0:", type=("build", "run"))
- depends_on("python@3.6:", when="@0.5.0:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.6:", when="@0.4.2", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", when="@0.3.4", type=("build", "run"))
-
license("Apache-2.0")
+ version("0.10.0", sha256="d0c8bbf672d5eebbe4e57945e23b972d963f07d82f661cabf678a5c88831595b")
+ version("0.9.0", sha256="9e1b186ec8bb5907a1e82b51237091889a9973a2bb799a924bcd9f301ff79d3d")
+ version("0.8.2", sha256="368ac6876a9e9ed91f6bc86581e319be08188dc60d50e0d56308ed5765446283")
+ version("0.7.0", sha256="fd3889a66f5fe17299fe75b82eae6cf722554edca744ca5d5fe308b104883d2e")
+ version("0.6.2", sha256="cab66d3380cca3e70939ef2255d01cd8aece6a4907a9528740f668c4b0611861")
version("0.6.0", sha256="2ed07d3866f523cc561bf4a00fc5535827981b117dd7876f036b0c1aca42c947")
version("0.5.0", sha256="50ed823e1dc5868ad40c8dc92072f757aa0e653a192845c94a3b676f4a62da4c")
version("0.4.2", sha256="cb022f4b16551edebbb31a377d3f09600dbada7363d8c5db7976e7f47732e1b2")
@@ -26,4 +26,7 @@ class PyS3transfer(PythonPackage):
version("0.2.1", sha256="6efc926738a3cd576c2a79725fed9afde92378aa5c6a957e3af010cb019fac9d")
depends_on("py-setuptools", type="build")
+
+ depends_on("py-botocore@1.33.2:1", type=("build", "run"), when="@0.8.1:")
+ depends_on("py-botocore@1.32.7:1", type=("build", "run"), when="@0.8.0:")
depends_on("py-botocore@1.12.36:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-safetensors/package.py b/var/spack/repos/builtin/packages/py-safetensors/package.py
index 70df04cecc..741a8d8ba4 100644
--- a/var/spack/repos/builtin/packages/py-safetensors/package.py
+++ b/var/spack/repos/builtin/packages/py-safetensors/package.py
@@ -12,7 +12,12 @@ class PySafetensors(PythonPackage):
homepage = "https://github.com/huggingface/safetensors"
pypi = "safetensors/safetensors-0.3.1.tar.gz"
+ version("0.4.5", sha256="d73de19682deabb02524b3d5d1f8b3aaba94c72f1bbfc7911b9b9d5d391c0310")
+ version("0.4.3", sha256="2f85fc50c4e07a21e95c24e07460fe6f7e2859d0ce88092838352b798ce711c2")
version("0.3.1", sha256="571da56ff8d0bec8ae54923b621cda98d36dcef10feb36fd492c4d0c2cd0e869")
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools-rust", type="build")
+ # Based on PyPI wheel availability
+ depends_on("python@:3.12", when="@:0.4.3", type=("build", "run"))
+ depends_on("py-maturin@1", type="build", when="@0.4.3:")
+ depends_on("py-setuptools", when="@0.3.1", type="build")
+ depends_on("py-setuptools-rust", when="@0.3.1", type="build")
diff --git a/var/spack/repos/builtin/packages/py-scandir/package.py b/var/spack/repos/builtin/packages/py-scandir/package.py
index fe1b75317b..df09535c75 100644
--- a/var/spack/repos/builtin/packages/py-scandir/package.py
+++ b/var/spack/repos/builtin/packages/py-scandir/package.py
@@ -18,4 +18,6 @@ class PyScandir(PythonPackage):
version("1.9.0", sha256="44975e209c4827fc18a3486f257154d34ec6eaec0f90fef0cca1caa482db7064")
version("1.6", sha256="e0278a2d4bc6c0569aedbe66bf26c8ab5b2b08378b3289de49257f23ac624338")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-schema/package.py b/var/spack/repos/builtin/packages/py-schema/package.py
index cce05b7730..ae66aa9aaf 100644
--- a/var/spack/repos/builtin/packages/py-schema/package.py
+++ b/var/spack/repos/builtin/packages/py-schema/package.py
@@ -14,7 +14,10 @@ class PySchema(PythonPackage):
license("MIT")
+ version("0.7.7", sha256="7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807")
version("0.7.5", sha256="f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197")
depends_on("py-setuptools", type="build")
- depends_on("py-contextlib2@0.5.5:", type=("build", "run"))
+
+ depends_on("py-contextlib2@0.5.5:", type=("build", "run"), when="@:0.7.5")
+ depends_on("py-contextlib2@0.5.5:", type=("build", "run"), when="^python@:3.2")
diff --git a/var/spack/repos/builtin/packages/py-scientificpython/package.py b/var/spack/repos/builtin/packages/py-scientificpython/package.py
index 14e3de34e3..c5bbdea26e 100644
--- a/var/spack/repos/builtin/packages/py-scientificpython/package.py
+++ b/var/spack/repos/builtin/packages/py-scientificpython/package.py
@@ -19,6 +19,8 @@ class PyScientificpython(PythonPackage):
version("2.8.1", sha256="d9ef354736410bbb2e8be33cb7433cf62114307a44e3a96baaa793b58b4b518b")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-scikit-build-core/package.py b/var/spack/repos/builtin/packages/py-scikit-build-core/package.py
index fbe3ed1712..f680202bcd 100644
--- a/var/spack/repos/builtin/packages/py-scikit-build-core/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-build-core/package.py
@@ -19,10 +19,18 @@ class PyScikitBuildCore(PythonPackage):
license("Apache-2.0")
+ version("0.10.7", sha256="04cbb59fe795202a7eeede1849112ee9dcbf3469feebd9b8b36aa541336ac4f8")
+ version("0.9.5", sha256="2a4cb119cc968fe87ae05582979657cc0e7be45655798446eabbe490e61ce072")
+ version("0.8.2", sha256="50ec24b9568c9aa6e27233deeb2978932bc79856212b30575cbfa4049655c436")
+ version("0.7.1", sha256="565f33e15f5aa4514248c508ce3ce40fb6f406f8c3983e891561757b1c9f78ab")
version("0.6.1", sha256="392254a4ca7235c27a4be98cc24cd708f563171961ce37cff66120ebfda20b7a")
version("0.6.0", sha256="1bea5ed83610b367f3446badd996f2356690548188d6d38e5b93152df311a7ae")
version("0.2.0", sha256="d2a76d9447a412038dc5e25dd259b03c25278661a0c7c3da766bb971c1a9acd2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("pyproject", default=False, description="Enable pyproject.toml support")
depends_on("python@3.7:", type=("build", "run"))
@@ -32,29 +40,44 @@ class PyScikitBuildCore(PythonPackage):
depends_on("py-hatch-vcs", type="build")
# Dependencies
+ depends_on("py-exceptiongroup@1:", when="@0.9: ^python@:3.10", type=("build", "run"))
depends_on("py-exceptiongroup", when="^python@:3.10", type=("build", "run"))
+ depends_on("py-importlib-metadata@1:", when="@0.9: ^python@:3.7")
depends_on("py-importlib-metadata", when="@0.3.0: ^python@:3.7")
depends_on("py-importlib-resources@1.3:", when="^python@:3.8", type=("build", "run"))
+ depends_on("py-packaging@21.3:", type=("build", "run"), when="@0.9:")
depends_on("py-packaging@20.9:", type=("build", "run"))
+ depends_on("py-pathspec@0.10.1:", type=("build", "run"), when="@0.9:")
+ depends_on("py-tomli@1.2.2:", when="@0.9: ^python@:3.10", type=("build", "run"))
depends_on("py-tomli@1.1:", when="^python@:3.10", type=("build", "run"))
- depends_on("py-typing-extensions@3.10:", when="^python@:3.7", type=("build", "run"))
+ depends_on("py-typing-extensions@3.10:", when="@0.8: ^python@:3.8", type=("build", "run"))
+ depends_on("py-typing-extensions@3.10:", when="@:0.7 ^python@:3.7", type=("build", "run"))
depends_on("cmake@3.15:", type=("build", "run"))
# Optional dependencies
- depends_on("py-pyproject-metadata@0.5:", when="+pyproject", type=("build", "run"))
- depends_on("py-pathspec@0.10.1:", when="+pyproject", type=("build", "run"))
+ depends_on("py-pyproject-metadata@0.5:", when="@:0.8 +pyproject", type=("build", "run"))
+ depends_on("py-pathspec@0.10.1:", when="@:0.8 +pyproject", type=("build", "run"))
# Test dependencies
- depends_on("py-build +virtualenv", type="test")
+ depends_on("py-build@0.8:", when="@0.9:", type="test")
+ depends_on("py-build +virtualenv", when="@:0.8", type="test")
depends_on("py-cattrs@22.2:", type="test")
depends_on("py-importlib-metadata", when="^python@:3.7", type="test")
- depends_on("py-pathspec@0.10.1:", type="test")
+ depends_on("py-pybind11@2.12:", when="@0.9:", type="test")
+ depends_on("py-pathspec@0.10.1:", when="@:0.8", type="test")
+ depends_on("py-pybind11@2.12:", when="@0.9:", type="test")
depends_on("py-pybind11", type="test")
- depends_on("py-pyproject-metadata@0.5:", type="test")
+ depends_on("py-pyproject-metadata@0.5:", when="@:0.8", type="test")
depends_on("py-pytest@7:", type="test")
depends_on("py-pytest-subprocess@1.5:", type="test")
+ depends_on("py-setuptools@43:", when="@0.9: ^python@:3.8", type="test")
+ depends_on("py-setuptools@45:", when="@0.9: ^python@3.9", type="test")
+ depends_on("py-setuptools@49:", when="@0.9: ^python@3.10:3.11", type="test")
+ depends_on("py-setuptools@66.1:", when="@0.9: ^python@3.12:", type="test")
+ depends_on("py-virtualenv@20.0.28:", when="@0.9:", type="test")
depends_on("py-setuptools", type="test")
depends_on("py-virtualenv", when="@0.6:", type="test")
+ depends_on("py-wheel@0.40:", when="@0.9:", type="test")
depends_on("py-wheel", type="test")
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/py-scikit-build/package.py b/var/spack/repos/builtin/packages/py-scikit-build/package.py
index e1396d17e9..1965141616 100644
--- a/var/spack/repos/builtin/packages/py-scikit-build/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-build/package.py
@@ -28,6 +28,9 @@ class PyScikitBuild(PythonPackage):
version("0.11.1", sha256="da40dfd69b2456fad1349a894b90180b43712152b8a85d2a00f4ae2ce8ac9a5c")
version("0.10.0", sha256="7342017cc82dd6178e3b19377389b8a8d1f8b429d9cdb315cfb1094e34a0f526")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-hatchling", when="@0.17:", type="build")
depends_on("py-hatch-fancy-pypi-readme", when="@0.17:", type="build")
depends_on("py-hatch-vcs", when="@0.17:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-scikit-fmm/package.py b/var/spack/repos/builtin/packages/py-scikit-fmm/package.py
index e97e8d4489..d412207954 100644
--- a/var/spack/repos/builtin/packages/py-scikit-fmm/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-fmm/package.py
@@ -20,5 +20,7 @@ class PyScikitFmm(PythonPackage):
version("master", branch="master")
version("2019.1.30", sha256="eb64b6d8e30b8df8f8636d5fc4fd7ca6a9b05938ccd62518c80c1d9e823069dd")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-numpy@1.0.2:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
index 038b62b85b..9f78e611bc 100644
--- a/var/spack/repos/builtin/packages/py-scikit-image/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -14,6 +14,9 @@ class PyScikitImage(PythonPackage):
pypi = "scikit-image/scikit_image-0.17.2.tar.gz"
git = "https://github.com/scikit-image/scikit-image.git"
+ maintainers("adamjstewart")
+ license("BSD-3-Clause")
+
skip_modules = [
# Requires pytest
"skimage.filters.rank.tests",
@@ -21,6 +24,12 @@ class PyScikitImage(PythonPackage):
"skimage.future.graph",
]
+ version("0.24.0", sha256="5d16efe95da8edbeb363e0c4157b99becbd650a60b77f6e3af5768b66cf007ab")
+ version("0.23.2", sha256="c9da4b2c3117e3e30364a3d14496ee5c72b09eb1a4ab1292b302416faa360590")
+ version("0.23.1", sha256="4ff756161821568ed56523f1c4ab9094962ba79e817a9a8e818d9f51d223d669")
+ version("0.23.0", sha256="f412b79c6cdf4371a7332cfc769bd62440a7e1375e8e7da171d67965d0156d48")
+ version("0.22.0", sha256="018d734df1d2da2719087d15f679d19285fce97cd37695103deadfaef2873236")
+ version("0.21.0", sha256="b33e823c54e6f11873ea390ee49ef832b82b9f70752c8759efd09d5a4e3d87f0")
version("0.20.0", sha256="2cd784fce18bd31d71ade62c6221440199ead03acf7544086261ee032264cf61")
version("0.19.3", sha256="24b5367de1762da6ee126dd8f30cc4e7efda474e0d7d70685433f0e3aa2ec450")
version("0.18.3", sha256="ecae99f93f4c5e9b1bf34959f4dc596c41f2f6b2fc407d9d9ddf85aebd3137ca")
@@ -29,6 +38,9 @@ class PyScikitImage(PythonPackage):
version("0.14.2", sha256="1afd0b84eefd77afd1071c5c1c402553d67be2d7db8950b32d6f773f25850c1f")
version("0.12.3", sha256="82da192f0e524701e89c5379c79200bc6dc21373f48bf7778a864c583897d7c7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Get dependencies for:
#
# @0.20: from pyproject.toml
@@ -36,67 +48,94 @@ class PyScikitImage(PythonPackage):
# @0.14:0.17 from requirements/build.txt, requirements/default.txt
# @:0.13 from requirements.txt, DEPENDS.txt
- depends_on("python@3.8:", when="@0.20:", type=("build", "link", "run"))
-
- depends_on("py-numpy@1.21.1:", when="@0.20:", type=("build", "link", "run"))
- depends_on("py-numpy@1.17,1.18.1:", when="@0.19", type=("build", "link", "run"))
- depends_on("py-numpy@1.16.5:1.17,1.18.1:", when="@0.18", type=("build", "link", "run"))
- depends_on("py-numpy@1.15.1:1.17,1.18.1:", when="@0.17", type=("build", "link", "run"))
- depends_on("py-numpy@1.14.1:", when="@0.16", type=("build", "link", "run"))
- depends_on("py-numpy@1.11:", when="@0.13:0.15", type=("build", "link", "run"))
- depends_on("py-numpy@1.7.2:", when="@:0.12", type=("build", "run"))
- depends_on("py-scipy@1.8:", when="@0.20:", type=("build", "run"))
- depends_on("py-scipy@1.4.1:", when="@0.19:", type=("build", "run"))
- depends_on("py-scipy@1.0.1:", when="@0.17:", type=("build", "run"))
- depends_on("py-scipy@0.19:", when="@0.16:", type=("build", "run"))
- depends_on("py-scipy@0.17:", when="@0.13:", type=("build", "run"))
- depends_on("py-scipy@0.9:", type=("build", "run"))
- depends_on("py-networkx@2.8:", when="@0.20:", type=("build", "run"))
- depends_on("py-networkx@2.2:", when="@0.19:", type=("build", "run"))
- depends_on("py-networkx@2:", when="@0.15:", type=("build", "run"))
- depends_on("py-networkx@1.8:", type=("build", "run"))
- depends_on("pil@9.0.1:", when="@0.20:", type=("build", "run"))
- depends_on("pil@6.1:7.0,7.1.2:8.2,8.3.1:", when="@0.19:", type=("build", "run"))
- depends_on("pil@4.3:7.0,7.1.2:", when="@0.17:", type=("build", "run"))
- depends_on("pil@4.3:", when="@0.14:", type=("build", "run"))
- depends_on("pil@2.1:", type=("build", "run"))
- depends_on("py-imageio@2.4.1:", when="@0.19:", type=("build", "run"))
- depends_on("py-imageio@2.3:", when="@0.16:", type=("build", "run"))
- depends_on("py-imageio@2.0.1:", when="@0.15:", type=("build", "run"))
- depends_on("py-tifffile@2019.7.26:", when="@0.17:", type=("build", "run"))
- depends_on("py-pywavelets@1.1.1:", when="@0.17:", type=("build", "run"))
- depends_on("py-pywavelets@0.4:", when="@0.13:", type=("build", "run"))
- depends_on("py-packaging@20:", when="@0.19:", type=("build", "run"))
- depends_on("py-lazy-loader@0.1:", when="@0.20:", type=("build", "run"))
-
- depends_on("py-meson-python@0.13:", when="@0.20:", type="build")
- depends_on("py-setuptools@67:", when="@0.20:", type="build")
- depends_on("py-setuptools@:59.4", when="@0.19.1:0.19", type="build")
- depends_on("py-setuptools@51:", when="@0.18:", type="build")
- depends_on("py-setuptools", type="build")
- depends_on("py-cython@0.29.24:", when="@0.20:", type="build")
- depends_on("py-cython@0.29.24:2", when="@0.19", type="build")
- depends_on("py-cython@0.29.21:", when="@0.18", type="build")
- depends_on("py-cython@0.29.13:", when="@0.17", type="build")
- depends_on("py-cython@0.25:0.28.1,0.28.3:0.28,0.29.1:", when="@0.15:0.16", type="build")
- depends_on("py-cython@0.23.4:0.28.1,0.28.3:0.28,0.29.1:", when="@0.14.3:0.14", type="build")
- depends_on("py-cython@0.23.4:0.28.1", when="@0.14.2", type="build")
- depends_on("py-cython@0.23.4:", when="@0.14.1", type="build")
- depends_on("py-cython@0.21:", when="@0.12", type="build")
- depends_on("py-pythran", when="@0.19:", type="build")
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@0.23")
+ depends_on("python@3.9:", when="@0.22:")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-numpy@1.23:", when="@0.23:")
+ depends_on("py-numpy@1.22:", when="@0.22:")
+ depends_on("py-numpy@1.21.1:", when="@0.20:")
+ depends_on("py-numpy@1.17,1.18.1:", when="@0.19")
+ depends_on("py-numpy@1.16.5:1.17,1.18.1:", when="@0.18")
+ depends_on("py-numpy@1.15.1:1.17,1.18.1:", when="@0.17")
+ depends_on("py-numpy@1.14.1:", when="@0.16")
+ depends_on("py-numpy@1.11:", when="@0.13:0.15")
+ depends_on("py-numpy@1.7.2:", when="@:0.12")
+ # https://github.com/scikit-image/scikit-image/issues/7282
+ depends_on("py-numpy@:1", when="@:0.23.0")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-scipy@1.9:", when="@0.23:")
+ depends_on("py-scipy@1.8:", when="@0.20:")
+ depends_on("py-scipy@1.4.1:", when="@0.19:")
+ depends_on("py-scipy@1.0.1:", when="@0.17:")
+ depends_on("py-scipy@0.19:", when="@0.16:")
+ depends_on("py-scipy@0.17:", when="@0.13:")
+ depends_on("py-scipy@0.9:")
+ depends_on("py-networkx@2.8:", when="@0.20:")
+ depends_on("py-networkx@2.2:", when="@0.19:")
+ depends_on("py-networkx@2:", when="@0.15:")
+ depends_on("py-networkx@1.8:")
+ depends_on("pil@9.1:", when="@0.23:")
+ depends_on("pil@9.0.1:", when="@0.20:")
+ depends_on("pil@6.1:7.0,7.1.2:8.2,8.3.1:", when="@0.19:")
+ depends_on("pil@4.3:7.0,7.1.2:", when="@0.17:")
+ depends_on("pil@4.3:", when="@0.14:")
+ depends_on("pil@2.1:")
+ depends_on("py-imageio@2.33:", when="@0.23:")
+ depends_on("py-imageio@2.27:", when="@0.21:")
+ depends_on("py-imageio@2.4.1:", when="@0.19:")
+ depends_on("py-imageio@2.3:", when="@0.16:")
+ depends_on("py-imageio@2.0.1:", when="@0.15:")
+ depends_on("py-tifffile@2022.8.12:", when="@0.21:")
+ depends_on("py-tifffile@2019.7.26:", when="@0.17:")
+ depends_on("py-packaging@21:", when="@0.21:")
+ depends_on("py-packaging@20:", when="@0.19:")
+ depends_on("py-lazy-loader@0.4:", when="@0.23:")
+ depends_on("py-lazy-loader@0.3:", when="@0.22:")
+ depends_on("py-lazy-loader@0.2:", when="@0.21:")
+ depends_on("py-lazy-loader@0.1:", when="@0.20:")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python@0.15:", when="@0.23:")
+ depends_on("py-meson-python@0.14:", when="@0.22:")
+ depends_on("py-meson-python@0.13:", when="@0.20:")
+ depends_on("py-setuptools@67:", when="@0.20:")
+ depends_on("py-setuptools@:59.4", when="@0.19.1:0.19")
+ depends_on("py-setuptools@51:", when="@0.18:")
+ depends_on("py-setuptools")
+ depends_on("ninja", when="@0.20:")
+ depends_on("py-cython@3.0.4:", when="@0.23:")
+ depends_on("py-cython@0.29.32:", when="@0.21:")
+ depends_on("py-cython@0.29.24:", when="@0.20:")
+ depends_on("py-cython@0.29.24:2", when="@0.19")
+ depends_on("py-cython@0.29.21:", when="@0.18")
+ depends_on("py-cython@0.29.13:", when="@0.17")
+ depends_on("py-cython@0.25:0.28.1,0.28.3:0.28,0.29.1:", when="@0.15:0.16")
+ depends_on("py-cython@0.23.4:0.28.1,0.28.3:0.28,0.29.1:", when="@0.14.3:0.14")
+ depends_on("py-cython@0.23.4:0.28.1", when="@0.14.2")
+ depends_on("py-cython@0.23.4:", when="@0.14.1")
+ depends_on("py-cython@0.21:", when="@0.12")
+ depends_on("py-pythran", when="@0.19:")
# dependencies for old versions
- depends_on("py-numpydoc@0.6:", when="@0.13.0:0.13", type="build")
- depends_on("py-matplotlib@2.0:2,3.0.1:", when="@0.15:0.18", type=("build", "run"))
- depends_on("py-matplotlib@2:", when="@0.14:0.18", type=("build", "run"))
- depends_on("py-matplotlib@1.3.1:", when="@:0.18", type=("build", "run"))
- depends_on("py-six@1.10:", when="@0.14.0:0.14", type=("build", "run"))
- depends_on("py-six@1.7.3:", when="@:0.14", type=("build", "run"))
- depends_on("py-pooch@0.5.2:", when="@0.17.0:0.17.1", type=("build", "run"))
- depends_on("py-dask+array@1:", when="@0.14.2", type=("build", "run"))
- depends_on("py-dask+array@0.9:", when="@0.14.0:0.14.1", type=("build", "run"))
- depends_on("py-dask+array@0.5:", when="@:0.13", type=("build", "run"))
- depends_on("py-cloudpickle@0.2.1:", when="@0.14.0:0.14", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-numpydoc@0.6:", when="@0.13.0:0.13")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-pywavelets@1.1.1:", when="@0.17:0.21")
+ depends_on("py-pywavelets@0.4:", when="@0.13:0.16")
+ depends_on("py-matplotlib@2.0:2,3.0.1:", when="@0.15:0.18")
+ depends_on("py-matplotlib@2:", when="@0.14:0.18")
+ depends_on("py-matplotlib@1.3.1:", when="@:0.18")
+ depends_on("py-six@1.10:", when="@0.14.0:0.14")
+ depends_on("py-six@1.7.3:", when="@:0.14")
+ depends_on("py-pooch@0.5.2:", when="@0.17.0:0.17.1")
+ depends_on("py-dask+array@1:", when="@0.14.2")
+ depends_on("py-dask+array@0.9:", when="@0.14.0:0.14.1")
+ depends_on("py-dask+array@0.5:", when="@:0.13")
+ depends_on("py-cloudpickle@0.2.1:", when="@0.14.0:0.14")
def url_for_version(self, version):
url = (
diff --git a/var/spack/repos/builtin/packages/py-scikit-learn-extra/package.py b/var/spack/repos/builtin/packages/py-scikit-learn-extra/package.py
index 2aab648a08..ceb56bdf9e 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn-extra/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn-extra/package.py
@@ -21,10 +21,14 @@ class PyScikitLearnExtra(PythonPackage):
version("0.2.0", sha256="3b1bb5fedde47920eb4b3fa0a0c18f80cc7359d9d0496720178788c6153b8019")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# For upperbound see https://github.com/scikit-learn-contrib/scikit-learn-extra/issues/164
depends_on("python@3.6:3.10", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.28.5:", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "run"))
depends_on("py-scipy@0.19.1:", type=("build", "run"))
- depends_on("py-scikit-learn@0.23:", type=("build", "run"))
+ # For upperbound see https://github.com/scikit-learn-contrib/scikit-learn-extra/issues/171
+ depends_on("py-scikit-learn@0.23:1.2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
index ea25ce226a..372c50624a 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
@@ -11,14 +11,19 @@ class PyScikitLearn(PythonPackage):
"""A set of python modules for machine learning and data mining."""
homepage = "https://scikit-learn.org/"
- pypi = "scikit-learn/scikit-learn-0.24.0.tar.gz"
+ pypi = "scikit-learn/scikit_learn-1.5.0.tar.gz"
git = "https://github.com/scikit-learn/scikit-learn.git"
- maintainers("adamjstewart")
-
license("BSD-3-Clause")
-
- version("master", branch="master")
+ maintainers("adamjstewart", "rgommers")
+
+ version("main", branch="main")
+ version("master", branch="main", deprecated=True)
+ version("1.5.2", sha256="b4237ed7b3fdd0a4882792e68ef2545d5baa50aca3bb45aa7df468138ad8f94d")
+ version("1.5.1", sha256="0ea5d40c0e3951df445721927448755d3fe1d80833b0b7308ebff5d2a45e6414")
+ version("1.5.0", sha256="789e3db01c750ed6d496fa2db7d50637857b451e57bcae863bff707c1247bef7")
+ version("1.4.2", sha256="daa1c471d95bad080c6e44b4946c9390a4842adc3082572c20e4f8884e39e959")
+ version("1.4.0", sha256="d4373c984eba20e393216edd51a3e3eede56cbe93d4247516d205643c3b93121")
version("1.3.2", sha256="a2f54c76accc15a34bfb9066e6c7a56c1e7235dda5762b990792330b52ccfb05")
version("1.3.1", sha256="1a231cced3ee3fa04756b4a7ab532dc9417acd581a330adff5f2c01ac2831fcf")
version("1.3.0", sha256="8be549886f5eda46436b6e555b0e4873b4f10aa21c07df45c4bc1735afbccd7a")
@@ -44,71 +49,75 @@ class PyScikitLearn(PythonPackage):
version("0.22.1", sha256="51ee25330fc244107588545c70e2f3570cfc4017cff09eed69d6e1d82a212b7d")
version("0.22", sha256="314abf60c073c48a1e95feaae9f3ca47a2139bd77cebb5b877c23a45c9e03012")
- variant("openmp", default=True, description="Build with OpenMP support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
# Based on PyPI wheel availability
- depends_on("python@3.8:3.12", when="@1.3.1:", type=("build", "run"))
- depends_on("python@3.8:3.11", when="@1.1.3:1.3.0", type=("build", "run"))
- depends_on("python@3.8:3.10", when="@1.1.0:1.1.2", type=("build", "run"))
- depends_on("python@:3.10", when="@1.0.2", type=("build", "run"))
- depends_on("python@:3.9", when="@0.24:1.0.1", type=("build", "run"))
- depends_on("python@:3.8", when="@0.22:0.23", type=("build", "run"))
-
- # pyproject.toml
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools@:59", when="@:1.2.1", type="build")
- depends_on("py-cython@0.29.33:2", when="@1.3:", type="build")
- depends_on("py-cython@0.29.24:2", when="@1.0.2:", type="build")
- depends_on("py-cython@0.28.5:2", when="@0.21:", type="build")
-
- # sklearn/_min_dependencies.py
- depends_on("py-numpy@1.17.3:", when="@1.1:", type=("build", "run"))
- depends_on("py-numpy@1.14.6:", when="@1.0:", type=("build", "run"))
- depends_on("py-numpy@1.13.3:", when="@0.23:", type=("build", "run"))
- depends_on("py-numpy@1.11.0:", when="@0.21:", type=("build", "run"))
- depends_on("py-scipy@1.5:", when="@1.3:", type=("build", "run"))
- depends_on("py-scipy@1.3.2:", when="@1.1:", type=("build", "run"))
- depends_on("py-scipy@1.1.0:", when="@1.0:", type=("build", "run"))
- depends_on("py-scipy@0.19.1:", when="@0.23:", type=("build", "run"))
- depends_on("py-scipy@0.17.0:", when="@0.21:", type=("build", "run"))
- depends_on("py-joblib@1.1.1:", when="@1.2:", type=("build", "run"))
- depends_on("py-joblib@1:", when="@1.1:", type=("build", "run"))
- depends_on("py-joblib@0.11:", type=("build", "run"))
- depends_on("py-threadpoolctl@2.0.0:", when="@0.23:", type=("build", "run"))
- depends_on("llvm-openmp", when="%apple-clang +openmp")
-
- # Test dependencies
- depends_on("py-matplotlib@3.1.3:", type="test")
- depends_on("py-scikit-image@0.16.2:", type="test")
- depends_on("py-pandas@1.0.5:", type="test")
- depends_on("py-pytest@7.1.2:", type="test")
- depends_on("py-pyamg@4:", type="test")
- depends_on("py-pooch@1.6:", type="test")
-
- # Release tarballs are already cythonized. If you wanted to build a release
- # version without OpenMP support, you would need to delete all .c files
- # that include omp.h, as well as PKG-INFO.
- # See https://github.com/scikit-learn/scikit-learn/issues/14332
- conflicts("~openmp", when="@:999", msg="Only master supports ~openmp")
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.9:3.13", when="@1.5.2:")
+ depends_on("python@3.9:3.12", when="@1.4:1.5.1")
+ depends_on("python@3.8:3.12", when="@1.3.1:1.3")
+ depends_on("python@3.8:3.11", when="@1.1.3:1.3.0")
+ depends_on("python@3.8:3.10", when="@1.1.0:1.1.2")
+ depends_on("python@:3.10", when="@1.0.2")
+ depends_on("python@:3.9", when="@0.24:1.0.1")
+ depends_on("python@:3.8", when="@0.22:0.23")
+
+ with default_args(type="build"):
+ depends_on("py-meson-python@0.16:", when="@1.5.1:")
+ depends_on("py-meson-python@0.15:", when="@1.5:")
+ depends_on("py-cython@3.0.10:", when="@1.5:")
+ depends_on("py-cython@3.0.8:", when="@1.4.2:")
+ depends_on("py-cython@0.29.33:", when="@1.4.0:1.4.1")
+ depends_on("py-cython@0.29.33:2", when="@1.3")
+ depends_on("py-cython@0.29.24:2", when="@1.0.2:1.2")
+ depends_on("py-cython@0.28.5:2", when="@0.21:1.0.1")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-numpy@1.19.5:", when="@1.4:")
+ depends_on("py-numpy@1.17.3:", when="@1.1:1.3")
+ depends_on("py-numpy@1.14.6:", when="@1.0")
+ depends_on("py-numpy@1.13.3:", when="@0.23:0.24")
+ depends_on("py-numpy@1.11.0:", when="@0.21:0.22")
+ # https://github.com/scikit-learn/scikit-learn/issues/27075
+ depends_on("py-numpy@:1", when="@:1.4.1")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-scipy@1.6:", when="@1.4:")
+ depends_on("py-scipy@1.5:", when="@1.3:")
+ depends_on("py-scipy@1.3.2:", when="@1.1:")
+ depends_on("py-scipy@1.1.0:", when="@1.0:")
+ depends_on("py-scipy@0.19.1:", when="@0.23:")
+ depends_on("py-scipy@0.17.0:", when="@0.21:")
+ depends_on("py-joblib@1.2:", when="@1.4:")
+ depends_on("py-joblib@1.1.1:", when="@1.2:")
+ depends_on("py-joblib@1:", when="@1.1:")
+ depends_on("py-joblib@0.11:")
+ depends_on("py-threadpoolctl@3.1:", when="@1.5:")
+ depends_on("py-threadpoolctl@2.0:", when="@0.23:")
+
+ depends_on("llvm-openmp", when="%apple-clang")
+
+ # Historical dependencies
+ with default_args(type="build"):
+ depends_on("py-setuptools", when="@:1.4")
+ depends_on("py-setuptools@:59", when="@:1.2.1")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/s/scikit-learn/{}-{}.tar.gz"
+ if version >= Version("1.5"):
+ name = "scikit_learn"
+ else:
+ name = "scikit-learn"
+ return url.format(name, version)
def setup_build_environment(self, env):
- # enable parallel builds of the sklearn backend
+ # Enable parallel builds of the sklearn backend
env.append_flags("SKLEARN_BUILD_PARALLEL", str(make_jobs))
- # https://scikit-learn.org/stable/developers/advanced_installation.html#building-from-source
- if self.spec.satisfies("~openmp"):
- env.set("SKLEARN_NO_OPENMP", "True")
- # https://scikit-learn.org/stable/developers/advanced_installation.html#mac-osx
- elif self.spec.satisfies("@0.21: %apple-clang +openmp"):
+ # https://scikit-learn.org/stable/developers/advanced_installation.html#macos
+ if self.spec.satisfies("%apple-clang"):
env.append_flags("CPPFLAGS", self.compiler.openmp_flag)
env.append_flags("CFLAGS", self.spec["llvm-openmp"].headers.include_flags)
env.append_flags("CXXFLAGS", self.spec["llvm-openmp"].headers.include_flags)
env.append_flags("LDFLAGS", self.spec["llvm-openmp"].libs.ld_flags)
-
- @run_after("install")
- @on_package_attributes(run_tests=True)
- def install_test(self):
- # https://scikit-learn.org/stable/developers/advanced_installation.html#testing
- with working_dir("spack-test", create=True):
- pytest = which("pytest")
- pytest(join_path(self.prefix, python_purelib, "sklearn"))
diff --git a/var/spack/repos/builtin/packages/py-scikit-sparse/package.py b/var/spack/repos/builtin/packages/py-scikit-sparse/package.py
index a348d94073..a96abf60f0 100644
--- a/var/spack/repos/builtin/packages/py-scikit-sparse/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-sparse/package.py
@@ -28,6 +28,8 @@ class PyScikitSparse(PythonPackage):
depends_on("py-cython@0.22:", when="@0.4.12", type="build")
depends_on("py-cython@0.22:0.29", when="@:0.4.11", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "link", "run"))
+ # https://github.com/scikit-sparse/scikit-sparse/issues/120
+ depends_on("py-numpy@:1", type=("build", "link", "run"))
depends_on("py-scipy@0.19:", type="run")
depends_on("suite-sparse", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-scikits-odes/package.py b/var/spack/repos/builtin/packages/py-scikits-odes/package.py
index 73643d8031..725af79875 100644
--- a/var/spack/repos/builtin/packages/py-scikits-odes/package.py
+++ b/var/spack/repos/builtin/packages/py-scikits-odes/package.py
@@ -21,6 +21,9 @@ class PyScikitsOdes(PythonPackage):
version("2.7.0", sha256="a71e19e1485893754ae8c050668232fcc694f17b83602e75fbebf7bf9f975e1e")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools@:64.0.0", type="build")
# Upstream incorrectly only lists py-numpy only as a build dependency even
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index 83eb63894f..5c2d41645a 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -18,6 +18,11 @@ class PyScipy(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("1.14.1", sha256="5a275584e726026a5699459aa72f828a610821006228e841b94275c4a7c08417")
+ version("1.14.0", sha256="b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b")
+ version("1.13.1", sha256="095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c")
+ version("1.13.0", sha256="58569af537ea29d3f78e5abd18398459f195546bb3be23d16677fb26616cc11e")
+ version("1.12.0", sha256="4bf5abab8a36d20193c698b0f1fc282c1d083c94723902c447e5d2f1780936a3")
version("1.11.4", sha256="90a2b78e7f5733b9de748f589f09225013685f9b218275257f8a8168ededaeaa")
version("1.11.3", sha256="bba4d955f54edd61899776bad459bf7326e14b9fa1c552181f0479cc60a568cd")
version("1.11.2", sha256="b29318a5e39bd200ca4381d80b065cdf3076c7d7281c5e36569e99273867f61d")
@@ -49,55 +54,68 @@ class PyScipy(PythonPackage):
version("1.3.3", sha256="64bf4e8ae0db2d42b58477817f648d81e77f0b381d0ea4427385bba3f959380a")
version("1.3.2", sha256="a03939b431994289f39373c57bbe452974a7da724ae7f9620a1beee575434da4")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
# Based on wheel availability on PyPI
- depends_on("python@3.9:3.12", when="@1.11:", type=("build", "link", "run"))
- depends_on("python@3.8:3.11", when="@1.9.2:1.10", type=("build", "link", "run"))
- depends_on("python@3.8:3.10", when="@1.8:1.9.1", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@1.7.2:1.7", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@1.5.4:1.7.1", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@1.3.2:1.5.3", type=("build", "link", "run"))
-
- depends_on("py-meson-python@0.12.1:", when="@1.11:", type="build")
- depends_on("py-meson-python@0.11:", when="@1.10:", type="build")
- depends_on("py-meson-python@0.9:", when="@1.9.2:", type="build")
- depends_on("py-meson-python@0.8.1:", when="@1.9.1:", type="build")
- depends_on("py-meson-python@0.7:", when="@1.9:", type="build")
- depends_on("meson", when="@1.9.0:1.9.1", type="build")
- depends_on("py-cython@0.29.35:2", when="@1.11:", type="build")
- depends_on("py-cython@0.29.32:2", when="@1.9.2:", type="build")
- depends_on("py-cython@0.29.21:2", when="@1.9:", type="build")
- depends_on("py-cython@0.29.18:2", when="@1.7:", type="build")
- depends_on("py-pybind11@2.10.4:2.11.0", when="@1.11.3:", type=("build", "link"))
- depends_on("py-pybind11@2.10.4:2.10", when="@1.11.0:1.11.2", type=("build", "link"))
- depends_on("py-pybind11@2.10.1", when="@1.10", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:2.10", when="@1.9.1:1.9", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:2.9", when="@1.9.0", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:2.8", when="@1.8", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:2.7", when="@1.7.2:1.7", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:2.6", when="@1.6.2:1.7.1", type=("build", "link"))
- depends_on("py-pybind11@2.4.3:", when="@1.5:1.6.1", type=("build", "link"))
- depends_on("py-pybind11@2.4.0:", when="@1.4.1:1.4", type=("build", "link"))
- depends_on("py-pybind11@2.2.4:", when="@1.4.0", type=("build", "link"))
- depends_on("py-pythran@0.12:", when="@1.10:", type="build")
- depends_on("py-pythran@0.10:", when="@1.8", type="build")
- depends_on("py-pythran@0.9.12:", when="@1.7.2:", type="build")
- depends_on("py-pythran@0.9.11:", when="@1.7:", type="build")
- depends_on("py-wheel@:0.40", when="@1.11.0:1.11.2", type="build")
- depends_on("py-wheel@:0.38", when="@1.10", type="build")
- depends_on("py-wheel@:0.37", when="@:1.9", type="build")
- depends_on("pkgconfig", when="@1.9:", type="build")
- depends_on("py-setuptools", when="@:1.8", type="build")
- depends_on("py-setuptools@:59", when="@1.8", type="build")
- depends_on("py-setuptools@:57", when="@1.7", type="build")
- depends_on("py-setuptools@:51.0.0", when="@1.6", type="build")
- depends_on("py-numpy@1.21.6:1.27", when="@1.11:", type=("build", "link", "run"))
- depends_on("py-numpy@1.19.5:1.26", when="@1.10", type=("build", "link", "run"))
- depends_on("py-numpy@1.18.5:1.25", when="@1.9", type=("build", "link", "run"))
- depends_on("py-numpy@1.17.3:1.24", when="@1.8", type=("build", "link", "run"))
- depends_on("py-numpy@1.16.5:1.22", when="@1.6:1.7", type=("build", "link", "run"))
- depends_on("py-numpy@1.14.5:1.21", when="@1.5", type=("build", "link", "run"))
- depends_on("py-numpy@1.13.3:1.21", when="@1.3:1.4", type=("build", "link", "run"))
- depends_on("py-pytest", type="test")
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.10:3.13", when="@1.14.1:")
+ depends_on("python@3.10:3.12", when="@1.14.0")
+ depends_on("python@3.9:3.12", when="@1.11.2:1.13")
+ depends_on("python@3.8:3.11", when="@1.9.2:1.11.1")
+ depends_on("python@3.8:3.10", when="@1.8:1.9.1")
+ depends_on("python@:3.10", when="@1.7.2:1.7")
+ depends_on("python@:3.9", when="@1.5.4:1.7.1")
+ depends_on("python@:3.8", when="@1.3.2:1.5.3")
+
+ # Build dependencies (do not include upper bound unless known issues)
+ with default_args(type="build"):
+ depends_on("py-meson-python@0.15:", when="@1.12:")
+ depends_on("py-meson-python@0.12.1:", when="@1.11:")
+ depends_on("py-meson-python@0.11:", when="@1.10:")
+ depends_on("py-meson-python@0.9:", when="@1.9.2:")
+ depends_on("py-meson-python@0.8.1:", when="@1.9.1:")
+ depends_on("py-meson-python@0.7:", when="@1.9:")
+ depends_on("py-cython@3.0.8:", when="@1.13:")
+ depends_on("py-cython@0.29.35:", when="@1.12")
+ depends_on("py-cython@0.29.35:2", when="@1.11")
+ depends_on("py-cython@0.29.32:2", when="@1.9.2:1.10")
+ depends_on("py-cython@0.29.21:2", when="@1.9.0:1.9.1")
+ depends_on("py-cython@0.29.18:2", when="@1.7:1.8")
+ with default_args(type=("build", "link")):
+ depends_on("py-pybind11@2.12:", when="@1.13:")
+ depends_on("py-pybind11@2.10.4:", when="@1.11:")
+ depends_on("py-pybind11@2.10.1:", when="@1.10:")
+ depends_on("py-pybind11@2.4.3:", when="@1.5:")
+ depends_on("py-pybind11@2.4.0:", when="@1.4.1:")
+ depends_on("py-pybind11@2.2.4:", when="@1.4.0:")
+ depends_on("py-pythran@0.14:", when="@1.13:")
+ depends_on("py-pythran@0.15:", when="@1.12")
+ depends_on("py-pythran@0.12:", when="@1.10:")
+ depends_on("py-pythran@0.10:", when="@1.8:")
+ depends_on("py-pythran@0.9.12:", when="@1.7.2:")
+ depends_on("py-pythran@0.9.11:", when="@1.7:")
+ depends_on("pkgconfig", when="@1.9:")
+
+ # Run dependencies
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-numpy@1.23.5:2.2", when="@1.14:")
+ depends_on("py-numpy@1.22.4:2.2", when="@1.13")
+ depends_on("py-numpy@1.22.4:1.28", when="@1.12")
+ depends_on("py-numpy@1.21.6:1.27", when="@1.11")
+ depends_on("py-numpy@1.19.5:1.26", when="@1.10")
+ depends_on("py-numpy@1.18.5:1.25", when="@1.9")
+ depends_on("py-numpy@1.17.3:1.24", when="@1.8")
+ depends_on("py-numpy@1.16.5:1.22", when="@1.6:1.7")
+ depends_on("py-numpy@1.14.5:1.21", when="@1.5")
+ depends_on("py-numpy@1.13.3:1.21", when="@1.3:1.4")
+
+ # Test dependencies
+ with default_args(type="test"):
+ depends_on("py-pytest")
+ depends_on("py-pooch")
+ depends_on("py-hypothesis@6.30:")
# Required to use --config-settings
depends_on("py-pip@23.1:", when="@1.9:", type="build")
@@ -108,16 +126,31 @@ class PyScipy(PythonPackage):
depends_on("lapack")
depends_on("blas")
+ # Historical dependencies
+ with default_args(type="build"):
+ depends_on("meson", when="@1.9.0:1.9.1")
+ depends_on("py-setuptools", when="@:1.8")
+ depends_on("py-setuptools@:59", when="@1.8")
+ depends_on("py-setuptools@:57", when="@1.7")
+ depends_on("py-setuptools@:51.0.0", when="@1.6")
+
# meson.build
# https://docs.scipy.org/doc/scipy/dev/toolchain.html#compilers
- conflicts("%gcc@:7", when="@1.10:", msg="SciPy requires GCC >= 8.0")
+ conflicts("%gcc@:7", when="@1.10:", msg="SciPy 1.10-1.13 requires GCC >= 8.0")
+ conflicts("%gcc@:9.0", when="@1.14:", msg="SciPy 1.14: requires GCC >= 9.1")
conflicts("%gcc@:4.7", when="@:1.9", msg="SciPy requires GCC >= 4.8")
+ conflicts("%apple-clang@:9", when="@1.10:", msg="SciPy requires Apple Clang >= 10")
conflicts(
"%msvc@:19.19",
when="@1.10:",
msg="SciPy requires at least vc142 (default with Visual Studio 2019) "
"when building with MSVC",
)
+ # https://github.com/spack/spack/issues/45718
+ conflicts("%aocc", msg="SciPy doesn't compile with AOCC yet")
+
+ # https://github.com/scipy/scipy/issues/19831
+ conflicts("^openblas@0.3.26:", when="@:1.12")
# https://github.com/scipy/scipy/issues/19352
conflicts("^py-cython@3.0.3")
@@ -145,6 +178,13 @@ class PyScipy(PythonPackage):
patch("scipy-clang.patch", when="@1.5.0:1.6.3 %clang")
+ # https://github.com/scipy/scipy/issues/21884
+ patch(
+ "https://github.com/scipy/scipy/commit/ab7d08c6148286059f6498ab5c3070268d13cbd9.patch?full_index=1",
+ sha256="37209324c6c2d9bf9284bf4726ec3ea7ecafabf736c7a72cf6789af97aebd30b",
+ when="@1.8.0:1.14.0",
+ )
+
@property
def archive_files(self):
return [join_path(self.stage.source_path, "build", "meson-logs", "meson-log.txt")]
@@ -188,18 +228,21 @@ class PyScipy(PythonPackage):
if self.spec.satisfies("@:1.8"):
self.spec["py-numpy"].package.setup_build_environment(env)
- # https://github.com/scipy/scipy/issues/19357
- if self.spec.satisfies("%apple-clang@15:"):
- env.append_flags("LDFLAGS", "-Wl,-ld_classic")
-
@when("@1.9:")
def config_settings(self, spec, prefix):
blas, lapack = self.spec["py-numpy"].package.blas_lapack_pkg_config()
+
+ if spec.satisfies("%aocc") or spec.satisfies("%clang@18:"):
+ fortran_std = "none"
+ else:
+ fortran_std = "legacy"
+
return {
"builddir": "build",
"compile-args": f"-j{make_jobs}",
"setup-args": {
# http://scipy.github.io/devdocs/building/blas_lapack.html
+ "-Dfortran_std": fortran_std,
"-Dblas": blas,
"-Dlapack": lapack,
},
diff --git a/var/spack/repos/builtin/packages/py-scooby/package.py b/var/spack/repos/builtin/packages/py-scooby/package.py
index 282153cbec..2651f0987d 100644
--- a/var/spack/repos/builtin/packages/py-scooby/package.py
+++ b/var/spack/repos/builtin/packages/py-scooby/package.py
@@ -14,6 +14,10 @@ class PyScooby(PythonPackage):
license("MIT")
+ version("0.10.0", sha256="7ea33c262c0cc6a33c6eeeb5648df787be4f22660e53c114e5fff1b811a8854f")
version("0.5.7", sha256="ae2c2b6f5f5d10adf7aaab32409028f1e28d3ce833664bdd1e8c2072e8da169a")
+ # https://github.com/banesullivan/scooby/pull/83
+ depends_on("python@:3.11", when="@:0.5", type=("build", "run"))
depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm", when="@0.10:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-scs/package.py b/var/spack/repos/builtin/packages/py-scs/package.py
index e5f2f5e4fa..4970a55504 100644
--- a/var/spack/repos/builtin/packages/py-scs/package.py
+++ b/var/spack/repos/builtin/packages/py-scs/package.py
@@ -20,6 +20,8 @@ class PyScs(PythonPackage, CudaPackage):
version("3.2.2", sha256="7206a2ad27ca031d693d65cbcbcfc661498f3983838079a66579bcc784b25293")
version("2.1.1-2", sha256="f816cfe3d4b4cff3ac2b8b96588c5960ddd2a3dc946bda6b09db04e7bc6577f2")
+ depends_on("c", type="build") # generated
+
variant(
"float32",
default=False,
diff --git a/var/spack/repos/builtin/packages/py-seaborn/package.py b/var/spack/repos/builtin/packages/py-seaborn/package.py
index 5fbc1cbff3..49333345d4 100644
--- a/var/spack/repos/builtin/packages/py-seaborn/package.py
+++ b/var/spack/repos/builtin/packages/py-seaborn/package.py
@@ -19,6 +19,7 @@ class PySeaborn(PythonPackage):
license("BSD-2-Clause")
+ version("0.13.2", sha256="93e60a40988f4d65e9f4885df477e2fdaff6b73a9ded434c1ab356dd57eefff7")
version("0.12.2", sha256="374645f36509d0dcab895cba5b47daf0586f77bfe3b36c97c607db7da5be0139")
version("0.12.0", sha256="893f17292d8baca616c1578ddb58eb25c72d622f54fc5ee329c8207dc9b57b23")
version("0.11.2", sha256="cf45e9286d40826864be0e3c066f98536982baf701a7caa386511792d61ff4f6")
@@ -38,6 +39,8 @@ class PySeaborn(PythonPackage):
depends_on("py-numpy@1.15:", when="@0.11:", type=("build", "run"))
depends_on("py-numpy@1.9.3:", when="@0.9:", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/mwaskom/seaborn/pull/3683
+ depends_on("py-numpy@:1", when="@:0.13.1", type=("build", "run"))
depends_on("py-pandas@0.25:", when="@0.12:", type=("build", "run"))
depends_on("py-pandas@0.23:", when="@0.11:", type=("build", "run"))
depends_on("py-pandas@0.22:", when="@0.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-seekpath/package.py b/var/spack/repos/builtin/packages/py-seekpath/package.py
index b001a1960c..ad772ca833 100644
--- a/var/spack/repos/builtin/packages/py-seekpath/package.py
+++ b/var/spack/repos/builtin/packages/py-seekpath/package.py
@@ -10,7 +10,7 @@ class PySeekpath(PythonPackage):
"""SeeK-path is a python module to obtain band paths in the Brillouin zone of crystal
structures."""
- homepage = "http://github.com/giovannipizzi/seekpath"
+ homepage = "https://github.com/giovannipizzi/seekpath"
pypi = "seekpath/seekpath-2.0.1.tar.gz"
maintainers("meyersbs")
diff --git a/var/spack/repos/builtin/packages/py-segmentation-models-pytorch/package.py b/var/spack/repos/builtin/packages/py-segmentation-models-pytorch/package.py
index ec9668422d..839da2955e 100644
--- a/var/spack/repos/builtin/packages/py-segmentation-models-pytorch/package.py
+++ b/var/spack/repos/builtin/packages/py-segmentation-models-pytorch/package.py
@@ -13,7 +13,9 @@ class PySegmentationModelsPytorch(PythonPackage):
pypi = "segmentation_models_pytorch/segmentation_models_pytorch-0.2.0.tar.gz"
license("MIT")
+ maintainers("adamjstewart")
+ version("0.3.4", sha256="f4aee7f6add479bd3c3953e855b7055fc657dc6800bf7fc8ab733fd7f8acb163")
version("0.3.3", sha256="b3b21ab4cd26a6b2b9e7a6ed466ace6452eb26ed3c31ae491ea2d7cbb01e384b")
version("0.3.2", sha256="8372733e57a10cb8f6b9e18a20577fbb3fb83549b6945664dc774a9b6d3ecd13")
version("0.3.1", sha256="d4a4817cf48872c3461bb7d22864c00f9d491719a6460adb252c035f9b0e8d51")
@@ -26,8 +28,11 @@ class PySegmentationModelsPytorch(PythonPackage):
depends_on("py-pretrainedmodels@0.7.4", type=("build", "run"))
depends_on("py-efficientnet-pytorch@0.7.1", when="@0.3:", type=("build", "run"))
depends_on("py-efficientnet-pytorch@0.6.3", when="@:0.2", type=("build", "run"))
+ depends_on("py-timm@0.9.7", when="@0.3.4", type=("build", "run"))
depends_on("py-timm@0.9.2", when="@0.3.3", type=("build", "run"))
depends_on("py-timm@0.6.12", when="@0.3.2", type=("build", "run"))
depends_on("py-timm@0.4.12", when="@:0.3.1", type=("build", "run"))
+ depends_on("py-huggingface-hub@0.24.6:", when="@0.3.4:", type=("build", "run"))
depends_on("py-tqdm", when="@0.3:", type=("build", "run"))
depends_on("pil", when="@0.3:", type=("build", "run"))
+ depends_on("py-six", when="@0.3.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-send2trash/package.py b/var/spack/repos/builtin/packages/py-send2trash/package.py
index 6c90fecee8..fdd13fbd65 100644
--- a/var/spack/repos/builtin/packages/py-send2trash/package.py
+++ b/var/spack/repos/builtin/packages/py-send2trash/package.py
@@ -14,6 +14,7 @@ class PySend2trash(PythonPackage):
license("BSD-3-Clause")
+ version("1.8.3", sha256="90bcdf2ed2a18b687040c0f58bfccd6ad2e1b7ec495a9903119dc3c47c615052")
version("1.8.0", sha256="937b038abd9f1e7b8c5d7a116be5dc4663beb71df74dcccffe56cacf992c7a9c")
version("1.5.0", sha256="7cebc0ffc8b6d6e553bce9c6bb915614610ba2dec17c2f0643b1b97251da2a41")
diff --git a/var/spack/repos/builtin/packages/py-sentencepiece/package.py b/var/spack/repos/builtin/packages/py-sentencepiece/package.py
index f955d19ccd..2a1fdff88f 100644
--- a/var/spack/repos/builtin/packages/py-sentencepiece/package.py
+++ b/var/spack/repos/builtin/packages/py-sentencepiece/package.py
@@ -22,6 +22,8 @@ class PySentencepiece(PythonPackage):
version("0.1.91", sha256="acbc7ea12713cd2a8d64892f8d2033c7fd2bb4faecab39452496120ace9a4b1b")
version("0.1.85", sha256="dd4956287a1b6af3cbdbbd499b7227a859a4e3f41c9882de5e6bdd929e219ae6")
+ depends_on("cxx", type="build") # generated
+
depends_on("sentencepiece")
depends_on("sentencepiece@0.1.85", when="@0.1.85")
depends_on("sentencepiece@0.1.91", when="@0.1.91")
diff --git a/var/spack/repos/builtin/packages/py-sequence-models/package.py b/var/spack/repos/builtin/packages/py-sequence-models/package.py
new file mode 100644
index 0000000000..5f863540da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sequence-models/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySequenceModels(PythonPackage):
+ """Pytorch modules and utilities for modeling biological sequence data."""
+
+ homepage = "https://github.com/microsoft/protein-sequence-models"
+ pypi = "sequence-models/sequence-models-1.8.0.tar.gz"
+
+ license("BSD-1-Clause")
+
+ version("1.8.0", sha256="b031e8bc3edce60311000c2cfe237e533929ecffe6cf4364bd57f0178f541beb")
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-setproctitle/package.py b/var/spack/repos/builtin/packages/py-setproctitle/package.py
index 5d5ffa01d1..369d0c58d7 100644
--- a/var/spack/repos/builtin/packages/py-setproctitle/package.py
+++ b/var/spack/repos/builtin/packages/py-setproctitle/package.py
@@ -17,4 +17,6 @@ class PySetproctitle(PythonPackage):
version("1.1.10", sha256="6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
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 9be074f714..f058014ddc 100644
--- a/var/spack/repos/builtin/packages/py-setuptools-rust/package.py
+++ b/var/spack/repos/builtin/packages/py-setuptools-rust/package.py
@@ -14,6 +14,9 @@ class PySetuptoolsRust(PythonPackage):
license("MIT")
+ version("1.9.0", sha256="704df0948f2e4cc60c2596ad6e840ea679f4f43e58ed4ad0c1857807240eab96")
+ version("1.8.1", sha256="94b1dd5d5308b3138d5b933c3a2b55e6d6927d1a22632e509fcea9ddd0f7e486")
+ version("1.7.0", sha256="c7100999948235a38ae7e555fe199aa66c253dc384b125f5d85473bf81eae3a3")
version("1.6.0", sha256="c86e734deac330597998bfbc08da45187e6b27837e23bd91eadb320732392262")
version("1.5.1", sha256="0e05e456645d59429cb1021370aede73c0760e9360bbfdaaefb5bced530eb9d7")
version("1.4.1", sha256="18ff850831f58ee21d5783825c99fad632da21e47645e9427fd7dec048029e76")
@@ -23,12 +26,14 @@ class PySetuptoolsRust(PythonPackage):
depends_on("py-setuptools@62.4:", when="@1.4.0:", type=("build", "run"))
depends_on("py-setuptools@46.1:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-setuptools-scm", when="@1.7.0:", type=("build", "run"))
depends_on("py-semantic-version@2.8.2:2", when="@1.2.0:", type=("build", "run"))
depends_on("py-semantic-version@2.6.0:", type=("build", "run"))
- depends_on("py-typing-extensions@3.7.4.3:", when="@1.2.0:", type=("build", "run"))
+ depends_on("py-tomli@1.2.1:", when="^python@:3.10", type=("build", "run"))
depends_on("rust", type="run")
# Historical dependencies
+ depends_on("py-typing-extensions@3.7.4.3:", when="@1.2.0:1.7.0", type=("build", "run"))
depends_on("py-setuptools-scm+toml@6.3.2:", when="@1.2.0:1.4.1", type="build")
depends_on("py-setuptools-scm+toml@3.4.3:", when="@:1.1", type="build")
depends_on("py-toml@0.9.0:", type=("build", "run"), when="@0.12.1")
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 b1f5910a4f..f1ee81b5e9 100644
--- a/var/spack/repos/builtin/packages/py-setuptools-scm/package.py
+++ b/var/spack/repos/builtin/packages/py-setuptools-scm/package.py
@@ -11,9 +11,11 @@ class PySetuptoolsScm(PythonPackage):
homepage = "https://github.com/pypa/setuptools_scm"
pypi = "setuptools_scm/setuptools_scm-4.1.2.tar.gz"
+ tags = ["build-tools"]
license("MIT")
+ version("8.0.4", sha256="b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7")
version("7.1.0", sha256="6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27")
version("7.0.5", sha256="031e13af771d6f892b941adb6ea04545bbf91ebc5ce68c78aaf3fff6e1fb4844")
version("7.0.3", sha256="cf8ab8e235bed840cd4559b658af0d8e8a70896a191bbc510ee914ec5325332d")
@@ -35,6 +37,7 @@ class PySetuptoolsScm(PythonPackage):
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-packaging@20.0:", when="@6.3:", type=("build", "run"))
+ depends_on("py-setuptools@61:", when="@8:", type=("build", "run"))
depends_on("py-setuptools@45:", when="@6:", type=("build", "run"))
depends_on("py-setuptools@42:", when="@5:", type=("build", "run"))
depends_on("py-setuptools@34.4:", type=("build", "run"))
@@ -46,3 +49,11 @@ class PySetuptoolsScm(PythonPackage):
depends_on("py-importlib-metadata", when="@7: ^python@:3.7", type=("build", "run"))
depends_on("git", type=("build", "run"))
+
+ def url_for_version(self, version):
+ # setuptools_scm-7.1.0.tar.gz with an underscore became
+ # setuptools-scm-8.0.4.tar.gz with a dash
+ url = super().url_for_version(version)
+ if version >= Version(8):
+ return url.replace("_", "-")
+ return url
diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py
index c5d5f7bfef..89930c88d5 100644
--- a/var/spack/repos/builtin/packages/py-setuptools/package.py
+++ b/var/spack/repos/builtin/packages/py-setuptools/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -19,198 +20,62 @@ class PySetuptools(Package, PythonExtension):
# Requires railroad
skip_modules = ["setuptools._vendor", "pkg_resources._vendor"]
- version(
- "68.0.0",
- sha256="11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f",
- expand=False,
- )
- version(
- "67.6.0",
- sha256="b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2",
- expand=False,
- )
- version(
- "65.5.0",
- sha256="f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356",
- expand=False,
- )
- version(
- "65.0.0",
- sha256="fe9a97f68b064a6ddd4bacfb0b4b93a4c65a556d97ce906255540439d0c35cef",
- expand=False,
- )
- version(
- "64.0.0",
- sha256="63f463b90ff5e0a1422010100268fd688e15c44ae0798659013c8412963e15e4",
- expand=False,
- )
- version(
- "63.4.3",
- sha256="7f61f7e82647f77d4118eeaf43d64cbcd4d87e38af9611694d4866eb070cd10d",
- expand=False,
- )
- version(
- "63.0.0",
- sha256="045aec56a3eee5c82373a70e02db8b6da9a10f7faf61ff89a14ab66c738ed370",
- expand=False,
- )
- version(
- "62.6.0",
- sha256="c1848f654aea2e3526d17fc3ce6aeaa5e7e24e66e645b5be2171f3f6b4e5a178",
- expand=False,
- )
- version(
- "62.4.0",
- sha256="5a844ad6e190dccc67d6d7411d119c5152ce01f7c76be4d8a1eaa314501bba77",
- expand=False,
- )
- version(
- "62.3.2",
- sha256="68e45d17c9281ba25dc0104eadd2647172b3472d9e01f911efa57965e8d51a36",
- expand=False,
- )
- version(
- "59.4.0",
- sha256="feb5ff19b354cde9efd2344ef6d5e79880ce4be643037641b49508bbb850d060",
- expand=False,
- )
- version(
- "58.2.0",
- sha256="2551203ae6955b9876741a26ab3e767bb3242dafe86a32a749ea0d78b6792f11",
- expand=False,
- )
- version(
- "57.4.0",
- sha256="a49230977aa6cfb9d933614d2f7b79036e9945c4cdd7583163f4e920b83418d6",
- expand=False,
- )
- version(
- "57.1.0",
- sha256="ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3",
- expand=False,
- )
- version(
- "51.0.0",
- sha256="8c177936215945c9a37ef809ada0fab365191952f7a123618432bbfac353c529",
- expand=False,
- )
- version(
- "50.3.2",
- sha256="2c242a0856fbad7efbe560df4a7add9324f340cf48df43651e9604924466794a",
- expand=False,
- )
- version(
- "50.1.0",
- sha256="4537c77e6e7dc170081f8547564551d4ff4e4999717434e1257600bbd3a23296",
- expand=False,
- )
- version(
- "49.6.0",
- sha256="4dd5bb0a0a0cff77b46ca5dd3a84857ee48c83e8223886b556613c724994073f",
- expand=False,
- )
- version(
- "49.2.0",
- sha256="272c7f48f5cddc5af5901f4265274c421c7eede5c8bc454ac2903d3f8fc365e9",
- expand=False,
- )
- version(
- "46.1.3",
- sha256="4fe404eec2738c20ab5841fa2d791902d2a645f32318a7850ef26f8d7215a8ee",
- expand=False,
- )
- version(
- "44.1.1",
- sha256="27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5",
- expand=False,
- )
- version(
- "44.1.0",
- sha256="992728077ca19db6598072414fb83e0a284aca1253aaf2e24bb1e55ee6db1a30",
- expand=False,
- )
- version(
- "43.0.0",
- sha256="a67faa51519ef28cd8261aff0e221b6e4c370f8fb8bada8aa3e7ad8945199963",
- expand=False,
- )
- version(
- "41.4.0",
- sha256="8d01f7ee4191d9fdcd9cc5796f75199deccb25b154eba82d44d6a042cf873670",
- expand=False,
- )
- version(
- "41.3.0",
- sha256="e9832acd9be6f3174f4c34b40e7d913a146727920cbef6465c1c1bd2d21a4ec4",
- expand=False,
- )
- version(
- "41.0.1",
- sha256="c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf",
- expand=False,
- )
- version(
- "41.0.0",
- sha256="e67486071cd5cdeba783bd0b64f5f30784ff855b35071c8670551fd7fc52d4a1",
- expand=False,
- )
- version(
- "40.8.0",
- sha256="e8496c0079f3ac30052ffe69b679bd876c5265686127a3159cfa415669b7f9ab",
- expand=False,
- )
- version(
- "40.4.3",
- sha256="ce4137d58b444bac11a31d4e0c1805c69d89e8ed4e91fde1999674ecc2f6f9ff",
- expand=False,
- )
- version(
- "40.2.0",
- sha256="ea3796a48a207b46ea36a9d26de4d0cc87c953a683a7b314ea65d666930ea8e6",
- expand=False,
- )
- version(
- "39.2.0",
- sha256="8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926",
- expand=False,
- )
- version(
- "39.0.1",
- sha256="8010754433e3211b9cdbbf784b50f30e80bf40fc6b05eb5f865fab83300599b8",
- expand=False,
- )
- version(
- "25.2.0",
- sha256="2845247c359bb91097ccf8f6be8a69edfa44847f3d2d5def39aa43c3d7f615ca",
- expand=False,
- )
- version(
- "20.7.0",
- sha256="8917a52aa3a389893221b173a89dae0471022d32bff3ebc31a1072988aa8039d",
- expand=False,
- )
- version(
- "20.6.7",
- sha256="9982ee4d279a2541dc1a7efee994ff9c535cfc05315e121e09df7f93da48c442",
- expand=False,
- )
+ version("69.2.0", sha256="c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c")
+ version("69.1.1", sha256="02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56")
+ version("69.0.3", sha256="385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05")
+ version("68.2.2", sha256="b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a")
+ version("68.0.0", sha256="11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f")
+ version("67.6.0", sha256="b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2")
+ version("65.5.0", sha256="f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356")
+ version("65.0.0", sha256="fe9a97f68b064a6ddd4bacfb0b4b93a4c65a556d97ce906255540439d0c35cef")
+ version("64.0.0", sha256="63f463b90ff5e0a1422010100268fd688e15c44ae0798659013c8412963e15e4")
+ version("63.4.3", sha256="7f61f7e82647f77d4118eeaf43d64cbcd4d87e38af9611694d4866eb070cd10d")
+ version("63.0.0", sha256="045aec56a3eee5c82373a70e02db8b6da9a10f7faf61ff89a14ab66c738ed370")
+ version("62.6.0", sha256="c1848f654aea2e3526d17fc3ce6aeaa5e7e24e66e645b5be2171f3f6b4e5a178")
+ version("62.4.0", sha256="5a844ad6e190dccc67d6d7411d119c5152ce01f7c76be4d8a1eaa314501bba77")
+ version("62.3.2", sha256="68e45d17c9281ba25dc0104eadd2647172b3472d9e01f911efa57965e8d51a36")
+ version("59.4.0", sha256="feb5ff19b354cde9efd2344ef6d5e79880ce4be643037641b49508bbb850d060")
+ version("58.2.0", sha256="2551203ae6955b9876741a26ab3e767bb3242dafe86a32a749ea0d78b6792f11")
+ version("57.4.0", sha256="a49230977aa6cfb9d933614d2f7b79036e9945c4cdd7583163f4e920b83418d6")
+ version("57.1.0", sha256="ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3")
+ version("51.0.0", sha256="8c177936215945c9a37ef809ada0fab365191952f7a123618432bbfac353c529")
+ version("50.3.2", sha256="2c242a0856fbad7efbe560df4a7add9324f340cf48df43651e9604924466794a")
+ version("50.1.0", sha256="4537c77e6e7dc170081f8547564551d4ff4e4999717434e1257600bbd3a23296")
+ version("49.6.0", sha256="4dd5bb0a0a0cff77b46ca5dd3a84857ee48c83e8223886b556613c724994073f")
+ version("49.2.0", sha256="272c7f48f5cddc5af5901f4265274c421c7eede5c8bc454ac2903d3f8fc365e9")
+ version("46.1.3", sha256="4fe404eec2738c20ab5841fa2d791902d2a645f32318a7850ef26f8d7215a8ee")
+ version("44.1.1", sha256="27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5")
+ version("44.1.0", sha256="992728077ca19db6598072414fb83e0a284aca1253aaf2e24bb1e55ee6db1a30")
+ version("43.0.0", sha256="a67faa51519ef28cd8261aff0e221b6e4c370f8fb8bada8aa3e7ad8945199963")
+ version("41.4.0", sha256="8d01f7ee4191d9fdcd9cc5796f75199deccb25b154eba82d44d6a042cf873670")
+ version("41.3.0", sha256="e9832acd9be6f3174f4c34b40e7d913a146727920cbef6465c1c1bd2d21a4ec4")
+ version("41.0.1", sha256="c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf")
+ version("41.0.0", sha256="e67486071cd5cdeba783bd0b64f5f30784ff855b35071c8670551fd7fc52d4a1")
+ version("40.8.0", sha256="e8496c0079f3ac30052ffe69b679bd876c5265686127a3159cfa415669b7f9ab")
+ version("40.4.3", sha256="ce4137d58b444bac11a31d4e0c1805c69d89e8ed4e91fde1999674ecc2f6f9ff")
+ version("40.2.0", sha256="ea3796a48a207b46ea36a9d26de4d0cc87c953a683a7b314ea65d666930ea8e6")
+ version("39.2.0", sha256="8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926")
+ version("39.0.1", sha256="8010754433e3211b9cdbbf784b50f30e80bf40fc6b05eb5f865fab83300599b8")
+ version("25.2.0", sha256="2845247c359bb91097ccf8f6be8a69edfa44847f3d2d5def39aa43c3d7f615ca")
+ version("20.7.0", sha256="8917a52aa3a389893221b173a89dae0471022d32bff3ebc31a1072988aa8039d")
+ version("20.6.7", sha256="9982ee4d279a2541dc1a7efee994ff9c535cfc05315e121e09df7f93da48c442")
extends("python")
- depends_on("python@3.7:", when="@59.7:", type=("build", "run"))
- depends_on("python@3.6:", when="@51:", type=("build", "run"))
- depends_on("python@3.5:", when="@45:50", type=("build", "run"))
- depends_on("python@2.7:2.8,3.5:", when="@44", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", when="@:43", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:", when="@75.4:")
+ depends_on("python@3.8:", when="@68.1:")
+ depends_on("python@3.7:", when="@59.7:")
+ depends_on("python@3.6:", when="@51:")
- # Uses HTMLParser.unescape
- depends_on("python@:3.8", when="@:41.0", type=("build", "run"))
+ # Uses HTMLParser.unescape
+ depends_on("python@:3.8", when="@:41.0")
- # Uses collections.MutableMapping
- depends_on("python@:3.9", when="@:40.4.2", type=("build", "run"))
+ # Uses collections.MutableMapping
+ depends_on("python@:3.9", when="@:40.4.2")
- # https://github.com/pypa/setuptools/issues/3661
- depends_on("python@:3.11", when="@:67", type=("build", "run"))
+ # https://github.com/pypa/setuptools/issues/3661
+ depends_on("python@:3.11", when="@:67")
depends_on("py-pip", type="build")
@@ -231,5 +96,4 @@ class PySetuptools(Package, PythonExtension):
#
# We work around this issue by installing setuptools from wheels
whl = self.stage.archive_file
- args = ["-m", "pip"] + std_pip_args + ["--prefix=" + prefix, whl]
- python(*args)
+ python("-m", "pip", *PythonPipBuilder.std_args(self), f"--prefix={prefix}", whl)
diff --git a/var/spack/repos/builtin/packages/py-sfepy/package.py b/var/spack/repos/builtin/packages/py-sfepy/package.py
index 93d2812d70..da0ced6e3a 100644
--- a/var/spack/repos/builtin/packages/py-sfepy/package.py
+++ b/var/spack/repos/builtin/packages/py-sfepy/package.py
@@ -21,6 +21,8 @@ class PySfepy(PythonPackage):
version("2021.3", sha256="b2a760b0f3277ac223ff25821a4156b48d06b3769e6a9a3bd0bffef5a43cbe17")
+ depends_on("c", type="build") # generated
+
variant("petsc", default=False, description="Enable PETSc support")
variant("slepc", default=False, description="Enable SLEPc support")
variant("pyamg", default=False, description="Enable PyAMG support")
diff --git a/var/spack/repos/builtin/packages/py-shap/package.py b/var/spack/repos/builtin/packages/py-shap/package.py
index 6c6bf45110..859a6640f4 100644
--- a/var/spack/repos/builtin/packages/py-shap/package.py
+++ b/var/spack/repos/builtin/packages/py-shap/package.py
@@ -17,6 +17,8 @@ class PyShap(PythonPackage):
version("0.41.0", sha256="a49ea4d65aadbc845a695fa3d7ea0bdfc8c928b8e213b0feedf5868ade4b3ca5")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-shapely/package.py b/var/spack/repos/builtin/packages/py-shapely/package.py
index 152bc686d4..56b8ad26c4 100644
--- a/var/spack/repos/builtin/packages/py-shapely/package.py
+++ b/var/spack/repos/builtin/packages/py-shapely/package.py
@@ -21,6 +21,10 @@ class PyShapely(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("2.0.6", sha256="997f6159b1484059ec239cacaa53467fd8b5564dabe186cd84ac2944663b0bf6")
+ version("2.0.5", sha256="bff2366bc786bfa6cb353d6b47d0443c570c32776612e527ee47b6df63fcfe32")
+ version("2.0.4", sha256="5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8")
+ version("2.0.3", sha256="4d65d0aa7910af71efa72fd6447e02a8e5dd44da81a983de9d736d6e6ccbe674")
version("2.0.2", sha256="1713cc04c171baffc5b259ba8531c58acc2a301707b7f021d88a15ed090649e7")
version("2.0.1", sha256="66a6b1a3e72ece97fc85536a281476f9b7794de2e646ca8a4517e2e3c1446893")
version("2.0.0", sha256="11f1b1231a6c04213fb1226c6968d1b1b3b369ec42d1e9655066af87631860ea")
@@ -32,18 +36,29 @@ class PyShapely(PythonPackage):
version("1.8.0", sha256="f5307ee14ba4199f8bbcf6532ca33064661c1433960c432c84f0daa73b47ef9c")
version("1.7.1", sha256="1641724c1055459a7e2b8bbe47ba25bdc89554582e62aec23cb3f3ca25f9b129")
version("1.7.0", sha256="e21a9fe1a416463ff11ae037766fe410526c95700b9e545372475d2361cc951e")
- version("1.6.4", sha256="b10bc4199cfefcf1c0e5d932eac89369550320ca4bdf40559328d85f1ca4f655")
+ version(
+ "1.6.4",
+ sha256="b10bc4199cfefcf1c0e5d932eac89369550320ca4bdf40559328d85f1ca4f655",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build")
# pyproject.toml
- depends_on("py-cython", when="@2.0.2:", type="build")
- depends_on("py-cython@0.29:0", when="@2.0.0:2.0.1", type="build")
- depends_on("py-cython@0.29.24:2", when="@:1", type="build")
- depends_on("py-setuptools@61:", when="@2:", type="build")
- depends_on("py-setuptools@:63", when="@:1", type="build")
- depends_on("py-numpy@1.14:", when="@2:", type=("build", "link", "run"))
- depends_on("py-numpy", type=("build", "link", "run"))
- depends_on("py-pytest", type="test")
- depends_on("py-pytest-cov", type="test")
+ with default_args(type="build"):
+ depends_on("py-cython", when="@2.0.2:")
+ depends_on("py-cython@0.29:0", when="@2.0.0:2.0.1")
+ depends_on("py-cython@0.29.24:2", when="@:1")
+ depends_on("py-setuptools@61:", when="@2:")
+ depends_on("py-setuptools@:63", when="@:1")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-numpy@1.14:2", when="@2.0.6:")
+ # https://github.com/shapely/shapely/issues/2098
+ depends_on("py-numpy@1.14:2.0", when="@2.0.4:2.0.5")
+ # https://github.com/shapely/shapely/issues/1972
+ depends_on("py-numpy@1.14:1", when="@2.0.0:2.0.3")
+ depends_on("py-numpy@:1", when="@1")
# setup.py
depends_on("geos@3.5:", when="@2:")
@@ -64,7 +79,7 @@ class PyShapely(PythonPackage):
letter = "S"
return url.format(letter, version)
- @when("^python@3.7:")
+ @when("@:1.8.1")
def patch(self):
# Python 3.7 changed the thread storage API, precompiled *.c files
# need to be re-cythonized
@@ -90,13 +105,3 @@ class PyShapely(PythonPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_build_environment(env)
-
- @run_after("install")
- @on_package_attributes(run_tests=True)
- def test_install(self):
- # https://shapely.readthedocs.io/en/latest/installation.html#testing-shapely
- if self.version >= Version("2"):
- with working_dir("spack-test", create=True):
- python("-m", "pytest", "--pyargs", "shapely.tests")
- else:
- python("-m", "pytest")
diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py
index d8faeac4b7..0899a10a35 100644
--- a/var/spack/repos/builtin/packages/py-shiboken/package.py
+++ b/var/spack/repos/builtin/packages/py-shiboken/package.py
@@ -16,6 +16,8 @@ class PyShiboken(PythonPackage):
version("1.2.2", sha256="0baee03c6244ab56e42e4200d0cb5e234682b11cc296ed0a192fe457d054972f")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
# to prevent error: 'PyTypeObject' {aka 'struct _typeobject'} has no member
diff --git a/var/spack/repos/builtin/packages/py-shiboken2/package.py b/var/spack/repos/builtin/packages/py-shiboken2/package.py
index c29d1dc849..fa90c0b61a 100644
--- a/var/spack/repos/builtin/packages/py-shiboken2/package.py
+++ b/var/spack/repos/builtin/packages/py-shiboken2/package.py
@@ -13,19 +13,19 @@ class PyShiboken2(PythonPackage):
homepage = "https://www.pyside.org/"
+ skip_version_audit = ["platform=windows"]
+
if sys.platform.startswith("linux"):
version(
"5.15.2",
url="https://files.pythonhosted.org/packages/cp35.cp36.cp37.cp38.cp39/s/shiboken2/shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl",
sha256="4aee1b91e339578f9831e824ce2a1ec3ba3a463f41fda8946b4547c7eb3cba86",
- expand=False,
)
elif sys.platform == "darwin":
version(
"5.15.2",
url="https://files.pythonhosted.org/packages/cp35.cp36.cp37.cp38.cp39/s/shiboken2/shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-macosx_10_13_intel.whl",
sha256="edc12a4df2b5be7ca1e762ab94e331ba9e2fbfe3932c20378d8aa3f73f90e0af",
- expand=False,
)
depends_on("python@3.5:3.9", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-shroud/package.py b/var/spack/repos/builtin/packages/py-shroud/package.py
index 1a6c64d962..ca5b7a838c 100644
--- a/var/spack/repos/builtin/packages/py-shroud/package.py
+++ b/var/spack/repos/builtin/packages/py-shroud/package.py
@@ -24,5 +24,9 @@ class PyShroud(PythonPackage):
version("0.9.0", tag="v0.9.0", commit="94aa2831290d10b604df16cb87ee17aa722fb998")
version("0.8.0", tag="v0.8.0", commit="b58ac35f41514428d08849a578c45ad444bfddc9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-pyyaml@4.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-simpleeval/package.py b/var/spack/repos/builtin/packages/py-simpleeval/package.py
index 2d9a46e35c..caa620b525 100644
--- a/var/spack/repos/builtin/packages/py-simpleeval/package.py
+++ b/var/spack/repos/builtin/packages/py-simpleeval/package.py
@@ -16,7 +16,8 @@ class PySimpleeval(PythonPackage):
license("MIT")
+ version("0.9.13", sha256="4a30f9cc01825fe4c719c785e3762623e350c4840d5e6855c2a8496baaa65fac")
version("0.9.12", sha256="3e0be507486d4e21cf9d08847c7e57dd61a1603950399985f7c5a0be7fd33e36")
depends_on("py-setuptools@30.3.0:", type="build")
- depends_on("py-build", type="build")
+ depends_on("py-build", type="build", when="@:0.9.12")
diff --git a/var/spack/repos/builtin/packages/py-simplejson/package.py b/var/spack/repos/builtin/packages/py-simplejson/package.py
index dcac15ee93..63b35bae3e 100644
--- a/var/spack/repos/builtin/packages/py-simplejson/package.py
+++ b/var/spack/repos/builtin/packages/py-simplejson/package.py
@@ -31,4 +31,6 @@ class PySimplejson(PythonPackage):
version("3.8.0", sha256="217e4797da3a9a4a9fbe6722e0db98070b8443a88212d7acdbd241a7668141d9")
version("3.3.0", sha256="7a8a6bd82e111976aeb06138316ab10847adf612925072eaff8512228bcf9a1f")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-simpletraj/package.py b/var/spack/repos/builtin/packages/py-simpletraj/package.py
new file mode 100644
index 0000000000..a3b5430203
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-simpletraj/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySimpletraj(PythonPackage):
+ """Lightweight coordinate-only trajectory reader based on code
+ from GROMACS, MDAnalysis and VMD."""
+
+ pypi = "simpletraj/simpletraj-0.5.tar.gz"
+
+ maintainers("d-beltran")
+
+ # Versions
+ version("0.5", sha256="860ccba82e7a6085ef1cbff74eb2db53df65fd58edabae3c45b8c45a219b8a3b")
+
+ depends_on("c", type="build") # generated
+
+ # Dependencies
+ depends_on("py-setuptools", type="build")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-simpy/package.py b/var/spack/repos/builtin/packages/py-simpy/package.py
new file mode 100644
index 0000000000..03213f022d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-simpy/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PySimpy(PythonPackage):
+ """SimPy is a process-based discrete-event simulation framework based on standard Python."""
+
+ homepage = "https://simpy.readthedocs.io/"
+ pypi = "simpy/simpy-4.0.2.tar.gz"
+
+ version("4.1.1", sha256="06d0750a7884b11e0e8e20ce0bc7c6d4ed5f1743d456695340d13fdff95001a6")
+ version("4.0.2", sha256="6d8adc0229df6b02fb7e26dcd1338703b4f4f63f167a5ac2a7213cb80aba4484")
+
+ depends_on("py-setuptools@42:", type="build", when="@4.0.2")
+ depends_on("py-setuptools@64:", type="build", when="@4.1.1:")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build", when="@4.0.2")
+ depends_on("py-setuptools-scm@8.0:+toml", type="build", when="@4.1.1:")
diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py
index 966f8766fb..703fce900c 100644
--- a/var/spack/repos/builtin/packages/py-sip/package.py
+++ b/var/spack/repos/builtin/packages/py-sip/package.py
@@ -16,6 +16,7 @@ class PySip(PythonPackage):
license("GPL-2.0-or-later")
+ version("6.8.5", sha256="5dddd5966e9875d89ecde9d3e6ac63225f9972e4d25c09e20fa22f1819409c70")
version("6.7.9", sha256="35d51fc10f599d3696abb50f29d068ad04763df7b77808c76b74597660f99b17")
version("6.6.2", sha256="0e3efac1c5dfd8e525ae57140927df26993e13f58b89d1577c314f4105bfd90d")
version("6.4.0", sha256="42ec368520b8da4a0987218510b1b520b4981e4405086c1be384733affc2bcb0")
@@ -28,6 +29,8 @@ class PySip(PythonPackage):
version("4.19.15", sha256="02bff1ac89253e12cdf1406ad39f841d0e264b0d96a7de13dfe9e29740df2053")
version("4.19.13", sha256="92193fcf990503bf29f03e290efc4ee1812d556efc18acf5c8b88c090177a630")
+ depends_on("c", type="build") # generated
+
variant(
"module",
default="sip",
@@ -37,14 +40,16 @@ class PySip(PythonPackage):
multi=False,
)
- depends_on("py-ply", when="@6.6:", type=("build", "run"))
+ depends_on("py-ply", type=("build", "run"), when="@6.6:")
with when("@5:"):
depends_on("python", type=("build", "link", "run"))
depends_on("py-packaging", type=("build", "run"))
- depends_on("py-setuptools@30.3:", type=("build", "run"))
- depends_on("py-tomli", when="@6.7: ^python@:3.10", type=("build", "run"))
- depends_on("py-toml", when="@:6.6", type=("build", "run"))
+ depends_on("py-setuptools@64:", type=("build", "run"), when="@6.8.4:")
+ depends_on("py-setuptools@30.3:", type=("build", "run"), when="@:6.8.3")
+ depends_on("py-setuptools-scm@8:", type="build", when="@6.8.4:")
+ depends_on("py-tomli", type=("build", "run"), when="@6.7: ^python@:3.10")
+ depends_on("py-toml", type=("build", "run"), when="@:6.6")
with when("@:4"):
# Requires distutils
diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py
index d987cc3d4c..889072dc76 100644
--- a/var/spack/repos/builtin/packages/py-slepc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py
@@ -18,6 +18,13 @@ class PySlepc4py(PythonPackage):
license("BSD-2-Clause")
version("main", branch="main")
+ version("3.22.2", sha256="bd34d5560a36bafd81a0f071aca03a9fac140c6167b1b8a2f2e580b69a2a3255")
+ version("3.22.1", sha256="056d98bf09f5202d25842d5a4a4f553445103e1e26155da52f007c508f3140f8")
+ version("3.22.0", sha256="53db52a72e126787768732790ca73dbc6ff6e49d4d1152e9c3641ba71b97738e")
+ version("3.21.2", sha256="f611ff74e4749f21445b2369dbd0edf404cdf639eecafd54187d0a2865d521a0")
+ version("3.21.1", sha256="bc8e0e270643eef9b63b249080b8fe4433be0b697d55032d9f768ef310bd7b07")
+ version("3.21.0", sha256="bfbd90162633486f67a448d2052e1f7182529d18e8bde87367bc4f4dd58e857f")
+ version("3.20.2", sha256="89ebd1964edd0eb63d4dbfa977d6f35408f4e19a3da290696fd1197901544bd8")
version("3.20.1", sha256="7e6d156f7b0891bfa0616b38a502460c62797f16ca146b321e16cce4cf139d07")
version("3.20.0", sha256="56cbea1f56746136e5a934bf4a481e566f35e475cb950c0a5bce7d5c3cc7690a")
version("3.19.2", sha256="da8b6a7aaaf5e4497b896b2e478c42dd9de4fb31da93eb294181bea3bb60c767")
@@ -43,19 +50,28 @@ class PySlepc4py(PythonPackage):
patch("ldshared.patch", when="@:3.18")
+ depends_on("py-cython@3:", when="@3.20:", type="build")
depends_on("py-cython@0.29.32:", when="^python@3.11:", type="build")
depends_on("py-cython@0.24:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
- depends_on("py-petsc4py", type=("build", "run"))
depends_on("py-petsc4py@main", when="@main", type=("build", "run"))
- for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]:
- depends_on(f"py-petsc4py@{ver}", when=f"@{ver}", type=("build", "run"))
-
- depends_on("slepc")
depends_on("slepc@main", when="@main")
- for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]:
+ for ver in [
+ "3.22",
+ "3.21",
+ "3.20",
+ "3.19",
+ "3.18",
+ "3.17",
+ "3.16",
+ "3.15",
+ "3.13",
+ "3.12",
+ "3.11",
+ ]:
+ depends_on(f"py-petsc4py@{ver}", when=f"@{ver}", type=("build", "run"))
depends_on(f"slepc@{ver}", when=f"@{ver}")
@property
diff --git a/var/spack/repos/builtin/packages/py-smartredis/package.py b/var/spack/repos/builtin/packages/py-smartredis/package.py
index f45b38572c..b1a6186499 100644
--- a/var/spack/repos/builtin/packages/py-smartredis/package.py
+++ b/var/spack/repos/builtin/packages/py-smartredis/package.py
@@ -20,6 +20,9 @@ class PySmartredis(PythonPackage):
version("0.4.1", sha256="fff16ed1eb09648ac3c3f845373beb37f3ffe7414d8745ae36af9daf585f8c5b")
version("0.4.0", sha256="d12779aa8bb038e837c25eac41b178aab9e16b729d50ee360b5af8f813d9f1dd")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.7:3.10", type=("build", "run"))
depends_on("py-setuptools@42:", type=("build",))
diff --git a/var/spack/repos/builtin/packages/py-smartsim/package.py b/var/spack/repos/builtin/packages/py-smartsim/package.py
index 8014fe9da1..482b71c983 100644
--- a/var/spack/repos/builtin/packages/py-smartsim/package.py
+++ b/var/spack/repos/builtin/packages/py-smartsim/package.py
@@ -27,7 +27,7 @@ class PySmartsim(PythonPackage):
depends_on("python@3.8:3.10", type=("build", "run"))
depends_on("py-setuptools@39.2:", type=("build",))
- depends_on("py-cmake@3.13:", type=("build",))
+ depends_on("cmake@3.13:", type=("build",))
depends_on("py-psutil@5.7.2:", type=("build", "run"))
depends_on("py-coloredlogs@10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-smote-variants/package.py b/var/spack/repos/builtin/packages/py-smote-variants/package.py
new file mode 100644
index 0000000000..65c265a350
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-smote-variants/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySmoteVariants(PythonPackage):
+ """Variants of the synthetic minority oversampling technique (SMOTE) for
+ imbalanced learning"""
+
+ homepage = "https://github.com/analyticalmindsltd/smote_variants"
+ pypi = "smote_variants/smote_variants-0.7.3.tar.gz"
+
+ version("0.7.3", sha256="69497c764f101a76e8a3d4a9c80176704375c7aa5e26914f19222b59fb03b890")
+
+ depends_on("python@3.5:", type=("build", "run"))
+
+ depends_on("py-wheel@0.33.4:", type="build")
+ depends_on("py-setuptools@41.0.1:", type="build")
+ depends_on("py-pytest-runner", type="build")
+
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-scikit-learn", type=("build", "run"))
+ depends_on("py-joblib", type=("build", "run"))
+ depends_on("py-minisom", type=("build", "run"))
+ depends_on("py-tensorflow", type=("build", "run"))
+ depends_on("py-keras", type=("build", "run"))
+ depends_on("py-pandas", type=("build", "run"))
+ depends_on("mkl")
+ depends_on("py-metric-learn", type=("build", "run"))
+ depends_on("py-seaborn", type=("build", "run"))
+ # Not including statistics, because is only needed for python 2
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-azure-batch/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-azure-batch/package.py
new file mode 100644
index 0000000000..a135613514
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-azure-batch/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginAzureBatch(PythonPackage):
+ """A Snakemake executor plugin for submitting jobs to Microsoft Azure Batch."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-azure-batch"
+ pypi = (
+ "snakemake_executor_plugin_azure_batch/snakemake_executor_plugin_azure_batch-0.1.3.tar.gz"
+ )
+
+ license("MIT")
+
+ version("0.1.3", sha256="7883ecdc3983eb73ea0e1ae10010eeff1626510c7e99176203ee2050031f86e3")
+
+ depends_on("py-snakemake-interface-common@1.15:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.1.1:8", type=("build", "run"))
+
+ depends_on("py-azure-storage-blob@12.17:12", type=("build", "run"))
+ depends_on("py-azure-batch@14", type=("build", "run"))
+ depends_on("py-azure-mgmt-batch@17", type=("build", "run"))
+ depends_on("py-azure-identity@1.14:1", type=("build", "run"))
+ depends_on("py-msrest@0.7.1:0.7", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-generic/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-generic/package.py
new file mode 100644
index 0000000000..cd7944bb93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-generic/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginClusterGeneric(PythonPackage):
+ """A Snakemake executor plugin for submitting jobs to a cluster."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-cluster-generic"
+ pypi = (
+ "snakemake_executor_plugin_cluster_generic/"
+ "snakemake_executor_plugin_cluster_generic-1.0.9.tar.gz"
+ )
+
+ license("MIT")
+
+ version("1.0.9", sha256="ad0dc2d8bde7d4f336364bebe11a3b2209653c481ce8fbb0ae8bec81016a9a14")
+ version("1.0.7", sha256="093808e63cc48294a9d1eb0b620cdff8cc970806294a2f6ba127a49f8a81d473")
+
+ depends_on("py-snakemake-interface-common@1.13:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@9", type=("build", "run"), when="@1.0.9:")
+ depends_on(
+ "py-snakemake-interface-executor-plugins@8.1:8", type=("build", "run"), when="@:1.0.8"
+ )
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-sync/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-sync/package.py
new file mode 100644
index 0000000000..820568fa6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-cluster-sync/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginClusterSync(PythonPackage):
+ """A Snakemake executor plugin for cluster jobs that are executed synchronously."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-cluster-sync"
+ pypi = (
+ "snakemake_executor_plugin_cluster_sync/"
+ "snakemake_executor_plugin_cluster_sync-0.1.4.tar.gz"
+ )
+
+ license("MIT")
+
+ version("0.1.4", sha256="6a6dcb2110d4c2ee74f9a48ea68e0fd7ddd2800672ebef00a01faa4affa835ad")
+ version("0.1.3", sha256="c30fca6ccb98a3f7ca52ca8a95414c71360a3d4a835bd4a097a13445d6fce2ac")
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@9", type=("build", "run"), when="@0.1.4:")
+ depends_on(
+ "py-snakemake-interface-executor-plugins@8.1:8", type=("build", "run"), when="@:0.1.3"
+ )
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-drmaa/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-drmaa/package.py
new file mode 100644
index 0000000000..c3229af554
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-drmaa/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginDrmaa(PythonPackage):
+ """A snakemake executor plugin for submission of jobs via DRMAA."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-drmaa"
+ pypi = "snakemake_executor_plugin_drmaa/snakemake_executor_plugin_drmaa-0.1.3.tar.gz"
+
+ license("MIT")
+
+ version("0.1.3", sha256="1250d0f307bf3db3aa3f26f85ea5ecc7ae00b2598ea1e1afceab7a457042fa12")
+
+ depends_on("py-snakemake-interface-common@1.13:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.1:8", type=("build", "run"))
+ depends_on("py-drmaa@0.7.9:0.7", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-flux/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-flux/package.py
new file mode 100644
index 0000000000..16bf81fb25
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-flux/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginFlux(PythonPackage):
+ """A Snakemake executor plugin for the Flux scheduler."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-flux"
+ pypi = "snakemake_executor_plugin_flux/snakemake_executor_plugin_flux-0.1.0.tar.gz"
+
+ license("MIT")
+
+ version("0.1.0", sha256="92b1944dcf9ea163519a8879d4d638df2b3d0cd83ea6e8397d26046897811214")
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.1.1:8", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-googlebatch/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-googlebatch/package.py
new file mode 100644
index 0000000000..eef0a4c409
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-googlebatch/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginGooglebatch(PythonPackage):
+ """A Snakemake executor plugin."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-googlebatch"
+ pypi = (
+ "snakemake_executor_plugin_googlebatch/snakemake_executor_plugin_googlebatch-0.3.0.tar.gz"
+ )
+
+ license("MIT")
+
+ version("0.3.0", sha256="b143fcaeffceec682bc0f7e3f13eece3596a5d6faaf41fab94977f4a93948c16")
+
+ depends_on("py-google-cloud-batch@0.17.1:0.17", type=("build", "run"))
+ depends_on("py-requests@2.31:2", type=("build", "run"))
+ depends_on("py-google-api-core@2.12:2", type=("build", "run"))
+ depends_on("py-google-cloud-storage@2.12:2", type=("build", "run"))
+ depends_on("py-jinja2@3.1.2:3", type=("build", "run"))
+ depends_on("py-google-cloud-logging@3.8:3", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.1.1:8", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-kubernetes/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-kubernetes/package.py
new file mode 100644
index 0000000000..2f390c5813
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-kubernetes/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginKubernetes(PythonPackage):
+ """A Snakemake executor plugin for submission of jobs to Kubernetes."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-kubernetes"
+ pypi = "snakemake_executor_plugin_kubernetes/snakemake_executor_plugin_kubernetes-0.1.4.tar.gz"
+
+ license("MIT")
+
+ version("0.1.4", sha256="c3aeac87939ec5d038efdc3ba7dbbef5eeb3171c1b718b8af850b6287b9c54ff")
+
+ depends_on("py-kubernetes@27.2:27", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14.1:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.0.2:8", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm-jobstep/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm-jobstep/package.py
new file mode 100644
index 0000000000..83d1ce32da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm-jobstep/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginSlurmJobstep(PythonPackage):
+ """A Snakemake executor plugin for running srun jobs inside of SLURM jobs
+ (meant for internal use by snakemake-executor-plugin-slurm)."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep"
+ pypi = (
+ "snakemake_executor_plugin_slurm_jobstep/"
+ "snakemake_executor_plugin_slurm_jobstep-0.2.1.tar.gz"
+ )
+ maintainers("w8jcik")
+
+ license("MIT")
+
+ version("0.2.1", sha256="58894d52b5998a34fa6f60ec511ff0bfde4a9ec96714bcaa3cd2f46cf8a33859")
+ version("0.1.11", sha256="cafdac937796ab0dfc0354c42380167a44a1db00c4edc98ab736a6ace2201a94")
+ version("0.1.10", sha256="321b6bdf7883a8fb40ff4aeeb88633502e4db8394e40b6628db41a430c2eae2b")
+
+ depends_on("py-snakemake-interface-common@1.13:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@9", type=("build", "run"), when="@0.1.11:")
+ depends_on(
+ "py-snakemake-interface-executor-plugins@8.2:8", type=("build", "run"), when="@:0.1.10"
+ )
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm/package.py
new file mode 100644
index 0000000000..ecfeaec56d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-slurm/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginSlurm(PythonPackage):
+ """A Snakemake executor plugin for submitting jobs to a SLURM cluster."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-slurm"
+ pypi = "snakemake_executor_plugin_slurm/snakemake_executor_plugin_slurm-0.10.0.tar.gz"
+ maintainers("w8jcik")
+
+ license("MIT")
+
+ version("0.10.0", sha256="d970bd08e00f1664adbd3c421c956b2ce926359ff10a4d7650c444c1179bec3f")
+ version("0.3.2", sha256="3912f2895eab1270d7a42959a2e221ce53428dfffb847e03ec6bc4eead88e30b")
+
+ depends_on("py-throttler@1.2.2:1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.13:1", type=("build", "run"))
+
+ depends_on(
+ "py-snakemake-interface-executor-plugins@9.1.1:9", type=("build", "run"), when="@0.4.4:"
+ )
+ depends_on(
+ "py-snakemake-interface-executor-plugins@9", type=("build", "run"), when="@0.4.2:0.4.3"
+ )
+ depends_on(
+ "py-snakemake-interface-executor-plugins@8.2:8", type=("build", "run"), when="@:0.4.1"
+ )
+
+ depends_on(
+ "py-snakemake-executor-plugin-slurm-jobstep@0.2", type=("build", "run"), when="@0.4.4:"
+ )
+ depends_on(
+ "py-snakemake-executor-plugin-slurm-jobstep@0.1.10:0.1",
+ type=("build", "run"),
+ when="@:0.4.3",
+ )
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-tes/package.py b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-tes/package.py
new file mode 100644
index 0000000000..49d5ac0ab8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-executor-plugin-tes/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeExecutorPluginTes(PythonPackage):
+ """A Snakemake executor plugin for submitting jobs via GA4GH TES."""
+
+ homepage = "https://github.com/snakemake/snakemake-executor-plugin-tes"
+ pypi = "snakemake_executor_plugin_tes/snakemake_executor_plugin_tes-0.1.2.tar.gz"
+
+ license("MIT")
+
+ version("0.1.2", sha256="bec01801ae3f158cfe7ca406a513455bcffa36fa7f83e35b2c7cb93bec9b00e9")
+
+ depends_on("py-py-tes@0.4.2:0.4", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-executor-plugins@8.1.1:8", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py b/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py
new file mode 100644
index 0000000000..51ec9cf546
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-interface-common/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeInterfaceCommon(PythonPackage):
+ """Common functions and classes for Snakemake and its plugins."""
+
+ homepage = "https://github.com/snakemake/snakemake-interface-common"
+ pypi = "snakemake_interface_common/snakemake_interface_common-1.17.3.tar.gz"
+ maintainers("w8jcik")
+
+ license("MIT")
+
+ version("1.17.3", sha256="cca6e2c728072a285a8e750f00fdd98d9c50063912184c41f8b89e4cab66c7b0")
+ version("1.17.1", sha256="555c8218d9b68ddc1046f94a517e7d0f22e15bdc839d6ce149608d8ec137b9ae")
+
+ depends_on("py-argparse-dataclass@2", type=("build", "run"))
+ depends_on("py-configargparse@1.7:1", type=("build", "run"))
+
+ depends_on("python@:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-interface-executor-plugins/package.py b/var/spack/repos/builtin/packages/py-snakemake-interface-executor-plugins/package.py
new file mode 100644
index 0000000000..7c95062efe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-interface-executor-plugins/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeInterfaceExecutorPlugins(PythonPackage):
+ """This package provides a stable interface for interactions between Snakemake and its
+ executor plugins."""
+
+ homepage = "https://github.com/snakemake/snakemake-interface-executor-plugins"
+ pypi = "snakemake_interface_executor_plugins/snakemake_interface_executor_plugins-9.2.0.tar.gz"
+ maintainers("w8jcik")
+
+ license("MIT")
+
+ version("9.2.0", sha256="67feaf438a0b8b041ec5f1a1dd859f729036c70c07c9fdad895135f5b949e40a")
+ version("8.2.0", sha256="4c74e3e1751bab6b266baf8688e854b8b4c5c5e10f5e34c581f42d69af4ff13b")
+
+ depends_on("py-argparse-dataclass@2", type=("build", "run"))
+ depends_on("py-throttler@1.2.2:1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.12:1", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-interface-report-plugins/package.py b/var/spack/repos/builtin/packages/py-snakemake-interface-report-plugins/package.py
new file mode 100644
index 0000000000..c5236c5e67
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-interface-report-plugins/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeInterfaceReportPlugins(PythonPackage):
+ """The interface for Snakemake report plugins."""
+
+ homepage = "https://github.com/snakemake/snakemake-interface-report-plugins"
+ pypi = "snakemake_interface_report_plugins/snakemake_interface_report_plugins-1.0.0.tar.gz"
+
+ license("MIT")
+
+ version("1.0.0", sha256="02311cdc4bebab2a1c28469b5e6d5c6ac6e9c66998ad4e4b3229f1472127490f")
+
+ depends_on("py-snakemake-interface-common@1.16:1", type=("build", "run"))
+
+ depends_on("python@:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-interface-storage-plugins/package.py b/var/spack/repos/builtin/packages/py-snakemake-interface-storage-plugins/package.py
new file mode 100644
index 0000000000..1ff4436dae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-interface-storage-plugins/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeInterfaceStoragePlugins(PythonPackage):
+ """This package provides a stable interface for interactions between Snakemake and its storage
+ plugins."""
+
+ homepage = "https://github.com/snakemake/snakemake-interface-storage-plugins"
+ pypi = "snakemake_interface_storage_plugins/snakemake_interface_storage_plugins-3.3.0.tar.gz"
+ maintainers("w8jcik")
+
+ license("MIT")
+
+ version("3.3.0", sha256="203d8f794dfb37d568ad01a6c375fa8beac36df8e488c0f9b9f75984769c362a")
+ version("3.1.0", sha256="26e95be235ef2a9716b890ea96c3a9a2e62061c5d72fbb89c2fad2afada87304")
+
+ depends_on("py-wrapt@1.15:1", type=("build", "run"))
+ depends_on("py-reretry@0.11.8:0.11", type=("build", "run"))
+ depends_on("py-throttler@1.2.2:1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.12:1", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-azure/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-azure/package.py
new file mode 100644
index 0000000000..fad1a55e89
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-azure/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginAzure(PythonPackage):
+ """A Snakemake storage plugin to read and write from Azure Blob Storage."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-azure"
+ pypi = "snakemake_storage_plugin_azure/snakemake_storage_plugin_azure-0.1.4.tar.gz"
+
+ license("MIT")
+
+ version("0.1.4", sha256="dcfcf285c9f1b1aa89db359afbf02b28d9e57a97ddac66747d3e46832e7ddbff")
+
+ depends_on("py-azure-storage-blob@12.19:12", type=("build", "run"))
+ depends_on("py-azure-core@1.29.5:1", type=("build", "run"))
+ depends_on("py-azure-identity@1.15:1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.15:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-fs/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-fs/package.py
new file mode 100644
index 0000000000..3ebae05239
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-fs/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginFs(PythonPackage):
+ """A Snakemake storage plugin that reads and writes from a locally mounted filesystem
+ using rsync."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-fs"
+ pypi = "snakemake_storage_plugin_fs/snakemake_storage_plugin_fs-0.1.5.tar.gz"
+
+ license("MIT")
+
+ version("0.2.0", sha256="cad1859036cbf429ea6fdb97f242567ec54a36d0b6ff900ce0d3ecfb6a824ae7")
+
+ depends_on("py-sysrsync@1.1.1:1", type=("build", "run"))
+ depends_on("py-reretry@0.11.8:0.11", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.17:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3.1:3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-ftp/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-ftp/package.py
new file mode 100644
index 0000000000..9faf36aefb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-ftp/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginFtp(PythonPackage):
+ """A Snakemake plugin for handling input and output via FTP."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-ftp"
+ pypi = "snakemake_storage_plugin_ftp/snakemake_storage_plugin_ftp-0.1.2.tar.gz"
+
+ license("MIT")
+
+ version("0.1.2", sha256="e3097e19dbe9ed4c8cf794e1d4594c3032ee7f7a9f7797dfb0d2556f0aafe07c")
+
+ depends_on("py-ftputil@5.0.4:5", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.15.1:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-gcs/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-gcs/package.py
new file mode 100644
index 0000000000..406ba3dd24
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-gcs/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginGcs(PythonPackage):
+ """A Snakemake storage plugin for Google Cloud Storage."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-gcs"
+ pypi = "snakemake_storage_plugin_gcs/snakemake_storage_plugin_gcs-0.1.3.tar.gz"
+
+ license("MIT")
+
+ version("0.1.3", sha256="f0315596120160656b8c8afec66e3b31b4a2889b9d0cead2102f9d924ec0b326")
+
+ depends_on("py-google-cloud-storage@2.12:2", type=("build", "run"))
+ depends_on("py-google-crc32c@1.1.2:1", type=("build", "run"))
+
+ # This is not in the package definition, but I am pretty sure that it is needed
+ # https://github.com/snakemake/snakemake-storage-plugin-gcs/issues/19
+ depends_on("py-snakemake-interface-common@1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-http/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-http/package.py
new file mode 100644
index 0000000000..aaeda6380d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-http/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginHttp(PythonPackage):
+ """Snakemake storage plugin for downloading input files from HTTP(s)."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-http"
+ pypi = "snakemake_storage_plugin_http/snakemake_storage_plugin_http-0.2.3.tar.gz"
+
+ license("MIT")
+
+ version("0.2.3", sha256="e4944a7c134e98515d9473c867c4ce071e3b625a5a9002a00da6ac917bc0c0ad")
+
+ depends_on("py-requests@2.31:2", type=("build", "run"))
+ depends_on("py-requests-oauthlib@1.3.1:1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-s3/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-s3/package.py
new file mode 100644
index 0000000000..5eb4ca8fe1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-s3/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginS3(PythonPackage):
+ """A Snakemake storage plugin for S3 API storage (AWS S3, MinIO, etc.)."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-s3"
+ pypi = "snakemake_storage_plugin_s3/snakemake_storage_plugin_s3-0.2.9.tar.gz"
+
+ license("MIT")
+
+ version("0.2.10", sha256="a4554d170b5621751aba20ee08e6357090471a0a68b173525b118580c287a12e")
+
+ depends_on("py-boto3@1.33:1", type=("build", "run"))
+ depends_on("py-botocore@1.33:1", type=("build", "run"))
+ depends_on("py-urllib3@2:2.1", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-sftp/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-sftp/package.py
new file mode 100644
index 0000000000..93bebff2d7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-sftp/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginSftp(PythonPackage):
+ """A Snakemake storage plugin that handles files on an SFTP server."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-sftp"
+ pypi = "snakemake_storage_plugin_sftp/snakemake_storage_plugin_sftp-0.1.2.tar.gz"
+
+ license("MIT")
+
+ version("0.1.2", sha256="1b5f99a6baf334d74e209d6ec8a59e495e56098cf6e9a19954e472ba1501525c")
+
+ depends_on("py-pysftp@0.2.9:0.2", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14.3:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-zenodo/package.py b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-zenodo/package.py
new file mode 100644
index 0000000000..e9640a513a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snakemake-storage-plugin-zenodo/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnakemakeStoragePluginZenodo(PythonPackage):
+ """A Snakemake storage plugin for reading from and writing to zenodo.org."""
+
+ homepage = "https://github.com/snakemake/snakemake-storage-plugin-zenodo"
+ pypi = "snakemake_storage_plugin_zenodo/snakemake_storage_plugin_zenodo-0.1.2.tar.gz"
+
+ license("MIT")
+
+ version("0.1.2", sha256="3675e76ae5dc930664bbcc1132a957c6490199c366e4e1e607d1491a7a46cf3d")
+
+ depends_on("py-requests@2.31:2", type=("build", "run"))
+
+ depends_on("py-snakemake-interface-common@1.14.4:1", type=("build", "run"))
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"))
+
+ depends_on("python@3.11:3", type=("build", "run"))
+ depends_on("py-poetry-core", type="build")
diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py
index 802be084b4..7dfe7ce2f8 100644
--- a/var/spack/repos/builtin/packages/py-sncosmo/package.py
+++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py
@@ -17,6 +17,8 @@ class PySncosmo(PythonPackage):
version("1.2.0", sha256="f3969eec5b25f60c70418dbd64765a2b4735bb53c210c61d0aab68916daea588")
+ depends_on("c", type="build") # generated
+
# Required dependencies
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-snoop/package.py b/var/spack/repos/builtin/packages/py-snoop/package.py
new file mode 100644
index 0000000000..54be5c8d15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-snoop/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySnoop(PythonPackage):
+ """snoop is a powerful set of Python debugging tools. It's primarily meant
+ to be a more featureful and refined version of PySnooper. It also includes
+ its own version of icecream and some other nifty stuff."""
+
+ pypi = "snoop/snoop-0.4.3.tar.gz"
+
+ license("MIT", checked_by="jmlapre")
+
+ version("0.4.3", sha256="2e0930bb19ff0dbdaa6f5933f88e89ed5984210ea9f9de0e1d8231fa5c1c1f25")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools-scm+toml", type="build")
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-cheap-repr@0.4.0:", type=("build", "run"))
+ depends_on("py-executing", type=("build", "run"))
+ depends_on("py-asttokens", type=("build", "run"))
+ depends_on("py-pygments", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sonlib/package.py b/var/spack/repos/builtin/packages/py-sonlib/package.py
index 73c2457b61..1095819687 100644
--- a/var/spack/repos/builtin/packages/py-sonlib/package.py
+++ b/var/spack/repos/builtin/packages/py-sonlib/package.py
@@ -27,4 +27,7 @@ class PySonlib(PythonPackage):
version("devel", branch="master")
version("20200401", commit="7ebe2ede05a6ee366d93a7a993db69a99943a68f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-soupsieve/package.py b/var/spack/repos/builtin/packages/py-soupsieve/package.py
index fc8efc8320..1e3cba5f06 100644
--- a/var/spack/repos/builtin/packages/py-soupsieve/package.py
+++ b/var/spack/repos/builtin/packages/py-soupsieve/package.py
@@ -14,6 +14,9 @@ class PySoupsieve(PythonPackage):
license("MIT")
+ # Circular dependency on beautifulsoup4
+ skip_modules = ["soupsieve"]
+
version("2.4.1", sha256="89d12b2d5dfcd2c9e8c22326da9d9aa9cb3dfab0a83a024f05704076ee8d35ea")
version(
"2.3.2.post1", sha256="fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"
diff --git a/var/spack/repos/builtin/packages/py-spacy/package.py b/var/spack/repos/builtin/packages/py-spacy/package.py
index d0c4badc8b..cf4620953b 100644
--- a/var/spack/repos/builtin/packages/py-spacy/package.py
+++ b/var/spack/repos/builtin/packages/py-spacy/package.py
@@ -20,6 +20,8 @@ class PySpacy(PythonPackage):
version("2.3.2", sha256="818de26e0e383f64ccbe3db185574920de05923d8deac8bbb12113b9e33cee1f")
version("2.2.4", sha256="f0f3a67c5841e6e35d62c98f40ebb3d132587d3aba4f4dccac5056c4e90ff5b9")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@2.7:2.8,3.4:", type=("build", "run"), when="@2.2.4:2.2")
depends_on("python@2.7:2.8,3.5:", type=("build", "run"), when="@2.3.0:")
depends_on("py-cython@0.25:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-spatialpandas/package.py b/var/spack/repos/builtin/packages/py-spatialpandas/package.py
new file mode 100644
index 0000000000..307eca5c42
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-spatialpandas/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySpatialpandas(PythonPackage):
+ """Pandas extension arrays for spatial/geometric operations."""
+
+ homepage = "https://holoviz.org/"
+ pypi = "spatialpandas/spatialpandas-1.19.1.tar.gz"
+ git = "https://github.com/holoviz/spatialpandas.git"
+
+ license("BSD-2-Clause", checked_by="climbfuji")
+
+ version("0.4.10", sha256="032e24ebb40f75c5c79cb79d7c281f2990e69ba382c0b24acb53da7bba60851c")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ depends_on("py-param", type="build")
+
+ depends_on("py-dask", type="run")
+ depends_on("py-fsspec@2022.8:", type="run")
+ depends_on("py-numba", type="run")
+ depends_on("py-packaging", type="run")
+ depends_on("py-pandas", type="run")
+ depends_on("py-pyarrow@10:", type="run")
+ depends_on("py-retrying", type="run")
diff --git a/var/spack/repos/builtin/packages/py-spdlog/package.py b/var/spack/repos/builtin/packages/py-spdlog/package.py
index ec42822286..79204b0381 100644
--- a/var/spack/repos/builtin/packages/py-spdlog/package.py
+++ b/var/spack/repos/builtin/packages/py-spdlog/package.py
@@ -24,6 +24,8 @@ class PySpdlog(PythonPackage):
version("master", branch="master", submodules=True)
version("2.0.0", sha256="b8d3732839850da414a47e91547ee1246f0690cb83f43f11a1fbaec40b7b968c")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-pybind11@2.2:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-pytest-runner", type="build")
diff --git a/var/spack/repos/builtin/packages/py-spglib/package.py b/var/spack/repos/builtin/packages/py-spglib/package.py
index eb65819c92..dda1f57eca 100644
--- a/var/spack/repos/builtin/packages/py-spglib/package.py
+++ b/var/spack/repos/builtin/packages/py-spglib/package.py
@@ -20,5 +20,9 @@ class PySpglib(PythonPackage):
version("1.16.1", sha256="9fd2fefbd83993b135877a69c498d8ddcf20a9980562b65b800cfb4cdadad003")
version("1.9.9.18", sha256="cbbb8383320b500dc6100b83d5e914a26a97ef8fc97c82d8921b10220e4126cd")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@18.0:", type="build")
depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/spglib/spglib/issues/407
+ depends_on("py-numpy@:1", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sphinx-click/package.py b/var/spack/repos/builtin/packages/py-sphinx-click/package.py
new file mode 100644
index 0000000000..d39d10f5de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinx-click/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySphinxClick(PythonPackage):
+ """Sphinx plugin that allows you to automatically extract documentation
+ from a Click-based application and include it in your docs"""
+
+ homepage = "https://sphinx-click.readthedocs.io/en/latest"
+ pypi = "sphinx_click/sphinx_click-6.0.0.tar.gz"
+
+ maintainers("TomMelt")
+
+ license("MIT", checked_by="tommelt")
+
+ version("6.0.0", sha256="f5d664321dc0c6622ff019f1e1c84e58ce0cecfddeb510e004cf60c2a3ab465b")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-click@8:", type=("build", "run"))
+ depends_on("py-sphinx@4:", type=("build", "run"))
+ depends_on("py-docutils", type=("build", "run"))
+ depends_on("py-pbr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sphinx-design/package.py b/var/spack/repos/builtin/packages/py-sphinx-design/package.py
index 11853e7b49..61d56886ef 100644
--- a/var/spack/repos/builtin/packages/py-sphinx-design/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx-design/package.py
@@ -16,11 +16,18 @@ class PySphinxDesign(PythonPackage):
license("MIT")
+ version("0.6.1", sha256="b44eea3719386d04d765c1a8257caca2b3e6f8421d7b3a5e742c0fd45f84e632")
+ version("0.6.0", sha256="ec8e3c5c59fed4049b3a5a2e209360feab31829346b5f6a0c7c342b894082192")
+ version("0.5.0", sha256="e8e513acea6f92d15c6de3b34e954458f245b8e761b45b63950f65373352ab00")
version("0.4.1", sha256="5b6418ba4a2dc3d83592ea0ff61a52a891fe72195a4c3a18b2fa1c7668ce4708")
version("0.4.0", sha256="b92948614900967499617d99aadd38ce5975ede924a18c7478cc6b8ec188f76b")
version("0.3.0", sha256="7183fa1fae55b37ef01bda5125a21ee841f5bbcbf59a35382be598180c4cefba")
- depends_on("python@3.7:", type=("build", "run"))
+ depends_on("python@3.7:", type=("build", "run"), when="@:0.4")
+ depends_on("python@3.8:", type=("build", "run"), when="@0.5")
+ depends_on("python@3.9:", type=("build", "run"), when="@0.6:")
depends_on("py-flit-core@3.4:3", type=("build"))
depends_on("py-sphinx@4:5", when="@0.3", type=("build", "run"))
- depends_on("py-sphinx@4:6", when="@0.4:", type=("build", "run"))
+ depends_on("py-sphinx@4:6", when="@0.4", type=("build", "run"))
+ depends_on("py-sphinx@5:7", when="@0.5:0.6.0", type=("build", "run"))
+ depends_on("py-sphinx@6:8", when="@0.6.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sphinx-fortran/package.py b/var/spack/repos/builtin/packages/py-sphinx-fortran/package.py
new file mode 100644
index 0000000000..dc67326bb2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinx-fortran/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySphinxFortran(PythonPackage):
+ """Fortran domain and autodoc extensions to Sphinx"""
+
+ homepage = "https://sphinx-fortran.readthedocs.io"
+ pypi = "sphinx-fortran/sphinx-fortran-1.1.1.tar.gz"
+ git = "https://github.com/VACUMM/sphinx-fortran.git"
+
+ maintainers("rbberger")
+
+ license("CeCILL-2.1")
+
+ version("master", branch="master")
+ version("1.1.1", sha256="e912e6b292e80768ad3cf580a560a4752c2c077eda4a1bbfc3a4ca0f11fb8ee1")
+
+ depends_on("py-sphinx@1:")
+ depends_on("py-numpy@1:")
+ depends_on("py-six")
+ depends_on("py-future")
diff --git a/var/spack/repos/builtin/packages/py-sphinx-immaterial/package.py b/var/spack/repos/builtin/packages/py-sphinx-immaterial/package.py
index a198b6ada8..be4781dd11 100644
--- a/var/spack/repos/builtin/packages/py-sphinx-immaterial/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx-immaterial/package.py
@@ -16,6 +16,8 @@ class PySphinxImmaterial(PythonPackage):
version("0.11.2", sha256="a1c8387ca8b4da282949e474647d06f3b2f7d12fe54e9e662b962771012bf257")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@6.3.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-sphinx-prompt/package.py b/var/spack/repos/builtin/packages/py-sphinx-prompt/package.py
new file mode 100644
index 0000000000..0e86fc32ef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinx-prompt/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PySphinxPrompt(PythonPackage):
+ """Sphinx directive to add unselectable prompt."""
+
+ homepage = "https://github.com/sbrunner/sphinx-prompt"
+ pypi = "sphinx_prompt/sphinx_prompt-1.8.0.tar.gz"
+
+ maintainers("LydDeb")
+
+ version("1.8.0", sha256="47482f86fcec29662fdfd23e7c04ef03582714195d01f5d565403320084372ed")
+ version("1.1.0", sha256="3d9cf382b750291f73d1f6f1713c4af0557c30208af124cd3d8731e607a4febf")
+
+ depends_on("python@3.9:3", when="@1.8.0", type=("build", "run"))
+ depends_on("py-poetry-core@1.0.0:", when="@1.8.0", type="build")
+ depends_on("py-poetry-plugin-tweak-dependencies-version", when="@1.8.0", type="build")
+ depends_on("py-poetry-dynamic-versioning", when="@1.8.0", type="build")
+ depends_on("py-sphinx@7.2.5", when="@1.8.0", type=("build", "run"))
+ depends_on("py-sphinx", when="@1.1.0", type=("build", "run"))
+ depends_on("py-pygments@2.16.1", when="@1.8.0", type=("build", "run"))
+ depends_on("py-pygments", when="@1.1.0", type=("build", "run"))
+ depends_on("py-docutils@0.20.1", when="@1.8.0", type=("build", "run"))
+
+ def url_for_version(self, version):
+ if version >= Version("1.6"):
+ url = "https://files.pythonhosted.org/packages/source/s/sphinx_prompt/sphinx_prompt-{0}.tar.gz"
+ else:
+ url = "https://files.pythonhosted.org/packages/source/s/sphinx_prompt/sphinx-prompt-{0}.tar.gz"
+ return url.format(version)
diff --git a/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py b/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py
index 43450c7538..ddad8ad063 100644
--- a/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx-tabs/package.py
@@ -17,10 +17,18 @@ class PySphinxTabs(PythonPackage):
license("MIT")
+ version("3.4.5", sha256="ba9d0c1e3e37aaadd4b5678449eb08176770e0fc227e769b6ce747df3ceea531")
+ version("3.4.4", sha256="f1b72c4f23d1ba9cdcaf880fd883524bc70689f561b9785719b8b3c3c5ed0aca")
+ version("3.4.1", sha256="d2a09f9e8316e400d57503f6df1c78005fdde220e5af589cc79d493159e1b832")
+ version("3.3.1", sha256="d10dd7fb2700329b8e5948ab9f8e3ef54fff30f79d2e42cfd1b0089ae26e8c5e")
version("3.2.0", sha256="33137914ed9b276e6a686d7a337310ee77b1dae316fdcbce60476913a152e0a4")
depends_on("python@3.6:3", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-sphinx@2:4", type=("build", "run"))
+ depends_on("py-sphinx", type=("build", "run"), when="@3.4.1:")
+ depends_on("py-sphinx@2:4", type=("build", "run"), when="@:3.3.1")
depends_on("py-pygments", type=("build", "run"))
- depends_on("py-docutils@0.16", type=("build", "run"))
+
+ depends_on("py-docutils@0.16", when="@3.2.0", type=("build", "run"))
+ depends_on("py-docutils@0.17", when="@3.3.1", type=("build", "run"))
+ depends_on("py-docutils@0.18", when="@3.4.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sphinx-toolbox/package.py b/var/spack/repos/builtin/packages/py-sphinx-toolbox/package.py
new file mode 100644
index 0000000000..d91cad45f5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinx-toolbox/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PySphinxToolbox(PythonPackage):
+ """Box of handy tools for Sphinx."""
+
+ homepage = "https://github.com/sphinx-toolbox/sphinx-toolbox"
+ pypi = "sphinx_toolbox/sphinx_toolbox-3.4.0.tar.gz"
+
+ maintainers("LydDeb")
+
+ version("3.4.0", sha256="e1cf2a3dea5ce80e175a6a9cee8b5b2792240ecf6c28993d87a63b6fcf606293")
+
+ depends_on("py-whey", type="build")
+
+ depends_on("py-apeye@0.4.0:", type=("build", "run"))
+ depends_on("py-autodocsumm@0.2.0:", type=("build", "run"))
+ depends_on("py-beautifulsoup4@4.9.1:", type=("build", "run"))
+ depends_on("py-cachecontrol@0.12.6:+filecache", type=("build", "run"))
+ depends_on("py-dict2css@0.2.3:", type=("build", "run"))
+ depends_on("py-docutils@0.16:0.18", type=("build", "run"))
+ depends_on("py-domdf-python-tools@2.9.0:", type=("build", "run"))
+ depends_on("py-html5lib@1.1:", type=("build", "run"))
+ depends_on("py-lockfile@0.12.2:", type=("build", "run"))
+ depends_on("py-ruamel-yaml@0.16.12:", type=("build", "run"))
+ depends_on("py-sphinx@3.2.0:", type=("build", "run"))
+ depends_on("py-sphinx-autodoc-typehints@1.11.1:", type=("build", "run"))
+ depends_on("py-sphinx-jinja2-compat@0.1.0:", type=("build", "run"))
+ depends_on("py-sphinx-prompt@1.1.0:", type=("build", "run"))
+ depends_on("py-sphinx-tabs@1.2.1:3.4", type=("build", "run"))
+ depends_on("py-tabulate@0.8.7:", type=("build", "run"))
+ depends_on("py-typing-extensions@3.7.4.3:3.10.0.0,3.10.0.2:", type=("build", "run"))
+ depends_on("py-typing-inspect@0.6.0:", when="^python@:3.7", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py
index 2e5f84e0d4..911040046c 100644
--- a/var/spack/repos/builtin/packages/py-sphinx/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx/package.py
@@ -16,6 +16,27 @@ class PySphinx(PythonPackage):
license("BSD-2-Clause")
+ version("8.1.0", sha256="109454425dbf4c78ecfdd481e56f078376d077edbda29804dba05c5161c8de06")
+ version("8.0.2", sha256="0cce1ddcc4fd3532cf1dd283bc7d886758362c5c1de6598696579ce96d8ffa5b")
+ version("8.0.1", sha256="7f762c18cfc1d4493e42f4a06a204c1ca55806c53f80a059e208e88d0668d661")
+ version("8.0.0", sha256="22551dc8fda6038a422bf1de59d91b31837b66afe45a3f30b2d8cc5aa9337343")
+
+ version("7.4.7", sha256="242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe")
+ version("7.4.6", sha256="116918d455c493fff3178edea12b4fe1c1e4894680fd81e7b7431ea21d47ca52")
+ version("7.4.5", sha256="a4abe5385bf856df094c1e6cadf24a2351b12057be3670b99a12c05a01d209f5")
+ version("7.4.4", sha256="43c911f997a4530b6cffd4ff8d5516591f6c60d178591f4406f0dd02282e3f64")
+ version("7.4.3", sha256="bd846bcb09fd2b6e94ce3e1ad50f4618bccf03cc7c17d0f3fa87393c0bd9178b")
+ version("7.4.2", sha256="946f1a6fa317b02f76deee78392ba712badc01cccd231b5995d933ae3365a151")
+ version("7.4.1", sha256="09539a16d74d1850b123cdd0752b9d24f3adc025ff887d611d1010348cd3648c")
+ version("7.4.0", sha256="8385520a28dc129ebf8b5fccfa1beb71215fd4455c6d10fa418e08c3c7a2ff9c")
+ version("7.3.7", sha256="a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc")
+ version("7.3.6", sha256="fc9f3d13fed5c9a0e677d368090e209899ce5d0081eb552b657e2923e57517f0")
+ version("7.3.5", sha256="30d03bbaa53b77d38863fd6b95cc4edb4a84a1512787b3b0c12fb3b4fb25d9e9")
+ version("7.3.4", sha256="614826a7cf76f0a4525875c3ed55e2c3618f906897cb7ad53511c5fedcbb35aa")
+ version("7.3.3", sha256="1918ba7a7c52f88b5a41ab7e8c55828235994968cfaeb5d10532711e1264087f")
+ version("7.3.2", sha256="404a4610689936c2259711e9927174489bac500baa398f31f9ab641e42981e9d")
+ version("7.3.1", sha256="9d9e436f536620e13cea3becf107cd5b2fe65922c9fc24d1945543b6657f3468")
+ version("7.3.0", sha256="7ad02a0677d43cbaab3f9477355a412e449472d3f4693e2df3842e7ccb7ae7c8")
version("7.2.6", sha256="9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5")
version("7.2.5", sha256="1a9290001b75c497fd087e92b0334f1bbfa1a1ae7fddc084990c4b7bd1130b88")
version("7.2.4", sha256="1aeec862bf1edff4374012ac38082e0d1daa066c9e327841a846401164797988")
@@ -83,55 +104,76 @@ class PySphinx(PythonPackage):
depends_on("py-flit-core@3.7:", when="@5.2:", type="build")
- depends_on("python@3.9:", when="@7.2:", type=("build", "run"))
- depends_on("python@3.8:", when="@6:", type=("build", "run"))
-
- depends_on("py-sphinxcontrib-applehelp", when="@2:", type=("build", "run"))
- depends_on("py-sphinxcontrib-devhelp", when="@2:", type=("build", "run"))
- depends_on("py-sphinxcontrib-jsmath", when="@2:", type=("build", "run"))
- depends_on("py-sphinxcontrib-htmlhelp@2:", when="@4.1.1:", type=("build", "run"))
- depends_on("py-sphinxcontrib-htmlhelp", when="@2:", type=("build", "run"))
- depends_on("py-sphinxcontrib-serializinghtml@1.1.9:", when="@7.2.3:", type=("build", "run"))
- depends_on("py-sphinxcontrib-serializinghtml@1.1.5:", when="@4.1.1:", type=("build", "run"))
- depends_on("py-sphinxcontrib-serializinghtml", when="@2:", type=("build", "run"))
- depends_on("py-sphinxcontrib-qthelp", when="@2:", type=("build", "run"))
- depends_on("py-jinja2@3:", when="@5.2:", type=("build", "run"))
- depends_on("py-jinja2@2.3:2", when="@:4.0.1", type=("build", "run"))
- depends_on("py-jinja2@2.3:", type=("build", "run"))
- depends_on("py-pygments@2.14:", when="@7.2:", type=("build", "run"))
- depends_on("py-pygments@2.13:", when="@6.0.1:", type=("build", "run"))
- depends_on("py-pygments@2.12:", when="@5.2:", type=("build", "run"))
- depends_on("py-pygments@2:", type=("build", "run"))
- depends_on("py-docutils@0.18.1:0.20", when="@7.0.1:", type=("build", "run"))
- depends_on("py-docutils@0.18.1:0.19", when="@6.2:7.0.0", type=("build", "run"))
- depends_on("py-docutils@0.18:0.19", when="@6.0:6.1", type=("build", "run"))
- depends_on("py-docutils@0.14:0.19", when="@5.1:5", type=("build", "run"))
- depends_on("py-docutils@0.14:0.18", when="@5.0", type=("build", "run"))
- depends_on("py-docutils@0.14:0.17", when="@4", type=("build", "run"))
- depends_on("py-docutils@0.12:0.16", when="@:3", type=("build", "run"))
- depends_on("py-snowballstemmer@2:", when="@5.2:", type=("build", "run"))
- depends_on("py-snowballstemmer@1.1:", type=("build", "run"))
- depends_on("py-babel@2.9:", when="@5.2:", type=("build", "run"))
- depends_on("py-babel@1.3:", type=("build", "run"))
- depends_on("py-alabaster@0.7", type=("build", "run"))
- depends_on("py-imagesize@1.3:", when="@5.2:", type=("build", "run"))
- depends_on("py-imagesize", when="@1.4:", type=("build", "run"))
- depends_on("py-requests@2.25:", when="@6:", type=("build", "run"))
- depends_on("py-requests@2.5:", when="@2:", type=("build", "run"))
- depends_on("py-requests@2.4:", when="@1.5.2:", type=("build", "run"))
- depends_on("py-packaging@21:", when="@5.2:", type=("build", "run"))
- depends_on("py-packaging", when="@1.7:", type=("build", "run"))
- depends_on("py-importlib-metadata@4.8:", when="@5.2: ^python@:3.9", type=("build", "run"))
- depends_on("py-importlib-metadata@4.4:", when="@4.4: ^python@:3.9", type=("build", "run"))
- depends_on("py-colorama@0.4.5:", when="@5.2: platform=windows", type=("build", "run"))
- depends_on("py-colorama@0.3.5:", when="platform=windows", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@8:")
+ depends_on("python@3.9:", when="@7.2:")
+ depends_on("python@3.8:", when="@6:")
+ depends_on("py-sphinxcontrib-applehelp@1.0.7:", when="@8.1:")
+ depends_on("py-sphinxcontrib-applehelp", when="@2:")
+ depends_on("py-sphinxcontrib-devhelp@1.0.6:", when="@8.1:")
+ depends_on("py-sphinxcontrib-devhelp", when="@2:")
+ depends_on("py-sphinxcontrib-htmlhelp@2.0.6:", when="@8.1:")
+ depends_on("py-sphinxcontrib-htmlhelp@2:", when="@4.1.1:")
+ depends_on("py-sphinxcontrib-htmlhelp", when="@2:")
+ depends_on("py-sphinxcontrib-jsmath@1.0.1:", when="@8.1:")
+ depends_on("py-sphinxcontrib-jsmath", when="@2:")
+ depends_on("py-sphinxcontrib-qthelp@1.0.6:", when="@8.1:")
+ depends_on("py-sphinxcontrib-qthelp", when="@2:")
+ depends_on("py-sphinxcontrib-serializinghtml@1.1.9:", when="@7.2.3:")
+ depends_on("py-sphinxcontrib-serializinghtml@1.1.5:", when="@4.1.1:")
+ depends_on("py-sphinxcontrib-serializinghtml", when="@2:")
+ depends_on("py-jinja2@3.1:", when="@7.4:")
+ depends_on("py-jinja2@3:", when="@5.2:")
+ depends_on("py-jinja2@2.3:2", when="@:4.0.1")
+ depends_on("py-jinja2@2.3:")
+ depends_on("py-pygments@2.17:", when="@7.4:")
+ depends_on("py-pygments@2.14:", when="@7.2:")
+ depends_on("py-pygments@2.13:", when="@6.0.1:")
+ depends_on("py-pygments@2.12:", when="@5.2:")
+ depends_on("py-pygments@2:")
+ depends_on("py-docutils@0.20:0.21", when="@7.4:")
+ depends_on("py-docutils@0.18.1:0.21", when="@7.3")
+ depends_on("py-docutils@0.18.1:0.20", when="@7.0.1:7.2")
+ depends_on("py-docutils@0.18.1:0.19", when="@6.2:7.0.0")
+ depends_on("py-docutils@0.18:0.19", when="@6.0:6.1")
+ depends_on("py-docutils@0.14:0.19", when="@5.1:5")
+ depends_on("py-docutils@0.14:0.18", when="@5.0")
+ depends_on("py-docutils@0.14:0.17", when="@4")
+ depends_on("py-docutils@0.12:0.16", when="@:3")
+ depends_on("py-snowballstemmer@2.2:", when="@7.4:")
+ depends_on("py-snowballstemmer@2:", when="@5.2:")
+ depends_on("py-snowballstemmer@1.1:")
+ depends_on("py-babel@2.13:", when="@7.4:")
+ depends_on("py-babel@2.9:", when="@5.2:")
+ depends_on("py-babel@1.3:")
+ depends_on("py-alabaster@0.7.14:", when="@8:")
+ depends_on("py-alabaster@0.7.14:0.7", when="@7.3:7.4")
+ depends_on("py-alabaster@0.7", when="@:7.2")
+ depends_on("py-imagesize@1.3:", when="@5.2:")
+ depends_on("py-imagesize", when="@1.4:")
+ depends_on("py-requests@2.30:", when="@7.4:")
+ depends_on("py-requests@2.25:", when="@6:")
+ depends_on("py-requests@2.5:", when="@2:")
+ depends_on("py-requests@2.4:", when="@1.5.2:")
+ depends_on("py-packaging@23:", when="@7.4:")
+ depends_on("py-packaging@21:", when="@5.2:")
+ depends_on("py-packaging", when="@1.7:")
+ depends_on("py-tomli@2:", when="@7.3.1: ^python@:3.10")
+ depends_on("py-colorama@0.4.6:", when="@7.4: platform=windows")
+ depends_on("py-colorama@0.4.5:", when="@5.2: platform=windows")
+ depends_on("py-colorama@0.3.5:", when="platform=windows")
# Historical dependencies
depends_on("py-setuptools", when="@4.4:5.1", type="build")
- depends_on("py-setuptools", when="@:4.3", type=("build", "run"))
- depends_on("py-sphinxcontrib-websupport", when="@1.6:1", type=("build", "run"))
- depends_on("py-six@1.5:", when="@:1", type=("build", "run"))
- depends_on("py-sphinx-rtd-theme@0.1:", when="@:1.3", type=("build", "run"))
+
+ with default_args(type=("build", "run")):
+ depends_on("py-importlib-metadata@6:", when="@7.4: ^python@:3.9")
+ depends_on("py-importlib-metadata@4.8:", when="@5.2: ^python@:3.9")
+ depends_on("py-importlib-metadata@4.4:", when="@4.4: ^python@:3.9")
+ depends_on("py-setuptools", when="@:4.3")
+ depends_on("py-sphinxcontrib-websupport", when="@1.6:1")
+ depends_on("py-six@1.5:", when="@:1")
+ depends_on("py-sphinx-rtd-theme@0.1:", when="@:1.3")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/S/Sphinx/{}-{}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py
index e84d9762ba..b7a5a518c6 100644
--- a/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py
@@ -12,7 +12,7 @@ class PySphinxcontribApplehelp(PythonPackage):
help books."""
homepage = "http://sphinx-doc.org/"
- pypi = "sphinxcontrib-applehelp/sphinxcontrib-applehelp-1.0.1.tar.gz"
+ pypi = "sphinxcontrib-applehelp/sphinxcontrib_applehelp-2.0.0.tar.gz"
git = "https://github.com/sphinx-doc/sphinxcontrib-applehelp.git"
# 'sphinx' requires 'sphinxcontrib-applehelp' at build-time, but
@@ -22,10 +22,21 @@ class PySphinxcontribApplehelp(PythonPackage):
license("BSD-2-Clause")
+ version("2.0.0", sha256="2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1")
version("1.0.4", sha256="828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e")
version("1.0.2", sha256="a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58")
version("1.0.1", sha256="edaa0ab2b2bc74403149cb0209d6775c96de797dfd5b5e2a71981309efab3897")
- depends_on("python@3.8:", when="@1.0.3:", type=("build", "run"))
- depends_on("py-setuptools@64:", when="@1.0.4:", type="build")
- depends_on("py-setuptools", type="build")
+ depends_on("py-flit-core@3.7:", when="@1.0.5:", type="build")
+ depends_on("py-setuptools@64:", when="@1.0.4", type="build")
+ depends_on("py-setuptools", when="@:1.0.3", type="build")
+
+ def url_for_version(self, version):
+ url = (
+ "https://files.pythonhosted.org/packages/source/s/sphinxcontrib-applehelp/{}-{}.tar.gz"
+ )
+ if version >= Version("1.0.5"):
+ name = "sphinxcontrib_applehelp"
+ else:
+ name = "sphinxcontrib-applehelp"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py
index 5821a4002b..40586bb8b8 100644
--- a/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py
@@ -12,7 +12,7 @@ class PySphinxcontribDevhelp(PythonPackage):
Devhelp document."""
homepage = "http://sphinx-doc.org/"
- pypi = "sphinxcontrib-devhelp/sphinxcontrib-devhelp-1.0.1.tar.gz"
+ pypi = "sphinxcontrib-devhelp/sphinxcontrib_devhelp-2.0.0.tar.gz"
git = "https://github.com/sphinx-doc/sphinxcontrib-devhelp.git"
# 'sphinx' requires 'sphinxcontrib-devhelp' at build-time, but
@@ -22,8 +22,17 @@ class PySphinxcontribDevhelp(PythonPackage):
license("BSD-2-Clause")
+ version("2.0.0", sha256="411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad")
version("1.0.2", sha256="ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4")
version("1.0.1", sha256="6c64b077937330a9128a4da74586e8c2130262f014689b4b89e2d08ee7294a34")
- depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ depends_on("py-flit-core@3.7:", when="@1.0.3:", type="build")
+ depends_on("py-setuptools", when="@:1.0.2", type="build")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/s/sphinxcontrib-devhelp/{}-{}.tar.gz"
+ if version >= Version("1.0.3"):
+ name = "sphinxcontrib_devhelp"
+ else:
+ name = "sphinxcontrib-devhelp"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py
index 036c046c82..82942bc32c 100644
--- a/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py
@@ -12,7 +12,7 @@ class PySphinxcontribHtmlhelp(PythonPackage):
document."""
homepage = "http://sphinx-doc.org/"
- pypi = "sphinxcontrib-htmlhelp/sphinxcontrib-htmlhelp-1.0.2.tar.gz"
+ pypi = "sphinxcontrib-htmlhelp/sphinxcontrib_htmlhelp-2.1.0.tar.gz"
git = "https://github.com/sphinx-doc/sphinxcontrib-htmlhelp.git"
# 'sphinx' requires 'sphinxcontrib-htmlhelp' at build-time, but
@@ -22,10 +22,21 @@ class PySphinxcontribHtmlhelp(PythonPackage):
license("BSD-2-Clause")
+ version("2.1.0", sha256="c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9")
version("2.0.1", sha256="0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff")
version("2.0.0", sha256="f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2")
version("1.0.2", sha256="4670f99f8951bd78cd4ad2ab962f798f5618b17675c35c5ac3b2132a14ea8422")
- depends_on("python@3.8:", when="@2.0.1:", type=("build", "run"))
+ depends_on("py-flit-core@3.7:", when="@2.0.2:", type="build")
depends_on("py-setuptools@64:", when="@2.0.1", type="build")
- depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools", when="@:2.0.0", type="build")
+
+ def url_for_version(self, version):
+ url = (
+ "https://files.pythonhosted.org/packages/source/s/sphinxcontrib-htmlhelp/{}-{}.tar.gz"
+ )
+ if version >= Version("2.0.2"):
+ name = "sphinxcontrib_htmlhelp"
+ else:
+ name = "sphinxcontrib-htmlhelp"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py
index d81e143c07..04aba1ae5c 100644
--- a/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py
@@ -12,7 +12,7 @@ class PySphinxcontribQthelp(PythonPackage):
document."""
homepage = "http://sphinx-doc.org/"
- pypi = "sphinxcontrib-qthelp/sphinxcontrib-qthelp-1.0.2.tar.gz"
+ pypi = "sphinxcontrib-qthelp/sphinxcontrib_qthelp-2.0.0.tar.gz"
git = "https://github.com/sphinx-doc/sphinxcontrib-qthelp.git"
# 'sphinx' requires 'sphinxcontrib-qthelp' at build-time, but
@@ -22,8 +22,17 @@ class PySphinxcontribQthelp(PythonPackage):
license("BSD-2-Clause")
+ version("2.0.0", sha256="4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab")
version("1.0.3", sha256="4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72")
version("1.0.2", sha256="79465ce11ae5694ff165becda529a600c754f4bc459778778c7017374d4d406f")
- depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+ depends_on("py-flit-core@3.7:", when="@1.0.4:", type="build")
+ depends_on("py-setuptools", when="@:1.0.3", type="build")
+
+ def url_for_version(self, version):
+ url = "https://files.pythonhosted.org/packages/source/s/sphinxcontrib-qthelp/{}-{}.tar.gz"
+ if version >= Version("1.0.4"):
+ name = "sphinxcontrib_qthelp"
+ else:
+ name = "sphinxcontrib-qthelp"
+ return url.format(name, version)
diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-spelling/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-spelling/package.py
new file mode 100644
index 0000000000..19e0de61b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-spelling/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySphinxcontribSpelling(PythonPackage):
+ """A spelling checker for Sphinx-based documentation"""
+
+ homepage = "https://sphinxcontrib-spelling.readthedocs.io"
+ pypi = "sphinxcontrib-spelling/sphinxcontrib-spelling-8.0.0.tar.gz"
+
+ maintainers("rbberger")
+
+ license("BSD-2-Clause")
+
+ version("8.0.0", sha256="199d0a16902ad80c387c2966dc9eb10f565b1fb15ccce17210402db7c2443e5c")
+
+ depends_on("python@3.7:")
+ depends_on("py-sphinx@3:")
+ depends_on("py-pyenchant@3.1.1:")
diff --git a/var/spack/repos/builtin/packages/py-sphinxemoji/package.py b/var/spack/repos/builtin/packages/py-sphinxemoji/package.py
new file mode 100644
index 0000000000..5ac736c2e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sphinxemoji/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySphinxemoji(PythonPackage):
+ """An extension to use emoji codes in your Sphinx documentation!"""
+
+ homepage = "https://sphinxemojicodes.readthedocs.io"
+ pypi = "sphinxemoji/sphinxemoji-0.2.0.tar.gz"
+ license("BSD-3-Clause")
+
+ version("0.2.0", sha256="27861d1dd7c6570f5e63020dac9a687263f7481f6d5d6409eb31ecebcc804e4c")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-sphinx@1.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py
index 1666f904eb..d6f4acc122 100644
--- a/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py
+++ b/var/spack/repos/builtin/packages/py-sqlalchemy-migrate/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class PySqlalchemyMigrate(PythonPackage):
"""Database schema migration for SQLAlchemy"""
- homepage = "http://www.openstack.org/"
+ homepage = "https://www.openstack.org/"
pypi = "sqlalchemy-migrate/sqlalchemy-migrate-0.13.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-sqlparse/package.py b/var/spack/repos/builtin/packages/py-sqlparse/package.py
index 2d52fdf57a..189600e195 100644
--- a/var/spack/repos/builtin/packages/py-sqlparse/package.py
+++ b/var/spack/repos/builtin/packages/py-sqlparse/package.py
@@ -14,6 +14,7 @@ class PySqlparse(PythonPackage):
license("BSD-3-Clause")
+ version("0.5.1", sha256="a9f1a42ca749a019aa98d996b58e917f4c9e1b9ff164610355f35248733767bb")
version("0.4.1", sha256="f75cdec98a4cc8296890279d744e1ae8618bb14dbad77e3d0637f0d7bb5d6535")
version("0.3.1", sha256="344b539482b75c244ac69fbb160d0f4d63a288a392475c8418ca692c594561f9")
version("0.3.0", sha256="a75fddae009fba1d66786203c9dd3a842aa4415475c466d15484139117108474")
@@ -21,4 +22,6 @@ class PySqlparse(PythonPackage):
version("0.2.3", sha256="12470ab41df1a7003a2957a79c6da9cd4ded180c8a193aa112fe0899b935ef30")
depends_on("py-setuptools", type="build")
+ depends_on("py-hatchling", when="@0.5.1:", type="build")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
+ depends_on("python@3.8:", when="@0.5.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-srsly/package.py b/var/spack/repos/builtin/packages/py-srsly/package.py
index d545991b31..2163eea774 100644
--- a/var/spack/repos/builtin/packages/py-srsly/package.py
+++ b/var/spack/repos/builtin/packages/py-srsly/package.py
@@ -20,6 +20,9 @@ class PySrsly(PythonPackage):
version("2.0.0", sha256="785b00e00406120dbef4ca82925051e6b60fe870c5f84f0d22b3632d574eb870")
version("1.0.2", sha256="59258b81d567df207f8a0a33c4b5fa232afccf1d927c8ce3ba5395bfd64c0ed8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.6:", when="@2:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-wheel", when="@2:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-sspilib/package.py b/var/spack/repos/builtin/packages/py-sspilib/package.py
new file mode 100644
index 0000000000..5a73c74ff8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sspilib/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySspilib(PythonPackage):
+ """SSPI API bindings for Python."""
+
+ homepage = "https://github.com/jborean93/sspilibi"
+ pypi = "sspilib/sspilib-0.1.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.1.0", sha256="58b5291553cf6220549c0f855e0e6973f4977375d8236ce47bb581efb3e9b1cf")
+
+ depends_on("py-setuptools@61:", type="build")
+ depends_on("py-cython@3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-stack-data/package.py b/var/spack/repos/builtin/packages/py-stack-data/package.py
index def3f0f10d..765803aab0 100644
--- a/var/spack/repos/builtin/packages/py-stack-data/package.py
+++ b/var/spack/repos/builtin/packages/py-stack-data/package.py
@@ -10,7 +10,7 @@ class PyStackData(PythonPackage):
"""Extract data from python stack frames and tracebacks for informative
displays."""
- homepage = "http://github.com/alexmojaki/stack_data"
+ homepage = "https://github.com/alexmojaki/stack_data"
pypi = "stack_data/stack_data-0.2.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-starlette/package.py b/var/spack/repos/builtin/packages/py-starlette/package.py
index 7f51b27973..ea2e1d2601 100644
--- a/var/spack/repos/builtin/packages/py-starlette/package.py
+++ b/var/spack/repos/builtin/packages/py-starlette/package.py
@@ -15,6 +15,12 @@ class PyStarlette(PythonPackage):
license("BSD-3-Clause")
+ version("0.41.2", sha256="9834fd799d1a87fd346deb76158668cfa0b0d56f85caefe8268e2d97c3468b62")
+ version("0.37.2", sha256="9af890290133b79fc3db55474ade20f6220a364a0402e0b556e7cd5e1e093823")
+ version("0.36.3", sha256="90a671733cfb35771d8cc605e0b679d23b992f8dcfad48cc60b38cb29aeb7080")
+ version("0.35.1", sha256="3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc")
+ version("0.32.0", sha256="87c899fe3aee6a42f711380b03e1d244a21079529cb3dbe1a5109e60915e0bbb")
+ version("0.28.0", sha256="7bf3da5e997e796cc202cef2bd3f96a7d9b1e1943203c2fe2b42e020bc658482")
version("0.27.0", sha256="6a6b0d042acb8d469a01eba54e9cda6cbd24ac602c4cd016723117d6a7e73b75")
version("0.23.1", sha256="8510e5b3d670326326c5c1d4cb657cc66832193fe5d5b7015a51c7b1e1b1bf42")
version("0.22.0", sha256="b092cbc365bea34dd6840b42861bdabb2f507f8671e642e8272d2442e08ea4ff")
diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py
index d4ea3153fc..b9d4d55600 100644
--- a/var/spack/repos/builtin/packages/py-statsmodels/package.py
+++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py
@@ -28,6 +28,9 @@ class PyStatsmodels(PythonPackage):
version("0.10.2", sha256="9cd2194c6642a8754e85f9a6e6912cdf996bebf6ff715d3cc67f65dadfd37cc9")
version("0.10.1", sha256="320659a80f916c2edf9dfbe83512d9004bb562b72eedb7d9374562038697fa10")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("python@3.8:", when="@0.14:", type=("build", "link", "run"))
depends_on("python", type=("build", "link", "run"))
@@ -51,6 +54,8 @@ class PyStatsmodels(PythonPackage):
depends_on("py-numpy@1.17:", when="@0.13:", type=("build", "link", "run"))
depends_on("py-numpy@1.15:", when="@0.12.1:", type=("build", "link", "run"))
depends_on("py-numpy@1.11:", when="@0.10.1:", type=("build", "link", "run"))
+ # https://github.com/statsmodels/statsmodels/issues/9194
+ depends_on("py-numpy@:1", when="@:0.14.1", type=("build", "link", "run"))
depends_on("py-scipy@1.4:", when="@0.13.5:", type=("build", "run"))
conflicts("^py-scipy@1.9.2")
depends_on("py-scipy@1.3:", when="@0.13:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py
index 1f344b74ac..60458f92eb 100644
--- a/var/spack/repos/builtin/packages/py-storm/package.py
+++ b/var/spack/repos/builtin/packages/py-storm/package.py
@@ -21,6 +21,8 @@ class PyStorm(PythonPackage):
url="https://files.pythonhosted.org/packages/source/s/storm/storm-0.23.tar.bz2",
)
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-six", type=("build", "run"))
depends_on("py-zope-interface@4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-stratify/package.py b/var/spack/repos/builtin/packages/py-stratify/package.py
index 05fbe674c8..690cb190e1 100644
--- a/var/spack/repos/builtin/packages/py-stratify/package.py
+++ b/var/spack/repos/builtin/packages/py-stratify/package.py
@@ -19,6 +19,8 @@ class PyStratify(PythonPackage):
version("0.1", sha256="5426f3b66e45e1010952d426e5a7be42cd45fe65f1cd73a98fee1eb7c110c6ee")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-cython", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-striprtf/package.py b/var/spack/repos/builtin/packages/py-striprtf/package.py
new file mode 100644
index 0000000000..7e8dea330e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-striprtf/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyStriprtf(PythonPackage):
+ """A simple library to convert rtf to text"""
+
+ homepage = "https://github.com/joshy/striprtf"
+ pypi = "striprtf/striprtf-0.0.26.tar.gz"
+
+ license("BSD-3-Clause", checked_by="qwertos")
+
+ version("0.0.26", sha256="fdb2bba7ac440072d1c41eab50d8d74ae88f60a8b6575c6e2c7805dc462093aa")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-stsci-distutils/package.py b/var/spack/repos/builtin/packages/py-stsci-distutils/package.py
index a8d3eab8fa..da2fb77f42 100644
--- a/var/spack/repos/builtin/packages/py-stsci-distutils/package.py
+++ b/var/spack/repos/builtin/packages/py-stsci-distutils/package.py
@@ -15,5 +15,7 @@ class PyStsciDistutils(PythonPackage):
version("0.3.8", sha256="a52f3ec3b392a9cecd98d143b678c27346cbfa8f34c34698821d7e167907edce")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-d2to1", type="build")
diff --git a/var/spack/repos/builtin/packages/py-superqt/package.py b/var/spack/repos/builtin/packages/py-superqt/package.py
new file mode 100644
index 0000000000..36813fcdf3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-superqt/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySuperqt(PythonPackage):
+ """Missing widgets and components for PyQt/PySide"""
+
+ homepage = "https://pyapp-kit.github.io/superqt/"
+ pypi = "superqt/superqt-0.6.1.tar.gz"
+
+ license("BSD-3-Clause", checked_by="A-N-Other")
+
+ version("0.6.1", sha256="f1a9e0499c4bbcef34b6f895eb57cd41301b3799242cd030029238124184dade")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+
+ depends_on("py-packaging", type=("build", "run"))
+ depends_on("py-pygments@2.4:", type=("build", "run"))
+ depends_on("py-qtpy@1.1:", type=("build", "run"))
+ depends_on("py-typing-extensions@3.7.4.3:", type=("build", "run"))
+
+ conflicts("^py-typing-extensions@3.10.0.0")
diff --git a/var/spack/repos/builtin/packages/py-swagger-spec-validator/package.py b/var/spack/repos/builtin/packages/py-swagger-spec-validator/package.py
new file mode 100644
index 0000000000..86d120d5e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-swagger-spec-validator/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySwaggerSpecValidator(PythonPackage):
+ """
+ A Python library that validates Swagger Specs against
+ the Swagger 1.2 or Swagger 2.0 specification.
+ """
+
+ homepage = "https://github.com/Yelp/swagger_spec_validator"
+ pypi = "swagger-spec-validator/swagger-spec-validator-2.7.6.tar.gz"
+
+ version("2.7.6", sha256="73f33e631a58f407265f2f813d194f2762a2b86f9aa905e7eee3df9b7f9428d3")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-jsonschema", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-six", type=("build", "run"))
+ depends_on("py-pyrsistent@:0.16", when="^python@:3.0", type="build")
diff --git a/var/spack/repos/builtin/packages/py-symengine/package.py b/var/spack/repos/builtin/packages/py-symengine/package.py
index 7712640750..074b2264ad 100644
--- a/var/spack/repos/builtin/packages/py-symengine/package.py
+++ b/var/spack/repos/builtin/packages/py-symengine/package.py
@@ -25,6 +25,8 @@ class PySymengine(PythonPackage):
)
version("0.2.0", sha256="78a14aea7aad5e7cbfb5cabe141581f9bba30e3c319690e5db8ad99fdf2d8885")
+ depends_on("cxx", type="build") # generated
+
# Build dependencies
depends_on("python@2.7:2.8,3.3:", type=("build", "run"), when="@0.2.0")
depends_on("python@3.6:3", type=("build", "run"), when="@0.8.1:")
diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py
index 339ee0027a..9145b60411 100644
--- a/var/spack/repos/builtin/packages/py-sympy/package.py
+++ b/var/spack/repos/builtin/packages/py-sympy/package.py
@@ -13,6 +13,8 @@ class PySympy(PythonPackage):
license("BSD-3-Clause")
+ version("1.13.0", sha256="3b6af8f4d008b9a1a6a4268b335b984b23835f26d1d60b0526ebc71d48a25f57")
+ version("1.12", sha256="ebf595c8dac3e0fdc4152c51878b498396ec7f30e7a914d6071e674d49420fb8")
version("1.11.1", sha256="e32380dce63cb7c0108ed525570092fd45168bdae2faa17e528221ef72e88658")
version("1.8", sha256="1ca588a9f6ce6a323c5592f9635159c2093572826668a1022c75c75bdf0297cb")
version("1.7.1", sha256="a3de9261e97535b83bb8607b0da2c7d03126650fafea2b2789657b229c246b2e")
@@ -36,4 +38,5 @@ class PySympy(PythonPackage):
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
- depends_on("py-mpmath@0.19:", when="@1.0:", type=("build", "run"))
+ depends_on("py-mpmath@0.19:", when="@1.0:1.12", type=("build", "run"))
+ depends_on("py-mpmath@1.1.0:1.3", when="@1.13.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-sysrsync/package.py b/var/spack/repos/builtin/packages/py-sysrsync/package.py
new file mode 100644
index 0000000000..7598426b5f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sysrsync/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PySysrsync(PythonPackage):
+ """Python module that wraps system calls to rsync."""
+
+ pypi = "sysrsync/sysrsync-1.1.1.tar.gz"
+
+ license("MIT")
+
+ version("1.1.1", sha256="435f9eb620e68ffb18ca5cbad32b113396a432361c7722038eab65c97dd83bd5")
+
+ depends_on("py-toml@0.10.0:0.10", type=("build", "run"))
+ depends_on("rsync", type="run")
+
+ depends_on("python@:3", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-systemd-python/package.py b/var/spack/repos/builtin/packages/py-systemd-python/package.py
index 5b023362ca..4130a852e5 100644
--- a/var/spack/repos/builtin/packages/py-systemd-python/package.py
+++ b/var/spack/repos/builtin/packages/py-systemd-python/package.py
@@ -14,7 +14,12 @@ class PySystemdPython(PythonPackage):
license("LGPL-2.1-or-later")
+ version("235", sha256="4e57f39797fd5d9e2d22b8806a252d7c0106c936039d1e71c8c6b8008e695c0a")
version("234", sha256="fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895db83e7")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
+ depends_on("pkgconfig", type="build")
+ # depends on system installed systemd and systemd-devel packages
diff --git a/var/spack/repos/builtin/packages/py-tables/package.py b/var/spack/repos/builtin/packages/py-tables/package.py
index 262e7e4b82..54aa7771fb 100644
--- a/var/spack/repos/builtin/packages/py-tables/package.py
+++ b/var/spack/repos/builtin/packages/py-tables/package.py
@@ -27,9 +27,12 @@ class PyTables(PythonPackage):
version("3.3.0", sha256="8383ccf02e041a5d55494a09fc5514140b4653055a2732c981b5fd0f7408822c")
version("3.2.2", sha256="3564b351a71ec1737b503b001eb7ceae1f65d5d6e3ffe1ea75aafba10f37fa84")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("zlib", default=True, description="Support for zlib compression")
- variant("bzip2", default=False, description="Support for bzip2 compression")
- variant("lzo", default=False, description="Support for lzo compression")
+ variant("bzip2", default=True, description="Support for bzip2 compression")
+ variant("lzo", default=True, description="Support for lzo compression")
# pyproject.toml
depends_on("py-setuptools@61:", when="@3.9:", type="build")
@@ -45,6 +48,8 @@ class PyTables(PythonPackage):
# requirements.txt
depends_on("py-numpy@1.19:", when="@3.8:", type=("build", "run"))
depends_on("py-numpy@1.9.3:", type=("build", "run"))
+ # https://github.com/PyTables/PyTables/issues/1083
+ depends_on("py-numpy@:1", type=("build", "run"))
depends_on("py-numexpr@2.6.2:", type=("build", "run"))
depends_on("py-packaging", when="@3.7:", type=("build", "run"))
depends_on("py-py-cpuinfo", when="@3.8:", type=("build", "run"))
@@ -60,6 +65,9 @@ class PyTables(PythonPackage):
depends_on("c-blosc@1.11.1:", when="@3.8:")
depends_on("c-blosc@1.4.1:", when="@3.3:")
+ # blosc2 headers are directly included
+ depends_on("c-blosc2")
+
depends_on("zlib-api", when="+zlib")
depends_on("bzip2", when="+bzip2")
depends_on("lzo", when="+lzo")
diff --git a/var/spack/repos/builtin/packages/py-tabulate/package.py b/var/spack/repos/builtin/packages/py-tabulate/package.py
index 07ed086d64..d27fdb52bd 100644
--- a/var/spack/repos/builtin/packages/py-tabulate/package.py
+++ b/var/spack/repos/builtin/packages/py-tabulate/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class PyTabulate(PythonPackage):
"""Pretty-print tabular data"""
- homepage = "https://bitbucket.org/astanin/python-tabulate"
- pypi = "tabulate/tabulate-0.8.6.tar.gz"
+ homepage = "https://github.com/astanin/python-tabulate"
+ pypi = "tabulate/tabulate-0.9.0.tar.gz"
license("MIT")
+ version("0.9.0", sha256="0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c")
+ version("0.8.10", sha256="6c57f3f3dd7ac2782770155f3adb2db0b1a269637e42f27599925e64b114f519")
version("0.8.9", sha256="eb1d13f25760052e8931f2ef80aaf6045a6cceb47514db8beab24cded16f13a7")
version("0.8.7", sha256="db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007")
version("0.8.6", sha256="5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8")
diff --git a/var/spack/repos/builtin/packages/py-tatsu/package.py b/var/spack/repos/builtin/packages/py-tatsu/package.py
index f1a612b294..a558d1805b 100644
--- a/var/spack/repos/builtin/packages/py-tatsu/package.py
+++ b/var/spack/repos/builtin/packages/py-tatsu/package.py
@@ -24,3 +24,8 @@ class PyTatsu(PythonPackage):
depends_on("py-setuptools", type="build")
# optional dependency, otherwise falls back to standard implementation
depends_on("py-regex@2018.8:", type=("build", "run"), when="+future_regex")
+
+ # <<< manual changes
+ # https://github.com/neogeny/TatSu/commit/a4fd84a2785fb0820ed65fe80ebd768458643b66
+ depends_on("python@:3.9", type=("build", "run"), when="@:4")
+ # manual changes >>>
diff --git a/var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py b/var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py
index 019f527d5e..5a2b3043c2 100644
--- a/var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorboard-data-server/package.py
@@ -5,6 +5,7 @@
import glob
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -20,7 +21,7 @@ class PyTensorboardDataServer(PythonPackage):
version("0.6.1", commit="6acf0be88b5727e546dd64a8b9b12d790601d561")
depends_on("py-setuptools", type="build")
- depends_on("rust+rustfmt", type="build")
+ depends_on("rust+dev", type="build")
# https://github.com/tensorflow/tensorboard/issues/5713
patch(
@@ -60,5 +61,4 @@ class PyTensorboardDataServer(PythonPackage):
)
wheel = glob.glob("*.whl")[0]
- args = std_pip_args + ["--prefix=" + prefix, wheel]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={prefix}", wheel)
diff --git a/var/spack/repos/builtin/packages/py-tensorboard-plugin-wit/package.py b/var/spack/repos/builtin/packages/py-tensorboard-plugin-wit/package.py
index cb0fd3de57..df82cd8960 100644
--- a/var/spack/repos/builtin/packages/py-tensorboard-plugin-wit/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorboard-plugin-wit/package.py
@@ -25,21 +25,9 @@ class PyTensorboardPluginWit(PythonPackage):
license("Apache-2.0")
- version(
- "1.8.1",
- sha256="ff26bdd583d155aa951ee3b152b3d0cffae8005dc697f72b44a8e8c2a77a8cbe",
- expand=False,
- )
- version(
- "1.8.0",
- sha256="2a80d1c551d741e99b2f197bb915d8a133e24adb8da1732b840041860f91183a",
- expand=False,
- )
- version(
- "1.7.0",
- sha256="ee775f04821185c90d9a0e9c56970ee43d7c41403beb6629385b39517129685b",
- expand=False,
- )
+ version("1.8.1", sha256="ff26bdd583d155aa951ee3b152b3d0cffae8005dc697f72b44a8e8c2a77a8cbe")
+ version("1.8.0", sha256="2a80d1c551d741e99b2f197bb915d8a133e24adb8da1732b840041860f91183a")
+ version("1.7.0", sha256="ee775f04821185c90d9a0e9c56970ee43d7c41403beb6629385b39517129685b")
depends_on("py-setuptools@36.2.0:", type="build")
depends_on("python@3", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tensorboard/package.py b/var/spack/repos/builtin/packages/py-tensorboard/package.py
index e5aed228f0..a7d85ca17f 100644
--- a/var/spack/repos/builtin/packages/py-tensorboard/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorboard/package.py
@@ -17,143 +17,75 @@ class PyTensorboard(PythonPackage):
# Requires tensorflow
skip_modules = ["tensorboard.summary._tf"]
+ license("Apache-2.0")
maintainers("aweits")
- license("Apache-2.0")
+ version("2.18.0", sha256="107ca4821745f73e2aefa02c50ff70a9b694f39f790b11e6f682f7d326745eab")
+ version("2.17.1", sha256="253701a224000eeca01eee6f7e978aea7b408f60b91eb0babdb04e78947b773e")
+ version("2.17.0", sha256="859a499a9b1fb68a058858964486627100b71fcb21646861c61d31846a6478fb")
+ version("2.16.2", sha256="9f2b4e7dad86667615c0e5cd072f1ea8403fc032a299f0072d6f74855775cc45")
+ version("2.16.1", sha256="928b62567911a8eeb2ebeb7482a9e4599b35f6713a6f2c56655259c18a139569")
+ version("2.16.0", sha256="263b909a2009cb3a79daa6abe64c1785cc317c25a54e4db2fecb6429ffc54c58")
+ version("2.15.2", sha256="a6f6443728064d962caea6d34653e220e34ef8df764cb06a8212c17e1a8f0622")
+ version("2.15.1", sha256="c46c1d1cf13a458c429868a78b2531d8ff5f682058d69ec0840b0bc7a38f1c0f")
+ version("2.15.0", sha256="c05b4d02a3a9fd4bd6c25265087d52b49b790a871ddf98f4fb32fe97cbbc7ad0")
+ version("2.14.1", sha256="3db108fb58f023b6439880e177743c5f1e703e9eeb5fb7d597871f949f85fd58")
+ version("2.14.0", sha256="3667f9745d99280836ad673022362c840f60ed8fefd5a3e30bf071f5a8fd0017")
+ version("2.13.0", sha256="ab69961ebddbddc83f5fa2ff9233572bdad5b883778c35e4fe94bf1798bd8481")
+ version("2.12.3", sha256="b4a69366784bc347e02fbe7d847e01896a649ca52f8948a11005e205dcf724fb")
+ version("2.12.2", sha256="811ab0d27a139445836db9fd4f974424602c3dce12379364d379bcba7c783a68")
+ version("2.12.1", sha256="58f1c2a25b4829b9c48d2b1ec951dedc9325dcd1ea4b0f601d241d2887d0ed65")
+ version("2.12.0", sha256="3cbdc32448d7a28dc1bf0b1754760c08b8e0e2e37c451027ebd5ff4896613012")
+ version("2.11.2", sha256="cbaa2210c375f3af1509f8571360a19ccc3ded1d9641533414874b5deca47e89")
+ version("2.11.1", sha256="0c7529f3f43691e8cc2ece8e564c2e103c51ade317c6af626d415239b5088018")
+ version("2.11.0", sha256="a0e592ee87962e17af3f0dce7faae3fbbd239030159e9e625cce810b7e35c53d")
+ version("2.10.1", sha256="fb9222c1750e2fa35ef170d998a1e229f626eeced3004494a8849c88c15d8c1c")
+ version("2.10.0", sha256="76c91a5e8959cd2208cc32cb17a0cb002badabb66a06ac2af02a7810f49a59e3")
+ version("2.9.1", sha256="baa727f791776f9e5841d347127720ceed4bbd59c36b40604b95fb2ae6029276")
+ version("2.9.0", sha256="bd78211076dca5efa27260afacfaa96cd05c7db12a6c09cc76a1d6b2987ca621")
+ version("2.8.0", sha256="65a338e4424e9079f2604923bdbe301792adce2ace1be68da6b3ddf005170def")
+ version("2.7.0", sha256="239f78a4a8dff200ce585a030c787773a8c1184d5c159252f5f85bac4e3c3b38")
+ version("2.6.0", sha256="f7dac4cdfb52d14c9e3f74585ce2aaf8e6203620a864e51faf84988b09f7bbdb")
+ version("2.5.0", sha256="e167460085b6528956b33bab1c970c989cdce47a6616273880733f5e7bde452e")
+ version("2.4.1", sha256="7b8c53c396069b618f6f276ec94fc45d17e3282d668979216e5d30be472115e4")
+ version("2.4.0", sha256="cde0c663a85609441cb4d624e7255fd8e2b6b1d679645095aac8a234a2812738")
+ version("2.3.0", sha256="d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e")
+ version("2.2.0", sha256="bb6bbc75ad2d8511ba6cbd49e4417276979f49866e11841e83da8298727dbaed")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:", when="@2.14:")
+ depends_on("python@3.8:", when="@2.12:")
+ depends_on("py-absl-py@0.4:")
+ depends_on("py-grpcio@1.48.2:", when="@2.12:")
+ depends_on("py-grpcio@1.24.3:", when="@2.3:")
+ depends_on("py-grpcio@1.23.3:", when="@2.2")
+ depends_on("py-markdown@2.6.8:")
+ depends_on("py-numpy@1.12:")
+ # https://github.com/tensorflow/tensorboard/pull/6871
+ depends_on("py-numpy@:1", when="@:2.17")
+ # https://github.com/tensorflow/tensorboard/pull/5138
+ depends_on("py-numpy@:1.23", when="@:2.5")
+ depends_on("py-packaging", when="@2.18:")
+ depends_on("py-protobuf@3.19.6:", when="@2.15.2:2.16,2.18:")
+ depends_on("py-protobuf@3.19.6:4", when="@2.17")
+ depends_on("py-protobuf@3.19.6:4.23", when="@2.12:2.15.1")
+ depends_on("py-protobuf@3.9.2:3", when="@2.11")
+ depends_on("py-protobuf@3.9.2:3.19", when="@2.9:2.10")
+ depends_on("py-protobuf@3.6.0:3.19", when="@:2.8")
+ depends_on("py-setuptools@41:")
+ depends_on("py-six@1.10:", when="@:2.4,2.14:")
+ depends_on("py-tensorboard-data-server@0.7", when="@2.12:")
+ depends_on("py-tensorboard-data-server@0.6", when="@2.5:2.11")
+ depends_on("py-werkzeug@1.0.1:", when="@2.9:")
+ depends_on("py-werkzeug@0.11.15:")
- version(
- "2.14.1",
- sha256="3db108fb58f023b6439880e177743c5f1e703e9eeb5fb7d597871f949f85fd58",
- expand=False,
- )
- version(
- "2.14.0",
- sha256="3667f9745d99280836ad673022362c840f60ed8fefd5a3e30bf071f5a8fd0017",
- expand=False,
- )
- version(
- "2.13.0",
- sha256="ab69961ebddbddc83f5fa2ff9233572bdad5b883778c35e4fe94bf1798bd8481",
- expand=False,
- )
- version(
- "2.12.3",
- sha256="b4a69366784bc347e02fbe7d847e01896a649ca52f8948a11005e205dcf724fb",
- expand=False,
- )
- version(
- "2.12.2",
- sha256="811ab0d27a139445836db9fd4f974424602c3dce12379364d379bcba7c783a68",
- expand=False,
- )
- version(
- "2.12.1",
- sha256="58f1c2a25b4829b9c48d2b1ec951dedc9325dcd1ea4b0f601d241d2887d0ed65",
- expand=False,
- )
- version(
- "2.12.0",
- sha256="3cbdc32448d7a28dc1bf0b1754760c08b8e0e2e37c451027ebd5ff4896613012",
- expand=False,
- )
- version(
- "2.11.2",
- sha256="cbaa2210c375f3af1509f8571360a19ccc3ded1d9641533414874b5deca47e89",
- expand=False,
- )
- version(
- "2.11.1",
- sha256="0c7529f3f43691e8cc2ece8e564c2e103c51ade317c6af626d415239b5088018",
- expand=False,
- )
- version(
- "2.11.0",
- sha256="a0e592ee87962e17af3f0dce7faae3fbbd239030159e9e625cce810b7e35c53d",
- expand=False,
- )
- version(
- "2.10.1",
- sha256="fb9222c1750e2fa35ef170d998a1e229f626eeced3004494a8849c88c15d8c1c",
- expand=False,
- )
- version(
- "2.10.0",
- sha256="76c91a5e8959cd2208cc32cb17a0cb002badabb66a06ac2af02a7810f49a59e3",
- expand=False,
- )
- version(
- "2.9.1",
- sha256="baa727f791776f9e5841d347127720ceed4bbd59c36b40604b95fb2ae6029276",
- expand=False,
- )
- version(
- "2.9.0",
- sha256="bd78211076dca5efa27260afacfaa96cd05c7db12a6c09cc76a1d6b2987ca621",
- expand=False,
- )
- version(
- "2.8.0",
- sha256="65a338e4424e9079f2604923bdbe301792adce2ace1be68da6b3ddf005170def",
- expand=False,
- )
- version(
- "2.7.0",
- sha256="239f78a4a8dff200ce585a030c787773a8c1184d5c159252f5f85bac4e3c3b38",
- expand=False,
- )
- version(
- "2.6.0",
- sha256="f7dac4cdfb52d14c9e3f74585ce2aaf8e6203620a864e51faf84988b09f7bbdb",
- expand=False,
- )
- version(
- "2.5.0",
- sha256="e167460085b6528956b33bab1c970c989cdce47a6616273880733f5e7bde452e",
- expand=False,
- )
- version(
- "2.4.1",
- sha256="7b8c53c396069b618f6f276ec94fc45d17e3282d668979216e5d30be472115e4",
- expand=False,
- )
- version(
- "2.4.0",
- sha256="cde0c663a85609441cb4d624e7255fd8e2b6b1d679645095aac8a234a2812738",
- expand=False,
- )
- version(
- "2.3.0",
- sha256="d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e",
- expand=False,
- )
- version(
- "2.2.0",
- sha256="bb6bbc75ad2d8511ba6cbd49e4417276979f49866e11841e83da8298727dbaed",
- expand=False,
- )
+ # Historical dependencies
+ depends_on("py-google-auth@1.6.3:2", when="@2.7:2.15")
+ depends_on("py-google-auth@1.6.3:1", when="@:2.6")
+ depends_on("py-google-auth-oauthlib@0.5:1", when="@2.15")
+ depends_on("py-google-auth-oauthlib@0.5:1.0", when="@2.12.1:2.14")
+ depends_on("py-google-auth-oauthlib@0.4.1:0.4", when="@:2.12.0")
+ depends_on("py-requests@2.21.0:2", when="@:2.15")
+ depends_on("py-tensorboard-plugin-wit@1.6.0:", when="@:2.13")
- depends_on("python@3.9:", type=("build", "run"), when="@2.14:")
- depends_on("python@3.8:", type=("build", "run"), when="@2.12:")
- depends_on("py-absl-py@0.4:", type=("build", "run"))
- depends_on("py-grpcio@1.48.2:", type=("build", "run"), when="@2.12:")
- depends_on("py-grpcio@1.24.3:", type=("build", "run"), when="@2.3:")
- depends_on("py-grpcio@1.23.3:", type=("build", "run"), when="@2.2")
- depends_on("py-google-auth@1.6.3:2", type=("build", "run"), when="@2.7:")
- depends_on("py-google-auth@1.6.3:1", type=("build", "run"), when="@:2.6")
- depends_on("py-google-auth-oauthlib@0.5:1.0", type=("build", "run"), when="@2.13:")
- depends_on("py-google-auth-oauthlib@0.4.1:0.4", type=("build", "run"), when="@:2.12")
- depends_on("py-markdown@2.6.8:", type=("build", "run"))
- depends_on("py-numpy@1.12.0:", type=("build", "run"))
- depends_on("py-protobuf@3.19.6:", type=("build", "run"), when="@2.12:")
- depends_on("py-protobuf@3.9.2:3", type=("build", "run"), when="@2.11")
- depends_on("py-protobuf@3.9.2:3.19", type=("build", "run"), when="@2.9:2.10")
- depends_on("py-protobuf@3.6.0:3.19", type=("build", "run"), when="@:2.8")
- depends_on("py-requests@2.21.0:2", type=("build", "run"))
- depends_on("py-setuptools@41.0.0:", type=("build", "run"))
- depends_on("py-six@1.10.0:", type=("build", "run"), when="@:2.4,2.14:")
- depends_on("py-tensorboard-data-server@0.7", type=("build", "run"), when="@2.12:")
- depends_on("py-tensorboard-data-server@0.6", type=("build", "run"), when="@2.5:2.11")
- depends_on("py-tensorboard-plugin-wit@1.6.0:", type=("build", "run"), when="@:2.13")
- depends_on("py-werkzeug@1.0.1:", type=("build", "run"), when="@2.9:")
- depends_on("py-werkzeug@0.11.15:", type=("build", "run"))
- depends_on("py-wheel@0.26:", type="build", when="@:2.13")
+ conflicts("^py-protobuf@4.24.0")
diff --git a/var/spack/repos/builtin/packages/py-tensorflow-estimator/package.py b/var/spack/repos/builtin/packages/py-tensorflow-estimator/package.py
index eba0f1dbe9..d3308b15b3 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow-estimator/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow-estimator/package.py
@@ -5,12 +5,14 @@
import tempfile
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
class PyTensorflowEstimator(Package):
- """TensorFlow Estimator is a high-level TensorFlow API that greatly
- simplifies machine learning programming."""
+ """TensorFlow Estimator is a high-level API that encapsulates
+ model training, evaluation, prediction, and exporting.
+ """
homepage = "https://github.com/tensorflow/estimator"
url = "https://github.com/tensorflow/estimator/archive/v2.2.0.tar.gz"
@@ -28,39 +30,41 @@ class PyTensorflowEstimator(Package):
version("2.8.0", sha256="58a2c3562ca6491c257e9a4d9bd8825667883257edcdb452181efa691c586b17")
version("2.7.0", sha256="e5164e802638d3cf110ecc17912be9d514a9d3354ec48e77200b9403dcc15965")
version("2.6.0", sha256="947705c60c50da0b4a8ceec1bc058aaf6bf567a7efdcd50d5173ebf6bafcf30f")
- version("2.5.0", sha256="66661f30ea05d57377c45267ca770935fb8c54f85b7901f0a7deb91766fe9f45")
version("2.4.0", sha256="e6ea12014c3d8c89a81ace95f8f8b7c39ffcd3e4e4626709e4aee0010eefd962")
version("2.3.0", sha256="75403e7de7e8ec30ec0781ede56ed84cbe5e90daad64a9c242cd489c8fe63a17")
version("2.2.0", sha256="2d68cb6e6442e7dcbfa2e092aa25bdcb0eda420536a829b85d732854a4c85d46")
extends("python")
- # tensorflow_estimator/tools/pip_package/setup.py
- depends_on("python@3.7:", when="@2.9:", type=("build", "run"))
-
- for ver in ["2.14", "2.13", "2.12", "2.11", "2.10", "2.9", "2.8", "2.7", "2.6"]:
- depends_on("py-keras@" + ver, when="@" + ver, type=("build", "run"))
-
- for ver in [
- "2.14",
- "2.13",
- "2.12",
- "2.11",
- "2.10",
- "2.9",
- "2.8",
- "2.7",
- "2.6",
- "2.5",
- "2.4",
- "2.3",
- "2.2",
- ]:
- depends_on("py-tensorflow@" + ver, when="@" + ver, type=("build", "run"))
-
- depends_on("bazel@0.19.0:", type="build")
- depends_on("py-pip", type="build")
- depends_on("py-wheel", type="build")
+ with default_args(type="build"):
+ depends_on("bazel@0.19.0:")
+ depends_on("py-pip")
+ depends_on("py-wheel")
+
+ # See expect_*_installed in tensorflow_estimator/python/estimator/BUILD
+ with default_args(type=("build", "run")):
+ depends_on("py-absl-py")
+ depends_on("py-h5py")
+ depends_on("py-numpy")
+ depends_on("py-pandas")
+ depends_on("py-six")
+ for ver in [
+ "2.14",
+ "2.13",
+ "2.12",
+ "2.11",
+ "2.10",
+ "2.9",
+ "2.8",
+ "2.7",
+ "2.6",
+ "2.4",
+ "2.3",
+ "2.2",
+ ]:
+ depends_on(f"py-tensorboard@{ver}", when=f"@{ver}")
+ depends_on(f"py-tensorflow@{ver}", when=f"@{ver}")
+ depends_on(f"py-keras@{ver}", when=f"@{ver}")
def install(self, spec, prefix):
self.tmp_path = tempfile.mkdtemp(prefix="spack")
@@ -94,6 +98,5 @@ class PyTensorflowEstimator(Package):
buildpath = join_path(self.stage.source_path, "spack-build")
build_pip_package("--src", buildpath)
with working_dir(buildpath):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
remove_linked_tree(self.tmp_path)
diff --git a/var/spack/repos/builtin/packages/py-tensorflow-hub/package.py b/var/spack/repos/builtin/packages/py-tensorflow-hub/package.py
index 7e13114b6b..b126d8a455 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow-hub/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow-hub/package.py
@@ -5,6 +5,7 @@
import tempfile
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -24,7 +25,8 @@ class PyTensorflowHub(Package):
extends("python")
- depends_on("bazel", type="build")
+ # TODO: Directories have changed in Bazel 7, need to update manual install logic
+ depends_on("bazel@:6", type="build")
depends_on("py-pip", type="build")
depends_on("py-wheel", type="build")
depends_on("py-setuptools", type="build")
@@ -77,8 +79,7 @@ class PyTensorflowHub(Package):
)
with working_dir(insttmp_path):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
remove_linked_tree(tmp_path)
remove_linked_tree(insttmp_path)
diff --git a/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py b/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
index e73f4cc4c2..4c73617d39 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow-probability/package.py
@@ -5,6 +5,7 @@
import tempfile
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -19,19 +20,29 @@ class PyTensorflowProbability(Package):
homepage = "https://www.tensorflow.org/probability"
url = "https://github.com/tensorflow/probability/archive/v0.12.1.tar.gz"
- maintainers("aweits")
+ maintainers("aweits", "jonas-eschle")
license("Apache-2.0")
+ # tf-keras does not (yet) exist on Spack, i.e. the TF extra won't work, see below
+ # version("0.24.0", sha256="3d75418cef09ea357ee879347133ab784fe4637a5ba251a8e06ef930dd970a3e")
+ version("0.23.0", sha256="a00769550da9284acbd69e32a005507153ad39b0c190feca2bbbf6373366cc14")
+ version("0.22.1", sha256="9c1203b454aaeb48ac67dea862a411dba6b04f67c1e874e0e83bd1d7f13829a3")
+ version("0.22.0", sha256="f9ce55b00c8069246d701c04eaafccde413355f6e76ccf9e549772ecfa0349a4")
+ version("0.21.0", sha256="69b7510b38b2e48bcfb9ff570ef598d489e4f1bcbe13276f5dd91c878b8d56d1")
+ version("0.20.0", sha256="f0fb9a1f88a36a8f57d4d9cce4f9bf8dfacb6fc7778751729fe3c3067e5a1363")
+ version("0.19.0", sha256="b32d2ae211ec727df9791b501839619f5389134bd6d4fe951570f500b0e75f55")
version("0.18.0", sha256="f4852c0fea9117333ccb868f7a2ca75aecf5dd765dc39fd4ee5f8ab6fe87e909")
- version("0.12.1", sha256="1fe89e85fd053bf36e8645a5a1a53b729bc254cf1516bc224fcbd1e4ff50083a")
version(
- "0.8.0",
- sha256="f6049549f6d6b82962523a6bf61c40c1d0c7ac685f209c0084a6da81dd78181d",
- url="https://github.com/tensorflow/probability/archive/0.8.0.tar.gz",
+ "0.12.1",
+ sha256="1fe89e85fd053bf36e8645a5a1a53b729bc254cf1516bc224fcbd1e4ff50083a",
+ deprecated=True,
)
- extends("python")
+ extends("python@3.9:", when="@0.22:")
+ extends("python@3.8:", when="@0.20:0.21")
+ extends("python@3.7:", when="@0.13:0.19")
+ extends("python@3.6:", when="@0.8:0.12")
depends_on("py-pip", type="build")
depends_on("py-wheel", type="build")
depends_on("py-setuptools", type="build")
@@ -48,11 +59,36 @@ class PyTensorflowProbability(Package):
depends_on("py-dm-tree", when="@0.12:", type=("build", "run"))
# tensorflow_probability/python/__init__.py
- depends_on("py-tensorflow@2.10:", when="@0.18:", type=("build", "run"))
- depends_on("py-tensorflow@2.4:", when="@0.12:", type=("build", "run"))
- depends_on("py-tensorflow@1.14:", when="@0.8:", type=("build", "run"))
-
- depends_on("bazel@3.2:", type="build")
+ # TODO: reactivate the JAX versions once the JAX package is available with newer versions
+ # also add jaxlib as a dependency
+
+ variant("py-tensorflow", default=False, description="Build with TensorFlow support")
+ with when("+py-tensorflow"):
+ # TODO(0.24): requires tf-keras on Spack
+ # depends_on("py-tf-keras", when="@0.24:", type=("build", "run"))
+ # depends_on("py-tensorflow@2.16", when="@0.24", type=("build", "run"))
+ depends_on("py-tensorflow@2.15", when="@0.23", type=("build", "run"))
+ depends_on("py-tensorflow@2.14:2", when="@0.22", type=("build", "run"))
+ depends_on("py-tensorflow@2.13:2", when="@0.21", type=("build", "run"))
+ depends_on("py-tensorflow@2.12:2", when="@0.20", type=("build", "run"))
+ depends_on("py-tensorflow@2.11:2", when="@0.19", type=("build", "run"))
+
+ # jaxlib is not required, as it's already a dependency of py-jax
+ variant("py-jax", default=False, description="Build with JAX support")
+ with when("+py-jax"):
+ depends_on("py-jax@0.4.20:0.4", when="@0.23", type=("build", "run"))
+ depends_on("py-jax@0.4.16:0.4", when="@0.22", type=("build", "run"))
+ depends_on("py-jax@0.4.14:0.4", when="@0.21", type=("build", "run"))
+ depends_on("py-jax@0.4.8:0.4", when="@0.20", type=("build", "run"))
+ depends_on("py-jax@0.3.25:3", when="@0.19", type=("build", "run"))
+
+ depends_on(
+ "py-tensorflow@2.10:2", when="@0.18", type=("build", "run")
+ ) # keep here for backwards compatibility
+ depends_on("py-tensorflow@2.4:", when="@0.12:0.17", type=("build", "run"))
+
+ # TODO: Directories have changed in Bazel 7, need to update manual install logic
+ depends_on("bazel@3.2:6", type="build")
def install(self, spec, prefix):
self.tmp_path = tempfile.mkdtemp(prefix="spack")
@@ -83,7 +119,6 @@ class PyTensorflowProbability(Package):
bazel(*args)
with working_dir(join_path("bazel-bin", "pip_pkg.runfiles", "tensorflow_probability")):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
remove_linked_tree(self.tmp_path)
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/absl_neon.patch b/var/spack/repos/builtin/packages/py-tensorflow/absl_neon.patch
new file mode 100644
index 0000000000..595cce7bdb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-tensorflow/absl_neon.patch
@@ -0,0 +1,55 @@
+From 32321ebf22c32ed4bbc9f98b44f2a67fe6c86823 Mon Sep 17 00:00:00 2001
+From: Andrew Elble <aweits@rit.edu>
+Date: Wed, 1 May 2024 18:46:42 -0400
+Subject: [PATCH] patch
+
+---
+ third_party/absl/absl_neon.patch | 23 +++++++++++++++++++++++
+ third_party/absl/workspace.bzl | 1 +
+ 2 files changed, 24 insertions(+)
+ create mode 100644 third_party/absl/absl_neon.patch
+
+diff --git a/third_party/absl/absl_neon.patch b/third_party/absl/absl_neon.patch
+new file mode 100644
+index 000000000000..d4eb77bc3f86
+--- /dev/null
++++ b/third_party/absl/absl_neon.patch
+@@ -0,0 +1,23 @@
++From: Andrew Elble <aweits@rit.edu>
++Date: Thu, 25 Apr 2024 08:09:36 -0400
++Subject: [PATCH] fix
++
++---
++ absl/base/config.h | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/absl/base/config.h b/absl/base/config.h
++index 5fa9f0efe5a4..bfedf4e1d7bd 100644
++--- a/absl/base/config.h
+++++ b/absl/base/config.h
++@@ -962,7 +962,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
++ // https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code
++ #ifdef ABSL_INTERNAL_HAVE_ARM_NEON
++ #error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set
++-#elif defined(__ARM_NEON) && !defined(__CUDA_ARCH__)
+++#elif defined(__ARM_NEON) && !(defined(__NVCC__) && defined(__CUDACC__))
++ #define ABSL_INTERNAL_HAVE_ARM_NEON 1
++ #endif
++
++--
++2.31.1
+diff --git a/third_party/absl/workspace.bzl b/third_party/absl/workspace.bzl
+index 06f75166ce4b..56d146d65abe 100644
+--- a/third_party/absl/workspace.bzl
++++ b/third_party/absl/workspace.bzl
+@@ -42,6 +42,7 @@ def repo():
+ build_file = "//third_party/absl:com_google_absl.BUILD",
+ system_build_file = "//third_party/absl:system.BUILD",
+ system_link_files = SYS_LINKS,
++ patch_file = ["//third_party/absl:absl_neon.patch"],
+ strip_prefix = "abseil-cpp-{commit}".format(commit = ABSL_COMMIT),
+ urls = tf_mirror_urls("https://github.com/abseil/abseil-cpp/archive/{commit}.tar.gz".format(commit = ABSL_COMMIT)),
+ )
+--
+2.31.1
+
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py
index 5551a15b4a..ba1377829f 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py
@@ -3,29 +3,79 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import glob
+import os
import sys
import tempfile
+from spack.build_environment import optimization_flags
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
+rocm_dependencies = [
+ "hip",
+ "rocrand",
+ "rocblas",
+ "rocfft",
+ "hipfft",
+ "rccl",
+ "hipsparse",
+ "rocprim",
+ "llvm-amdgpu",
+ "hsa-rocr-dev",
+ "rocminfo",
+ "hipsolver",
+ "hiprand",
+ "rocsolver",
+ "hipsolver",
+ "hipblas",
+ "hipcub",
+ "rocm-core",
+ "roctracer-dev",
+ "miopen-hip",
+]
+
class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
"""TensorFlow is an open source machine learning framework for everyone."""
homepage = "https://www.tensorflow.org"
url = "https://github.com/tensorflow/tensorflow/archive/v2.3.1.tar.gz"
-
- maintainers("adamjstewart", "aweits")
+ git = "https://github.com/tensorflow/tensorflow.git"
import_modules = ["tensorflow"]
license("Apache-2.0")
+ maintainers("adamjstewart", "aweits")
+ version("2.18.0", sha256="d7876f4bb0235cac60eb6316392a7c48676729860da1ab659fb440379ad5186d")
+ version("2.17.1", sha256="2d3cfb48510f92f3a52fb05b820481c6f066a342a9f5296fe26d72c4ea757700")
+ version("2.17.0", sha256="9cc4d5773b8ee910079baaecb4086d0c28939f024dd74b33fc5e64779b6533dc")
+ version("2.16.2", sha256="023849bf253080cb1e4f09386f5eb900492da2288274086ed6cfecd6d99da9eb")
+ version("2.16.1", sha256="c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d")
+ version(
+ "2.16.1-rocm-enhanced",
+ sha256="e1b63b1b5d5b014194ed33113c7fa7f26ecb8d36333282b8c550e795e0eb31c6",
+ url="https://github.com/ROCm/tensorflow-upstream/archive/refs/tags/v2.16.1-rocm-enhanced.tar.gz",
+ )
+ version("2.15.1", sha256="f36416d831f06fe866e149c7cd752da410a11178b01ff5620e9f265511ed57cf")
+ version("2.15.0", sha256="9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220")
+ version("2.14.1", sha256="6b31ed347ed7a03c45b906aa41628ac91c3db7c84cb816971400d470e58ba494")
+ version(
+ "2.14-rocm-enhanced",
+ git="https://github.com/ROCm/tensorflow-upstream.git",
+ branch="r2.14-rocm-enhanced-nohipblaslt-build",
+ )
version("2.14.0", sha256="ce357fd0728f0d1b0831d1653f475591662ec5bca736a94ff789e6b1944df19f")
version("2.13.1", sha256="89c07aebd4f41fbe0d08cc88aef00305542134f2f16d3b62918dc3c1182f33e2")
version("2.13.0", sha256="e58c939079588623e6fa1d054aec2f90f95018266e0a970fd353a5244f5173dc")
version("2.12.1", sha256="6bc4600cc0b88e9e40f1800096f5bddbbd3b6e5527a030dea631b87f2ae46b5b")
version("2.12.0", sha256="c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e")
version("2.11.1", sha256="624ed1cc170cdcc19e8a15d8cdde989a9a1c6b0534c90b38a6b2f06fb2963e5f")
+ version(
+ "2.11.0-rocm-enhanced",
+ sha256="0c4ee8d83bc72215cbc1a5cd3e88cde1a9cf7304237d3e3d8d105ff09827d903",
+ url="https://github.com/ROCmSoftwarePlatform/tensorflow-upstream/archive/refs/tags/v2.11.0-rocm-enhanced.tar.gz",
+ )
version("2.11.0", sha256="99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48")
version("2.10.1", sha256="622a92e22e6f3f4300ea43b3025a0b6122f1cc0e2d9233235e4c628c331a94a3")
version("2.10.0", sha256="b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8")
@@ -74,11 +124,18 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
version("2.2.1", sha256="e6a28e64236d729e598dbeaa02152219e67d0ac94d6ed22438606026a02e0f88")
version("2.2.0", sha256="69cd836f87b8c53506c4f706f655d423270f5a563b76dc1cfa60fbc3184185a3")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("mkl", default=False, description="Build with MKL support")
variant("jemalloc", default=False, description="Build with jemalloc as malloc support")
variant("gcp", default=False, description="Build with Google Cloud Platform support")
- variant("hdfs", default=False, description="Build with Hadoop File System support")
- variant("aws", default=False, description="Build with Amazon AWS Platform support")
+ variant(
+ "hdfs", default=False, when="@:2.17", description="Build with Hadoop File System support"
+ )
+ variant(
+ "aws", default=False, when="@:2.17", description="Build with Amazon AWS Platform support"
+ )
variant("xla", default=sys.platform != "darwin", description="Build with XLA JIT support")
variant("gdr", default=False, description="Build with GDR support")
variant("verbs", default=False, description="Build with libverbs support")
@@ -105,149 +162,175 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
extends("python")
- # Python support based on wheel availability
- depends_on("python@3.9:3.11", when="@2.14:", type=("build", "run"))
- depends_on("python@3.8:3.11", when="@2.12:2.13", type=("build", "run"))
- depends_on("python@:3.10", when="@2.8:2.11", type=("build", "run"))
- depends_on("python@:3.9", when="@2.5:2.7", type=("build", "run"))
- depends_on("python@:3.8", when="@2.2:2.4", type=("build", "run"))
-
- # See .bazelversion
- depends_on("bazel@6.1.0", type="build", when="@2.14:")
- depends_on("bazel@5.3.0", type="build", when="@2.11:2.13")
- depends_on("bazel@5.1.1", type="build", when="@2.10")
- # See _TF_MIN_BAZEL_VERSION and _TF_MAX_BAZEL_VERSION in configure.py
- depends_on("bazel@4.2.2:5.99.0", type="build", when="@2.9")
- depends_on("bazel@4.2.1:4.99.0", type="build", when="@2.8")
- depends_on("bazel@3.7.2:4.99.0", type="build", when="@2.7")
- depends_on("bazel@3.7.2:3.99.0", type="build", when="@2.5:2.6")
- depends_on("bazel@3.1.0:3.99.0", type="build", when="@2.3:2.4")
- depends_on("bazel@2.0.0", type="build", when="@2.2")
-
- depends_on("swig", type="build")
- depends_on("py-pip", type="build")
- depends_on("py-wheel", type="build")
-
- # Listed under REQUIRED_PACKAGES in tensorflow/tools/pip_package/setup.py
- depends_on("py-absl-py@1:", type=("build", "run"), when="@2.9:")
- depends_on("py-absl-py@0.4:", type=("build", "run"), when="@2.7:2.8")
- depends_on("py-absl-py@0.10:0", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-absl-py@0.7:", type=("build", "run"), when="@:2.3")
- depends_on("py-astunparse@1.6:", type=("build", "run"), when="@2.7:")
- depends_on("py-astunparse@1.6.3:1.6", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-astunparse@1.6.3", type=("build", "run"), when="@2.2:2.3")
- depends_on("py-flatbuffers@23.5.26:", type=("build", "run"), when="@2.14:")
- depends_on("py-flatbuffers@23.1.21:", type=("build", "run"), when="@2.13")
- depends_on("py-flatbuffers@2:", type=("build", "run"), when="@2.10:2.12")
- depends_on("py-flatbuffers@1.12:1", type=("build", "run"), when="@2.9")
- depends_on("py-flatbuffers@1.12:", type=("build", "run"), when="@2.8")
- depends_on("py-flatbuffers@1.12:2", type=("build", "run"), when="@2.7")
- depends_on("py-flatbuffers@1.12", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-gast@0.2.1:0.4,0.5.3:", type=("build", "run"), when="@2.14:")
- depends_on("py-gast@0.2.1:0.4.0", type=("build", "run"), when="@2.9:2.13")
- depends_on("py-gast@0.2.1:", type=("build", "run"), when="@2.8")
- depends_on("py-gast@0.2.1:0.4", type=("build", "run"), when="@2.7")
- depends_on("py-gast@0.4.0", type=("build", "run"), when="@2.5:2.6")
- depends_on("py-gast@0.3.3", type=("build", "run"), when="@2.2:2.4")
- depends_on("py-gast@0.2.2", type=("build", "run"), when="@:2.1")
- depends_on("py-google-pasta@0.1.1:", type=("build", "run"), when="@2.7:")
- depends_on("py-google-pasta@0.2:0", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-google-pasta@0.1.8:", type=("build", "run"), when="@2.2:2.3")
- depends_on("py-google-pasta@0.1.6:", type=("build", "run"), when="@:2.1")
- depends_on("py-h5py@2.9:", type=("build", "run"), when="@2.7:")
- depends_on("py-h5py@3.1", type=("build", "run"), when="@2.5:2.6")
- depends_on("py-h5py@2.10", type=("build", "run"), when="@2.2:2.4")
- depends_on("py-h5py@:2.10.0", type=("build", "run"), when="@2.1.3:2.1")
- # propagate the mpi variant setting for h5py/hdf5 to avoid unexpected crashes
- depends_on("py-h5py+mpi", type=("build", "run"), when="@2.1.3:+mpi")
- depends_on("py-h5py~mpi", type=("build", "run"), when="@2.1.3:~mpi")
- depends_on("hdf5+mpi", type="build", when="@2.1.3:+mpi")
- depends_on("hdf5~mpi", type="build", when="@2.1.3:~mpi")
- depends_on("py-libclang@13:", type=("build", "run"), when="@2.9:")
- depends_on("py-libclang@9.0.1:", type=("build", "run"), when="@2.7:2.8")
- depends_on("py-ml-dtypes@0.2.0", type=("build", "run"), when="@2.14:")
- depends_on("py-numpy@1.23.5:", type=("build", "run"), when="@2.14:")
- depends_on("py-numpy@1.22:1.24.3", type=("build", "run"), when="@2.13:")
- depends_on("py-numpy@1.22:1.23", type=("build", "run"), when="@2.12")
- depends_on("py-numpy@1.20:", type=("build", "run"), when="@2.8:2.11")
- depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@2.7")
- depends_on("py-numpy@1.19.2:1.19", type=("build", "run"), when="@2.4:2.6")
- # https://github.com/tensorflow/tensorflow/issues/40688
- depends_on("py-numpy@1.16.0:1.18", type=("build", "run"), when="@:2.3")
- depends_on("py-opt-einsum@2.3.2:", type=("build", "run"), when="@:2.3,2.7:")
- depends_on("py-opt-einsum@3.3", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-packaging", type=("build", "run"), when="@2.9:")
- depends_on("py-protobuf@3.20.3:4.20,4.21.6:4", type=("build", "run"), when="@2.12:")
- depends_on("py-protobuf@3.9.2:", type=("build", "run"), when="@2.3:2.11")
- depends_on("py-protobuf@3.8.0:", type=("build", "run"), when="@:2.2")
- # https://github.com/protocolbuffers/protobuf/issues/10051
- # https://github.com/tensorflow/tensorflow/issues/56266
- depends_on("py-protobuf@:3.19", type=("build", "run"), when="@:2.11")
- # Must be matching versions of py-protobuf and protobuf
- conflicts("^py-protobuf~cpp")
- depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-six@1.12:", type=("build", "run"), when="@:2.3,2.7:")
- depends_on("py-six@1.15", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-termcolor@1.1:", type=("build", "run"), when="@:2.3,2.7:")
- depends_on("py-termcolor@1.1", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-typing-extensions@3.6.6:", type=("build", "run"), when="@2.7:2.12,2.14:")
- depends_on("py-typing-extensions@3.6.6:4.5", type=("build", "run"), when="@2.13")
- depends_on("py-typing-extensions@3.7.4:3.7", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-wrapt@1.11:1.14", type=("build", "run"), when="@2.12,2.14:")
- depends_on("py-wrapt@1.11:", type=("build", "run"), when="@2.7:2.11,2.13")
- depends_on("py-wrapt@1.12.1:1.12", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-wrapt@1.11.1:", type=("build", "run"), when="@:2.3")
-
- # TODO: add packages for these dependencies
- # depends_on('py-tensorflow-io-gcs-filesystem@0.23.1:', type=('build', 'run'), when='@2.8:')
- # depends_on('py-tensorflow-io-gcs-filesystem@0.21:', type=('build', 'run'), when='@2.7')
-
- if sys.byteorder == "little":
- # Only builds correctly on little-endian machines
- depends_on("py-grpcio@1.24.3:1", type=("build", "run"), when="@2.7:")
- depends_on("py-grpcio@1.37.0:1", type=("build", "run"), when="@2.6")
- depends_on("py-grpcio@1.34", type=("build", "run"), when="@2.5")
- depends_on("py-grpcio@1.32", type=("build", "run"), when="@2.4")
- depends_on("py-grpcio@1.8.6:", type=("build", "run"), when="@:2.3")
-
- for minor_ver in range(5, 15):
- depends_on(
- "py-tensorboard@2.{}".format(minor_ver),
- type=("build", "run"),
- when="@2.{}".format(minor_ver),
- )
- # TODO: is this still true? We now install tensorboard from wheel for all versions
- # depends_on('py-tensorboard', when='@:2.4') # circular dep
- # depends_on('py-tensorflow-estimator') # circular dep
- # depends_on('py-keras') # circular dep
-
- # Undocumented dependencies
- depends_on("py-requests", type=("build", "run"))
- # https://github.com/tensorflow/tensorflow/issues/60179#issuecomment-1491238631
- depends_on("coreutils", when="@2.13: platform=darwin", type="build")
-
- # No longer a dependency in latest versions
- depends_on("py-jax@0.3.15:", type=("build", "run"), when="@2.12")
- depends_on("py-keras-preprocessing@1.1.1:", type=("build", "run"), when="@2.7:2.10")
- depends_on("py-keras-preprocessing@1.1.2:1.1", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-keras-preprocessing@1.1.1:1.1", type=("build", "run"), when="@2.3")
- depends_on("py-keras-preprocessing@1.1:", type=("build", "run"), when="@2.2")
- depends_on("py-scipy@1.4.1", type=("build", "run"), when="@2.2.0,2.3.0")
- depends_on("py-wheel@0.32:0", type=("build", "run"), when="@2.7")
- depends_on("py-wheel@0.35:0", type=("build", "run"), when="@2.4:2.6")
- depends_on("py-wheel@0.26:", type=("build", "run"), when="@:2.3")
+ with default_args(type="build"):
+ # See .bazelversion
+ depends_on("bazel@6.5.0", when="@2.16:")
+ depends_on("bazel@6.1.0", when="@2.14:2.15")
+ depends_on("bazel@5.3.0", when="@2.11:2.13")
+ depends_on("bazel@5.1.1", when="@2.10")
+ # See _TF_MIN_BAZEL_VERSION and _TF_MAX_BAZEL_VERSION in configure.py
+ depends_on("bazel@4.2.2:5.99.0", when="@2.9")
+ depends_on("bazel@4.2.1:4.99.0", when="@2.8")
+ depends_on("bazel@3.7.2:4.99.0", when="@2.7")
+ depends_on("bazel@3.7.2:3.99.0", when="@2.5:2.6")
+ depends_on("bazel@3.1.0:3.99.0", when="@2.3:2.4")
+ depends_on("bazel@2.0.0", when="@2.2")
+
+ # tensorflow/tools/pip_package/build_pip_package.sh
+ depends_on("patchelf", when="@2.13: platform=linux")
+ # https://github.com/tensorflow/tensorflow/issues/60179#issuecomment-1491238631
+ depends_on("coreutils", when="@2.13: platform=darwin")
+
+ depends_on("swig")
+ depends_on("py-pip")
+ depends_on("py-wheel")
+
+ with default_args(type=("build", "run")):
+ # Python support based on wheel availability
+ depends_on("python@3.9:3.12", when="@2.16:")
+ depends_on("python@3.9:3.11", when="@2.14:2.15")
+ depends_on("python@3.8:3.11", when="@2.12:2.13")
+ depends_on("python@:3.10", when="@2.8:2.11")
+ depends_on("python@:3.9", when="@2.5:2.7")
+ depends_on("python@:3.8", when="@2.2:2.4")
+
+ # Listed under REQUIRED_PACKAGES in tensorflow/tools/pip_package/setup.py
+ depends_on("py-absl-py@1:", when="@2.9:")
+ depends_on("py-absl-py@0.4:", when="@2.7:2.8")
+ depends_on("py-absl-py@0.10:0", when="@2.4:2.6")
+ depends_on("py-absl-py@0.7:", when="@:2.3")
+ depends_on("py-astunparse@1.6:", when="@2.7:")
+ depends_on("py-astunparse@1.6.3:1.6", when="@2.4:2.6")
+ depends_on("py-astunparse@1.6.3", when="@2.2:2.3")
+ depends_on("py-flatbuffers@24.3.25:", when="@2.17:")
+ depends_on("py-flatbuffers@23.5.26:", when="@2.14:")
+ depends_on("py-flatbuffers@23.1.21:", when="@2.13")
+ depends_on("py-flatbuffers@2:", when="@2.10:2.12")
+ depends_on("py-flatbuffers@1.12:1", when="@2.9")
+ depends_on("py-flatbuffers@1.12:", when="@2.8")
+ depends_on("py-flatbuffers@1.12:2", when="@2.7")
+ depends_on("py-flatbuffers@1.12", when="@2.4:2.6")
+ depends_on("py-gast@0.2.1:0.4,0.5.3:", when="@2.14:")
+ depends_on("py-gast@0.2.1:0.4.0", when="@2.9:2.13")
+ depends_on("py-gast@0.2.1:", when="@2.8")
+ depends_on("py-gast@0.2.1:0.4", when="@2.7")
+ depends_on("py-gast@0.4.0", when="@2.5:2.6")
+ depends_on("py-gast@0.3.3", when="@2.2:2.4")
+ depends_on("py-gast@0.2.2", when="@:2.1")
+ depends_on("py-google-pasta@0.1.1:", when="@2.7:")
+ depends_on("py-google-pasta@0.2:0", when="@2.4:2.6")
+ depends_on("py-google-pasta@0.1.8:", when="@2.2:2.3")
+ depends_on("py-google-pasta@0.1.6:", when="@:2.1")
+ depends_on("py-libclang@13:", when="@2.9:")
+ depends_on("py-libclang@9.0.1:", when="@2.7:2.8")
+ depends_on("py-opt-einsum@2.3.2:", when="@:2.3,2.7:")
+ depends_on("py-opt-einsum@3.3", when="@2.4:2.6")
+ depends_on("py-packaging", when="@2.9:")
+ depends_on("py-protobuf@3.20.3:4.20,4.21.6:5", when="@2.18:")
+ depends_on("py-protobuf@3.20.3:4.20,4.21.6:4", when="@2.12:2.17")
+ depends_on("py-protobuf@3.9.2:", when="@2.3:2.11")
+ depends_on("py-protobuf@3.8.0:", when="@:2.2")
+ # https://github.com/protocolbuffers/protobuf/issues/10051
+ # https://github.com/tensorflow/tensorflow/issues/56266
+ depends_on("py-protobuf@:3.19", when="@:2.11")
+ depends_on("py-requests@2.21:2", when="@2.16:")
+ depends_on("py-requests")
+ depends_on("py-setuptools")
+ depends_on("py-six@1.12:", when="@:2.3,2.7:")
+ depends_on("py-six@1.15", when="@2.4:2.6")
+ depends_on("py-termcolor@1.1:", when="@:2.3,2.7:")
+ depends_on("py-termcolor@1.1", when="@2.4:2.6")
+ depends_on("py-typing-extensions@3.6.6:", when="@2.7:2.12,2.14:")
+ depends_on("py-typing-extensions@3.6.6:4.5", when="@2.13")
+ depends_on("py-typing-extensions@3.7.4:3.7", when="@2.4:2.6")
+ depends_on("py-wrapt@1.11:", when="@2.7:2.11,2.13,2.16:")
+ depends_on("py-wrapt@1.11:1.14", when="@2.12,2.14:2.15")
+ depends_on("py-wrapt@1.12.1:1.12", when="@2.4:2.6")
+ depends_on("py-wrapt@1.11.1:", when="@:2.3")
+
+ # TODO: add packages for these dependencies
+ # depends_on('py-tensorflow-io-gcs-filesystem@0.23.1:', when='@2.8:')
+ # depends_on('py-tensorflow-io-gcs-filesystem@0.21:', when='@2.7')
+
+ if sys.byteorder == "little":
+ # Only builds correctly on little-endian machines
+ depends_on("py-grpcio@1.24.3:1", when="@2.7:")
+ depends_on("py-grpcio@1.37.0:1", when="@2.6")
+ depends_on("py-grpcio@1.34", when="@2.5")
+ depends_on("py-grpcio@1.32", when="@2.4")
+ depends_on("py-grpcio@1.8.6:", when="@:2.3")
+
+ for minor_ver in range(2, 19):
+ depends_on("py-tensorboard@2.{}".format(minor_ver), when="@2.{}".format(minor_ver))
+
+ # TODO: support circular run-time dependencies
+ # depends_on('py-keras')
+
+ depends_on("py-numpy@1.26:2.0", when="@2.18:")
+ depends_on("py-numpy@1.23.5:", when="@2.14:2.17")
+ depends_on("py-numpy@1.22:1.24.3", when="@2.13")
+ depends_on("py-numpy@1.22:1.23", when="@2.12")
+ depends_on("py-numpy@1.20:", when="@2.8:2.11")
+ depends_on("py-numpy@1.14.5:", when="@2.7")
+ depends_on("py-numpy@1.19.2:1.19", when="@2.4:2.6")
+ # https://github.com/tensorflow/tensorflow/issues/40688
+ depends_on("py-numpy@1.16.0:1.18", when="@:2.3")
+ # https://github.com/tensorflow/tensorflow/issues/67291
+ depends_on("py-numpy@:1", when="@:2.17")
+ depends_on("py-h5py@3.11:", when="@2.18:")
+ depends_on("py-h5py@3.10:", when="@2.16:")
+ depends_on("py-h5py@2.9:", when="@2.7:2.15")
+ depends_on("py-h5py@3.1", when="@2.5:2.6")
+ depends_on("py-h5py@2.10", when="@2.2:2.4")
+ depends_on("py-h5py@:2.10.0", when="@2.1.3:2.1")
+ # propagate the mpi variant setting for h5py/hdf5 to avoid unexpected crashes
+ depends_on("py-h5py+mpi", when="@2.1.3:+mpi")
+ depends_on("py-h5py~mpi", when="@2.1.3:~mpi")
+ depends_on("hdf5+mpi", when="@2.1.3:+mpi")
+ depends_on("hdf5~mpi", when="@2.1.3:~mpi")
+ depends_on("py-ml-dtypes@0.4", when="@2.18:")
+ depends_on("py-ml-dtypes@0.3.1:0.4", when="@2.17")
+ depends_on("py-ml-dtypes@0.3.1:0.3", when="@2.15.1:2.16")
+ depends_on("py-ml-dtypes@0.2", when="@2.15.0")
+ depends_on("py-ml-dtypes@0.2.0", when="@2.14")
+
+ # Historical dependencies
+ depends_on("py-jax@0.3.15:", when="@2.12")
+ depends_on("py-keras-preprocessing@1.1.1:", when="@2.7:2.10")
+ depends_on("py-keras-preprocessing@1.1.2:1.1", when="@2.4:2.6")
+ depends_on("py-keras-preprocessing@1.1.1:1.1", when="@2.3")
+ depends_on("py-keras-preprocessing@1.1:", when="@2.2")
+ depends_on("py-scipy@1.4.1", when="@2.2.0,2.3.0")
+ depends_on("py-wheel@0.32:0", when="@2.7")
+ depends_on("py-wheel@0.35:0", when="@2.4:2.6")
+ depends_on("py-wheel@0.26:", when="@:2.3")
# TODO: add packages for some of these dependencies
depends_on("mkl", when="+mkl")
depends_on("curl", when="+gcp")
# depends_on('computecpp', when='+opencl+computecpp')
# depends_on('trisycl', when='+opencl~computepp')
- depends_on("cuda@:10.2", when="+cuda @:2.3")
- depends_on("cuda@:11.4", when="+cuda @2.4:2.7")
- # avoid problem fixed by commit a76f797b9cd4b9b15bec4c503b16236a804f676f
- depends_on("cuda@:11.7.0", when="+cuda @:2.9")
- depends_on("cudnn", when="+cuda")
- depends_on("cudnn@:7", when="@:2.2 +cuda")
+ with when("+cuda"):
+ # https://www.tensorflow.org/install/source#gpu
+ depends_on("cuda@12.3:", when="@2.16:")
+ depends_on("cuda@12.2:", when="@2.15:")
+ depends_on("cuda@11.8:", when="@2.12:")
+ depends_on("cuda@11.2:", when="@2.5:")
+ depends_on("cuda@11.0:", when="@2.4:")
+ depends_on("cuda@10.1:", when="@2.1:")
+
+ depends_on("cuda@:11.7.0", when="@:2.9")
+ depends_on("cuda@:11.4", when="@2.4:2.7")
+ depends_on("cuda@:10.2", when="@:2.3")
+
+ depends_on("cudnn@8.9:8", when="@2.15:")
+ depends_on("cudnn@8.7:8", when="@2.14:")
+ depends_on("cudnn@8.6:8", when="@2.12:")
+ depends_on("cudnn@8.1:8", when="@2.5:")
+ depends_on("cudnn@8.0:8", when="@2.4:")
+ depends_on("cudnn@7.6:8", when="@2.1:")
+
+ depends_on("cudnn@:7", when="@:2.2")
# depends_on('tensorrt', when='+tensorrt')
depends_on("nccl", when="+nccl+cuda")
depends_on("mpi", when="+mpi")
@@ -255,20 +338,9 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# depends_on('android-sdk', when='+android')
with when("+rocm"):
- depends_on("hip")
- depends_on("rocrand")
- depends_on("rocblas")
- depends_on("rocfft")
- depends_on("hipfft")
- depends_on("rccl", when="+nccl")
- depends_on("hipsparse")
- depends_on("hipcub")
- depends_on("rocsolver")
- depends_on("rocprim")
- depends_on("miopen-hip")
- depends_on("llvm-amdgpu")
- depends_on("hsa-rocr-dev")
- depends_on("rocminfo")
+ for pkg_dep in rocm_dependencies:
+ depends_on(f"{pkg_dep}@6.0:", when="@2.14:")
+ depends_on(pkg_dep)
# Check configure and configure.py to see when these variants are supported
conflicts("+mkl", when="platform=darwin", msg="Darwin is not yet supported")
@@ -277,11 +349,6 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
when="platform=darwin",
msg="Currently jemalloc is only support on Linux platform",
)
- conflicts(
- "+jemalloc",
- when="platform=cray",
- msg="Currently jemalloc is only support on Linux platform",
- )
conflicts("+opencl", when="platform=windows")
conflicts("+computecpp", when="~opencl")
conflicts(
@@ -304,32 +371,29 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
when="platform=darwin",
msg="Currently TensorRT is only supported on Linux platform",
)
- conflicts(
- "+tensorrt",
- when="platform=cray",
- msg="Currently TensorRT is only supported on Linux platform",
- )
conflicts("+nccl", when="~cuda~rocm")
conflicts(
"+nccl", when="platform=darwin", msg="Currently NCCL is only supported on Linux platform"
)
- conflicts(
- "+nccl", when="platform=cray", msg="Currently NCCL is only supported on Linux platform"
- )
conflicts("+mpi", when="platform=windows")
conflicts("+ios", when="platform=linux", msg="iOS support only available on macOS")
- conflicts("+ios", when="platform=cray", msg="iOS support only available on macOS")
# https://github.com/tensorflow/tensorflow/pull/45404
conflicts("platform=darwin target=aarch64:", when="@:2.4")
# https://github.com/tensorflow/tensorflow/pull/39225
conflicts("target=aarch64:", when="@:2.2")
- conflicts("~rocm", when="@2.7.4-rocm-enhanced")
- conflicts("+rocm", when="@:2.7.4-a,2.7.4.0:")
-
+ conflicts(
+ "~rocm",
+ when="@2.7.4-rocm-enhanced,2.11.0-rocm-enhanced,2.14-rocm-enhanced,2.16.1-rocm-enhanced",
+ )
+ conflicts("+rocm", when="@:2.7.4-a,2.7.4.0:2.11.0-a,2.11.0.0:2.14-a,2.14-z:2.16.1-a,2.16.1-z:")
# wheel 0.40 upgrades vendored packaging, trips over tensorflow-io-gcs-filesystem identifier
conflicts("^py-wheel@0.40:", when="@2.11:2.13")
# https://www.tensorflow.org/install/source#tested_build_configurations
+ # https://github.com/tensorflow/tensorflow/issues/70199
+ # (-mavx512fp16 exists in gcc@12:)
+ conflicts("%gcc@13:", when="@:2.14")
+ conflicts("%gcc@:11", when="@2.17:")
conflicts("%gcc@:9.3.0", when="@2.9:")
conflicts("%gcc@:7.3.0")
@@ -368,14 +432,56 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# protobuf definitions.
patch("0008-Fix-protobuf-errors-when-using-system-protobuf.patch", when="@2.5:2.6")
+ # see https://github.com/tensorflow/tensorflow/issues/62490
+ # and https://github.com/abseil/abseil-cpp/issues/1665
+ patch("absl_neon.patch", when="@2.16.1:2.17 target=aarch64:")
+
+ # reverting change otherwise the c467913 commit patch won't apply
+ patch(
+ "https://github.com/ROCm/tensorflow-upstream/commit/fd6b0a4356c66f5f30cedbc62b24f18d9e32806f.patch?full_index=1",
+ sha256="43f1519dfc618b4fb568f760d559c063234248fa12c47a35c1cf3b7114756424",
+ when="@2.16.1-rocm-enhanced +rocm",
+ reverse=True,
+ )
+ patch(
+ "https://github.com/ROCm/tensorflow-upstream/commit/c467913bf4411ce2681391f37a9adf6031d23c2c.patch?full_index=1",
+ sha256="82554a84d19d99180a6bec274c6106dd217361e809b446e2e4bc4b6b979bdf7a",
+ when="@2.16.1-rocm-enhanced +rocm",
+ )
+ patch(
+ "https://github.com/ROCm/tensorflow-upstream/commit/f4f4e8698b90755b0b5ea2d9da1933b0b988b111.patch?full_index=1",
+ sha256="a4c0fd62a0af3ba113c8933fa531dd17fa6667e507202a144715cd87fbdaf476",
+ when="@2.16.1-rocm-enhanced: +rocm",
+ )
+ patch(
+ "https://github.com/ROCm/tensorflow-upstream/commit/8b7fcccb2914078737689347540cb79ace579bbb.patch?full_index=1",
+ sha256="75a61a79ce3aae51fda920f677f4dc045374b20e25628626eb37ca19c3a3b4c4",
+ when="@2.16.1-rocm-enhanced +rocm",
+ )
phases = ["configure", "build", "install"]
+ def flag_handler(self, name, flags):
+ spec = self.spec
+ # ubuntu gcc has this workaround turned on by default in aarch64
+ # and it causes issues with symbol relocation during link
+ # note, archspec doesn't currently ever report cortex_a53!
+ if (
+ name == "ldflags"
+ and spec.target.family == "aarch64"
+ and "ubuntu" in spec.os
+ and spec.satisfies("%gcc")
+ and "cortex_a53" not in spec.target.name
+ ):
+ flags.append("-mno-fix-cortex-a53-843419")
+
+ return (flags, None, None)
+
# https://www.tensorflow.org/install/source
def setup_build_environment(self, env):
spec = self.spec
# Please specify the location of python
- env.set("PYTHON_BIN_PATH", spec["python"].command.path)
+ env.set("PYTHON_BIN_PATH", python.path)
# Please input the desired Python library path to use
env.set("PYTHON_LIB_PATH", python_platlib)
@@ -477,12 +583,21 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# Do you wish to build TensorFlow with ROCm support?
if "+rocm" in spec:
env.set("TF_NEED_ROCM", "1")
+ env.set("TF_HIPBLASLT", "0")
+ env.set("MIOPEN_PATH", spec["miopen-hip"].prefix)
+ env.set("ROCTRACER_PATH", spec["roctracer-dev"].prefix)
+ env.set("LLVM_PATH", spec["llvm-amdgpu"].prefix)
+ for pkg_dep in rocm_dependencies:
+ pkg_dep_cap = pkg_dep.upper().replace("-", "_")
+ env.set(f"{pkg_dep_cap}_PATH", spec[pkg_dep].prefix)
+ env.set("TF_ROCM_AMDGPU_TARGETS", ",".join(self.spec.variants["amdgpu_target"].value))
else:
env.set("TF_NEED_ROCM", "0")
# Do you wish to build TensorFlow with CUDA support?
if "+cuda" in spec:
env.set("TF_NEED_CUDA", "1")
+ env.set("CUDA_NVCC", "1")
# Do you want to use clang as CUDA compiler?
env.set("TF_CUDA_CLANG", "0")
@@ -542,10 +657,9 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# Please note that each additional compute capability significantly
# increases your build time and binary size, and that TensorFlow
# only supports compute capabilities >= 3.5
- capabilities = ",".join(
- "{0:.1f}".format(float(i) / 10.0) for i in spec.variants["cuda_arch"].value
- )
- env.set("TF_CUDA_COMPUTE_CAPABILITIES", capabilities)
+ capabilities = CudaPackage.compute_capabilities(spec.variants["cuda_arch"].value)
+ env.set("TF_CUDA_COMPUTE_CAPABILITIES", ",".join(capabilities))
+ env.set("HERMETIC_CUDA_COMPUTE_CAPABILITIES", ",".join(capabilities))
else:
env.set("TF_NEED_CUDA", "0")
@@ -570,10 +684,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
# Please specify optimization flags to use during compilation when
# bazel option '--config=opt' is specified
- env.set(
- "CC_OPT_FLAGS",
- spec.target.optimization_flags(spec.compiler.name, spec.compiler.version),
- )
+ env.set("CC_OPT_FLAGS", optimization_flags(self.compiler, spec.target))
# Would you like to interactively configure ./WORKSPACE for
# Android builds?
@@ -626,6 +737,14 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
def post_configure_fixes(self):
spec = self.spec
+ if spec.satisfies("@2.17:"):
+ filter_file(
+ "patchelf",
+ spec["patchelf"].prefix.bin.patchelf,
+ "tensorflow/tools/pip_package/build_pip_package.py",
+ string=True,
+ )
+
# make sure xla is actually turned off
if spec.satisfies("~xla"):
filter_file(
@@ -672,6 +791,18 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
with open(".tf_configure.bazelrc", mode="a") as f:
f.write('build --action_env LD_LIBRARY_PATH="' + slibs + '"')
+ if spec.satisfies("@2.16.1-rocm-enhanced +rocm"):
+ if os.path.exists(spec["llvm-amdgpu"].prefix.bin.clang):
+ filter_file(
+ "/usr/lib/llvm-17/bin/clang", spec["llvm-amdgpu"].prefix.bin.clang, ".bazelrc"
+ )
+ else:
+ filter_file(
+ "/usr/lib/llvm-17/bin/clang",
+ spec["llvm-amdgpu"].prefix.llvm.bin.clang,
+ ".bazelrc",
+ )
+
filter_file("build:opt --copt=-march=native", "", ".tf_configure.bazelrc")
filter_file("build:opt --host_copt=-march=native", "", ".tf_configure.bazelrc")
@@ -721,6 +852,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
if "+cuda" in spec:
args.append("--config=cuda")
+ if spec.satisfies("@2.18:"):
+ args.append("--config=cuda_wheel")
if "+rocm" in spec:
args.append("--config=rocm")
@@ -737,23 +870,42 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
if "~nccl" in spec:
args.append("--config=nonccl")
- if "+numa" in spec:
- args.append("--config=numa")
+ # https://github.com/tensorflow/tensorflow/issues/63080
+ if self.spec.satisfies("@2.14:"):
+ args.append(f"--define=with_numa_support={'+numa' in spec}")
+ else:
+ if "+numa" in spec:
+ args.append("--config=numa")
args.append("--config=v2")
- args.append("//tensorflow/tools/pip_package:build_pip_package")
+ # https://github.com/tensorflow/tensorflow/issues/63298
+ if self.spec.satisfies("@2.17:"):
+ args.append("//tensorflow/tools/pip_package:wheel")
+ else:
+ args.append("//tensorflow/tools/pip_package:build_pip_package")
bazel(*args)
- build_pip_package = Executable("bazel-bin/tensorflow/tools/pip_package/build_pip_package")
- buildpath = join_path(self.stage.source_path, "spack-build")
- build_pip_package("--src", buildpath)
+ if self.spec.satisfies("@:2.16"):
+ build_pip_package = Executable(
+ "bazel-bin/tensorflow/tools/pip_package/build_pip_package"
+ )
+ buildpath = join_path(self.stage.source_path, "spack-build")
+ build_pip_package("--src", buildpath)
def install(self, spec, prefix):
tmp_path = env["TEST_TMPDIR"]
- buildpath = join_path(self.stage.source_path, "spack-build")
- with working_dir(buildpath):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ if self.spec.satisfies("@2.17:"):
+ buildpath = join_path(
+ self.stage.source_path, "bazel-bin/tensorflow/tools/pip_package/wheel_house/"
+ )
+ with working_dir(buildpath):
+ wheel = glob.glob("*.whl")[0]
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", wheel)
+ else:
+ buildpath = join_path(self.stage.source_path, "spack-build")
+ with working_dir(buildpath):
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
+
remove_linked_tree(tmp_path)
diff --git a/var/spack/repos/builtin/packages/py-tensorstore/package.py b/var/spack/repos/builtin/packages/py-tensorstore/package.py
new file mode 100644
index 0000000000..2df1af67b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-tensorstore/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTensorstore(PythonPackage):
+ """Read and write large, multi-dimensional arrays."""
+
+ homepage = "https://github.com/google/tensorstore"
+ pypi = "tensorstore/tensorstore-0.1.54.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.1.54", sha256="e1a9dcb0be7c828f752375409537d4b39c658dd6c6a0873fe21a24a556ec0e2a")
+
+ depends_on("cxx", type="build") # generated
+
+ # .bazelversion
+ depends_on("bazel@6.4.0", type="build")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@30.3:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.9:")
+ depends_on("py-numpy@1.16:")
+ depends_on("py-ml-dtypes@0.3.1:")
+
+ def patch(self):
+ # Trick bazelisk into using the Spack-installed copy of bazel
+ symlink(bazel.path, join_path("tools", "bazel"))
diff --git a/var/spack/repos/builtin/packages/py-termgraph/package.py b/var/spack/repos/builtin/packages/py-termgraph/package.py
new file mode 100644
index 0000000000..96d8d50294
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-termgraph/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTermgraph(PythonPackage):
+ """Command-line tool that draws basic graphs in the terminal, written in
+ Python."""
+
+ homepage = "https://github.com/mkaz/termgraph"
+ pypi = "termgraph/termgraph-0.5.3.tar.gz"
+
+ maintainers("TomMelt")
+
+ license("MIT", checked_by="tommelt")
+
+ version("0.5.3", sha256="36ff2098e41eeab1e7cdda7366dc3e5b514ea799fa3e77537564492a7edefdd5")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-colorama", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tesorter/package.py b/var/spack/repos/builtin/packages/py-tesorter/package.py
index 000489a7a9..3cdebb3b7a 100644
--- a/var/spack/repos/builtin/packages/py-tesorter/package.py
+++ b/var/spack/repos/builtin/packages/py-tesorter/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from glob import glob
+
from spack.package import *
@@ -24,8 +26,25 @@ class PyTesorter(PythonPackage):
version("1.4.6", sha256="c6952c98fa78d0084742fd6c7d2d1204d36db103c3cbeb19e52093cd9d311523")
+ depends_on("py-setuptools", type="build")
+
depends_on("py-biopython", type=("build", "run"))
depends_on("py-xopen", type=("build", "run"))
- depends_on("hmmer@3.3:", type="run")
+ depends_on("hmmer@3.3:", type=("build", "run"))
depends_on("blast-plus", type="run")
+
+ @run_after("install")
+ def run_hmmpress(self):
+ hmmpress = Executable(self.spec["hmmer"].prefix.bin.hmmpress)
+ db_dir = join_path(
+ self.prefix,
+ "lib",
+ f"python{self.spec['python'].version.dotted[:2]}",
+ "site-packages",
+ "TEsorter",
+ "database",
+ )
+ with working_dir(db_dir):
+ for f in glob("*.hmm"):
+ hmmpress(f)
diff --git a/var/spack/repos/builtin/packages/py-textual/package.py b/var/spack/repos/builtin/packages/py-textual/package.py
new file mode 100644
index 0000000000..fd1d6d4495
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-textual/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2023 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.package import *
+
+
+class PyTextual(PythonPackage):
+ """Textual is a Rapid Application Development framework for Python."""
+
+ homepage = "https://github.com/Textualize/textual"
+ pypi = "textual/textual-0.47.1.tar.gz"
+
+ version("0.47.1", sha256="4b82e317884bb1092f693f474c319ceb068b5a0b128b121f1aa53a2d48b4b80c")
+
+ depends_on("python@3.8:3", type=("build", "run"))
+
+ depends_on("py-poetry-core@1.2.0:", type="build")
+ depends_on("py-rich@13.3.3:", type=("build", "run"))
+ depends_on("py-markdown-it-py+linkify@2.1.0:", type=("build", "run"))
+ depends_on("py-mdit-py-plugins", type=("build", "run"))
+ # Depending on py-mdit-py-plugins rather than on py-markdown-it-py+plugins,
+ # because py-markdown-it-py+plugins would cause a circular dependency
+ depends_on("py-typing-extensions@4.4.0:4", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-textx/package.py b/var/spack/repos/builtin/packages/py-textx/package.py
new file mode 100644
index 0000000000..03911b530e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-textx/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTextx(PythonPackage):
+ """Meta-language for DSL implementation inspired by Xtext."""
+
+ homepage = "https://textx.github.io/textX/"
+ pypi = "textx/textx-4.0.1.tar.gz"
+
+ license("MIT")
+
+ version("4.0.1", sha256="84aff5c95fd2c947402fcbe83eeeddc23aabcfed3464ab84184ef193c52d831a")
+
+ depends_on("c", type="build")
+ depends_on("py-flit-core@3.8:3", type="build")
+ depends_on("python@3.8:3.12", type=("build", "run"))
+ depends_on("py-arpeggio@2:", type=("build", "run"))
+ depends_on("py-importlib-metadata", when="^python@:3.9", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tfdlpack/package.py b/var/spack/repos/builtin/packages/py-tfdlpack/package.py
index 32612e56f6..d910096cfd 100644
--- a/var/spack/repos/builtin/packages/py-tfdlpack/package.py
+++ b/var/spack/repos/builtin/packages/py-tfdlpack/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -22,6 +23,9 @@ class PyTfdlpack(CMakePackage, PythonExtension):
"0.1.1", tag="v0.1.1", commit="a1fdb53096158c2ec9189bb1ff46c92c6f571bbe", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=True, description="Build with CUDA support")
depends_on("cmake@3.5:", type="build")
@@ -33,19 +37,11 @@ class PyTfdlpack(CMakePackage, PythonExtension):
depends_on("py-tensorflow", type=("build", "run"))
def cmake_args(self):
- args = ["-DPYTHON_EXECUTABLE=" + self.spec["python"].command.path]
-
- if "+cuda" in self.spec:
- args.append("-DUSE_CUDA=ON")
- else:
- args.append("-DUSE_CUDA=OFF")
-
- return args
+ return [self.define_from_variant("USE_CUDA", "cuda")]
def install(self, spec, prefix):
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
def setup_run_environment(self, env):
# Prevent TensorFlow from taking over the whole GPU
diff --git a/var/spack/repos/builtin/packages/py-theano/package.py b/var/spack/repos/builtin/packages/py-theano/package.py
index a9ba9cc9e9..e2595f4e18 100644
--- a/var/spack/repos/builtin/packages/py-theano/package.py
+++ b/var/spack/repos/builtin/packages/py-theano/package.py
@@ -23,6 +23,8 @@ class PyTheano(PythonPackage, CudaPackage):
version("1.0.1", sha256="88d8aba1fe2b6b75eacf455d01bc7e31e838c5a0fb8c13dde2d9472495ff4662")
version("0.8.2", sha256="7463c8f7ed1a787bf881f36d38a38607150186697e7ce7e78bfb94b7c6af8930")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:2.8,3.3:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-thinc/package.py b/var/spack/repos/builtin/packages/py-thinc/package.py
index 1dbfac1e07..35e0eb8f47 100644
--- a/var/spack/repos/builtin/packages/py-thinc/package.py
+++ b/var/spack/repos/builtin/packages/py-thinc/package.py
@@ -18,6 +18,9 @@ class PyThinc(PythonPackage):
version("7.4.1", sha256="0139fa84dc9b8d88af15e648fc4ae13d899b8b5e49cb26a8f4a0604ee9ad8a9e")
version("7.4.0", sha256="523e9be1bfaa3ed1d03d406ce451b6b4793a9719d5b83d2ea6b3398b96bc58b8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-murmurhash@0.28:1.0", type=("build", "run"))
depends_on("py-cymem@2.0.2:2.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-thop/package.py b/var/spack/repos/builtin/packages/py-thop/package.py
index d45ef6b015..7e74efa8b8 100644
--- a/var/spack/repos/builtin/packages/py-thop/package.py
+++ b/var/spack/repos/builtin/packages/py-thop/package.py
@@ -18,7 +18,6 @@ class PyThop(PythonPackage):
version(
"0.1.1.post2209072238",
sha256="01473c225231927d2ad718351f78ebf7cffe6af3bed464c4f1ba1ef0f7cdda27",
- expand=False,
)
depends_on("py-torch", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tifffile/package.py b/var/spack/repos/builtin/packages/py-tifffile/package.py
index ed0942d8db..0d7893262e 100644
--- a/var/spack/repos/builtin/packages/py-tifffile/package.py
+++ b/var/spack/repos/builtin/packages/py-tifffile/package.py
@@ -14,10 +14,12 @@ class PyTifffile(PythonPackage):
license("BSD-3-Clause")
+ version("2024.8.30", sha256="2c9508fe768962e30f87def61819183fb07692c258cb175b3c114828368485a4")
version("2023.8.30", sha256="6a8c53b012a286b75d09a1498ab32f202f24cc6270a105b5d5911dc4426f162a")
version(
"2022.10.10", sha256="50b61ba943b866d191295bc38a00191c9fdab23ece063544c7f1a264e3f6aa8e"
)
+ version("2022.4.8", sha256="d4a4057e5cb7afe6e24cf7bde42a163970b593afe44c17249894ede755cf3faa")
version("2021.11.2", sha256="153e31fa1d892f482fabb2ae9f2561fa429ee42d01a6f67e58cee13637d9285b")
version("2020.10.1", sha256="799feeccc91965b69e1288c51a1d1118faec7f40b2eb89ad2979591b85324830")
version("0.12.1", sha256="802367effe86b0d1e64cb5c2ed886771f677fa63260b945e51a27acccdc08fa1")
@@ -31,3 +33,5 @@ class PyTifffile(PythonPackage):
depends_on("py-numpy@1.19.2:", when="@2022.2.2:", type=("build", "run"))
depends_on("py-numpy@1.15.1:", when="@2020.10.1:", type=("build", "run"))
depends_on("py-numpy@1.8.2:", type=("build", "run"))
+ # https://github.com/cgohlke/tifffile/issues/252
+ depends_on("py-numpy@:1", when="@:2024.4.23", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-timm/package.py b/var/spack/repos/builtin/packages/py-timm/package.py
index c477f3cdb1..dbf659b68c 100644
--- a/var/spack/repos/builtin/packages/py-timm/package.py
+++ b/var/spack/repos/builtin/packages/py-timm/package.py
@@ -12,10 +12,11 @@ class PyTimm(PythonPackage):
homepage = "https://github.com/rwightman/pytorch-image-models"
pypi = "timm/timm-0.4.12.tar.gz"
- maintainers("adamjstewart")
-
license("Apache-2.0")
+ maintainers("adamjstewart")
+ version("1.0.11", sha256="a005f72b87e67ed30cdbf405a9ffd4e723360c780a43b1cefe266af8ecc9d151")
+ version("0.9.7", sha256="2bfb1029e90b72e65eb9c75556169815f2e82257eaa1f6ebd623a4b4a52867a2")
version("0.9.5", sha256="669835f0030cfb2412c464b7b563bb240d4d41a141226afbbf1b457e4f18cff1")
version("0.9.2", sha256="d0977cc5e02c69bda979fca8b52aa315a5f2cb64ebf8ad2c4631b1e452762c14")
version("0.9.1", sha256="171420ac499e7999d38fb8b08fffa5ca3950b38db23bba84763cd92621ca80a2")
@@ -25,20 +26,22 @@ class PyTimm(PythonPackage):
version("0.5.4", sha256="5d7b92e66a76c432009aba90d515ea7a882aae573415a7c5269e3617df901c1f")
version("0.4.12", sha256="b14be70dbd4528b5ca8657cf5bc2672c7918c3d9ebfbffe80f4785b54e884b1e")
- # https://github.com/huggingface/pytorch-image-models/commit/f744bda994ec305a823483bf52a20c1440205032
- depends_on("python@3.8:", when="@0.9.0", type=("build", "run"))
- # https://github.com/huggingface/pytorch-image-models/issues/1530
- # https://github.com/huggingface/pytorch-image-models/pull/1649
- depends_on("python@:3.10", when="@:0.6.12", type=("build", "run"))
-
- depends_on("py-setuptools", type="build")
- depends_on("py-torch@1.7:", when="@0.6:", type=("build", "run"))
- depends_on("py-torch@1.4:", type=("build", "run"))
- depends_on("py-torchvision", type=("build", "run"))
- depends_on("py-pyyaml", when="@0.6:", type=("build", "run"))
- depends_on("py-huggingface-hub", when="@0.6:", type=("build", "run"))
- depends_on("py-safetensors", when="@0.9:", type=("build", "run"))
-
- # https://github.com/rwightman/pytorch-image-models/pull/1256
- depends_on("pil@:9", when="@:0.5", type=("build", "run"))
- depends_on("py-numpy", when="@:0.5", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-pdm-backend", when="@1:")
+ depends_on("py-setuptools", when="@:0")
+
+ with default_args(type=("build", "run")):
+ # https://github.com/huggingface/pytorch-image-models/issues/1530
+ # https://github.com/huggingface/pytorch-image-models/pull/1649
+ depends_on("python@:3.10", when="@:0.6.12", type=("build", "run"))
+
+ depends_on("py-torch@1.7:", when="@0.6:", type=("build", "run"))
+ depends_on("py-torch@1.4:", type=("build", "run"))
+ depends_on("py-torchvision", type=("build", "run"))
+ depends_on("py-pyyaml", when="@0.6:", type=("build", "run"))
+ depends_on("py-huggingface-hub", when="@0.6:", type=("build", "run"))
+ depends_on("py-safetensors", when="@0.9:", type=("build", "run"))
+
+ # https://github.com/rwightman/pytorch-image-models/pull/1256
+ depends_on("pil@:9", when="@:0.5", type=("build", "run"))
+ depends_on("py-numpy", when="@:0.5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tinyarray/package.py b/var/spack/repos/builtin/packages/py-tinyarray/package.py
index 1267ff0b60..8a57abe080 100644
--- a/var/spack/repos/builtin/packages/py-tinyarray/package.py
+++ b/var/spack/repos/builtin/packages/py-tinyarray/package.py
@@ -29,6 +29,8 @@ class PyTinyarray(PythonPackage):
version("1.2.2", sha256="660d6d8532e1db5efbebae2861e5733a7082486fbdeb47d57d84b8f477d697e4")
version("1.2.1", sha256="47a06f801ed4b3d438f4f7098e244cd0c6d7db09428b1bc5ee813e52234dee9f")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
# See https://gitlab.kwant-project.org/kwant/tinyarray/-/merge_requests/14
diff --git a/var/spack/repos/builtin/packages/py-tokenizers/package.py b/var/spack/repos/builtin/packages/py-tokenizers/package.py
index 8a5b4a88a9..4ff2c87d31 100644
--- a/var/spack/repos/builtin/packages/py-tokenizers/package.py
+++ b/var/spack/repos/builtin/packages/py-tokenizers/package.py
@@ -13,6 +13,7 @@ class PyTokenizers(PythonPackage):
homepage = "https://github.com/huggingface/tokenizers"
pypi = "tokenizers/tokenizers-0.6.0.tar.gz"
+ version("0.19.1", sha256="ee59e6680ed0fdbe6b724cf38bd70400a0c1dd623b07ac729087270caeac88e3")
version("0.15.0", sha256="10c7e6e7b4cabd757da59e93f5f8d1126291d16f8b54f28510825ef56a3e5d0e")
version("0.13.3", sha256="2e546dbb68b623008a5442353137fbb0123d311a6d7ba52f2667c8862a75af2e")
version("0.13.1", sha256="3333d1cee5c8f47c96362ea0abc1f81c77c9b92c6c3d11cbf1d01985f0d5cf1d")
diff --git a/var/spack/repos/builtin/packages/py-tomopy/package.py b/var/spack/repos/builtin/packages/py-tomopy/package.py
index 3940c9a9db..ffbd7416d0 100644
--- a/var/spack/repos/builtin/packages/py-tomopy/package.py
+++ b/var/spack/repos/builtin/packages/py-tomopy/package.py
@@ -21,6 +21,9 @@ class PyTomopy(PythonPackage):
version("1.11.0", sha256="4e5691c2b083753692ba4376ce301578037071c83fc61a6ae9e5bc9e6fcd3d1f")
version("1.0.0", sha256="ee45f7a062e5a66d6f18a904d2e204e48d85a1ce1464156f9e2f6353057dfe4c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# GPU accel needs PTL which is a git submodule. Thus, we can only build it on master
depends_on("cuda", when="@master")
# The shared opencv is not found by during runtest. Not using GOT/PLT is faster too
diff --git a/var/spack/repos/builtin/packages/py-topiary-asr/package.py b/var/spack/repos/builtin/packages/py-topiary-asr/package.py
index 29181dd768..c56160f9ad 100644
--- a/var/spack/repos/builtin/packages/py-topiary-asr/package.py
+++ b/var/spack/repos/builtin/packages/py-topiary-asr/package.py
@@ -47,7 +47,9 @@ class PyTopiaryAsr(PythonPackage):
depends_on("raxml-ng@1.1:", type="run")
depends_on("mpi", type="run")
- depends_on("openmpi+legacylaunchers", type="run", when="^openmpi schedulers=slurm")
+ depends_on(
+ "openmpi+legacylaunchers", type="run", when="^[virtuals=mpi] openmpi schedulers=slurm"
+ )
conflicts("^mpich")
diff --git a/var/spack/repos/builtin/packages/py-toposort/package.py b/var/spack/repos/builtin/packages/py-toposort/package.py
index 3f28dcba0c..ddddb77124 100644
--- a/var/spack/repos/builtin/packages/py-toposort/package.py
+++ b/var/spack/repos/builtin/packages/py-toposort/package.py
@@ -9,13 +9,20 @@ from spack.package import *
class PyToposort(PythonPackage):
"""Implements a topological sort algorithm."""
- pypi = "toposort/toposort-1.6.tar.gz"
+ pypi = "toposort/toposort-1.10.tar.gz"
maintainers("marcusboden")
license("Apache-2.0")
+ version("1.10", sha256="bfbb479c53d0a696ea7402601f4e693c97b0367837c8898bc6471adfca37a6bd")
+ version("1.9", sha256="f41a34490d44934b533a7bdaff979ee8a47203fd2d8a746db83f2d5ab12458b9")
+ version("1.8", sha256="b1e89996c43daaf0e03805d33df22333c99c9d36715b188dea0e551ce2f1cd81")
+ version("1.7", sha256="ddc2182c42912a440511bd7ff5d3e6a1cabc3accbc674a3258c8c41cbfbb2125")
version("1.6", sha256="a7428f56ef844f5055bb9e9e44b343983773ae6dce0fe5b101e08e27ffbd50ac")
- depends_on("python@2.7:2.8,3.3:", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"), when="@1.8:")
+ depends_on("python@2.7:2.8,3.3:", type=("build", "run"), when="@:1.8")
+
+ depends_on("py-setuptools@42:", type="build", when="@1.7:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-torch-cluster/package.py b/var/spack/repos/builtin/packages/py-torch-cluster/package.py
index feb225ff9a..4957e6d529 100644
--- a/var/spack/repos/builtin/packages/py-torch-cluster/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-cluster/package.py
@@ -7,40 +7,33 @@ from spack.package import *
class PyTorchCluster(PythonPackage):
- """This package consists of a small extension library of highly optimized graph cluster
- algorithms for the use in PyTorch.
- """
+ """PyTorch Extension Library of Optimized Graph Cluster Algorithms."""
homepage = "https://github.com/rusty1s/pytorch_cluster"
- url = "https://github.com/rusty1s/pytorch_cluster/archive/1.5.7.tar.gz"
+ pypi = "torch-cluster/torch_cluster-1.6.3.tar.gz"
+ git = "https://github.com/rusty1s/pytorch_cluster.git"
license("MIT")
+ maintainers("adamjstewart")
- version("1.6.3", sha256="0e2b08095e03cf87ce9b23b7a7352236a25d3ed92d92351dc020fd927ea8dbfe")
- version("1.5.8", sha256="95c6e81e9c4a6235e1b2152ab917021d2060ad995199f6bd7fb39986d37310f0")
- version("1.5.7", sha256="71701d2f7f3e458ebe5904c982951349fdb60e6f1654e19c7e102a226e2de72e")
+ version("1.6.3", sha256="78d5a930a5bbd0d8788df8c6d66addd68d6dd292fe3edb401e3dacba26308152")
- variant("cuda", default=False, description="Enables CUDA support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-scipy", type=("build", "run"))
- depends_on("py-torch+cuda", when="+cuda", type=("build", "link", "run"))
- depends_on("py-torch~cuda", when="~cuda", type=("build", "link", "run"))
- # https://github.com/rusty1s/pytorch_cluster/issues/120
- depends_on("py-torch~openmp", when="@:1.5 %apple-clang", type=("build", "link", "run"))
-
- # Historical dependencies
- depends_on("py-pytest-runner", when="@:1.5", type="build")
+ # Undocumented dependencies
+ depends_on("py-torch", type=("build", "link", "run"))
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- cuda_arches = list(self.spec["py-torch"].variants["cuda_arch"].value)
- for i, x in enumerate(cuda_arches):
- cuda_arches[i] = "{0}.{1}".format(x[0:-1], x[-1])
- env.set("TORCH_CUDA_ARCH_LIST", str.join(" ", cuda_arches))
-
- env.set("FORCE_CUDA", "1")
- env.set("CUDA_HOME", self.spec["cuda"].prefix)
+ if "+cuda" in self.spec["py-torch"]:
+ env.set("FORCE_CUDA", 1)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 0)
else:
- env.set("FORCE_CUDA", "0")
+ env.set("FORCE_CUDA", 0)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 1)
diff --git a/var/spack/repos/builtin/packages/py-torch-fidelity/package.py b/var/spack/repos/builtin/packages/py-torch-fidelity/package.py
new file mode 100644
index 0000000000..df20602e79
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-torch-fidelity/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTorchFidelity(PythonPackage):
+ """High-fidelity performance metrics for generative models in PyTorch"""
+
+ homepage = "https://www.github.com/toshas/torch-fidelity"
+ pypi = "torch_fidelity/torch_fidelity-0.3.0.tar.gz"
+
+ license("Apache-2.0", checked_by="qwertos")
+
+ version("0.3.0", sha256="3d3e33db98919759cc4f3f24cb27e1e74bdc7c905d90a780630e4e1c18492b66")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("pil", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-torch", type=("build", "run"))
+ depends_on("py-torchvision", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+
+ def patch(self):
+ os.rename(
+ join_path(self.stage.source_path, "torch_fidelity.egg-info", "requires.txt"),
+ join_path(self.stage.source_path, "requirements.txt"),
+ )
diff --git a/var/spack/repos/builtin/packages/py-torch-geometric/package.py b/var/spack/repos/builtin/packages/py-torch-geometric/package.py
index 89b5ffe181..4d5c5dcff4 100644
--- a/var/spack/repos/builtin/packages/py-torch-geometric/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-geometric/package.py
@@ -8,76 +8,30 @@ from spack.package import *
class PyTorchGeometric(PythonPackage):
- """PyTorch Geometric (PyG) is a geometric deep learning extension
- library for PyTorch. It consists of various methods for deep
- learning on graphs and other irregular structures, also known as
- geometric deep learning, from a variety of published papers. In
- addition, it consists of an easy-to-use mini-batch loader for many
- small and single giant graphs, multi gpu-support, a large number
- of common benchmark datasets (based on simple interfaces to create
- your own), and helpful transforms, both for learning on arbitrary
- graphs as well as on 3D meshes or point clouds."""
+ """Graph Neural Network Library for PyTorch."""
- homepage = "https://github.com/pyg-team/pytorch_geometric"
- pypi = "torch-geometric/torch_geometric-2.1.0.post1.tar.gz"
+ homepage = "https://pyg.org/"
+ pypi = "torch-geometric/torch_geometric-2.5.3.tar.gz"
+ git = "https://github.com/pyg-team/pytorch_geometric.git"
license("MIT")
-
- version(
- "2.1.0.post1", sha256="32347402076ccf60fa50312825178f1e3e5ce5e7b3b3a8b2729ac699da24525d"
- )
- version("1.6.3", sha256="347f693bebcc8a621eda4867dafab91c04db5f596d7ed7ecb89b242f8ab5c6a1")
- version("1.6.0", sha256="fbf43fe15421c9affc4fb361ba4db55cb9d3c64d0c29576bb58d332bf6d27fef")
-
- variant("cuda", default=False, description="Enable CUDA support")
-
- # setup.py
- depends_on("python@3.7:", when="@2:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-tqdm", type=("build", "run"))
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-scipy", type=("build", "run"))
- depends_on("py-jinja2", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-pyparsing", when="@2:", type=("build", "run"))
- depends_on("py-scikit-learn", type=("build", "run"))
-
- # README.md
- depends_on("py-torch-scatter+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch-scatter~cuda", when="~cuda", type=("build", "run"))
- depends_on("py-torch-sparse+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch-sparse~cuda", when="~cuda", type=("build", "run"))
-
- # Optional dependencies
- depends_on("py-torch-cluster+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch-cluster~cuda", when="~cuda", type=("build", "run"))
- depends_on("py-torch-spline-conv+cuda", when="+cuda", type=("build", "run"))
- depends_on("py-torch-spline-conv~cuda", when="~cuda", type=("build", "run"))
-
- # Undocumented dependencies
- depends_on("py-torch", type=("build", "run"))
-
- # Historic or optional dependencies
- with when("@:1"):
- depends_on("py-pytest-runner", type="build")
- depends_on("py-networkx", type=("build", "run"))
- depends_on("py-python-louvain", type=("build", "run"), when="@1.6.2:")
- depends_on("py-numba", type=("build", "run"))
- depends_on("py-pandas", type=("build", "run"))
- depends_on("py-rdflib", type=("build", "run"))
- depends_on("py-googledrivedownloader", type=("build", "run"))
- depends_on("py-h5py~mpi", type=("build", "run"))
- depends_on("py-ase", type=("build", "run"))
-
- def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- cuda_arches = list(self.spec["py-torch"].variants["cuda_arch"].value)
- for i, x in enumerate(cuda_arches):
- cuda_arches[i] = "{0}.{1}".format(x[0:-1], x[-1])
- env.set("TORCH_CUDA_ARCH_LIST", str.join(" ", cuda_arches))
-
- env.set("FORCE_CUDA", "1")
- env.set("CUDA_HOME", self.spec["cuda"].prefix)
- else:
- env.set("FORCE_CUDA", "0")
+ maintainers("adamjstewart")
+
+ version("2.5.3", sha256="ad0761650c8fa56cdc46ee61c564fd4995f07f079965fe732b3a76d109fd3edc")
+
+ depends_on("py-flit-core@3.2:3", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-tqdm")
+ depends_on("py-numpy")
+ depends_on("py-scipy")
+ depends_on("py-fsspec")
+ depends_on("py-jinja2")
+ depends_on("py-aiohttp")
+ depends_on("py-requests")
+ depends_on("py-pyparsing")
+ depends_on("py-scikit-learn")
+ depends_on("py-psutil@5.8:")
+
+ # Undocumented dependencies
+ depends_on("py-torch")
diff --git a/var/spack/repos/builtin/packages/py-torch-harmonics/package.py b/var/spack/repos/builtin/packages/py-torch-harmonics/package.py
new file mode 100644
index 0000000000..f680459c41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-torch-harmonics/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTorchHarmonics(PythonPackage):
+ """A differentiable spherical harmonic transform for PyTorch."""
+
+ homepage = "https://github.com/NVIDIA/torch-harmonics"
+ pypi = "torch_harmonics/torch_harmonics-0.6.5.tar.gz"
+
+ maintainers("adamjstewart")
+
+ license("BSD")
+
+ version("0.6.5", sha256="e467d04bc58eb2dc800eb21870025407d38ebcbf8df4de479bd5b4915daf987e")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-torch", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-triton", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py
index 45f9b279cb..a145e1b3ad 100644
--- a/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-nvidia-apex/package.py
@@ -13,40 +13,172 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage):
homepage = "https://github.com/nvidia/apex/"
git = "https://github.com/nvidia/apex/"
+ url = "https://github.com/NVIDIA/apex/archive/refs/tags/24.04.01.tar.gz"
license("BSD-3-Clause")
version("master", branch="master")
+ version("24.04.01", sha256="065bc5c0146ee579d5db2b38ca3949da4dc799b871961a2c9eb19e18892166ce")
+ version("23.08", tag="23.08")
+ version("23.07", tag="23.07")
+ version("23.06", tag="23.06")
+ version("23.05", tag="23.05")
+ version("22.03", tag="22.03")
version("2020-10-19", commit="8a1ed9e8d35dfad26fb973996319965e4224dcdd")
- depends_on("python@3:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-torch@0.4:", type=("build", "run"))
- depends_on("cuda@9:", when="+cuda")
- depends_on("py-pybind11", type=("build", "link", "run"))
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("cuda", default=True, description="Build with CUDA")
+ # Based on the table of the readme on github
+ variant(
+ "permutation_search_cuda", default=False, description="Build permutation search module"
+ )
+ variant("bnp", default=False, description="Build batch norm module")
+ variant("xentropy", default=False, description="Build cross entropy module")
+ variant("focal_loss_cuda", default=False, description="Build focal loss module")
+ variant("fused_index_mul_2d", default=False, description="Build fused_index_mul_2d module")
+ variant("fast_layer_norm", default=False, description="Build fast layer norm module")
+ variant("fmhalib", default=False, description="Build fmha module")
+ variant(
+ "fast_multihead_attn", default=False, description="Build fast multihead attention module"
+ )
+ variant("transducer", default=False, description="Build transducer module")
+ variant("cudnn_gbn_lib", default=False, description="Build cudnn gbn module")
+ variant("peer_memory_cuda", default=False, description="Build peer memory module")
+ variant("nccl_p2p_cuda", default=False, description="Build with nccl p2p")
+ variant("fast_bottleneck", default=False, description="Build fast_bottleneck module")
+ variant("fused_conv_bias_relu", default=False, description="Build fused_conv_bias_relu moduel")
+
+ requires(
+ "+peer_memory_cuda+nccl_p2p_cuda",
+ when="+fast_bottleneck",
+ msg="+fast_bottleneck requires both +peer_memory_cuda and +nccl_p2p_cuda to be enabled.",
+ )
+ requires("^cudnn@8.5:", when="+cudnn_gbn_lib")
+ requires("^cudnn@8.4:", when="+fused_conv_bias_relu")
+ requires("^nccl@2.10:", when="+nccl_p2p_cuda")
+
+ with default_args(type=("build")):
+ depends_on("py-setuptools")
+ depends_on("py-packaging")
+ depends_on("py-pip")
+ with default_args(type=("build", "run")):
+ depends_on("python@3:")
+ depends_on("py-torch@0.4:")
+ for _arch in CudaPackage.cuda_arch_values:
+ depends_on(f"py-torch+cuda cuda_arch={_arch}", when=f"+cuda cuda_arch={_arch}")
+
+ depends_on("py-pybind11", type=("build", "link", "run"))
+ depends_on("cuda@9:", when="+cuda")
+
# https://github.com/NVIDIA/apex/issues/1498
# https://github.com/NVIDIA/apex/pull/1499
patch("1499.patch", when="@2020-10-19")
+ conflicts(
+ "cuda_arch=none",
+ when="+cuda",
+ msg="Must specify CUDA compute capabilities of your GPU, see "
+ "https://developer.nvidia.com/cuda-gpus",
+ )
+
+ def torch_cuda_arch_list(self, env):
+ if self.spec.satisfies("+cuda"):
+ torch_cuda_arch = ";".join(
+ "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value
+ )
+ env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch)
+
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
+ if self.spec.satisfies("+cuda"):
env.set("CUDA_HOME", self.spec["cuda"].prefix)
- if self.spec.variants["cuda_arch"].value[0] != "none":
- torch_cuda_arch = ";".join(
- "{0:.1f}".format(float(i) / 10.0)
- for i in self.spec.variants["cuda_arch"].value
- )
- env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch)
+ self.torch_cuda_arch_list(env)
else:
env.unset("CUDA_HOME")
+ def setup_run_environment(self, env):
+ self.torch_cuda_arch_list(env)
+
+ @when("^py-pip@:23.0")
def global_options(self, spec, prefix):
args = []
if spec.satisfies("^py-torch@1.0:"):
args.append("--cpp_ext")
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
args.append("--cuda_ext")
+
+ if spec.satisfies("+permutation_search_cuda"):
+ args.append("--permutation_search")
+ if spec.satisfies("+bnp"):
+ args.append("--bnp")
+ if spec.satisfies("+xentropy"):
+ args.append("--xentropy")
+ if spec.satisfies("+focal_loss_cuda"):
+ args.append("--focal_loss")
+ if spec.satisfies("+fused_index_mul_2d"):
+ args.append("--index_mul_2d")
+ if spec.satisfies("+fast_layer_norm"):
+ args.append("--fast_layer_norm")
+ if spec.satisfies("+fmhalib"):
+ args.append("--fmha")
+ if spec.satisfies("+fast_multihead_attn"):
+ args.append("--fast_multihead_attn")
+ if spec.satisfies("+transducer"):
+ args.append("--transducer")
+ if spec.satisfies("+cudnn_gbn_lib"):
+ args.append("--cudnn_gbn")
+ if spec.satisfies("+peer_memory_cuda"):
+ args.append("--peer_memory")
+ if spec.satisfies("+nccl_p2p_cuda"):
+ args.append("--nccl_p2p")
+ if spec.satisfies("+fast_bottleneck"):
+ args.append("--fast_bottleneck")
+ if spec.satisfies("+fused_conv_bias_relu"):
+ args.append("--fused_conv_bias_relu")
+
return args
+
+ @when("^py-pip@23.1:")
+ def config_settings(self, spec, prefix):
+ global_options = ""
+ if spec.satisfies("^py-torch@1.0:"):
+ global_options += "--cpp_ext"
+ if spec.satisfies("+cuda"):
+ global_options += " --cuda_ext"
+
+ if spec.satisfies("+permutation_search_cuda"):
+ global_options += " --permutation_search"
+ if spec.satisfies("+bnp"):
+ global_options += " --bnp"
+ if spec.satisfies("+xentropy"):
+ global_options += " --xentropy"
+ if spec.satisfies("+focal_loss_cuda"):
+ global_options += " --focal_loss"
+ if spec.satisfies("+fused_index_mul_2d"):
+ global_options += " --index_mul_2d"
+ if spec.satisfies("+fast_layer_norm"):
+ global_options += " --fast_layer_norm"
+ if spec.satisfies("+fmhalib"):
+ global_options += " --fmha"
+ if spec.satisfies("+fast_multihead_attn"):
+ global_options += " --fast_multihead_attn"
+ if spec.satisfies("+transducer"):
+ global_options += " --transducer"
+ if spec.satisfies("+cudnn_gbn_lib"):
+ global_options += " --cudnn_gbn"
+ if spec.satisfies("+peer_memory_cuda"):
+ global_options += " --peer_memory"
+ if spec.satisfies("+nccl_p2p_cuda"):
+ global_options += " --nccl_p2p"
+ if spec.satisfies("+fast_bottleneck"):
+ global_options += " --fast_bottleneck"
+ if spec.satisfies("+fused_conv_bias_relu"):
+ global_options += " --fused_conv_bias_relu"
+
+ return {
+ "builddir": "build",
+ "compile-args": f"-j{make_jobs}",
+ "--global-option": global_options,
+ }
diff --git a/var/spack/repos/builtin/packages/py-torch-scatter/package.py b/var/spack/repos/builtin/packages/py-torch-scatter/package.py
index 52804ef4b6..1ee6e2a697 100644
--- a/var/spack/repos/builtin/packages/py-torch-scatter/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-scatter/package.py
@@ -7,34 +7,32 @@ from spack.package import *
class PyTorchScatter(PythonPackage):
- """This package consists of a small extension library of
- highly optimized sparse update (scatter and segment)
- operations for the use in PyTorch, which are missing in the
- main package."""
+ """PyTorch Extension Library of Optimized Scatter Operations."""
homepage = "https://github.com/rusty1s/pytorch_scatter"
- url = "https://github.com/rusty1s/pytorch_scatter/archive/2.0.5.tar.gz"
+ pypi = "torch-scatter/torch_scatter-2.1.2.tar.gz"
+ git = "https://github.com/rusty1s/pytorch_scatter.git"
license("MIT")
+ maintainers("adamjstewart")
- version("2.0.5", sha256="e29b364beaa9c84a99e0e236be89ed19d4452d89010ff736184ddcce488b47f6")
+ version("2.1.2", sha256="69b3aa435f2424ac6a1bfb6ff702da6eb73b33ca0db38fb26989c74159258e47")
- variant("cuda", default=False, description="Enable CUDA support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
- depends_on("python@3.6:", type=("build", "run"))
+ depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-pytest-runner", type="build")
- depends_on("py-torch+cuda", when="+cuda")
- depends_on("py-torch~cuda", when="~cuda")
+
+ # Undocumented dependencies
+ depends_on("py-torch", type=("build", "link", "run"))
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- cuda_arches = list(self.spec["py-torch"].variants["cuda_arch"].value)
- for i, x in enumerate(cuda_arches):
- cuda_arches[i] = "{0}.{1}".format(x[0:-1], x[-1])
- env.set("TORCH_CUDA_ARCH_LIST", str.join(" ", cuda_arches))
-
- env.set("FORCE_CUDA", "1")
- env.set("CUDA_HOME", self.spec["cuda"].prefix)
+ if "+cuda" in self.spec["py-torch"]:
+ env.set("FORCE_CUDA", 1)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 0)
else:
- env.set("FORCE_CUDA", "0")
+ env.set("FORCE_CUDA", 0)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 1)
diff --git a/var/spack/repos/builtin/packages/py-torch-sparse/package.py b/var/spack/repos/builtin/packages/py-torch-sparse/package.py
index 8a1ed1a57d..eaa3e13bfa 100644
--- a/var/spack/repos/builtin/packages/py-torch-sparse/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-sparse/package.py
@@ -7,36 +7,57 @@ from spack.package import *
class PyTorchSparse(PythonPackage):
- """This package consists of a small extension library of
- optimized sparse matrix operations with autograd support."""
+ """PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations."""
- homepage = "https://github.com/rusty1s/pytorch_sparse/"
- url = "https://github.com/rusty1s/pytorch_sparse/archive/0.6.7.tar.gz"
+ homepage = "https://github.com/rusty1s/pytorch_sparse"
+ pypi = "torch-sparse/torch_sparse-0.6.18.tar.gz"
+ git = "https://github.com/rusty1s/pytorch_sparse.git"
license("MIT")
+ maintainers("adamjstewart")
- version("0.6.17", sha256="c964a70ed978bff65009250eb12fae96317c60c9a04d7d1b07f0beee8b4b9c22")
- version("0.6.8", sha256="98f7ff1f0f9cd5031bc81c70c11970c3864545ae33677025a6efd2466a97e6f9")
- version("0.6.7", sha256="0d038a1502548692972a085cd0496460b5d2050bb7328427add990f081d6c44d")
+ version("0.6.18", sha256="2f14c510a6e93f404c6ea357210615b3c15a71731f9dbd86f25434e34fb5a741")
+ version("0.6.17", sha256="06e268dd77f73eb641da8f9383306d7afac6423383c9197b9df120955e2a96bd")
+ version("0.6.8", sha256="312fb5ae6e4e575fca4bbc0bd092af85e7679d5b8e53459f24492fc2a073c7b6")
+ version("0.6.7", sha256="f69b2ed35baf2a9853234756a2b19e6f7ce88d2c1f029d1c7ca166d91e1adbd0")
- variant("cuda", default=False, description="Enable CUDA support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("py-setuptools", type="build")
- depends_on("py-pytest-runner", when="@:0.6.8", type="build")
depends_on("py-scipy", type=("build", "run"))
- depends_on("py-torch", type=("build", "run"))
- depends_on("py-torch-scatter+cuda", when="+cuda")
- depends_on("py-torch-scatter~cuda", when="~cuda")
+
+ # Undocumented dependencies
+ depends_on("py-torch", type=("build", "link", "run"))
+ depends_on("py-torch-scatter", type=("build", "run"))
depends_on("parallel-hashmap", when="@0.6.17:")
+ # Historical dependencies
+ depends_on("py-pytest-runner", when="@:0.6.8", type="build")
+
+ def patch(self):
+ # Force build against externally-installed hashmap
+ filter_file(
+ "include_dirs=[extensions_dir, phmap_dir]",
+ "include_dirs=[extensions_dir]",
+ "setup.py",
+ string=True,
+ )
+
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- cuda_arches = list(self.spec["py-torch"].variants["cuda_arch"].value)
- for i, x in enumerate(cuda_arches):
- cuda_arches[i] = "{0}.{1}".format(x[0:-1], x[-1])
- env.set("TORCH_CUDA_ARCH_LIST", str.join(" ", cuda_arches))
-
- env.set("FORCE_CUDA", "1")
- env.set("CUDA_HOME", self.spec["cuda"].prefix)
+ if self.spec.satisfies("@0.6.9:"):
+ if "+cuda" in self.spec["py-torch"]:
+ env.set("FORCE_CUDA", 1)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 0)
+ else:
+ env.set("FORCE_CUDA", 0)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 1)
else:
- env.set("FORCE_CUDA", "0")
+ if "+cuda" in self.spec["py-torch"]:
+ env.set("FORCE_CUDA", 1)
+ env.set("FORCE_CPU", 0)
+ else:
+ env.set("FORCE_CUDA", 0)
+ env.set("FORCE_CPU", 1)
diff --git a/var/spack/repos/builtin/packages/py-torch-spline-conv/package.py b/var/spack/repos/builtin/packages/py-torch-spline-conv/package.py
index e1bc630e54..2328adaac6 100644
--- a/var/spack/repos/builtin/packages/py-torch-spline-conv/package.py
+++ b/var/spack/repos/builtin/packages/py-torch-spline-conv/package.py
@@ -7,32 +7,32 @@ from spack.package import *
class PyTorchSplineConv(PythonPackage):
- """This is a PyTorch implementation of the spline-based
- convolution operator of SplineCNN."""
+ """Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch."""
homepage = "https://github.com/rusty1s/pytorch_spline_conv"
- url = "https://github.com/rusty1s/pytorch_spline_conv/archive/1.2.0.tar.gz"
+ pypi = "torch-spline-conv/torch_spline_conv-1.2.2.tar.gz"
+ git = "https://github.com/rusty1s/pytorch_spline_conv.git"
license("MIT")
+ maintainers("adamjstewart")
- version("1.2.0", sha256="ab8da41357c8a4785662366655bb6dc5e84fd0e938008194955409aefe535009")
+ version("1.2.2", sha256="ed45a81da29f774665dbdd4709d7e534cdf16d2e7006dbd06957f35bd09661b2")
- variant("cuda", default=False, description="Enable CUDA support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
- depends_on("python@3.6:", type=("build", "run"))
+ depends_on("python", type=("build", "link", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-pytest-runner", type="build")
- depends_on("py-torch+cuda", when="+cuda")
- depends_on("py-torch~cuda", when="~cuda")
+
+ # Undocumented dependencies
+ depends_on("py-torch", type=("build", "link", "run"))
def setup_build_environment(self, env):
- if "+cuda" in self.spec:
- cuda_arches = list(self.spec["py-torch"].variants["cuda_arch"].value)
- for i, x in enumerate(cuda_arches):
- cuda_arches[i] = "{0}.{1}".format(x[0:-1], x[-1])
- env.set("TORCH_CUDA_ARCH_LIST", str.join(" ", cuda_arches))
-
- env.set("FORCE_CUDA", "1")
- env.set("CUDA_HOME", self.spec["cuda"].prefix)
+ if "+cuda" in self.spec["py-torch"]:
+ env.set("FORCE_CUDA", 1)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 0)
else:
- env.set("FORCE_CUDA", "0")
+ env.set("FORCE_CUDA", 0)
+ env.set("FORCE_ONLY_CUDA", 0)
+ env.set("FORCE_ONLY_CPU", 1)
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index bfe66074e9..e2bc15b64e 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -17,15 +17,23 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
git = "https://github.com/pytorch/pytorch.git"
submodules = True
- maintainers("adamjstewart")
-
# Exact set of modules is version- and variant-specific, just attempt to import the
# core libraries to ensure that the package was successfully installed.
import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"]
- license("Intel")
+ license("BSD-3-Clause")
+ maintainers("adamjstewart")
version("main", branch="main")
+ version("2.5.1", tag="v2.5.1", commit="a8d6afb511a69687bbb2b7e88a3cf67917e1697e")
+ version("2.5.0", tag="v2.5.0", commit="32f585d9346e316e554c8d9bf7548af9f62141fc")
+ version("2.4.1", tag="v2.4.1", commit="ee1b6804381c57161c477caa380a840a84167676")
+ version("2.4.0", tag="v2.4.0", commit="d990dada86a8ad94882b5c23e859b88c0c255bda")
+ version("2.3.1", tag="v2.3.1", commit="63d5e9221bedd1546b7d364b5ce4171547db12a9")
+ version("2.3.0", tag="v2.3.0", commit="97ff6cfd9c86c5c09d7ce775ab64ec5c99230f5d")
+ version("2.2.2", tag="v2.2.2", commit="39901f229520a5256505ec24782f716ee7ddc843")
+ version("2.2.1", tag="v2.2.1", commit="6c8c5ad5eaf47a62fafbb4a2747198cbffbf1ff0")
+ version("2.2.0", tag="v2.2.0", commit="8ac9b20d4b090c213799e81acf48a55ea8d437d6")
version("2.1.2", tag="v2.1.2", commit="a8e7c98cb95ff97bb30a728c6b2a1ce6bff946eb")
version("2.1.1", tag="v2.1.1", commit="4c55dc50355d5e923642c59ad2a23d6ad54711e7")
version("2.1.0", tag="v2.1.0", commit="7bcf7da3a268b435777fe87c7794c382f444e86d")
@@ -51,6 +59,9 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
version("1.5.0", tag="v1.5.0", commit="4ff3872a2099993bf7e8c588f7182f3df777205b")
version("1.4.1", tag="v1.4.1", commit="74044638f755cd8667bedc73da4dbda4aa64c948")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
is_darwin = sys.platform == "darwin"
# All options are defined in CMakeLists.txt.
@@ -72,29 +83,21 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
when="@1.12: platform=darwin",
)
variant("nccl", default=True, description="Use NCCL", when="+cuda platform=linux")
- variant("nccl", default=True, description="Use NCCL", when="+cuda platform=cray")
variant("nccl", default=True, description="Use NCCL", when="+rocm platform=linux")
- variant("nccl", default=True, description="Use NCCL", when="+rocm platform=cray")
# Requires AVX2: https://discuss.pytorch.org/t/107518
variant("nnpack", default=True, description="Use NNPACK", when="target=x86_64_v3:")
variant("numa", default=True, description="Use NUMA", when="platform=linux")
- variant("numa", default=True, description="Use NUMA", when="platform=cray")
variant("numpy", default=True, description="Use NumPy")
variant("openmp", default=True, description="Use OpenMP for parallel code")
variant("qnnpack", default=True, description="Use QNNPACK (quantized 8-bit operators)")
variant("valgrind", default=True, description="Use Valgrind", when="@1.8: platform=linux")
- variant("valgrind", default=True, description="Use Valgrind", when="@1.8: platform=cray")
variant("xnnpack", default=True, description="Use XNNPACK", when="@1.5:")
variant("mkldnn", default=True, description="Use MKLDNN")
- variant("distributed", default=not is_darwin, description="Use distributed")
- variant("mpi", default=not is_darwin, description="Use MPI for Caffe2", when="+distributed")
- variant("gloo", default=not is_darwin, description="Use Gloo", when="+distributed")
- variant(
- "tensorpipe",
- default=not is_darwin,
- description="Use TensorPipe",
- when="@1.6: +distributed",
- )
+ variant("distributed", default=True, description="Use distributed")
+ variant("mpi", default=True, description="Use MPI for Caffe2", when="+distributed")
+ variant("ucc", default=False, description="Use UCC", when="@1.13: +distributed")
+ variant("gloo", default=True, description="Use Gloo", when="+distributed")
+ variant("tensorpipe", default=True, description="Use TensorPipe", when="@1.6: +distributed")
variant("onnx_ml", default=True, description="Enable traditional ONNX ML API", when="@1.5:")
variant(
"breakpad",
@@ -102,6 +105,10 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
description="Enable breakpad crash dump library",
when="@1.10:1.11",
)
+ # py-torch has strict dependencies on old protobuf/py-protobuf versions that
+ # cause problems with other packages that require newer versions of protobuf
+ # and py-protobuf --> provide an option to use the internal/vendored protobuf.
+ variant("custom-protobuf", default=False, description="Use vendored protobuf")
conflicts("+cuda+rocm")
conflicts("+tensorpipe", when="+rocm ^hip@:5.1", msg="TensorPipe not supported until ROCm 5.2")
@@ -129,87 +136,133 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
)
# Required dependencies
- # See python_min_version in setup.py
- # Upper bounds come from wheel availability on PyPI
- depends_on("python@3.8:3.11", when="@2:", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@1.11:1", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@1.7.1:1.10", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@1.4:1.7.0", type=("build", "link", "run"))
+ # Based on PyPI wheel availability
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.9:3.13", when="@2.5:")
+ depends_on("python@3.8:3.12", when="@2.2:2.4")
+ depends_on("python@3.8:3.11", when="@2.0:2.1")
+ depends_on("python@:3.10", when="@1.11:1")
+ depends_on("python@:3.9", when="@1.7.1:1.10")
+ depends_on("python@:3.8", when="@1.4:1.7.0")
# CMakelists.txt
- depends_on("cmake@3.18:", when="@2:", type="build")
- depends_on("cmake@3.13:", when="@1.11:", type="build")
- depends_on("cmake@3.10:", when="@1.10:", type="build")
- depends_on("cmake@3.5:", type="build")
-
- # pyproject.toml
- depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-astunparse", when="@1.13:", type=("build", "run"))
- depends_on("py-numpy@1.16.6:", type=("build", "run"))
- depends_on("ninja@1.5:", when="@1.1:", type="build")
- depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-requests", when="@1.13:", type=("build", "run"))
- depends_on("py-cffi", when="@:1", type=("build", "run"))
- depends_on("py-future", when="@1.5:1", type=("build", "run"))
- depends_on("py-six", when="@1.13:1", type=("build", "run"))
-
- # setup.py
- depends_on("py-filelock", when="@2:", type=("build", "run"))
- depends_on("py-typing-extensions@3.6.2.1:", when="@1.7:", type=("build", "run"))
- depends_on("py-sympy", when="@2:", type=("build", "run"))
- depends_on("py-networkx", when="@2:", type=("build", "run"))
- depends_on("py-jinja2", when="@2:", type=("build", "run"))
- depends_on("py-fsspec", when="@2.1:", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("cmake@3.18:", when="@2:")
+ depends_on("cmake@3.13:", when="@1.11:")
+ depends_on("cmake@3.10:", when="@1.10:")
+ depends_on("cmake@3.5:")
+ depends_on("ninja@1.5:")
+
+ with default_args(type=("build", "run")):
+ # setup.py
+ depends_on("py-filelock", when="@2:")
+ depends_on("py-typing-extensions@4.8:", when="@2.2:")
+ depends_on("py-typing-extensions@3.6.2.1:", when="@1.7:")
+ depends_on("py-sympy", when="@2:")
+ depends_on("py-networkx", when="@2:")
+ depends_on("py-jinja2", when="@2:")
+ depends_on("py-fsspec", when="@2.1:")
+
+ # pyproject.toml
+ depends_on("py-setuptools")
+ depends_on("py-astunparse", when="@1.13:")
+ depends_on("py-numpy@1.16.6:")
+ # https://github.com/pytorch/pytorch/issues/107302
+ depends_on("py-numpy@:1", when="@:2.2")
+ depends_on("py-pyyaml")
+ depends_on("py-requests", when="@1.13:")
# Undocumented dependencies
depends_on("py-tqdm", type="run")
depends_on("blas")
depends_on("lapack")
- # third_party
- depends_on("py-pybind11@2.11.0", when="@2.1:", type=("build", "link", "run"))
- depends_on("py-pybind11@2.10.1", when="@2.0", type=("build", "link", "run"))
- depends_on("py-pybind11@2.10.0", when="@1.13:1", type=("build", "link", "run"))
- depends_on("py-pybind11@2.6.2", when="@1.8:1.12", type=("build", "link", "run"))
- depends_on("py-pybind11@2.3.0", when="@:1.7", type=("build", "link", "run"))
- depends_on("py-protobuf@3.12.2:", when="@1.10:", type=("build", "run"))
- depends_on("py-protobuf@:3.14", when="@:1.9", type=("build", "run"))
- depends_on("protobuf@3.12.2:", when="@1.10:")
- depends_on("protobuf@:3.14", when="@:1.9")
- # https://github.com/protocolbuffers/protobuf/issues/10051
- # https://github.com/pytorch/pytorch/issues/78362
- depends_on("py-protobuf@:3", type=("build", "run"))
- depends_on("protobuf@:3", type=("build", "run"))
- depends_on("eigen")
- # https://github.com/pytorch/pytorch/issues/60329
- # depends_on("cpuinfo@2023-01-13", when="@2.1:")
- # depends_on("cpuinfo@2022-08-19", when="@1.13:2.0")
- # depends_on("cpuinfo@2020-12-17", when="@1.8:1.12")
- # depends_on("cpuinfo@2020-06-11", when="@1.6:1.7")
- # https://github.com/shibatch/sleef/issues/474
- # depends_on("sleef@3.5.1_2020-12-22", when="@1.8:")
- # depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7")
+ # Third party dependencies
depends_on("fp16@2020-05-14", when="@1.6:")
- depends_on("pthreadpool@2021-04-13", when="@1.9:")
- depends_on("pthreadpool@2020-10-05", when="@1.8")
- depends_on("pthreadpool@2020-06-15", when="@1.6:1.7")
- depends_on("psimd@2020-05-17", when="@1.6:")
depends_on("fxdiv@2020-04-17", when="@1.6:")
+ # https://github.com/pytorch/pytorch/issues/60332
+ # depends_on("xnnpack@2024-02-29", when="@2.3:+xnnpack")
+ # depends_on("xnnpack@2022-12-21", when="@2.0:2.2+xnnpack")
+ # depends_on("xnnpack@2022-02-16", when="@1.12:1+xnnpack")
+ # depends_on("xnnpack@2021-06-21", when="@1.10:1.11+xnnpack")
+ # depends_on("xnnpack@2021-02-22", when="@1.8:1.9+xnnpack")
+ # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack")
depends_on("benchmark", when="@1.6:+test")
+ depends_on("cpuinfo@2024-09-06", when="@2.5.1:")
+ depends_on("cpuinfo@2024-08-30", when="@2.5.0")
+ depends_on("cpuinfo@2023-11-04", when="@2.3:2.4")
+ depends_on("cpuinfo@2023-01-13", when="@2.1:2.2")
+ depends_on("cpuinfo@2022-08-19", when="@1.13:2.0")
+ depends_on("cpuinfo@2020-12-17", when="@1.8:1.12")
+ depends_on("cpuinfo@2020-06-11", when="@1.6:1.7")
+ depends_on("eigen")
+ depends_on("gloo@2023-12-03", when="@2.3:+gloo")
+ depends_on("gloo@2023-05-19", when="@2.1:2.2+gloo")
+ depends_on("gloo@2023-01-17", when="@2.0+gloo")
+ depends_on("gloo@2022-05-18", when="@1.13:1+gloo")
+ depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo")
+ depends_on("gloo@2021-05-04", when="@1.9+gloo")
+ depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo")
+ depends_on("gloo@2020-03-17", when="@1.6+gloo")
+ depends_on("gloo+cuda", when="@1.6:+gloo+cuda")
+ depends_on("gloo+libuv", when="@1.6: platform=darwin")
+ depends_on("nccl", when="+nccl+cuda")
+ # https://github.com/pytorch/pytorch/issues/60331
+ # depends_on("onnx@1.16.0", when="@2.3:+onnx_ml")
+ # depends_on("onnx@1.15.0", when="@2.2+onnx_ml")
+ # depends_on("onnx@1.14.1", when="@2.1+onnx_ml")
+ # depends_on("onnx@1.13.1", when="@2.0+onnx_ml")
+ # depends_on("onnx@1.12.0", when="@1.13:1+onnx_ml")
+ # depends_on("onnx@1.11.0", when="@1.12+onnx_ml")
+ # depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml")
+ # depends_on("onnx@1.10.1", when="@1.10+onnx_ml")
+ # depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml")
+ # depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml")
+ with when("~custom-protobuf"):
+ depends_on("protobuf@3.13.0", when="@1.10:")
+ depends_on("protobuf@3.11.4", when="@1.6:1.9")
+ depends_on("protobuf@3.6.1", when="@1.1:1.5")
+ depends_on("protobuf@3.5.0", when="@1.0")
+ with default_args(type=("build", "run")):
+ depends_on("py-protobuf@3.13", when="@1.10:")
+ depends_on("py-protobuf@3.11", when="@1.6:1.9")
+ depends_on("py-protobuf@3.6", when="@1.1:1.5")
+ depends_on("py-protobuf@3.5", when="@1.0")
+ depends_on("psimd@2020-05-17", when="@1.6:")
+ depends_on("pthreadpool@2023-08-29", when="@2.2:")
+ depends_on("pthreadpool@2021-04-13", when="@1.9:2.1")
+ depends_on("pthreadpool@2020-10-05", when="@1.8")
+ depends_on("pthreadpool@2020-06-15", when="@1.6:1.7")
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-pybind11@2.13.5:", when="@2.5:")
+ depends_on("py-pybind11@2.12.0:", when="@2.3:2.4")
+ depends_on("py-pybind11@2.11.0:", when="@2.1:2.2")
+ depends_on("py-pybind11@2.10.1:", when="@2.0")
+ depends_on("py-pybind11@2.10.0:", when="@1.13:1")
+ depends_on("py-pybind11@2.6.2:", when="@1.8:1.12")
+ depends_on("py-pybind11@2.3.0:", when="@:1.7")
+ depends_on("sleef@3.6.0_2024-03-20", when="@2.4:")
+ depends_on("sleef@3.5.1_2020-12-22", when="@1.8:2.3")
+ depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7")
# Optional dependencies
+ with default_args(type=("build", "link", "run")):
+ # cmake/public/cuda.cmake
+ depends_on("cuda@11:", when="@2.4:+cuda")
+ # https://github.com/pytorch/pytorch/issues/122169
+ depends_on("cuda@11:12.3", when="@2.0:2.3+cuda")
+ depends_on("cuda@10.2:12.3", when="@1.11:1+cuda")
+ # https://discuss.pytorch.org/t/compiling-1-10-1-from-source-with-gcc-11-and-cuda-11-5/140971
+ depends_on("cuda@10.2:11.4", when="@1.10+cuda")
+ depends_on("cuda@9.2:11.4", when="@1.6:1.9+cuda")
+ depends_on("cuda@9:11.4", when="@:1.5+cuda")
# https://github.com/pytorch/pytorch#prerequisites
- depends_on("cuda@11:", when="@2:+cuda", type=("build", "link", "run"))
- depends_on("cuda@10.2:", when="@1.11:1+cuda", type=("build", "link", "run"))
- # https://discuss.pytorch.org/t/compiling-1-10-1-from-source-with-gcc-11-and-cuda-11-5/140971
- depends_on("cuda@10.2:11.4", when="@1.10+cuda", type=("build", "link", "run"))
- depends_on("cuda@9.2:11.4", when="@1.6:1.9+cuda", type=("build", "link", "run"))
- depends_on("cuda@9:11.4", when="@:1.5+cuda", type=("build", "link", "run"))
- depends_on("cudnn@7:", when="@1.6:+cudnn")
+ # https://github.com/pytorch/pytorch/issues/119400
+ depends_on("cudnn@8.5:9.0", when="@2.3:+cudnn")
+ depends_on("cudnn@7:8", when="@1.6:2.2+cudnn")
depends_on("cudnn@7", when="@:1.5+cudnn")
depends_on("magma+cuda", when="+magma+cuda")
depends_on("magma+rocm", when="+magma+rocm")
- depends_on("nccl", when="+nccl+cuda")
depends_on("numactl", when="+numa")
depends_on("llvm-openmp", when="%apple-clang +openmp")
depends_on("valgrind", when="+valgrind")
@@ -228,36 +281,25 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
depends_on("rocblas")
depends_on("miopen-hip")
depends_on("rocminfo")
- # https://github.com/pytorch/pytorch/issues/60332
- # depends_on("xnnpack@2022-12-21", when="@2:+xnnpack")
- # depends_on("xnnpack@2022-02-16", when="@1.12:1+xnnpack")
- # depends_on("xnnpack@2021-06-21", when="@1.10:1.11+xnnpack")
- # depends_on("xnnpack@2021-02-22", when="@1.8:1.9+xnnpack")
- # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack")
depends_on("mpi", when="+mpi")
- depends_on("gloo@2023-05-19", when="@2.1:+gloo")
- depends_on("gloo@2023-01-17", when="@2.0+gloo")
- depends_on("gloo@2022-05-18", when="@1.13:1+gloo")
- depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo")
- depends_on("gloo@2021-05-04", when="@1.9+gloo")
- depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo")
- depends_on("gloo@2020-03-17", when="@1.6+gloo")
- depends_on("gloo+cuda", when="@1.6:+gloo+cuda")
- # https://github.com/pytorch/pytorch/issues/60331
- # depends_on("onnx@1.14.1", when="@2.1:+onnx_ml")
- # depends_on("onnx@1.13.1", when="@2.0+onnx_ml")
- # depends_on("onnx@1.12.0", when="@1.13:1+onnx_ml")
- # depends_on("onnx@1.11.0", when="@1.12+onnx_ml")
- # depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml")
- # depends_on("onnx@1.10.1", when="@1.10+onnx_ml")
- # depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml")
- # depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml")
+ depends_on("ucc", when="+ucc")
+ depends_on("ucx", when="+ucc")
depends_on("mkl", when="+mkldnn")
# Test dependencies
- depends_on("py-hypothesis", type="test")
- depends_on("py-six", type="test")
- depends_on("py-psutil", type="test")
+ with default_args(type="test"):
+ depends_on("py-hypothesis")
+ depends_on("py-six")
+ depends_on("py-psutil")
+
+ # Historical dependencies
+ with default_args(type=("build", "run")):
+ depends_on("mkl@2021.1.1:2021.4.0", when="@2.3 platform=windows")
+ depends_on("py-cffi", when="@:1")
+ depends_on("py-future", when="@1.5:1")
+ depends_on("py-six", when="@1.13:1")
+
+ conflicts("%gcc@:9.3", when="@2.2:", msg="C++17 support required")
# https://github.com/pytorch/pytorch/issues/90448
patch(
@@ -419,6 +461,20 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
when="@2.0.0:2.0.1",
)
+ # Use correct OpenBLAS include path under prefix
+ patch(
+ "https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/110063.patch?full_index=1",
+ sha256="23fb4009f7337051fc5303927ff977186a5af960245e7212895406477d8b2f66",
+ when="@:2.1",
+ )
+
+ patch(
+ "https://github.com/pytorch/FBGEMM/commit/da01a59556fec9776733bf20aea8fe8fb29cdd3d.patch?full_index=1",
+ sha256="97d8bd43f8cd8bb203dab3480d609c08499224acaca9915f2bdeb23c62350fb1",
+ when="@2.0.1 +fbgemm",
+ working_dir="third_party/fbgemm",
+ )
+
@when("@1.5.0:")
def patch(self):
# https://github.com/pytorch/pytorch/issues/52208
@@ -428,6 +484,13 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
"caffe2/CMakeLists.txt",
)
+ def torch_cuda_arch_list(self, env):
+ if "+cuda" in self.spec:
+ torch_cuda_arch = CudaPackage.compute_capabilities(
+ self.spec.variants["cuda_arch"].value
+ )
+ env.set("TORCH_CUDA_ARCH_LIST", ";".join(torch_cuda_arch))
+
def setup_build_environment(self, env):
"""Set environment variables used to control the build.
@@ -468,12 +531,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
enable_or_disable("cuda")
if "+cuda" in self.spec:
+ env.set("CUDA_TOOLKIT_ROOT_DIR", self.spec["cuda"].prefix) # Linux/macOS
env.set("CUDA_HOME", self.spec["cuda"].prefix) # Linux/macOS
env.set("CUDA_PATH", self.spec["cuda"].prefix) # Windows
- torch_cuda_arch = ";".join(
- "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value
- )
- env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch)
+ self.torch_cuda_arch_list(env)
+
if self.spec.satisfies("%clang"):
for flag in self.spec.compiler_flags["cxxflags"]:
if "gcc-toolchain" in flag:
@@ -506,6 +568,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
env.set("CUDNN_INCLUDE_DIR", self.spec["cudnn"].prefix.include)
env.set("CUDNN_LIBRARY", self.spec["cudnn"].libs[0])
+ # Flash attention has very high memory requirements that may cause the build to fail
+ # https://github.com/pytorch/pytorch/issues/111526
+ # https://github.com/pytorch/pytorch/issues/124018
+ env.set("USE_FLASH_ATTENTION", "OFF")
+
enable_or_disable("fbgemm")
enable_or_disable("kineto")
enable_or_disable("magma")
@@ -537,6 +604,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
enable_or_disable("mkldnn")
enable_or_disable("distributed")
enable_or_disable("mpi")
+ enable_or_disable("ucc")
# cmake/Modules/FindGloo.cmake
enable_or_disable("gloo")
enable_or_disable("tensorpipe")
@@ -560,9 +628,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
if self.spec["blas"].name == "atlas":
env.set("BLAS", "ATLAS")
env.set("WITH_BLAS", "atlas")
+ env.set("Atlas_ROOT_DIR", self.spec["atlas"].prefix)
elif self.spec["blas"].name in ["blis", "amdblis"]:
env.set("BLAS", "BLIS")
env.set("WITH_BLAS", "blis")
+ env.set("BLIS_HOME", self.spec["blas"].prefix)
elif self.spec["blas"].name == "eigen":
env.set("BLAS", "Eigen")
elif self.spec["lapack"].name in ["libflame", "amdlibflame"]:
@@ -579,6 +649,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
elif self.spec["blas"].name == "openblas":
env.set("BLAS", "OpenBLAS")
env.set("WITH_BLAS", "open")
+ env.set("OpenBLAS_HOME", self.spec["openblas"].prefix)
elif self.spec["blas"].name == "veclibfort":
env.set("BLAS", "vecLib")
env.set("WITH_BLAS", "veclib")
@@ -590,33 +661,31 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
env.set("WITH_BLAS", "generic")
# Don't use vendored third-party libraries when possible
- env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
- env.set("USE_SYSTEM_NCCL", "ON")
+ # env.set("USE_SYSTEM_LIBS", "ON")
+ env.set("USE_SYSTEM_BENCHMARK", "ON")
+ env.set("USE_SYSTEM_CPUINFO", "ON")
env.set("USE_SYSTEM_EIGEN_INSTALL", "ON")
- env.set("pybind11_DIR", self.spec["py-pybind11"].prefix)
- env.set("pybind11_INCLUDE_DIR", self.spec["py-pybind11"].prefix.include)
- if self.spec.satisfies("@1.10:"):
- env.set("USE_SYSTEM_PYBIND11", "ON")
- if self.spec.satisfies("@1.6:"):
- # env.set("USE_SYSTEM_LIBS", "ON")
- # https://github.com/pytorch/pytorch/issues/60329
- # env.set("USE_SYSTEM_CPUINFO", "ON")
- # https://github.com/shibatch/sleef/issues/474
- # env.set("USE_SYSTEM_SLEEF", "ON")
- env.set("USE_SYSTEM_GLOO", "ON")
- env.set("USE_SYSTEM_FP16", "ON")
- env.set("USE_SYSTEM_PTHREADPOOL", "ON")
- env.set("USE_SYSTEM_PSIMD", "ON")
- env.set("USE_SYSTEM_FXDIV", "ON")
- env.set("USE_SYSTEM_BENCHMARK", "ON")
- # https://github.com/pytorch/pytorch/issues/60331
- # env.set("USE_SYSTEM_ONNX", "ON")
- # https://github.com/pytorch/pytorch/issues/60332
- # env.set("USE_SYSTEM_XNNPACK", "ON")
-
- # https://github.com/pytorch/pytorch/issues/111086
- if self.spec.satisfies("%apple-clang@15:"):
- env.append_flags("LDFLAGS", "-Wl,-ld_classic")
+ env.set("USE_SYSTEM_FP16", "ON")
+ env.set("USE_SYSTEM_FXDIV", "ON")
+ env.set("USE_SYSTEM_GLOO", "ON")
+ env.set("USE_SYSTEM_NCCL", "ON")
+ # https://github.com/pytorch/pytorch/issues/60331
+ # env.set("USE_SYSTEM_ONNX", "ON")
+ env.set("USE_SYSTEM_PSIMD", "ON")
+ env.set("USE_SYSTEM_PTHREADPOOL", "ON")
+ env.set("USE_SYSTEM_PYBIND11", "ON")
+ env.set("USE_SYSTEM_SLEEF", "ON")
+ env.set("USE_SYSTEM_UCC", "ON")
+ # https://github.com/pytorch/pytorch/issues/60332
+ # env.set("USE_SYSTEM_XNNPACK", "ON")
+
+ if self.spec.satisfies("+custom-protobuf"):
+ env.set("BUILD_CUSTOM_PROTOBUF", "ON")
+ else:
+ env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
+
+ def setup_run_environment(self, env):
+ self.torch_cuda_arch_list(env)
@run_before("install")
def build_amd(self):
@@ -631,7 +700,5 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
@property
def cmake_prefix_paths(self):
- cmake_prefix_paths = [
- join_path(self.prefix, self.spec["python"].package.platlib, "torch", "share", "cmake")
- ]
+ cmake_prefix_paths = [join_path(python_platlib, "torch", "share", "cmake")]
return cmake_prefix_paths
diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py
index 9d0d39798b..59a7e2825b 100644
--- a/var/spack/repos/builtin/packages/py-torchaudio/package.py
+++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py
@@ -15,8 +15,18 @@ class PyTorchaudio(PythonPackage):
submodules = True
license("BSD-2-Clause")
+ maintainers("adamjstewart")
version("main", branch="main")
+ version("2.5.1", tag="v2.5.1", commit="1661daf10599ca8889f092ec37814fabbe202bb0")
+ version("2.5.0", tag="v2.5.0", commit="56bc006d56a0d4960de6a1e0b6340cba4eda05cd")
+ version("2.4.1", tag="v2.4.1", commit="e8cbe17769796ce963fbc71b8990f1474774e6d2")
+ version("2.4.0", tag="v2.4.0", commit="69d40773dc4ed86643820c21a8a880e4d074a46e")
+ version("2.3.1", tag="v2.3.1", commit="3edcf69e78a3c9a3077a11159861422440ec7d4a")
+ version("2.3.0", tag="v2.3.0", commit="952ea7457bcc3ed0669e7741ff23015c426d6322")
+ version("2.2.2", tag="v2.2.2", commit="cefdb369247668e1dba74de503d4d996124b6b11")
+ version("2.2.1", tag="v2.2.1", commit="06ea59c97d56868e487490702d01b3cf59103b9c")
+ version("2.2.0", tag="v2.2.0", commit="08901ade5d17d3e3cf6fc039cbd601cbd2853686")
version("2.1.2", tag="v2.1.2", commit="c4c1957d24b423200fd83591d46066135979a5a8")
version("2.1.1", tag="v2.1.1", commit="db624844f5c95bb7618fe5a5f532bf9b68efeb45")
version("2.1.0", tag="v2.1.0", commit="6ea1133706801ec6e81bb29142da2e21a8583a0a")
@@ -42,60 +52,110 @@ class PyTorchaudio(PythonPackage):
version("0.5.0", tag="v0.5.0", commit="09494ea545738538f9db2dceeffe10d421060ee5")
version("0.4.0", tag="v0.4.0", commit="8afed303af3de41f3586007079c0534543c8f663")
- # https://pytorch.org/audio/main/installation.html#dependencies
- depends_on("python@3.8:3.11", when="@2:", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@0.12:0", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@0.7.2:0.11", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@:0.7.0", type=("build", "link", "run"))
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ with default_args(type=("build", "link", "run")):
+ # Based on PyPI wheel availability
+ depends_on("python@3.9:3.12", when="@2.5:")
+ depends_on("python@3.8:3.12", when="@2.2:2.4")
+ depends_on("python@3.8:3.11", when="@2.0:2.1")
+ depends_on("python@:3.10", when="@0.12:0")
+ depends_on("python@:3.9", when="@0.7.2:0.11")
+ depends_on("python@:3.8", when="@:0.7.0")
+
+ depends_on("py-torch@main", when="@main")
+ depends_on("py-torch@2.5.1", when="@2.5.1")
+ depends_on("py-torch@2.5.0", when="@2.5.0")
+ depends_on("py-torch@2.4.1", when="@2.4.1")
+ depends_on("py-torch@2.4.0", when="@2.4.0")
+ depends_on("py-torch@2.3.1", when="@2.3.1")
+ depends_on("py-torch@2.3.0", when="@2.3.0")
+ depends_on("py-torch@2.2.2", when="@2.2.2")
+ depends_on("py-torch@2.2.1", when="@2.2.1")
+ depends_on("py-torch@2.2.0", when="@2.2.0")
+ depends_on("py-torch@2.1.2", when="@2.1.2")
+ depends_on("py-torch@2.1.1", when="@2.1.1")
+ depends_on("py-torch@2.1.0", when="@2.1.0")
+ depends_on("py-torch@2.0.1", when="@2.0.2")
+ depends_on("py-torch@2.0.0", when="@2.0.1")
+ depends_on("py-torch@1.13.1", when="@0.13.1")
+ depends_on("py-torch@1.13.0", when="@0.13.0")
+ depends_on("py-torch@1.12.1", when="@0.12.1")
+ depends_on("py-torch@1.12.0", when="@0.12.0")
+ depends_on("py-torch@1.11.0", when="@0.11.0")
+ depends_on("py-torch@1.10.2", when="@0.10.2")
+ depends_on("py-torch@1.10.1", when="@0.10.1")
+ depends_on("py-torch@1.10.0", when="@0.10.0")
+ depends_on("py-torch@1.9.1", when="@0.9.1")
+ depends_on("py-torch@1.9.0", when="@0.9.0")
+ depends_on("py-torch@1.8.2", when="@0.8.2")
+ depends_on("py-torch@1.8.1", when="@0.8.1")
+ depends_on("py-torch@1.8.0", when="@0.8.0")
+ depends_on("py-torch@1.7.1", when="@0.7.2")
+ depends_on("py-torch@1.7.0", when="@0.7.0")
+ depends_on("py-torch@1.6.0", when="@0.6.0")
+ depends_on("py-torch@1.5.1", when="@0.5.1")
+ depends_on("py-torch@1.5.0", when="@0.5.0")
+ depends_on("py-torch@1.4.1", when="@0.4.0")
# CMakelists.txt
depends_on("cmake@3.18:", when="@0.10:", type="build")
depends_on("cmake@3.5:", when="@0.8:", type="build")
depends_on("ninja", when="@0.8:", type="build")
+ # prior to 2.1 ffmpeg was vendored
+ depends_on("ffmpeg@:6", when="@2.1:")
+
# setup.py
depends_on("py-setuptools", type="build")
depends_on("py-pybind11", when="@0.12:", type=("build", "link"))
depends_on("pkgconfig", type="build")
depends_on("sox")
- depends_on("py-torch@main", when="@main", type=("build", "link", "run"))
- depends_on("py-torch@2.1.2", when="@2.1.2", type=("build", "link", "run"))
- depends_on("py-torch@2.1.1", when="@2.1.1", type=("build", "link", "run"))
- depends_on("py-torch@2.1.0", when="@2.1.0", type=("build", "link", "run"))
- depends_on("py-torch@2.0.1", when="@2.0.2", type=("build", "link", "run"))
- depends_on("py-torch@2.0.0", when="@2.0.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.1", when="@0.13.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.0", when="@0.13.0", type=("build", "link", "run"))
- depends_on("py-torch@1.12.1", when="@0.12.1", type=("build", "link", "run"))
- depends_on("py-torch@1.12.0", when="@0.12.0", type=("build", "link", "run"))
- depends_on("py-torch@1.11.0", when="@0.11.0", type=("build", "link", "run"))
- depends_on("py-torch@1.10.2", when="@0.10.2", type=("build", "link", "run"))
- depends_on("py-torch@1.10.1", when="@0.10.1", type=("build", "link", "run"))
- depends_on("py-torch@1.10.0", when="@0.10.0", type=("build", "link", "run"))
- depends_on("py-torch@1.9.1", when="@0.9.1", type=("build", "link", "run"))
- depends_on("py-torch@1.9.0", when="@0.9.0", type=("build", "link", "run"))
- depends_on("py-torch@1.8.2", when="@0.8.2", type=("build", "link", "run"))
- depends_on("py-torch@1.8.1", when="@0.8.1", type=("build", "link", "run"))
- depends_on("py-torch@1.8.0", when="@0.8.0", type=("build", "link", "run"))
- depends_on("py-torch@1.7.1", when="@0.7.2", type=("build", "link", "run"))
- depends_on("py-torch@1.7.0", when="@0.7.0", type=("build", "link", "run"))
- depends_on("py-torch@1.6.0", when="@0.6.0", type=("build", "link", "run"))
- depends_on("py-torch@1.5.1", when="@0.5.1", type=("build", "link", "run"))
- depends_on("py-torch@1.5.0", when="@0.5.0", type=("build", "link", "run"))
- depends_on("py-torch@1.4.1", when="@0.4.0", type=("build", "link", "run"))
+ # https://github.com/pytorch/audio/pull/3811
+ patch(
+ "https://github.com/pytorch/audio/pull/3811.patch?full_index=1",
+ sha256="34dce3403abb03f62827e8a1efcdb2bf7742477a01f155ebb9c7fefe9588b132",
+ when="@2.2:",
+ )
+ conflicts("^cuda@12.5:", when="@:2.1")
+
+ def patch(self):
+ # Add missing rpaths, which requires patching due to hardcoded cmake_args
+ if self.spec.satisfies("@0.8:"):
+ rpaths = [f"{python_platlib}/torchaudio/lib", f"{python_platlib}/torio/lib"]
+ cmake_args = [
+ f"-DCMAKE_INSTALL_RPATH={';'.join(rpaths)}",
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON",
+ ]
+ cmake_str = ", ".join(f"'{arg}'" for arg in cmake_args)
+ filter_file(
+ "cmake_args = [",
+ f"cmake_args = [{cmake_str},",
+ "tools/setup_helpers/extension.py",
+ string=True,
+ )
+
+ def flag_handler(self, name, flags):
+ # https://github.com/pytorch/vision/issues/8653
+ if name == "ldflags":
+ if self.spec.satisfies("%apple-clang@15:"):
+ flags.append("-Wl,-ld_classic")
+ return (flags, None, None)
def setup_build_environment(self, env):
# tools/setup_helpers/extension.py
env.set("BUILD_SOX", 0)
+ if self.spec.satisfies("@2.1:"):
+ env.set("FFMPEG_ROOT", self.spec["ffmpeg"].prefix)
+ else:
+ # a specific ffmpeg is built but not installed, so just disable
+ env.set("USE_FFMPEG", "0")
+
if "+cuda" in self.spec["py-torch"]:
env.set("USE_CUDA", 1)
- torch_cuda_arch_list = ";".join(
- "{0:.1f}".format(float(i) / 10.0)
- for i in self.spec["py-torch"].variants["cuda_arch"].value
- )
- env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch_list)
else:
env.set("USE_CUDA", 0)
diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py
index 3feff9a3a5..63ee044740 100644
--- a/var/spack/repos/builtin/packages/py-torchdata/package.py
+++ b/var/spack/repos/builtin/packages/py-torchdata/package.py
@@ -18,7 +18,9 @@ class PyTorchdata(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
- version("0.7.1", sha256="1b6589336776ccba19fd3bf435588416105d372f6b85d58a9f2b008286f483bf")
+ version("0.9.0", sha256="b547bbe848ad813cc5365fe0bb02051150bec6c7c4ee7bffd6b6d3d7bdeddd75")
+ version("0.8.0", sha256="d5d27b264e79d7d00ad4998f14d097b770332d979672dceb6d038caf204f1208")
+ version("0.7.1", sha256="ef9bbdcee759b53c3c9d99e76eb0a66da33d36bfb7f859a25a9b5e737a51fa23")
version("0.7.0", sha256="0b444719c3abc67201ed0fea92ea9c4100e7f36551ba0d19a09446cc11154eb3")
version("0.6.1", sha256="c596db251c5e6550db3f00e4308ee7112585cca4d6a1c82a433478fd86693257")
version("0.6.0", sha256="048dea12ee96c0ea1525097959fee811d7b38c2ed05f44a90f35f8961895fb5b")
@@ -28,33 +30,40 @@ class PyTorchdata(PythonPackage):
version("0.4.0", sha256="b4ec446a701680faa620fcb828b98ba36a63fa79da62a1e568d4a683889172da")
version("0.3.0", sha256="ac36188bf133cf5f1041a28ccb3ee82ba52d4b5d99617be37d64d740acd6cfd4")
- # https://github.com/pytorch/data#version-compatibility
- depends_on("python@3.8:3.11", when="@0.6:", type=("build", "run"))
- depends_on("python@3.7:3.10", when="@:0.5", type=("build", "run"))
+ depends_on("cxx", type="build")
- # pyproject.toml
- depends_on("py-setuptools", type="build")
+ with default_args(type="build"):
+ # pyproject.toml
+ depends_on("py-setuptools")
- # CMakeLists.txt
- depends_on("cmake@3.13:", when="@0.4:", type="build")
- depends_on("ninja", when="@0.4:", type="build")
+ # CMakeLists.txt
+ depends_on("cmake@3.13:", when="@0.4:")
+ depends_on("ninja", when="@0.4:")
- # https://github.com/pytorch/data#version-compatibility
- depends_on("py-torch@main", when="@main", type=("build", "run"))
- depends_on("py-torch@2.1.1", when="@0.7.1", type=("build", "run"))
- depends_on("py-torch@2.1.0", when="@0.7.0", type=("build", "run"))
- depends_on("py-torch@2.0.1", when="@0.6.1", type=("build", "run"))
- depends_on("py-torch@2.0.0", when="@0.6.0", type=("build", "run"))
- depends_on("py-torch@1.13.1", when="@0.5.1", type=("build", "run"))
- depends_on("py-torch@1.13.0", when="@0.5.0", type=("build", "run"))
- depends_on("py-torch@1.12.1", when="@0.4.1", type=("build", "run"))
- depends_on("py-torch@1.12.0", when="@0.4.0", type=("build", "run"))
- depends_on("py-torch@1.11.0", when="@0.3.0", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ # https://github.com/pytorch/data#version-compatibility
+ depends_on("python@3.9:3.12", when="@0.9:")
+ depends_on("python@3.8:3.12", when="@0.8")
+ depends_on("python@3.8:3.11", when="@0.6:0.7")
+ depends_on("python@3.7:3.10", when="@:0.5")
- # requirements.txt
- depends_on("py-urllib3@1.25:", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-portalocker@2:", when="@0.4:0.5", type=("build", "run"))
+ depends_on("py-torch@main", when="@main")
+ depends_on("py-torch@2.5.0", when="@0.9.0")
+ depends_on("py-torch@2.4.0", when="@0.8.0")
+ depends_on("py-torch@2.1.1", when="@0.7.1")
+ depends_on("py-torch@2.1.0", when="@0.7.0")
+ depends_on("py-torch@2.0.1", when="@0.6.1")
+ depends_on("py-torch@2.0.0", when="@0.6.0")
+ depends_on("py-torch@1.13.1", when="@0.5.1")
+ depends_on("py-torch@1.13.0", when="@0.5.0")
+ depends_on("py-torch@1.12.1", when="@0.4.1")
+ depends_on("py-torch@1.12.0", when="@0.4.0")
+ depends_on("py-torch@1.11.0", when="@0.3.0")
+
+ # requirements.txt
+ depends_on("py-urllib3@1.25:")
+ depends_on("py-requests")
+ depends_on("py-portalocker@2:", when="@0.4:0.5")
# third_party/CMakeLists.txt
depends_on("py-pybind11", when="@0.4:")
diff --git a/var/spack/repos/builtin/packages/py-torchgeo/package.py b/var/spack/repos/builtin/packages/py-torchgeo/package.py
index 39a910afa3..294c237b33 100644
--- a/var/spack/repos/builtin/packages/py-torchgeo/package.py
+++ b/var/spack/repos/builtin/packages/py-torchgeo/package.py
@@ -13,11 +13,13 @@ class PyTorchgeo(PythonPackage):
pypi = "torchgeo/torchgeo-0.1.0.tar.gz"
git = "https://github.com/microsoft/torchgeo.git"
- maintainers("adamjstewart", "calebrob6")
-
license("MIT")
+ maintainers("adamjstewart", "calebrob6")
version("main", branch="main")
+ version("0.6.1", sha256="38c930917ea341d05a7a611ff74c017f29482df7455d50e287ea79dec7d0a14b")
+ version("0.6.0", sha256="c5b073b3c9ac06cd68e45620bab3a78fb7637fa3563aae4f75f4781ba57aee5a")
+ version("0.5.2", sha256="b23df51fe53ebe66c8d555484605a5618985f3680b70275f99ce8665e7203560")
version("0.5.1", sha256="5f86a34d18fe36eeb9146b057b21e5356252ef8ab6a9db33feebb120a01feff8")
version("0.5.0", sha256="2bc2f9c4a19a569790cb3396499fdec17496632b0e52b86be390a2cc7a1a7033")
version("0.4.1", sha256="a3692436bf63df8d2f9b76d16eea5ee309dd1bd74e0fde6e64456abfdb2a5b58")
@@ -35,134 +37,173 @@ class PyTorchgeo(PythonPackage):
variant("tests", default=False, description="Install testing tools")
# NOTE: historically, dependencies had upper bounds based on semantic version compatibility.
- # However, these were removed to improve maintainability and flexibility of the recipe.
+ # However, these were removed to improve the maintainability and flexibility of the recipe.
# Required dependencies
- depends_on("python@3.9:", when="@0.5:", type=("build", "run"))
- # COWC dataset requires unpacking .bz2 files.
- depends_on("python+bz2", type=("build", "run"))
- depends_on("py-setuptools@61:", when="@0.5:", type="build")
- depends_on("py-setuptools@42:", type="build")
- depends_on("py-einops@0.3:", type=("build", "run"))
- depends_on("py-fiona@1.8.19:", when="@0.5:", type=("build", "run"))
- depends_on("py-fiona@1.8:", when="@0.3:", type=("build", "run"))
- depends_on("py-fiona@1.5:", type=("build", "run"))
- # Only part of lightning[pytorch-extra] we actually require.
- depends_on("py-jsonargparse@4.18:+signatures", when="@0.5:", type=("build", "run"))
- depends_on("py-kornia@0.6.9:", when="@0.5:", type=("build", "run"))
- depends_on("py-kornia@0.6.5:", when="@0.4.1:", type=("build", "run"))
- # https://github.com/microsoft/torchgeo/pull/1123
- depends_on("py-kornia@0.6.5:0.6.9", when="@0.4.0", type=("build", "run"))
- depends_on("py-kornia@0.6.4:0.6.9", when="@0.3", type=("build", "run"))
- depends_on("py-kornia@0.5.11:0.6.9", when="@0.2", type=("build", "run"))
- depends_on("py-kornia@0.5.4:0.6.9", when="@0.1", type=("build", "run"))
- depends_on("py-lightly@1.4.4:", when="@0.5:", type=("build", "run"))
- depends_on("py-lightning@2:", when="@0.5:", type=("build", "run"))
- depends_on("py-lightning@1.8:", when="@0.4.1:", type=("build", "run"))
- depends_on("py-matplotlib@3.3.3:", when="@0.5:", type=("build", "run"))
- depends_on("py-matplotlib@3.3:", type=("build", "run"))
- depends_on("py-numpy@1.19.3:", when="@0.5:", type=("build", "run"))
- depends_on("py-numpy@1.17.2:", type=("build", "run"))
- depends_on("py-pandas@1.1.3:", when="@0.5:", type=("build", "run"))
- depends_on("pil@8:", when="@0.5:", type=("build", "run"))
- depends_on("pil@6.2:", type=("build", "run"))
- # JPEG, TIFF, and compressed PNG support required for file I/O in several datasets.
- depends_on(
- "py-pillow +jpeg+tiff+zlib", type=("build", "run"), when="^[virtuals=pil] py-pillow"
- )
- depends_on(
- "py-pillow-simd +jpeg+tiff+zlib",
- type=("build", "run"),
- when="^[virtuals=pil] py-pillow-simd",
- )
-
- depends_on("py-pyproj@3:", when="@0.5:", type=("build", "run"))
- depends_on("py-pyproj@2.2:", type=("build", "run"))
- depends_on("py-rasterio@1.2:", when="@0.5:", type=("build", "run"))
- depends_on("py-rasterio@1.0.20:", when="@0.3:", type=("build", "run"))
- depends_on("py-rasterio@1.0.16:", type=("build", "run"))
- depends_on("py-rtree@1:", when="@0.3:", type=("build", "run"))
- depends_on("py-rtree@0.9.4:", when="@0.2.1:", type=("build", "run"))
- depends_on("py-rtree@0.5:", type=("build", "run"))
- depends_on("py-segmentation-models-pytorch@0.2:", type=("build", "run"))
- depends_on("py-shapely@1.7.1:", when="@0.5:", type=("build", "run"))
- depends_on("py-shapely@1.3:", type=("build", "run"))
- depends_on("py-timm@0.4.12:", type=("build", "run"))
- depends_on("py-torch@1.12:", when="@0.4:", type=("build", "run"))
- depends_on("py-torch@1.9:", when="@0.2:", type=("build", "run"))
- depends_on("py-torch@1.7:", type=("build", "run"))
- depends_on("py-torchmetrics@0.10:", when="@0.4:", type=("build", "run"))
- depends_on("py-torchmetrics@0.7:", type=("build", "run"))
- depends_on("py-torchvision@0.13:", when="@0.4:", type=("build", "run"))
- depends_on("py-torchvision@0.10:", when="@0.2:", type=("build", "run"))
- depends_on("py-torchvision@0.3:", type=("build", "run"))
+ with default_args(type="build"):
+ depends_on("py-setuptools@61:", when="@0.5:")
+ depends_on("py-setuptools@42:")
+
+ with default_args(type=("build", "run")):
+ depends_on("python@3.10:", when="@0.6:")
+ depends_on("python@3.9:", when="@0.5:")
+ depends_on("py-einops@0.3:")
+ depends_on("py-fiona@1.8.21:", when="@0.6:")
+ depends_on("py-fiona@1.8.19:", when="@0.5:")
+ depends_on("py-fiona@1.8:", when="@0.3:")
+ depends_on("py-fiona@1.5:")
+ depends_on("py-kornia@0.7.3:", when="@0.6:")
+ depends_on("py-kornia@0.6.9:", when="@0.5:")
+ depends_on("py-kornia@0.6.5:", when="@0.4:")
+ depends_on("py-kornia@0.6.4:", when="@0.3:")
+ depends_on("py-kornia@0.5.11:", when="@0.2:")
+ depends_on("py-kornia@0.5.4:", when="@0.1:")
+ depends_on("py-lightly@1.4.5:", when="@0.6:")
+ depends_on("py-lightly@1.4.4:", when="@0.5:")
+ depends_on("py-lightning@2:", when="@0.5:")
+ depends_on("py-lightning@1.8:", when="@0.4.1:")
+ depends_on("py-matplotlib@3.5:", when="@0.6:")
+ depends_on("py-matplotlib@3.3.3:", when="@0.5:")
+ depends_on("py-matplotlib@3.3:")
+ depends_on("py-numpy@1.21.2:", when="@0.6:")
+ depends_on("py-numpy@1.19.3:", when="@0.5:")
+ depends_on("py-numpy@1.17.2:")
+ depends_on("py-pandas@1.3.3:", when="@0.6:")
+ depends_on("py-pandas@1.1.3:", when="@0.5:")
+ depends_on("pil@8.4:", when="@0.6:")
+ depends_on("pil@8:", when="@0.5:")
+ depends_on("pil@6.2:")
+ depends_on("py-pyproj@3.3:", when="@0.6:")
+ depends_on("py-pyproj@3:", when="@0.5:")
+ depends_on("py-pyproj@2.2:")
+ depends_on("py-rasterio@1.3:", when="@0.6:")
+ depends_on("py-rasterio@1.2:", when="@0.5:")
+ depends_on("py-rasterio@1.0.20:", when="@0.3:")
+ depends_on("py-rasterio@1.0.16:")
+ depends_on("py-rtree@1:", when="@0.3:")
+ depends_on("py-rtree@0.9.4:", when="@0.2.1:")
+ depends_on("py-rtree@0.5:")
+ depends_on("py-segmentation-models-pytorch@0.2:")
+ depends_on("py-shapely@1.8:", when="@0.6:")
+ depends_on("py-shapely@1.7.1:", when="@0.5:")
+ depends_on("py-shapely@1.3:")
+ depends_on("py-timm@0.4.12:")
+ depends_on("py-torch@1.13:", when="@0.6:")
+ depends_on("py-torch@1.12:", when="@0.4:")
+ depends_on("py-torch@1.9:", when="@0.2:")
+ depends_on("py-torch@1.7:")
+ depends_on("py-torchmetrics@0.10:", when="@0.4:")
+ depends_on("py-torchmetrics@0.7:")
+ depends_on("py-torchvision@0.14:", when="@0.6:")
+ depends_on("py-torchvision@0.13:", when="@0.4:")
+ depends_on("py-torchvision@0.10:", when="@0.2:")
+ depends_on("py-torchvision@0.3:")
+
+ # Only part of lightning[pytorch-extra] we actually require.
+ depends_on("py-jsonargparse@4.26.1:+signatures", when="@0.5:")
+
+ # Historical dependencies
+ depends_on("py-omegaconf@2.1:", when="@:0.4.0")
+ depends_on("py-packaging@17:", when="@0.3")
+ depends_on("py-pytorch-lightning@1.5.1:", when="@0.3.1:0.4.0")
+ # https://github.com/microsoft/torchgeo/pull/697
+ depends_on("py-pytorch-lightning@1.5.1:1.8", when="@0.3.0")
+ depends_on("py-pytorch-lightning@1.3:1.8", when="@:0.2")
+ depends_on("py-scikit-learn@0.21:", when="@0.3:0.4")
+ depends_on("py-scikit-learn@0.18:", when="@:0.2")
# Optional dependencies
- with when("+datasets"):
+ with when("+datasets"), default_args(type="run"):
+ depends_on("py-h5py@3.6:", when="@0.6:")
+ depends_on("py-h5py@3:", when="@0.5:")
+ depends_on("py-h5py@2.6:")
+ depends_on("py-laspy@2:", when="@0.2:")
+ depends_on("opencv@4.5.4:", when="@0.6:")
+ depends_on("opencv@4.4.0.46:", when="@0.5:")
+ depends_on("opencv@3.4.2.17:")
+ depends_on("py-pycocotools@2.0.7:", when="@0.6:")
+ depends_on("py-pycocotools@2.0.5:", when="@0.5:")
+ depends_on("py-pycocotools@2:")
+ depends_on("py-pyvista@0.34.2:", when="@0.5:")
+ depends_on("py-pyvista@0.20:", when="@0.4:")
+ depends_on("py-scikit-image@0.19:", when="@0.6:")
+ depends_on("py-scikit-image@0.18:", when="@0.4:")
+ depends_on("py-scipy@1.7.2:", when="@0.6:")
+ depends_on("py-scipy@1.6.2:", when="@0.4:")
+ depends_on("py-scipy@1.2:", when="@0.3:")
+ depends_on("py-scipy@0.9:")
+
+ # Required to download SpaceNet datasets.
+ depends_on("awscli-v2", when="@0.6:")
+ # Required to download Source Cooperative datasets.
+ depends_on("azcopy", when="@0.6:")
+ # Required to download Google Drive datasets.
+ depends_on("py-gdown", when="^py-torchvision@0.17.1:")
+ # bz2 required to extract .tar.bz2 files, zlib required to extract .tar.gz files.
+ depends_on("python+bz2+zlib")
+ # JPEG, JPEG2000, TIFF, compressed PNG support required for file I/O in several datasets.
+ depends_on("py-pillow+jpeg+jpeg2000+tiff+zlib", when="^[virtuals=pil] py-pillow")
+ depends_on("py-pillow-simd+jpeg+jpeg2000+tiff+zlib", when="^[virtuals=pil] py-pillow-simd")
# GDAL and libtiff are both dependencies of rasterio.
# Sentinel 2 dataset requires OpenJPEG to read .jp2 files.
- depends_on("gdal+openjpeg", when="@0.3.1:", type="run")
+ depends_on("gdal+openjpeg", when="@0.3.1:")
# JPEG required for GDAL to read JPEG files
# LIBDEFLATE, ZLIB, and ZSTD required for compressed file I/O.
- depends_on("libtiff+jpeg+libdeflate+zlib+zstd", type="run")
- depends_on("py-h5py@3:", when="@0.5:", type="run")
- depends_on("py-h5py@2.6:", type="run")
- depends_on("py-laspy@2:", when="@0.2:", type="run")
- depends_on("opencv@4.4.0.46:", when="@0.5:", type="run")
- depends_on("opencv@3.4.2.17:", type="run")
+ depends_on("libtiff+jpeg+libdeflate+zlib+zstd")
# LandCover.ai dataset requires ability to read .tif and write .jpg and .png files.
# Doing this from Python requires both imgcodecs and Python bindings.
- depends_on("opencv+imgcodecs+jpeg+png+python3+tiff", type="run")
- depends_on("py-pycocotools@2.0.5:", when="@0.5:", type="run")
- depends_on("py-pycocotools@2:", type="run")
- depends_on("py-pyvista@0.34.2:", when="@0.5:", type="run")
- depends_on("py-pyvista@0.20:", when="@0.4:", type="run")
- depends_on("py-radiant-mlhub@0.3:", when="@0.4.1:", type="run")
- depends_on("py-radiant-mlhub@0.2.1:0.4", when="@:0.4.0", type="run")
- depends_on("py-rarfile@4:", when="@0.5:", type="run")
- depends_on("py-rarfile@3:", type="run")
- depends_on("py-scikit-image@0.18:", when="@0.4:", type="run")
- depends_on("py-scipy@1.6.2:", when="@0.4:", type="run")
- depends_on("py-scipy@1.2:", when="@0.3:", type="run")
- depends_on("py-scipy@0.9:", type="run")
- depends_on("py-zipfile-deflate64@0.2:", when="@0.2.1:", type="run")
-
- with when("+docs"):
- depends_on("py-ipywidgets@7:", type="run")
- depends_on("py-nbsphinx@0.8.5:", type="run")
- depends_on("py-pytorch-sphinx-theme", type="run")
- depends_on("py-sphinx@4:5", type="run")
-
- with when("+style"):
- depends_on("py-black@21.8:+jupyter", when="@0.3:", type="run")
- depends_on("py-black@21:", type="run")
- depends_on("py-flake8@3.8:", type="run")
- depends_on("py-isort@5.8:+colors", type="run")
- depends_on("py-pydocstyle@6.1:+toml", type="run")
- depends_on("py-pyupgrade@2.8:", when="@0.5:", type="run")
- depends_on("py-pyupgrade@1.24:", when="@0.3:", type="run")
-
- with when("+tests"):
- depends_on("py-mypy@0.900:", type="run")
- depends_on("py-nbmake@1.3.3:", when="@0.4.1:", type="run")
- depends_on("py-nbmake@0.1:", when="@0.3.1:", type="run")
- depends_on("py-nbmake@0.1:1.1", when="@:0.3.0", type="run")
- depends_on("py-pytest@6.2:", when="@0.5:", type="run")
- depends_on("py-pytest@6.1.2:", type="run")
- depends_on("py-pytest-cov@2.4:", type="run")
-
- # Historical dependencies
- depends_on("py-omegaconf@2.1:", when="@:0.4.0", type=("build", "run"))
- depends_on("py-packaging@17:", when="@0.3", type=("build", "run"))
- depends_on("py-pytorch-lightning@1.5.1:", when="@0.3.1:0.4.0", type=("build", "run"))
- # https://github.com/microsoft/torchgeo/pull/697
- depends_on("py-pytorch-lightning@1.5.1:1.8", when="@0.3.0", type=("build", "run"))
- depends_on("py-pytorch-lightning@1.3:1.8", when="@:0.2", type=("build", "run"))
- depends_on("py-scikit-learn@0.21:", when="@0.3:0.4", type=("build", "run"))
- depends_on("py-scikit-learn@0.18:", when="@:0.2", type=("build", "run"))
- depends_on("open3d@0.11.2:+python", when="@0.2:0.3+datasets", type="run")
- # https://github.com/microsoft/torchgeo/pull/1537
- depends_on("py-pandas@0.23.2:2.0", when="@0.3:0.4+datasets", type="run")
- depends_on("py-pandas@0.19.1:2.0", when="@0.2+datasets", type="run")
- depends_on("py-omegaconf@2.1:", when="@0.4.1+tests", type="run")
- depends_on("py-tensorboard@2.9.1:", when="@0.4.1+tests", type="run")
+ depends_on("opencv+imgcodecs+jpeg+png+python3+tiff")
+
+ # Historical dependencies
+ depends_on("open3d@0.11.2:+python", when="@0.2:0.3")
+ # https://github.com/microsoft/torchgeo/pull/1537
+ depends_on("py-pandas@0.23.2:2.0", when="@0.3:0.4")
+ depends_on("py-pandas@0.19.1:2.0", when="@0.2")
+ depends_on("py-radiant-mlhub@0.3:", when="@0.4.1:0.5")
+ depends_on("py-radiant-mlhub@0.2.1:0.4", when="@:0.4.0")
+ depends_on("py-rarfile@4:", when="@0.5")
+ depends_on("py-rarfile@3:", when="@:0.4")
+ depends_on("py-zipfile-deflate64@0.2:", when="@0.2.1:0.5")
+
+ with when("+docs"), default_args(type="run"):
+ depends_on("py-ipywidgets@7:")
+ depends_on("py-nbsphinx@0.8.5:")
+ depends_on("py-pytorch-sphinx-theme")
+ depends_on("py-sphinx@4:5")
+
+ with when("+style"), default_args(type="run"):
+ depends_on("prettier@3:", when="@0.6:")
+ depends_on("py-mypy@0.900:")
+ depends_on("py-ruff@0.2:", when="@0.6:")
+
+ # Historical dependencies
+ depends_on("py-black@21.8:+jupyter", when="@0.3:0.5")
+ depends_on("py-black@21:", when="@:0.2")
+ depends_on("py-flake8@3.8:", when="@:0.5")
+ depends_on("py-isort@5.8:+colors", when="@:0.5")
+ depends_on("py-pydocstyle@6.1:+toml", when="@:0.5")
+ depends_on("py-pyupgrade@2.8:", when="@0.5")
+ depends_on("py-pyupgrade@1.24:", when="@0.3:0.4")
+
+ with when("+tests"), default_args(type="run"):
+ depends_on("py-nbmake@1.3.3:", when="@0.4.1:")
+ depends_on("py-nbmake@0.1:", when="@0.3.1:")
+ depends_on("py-nbmake@0.1:1.1", when="@:0.3.0")
+ depends_on("py-pytest@7.3:", when="@0.6:")
+ depends_on("py-pytest@6.2:", when="@0.5:")
+ depends_on("py-pytest@6.1.2:")
+ depends_on("py-pytest-cov@4:", when="@0.6:")
+ depends_on("py-pytest-cov@2.4:")
+
+ # Historical dependencies
+ depends_on("py-omegaconf@2.1:", when="@0.4.1")
+ depends_on("py-tensorboard@2.9.1:", when="@0.4.1")
+
+ # https://github.com/microsoft/torchgeo/pull/1123
+ conflicts("py-kornia@0.6.10:", when="@:0.4.0")
+ # https://github.com/Lightning-AI/pytorch-lightning/issues/19977
+ conflicts("py-lightning@2.3", when="@0.4.1:")
+ # https://github.com/microsoft/torchgeo/pull/2151
+ conflicts("py-numpy@2:", when="@:0.5")
+ # https://github.com/rasterio/rasterio/issues/3196
+ conflicts("py-rasterio@1.4:")
diff --git a/var/spack/repos/builtin/packages/py-torchmetrics/package.py b/var/spack/repos/builtin/packages/py-torchmetrics/package.py
index a60b075975..5dbcabad2e 100644
--- a/var/spack/repos/builtin/packages/py-torchmetrics/package.py
+++ b/var/spack/repos/builtin/packages/py-torchmetrics/package.py
@@ -12,10 +12,23 @@ class PyTorchmetrics(PythonPackage):
homepage = "https://github.com/PyTorchLightning/metrics"
pypi = "torchmetrics/torchmetrics-0.3.1.tar.gz"
- maintainers("adamjstewart")
-
license("Apache-2.0")
+ maintainers("adamjstewart")
+ version("1.6.0", sha256="aebba248708fb90def20cccba6f55bddd134a58de43fb22b0c5ca0f3a89fa984")
+ version("1.5.2", sha256="2d0e4957af0ea76438d2779fe1a626d8cba6cda8607eadb54267598153e7ea63")
+ version("1.5.1", sha256="9701632cf811bc460abf07bd7b971b79c1ae9c8231e03d495b53a0975e43fe07")
+ version("1.5.0", sha256="c18e68bab4104ad7d2285af601ddc6dc04f9f3b7cafaa8ad13fa1dcc539e33b6")
+ version("1.4.3", sha256="5554a19167e91f543afe82ff58a01059c8eec854359ad22896449c2c8fb0ad89")
+ version("1.4.2", sha256="7a40cbec85e5645090812b87601696b4adf158294ec8c407ae58a71710938b87")
+ version("1.4.0", sha256="0b1e5acdcc9beb05bfe369d3d56cfa5b143f060ebfd6079d19ccc59ba46465b3")
+ version("1.3.2", sha256="0a67694a4c4265eeb54cda741eaf5cb1f3a71da74b7e7e6215ad156c9f2379f6")
+ version("1.3.1", sha256="8d371f7597a1a5eb02d5f2ed59642d6fef09093926997ce91e18b1147cc8defa")
+ version(
+ "1.3.0",
+ sha256="e8ac3adcc61e7a847d0504b0a0e0a3b7f57796178b239c6fafb5d20c0c9460ac",
+ deprecated=True,
+ ) # Yanked
version("1.2.1", sha256="217387738f84939c39b534b20d4983e737cc448d27aaa5340e0327948d97ca3e")
version("1.2.0", sha256="7eb28340bde45e13187a9ad54a4a7010a50417815d8181a5df6131f116ffe1b7")
version("1.1.1", sha256="65ea34205c0506eecfd06b98f63f4d2a2c5c0e17367cf324e1747adc854c80a5")
@@ -40,21 +53,35 @@ class PyTorchmetrics(PythonPackage):
version("0.3.1", sha256="78f4057db53f7c219fdf9ec9eed151adad18dd43488a44e5c780806d218e3f1d")
version("0.2.0", sha256="481a28759acd2d77cc088acba6bc7dc4a356c7cb767da2e1495e91e612e2d548")
+ variant("image", default=False, description="image support", when="@0.11.2:")
+
# setup.py
- depends_on("python@3.8:", when="@1:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- # requirements.txt (upper bound is removed during processing)
- depends_on("py-numpy@1.20.1:", when="@1:", type=("build", "run"))
- depends_on("py-numpy@1.17.2:", when="@0.4:", type=("build", "run"))
- depends_on("py-numpy", when="@0.3:", type=("build", "run"))
- depends_on("py-packaging@17.2:", when="@1.2.1:", type=("build", "run"))
- depends_on("py-packaging", when="@0.3:1.1.0", type=("build", "run"))
- depends_on("py-torch@1.8.1:", when="@0.11:", type=("build", "run"))
- depends_on("py-torch@1.3.1:", type=("build", "run"))
- depends_on("py-typing-extensions", when="@0.9: ^python@:3.8", type=("build", "run"))
- depends_on("py-lightning-utilities@0.8:", when="@1.1:", type=("build", "run"))
- depends_on("py-lightning-utilities@0.7:", when="@1:", type=("build", "run"))
-
- # Historical dependencies
- depends_on("py-pydeprecate@0.3", when="@0.7:0.8", type=("build", "run"))
+ # requirements/base.txt (upper bound is removed during processing)
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy@1.20.1:", when="@1:")
+ depends_on("py-numpy@1.17.2:", when="@0.4:")
+ depends_on("py-numpy", when="@0.3:")
+ depends_on("py-packaging@17.2:", when="@1.2.1:")
+ depends_on("py-packaging", when="@0.3:1.1.0")
+ depends_on("py-torch@2:", when="@1.6:")
+ depends_on("py-torch@1.10:", when="@1.3:")
+ depends_on("py-torch@1.8.1:", when="@0.11:")
+ depends_on("py-torch@1.3.1:")
+ depends_on("py-typing-extensions", when="@0.9: ^python@:3.8")
+ depends_on("py-lightning-utilities@0.8:", when="@1.1:")
+ depends_on("py-lightning-utilities@0.7:", when="@1:")
+
+ with when("+image"):
+ depends_on("py-scipy@1.0.1:")
+ depends_on("py-torchvision@0.15.1:", when="@1.6:")
+ depends_on("py-torchvision@0.8:")
+ depends_on("py-torch-fidelity")
+
+ # Historical dependencies
+ depends_on("py-pretty-errors@1.2.25", when="@1.4.0")
+ depends_on("py-pydeprecate@0.3", when="@0.7:0.8")
+
+ with when("+image"):
+ depends_on("py-lpips", when="@:1.2.0")
diff --git a/var/spack/repos/builtin/packages/py-torchseg/package.py b/var/spack/repos/builtin/packages/py-torchseg/package.py
new file mode 100644
index 0000000000..e8f7a2cebc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-torchseg/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTorchseg(PythonPackage):
+ """TorchSeg: Semantic Segmentation models for PyTorch."""
+
+ homepage = "https://github.com/isaaccorley/torchseg"
+ pypi = "torchseg/torchseg-0.0.1a4.tar.gz"
+
+ maintainers("isaaccorley", "adamjstewart")
+
+ license("MIT")
+
+ version("0.0.1a4", sha256="4742551753599af92f9f85e5ca6b149b474ffd458bad1aad6b3aad246a3bf4ea")
+
+ depends_on("py-setuptools@61:")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-einops@0.7:")
+ depends_on("py-timm@0.9.12:")
+ depends_on("py-torch@1.13:")
diff --git a/var/spack/repos/builtin/packages/py-torchtext/package.py b/var/spack/repos/builtin/packages/py-torchtext/package.py
index 4758d1a2f8..de5c66f20e 100644
--- a/var/spack/repos/builtin/packages/py-torchtext/package.py
+++ b/var/spack/repos/builtin/packages/py-torchtext/package.py
@@ -19,6 +19,10 @@ class PyTorchtext(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("0.18.0", tag="v0.18.0", commit="9bed85d7a7ae13cf8c28598a88d8e461fe1afcb4")
+ version("0.17.2", tag="v0.17.2", commit="5c34b86897a93ad6564543130661c260a760b356")
+ version("0.17.1", tag="v0.17.1", commit="15e55dd73b5de8c179c7bd5cc9e2cc813830fb34")
+ version("0.17.0", tag="v0.17.0", commit="400da5c61bab4abaaeaeca91744ca031ad9b2edf")
version("0.16.2", tag="v0.16.2", commit="299b90e908c1b492139a4cf9da3912660e79a06b")
version("0.16.1", tag="v0.16.1", commit="66671007c84e07386da3c04e5ca403b8a417c8e5")
version("0.16.0", tag="v0.16.0", commit="4e255c95c76b1ccde4f6650391c0bc30650d6dbe")
@@ -38,11 +42,41 @@ class PyTorchtext(PythonPackage):
version("0.6.0", tag="0.6.0", commit="3a54c7f52584f201c17ca7489b52b812152612dc")
version("0.5.0", tag="0.5.0", commit="0169cde2f1d446ae886ef0be07e9a673585ed256")
- # https://github.com/pytorch/text#installation
- depends_on("python@3.8:3.11", when="@0.15:", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@0.13:0.14", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@0.8.1:0.12", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@:0.8.0", type=("build", "link", "run"))
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ with default_args(type=("build", "link", "run")):
+ # Based on PyPI wheel availability
+ depends_on("python@3.8:3.12", when="@0.17.2:")
+ depends_on("python@3.8:3.11", when="@0.15:0.17.1")
+ depends_on("python@:3.10", when="@0.13:0.14")
+ depends_on("python@:3.9", when="@0.8.1:0.12")
+ depends_on("python@:3.8", when="@:0.8.0")
+
+ # https://github.com/pytorch/text#installation
+ depends_on("py-torch@main", when="@main")
+ depends_on("py-torch@2.3.0", when="@0.18.0")
+ depends_on("py-torch@2.2.2", when="@0.17.2")
+ depends_on("py-torch@2.2.1", when="@0.17.1")
+ depends_on("py-torch@2.2.0", when="@0.17.0")
+ depends_on("py-torch@2.1.2", when="@0.16.2")
+ depends_on("py-torch@2.1.1", when="@0.16.1")
+ depends_on("py-torch@2.1.0", when="@0.16.0")
+ depends_on("py-torch@2.0.1", when="@0.15.2")
+ depends_on("py-torch@2.0.0", when="@0.15.1")
+ depends_on("py-torch@1.13.1", when="@0.14.1")
+ depends_on("py-torch@1.13.0", when="@0.14.0")
+ depends_on("py-torch@1.12.1", when="@0.13.1")
+ depends_on("py-torch@1.12.0", when="@0.13.0")
+ depends_on("py-torch@1.11.0", when="@0.12.0")
+ depends_on("py-torch@1.10.2", when="@0.11.2")
+ depends_on("py-torch@1.10.1", when="@0.11.1")
+ depends_on("py-torch@1.9.1", when="@0.10.1")
+ depends_on("py-torch@1.9.0", when="@0.10.0")
+ depends_on("py-torch@1.8.2", when="@0.9.2")
+ depends_on("py-torch@1.7.1", when="@0.8.1")
+ depends_on("py-torch@1.5.0", when="@0.6.0")
+ depends_on("py-torch@1.4.1", when="@0.5.0")
# CMakelists.txt
depends_on("cmake@3.18:", when="@0.13:", type="build")
@@ -60,23 +94,17 @@ class PyTorchtext(PythonPackage):
depends_on("py-six", when="@:0.6", type=("build", "run"))
depends_on("py-sentencepiece", when="@:0.7", type=("build", "run"))
- # https://github.com/pytorch/text#installation
- depends_on("py-torch@main", when="@main", type=("build", "link", "run"))
- depends_on("py-torch@2.1.2", when="@0.16.2", type=("build", "link", "run"))
- depends_on("py-torch@2.1.1", when="@0.16.1", type=("build", "link", "run"))
- depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run"))
- depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run"))
- depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.1", when="@0.14.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.0", when="@0.14.0", type=("build", "link", "run"))
- depends_on("py-torch@1.12.1", when="@0.13.1", type=("build", "link", "run"))
- depends_on("py-torch@1.12.0", when="@0.13.0", type=("build", "link", "run"))
- depends_on("py-torch@1.11.0", when="@0.12.0", type=("build", "link", "run"))
- depends_on("py-torch@1.10.2", when="@0.11.2", type=("build", "link", "run"))
- depends_on("py-torch@1.10.1", when="@0.11.1", type=("build", "link", "run"))
- depends_on("py-torch@1.9.1", when="@0.10.1", type=("build", "link", "run"))
- depends_on("py-torch@1.9.0", when="@0.10.0", type=("build", "link", "run"))
- depends_on("py-torch@1.8.2", when="@0.9.2", type=("build", "link", "run"))
- depends_on("py-torch@1.7.1", when="@0.8.1", type=("build", "link", "run"))
- depends_on("py-torch@1.5.0", when="@0.6.0", type=("build", "link", "run"))
- depends_on("py-torch@1.4.1", when="@0.5.0", type=("build", "link", "run"))
+ def patch(self):
+ # Add missing rpaths, which requires patching due to hardcoded cmake_args
+ if self.spec.satisfies("@0.13:"):
+ cmake_args = [
+ f"-DCMAKE_INSTALL_RPATH={python_platlib}/torchtext/lib",
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON",
+ ]
+ cmake_str = ", ".join(f"'{arg}'" for arg in cmake_args)
+ filter_file(
+ "cmake_args = [",
+ f"cmake_args = [{cmake_str},",
+ "tools/setup_helpers/extension.py",
+ string=True,
+ )
diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py
index dfb063cd35..c1df14d269 100644
--- a/var/spack/repos/builtin/packages/py-torchvision/package.py
+++ b/var/spack/repos/builtin/packages/py-torchvision/package.py
@@ -19,6 +19,15 @@ class PyTorchvision(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("0.20.1", sha256="7e08c7f56e2c89859310e53d898f72bccc4987cd83e08cfd6303513da15a9e71")
+ version("0.20.0", sha256="b59d9896c5c957c6db0018754bbd17d079c5102b82b9be0b438553b40a7b6029")
+ version("0.19.1", sha256="083e75c467285595ec3eb3c7aa8493c19e53d7eb42f13046fb56a07c8897e5a8")
+ version("0.19.0", sha256="4c499d0a412b5a21d55ac3c0a37e80ecd7e1f002f2a7b6b3b38a2de2544acbb6")
+ version("0.18.1", sha256="347d472a9ceecc44e0bee1eda140d63cfaffc74a54ec07d4b98da7698ce75516")
+ version("0.18.0", sha256="3e61cbac33986a862a59cd733fd65da8b2c2a6160a66556cfa0e850f62fd43c7")
+ version("0.17.2", sha256="0f9304acd77aafb7cfaf3fd5e318b2986ecc73547394b971d710eacd59f3e78e")
+ version("0.17.1", sha256="a01c7bce4098c41b62cd3a08d87569113e25d12994b1370f0fd5f531952b6cef")
+ version("0.17.0", sha256="55e395d5c7d9bf7658c82ac633cac2224aa168e1bfe8bb5b2b2a296c792a3500")
version("0.16.2", sha256="8c1f2951e98d8ada6e5a468f179af4be9f56d2ebc3ab057af873da61669806d7")
version("0.16.1", sha256="d31fe52e4540750c8d372b0f38f1bfa81d8261193f2c2c06577332831d203c50")
version("0.16.0", sha256="79b30b082237e3ead21e74587cedf4a4d832f977cf7dfeccfb65f67988b12ceb")
@@ -46,67 +55,98 @@ class PyTorchvision(PythonPackage):
version("0.6.0", sha256="02de11b3abe6882de4032ce86dab9c7794cbc84369b44d04e667486580f0f1f7")
version("0.5.0", sha256="eb9afc93df3d174d975ee0914057a9522f5272310b4d56c150b955c287a4d74d")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
desc = "Enable support for native encoding/decoding of {} formats in torchvision.io"
variant("png", default=True, description=desc.format("PNG"))
variant("jpeg", default=True, description=desc.format("JPEG"))
- variant("nvjpeg", default=False, description=desc.format("JPEG"))
- variant("ffmpeg", default=False, description=desc.format("FFMPEG"))
+ variant("webp", default=False, description=desc.format("WEBP"), when="@0.20:")
+ variant("heic", default=False, description=desc.format("HEIC"), when="@0.20:")
+ variant("avif", default=False, description=desc.format("AVIF"), when="@0.20:")
+ variant("nvjpeg", default=False, description=desc.format("NVJPEG"))
variant("video_codec", default=False, description=desc.format("video_codec"))
+ variant("ffmpeg", default=False, description=desc.format("FFMPEG"))
- # https://github.com/pytorch/vision#installation
- depends_on("python@3.8:3.11", when="@0.15:", type=("build", "link", "run"))
- depends_on("python@:3.10", when="@0.12:0.14", type=("build", "link", "run"))
- depends_on("python@:3.9", when="@0.8.2:0.11", type=("build", "link", "run"))
- depends_on("python@:3.8", when="@0.5:0.8.1", type=("build", "link", "run"))
-
- # https://github.com/pytorch/vision#installation
- depends_on("py-torch@main", when="@main", type=("build", "link", "run"))
- depends_on("py-torch@2.1.2", when="@0.16.2", type=("build", "link", "run"))
- depends_on("py-torch@2.1.1", when="@0.16.1", type=("build", "link", "run"))
- depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run"))
- depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run"))
- depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.1", when="@0.14.1", type=("build", "link", "run"))
- depends_on("py-torch@1.13.0", when="@0.14.0", type=("build", "link", "run"))
- depends_on("py-torch@1.12.1", when="@0.13.1", type=("build", "link", "run"))
- depends_on("py-torch@1.12.0", when="@0.13.0", type=("build", "link", "run"))
- depends_on("py-torch@1.11.0", when="@0.12.0", type=("build", "link", "run"))
- depends_on("py-torch@1.10.2", when="@0.11.3", type=("build", "link", "run"))
- depends_on("py-torch@1.10.1", when="@0.11.2", type=("build", "link", "run"))
- depends_on("py-torch@1.10.0", when="@0.11.1", type=("build", "link", "run"))
- depends_on("py-torch@1.10.0", when="@0.11.0", type=("build", "link", "run"))
- depends_on("py-torch@1.9.1", when="@0.10.1", type=("build", "link", "run"))
- depends_on("py-torch@1.9.0", when="@0.10.0", type=("build", "link", "run"))
- depends_on("py-torch@1.8.2", when="@0.9.2", type=("build", "link", "run"))
- depends_on("py-torch@1.8.1", when="@0.9.1", type=("build", "link", "run"))
- depends_on("py-torch@1.8.0", when="@0.9.0", type=("build", "link", "run"))
- depends_on("py-torch@1.7.1", when="@0.8.2", type=("build", "link", "run"))
- depends_on("py-torch@1.7.0", when="@0.8.1", type=("build", "link", "run"))
- depends_on("py-torch@1.7.0", when="@0.8.0", type=("build", "link", "run"))
- depends_on("py-torch@1.6.0", when="@0.7.0", type=("build", "link", "run"))
- depends_on("py-torch@1.5.1", when="@0.6.1", type=("build", "link", "run"))
- depends_on("py-torch@1.5.0", when="@0.6.0", type=("build", "link", "run"))
- depends_on("py-torch@1.4.1", when="@0.5.0", type=("build", "link", "run"))
+ # torchvision does not yet support disabling giflib:
+ # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939
+ # variant("gif", default=False, description=desc.format("GIF"), when="@0.19:")
+
+ with default_args(type=("build", "link", "run")):
+ # Based on PyPI wheel availability
+ depends_on("python@3.9:3.13", when="@0.20:")
+ depends_on("python@3.8:3.12", when="@0.17:0.19")
+ depends_on("python@3.8:3.11", when="@0.15:0.16")
+ depends_on("python@:3.10", when="@0.12:0.14")
+ depends_on("python@:3.9", when="@0.8.2:0.11")
+ depends_on("python@:3.8", when="@0.5:0.8.1")
+
+ # https://github.com/pytorch/vision#installation
+ depends_on("py-torch@main", when="@main")
+ depends_on("py-torch@2.5.1", when="@0.20.1")
+ depends_on("py-torch@2.5.0", when="@0.20.0")
+ depends_on("py-torch@2.4.1", when="@0.19.1")
+ depends_on("py-torch@2.4.0", when="@0.19.0")
+ depends_on("py-torch@2.3.1", when="@0.18.1")
+ depends_on("py-torch@2.3.0", when="@0.18.0")
+ depends_on("py-torch@2.2.2", when="@0.17.2")
+ depends_on("py-torch@2.2.1", when="@0.17.1")
+ depends_on("py-torch@2.2.0", when="@0.17.0")
+ depends_on("py-torch@2.1.2", when="@0.16.2")
+ depends_on("py-torch@2.1.1", when="@0.16.1")
+ depends_on("py-torch@2.1.0", when="@0.16.0")
+ depends_on("py-torch@2.0.1", when="@0.15.2")
+ depends_on("py-torch@2.0.0", when="@0.15.1")
+ depends_on("py-torch@1.13.1", when="@0.14.1")
+ depends_on("py-torch@1.13.0", when="@0.14.0")
+ depends_on("py-torch@1.12.1", when="@0.13.1")
+ depends_on("py-torch@1.12.0", when="@0.13.0")
+ depends_on("py-torch@1.11.0", when="@0.12.0")
+ depends_on("py-torch@1.10.2", when="@0.11.3")
+ depends_on("py-torch@1.10.1", when="@0.11.2")
+ depends_on("py-torch@1.10.0", when="@0.11.1")
+ depends_on("py-torch@1.10.0", when="@0.11.0")
+ depends_on("py-torch@1.9.1", when="@0.10.1")
+ depends_on("py-torch@1.9.0", when="@0.10.0")
+ depends_on("py-torch@1.8.2", when="@0.9.2")
+ depends_on("py-torch@1.8.1", when="@0.9.1")
+ depends_on("py-torch@1.8.0", when="@0.9.0")
+ depends_on("py-torch@1.7.1", when="@0.8.2")
+ depends_on("py-torch@1.7.0", when="@0.8.1")
+ depends_on("py-torch@1.7.0", when="@0.8.0")
+ depends_on("py-torch@1.6.0", when="@0.7.0")
+ depends_on("py-torch@1.5.1", when="@0.6.1")
+ depends_on("py-torch@1.5.0", when="@0.6.0")
+ depends_on("py-torch@1.4.1", when="@0.5.0")
depends_on("ninja", type="build")
# setup.py
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
- depends_on("py-requests", when="@0.12:", type=("build", "run"))
+ # https://github.com/pytorch/vision/issues/8460
+ depends_on("py-numpy@:1", when="@:0.18", type=("build", "run"))
depends_on("pil@5.3:", when="@0.10:", type=("build", "run"))
depends_on("pil@4.1.1:", type=("build", "run"))
# Extensions
depends_on("libpng@1.6:", when="+png")
depends_on("jpeg", when="+jpeg")
+ depends_on("libwebp", when="+webp")
+ depends_on("libheif", when="+heic")
+ depends_on("libavif", when="+avif")
depends_on("cuda", when="+nvjpeg")
- depends_on("ffmpeg@3.1:", when="+ffmpeg")
depends_on("cuda", when="+video_codec")
+ depends_on("ffmpeg@3.1:", when="+ffmpeg")
+
+ # torchvision does not yet support externally-installed giflib:
+ # https://github.com/pytorch/vision/pull/8406#discussion_r1590926939
+ # depends_on("giflib", when="+gif")
# Historical dependencies
- depends_on("py-typing-extensions", when="@0.12:0.14", type=("build", "run"))
+ depends_on("py-requests", when="@0.12:0.17.0", type=("build", "run"))
depends_on("py-six", when="@:0.5", type=("build", "run"))
+ depends_on("py-typing-extensions", when="@0.12:0.14", type=("build", "run"))
# https://github.com/pytorch/vision/pull/5898
conflicts("^pil@10:", when="@:0.12")
@@ -126,6 +166,13 @@ class PyTorchvision(PythonPackage):
# Many of the datasets require additional dependencies to use.
# These can be installed after the fact.
+ def flag_handler(self, name, flags):
+ # https://github.com/pytorch/vision/issues/8653
+ if name == "ldflags":
+ if self.spec.satisfies("%apple-clang@15:"):
+ flags.append("-Wl,-ld_classic")
+ return (flags, None, None)
+
def setup_build_environment(self, env):
# The only documentation on building is what is found in setup.py and:
# https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation
@@ -140,16 +187,12 @@ class PyTorchvision(PythonPackage):
if "^cuda" in self.spec:
env.set("CUDA_HOME", self.spec["cuda"].prefix)
- torch_cuda_arch_list = ";".join(
- "{0:.1f}".format(float(i) / 10.0)
- for i in self.spec["py-torch"].variants["cuda_arch"].value
- )
- env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch_list)
for gpu in ["cuda", "mps"]:
env.set(f"FORCE_{gpu.upper()}", int(f"+{gpu}" in self.spec["py-torch"]))
- for extension in ["png", "jpeg", "nvjpeg", "ffmpeg", "video_codec"]:
+ extensions = ["png", "jpeg", "webp", "heic", "avif", "nvjpeg", "video_codec", "ffmpeg"]
+ for extension in extensions:
env.set(f"TORCHVISION_USE_{extension.upper()}", int(f"+{extension}" in self.spec))
include = []
diff --git a/var/spack/repos/builtin/packages/py-tornado/package.py b/var/spack/repos/builtin/packages/py-tornado/package.py
index 61765112fe..3106ffb01b 100644
--- a/var/spack/repos/builtin/packages/py-tornado/package.py
+++ b/var/spack/repos/builtin/packages/py-tornado/package.py
@@ -22,5 +22,7 @@ class PyTornado(PythonPackage):
version("5.1.1", sha256="4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
version("4.4", sha256="3176545b6cb2966870db4def4f646da6ab7a0c19400576969c57279a7561ab02")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.8:", when="@6.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-tqdm/package.py b/var/spack/repos/builtin/packages/py-tqdm/package.py
index dd379e923d..f4dce81b48 100644
--- a/var/spack/repos/builtin/packages/py-tqdm/package.py
+++ b/var/spack/repos/builtin/packages/py-tqdm/package.py
@@ -12,6 +12,7 @@ class PyTqdm(PythonPackage):
homepage = "https://github.com/tqdm/tqdm"
pypi = "tqdm/tqdm-4.45.0.tar.gz"
+ version("4.66.3", sha256="23097a41eba115ba99ecae40d06444c15d1c0c698d527a01c6c8bd1c5d0647e5")
version("4.66.1", sha256="d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7")
version("4.65.0", sha256="1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5")
version("4.64.1", sha256="5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4")
diff --git a/var/spack/repos/builtin/packages/py-traitlets/package.py b/var/spack/repos/builtin/packages/py-traitlets/package.py
index 77537822c6..3a6178ce8d 100644
--- a/var/spack/repos/builtin/packages/py-traitlets/package.py
+++ b/var/spack/repos/builtin/packages/py-traitlets/package.py
@@ -12,6 +12,11 @@ class PyTraitlets(PythonPackage):
homepage = "https://github.com/ipython/traitlets"
pypi = "traitlets/traitlets-5.0.4.tar.gz"
+ version("5.14.3", sha256="9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7")
+ version("5.13.0", sha256="9b232b9430c8f57288c1024b34a8f0251ddcc47268927367a0dd3eeaca40deb5")
+ version("5.12.0", sha256="833273bf645d8ce31dcb613c56999e2e055b1ffe6d09168a164bcd91c36d5d35")
+ version("5.11.2", sha256="7564b5bf8d38c40fa45498072bf4dc5e8346eb087bbf1e2ae2d8774f6a0f078e")
+ version("5.10.1", sha256="db9c4aa58139c3ba850101913915c042bdba86f7c8a0dda1c6f7f92c5da8e542")
version("5.9.0", sha256="f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9")
version("5.7.1", sha256="fde8f62c05204ead43c2c1b9389cfc85befa7f54acb5da28529d671175bb4108")
version("5.3.0", sha256="0bb9f1f9f017aa8ec187d8b1b2a7a6626a2a1d877116baba52a129bfa124f8e2")
diff --git a/var/spack/repos/builtin/packages/py-traits/package.py b/var/spack/repos/builtin/packages/py-traits/package.py
index 404c73b8e9..8bccce306b 100644
--- a/var/spack/repos/builtin/packages/py-traits/package.py
+++ b/var/spack/repos/builtin/packages/py-traits/package.py
@@ -22,4 +22,6 @@ class PyTraits(PythonPackage):
version("6.2.0", sha256="16fa1518b0778fd53bf0547e6a562b1787bf68c8f6b7995a13bd1902529fdb0c")
version("6.0.0", sha256="dbcd70166feca434130a1193284d5819ca72ffbc8dbce8deeecc0cebb41a3bfb")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-transformer-engine/package.py b/var/spack/repos/builtin/packages/py-transformer-engine/package.py
new file mode 100644
index 0000000000..175b333626
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-transformer-engine/package.py
@@ -0,0 +1,50 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTransformerEngine(PythonPackage):
+ """
+ A library for accelerating Transformer models on NVIDIA GPUs, including fp8 precision on Hopper
+ GPUs.
+ """
+
+ homepage = "https://github.com/NVIDIA/TransformerEngine"
+ url = "https://github.com/NVIDIA/TransformerEngine/archive/refs/tags/v0.0.tar.gz"
+ git = "https://github.com/NVIDIA/TransformerEngine.git"
+ maintainers("aurianer")
+
+ license("Apache-2.0")
+
+ version("1.4", tag="v1.4", submodules=True)
+ version("main", branch="main", submodules=True)
+
+ depends_on("cxx", type="build") # generated
+
+ variant("userbuffers", default=True, description="Enable userbuffers, this option needs MPI.")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("cmake@3.18:")
+ depends_on("py-pydantic")
+ depends_on("py-importlib-metadata")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-accelerate")
+ depends_on("py-datasets")
+ depends_on("py-flash-attn@2.2:2.4.2")
+ depends_on("py-packaging")
+ depends_on("py-torchvision")
+ depends_on("py-transformers")
+ depends_on("mpi", when="+userbuffers")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("py-torch+cuda+cudnn")
+
+ def setup_build_environment(self, env):
+ env.set("NVTE_FRAMEWORK", "pytorch")
+ if self.spec.satisfies("+userbuffers"):
+ env.set("NVTE_WITH_USERBUFFERS", "1")
+ env.set("MPI_HOME", self.spec["mpi"].prefix)
diff --git a/var/spack/repos/builtin/packages/py-transformers/package.py b/var/spack/repos/builtin/packages/py-transformers/package.py
index e1b34bb65d..fc4a35ae49 100644
--- a/var/spack/repos/builtin/packages/py-transformers/package.py
+++ b/var/spack/repos/builtin/packages/py-transformers/package.py
@@ -18,33 +18,44 @@ class PyTransformers(PythonPackage):
license("Apache-2.0")
+ version("4.42.3", sha256="7539873ff45809145265cbc94ea4619d2713c41ceaa277b692d8b0be3430f7eb")
+ version("4.38.1", sha256="86dc84ccbe36123647e84cbd50fc31618c109a41e6be92514b064ab55bf1304c")
version("4.35.2", sha256="2d125e197d77b0cdb6c9201df9fa7e2101493272e448b9fba9341c695bee2f52")
version("4.31.0", sha256="4302fba920a1c24d3a429a29efff6a63eac03f3f3cf55b55927fc795d01cb273")
version("4.24.0", sha256="486f353a8e594002e48be0e2aba723d96eda839e63bfe274702a4b5eda85559b")
version("4.6.1", sha256="83dbff763b7e7dc57cbef1a6b849655d4fcab6bffdd955c5e8bea12a4f76dc10")
version("2.8.0", sha256="b9f29cdfd39c28f29e0806c321270dea337d6174a7aa60daf9625bf83dbb12ee")
- depends_on("py-setuptools", type="build")
- depends_on("py-filelock", type=("build", "run"))
- depends_on("py-huggingface-hub@0.16.4:0", when="@4.34:", type=("build", "run"))
- depends_on("py-huggingface-hub@0.14.1:0", when="@4.26:", type=("build", "run"))
- depends_on("py-huggingface-hub@0.10:0", when="@4.24:", type=("build", "run"))
- depends_on("py-huggingface-hub@0.0.8", when="@4.6.1", type=("build", "run"))
- depends_on("py-numpy@1.17:", when="@4.6:", type=("build", "run"))
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-packaging@20:", when="@4.24:", type=("build", "run"))
- depends_on("py-packaging", when="@4.6.1", type=("build", "run"))
- depends_on("py-pyyaml@5.1:", when="@4.24:", type=("build", "run"))
- depends_on("py-regex@:2019.12.16,2019.12.18:", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-safetensors@0.3.1:", when="@4.31:", type=("build", "run"))
- depends_on("py-tokenizers@0.14:0.18", when="@4.35:", type=("build", "run"))
- depends_on("py-tokenizers@0.11.1:0.11.2,0.11.4:0.13", when="@4.24:4.33", type=("build", "run"))
- depends_on("py-tokenizers@0.10.1:0.10", when="@4.6.1", type=("build", "run"))
- depends_on("py-tokenizers@0.5.2", when="@2.8.0", type=("build", "run"))
- depends_on("py-tqdm@4.27:", type=("build", "run"))
-
- # Historical requirements
- depends_on("py-sacremoses", when="@:4.6", type=("build", "run"))
- depends_on("py-boto3", when="@2.8.0", type=("build", "run"))
- depends_on("py-sentencepiece", when="@2.8.0", type=("build", "run"))
+ depends_on("cxx", type="build") # generated
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-filelock")
+ depends_on("py-huggingface-hub@0.23.2:", when="@4.42.3:")
+ depends_on("py-huggingface-hub@0.19.3:", when="@4.38.1:")
+ depends_on("py-huggingface-hub@0.16.4:0", when="@4.34:")
+ depends_on("py-huggingface-hub@0.14.1:0", when="@4.26:")
+ depends_on("py-huggingface-hub@0.10:0", when="@4.24:")
+ depends_on("py-huggingface-hub@0.0.8", when="@4.6.1")
+ depends_on("py-numpy@1.17:1", when="@4.6:")
+ depends_on("py-numpy@:1")
+ depends_on("py-packaging@20:", when="@4.24:")
+ depends_on("py-packaging", when="@4.6.1")
+ depends_on("py-pyyaml@5.1:", when="@4.24:")
+ depends_on("py-regex@:2019.12.16,2019.12.18:")
+ depends_on("py-requests")
+ depends_on("py-safetensors@0.4.1:", when="@4.38.1:")
+ depends_on("py-safetensors@0.3.1:", when="@4.31:")
+ depends_on("py-tokenizers@0.19", when="@4.40.0:")
+ depends_on("py-tokenizers@0.14:0.18", when="@4.35:4.39.3")
+ depends_on("py-tokenizers@0.11.1:0.11.2,0.11.4:0.13", when="@4.24:4.33")
+ depends_on("py-tokenizers@0.10.1:0.10", when="@4.6.1")
+ depends_on("py-tokenizers@0.5.2", when="@2.8.0")
+ depends_on("py-tqdm@4.27:")
+
+ # Historical requirements
+ depends_on("py-sacremoses", when="@:4.6")
+ depends_on("py-boto3", when="@2.8.0")
+ depends_on("py-sentencepiece", when="@2.8.0")
diff --git a/var/spack/repos/builtin/packages/py-transonic/package.py b/var/spack/repos/builtin/packages/py-transonic/package.py
new file mode 100644
index 0000000000..01772b1c56
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-transonic/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTransonic(PythonPackage):
+ """Make your Python code fly at transonic speeds!"""
+
+ pypi = "transonic/transonic-0.7.2.tar.gz"
+
+ maintainers("paugier")
+
+ license("BSD-3-Clause", checked_by="paugier")
+
+ version("0.7.2", sha256="d0c39c13b535df4f121a8a378efc42e3d3bf4e49536d131e6d26e9fe7d5a5bf4")
+ version("0.7.1", sha256="dcc59f1936d09129c800629cd4e6812571a74afe40dadd8193940b545e6ef03e")
+
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-pdm-backend", type="build")
+
+ with default_args(type="run"):
+ depends_on("py-numpy")
+ depends_on("py-beniget@0.4")
+ depends_on("py-gast@0.5")
+ depends_on("py-autopep8")
diff --git a/var/spack/repos/builtin/packages/py-tree-math/package.py b/var/spack/repos/builtin/packages/py-tree-math/package.py
new file mode 100644
index 0000000000..4012457d95
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-tree-math/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTreeMath(PythonPackage):
+ """Mathematical operations for JAX pytrees."""
+
+ homepage = "https://github.com/google/tree-math"
+ pypi = "tree-math/tree-math-0.2.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.2.0", sha256="fced2b436fa265b4e24ab46b5768d7b03a4a8d0b75de8a5ab110abaeac3b5772")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-jax", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tree/package.py b/var/spack/repos/builtin/packages/py-tree/package.py
new file mode 100644
index 0000000000..a8d03a0e12
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-tree/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTree(PythonPackage):
+ """A package for creating and drawing trees."""
+
+ homepage = "https://github.com/PixelwarStudio/PyTree"
+ pypi = "Tree/Tree-0.2.4.tar.gz"
+
+ license("MIT")
+
+ version("0.2.4", sha256="f84d8ec9bf50dd69f551da78925a23d110864e7706551f590cdade27646f7883")
+
+ depends_on("pil", type=("build", "run"))
+ depends_on("py-svgwrite", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
+ depends_on("py-click", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-treelib/package.py b/var/spack/repos/builtin/packages/py-treelib/package.py
new file mode 100644
index 0000000000..0185c21ab1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-treelib/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTreelib(PythonPackage):
+ """A Python implementation of tree structure."""
+
+ homepage = "https://github.com/caesar0301/treelib"
+ pypi = "treelib/treelib-1.7.0.tar.gz"
+
+ license("Apache-2.0")
+
+ version("1.7.0", sha256="9bff1af416b9e642a6cd0e0431d15edf26a24b8d0c8ae68afbd3801b5e30fb61")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-six", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-triangle/package.py b/var/spack/repos/builtin/packages/py-triangle/package.py
index f54aa8641c..d236b1f5c1 100644
--- a/var/spack/repos/builtin/packages/py-triangle/package.py
+++ b/var/spack/repos/builtin/packages/py-triangle/package.py
@@ -16,6 +16,8 @@ class PyTriangle(PythonPackage):
version("20200424", sha256="fc207641f8f39986f7d2bee1b91688a588cd235d2e67777422f94e61fece27e9")
+ depends_on("c", type="build") # generated
+
depends_on("python@:3.9", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-trieregex/package.py b/var/spack/repos/builtin/packages/py-trieregex/package.py
new file mode 100644
index 0000000000..3abbc319e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-trieregex/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTrieregex(PythonPackage):
+ """Build efficient trie-based regular expressions from large word lists"""
+
+ homepage = "https://github.com/ermanh/trieregex"
+ pypi = "trieregex/trieregex-1.0.0.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("1.0.0", sha256="a34dd31d04aa169e1989971a315fcbd524126330c7f2f9f16991b0a8c9084eaf")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-triton/package.py b/var/spack/repos/builtin/packages/py-triton/package.py
new file mode 100644
index 0000000000..0c326c44d4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-triton/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTriton(PythonPackage):
+ """A language and compiler for custom Deep Learning operations."""
+
+ homepage = "https://github.com/openai/triton"
+ url = "https://github.com/openai/triton/archive/refs/tags/v2.1.0.tar.gz"
+ git = "https://github.com/openai/triton.git"
+
+ license("MIT")
+
+ version("main", branch="main")
+ version("2.1.0", sha256="4338ca0e80a059aec2671f02bfc9320119b051f378449cf5f56a1273597a3d99")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("py-setuptools@40.8:", type="build")
+ depends_on("cmake@3.18:", type="build")
+ depends_on("py-filelock", type=("build", "run"))
+ depends_on("zlib-api", type="link")
+ conflicts("^openssl@3.3.0")
+
+ def setup_build_environment(self, env):
+ """Set environment variables used to control the build"""
+ if self.spec.satisfies("%clang"):
+ env.set("TRITON_BUILD_WITH_CLANG_LLD", "True")
+
+ build_directory = "python"
diff --git a/var/spack/repos/builtin/packages/py-trx-python/package.py b/var/spack/repos/builtin/packages/py-trx-python/package.py
new file mode 100644
index 0000000000..9f7c09fcb6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-trx-python/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyTrxPython(PythonPackage):
+ """Experiments with new file format for tractography."""
+
+ homepage = "https://tee-ar-ex.github.io/trx-python/"
+ pypi = "trx-python/trx-python-0.2.9.tar.gz"
+
+ maintainers("ChristopherChristofi")
+
+ license("BSD-2-Clause")
+
+ version("0.2.9", sha256="16b4104d7c991879c601f60e8d587decac50ce60388aae8d0c754a92136d1caf")
+
+ depends_on("py-setuptools@42.0:", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", type=("build", "run"))
+ depends_on("py-setuptools-scm-git-archive", type="build")
+ depends_on("py-packaging@19.0:", type="build")
+ depends_on("py-cython@0.29:", type="build")
+ depends_on("py-deepdiff", type=("build", "run"))
+ depends_on("py-nibabel@5:", type=("build", "run"))
+ depends_on("py-numpy@1.22:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py
index 91fd4b4b6e..ca95de3d40 100644
--- a/var/spack/repos/builtin/packages/py-tuiview/package.py
+++ b/var/spack/repos/builtin/packages/py-tuiview/package.py
@@ -16,6 +16,9 @@ class PyTuiview(PythonPackage):
"https://github.com/ubarsc/tuiview/releases/download/tuiview-1.2.13/TuiView-1.2.13.tar.gz"
)
+ maintainers("neilflood", "gillins")
+
+ version("1.2.14", sha256="80cf4ac607b37bb9d7348b3d40e1e18910323f7ad47e79ae850cbb4750775f7c")
version("1.2.13", sha256="48c8d4175c324f70941dc49c5a119882c9d501bd20bc13c76bc2455dee5236a5")
version("1.2.12", sha256="3f0c1673f2f861db01726f3d7f6f1dde4a42ec57894a79b89457c398768dd25f")
version("1.2.11", sha256="81f870ad98ec1e3175f25028d261135b6198fa85038bfaa900789e04e3cf8517")
@@ -25,6 +28,8 @@ class PyTuiview(PythonPackage):
version("1.2.7", sha256="35dfeb79b2bb57dfb5b8c90c3edf8c8a0a3f89cef85c33f9935e4a4add282aaf")
version("1.2.6", sha256="61b136fa31c949d7a7a4dbf8562e6fc677d5b1845b152ec39e337f4eb2e91662")
+ depends_on("c", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
depends_on("py-pyqt5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tuspy/package.py b/var/spack/repos/builtin/packages/py-tuspy/package.py
index 9b38e89668..56424091a3 100644
--- a/var/spack/repos/builtin/packages/py-tuspy/package.py
+++ b/var/spack/repos/builtin/packages/py-tuspy/package.py
@@ -10,7 +10,7 @@ from spack.package import *
class PyTuspy(PythonPackage):
"""A Python client for the tus resumable upload protocol -> http://tus.io"""
- homepage = "http://github.com/tus/tus-py-client/"
+ homepage = "https://github.com/tus/tus-py-client/"
pypi = "tuspy/tuspy-1.0.0.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/py-tuswsgi/package.py b/var/spack/repos/builtin/packages/py-tuswsgi/package.py
index 5efbb80603..066f8c7e03 100644
--- a/var/spack/repos/builtin/packages/py-tuswsgi/package.py
+++ b/var/spack/repos/builtin/packages/py-tuswsgi/package.py
@@ -15,11 +15,7 @@ class PyTuswsgi(PythonPackage):
license("MIT")
- version(
- "0.5.4",
- sha256="f681a386254a161a97301a67c01ee7da77419c007d9bc43dbd48d5a987491a5e",
- expand=False,
- )
+ version("0.5.4", sha256="f681a386254a161a97301a67c01ee7da77419c007d9bc43dbd48d5a987491a5e")
depends_on("python@3.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-tweedledum/package.py b/var/spack/repos/builtin/packages/py-tweedledum/package.py
index 9e4be8b77c..f46ccf8bde 100644
--- a/var/spack/repos/builtin/packages/py-tweedledum/package.py
+++ b/var/spack/repos/builtin/packages/py-tweedledum/package.py
@@ -20,11 +20,13 @@ class PyTweedledum(PythonPackage):
license("MIT")
version("1.1.1", sha256="58d6f7a988b10c31be3faa1faf3e58288ef7e8159584bfa6ded45742f390309f")
+
+ depends_on("cxx", type="build") # generated
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@42:", type="build")
depends_on("py-scikit-build@0.12:", type="build")
- depends_on("py-cmake@3.18:", type="build")
- depends_on("py-ninja", type="build")
+ depends_on("cmake@3.18:", type="build")
+ depends_on("ninja", type="build")
depends_on("py-wheel", type="build")
depends_on("eigen@3.3:")
depends_on("nlohmann-json@3.9.0:")
diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py
index 905983e2bd..c35061d4c6 100644
--- a/var/spack/repos/builtin/packages/py-twisted/package.py
+++ b/var/spack/repos/builtin/packages/py-twisted/package.py
@@ -10,36 +10,58 @@ class PyTwisted(PythonPackage):
"""An asynchronous networking framework written in Python"""
homepage = "https://twistedmatrix.com/"
- pypi = "Twisted/Twisted-21.7.0.tar.gz"
+ pypi = "Twisted/twisted-21.7.0.tar.gz"
license("Unlicense")
- version("21.7.0", sha256="2cd652542463277378b0d349f47c62f20d9306e57d1247baabd6d1d38a109006")
- version("15.4.0", sha256="78862662fa9ae29654bc2b9d349c3f1d887e6b2ed978512c4442d53ea861f05c")
- version("15.3.0", sha256="025729751cf898842262375a40f70ae1d246daea88369eab9f6bb96e528bf285")
+ version("24.7.0", sha256="5a60147f044187a127ec7da96d170d49bcce50c6fd36f594e60f4587eff4d394")
+ version("22.10.0", sha256="32acbd40a94f5f46e7b42c109bfae2b302250945561783a8b7a059048f2d4d31")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-24801
+ version(
+ "21.7.0", sha256="2cd652542463277378b0d349f47c62f20d9306e57d1247baabd6d1d38a109006"
+ )
+ version(
+ "15.4.0", sha256="78862662fa9ae29654bc2b9d349c3f1d887e6b2ed978512c4442d53ea861f05c"
+ )
+ version(
+ "15.3.0", sha256="025729751cf898842262375a40f70ae1d246daea88369eab9f6bb96e528bf285"
+ )
depends_on("python@3.6.7:", type=("build", "run"), when="@21.7.0:")
+ depends_on("python@3.7.1:", type=("build", "run"), when="@22.8.0:")
- depends_on("py-setuptools", type="build")
- depends_on("py-setuptools@35.0.2:", type="build", when="@21.7.0:")
+ with when("@:22.10"):
+ depends_on("py-setuptools", type="build")
+ depends_on("py-setuptools@35.0.2:", type="build", when="@21.7.0:")
+ with when("@23.8.0:"):
+ depends_on("py-hatchling@1.10.0:", type="build")
+ depends_on("py-hatch-fancy-pypi-readme@22.5.0:", type="build")
+ depends_on("py-incremental@22.10.0:", type="build")
depends_on("py-zope-interface@4.0.2:", type=("build", "run"))
depends_on("py-zope-interface@4.4.2:", type=("build", "run"), when="@21.7.0:")
+ depends_on("py-zope-interface@5:", type=("build", "run"), when="@23.8.0:")
depends_on("py-incremental@21.3.0:", type=("build", "run"), when="@21.7.0:")
+ depends_on("py-incremental@22.10.0:", type=("build", "run"), when="@23.8.0:")
depends_on("py-constantly@15.1:", type=("build", "run"), when="@21.7.0:")
depends_on("py-automat@0.8.0:", type=("build", "run"), when="@21.7.0:")
depends_on("py-hyperlink@17.1.1:", type=("build", "run"), when="@21.7.0:")
depends_on("py-attrs@19.2.0:", type=("build", "run"), when="@21.7.0:")
+ depends_on("py-attrs@21.3.0:", type=("build", "run"), when="@23.8.0:")
depends_on("py-typing-extensions@3.6.5:", type=("build", "run"), when="@21.7.0:")
+ depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@23.8.0:")
def url_for_version(self, version):
url = "https://pypi.io/packages/source/T/Twisted/"
if version <= Version("20.3.0"):
url += "Twisted-{0}.tar.bz2"
- else:
+ elif version <= Version("22.10.0"):
url += "Twisted-{0}.tar.gz"
+ else:
+ url += "twisted-{0}.tar.gz"
url = url.format(version)
return url
diff --git a/var/spack/repos/builtin/packages/py-typed-ast/package.py b/var/spack/repos/builtin/packages/py-typed-ast/package.py
index 45f96fdddf..62d15f6978 100644
--- a/var/spack/repos/builtin/packages/py-typed-ast/package.py
+++ b/var/spack/repos/builtin/packages/py-typed-ast/package.py
@@ -25,6 +25,8 @@ class PyTypedAst(PythonPackage):
url="https://files.pythonhosted.org/packages/source/t/typed-ast/typed-ast-1.3.5.tar.gz",
)
+ depends_on("c", type="build") # generated
+
variant(
"wheel",
default=False,
diff --git a/var/spack/repos/builtin/packages/py-typing-extensions/package.py b/var/spack/repos/builtin/packages/py-typing-extensions/package.py
index aef21d66be..b1d8c91345 100644
--- a/var/spack/repos/builtin/packages/py-typing-extensions/package.py
+++ b/var/spack/repos/builtin/packages/py-typing-extensions/package.py
@@ -17,6 +17,7 @@ class PyTypingExtensions(PythonPackage):
license("0BSD")
+ version("4.12.2", sha256="1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8")
version("4.8.0", sha256="df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef")
version("4.6.3", sha256="d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5")
version("4.5.0", sha256="5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb")
diff --git a/var/spack/repos/builtin/packages/py-ucsf-pyem/package.py b/var/spack/repos/builtin/packages/py-ucsf-pyem/package.py
index 7d8bf4cd25..5b2b7c9f7f 100644
--- a/var/spack/repos/builtin/packages/py-ucsf-pyem/package.py
+++ b/var/spack/repos/builtin/packages/py-ucsf-pyem/package.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import glob
+import os
+
from spack.package import *
@@ -15,17 +18,20 @@ class PyUcsfPyem(PythonPackage):
maintainers("dorton21")
- license("GPL-3.0-or-later")
+ license("GPL-3.0-only", checked_by="A-N-Other")
- # Using commit since releases haven't been updated in 2 years
+ # Using commits as releases haven't been updated in since 2019
+ version("2024-02-01", commit="e92cd4d40087c44945bce867a359838a806bd31f")
version("2021-04-07", commit="ed0527f98657d21d887357426b74e5240d477fae")
depends_on("py-setuptools", type="build")
+
+ # Requirement versions taken from requirements.txt
+ depends_on("py-future@0.15:", type=("build", "run"))
+ depends_on("py-numba@0.41:", type=("build", "run"))
depends_on("py-numpy@1.14:", type=("build", "run"))
depends_on("py-scipy@1.2:", type=("build", "run"))
depends_on("py-matplotlib@2.2:", type=("build", "run"))
- depends_on("py-future@0.15:", type=("build", "run"))
- depends_on("py-numba@0.41:", type=("build", "run"))
depends_on("py-seaborn@0.9:", type=("build", "run"))
depends_on("py-pandas@0.23.4:", type=("build", "run"))
depends_on("py-pathos@0.2.1:", type=("build", "run"))
@@ -33,8 +39,11 @@ class PyUcsfPyem(PythonPackage):
depends_on("py-healpy@1.11:", type=("build", "run"))
depends_on("py-natsort@6.0:", type=("build", "run"))
- # Extracts files into bin for proper useage
+ # Extracts scripts into bin for proper usage, ensures +x where not set
@run_after("install")
- def extraction(self):
+ def install_scripts(self):
mkdir(self.prefix.bin)
- install("*.py", self.prefix.bin)
+ for script in glob.glob("*.py"):
+ if script != "setup.py":
+ os.chmod(script, 0o755)
+ install(script, self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/py-ucx-py/package.py b/var/spack/repos/builtin/packages/py-ucx-py/package.py
index d8bcd05a5f..233eb1d6de 100644
--- a/var/spack/repos/builtin/packages/py-ucx-py/package.py
+++ b/var/spack/repos/builtin/packages/py-ucx-py/package.py
@@ -20,6 +20,8 @@ class PyUcxPy(PythonPackage):
version("0.16.0", sha256="12c1c982ee337b8dc026d3a6e8e63d96bf021c5c555fe173642908d3c3bec36e")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-cython@0.29.14:2", type="build")
diff --git a/var/spack/repos/builtin/packages/py-uhi/package.py b/var/spack/repos/builtin/packages/py-uhi/package.py
index ced9b7d3a8..e237f75f95 100644
--- a/var/spack/repos/builtin/packages/py-uhi/package.py
+++ b/var/spack/repos/builtin/packages/py-uhi/package.py
@@ -15,11 +15,13 @@ class PyUhi(PythonPackage):
license("BSD-3-Clause")
+ version("0.4.0", sha256="0dcb6b19775087d38a31ee388cb2c70f2ecfe04c4ffe2ca63223410cae5beefa")
version("0.3.3", sha256="800caf3a5f1273b08bcc3bb4b49228fe003942e23423812b0110546aad9a24be")
version("0.3.2", sha256="fd6ed2ae8ce68ba6be37b872de86e7775b45d54f858768c8fdaba162b6452ab2")
version("0.3.1", sha256="6f1ebcadd1d0628337a30b012184325618047abc01c3539538b1655c69101d91")
version("0.3.0", sha256="3f441bfa89fae11aa762ae1ef1b1b454362d228e9084477773ffb82d6e9f5d2c")
+ depends_on("python@3.7:", type=("build", "run"), when="@0.4:")
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-numpy@1.13.3:", type=("build", "run"))
depends_on("py-typing-extensions@3.7:", type=("build", "run"), when="^python@:3.7")
diff --git a/var/spack/repos/builtin/packages/py-ujson/package.py b/var/spack/repos/builtin/packages/py-ujson/package.py
index 1b50fb9c2e..5c5c2140c5 100644
--- a/var/spack/repos/builtin/packages/py-ujson/package.py
+++ b/var/spack/repos/builtin/packages/py-ujson/package.py
@@ -17,6 +17,9 @@ class PyUjson(PythonPackage):
version("4.0.2", sha256="c615a9e9e378a7383b756b7e7a73c38b22aeb8967a8bfbffd4741f7ffd043c4d")
version("1.35", sha256="f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@42:", when="@5:", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-setuptools-scm@3.4:+toml", when="@5:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-umi-tools/package.py b/var/spack/repos/builtin/packages/py-umi-tools/package.py
index bf737721f2..f3461e3a34 100644
--- a/var/spack/repos/builtin/packages/py-umi-tools/package.py
+++ b/var/spack/repos/builtin/packages/py-umi-tools/package.py
@@ -20,6 +20,8 @@ class PyUmiTools(PythonPackage):
version("0.5.4", sha256="a03e6babf188d0618a63f083b4da18120b9e8b4d473af71b585dba7de347e962")
version("0.5.3", sha256="d599f15c48c96a96ba667db1f364ebfed4ba733dd30469f9656c1717282d2ecb")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@1.1:", type="build")
depends_on("py-numpy@1.7:", type=("build", "run"))
depends_on("py-pandas@0.12:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-uncertainty-toolbox/package.py b/var/spack/repos/builtin/packages/py-uncertainty-toolbox/package.py
new file mode 100644
index 0000000000..c6b0aadbb0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-uncertainty-toolbox/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyUncertaintyToolbox(PythonPackage):
+ """Uncertainty Toolbox: a python toolbox for predictive uncertainty quantification,
+ calibration, metrics, and visualization."""
+
+ homepage = "https://uncertainty-toolbox.github.io/"
+ pypi = "uncertainty-toolbox/uncertainty-toolbox-0.1.1.tar.gz"
+
+ license("MIT")
+
+ version("0.1.1", sha256="d9389112bd431edc8b6e44c5b12405dea8f86063ff9b79f0bb178e5ac76bcfa5")
+
+ with default_args(type="build"):
+ depends_on("py-flit-core@3.2:3")
+ depends_on("py-setuptools")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy@1.19:")
+ depends_on("py-scipy@1.5:")
+ depends_on("py-matplotlib@3.2.2:")
+ depends_on("py-scikit-learn@0.23.1:")
+ depends_on("py-tqdm@4.54:")
diff --git a/var/spack/repos/builtin/packages/py-unfoldnd/package.py b/var/spack/repos/builtin/packages/py-unfoldnd/package.py
new file mode 100644
index 0000000000..e3f1fec171
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-unfoldnd/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyUnfoldnd(PythonPackage):
+ """N-dimensional unfold (im2col) and fold (col2im) in PyTorch."""
+
+ homepage = "https://github.com/f-dangel/unfoldNd"
+ pypi = "unfoldnd/unfoldnd-0.2.2.tar.gz"
+
+ license("MIT")
+
+ version("0.2.2", sha256="e8fdffeb68bc1b393ddc1b1c87056e0e4616db992e95c7dbc3dc90d564599397")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@38.3:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch")
+ depends_on("py-numpy")
diff --git a/var/spack/repos/builtin/packages/py-unicycler/package.py b/var/spack/repos/builtin/packages/py-unicycler/package.py
index a0a521d847..24de27c9dc 100644
--- a/var/spack/repos/builtin/packages/py-unicycler/package.py
+++ b/var/spack/repos/builtin/packages/py-unicycler/package.py
@@ -26,6 +26,8 @@ class PyUnicycler(PythonPackage):
version("0.4.6", sha256="56f6f358a5d1f8dd0fcd1df04504079fc42cec8453a36ee59ff89295535d03f5")
version("0.4.5", sha256="67043656b31a4809f8fa8f73368580ba7658c8440b9f6d042c7f70b5eb6b19ae")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.4:", type=("build", "link", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("racon", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-unshare/package.py b/var/spack/repos/builtin/packages/py-unshare/package.py
index c80b6f8b2c..5811d0644f 100644
--- a/var/spack/repos/builtin/packages/py-unshare/package.py
+++ b/var/spack/repos/builtin/packages/py-unshare/package.py
@@ -15,6 +15,8 @@ class PyUnshare(PythonPackage):
version("0.22", sha256="d521d72cca6e876f22cbd5ff5eb51f1beef75e8f9c53b599b55fa05fba1dd3a6")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
conflicts("platform=darwin", msg="unshare is linux-only")
diff --git a/var/spack/repos/builtin/packages/py-urllib3/package.py b/var/spack/repos/builtin/packages/py-urllib3/package.py
index 4f9155b8e3..e310c21592 100644
--- a/var/spack/repos/builtin/packages/py-urllib3/package.py
+++ b/var/spack/repos/builtin/packages/py-urllib3/package.py
@@ -20,6 +20,7 @@ class PyUrllib3(PythonPackage):
version("2.0.7", sha256="c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84")
version("2.0.6", sha256="b19e1a85d206b56d7df1d5e683df4a7725252a964e3993648dd0fb5a1c157564")
version("2.0.5", sha256="13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594")
+ version("1.26.20", sha256="40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32")
version("1.26.12", sha256="3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e")
version("1.26.6", sha256="f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f")
version("1.25.11", sha256="8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2")
diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py
index b2b98cb777..6c3d6eb4e7 100644
--- a/var/spack/repos/builtin/packages/py-urwid/package.py
+++ b/var/spack/repos/builtin/packages/py-urwid/package.py
@@ -17,4 +17,6 @@ class PyUrwid(PythonPackage):
version("2.1.2", sha256="588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae")
version("1.3.0", sha256="29f04fad3bf0a79c5491f7ebec2d50fa086e9d16359896c9204c6a92bc07aba2")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-userpath/package.py b/var/spack/repos/builtin/packages/py-userpath/package.py
index f7d62a92bb..ec56a961db 100644
--- a/var/spack/repos/builtin/packages/py-userpath/package.py
+++ b/var/spack/repos/builtin/packages/py-userpath/package.py
@@ -13,10 +13,12 @@ class PyUserpath(PythonPackage):
pypi = "userpath/userpath-1.8.0.tar.gz"
license("MIT")
-
+ version("1.9.0", sha256="85e3274543174477c62d5701ed43a3ef1051824a9dd776968adc411e58640dd1")
version("1.8.0", sha256="04233d2fcfe5cff911c1e4fb7189755640e1524ff87a4b82ab9d6b875fee5787")
+ version("1.7.0", sha256="dcd66c5fa9b1a3c12362f309bbb5bc7992bac8af86d17b4e6b1a4b166a11c43f")
depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-setuptools", type=("build", "run"))
depends_on("py-hatchling", type="build")
diff --git a/var/spack/repos/builtin/packages/py-uv/package.py b/var/spack/repos/builtin/packages/py-uv/package.py
new file mode 100644
index 0000000000..c872d974c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-uv/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyUv(PythonPackage):
+ """An extremely fast Python package and project manager, written in Rust."""
+
+ homepage = "https://github.com/astral-sh/uv"
+ pypi = "uv/0.4.15.tar.gz"
+
+ license("APACHE 2.0 or MIT")
+
+ version("0.4.27", sha256="c13eea45257362ecfa2a2b31de9b62fbd0542e211a573562d98ab7c8fc50d8fc")
+ version("0.4.17", sha256="01564bd760eff885ad61f44173647a569732934d1a4a558839c8088fbf75e53f")
+ version("0.4.16", sha256="2144995a87b161d063bd4ef8294b1e948677bd90d01f8394d0e3fca037bb847f")
+ version("0.4.15", sha256="8e36b8e07595fc6216d01e729c81a0b4ff029a93cc2ef987a73d3b650d6d559c")
+
+ depends_on("rust", type=("build", "run"))
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-maturin@1:1", type="build")
+ depends_on("cmake", type="build")
+
+ def setup_build_environment(self, env):
+ env.set("CMAKE", self.spec["cmake"].prefix.bin.cmake)
+
+ executables = ["^uv$"]
diff --git a/var/spack/repos/builtin/packages/py-uvicorn/package.py b/var/spack/repos/builtin/packages/py-uvicorn/package.py
index bc05d7e220..1465d116a8 100644
--- a/var/spack/repos/builtin/packages/py-uvicorn/package.py
+++ b/var/spack/repos/builtin/packages/py-uvicorn/package.py
@@ -31,6 +31,5 @@ class PyUvicorn(PythonPackage):
depends_on("py-pyyaml@5.1:", type=("build", "run"))
depends_on("py-uvloop@0.14,0.15.2:", when="platform=linux", type=("build", "run"))
depends_on("py-uvloop@0.14,0.15.2:", when="platform=darwin", type=("build", "run"))
- depends_on("py-uvloop@0.14,0.15.2:", when="platform=cray", type=("build", "run"))
depends_on("py-watchfiles@0.13:", type=("build", "run"))
depends_on("py-websockets@10.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-uvloop/package.py b/var/spack/repos/builtin/packages/py-uvloop/package.py
index 10c875940c..7bdacaad78 100644
--- a/var/spack/repos/builtin/packages/py-uvloop/package.py
+++ b/var/spack/repos/builtin/packages/py-uvloop/package.py
@@ -14,9 +14,19 @@ class PyUvloop(PythonPackage):
license("Apache-2.0")
+ version("0.19.0", sha256="0246f4fd1bf2bf702e06b0d45ee91677ee5c31242f39aab4ea6fe0c51aedd0fd")
+ version("0.18.0", sha256="d5d1135beffe9cd95d0350f19e2716bc38be47d5df296d7cc46e3b7557c0d1ff")
+ version("0.17.0", sha256="0ddf6baf9cf11a1a22c71487f39f15b2cf78eb5bde7e5b45fbb99e8a9d91b9e1")
version("0.16.0", sha256="f74bc20c7b67d1c27c72601c78cf95be99d5c2cdd4514502b4f3eb0933ff1228")
version("0.14.0", sha256="123ac9c0c7dd71464f58f1b4ee0bbd81285d96cdda8bc3519281b8973e3a461e")
+ depends_on("c", type="build") # generated
+
+ depends_on("python@3.8:", when="@0.19:", type=("build", "run"))
depends_on("python@3.7:", when="@0.15:", type=("build", "run"))
depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type="build")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-setuptools@60:", when="@0.18:")
+ depends_on("py-cython@0.29.36:0.29", when="@0.17:") # May have been required for 0.16:
diff --git a/var/spack/repos/builtin/packages/py-uwsgi/package.py b/var/spack/repos/builtin/packages/py-uwsgi/package.py
index 2783c91007..96ffc84e44 100644
--- a/var/spack/repos/builtin/packages/py-uwsgi/package.py
+++ b/var/spack/repos/builtin/packages/py-uwsgi/package.py
@@ -15,7 +15,11 @@ class PyUwsgi(PythonPackage):
license("GPL-2.0-only")
+ version("2.0.27", sha256="3ee5bfb7e6e9c93478c22aa8183eef35b95a2d5b14cca16172e67f135565c458")
version("2.0.18", sha256="4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("python", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/py-uxarray/package.py b/var/spack/repos/builtin/packages/py-uxarray/package.py
new file mode 100644
index 0000000000..06bccff20b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-uxarray/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyUxarray(PythonPackage):
+ """Xarray extension for unstructured climate and global weather data analysis and
+ visualization"""
+
+ homepage = "https://uxarray.readthedocs.io"
+ pypi = "uxarray/uxarray-2024.10.0.tar.gz"
+ git = "https://github.com/uxarray/uxarray.git"
+
+ license("Apache-2.0", checked_by="climbfuji")
+
+ version("2024.10.0", sha256="f65a9920ce085af9a38349dc5ece4f9b83bc015dc8cb738d245d343f7816fd59")
+
+ # Build-time dependencies
+ depends_on("python@3.9:", type=("build", "run"))
+ depends_on("py-setuptools@60:", type="build")
+ depends_on("py-setuptools-scm@8:", type="build")
+
+ # "Minimal" run-time dependencies
+ depends_on("py-antimeridian", type="run")
+ depends_on("py-cartopy", type="run")
+ depends_on("py-datashader", type="run")
+ depends_on("py-geopandas", type="run")
+ depends_on("py-geoviews", type="run")
+ depends_on("py-holoviews", type="run")
+ depends_on("py-hvplot", type="run")
+ # With older versions of py-dask (2021.6.2):
+ # @derived_from(pd.core.strings.StringMethods)
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ # AttributeError: module 'pandas.core.strings' has no attribute 'StringMethods'
+ # With py-dask@2023.4.1:
+ # return get(descriptor, obj, type(obj))
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ # TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
+ # https://github.com/dask/dask/issues/11038
+ depends_on("py-dask@2024.7.1 +dataframe", type="run")
+ depends_on("py-dask-expr@1.1.9", type="run")
+ depends_on("py-matplotlib", type="run")
+ depends_on("py-matplotlib-inline", type="run")
+ depends_on("py-netcdf4", type="run")
+ depends_on("py-numba", type="run")
+ depends_on("py-pandas", type="run")
+ depends_on("py-pyarrow", type="run")
+ depends_on("py-pytest", type="run")
+ depends_on("py-requests", type="run")
+ depends_on("py-scipy", type="run")
+ depends_on("py-spatialpandas", type="run")
+ depends_on("py-scikit-learn", type="run")
+ depends_on("py-xarray", type="run")
diff --git a/var/spack/repos/builtin/packages/py-validators/package.py b/var/spack/repos/builtin/packages/py-validators/package.py
index b2baef6d01..657a8959fd 100644
--- a/var/spack/repos/builtin/packages/py-validators/package.py
+++ b/var/spack/repos/builtin/packages/py-validators/package.py
@@ -14,7 +14,8 @@ class PyValidators(PythonPackage):
license("MIT")
+ version("0.34.0", sha256="647fe407b45af9a74d245b943b18e6a816acf4926974278f6dd617778e1e781f")
version("0.20.0", sha256="24148ce4e64100a2d5e267233e23e7afeb55316b47d30faae7eb6e7292bc226a")
depends_on("py-setuptools", type="build")
- depends_on("py-decorator@3.4:", type=("build", "run"))
+ depends_on("py-decorator@3.4:", type=("build", "run"), when="@:0.20.7")
diff --git a/var/spack/repos/builtin/packages/py-vascpy/package.py b/var/spack/repos/builtin/packages/py-vascpy/package.py
new file mode 100644
index 0000000000..b5db82ee5a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-vascpy/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyVascpy(PythonPackage):
+ """Python library for reading, writing, and manipulating large-scale vasculature
+ datasets"""
+
+ homepage = "https://github.com/BlueBrain/vascpy"
+ git = "https://github.com/BlueBrain/vascpy.git"
+ pypi = "vascpy/vascpy-0.1.0.tar.gz"
+
+ license("Apache-2.0")
+
+ maintainers("tristan0x")
+
+ version("main", branch="main")
+ version("0.1.1", sha256="1b6bd1399a0388b36241364de74ef709cda2b659e45448fbbdd7efc93bbd8b27")
+
+ depends_on("py-setuptools-scm@3.4:", type="build")
+ depends_on("py-setuptools@42:", type="build")
+
+ depends_on("py-click@8.0.0:", type=("build", "run"))
+ depends_on("py-h5py@3.4.0:", type=("build", "run"))
+ depends_on("py-libsonata@0.1.8:", type=("build", "run"))
+ depends_on("py-morphio@3.0.0:", type=("build", "run"))
+ depends_on("py-numpy@1.17.0:", type=("build", "run"))
+ depends_on("py-pandas@1.0.0:", type=("build", "run"))
+ depends_on("py-scipy@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-vector/package.py b/var/spack/repos/builtin/packages/py-vector/package.py
index 7a5ec7749d..fb9fe5aa95 100644
--- a/var/spack/repos/builtin/packages/py-vector/package.py
+++ b/var/spack/repos/builtin/packages/py-vector/package.py
@@ -12,16 +12,46 @@ class PyVector(PythonPackage):
homepage = "https://github.com/scikit-hep/vector"
pypi = "vector/vector-0.8.4.tar.gz"
- license("BSD-3-Clause")
+ maintainers("wdconinc")
+ tags = ["hep"]
+
+ license("BSD-3-Clause", checked_by="wdconinc")
+
+ version("1.5.1", sha256="41ec731fb67ea35af2075eb3a4d6c83ef93b580dade63010821cbc00f1b98961")
+ version("1.5.0", sha256="77e48bd40b7e7d30a17bf79bb6ed0f2d6985d915fcb9bf0879836276a619a0a9")
+ version("1.4.2", sha256="3805848eb9e53e9c60aa24dd5be88c842a6cd3d241e22984bfe12629b08536a9")
+ version("1.4.1", sha256="15aef8911560db1ea3ffa9dbd5414d0ec575a504a2c3f23ea45170a18994466e")
+ version("1.3.1", sha256="1a94210c21a5d38d36d0fa36c1afb92c2857ba1d09c824b0d4b8615d51f4f2e5")
+ version("1.2.0", sha256="23b7ac5bdab273b4f9306167fd86666a3777a52804d0282a556d989130cb57a4")
+ version("1.1.1", sha256="6957451e59ce508f618335519c53f30ceb88b7053d65f3d166459fd708ed38b5")
+ version("1.0.0", sha256="4fada4fddaa5c1bd69a5ba296ffd948cccb575ad7abe53d14960f56fe32dd4c1")
+ version("0.11.0", sha256="fded30643588226f6f8b7ecd1242048ad423d29d4cd77d8000eea277479a0396")
+ version("0.10.0", sha256="b785678f449de32476f427911248391ddcc7c3582a522a88cbbd50c92dcae490")
+ version("0.9.0", sha256="67ba72edfecb5523b6f6e25156ddfc691f7588dd5dcd924838e6e3904d038778")
version("0.8.5", sha256="2c7c8b228168b89da5d30d50dbd05452348920559ebe0eb94cfdafa15cdc8378")
version("0.8.4", sha256="ef97bfec0263766edbb74c290401f89921f8d11ae9e4a0ffd904ae40674f1239")
+ variant("awkward", default=True, description="Build with awkward support", when="@0.9:")
+
depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools@42:", type="build")
- depends_on("py-setuptools-scm@3.4: +toml", type="build")
- depends_on("py-wheel", type="build")
+ depends_on("python@3.7:", type=("build", "run"), when="@0.10:")
+ depends_on("python@3.8:", type=("build", "run"), when="@1.1:")
+ with when("@0.9:"):
+ depends_on("py-hatchling", type="build")
+ depends_on("py-hatch-vcs", type="build")
+ with when("@:0.8"):
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm@3.4: +toml", type="build")
+ depends_on("py-wheel", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "run"))
depends_on("py-packaging@19.0:", type=("build", "run"))
- depends_on("py-importlib-metadata@0.22:", type=("build", "run"), when="^python@:3.7")
- depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.7")
+ depends_on("py-importlib-metadata@0.22:", type=("build", "run"), when="@:1.0 ^python@:3.7")
+ depends_on("py-typing-extensions", type=("build", "run"), when="@:1.0 ^python@:3.7")
+
+ with when("+awkward"):
+ depends_on("py-awkward@1.2:", type=("build", "run"))
+ depends_on("py-awkward@2:", type=("build", "run"), when="@1.5:")
+
+ # Historical dependencies
+ depends_on("py-numpy@:2.0", type=("build", "run"), when="@:1.5.0")
diff --git a/var/spack/repos/builtin/packages/py-versioneer-518/package.py b/var/spack/repos/builtin/packages/py-versioneer-518/package.py
new file mode 100644
index 0000000000..f7d1e29817
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-versioneer-518/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyVersioneer518(PythonPackage):
+ """Versioneer is a tool to automatically update version strings by
+ asking your version-control system about the current tree."""
+
+ homepage = "https://github.com/python-versioneer/versioneer-518"
+ pypi = "versioneer-518/versioneer-518-0.19.tar.gz"
+ git = "https://github.com/python-versioneer/versioneer-518.git"
+
+ # A workaround for invalid URL, most likely due to presence of 518 in the name.
+ def url_for_version(self, version):
+ return super().url_for_version(f"518-{version}")
+
+ version("0.19", sha256="a287608997415f45401849d1227a42bb41b80a6e4a7da5776666f85ce6faec41")
+
+ depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-versioneer/package.py b/var/spack/repos/builtin/packages/py-versioneer/package.py
index 5eb5ae59e5..f7b50a4760 100644
--- a/var/spack/repos/builtin/packages/py-versioneer/package.py
+++ b/var/spack/repos/builtin/packages/py-versioneer/package.py
@@ -24,6 +24,8 @@ class PyVersioneer(PythonPackage):
version("0.26", sha256="84fc729aa296d1d26645a8f62f178019885ff6f9a1073b29a4a228270ac5257b")
version("0.18", sha256="ead1f78168150011189521b479d3a0dd2f55c94f5b07747b484fd693c3fbf335")
+ depends_on("c", type="build") # generated
+
variant("toml", default=True, description="Install TOML support", when="@0.26:")
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py
index 4b720793a4..fbb2d7734f 100644
--- a/var/spack/repos/builtin/packages/py-virtualenv/package.py
+++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py
@@ -14,7 +14,16 @@ class PyVirtualenv(PythonPackage):
git = "https://github.com/pypa/virtualenv.git"
license("MIT")
-
+ version("20.26.5", sha256="ce489cac131aa58f4b25e321d6d186171f78e6cb13fafbf32a840cee67733ff4")
+ version("20.26.4", sha256="c17f4e0f3e6036e9f26700446f85c76ab11df65ff6d8a9cbfad9f71aabfcf23c")
+ version("20.26.3", sha256="4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a")
+ version("20.26.2", sha256="82bf0f4eebbb78d36ddaee0283d43fe5736b53880b8a8cdcd37390a07ac3741c")
+ version("20.26.1", sha256="604bfdceaeece392802e6ae48e69cec49168b9c5f4a44e483963f9242eb0e78b")
+ version("20.26.0", sha256="ec25a9671a5102c8d2657f62792a27b48f016664c6873f6beed3800008577210")
+ version("20.25.3", sha256="7bb554bbdfeaacc3349fa614ea5bff6ac300fc7c335e9facf3a3bcfc703f45be")
+ version("20.25.2", sha256="fa7edb8428620518010928242ec17aa7132ae435319c29c1651d1cf4c4173aad")
+ version("20.25.1", sha256="e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197")
+ version("20.25.0", sha256="bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b")
version("20.24.5", sha256="e8361967f6da6fbdf1426483bfe9fca8287c242ac0bc30429905721cefbff752")
version("20.22.0", sha256="278753c47aaef1a0f14e6db8a4c5e1e040e90aea654d0fc1dc7e0d8a42616cc3")
version("20.17.1", sha256="f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058")
@@ -28,6 +37,8 @@ class PyVirtualenv(PythonPackage):
version("13.0.1", sha256="36c2cfae0f9c6462264bb19c478fc6bab3478cf0575f1027452e975a1ed84dbd")
version("1.11.6", sha256="3e7a4c151e2ee97f51db0215bfd2a073b04a91e9786df6cb67c916f16abe04f7")
+ depends_on("c", type="build") # generated
+
depends_on("py-hatch-vcs@0.3:", when="@20.18:", type="build")
depends_on("py-hatchling@1.17.1:", when="@20.23.1:", type="build")
depends_on("py-hatchling@1.14:", when="@20.22:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-vl-convert-python/package.py b/var/spack/repos/builtin/packages/py-vl-convert-python/package.py
new file mode 100644
index 0000000000..115e7ca251
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-vl-convert-python/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyVlConvertPython(PythonPackage):
+ """Convert Vega-Lite chart specifications to SVG, PNG, PDF, or Vega"""
+
+ homepage = "https://github.com/vega/vl-convert"
+ pypi = "vl_convert_python/vl_convert_python-1.4.0.tar.gz"
+
+ version("1.4.0", sha256="264d6f2338c7d3474e60c6907cca016b880b0c1c9be302bb84abc6690188a7e9")
+
+ version(
+ "1.3.0",
+ sha256="de1462151dfbba7b2a17881dac1d2269662012c252f1e9d1537a4daed5e36067",
+ deprecated=True,
+ )
+ version(
+ "0.13.1",
+ sha256="d70a608257dd6b5b782d96cccebfe7289992e522e47a8bebb7d928253ca8b396",
+ deprecated=True,
+ )
+
+ depends_on("python@3.7:", type=("build", "run"))
+
+ # TODO: This package currently requires internet access to install.
+ depends_on("py-maturin@1.1:1", type="build")
+
+ depends_on("cmake", type="build") # some rust dependencies need this
+ depends_on("protobuf", type="build") # rust dependency prost need this
diff --git a/var/spack/repos/builtin/packages/py-waitress/package.py b/var/spack/repos/builtin/packages/py-waitress/package.py
index 4a8f1034f4..32095e1cc1 100644
--- a/var/spack/repos/builtin/packages/py-waitress/package.py
+++ b/var/spack/repos/builtin/packages/py-waitress/package.py
@@ -14,6 +14,11 @@ class PyWaitress(PythonPackage):
license("ZPL-2.1")
- version("2.1.2", sha256="780a4082c5fbc0fde6a2fcfe5e26e6efc1e8f425730863c04085769781f51eba")
+ version("3.0.1", sha256="ef0c1f020d9f12a515c4ec65c07920a702613afcad1dbfdc3bcec256b6c072b3")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-49769
+ version("2.1.2", sha256="780a4082c5fbc0fde6a2fcfe5e26e6efc1e8f425730863c04085769781f51eba")
+
+ depends_on("python@3.8:", type=("build", "run"), when="@3:")
depends_on("py-setuptools@41:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-wand/package.py b/var/spack/repos/builtin/packages/py-wand/package.py
index f9561813af..9beb18cce5 100644
--- a/var/spack/repos/builtin/packages/py-wand/package.py
+++ b/var/spack/repos/builtin/packages/py-wand/package.py
@@ -14,7 +14,9 @@ class PyWand(PythonPackage):
license("MIT")
+ version("0.6.13", sha256="f5013484eaf7a20eb22d1821aaefe60b50cc329722372b5f8565d46d4aaafcca")
version("0.6.11", sha256="b661700da9f8f1e931e52726e4fc643a565b9514f5883d41b773e3c37c9fa995")
+ version("0.5.9", sha256="6eaca78e53fbe329b163f0f0b28f104de98edbd69a847268cc5d6a6e392b9b28")
version("0.5.6", sha256="d06b59f36454024ce952488956319eb542d5dc65f1e1b00fead71df94dbfcf88")
version("0.4.2", sha256="a0ded99a9824ddd82617a4b449164e2c5c93853aaff96f9e0bab8b405d62ca7c")
diff --git a/var/spack/repos/builtin/packages/py-wandb/package.py b/var/spack/repos/builtin/packages/py-wandb/package.py
index 6d0949338c..23a3b05d8d 100644
--- a/var/spack/repos/builtin/packages/py-wandb/package.py
+++ b/var/spack/repos/builtin/packages/py-wandb/package.py
@@ -17,11 +17,11 @@ class PyWandb(PythonPackage):
license("MIT")
+ version("0.16.6", sha256="86f491e3012d715e0d7d7421a4d6de41abef643b7403046261f962f3e512fe1c")
version("0.13.9", sha256="0a17365ce1f18306ce7a7f16b943094fac7284bb85f4e52c0685705602f9e307")
depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-pathtools", type=("build", "run"))
depends_on("py-setproctitle", type=("build", "run"))
depends_on("py-appdirs@1.4.3:", type=("build", "run"))
depends_on("py-protobuf@3.19:4", type=("build", "run"))
@@ -29,10 +29,15 @@ class PyWandb(PythonPackage):
depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.9")
depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-click@7:", type=("build", "run"))
+ depends_on("py-click@7:", type=("build", "run"), when="@0.13")
+ depends_on("py-click@7.1:", type=("build", "run"), when="@0.15.5:")
conflicts("^py-click@8.0.0")
depends_on("py-gitpython@1:", type=("build", "run"))
+ conflicts("^py-gitpython@3.1.29")
depends_on("py-requests@2", type=("build", "run"))
depends_on("py-psutil@5:", type=("build", "run"))
depends_on("py-sentry-sdk@1.0.0:", type=("build", "run"))
depends_on("py-dockerpy-creds@0.4.0:", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-pathtools", type=("build", "run"), when="@:0.15")
diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py
index 17483e1c30..6119ba4e81 100644
--- a/var/spack/repos/builtin/packages/py-warpx/package.py
+++ b/var/spack/repos/builtin/packages/py-warpx/package.py
@@ -7,7 +7,9 @@ from spack.package import *
class PyWarpx(PythonPackage):
- """WarpX is an advanced electromagnetic Particle-In-Cell code. It supports
+ """This package is deprecated. Please use `warpx +python`.
+
+ WarpX is an advanced electromagnetic Particle-In-Cell code. It supports
many features including Perfectly-Matched Layers (PML) and mesh refinement.
In addition, WarpX is a highly-parallel and highly-optimized code and
features hybrid OpenMP/MPI parallelization, advanced vectorization
@@ -21,34 +23,116 @@ class PyWarpx(PythonPackage):
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.08.tar.gz"
git = "https://github.com/ECP-WarpX/WarpX.git"
- maintainers("ax3l", "dpgrote", "RemiLehe")
+ maintainers("ax3l", "dpgrote", "EZoni", "RemiLehe")
tags = ["e4s", "ecp"]
license("BSD-3-Clause-LBNL")
# NOTE: if you update the versions here, also see warpx
- version("develop", branch="development")
- version("23.08", sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc")
- version("23.07", sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945")
- version("23.06", sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b")
- version("23.05", sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73")
- version("23.04", sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823")
- version("23.03", sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718")
- version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1")
- version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c")
- version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062")
- version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e")
- version("22.10", sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e")
- version("22.09", sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3")
- version("22.08", sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4")
- version("22.07", sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b")
- version("22.06", sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9")
- version("22.05", sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479")
- version("22.04", sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f")
- version("22.03", sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564")
- version("22.02", sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42")
- version("22.01", sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28")
+ version("develop", branch="development", deprecated=True)
+ version(
+ "23.08",
+ sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc",
+ deprecated=True,
+ )
+ version(
+ "23.07",
+ sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945",
+ deprecated=True,
+ )
+ version(
+ "23.06",
+ sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b",
+ deprecated=True,
+ )
+ version(
+ "23.05",
+ sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73",
+ deprecated=True,
+ )
+ version(
+ "23.04",
+ sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823",
+ deprecated=True,
+ )
+ version(
+ "23.03",
+ sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718",
+ deprecated=True,
+ )
+ version(
+ "23.02",
+ sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1",
+ deprecated=True,
+ )
+ version(
+ "23.01",
+ sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c",
+ deprecated=True,
+ )
+ version(
+ "22.12",
+ sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062",
+ deprecated=True,
+ )
+ version(
+ "22.11",
+ sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e",
+ deprecated=True,
+ )
+ version(
+ "22.10",
+ sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e",
+ deprecated=True,
+ )
+ version(
+ "22.09",
+ sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3",
+ deprecated=True,
+ )
+ version(
+ "22.08",
+ sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4",
+ deprecated=True,
+ )
+ version(
+ "22.07",
+ sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b",
+ deprecated=True,
+ )
+ version(
+ "22.06",
+ sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9",
+ deprecated=True,
+ )
+ version(
+ "22.05",
+ sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479",
+ deprecated=True,
+ )
+ version(
+ "22.04",
+ sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f",
+ deprecated=True,
+ )
+ version(
+ "22.03",
+ sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564",
+ deprecated=True,
+ )
+ version(
+ "22.02",
+ sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42",
+ deprecated=True,
+ )
+ version(
+ "22.01",
+ sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28",
+ deprecated=True,
+ )
+
+ depends_on("cxx", type="build") # generated
variant("mpi", default=True, description="Enable MPI support")
@@ -91,9 +175,7 @@ class PyWarpx(PythonPackage):
depends_on("py-picmistandard@0.0.18", type=("build", "run"), when="@22.01")
depends_on("py-setuptools@42:", type="build")
# Since we use PYWARPX_LIB_DIR to pull binaries out of the
- # 'warpx' spack package, we don't need py-cmake as declared
- # depends_on('py-cmake@3.15:3', type='build')
- # depends_on('py-cmake@3.18:3', type='build', when='@22.01:')
+ # 'warpx' spack package, we don't need cmake as declared
depends_on("warpx +lib ~mpi +shared", type=("build", "link"), when="~mpi")
depends_on("warpx +lib +mpi +shared", type=("build", "link"), when="+mpi")
diff --git a/var/spack/repos/builtin/packages/py-watchdog/package.py b/var/spack/repos/builtin/packages/py-watchdog/package.py
index cb9bcfb44b..e18bbff581 100644
--- a/var/spack/repos/builtin/packages/py-watchdog/package.py
+++ b/var/spack/repos/builtin/packages/py-watchdog/package.py
@@ -26,6 +26,8 @@ class PyWatchdog(PythonPackage):
version("0.8.0", sha256="a86bb2d8b94bb4bf76fcc2ff36f741c0e511ec24c4d3a1059b47d49e377d64f5")
version("0.7.1", sha256="54ca64fdf0a2fb23cecba6349f9587e62fd31840ae22a71898a65adb8c6b52f9")
+ depends_on("c", type="build") # generated
+
variant(
"watchmedo",
default=False,
diff --git a/var/spack/repos/builtin/packages/py-webcolors/package.py b/var/spack/repos/builtin/packages/py-webcolors/package.py
index 834ba71967..4114f98830 100644
--- a/var/spack/repos/builtin/packages/py-webcolors/package.py
+++ b/var/spack/repos/builtin/packages/py-webcolors/package.py
@@ -12,9 +12,14 @@ class PyWebcolors(PythonPackage):
homepage = "https://pypi.org/project/webcolors/"
pypi = "webcolors/webcolors-1.11.1.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("24.6.0", sha256="1d160d1de46b3e81e58d0a280d0c78b467dc80f47294b91b1ad8029d2cedb55b")
+ version("1.13", sha256="c225b674c83fa923be93d235330ce0300373d02885cef23238813b0d5668304a")
+ version("1.12", sha256="16d043d3a08fd6a1b1b7e3e9e62640d09790dce80d2bdd4792a175b35fe794a9")
version("1.11.1", sha256="76f360636957d1c976db7466bc71dcb713bb95ac8911944dffc55c01cb516de6")
depends_on("python@3.5:", type=("build", "run"))
- depends_on("py-setuptools", type=("build"))
+ depends_on("python@3.7:", type=("build", "run"), when="@1.12:")
+ depends_on("python@3.8:", type=("build", "run"), when="@24.6:")
+ depends_on("py-setuptools@61:", type=("build"))
diff --git a/var/spack/repos/builtin/packages/py-webdataset/package.py b/var/spack/repos/builtin/packages/py-webdataset/package.py
new file mode 100644
index 0000000000..7f4af5a9e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-webdataset/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyWebdataset(PythonPackage):
+ """Python-based I/O for deep learning problems."""
+
+ homepage = "https://github.com/webdataset/webdataset"
+ pypi = "webdataset/webdataset-0.1.62.tar.gz"
+
+ license("BSD-3-Clause")
+
+ version("0.1.62", sha256="78b6c7810116d6875fa1ed8eb2dea29a54b86fde014cc2069f4c08fc3530ceb5")
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("python@3.6:")
+
+ # setup.py and requires.txt
+ depends_on("py-braceexpand")
+ depends_on("py-numpy")
diff --git a/var/spack/repos/builtin/packages/py-webkit-server/package.py b/var/spack/repos/builtin/packages/py-webkit-server/package.py
index 7302c5e2b9..eaf6bd6c06 100644
--- a/var/spack/repos/builtin/packages/py-webkit-server/package.py
+++ b/var/spack/repos/builtin/packages/py-webkit-server/package.py
@@ -18,5 +18,7 @@ class PyWebkitServer(PythonPackage):
version("develop", branch="master")
version("1.0", sha256="836dac18c823bf7737461a2d938c66c7b3601c858897e6c92c7ba0e33574a2bc")
+ depends_on("cxx", type="build") # generated
+
# pip silently replaces distutils with setuptools
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-websocket-client/package.py b/var/spack/repos/builtin/packages/py-websocket-client/package.py
index b82bc15729..eb5ddafbb6 100644
--- a/var/spack/repos/builtin/packages/py-websocket-client/package.py
+++ b/var/spack/repos/builtin/packages/py-websocket-client/package.py
@@ -15,6 +15,9 @@ class PyWebsocketClient(PythonPackage):
license("Apache-2.0")
+ version("1.8.0", sha256="3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da")
+ version("1.7.0", sha256="10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6")
+ version("1.6.4", sha256="b3324019b3c28572086c4a319f91d1dcd44e6e11cd340232978c684a7650d0df")
version("1.6.3", sha256="3aad25d31284266bcfcfd1fd8a743f63282305a364b8d0948a43bd606acc652f")
version("1.5.1", sha256="3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40")
version("1.4.1", sha256="f9611eb65c8241a67fb373bef040b3cf8ad377a9f6546a12b620b6511e8ea9ef")
@@ -31,7 +34,7 @@ class PyWebsocketClient(PythonPackage):
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/w/{0}/{0}-{1}.tar.gz"
- if version >= Version("0.59.0"):
+ if self.spec.satisfies("@0.59.0:1.7"):
letter = "websocket-client"
else:
letter = "websocket_client"
diff --git a/var/spack/repos/builtin/packages/py-websockets/package.py b/var/spack/repos/builtin/packages/py-websockets/package.py
index c820112eb5..e8f6344102 100644
--- a/var/spack/repos/builtin/packages/py-websockets/package.py
+++ b/var/spack/repos/builtin/packages/py-websockets/package.py
@@ -21,4 +21,6 @@ class PyWebsockets(PythonPackage):
version("10.1", sha256="181d2b25de5a437b36aefedaf006ecb6fa3aa1328ec0236cdde15f32f9d3ff6d")
version("8.1", sha256="5c65d2da8c6bce0fca2528f69f44b2f977e06954c8512a952222cea50dad430f")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-werkzeug/package.py b/var/spack/repos/builtin/packages/py-werkzeug/package.py
index a454e8b6b5..f7d4b8e9d9 100644
--- a/var/spack/repos/builtin/packages/py-werkzeug/package.py
+++ b/var/spack/repos/builtin/packages/py-werkzeug/package.py
@@ -13,25 +13,52 @@ class PyWerkzeug(PythonPackage):
pypi = "werkzeug/werkzeug-3.0.0.tar.gz"
git = "https://github.com/pallets/werkzeug.git"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("3.1.3", sha256="60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746")
+ version("3.0.4", sha256="34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306")
version("3.0.0", sha256="3ffff4dcc32db52ef3cc94dff3000a3c2846890f3a5a51800a27b909c5e770f0")
- version("2.3.7", sha256="2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8")
- version("2.3.4", sha256="1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76")
- version("2.2.2", sha256="7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f")
- version("2.0.2", sha256="aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a")
- version("0.16.0", sha256="7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7")
- version("0.15.6", sha256="0a24d43be6a7dce81bae05292356176d6c46d63e42a0dd3f9504b210a9cfaa43")
- version("0.15.5", sha256="a13b74dd3c45f758d4ebdb224be8f1ab8ef58b3c0ffc1783a8c7d9f4f50227e6")
- version("0.15.4", sha256="a0b915f0815982fb2a09161cb8f31708052d0951c3ba433ccc5e1aa276507ca6")
- version("0.15.3", sha256="cfd1281b1748288e59762c0e174d64d8bcb2b70e7c57bc4a1203c8825af24ac3")
- version("0.15.2", sha256="0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a")
- version("0.15.1", sha256="ca5c2dcd367d6c0df87185b9082929d255358f5391923269335782b213d52655")
- version("0.15.0", sha256="590abe38f8be026d78457fe3b5200895b3543e58ac3fc1dd792c6333ea11af64")
- version("0.12.2", sha256="903a7b87b74635244548b30d30db4c8947fe64c5198f58899ddcd3a13c23bb26")
- version("0.11.15", sha256="455d7798ac263266dbd38d4841f7534dd35ca9c3da4a8df303f8488f38f3bcc0")
- version("0.11.11", sha256="e72c46bc14405cba7a26bd2ce28df734471bc9016bc8b4cb69466c2c14c2f7e5")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-46136
+ version("2.3.7", sha256="2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8")
+ version("2.3.4", sha256="1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76")
+ version("2.2.2", sha256="7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f")
+ version("2.0.2", sha256="aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a")
+ version(
+ "0.16.0", sha256="7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7"
+ )
+ version(
+ "0.15.6", sha256="0a24d43be6a7dce81bae05292356176d6c46d63e42a0dd3f9504b210a9cfaa43"
+ )
+ version(
+ "0.15.5", sha256="a13b74dd3c45f758d4ebdb224be8f1ab8ef58b3c0ffc1783a8c7d9f4f50227e6"
+ )
+ version(
+ "0.15.4", sha256="a0b915f0815982fb2a09161cb8f31708052d0951c3ba433ccc5e1aa276507ca6"
+ )
+ version(
+ "0.15.3", sha256="cfd1281b1748288e59762c0e174d64d8bcb2b70e7c57bc4a1203c8825af24ac3"
+ )
+ version(
+ "0.15.2", sha256="0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a"
+ )
+ version(
+ "0.15.1", sha256="ca5c2dcd367d6c0df87185b9082929d255358f5391923269335782b213d52655"
+ )
+ version(
+ "0.15.0", sha256="590abe38f8be026d78457fe3b5200895b3543e58ac3fc1dd792c6333ea11af64"
+ )
+ version(
+ "0.12.2", sha256="903a7b87b74635244548b30d30db4c8947fe64c5198f58899ddcd3a13c23bb26"
+ )
+ version(
+ "0.11.15", sha256="455d7798ac263266dbd38d4841f7534dd35ca9c3da4a8df303f8488f38f3bcc0"
+ )
+ version(
+ "0.11.11", sha256="e72c46bc14405cba7a26bd2ce28df734471bc9016bc8b4cb69466c2c14c2f7e5"
+ )
+ depends_on("python@3.9:", when="@3.1:", type=("build", "run"))
depends_on("python@3.8:", when="@2.3:", type=("build", "run"))
depends_on("python@:3.9", when="@:0.12", type=("build", "run"))
depends_on("py-flit-core@:3", when="@2.3.7:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-whatshap/package.py b/var/spack/repos/builtin/packages/py-whatshap/package.py
index d2141255b8..1229823c27 100644
--- a/var/spack/repos/builtin/packages/py-whatshap/package.py
+++ b/var/spack/repos/builtin/packages/py-whatshap/package.py
@@ -18,6 +18,8 @@ class PyWhatshap(PythonPackage):
version("0.17", sha256="5f342cbd28f5d3e79490754f067aa67e8bb059da1c042d944b9f75663ef6b055")
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.4:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cython@0.17:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py
index 07798585ef..582918513d 100644
--- a/var/spack/repos/builtin/packages/py-wheel/package.py
+++ b/var/spack/repos/builtin/packages/py-wheel/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -13,66 +14,18 @@ class PyWheel(Package, PythonExtension):
url = "https://files.pythonhosted.org/packages/py3/w/wheel/wheel-0.41.2-py3-none-any.whl"
list_url = "https://pypi.org/simple/wheel/"
- version(
- "0.41.2",
- sha256="75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8",
- expand=False,
- )
- version(
- "0.37.1",
- sha256="4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a",
- expand=False,
- )
- version(
- "0.37.0",
- sha256="21014b2bd93c6d0034b6ba5d35e4eb284340e09d63c59aef6fc14b0f346146fd",
- expand=False,
- )
- version(
- "0.36.2",
- sha256="78b5b185f0e5763c26ca1e324373aadd49182ca90e825f7853f4b2509215dc0e",
- expand=False,
- )
- version(
- "0.35.1",
- sha256="497add53525d16c173c2c1c733b8f655510e909ea78cc0e29d374243544b77a2",
- expand=False,
- )
- version(
- "0.34.2",
- sha256="df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e",
- expand=False,
- )
- version(
- "0.33.6",
- sha256="f4da1763d3becf2e2cd92a14a7c920f0f00eca30fdde9ea992c836685b9faf28",
- expand=False,
- )
- version(
- "0.33.4",
- sha256="5e79117472686ac0c4aef5bad5172ea73a1c2d1646b808c35926bd26bdfb0c08",
- expand=False,
- )
- version(
- "0.33.1",
- sha256="8eb4a788b3aec8abf5ff68d4165441bc57420c9f64ca5f471f58c3969fe08668",
- expand=False,
- )
- version(
- "0.32.3",
- sha256="1e53cdb3f808d5ccd0df57f964263752aa74ea7359526d3da6c02114ec1e1d44",
- expand=False,
- )
- version(
- "0.29.0",
- sha256="ea8033fc9905804e652f75474d33410a07404c1a78dd3c949a66863bd1050ebd",
- expand=False,
- )
- version(
- "0.26.0",
- sha256="c92ed3a2dd87c54a9e20024fb0a206fe591c352c745fff21e8f8c6cdac2086ea",
- expand=False,
- )
+ version("0.41.2", sha256="75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8")
+ version("0.37.1", sha256="4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a")
+ version("0.37.0", sha256="21014b2bd93c6d0034b6ba5d35e4eb284340e09d63c59aef6fc14b0f346146fd")
+ version("0.36.2", sha256="78b5b185f0e5763c26ca1e324373aadd49182ca90e825f7853f4b2509215dc0e")
+ version("0.35.1", sha256="497add53525d16c173c2c1c733b8f655510e909ea78cc0e29d374243544b77a2")
+ version("0.34.2", sha256="df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e")
+ version("0.33.6", sha256="f4da1763d3becf2e2cd92a14a7c920f0f00eca30fdde9ea992c836685b9faf28")
+ version("0.33.4", sha256="5e79117472686ac0c4aef5bad5172ea73a1c2d1646b808c35926bd26bdfb0c08")
+ version("0.33.1", sha256="8eb4a788b3aec8abf5ff68d4165441bc57420c9f64ca5f471f58c3969fe08668")
+ version("0.32.3", sha256="1e53cdb3f808d5ccd0df57f964263752aa74ea7359526d3da6c02114ec1e1d44")
+ version("0.29.0", sha256="ea8033fc9905804e652f75474d33410a07404c1a78dd3c949a66863bd1050ebd")
+ version("0.26.0", sha256="c92ed3a2dd87c54a9e20024fb0a206fe591c352c745fff21e8f8c6cdac2086ea")
extends("python")
depends_on("python +ctypes", type=("build", "run"))
@@ -91,5 +44,4 @@ class PyWheel(Package, PythonExtension):
# To build wheel from source, you need setuptools and wheel already installed.
# We get around this by using a pre-built wheel, see:
# https://discuss.python.org/t/bootstrapping-a-specific-version-of-pip/12306
- args = std_pip_args + ["--prefix=" + prefix, self.stage.archive_file]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={prefix}", self.stage.archive_file)
diff --git a/var/spack/repos/builtin/packages/py-wordcloud/package.py b/var/spack/repos/builtin/packages/py-wordcloud/package.py
index aba30c805e..9e6f36cdf5 100644
--- a/var/spack/repos/builtin/packages/py-wordcloud/package.py
+++ b/var/spack/repos/builtin/packages/py-wordcloud/package.py
@@ -16,6 +16,8 @@ class PyWordcloud(PythonPackage):
version("1.8.1", sha256="e6ef771aac17c1cf8558c8d5ef025796184066d7b78f8118aefe011fb0d22952")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-numpy@1.6.1:", type=("build", "run"))
depends_on("pil", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-workload-automation/package.py b/var/spack/repos/builtin/packages/py-workload-automation/package.py
index 05ee82d1bc..28e707b44d 100644
--- a/var/spack/repos/builtin/packages/py-workload-automation/package.py
+++ b/var/spack/repos/builtin/packages/py-workload-automation/package.py
@@ -25,6 +25,8 @@ class PyWorkloadAutomation(PythonPackage):
version("2.7.0", sha256="e9005b9db18e205bf6c4b3e09b15a118abeede73700897427565340dcd589fbb")
version("2.6.0", sha256="b94341fb067592cebe0db69fcf7c00c82f96b4eb7c7210e34b38473869824cce")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
depends_on("py-python-dateutil", type=("build", "run"))
depends_on("py-pexpect@3.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-wrapt/package.py b/var/spack/repos/builtin/packages/py-wrapt/package.py
index 4c22c0676f..b6bde1a38c 100644
--- a/var/spack/repos/builtin/packages/py-wrapt/package.py
+++ b/var/spack/repos/builtin/packages/py-wrapt/package.py
@@ -22,4 +22,6 @@ class PyWrapt(PythonPackage):
version("1.11.1", sha256="4aea003270831cceb8a90ff27c4031da6ead7ec1886023b80ce0dfe0adf61533")
version("1.10.10", sha256="42160c91b77f1bc64a955890038e02f2f72986c01d462d53cb6cb039b995cdd9")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@38.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/py-wxflow/package.py b/var/spack/repos/builtin/packages/py-wxflow/package.py
new file mode 100644
index 0000000000..969453b4a7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-wxflow/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyWxflow(PythonPackage):
+ """
+ Common set of tools used in weather workflows.
+ See https://wxflow.readthedocs.io/en/latest/ for documentation.
+ """
+
+ homepage = "https://github.com/NOAA-EMC/wxflow"
+ pypi = "wxflow/wxflow-0.1.0.tar.gz"
+
+ maintainers("aerorahul", "WalterKolczynski-NOAA", "AlexanderRichert-NOAA")
+
+ license("LGPL-3.0-only", checked_by="AlexanderRichert-NOAA")
+
+ version("0.2.0", sha256="a0fa903c6bb65e2cfa9deebcc8ec03d8eced82eac54288e73bd9137fcc0457d4")
+ version("0.1.0", sha256="4de120688affd7589bd9df0288139d16e97a93bc37efcfaf09fccc1c6ed43ab1")
+
+ depends_on("python@3.6:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-numpy@1.21.6:", type=("build", "run"))
+ depends_on("py-pyyaml@6:", type=("build", "run"))
+ depends_on("py-jinja2@3.1.2:", type=("build", "run"))
+
+ depends_on("py-pytest", type="test")
+
+ @on_package_attributes(run_tests=True)
+ def patch(self):
+ # Disable code coverage generation
+ filter_file(r"\s\-\-cov[^\s]+", "", "setup.cfg")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check(self):
+ env["PYTHONPATH"] = ":".join(
+ (join_path(self.build_directory, "build/lib"), env["PYTHONPATH"])
+ )
+ pytest = which(join_path(self.spec["py-pytest"].prefix.bin, "pytest"))
+ pytest("-v", self.build_directory)
diff --git a/var/spack/repos/builtin/packages/py-wxpython/package.py b/var/spack/repos/builtin/packages/py-wxpython/package.py
index 87d1e314eb..6fceaa583d 100644
--- a/var/spack/repos/builtin/packages/py-wxpython/package.py
+++ b/var/spack/repos/builtin/packages/py-wxpython/package.py
@@ -15,6 +15,9 @@ class PyWxpython(PythonPackage):
version("4.1.1", sha256="00e5e3180ac7f2852f342ad341d57c44e7e4326de0b550b9a5c4a8361b6c3528")
version("4.0.6", sha256="35cc8ae9dd5246e2c9861bb796026bbcb9fb083e4d49650f776622171ecdab37")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("wxwidgets")
# Needed for the build.py script
diff --git a/var/spack/repos/builtin/packages/py-x-clip/package.py b/var/spack/repos/builtin/packages/py-x-clip/package.py
new file mode 100644
index 0000000000..9dfcfda16c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-x-clip/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyXClip(PythonPackage):
+ """A concise but complete implementation of CLIP with various experimental
+ improvements from recent papers"""
+
+ homepage = "https://github.com/lucidrains/x-clip"
+ pypi = "x-clip/x-clip-0.14.4.tar.gz"
+
+ license("MIT", checked_by="alex391")
+
+ version("0.14.4", sha256="e2539953f1c81a2ab892843c2bc02c218f4ac410cf10ce37495830f6a0e259c6")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-beartype", type=("build", "run"))
+ depends_on("py-einops@0.6:", type=("build", "run"))
+ depends_on("py-ftfy", type=("build", "run"))
+ depends_on("py-regex", type=("build", "run"))
+ depends_on("py-torch@1.6:", type=("build", "run"))
+ depends_on("py-torchvision", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-x21/package.py b/var/spack/repos/builtin/packages/py-x21/package.py
index c4ad8c9c09..4838b1ecbd 100644
--- a/var/spack/repos/builtin/packages/py-x21/package.py
+++ b/var/spack/repos/builtin/packages/py-x21/package.py
@@ -30,33 +30,27 @@ class PyX21(PythonPackage):
version(
"0.2.6-py3.8",
sha256="bbbfdb6b56562ecc81f0dc39e009713157011fbb50d47353eb25f633acf77204",
- expand=False,
)
version(
"0.2.6-py3.9",
sha256="d7b4f06a71ac27d05ae774752b3ca396134916427f371b5995b07f0f43205043",
- expand=False,
)
version(
"0.2.6-py3.10",
sha256="2cbda690757f1fc80edfe48fcb13f168068f1784f0cb8c300a0d8051714d0452",
- expand=False,
)
elif sys.platform.startswith("linux"):
version(
"0.2.6-py3.8",
sha256="64275052bcda784395bc613f750b8b5a6b1ddbfa4e7a590cb8e209543f0ca0c4",
- expand=False,
)
version(
"0.2.6-py3.9",
sha256="e20b29650fcbf0be116ac93511033bf10debc76261b7350e018ff91b92ff950d",
- expand=False,
)
version(
"0.2.6-py3.10",
sha256="7c5c58ff6dc81caac6815578f78cf545e719beb0bf4017f77120d38025d2bc7d",
- expand=False,
)
depends_on("python@3.8.0:3.8", type=("build", "run"), when="@0.2.6-py3.8")
diff --git a/var/spack/repos/builtin/packages/py-xarray-tensorstore/package.py b/var/spack/repos/builtin/packages/py-xarray-tensorstore/package.py
new file mode 100644
index 0000000000..ea315c8d0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xarray-tensorstore/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyXarrayTensorstore(PythonPackage):
+ """Xarray-TensorStore is a small library that allows opening Zarr arrays into Xarray
+ via TensorStore, instead of the standard Zarr-Python library.
+ """
+
+ homepage = "https://github.com/google/xarray-tensorstore"
+ pypi = "xarray-tensorstore/xarray-tensorstore-0.1.1.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.1.1", sha256="2ee6f164c9f1bc43328245b8d06c21863204fcd4e6159ddd6d8867c313c1d9b4")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy")
+ depends_on("py-xarray")
+ depends_on("py-zarr")
+ depends_on("py-tensorstore")
diff --git a/var/spack/repos/builtin/packages/py-xarray/package.py b/var/spack/repos/builtin/packages/py-xarray/package.py
index e8cdc8dec6..598fa653ff 100644
--- a/var/spack/repos/builtin/packages/py-xarray/package.py
+++ b/var/spack/repos/builtin/packages/py-xarray/package.py
@@ -25,6 +25,7 @@ class PyXarray(PythonPackage):
license("Apache-2.0")
+ version("2024.7.0", sha256="4cae512d121a8522d41e66d942fb06c526bc1fd32c2c181d5fe62fe65b671638")
version("2023.7.0", sha256="dace2fdbf1b7ff185d9c1226a24bf83c2ae52f3253dbfe80e17d1162600d055c")
version("2022.3.0", sha256="398344bf7d170477aaceff70210e11ebd69af6b156fe13978054d25c48729440")
version("0.18.2", sha256="5d2e72a228286fcf60f66e16876bd27629a1a70bf64822c565f16515c4d10284")
@@ -38,6 +39,7 @@ class PyXarray(PythonPackage):
variant("io", default=False, description="Build io backends")
variant("parallel", default=False, description="Build parallel backend")
+ variant("viz", default=False, when="@2024.7.0:", description="Buid viz backends")
# pyproject.toml
depends_on("py-setuptools", when="@:0.15", type="build")
@@ -64,6 +66,7 @@ class PyXarray(PythonPackage):
depends_on("py-numpy@1.17:", when="@0.18:", type=("build", "run"))
depends_on("py-numpy@1.18:", when="@0.20:", type=("build", "run"))
depends_on("py-numpy@1.21:", when="@2023.7.0:", type=("build", "run"))
+ depends_on("py-numpy@1.23:", when="@2024.7.0:", type=("build", "run"))
depends_on("py-pandas@0.15.0:", when="@0.9.1", type=("build", "run"))
depends_on("py-pandas@0.19.2:", when="@0.11:0.13", type=("build", "run"))
@@ -72,9 +75,11 @@ class PyXarray(PythonPackage):
depends_on("py-pandas@1:", when="@0.18:", type=("build", "run"))
depends_on("py-pandas@1.1:", when="@0.20:", type=("build", "run"))
depends_on("py-pandas@1.4:", when="@2023.7.0:", type=("build", "run"))
+ depends_on("py-pandas@2.0:", when="@2024.7.0:", type=("build", "run"))
depends_on("py-packaging@20:", when="@0.21:", type=("build", "run"))
depends_on("py-packaging@21.3:", when="@2023.7.0:", type=("build", "run"))
+ depends_on("py-packaging@23.1:", when="@2024.7.0:", type=("build", "run"))
depends_on("py-netcdf4", when="+io", type=("build", "run"))
depends_on("py-h5netcdf", when="+io", type=("build", "run"))
@@ -86,8 +91,22 @@ class PyXarray(PythonPackage):
depends_on("py-rasterio", when="@:2022.3.0 +io", type=("build", "run"))
depends_on("py-cfgrib", when="@:2022.3.0 +io", type=("build", "run"))
depends_on("py-pooch", when="+io", type=("build", "run"))
+
+ depends_on(
+ "py-dask@:2021 +array+dataframe+distributed+diagnostics+delayed",
+ when="@:2022.05.0 +parallel",
+ type=("build", "run"),
+ )
+
+ # xarray uses inline_array starting in v2022.06.0 which only exists
+ # since dask 2021.01.0
depends_on(
- "py-dask+array+dataframe+distributed+diagnostics+delayed",
- when="+parallel",
+ # +delayed is :2021.3.0
+ "py-dask@2022: +array+dataframe+distributed+diagnostics",
+ when="@2022.06.0: +parallel",
type=("build", "run"),
)
+
+ depends_on("py-matplotlib", when="@2024.7.0: +viz", type=("build", "run"))
+ depends_on("py-seaborn", when="@2024.7.0: +viz", type=("build", "run"))
+ depends_on("py-nc-time-axis", when="@2024.7.0: +viz", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-xattr/package.py b/var/spack/repos/builtin/packages/py-xattr/package.py
index 1ef69e00b2..98cdea6e7b 100644
--- a/var/spack/repos/builtin/packages/py-xattr/package.py
+++ b/var/spack/repos/builtin/packages/py-xattr/package.py
@@ -25,6 +25,8 @@ class PyXattr(PythonPackage):
version("0.9.7", sha256="b0bbca828e04ef2d484a6522ae7b3a7ccad5e43fa1c6f54d78e24bb870f49d44")
version("0.9.6", sha256="7cb1b28eeab4fe99cc4350e831434142fce658f7d03f173ff7722144e6a47458")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cffi@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-xdot/package.py b/var/spack/repos/builtin/packages/py-xdot/package.py
index bf898a117e..73d703a287 100644
--- a/var/spack/repos/builtin/packages/py-xdot/package.py
+++ b/var/spack/repos/builtin/packages/py-xdot/package.py
@@ -50,8 +50,7 @@ class PyXdot(PythonPackage):
dst,
)
# regenerate the byte-compiled __init__.py
- python3 = spec["python"].command
- python3("-m", "compileall", dst)
+ python("-m", "compileall", dst)
def setup_run_environment(self, env):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/py-xesmf/package.py b/var/spack/repos/builtin/packages/py-xesmf/package.py
new file mode 100644
index 0000000000..2aca604b34
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xesmf/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyXesmf(PythonPackage):
+ """Universal Regridder for Geospatial Data."""
+
+ homepage = "https://github.com/pangeo-data/xESMF"
+ pypi = "xesmf/xesmf-0.8.4.tar.gz"
+
+ license("MIT")
+
+ version("0.8.4", sha256="c5a2c4b3e8dbbc9fccd5772a940f9067d68e824215ef87ba222b06718c4eeb56")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools@41.2:")
+ depends_on("py-setuptools-scm")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-cf-xarray@0.5.1:")
+ # TODO: add optional dependency
+ # https://github.com/esmf-org/esmf/tree/develop/src/addon/esmpy
+ # depends_on("py-esmpy@8:")
+ depends_on("py-numba@0.55.2:")
+ depends_on("py-numpy@1.16:")
+ depends_on("py-shapely")
+ depends_on("py-sparse@0.8:")
+ depends_on("py-xarray@0.16.2:")
diff --git a/var/spack/repos/builtin/packages/py-xgboost/add-lib64.patch b/var/spack/repos/builtin/packages/py-xgboost/add-lib64.patch
new file mode 100644
index 0000000000..11adbdc0bc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xgboost/add-lib64.patch
@@ -0,0 +1,24 @@
+diff --git a/packager/nativelib.py b/packager/nativelib.py
+index 1a3df2e..24ba471 100644
+--- a/packager/nativelib.py
++++ b/packager/nativelib.py
+@@ -133,6 +133,7 @@ def locate_or_build_libxgboost(
+ sys_prefix = pathlib.Path(sys.base_prefix)
+ sys_prefix_candidates = [
+ sys_prefix / "lib",
++ sys_prefix / "lib64",
+ # Paths possibly used on Windows
+ sys_prefix / "bin",
+ sys_prefix / "Library",
+diff --git a/xgboost/libpath.py b/xgboost/libpath.py
+index 92d46a0..2007579 100644
+--- a/xgboost/libpath.py
++++ b/xgboost/libpath.py
+@@ -28,6 +28,7 @@ def find_lib_path() -> List[str]:
+ # use libxgboost from a system prefix, if available. This should be the last
+ # option.
+ os.path.join(sys.base_prefix, "lib"),
++ os.path.join(sys.base_prefix, "lib64"),
+ ]
+
+ if sys.platform == "win32":
diff --git a/var/spack/repos/builtin/packages/py-xgboost/package.py b/var/spack/repos/builtin/packages/py-xgboost/package.py
index 2fa4b187ed..2c14f5bc30 100644
--- a/var/spack/repos/builtin/packages/py-xgboost/package.py
+++ b/var/spack/repos/builtin/packages/py-xgboost/package.py
@@ -14,12 +14,14 @@ class PyXgboost(PythonPackage):
homepage = "https://xgboost.ai/"
pypi = "xgboost/xgboost-1.3.3.tar.gz"
-
- maintainers("adamjstewart")
import_modules = ["xgboost"]
license("Apache-2.0")
+ maintainers("adamjstewart")
+ version("2.1.1", sha256="4b1729837f9f1ba88a32ef1be3f8efb860fee6454a68719b196dc88032c23d97")
+ version("2.1.0", sha256="7144980923e76ce741c7b03a14d3bd7514db6de5c7cabe96ba95b229d274f5ca")
+ version("1.7.6", sha256="1c527554a400445e0c38186039ba1a00425dcdb4e40b37eed0e74cb39a159c47")
version("1.6.2", sha256="e1f5c91ba88cf8edb409d7fd2ca150dcd80b6f2115587d87365f0c10b2d4f009")
version("1.6.1", sha256="24072028656f3428e7b8aabf77340ece057f273e41f7f85d67ccaefb7454bb18")
version("1.5.2", sha256="404dc09dca887ef5a9bc0268f882c54b33bfc16ac365a859a11e7b24d49da387")
@@ -31,47 +33,59 @@ class PyXgboost(PythonPackage):
)
variant("dask", default=False, description="Enables Dask extensions for distributed training.")
variant("plotting", default=False, description="Enables tree and importance plotting.")
+ patch("add-lib64.patch", when="@2:")
- for ver in ["1.3.3", "1.5.2", "1.6.1", "1.6.2"]:
+ for ver in ["1.3.3", "1.5.2", "1.6.1", "1.6.2", "1.7.6", "2.1.0", "2.1.1"]:
depends_on("xgboost@" + ver, when="@" + ver)
- depends_on("python@3.7:", when="@1.6:", type=("build", "run"))
- depends_on("python@3.6:", type=("build", "run"))
- depends_on("py-setuptools", type=("build"))
- # in newer pip versions --install-option does not exist
- depends_on("py-pip@:23.0", type="build")
+ with default_args(type="build"):
+ depends_on("py-hatchling@1.12.1:", type="build", when="@2:")
+ # Required to use --config-settings
+ depends_on("py-pip@22.1:", when="@2:")
- depends_on("py-numpy", type=("build", "run"))
- depends_on("py-scipy", type=("build", "run"))
+ # Historical dependencies
+ depends_on("py-setuptools", when="@:1")
+ # in newer pip versions --install-option does not exist
+ depends_on("py-pip@:23.0", when="@:1")
- depends_on("py-pandas", when="+pandas", type=("build", "run"))
+ with default_args(type=("build", "run")):
+ depends_on("py-numpy", type=("build", "run"))
+ # https://github.com/dmlc/xgboost/issues/10221
+ depends_on("py-numpy@:1", when="@:2.0", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
- depends_on("py-scikit-learn", when="+scikit-learn", type=("build", "run"))
+ with when("+pandas"):
+ depends_on("py-pandas@1.2:", when="@2:")
+ depends_on("py-pandas")
- depends_on("py-dask", when="+dask", type=("build", "run"))
- depends_on("py-pandas", when="+dask", type=("build", "run"))
- depends_on("py-distributed", when="+dask", type=("build", "run"))
+ with when("+scikit-learn"):
+ depends_on("py-scikit-learn")
- depends_on("py-graphviz", when="+plotting", type=("build", "run"))
- depends_on("py-matplotlib", when="+plotting", type=("build", "run"))
+ with when("+dask"):
+ depends_on("py-dask")
+ depends_on("py-pandas")
+ depends_on("py-distributed")
+
+ with when("+plotting"):
+ depends_on("py-graphviz")
+ depends_on("py-matplotlib")
def patch(self):
+ # Hard-coded to search for system libxgboost in the Python installation prefix
# https://github.com/dmlc/xgboost/issues/6706
- # 'setup.py' is hard-coded to search in Python installation prefix
- filter_file(
- "lib_path = os.path.join(sys.prefix, 'lib')",
- "lib_path = '{0}'".format(self.spec["xgboost"].libs.directories[0]),
- "setup.py",
- string=True,
- )
-
- # Same for run-time search
- filter_file(
- "os.path.join(curr_path, 'lib'),",
- "'{0}',".format(self.spec["xgboost"].libs.directories[0]),
- os.path.join("xgboost", "libpath.py"),
- string=True,
- )
-
+ files = [os.path.join("xgboost", "libpath.py")]
+ if self.spec.satisfies("@2:"):
+ regex = "sys.base_prefix"
+ files.append(os.path.join("packager", "nativelib.py"))
+ else:
+ regex = "sys.prefix"
+ files.append("setup.py")
+ filter_file(regex, repr(self.spec["xgboost"].prefix), *files, string=True)
+
+ @when("@2:")
+ def config_settings(self, spec, prefix):
+ return {"use_system_libxgboost": True}
+
+ @when("@:1")
def install_options(self, spec, prefix):
return ["--use-system-libxgboost"]
diff --git a/var/spack/repos/builtin/packages/py-xhistogram/package.py b/var/spack/repos/builtin/packages/py-xhistogram/package.py
new file mode 100644
index 0000000000..f9c932a904
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xhistogram/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyXhistogram(PythonPackage):
+ """Fast, flexible, label-aware histograms for numpy and xarray."""
+
+ homepage = "https://github.com/xgcm/xhistogram"
+ pypi = "xhistogram/xhistogram-0.3.2.tar.gz"
+
+ license("MIT")
+
+ version("0.3.2", sha256="56b0751e1469eaed81710f644c8ba5c574b51883baa2feee26a95f2f708f91a1")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-xarray@0.12:", type=("build", "run"))
+ depends_on("py-dask@2.3:+array", type=("build", "run"))
+ depends_on("py-numpy@1.17:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-xpyb/package.py b/var/spack/repos/builtin/packages/py-xpyb/package.py
index 27afdad8d9..c590f3eca8 100644
--- a/var/spack/repos/builtin/packages/py-xpyb/package.py
+++ b/var/spack/repos/builtin/packages/py-xpyb/package.py
@@ -15,6 +15,8 @@ class PyXpyb(AutotoolsPackage):
version("1.3.1", sha256="4056d11f94f17ed4342563955682193c7d004e80e5fa689816f87f3795549c17")
+ depends_on("c", type="build") # generated
+
extends("python")
depends_on("libxcb@1.5:")
diff --git a/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py b/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py
index fe82333f2d..f2020a984b 100644
--- a/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py
+++ b/var/spack/repos/builtin/packages/py-xrootdpyfs/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class PyXrootdpyfs(PythonPackage):
"""XRootDPyFS is a PyFilesystem interface to XRootD."""
- homepage = "http://github.com/inveniosoftware/xrootdpyfs/"
+ homepage = "https://github.com/inveniosoftware/xrootdpyfs/"
pypi = "xrootdpyfs/xrootdpyfs-0.2.2.tar.gz"
version("0.2.2", sha256="43698c260f3ec52320c6bfac8dd3e7c2be7d28e9e9f58edf4f916578114e82bf")
diff --git a/var/spack/repos/builtin/packages/py-xskillscore/package.py b/var/spack/repos/builtin/packages/py-xskillscore/package.py
new file mode 100644
index 0000000000..3907c1fe9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-xskillscore/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyXskillscore(PythonPackage):
+ """Metrics for verifying forecasts."""
+
+ homepage = "https://github.com/xarray-contrib/xskillscore"
+ pypi = "xskillscore/xskillscore-0.0.24.tar.gz"
+
+ license("Apache-2.0")
+
+ version("0.0.24", sha256="ce3306c60626eafea722a1522016e272ca516ce6f2447c75f92c52888939f8c2")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools-scm")
+ depends_on("py-setuptools@30.3:")
+ depends_on("py-setuptools-scm-git-archive")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-bottleneck")
+ depends_on("py-cftime")
+ depends_on("py-dask")
+ depends_on("py-numba@0.52:")
+ depends_on("py-numpy")
+ depends_on("py-properscoring")
+ depends_on("py-scikit-learn")
+ depends_on("py-scipy")
+ depends_on("py-toolz")
+ depends_on("py-xarray@0.16.1:")
+ depends_on("py-xhistogram@0.3.0:")
diff --git a/var/spack/repos/builtin/packages/py-xtb/package.py b/var/spack/repos/builtin/packages/py-xtb/package.py
index 589e45aa85..1bc1944514 100644
--- a/var/spack/repos/builtin/packages/py-xtb/package.py
+++ b/var/spack/repos/builtin/packages/py-xtb/package.py
@@ -25,3 +25,10 @@ class PyXtb(PythonPackage):
depends_on("py-meson-python", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("xtb", type=("build", "run"))
+
+ # from https://github.com/grimme-lab/xtb-python/pull/114
+ patch(
+ "https://github.com/grimme-lab/xtb-python/commit/df7e0010a679f5f00456bf09fcd9330cd7c56c39.patch?full_index=1",
+ when="@:22.1",
+ sha256="0242a4b79b7e24cfec3c0e6661e744eeb6a786d7",
+ )
diff --git a/var/spack/repos/builtin/packages/py-xxhash/package.py b/var/spack/repos/builtin/packages/py-xxhash/package.py
index 6b2110d85d..581d657b77 100644
--- a/var/spack/repos/builtin/packages/py-xxhash/package.py
+++ b/var/spack/repos/builtin/packages/py-xxhash/package.py
@@ -18,6 +18,8 @@ class PyXxhash(PythonPackage):
version("3.2.0", sha256="1afd47af8955c5db730f630ad53ae798cf7fae0acb64cebb3cf94d35c47dd088")
version("2.0.2", sha256="b7bead8cf6210eadf9cecf356e17af794f57c0939a3d420a00d87ea652f87b49")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6:2,3.3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@45:", type="build", when="@3.2.0:")
diff --git a/var/spack/repos/builtin/packages/py-yajl/package.py b/var/spack/repos/builtin/packages/py-yajl/package.py
index 6eae113019..abd3b491b7 100644
--- a/var/spack/repos/builtin/packages/py-yajl/package.py
+++ b/var/spack/repos/builtin/packages/py-yajl/package.py
@@ -14,4 +14,6 @@ class PyYajl(PythonPackage):
version("0.3.5", sha256="432321ea613692a4782a2368a300f57b59c64a3c8508c7465af3fdc045e7bcc2")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/py-yarl/package.py b/var/spack/repos/builtin/packages/py-yarl/package.py
index 27df06fa84..d07f7f8a7a 100644
--- a/var/spack/repos/builtin/packages/py-yarl/package.py
+++ b/var/spack/repos/builtin/packages/py-yarl/package.py
@@ -21,6 +21,8 @@ class PyYarl(PythonPackage):
version("1.4.2", sha256="58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b")
version("1.3.0", sha256="024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9")
+ depends_on("c", type="build") # generated
+
depends_on("py-setuptools@40:", type="build", when="@1.7.2:")
depends_on("py-setuptools", type="build")
depends_on("py-cython", type="build")
diff --git a/var/spack/repos/builtin/packages/py-your/package.py b/var/spack/repos/builtin/packages/py-your/package.py
new file mode 100644
index 0000000000..f226bff0b3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-your/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyYour(PythonPackage):
+ """Python library to read and process pulsar data in several different formats"""
+
+ homepage = "https://github.com/thepetabyteproject/your"
+ url = "https://github.com/thepetabyteproject/your/archive/refs/tags/0.6.7.tar.gz"
+ git = "https://github.com/thepetabyteproject/your.git"
+
+ maintainers("aweaver1fandm")
+
+ license("GPL-3.0")
+
+ version("main", branch="main", preferred=True)
+ version("0.6.7", sha256="f2124a630d413621cce067805feb6b9c21c5c8938f41188bd89684968478d814")
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-astropy@6.1.0:", type=("build", "run"))
+ depends_on("py-matplotlib@3.2.1:", type=("build", "run"))
+
+ depends_on("py-numpy@1.18.4:1.23.5", when="@0.6.7", type=("build", "run"))
+ depends_on("py-numpy@1.18.4:", when="@main", type=("build", "run"))
+ depends_on("py-h5py@2.10:", type=("build", "run"))
+ depends_on("py-scikit-image@0.14.2:", type=("build", "run"))
+ depends_on("py-scipy@1.3:", type=("build", "run"))
+ depends_on("py-numba@0.48:", type=("build", "run"))
+ depends_on("py-pandas@1.0.3:", type=("build", "run"))
+ depends_on("py-rich@8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-yt/package.py b/var/spack/repos/builtin/packages/py-yt/package.py
index 183362dfe3..f42db02498 100644
--- a/var/spack/repos/builtin/packages/py-yt/package.py
+++ b/var/spack/repos/builtin/packages/py-yt/package.py
@@ -40,6 +40,9 @@ class PyYt(PythonPackage):
version("3.2.3", sha256="4d6ccf345d9fab965335c9faf8708c7eea79366b81d77f0f302808be3e82c0ed")
version("3.2.2", sha256="78866f51e4751534ad60987000f149a8295952b99b37ca249d45e4d11095a5df")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("astropy", default=True, description="enable astropy support")
variant("h5py", default=True, description="enable h5py support")
variant("scipy", default=True, description="enable scipy support")
@@ -56,6 +59,8 @@ class PyYt(PythonPackage):
depends_on("py-more-itertools@8.4:", when="@4.1.2:")
depends_on("py-numpy@1.10.4:", type=("build", "run"))
depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@4.1.2:")
+ # https://github.com/yt-project/yt/pull/4859
+ depends_on("py-numpy@:1", when="@:4.3.0", type=("build", "run"))
depends_on("py-packaging@20.9:", type=("build", "run"), when="@4.1.2:")
# PIL/pillow and pyparsing dependency is handled by matplotlib
depends_on("py-tomli-w@0.4:", type=("build", "run"), when="@4.1.2:")
diff --git a/var/spack/repos/builtin/packages/py-ytopt-autotune/package.py b/var/spack/repos/builtin/packages/py-ytopt-autotune/package.py
index eefccd1107..96f03473a4 100644
--- a/var/spack/repos/builtin/packages/py-ytopt-autotune/package.py
+++ b/var/spack/repos/builtin/packages/py-ytopt-autotune/package.py
@@ -21,6 +21,8 @@ class PyYtoptAutotune(PythonPackage):
version("1.1.0", sha256="5ee7fa6a1c83131c5ceba1537b25f00de84182e4d0e6ebd0fd6efa4e8aee1bc4")
version("1.0.0", sha256="13f10594156a7a220561467fdbee52173238ea82c07e8188fdf6584d4524f46f")
+ depends_on("c", type="build") # generated
+
patch("version.patch", when="@1.1.0")
depends_on("python@3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-ytopt/package.py b/var/spack/repos/builtin/packages/py-ytopt/package.py
index b443136793..dee48ed669 100644
--- a/var/spack/repos/builtin/packages/py-ytopt/package.py
+++ b/var/spack/repos/builtin/packages/py-ytopt/package.py
@@ -22,6 +22,9 @@ class PyYtopt(PythonPackage):
version("0.0.2", sha256="5a624aa678b976ff6ef867610bafcb0dfd5c8af0d880138ca5d56d3f776e6d71")
version("0.0.1", sha256="3ca616922c8e76e73f695a5ddea5dd91b0103eada726185f008343cc5cbd7744")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"online",
default=False,
diff --git a/var/spack/repos/builtin/packages/py-z3-solver/package.py b/var/spack/repos/builtin/packages/py-z3-solver/package.py
index bbd74462c3..851ed124fb 100644
--- a/var/spack/repos/builtin/packages/py-z3-solver/package.py
+++ b/var/spack/repos/builtin/packages/py-z3-solver/package.py
@@ -16,5 +16,7 @@ class PyZ3Solver(PythonPackage):
version("4.12.3.0", sha256="b6719daf9676711a8f1c708af0ea185578b0f22a3cb9bf9a55735e21691dc38d")
+ depends_on("cxx", type="build") # generated
+
depends_on("py-setuptools@46.4:", type="build")
depends_on("cmake", type="build")
diff --git a/var/spack/repos/builtin/packages/py-zarr/package.py b/var/spack/repos/builtin/packages/py-zarr/package.py
index 669a5b53c2..7da4fce325 100644
--- a/var/spack/repos/builtin/packages/py-zarr/package.py
+++ b/var/spack/repos/builtin/packages/py-zarr/package.py
@@ -15,21 +15,28 @@ class PyZarr(PythonPackage):
license("MIT")
+ version("2.17.0", sha256="6390a2b8af31babaab4c963efc45bf1da7f9500c9aafac193f84cf019a7c66b0")
version("2.10.2", sha256="5c6ae914ab9215631bb95c09e76b9b9b4fffa70fec0c7bca26b68387d858ebe2")
version("2.6.1", sha256="fa7eac1e4ff47ff82d09c42bb4679e18e8a05a73ee81ce59cee6a441a210b2fd")
version("2.5.0", sha256="d54f060739208392494c3dbcbfdf41c8df9fa23d9a32b91aea0549b4c5e2b77f")
version("2.4.0", sha256="53aa21b989a47ddc5e916eaff6115b824c0864444b1c6f3aaf4f6cf9a51ed608")
version("2.3.2", sha256="c62d0158fb287151c978904935a177b3d2d318dea3057cfbeac8541915dfa105")
- depends_on("python@3.5:", type=("build", "run"), when="@2.4.0:")
- depends_on("python@3.6:", type=("build", "run"), when="@2.6.0:")
- depends_on("python@3.7:3", type=("build", "run"), when="@2.10:")
- depends_on("py-asciitree", type=("build", "run"))
- depends_on("py-fasteners", type=("build", "run"))
- depends_on("py-msgpack", type=("build", "run"), when="@:2.3.2")
- depends_on("py-setuptools@18.0:", type="build")
+ depends_on("python@3.9:", type=("build", "run"), when="@2.17:")
+ depends_on("python@3.7:3", type=("build", "run"), when="@2.10")
+ depends_on("py-setuptools@64:", type="build", when="@2.17:")
depends_on("py-setuptools@38.6.0:", type="build", when="@2.4.0:")
+ depends_on("py-setuptools@18.0:", type="build")
depends_on("py-setuptools-scm@1.5.5:", type="build")
- depends_on("py-numcodecs@0.6.2:", type=("build", "run"))
- depends_on("py-numcodecs@0.6.4:", type=("build", "run"), when="@2.4.0:")
+ depends_on("py-asciitree", type=("build", "run"))
+ depends_on("py-numpy@1.21.1:", type=("build", "run"), when="@2.17:")
depends_on("py-numpy@1.7:", type=("build", "run"))
+ # https://github.com/zarr-developers/zarr-python/issues/1818
+ depends_on("py-numpy@:1", when="@:2.17", type=("build", "run"))
+ depends_on("py-fasteners", type=("build", "run"))
+ depends_on("py-numcodecs@0.10:", type=("build", "run"), when="@2.17:")
+ depends_on("py-numcodecs@0.6.4:", type=("build", "run"), when="@2.4.0:")
+ depends_on("py-numcodecs@0.6.2:", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-msgpack", type=("build", "run"), when="@:2.3.2")
diff --git a/var/spack/repos/builtin/packages/py-zfit-interface/package.py b/var/spack/repos/builtin/packages/py-zfit-interface/package.py
new file mode 100644
index 0000000000..c04dcaa422
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-zfit-interface/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyZfitInterface(PythonPackage):
+ """
+ zfit model fitting interface for HEP
+ """
+
+ homepage = "https://github.com/zfit/zfit-interface"
+ pypi = "zfit_interface/zfit_interface-0.0.3.tar.gz"
+
+ maintainers("jonas-eschle")
+ license("BSD-3-Clause", checked_by="jonas-eschle")
+
+ version("0.0.3", sha256="af7e8ed409f136187b2cd4def723504f9d619738668e963af388a79121239f74")
+
+ depends_on("python@3.8:", type=("build", "run"))
+
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build")
+ depends_on("py-setuptools-scm-git-archive", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-uhi", type=("build", "run"))
+ depends_on("py-typing-extensions", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-zfit/package.py b/var/spack/repos/builtin/packages/py-zfit/package.py
new file mode 100644
index 0000000000..a09d14175c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-zfit/package.py
@@ -0,0 +1,83 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyZfit(PythonPackage):
+ """
+ scalable pythonic model fitting for high energy physics
+ """
+
+ homepage = "https://github.com/zfit/zfit"
+ pypi = "zfit/zfit-0.18.0.tar.gz"
+
+ maintainers("jonas-eschle")
+ license("BSD-3-Clause", checked_by="jonas-eschle")
+
+ tags = ["likelihood", "statistics", "inference", "fitting", "hep"]
+
+ version("0.18.2", sha256="099b111e135937966b4c6342c7738731f112aea33e1b9f4a9785d2eac9e530f1")
+ version("0.18.1", sha256="fbc6b3a636d8dc74fb2e69dfec5855f534c4583ec18efac9e9107ad45b18eb43")
+ version("0.18.0", sha256="21d9479480f74945c67707b715780693bd4e94062c551bf41fe04a2eddb47fab")
+ version("0.17.0", sha256="cd60dfc360c82666af4e8dddd78edb0ab95a095b9dd0868457f0981dc03afa5a")
+ version("0.16.0", sha256="b3b170af23b61d7e265d6fb1bab1d052003f3fb41b3c537527cc1e5a1066dc10")
+ version("0.15.5", sha256="00a1138429e8a7f830c9e229b9c0bcd6071b95dadd8c87eb81191079fb679225")
+ version("0.14.1", sha256="66d1e349403f1d6c6350138d0f2b422046bcbdfb34fd95453dadae29a8b0c98a")
+
+ depends_on("python@3.9:3.11", type=("build", "run"))
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-setuptools-scm-git-archive", type="build")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build")
+
+ variant("nlopt", default=False, description="Enable nlopt support")
+ variant("hs3", default=True, description="Enable serialization support")
+
+ # TODO: remove "build" once fixed in spack that tests need "run", not "build"
+ with default_args(type=("build", "run")):
+
+ depends_on("py-tensorflow@2.15", type=("run"), when="@0.18")
+ depends_on("py-tensorflow-probability@0.23", type=("run"), when="@0.18")
+
+ depends_on("py-tensorflow@2.13", when="@0.15:0.17")
+ depends_on("py-tensorflow-probability@0.21", when="@0.16:0.17")
+ depends_on("py-tensorflow-probability@0.20:0.21", when="@0.15:0.16")
+
+ depends_on("py-tensorflow@2.0:2.12", when="@0.14")
+ depends_on("py-tensorflow-probability@0.20", when="@0.14")
+
+ with when("+nlopt"):
+ depends_on("nlopt@2.7.1: +python")
+
+ with when("+hs3"):
+ depends_on("py-asdf")
+
+ depends_on("py-attrs", when="@0.15:")
+ depends_on("py-typing-extensions", when="^python@:3.8")
+ depends_on("py-boost-histogram")
+ depends_on("py-colorama")
+ depends_on("py-colored")
+ depends_on("py-colorlog")
+ depends_on("py-deprecated")
+ depends_on("py-dill")
+ depends_on("py-dotmap")
+ depends_on("py-frozendict")
+ depends_on("py-hist")
+ depends_on("py-iminuit@2.3:")
+ depends_on("py-jacobi")
+ depends_on("py-numdifftools")
+ depends_on("py-numpy@1.16:")
+ depends_on("py-ordered-set")
+ depends_on("py-pandas")
+ depends_on("py-pydantic@:1")
+ depends_on("py-pyyaml")
+ depends_on("py-scipy@1.2:")
+ depends_on("py-tabulate")
+ depends_on("py-texttable")
+ depends_on("py-uhi")
+ depends_on("py-uproot@4:")
+ depends_on("py-xxhash")
+ depends_on("py-zfit-interface")
diff --git a/var/spack/repos/builtin/packages/py-zipfile-deflate64/package.py b/var/spack/repos/builtin/packages/py-zipfile-deflate64/package.py
index fdeb2965dc..4858f4267e 100644
--- a/var/spack/repos/builtin/packages/py-zipfile-deflate64/package.py
+++ b/var/spack/repos/builtin/packages/py-zipfile-deflate64/package.py
@@ -16,6 +16,8 @@ class PyZipfileDeflate64(PythonPackage):
version("0.2.0", sha256="875a3299de102edf1c17f8cafcc528b1ca80b62dc4814b9cb56867ec59fbfd18")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools@42:", type="build")
depends_on("py-setuptools-scm@3.4:+toml", type="build")
diff --git a/var/spack/repos/builtin/packages/py-zope-event/package.py b/var/spack/repos/builtin/packages/py-zope-event/package.py
index deec70d19e..db68fb119b 100644
--- a/var/spack/repos/builtin/packages/py-zope-event/package.py
+++ b/var/spack/repos/builtin/packages/py-zope-event/package.py
@@ -12,10 +12,13 @@ class PyZopeEvent(PythonPackage):
homepage = "https://github.com/zopefoundation/zope.event"
pypi = "zope.event/zope.event-4.3.0.tar.gz"
- license("ZPL-2.1")
+ license("ZPL-2.1", checked_by="wdconinc")
+ version("5.0", sha256="bac440d8d9891b4068e2b5a2c5e2c9765a9df762944bda6955f96bb9b91e67cd")
version("4.6", sha256="81d98813046fc86cc4136e3698fee628a3282f9c320db18658c21749235fce80")
+ version("4.5.1", sha256="4ab47faac13163ca3c5d6d8a5595212e14770322e95c338d955e3688ba19082a")
version("4.5.0", sha256="5e76517f5b9b119acf37ca8819781db6c16ea433f7e2062c4afc2b6fbedb1330")
version("4.3.0", sha256="e0ecea24247a837c71c106b0341a7a997e3653da820d21ef6c08b32548f733e7")
+ depends_on("python@3.7:", type=("build", "run"), when="@5:")
depends_on("py-setuptools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-zope-interface/package.py b/var/spack/repos/builtin/packages/py-zope-interface/package.py
index 5ac69637f1..349c1b0442 100644
--- a/var/spack/repos/builtin/packages/py-zope-interface/package.py
+++ b/var/spack/repos/builtin/packages/py-zope-interface/package.py
@@ -15,14 +15,27 @@ class PyZopeInterface(PythonPackage):
homepage = "https://github.com/zopefoundation/zope.interface"
pypi = "zope.interface/zope.interface-4.5.0.tar.gz"
- license("ZPL-2.1")
-
+ license("ZPL-2.1", checked_by="wdconinc")
+
+ version("7.0.3", sha256="cd2690d4b08ec9eaf47a85914fe513062b20da78d10d6d789a792c0b20307fb1")
+ version("7.0.2", sha256="f1146bb27a411d0d40cc0e88182a6b0e979d68ab526c8e5ae9e27c06506ed017")
+ version("7.0.1", sha256="f0f5fda7cbf890371a59ab1d06512da4f2c89a6ea194e595808123c863c38eff")
+ version("7.0", sha256="a6699621e2e9565fb34e40677fba6eb0974afc400063b3110d8a14d5b0c7a916")
+ version("6.3", sha256="f83d6b4b22262d9a826c3bd4b2fbfafe1d0000f085ef8e44cd1328eea274ae6a")
+ version("6.2", sha256="3b6c62813c63c543a06394a636978b22dffa8c5410affc9331ce6cdb5bfa8565")
+ version("6.1", sha256="2fdc7ccbd6eb6b7df5353012fbed6c3c5d04ceaca0038f75e601060e95345309")
+ version("6.0", sha256="aab584725afd10c710b8f1e6e208dbee2d0ad009f57d674cb9d1b3964037275d")
+ version("5.5.2", sha256="bfee1f3ff62143819499e348f5b8a7f3aa0259f9aca5e0ddae7391d059dce671")
+ version("5.5.1", sha256="6d678475fdeb11394dc9aaa5c564213a1567cc663082e0ee85d52f78d1fbaab2")
+ version("5.5.0", sha256="700ebf9662cf8df70e2f0cb4988e078c53f65ee3eefd5c9d80cf988c4175c8e3")
version("5.4.0", sha256="5dba5f530fec3f0988d83b78cc591b58c0b6eb8431a85edd1569a0539a8a5a0e")
version("5.1.0", sha256="40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e")
version("4.5.0", sha256="57c38470d9f57e37afb460c399eb254e7193ac7fb8042bd09bdc001981a9c74c")
depends_on("python@2.7:2.8,3.4:", type=("build", "run"), when="@4.5.0")
depends_on("python@2.7:2.8,3.5:", type=("build", "run"), when="@5.1.0:")
+ depends_on("python@3.7:", type=("build", "run"), when="@6:")
+ depends_on("python@3.8:", type=("build", "run"), when="@7:")
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-setuptools@:45", type=("build", "run"), when="@4.5.0")
diff --git a/var/spack/repos/builtin/packages/py-zstandard/package.py b/var/spack/repos/builtin/packages/py-zstandard/package.py
new file mode 100644
index 0000000000..36d1bbe3ce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-zstandard/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class PyZstandard(PythonPackage):
+ """Python bindings to the Zstandard (zstd) compression library."""
+
+ homepage = "https://github.com/indygreg/python-zstandard"
+ pypi = "zstandard/zstandard-0.22.0.tar.gz"
+
+ license("BSD", checked_by="teaguesterling")
+
+ version("0.22.0", sha256="8226a33c542bcb54cd6bd0a366067b610b41713b64c9abec1bc4533d69f51e70")
+
+ depends_on("py-cffi@1.16.0:")
+ depends_on("py-setuptools@:68", type="build")
+ depends_on("zstd")
diff --git a/var/spack/repos/builtin/packages/pygmo/package.py b/var/spack/repos/builtin/packages/pygmo/package.py
index 31095ec8db..9f26a46160 100644
--- a/var/spack/repos/builtin/packages/pygmo/package.py
+++ b/var/spack/repos/builtin/packages/pygmo/package.py
@@ -21,6 +21,9 @@ class Pygmo(CMakePackage):
version("master", branch="master")
version("2.18.0", sha256="9f081cc973297894af09f713f889870ac452bfb32b471f9f7ba08a5e0bb9a125")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build shared libraries")
# Run-time dependencies
diff --git a/var/spack/repos/builtin/packages/pypy-bootstrap/package.py b/var/spack/repos/builtin/packages/pypy-bootstrap/package.py
index 9917ff34c3..d05aca5001 100644
--- a/var/spack/repos/builtin/packages/pypy-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/pypy-bootstrap/package.py
@@ -39,6 +39,8 @@ class PypyBootstrap(Package):
elif platform.system() == "Windows":
version("2.7-v7.3.12", "84cd3b98812d47a1ddb36f3417cc96b3dbdfa32c2b4e16438f205e1253f7ccea")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
url = "https://downloads.python.org/pypy/pypy{}-{}.{}"
ext = "tar.bz2"
diff --git a/var/spack/repos/builtin/packages/pypy/package.py b/var/spack/repos/builtin/packages/pypy/package.py
index b44516b870..e038075333 100644
--- a/var/spack/repos/builtin/packages/pypy/package.py
+++ b/var/spack/repos/builtin/packages/pypy/package.py
@@ -21,6 +21,9 @@ class Pypy(Package):
"3.10-v7.3.12", sha256="86e4e4eacc36046c6182f43018796537fe33a60e1d2a2cc6b8e7f91a5dcb3e42"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("ctypes", default=True, description="Build ctypes module")
variant("zlib", default=True, description="Build zlib module")
variant("bz2", default=True, description="Build bz2 module")
diff --git a/var/spack/repos/builtin/packages/pystring/package.py b/var/spack/repos/builtin/packages/pystring/package.py
new file mode 100644
index 0000000000..9d69f87adb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pystring/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Pystring(CMakePackage):
+ """Pystring is a collection of C++ functions which match the interface and behavior
+ of python's string class methods using std::string."""
+
+ git = "https://github.com/imageworks/pystring"
+ url = "https://github.com/imageworks/pystring/archive/refs/tags/v1.1.4.tar.gz"
+
+ license("Apache-2.0")
+
+ version("1.1.4", sha256="49da0fe2a049340d3c45cce530df63a2278af936003642330287b68cefd788fb")
+
+ # Core dependencies
+ depends_on("cmake@3.27.9:", type="build")
diff --git a/var/spack/repos/builtin/packages/pythia6/CMakeLists.txt b/var/spack/repos/builtin/packages/pythia6/CMakeLists.txt
index 9362f03668..19b2d71baa 100644
--- a/var/spack/repos/builtin/packages/pythia6/CMakeLists.txt
+++ b/var/spack/repos/builtin/packages/pythia6/CMakeLists.txt
@@ -102,7 +102,6 @@ pythia_test( main73 )
pythia_test( main75 )
pythia_test( main77 )
pythia_test( main78 )
-pythia_test( main81 )
# these examples take a while to run
if( run_long_tests )
diff --git a/var/spack/repos/builtin/packages/pythia6/package.py b/var/spack/repos/builtin/packages/pythia6/package.py
index e1b923f783..a027a19c57 100644
--- a/var/spack/repos/builtin/packages/pythia6/package.py
+++ b/var/spack/repos/builtin/packages/pythia6/package.py
@@ -41,6 +41,8 @@ class Pythia6(CMakePackage):
sha256="01cbff47e99365b5e46f6d62c1735d3cae1932c4710604850d59f538cb758020",
)
+ depends_on("fortran", type="build") # generated
+
# Root's TPythia6 interface requires extra sources to be built into
# the Pythia6 library.
variant("root", default=False, description="Build extra (non OEM) code to allow use by Root.")
@@ -88,16 +90,19 @@ class Pythia6(CMakePackage):
"main73.f": "567db2d1a66896ce5103ffa7e10742442b0e934088883e91339536e0249772c4",
"main75.f": "b850986c43a5af1e7d13b66d22b01584e3c68bb338be32eac39e31f971b80be4",
"main77.f": "0679852c4f35719531ad38dc1dbb374b884181eb5e483c36d8867ccb449177a4",
- "main78.f": "5babc59fe6a0bd57d97ec398cf01745bc9b72ce6ce0711e934d53c7821e21912",
+ "main78.f": "09ed4b065d2c7ad439d4083d048a3a8f469963c1bb191811857c88f56ef07a5d",
"main79.f": "27ca84d6d0877f3605cbc1b865c3e1f571e7d2c9301094a4122e726a903dbead",
- "main81.f": "b02fecd1cd0f9ba16eaae53e9da0ba602569fdf0e46856cccdfb4c5b7ba33e8b",
- "ttbar.lhe": "db772b69ab4e0300d973b57414523ac8e7fa8535eac49ee52a6b69b1c131983d",
+ # Following files were not transferred to the new pythia.org website
+ # https://web.archive.org/web/20150215042950/http://pythia6.hepforge.org/examples/main81.f
+ # "main81.f": "b02fecd1cd0f9ba16eaae53e9da0ba602569fdf0e46856cccdfb4c5b7ba33e8b",
+ # https://web.archive.org/web/20150215042950/http://pythia6.hepforge.org/examples/ttbar.lhe
+ # "ttbar.lhe": "db772b69ab4e0300d973b57414523ac8e7fa8535eac49ee52a6b69b1c131983d",
}
for example, checksum in examples.items():
resource(
name=example,
- url="http://pythiasix.hepforge.org/examples/{0}".format(example),
+ url="https://pythia.org/download/pythia6/{0}".format(example),
sha256=checksum,
expand=False,
destination="example",
@@ -106,9 +111,9 @@ class Pythia6(CMakePackage):
# Docs.
docs = {
- "http://www.hepforge.org/archive/pythiasix/update_notes-6.4.28.txt": "a229be4ba9a4eb65a9d53600a5f388b620038d56694c6cb4671c2be224b67751",
- "http://home.thep.lu.se/~torbjorn/pythia6/lutp0613man2.pdf": "03d637310ea80f0d7aea761492bd38452c602890d8cf913a1ec9edacd79fa43d",
- "https://pythiasix.hepforge.org/pythia6-announcement.txt": "2a52def41f0c93e32e0db58dbcf072b987ebfbd32e42ccfc1f9382fcf65f1271",
+ "https://pythia.org/download/pythia6/pythia6428.update": "a229be4ba9a4eb65a9d53600a5f388b620038d56694c6cb4671c2be224b67751",
+ "https://pythia.org/download/pythia6/lutp0613man2.pdf": "03d637310ea80f0d7aea761492bd38452c602890d8cf913a1ec9edacd79fa43d",
+ "https://pythia.org/download/misc/pythia6plans.txt": "1befc8c6e641051a97a53ba4df7f890bf0c4d6ba9e0774c03df69b0fef481d89",
}
for docurl, checksum in docs.items():
@@ -133,9 +138,7 @@ class Pythia6(CMakePackage):
# Use our provided CMakeLists.txt. The Makefile provided with
# the source is GCC (gfortran) specific, and would have required
# additional patching for the +root variant.
- llnl.util.filesystem.copy(
- os.path.join(os.path.dirname(__file__), "CMakeLists.txt"), self.stage.source_path
- )
+ copy(os.path.join(os.path.dirname(__file__), "CMakeLists.txt"), self.stage.source_path)
# Apply the variant value at the relevant place in the source.
filter_file(
r"^(\s+PARAMETER\s*\(\s*NMXHEP\s*=\s*)\d+",
diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py
index b1a69b0ecf..d70cc40d3f 100644
--- a/var/spack/repos/builtin/packages/pythia8/package.py
+++ b/var/spack/repos/builtin/packages/pythia8/package.py
@@ -12,7 +12,7 @@ class Pythia8(AutotoolsPackage):
the evolution from a few-body hard process to a complex multiparticle
final state."""
- homepage = "http://home.thep.lu.se/Pythia/"
+ homepage = "https://pythia.org/"
url = "https://pythia.org/download/pythia83/pythia8306.tgz"
list_url = "https://pythia.org/releases/"
@@ -22,6 +22,8 @@ class Pythia8(AutotoolsPackage):
license("GPL-2.0-only")
+ version("8.312", sha256="bad98e2967b687046c4568c9091d630a0c31b628745c021a994aba4d1d50f8ea")
+ version("8.311", sha256="2782d5e429c1543c67375afe547fd4c4ca0720309deb008f7db78626dc7d1464")
version("8.310", sha256="90c811abe7a3d2ffdbf9b4aeab51cf6e0a5a8befb4e3efa806f3d5b9c311e227")
version("8.309", sha256="5bdafd9f2c4a1c47fd8a4e82fb9f0d8fcfba4de1003b8e14be4e0347436d6c33")
version("8.308", sha256="c2e8c8d38136d85fc0bc9c9fad4c2db679b0819b7d2b6fc9a47f80f99538b4e3")
@@ -57,7 +59,18 @@ class Pythia8(AutotoolsPackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "cxxstd",
+ default="11",
+ values=("11", "17", "20", "23"),
+ multi=False,
+ description="Use the specified C++ standard when building",
+ )
+
variant("shared", default=True, description="Build shared library")
+ variant("gzip", default=False, description="Build with gzip support, for reading lhe.gz files")
variant(
"hepmc", default=True, description="Export PYTHIA events to the HEPMC format, version 2"
)
@@ -83,6 +96,7 @@ class Pythia8(AutotoolsPackage):
variant("mpich", default=False, description="Multi-threading support via MPICH")
variant("hdf5", default=False, description="Support the use of HDF5 format")
+ depends_on("zlib-api", when="+gzip")
depends_on("rsync", type="build")
depends_on("hepmc", when="+hepmc")
depends_on("hepmc3", when="+hepmc3")
@@ -115,6 +129,24 @@ class Pythia8(AutotoolsPackage):
conflicts("+hdf5", when="@:8.304", msg="HDF5 support was added in 8.304")
conflicts("+hdf5", when="~mpich", msg="MPICH is required for reading HDF5 files")
+ filter_compiler_wrappers("Makefile.inc", relative_root="share/Pythia8/examples")
+
+ @run_before("configure")
+ def setup_configure(self):
+ filter_file(
+ r"-std=c\+\+[0-9][0-9]", f"-std=c++{self.spec.variants['cxxstd'].value}", "configure"
+ )
+
+ # Fix for https://gitlab.com/Pythia8/releases/-/issues/428
+ with when("@:8.311"):
+ filter_file(
+ r"[/]examples[/]Makefile[.]inc\|;n' \\", "/examples/Makefile.inc|' \\", "configure"
+ )
+
+ # Fix for https://gitlab.com/Pythia8/releases/-/issues/523
+ with when("@8.307:8.312 cxxstd=20"):
+ patch("pythia8-cpp20-fjcore-forward-decl.patch")
+
def configure_args(self):
args = []
@@ -135,15 +167,11 @@ class Pythia8(AutotoolsPackage):
if "+madgraph5amc" in self.spec:
args.append("--with-mg5mes=" + self.spec["madgraph5amc"].prefix)
- else:
- args.append("--without-mg5mes")
args += self.with_or_without("hepmc3", activation_value="prefix")
if "+fastjet" in self.spec:
args.append("--with-fastjet3=" + self.spec["fastjet"].prefix)
- else:
- args.append("--without-fastjet3")
args += self.with_or_without("evtgen", activation_value="prefix")
args += self.with_or_without("root", activation_value="prefix")
@@ -159,6 +187,10 @@ class Pythia8(AutotoolsPackage):
if self.spec.satisfies("+hdf5"):
args.append("--with-highfive=" + self.spec["highfive"].prefix)
+ args += self.with_or_without(
+ "gzip", activation_value=lambda x: self.spec["zlib-api"].prefix
+ )
+
return args
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/pythia8/pythia8-cpp20-fjcore-forward-decl.patch b/var/spack/repos/builtin/packages/pythia8/pythia8-cpp20-fjcore-forward-decl.patch
new file mode 100644
index 0000000000..447e73cba5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pythia8/pythia8-cpp20-fjcore-forward-decl.patch
@@ -0,0 +1,37 @@
+diff --git a/src/FJcore.cc b/src/FJcore.cc
+index c60108e2..afd32eee 100644
+--- a/src/FJcore.cc
++++ b/src/FJcore.cc
+@@ -730,14 +730,10 @@ FJCORE_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
+ class ClosestPair2D : public ClosestPair2DBase {
+ public:
+ ClosestPair2D(const std::vector<Coord2D> & positions,
+- const Coord2D & left_corner, const Coord2D & right_corner) {
+- _initialize(positions, left_corner, right_corner, positions.size());
+- };
++ const Coord2D & left_corner, const Coord2D & right_corner);
+ ClosestPair2D(const std::vector<Coord2D> & positions,
+ const Coord2D & left_corner, const Coord2D & right_corner,
+- const unsigned int max_size) {
+- _initialize(positions, left_corner, right_corner, max_size);
+- };
++ const unsigned int max_size);
+ void closest_pair(unsigned int & ID1, unsigned int & ID2,
+ double & distance2) const;
+ void remove(unsigned int ID);
+@@ -808,6 +804,15 @@ public:
+ return coord.distance2(other.coord);
+ };
+ };
++inline ClosestPair2D::ClosestPair2D(const std::vector<Coord2D> & positions,
++ const Coord2D & left_corner, const Coord2D & right_corner) {
++ _initialize(positions, left_corner, right_corner, positions.size());
++};
++inline ClosestPair2D::ClosestPair2D(const std::vector<Coord2D> & positions,
++ const Coord2D & left_corner, const Coord2D & right_corner,
++ const unsigned int max_size) {
++ _initialize(positions, left_corner, right_corner, max_size);
++};
+ inline bool floor_ln2_less(unsigned x, unsigned y) {
+ if (x>y) return false;
+ return (x < (x^y)); // beware of operator precedence...
diff --git a/var/spack/repos/builtin/packages/python-venv/package.py b/var/spack/repos/builtin/packages/python-venv/package.py
new file mode 100644
index 0000000000..390b26c198
--- /dev/null
+++ b/var/spack/repos/builtin/packages/python-venv/package.py
@@ -0,0 +1,104 @@
+# Copyright 2013-2023 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 shutil
+
+import llnl.util.filesystem as fs
+
+from spack.package import *
+
+
+class PythonVenv(Package):
+ """A Spack managed Python virtual environment"""
+
+ homepage = "https://docs.python.org/3/library/venv.html"
+ has_code = False
+
+ maintainers("haampie")
+
+ version("1.0")
+
+ extends("python")
+
+ def install(self, spec, prefix):
+ # Create a virtual environment
+ python("-m", "venv", "--without-pip", prefix)
+
+ def add_files_to_view(self, view, merge_map: Dict[str, str], skip_if_exists=True):
+ for src, dst in merge_map.items():
+ if skip_if_exists and os.path.lexists(dst):
+ continue
+
+ name = os.path.basename(dst)
+
+ # Replace the VIRTUAL_ENV variable in the activate scripts after copying
+ if name.lower().startswith("activate"):
+ shutil.copy(src, dst)
+ fs.filter_file(
+ self.spec.prefix,
+ os.path.abspath(view.get_projection_for_spec(self.spec)),
+ dst,
+ string=True,
+ )
+ else:
+ view.link(src, dst)
+
+ @property
+ def bindir(self):
+ windows = self.spec.satisfies("platform=windows")
+ return join_path(self.prefix, "Scripts" if windows else "bin")
+
+ @property
+ def command(self):
+ """Returns a python Executable instance"""
+ python_name = "python" if self.spec.satisfies("platform=windows") else "python3"
+ return which(python_name, path=self.bindir)
+
+ def _get_path(self, name) -> str:
+ return self.command(
+ "-Ec", f"import sysconfig; print(sysconfig.get_path('{name}'))", output=str
+ ).strip()
+
+ @property
+ def platlib(self) -> str:
+ """Directory for site-specific, platform-specific files."""
+ relative_platlib = os.path.relpath(self._get_path("platlib"), self.prefix)
+ assert not relative_platlib.startswith("..")
+ return relative_platlib
+
+ @property
+ def purelib(self) -> str:
+ """Directory for site-specific, non-platform-specific files."""
+ relative_purelib = os.path.relpath(self._get_path("purelib"), self.prefix)
+ assert not relative_purelib.startswith("..")
+ return relative_purelib
+
+ @property
+ def headers(self):
+ return HeaderList([])
+
+ @property
+ def libs(self):
+ return LibraryList([])
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ """Set PYTHONPATH to include the site-packages directory for the
+ extension and any other python extensions it depends on."""
+ # Packages may be installed in platform-specific or platform-independent site-packages
+ # directories
+ for directory in {self.platlib, self.purelib}:
+ path = os.path.join(dependent_spec.prefix, directory)
+ if os.path.isdir(path):
+ env.prepend_path("PYTHONPATH", path)
+ dep_bin_dir = getattr(dependent_spec.package, "bindir", None)
+ if dep_bin_dir and os.path.isdir(dep_bin_dir):
+ env.prepend_path("PATH", dep_bin_dir)
+
+ def setup_dependent_package(self, module, dependent_spec):
+ """Called before python modules' install() methods."""
+ module.python = self.command
+ module.python_platlib = join_path(dependent_spec.prefix, self.platlib)
+ module.python_purelib = join_path(dependent_spec.prefix, self.purelib)
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 56fd57f068..841b94b54c 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -14,15 +14,33 @@ from shutil import copy
from typing import Dict, List
import llnl.util.tty as tty
-from llnl.util.filesystem import is_nonsymlink_exe_with_shebang, path_contains_subdirectory
from llnl.util.lang import dedupe
+import spack.paths
from spack.build_environment import dso_suffix, stat_suffix
from spack.package import *
-from spack.util.environment import is_system_path
from spack.util.prefix import Prefix
+def make_pyvenv_cfg(python_spec: Spec, venv_prefix: str) -> str:
+ """Make a pyvenv_cfg file for a given (real) python command and venv prefix."""
+ python_cmd = python_spec.command.path
+ lines = [
+ # directory containing python command
+ f"home = {os.path.dirname(python_cmd)}",
+ # venv should not allow site packages from the real python to be loaded
+ "include-system-site-packages = false",
+ # version of the python command
+ f"version = {python_spec.version}",
+ # the path to the python command
+ f"executable = {python_cmd}",
+ # command "used" to create the pyvenv.cfg
+ f"command = {python_cmd} -m venv --without-pip {venv_prefix}",
+ ]
+
+ return "\n".join(lines) + "\n"
+
+
class Python(Package):
"""The Python programming language."""
@@ -32,7 +50,7 @@ class Python(Package):
list_depth = 1
tags = ["windows"]
- maintainers("adamjstewart", "skosukhin", "scheibelp")
+ maintainers("skosukhin", "scheibelp")
phases = ["configure", "build", "install"]
@@ -42,18 +60,24 @@ class Python(Package):
license("0BSD")
+ version("3.13.0", sha256="12445c7b3db3126c41190bfdc1c8239c39c719404e844babbd015a1bc3fafcd4")
+ version("3.12.5", sha256="38dc4e2c261d49c661196066edbfb70fdb16be4a79cc8220c224dfeb5636d405")
+ version("3.12.4", sha256="01b3c1c082196f3b33168d344a9c85fb07bfe0e7ecfe77fee4443420d1ce2ad9")
+ version("3.12.3", sha256="a6b9459f45a6ebbbc1af44f5762623fa355a0c87208ed417628b379d762dddb0")
+ version("3.12.2", sha256="a7c4f6a9dc423d8c328003254ab0c9338b83037bd787d680826a5bf84308116e")
+ version("3.12.1", sha256="d01ec6a33bc10009b09c17da95cc2759af5a580a7316b3a446eb4190e13f97b2")
version("3.12.0", sha256="51412956d24a1ef7c97f1cb5f70e185c13e3de1f50d131c0aac6338080687afb")
- version(
- "3.11.6",
- sha256="c049bf317e877cbf9fce8c3af902436774ecef5249a29d10984ca3a37f7f4736",
- preferred=True,
- )
+ version("3.11.9", sha256="e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d")
+ version("3.11.8", sha256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889")
+ version("3.11.7", sha256="068c05f82262e57641bd93458dfa883128858f5f4997aad7a36fd25b13b29209")
+ version("3.11.6", sha256="c049bf317e877cbf9fce8c3af902436774ecef5249a29d10984ca3a37f7f4736")
version("3.11.5", sha256="a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58")
version("3.11.4", sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63")
version("3.11.3", sha256="1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048")
version("3.11.2", sha256="2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849")
version("3.11.1", sha256="baed518e26b337d4d8105679caf68c5c32630d702614fc174e98cb95c46bdfa4")
version("3.11.0", sha256="64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb")
+ version("3.10.14", sha256="cefea32d3be89c02436711c95a45c7f8e880105514b78680c14fe76f5709a0f6")
version("3.10.13", sha256="698ec55234c1363bd813b460ed53b0f108877c7a133d48bde9a50a1eb57b7e65")
version("3.10.12", sha256="a43cd383f3999a6f4a7db2062b2fc9594fefa73e175b3aedafa295a51a7bb65c")
version("3.10.11", sha256="f3db31b668efa983508bd67b5712898aa4247899a346f2eb745734699ccd3859")
@@ -68,6 +92,7 @@ class Python(Package):
version("3.10.2", sha256="3c0ede893011319f9b0a56b44953a3d52c7abf9657c23fb4bc9ced93b86e9c97")
version("3.10.1", sha256="b76117670e7c5064344b9c138e141a377e686b9063f3a8a620ff674fa8ec90d3")
version("3.10.0", sha256="c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758")
+ version("3.9.19", sha256="f5f9ec8088abca9e399c3b62fd8ef31dbd2e1472c0ccb35070d4d136821aaf71")
version("3.9.18", sha256="504ce8cfd59addc04c22f590377c6be454ae7406cb1ebf6f5a350149225a9354")
version("3.9.17", sha256="8ead58f669f7e19d777c3556b62fae29a81d7f06a7122ff9bc57f7dd82d7e014")
version("3.9.16", sha256="1ad539e9dbd2b42df714b69726e0693bc6b9d2d2c8e91c2e43204026605140c5")
@@ -87,6 +112,7 @@ class Python(Package):
version("3.9.2", sha256="7899e8a6f7946748830d66739f2d8f2b30214dad956e56b9ba216b3de5581519")
version("3.9.1", sha256="29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117")
version("3.9.0", sha256="df796b2dc8ef085edae2597a41c1c0a63625ebd92487adaef2fed22b567873e8")
+ version("3.8.19", sha256="c7fa55a36e5c7a19ec37d8f90f60a2197548908c9ac8b31e7c0dbffdd470eeac")
version("3.8.18", sha256="7c5df68bab1be81a52dea0cc2e2705ea00553b67107a301188383d7b57320b16")
version("3.8.17", sha256="def428fa6cf61b66bcde72e3d9f7d07d33b2e4226f04f9d6fce8384c055113ae")
version("3.8.16", sha256="71ca9d935637ed2feb59e90a368361dc91eca472a90acb1d344a2e8178ccaf10")
@@ -106,96 +132,16 @@ class Python(Package):
version("3.8.2", sha256="e634a7a74776c2b89516b2e013dda1728c89c8149b9863b8cea21946daf9d561")
version("3.8.1", sha256="c7cfa39a43b994621b245e029769e9126caa2a93571cee2e743b213cceac35fb")
version("3.8.0", sha256="f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df")
- version(
- "3.7.17",
- sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49",
- deprecated=True,
- )
- version(
- "3.7.16",
- sha256="0cf2da07fa464636755215415909e22eb1d058817af4824bc15af8390d05fb38",
- deprecated=True,
- )
- version(
- "3.7.15",
- sha256="cf2993798ae8430f3af3a00d96d9fdf320719f4042f039380dca79967c25e436",
- deprecated=True,
- )
- version(
- "3.7.14",
- sha256="82b2abf8978caa61a9011d166eede831b32de9cbebc0db8162900fa23437b709",
- deprecated=True,
- )
- version(
- "3.7.13",
- sha256="e405417f50984bc5870c7e7a9f9aeb93e9d270f5ac67f667a0cd3a09439682b5",
- deprecated=True,
- )
- version(
- "3.7.12",
- sha256="33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46",
- deprecated=True,
- )
- version(
- "3.7.11",
- sha256="b4fba32182e16485d0a6022ba83c9251e6a1c14676ec243a9a07d3722cd4661a",
- deprecated=True,
- )
- version(
- "3.7.10",
- sha256="c9649ad84dc3a434c8637df6963100b2e5608697f9ba56d82e3809e4148e0975",
- deprecated=True,
- )
- version(
- "3.7.9",
- sha256="39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a",
- deprecated=True,
- )
- version(
- "3.7.8",
- sha256="0e25835614dc221e3ecea5831b38fa90788b5389b99b675a751414c858789ab0",
- deprecated=True,
- )
- version(
- "3.7.7",
- sha256="8c8be91cd2648a1a0c251f04ea0bb4c2a5570feb9c45eaaa2241c785585b475a",
- deprecated=True,
- )
- version(
- "3.7.6",
- sha256="aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114",
- deprecated=True,
- )
- version(
- "3.7.5",
- sha256="8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da",
- deprecated=True,
- )
- version(
- "3.7.4",
- sha256="d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3",
- deprecated=True,
- )
- version(
- "3.7.3",
- sha256="d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff",
- deprecated=True,
- )
- version(
- "3.7.2",
- sha256="f09d83c773b9cc72421abba2c317e4e6e05d919f9bcf34468e192b6a6c8e328d",
- deprecated=True,
- )
- version(
- "3.7.1",
- sha256="36c1b81ac29d0f8341f727ef40864d99d8206897be96be73dc34d4739c9c9f06",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version(
+ "3.7.17", sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49"
+ )
+ version(
+ "3.6.15", sha256="54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
extendable = True
@@ -225,7 +171,6 @@ class Python(Package):
variant("ssl", default=True, description="Build ssl module")
variant("sqlite3", default=True, description="Build sqlite3 module")
variant("dbm", default=True, description="Build dbm module")
- variant("nis", default=False, description="Build nis module")
variant("zlib", default=True, description="Build zlib module")
variant("bz2", default=True, description="Build bz2 module")
variant("lzma", default=True, description="Build lzma module")
@@ -236,7 +181,6 @@ class Python(Package):
variant("tix", default=False, description="Build Tix module", when="+tkinter")
variant("crypt", default=True, description="Build crypt module", when="@:3.12 platform=linux")
variant("crypt", default=True, description="Build crypt module", when="@:3.12 platform=darwin")
- variant("crypt", default=True, description="Build crypt module", when="@:3.12 platform=cray")
if sys.platform != "win32":
depends_on("gmake", type="build")
@@ -257,7 +201,6 @@ class Python(Package):
# https://docs.python.org/3.10/whatsnew/3.10.html#build-changes
depends_on("sqlite@3.7.15:", when="@3.10:+sqlite3")
depends_on("gdbm", when="+dbm") # alternatively ndbm or berkeley-db
- depends_on("libnsl", when="+nis")
depends_on("zlib-api", when="+zlib")
depends_on("bzip2", when="+bz2")
depends_on("xz libs=shared", when="+lzma")
@@ -272,6 +215,11 @@ class Python(Package):
depends_on("tix", when="+tix")
depends_on("libxcrypt", when="+crypt")
+ patch(
+ "https://bugs.python.org/file44413/alignment.patch",
+ when="@3.6",
+ sha256="d39bacde16128f380933992ea7f237ac8f70f9cdffb40c051aca3be46dc29bdf",
+ )
# Python needs to be patched to build extensions w/ mixed C/C++ code:
# https://github.com/NixOS/nixpkgs/pull/19585/files
# https://bugs.python.org/issue1222585
@@ -359,7 +307,6 @@ class Python(Package):
"readline",
"sqlite3",
"dbm",
- "nis",
"zlib",
"bz2",
"lzma",
@@ -420,6 +367,29 @@ class Python(Package):
r"^(.*)setup\.py(.*)((build)|(install))(.*)$", r"\1setup.py\2 --no-user-cfg \3\6"
)
+ # disable building the nis module (there is no flag to disable it).
+ if self.spec.satisfies("@3.8:3.10"):
+ filter_file(
+ "if MS_WINDOWS or CYGWIN or HOST_PLATFORM == 'qnx6':",
+ "if True:",
+ "setup.py",
+ string=True,
+ )
+ elif self.spec.satisfies("@3.7"):
+ filter_file(
+ "if host_platform in {'win32', 'cygwin', 'qnx6'}:",
+ "if True:",
+ "setup.py",
+ string=True,
+ )
+ elif self.spec.satisfies("@3.6"):
+ filter_file(
+ "if (host_platform not in ['cygwin', 'qnx6'] and",
+ "if False and",
+ "setup.py",
+ string=True,
+ )
+
def setup_build_environment(self, env):
spec = self.spec
@@ -542,7 +512,8 @@ class Python(Package):
copy(lib, prefix)
else:
copy(lib, prefix.DLLs)
- static_libraries = glob.glob("%s\\*.lib")
+ static_libraries = glob.glob("%s\\*.lib" % build_root)
+ os.makedirs(prefix.libs, exist_ok=True)
for lib in static_libraries:
copy(lib, prefix.libs)
@@ -611,10 +582,11 @@ class Python(Package):
else:
config_args.append("--without-system-expat")
- if "+ctypes" in spec:
- config_args.append("--with-system-ffi")
- else:
- config_args.append("--without-system-ffi")
+ if self.version < Version("3.12.0"):
+ if "+ctypes" in spec:
+ config_args.append("--with-system-ffi")
+ else:
+ config_args.append("--without-system-ffi")
if "+tkinter" in spec:
config_args.extend(
@@ -628,6 +600,11 @@ class Python(Package):
]
)
+ # Disable the nis module in the configure script for Python 3.11 and 3.12. It is deleted
+ # in Python 3.13. See ``def patch`` for disabling the nis module in Python 3.10 and older.
+ if spec.satisfies("@3.11:3.12"):
+ config_args.append("py_cv_module_nis=n/a")
+
# https://docs.python.org/3.8/library/sqlite3.html#f1
if spec.satisfies("+sqlite3 ^sqlite+dynamic_extensions"):
config_args.append("--enable-loadable-sqlite-extensions")
@@ -638,6 +615,9 @@ class Python(Package):
if cflags:
config_args.append("CFLAGS={0}".format(" ".join(cflags)))
+ if self.version >= Version("3.12.0") and sys.platform == "darwin":
+ config_args.append("CURSES_LIBS={0}".format(spec["ncurses"].libs.link_flags))
+
return config_args
def configure(self, spec, prefix):
@@ -754,10 +734,6 @@ class Python(Package):
if "+dbm" in spec:
self.command("-c", "import dbm")
- # Ensure that nis module works
- if "+nis" in spec:
- self.command("-c", "import nis")
-
# Ensure that zlib module works
if "+zlib" in spec:
self.command("-c", "import zlib")
@@ -826,14 +802,14 @@ class Python(Package):
# * python
#
# in that order if using python@3.11.0, for example.
- version = self.spec.version
- for ver in [version.up_to(2), version.up_to(1), ""]:
- if sys.platform != "win32":
- path = os.path.join(self.prefix.bin, "python{0}".format(ver))
- else:
- path = os.path.join(self.prefix, "python{0}.exe".format(ver))
- if os.path.exists(path):
- return Executable(path)
+ suffixes = [self.spec.version.up_to(2), self.spec.version.up_to(1), ""]
+ file_extension = "" if sys.platform != "win32" else ".exe"
+ patterns = [f"python{ver}{file_extension}" for ver in suffixes]
+ root = self.prefix.bin if sys.platform != "win32" else self.prefix
+ path = find_first(root, files=patterns)
+
+ if path is not None:
+ return Executable(path)
else:
# Give a last try at rhel8 platform python
@@ -842,8 +818,9 @@ class Python(Package):
if os.path.exists(path):
return Executable(path)
- msg = "Unable to locate {0} command in {1}"
- raise RuntimeError(msg.format(self.name, self.prefix.bin))
+ raise RuntimeError(
+ f"cannot to locate the '{self.name}' command in {root} or its subdirectories"
+ )
@property
def config_vars(self):
@@ -992,8 +969,13 @@ print(json.dumps(config))
win_root_dir,
]
- # The Python shipped with Xcode command line tools isn't in any of these locations
- for subdir in ["lib", "lib64"]:
+ if self.spec.satisfies("platform=windows"):
+ lib_dirs = ["libs"]
+ else:
+ # The Python shipped with Xcode command line tools isn't in any of these locations
+ lib_dirs = ["lib", "lib64"]
+
+ for subdir in lib_dirs:
directories.append(os.path.join(self.config_vars["base"], subdir))
directories = dedupe(directories)
@@ -1036,19 +1018,21 @@ print(json.dumps(config))
# The +shared variant isn't reliable, as `spack external find` currently can't
# detect it. If +shared, prefer the shared libraries, but check for static if
# those aren't found. Vice versa for ~shared.
- if "+shared" in self.spec:
+ if self.spec.satisfies("platform=windows"):
+ # Since we are searching for link libraries, on Windows search only for
+ # ".Lib" extensions by default as those represent import libraries for implict links.
+ candidates = static_libs
+ elif self.spec.satisfies("+shared"):
candidates = shared_libs + static_libs
else:
candidates = static_libs + shared_libs
- candidates = dedupe(candidates)
-
- for candidate in candidates:
+ for candidate in dedupe(candidates):
lib = self.find_library(candidate)
if lib:
return lib
- raise spack.error.NoLibrariesError(
+ raise NoLibrariesError(
"Unable to find {} libraries with the following names:\n\n* ".format(self.name)
+ "\n* ".join(candidates)
)
@@ -1074,7 +1058,7 @@ print(json.dumps(config))
config_h = headers[0]
break
else:
- raise spack.error.NoHeadersError(
+ raise NoHeadersError(
"Unable to locate {} headers in any of these locations:\n\n* ".format(self.name)
+ "\n* ".join(candidates)
)
@@ -1111,7 +1095,7 @@ print(json.dumps(config))
path = self.config_vars["platlib"]
if path.startswith(prefix):
return path.replace(prefix, "")
- return os.path.join("lib64", "python{}".format(self.version.up_to(2)), "site-packages")
+ return os.path.join("lib64", f"python{self.version.up_to(2)}", "site-packages")
@property
def purelib(self):
@@ -1131,7 +1115,7 @@ print(json.dumps(config))
path = self.config_vars["purelib"]
if path.startswith(prefix):
return path.replace(prefix, "")
- return os.path.join("lib", "python{}".format(self.version.up_to(2)), "site-packages")
+ return os.path.join("lib", f"python{self.version.up_to(2)}", "site-packages")
@property
def include(self):
@@ -1159,34 +1143,6 @@ print(json.dumps(config))
"""Set PYTHONPATH to include the site-packages directory for the
extension and any other python extensions it depends on.
"""
- # Ensure the current Python is first in the PATH
- path = os.path.dirname(self.command.path)
- if not is_system_path(path):
- env.prepend_path("PATH", path)
-
- # Add installation prefix to PYTHONPATH, needed to run import tests
- prefixes = set()
- if dependent_spec.package.extends(self.spec):
- prefixes.add(dependent_spec.prefix)
-
- # Add direct build/run/test dependencies to PYTHONPATH,
- # needed to build the package and to run import tests
- for direct_dep in dependent_spec.dependencies(deptype=("build", "run", "test")):
- if direct_dep.package.extends(self.spec):
- prefixes.add(direct_dep.prefix)
-
- # Add recursive run dependencies of all direct dependencies,
- # needed by direct dependencies at run-time
- for indirect_dep in direct_dep.traverse(deptype="run"):
- if indirect_dep.package.extends(self.spec):
- prefixes.add(indirect_dep.prefix)
-
- for prefix in prefixes:
- # Packages may be installed in platform-specific or platform-independent
- # site-packages directories
- for directory in {self.platlib, self.purelib}:
- env.prepend_path("PYTHONPATH", os.path.join(prefix, directory))
-
# 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
# operations are normally taken from the sysconfigdata file, which we
@@ -1232,9 +1188,7 @@ print(json.dumps(config))
# invoked directly (no change would be required in that case
# because Spack arranges for the Spack ld wrapper to be the
# first instance of "ld" in PATH).
- new_link = config_link.replace(
- " {0} ".format(config_compile), " {0} ".format(new_compile)
- )
+ new_link = config_link.replace(f" {config_compile} ", f" {new_compile} ")
# There is logic in the sysconfig module that is sensitive to the
# fact that LDSHARED is set in the environment, therefore we export
@@ -1247,58 +1201,49 @@ print(json.dumps(config))
"""Set PYTHONPATH to include the site-packages directory for the
extension and any other python extensions it depends on.
"""
- if dependent_spec.package.extends(self.spec):
- # Packages may be installed in platform-specific or platform-independent
- # site-packages directories
- for directory in {self.platlib, self.purelib}:
- env.prepend_path("PYTHONPATH", os.path.join(dependent_spec.prefix, directory))
+ if not dependent_spec.package.extends(self.spec) or dependent_spec.dependencies(
+ "python-venv"
+ ):
+ return
+
+ # Packages may be installed in platform-specific or platform-independent site-packages
+ # directories
+ for directory in {self.platlib, self.purelib}:
+ env.prepend_path("PYTHONPATH", os.path.join(dependent_spec.prefix, directory))
def setup_dependent_package(self, module, dependent_spec):
"""Called before python modules' install() methods."""
-
module.python = self.command
-
module.python_include = join_path(dependent_spec.prefix, self.include)
module.python_platlib = join_path(dependent_spec.prefix, self.platlib)
module.python_purelib = join_path(dependent_spec.prefix, self.purelib)
def add_files_to_view(self, view, merge_map, skip_if_exists=True):
- bin_dir = self.spec.prefix.bin if sys.platform != "win32" else self.spec.prefix
- for src, dst in merge_map.items():
- if not path_contains_subdirectory(src, bin_dir):
- view.link(src, dst, spec=self.spec)
- elif not os.path.islink(src):
- copy(src, dst)
- if is_nonsymlink_exe_with_shebang(src):
- filter_file(
- self.spec.prefix,
- os.path.abspath(view.get_projection_for_spec(self.spec)),
- dst,
- backup=False,
- )
- else:
- # orig_link_target = os.path.realpath(src) is insufficient when
- # the spack install tree is located at a symlink or a
- # descendent of a symlink. What we need here is the real
- # relative path from the python prefix to src
- # TODO: generalize this logic in the link_tree object
- # add a method to resolve a link relative to the link_tree
- # object root.
- realpath_src = os.path.realpath(src)
- realpath_prefix = os.path.realpath(self.spec.prefix)
- realpath_rel = os.path.relpath(realpath_src, realpath_prefix)
- orig_link_target = os.path.join(self.spec.prefix, realpath_rel)
-
- new_link_target = os.path.abspath(merge_map[orig_link_target])
- view.link(new_link_target, dst, spec=self.spec)
-
- def remove_files_from_view(self, view, merge_map):
- bin_dir = self.spec.prefix.bin if sys.platform != "win32" else self.spec.prefix
- for src, dst in merge_map.items():
- if not path_contains_subdirectory(src, bin_dir):
- view.remove_file(src, dst)
- else:
- os.remove(dst)
+ """Make the view a virtual environment if it isn't one already.
+
+ If `python-venv` is linked into the view, it will already be a virtual
+ environment. If not, then this is an older python that doesn't use the
+ python-venv support, or we may be using python packages that
+ use ``depends_on("python")`` but not ``extends("python")``.
+
+ We used to copy the python interpreter in, but we can get the same effect in a
+ simpler way by adding a ``pyvenv.cfg`` to the environment.
+
+ """
+ super().add_files_to_view(view, merge_map, skip_if_exists=skip_if_exists)
+
+ # location of python inside the view, where we will put the venv config
+ projection = view.get_projection_for_spec(self.spec)
+ pyvenv_cfg = os.path.join(projection, "pyvenv.cfg")
+ if os.path.lexists(pyvenv_cfg):
+ return
+
+ # don't put a pyvenv.cfg in a copy view
+ if view.link_type == "copy":
+ return
+
+ with open(pyvenv_cfg, "w") as cfg_file:
+ cfg_file.write(make_pyvenv_cfg(self.spec["python"], projection))
def test_hello_world(self):
"""run simple hello world program"""
diff --git a/var/spack/repos/builtin/packages/q-e-sirius/package.py b/var/spack/repos/builtin/packages/q-e-sirius/package.py
index 3aee3e101b..93ac1cccce 100644
--- a/var/spack/repos/builtin/packages/q-e-sirius/package.py
+++ b/var/spack/repos/builtin/packages/q-e-sirius/package.py
@@ -27,7 +27,10 @@ class QESirius(CMakePackage):
submodules=True,
)
- variant("mpi", default=True, description="Builds with MPI support")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Enables OpenMP support")
variant("libxc", default=False, description="Support functionals through libxc")
variant("sirius_apps", default=False, description="Build SIRIUS standalone binaries")
@@ -47,7 +50,7 @@ class QESirius(CMakePackage):
depends_on("sirius +openmp", when="+openmp")
depends_on("sirius@develop", when="@develop-ristretto")
- depends_on("mpi", when="+mpi")
+ depends_on("mpi")
depends_on("elpa", when="+elpa")
depends_on("libxc", when="+libxc")
depends_on("fftw-api@3")
@@ -56,12 +59,7 @@ class QESirius(CMakePackage):
depends_on("git", type="build")
depends_on("pkgconfig", type="build")
- conflicts("~mpi", when="+scalapack", msg="SCALAPACK requires MPI support")
- conflicts("~scalapack", when="+elpa", msg="ELPA requires SCALAPACK support")
-
- with when("+mpi"):
- depends_on("mpi")
- variant("scalapack", default=True, description="Enables scalapack support")
+ variant("scalapack", default=True, description="Enables scalapack support")
with when("+scalapack"):
depends_on("scalapack")
@@ -72,9 +70,9 @@ class QESirius(CMakePackage):
depends_on("hdf5@1.8.16:+fortran+hl~mpi", when="hdf5=serial")
with when("+openmp"):
- depends_on("fftw+openmp", when="^fftw")
- depends_on("openblas threads=openmp", when="^openblas")
- depends_on("intel-mkl threads=openmp", when="^intel-mkl")
+ depends_on("fftw+openmp", when="^[virtuals=fftw-api] fftw")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
+ depends_on("intel-mkl threads=openmp", when="^[virtuals=blas] intel-mkl")
def cmake_args(self):
args = [
@@ -82,7 +80,7 @@ class QESirius(CMakePackage):
"-DQE_ENABLE_CUDA=OFF",
"-DQE_LAPACK_INTERNAL=OFF",
"-DQE_ENABLE_DOC=OFF",
- self.define_from_variant("QE_ENABLE_MPI", "mpi"),
+ "-DQE_ENABLE_MPI=ON",
self.define_from_variant("QE_ENABLE_OPENMP", "openmp"),
self.define_from_variant("QE_ENABLE_ELPA", "elpa"),
self.define_from_variant("QE_ENABLE_LIBXC", "libxc"),
diff --git a/var/spack/repos/builtin/packages/qb3/package.py b/var/spack/repos/builtin/packages/qb3/package.py
index 312ad238cd..522f32ad6d 100644
--- a/var/spack/repos/builtin/packages/qb3/package.py
+++ b/var/spack/repos/builtin/packages/qb3/package.py
@@ -16,5 +16,18 @@ class Qb3(CMakePackage):
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.5:", type="build")
depends_on("libicd")
+
+ @property
+ def libs(self):
+ # Override because libs have different case than Spack package name
+ name = "libQB3*"
+ # We expect libraries to be in either lib64 or lib directory
+ for root in (self.prefix.lib64, self.prefix.lib):
+ liblist = find_libraries(name, root=root, shared=True, recursive=False)
+ if liblist:
+ break
+ return liblist
diff --git a/var/spack/repos/builtin/packages/qca/package.py b/var/spack/repos/builtin/packages/qca/package.py
index 1313a3558b..30247fc324 100644
--- a/var/spack/repos/builtin/packages/qca/package.py
+++ b/var/spack/repos/builtin/packages/qca/package.py
@@ -28,6 +28,9 @@ class Qca(CMakePackage):
version("2.2.1", sha256="c67fc0fa8ae6cb3d0ba0fbd8fca8ee8e4c5061b99f1fd685fd7d9800cef17f6b")
version("2.1.3", sha256="a5135ffb0250a40e9c361eb10cd3fe28293f0cf4e5c69d3761481eafd7968067")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("qt@4.2:")
depends_on("qt@:5.10.0", when="@2.1.3")
diff --git a/var/spack/repos/builtin/packages/qcachegrind/package.py b/var/spack/repos/builtin/packages/qcachegrind/package.py
index 5328f8dc2f..68bb80a8df 100644
--- a/var/spack/repos/builtin/packages/qcachegrind/package.py
+++ b/var/spack/repos/builtin/packages/qcachegrind/package.py
@@ -22,6 +22,8 @@ class Qcachegrind(QMakePackage):
version("20.12.2", sha256="935cf6665fac274f84af84d0a30cc2fdf27d437234b9accbf8ec0a5dba6ad867")
version("20.08.0", sha256="ffb50a7c536042ff11eed714b359b8bc419cb12402a31ebe78c3d06363f234e6")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt@5.2:")
depends_on("graphviz", type="run")
diff --git a/var/spack/repos/builtin/packages/qcat/package.py b/var/spack/repos/builtin/packages/qcat/package.py
index a6ebd8ae4b..5ccaf8d409 100644
--- a/var/spack/repos/builtin/packages/qcat/package.py
+++ b/var/spack/repos/builtin/packages/qcat/package.py
@@ -19,6 +19,8 @@ class Qcat(CMakePackage):
version("master", branch="master")
version("1.4", commit="f16032cf237837b1d32dde0c3daa6ad1ca4a912f")
+ depends_on("c", type="build") # generated
+
depends_on("zstd")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/qctool/package.py b/var/spack/repos/builtin/packages/qctool/package.py
new file mode 100644
index 0000000000..51f66823e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qctool/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Qctool(WafPackage):
+ """QCTOOL is a command-line utility program for manipulation and quality
+ control of gwas datasets and other genome-wide data. This repository contains
+ the source code for QCTOOL and a number of other command-line programs that
+ manipulate gwas datasets and other genomic data, such as: Inthinnerator,
+ HPTEST, and LDBIRD."""
+
+ homepage = "https://www.chg.ox.ac.uk/~gav/qctool_v2/index.html"
+
+ license("BSL-1.0")
+
+ version(
+ "2.2.0",
+ sha256="7ba47998a2559193483cebe3710ce14d4e5d55d2e123840b4d1614b88459a9fc",
+ url="https://enkre.net/cgi-bin/code/qctool/tarball/86639c1ad4/qctool-86639c1ad4.tar.gz",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # Required external libraries as detailed in Prerequisites:
+ # https://enkre.net/cgi-bin/code/qctool/wiki?name=Compiling+QCTOOL
+ depends_on("zlib")
diff --git a/var/spack/repos/builtin/packages/qd/package.py b/var/spack/repos/builtin/packages/qd/package.py
index aaa6fd1b34..452ca12d1d 100644
--- a/var/spack/repos/builtin/packages/qd/package.py
+++ b/var/spack/repos/builtin/packages/qd/package.py
@@ -13,12 +13,19 @@ class Qd(AutotoolsPackage):
homepage = "https://bitbucket.org/njet/qd-library/src/master/"
git = "https://bitbucket.org/njet/qd-library.git"
+ url = "https://www.davidhbailey.com/dhbsoftware/qd-2.3.13.tar.gz"
tags = ["hep"]
license("BSD-3-Clause-LBNL")
-
- version("2.3.13", commit="a57dde96b3255b80f7f39cd80217c213bf78d949")
+ version("2.3.24", sha256="a47b6c73f86e6421e86a883568dd08e299b20e36c11a99bdfbe50e01bde60e38")
+ version("2.3.23", sha256="b3eaf41ce413ec08f348ee73e606bd3ff9203e411c377c3c0467f89acf69ee26")
+ # The sha256 for 2.3.23 and 2.3.13 are identical as they are the same content
+ version("2.3.13", sha256="b3eaf41ce413ec08f348ee73e606bd3ff9203e411c377c3c0467f89acf69ee26")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/qemu/package.py b/var/spack/repos/builtin/packages/qemu/package.py
index e5fdd5fd10..8ac1e92bf7 100644
--- a/var/spack/repos/builtin/packages/qemu/package.py
+++ b/var/spack/repos/builtin/packages/qemu/package.py
@@ -18,6 +18,7 @@ class Qemu(AutotoolsPackage):
# Docs say TCG is "under a BSD license" but all the headers for TCG have the MIT license.
license("GPL-2.0-only AND LGPL-2.1-only AND MIT", checked_by="tgamblin")
+ version("9.1.0", sha256="816b7022a8ba7c2ac30e2e0cf973e826f6bcc8505339603212c5ede8e94d7834")
version("4.1.1", sha256="ed6fdbbdd272611446ff8036991e9b9f04a2ab2e3ffa9e79f3bab0eb9a95a1d2")
version("4.1.0", sha256="656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6")
version("4.0.1", sha256="f2674dd6053ef1d48593aa1f0a50c5ac9039f7a059ecb6f9b8307f3fb2fcedad")
@@ -104,6 +105,61 @@ class Qemu(AutotoolsPackage):
version("0.10.0", sha256="cd554729fa9d0ec17164afbc1cea62d02bde3db8e16db3fd1b8e71d8e1b3dd41")
version("0.9.1", sha256="a9655a471d0649f5540b890447b35849c162d9b986bf2bbddcb68461748e0f42")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("pkgconfig", type="build")
+ depends_on("py-tomli", when="@9:", type="build")
+ depends_on("meson@1.1.0:", when="@9:", type="build")
+
+ depends_on("bison", when="@9:")
+ depends_on("bzip2", when="@9:")
+ depends_on("capstone", when="@9:")
+ depends_on("dtc", when="@9:")
+ depends_on("flex", when="@9:")
depends_on("glib@2.40:")
+ depends_on("gnutls", when="@9:")
+ depends_on("libslirp", when="@9:")
+ depends_on("libssh", when="@9:")
+ depends_on("libusb", when="@9:")
+ depends_on("lzo", when="@9:")
+ depends_on("ncurses", when="@9:")
+ depends_on("nettle", when="@9:")
depends_on("pixman@0.21.8:")
- depends_on("pkgconfig", type="build")
+ depends_on("snappy", when="@9:")
+ depends_on("vde", when="@9:")
+ depends_on("zlib", when="@9:")
+ depends_on("zstd", when="@9:")
+
+ # linux deps not needed on darwin
+ depends_on("elfutils", when="@9: platform=linux")
+ depends_on("libcap-ng", when="@9: platform=linux")
+
+ build_directory = "build"
+
+ @when("@9:")
+ def configure_args(self):
+ args = [
+ "--disable-bsd-user",
+ "--disable-guest-agent",
+ "--disable-sdl",
+ "--disable-bsd-user",
+ "--disable-guest-agent",
+ "--enable-slirp",
+ "--enable-capstone",
+ "--enable-curses",
+ "--enable-fdt=system",
+ "--enable-libssh",
+ "--enable-vde",
+ "--enable-virtfs",
+ "--enable-zstd",
+ "--disable-docs",
+ ]
+ extra_cflags = "-Wno-unknown-warning-option"
+ if self.spec.satisfies("%apple-clang platform=darwin"):
+ # qemu 9: uses pthread_jit_write_protect_np which requires OSX 11.0 or newer
+ extra_cflags += " -mmacosx-version-min=11.0"
+ args.append(f"--extra-cflags={extra_cflags}")
+ args.append(f"--extra-cxxflags={extra_cflags}")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py
index 7ea73f28fe..83d1242357 100644
--- a/var/spack/repos/builtin/packages/qgis/package.py
+++ b/var/spack/repos/builtin/packages/qgis/package.py
@@ -19,13 +19,17 @@ class Qgis(CMakePackage):
license("GPL-2.0-or-later")
- version("3.34.0", sha256="348a2df4c4520813a319b7f72546b3823e044cacd28646ba189b56a49c7d1b5f")
- # Prefer latest long term release
+ # TODO version 3.36 isn't building right now.
+ version("3.36.0", sha256="1b64bc92660bf07edc6b6478fc6a13656149e87d92eabe5c3db9493072506e2c")
+ # Prefer latest LTR
version(
- "3.28.12",
- sha256="d6d0ea39ed3433d553f8b83324dc14cfa90f8caaf766fa484791df9169800f25",
+ "3.34.4",
+ sha256="7d1c5fafff13f508a9bcf6244c9666f891351deb1ace2aedcc63504f070c5ce4",
preferred=True,
)
+ version("3.34.0", sha256="348a2df4c4520813a319b7f72546b3823e044cacd28646ba189b56a49c7d1b5f")
+ version("3.28.15", sha256="217342ba2232cc8fe5bf8f3671c2b3d6daf5504c33006b67424373e70d568dfa")
+ version("3.28.12", sha256="d6d0ea39ed3433d553f8b83324dc14cfa90f8caaf766fa484791df9169800f25")
version("3.28.11", sha256="c5eb703893c7f98de051c45d677c4a34b40f986db51782a4930ddefad4e193b4")
version("3.28.10", sha256="cff867e97909bbc2facce6343770dcb1b61fc6e4855f57783e30bf63d51c5218")
version("3.28.3", sha256="a09124f46465a520f6d735306ba3954c339b84aa396d6f52b476b82edcc4fe0e")
@@ -56,6 +60,9 @@ class Qgis(CMakePackage):
version("3.4.15", sha256="81c93b72adbea41bd765294c0cdb09476a632d8b3f90101abc409ca9ea7fb04d")
version("3.4.14", sha256="e138716c7ea84011d3b28fb9c75e6a79322fb66f532246393571906a595d7261")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("3d", default=False, description="Build QGIS 3D library")
variant("analysis", default=True, description="Build QGIS analysis library")
variant("apidoc", default=False, description="Build QGIS API doxygen documentation")
@@ -82,7 +89,7 @@ class Qgis(CMakePackage):
)
variant("oauth2_plugin", default=True, description="Build OAuth2 authentication method plugin")
variant("oracle", default=False, description="Build with Oracle support")
- # variant("pdal", default=False, description="Build with PDAL support") #TODO
+ variant("pdal", default=False, description="Build with PDAL support")
variant("postgresql", default=True, description="Build with PostreSQL support")
variant(
"py_compile",
@@ -135,10 +142,12 @@ class Qgis(CMakePackage):
depends_on("qt+dbus+location")
depends_on("qt+dbus+location@5.12.0:", when="@3.20:")
depends_on("qt+dbus+location@5.14.0:", when="@3.28:")
+ depends_on("qt+dbus+location@5.15.2:", when="@3.36:")
depends_on("qtkeychain@0.5:", when="@3:")
depends_on("qwt@5:")
depends_on("qwtpolar")
depends_on("sqlite@3.0.0: +column_metadata")
+ depends_on("pdal", when="+pdal")
depends_on("protobuf", when="@3.16.4:")
depends_on("protobuf@:3.21", when="@:3.28")
depends_on("zstd", when="@3.22:")
@@ -182,9 +191,7 @@ class Qgis(CMakePackage):
@run_before("cmake", when="^py-pyqt5")
def fix_pyqt5_cmake(self):
cmfile = FileFilter(join_path("cmake", "FindPyQt5.cmake"))
- pyqtpath = join_path(
- self.spec["py-pyqt5"].prefix, self.spec["python"].package.platlib, "PyQt5"
- )
+ pyqtpath = join_path(self.spec["py-pyqt5"].package.module.python_platlib, "PyQt5")
cmfile.filter(
'SET(PYQT5_MOD_DIR "${Python_SITEARCH}/PyQt5")',
'SET(PYQT5_MOD_DIR "' + pyqtpath + '")',
@@ -204,7 +211,7 @@ class Qgis(CMakePackage):
pyqtx = "PyQt6"
sip_inc_dir = join_path(
- self.spec["qscintilla"].prefix, self.spec["python"].package.platlib, pyqtx, "bindings"
+ self.spec["qscintilla"].package.module.python_platlib, pyqtx, "bindings"
)
with open(join_path("python", "gui", "pyproject.toml.in"), "a") as tomlfile:
tomlfile.write(f'\n[tool.sip.project]\nsip-include-dirs = ["{sip_inc_dir}"]\n')
diff --git a/var/spack/repos/builtin/packages/qgraf/package.py b/var/spack/repos/builtin/packages/qgraf/package.py
index 722d97b8fa..72b311a598 100644
--- a/var/spack/repos/builtin/packages/qgraf/package.py
+++ b/var/spack/repos/builtin/packages/qgraf/package.py
@@ -17,7 +17,10 @@ class Qgraf(Package):
version("3.4.2", sha256="cfc029fb871c78943865ef8b51ebcd3cd4428448b8816714b049669dfdeab8aa")
+ depends_on("fortran", type="build") # generated
+
def install(self, spec, prefix):
fortran = Executable(spack_fc)
fortran("qgraf-{0}.f".format(self.spec.version), "-o", "qgraf")
- install_tree(".", prefix)
+ mkdirp(prefix.bin)
+ install("./qgraf", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py
index c612e8e816..20f168d22d 100644
--- a/var/spack/repos/builtin/packages/qhull/package.py
+++ b/var/spack/repos/builtin/packages/qhull/package.py
@@ -27,6 +27,9 @@ class Qhull(CMakePackage):
version("2015.2", sha256="8b6dd67ff77ce1ee814da84f4134ef4bdce1f1031e570b8d83019ccef58b1c00")
version("2012.1", sha256="cb1296fbb9ec8b7d6e8f4c239ad165590616f242c7c46f790c27d8dcebe96c6a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("qhull-unused-intel-17.02.patch", when="@2015.2")
depends_on("cmake@3.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/qjson/package.py b/var/spack/repos/builtin/packages/qjson/package.py
index 15605094e8..15e64bc56f 100644
--- a/var/spack/repos/builtin/packages/qjson/package.py
+++ b/var/spack/repos/builtin/packages/qjson/package.py
@@ -10,13 +10,15 @@ class Qjson(CMakePackage):
"""QJson is a Qt-based library that maps JSON data to QVariant
objects and vice versa."""
- homepage = "http://qjson.sourceforge.net/"
+ homepage = "https://qjson.sourceforge.net/"
url = "https://github.com/flavio/qjson/archive/0.9.0.tar.gz"
license("LGPL-2.1-or-later")
version("0.9.0", sha256="e812617477f3c2bb990561767a4cd8b1d3803a52018d4878da302529552610d4")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py
index 70077558f4..b39e9d59e4 100644
--- a/var/spack/repos/builtin/packages/qmcpack/package.py
+++ b/var/spack/repos/builtin/packages/qmcpack/package.py
@@ -47,6 +47,9 @@ class Qmcpack(CMakePackage, CudaPackage):
version("3.1.1", tag="v3.1.1", commit="07611637f823187ac5133d6e2249cdb86b92b04d")
version("3.1.0", tag="v3.1.0", commit="146d920cf33590eac6a7a976f88871c1fe6418a6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# These defaults match those in the QMCPACK manual
variant(
"build_type",
@@ -142,7 +145,6 @@ class Qmcpack(CMakePackage, CudaPackage):
cpp14_warning = "QMCPACK v3.6.0 or later requires a " "compiler with support for C++14"
conflicts("%gcc@:4", when="@3.6.0:", msg=cpp14_warning)
conflicts("%intel@:17", when="@3.6.0:", msg=cpp14_warning)
- conflicts("%pgi@:17", when="@3.6.0:", msg=cpp14_warning)
conflicts("%clang@:3.4", when="@3.6.0:", msg=cpp14_warning)
conflicts("+afqmc", when="@:3.6.0", msg="AFQMC not recommended before v3.7")
@@ -164,7 +166,6 @@ class Qmcpack(CMakePackage, CudaPackage):
"Intel compiler when linking against Intel MKL"
)
conflicts("%gcc", when="@:3.4.0 ^intel-mkl", msg=mkl_warning)
- conflicts("%pgi", when="@:3.4.0 ^intel-mkl", msg=mkl_warning)
conflicts("%llvm", when="@:3.4.0 ^intel-mkl", msg=mkl_warning)
# Dependencies match those in the QMCPACK manual.
@@ -391,7 +392,6 @@ class Qmcpack(CMakePackage, CudaPackage):
else:
args.append("-DBUILD_PPCONVERT=0")
- args.append(self.define("Python3_EXECUTABLE", self.spec["python"].command.path))
return args
# QMCPACK needs custom install method for the following reason:
diff --git a/var/spack/repos/builtin/packages/qmd-progress/package.py b/var/spack/repos/builtin/packages/qmd-progress/package.py
index f3b0580d58..02edafb729 100644
--- a/var/spack/repos/builtin/packages/qmd-progress/package.py
+++ b/var/spack/repos/builtin/packages/qmd-progress/package.py
@@ -23,6 +23,9 @@ class QmdProgress(CMakePackage):
version("1.1.0", sha256="757d2606d7b7f38e7f8f491bf7369b88de55062bae0b12a9928f0a5acae993bd")
version("1.0.0", sha256="eed87e68b4a1533a3ed70c1662feca4ac890b985f3326fc94522c2f71f198fdc")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("graphlib", default=False, description="Build with Metis Suppport")
variant("mpi", default=True, description="Build with MPI Support")
variant("shared", default=True, description="Build shared libs")
diff --git a/var/spack/repos/builtin/packages/qnnpack/package.py b/var/spack/repos/builtin/packages/qnnpack/package.py
index 8acd474321..072dbfc157 100644
--- a/var/spack/repos/builtin/packages/qnnpack/package.py
+++ b/var/spack/repos/builtin/packages/qnnpack/package.py
@@ -22,6 +22,9 @@ class Qnnpack(CMakePackage):
version("2018-12-27", commit="6c62fddc6d15602be27e9e4cbb9e985151d2fa82") # py-torch@1.2
version("2018-12-04", commit="ef05e87cef6b8e719989ce875b5e1c9fdb304c05") # py-torch@1.0:1.1
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/qoz/package.py b/var/spack/repos/builtin/packages/qoz/package.py
index 2cf3db6dcb..23f3a542f5 100644
--- a/var/spack/repos/builtin/packages/qoz/package.py
+++ b/var/spack/repos/builtin/packages/qoz/package.py
@@ -12,9 +12,14 @@ class Qoz(CMakePackage):
git = "https://github.com/robertu94/QoZ"
homepage = git
+ version("2023.11.07", commit="611369be4b1cc7a12eaae02600baf8d232d4caa5")
+ version("2023.03.09", commit="537f6a52a39396f9c05e16a12ab160d8dc8b9d56")
version("2022.04.26", commit="d28a7a8c9f703075441b700202b8a1ee185ded00")
version("2023.03.09", commit="537f6a52a39396f9c05e16a12ab160d8dc8b9d56")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("disheng222")
depends_on("zstd")
diff --git a/var/spack/repos/builtin/packages/qpdf/package.py b/var/spack/repos/builtin/packages/qpdf/package.py
new file mode 100644
index 0000000000..2fb7bf314c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qpdf/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Qpdf(CMakePackage):
+ """
+ QPDF is a command-line tool and C++ library that performs
+ content-preserving transformations on PDF files.
+ """
+
+ homepage = "https://qpdf.sourceforge.io/"
+ url = "https://github.com/qpdf/qpdf/releases/download/v11.9.0/qpdf-11.9.0.tar.gz"
+
+ maintainers("taliaferro")
+
+ license("Apache-2.0", checked_by="taliaferro")
+
+ version("11.9.1", sha256="2ba4d248f9567a27c146b9772ef5dc93bd9622317978455ffe91b259340d13d1")
+ version("11.9.0", sha256="9f5d6335bb7292cc24a7194d281fc77be2bbf86873e8807b85aeccfbff66082f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "crypto",
+ values=["openssl", "gnutls", "native", "implicit"],
+ default="implicit",
+ multi=False,
+ description="Provider of cryptographic functions.",
+ )
+
+ depends_on("zlib-api")
+ depends_on("jpeg")
+ depends_on("openssl", when="crypto=openssl")
+ depends_on("gnutls", when="crypto=gnutls")
+
+ def cmake_args(self):
+ args = []
+ if not self.spec.satisfies("crypto=implicit"):
+ crypto_type = self.spec.variants["crypto"].value.upper()
+ args.append("USE_IMPLICIT_CRYPTO=0")
+ args.append(f"REQUIRE_CRYPTO_{crypto_type}=1")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/qperf/package.py b/var/spack/repos/builtin/packages/qperf/package.py
index eb43441298..695dd55dae 100644
--- a/var/spack/repos/builtin/packages/qperf/package.py
+++ b/var/spack/repos/builtin/packages/qperf/package.py
@@ -20,6 +20,8 @@ class Qperf(AutotoolsPackage):
version("0.4.11", sha256="b0ef2ffe050607566d06102b4ef6268aad08fdc52898620d429096e7b0767e75")
version("0.4.10", sha256="94e26725b4f962eacca36d8ef48cd1fb5043721ac82c3f44018319e47a96cf6b")
+ depends_on("c", type="build") # generated
+
variant("verbs", default=True, description="Build with verbs support")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/qrmumps/package.py b/var/spack/repos/builtin/packages/qrmumps/package.py
new file mode 100644
index 0000000000..11dce1d20f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qrmumps/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Qrmumps(CMakePackage):
+ """a software package for the solution of sparse, linear systems on
+ multicore computers based on the QR factorization of the input matrix."""
+
+ homepage = "https://gitlab.com/qr_mumps/qr_mumps"
+ git = "https://gitlab.com/qr_mumps/qr_mumps"
+ url = "https://gitlab.com/qr_mumps/qr_mumps/-/archive/3.1/qr_mumps-3.1.tar.gz"
+ maintainers("fpruvost")
+
+ version("master", branch="master")
+ version("3.1", sha256="6e39dbfa1e6ad3730b006c8953a43cc6da3dfc91f00edeb68a641d364703b773")
+ version("3.0.4", sha256="621a294c3bf1e60e4ea6ae29c0586760648947f650e0f86bbabaf82805fc17db")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("amd", default=True, description="Enable AMD ordering")
+ variant("metis", default=True, description="Enable Metis ordering")
+ variant("scotch", default=True, description="Enable Scotch ordering")
+ variant("starpu", default=True, description="Enable StarPU runtime system support")
+ variant("cuda", default=False, when="+starpu", description="Enable StarPU+CUDA")
+ variant("fxt", default=False, when="+starpu", description="Enable FxT tracing through StarPU")
+
+ depends_on("pkgconfig", type="build")
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("suite-sparse", when="+amd")
+ depends_on("metis", when="+metis")
+ depends_on("scotch", when="+scotch")
+ depends_on("starpu", when="+starpu")
+ depends_on("cuda", when="+starpu+cuda")
+ depends_on("starpu+cuda", when="+starpu+cuda")
+ depends_on("starpu+fxt", when="+starpu+fxt")
+
+ def cmake_args(self):
+ args = [
+ self.define("BUILD_SHARED_LIBS", True),
+ self.define_from_variant("QRM_ORDERING_AMD", "amd"),
+ self.define_from_variant("QRM_ORDERING_SCOTCH", "scotch"),
+ self.define_from_variant("QRM_ORDERING_METIS", "metis"),
+ self.define_from_variant("QRM_WITH_STARPU", "starpu"),
+ self.define_from_variant("QRM_WITH_CUDA", "cuda"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/qrupdate/package.py b/var/spack/repos/builtin/packages/qrupdate/package.py
index bdb85917ba..a7cbb2631a 100644
--- a/var/spack/repos/builtin/packages/qrupdate/package.py
+++ b/var/spack/repos/builtin/packages/qrupdate/package.py
@@ -20,6 +20,8 @@ class Qrupdate(MakefilePackage, SourceforgePackage):
version("1.1.2", sha256="e2a1c711dc8ebc418e21195833814cb2f84b878b90a2774365f0166402308e08")
+ depends_on("fortran", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/qscintilla/package.py b/var/spack/repos/builtin/packages/qscintilla/package.py
index 326b1137be..b61c9d5295 100644
--- a/var/spack/repos/builtin/packages/qscintilla/package.py
+++ b/var/spack/repos/builtin/packages/qscintilla/package.py
@@ -24,6 +24,8 @@ class Qscintilla(QMakePackage):
version("2.13.3", sha256="711d28e37c8fccaa8229e8e39a5b3b2d97f3fffc63da10b71c71b84fa3649398")
version("2.12.0", sha256="2116181cce3076aa4897e36182532d0e6768081fb0cf6dcdd5be720519ab1434")
+ depends_on("cxx", type="build") # generated
+
variant("designer", default=False, description="Enable pluging for Qt-Designer")
variant("python", default=False, description="Build python bindings")
@@ -88,10 +90,12 @@ class Qscintilla(QMakePackage):
@run_after("install", when="+python")
def make_qsci_python(self):
if "^py-pyqt5" in self.spec:
+ qtx = "qt5"
py_pyqtx = "py-pyqt5"
pyqtx = "PyQt5"
ftoml = "pyproject-qt5.toml"
elif "^py-pyqt6" in self.spec:
+ qtx = "qt6"
py_pyqtx = "py-pyqt6"
pyqtx = "PyQt6"
ftoml = "pyproject-qt6.toml"
@@ -99,21 +103,22 @@ class Qscintilla(QMakePackage):
with working_dir(join_path(self.stage.source_path, "Python")):
copy(ftoml, "pyproject.toml")
sip_inc_dir = join_path(
- self.spec[py_pyqtx].prefix, self.spec["python"].package.platlib, pyqtx, "bindings"
+ self.spec[py_pyqtx].package.module.python_platlib, pyqtx, "bindings"
)
with open("pyproject.toml", "a") as tomlfile:
+ # https://pyqt-builder.readthedocs.io/en/latest/pyproject_toml.html
tomlfile.write(f'\n[tool.sip.project]\nsip-include-dirs = ["{sip_inc_dir}"]\n')
+ # add widgets and printsupport to Qsci.pro
+ # also add link statement to fix "undefined symbol _Z...Qsciprinter...
+ link_qscilibs = "LIBS += -L" + self.prefix.lib + " -lqscintilla2_" + qtx
+ tomlfile.write(
+ f'\n[tool.sip.builder]\nqmake-settings = \
+ ["QT += widgets", "QT += printsupport", "{link_qscilibs}"]\n'
+ )
+
mkdirp(os.path.join(self.prefix.share.sip, pyqtx))
- if "^py-pyqt5" in self.spec:
- # QT += widgets and QT += printsupport need to be added to Qsci.pro file
- # to be generated via project.py
- qsciproj = FileFilter(join_path("project.py"))
- ptrn = "super().__init__(project, 'Qsci', qmake_CONFIG=qmake_CONFIG"
- qsciproj.filter(
- ptrn + ")", ptrn + ",qmake_QT=['widgets','printsupport'])", string=True
- )
sip_build = Executable(self.spec["py-sip"].prefix.bin.join("sip-build"))
sip_build(
"--target-dir=" + python_platlib,
@@ -130,3 +135,14 @@ class Qscintilla(QMakePackage):
makefile = FileFilter(join_path("build", "Makefile"))
makefile.filter("$(INSTALL_ROOT)", "", string=True)
make("install", "-C", "build/")
+
+ def test_python_import(self):
+ """check Qsci import"""
+ if self.spec.satisfies("~python"):
+ raise SkipTest("Package must be installed with +python")
+
+ python = self.spec["python"].command
+ if "^py-pyqt5" in self.spec:
+ python("-c", "import PyQt5.Qsci")
+ if "^py-pyqt6" in self.spec:
+ python("-c", "import PyQt6.Qsci")
diff --git a/var/spack/repos/builtin/packages/qt-5compat/package.py b/var/spack/repos/builtin/packages/qt-5compat/package.py
new file mode 100644
index 0000000000..811bfc4551
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt-5compat/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+from spack.pkg.builtin.qt_base import QtBase, QtPackage
+
+
+class Qt5compat(QtPackage):
+ """The Qt5compat module contains unsupported Qt 5 APIs for use in Qt 6 projects."""
+
+ url = QtPackage.get_url(__qualname__)
+ list_url = QtPackage.get_list_url(__qualname__)
+
+ maintainers("wdconinc")
+
+ license("LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only")
+
+ version("6.7.3", sha256="959634d1a6a53f9a483882e81da87ec182ff44d7747a0cc771c786b0f2cf52e0")
+ version("6.7.2", sha256="331a1e617952217868beeef7964828500388abeeb502ea3436f16eec816426c4")
+
+ depends_on("cxx", type="build")
+
+ depends_on("qt-base")
+
+ for _v in QtBase.versions:
+ v = str(_v)
+ depends_on("qt-base@" + v, when="@" + v)
diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py
index c2e155e392..ff1d8f5a46 100644
--- a/var/spack/repos/builtin/packages/qt-base/package.py
+++ b/var/spack/repos/builtin/packages/qt-base/package.py
@@ -7,6 +7,7 @@ import os
import re
import shutil
import sys
+import tempfile
import llnl.util.tty as tty
@@ -27,11 +28,16 @@ class QtPackage(CMakePackage):
return _url.format(qualname.lower())
@staticmethod
+ def get_git(qualname):
+ _git = "https://github.com/qt/{}.git"
+ return _git.format(qualname.lower())
+
+ @staticmethod
def get_list_url(qualname):
_list_url = "https://github.com/qt/{}/tags"
return _list_url.format(qualname.lower())
- maintainers("wdconinc", "sethrj")
+ maintainers("wdconinc")
# Default dependencies for all qt-* components
generator("ninja")
@@ -82,6 +88,45 @@ class QtPackage(CMakePackage):
# and should not be relied upon for downstream parsing.
tty.warn("config.summary in prefix is a temporary feature only")
+ @run_after("install")
+ def add_qt_module_files(self):
+ """Qt modules need to drop a forwarding qt_module.pri file in the qt-base
+ mkspecs/modules directory. This violates the spack install prefix separation,
+ so we modify the downstream module files to work regardless."""
+
+ # No need to modify qt-base itself
+ if self.spec.name == "qt-base":
+ return
+
+ # Define qt_module.pri filename, but postpone writing until after loop
+ qt_module_pri = join_path(self.prefix.mkspecs.modules, "qt_module.pri")
+
+ # Include qt_module.pri file in every pri file
+ for old_file in find(self.prefix.mkspecs.modules, "*.pri"):
+ new_fd, new_file = tempfile.mkstemp(
+ prefix=os.path.basename(old_file), dir=self.prefix.mkspecs.modules
+ )
+ with os.fdopen(new_fd, "w") as new_fh:
+ new_fh.write("include(qt_module.pri)\n")
+ with open(old_file, "r") as old_fh:
+ new_fh.write(old_fh.read())
+ shutil.move(new_file, old_file)
+
+ # Create qt_module.pri file with definitions
+ defs = []
+ for dir in ["BIN", "INCLUDE", "LIB"]:
+ if os.path.exists(join_path(self.prefix, dir.lower())):
+ defs.append(f"QT_MODULE_{dir}_BASE = {join_path(self.prefix, dir.lower())}\n")
+ with open(qt_module_pri, "w") as file:
+ file.write("\n".join(defs))
+
+ def setup_run_environment(self, env):
+ env.prepend_path("QMAKEPATH", self.prefix)
+ if os.path.exists(self.prefix.mkspecs.modules):
+ env.prepend_path("QMAKE_MODULE_PATH", self.prefix.mkspecs.modules)
+ if os.path.exists(self.prefix.plugins):
+ env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins)
+
class QtBase(QtPackage):
"""Qt Base (Core, Gui, Widgets, Network, ...)"""
@@ -93,6 +138,12 @@ class QtBase(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="65771d1618cab08ec5e9bbfdc265b5d2ce2ccf0373143d7d9d139647a7196aec")
+ version("6.7.2", sha256="96b96e4fd0fc306502ed8b94a34cfa0bacc8a25d43c2e958dd6772b28f6b0e42")
+ version("6.7.1", sha256="d6950597ce1fc2e1cf374c3aa70c2d72532bb74150e9853d7127af86a8a6c7b4")
+ version("6.7.0", sha256="e17f016ec987092423e86d732c0f9786124598877fa00970fd806da113c02ca5")
+ version("6.6.3", sha256="11abfcae323d295129f644f1828064e05af7d64d49edb0e00bfb8e8cb9691259")
+ version("6.6.2", sha256="2cbdc4791c5838fddb1ce7ee693b165bb4acf3f81acd6c1bf9e56413b25050df")
version("6.6.1", sha256="eb091c56e8c572d35d3da36f94f9e228892d43aecb559fa4728a19f0e44914c4")
version("6.6.0", sha256="882f39ea3a40a0894cd64e515ce51711a4fab79b8c47bc0fe0279e99493a62cf")
version("6.5.3", sha256="174021c4a630df2e7e912c2e523844ad3cb5f90967614628fd8aa15ddbab8bc5")
@@ -109,6 +160,9 @@ class QtBase(QtPackage):
version("6.2.4", sha256="657d1405b5e15afcf322cc75b881f62d6a56f16383707742a99eb87f53cb63de")
version("6.2.3", sha256="2dd095fa82bff9e0feb7a9004c1b2fb910f79ecc6111aa64637c95a02b7a8abb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("dbus", default=False, description="Build with D-Bus support.")
variant(
"framework", default=bool(MACOS_VERSION), description="Build as a macOS Framework package."
@@ -130,6 +184,8 @@ class QtBase(QtPackage):
variant("widgets", default=True, when="+gui", description="Build with widgets.")
# Dependencies, then variant- and version-specific dependencies
+ depends_on("cmake@3.21:", type="build", when="~shared")
+ depends_on("cmake@3.21:", type="build", when="platform=darwin")
depends_on("double-conversion")
depends_on("icu4c")
depends_on("libxml2")
@@ -153,6 +209,13 @@ class QtBase(QtPackage):
depends_on("libxkbcommon")
depends_on("libxcb@1.13:") # requires xinput
depends_on("libxrender")
+ depends_on("libx11")
+ depends_on("xcb-util")
+ depends_on("xcb-util-cursor")
+ depends_on("xcb-util-image")
+ depends_on("xcb-util-keysyms")
+ depends_on("xcb-util-renderutil")
+ depends_on("xcb-util-wm")
with when("+network"):
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/qt-declarative/package.py b/var/spack/repos/builtin/packages/qt-declarative/package.py
index 42afc99912..4f70ef7883 100644
--- a/var/spack/repos/builtin/packages/qt-declarative/package.py
+++ b/var/spack/repos/builtin/packages/qt-declarative/package.py
@@ -16,6 +16,12 @@ class QtDeclarative(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="f39fa4e7e3b4011e52fc55fbde5f41e61815bffea432869abc9b90aa4de07613")
+ version("6.7.2", sha256="3b91d1b75f22221f39b93647d73c9fe7fc4b9c8d45ff0cec402626eab15d8dd8")
+ version("6.7.1", sha256="fdf4099cbced3ce56e5151122ae1eb924886492f9fc2eb6a353d60a23e8fde14")
+ version("6.7.0", sha256="dc3fec16cbe0f706b2b6114e5dbb884269543f2d679a0a3a63b4f686156adf73")
+ version("6.6.3", sha256="34757cb6f2960aaee2849ff9fabe3ec06499fb07f41ab4f9351ce602b85bebd3")
+ version("6.6.2", sha256="6079545e04e7704fcab8e50687e1ee9df8d3bb43288a1602ff0f142e640a5b51")
version("6.6.1", sha256="b1f5a75c2ea967d21b2c45f56ba1de66e2bf14a581b2f0d8e776441f1bebd0e7")
version("6.6.0", sha256="2e52ef00736a9954426adf454cfb365fabdffb5703c814c188bc866cbf9f4dad")
version("6.5.3", sha256="563924e58ac517492acb1952af0fb950cd54045ef6d61b98de06fac728239811")
@@ -32,6 +38,9 @@ class QtDeclarative(QtPackage):
version("6.2.4", sha256="cd939d99c37e7723268804b9516e32f8dd64b985d847469c78b66b5f4481c548")
version("6.2.3", sha256="eda82abfe685a6ab5664e4268954622ccd05cc9ec8fb16eaa453c54900591baf")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Testing requires +network
depends_on("qt-base +network", type="test")
diff --git a/var/spack/repos/builtin/packages/qt-quick3d/package.py b/var/spack/repos/builtin/packages/qt-quick3d/package.py
index 0fea0bdab0..3af4540ba5 100644
--- a/var/spack/repos/builtin/packages/qt-quick3d/package.py
+++ b/var/spack/repos/builtin/packages/qt-quick3d/package.py
@@ -16,6 +16,12 @@ class QtQuick3d(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="3e68f3a9a330e7b9a92ddf5b8d7a0874a107ea77636c788f598de65e327eb4a0")
+ version("6.7.2", sha256="67021658cb10bfa6d969c4219d599ab2f4775d08fb4ae56da17fbec305088b55")
+ version("6.7.1", sha256="c889b70305da7595df87c3bd062474787b722ab216bc2e6226e33fae3ec3459d")
+ version("6.7.0", sha256="3adb7cc458c21a4642e7138cc0ca12934cd7075633d06c46c689f65718c8ba73")
+ version("6.6.3", sha256="6990aac1434722cdf54fa6b3ebbae6d2af4d4dc89d6d33a2146c83c49be59ecb")
+ version("6.6.2", sha256="b99184a1ef912219374b2bb9a9b1899c1c55694736bc3185e2306db16c66b4ab")
version("6.6.1", sha256="57abc6e178d2b28cfac544c71cb20f362409267be5422ca3fbaa46a1bbfd5515")
version("6.6.0", sha256="2cda12649cfb6c23261c48e626714ca7eb01fa4b20e0bed02031f9c488c820ad")
version("6.5.3", sha256="5df7494824c44fc73c03348b218166db5c4d8d42bd7d221f15e58c962cf657e5")
@@ -32,6 +38,8 @@ class QtQuick3d(QtPackage):
version("6.2.4", sha256="7292ed4373a92913c6811f2faa5191f0426f84bd93a3f6eb7d54b62626b56db5")
version("6.2.3", sha256="35d06edbdd83b7d781b70e0bada18911fa9b774b6403589d5b21813a73584d80")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt-base +network", when="@6.3.0:")
depends_on("assimp@5.0.1:")
diff --git a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py
index a312f667ee..cb60aad12e 100644
--- a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py
+++ b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py
@@ -16,6 +16,12 @@ class QtQuicktimeline(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="81ce374a22bf00d53d0a9d5293d6495a224137e9427e4d4913d87f2f0adc5a58")
+ version("6.7.2", sha256="ad5370a3b193c5d30a824a1def0608e12fb735c4ff20ae55161a6f6e202e091d")
+ version("6.7.1", sha256="98766368b4650eef583f76d257573e6785938b89c9eb2fc57577f4c199b12a1f")
+ version("6.7.0", sha256="9c8d953d4dfbe2a42dbbd88c26b4b01f6caab4d525ec01eb66edc71e9ee39172")
+ version("6.6.3", sha256="6dccea9ebc8a6507ffb046cada1dd339b8187923bb74b938f8ccdcb0a5590095")
+ version("6.6.2", sha256="76e629f019f6bdd9d46efbde2704dfe104231879ad60eebd81d9585250aa618b")
version("6.6.1", sha256="fe77555566bd6bb0ef0cb67b6ad09e225399fba3d2ec388de84e8a6200c0e2fc")
version("6.6.0", sha256="06b94443da3f81153f04dca0cce781481462310d51f97d5550f81322a7a88cd0")
version("6.5.3", sha256="fddd90cdb15af093673c6da924e18e22ebd364b9ab215356e1b40db28ac66640")
@@ -32,6 +38,8 @@ class QtQuicktimeline(QtPackage):
version("6.2.4", sha256="d73cb33e33f0b7a1825b863c22e6b552ae86aa841bcb805a41aca02526a4e8bc")
version("6.2.3", sha256="bbb913398d8fb6b5b20993b5e02317de5c1e4b23a5357dd5d08a237ada6cc7e2")
+ depends_on("cxx", type="build") # generated
+
for _v in QtBase.versions:
v = str(_v)
depends_on("qt-base@" + v, when="@" + v)
diff --git a/var/spack/repos/builtin/packages/qt-shadertools/package.py b/var/spack/repos/builtin/packages/qt-shadertools/package.py
index 6c06e8992a..43ba9b8717 100644
--- a/var/spack/repos/builtin/packages/qt-shadertools/package.py
+++ b/var/spack/repos/builtin/packages/qt-shadertools/package.py
@@ -18,6 +18,12 @@ class QtShadertools(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="8ec6a48c41d49b6f9595659169b2c69aecd46e96a88131f19f6a4cda394fa3f4")
+ version("6.7.2", sha256="256ff8199d9f6e97bef57f602c5fa7a32e3c7588bf7efe39e412b810c7ed4ffc")
+ version("6.7.1", sha256="56cfba20c7e8f7a218cac68d237a63ea342ac9a67211ecdf3c7152572632448b")
+ version("6.7.0", sha256="82d9ef04a470db30e90253ddc72fcbc8fea2ecad419a735ecf64bb965560197f")
+ version("6.6.3", sha256="a0e44248cec9011166794da895952cc1f98ddbfa77180174da925c5f749391a8")
+ version("6.6.2", sha256="c6d06a660779990f69b8b2e21eb01ada784f9144cbaeb718ee0da01c33ce2141")
version("6.6.1", sha256="1206110464f8829e34ca7277bdcd2044e96a98078c9ab9f8b96ed526a4d81526")
version("6.6.0", sha256="8b34908f8bbc7fb00a00babede91dbbeec9826f5138d390041f239d483e1162a")
version("6.5.3", sha256="e6c627763db8c60799218947443efb90fb3511342f2212f5e99cd98f6942ed08")
@@ -34,6 +40,8 @@ class QtShadertools(QtPackage):
version("6.2.4", sha256="c3332d91e0894086634d5f8d40638439e6e3653a3a185e1b5f5d23ae3b9f51a1")
version("6.2.3", sha256="658c4acc2925e57d35bbd38cdf49c08297555ed7d632f9e86bfef76e6d861562")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt-base +gui")
for _v in QtBase.versions:
diff --git a/var/spack/repos/builtin/packages/qt-svg/package.py b/var/spack/repos/builtin/packages/qt-svg/package.py
index c20ffe0ab7..a2f44fc2e6 100644
--- a/var/spack/repos/builtin/packages/qt-svg/package.py
+++ b/var/spack/repos/builtin/packages/qt-svg/package.py
@@ -18,6 +18,12 @@ class QtSvg(QtPackage):
license("BSD-3-Clause")
+ version("6.7.3", sha256="2852d8f1f52b60f0624ca5edf479125e4b32d579b1177d8b76d8e28fac98a701")
+ version("6.7.2", sha256="c0e140bbba4157cdbbe0e84ddbb4e238b87aa0ca7b870bad283d8cf2a7fa74b6")
+ version("6.7.1", sha256="55134e1242305e554610bf1a77e71d3d15104ee819a3c87def1f8b736d5ecf0e")
+ version("6.7.0", sha256="ea023d11c710145786833649c3dc79dd099110fc3a9756a8a88699eeaac949f1")
+ version("6.6.3", sha256="75006cc389ac86f2705dbb93a8c278b6b96c6cfa46304640312367e61740170d")
+ version("6.6.2", sha256="4228731a00899ee27bf59e131fa0d3e9105d3f479ac27bc8cfd458e409398ec0")
version("6.6.1", sha256="b947acd83ac51116f29c7f7278d9faed19b8c11e021dbf08616e7d6200118db8")
version("6.6.0", sha256="4fd6b4d9307c3cd8fd207e60334823fed07a9acb32f7d53cd9c9be9b6a2f8a30")
version("6.5.3", sha256="fb8e5574c2480aab78062fad2d0a521633b4591ada600130b918b703c2ddb09a")
@@ -30,6 +36,8 @@ class QtSvg(QtPackage):
version("6.4.0", sha256="375eb69f320121e42d5dc107f9455008980c149646931b8ace19e6bc235dcd80")
version("6.3.2", sha256="781055bca458be46ef69f2fff147a00226e41f3a23d02c91238b0328a7156518")
+ depends_on("cxx", type="build") # generated
+
variant("widgets", default=False, description="Build SVG widgets.")
depends_on("qt-base +gui")
@@ -42,7 +50,3 @@ class QtSvg(QtPackage):
def cmake_args(self):
args = super().cmake_args() + []
return args
-
- def setup_run_environment(self, env):
- # to make plugins from SVG module to base, for e.g. icon loading
- env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins)
diff --git a/var/spack/repos/builtin/packages/qt-tools/package.py b/var/spack/repos/builtin/packages/qt-tools/package.py
new file mode 100644
index 0000000000..afb28b8a76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt-tools/package.py
@@ -0,0 +1,60 @@
+# Copyright 2013-2024 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.package import *
+from spack.pkg.builtin.qt_base import QtBase, QtPackage
+
+
+class QtTools(QtPackage):
+ """Qt Tools contains tools like Qt Designer."""
+
+ url = QtPackage.get_url(__qualname__)
+ git = QtPackage.get_git(__qualname__)
+ list_url = QtPackage.get_list_url(__qualname__)
+
+ maintainers("wdconinc")
+
+ license("BSD-3-Clause")
+
+ # src/assistant/qlitehtml is a submodule that is not in the git archive
+ version("6.7.3", commit="ec4747e62a837a0262212a5f4fb03734660c7360", submodules=True)
+ version("6.7.2", commit="46ffaed90df8c14d67b4b16fdf5e0b87ab227c88", submodules=True)
+
+ variant(
+ "assistant",
+ default=False,
+ description="Qt Assistant for viewing on-line documentation in Qt help file format.",
+ )
+ variant(
+ "designer",
+ default=False,
+ description="Qt Widgets Designer for designing and building GUIs with Qt Widgets.",
+ )
+
+ depends_on("llvm +clang")
+
+ depends_on("qt-base +network")
+ depends_on("qt-base +widgets", when="+designer")
+
+ for _v in QtBase.versions:
+ v = str(_v)
+ depends_on("qt-base@" + v, when="@" + v)
+
+ def cmake_args(self):
+ spec = self.spec
+
+ args = super().cmake_args() + []
+
+ def define(cmake_var, value):
+ args.append(self.define(cmake_var, value))
+
+ if spec.satisfies("+assistant"):
+ define("FEATURE_assistant", True)
+
+ if spec.satisfies("+designer"):
+ define("FEATURE_designer", True)
+
+ return args
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 21630e01de..9412b9a3df 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -15,6 +15,7 @@ from spack.package import *
MACOS_VERSION = macos_version() if sys.platform == "darwin" else None
LINUX_VERSION = kernel_version() if platform.system() == "Linux" else None
+IS_WINDOWS = sys.platform == "win32"
class Qt(Package):
@@ -27,12 +28,15 @@ class Qt(Package):
url = "https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz"
list_url = "https://download.qt.io/archive/qt/"
list_depth = 3
- maintainers("sethrj")
phases = ["configure", "build", "install"]
license("LGPL-3.0-only")
+ version("5.15.15", sha256="b423c30fe3ace7402e5301afbb464febfb3da33d6282a37a665be1e51502335e")
+ version("5.15.14", sha256="fdd3a4f197d2c800ee0085c721f4bef60951cbda9e9c46e525d1412f74264ed7")
+ version("5.15.13", sha256="9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca")
+ version("5.15.12", sha256="93f2c0889ee2e9cdf30c170d353c3f829de5f29ba21c119167dee5995e48ccce")
version("5.15.11", sha256="7426b1eaab52ed169ce53804bdd05dfe364f761468f888a0f15a308dc1dc2951")
version("5.15.10", sha256="b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca")
version("5.15.9", sha256="26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f")
@@ -54,6 +58,9 @@ class Qt(Package):
version("4.8.5", sha256="eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138")
version("3.3.8b", sha256="1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("debug", default=False, description="Build debug version.")
variant("dbus", default=False, description="Build with D-Bus support.")
variant("doc", default=False, description="Build QDoc and documentation.")
@@ -63,14 +70,22 @@ class Qt(Package):
)
variant("gtk", default=False, description="Build with gtkplus.")
variant("gui", default=True, description="Build the Qt GUI module and dependencies")
- variant("opengl", default=False, description="Build with OpenGL support.")
- variant("location", default=False, when="+opengl", description="Build the Qt Location module.")
+ # Desktop only on Windows
+ variant("opengl", default=False, description="Build with OpenGL support")
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ # webkit support requires qtquick2 which requires a GL implementation beyond what
+ # windows system gl provides.
+ # This is unavailable until we get a hardware accelerated option for EGL 2 on Windows
+ # We can use llvm or angle for this, but those are not hardware accelerated, so are not
+ # as useful for things like paraview
+ variant("webkit", default=False, description="Build the Webkit extension")
+ variant("location", default=False, description="Build the Qt Location module.")
variant("phonon", default=False, description="Build with phonon support.")
variant("shared", default=True, description="Build shared libraries.")
variant("sql", default=True, description="Build with SQL support.")
variant("ssl", default=True, description="Build with OpenSSL support.")
variant("tools", default=True, description="Build tools, including Qt Designer.")
- variant("webkit", default=False, description="Build the Webkit extension")
provides("qmake")
@@ -122,6 +137,9 @@ class Qt(Package):
patch("qt514-isystem.patch", when="@5.14.2")
# https://bugreports.qt.io/browse/QTBUG-84037
patch("qt515-quick3d-assimp.patch", when="@5.15:5+opengl")
+ # https://forum.qt.io/topic/130793/a-problem-with-python-path-when-i-try-to-build-qt-from-source-e-program-is-not-recognized-as-an-internal-or-external-command?_=1722965446110&lang=en-US
+ patch("qt515_masm_python.patch", when="@5.15 platform=windows")
+
# https://bugreports.qt.io/browse/QTBUG-90395
patch(
"https://src.fedoraproject.org/rpms/qt5-qtbase/raw/6ae41be8260f0f5403367eb01f7cd8319779674a/f/qt5-qtbase-gcc11.patch",
@@ -171,35 +189,65 @@ class Qt(Package):
conflicts("%apple-clang@13:", when="@:5.13")
# Build-only dependencies
- depends_on("pkgconfig", type="build")
+ for plat in ["linux", "darwin", "freebsd"]:
+ with when(f"platform={plat}"):
+ depends_on("pkgconfig", type="build")
+ depends_on("libsm", when="@3")
+ depends_on("glib", when="@4:")
+ depends_on("libmng")
+ depends_on("assimp@5.0.0:5", when="@5.5:+opengl")
+ depends_on("sqlite+column_metadata", when="+sql", type=("build", "run"))
+ depends_on("inputproto", when="@:5.8")
+ for plat in ["linux", "freebsd"]:
+ with when(f"platform={plat} +gui"):
+ depends_on("fontconfig")
+ depends_on("libsm")
+ depends_on("libx11")
+ depends_on("libxcb")
+ depends_on("libxkbcommon")
+ depends_on("xcb-util-image")
+ depends_on("xcb-util-keysyms")
+ depends_on("xcb-util-renderutil")
+ depends_on("xcb-util-wm")
+ depends_on("libxext")
+ depends_on("libxrender")
+
+ conflicts("+framework", msg="QT cannot be built as a framework except on macOS.")
+
+ with when("platform=windows +sql"):
+ # Windows sqlite has no column_metadata variant unlike all other platforms
+ depends_on("sqlite", type=("build", "run"))
+
+ with when("platform=darwin"):
+ conflicts("@:4.8.6", msg="QT 4 for macOS is only patched for 4.8.7")
+ conflicts(
+ "target=aarch64:",
+ when="@:5.15.3",
+ msg="Apple Silicon requires a very new version of qt",
+ )
+
depends_on("python", when="@5.7.0:", type="build")
# Dependencies, then variant- and version-specific dependencies
depends_on("icu4c")
depends_on("jpeg")
- depends_on("libmng")
depends_on("libtiff")
depends_on("libxml2")
depends_on("zlib-api")
depends_on("freetype", when="+gui")
depends_on("gtkplus", when="+gtk")
- depends_on("sqlite+column_metadata", when="+sql", type=("build", "run"))
depends_on("libpng@1.2.57", when="@3")
- depends_on("libsm", when="@3")
depends_on("pcre+multibyte", when="@5.0:5.8")
- depends_on("inputproto", when="@:5.8")
with when("+ssl"):
depends_on("openssl")
depends_on("openssl@:1.0", when="@4:5.9")
depends_on("openssl@1.1.1:", when="@5.15.0:")
- depends_on("glib", when="@4:")
depends_on("libpng", when="@4:")
depends_on("dbus", when="@4:+dbus")
depends_on("gl", when="@4:+opengl")
- depends_on("assimp@5.0.0:5", when="@5.5:+opengl")
depends_on("harfbuzz", when="@5:")
depends_on("double-conversion", when="@5.7:")
@@ -250,41 +298,25 @@ class Qt(Package):
# https://doc.qt.io/qt-5.14/supported-platforms.html
conflicts("%gcc@:4", when="@5.14:")
- # Non-macOS dependencies and special macOS constraints
- if MACOS_VERSION is None:
- with when("+gui"):
- depends_on("fontconfig")
- depends_on("libsm")
- depends_on("libx11")
- depends_on("libxcb")
- depends_on("libxkbcommon")
- depends_on("xcb-util-image")
- depends_on("xcb-util-keysyms")
- depends_on("xcb-util-renderutil")
- depends_on("xcb-util-wm")
- depends_on("libxext")
- depends_on("libxrender")
-
- conflicts("+framework", msg="QT cannot be built as a framework except on macOS.")
- else:
- conflicts(
- "platform=darwin", when="@:4.8.6", msg="QT 4 for macOS is only patched for 4.8.7"
- )
- conflicts(
- "target=aarch64:",
- when="@:5.15.3",
- msg="Apple Silicon requires a very new version of qt",
- )
+ # Compiling with oneAPI compilers icx, icpx requires patching
+ # This has only been tested for 5.15.14 so far
+ conflicts("%oneapi", when="@:5.15.13")
+ patch("qt51514-oneapi.patch", when="@5.15.14: %oneapi")
# Mapping for compilers/systems in the QT 'mkspecs'
compiler_mapping = {
"intel": ("icc",),
+ # This only works because we apply patch "qt51514-oneapi.patch"
+ # above that replaces calls to "icc" with calls to "icx" in
+ # qtbase/mkspecs/*
+ "oneapi": ("icc",),
"apple-clang": ("clang-libc++", "clang"),
"clang": ("clang-libc++", "clang"),
+ "aocc": ("clang-libc++", "clang"),
"fj": ("clang",),
"gcc": ("g++",),
}
- platform_mapping = {"darwin": ("macx"), "cray": ("linux")}
+ platform_mapping = {"darwin": ("macx"), "windows": ("win32")}
def url_for_version(self, version):
# URL keeps getting more complicated with every release
@@ -334,7 +366,8 @@ class Qt(Package):
return url
def setup_build_environment(self, env):
- env.set("MAKEFLAGS", "-j{0}".format(make_jobs))
+ if not IS_WINDOWS:
+ env.set("MAKEFLAGS", "-j{0}".format(make_jobs))
if self.version >= Version("5.11"):
# QDoc uses LLVM as of 5.11; remove the LLVM_INSTALL_DIR to
# disable
@@ -356,6 +389,10 @@ class Qt(Package):
env.set("QTINC", self.prefix.inc)
env.set("QTLIB", self.prefix.lib)
env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins)
+ if IS_WINDOWS:
+ # Force Qt to use the desktop provided GL
+ # on Windows when dependencies are building against Qt
+ env.set("QT_OPENGL", "desktop")
def setup_dependent_package(self, module, dependent_spec):
module.qmake = Executable(self.spec.prefix.bin.qmake)
@@ -546,18 +583,25 @@ class Qt(Package):
self.prefix,
"-v",
"-opensource",
- "-{0}opengl".format("" if "+opengl" in spec else "no-"),
"-{0}".format("debug" if "+debug" in spec else "release"),
"-confirm-license",
"-optimized-qmake",
"-no-pch",
]
+ # Windows currently only supports the desktop provider for opengl
+ if "+opengl" in spec:
+ config_args.append("-opengl")
+ if IS_WINDOWS:
+ config_args.append("desktop")
+ else:
+ config_args.append("-no-opengl")
+
use_spack_dep = self._dep_appender_factory(config_args)
if "+gui" in spec:
use_spack_dep("freetype")
- if not MACOS_VERSION:
+ if spec.satisfies("platform=linux") or spec.satisfies("platform=freebsd"):
config_args.append("-fontconfig")
else:
config_args.append("-no-freetype")
@@ -700,7 +744,7 @@ class Qt(Package):
# Errors on bluetooth even when bluetooth is disabled...
# at least on apple-clang%12
config_args.extend(["-skip", "connectivity"])
- elif "+gui" in spec:
+ elif "+gui" in spec and not IS_WINDOWS:
# Linux-only QT5 dependencies
if version < Version("5.9.9"):
config_args.append("-system-xcb")
@@ -740,6 +784,9 @@ class Qt(Package):
if version >= Version("5.15"):
config_args.extend(["-skip", "qtlocation"])
+ if IS_WINDOWS:
+ config_args.extend(["-skip", "qtspeech"])
+
if "~opengl" in spec:
config_args.extend(["-skip", "multimedia"])
config_args.extend(["-skip", "qt3d"])
@@ -757,10 +804,11 @@ class Qt(Package):
# v5.9: user-selectable internal-vs-external via -assimp
# v5.14: additional qtquick3d module uses -assimp
# v5.15: qtquick3d switched to the -quick3d-assimp option
- if version >= Version("5.9"):
- use_spack_dep("assimp")
- elif version >= Version("5.15"):
- use_spack_dep("assimp", "quick3d-assimp")
+ if not IS_WINDOWS:
+ if version >= Version("5.9"):
+ use_spack_dep("assimp")
+ elif version >= Version("5.15"):
+ use_spack_dep("assimp", "quick3d-assimp")
if MACOS_VERSION and "+opengl" in spec:
# These options are only valid if 'multimedia' is enabled, i.e.
@@ -773,13 +821,22 @@ class Qt(Package):
# Not currently working for qt@5
config_args.extend(["-device-option", "QMAKE_APPLE_DEVICE_ARCHS=arm64"])
+ if IS_WINDOWS:
+ global configure
+ configure = Executable("configure.bat")
configure(*config_args)
def build(self, spec, prefix):
- make()
+ if IS_WINDOWS:
+ nmake()
+ else:
+ make()
def install(self, spec, prefix):
- make("install")
+ if IS_WINDOWS:
+ nmake("install")
+ else:
+ make("install")
# Documentation generation requires the doc tools to be installed.
# @when @run_after currently seems to ignore the 'when' restriction.
diff --git a/var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch b/var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch
new file mode 100644
index 0000000000..e4335ec25b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch
@@ -0,0 +1,31 @@
+--- a/qtbase/mkspecs/common/icc-base-unix.conf 2024-05-07 23:17:16.000000000 -0600
++++ b/qtbase/mkspecs/common/icc-base-unix.conf 2024-07-10 21:32:47.808327220 -0600
+@@ -16,7 +16,7 @@
+ QMAKE_CFLAGS_OPTIMIZE = -O2
+ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
+
+-QMAKE_CC = icc
++QMAKE_CC = icx
+ QMAKE_LEX = flex
+ QMAKE_LEXFLAGS =
+ QMAKE_YACC = yacc
+@@ -61,7 +61,7 @@
+ QMAKE_CFLAGS_SHANI += -msha
+ QMAKE_CFLAGS_VAES += -mvaes
+
+-QMAKE_CXX = icpc
++QMAKE_CXX = icpx
+ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+ QMAKE_CXXFLAGS_APP = $$QMAKE_CFLAGS_APP
+ QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+@@ -92,8 +92,8 @@
+ QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+ QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+-QMAKE_LINK = icpc
+-QMAKE_LINK_SHLIB = icpc
++QMAKE_LINK = icpx
++QMAKE_LINK_SHLIB = icpx
+ QMAKE_LFLAGS =
+ QMAKE_LFLAGS_RELEASE =
+ QMAKE_LFLAGS_DEBUG =
diff --git a/var/spack/repos/builtin/packages/qt/qt515_masm_python.patch b/var/spack/repos/builtin/packages/qt/qt515_masm_python.patch
new file mode 100644
index 0000000000..af599bd182
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt515_masm_python.patch
@@ -0,0 +1,22 @@
+diff --git a/masm.pri b/masm-quote.pri
+index b67ee79..b757ee5 100644
+--- a/qtdeclarative/src/3rdparty/masm/masm.pri
++++ b/qtdeclarative/src/3rdparty/masm/masm.pri
+@@ -58,7 +58,7 @@ contains(DEFINES, WTF_USE_UDIS86=1) {
+ udis86.output = udis86_itab.h
+ udis86.input = ITAB
+ udis86.CONFIG += no_link
+- udis86.commands = $$QMAKE_PYTHON $$PWD/disassembler/udis86/itab.py ${QMAKE_FILE_IN}
++ udis86.commands = "\"$$QMAKE_PYTHON\"" $$PWD/disassembler/udis86/itab.py ${QMAKE_FILE_IN}
+ QMAKE_EXTRA_COMPILERS += udis86
+
+ udis86_tab_cfile.target = $$OUT_PWD/udis86_itab.c
+@@ -111,7 +111,7 @@ retgen.output = $$GENERATEDDIR/RegExpJitTables.h
+ retgen.script = $$PWD/yarr/create_regex_tables
+ retgen.input = retgen.script
+ retgen.CONFIG += no_link
+-retgen.commands = $$QMAKE_PYTHON $$retgen.script > ${QMAKE_FILE_OUT}
++retgen.commands = "\"$$QMAKE_PYTHON\"" $$retgen.script > ${QMAKE_FILE_OUT}
+ QMAKE_EXTRA_COMPILERS += retgen
+
+ # Taken from WebKit/Tools/qmake/mkspecs/features/unix/default_post.prf
diff --git a/var/spack/repos/builtin/packages/qtgraph/package.py b/var/spack/repos/builtin/packages/qtgraph/package.py
index ed5d649dcb..78aff2df9a 100644
--- a/var/spack/repos/builtin/packages/qtgraph/package.py
+++ b/var/spack/repos/builtin/packages/qtgraph/package.py
@@ -20,6 +20,8 @@ class Qtgraph(QMakePackage):
version("develop", branch="master")
version("1.0.0.0", branch="1.0.0.0")
+ depends_on("cxx", type="build") # generated
+
# qtgraph depends on these packages
depends_on("qt@5.10.0:", when="@1.0.0.0:")
diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py
index 391afc70f3..d840c19ffd 100644
--- a/var/spack/repos/builtin/packages/qthreads/package.py
+++ b/var/spack/repos/builtin/packages/qthreads/package.py
@@ -45,6 +45,9 @@ class Qthreads(AutotoolsPackage):
version("1.11", sha256="dbde6c7cb7de7e89921e47363d09cecaebf775c9d090496c2be8350355055571")
version("1.10", sha256="29fbc2e54bcbc814c1be13049790ee98c505f22f22ccee34b7c29a4295475656")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("restrict.patch", when="@:1.10")
patch("trap.patch", when="@:1.10")
@@ -111,7 +114,7 @@ class Qthreads(AutotoolsPackage):
def setup_build_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([join_path("test", "argparsing.h"), self.test_base_path])
+ cache_extra_test_sources(self, [join_path("test", "argparsing.h"), self.test_base_path])
def _build_and_run_test(self, test):
"""Build and run the test."""
diff --git a/var/spack/repos/builtin/packages/qtkeychain/package.py b/var/spack/repos/builtin/packages/qtkeychain/package.py
index b6ebbf2379..3909afe98a 100644
--- a/var/spack/repos/builtin/packages/qtkeychain/package.py
+++ b/var/spack/repos/builtin/packages/qtkeychain/package.py
@@ -16,6 +16,8 @@ class Qtkeychain(CMakePackage):
version("0.9.1", sha256="9c2762d9d0759a65cdb80106d547db83c6e9fdea66f1973c6e9014f867c6f28e")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt+dbus")
depends_on("libsecret")
diff --git a/var/spack/repos/builtin/packages/qtltools/package.py b/var/spack/repos/builtin/packages/qtltools/package.py
index b9393e8721..71388a715a 100644
--- a/var/spack/repos/builtin/packages/qtltools/package.py
+++ b/var/spack/repos/builtin/packages/qtltools/package.py
@@ -17,6 +17,8 @@ class Qtltools(MakefilePackage):
version("1.3.1", sha256="033b9b61923fd65c4b8b80bc0add321e6fd6fb40de49d15c2dfe6a4d7e60764a")
version("1.3", sha256="032020d7e038eac4ec01701343a887bced7cca356cbd24b3d5bbadf83686faeb")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost +pic +iostreams +program_options")
depends_on("gsl")
depends_on("htslib ~libcurl ~libdeflate")
diff --git a/var/spack/repos/builtin/packages/qualimap/package.py b/var/spack/repos/builtin/packages/qualimap/package.py
index bfa8af7060..69a327b552 100644
--- a/var/spack/repos/builtin/packages/qualimap/package.py
+++ b/var/spack/repos/builtin/packages/qualimap/package.py
@@ -17,6 +17,7 @@ class Qualimap(Package):
license("GPL-2.0-or-later")
+ version("2.3", sha256="2a04dd864b712da30923cce3bc8dfc6ea59612118e8b0ff1a246fe43b8d34c40")
version("2.2.1", sha256="08f1d66e49c83c76c56c4225c53aee44f41e0592c8bdc84b8c4ecd975700e045")
depends_on("java", type="run")
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py
index 861c21de19..76cb719bcf 100644
--- a/var/spack/repos/builtin/packages/quantum-espresso/package.py
+++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py
@@ -14,7 +14,7 @@ class QuantumEspresso(CMakePackage, Package):
pseudopotentials.
"""
- homepage = "http://quantum-espresso.org"
+ homepage = "https://quantum-espresso.org"
url = "https://gitlab.com/QEF/q-e/-/archive/qe-6.6/q-e-qe-6.6.tar.gz"
git = "https://gitlab.com/QEF/q-e.git"
@@ -25,6 +25,9 @@ class QuantumEspresso(CMakePackage, Package):
license("GPL-2.0-only")
version("develop", branch="develop")
+ version("7.4", sha256="b15dcfe25f4fbf15ccd34c1194021e90996393478226e601d876f7dea481d104")
+ version("7.3.1", sha256="2c58b8fadfe4177de5a8b69eba447db5e623420b070dea6fd26c1533b081d844")
+ version("7.3", sha256="edc2a0f3315c69966df4f82ec86ab9f682187bc9430ef6d2bacad5f27f08972c")
version("7.2", sha256="b348a4a7348b66a73545d9ca317a2645755c98d343c1cfe8def475ad030808c0")
version("7.1", sha256="d56dea096635808843bd5a9be2dee3d1f60407c01dbeeda03f8256a3bcfc4eb6")
version("7.0", sha256="85beceb1aaa1678a49e774c085866d4612d9d64108e0ac49b23152c8622880ee")
@@ -46,6 +49,10 @@ class QuantumEspresso(CMakePackage, Package):
version("5.4", sha256="e3993fccae9cea04a5c6492e8b961a053a63727051cb5c4eb6008f62cda8f335")
version("5.3", sha256="3b26038efb9e3f8ac7a2b950c31d8c29169a3556c0b68c299eb88a4be8dc9048")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
resource(
name="environ",
git="https://github.com/environ-developers/Environ.git",
@@ -72,13 +79,13 @@ class QuantumEspresso(CMakePackage, Package):
# Need OpenMP threaded FFTW and BLAS libraries when configured
# with OpenMP support
with when("+openmp"):
- depends_on("fftw+openmp", when="^fftw")
- depends_on("amdfftw+openmp", when="^amdfftw")
- depends_on("openblas threads=openmp", when="^openblas")
- depends_on("amdblis threads=openmp", when="^amdblis")
- depends_on("intel-mkl threads=openmp", when="^intel-mkl")
- depends_on("armpl-gcc threads=openmp", when="^armpl-gcc")
- depends_on("acfl threads=openmp", when="^acfl")
+ depends_on("fftw+openmp", when="^[virtuals=fftw-api] fftw")
+ depends_on("amdfftw+openmp", when="^[virtuals=fftw-api] amdfftw")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
+ depends_on("amdblis threads=openmp", when="^[virtuals=blas] amdblis")
+ depends_on("intel-mkl threads=openmp", when="^[virtuals=blas] intel-mkl")
+ depends_on("armpl-gcc threads=openmp", when="^[virtuals=blas] armpl-gcc")
+ depends_on("acfl threads=openmp", when="^[virtuals=blas] acfl")
# Add Cuda Fortran support
# depends on NVHPC compiler, not directly on CUDA toolkit
@@ -104,6 +111,9 @@ class QuantumEspresso(CMakePackage, Package):
with when("+nvtx~cuda"):
depends_on("cuda")
+ # CLOCK variant to display program time in seconds
+ variant("clock", default=False, description="Display program time in seconds")
+
# Apply upstream patches by default. Variant useful for 3rd party
# patches which are incompatible with upstream patches
desc = "Apply recommended upstream patches. May need to be set "
@@ -126,7 +136,7 @@ class QuantumEspresso(CMakePackage, Package):
# CMake builds only support elpa without openmp
depends_on("elpa~openmp", when="build_system=cmake")
with when("build_system=generic"):
- depends_on("elpa+openmp", when="+openmp")
+ depends_on("elpa", when="+openmp")
depends_on("elpa~openmp", when="~openmp")
# Elpa is formally supported by @:5.4.0, but QE configure searches
# for it in the wrong folders (or tries to download it within
@@ -216,11 +226,6 @@ class QuantumEspresso(CMakePackage, Package):
# EPW doesn't gets along well with OpenMPI 2.x.x
conflicts("^openmpi@2.0.0:2", msg="OpenMPI version incompatible with EPW")
- # EPW also doesn't gets along well with PGI 17.x + OpenMPI 1.10.7
- conflicts(
- "^openmpi@1.10.7%pgi@17.0:17.12", msg="PGI+OpenMPI version combo incompatible with EPW"
- )
-
variant(
"environ",
default=False,
@@ -291,6 +296,24 @@ class QuantumEspresso(CMakePackage, Package):
conflicts("@6.5:", when="+environ", msg="6.4.x is the latest QE series supported by Environ")
+ conflicts(
+ "@:7.3.0",
+ when="build_system=generic %oneapi",
+ msg="Support for ifx has been added to configure in release 7.3.1",
+ )
+ # Fixed in https://github.com/libmbd/libmbd/pull/60, which will be part of the next release
+ conflicts(
+ "@7.3.1",
+ when="%oneapi@2024.1:",
+ msg="ifx added f_c_string in the ISO_C_BINDING module since version 2024.1 which conflicts"
+ + "with the libmbd provided one.",
+ )
+
+ # 7.3 - a compile-time problem fixed in 7.3.1
+ patch_url = "https://gitlab.com/QEF/q-e/-/commit/b98ff7539e5731728d2d49ac01021a57f2594027.diff"
+ patch_checksum = "04c125d249d1f076abe04bc4de39bd3b44a41a78d6233b638a17bd96f91443d5"
+ patch(patch_url, sha256=patch_checksum, when="@=7.3+elpa build_system=cmake")
+
# QE 7.1 fix post-processing install part 1/2
# see: https://gitlab.com/QEF/q-e/-/merge_requests/2005
patch_url = "https://gitlab.com/QEF/q-e/-/commit/4ca3afd4c6f27afcf3f42415a85a353a7be1bd37.diff"
@@ -319,6 +342,11 @@ class QuantumEspresso(CMakePackage, Package):
patch_checksum = "72564c168231dd4a1279a74e76919af701d47cee9a851db6e205753004fe9bb5"
patch(patch_url, sha256=patch_checksum, when="@6.7+qmcpack")
+ # 6.6
+ patch_url = "https://gitlab.com/QEF/q-e/-/commit/081409ea90cba0ddc07bea5ac29e3cd422c67d3d.diff"
+ patch_checksum = "f43b7411e535629d9ef564a2e1695359df2651ecbdbca563f7265412afc2228a"
+ patch(patch_url, sha256=patch_checksum, when="@6.6:7.3.1")
+
# 6.4.1
patch_url = "https://raw.githubusercontent.com/QMCPACK/qmcpack/v3.13.0/external_codes/quantum_espresso/add_pw2qmcpack_to_qe-6.4.1.diff"
patch_checksum = "57cb1b06ee2653a87c3acc0dd4f09032fcf6ce6b8cbb9677ae9ceeb6a78f85e2"
@@ -426,6 +454,7 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("QE_ENABLE_LIBXC", "libxc"),
self.define_from_variant("QE_ENABLE_CUDA", "cuda"),
self.define_from_variant("QE_ENABLE_PROFILE_NVTX", "nvtx"),
+ self.define_from_variant("QE_CLOCK_SECONDS", "clock"),
self.define_from_variant("QE_ENABLE_MPI_GPU_AWARE", "mpigpu"),
]
diff --git a/var/spack/repos/builtin/packages/qucs/package.py b/var/spack/repos/builtin/packages/qucs/package.py
index 7d948dac68..8e9ee739c0 100644
--- a/var/spack/repos/builtin/packages/qucs/package.py
+++ b/var/spack/repos/builtin/packages/qucs/package.py
@@ -17,7 +17,7 @@ class Qucs(AutotoolsPackage):
on a presentation page or window.
"""
- homepage = "http://qucs.sourceforge.net/"
+ homepage = "https://qucs.sourceforge.net/"
url = "https://sourceforge.net/projects/qucs/files/qucs/0.0.19/qucs-0.0.19.tar.gz"
git = "https://git.code.sf.net/p/qucs/git"
@@ -25,6 +25,9 @@ class Qucs(AutotoolsPackage):
version("0.0.19", sha256="45c6434fde24c533e63550675ac21cdbd3cc6cbba29b82a1dc3f36e7dd4b3b3e")
version("0.0.18", sha256="3609a18b57485dc9f19886ac6694667f3251702175bd1cbbbea37981b2c482a7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Can use external simulators:
variant(
"simulators",
diff --git a/var/spack/repos/builtin/packages/quickjs/package.py b/var/spack/repos/builtin/packages/quickjs/package.py
index 6934726089..40b6deb3f1 100644
--- a/var/spack/repos/builtin/packages/quickjs/package.py
+++ b/var/spack/repos/builtin/packages/quickjs/package.py
@@ -27,6 +27,8 @@ class Quickjs(MakefilePackage):
"2020-09-06", sha256="0021a3e8cdc6b61e225411d05e2841d2437e1ccf4b4cabb9a5f7685ebfb57717"
)
+ depends_on("c", type="build") # generated
+
variant("lto", default=True, when="%gcc", description="Enable link-time optimization")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/quicksilver/package.py b/var/spack/repos/builtin/packages/quicksilver/package.py
index 81dfebea65..061619b2b7 100644
--- a/var/spack/repos/builtin/packages/quicksilver/package.py
+++ b/var/spack/repos/builtin/packages/quicksilver/package.py
@@ -13,7 +13,7 @@ class Quicksilver(MakefilePackage):
tags = ["proxy-app"]
- homepage = "https://codesign.llnl.gov/quicksilver.php"
+ homepage = "https://asc.llnl.gov/codes/proxy-apps/quicksilver"
url = "https://github.com/LLNL/Quicksilver/tarball/V1.0"
git = "https://github.com/LLNL/Quicksilver.git"
@@ -22,6 +22,8 @@ class Quicksilver(MakefilePackage):
version("master", branch="master")
version("1.0", sha256="83371603b169ec75e41fb358881b7bd498e83597cd251ff9e5c35769ef22c59a")
+ depends_on("cxx", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP support")
variant("mpi", default=True, description="Build with MPI support")
diff --git a/var/spack/repos/builtin/packages/quo-vadis/package.py b/var/spack/repos/builtin/packages/quo-vadis/package.py
index 52ab8be754..6bb6bd8ed4 100644
--- a/var/spack/repos/builtin/packages/quo-vadis/package.py
+++ b/var/spack/repos/builtin/packages/quo-vadis/package.py
@@ -19,6 +19,10 @@ class QuoVadis(CMakePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fortran", default=True, description="Build with Fortran bindings")
variant("mpi", default=True, description="Build with MPI support")
variant("mpipat", default=False, description="Affirm MPI processes are threads")
diff --git a/var/spack/repos/builtin/packages/quota/package.py b/var/spack/repos/builtin/packages/quota/package.py
index 0e2fe92028..0b41bbfbea 100644
--- a/var/spack/repos/builtin/packages/quota/package.py
+++ b/var/spack/repos/builtin/packages/quota/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Quota(AutotoolsPackage):
"""Linux Diskquota system as part of the Linux kernel."""
- homepage = "https://sourceforge.net/projects/linuxquota"
+ homepage = "https://sourceforge.net/projects/linuxquota/"
url = (
"https://udomain.dl.sourceforge.net/project/linuxquota/quota-tools/4.05/quota-4.05.tar.gz"
)
version("4.05", sha256="ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9")
+ depends_on("c", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
diff --git a/var/spack/repos/builtin/packages/qwt/package.py b/var/spack/repos/builtin/packages/qwt/package.py
index d9540fdf79..542ac58769 100644
--- a/var/spack/repos/builtin/packages/qwt/package.py
+++ b/var/spack/repos/builtin/packages/qwt/package.py
@@ -14,7 +14,7 @@ class Qwt(QMakePackage):
ranges of type double.
"""
- homepage = "http://qwt.sourceforge.net/"
+ homepage = "https://qwt.sourceforge.net/"
url = "https://sourceforge.net/projects/qwt/files/qwt/6.1.3/qwt-6.1.3.tar.bz2"
license("custom")
@@ -24,6 +24,8 @@ class Qwt(QMakePackage):
version("6.1.3", sha256="f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733")
version("5.2.2", sha256="36bf2ee51ca9c74fde1322510ffd39baac0db60d5d410bb157968a78d9c1464b")
+ depends_on("cxx", type="build") # generated
+
variant("designer", default=False, description="Build extensions to QT designer")
variant("opengl", default=False, description="Build OpenGL plot canvas")
diff --git a/var/spack/repos/builtin/packages/qwtpolar/package.py b/var/spack/repos/builtin/packages/qwtpolar/package.py
index 7e6fa96220..0ade495076 100644
--- a/var/spack/repos/builtin/packages/qwtpolar/package.py
+++ b/var/spack/repos/builtin/packages/qwtpolar/package.py
@@ -16,6 +16,8 @@ class Qwtpolar(QMakePackage):
version("1.1.1", sha256="6168baa9dbc8d527ae1ebf2631313291a1d545da268a05f4caa52ceadbe8b295")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt@4.4:")
depends_on("qwt@6.1:")
diff --git a/var/spack/repos/builtin/packages/r-abaenrichment/package.py b/var/spack/repos/builtin/packages/r-abaenrichment/package.py
index 52b9b30bce..57a724e141 100644
--- a/var/spack/repos/builtin/packages/r-abaenrichment/package.py
+++ b/var/spack/repos/builtin/packages/r-abaenrichment/package.py
@@ -33,6 +33,8 @@ class RAbaenrichment(RPackage):
version("1.8.0", commit="cb8155ee9a04fb55b2a2e8c23df7c0be15bb2624")
version("1.6.0", commit="d2a0467dcb7aa6e103e3b83dccd6510b0e142ac1")
+ depends_on("cxx", type="build") # generated
+
depends_on("r+X", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.8.0:")
diff --git a/var/spack/repos/builtin/packages/r-acepack/package.py b/var/spack/repos/builtin/packages/r-acepack/package.py
index 28353cb981..32eda730e5 100644
--- a/var/spack/repos/builtin/packages/r-acepack/package.py
+++ b/var/spack/repos/builtin/packages/r-acepack/package.py
@@ -29,4 +29,5 @@ class RAcepack(RPackage):
license("MIT")
+ version("1.4.2", sha256="5bffcd12b783f372bb6c50e35317744ac31597c91b6433442a7b0dce2f66ac91")
version("1.4.1", sha256="82750507926f02a696f6cc03693e8d4a5ee7e92500c8c15a16a9c12addcd28b9")
diff --git a/var/spack/repos/builtin/packages/r-acgh/package.py b/var/spack/repos/builtin/packages/r-acgh/package.py
index 4ff4c218c4..14d7d2fc8f 100644
--- a/var/spack/repos/builtin/packages/r-acgh/package.py
+++ b/var/spack/repos/builtin/packages/r-acgh/package.py
@@ -27,6 +27,8 @@ class RAcgh(RPackage):
version("1.56.0", commit="f3531ec99fc181044bdcb6a01c9976029efb6235")
version("1.54.0", commit="be2ed339449f55c8d218e10c435e4ad356683693")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-cluster", type=("build", "run"))
depends_on("r-survival", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-acme/package.py b/var/spack/repos/builtin/packages/r-acme/package.py
index 4e8b08b81e..24eb557dd2 100644
--- a/var/spack/repos/builtin/packages/r-acme/package.py
+++ b/var/spack/repos/builtin/packages/r-acme/package.py
@@ -32,6 +32,8 @@ class RAcme(RPackage):
version("2.34.0", commit="1f53d43e420e245423fdf2711d0dcb345f829469")
version("2.32.0", commit="76372255d7714a0c8128a11c028bf70214dac407")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-biobase@2.5.5:", type=("build", "run"))
depends_on("r-biocgenerics", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-adabag/package.py b/var/spack/repos/builtin/packages/r-adabag/package.py
index 343b8c468d..1f489a0c5b 100644
--- a/var/spack/repos/builtin/packages/r-adabag/package.py
+++ b/var/spack/repos/builtin/packages/r-adabag/package.py
@@ -34,12 +34,17 @@ class RAdabag(RPackage):
license("GPL-2.0-or-later")
+ version("5.0", sha256="ec58756fda2e64753d21e28d9e27ed34f28020045b199a58dcea06a3e2c3d60e")
version("4.2", sha256="47019eb8cefc8372996fbb2642f64d4a91d7cedc192690a8d8be6e7e03cd3c81")
version("4.1", sha256="ff938c36122cdf58a71a59a6bf79a3c7816966ee7cc4907c4a0a3c0732e3d028")
+ depends_on("r@4.0.0:", type=("build", "run"), when="@5.0:")
depends_on("r-rpart", type=("build", "run"))
depends_on("r-caret", type=("build", "run"))
- depends_on("r-foreach", type=("build", "run"))
+ depends_on("r-consrank@2.1.3:", type=("build", "run"), when="@5.0:")
depends_on("r-doparallel", type=("build", "run"))
+ depends_on("r-dplyr", type=("build", "run"), when="@5.0:")
+ depends_on("r-foreach", type=("build", "run"))
+ depends_on("r-tidyr", type=("build", "run"), when="@5.0:")
depends_on("r-mlbench", type=("build", "run"), when="@:4.1")
diff --git a/var/spack/repos/builtin/packages/r-ade4/package.py b/var/spack/repos/builtin/packages/r-ade4/package.py
index 00e03cb21a..3e98e658e1 100644
--- a/var/spack/repos/builtin/packages/r-ade4/package.py
+++ b/var/spack/repos/builtin/packages/r-ade4/package.py
@@ -30,6 +30,9 @@ class RAde4(RPackage):
version("1.7-11", sha256="4ccd799ae99bd625840b866a697c4a48adb751660470bf0d6cf9207b1927a572")
version("1.7-6", sha256="80848e1650dcc0ec921c130efa6f7e9b307f0d107c63e49faa52296eda19cc52")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
depends_on("r-pixmap", type=("build", "run"), when="@1.7-16:")
diff --git a/var/spack/repos/builtin/packages/r-adegenet/package.py b/var/spack/repos/builtin/packages/r-adegenet/package.py
index 50ab73ce47..4461324488 100644
--- a/var/spack/repos/builtin/packages/r-adegenet/package.py
+++ b/var/spack/repos/builtin/packages/r-adegenet/package.py
@@ -32,6 +32,8 @@ class RAdegenet(RPackage):
version("2.1.0", sha256="7ee44061002b41164bbc09256307ab02e536f4f2ac03f36c7dc8f85f6af4639a")
version("2.0.1", sha256="7eddf46e64f680d54d034b68c50900d9bd5bc2e08309d062e230121b7460bb10")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.14:", type=("build", "run"))
depends_on("r-ade4", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-adegraphics/package.py b/var/spack/repos/builtin/packages/r-adegraphics/package.py
index 1048a74d06..a83b2cce4d 100644
--- a/var/spack/repos/builtin/packages/r-adegraphics/package.py
+++ b/var/spack/repos/builtin/packages/r-adegraphics/package.py
@@ -17,6 +17,7 @@ class RAdegraphics(RPackage):
license("GPL-2.0-or-later")
+ version("1.0-21", sha256="e02a92b3a03220fd1f905f9541f506e43ad75b385a7febf74c80690364faeba8")
version("1.0-18", sha256="8fe07fc0f73e9917e098de2ee8e6fdb3e07775446683b6222692a3298e4d563c")
version("1.0-16", sha256="7ba59ce9aeefe1c25b4b118d08ef458ffd34115412c147cc428629e72a82ec3a")
version("1.0-15", sha256="87bbcd072e9a898955f5ede4315e82365086a50a2887bf5bd2e94bbb4d3f678a")
diff --git a/var/spack/repos/builtin/packages/r-adephylo/package.py b/var/spack/repos/builtin/packages/r-adephylo/package.py
index 225b8bc1cf..f113150a30 100644
--- a/var/spack/repos/builtin/packages/r-adephylo/package.py
+++ b/var/spack/repos/builtin/packages/r-adephylo/package.py
@@ -16,6 +16,7 @@ class RAdephylo(RPackage):
license("GPL-2.0-or-later")
+ version("1.1-16", sha256="b5ce5de26bbe6e40ca0650650acac3f613e5170d0b14dc5d6e6bbe83c416ce58")
version("1.1-13", sha256="2aa132fee9d0a14ac09b0a96af40ac332cb4e13c892908803c335aa7319ca76d")
version("1.1-11", sha256="154bf2645eac4493b85877933b9445442524ca4891aefe4e80c294c398cff61a")
diff --git a/var/spack/repos/builtin/packages/r-adespatial/package.py b/var/spack/repos/builtin/packages/r-adespatial/package.py
index 7fe07cbf9e..dbd61e3dc8 100644
--- a/var/spack/repos/builtin/packages/r-adespatial/package.py
+++ b/var/spack/repos/builtin/packages/r-adespatial/package.py
@@ -19,6 +19,7 @@ class RAdespatial(RPackage):
license("GPL-2.0-or-later")
+ version("0.3-23", sha256="70e0878b13212f9c450bf1e2bd1c5be87a1e24fed942941855a8dd2dd0c05f33")
version("0.3-21", sha256="4ff65f9bc05892a2d37d34ab2b77dbd24f980adc891f5f94f8e56aec771ea79f")
version("0.3-20", sha256="f88e009563087c52af5be490bd111cc38b0b70437bbfa189e846080a069b64eb")
version("0.3-19", sha256="db50f1c42961e40bcef6d714a89a09b1345dab2dd013cea8e2122fdf99d5d223")
diff --git a/var/spack/repos/builtin/packages/r-adsplit/package.py b/var/spack/repos/builtin/packages/r-adsplit/package.py
index 8a582acb53..b2d58a8cf5 100644
--- a/var/spack/repos/builtin/packages/r-adsplit/package.py
+++ b/var/spack/repos/builtin/packages/r-adsplit/package.py
@@ -27,6 +27,8 @@ class RAdsplit(RPackage):
version("1.48.0", commit="57dfcd93b9232cf53f05c34179ecb759bb7aff46")
version("1.46.0", commit="7e81a83f34d371447f491b3a146bf6851e260c7c")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.1.0:", type=("build", "run"))
depends_on("r-annotationdbi", type=("build", "run"))
depends_on("r-biobase@1.5.12:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-aer/package.py b/var/spack/repos/builtin/packages/r-aer/package.py
index 8e4e5b5702..013efef3cb 100644
--- a/var/spack/repos/builtin/packages/r-aer/package.py
+++ b/var/spack/repos/builtin/packages/r-aer/package.py
@@ -15,6 +15,7 @@ class RAer(RPackage):
cran = "AER"
+ version("1.2-12", sha256="55c7b0f17ecd0dc6e1c54ab09b40e89676f44658eaad444c818133fae8d1ea86")
version("1.2-10", sha256="650a5fb54a8addf8c86f1e0f88f4fac5349731bc5bf34762a991022140eedbdc")
version("1.2-9", sha256="3b79390b14766419fc1e8912689bc462d4beb01aff9dad26d628aed69d04540d")
version("1.2-7", sha256="3aee5c606313710c2dca6c1e9b2c20a145aa33f2a3ecc5cfcec66c8e91838a93")
diff --git a/var/spack/repos/builtin/packages/r-afex/package.py b/var/spack/repos/builtin/packages/r-afex/package.py
index 8d83780470..1cf3e17b72 100644
--- a/var/spack/repos/builtin/packages/r-afex/package.py
+++ b/var/spack/repos/builtin/packages/r-afex/package.py
@@ -26,6 +26,7 @@ class RAfex(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-1", sha256="4a64fb7e86e3d081e576c0d744d1613f391656082962c5799cf3fc5e2ca631a8")
version("1.3-0", sha256="f8e276a1070288c54b83db1d1214fd88fe8d8b8698cf0c2743ef2a45f61e1933")
version("1.2-1", sha256="e3a8cecd46db9521039275a5bf27937afb3ec4021644cc4fac94096cc585aacb")
version("1.2-0", sha256="8b57ffb8ba2f6354185fc79c8b0cab2703d753b89a100f4325bb2e4c7a3531c2")
diff --git a/var/spack/repos/builtin/packages/r-affxparser/package.py b/var/spack/repos/builtin/packages/r-affxparser/package.py
index 543556040a..8dd71d08e0 100644
--- a/var/spack/repos/builtin/packages/r-affxparser/package.py
+++ b/var/spack/repos/builtin/packages/r-affxparser/package.py
@@ -31,4 +31,7 @@ class RAffxparser(RPackage):
version("1.50.0", commit="01ef641727eadc2cc17b5dbb0b1432364436e3d5")
version("1.48.0", commit="2461ea88f310b59c4a9a997a4b3dadedbd65a4aa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.14.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-affy/package.py b/var/spack/repos/builtin/packages/r-affy/package.py
index 5fe87012da..30dd0e5789 100644
--- a/var/spack/repos/builtin/packages/r-affy/package.py
+++ b/var/spack/repos/builtin/packages/r-affy/package.py
@@ -26,6 +26,8 @@ class RAffy(RPackage):
version("1.56.0", commit="d36a7b8f05b1ef60162d94e75037d45c48f88871")
version("1.54.0", commit="a815f02906fcf491b28ed0a356d6fce95a6bd20e")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.8.0:4.0", type=("build", "run"), when="@:1.68.0")
depends_on("r-biocgenerics@0.1.12:", type=("build", "run"))
depends_on("r-biobase@2.5.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-affyio/package.py b/var/spack/repos/builtin/packages/r-affyio/package.py
index b32ca1b944..d8cd59aad6 100644
--- a/var/spack/repos/builtin/packages/r-affyio/package.py
+++ b/var/spack/repos/builtin/packages/r-affyio/package.py
@@ -26,6 +26,8 @@ class RAffyio(RPackage):
version("1.48.0", commit="01727a4492c3a0d50453fc91892e04bf5f7fcadb")
version("1.46.0", commit="977597f2772e08273d86579486f452170566c880")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.6.0:", type=("build", "run"))
depends_on("r-zlibbioc", type=("build", "run"))
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/r-affyplm/package.py b/var/spack/repos/builtin/packages/r-affyplm/package.py
index b760df5b02..b1b685e85a 100644
--- a/var/spack/repos/builtin/packages/r-affyplm/package.py
+++ b/var/spack/repos/builtin/packages/r-affyplm/package.py
@@ -28,6 +28,8 @@ class RAffyplm(RPackage):
version("1.54.0", commit="09cf5f6e01dd2d0aae3e9ddab27301f04bfd645c")
version("1.52.1", commit="e8613a6018c4ee58045df6bf19128844f50a1f43")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.6.0:", type=("build", "run"))
depends_on("r-biocgenerics@0.3.2:", type=("build", "run"))
depends_on("r-affy@1.11.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-amap/package.py b/var/spack/repos/builtin/packages/r-amap/package.py
index b440581cce..70f1a10a92 100644
--- a/var/spack/repos/builtin/packages/r-amap/package.py
+++ b/var/spack/repos/builtin/packages/r-amap/package.py
@@ -21,5 +21,9 @@ class RAmap(RPackage):
version("0.8-17", sha256="6b8473d1d35a9cbc611661882c8f681162e8f913f911ccd51629200ae72289c6")
version("0.8-16", sha256="d3775ad7f660581f7d2f070e426be95ae0d6743622943e6f5491988e5217d4e2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@0.8-17:")
diff --git a/var/spack/repos/builtin/packages/r-amelia/package.py b/var/spack/repos/builtin/packages/r-amelia/package.py
index ac36344365..d2a70da851 100644
--- a/var/spack/repos/builtin/packages/r-amelia/package.py
+++ b/var/spack/repos/builtin/packages/r-amelia/package.py
@@ -27,6 +27,7 @@ class RAmelia(RPackage):
cran = "Amelia"
+ version("1.8.2", sha256="4fb24a247ca20ba942e854f21e366fbbaf8fbcabc99efbb537511a10a732fc3e")
version("1.8.1", sha256="120ce62a2acfc845dbeb155ce3f33b41ebad324bc73693a918a95194a9fc47e4")
version("1.8.0", sha256="3ec1d5a68dac601b354227916aa8ec72fa1216b603dd887aae2b24cb69b5995e")
version("1.7.6", sha256="63c08d374aaf78af46c34dc78da719b3085e58d9fabdc76c6460d5193a621bea")
diff --git a/var/spack/repos/builtin/packages/r-analysispageserver/package.py b/var/spack/repos/builtin/packages/r-analysispageserver/package.py
index 386fcac2a0..b192ed5e60 100644
--- a/var/spack/repos/builtin/packages/r-analysispageserver/package.py
+++ b/var/spack/repos/builtin/packages/r-analysispageserver/package.py
@@ -21,6 +21,9 @@ class RAnalysispageserver(RPackage):
version("1.12.0", commit="146501974ef1938ee1ec4eb293ea7eeca331a0dc")
version("1.10.0", commit="876c87073be116fa15a1afdd407e21152eb80d50")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r-log4r", type=("build", "run"))
depends_on("r-rjson", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-aneufinder/package.py b/var/spack/repos/builtin/packages/r-aneufinder/package.py
index a4ef4ec68a..dda959bf5a 100644
--- a/var/spack/repos/builtin/packages/r-aneufinder/package.py
+++ b/var/spack/repos/builtin/packages/r-aneufinder/package.py
@@ -26,6 +26,8 @@ class RAneufinder(RPackage):
version("1.6.0", commit="0cfbdd1951fb4df5622e002260cfa86294d65d1d")
version("1.4.0", commit="e5bdf4d5e4f84ee5680986826ffed636ed853b8e")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@1.10.2:")
depends_on("r-genomicranges", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-anytime/package.py b/var/spack/repos/builtin/packages/r-anytime/package.py
index 292e55f637..c6e03b157e 100644
--- a/var/spack/repos/builtin/packages/r-anytime/package.py
+++ b/var/spack/repos/builtin/packages/r-anytime/package.py
@@ -20,6 +20,8 @@ class RAnytime(RPackage):
version("0.3.9", sha256="1096c15249ac70997a8a41c37eeb2a6d38530621abeae05d3dcd96a8acc7574a")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r-rcpp@0.12.9:", type=("build", "run"))
depends_on("r-bh", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-aod/package.py b/var/spack/repos/builtin/packages/r-aod/package.py
index bb1c02ed20..230890b99d 100644
--- a/var/spack/repos/builtin/packages/r-aod/package.py
+++ b/var/spack/repos/builtin/packages/r-aod/package.py
@@ -19,6 +19,7 @@ class RAod(RPackage):
license("GPL-2.0-or-later")
+ version("1.3.3", sha256="b7245e8abf7d78cdfa7f74f6d90f79a418b883058aa3edd5977a60bdbed4087e")
version("1.3.2", sha256="9b85be7b12b31ac076f2456853a5b18d8a79ce2b86d00055264529a0cd28515c")
version("1.3.1", sha256="052d8802500fcfdb3b37a8e3e6f3fbd5c3a54e48c3f68122402d2ea3a15403bc")
diff --git a/var/spack/repos/builtin/packages/r-ape/package.py b/var/spack/repos/builtin/packages/r-ape/package.py
index 79c01e29ef..7ab951511f 100644
--- a/var/spack/repos/builtin/packages/r-ape/package.py
+++ b/var/spack/repos/builtin/packages/r-ape/package.py
@@ -29,6 +29,7 @@ class RApe(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("5.8", sha256="24ce729979e1bcc60317e71e5100ce54156ceb7484917b0d64260f733ae84d24")
version("5.7-1", sha256="8b09c71218d8aa629e43bc807b433a4e30a61847d91b2810e31c366f0fe5057a")
version("5.6-2", sha256="9b62450a0390a1f07df007d348ad4cedcd814d42cb11c5a300ed33550fd41257")
version("5.6-1", sha256="25401e036576eed1200e15bf68879ccd85611303a3508b989e15164cd4c0f7f7")
diff --git a/var/spack/repos/builtin/packages/r-aplot/package.py b/var/spack/repos/builtin/packages/r-aplot/package.py
index a13354904e..537d9efc75 100644
--- a/var/spack/repos/builtin/packages/r-aplot/package.py
+++ b/var/spack/repos/builtin/packages/r-aplot/package.py
@@ -20,6 +20,7 @@ class RAplot(RPackage):
license("Artistic-2.0")
+ version("0.2.3", sha256="1fb062050199933f724164118cc3e5d85b60a3a4d4a466016bed2928b0310d6a")
version("0.1.10", sha256="d937768241f887628b88bb3b49dd6cbe9b7dae39ae7054e7380a9836721a67d1")
version("0.1.8", sha256="d931d7769dc7ce4bc938e8c068973721e89da0aa5f40a04f8a9119621b33459c")
version("0.1.7", sha256="f6250f5f6d1addc8d5717be80a92c569bfd83d35bce2e3dbeb251c9ae1be8616")
@@ -27,9 +28,11 @@ class RAplot(RPackage):
version("0.1.4", sha256="cde9dfc1c6b38e370c1f7338651c37727efa57d52b646fec6b021855809492ac")
version("0.1.2", sha256="899c4d101ddcedb1eba9803d78cf02288b63de25e2879add8add1165167509f0")
+ depends_on("r@4.1.0:", type=("build", "run"), when="@0.2.0:")
depends_on("r-ggfun@0.0.4:", type=("build", "run"), when="@0.1.2:")
depends_on("r-ggfun@0.0.6:", type=("build", "run"), when="@0.1.4:")
depends_on("r-ggfun@0.0.9:", type=("build", "run"), when="@0.1.10:")
+ depends_on("r-ggfun@0.1.3:", type=("build", "run"), when="@0.2.1:")
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-ggplotify", type=("build", "run"))
depends_on("r-patchwork", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-argparse/package.py b/var/spack/repos/builtin/packages/r-argparse/package.py
index fbacffb183..758c817412 100644
--- a/var/spack/repos/builtin/packages/r-argparse/package.py
+++ b/var/spack/repos/builtin/packages/r-argparse/package.py
@@ -17,6 +17,7 @@ class RArgparse(RPackage):
license("GPL-2.0-or-later")
+ version("2.2.3", sha256="a50cc4e1221f063e472a8cfe7e881a1d4abed5ef93cf40d5f65a2528cdfd2674")
version("2.2.2", sha256="b62c9bf5e6ca35fb7a2e614a916815c04cbf6c6db3f89f99b4df76470a4a856d")
version("2.1.6", sha256="2ad7faad795878b88969ac5d91ba38f4e96deb85dfea7148c3510f0eaa3de592")
version("2.1.5", sha256="83e112beb47733849980b286d93ac930f0cbe6ac78fcb94fc9f6b0eea882658d")
diff --git a/var/spack/repos/builtin/packages/r-arm/package.py b/var/spack/repos/builtin/packages/r-arm/package.py
new file mode 100644
index 0000000000..c451ac36e1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-arm/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RArm(RPackage):
+ """Functions to accompany A. Gelman and J. Hill, Data Analysis Using
+ Regression and Multilevel/Hierarchical Models, Cambridge University
+ Press, 2007."""
+
+ homepage = "https://github.com/suyusung/arm"
+ cran = "arm"
+
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+
+ version("1.14-4", sha256="425bcb0afea2efb668d15ed8daa430bb356c62587eba806fd91e37afac1807bd")
+
+ depends_on("r@3.1.0:", type=("build", "run"))
+ depends_on("r-mass", type=("build", "run"))
+ depends_on("r-matrix@1.0:", type=("build", "run"))
+ depends_on("r-lme4@1.0:", type=("build", "run"))
+ depends_on("r-abind", type=("build", "run"))
+ depends_on("r-coda", type=("build", "run"))
+ depends_on("r-nlme", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-arrangements/package.py b/var/spack/repos/builtin/packages/r-arrangements/package.py
index e45989522b..34c186409c 100644
--- a/var/spack/repos/builtin/packages/r-arrangements/package.py
+++ b/var/spack/repos/builtin/packages/r-arrangements/package.py
@@ -23,6 +23,8 @@ class RArrangements(RPackage):
version("1.1.9", sha256="e9b5dcb185ec9b28201b196384b04a8d5a15f4ddb9e0b0b2a0c718635ff7345b")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-gmp", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ash/package.py b/var/spack/repos/builtin/packages/r-ash/package.py
index 44ff67e71e..de2ec6bb69 100644
--- a/var/spack/repos/builtin/packages/r-ash/package.py
+++ b/var/spack/repos/builtin/packages/r-ash/package.py
@@ -17,3 +17,5 @@ class RAsh(RPackage):
license("GPL-2.0-or-later")
version("1.0-15", sha256="8b0a7bc39dd0ce2172f09edc5b5e029347d041a4d508bbff3f3fd6f69450c2ab")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-askpass/package.py b/var/spack/repos/builtin/packages/r-askpass/package.py
index 8c7d5a5d3e..76563eb0ef 100644
--- a/var/spack/repos/builtin/packages/r-askpass/package.py
+++ b/var/spack/repos/builtin/packages/r-askpass/package.py
@@ -22,6 +22,7 @@ class RAskpass(RPackage):
license("MIT")
+ version("1.2.0", sha256="b922369781934d0ffc8d0c0177e8ace56796c2e6a726f65e460c16f792592cef")
version("1.1", sha256="db40827d1bdbb90c0aa2846a2961d3bf9d76ad1b392302f9dd84cc2fd18c001f")
depends_on("r-sys@2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-asreml/package.py b/var/spack/repos/builtin/packages/r-asreml/package.py
new file mode 100644
index 0000000000..5cd9e69c6f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-asreml/package.py
@@ -0,0 +1,43 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RAsreml(RPackage):
+ """ASReml-R is a statistical package that fits linear mixed models using
+ Residual Maximum Likelihood (REML) in the R environment."""
+
+ homepage = "https://vsni.co.uk/software/asreml-r"
+
+ manual_download = True
+ license_required = True
+ license_vars = ["vsni_LICENSE"]
+ license_files = ["vsni.lic"]
+
+ maintainers("snehring")
+
+ license("UNKNOWN", checked_by="snehring")
+
+ version(
+ "4.2.0.302_R42", sha256="93196b68a987fd0a8d26fa7463cab60bd35c7be750c4832332945d71907425cd"
+ )
+ version(
+ "4.2.0.302_R43", sha256="0a685521c80e3263ebb852886d3e1bd31213bd83507e7fffca34261ae18523f9"
+ )
+
+ depends_on("r@4.2.0:4.2", type=("build", "run"), when="@4.2.0.302_R42")
+ depends_on("r@4.3.0:4.3", type=("build", "run"), when="@4.2.0.302_R43")
+ depends_on("r-data-table", type=("build", "run"))
+ depends_on("r-ggplot2", type=("build", "run"))
+ depends_on("r-jsonlite", type=("build", "run"))
+
+ def url_for_version(self, version):
+ return f"file://{os.getcwd()}//asreml_{version}_x86_64-pc-linux-gnu.tar.gz"
+
+ def setup_run_environment(self, env):
+ env.set("vsni_LICENSE", join_path(self.prefix, "vsni.lic"))
diff --git a/var/spack/repos/builtin/packages/r-assertive-code/package.py b/var/spack/repos/builtin/packages/r-assertive-code/package.py
index 81b3036035..cfab4f28a2 100644
--- a/var/spack/repos/builtin/packages/r-assertive-code/package.py
+++ b/var/spack/repos/builtin/packages/r-assertive-code/package.py
@@ -16,6 +16,7 @@ class RAssertiveCode(RPackage):
cran = "assertive.code"
+ version("0.0-4", sha256="2f820474ed20e06f65b284962c87cd1e85220a11cc7fcde09716f0eee5821387")
version("0.0-3", sha256="ef80e8d1d683d776a7618e78ddccffca7f72ab4a0fcead90c670bb8f8cb90be2")
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-backports/package.py b/var/spack/repos/builtin/packages/r-backports/package.py
index 45f7f2edd6..9fa8a9c63d 100644
--- a/var/spack/repos/builtin/packages/r-backports/package.py
+++ b/var/spack/repos/builtin/packages/r-backports/package.py
@@ -20,6 +20,7 @@ class RBackports(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.5.0", sha256="0d3ed9db8f1505e88967f48d669b2a257e0c6b7e6320ea64b946c1bd40897ca2")
version("1.4.1", sha256="845c3c59fbb05e5a892c4231b955a0afdd331d82b7cc815bcff0672023242474")
version("1.4.0", sha256="e7611565d24a852ad8b08579a7c67ad9121c1bda148bade98c7bec686e8dabbf")
version("1.2.1", sha256="a2834bbd57e305e5d8010322f1906ea1789b3b5ba5eca77c5ff4248aceb7c2d5")
diff --git a/var/spack/repos/builtin/packages/r-bamsignals/package.py b/var/spack/repos/builtin/packages/r-bamsignals/package.py
index 87e8bb9329..2911316cc2 100644
--- a/var/spack/repos/builtin/packages/r-bamsignals/package.py
+++ b/var/spack/repos/builtin/packages/r-bamsignals/package.py
@@ -27,6 +27,9 @@ class RBamsignals(RPackage):
version("1.10.0", commit="7499312ce71e8680680eda10b49d7dff682fc776")
version("1.8.0", commit="b123b83e8e026c9ec91209d4498aff3e95a5de23")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@1.28.0:")
depends_on("r-biocgenerics", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-base64enc/package.py b/var/spack/repos/builtin/packages/r-base64enc/package.py
index 452015432c..f733104ad4 100644
--- a/var/spack/repos/builtin/packages/r-base64enc/package.py
+++ b/var/spack/repos/builtin/packages/r-base64enc/package.py
@@ -18,4 +18,6 @@ class RBase64enc(RPackage):
version("0.1-3", sha256="6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.9.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bayesm/package.py b/var/spack/repos/builtin/packages/r-bayesm/package.py
index faebd2b48d..6af5198de1 100644
--- a/var/spack/repos/builtin/packages/r-bayesm/package.py
+++ b/var/spack/repos/builtin/packages/r-bayesm/package.py
@@ -33,6 +33,7 @@ class RBayesm(RPackage):
license("GPL-2.0-or-later")
+ version("3.1-6", sha256="17d72b9cdc090845f98e7a04640380d0baef8bc23d1487c8f64dc192fdb93cb5")
version("3.1-5", sha256="f223074ca41ede293b48350eac77a565e034f0f8cf3dd72d0e1d126cc58047a2")
version("3.1-4", sha256="061b216c62bc72eab8d646ad4075f2f78823f9913344a781fa53ea7cf4a48f94")
version("3.1-3", sha256="51e4827eca8cd4cf3626f3c2282543df7c392b3ffb843f4bfb386fe104642a10")
diff --git a/var/spack/repos/builtin/packages/r-bayesplot/package.py b/var/spack/repos/builtin/packages/r-bayesplot/package.py
index adec1f7beb..3910a5bca3 100644
--- a/var/spack/repos/builtin/packages/r-bayesplot/package.py
+++ b/var/spack/repos/builtin/packages/r-bayesplot/package.py
@@ -22,6 +22,7 @@ class RBayesplot(RPackage):
license("GPL-3.0-or-later")
+ version("1.11.1", sha256="4f71e67391e0135acd3e890989b87025f3f8160242f532a8e1a0ed74ed0f3830")
version("1.10.0", sha256="bb4cb92b1ae4cf8ae5f4b5cb092aba34af3d820d137e1f2265cca8f3e85113ff")
version("1.9.0", sha256="0a81a4b99cf781334e57cfc3c469fad8b932a68204016a3bbca33cab4e2a1e43")
version("1.8.1", sha256="d8d74201ea91fa5438714686ca22a947ec9375b6c12b0cfef010c57104b1aa2a")
@@ -30,7 +31,9 @@ class RBayesplot(RPackage):
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-dplyr@0.8.0:", type=("build", "run"))
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
+ depends_on("r-ggplot2@3.4.0:", type=("build", "run"), when="@1.11.0:")
depends_on("r-ggridges", type=("build", "run"))
+ depends_on("r-ggridges@0.5.5:", type=("build", "run"), when="@1.11.1:")
depends_on("r-glue", type=("build", "run"))
depends_on("r-posterior", type=("build", "run"), when="@1.9.0:")
depends_on("r-reshape2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bbmisc/package.py b/var/spack/repos/builtin/packages/r-bbmisc/package.py
index 1affd66f3c..7354c642d5 100644
--- a/var/spack/repos/builtin/packages/r-bbmisc/package.py
+++ b/var/spack/repos/builtin/packages/r-bbmisc/package.py
@@ -18,5 +18,7 @@ class RBbmisc(RPackage):
version("1.12", sha256="900a633f69b7d9b13d58709eeae2fca2c1bc510765d778623a2af32cc870053e")
version("1.11", sha256="1ea48c281825349d8642a661bb447e23bfd651db3599bf72593bfebe17b101d2")
+ depends_on("c", type="build") # generated
+
depends_on("r-checkmate@1.8.0:", type=("build", "run"))
depends_on("r-data-table", type=("build", "run"), when="@1.12:")
diff --git a/var/spack/repos/builtin/packages/r-beachmat/package.py b/var/spack/repos/builtin/packages/r-beachmat/package.py
index 32afab2129..1eb9ae6668 100644
--- a/var/spack/repos/builtin/packages/r-beachmat/package.py
+++ b/var/spack/repos/builtin/packages/r-beachmat/package.py
@@ -27,6 +27,8 @@ class RBeachmat(RPackage):
version("1.2.1", commit="ebae81772045a314e568c2f7d73ea3b27e7bf7d8")
version("1.0.2", commit="6bd57b91d6428ac916f46572d685d3cb01a757f7")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.4:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@1.2.1:1.4.0")
depends_on("r-delayedarray", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-beeswarm/package.py b/var/spack/repos/builtin/packages/r-beeswarm/package.py
index dc105aa4a7..b4abbf665f 100644
--- a/var/spack/repos/builtin/packages/r-beeswarm/package.py
+++ b/var/spack/repos/builtin/packages/r-beeswarm/package.py
@@ -18,3 +18,5 @@ class RBeeswarm(RPackage):
version("0.4.0", sha256="51f4339bf4080a2be84bb49a844c636625657fbed994abeaa42aead916c3d504")
version("0.2.3", sha256="0115425e210dced05da8e162c8455526a47314f72e441ad2a33dcab3f94ac843")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-bfast/package.py b/var/spack/repos/builtin/packages/r-bfast/package.py
index 7d933ac4ab..fd39499564 100644
--- a/var/spack/repos/builtin/packages/r-bfast/package.py
+++ b/var/spack/repos/builtin/packages/r-bfast/package.py
@@ -32,6 +32,8 @@ class RBfast(RPackage):
version("1.6.1", sha256="aaf479af1924691cbec8c67c68005c00d97cead51b2b44863c18acd4cea453ee")
version("1.5.7", sha256="01585fe8944d05ebdb13795214077bc1365f0c0372e2a1f7edb914356dace558")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.15.0:", type=("build", "run"))
depends_on("r@3.0.0:", type=("build", "run"), when="@1.6.1:")
depends_on("r-strucchangercpp", type=("build", "run"), when="@1.6.1:")
diff --git a/var/spack/repos/builtin/packages/r-bglr/package.py b/var/spack/repos/builtin/packages/r-bglr/package.py
index 98a96e20b9..0a9e961c88 100644
--- a/var/spack/repos/builtin/packages/r-bglr/package.py
+++ b/var/spack/repos/builtin/packages/r-bglr/package.py
@@ -13,6 +13,7 @@ class RBglr(RPackage):
license("GPL-3.0-only")
+ version("1.1.2", sha256="39476f3739bd86905a379e2d5de86ef1f8b0e10c311e350d95ce7aadb7b28224")
version("1.1.0", sha256="97c5bb8a461eb408e907693811b2d917efc993000da06591a83a3f5529451ea7")
version("1.0.9", sha256="440a96f9f502e0d6ecc8c00720d1ccdbab5ee8223e1def6c930edaa9a9de9099")
version("1.0.8", sha256="5e969590d80b2f272c02a43b487ab1ffa13af386e0342993e6ac484fc82c9b95")
diff --git a/var/spack/repos/builtin/packages/r-bh/package.py b/var/spack/repos/builtin/packages/r-bh/package.py
index ec028b901d..5745307b54 100644
--- a/var/spack/repos/builtin/packages/r-bh/package.py
+++ b/var/spack/repos/builtin/packages/r-bh/package.py
@@ -26,6 +26,7 @@ class RBh(RPackage):
cran = "BH"
+ version("1.84.0-0", sha256="6fb660755f572cd975073d7052075654acf8db12d208954ca223b8e4f77ef1ac")
version("1.81.0-1", sha256="f51c8badd6f181e06353314e1d15a6ec1495cc498ee74b6fa4ea8aba6e97ff64")
version("1.78.0-0", sha256="3b9e9d07682013e0c06a396dda176b405eab99a7273eca6c40d1b4c4110e8cb3")
version("1.75.0-0", sha256="ae4c10992607dd697663f60675a46a5770851da159330bb63c4a68890bdd6f5a")
diff --git a/var/spack/repos/builtin/packages/r-biasedurn/package.py b/var/spack/repos/builtin/packages/r-biasedurn/package.py
index 9b626313ab..4efc158c22 100644
--- a/var/spack/repos/builtin/packages/r-biasedurn/package.py
+++ b/var/spack/repos/builtin/packages/r-biasedurn/package.py
@@ -18,6 +18,7 @@ class RBiasedurn(RPackage):
cran = "BiasedUrn"
+ version("2.0.12", sha256="29b3b596431c5364e3be9aae2068adb44a205de31c66ec3fa1ef06a4ab8c5792")
version("2.0.9", sha256="bac62bbbc3e2417772f8784996a6c2d0857adb42e86e46b1a9703b187a406b09")
version("2.0.8", sha256="205e7f8da8fba76fbf4bd9d12a027599b685dedecc818aad39de5c51dc47b856")
version("1.07", sha256="2377c2e59d68e758a566452d7e07e88663ae61a182b9ee455d8b4269dda3228e")
diff --git a/var/spack/repos/builtin/packages/r-bigalgebra/package.py b/var/spack/repos/builtin/packages/r-bigalgebra/package.py
index 741c9a4ca2..229d37cdbb 100644
--- a/var/spack/repos/builtin/packages/r-bigalgebra/package.py
+++ b/var/spack/repos/builtin/packages/r-bigalgebra/package.py
@@ -22,6 +22,7 @@ class RBigalgebra(RPackage):
license("LGPL-3.0-only OR Apache-2.0")
+ version("1.1.1", sha256="fc6a48b940cca86caf8372648a1b1e4066f2f6d618a77303a1c8766c5b7bbf1f")
version("1.1.0", sha256="e51530287a64826a3dfb55f41594bc8123b7b4c9b2074f6c8de218fa8b525734")
version("1.0.1", sha256="ff7e261d0aa0e0f498e926d923ac62fc5cb783fa1f74bb2ff76a09167388a9d2")
version("1.0.0", sha256="f186b603bd660be0cc5b7a52c943e23e92fef264f0bc96a8858e38df6cfc4085")
diff --git a/var/spack/repos/builtin/packages/r-biglm/package.py b/var/spack/repos/builtin/packages/r-biglm/package.py
new file mode 100644
index 0000000000..9fd2391596
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-biglm/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RBiglm(RPackage):
+ """Regression for data too large to fit in memory."""
+
+ homepage = "https://cran.r-project.org/web/packages/biglm/index.html"
+ cran = "biglm"
+
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+
+ version("0.9-3", sha256="805d483dc58c041f1616267abeb39cecaaf7271a34e90668a5439383bf9a0d58")
+
+ depends_on("r-dbi", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bigmemory-sri/package.py b/var/spack/repos/builtin/packages/r-bigmemory-sri/package.py
index 80deb2b010..780050cf95 100644
--- a/var/spack/repos/builtin/packages/r-bigmemory-sri/package.py
+++ b/var/spack/repos/builtin/packages/r-bigmemory-sri/package.py
@@ -14,5 +14,6 @@ class RBigmemorySri(RPackage):
cran = "bigmemory.sri"
+ version("0.1.8", sha256="029a4ed24aa17636a20b83857d55fe6a9283acb8b647cbc75280dea8ec987771")
version("0.1.6", sha256="3bfa6ac966ce0ea93283f5856a853d0ee5ff85aedd7a7d1ca8a93d0aa642860c")
version("0.1.3", sha256="55403252d8bae9627476d1f553236ea5dc7aa6e54da6980526a6cdc66924e155")
diff --git a/var/spack/repos/builtin/packages/r-bigmemory/package.py b/var/spack/repos/builtin/packages/r-bigmemory/package.py
index caeca61193..24f9e0ec3b 100644
--- a/var/spack/repos/builtin/packages/r-bigmemory/package.py
+++ b/var/spack/repos/builtin/packages/r-bigmemory/package.py
@@ -18,6 +18,7 @@ class RBigmemory(RPackage):
license("LGPL-3.0-only OR Apache-2.0")
+ version("4.6.4", sha256="fe3f576c0d87fd2820c0f436a202261dff353e50e5b86dd9c80fdea7ad60002d")
version("4.6.1", sha256="b56e157c87ed6c4fc69d4cb9c697ae9a2001726e776e41aa7c48b35327b65141")
version("4.5.36", sha256="18c67fbe6344b2f8223456c4f19ceebcf6c1166255eab81311001fd67a45ef0e")
diff --git a/var/spack/repos/builtin/packages/r-bindrcpp/package.py b/var/spack/repos/builtin/packages/r-bindrcpp/package.py
index 8bb8749e99..dc804e6f7b 100644
--- a/var/spack/repos/builtin/packages/r-bindrcpp/package.py
+++ b/var/spack/repos/builtin/packages/r-bindrcpp/package.py
@@ -16,6 +16,7 @@ class RBindrcpp(RPackage):
license("MIT")
+ version("0.2.3", sha256="662dae785aee715855415f4e743281ccbf0832e426084dc2f0ca9c9c908ec9fa")
version("0.2.2", sha256="48130709eba9d133679a0e959e49a7b14acbce4f47c1e15c4ab46bd9e48ae467")
version("0.2", sha256="d0efa1313cb8148880f7902a4267de1dcedae916f28d9a0ef5911f44bf103450")
diff --git a/var/spack/repos/builtin/packages/r-bio3d/package.py b/var/spack/repos/builtin/packages/r-bio3d/package.py
index ebd95fd365..a93794734e 100644
--- a/var/spack/repos/builtin/packages/r-bio3d/package.py
+++ b/var/spack/repos/builtin/packages/r-bio3d/package.py
@@ -32,6 +32,9 @@ class RBio3d(RPackage):
version("2.4-1", sha256="679fbd87fe9fb82a65427d281d3b68906509e411270cd87d2deb95d404333c1f")
version("2.3-4", sha256="f9b39ab242cbedafcd98c1732cb1f5c0dd9ef66e28be39695e3420dd93e2bafe")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/r-biobase/package.py b/var/spack/repos/builtin/packages/r-biobase/package.py
index bdc2abc2ff..cc525ccaa5 100644
--- a/var/spack/repos/builtin/packages/r-biobase/package.py
+++ b/var/spack/repos/builtin/packages/r-biobase/package.py
@@ -25,6 +25,8 @@ class RBiobase(RPackage):
version("2.38.0", commit="83f89829e0278ac014b0bc6664e621ac147ba424")
version("2.36.2", commit="15f50912f3fa08ccb15c33b7baebe6b8a59ce075")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-biocgenerics@0.3.2:", type=("build", "run"))
depends_on("r-biocgenerics@0.27.1:", type=("build", "run"), when="@2.42.0:")
diff --git a/var/spack/repos/builtin/packages/r-biocmanager/package.py b/var/spack/repos/builtin/packages/r-biocmanager/package.py
index 8bf3a70367..40c1b0dc44 100644
--- a/var/spack/repos/builtin/packages/r-biocmanager/package.py
+++ b/var/spack/repos/builtin/packages/r-biocmanager/package.py
@@ -13,6 +13,7 @@ class RBiocmanager(RPackage):
cran = "BiocManager"
+ version("1.30.24", sha256="645c423bb144dbd476cb308678bd36e06c1a3494115f157166dd3f59955ec7d1")
version("1.30.20", sha256="b9e72d7687abbd785a69fecb530ec86ad92257a6be95b8e15953b193a516d5ea")
version("1.30.19", sha256="6897ab1c58ab2fa3108e22d70bc4150c683bb4ac29355ba7886b88acc30c18e2")
version("1.30.18", sha256="f763126b45614e1b83260da5311923eac50db24002f3c22fa5f667434a5b5c35")
diff --git a/var/spack/repos/builtin/packages/r-biocneighbors/package.py b/var/spack/repos/builtin/packages/r-biocneighbors/package.py
index c9b62f26a2..e2118563c1 100644
--- a/var/spack/repos/builtin/packages/r-biocneighbors/package.py
+++ b/var/spack/repos/builtin/packages/r-biocneighbors/package.py
@@ -29,6 +29,8 @@ class RBiocneighbors(RPackage):
version("1.2.0", commit="f754c6300f835142536a4594ddf750481e0fe273")
version("1.0.0", commit="e252fc04b6d22097f2c5f74406e77d85e7060770")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5:", type=("build", "run"), when="@1.0.0")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-s4vectors", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-biocparallel/package.py b/var/spack/repos/builtin/packages/r-biocparallel/package.py
index 3f61181f28..5caab131cb 100644
--- a/var/spack/repos/builtin/packages/r-biocparallel/package.py
+++ b/var/spack/repos/builtin/packages/r-biocparallel/package.py
@@ -27,6 +27,8 @@ class RBiocparallel(RPackage):
version("1.12.0", commit="2143a9addceed0151a27b95c70aadd2add5cbace")
version("1.10.1", commit="a76c58cf99fd585ba5ea33065649e68f1afe0a7d")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5.0:", type=("build", "run"), when="@1.28.3:")
depends_on("r-futile-logger", type=("build", "run"))
depends_on("r-snow", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-biocsingular/package.py b/var/spack/repos/builtin/packages/r-biocsingular/package.py
index 4546a53020..382eda5e3a 100644
--- a/var/spack/repos/builtin/packages/r-biocsingular/package.py
+++ b/var/spack/repos/builtin/packages/r-biocsingular/package.py
@@ -24,6 +24,8 @@ class RBiocsingular(RPackage):
version("1.6.0", commit="11baf1080d6f791439cd5d97357589d6451643d9")
version("1.0.0", commit="d2b091c072d0312698c9bb6611eb1bdf8aebf833")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-biocgenerics", type=("build", "run"))
depends_on("r-s4vectors", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-biomartr/package.py b/var/spack/repos/builtin/packages/r-biomartr/package.py
index cef67089bb..cc61ee3ef5 100644
--- a/var/spack/repos/builtin/packages/r-biomartr/package.py
+++ b/var/spack/repos/builtin/packages/r-biomartr/package.py
@@ -25,6 +25,7 @@ class RBiomartr(RPackage):
license("GPL-2.0-only")
+ version("1.0.7", sha256="9d1d5c51b61ee67ce7ca18afdb0a136ef5709d92d077d80163f9d52ee6c28645")
version("1.0.2", sha256="7fd6cccd915aa39e593fb7591107ab9792d98a119dd42f3f666e5184f4e42743")
version("0.9.2", sha256="d88085696e9c5614828602254c33f2cdd3bbfeebc2f21a705eee3cb961097c89")
diff --git a/var/spack/repos/builtin/packages/r-biostrings/package.py b/var/spack/repos/builtin/packages/r-biostrings/package.py
index 796a66344f..6164529db2 100644
--- a/var/spack/repos/builtin/packages/r-biostrings/package.py
+++ b/var/spack/repos/builtin/packages/r-biostrings/package.py
@@ -27,6 +27,8 @@ class RBiostrings(RPackage):
version("2.46.0", commit="3bf6978c155498b50607d1bb471d1687d185a0fa")
version("2.44.2", commit="e4a2b320fb21c5cab3ece7b3c6fecaedfb1e5200")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.8.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@2.50.2:")
depends_on("r@4.0.0:", type=("build", "run"), when="@2.62.0:")
diff --git a/var/spack/repos/builtin/packages/r-biovizbase/package.py b/var/spack/repos/builtin/packages/r-biovizbase/package.py
index d2f16d9104..a5cf3b4eed 100644
--- a/var/spack/repos/builtin/packages/r-biovizbase/package.py
+++ b/var/spack/repos/builtin/packages/r-biovizbase/package.py
@@ -27,6 +27,8 @@ class RBiovizbase(RPackage):
version("1.26.0", commit="640742f48384f01d117b70dc5c64737e97ae9b4b")
version("1.24.0", commit="ae9cd2ff665b74a8f45ed9c1d17fc0a778b4af6c")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@1.38.0:")
depends_on("r-scales", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bit/package.py b/var/spack/repos/builtin/packages/r-bit/package.py
index c386c3b77b..5975ecd827 100644
--- a/var/spack/repos/builtin/packages/r-bit/package.py
+++ b/var/spack/repos/builtin/packages/r-bit/package.py
@@ -23,4 +23,6 @@ class RBit(RPackage):
version("1.1-14", sha256="5cbaace1fb643a665a6ca69b90f7a6d624270de82420ca7a44f306753fcef254")
version("1.1-12", sha256="ce281c87fb7602bf1a599e72f3e25f9ff7a13e390c124a4506087f69ad79d128")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.9.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bit64/package.py b/var/spack/repos/builtin/packages/r-bit64/package.py
index a7e9027e82..717700888f 100644
--- a/var/spack/repos/builtin/packages/r-bit64/package.py
+++ b/var/spack/repos/builtin/packages/r-bit64/package.py
@@ -28,6 +28,8 @@ class RBit64(RPackage):
version("4.0.5", sha256="25df6826ea5e93241c4874cad4fa8dadc87a40f4ff74c9107aa12a9e033e1578")
version("0.9-7", sha256="7b9aaa7f971198728c3629f9ba1a1b24d53db5c7e459498b0fdf86bbd3dff61f")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.0.1:", type=("build", "run"))
depends_on("r-bit@1.1-12:", type=("build", "run"))
depends_on("r-bit@4.0.0:", type=("build", "run"), when="@4.0.5:")
diff --git a/var/spack/repos/builtin/packages/r-bitops/package.py b/var/spack/repos/builtin/packages/r-bitops/package.py
index 07d2a29ad2..7cfcdeb49b 100644
--- a/var/spack/repos/builtin/packages/r-bitops/package.py
+++ b/var/spack/repos/builtin/packages/r-bitops/package.py
@@ -16,5 +16,8 @@ class RBitops(RPackage):
license("GPL-2.0-or-later")
+ version("1.0-8", sha256="78a14b9f69645dc65e1973e1f1a9968c53d5c5edc6aa1ac85661e1112f212738")
version("1.0-7", sha256="e9b5fc92c39f94a10cd0e13f3d6e2a9c17b75ea01467077a51d47a5f708517c4")
version("1.0-6", sha256="9b731397b7166dd54941fb0d2eac6df60c7a483b2e790f7eb15b4d7b79c9d69c")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-blavaan/package.py b/var/spack/repos/builtin/packages/r-blavaan/package.py
index 5858afc324..c6e8ec7059 100644
--- a/var/spack/repos/builtin/packages/r-blavaan/package.py
+++ b/var/spack/repos/builtin/packages/r-blavaan/package.py
@@ -18,6 +18,7 @@ class RBlavaan(RPackage):
license("GPL-3.0-or-later")
+ version("0.5-5", sha256="a8d3bc5e9d15a2e8496950e87ed3c6bc6d769e761ec068e1f063f2d255330b6d")
version("0.4-7", sha256="43577264a1faff3cf98fce2c03b729816b40a82d36846458b8026b62da3008c3")
version("0.4-3", sha256="a9f9f7b32aab7e7f179340c9f0f9d154b5fac51352c4fd590d317c201fe81b74")
version("0.4-1", sha256="afb077d72f84ef0b6f45ef2ccb8335358042943c32a3472a9ca239ebca1c4aa4")
@@ -29,6 +30,7 @@ class RBlavaan(RPackage):
depends_on("r-lavaan@0.6-7:", type=("build", "run"), when="@0.3-18:")
depends_on("r-lavaan@0.6-10:", type=("build", "run"), when="@0.4-1:")
depends_on("r-lavaan@0.6-14:", type=("build", "run"), when="@0.4-7:")
+ depends_on("r-lavaan@0.6-17:", type=("build", "run"), when="@0.5-3:")
depends_on("r-rcpp@0.12.15:", type=("build", "run"))
depends_on("r-coda", type=("build", "run"))
depends_on("r-mnormt", type=("build", "run"))
@@ -36,6 +38,7 @@ class RBlavaan(RPackage):
depends_on("r-loo@2.0:", type=("build", "run"))
depends_on("r-rstan@2.19.2:", type=("build", "run"))
depends_on("r-rstan@2.21.2:", type=("build", "run"), when="@0.3-18:")
+ depends_on("r-rstan@2.26.0:", type=("build", "run"), when="@0.5-2:")
depends_on("r-rstantools@1.5.0:", type=("build", "run"))
depends_on("r-rcppparallel@5.0.1:", type=("build", "run"))
depends_on("r-bayesplot", type=("build", "run"))
@@ -43,6 +46,7 @@ class RBlavaan(RPackage):
depends_on("r-future-apply", type=("build", "run"))
depends_on("r-tmvnsim", type=("build", "run"), when="@0.3-18:")
depends_on("r-stanheaders@2.18.1:", type=("build", "run"))
+ depends_on("r-stanheaders@2.26.0:", type=("build", "run"), when="@0.5-2:")
depends_on("r-bh@1.69.0:", type=("build", "run"))
depends_on("r-rcppeigen@0.3.3.4.0:", type=("build", "run"))
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/r-blockmodeling/package.py b/var/spack/repos/builtin/packages/r-blockmodeling/package.py
index bc330e7b02..a8fc9d5846 100644
--- a/var/spack/repos/builtin/packages/r-blockmodeling/package.py
+++ b/var/spack/repos/builtin/packages/r-blockmodeling/package.py
@@ -16,6 +16,7 @@ class RBlockmodeling(RPackage):
license("GPL-2.0-or-later")
+ version("1.1.5", sha256="3b6f910078c29b801651e3a686112e41e456c517e1b99fcda11bb12681bb1503")
version("1.1.4", sha256="69ce17ed96ca754a6308edb62188e0040e357568b975ce8986f68ecb2fead2b8")
version("1.1.3", sha256="5f705f92c9b96dcbdd6f109c6a99f88d70c576485369700b82391b6a75afbda6")
version("1.0.5", sha256="18c227bb52f28aff4dae8929563474e3e006e238438c823b67dc6baa897f88ed")
diff --git a/var/spack/repos/builtin/packages/r-bluster/package.py b/var/spack/repos/builtin/packages/r-bluster/package.py
index da733833a5..367682bbb7 100644
--- a/var/spack/repos/builtin/packages/r-bluster/package.py
+++ b/var/spack/repos/builtin/packages/r-bluster/package.py
@@ -20,6 +20,8 @@ class RBluster(RPackage):
version("1.8.0", commit="156115c8960c0b66b2c588d9fd8bbdfe56e5f0be")
version("1.6.0", commit="ff86c7d8d36233e838d4f00e6a4e173e7bf16816")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-cluster", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bookdown/package.py b/var/spack/repos/builtin/packages/r-bookdown/package.py
index b798a80533..2346bd0d86 100644
--- a/var/spack/repos/builtin/packages/r-bookdown/package.py
+++ b/var/spack/repos/builtin/packages/r-bookdown/package.py
@@ -16,6 +16,7 @@ class RBookdown(RPackage):
license("GPL-3.0-only")
+ version("0.40", sha256="58df4a044704b6c42a397f4e430a7fc8f6171bad1447872119aceafd158eac39")
version("0.33", sha256="2288e1d0c383e6ab49202a18db6cc1a04c3adc1b25da646cc46167bc6c2892c3")
version("0.29", sha256="5b4e3dc44a5c6574e3d9e19ebe7897d3ddcf6eaffe8214e1d272b545929ff723")
version("0.26", sha256="c6207288cb72ea7c555cbad449c61278e94b742cac1f610879fb3f2d60b2b185")
@@ -41,6 +42,7 @@ class RBookdown(RPackage):
depends_on("r-xfun@0.13:", type=("build", "run"), when="@0.21:")
depends_on("r-xfun@0.22:", type=("build", "run"), when="@0.24:")
depends_on("r-xfun@0.29:", type=("build", "run"), when="@0.26:")
+ depends_on("r-xfun@0.39:", type=("build", "run"), when="@0.34:")
depends_on("r-tinytex@0.12:", type=("build", "run"), when="@0.12:")
depends_on("r-yaml@2.1.14:", type=("build", "run"))
depends_on("r-yaml@2.1.19:", type=("build", "run"), when="@0.21:")
diff --git a/var/spack/repos/builtin/packages/r-boot/package.py b/var/spack/repos/builtin/packages/r-boot/package.py
index ae81554a16..1d7b2442cb 100644
--- a/var/spack/repos/builtin/packages/r-boot/package.py
+++ b/var/spack/repos/builtin/packages/r-boot/package.py
@@ -17,6 +17,7 @@ class RBoot(RPackage):
license("custom")
+ version("1.3-30", sha256="5509d62bd6e6c21b6ef352ab7846d89027bddbfb727fd0cf55da59558bd3fe97")
version("1.3-28.1", sha256="d4cde76fcc8ccc7ffa329de69147b66a6a93a10188e89342fd18207b1d02ff53")
version("1.3-28", sha256="9f7158fd2714659f590c3955651893dc24bd8f39196bc5a4cc35b0b031744a32")
version("1.3-25", sha256="464835fcb453072346ce49e4ae318e04c9dba682349be49db616623b6088fbbe")
diff --git a/var/spack/repos/builtin/packages/r-brew/package.py b/var/spack/repos/builtin/packages/r-brew/package.py
index 1e2398a8ea..df202638bc 100644
--- a/var/spack/repos/builtin/packages/r-brew/package.py
+++ b/var/spack/repos/builtin/packages/r-brew/package.py
@@ -17,6 +17,7 @@ class RBrew(RPackage):
license("GPL-2.0-only")
+ version("1.0-10", sha256="4181f7334e032ae0775c5dec49d6137eb25d5430ca3792d321793307b3dda38f")
version("1.0-8", sha256="11652d5a7042d645cc5be5f9f97ff4d46083cea7d3ad2dd6ad1570b52c097826")
version("1.0-7", sha256="38b859c1dca63479f6937c593da8f806f2b3279585bb6e20ecff1b898469e76e")
version("1.0-6", sha256="d70d1a9a01cf4a923b4f11e4374ffd887ad3ff964f35c6f9dc0f29c8d657f0ed")
diff --git a/var/spack/repos/builtin/packages/r-bridgesampling/package.py b/var/spack/repos/builtin/packages/r-bridgesampling/package.py
index 61a5c61511..501306d0d0 100644
--- a/var/spack/repos/builtin/packages/r-bridgesampling/package.py
+++ b/var/spack/repos/builtin/packages/r-bridgesampling/package.py
@@ -21,6 +21,8 @@ class RBridgesampling(RPackage):
version("1.1-2", sha256="54ecd39aa2e36d4d521d3d36425f9fe56a3f8547df6048c814c5931d790f3e6b")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-mvtnorm", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-brio/package.py b/var/spack/repos/builtin/packages/r-brio/package.py
index c4feef388b..310d3f655b 100644
--- a/var/spack/repos/builtin/packages/r-brio/package.py
+++ b/var/spack/repos/builtin/packages/r-brio/package.py
@@ -17,5 +17,8 @@ class RBrio(RPackage):
license("MIT")
+ version("1.1.5", sha256="a9f22335ea39039de25bb27bccd5ff1ffb2b743579b31d150b6b91c9ea81d0b8")
version("1.1.3", sha256="eaa89041856189bee545bf1c42c7920a0bb0f1f70bb477487c467ee3e8fedcc6")
version("1.1.0", sha256="6bb3a3b47bea13f1a1e3dcdc8b9f688502643e4b40a481a34aa04a261aabea38")
+
+ depends_on("r@3.6:", when="@1.1.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-brms/package.py b/var/spack/repos/builtin/packages/r-brms/package.py
index e1ce9accb9..45567c81d8 100644
--- a/var/spack/repos/builtin/packages/r-brms/package.py
+++ b/var/spack/repos/builtin/packages/r-brms/package.py
@@ -29,6 +29,7 @@ class RBrms(RPackage):
license("GPL-2.0-only")
+ version("2.21.0", sha256="7289ff33c2a4b83584b7fece0a6aa53fd14b5881a467d417fbca5dbf62ec5d58")
version("2.19.0", sha256="0e146842c7acfcc6b8273df536eabb5279fb3bf2ae27ce1696f7d838d94fe5c1")
version("2.18.0", sha256="63914be03cd1c4e6333317d22d7827ba2dc0414cb0dc88337cf74763ba07e111")
version("2.17.0", sha256="24e5a3a40b81bea558e8f660d0de7fd1a4c2080c7553baac98f34dd2682ece71")
@@ -37,20 +38,22 @@ class RBrms(RPackage):
version("2.15.0", sha256="c11701d1d8758590b74bb845b568b736e4455a81b114c7dfde0b27b7bd1bcc2f")
depends_on("r@3.5.0:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@2.20.1:")
depends_on("r-rcpp@0.12.0:", type=("build", "run"))
depends_on("r-rstan@2.19.2:", type=("build", "run"))
+ depends_on("r-rstan@2.29.0:", type=("build", "run"), when="@2.21.0:")
depends_on("r-ggplot2@2.0.0:", type=("build", "run"))
depends_on("r-loo@2.3.1:", type=("build", "run"))
depends_on("r-posterior@1.0.0:", type=("build", "run"), when="@2.16:")
- depends_on("r-matrix@1.1.1:", type=("build", "run"))
+ depends_on("r-matrix@1.1-1:", type=("build", "run"))
depends_on("r-mgcv@1.8-13:", type=("build", "run"))
depends_on("r-rstantools@2.1.1:", type=("build", "run"))
depends_on("r-bayesplot@1.5.0:", type=("build", "run"))
- depends_on("r-shinystan@2.4.0:", type=("build", "run"))
depends_on("r-bridgesampling@0.3-0:", type=("build", "run"))
depends_on("r-glue@1.3.0:", type=("build", "run"))
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@2.19.0:")
depends_on("r-future@1.19.0:", type=("build", "run"))
+ depends_on("r-future-apply@1.0.0:", type=("build", "run"), when="@2.21.0:")
depends_on("r-matrixstats", type=("build", "run"))
depends_on("r-nleqslv", type=("build", "run"))
depends_on("r-nlme", type=("build", "run"))
@@ -58,4 +61,5 @@ class RBrms(RPackage):
depends_on("r-abind", type=("build", "run"))
depends_on("r-backports", type=("build", "run"))
+ depends_on("r-shinystan@2.4.0:", type=("build", "run"), when="@:2.20.4")
depends_on("r-projpred@2.0.0:", type=("build", "run"), when="@:2.16.1")
diff --git a/var/spack/repos/builtin/packages/r-broom-helpers/package.py b/var/spack/repos/builtin/packages/r-broom-helpers/package.py
new file mode 100644
index 0000000000..ac7b5314be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-broom-helpers/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RBroomHelpers(RPackage):
+ """Provides suite of functions to work with regression model 'broom::tidy()'
+ tibbles. The suite includes functions to group regression model terms by
+ variable, insert reference and header rows for categorical variables, add
+ variable labels, and more."""
+
+ homepage = "https://larmarange.github.io/broom.helpers/"
+ cran = "broom.helpers"
+
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+
+ version("1.16.0", sha256="9a7bac8678cdcc9a7e0f3b6d287d375fd5f1e880c916ac4d661f02c2c84e2715")
+
+ depends_on("r@4.2:", type=("build", "run"), when="@1.16.0:")
+ depends_on("r-broom@0.8:", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"))
+ depends_on("r-dplyr", type=("build", "run"))
+ depends_on("r-labelled", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"))
+ depends_on("r-purrr", type=("build", "run"))
+ depends_on("r-rlang@1.0.1:", type=("build", "run"))
+ depends_on("r-stringr", type=("build", "run"))
+ depends_on("r-tibble", type=("build", "run"))
+ depends_on("r-tidyr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-broom/package.py b/var/spack/repos/builtin/packages/r-broom/package.py
index 0f48847a4c..f755b886c9 100644
--- a/var/spack/repos/builtin/packages/r-broom/package.py
+++ b/var/spack/repos/builtin/packages/r-broom/package.py
@@ -22,6 +22,7 @@ class RBroom(RPackage):
license("MIT")
+ version("1.0.6", sha256="24cf36248dffbde38d3d81befa679e362bfd0526b9843bc536a85452a19fbccf")
version("1.0.4", sha256="1d5f11b509786a8a45ffdd137243e24d6445f2944947cbd62a0734a06add0ad6")
version("1.0.1", sha256="4b5e5aa485f0e23ed993088fc84159e31a00087e3a12327071dda25193382892")
version("0.8.0", sha256="66a1095d4430450dc810a5cea61cd7e7bee0e23739dcf5ddc5b57c9894fcf999")
@@ -39,7 +40,6 @@ class RBroom(RPackage):
depends_on("r-backports", type=("build", "run"), when="@0.5.0:")
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-dplyr@1.0.0:", type=("build", "run"), when="@0.7.3:")
- depends_on("r-ellipsis", type=("build", "run"), when="@0.7.3:")
depends_on("r-generics@0.0.2:", type=("build", "run"), when="@0.5.1:")
depends_on("r-glue", type=("build", "run"), when="@0.7.3:")
depends_on("r-lifecycle", type=("build", "run"), when="@1.0.4:")
@@ -51,6 +51,7 @@ class RBroom(RPackage):
depends_on("r-tidyr", type=("build", "run"))
depends_on("r-tidyr@1.0.0:", type=("build", "run"), when="@0.7.3:")
+ depends_on("r-ellipsis", type=("build", "run"), when="@0.7.3:1.0.5")
depends_on("r-plyr", type=("build", "run"), when="@:0.4.2")
depends_on("r-psych", type=("build", "run"), when="@:0.4.2")
depends_on("r-reshape2", type=("build", "run"), when="@:0.5.2")
diff --git a/var/spack/repos/builtin/packages/r-bslib/package.py b/var/spack/repos/builtin/packages/r-bslib/package.py
index f664c30959..d277073d6a 100644
--- a/var/spack/repos/builtin/packages/r-bslib/package.py
+++ b/var/spack/repos/builtin/packages/r-bslib/package.py
@@ -18,20 +18,27 @@ class RBslib(RPackage):
license("MIT")
+ version("0.8.0", sha256="fd182ddb1b128691d2b0c12882361732a23d451dbf4052ba70b11257e8d44b03")
version("0.4.2", sha256="9a40b7a1bbe409af273e1e940d921ab198ea576548f06f055f552f70ff822f19")
version("0.4.1", sha256="4ebd1fc84cd19b414e8f8c13fb95270fc28ede125b6e58b08c574ca8c9e0e62f")
version("0.4.0", sha256="fbea4ecec726f23618e825624f1d9c03939f765ca5a490b171ebf95b815475c2")
version("0.3.1", sha256="5f5cb56e5cab9039a24cd9d70d73b69c2cab5b2f5f37afc15f71dae0339d9849")
depends_on("r@2.10:", type=("build", "run"))
+ depends_on("r-fastmap@1.1.1:", type=("build", "run"), when="@0.7.0:")
depends_on("r-htmltools@0.5.2:", type=("build", "run"))
depends_on("r-htmltools@0.5.4:", type=("build", "run"), when="@0.4.2:")
+ depends_on("r-htmltools@0.5.7:", type=("build", "run"), when="@0.6.0:")
+ depends_on("r-htmltools@0.5.8:", type=("build", "run"), when="@0.7.0:")
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-sass@0.4.0:", type=("build", "run"))
depends_on("r-jquerylib@0.1.3:", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@0.6.0:")
depends_on("r-rlang", type=("build", "run"))
depends_on("r-memoise", type=("build", "run"), when="@0.4.0:")
depends_on("r-memoise@2.0.1:", type=("build", "run"), when="@0.4.1:")
depends_on("r-mime", type=("build", "run"), when="@0.4.2:")
+ depends_on("r-sass@0.4.0:", type=("build", "run"), when="@0.5.0:")
+ depends_on("r-sass@0.4.9:", type=("build", "run"), when="@0.6.2:")
depends_on("r-base64enc", type=("build", "run"), when="@0.4.2:")
depends_on("r-cachem", type=("build", "run"), when="@0.4.0:")
diff --git a/var/spack/repos/builtin/packages/r-bsseq/package.py b/var/spack/repos/builtin/packages/r-bsseq/package.py
index 27fd2500d5..8285f4545a 100644
--- a/var/spack/repos/builtin/packages/r-bsseq/package.py
+++ b/var/spack/repos/builtin/packages/r-bsseq/package.py
@@ -23,6 +23,8 @@ class RBsseq(RPackage):
version("1.22.0", commit="d4f7301dcd4a03431b0833302b5a79c6f1b186cc")
version("1.20.0", commit="07e398bc38ba903881df9a5d0577cca15788e0cd")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5:", type=("build", "run"))
depends_on("r@4.0:", type=("build", "run"), when="@1.26.0:")
depends_on("r-biocgenerics", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-bwstest/package.py b/var/spack/repos/builtin/packages/r-bwstest/package.py
index 85a8808096..159401ee9c 100644
--- a/var/spack/repos/builtin/packages/r-bwstest/package.py
+++ b/var/spack/repos/builtin/packages/r-bwstest/package.py
@@ -17,6 +17,7 @@ class RBwstest(RPackage):
cran = "BWStest"
+ version("0.2.3", sha256="4bc4cc27fcf0aa60c6497048b74528923aae852c98480900204835a8ebd714b2")
version("0.2.2", sha256="faff1dd698f1673a6befacb94d14281077d4c19be035a0a3bf85d77c1dfd5509")
depends_on("r-memoise", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-c50/package.py b/var/spack/repos/builtin/packages/r-c50/package.py
index 76ef1fa697..955bc7b1cf 100644
--- a/var/spack/repos/builtin/packages/r-c50/package.py
+++ b/var/spack/repos/builtin/packages/r-c50/package.py
@@ -23,6 +23,8 @@ class RC50(RPackage):
version("0.1.1", sha256="03bc1fc2f64bcd5c680568a24902deafab1965074a66f8802bc4cd0335bd01df")
version("0.1.0-24", sha256="617ee8ae617a075213414c07739ce92d9e6927783d01588fd0e2315157065e9d")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-partykit", type=("build", "run"))
depends_on("r-cubist@0.2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-cachem/package.py b/var/spack/repos/builtin/packages/r-cachem/package.py
index b12ed8ef58..7e5d9cc36e 100644
--- a/var/spack/repos/builtin/packages/r-cachem/package.py
+++ b/var/spack/repos/builtin/packages/r-cachem/package.py
@@ -17,8 +17,10 @@ class RCachem(RPackage):
license("MIT")
+ version("1.1.0", sha256="550839fc2ae5d865db475ba2c1714144f07fa0c052c72135b0e4a70287492e21")
version("1.0.7", sha256="234fad2a947d1e1fb87d3fa92abf9197877772e31bc81ae5991ae69689b6320a")
version("1.0.6", sha256="9a9452f7bcf3f79436c418b3c3290449fb8fd338714d9b992153754d112f1864")
depends_on("r-rlang", type=("build", "run"))
depends_on("r-fastmap", type=("build", "run"))
+ depends_on("r-fastmap@1.2.0:", when="@1.1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-cairo/package.py b/var/spack/repos/builtin/packages/r-cairo/package.py
index 8f025f2571..f852fcb5fb 100644
--- a/var/spack/repos/builtin/packages/r-cairo/package.py
+++ b/var/spack/repos/builtin/packages/r-cairo/package.py
@@ -25,6 +25,7 @@ class RCairo(RPackage):
cran = "Cairo"
+ version("1.6-2", sha256="6b6f4c6f93178a1295860a9dc6dc45e60fec70f684d5c8d0b59baf5b8dd44d62")
version("1.6-0", sha256="c762ac1d8daa4af527342360c256ed742de4e3031d997e9e59c9a369fcafb7d3")
version("1.5-15", sha256="bb3ab1ff6431c15eb01a66ddf90695cd9a2af3d5a384753f5180cd0401d2e89d")
version("1.5-14", sha256="067751face3b5771e72f9fb49bfeefb3a7bbecc060b672ab4393cb5935204c7b")
@@ -34,5 +35,14 @@ class RCairo(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r@2.4.0:", type=("build", "run"))
- depends_on("cairo@1.2:")
+ # "The Cairo package requires cairo library 1.2.0 or higher with PNG support enabled"
+ # See https://www.rforge.net/Cairo/
+ depends_on("cairo@1.2: +png")
+ # Disabled PDF support results in compilation failures in 1.6-1:1.6-2
+ # See https://github.com/s-u/Cairo/pull/48
+ depends_on("cairo +pdf", type=("build", "run"), when="@1.6-1:1.6-2")
+ # When cairo +ft, must also have +fc, for cairo_ft_font_face_create_for_pattern test
+ conflicts(
+ "^cairo ~fc", when="^cairo +ft", msg="For cairo freetype support, also need fontconfig."
+ )
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/r-callr/package.py b/var/spack/repos/builtin/packages/r-callr/package.py
index 33abeee94d..6e0b3731df 100644
--- a/var/spack/repos/builtin/packages/r-callr/package.py
+++ b/var/spack/repos/builtin/packages/r-callr/package.py
@@ -17,6 +17,7 @@ class RCallr(RPackage):
license("MIT")
+ version("3.7.6", sha256="e4bce367e869e42eaeea05566d2033d8cee2103179b11cd9a401440b58a351f8")
version("3.7.3", sha256="567bfedf073a1d4c5785f0553341608a214938110567b9a6495ff20ebb2fd04e")
version("3.7.2", sha256="12da8a212679e450d8d43c3c6e61ed09b82047f376f316f6f6392f1638580307")
version("3.7.0", sha256="d67255148595c6d0ba4c4d241bc9f6b5e00cafe25fdc13e38c10acc38653360a")
diff --git a/var/spack/repos/builtin/packages/r-caracas/package.py b/var/spack/repos/builtin/packages/r-caracas/package.py
index fea4048e4e..ab1edfe599 100644
--- a/var/spack/repos/builtin/packages/r-caracas/package.py
+++ b/var/spack/repos/builtin/packages/r-caracas/package.py
@@ -17,6 +17,7 @@ class RCaracas(RPackage):
license("GPL-2.0-or-later")
+ version("2.1.1", sha256="3b31b5b1c2fa038e5a6df12cfe62390f9af0461873a38921d6c26468363c2661")
version("2.0.0", sha256="9271239bf7457787371cbd44be74cb9909d67ab7c975b1744d8cf60d8b044b95")
version("1.1.2", sha256="9c726c77508617e74d1a11ac6e276973df42e1ad81145db455cc6e420526c757")
version("1.1.1", sha256="e14487c9492417cf5c7d7373c37dbb4fea4d91180a1a03154e51eaa7878b2769")
diff --git a/var/spack/repos/builtin/packages/r-cardata/package.py b/var/spack/repos/builtin/packages/r-cardata/package.py
index 400ff9f35c..6966be3fb0 100644
--- a/var/spack/repos/builtin/packages/r-cardata/package.py
+++ b/var/spack/repos/builtin/packages/r-cardata/package.py
@@ -19,4 +19,4 @@ class RCardata(RPackage):
version("3.0-2", sha256="3b5c4eff1cc1e456a5331084774503eaa06cf61fb7acf6b9e8a6bfabd5735494")
depends_on("r@3.0:", type=("build", "run"))
- depends_on("r@3.5:", type=("build", "run"), when="@3.0-4:")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@3.0-4:")
diff --git a/var/spack/repos/builtin/packages/r-caret/package.py b/var/spack/repos/builtin/packages/r-caret/package.py
index ca64c4c695..38f5118a2d 100644
--- a/var/spack/repos/builtin/packages/r-caret/package.py
+++ b/var/spack/repos/builtin/packages/r-caret/package.py
@@ -26,6 +26,8 @@ class RCaret(RPackage):
version("6.0-73", sha256="90a0a4a10f1a3b37502cb0ed7d8830063d059a548faabb9cc5d8d34736c7eacb")
version("6.0-70", sha256="21c5bdf7cf07bece38729465366564d8ca104c2466ee9fd800ca1fd88eb82f38")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@3.2.0:", type=("build", "run"), when="@6.0-82:")
depends_on("r-ggplot2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-caretensemble/package.py b/var/spack/repos/builtin/packages/r-caretensemble/package.py
index a3114fbd68..8423e8ff99 100644
--- a/var/spack/repos/builtin/packages/r-caretensemble/package.py
+++ b/var/spack/repos/builtin/packages/r-caretensemble/package.py
@@ -20,15 +20,20 @@ class RCaretensemble(RPackage):
license("MIT")
+ version("4.0.0", sha256="9177ad477fd2872e944231764227bcf5e2eabc9916dabce91f1a2a2decc98f43")
version("2.0.2", sha256="d8fcf3742beddc723b68677682708408cc11dcb8b36a0f70f03e7c4763e04f4d")
version("2.0.1", sha256="7e595e604ce2d9d32afbc5404e6fcbcd7f80e687316e9ca3303aca3e44c3ef88")
depends_on("r@3.2.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@4.0.0:")
depends_on("r-pbapply", type=("build", "run"))
depends_on("r-ggplot2", type=("build", "run"))
- depends_on("r-digest", type=("build", "run"))
- depends_on("r-plyr", type=("build", "run"))
+ depends_on("r-patchwork", type=("build", "run"), when="@4.0.0:")
+ depends_on("r-rlang", type=("build", "run"), when="@4.0.0:")
depends_on("r-lattice", type=("build", "run"))
- depends_on("r-gridextra", type=("build", "run"))
depends_on("r-data-table", type=("build", "run"))
depends_on("r-caret", type=("build", "run"))
+
+ depends_on("r-digest", type=("build", "run"), when="@:2.0.3")
+ depends_on("r-gridextra", type=("build", "run"), when="@:2.0.3")
+ depends_on("r-plyr", type=("build", "run"), when="@:2.0.3")
diff --git a/var/spack/repos/builtin/packages/r-caroline/package.py b/var/spack/repos/builtin/packages/r-caroline/package.py
index a4db03a360..ec7b9872f2 100644
--- a/var/spack/repos/builtin/packages/r-caroline/package.py
+++ b/var/spack/repos/builtin/packages/r-caroline/package.py
@@ -24,6 +24,7 @@ class RCaroline(RPackage):
license("Artistic-2.0")
+ version("0.9.2", sha256="04dfc574b5f763b8c09e57b68657b8ae7e6aae36083dd71819c96f971d660297")
version("0.9.0", sha256="7231daacf2f0e89d9363ea919071f8352ae487011f56e84a4054de11a9243ac8")
version("0.8.0", sha256="58f464711f7279ca2aa173e6ce29d3308e01db37dccefbbf14cd7720c0231976")
version("0.7.6", sha256="e7ba948f7d87f091b498dd0eec2ca4fdad7af4e2bbb67e0945c2f0d3f2eadda9")
diff --git a/var/spack/repos/builtin/packages/r-catools/package.py b/var/spack/repos/builtin/packages/r-catools/package.py
index db3c6466e8..1d4a163a9f 100644
--- a/var/spack/repos/builtin/packages/r-catools/package.py
+++ b/var/spack/repos/builtin/packages/r-catools/package.py
@@ -23,6 +23,9 @@ class RCatools(RPackage):
version("1.17.1.1", sha256="d53e2c5c77f1bd4744703d7196dbc9b4671a120bbb5b9b3edc45fc57c0650c06")
version("1.17.1", sha256="d32a73febf00930355cc00f3e4e71357412e0f163faae6a4bf7f552cacfe9af4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.2.0:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@1.18.1:")
depends_on("r-bitops", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-cca/package.py b/var/spack/repos/builtin/packages/r-cca/package.py
index c33b4e205c..d692912783 100644
--- a/var/spack/repos/builtin/packages/r-cca/package.py
+++ b/var/spack/repos/builtin/packages/r-cca/package.py
@@ -17,6 +17,7 @@ class RCca(RPackage):
cran = "CCA"
+ version("1.2.2", sha256="f3b347f15dadd887f31206906e845c4893ec0cd7dc0c7e97c11001434c3d2e64")
version("1.2.1", sha256="28febfce7c46039240346410e70f9d8795b536fc4e7e0d48d5370bd23cba9bd0")
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-checkmate/package.py b/var/spack/repos/builtin/packages/r-checkmate/package.py
index ac294085f0..92cbecec4f 100644
--- a/var/spack/repos/builtin/packages/r-checkmate/package.py
+++ b/var/spack/repos/builtin/packages/r-checkmate/package.py
@@ -17,6 +17,7 @@ class RCheckmate(RPackage):
license("BSD-3-Clause")
+ version("2.3.2", sha256="7255732d6c2da51204128a910e8c0d05246324a0402fca4d0d99433af40a88e3")
version("2.1.0", sha256="b784dd5163a0350d084ef34882d9781373839dedeaa9a8b8e6187d773d0d21c6")
version("2.0.0", sha256="0dc25b0e20c04836359df1885d099c6e4ad8ae0e585a9e4107f7ea945d9c6fa4")
version("1.9.4", sha256="faa25754b757fe483b876f5d07b73f76f69a1baa971420892fadec4af4bbad21")
diff --git a/var/spack/repos/builtin/packages/r-chemometrics/package.py b/var/spack/repos/builtin/packages/r-chemometrics/package.py
index fac0b96c3e..be933d41df 100644
--- a/var/spack/repos/builtin/packages/r-chemometrics/package.py
+++ b/var/spack/repos/builtin/packages/r-chemometrics/package.py
@@ -16,6 +16,7 @@ class RChemometrics(RPackage):
license("GPL-3.0-or-later")
+ version("1.4.4", sha256="fd0edb1ebe321ff7677d0a668d7dfc79a7cd55f408a53d1f13db4cf6347aa881")
version("1.4.2", sha256="b705832fa167dc24b52b642f571ed1efd24c5f53ba60d02c7797986481b6186a")
version("1.4.1", sha256="7646da0077657d672356204aa2094be68e10ec13617f92ae97ff53a389053905")
version("1.3.9", sha256="553eda53789b6a4d0f77842c175f98be5b9a04bccc9d2ba0ecde1bb5c8a53f21")
diff --git a/var/spack/repos/builtin/packages/r-chipseq/package.py b/var/spack/repos/builtin/packages/r-chipseq/package.py
index bad1c33692..9980a4e6ff 100644
--- a/var/spack/repos/builtin/packages/r-chipseq/package.py
+++ b/var/spack/repos/builtin/packages/r-chipseq/package.py
@@ -21,6 +21,8 @@ class RChipseq(RPackage):
version("1.44.0", commit="b64d0d28e9fcf0fdab9a7f9c521baf729426a594")
version("1.40.0", commit="84bcbc0b7ad732730b5989a308f1624a6a358df1")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-biocgenerics@0.1.0:", type=("build", "run"))
depends_on("r-s4vectors@0.17.25:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-chron/package.py b/var/spack/repos/builtin/packages/r-chron/package.py
index fbce82e224..eb9105173b 100644
--- a/var/spack/repos/builtin/packages/r-chron/package.py
+++ b/var/spack/repos/builtin/packages/r-chron/package.py
@@ -15,6 +15,7 @@ class RChron(RPackage):
license("GPL-2.0-only")
+ version("2.3-61", sha256="a096957625a0438075b3486322ee07c753c7c4ba3efcd04a3ac92476d6c43b9b")
version("2.3-60", sha256="0e0675cec55b6cea87fc5776846215e0445442554684120079e66013067491ee")
version("2.3-58", sha256="057fc628cde330c22b9d20365316d3632c2d217f4f2f97d39b1d1a2c93f766d0")
version("2.3-57", sha256="9645d86a84d1afc12a0accf4f826fdd40e6d050a313424ad70f8085e8f19c232")
diff --git a/var/spack/repos/builtin/packages/r-circlize/package.py b/var/spack/repos/builtin/packages/r-circlize/package.py
index 2409a909fa..e480f4d031 100644
--- a/var/spack/repos/builtin/packages/r-circlize/package.py
+++ b/var/spack/repos/builtin/packages/r-circlize/package.py
@@ -25,6 +25,7 @@ class RCirclize(RPackage):
license("MIT")
+ version("0.4.16", sha256="16dc32c7704906d13a9e5281bb396e92fb89a6b17fa5e201953240726b650b67")
version("0.4.15", sha256="d602d55313fe7c675109153d6ed3b99bdba5292e1deefed71d5a21e0db595cc7")
version("0.4.13", sha256="6cbadbf8e8b1abbd71a79080677d2b95f2bdd18f2e4d707c32d5c2ff26c5369b")
version("0.4.12", sha256="b3b60caa5292cf980cf474c85f59582f6862925631a4da86a78eac05903252f4")
@@ -33,6 +34,7 @@ class RCirclize(RPackage):
version("0.4.0", sha256="abdc1bbe264be42c1d7b65869979da7cd131032fd6fd3f11f9744dae54e83f5c")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@0.4.16:")
depends_on("r-globaloptions@0.1.0:", type=("build", "run"))
depends_on("r-globaloptions@0.1.2:", type=("build", "run"), when="@0.4.12:")
depends_on("r-shape", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-clarabel/package.py b/var/spack/repos/builtin/packages/r-clarabel/package.py
new file mode 100644
index 0000000000..8c78cdb0e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-clarabel/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RClarabel(RPackage):
+ """A versatile interior point solver that solves linear programs (LPs),
+ quadratic programs (QPs), second-order cone programs (SOCPs), semidefinite
+ programs (SDPs), and problems with exponential and power cone constraints
+ (<https://clarabel.org/stable/>). For quadratic objectives, unlike interior
+ point solvers based on the standard homogeneous self-dual embedding (HSDE)
+ model, 'Clarabel' handles quadratic objective without requiring any
+ epigraphical reformulation of its objective function. It can therefore
+ be significantly faster than other HSDE-based solvers for problems with
+ quadratic objective functions. Infeasible problems are detected using using
+ a homogeneous embedding technique."""
+
+ homepage = "https://oxfordcontrol.github.io/clarabel-r/"
+ cran = "clarabel"
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("0.9.0", sha256="50963022f8e5dc9d956193acf7b87194548dc4b3555bd844aa1f9f4d34f2c6bc")
+
+ depends_on("rust", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-class/package.py b/var/spack/repos/builtin/packages/r-class/package.py
index 8516aabd74..a55127d71d 100644
--- a/var/spack/repos/builtin/packages/r-class/package.py
+++ b/var/spack/repos/builtin/packages/r-class/package.py
@@ -16,6 +16,7 @@ class RClass(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("7.3-22", sha256="b6994164e93843fcc7e08dfdc8c8b4af6a5a10ef7153d2e72a6855342508d15c")
version("7.3-21", sha256="0c19404aa4d2da61a62495e788b07c8e429c4c5ee64486ea5e6dd347bcaecddf")
version("7.3-20", sha256="e65b046bc72b312ff0c5dc7feba4fa3e9bc63387274d44911493782b85f65483")
version("7.3-19", sha256="7820ae94b22009561a69ed1f8b2ca2a3814be6a656e9884738206997caecbe37")
diff --git a/var/spack/repos/builtin/packages/r-classint/package.py b/var/spack/repos/builtin/packages/r-classint/package.py
index 5eec1170fb..ebc37fb90d 100644
--- a/var/spack/repos/builtin/packages/r-classint/package.py
+++ b/var/spack/repos/builtin/packages/r-classint/package.py
@@ -14,6 +14,7 @@ class RClassint(RPackage):
cran = "classInt"
+ version("0.4-10", sha256="c3561eafbc493ac02840191d4f1e4d2ef437ca8eb20f41fc5eca28f00ee42b8b")
version("0.4-9", sha256="5b11af7d08f8793c7b47ee7c68b8e371cb23027165d30abddbd8b2abcc20e1c3")
version("0.4-8", sha256="6ae9617f5b71bbecfa204a4f36b5972808bafd060d87a4a5bac17f3ad2ca59b3")
version("0.4-3", sha256="9ede7a2a7a6b6c114919a3315a884fb592e33b037a50a4fe45cbd4fe2fc434ac")
diff --git a/var/spack/repos/builtin/packages/r-cli/package.py b/var/spack/repos/builtin/packages/r-cli/package.py
index ff45407465..95dd64f635 100644
--- a/var/spack/repos/builtin/packages/r-cli/package.py
+++ b/var/spack/repos/builtin/packages/r-cli/package.py
@@ -20,6 +20,7 @@ class RCli(RPackage):
license("MIT")
+ version("3.6.3", sha256="4295085f11221c54b1dd2b1d39a675a85dfd9f900294297567e1d36f65ac4841")
version("3.6.1", sha256="be3006cec7e67f9ae25e21b4658c4bec680038c2ef7467df5f14da3311a05e36")
version("3.4.1", sha256="1c585efbfd8b8685c66fac34bcb60f28c351691bb4b9931df214e6e47fd9744e")
version("3.3.0", sha256="c3a9ebbcb9017fb9aeda4f7df5ca981e42b169cbd7ce13e592cda2cd74250d63")
@@ -34,7 +35,7 @@ class RCli(RPackage):
version("1.0.0", sha256="8fa3dbfc954ca61b8510f767ede9e8a365dac2ef95fe87c715a0f37d721b5a1d")
depends_on("r@2.10:", type=("build", "run"))
- depends_on("r@3,4:", type=("build", "run"), when="@3.3.0:")
+ depends_on("r@3.4:", type=("build", "run"), when="@3.3.0:")
depends_on("r-assertthat", type=("build", "run"), when="@:2.3")
depends_on("r-crayon@1.3.4:", type=("build", "run"), when="@:2.2")
diff --git a/var/spack/repos/builtin/packages/r-clock/package.py b/var/spack/repos/builtin/packages/r-clock/package.py
index 89ddd6dd78..628d6fd076 100644
--- a/var/spack/repos/builtin/packages/r-clock/package.py
+++ b/var/spack/repos/builtin/packages/r-clock/package.py
@@ -20,10 +20,18 @@ class RClock(RPackage):
license("MIT")
+ version("0.7.1", sha256="432d2fc39d3f20e348f09a9b6136a02a588db585bab428d184da71bf6aa1f0d8")
version("0.6.1", sha256="f80c385fd8229538968ffb71d7de53ddc82bfcec6641f8e76f299546c43c1702")
depends_on("r@3.4:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@0.7.1:")
+ depends_on("r-cli@3.6.1:", type=("build", "run"), when="@0.7.0:")
+ depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@0.7.0:")
depends_on("r-rlang@1.0.4:", type=("build", "run"))
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@0.7.0:")
depends_on("r-tzdb@0.3.0:", type=("build", "run"))
+ depends_on("r-tzdb@0.4.0:", type=("build", "run"), when="@0.7.0:")
depends_on("r-vctrs@0.4.1:", type=("build", "run"))
+ depends_on("r-vctrs@0.6.1:", type=("build", "run"), when="@0.7.0:")
depends_on("r-cpp11@0.4.2:", type=("build", "run"))
+ depends_on("r-cpp11@0.4.3:", type=("build", "run"), when="@0.7.0:")
diff --git a/var/spack/repos/builtin/packages/r-clue/package.py b/var/spack/repos/builtin/packages/r-clue/package.py
index ded46e1b06..a7dd171c09 100644
--- a/var/spack/repos/builtin/packages/r-clue/package.py
+++ b/var/spack/repos/builtin/packages/r-clue/package.py
@@ -13,6 +13,7 @@ class RClue(RPackage):
license("GPL-2.0-only")
+ version("0.3-65", sha256="bdf8fdd35fb2b1c65d09766da79d930fa664a00aa497f03b636400eecb623ef8")
version("0.3-64", sha256="f45cb7a84c87ddca2b9f7c2ea9505016d002e6fda23322e6d57466c7a4de28af")
version("0.3-62", sha256="575a3fa2c4aa1ae5c7e35f4462f2f331d291d87916aa12f0d11f61988d5e1ed2")
version("0.3-61", sha256="71311b16ce380fd9a8834be95b55b3d1b47e4ee2b8acb35b8d481138c314dc31")
diff --git a/var/spack/repos/builtin/packages/r-cluster/package.py b/var/spack/repos/builtin/packages/r-cluster/package.py
index 096fb45278..f1e39c92bf 100644
--- a/var/spack/repos/builtin/packages/r-cluster/package.py
+++ b/var/spack/repos/builtin/packages/r-cluster/package.py
@@ -17,6 +17,7 @@ class RCluster(RPackage):
license("GPL-2.0-or-later")
+ version("2.1.6", sha256="d1c50efafd35a55387cc5b36086b97d5591e0b33c48dc718005d2f5907113164")
version("2.1.4", sha256="c6f10ceca29a176ba833f24ebf71fd451629052c2338398ba286df5689d6f5b6")
version("2.1.3", sha256="a3ad7a9455d634c4e0c6ccf8ea7a3a392a0ecf9c2bdb368d127ffa68a93164a9")
version("2.1.2", sha256="5c8aa760fb6dda4fcfe6196e561ffcd2dc12b1a6c7659cb90be2cde747311499")
diff --git a/var/spack/repos/builtin/packages/r-clustergeneration/package.py b/var/spack/repos/builtin/packages/r-clustergeneration/package.py
index 603effe459..7a15cdce70 100644
--- a/var/spack/repos/builtin/packages/r-clustergeneration/package.py
+++ b/var/spack/repos/builtin/packages/r-clustergeneration/package.py
@@ -20,6 +20,7 @@ class RClustergeneration(RPackage):
cran = "clusterGeneration"
+ version("1.3.8", sha256="0f842256582ab41bcd00ee08ea6d7e231ff362fe0156a53347873e9636f73a70")
version("1.3.7", sha256="534f29d8f7ed11e6e9a496f15845b588ec7133f3da5e6def8140b88500e52d5c")
version("1.3.4", sha256="7c591ad95a8a9d7fb0e4d5d80dfd78f7d6a63cf7d11eb53dd3c98fdfb5b868aa")
diff --git a/var/spack/repos/builtin/packages/r-cner/package.py b/var/spack/repos/builtin/packages/r-cner/package.py
index bdfd6383ed..6b897405df 100644
--- a/var/spack/repos/builtin/packages/r-cner/package.py
+++ b/var/spack/repos/builtin/packages/r-cner/package.py
@@ -25,6 +25,8 @@ class RCner(RPackage):
version("1.14.0", commit="b8634d65c51728c815127e22b45eba7c9b9db897")
version("1.12.1", commit="90d611f9cd19a73d0fe92ab03ef428519d64c017")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.2.2:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.14.0:")
depends_on("r-biostrings@2.33.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-coda/package.py b/var/spack/repos/builtin/packages/r-coda/package.py
index 4824988bbb..28d673c5b7 100644
--- a/var/spack/repos/builtin/packages/r-coda/package.py
+++ b/var/spack/repos/builtin/packages/r-coda/package.py
@@ -17,10 +17,11 @@ class RCoda(RPackage):
license("GPL-2.0-or-later")
+ version("0.19-4.1", sha256="f4b451d86fbb56ff9ade043ddd6b0944368c37d0dad12d02837750ecdc708ad6")
version("0.19-4", sha256="422d3cfd34797a3631e9c4812431940599c0ca4bb9937797bed07b7b1d6fe58f")
version("0.19-3", sha256="d3df1fc848bcf1af8fae13d61eeab60e99a3d4b4db384bec4326f909f502c5d6")
version("0.19-2", sha256="678a7e6a87a2723089daeb780ea37ac3d4319b37eabe26928ea3fa9c9b1eda0d")
version("0.19-1", sha256="d41ff5731da6805170769dba75dd011ab33f916d15b2336001f279e21a524491")
- depends_on("r@2.14:", type=("build", "run"))
+ depends_on("r@2.14.0:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-codetools/package.py b/var/spack/repos/builtin/packages/r-codetools/package.py
index a4c6005388..03c20803e6 100644
--- a/var/spack/repos/builtin/packages/r-codetools/package.py
+++ b/var/spack/repos/builtin/packages/r-codetools/package.py
@@ -13,6 +13,7 @@ class RCodetools(RPackage):
license("GPL-2.0-or-later")
+ version("0.2-20", sha256="3be6f375ec178723ddfd559d1e8e85bfeee04a5fbaf9f53f2f844e1669fea863")
version("0.2-19", sha256="c4b7e567c87f33dad85de92f79641e5e5b5deede6d19a9dfa47133d191782dab")
version("0.2-18", sha256="1a9ea6b9792dbd1688078455929385acc3a5e4bef945c77bec1261fa4a084c28")
version("0.2-16", sha256="c276757c3adabaf700f2ea25835892b09bc1bd438ebd17c805ea9073ed8a74b6")
diff --git a/var/spack/repos/builtin/packages/r-coin/package.py b/var/spack/repos/builtin/packages/r-coin/package.py
index 0ea41175c6..857799c03d 100644
--- a/var/spack/repos/builtin/packages/r-coin/package.py
+++ b/var/spack/repos/builtin/packages/r-coin/package.py
@@ -17,6 +17,7 @@ class RCoin(RPackage):
license("GPL-2.0-only")
+ version("1.4-3", sha256="8a6302dbf3ef570cd9f69ce7b6cd3d3b928dc776f840bbd767af132e0080b974")
version("1.4-2", sha256="7546d1f27a82d98b4b3e43e4659eba0f74a67d5919ce85d2fb360282ba3cfbb2")
version("1.3-1", sha256="5de2519a6e2b059bba9d74c58085cccaff1aaaa0454586ed164a108ebd1b2062")
version("1.3-0", sha256="adcebb37e0a7dfddbf8ec1e09c12a809bd76d90b5b8ff2b1048a75252ba11ef8")
diff --git a/var/spack/repos/builtin/packages/r-colorspace/package.py b/var/spack/repos/builtin/packages/r-colorspace/package.py
index 0bcc256bd3..f0c3b42f1c 100644
--- a/var/spack/repos/builtin/packages/r-colorspace/package.py
+++ b/var/spack/repos/builtin/packages/r-colorspace/package.py
@@ -29,6 +29,7 @@ class RColorspace(RPackage):
license("BSD-3-Clause")
+ version("2.1-1", sha256="e721cee5f4d6e4b0fc8eb18265e316b4f856fd3be02f0775a26032663758cd0b")
version("2.1-0", sha256="04078abb6b54119c90dc7085d62916bf292ccb163e213f9ea70567d1be82614c")
version("2.0-3", sha256="e75681cc4dd6e4b70303fd96a6d4597065dc6bffcaa4ae4244b73ff19016857f")
version("2.0-2", sha256="b891cd2ec129ed5f116429345947bcaadc33969758a108521eb0cf36bd12183a")
@@ -38,4 +39,6 @@ class RColorspace(RPackage):
version("1.3-2", sha256="dd9fd2342b650456901d014e7ff6d2e201f8bec0b555be63b1a878d2e1513e34")
version("1.2-6", sha256="ba3165c5b906edadcd1c37cad0ef58f780b0af651f3fdeb49fbb2dc825251679")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-colourpicker/package.py b/var/spack/repos/builtin/packages/r-colourpicker/package.py
index 157c0f0d1c..f95a51ac3d 100644
--- a/var/spack/repos/builtin/packages/r-colourpicker/package.py
+++ b/var/spack/repos/builtin/packages/r-colourpicker/package.py
@@ -20,6 +20,7 @@ class RColourpicker(RPackage):
license("MIT")
+ version("1.3.0", sha256="c7f2618cd1ae1f7ac15aee072c648e6494dfff6714e13dc7cd1da993d1102510")
version("1.2.0", sha256="bc2c80eee046219038baef9f8f213c9824d7fec7f893f6a1b881dd44b4a8638a")
version("1.1.1", sha256="a0d09982b048b143e2c3438ccec039dd20d6f892fa0dedc9fdcb0d40de883ce0")
version("1.1.0", sha256="2dfbb6262d187d3b17357ff9c22670ced3621feda5b2a2a500558478e4d551e2")
diff --git a/var/spack/repos/builtin/packages/r-commonmark/package.py b/var/spack/repos/builtin/packages/r-commonmark/package.py
index e06c44e2ac..63ca1a3691 100644
--- a/var/spack/repos/builtin/packages/r-commonmark/package.py
+++ b/var/spack/repos/builtin/packages/r-commonmark/package.py
@@ -20,6 +20,7 @@ class RCommonmark(RPackage):
license("BSD-2-Clause")
+ version("1.9.1", sha256="9517a13f4ce4a99bb157493453b04419b222cb65a9471cd3b11e5045ac0db53b")
version("1.9.0", sha256="6dd01a5a26c8d436486abf69c2f6ad0f8dd1c811f575c31983aeb4dbd376548f")
version("1.8.1", sha256="96adcb093de3d2e48811af402da70e7222a313b97f1e979e0cbe84dd59bd5cbe")
version("1.8.0", sha256="7d07e72937b1cf158e69f183722bf79dbb91b8967a9dd29f4fa145500c2be668")
diff --git a/var/spack/repos/builtin/packages/r-compositions/package.py b/var/spack/repos/builtin/packages/r-compositions/package.py
index 03906a4d14..435acef76c 100644
--- a/var/spack/repos/builtin/packages/r-compositions/package.py
+++ b/var/spack/repos/builtin/packages/r-compositions/package.py
@@ -17,6 +17,7 @@ class RCompositions(RPackage):
license("GPL-2.0-or-later")
+ version("2.0-8", sha256="c5063488f456992b5821458b3237322addffd3451ae91f9474707886971ef290")
version("2.0-6", sha256="45d374ebfdcc2c9f6cc738d196caf83a2297ed2aefe2cc99007fcbeb78a61c34")
version("2.0-4", sha256="7b9c7a3bf654fb02d9eb1b4a7566469b2f5232f3b2c1b324c02239fd31060faf")
version("2.0-1", sha256="84a291308faf858e5a9d9570135c2da5e57b0887f407903485fa85d09da61a0f")
@@ -28,6 +29,6 @@ class RCompositions(RPackage):
depends_on("r-tensora", type=("build", "run"))
depends_on("r-robustbase", type=("build", "run"))
depends_on("r-bayesm", type=("build", "run"))
- depends_on("r-mass", type=("build", "run"), when="@2.0-1:")
+ depends_on("r-mass", type=("build", "run"), when="@2.0-0:")
- depends_on("r-energy", type=("build", "run"), when="@:1.40-2")
+ depends_on("r-energy", type=("build", "run"), when="@:1.40-5")
diff --git a/var/spack/repos/builtin/packages/r-compquadform/package.py b/var/spack/repos/builtin/packages/r-compquadform/package.py
index 1e45e86015..8dd2294e81 100644
--- a/var/spack/repos/builtin/packages/r-compquadform/package.py
+++ b/var/spack/repos/builtin/packages/r-compquadform/package.py
@@ -16,3 +16,6 @@ class RCompquadform(RPackage):
cran = "CompQuadForm"
version("1.4.3", sha256="042fc56c800dd8f5f47a017e2efa832caf74f0602824abf7099898d9708660c4")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-conquer/package.py b/var/spack/repos/builtin/packages/r-conquer/package.py
index 83045c8164..422156ccb2 100644
--- a/var/spack/repos/builtin/packages/r-conquer/package.py
+++ b/var/spack/repos/builtin/packages/r-conquer/package.py
@@ -24,6 +24,8 @@ class RConquer(RPackage):
version("1.2.1", sha256="1354f90f962a2124e155227cdc0ed2c6e54682f1e08934c49a827e51dc112f45")
version("1.0.2", sha256="542f6154ce1ffec0c1b4dd4e1f5b86545015f4b378c4c66a0840c65c57d674ff")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-rcpp@1.0.3:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-consrank/package.py b/var/spack/repos/builtin/packages/r-consrank/package.py
new file mode 100644
index 0000000000..239fde3bd3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-consrank/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RConsrank(RPackage):
+ """Compute the median ranking according to the Kemeny's axiomatic approach."""
+
+ homepage = "https://www.r-project.org/"
+ cran = "ConsRank"
+
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+
+ version("2.1.4", sha256="c213c6008fcb617a2144d75b41b25520ffadcf38686cc5050e10ce1363ac3000")
+
+ depends_on("r-rgl", type=("build", "run"))
+ depends_on("r-rlist@0.4.2:", type=("build", "run"))
+ depends_on("r-proxy", type=("build", "run"))
+ depends_on("r-gtools", type=("build", "run"))
+ depends_on("r-tidyr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-construct/package.py b/var/spack/repos/builtin/packages/r-construct/package.py
index 14f97e5aea..3b81c3cdc7 100644
--- a/var/spack/repos/builtin/packages/r-construct/package.py
+++ b/var/spack/repos/builtin/packages/r-construct/package.py
@@ -18,6 +18,7 @@ class RConstruct(RPackage):
cran = "conStruct"
+ version("1.0.6", sha256="110982ed8036ccefb6bf662909779521e1b9095e9e0b5b99973df23171a5b502")
version("1.0.5", sha256="4d953073bd1f374a91655b4889ab1b65d92a1c89ea39eb3dac5cd852a42b8a7c")
version("1.0.4", sha256="4e585b718a361061bc1432cea46fc65f802fb0ef58e4516d33e1af99bbfe90ce")
version("1.0.3", sha256="b449c133a944ad05a28f84f312ed4ccbc1574c4659aa09c678618d2ae9008310")
@@ -26,12 +27,14 @@ class RConstruct(RPackage):
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-rcpp@0.12.0:", type=("build", "run"))
depends_on("r-rstan@2.18.1:", type=("build", "run"))
+ depends_on("r-rstan@2.26.0:", type=("build", "run"), when="@1.0.6:")
depends_on("r-rstantools@1.5.0:", type=("build", "run"))
depends_on("r-caroline", type=("build", "run"))
depends_on("r-gtools", type=("build", "run"))
depends_on("r-foreach", type=("build", "run"))
depends_on("r-doparallel", type=("build", "run"))
depends_on("r-stanheaders@2.18.0:", type=("build", "run"))
+ depends_on("r-stanheaders@2.26.0:", type=("build", "run"), when="@1.0.6:")
depends_on("r-bh@1.66.0:", type=("build", "run"))
depends_on("r-rcppeigen@0.3.3.3.0:", type=("build", "run"))
depends_on("r-rcppparallel@5.0.1:", type=("build", "run"), when="@1.0.5:")
diff --git a/var/spack/repos/builtin/packages/r-convevol/package.py b/var/spack/repos/builtin/packages/r-convevol/package.py
index 6dbcbc60cf..4f660abb02 100644
--- a/var/spack/repos/builtin/packages/r-convevol/package.py
+++ b/var/spack/repos/builtin/packages/r-convevol/package.py
@@ -18,6 +18,7 @@ class RConvevol(RPackage):
license("GPL-2.0-only")
+ version("2.2.1", sha256="9b197d8735e61f78825ec2d81380b0f4352a3783c2c51254f4eb415ab45a9b48")
version("2.0.0", sha256="690664b93c1f144a409e80b2ebfc20dc34f0eb9405607d15e066e8db573e84de")
version("1.3", sha256="d6b24b9796a559f5280e277746189d141151ade4b14cc6b4c2d9d496d7f314ac")
@@ -25,5 +26,7 @@ class RConvevol(RPackage):
depends_on("r-ape", type=("build", "run"))
depends_on("r-cluster", type=("build", "run"))
depends_on("r-geiger", type=("build", "run"))
- depends_on("r-mass", type=("build", "run"))
+ depends_on("r-magick", type=("build", "run"), when="@2.2.0:")
depends_on("r-phytools", type=("build", "run"))
+
+ depends_on("r-mass", type=("build", "run"), when="@:2.1")
diff --git a/var/spack/repos/builtin/packages/r-copula/package.py b/var/spack/repos/builtin/packages/r-copula/package.py
index 79f7bee361..c4ca7bbfcd 100644
--- a/var/spack/repos/builtin/packages/r-copula/package.py
+++ b/var/spack/repos/builtin/packages/r-copula/package.py
@@ -26,6 +26,7 @@ class RCopula(RPackage):
license("GPL-3.0-or-later OR custom")
+ version("1.1-4", sha256="f4d78b7f4860797620dfe15c62cbeeb319b2dbbacab75062652d467c4ef6504f")
version("1.1-2", sha256="88f9454d25e4dcdf53d8ca5156daf48e664769f5e13b1e835ed64f37251587d3")
version("1.1-0", sha256="9ab76e6256534db2a18d3880143b8c67e385767010de861bbde25212aa75d924")
version("1.0-1", sha256="d09b2ccffc7379e48b00952aa6b282baf502feebaf55cc44e93f881d7b909742")
diff --git a/var/spack/repos/builtin/packages/r-corrplot/package.py b/var/spack/repos/builtin/packages/r-corrplot/package.py
index dd132968c1..8313ed99b3 100644
--- a/var/spack/repos/builtin/packages/r-corrplot/package.py
+++ b/var/spack/repos/builtin/packages/r-corrplot/package.py
@@ -17,6 +17,7 @@ class RCorrplot(RPackage):
license("MIT")
+ version("0.94", sha256="8e855daf7392dfec8dab7da2845b6d01e24030837a66ce7d8d4673eb0a7e55f4")
version("0.92", sha256="e8c09f963f9c4837036c439ebfe00fa3a6e462ccbb786d2cf90850ddcd9428bd")
version("0.84", sha256="0dce5e628ead9045580a191f60c58fd7c75b4bbfaaa3307678fc9ed550c303cc")
version("0.77", sha256="54b66ff995eaf2eee3f3002509c6f27bb5bd970b0abde41893ed9387e93828d3")
diff --git a/var/spack/repos/builtin/packages/r-countrycode/package.py b/var/spack/repos/builtin/packages/r-countrycode/package.py
index f0a9746bc7..e6fe87390d 100644
--- a/var/spack/repos/builtin/packages/r-countrycode/package.py
+++ b/var/spack/repos/builtin/packages/r-countrycode/package.py
@@ -16,6 +16,7 @@ class RCountrycode(RPackage):
license("GPL-3.0-only")
+ version("1.6.0", sha256="f9db110e32c0bcc90eed85303277660de37a777681bb78e8898b6fc5f2253db6")
version("1.4.0", sha256="99dfe7652c1e631b9e0f8fac0b0163e7a3fdde8476498555d553e0d1c5fdccc4")
version("1.3.0", sha256="34361416e771ece1d56dc56f79416c8b7f9591885773becae270684d095bc70f")
version("1.2.0", sha256="32c65702dcc33d512ff99f14c12f4e0c48fe7ed7c8aa2f0a64194576d129dd40")
diff --git a/var/spack/repos/builtin/packages/r-covr/package.py b/var/spack/repos/builtin/packages/r-covr/package.py
index 70d3c8adc8..b989c17a9f 100644
--- a/var/spack/repos/builtin/packages/r-covr/package.py
+++ b/var/spack/repos/builtin/packages/r-covr/package.py
@@ -21,6 +21,7 @@ class RCovr(RPackage):
license("MIT")
+ version("3.6.4", sha256="2b6204036510c629d0b1d58daaee34d4e38baf54164f8d4c9afd6d6b1fb1862a")
version("3.6.2", sha256="ace68ce7516147b4d77f591a498cbd7b2803062c1b47252e7a35081af0ea485b")
version("3.6.1", sha256="ffbe15438c1a4f274c14cacfb944480e284f1ab60808d5e840c015cc57c51157")
version("3.5.1", sha256="a54cfc3623ea56084158ac5d7fe33f216f45191f6dcddab9c9ed4ec1d9d8ac6c")
diff --git a/var/spack/repos/builtin/packages/r-cowplot/package.py b/var/spack/repos/builtin/packages/r-cowplot/package.py
index a70068b2f3..3666e21891 100644
--- a/var/spack/repos/builtin/packages/r-cowplot/package.py
+++ b/var/spack/repos/builtin/packages/r-cowplot/package.py
@@ -21,6 +21,7 @@ class RCowplot(RPackage):
license("GPL-2.0-only")
+ version("1.1.3", sha256="8756971af5c50381cf00ec7ed622fd5cf3d70f534bdfa3ebadd157b5aef5b273")
version("1.1.1", sha256="c7dce625b456dffc59ba100c816e16226048d12fdd29a7335dc1f6f6e12eed48")
version("1.0.0", sha256="70f9a7c46d10f409d1599f1afc9fd3c947051cf2b430f01d903c64ef1e6c98a5")
version("0.9.3", sha256="3e10475fd7506ea9297ed72eb1a3acf858c6fa99d26e46fc39654eba000c3dcb")
@@ -33,6 +34,7 @@ class RCowplot(RPackage):
depends_on("r@3.5.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-ggplot2@2.1.1:", type=("build", "run"))
depends_on("r-ggplot2@2.2.1:", type=("build", "run"), when="@1.1.1:")
+ depends_on("r-ggplot2@3.4.0:", type=("build", "run"), when="@1.1.2:")
depends_on("r-gtable", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"), when="@1.0.0:")
depends_on("r-scales", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-cpp11/package.py b/var/spack/repos/builtin/packages/r-cpp11/package.py
index 4a36d4ce11..5bbad8485e 100644
--- a/var/spack/repos/builtin/packages/r-cpp11/package.py
+++ b/var/spack/repos/builtin/packages/r-cpp11/package.py
@@ -18,7 +18,10 @@ class RCpp11(RPackage):
license("MIT")
+ version("0.4.7", sha256="801d1266824c3972642bce2db2a5fd0528a65ec845c58eb5a886edf082264344")
version("0.4.3", sha256="f1a60e4971a86dbbcf6a16bbd739b59bb66d9c45d93cfd8dedc2a87e302598f1")
version("0.4.2", sha256="403ce0bf82358d237176053b0fb1e958cb6bfa4d0fb3555bf5801db6a6939b99")
version("0.4.0", sha256="1768fd07dc30dfbbf8f3fb1a1183947cb7e1dfd909165c4d612a63c163a41e87")
version("0.2.5", sha256="6fef9306c0c3043252c987e77c99ef679b2ea46dffafae318dbeb38ad21a2e20")
+
+ depends_on("r@3.5.0:", when="@0.4.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-crayon/package.py b/var/spack/repos/builtin/packages/r-crayon/package.py
index 23db2f98c1..087de49d92 100644
--- a/var/spack/repos/builtin/packages/r-crayon/package.py
+++ b/var/spack/repos/builtin/packages/r-crayon/package.py
@@ -19,6 +19,7 @@ class RCrayon(RPackage):
license("MIT")
+ version("1.5.3", sha256="3e74a0685541efb5ea763b92cfd5c859df71c46b0605967a0b5dbb7326e9da69")
version("1.5.2", sha256="70a9a505b5b3c0ee6682ad8b965e28b7e24d9f942160d0a2bad18eec22b45a7a")
version("1.5.1", sha256="c025c73b78a8e88e8e4363c8e1a941da5089a7baea39e59ea5342ab9ebe45df9")
version("1.4.2", sha256="ee34397f643e76e30588068d4c93bd3c9afd2193deacccacb3bffcadf141b857")
diff --git a/var/spack/repos/builtin/packages/r-credentials/package.py b/var/spack/repos/builtin/packages/r-credentials/package.py
index 8ac8114ba6..42f4e0ea42 100644
--- a/var/spack/repos/builtin/packages/r-credentials/package.py
+++ b/var/spack/repos/builtin/packages/r-credentials/package.py
@@ -21,6 +21,7 @@ class RCredentials(RPackage):
license("MIT")
+ version("2.0.1", sha256="2c7cfc45bd4afa9a2c2b85d43e907b212da3468781e1b617737bd095253c358b")
version("1.3.2", sha256="2ffa7c11bedbfa034adf553d0a2f2e4f6a496b858af753a09a89219cff9028b8")
version("1.3.0", sha256="c119ec26fd97b977c3b0cd1eb8fad3c59b84df6262c3adbf5ee9f3d6c9903ff1")
diff --git a/var/spack/repos/builtin/packages/r-crosstalk/package.py b/var/spack/repos/builtin/packages/r-crosstalk/package.py
index 1009261d8c..352064eb78 100644
--- a/var/spack/repos/builtin/packages/r-crosstalk/package.py
+++ b/var/spack/repos/builtin/packages/r-crosstalk/package.py
@@ -17,6 +17,7 @@ class RCrosstalk(RPackage):
license("MIT")
+ version("1.2.1", sha256="680cf08416d6d5a1194dd85ee5695c268af9d4d01b201448e1d486c6e06014f1")
version("1.2.0", sha256="4237baab35cd246a8a98fb9cf4ce53b6ddbc31d00742ded4edea0479613d1ea0")
version("1.1.0.1", sha256="36a70b10bc11826e314c05f9579fd791b9ac3b3a2cfed4d4ca74ce1ad991300e")
version("1.0.0", sha256="b31eada24cac26f24c9763d9a8cbe0adfd87b264cf57f8725027fe0c7742ca51")
diff --git a/var/spack/repos/builtin/packages/r-crul/package.py b/var/spack/repos/builtin/packages/r-crul/package.py
index c7e94bb9af..ac399ca1e4 100644
--- a/var/spack/repos/builtin/packages/r-crul/package.py
+++ b/var/spack/repos/builtin/packages/r-crul/package.py
@@ -20,6 +20,7 @@ class RCrul(RPackage):
license("MIT")
+ version("1.5.0", sha256="db733778d2815f9d974b00e8df7c821cd638e069e08d73adfa606add201ebd9d")
version("1.3", sha256="8058617d8b3724acb5b89d0e6e63f381df5c56565128b250a65eceb2b8081e2d")
version("1.2.0", sha256="be1a149b21cf219ef55adfb56a6a5eb9892a9acf0d5f5421a22e52f2a7066f8c")
version("1.0.0", sha256="2ade500f6cf89b2d0ca8496b8d4df9937d6f802a35c9ad10d9fab8632cdb1027")
diff --git a/var/spack/repos/builtin/packages/r-cubature/package.py b/var/spack/repos/builtin/packages/r-cubature/package.py
index 23a01172eb..d00dfb9d66 100644
--- a/var/spack/repos/builtin/packages/r-cubature/package.py
+++ b/var/spack/repos/builtin/packages/r-cubature/package.py
@@ -20,6 +20,7 @@ class RCubature(RPackage):
license("GPL-3.0-only")
+ version("2.1.1", sha256="b37220e733f4e610e089e69896f66dc5bc461478a040321c19600ec5d07ea684")
version("2.0.4.6", sha256="330c9dc2be9bf6815473fd40efa8c2de47c1ed286cb097d0ff846b56c9e9f95a")
version("2.0.4.5", sha256="a81f118e5b7950a4a29e5509f8a40d7b87544fb25783917242000561379c9023")
version("2.0.4.4", sha256="087b3b2c4f25d873fa95e9d38766a17a7201d03a6f4960f1e080a8db8b67d569")
diff --git a/var/spack/repos/builtin/packages/r-cubist/package.py b/var/spack/repos/builtin/packages/r-cubist/package.py
index 1a753e9285..5467bc8701 100644
--- a/var/spack/repos/builtin/packages/r-cubist/package.py
+++ b/var/spack/repos/builtin/packages/r-cubist/package.py
@@ -13,6 +13,7 @@ class RCubist(RPackage):
cran = "Cubist"
+ version("0.4.4", sha256="51d5fff104b69de75e08a3e14eaf67ff13ffda5be4b60f79236793475c241590")
version("0.4.2.1", sha256="f07afed59019a3febc04acc3e58728e42b42910940a1d529f9fc482931d09157")
version("0.4.0", sha256="3a1f74d44300e3a38a10e3693fc019cfcca221d62d7c416abebb20811e965578")
version("0.3.0", sha256="88a76e7f858a8e978a73a97ce6a3504201d889517b39ce862cef734dcf9eb263")
diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py
index c688656ad0..c9a7978dd2 100644
--- a/var/spack/repos/builtin/packages/r-curl/package.py
+++ b/var/spack/repos/builtin/packages/r-curl/package.py
@@ -23,16 +23,43 @@ class RCurl(RPackage):
license("MIT")
+ version("5.2.1", sha256="4a7a4d8c08aa1bca2fcd9c58ade7b4b0ea2ed9076d0521071be29baac8adfa90")
version("5.0.0", sha256="d7f3cac9b513914ffa8f6f64e6fa5dd96c8273378ace6b0c16b71bc6ba59c9b2")
version("4.3.3", sha256="3567b6acad40dad68acfe07511c853824839d451a50219a96dd6d125ed617c9e")
version("4.3.2", sha256="90b1facb4be8b6315bb3d272ba2dd90b88973f6ea1ab7f439550230f8500a568")
version("4.3", sha256="7406d485bb50a6190e3ed201e3489063fd249b8b3b1b4f049167ac405a352edb")
- version("4.0", sha256="09a99c9c86666449188fbb211cb1e9fbdb5108ab56f0d09322cd0ae50e926171")
- version("3.3", sha256="0cb0b9a9280edc42ebed94708541ec86b4f48779e722171e45227eab8a88a5bd")
- version("3.0", sha256="7bf8e3ae7cc77802ae300277e85d925d4c0611a9b7dad5c5601e0d2cbe14a506")
- version("2.3", sha256="f901dad6bb70a6875a85da75bcbb42afffdcdf4ef221909733826bcb012d7c3d")
- version("1.0", sha256="f8927228754fdfb21dbf08b9e67c5f97e06764c4adf327a4126eed84b1508f3d")
- version("0.9.7", sha256="46e150998723fd1937da598f47f49fe47e40c1f57ec594436c6ef1e0145b44dc")
+
+ # requires deprecated curl
+ version(
+ "4.0",
+ sha256="09a99c9c86666449188fbb211cb1e9fbdb5108ab56f0d09322cd0ae50e926171",
+ deprecated=True,
+ )
+ version(
+ "3.3",
+ sha256="0cb0b9a9280edc42ebed94708541ec86b4f48779e722171e45227eab8a88a5bd",
+ deprecated=True,
+ )
+ version(
+ "3.0",
+ sha256="7bf8e3ae7cc77802ae300277e85d925d4c0611a9b7dad5c5601e0d2cbe14a506",
+ deprecated=True,
+ )
+ version(
+ "2.3",
+ sha256="f901dad6bb70a6875a85da75bcbb42afffdcdf4ef221909733826bcb012d7c3d",
+ deprecated=True,
+ )
+ version(
+ "1.0",
+ sha256="f8927228754fdfb21dbf08b9e67c5f97e06764c4adf327a4126eed84b1508f3d",
+ deprecated=True,
+ )
+ version(
+ "0.9.7",
+ sha256="46e150998723fd1937da598f47f49fe47e40c1f57ec594436c6ef1e0145b44dc",
+ deprecated=True,
+ )
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("curl", when="@4.3:")
diff --git a/var/spack/repos/builtin/packages/r-cvxr/package.py b/var/spack/repos/builtin/packages/r-cvxr/package.py
index 20ace982f7..d12dc088cf 100644
--- a/var/spack/repos/builtin/packages/r-cvxr/package.py
+++ b/var/spack/repos/builtin/packages/r-cvxr/package.py
@@ -22,13 +22,15 @@ class RCvxr(RPackage):
license("Apache-2.0")
+ version("1.0-14", sha256="4d027cc2b933720ded4edcc098fde1259992673825abdb109fd84fee4af57cdb")
version("1.0-11", sha256="e92a9638f35f4909e2a29c3b7106081e3dae7ff88b14bb6466b87fbdc80b972a")
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
- depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-rcpp@0.12.12:", type=("build", "run"))
depends_on("r-bit64", type=("build", "run"))
+ depends_on("r-clarabel@0.9.0:", type=("build", "run"), when="@1.0-14:")
depends_on("r-gmp", type=("build", "run"))
depends_on("r-rmpfr", type=("build", "run"))
depends_on("r-ecosolver@0.5.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dada2/package.py b/var/spack/repos/builtin/packages/r-dada2/package.py
index 8f4d0e7e44..8f6be65709 100644
--- a/var/spack/repos/builtin/packages/r-dada2/package.py
+++ b/var/spack/repos/builtin/packages/r-dada2/package.py
@@ -18,6 +18,8 @@ class RDada2(RPackage):
version("1.20", sha256="351b80dc5cdd587f5d4fe2541574e3d0cf7966342ee913b47cb20c7eb150e3f5")
version("1.14", sha256="19980b9d7b0a0e80e86010357cae11d1fc07c2d02067c4445169143cf1f99906")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.4:", type=("build", "run"))
depends_on("r-rcpp@0.12.0:", type=("build", "run"))
depends_on("r-biostrings@2.42.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-data-table/package.py b/var/spack/repos/builtin/packages/r-data-table/package.py
index 425c739112..c80fffb708 100644
--- a/var/spack/repos/builtin/packages/r-data-table/package.py
+++ b/var/spack/repos/builtin/packages/r-data-table/package.py
@@ -18,6 +18,7 @@ class RDataTable(RPackage):
license("MPL-2.0-no-copyleft-exception")
+ version("1.15.4", sha256="ab8065ff946d59ecaaf5eaf91a975495c07c30caad97a71205c72e41a740cb53")
version("1.14.8", sha256="14b2ce5367df9c9bb58f373555066f5dcb629c156149b5565de36d69557139fd")
version("1.14.4", sha256="4862a7c26e8309108fd1f5296616407b9ff9e4e1be5cdedcb717f114c2e348f0")
version("1.14.2", sha256="f741b951e5937440139514aedbae78dbd6862d825066848bdb006aa02c2f3d2b")
diff --git a/var/spack/repos/builtin/packages/r-dbi/package.py b/var/spack/repos/builtin/packages/r-dbi/package.py
index bab7446c76..1eafed4f13 100644
--- a/var/spack/repos/builtin/packages/r-dbi/package.py
+++ b/var/spack/repos/builtin/packages/r-dbi/package.py
@@ -15,6 +15,7 @@ class RDbi(RPackage):
cran = "DBI"
+ version("1.2.3", sha256="cf6708a7566a80929f06575aa345fae354714159ed5fab5db14306fc5d0d2dbe")
version("1.1.3", sha256="38bb33753da5bddb78893a5228a5d269dae3bf16f21dc5d9853ac9c24d31428d")
version("1.1.2", sha256="56ec377d471c76ac234ddfd313bd01a050c99fb6fa5f704f5333b34a5d714f58")
version("1.1.1", sha256="572ab3b8a6421d0ac3e7665c4c842826f1723af98fca25d4f43edb419e771344")
diff --git a/var/spack/repos/builtin/packages/r-dbplyr/package.py b/var/spack/repos/builtin/packages/r-dbplyr/package.py
index 5841bc5e46..566669b469 100644
--- a/var/spack/repos/builtin/packages/r-dbplyr/package.py
+++ b/var/spack/repos/builtin/packages/r-dbplyr/package.py
@@ -18,6 +18,7 @@ class RDbplyr(RPackage):
license("MIT")
+ version("2.5.0", sha256="bb475bdbe89487b189ecc257b5c92007a7458803c81aa77bfc4ed46f5f24bcff")
version("2.3.2", sha256="0ddc00595ec6b21962d0bb6f470f5f7c9d61c74a4f92681a37e94e1295707fac")
version("2.2.1", sha256="a6f3f644c068fe1a3b3e99a3a10de55a150d43ef20b5130e6724d142afcb0df7")
version("2.1.1", sha256="aba4cf47b85ab240fd3ec4cd8d512f6e1958201e151577c1a2ebc3d6ebc5bc08")
@@ -30,34 +31,45 @@ class RDbplyr(RPackage):
version("1.1.0", sha256="7b1e456a2d1056fa6284582cd82d2df66d06b3eea92e9995f5a91a45f246f69d")
depends_on("r@3.1:", type=("build", "run"))
+ depends_on("r@3.6:", type=("build", "run"), when="@2.4.0:")
depends_on("r-blob@1.2.0:", type=("build", "run"), when="@2.0.0:")
depends_on("r-cli@3.3.0:", type=("build", "run"), when="@2.2.1:")
depends_on("r-cli@3.4.1:", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-cli@3.6.1:", type=("build", "run"), when="@2.4.0:")
depends_on("r-dbi@1.0.0:", type=("build", "run"))
+ depends_on("r-dbi@1.1.3:", type=("build", "run"), when="@2.4.0:")
depends_on("r-dplyr@0.8.0:", type=("build", "run"))
depends_on("r-dplyr@1.0.3:", type=("build", "run"), when="@2.1.0")
depends_on("r-dplyr@1.0.4:", type=("build", "run"), when="@2.1.1:")
depends_on("r-dplyr@1.0.9:", type=("build", "run"), when="@2.2.1:")
depends_on("r-dplyr@1.1.0:", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-dplyr@1.1.2:", type=("build", "run"), when="@2.4.0:")
depends_on("r-glue@1.2.0:", type=("build", "run"))
+ depends_on("r-glue@1.6.2:", type=("build", "run"), when="@2.4.0:")
depends_on("r-lifecycle", type=("build", "run"), when="@2.0.0:")
depends_on("r-lifecycle@1.0.0:", type=("build", "run"), when="@2.1.1:")
depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@2.3.2:")
depends_on("r-magrittr", type=("build", "run"), when="@2.0.0:")
depends_on("r-pillar@1.5.0:", type=("build", "run"), when="@2.2.1:")
+ depends_on("r-pillar@1.9.0:", type=("build", "run"), when="@2.4.0:")
depends_on("r-purrr@0.2.5:", type=("build", "run"))
depends_on("r-purrr@1.0.1:", type=("build", "run"), when="@2.3.2:")
depends_on("r-r6@2.2.2:", type=("build", "run"))
depends_on("r-rlang@0.2.0:", type=("build", "run"))
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@2.2.1:")
depends_on("r-rlang@1.0.6:", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-rlang@1.1.1:", type=("build", "run"), when="@2.4.0:")
depends_on("r-tibble@1.4.2:", type=("build", "run"))
+ depends_on("r-tibble@3.2.1:", type=("build", "run"), when="@2.4.0:")
depends_on("r-tidyr@1.3.0:", type=("build", "run"), when="@2.3.2:")
depends_on("r-tidyselect@0.2.4:", type=("build", "run"))
depends_on("r-tidyselect@1.2.0:", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-tidyselect@1.2.1:", type=("build", "run"), when="@2.4.0:")
depends_on("r-vctrs", type=("build", "run"), when="@2.1:")
depends_on("r-vctrs@0.4.1:", type=("build", "run"), when="@2.2.1:")
depends_on("r-vctrs@0.5.0:", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-vctrs@0.6.3:", type=("build", "run"), when="@2.4.0:")
depends_on("r-withr", type=("build", "run"), when="@2.0.0:")
+ depends_on("r-withr@2.5.0:", type=("build", "run"), when="@2.4.0:")
depends_on("r-ellipsis", type=("build", "run"), when="@2.1.1")
depends_on("r-assertthat", type=("build", "run"), when="@:2.2.1")
diff --git a/var/spack/repos/builtin/packages/r-debugme/package.py b/var/spack/repos/builtin/packages/r-debugme/package.py
index d17b8edc74..f74474f444 100644
--- a/var/spack/repos/builtin/packages/r-debugme/package.py
+++ b/var/spack/repos/builtin/packages/r-debugme/package.py
@@ -16,6 +16,8 @@ class RDebugme(RPackage):
license("MIT")
+ version("1.2.0", sha256="b22605ad3b20d460308d8c9c18116e56c4d6ff10577608eaf58802998171f099")
version("1.1.0", sha256="4dae0e2450d6689a6eab560e36f8a7c63853abbab64994028220b8fd4b793ab1")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.2.0:")
depends_on("r-crayon", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-decipher/package.py b/var/spack/repos/builtin/packages/r-decipher/package.py
index f04955e0c0..fe7f930cab 100644
--- a/var/spack/repos/builtin/packages/r-decipher/package.py
+++ b/var/spack/repos/builtin/packages/r-decipher/package.py
@@ -24,6 +24,8 @@ class RDecipher(RPackage):
version("2.6.0", commit="ed9acaa35c8774cb0ea01cd7cc2e46d063d8c70e")
version("2.4.0", commit="1a57b8e4c7d7dec1c233f79c9a88d3705e0ad432")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@2.18.1:")
depends_on("r-biostrings@2.35.12:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-delayedarray/package.py b/var/spack/repos/builtin/packages/r-delayedarray/package.py
index c5e6108253..31f81e1896 100644
--- a/var/spack/repos/builtin/packages/r-delayedarray/package.py
+++ b/var/spack/repos/builtin/packages/r-delayedarray/package.py
@@ -31,6 +31,8 @@ class RDelayedarray(RPackage):
version("0.4.1", commit="ffe932ef8c255614340e4856fc6e0b44128a27a1")
version("0.2.7", commit="909c2ce1665ebae2543172ead50abbe10bd42bc4")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.4:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@0.20.0:")
depends_on("r-matrix", type=("build", "run"), when="@0.10.0:")
diff --git a/var/spack/repos/builtin/packages/r-deldir/package.py b/var/spack/repos/builtin/packages/r-deldir/package.py
index 4bc422d960..32d433d942 100644
--- a/var/spack/repos/builtin/packages/r-deldir/package.py
+++ b/var/spack/repos/builtin/packages/r-deldir/package.py
@@ -19,6 +19,7 @@ class RDeldir(RPackage):
license("GPL-2.0-or-later")
+ version("2.0-4", sha256="d418acb28ec3707b6d64c7466d0cefbb49b098537f37558d8f7a5befd34a4653")
version("1.0-6", sha256="6df6d8325c607e0b7d63cbc53c29e774eff95ad4acf9c7ec8f70693b0505f8c5")
version("0.2-3", sha256="2d24800f5ec6ad9dc57b9b265365b29c07717f4562d8f3e6344336d3340c364e")
version("0.1-23", sha256="e0112bce9fc94daf73596a0fff9b3958b80872e3bbb487be73e157b13a6f201d")
diff --git a/var/spack/repos/builtin/packages/r-densvis/package.py b/var/spack/repos/builtin/packages/r-densvis/package.py
index 6099cff50c..7a1d66c612 100644
--- a/var/spack/repos/builtin/packages/r-densvis/package.py
+++ b/var/spack/repos/builtin/packages/r-densvis/package.py
@@ -37,6 +37,8 @@ class RDensvis(RPackage):
version("1.10.0", commit="833db1fb7b2a5667575cc2e7c2fefc8360c8d7fb")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-basilisk", type=("build", "run"))
depends_on("r-assertthat", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-deoptim/package.py b/var/spack/repos/builtin/packages/r-deoptim/package.py
index 9e44e7d04a..af382d4323 100644
--- a/var/spack/repos/builtin/packages/r-deoptim/package.py
+++ b/var/spack/repos/builtin/packages/r-deoptim/package.py
@@ -22,4 +22,6 @@ class RDeoptim(RPackage):
version("2.2-4", sha256="0a547784090d1e9b93efc53768110621f35bed3692864f6ce5c0dda2ebd6d482")
version("2.2-3", sha256="af2120feea3a736ee7a5a93c6767d464abc0d45ce75568074b233405e73c9a5d")
+ depends_on("c", type="build") # generated
+
depends_on("r-parallelly", type=("build", "run"), when="@2.2-7:2.2-7")
diff --git a/var/spack/repos/builtin/packages/r-deoptimr/package.py b/var/spack/repos/builtin/packages/r-deoptimr/package.py
index d2de544381..8fcfa4dfa7 100644
--- a/var/spack/repos/builtin/packages/r-deoptimr/package.py
+++ b/var/spack/repos/builtin/packages/r-deoptimr/package.py
@@ -19,6 +19,7 @@ class RDeoptimr(RPackage):
cran = "DEoptimR"
+ version("1.1-3", sha256="8dd8a61b07b02022493d7021dc62ef2c4dc2d596cff897846713c5f8dd784694")
version("1.0-12", sha256="6136f98031bceaa691c5725222eca2d0f750a7b7fb60216480633635a9613d79")
version("1.0-11", sha256="1874b30f4b75f9bfa891986598f1ebe1fce27fdced14f8f417d3535cac08165b")
version("1.0-10", sha256="774f7ba0ac9c73aaab4567024b98afdb58098905726e72bceeeb9e380e782ad5")
diff --git a/var/spack/repos/builtin/packages/r-desc/package.py b/var/spack/repos/builtin/packages/r-desc/package.py
index 2fb79bce33..c56459871e 100644
--- a/var/spack/repos/builtin/packages/r-desc/package.py
+++ b/var/spack/repos/builtin/packages/r-desc/package.py
@@ -16,6 +16,7 @@ class RDesc(RPackage):
license("MIT")
+ version("1.4.3", sha256="54468da73dd78fc9e7c565c41cfe3331802c2134b2e61a9ad197215317092f26")
version("1.4.2", sha256="758acf14be478c09ba7e84ade3a7ce512becf35d44e5e6a997b932065f2a227c")
version("1.4.1", sha256="8f9ebb51eccf925b2e76bc65ecf495e8f3882b8c0053023f396622f0402d6f54")
version("1.4.0", sha256="8220e4c706449b8121b822e70b1414f391ef419aed574836a234c63b83e5d649")
@@ -25,7 +26,7 @@ class RDesc(RPackage):
depends_on("r@3.4:", type=("build", "run"), when="@1.4.1:")
depends_on("r-cli", type=("build", "run"), when="@1.4.1:")
depends_on("r-r6", type=("build", "run"))
- depends_on("r-rprojroot", type=("build", "run"))
+ depends_on("r-rprojroot", type=("build", "run"), when="@:1.4.2")
depends_on("r-assertthat", type=("build", "run"), when="@:1.2")
depends_on("r-crayon", type=("build", "run"), when="@:1.4.0")
diff --git a/var/spack/repos/builtin/packages/r-deseq/package.py b/var/spack/repos/builtin/packages/r-deseq/package.py
index cfdf5f47cc..4dca7fd96c 100644
--- a/var/spack/repos/builtin/packages/r-deseq/package.py
+++ b/var/spack/repos/builtin/packages/r-deseq/package.py
@@ -23,6 +23,8 @@ class RDeseq(RPackage):
version("1.30.0", commit="90c93d991dd980d538c13b0361d3345f9546794e")
version("1.28.0", commit="738371466e6ccf00179fd35b617c8ba0e1e91630")
+ depends_on("c", type="build") # generated
+
depends_on("r-biocgenerics@0.7.5:", type=("build", "run"))
depends_on("r-biobase@2.21.7:", type=("build", "run"))
depends_on("r-locfit", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-deseq2/package.py b/var/spack/repos/builtin/packages/r-deseq2/package.py
index d646aa2f57..5bb4ffe19d 100644
--- a/var/spack/repos/builtin/packages/r-deseq2/package.py
+++ b/var/spack/repos/builtin/packages/r-deseq2/package.py
@@ -28,6 +28,8 @@ class RDeseq2(RPackage):
version("1.18.1", commit="ef65091d46436af68915124b752f5e1cc55e93a7")
version("1.16.1", commit="f41d9df2de25fb57054480e50bc208447a6d82fb")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-s4vectors@0.9.25:", type=("build", "run"))
depends_on("r-s4vectors@0.23.18:", type=("build", "run"), when="@1.30.0:")
depends_on("r-iranges", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-desolve/package.py b/var/spack/repos/builtin/packages/r-desolve/package.py
index 45407eb75a..2b64e6e85b 100644
--- a/var/spack/repos/builtin/packages/r-desolve/package.py
+++ b/var/spack/repos/builtin/packages/r-desolve/package.py
@@ -23,6 +23,7 @@ class RDesolve(RPackage):
cran = "deSolve"
+ version("1.40", sha256="8c09ae6bb6875b569b9844eede30b790f39fc227f5c9d045fa63ce1b22f500ef")
version("1.35", sha256="96f17f497713754f84ff56c3538c6d05b9f5229f9a2a32aafec7d7cdc721d488")
version("1.34", sha256="2254305f44dde22ac685fef4c60e29a0608af0197c803107365d1d80b75c9f21")
version("1.33", sha256="71de979e05ce7e472308ac5218e97efe976051364ba579b10940dc1fe4c8b684")
diff --git a/var/spack/repos/builtin/packages/r-diagram/package.py b/var/spack/repos/builtin/packages/r-diagram/package.py
index c3cd1d416d..16816d766f 100644
--- a/var/spack/repos/builtin/packages/r-diagram/package.py
+++ b/var/spack/repos/builtin/packages/r-diagram/package.py
@@ -24,5 +24,5 @@ class RDiagram(RPackage):
version("1.6.5", sha256="e9c03e7712e0282c5d9f2b760bafe2aac9e99a9723578d9e6369d60301f574e4")
- depends_on("r@2.01:", type=("build", "run"))
+ depends_on("r@2.1:", type=("build", "run"))
depends_on("r-shape", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-diagrammer/package.py b/var/spack/repos/builtin/packages/r-diagrammer/package.py
index 4e71673b05..76de9e965d 100644
--- a/var/spack/repos/builtin/packages/r-diagrammer/package.py
+++ b/var/spack/repos/builtin/packages/r-diagrammer/package.py
@@ -18,6 +18,7 @@ class RDiagrammer(RPackage):
cran = "DiagrammeR"
+ version("1.0.11", sha256="e873e3d6e198232408161661001ddcb04c9a56065bb4703c925e538462f4c4df")
version("1.0.9", sha256="64a426fe27110dddd8b0c1223ae4c397a2e553ae5e81ddd4ff67c026cfc40abf")
version("1.0.8", sha256="b9157b26215edda4fe0a1b9330a597d5b01a5d7e660a9832f593b87c584dd233")
version("1.0.7", sha256="6af291a7136657b9f7c67b96cd7f3afe99662cf5a477ebbb213a6c53df623050")
@@ -28,10 +29,10 @@ class RDiagrammer(RPackage):
depends_on("r@3.2.0:", type=("build", "run"), when="@0.9.2:")
depends_on("r@3.5.0:", type=("build", "run"), when="@1.0.7")
+ depends_on("r-cli", type=("build", "run"), when="@1.0.11:")
depends_on("r-dplyr@0.7.4:", type=("build", "run"), when="@1.0.0:")
depends_on("r-dplyr@0.7.6:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-dplyr@1.0.7:", type=("build", "run"), when="@1.0.7:")
- depends_on("r-downloader@0.4:", type=("build", "run"), when="@1.0.0:")
depends_on("r-glue@1.2.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-glue@1.3.0:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-glue@1.5.0:", type=("build", "run"), when="@1.0.7:")
@@ -43,8 +44,7 @@ class RDiagrammer(RPackage):
depends_on("r-igraph@1.1.2:", type=("build", "run"))
depends_on("r-igraph@1.2.2:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-igraph@1.2.11:", type=("build", "run"), when="@1.0.7:")
- depends_on("r-influencer@0.1.0:", type=("build", "run"))
- depends_on("r-influencer@0.1.0.1:", type=("build", "run"), when="@1.0.7:")
+ depends_on("r-igraph@1.4.0:", type=("build", "run"), when="@1.0.11:")
depends_on("r-magrittr@1.5:", type=("build", "run"), when="@1.0.0:")
depends_on("r-purrr@0.2.4:", type=("build", "run"), when="@1.0.0:")
depends_on("r-purrr@0.2.5:", type=("build", "run"), when="@1.0.6.1:")
@@ -55,6 +55,7 @@ class RDiagrammer(RPackage):
depends_on("r-rlang@0.2.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-rlang@0.2.2:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-rlang@0.4:", type=("build", "run"), when="@1.0.7:")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.0.11:")
depends_on("r-rstudioapi@0.7:", type=("build", "run"))
depends_on("r-scales@0.5.0:", type=("build", "run"))
depends_on("r-scales@1.0.0:", type=("build", "run"), when="@1.0.6.1:")
@@ -67,11 +68,15 @@ class RDiagrammer(RPackage):
depends_on("r-tidyr@0.8.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-tidyr@0.8.1:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-tidyr@1.1:", type=("build", "run"), when="@1.0.7:")
- depends_on("r-viridis@0.5.0:", type=("build", "run"), when="@1.0.0:")
- depends_on("r-viridis@0.5.1:", type=("build", "run"), when="@1.0.6.1:")
- depends_on("r-viridis@0.6.2:", type=("build", "run"), when="@1.0.7:")
+ depends_on("r-viridislite@0.4.2:", type=("build", "run"), when="@1.0.11:")
depends_on("r-visnetwork@2.0.3:", type=("build", "run"))
depends_on("r-visnetwork@2.0.4:", type=("build", "run"), when="@1.0.6.1:")
depends_on("r-visnetwork@2.1.0:", type=("build", "run"), when="@1.0.7:")
+ depends_on("r-downloader@0.4:", type=("build", "run"), when="@1.0.0:1.0.10")
+ depends_on("r-influencer@0.1.0:", type=("build", "run"), when="@:1.0.9")
+ depends_on("r-influencer@0.1.0.1:", type=("build", "run"), when="@1.0.7:1.0.9")
+ depends_on("r-viridis@0.5.0:", type=("build", "run"), when="@1.0.0:1.0.10")
+ depends_on("r-viridis@0.5.1:", type=("build", "run"), when="@1.0.6.1:1.0.10")
+ depends_on("r-viridis@0.6.2:", type=("build", "run"), when="@1.0.7:1.0.10")
depends_on("r-rgexf@0.15.3:", type=("build", "run"), when="@1.0.0:1.0.1")
diff --git a/var/spack/repos/builtin/packages/r-dicekriging/package.py b/var/spack/repos/builtin/packages/r-dicekriging/package.py
index 1e91e9ecb0..23d4333e68 100644
--- a/var/spack/repos/builtin/packages/r-dicekriging/package.py
+++ b/var/spack/repos/builtin/packages/r-dicekriging/package.py
@@ -18,3 +18,5 @@ class RDicekriging(RPackage):
version("1.5.8", sha256="11d02b894cb509dbb8887ae27b6d08ba25aa52ac3ece134c3759c2b3b1bf4d77")
version("1.5.6", sha256="25466d2db9f17083d1c7b9545e5ec88f630be934f9373c2f7b36c38de4e64e92")
version("1.5.5", sha256="55fe161f867a0c3772023c3047041b877aa54d29cb474ec87293ec31cc5cb30c")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-diffobj/package.py b/var/spack/repos/builtin/packages/r-diffobj/package.py
index e6c2cb2b65..b34eab29aa 100644
--- a/var/spack/repos/builtin/packages/r-diffobj/package.py
+++ b/var/spack/repos/builtin/packages/r-diffobj/package.py
@@ -19,5 +19,7 @@ class RDiffobj(RPackage):
version("0.3.5", sha256="d860a79b1d4c9e369282d7391b539fe89228954854a65ba47181407c53e3cf60")
version("0.3.3", sha256="414e5573470b9565b9149a0a61c7e8344fb37f889d23dc4e131acc8aa62e6df4")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-crayon@1.3.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py
index 48150288b8..e41ec4e9df 100644
--- a/var/spack/repos/builtin/packages/r-digest/package.py
+++ b/var/spack/repos/builtin/packages/r-digest/package.py
@@ -30,6 +30,7 @@ class RDigest(RPackage):
license("GPL-2.0-or-later")
+ version("0.6.37", sha256="82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321")
version("0.6.31", sha256="5a284f490eaca6750f695f00a584cfca3f180ca1046ac1107202141149d431b9")
version("0.6.30", sha256="7b8059943be7dba6053268dfcc229de1bb0b55db497b2943541a6abace076aa7")
version("0.6.29", sha256="792c1f14a4c8047745152f5e45ce7351978af8d770c29d2ea39c7acd5d619cd9")
diff --git a/var/spack/repos/builtin/packages/r-diptest/package.py b/var/spack/repos/builtin/packages/r-diptest/package.py
index c862c0b74d..30f2f17795 100644
--- a/var/spack/repos/builtin/packages/r-diptest/package.py
+++ b/var/spack/repos/builtin/packages/r-diptest/package.py
@@ -17,5 +17,6 @@ class RDiptest(RPackage):
license("GPL-2.0-or-later")
+ version("0.77-1", sha256="224eae00f483ce0fb131719065667227417cc98ad2beda55bfd5efe2bb612813")
version("0.76-0", sha256="508a5ebb161519cd0fcd156dc047b51becb216d545d62c6522496463f94ec280")
version("0.75-7", sha256="462900100ca598ef21dbe566bf1ab2ce7c49cdeab6b7a600a50489b05f61b61b")
diff --git a/var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py b/var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py
index b6af1bebb6..569468a4b0 100644
--- a/var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py
+++ b/var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py
@@ -29,6 +29,8 @@ class RDirichletmultinomial(RPackage):
version("1.20.0", commit="251529f301da1482551142240aeb6baf8dab2272")
version("1.18.0", commit="81ccc8d83b8ef84f5d3e877bc0a04233a0f63c51")
+ depends_on("c", type="build") # generated
+
depends_on("r-s4vectors", type=("build", "run"))
depends_on("r-iranges", type=("build", "run"))
depends_on("r-biocgenerics", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dismo/package.py b/var/spack/repos/builtin/packages/r-dismo/package.py
index 93aedbad8f..0e2778904d 100644
--- a/var/spack/repos/builtin/packages/r-dismo/package.py
+++ b/var/spack/repos/builtin/packages/r-dismo/package.py
@@ -17,6 +17,7 @@ class RDismo(RPackage):
license("GPL-3.0-or-later")
+ version("1.3-14", sha256="67a0f2e95562dd2aa612d52dfffab86985b52591a5ed7891b58b26667b394cd7")
version("1.3-9", sha256="3924521db67716b004a4c870985c65d037edfe926b14222740fd6c2b2093beee")
version("1.3-5", sha256="812e1932d42c0f40acf2ab5c5b2d068f93128caf648626e1d11baf1a09340ee7")
version("1.3-3", sha256="fd65331ac18a4287ba0856b90508ddd0e2738c653eecc5f3eb2b14e1d06949ca")
diff --git a/var/spack/repos/builtin/packages/r-distributional/package.py b/var/spack/repos/builtin/packages/r-distributional/package.py
index 524f21bd63..7daba35a5c 100644
--- a/var/spack/repos/builtin/packages/r-distributional/package.py
+++ b/var/spack/repos/builtin/packages/r-distributional/package.py
@@ -21,6 +21,7 @@ class RDistributional(RPackage):
license("GPL-3.0-only")
+ version("0.4.0", sha256="09b5f3279bed4c79575f75d5f7f5e3e593c7838434a78c89f0b7184e8f20e602")
version("0.3.2", sha256="c883d633398233aee5a8ca6b587687f765bdfe0732a84e4961e7f71ac0d008f8")
version("0.3.1", sha256="727e56cbcf0c8a8adacca8030214ddbd14f68ee28d0aad716467bd68b027235f")
version("0.3.0", sha256="fab36c7346617d8f2ca4b3cd0e3c9da93cb2f95fb7f102a3ae88670e694751d6")
@@ -30,9 +31,10 @@ class RDistributional(RPackage):
depends_on("r-rlang@0.4.5:", type=("build", "run"))
depends_on("r-generics", type=("build", "run"))
depends_on("r-numderiv", type=("build", "run"))
- depends_on("r-ggplot2", type=("build", "run"))
- depends_on("r-scales", type=("build", "run"))
- depends_on("r-farver", type=("build", "run"))
- depends_on("r-digest", type=("build", "run"))
depends_on("r-lifecycle", type=("build", "run"))
+
+ depends_on("r-ggplot2", type=("build", "run"), when="@:0.3.2")
+ depends_on("r-scales", type=("build", "run"), when="@:0.3.2")
+ depends_on("r-farver", type=("build", "run"), when="@:0.3.2")
+ depends_on("r-digest", type=("build", "run"), when="@:0.3.2")
depends_on("r-ellipsis", type=("build", "run"), when="@:0.3.0")
diff --git a/var/spack/repos/builtin/packages/r-diversitree/package.py b/var/spack/repos/builtin/packages/r-diversitree/package.py
index 4b3d646833..9960ba3b24 100644
--- a/var/spack/repos/builtin/packages/r-diversitree/package.py
+++ b/var/spack/repos/builtin/packages/r-diversitree/package.py
@@ -21,6 +21,7 @@ class RDiversitree(RPackage):
license("GPL-2.0-or-later")
+ version("0.10-0", sha256="c13627e04bc55b61de218a6bf6fa44680970604f82eed88417d1de5717d782f6")
version("0.9-16", sha256="4c236970b58e56b922352f3f5d97010c74d8ec5783b375c311fe11abfb99f967")
version("0.9-15", sha256="c739ef3d4fcc24fd6855b1d297d31e0f89fbaff1efe8a2d149044458ecd363ea")
version("0.9-11", sha256="4caa6a468f93de9f1c8c30e4457f34bb8346e1acdaf74f684005bfa86a950ecb")
diff --git a/var/spack/repos/builtin/packages/r-dnacopy/package.py b/var/spack/repos/builtin/packages/r-dnacopy/package.py
index f1b23120c3..3f6cd7391d 100644
--- a/var/spack/repos/builtin/packages/r-dnacopy/package.py
+++ b/var/spack/repos/builtin/packages/r-dnacopy/package.py
@@ -25,3 +25,6 @@ class RDnacopy(RPackage):
version("1.54.0", commit="fe2657936afbce8ee03221461dff4265e3ded4c4")
version("1.52.0", commit="2632fbecec4cef3705b85676942a59188ae9bba4")
version("1.50.1", commit="a20153029e28c009df813dbaf13d9f519fafa4e8")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-doby/package.py b/var/spack/repos/builtin/packages/r-doby/package.py
index 8c7015b844..9f989aca41 100644
--- a/var/spack/repos/builtin/packages/r-doby/package.py
+++ b/var/spack/repos/builtin/packages/r-doby/package.py
@@ -16,16 +16,25 @@ class RDoby(RPackage):
cran = "doBy"
+ version("4.6.22", sha256="2aa7e236de98af73de54a46214ceac50fdf69d90b12bb37f2779a501f40b0b0d")
version("4.6.16", sha256="d5937eb57d293b0bc2e581ff2e1e628671cb4eacddc0b9574dc28a5316ecbbe7")
depends_on("r@3.6.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@4.6.18:")
+ depends_on("r@4.2.0:", type=("build", "run"), when="@4.6.21:")
+ depends_on("r-boot", type=("build", "run"), when="@4.6.21:")
depends_on("r-broom", type=("build", "run"))
+ depends_on("r-cowplot", type=("build", "run"), when="@4.6.21:")
depends_on("r-deriv", type=("build", "run"))
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
- depends_on("r-magrittr", type=("build", "run"))
depends_on("r-microbenchmark", type=("build", "run"))
- depends_on("r-pbkrtest@0.4-8.1:", type=("build", "run"))
+ depends_on("r-modelr", type=("build", "run"), when="@4.6.21:")
+ depends_on("r-rlang", type=("build", "run"), when="@4.6.21:")
depends_on("r-tibble", type=("build", "run"))
+ depends_on("r-tidyr", type=("build", "run"), when="@4.6.21:")
+
+ depends_on("r-magrittr", type=("build", "run"), when="@:4.6.20")
+ depends_on("r-pbkrtest@0.4-8.1:", type=("build", "run"), when="@:4.6.21")
diff --git a/var/spack/repos/builtin/packages/r-dotcall64/package.py b/var/spack/repos/builtin/packages/r-dotcall64/package.py
index 5c78fcd835..7a7a3864f9 100644
--- a/var/spack/repos/builtin/packages/r-dotcall64/package.py
+++ b/var/spack/repos/builtin/packages/r-dotcall64/package.py
@@ -18,6 +18,7 @@ class RDotcall64(RPackage):
cran = "dotCall64"
+ version("1.1-1", sha256="21b8d7d747c07aaf8a82d61ec98fe0539afcaa5a565d9c2fc55be65b6af2c91b")
version("1.0-2", sha256="e0c7728aebbea5ebf06dfeefae4fc0a240e6dde7c2bf13f2ed041b91d337a4ac")
version("1.0-1", sha256="f10b28fcffb9453b1d8888a72c8fd2112038b5ac33e02a481492c7bd249aa5c6")
version("1.0-0", sha256="69318dc6b8aecc54d4f789c8105e672198363b395f1a764ebaeb54c0473d17ad")
diff --git a/var/spack/repos/builtin/packages/r-downlit/package.py b/var/spack/repos/builtin/packages/r-downlit/package.py
index 5a2e92028e..a6930c8861 100644
--- a/var/spack/repos/builtin/packages/r-downlit/package.py
+++ b/var/spack/repos/builtin/packages/r-downlit/package.py
@@ -18,9 +18,11 @@ class RDownlit(RPackage):
license("MIT")
+ version("0.4.4", sha256="55c377dcee4adc48c1060e14079f3d1832453d066a2cf070530caa210c48f828")
version("0.4.2", sha256="33dff66909104d1a5ba8e57b1288986e82b61fd5e91dce0cd358d53724b37e3c")
depends_on("r@3.4.0:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@0.4.4:")
depends_on("r-brio", type=("build", "run"))
depends_on("r-desc", type=("build", "run"))
depends_on("r-digest", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dplyr/package.py b/var/spack/repos/builtin/packages/r-dplyr/package.py
index edd2e01091..85d7aff1f7 100644
--- a/var/spack/repos/builtin/packages/r-dplyr/package.py
+++ b/var/spack/repos/builtin/packages/r-dplyr/package.py
@@ -16,6 +16,7 @@ class RDplyr(RPackage):
license("MIT")
+ version("1.1.4", sha256="cf730414d5d4ab387b4e9890a4b1df9d17a3903488e8da8df1cf2e11e44558cb")
version("1.1.2", sha256="c220c38a3a44977c43eeae3d9aef90e8bb297150cad0993ea8d3cc13150096e3")
version("1.0.10", sha256="3ab639f627b4e439052df18f193f0ccab223225a4ae2ff8c18aba4f9807e0f2b")
version("1.0.9", sha256="e2e1f7312618b4e32ada9a1da79cef32eaec12acd408c973a6b069c6be4fb46b")
@@ -63,6 +64,7 @@ class RDplyr(RPackage):
depends_on("r-vctrs@0.3.5:", type=("build", "run"), when="@1.0.3:")
depends_on("r-vctrs@0.4.1:", type=("build", "run"), when="@1.0.9:")
depends_on("r-vctrs@0.6.0:", type=("build", "run"), when="@1.1.2:")
+ depends_on("r-vctrs@0.6.4:", type=("build", "run"), when="@1.1.4:")
depends_on("r-pillar@1.5.1:", type=("build", "run"), when="@1.0.6:")
depends_on("r-pillar@1.9.0:", type=("build", "run"), when="@1.1.2:")
diff --git a/var/spack/repos/builtin/packages/r-dqrng/package.py b/var/spack/repos/builtin/packages/r-dqrng/package.py
index 51a7793a1b..f85215b4c7 100644
--- a/var/spack/repos/builtin/packages/r-dqrng/package.py
+++ b/var/spack/repos/builtin/packages/r-dqrng/package.py
@@ -26,10 +26,12 @@ class RDqrng(RPackage):
license("AGPL-3.0-only OR custom")
+ version("0.4.1", sha256="3d9df935020c3c2538bc712456079925c4b379d67407c83fbc008340e353288f")
version("0.3.0", sha256="4beeabfe245ce7196b07369f2a7d277cb08869ad8b45a22c6354c4cc70a39abb")
version("0.2.1", sha256="e149c105b1db31e7f46b1aebf31d911a109e380923f3696fc56a53197fc1e866")
depends_on("r@3.1.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@0.3.1:")
depends_on("r-rcpp@0.12.16:", type=("build", "run"))
depends_on("r-bh@1.64.0-1:", type=("build", "run"))
depends_on("r-sitmo@2.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dss/package.py b/var/spack/repos/builtin/packages/r-dss/package.py
index 188e324ae4..9fb917dece 100644
--- a/var/spack/repos/builtin/packages/r-dss/package.py
+++ b/var/spack/repos/builtin/packages/r-dss/package.py
@@ -27,6 +27,8 @@ class RDss(RPackage):
version("2.34.0", commit="f9819c7d7927c8e6d9963632cdeab36c8c22caa8")
version("2.32.0", commit="ffb502d20810a873c2376199d44adedf7c83912d")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@2.44.0:")
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dt/package.py b/var/spack/repos/builtin/packages/r-dt/package.py
index 3fd34dff09..db589f3433 100644
--- a/var/spack/repos/builtin/packages/r-dt/package.py
+++ b/var/spack/repos/builtin/packages/r-dt/package.py
@@ -18,6 +18,7 @@ class RDt(RPackage):
license("Apache-2.0")
+ version("0.33", sha256="e145dadb1ce3db7c837f4313a8b5615b5b8ae63063ec2df93e528529717b27b8")
version("0.27", sha256="e32fdccd2be430933cff88a9ce79045bfdbe3e08e0cd8d15037445808613289a")
version("0.26", sha256="c412932be126d44f415559258e1d65adc0e84c3dfb9a70ce3196a2f877f7030c")
version("0.25", sha256="0dfc8713062e1fe4e0428936367f35a0a41616c27b6d9b002bdfda58091c442b")
@@ -35,6 +36,7 @@ class RDt(RPackage):
depends_on("r-htmltools@0.3.6:", type=("build", "run"))
depends_on("r-htmlwidgets@1.3:", type=("build", "run"))
+ depends_on("r-httpuv", type=("build", "run"), when="@0.29:")
depends_on("r-jsonlite@0.9.16:", type=("build", "run"), when="@0.8:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-crosstalk", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-dtw/package.py b/var/spack/repos/builtin/packages/r-dtw/package.py
index ba2f720d91..518ea8392b 100644
--- a/var/spack/repos/builtin/packages/r-dtw/package.py
+++ b/var/spack/repos/builtin/packages/r-dtw/package.py
@@ -30,5 +30,7 @@ class RDtw(RPackage):
version("1.15", sha256="28ba2110d4c305f332fad93337cdae24b9de4163b8ddf33d476f9dddc63160f1")
version("1.14-3", sha256="6989358d8d97428418c2b34ae38647efcee2e0ce095800a657d5d83d7083c9e3")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-proxy", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-e1071/package.py b/var/spack/repos/builtin/packages/r-e1071/package.py
index b2e66ec2ae..dfeed53f3b 100644
--- a/var/spack/repos/builtin/packages/r-e1071/package.py
+++ b/var/spack/repos/builtin/packages/r-e1071/package.py
@@ -18,6 +18,7 @@ class RE1071(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.7-14", sha256="754d97ab073acc07b909a190f87f021e31e07269c8632c53166a6c2843e65195")
version("1.7-13", sha256="da94e191af6e69aa0f9e3250d4b823674cc869339d914f761ebf2824177b6b2f")
version("1.7-12", sha256="91e052d0a521db74a66df90adb28db601f2a2cca38b03dcad030ac2fdc5c5dcf")
version("1.7-11", sha256="48c18e10e7cabc742d37b563672e2eddb6061f2378b69e5563be79ab9948d92f")
diff --git a/var/spack/repos/builtin/packages/r-earth/package.py b/var/spack/repos/builtin/packages/r-earth/package.py
index 92e3c072bb..3fae5b8896 100644
--- a/var/spack/repos/builtin/packages/r-earth/package.py
+++ b/var/spack/repos/builtin/packages/r-earth/package.py
@@ -17,6 +17,7 @@ class REarth(RPackage):
license("GPL-3.0-only")
+ version("5.3.3", sha256="786a0fcabb3db13e0e0a4ba61ecccb7e171030b39bc97926f8e7159485d2f572")
version("5.3.2", sha256="c844d75edf9a2706a911bb05ed4287aad9acf6f3fed357e037763a300eac0bea")
version("5.3.1", sha256="0bbe06ba974ceb8ec5de1d59cb53f9487d1828d7130fe2503c48b6cb449c4b03")
version("5.3.0", sha256="05ace806271a74b3ddf8718a93237fe2a8550a8659ebd87f8079c0bda5e02437")
@@ -26,4 +27,6 @@ class REarth(RPackage):
depends_on("r-formula@1.2-3:", type=("build", "run"))
depends_on("r-plotmo@3.5.4:", type=("build", "run"))
depends_on("r-plotmo@3.6.0:", type=("build", "run"), when="@5.3.0")
- depends_on("r-teachingdemos@2.10:", type=("build", "run"))
+ depends_on("r-plotmo@3.6.0:", type=("build", "run"), when="@5.3.3:")
+
+ depends_on("r-teachingdemos@2.10:", type=("build", "run"), when="@:5.3.2")
diff --git a/var/spack/repos/builtin/packages/r-ebseq/package.py b/var/spack/repos/builtin/packages/r-ebseq/package.py
index 4be0874887..99c2366a03 100644
--- a/var/spack/repos/builtin/packages/r-ebseq/package.py
+++ b/var/spack/repos/builtin/packages/r-ebseq/package.py
@@ -24,6 +24,8 @@ class REbseq(RPackage):
version("2.0.0", commit="f1d4e4419988ab98540739c9349559fd437cb59f")
version("1.40.0", commit="7d1d2a2b4ea0df8cddfb5e57d6431f3948c5c4ca")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0:", type=("build", "run"))
depends_on("r-bh", type=("build", "run"))
depends_on("r-blockmodeling", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ecosolver/package.py b/var/spack/repos/builtin/packages/r-ecosolver/package.py
index d61d3979d1..bb57f5be6a 100644
--- a/var/spack/repos/builtin/packages/r-ecosolver/package.py
+++ b/var/spack/repos/builtin/packages/r-ecosolver/package.py
@@ -17,6 +17,7 @@ class REcosolver(RPackage):
cran = "ECOSolveR"
+ version("0.5.5", sha256="2594ed1602b2fe159cc9aff3475e9cba7c1927b496c3daeabc1c0d227943ecc7")
version("0.5.4", sha256="5d7489e8176c1df3f3f1290732243429280efca4f837916e6b6faa6dc8a8e324")
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/r-ecp/package.py b/var/spack/repos/builtin/packages/r-ecp/package.py
index ed1b534181..7aec827a94 100644
--- a/var/spack/repos/builtin/packages/r-ecp/package.py
+++ b/var/spack/repos/builtin/packages/r-ecp/package.py
@@ -21,6 +21,7 @@ class REcp(RPackage):
license("GPL-2.0-or-later")
+ version("3.1.5", sha256="9e2389632447a80a5e9937f15a98c092c33f5460e6ceb904971fcff3eda8a29e")
version("3.1.4", sha256="1b98bf25a7659517dc98d1b950fe2a5fed9ef8f750893b3a9e06e9c6d59cc04d")
version("3.1.3", sha256="a80ab10bafe30cc96287b9220e44c4b4eda40f5dd0546e4d2a2e1baab514c058")
version("3.1.1", sha256="d2ab194e22e6ab0168222fbccfcf2e25c6cd51a73edc959086b0c6e0a7410268")
diff --git a/var/spack/repos/builtin/packages/r-edger/package.py b/var/spack/repos/builtin/packages/r-edger/package.py
index 2e0345e489..074ac32b4a 100644
--- a/var/spack/repos/builtin/packages/r-edger/package.py
+++ b/var/spack/repos/builtin/packages/r-edger/package.py
@@ -31,6 +31,9 @@ class REdger(RPackage):
version("3.20.9", commit="acbcbbee939f399673678653678cd9cb4917c4dc")
version("3.18.1", commit="101106f3fdd9e2c45d4a670c88f64c12e97a0495")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.15.0:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@3.26.8:")
depends_on("r-limma", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ellipse/package.py b/var/spack/repos/builtin/packages/r-ellipse/package.py
index 7c791bf1b5..e798ce3b2b 100644
--- a/var/spack/repos/builtin/packages/r-ellipse/package.py
+++ b/var/spack/repos/builtin/packages/r-ellipse/package.py
@@ -20,6 +20,7 @@ class REllipse(RPackage):
license("GPL-2.0-or-later")
+ version("0.5.0", sha256="cde8553973ce2cc04324318b3df13890d585987171fedfe2efbf1430f82cc2f3")
version("0.4.5", sha256="39c475851380deeb9361464f8f32fa2ee250f24604791c00680a54aaaaba8936")
version("0.4.3", sha256="02ef2b11c3462a8b800332e522183f4c7c40c7d2d66c5174d5f3f6d8cc68a946")
version("0.4.2", sha256="1719ce9a00b9ac4d56dbf961803085b892d3359726fda3567bb989ddfed9a5f2")
diff --git a/var/spack/repos/builtin/packages/r-ellipsis/package.py b/var/spack/repos/builtin/packages/r-ellipsis/package.py
index f0b9ea8882..8ad707ebe3 100644
--- a/var/spack/repos/builtin/packages/r-ellipsis/package.py
+++ b/var/spack/repos/builtin/packages/r-ellipsis/package.py
@@ -23,6 +23,8 @@ class REllipsis(RPackage):
version("0.3.0", sha256="0bf814cb7a1f0ee1f2949bdc98752a0d535f2a9489280dd4d8fcdb10067ee907")
version("0.2.0.1", sha256="0e6528c5e8016c3617cc1cfcdb5a4bfeb073e0bd5ea76b43e56b0c3208a0a943")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@0.3:")
depends_on("r-rlang@0.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-emmeans/package.py b/var/spack/repos/builtin/packages/r-emmeans/package.py
index bf2a67120a..150e26a649 100644
--- a/var/spack/repos/builtin/packages/r-emmeans/package.py
+++ b/var/spack/repos/builtin/packages/r-emmeans/package.py
@@ -21,6 +21,7 @@ class REmmeans(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.10.4", sha256="66653623c5984f99ba481a8611d6cf3b829e577f07bbe4043f279a3f8fbadcc3")
version("1.8.5", sha256="5c88b415b5a42d8c1aa63af090c4987326530ea6d0e60bab9b5fb7e99a982415")
version("1.8.2", sha256="785973457d8a6547df489f87b62987d44a68c4b9018661d38ca11ee34e49d209")
version("1.8.1-1", sha256="79fc5e44255427b038d0dbe2c9887d84984baacb11bb9a9078cd8d0dca2e6577")
diff --git a/var/spack/repos/builtin/packages/r-energy/package.py b/var/spack/repos/builtin/packages/r-energy/package.py
index 2948c5e1f2..a3ce0ada52 100644
--- a/var/spack/repos/builtin/packages/r-energy/package.py
+++ b/var/spack/repos/builtin/packages/r-energy/package.py
@@ -31,6 +31,9 @@ class REnergy(RPackage):
version("1.7-6", sha256="900edbb28e1f1bccd78580828470628cf75eb6333b63e1a58e4da7fc5c5fa89a")
version("1.7-5", sha256="24c2cf080939f8f56cd9cda06d2dfc30d0389cd3ec7250af4f9a09a4c06b6996")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@3.1:", type=("build", "run"), when="@1.7-11:")
depends_on("r-rcpp@0.12.6:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-envstats/package.py b/var/spack/repos/builtin/packages/r-envstats/package.py
index 6a03accb0d..58fae609b7 100644
--- a/var/spack/repos/builtin/packages/r-envstats/package.py
+++ b/var/spack/repos/builtin/packages/r-envstats/package.py
@@ -23,6 +23,7 @@ class REnvstats(RPackage):
cran = "EnvStats"
+ version("2.8.1", sha256="12952b9eaa64b7bdbaaa5c6b7acb3aa1028ddfa4e5de7ddfea54f900c452d6a6")
version("2.7.0", sha256="09a6f0d5b60856c7298371e4a8a085a1db7abf0e71ccb9a2dc9ca24248fb5d81")
version("2.5.0", sha256="4f77aa66c9dbbe411370a6dd5b9e514823d5506bbcdad9dc09a9e4268d65a7f7")
version("2.4.0", sha256="49459e76412037b3d8021bd83ee93d140bc3e715a2a2282a347ef60061900514")
diff --git a/var/spack/repos/builtin/packages/r-ergm/package.py b/var/spack/repos/builtin/packages/r-ergm/package.py
index b5434cfa37..f30fe86777 100644
--- a/var/spack/repos/builtin/packages/r-ergm/package.py
+++ b/var/spack/repos/builtin/packages/r-ergm/package.py
@@ -19,6 +19,7 @@ class RErgm(RPackage):
license("GPL-3.0-only")
+ version("4.6.0", sha256="b471a60c39eb5b478e06dd0caf1d085f4b0927f1c260de699f1c8d4fe831a7f7")
version("4.4.0", sha256="2db152cc7fdd71d6f0065603405f30bf5e206591da39b8f542178ec6d6126173")
version("4.3.1", sha256="3ff63c81ea4061ac0c79247fcd2e614494624f7f1df57a4634927e7e90800ed3")
version("4.2.3", sha256="35d15373d4a8445872eb3713c81c6c6ac34b72096e0cdb04292a468e65ae9288")
@@ -44,7 +45,7 @@ class RErgm(RPackage):
depends_on("r-trust@0.1.7:", type=("build", "run"))
depends_on("r-trust@0.1.8:", type=("build", "run"), when="@4.1.2:")
depends_on("r-matrix@1.2-17:", type=("build", "run"))
- depends_on("r-matrix@1.3.2:", type=("build", "run"), when="@4.1.2:")
+ depends_on("r-matrix@1.3-2:", type=("build", "run"), when="@4.1.2:")
depends_on("r-lpsolveapi@5.5.2.0.17.7:", type=("build", "run"), when="@4.1.2:")
depends_on("r-mass@7.3-51.4:", type=("build", "run"))
depends_on("r-mass@7.3.53.1:", type=("build", "run"), when="@4.1.2:")
@@ -54,6 +55,7 @@ class RErgm(RPackage):
depends_on("r-statnet-common@4.6.0:", type=("build", "run"), when="@4.2.1:")
depends_on("r-statnet-common@4.7.0:", type=("build", "run"), when="@4.3.1:")
depends_on("r-statnet-common@4.8.0:", type=("build", "run"), when="@4.4.0:")
+ depends_on("r-statnet-common@4.9.0:", type=("build", "run"), when="@4.5.0:")
depends_on("r-rle", type=("build", "run"), when="@3.11.0:")
depends_on("r-rle@0.9.2:", type=("build", "run"), when="@4.1.2:")
depends_on("r-purrr@0.3.2:", type=("build", "run"), when="@3.10.0:")
diff --git a/var/spack/repos/builtin/packages/r-estimability/package.py b/var/spack/repos/builtin/packages/r-estimability/package.py
index 545001ea96..9a246b6ec6 100644
--- a/var/spack/repos/builtin/packages/r-estimability/package.py
+++ b/var/spack/repos/builtin/packages/r-estimability/package.py
@@ -19,5 +19,9 @@ class REstimability(RPackage):
license("GPL-3.0-or-later")
+ version("1.5.1", sha256="3ca6b96a39fd8877e8636f94d20f34308b7296c1376c646703d27df8591644e9")
version("1.4.1", sha256="c65aaf1e452f3947013d3ce05ae674d48492081f615a942592dc91db780f1124")
version("1.3", sha256="a33179c5fbd6a1a623d90cb6f1743148f92c09429fac466867f3ea70946a2e32")
+
+ depends_on("r@4.1.0:", when="@1.5.1:", type=("build", "run"))
+ depends_on("r@4.3.0:", when="@1.5:1.5.0", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-europepmc/package.py b/var/spack/repos/builtin/packages/r-europepmc/package.py
index 64a9c09462..082450f3c9 100644
--- a/var/spack/repos/builtin/packages/r-europepmc/package.py
+++ b/var/spack/repos/builtin/packages/r-europepmc/package.py
@@ -25,6 +25,7 @@ class REuropepmc(RPackage):
license("GPL-3.0-only")
+ version("0.4.3", sha256="25945534527bd89a6dcd9e371e3c2a68f3fe2046587daf1563be16eac9dd1998")
version("0.4.1", sha256="c1ba91a2a99432cabe18e86fea33ac9d20dbb3ac0b58f430d464b4d8ecba4a9a")
version("0.4", sha256="d55f62963d0ee84830654bbc78f4ad8285e376b04be137cbeaf8ad2a98b7969c")
version("0.3", sha256="5044a253d223e2bb8502063cd03c0fe4db856467e497d650da7ccd8f75d0f8d9")
diff --git a/var/spack/repos/builtin/packages/r-evaluate/package.py b/var/spack/repos/builtin/packages/r-evaluate/package.py
index 86aeb872a9..bb16d16b85 100644
--- a/var/spack/repos/builtin/packages/r-evaluate/package.py
+++ b/var/spack/repos/builtin/packages/r-evaluate/package.py
@@ -16,6 +16,7 @@ class REvaluate(RPackage):
license("MIT")
+ version("0.24.0", sha256="e23d764a58e7525257d57da4ccfee9d6f63b5b3c18bf01c76818ec8c9c587fd6")
version("0.20", sha256="35f5d9e85603600b58960923d591c5ca1115153febba7c612867d8b5598afff0")
version("0.18", sha256="7f4eecdc97ac286d5c7a39c454fe6798da38ef634bf9305c595faa8facb2bf36")
version("0.17", sha256="49c743c94cb967911af0e5555861a3762cd840b98578882671b583cff86ba963")
@@ -26,5 +27,6 @@ class REvaluate(RPackage):
version("0.9", sha256="e8118c9d6ec479c0e712913848404431b6b6c0282f3c131acaf9a677ab5fc6ae")
depends_on("r@3.0.2:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@0.24.0:")
depends_on("r-stringr@0.6.2:", type=("build", "run"), when="@:0.11")
diff --git a/var/spack/repos/builtin/packages/r-evd/package.py b/var/spack/repos/builtin/packages/r-evd/package.py
index 09a3a10356..5737dac4e0 100644
--- a/var/spack/repos/builtin/packages/r-evd/package.py
+++ b/var/spack/repos/builtin/packages/r-evd/package.py
@@ -19,6 +19,7 @@ class REvd(RPackage):
license("GPL-3.0-only")
+ version("2.3-7", sha256="4a899df15d39be4a8d544de4f5e4690b4673790a46da6a6c9c2a70fef3b55648")
version("2.3-6.1", sha256="662c592d3f5c5693dbf1c673d1137c4a60a347e330b71be1f3933f201d2c8971")
version("2.3-6", sha256="8edb8bc4f06d246c4343fd923bb5d5df99724d6db8821bfd996220343a834cb6")
version("2.3-3", sha256="2fc5ef2e0c3a2a9392425ddd45914445497433d90fb80b8c363877baee4559b4")
diff --git a/var/spack/repos/builtin/packages/r-exactextractr/package.py b/var/spack/repos/builtin/packages/r-exactextractr/package.py
index 28eb6fe05f..a9a6e5b058 100644
--- a/var/spack/repos/builtin/packages/r-exactextractr/package.py
+++ b/var/spack/repos/builtin/packages/r-exactextractr/package.py
@@ -16,6 +16,7 @@ class RExactextractr(RPackage):
license("Apache-2.0")
+ version("0.10.0", sha256="9b7fc3c6f0e9e89596a1992240ecbb8e2893f4addffaecbd852403c10a0943de")
version("0.9.1", sha256="f0cf367c25a45b09eda1d435c8c818590ff4de86162f675e3172821d1853f4a1")
version("0.9.0", sha256="705a355534f427dc832af2a294aaf928c10c72d6335d38aed86da64d814eb18d")
version("0.8.2", sha256="cc32ab3af8d881a7e7836c296ea42f3fdabf3373ec1de0b154dbfe9870ee8a74")
diff --git a/var/spack/repos/builtin/packages/r-exomecopy/package.py b/var/spack/repos/builtin/packages/r-exomecopy/package.py
index 893d6c28b2..3138155652 100644
--- a/var/spack/repos/builtin/packages/r-exomecopy/package.py
+++ b/var/spack/repos/builtin/packages/r-exomecopy/package.py
@@ -24,6 +24,8 @@ class RExomecopy(RPackage):
version("1.36.0", commit="cbe3134acbbc9b7d5426ae2f142dc64cadb3fc26")
version("1.32.0", commit="c9a884427d91b6d62ddc16a939bd808e389d3ea6")
+ depends_on("c", type="build") # generated
+
depends_on("r-iranges@2.5.27:", type=("build", "run"))
depends_on("r-genomicranges@1.23.16:", type=("build", "run"))
depends_on("r-rsamtools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-expint/package.py b/var/spack/repos/builtin/packages/r-expint/package.py
index b16b9089be..1fec40d8ab 100644
--- a/var/spack/repos/builtin/packages/r-expint/package.py
+++ b/var/spack/repos/builtin/packages/r-expint/package.py
@@ -27,4 +27,6 @@ class RExpint(RPackage):
version("0.1-6", sha256="c7d13a8e299a91e94622047fe22b0006137e7bf82e34d10871b631fa58115145")
version("0.1-5", sha256="b03d60938cd6cf615aa3a02b1bf73436785eca89eaff56059ee0807b8244718a")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-expm/package.py b/var/spack/repos/builtin/packages/r-expm/package.py
index 944d12211f..c1ece1ae78 100644
--- a/var/spack/repos/builtin/packages/r-expm/package.py
+++ b/var/spack/repos/builtin/packages/r-expm/package.py
@@ -16,6 +16,7 @@ class RExpm(RPackage):
license("GPL-2.0-or-later")
+ version("1.0-0", sha256="02c536f8f6af55b132210a50b1e9694a3549806bf97c49e0fe03595945aab254")
version("0.999-7", sha256="28f249b914b8dd33eee16663fc793e57afd0e301e16067bf9f27fa8e591ba0f1")
version("0.999-6", sha256="2c79912fd2e03fcf89c29f09555880934402fcb2359af8b4579d79b4f955addc")
version("0.999-4", sha256="58d06427a08c9442462b00a5531e2575800be13ed450c5a1546261251e536096")
diff --git a/var/spack/repos/builtin/packages/r-factominer/package.py b/var/spack/repos/builtin/packages/r-factominer/package.py
index 39b8379a45..d1dab128f0 100644
--- a/var/spack/repos/builtin/packages/r-factominer/package.py
+++ b/var/spack/repos/builtin/packages/r-factominer/package.py
@@ -20,6 +20,7 @@ class RFactominer(RPackage):
cran = "FactoMineR"
+ version("2.11", sha256="32c26b42cb4dd8d7a8c845f1e8562fa0e3ebded19d3c1284c3504df09974f063")
version("2.8", sha256="c09086f7ae4c4855ed6f1e8303b497e250ab6cf101feb3db6c8a93510e5ff851")
version("2.6", sha256="81261608c097b863e004a0c6cdc4bdfd6e7bf49c6ec20e211233eda2e5268f75")
version("2.4", sha256="b9e3adce9a66b4daccc85fa67cb0769d6be230beeb126921b386ccde5db2e851")
diff --git a/var/spack/repos/builtin/packages/r-fansi/package.py b/var/spack/repos/builtin/packages/r-fansi/package.py
index 11d4708e17..74f31d835c 100644
--- a/var/spack/repos/builtin/packages/r-fansi/package.py
+++ b/var/spack/repos/builtin/packages/r-fansi/package.py
@@ -16,6 +16,7 @@ class RFansi(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.0.6", sha256="ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863")
version("1.0.4", sha256="3163214e6c40922bbb495229259ed8ce1bebd98b77098a6936d234e43da9c49f")
version("1.0.3", sha256="86a7b83d8c9d28baebbde310cd0b459d0950a9c7ff1a6276ce5858f6a89bc06a")
version("1.0.2", sha256="d1e2cf2e10613abe19071e3dab7c564ebcf85ad13cbee25fa1999267af01b557")
diff --git a/var/spack/repos/builtin/packages/r-farver/package.py b/var/spack/repos/builtin/packages/r-farver/package.py
index e7d36ca104..980cb7118e 100644
--- a/var/spack/repos/builtin/packages/r-farver/package.py
+++ b/var/spack/repos/builtin/packages/r-farver/package.py
@@ -21,6 +21,7 @@ class RFarver(RPackage):
license("MIT")
+ version("2.1.2", sha256="528823b95daab4566137711f1c842027a952bea1b2ae6ff098e2ca512b17fe25")
version("2.1.1", sha256="0dcfda6ca743f465372790bcff1bcbc6a7145fdac1c682b021f654e8c6c996ce")
version("2.1.0", sha256="e5c8630607049f682fb3002b99ca4f5e7c6b94f8b2a4342df594e7853b77cef4")
version("2.0.3", sha256="0e1590df79ec6078f10426411b96216b70568a4eaf3ffd84ca723add0ed8e5cc")
diff --git a/var/spack/repos/builtin/packages/r-fastcluster/package.py b/var/spack/repos/builtin/packages/r-fastcluster/package.py
index bdc1f96110..685ab3f399 100644
--- a/var/spack/repos/builtin/packages/r-fastcluster/package.py
+++ b/var/spack/repos/builtin/packages/r-fastcluster/package.py
@@ -24,6 +24,7 @@ class RFastcluster(RPackage):
license("BSD-2-Clause OR GPL-2.0-only OR custom")
+ version("1.2.6", sha256="852a05458fb0b64497e9cf8f0182b599d1c2b1e9af03ec45f7c0c9280c1f8d19")
version("1.2.3", sha256="1f229129e1cddc78c7bb5ecc90c4d28ed810ee68cf210004c7cdfa12cfaf2a01")
version("1.1.25", sha256="f3661def975802f3dd3cec5b2a1379f3707eacff945cf448e33aec0da1ed4205")
diff --git a/var/spack/repos/builtin/packages/r-fastdigest/package.py b/var/spack/repos/builtin/packages/r-fastdigest/package.py
index aa1aea7988..b6fe0390d7 100644
--- a/var/spack/repos/builtin/packages/r-fastdigest/package.py
+++ b/var/spack/repos/builtin/packages/r-fastdigest/package.py
@@ -23,4 +23,5 @@ class RFastdigest(RPackage):
license("Artistic-2.0")
+ version("0.6-4", sha256="b2b6a550d90446bed911c9ad7642efd2a869257ecc5b9eb57e66b2cd4ef109a0")
version("0.6-3", sha256="62a04aa39f751cf9bb7ff43cadb3c1a8d2270d7f3e8550a2d6ca9e1d8ca09a09")
diff --git a/var/spack/repos/builtin/packages/r-fastdummies/package.py b/var/spack/repos/builtin/packages/r-fastdummies/package.py
new file mode 100644
index 0000000000..44ff1bb998
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-fastdummies/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RFastdummies(RPackage):
+ """Fast Creation of Dummy (Binary) Columns and Rows from Categorical
+ Variables."""
+
+ homepage = "https://jacobkap.github.io/fastDummies/"
+ cran = "fastDummies"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("1.7.4", sha256="95904d4b67efc3faafa47cae9473c9d75653bc3fb6ad0083869ebf9f7960dd08")
+
+ depends_on("r@2.1:", type=("build", "run"))
+ depends_on("r@2.10:", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-data-table", type=("build", "run"))
+ depends_on("r-tibble", type=("build", "run"))
+ depends_on("r-stringr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-fastica/package.py b/var/spack/repos/builtin/packages/r-fastica/package.py
index 9c64c3130c..a22516c3b1 100644
--- a/var/spack/repos/builtin/packages/r-fastica/package.py
+++ b/var/spack/repos/builtin/packages/r-fastica/package.py
@@ -14,6 +14,7 @@ class RFastica(RPackage):
cran = "fastICA"
+ version("1.2-5.1", sha256="65916ee9a44598a5d50c43d96de5fb11730e0a5a5938e5859f1a928d31f3d985")
version("1.2-3", sha256="e9ef82644cb64bb49ae3b7b6e0885f4fb2dc08ae030f8c76fe8dd8507b658950")
version("1.2-2", sha256="32223593374102bf54c8fdca7b57231e4f4d0dd0be02d9f3500ad41b1996f1fe")
diff --git a/var/spack/repos/builtin/packages/r-fastmap/package.py b/var/spack/repos/builtin/packages/r-fastmap/package.py
index a97657a321..3d50ab69ba 100644
--- a/var/spack/repos/builtin/packages/r-fastmap/package.py
+++ b/var/spack/repos/builtin/packages/r-fastmap/package.py
@@ -20,6 +20,7 @@ class RFastmap(RPackage):
license("MIT")
+ version("1.2.0", sha256="b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246")
version("1.1.1", sha256="3623809dd016ae8abd235200ba7834effc4b916915a059deb76044137c5c7173")
version("1.1.0", sha256="9113e526b4c096302cfeae660a06de2c4c82ae4e2d3d6ef53af6de812d4c822b")
version("1.0.1", sha256="4778b05dfebd356f8df980dfeff3b973a72bca14898f870e5c40c1d84db9faec")
diff --git a/var/spack/repos/builtin/packages/r-fastmatch/package.py b/var/spack/repos/builtin/packages/r-fastmatch/package.py
index e95677e309..3d5773182b 100644
--- a/var/spack/repos/builtin/packages/r-fastmatch/package.py
+++ b/var/spack/repos/builtin/packages/r-fastmatch/package.py
@@ -18,6 +18,7 @@ class RFastmatch(RPackage):
license("GPL-2.0-only")
+ version("1.1-4", sha256="9a914cac9c1ea2984bd44eebe421e1636504907a8064ae26347fe3ec2b9bd56b")
version("1.1-3", sha256="1defa0b08bc3f48e4c3e4ba8df4f1b9e8299932fd8c747c67d32de44f90b9861")
version("1.1-0", sha256="20b51aa4838dbe829e11e951444a9c77257dcaf85130807508f6d7e76797007d")
diff --git a/var/spack/repos/builtin/packages/r-fastmatrix/package.py b/var/spack/repos/builtin/packages/r-fastmatrix/package.py
index c086bcc21e..27102cdc09 100644
--- a/var/spack/repos/builtin/packages/r-fastmatrix/package.py
+++ b/var/spack/repos/builtin/packages/r-fastmatrix/package.py
@@ -30,6 +30,7 @@ class RFastmatrix(RPackage):
license("GPL-3.0-only")
+ version("0.5-772", sha256="72601bae9a59f467c5da9ccf08788f0233cdbb2420b6b2aa43a42a2632ff9c55")
version("0.5", sha256="fb5f251a98425161e9dbbbb7edf95226725255b1474aad03ab046c7c6c6c3f12")
version("0.4-1245", sha256="ee2e12b5dcda4585cca21f2c0ac144706f6fd26024586e91d622c6cd66d1d873")
version("0.4-1", sha256="494a1aad38dcec28956eba8d095c964b20c5388dfb6dc2a23848ae37ea61cde5")
diff --git a/var/spack/repos/builtin/packages/r-fda/package.py b/var/spack/repos/builtin/packages/r-fda/package.py
index 0f5aa30a7f..93a4d3a3d0 100644
--- a/var/spack/repos/builtin/packages/r-fda/package.py
+++ b/var/spack/repos/builtin/packages/r-fda/package.py
@@ -19,6 +19,7 @@ class RFda(RPackage):
license("GPL-2.0-or-later")
+ version("6.1.8", sha256="ef8d858a2879491aa2c441d171ba14462bf27852d16e8420fa49aab83f42c407")
version("6.0.5", sha256="14445776fc65284cd6cae98e5b4dd14c2626d96db5f78c0fcc6aabce5419b8f1")
version("6.0.3", sha256="205814b9812664e8201221f99e0e8391aa49dba2ae287dc404c57c0c492477d3")
version("5.5.1", sha256="dcaa2f6ae226d35855bc79c6967f60d45404b984c0afaec215b139c4b8dea23a")
diff --git a/var/spack/repos/builtin/packages/r-ff/package.py b/var/spack/repos/builtin/packages/r-ff/package.py
index 04017a2835..ad2bec4723 100644
--- a/var/spack/repos/builtin/packages/r-ff/package.py
+++ b/var/spack/repos/builtin/packages/r-ff/package.py
@@ -56,6 +56,7 @@ class RFf(RPackage):
license("GPL-2.0-only OR GPL-3.0-only OR custom")
+ version("4.0.12", sha256="08af355a9a10fe29d48d085abc7cf1f975e1a4a670668a4f8d9632d087fb41bf")
version("4.0.9", sha256="722053271987a0c9673c3ff9e7968bbab47979d529a2fe6bb1a3179408ee3c4f")
version("4.0.7", sha256="0a47333d31c7afc3f95387166e21a3e4c763cbef47d9b5927753aef4ff8d83fa")
version("4.0.5", sha256="9aba9e271144ec224063ddba0d791e2fcdb9c912d48fdc49e204fce628355037")
diff --git a/var/spack/repos/builtin/packages/r-fftwtools/package.py b/var/spack/repos/builtin/packages/r-fftwtools/package.py
index 3072b692e5..f6655e079e 100644
--- a/var/spack/repos/builtin/packages/r-fftwtools/package.py
+++ b/var/spack/repos/builtin/packages/r-fftwtools/package.py
@@ -26,6 +26,8 @@ class RFftwtools(RPackage):
version("0.9-9", sha256="a9273b7e495d228d740ab4525467e4bbefe8614bd2d97e7234017f1305f51441")
version("0.9-8", sha256="4641c8cd70938c2a8bde0b6da6cf7f83e96175ef52f1ca42ec3920a1dabf1bdb")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.15.2:", type=("build", "run"))
depends_on("r@3.0:", type=("build", "run"), when="@0.9-11:")
depends_on("fftw@3.1.2:")
diff --git a/var/spack/repos/builtin/packages/r-fgsea/package.py b/var/spack/repos/builtin/packages/r-fgsea/package.py
index a4b092cdf9..9efe984cfb 100644
--- a/var/spack/repos/builtin/packages/r-fgsea/package.py
+++ b/var/spack/repos/builtin/packages/r-fgsea/package.py
@@ -29,6 +29,8 @@ class RFgsea(RPackage):
version("1.4.1", commit="73de5ff364e520ac99507a9ee5a61a0d23d3c44e")
version("1.2.1", commit="99b04eef664204d0dca4b9f8027cd7eefb006b72")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-data-table", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-fields/package.py b/var/spack/repos/builtin/packages/r-fields/package.py
index 27cb884cc0..9cb19fc614 100644
--- a/var/spack/repos/builtin/packages/r-fields/package.py
+++ b/var/spack/repos/builtin/packages/r-fields/package.py
@@ -38,6 +38,7 @@ class RFields(RPackage):
license("GPL-2.0-or-later")
+ version("16.2", sha256="3910950cd5476e7e3d17d00dabfa37a6491019426c74b6955a2fbe5648a3b3e4")
version("14.1", sha256="57c4c5592443d2ee869014b3199989b5edd1aff52e24f1cd313b8f9b34a95434")
version("13.3", sha256="c652838b1ae7eb368831522824bfbc1d1db7b9d1db5e9bb52b194098549944c3")
version("11.6", sha256="8600d1d992c40668cc2ab01b3c17d0e1bd44a001ec7ba9f468bc0e9ef87c59db")
@@ -46,5 +47,6 @@ class RFields(RPackage):
depends_on("r@3.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@14.1:")
depends_on("r-spam", type=("build", "run"))
- depends_on("r-viridis", type=("build", "run"), when="@13.3:")
+ depends_on("r-viridis", type=("build", "run"), when="@13.3:14.2")
+ depends_on("r-viridislite", type=("build", "run"), when="@14.3:")
depends_on("r-maps", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py
index 3c931a8239..a4cc9c8297 100644
--- a/var/spack/repos/builtin/packages/r-filehash/package.py
+++ b/var/spack/repos/builtin/packages/r-filehash/package.py
@@ -23,6 +23,7 @@ class RFilehash(RPackage):
license("GPL-2.0-or-later")
+ version("2.4-6", sha256="558b446ba354c6fa88f694e8d6d068f999d1e7b626164eb2aeacccbb0dee81b1")
version("2.4-5", sha256="3b1ee2794dd61e525ee44db16611c65957691d77bb26ae481eba988bb55da22c")
version("2.4-3", sha256="f394e2c93233e8ad1c104562ea9349855dc8e303131f559cd59834f9aa3e41bd")
version("2.4-2", sha256="b6d056f75d45e315943a4618f5f62802612cd8931ba3f9f474b595140a3cfb93")
diff --git a/var/spack/repos/builtin/packages/r-filelock/package.py b/var/spack/repos/builtin/packages/r-filelock/package.py
index 3aba76da08..18bd42a6d4 100644
--- a/var/spack/repos/builtin/packages/r-filelock/package.py
+++ b/var/spack/repos/builtin/packages/r-filelock/package.py
@@ -16,8 +16,7 @@ class RFilelock(RPackage):
license("MIT")
+ version("1.0.3", sha256="2dcd0ec453f5ec4d96f69b0c472569d57d3c5f9956a82a48492ee02f12071137")
version("1.0.2", sha256="ac2915950789b16c43a625a2b8dab6ba423588db4a7d0daa75b74518b82b1403")
- depends_on("r-callr@2.0.0:", type=("build", "run"))
- depends_on("r-covr", type=("build", "run"))
- depends_on("r-testthat", type=("build", "run"))
+ depends_on("r@3.4:", type=("build", "run"), when="@1.0.3:")
diff --git a/var/spack/repos/builtin/packages/r-fitdistrplus/package.py b/var/spack/repos/builtin/packages/r-fitdistrplus/package.py
index 5602ed82aa..9dcf4e3b4c 100644
--- a/var/spack/repos/builtin/packages/r-fitdistrplus/package.py
+++ b/var/spack/repos/builtin/packages/r-fitdistrplus/package.py
@@ -24,6 +24,7 @@ class RFitdistrplus(RPackage):
license("GPL-2.0-or-later")
+ version("1.2-1", sha256="68b4215a9dfff65880a3ba6f7febe4929b197611344932b79af05d91dc584558")
version("1.1-11", sha256="26274f2b710b2417a8bca314d400abf320d4ccf0387ad082743056699501b53d")
version("1.1-8", sha256="f3c72310f40773b3839a9506c3cb781d044e09b94f2f38d332bb24e5f9960f5a")
version("1.1-6", sha256="17c2990041a3bb7479f3c3a6d13d96c989db8eaddab17eff7e1fbe172a5b96be")
@@ -34,5 +35,6 @@ class RFitdistrplus(RPackage):
depends_on("r@3.5.0:", type=("build", "run"), when="@1.1-6:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-survival", type=("build", "run"))
+ depends_on("r-rlang", type=("build", "run"), when="@1.2-1:")
depends_on("r-npsurv", type=("build", "run"), when="@:1.0-14")
diff --git a/var/spack/repos/builtin/packages/r-flashclust/package.py b/var/spack/repos/builtin/packages/r-flashclust/package.py
index 0bd9a53583..24845b619a 100644
--- a/var/spack/repos/builtin/packages/r-flashclust/package.py
+++ b/var/spack/repos/builtin/packages/r-flashclust/package.py
@@ -13,4 +13,6 @@ class RFlashclust(RPackage):
version("1.01-2", sha256="48a7849bb86530465ff3fbfac1c273f0df4b846e67d5eee87187d250c8bf9450")
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-flexclust/package.py b/var/spack/repos/builtin/packages/r-flexclust/package.py
index bbc9fff700..5566dbaf22 100644
--- a/var/spack/repos/builtin/packages/r-flexclust/package.py
+++ b/var/spack/repos/builtin/packages/r-flexclust/package.py
@@ -21,6 +21,7 @@ class RFlexclust(RPackage):
license("GPL-2.0-only")
+ version("1.4-2", sha256="0c4720d691e36091cedafa26ee1f0ddc7af931168096df00b9bf6d64fdd35a55")
version("1.4-1", sha256="d67977df059e622832358069509f8968d506074320a45d34bfd21c65f898538d")
version("1.4-0", sha256="82fe445075a795c724644864c7ee803c5dd332a89ea9e6ccf7cd1ae2d1ecfc74")
version("1.3-5", sha256="dbf49969c93a7b314d9dc3299a0764ed9a804ba7dcbdc08a1235f244f4b85059")
diff --git a/var/spack/repos/builtin/packages/r-fnn/package.py b/var/spack/repos/builtin/packages/r-fnn/package.py
index c9e235eb4d..96565f2e33 100644
--- a/var/spack/repos/builtin/packages/r-fnn/package.py
+++ b/var/spack/repos/builtin/packages/r-fnn/package.py
@@ -15,6 +15,7 @@ class RFnn(RPackage):
cran = "FNN"
+ version("1.1.4", sha256="db4db5a348c6051fe547193c282b6e5cc839f68f51e0afccf4939f35e9a2fc27")
version("1.1.3.2", sha256="d701a13487979ebb07a071f4cc83fcf4daea5832d1f3923bce1e0d671dfe0e87")
version("1.1.3.1", sha256="52b0e20611481a95bced40be4126f44b002fd3a9c4c9674bb34db4e1e3b5be5a")
version("1.1.3", sha256="de763a25c9cfbd19d144586b9ed158135ec49cf7b812938954be54eb2dc59432")
@@ -26,3 +27,4 @@ class RFnn(RPackage):
version("0.6-2", sha256="f1fc410c341175bdb11a75b063c8c987e15b632378b56148d3566b91fca53a31")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@1.1.4:")
diff --git a/var/spack/repos/builtin/packages/r-fontawesome/package.py b/var/spack/repos/builtin/packages/r-fontawesome/package.py
index 90a63abb63..8709192c26 100644
--- a/var/spack/repos/builtin/packages/r-fontawesome/package.py
+++ b/var/spack/repos/builtin/packages/r-fontawesome/package.py
@@ -19,6 +19,7 @@ class RFontawesome(RPackage):
license("MIT")
+ version("0.5.2", sha256="da3de2a9717084d1400d48edd783f06c66b8c910ce9c8d753d1b7d99be1c5cc9")
version("0.5.1", sha256="f4ebbbe2ee8d2e2c0342b72095cfe668bd9800ea6c4bf7180300544bde7e566c")
version("0.4.0", sha256="760a0bc5b50ddbce1160b123f3b3d76342167519d75641dc2c5b952fa8d4242f")
version("0.3.0", sha256="4deefcf4d4580d84213f863351c2a23c39adbd2f8762d7477ec2faa8235a1a31")
diff --git a/var/spack/repos/builtin/packages/r-forecast/package.py b/var/spack/repos/builtin/packages/r-forecast/package.py
index 713c688d18..0a50289880 100644
--- a/var/spack/repos/builtin/packages/r-forecast/package.py
+++ b/var/spack/repos/builtin/packages/r-forecast/package.py
@@ -17,6 +17,7 @@ class RForecast(RPackage):
license("GPL-3.0-only")
+ version("8.23.0", sha256="ffc3d41138f498fb286f0ebfeb72d15f9f7a8e953abf3c351ebf95fc188a1880")
version("8.21", sha256="fdd131795a9d3fb399d76a9aa66a0c276637caaa9ec0c75fbe386189d005c6c2")
version("8.18", sha256="5920baa8d9d81988000d0e2edcea61c05126b5cb923cb5921a6fcd7bc312d8dd")
version("8.16", sha256="9f01eb895a883a7e1e23725b167b46edc1b0b152fd4120278aaa5f7b2621767f")
@@ -39,5 +40,6 @@ class RForecast(RPackage):
depends_on("r-timedate", type=("build", "run"))
depends_on("r-tseries", type=("build", "run"))
depends_on("r-urca", type=("build", "run"), when="@8.6:")
+ depends_on("r-withr", type=("build", "run"), when="@8.23.0:")
depends_on("r-zoo", type=("build", "run"))
depends_on("r-rcpparmadillo@0.2.35:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-foreign/package.py b/var/spack/repos/builtin/packages/r-foreign/package.py
index 18e6d6ac46..65ef468cb2 100644
--- a/var/spack/repos/builtin/packages/r-foreign/package.py
+++ b/var/spack/repos/builtin/packages/r-foreign/package.py
@@ -18,6 +18,7 @@ class RForeign(RPackage):
license("GPL-2.0-or-later")
+ version("0.8-87", sha256="1a24acf4c8e87acc740599e950388b88e5beab7e54f699a015366fbd86db2856")
version("0.8-84", sha256="17edf302c7568a122dc496a61a4a886ef7c02224a235d945b473611c79c98549")
version("0.8-83", sha256="87eae73f780b6bbcf0a45b3e21d1c87be0404aa2d5b455df92ab45516030721b")
version("0.8-82", sha256="f8ed0684d59bec7f3a39cde1aa5ec7b3e6e36aaecacb28120c9c54f7b13f80fb")
diff --git a/var/spack/repos/builtin/packages/r-fpc/package.py b/var/spack/repos/builtin/packages/r-fpc/package.py
index 7b29d95d0f..9ef1e36324 100644
--- a/var/spack/repos/builtin/packages/r-fpc/package.py
+++ b/var/spack/repos/builtin/packages/r-fpc/package.py
@@ -30,6 +30,7 @@ class RFpc(RPackage):
license("GPL-2.0-or-later")
+ version("2.2-12", sha256="555996b4c7e78a28067df25ac657b5065ec79b6b2cd76080382c2d5b43104787")
version("2.2-10", sha256="99b4548f2eca1a092a31bc2fa4e4bd1d6b50fdfacf3218588c879ceec99147d2")
version("2.2-9", sha256="29b0006e96c8645645d215d3378551bd6525aaf45abde2d9f12933cf6e75fa38")
version("2.2-3", sha256="8100a74e6ff96b1cd65fd22494f2d200e54ea5ea533cfca321fa494914bdc3b7")
diff --git a/var/spack/repos/builtin/packages/r-fracdiff/package.py b/var/spack/repos/builtin/packages/r-fracdiff/package.py
index ac7209584b..fe3009ec5e 100644
--- a/var/spack/repos/builtin/packages/r-fracdiff/package.py
+++ b/var/spack/repos/builtin/packages/r-fracdiff/package.py
@@ -18,6 +18,7 @@ class RFracdiff(RPackage):
license("GPL-2.0-or-later")
+ version("1.5-3", sha256="0f90946b4092feff93fad094a2c91bb47c8051595210e86c029c70238dbf7fc0")
version("1.5-2", sha256="ac5f881330287f5bc68b5cdce4fb74156a95356ffb875ee171538bc44200f437")
version("1.5-1", sha256="b8103b32a4ca3a59dda1624c07da08ecd144c7a91a747d1f4663e99421950eb6")
version("1.4-2", sha256="983781cedc2b4e3ba9fa020213957d5133ae9cd6710bc61d6225728e2f6e850e")
diff --git a/var/spack/repos/builtin/packages/r-fs/package.py b/var/spack/repos/builtin/packages/r-fs/package.py
index 01da707587..03481f2bd0 100644
--- a/var/spack/repos/builtin/packages/r-fs/package.py
+++ b/var/spack/repos/builtin/packages/r-fs/package.py
@@ -16,6 +16,7 @@ class RFs(RPackage):
license("MIT")
+ version("1.6.4", sha256="7e06290f2dbe36f54fdf51b748a4b00b8b0f68967b5754e37e0c83df7fea5ac8")
version("1.6.2", sha256="548b7c0ed5ab26dc4fbd88707ae12987bcaef834dbc6de4e17d453846dc436b2")
version("1.5.2", sha256="35cad1781d6d17c1feb56adc4607079c6844b63794d0ce1e74bb18dbc11e1987")
version("1.5.0", sha256="36df1653571de3c628a4f769c4627f6ac53d0f9e4106d9d476afb22ae9603897")
@@ -23,6 +24,7 @@ class RFs(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.6.2:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.6.4:")
depends_on("gmake", type="build")
depends_on("r-rcpp", type=("build", "run"), when="@:1.3.1")
diff --git a/var/spack/repos/builtin/packages/r-future-apply/package.py b/var/spack/repos/builtin/packages/r-future-apply/package.py
index 43d35b3845..7854e9a90c 100644
--- a/var/spack/repos/builtin/packages/r-future-apply/package.py
+++ b/var/spack/repos/builtin/packages/r-future-apply/package.py
@@ -19,6 +19,7 @@ class RFutureApply(RPackage):
cran = "future.apply"
+ version("1.11.2", sha256="f4a635b0fa5e0d826d2f8da6bc1fa5bb055e640c29a85c644931d08ab2d81387")
version("1.10.0", sha256="dee92dd84812fe8c55064c0f0e6d806c0c29848b5a5fc4a7725d6a4b623e94aa")
version("1.9.1", sha256="4f22ccd5caa62077581c6adc4d35543451e547220270aed3f1abcbaa6a202133")
version("1.9.0", sha256="6166c1c5ce30b9745059c3d30c8110f7c1d51871e58aa414f195cb1f91c467f5")
diff --git a/var/spack/repos/builtin/packages/r-future/package.py b/var/spack/repos/builtin/packages/r-future/package.py
index 5cdaa6a994..3cc6d0ecc8 100644
--- a/var/spack/repos/builtin/packages/r-future/package.py
+++ b/var/spack/repos/builtin/packages/r-future/package.py
@@ -28,6 +28,7 @@ class RFuture(RPackage):
license("LGPL-2.1-or-later")
+ version("1.34.0", sha256="5839d4fd1f8beb1b18b27a7c50c1eb2bb5d80acd926b1bce9323637c8b2dfa5d")
version("1.32.0", sha256="d5bb74512d069745184dd580a36449dc0b50d95b1cbbbc1605db82de596f2f76")
version("1.29.0", sha256="856d1fd51d2f998c6572490c49fdcc27e5f3e0c1ade75eecdbf64a2cd0954373")
version("1.28.0", sha256="6fdda66acd9a255e5baa70ff5dacd3c57ab2ecc2d87fd6abeebdfb939c051bf6")
@@ -52,3 +53,4 @@ class RFuture(RPackage):
depends_on("r-parallelly@1.30.0:", type=("build", "run"), when="@1.24.0:")
depends_on("r-parallelly@1.32.1:", type=("build", "run"), when="@1.28.0:")
depends_on("r-parallelly@1.34.0:", type=("build", "run"), when="@1.32.0:")
+ depends_on("r-parallelly@1.38.0:", type=("build", "run"), when="@1.34.0:")
diff --git a/var/spack/repos/builtin/packages/r-gamlss-data/package.py b/var/spack/repos/builtin/packages/r-gamlss-data/package.py
index 327f62a42e..da33639593 100644
--- a/var/spack/repos/builtin/packages/r-gamlss-data/package.py
+++ b/var/spack/repos/builtin/packages/r-gamlss-data/package.py
@@ -15,6 +15,7 @@ class RGamlssData(RPackage):
cran = "gamlss.data"
+ version("6.0-6", sha256="bae0db19d95500b3f49f855d4ebd3ddb071c5e2d9104b27e0a73865f4909ab22")
version("6.0-2", sha256="dbb3b6f855540928ccdbda497f8d552144895e34565799e8b595e704096db71e")
version("5.1-4", sha256="0d3777d8c3cd76cef273aa6bde40a91688719be401195ed9bfd1e85bd7d5eeb5")
version("5.1-3", sha256="4941180e7eebe97678ba02ca24c2a797bcb69d92cd34600215a94110e2a70470")
diff --git a/var/spack/repos/builtin/packages/r-gamlss-dist/package.py b/var/spack/repos/builtin/packages/r-gamlss-dist/package.py
index 46a8f63ad0..dc7b3e2380 100644
--- a/var/spack/repos/builtin/packages/r-gamlss-dist/package.py
+++ b/var/spack/repos/builtin/packages/r-gamlss-dist/package.py
@@ -21,6 +21,7 @@ class RGamlssDist(RPackage):
cran = "gamlss.dist"
+ version("6.1-1", sha256="d2db3a7658799c2ef212aa18cb75a3ecf4f73faf8c13dfdc3c14b21ae0129069")
version("6.0-5", sha256="0f88afdfb148de79d3ece66bf4631ea0dc3ecf1188680802abffd6bc7139a20e")
version("6.0-3", sha256="ec90ea83cd81b894c73f987f69814077697be33abf0708e0f3e2a39d02c912bf")
version("6.0-1", sha256="b563b4de6bcedcfa4f8d29198a47004e38fd2de6e0509c788015d4e3feb18154")
diff --git a/var/spack/repos/builtin/packages/r-gamlss/package.py b/var/spack/repos/builtin/packages/r-gamlss/package.py
index b052d0e2dc..4ab3444a07 100644
--- a/var/spack/repos/builtin/packages/r-gamlss/package.py
+++ b/var/spack/repos/builtin/packages/r-gamlss/package.py
@@ -20,6 +20,7 @@ class RGamlss(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("5.4-22", sha256="01e6908df92691147b884a8d58025473e18d7bf58d5f5a2d7e4f18b2a451fe2d")
version("5.4-12", sha256="9f791039f7e5c3cf3f6a2da955994a8c41c43044a2d77d99b289e4f82118a6f0")
version("5.4-3", sha256="6619d4fdc183ab492615d44961a126c827d18db20a0d59362e54de877f0a3076")
version("5.3-4", sha256="72707187471fd35c5379ae8c9b7b0ca87e302557f09cb3979d1cdb2e2500b01a")
diff --git a/var/spack/repos/builtin/packages/r-gargle/package.py b/var/spack/repos/builtin/packages/r-gargle/package.py
index 9f39688452..9e65e18527 100644
--- a/var/spack/repos/builtin/packages/r-gargle/package.py
+++ b/var/spack/repos/builtin/packages/r-gargle/package.py
@@ -18,12 +18,14 @@ class RGargle(RPackage):
license("MIT")
+ version("1.5.2", sha256="4a5beb046eb50a168b4baf5d1fcd8ac20d698e7fcb6b6ef46a436ded5b039001")
version("1.4.0", sha256="8e0f1edf5595d4fd27bd92f98af1cc0c1349975803d9d6f3ff0c25ee2440498b")
version("1.2.1", sha256="f367e2c82f403167ae84058303a4fb0402664558a2abf0b495474a7ef1a2f020")
version("1.2.0", sha256="4d46ca2933f19429ca5a2cfe47b4130a75c7cd9931c7758ade55bac0c091d73b")
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@1.2.1:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.5.0:")
depends_on("r-cli@3.0.0:", type=("build", "run"))
depends_on("r-cli@3.0.1:", type=("build", "run"), when="@1.4.0:")
depends_on("r-fs@1.3.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gbm/package.py b/var/spack/repos/builtin/packages/r-gbm/package.py
index 6204c12b68..2c6bed6457 100644
--- a/var/spack/repos/builtin/packages/r-gbm/package.py
+++ b/var/spack/repos/builtin/packages/r-gbm/package.py
@@ -20,6 +20,7 @@ class RGbm(RPackage):
license("GPL-2.0-or-later OR custom")
+ version("2.2.2", sha256="029ad2bac10c98979cf69206e94f2cc51a50667ec035f2474c44fb841950c4f4")
version("2.1.8.1", sha256="8d2456124552658ee9500707c4e9992cf42cb88705008c32ea258efb4f2be80b")
version("2.1.8", sha256="7d5de3b980b8f23275e86ac9bed48a497c9aa53c58e407dfd676309f38272ec1")
version("2.1.5", sha256="06fbde10639dfa886554379b40a7402d1f1236a9152eca517e97738895a4466f")
diff --git a/var/spack/repos/builtin/packages/r-gbrd/package.py b/var/spack/repos/builtin/packages/r-gbrd/package.py
index e44000f09e..39d79da732 100644
--- a/var/spack/repos/builtin/packages/r-gbrd/package.py
+++ b/var/spack/repos/builtin/packages/r-gbrd/package.py
@@ -14,4 +14,5 @@ class RGbrd(RPackage):
cran = "gbRd"
+ version("0.4.12", sha256="48cd1d2a845f4b54c307473d2fa07a4ef6a644272f91c6a953844e66cd832338")
version("0.4-11", sha256="0251f6dd6ca987a74acc4765838b858f1edb08b71dbad9e563669b58783ea91b")
diff --git a/var/spack/repos/builtin/packages/r-gcrma/package.py b/var/spack/repos/builtin/packages/r-gcrma/package.py
index 869d0f9848..3156c6ad24 100644
--- a/var/spack/repos/builtin/packages/r-gcrma/package.py
+++ b/var/spack/repos/builtin/packages/r-gcrma/package.py
@@ -24,6 +24,8 @@ class RGcrma(RPackage):
version("2.50.0", commit="cbba460d131e1073059500b8d7b168a78f963992")
version("2.48.0", commit="3ea0eb0b5c15ffb24df76620667ae7996ed715b4")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.6.0:", type=("build", "run"))
depends_on("r-affy@1.23.2:", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gdalutilities/package.py b/var/spack/repos/builtin/packages/r-gdalutilities/package.py
index 125dafba92..671c68f937 100644
--- a/var/spack/repos/builtin/packages/r-gdalutilities/package.py
+++ b/var/spack/repos/builtin/packages/r-gdalutilities/package.py
@@ -23,6 +23,7 @@ class RGdalutilities(RPackage):
cran = "gdalUtilities"
+ version("1.2.5", sha256="2a72e990080ad626205c78edc6614959b564413b7fc23132008b7259723571a7")
version("1.2.4", sha256="56d2582324977f2ae0a8bc42f740cd93b22c71eb8ee6a68b5b07083e409db8c7")
version("1.2.1", sha256="8f5dcc0c077bf972da9d574c62c992935311afb76a97f03ace719bc6da214a9c")
version("1.2.0", sha256="ead446f7f77f952b72b9ed80c5e415cb9d8d30cfb2439c8d1a8156fa55e2b65b")
diff --git a/var/spack/repos/builtin/packages/r-gdata/package.py b/var/spack/repos/builtin/packages/r-gdata/package.py
index 51ff21edf0..1c24477f54 100644
--- a/var/spack/repos/builtin/packages/r-gdata/package.py
+++ b/var/spack/repos/builtin/packages/r-gdata/package.py
@@ -35,6 +35,7 @@ class RGdata(RPackage):
license("GPL-2.0-only")
+ version("3.0.0", sha256="a456b9921765a705fe8e51780dfbbc6ca005abc948b2f80effeccd468601b17f")
version("2.18.0.1", sha256="5e2f3d5b9398d52a4c07a4d35f5f936450a44567c7db8d8f68b4cc6946e032d9")
version("2.18.0", sha256="4b287f59f5bbf5fcbf18db16477852faac4a605b10c5284c46b93fa6e9918d7f")
version("2.17.0", sha256="8097ec0e4868f6bf746f821cff7842f696e874bb3a84f1b2aa977ecd961c3e4e")
diff --git a/var/spack/repos/builtin/packages/r-gdsfmt/package.py b/var/spack/repos/builtin/packages/r-gdsfmt/package.py
index b2f85fbc0c..d429d3d37b 100644
--- a/var/spack/repos/builtin/packages/r-gdsfmt/package.py
+++ b/var/spack/repos/builtin/packages/r-gdsfmt/package.py
@@ -37,4 +37,7 @@ class RGdsfmt(RPackage):
version("1.14.1", commit="15743647b7eea5b82d3284858b4591fb6e59959d")
version("1.12.0", commit="d705a95b0bea7be2a2b37e939f45017337ba0fb6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.15.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-geiger/package.py b/var/spack/repos/builtin/packages/r-geiger/package.py
index 62d8a896cd..3cfefe9182 100644
--- a/var/spack/repos/builtin/packages/r-geiger/package.py
+++ b/var/spack/repos/builtin/packages/r-geiger/package.py
@@ -24,6 +24,9 @@ class RGeiger(RPackage):
version("2.0.6.1", sha256="2a95e20a3a90c096343b014344dd97e699e954da99c151c17fc6c245c77dba0b")
version("2.0.6", sha256="e13b2c526378eaf9356b00bbe21b3c2c956327f8062fed638ccc1f49591c3eff")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.15.0:", type=("build", "run"))
depends_on("r-ape@3.0-6:", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-genefilter/package.py b/var/spack/repos/builtin/packages/r-genefilter/package.py
index 74936d9ab5..0000d78ac3 100644
--- a/var/spack/repos/builtin/packages/r-genefilter/package.py
+++ b/var/spack/repos/builtin/packages/r-genefilter/package.py
@@ -25,6 +25,10 @@ class RGenefilter(RPackage):
version("1.60.0", commit="c98f695253c330a9380b2b4ffa27f3b7d66773e4")
version("1.58.1", commit="ace2556049677f60882adfe91f8cc96791556fc2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r-matrixgenerics@1.11.1:", type=("build", "run"), when="@1.82.0:")
depends_on("r-annotationdbi", type=("build", "run"))
depends_on("r-annotate", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-genie3/package.py b/var/spack/repos/builtin/packages/r-genie3/package.py
index 3a79f63b99..dd33946892 100644
--- a/var/spack/repos/builtin/packages/r-genie3/package.py
+++ b/var/spack/repos/builtin/packages/r-genie3/package.py
@@ -24,5 +24,7 @@ class RGenie3(RPackage):
version("1.2.1", commit="1b56fe8184d521d1bb247f000efe9e2b540604c9")
version("1.0.0", commit="eb7c95ed12ea50d61e8fa20bc2b25ae9d74c302f")
+ depends_on("c", type="build") # generated
+
depends_on("r-reshape2", type=("build", "run"))
depends_on("r-dplyr", type=("build", "run"), when="@1.16.0:")
diff --git a/var/spack/repos/builtin/packages/r-genomeinfodbdata/package.py b/var/spack/repos/builtin/packages/r-genomeinfodbdata/package.py
index dde99a8f61..22091935c7 100644
--- a/var/spack/repos/builtin/packages/r-genomeinfodbdata/package.py
+++ b/var/spack/repos/builtin/packages/r-genomeinfodbdata/package.py
@@ -47,3 +47,4 @@ class RGenomeinfodbdata(RPackage):
depends_on("r@3.5:", type=("build", "run"), when="@1.2.1:")
depends_on("r@3.3:", type=("build", "run"), when="@0.99.0:1.1.0")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@1.2.10:")
diff --git a/var/spack/repos/builtin/packages/r-genomicalignments/package.py b/var/spack/repos/builtin/packages/r-genomicalignments/package.py
index 3a4364713d..7b5b9083c9 100644
--- a/var/spack/repos/builtin/packages/r-genomicalignments/package.py
+++ b/var/spack/repos/builtin/packages/r-genomicalignments/package.py
@@ -28,6 +28,8 @@ class RGenomicalignments(RPackage):
version("1.14.2", commit="57b0b35d8b36069d4d94af86af051f0129b28eef")
version("1.12.2", commit="b5d6f19e4a89b6c1c3e9e58e5ea4eb13870874ef")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@1.30.0:")
depends_on("r-biocgenerics@0.15.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-genomicranges/package.py b/var/spack/repos/builtin/packages/r-genomicranges/package.py
index ca13cefcbf..a439fe1065 100644
--- a/var/spack/repos/builtin/packages/r-genomicranges/package.py
+++ b/var/spack/repos/builtin/packages/r-genomicranges/package.py
@@ -33,6 +33,8 @@ class RGenomicranges(RPackage):
version("1.30.3", commit="e99979054bc50ed8c0109bc54563036c1b368997")
version("1.28.6", commit="197472d618f3ed04c795dc6ed435500c29619563")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@1.46.1:")
depends_on("r-biocgenerics@0.21.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gensa/package.py b/var/spack/repos/builtin/packages/r-gensa/package.py
index 7402c6808f..96402ef9a7 100644
--- a/var/spack/repos/builtin/packages/r-gensa/package.py
+++ b/var/spack/repos/builtin/packages/r-gensa/package.py
@@ -14,6 +14,7 @@ class RGensa(RPackage):
cran = "GenSA"
+ version("1.1.14", sha256="66e455bb0e66d3c04af84d9dddc9b89f40b4cf9fe9ad1cf0714bcf30aa1b6837")
version("1.1.8", sha256="375e87541eb6b098584afccab361dc28ff09d03cf1d062ff970208e294eca216")
version("1.1.7", sha256="9d99d3d0a4b7770c3c3a6de44206811272d78ab94481713a8c369f7d6ae7b80f")
diff --git a/var/spack/repos/builtin/packages/r-geojsonsf/package.py b/var/spack/repos/builtin/packages/r-geojsonsf/package.py
index 8307479d69..92e9a8980c 100644
--- a/var/spack/repos/builtin/packages/r-geojsonsf/package.py
+++ b/var/spack/repos/builtin/packages/r-geojsonsf/package.py
@@ -18,6 +18,8 @@ class RGeojsonsf(RPackage):
version("2.0.3", sha256="275ca14672d982e6a95884515f49d8a0aad14f3be62ea01b675a91b0bffb46d1")
version("2.0.1", sha256="42df40433bfbece5a39cd97b5bd4690b4424855241fcc3e7322ee68a3988bfbf")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-geometries", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-geometries/package.py b/var/spack/repos/builtin/packages/r-geometries/package.py
index 68728af1d3..7c262ea9eb 100644
--- a/var/spack/repos/builtin/packages/r-geometries/package.py
+++ b/var/spack/repos/builtin/packages/r-geometries/package.py
@@ -18,6 +18,7 @@ class RGeometries(RPackage):
license("MIT")
+ version("0.2.4", sha256="c6292acc336bb8520b8cb3672566f993fd077cb1f6f980ae39b9c9f56b971410")
version("0.2.2", sha256="32d3063de0f8a751382788f85ebaee5f39d68e486253c159d553bb3d72d69141")
version("0.2.0", sha256="8cf5094f3c2458fef5d755799c766afd27c66cd1c292574a6ab532d608360314")
diff --git a/var/spack/repos/builtin/packages/r-geometry/package.py b/var/spack/repos/builtin/packages/r-geometry/package.py
index 855612ecc9..5ff51298d1 100644
--- a/var/spack/repos/builtin/packages/r-geometry/package.py
+++ b/var/spack/repos/builtin/packages/r-geometry/package.py
@@ -27,6 +27,9 @@ class RGeometry(RPackage):
version("0.4.6.1", sha256="52c87a43cdf414c08b8183441c44497039cba92a9cff719debf09ad8d5d7f472")
version("0.4.6", sha256="910465a8c8043faca73bcc7c81c9249b9938677ee6649468003b438a6503f5d8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-magic", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-geomorph/package.py b/var/spack/repos/builtin/packages/r-geomorph/package.py
index 6cce7f2313..d4144663fb 100644
--- a/var/spack/repos/builtin/packages/r-geomorph/package.py
+++ b/var/spack/repos/builtin/packages/r-geomorph/package.py
@@ -18,6 +18,7 @@ class RGeomorph(RPackage):
license("GPL-3.0-or-later")
+ version("4.0.8", sha256="14b4ad5a03fb58d9e7d02ddc4d0756553e9480ded3e68fd699249d58870f0c55")
version("4.0.5", sha256="900d41f95a610b026763797f290ce94c10827a59b05030ed01c841c59264313b")
version("4.0.4", sha256="dfded29070bc06bf1dc0d6fedaa16fea9f8eef76f0a7443a11f2835c328c6b0a")
version("4.0.3", sha256="8fd77bedf2ee85f1e4aaac4b22253810d12dba0b79d78d67695d237b7184e263")
@@ -31,9 +32,11 @@ class RGeomorph(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@3.3.2:")
+ depends_on("r@4.4.0:", type=("build", "run"), when="@4.0.8:")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rrpp", type=("build", "run"), when="@3.0.7:")
depends_on("r-rrpp@1.0.0:", type=("build", "run"), when="@4.0.1:")
+ depends_on("r-rrpp@2.0.1:", type=("build", "run"), when="@4.0.8:")
depends_on("r-rgl", type=("build", "run"))
depends_on("r-jpeg", type=("build", "run"))
depends_on("r-ape", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-geor/package.py b/var/spack/repos/builtin/packages/r-geor/package.py
index 60cc131b92..9ac4d6fd8b 100644
--- a/var/spack/repos/builtin/packages/r-geor/package.py
+++ b/var/spack/repos/builtin/packages/r-geor/package.py
@@ -15,6 +15,7 @@ class RGeor(RPackage):
cran = "geoR"
+ version("1.9-4", sha256="ae9d977cebe0f93b2593542f8d6d060467984dcf174e84ba632307c035d7ebbd")
version("1.9-2", sha256="7ce3f5256a33a9de71b22a08caba634e77344889aac7d9eed02625a90254b9d9")
version("1.8-1", sha256="990647804590b925a50f72897b24bbabd331cebef0be1696a60528b2f79d6fd3")
version("1.7-5.2.1", sha256="3895e49c005a5745738d190ccaad43bb0aa49c74465d4d0b4dd88c5850ed63b9")
diff --git a/var/spack/repos/builtin/packages/r-geosphere/package.py b/var/spack/repos/builtin/packages/r-geosphere/package.py
index c9079b02a4..79e82e106f 100644
--- a/var/spack/repos/builtin/packages/r-geosphere/package.py
+++ b/var/spack/repos/builtin/packages/r-geosphere/package.py
@@ -23,6 +23,9 @@ class RGeosphere(RPackage):
version("1.5-7", sha256="9d9b555e2d59a5ae174ae654652121f169fbc3e9cf66c2491bfbe0684b6dd8a0")
version("1.5-5", sha256="8b6fe012744fc45b88e0ef6f20e60e103ef013e761e99dcff3f9dceeedbdce6d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"), when="@1.5-18:")
depends_on("r-sp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gert/package.py b/var/spack/repos/builtin/packages/r-gert/package.py
index 3ac439d420..1f603de052 100644
--- a/var/spack/repos/builtin/packages/r-gert/package.py
+++ b/var/spack/repos/builtin/packages/r-gert/package.py
@@ -19,6 +19,7 @@ class RGert(RPackage):
license("MIT")
+ version("2.1.1", sha256="42037c041b284ae7ef4da68b784f2dfc3f72701534a8330265b1abc382eda964")
version("1.9.2", sha256="42ca1b4bcafb1fdbbc7f54df0ee4476ecd19e9e7d563b53fe7064e0086ab665e")
version("1.9.1", sha256="751d18760a08ae00b8de73dc3e564cf4e76b1f47c7179101320e1b70152e1fdd")
version("1.6.0", sha256="8c440aeebabf1cb3b57124ec9280e0f46b2ab56f2bca07d72b5c7a7f4edc2964")
diff --git a/var/spack/repos/builtin/packages/r-getopt/package.py b/var/spack/repos/builtin/packages/r-getopt/package.py
index 79b26170f1..a2d60d3ced 100644
--- a/var/spack/repos/builtin/packages/r-getopt/package.py
+++ b/var/spack/repos/builtin/packages/r-getopt/package.py
@@ -19,6 +19,7 @@ class RGetopt(RPackage):
license("GPL-2.0-or-later")
+ version("1.20.4", sha256="87d36cbe6dba41dbc1d78d845210266cdd08c7440d977d738a6e45db14221e8b")
version("1.20.3", sha256="531f5fdfdcd6b96a73df2b39928418de342160ac1b0043861e9ea844f9fbf57f")
version("1.20.2", sha256="3d6c12d32d6cd4b2909be626e570e158b3ed960e4739510e3a251e7f172de38e")
version("1.20.1", sha256="1522c35b13e8546979725a68b75e3bc9d156fb06569067472405f6b8591d8654")
diff --git a/var/spack/repos/builtin/packages/r-ggally/package.py b/var/spack/repos/builtin/packages/r-ggally/package.py
index dac799bacf..8a29072067 100644
--- a/var/spack/repos/builtin/packages/r-ggally/package.py
+++ b/var/spack/repos/builtin/packages/r-ggally/package.py
@@ -18,6 +18,7 @@ class RGgally(RPackage):
cran = "GGally"
+ version("2.2.1", sha256="8bb326665936a63f6eef92a2af1a11d1fae78dbd28d6980608d2b38ee1f586c6")
version("2.1.2", sha256="30352f36bf061bc98bdd5fa373ea0f23d007040bd908c7c018c8e627e0fb28e5")
version("2.1.0", sha256="7ffb86b8a4e79543cf7e6bb1e3684d738ecd8e0ba89e8ef38991898b18dd6c53")
version("1.4.0", sha256="9a47cdf004c41f5e4024327b94227707f4dad3a0ac5556d8f1fba9bf0a6355fe")
@@ -27,15 +28,20 @@ class RGgally(RPackage):
depends_on("r-ggplot2@2.2.0:", type=("build", "run"))
depends_on("r-ggplot2@3.3.0:", type=("build", "run"), when="@2.1.0:")
depends_on("r-ggplot2@3.3.4:", type=("build", "run"), when="@2.1.2:")
+ depends_on("r-ggplot2@3.4.4:", type=("build", "run"), when="@2.2.0:")
depends_on("r-dplyr@1.0.0:", type=("build", "run"), when="@2.1.0:")
- depends_on("r-forcats", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-ggstats", type=("build", "run"), when="@2.2.0:")
depends_on("r-gtable@0.2.0:", type=("build", "run"))
depends_on("r-lifecycle", type=("build", "run"), when="@2.1.0:")
depends_on("r-plyr@1.8.3:", type=("build", "run"))
depends_on("r-progress", type=("build", "run"))
depends_on("r-rcolorbrewer", type=("build", "run"))
- depends_on("r-reshape@0.8.5:", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"), when="@1.4.0:")
depends_on("r-scales@1.1.0:", type=("build", "run"), when="@2.1.0:")
depends_on("r-tidyr", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-tidyr@1.3.0:", type=("build", "run"), when="@2.2.0:")
+ depends_on("r-magrittr", type=("build", "run"), when="@2.2.0:")
depends_on("openssl", when="@1.4.0:")
+
+ depends_on("r-forcats", type=("build", "run"), when="@2.1.0:2.1")
+ depends_on("r-reshape@0.8.5:", type=("build", "run"), when="@:2.1")
diff --git a/var/spack/repos/builtin/packages/r-ggbeeswarm/package.py b/var/spack/repos/builtin/packages/r-ggbeeswarm/package.py
index 5915714aff..d8738700fa 100644
--- a/var/spack/repos/builtin/packages/r-ggbeeswarm/package.py
+++ b/var/spack/repos/builtin/packages/r-ggbeeswarm/package.py
@@ -17,12 +17,14 @@ class RGgbeeswarm(RPackage):
license("GPL-3.0-or-later")
+ version("0.7.2", sha256="fd7ca265bb892dde514d5f8d6a853fb8b32d7a673b05e9c8b50544a523299ce5")
version("0.7.1", sha256="f41550335149bc2122fed0dd280d980cecd02ace79e042d5e03c1f102200ac92")
version("0.6.0", sha256="bbac8552f67ff1945180fbcda83f7f1c47908f27ba4e84921a39c45d6e123333")
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@0.7.1:")
depends_on("r-beeswarm", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"), when="@0.7.2:")
depends_on("r-lifecycle", type=("build", "run"), when="@0.7.1:")
depends_on("r-ggplot2@2.0:", type=("build", "run"))
depends_on("r-ggplot2@3.3.0:", type=("build", "run"), when="@0.7.1:")
diff --git a/var/spack/repos/builtin/packages/r-ggdendro/package.py b/var/spack/repos/builtin/packages/r-ggdendro/package.py
index 657d9a4d49..21bfda18c2 100644
--- a/var/spack/repos/builtin/packages/r-ggdendro/package.py
+++ b/var/spack/repos/builtin/packages/r-ggdendro/package.py
@@ -21,9 +21,11 @@ class RGgdendro(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("0.2.0", sha256="1940c34ddb30083a4c3bc3be98b6b466dcc78e03ac22a32088744db8bff7aa69")
version("0.1.23", sha256="3a33e988c4fe12eec540876ad8ba09bda998773b2d2a90e043ebae4a69fa8eb8")
version("0.1.22", sha256="f0a65f3498c1abc3076df0fb56364b63bdf5d212d8931f85bcc6997510916b6a")
version("0.1-20", sha256="125cae904fa5d426cccaf32ebe9c6297e9ef0c6fd3f19f61513834d03a0cf8ff")
+ depends_on("r@3.5:", type=("build", "run"), when="@0.2.0:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-ggplot2@0.9.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ggforce/package.py b/var/spack/repos/builtin/packages/r-ggforce/package.py
index 0c73a81813..cf8063a242 100644
--- a/var/spack/repos/builtin/packages/r-ggforce/package.py
+++ b/var/spack/repos/builtin/packages/r-ggforce/package.py
@@ -19,6 +19,7 @@ class RGgforce(RPackage):
license("MIT")
+ version("0.4.2", sha256="c145b0e6ed6847d409ed2fe103b81234855bc0661cde2bfb4410fb23680e51a8")
version("0.4.1", sha256="b44219fb63c45fa003c64bca323452f16dcace635204bc0127d3244c0f451873")
version("0.3.3", sha256="2a283bb409da6b96929863a926b153bcc59b2c6f00551805db1d1d43e5929f2f")
version("0.3.2", sha256="4cce8acb60ce06af44c1c76bbacd7de129eed9b51ed6a85e03a9bf55b0eff4d2")
diff --git a/var/spack/repos/builtin/packages/r-ggfun/package.py b/var/spack/repos/builtin/packages/r-ggfun/package.py
index 9c73c7fa48..c1aebd8afb 100644
--- a/var/spack/repos/builtin/packages/r-ggfun/package.py
+++ b/var/spack/repos/builtin/packages/r-ggfun/package.py
@@ -16,6 +16,7 @@ class RGgfun(RPackage):
license("Artistic-2.0")
+ version("0.1.5", sha256="fe6c01fd68c17497f23f76dfd4e5a6edd79a6e86850b8c5054748f31527b16d3")
version("0.0.9", sha256="5c740e9d1e73b77658f41ed65e21492f4e71b12c7c9ff4b9e52ebf5f8f197612")
version("0.0.8", sha256="9471a12fc7af203a419767b845e6b6c1e63c080370cb8f2dac80187194122273")
version("0.0.7", sha256="a83b5fb95f61e366f96d6d8e6b04dafff8e885e7c80c913614876b50ebb8e174")
@@ -23,5 +24,8 @@ class RGgfun(RPackage):
version("0.0.5", sha256="b1e340a8932d2cffbbbf6070ce96c9356599e9955a2b6534fcb17e599c575783")
version("0.0.4", sha256="5926365f9a90baf47320baf48c40f515ef570f9c767484adea5f04219964d21e")
+ depends_on("r@4.1.0:", type=("build", "run"), when="@0.1.2:")
+ depends_on("r-cli", type=("build", "run"), when="@0.1.3:")
+ depends_on("r-dplyr", type=("build", "run"), when="@0.1.5:")
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ggmap/package.py b/var/spack/repos/builtin/packages/r-ggmap/package.py
index 9a007a055f..c0b6fe8a04 100644
--- a/var/spack/repos/builtin/packages/r-ggmap/package.py
+++ b/var/spack/repos/builtin/packages/r-ggmap/package.py
@@ -18,6 +18,7 @@ class RGgmap(RPackage):
license("GPL-2.0-only")
+ version("4.0.0", sha256="0de639357c066e3b632eb960fd811276558ce29aefa2f77ef711ff5841c734f5")
version("3.0.2", sha256="ba5fe3975fd4ca1a5fbda4910c9705ac2edacec75c658177edaf87f1c55cdcae")
version("3.0.1", sha256="fc824b547f1fd0b52b6fbd18a82fe6f29f97b1f592e2c61baf4686ddfd47e35d")
version("3.0.0", sha256="96c24ffdc0710d0633ac4721d599d2c06f43a29c59d1e85c94ff0af30dfdb58d")
@@ -26,7 +27,6 @@ class RGgmap(RPackage):
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-ggplot2@2.2.0:", type=("build", "run"))
- depends_on("r-rgooglemaps", type=("build", "run"))
depends_on("r-png", type=("build", "run"))
depends_on("r-plyr", type=("build", "run"))
depends_on("r-jpeg", type=("build", "run"))
@@ -44,6 +44,7 @@ class RGgmap(RPackage):
depends_on("r-cli", type=("build", "run"), when="@3.0.1:")
depends_on("r-rlang", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-rgooglemaps", type=("build", "run"), when="@:3.0.2")
depends_on("r-proto", type=("build", "run"), when="@:2.6.2")
depends_on("r-reshape2", type=("build", "run"), when="@:2.6.2")
depends_on("r-mapproj", type=("build", "run"), when="@:2.6.2")
diff --git a/var/spack/repos/builtin/packages/r-ggnewscale/package.py b/var/spack/repos/builtin/packages/r-ggnewscale/package.py
index 5c0d929a7f..8e4518e837 100644
--- a/var/spack/repos/builtin/packages/r-ggnewscale/package.py
+++ b/var/spack/repos/builtin/packages/r-ggnewscale/package.py
@@ -15,6 +15,8 @@ class RGgnewscale(RPackage):
license("GPL-3.0-only")
+ version("0.5.0", sha256="b7f0dcb38d0e8cb4179d92f38b20489905ceb2a9602b68e2c72997d795c4df2d")
version("0.4.8", sha256="c7fefa6941ecbc789507e59be13fa96327fe2549681a938c43beb06ca22a9700")
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
+ depends_on("r-ggplot2@3.5.0:", type=("build", "run"), when="@0.5.0:")
diff --git a/var/spack/repos/builtin/packages/r-ggplot2/package.py b/var/spack/repos/builtin/packages/r-ggplot2/package.py
index 21ec26809f..61b80a6a7f 100644
--- a/var/spack/repos/builtin/packages/r-ggplot2/package.py
+++ b/var/spack/repos/builtin/packages/r-ggplot2/package.py
@@ -18,6 +18,10 @@ class RGgplot2(RPackage):
license("MIT")
+ version("3.5.1", sha256="7c58b424f99b3634038e6f6d1fe4b0241b8aecb50e9c50466d5590f7e3144721")
+ version("3.5.0", sha256="07fa1cd4e02d409ade32e69a9088d9209f864c6ddd70fa2f904769dec21090e2")
+ version("3.4.4", sha256="2d76ec065d3e604d019506f45b3b713ae20f38e47dbebfb5ba1648b47fe63e46")
+ version("3.4.3", sha256="5ce29ace6be7727be434506a1c759dfc322f65b17eabeec863b93be10f91a543")
version("3.4.2", sha256="70230aa70a2c6f844fc41dd93e5f62af6859dfed390026ae58f223637e5283ca")
version("3.4.0", sha256="a82f9e52f974389439765f71a8206ec26e3be30a8864d2c784d5ea8abcb0473e")
version("3.3.6", sha256="bfcb4eb92a0fcd3fab713aca4bb25e916e05914f2540271a45522ad7e43943a9")
@@ -31,12 +35,12 @@ class RGgplot2(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@3.2.0:")
depends_on("r@3.3:", type=("build", "run"), when="@3.3.4:")
+ depends_on("r@3.5:", type=("build", "run"), when="@3.5.0:")
depends_on("r-cli", type=("build", "run"), when="@3.4.0:")
depends_on("r-glue", type=("build", "run"), when="@3.3.3:")
depends_on("r-gtable@0.1.1:", type=("build", "run"))
depends_on("r-isoband", type=("build", "run"), when="@3.3.3:")
- depends_on("r-lifecycle@1.0.1:", type=("build", "run"), when="@3.4.0:")
- depends_on("r-lifecycle@unknown:", type=("build", "run"), when="@3.4.2:")
+ depends_on("r-lifecycle@1.0.1.1:", type=("build", "run"), when="@3.4.0:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-mgcv", type=("build", "run"), when="@3.2.0:")
depends_on("r-rlang@0.3.0:", type=("build", "run"), when="@3.0.0:")
@@ -44,9 +48,11 @@ class RGgplot2(RPackage):
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@3.4.0:")
depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@3.4.2:")
depends_on("r-scales@0.5.0:", type=("build", "run"))
- depends_on("r-scales@1.2.0:", type=("build", "run"), when="@3.4.0:")
+ depends_on("r-scales@1.2.0:", type=("build", "run"), when="@3.4.0:3.4.4")
+ depends_on("r-scales@1.3.0:", type=("build", "run"), when="@3.5.0:")
depends_on("r-tibble", type=("build", "run"))
depends_on("r-vctrs@0.5.0:", type=("build", "run"), when="@3.4.0:")
+ depends_on("r-vctrs@0.6.0:", type=("build", "run"), when="@3.5.1:")
depends_on("r-withr@2.0.0:", type=("build", "run"), when="@3.0.0:")
depends_on("r-withr@2.5.0:", type=("build", "run"), when="@3.4.0:")
diff --git a/var/spack/repos/builtin/packages/r-ggplotify/package.py b/var/spack/repos/builtin/packages/r-ggplotify/package.py
index b87ca84a9d..561d5ea547 100644
--- a/var/spack/repos/builtin/packages/r-ggplotify/package.py
+++ b/var/spack/repos/builtin/packages/r-ggplotify/package.py
@@ -19,6 +19,7 @@ class RGgplotify(RPackage):
license("Artistic-2.0")
+ version("0.1.2", sha256="01bae5759e14e211bddb04413e094ba31399b513989894ea08602d202f990e87")
version("0.1.0", sha256="178f73d6d3dc391c3efb1a62c95fe38587044f9e3288dffb915d3687941bb38a")
version("0.0.5", sha256="035ea6a70023c4819c8a486d0fd94c2765aa4d6df318747e104eeb9829b9d65d")
version("0.0.3", sha256="7e7953a2933aa7127a0bac54375e3e0219a0744cfc3249c3d7b76065f7a51892")
diff --git a/var/spack/repos/builtin/packages/r-ggraph/package.py b/var/spack/repos/builtin/packages/r-ggraph/package.py
index cc887295f0..ad065c4537 100644
--- a/var/spack/repos/builtin/packages/r-ggraph/package.py
+++ b/var/spack/repos/builtin/packages/r-ggraph/package.py
@@ -19,6 +19,7 @@ class RGgraph(RPackage):
license("MIT")
+ version("2.2.1", sha256="4405f8a907ad8fee68b5d4991f0bc8f35d6c0facbb7467c2ce425d3ec8b23af1")
version("2.1.0", sha256="686fdb22dc4f613273fb755ec42399a208b4d10348eecd1a217afd4612245c1f")
version("2.0.6", sha256="7b0ac90d834a3ce5641b4bca159d59d09607ddaab592908361b75cffb648d40a")
version("2.0.5", sha256="e36ad49dba92ee8652e18b1fb197be0ceb9f0a2f8faee2194453a62578449654")
@@ -27,20 +28,25 @@ class RGgraph(RPackage):
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
- depends_on("r-rcpp@0.12.2:", type=("build", "run"))
+ depends_on("r-ggplot2@3.5.0:", type=("build", "run"), when="@2.2.0:")
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-ggforce@0.3.1:", type=("build", "run"))
depends_on("r-igraph@1.0.0:", type=("build", "run"))
depends_on("r-scales", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
- depends_on("r-digest", type=("build", "run"))
- depends_on("r-gtable", type=("build", "run"))
depends_on("r-ggrepel", type=("build", "run"))
depends_on("r-viridis", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
depends_on("r-tidygraph", type=("build", "run"))
depends_on("r-graphlayouts@0.5.0:", type=("build", "run"))
+ depends_on("r-graphlayouts@1.1.0:", type=("build", "run"), when="@2.2.0:")
depends_on("r-withr", type=("build", "run"), when="@2.0.4:")
depends_on("r-lifecycle", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-memoise", type=("build", "run"), when="@2.2.0:")
depends_on("r-vctrs", type=("build", "run"), when="@2.1.0:")
depends_on("r-cli", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-cpp11", type=("build", "run"), when="@2.2.0:")
+
+ depends_on("r-rcpp@0.12.2:", type=("build", "run"), when="@:2.1.0")
+ depends_on("r-digest", type=("build", "run"), when="@:2.1.0")
+ depends_on("r-gtable", type=("build", "run"), when="@:2.1.0")
diff --git a/var/spack/repos/builtin/packages/r-ggrastr/package.py b/var/spack/repos/builtin/packages/r-ggrastr/package.py
index 67f07d652d..c25cf879ec 100644
--- a/var/spack/repos/builtin/packages/r-ggrastr/package.py
+++ b/var/spack/repos/builtin/packages/r-ggrastr/package.py
@@ -18,6 +18,7 @@ class RGgrastr(RPackage):
license("MIT")
+ version("1.0.2", sha256="cb27406dca99cea6440adf6edb7eb53141b60322452f5a5d4409e36516ad20d1")
version("1.0.1", sha256="82d6e90fa38dec85e829f71018532ed5b709a50a585455fc07cb3bae282f5d1f")
depends_on("r@3.2.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ggrepel/package.py b/var/spack/repos/builtin/packages/r-ggrepel/package.py
index ecb836d2bb..790f13ec54 100644
--- a/var/spack/repos/builtin/packages/r-ggrepel/package.py
+++ b/var/spack/repos/builtin/packages/r-ggrepel/package.py
@@ -17,6 +17,7 @@ class RGgrepel(RPackage):
license("GPL-3.0-only OR custom")
+ version("0.9.5", sha256="d1e600e56c2ad345961ed23f30f04b81c631ff94bd6762a260c62e0206cf8caa")
version("0.9.3", sha256="b9eba0e2edee84db0276b49e4834b65f5369edc4bc56f4cacc13e0d1c39a005c")
version("0.9.2", sha256="0a3088c48177528e2a65defebbc4f09a744ebb44408588f688811f8d0d827488")
version("0.9.1", sha256="29fb916d4799ba6503a5dd019717ffdf154d2aaae9ff1736f03e2be24af6bdfc")
diff --git a/var/spack/repos/builtin/packages/r-ggridges/package.py b/var/spack/repos/builtin/packages/r-ggridges/package.py
index b91e7d0b8d..48fae13e22 100644
--- a/var/spack/repos/builtin/packages/r-ggridges/package.py
+++ b/var/spack/repos/builtin/packages/r-ggridges/package.py
@@ -17,6 +17,7 @@ class RGgridges(RPackage):
license("GPL-2.0-only OR custom")
+ version("0.5.6", sha256="efccaa309a150d11c6b402b912e618ea041f25cca3101f32cd821a6f41684e35")
version("0.5.4", sha256="2bf71c2034804cec637e6748dc51d8cadad01d3ea4d14ace754327f082e8d851")
version("0.5.3", sha256="f5eafab17f2d4a8a2a83821ad3e96ae7c26b62bbce9de414484c657383c7b42e")
version("0.5.1", sha256="01f87cdcdf2052ed9c078d9352465cdeda920a41e2ca55bc154c1574fc651c36")
@@ -27,6 +28,7 @@ class RGgridges(RPackage):
depends_on("r@3.2:", type=("build", "run"))
depends_on("r-ggplot2@2.2.0:", type=("build", "run"))
depends_on("r-ggplot2@3.0.0:", type=("build", "run"), when="@0.5.3:")
+ depends_on("r-ggplot2@3.4.0:", type=("build", "run"), when="@0.5.5:")
depends_on("r-scales@0.4.1:", type=("build", "run"))
depends_on("r-withr@2.1.1:", type=("build", "run"), when="@0.5.0:")
diff --git a/var/spack/repos/builtin/packages/r-ggsci/package.py b/var/spack/repos/builtin/packages/r-ggsci/package.py
index 5c5f4a75fb..fd0574863f 100644
--- a/var/spack/repos/builtin/packages/r-ggsci/package.py
+++ b/var/spack/repos/builtin/packages/r-ggsci/package.py
@@ -17,6 +17,7 @@ class RGgsci(RPackage):
license("GPL-3.0-or-later")
+ version("3.2.0", sha256="41d8ed4c01c3740028bdf2ba9c5550f1142061e4a40c93b1d2160719c59c3c4a")
version("3.0.0", sha256="8901316516d78f82a2a8685d93ba479424bcfd8cb5e28a28adbd50e68964e129")
version("2.9", sha256="4af14e6f3657134c115d5ac5e65a2ed74596f9a8437c03255447cd959fe9e33c")
version("2.8", sha256="b4ce7adce7ef23edf777866086f98e29b2b45b58fed085bbd1ffe6ab52d74ae8")
diff --git a/var/spack/repos/builtin/packages/r-ggstats/package.py b/var/spack/repos/builtin/packages/r-ggstats/package.py
new file mode 100644
index 0000000000..b1b3678954
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-ggstats/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RGgstats(RPackage):
+ """Provides new statistics, new geometries and new positions for
+ 'ggplot2' and a suite of functions to facilitate the creation of
+ statistical plots."""
+
+ homepage = "https://larmarange.github.io/ggstats/"
+ cran = "ggstats"
+
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+
+ version("0.6.0", sha256="f80aaa229f542cb18174b9ab82b0026c6bd3331f22bf2662712ab6af480b6d80")
+
+ depends_on("r-broom-helpers@1.14.0:", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"))
+ depends_on("r-dplyr", type=("build", "run"))
+ depends_on("r-forcats", type=("build", "run"))
+ depends_on("r-ggplot2@3.4.0:", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"))
+ depends_on("r-magrittr", type=("build", "run"))
+ depends_on("r-patchwork", type=("build", "run"))
+ depends_on("r-purrr", type=("build", "run"))
+ depends_on("r-rlang", type=("build", "run"))
+ depends_on("r-scales", type=("build", "run"))
+ depends_on("r-stringr", type=("build", "run"))
+ depends_on("r-tidyr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ggthemes/package.py b/var/spack/repos/builtin/packages/r-ggthemes/package.py
index a2689071eb..d325a1add6 100644
--- a/var/spack/repos/builtin/packages/r-ggthemes/package.py
+++ b/var/spack/repos/builtin/packages/r-ggthemes/package.py
@@ -19,11 +19,13 @@ class RGgthemes(RPackage):
license("GPL-2.0-only")
+ version("5.1.0", sha256="074819acfe8bb2233426a0fef3bb448c5ce817bb14d517252fa05932e28bbd0e")
version("4.2.4", sha256="7b35168cf5b68f6f52dd533a1b345ec87e09d1a85ca68e8dc5377cdf95718567")
version("4.2.0", sha256="5bb3fe94819fe2cce7865f07a6e6ea5c59d3996f78d1c0836ad406f69efb3367")
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@5.0.0:")
depends_on("r-purrr", type=("build", "run"))
depends_on("r-scales", type=("build", "run"))
depends_on("r-stringr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ggvis/package.py b/var/spack/repos/builtin/packages/r-ggvis/package.py
index ac8864a19c..75ead306ea 100644
--- a/var/spack/repos/builtin/packages/r-ggvis/package.py
+++ b/var/spack/repos/builtin/packages/r-ggvis/package.py
@@ -17,6 +17,7 @@ class RGgvis(RPackage):
license("GPL-2.0-only OR custom")
+ version("0.4.9", sha256="69b9d184789c90aedd2f336d43033a8b710a16b052580bf9e7ce229ac25ba12f")
version("0.4.8", sha256="3d5480a0b97a57c26b595785f826b13d7695dab1f1dd8fcf5d7964fa8546a26a")
version("0.4.7", sha256="9e6b067e11d497c796d42156570e2481afb554c5db265f42afbb74d2ae0865e3")
version("0.4.4", sha256="1332ea122b768688c8a407a483be80febc4576de0ec8929077738421b27cafaf")
diff --git a/var/spack/repos/builtin/packages/r-gh/package.py b/var/spack/repos/builtin/packages/r-gh/package.py
index e20962e593..7be200eaee 100644
--- a/var/spack/repos/builtin/packages/r-gh/package.py
+++ b/var/spack/repos/builtin/packages/r-gh/package.py
@@ -15,6 +15,7 @@ class RGh(RPackage):
license("MIT")
+ version("1.4.1", sha256="76bd3f2a31eeaf76a633362899a20b0f7e8fb6159d4777baf3da2a47854292af")
version("1.4.0", sha256="68c69fcd18429b378e639a09652465a4e92b7b5b5704804d0c5b1ca2b9b58b71")
version("1.3.1", sha256="fbaea2abdeceb03d28839fd0e58c2eea01092f9ef92dcc044718ef0d298612ef")
version("1.3.0", sha256="a44039054e8ca56496f2d9c7a10cdadf4a7383bc91086e768ba7e7f1fbcaed1c")
@@ -23,13 +24,16 @@ class RGh(RPackage):
version("1.0.1", sha256="f3c02b16637ae390c3599265852d94b3de3ef585818b260d00e7812595b391d2")
depends_on("r@3.4:", type=("build", "run"), when="@1.3.1:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.4.1:")
depends_on("r-cli", type=("build", "run"), when="@1.1.0:")
depends_on("r-cli@2.0.1:", type=("build", "run"), when="@1.2.0:")
depends_on("r-cli@3.0.1:", type=("build", "run"), when="@1.3.1:")
depends_on("r-gitcreds", type=("build", "run"), when="@1.2.0:")
+ depends_on("r-glue", type=("build", "run"), when="@1.4.1:")
depends_on("r-httr2", type=("build", "run"), when="@1.4.0:")
depends_on("r-ini", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.4.1:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.4.0:")
depends_on("r-httr@1.2:", type=("build", "run"), when="@1.1.0:1.3.1")
diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py
index a6718ceec1..3586585e51 100644
--- a/var/spack/repos/builtin/packages/r-git2r/package.py
+++ b/var/spack/repos/builtin/packages/r-git2r/package.py
@@ -17,6 +17,7 @@ class RGit2r(RPackage):
license("GPL-2.0-only")
+ version("0.33.0", sha256="1855b68d0e22566f1c255fdcb8e13282a2bebf55cbc804a8591dc8047f0e1895")
version("0.32.0", sha256="1b5d254c0c684a56751d26d482823d0006964eb1f55c558f365d037f5e984671")
version("0.31.0", sha256="f1db9278fa4604600a64beaedcf86dda595d7c8a10cdb1f7300a6635e73cd66d")
version("0.30.1", sha256="85d913ddc7659e32c1b98ebc247fa1cc1b7717a5bd413fa78ea84696986ca840")
@@ -30,6 +31,7 @@ class RGit2r(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@0.31.0:")
+ depends_on("r@4.0:", type=("build", "run"), when="@0.33.0:")
depends_on("libgit2")
depends_on("zlib-api")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/r-glmgampoi/package.py b/var/spack/repos/builtin/packages/r-glmgampoi/package.py
index 186701a6f0..ffe7569bfd 100644
--- a/var/spack/repos/builtin/packages/r-glmgampoi/package.py
+++ b/var/spack/repos/builtin/packages/r-glmgampoi/package.py
@@ -20,6 +20,8 @@ class RGlmgampoi(RPackage):
version("1.10.0", commit="048e17384209fc07031e09875ec6eea35e90ef46")
version("1.8.0", commit="b723d61e05c1ad50a3cf6a6393ec3d97adc7edb4")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-delayedmatrixstats", type=("build", "run"))
depends_on("r-matrixstats", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-glmnet/package.py b/var/spack/repos/builtin/packages/r-glmnet/package.py
index 1f613f021a..31e9bf0499 100644
--- a/var/spack/repos/builtin/packages/r-glmnet/package.py
+++ b/var/spack/repos/builtin/packages/r-glmnet/package.py
@@ -20,6 +20,7 @@ class RGlmnet(RPackage):
license("GPL-2.0-only")
+ version("4.1-8", sha256="1ddbe5ce07076d1bdf58b0202ebd0ceac8eeb4796c5175681adb9e58c30ddcfe")
version("4.1-7", sha256="b3a0b606d99df0256eb68e6ebd271e071b246900a4379641af2e7d548c70eaa8")
version("4.1-4", sha256="f6b0f70a0b3d81ff91c2b94f795a2a32e90dd458270f1a29e49e085dd65000f9")
version("4.1-3", sha256="64bc35aa40b6e580cfb8a21e649eb103e996e8747a10c476b8bb9545c846325a")
diff --git a/var/spack/repos/builtin/packages/r-globals/package.py b/var/spack/repos/builtin/packages/r-globals/package.py
index 954094aeca..c9c1cca547 100644
--- a/var/spack/repos/builtin/packages/r-globals/package.py
+++ b/var/spack/repos/builtin/packages/r-globals/package.py
@@ -19,6 +19,7 @@ class RGlobals(RPackage):
license("LGPL-2.1-or-later")
+ version("0.16.3", sha256="d73ced94248d8b81d29d774bdfc41496274d7da683a5d84440aed6a501a18c5b")
version("0.16.2", sha256="682c26a95fa6c4e76a3a875be1a3192fc5b88e036c80dfa3b256add0336d770a")
version("0.16.1", sha256="f7f63a575a3dd518c6afeabb4116bd26692a2a250df113059bc1a5b4711a1e95")
version("0.15.0", sha256="f83689a420590b0d62b049c40a944c1c8c7202b3f1cc12102712c63104e99496")
diff --git a/var/spack/repos/builtin/packages/r-glue/package.py b/var/spack/repos/builtin/packages/r-glue/package.py
index a52dfa812f..e31323deda 100644
--- a/var/spack/repos/builtin/packages/r-glue/package.py
+++ b/var/spack/repos/builtin/packages/r-glue/package.py
@@ -19,6 +19,7 @@ class RGlue(RPackage):
license("MIT")
+ version("1.7.0", sha256="1af51b51f52c1aeb3bfe9349f55896dd78b5542ffdd5654e432e4d646e4a86dc")
version("1.6.2", sha256="9da518f12be584c90e75fe8e07f711ee3f6fc0d03d817f72c25dc0f66499fdbf")
version("1.6.1", sha256="318c2f9544f1204216009f512793c44d6bbe178ff2012f56fa5ffb5e1da978db")
version("1.6.0", sha256="77bef37ef2c47aad6188ea772880591c5763cce4b1c256e10e68e7c3ec6b4338")
@@ -32,3 +33,4 @@ class RGlue(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@1.4.2:")
depends_on("r@3.4:", type=("build", "run"), when="@1.6.0:")
+ depends_on("r@3.6:", when="@1.7.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gmodels/package.py b/var/spack/repos/builtin/packages/r-gmodels/package.py
index f43e4c2660..7f1cf3a5fa 100644
--- a/var/spack/repos/builtin/packages/r-gmodels/package.py
+++ b/var/spack/repos/builtin/packages/r-gmodels/package.py
@@ -13,6 +13,7 @@ class RGmodels(RPackage):
license("GPL-2.0-only")
+ version("2.19.1", sha256="bb57b83274dcc6c62eeb0d0b041d81ed19daca927bcd3872c4667ccfe3e9888d")
version("2.18.1.1", sha256="da7d48021b7cd2fd8a7cd8d0bb9658b12342a32698a13877b25ca94aa03f1e95")
version("2.18.1", sha256="626140a34eb8c53dd0a06511a76c71bc61c48777fa76fcc5e6934c9c276a1369")
version("2.16.2", sha256="ab018894bdb376c5bd6bc4fbc4fe6e86590f4106795a586ef196fbb6699ec47d")
diff --git a/var/spack/repos/builtin/packages/r-gmp/package.py b/var/spack/repos/builtin/packages/r-gmp/package.py
index 85d4797c3a..615fba4dd2 100644
--- a/var/spack/repos/builtin/packages/r-gmp/package.py
+++ b/var/spack/repos/builtin/packages/r-gmp/package.py
@@ -17,6 +17,7 @@ class RGmp(RPackage):
license("GPL-2.0-or-later")
+ version("0.7-4", sha256="a7d6b40f77d2619c11db5170b8f47336f7c5fa1db7eed0ac9d8a432e41053919")
version("0.7-1", sha256="a6873dc65218905cb7615cb8e2522258f3740e29c0632473d58a1cb409835db6")
version("0.6-7", sha256="6333fe691f267aa29f8078f7f738dda50c496f660357276fd33e28d607363f85")
version("0.6-6", sha256="87fa95a8084855d2137b3863b6b8f3c277280dbe3a6a230e359cf32c3bed2793")
diff --git a/var/spack/repos/builtin/packages/r-goftest/package.py b/var/spack/repos/builtin/packages/r-goftest/package.py
index 9516bd7f12..c78dc78470 100644
--- a/var/spack/repos/builtin/packages/r-goftest/package.py
+++ b/var/spack/repos/builtin/packages/r-goftest/package.py
@@ -19,4 +19,6 @@ class RGoftest(RPackage):
version("1.2-3", sha256="3a5f74b6ae7ece5b294781ae57782abe12375d61789c55ff5e92e4aacf347f19")
version("1.2-2", sha256="e497992666b002b6c6bed73bf05047ad7aa69eb58898da0ad8f1f5b2219e7647")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gofuncr/package.py b/var/spack/repos/builtin/packages/r-gofuncr/package.py
index 4f402c2066..58f5b7fc05 100644
--- a/var/spack/repos/builtin/packages/r-gofuncr/package.py
+++ b/var/spack/repos/builtin/packages/r-gofuncr/package.py
@@ -37,6 +37,9 @@ class RGofuncr(RPackage):
version("1.2.0", commit="140a3cea4fe34d32fef9be756f85e337ce3deded")
version("1.0.0", commit="becd4ddde085c5477042adb856e7a4f40dbd648e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r+X", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"))
depends_on("r-vioplot@0.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-googleauthr/package.py b/var/spack/repos/builtin/packages/r-googleauthr/package.py
index 81e0152f89..6e7953fb88 100644
--- a/var/spack/repos/builtin/packages/r-googleauthr/package.py
+++ b/var/spack/repos/builtin/packages/r-googleauthr/package.py
@@ -15,6 +15,7 @@ class RGoogleauthr(RPackage):
cran = "googleAuthR"
+ version("2.0.2", sha256="fd55c85b5f78aa52b6e5cabd4143162cb497ab7288c8db3676acf58a0f393996")
version("2.0.1", sha256="9b19a63bc250151674f20b27389baa95c10cc62dc7c3c0ff12a8d684bdb8a14b")
version("2.0.0", sha256="ba504baf3bde2e1b3e988bee7602df5765cc6ca542cf0ab76a782c4e60966feb")
diff --git a/var/spack/repos/builtin/packages/r-googledrive/package.py b/var/spack/repos/builtin/packages/r-googledrive/package.py
index 9f39117c08..c9e45bb0cf 100644
--- a/var/spack/repos/builtin/packages/r-googledrive/package.py
+++ b/var/spack/repos/builtin/packages/r-googledrive/package.py
@@ -15,20 +15,24 @@ class RGoogledrive(RPackage):
license("MIT")
+ version("2.1.1", sha256="0b8b4f74ba3630b0347249a32a80bc5fc2e8b63ad2952702f30162bd2d38fb82")
version("2.1.0", sha256="0d70353bbf1bebc96d3987ebd9cbb2b0902e6ddc4cdccece3d07c2bb688c4b74")
version("2.0.0", sha256="605c469a6a086ef4b049909c2e20a35411c165ce7ce4f62d68fd39ffed8c5a26")
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@2.1.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@2.1.1:")
depends_on("r-cli@3.0.0:", type=("build", "run"))
depends_on("r-gargle@1.2.0:", type=("build", "run"))
depends_on("r-gargle@1.3.0:", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-gargle@1.5.0:", type=("build", "run"), when="@2.1.1:")
depends_on("r-glue@1.4.2:", type=("build", "run"))
depends_on("r-httr", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-lifecycle", type=("build", "run"))
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-pillar", type=("build", "run"))
+ depends_on("r-pillar@1.9.0:", type=("build", "run"), when="@2.1.1:")
depends_on("r-purrr@0.2.3:", type=("build", "run"))
depends_on("r-purrr@1.0.1:", type=("build", "run"), when="@2.1.0:")
depends_on("r-rlang@0.4.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-googlesheets4/package.py b/var/spack/repos/builtin/packages/r-googlesheets4/package.py
index f613964731..0a1afe0dc2 100644
--- a/var/spack/repos/builtin/packages/r-googlesheets4/package.py
+++ b/var/spack/repos/builtin/packages/r-googlesheets4/package.py
@@ -21,6 +21,7 @@ class RGooglesheets4(RPackage):
license("MIT")
+ version("1.1.1", sha256="c5cc63348c54b9de8492e7b12b249245746ea1ff33e306f12431f4fc9386fccf")
version("1.1.0", sha256="50e15543bef5b8d8cda36f6ea8a1d59b256d889cd3cedddc91f00ae30c8c8ec9")
version("1.0.1", sha256="284ecbce98944093cb065c1b0b32074eae7b45fd74b87d7815c7ca6deca76591")
version("1.0.0", sha256="0a107d76aac99d6db48d97ce55810c1412b2197f457b8476f676169a36c7cc7a")
@@ -28,12 +29,13 @@ class RGooglesheets4(RPackage):
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.0.1:")
depends_on("r@3.5:", type=("build", "run"), when="@1.1.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.1.1:")
depends_on("r-cellranger", type=("build", "run"))
depends_on("r-cli@3.0.0:", type=("build", "run"))
depends_on("r-curl", type=("build", "run"))
- depends_on("r-gargle@1.2.0", type=("build", "run"))
- depends_on("r-gargle@1.2.0:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r-gargle@1.2.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-gargle@1.3.0:", type=("build", "run"), when="@1.1.0:")
+ depends_on("r-gargle@1.5.0:", type=("build", "run"), when="@1.1.1:")
depends_on("r-glue@1.3.0:", type=("build", "run"))
depends_on("r-googledrive@2.0.0:", type=("build", "run"))
depends_on("r-googledrive@2.1.0:", type=("build", "run"), when="@1.1.0:")
diff --git a/var/spack/repos/builtin/packages/r-googlevis/package.py b/var/spack/repos/builtin/packages/r-googlevis/package.py
index 8200e7c0d6..93a6e5b93d 100644
--- a/var/spack/repos/builtin/packages/r-googlevis/package.py
+++ b/var/spack/repos/builtin/packages/r-googlevis/package.py
@@ -19,6 +19,7 @@ class RGooglevis(RPackage):
license("CC-BY-SA-4.0")
+ version("0.7.3", sha256="5647ff552de5216b56ae758f29e411d04b754f482adbd3f41277d741b7708c6b")
version("0.7.1", sha256="335931059ea8645f824b01a06d30fafb4e38b47cd610a5eee20628801767f218")
version("0.7.0", sha256="5f1636024e678f9973e3ce605b46f46ea9cdffd58b98e315b495e66f34eb02e9")
version("0.6.11", sha256="f8c90b6c51da7bf184bff6762d98fc24faba1b634724ecdb987161ee10987b97")
diff --git a/var/spack/repos/builtin/packages/r-gosemsim/package.py b/var/spack/repos/builtin/packages/r-gosemsim/package.py
index 9e81019131..4153891ce4 100644
--- a/var/spack/repos/builtin/packages/r-gosemsim/package.py
+++ b/var/spack/repos/builtin/packages/r-gosemsim/package.py
@@ -30,6 +30,8 @@ class RGosemsim(RPackage):
version("2.4.1", commit="0656e845860d14e054670ffc246a1c53f699299c")
version("2.2.0", commit="247434790e6c8cf99e5643f569390362b8c87c52")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.2:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@2.8.0:")
depends_on("r@3.5.0:", type=("build", "run"), when="@2.16.1:")
diff --git a/var/spack/repos/builtin/packages/r-gower/package.py b/var/spack/repos/builtin/packages/r-gower/package.py
index 2f6f7156d6..ffc86a9be7 100644
--- a/var/spack/repos/builtin/packages/r-gower/package.py
+++ b/var/spack/repos/builtin/packages/r-gower/package.py
@@ -21,3 +21,5 @@ class RGower(RPackage):
version("1.0.0", sha256="671cb7baafe05140d822e8f26f9cd3576fc3bf4c6572b7223fb54da754ea385d")
version("0.2.2", sha256="3f022010199fafe34f6e7431730642a76893e6b4249b84e5a61012cb83483631")
version("0.2.1", sha256="af3fbe91cf818c0841b2c0ec4ddf282c182a588031228c8d88f7291b2cdff100")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-gparotation/package.py b/var/spack/repos/builtin/packages/r-gparotation/package.py
index d1a4861746..20c35487d6 100644
--- a/var/spack/repos/builtin/packages/r-gparotation/package.py
+++ b/var/spack/repos/builtin/packages/r-gparotation/package.py
@@ -14,6 +14,7 @@ class RGparotation(RPackage):
cran = "GPArotation"
+ version("2024.3-1", sha256="88f657af29789591d581e0c529fd50ef1307abfb33e0403209bd3e591e2654da")
version("2023.3-1", sha256="8748086c3d45286b7c9a81f0f8e58df75a09ba555d48a6eb8cd94af0c7c92a26")
version("2022.10-2", sha256="04f72d8f3a9c204df5df904be563ec272a8437a707daee8823b2a690dde21917")
version("2022.4-1", sha256="231e7edcdcc091fbecfb4f2e88d1a4344967cf7ea58074b385a4b8b48d9da224")
diff --git a/var/spack/repos/builtin/packages/r-gplots/package.py b/var/spack/repos/builtin/packages/r-gplots/package.py
index bde5c06bef..f56d39a453 100644
--- a/var/spack/repos/builtin/packages/r-gplots/package.py
+++ b/var/spack/repos/builtin/packages/r-gplots/package.py
@@ -34,6 +34,7 @@ class RGplots(RPackage):
license("GPL-2.0-only")
+ version("3.1.3.1", sha256="1ae1de94f27583ad84543a15f042b8dbd0850c56447929c7157787d755211af2")
version("3.1.3", sha256="9f853b9e205264d087e61e8825f797ce36c9eb585b187dab794563613a526716")
version("3.1.1", sha256="f9ae19c2574b6d41adbeccaf7bc66cf56d7b2769004daba7e0038d5fbd821339")
version("3.0.1.1", sha256="7db103f903a25d174cddcdfc7b946039b61e236c95084b90ad17f1a41da3770c")
diff --git a/var/spack/repos/builtin/packages/r-graph/package.py b/var/spack/repos/builtin/packages/r-graph/package.py
index e3fe8eeb7e..54014bac7a 100644
--- a/var/spack/repos/builtin/packages/r-graph/package.py
+++ b/var/spack/repos/builtin/packages/r-graph/package.py
@@ -24,5 +24,7 @@ class RGraph(RPackage):
version("1.56.0", commit="c4abe227dac525757679743e6fb4f49baa34acad")
version("1.54.0", commit="2a8b08520096241620421078fc1098f4569c7301")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-biocgenerics@0.13.11:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-graphlayouts/package.py b/var/spack/repos/builtin/packages/r-graphlayouts/package.py
index 7a0aadaed5..57e5a06145 100644
--- a/var/spack/repos/builtin/packages/r-graphlayouts/package.py
+++ b/var/spack/repos/builtin/packages/r-graphlayouts/package.py
@@ -19,6 +19,7 @@ class RGraphlayouts(RPackage):
license("MIT")
+ version("1.1.1", sha256="7bc2459a02b1339ac01184a76687a3e50de5680f4699b5966a3f2e6a882f3801")
version("0.8.4", sha256="778d8f7e190b05d0dbbaa7e6dbdfc0b8fef3c83b71333a6fa89926e6c04690fd")
version("0.8.3", sha256="f9e4e5d794b4d1c6eba962490b3220d09b73e10893f5fa3be210240bfc654421")
version("0.8.2", sha256="0fa2777a2c159f3ef1209cd96838d2651d144c9c971abfef1d22bc6376f47bec")
diff --git a/var/spack/repos/builtin/packages/r-grbase/package.py b/var/spack/repos/builtin/packages/r-grbase/package.py
index ce963aa539..d304465f2f 100644
--- a/var/spack/repos/builtin/packages/r-grbase/package.py
+++ b/var/spack/repos/builtin/packages/r-grbase/package.py
@@ -26,6 +26,7 @@ class RGrbase(RPackage):
cran = "gRbase"
+ version("2.0.2", sha256="36720e49b82e360166386c9b3bf17838aeb6d9b921e7e01d48f8a115f9a02e97")
version("1.8.9", sha256="dacab442d896e4593c6196e8446b75c4144a1c4ebc3f039dc624516038193d7e")
version("1.8.8", sha256="fdd5d1ca8adb74e8bd2b210c9a652a10e60a90b40450cd8a295b06af41acf9db")
version("1.8.7", sha256="01d77e1b029ac22b4e13f07384285f363733a42aba842eddfc5e1aceea99f808")
@@ -35,13 +36,15 @@ class RGrbase(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r@3.0.2:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@1.8-6.7:")
- depends_on("r-biocmanager", type=("build", "run"), when="@1.8.7:")
- depends_on("r-graph", type=("build", "run"))
- depends_on("r-rbgl", type=("build", "run"))
- depends_on("r-rgraphviz", type=("build", "run"), when="@1.8-6.7:")
+ depends_on("r@4.2.0:", type=("build", "run"), when="@2.0.2:")
depends_on("r-igraph", type=("build", "run"))
- depends_on("r-magrittr", type=("build", "run"))
+ depends_on("r-magrittr", type=("build", "run"), when="@:2.0.1")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rcpp@0.11.1:", type=("build", "run"))
depends_on("r-rcppeigen", type=("build", "run"))
depends_on("r-rcpparmadillo", type=("build", "run"))
+
+ depends_on("r-biocmanager", type=("build", "run"), when="@1.8.7:1.9")
+ depends_on("r-graph", type=("build", "run"), when="@:1.9")
+ depends_on("r-rbgl", type=("build", "run"), when="@:1.9")
+ depends_on("r-rgraphviz", type=("build", "run"), when="@1.8-6.7:1.9")
diff --git a/var/spack/repos/builtin/packages/r-gsa/package.py b/var/spack/repos/builtin/packages/r-gsa/package.py
index 71c0da0a61..cb18bcb178 100644
--- a/var/spack/repos/builtin/packages/r-gsa/package.py
+++ b/var/spack/repos/builtin/packages/r-gsa/package.py
@@ -11,5 +11,6 @@ class RGsa(RPackage):
cran = "GSA"
+ version("1.03.3", sha256="5459786190f40339addc45e7bb58c6a983548aa8feac7277ea7ec0662c5a282c")
version("1.03.2", sha256="177d6059fc645d3d8883806d2dea1c5dfc68efdada9aadde8a96b6d57acf35b8")
version("1.03.1", sha256="e192d4383f53680dbd556223ea5f8cad6bae62a80a337ba5fd8d05a8aee6a917")
diff --git a/var/spack/repos/builtin/packages/r-gsl/package.py b/var/spack/repos/builtin/packages/r-gsl/package.py
index 726445818c..5bcf3a7d14 100644
--- a/var/spack/repos/builtin/packages/r-gsl/package.py
+++ b/var/spack/repos/builtin/packages/r-gsl/package.py
@@ -20,6 +20,8 @@ class RGsl(RPackage):
version("2.1-7.1", sha256="ee98d1382d37ffa77538a90ccdbf44affbf1710a9e66b8ada73fa72e67921985")
version("2.1-6", sha256="f5d463239693f146617018987687db31b163653708cbae0b730b9b7bed81995c")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@2.1-8:")
depends_on("gsl@2.1:")
diff --git a/var/spack/repos/builtin/packages/r-gsodr/package.py b/var/spack/repos/builtin/packages/r-gsodr/package.py
index da64fb0953..128bd3219c 100644
--- a/var/spack/repos/builtin/packages/r-gsodr/package.py
+++ b/var/spack/repos/builtin/packages/r-gsodr/package.py
@@ -31,6 +31,7 @@ class RGsodr(RPackage):
license("MIT")
+ version("4.1.1", sha256="d5bf80244b5562206f459cb0ed588c11f8edf4eb2a26e2715be7938ec6be92e0")
version("3.1.8", sha256="f43668b14be30632086b832be83c74fa7c25e123fbce0d0203e992a0c11e7c8d")
version("3.1.6", sha256="fbeac54e86fba1e4415b41608ca59cf50be1b421cc890eb5c5b0d6d1c9229f6a")
version("3.1.5", sha256="37682141707d7e29fab653ccdeb154fea2c085080f686b33f1a54140608e824d")
@@ -43,7 +44,7 @@ class RGsodr(RPackage):
depends_on("r-curl", type=("build", "run"))
depends_on("r-data-table@1.11.6:", type=("build", "run"), when="@:2.1.2")
depends_on("r-data-table", type=("build", "run"))
- depends_on("r-httr", type=("build", "run"))
depends_on("r-r-utils", type=("build", "run"))
+ depends_on("r-httr", type=("build", "run"), when="@:3.1.8")
depends_on("r-future-apply", type=("build", "run"), when="@:2.1.2")
diff --git a/var/spack/repos/builtin/packages/r-gss/package.py b/var/spack/repos/builtin/packages/r-gss/package.py
index 6cc95a075d..22b0201305 100644
--- a/var/spack/repos/builtin/packages/r-gss/package.py
+++ b/var/spack/repos/builtin/packages/r-gss/package.py
@@ -16,6 +16,7 @@ class RGss(RPackage):
license("GPL-2.0-or-later")
+ version("2.2-7", sha256="3b13144702c570c83462b4ea2ad17f4bd630cff5bf2ab0347a33c7e86a4f3f6a")
version("2.2-4", sha256="953e89dfe3bee9cac51df3e5325bf4d1496ad76e4393706c4efdb1834c0c7441")
version("2.2-3", sha256="24306401cf4e5869f8a690eca7e17c044ece83edd66969bd2daf5976272d244b")
version("2.2-2", sha256="1da4da894378ee730cff9628e8b4d2a0d7dfa344b94e5bce6953e66723c21fe4")
diff --git a/var/spack/repos/builtin/packages/r-gstat/package.py b/var/spack/repos/builtin/packages/r-gstat/package.py
index a747cab40f..b214c37f00 100644
--- a/var/spack/repos/builtin/packages/r-gstat/package.py
+++ b/var/spack/repos/builtin/packages/r-gstat/package.py
@@ -26,6 +26,8 @@ class RGstat(RPackage):
version("2.0-6", sha256="6711e68aa2444cf2927879a03a976d8caeca5eac98d806b19a6a7178b90bfcab")
version("2.0-3", sha256="20a93fe6bf89221a5888de273bddf9a98187806d507cd3cd6297c2b13e7acce1")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
depends_on("r-sp@0.9-72:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-gtable/package.py b/var/spack/repos/builtin/packages/r-gtable/package.py
index 1e05bf47a5..eb6c091d62 100644
--- a/var/spack/repos/builtin/packages/r-gtable/package.py
+++ b/var/spack/repos/builtin/packages/r-gtable/package.py
@@ -19,6 +19,7 @@ class RGtable(RPackage):
license("MIT")
+ version("0.3.5", sha256="b19fc1a30359945adbab7d4e915fe95523a839c380e34ae705d70b7ebddeea72")
version("0.3.3", sha256="2f9a58d978e2a487b7fd8841539ea33cf948e55ddf6f7a9bd2dd3362600a7b3a")
version("0.3.1", sha256="8bd62c5722d5188914d667cabab12991c555f657f4f5ce7b547571ae3aec7cb5")
version("0.3.0", sha256="fd386cc4610b1cc7627dac34dba8367f7efe114b968503027fb2e1265c67d6d3")
diff --git a/var/spack/repos/builtin/packages/r-gtools/package.py b/var/spack/repos/builtin/packages/r-gtools/package.py
index 2a6d23fc12..9cff33ad4e 100644
--- a/var/spack/repos/builtin/packages/r-gtools/package.py
+++ b/var/spack/repos/builtin/packages/r-gtools/package.py
@@ -45,6 +45,7 @@ class RGtools(RPackage):
license("GPL-2.0-only")
+ version("3.9.5", sha256="dee9b6c1152db1a5dc427d074b32bbbb738708683f17a95e0e95e4d79fdf174b")
version("3.9.4", sha256="59cf8b194fe98b1cc05dbb4d686810a1068f59d8b402b731548a898ece85f111")
version("3.9.3", sha256="7afb53277b382d5752f4597ae433f3c0addf5e8eb24d01a9562faf2a01e33133")
version("3.9.2.1", sha256="ec5febad7bb33812684b39679b0bce8a668361b87714f7388546e0f4ac02af5f")
diff --git a/var/spack/repos/builtin/packages/r-gwmodel/package.py b/var/spack/repos/builtin/packages/r-gwmodel/package.py
index 4a83437510..74c48ee274 100644
--- a/var/spack/repos/builtin/packages/r-gwmodel/package.py
+++ b/var/spack/repos/builtin/packages/r-gwmodel/package.py
@@ -24,6 +24,7 @@ class RGwmodel(RPackage):
cran = "GWmodel"
+ version("2.3-3", sha256="5f69d000d7ffba491f1dafbad5ec0b5fcbbdb28831092252a8b409163d6ad33c")
version("2.2-9", sha256="3696e0f24994df4f393dbcb2e74bc0808704b80e1203247be3911fc3bcdb5f18")
version("2.2-8", sha256="5b1890dbf75502e89b651efd9158be77b3cfa764a5717f9889f438ed2b0a4da2")
version("2.2-2", sha256="4e2b221b85fbc828ffc4f057c137ded849afcaac2a75c27d2d6d0a6db17f8a06")
@@ -32,14 +33,18 @@ class RGwmodel(RPackage):
version("2.0-9", sha256="b479af2c19d4aec30f1883d00193d52e342c609c1badcb51cc0344e4404cffa7")
depends_on("r@3.0.0:", type=("build", "run"))
- depends_on("r-maptools@0.5-2:", type=("build", "run"))
depends_on("r-robustbase", type=("build", "run"))
+ depends_on("r-sf", type=("build", "run"), when="@2.3-1:")
depends_on("r-sp", type=("build", "run"))
- depends_on("r-sp@1.4-0:", type=("build", "run"), when="@2.2-2:")
- depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-sp@1.4-0.1:", type=("build", "run"), when="@2.2-0:")
depends_on("r-spatialreg", type=("build", "run"))
depends_on("r-spacetime", type=("build", "run"))
depends_on("r-spdep", type=("build", "run"))
depends_on("r-fnn", type=("build", "run"), when="@2.1-1:")
+ depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-rcpp@1.0.12:", type=("build", "run"), when="@2.3-3:")
depends_on("r-rcpparmadillo", type=("build", "run"))
+ depends_on("r-rcppeigen", type=("build", "run"), when="@2.3-3:")
depends_on("gmake", type="build")
+
+ depends_on("r-maptools@0.5-2:", type=("build", "run"), when="@:2.2")
diff --git a/var/spack/repos/builtin/packages/r-hardhat/package.py b/var/spack/repos/builtin/packages/r-hardhat/package.py
index 88330864e7..9966baaf3e 100644
--- a/var/spack/repos/builtin/packages/r-hardhat/package.py
+++ b/var/spack/repos/builtin/packages/r-hardhat/package.py
@@ -21,6 +21,7 @@ class RHardhat(RPackage):
license("MIT")
+ version("1.4.0", sha256="46d023ddfc8f940cd889478fa91c42e894a0df58a10f3b6c0eb688a500b2b3ad")
version("1.3.0", sha256="fe9ff009e2ba6dd4d70cbb541430f88d85c0a28d6a1c2772e4910c79b81fe82e")
version("1.2.0", sha256="f9320eccb1b5f624a46fa074e3ccc202c383b77098ecd08b193aeb47daedad78")
version("1.0.0", sha256="2740dc243a440e7d32370a78f9258255faea6d900075901cf6009c651769e7bd")
diff --git a/var/spack/repos/builtin/packages/r-haven/package.py b/var/spack/repos/builtin/packages/r-haven/package.py
index e034e646c5..8bd719fa2b 100644
--- a/var/spack/repos/builtin/packages/r-haven/package.py
+++ b/var/spack/repos/builtin/packages/r-haven/package.py
@@ -16,6 +16,8 @@ class RHaven(RPackage):
license("MIT")
+ version("2.5.4", sha256="9e1531bb37aa474abd91db5e0ed9e3a355c03faa65f4e653b3ea68b7c61ea835")
+ version("2.5.3", sha256="9a5999afad09f0cf80515241b2ff19a0c480658c4bd3810638ad52762e04b7e3")
version("2.5.2", sha256="2131fb0377ae1beffae54bf4beb8b3a876e9b6b9841a5acc39a2a2615023561d")
version("2.5.1", sha256="9f40462097a0b1cf3831bca493851fe4a6b3570d957a775ca81940f241c50a70")
version("2.5.0", sha256="b580311bc1b28efc6b123e29a331282b9f7eb552c485f4e5cacab39fe534aff4")
@@ -25,9 +27,13 @@ class RHaven(RPackage):
version("2.1.0", sha256="c0a1cf1b039549fb3ad833f9644ed3f142790236ad755d2ee7bd3d8109e3ae74")
version("1.1.0", sha256="089fb4d0955f320abc48d0a3031799f96f3a20b82492474743903fdf12001d19")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@2.1.1:")
depends_on("r@3.4:", type=("build", "run"), when="@2.5.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@2.5.4:")
depends_on("r-cli@3.0.0:", type=("build", "run"), when="@2.5.0:")
depends_on("r-forcats@0.2.0:", type=("build", "run"))
depends_on("r-hms", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hdf5array/package.py b/var/spack/repos/builtin/packages/r-hdf5array/package.py
index a8b419a351..97a95e286d 100644
--- a/var/spack/repos/builtin/packages/r-hdf5array/package.py
+++ b/var/spack/repos/builtin/packages/r-hdf5array/package.py
@@ -32,6 +32,8 @@ class RHdf5array(RPackage):
version("1.6.0", commit="95f2f8d3648143abe9dc77c76340c5edf4114c82")
version("1.4.8", commit="79ab96d123c8da8f8ead81f678fe714c0958ff45")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.4:", type=("build", "run"))
depends_on("r-delayedarray@0.2.4:", type=("build", "run"))
depends_on("r-delayedarray@0.3.18:", type=("build", "run"), when="@1.6.0:")
diff --git a/var/spack/repos/builtin/packages/r-hdf5r/package.py b/var/spack/repos/builtin/packages/r-hdf5r/package.py
index 259c32003b..257fb41bb7 100644
--- a/var/spack/repos/builtin/packages/r-hdf5r/package.py
+++ b/var/spack/repos/builtin/packages/r-hdf5r/package.py
@@ -20,6 +20,7 @@ class RHdf5r(RPackage):
license("Apache-2.0 OR custom")
+ version("1.3.11", sha256="9795d667bc72acfabece1e3ece1aa4e60e8194cb4eb8b46985efccd19a55a8c4")
version("1.3.8", sha256="b53281e2cf57447965849748e972de2f7fe8df0cee3538ef5813c33c7ed2302b")
version("1.3.7", sha256="6e8a02843ed1c970cb41f97e2acee34853d3b70ce617bc9bcff07c41b98f295b")
version("1.3.5", sha256="87b75173ab226a9fbaa5b28289349f3c56b638629560a172994b8f9323c1622f")
diff --git a/var/spack/repos/builtin/packages/r-hdrcde/package.py b/var/spack/repos/builtin/packages/r-hdrcde/package.py
index 4ff2c07428..d4207c9e1a 100644
--- a/var/spack/repos/builtin/packages/r-hdrcde/package.py
+++ b/var/spack/repos/builtin/packages/r-hdrcde/package.py
@@ -20,6 +20,9 @@ class RHdrcde(RPackage):
version("3.4", sha256="4341c6a021da46dcae3b1ef6d580e84dcf625c2b2139f537d0c26ec90899149b")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.15:", type=("build", "run"))
depends_on("r-locfit", type=("build", "run"))
depends_on("r-ash", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hexbin/package.py b/var/spack/repos/builtin/packages/r-hexbin/package.py
index 3324d1b2e0..b0272f450e 100644
--- a/var/spack/repos/builtin/packages/r-hexbin/package.py
+++ b/var/spack/repos/builtin/packages/r-hexbin/package.py
@@ -23,5 +23,8 @@ class RHexbin(RPackage):
version("1.27.2", sha256="46d47b1efef75d6f126af686a4dd614228b60418b9a5bde9e9e5d11200a0ee52")
version("1.27.1", sha256="075935a3ae2d90e44aca6ebbd368dc6f7e59d322e36e0e0932dedbf01330ad08")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.0.1:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hh/package.py b/var/spack/repos/builtin/packages/r-hh/package.py
index da38dfed21..9f8fc014c5 100644
--- a/var/spack/repos/builtin/packages/r-hh/package.py
+++ b/var/spack/repos/builtin/packages/r-hh/package.py
@@ -25,6 +25,7 @@ class RHh(RPackage):
cran = "HH"
+ version("3.1-52", sha256="d5495e18df65de613d9bdc43729ca2ac27746b15b90c06502b2ee5e2458d0383")
version("3.1-49", sha256="12cef0cb0a07c745026d925aee2970913e1f3f0705a58bc2741bf4940c80b87b")
version("3.1-47", sha256="50910ac7de49122df56c6e42413535601c74bbef9240ad8977e3267273d087c0")
version("3.1-43", sha256="2ed35c8fc97092e9d2ce3439a2ec342d5d7bd93ad8f5266995cc80d88cd2235b")
diff --git a/var/spack/repos/builtin/packages/r-highr/package.py b/var/spack/repos/builtin/packages/r-highr/package.py
index 7452077ba8..ea8d5febbd 100644
--- a/var/spack/repos/builtin/packages/r-highr/package.py
+++ b/var/spack/repos/builtin/packages/r-highr/package.py
@@ -17,6 +17,7 @@ class RHighr(RPackage):
license("GPL-2.0-or-later")
+ version("0.11", sha256="e90d14284001963325a84a9dbeef029609d52515da8d65c87ae61be21b7fe0a7")
version("0.10", sha256="ec55bc1ff66390ed66806dc2a7b6c17dbfd089b3d73fe2e369017f8cb4bc347b")
version("0.9", sha256="beff11390d936c90fdcc00e7ed0eb72220f3de403a51b56659e3d3e0b6d8ed4d")
version("0.8", sha256="4bd01fba995f68c947a99bdf9aca15327a5320151e10bd0326fad50a6d8bc657")
diff --git a/var/spack/repos/builtin/packages/r-hmisc/package.py b/var/spack/repos/builtin/packages/r-hmisc/package.py
index 2ea88f61d0..e2dc348b45 100644
--- a/var/spack/repos/builtin/packages/r-hmisc/package.py
+++ b/var/spack/repos/builtin/packages/r-hmisc/package.py
@@ -17,6 +17,7 @@ class RHmisc(RPackage):
cran = "Hmisc"
+ version("5.1-3", sha256="3c61772ff7a78ca5855189faa810c74117dc5df240103adc6e90eb94e9c605eb")
version("5.0-1", sha256="db390f8f8a150cb5cffb812e9609a8e8632ceae0dc198528f190fd670ba8fa59")
version("4.7-1", sha256="325d571a68b2198eabd258a8d86143cac659ffa70e474088a18e9b58ab882e7f")
version("4.7-0", sha256="29ec2d9ca11c790c350e93323126bef4f498c69c41c31bb335fd04671e0f87bd")
@@ -26,6 +27,7 @@ class RHmisc(RPackage):
version("4.2-0", sha256="9e9614673288dd00295f250fa0bf96fc9e9fed692c69bf97691081c1a01411d9")
version("4.1-1", sha256="991db21cdf73ffbf5b0239a4876b2e76fd243ea33528afd88dc968792f281498")
+ depends_on("r@4.1.0:", type=("build", "run"), when="@5.1-2:")
depends_on("r-formula", type=("build", "run"))
depends_on("r-ggplot2@2.2:", type=("build", "run"))
depends_on("r-cluster", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hoardr/package.py b/var/spack/repos/builtin/packages/r-hoardr/package.py
index 1002268151..dfeffebdd9 100644
--- a/var/spack/repos/builtin/packages/r-hoardr/package.py
+++ b/var/spack/repos/builtin/packages/r-hoardr/package.py
@@ -19,6 +19,7 @@ class RHoardr(RPackage):
license("MIT")
+ version("0.5.4", sha256="4e031ac1317584451c09bc8288ed73fb2d6ceea3c10d29dbb4be08157e489a37")
version("0.5.3", sha256="b9e4d1350e1fde7db922e55128306e3768ee46ff9532f05c96543dcae383647c")
version("0.5.2", sha256="819113f0e25da105f120a676b5173872a4144f2f6f354cad14b35f898e76dc54")
diff --git a/var/spack/repos/builtin/packages/r-htmltable/package.py b/var/spack/repos/builtin/packages/r-htmltable/package.py
index e381c8773d..d6fc8d50c5 100644
--- a/var/spack/repos/builtin/packages/r-htmltable/package.py
+++ b/var/spack/repos/builtin/packages/r-htmltable/package.py
@@ -18,6 +18,7 @@ class RHtmltable(RPackage):
cran = "htmlTable"
+ version("2.4.3", sha256="3739d01bff313ccd206b63940a8252b037f0521d041c721a4e0d195abd6ef6dd")
version("2.4.1", sha256="3a7f3e75d886dc398fd1d3cae907b536fff6af3a3d2c18349ef12ec06d310f93")
version("2.4.0", sha256="4ca2b5616d77cfeee8ae5ca74307b86407d478b12d1ce17ba9c447e233b89a9d")
version("2.1.0", sha256="4049339b317cbec1c8c7930e2e36cf0fc8b002516092dd270bb794d8db02f0bf")
@@ -25,6 +26,7 @@ class RHtmltable(RPackage):
version("1.11.2", sha256="64a273b1cdf07a7c57b9031315ca665f95d78e70b4320d020f64a139278877d1")
version("1.9", sha256="5b487a7f33af77db7d987bf61f3ef2ba18bb629fe7b9802409f8b3485c603132")
+ depends_on("r@4.1:", type=("build", "run"), when="@2.4.2:")
depends_on("r-stringr", type=("build", "run"))
depends_on("r-knitr@1.6:", type=("build", "run"))
depends_on("r-magrittr@1.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-htmltools/package.py b/var/spack/repos/builtin/packages/r-htmltools/package.py
index 8af75e17e4..643f2b00c2 100644
--- a/var/spack/repos/builtin/packages/r-htmltools/package.py
+++ b/var/spack/repos/builtin/packages/r-htmltools/package.py
@@ -15,6 +15,7 @@ class RHtmltools(RPackage):
license("GPL-2.0-or-later")
+ version("0.5.8.1", sha256="f9f62293ec06c353c4584db6ccedb06a2da12e485208bd26b856f17dd013f176")
version("0.5.5", sha256="c8b23fab855a89c6ed0f6d6c7cad0ff9c5ae329c0bdb479940443ee752f26659")
version("0.5.3", sha256="2c451b369ea8918358e2b280f548816664fe0143222c609e6bfb1f9cd2f7324f")
version("0.5.2", sha256="7dc7d50436e5a82a5801f85bcd2f572a06a98b4027d71aa17b4854ec9b2767fb")
@@ -26,9 +27,10 @@ class RHtmltools(RPackage):
depends_on("r@2.14.1:", type=("build", "run"))
depends_on("r-digest", type=("build", "run"))
depends_on("r-base64enc", type=("build", "run"), when="@0.5.1:")
- depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@0.5.2:")
depends_on("r-rlang", type=("build", "run"), when="@0.5.1:")
+ depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@0.5.2:")
+ depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@0.5.7:")
depends_on("r-fastmap@1.1.0:", type=("build", "run"), when="@0.5.2:")
- depends_on("r-ellipsis", type=("build", "run"), when="@0.5.5:")
+ depends_on("r-ellipsis", type=("build", "run"), when="@0.5.5:0.5.7")
depends_on("r-rcpp", type=("build", "run"), when="@:0.3.6")
diff --git a/var/spack/repos/builtin/packages/r-htmlwidgets/package.py b/var/spack/repos/builtin/packages/r-htmlwidgets/package.py
index 95e0cbd21c..f7b0a0c38e 100644
--- a/var/spack/repos/builtin/packages/r-htmlwidgets/package.py
+++ b/var/spack/repos/builtin/packages/r-htmlwidgets/package.py
@@ -17,6 +17,7 @@ class RHtmlwidgets(RPackage):
license("MIT")
+ version("1.6.4", sha256="7cb08f0b30485dac26f72e4056ec4ed8825d1398e8b9f25ed63db228fe3a0ed0")
version("1.6.2", sha256="7fda1672a4c0fbc203c790677b6ee7c40d2c2d72be4f6772f75288fc712b10bc")
version("1.5.4", sha256="1a3fc60f40717de7f1716b754fd1c31a132e489a2560a278636ee78eba46ffc1")
version("1.5.3", sha256="01a5833182cc224bd100be2815e57e67b524de9f2bb1542787b6e3d1303f0f29")
@@ -27,6 +28,7 @@ class RHtmlwidgets(RPackage):
depends_on("r-htmltools@0.3:", type=("build", "run"))
depends_on("r-htmltools@0.5.4:", type=("build", "run"), when="@1.6.2:")
+ depends_on("r-htmltools@0.5.7:", type=("build", "run"), when="@1.6.3:")
depends_on("r-jsonlite@0.9.16:", type=("build", "run"))
depends_on("r-yaml", type=("build", "run"))
depends_on("r-rmarkdown", type=("build", "run"), when="@1.6.2:")
diff --git a/var/spack/repos/builtin/packages/r-httpuv/package.py b/var/spack/repos/builtin/packages/r-httpuv/package.py
index e54167e7d6..8801ddadc3 100644
--- a/var/spack/repos/builtin/packages/r-httpuv/package.py
+++ b/var/spack/repos/builtin/packages/r-httpuv/package.py
@@ -21,6 +21,7 @@ class RHttpuv(RPackage):
license("GPL-2.0-or-later OR custom")
+ version("1.6.15", sha256="5e6ded3623a39df3e1db6cb7e7292b4c03c80b3c6c5faaac3b78b711cb205ed0")
version("1.6.9", sha256="8d77f25b22fa7473b45007c2048e9a38d3792d59b2716e1fcdf9e99bd585d95d")
version("1.6.6", sha256="41395fd324c5cb884d4f2a8060744758904119db22eeb312f2ea1e7ad7711293")
version("1.6.5", sha256="f5f63629ca5e9d0e396a89982d95b5286726c0cb425166f35a3ad32a60a79156")
diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py
index 028903fd0c..a66b9a2c55 100644
--- a/var/spack/repos/builtin/packages/r-httr/package.py
+++ b/var/spack/repos/builtin/packages/r-httr/package.py
@@ -17,6 +17,7 @@ class RHttr(RPackage):
license("MIT")
+ version("1.4.7", sha256="1555e6c2fb67bd38ff11b479f74aa287b2d93f4add487aec53b836ff07de3a3a")
version("1.4.5", sha256="f93bac7f882b0df099abca47dd5aae3686fb3cd2d3e9926fcd639bcddff76f6c")
version("1.4.4", sha256="41d82523f3ee260d409a7b5ae4136190cbc5aecbc270b40ed7064f83e7f5435d")
version("1.4.3", sha256="9a8613fa96173ac910c021391af1ced4d0609169049c802cf7cdfe1c40897c6a")
@@ -32,6 +33,7 @@ class RHttr(RPackage):
depends_on("r@3.2:", type=("build", "run"), when="@1.4.1:")
depends_on("r@3.5:", type=("build", "run"), when="@1.4.5:")
depends_on("r-curl@3.0.0:", type=("build", "run"))
+ depends_on("r-curl@5.0.2:", type=("build", "run"), when="@1.4.7:")
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-mime", type=("build", "run"))
depends_on("r-openssl@0.8:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-httr2/package.py b/var/spack/repos/builtin/packages/r-httr2/package.py
index 4ca63c8d50..29f21c022c 100644
--- a/var/spack/repos/builtin/packages/r-httr2/package.py
+++ b/var/spack/repos/builtin/packages/r-httr2/package.py
@@ -18,15 +18,21 @@ class RHttr2(RPackage):
license("MIT")
+ version("1.0.2", sha256="d1f8e37f74a59f4e1b3b886e5f453336ba14251e500acdccc8f4f7d2b9300048")
version("0.2.2", sha256="5d1ab62541f7817112519f0f9d00d6a2555bab5b2da7f5c6d579b0c307d7f2bf")
depends_on("r@3.4:", type=("build", "run"))
+ depends_on("r@4.0:", type=("build", "run"), when="@1.0.2:")
depends_on("r-cli@3.0.0:", type=("build", "run"))
depends_on("r-curl", type=("build", "run"))
+ depends_on("r-curl@5.1.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-glue", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.0.0:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-openssl", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
depends_on("r-rappdirs", type=("build", "run"))
depends_on("r-rlang@1.0.0:", type=("build", "run"))
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-vctrs@0.6.3:", type=("build", "run"), when="@1.0.0:")
depends_on("r-withr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-humaniformat/package.py b/var/spack/repos/builtin/packages/r-humaniformat/package.py
index ee8057d687..0f92da22e2 100644
--- a/var/spack/repos/builtin/packages/r-humaniformat/package.py
+++ b/var/spack/repos/builtin/packages/r-humaniformat/package.py
@@ -25,4 +25,6 @@ class RHumaniformat(RPackage):
version("0.6.0", sha256="861232c66bf6d4ff91b073193506104f4d99eca5e9a9488327f39ef2bfb45e6d")
version("0.5.0", sha256="02b585e3623a5c5faa7dc3abff92b932d748900be39097c5db8434b8e92709a0")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hydrogof/package.py b/var/spack/repos/builtin/packages/r-hydrogof/package.py
index 3f5f11b161..de6840e4a4 100644
--- a/var/spack/repos/builtin/packages/r-hydrogof/package.py
+++ b/var/spack/repos/builtin/packages/r-hydrogof/package.py
@@ -19,6 +19,7 @@ class RHydrogof(RPackage):
cran = "hydroGOF"
+ version("0.6-0", sha256="fb1839da5d6c2d0bbff961b4bb39d149b487b59dc36017aada9d3484a842269e")
version("0.4-0", sha256="6a109740e36549a9369b5960b869e5e0a296261df7b6faba6cb3bd338d59883b")
depends_on("r@2.10.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-hydrotsm/package.py b/var/spack/repos/builtin/packages/r-hydrotsm/package.py
index 2fd5cde5e9..5cfc85af6c 100644
--- a/var/spack/repos/builtin/packages/r-hydrotsm/package.py
+++ b/var/spack/repos/builtin/packages/r-hydrotsm/package.py
@@ -22,14 +22,18 @@ class RHydrotsm(RPackage):
cran = "hydroTSM"
+ version("0.7-0", sha256="a6e1f0f74a5b8f3a7c05d020739342278b0a54e7b63a66a755db5599ebf94a8e")
version("0.6-0", sha256="5be759845ce05ca579ed2657c85d497b78c3060d737e84fcd457153045db4ad7")
depends_on("r@2.10.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@0.7-0:")
depends_on("r-zoo@1.7-2:", type=("build", "run"))
depends_on("r-xts@0.9-7:", type=("build", "run"))
depends_on("r-e1071", type=("build", "run"))
- depends_on("r-gstat", type=("build", "run"))
- depends_on("r-automap", type=("build", "run"))
- depends_on("r-sp@1.1-0:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
- depends_on("r-maptools", type=("build", "run"))
+ depends_on("r-classint", type=("build", "run"), when="@0.7-0:")
+
+ depends_on("r-gstat", type=("build", "run"), when="@:0.6.0")
+ depends_on("r-automap", type=("build", "run"), when="@:0.6.0")
+ depends_on("r-sp@1.1-0:", type=("build", "run"), when="@:0.6.0")
+ depends_on("r-maptools", type=("build", "run"), when="@:0.6.0")
diff --git a/var/spack/repos/builtin/packages/r-igraph/package.py b/var/spack/repos/builtin/packages/r-igraph/package.py
index dba6d2beab..cb89fe650b 100644
--- a/var/spack/repos/builtin/packages/r-igraph/package.py
+++ b/var/spack/repos/builtin/packages/r-igraph/package.py
@@ -17,6 +17,7 @@ class RIgraph(RPackage):
license("GPL-2.0-or-later")
+ version("2.0.3", sha256="8e8a172d4567219474562cfb1085496be3ab356483c4e88011aca1fc3b2d8f76")
version("1.4.2", sha256="7d5300adb1a25a6470cada8630e35ef416181147ab624d5a0a8d3552048c4ae5")
version("1.3.5", sha256="9e615d67b6b5b57dfa54ec2bbc8c29da8f7c3fe82af1e35ab27273b1035b9bd4")
version("1.3.1", sha256="505a2ba7c417ceaf869240cc1c9a5f3fbd75f8d9dfcfe048df1326c6ec41144e")
@@ -28,12 +29,18 @@ class RIgraph(RPackage):
version("1.0.1", sha256="dc64ed09b8b5f8d66ed4936cde3491974d6bc5178dd259b6eab7ef3936aa5602")
depends_on("r@3.0.2:", type=("build", "run"), when="@1.4.2:")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@1.5.0:")
+ depends_on("r-cli", type=("build", "run"), when="@1.5.0:")
+ depends_on("r-cpp11@0.2.0:", type=("build", "run"), when="@1.4.2:")
+ depends_on("r-cpp11@0.4.7:", type=("build", "run"), when="@1.6.0:")
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.5.0.1:")
+ depends_on("r-vctrs", type=("build", "run"), when="@2.0.3:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-pkgconfig@2.0.0:", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"), when="@1.3.5:")
- depends_on("r-cpp11@0.2.0:", type=("build", "run"), when="@1.4.2:")
+ depends_on("r-vctrs", type=("build", "run"), when="@2.0.2:")
depends_on("gmp")
depends_on("gmp@4.38:", when="@1.2.11:")
depends_on("libxml2")
diff --git a/var/spack/repos/builtin/packages/r-illuminaio/package.py b/var/spack/repos/builtin/packages/r-illuminaio/package.py
index 9f5a60263d..3cf67aea1b 100644
--- a/var/spack/repos/builtin/packages/r-illuminaio/package.py
+++ b/var/spack/repos/builtin/packages/r-illuminaio/package.py
@@ -24,4 +24,6 @@ class RIlluminaio(RPackage):
version("0.20.0", commit="d226628133b2396be9e7a6bf043f0309bd70c4ec")
version("0.18.0", commit="e6b8ab1f8eacb760aebdb4828e9cfbf07da06eda")
+ depends_on("c", type="build") # generated
+
depends_on("r-base64", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-imager/package.py b/var/spack/repos/builtin/packages/r-imager/package.py
index b132cfee0f..6b36e21629 100644
--- a/var/spack/repos/builtin/packages/r-imager/package.py
+++ b/var/spack/repos/builtin/packages/r-imager/package.py
@@ -20,6 +20,7 @@ class RImager(RPackage):
license("LGPL-3.0-only")
+ version("1.0.2", sha256="7c849086cb17d6c5aefc106217363e14afbcda2a9e0120687d40805b5e1c566a")
version("0.42.19", sha256="187abccba648ecece5e466ca6333acd5c8fdd1476daa2d04d5fa9ec5400ae1e2")
version("0.42.13", sha256="d90a9893d11190ba249c7fae5bd6517a77907efbce2941452cb2aec57bb5cf7f")
version("0.42.11", sha256="47f8b7ff8d05a5191e30ad1869f12a62bdbe3142b22b12a6032dec9b5f8532a8")
@@ -29,8 +30,10 @@ class RImager(RPackage):
depends_on("r+X")
depends_on("r@2.10.0:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-rcpp@0.11.5:", type=("build", "run"))
+ depends_on("r-rcpp@1.0.0:", type=("build", "run"), when="@1.0.1:")
depends_on("r-stringr", type=("build", "run"))
depends_on("r-png", type=("build", "run"))
depends_on("r-jpeg", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-impute/package.py b/var/spack/repos/builtin/packages/r-impute/package.py
index ecc5b356f8..7a9a558953 100644
--- a/var/spack/repos/builtin/packages/r-impute/package.py
+++ b/var/spack/repos/builtin/packages/r-impute/package.py
@@ -24,4 +24,6 @@ class RImpute(RPackage):
version("1.52.0", commit="7fa1b917a5dd60f2aaf52d9aae1fcd2c93511d63")
version("1.50.1", commit="31d1cc141797afdc83743e1d95aab8a90ee19b71")
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-influencer/package.py b/var/spack/repos/builtin/packages/r-influencer/package.py
index e3e60fa1df..b26eeb2e58 100644
--- a/var/spack/repos/builtin/packages/r-influencer/package.py
+++ b/var/spack/repos/builtin/packages/r-influencer/package.py
@@ -20,6 +20,7 @@ class RInfluencer(RPackage):
cran = "influenceR"
+ version("0.1.5", sha256="8164e4820f769032fab97c9ca486d33e83309641fcc4875065d8f5a43b20f58c")
version("0.1.0.1", sha256="63c46f1175fced33fb1b78d4d56e37fbee09b408945b0106dac36e3344cd4766")
version("0.1.0", sha256="4fc9324179bd8896875fc0e879a8a96b9ef2a6cf42a296c3b7b4d9098519e98a")
diff --git a/var/spack/repos/builtin/packages/r-inline/package.py b/var/spack/repos/builtin/packages/r-inline/package.py
index d7601ea0a0..0ac66b8e79 100644
--- a/var/spack/repos/builtin/packages/r-inline/package.py
+++ b/var/spack/repos/builtin/packages/r-inline/package.py
@@ -20,3 +20,5 @@ class RInline(RPackage):
version("0.3.17", sha256="792857b2ebd408d6523424d2f6bb7297e241d4b28ab32372f6a9240c8cd554f3")
version("0.3.15", sha256="ff043fe13c1991a3b285bed256ff4a9c0ba10bee764225a34b285875b7d69c68")
version("0.3.14", sha256="fd34d6bf965148d26d983a022a0ff7bc1a5831f6ca066deee3f6139894dfc931")
+
+ depends_on("r@2.4.0:", when="@0.3.16:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-insight/package.py b/var/spack/repos/builtin/packages/r-insight/package.py
index 2f9f27c8de..23b0ce7276 100644
--- a/var/spack/repos/builtin/packages/r-insight/package.py
+++ b/var/spack/repos/builtin/packages/r-insight/package.py
@@ -23,6 +23,7 @@ class RInsight(RPackage):
license("GPL-3.0-only")
+ version("0.20.3", sha256="b60e189849cd3c368e9c2b2174e89c2dfbba3b34e84feb8a20af1bb758116bb2")
version("0.19.1", sha256="1042629644c66b1a372fd4471d38adccc0c3a329879ef685b14b65575c1c98eb")
version("0.18.6", sha256="ab0dc3c8ec765f2e93f7bcc3a7abb05140f71db24d50bf8cdd595a5a4e771cae")
version("0.18.4", sha256="6e3f378bc2eb30c0300103bdd8a3e74371199b36867b45978ec9690a6fda0c5f")
@@ -33,3 +34,4 @@ class RInsight(RPackage):
depends_on("r@3.4:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@0.18.4:")
+ depends_on("r@3.6:", type=("build", "run"), when="@0.19.2:")
diff --git a/var/spack/repos/builtin/packages/r-interp/package.py b/var/spack/repos/builtin/packages/r-interp/package.py
index 800ecaf9a5..e7df13df3b 100644
--- a/var/spack/repos/builtin/packages/r-interp/package.py
+++ b/var/spack/repos/builtin/packages/r-interp/package.py
@@ -32,6 +32,7 @@ class RInterp(RPackage):
license("GPL-2.0-or-later")
+ version("1.1-6", sha256="3674044e5334ecdf124054303929c084fc0797d3123e28576a230492ea6ecd34")
version("1.1-4", sha256="4f7b5d388132a4d76e8635e2a7c4fa0d705df2b49e7d108faa16ce2236e34d06")
version("1.1-3", sha256="b74e606b38cfb02985c1f9e3e45093620f76c0307b1b0b4058761e871eb5fa3f")
diff --git a/var/spack/repos/builtin/packages/r-intervals/package.py b/var/spack/repos/builtin/packages/r-intervals/package.py
index 60006c590a..39f6181ad5 100644
--- a/var/spack/repos/builtin/packages/r-intervals/package.py
+++ b/var/spack/repos/builtin/packages/r-intervals/package.py
@@ -13,6 +13,7 @@ class RIntervals(RPackage):
license("Artistic-2.0")
+ version("0.15.4", sha256="50c0e1e3aab3e7b72cc1f0a6559d96caa3a360e969c38538479907e6cbe39f8f")
version("0.15.3", sha256="8501fef7c74b9be874e807839518aae85e79bf4a047cd52169b52c6d9b41dfc4")
version("0.15.2", sha256="0bd23b0ce817ddd851238233d8a5420bf3a6d29e75fd361418cbc50118777c57")
version("0.15.1", sha256="9a8b3854300f2055e1492c71932cc808b02feac8c4d3dbf6cba1c7dbd09f4ae4")
diff --git a/var/spack/repos/builtin/packages/r-ipred/package.py b/var/spack/repos/builtin/packages/r-ipred/package.py
index 6e4d00a80e..fe127d79a7 100644
--- a/var/spack/repos/builtin/packages/r-ipred/package.py
+++ b/var/spack/repos/builtin/packages/r-ipred/package.py
@@ -17,6 +17,7 @@ class RIpred(RPackage):
license("GPL-2.0-or-later")
+ version("0.9-15", sha256="a4752de11121262f3f4c43163efa34e05e42cdf4f8496d8897be6f410dc0ee4b")
version("0.9-14", sha256="81c83dc847d09c3db52ef15e36cd4dac38c50eead1008ddd458b9e89d7528f35")
version("0.9-13", sha256="6168a062d93c2d3063c064a8f242cd3716dee99822e20363a1801261319c4c98")
version("0.9-12", sha256="d6e1535704d39415a799d7643141ffa4f6f55597f03e763f4ccd5d8106005843")
@@ -24,6 +25,8 @@ class RIpred(RPackage):
version("0.9-8", sha256="9c1d11c3cb0d72be7870e70a216e589e403bbfee38c796fe75cd0611d878ac07")
version("0.9-5", sha256="3a466417808e17c4c6cd0f2b577407355d9da79a341558b42a8b76e24b6f6ba4")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-rpart@3.1-8:", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-iranges/package.py b/var/spack/repos/builtin/packages/r-iranges/package.py
index 47a37a38ef..ac91c21088 100644
--- a/var/spack/repos/builtin/packages/r-iranges/package.py
+++ b/var/spack/repos/builtin/packages/r-iranges/package.py
@@ -31,6 +31,8 @@ class RIranges(RPackage):
version("2.12.0", commit="1b1748655a8529ba87ad0f223f035ef0c08e7fcd")
version("2.10.5", commit="b00d1d5025e3c480d17c13100f0da5a0132b1614")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@2.24.1:")
depends_on("r-biocgenerics@0.21.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-irlba/package.py b/var/spack/repos/builtin/packages/r-irlba/package.py
index 1d6ad08520..21a594f5d8 100644
--- a/var/spack/repos/builtin/packages/r-irlba/package.py
+++ b/var/spack/repos/builtin/packages/r-irlba/package.py
@@ -25,5 +25,7 @@ class RIrlba(RPackage):
version("2.1.2", sha256="5183e8dd7943df11c0f44460566adf06c03d5320f142699298f516d423b06ce1")
version("2.0.0", sha256="15f8d6c1107d6bb872411efd61e6077d9d7ac826f4da2d378999889a7b1ebabe")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.6.2:", type=("build", "run"), when="@2.3.5:")
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-iso/package.py b/var/spack/repos/builtin/packages/r-iso/package.py
index 4f8ec037d0..1eb77a2695 100644
--- a/var/spack/repos/builtin/packages/r-iso/package.py
+++ b/var/spack/repos/builtin/packages/r-iso/package.py
@@ -14,6 +14,7 @@ class RIso(RPackage):
cran = "Iso"
+ version("0.0-21", sha256="b6842ae1c7b629ebb63355f50bb2e5d96e5696fa59590807ac6028b6dce28fa6")
version("0.0-18.1", sha256="2fa5f78a7603cbae94a5e38e791938596a053d48c609a7c120a19cbb7d93c66f")
version("0.0-18", sha256="2d7e8c4452653364ee086d95cea620c50378e30acfcff129b7261e1756a99504")
version("0.0-17", sha256="c007d6eaf6335a15c1912b0804276ff39abce27b7a61539a91b8fda653629252")
diff --git a/var/spack/repos/builtin/packages/r-isoband/package.py b/var/spack/repos/builtin/packages/r-isoband/package.py
index 2533c6c6f8..97819fcb60 100644
--- a/var/spack/repos/builtin/packages/r-isoband/package.py
+++ b/var/spack/repos/builtin/packages/r-isoband/package.py
@@ -22,4 +22,6 @@ class RIsoband(RPackage):
version("0.2.5", sha256="46f53fa066f0966f02cb2bf050190c0d5e950dab2cdf565feb63fc092c886ba5")
version("0.2.3", sha256="f9d3318fdf6d147dc2e2c7015ea7de42a55fa33d6232b952f982df96066b7ffe")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-testthat", type=("build", "run"), when="@0.2.3")
diff --git a/var/spack/repos/builtin/packages/r-jade/package.py b/var/spack/repos/builtin/packages/r-jade/package.py
index 3047b0916d..5ffd0424b2 100644
--- a/var/spack/repos/builtin/packages/r-jade/package.py
+++ b/var/spack/repos/builtin/packages/r-jade/package.py
@@ -18,6 +18,7 @@ class RJade(RPackage):
cran = "JADE"
+ version("2.0-4", sha256="d4b3d65a33cae454d3ab13343bceabfb3f6b8004ac64ae7bd86dee92a1cd2055")
version("2.0-3", sha256="56d68a993fa16fc6dec758c843960eee840814c4ca2271e97681a9d2b9e242ba")
depends_on("r-clue", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-jomo/package.py b/var/spack/repos/builtin/packages/r-jomo/package.py
index 36a96efafd..726512f37e 100644
--- a/var/spack/repos/builtin/packages/r-jomo/package.py
+++ b/var/spack/repos/builtin/packages/r-jomo/package.py
@@ -28,6 +28,8 @@ class RJomo(RPackage):
version("2.6-7", sha256="6e83dab51103511038a3e9a3c762e00cc45ae7080c0a0f64e37bcea8c488db53")
version("2.6-2", sha256="67496d6d69ddbe9a796789fd8b3ac32cada09a81cf5a8e7b925a21e085e2d87f")
+ depends_on("c", type="build") # generated
+
depends_on("r-lme4", type=("build", "run"))
depends_on("r-survival", type=("build", "run"))
depends_on("r-mass", type=("build", "run"), when="@2.6-7:")
diff --git a/var/spack/repos/builtin/packages/r-jpeg/package.py b/var/spack/repos/builtin/packages/r-jpeg/package.py
index 0709499e83..1436a1543a 100644
--- a/var/spack/repos/builtin/packages/r-jpeg/package.py
+++ b/var/spack/repos/builtin/packages/r-jpeg/package.py
@@ -22,5 +22,7 @@ class RJpeg(RPackage):
version("0.1-8.1", sha256="1db0a4976fd9b2ae27a37d3e856cca35bc2909323c7a40724846a5d3c18915a9")
version("0.1-8", sha256="d032befeb3a414cefdbf70ba29a6c01541c54387cc0a1a98a4022d86cbe60a16")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.9.0:", type=("build", "run"))
depends_on("jpeg")
diff --git a/var/spack/repos/builtin/packages/r-jsonify/package.py b/var/spack/repos/builtin/packages/r-jsonify/package.py
index 4887837dbd..f98a52dea9 100644
--- a/var/spack/repos/builtin/packages/r-jsonify/package.py
+++ b/var/spack/repos/builtin/packages/r-jsonify/package.py
@@ -21,6 +21,8 @@ class RJsonify(RPackage):
version("1.2.2", sha256="3745e962592f021a3deaed8b2f6b99c4f7181f28e095300a96d1c2b08af4af2f")
version("1.2.1", sha256="929191ab32e34af6a02ad991e29314cc78ea40763fcf232388ef2d132137fbce")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-rcpp@0.12.18:", type=("build", "run"))
depends_on("r-rapidjsonr@1.2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py
index 952b58337a..2d3c0d57c7 100644
--- a/var/spack/repos/builtin/packages/r-jsonlite/package.py
+++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py
@@ -24,6 +24,9 @@ class RJsonlite(RPackage):
license("MIT")
+ version("1.8.8", sha256="7de21316984c3ba3d7423d12f43d1c30c716007c5e39bf07e11885e0ceb0caa4")
+ version("1.8.7", sha256="7d42b7784b72d728698ea02b97818df51e2015ffa39fec2eaa2400771b0f601c")
+ version("1.8.5", sha256="dc3cca4bdca1b6d6836c412760ea9656140683126c54cb89c3e42219dec4a3ad")
version("1.8.4", sha256="79eaabe042226b0918aa828cc63d54fee8be67ae7c67f5e0d3010f468efb1278")
version("1.8.3", sha256="c57f1daf681fc7d5db893693a65ac61a48ddd7aabf66b28647b0e30df92ac8f0")
version("1.8.2", sha256="677b645c081a7e004b71f0c48a1d46c1be9715163ccb6b419fbb0342a6c9cc3a")
@@ -36,3 +39,5 @@ class RJsonlite(RPackage):
version("1.2", sha256="cb6b4660468d2db84ed09c7b8fefd169fcfc13e1e6b4e7ce64dce2713f34264d")
version("1.0", sha256="d756dd6367e3fc515c855bb0b34a3a81955f8aeb494db029a893f3cdfcff962d")
version("0.9.21", sha256="079349342ea6eb92bd5fa8f6a7c08d9e3652c3d41010b64afbc3297671eb3791")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-kableextra/package.py b/var/spack/repos/builtin/packages/r-kableextra/package.py
index 38ae8c03eb..16da516e32 100644
--- a/var/spack/repos/builtin/packages/r-kableextra/package.py
+++ b/var/spack/repos/builtin/packages/r-kableextra/package.py
@@ -18,20 +18,23 @@ class RKableextra(RPackage):
cran = "kableExtra"
+ version("1.4.0", sha256="8fe2cc9fc2e8991685c4dc9e4904459e6f572c945319befde36d76f3ab527409")
version("1.3.4", sha256="091ffac282cf9257edcec1a06da38b5e6516f111296bedb934e32f5692ffbbb0")
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-knitr@1.16:", type=("build", "run"))
+ depends_on("r-knitr@1.33:", type=("build", "run"), when="@1.4.0:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-stringr@1.0:", type=("build", "run"))
depends_on("r-xml2@1.1.1:", type=("build", "run"))
- depends_on("r-rvest", type=("build", "run"))
depends_on("r-rmarkdown@1.6.0:", type=("build", "run"))
depends_on("r-scales", type=("build", "run"))
depends_on("r-viridislite", type=("build", "run"))
depends_on("r-htmltools", type=("build", "run"))
depends_on("r-rstudioapi", type=("build", "run"))
- depends_on("r-glue", type=("build", "run"))
- depends_on("r-webshot", type=("build", "run"))
depends_on("r-digest", type=("build", "run"))
depends_on("r-svglite", type=("build", "run"))
+
+ depends_on("r-rvest", type=("build", "run"), when="@:1.3.4")
+ depends_on("r-glue", type=("build", "run"), when="@:1.3.4")
+ depends_on("r-webshot", type=("build", "run"), when="@:1.3.4")
diff --git a/var/spack/repos/builtin/packages/r-kernlab/package.py b/var/spack/repos/builtin/packages/r-kernlab/package.py
index ec7f355a92..858ef588e5 100644
--- a/var/spack/repos/builtin/packages/r-kernlab/package.py
+++ b/var/spack/repos/builtin/packages/r-kernlab/package.py
@@ -18,6 +18,7 @@ class RKernlab(RPackage):
license("GPL-2.0-only")
+ version("0.9-33", sha256="70c0787d6d3762c89bb68218fbee19e861fcb5d4c05b787a9692055d95dd3061")
version("0.9-32", sha256="654ef34e343deb4d2c4c139a44e5397d6e38876088ce1c53c7deb087935d6fdc")
version("0.9-31", sha256="7359c665c1c5e6780e1ce44b143347c8eec839301c3079d7f19e29159873278a")
version("0.9-30", sha256="48fc3a839ae57e8ab6ec26a34093ca3306391e7b271bef6e69812e2b4859ee81")
@@ -26,4 +27,7 @@ class RKernlab(RPackage):
version("0.9-26", sha256="954940478c6fcf60433e50e43cf10d70bcb0a809848ca8b9d683bf371cd56077")
version("0.9-25", sha256="b9de072754bb03c02c4d6a5ca20f2290fd090de328b55ab334ac0b397ac2ca62")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-kernsmooth/package.py b/var/spack/repos/builtin/packages/r-kernsmooth/package.py
index 2c19b6b76b..9977170c76 100644
--- a/var/spack/repos/builtin/packages/r-kernsmooth/package.py
+++ b/var/spack/repos/builtin/packages/r-kernsmooth/package.py
@@ -14,6 +14,7 @@ class RKernsmooth(RPackage):
cran = "KernSmooth"
+ version("2.23-24", sha256="d0b3ec39547ffd92565e91b0c3bb637f3b30e7a46afe416d8790b8c4f528ac5f")
version("2.23-20", sha256="20eb75051e2473933d41eedc9945b03c632847fd581e2207d452cf317fa5ec39")
version("2.23-18", sha256="8334800c5ad2305539d2731b929ea34f50fa4269ba87277b699fd5be5b03c490")
version("2.23-15", sha256="8b72d23ed121a54af188b2cda4441e3ce2646359309885f6455b82c0275210f6")
diff --git a/var/spack/repos/builtin/packages/r-kknn/package.py b/var/spack/repos/builtin/packages/r-kknn/package.py
index 1c674e39de..e4c2d931a5 100644
--- a/var/spack/repos/builtin/packages/r-kknn/package.py
+++ b/var/spack/repos/builtin/packages/r-kknn/package.py
@@ -18,6 +18,8 @@ class RKknn(RPackage):
version("1.3.1", sha256="22840e70ec2afa40371e274b583634c8f6d27149a87253ee411747d5db78f3db")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-igraph@1.0:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-klar/package.py b/var/spack/repos/builtin/packages/r-klar/package.py
index bef15e27e1..b3bc4308d6 100644
--- a/var/spack/repos/builtin/packages/r-klar/package.py
+++ b/var/spack/repos/builtin/packages/r-klar/package.py
@@ -20,6 +20,7 @@ class RKlar(RPackage):
cran = "klaR"
+ version("1.7-3", sha256="d36c041c017cdb5ba3dbf7fb61d5ce3908d8e780eb2912fc99471394fcb8e3e5")
version("1.7-2", sha256="8035c3edb8257973184ad5a2109fc7c77c32da913cb9dd0c2f1c373e6fccbd61")
version("1.7-1", sha256="0354bafb1a202bc439660ecfcfe78359bc2881a69d15ff64afa049e4eb171d25")
version("1.7-0", sha256="b4795250ef19fd1b5e1b9a59343fd01159a33dbdbb504a06258220e37a718198")
diff --git a/var/spack/repos/builtin/packages/r-knitr/package.py b/var/spack/repos/builtin/packages/r-knitr/package.py
index 08e5dd22e4..0a605579aa 100644
--- a/var/spack/repos/builtin/packages/r-knitr/package.py
+++ b/var/spack/repos/builtin/packages/r-knitr/package.py
@@ -17,6 +17,7 @@ class RKnitr(RPackage):
license("GPL-2.0-or-later")
+ version("1.48", sha256="501b5926da7da1e8df61958639537e4c30110a0a8de07381afd92b31b9bff197")
version("1.42", sha256="9344f1a0089e4da101def54aee38d7cfe3b2022d75c560141d8cc22ac65130f3")
version("1.40", sha256="9b8f95ff367a0e52f024bda30315ec7cdd6a5b82371a1aaed95ab4eea78535bc")
version("1.39", sha256="c91a65edebdca779af7f7480fa6636667497c9291ad55d6efd982db0bb91ac72")
@@ -38,6 +39,7 @@ class RKnitr(RPackage):
depends_on("r-evaluate@0.10:", type=("build", "run"))
depends_on("r-evaluate@0.15:", type=("build", "run"), when="@1.39:")
depends_on("r-highr", type=("build", "run"))
+ depends_on("r-highr@0.11:", type=("build", "run"), when="@1.47:")
depends_on("r-yaml@2.1.19:", type=("build", "run"))
depends_on("r-xfun", type=("build", "run"), when="@1.23:")
depends_on("r-xfun@0.15:", type=("build", "run"), when="@1.30")
@@ -46,6 +48,9 @@ class RKnitr(RPackage):
depends_on("r-xfun@0.27:", type=("build", "run"), when="@1.37:")
depends_on("r-xfun@0.29:", type=("build", "run"), when="@1.39:")
depends_on("r-xfun@0.34:", type=("build", "run"), when="@1.42:")
+ depends_on("r-xfun@0.39:", type=("build", "run"), when="@1.43:")
+ depends_on("r-xfun@0.43:", type=("build", "run"), when="@1.46:")
+ depends_on("r-xfun@0.44:", type=("build", "run"), when="@1.47:")
depends_on("pandoc", type="build")
depends_on("py-rst2pdf", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ks/package.py b/var/spack/repos/builtin/packages/r-ks/package.py
index 9ef0ad456f..9db06ce08d 100644
--- a/var/spack/repos/builtin/packages/r-ks/package.py
+++ b/var/spack/repos/builtin/packages/r-ks/package.py
@@ -18,6 +18,7 @@ class RKs(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.14.2", sha256="f19130476cfafec26bba102b66ecbaeb80a9312c62d55eeec54d1aec75803fcb")
version("1.14.0", sha256="2db9c56b7b0217b324bbf1e0f66bb94d3f7067a75c5823cbc7d369d63bbb4391")
version("1.13.5", sha256="d1c4d06d704f301628455787ba929add1e774debc343d0952a768abea6cc7815")
version("1.13.3", sha256="defb80df665d987f1751899f7a9809cb5a770f3c74266d7fbc7b9493616dce73")
@@ -36,5 +37,6 @@ class RKs(RPackage):
depends_on("r-mgcv", type=("build", "run"))
depends_on("r-multicool", type=("build", "run"))
depends_on("r-mvtnorm@1.0-0:", type=("build", "run"))
- depends_on("r-plot3d", type=("build", "run"), when="@1.13.3:")
depends_on("r-pracma", type=("build", "run"), when="@1.13.3:")
+
+ depends_on("r-plot3d", type=("build", "run"), when="@1.13.3:1.14.1")
diff --git a/var/spack/repos/builtin/packages/r-ksamples/package.py b/var/spack/repos/builtin/packages/r-ksamples/package.py
index fc0bb71af3..b9363d0530 100644
--- a/var/spack/repos/builtin/packages/r-ksamples/package.py
+++ b/var/spack/repos/builtin/packages/r-ksamples/package.py
@@ -24,6 +24,7 @@ class RKsamples(RPackage):
cran = "kSamples"
+ version("1.2-10", sha256="2d66cc0511fb1be3190c5a285dcd93d02419468ee1ff5ae6d0838f16df2b578d")
version("1.2-9", sha256="ba3ec4af3dfcf7cf12f0b784ef67bfea565e16985647ead904629886cc1542ff")
depends_on("r-suppdists", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-labeling/package.py b/var/spack/repos/builtin/packages/r-labeling/package.py
index cafeae8961..62202903af 100644
--- a/var/spack/repos/builtin/packages/r-labeling/package.py
+++ b/var/spack/repos/builtin/packages/r-labeling/package.py
@@ -15,5 +15,6 @@ class RLabeling(RPackage):
license("MIT OR custom")
+ version("0.4.3", sha256="c62f4fc2cc74377d7055903c5f1913b7295f7587456fe468592738a483e264f2")
version("0.4.2", sha256="e022d79276173e0d62bf9e37d7574db65ab439eb2ae1833e460b1cff529bd165")
version("0.3", sha256="0d8069eb48e91f6f6d6a9148f4e2dc5026cabead15dd15fc343eff9cf33f538f")
diff --git a/var/spack/repos/builtin/packages/r-labelled/package.py b/var/spack/repos/builtin/packages/r-labelled/package.py
index 7d3e5d8526..755ff749c6 100644
--- a/var/spack/repos/builtin/packages/r-labelled/package.py
+++ b/var/spack/repos/builtin/packages/r-labelled/package.py
@@ -18,6 +18,7 @@ class RLabelled(RPackage):
license("GPL-3.0-or-later")
+ version("2.13.0", sha256="9e2e82a42343b62f8a476d4dd7b13e9ffb3ee2c4e23bdf2cd29ef25b3dffa237")
version("2.11.0", sha256="eddc5299ca448ea9c244960af65b95f4164495febd609f719e0f453598a0e5dd")
version("2.10.0", sha256="5e93e29dcbbf0f6273b502b744695426e238ffe106f1db2bb5daeb1f17c9c40a")
version("2.9.1", sha256="9eb10b245f64f3fb7346121aa4cd98638946e1cc4208dd5e28791ef8fd62fa40")
@@ -34,5 +35,6 @@ class RLabelled(RPackage):
depends_on("r-vctrs", type=("build", "run"))
depends_on("r-stringr", type=("build", "run"), when="@2.9.0:")
depends_on("r-tidyr", type=("build", "run"))
+ depends_on("r-tidyselect", type=("build", "run"), when="@2.13.0:")
depends_on("r-pillar", type=("build", "run"), when="@:2.7.0")
diff --git a/var/spack/repos/builtin/packages/r-lars/package.py b/var/spack/repos/builtin/packages/r-lars/package.py
index e150766a92..e0fa34532a 100644
--- a/var/spack/repos/builtin/packages/r-lars/package.py
+++ b/var/spack/repos/builtin/packages/r-lars/package.py
@@ -21,4 +21,7 @@ class RLars(RPackage):
version("1.1", sha256="a8e4a0efb9ca6760dec1cadf395d9a805508455a2c3ced18cc53d9b8fa70cdc0")
version("0.9-8", sha256="8c64cb31073ea0785346bb716485da8db2fae14153a52e5a8d151bc9cb4906e5")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-later/package.py b/var/spack/repos/builtin/packages/r-later/package.py
index 78f29762a9..0093ebf261 100644
--- a/var/spack/repos/builtin/packages/r-later/package.py
+++ b/var/spack/repos/builtin/packages/r-later/package.py
@@ -16,6 +16,7 @@ class RLater(RPackage):
license("MIT")
+ version("1.3.2", sha256="52f5073d33cd0d3c12e56526c9c53c323ebafcc79b22cc6e51fb0c41ee2b561e")
version("1.3.0", sha256="08f50882ca3cfd2bb68c83f1fcfbc8f696f5cfb5a42c1448c051540693789829")
version("1.1.0.1", sha256="71baa7beae774a35a117e01d7b95698511c3cdc5eea36e29732ff1fe8f1436cd")
version("0.8.0", sha256="6b2a28b43c619b2c7890840c62145cd3a34a7ed65b31207fdedde52efb00e521")
diff --git a/var/spack/repos/builtin/packages/r-lattice/package.py b/var/spack/repos/builtin/packages/r-lattice/package.py
index 78c7afeb11..ed00c72206 100644
--- a/var/spack/repos/builtin/packages/r-lattice/package.py
+++ b/var/spack/repos/builtin/packages/r-lattice/package.py
@@ -18,6 +18,7 @@ class RLattice(RPackage):
license("GPL-2.0-or-later")
+ version("0.22-6", sha256="4b377211e472ece7872b9d6759f9b9c660b09594500462eb6146312a1d4d00f7")
version("0.21-8", sha256="8ad3d6974262e6cab6cc8fec38aa279b5b2f2524adf6f3eab56f68302b60c329")
version("0.20-45", sha256="22388d92bdb7d3959da84d7308d9026dd8226ef07580783729e8ad2f7d7507ad")
version("0.20-44", sha256="57b908e3c7ada08a38ad857ee44f44fdf9cfa59d5d9500bda2ccc9c7e96cdb9b")
diff --git a/var/spack/repos/builtin/packages/r-lava/package.py b/var/spack/repos/builtin/packages/r-lava/package.py
index 25c4232c2b..e6488a566d 100644
--- a/var/spack/repos/builtin/packages/r-lava/package.py
+++ b/var/spack/repos/builtin/packages/r-lava/package.py
@@ -23,6 +23,7 @@ class RLava(RPackage):
license("GPL-3.0-only")
+ version("1.8.0", sha256="8db996eeca012c58736f2d3b97f569c03e9361e20f31513c090a9386eb87e87f")
version("1.7.2.1", sha256="d42b1f5c7e4e76718e4f014c44608295f82b5de0eb25ce8e9b35c40c7839ef2e")
version("1.7.0", sha256="3078da69f3828812bcd093acc2d1cd2c8cbc8480d81da222ae49a55bcb2e5e24")
version("1.6.10", sha256="7a88f8a885872e2abb3011c446e9e1c4884cd4dbe6ab4cfe9207538e5560232e")
@@ -32,6 +33,7 @@ class RLava(RPackage):
version("1.4.7", sha256="d5cbd4835a94855478efb93051eece965db116ead203f4dd4e09d9a12d52f4bf")
depends_on("r@3.0:", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"), when="@1.7.4:")
depends_on("r-future-apply", type=("build", "run"), when="@1.6.10:")
depends_on("r-progressr", type=("build", "run"), when="@1.6.10:")
depends_on("r-numderiv", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-lavaan/package.py b/var/spack/repos/builtin/packages/r-lavaan/package.py
index a1361283d1..abd18dcc20 100644
--- a/var/spack/repos/builtin/packages/r-lavaan/package.py
+++ b/var/spack/repos/builtin/packages/r-lavaan/package.py
@@ -16,6 +16,7 @@ class RLavaan(RPackage):
license("GPL-2.0-or-later")
+ version("0.6-18", sha256="b907cacd6c4a2320138cb2206f17b60acf077453540bcb9cc94659fc9a48df51")
version("0.6-15", sha256="9a43f3e999f9b3003a8c46a615902e01d6701d28a871d657751dd2ff3928ed9b")
version("0.6-12", sha256="8048273e4102f8355ba123c8aff94a9e5a8e9ac9e02a73e986b106ceed4d079e")
version("0.6-11", sha256="2cc193b82463a865cd8dadb7332409fdebf47e4035d5fe8dbf3414a7ae18d308")
diff --git a/var/spack/repos/builtin/packages/r-lazyeval/package.py b/var/spack/repos/builtin/packages/r-lazyeval/package.py
index cbaafd963b..f90efdeea6 100644
--- a/var/spack/repos/builtin/packages/r-lazyeval/package.py
+++ b/var/spack/repos/builtin/packages/r-lazyeval/package.py
@@ -21,4 +21,6 @@ class RLazyeval(RPackage):
version("0.2.1", sha256="83b3a43e94c40fe7977e43eb607be0a3cd64c02800eae4f2774e7866d1e93f61")
version("0.2.0", sha256="13738f55b2044184fe91f53d17516a445dfb508227527921218cda6f01f98dcb")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-leafem/package.py b/var/spack/repos/builtin/packages/r-leafem/package.py
index 6a1ebaa35f..22feaf3df6 100644
--- a/var/spack/repos/builtin/packages/r-leafem/package.py
+++ b/var/spack/repos/builtin/packages/r-leafem/package.py
@@ -20,6 +20,7 @@ class RLeafem(RPackage):
license("MIT")
+ version("0.2.3", sha256="defd5baa4383da4182e97d41145c7a9633a987de05c465eb99a7a452fbf375e3")
version("0.2.0", sha256="97eb78b3eaf6012940f2c4f73effd8ff2d39aa46fef5f2ddf0005990b07dba8d")
version("0.1.6", sha256="ca50e0a699f564449248511857a2df0d48cd07de3157e099478a19b533088156")
version("0.1.3", sha256="6f123fc15efadb85d317c01003e3b7af5dc925cffe0bbe774b1b39b6bd67f304")
diff --git a/var/spack/repos/builtin/packages/r-leaflet-providers/package.py b/var/spack/repos/builtin/packages/r-leaflet-providers/package.py
index 6d3f39a792..725c0e21a1 100644
--- a/var/spack/repos/builtin/packages/r-leaflet-providers/package.py
+++ b/var/spack/repos/builtin/packages/r-leaflet-providers/package.py
@@ -18,6 +18,9 @@ class RLeafletProviders(RPackage):
license("BSD-2-Clause")
+ version("2.0.0", sha256="c5ceeadc8088c9840a8249f0347501cdba0119be97219a01ea2050d1dd4a8666")
version("1.9.0", sha256="9e8fc75c83313ab24663c2e718135459599549ed6e7396086cacb44e36cfd67b")
depends_on("r@2.10:", type=("build", "run"))
+
+ depends_on("r-htmltools", type=("build", "run"), when="@2.0.0:")
diff --git a/var/spack/repos/builtin/packages/r-leaflet/package.py b/var/spack/repos/builtin/packages/r-leaflet/package.py
index 7b17cf605c..2697b1eb83 100644
--- a/var/spack/repos/builtin/packages/r-leaflet/package.py
+++ b/var/spack/repos/builtin/packages/r-leaflet/package.py
@@ -17,6 +17,7 @@ class RLeaflet(RPackage):
license("GPL-3.0-only")
+ version("2.2.2", sha256="d2877b8d394116cc648456a828c5b825728be6a7afbbb3d55cc142c91a1ab8eb")
version("2.1.2", sha256="26d8671e8c99d85a4c257d8fb8c07ba899a2b95f801652598578f5cc5c724039")
version("2.1.1", sha256="32f6a043759a0d2d98ea05739b7b4c55a266aa01272e48243e3c44046c7a5677")
version("2.0.4.1", sha256="b0f038295f1de5d32d9ffa1d0dbc1562320190f2f1365f3a5e95863fff88901f")
@@ -25,17 +26,23 @@ class RLeaflet(RPackage):
version("1.0.1", sha256="f25a8e10c9616ccb5504bb874c533bc44fb7e438e073d4fe4484dee0951a9bc3")
depends_on("r@3.1.0:", type=("build", "run"))
- depends_on("r-base64enc", type=("build", "run"))
depends_on("r-crosstalk", type=("build", "run"), when="@2.0.0:")
depends_on("r-htmlwidgets", type=("build", "run"))
depends_on("r-htmlwidgets@1.5.4:", type=("build", "run"), when="@2.1.1:")
depends_on("r-htmltools", type=("build", "run"))
+ depends_on("r-jquerylib", type=("build", "run"), when="@2.2.0:")
+ depends_on("r-leaflet-providers@1.8.0:", type=("build", "run"), when="@2.0.4.1:")
+ depends_on("r-leaflet-providers@2.0.0:", type=("build", "run"), when="@2.2.0:")
depends_on("r-magrittr", type=("build", "run"))
- depends_on("r-markdown", type=("build", "run"))
depends_on("r-png", type=("build", "run"))
depends_on("r-rcolorbrewer", type=("build", "run"))
depends_on("r-raster", type=("build", "run"))
+ depends_on("r-raster@3.6.3:", type=("build", "run"), when="@2.2.0:")
depends_on("r-scales@1.0.0:", type=("build", "run"))
depends_on("r-sp", type=("build", "run"))
- depends_on("r-viridis@0.5.1:", type=("build", "run"), when="@2.0.0:")
- depends_on("r-leaflet-providers@1.8.0:", type=("build", "run"), when="@2.0.4.1:")
+ depends_on("r-viridislite", type=("build", "run"), when="@2.2.0:")
+ depends_on("r-xfun", type=("build", "run"), when="@2.2.0:")
+
+ depends_on("r-base64enc", type=("build", "run"), when="@:2.1.2")
+ depends_on("r-markdown", type=("build", "run"), when="@:2.1.2")
+ depends_on("r-viridis@0.5.1:", type=("build", "run"), when="@2.0.0:2.1.2")
diff --git a/var/spack/repos/builtin/packages/r-leaps/package.py b/var/spack/repos/builtin/packages/r-leaps/package.py
index ee2ae5752b..fd8f9095f0 100644
--- a/var/spack/repos/builtin/packages/r-leaps/package.py
+++ b/var/spack/repos/builtin/packages/r-leaps/package.py
@@ -15,5 +15,6 @@ class RLeaps(RPackage):
license("GPL-2.0-or-later")
+ version("3.2", sha256="a0d6bebb676e5cdc0ecf3e3a07163ce0d60b6fe72a083d91f0413e11a8a96fad")
version("3.1", sha256="3d7c3a102ce68433ecf167ece96a7ebb4207729e4defd0ac8fc00e7003f5c3b6")
version("3.0", sha256="55a879cdad5a4c9bc3b5697dd4d364b3a094a49d8facb6692f5ce6af82adf285")
diff --git a/var/spack/repos/builtin/packages/r-leiden/package.py b/var/spack/repos/builtin/packages/r-leiden/package.py
index 045f47f7f5..17abea1f72 100644
--- a/var/spack/repos/builtin/packages/r-leiden/package.py
+++ b/var/spack/repos/builtin/packages/r-leiden/package.py
@@ -19,6 +19,7 @@ class RLeiden(RPackage):
license("GPL-3.0-only OR custom")
+ version("0.4.3.1", sha256="a9ecbbcfa2724d8fdd0133af569278e036b25b6e2cbb23d453092cc6b3fc30e2")
version("0.4.3", sha256="6a464b4b860e621749b3b701bb7ceb07e23c1a36be241c3e13b18105eb980938")
version("0.4.2", sha256="cace86748c4aa1720508210658ee2f63f7875be5bac215084001fdc59d22e2bd")
version("0.3.9", sha256="81754276e026a9a8436476365bbadf0f15a403a525a349cb56418da5d8edea0d")
diff --git a/var/spack/repos/builtin/packages/r-lfe/package.py b/var/spack/repos/builtin/packages/r-lfe/package.py
index fc00f5b69d..0fc064e6a4 100644
--- a/var/spack/repos/builtin/packages/r-lfe/package.py
+++ b/var/spack/repos/builtin/packages/r-lfe/package.py
@@ -24,6 +24,7 @@ class RLfe(RPackage):
license("Artistic-2.0")
+ version("3.0-0", sha256="342d05c32932d0db755c35a7e27da1001a38e375866c6f61a18259faf0430399")
version("2.9-0", sha256="7c9a9cd74ad98c65b67477eb6924409d7e372d01d7ed50fa2edb6fa34e02223c")
version("2.8-8", sha256="0fc22928fa16f22ee66c8e426a0e994346ad2f67b3c5aea597f3eeffbd85ab71")
version("2.8-7.1", sha256="d6a1efd8c43f84fa291e4959938f16e85bf5feef113515aaca1fe90075a78c50")
diff --git a/var/spack/repos/builtin/packages/r-lhs/package.py b/var/spack/repos/builtin/packages/r-lhs/package.py
index b04915a5a2..7277c6a42d 100644
--- a/var/spack/repos/builtin/packages/r-lhs/package.py
+++ b/var/spack/repos/builtin/packages/r-lhs/package.py
@@ -16,6 +16,7 @@ class RLhs(RPackage):
license("GPL-3.0-only")
+ version("1.2.0", sha256="6b4b773c6b322f1ffb3e2ef49c244ec8a3958a0346a1cc8f42f0d0951e8b0724")
version("1.1.6", sha256="e37fce44efe6a371677ba2f72f9e1e48270a0fdc60872d05def89270586cd23f")
version("1.1.5", sha256="7a3c6fdcc953490e51026e17a0b1a9dc0ca8d03e6fc989457a7cdda2075b6339")
version("1.1.3", sha256="e43b8d48db1cf26013697e2a798ed1d31d1ee1790f2ebfecb280176c0e0c06d1")
diff --git a/var/spack/repos/builtin/packages/r-libcoin/package.py b/var/spack/repos/builtin/packages/r-libcoin/package.py
index 34c66ac1f8..b22b63182d 100644
--- a/var/spack/repos/builtin/packages/r-libcoin/package.py
+++ b/var/spack/repos/builtin/packages/r-libcoin/package.py
@@ -18,6 +18,7 @@ class RLibcoin(RPackage):
license("GPL-2.0-only")
+ version("1.0-10", sha256="3023e0495d0789765bdf04c0ef0990a57b48fefa322c55f20e250d2d70d67eaf")
version("1.0-9", sha256="2d7dd0b7c6dfc20472430570419ea36a714da7bbafd336da1fb53c5c6463d9eb")
version("1.0-6", sha256="48afc1415fc89b29e4f2c8b6f6db3cffef1531580e5c806ad7cacf4afe6a4e5a")
version("1.0-4", sha256="91dcbaa0ab8c2109aa54c3eda29ad0acd67c870efcda208e27acce9d641c09c5")
diff --git a/var/spack/repos/builtin/packages/r-libpressio/package.py b/var/spack/repos/builtin/packages/r-libpressio/package.py
index cc397330a3..7e02039782 100644
--- a/var/spack/repos/builtin/packages/r-libpressio/package.py
+++ b/var/spack/repos/builtin/packages/r-libpressio/package.py
@@ -25,6 +25,8 @@ class RLibpressio(RPackage):
version("1.1", sha256="b86a541e095b6e41b3548f6cd734c1ff50c70edda2806ed66b5205880fbfbb96")
version("0.0.1", sha256="a508cf3ec1b06c417e0de0e1e4180f3175ead2e4ec23b374425fcf2abfaa1b88")
+ depends_on("cxx", type="build") # generated
+
variant(
"third_party", description="include support for 3rd party compressor modules", default=True
)
diff --git a/var/spack/repos/builtin/packages/r-lifecycle/package.py b/var/spack/repos/builtin/packages/r-lifecycle/package.py
index 6a72cd526a..4ef0c7327b 100644
--- a/var/spack/repos/builtin/packages/r-lifecycle/package.py
+++ b/var/spack/repos/builtin/packages/r-lifecycle/package.py
@@ -22,6 +22,7 @@ class RLifecycle(RPackage):
license("MIT")
+ version("1.0.4", sha256="ada4d3c7e84b0c93105e888647c5754219a8334f6e1f82d5afaf83d4855b91cc")
version("1.0.3", sha256="6459fdc3211585c0cdf120427579c12149b02161efe273a64b825c05e9aa69c2")
version("1.0.1", sha256="1da76e1c00f1be96ca34e122ae611259430bf99d6a1b999fdef70c00c30f7ba0")
version("0.2.0", sha256="29746e8dee05d4e36f9c612e8c7a903a4f648a36b3b94c9776e518c38a412224")
@@ -29,7 +30,9 @@ class RLifecycle(RPackage):
depends_on("r@3.2:", type=("build", "run"))
depends_on("r@3.3:", type=("build", "run"), when="@1:")
depends_on("r@3.4:", type=("build", "run"), when="@1.0.3:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.0.4:")
depends_on("r-cli@3.4.0:", type=("build", "run"), when="@1.0.3:")
depends_on("r-glue", type=("build", "run"))
depends_on("r-rlang@0.4.0:", type=("build", "run"))
depends_on("r-rlang@1.0.6:", type=("build", "run"), when="@1.0.3:")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.0.4:")
diff --git a/var/spack/repos/builtin/packages/r-limma/package.py b/var/spack/repos/builtin/packages/r-limma/package.py
index 5e3b183a8d..ea57708e3f 100644
--- a/var/spack/repos/builtin/packages/r-limma/package.py
+++ b/var/spack/repos/builtin/packages/r-limma/package.py
@@ -26,5 +26,7 @@ class RLimma(RPackage):
version("3.34.9", commit="6755278a929f942a49e2441fb002a3ed393e1139")
version("3.32.10", commit="593edf28e21fe054d64137ae271b8a52ab05bc60")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.3.0:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@3.40.6:")
diff --git a/var/spack/repos/builtin/packages/r-limsolve/package.py b/var/spack/repos/builtin/packages/r-limsolve/package.py
index ae67f10b81..2d042d4e43 100644
--- a/var/spack/repos/builtin/packages/r-limsolve/package.py
+++ b/var/spack/repos/builtin/packages/r-limsolve/package.py
@@ -18,6 +18,7 @@ class RLimsolve(RPackage):
cran = "limSolve"
+ version("1.5.7.1", sha256="a5945217bbf512724297883f8d7c65846a11202266b2b6bb3355372935e85b92")
version("1.5.6", sha256="b97ea9930383634c8112cdbc42f71c4e93fe0e7bfaa8f401921835cb44cb49a0")
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-list/package.py b/var/spack/repos/builtin/packages/r-list/package.py
new file mode 100644
index 0000000000..25113da7b6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-list/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RList(RPackage):
+ """Allows researchers to conduct multivariate statistical analyses
+ of survey data with list experiments."""
+
+ homepage = "https://cran.r-project.org/web/packages/list/index.html"
+ cran = "list"
+
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+
+ version("9.2.6", sha256="6a2b1dd9cdee87d739605fb38463cb6e04680c94b73f51fbd39b5552a62432e4")
+
+ depends_on("r@3.2.0:", type=("build", "run"))
+ depends_on("r-sandwich@2.3-3:", type=("build", "run"))
+ depends_on("r-vgam@0.9-8:", type=("build", "run"))
+ depends_on("r-magic@1.5-6:", type=("build", "run"))
+ depends_on("r-gamlss-dist@4.3-4:", type=("build", "run"))
+ depends_on("r-mass@7.3-40:", type=("build", "run"))
+ depends_on("r-quadprog@1.5-5:", type=("build", "run"))
+ depends_on("r-corpcor@1.6.7:", type=("build", "run"))
+ depends_on("r-mvtnorm@1.0-2:", type=("build", "run"))
+ depends_on("r-coda@0.17-1:", type=("build", "run"))
+ depends_on("r-arm", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-listenv/package.py b/var/spack/repos/builtin/packages/r-listenv/package.py
index d9370a0b79..568202242f 100644
--- a/var/spack/repos/builtin/packages/r-listenv/package.py
+++ b/var/spack/repos/builtin/packages/r-listenv/package.py
@@ -17,6 +17,7 @@ class RListenv(RPackage):
license("LGPL-2.1-or-later")
+ version("0.9.1", sha256="422aaf487b91c6512b83c05536f8dac255db79b16ee85254acc59a3fda8c1c3b")
version("0.9.0", sha256="352841e04f0725d361b78cfdc75e00511f740d97237dd651ea86aa5484674887")
version("0.8.0", sha256="fd2aaf3ff2d8d546ce33d1cb38e68401613975117c1f9eb98a7b41facf5c485f")
version("0.7.0", sha256="6126020b111870baea08b36afa82777cd578e88c17db5435cd137f11b3964555")
diff --git a/var/spack/repos/builtin/packages/r-lme4/package.py b/var/spack/repos/builtin/packages/r-lme4/package.py
index cff157fee1..024091b3a1 100644
--- a/var/spack/repos/builtin/packages/r-lme4/package.py
+++ b/var/spack/repos/builtin/packages/r-lme4/package.py
@@ -18,6 +18,7 @@ class RLme4(RPackage):
license("GPL-2.0-or-later")
+ version("1.1-35.5", sha256="7d6664db7ea96429562efe1058da58985d779d6fe79ec6f4e86ba68047135170")
version("1.1-33", sha256="d956a5ed7cbcc016114a836bad89acf6cdafcd0f82a7d85e3805ced936b40910")
version("1.1-31", sha256="5affd1e33d3fece5ec0a6c7663eb12328e64147f8aa92675ce6453c4fe72edfd")
version("1.1-30", sha256="fdabdfc4b64cff05ae9506a766c948a953eeb6db71761f9401b36d6d9979300f")
@@ -32,7 +33,9 @@ class RLme4(RPackage):
depends_on("r@3.0.2:", type=("build", "run"))
depends_on("r@3.2.0:", type=("build", "run"), when="@1.1-16:")
depends_on("r@3.5.0:", type=("build", "run"), when="@1.1-31:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@1.1-35.5:")
depends_on("r-matrix@1.2-1:", type=("build", "run"))
+ depends_on("r-matrix@1.2-3:", type=("build", "run"), when="@1.1-35.5:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
depends_on("r-boot", type=("build", "run"), when="@1.1-21:")
@@ -41,5 +44,6 @@ class RLme4(RPackage):
depends_on("r-nloptr@1.0.4:", type=("build", "run"))
depends_on("r-rcpp@0.10.5:", type=("build", "run"))
depends_on("r-rcppeigen", type=("build", "run"))
+ depends_on("r-rcppeigen@0.3.3.9.4:", type=("build", "run"), when="@1.1-35.1:")
depends_on("r-statmod", type=("build", "run"), when="@1.1-26")
diff --git a/var/spack/repos/builtin/packages/r-lmtest/package.py b/var/spack/repos/builtin/packages/r-lmtest/package.py
index ed98a3f759..f7bd808a4b 100644
--- a/var/spack/repos/builtin/packages/r-lmtest/package.py
+++ b/var/spack/repos/builtin/packages/r-lmtest/package.py
@@ -24,5 +24,8 @@ class RLmtest(RPackage):
version("0.9-36", sha256="be9f168d6554e9cd2be0f9d8fc3244f055dce90d1fca00f05bcbd01daa4ed56b")
version("0.9-34", sha256="86eead67ed6d6c6be3fbee97d5ce45e6ca06a981f974ce01a7754a9e33770d2e")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-zoo", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-lobstr/package.py b/var/spack/repos/builtin/packages/r-lobstr/package.py
index f322a9ab4c..77670f9a55 100644
--- a/var/spack/repos/builtin/packages/r-lobstr/package.py
+++ b/var/spack/repos/builtin/packages/r-lobstr/package.py
@@ -23,6 +23,8 @@ class RLobstr(RPackage):
version("1.0.1", sha256="25fb288f73dbaf680ebbf27a50da338868c55d788501118fd33748854c5104fb")
version("1.0.0", sha256="9d24de1519c51b3bac79066a1abf623b939e884ba5b3005110bb9c2016954b3d")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@1.1.1:")
depends_on("r-crayon", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-locfit/package.py b/var/spack/repos/builtin/packages/r-locfit/package.py
index 932e614ba5..8f0bbe58bb 100644
--- a/var/spack/repos/builtin/packages/r-locfit/package.py
+++ b/var/spack/repos/builtin/packages/r-locfit/package.py
@@ -16,6 +16,7 @@ class RLocfit(RPackage):
license("GPL-2.0-or-later")
+ version("1.5-9.10", sha256="4c20661814993a87ca435f42b0814bacb87c5a9ccc2ff55e4cae718cb176ac06")
version("1.5-9.7", sha256="48e5fcd089fbc609d8e4c62c390425fba1dd167ad95ae0bddc175cbbe1517aff")
version("1.5-9.6", sha256="1ee89e4003cb769feae61ada7ac0a971df30644824f7ed84a21dd5719f713476")
version("1.5-9.5", sha256="fd9f2bad9d8beec8be4843dc80e38ebe0f388835a7003490f67e57eeb9e6de23")
diff --git a/var/spack/repos/builtin/packages/r-log4r/package.py b/var/spack/repos/builtin/packages/r-log4r/package.py
index 53dd724954..c7bade880e 100644
--- a/var/spack/repos/builtin/packages/r-log4r/package.py
+++ b/var/spack/repos/builtin/packages/r-log4r/package.py
@@ -21,3 +21,5 @@ class RLog4r(RPackage):
version("0.3.2", sha256="14ba6b096283279f0accbde26a600771ab2df271db6c8eeb04d6f113107825a3")
version("0.3.0", sha256="8e5d0221298410e48bee9d9a983a23e1834ce88592f9d931471bfdb05f37a691")
version("0.2", sha256="321bee6babb92376b538624027a36e7d2a6c8edb360aa38ab0a6762dfea9081f")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-loo/package.py b/var/spack/repos/builtin/packages/r-loo/package.py
index 68f9e89684..909a7fd95d 100644
--- a/var/spack/repos/builtin/packages/r-loo/package.py
+++ b/var/spack/repos/builtin/packages/r-loo/package.py
@@ -24,6 +24,7 @@ class RLoo(RPackage):
license("GPL-3.0-or-later")
+ version("2.8.0", sha256="aab727a95a2e1c0e5005188e7daa6eba52455fa0c5869130d53cee5a8963244c")
version("2.6.0", sha256="66da60fdf53a62cbc93797fa696a4cc43bce77f1721dd4bc1a58d25b3f981210")
version("2.5.1", sha256="866a2f54a4e8726cc3062e27daa8a073e6ac4aeb6719af7845284f7a668745f1")
version("2.4.1", sha256="bc21fb6b4a93a7e95ee1be57e4e787d731895fb8b4743c26b30b43adee475b50")
@@ -35,4 +36,5 @@ class RLoo(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r-checkmate", type=("build", "run"))
depends_on("r-matrixstats@0.52:", type=("build", "run"))
+ depends_on("r-posterior@1.5.0:", type=("build", "run"), when="@2.7.0:")
depends_on("pandoc@1.12.3:")
diff --git a/var/spack/repos/builtin/packages/r-lpsolve/package.py b/var/spack/repos/builtin/packages/r-lpsolve/package.py
index 01847c8158..208dbf4962 100644
--- a/var/spack/repos/builtin/packages/r-lpsolve/package.py
+++ b/var/spack/repos/builtin/packages/r-lpsolve/package.py
@@ -17,6 +17,7 @@ class RLpsolve(RPackage):
cran = "lpSolve"
+ version("5.6.20", sha256="3ffe06a0685123c36cd306b874f89a59a70c864c8f78c5569f82a86abedc21db")
version("5.6.18", sha256="751e1926fcd81b852b6c0d5ea7ecd9311ef6fbdbce9143b7872fea79590de712")
version("5.6.17", sha256="f725802bd9dc05c6913daf48f2458441ad4d2996056d0942737886d8b76c9288")
version("5.6.16", sha256="18a11e5184914e02b056d3d8f54ad92e4bbce651d930d61430570b4ae2ecbb2a")
diff --git a/var/spack/repos/builtin/packages/r-lpsolveapi/package.py b/var/spack/repos/builtin/packages/r-lpsolveapi/package.py
index 3e313013b1..9018b79f2c 100644
--- a/var/spack/repos/builtin/packages/r-lpsolveapi/package.py
+++ b/var/spack/repos/builtin/packages/r-lpsolveapi/package.py
@@ -17,6 +17,9 @@ class RLpsolveapi(RPackage):
cran = "lpSolveAPI"
version(
+ "5.5.2.0-17.12", sha256="4f00a9d27055ddf3e2a4b0a529b720861b9f916f2ceb1fe0b71e4c52da5b70ef"
+ )
+ version(
"5.5.2.0-17.9", sha256="7b52ecf3f1174f771fe24e62502be6d31acc3e48a12473e35ad0a89fc2517811"
)
version(
diff --git a/var/spack/repos/builtin/packages/r-lsei/package.py b/var/spack/repos/builtin/packages/r-lsei/package.py
index cf29fe58b3..55332f8682 100644
--- a/var/spack/repos/builtin/packages/r-lsei/package.py
+++ b/var/spack/repos/builtin/packages/r-lsei/package.py
@@ -23,3 +23,6 @@ class RLsei(RPackage):
version("1.3-0", sha256="6289058f652989ca8a5ad6fa324ce1762cc9e36c42559c00929b70f762066ab6")
version("1.2-0", sha256="4781ebd9ef93880260d5d5f23066580ac06061e95c1048fb25e4e838963380f6")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-lubridate/package.py b/var/spack/repos/builtin/packages/r-lubridate/package.py
index f3ea109ef5..a2b37be108 100644
--- a/var/spack/repos/builtin/packages/r-lubridate/package.py
+++ b/var/spack/repos/builtin/packages/r-lubridate/package.py
@@ -20,6 +20,7 @@ class RLubridate(RPackage):
license("GPL-2.0-or-later")
+ version("1.9.3", sha256="2b6e1406d231b0a14d60b99cc406d159fea5465a5694725ad25343f12cf37fff")
version("1.9.2", sha256="8976431a4affe989261cbaa5e09cd44bb42a3b16eed59a42c1698da34c6544a7")
version("1.9.0", sha256="b936041f8a71894ef930cfff61b45833e0dd148b5b16697f4f541d25b31a903a")
version("1.8.0", sha256="87d66efdb1f3d680db381d7e40a202d35645865a0542e2f270ef008a19002ba5")
diff --git a/var/spack/repos/builtin/packages/r-lwgeom/package.py b/var/spack/repos/builtin/packages/r-lwgeom/package.py
index c25ea73c5d..2b09ba6336 100644
--- a/var/spack/repos/builtin/packages/r-lwgeom/package.py
+++ b/var/spack/repos/builtin/packages/r-lwgeom/package.py
@@ -17,6 +17,7 @@ class RLwgeom(RPackage):
license("GPL-2.0-only")
+ version("0.2-14", sha256="26db6cf7dbc8cf43a70e5e2a34941a1c4b65e182f86f58d64ff9f614b3be929c")
version("0.2-11", sha256="7fd73cf58981f9566d946bf63ed6575ea0c70634abeaf4e60ef9615040d63419")
version("0.2-9", sha256="69b2a2efdafb0b32c801932eee7cd2c4b8402cede6487f4dfea4e14873091aa8")
version("0.2-8", sha256="f48a92de222da0590b37a30d5cbf2364555044a842795f6b488afecc650b8b34")
@@ -25,8 +26,10 @@ class RLwgeom(RPackage):
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-units", type=("build", "run"))
- depends_on("r-sf@0.9-3:", type=("build", "run"))
- depends_on("r-sf@0.6-0:", type=("build", "run"), when="@0.2-9:")
+ depends_on("r-sf@0.6-0:", type=("build", "run"), when="@0.1-3:")
+ depends_on("r-sf@0.9-0:", type=("build", "run"), when="@0.2-2:")
+ depends_on("r-sf@0.9-3:", type=("build", "run"), when="@0.2-4:")
+ depends_on("r-sf@1.0-15:", type=("build", "run"), when="@0.2-14:")
depends_on("geos@3.5.0:")
depends_on("proj@4.8.0:6.999")
depends_on("sqlite", when="@0.2-8:")
diff --git a/var/spack/repos/builtin/packages/r-magick/package.py b/var/spack/repos/builtin/packages/r-magick/package.py
index c722a4b67c..f8f507f93f 100644
--- a/var/spack/repos/builtin/packages/r-magick/package.py
+++ b/var/spack/repos/builtin/packages/r-magick/package.py
@@ -24,6 +24,7 @@ class RMagick(RPackage):
license("MIT")
+ version("2.8.4", sha256="45c803370f0d96b729db8114b3e2187cbe6fac13133b67b96a91c8eae734ea0a")
version("2.7.4", sha256="e28d67737590f8c19e4cf00a9c74e59d0e45f9ece363ed105b5f40e821e8f02f")
version("2.7.3", sha256="83877b2e23ea43fbc1164de9c2422eafbe7858393ac384df5adf3a7eec122441")
version("2.6.0", sha256="66585336e3ff18793ae9e2726af67a6672622f270468670ab5fe5e013bc48ecc")
diff --git a/var/spack/repos/builtin/packages/r-magrittr/package.py b/var/spack/repos/builtin/packages/r-magrittr/package.py
index 989ca317de..d3aeb1a1d9 100644
--- a/var/spack/repos/builtin/packages/r-magrittr/package.py
+++ b/var/spack/repos/builtin/packages/r-magrittr/package.py
@@ -24,4 +24,6 @@ class RMagrittr(RPackage):
version("2.0.1", sha256="75c265d51cc2b34beb27040edb09823c7b954d3990a7a931e40690b75d4aad5f")
version("1.5", sha256="05c45943ada9443134caa0ab24db4a962b629f00b755ccf039a2a2a7b2c92ae8")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.4.0:", type=("build", "run"), when="@2.0.3:")
diff --git a/var/spack/repos/builtin/packages/r-makecdfenv/package.py b/var/spack/repos/builtin/packages/r-makecdfenv/package.py
index 21d255366d..7fa20490d3 100644
--- a/var/spack/repos/builtin/packages/r-makecdfenv/package.py
+++ b/var/spack/repos/builtin/packages/r-makecdfenv/package.py
@@ -27,6 +27,8 @@ class RMakecdfenv(RPackage):
version("1.54.0", commit="3ff646ddc4b028e46b1e091ff9c2d17ce77cec26")
version("1.52.0", commit="b88a3e93e3b7feeeca69eda7c1fc5a0826c81120")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.6.0:", type=("build", "run"))
depends_on("r-affyio", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-maldiquant/package.py b/var/spack/repos/builtin/packages/r-maldiquant/package.py
index 3d646cd433..baf6e8c6a1 100644
--- a/var/spack/repos/builtin/packages/r-maldiquant/package.py
+++ b/var/spack/repos/builtin/packages/r-maldiquant/package.py
@@ -20,6 +20,7 @@ class RMaldiquant(RPackage):
cran = "MALDIquant"
+ version("1.22.3", sha256="fd094f0ea1a163ad1bd290e789ad827a76075d82ae5ce8a8e53a7095a7479383")
version("1.22.1", sha256="0a52a55dbe76a7e7ca50c5555fea4381eeda0c215c66e420d8dc9bfd2992411c")
version("1.21", sha256="0771f82034aa6a77af67f3572c900987b7e6b578d04d707c6e06689d021a2ff8")
version("1.19.3", sha256="a730327c1f8d053d29e558636736b7b66d0671a009e0004720b869d2c76ff32c")
diff --git a/var/spack/repos/builtin/packages/r-mapplots/package.py b/var/spack/repos/builtin/packages/r-mapplots/package.py
index f19a3424c1..4ec8d101b2 100644
--- a/var/spack/repos/builtin/packages/r-mapplots/package.py
+++ b/var/spack/repos/builtin/packages/r-mapplots/package.py
@@ -18,6 +18,7 @@ class RMapplots(RPackage):
license("GPL-2.0-or-later")
+ version("1.5.2", sha256="ed0e151d6865549d1a10882984a7fb29bc89a7b94ad69e512f90937b981c8a18")
version("1.5.1", sha256="37e96d34f37922180e07bb63b4514e07d42eee5bbf0885b278286ee48cf142a3")
depends_on("r@2.10.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-mapproj/package.py b/var/spack/repos/builtin/packages/r-mapproj/package.py
index 3c9963ffcd..08b9ea6351 100644
--- a/var/spack/repos/builtin/packages/r-mapproj/package.py
+++ b/var/spack/repos/builtin/packages/r-mapproj/package.py
@@ -23,5 +23,7 @@ class RMapproj(RPackage):
version("1.2-5", sha256="f3026a3a69a550c923b44c18b1ccc60d98e52670a438250d13f3c74cf2195f66")
version("1.2-4", sha256="cf8a1535f57e7cca0a71b3a551e77ad3e7a78f61a94bb19effd3de19dbe7dceb")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-maps@2.3-0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-maps/package.py b/var/spack/repos/builtin/packages/r-maps/package.py
index b6b6e19dc5..13840200da 100644
--- a/var/spack/repos/builtin/packages/r-maps/package.py
+++ b/var/spack/repos/builtin/packages/r-maps/package.py
@@ -16,6 +16,7 @@ class RMaps(RPackage):
license("GPL-2.0-only")
+ version("3.4.2", sha256="53e57b889f1779cfd4a116a8ed3eded7ed29a73a1b9506248772a389c8404b0c")
version("3.4.1", sha256="e693a5218ed8122e92d73a98a475d9016f2293c7852c8048677daa7649086400")
version("3.4.0", sha256="7918ccb2393ca19589d4c4e77d9ebe863dc6317ebfc1ff41869dbfaf439f5747")
version("3.3.0", sha256="199afe19a4edcef966ae79ef802f5dcc15a022f9c357fcb8cae8925fe8bd2216")
diff --git a/var/spack/repos/builtin/packages/r-maptools/package.py b/var/spack/repos/builtin/packages/r-maptools/package.py
index 8ca5172291..00278c11b8 100644
--- a/var/spack/repos/builtin/packages/r-maptools/package.py
+++ b/var/spack/repos/builtin/packages/r-maptools/package.py
@@ -17,6 +17,7 @@ class RMaptools(RPackage):
cran = "maptools"
+ version("1.1-8", sha256="5e8579e3f559161935f1dde622ece703eefa2a28a677ce553d7f27611e66e0f7")
version(
"1.1-6",
sha256="d6a5df52db03b2231f21921b693c67f85df3c3b376181aa13ef4f21710f69308",
diff --git a/var/spack/repos/builtin/packages/r-mapview/package.py b/var/spack/repos/builtin/packages/r-mapview/package.py
index aa7f0dc717..47f23046d5 100644
--- a/var/spack/repos/builtin/packages/r-mapview/package.py
+++ b/var/spack/repos/builtin/packages/r-mapview/package.py
@@ -18,6 +18,7 @@ class RMapview(RPackage):
license("GPL-3.0-or-later OR custom")
+ version("2.11.2", sha256="414d7f732b3aaf62005e279d7b0febf50aed2183bf05522c4fccaa92117328b0")
version("2.11.0", sha256="87f8cf562a0918201082a743438b9af47429bdb8871511235d72505107f4d30a")
version("2.10.0", sha256="b597902c654b9abf1163bb9d4f1044fef85d0a52c8dc6538ca46b0024f63baaa")
version("2.9.0", sha256="170cb2b5e67cbeb177f87bd2eab1ecabc44a1042addbcd95a85b2ec4a00eb690")
@@ -33,10 +34,12 @@ class RMapview(RPackage):
depends_on("r-leafpop", type=("build", "run"))
depends_on("r-png", type=("build", "run"))
depends_on("r-raster", type=("build", "run"))
+ depends_on("r-raster@3.6.3:", type=("build", "run"), when="@2.11.2:")
depends_on("r-satellite", type=("build", "run"))
depends_on("r-scales@0.2.5:", type=("build", "run"))
depends_on("r-servr", type=("build", "run"), when="@2.10.0:")
depends_on("r-sf", type=("build", "run"))
depends_on("r-sp", type=("build", "run"))
- depends_on("r-webshot", type=("build", "run"))
depends_on("gmake", type="build")
+
+ depends_on("r-webshot", type=("build", "run"), when="@:2.11.0")
diff --git a/var/spack/repos/builtin/packages/r-markdown/package.py b/var/spack/repos/builtin/packages/r-markdown/package.py
index 2453101e8e..6f3ed794bb 100644
--- a/var/spack/repos/builtin/packages/r-markdown/package.py
+++ b/var/spack/repos/builtin/packages/r-markdown/package.py
@@ -19,6 +19,7 @@ class RMarkdown(RPackage):
license("MIT")
+ version("1.13", sha256="385421c674cf5bf2ba04d1df7c16bb5d857bec03755a36321999ac37f5b3cfd9")
version("1.6", sha256="46228b8d8161ae4b651b4662364eb35a3b91e6a7a457fe99d0e709f2a6f559ea")
version("1.3", sha256="b1773e94e7b927c3a8540c2704b06e0f7721a0e3538a93abd58fff420ecb30f1")
version("1.1", sha256="8d8cd47472a37362e615dbb8865c3780d7b7db694d59050e19312f126e5efc1b")
diff --git a/var/spack/repos/builtin/packages/r-mass/package.py b/var/spack/repos/builtin/packages/r-mass/package.py
index 035d1ed900..4120bc3c4d 100644
--- a/var/spack/repos/builtin/packages/r-mass/package.py
+++ b/var/spack/repos/builtin/packages/r-mass/package.py
@@ -14,6 +14,7 @@ class RMass(RPackage):
cran = "MASS"
+ version("7.3-61", sha256="3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90")
version("7.3-59", sha256="454200bec7a52835fbb7f9fe8e01a7aaa728b3ab87b068fc6d900e01c930da5a")
version("7.3-58.1", sha256="f704e4e2fb131740d023ae1755c925c2e684886a3061b08e26397135f1231420")
version("7.3-57", sha256="bd8b880105bc1aadb2db699086f74bd92a8611287979a24243187f9d80795a8d")
@@ -28,3 +29,4 @@ class RMass(RPackage):
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@3.3.0:", type=("build", "run"), when="@7.3-55:")
depends_on("r@4.2.0:", type=("build", "run"), when="@7.3-59:")
+ depends_on("r@4.4.0:", type=("build", "run"), when="@7.3-60.1:")
diff --git a/var/spack/repos/builtin/packages/r-matlab/package.py b/var/spack/repos/builtin/packages/r-matlab/package.py
index 1483e71247..f0b0666a19 100644
--- a/var/spack/repos/builtin/packages/r-matlab/package.py
+++ b/var/spack/repos/builtin/packages/r-matlab/package.py
@@ -15,6 +15,7 @@ class RMatlab(RPackage):
license("Artistic-2.0")
+ version("1.0.4.1", sha256="fc3fba560b73a9bf0a4f317340856c91af2c9dcc80f5df291f3f7e6d6ac4fd50")
version("1.0.4", sha256="1988a2220703444a575f2bad4eb090a0da71478599eb53081dd7237b7ec216ea")
version("1.0.2", sha256="a23dec736c51ae1864c1a53caac556a2f98e8020138a3b121badb0f5b7984154")
diff --git a/var/spack/repos/builtin/packages/r-matrix/package.py b/var/spack/repos/builtin/packages/r-matrix/package.py
index 16dbc8fe2f..a2d8cda3aa 100644
--- a/var/spack/repos/builtin/packages/r-matrix/package.py
+++ b/var/spack/repos/builtin/packages/r-matrix/package.py
@@ -18,6 +18,7 @@ class RMatrix(RPackage):
license("GPL-3.0-only")
+ version("1.7-0", sha256="fb97bba0df370222eb4f7e2da2e94dd01053b5e054b1c51829ff9a6efc08ad37")
version("1.5-4", sha256="15ceb61993d61b442068104abb46e6d91b5a1179c01eeb64563b853abab66f06")
version("1.5-1", sha256="557dba0358172d67dc63eb5db90841915bb5ce1528f941a8005ae808d635575d")
version("1.4-1", sha256="42b24f1d1e94482b0ff0ef1292e2df29f69694bdbee47b3d6bfeec46fafb2f7e")
@@ -32,7 +33,8 @@ class RMatrix(RPackage):
version("1.2-6", sha256="4b49b639b7bf612fa3d1c1b1c68125ec7859c8cdadae0c13f499f24099fd5f20")
depends_on("r@3.0.1:", type=("build", "run"))
- depends_on("r@3.2.0:", type=("build", "run"), when="@1.2.13:")
+ depends_on("r@3.2.0:", type=("build", "run"), when="@1.2-13:")
depends_on("r@3.6.0:", type=("build", "run"), when="@1.3-2:")
depends_on("r@3.5.0:", type=("build", "run"), when="@1.3-3:")
+ depends_on("r@4.4.0:", type=("build", "run"), when="@1.7-0:")
depends_on("r-lattice", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-matrixmodels/package.py b/var/spack/repos/builtin/packages/r-matrixmodels/package.py
index ead6d5734c..d5839d1ec7 100644
--- a/var/spack/repos/builtin/packages/r-matrixmodels/package.py
+++ b/var/spack/repos/builtin/packages/r-matrixmodels/package.py
@@ -14,6 +14,7 @@ class RMatrixmodels(RPackage):
cran = "MatrixModels"
+ version("0.5-3", sha256="c2db5406c6b0b9d348b44eea215a39c64fc087099fea1342a04d50326577f20f")
version("0.5-1", sha256="3fc55bdfa5ab40c75bf395e90983d14c9715078c33c727c1658e4e1f36e43ea9")
version("0.5-0", sha256="a87faf1a185219f79ea2307e6787d293e1d30bf3af9398e8cfe1e079978946ed")
version("0.4-1", sha256="fe878e401e697992a480cd146421c3a10fa331f6b37a51bac83b5c1119dcce33")
@@ -22,3 +23,4 @@ class RMatrixmodels(RPackage):
depends_on("r@3.6.0:", type=("build", "run"), when="@0.5-1:")
depends_on("r-matrix@1.1-5:", type=("build", "run"))
depends_on("r-matrix@1.4-2:", type=("build", "run"), when="@0.5-1:")
+ depends_on("r-matrix@1.6-0:", type=("build", "run"), when="@0.5-2:")
diff --git a/var/spack/repos/builtin/packages/r-matrixstats/package.py b/var/spack/repos/builtin/packages/r-matrixstats/package.py
index aeb8639d08..5a90d3d333 100644
--- a/var/spack/repos/builtin/packages/r-matrixstats/package.py
+++ b/var/spack/repos/builtin/packages/r-matrixstats/package.py
@@ -17,6 +17,7 @@ class RMatrixstats(RPackage):
cran = "matrixStats"
+ version("1.3.0", sha256="413ee607d95b243c514b4a7c4944c2caea1fb264d27c96ff547c3939f893245a")
version("0.63.0", sha256="c000b60421742eb035ff4ceedd3e588a79e4b28985484f0c81361e5a6c351f5f")
version("0.62.0", sha256="85e2016b6dd20cbfe32d38a2ef2578ae80e688d9a3590aefd1d2f4bf4bd44eca")
version("0.61.0", sha256="dbd3c0ec59b1ae62ff9b4c2c90c4687cbd680d1796f6fdd672319458d4d2fd9a")
diff --git a/var/spack/repos/builtin/packages/r-mclust/package.py b/var/spack/repos/builtin/packages/r-mclust/package.py
index 76ad0b7e0e..4eb1b82d5c 100644
--- a/var/spack/repos/builtin/packages/r-mclust/package.py
+++ b/var/spack/repos/builtin/packages/r-mclust/package.py
@@ -19,6 +19,7 @@ class RMclust(RPackage):
license("GPL-2.0-or-later")
+ version("6.1.1", sha256="ddd7018e5e6ea7f92c7fc9872b391491b7e91c2cd89ef1dcaf4408afb5116775")
version("6.0.0", sha256="de7c306ecba1ef0f4e4a56c748ce08149417496b711beefb032d561a4c28122a")
version("5.4.10", sha256="2a1bbbf3c4a17df08d1ba8bc4d3c6d9c7241ed5fd68b8aabe660115597b60672")
version("5.4.9", sha256="65f123c6af86cf5eb511c81ae0eafa60da7b2085bfea1a08bdc3116081da9568")
diff --git a/var/spack/repos/builtin/packages/r-mcmc/package.py b/var/spack/repos/builtin/packages/r-mcmc/package.py
index 3e32f58cef..0b65a3ddbd 100644
--- a/var/spack/repos/builtin/packages/r-mcmc/package.py
+++ b/var/spack/repos/builtin/packages/r-mcmc/package.py
@@ -21,6 +21,8 @@ class RMcmc(RPackage):
license("MIT")
+ version("0.9-8", sha256="6a06440d4b58e8a7f122747d92046ff40da4bb58a20bf642228a648a0c826ea7")
version("0.9-7", sha256="b7c4d3d5f9364c67a4a3cd49296a61c315ad9bd49324a22deccbacb314aa8260")
depends_on("r@3.0.2:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@0.9-8:")
diff --git a/var/spack/repos/builtin/packages/r-mcmcglmm/package.py b/var/spack/repos/builtin/packages/r-mcmcglmm/package.py
index 7519f50751..83cd8b62c2 100644
--- a/var/spack/repos/builtin/packages/r-mcmcglmm/package.py
+++ b/var/spack/repos/builtin/packages/r-mcmcglmm/package.py
@@ -15,6 +15,7 @@ class RMcmcglmm(RPackage):
cran = "MCMCglmm"
+ version("2.36", sha256="66ffd9aaf8035c7abe7208c8514c60cb56c8c6a170de207d6608f5c44a4f8af1")
version("2.34", sha256="829151cca93b05979ece98157e7789d5e5c1c0b4942d69aa9886de03d16091f1")
version("2.33", sha256="b56d72e799f8ed5fa2a05ecc743e5b8051f9cc2de57ad3e6de2dcb1c1715d4fc")
version("2.32", sha256="a9156e1e0d0f912f2f239476dc8765dc61c480f903381be7ec5db05bd6d3f0b3")
diff --git a/var/spack/repos/builtin/packages/r-mcmcpack/package.py b/var/spack/repos/builtin/packages/r-mcmcpack/package.py
index 80a0d6ac68..4e3e289afd 100644
--- a/var/spack/repos/builtin/packages/r-mcmcpack/package.py
+++ b/var/spack/repos/builtin/packages/r-mcmcpack/package.py
@@ -19,6 +19,7 @@ class RMcmcpack(RPackage):
cran = "MCMCpack"
+ version("1.7-0", sha256="846073d710017ec1dc9a2b4616cb6aeb60ce04e3500a37214522818d34045def")
version("1.6-3", sha256="cb14ba20690b31fd813b05565484c866425f072a5ad99a5cbf1da63588958db3")
version("1.6-0", sha256="b5b9493457d11d4dca12f7732bd1b3eb1443852977c8ee78393126f13deaf29b")
version("1.5-0", sha256="795ffd3d62bf14d3ecb3f5307bd329cd75798cf4b270ff0e768bc71a35de0ace")
@@ -26,9 +27,8 @@ class RMcmcpack(RPackage):
depends_on("r@3.6:", type=("build", "run"))
depends_on("r-coda@0.11-3:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
+ depends_on("r-mass", type=("build", "run"))
depends_on("r-mcmc", type=("build", "run"))
depends_on("r-quantreg", type=("build", "run"))
- depends_on("r-mass", type=("build", "run"), when="@:1.6-0")
-
conflicts("%gcc@:3")
diff --git a/var/spack/repos/builtin/packages/r-mco/package.py b/var/spack/repos/builtin/packages/r-mco/package.py
index 1f9d061f04..541e0636bd 100644
--- a/var/spack/repos/builtin/packages/r-mco/package.py
+++ b/var/spack/repos/builtin/packages/r-mco/package.py
@@ -17,8 +17,10 @@ class RMco(RPackage):
license("GPL-2.0-only")
+ version("1.17", sha256="8288e99159a541855bd286baf586e61201e286dfd244080aef128871b1699ea2")
version("1.15.6", sha256="17ebe279cb9c89b7cd8054ac50d3b657d2b10dadbc584b88da7e79c3a9680582")
version("1.0-15.1", sha256="3c13ebc8c1f1bfa18f3f95b3998c57fde5259876e92456b6c6d4c59bef07c193")
version("1.0-15", sha256="a25e3effbb6dcae735fdbd6c0bfc775e9fbbcc00dc00076b69c53fe250627055")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.4.0:", type=("build", "run"), when="@1.17:")
diff --git a/var/spack/repos/builtin/packages/r-mda/package.py b/var/spack/repos/builtin/packages/r-mda/package.py
index ea00d0f377..555d28efb4 100644
--- a/var/spack/repos/builtin/packages/r-mda/package.py
+++ b/var/spack/repos/builtin/packages/r-mda/package.py
@@ -16,6 +16,7 @@ class RMda(RPackage):
license("GPL-2.0-only")
+ version("0.5-4", sha256="f25f7f28807d0fa478b1b55eb9d026ebc30577d9d5ff288f9abfe1f3fdb8a759")
version("0.5-3", sha256="bda6409c17f385fae97da458cc742334e7b47aab8217a975b7551e2e18d38463")
version("0.5-2", sha256="344f2053215ddf535d1554b4539e9b09067dac878887cc3eb995cef421fc00c3")
version("0.4-10", sha256="7036bc622a8fea5b2de94fc19e6b64f5f0c27e5d743ae7646e116af08c9de6a5")
diff --git a/var/spack/repos/builtin/packages/r-memisc/package.py b/var/spack/repos/builtin/packages/r-memisc/package.py
index 983cf8f355..b79ef63ca6 100644
--- a/var/spack/repos/builtin/packages/r-memisc/package.py
+++ b/var/spack/repos/builtin/packages/r-memisc/package.py
@@ -20,6 +20,7 @@ class RMemisc(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("0.99.31.7", sha256="b403185850520db18ebd608df85c76df80e6c64af428cdc4e49c2fe487483637")
version("0.99.31.6", sha256="52336b4ffc6e60c3ed10ccc7417231582b0d2e4c5c3b2184396a7d3ca9c1d96e")
depends_on("r@3.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-memuse/package.py b/var/spack/repos/builtin/packages/r-memuse/package.py
index e1abbbc631..4177e53fb7 100644
--- a/var/spack/repos/builtin/packages/r-memuse/package.py
+++ b/var/spack/repos/builtin/packages/r-memuse/package.py
@@ -25,4 +25,6 @@ class RMemuse(RPackage):
version("4.2-1", sha256="f5e9dbaad4efbbfe219a93f446e318a00cad5b294bfc60ca2146eca894b47cf3")
version("4.1-0", sha256="58d6d1ca5d6bd481f4ed299eff6a9d5660eb0f8db1abe54c49e144093cba72ad")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py
index 45e0017a92..c2aaec6da7 100644
--- a/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py
+++ b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py
@@ -17,6 +17,7 @@ class RMendelianrandomization(RPackage):
cran = "MendelianRandomization"
+ version("0.10.0", sha256="0851e91f826424f20fd4a58348ffe161d147bdc091d24d676e14d4cd6180e13c")
version("0.7.0", sha256="cad7cc1b6964fc7d299864378694c5fd947caa83796a1958e581299796b854c7")
depends_on("r@3.0.1:", type=("build", "run"))
@@ -30,3 +31,6 @@ class RMendelianrandomization(RPackage):
depends_on("r-quantreg@5.01:", type=("build", "run"))
depends_on("r-rjson", type=("build", "run"))
depends_on("r-glmnet", type=("build", "run"))
+ depends_on("r-numderiv", type=("build", "run"), when="@0.10.0:")
+ depends_on("r-rcpp", type=("build", "run"), when="@0.10.0:")
+ depends_on("r-rcpparmadillo", type=("build", "run"), when="@0.10.0:")
diff --git a/var/spack/repos/builtin/packages/r-meta/package.py b/var/spack/repos/builtin/packages/r-meta/package.py
index 9a1facc534..aa15244e8d 100644
--- a/var/spack/repos/builtin/packages/r-meta/package.py
+++ b/var/spack/repos/builtin/packages/r-meta/package.py
@@ -26,11 +26,18 @@ class RMeta(RPackage):
license("GPL-2.0-or-later")
+ version("7.0-0", sha256="d8ead9c94f0d2b42766b8ea8358f40d0641cdcc9c25ba4b9a5fff1a59497de7d")
version("6.2-1", sha256="2c2a0d4d8f3b07211120b232a155e3e1312164ce18817e0d5693c8da5da1d6cc")
version("6.2-0", sha256="8ec8fb412996bbe17d3ca073f15c191a77bad486b08f39d7b8c2d07360ad5781")
depends_on("r@4.0.0:", type=("build", "run"))
- depends_on("r-metafor@3.0-0:", type=("build", "run"))
- depends_on("r-lme4", type=("build", "run"))
depends_on("r-compquadform", type=("build", "run"))
+ depends_on("r-dplyr", type=("build", "run"), when="@7.0-0:")
+ depends_on("r-lme4", type=("build", "run"))
+ depends_on("r-magrittr", type=("build", "run"), when="@7.0-0:")
+ depends_on("r-metadat", type=("build", "run"), when="@7.0-0:")
+ depends_on("r-metafor@3.0-0:", type=("build", "run"))
+ depends_on("r-purrr", type=("build", "run"), when="@7.0-0:")
+ depends_on("r-readr", type=("build", "run"), when="@7.0-0:")
+ depends_on("r-stringr", type=("build", "run"), when="@7.0-0:")
depends_on("r-xml2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-metafor/package.py b/var/spack/repos/builtin/packages/r-metafor/package.py
index 0d7716b13f..df0be2ae80 100644
--- a/var/spack/repos/builtin/packages/r-metafor/package.py
+++ b/var/spack/repos/builtin/packages/r-metafor/package.py
@@ -31,6 +31,7 @@ class RMetafor(RPackage):
license("GPL-2.0-or-later")
+ version("4.6-0", sha256="07344cc3bd87b8bd25ef998e9a6ce322ae8e448ef5af06ec3e79631724e18666")
version("4.0-0", sha256="5cd552ebaf225b745c2e4d944ca80986dd1ad6f1a4c902fb646f3cb11b8dc23b")
version("3.8-1", sha256="d694577f954144d8a5eeab6521fe1c87e68ddf9ecfd7ccc915d01533371b0514")
diff --git a/var/spack/repos/builtin/packages/r-metap/package.py b/var/spack/repos/builtin/packages/r-metap/package.py
index 514c44074d..4e144ec6e7 100644
--- a/var/spack/repos/builtin/packages/r-metap/package.py
+++ b/var/spack/repos/builtin/packages/r-metap/package.py
@@ -19,6 +19,7 @@ class RMetap(RPackage):
license("GPL-2.0-only")
+ version("1.11", sha256="34e8c9fc3ccaae23f57389001987de02339416f843084869f92ff635052093b7")
version("1.8", sha256="ee9501a8de8a4c47af1632e6053e42ef53fc4b8bdf0f2759edc4d3eefaf5552b")
version("1.7", sha256="d9b511607d0e37de4428549061c5577a4e812b0f55bb7ed887d1b24711f58c42")
version("1.4", sha256="5fac23d823d0ad4eebc3f97620364e25f7b41f8d0c3579f6c09ec059940b85a5")
diff --git a/var/spack/repos/builtin/packages/r-metapod/package.py b/var/spack/repos/builtin/packages/r-metapod/package.py
index 595c008a66..1a43e60491 100644
--- a/var/spack/repos/builtin/packages/r-metapod/package.py
+++ b/var/spack/repos/builtin/packages/r-metapod/package.py
@@ -23,4 +23,6 @@ class RMetapod(RPackage):
version("1.6.0", commit="cfeaa959f5c6b2119df270f40af9c3ea718c4b00")
version("1.4.0", commit="e71c2072e5b39f74599e279b28f4da7923b515fb")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-mgcv/package.py b/var/spack/repos/builtin/packages/r-mgcv/package.py
index a0e59e0b84..92416dc5bf 100644
--- a/var/spack/repos/builtin/packages/r-mgcv/package.py
+++ b/var/spack/repos/builtin/packages/r-mgcv/package.py
@@ -21,6 +21,7 @@ class RMgcv(RPackage):
license("GPL-2.0-or-later")
+ version("1.9-1", sha256="700fbc37bedd3a49505b9bc4949faee156d9cfb4f669d797d06a10a15a5bdb32")
version("1.8-42", sha256="087fc38b64ad06f2149eafc54f2679dd8840cf6fc488e66cf131e3c1de2db6c7")
version("1.8-41", sha256="2f7a030fe2be75edef6bd96147df46c2262f3cdc44c383d8f82b401df44fe690")
version("1.8-40", sha256="dbe627266c3b339232e2d4228d5370ba88c86540319e6891d161242efba7e4a5")
diff --git a/var/spack/repos/builtin/packages/r-mice/package.py b/var/spack/repos/builtin/packages/r-mice/package.py
index d61198a6c3..8fe870277b 100644
--- a/var/spack/repos/builtin/packages/r-mice/package.py
+++ b/var/spack/repos/builtin/packages/r-mice/package.py
@@ -25,6 +25,7 @@ class RMice(RPackage):
license("GPL-2.0-or-later")
+ version("3.16.0", sha256="29f0285185a540337e9dde2357690c82d174f115be701ee2f0a7083173a44040")
version("3.15.0", sha256="3d64dd260e3dce9c4c2f7be8c99f3063769df9ccfd3a0fc827c2de0ac842e87b")
version("3.14.0", sha256="f87bb73d8bfee36c6bf4f15779c59ff6b70c70ca25b1388b4ee236757276d605")
version("3.12.0", sha256="575d9e650d5fc8cd66c0b5a2f1e659605052b26d61f772fff5eed81b414ef144")
@@ -36,9 +37,13 @@ class RMice(RPackage):
depends_on("r-broom", type=("build", "run"))
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-generics", type=("build", "run"), when="@3.12.0:")
+ depends_on("r-glmnet", type=("build", "run"), when="@3.16.0:")
depends_on("r-lattice", type=("build", "run"))
+ depends_on("r-mitml", type=("build", "run"), when="@3.16.0:")
+ depends_on("r-nnet", type=("build", "run"), when="@3.16.0:")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
+ depends_on("r-rpart", type=("build", "run"), when="@3.16.0:")
depends_on("r-tidyr", type=("build", "run"), when="@3.12.0:")
depends_on("r-cpp11", type=("build", "run"), when="@3.12.0:")
diff --git a/var/spack/repos/builtin/packages/r-microbenchmark/package.py b/var/spack/repos/builtin/packages/r-microbenchmark/package.py
index 5382fa8ac5..6b43c99afc 100644
--- a/var/spack/repos/builtin/packages/r-microbenchmark/package.py
+++ b/var/spack/repos/builtin/packages/r-microbenchmark/package.py
@@ -16,5 +16,6 @@ class RMicrobenchmark(RPackage):
license("BSD-2-Clause")
+ version("1.4.10", sha256="04cc41be72708dce8d31ff1cb105d88cc9f167250ea00fe9a165c99204b9b481")
version("1.4.9", sha256="443d2caf370ef33e4ac2773176ad9eb86f8790f43b430968ef9647699dbbffd2")
version("1.4-7", sha256="268f13c6323dd28cc2dff7e991bb78b814a8873b4a73f4a3645f40423da984f6")
diff --git a/var/spack/repos/builtin/packages/r-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py
index 2ba4d9bff8..b9ac2896a1 100644
--- a/var/spack/repos/builtin/packages/r-mime/package.py
+++ b/var/spack/repos/builtin/packages/r-mime/package.py
@@ -23,3 +23,5 @@ class RMime(RPackage):
version("0.6", sha256="4775b605ab0117406bee7953c8af59eea8b35e67d1bd63f4007686a7097fc401")
version("0.5", sha256="fcc72115afb0eb43237da872754464f37ae9ae097f332ec7984149b5e3a82145")
version("0.4", sha256="d790c7e38371d03774a7d53f75aed3151835b1aebbb663b0fe828b221e6bac90")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-minqa/package.py b/var/spack/repos/builtin/packages/r-minqa/package.py
index 44337b542c..a7dfbe87cb 100644
--- a/var/spack/repos/builtin/packages/r-minqa/package.py
+++ b/var/spack/repos/builtin/packages/r-minqa/package.py
@@ -16,6 +16,7 @@ class RMinqa(RPackage):
license("GPL-2.0-only")
+ version("1.2.8", sha256="5941e4b9b01978fc6d9fe24e6ca60cca66883fe9fa6ff3cbfa32aa1ac9db5467")
version("1.2.5", sha256="9b83562390990d04b2c61b63ac9a7c9ecab0d35c460d232596e3c73bdc89f4be")
version("1.2.4", sha256="cfa193a4a9c55cb08f3faf4ab09c11b70412523767f19894e4eafc6e94cccd0c")
diff --git a/var/spack/repos/builtin/packages/r-mixtools/package.py b/var/spack/repos/builtin/packages/r-mixtools/package.py
index 64a6c88194..b7f3b32130 100644
--- a/var/spack/repos/builtin/packages/r-mixtools/package.py
+++ b/var/spack/repos/builtin/packages/r-mixtools/package.py
@@ -32,6 +32,8 @@ class RMixtools(RPackage):
version("1.1.0", sha256="543fd8d8dc8d4b6079ebf491cf97f27d6225e1a6e65d8fd48553ada23ba88d8f")
version("1.0.4", sha256="62f4b0a17ce520c4f8ed50ab44f120e459143b461a9e420cd39056ee4fc8798c")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.2:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@1.2.0:")
depends_on("r@4.0.0:", type=("build", "run"), when="@2.0.0:")
diff --git a/var/spack/repos/builtin/packages/r-mlbench/package.py b/var/spack/repos/builtin/packages/r-mlbench/package.py
index f70c74bece..c99a10467b 100644
--- a/var/spack/repos/builtin/packages/r-mlbench/package.py
+++ b/var/spack/repos/builtin/packages/r-mlbench/package.py
@@ -16,6 +16,7 @@ class RMlbench(RPackage):
license("GPL-2.0-only")
+ version("2.1-5", sha256="4dbfd652adda7c0caf544d3a6cd23a2ee97c22faefe4d15b8a6782061cc9e76f")
version("2.1-3", sha256="b1f92be633243185ab86e880a1e1ac5a4dd3c535d01ebd187a4872d0a8c6f194")
version("2.1-1", sha256="748141d56531a39dc4d37cf0a5165a40b653a04c507e916854053ed77119e0e6")
diff --git a/var/spack/repos/builtin/packages/r-mlr/package.py b/var/spack/repos/builtin/packages/r-mlr/package.py
index 00c402838e..8927e32c22 100644
--- a/var/spack/repos/builtin/packages/r-mlr/package.py
+++ b/var/spack/repos/builtin/packages/r-mlr/package.py
@@ -24,6 +24,7 @@ class RMlr(RPackage):
license("BSD-2-Clause")
+ version("2.19.2", sha256="85e67049f1067a7eae0f0e5b5c4e4e46a25407a17750512220f438a0fa5097c5")
version("2.19.1", sha256="9d52afd54d9d5746e798134d5675818cee65caa53d7eaf317d46ba88d5865202")
version("2.19.0", sha256="1149c9b453896481c85906045aa82d511d96979ddecbe5a3faf04f9f4a5e6113")
version("2.18.0", sha256="c2fe74e90ed32e5f4cbb0c09a1742051688d87db2f12dd408ddad0f5afc7f8d3")
diff --git a/var/spack/repos/builtin/packages/r-mlrmbo/package.py b/var/spack/repos/builtin/packages/r-mlrmbo/package.py
index 0b945e185a..db8931d176 100644
--- a/var/spack/repos/builtin/packages/r-mlrmbo/package.py
+++ b/var/spack/repos/builtin/packages/r-mlrmbo/package.py
@@ -31,6 +31,8 @@ class RMlrmbo(RPackage):
version("1.1.1", sha256="e87d9912a9b4a968364584205b8ef6f7fea0b5aa043c8d31331a7b7be02dd7e4")
version("1.1.0", sha256="6ae82731a566333f06085ea2ce23ff2a1007029db46eea57d06194850350a8a0")
+ depends_on("c", type="build") # generated
+
depends_on("r+X", type=("build", "run"))
depends_on("r-mlr@2.10:", type=("build", "run"))
depends_on("r-paramhelpers@1.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-mnormt/package.py b/var/spack/repos/builtin/packages/r-mnormt/package.py
index 06d3455791..5b498b1989 100644
--- a/var/spack/repos/builtin/packages/r-mnormt/package.py
+++ b/var/spack/repos/builtin/packages/r-mnormt/package.py
@@ -24,5 +24,8 @@ class RMnormt(RPackage):
version("2.0.2", sha256="5c6aa036d3f1035ffe8f9a8e95bb908b191b126b016591cf893c50472851f334")
version("1.5-5", sha256="ff78d5f935278935f1814a69e5a913d93d6dd2ac1b5681ba86b30c6773ef64ac")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.2.0:", type=("build", "run"))
depends_on("r-tmvnsim@1.0-2:", type=("build", "run"), when="@2.0.2")
diff --git a/var/spack/repos/builtin/packages/r-mockery/package.py b/var/spack/repos/builtin/packages/r-mockery/package.py
index 12e25a80e6..8ccce8f802 100644
--- a/var/spack/repos/builtin/packages/r-mockery/package.py
+++ b/var/spack/repos/builtin/packages/r-mockery/package.py
@@ -19,6 +19,7 @@ class RMockery(RPackage):
license("MIT")
+ version("0.4.4", sha256="072220a0f2455fca91649fc7ce4ed503cfaa965aa769d1bd0fd6622b222845c3")
version("0.4.3", sha256="9fc9f1565c51e51b33634e9fc5328211559a561f095bc4d0fa8bd8b7533d476a")
version("0.4.2", sha256="988e249c366ee7faf277de004084cf5ca24b5c8a8c6e3842f1b1362ce2f7ea9b")
version("0.4.1", sha256="959d83f8b21e9a89c06c73f310356790c2d63d5ba39b2b60c6777a4eb33909c1")
diff --git a/var/spack/repos/builtin/packages/r-modelmetrics/package.py b/var/spack/repos/builtin/packages/r-modelmetrics/package.py
index 7cfe7a9e12..8c2d175f5a 100644
--- a/var/spack/repos/builtin/packages/r-modelmetrics/package.py
+++ b/var/spack/repos/builtin/packages/r-modelmetrics/package.py
@@ -20,6 +20,8 @@ class RModelmetrics(RPackage):
version("1.2.0", sha256="3021ae88733695a35d66e279e8e61861431f14c9916a341f0a562f675cf6ede9")
version("1.1.0", sha256="487d53fda57da4b29f83a927dda8b1ae6655ab044ee3eec33c38aeb27eed3d85")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2.2:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-data-table", type=("build", "run"), when="@1.2.0:")
diff --git a/var/spack/repos/builtin/packages/r-mscoreutils/package.py b/var/spack/repos/builtin/packages/r-mscoreutils/package.py
index 769d7528c6..c532fa691d 100644
--- a/var/spack/repos/builtin/packages/r-mscoreutils/package.py
+++ b/var/spack/repos/builtin/packages/r-mscoreutils/package.py
@@ -24,6 +24,8 @@ class RMscoreutils(RPackage):
version("1.8.0", commit="8b7e2c31009276aad0b418ba5cdfc94d03e1973e")
version("1.6.0", commit="9ed95b2d20dacaa83567fadd04349c81db9127ef")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.6.0:", type=("build", "run"))
depends_on("r-s4vectors", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-msnbase/package.py b/var/spack/repos/builtin/packages/r-msnbase/package.py
index e7c550f9ca..bdbfd7b28e 100644
--- a/var/spack/repos/builtin/packages/r-msnbase/package.py
+++ b/var/spack/repos/builtin/packages/r-msnbase/package.py
@@ -26,6 +26,9 @@ class RMsnbase(RPackage):
version("2.4.2", commit="c045d65daa730c7837852e6343a05cae9644ab5e")
version("2.2.0", commit="d6e8fb7f106d05096fa9074da0f829ac8f02c197")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@2.16.1:")
depends_on("r-biocgenerics@0.7.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-multcomp/package.py b/var/spack/repos/builtin/packages/r-multcomp/package.py
index 6fd24c0aa9..3e709c8621 100644
--- a/var/spack/repos/builtin/packages/r-multcomp/package.py
+++ b/var/spack/repos/builtin/packages/r-multcomp/package.py
@@ -19,6 +19,7 @@ class RMultcomp(RPackage):
license("GPL-2.0-only")
+ version("1.4-26", sha256="a100bbdfaffb8b9cf9a59decf80267421673c4f1eef44c0bc3f77be16b3a69ec")
version("1.4-23", sha256="425154a58bd8f2dbaff5d16e97b03473cbc0d571b1c2e4dd66a13c6d20a8cde1")
version("1.4-20", sha256="328be4fa4189bde4a7bc645d9ae5ea071ebe31ed658c8c48c4e45aa8e8c42cfc")
version("1.4-19", sha256="f03473b1cfbc714cd85a0ee948e2ecdb23bcdccbe95e27237ee25e9c71e3e557")
diff --git a/var/spack/repos/builtin/packages/r-multcompview/package.py b/var/spack/repos/builtin/packages/r-multcompview/package.py
index bbb75b1dc4..6e95f5fa84 100644
--- a/var/spack/repos/builtin/packages/r-multcompview/package.py
+++ b/var/spack/repos/builtin/packages/r-multcompview/package.py
@@ -18,5 +18,6 @@ class RMultcompview(RPackage):
cran = "multcompView"
+ version("0.1-10", sha256="38f249b22758c9f727b1656d1a08c6022a06a1ea319364ff680147d64598ad8a")
version("0.1-9", sha256="1f3993e9d51f3c7a711a881b6a20081a85ffab60c27828ceb3640a6b4c887397")
version("0.1-8", sha256="123d539172ad6fc63d83d1fc7f356a5ed7b691e7803827480118bebc374fd8e5")
diff --git a/var/spack/repos/builtin/packages/r-multicool/package.py b/var/spack/repos/builtin/packages/r-multicool/package.py
index fd79b36bde..a709fbf6ba 100644
--- a/var/spack/repos/builtin/packages/r-multicool/package.py
+++ b/var/spack/repos/builtin/packages/r-multicool/package.py
@@ -29,6 +29,7 @@ class RMulticool(RPackage):
license("GPL-2.0-only")
+ version("1.0.1", sha256="bd72de1fbd7ea32018d6af09ac2af80871ebe26bf9dfdf1ba53f87e6cff56c1f")
version("0.1-12", sha256="487d28d9c3c606be0cf56e2d8f8b0d79fb71949c68886ea9251fbb1c01664a36")
version("0.1-11", sha256="1c907e64af2ac39facdf431a5691e69649f64af1f50e198ae39da5bf30026476")
version("0.1-10", sha256="5bb0cb0d9eb64420c862877247a79bb0afadacfe23262ec8c3fa26e5e34d6ff9")
diff --git a/var/spack/repos/builtin/packages/r-multitaper/package.py b/var/spack/repos/builtin/packages/r-multitaper/package.py
index 024e7bbe30..5784745e4d 100644
--- a/var/spack/repos/builtin/packages/r-multitaper/package.py
+++ b/var/spack/repos/builtin/packages/r-multitaper/package.py
@@ -22,6 +22,7 @@ class RMultitaper(RPackage):
license("GPL-2.0-or-later")
+ version("1.0-17", sha256="3430ca62be2ee491d29b05e461647327a8977743241af2d3c39277c920170af3")
version("1.0-15", sha256="837d71f3b46fbce2bea210449cf75e609f5363ff23b7808f5f115fdc51e6a3be")
version("1.0-14", sha256="c84c122541dc2874131446e23b212259b3b00590d701efee49e6740fd74a8d13")
diff --git a/var/spack/repos/builtin/packages/r-multtest/package.py b/var/spack/repos/builtin/packages/r-multtest/package.py
index 6fa806025d..3f60c5577a 100644
--- a/var/spack/repos/builtin/packages/r-multtest/package.py
+++ b/var/spack/repos/builtin/packages/r-multtest/package.py
@@ -40,6 +40,8 @@ class RMulttest(RPackage):
version("2.34.0", commit="6ef873e05e6c93ede54f3421424f56eda057cd54")
version("2.32.0", commit="c5e890dfbffcc3a3f107303a24b6085614312f4a")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-biocgenerics", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-munsell/package.py b/var/spack/repos/builtin/packages/r-munsell/package.py
index 44e8c0c428..fd67db6402 100644
--- a/var/spack/repos/builtin/packages/r-munsell/package.py
+++ b/var/spack/repos/builtin/packages/r-munsell/package.py
@@ -19,6 +19,7 @@ class RMunsell(RPackage):
license("MIT")
+ version("0.5.1", sha256="03a2fd9ac40766cded96dfe33b143d872d0aaa262a25482ce19161ca959429a6")
version("0.5.0", sha256="d0f3a9fb30e2b5d411fa61db56d4be5733a2621c0edf017d090bdfa5e377e199")
version("0.4.3", sha256="397c3c90af966f48eebe8f5d9e40c41b17541f0baaa102eec3ea4faae5a2bd49")
diff --git a/var/spack/repos/builtin/packages/r-mvtnorm/package.py b/var/spack/repos/builtin/packages/r-mvtnorm/package.py
index 57fead3897..00d927b93d 100644
--- a/var/spack/repos/builtin/packages/r-mvtnorm/package.py
+++ b/var/spack/repos/builtin/packages/r-mvtnorm/package.py
@@ -16,6 +16,7 @@ class RMvtnorm(RPackage):
license("GPL-2.0-only")
+ version("1.2-6", sha256="c4dedc3c296ed8e5fd2faecdba6de302bca1dd2e96b84fd846c47a54286acd31")
version("1.1-3", sha256="ff4e302139ba631280fc9c4a2ab168596bfd09e17a805974199b043697c02448")
version("1.1-1", sha256="e965dad5e93babb7ded25b5ebdbd52332191b61f897d68853a379a07620d45de")
version("1.0-11", sha256="0321612de99aa9bc75a45c7e029d3372736014223cbdefb80d8cae600cbc7252")
diff --git a/var/spack/repos/builtin/packages/r-mzr/package.py b/var/spack/repos/builtin/packages/r-mzr/package.py
index df724a5961..0ae7b4beec 100644
--- a/var/spack/repos/builtin/packages/r-mzr/package.py
+++ b/var/spack/repos/builtin/packages/r-mzr/package.py
@@ -30,6 +30,8 @@ class RMzr(RPackage):
version("2.12.0", commit="f05eb27ae31c3d019cca10fc3b9ee513cbcdfc5a")
version("2.10.0", commit="a6168b68e48c281e88de9647254a8db1e21df388")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@4.0.0:", type=("build", "run"), when="@2.30.0:")
depends_on("r-rcpp@0.10.1:", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-nanotime/package.py b/var/spack/repos/builtin/packages/r-nanotime/package.py
index 35af382e82..07d29c1cd3 100644
--- a/var/spack/repos/builtin/packages/r-nanotime/package.py
+++ b/var/spack/repos/builtin/packages/r-nanotime/package.py
@@ -18,6 +18,7 @@ class RNanotime(RPackage):
license("GPL-2.0-or-later")
+ version("0.3.9", sha256="cc2965edfd68f83a84142ead27a5a84e1c5b2931ec911dddecb3e0bc3ffa79d8")
version("0.3.7", sha256="a771782653aef62a071682907fd7bd611f7f98fc80beda227d619aae166ccb15")
version("0.3.6", sha256="df751a5cb11ca9ac8762cd1e33bc73e7d20fde9339d2c46bc6f85873388568df")
version("0.3.5", sha256="44deaae58452bacea4855d018212593811401c2afc460ffb11905479013923a0")
diff --git a/var/spack/repos/builtin/packages/r-ncdf4/package.py b/var/spack/repos/builtin/packages/r-ncdf4/package.py
index 874a36f063..0c74f80b6a 100644
--- a/var/spack/repos/builtin/packages/r-ncdf4/package.py
+++ b/var/spack/repos/builtin/packages/r-ncdf4/package.py
@@ -28,6 +28,7 @@ class RNcdf4(RPackage):
license("GPL-3.0-or-later")
+ version("1.23", sha256="8b05fee9f79dc0605e487dd5d031d2c7dcaedec8f47904983b1c26739894da89")
version("1.21", sha256="2f5ae7def382c595c66b6ed0ea0529f8337108eb73de39939f9762f3fb21b30d")
version("1.19", sha256="cb8d139211fc7475c435ce9f6a43e47710603409dc523b053c8b7de9848dfb63")
version("1.17", sha256="db95c4729d3187d1a56dfd019958216f442be6221bd15e23cd597e6129219af6")
diff --git a/var/spack/repos/builtin/packages/r-network/package.py b/var/spack/repos/builtin/packages/r-network/package.py
index bea112a0b8..9028bd9c21 100644
--- a/var/spack/repos/builtin/packages/r-network/package.py
+++ b/var/spack/repos/builtin/packages/r-network/package.py
@@ -17,6 +17,7 @@ class RNetwork(RPackage):
license("GPL-2.0-or-later")
+ version("1.18.2", sha256="bf33892db9cabba9cd1597f09ef0e1277d63520a8cebd2d919e0d41fc706a27b")
version("1.18.1", sha256="c80d70352967d8480cfa801f2a31bfe130e2ad4dbf2c07b0046e57f3013cd243")
version("1.18.0", sha256="59f4b10174c87c8742c6b3c93c5e47833042375f5f872fdd23155b4a5244ce5b")
version("1.17.2", sha256="9588a198807c8c68da147f479ca9af5bcb4468cf91b6a90b8044d313d9fa30f7")
diff --git a/var/spack/repos/builtin/packages/r-nimble/package.py b/var/spack/repos/builtin/packages/r-nimble/package.py
index 816780deeb..c85b3e059f 100644
--- a/var/spack/repos/builtin/packages/r-nimble/package.py
+++ b/var/spack/repos/builtin/packages/r-nimble/package.py
@@ -28,6 +28,7 @@ class RNimble(RPackage):
license("BSD-3-Clause OR GPL-2.0-or-later")
+ version("1.2.1", sha256="2e8571e73e5b7553ee84db376444c18e211d4ba542ed415004c5128cb6802587")
version("0.13.1", sha256="dc70caab64a8a4e44fb13fa6d67f6f2a0453fa684669e24718758bb2a8cf8530")
version("0.12.2", sha256="2af7a3ab159a7f0b3b4b139da1db45be4b602f2c0e115cb0403b060ab0101a1b")
version("0.12.1", sha256="3520f3212a48c8cbe08a6a8e57b3a72180594f7c09f647d1daf417c9857867d8")
@@ -38,5 +39,7 @@ class RNimble(RPackage):
depends_on("r@3.1.2:", type=("build", "run"))
depends_on("r-igraph", type=("build", "run"))
depends_on("r-coda", type=("build", "run"))
+ depends_on("r-numderiv", type=("build", "run"), when="@1.2.1:")
+ depends_on("r-pracma", type=("build", "run"), when="@1.2.1:")
depends_on("r-r6", type=("build", "run"))
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/r-nleqslv/package.py b/var/spack/repos/builtin/packages/r-nleqslv/package.py
index da58b461a9..86dd4de0c7 100644
--- a/var/spack/repos/builtin/packages/r-nleqslv/package.py
+++ b/var/spack/repos/builtin/packages/r-nleqslv/package.py
@@ -19,6 +19,7 @@ class RNleqslv(RPackage):
license("GPL-2.0-or-later")
+ version("3.3.5", sha256="1298172d2fe67d8d6b742ce7e792f6b897f081da5c94d34f14970ab531f04b3a")
version("3.3.4", sha256="2783e7525bcd155dd8cedf5a41b7db65cd1fa0e095cd937371448316f3930fcf")
version("3.3.3", sha256="2e46dfce95ddfd7ed5208413ee41f6bdf1ae18414fb1d0c146d9da3af12ac633")
version("3.3.2", sha256="f54956cf67f9970bb3c6803684c84a27ac78165055745e444efc45cfecb63fed")
diff --git a/var/spack/repos/builtin/packages/r-nlme/package.py b/var/spack/repos/builtin/packages/r-nlme/package.py
index f08f3a4b2c..38f6eeb5bc 100644
--- a/var/spack/repos/builtin/packages/r-nlme/package.py
+++ b/var/spack/repos/builtin/packages/r-nlme/package.py
@@ -15,6 +15,7 @@ class RNlme(RPackage):
license("GPL-2.0-or-later")
+ version("3.1-166", sha256="237a14ee8d78755b11a7efe234b95be40b46fbdd1b4aaf463f6d532be1909762")
version("3.1-162", sha256="ba6da2575554afa2614c4cba9971f8a9f8a07622d201284cb78899f3d6a2dc67")
version("3.1-160", sha256="d4454623194876b083774c662fd223bc3b9e8325824cb758b8adecd5dc0d8a08")
version("3.1-159", sha256="9bb05f5c3146e2d75078e668821485a3e9ca246fd5d7db2ef1963d3735d919bf")
@@ -32,4 +33,5 @@ class RNlme(RPackage):
depends_on("r@3.3.0:", type=("build", "run"), when="@3.1-131.1")
depends_on("r@3.5.0:", type=("build", "run"), when="@3.1-134:3.1-135")
depends_on("r@3.4.0:", type=("build", "run"), when="@3.1-135.5:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@3.1-165:")
depends_on("r-lattice", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-nloptr/package.py b/var/spack/repos/builtin/packages/r-nloptr/package.py
index 9d53c84916..946812061b 100644
--- a/var/spack/repos/builtin/packages/r-nloptr/package.py
+++ b/var/spack/repos/builtin/packages/r-nloptr/package.py
@@ -25,6 +25,7 @@ class RNloptr(RPackage):
license("LGPL-3.0-or-later")
+ version("2.1.1", sha256="4cdaf55dfdeb090119f2c2ca77f617962524654da4511bacd650f62bb6dad8ea")
version("2.0.3", sha256="7b26ac1246fd1bd890817b0c3a145456c11aec98458b8518de863650b99616d7")
version("2.0.0", sha256="65ca3149cfc9ba15ac10a91f34b5d86b20f5fd693f44e3edf3e392402911619a")
version("1.2.2.3", sha256="af08b74fd5e7b4cb455fe67ed759346cbb8f3b9a4178f5f117e0092e5c9af6ff")
@@ -32,7 +33,7 @@ class RNloptr(RPackage):
version("1.2.1", sha256="1f86e33ecde6c3b0d2098c47591a9cd0fa41fb973ebf5145859677492730df97")
version("1.0.4", sha256="84225b993cb1ef7854edda9629858662cc8592b0d1344baadea4177486ece1eb")
- depends_on("r-testthat", when="@2.0.0:")
+ depends_on("r-testthat", when="@2.0.0:2.1.0")
depends_on("nlopt@2.4.0:")
depends_on("nlopt@2.7.0:", when="@2.0.0:")
diff --git a/var/spack/repos/builtin/packages/r-nmf/package.py b/var/spack/repos/builtin/packages/r-nmf/package.py
index 744605ac88..db582ce04f 100644
--- a/var/spack/repos/builtin/packages/r-nmf/package.py
+++ b/var/spack/repos/builtin/packages/r-nmf/package.py
@@ -18,6 +18,7 @@ class RNmf(RPackage):
cran = "NMF"
+ version("0.27", sha256="af4302efca4a7654fecd31c376f1bb3496428279a50b8d5691c8a7e66e3f3ef9")
version("0.26", sha256="8d44562ef5f33f3811929f944c9d029ec25526d2ddddfe7c8a5b6e23adbc2ec0")
version("0.24.0", sha256="481811d35b3bbc07e9a60e2f853b05ef26581b43be9c6c4bab81151b8dcadd93")
version("0.23.0", sha256="0f0cca01b37bf46fce90d2e951df609d3d377908aa607825083fd0c47cc24753")
diff --git a/var/spack/repos/builtin/packages/r-nmof/package.py b/var/spack/repos/builtin/packages/r-nmof/package.py
index 52dcda0ebd..a19a76d260 100644
--- a/var/spack/repos/builtin/packages/r-nmof/package.py
+++ b/var/spack/repos/builtin/packages/r-nmof/package.py
@@ -19,6 +19,7 @@ class RNmof(RPackage):
cran = "NMOF"
+ version("2.8-0", sha256="6dc53a9be41e673e9b2fcb2783aa82090db5455f079b8aac4c388d679f6ec28a")
version("2.7-1", sha256="b03e309df35b3fb0980c8a171e1cd1c69739fa6ab7a8992c043166fae4644e23")
version("2.7-0", sha256="11eeda730262418f22d24d8f72d363a05ac4c3c1130b88f4eafb1b8d81c83160")
version("2.5-1", sha256="0468ba72364cbdf90781824dfb1a60324203e2248d93cb6f1ffd6eb0d271f390")
@@ -27,3 +28,4 @@ class RNmof(RPackage):
version("1.6-0", sha256="5484cd43c28aaf23d560c2dde8bcd8dd440a205d2214eb50e02fe0bb42ec2755")
depends_on("r@2.14:", type=("build", "run"))
+ depends_on("r@3.5:", type=("build", "run"), when="@2.8-0:")
diff --git a/var/spack/repos/builtin/packages/r-nnet/package.py b/var/spack/repos/builtin/packages/r-nnet/package.py
index 63b8c5fc32..7dab7edbf0 100644
--- a/var/spack/repos/builtin/packages/r-nnet/package.py
+++ b/var/spack/repos/builtin/packages/r-nnet/package.py
@@ -16,6 +16,7 @@ class RNnet(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("7.3-19", sha256="a9241f469270d3b03bbab7dc0d3c6a06a84010af16ba82fd3bd6660b35382ce7")
version("7.3-18", sha256="d29aebfb5cb00071eecf754d55db5d474a6fda88860df5c9d31ba89aa8d9e3d0")
version("7.3-17", sha256="ee750bb8164aa058edf93823af987ab2c7ec64128dce2abeaae1b7d3661e9a67")
version("7.3-14", sha256="5d1b9e9764d74d16c651f18f949aa4e9e2995ba64633cbfa2c6a7355ae30f4af")
diff --git a/var/spack/repos/builtin/packages/r-nnls/package.py b/var/spack/repos/builtin/packages/r-nnls/package.py
index 3fb292aa7e..e1575760df 100644
--- a/var/spack/repos/builtin/packages/r-nnls/package.py
+++ b/var/spack/repos/builtin/packages/r-nnls/package.py
@@ -17,4 +17,5 @@ class RNnls(RPackage):
license("GPL-2.0-or-later")
+ version("1.5", sha256="cd70feb286f86f6dead75da693a8f67c9bd3b91eb738e6e6ac659e3b8c7a3452")
version("1.4", sha256="0e5d77abae12bc50639d34354f96a8e079408c9d7138a360743b73bd7bce6c1f")
diff --git a/var/spack/repos/builtin/packages/r-nonnest2/package.py b/var/spack/repos/builtin/packages/r-nonnest2/package.py
index 3899ba0a47..a12129ba5a 100644
--- a/var/spack/repos/builtin/packages/r-nonnest2/package.py
+++ b/var/spack/repos/builtin/packages/r-nonnest2/package.py
@@ -20,6 +20,7 @@ class RNonnest2(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("0.5-7", sha256="e440c2464b3bd3b452e02583bb280eecba6acecf0f2c04b6b9fe4dcdd128db3e")
version("0.5-5", sha256="027f510e322122fc75c936251a95ddd392f96047ac86e0fae6cf8f883ac7aab5")
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-nor1mix/package.py b/var/spack/repos/builtin/packages/r-nor1mix/package.py
index 2f6b7907c3..6e2747be40 100644
--- a/var/spack/repos/builtin/packages/r-nor1mix/package.py
+++ b/var/spack/repos/builtin/packages/r-nor1mix/package.py
@@ -19,5 +19,6 @@ class RNor1mix(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-3", sha256="97bfd0f8c847fa68bf607aaa465845a34ac8a7a262315073026a6a1937dd076e")
version("1.3-0", sha256="9ce4ee92f889a4a4041b5ea1ff09396780785a9f12ac46f40647f74a37e327a0")
version("1.2-3", sha256="435e6519e832ef5229c51ccb2619640e6b50dfc7470f70f0c938d18a114273af")
diff --git a/var/spack/repos/builtin/packages/r-np/package.py b/var/spack/repos/builtin/packages/r-np/package.py
index 2ba3eda569..7e8c0498cf 100644
--- a/var/spack/repos/builtin/packages/r-np/package.py
+++ b/var/spack/repos/builtin/packages/r-np/package.py
@@ -30,6 +30,8 @@ class RNp(RPackage):
version("0.60-8", sha256="924c342feb2a862fa3871a45db5f8434dbbfb900cfc40c001a0872108a3a069e")
version("0.60-2", sha256="25d667fc1056899516584b9d5d933377e6f4694d8e5e868dd047db572b69417f")
+ depends_on("c", type="build") # generated
+
depends_on("r-boot", type=("build", "run"))
depends_on("r-cubature", type=("build", "run"))
depends_on("r-quadprog", type=("build", "run"), when="@0.60-8:")
diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py
index be058a5549..eb061bf5d4 100644
--- a/var/spack/repos/builtin/packages/r-openssl/package.py
+++ b/var/spack/repos/builtin/packages/r-openssl/package.py
@@ -24,6 +24,7 @@ class ROpenssl(RPackage):
license("MIT")
+ version("2.2.1", sha256="25a12328d584212d8d4c095b3d2a71152c5d2bc4adda7a9addb25da01136f78d")
version("2.0.6", sha256="77f3032a16270f0d1734f269b8d348eedc75b277812854386091143082c1b3f3")
version("2.0.4", sha256="a1a5c65127c20c0ca3b46f2c4f4d3817276a887a231569537c1373e7740a5cec")
version("2.0.3", sha256="7cde98520bec857f043fb6aae92334e2ae0dcd86108adc9b18ca298ec16286aa")
diff --git a/var/spack/repos/builtin/packages/r-openxlsx/package.py b/var/spack/repos/builtin/packages/r-openxlsx/package.py
index f16120e257..dfcb39680d 100644
--- a/var/spack/repos/builtin/packages/r-openxlsx/package.py
+++ b/var/spack/repos/builtin/packages/r-openxlsx/package.py
@@ -18,12 +18,15 @@ class ROpenxlsx(RPackage):
license("MIT")
+ version("4.2.6.1", sha256="c208c506a5d6a1d89a18c2b0bedceb467a461939128f2d7916efbf41e7a17aa9")
version("4.2.5.2", sha256="ee7089e7e5832ef22ee0d0eebf7cca5096ce23afb2bcdb58700be62526fc9b67")
version("4.2.5.1", sha256="64d224380809d8d19788b02daf9d6dae45262594b81f5e013d37d34daf0945c8")
version("4.2.5", sha256="65d06d2819b656ac30fc78437ee712a83fb5a7ab750f56268e5c9e578c582519")
version("4.2.3", sha256="cdef89d826e50bef772af3e5eae935ca0316626a6e22f55f7631eac733b5e46f")
version("4.1.0.1", sha256="8b7011debe14714de035ef42797c8caa923162d5dc3cc3c2a299fc10eff3d4d1")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-stringi", type=("build", "run"), when="@4.2.3:")
depends_on("r-zip", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-optimx/package.py b/var/spack/repos/builtin/packages/r-optimx/package.py
index b079c0226c..de159d7b64 100644
--- a/var/spack/repos/builtin/packages/r-optimx/package.py
+++ b/var/spack/repos/builtin/packages/r-optimx/package.py
@@ -22,10 +22,15 @@ class ROptimx(RPackage):
license("GPL-2.0-only")
+ version(
+ "2023-10.21", sha256="0d732d5604c26af59cfb95b80ed4e226c9c10422e2d82a6cc06b92f9ba6a44b5"
+ )
version("2022-4.30", sha256="ebe9887a22296cf4b2db07981aaa1f898bf7c17fb61a4b398c228d4077d0b410")
version(
"2021-10.12", sha256="39384c856b5efa3992cd230548b60eff936d428111ad6ad5b8fb98a3bcbb7943"
)
version("2020-4.2", sha256="6381c25c322287fc98ab1b2965d3f68c9a92c587c76aca1d33fd6428b2167101")
+ depends_on("r-nloptr", type=("build", "run"), when="@2023-10.21:")
depends_on("r-numderiv", type=("build", "run"))
+ depends_on("r-pracma", type=("build", "run"), when="@2023-10.21:")
diff --git a/var/spack/repos/builtin/packages/r-optparse/package.py b/var/spack/repos/builtin/packages/r-optparse/package.py
index 90ab226ce4..6e8cb4c2ea 100644
--- a/var/spack/repos/builtin/packages/r-optparse/package.py
+++ b/var/spack/repos/builtin/packages/r-optparse/package.py
@@ -17,6 +17,7 @@ class ROptparse(RPackage):
license("GPL-2.0-or-later")
+ version("1.7.5", sha256="0cc917505780786e69b8ceca4b3840ed7b0c011495108ec05af3871965415712")
version("1.7.3", sha256="6287e1af051d4a65037900ce7b30bd962039450dd4eab63b6f2491eace6a07ed")
version("1.7.1", sha256="324e304c13efd565d766766193d4ccd75e2cd949dfcfb416afc3939489071fe7")
version("1.6.6", sha256="51779d497146e9354b1153713d939e81551e08948c2b00e4b117b1377c0b60d0")
diff --git a/var/spack/repos/builtin/packages/r-ordinal/package.py b/var/spack/repos/builtin/packages/r-ordinal/package.py
index 6e7cc27573..702e439b1b 100644
--- a/var/spack/repos/builtin/packages/r-ordinal/package.py
+++ b/var/spack/repos/builtin/packages/r-ordinal/package.py
@@ -26,6 +26,9 @@ class ROrdinal(RPackage):
license("GPL-2.0-or-later")
version(
+ "2023.12-4.1", sha256="2c9dcfa438c964ff1825033d0759d25f404a2a4c5252b81e40f19cffc18e38b1"
+ )
+ version(
"2022.11-16", sha256="5488ad1dfa531a09d017d68d7393d376c8bc49cceeaa6a3e5f7d57b99168d493"
)
version(
diff --git a/var/spack/repos/builtin/packages/r-osqp/package.py b/var/spack/repos/builtin/packages/r-osqp/package.py
index a02f97fe44..22077432ac 100644
--- a/var/spack/repos/builtin/packages/r-osqp/package.py
+++ b/var/spack/repos/builtin/packages/r-osqp/package.py
@@ -18,10 +18,12 @@ class ROsqp(RPackage):
license("Apache-2.0 OR custom")
+ version("0.6.3.3", sha256="ff3d8e4ec7764333144d461eb5ea7a4adbf5b5f29f84c3ec3e60a93802e2f5bb")
version("0.6.0.8", sha256="14034045ae4ae5ec4eae4944653d41d94282fa85a0cd53614ac86f34fd02ed97")
version("0.6.0.7", sha256="ee6584d02341e3f1d8fab3b2cb93defd6c48d561297d82a6bedb3e7541868203")
depends_on("r-rcpp@0.12.14:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
+ depends_on("r-matrix@1.6-1:", type=("build", "run"), when="@0.6.3:")
depends_on("r-r6", type=("build", "run"))
depends_on("cmake", type="build")
diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py
index f62071662e..55110d1834 100644
--- a/var/spack/repos/builtin/packages/r-packrat/package.py
+++ b/var/spack/repos/builtin/packages/r-packrat/package.py
@@ -17,6 +17,7 @@ class RPackrat(RPackage):
license("GPL-2.0-only")
+ version("0.9.2", sha256="69df5943257e6c4d06f3d907241b668b53dedece72158ca935260b8b8e1672d7")
version("0.9.1", sha256="414013c6044d2985e69bbc8494c152716b6f81ca15b329c731cfe8f965fd3344")
version("0.8.1", sha256="45db0301fa6a0a6944b070ac219cd1fa754bac24e517e59758cdc51e8aed23da")
version("0.8.0", sha256="3025b9052974bec00fb09299226b80004d48e611e15a65e5a0bc49d3538844ef")
diff --git a/var/spack/repos/builtin/packages/r-paleotree/package.py b/var/spack/repos/builtin/packages/r-paleotree/package.py
index 48507c3653..0f8149cfac 100644
--- a/var/spack/repos/builtin/packages/r-paleotree/package.py
+++ b/var/spack/repos/builtin/packages/r-paleotree/package.py
@@ -17,6 +17,7 @@ class RPaleotree(RPackage):
license("CC0-1.0")
+ version("3.4.7", sha256="cb28c8a7929905b50094439423b7839174f7ae1b652607583528d44e102f6317")
version("3.4.5", sha256="c4dceb3352b74730643aa9f62ceb7f020ce6763614ba334723aadf0eb003d125")
version("3.4.4", sha256="8809c3395e6904669db8c7cc3b54dd5c3c76948c8568d310cf02e4a5dbc678e4")
version("3.3.25", sha256="aa64b9120075581229439227a12db776d052b03eb5f9721692a16a9402ac8712")
diff --git a/var/spack/repos/builtin/packages/r-pamr/package.py b/var/spack/repos/builtin/packages/r-pamr/package.py
index b16f865fbb..4883fa47bb 100644
--- a/var/spack/repos/builtin/packages/r-pamr/package.py
+++ b/var/spack/repos/builtin/packages/r-pamr/package.py
@@ -15,9 +15,11 @@ class RPamr(RPackage):
license("GPL-2.0-only")
+ version("1.57", sha256="01968f7620f1a5e4be1ce666f7ff52211b9dcf6cf5948112c7441aabae56af3d")
version("1.56.1", sha256="d0e527f2336ee4beee91eefb2a8f0dfa96413d9b5a5841d6fc7ff821e67c9779")
version("1.55", sha256="ed910194937a6097ec79234d84777856fd520b111a7c79f7c86dc607169cc3c3")
depends_on("r@2.10:", type=("build", "run"))
+ depends_on("r@3.5:", type=("build", "run"), when="@1.57:")
depends_on("r-cluster", type=("build", "run"))
depends_on("r-survival", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pan/package.py b/var/spack/repos/builtin/packages/r-pan/package.py
index c50d192d00..a44741afc8 100644
--- a/var/spack/repos/builtin/packages/r-pan/package.py
+++ b/var/spack/repos/builtin/packages/r-pan/package.py
@@ -20,5 +20,8 @@ class RPan(RPackage):
license("GPL-3.0-only")
+ version("1.9", sha256="cd91232d653783ea7f34c0eebaa80c472b5501b21eea500c4c1a8e57116c6eea")
version("1.6", sha256="adc0df816ae38bc188bce0aef3aeb71d19c0fc26e063107eeee71a81a49463b6")
version("1.4", sha256="e6a83f0799cc9714f5052f159be6e82ececd013d1626f40c828cda0ceb8b76dc")
+
+ depends_on("r@2.10:", when="@1.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-parallelly/package.py b/var/spack/repos/builtin/packages/r-parallelly/package.py
index ad333a9de4..ca52c9bb82 100644
--- a/var/spack/repos/builtin/packages/r-parallelly/package.py
+++ b/var/spack/repos/builtin/packages/r-parallelly/package.py
@@ -24,6 +24,7 @@ class RParallelly(RPackage):
license("LGPL-2.1-or-later")
+ version("1.38.0", sha256="632c823c64d1bb840b2a5ff2cb2f5ffc743d62d5090a3cde55a2ebdde230d1aa")
version("1.35.0", sha256="3f5e9b6507196aab052c5e67f8b524b75aa356731c5eaffbadde76c967ad5dcd")
version("1.32.1", sha256="31c685f59ac7ff702fe2720910780378113adf0df0baf048a62eef94524cca90")
version("1.31.1", sha256="40c7fc3d842fa928448e574091a521bead2367bf97545c744ca78ea9af3117da")
diff --git a/var/spack/repos/builtin/packages/r-paramhelpers/package.py b/var/spack/repos/builtin/packages/r-paramhelpers/package.py
index cde9476185..a4fd066005 100644
--- a/var/spack/repos/builtin/packages/r-paramhelpers/package.py
+++ b/var/spack/repos/builtin/packages/r-paramhelpers/package.py
@@ -24,6 +24,8 @@ class RParamhelpers(RPackage):
version("1.11", sha256="1614f4c0842cf822befc01228ab7263417f3423dd6a1dc24347b14f8491637a0")
version("1.10", sha256="80629ba62e93b0b706bf2e451578b94fbb9c5b95ff109ecfb5b011bfe0a0fa5b")
+ depends_on("c", type="build") # generated
+
depends_on("r-backports", type=("build", "run"), when="@1.11:")
depends_on("r-bbmisc@1.10:", type=("build", "run"))
depends_on("r-checkmate@1.8.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-party/package.py b/var/spack/repos/builtin/packages/r-party/package.py
index 4c0783c34c..adb388f567 100644
--- a/var/spack/repos/builtin/packages/r-party/package.py
+++ b/var/spack/repos/builtin/packages/r-party/package.py
@@ -30,6 +30,7 @@ class RParty(RPackage):
license("GPL-2.0-only")
+ version("1.3-17", sha256="f0e076b1e743cf50274b57d3a69526461fac5e499fc33d73825f293076f27d4b")
version("1.3-13", sha256="def05e7f0c59f1b1ecf0ab3929cff75ae8c2691aaf52292cad4371281b897e7b")
version("1.3-11", sha256="3ea41a1775d40bc6d0bdf657b98d939d99f98925ac985a31c969735c56618c9c")
version("1.3-10", sha256="e5892955f6ce662ade568e646d1d672c3ecbf5d4e74b4a887a353e6160f7b56a")
diff --git a/var/spack/repos/builtin/packages/r-partykit/package.py b/var/spack/repos/builtin/packages/r-partykit/package.py
index fa35055cee..aa34561687 100644
--- a/var/spack/repos/builtin/packages/r-partykit/package.py
+++ b/var/spack/repos/builtin/packages/r-partykit/package.py
@@ -25,6 +25,7 @@ class RPartykit(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("1.2-22", sha256="0f0015aa970b10a85d1fabfd2fcf35a6552e292fe151766e348c105f7f5c0adb")
version("1.2-20", sha256="63509aa3ed2d7417ad284c037cef66bc837fdb7a97967957e79b9fee8ed2e0da")
version("1.2-16", sha256="e643d4e29c1894497e3dd5fe274783319d0044dec50282ed807cebc21736ddb2")
version("1.2-15", sha256="b2e9454b2f4b9a39c9581c5871462f00acef4eeee5696ce3e32cfa1468d1e3ac")
@@ -33,6 +34,8 @@ class RPartykit(RPackage):
version("1.2-3", sha256="56749b246e283f94ac2ad2cdcfc0a477e05cd44b5e8f6e462c26f4dff818da35")
version("1.1-1", sha256="d9f4762690cd85ee4e3dc44f5a14069d10a1900afdfbcdc284d2a94b4a8e8332")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@1.2-11:")
depends_on("r-libcoin@1.0-0:", type=("build", "run"), when="@1.2-0:")
diff --git a/var/spack/repos/builtin/packages/r-patchwork/package.py b/var/spack/repos/builtin/packages/r-patchwork/package.py
index 96b701585f..f025aa8e9f 100644
--- a/var/spack/repos/builtin/packages/r-patchwork/package.py
+++ b/var/spack/repos/builtin/packages/r-patchwork/package.py
@@ -20,8 +20,11 @@ class RPatchwork(RPackage):
license("MIT")
+ version("1.2.0", sha256="cc31ea13560c424de9bfe2287d926a7d9e6cc8da2d5561402bb145b4f51b68a1")
version("1.1.2", sha256="dab9d5d2d704d591717eaa6efeacf09cb6cd7bee2ca2c46d18414e8503ac8977")
version("1.1.1", sha256="cf0d7d9f92945729b499d6e343441c55007d5b371206d5389b9e5154dc7cf481")
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
depends_on("r-gtable", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"), when="@1.1.3:")
+ depends_on("r-rlang", type=("build", "run"), when="@1.1.3:")
diff --git a/var/spack/repos/builtin/packages/r-pbapply/package.py b/var/spack/repos/builtin/packages/r-pbapply/package.py
index 070035aca8..221fc29544 100644
--- a/var/spack/repos/builtin/packages/r-pbapply/package.py
+++ b/var/spack/repos/builtin/packages/r-pbapply/package.py
@@ -19,6 +19,7 @@ class RPbapply(RPackage):
license("GPL-2.0-or-later")
+ version("1.7-2", sha256="aeed8c8c308c7e3827daf10b01b8ed4b88c1d68cea57d72d67c600c0ce0dae13")
version("1.7-0", sha256="64b8e931e0a09031c20b66173ce80a646043b8f135d329bc86226a11c6b706c0")
version("1.5-0", sha256="effdfee286e5ba9534dc2ac3cee96590a37f5cd2af28c836d00c25ca9f070a55")
version("1.4-3", sha256="8fe6287535be766b5a688810e2cc1ca4e668ac6b42b6e832473fe5701133eb21")
diff --git a/var/spack/repos/builtin/packages/r-pbdzmq/package.py b/var/spack/repos/builtin/packages/r-pbdzmq/package.py
index c3ee4bbac8..95da65e1e9 100644
--- a/var/spack/repos/builtin/packages/r-pbdzmq/package.py
+++ b/var/spack/repos/builtin/packages/r-pbdzmq/package.py
@@ -22,6 +22,7 @@ class RPbdzmq(RPackage):
license("GPL-3.0-or-later")
+ version("0.3-11", sha256="da7e204d857370201f75a05fbd808a2f409d440cc96855bb8f48f4a5dd75405b")
version("0.3-9", sha256="d033238d0a9810581f6b40c7c75263cfc495a585653bbff98e957c37954e0fb6")
version("0.3-8", sha256="eded4ccf6ee54a59e06061f1c6e67a8ec36e03c6ab2318af64446d8f95505465")
version("0.3-7", sha256="df2d2be14b2f57a64d76cdda4c01fd1c3d9aa12221c63524c01c71849df11808")
diff --git a/var/spack/repos/builtin/packages/r-pbivnorm/package.py b/var/spack/repos/builtin/packages/r-pbivnorm/package.py
index bd56dd5148..5a6594a8d0 100644
--- a/var/spack/repos/builtin/packages/r-pbivnorm/package.py
+++ b/var/spack/repos/builtin/packages/r-pbivnorm/package.py
@@ -17,3 +17,5 @@ class RPbivnorm(RPackage):
license("GPL-2.0-or-later")
version("0.6.0", sha256="07c37d507cb8f8d2d9ae51a9a6d44dfbebd8a53e93c242c4378eaddfb1cc5f16")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-pbkrtest/package.py b/var/spack/repos/builtin/packages/r-pbkrtest/package.py
index 86f2a3f598..9dba98bf8c 100644
--- a/var/spack/repos/builtin/packages/r-pbkrtest/package.py
+++ b/var/spack/repos/builtin/packages/r-pbkrtest/package.py
@@ -24,6 +24,7 @@ class RPbkrtest(RPackage):
license("GPL-2.0-or-later")
+ version("0.5.3", sha256="b03e5156fef6a4a2ea67c1d15c051799e63acafef2f89962c580645266e6ba63")
version("0.5.2", sha256="8e79adf035a0fcf3c82145ad55847497379e009f7be880ba3007ebeb2e69b6e3")
version("0.5.1", sha256="b2a3452003d93890f122423b3f2487dcb6925440f5b8a05578509e98b6aec7c5")
version("0.5-0.1", sha256="f56525488c6efe4a5cbf849bf9a82747041478605b166c29bad54e464e46f469")
@@ -35,12 +36,14 @@ class RPbkrtest(RPackage):
depends_on("r@3.2.3:", type=("build", "run"), when="@0.4-6:")
depends_on("r@3.5.0:", type=("build", "run"), when="@0.5-0.1:")
depends_on("r@4.1.0:", type=("build", "run"), when="@0.5.2:")
+ depends_on("r@4.2.0:", type=("build", "run"), when="@0.5.3:")
depends_on("r-lme4@1.1-10:", type=("build", "run"))
- depends_on("r-lme4@1.1.31:", type=("build", "run"), when="@0.5.2:")
+ depends_on("r-lme4@1.1-31:", type=("build", "run"), when="@0.5.2:")
depends_on("r-broom", type=("build", "run"), when="@0.5-0.1:")
+ depends_on("r-doby", type=("build", "run"), when="@0.5.3:")
depends_on("r-dplyr", type=("build", "run"), when="@0.5-0.1:")
depends_on("r-mass", type=("build", "run"))
- depends_on("r-matrix@1.2.3:", type=("build", "run"))
+ depends_on("r-matrix@1.2-3:", type=("build", "run"))
depends_on("r-numderiv", type=("build", "run"), when="@0.5-0.1:")
depends_on("r-knitr", type=("build", "run"), when="@0.5-0.1:0.5.1")
depends_on("r-magrittr", type=("build", "run"), when="@0.5-0.1:0.5.1")
diff --git a/var/spack/repos/builtin/packages/r-pcamethods/package.py b/var/spack/repos/builtin/packages/r-pcamethods/package.py
index 413fea97a9..fc8241adb5 100644
--- a/var/spack/repos/builtin/packages/r-pcamethods/package.py
+++ b/var/spack/repos/builtin/packages/r-pcamethods/package.py
@@ -34,6 +34,8 @@ class RPcamethods(RPackage):
version("1.70.0", commit="3368fad48ea930775505fd26e4179d7714d633d8")
version("1.68.0", commit="c8d7c93dcaf7ef728f3d089ae5d55771b320bdab")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-biobase", type=("build", "run"))
depends_on("r-biocgenerics", type=("build", "run"))
depends_on("r-rcpp@0.11.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pcapp/package.py b/var/spack/repos/builtin/packages/r-pcapp/package.py
index 536c2e65da..7a362a7396 100644
--- a/var/spack/repos/builtin/packages/r-pcapp/package.py
+++ b/var/spack/repos/builtin/packages/r-pcapp/package.py
@@ -16,6 +16,7 @@ class RPcapp(RPackage):
cran = "pcaPP"
+ version("2.0-5", sha256="674faed967016a19f9d927506d6b3f4fc7ff2b2ab5679b2368429ee2c61b7c10")
version("2.0-3", sha256="1aac554f039753bf9d026090e47d66b82bf3f1f75479ed0adefa3f7bbb55d603")
version("2.0-2", sha256="a18b66974e0bfa5af6505acd777d04fd605b32f06009073488ee2f44280bb54b")
version("2.0-1", sha256="9690e2f263162452d5a14bd8c52264cb70b317d30907411af4e5b6df4086121a")
@@ -28,4 +29,5 @@ class RPcapp(RPackage):
version("1.9-60", sha256="9a4b471957ac39ed7c860e3165bf8e099b5b55cf814654adb58f9d19df2718e7")
version("1.9-50", sha256="137637314fba6e11883c63b0475d8e50aa7f363e064baa1e70245f7692565b56")
+ depends_on("r@3.6.2:", type=("build", "run"), when="@2.0-4:")
depends_on("r-mvtnorm", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pegas/package.py b/var/spack/repos/builtin/packages/r-pegas/package.py
index c60f86f2bc..955281e810 100644
--- a/var/spack/repos/builtin/packages/r-pegas/package.py
+++ b/var/spack/repos/builtin/packages/r-pegas/package.py
@@ -22,6 +22,7 @@ class RPegas(RPackage):
license("GPL-2.0-or-later")
+ version("1.3", sha256="103eb2b29d70e71315809421abdf6f2e8ada9c466469c6e3e7cc0314b9cd3dc8")
version("1.2", sha256="9d39f3937c09ea6e2189949a23879bb366f5ca1df3a6aac411c7d2b73837ad55")
version("1.1", sha256="87ba91a819496dfc3abdcc792ff853a6d49caae6335598a24c23e8851505ed59")
version("0.14", sha256="7df90e6c4a69e8dbed2b3f68b18f1975182475bf6f86d4159256b52fd5332053")
diff --git a/var/spack/repos/builtin/packages/r-permute/package.py b/var/spack/repos/builtin/packages/r-permute/package.py
index 28e7110394..3b23775f41 100644
--- a/var/spack/repos/builtin/packages/r-permute/package.py
+++ b/var/spack/repos/builtin/packages/r-permute/package.py
@@ -25,4 +25,4 @@ class RPermute(RPackage):
version("0.9-5", sha256="d2885384a07497e8df273689d6713fc7c57a7c161f6935f3572015e16ab94865")
version("0.9-4", sha256="a541a5f5636ddd67fd856d3e11224f15bc068e96e23aabe3e607a7e7c2fc1cf1")
- depends_on("r@2.14:", type=("build", "run"))
+ depends_on("r@2.14.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-phangorn/package.py b/var/spack/repos/builtin/packages/r-phangorn/package.py
index c417b5662c..08a9af61f8 100644
--- a/var/spack/repos/builtin/packages/r-phangorn/package.py
+++ b/var/spack/repos/builtin/packages/r-phangorn/package.py
@@ -26,6 +26,9 @@ class RPhangorn(RPackage):
version("2.5.3", sha256="a306585a0aabe7360a2adaf9116ae2993fb5ceff641b198f2e01e4329d3768af")
version("2.3.1", sha256="518c31f5b2c5f0a655d02a3c71b00c30caea2794dfc31f9d63f3d505bd7863eb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r@4.1.0:", type=("build", "run"), when="@2.8.1:")
depends_on("r-digest", type=("build", "run"), when="@2.10.0:")
diff --git a/var/spack/repos/builtin/packages/r-phantompeakqualtools/package.py b/var/spack/repos/builtin/packages/r-phantompeakqualtools/package.py
index a9fcf1aa80..ff1d6269ce 100644
--- a/var/spack/repos/builtin/packages/r-phantompeakqualtools/package.py
+++ b/var/spack/repos/builtin/packages/r-phantompeakqualtools/package.py
@@ -18,6 +18,9 @@ class RPhantompeakqualtools(RPackage):
version("1.14", sha256="d03be6163e82aed72298e54a92c181570f9975a395f57a69b21ac02b1001520b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.41.0:")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/r-philentropy/package.py b/var/spack/repos/builtin/packages/r-philentropy/package.py
index 3bca7876a3..f8d68c8e47 100644
--- a/var/spack/repos/builtin/packages/r-philentropy/package.py
+++ b/var/spack/repos/builtin/packages/r-philentropy/package.py
@@ -22,6 +22,7 @@ class RPhilentropy(RPackage):
license("GPL-2.0-only")
+ version("0.8.0", sha256="3aa6d4918168f4fe2c56ea3f26381b0ffc02f1d5b9b95e294bac1a34bf66be3e")
version("0.7.0", sha256="ce72e2327aee80aeeb630caa33be6a35e4f2b8a7491842d8c21099b9c43584b7")
version("0.6.0", sha256="138acf2aedab17c9d367def378e35c8aba80d9e786284b2866955cea1c24eeb6")
version("0.5.0", sha256="b39e9a825458f3377e23b2a133180566780e89019e9d22a6a5b7ca87c49c412f")
diff --git a/var/spack/repos/builtin/packages/r-phylobase/package.py b/var/spack/repos/builtin/packages/r-phylobase/package.py
index 6ef5f16f86..877479fdf8 100644
--- a/var/spack/repos/builtin/packages/r-phylobase/package.py
+++ b/var/spack/repos/builtin/packages/r-phylobase/package.py
@@ -16,6 +16,7 @@ class RPhylobase(RPackage):
license("GPL-2.0-or-later")
+ version("0.8.12", sha256="9b81ca60dc6215e74b720880cc2db3abc1f7e6d8785ea7d7df95a950f0778f20")
version("0.8.10", sha256="5a44380ff49bab333a56f6f96157324ade8afb4af0730e013194c4badb0bf94b")
depends_on("r-ade4", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-phytools/package.py b/var/spack/repos/builtin/packages/r-phytools/package.py
index 894bf1daae..fbe68ae74b 100644
--- a/var/spack/repos/builtin/packages/r-phytools/package.py
+++ b/var/spack/repos/builtin/packages/r-phytools/package.py
@@ -32,6 +32,7 @@ class RPhytools(RPackage):
license("GPL-2.0-or-later")
+ version("2.3-0", sha256="973020a695be3fef94a37d7d6732d9352b66e44d30feb554d267b6aeb646d081")
version("1.5-1", sha256="f8be59abbff1f5032be4523c361da53b0d5b71677fedebba6d7cbae2dca7e101")
version("1.2-0", sha256="ba3c684118c0eaab4601b21988c553ce7ee019df1714d2ac8d4451075f843b86")
version("1.0-3", sha256="bfe2aec6aae8235264c1494eee42be494fed81a676c6de9e39c57a6e3682b37d")
@@ -48,6 +49,7 @@ class RPhytools(RPackage):
depends_on("r-clustergeneration", type=("build", "run"))
depends_on("r-coda", type=("build", "run"))
depends_on("r-combinat", type=("build", "run"))
+ depends_on("r-deoptim", type=("build", "run"), when="@2.2-0:")
depends_on("r-doparallel", type=("build", "run"), when="@1.5-1:")
depends_on("r-expm", type=("build", "run"))
depends_on("r-foreach", type=("build", "run"), when="@1.5-1:")
@@ -57,8 +59,8 @@ class RPhytools(RPackage):
depends_on("r-numderiv", type=("build", "run"))
depends_on("r-optimparallel", type=("build", "run"), when="@1.2-0:")
depends_on("r-phangorn@2.3.1:", type=("build", "run"))
- depends_on("r-plotrix", type=("build", "run"))
depends_on("r-scatterplot3d", type=("build", "run"))
depends_on("r-animation", type=("build", "run"), when="@:0.6-99")
depends_on("r-gtools", type=("build", "run"), when="@0.6-99:0.7-70")
+ depends_on("r-plotrix", type=("build", "run"), when="@:2.0-2")
diff --git a/var/spack/repos/builtin/packages/r-picante/package.py b/var/spack/repos/builtin/packages/r-picante/package.py
index 0e5644de70..5ab8c73e0d 100644
--- a/var/spack/repos/builtin/packages/r-picante/package.py
+++ b/var/spack/repos/builtin/packages/r-picante/package.py
@@ -28,6 +28,8 @@ class RPicante(RPackage):
version("1.6-2", sha256="4db3a5a0fe5e4e9197c96245195843294fbb8d0a324edcde70c6ab01276ab7ff")
version("1.6-1", sha256="2708315b26737857a6729fd67bde06bc939930035c5b09a8bba472a593f24000")
+ depends_on("c", type="build") # generated
+
depends_on("r-ape", type=("build", "run"))
depends_on("r-vegan", type=("build", "run"))
depends_on("r-nlme", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pinfsc50/package.py b/var/spack/repos/builtin/packages/r-pinfsc50/package.py
index 2c0808598c..c2f91b8d1d 100644
--- a/var/spack/repos/builtin/packages/r-pinfsc50/package.py
+++ b/var/spack/repos/builtin/packages/r-pinfsc50/package.py
@@ -21,6 +21,7 @@ class RPinfsc50(RPackage):
license("GPL-2.0-or-later")
+ version("1.3.0", sha256="971627cf4567fdb34db26010f2db44cfac5ff07f327d3247e778638cc4e849bf")
version("1.2.0", sha256="ed1fe214b9261feef8abfbf724c2bd9070d68e99a6ea95208aff2c57bbef8794")
depends_on("r@3.2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pixmap/package.py b/var/spack/repos/builtin/packages/r-pixmap/package.py
index 25158831a2..b8a1808f4d 100644
--- a/var/spack/repos/builtin/packages/r-pixmap/package.py
+++ b/var/spack/repos/builtin/packages/r-pixmap/package.py
@@ -16,5 +16,6 @@ class RPixmap(RPackage):
license("GPL-2.0-only")
+ version("0.4-13", sha256="e3dbc641a0497575b45a4140dadc6bf43cdf39b02393f93f1b0ee4f4d026e711")
version("0.4-12", sha256="893ba894d4348ba05e6edf9c1b4fd201191816b444a214f7a6b2c0a79b0a2aec")
version("0.4-11", sha256="6fa010749a59cdf56aad9f81271473b7d55697036203f2cd5d81372bcded7412")
diff --git a/var/spack/repos/builtin/packages/r-pkgbuild/package.py b/var/spack/repos/builtin/packages/r-pkgbuild/package.py
index 9289da8fb7..35498c04a8 100644
--- a/var/spack/repos/builtin/packages/r-pkgbuild/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgbuild/package.py
@@ -17,6 +17,7 @@ class RPkgbuild(RPackage):
license("MIT")
+ version("1.4.4", sha256="5972843cd43654715cdbdd28f50af013fa3d1c213146654992b2b5f39ed0e2a8")
version("1.4.0", sha256="357f3c40c99650eaa8a715991ff1355a553acb165f217ed204712f698ba55ed6")
version("1.3.1", sha256="7c6a82d1e6b19e136a7d16095743c50cd7b6340eeda594e4a8e14d74972ddb48")
version("1.2.0", sha256="2e19308d3271fefd5e118c6d132d6a2511253b903620b5417892c72d2010a963")
@@ -26,15 +27,17 @@ class RPkgbuild(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.4.0:")
+ depends_on("r@3.5:", type=("build", "run"), when="@1.4.3:")
depends_on("r-callr@2.0.0:", type=("build", "run"))
depends_on("r-callr@3.2.0:", type=("build", "run"), when="@1.0.4:")
depends_on("r-cli", type=("build", "run"))
depends_on("r-cli@3.4.0:", type=("build", "run"), when="@1.4.0:")
- depends_on("r-crayon", type=("build", "run"))
depends_on("r-desc", type=("build", "run"))
- depends_on("r-prettyunits", type=("build", "run"))
depends_on("r-processx", type=("build", "run"), when="@1.4.0:")
depends_on("r-r6", type=("build", "run"))
- depends_on("r-rprojroot", type=("build", "run"))
- depends_on("r-withr@2.1.2:", type=("build", "run"))
- depends_on("r-withr@2.3.0:", type=("build", "run"), when="@1.3.1:")
+
+ depends_on("r-crayon", type=("build", "run"), when="@:1.4.2")
+ depends_on("r-prettyunits", type=("build", "run"), when="@:1.4.2")
+ depends_on("r-rprojroot", type=("build", "run"), when="@:1.4.2")
+ depends_on("r-withr@2.1.2:", type=("build", "run"), when="@:1.4.0")
+ depends_on("r-withr@2.3.0:", type=("build", "run"), when="@1.3.1:1.4.0")
diff --git a/var/spack/repos/builtin/packages/r-pkgcache/package.py b/var/spack/repos/builtin/packages/r-pkgcache/package.py
index 4f7db9e75b..33d28cf77c 100644
--- a/var/spack/repos/builtin/packages/r-pkgcache/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgcache/package.py
@@ -17,6 +17,7 @@ class RPkgcache(RPackage):
license("MIT")
+ version("2.2.2", sha256="7ebd6cc5fc0325eae504877dfe9651f90e51b3b9778cecc8aae2671b617b5be3")
version("2.1.0", sha256="cfc03c2060028097972c32c3f2d922d7a598dfd963e5e5250d85a3dfa2f2e206")
version("2.0.3", sha256="80deafd60f15dda029536d4ce13c37ef91c49cb6636323daadbf3d64a67da028")
version("2.0.2", sha256="6860b5b7046ef349c2fdad4ba3aecb57c7516fba952a19e3ff7cccb7f859f881")
@@ -31,10 +32,8 @@ class RPkgcache(RPackage):
depends_on("r-curl@3.2:", type=("build", "run"))
depends_on("r-filelock", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))
- depends_on("r-prettyunits", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
depends_on("r-processx@3.3.0.9001:", type=("build", "run"))
- depends_on("r-rappdirs", type=("build", "run"))
depends_on("r-assertthat", type=("build", "run"), when="@:1.3.0")
depends_on("r-digest", type=("build", "run"), when="@:1.3.0")
@@ -42,3 +41,5 @@ class RPkgcache(RPackage):
depends_on("r-tibble", type=("build", "run"), when="@:1.3.0")
depends_on("r-uuid", type=("build", "run"), when="@:1.3.0")
depends_on("r-glue", type=("build", "run"), when="@:2.0.2")
+ depends_on("r-prettyunits", type=("build", "run"), when="@:2.2.0")
+ depends_on("r-rappdirs", type=("build", "run"), when="@:2.2.0")
diff --git a/var/spack/repos/builtin/packages/r-pkgdepends/package.py b/var/spack/repos/builtin/packages/r-pkgdepends/package.py
index 73ba6e593b..fc85a9557a 100644
--- a/var/spack/repos/builtin/packages/r-pkgdepends/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgdepends/package.py
@@ -22,34 +22,38 @@ class RPkgdepends(RPackage):
license("MIT")
+ version("0.7.2", sha256="b17e22d01250916b06868317359239ca9273d7765b5ead9481b47cf0d96acd26")
version("0.5.0", sha256="eadc98e335f9d2cc10b31cf7a5b55fe3308266fbd6f46d5dbd37b5d90bfcf1bc")
version("0.3.2", sha256="61db529965f973847b4d1337c6556527a89953cad09d231a6e6ca2145a426a21")
version("0.3.1", sha256="8e4263a1792871ee9629b0d6a8caeb53b77012db3b5be91b432f3553cd2a80be")
version("0.2.0", sha256="59afdbe0e59663088ba4facac5cd011a0a05b0b9c540103fb8b9f0a673bf4d94")
depends_on("r@3.4:", type=("build", "run"), when="@0.3.1:")
+ depends_on("r@3.5:", type=("build", "run"), when="@0.7.0:")
depends_on("r-callr@3.3.1:", type=("build", "run"))
depends_on("r-cli@2.1.0:", type=("build", "run"))
depends_on("r-cli@3.6.0:", type=("build", "run"), when="@0.5.0:")
depends_on("r-curl", type=("build", "run"))
depends_on("r-desc@1.2.0:", type=("build", "run"))
+ depends_on("r-desc@1.4.3:", type=("build", "run"), when="@0.7.1:")
depends_on("r-filelock@1.0.2:", type=("build", "run"))
- depends_on("r-glue", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-lpsolve", type=("build", "run"))
depends_on("r-pkgbuild@1.0.2:", type=("build", "run"))
depends_on("r-pkgcache@1.3.0:", type=("build", "run"))
depends_on("r-pkgcache@2.0.0:", type=("build", "run"), when="@0.3.1:")
depends_on("r-pkgcache@2.1.0:", type=("build", "run"), when="@0.5.0:")
- depends_on("r-prettyunits@1.1.1:", type=("build", "run"))
+ depends_on("r-pkgcache@2.2.0:", type=("build", "run"), when="@0.6.0:")
depends_on("r-processx@3.4.2:", type=("build", "run"))
depends_on("r-ps", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
- depends_on("r-rprojroot", type=("build", "run"))
- depends_on("r-withr@2.1.1:", type=("build", "run"))
depends_on("r-zip@2.1.0:", type=("build", "run"))
depends_on("r-zip@2.3.0:", type=("build", "run"), when="@0.5.0:")
+ depends_on("r-glue", type=("build", "run"), when="@:0.7.0")
+ depends_on("r-prettyunits@1.1.1:", type=("build", "run"), when="@:0.7.0")
+ depends_on("r-rprojroot", type=("build", "run"), when="@:0.7.0")
+ depends_on("r-withr@2.1.1:", type=("build", "run"), when="@:0.5.0")
depends_on("r-rematch2", type=("build", "run"), when="@:0.2.0")
depends_on("r-tibble", type=("build", "run"), when="@:0.2.0")
depends_on("r-crayon", type=("build", "run"), when="@:0.3.2")
diff --git a/var/spack/repos/builtin/packages/r-pkgdown/package.py b/var/spack/repos/builtin/packages/r-pkgdown/package.py
index 14cb41076c..017b64e160 100644
--- a/var/spack/repos/builtin/packages/r-pkgdown/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgdown/package.py
@@ -17,29 +17,42 @@ class RPkgdown(RPackage):
license("MIT")
+ version("2.1.0", sha256="c4d1df3b738d66e60db71e57c01c86c46f2fe58f972c9e2403c07a1436279fb4")
version("2.0.7", sha256="f33872869dfa8319182d87e90eab3245ff69293b3b791471bf9538afb81b356a")
version("2.0.6", sha256="d29a65c8a5b189fd89842e769f58f8c2369a55406269eabfb66d41d0fe1c7f69")
depends_on("r@3.1.0:", type=("build", "run"))
+ depends_on("r@3.6:", type=("build", "run"), when="@2.0.8:")
depends_on("r-bslib@0.3.1:", type=("build", "run"))
+ depends_on("r-bslib@0.5.1:", type=("build", "run"), when="@2.0.8:")
depends_on("r-callr@2.0.2:", type=("build", "run"))
depends_on("r-callr@3.7.3:", type=("build", "run"), when="@2.0.7:")
depends_on("r-cli", type=("build", "run"))
+ depends_on("r-cli@3.6.1:", type=("build", "run"), when="@2.0.8:")
depends_on("r-desc", type=("build", "run"))
+ depends_on("r-desc@1.4.0:", type=("build", "run"), when="@2.0.8:")
depends_on("r-digest", type=("build", "run"))
depends_on("r-downlit@0.4.0:", type=("build", "run"))
+ depends_on("r-downlit@0.4.4:", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-fontawesome", type=("build", "run"), when="@2.1.0:")
depends_on("r-fs@1.4.0:", type=("build", "run"))
- depends_on("r-httr@1.4.2:", type=("build", "run"))
+ depends_on("r-httr2@1.0.0:", type=("build", "run"), when="@2.1.0:")
depends_on("r-jsonlite", type=("build", "run"))
- depends_on("r-magrittr", type=("build", "run"))
- depends_on("r-memoise", type=("build", "run"))
+ depends_on("r-openssl", type=("build", "run"), when="@2.1.0:")
depends_on("r-purrr", type=("build", "run"))
+ depends_on("r-purrr@1.0.0:", type=("build", "run"), when="@2.0.8:")
depends_on("r-ragg", type=("build", "run"))
depends_on("r-rlang@1.0.0:", type=("build", "run"))
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@2.0.9:")
depends_on("r-rmarkdown@1.1.9007:", type=("build", "run"))
+ depends_on("r-rmarkdown@2.27:", type=("build", "run"), when="@2.1.0:")
depends_on("r-tibble", type=("build", "run"))
depends_on("r-whisker", type=("build", "run"))
depends_on("r-withr@2.4.3:", type=("build", "run"))
depends_on("r-xml2@1.3.1:", type=("build", "run"))
depends_on("r-yaml", type=("build", "run"))
depends_on("pandoc")
+
+ depends_on("r-httr@1.4.2:", type=("build", "run"), when="@:2.0.9")
+ depends_on("r-magrittr", type=("build", "run"), when="@:2.0.9")
+ depends_on("r-memoise", type=("build", "run"), when="@:2.0.9")
diff --git a/var/spack/repos/builtin/packages/r-pkgload/package.py b/var/spack/repos/builtin/packages/r-pkgload/package.py
index 0ad45d99b5..3a6b717b95 100644
--- a/var/spack/repos/builtin/packages/r-pkgload/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgload/package.py
@@ -17,6 +17,10 @@ class RPkgload(RPackage):
license("GPL-3.0-only")
+ version("1.4.0", sha256="09e4885e9cc25af29063a525da0b2ac9dd66fc7a95ea085bf5060312e3a67549")
+ version("1.3.4", sha256="60b04b948cda4dc56257b1e89f9b0a4b1273cacecdb2bd995d66dd76e89926ce")
+ version("1.3.3", sha256="b0898122876479cc4a35cd566654b3a7b50f8ac105565dbf3f8b9d4283816959")
+ version("1.3.2.1", sha256="a1987b123fcbdb9d908b6dc55a04d3cf47d68cfa5090186e4876a429313374b2")
version("1.3.2", sha256="35d19a032bfeeefcab92d76a768b4a420c2ede0920badaf48cca878592b46b2f")
version("1.3.1", sha256="c6b8b70d7b7e194e7d44a42364f0362e971d9ab9c5794c4ae5ed4f9e61b1679a")
version("1.3.0", sha256="5af653c901662260cc221971cc968355428cc6183b61c15be80aa9545f9f4228")
@@ -28,15 +32,19 @@ class RPkgload(RPackage):
depends_on("r-cli", type=("build", "run"), when="@1.1.0:")
depends_on("r-cli@3.3.0:", type=("build", "run"), when="@1.3.0:")
- depends_on("r-crayon", type=("build", "run"), when="@1.1.0:")
+ depends_on("r-crayon", type=("build", "run"), when="@1.1.0:1.3")
depends_on("r-desc", type=("build", "run"))
depends_on("r-glue", type=("build", "run"), when="@1.3.0:")
depends_on("r-fs", type=("build", "run"), when="@1.3.0:")
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.4.0:")
+ depends_on("r-processx", type=("build", "run"), when="@1.4.0:")
depends_on("r-rlang", type=("build", "run"))
- depends_on("r-rlang@1.0.3:", type=("build", "run"), when="@1.3.0:")
+ depends_on("r-rlang@1.0.3:", type=("build", "run"), when="@1.3.0:1.3.3")
+ depends_on("r-rlang@1.1.1:", type=("build", "run"), when="@1.3.4:")
depends_on("r-rprojroot", type=("build", "run"))
depends_on("r-withr", type=("build", "run"))
depends_on("r-withr@2.4.3:", type=("build", "run"), when="@1.3.0:")
depends_on("r-pkgbuild", type=("build", "run"), when="@:1.1.0")
+ depends_on("r-pkgbuild", type=("build", "run"), when="@1.3.4:")
depends_on("r-rstudioapi", type=("build", "run"), when="@:1.2.4")
diff --git a/var/spack/repos/builtin/packages/r-pkgmaker/package.py b/var/spack/repos/builtin/packages/r-pkgmaker/package.py
index 47efa743ec..af688596a3 100644
--- a/var/spack/repos/builtin/packages/r-pkgmaker/package.py
+++ b/var/spack/repos/builtin/packages/r-pkgmaker/package.py
@@ -21,6 +21,7 @@ class RPkgmaker(RPackage):
license("GPL-2.0-or-later")
+ version("0.32.10", sha256="972b0473a64408ccc4841fa3f09a567cc32811e69c3c7e42a2f391a5eb2e2933")
version("0.32.8", sha256="0ff3578d2c051b544c3f105cfe4801575aac1564add048f9e952c53a8ccd1745")
version("0.32.2", sha256="ce45b22def771a9c90a414093823e6befe7e23489c500eeccee5154b44d3ef91")
version("0.27", sha256="17a289d8f596ba5637b07077b3bff22411a2c2263c0b7de59fe848666555ec6a")
diff --git a/var/spack/repos/builtin/packages/r-pki/package.py b/var/spack/repos/builtin/packages/r-pki/package.py
new file mode 100644
index 0000000000..612dbecdbc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-pki/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RPki(RPackage):
+ """Public Key Infrastucture functions such as verifying certificates,
+ RSA encription and signing which can be used to build PKI infrastructure
+ and perform cryptographic tasks."""
+
+ homepage = "http://www.rforge.net/PKI"
+ cran = "PKI"
+
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+
+ version("0.1-14", sha256="c024e81977b978b705460df96639e3369420bd7e8f4f3242ec796255dc1b7966")
+
+ depends_on("r@2.9.0:", type=("build", "run"))
+ depends_on("r-base64enc", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-plot3d/package.py b/var/spack/repos/builtin/packages/r-plot3d/package.py
index 0ba526522a..31a6ed7e75 100644
--- a/var/spack/repos/builtin/packages/r-plot3d/package.py
+++ b/var/spack/repos/builtin/packages/r-plot3d/package.py
@@ -15,6 +15,7 @@ class RPlot3d(RPackage):
cran = "plot3D"
+ version("1.4.1", sha256="db6df74844dda9177f2be024762b2f0e63182916e987a09480514d078d55d1f4")
version("1.4", sha256="d04a45197646fb36bc38870c1c2351cb56b912bd772b1ebfa25eaeef35fda9c0")
version("1.3", sha256="b9e4ec2789e34ad249318900e186868650e1a33466b385cb492a45466db3dfc9")
version("1.1.1", sha256="f6fe4a001387132626fc553ed1d5720d448b8064eb5a6917458a798e1d381632")
diff --git a/var/spack/repos/builtin/packages/r-plotly/package.py b/var/spack/repos/builtin/packages/r-plotly/package.py
index 9b266588fd..ba3ba33ad1 100644
--- a/var/spack/repos/builtin/packages/r-plotly/package.py
+++ b/var/spack/repos/builtin/packages/r-plotly/package.py
@@ -17,6 +17,7 @@ class RPlotly(RPackage):
license("MIT")
+ version("4.10.4", sha256="cfa995b7ed55d31a196707a3ae6ea352dd907cef3058a3bf1956fde39366d867")
version("4.10.1", sha256="ac0921a1cba24e17a0f3a0a28b7a40ac930e17fe5caa9c3973c9a8d1e20c367a")
version("4.10.0", sha256="bd995c654dbc8c09a84adaba8def99766919e3894caf18b551bb26b2f591389a")
version("4.9.3", sha256="d44d1a16d96de28bc2d36f1c897384215eeec44d109546c6e9c2707db0880120")
diff --git a/var/spack/repos/builtin/packages/r-plotmo/package.py b/var/spack/repos/builtin/packages/r-plotmo/package.py
index de5de683ee..2f0cb89e81 100644
--- a/var/spack/repos/builtin/packages/r-plotmo/package.py
+++ b/var/spack/repos/builtin/packages/r-plotmo/package.py
@@ -17,6 +17,7 @@ class RPlotmo(RPackage):
license("GPL-3.0-only")
+ version("3.6.3", sha256="6917cd8185325f1f2998fb14def9e6a8d93f1b708cf70d7c443d3960c9189b7b")
version("3.6.2", sha256="cde33a8ec558b12d8e11d7d0531e73f6678a25ee589b79897d2fc425a3fd353c")
version("3.6.1", sha256="245a0c87f0cca08746c6fdc60da2e3856cd69b1a2b7b5641293c620d4ae04343")
version("3.6.0", sha256="c05afcc442f9542868beea5c3c40fb93b049f9b61c42725b2a1e2bc750c241e3")
@@ -25,4 +26,5 @@ class RPlotmo(RPackage):
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-formula@1.2-3:", type=("build", "run"))
depends_on("r-plotrix", type=("build", "run"))
- depends_on("r-teachingdemos", type=("build", "run"))
+
+ depends_on("r-teachingdemos", type=("build", "run"), when="@:3.6.2")
diff --git a/var/spack/repos/builtin/packages/r-plotrix/package.py b/var/spack/repos/builtin/packages/r-plotrix/package.py
index 9a74b4ceb7..bbeecbe9f3 100644
--- a/var/spack/repos/builtin/packages/r-plotrix/package.py
+++ b/var/spack/repos/builtin/packages/r-plotrix/package.py
@@ -15,6 +15,7 @@ class RPlotrix(RPackage):
license("GPL-2.0-or-later")
+ version("3.8-4", sha256="e6a22d93ab61c67af21cbbe1fe333c06934cf576a44745bf2beee59bceaae8d6")
version("3.8-2", sha256="bb72953102889cea41cd6521874e35d2458ebd10aab97ba6f262e102cac0bc1f")
version("3.7-8", sha256="8ccd1f7e656413b9956cea614c986ce9cc61366deba356afb38cee6672a59480")
version("3.7-6", sha256="83d5f7574592953288b4fe39c4c0dd7670d097598ad7f6bddbb0687a32954e46")
diff --git a/var/spack/repos/builtin/packages/r-pls/package.py b/var/spack/repos/builtin/packages/r-pls/package.py
index b5cdc6df15..5990dc2061 100644
--- a/var/spack/repos/builtin/packages/r-pls/package.py
+++ b/var/spack/repos/builtin/packages/r-pls/package.py
@@ -17,6 +17,7 @@ class RPls(RPackage):
license("GPL-2.0-only")
+ version("2.8-4", sha256="785b1b63639754811bec124fcd46bd821c76611380f49a7555695a2969b3d562")
version("2.8-1", sha256="e22e7febeef1a6800b97ee7f6eb03dc1d6681aba7f9298449c9e6375fa78f28c")
version("2.8-0", sha256="eff3a92756ca34cdc1661fa36d2bf7fc8e9f4132d2f1ef9ed0105c83594618bf")
version("2.7-3", sha256="8f1d960ab74f05fdd11c4c7a3d30ff9e263fc658f5690b67278ca7c045d0742c")
diff --git a/var/spack/repos/builtin/packages/r-plyr/package.py b/var/spack/repos/builtin/packages/r-plyr/package.py
index e0cd4ca9f3..34387c943f 100644
--- a/var/spack/repos/builtin/packages/r-plyr/package.py
+++ b/var/spack/repos/builtin/packages/r-plyr/package.py
@@ -21,6 +21,7 @@ class RPlyr(RPackage):
license("MIT")
+ version("1.8.9", sha256="15b5e7f711d53bf41b8687923983b8ef424563aa2f74c5195feb5b1df1aee103")
version("1.8.8", sha256="a73211b4bbe13e4e5e764966a8dd90172c1cc311938dd464d142e1c7a701070c")
version("1.8.7", sha256="7d9fdaf1157035a49c3661da3bbaa7bfcf782aafe1b98f7b5a68b0520046e87f")
version("1.8.6", sha256="ea55d26f155443e9774769531daa5d4c20a0697bb53abd832e891b126c935287")
diff --git a/var/spack/repos/builtin/packages/r-pmcmrplus/package.py b/var/spack/repos/builtin/packages/r-pmcmrplus/package.py
index 047b2bffa9..e5e76090bf 100644
--- a/var/spack/repos/builtin/packages/r-pmcmrplus/package.py
+++ b/var/spack/repos/builtin/packages/r-pmcmrplus/package.py
@@ -36,6 +36,7 @@ class RPmcmrplus(RPackage):
cran = "PMCMRplus"
+ version("1.9.10", sha256="d883f897fa26a0bca0ba464dac7b360c6adee2c7867097e91fc7588030ed1f70")
version("1.9.6", sha256="7f4791566d7dfaed0883187c52fbb845797ff6a1066e77667683ce96391b72d7")
version("1.9.4", sha256="1ec36674bb6d2fac3a1b0889c4672e40849c7e3565ffb34bb73b61f973bba19a")
version("1.9.3", sha256="76baba60f57343fa5bb6f6d2ea27aab77178e02b0d2f9d5d74abde7d18994f03")
diff --git a/var/spack/repos/builtin/packages/r-png/package.py b/var/spack/repos/builtin/packages/r-png/package.py
index 41950df3dc..3780eab83a 100644
--- a/var/spack/repos/builtin/packages/r-png/package.py
+++ b/var/spack/repos/builtin/packages/r-png/package.py
@@ -20,5 +20,7 @@ class RPng(RPackage):
version("0.1-8", sha256="5a36fabb6d62ba2533d3fc4cececd07891942cfb76fe689ec0d550d08762f61c")
version("0.1-7", sha256="e269ff968f04384fc9421d17cfc7c10cf7756b11c2d6d126e9776f5aca65553c")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.9.0:", type=("build", "run"))
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/r-polspline/package.py b/var/spack/repos/builtin/packages/r-polspline/package.py
index ed627a8781..f773e95621 100644
--- a/var/spack/repos/builtin/packages/r-polspline/package.py
+++ b/var/spack/repos/builtin/packages/r-polspline/package.py
@@ -17,6 +17,7 @@ class RPolspline(RPackage):
license("GPL-2.0-or-later")
+ version("1.1.25", sha256="2943fc4cd922300afeaa58e6a0e4c21e5a0f7255e6367c7ea6ad136fce1e9ba3")
version("1.1.22", sha256="b2f2198f020d7d492a87bad2b58a6cc9ae91d95b7330dd12b9b1145c72d7457b")
version("1.1.20", sha256="6992484e9e41036debef1e705e26959f8f5c7a68d3e1fda58273d2a72297a1b5")
version("1.1.19", sha256="953e3c4d007c3ef86ac2af3c71b272a99e8e35b194bdd58575785558c6711f66")
diff --git a/var/spack/repos/builtin/packages/r-polyclip/package.py b/var/spack/repos/builtin/packages/r-polyclip/package.py
index 55c5ff6f81..93eaf4a57e 100644
--- a/var/spack/repos/builtin/packages/r-polyclip/package.py
+++ b/var/spack/repos/builtin/packages/r-polyclip/package.py
@@ -21,7 +21,9 @@ class RPolyclip(RPackage):
license("BSL-1.0")
+ version("1.10-7", sha256="f58eaac3a5b2f6711c0c5f12fff91cf80a245ae45878f7217880ab062b5550d3")
version("1.10-4", sha256="84d2c9778771d3759b49d7d16fb54c8ddc5397da3b1d21074bc4aa42c02e6f56")
version("1.10-0", sha256="74dabc0dfe5a527114f0bb8f3d22f5d1ae694e6ea9345912909bae885525d34b")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@1.10-7:")
diff --git a/var/spack/repos/builtin/packages/r-pool/package.py b/var/spack/repos/builtin/packages/r-pool/package.py
index 56c8ad1226..cb713e9124 100644
--- a/var/spack/repos/builtin/packages/r-pool/package.py
+++ b/var/spack/repos/builtin/packages/r-pool/package.py
@@ -17,12 +17,16 @@ class RPool(RPackage):
license("MIT")
+ version("1.0.3", sha256="c461f96928c3e524a52018160d2406f3a1f5ef5abbae54ae89fe7ecd4c1a1cec")
version("1.0.1", sha256="73d5dffd55e80fdadb88401f12570fcf08e932c4c86761931241f9841fddadbf")
version("0.1.6", sha256="cdbe5f6c7f757c01893dc9870df0fb8d300829da0e427f6c2559b01caa52d9e1")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@1.0.2:")
depends_on("r-dbi", type=("build", "run"))
+ depends_on("r-dbi@1.2.1:", type=("build", "run"), when="@1.0.3:")
depends_on("r-r6", type=("build", "run"))
- depends_on("r-withr", type=("build", "run"), when="@1.0.1:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.0.1:")
depends_on("r-later@1.0.0:", type=("build", "run"))
+
+ depends_on("r-withr", type=("build", "run"), when="@1.0.1")
diff --git a/var/spack/repos/builtin/packages/r-poorman/package.py b/var/spack/repos/builtin/packages/r-poorman/package.py
index ea5c5ac0e4..0994518815 100644
--- a/var/spack/repos/builtin/packages/r-poorman/package.py
+++ b/var/spack/repos/builtin/packages/r-poorman/package.py
@@ -16,6 +16,7 @@ class RPoorman(RPackage):
license("MIT")
+ version("0.2.7", sha256="089418293cdfde3b46bf53e891a3a8ad924d953a1a7e5ae981de54ebde62b4aa")
version("0.2.6", sha256="328e0a3e610f17e845d95cd9c0803e0367d6f5835706e8b0ed921fc500983774")
version("0.2.5", sha256="b92b30ce0f4f02c4fa4a4e90673ef2e0ed8de9b9080dd064506581989fcc0716")
diff --git a/var/spack/repos/builtin/packages/r-popvar/package.py b/var/spack/repos/builtin/packages/r-popvar/package.py
index 90c15fa3cb..c7afc8c5c6 100644
--- a/var/spack/repos/builtin/packages/r-popvar/package.py
+++ b/var/spack/repos/builtin/packages/r-popvar/package.py
@@ -22,6 +22,7 @@ class RPopvar(RPackage):
cran = "PopVar"
+ version("1.3.1", sha256="adb0f6705b7bb984272db31f8ac6612100f7970aa7d0e5cfdef76124dd33ac98")
version("1.3.0", sha256="3145c41c9aa1588d47aaf76c082e6b1c2fd95cf5014b98bd2867cbf2cec782f9")
version("1.2.1", sha256="5e3df79634ab63708a431e4b8e6794675972ac6c58d2bc615726aa0f142f5f25")
diff --git a/var/spack/repos/builtin/packages/r-posterior/package.py b/var/spack/repos/builtin/packages/r-posterior/package.py
index 4d1c9fdc2c..859ad7c799 100644
--- a/var/spack/repos/builtin/packages/r-posterior/package.py
+++ b/var/spack/repos/builtin/packages/r-posterior/package.py
@@ -23,6 +23,7 @@ class RPosterior(RPackage):
license("BSD-3-Clause")
+ version("1.6.0", sha256="34612a39fb15a8e3ba6ef5c32a041a4b5f77554216dd774563f46db1150bf40c")
version("1.4.1", sha256="2b8953fa8d6890a105521023c431ddea725465eb95cf9454a88852e43ebb58d3")
version("1.3.1", sha256="7000780290a24be86dbc406dd4338aec622d8dee1e471b68b55abb4872934d7a")
version("1.2.1", sha256="b757e06885a1f21e7ad8f5a3feaecbe0a71ae8d766e4aec4c3aa2183a810afe1")
diff --git a/var/spack/repos/builtin/packages/r-powerlaw/package.py b/var/spack/repos/builtin/packages/r-powerlaw/package.py
index 4c664b9d15..c73409dcbc 100644
--- a/var/spack/repos/builtin/packages/r-powerlaw/package.py
+++ b/var/spack/repos/builtin/packages/r-powerlaw/package.py
@@ -16,6 +16,7 @@ class RPowerlaw(RPackage):
cran = "poweRlaw"
+ version("0.80.0", sha256="713556af1f47e1de749670d08f963688908cfa80e9dfda590efd1a28441772cb")
version("0.70.6", sha256="efc091449c5c6494c1c13c85a8eb95625d1c55ffffebe86c7ea16e4abbafa191")
version("0.70.2", sha256="240f1454389b1a00ad483fb63e5b53243cc9367f21a3e7253ab2c293673459ab")
version("0.70.1", sha256="15b1b8dadeb550c01b9f1308cfa64720be6fbf56afb80f6a096987d6a0055913")
diff --git a/var/spack/repos/builtin/packages/r-prabclus/package.py b/var/spack/repos/builtin/packages/r-prabclus/package.py
index 56d94d7ba9..df23c06398 100644
--- a/var/spack/repos/builtin/packages/r-prabclus/package.py
+++ b/var/spack/repos/builtin/packages/r-prabclus/package.py
@@ -21,11 +21,13 @@ class RPrabclus(RPackage):
license("GPL-2.0-or-later")
+ version("2.3-3", sha256="005d000a9ac357e670de26e5b8fc4ddb1617351275fa43bf6d2e88b8774358c1")
version("2.3-2", sha256="f421bcbcb557281e0de4a06b15f9a496adb5c640e883c0f7bb12051efc69e441")
version("2.3-1", sha256="ef3294767d43bc3f72478fdaf0d1f13c8de18881bf9040c9f1add68af808b3c0")
version("2.2-7.1", sha256="2c5bf3bbb0d225e04c53bb0e11e9c2a6809f0e46d95b8f6dc14b9dd6a2452975")
version("2.2-6", sha256="41792980e40ba18204fab92d85120dcd468860e2204e52fb42636c6f7aee5a62")
depends_on("r@2.1.0:", type=("build", "run"))
+ depends_on("r@2.10:", type=("build", "run"), when="@2.2-2:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-mclust", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-pracma/package.py b/var/spack/repos/builtin/packages/r-pracma/package.py
index 2d4858d429..59d54e2132 100644
--- a/var/spack/repos/builtin/packages/r-pracma/package.py
+++ b/var/spack/repos/builtin/packages/r-pracma/package.py
@@ -18,6 +18,7 @@ class RPracma(RPackage):
license("GPL-3.0-or-later")
+ version("2.4.4", sha256="1a4ef3af2197f999dbaa614bf5a70f09ec463d8c91feb5aa0d995de24ec6ba7f")
version("2.4.2", sha256="1d50337fdfd9a8d704a64f01dae5d52b9a2bd6d872fdaa4a6685b8d3bde89c16")
version("2.3.8", sha256="2302d454406e72711714732658d0c59c9d5a1ead698f22ee23f38cba63d42764")
version("2.3.6", sha256="17ac83fd48c9155e00dc3f0433f95723505dc73d046860afd9001866d699b8de")
diff --git a/var/spack/repos/builtin/packages/r-preprocesscore/package.py b/var/spack/repos/builtin/packages/r-preprocesscore/package.py
index 080ff674ca..11c9fb8484 100644
--- a/var/spack/repos/builtin/packages/r-preprocesscore/package.py
+++ b/var/spack/repos/builtin/packages/r-preprocesscore/package.py
@@ -23,3 +23,5 @@ class RPreprocesscore(RPackage):
version("1.42.0", commit="2e3a8baeacfaa1526d51252642772ea951015bba")
version("1.40.0", commit="969bb0e5cbd63d569502ae4e6eaadc1e216646dd")
version("1.38.1", commit="c58cb4c720eda0f1c733b989b14912093a7c5fbc")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-prettyunits/package.py b/var/spack/repos/builtin/packages/r-prettyunits/package.py
index b3b317d3f6..8c0503a4eb 100644
--- a/var/spack/repos/builtin/packages/r-prettyunits/package.py
+++ b/var/spack/repos/builtin/packages/r-prettyunits/package.py
@@ -17,8 +17,11 @@ class RPrettyunits(RPackage):
license("MIT")
+ version("1.2.0", sha256="f059f27e2a5c82e351fe05b87ad712f7afc273c651450453f59d99af5deeacea")
version("1.1.1", sha256="9a199aa80c6d5e50fa977bc724d6e39dae1fc597a96413053609156ee7fb75c5")
version("1.0.2", sha256="35a4980586c20650538ae1e4fed4d80fdde3f212b98546fc3c7d9469a1207f5c")
+ depends_on("r@2.10:", type=("build", "run"), when="@1.2.0:")
+
depends_on("r-magrittr", type=("build", "run"), when="@:1.0.2")
depends_on("r-assertthat", type=("build", "run"), when="@:1.0.2")
diff --git a/var/spack/repos/builtin/packages/r-proc/package.py b/var/spack/repos/builtin/packages/r-proc/package.py
index eb2a3ee026..a89e84c78f 100644
--- a/var/spack/repos/builtin/packages/r-proc/package.py
+++ b/var/spack/repos/builtin/packages/r-proc/package.py
@@ -16,6 +16,7 @@ class RProc(RPackage):
cran = "pROC"
+ version("1.18.5", sha256="5593c841a6df5a2f2d209d0c14401971eb9427092ed9c3ac2059273807b42c89")
version("1.18.0", sha256="d5ef54b384176ece6d6448014ba40570a98181b58fee742f315604addb5f7ba9")
version("1.17.0.1", sha256="221c726ffb81b04b999905effccfd3a223cd73cae70d7d86688e2dd30e51a6bd")
diff --git a/var/spack/repos/builtin/packages/r-processx/package.py b/var/spack/repos/builtin/packages/r-processx/package.py
index cf92432de3..9c1e21cdf8 100644
--- a/var/spack/repos/builtin/packages/r-processx/package.py
+++ b/var/spack/repos/builtin/packages/r-processx/package.py
@@ -20,6 +20,7 @@ class RProcessx(RPackage):
license("MIT")
+ version("3.8.4", sha256="6627672d7fb109f37dc1d0eaef913f4cfc7ad8ac807abf0397e6d37753b1e70b")
version("3.8.1", sha256="e008472b81d4ca1a37a4ba7dd58e5e944f96ab2e44c8ccc8840d43e9fe99e93c")
version("3.8.0", sha256="9270d9d26c4314151062801a5c1fc57556b4fcb41dbf3558cb5bd230b18ffb0b")
version("3.7.0", sha256="de6a8d4135fc53ec35043fbaf6b000dc9597719345595d8479662a39dad55ed3")
diff --git a/var/spack/repos/builtin/packages/r-prodlim/package.py b/var/spack/repos/builtin/packages/r-prodlim/package.py
index 617aa47649..86754a10e8 100644
--- a/var/spack/repos/builtin/packages/r-prodlim/package.py
+++ b/var/spack/repos/builtin/packages/r-prodlim/package.py
@@ -18,6 +18,9 @@ class RProdlim(RPackage):
license("GPL-2.0-or-later")
version(
+ "2024.06.25", sha256="46961f654171aa7ef0ff94b23508ed59f6a438c3a3ba0d338cc3730224406764"
+ )
+ version(
"2023.03.31", sha256="5510454f8511ca956666f27dfb77d875c56b9166188c33f22cd22b7615797800"
)
version(
diff --git a/var/spack/repos/builtin/packages/r-profvis/package.py b/var/spack/repos/builtin/packages/r-profvis/package.py
index 709aca7e82..787041fb2e 100644
--- a/var/spack/repos/builtin/packages/r-profvis/package.py
+++ b/var/spack/repos/builtin/packages/r-profvis/package.py
@@ -13,8 +13,12 @@ class RProfvis(RPackage):
license("GPL-3.0-only OR custom")
+ version("0.3.8", sha256="ec02c75bc9907a73564e691adfa8e06651ca0bd73b7915412960231cd265b4b2")
version("0.3.7", sha256="43974863cb793f81dbea4b94096343c321f7739c9038980405c9b16b04a906b9")
depends_on("r@3.0:", type=("build", "run"))
depends_on("r-htmlwidgets@0.3.2:", type=("build", "run"))
+ depends_on("r-purrr", type=("build", "run"), when="@0.3.8:")
+ depends_on("r-rlang@0.4.9:", type=("build", "run"), when="@0.3.8:")
depends_on("r-stringr", type=("build", "run"))
+ depends_on("r-vctrs", type=("build", "run"), when="@0.3.8:")
diff --git a/var/spack/repos/builtin/packages/r-progress/package.py b/var/spack/repos/builtin/packages/r-progress/package.py
index d3f41e6548..dbc314340b 100644
--- a/var/spack/repos/builtin/packages/r-progress/package.py
+++ b/var/spack/repos/builtin/packages/r-progress/package.py
@@ -18,10 +18,12 @@ class RProgress(RPackage):
license("MIT")
+ version("1.2.3", sha256="ea2b079b894de85c3ab12088c9c52aec06432245047a961d5b4b8aa6889f9276")
version("1.2.2", sha256="b4a4d8ed55db99394b036a29a0fb20b5dd2a91c211a1d651c52a1023cc58ff35")
version("1.2.1", sha256="7401e86ff76bef4d26508b74ee8bd169a0377b2738d9ec79ebff0b7fd5c55326")
version("1.1.2", sha256="a9f4abfd9579b80967cd681041643fe9dfcc4eb3beeba45391bb64e9209baabb")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.2.3:")
depends_on("r-r6", type=("build", "run"))
depends_on("r-prettyunits", type=("build", "run"))
depends_on("r-hms", type=("build", "run"), when="@1.2.0:")
diff --git a/var/spack/repos/builtin/packages/r-progressr/package.py b/var/spack/repos/builtin/packages/r-progressr/package.py
index 457a09c4b0..d07c5124e9 100644
--- a/var/spack/repos/builtin/packages/r-progressr/package.py
+++ b/var/spack/repos/builtin/packages/r-progressr/package.py
@@ -31,6 +31,7 @@ class RProgressr(RPackage):
license("GPL-3.0-or-later")
+ version("0.14.0", sha256="9a2899f879a5577f043be99c18d52bfe4d655cc52a96cae834e8a301b36258af")
version("0.13.0", sha256="0ffb3dcadde0cc191bad0ff9e05d000aa65e2fc339cfc94ebbb263088df5a4e1")
version("0.11.0", sha256="d8668c82348a20cca34bb18c0c94e6083dbb6dbea40615e07e4161aff7366cd9")
version("0.10.1", sha256="8f83024b2a6f52996750d45bf6698c2b438fb1062985f1df936ba3af313caed1")
diff --git a/var/spack/repos/builtin/packages/r-proj/package.py b/var/spack/repos/builtin/packages/r-proj/package.py
index 78463c53d9..34d502b5e2 100644
--- a/var/spack/repos/builtin/packages/r-proj/package.py
+++ b/var/spack/repos/builtin/packages/r-proj/package.py
@@ -9,13 +9,29 @@ from spack.package import *
class RProj(RPackage):
"""Generic Coordinate System Transformations Using 'PROJ'.
- Currently non-operational, a harmless wrapper to allow package 'reproj' to
- install and function while relying on the 'proj4' package."""
+ A wrapper around the generic coordinate transformation software 'PROJ'
+ that transforms coordinates from one coordinate reference system ('CRS')
+ to another. This includes cartographic projections as well as geodetic
+ transformations. The intention is for this package to be used by
+ user-packages such as 'reproj', and that the older 'PROJ.4' and version 5
+ pathways be provided by the 'proj4' package."""
cran = "PROJ"
+ version("0.5.0", sha256="fa6316693289a65d53a764b422f15072c34f440375264b822f2ddd2c6ec88c9b")
version("0.4.0", sha256="dde90cfeca83864e61a7422e1573d2d55bb0377c32b9a8f550f47b8631121ce7")
version("0.1.0", sha256="5186f221335e8092bbcd4d82bd323ee7e752c7c9cf83d3f94e4567e0b407aa6f")
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@3.0.2:", type=("build", "run"), when="@0.4.0:")
+
+ depends_on("r-lifecycle", type=("build", "run"), when="@0.5.0:")
+ depends_on("r-wk", type=("build", "run"), when="@0.5.0:")
+
+ depends_on("proj@6.3.1:", type=("build", "run"), when="@0.4.5:")
+ # pkgconfig for proj requires libtiff-4 and libcurl
+ depends_on("libtiff@4", type=("build", "run"))
+ depends_on("curl", type=("build", "run"))
+
+ def setup_build_environment(self, env):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["proj"].prefix.lib)
diff --git a/var/spack/repos/builtin/packages/r-proj4/package.py b/var/spack/repos/builtin/packages/r-proj4/package.py
index d0d6d02985..db7522b89d 100644
--- a/var/spack/repos/builtin/packages/r-proj4/package.py
+++ b/var/spack/repos/builtin/packages/r-proj4/package.py
@@ -17,6 +17,7 @@ class RProj4(RPackage):
license("GPL-2.0-only")
+ version("1.0-14", sha256="d3d571da92136666dd3658b6006a7d4d4254cdeada5cda21b05b0c0e692a00b6")
version("1.0-12", sha256="4aeb8a54d5b459674093c76068b92dbd3ce99a4e5db8829fbae868c2e43776f8")
version("1.0-11", sha256="c5f186530267005d53cc2e86849613b254ca4515a8b10310146f712d45a1d11d")
version("1.0-10.1", sha256="66857cbe5cba4930b18621070f9a7263ea0d8ddc3e5a035a051a1496e4e1da19")
diff --git a/var/spack/repos/builtin/packages/r-projpred/package.py b/var/spack/repos/builtin/packages/r-projpred/package.py
index 35c3befa53..0446671c76 100644
--- a/var/spack/repos/builtin/packages/r-projpred/package.py
+++ b/var/spack/repos/builtin/packages/r-projpred/package.py
@@ -21,29 +21,33 @@ class RProjpred(RPackage):
license("GPL-3.0-only OR custom")
+ version("2.8.0", sha256="b383ddc5eca275737b96e4e3e14256b4f4abc4b29d292b5cebf3828d0921a1f6")
version("2.5.0", sha256="b6ec123f5bf573d14cbd5431e3fbdee3215d71d3e263fcbec72bee5930044e39")
version("2.2.1", sha256="6825ace07d1e580d5916bcd6bfd163460ae9008926f464e00deb7f2395cc72ad")
version("2.1.2", sha256="a88a651e533c118aad0e8c2c905cfcf688d9c419ed195896036b8f6667b5cfb0")
version("2.0.2", sha256="af0a9fb53f706090fe81b6381b27b0b6bd3f7ae1e1e44b0ada6f40972b09a55b")
depends_on("r@3.5.0:", type=("build", "run"))
- depends_on("r-loo@2.0.0:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@2.7.0:")
+ depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-gtools", type=("build", "run"), when="@2.7.0:")
+ depends_on("r-ggplot2", type=("build", "run"))
+ depends_on("r-scales", type=("build", "run"), when="@2.6.0:")
depends_on("r-rstantools@2.0.0:", type=("build", "run"))
+ depends_on("r-loo@2.0.0:", type=("build", "run"))
depends_on("r-lme4", type=("build", "run"))
depends_on("r-lme4@1.1-28:", type=("build", "run"), when="@2.5.0:")
depends_on("r-mvtnorm", type=("build", "run"), when="@2.1.2:")
- depends_on("r-ggplot2", type=("build", "run"))
- depends_on("r-rcpp", type=("build", "run"))
- depends_on("r-abind", type=("build", "run"), when="@2.5.0:")
depends_on("r-mgcv", type=("build", "run"))
depends_on("r-gamm4", type=("build", "run"))
- depends_on("r-mclogit", type=("build", "run"), when="@2.5.0:")
- depends_on("r-nnet", type=("build", "run"), when="@2.5.0:")
- depends_on("r-ucminf", type=("build", "run"), when="@2.5.0:")
- depends_on("r-ordinal", type=("build", "run"), when="@2.5.0:")
+ depends_on("r-abind", type=("build", "run"), when="@2.5.0:")
depends_on("r-mass", type=("build", "run"))
+ depends_on("r-ordinal", type=("build", "run"), when="@2.5.0:")
+ depends_on("r-nnet", type=("build", "run"), when="@2.5.0:")
+ depends_on("r-mclogit", type=("build", "run"), when="@2.5.0:")
depends_on("r-rcpparmadillo", type=("build", "run"))
+ depends_on("r-ucminf", type=("build", "run"), when="@2.5.0")
depends_on("r-optimx", type=("build", "run"), when="@:2.0.2")
depends_on("r-rngtools@1.2.4:", type=("build", "run"), when="@:2.0.2")
depends_on("r-tidyverse", type=("build", "run"), when="@:2.0.2")
diff --git a/var/spack/repos/builtin/packages/r-promises/package.py b/var/spack/repos/builtin/packages/r-promises/package.py
index 32016c2572..91cf59cbee 100644
--- a/var/spack/repos/builtin/packages/r-promises/package.py
+++ b/var/spack/repos/builtin/packages/r-promises/package.py
@@ -19,12 +19,15 @@ class RPromises(RPackage):
license("MIT")
+ version("1.3.0", sha256="f8209df3bab33340c1bc8c0d26caee2890fafb93129ff1423302abae5931fad3")
version("1.2.0.1", sha256="8d3a8217909e91f4c2a2eebba5ac8fc902a9ac1a9e9d8a30815c9dc0f162c4b7")
version("1.1.1", sha256="3718c6eb2c3362cbe89389e613118f783f9977dbf24757f85026e661199c5800")
version("1.0.1", sha256="c2dbc7734adf009377a41e570dfe0d82afb91335c9d0ca1ef464b9bdcca65558")
depends_on("r-r6", type=("build", "run"))
- depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-fastmap@1.1.0:", type=("build", "run"), when="@1.2.1:")
depends_on("r-later", type=("build", "run"))
- depends_on("r-rlang", type=("build", "run"))
depends_on("r-magrittr", type=("build", "run"))
+ depends_on("r-magrittr@1.5:", type=("build", "run"), when="@1.2.1:")
+ depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-rlang", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-proxy/package.py b/var/spack/repos/builtin/packages/r-proxy/package.py
index 52f3d7809f..6be53d753c 100644
--- a/var/spack/repos/builtin/packages/r-proxy/package.py
+++ b/var/spack/repos/builtin/packages/r-proxy/package.py
@@ -22,5 +22,7 @@ class RProxy(RPackage):
version("0.4-23", sha256="9dd4eb0978f40e4fcb55c8a8a26266d32eff9c63ac9dfe70cf1f664ca9c3669d")
version("0.4-19", sha256="6b27e275018366e6024382704da9a9757c8878535dbcd7d450824b70e2e34d51")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3.2:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@0.4-21:")
diff --git a/var/spack/repos/builtin/packages/r-pryr/package.py b/var/spack/repos/builtin/packages/r-pryr/package.py
index 80240fa83d..7fa806f0e0 100644
--- a/var/spack/repos/builtin/packages/r-pryr/package.py
+++ b/var/spack/repos/builtin/packages/r-pryr/package.py
@@ -23,6 +23,8 @@ class RPryr(RPackage):
version("0.1.3", sha256="6acd88341dde4fe247a5cafd3949b281dc6742b7d60f68b57c1feb84b96739ac")
version("0.1.2", sha256="65c2b7c9f96e2aa683ac9cdab3c215fd3039ecd66a2ba7002a8e77881428c3c6")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-stringr", type=("build", "run"))
depends_on("r-codetools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ps/package.py b/var/spack/repos/builtin/packages/r-ps/package.py
index 89612d8233..c78023b660 100644
--- a/var/spack/repos/builtin/packages/r-ps/package.py
+++ b/var/spack/repos/builtin/packages/r-ps/package.py
@@ -16,6 +16,7 @@ class RPs(RPackage):
license("MIT")
+ version("1.7.7", sha256="46fedcb2b8faa94ea1451e48e6f31a1e4ed3b12f529e645f9efcfca1003d22f2")
version("1.7.5", sha256="1abc3ae3c55797b994973f7e43bf5c7bbb4da649a0dcfad36675e196dba4cb4e")
version("1.7.2", sha256="9225ebdedb5c1b245bb38b01ce88084c0fc7eafcff6c4fda2e299003ace6b21a")
version("1.7.1", sha256="9c458a377d47cc972d3cd0b2a17d0b7ad3cf3b62226410803072089a57a55ef1")
diff --git a/var/spack/repos/builtin/packages/r-pscbs/package.py b/var/spack/repos/builtin/packages/r-pscbs/package.py
index 1ac75ed63a..89a7f6e1fa 100644
--- a/var/spack/repos/builtin/packages/r-pscbs/package.py
+++ b/var/spack/repos/builtin/packages/r-pscbs/package.py
@@ -15,23 +15,30 @@ class RPscbs(RPackage):
cran = "PSCBS"
+ version("0.67.0", sha256="2695d18d197a3bd729cca0940248ddc1880e4f54da95b9ecc5eda002a715cdbe")
version("0.66.0", sha256="58805636e55e0fd3f57bd4a0e296a8bb3d57a7bdd0fdd5868a73ddc83d173a93")
version("0.65.0", sha256="3365065d5375c599eb024bfff12c5f6b10a6b1a4fe4ba6f200f7e83618dd399a")
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r-r-methodss3@1.7.1:", type=("build", "run"))
depends_on("r-r-methodss3@1.8.1:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-r-methodss3@1.8.2:", type=("build", "run"), when="@0.67.0:")
depends_on("r-r-oo@1.22.1:", type=("build", "run"))
depends_on("r-r-oo@1.24.0:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-r-oo@1.25.0:", type=("build", "run"), when="@0.67.0:")
depends_on("r-r-utils@2.8.0:", type=("build", "run"))
depends_on("r-r-utils@2.11.0:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-r-utils@2.12.0:", type=("build", "run"), when="@0.67.0:")
depends_on("r-r-cache@0.13.0:", type=("build", "run"))
depends_on("r-r-cache@0.15.0:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-r-cache@0.16.0:", type=("build", "run"), when="@0.67.0:")
depends_on("r-matrixstats@0.54.0:", type=("build", "run"))
depends_on("r-matrixstats@0.61.0:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-matrixstats@0.62.0:", type=("build", "run"), when="@0.67.0:")
depends_on("r-aroma-light@2.4.0:", type=("build", "run"))
depends_on("r-dnacopy@1.42.0:", type=("build", "run"))
depends_on("r-listenv@0.7.0:", type=("build", "run"))
depends_on("r-listenv@0.8.0:", type=("build", "run"), when="@0.66.0:")
depends_on("r-future@1.12.0:", type=("build", "run"))
depends_on("r-future@1.22.1:", type=("build", "run"), when="@0.66.0:")
+ depends_on("r-future@1.28.0:", type=("build", "run"), when="@0.67.0:")
diff --git a/var/spack/repos/builtin/packages/r-pspline/package.py b/var/spack/repos/builtin/packages/r-pspline/package.py
index 03e2140fe4..c77803682c 100644
--- a/var/spack/repos/builtin/packages/r-pspline/package.py
+++ b/var/spack/repos/builtin/packages/r-pspline/package.py
@@ -15,6 +15,7 @@ class RPspline(RPackage):
license("custom")
+ version("1.0-20", sha256="eaa7cd9b870d5d10cf457c435ebcbe698ba0d463e3a996fbe758a4b57b93eb8a")
version("1.0-19", sha256="ba55bf193f1df9785a0e13b7ef727d5fd2415b318cd6a26b48a2db490c4dfe40")
version("1.0-18", sha256="f71cf293bd5462e510ac5ad16c4a96eda18891a0bfa6447dd881c65845e19ac7")
diff --git a/var/spack/repos/builtin/packages/r-psych/package.py b/var/spack/repos/builtin/packages/r-psych/package.py
index c474110e1e..75f9ce050a 100644
--- a/var/spack/repos/builtin/packages/r-psych/package.py
+++ b/var/spack/repos/builtin/packages/r-psych/package.py
@@ -29,6 +29,7 @@ class RPsych(RPackage):
license("GPL-2.0-or-later")
+ version("2.4.6.26", sha256="2d191a95e0107a7f402a17729916099dff201d20c4435f8bf43e6e8a2fbbd2be")
version("2.3.3", sha256="94a9f3c39f8243573752709b89eb8068e11dbe809f86ecf0225fb429556efb6f")
version("2.2.9", sha256="4cd518bff387fef95067696b0a0b323310e6f4a063c3d242f2a50bcb17675571")
version("2.2.5", sha256="dcc3f9b30ed44dfd1de0366295a308e0b52959eb7ac9cb3bc3f32dc5b15fc321")
@@ -38,8 +39,9 @@ class RPsych(RPackage):
version("1.8.10", sha256="e8901ddab14729bfccbd82a8824fbb6523c10c2cd8fb7199b1ca56a7ffcb6e58")
version("1.7.8", sha256="f328ea602e22b0e7e5f310a8d19f305d8e0a3a86040cdfb64863b68b56d55135")
- depends_on("r-mnormt", type=("build", "run"))
+ depends_on("r-gparotation", type=("build", "run"), when="@2.3.6:")
depends_on("r-lattice", type=("build", "run"))
+ depends_on("r-mnormt", type=("build", "run"))
depends_on("r-nlme", type=("build", "run"))
depends_on("r-foreign", type=("build", "run"), when="@:1.8.12")
diff --git a/var/spack/repos/builtin/packages/r-ptw/package.py b/var/spack/repos/builtin/packages/r-ptw/package.py
index 7d753a0467..6136284070 100644
--- a/var/spack/repos/builtin/packages/r-ptw/package.py
+++ b/var/spack/repos/builtin/packages/r-ptw/package.py
@@ -30,5 +30,7 @@ class RPtw(RPackage):
version("1.9-13", sha256="7855e74a167db3d3eba9df9d9c3daa25d7cf487cbcfe8b095f16d96eba862f46")
version("1.9-12", sha256="cdb1752e04e661e379f11867b0a17e2177e9ee647c54bbcc37d39d6b8c062b84")
+ depends_on("c", type="build") # generated
+
depends_on("r-nloptr", type=("build", "run"))
depends_on("r-rcppde", type=("build", "run"), when="@1.9-16:")
diff --git a/var/spack/repos/builtin/packages/r-purrr/package.py b/var/spack/repos/builtin/packages/r-purrr/package.py
index b0b1acc709..002bc75ebd 100644
--- a/var/spack/repos/builtin/packages/r-purrr/package.py
+++ b/var/spack/repos/builtin/packages/r-purrr/package.py
@@ -15,6 +15,7 @@ class RPurrr(RPackage):
license("MIT")
+ version("1.0.2", sha256="2c1bc6bb88433dff0892b41136f2f5c23573b335ff35a4775c72aa57b48bbb63")
version("1.0.1", sha256="0a7911be3539355a4c40d136f2602befcaaad5a3f7222078500bfb969a6f2ba2")
version("0.3.5", sha256="a2386cd7e78a043cb9c14703023fff15ab1c879bf648816879d2c0c4a554fcef")
version("0.3.4", sha256="23ebc93bc9aed9e7575e8eb9683ff4acc0270ef7d6436cc2ef4236a9734840b2")
@@ -25,12 +26,16 @@ class RPurrr(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@0.3.3:")
depends_on("r@3.4.0:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@1.0.2:")
depends_on("r-vctrs@0.5.0:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r-vctrs@0.6.3:", type=("build", "run"), when="@1.0.2:")
depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@1.0.1:")
depends_on("r-cli@3.4.0:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r-cli@3.6.1:", type=("build", "run"), when="@1.0.2:")
depends_on("r-magrittr@1.5:", type=("build", "run"))
depends_on("r-magrittr@1.5.0:", type=("build", "run"), when="@1.0.1:")
depends_on("r-rlang@0.3.1:", type=("build", "run"))
depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r-rlang@1.1.1:", type=("build", "run"), when="@1.0.2:")
depends_on("r-tibble", type=("build", "run"), when="@:0.2.9")
diff --git a/var/spack/repos/builtin/packages/r-qqconf/package.py b/var/spack/repos/builtin/packages/r-qqconf/package.py
index 1637124429..bf4658c6a7 100644
--- a/var/spack/repos/builtin/packages/r-qqconf/package.py
+++ b/var/spack/repos/builtin/packages/r-qqconf/package.py
@@ -21,6 +21,8 @@ class RQqconf(RPackage):
version("1.3.0", sha256="1c42ab81403568f3ad53217cc85190dad7c2fae957bfd0f0f30d57be0a065087")
version("1.2.3", sha256="9b5b6042ea8e52e6e049807c0b5e3bfd534b624bd257be769de69cf505fece62")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@1.3.0:")
depends_on("r-mass@7.3-50:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-qs/package.py b/var/spack/repos/builtin/packages/r-qs/package.py
index a4c64566a1..fc552f62b0 100644
--- a/var/spack/repos/builtin/packages/r-qs/package.py
+++ b/var/spack/repos/builtin/packages/r-qs/package.py
@@ -18,6 +18,7 @@ class RQs(RPackage):
license("GPL-3.0-only")
+ version("0.26.3", sha256="8801a41f6e5161a55193dc9a75fcee8da1b0e02eebd7653ec05326d594321ee3")
version("0.25.5", sha256="3f87388708a0fdfb0e68caade75ed771fd395cb4f649973459bc97f41d42064c")
version("0.25.4", sha256="92c49206a9c1c66dbd95f12efc3a57acb728e1f8387b549c437519fb2b98a533")
version("0.25.3", sha256="51adf6a112c19f78ceeefa55acf800c7e6bf2664e7d9cea9d932abb24f22be6b")
@@ -26,6 +27,7 @@ class RQs(RPackage):
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r@3.0.2:", type=("build", "run"), when="@0.25.2:")
+ depends_on("r-bh", type=("build", "run"), when="@0.26.0:")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rapiserialize", type=("build", "run"))
depends_on("r-rapiserialize@0.1.1:", type=("build", "run"), when="@0.25.4:")
diff --git a/var/spack/repos/builtin/packages/r-qtl/package.py b/var/spack/repos/builtin/packages/r-qtl/package.py
index 9497f5aa51..ba93459f12 100644
--- a/var/spack/repos/builtin/packages/r-qtl/package.py
+++ b/var/spack/repos/builtin/packages/r-qtl/package.py
@@ -17,6 +17,7 @@ class RQtl(RPackage):
license("GPL-3.0-only")
+ version("1.66", sha256="d46a7d49f2d0875c0c1cba77c993f995e7cac4db5796dfb1c62d9fa4eb60d681")
version("1.60", sha256="8e9e5dfe2c6a76d4f69fb27add93ed0859ed3eaa23347310c2b9e3f07359d8ad")
version("1.58", sha256="6eca5ac177ae62304d63c224f161b0f3ac9327ec1a03da5d7df2d5ddf4b09d97")
version("1.52", sha256="320ac6172f2911ee772472becd68ff49a357c99fe7454335e4a19090d5788960")
diff --git a/var/spack/repos/builtin/packages/r-quadprog/package.py b/var/spack/repos/builtin/packages/r-quadprog/package.py
index 91319e9e8f..d215811129 100644
--- a/var/spack/repos/builtin/packages/r-quadprog/package.py
+++ b/var/spack/repos/builtin/packages/r-quadprog/package.py
@@ -21,4 +21,7 @@ class RQuadprog(RPackage):
version("1.5-6", sha256="1443e5ffdf884b13dd454e4f6aa260fce6ec47e6845d85b62238c206ce57dcba")
version("1.5-5", sha256="d999620688354c283de5bb305203f5db70271b4dfdc23577cae8c2ba94c9e349")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-quantmod/package.py b/var/spack/repos/builtin/packages/r-quantmod/package.py
index 2368def60f..1771e645f4 100644
--- a/var/spack/repos/builtin/packages/r-quantmod/package.py
+++ b/var/spack/repos/builtin/packages/r-quantmod/package.py
@@ -16,6 +16,7 @@ class RQuantmod(RPackage):
license("GPL-3.0-only")
+ version("0.4.26", sha256="396c5d3241f77911d9f7738a60a9d728ed25b3dbce2fd92f5b11f9fcbcb8bb98")
version("0.4.22", sha256="f29496f1ca9a9faf91aba70ac50bfe79303197ca8f1e369c96300005b5e6765e")
version("0.4.20", sha256="f757df41595d885f7927e18f4835bc233d78d2d3ae48fd11c8874d4338c48e94")
version("0.4.18", sha256="aa40448e93a1facf399213ac691784007731e869ad243fe762381ab099cd6c35")
diff --git a/var/spack/repos/builtin/packages/r-quantreg/package.py b/var/spack/repos/builtin/packages/r-quantreg/package.py
index 9bff357602..939fa66209 100644
--- a/var/spack/repos/builtin/packages/r-quantreg/package.py
+++ b/var/spack/repos/builtin/packages/r-quantreg/package.py
@@ -21,6 +21,7 @@ class RQuantreg(RPackage):
license("GPL-2.0-or-later")
+ version("5.98", sha256="a98cb259d8cf563f66a25ae8858794e574dd40de6206816ad61b1ffeb9686a61")
version("5.95", sha256="4b05a81eceebbd927372cefdc4912dfa70b6dfcd96528489f78e125eb32a96cc")
version("5.94", sha256="52d585ccb972ed7726b7d083f5635d3e42915847398e00fd6e0f69a5fe1b17c1")
version("5.93", sha256="d4a94984a500bf4c92dec21013441f001a4aa0541c4c651384e257a4b4e9e539")
diff --git a/var/spack/repos/builtin/packages/r-quickjsr/package.py b/var/spack/repos/builtin/packages/r-quickjsr/package.py
new file mode 100644
index 0000000000..10b191fc67
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-quickjsr/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RQuickjsr(RPackage):
+ """An 'R' interface to the 'QuickJS' portable 'JavaScript' engine.
+ The engine and all 'R' to 'JavaScript' interoperability is bundled
+ within the package, requiring no dependencies beyond a 'C' compiler."""
+
+ homepage = "https://bellard.org/quickjs/"
+ cran = "QuickJSR"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("1.3.1", sha256="10559d6e84a838ec97acdbc6028a59e2121811d4a20e83c95cdb8fb4ce208fd1")
diff --git a/var/spack/repos/builtin/packages/r-quickplot/package.py b/var/spack/repos/builtin/packages/r-quickplot/package.py
index 7cb0c27469..c47c367c2a 100644
--- a/var/spack/repos/builtin/packages/r-quickplot/package.py
+++ b/var/spack/repos/builtin/packages/r-quickplot/package.py
@@ -18,19 +18,23 @@ class RQuickplot(RPackage):
maintainers("dorton21")
+ version("1.0.2", sha256="78b19e03f9925ea3a5b47c12fef58a154dc0d3598dbdda3fe4e47c6636ab4808")
version("0.1.8", sha256="5927186ebbd86d2282c59dd28c4af6977ae5f9bc5766de8fce34b94bbfe33be7")
version("0.1.6", sha256="48690a77ae961ed1032130621ef06b2eaf86ee592bf1057471a8c6d6a98ace55")
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r@4.0:", type=("build", "run"), when="@0.1.8:")
- depends_on("r-backports", type=("build", "run"))
+ depends_on("r@4.1:", type=("build", "run"), when="@1.0.1:")
depends_on("r-data-table@1.10.4:", type=("build", "run"))
depends_on("r-fpcompare", type=("build", "run"))
- depends_on("r-ggplot2", type=("build", "run"))
- depends_on("r-gridbase", type=("build", "run"))
- depends_on("r-igraph", type=("build", "run"))
- depends_on("r-raster", type=("build", "run"))
- depends_on("r-rcolorbrewer", type=("build", "run"))
- depends_on("r-rgdal", type=("build", "run"))
- depends_on("r-rgeos", type=("build", "run"))
- depends_on("r-sp", type=("build", "run"))
+ depends_on("r-terra", type=("build", "run"), when="@1.0.1:")
+
+ depends_on("r-backports", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-ggplot2", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-gridbase", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-igraph", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-raster", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-rcolorbrewer", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-rgdal", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-rgeos", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-sp", type=("build", "run"), when="@:1.0.1")
diff --git a/var/spack/repos/builtin/packages/r-r-oo/package.py b/var/spack/repos/builtin/packages/r-r-oo/package.py
index f15782b3bc..28ffc400bf 100644
--- a/var/spack/repos/builtin/packages/r-r-oo/package.py
+++ b/var/spack/repos/builtin/packages/r-r-oo/package.py
@@ -18,6 +18,7 @@ class RROo(RPackage):
cran = "R.oo"
+ version("1.26.0", sha256="f7602b388c2216fbb4d1a31d4040ed92b40dc83d3e3746db7011637db4d44365")
version("1.25.0", sha256="b8b19061774918ee7d9d4330c16c0ea505f7cd02d01343df1e8b2e4fb847beef")
version("1.24.0", sha256="37a1dab8dd668ceba69a1ba36c0c60e9809e29b74bd56d1e8ed519e19c8e3bb6")
version("1.23.0", sha256="f5124ce3dbb0a62e8ef1bfce2de2d1dc2f776e8c48fd8cac358f7f5feb592ea1")
@@ -28,3 +29,4 @@ class RROo(RPackage):
depends_on("r-r-methodss3@1.7.1:", type=("build", "run"))
depends_on("r-r-methodss3@1.8.0:", type=("build", "run"), when="@1.24.0:")
depends_on("r-r-methodss3@1.8.1:", type=("build", "run"), when="@1.25.0:")
+ depends_on("r-r-methodss3@1.8.2:", type=("build", "run"), when="@1.26.0:")
diff --git a/var/spack/repos/builtin/packages/r-r-utils/package.py b/var/spack/repos/builtin/packages/r-r-utils/package.py
index e673eb3757..91132f04db 100644
--- a/var/spack/repos/builtin/packages/r-r-utils/package.py
+++ b/var/spack/repos/builtin/packages/r-r-utils/package.py
@@ -13,6 +13,7 @@ class RRUtils(RPackage):
cran = "R.utils"
+ version("2.12.3", sha256="74d6e77a95a23381a490fea54be01b653d4b938a2dc75e749a694ab48302c40c")
version("2.12.2", sha256="fe3cf1aa8641540634e96990294d0202d4d94ec79ce73aaf78e4eda30fcb8836")
version("2.12.1", sha256="3eb82903bee99f9684cd9dbd4f92d682fdb82feb7ff32a70aa54550e9e09ad62")
version("2.12.0", sha256="74de455220ea1e658ac503f5763a6be687d982eb61187779f4019a16db856503")
diff --git a/var/spack/repos/builtin/packages/r-ragg/package.py b/var/spack/repos/builtin/packages/r-ragg/package.py
index 0d0abcb60c..3bff5fdae8 100644
--- a/var/spack/repos/builtin/packages/r-ragg/package.py
+++ b/var/spack/repos/builtin/packages/r-ragg/package.py
@@ -18,6 +18,7 @@ class RRagg(RPackage):
license("MIT")
+ version("1.3.2", sha256="8037a45209fdd50acf101208af8e832b840a11ad4201cf7fb480de432e6b6931")
version("1.2.5", sha256="936f4d75e0e01cdeefb9f57d121cdd7812d0de5a9e1a3a8315f92ce1c84da8f9")
version("1.2.4", sha256="c547e5636a2eefaa0021a0d50fad1e813c2ce976ec0c9c3f796d38a110680dcd")
version("1.2.3", sha256="976da0007ef0d4dbadda4734727b539671b65c1eff4ff392d734f4e2c846f2b2")
@@ -28,3 +29,9 @@ class RRagg(RPackage):
depends_on("libpng")
depends_on("libtiff")
depends_on("jpeg")
+
+ def flag_handler(self, name, flags):
+ # Freetype 2.13.3 broke the public interface by switching char/unsigned char:
+ if name == "cxxflags" and self.spec["freetype"].version >= Version("2.13.3"):
+ flags.append("-fpermissive")
+ return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/r-rainbow/package.py b/var/spack/repos/builtin/packages/r-rainbow/package.py
index c5c88b9ca7..9cdd8644d2 100644
--- a/var/spack/repos/builtin/packages/r-rainbow/package.py
+++ b/var/spack/repos/builtin/packages/r-rainbow/package.py
@@ -16,6 +16,7 @@ class RRainbow(RPackage):
license("GPL-3.0-only")
+ version("3.8", sha256="eca456288b70fe4b6c74a587d8624d3b36d67f8f9ffc13320eefb17a952d823d")
version("3.7", sha256="159dd90555eee237397f042d811f773aaee779f5036c4e0669a52c36e28d8db2")
version("3.6", sha256="63d1246f88a498f3db0321b46a552163631b288a25b24400935db41326636e87")
diff --git a/var/spack/repos/builtin/packages/r-randomforest/package.py b/var/spack/repos/builtin/packages/r-randomforest/package.py
index 5349bc60c2..2c8eff647b 100644
--- a/var/spack/repos/builtin/packages/r-randomforest/package.py
+++ b/var/spack/repos/builtin/packages/r-randomforest/package.py
@@ -20,6 +20,9 @@ class RRandomforest(RPackage):
version("4.6-14", sha256="f4b88920419eb0a89d0bc5744af0416d92d112988702dc726882394128a8754d")
version("4.6-12", sha256="6e512f8f88a51c01a918360acba61f1f39432f6e690bc231b7864218558b83c4")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.5.0:", type=("build", "run"))
depends_on("r@3.2.2:", type=("build", "run"), when="@4.6-14:")
depends_on("r@4.1.0:", type=("build", "run"), when="@4.7-1.1:")
diff --git a/var/spack/repos/builtin/packages/r-ranger/package.py b/var/spack/repos/builtin/packages/r-ranger/package.py
index a952be3532..8672102bbf 100644
--- a/var/spack/repos/builtin/packages/r-ranger/package.py
+++ b/var/spack/repos/builtin/packages/r-ranger/package.py
@@ -20,6 +20,7 @@ class RRanger(RPackage):
license("GPL-3.0-only")
+ version("0.16.0", sha256="0395f93afdb807a7882c1fa8f183a26a871c5168ea0903566951298ef1138589")
version("0.15.1", sha256="4d65d9ee7c5f2704a0e303a27222c02aa53e49f3c28dc0b4451371e37ada2b2e")
version("0.14.1", sha256="5d99401d555da1cfb11c70e59d1bb545ce48720073a06a2a32eb396f622dee1b")
version("0.13.1", sha256="60934f0accc21edeefddbb4ddebfdd7cd10a3d3e90b31aa2e6e4b7f50d632d0a")
diff --git a/var/spack/repos/builtin/packages/r-rann/package.py b/var/spack/repos/builtin/packages/r-rann/package.py
index b09253a0a3..f940d9e2cf 100644
--- a/var/spack/repos/builtin/packages/r-rann/package.py
+++ b/var/spack/repos/builtin/packages/r-rann/package.py
@@ -19,3 +19,6 @@ class RRann(RPackage):
cran = "RANN"
version("2.6.1", sha256="b299c3dfb7be17aa41e66eff5674fddd2992fb6dd3b10bc59ffbf0c401697182")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-rapiserialize/package.py b/var/spack/repos/builtin/packages/r-rapiserialize/package.py
index 8b4e48ed9b..d25c382dc6 100644
--- a/var/spack/repos/builtin/packages/r-rapiserialize/package.py
+++ b/var/spack/repos/builtin/packages/r-rapiserialize/package.py
@@ -22,5 +22,6 @@ class RRapiserialize(RPackage):
maintainers("dorton21")
+ version("0.1.3", sha256="9f413759eabb2acce2b9a363687ca365e1bbedaf9851d23a2ec3683a3d46f42b")
version("0.1.2", sha256="9cc0bbb918eeadb394339c64b15324e8123fbb0061692f40102b111417a2600a")
version("0.1.0", sha256="324d42c655c27b4647d194bfcd7c675da95c67ea3a74ce99853502022792a23e")
diff --git a/var/spack/repos/builtin/packages/r-rappdirs/package.py b/var/spack/repos/builtin/packages/r-rappdirs/package.py
index da73483788..2e829111d0 100644
--- a/var/spack/repos/builtin/packages/r-rappdirs/package.py
+++ b/var/spack/repos/builtin/packages/r-rappdirs/package.py
@@ -20,5 +20,7 @@ class RRappdirs(RPackage):
version("0.3.3", sha256="49959f65b45b0b189a2792d6c1339bef59674ecae92f8c2ed9f26ff9e488c184")
version("0.3.1", sha256="2fd891ec16d28862f65bb57e4a78f77a597930abb59380e757afd8b6c6d3264a")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.14:", type=("build", "run"))
depends_on("r@3.2:", type=("build", "run"), when="@0.3.2:")
diff --git a/var/spack/repos/builtin/packages/r-raster/package.py b/var/spack/repos/builtin/packages/r-raster/package.py
index 1059e36a53..d57d33f632 100644
--- a/var/spack/repos/builtin/packages/r-raster/package.py
+++ b/var/spack/repos/builtin/packages/r-raster/package.py
@@ -18,6 +18,7 @@ class RRaster(RPackage):
license("GPL-3.0-or-later")
+ version("3.6-26", sha256="c65777225a46ada699e70098f54c60cf191d15e454fac9440aca439a4dbd5592")
version("3.6-20", sha256="7e5be49f4e37a2c14a3b87661b252956643b959146cbdb08e983660c1d59a813")
version("3.6-3", sha256="9f06e0f7c36258790a97421b3a26d98c9b6a2cb702f941e58ab0b18f21b0c3c6")
version("3.5-15", sha256="29c7d3c5d34284f8b5a2ddc9989fbcf092ce209d5eb5310ebc772b5ebdfdd685")
@@ -37,3 +38,4 @@ class RRaster(RPackage):
depends_on("r-terra@1.5-12:", type=("build", "run"), when="@3.5-15:")
depends_on("r-terra@1.6-16:", type=("build", "run"), when="@3.6-3:")
depends_on("r-terra@1.6-41:", type=("build", "run"), when="@3.6-20:")
+ depends_on("r-terra@1.7-29:", type=("build", "run"), when="@3.6-23:")
diff --git a/var/spack/repos/builtin/packages/r-rbgl/package.py b/var/spack/repos/builtin/packages/r-rbgl/package.py
index 4807eb795d..09aaa52873 100644
--- a/var/spack/repos/builtin/packages/r-rbgl/package.py
+++ b/var/spack/repos/builtin/packages/r-rbgl/package.py
@@ -27,5 +27,7 @@ class RRbgl(RPackage):
version("1.54.0", commit="e9c743d380e83c155495cb8732102f01f213c905")
version("1.52.0", commit="93e8fcfafec8f1cd5638fe30dc0f9506d15b49c0")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-graph", type=("build", "run"))
depends_on("r-bh", type=("build", "run"), when="@1.60.0:")
diff --git a/var/spack/repos/builtin/packages/r-rbibutils/package.py b/var/spack/repos/builtin/packages/r-rbibutils/package.py
index f4c84e16dd..382b8aced4 100644
--- a/var/spack/repos/builtin/packages/r-rbibutils/package.py
+++ b/var/spack/repos/builtin/packages/r-rbibutils/package.py
@@ -18,6 +18,7 @@ class RRbibutils(RPackage):
license("GPL-2.0-only")
+ version("2.2.16", sha256="9c7c0fba47f63b1749005311c7174b40e72d95c863a67b736a84b8ff375a2aaf")
version("2.2.13", sha256="ac235c60bf191ad1830b93045af1b2fe50a6978f6f63cecc4c514a8ba339efc2")
version("2.2.9", sha256="b22c07ff916ec338e5a8c6e7e4302f06c9b88d64ee6a59ee4bf5d83a3d5eff86")
version("2.2.8", sha256="f1aecdeeba99042d34de19234238c5bbdc18a26f271f6adf9c9b7e349d50d152")
diff --git a/var/spack/repos/builtin/packages/r-rcpp/package.py b/var/spack/repos/builtin/packages/r-rcpp/package.py
index 8653f446c4..7f45548130 100644
--- a/var/spack/repos/builtin/packages/r-rcpp/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpp/package.py
@@ -23,6 +23,9 @@ class RRcpp(RPackage):
cran = "Rcpp"
+ version("1.0.13", sha256="21fec650c113e57935fd86c7d1be190811f1ae036c1ee203bfbbf3ad5cdb22ce")
+ version("1.0.12", sha256="0c7359cc43beee02761aa3df2baccede1182d29d28c9cd49964b609305062bd0")
+ version("1.0.11", sha256="df757c3068599c6c05367900bcad93547ba3422d59802dbaca20fd74d4d2fa5f")
version("1.0.10", sha256="1e65e24a9981251ab5fc4f9fd65fe4eab4ba0255be3400a8c5abe20b62b5d546")
version("1.0.9", sha256="807cec06dc4a96d54904360f6144466f084a7ed411ce5d2eea486a9b3c229176")
version("1.0.8.3", sha256="9da5b84cdaf56e972b41e669d496b1ece2e91bcd435505c68b9f2bd98375f8bf")
@@ -45,6 +48,9 @@ class RRcpp(RPackage):
version("0.12.6", sha256="1bb54e03b817a3d6ab5917f1bbf5250c6b33f61e466628a378022ed65a010141")
version("0.12.5", sha256="13449481c91b5271b34d81f462864864c1905bb05021781eee11c36fdafa80ef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# leave the r dependency also for newer versions
# (not listed in Description for @1.0.5:)
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppannoy/package.py b/var/spack/repos/builtin/packages/r-rcppannoy/package.py
index 3277a206c0..efe0cbb978 100644
--- a/var/spack/repos/builtin/packages/r-rcppannoy/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppannoy/package.py
@@ -20,6 +20,7 @@ class RRcppannoy(RPackage):
cran = "RcppAnnoy"
+ version("0.0.22", sha256="9f2121d787c4d3e7beccdd65f5d1de81f31c99d57d5d61ca3cc5af7169dd8f65")
version("0.0.20", sha256="dcc6c7e091154d0a5698472e0fc7ed77976941c7376d21e019c90c3efaeacf85")
version("0.0.19", sha256="89b209900516f3096b53c90937081fb8965c605c867aa465f1b3b68092b7688a")
version("0.0.18", sha256="e4e7ddf071109b47b4fdf285db6d2155618ed73da829c30d8e64fc778e63c858")
diff --git a/var/spack/repos/builtin/packages/r-rcpparmadillo/package.py b/var/spack/repos/builtin/packages/r-rcpparmadillo/package.py
index fd7f543b70..16bd7ee5a9 100644
--- a/var/spack/repos/builtin/packages/r-rcpparmadillo/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpparmadillo/package.py
@@ -23,6 +23,7 @@ class RRcpparmadillo(RPackage):
cran = "RcppArmadillo"
+ version("14.0.0-1", sha256="80c4d4fadc3ed92712affc50279de4c5f2e1f7ee777ad1f1b3f9f3e94a64ba90")
version(
"0.12.4.0.0", sha256="f6db54c465abc0a570a0da6f737d9fdf2187287fb235ce487b1903b5177482cb"
)
@@ -59,3 +60,4 @@ class RRcpparmadillo(RPackage):
depends_on("r@3.3.0:", type=("build", "run"), when="@0.8.500.0:")
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
+ depends_on("r-rcpp@1.0.8:", type=("build", "run"), when="@0.12.8.4.0:")
diff --git a/var/spack/repos/builtin/packages/r-rcppblaze/package.py b/var/spack/repos/builtin/packages/r-rcppblaze/package.py
index 817b604c3a..274f2fe7dc 100644
--- a/var/spack/repos/builtin/packages/r-rcppblaze/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppblaze/package.py
@@ -37,9 +37,14 @@ class RRcppblaze(RPackage):
license("BSD-3-Clause")
+ version("1.0.1", sha256="2d152294dc231e4ab097a377ddeda6f2bbb608970c82563a893c77de08916227")
version("0.2.2", sha256="67550ed8aea12a219047af61b41e5b9f991608a21ce9a8fbf7ac55da0f7c2742")
depends_on("r@3.0.2:", type=("build", "run"))
+ depends_on("r@4.2.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
+ depends_on("r-rcpp@1.0.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-matrix@1.1-0:", type=("build", "run"))
- depends_on("r-bh@1.54.0-2:", type=("build", "run"))
+ depends_on("r-matrix@1.5-0:", type=("build", "run"), when="@1.0.0:")
+
+ depends_on("r-bh@1.54.0-2:", type=("build", "run"), when="@:0.2.2")
diff --git a/var/spack/repos/builtin/packages/r-rcppcctz/package.py b/var/spack/repos/builtin/packages/r-rcppcctz/package.py
index 6858c01621..da5445c13f 100644
--- a/var/spack/repos/builtin/packages/r-rcppcctz/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppcctz/package.py
@@ -25,4 +25,6 @@ class RRcppcctz(RPackage):
version("0.2.4", sha256="98b6867d38abe03957fe803e88b6cc2d122b85a68ef07fa86f7e1009d6c00819")
version("0.2.3", sha256="0fefcc98387b2c1a5907e5230babb46e2cc11b603424f458f515e445a3236031")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppcnpy/package.py b/var/spack/repos/builtin/packages/r-rcppcnpy/package.py
index 550a3ba3c2..475e7862c3 100644
--- a/var/spack/repos/builtin/packages/r-rcppcnpy/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppcnpy/package.py
@@ -20,6 +20,7 @@ class RRcppcnpy(RPackage):
license("BitTorrent-1.0")
+ version("0.2.12", sha256="856dbc857b2d425c80d9a1628e45743234fee2e68575aa9e2d29a6efae60c39a")
version("0.2.11", sha256="5dbb36f2526c276fd79b8e08a30503dc401cdf54d8c40f61af758c9ee1192f55")
version("0.2.10", sha256="77d6fbc86520a08da40d44c0b82767099f8f719ca95870d91efff1a9cab1ab9c")
version("0.2.9", sha256="733f004ad1a8b0e5aafbf547c4349d2df3118afd57f1ff99f20e39135c6edb30")
diff --git a/var/spack/repos/builtin/packages/r-rcppdate/package.py b/var/spack/repos/builtin/packages/r-rcppdate/package.py
index 8135cc8a82..ec3c7e4914 100644
--- a/var/spack/repos/builtin/packages/r-rcppdate/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppdate/package.py
@@ -23,3 +23,5 @@ class RRcppdate(RPackage):
version("0.0.3", sha256="9c5ee7cf76d63cd51e8faff831f5f865762868d7d705395960c0f22e9b238bdb")
version("0.0.1", sha256="117721fc677dfb4209200a7ff894fbbb8ee1b652d01b3878b11c3253733b4a5f")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-rcppde/package.py b/var/spack/repos/builtin/packages/r-rcppde/package.py
index 25680af561..351c87ca7f 100644
--- a/var/spack/repos/builtin/packages/r-rcppde/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppde/package.py
@@ -23,5 +23,7 @@ class RRcppde(RPackage):
version("0.1.7", sha256="4a238ee97e574cb44b12e4962b9927dd811f087fc13fc777637ec6fe12bd86a0")
version("0.1.6", sha256="c9386709f72cdc33505b3ac675c173013fe098434b7c21bc09eb625b529132c5")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rcpparmadillo", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppeigen/package.py b/var/spack/repos/builtin/packages/r-rcppeigen/package.py
index 2b0899a537..c58708e5b4 100644
--- a/var/spack/repos/builtin/packages/r-rcppeigen/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppeigen/package.py
@@ -27,6 +27,7 @@ class RRcppeigen(RPackage):
license("MPL-2.0")
+ version("0.3.4.0.1", sha256="25ed48f148b50aaadd92752d73e3eefe00ab4ecd4ae5662ae91a9ff3f72a4e26")
version("0.3.3.9.3", sha256="5873a47fd6587d916f86119ab140c6736abf80ac45d06ff1c9d198708e7d1c76")
version("0.3.3.9.2", sha256="2547e794d5a6fb8d9fbadf19e64afa0bcf413cc69ecf3f428995fa5a0fced493")
version("0.3.3.9.1", sha256="8a0486249b778a4275a1168fc89fc7fc49c2bb031cb14b50a50089acae7fe962")
@@ -36,6 +37,7 @@ class RRcppeigen(RPackage):
version("0.3.2.9.0", sha256="25affba9065e3c12d67b1934d1ce97a928a4011a7738f7b90f0e9830409ec93b")
version("0.3.2.8.1", sha256="ceccb8785531c5c23f9232b594e5372c214a114a08ec759115e946badd08d681")
- depends_on("r-matrix@1.1-0:", type=("build", "run"))
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
depends_on("r@3.6.0:", type=("build", "run"), when="@0.3.3.9.3:")
+
+ depends_on("r-matrix@1.1-0:", type=("build", "run"), when="@:0.3.3.9.3")
diff --git a/var/spack/repos/builtin/packages/r-rcppensmallen/package.py b/var/spack/repos/builtin/packages/r-rcppensmallen/package.py
index a835b67d9a..32837f6bef 100644
--- a/var/spack/repos/builtin/packages/r-rcppensmallen/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppensmallen/package.py
@@ -12,9 +12,13 @@ class RRcppensmallen(RPackage):
cran = "RcppEnsmallen"
version(
+ "0.2.21.1.1", sha256="87396e259666c8797a00c4255d912da58c7880313a8c4e7d48c6384eb6161956"
+ )
+ version(
"0.2.19.0.1", sha256="b4a9bde4dde309a52a47b56790389ecab14fe64066098d2a38b1b588ba3d8631"
)
depends_on("r@3.3.0:", type=("build", "run"))
+ depends_on("r@4.0.0:", type=("build", "run"), when="@0.2.20.0.1:")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rcpparmadillo@0.9.800.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppgsl/package.py b/var/spack/repos/builtin/packages/r-rcppgsl/package.py
index 27e486c310..23487f0d08 100644
--- a/var/spack/repos/builtin/packages/r-rcppgsl/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppgsl/package.py
@@ -29,5 +29,8 @@ class RRcppgsl(RPackage):
version("0.3.11", sha256="f094ea26c99b04d9e203986a1f2003f02472ceca0e2ef1c3beefd3ae80aeada8")
version("0.3.10", sha256="8612087da02fb791f427fed310c23d0482a8eb60fb089119f018878143f95451")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/r-rcpphnsw/package.py b/var/spack/repos/builtin/packages/r-rcpphnsw/package.py
index 0400df4dc1..15af171e21 100644
--- a/var/spack/repos/builtin/packages/r-rcpphnsw/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpphnsw/package.py
@@ -17,6 +17,7 @@ class RRcpphnsw(RPackage):
cran = "RcppHNSW"
+ version("0.6.0", sha256="a5a6ed00a84143aa62aa67df66fcccae657d5db0a1f9bb4b955a8e94c2ff580f")
version("0.4.1", sha256="4f0082154f77dcb7756d41cdbfe0f58316431b9027081321a27942f319097c74")
version("0.3.0", sha256="a0eb4eea65e28ba31e8306a1856f7e617a192bd448b148f88abe99181cbde007")
version("0.1.0", sha256="75a54c30953845dec685764c7b3b4cd7315197c91aef4ab3b4eb0a6293010a95")
diff --git a/var/spack/repos/builtin/packages/r-rcppml/package.py b/var/spack/repos/builtin/packages/r-rcppml/package.py
index 7f986444e6..2bf3bc249e 100644
--- a/var/spack/repos/builtin/packages/r-rcppml/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppml/package.py
@@ -16,6 +16,8 @@ class RRcppml(RPackage):
version("0.3.7", sha256="325c6515085527eb9123cc5e87e028547065771ed4d623048f41886ae28908c6")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rcppeigen", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppparallel/package.py b/var/spack/repos/builtin/packages/r-rcppparallel/package.py
index c127625cc3..86f026cdaf 100644
--- a/var/spack/repos/builtin/packages/r-rcppparallel/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppparallel/package.py
@@ -16,6 +16,7 @@ class RRcppparallel(RPackage):
cran = "RcppParallel"
+ version("5.1.9", sha256="fd0861f3f0f7be4e0ef29c021e75beb351ae2eb18ce5d79e21f2725da4da114f")
version("5.1.7", sha256="f9c30eb9ce1abffc590825d513d6d28dcbe970e36032dd7521febf04e905b29c")
version("5.1.5", sha256="6396322b3b6d6f7019aac808ceb74707bc5c4ed01677fab408372c2a5508c2ea")
version("5.0.2", sha256="8ca200908c6365aafb2063be1789f0894969adc03c0f523c6cc45434b8236f81")
diff --git a/var/spack/repos/builtin/packages/r-rcppprogress/package.py b/var/spack/repos/builtin/packages/r-rcppprogress/package.py
index 115f7978c4..2c177e8a68 100644
--- a/var/spack/repos/builtin/packages/r-rcppprogress/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppprogress/package.py
@@ -23,4 +23,6 @@ class RRcppprogress(RPackage):
version("0.2", sha256="ca32624739058f1b5aab18b09dc4c613ecfd18a3ace39f3b97790232db829481")
version("0.1", sha256="04f71d3391b7dfab997afadf7ffdd87b88037f7fbc751bea544ad2a65e2872bf")
- depends_on("r-rcpp@0.9.4:", type=("build", "run"), when="@:0.4")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("r-rcpp@0.9.4:", type=("build", "run"), when="@:0.4.0")
diff --git a/var/spack/repos/builtin/packages/r-rcpproll/package.py b/var/spack/repos/builtin/packages/r-rcpproll/package.py
index a963f61290..d9fa889e2e 100644
--- a/var/spack/repos/builtin/packages/r-rcpproll/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpproll/package.py
@@ -16,6 +16,7 @@ class RRcpproll(RPackage):
cran = "RcppRoll"
+ version("0.3.1", sha256="d2f5d978b6feb8510ec1a1a50ba0e8bf9002bb77bfad7d120f5b30b8f56036df")
version("0.3.0", sha256="cbff2096443a8a38a6f1dabf8c90b9e14a43d2196b412b5bfe5390393f743f6b")
depends_on("r@2.15.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcpptoml/package.py b/var/spack/repos/builtin/packages/r-rcpptoml/package.py
index 78954874e3..ccb7b5be6e 100644
--- a/var/spack/repos/builtin/packages/r-rcpptoml/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpptoml/package.py
@@ -22,5 +22,7 @@ class RRcpptoml(RPackage):
version("0.2.2", sha256="371391f9ca82221e76a424082ea9ebc5ea2c50f14e8408469b09d7dc3e6f63aa")
version("0.1.7", sha256="2f09f00cbee6c6eeff5d5f0195c10de0155496de15fbe8189c18627ee3090541")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-rcpp@0.11.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcppziggurat/package.py b/var/spack/repos/builtin/packages/r-rcppziggurat/package.py
index 5b10ed4f15..9b1f89a11d 100644
--- a/var/spack/repos/builtin/packages/r-rcppziggurat/package.py
+++ b/var/spack/repos/builtin/packages/r-rcppziggurat/package.py
@@ -20,6 +20,10 @@ class RRcppziggurat(RPackage):
version("0.1.6", sha256="9c78255ca476c945c05a564d1e4da363de714d890e0e27f3b252fd73c50eed71")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("r@3.0.0:", type=("build", "run"), when="@0.1.6:")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rcppgsl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rcurl/package.py b/var/spack/repos/builtin/packages/r-rcurl/package.py
index 187bc38098..c96541652a 100644
--- a/var/spack/repos/builtin/packages/r-rcurl/package.py
+++ b/var/spack/repos/builtin/packages/r-rcurl/package.py
@@ -21,6 +21,7 @@ class RRcurl(RPackage):
cran = "RCurl"
+ version("1.98-1.16", sha256="1a8dc40e10593617348071c6265cc7fac22e26271564206b308a3badfc6c0da7")
version("1.98-1.12", sha256="1a83fef04e9573b402171a6e4a4b27857a3d045eec8970f8f7233850bba626b2")
version("1.98-1.9", sha256="f28d4871675ec3d2b45fb5d36f7647f546f81121510954c3ad24fdec1643cec5")
version("1.98-1.6", sha256="6cb56864ac043195b658bbdb345518d561507d84ccd60362866e970c2f71d1a2")
diff --git a/var/spack/repos/builtin/packages/r-rdpack/package.py b/var/spack/repos/builtin/packages/r-rdpack/package.py
index cb3ecb5a5f..18d017edcd 100644
--- a/var/spack/repos/builtin/packages/r-rdpack/package.py
+++ b/var/spack/repos/builtin/packages/r-rdpack/package.py
@@ -19,6 +19,7 @@ class RRdpack(RPackage):
cran = "Rdpack"
+ version("2.6.1", sha256="39626397c4ab1706bfdc53433dbaa0a6cb691dcba68173945b5a9eb041acf945")
version("2.4", sha256="7652add12b30fcba1f3a12493a089a4166079e78c47b95802a98595a3ff53581")
version("2.3", sha256="c45e1ab8352b92ce03f26ece1f4db3716959fca2af9e826d5bd3c76b2151f7c5")
version("2.1.3", sha256="8381a8866b9acf5acb2c80069684339c3921f1b45fa202719e8f6852fb4d55b8")
diff --git a/var/spack/repos/builtin/packages/r-readr/package.py b/var/spack/repos/builtin/packages/r-readr/package.py
index 2621ce060f..c85022427a 100644
--- a/var/spack/repos/builtin/packages/r-readr/package.py
+++ b/var/spack/repos/builtin/packages/r-readr/package.py
@@ -18,6 +18,7 @@ class RReadr(RPackage):
license("MIT")
+ version("2.1.5", sha256="0fa65a5fe0a46cffe221b7696b52adb82dd4d7a692a895484e438e439594e10a")
version("2.1.4", sha256="98144fa48c4fa61ef8c73ede8f87a2d2c5c44e9502b7875b266eb79984fbeb0d")
version("2.1.3", sha256="d70dd55e80e87cf1387811fcdc3da92987a892ee75dae02f77ff074142618263")
version("2.1.2", sha256="94afd03a1fa4abcf2985ec903bbf5995d7c590e1a50512ed80d081ef4fe10c1b")
@@ -31,6 +32,7 @@ class RReadr(RPackage):
depends_on("r@3.1:", type=("build", "run"), when="@1.3.0:")
depends_on("r@3.4:", type=("build", "run"), when="@2.1.3:")
depends_on("r@3.5:", type=("build", "run"), when="@2.1.4:")
+ depends_on("r@3.6:", type=("build", "run"), when="@2.1.5:")
depends_on("r-cli", type=("build", "run"), when="@1.4.0:")
depends_on("r-cli@3.0.0:", type=("build", "run"), when="@2.1.2:")
depends_on("r-cli@3.2.0:", type=("build", "run"), when="@2.1.3:")
diff --git a/var/spack/repos/builtin/packages/r-readxl/package.py b/var/spack/repos/builtin/packages/r-readxl/package.py
index 8867658ab7..5060121560 100644
--- a/var/spack/repos/builtin/packages/r-readxl/package.py
+++ b/var/spack/repos/builtin/packages/r-readxl/package.py
@@ -18,6 +18,7 @@ class RReadxl(RPackage):
license("MIT")
+ version("1.4.3", sha256="7efebbcdefeb8523633db62b3eeb6ea2e4e81e3d010d8b2adb134011c09a5948")
version("1.4.2", sha256="387304e2c5be0dca4861ec0232f0d92cc1882b660ca917f8f2a8a4ae858aba11")
version("1.4.1", sha256="f6bebb7f940fb21baacd60345b7075c77eb1d026466c55e6a36148de680da1fa")
version("1.4.0", sha256="ab9239c249f79b649f7665a612b3dbf4b774ab633115e6dee41091a8cb2491f7")
@@ -28,6 +29,7 @@ class RReadxl(RPackage):
depends_on("r@3.4:", type=("build", "run"), when="@1.4.0:")
depends_on("r@3.5:", type=("build", "run"), when="@1.4.2:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.4.3:")
depends_on("r-cellranger", type=("build", "run"))
depends_on("r-tibble@1.3.1:", type=("build", "run"))
depends_on("r-tibble@2.0.1:", type=("build", "run"), when="@1.4.0:")
diff --git a/var/spack/repos/builtin/packages/r-recipes/package.py b/var/spack/repos/builtin/packages/r-recipes/package.py
index 499c560a27..b80809a2f5 100644
--- a/var/spack/repos/builtin/packages/r-recipes/package.py
+++ b/var/spack/repos/builtin/packages/r-recipes/package.py
@@ -19,6 +19,7 @@ class RRecipes(RPackage):
license("MIT")
+ version("1.1.0", sha256="c5dc8876bc680272812bbb4be39a29464c42a7b773f8cc6d07ac4145f830206d")
version("1.0.6", sha256="105e97127cdd6aaeb9fb3348e51a9c46e21fb8bcb734cb3bbd6dbdf2b6b2fc8f")
version("1.0.2", sha256="1a7b5a9a2946fa34599935b6d93101ec559d8a901d49cc691972c75df8d5670e")
version("1.0.1", sha256="9e3ae212413409bf41ec7d1a311586e12c0ca79943cef436707d041c57125bc9")
@@ -29,11 +30,11 @@ class RRecipes(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.1.0:")
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-dplyr@1.1.0:", type=("build", "run"), when="@1.0.6:")
depends_on("r-cli", type=("build", "run"), when="@1.0.1:")
depends_on("r-clock@0.6.1:", type=("build", "run"), when="@1.0.6:")
- depends_on("r-ellipsis", type=("build", "run"), when="@0.1.17:")
depends_on("r-generics", type=("build", "run"))
depends_on("r-generics@0.1.0:", type=("build", "run"), when="@0.1.15:")
depends_on("r-generics@0.1.0.9000:", type=("build", "run"), when="@0.2.0:")
@@ -43,6 +44,7 @@ class RRecipes(RPackage):
depends_on("r-hardhat@0.1.6.9001:", type=("build", "run"), when="@0.2.0:")
depends_on("r-hardhat@1.2.0:", type=("build", "run"), when="@1.0.1:")
depends_on("r-hardhat@1.3.0:", type=("build", "run"), when="@1.0.6:")
+ depends_on("r-hardhat@1.4.0:", type=("build", "run"), when="@1.1.0:")
depends_on("r-ipred", type=("build", "run"))
depends_on("r-ipred@0.9-12:", type=("build", "run"), when="@0.1.17:")
depends_on("r-lifecycle", type=("build", "run"), when="@0.1.15:")
@@ -55,6 +57,7 @@ class RRecipes(RPackage):
depends_on("r-purrr@1.0.0:", type=("build", "run"), when="@1.0.6:")
depends_on("r-rlang@0.4.0:", type=("build", "run"))
depends_on("r-rlang@1.0.3:", type=("build", "run"), when="@1.0.1:")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.0.9:")
depends_on("r-tibble", type=("build", "run"))
depends_on("r-tidyr", type=("build", "run"))
depends_on("r-tidyr@1.0.0:", type=("build", "run"), when="@0.1.15:")
@@ -66,3 +69,5 @@ class RRecipes(RPackage):
depends_on("r-vctrs", type=("build", "run"), when="@0.1.17:")
depends_on("r-vctrs@0.5.0:", type=("build", "run"), when="@1.0.6:")
depends_on("r-withr", type=("build", "run"))
+
+ depends_on("r-ellipsis", type=("build", "run"), when="@0.1.17:1.0.10")
diff --git a/var/spack/repos/builtin/packages/r-rematch/package.py b/var/spack/repos/builtin/packages/r-rematch/package.py
index 54933633fc..1a188bd426 100644
--- a/var/spack/repos/builtin/packages/r-rematch/package.py
+++ b/var/spack/repos/builtin/packages/r-rematch/package.py
@@ -16,4 +16,5 @@ class RRematch(RPackage):
license("MIT")
+ version("2.0.0", sha256="15daf7bf2907aef8503635bc8631fce9fd75248a1fc2496825588c4bdf785c26")
version("1.0.1", sha256="a409dec978cd02914cdddfedc974d9b45bd2975a124d8870d52cfd7d37d47578")
diff --git a/var/spack/repos/builtin/packages/r-remotes/package.py b/var/spack/repos/builtin/packages/r-remotes/package.py
index 6db1982ab0..4b9b40c792 100644
--- a/var/spack/repos/builtin/packages/r-remotes/package.py
+++ b/var/spack/repos/builtin/packages/r-remotes/package.py
@@ -18,6 +18,7 @@ class RRemotes(RPackage):
license("MIT")
+ version("2.5.0", sha256="4d663f1426cd88d42f4070f23d969305c575e0499ed1397be6607b0770d2850c")
version("2.4.2", sha256="f2ef875f24a485bf4f55a8c830f87cdd5db868f9a8cdb624dc452d0bf66ba516")
version("2.2.0", sha256="12f234fd8c46f4ac54e06a3c60e4015ed2193a32762ca4dd6854f120136f33b8")
version("2.1.1", sha256="4e590746fce618094089372b185e1ea234b3337b23c44c44118e942d0fb5118b")
diff --git a/var/spack/repos/builtin/packages/r-renv/package.py b/var/spack/repos/builtin/packages/r-renv/package.py
index 2f60c02864..fe9e81566a 100644
--- a/var/spack/repos/builtin/packages/r-renv/package.py
+++ b/var/spack/repos/builtin/packages/r-renv/package.py
@@ -19,6 +19,7 @@ class RRenv(RPackage):
license("MIT")
+ version("1.0.7", sha256="7b60b58a23743803ab167f82f78663e86f778947b2bda07afa12689338794507")
version("0.17.3", sha256="1c4f28cd233e1f539a2a091f1d118de83eb8aea5d5780dbdfb6bb8dcc6e4f5f0")
version("0.16.0", sha256="f3a13e6b71e9be460db73bd9e11a3cb8a1d9bc05c6b77423957cbc2a7f8ba016")
version("0.15.5", sha256="b4f1a9a7daa82f0c3123ebd4eeba06e98d5485215518e5292b25bc56741d582e")
diff --git a/var/spack/repos/builtin/packages/r-repr/package.py b/var/spack/repos/builtin/packages/r-repr/package.py
index 7146c4da14..a7ad7aaf29 100644
--- a/var/spack/repos/builtin/packages/r-repr/package.py
+++ b/var/spack/repos/builtin/packages/r-repr/package.py
@@ -17,6 +17,7 @@ class RRepr(RPackage):
license("GPL-3.0-or-later")
+ version("1.1.7", sha256="73bd696b4d4211096e0d1e382d5ce6591527d2ff400cc7ae8230f0235eed021b")
version("1.1.6", sha256="3d2e6c9b363c1ec4811688deff7fb22093cadc9e0a333930382093d93c16673f")
version("1.1.4", sha256="6f799ca83e0940618dd8c22e62ffdce5ec11ba3366c5306ae58b55b53c097040")
version("1.1.0", sha256="743fe018f9e3e54067a970bc38b6b8c0c0498b43f88d179ac4a959c2013a5f96")
diff --git a/var/spack/repos/builtin/packages/r-reprex/package.py b/var/spack/repos/builtin/packages/r-reprex/package.py
index 3043c5e95a..5b983f8b34 100644
--- a/var/spack/repos/builtin/packages/r-reprex/package.py
+++ b/var/spack/repos/builtin/packages/r-reprex/package.py
@@ -21,6 +21,7 @@ class RReprex(RPackage):
license("MIT")
+ version("2.1.1", sha256="c860368cbc7ef90ea786fb61ab6fa42cd89b5258be48652abc20ad414001879c")
version("2.0.2", sha256="a85b16e26112364a65c886efea050df08c17aadf1411fd14ec27d9ef13e87092")
version("2.0.1", sha256="0e6d8667cacb63135476a766fba3a4f91e5ad86274ea66d2b1e6d773b5ca6426")
version("0.3.0", sha256="203c2ae6343f6ff887e7a5a3f5d20bae465f6e8d9745c982479f5385f4effb6c")
@@ -32,6 +33,7 @@ class RReprex(RPackage):
depends_on("r@3.1:", type=("build", "run"), when="@0.2.0:")
depends_on("r@3.3:", type=("build", "run"), when="@1:")
depends_on("r@3.4:", type=("build", "run"), when="@2.0.2:")
+ depends_on("r@3.6:", type=("build", "run"), when="@2.1.0:")
depends_on("r-callr@2.0.0:", type=("build", "run"))
depends_on("r-callr@3.3.1:", type=("build", "run"), when="@1:")
depends_on("r-callr@3.6.0:", type=("build", "run"), when="@2:")
diff --git a/var/spack/repos/builtin/packages/r-reproducible/package.py b/var/spack/repos/builtin/packages/r-reproducible/package.py
index 94b3089e4b..42c219d409 100644
--- a/var/spack/repos/builtin/packages/r-reproducible/package.py
+++ b/var/spack/repos/builtin/packages/r-reproducible/package.py
@@ -26,6 +26,7 @@ class RReproducible(RPackage):
license("GPL-3.0-only")
+ version("2.1.0", sha256="9bdc44339e5e82a0082492cb63846699c7491c7ade74d9843b6173d4be84b92b")
version("1.2.16", sha256="ec504cdc1adf305cd008ce65eff226e3cb60b7a454b2c8b98a871c84458546ae")
version("1.2.10", sha256="fcee3aeb9d38c561c95df8663614ff0ed91a871719730766171b4ed19c82f729")
version("1.2.8", sha256="6f453016404f6a2a235cb4d951a29aa7394dc3bd0b9cfc338dc85fb3d5045dd5")
@@ -34,19 +35,22 @@ class RReproducible(RPackage):
depends_on("r@3.5:", type=("build", "run"))
depends_on("r@3.6:", type=("build", "run"), when="@1.2.8:")
depends_on("r@4.0:", type=("build", "run"), when="@1.2.10:")
+ depends_on("r@4.1:", type=("build", "run"), when="@2.0.2:")
depends_on("r-data-table@1.10.4:", type=("build", "run"))
- depends_on("r-dbi", type=("build", "run"))
depends_on("r-digest", type=("build", "run"))
+ depends_on("r-filelock", type=("build", "run"), when="@2.0.2:")
depends_on("r-fpcompare", type=("build", "run"))
- depends_on("r-glue", type=("build", "run"))
+ depends_on("r-fs", type=("build", "run"), when="@2.0.9:")
depends_on("r-lobstr", type=("build", "run"), when="@1.2.10:")
- depends_on("r-magrittr", type=("build", "run"))
- depends_on("r-raster", type=("build", "run"))
- depends_on("r-raster@3.5-15:", type=("build", "run"), when="@1.2.10:")
- depends_on("r-rsqlite", type=("build", "run"))
- depends_on("r-rlang", type=("build", "run"))
- depends_on("r-sp@1.4-2:", type=("build", "run"))
depends_on("unrar", type=("build", "run"))
+ depends_on("r-dbi", type=("build", "run"), when="@:2.0.1")
depends_on("r-gdalutilities", type=("build", "run"), when="@1.2.8")
+ depends_on("r-glue", type=("build", "run"), when="@:2.0.1")
+ depends_on("r-lobstr", type=("build", "run"), when="@1.2.10:2.0.1")
+ depends_on("r-magrittr", type=("build", "run"), when="@:2.0.1")
+ depends_on("r-raster@3.5-15:", type=("build", "run"), when="@1.2.10:2.0.1")
depends_on("r-require", type=("build", "run"), when="@:1.2.10")
+ depends_on("r-rlang", type=("build", "run"), when="@:2.0.1")
+ depends_on("r-rsqlite", type=("build", "run"), when="@:2.0.1")
+ depends_on("r-sp@1.4-2:", type=("build", "run"), when="@:2.0.1")
diff --git a/var/spack/repos/builtin/packages/r-require/package.py b/var/spack/repos/builtin/packages/r-require/package.py
index 867c841784..edd15c5a6f 100644
--- a/var/spack/repos/builtin/packages/r-require/package.py
+++ b/var/spack/repos/builtin/packages/r-require/package.py
@@ -20,6 +20,7 @@ class RRequire(RPackage):
maintainers("dorton21")
+ version("1.0.1", sha256="52256624b86178ec5efb86b992bbe5a24f2fa53687cec532c0a73b1852ce6800")
version("0.3.0", sha256="de879999f71bd3009b58676673f26774119fa84d3d7fcc28d0b02f07d5c63968")
version("0.1.4", sha256="1657dacff807ec8865892fce4d55cec9e31affafd90cb44ab59b704d29575a8c")
version("0.1.2", sha256="c045c1cc69f6d6248306d88f6399699b9f86134a71b631e35b9101901593af1b")
@@ -31,3 +32,4 @@ class RRequire(RPackage):
depends_on("r@4.0:", type=("build", "run"), when="@0.1.2:")
depends_on("r-data-table@1.10.4:", type=("build", "run"))
depends_on("r-remotes", type=("build", "run"), when="@:0.0.13")
+ depends_on("r-sys", type=("build", "run"), when="@0.3.1.9074:")
diff --git a/var/spack/repos/builtin/packages/r-reshape2/package.py b/var/spack/repos/builtin/packages/r-reshape2/package.py
index 713f78c9d2..eff1aeeafe 100644
--- a/var/spack/repos/builtin/packages/r-reshape2/package.py
+++ b/var/spack/repos/builtin/packages/r-reshape2/package.py
@@ -21,6 +21,8 @@ class RReshape2(RPackage):
version("1.4.2", sha256="6d3783610379be4c5676d9236cf66276a166b5b96c18f2759e9b219758959b6b")
version("1.4.1", sha256="fbd49f75a5b0b7266378515af98db310cf6c772bf6e68bed01f38ee99b408042")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1:", type=("build", "run"), when="@1.4.3:")
depends_on("r-plyr@1.8.1:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-restfulr/package.py b/var/spack/repos/builtin/packages/r-restfulr/package.py
index d325d585dc..499f102c54 100644
--- a/var/spack/repos/builtin/packages/r-restfulr/package.py
+++ b/var/spack/repos/builtin/packages/r-restfulr/package.py
@@ -18,6 +18,8 @@ class RRestfulr(RPackage):
version("0.0.15", sha256="40ff8f1fb2987af2223e1a855bb1680c5ce2143fbce7ebc42f1edb291f80e692")
version("0.0.13", sha256="7b59f5887aaf02f46a80617f4d1e0ffd4e11e4840e9e2fbd486a9a9c7f2d64b6")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-xml", type=("build", "run"))
depends_on("r-rcurl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-reticulate/package.py b/var/spack/repos/builtin/packages/r-reticulate/package.py
index 120cce8a6e..9d6f53afff 100644
--- a/var/spack/repos/builtin/packages/r-reticulate/package.py
+++ b/var/spack/repos/builtin/packages/r-reticulate/package.py
@@ -19,6 +19,7 @@ class RReticulate(RPackage):
license("Apache-2.0")
+ version("1.38.0", sha256="cb2f313e2351a3cde03be55561b592318ec5376fba3b10e371eeff1986deca8d")
version("1.28", sha256="58a299ed18faaa3ff14936752fcc2b86e64ae18fc9f36befdfd492ccb251516f")
version("1.26", sha256="3fd74823bde1b0e094db7c2bf6b40ee2501f8d724b4c35b53da95c3c588c74c5")
version("1.25", sha256="2125af9e75939c3b7c0dc74f28f42606e816d63aa1143baf631c318ff5ff3a2c")
@@ -29,9 +30,12 @@ class RReticulate(RPackage):
version("1.13", sha256="adbe41d556b667c4419d563680f8608a56b0f792b8bc427b3bf4c584ff819de3")
depends_on("r@3.0:", type=("build", "run"))
+ depends_on("r@3.5:", type=("build", "run"), when="@1.30.0:")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rcpp@0.12.7:", type=("build", "run", "link"))
+ depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@1.29.0:")
depends_on("r-rcpptoml", type=("build", "run", "link"), when="@1.23:")
+ depends_on("r-rlang", type=("build", "run"), when="@1.29.0:")
depends_on("r-here", type=("build", "run", "link"), when="@1.23:")
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-png", type=("build", "run", "link"), when="@1.23:")
diff --git a/var/spack/repos/builtin/packages/r-rfast/package.py b/var/spack/repos/builtin/packages/r-rfast/package.py
index d6ddfe5967..63d534f379 100644
--- a/var/spack/repos/builtin/packages/r-rfast/package.py
+++ b/var/spack/repos/builtin/packages/r-rfast/package.py
@@ -21,11 +21,13 @@ class RRfast(RPackage):
cran = "Rfast"
+ version("2.1.0", sha256="f9e46cac99db756cd49c9cd83be8adc0d381e6c03102389bfdcb8258d02418ff")
version("2.0.7", sha256="8f86159a4760a7124e1c91ae0b022c7e496f81590ea4e4af702bea44e8dedf8f")
version("2.0.6", sha256="34694b5c67ce8fcbdc90aac2ac80a74d4b66515f383e6301aea7c020009ebe7f")
version("2.0.4", sha256="959907e36e24620c07ec282b203b40214f4914f4928c07ee6491043c27af31d9")
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-rcpp@0.12.3:", type=("build", "run"))
+ depends_on("r-rcppparallel", type=("build", "run"), when="@2.1.0:")
depends_on("r-rcppziggurat", type=("build", "run"))
depends_on("r-rcpparmadillo", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rferns/package.py b/var/spack/repos/builtin/packages/r-rferns/package.py
index 8dcaeff9c0..20d67a8e0c 100644
--- a/var/spack/repos/builtin/packages/r-rferns/package.py
+++ b/var/spack/repos/builtin/packages/r-rferns/package.py
@@ -19,3 +19,5 @@ class RRferns(RPackage):
version("5.0.0", sha256="78da671e18dc1fb499eddcc6db7eedd69cef673ba0b46c873bd95615cbb583fb")
version("4.0.0", sha256="cc8cea0893390bf5db0fb0f59748d5bf6f29537d68bedca900268fd551489128")
version("3.0.0", sha256="35e7e31a6497e415a0fe578678cf9b2f537b21319e4c015a1e2dade00310227c")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-rgdal/package.py b/var/spack/repos/builtin/packages/r-rgdal/package.py
index 4194c69d7f..a472fbd9ea 100644
--- a/var/spack/repos/builtin/packages/r-rgdal/package.py
+++ b/var/spack/repos/builtin/packages/r-rgdal/package.py
@@ -23,6 +23,7 @@ class RRgdal(RPackage):
cran = "rgdal"
+ version("1.6-7", sha256="555cedfdadb05db90b061d4b056f96d8b7010c00ea54bc6c1bbcc7684fadae33")
version(
"1.6-6",
sha256="d742d7aadfc004771e61cac28a1faffeb4dbda981dea19115be11c541087399a",
diff --git a/var/spack/repos/builtin/packages/r-rgenoud/package.py b/var/spack/repos/builtin/packages/r-rgenoud/package.py
index 172196c919..dc489925fe 100644
--- a/var/spack/repos/builtin/packages/r-rgenoud/package.py
+++ b/var/spack/repos/builtin/packages/r-rgenoud/package.py
@@ -15,6 +15,7 @@ class RRgenoud(RPackage):
license("GPL-3.0-only")
+ version("5.9-0.10", sha256="e644ee640a097ed2d32be03db3603259981656fa459922035a8c531d692acde9")
version("5.9-0.3", sha256="31560a8dad791f9c47a673e90d397b3fc60da1a58be1ae1486ace90d988eb55f")
version("5.8-3.0", sha256="9beb11b5edab3ab3aa6001daa39668b240a8e0328be9d55db4e23ff88ce3235d")
version("5.8-2.0", sha256="106c4f6a6df5159578e929a0141b3cfbaa88141a70703ff59a1fc48a27e2d239")
diff --git a/var/spack/repos/builtin/packages/r-rgeos/package.py b/var/spack/repos/builtin/packages/r-rgeos/package.py
index fae7ad271e..2122332ecd 100644
--- a/var/spack/repos/builtin/packages/r-rgeos/package.py
+++ b/var/spack/repos/builtin/packages/r-rgeos/package.py
@@ -30,6 +30,7 @@ class RRgeos(RPackage):
cran = "rgeos"
+ version("0.6-4", sha256="9d03c4de96fd3fad55ff8d1ff8113dcaaa00f15d9d0588e54c9f91751bcede11")
version(
"0.6-2",
sha256="2ee2bb8b0c20d7908ac55d4d1cf8292c624ab836e02599ce1871a249a59fe0af",
diff --git a/var/spack/repos/builtin/packages/r-rgexf/package.py b/var/spack/repos/builtin/packages/r-rgexf/package.py
index e9c146ced9..7498cd8798 100644
--- a/var/spack/repos/builtin/packages/r-rgexf/package.py
+++ b/var/spack/repos/builtin/packages/r-rgexf/package.py
@@ -21,6 +21,7 @@ class RRgexf(RPackage):
license("MIT")
+ version("0.16.3", sha256="cddcc58a10092cfea32999d7baaf6eae9b34e649a16627ee0b466a7cf2c339b0")
version("0.16.2", sha256="6ee052b0de99d0c7492366b991d345a51b3d0cc890d10a68b8670e1bd4fc8201")
version("0.16.0", sha256="2a671df9ac70cfefd4092754317cb28e32a33df345b80e1975bf838e838245ee")
version("0.15.3", sha256="2e8a7978d1fb977318e6310ba65b70a9c8890185c819a7951ac23425c6dc8147")
diff --git a/var/spack/repos/builtin/packages/r-rgl/package.py b/var/spack/repos/builtin/packages/r-rgl/package.py
index 67f0b5e874..37a0a0d4b5 100644
--- a/var/spack/repos/builtin/packages/r-rgl/package.py
+++ b/var/spack/repos/builtin/packages/r-rgl/package.py
@@ -20,6 +20,7 @@ class RRgl(RPackage):
license("GPL-2.0-or-later")
+ version("1.3.1", sha256="9fea7b59dd7fef9bbd783c745d68325ec753ef412699d168bb6c664a56506d49")
version("1.1.3", sha256="4fa246c2ab06261ea81e09a7a489f34174b93359fe74a3db291f8d0eccd38aae")
version("0.110.2", sha256="da1118c1990ae161a5787960fb22009601d2ee7d39ca9c97c31c70589bce346d")
version("0.108.3.2", sha256="033af3aceade6c21d0a602958fff1c25c21febc7d0e867cf88860cfa25fc3c65")
@@ -34,6 +35,7 @@ class RRgl(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r@3.3.0:", type=("build", "run"), when="@0.108.3:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@1.3.1:")
depends_on("r-htmlwidgets", type=("build", "run"))
depends_on("r-htmlwidgets@1.6.0:", type=("build", "run"), when="@1.1.3:")
depends_on("r-htmltools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rgooglemaps/package.py b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py
index f2931bef81..d3e5913645 100644
--- a/var/spack/repos/builtin/packages/r-rgooglemaps/package.py
+++ b/var/spack/repos/builtin/packages/r-rgooglemaps/package.py
@@ -16,6 +16,7 @@ class RRgooglemaps(RPackage):
cran = "RgoogleMaps"
+ version("1.5.1", sha256="14fe6c37d935a1c5a9ac063c9c9c59a1e93c6f86907480792302f9a9452cf8a4")
version("1.4.5.3", sha256="d1d5ad8db841754af175d4104a05c5c31e5cc445be314a3ac70483c31798680b")
version("1.4.3", sha256="44cb62bcd23e5b4807e91c5825352eb8d38aaaeb3b38a8271ca9f21c1e1d4b19")
version("1.4.2", sha256="b479996fcb72f067644a7ea7f00325e44e76efd202e84aaab022753c4a6d5584")
@@ -23,6 +24,6 @@ class RRgooglemaps(RPackage):
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-png", type=("build", "run"))
- depends_on("r-sp", type=("build", "run"), when="@1.4.5.3:")
+ depends_on("r-sp", type=("build", "run"), when="@1.4.5.3:1.4.5.3")
depends_on("r-rjsonio", type=("build", "run"), when="@1.2.0.5:1.2.0.7")
diff --git a/var/spack/repos/builtin/packages/r-rgraphviz/package.py b/var/spack/repos/builtin/packages/r-rgraphviz/package.py
index eb0fb02104..a5266eb912 100644
--- a/var/spack/repos/builtin/packages/r-rgraphviz/package.py
+++ b/var/spack/repos/builtin/packages/r-rgraphviz/package.py
@@ -25,6 +25,9 @@ class RRgraphviz(RPackage):
version("2.22.0", commit="5b8ebbf9b38574c08959dd4632e802b3fbccc121")
version("2.20.0", commit="eface6298150667bb22eac672f1a45e52fbf8c90")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r+X", type=("build", "run"))
depends_on("r@2.6.0:", type=("build", "run"))
depends_on("r-graph", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rhdf5/package.py b/var/spack/repos/builtin/packages/r-rhdf5/package.py
index a312524388..43f1f23795 100644
--- a/var/spack/repos/builtin/packages/r-rhdf5/package.py
+++ b/var/spack/repos/builtin/packages/r-rhdf5/package.py
@@ -30,6 +30,9 @@ class RRhdf5(RPackage):
version("2.22.0", commit="4431bdc0a2bcbb8086ee08a0f2300129b808d1be")
version("2.20.0", commit="37b5165325062728bbec9167f89f5f4b794f30bc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5.0:", type=("build", "run"), when="@2.26.2:")
depends_on("r@4.0.0:", type=("build", "run"), when="@2.38.0:")
depends_on("r-rhdf5lib", type=("build", "run"), when="@2.24.0:")
diff --git a/var/spack/repos/builtin/packages/r-rhdf5filters/package.py b/var/spack/repos/builtin/packages/r-rhdf5filters/package.py
index 560cf9dba4..06153a6dcc 100644
--- a/var/spack/repos/builtin/packages/r-rhdf5filters/package.py
+++ b/var/spack/repos/builtin/packages/r-rhdf5filters/package.py
@@ -21,6 +21,9 @@ class RRhdf5filters(RPackage):
version("1.6.0", commit="5f7f3a5b7dabd6e7d0c50cda70290e2472ff4f53")
version("1.2.0", commit="25af0180f926b4b3ea11b30ec9277d26ad3d56b3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rhdf5lib", type=("build", "run"))
depends_on("gmake", type="build")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/r-rhdf5lib/package.py b/var/spack/repos/builtin/packages/r-rhdf5lib/package.py
index 05433c61ef..382396126a 100644
--- a/var/spack/repos/builtin/packages/r-rhdf5lib/package.py
+++ b/var/spack/repos/builtin/packages/r-rhdf5lib/package.py
@@ -23,6 +23,8 @@ class RRhdf5lib(RPackage):
version("1.2.1", commit="dbf85dbedb736d5a696794d52875729c8514494e")
version("1.0.0", commit="79608038c2016a518ba747fe6a2bf02ce53a75f9")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3.0:", type="build", when="@1.12.1:")
depends_on("r@4.0.0:", type="build", when="@1.16.0:")
depends_on("r@4.2.0:", type=("build", "run"), when="@1.22.0:")
diff --git a/var/spack/repos/builtin/packages/r-rhtslib/package.py b/var/spack/repos/builtin/packages/r-rhtslib/package.py
index 8f2896c7b6..96726aade7 100644
--- a/var/spack/repos/builtin/packages/r-rhtslib/package.py
+++ b/var/spack/repos/builtin/packages/r-rhtslib/package.py
@@ -38,6 +38,8 @@ class RRhtslib(RPackage):
version("1.10.0", commit="53dcf7dfe35d735283956c77c011a97ca3f4eb26")
version("1.8.0", commit="3b5493473bed42958614091c58c739932ffcfa79")
+ depends_on("c", type="build") # generated
+
depends_on("r-zlibbioc", type=("build", "run"))
depends_on("bzip2", type=("build", "link", "run"))
depends_on("xz", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rinside/package.py b/var/spack/repos/builtin/packages/r-rinside/package.py
index b2f222bdd1..693d8ea386 100644
--- a/var/spack/repos/builtin/packages/r-rinside/package.py
+++ b/var/spack/repos/builtin/packages/r-rinside/package.py
@@ -33,4 +33,7 @@ class RRinside(RPackage):
version("0.2.14", sha256="8de5340993fe879ca00fa559c5b1b27b408ba78bfc5f67d36d6f0b8d8e8649cf")
version("0.2.13", sha256="be1da861f4f8c1292f0691bce05978e409a081f24ad6006ae173a6a89aa4d031")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rio/package.py b/var/spack/repos/builtin/packages/r-rio/package.py
index f120492fe9..473ae6b88f 100644
--- a/var/spack/repos/builtin/packages/r-rio/package.py
+++ b/var/spack/repos/builtin/packages/r-rio/package.py
@@ -22,15 +22,22 @@ class RRio(RPackage):
license("GPL-2.0-only")
+ version("1.2.2", sha256="51472a286ad82e1cafd4d87d774662650ccf40d788b59dc70e49fe754e045394")
version("0.5.29", sha256="9fa63187e1814053e6ed2a164665b4924e08c3453adccb78f7211d403dcc5412")
version("0.5.16", sha256="d3eb8d5a11e0a3d26169bb9d08f834a51a6516a349854250629072d59c29d465")
depends_on("r@2.15.0:", type=("build", "run"))
+ depends_on("r@4.0:", when="@1.2:", type=("build", "run"))
depends_on("r-foreign", type=("build", "run"))
depends_on("r-haven@1.1.2:", type=("build", "run"), when="@0.5.26:")
depends_on("r-haven@1.1.0:", type=("build", "run"))
depends_on("r-curl@0.6:", type=("build", "run"))
+ depends_on("r-data-table@1.11.2:", when="@1:", type=("build", "run"))
depends_on("r-data-table@1.9.8:", type=("build", "run"))
+ depends_on("r-lifecycle", when="@1:", type=("build", "run"))
+ depends_on("r-r-utils", when="@1:", type=("build", "run"))
+ depends_on("r-readr", when="@1.2.1:", type=("build", "run"))
depends_on("r-readxl@0.1.1:", type=("build", "run"))
- depends_on("r-openxlsx", type=("build", "run"))
+ depends_on("r-openxlsx", type=("build", "run"), when="@:0.5.30")
depends_on("r-tibble", type=("build", "run"))
+ depends_on("r-writexl", when="@1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rjags/package.py b/var/spack/repos/builtin/packages/r-rjags/package.py
index 3797aa8983..4d0883a909 100644
--- a/var/spack/repos/builtin/packages/r-rjags/package.py
+++ b/var/spack/repos/builtin/packages/r-rjags/package.py
@@ -16,6 +16,7 @@ class RRjags(RPackage):
license("GPL-2.0-only")
+ version("4-16", sha256="369d393e519ae26219ff44e6a8f07d9310a9bb06fa0ec9dcce33ce7c4bc7e7e7")
version("4-14", sha256="313b5df702598ce3bbc5f8b027b654c8489420ca5a4e0a794954ea9f4837e2cb")
version("4-13", sha256="f85cc34c5127b828d8a3fa3613ef29f147c868bdaf55eb0f7406c10abbf92b32")
version("4-12", sha256="b91f34c3f9ebf78fa44bd661346fbb6f28a01693a7203ac133c98392dd273e10")
diff --git a/var/spack/repos/builtin/packages/r-rjava/package.py b/var/spack/repos/builtin/packages/r-rjava/package.py
index 0a135ed487..662ae85fd4 100644
--- a/var/spack/repos/builtin/packages/r-rjava/package.py
+++ b/var/spack/repos/builtin/packages/r-rjava/package.py
@@ -14,6 +14,7 @@ class RRjava(RPackage):
cran = "rJava"
+ version("1.0-11", sha256="9ea0ccf5553d86f7de8649a8324766c4f0810f35b7be561640dd87fd37986417")
version("1.0-6", sha256="e290d0493317a5d6c452793e92baa914e37ef03faef19b2e436329b4ec8658c6")
version("0.9-13", sha256="5b1688f5044476b34f71d868b222ac5fce3a088f0c2b9e4591c1e48f3d8c75f4")
version("0.9-11", sha256="c28ae131456a98f4d3498aa8f6eac9d4df48727008dacff1aa561fc883972c69")
diff --git a/var/spack/repos/builtin/packages/r-rjson/package.py b/var/spack/repos/builtin/packages/r-rjson/package.py
index d45011509d..c0c3ea6ae5 100644
--- a/var/spack/repos/builtin/packages/r-rjson/package.py
+++ b/var/spack/repos/builtin/packages/r-rjson/package.py
@@ -15,10 +15,15 @@ class RRjson(RPackage):
license("GPL-2.0-only")
+ version("0.2.22", sha256="06cdf67b72b6166a6ad399c8176b34f8a5a75fa5257ddbd46a2b99b2f39e1d27")
version("0.2.21", sha256="982b56d35ccc0c7db0b20c1d3eab5f5f47c620309646fdc278ff1cc3433ea2e2")
version("0.2.20", sha256="3a287c1e5ee7c333ed8385913c0a307daf99335fbdf803e9dcca6e3d5adb3f6c")
version("0.2.19", sha256="5c2672461986f2b715416cab92ed262abe9875f31299bc8a1a072ef7c6dd49bc")
version("0.2.15", sha256="77d00d8f6a1c936329b46f3b8b0be79a165f8c5f1989497f942ecc53dcf6f2ef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@0.2.21:")
+ depends_on("r@4.4.0:", type=("build", "run"), when="@0.2.22:")
diff --git a/var/spack/repos/builtin/packages/r-rjsonio/package.py b/var/spack/repos/builtin/packages/r-rjsonio/package.py
index 63495d35d3..86833a5368 100644
--- a/var/spack/repos/builtin/packages/r-rjsonio/package.py
+++ b/var/spack/repos/builtin/packages/r-rjsonio/package.py
@@ -27,6 +27,7 @@ class RRjsonio(RPackage):
cran = "RJSONIO"
+ version("1.3-1.9", sha256="f173034b0c28873f417ee804b9e278aedd92e76eb56c7c6d71b1c02fa1193ece")
version("1.3-1.8", sha256="f6f0576d3c7852b16295dfc897feebca064fe5dd29cdce7592f94c56823553f5")
version("1.3-1.6", sha256="82d1c9ea7758b2a64ad683f9c46223dcba9aa8146b43c1115bf9aa76a657a09f")
version("1.3-1.4", sha256="54142c931e15eca278a02dad5734026bb49d960471eb085008af825352953190")
diff --git a/var/spack/repos/builtin/packages/r-rlang/package.py b/var/spack/repos/builtin/packages/r-rlang/package.py
index 48a47e1447..6f630c0707 100644
--- a/var/spack/repos/builtin/packages/r-rlang/package.py
+++ b/var/spack/repos/builtin/packages/r-rlang/package.py
@@ -16,6 +16,7 @@ class RRlang(RPackage):
license("MIT")
+ version("1.1.4", sha256="f2d74527508bf3287102470beb27de0d234c3cbba399c28d3312f2c83c64a6e1")
version("1.1.2", sha256="2a0ee1dc6e5c59b283c32db5e74e869922a336197cb406fe92622b6ec66f8092")
version("1.1.1", sha256="5e5ec9a7796977216c39d94b1e342e08f0681746657067ba30de11b8fa8ada99")
version("1.1.0", sha256="f89859d91c9edc05fd7ccf21163fe53ad58da907ee273a93d5ab004a8649335b")
diff --git a/var/spack/repos/builtin/packages/r-rle/package.py b/var/spack/repos/builtin/packages/r-rle/package.py
index 60b2088e53..5623401066 100644
--- a/var/spack/repos/builtin/packages/r-rle/package.py
+++ b/var/spack/repos/builtin/packages/r-rle/package.py
@@ -18,4 +18,6 @@ class RRle(RPackage):
version("0.9.2", sha256="803cbe310af6e882e27be61d37d660dbe5910ac1ee1eff61a480bcf724a04f69")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rlist/package.py b/var/spack/repos/builtin/packages/r-rlist/package.py
new file mode 100644
index 0000000000..672f6b7586
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rlist/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RRlist(RPackage):
+ """Provides a set of functions for data manipulation with
+ list objects, including mapping, filtering, grouping, sorting,
+ updating, searching, and other useful functions. Most functions
+ are designed to be pipeline friendly so that data processing with
+ lists can be chained."""
+
+ homepage = "https://renkun-ken.github.io/rlist/"
+ cran = "rlist"
+
+ license("MIT", checked_by="wdconinc")
+
+ version("0.4.6.2", sha256="ebde658d897c8a27a90ebb892b9e2bad15e2ad75557a7352fb08cbb5604e0997")
+
+ depends_on("r@2.15:", type=("build", "run"))
+ depends_on("r-yaml", type=("build", "run"))
+ depends_on("r-jsonlite", type=("build", "run"))
+ depends_on("r-xml", type=("build", "run"))
+ depends_on("r-data-table", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rmariadb/package.py b/var/spack/repos/builtin/packages/r-rmariadb/package.py
index 740d434eaf..231701e2bb 100644
--- a/var/spack/repos/builtin/packages/r-rmariadb/package.py
+++ b/var/spack/repos/builtin/packages/r-rmariadb/package.py
@@ -15,6 +15,7 @@ class RRmariadb(RPackage):
cran = "RMariaDB"
+ version("1.3.2", sha256="7c87ef0623218b9e79dd6a9b1a25f495520289603ca48f54ea45309bd8826828")
version("1.2.2", sha256="c97c61ace584f9ad9929d3e3f366556e0eecad12bc98ea2979563a01475f468e")
version("1.2.1", sha256="c9176a096854ce33a98ce0faef0065c50b5d356174f90cea742c70e130cf5f0c")
version("1.1.0", sha256="9ffa63a15052876a51a7996ca4e6a5b7b937f594b5cc7ca5a86f43789e22a956")
@@ -27,11 +28,12 @@ class RRmariadb(RPackage):
depends_on("r-dbi@1.1.3:", type=("build", "run"), when="@1.2.2:")
depends_on("r-hms@0.5.0:", type=("build", "run"))
depends_on("r-lubridate", type=("build", "run"), when="@1.1.0:")
- depends_on("r-rcpp@0.12.4:", type=("build", "run"))
+ depends_on("r-cpp11", type=("build", "run"), when="@1.3.0:")
depends_on("r-rlang", type=("build", "run"), when="@1.2.1:")
depends_on("r-plogr", type=("build", "run"))
depends_on("mariadb-client")
+ depends_on("r-rcpp@0.12.4:", type=("build", "run"), when="@:1.2.2")
depends_on("r-bh", type=("build", "run"), when="@:1.1.0")
# Set the library explicitly to prevent configure from finding a system
diff --git a/var/spack/repos/builtin/packages/r-rmarkdown/package.py b/var/spack/repos/builtin/packages/r-rmarkdown/package.py
index 2b4e444e0e..767288056b 100644
--- a/var/spack/repos/builtin/packages/r-rmarkdown/package.py
+++ b/var/spack/repos/builtin/packages/r-rmarkdown/package.py
@@ -16,6 +16,7 @@ class RRmarkdown(RPackage):
license("GPL-3.0-only")
+ version("2.28", sha256="a102a503a92d4203038c5a0675451daf9460df18efcabd5c23283ecefe75a085")
version("2.21", sha256="c25b20a422d11a115c93460f41c488874002154abb349b14e0d6518682fdac28")
version("2.17", sha256="aa576c458ec4c2e8468aaa4e3f60202d8d9c7ef54fa01d6b2d243bffee08c4be")
version("2.16", sha256="d3d34e0419c419d3ab20eb60952a0f0f4c391d202277af55dcd673d25561fa71")
@@ -38,7 +39,7 @@ class RRmarkdown(RPackage):
depends_on("r-jquerylib", type=("build", "run"), when="@2.11:")
depends_on("r-jsonlite", type=("build", "run"))
depends_on("r-knitr@1.22:", type=("build", "run"))
- depends_on("r-stringr@1.2.0:", type=("build", "run"), when="@1.6:")
+ depends_on("r-knitr@1.43:", type=("build", "run"), when="@2.26:")
depends_on("r-tinytex@0.11:", type=("build", "run"), when="@1.10:")
depends_on("r-tinytex@0.31:", type=("build", "run"), when="@2.8:")
depends_on("r-xfun", type=("build", "run"), when="@1.13:")
@@ -54,3 +55,4 @@ class RRmarkdown(RPackage):
depends_on("r-mime", type=("build", "run"), when="@1.8:1.14")
depends_on("r-catools", type=("build", "run"), when="@:1.7")
depends_on("r-base64enc", type=("build", "run"), when="@:1.14")
+ depends_on("r-stringr@1.2.0:", type=("build", "run"), when="@1.6:2.25")
diff --git a/var/spack/repos/builtin/packages/r-rmpfr/package.py b/var/spack/repos/builtin/packages/r-rmpfr/package.py
index 7388730fc1..04b423d5ab 100644
--- a/var/spack/repos/builtin/packages/r-rmpfr/package.py
+++ b/var/spack/repos/builtin/packages/r-rmpfr/package.py
@@ -17,6 +17,7 @@ class RRmpfr(RPackage):
cran = "Rmpfr"
+ version("0.9-5", sha256="bce9a2729efcd329a13910e2ecb4675b4626dd3322cd01b01cb835d516a5f31b")
version("0.9-2", sha256="ed63da32f3b970900c87cdb728eb16ed9fb0c79114cdecdc09e573f50ff7175e")
version("0.8-9", sha256="cfee5ab47d49c6433c372a267f7d849c8f7c61a84e00d08afb047eaafcdbbc8a")
version("0.8-7", sha256="93c2db785ff705dcfc6fa7f0373c2426cdc2ef72ceb5b294edeb2952775f57d2")
diff --git a/var/spack/repos/builtin/packages/r-rmpi/package.py b/var/spack/repos/builtin/packages/r-rmpi/package.py
index 88b9a30175..2a706a42e1 100644
--- a/var/spack/repos/builtin/packages/r-rmpi/package.py
+++ b/var/spack/repos/builtin/packages/r-rmpi/package.py
@@ -14,6 +14,7 @@ class RRmpi(RPackage):
cran = "Rmpi"
+ version("0.7-2", sha256="8591fa9f50de52535a32b36e7ed142c6ca4e03fdfdbef79a1e27a63ed5322eef")
version("0.7-1", sha256="17dae27dea9317aacabc2255dfcf2538fb3195472cedd521256ced9a20dd2dc1")
version("0.6-9.2", sha256="358ac1af97402e676f209261a231f36a35e60f0301edf8ca53dac11af3c3bd1a")
version("0.6-9", sha256="b2e1eac3e56f6b26c7ce744b29d8994ab6507ac88df64ebbb5af439414651ee6")
@@ -24,10 +25,13 @@ class RRmpi(RPackage):
depends_on("mpi")
# The following MPI types are not supported
- conflicts("^intel-mpi")
- conflicts("^intel-parallel-studio")
- conflicts("^mvapich2")
- conflicts("^spectrum-mpi")
+ conflicts("^[virtuals=mpi] intel-mpi")
+ conflicts("^[virtuals=mpi] intel-parallel-studio")
+ conflicts("^[virtuals=mpi] mvapich2")
+ conflicts("^[virtuals=mpi] spectrum-mpi")
+
+ # Rmpi's Open MPI implementation depends on v4.x ORTE runtime environment
+ conflicts("^[virtuals=mpi] openmpi@5:")
def configure_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/r-rms/package.py b/var/spack/repos/builtin/packages/r-rms/package.py
index a14c2404c2..289f9dd9a9 100644
--- a/var/spack/repos/builtin/packages/r-rms/package.py
+++ b/var/spack/repos/builtin/packages/r-rms/package.py
@@ -27,6 +27,7 @@ class RRms(RPackage):
license("GPL-2.0-or-later")
+ version("6.8-1", sha256="9d38545749430763c242bae1181ce24a7f6f6b244e4c69348ab200b83925596a")
version("6.6-0", sha256="f3abadb94339f3aedadd27e1aceade069bcb53c94bf246626b0dc94b16b6625c")
version("6.3-0", sha256="6c41eb670daf5e4391cc2f2a19e20a591f90769c124300a7ccf555820140d3f9")
version("6.2-0", sha256="10d58cbfe39fb434223834e29e5248c9384cded23e6267cfc99367d0f5ee24b6")
@@ -38,9 +39,11 @@ class RRms(RPackage):
version("5.1-1", sha256="c489948df5c434b40bcf5288844f5b4e08d157f36939d09230c1600f88d1bfe3")
depends_on("r@3.5.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@6.8-0:")
depends_on("r-hmisc@4.3-0:", type=("build", "run"))
depends_on("r-hmisc@4.7-0:", type=("build", "run"), when="@6.3-0:")
depends_on("r-hmisc@4.8-0:", type=("build", "run"), when="@6.6-0:")
+ depends_on("r-hmisc@5.1-0:", type=("build", "run"), when="@6.8-0:")
depends_on("r-survival@3.1-6:", type=("build", "run"))
depends_on("r-survival@3.1-12:", type=("build", "run"), when="@6.1-0:")
depends_on("r-ggplot2@2.2:", type=("build", "run"))
@@ -56,6 +59,7 @@ class RRms(RPackage):
depends_on("r-cluster", type=("build", "run"), when="@6.1-0:")
depends_on("r-digest", type=("build", "run"), when="@6.1-0:")
depends_on("r-knitr", type=("build", "run"), when="@6.6-0:")
- depends_on("r-kableextra", type=("build", "run"), when="@6.6-0:")
depends_on("r-colorspace", type=("build", "run"), when="@6.6-0:")
depends_on("r-lattice", type=("build", "run"), when="@:6.3-0")
+
+ depends_on("r-kableextra", type=("build", "run"), when="@6.6-0:6.7-0")
diff --git a/var/spack/repos/builtin/packages/r-rmutil/package.py b/var/spack/repos/builtin/packages/r-rmutil/package.py
index 9405ff6fbc..bff7341191 100644
--- a/var/spack/repos/builtin/packages/r-rmutil/package.py
+++ b/var/spack/repos/builtin/packages/r-rmutil/package.py
@@ -23,4 +23,7 @@ class RRmutil(RPackage):
version("1.1.5", sha256="6077e643d6daeba6edcf49d928320b54cc6aa6ff59934f9e9e6071a2f9afb2f6")
version("1.1.3", sha256="7abaf41e99d1c4a0e4082c4594964ac1421c53b4268116c82fa55aa8bc0582da")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@1.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rmysql/package.py b/var/spack/repos/builtin/packages/r-rmysql/package.py
index 2e3639efdd..fba8218785 100644
--- a/var/spack/repos/builtin/packages/r-rmysql/package.py
+++ b/var/spack/repos/builtin/packages/r-rmysql/package.py
@@ -15,6 +15,7 @@ class RRmysql(RPackage):
cran = "RMySQL"
+ version("0.10.27", sha256="f1735b689cd9bdb9c776a16138eaa1f6c5cbdbab5c1d292e1240e3bbf105bfab")
version("0.10.25", sha256="ed130f9bd80ea9fd5b4fdbb6fa094c35646354507de68eb3d19a3cbc8b5a4794")
version("0.10.24", sha256="ca1b9aacab6d76866ba09210ae881c3a7555bd5144ea0a0a446fceff80637241")
version("0.10.23", sha256="f4ac7ed4fba83749819c07ce32d53ee024cf1cedebbda3b832644bff9edf4a15")
diff --git a/var/spack/repos/builtin/packages/r-rnaseqmap/package.py b/var/spack/repos/builtin/packages/r-rnaseqmap/package.py
index 6f9cadba5d..82256402c2 100644
--- a/var/spack/repos/builtin/packages/r-rnaseqmap/package.py
+++ b/var/spack/repos/builtin/packages/r-rnaseqmap/package.py
@@ -22,6 +22,8 @@ class RRnaseqmap(RPackage):
version("2.36.0", commit="69c46fa467be0ac30776ede85a521f7622539b7e")
version("2.34.0", commit="7881bc00600ed824ac437edf3cfba35573261e46")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.11.0:", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
depends_on("r-rsamtools", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rncl/package.py b/var/spack/repos/builtin/packages/r-rncl/package.py
index 7fef555fec..fde4673d6c 100644
--- a/var/spack/repos/builtin/packages/r-rncl/package.py
+++ b/var/spack/repos/builtin/packages/r-rncl/package.py
@@ -23,6 +23,9 @@ class RRncl(RPackage):
version("0.8.6", sha256="fcc972c04fb43ace0876eb640a6433caddf6ec8304f7ceee37107d812ce68ffb")
version("0.8.4", sha256="6b19d0dd9bb08ecf99766be5ad684bcd1894d1cd9291230bdd709dbd3396496b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.1.1:", type=("build", "run"))
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
depends_on("r-progress@1.1.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rnoaa/package.py b/var/spack/repos/builtin/packages/r-rnoaa/package.py
index 5e059a6b53..b8551eab7c 100644
--- a/var/spack/repos/builtin/packages/r-rnoaa/package.py
+++ b/var/spack/repos/builtin/packages/r-rnoaa/package.py
@@ -22,6 +22,7 @@ class RRnoaa(RPackage):
license("MIT")
+ version("1.4.0", sha256="a1869303b3fc14d9b3674451c0ce9331ddc26110b7474fe419ac37f7ffb63097")
version("1.3.8", sha256="57974b48162637e98888f041d6f0e580d3c60bd5008af2d2bc659491f0deb98a")
version("1.3.0", sha256="4c421ad6e4c2b25e4dea5351c338aed70bea6e382562412d1dad825a50b0d161")
version("0.8.4", sha256="fb9ae771111dd5f638c1eff3290abad2ff9cc7e68a6678bf2414433ebed2dbbf")
diff --git a/var/spack/repos/builtin/packages/r-robust/package.py b/var/spack/repos/builtin/packages/r-robust/package.py
index a5bf5c16e1..37ad526b3d 100644
--- a/var/spack/repos/builtin/packages/r-robust/package.py
+++ b/var/spack/repos/builtin/packages/r-robust/package.py
@@ -17,6 +17,7 @@ class RRobust(RPackage):
license("GPL-3.0-or-later")
+ version("0.7-5", sha256="a3c02a9c9101b966907cb52b3193c4ef51864928ad99c3351edf5390532c1acc")
version("0.7-1", sha256="efaac70c6399b2787938e23ea89039b4a6043e76601bd794ba0ddda1edee65df")
version("0.7-0", sha256="5e1aac30e185e416c22445663704f39433af9fdb48452185f2c9beb3528084b9")
version("0.6-1", sha256="496fd225f6bc6f734e338308f18475125aaf691b39e25308bddb284d3106117d")
diff --git a/var/spack/repos/builtin/packages/r-robustbase/package.py b/var/spack/repos/builtin/packages/r-robustbase/package.py
index a05863c095..37db5ba90f 100644
--- a/var/spack/repos/builtin/packages/r-robustbase/package.py
+++ b/var/spack/repos/builtin/packages/r-robustbase/package.py
@@ -19,6 +19,7 @@ class RRobustbase(RPackage):
license("GPL-2.0-or-later")
+ version("0.99-4", sha256="a978d04fcd4bee7a4ebfa9f05e9abb4a1ca4d970867229a90698bed2fbf40cbc")
version("0.95-1", sha256="862cd26db3ecdf34ab47c52d355fd65ffebbff448aea17999a9b95a1f13ba3ea")
version("0.95-0", sha256="5cfaea1c46df6d45086614fea5f152c8da8ebfcadf33bb8df5b82e742eef9724")
version("0.93-9", sha256="d75fb5075463fec61d063bced7003936e9198492328b6fae15f67e8415713c45")
diff --git a/var/spack/repos/builtin/packages/r-roc/package.py b/var/spack/repos/builtin/packages/r-roc/package.py
index 35d02e07bd..a56f672ff2 100644
--- a/var/spack/repos/builtin/packages/r-roc/package.py
+++ b/var/spack/repos/builtin/packages/r-roc/package.py
@@ -20,5 +20,7 @@ class RRoc(RPackage):
version("1.66.0", commit="62701ee41f48f99d15344127384fa032db69486f")
version("1.62.0", commit="60250fdb091f6a938709b8a2cffe6442ee22a9a2")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@1.9.0:", type=("build", "run"))
depends_on("r-knitr", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rodbc/package.py b/var/spack/repos/builtin/packages/r-rodbc/package.py
index e16a948741..d0fdeba36c 100644
--- a/var/spack/repos/builtin/packages/r-rodbc/package.py
+++ b/var/spack/repos/builtin/packages/r-rodbc/package.py
@@ -15,6 +15,7 @@ class RRodbc(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-23", sha256="15cdd15ac0afb3294420c7593b04a5e4e31df175418b22a8ec075bf5855e0f3b")
version("1.3-20", sha256="7f157bd1ca2502bea4247260aac5b0f3aa1026ddffe5c50b026f2d59c210fbd6")
version("1.3-19", sha256="3afcbd6877cd8b7c8df4a94bacd041a51e5ac607810acb88efd380b45d2d4efe")
version("1.3-17", sha256="469fc835f65c344d5c3eaa097ff278ee8e9f12f845722a9aad340115faa704f7")
diff --git a/var/spack/repos/builtin/packages/r-rook/package.py b/var/spack/repos/builtin/packages/r-rook/package.py
index a7ccc3e094..4abc733ae3 100644
--- a/var/spack/repos/builtin/packages/r-rook/package.py
+++ b/var/spack/repos/builtin/packages/r-rook/package.py
@@ -18,5 +18,7 @@ class RRook(RPackage):
version("1.2", sha256="c79ae4b5164daffd4e7cf74bd23c1b08a3948bf343dfe9570d57f39cbf8e5f62")
version("1.1-1", sha256="00f4ecfa4c5c57018acbb749080c07154549a6ecaa8d4130dd9de79427504903")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.13.0:", type=("build", "run"))
depends_on("r-brew", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rots/package.py b/var/spack/repos/builtin/packages/r-rots/package.py
index d85b123da8..0aef400083 100644
--- a/var/spack/repos/builtin/packages/r-rots/package.py
+++ b/var/spack/repos/builtin/packages/r-rots/package.py
@@ -25,6 +25,8 @@ class RRots(RPackage):
version("1.6.0", commit="3567ac1142ba97770b701ee8e5f9e3e6c781bd56")
version("1.4.0", commit="2e656514a4bf5a837ee6e14ce9b28a61dab955e7")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-roxygen2/package.py b/var/spack/repos/builtin/packages/r-roxygen2/package.py
index 60df397a81..97e60dac2d 100644
--- a/var/spack/repos/builtin/packages/r-roxygen2/package.py
+++ b/var/spack/repos/builtin/packages/r-roxygen2/package.py
@@ -18,6 +18,7 @@ class RRoxygen2(RPackage):
license("MIT")
+ version("7.3.2", sha256="b788879f9132b7e2e656f442a6c592314676a9bf32d6a0a56e156cfa1ada011c")
version("7.2.3", sha256="d844fab977d2575ab942fa1309ac7ff67f35f099a75d8b41c79efe6ea10416da")
version("7.2.1", sha256="d2f0342591dc2b561fad8f6cf6fb3001e5e0bdd02be68bb2c6315f6bb82cda21")
version("7.2.0", sha256="2ebfcfd567b9db6c606c6d42be1645b4e987f987995a2ad8954fa963a519448b")
@@ -31,6 +32,7 @@ class RRoxygen2(RPackage):
depends_on("r@3.1:", type=("build", "run"), when="@6.1.0:")
depends_on("r@3.2:", type=("build", "run"), when="@7.1.0:")
depends_on("r@3.3:", type=("build", "run"), when="@7.1.2:")
+ depends_on("r@3.6:", type=("build", "run"), when="@7.3.0:")
depends_on("r-brew", type=("build", "run"))
depends_on("r-cli@3.3.0:", type=("build", "run"), when="@7.2.0:")
depends_on("r-commonmark", type=("build", "run"))
@@ -39,6 +41,7 @@ class RRoxygen2(RPackage):
depends_on("r-pkgload@1.0.2:", type=("build", "run"))
depends_on("r-purrr", type=("build", "run"))
depends_on("r-purrr@0.3.3:", type=("build", "run"), when="@7.1.0:")
+ depends_on("r-purrr@1.0.0:", type=("build", "run"), when="@7.3.0:")
depends_on("r-r6@2.1.2:", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"), when="@7.1.0:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@7.2.0:")
diff --git a/var/spack/repos/builtin/packages/r-rpart-plot/package.py b/var/spack/repos/builtin/packages/r-rpart-plot/package.py
index 7ed71d89b9..3a8b649d9b 100644
--- a/var/spack/repos/builtin/packages/r-rpart-plot/package.py
+++ b/var/spack/repos/builtin/packages/r-rpart-plot/package.py
@@ -14,6 +14,7 @@ class RRpartPlot(RPackage):
cran = "rpart.plot"
+ version("3.1.2", sha256="3dca2a5d1a8e5eb5129fd6efce9c5f6b2fa241bfb65f2a8823a8db89f4b422b2")
version("3.1.1", sha256="30736240058df21a96d10912a091d938f821d521a3bc4efb9aa4ef6fb233024d")
version("3.1.0", sha256="2aaba0c0cabbc17aca9085248b0ad74ee7ff2b8f729e020e84b3917de174c15e")
version("3.0.9", sha256="1150f5e9899b3b31b17160617cd99c3ad340c8361aeb229264a7a3a3a28015a4")
diff --git a/var/spack/repos/builtin/packages/r-rpart/package.py b/var/spack/repos/builtin/packages/r-rpart/package.py
index 24fd3ebd14..36bd41d99c 100644
--- a/var/spack/repos/builtin/packages/r-rpart/package.py
+++ b/var/spack/repos/builtin/packages/r-rpart/package.py
@@ -17,6 +17,7 @@ class RRpart(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("4.1.23", sha256="f9b89aed6aa6cea656a2dcb271574e969ce2b1c98beb07bd91e17339f6daabaf")
version("4.1.19", sha256="fe723ed0b5583fae8b40e6fecc29b357229cb11f2339b02a4e4f812926249565")
version("4.1.16", sha256="27ec75258a5a3459ad999f5f36760ead974930744249605bf8465f234f31425c")
version("4.1-15", sha256="2b8ebe0e9e11592debff893f93f5a44a6765abd0bd956b0eb1f70e9394cfae5c")
diff --git a/var/spack/repos/builtin/packages/r-rpostgres/package.py b/var/spack/repos/builtin/packages/r-rpostgres/package.py
index 0e829406e5..c7adf3b7e1 100644
--- a/var/spack/repos/builtin/packages/r-rpostgres/package.py
+++ b/var/spack/repos/builtin/packages/r-rpostgres/package.py
@@ -14,6 +14,7 @@ class RRpostgres(RPackage):
cran = "RPostgres"
+ version("1.4.7", sha256="3dd1f1d83bd8a25a0a86532c6971072fccea7b1769f601ad9daa8c9aa8f66924")
version("1.4.5", sha256="70ff848cba51ddad4642a20e01cda1033e6f218b015a13380c30604bbd18c797")
version("1.4.4", sha256="c9cc0648c432f837fd0eb4922db4903357244d5a2cedd04ea236f249b08acdfc")
version("1.4.3", sha256="a5be494a54b6e989fadafdc6ee2dc5c4c15bb17bacea9ad540b175c693331be2")
@@ -22,14 +23,16 @@ class RRpostgres(RPackage):
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("r-bit64", type=("build", "run"))
depends_on("r-blob@1.2.0:", type=("build", "run"))
+ depends_on("r-cpp11", type=("build", "run"), when="@1.4.6:")
depends_on("r-dbi@1.1.0:", type=("build", "run"))
+ depends_on("r-dbi@1.2.0:", type=("build", "run"), when="@1.4.7:")
depends_on("r-hms@0.5.0:", type=("build", "run"))
depends_on("r-hms@1.0.0:", type=("build", "run"), when="@1.4.3:")
depends_on("r-lubridate", type=("build", "run"))
- depends_on("r-rcpp@0.11.4.2:", type=("build", "run"))
- depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@1.4.3:")
depends_on("r-withr", type=("build", "run"))
depends_on("r-plogr@0.2.0:", type=("build", "run"))
depends_on("postgresql@9.0:")
+ depends_on("r-rcpp@0.11.4.2:", type=("build", "run"), when="@:1.4.5")
+ depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@1.4.3:1.4.5")
depends_on("r-bh", type=("build", "run"), when="@:1.3.1")
diff --git a/var/spack/repos/builtin/packages/r-rpostgresql/package.py b/var/spack/repos/builtin/packages/r-rpostgresql/package.py
index 74715c6c5d..74cd1832a1 100644
--- a/var/spack/repos/builtin/packages/r-rpostgresql/package.py
+++ b/var/spack/repos/builtin/packages/r-rpostgresql/package.py
@@ -23,6 +23,7 @@ class RRpostgresql(RPackage):
license("PostgreSQL")
+ version("0.7-6", sha256="385939708b6a3657663409f91e165ded0ff5268d1dc6225e0f9b34764baf2d2c")
version("0.7-5", sha256="6b5401ee55bd948ae7bc84520d789ceb422533a7d5e5bd6e10e3b54447f29fa1")
version("0.7-4", sha256="b6adf60094f2b03dff1959147cde7f61c2f4c4576d77b2a263c63f8e3cd556c6")
version("0.7-3", sha256="bdbca10329aeb357f05364772964716dfb5ce2470f7eb4a33770862b6ded71b9")
diff --git a/var/spack/repos/builtin/packages/r-rprojroot/package.py b/var/spack/repos/builtin/packages/r-rprojroot/package.py
index 0d6bea6d61..3d081b81fc 100644
--- a/var/spack/repos/builtin/packages/r-rprojroot/package.py
+++ b/var/spack/repos/builtin/packages/r-rprojroot/package.py
@@ -17,6 +17,7 @@ class RRprojroot(RPackage):
license("MIT")
+ version("2.0.4", sha256="b5f463fb25a24dac7a4ca916be57dbe22b5262e1f41e53871ca83e57d4336e99")
version("2.0.3", sha256="50604247470e910cecfe9b76df754bf96a0d701f81b732f7aa9c90a20d30f897")
version("2.0.2", sha256="5fa161f0d4ac3b7a99dc6aa2d832251001dc92e93c828593a51fe90afd019e1f")
version("1.3-2", sha256="df5665834941d8b0e377a8810a04f98552201678300f168de5f58a587b73238b")
diff --git a/var/spack/repos/builtin/packages/r-rrblup/package.py b/var/spack/repos/builtin/packages/r-rrblup/package.py
index 85db94fb3e..0759a2f0a3 100644
--- a/var/spack/repos/builtin/packages/r-rrblup/package.py
+++ b/var/spack/repos/builtin/packages/r-rrblup/package.py
@@ -17,6 +17,7 @@ class RRrblup(RPackage):
cran = "rrBLUP"
+ version("4.6.3", sha256="cd2a257ecb8252f352fd09189b538db62e4de4a51091cf392c18966c3f0c80cd")
version("4.6.2", sha256="860f5e3f889593b6737f386743a2679322ec7d3557bea8e25482fd6cb745adff")
version("4.6.1", sha256="e9230e74cc430a83ac5567071cb1c7f00b35c368f7d79bcc1cfde7225446c4db")
version("4.6", sha256="28b475a1466fcdc1780caace75cf34155338fda496cebd5799315598a4bc84af")
diff --git a/var/spack/repos/builtin/packages/r-rrcov/package.py b/var/spack/repos/builtin/packages/r-rrcov/package.py
index a0822cb4e6..71895d0cf2 100644
--- a/var/spack/repos/builtin/packages/r-rrcov/package.py
+++ b/var/spack/repos/builtin/packages/r-rrcov/package.py
@@ -23,6 +23,7 @@ class RRrcov(RPackage):
license("GPL-3.0-or-later")
+ version("1.7-6", sha256="b8a2c07c42e4e76e9f90cb016cb72a40f6d2ce1f10d1753c06e3344f38e148de")
version("1.7-2", sha256="0f01ed07cbc9e55dfcba27040a3f72237fb2fb86eda899472c2f96500220ecae")
version("1.7-1", sha256="e115a09997b46c7eed33017f748632c7d50a95ad621f1f452f22dfc714c9a4e5")
version("1.7-0", sha256="cbcca84a82d63fa50556aa8db29312b9bb588a638eb306ce4a81c271529228fd")
diff --git a/var/spack/repos/builtin/packages/r-rrpp/package.py b/var/spack/repos/builtin/packages/r-rrpp/package.py
index b9de4ebda6..a0e839f3c5 100644
--- a/var/spack/repos/builtin/packages/r-rrpp/package.py
+++ b/var/spack/repos/builtin/packages/r-rrpp/package.py
@@ -25,6 +25,7 @@ class RRrpp(RPackage):
cran = "RRPP"
+ version("2.0.3", sha256="ff70976d4656c39bb02d842668c4d283bc2a26294d3aa2c6590f86a87fd8a2b5")
version("1.3.1", sha256="50c7d4b20fb84088b0440c2f55ed146bcb35b0d9dda8581dca28e30b2fecbcd5")
version("1.2.3", sha256="6eee638af94d69d4dd471a5e01243622dedef3c0c95b3363e21e8e11f0ea564c")
version("1.1.2", sha256="2b563f3db9e349abe481444f48a1a3e6bc1154de8259b7a7060ab588287e80c0")
@@ -34,6 +35,7 @@ class RRrpp(RPackage):
version("0.3.0", sha256="34fea6ce7a78e4f38398d3b99585bab11a8171bc8b9a4e461b6d984ed1373739")
depends_on("r@3.5.0:", type=("build", "run"), when="@0.6.2:")
+ depends_on("r@4.4.0:", type=("build", "run"), when="@2.0.3:")
depends_on("r-ape", type=("build", "run"), when="@0.6.2:")
depends_on("r-ggplot2", type=("build", "run"), when="@1.1.2:")
depends_on("r-matrix", type=("build", "run"), when="@1.1.2:")
diff --git a/var/spack/repos/builtin/packages/r-rsamtools/package.py b/var/spack/repos/builtin/packages/r-rsamtools/package.py
index 60489b9002..c831f78788 100644
--- a/var/spack/repos/builtin/packages/r-rsamtools/package.py
+++ b/var/spack/repos/builtin/packages/r-rsamtools/package.py
@@ -31,6 +31,9 @@ class RRsamtools(RPackage):
version("1.30.0", commit="61b365fe3762e796b3808cec7238944b7f68d7a6")
version("1.28.0", commit="dfa5b6abef68175586f21add7927174786412472")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.5.0:", type=("build", "run"), when="@2.10.0:")
depends_on("r-genomeinfodb@1.1.3:", type=("build", "run"))
depends_on("r-genomicranges@1.21.6:", type=("build", "run"))
@@ -55,3 +58,8 @@ class RRsamtools(RPackage):
# this is not a listed dependency but is needed
depends_on("curl")
+ depends_on("zlib-api")
+
+ def patch(self):
+ with working_dir("src"):
+ filter_file(r"(^PKG_LIBS=)(\$\(RHTSLIB_LIBS\))", "\\1\\2 -lz", "Makevars")
diff --git a/var/spack/repos/builtin/packages/r-rsconnect/package.py b/var/spack/repos/builtin/packages/r-rsconnect/package.py
index 2e5b56d586..bb7db9df32 100644
--- a/var/spack/repos/builtin/packages/r-rsconnect/package.py
+++ b/var/spack/repos/builtin/packages/r-rsconnect/package.py
@@ -17,6 +17,7 @@ class RRsconnect(RPackage):
license("GPL-2.0-only")
+ version("1.3.1", sha256="47de8a832da493e2a1b3243fb42459a53eb193f75a1143348b7d8c7478cb5557")
version("0.8.29", sha256="852899d2aaf90bcedf4d191a9e00c770e8ee4233235169fc97e6aa636de01c43")
version("0.8.28", sha256="25b9a947772ada9593da5c48297b7a7dd0e11aa73fbb9a282631c75ec49616e0")
version("0.8.27", sha256="0a44d5605fc7cd6855ea0235d662e4a323a24a2c214cc4f1696afbca3a8f169c")
@@ -25,13 +26,19 @@ class RRsconnect(RPackage):
version("0.8.17", sha256="64767a4d626395b7871375956a9f0455c3d64ff6e779633b0e554921d85da231")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-curl", type=("build", "run"))
+ depends_on("r-cli", type=("build", "run"), when="@1.0.0:")
depends_on("r-digest", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.0.0:")
depends_on("r-openssl", type=("build", "run"))
depends_on("r-openssl@2.0.0:", type=("build", "run"), when="@0.8.26:")
depends_on("r-packrat@0.6:", type=("build", "run"), when="@0.8.18:")
depends_on("r-packrat@0.5:", type=("build", "run"))
depends_on("r-packrat@0.6:", type=("build", "run"), when="@0.8.26:")
+ depends_on("r-pki", type=("build", "run"), when="@1.2.2:")
+ depends_on("r-renv@1.0.0:", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.0.0:")
depends_on("r-rstudioapi@0.5:", type=("build", "run"))
depends_on("r-yaml@2.1.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rsnns/package.py b/var/spack/repos/builtin/packages/r-rsnns/package.py
index 75c5dd094b..a0323c1d76 100644
--- a/var/spack/repos/builtin/packages/r-rsnns/package.py
+++ b/var/spack/repos/builtin/packages/r-rsnns/package.py
@@ -20,6 +20,7 @@ class RRsnns(RPackage):
cran = "RSNNS"
+ version("0.4-17", sha256="424557d7326889e09e31e04d2a9b7224bed0bb4aa6f9e5433d7ce4fe04a35afc")
version("0.4-15", sha256="4a4286444f50b28fb6294b8b49250fa6c43c8fddf2ee0550a3ae59a4212ec1b3")
version("0.4-14", sha256="7f6262cb2b49b5d5979ccce9ded9cbb2c0b348fd7c9eabc1ea1d31c51a102c20")
version("0.4-12", sha256="b18dfeda71573bc92c6888af72da407651bff7571967965fd3008f0d331743b9")
diff --git a/var/spack/repos/builtin/packages/r-rspectra/package.py b/var/spack/repos/builtin/packages/r-rspectra/package.py
index 93fe03871a..68b56dff7d 100644
--- a/var/spack/repos/builtin/packages/r-rspectra/package.py
+++ b/var/spack/repos/builtin/packages/r-rspectra/package.py
@@ -22,10 +22,14 @@ class RRspectra(RPackage):
cran = "RSpectra"
+ version("0.16-2", sha256="a2f149d79519fee79dabe1b174dfb847a916045315d5927a93cc6b005522aa7e")
version("0.16-1", sha256="cba5d3403d6a7d0e27abf6279fbfea6e0d0fe36b28c688bbadb8eafb3841329a")
version("0.16-0", sha256="aaf1cfc9ffe3a4c6684247899924e1c18306971dfef4bae1dc596a2fb42a64a9")
version("0.15-0", sha256="1ad5698201007044a0420cb10b7c48e94312a8a1d22b9d946d5de1c6743969a9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.2:", type=("build", "run"))
depends_on("r-matrix@1.1-0:", type=("build", "run"))
depends_on("r-rcpp@0.11.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rsqlite/package.py b/var/spack/repos/builtin/packages/r-rsqlite/package.py
index f81bdf06ac..2fe5dcc456 100644
--- a/var/spack/repos/builtin/packages/r-rsqlite/package.py
+++ b/var/spack/repos/builtin/packages/r-rsqlite/package.py
@@ -15,6 +15,7 @@ class RRsqlite(RPackage):
cran = "RSQLite"
+ version("2.3.7", sha256="25e0572589e64264fe4e5d0495f5d85d977bacbb93a3fc631ede5b078db294ce")
version("2.3.1", sha256="9ed23e160c401c14e41c40e9930f72697172b2c72933c2d2725a05e81e1f34ca")
version("2.2.18", sha256="62196adb62ad8ec73ddce573e5391686e9359566e365b123ac4f299809944bea")
version("2.2.14", sha256="2ae36a875ebc02497985b2ad9ddc6a5434f576e2ab25769580749d9e4f3b607c")
@@ -30,6 +31,8 @@ class RRsqlite(RPackage):
depends_on("r-blob@1.2.0:", type=("build", "run"))
depends_on("r-dbi@1.0.0:", type=("build", "run"))
depends_on("r-dbi@1.1.0:", type=("build", "run"), when="@2.2.10:")
+ depends_on("r-dbi@1.2.0:", type=("build", "run"), when="@2.3.5:")
+ depends_on("r-rlang", type=("build", "run"), when="@2.3.4:")
depends_on("r-memoise", type=("build", "run"))
depends_on("r-pkgconfig", type=("build", "run"))
depends_on("r-plogr@0.2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rstan/package.py b/var/spack/repos/builtin/packages/r-rstan/package.py
index 00da44c08d..713ff0a225 100644
--- a/var/spack/repos/builtin/packages/r-rstan/package.py
+++ b/var/spack/repos/builtin/packages/r-rstan/package.py
@@ -23,6 +23,7 @@ class RRstan(RPackage):
license("GPL-3.0-or-later")
+ version("2.32.6", sha256="3390d00191bbd3b0739dd19fe437b99a041a6b04be208877b48419d1348a1a70")
version("2.21.8", sha256="b2d4edc315419037970c9fa2e8740b934966d88d40548152811f3d4a28475075")
version("2.21.7", sha256="4495221310d390925b665c32e05ffabd3ae8857225bda65131a7ed2be41d6d45")
version("2.21.5", sha256="86e4fe562d8ddcd0b02336f35a420fa8786dd21de7ca2bebb4ed6e9c252bb9ea")
@@ -38,18 +39,29 @@ class RRstan(RPackage):
depends_on("r@3.4.0:", type=("build", "run"), when="@2.18.1:")
depends_on("r-stanheaders@2.18.1:", type=("build", "run"))
depends_on("r-stanheaders@2.21.0:", type=("build", "run"), when="@2.21.2:")
+ depends_on("r-stanheaders@2.32.0:", type=("build", "run"), when="@2.26.23:")
depends_on("r-ggplot2@2.0.0:", type=("build", "run"))
depends_on("r-ggplot2@3.0.0:", type=("build", "run"), when="@2.21.2:")
+ depends_on("r-ggplot2@3.3.5:", type=("build", "run"), when="@2.26.23:")
depends_on("r-inline", type=("build", "run"))
+ depends_on("r-inline@0.3.19:", type=("build", "run"), when="@2.26.23:")
depends_on("r-gridextra@2.0.0:", type=("build", "run"))
+ depends_on("r-gridextra@2.3:", type=("build", "run"), when="@2.26.23:")
depends_on("r-rcpp@0.12.0:", type=("build", "run"))
+ depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@2.26.23:")
depends_on("r-rcppparallel@5.0.1:", type=("build", "run"), when="@2.21.2:")
+ depends_on("r-rcppparallel@5.1.4:", type=("build", "run"), when="@2.26.23:")
depends_on("r-loo@2.0.0:", type=("build", "run"), when="@2.18:")
depends_on("r-loo@2.3.0:", type=("build", "run"), when="@2.21.2:")
+ depends_on("r-loo@2.4.1:", type=("build", "run"), when="@2.26.23:")
depends_on("r-pkgbuild", type=("build", "run"), when="@2.18:")
+ depends_on("r-pkgbuild@1.2.0:", type=("build", "run"), when="@2.26.23:")
+ depends_on("r-quickjsr", type=("build", "run"), when="@2.26.23:")
depends_on("r-rcppeigen@0.3.3.3.0:", type=("build", "run"))
+ depends_on("r-rcppeigen@0.3.4.0.0:", type=("build", "run"), when="@2.26.23:")
depends_on("r-bh@1.69.0:", type=("build", "run"))
depends_on("r-bh@1.72.0-2:", type=("build", "run"), when="@2.21.2:")
+ depends_on("r-bh@1.75.0-0:", type=("build", "run"), when="@2.26.23:")
depends_on("gmake", type="build")
depends_on("pandoc", type="build")
diff --git a/var/spack/repos/builtin/packages/r-rstantools/package.py b/var/spack/repos/builtin/packages/r-rstantools/package.py
index f2acce430c..ab14cf382e 100644
--- a/var/spack/repos/builtin/packages/r-rstantools/package.py
+++ b/var/spack/repos/builtin/packages/r-rstantools/package.py
@@ -19,6 +19,7 @@ class RRstantools(RPackage):
license("GPL-3.0-or-later")
+ version("2.4.0", sha256="bff72ca2f0352c6c5d2868823e286fdb73a6ead74508a4124cbcb222c83b4faa")
version("2.3.1", sha256="82d4f2e884ffc894463bd37765606d5a9bef2ee631758840ec58636acdca6975")
version("2.2.0", sha256="cb810baeb90c67668361b666c6862df9917aff6aaec63d2c3a485f28407c4eb7")
version("2.1.1", sha256="c95b15de8ec577eeb24bb5206e7b685d882f88b5e6902efda924b7217f463d2d")
diff --git a/var/spack/repos/builtin/packages/r-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
index f581b5dd5c..3f56a5135e 100644
--- a/var/spack/repos/builtin/packages/r-rstudioapi/package.py
+++ b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
@@ -16,6 +16,7 @@ class RRstudioapi(RPackage):
license("MIT")
+ version("0.16.0", sha256="74ffa867199e87a54386fbd26919233371f314f73d7338dd4e4695708fed4fe6")
version("0.14", sha256="469d0987b1ad728a96c363a422fba712a5cebc8b11a5f7e953b4a671044dafc4")
version("0.13", sha256="aac35bbdcb4a8e8caba943bc8a2b98120e8940b80cd1020224bb1a26ff776d8b")
version("0.11", sha256="13e07fb7e2eba8cf1d885db2721901d676d219a1042d7ef5d166125e4905306b")
diff --git a/var/spack/repos/builtin/packages/r-rsubread/package.py b/var/spack/repos/builtin/packages/r-rsubread/package.py
index 2b6ba1166d..6f867a3e01 100644
--- a/var/spack/repos/builtin/packages/r-rsubread/package.py
+++ b/var/spack/repos/builtin/packages/r-rsubread/package.py
@@ -14,6 +14,8 @@ class RRsubread(RPackage):
version("2.16.0", commit="62b92c9ed3fc2be89ed9f29e3db1809d1e115dbc")
version("2.14.2", commit="863bd98c6523b888da59335a6acb516d2676d412")
+ depends_on("c", type="build") # generated
+
depends_on("r", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-r-utils", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rtracklayer/package.py b/var/spack/repos/builtin/packages/r-rtracklayer/package.py
index 3acc58d1c7..7e2d1b4271 100644
--- a/var/spack/repos/builtin/packages/r-rtracklayer/package.py
+++ b/var/spack/repos/builtin/packages/r-rtracklayer/package.py
@@ -30,6 +30,8 @@ class RRtracklayer(RPackage):
version("1.38.3", commit="f20db703c09dc7e808c09e9b78c15aec9e546248")
version("1.36.6", commit="8c0ac7230f94e0c5a981acbb178c8de70e968131")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3:", type=("build", "run"))
depends_on("r-genomicranges@1.21.20:", type=("build", "run"))
depends_on("r-genomicranges@1.37.2:", type=("build", "run"), when="@1.50.0:")
diff --git a/var/spack/repos/builtin/packages/r-rtsne/package.py b/var/spack/repos/builtin/packages/r-rtsne/package.py
index 3949660dff..48d9e44a32 100644
--- a/var/spack/repos/builtin/packages/r-rtsne/package.py
+++ b/var/spack/repos/builtin/packages/r-rtsne/package.py
@@ -15,6 +15,7 @@ class RRtsne(RPackage):
cran = "Rtsne"
+ version("0.17", sha256="3aae6814d6c6d406785145f07374135652f2b26a58690dfd4bfbc8365dc5590b")
version("0.16", sha256="52a05adc826c28212e97d11c54eba3fec45d14eb52039c0f47f62a8e338ffbd5")
version("0.15", sha256="56376e4f0a382fad3d3d40e2cb0562224be5265b827622bcd235e8fc63df276c")
version("0.13", sha256="1c3bffe3bd11733ee4fe01749c293669daafda1af2ec74f9158f6080625b999d")
diff --git a/var/spack/repos/builtin/packages/r-runit/package.py b/var/spack/repos/builtin/packages/r-runit/package.py
index 9c88a53ce5..8de30e09b9 100644
--- a/var/spack/repos/builtin/packages/r-runit/package.py
+++ b/var/spack/repos/builtin/packages/r-runit/package.py
@@ -16,6 +16,7 @@ class RRunit(RPackage):
license("GPL-2.0-only")
+ version("0.4.33", sha256="b2a4c5afc7ef9534dac5006f6ef1b2af68630bb73eb74ef70ec7ed53dae6cb5f")
version("0.4.32", sha256="23a393059989000734898685d0d5509ece219879713eb09083f7707f167f81f1")
depends_on("r@2.5.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-runjags/package.py b/var/spack/repos/builtin/packages/r-runjags/package.py
index c9343dbf9f..0bb9196c2a 100644
--- a/var/spack/repos/builtin/packages/r-runjags/package.py
+++ b/var/spack/repos/builtin/packages/r-runjags/package.py
@@ -24,6 +24,7 @@ class RRunjags(RPackage):
license("GPL-2.0-only")
+ version("2.2.2-4", sha256="6f656e4d0620c0806e596ddb4bfec3934534ec17c02da699fcbfd6720a6f424f")
version("2.2.1-7", sha256="e81fdb15e59cdceda125d6ae7cf0cde93361ba80b123d51afd1ecdc993f25016")
version("2.2.0-3", sha256="1b1fc0b0cfecf9ecdecc3abcba804cdc114b3c5352d5cc801602deeca90db528")
version("2.2.0-2", sha256="e5dfeb83d36faf19ebe64429f6db64aedecf3c9a040fd5bf9c0200914bf5039a")
diff --git a/var/spack/repos/builtin/packages/r-ruv/package.py b/var/spack/repos/builtin/packages/r-ruv/package.py
index 8abccd4aae..fc18dfdc1c 100644
--- a/var/spack/repos/builtin/packages/r-ruv/package.py
+++ b/var/spack/repos/builtin/packages/r-ruv/package.py
@@ -28,6 +28,8 @@ class RRuv(RPackage):
version("0.9.7.1", sha256="a0c54e56ba3d8f6ae178ae4d0e417a79295abf5dcb68bbae26c4b874734d98d8")
+ depends_on("c", type="build") # generated
+
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-scales", type=("build", "run"))
depends_on("r-gridextra", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-rvest/package.py b/var/spack/repos/builtin/packages/r-rvest/package.py
index 0e3cb2b544..a1104d8d0f 100644
--- a/var/spack/repos/builtin/packages/r-rvest/package.py
+++ b/var/spack/repos/builtin/packages/r-rvest/package.py
@@ -16,6 +16,7 @@ class RRvest(RPackage):
license("MIT")
+ version("1.0.4", sha256="7d707c6b2994cf7b6c1d665bec872d2ef5c55f30e7c343c447a8a386a6049ca6")
version("1.0.3", sha256="a465ef7391afaa3c26eebe8c61db02314ac04c4d8de5aa53f090716763d21c1e")
version("1.0.2", sha256="89bb477e0944c80298a52ccf650db8f6377fd7ed3c1bc7034d000f695fdf05a4")
version("0.3.6", sha256="6a2ee3a25d2d738031edbc1b5e2410f2a4538dfbb9705af145f9039504b902fa")
@@ -26,15 +27,19 @@ class RRvest(RPackage):
depends_on("r@3.0.1:", type=("build", "run"))
depends_on("r@3.1:", type=("build", "run"), when="@0.3.3")
depends_on("r@3.2:", type=("build", "run"), when="@0.3.4:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.0.4:")
depends_on("r-cli", type=("build", "run"), when="@1.0.3:")
depends_on("r-glue", type=("build", "run"), when="@1.0.3:")
depends_on("r-httr@0.5:", type=("build", "run"))
depends_on("r-lifecycle@1.0.0:", type=("build", "run"), when="@1:")
+ depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@1.0.4:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@1:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.0.3:")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.0.4:")
depends_on("r-selectr", type=("build", "run"))
depends_on("r-tibble", type=("build", "run"), when="@1:")
depends_on("r-xml2", type=("build", "run"))
depends_on("r-xml2@1.3:", type=("build", "run"), when="@1:")
- depends_on("r-withr", type=("build", "run"), when="@1.0.3:")
+
+ depends_on("r-withr", type=("build", "run"), when="@1.0.3")
diff --git a/var/spack/repos/builtin/packages/r-rviennacl/package.py b/var/spack/repos/builtin/packages/r-rviennacl/package.py
index 78f4f5e32c..c12caca3bd 100644
--- a/var/spack/repos/builtin/packages/r-rviennacl/package.py
+++ b/var/spack/repos/builtin/packages/r-rviennacl/package.py
@@ -20,3 +20,5 @@ class RRviennacl(RPackage):
cran = "RViennaCL"
version("1.7.1.8", sha256="adcc74537337582153d5b11d281e391e91a7f3afae116aa1b9a034ffd11b0252")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-rzmq/package.py b/var/spack/repos/builtin/packages/r-rzmq/package.py
index 4d32899d5d..5fc9d735d7 100644
--- a/var/spack/repos/builtin/packages/r-rzmq/package.py
+++ b/var/spack/repos/builtin/packages/r-rzmq/package.py
@@ -17,6 +17,7 @@ class RRzmq(RPackage):
license("GPL-3.0-only")
+ version("0.9.13", sha256="8d603543b23a0b78352b4995c90c03d00686fef1d7a25004b66690191fb463f1")
version("0.9.8", sha256="815a7eb502b1da3a84246b2dfb6594ca3f241a8675783e6bcdbbf9c952ec1c53")
version("0.9.7", sha256="5f47b67b75fd4a230780406f7a55a3708ce8c014cff755a809a6bfa1a6925a45")
version("0.9.6", sha256="80a3fc6eb6f7851224c4cd5e219ca4db0286551ad429359d4df853ccb9234316")
diff --git a/var/spack/repos/builtin/packages/r-s2/package.py b/var/spack/repos/builtin/packages/r-s2/package.py
index bf4d851e08..5555d6062d 100644
--- a/var/spack/repos/builtin/packages/r-s2/package.py
+++ b/var/spack/repos/builtin/packages/r-s2/package.py
@@ -20,6 +20,7 @@ class RS2(RPackage):
license("Apache-2.0")
+ version("1.1.7", sha256="30762c7150dd72e2f4a3d50e64b8b73b2d59b73275687ba3eea7a6e07f786878")
version("1.1.2", sha256="8fb237531c6f4aa5b78fbe36d4fd15bfe852c1308fed58b04b3dae2bb73c0b57")
version("1.1.0", sha256="e3aae968538fe80db5b3325474dd9d8ff7f0452b6c606d049a3cac72732ac416")
version("1.0.7", sha256="2010c1c6ae29938ec9cd153a8b2c06a333ea4d647932369b2fc7d0c68d6d9e3f")
diff --git a/var/spack/repos/builtin/packages/r-s4vectors/package.py b/var/spack/repos/builtin/packages/r-s4vectors/package.py
index 1527b55ca7..7a87606195 100644
--- a/var/spack/repos/builtin/packages/r-s4vectors/package.py
+++ b/var/spack/repos/builtin/packages/r-s4vectors/package.py
@@ -32,6 +32,8 @@ class RS4vectors(RPackage):
version("0.16.0", commit="00fec03fcbcb7cff37917fab0da28d91fdf9dc3d")
version("0.14.7", commit="40af17fe0b8e93b6a72fc787540d2961773b8e23")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@0.28.1:")
depends_on("r-biocgenerics@0.21.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-samr/package.py b/var/spack/repos/builtin/packages/r-samr/package.py
index fe5d05918a..fbbcf2b6c4 100644
--- a/var/spack/repos/builtin/packages/r-samr/package.py
+++ b/var/spack/repos/builtin/packages/r-samr/package.py
@@ -19,6 +19,9 @@ class RSamr(RPackage):
version("3.0", sha256="25f88ac002c2adce8881a562241bc12d683810a05defb553e8e3d4878f037506")
version("2.0", sha256="090b5becd91d60f4bb8269df5c9bc19a03c09917d327b28e75b0ee7b80624e67")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r-impute", type=("build", "run"))
depends_on("r-matrixstats", type=("build", "run"))
depends_on("r-shiny", type=("build", "run"), when="@3.0:")
diff --git a/var/spack/repos/builtin/packages/r-sandwich/package.py b/var/spack/repos/builtin/packages/r-sandwich/package.py
index 808fae8fb7..a4729a707d 100644
--- a/var/spack/repos/builtin/packages/r-sandwich/package.py
+++ b/var/spack/repos/builtin/packages/r-sandwich/package.py
@@ -27,6 +27,7 @@ class RSandwich(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("3.1-0", sha256="96b0e105ee50391a1fd286e9556ba6669f08565fa30788b1a21bc861b0a023fa")
version("3.0-2", sha256="6e30b6b554eb19430a60c45a8132fb7918ddb0013577bf6a62caeb163bdfe2b4")
version("3.0-1", sha256="f6584b7084f3223bbc0c4722f53280496be73849747819b0cb4e8f3910284a89")
version("3.0-0", sha256="828fe53b5e09db5015efd529b2db4dcd40251bce110fea7b0b219fa9ac36d529")
diff --git a/var/spack/repos/builtin/packages/r-sass/package.py b/var/spack/repos/builtin/packages/r-sass/package.py
index 4ac8e74774..e6a3fbd547 100644
--- a/var/spack/repos/builtin/packages/r-sass/package.py
+++ b/var/spack/repos/builtin/packages/r-sass/package.py
@@ -18,12 +18,14 @@ class RSass(RPackage):
license("MIT")
+ version("0.4.9", sha256="e133049aad7964e0f6150257e1470b3748f36029322265ee797b8caf7517d4d2")
version("0.4.5", sha256="eba161d982d2db108c8c0b61ec6b41a20d3adec430c7cc39537ab388c1007a90")
version("0.4.2", sha256="b409049d0de9fae853f46c19d353226c8e9244ce847bdada033d8669fc2c9646")
version("0.4.1", sha256="850fcb6bd49085d5afd25ac18da0744234385baf1f13d8c0a320f4da2de608bb")
version("0.4.0", sha256="7d06ca15239142a49e88bb3be494515abdd8c75f00f3f1b0ee7bccb55019bc2b")
depends_on("r-fs", type=("build", "run"))
+ depends_on("r-fs@1.2.4:", type=("build", "run"), when="@0.4.7:")
depends_on("r-rlang@0.4.10:", type=("build", "run"))
depends_on("r-htmltools@0.5.1:", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-satellite/package.py b/var/spack/repos/builtin/packages/r-satellite/package.py
index c5bb5a77ba..e3ece86c2a 100644
--- a/var/spack/repos/builtin/packages/r-satellite/package.py
+++ b/var/spack/repos/builtin/packages/r-satellite/package.py
@@ -25,6 +25,7 @@ class RSatellite(RPackage):
license("MIT")
+ version("1.0.5", sha256="3e4c382f905eb0b2d84f03423af2960854e5cf94905a373c6ba3f41a2b72a1ad")
version("1.0.4", sha256="99e79577a70489930c32da46ac26453af53e21c2d3a99f51fbf1f55f2d80dc7c")
version("1.0.2", sha256="6447476bd31216e5abe504221e465677954d07419b4174ab4f4e4f7a197969c5")
diff --git a/var/spack/repos/builtin/packages/r-scales/package.py b/var/spack/repos/builtin/packages/r-scales/package.py
index d431c428f8..02ca38d3bb 100644
--- a/var/spack/repos/builtin/packages/r-scales/package.py
+++ b/var/spack/repos/builtin/packages/r-scales/package.py
@@ -16,6 +16,7 @@ class RScales(RPackage):
license("MIT")
+ version("1.3.0", sha256="b33e0f6b44259551ce02befd52eac53602509fbfdd903920620c658c50f35888")
version("1.2.1", sha256="59453e6dbdafee93dfb101e4d86048a62a12898134259d3ef02d65aeec57ed08")
version("1.2.0", sha256="185d50240e6b3e84d36ec7fbca6aef7a85db7c8c1b0dde51d4af28d363ce02df")
version("1.1.1", sha256="40b2b66522f1f314a20fd09426011b0cdc9d16b23ee2e765fe1930292dd03705")
@@ -27,7 +28,10 @@ class RScales(RPackage):
depends_on("r@2.13:", type=("build", "run"))
depends_on("r@3.1:", type=("build", "run"), when="@1.0.0:")
depends_on("r@3.2:", type=("build", "run"), when="@1.1.1:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.3.0:")
+ depends_on("r-cli", type=("build", "run"), when="@1.3.0:")
depends_on("r-farver@2.0.3:", type=("build", "run"), when="@1.1.1:")
+ depends_on("r-glue", type=("build", "run"), when="@1.3.0:")
depends_on("r-labeling", type=("build", "run"))
depends_on("r-lifecycle", type=("build", "run"), when="@1.1.1:")
depends_on("r-munsell@0.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-scattermore/package.py b/var/spack/repos/builtin/packages/r-scattermore/package.py
index 84f03f3dcf..10c0964bdd 100644
--- a/var/spack/repos/builtin/packages/r-scattermore/package.py
+++ b/var/spack/repos/builtin/packages/r-scattermore/package.py
@@ -16,6 +16,7 @@ class RScattermore(RPackage):
license("GPL-3.0-or-later")
+ version("1.2", sha256="5534a87b0bdd1375f0fbffc1a5c980ad64e33a108435a67469b8324b580602d1")
version("0.8", sha256="dbdd73d8261cb063464bb29d5c17733b7e87bc50a19948bc80439e19f2a9f8e5")
version("0.7", sha256="f36280197b8476314d6ce81a51c4ae737180b180204043d2937bc25bf3a5dfa2")
diff --git a/var/spack/repos/builtin/packages/r-scatterpie/package.py b/var/spack/repos/builtin/packages/r-scatterpie/package.py
index 6fdd0ba32c..106a5a1ece 100644
--- a/var/spack/repos/builtin/packages/r-scatterpie/package.py
+++ b/var/spack/repos/builtin/packages/r-scatterpie/package.py
@@ -15,12 +15,14 @@ class RScatterpie(RPackage):
license("Artistic-2.0")
+ version("0.2.3", sha256="704f1072ff934729aefdd659e5c81e62b59f5ae94dc36a1e1f52085dce896447")
version("0.1.9", sha256="517fd6cc297aa33f0fbb2643e35ca41dc971166ea2e8ed78460bd4ef7a77a687")
version("0.1.8", sha256="a6ccc63a8be63fa113704cf5d4893c1ec1b75d3081ab971bd70e650e708872a0")
version("0.1.7", sha256="3f7807519cfe135066ca79c8d8a09b59da9aa6d8aaee5e9aff40cca3d0bebade")
version("0.1.5", sha256="e13237b7effc302acafc1c9b520b4904e55875f4a3b804f653eed2940ca08840")
depends_on("r@3.4.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@0.2.0:")
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-ggforce", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-scatterplot3d/package.py b/var/spack/repos/builtin/packages/r-scatterplot3d/package.py
index f9f96803ee..a7de5b624c 100644
--- a/var/spack/repos/builtin/packages/r-scatterplot3d/package.py
+++ b/var/spack/repos/builtin/packages/r-scatterplot3d/package.py
@@ -15,6 +15,7 @@ class RScatterplot3d(RPackage):
license("GPL-2.0-only")
+ version("0.3-44", sha256="1c9c08348c3ed925f59df40cb73accc9e1a169ccfb1e8571f105f40fa98e6ec2")
version("0.3-43", sha256="90d7bfb535b76008768306ea9209adfb48e0e07f36eabbb59ab6ddb6522f16a5")
version("0.3-42", sha256="a9fedde70e1a846c4dcafbff20f115425206d507896d12c2b21ff052556c5216")
version("0.3-41", sha256="4c8326b70a3b2d37126ca806771d71e5e9fe1201cfbe5b0d5a0a83c3d2c75d94")
diff --git a/var/spack/repos/builtin/packages/r-scran/package.py b/var/spack/repos/builtin/packages/r-scran/package.py
index 494607b952..84ce4cb73b 100644
--- a/var/spack/repos/builtin/packages/r-scran/package.py
+++ b/var/spack/repos/builtin/packages/r-scran/package.py
@@ -22,6 +22,8 @@ class RScran(RPackage):
version("1.24.1", commit="1a83eb7c948b1dc49253080c23b26cefb3a0f3b9")
version("1.24.0", commit="c3f9e169c4538ce827d4f14a4141571c2366cd31")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-singlecellexperiment", type=("build", "run"))
depends_on("r-scuttle", type=("build", "run"))
depends_on("r-summarizedexperiment", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-scs/package.py b/var/spack/repos/builtin/packages/r-scs/package.py
index c6f31f98e0..3055748a61 100644
--- a/var/spack/repos/builtin/packages/r-scs/package.py
+++ b/var/spack/repos/builtin/packages/r-scs/package.py
@@ -25,5 +25,7 @@ class RScs(RPackage):
version("3.2.4", sha256="c3f39874bf4532fa8c2f2e2c41533ba4fe20b61cf6dfc6314407dc981621298f")
version("3.0-1", sha256="d6881eeec7282f8bfbf60847327786e7f90299e4b8c0b084d8bd11fec7705913")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("gmake", type="build")
diff --git a/var/spack/repos/builtin/packages/r-sctransform/package.py b/var/spack/repos/builtin/packages/r-sctransform/package.py
index 345c4d9a2a..5444c52fc8 100644
--- a/var/spack/repos/builtin/packages/r-sctransform/package.py
+++ b/var/spack/repos/builtin/packages/r-sctransform/package.py
@@ -20,6 +20,7 @@ class RSctransform(RPackage):
license("GPL-3.0-only OR custom")
+ version("0.4.1", sha256="5f6be7f8be543e4c32c8007207b603a750881459370b7bb5afd63e8c8fabf171")
version("0.3.5", sha256="c08e56df05d64ed04ee53eb9e1d4d321da8aff945e36d56db1d5ceb1cd7e6e0b")
version("0.3.3", sha256="83af125c40f211e1ddae5098f88766aea1453c02ae98486081f3efadb3620b2b")
version("0.3.2", sha256="5dbb0a045e514c19f51bbe11c2dba0b72dca1942d6eb044c36b0538b443475dc")
@@ -28,6 +29,7 @@ class RSctransform(RPackage):
depends_on("r@3.0.2:", type=("build", "run"))
depends_on("r@3.1.0:", type=("build", "run"), when="@0.3.2:")
depends_on("r@3.5.0:", type=("build", "run"), when="@0.3.3:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@0.4.0:")
depends_on("r-dplyr", type=("build", "run"), when="@0.3.3:")
depends_on("r-magrittr", type=("build", "run"), when="@0.3.3:")
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-scuttle/package.py b/var/spack/repos/builtin/packages/r-scuttle/package.py
index 42e8ac5e8f..48f4b0e58f 100644
--- a/var/spack/repos/builtin/packages/r-scuttle/package.py
+++ b/var/spack/repos/builtin/packages/r-scuttle/package.py
@@ -23,6 +23,8 @@ class RScuttle(RPackage):
version("1.4.0", commit="b335263dd56bb859b5dd3ea27ee00dffa0215313")
version("1.0.4", commit="a827e2759d80e6c3510e2f8fd4bd680274206d9f")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-singlecellexperiment", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-segmented/package.py b/var/spack/repos/builtin/packages/r-segmented/package.py
index 71a2c7cf99..b546891122 100644
--- a/var/spack/repos/builtin/packages/r-segmented/package.py
+++ b/var/spack/repos/builtin/packages/r-segmented/package.py
@@ -22,6 +22,7 @@ class RSegmented(RPackage):
license("GPL-2.0-or-later")
+ version("2.1-1", sha256="6723b0114b1142a7587f712d7a58ce0bebfb53864b84fa1e5d9d7824b17903dd")
version("1.6-4", sha256="472c08ae3eb1c4e784aba45f3e745b0e946bef77c26fbb9f103fd35e1a349191")
version("1.6-1", sha256="f609ca311c8ca45a7b0776b47d9df06aa175c4f17f8e7e9b33c64902ee00d56f")
version("1.6-0", sha256="6baf7f0a4f5d37b945312d28fcbca47cc3c171d097c43a28cf7ffc998a4ce569")
@@ -33,5 +34,6 @@ class RSegmented(RPackage):
version("0.5-2.2", sha256="3aa7136370dd77911ba8e061b5215560d120bc71f355eeadc0856389dfecb2f1")
version("0.5-1.4", sha256="b1dc5f79ccc076c2943b15fe4f339368afa241797b7e80c91b62132cfa66809c")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@2.0-3:")
depends_on("r-mass", type=("build", "run"), when="@1.4-0:")
depends_on("r-nlme", type=("build", "run"), when="@1.6-0:")
diff --git a/var/spack/repos/builtin/packages/r-seqinr/package.py b/var/spack/repos/builtin/packages/r-seqinr/package.py
index dd12e8fa2a..7bf921e774 100644
--- a/var/spack/repos/builtin/packages/r-seqinr/package.py
+++ b/var/spack/repos/builtin/packages/r-seqinr/package.py
@@ -18,6 +18,7 @@ class RSeqinr(RPackage):
license("GPL-2.0-or-later")
+ version("4.2-36", sha256="931a62a091a7aaaa5efadb1fe85f29e861e2506b75710ba3a6be9b58cb14b225")
version("4.2-30", sha256="faf8fe533867eeef57fddfa6592e19d5984954d0670c6c7dbeab6411d55fee4b")
version("4.2-16", sha256="c4f3253832fc255197bdce7b4dd381db606c6b787d2e888751b4963acf3a4032")
version("4.2-8", sha256="584b34e9dec0320cef02096eb356a0f6115bbd24356cf62e67356963e9d5e9f7")
diff --git a/var/spack/repos/builtin/packages/r-servr/package.py b/var/spack/repos/builtin/packages/r-servr/package.py
index 9766f0b22b..cf8467a1a0 100644
--- a/var/spack/repos/builtin/packages/r-servr/package.py
+++ b/var/spack/repos/builtin/packages/r-servr/package.py
@@ -17,6 +17,7 @@ class RServr(RPackage):
license("GPL-2.0-or-later")
+ version("0.30", sha256="43f920161408871a042462b7c3353149a608941253541a19a9ce3408f9882d40")
version("0.26", sha256="7588d7e00d5b2f77b0737f164f3d7b0ba7b1e8b60c0372a1d6452096e2d2031c")
version("0.25", sha256="e6ae0d4c09e9037268b1c291c36c93ba0a74c31fe2fcb1f0652b2ae9fca5e73c")
version("0.24", sha256="d94e1d31802ce6bbab7a5838ff94cbca8cd998237d834ff25fedf7514f41a087")
@@ -26,4 +27,5 @@ class RServr(RPackage):
depends_on("r-mime@0.2:", type=("build", "run"))
depends_on("r-httpuv@1.5.2:", type=("build", "run"))
depends_on("r-xfun", type=("build", "run"))
+ depends_on("r-xfun@0.42:", type=("build", "run"), when="@0.29:")
depends_on("r-jsonlite", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sets/package.py b/var/spack/repos/builtin/packages/r-sets/package.py
index 308610786d..77484ffb92 100644
--- a/var/spack/repos/builtin/packages/r-sets/package.py
+++ b/var/spack/repos/builtin/packages/r-sets/package.py
@@ -19,6 +19,7 @@ class RSets(RPackage):
license("GPL-2.0-only")
+ version("1.0-25", sha256="5ca469218f9679f2372e33e56f781b52947ccbedf730b91a2d3a572993c024f4")
version("1.0-24", sha256="e75733f5c9418eb09fb950a4a94ccf84ddd88231c61ee80d02b7f0917debcac9")
version("1.0-23", sha256="e5b6bc52060421c572d7f2d99b25909a38eacabd5344a47e1cdb2662c62d690b")
version("1.0-22", sha256="6fbf9aa6b0113a58e04f803ab35593feabb0fb55d486d54afb59e027008f9ec6")
@@ -53,4 +54,4 @@ class RSets(RPackage):
version("0.1", sha256="18dda6c9d526a2f41f2b49a472fb27a7f1bb9ce6ea137b8963e8ad6c378825d0")
depends_on("r@2.6:", type=("build", "run"), when="@0.1:")
- depends_on("r@2.7:", type=("build", "run"), when="@0.1-2:")
+ depends_on("r@2.7.0:", type=("build", "run"), when="@0.1-2:")
diff --git a/var/spack/repos/builtin/packages/r-seurat/package.py b/var/spack/repos/builtin/packages/r-seurat/package.py
index f8483751fc..0af2d89f45 100644
--- a/var/spack/repos/builtin/packages/r-seurat/package.py
+++ b/var/spack/repos/builtin/packages/r-seurat/package.py
@@ -19,6 +19,7 @@ class RSeurat(RPackage):
cran = "Seurat"
+ version("5.1.0", sha256="adcfb43d7a8cc55eaa7a0954a082ac95e14059a82901913379bfec115e224d59")
version("4.3.0", sha256="7ebacb3b86f74279de60b597f9a6e728f0668719811b0dca3425d21762fff97c")
version("4.2.1", sha256="410238b6ca147451b43800a6e49c132fa5f6aacfe6b93b39a1e4d61257a9e35e")
version("4.2.0", sha256="22a3d22a9ba255c4db5b37339b183fdfb91e2d37a8b8d58a9ff45b1bc414ebef")
@@ -37,9 +38,11 @@ class RSeurat(RPackage):
depends_on("r@4.0.0:", type=("build", "run"), when="@4.1.0:")
depends_on("r-cluster", type=("build", "run"), when="@2.3.0:")
depends_on("r-cowplot", type=("build", "run"))
+ depends_on("r-fastdummies", type=("build", "run"), when="@5.0.0:")
depends_on("r-fitdistrplus", type=("build", "run"), when="@2.3.0:")
depends_on("r-future", type=("build", "run"), when="@3.0.0:")
depends_on("r-future-apply", type=("build", "run"), when="@3.0.0:")
+ depends_on("r-generics@0.1.3:", type=("build", "run"), when="@5.0.0:")
depends_on("r-ggplot2@3.0.0:", type=("build", "run"))
depends_on("r-ggplot2@3.3.0:", type=("build", "run"), when="@3.2.3:")
depends_on("r-ggrepel", type=("build", "run"), when="@3.0.0:")
@@ -51,6 +54,7 @@ class RSeurat(RPackage):
depends_on("r-jsonlite", type=("build", "run"), when="@3.2.3:")
depends_on("r-kernsmooth", type=("build", "run"), when="@3.0.0:")
depends_on("r-leiden@0.3.1:", type=("build", "run"), when="@3.1.0:")
+ depends_on("r-lifecycle", type=("build", "run"), when="@5.0.0:")
depends_on("r-lmtest", type=("build", "run"), when="@2.3.0:")
depends_on("r-mass", type=("build", "run"))
depends_on("r-matrix@1.2-14:", type=("build", "run"))
@@ -63,27 +67,34 @@ class RSeurat(RPackage):
depends_on("r-plotly@4.9.0:", type=("build", "run"), when="@3.2.3:")
depends_on("r-png", type=("build", "run"), when="@2.3.0:")
depends_on("r-progressr", type=("build", "run"), when="@4.3.0:")
+ depends_on("r-purrr", type=("build", "run"), when="@4.4.0:")
depends_on("r-rann", type=("build", "run"), when="@2.3.0:")
depends_on("r-rcolorbrewer", type=("build", "run"))
depends_on("r-rcpp@0.11.0:", type=("build", "run"))
depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@4.1.0:")
depends_on("r-rcppannoy", type=("build", "run"), when="@3.1.0:")
depends_on("r-rcppannoy@0.0.18:", type=("build", "run"), when="@4.1.0:")
+ depends_on("r-rcpphnsw", type=("build", "run"), when="@5.0.0:")
depends_on("r-reticulate", type=("build", "run"), when="@2.3.1:")
depends_on("r-rlang", type=("build", "run"), when="@3.0.0:")
depends_on("r-rocr", type=("build", "run"))
+ depends_on("r-rspectra", type=("build", "run"), when="@5.0.0:")
depends_on("r-rtsne", type=("build", "run"))
depends_on("r-scales", type=("build", "run"), when="@3.0.0:")
depends_on("r-scattermore@0.7:", type=("build", "run"), when="@3.2.3:")
+ depends_on("r-scattermore@1.2:", type=("build", "run"), when="@4.4.0:")
depends_on("r-sctransform@0.2.0:", type=("build", "run"), when="@3.0.0:")
depends_on("r-sctransform@0.3.1:", type=("build", "run"), when="@3.2.3:")
depends_on("r-sctransform@0.3.3:", type=("build", "run"), when="@4.1.0:")
depends_on("r-sctransform@0.3.4:", type=("build", "run"), when="@4.2.0:")
depends_on("r-sctransform@0.3.5:", type=("build", "run"), when="@4.2.1:")
+ depends_on("r-sctransform@0.4.0:", type=("build", "run"), when="@4.4.0:")
+ depends_on("r-sctransform@0.4.1:", type=("build", "run"), when="@5.0.0:")
depends_on("r-seuratobject@4.0.4:", type=("build", "run"), when="@4.1.0:")
depends_on("r-seuratobject@4.1.0:", type=("build", "run"), when="@4.1.1:")
depends_on("r-seuratobject@4.1.2:", type=("build", "run"), when="@4.2.0:")
depends_on("r-seuratobject@4.1.3:", type=("build", "run"), when="@4.2.1:")
+ depends_on("r-seuratobject@5.0.2:", type=("build", "run"), when="@5.0.0:")
depends_on("r-shiny", type=("build", "run"), when="@3.2.3:")
depends_on("r-spatstat-explore", type=("build", "run"), when="@4.2.1:")
depends_on("r-spatstat-geom", type=("build", "run"), when="@4.1.0:")
diff --git a/var/spack/repos/builtin/packages/r-seuratobject/package.py b/var/spack/repos/builtin/packages/r-seuratobject/package.py
index 74d32ae36f..8240e6ccaa 100644
--- a/var/spack/repos/builtin/packages/r-seuratobject/package.py
+++ b/var/spack/repos/builtin/packages/r-seuratobject/package.py
@@ -20,20 +20,26 @@ class RSeuratobject(RPackage):
cran = "SeuratObject"
+ version("5.0.2", sha256="ded30d21f445b7e353fe4a0c4954d45ad19fbe162615d9addf6732f9318ba0cf")
version("4.1.3", sha256="585d2754f6165a367f0f458523f0a25d4d4160c929c931b27c5603cc6bd986d3")
version("4.1.2", sha256="6a5945f501b573dbe44a15e7d969e63fd5be0c4f8e9d716b71ca29f695236d0d")
version("4.1.0", sha256="9ca406cb3bd95c588e1a81c5383e3173a446cc0667142b139ca32685b4b20a05")
version("4.0.4", sha256="585261b7d2045193accf817a29e2e3356e731f57c554bed37d232fa49784088c")
depends_on("r@4.0.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", when="@5.0.2:", type=("build", "run"))
depends_on("r-future", type=("build", "run"), when="@4.1.0:")
depends_on("r-future-apply", type=("build", "run"), when="@4.1.0:")
+ depends_on("r-generics", when="@5:", type=("build", "run"))
+ depends_on("r-lifecycle", when="@5:", type=("build", "run"))
depends_on("r-matrix@1.3-3:", type=("build", "run"))
depends_on("r-matrix@1.5-0:", type=("build", "run"), when="@4.1.2:")
+ depends_on("r-matrix@1.6-4:", when="@5.0.2:", type=("build", "run"))
depends_on("r-progressr", type=("build", "run"), when="@4.1.0:")
depends_on("r-rcpp@1.0.5:", type=("build", "run"))
depends_on("r-sp", type=("build", "run"), when="@4.1.0:")
depends_on("r-sp@1.5-0:", type=("build", "run"), when="@4.1.2:")
+ depends_on("r-spam", when="@5:", type=("build", "run"))
depends_on("r-rlang@0.4.7:", type=("build", "run"))
depends_on("r-rcppeigen", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sf/package.py b/var/spack/repos/builtin/packages/r-sf/package.py
index 4328390a65..d122e494ef 100644
--- a/var/spack/repos/builtin/packages/r-sf/package.py
+++ b/var/spack/repos/builtin/packages/r-sf/package.py
@@ -19,6 +19,7 @@ class RSf(RPackage):
license("GPL-2.0-only OR MIT")
+ version("1.0-16", sha256="e96e191011cdf2a073c773bdfc50ffd4a5d80f1da0ba1aa05db8015da45a9987")
version("1.0-12", sha256="3778ebf58d824b1dfa6297ca8363714d5d85eda04c55ab2bf39597cac1d91287")
version("1.0-9", sha256="85c0c71a0a64750281e79aa96e36d13e6285927008b2d37d699e52aba7d8013b")
version("1.0-8", sha256="3ddc7090e79d6b5e3fad69e01254677ab5ec86a0b25e7e73493c8eac0ea98732")
@@ -27,7 +28,9 @@ class RSf(RPackage):
version("0.9-7", sha256="4acac2f78badf9d252da5bf377975f984927c14a56a72d9f83d285c0adadae9c")
version("0.7-7", sha256="d1780cb46a285b30c7cc41cae30af523fbc883733344e53f7291e2d045e150a4")
version("0.7-5", sha256="53ed0567f502216a116c4848f5a9262ca232810f82642df7b98e0541a2524868")
- version("0.5-5", sha256="82ad31f98243b6982302fe245ee6e0d8d0546e5ff213ccc00ec3025dfec62229")
+ with default_args(deprecated=True):
+ # deprecated @:0.7-3 as gdal@:2 is deprecated, and gdal@3: requires proj@6:
+ version("0.5-5", sha256="82ad31f98243b6982302fe245ee6e0d8d0546e5ff213ccc00ec3025dfec62229")
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-classint@0.2-1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sfheaders/package.py b/var/spack/repos/builtin/packages/r-sfheaders/package.py
index 46d0172e3f..12300042f5 100644
--- a/var/spack/repos/builtin/packages/r-sfheaders/package.py
+++ b/var/spack/repos/builtin/packages/r-sfheaders/package.py
@@ -17,11 +17,13 @@ class RSfheaders(RPackage):
license("MIT")
+ version("0.4.4", sha256="f65ffe67b1d07beb6904b8960c66be684f5526b4d6450ab46c630c77e9b9bd07")
version("0.4.2", sha256="ed9fb934c537fb6f126886f8e5997727de856e32fc3d38911b61a3a83faa7b2c")
version("0.4.0", sha256="86bcd61018a0491fc8a1e7fb0422c918296287b82be299a79ccee8fcb515e045")
depends_on("r-geometries@0.2.0:", type=("build", "run"))
depends_on("r-geometries@0.2.2:", type=("build", "run"), when="@0.4.2:")
+ depends_on("r-geometries@0.2.4:", type=("build", "run"), when="@0.4.4:")
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-rcpp@1.0.10:", type=("build", "run"), when="@0.4.2:")
depends_on("r@3.0.2:", type=("build", "run"), when="@0.4.2:")
diff --git a/var/spack/repos/builtin/packages/r-sfsmisc/package.py b/var/spack/repos/builtin/packages/r-sfsmisc/package.py
index e024fa2f8b..6c128a2ad1 100644
--- a/var/spack/repos/builtin/packages/r-sfsmisc/package.py
+++ b/var/spack/repos/builtin/packages/r-sfsmisc/package.py
@@ -23,6 +23,7 @@ class RSfsmisc(RPackage):
license("GPL-2.0-or-later")
+ version("1.1-19", sha256="869931dd35d2e18cf2f960b86da2638b7a03c92288c6d7a736a10fa5585cf23b")
version("1.1-15", sha256="4afa42cf83a287f62cac21741fc0559dee9dbd69dee59a740defce9a0e7c81e6")
version("1.1-13", sha256="a81710357de2dcdaf00d9fa30a29cde0dd83616edc358452fd6105ea88f34218")
version("1.1-12", sha256="9b12184a28fff87cacd0c3602d0cf63acb4d0f3049ad3a6ff16177f6df350782")
diff --git a/var/spack/repos/builtin/packages/r-shadowtext/package.py b/var/spack/repos/builtin/packages/r-shadowtext/package.py
index f7f9eefa0a..7d5a0ba997 100644
--- a/var/spack/repos/builtin/packages/r-shadowtext/package.py
+++ b/var/spack/repos/builtin/packages/r-shadowtext/package.py
@@ -16,6 +16,7 @@ class RShadowtext(RPackage):
license("Artistic-2.0")
+ version("0.1.4", sha256="87d0bea90e0090dd40f7cd8c380d185a9d4112a32a729d31859eaeca0cd46ee8")
version("0.1.2", sha256="253c4e737dbb302aa0729e5074e84cbfde2a73bfd7a0fd2c74b557cb728bae7d")
version("0.1.1", sha256="eb06581d7ed06c963eee47548932688fd48eba70b3ebd2a7b41a6501d6e00006")
version("0.0.7", sha256="6e32b1dfd3d4816803848b876666185258b888286ec3d3e8500499ec3eba31e8")
diff --git a/var/spack/repos/builtin/packages/r-shape/package.py b/var/spack/repos/builtin/packages/r-shape/package.py
index 338cebd960..cb9f17c6b9 100644
--- a/var/spack/repos/builtin/packages/r-shape/package.py
+++ b/var/spack/repos/builtin/packages/r-shape/package.py
@@ -16,10 +16,11 @@ class RShape(RPackage):
license("GPL-3.0-or-later")
+ version("1.4.6.1", sha256="43f9bd0f997fd6cf1838efd8b2509c9a6396513f4e54a20360481634affd22a4")
version("1.4.6", sha256="b9103e5ed05c223c8147dbe3b87a0d73184697343634a353a2ae722f7ace0b7b")
version("1.4.5", sha256="094a79b8f42226189227fd7af71868e42106caa25a4d7f80a26977e8bc84189f")
version("1.4.4", sha256="f4cb1b7d7c84cf08d2fa97f712ea7eb53ed5fa16e5c7293b820bceabea984d41")
version("1.4.3", sha256="720f6ca9c70a39a3900af9d074bff864b18ac58013b21d48b779047481b93ded")
version("1.4.2", sha256="c6c08ba9cc2e90e5c9d3d5223529b57061a041f637886ad7665b9fa27465637a")
- depends_on("r@2.0.1:", type=("build", "run"))
+ depends_on("r@2.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-shiny/package.py b/var/spack/repos/builtin/packages/r-shiny/package.py
index b969837c62..1cc0eb3e3d 100644
--- a/var/spack/repos/builtin/packages/r-shiny/package.py
+++ b/var/spack/repos/builtin/packages/r-shiny/package.py
@@ -18,6 +18,8 @@ class RShiny(RPackage):
license("GPL-3.0-only OR custom")
+ version("1.9.1", sha256="854b6a214f127d652de2e0e02d675fd53209b058c11911f56f8d41382ba654e3")
+ version("1.8.1.1", sha256="a38d5fb5d750e2c2091ce9101f138c1f9bc7009bbb195227a3519c5d97e36753")
version("1.7.4", sha256="bbfcdd7375013b8f59248b3f3f4e752acd445feb25179f3f7f65cd69614da4b5")
version("1.7.3", sha256="b8ca9a39fa69ea9b270a7e9037198d95122c79bd493b865d909d343dd3523ada")
version("1.7.2", sha256="23b5bfee8d597b4147e07c89391a735361cd9f69abeecfd9bd38a14d35fe6252")
@@ -51,12 +53,15 @@ class RShiny(RPackage):
depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@1.7.1:")
depends_on("r-fastmap@1.0.0:", type=("build", "run"), when="@1.5.0:")
depends_on("r-fastmap@1.1.0:", type=("build", "run"), when="@1.7.1:")
+ depends_on("r-fastmap@1.1.1:", type=("build", "run"), when="@1.7.5:")
depends_on("r-withr", type=("build", "run"), when="@1.5.0:")
depends_on("r-commonmark@1.7:", type=("build", "run"), when="@1.5.0:")
depends_on("r-glue@1.3.2:", type=("build", "run"), when="@1.5.0:")
depends_on("r-bslib@0.3.0:", type=("build", "run"), when="@1.7.1:")
+ depends_on("r-bslib@0.6.0:", type=("build", "run"), when="@1.9.0:")
depends_on("r-cachem", type=("build", "run"), when="@1.7.1:")
- depends_on("r-ellipsis", type=("build", "run"), when="@1.7.1:")
+ depends_on("r-cachem@1.1.0:", type=("build", "run"), when="@1.9.0:")
depends_on("r-lifecycle@0.2.0:", type=("build", "run"), when="@1.7.1:")
depends_on("r-digest", type=("build", "run"), when="@:1.5.0")
+ depends_on("r-ellipsis", type=("build", "run"), when="@1.7.1:1.8.0")
diff --git a/var/spack/repos/builtin/packages/r-shortread/package.py b/var/spack/repos/builtin/packages/r-shortread/package.py
index da27db85af..c23df0d017 100644
--- a/var/spack/repos/builtin/packages/r-shortread/package.py
+++ b/var/spack/repos/builtin/packages/r-shortread/package.py
@@ -29,6 +29,9 @@ class RShortread(RPackage):
version("1.36.1", commit="176c34eddf4a416d30c69cb4ac197141ba42e66f")
version("1.34.2", commit="25daac63b301df66a8ef6e98cc2977522c6786cd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r-biocgenerics@0.22.1:", type=("build", "run"))
depends_on("r-biocgenerics@0.23.3:", type=("build", "run"), when="@1.36.1:")
depends_on("r-biocparallel", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-signac/package.py b/var/spack/repos/builtin/packages/r-signac/package.py
index 0188ca9334..26001125b6 100644
--- a/var/spack/repos/builtin/packages/r-signac/package.py
+++ b/var/spack/repos/builtin/packages/r-signac/package.py
@@ -18,11 +18,13 @@ class RSignac(RPackage):
cran = "Signac"
+ version("1.14.0", sha256="e0aad9e2c27c148fdd376081c2de1e3db46b1835eac83ef41fe562e08363c59e")
version("1.9.0", sha256="b8ff36427e5919fd420daa1f50cf8c71935293ee7f88560041acb993b5e3afa8")
version("1.8.0", sha256="9c4b123f4d077111c7e6dd1659483ada984300c8e923672ca924e46fb6a1dd06")
version("1.7.0", sha256="5e4456eeab29fa2df7f6236b050dec8cb9c073d7652a89ee5030a27f94e5e4bf")
depends_on("r@4.0.0:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@1.14.0:")
depends_on("r-genomeinfodb@1.29.3:", type=("build", "run"))
depends_on("r-genomicranges", type=("build", "run"))
depends_on("r-iranges", type=("build", "run"))
@@ -30,11 +32,13 @@ class RSignac(RPackage):
depends_on("r-rsamtools", type=("build", "run"))
depends_on("r-s4vectors", type=("build", "run"))
depends_on("r-seuratobject@4.0.0:", type=("build", "run"))
+ depends_on("r-seuratobject@5.0.2:", type=("build", "run"), when="@1.14.0:")
depends_on("r-data-table", type=("build", "run"))
depends_on("r-dplyr@1.0.0:", type=("build", "run"))
depends_on("r-future", type=("build", "run"))
depends_on("r-future-apply", type=("build", "run"))
depends_on("r-ggplot2", type=("build", "run"))
+ depends_on("r-rlang", type=("build", "run"), when="@1.10.0:")
depends_on("r-irlba", type=("build", "run"))
depends_on("r-pbapply", type=("build", "run"))
depends_on("r-tidyr", type=("build", "run"))
@@ -47,4 +51,5 @@ class RSignac(RPackage):
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-tidyselect", type=("build", "run"))
depends_on("r-vctrs", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.12.0:")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/r-simpleaffy/package.py b/var/spack/repos/builtin/packages/r-simpleaffy/package.py
index d56ef29893..005c2ffc06 100644
--- a/var/spack/repos/builtin/packages/r-simpleaffy/package.py
+++ b/var/spack/repos/builtin/packages/r-simpleaffy/package.py
@@ -26,6 +26,8 @@ class RSimpleaffy(RPackage):
version("2.54.0", commit="6876e028d412b14504ad3915cbec1a189e9c6478")
version("2.52.0", commit="f2b43fb9b8e6fa4c03fe28b4efb3144a0a42a385")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.0.0:", type=("build", "run"))
depends_on("r-biocgenerics@0.1.12:", type=("build", "run"))
depends_on("r-biobase", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sitmo/package.py b/var/spack/repos/builtin/packages/r-sitmo/package.py
index 09de1b2c2a..6d40cc9fd7 100644
--- a/var/spack/repos/builtin/packages/r-sitmo/package.py
+++ b/var/spack/repos/builtin/packages/r-sitmo/package.py
@@ -26,5 +26,7 @@ class RSitmo(RPackage):
version("2.0.2", sha256="448ef8d56e36783354011845daf33f1efb83ea3b9685eea75eaf5134e24fa8c2")
version("2.0.1", sha256="0c90d357af334d5c99c8956739dc12623ddd87dda5efa59f4a43f7393c87ed2a")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r-rcpp@0.12.13:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sm/package.py b/var/spack/repos/builtin/packages/r-sm/package.py
index 60879f612c..c52d11a2db 100644
--- a/var/spack/repos/builtin/packages/r-sm/package.py
+++ b/var/spack/repos/builtin/packages/r-sm/package.py
@@ -17,6 +17,7 @@ class RSm(RPackage):
license("GPL-2.0-or-later")
+ version("2.2-6.0", sha256="27a6e3291a572c3d30f25982902ccde5299230061e5dc1a38fb52aaac2561d61")
version("2.2-5.7.1", sha256="ea0cc32eb14f6c18beba0bede66ed37bc5341bd3f76c1a7ae56d7254693e1457")
version("2.2-5.7", sha256="2607a2cafc68d7e99005daf99e36f4a66eaf569ebb6b7500e962642cf58be80f")
version("2.2-5.6", sha256="b890cd7ebe8ed711ab4a3792c204c4ecbe9e6ca1fd5bbc3925eba5833a839c30")
diff --git a/var/spack/repos/builtin/packages/r-smoof/package.py b/var/spack/repos/builtin/packages/r-smoof/package.py
index 6a3144ec78..fb1262b617 100644
--- a/var/spack/repos/builtin/packages/r-smoof/package.py
+++ b/var/spack/repos/builtin/packages/r-smoof/package.py
@@ -24,6 +24,9 @@ class RSmoof(RPackage):
version("1.5.1", sha256="cfb6f6460e9593351428656b225b5ba3867a216d35a05f2babdb20db6ba35306")
version("1.5", sha256="9b73ad5bfc8e1120c9651539ea52b1468f316cc7fc5fef8afd6d357adf01504c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r+X", type=("build", "run"))
depends_on("r-paramhelpers@1.8:", type=("build", "run"))
depends_on("r-checkmate@1.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-snakecase/package.py b/var/spack/repos/builtin/packages/r-snakecase/package.py
index fc895fbf5b..4d06c77185 100644
--- a/var/spack/repos/builtin/packages/r-snakecase/package.py
+++ b/var/spack/repos/builtin/packages/r-snakecase/package.py
@@ -16,6 +16,7 @@ class RSnakecase(RPackage):
license("GPL-3.0-only")
+ version("0.11.1", sha256="2a5f9791337ca42e392f23fb873eb44f74810583e9aa7c62fda2f28f9e750821")
version("0.11.0", sha256="998420a58391ac85785e60bcdf6fd6927c82758ad2859a9a73a0e57299e8c1cf")
depends_on("r@3.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-snowfall/package.py b/var/spack/repos/builtin/packages/r-snowfall/package.py
index 0f5473d70d..fb3b1b77c6 100644
--- a/var/spack/repos/builtin/packages/r-snowfall/package.py
+++ b/var/spack/repos/builtin/packages/r-snowfall/package.py
@@ -19,6 +19,7 @@ class RSnowfall(RPackage):
license("GPL-2.0-or-later")
+ version("1.84-6.3", sha256="2641932b01041e34b7afb1261f649755b4c8d6560080e0e2ee549ffdf3b8b143")
version("1.84-6.2", sha256="9b467ab2b992455c6e1aeabe375c5694761fa1cf8aaf4f003ca47102b656353b")
version("1.84-6.1", sha256="5c446df3a931e522a8b138cf1fb7ca5815cc82fcf486dbac964dcbc0690e248d")
diff --git a/var/spack/repos/builtin/packages/r-snprelate/package.py b/var/spack/repos/builtin/packages/r-snprelate/package.py
index 5ce5328391..18d57ae809 100644
--- a/var/spack/repos/builtin/packages/r-snprelate/package.py
+++ b/var/spack/repos/builtin/packages/r-snprelate/package.py
@@ -40,5 +40,8 @@ class RSnprelate(RPackage):
version("1.12.2", commit="dce2e2b6f36483a9f905bb5df6ae834a9f1136fe")
version("1.10.2", commit="3f5c4010871df742e7a460586b38ad0c2fd37aeb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.15:", type=("build", "run"))
depends_on("r-gdsfmt@1.8.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-snpstats/package.py b/var/spack/repos/builtin/packages/r-snpstats/package.py
index aed788cd8e..b5ac2a05b6 100644
--- a/var/spack/repos/builtin/packages/r-snpstats/package.py
+++ b/var/spack/repos/builtin/packages/r-snpstats/package.py
@@ -26,6 +26,8 @@ class RSnpstats(RPackage):
version("1.28.0", commit="8df9f4188f720dfbb4f4f4ec255cd2e22f3f4426")
version("1.26.0", commit="7c9b3304073e0556d694a8531882b349822fdda8")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-survival", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-som/package.py b/var/spack/repos/builtin/packages/r-som/package.py
index 4c1515240d..e1f509b344 100644
--- a/var/spack/repos/builtin/packages/r-som/package.py
+++ b/var/spack/repos/builtin/packages/r-som/package.py
@@ -21,4 +21,6 @@ class RSom(RPackage):
version("0.3-3", sha256="434e2210df3e6a459a8588606676c02494f58c5b52e25291d142121b7b9be5c7")
version("0.3-2", sha256="b46ecb79c08f3d4cf9527d5c7f85a235808dda45dae7f50909b2df90e7b9e543")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sourcetools/package.py b/var/spack/repos/builtin/packages/r-sourcetools/package.py
index f356242224..09aa05e2ca 100644
--- a/var/spack/repos/builtin/packages/r-sourcetools/package.py
+++ b/var/spack/repos/builtin/packages/r-sourcetools/package.py
@@ -22,4 +22,7 @@ class RSourcetools(RPackage):
version("0.1.6", sha256="c9f48d2f0b7f7ed0e7fecdf8e730b0b80c4d567f0e1e880d118b0944b1330c51")
version("0.1.5", sha256="c2373357ad76eaa7d03f9f01c19b5001a3e4db788acbca068b0abbe7a99ea64b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-sp/package.py b/var/spack/repos/builtin/packages/r-sp/package.py
index b0c228fd6d..54483d6c2a 100644
--- a/var/spack/repos/builtin/packages/r-sp/package.py
+++ b/var/spack/repos/builtin/packages/r-sp/package.py
@@ -18,6 +18,7 @@ class RSp(RPackage):
license("GPL-2.0-or-later")
+ version("2.1-4", sha256="e185e7fb61d2d7dbc50fd765a93e170fa778083a653588db1f5e99d019479f0a")
version("1.6-0", sha256="f5977fbe80e7dee8e95d41fe0ef9d87c2c984422bb529ea5211fd38a13f9fcda")
version("1.5-1", sha256="69b9eab481d389bbb736d2adcf50c180aca248c3ffc4ebda8ffe2accc5f229df")
version("1.5-0", sha256="939a06adf78ec8de7a663d6ca5bba426780852b357773446b00cc298200ff81c")
@@ -29,4 +30,6 @@ class RSp(RPackage):
version("1.2-3", sha256="58b3a9e395ca664ee61b20b480be4eb61576daca44c3d3f6f9a943bb0155879a")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.2.0:", type=("build", "run"), when="@2.0-0:")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@2.1-0:")
depends_on("r-lattice", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spacetime/package.py b/var/spack/repos/builtin/packages/r-spacetime/package.py
index e3c0310fcb..65dc462403 100644
--- a/var/spack/repos/builtin/packages/r-spacetime/package.py
+++ b/var/spack/repos/builtin/packages/r-spacetime/package.py
@@ -20,6 +20,7 @@ class RSpacetime(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-1", sha256="1942a51949e82d19a652fc09e61d738f8eca6ed992783cc1d0164313d71521cf")
version("1.3-0", sha256="2e9902a5c6f355f0b8e23237cf3b1553f22d7d79493bdbdb99e49104b9ef541b")
version("1.2-8", sha256="4297a027ab4cff32e41cec65aa7d92af66c7a885fd2322b010b0af9a14f24c59")
version("1.2-6", sha256="8fd46606ed9589ffce19368d40004890f96e8fe77f13b546e6a2f8b9ced0dd81")
diff --git a/var/spack/repos/builtin/packages/r-spades-core/package.py b/var/spack/repos/builtin/packages/r-spades-core/package.py
index 4aacc1dd26..d6b2158fa3 100644
--- a/var/spack/repos/builtin/packages/r-spades-core/package.py
+++ b/var/spack/repos/builtin/packages/r-spades-core/package.py
@@ -23,6 +23,7 @@ class RSpadesCore(RPackage):
maintainers("dorton21")
+ version("2.1.0", sha256="aee1a3093dfe04210719a7ced12d522299845bbd794f7eb78308f3a5b613762b")
version("1.1.0", sha256="67af4f3f153b75a0865fde2457c5d951c2f2184d07c557879b7a8c43a6e7ad66")
version("1.0.10", sha256="05e20f7d9aeef9ba68e50e993ef3027b8c85afc5e3f83f5ecaee9d1a7873e379")
version("1.0.9", sha256="1176a41a1af334388c1b16ff4ed9a6f30007bb5ed1fa14d798c59461042537dd")
@@ -30,17 +31,26 @@ class RSpadesCore(RPackage):
depends_on("r@3.6:", type=("build", "run"))
depends_on("r@4.0:", type=("build", "run"), when="@1.0.10:")
+ depends_on("r@4.1:", type=("build", "run"), when="@2.0.2:")
+ depends_on("r@4.2:", type=("build", "run"), when="@2.0.4:")
depends_on("r-quickplot@0.1.4:", type=("build", "run"))
depends_on("r-reproducible@1.2.1.9007:", type=("build", "run"))
depends_on("r-reproducible@1.2.7:", type=("build", "run"), when="@1.0.9:")
depends_on("r-reproducible@1.2.9:", type=("build", "run"), when="@1.1.0:")
- depends_on("r-crayon", type=("build", "run"))
+ depends_on("r-reproducible@2.1.0:", type=("build", "run"), when="@2.1.0:")
+ depends_on("r-cli", type=("build", "run"), when="@2.1.0:")
depends_on("r-data-table@1.10.4:", type=("build", "run"))
depends_on("r-data-table@1.11.0:", type=("build", "run"), when="@1.0.9:")
- depends_on("r-fastdigest", type=("build", "run"))
+ depends_on("r-fs", type=("build", "run"), when="@2.0.3:")
depends_on("r-igraph@1.0.1:", type=("build", "run"))
depends_on("r-lobstr", type=("build", "run"), when="@1.1.0:")
+ depends_on("r-quickplot@1.0.2:", type=("build", "run"), when="@2.1.0:")
depends_on("r-qs@0.21.1:", type=("build", "run"))
- depends_on("r-raster@2.5-8:", type=("build", "run"))
depends_on("r-require@0.0.7:", type=("build", "run"))
+ depends_on("r-require@0.3.1:", type=("build", "run"), when="@2.0.2:")
+ depends_on("r-terra@1.7-46:", type=("build", "run"), when="@2.0.3:")
depends_on("r-whisker", type=("build", "run"))
+
+ depends_on("r-crayon", type=("build", "run"), when="@:2.0.5")
+ depends_on("r-fastdigest", type=("build", "run"), when="@:1.1.0")
+ depends_on("r-raster@2.5-8:", type=("build", "run"), when="@:1.1.0")
diff --git a/var/spack/repos/builtin/packages/r-spades-tools/package.py b/var/spack/repos/builtin/packages/r-spades-tools/package.py
index 809ad5f86d..a5427ce5a6 100644
--- a/var/spack/repos/builtin/packages/r-spades-tools/package.py
+++ b/var/spack/repos/builtin/packages/r-spades-tools/package.py
@@ -19,6 +19,7 @@ class RSpadesTools(RPackage):
maintainers("dorton21")
+ version("2.0.7", sha256="f1c62cc76ff75119ae54e35be81d5819a282c547f77292e4f392599465e7b2cf")
version("1.0.1", sha256="6b0d69c8737ff06e2cf312ff94b298b81f4c50af2efd498a124b99ed66a2be9a")
version("1.0.0", sha256="1172b96ada7052fcaa3a113ed31eeb1b67dba70f40fa74cbb378c6e75e9235dc")
version("0.3.10", sha256="ba4c075b534caaca413e2e97711b5475c2679d9546c8fee4a07fb2bb94d52c94")
@@ -28,19 +29,24 @@ class RSpadesTools(RPackage):
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r@3.6:", type=("build", "run"), when="@0.3.9:")
depends_on("r@4.0:", type=("build", "run"), when="@0.3.10:")
+ depends_on("r@4.2:", type=("build", "run"), when="@2.0.6:")
depends_on("r-backports", type=("build", "run"))
depends_on("r-checkmate@1.8.2:", type=("build", "run"))
- depends_on("r-circstats@0.2-4:", type=("build", "run"))
depends_on("r-data-table@1.10.4:", type=("build", "run"))
- depends_on("r-fastmatch@1.1-0:", type=("build", "run"))
depends_on("r-fpcompare@0.2.1:", type=("build", "run"))
- depends_on("r-magrittr", type=("build", "run"))
- depends_on("r-quickplot", type=("build", "run"))
- depends_on("r-raster@2.5-8:", type=("build", "run"))
depends_on("r-rcpp@0.12.12:", type=("build", "run"))
- depends_on("r-require", type=("build", "run"), when="@0.3.10:")
- depends_on("r-rgeos", type=("build", "run"))
- depends_on("r-sp@1.2-4:", type=("build", "run"))
-
+ depends_on("r-reproducible@2.0.2:", type=("build", "run"), when="@2.0.0:")
+ depends_on("r-reproducible@2.0.5:", type=("build", "run"), when="@2.0.1:")
+ depends_on("r-reproducible@2.0.9:", type=("build", "run"), when="@2.0.5:")
+ depends_on("r-terra", type=("build", "run"), when="@2.0.0:")
+
+ depends_on("r-circstats@0.2-4:", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-fastmatch@1.1-0:", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-magrittr", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-quickplot", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-raster@2.5-8:", type=("build", "run"), when="@:1.0.1")
depends_on("r-reproducible@0.2.0:", type=("build", "run"), when="@:0.3.6")
depends_on("r-reproducible@1.2.7:", type=("build", "run"), when="@0.3.9")
+ depends_on("r-require", type=("build", "run"), when="@0.3.10:1.0.1")
+ depends_on("r-rgeos", type=("build", "run"), when="@:1.0.1")
+ depends_on("r-sp@1.2-4:", type=("build", "run"), when="@:1.0.1")
diff --git a/var/spack/repos/builtin/packages/r-spades/package.py b/var/spack/repos/builtin/packages/r-spades/package.py
index f7db62f71d..dd2f112cb0 100644
--- a/var/spack/repos/builtin/packages/r-spades/package.py
+++ b/var/spack/repos/builtin/packages/r-spades/package.py
@@ -26,6 +26,7 @@ class RSpades(RPackage):
maintainers("dorton21")
+ version("2.0.11", sha256="a88e202d1fe6fa700dfc176018a07cc5dd9ac9a8d0695eb6bc507ace52b68a32")
version("2.0.9", sha256="f68080318bc922c6d8c495e6d963acdbb24dc90a3e8013e3e2f894b40a584c85")
version("2.0.8", sha256="2230704f700d07bda25a23ab5c6630a093c9ed2fe3c47ab6294eebaf1d86f03f")
version("2.0.7", sha256="5b62e9d701aa178be57f22369a5d043c9793a1bd3dcd4acac18c5a6b906ed8a0")
@@ -33,10 +34,15 @@ class RSpades(RPackage):
depends_on("r@3.6:", type=("build", "run"))
depends_on("r@4.0:", type=("build", "run"), when="@2.0.8:")
+ depends_on("r@4.2:", type=("build", "run"), when="@2.0.10:")
depends_on("r-quickplot", type=("build", "run"))
+ depends_on("r-quickplot@1.0.2:", type=("build", "run"), when="@2.0.10:")
depends_on("r-reproducible@1.2.1.9007:", type=("build", "run"))
depends_on("r-reproducible@1.2.2:", type=("build", "run"), when="@2.0.9:")
+ depends_on("r-reproducible@2.0.10:", type=("build", "run"), when="@2.0.10:")
depends_on("r-spades-core@1.0.4:", type=("build", "run"))
+ depends_on("r-spades-core@2.0.3:", type=("build", "run"), when="@2.0.10:")
depends_on("r-spades-tools", type=("build", "run"))
+ depends_on("r-spades-tools@2.0.5:", type=("build", "run"), when="@2.0.10:")
depends_on("r-spades-addins", type=("build", "run"), when="@:2.0.6")
diff --git a/var/spack/repos/builtin/packages/r-spam/package.py b/var/spack/repos/builtin/packages/r-spam/package.py
index 845a6147f3..6612bb66bb 100644
--- a/var/spack/repos/builtin/packages/r-spam/package.py
+++ b/var/spack/repos/builtin/packages/r-spam/package.py
@@ -21,6 +21,7 @@ class RSpam(RPackage):
license("LGPL-2.0-only OR BSD-3-Clause")
+ version("2.10-0", sha256="719c86a23801ecf051ffd8291912ee3567af4010e74af470fbf09e274728ac79")
version("2.9-1", sha256="c32e219279988b1bfc258aaf64f5a46efa558202848a9ae64946ffbe8b497ddb")
version("2.8-0", sha256="d98177435b028d1c706d0197ea8132bfaffae6052c3ce6064a7f64178512d6aa")
version("2.6-0", sha256="638fdd658e94f7544b46f6b6568b20a9f390bcd703aff572a3a5249fef66be5c")
@@ -29,3 +30,4 @@ class RSpam(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.5:", type=("build", "run"), when="@2.9-1:")
depends_on("r-dotcall64", type=("build", "run"))
+ depends_on("r-rcpp@1.0.8.3:", type=("build", "run"), when="@2.10-0:")
diff --git a/var/spack/repos/builtin/packages/r-sparsem/package.py b/var/spack/repos/builtin/packages/r-sparsem/package.py
index 0c9254fad8..17b270cc03 100644
--- a/var/spack/repos/builtin/packages/r-sparsem/package.py
+++ b/var/spack/repos/builtin/packages/r-sparsem/package.py
@@ -15,6 +15,7 @@ class RSparsem(RPackage):
cran = "SparseM"
+ version("1.84-2", sha256="2580fdbb8679e76c92b9f0c5bd9bb503c4cb6a750ef6ae96595441690ce98665")
version("1.81", sha256="bd838f381ace680fa38508ff70b3d83cb9ffa28ac1ab568509249bca53c34b33")
version("1.78", sha256="d6b79ec881a10c91cb03dc23e6e783080ded9db4f2cb723755aa0d7d29a8b432")
version("1.77", sha256="a9329fef14ae4fc646df1f4f6e57efb0211811599d015f7bc04c04285495d45c")
diff --git a/var/spack/repos/builtin/packages/r-sparsematrixstats/package.py b/var/spack/repos/builtin/packages/r-sparsematrixstats/package.py
index 4b513cd2f4..c863828a2d 100644
--- a/var/spack/repos/builtin/packages/r-sparsematrixstats/package.py
+++ b/var/spack/repos/builtin/packages/r-sparsematrixstats/package.py
@@ -23,6 +23,8 @@ class RSparsematrixstats(RPackage):
version("1.6.0", commit="78627a842790af42b6634893087b2bb1f4ac0392")
version("1.2.1", commit="9726f3d5e0f03b50c332d85d5e4c339c18b0494c")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-matrixgenerics", type=("build", "run"))
depends_on("r-matrixgenerics@1.5.3:", type=("build", "run"), when="@1.6.0:")
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatial/package.py b/var/spack/repos/builtin/packages/r-spatial/package.py
index 401e685f9c..5a2c17f335 100644
--- a/var/spack/repos/builtin/packages/r-spatial/package.py
+++ b/var/spack/repos/builtin/packages/r-spatial/package.py
@@ -15,6 +15,7 @@ class RSpatial(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("7.3-17", sha256="f1003ed8cff2a47169a4787c8be46e8c2c501cc06c8b1e5f97bf62507e5f5dd7")
version("7.3-16", sha256="e46565a64c5ec148a77789867e5103746462a41de294539b230bad2a0e16e406")
version("7.3-15", sha256="e5613be94d6f5c1f54813dadc96e4a86b3417dea28106cc90cb24dfd6c3c8cef")
version("7.3-12", sha256="7639039ee7407bd088e1b253376b2cb4fcdf4cc9124d6b48e4119d5cda872d63")
diff --git a/var/spack/repos/builtin/packages/r-spatialeco/package.py b/var/spack/repos/builtin/packages/r-spatialeco/package.py
index 40b51335c8..f71a8a2624 100644
--- a/var/spack/repos/builtin/packages/r-spatialeco/package.py
+++ b/var/spack/repos/builtin/packages/r-spatialeco/package.py
@@ -19,6 +19,7 @@ class RSpatialeco(RPackage):
cran = "spatialEco"
+ version("2.0-2", sha256="533b8e938df196609a6c85270c0bdc279287c5ee222de9e05ac745713a3ab57c")
version("2.0-0", sha256="9a2384e875ec465d1a2ccd392acc90d4469eb62babd32bb90e30b27a921153f6")
version("1.3-7", sha256="38688466d9a2a56675e2fe45cf69833a163133ad3afb6f95e9ac2e8eab221b7a")
version("1.3-5", sha256="d4fb211124edf828333841c44a5af01165c53d89af460144214d81e3c13983c7")
@@ -28,24 +29,25 @@ class RSpatialeco(RPackage):
depends_on("r@3.6:", type=("build", "run"))
depends_on("r@4.0:", type=("build", "run"), when="@1.3-7:")
+ depends_on("r@4.2:", type=("build", "run"), when="@2.0-2:")
depends_on("r-sf", type=("build", "run"))
- depends_on("r-spatstat-explore", type=("build", "run"), when="@2.0-0:")
depends_on("r-terra", type=("build", "run"), when="@2.0-0:")
- depends_on("r-spatstat-geom", type=("build", "run"), when="@1.3-7:")
- depends_on("r-spatstat-geom@3.0-3:", type=("build", "run"), when="@2.0-0:")
- depends_on("r-spdep", type=("build", "run"))
- depends_on("r-spatialpack@0.3:", type=("build", "run"))
- depends_on("r-envstats", type=("build", "run"))
- depends_on("r-mgcv", type=("build", "run"))
- depends_on("r-yaimpute", type=("build", "run"))
- depends_on("r-rms", type=("build", "run"))
- depends_on("r-rann", type=("build", "run"))
- depends_on("r-rcurl", type=("build", "run"))
- depends_on("r-readr", type=("build", "run"))
- depends_on("r-cluster", type=("build", "run"))
- depends_on("r-ks", type=("build", "run"), when="@2.0-0:")
- depends_on("r-mass", type=("build", "run"))
+ depends_on("r-spatstat-explore", type=("build", "run"), when="@2.0-0")
+ depends_on("r-spatstat-geom", type=("build", "run"), when="@1.3-7:2.0-0")
+ depends_on("r-spatstat-geom@3.0-3:", type=("build", "run"), when="@2.0-0")
+ depends_on("r-spdep", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-spatialpack@0.3:", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-envstats", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-mgcv", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-yaimpute", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-rms", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-rann", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-rcurl", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-readr", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-cluster", type=("build", "run"), when="@:2.0-0")
+ depends_on("r-ks", type=("build", "run"), when="@2.0-0")
+ depends_on("r-mass", type=("build", "run"), when="@:2.0-0")
depends_on("r-dplyr", type=("build", "run"), when="@:1.3-2")
depends_on("r-exactextractr", type=("build", "run"), when="@:1.3-2")
depends_on("r-maptools", type=("build", "run"), when="@:1.3-2")
diff --git a/var/spack/repos/builtin/packages/r-spatialpack/package.py b/var/spack/repos/builtin/packages/r-spatialpack/package.py
index 8e99663550..3810d83924 100644
--- a/var/spack/repos/builtin/packages/r-spatialpack/package.py
+++ b/var/spack/repos/builtin/packages/r-spatialpack/package.py
@@ -24,6 +24,9 @@ class RSpatialpack(RPackage):
version("0.3-8", sha256="a0e54b5dee3cd30a634e2d30380fe163942b672073fd909be888803332ed5151")
version("0.3", sha256="4c80fc1c77bc97fc678e6e201ecf7f0f89dcf3417b3b497a28a3639e9b30bd8a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@0.3-8196:")
depends_on("r-fastmatrix", type=("build", "run"), when="@0.3-8196:")
diff --git a/var/spack/repos/builtin/packages/r-spatialreg/package.py b/var/spack/repos/builtin/packages/r-spatialreg/package.py
index 7f187dbf57..89f37bc51c 100644
--- a/var/spack/repos/builtin/packages/r-spatialreg/package.py
+++ b/var/spack/repos/builtin/packages/r-spatialreg/package.py
@@ -35,6 +35,7 @@ class RSpatialreg(RPackage):
license("GPL-2.0-only")
+ version("1.3-5", sha256="eefeaa2f22d3652a23c30c8ff81364f419634e466cdb0c2d9c7bcef9287b00c4")
version("1.2-8", sha256="150cb77ca09800d93af7de37440072d59ac7e41acb45ab42fc1c0e59edd7f9de")
version("1.2-6", sha256="9b384117a31ab5fe830325b3eacbec5eb9d40bf0e9ca3c75ea15ca6b78fbd41d")
version("1.2-3", sha256="09e0e65f043975d5c1d4be99ef9f29cf0790e962dcde9b7e45a7027d268fce22")
@@ -44,12 +45,15 @@ class RSpatialreg(RPackage):
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-spdata", type=("build", "run"))
+ depends_on("r-spdata@2.3.1:", type=("build", "run"), when="@1.3-4:")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-sf", type=("build", "run"), when="@1.2-1:")
depends_on("r-spdep", type=("build", "run"))
- depends_on("r-expm", type=("build", "run"))
+ depends_on("r-spdep@1.3-1:", type=("build", "run"), when="@1.3-1:")
+ depends_on("r-expm", type=("build", "run"), when="@:1.2-10")
depends_on("r-coda", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
+ depends_on("r-multcomp", type=("build", "run"), when="@1.2-9:")
depends_on("r-boot", type=("build", "run"))
depends_on("r-learnbayes", type=("build", "run"))
depends_on("r-nlme", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatstat-data/package.py b/var/spack/repos/builtin/packages/r-spatstat-data/package.py
index bcb503e91d..f043688b31 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-data/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-data/package.py
@@ -13,6 +13,7 @@ class RSpatstatData(RPackage):
cran = "spatstat.data"
+ version("3.1-2", sha256="9b9b416303b8040f723400f3dc454cda75cff1d958660767e7b824503b490b77")
version("3.0-1", sha256="8eeb4b1de356e9cef42f58b5e0fc7ced2a476a1306e09395ba97253b22dd5300")
version("3.0-0", sha256="cff9058a88489020a4a05b9576cd452f37fa9b42084873c474d06931f5187057")
version("2.2-0", sha256="d3943bb4f6509d60bf68e79ce4533c5ec5261f411da6b0ef5238c124fc37c3e5")
@@ -27,4 +28,5 @@ class RSpatstatData(RPackage):
depends_on("r-spatstat-utils@2.1-0:", type=("build", "run"), when="@2.1-2:")
depends_on("r-spatstat-utils@3.0-0:", type=("build", "run"), when="@3.0-0:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.0-1:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.1-2:")
depends_on("r-matrix", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatstat-explore/package.py b/var/spack/repos/builtin/packages/r-spatstat-explore/package.py
index 373c33f425..292ba6b28e 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-explore/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-explore/package.py
@@ -25,19 +25,28 @@ class RSpatstatExplore(RPackage):
cran = "spatstat.explore"
+ version("3.3-2", sha256="a24827d24a86f2f20f8dcbbb5f57f5ab43345fa346c572099b84d867e7bf85ed")
version("3.1-0", sha256="87ef4882652db3b834214bfc776dd7d23d931a9227de12f19722aeb1029d086e")
version("3.0-3", sha256="137444a46d26d88241336feece63ed7b006a9328cfe3861d4b8ab7b4bed963a7")
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-spatstat-data@3.0:", type=("build", "run"))
+ depends_on("r-spatstat-data@3.0-4:", type=("build", "run"), when="@:")
+ depends_on("r-spatstat-data@3.1-2:", type=("build", "run"), when="@3.3-2:")
depends_on("r-spatstat-geom@3.0:", type=("build", "run"))
depends_on("r-spatstat-geom@3.0-5:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-geom@3.2-9:", type=("build", "run"), when="@:")
+ depends_on("r-spatstat-geom@3.3-2:", type=("build", "run"), when="@3.3-2:")
depends_on("r-spatstat-random@3.0:", type=("build", "run"))
depends_on("r-spatstat-random@3.1:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-random@3.3-1:", type=("build", "run"), when="@3.3-2:")
depends_on("r-nlme", type=("build", "run"))
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-spatstat-utils@3.0:", type=("build", "run"))
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-utils@3.1-0:", type=("build", "run"), when="@3.3-2:")
depends_on("r-spatstat-sparse@3.0:", type=("build", "run"))
+ depends_on("r-spatstat-sparse@3.1-0:", type=("build", "run"), when="@3.3-2:")
depends_on("r-goftest@1.2-2:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-abind", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatstat-geom/package.py b/var/spack/repos/builtin/packages/r-spatstat-geom/package.py
index 8070c59daf..94f62c9259 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-geom/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-geom/package.py
@@ -26,6 +26,7 @@ class RSpatstatGeom(RPackage):
cran = "spatstat.geom"
+ version("3.3-2", sha256="cbc08a6924edbf0f1ea104136d5b2200caeecbd6c2cb4d55d4f56af9beea570f")
version("3.1-0", sha256="184a96679babcbff4897c5a471e034eb1bb7127c6cf668e8cc2c2c74bdea47fe")
version("3.0-3", sha256="6e5b56c60e774a0cdcaa5a8ffde071225f233832446a341588bd8a7840913c84")
version("2.4-0", sha256="32b89a409ce87ffe901e4c8720a26cac9629f9816e163c4ad68b7aa012d69e67")
@@ -34,8 +35,11 @@ class RSpatstatGeom(RPackage):
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-spatstat-data@2.0-0:", type=("build", "run"))
depends_on("r-spatstat-data@3.0:", type=("build", "run"), when="@3.0-3:")
+ depends_on("r-spatstat-data@3.1:", type=("build", "run"), when="@3.3-2:")
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.3-2:")
depends_on("r-spatstat-utils@2.2-0:", type=("build", "run"))
depends_on("r-spatstat-utils@3.0:", type=("build", "run"), when="@3.0-3:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.3-2:")
depends_on("r-deldir@1.0-2:", type=("build", "run"))
depends_on("r-polyclip@1.10-0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatstat-linnet/package.py b/var/spack/repos/builtin/packages/r-spatstat-linnet/package.py
index cae0f1106f..995ad70fd0 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-linnet/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-linnet/package.py
@@ -39,22 +39,31 @@ class RSpatstatLinnet(RPackage):
cran = "spatstat.linnet"
+ version("3.2-1", sha256="1af0d8063c72650f17c6b79afb07e69e0b6a9794583e8f0c38c6624d91dc11bf")
version("3.1-0", sha256="b9b0ad66af169ca1ef3da852578d7b65521cf55f4a72c43ae5b1f2d4f47bf00c")
version("2.3-2", sha256="9c78a4b680debfff0f3ae934575c30d03ded49bc9a7179475384af0ebaf13778")
version("2.3-1", sha256="119ba6e3da651aa9594f70a7a35349209534215aa640c2653aeddc6aa25038c3")
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-spatstat-model@3.2-1:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-model@3.2-11.005:", type=("build", "run"), when="@3.2-1:")
depends_on("r-spatstat-explore@3.0-6:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-explore@3.2-7.006:", type=("build", "run"), when="@3.2-1:")
depends_on("r-spatstat-data@2.1-0:", type=("build", "run"))
depends_on("r-spatstat-data@3.0:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-data@3.0-4:", type=("build", "run"), when="@3.1-5:")
depends_on("r-spatstat-geom@2.3-0:", type=("build", "run"))
depends_on("r-spatstat-geom@3.0-6:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-geom@3.2-9.028:", type=("build", "run"), when="@3.2-1:")
depends_on("r-spatstat-random@2.2-0:", type=("build", "run"), when="@2.3-2:")
depends_on("r-spatstat-random@3.1-3:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-random@3.2-3.003:", type=("build", "run"), when="@3.2-1:")
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.2-1:")
depends_on("r-spatstat-utils@2.2-0:", type=("build", "run"))
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.2-1:")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-spatstat-sparse@2.0:", type=("build", "run"))
depends_on("r-spatstat-sparse@3.0:", type=("build", "run"), when="@3.1-0:")
+ depends_on("r-spatstat-sparse@3.1-0:", type=("build", "run"), when="@3.2-1:")
depends_on("r-spatstat-core@2.3-2:", type=("build", "run"), when="@2.3-2:2.3-2")
diff --git a/var/spack/repos/builtin/packages/r-spatstat-model/package.py b/var/spack/repos/builtin/packages/r-spatstat-model/package.py
index 1a84bfd784..a29c32b000 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-model/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-model/package.py
@@ -32,17 +32,25 @@ class RSpatstatModel(RPackage):
cran = "spatstat.model"
+ version("3.3-1", sha256="5c1c969b5f2bbfdfe91ad31cd912f31b91ec9cc7651ecec86c1d7a562161afa7")
version("3.2-3", sha256="8ad7d2644773571a5c579ceebb98b735dccc97e9b4b109ea39b4ce3faedb14ea")
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-spatstat-data@3.0:", type=("build", "run"))
+ depends_on("r-spatstat-data@3.0-4:", type=("build", "run"), when="@3.2-11:")
depends_on("r-spatstat-geom@3.0-5:", type=("build", "run"))
+ depends_on("r-spatstat-geom@3.3-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-spatstat-random@3.1-4:", type=("build", "run"))
+ depends_on("r-spatstat-random@3.3-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-spatstat-explore@3.1-0:", type=("build", "run"))
+ depends_on("r-spatstat-explore@3.3-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-nlme", type=("build", "run"))
depends_on("r-rpart", type=("build", "run"))
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"))
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.3-1:")
depends_on("r-spatstat-sparse@3.0:", type=("build", "run"))
+ depends_on("r-spatstat-sparse@3.1-0:", type=("build", "run"), when="@3.3-1:")
depends_on("r-mgcv", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-abind", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-spatstat-random/package.py b/var/spack/repos/builtin/packages/r-spatstat-random/package.py
index 2a8cf21574..f967f4d023 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-random/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-random/package.py
@@ -25,6 +25,7 @@ class RSpatstatRandom(RPackage):
cran = "spatstat.random"
+ version("3.3-1", sha256="83026bce8802e14423edfa0a0f9c8279ef74565992bdac1804dfec357988bbd3")
version("3.1-4", sha256="a6cd75e187a992fd8dae535f6745e12801635a344ca51bd2fe048debea3df7d3")
version("3.0-1", sha256="938c845c063b8781bf894c0a67537e7b2a7c425a4beba4a95ec9d2c37b43e5b6")
version("2.2-0", sha256="45f0bbdb9dbd53b6c4151c3cdd098451cf787729717ccbb063cd1f33910e604d")
@@ -33,9 +34,13 @@ class RSpatstatRandom(RPackage):
depends_on("r-spatstat-data@2.1-0:", type=("build", "run"))
depends_on("r-spatstat-data@2.2-0.003:", type=("build", "run"), when="@3.0-1:")
depends_on("r-spatstat-data@3.0:", type=("build", "run"), when="@3.1-4:")
+ depends_on("r-spatstat-data@3.1:", type=("build", "run"), when="@3.3-0:")
depends_on("r-spatstat-geom@2.4-0:", type=("build", "run"))
depends_on("r-spatstat-geom@2.4-0.023:", type=("build", "run"), when="@3.0-1:")
depends_on("r-spatstat-geom@3.0-5:", type=("build", "run"), when="@3.1-4:")
+ depends_on("r-spatstat-geom@3.3-0:", type=("build", "run"), when="@3.3-0:")
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.3-0:")
depends_on("r-spatstat-utils@2.2-0:", type=("build", "run"))
depends_on("r-spatstat-utils@2.3-1.003:", type=("build", "run"), when="@3.0-1:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.1-4:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.3-0:")
diff --git a/var/spack/repos/builtin/packages/r-spatstat-sparse/package.py b/var/spack/repos/builtin/packages/r-spatstat-sparse/package.py
index 932c51884f..e2080bc206 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-sparse/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-sparse/package.py
@@ -15,6 +15,7 @@ class RSpatstatSparse(RPackage):
cran = "spatstat.sparse"
+ version("3.1-0", sha256="63be5dc5818339b878a14a39815dab730b28029d51bac5233e88f5e2464bbbe9")
version("3.0-1", sha256="2c1cf0ddad366aa4230bd03241a1ef87ed635f53a6943fc4a6c2d371626d0d1c")
version("3.0-0", sha256="99be0a3c7592760fdf1668dc0811f75ed91c400390d1ecc3d5e643255f501ad2")
version("2.1-1", sha256="9a35ad69715b767b3ae60b02dce05ccf108fcccdf95bbc8f7d02557bcbde7303")
@@ -27,3 +28,4 @@ class RSpatstatSparse(RPackage):
depends_on("r-spatstat-utils@2.1-0:", type=("build", "run"))
depends_on("r-spatstat-utils@3.0-0:", type=("build", "run"), when="@3.0-0:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.0-1:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.1-0:")
diff --git a/var/spack/repos/builtin/packages/r-spatstat-univar/package.py b/var/spack/repos/builtin/packages/r-spatstat-univar/package.py
new file mode 100644
index 0000000000..6cc988eb30
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-spatstat-univar/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RSpatstatUnivar(RPackage):
+ """Estimation of one-dimensional probability distributions including
+ kernel density estimation, weighted empirical cumulative distribution
+ functions, Kaplan-Meier and reduced-sample estimators for right-censored
+ data, heat kernels, kernel properties, quantiles and integration."""
+
+ homepage = "http://spatstat.org/"
+ cran = "spatstat.univar"
+
+ license("GPL-2.0-or-later", checked_by="wdconinc")
+
+ version("3.0-0", sha256="00bc501d9bec32231207f0562433193bd680606ce465131caa5e2704b4ff4771")
+
+ depends_on("r@3.5.0:", type=("build", "run"), when="@3.0-0:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@2.0-3.011:")
diff --git a/var/spack/repos/builtin/packages/r-spatstat-utils/package.py b/var/spack/repos/builtin/packages/r-spatstat-utils/package.py
index 2a5490c177..ab4ddd6c1a 100644
--- a/var/spack/repos/builtin/packages/r-spatstat-utils/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat-utils/package.py
@@ -14,6 +14,7 @@ class RSpatstatUtils(RPackage):
cran = "spatstat.utils"
+ version("3.1-0", sha256="c30c3154700005f4bae9b428924248046128f7150b873e36e3897a622f962d3d")
version("3.0-2", sha256="be60cd2cf21a6b3f71ba60553c045fd87884a4e57744f60e6eb0a2d096314615")
version("3.0-1", sha256="cba1c7806564fd9145ca15edf77233d6ba5609f0989f7812221f5fc1ece0b91a")
version("2.3-1", sha256="5b914308df0585993084b5e95967864eea0314c98ed6af58267b64b2235dfe22")
@@ -23,3 +24,4 @@ class RSpatstatUtils(RPackage):
version("1.15-0", sha256="90e07d730b6939f47f93c939afae10874b2c82bd402960ede4133de67dca2a0c")
depends_on("r@3.3.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@3.1-0:")
diff --git a/var/spack/repos/builtin/packages/r-spatstat/package.py b/var/spack/repos/builtin/packages/r-spatstat/package.py
index 766b10079e..c38424cf60 100644
--- a/var/spack/repos/builtin/packages/r-spatstat/package.py
+++ b/var/spack/repos/builtin/packages/r-spatstat/package.py
@@ -50,6 +50,7 @@ class RSpatstat(RPackage):
license("GPL-2.0-or-later")
+ version("3.1-1", sha256="5649309818c6e76c8b8ee7b66a25dcbd2b358d90da56f67dd961b5cf9ff55512")
version("3.0-5", sha256="b926ed55dfeb95b09fb441f44d85204277eee00e42ac258c0a08baa1ce263bb1")
version("2.3-4", sha256="4ea0f8d70b926b92bf4a06521f985a0bb6d573619f5d526957c87860ccb999da")
version("2.3-0", sha256="da02443722f2c7ef9d59a2799b7b8002c94cecf73f2b0d2b29280d39f49c4c06")
@@ -59,23 +60,31 @@ class RSpatstat(RPackage):
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.5.0:", type=("build", "run"), when="@2.3-0:")
depends_on("r-spatstat-model@3.2-3:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-model@3.3-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-explore@3.1-0:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-explore@3.3-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-data@1.4-2:", type=("build", "run"))
depends_on("r-spatstat-data@2.1-0:", type=("build", "run"), when="@2.3-0:")
depends_on("r-spatstat-data@2.1-2:", type=("build", "run"), when="@2.3-4:")
depends_on("r-spatstat-data@3.0-1:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-data@3.1-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-geom@2.3-0:", type=("build", "run"), when="@2.3-0:")
depends_on("r-spatstat-geom@2.4-0:", type=("build", "run"), when="@2.3-4:")
depends_on("r-spatstat-geom@3.1-0:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-geom@3.3-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-random@2.2-0:", type=("build", "run"), when="@2.3-4:")
depends_on("r-spatstat-random@3.1-4:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-random@3.3-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-linnet@2.3-0:", type=("build", "run"), when="@2.3-0:")
depends_on("r-spatstat-linnet@2.3-2:", type=("build", "run"), when="@2.3-4:")
depends_on("r-spatstat-linnet@3.1-0:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-linnet@3.2-0:", type=("build", "run"), when="@3.1-1:")
+ depends_on("r-spatstat-univar@3.0-0:", type=("build", "run"), when="@3.1-1:")
depends_on("r-spatstat-utils@1.17:", type=("build", "run"))
depends_on("r-spatstat-utils@2.2-0:", type=("build", "run"), when="@2.3-0:")
depends_on("r-spatstat-utils@2.3-0:", type=("build", "run"), when="@2.3-4:")
depends_on("r-spatstat-utils@3.0-2:", type=("build", "run"), when="@3.0-5:")
+ depends_on("r-spatstat-utils@3.0-5:", type=("build", "run"), when="@3.1-1:")
depends_on("r-rpart", type=("build", "run"), when="@:1.64-1")
depends_on("r-nlme", type=("build", "run"), when="@:1.64-1")
diff --git a/var/spack/repos/builtin/packages/r-spdata/package.py b/var/spack/repos/builtin/packages/r-spdata/package.py
index 7a4a7e225e..028bda6521 100644
--- a/var/spack/repos/builtin/packages/r-spdata/package.py
+++ b/var/spack/repos/builtin/packages/r-spdata/package.py
@@ -20,6 +20,7 @@ class RSpdata(RPackage):
cran = "spData"
+ version("2.3.1", sha256="8c377f2123b7b274c5ca0de656ccd30aaba1b5b245be58a842395311ecc70075")
version("2.2.2", sha256="878a58e98b6cf259432149ecb4e5d66ada59466e1b5b0dafa60ec839e90104ed")
version("2.2.0", sha256="6e9c0a72f29021a84e9049b147c9e0186f14876a4a1663ad98bbb33440ee901f")
version("2.0.1", sha256="c635a3e2e5123b4cdb2e6877b9b09e3d50169e1512a53b2ba2db7fbe63b990fc")
diff --git a/var/spack/repos/builtin/packages/r-spdep/package.py b/var/spack/repos/builtin/packages/r-spdep/package.py
index 63f980382c..2383c056e1 100644
--- a/var/spack/repos/builtin/packages/r-spdep/package.py
+++ b/var/spack/repos/builtin/packages/r-spdep/package.py
@@ -23,6 +23,7 @@ class RSpdep(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-5", sha256="ba8efa06ddbc12408f4f6d4c85606d84922131d9c05953e0b23b81f03e56e626")
version("1.2-8", sha256="8d9fb4cb10d1035526ad6d9f7a11972efb0e3137dcff176d73df6ebfe96c9190")
version("1.2-7", sha256="9dac594825bf2d0aa31e845bfec05d8ce206327840fe455391741dbbdf9c9eea")
version("1.2-4", sha256="a9f4d5af56efb1a2bcd3e85fe4d0e8a42896a2c30a790b2487e1ebadf398a677")
@@ -37,6 +38,7 @@ class RSpdep(RPackage):
depends_on("r@3.3.0:", type=("build", "run"), when="@0.7-8:")
depends_on("r-sp@1.0:", type=("build", "run"))
depends_on("r-spdata@0.2.6.0:", type=("build", "run"), when="@1.0-2:")
+ depends_on("r-spdata@2.3.1:", type=("build", "run"), when="@1.3-5:")
depends_on("r-sf", type=("build", "run"), when="@1.0-2:")
depends_on("r-deldir", type=("build", "run"))
depends_on("r-boot@1.3-1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-speedglm/package.py b/var/spack/repos/builtin/packages/r-speedglm/package.py
index 9ec7b5a824..e967e7ffc9 100644
--- a/var/spack/repos/builtin/packages/r-speedglm/package.py
+++ b/var/spack/repos/builtin/packages/r-speedglm/package.py
@@ -16,9 +16,11 @@ class RSpeedglm(RPackage):
license("GPL-2.0-or-later")
+ version("0.3-5", sha256="f8663677c10ff324c5639402060ddd2b1a1e917445cb0f8f84e146b85e82bb4b")
version("0.3-4", sha256="1a12db7dbceaaf5cf4f9a0c03e2a2b9f32e91b697daf2ccfe81bbae9ac3046ce")
version("0.3-3", sha256="d065d0ee42fb772760fca8d97ad2aa56cd76b1d9ecb4e97478ec362429e16738")
version("0.3-2", sha256="5fcaf18324dc754152f528a44894944063303f780d33e58569ea7c306bfc45ac")
+ depends_on("r-biglm", type=("build", "run"), when="@0.3-5:")
depends_on("r-matrix", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-splancs/package.py b/var/spack/repos/builtin/packages/r-splancs/package.py
index 2dbe2fb033..a964aa09ca 100644
--- a/var/spack/repos/builtin/packages/r-splancs/package.py
+++ b/var/spack/repos/builtin/packages/r-splancs/package.py
@@ -17,9 +17,10 @@ class RSplancs(RPackage):
license("GPL-2.0-or-later")
+ version("2.01-45", sha256="8bccf1d61d7feaab52da07a9c95aa66bcd3986a6b214f13b232c1e2bea4b76d3")
version("2.01-43", sha256="b351565e1f69f6c86a29d921d3a18d5896c4586e2ab8c73bb3df8e75630fc448")
version("2.01-42", sha256="8c0af4764521e20b629dba6afd5c284e7be48786f378c37668eacfa26d2ef0aa")
version("2.01-40", sha256="79744381ebc4a361740a36dca3c9fca9ae015cfe0bd585b7856a664a3da74363")
- depends_on("r@2.10:", type=("build", "run"))
+ depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-sp@0.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-splines2/package.py b/var/spack/repos/builtin/packages/r-splines2/package.py
new file mode 100644
index 0000000000..bf1ae174c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-splines2/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RSplines2(RPackage):
+ """Constructs basis functions of B-splines, M-splines, I-splines, convex
+ splines (C-splines), periodic splines, natural cubic splines, generalized
+ Bernstein polynomials, their derivatives, and integrals (except C-splines)
+ by closed-form recursive formulas. It also contains a C++ head-only library
+ integrated with Rcpp. See Wang and Yan (2021) <doi:10.6339/21-JDS1020>
+ for details."""
+
+ homepage = "https://wwenjie.org/splines2"
+ cran = "splines2"
+
+ license("GPL-3.0-or-later", checked_by="wdconinc")
+
+ version("0.5.3", sha256="c27e7bd12d615095f765f4c1ed3cb9e39b922653aabbe88c4ca3ac31e6a01ddc")
+
+ depends_on("r@3.2.3:", type=("build", "run"))
+
+ depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-rcpparmadillo", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-stabledist/package.py b/var/spack/repos/builtin/packages/r-stabledist/package.py
index 747a119144..1a8e0c40df 100644
--- a/var/spack/repos/builtin/packages/r-stabledist/package.py
+++ b/var/spack/repos/builtin/packages/r-stabledist/package.py
@@ -16,6 +16,7 @@ class RStabledist(RPackage):
license("GPL-2.0-or-later")
+ version("0.7-2", sha256="26671710c0d8e3c815b56e6e4f6bc9ea0509db47c0ef5b8acfbfa16095a16fd5")
version("0.7-1", sha256="06c5704d3a3c179fa389675c537c39a006867bc6e4f23dd7e406476ed2c88a69")
depends_on("r@3.1.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-stanheaders/package.py b/var/spack/repos/builtin/packages/r-stanheaders/package.py
index 4ce431492e..f6f63c610a 100644
--- a/var/spack/repos/builtin/packages/r-stanheaders/package.py
+++ b/var/spack/repos/builtin/packages/r-stanheaders/package.py
@@ -27,6 +27,7 @@ class RStanheaders(RPackage):
cran = "StanHeaders"
+ version("2.32.10", sha256="c3125b8d7dc4c6b7082258b2fa6c9530c2e4714c89ffd08b8e72f4c9f4108582")
version("2.21.0-7", sha256="27546e064f0e907e031d9185ad55245d118d82fbe3074ecb1d76fae8b9f2336b")
version("2.21.0-6", sha256="a0282a054d0e6ab310ec7edcffa953b77c7e4a858d9ac7028aab1b4fb4ce8cf3")
version("2.18.1-10", sha256="8a9f7e22105428e97d14f44f75395c37cf8c809de148d279c620024452b3565a")
@@ -37,5 +38,7 @@ class RStanheaders(RPackage):
depends_on("r+X", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@2.18.0:")
depends_on("r-rcppparallel@5.0.1:", type=("build", "run"), when="@2.21.0:")
+ depends_on("r-rcppparallel@5.1.4:", type=("build", "run"), when="@2.26.25:")
depends_on("r-rcppeigen", type=("build", "run"), when="@2.21.0:")
+ depends_on("r-rcppeigen@0.3.4.0.0:", type=("build", "run"), when="@2.32.8:")
depends_on("pandoc", type="build")
diff --git a/var/spack/repos/builtin/packages/r-stars/package.py b/var/spack/repos/builtin/packages/r-stars/package.py
index 20f393bbe3..94552ddf7d 100644
--- a/var/spack/repos/builtin/packages/r-stars/package.py
+++ b/var/spack/repos/builtin/packages/r-stars/package.py
@@ -15,6 +15,7 @@ class RStars(RPackage):
cran = "stars"
+ version("0.6-6", sha256="70ca3509adfb4227ca8910d47c87f587ec06d8ef4577af63fe772757844ec7ac")
version("0.6-1", sha256="1f78db3adab9ebbfc9d98c6cc592708d893b5d7fd7fd876af454042ef42204a7")
version("0.5-6", sha256="e0413c95423635f7f7b2520813382e911257da8ace9b743da9fe3eab568a9461")
@@ -22,7 +23,9 @@ class RStars(RPackage):
depends_on("r-abind", type=("build", "run"))
depends_on("r-sf@1.0-8:", type=("build", "run"))
depends_on("r-sf@1.0-10:", type=("build", "run"), when="@0.6-1:")
+ depends_on("r-sf@1.0-15:", type=("build", "run"), when="@0.6-5:")
depends_on("r-classint@0.4-1:", type=("build", "run"))
- depends_on("r-lwgeom", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
depends_on("r-units", type=("build", "run"))
+
+ depends_on("r-lwgeom", type=("build", "run"), when="@:0.6-3")
diff --git a/var/spack/repos/builtin/packages/r-statmod/package.py b/var/spack/repos/builtin/packages/r-statmod/package.py
index 3f5ba59757..50f955cbfa 100644
--- a/var/spack/repos/builtin/packages/r-statmod/package.py
+++ b/var/spack/repos/builtin/packages/r-statmod/package.py
@@ -28,4 +28,7 @@ class RStatmod(RPackage):
version("1.4.32", sha256="2f67a1cfa66126e6345f8a40564a3077d08f1748f17cb8c8fb05c94ed0f57e20")
version("1.4.30", sha256="9d2c1722a85f53623a9ee9f73d835119ae22ae2b8ec7b50d675401e314ea641f")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-statnet-common/package.py b/var/spack/repos/builtin/packages/r-statnet-common/package.py
index f02f6d0cb4..e71cf28c47 100644
--- a/var/spack/repos/builtin/packages/r-statnet-common/package.py
+++ b/var/spack/repos/builtin/packages/r-statnet-common/package.py
@@ -14,6 +14,7 @@ class RStatnetCommon(RPackage):
cran = "statnet.common"
+ version("4.9.0", sha256="a485dc6e363a993d87336fbd1027adb1cd7b9103447fd63904cae4dc3bfc2dd7")
version("4.8.0", sha256="def999130673fbcb315fecf3620a2559864f51961a828625aa5cd5fded7946f0")
version("4.7.0", sha256="b69731a606b56b729b1917375efafb572b960ce5000a0fc2ec5222fd7d80a1b3")
version("4.6.0", sha256="ddad51128b50d465e1d1aca3a53b452810b9ba578e96b08b8f50f5850d7bb21d")
diff --git a/var/spack/repos/builtin/packages/r-stringfish/package.py b/var/spack/repos/builtin/packages/r-stringfish/package.py
index 14c846404e..729c0b09f9 100644
--- a/var/spack/repos/builtin/packages/r-stringfish/package.py
+++ b/var/spack/repos/builtin/packages/r-stringfish/package.py
@@ -18,6 +18,7 @@ class RStringfish(RPackage):
license("GPL-3.0-only")
+ version("0.16.0", sha256="3608bc83900246297b38df46954bd9aa3b6f463a56eefbe80cfc713eab797993")
version("0.15.7", sha256="34b1703a8876a40860d35f88a94e069832a7d2bc86189ff07af84ff04fd4b735")
version("0.15.5", sha256="9df21146a7710e5a9ab4bb53ebc231a580c798b7e541b8d78df53207283f8129")
version("0.14.2", sha256="9373cfc715cda1527fd20179435977b8e59e19d8c5ef82a31e519f93fb624ced")
diff --git a/var/spack/repos/builtin/packages/r-stringi/package.py b/var/spack/repos/builtin/packages/r-stringi/package.py
index abc075ec2a..805cf78970 100644
--- a/var/spack/repos/builtin/packages/r-stringi/package.py
+++ b/var/spack/repos/builtin/packages/r-stringi/package.py
@@ -22,6 +22,7 @@ class RStringi(RPackage):
license("custom")
+ version("1.8.4", sha256="c219f8f64d1a2bfd4ca9528452d44d30db1899af14f4b9ef248412443bc669f3")
version("1.7.12", sha256="efe8ac2900001f986a75db5641fbb24587a6d23de274a6a85c39dfa58921e009")
version("1.7.8", sha256="538918b1cd6ed1d8a2dd5ab146ba800a088e99f93c52dcd82615b6e127478b1c")
version("1.7.6", sha256="0ea3d5afec5701977ff53de9afbaceb53b00aa34f5fb641cadc1eeb7759119ec")
@@ -36,6 +37,7 @@ class RStringi(RPackage):
depends_on("r@2.14:", type=("build", "run"))
depends_on("r@3.1:", type=("build", "run"), when="@1.6.1:")
+ depends_on("r@3.4:", type=("build", "run"), when="@1.8.1:")
depends_on("icu4c@52:")
depends_on("icu4c@55:", when="@1.5.3:")
# since version 1.6.1 there is also a SystemRequirement on C++11
diff --git a/var/spack/repos/builtin/packages/r-stringr/package.py b/var/spack/repos/builtin/packages/r-stringr/package.py
index 90fcda65fb..97ca2ce28a 100644
--- a/var/spack/repos/builtin/packages/r-stringr/package.py
+++ b/var/spack/repos/builtin/packages/r-stringr/package.py
@@ -19,6 +19,7 @@ class RStringr(RPackage):
license("MIT")
+ version("1.5.1", sha256="a4adec51bb3f04214b1d8ef40d3a58949f21b1497cbeaf2ba552e0891eef45de")
version("1.5.0", sha256="52b159d7700a139111b4caf939e7c9c6ab3e01185181400d70a74c552826633a")
version("1.4.1", sha256="ec0d8e90caa3e107f18c188ed313dea8bfd12a738011b0be09ef5362360ddcb1")
version("1.4.0", sha256="87604d2d3a9ad8fd68444ce0865b59e2ffbdb548a38d6634796bbd83eeb931dd")
@@ -29,12 +30,14 @@ class RStringr(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.3:", type=("build", "run"), when="@1.5.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.5.1:")
depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@1.5.0:")
depends_on("r-cli", type=("build", "run"), when="@1.5.0:")
depends_on("r-stringi@1.1.7:", type=("build", "run"))
depends_on("r-stringi@1.5.3:", type=("build", "run"), when="@1.5.0:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-vctrs", type=("build", "run"), when="@1.5.0:")
+ depends_on("r-vctrs@0.4.0:", type=("build", "run"), when="@1.5.1:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.5.0:")
depends_on("r-glue@1.2.0:", type=("build", "run"), when="@1.3.0:")
depends_on("r-glue@1.6.1:", type=("build", "run"), when="@1.5.0:")
diff --git a/var/spack/repos/builtin/packages/r-strucchange/package.py b/var/spack/repos/builtin/packages/r-strucchange/package.py
index c8828973b8..f5710547b6 100644
--- a/var/spack/repos/builtin/packages/r-strucchange/package.py
+++ b/var/spack/repos/builtin/packages/r-strucchange/package.py
@@ -27,6 +27,8 @@ class RStrucchange(RPackage):
version("1.5-2", sha256="7d247c5ae6f5a63c80e478799d009c57fb8803943aa4286d05f71235cc1002f8")
version("1.5-1", sha256="740e2e20477b9fceeef767ae1002adc5ec397cb0f7daba5289a2c23b0dddaf31")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-zoo", type=("build", "run"))
depends_on("r-sandwich", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-strucchangercpp/package.py b/var/spack/repos/builtin/packages/r-strucchangercpp/package.py
index 0485cece4f..2c4f6fd16c 100644
--- a/var/spack/repos/builtin/packages/r-strucchangercpp/package.py
+++ b/var/spack/repos/builtin/packages/r-strucchangercpp/package.py
@@ -26,6 +26,8 @@ class RStrucchangercpp(RPackage):
"1.5-3-1.0.4", sha256="f506fcb593ce4bacf1892de25154257d0fe02260ef956a75438c6330195cd86d"
)
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-zoo", type=("build", "run"))
depends_on("r-sandwich", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-styler/package.py b/var/spack/repos/builtin/packages/r-styler/package.py
index a64f522bcc..4fc81952da 100644
--- a/var/spack/repos/builtin/packages/r-styler/package.py
+++ b/var/spack/repos/builtin/packages/r-styler/package.py
@@ -15,6 +15,7 @@ class RStyler(RPackage):
license("MIT")
+ version("1.10.3", sha256="adb9c22111a8669bdce6d4a5c09e0ad353e07c3488373484a258028203bfda41")
version("1.9.1", sha256="c80fa3c062f007645ec820b5b087d4d5784e7797cc88d030ab59fb5823ded0bb")
version("1.8.1", sha256="15505fa85f0aa2902bc8af3f00b2aeb205d41a92b77bffbd176d657753ee81e9")
version("1.8.0", sha256="4f8b74c1ac158b0a4433b6008da6bb708f3c9ed1c7fb9bb5d79748858cb484c7")
@@ -24,6 +25,7 @@ class RStyler(RPackage):
depends_on("r@3.4.0:", type=("build", "run"), when="@1.7.0:")
depends_on("r@3.5.0:", type=("build", "run"), when="@1.8.0:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@1.10.0:")
depends_on("r-cli@1.1.0:", type=("build", "run"))
depends_on("r-cli@3.1.1:", type=("build", "run"), when="@1.7.0:")
depends_on("r-magrittr@1.0.1:", type=("build", "run"))
@@ -32,6 +34,7 @@ class RStyler(RPackage):
depends_on("r-r-cache@0.14.0:", type=("build", "run"))
depends_on("r-r-cache@0.15.0:", type=("build", "run"), when="@1.6.2:")
depends_on("r-rlang@0.1.1:", type=("build", "run"))
+ depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@1.10.0:")
depends_on("r-rprojroot@1.1:", type=("build", "run"))
depends_on("r-vctrs@0.4.1:", type=("build", "run"), when="@1.8.0:")
depends_on("r-withr@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-subplex/package.py b/var/spack/repos/builtin/packages/r-subplex/package.py
index 9199d1e852..25f6eda8ca 100644
--- a/var/spack/repos/builtin/packages/r-subplex/package.py
+++ b/var/spack/repos/builtin/packages/r-subplex/package.py
@@ -16,6 +16,7 @@ class RSubplex(RPackage):
license("GPL-3.0-only")
+ version("1.9", sha256="07a9ea8cba46a6eec037f8c6e87279c122479ccc560a96bd3086d653f95d69b7")
version("1.8", sha256="3bc31d8990380c9f790c9c7d84cb2e39f4945eff934eddfa1196d597465be5a5")
version("1.7", sha256="d5ecf4a484936d71cb294f08c3968ef5a8dcbdc861bfc0e97e3b1ab99afff887")
version("1.6", sha256="0d05da1622fffcd20a01cc929fc6c2b7df40a8246e7018f7f1f3c175b774cbf9")
@@ -24,3 +25,4 @@ class RSubplex(RPackage):
version("1.4-1", sha256="94b7b961aaa229a6f025151191ed50272af1394be69f1c41146b9e8c786caec6")
depends_on("r@2.5.1:", type=("build", "run"))
+ depends_on("r@4.1.0:", type=("build", "run"), when="@1.9:")
diff --git a/var/spack/repos/builtin/packages/r-suppdists/package.py b/var/spack/repos/builtin/packages/r-suppdists/package.py
index 04368370a6..232c1a3b01 100644
--- a/var/spack/repos/builtin/packages/r-suppdists/package.py
+++ b/var/spack/repos/builtin/packages/r-suppdists/package.py
@@ -20,4 +20,6 @@ class RSuppdists(RPackage):
version("1.1-9.7", sha256="6b5527e2635c0ff762eb7af8154704c85e66d7f79a9524089a5c98dfa94dab08")
version("1.1-9.5", sha256="680b67145c07d44e200275e08e48602fe19cd99fb106c05422b3f4a244c071c4")
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-survey/package.py b/var/spack/repos/builtin/packages/r-survey/package.py
index 9cc9e7b6c6..c9c51f056c 100644
--- a/var/spack/repos/builtin/packages/r-survey/package.py
+++ b/var/spack/repos/builtin/packages/r-survey/package.py
@@ -21,6 +21,7 @@ class RSurvey(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("4.4-2", sha256="8a4a0f3122f0971f7c8756805add781192c655f507b235801dd78457a8d2f1bd")
version("4.1-1", sha256="05e89a1678a39e32bfb41af8a31d643b04fc4d2660a96e701825e6bffcd75a52")
version("4.0", sha256="b053f40f4cfa90507ca524f72d3b3a4b4869def52f11f907a14f1c6d90063de1")
version("3.36", sha256="90f32e9d2b52eacf881e6717a4b5edfc5a3beb5da516f8372293549589d79475")
@@ -31,9 +32,12 @@ class RSurvey(RPackage):
depends_on("r@2.16.0:", type=("build", "run"), when="@3.32:")
depends_on("r@3.1.0:", type=("build", "run"), when="@3.35:")
depends_on("r@3.5.0:", type=("build", "run"), when="@4.1-1:")
+ depends_on("r@4.1.0:", type=("build", "run"), when="@4.4-2:")
depends_on("r-matrix", type=("build", "run"), when="@3.31:")
depends_on("r-survival", type=("build", "run"), when="@3.31:")
depends_on("r-lattice", type=("build", "run"), when="@3.31:")
depends_on("r-minqa", type=("build", "run"), when="@3.34:")
depends_on("r-numderiv", type=("build", "run"), when="@3.34:")
depends_on("r-mitools@2.4:", type=("build", "run"), when="@3.36:")
+ depends_on("r-rcpp@0.12.8:", type=("build", "run"), when="@4.4:")
+ depends_on("r-rcpparmadillo", type=("build", "run"), when="@4.4:")
diff --git a/var/spack/repos/builtin/packages/r-survival/package.py b/var/spack/repos/builtin/packages/r-survival/package.py
index 79b6b0e029..052c27d368 100644
--- a/var/spack/repos/builtin/packages/r-survival/package.py
+++ b/var/spack/repos/builtin/packages/r-survival/package.py
@@ -17,6 +17,7 @@ class RSurvival(RPackage):
license("LGPL-2.0-or-later")
+ version("3.7-0", sha256="cd96b08ec928b0028f69c942cc788e190b4543c8518d71deb6d8a712de44feef")
version("3.5-5", sha256="1375a509554b0258e04e27baca2e073e179406e2a9a71e6d3e0c777072568476")
version("3.4-0", sha256="a48e23d47265fe4d90fb5f0f9fc388906014f8063211980856985db9e89cf812")
version("3.3-1", sha256="14878705cd0c7edcfead79011444aa84f680759293bde8634721c49f37cb4dc7")
diff --git a/var/spack/repos/builtin/packages/r-sva/package.py b/var/spack/repos/builtin/packages/r-sva/package.py
index 5d56201407..e8a9c700ea 100644
--- a/var/spack/repos/builtin/packages/r-sva/package.py
+++ b/var/spack/repos/builtin/packages/r-sva/package.py
@@ -41,6 +41,8 @@ class RSva(RPackage):
version("3.26.0", commit="3cc5e75413c35ed5511892f5c36a8b5cb454937e")
version("3.24.4", commit="ed2ebb6e33374dc9ec50e6ea97cc1d9aef836c73")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.2:", type=("build", "run"))
depends_on("r-mgcv", type=("build", "run"))
depends_on("r-genefilter", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-svglite/package.py b/var/spack/repos/builtin/packages/r-svglite/package.py
index 2003f6a798..babdf515f2 100644
--- a/var/spack/repos/builtin/packages/r-svglite/package.py
+++ b/var/spack/repos/builtin/packages/r-svglite/package.py
@@ -16,12 +16,14 @@ class RSvglite(RPackage):
license("GPL-2.0-or-later")
+ version("2.1.3", sha256="f0a8564e6f9127f4d1e05cf5a5f36b4e244aee0008e27473e504c63873ef0a54")
version("2.1.1", sha256="48700169eec1b05dbee9e2bae000aa84c544617b018cb3ac431a128cfd8dac56")
version("2.1.0", sha256="ad40f590c7e80ae83001a3826b6e8394ba733446ed51fd55faeda974ab839c9b")
version("2.0.0", sha256="76e625fe172a5b7ce99a67b6d631b037b3f7f0021cfe15f2e15e8851b89defa5")
depends_on("r+X", type=("build", "run"))
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@2.1.2:")
depends_on("r-systemfonts@1.0.0:", type=("build", "run"))
depends_on("r-cpp11", type=("build", "run"))
depends_on("libpng")
diff --git a/var/spack/repos/builtin/packages/r-sys/package.py b/var/spack/repos/builtin/packages/r-sys/package.py
index 117130dc41..bee43018e2 100644
--- a/var/spack/repos/builtin/packages/r-sys/package.py
+++ b/var/spack/repos/builtin/packages/r-sys/package.py
@@ -19,6 +19,7 @@ class RSys(RPackage):
license("MIT")
+ version("3.4.2", sha256="b7bdce66f0fb681830ea6fb77b5a2c6babb43920abb1eddc733f95c0a63ce5b3")
version("3.4.1", sha256="324e6d8fde58264e62bc04867b719c5fd16296de1542689801b8cb13621ecf52")
version("3.4", sha256="17f88fbaf222f1f8fd07919461093dac0e7175ae3c3b3264b88470617afd0487")
version("3.2", sha256="2819498461fe2ce83d319d1a47844e86bcea6d01d10861818dba289e7099bbcc")
diff --git a/var/spack/repos/builtin/packages/r-systemfonts/package.py b/var/spack/repos/builtin/packages/r-systemfonts/package.py
index fffb2dcdc7..4d4f38f639 100644
--- a/var/spack/repos/builtin/packages/r-systemfonts/package.py
+++ b/var/spack/repos/builtin/packages/r-systemfonts/package.py
@@ -21,11 +21,13 @@ class RSystemfonts(RPackage):
license("MIT")
+ version("1.1.0", sha256="1941069bd20320284ec026a38c53cb736be60bda431303ceaf8fd27ae13fb644")
version("1.0.4", sha256="ef766c75b942f147d382664a00d6a4930f1bfe0cce9d88943f571682a85a84c0")
version("1.0.3", sha256="647c99d5ea6f90a49768ea7b10b39816af6be85168475273369fd973a20dbbba")
version("1.0.1", sha256="401db4d9e78e3a5e00b7a0b4fbad7fbb1c584734469b65fe5b7ebe1851c7a797")
depends_on("r@3.2.0:", type=("build", "run"))
depends_on("r-cpp11@0.2.1:", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.1.0:")
depends_on("fontconfig")
depends_on("freetype")
diff --git a/var/spack/repos/builtin/packages/r-tclust/package.py b/var/spack/repos/builtin/packages/r-tclust/package.py
index 964e874605..28e5169388 100644
--- a/var/spack/repos/builtin/packages/r-tclust/package.py
+++ b/var/spack/repos/builtin/packages/r-tclust/package.py
@@ -18,6 +18,7 @@ class RTclust(RPackage):
license("GPL-3.0-only")
+ version("2.0-4", sha256="a6667167778b974afc968340161171a7911415bcc1220dc7f0f350552f560578")
version("1.5-4", sha256="2b55da5e351c5054c9627f57a43084518a138a1d8097e35a364db0eff63471a8")
version("1.5-2", sha256="492674b30a465e5f4a22ba0ce5556ed4d8e57b29090f9b5b94ad655d064e6f8b")
version("1.5-1", sha256="73328b30774bb0767d613d7f2b60b75706b19fab864c712645ea18181f1af327")
@@ -30,3 +31,10 @@ class RTclust(RPackage):
version("1.1-02", sha256="f73c0d7a495552f901b710cf34e114c0ba401d5a17c48156313245904bcccad4")
depends_on("r@2.12.0:", type=("build", "run"))
+ depends_on("r@3.6.2:", type=("build", "run"), when="@1.5-6:")
+
+ depends_on("r-doparallel", type=("build", "run"), when="@2.0:")
+ depends_on("r-foreach", type=("build", "run"), when="@2.0:")
+ depends_on("r-mass", type=("build", "run"), when="@2.0:")
+ depends_on("r-rcpp@1.0.7:", type=("build", "run"), when="@2.0:")
+ depends_on("r-rcpparmadillo", type=("build", "run"), when="@2.0:")
diff --git a/var/spack/repos/builtin/packages/r-teachingdemos/package.py b/var/spack/repos/builtin/packages/r-teachingdemos/package.py
index 72d8ccbcc4..45c58294c5 100644
--- a/var/spack/repos/builtin/packages/r-teachingdemos/package.py
+++ b/var/spack/repos/builtin/packages/r-teachingdemos/package.py
@@ -15,6 +15,7 @@ class RTeachingdemos(RPackage):
cran = "TeachingDemos"
+ version("2.13", sha256="f80eb952b7d1a0cde3bed8152f9c4e9eceaa3f635209b2af9a11e785e8c0fbcc")
version("2.12", sha256="3e75405ce1affa406d6df85e06f96381412bc7a2810b25d8c81bfe64c4698644")
version("2.10", sha256="2ef4c2e36ba13e32f66000e84281a3616584c86b255bca8643ff3fe4f78ed704")
diff --git a/var/spack/repos/builtin/packages/r-tensora/package.py b/var/spack/repos/builtin/packages/r-tensora/package.py
index 1e962ddcdb..0c1c67061f 100644
--- a/var/spack/repos/builtin/packages/r-tensora/package.py
+++ b/var/spack/repos/builtin/packages/r-tensora/package.py
@@ -18,6 +18,7 @@ class RTensora(RPackage):
license("GPL-2.0-or-later")
+ version("0.36.2.1", sha256="06588261fe7dff6a8edafe2b9d436b39a3b46c754f2ed327ae6322561a617db7")
version("0.36.2", sha256="8e8947566bd3b65a54de4269df1abaa3d49cf5bfd2a963c3274a524c8a819ca7")
version("0.36.1", sha256="c7ffe12b99867675b5e9c9f31798f9521f14305c9d9f9485b171bcbd8697d09c")
version("0.36", sha256="97b3e72f26ca3a756d045008764d787a32c68f0a276fb7a29b6e1b4592fdecf6")
diff --git a/var/spack/repos/builtin/packages/r-terra/package.py b/var/spack/repos/builtin/packages/r-terra/package.py
index d71f827e72..7f4abc51ed 100644
--- a/var/spack/repos/builtin/packages/r-terra/package.py
+++ b/var/spack/repos/builtin/packages/r-terra/package.py
@@ -23,6 +23,7 @@ class RTerra(RPackage):
license("GPL-3.0-or-later")
+ version("1.7-78", sha256="658956b79d8a1371aefdf7300316f1756b58d436ba549ade012307684b2d4b7e")
version("1.7-29", sha256="3f39b052a34c9f1166a342be4c25bbdc1e2c81402edb734901d63fc6fa547ca5")
version("1.6-17", sha256="db888f4220ca511332f4d011345b2b207fcc1de26d2eae473e0eeb5dfd8bbc02")
version("1.5-21", sha256="091ee928ccaa6561aa9f8ee6c1c99f139dc89f1653c2a76a035cca14d404f43f")
diff --git a/var/spack/repos/builtin/packages/r-tester/package.py b/var/spack/repos/builtin/packages/r-tester/package.py
index 3d25497a42..ee8387ad31 100644
--- a/var/spack/repos/builtin/packages/r-tester/package.py
+++ b/var/spack/repos/builtin/packages/r-tester/package.py
@@ -15,6 +15,7 @@ class RTester(RPackage):
license("GPL-3.0-only")
+ version("0.2.0", sha256="bec8141b8572ca8d19a270a2eaec23aa4c01a167f32f2e05a4bf353418a0020b")
version("0.1.7", sha256="b9c645119c21c69450f3d366c911ed92ac7c14ef61652fd676a38fb9d420b5f4")
depends_on("r@3.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-testthat/package.py b/var/spack/repos/builtin/packages/r-testthat/package.py
index 756b98bad2..dcf74f0b19 100644
--- a/var/spack/repos/builtin/packages/r-testthat/package.py
+++ b/var/spack/repos/builtin/packages/r-testthat/package.py
@@ -17,6 +17,7 @@ class RTestthat(RPackage):
license("MIT")
+ version("3.2.1.1", sha256="d785ce3975939e28b61048b0e28d881c80904534ff21e5b1a79a0a934124e9f7")
version("3.1.7", sha256="1ad86b1739481c6c46359a6634ecc706bf513f34b26d7a62cbc719bbd4658eab")
version("3.1.5", sha256="a8f56b9426206ddfc30b550c82ff2f042ebe1c2f5bfd4184aec8facac8f5b7fc")
version("3.1.4", sha256="a47eec031b4e186a8bd331031371b2347063a283050eca2adbfaa37d7a6c9c09")
@@ -29,34 +30,52 @@ class RTestthat(RPackage):
version("1.0.2", sha256="0ef7df0ace1fddf821d329f9d9a5d42296085350ae0d94af62c45bd203c8415e")
depends_on("r@3.1:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@3.2.0:")
depends_on("r-brio", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-brio@1.1.3:", type=("build", "run"), when="@3.2.0:")
depends_on("r-callr@3.5.1:", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-callr@3.7.3:", type=("build", "run"), when="@3.2.0:")
depends_on("r-cli", type=("build", "run"), when="@2.0.0:")
depends_on("r-cli@2.2.0:", type=("build", "run"), when="@3.0.1:")
depends_on("r-cli@3.3.0:", type=("build", "run"), when="@3.1.4:")
depends_on("r-cli@3.4.0:", type=("build", "run"), when="@3.1.5:")
+ depends_on("r-cli@3.6.1:", type=("build", "run"), when="@3.2.0:")
depends_on("r-desc", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-desc@1.4.2:", type=("build", "run"), when="@3.2.0:")
depends_on("r-digest", type=("build", "run"))
- depends_on("r-ellipsis", type=("build", "run"), when="@2.3.2:")
- depends_on("r-ellipsis@0.2.0:", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-digest@0.6.33:", type=("build", "run"), when="@3.2.0:")
depends_on("r-evaluate", type=("build", "run"), when="@2.2.0:")
+ depends_on("r-evaluate@0.21:", type=("build", "run"), when="@3.2.0:")
depends_on("r-jsonlite", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-jsonlite@1.8.7:", type=("build", "run"), when="@3.2.0:")
depends_on("r-lifecycle", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-lifecycle@1.0.3:", type=("build", "run"), when="@3.2.0:")
depends_on("r-magrittr", type=("build", "run"))
+ depends_on("r-magrittr@2.0.3:", type=("build", "run"), when="@3.2.0:")
depends_on("r-pkgload", type=("build", "run"), when="@2.3.2:")
+ depends_on("r-pkgload@1.3.2.1:", type=("build", "run"), when="@3.2.0:")
depends_on("r-praise", type=("build", "run"))
+ depends_on("r-praise@1.0.0:", type=("build", "run"), when="@3.2.0:")
depends_on("r-processx", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-processx@3.8.2:", type=("build", "run"), when="@3.2.0:")
depends_on("r-ps@1.3.4:", type=("build", "run"), when="@3.0.1:")
+ depends_on("r-ps@1.7.5:", type=("build", "run"), when="@3.2.0:")
depends_on("r-r6@2.2.0:", type=("build", "run"))
+ depends_on("r-r6@2.5.1:", type=("build", "run"), when="@3.2.0:")
depends_on("r-rlang@0.3.0:", type=("build", "run"), when="@2.0.0:")
depends_on("r-rlang@0.4.1:", type=("build", "run"), when="@2.3.2:")
depends_on("r-rlang@0.4.9:", type=("build", "run"), when="@3.0.1:")
depends_on("r-rlang@1.0.1:", type=("build", "run"), when="@3.1.4:")
+ depends_on("r-rlang@1.1.1:", type=("build", "run"), when="@3.2.0:")
depends_on("r-waldo@0.2.1:", type=("build", "run"), when="@3.0.1:")
depends_on("r-waldo@0.2.4:", type=("build", "run"), when="@3.1.1:")
depends_on("r-waldo@0.4.0:", type=("build", "run"), when="@3.1.4:")
+ depends_on("r-waldo@0.5.1:", type=("build", "run"), when="@3.2.0:")
depends_on("r-withr@2.0.0:", type=("build", "run"), when="@2.0.0:")
depends_on("r-withr@2.3.0:", type=("build", "run"), when="@3.0.1:")
depends_on("r-withr@2.4.3:", type=("build", "run"), when="@3.1.2:")
+ depends_on("r-withr@2.5.0:", type=("build", "run"), when="@3.2.0:")
depends_on("r-crayon@1.3.4:", type=("build", "run"), when="@:3.1.4")
+ depends_on("r-ellipsis", type=("build", "run"), when="@2.3.2:3.2.0")
+ depends_on("r-ellipsis@0.2.0:", type=("build", "run"), when="@3.0.1:3.2.0")
diff --git a/var/spack/repos/builtin/packages/r-textshaping/package.py b/var/spack/repos/builtin/packages/r-textshaping/package.py
index 877fe54114..1c75b421d1 100644
--- a/var/spack/repos/builtin/packages/r-textshaping/package.py
+++ b/var/spack/repos/builtin/packages/r-textshaping/package.py
@@ -18,11 +18,15 @@ class RTextshaping(RPackage):
license("MIT")
+ version("0.4.0", sha256="35e940786bb278560de61bb55d4f46f8c86c878d0461613ceb8c98ba9b239d7a")
version("0.3.6", sha256="80e2c087962f55ce2811fbc798b09f5638c06c6b28c10cd3cb3827005b902ada")
depends_on("r@3.2.0:", type=("build", "run"))
- depends_on("r-systemfonts@1.0.0:", type=("build", "run"))
depends_on("r-cpp11@0.2.1:", type=("build", "run"))
+ depends_on("r-lifecycle", type=("build", "run"), when="@0.4.0:")
+ depends_on("r-systemfonts@1.0.0:", type=("build", "run"))
+ depends_on("r-systemfonts@1.1.0:", type=("build", "run"), when="@0.4.0:")
+ depends_on("pkgconfig", type="build")
depends_on("freetype")
depends_on("harfbuzz")
depends_on("fribidi")
diff --git a/var/spack/repos/builtin/packages/r-tfbstools/package.py b/var/spack/repos/builtin/packages/r-tfbstools/package.py
index 2e73e8248c..cc32e0a644 100644
--- a/var/spack/repos/builtin/packages/r-tfbstools/package.py
+++ b/var/spack/repos/builtin/packages/r-tfbstools/package.py
@@ -29,6 +29,8 @@ class RTfbstools(RPackage):
version("1.16.0", commit="565436a5a674d4dea7279e796a20c5bd2034f65a")
version("1.14.2", commit="e429fdefb6f7ee4585dd2a8ca3d0ced7a5bed4ff")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.2.2:", type=("build", "run"))
depends_on("r-biobase@2.28:", type=("build", "run"))
depends_on("r-biostrings@2.36.4:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-tfmpvalue/package.py b/var/spack/repos/builtin/packages/r-tfmpvalue/package.py
index c899a4a4cf..0f650954a4 100644
--- a/var/spack/repos/builtin/packages/r-tfmpvalue/package.py
+++ b/var/spack/repos/builtin/packages/r-tfmpvalue/package.py
@@ -22,5 +22,8 @@ class RTfmpvalue(RPackage):
version("0.0.8", sha256="6d052529f7b59d0384edc097f724f70468013777b6adf4c63e61a359029d3841")
version("0.0.6", sha256="cee3aa2d4e22856865d820f695e29a5f23486e5e08cd42cb95a0728f5f9522a1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.0.1:", type=("build", "run"))
depends_on("r-rcpp@0.11.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-tibble/package.py b/var/spack/repos/builtin/packages/r-tibble/package.py
index c01e9dfc96..a2fe8bd443 100644
--- a/var/spack/repos/builtin/packages/r-tibble/package.py
+++ b/var/spack/repos/builtin/packages/r-tibble/package.py
@@ -31,6 +31,8 @@ class RTibble(RPackage):
version("1.2", sha256="ed8a8bd0591223f742be80fd1cd8c4a9618d0f04011ec95c272b61ea45193104")
version("1.1", sha256="10ea18890e5514faa4c2c05fa231a6e2bbb7689f3800850cead214306414c88e")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.1.2:", type=("build", "run"))
depends_on("r@3.1.0:", type=("build", "run"), when="@1.3.0:")
depends_on("r@3.4.0:", type=("build", "run"), when="@3.2.1:")
diff --git a/var/spack/repos/builtin/packages/r-tictoc/package.py b/var/spack/repos/builtin/packages/r-tictoc/package.py
index 7263151423..ad06c0a532 100644
--- a/var/spack/repos/builtin/packages/r-tictoc/package.py
+++ b/var/spack/repos/builtin/packages/r-tictoc/package.py
@@ -22,6 +22,7 @@ class RTictoc(RPackage):
license("Apache-2.0 OR custom")
+ version("1.2.1", sha256="8fcdb7c9a1e4b4817bcab654effd64dea6ec749a7901d4060d5b5c625fc88833")
version("1.2", sha256="f05ea4b4142a90b0dc5d10356be3748625ef86bbd0e4399c56455654165ff20c")
version("1.1", sha256="120f868ba276bda70c8edef5d6c092586cf73db0fa02eb5459d8f55350fb474d")
version("1.0.1", sha256="a09a1535c417ddf6637bbbda5fca6edab6c7f7b252a64e57e99d4d0748712705")
diff --git a/var/spack/repos/builtin/packages/r-tidycensus/package.py b/var/spack/repos/builtin/packages/r-tidycensus/package.py
index 19b3865c0d..855763530f 100644
--- a/var/spack/repos/builtin/packages/r-tidycensus/package.py
+++ b/var/spack/repos/builtin/packages/r-tidycensus/package.py
@@ -20,6 +20,7 @@ class RTidycensus(RPackage):
license("MIT")
+ version("1.6.5", sha256="b846406eeff21cf8035f6cfe0479eadb5fec67e02ef7106294f9d2ddff45f122")
version("1.3.2", sha256="ca47323f19c94a3c767bef59986f4a6cb4e455b3eb21ea64f1b3d6339443c515")
version("1.2.3", sha256="23bc58bb6e20e1056e40dca55a49576b5e186fdb324f00fa9d5c07fb675f32ff")
version("1.2.2", sha256="5cdbb92314061c9d8d3d62f623699fa115d7faae1f4a961d55ab905538f8e7cc")
diff --git a/var/spack/repos/builtin/packages/r-tidygraph/package.py b/var/spack/repos/builtin/packages/r-tidygraph/package.py
index 0b4496c6ed..4331c3fa90 100644
--- a/var/spack/repos/builtin/packages/r-tidygraph/package.py
+++ b/var/spack/repos/builtin/packages/r-tidygraph/package.py
@@ -19,6 +19,7 @@ class RTidygraph(RPackage):
license("MIT")
+ version("1.3.1", sha256="aac1d4bb9396081bbeecbde11a3cd1a26a56bd6b1f608a628b359cb37c18ac1a")
version("1.2.3", sha256="b09c06b12583ae57edd1ec01e61a0e1b7a4b82358361fb28a6046dbece475687")
version("1.2.2", sha256="d555cad6b5b56bd2edaa29950a0fd15942e972db21561bfd5cd64fd9a8936470")
version("1.2.1", sha256="2fbdc2db18c5ad48c72f14d2d04111f4b0d4c434ad87c280eda3bcb98673ad36")
@@ -30,6 +31,8 @@ class RTidygraph(RPackage):
depends_on("r-dplyr@0.8.5:", type=("build", "run"), when="@1.2.0:")
depends_on("r-igraph", type=("build", "run"))
depends_on("r-igraph@1.3.0:", type=("build", "run"), when="@1.2.3:")
+ depends_on("r-igraph@2.0.0:", type=("build", "run"), when="@1.3.1:")
+ depends_on("r-lifecycle", type=("build", "run"), when="@1.3.0:")
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-tidyr/package.py b/var/spack/repos/builtin/packages/r-tidyr/package.py
index 1a690a07a2..3e9d7eb748 100644
--- a/var/spack/repos/builtin/packages/r-tidyr/package.py
+++ b/var/spack/repos/builtin/packages/r-tidyr/package.py
@@ -21,6 +21,7 @@ class RTidyr(RPackage):
license("MIT")
+ version("1.3.1", sha256="e820c261cb5543f572f49276a7bdc7302aa4215da4bf850b1b939a315353835d")
version("1.3.0", sha256="8d532b9366fdd3ec9827b51830e559a49d073425007c766025f0e603964e0a9d")
version("1.2.1", sha256="6971766d3663dc75c2328ab257816f4e42d9fdc05c2d87d171b8b9b5ecce61af")
version("1.2.0", sha256="8cd01da9e97827521d01ea50b9225f2705c46b7538bbf74bec6249a04c1213a8")
@@ -33,6 +34,7 @@ class RTidyr(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@1.3.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.3.1:")
depends_on("r-dplyr@0.7.0:", type=("build", "run"))
depends_on("r-dplyr@0.8.2:", type=("build", "run"), when="@1.1.2:")
depends_on("r-dplyr@1.0.0:", type=("build", "run"), when="@1.2.0:")
@@ -46,6 +48,7 @@ class RTidyr(RPackage):
depends_on("r-purrr@1.0.1:", type=("build", "run"), when="@1.3.0:")
depends_on("r-rlang", type=("build", "run"))
depends_on("r-rlang@1.0.4:", type=("build", "run"), when="@1.3.0:")
+ depends_on("r-rlang@1.1.1:", type=("build", "run"), when="@1.3.1:")
depends_on("r-tibble", type=("build", "run"))
depends_on("r-tibble@2.1.1:", type=("build", "run"), when="@1.1.2:")
depends_on("r-tidyselect@0.2.5:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-tidyselect/package.py b/var/spack/repos/builtin/packages/r-tidyselect/package.py
index 91c1235e7b..e7fcba5f2c 100644
--- a/var/spack/repos/builtin/packages/r-tidyselect/package.py
+++ b/var/spack/repos/builtin/packages/r-tidyselect/package.py
@@ -17,6 +17,7 @@ class RTidyselect(RPackage):
license("MIT")
+ version("1.2.1", sha256="169e97ba0bbfbcdf4a80534322751f87a04370310c40e27f04aac6525d45903c")
version("1.2.0", sha256="538d26b727e37d618e2efd3b00836048f103112a03e6994bf07a02392e269e3b")
version("1.1.2", sha256="0389a3b15417954a30d6d692f6ebdd3d0f318cb94a5c9b05365df2f4ea1d8270")
version("1.1.1", sha256="18eb6a6746196a81ce19ee6cbf1db0c33f494177b97e2419312ef25a00ae486b")
@@ -38,10 +39,11 @@ class RTidyselect(RPackage):
depends_on("r-vctrs@0.2.2:", type=("build", "run"), when="@1.1.0:")
depends_on("r-vctrs@0.3.0:", type=("build", "run"), when="@1.1.1:")
depends_on("r-vctrs@0.4.1:", type=("build", "run"), when="@1.2.0:")
+ depends_on("r-vctrs@0.5.2:", type=("build", "run"), when="@1.2.1:")
depends_on("r-rcpp@0.12.0:", type=("build", "run"), when="@:0.2.5")
depends_on("r-cli@3.3.0:", type=("build", "run"), when="@1.2.0:")
depends_on("r-ellipsis", type=("build", "run"), when="@1.1.0:1.1.2")
- depends_on("r-purrr", type=("build", "run"))
+ depends_on("r-purrr", type=("build", "run"), when="@:1.1.2")
depends_on("r-purrr@0.3.2:", type=("build", "run"), when="@1.1.0:1.1.2")
diff --git a/var/spack/repos/builtin/packages/r-tidytree/package.py b/var/spack/repos/builtin/packages/r-tidytree/package.py
index 53ec7b519e..9636cedcd1 100644
--- a/var/spack/repos/builtin/packages/r-tidytree/package.py
+++ b/var/spack/repos/builtin/packages/r-tidytree/package.py
@@ -18,6 +18,7 @@ class RTidytree(RPackage):
license("Artistic-2.0")
+ version("0.4.6", sha256="dba909ba767283fa76795a67e048ff1c8cd339c7e44f64c9698c70ecb3d92292")
version("0.4.2", sha256="cb831a66d8afa5e21f5072e4fbebcbd2228881090d0040f87605f5aeefda155e")
version("0.4.1", sha256="fbc4364d17e1b1c26ed06af0cdf36c88a5bc562fdbd4731ab179e30bba4009eb")
version("0.3.9", sha256="12435d4f4c4d734b2a758cb13eb3b44bdfa8fdfa79a6e81fb99f7ce3a5d82edf")
diff --git a/var/spack/repos/builtin/packages/r-tiff/package.py b/var/spack/repos/builtin/packages/r-tiff/package.py
index b99b115da6..d133e132af 100644
--- a/var/spack/repos/builtin/packages/r-tiff/package.py
+++ b/var/spack/repos/builtin/packages/r-tiff/package.py
@@ -17,6 +17,7 @@ class RTiff(RPackage):
license("GPL-2.0-only OR GPL-3.0-only")
+ version("0.1-12", sha256="df10ce719f92597572763182f7cb03686b8d7fb9123d036a4daf5b10738e815c")
version("0.1-11", sha256="b8c3ea15114d972f8140541c7b01f5ce2e5322af1f63c1a083aaf766fd3eec75")
version("0.1-10", sha256="535154e89e85e14fe697469d2c59826a44c7937e7eca2eaca1aee6b0fe320afe")
version("0.1-6", sha256="623bd9c16a426df7e6056738c5d91da86ea9b49df375eea6b5127e4e458dc4fb")
diff --git a/var/spack/repos/builtin/packages/r-tigris/package.py b/var/spack/repos/builtin/packages/r-tigris/package.py
index cb556f39c8..909fe240ea 100644
--- a/var/spack/repos/builtin/packages/r-tigris/package.py
+++ b/var/spack/repos/builtin/packages/r-tigris/package.py
@@ -16,6 +16,7 @@ class RTigris(RPackage):
license("MIT")
+ version("2.1", sha256="796bed6ce003323815d606886472bf21c101656fca8a593daa3b69cb3bd6fd97")
version("2.0.1", sha256="d87c6b0c11ffb967699d345c6bfcfa82581a0753e1130bf0c927b2960b074d8c")
version("1.6.1", sha256="927e8da3f7120bcc10f0b4ded95687512693e069f082eea7aea6302a2f1b2db2")
version("1.6", sha256="fa14fbbaf44f5ade1cc92e6e4e4ed2e775bc7c106310711d16b0135a948a1661")
diff --git a/var/spack/repos/builtin/packages/r-timechange/package.py b/var/spack/repos/builtin/packages/r-timechange/package.py
index 27425f56bd..97ffb606e8 100644
--- a/var/spack/repos/builtin/packages/r-timechange/package.py
+++ b/var/spack/repos/builtin/packages/r-timechange/package.py
@@ -21,6 +21,7 @@ class RTimechange(RPackage):
license("GPL-3.0-only")
+ version("0.3.0", sha256="d85c0b5514ab9578d16032e703c33f197feaed1a424c834ebfcbf0ad46ae46b4")
version("0.2.0", sha256="3d602008052123daef94a5c3f5154c5461b4ec0432ab70c37273d7ddd252f7f1")
version("0.1.1", sha256="8503919d233d7d7b81fe47692f0f2d6742ff4cae7320a5522bf98f077f5d7f70")
diff --git a/var/spack/repos/builtin/packages/r-timedate/package.py b/var/spack/repos/builtin/packages/r-timedate/package.py
index 60d51b2794..c299e1ba86 100644
--- a/var/spack/repos/builtin/packages/r-timedate/package.py
+++ b/var/spack/repos/builtin/packages/r-timedate/package.py
@@ -21,6 +21,7 @@ class RTimedate(RPackage):
cran = "timeDate"
+ version("4032.109", sha256="402841bda47e8c31f49773de2ff5447e9780bc7c8af5fb18be9287b546fcb958")
version("4022.108", sha256="a5949b4fe2f6bdff751fc0793df8e3150cc25c078d48a28c066c10a6c4bfceef")
version("4021.106", sha256="14adf1ec6cbd80f11a243fa66ea943725a7a4c75923ae2d8e424235d500b10e2")
version("3043.102", sha256="377cba03cddab8c6992e31d0683c1db3a73afa9834eee3e95b3b0723f02d7473")
diff --git a/var/spack/repos/builtin/packages/r-tinytex/package.py b/var/spack/repos/builtin/packages/r-tinytex/package.py
index 754386ac72..71efa6f83a 100644
--- a/var/spack/repos/builtin/packages/r-tinytex/package.py
+++ b/var/spack/repos/builtin/packages/r-tinytex/package.py
@@ -20,6 +20,7 @@ class RTinytex(RPackage):
license("MIT")
+ version("0.52", sha256="932a713b9fdd52fe8869e8c38d03f15602f2c02ec543d4dabffde2a3981f513a")
version("0.45", sha256="0c2fbbd09e80af80ca6b685bf0653f070da97b85413d39af966aba28f376e92c")
version("0.42", sha256="205f7a1978118aa38b6d9f7d3e1667c635da262b43967d1a879520284c2e22b1")
version("0.39", sha256="f22e9b77c200fe44cc073b759c2b2bc3310a2382d897282548aa02dcbabc25ed")
diff --git a/var/spack/repos/builtin/packages/r-tinytiger/package.py b/var/spack/repos/builtin/packages/r-tinytiger/package.py
index 930f366c34..832df344c2 100644
--- a/var/spack/repos/builtin/packages/r-tinytiger/package.py
+++ b/var/spack/repos/builtin/packages/r-tinytiger/package.py
@@ -23,13 +23,15 @@ class RTinytiger(RPackage):
license("MIT")
+ version("0.0.9", sha256="fe9b1098a2d1d4722f8a7657a9244afcd3d6b7f4f112fc6a92c2fb75da07de59")
version("0.0.4", sha256="818328b5095d9e8b302f1a04d004cd3ec6e62d945dbd757fe15e9ab768a7459e")
version("0.0.3", sha256="841d92dd4185b9bff5eef0d3635805c5a3efb1bc4ff0a1101ef264417e37921c")
depends_on("r@2.0.0:", type=("build", "run"))
depends_on("r@2.10:", type=("build", "run"), when="@0.0.4:")
- depends_on("r-rlang")
depends_on("r-cli")
depends_on("r-glue")
depends_on("r-curl")
depends_on("r-sf")
+
+ depends_on("r-rlang", type=("build", "run"), when="@:0.0.8")
diff --git a/var/spack/repos/builtin/packages/r-tmvnsim/package.py b/var/spack/repos/builtin/packages/r-tmvnsim/package.py
index 69cf0c88fe..6beba71357 100644
--- a/var/spack/repos/builtin/packages/r-tmvnsim/package.py
+++ b/var/spack/repos/builtin/packages/r-tmvnsim/package.py
@@ -24,3 +24,6 @@ class RTmvnsim(RPackage):
license("GPL-2.0-only")
version("1.0-2", sha256="97f63d0bab3b240cc7bdbe6e6e74e90ad25a4382a345ee51a26fe3959edeba0f")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-triebeard/package.py b/var/spack/repos/builtin/packages/r-triebeard/package.py
index e20dcf6e0d..98590e0259 100644
--- a/var/spack/repos/builtin/packages/r-triebeard/package.py
+++ b/var/spack/repos/builtin/packages/r-triebeard/package.py
@@ -21,4 +21,6 @@ class RTriebeard(RPackage):
version("0.4.1", sha256="192f2fef6341e43bd56ef4f9841e813e07be990f4ffcf38c5606259630efe0f7")
version("0.3.0", sha256="bf1dd6209cea1aab24e21a85375ca473ad11c2eff400d65c6202c0fb4ef91ec3")
+ depends_on("cxx", type="build") # generated
+
depends_on("r-rcpp", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-truncnorm/package.py b/var/spack/repos/builtin/packages/r-truncnorm/package.py
index 2ffcf43b65..44d17bb4ad 100644
--- a/var/spack/repos/builtin/packages/r-truncnorm/package.py
+++ b/var/spack/repos/builtin/packages/r-truncnorm/package.py
@@ -20,5 +20,7 @@ class RTruncnorm(RPackage):
version("1.0-8", sha256="49564e8d87063cf9610201fbc833859ed01935cc0581b9e21c42a0d21a47c87e")
version("1.0.0", sha256="dc1b018cb6d9ad5beb2d9e2f3ebe56c3f69d7a98fc5a1d963dd7933d209ac272")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.7.0:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@1.0-8:")
diff --git a/var/spack/repos/builtin/packages/r-tseries/package.py b/var/spack/repos/builtin/packages/r-tseries/package.py
index 55c8888de3..bf8fa57c60 100644
--- a/var/spack/repos/builtin/packages/r-tseries/package.py
+++ b/var/spack/repos/builtin/packages/r-tseries/package.py
@@ -13,6 +13,7 @@ class RTseries(RPackage):
license("GPL-2.0-only")
+ version("0.10-57", sha256="18754bb7642728916e30e67cb75462a296699b9b1f2ef1fb9803199f00f89bee")
version("0.10-53", sha256="ec388ee6d022752bbebbecbf22d793d31f3734982e3f2e3ffd8dde14bffcca56")
version("0.10-52", sha256="9399c8dbedb3b44b8b3b854f6e8867e0a14f3727a7aa66ec9c6eff069ead8f45")
version("0.10-51", sha256="a55f20704883710ab58ea479e20cf0f263c50d54282f693793cda4af664c207f")
@@ -23,6 +24,8 @@ class RTseries(RPackage):
version("0.10-42", sha256="827f79858715c700e8cabd2c27853ba88ad0e05eb043bc94e126b155a75546c4")
depends_on("r@2.10.0:", type=("build", "run"))
+ depends_on("r@3.4.0:", type=("build", "run"), when="@0.10-57:")
+ depends_on("r-jsonlite", type=("build", "run"), when="@0.10-54:")
depends_on("r-quadprog", type=("build", "run"))
depends_on("r-zoo", type=("build", "run"))
depends_on("r-quantmod@0.4-9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-ttr/package.py b/var/spack/repos/builtin/packages/r-ttr/package.py
index 74b7203b52..9517b98fcd 100644
--- a/var/spack/repos/builtin/packages/r-ttr/package.py
+++ b/var/spack/repos/builtin/packages/r-ttr/package.py
@@ -15,6 +15,7 @@ class RTtr(RPackage):
cran = "TTR"
+ version("0.24.4", sha256="89732b9c359bae2f41cd23db649f0897c10fab0702d780c4c25a997322710284")
version("0.24.3", sha256="4d9aef32647664be5cf965b05f21ed62cde9425fa87c21530852e05ef7aaba87")
version("0.24.2", sha256="2587b988d9199474a19470b9b999b99133d0d8aa45410813e05c5f0ed763711b")
version("0.23-4", sha256="eb17604da986213b3b924f0af65c3d089502a658a253ee34f6b8f6caccf6bfa2")
diff --git a/var/spack/repos/builtin/packages/r-tweenr/package.py b/var/spack/repos/builtin/packages/r-tweenr/package.py
index 254f43f96f..ec6b9f4230 100644
--- a/var/spack/repos/builtin/packages/r-tweenr/package.py
+++ b/var/spack/repos/builtin/packages/r-tweenr/package.py
@@ -19,6 +19,7 @@ class RTweenr(RPackage):
license("MIT")
+ version("2.0.3", sha256="efabe512a45d653787ba40f87f3e23add4037f88573a102fa9ac7a5ff43c8cbe")
version("2.0.2", sha256="64bbfded418d4880e3636f434571c20303d2f66be6950d64583a864fbb661ff3")
version("1.0.2", sha256="1805f575da6705ca4e5ec1c4605222fc826ba806d9ff9af41770294fe08ff69f")
version("1.0.1", sha256="efd68162cd6d5a4f6d833dbf785a2bbce1cb7b9f90ba3fb060931a4bd705096b")
diff --git a/var/spack/repos/builtin/packages/r-tzdb/package.py b/var/spack/repos/builtin/packages/r-tzdb/package.py
index 8f606a1a1e..596b3a4acd 100644
--- a/var/spack/repos/builtin/packages/r-tzdb/package.py
+++ b/var/spack/repos/builtin/packages/r-tzdb/package.py
@@ -23,10 +23,12 @@ class RTzdb(RPackage):
license("MIT")
+ version("0.4.0", sha256="4253c66041bdddfd463c98183bf0052fbcacdb7c5cff9eadbb858b3dcf9d3a23")
version("0.3.0", sha256="6099f0ec1fba692b51b4360aa776902a39f10dae815933c31994b8e4d4277038")
version("0.2.0", sha256="c335905d452b400af7ed54b916b5246cb3f47ede0602911a2bcb25a1cf56d5a9")
depends_on("r@3.3:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@0.3.0:")
+ depends_on("r@3.5.0:", type=("build", "run"), when="@0.4.0:")
depends_on("r-cpp11@0.4.0:", type=("build", "run"))
depends_on("r-cpp11@0.4.2:", type=("build", "run"), when="@0.3.0:")
diff --git a/var/spack/repos/builtin/packages/r-ucminf/package.py b/var/spack/repos/builtin/packages/r-ucminf/package.py
index ba6dc6e92a..76ec1fef1b 100644
--- a/var/spack/repos/builtin/packages/r-ucminf/package.py
+++ b/var/spack/repos/builtin/packages/r-ucminf/package.py
@@ -19,5 +19,8 @@ class RUcminf(RPackage):
license("GPL-2.0-or-later")
+ version("1.2.2", sha256="4bdb6ae769fa49a167cfdc92dc544ba3b6f34df6c08810cfb0c55613aff5bd29")
version("1.1-4.1", sha256="01a5b6f373ad267d22e2c29b8f7b6e31a1a148e48f4413e6a38e51aa049976b2")
version("1.1-4", sha256="a2eb382f9b24e949d982e311578518710f8242070b3aa3314a331c1e1e7f6f07")
+
+ depends_on("r@3.5.0:", when="@1.2.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-udunits2/package.py b/var/spack/repos/builtin/packages/r-udunits2/package.py
index 22e2884e9b..be6878d2e7 100644
--- a/var/spack/repos/builtin/packages/r-udunits2/package.py
+++ b/var/spack/repos/builtin/packages/r-udunits2/package.py
@@ -19,5 +19,7 @@ class RUdunits2(RPackage):
version("0.13.2", sha256="ee00898801b3282717cba40a9ef930515506386aa82a050356d1a9c80a9f5969")
version("0.13", sha256="d155d3c07f6202b65dec4075ffd1e1c3f4f35f5fdece8cfb319d39256a3e5b79")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("udunits")
diff --git a/var/spack/repos/builtin/packages/r-units/package.py b/var/spack/repos/builtin/packages/r-units/package.py
index 01ebe5a976..83719b38ca 100644
--- a/var/spack/repos/builtin/packages/r-units/package.py
+++ b/var/spack/repos/builtin/packages/r-units/package.py
@@ -22,6 +22,7 @@ class RUnits(RPackage):
license("GPL-2.0-only")
+ version("0.8-5", sha256="d95e80af760b053e10a1e33ce1f0c1280a84e84bd4b1d9c34d1fe9fc153603b1")
version("0.8-1", sha256="d3e1ba246b4c97205bc3da3cf45d6b5bd5c196b8d421b84b4e94b2090985cd9a")
version("0.8-0", sha256="9c46fe138e8c1c3d3a51268776412f02d09673656516148cccb71b1071beb21a")
version("0.7-2", sha256="b90be023431100632b3081747af9e743e615452b4ad38810991f7b024b7040eb")
diff --git a/var/spack/repos/builtin/packages/r-urca/package.py b/var/spack/repos/builtin/packages/r-urca/package.py
index 2dcbdb474b..178ceca85b 100644
--- a/var/spack/repos/builtin/packages/r-urca/package.py
+++ b/var/spack/repos/builtin/packages/r-urca/package.py
@@ -16,6 +16,7 @@ class RUrca(RPackage):
license("GPL-2.0-or-later")
+ version("1.3-4", sha256="fe3d6ce5041f1e7caaf3137dfb6187640bcd2d208e19c59ee1202355ac0acb16")
version("1.3-3", sha256="43baa8b6735f8325a69e6a43686f4fecd77a0eb7f60da25b4fc5c51b9271e9f1")
version("1.3-0", sha256="621cc82398e25b58b4a16edf000ed0a1484d9a0bc458f734e97b6f371cc76aaa")
diff --git a/var/spack/repos/builtin/packages/r-urltools/package.py b/var/spack/repos/builtin/packages/r-urltools/package.py
index 013d8555d7..9dde5976a7 100644
--- a/var/spack/repos/builtin/packages/r-urltools/package.py
+++ b/var/spack/repos/builtin/packages/r-urltools/package.py
@@ -22,6 +22,9 @@ class RUrltools(RPackage):
version("1.7.3", sha256="6020355c1b16a9e3956674e5dea9ac5c035c8eb3eb6bbdd841a2b5528cafa313")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10:", type=("build", "run"))
depends_on("r-rcpp", type=("build", "run"))
depends_on("r-triebeard", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-usethis/package.py b/var/spack/repos/builtin/packages/r-usethis/package.py
index 497cfe55a7..70eafc1274 100644
--- a/var/spack/repos/builtin/packages/r-usethis/package.py
+++ b/var/spack/repos/builtin/packages/r-usethis/package.py
@@ -18,6 +18,7 @@ class RUsethis(RPackage):
license("MIT")
+ version("3.0.0", sha256="98f850f9ceaae37eb16ccd1232275b4e8f818c115c67151fa99096c477f7ccb5")
version("2.1.6", sha256="31dc6707577065ac1d4acb7d4cbf135942727c5cc2699092198c544be86f6818")
version("2.1.5", sha256="7d539e16ecdc1cd45ba1a215d42d8b9c16bc38280ddd27048003dbb37b16f052")
version("2.0.0", sha256="22aa2b59f36a8701a4648554c7b0e010253bf917a0f431f06efac7d8a6b59854")
@@ -26,6 +27,7 @@ class RUsethis(RPackage):
depends_on("r@3.2:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@2.1.5:")
+ depends_on("r@3.6:", type=("build", "run"), when="@2.2.0:")
depends_on("r-cli", type=("build", "run"), when="@1.6.1:")
depends_on("r-cli@3.0.1:", type=("build", "run"), when="@2.1.5:")
depends_on("r-clipr@0.3.0:", type=("build", "run"))
@@ -33,6 +35,7 @@ class RUsethis(RPackage):
depends_on("r-curl@2.7:", type=("build", "run"))
depends_on("r-desc", type=("build", "run"))
depends_on("r-desc@1.4.0:", type=("build", "run"), when="@2.1.5:")
+ depends_on("r-desc@1.4.2:", type=("build", "run"), when="@2.2.0:")
depends_on("r-fs@1.3.0:", type=("build", "run"))
depends_on("r-gert@1.0.2:", type=("build", "run"), when="@2.0.0:")
depends_on("r-gert@1.4.1:", type=("build", "run"), when="@2.1.5:")
@@ -50,6 +53,7 @@ class RUsethis(RPackage):
depends_on("r-rlang@0.4.3:", type=("build", "run"), when="@1.6.1:")
depends_on("r-rlang@0.4.10:", type=("build", "run"), when="@2.1.5:")
depends_on("r-rlang@1.0.0:", type=("build", "run"), when="@2.1.6:")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@2.2.0:")
depends_on("r-rprojroot@1.2:", type=("build", "run"))
depends_on("r-rstudioapi", type=("build", "run"))
depends_on("r-whisker", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-utf8/package.py b/var/spack/repos/builtin/packages/r-utf8/package.py
index ac87cb8e04..09a2d22c50 100644
--- a/var/spack/repos/builtin/packages/r-utf8/package.py
+++ b/var/spack/repos/builtin/packages/r-utf8/package.py
@@ -16,6 +16,7 @@ class RUtf8(RPackage):
license("Apache-2.0 OR custom")
+ version("1.2.4", sha256="418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d")
version("1.2.3", sha256="c0a88686591f4ad43b52917d0964e9df4c62d8858fe25135a1bf357dfcbd6347")
version("1.2.2", sha256="a71aee87d43a9bcf29249c7a5a2e9ca1d2a836e8d5ee3a264d3062f25378d8f4")
version("1.1.4", sha256="f6da9cadfc683057d45f54b43312a359cf96ec2731c0dda18a8eae31d1e31e54")
diff --git a/var/spack/repos/builtin/packages/r-uuid/package.py b/var/spack/repos/builtin/packages/r-uuid/package.py
index a8b3bcc731..deecee8427 100644
--- a/var/spack/repos/builtin/packages/r-uuid/package.py
+++ b/var/spack/repos/builtin/packages/r-uuid/package.py
@@ -17,6 +17,7 @@ class RUuid(RPackage):
license("MIT")
+ version("1.2-1", sha256="f90e49733d7d6ea7cf91abdc07b7d0e9a34a4b993e6914d754f0621281fc4b96")
version("1.1-0", sha256="e75b50ee7dc8c4c8e7083023e954ffd1c6a004431bf5e9094463e46aa760f42f")
version("1.0-3", sha256="456e4633659f20242fd7cd585ad005a3e07265f1d1db383fca6794c8ac2c8346")
version("0.1-4", sha256="98e0249dda17434bfa209c2058e9911e576963d4599be9f7ea946e664f8ca93e")
diff --git a/var/spack/repos/builtin/packages/r-uwot/package.py b/var/spack/repos/builtin/packages/r-uwot/package.py
index c5e5d78dbd..c18015609e 100644
--- a/var/spack/repos/builtin/packages/r-uwot/package.py
+++ b/var/spack/repos/builtin/packages/r-uwot/package.py
@@ -24,6 +24,7 @@ class RUwot(RPackage):
license("GPL-3.0-or-later")
+ version("0.2.2", sha256="d9938c43d29530d4b36d1b2649cc679b09945a740db2cd3a266242b1aa9a6cd1")
version("0.1.14", sha256="8016e8192b7e72604ca71840cbe43fa1d2caed8a8ad7cbf20e85cd3b384a9fe0")
version("0.1.11", sha256="4fcf90f1369a2a1f01db9e05a2365b155b2ada8e51e1f7f3ba5122d86affd41b")
version("0.1.10", sha256="6ee1b6027bce679cd5a35f647f516a5b327632234bcf323c7f3d5b5e10807d23")
@@ -36,6 +37,7 @@ class RUwot(RPackage):
depends_on("r-rcppannoy@0.0.17:", type=("build", "run"), when="@0.1.10:")
depends_on("r-irlba", type=("build", "run"))
depends_on("r-rcppprogress", type=("build", "run"))
+ depends_on("r-rspectra", type=("build", "run"), when="@0.2.2:")
depends_on("r-dqrng", type=("build", "run"))
depends_on("r-rcppparallel", type=("build", "run"), when="@:0.1.3")
diff --git a/var/spack/repos/builtin/packages/r-v8/package.py b/var/spack/repos/builtin/packages/r-v8/package.py
index 423c952e82..0d4dbf747d 100644
--- a/var/spack/repos/builtin/packages/r-v8/package.py
+++ b/var/spack/repos/builtin/packages/r-v8/package.py
@@ -15,6 +15,7 @@ class RV8(RPackage):
cran = "V8"
+ version("5.0.0", sha256="668fb759f973016e1e6aae21d711e83226d6895b43b2476c77feadf47896b21a")
version("4.3.0", sha256="7e395c4faed0d2a9d647820269d2d374953fc67c6108d57d63e93ec570dbe0d0")
version("4.2.2", sha256="50653527198637a37c010052f394839f50a3c643975aac1d04e42d36f8e5313b")
version("4.2.1", sha256="99881af4798d11da0adccd8e4e1aa5dc4adccf5e3572724c14f6f90c2b8c3ff0")
diff --git a/var/spack/repos/builtin/packages/r-variantannotation/package.py b/var/spack/repos/builtin/packages/r-variantannotation/package.py
index 6df0be0c65..6b84d24c8d 100644
--- a/var/spack/repos/builtin/packages/r-variantannotation/package.py
+++ b/var/spack/repos/builtin/packages/r-variantannotation/package.py
@@ -25,6 +25,8 @@ class RVariantannotation(RPackage):
version("1.24.5", commit="468d7f53fd743e04c9af853d58e871b4cc13a090")
version("1.22.3", commit="3a91b6d4297aa416d5f056dec6f8925eb1a8eaee")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.8.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@1.40.0:")
depends_on("r-biocgenerics@0.15.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-vcd/package.py b/var/spack/repos/builtin/packages/r-vcd/package.py
index 14933c740c..47bb1bb196 100644
--- a/var/spack/repos/builtin/packages/r-vcd/package.py
+++ b/var/spack/repos/builtin/packages/r-vcd/package.py
@@ -20,6 +20,7 @@ class RVcd(RPackage):
license("GPL-2.0-only")
+ version("1.4-12", sha256="c931ef115529931cddb1d5caec4d4d3569ebf12aadde719b2f5019812c9ded88")
version("1.4-11", sha256="7a54e855689e1429d46e0d4d7a956f96b0ad2fd0c7084fa023902c55849e0932")
version("1.4-10", sha256="7188192afa289350cc1b89790f4f8f5a5114c1c88bee7715a0c8f5347aa0b35b")
version("1.4-9", sha256="a5b420ad5ff1a27fa92f98099a8b43f2dded7e5f60297b3e4d947ad6f039568f")
diff --git a/var/spack/repos/builtin/packages/r-vcfr/package.py b/var/spack/repos/builtin/packages/r-vcfr/package.py
index f8320ac87e..a818ee8b6b 100644
--- a/var/spack/repos/builtin/packages/r-vcfr/package.py
+++ b/var/spack/repos/builtin/packages/r-vcfr/package.py
@@ -22,6 +22,7 @@ class RVcfr(RPackage):
maintainers("dorton21")
+ version("1.15.0", sha256="df17e48b961d96f2a78a1a15037df674f57d0445f2669e401543d8082f0b49fa")
version("1.14.0", sha256="8576dbd2e5a707dabc20acbbea3fe18b6a783910e622423ac203609a386204cb")
version("1.13.0", sha256="743ce845732ada638f0f8a2cd789cd06aa25d818fec87c8bdb998f7c77089ebc")
version("1.12.0", sha256="dd87ff010365de363864a44ca49887c0fdad0dd18d0d9c66e44e39c2d4581d52")
diff --git a/var/spack/repos/builtin/packages/r-vctrs/package.py b/var/spack/repos/builtin/packages/r-vctrs/package.py
index 49e8bf5e37..4e6a1e9661 100644
--- a/var/spack/repos/builtin/packages/r-vctrs/package.py
+++ b/var/spack/repos/builtin/packages/r-vctrs/package.py
@@ -18,7 +18,14 @@ class RVctrs(RPackage):
license("MIT")
+ version("0.6.5", sha256="43167d2248fd699594044b5c8f1dbb7ed163f2d64761e08ba805b04e7ec8e402")
+ version("0.6.4", sha256="8a80192356e724d21bd89a0ce3e5835856fd5bb1651e7fc205c6fee58fd001c8")
+ version("0.6.3", sha256="93dc220dcde8b440586b2260460ef354e827a17dfec1ea6a9815585a10cfa5c2")
version("0.6.2", sha256="feecabe11f6c55e04377d36fa59842187f0a6fe52aaf867c08289a948781ee84")
+ version("0.6.1", sha256="77552463bd7c40af2618d635de6bb9ad1614d161a5e34d90167601dc5e8e1283")
+ version("0.6.0", sha256="be0b712c4e6aae353120a60ded6a4301eb9631c8d256927b79b9ad83b4299757")
+ version("0.5.2", sha256="76bf10243b9b31e23f56ffdaa1677a01767699e2098487f86bd42cb801d8c047")
+ version("0.5.1", sha256="497982f717f21e7612b84940e95c282e2a96b942e6d47108f92cd92b7341db07")
version("0.5.0", sha256="7c372e13c39ddace9c9bb9f33238de6dd2cd0f37dcc7054ba6435d271e5df686")
version("0.4.2", sha256="5414d1d6977163b4e85efa40d6facdd98089d6ffd460daaba729d4200942d815")
version("0.4.1", sha256="9676881e009aa1217818f326338e8b35dd9a9438918f8b1ac249f4c8afe460dd")
@@ -27,6 +34,9 @@ class RVctrs(RPackage):
version("0.3.5", sha256="11605d98106e294dae1a9b205462dd3906a6159a647150752b85dd290f6635cc")
version("0.2.0", sha256="5bce8f228182ecaa51230d00ad8a018de9cf2579703e82244e0931fe31f20016")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@3.2:", type=("build", "run"))
depends_on("r@3.3:", type=("build", "run"), when="@0.3.5:")
depends_on("r@3.5.0:", type=("build", "run"), when="@0.6.2:")
diff --git a/var/spack/repos/builtin/packages/r-vegan/package.py b/var/spack/repos/builtin/packages/r-vegan/package.py
index 5821e4b266..9fa33c733c 100644
--- a/var/spack/repos/builtin/packages/r-vegan/package.py
+++ b/var/spack/repos/builtin/packages/r-vegan/package.py
@@ -16,6 +16,7 @@ class RVegan(RPackage):
license("GPL-2.0-only")
+ version("2.6-6.1", sha256="7d2a5e700a6639bef203d6e35dfe6e8cc1dd7440957334317b61a9dafbb90b60")
version("2.6-4", sha256="5d8ad4bebe79ae2bbd840a34100cf54c62f089c66ea484a542a201afcba21d06")
version("2.6-2", sha256="ab77d110c959d19b0c6268ae0c8f78c897e2419eff3f1f7b19c1bb2f8db7c059")
version("2.5-7", sha256="e63b586951ea7d8b0118811f329c700212892ec1db3b93951603ce1d68aa462a")
@@ -27,6 +28,7 @@ class RVegan(RPackage):
depends_on("r@3.1.0:", type=("build", "run"), when="@2.5-1")
depends_on("r@3.2.0:", type=("build", "run"), when="@2.5-2:")
depends_on("r@3.4.0:", type=("build", "run"), when="@2.5-5:")
+ depends_on("r@4.1.0:", type=("build", "run"), when="@2.6-6:")
depends_on("r-permute@0.9-0:", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-vgam/package.py b/var/spack/repos/builtin/packages/r-vgam/package.py
index 1a51917d72..74191bc257 100644
--- a/var/spack/repos/builtin/packages/r-vgam/package.py
+++ b/var/spack/repos/builtin/packages/r-vgam/package.py
@@ -28,6 +28,7 @@ class RVgam(RPackage):
cran = "VGAM"
+ version("1.1-11", sha256="de9d909bd2bcfccf55d24f96999e0780ca45ec29030e227a722eb24e378b33a5")
version("1.1-8", sha256="d4c0f1d4e356d88ab6f39c05076ff97ebef6d20b7fbf1b0fa31d40c73d0ad1cc")
version("1.1-7", sha256="a4c52d392332477eac557c84b732f3c03dd48f75db3884e23c71cf99d991757e")
version("1.1-6", sha256="446a61bac5dd4794e05d20c2f3901eec54afac52c6e23ce2787c5575170dd417")
diff --git a/var/spack/repos/builtin/packages/r-vioplot/package.py b/var/spack/repos/builtin/packages/r-vioplot/package.py
index 8cf9bf66ac..59eab53e5d 100644
--- a/var/spack/repos/builtin/packages/r-vioplot/package.py
+++ b/var/spack/repos/builtin/packages/r-vioplot/package.py
@@ -16,6 +16,7 @@ class RVioplot(RPackage):
license("BSD-3-Clause")
+ version("0.5.0", sha256="b04e91ccb810573d13a2ac1136bc6e4747c4c663fa53ff1ce7327c1a13530965")
version("0.4.0", sha256="5729b483e3a4f7c81d2cc22c8bc5211b64e289734e9da5b5696c4974067867b5")
version("0.3.7", sha256="06475d9a47644245ec91598e9aaef7db1c393802d9fc314420ac5139ae56adb6")
version("0.3.5", sha256="1b64833c1bd6851036cf1c400c7d0036a047e71def94a399c897263b4b303e2a")
diff --git a/var/spack/repos/builtin/packages/r-vipor/package.py b/var/spack/repos/builtin/packages/r-vipor/package.py
index aa0b4a3273..3151ccbb1e 100644
--- a/var/spack/repos/builtin/packages/r-vipor/package.py
+++ b/var/spack/repos/builtin/packages/r-vipor/package.py
@@ -17,7 +17,9 @@ class RVipor(RPackage):
license("GPL-2.0-or-later")
+ version("0.4.7", sha256="baad41e9ddaa13b5a1db1abab34253b27d5b99e5a6a649b2036aaf1483370b9e")
version("0.4.5", sha256="7d19251ac37639d6a0fed2d30f1af4e578785677df5e53dcdb2a22771a604f84")
version("0.4.4", sha256="5abfd7869dae42ae2e4f52206c23433a43b485b1220685e445877ee5864a3f5c")
depends_on("r@3.0.0:", type=("build", "run"))
+ depends_on("r@3.5.0:", type=("build", "run"), when="@0.4.7:")
diff --git a/var/spack/repos/builtin/packages/r-viridis/package.py b/var/spack/repos/builtin/packages/r-viridis/package.py
index 8807a1a301..4de67f1f7c 100644
--- a/var/spack/repos/builtin/packages/r-viridis/package.py
+++ b/var/spack/repos/builtin/packages/r-viridis/package.py
@@ -21,6 +21,7 @@ class RViridis(RPackage):
license("MIT")
+ version("0.6.5", sha256="862b5cb6be115deea0207cdd3c8bb33de28552cfdc29900777512fd488d0005c")
version("0.6.2", sha256="69b58cd1d992710a08b0b227fd0a9590430eea3ed4858099412f910617e41311")
version("0.5.1", sha256="ddf267515838c6eb092938133035cee62ab6a78760413bfc28b8256165701918")
version("0.5.0", sha256="fea477172c1e11be40554545260b36d6ddff3fe6bc3bbed87813ffb77c5546cd")
diff --git a/var/spack/repos/builtin/packages/r-viridislite/package.py b/var/spack/repos/builtin/packages/r-viridislite/package.py
index 4b6a08da39..d9b31c46c7 100644
--- a/var/spack/repos/builtin/packages/r-viridislite/package.py
+++ b/var/spack/repos/builtin/packages/r-viridislite/package.py
@@ -19,6 +19,7 @@ class RViridislite(RPackage):
cran = "viridisLite"
+ version("0.4.2", sha256="893f111d31deccd2cc959bc9db7ba2ce9020a2dd1b9c1c009587e449c4cce1a1")
version("0.4.1", sha256="a896db1ccae5fc1a8b3764d02f24cef74ef7a8341cf9f3401c4efe799870ea97")
version("0.4.0", sha256="849955dc8ad9bc52bdc50ed4867fd92a510696fc8294e6971efa018437c83c6a")
version("0.3.0", sha256="780ea12e7c4024d5ba9029f3a107321c74b8d6d9165262f6e64b79e00aa0c2af")
diff --git a/var/spack/repos/builtin/packages/r-vroom/package.py b/var/spack/repos/builtin/packages/r-vroom/package.py
index 9843483ddf..99af883c81 100644
--- a/var/spack/repos/builtin/packages/r-vroom/package.py
+++ b/var/spack/repos/builtin/packages/r-vroom/package.py
@@ -19,6 +19,7 @@ class RVroom(RPackage):
license("MIT")
+ version("1.6.5", sha256="7bdca21e58c9c5049d7445d182f59fd399193cb2f4318d083de0a559ec9b5761")
version("1.6.1", sha256="eb0e33d53212f9c7e8b38d632c98bd5015365cc13f55dadb15ff0d404b31807c")
version("1.6.0", sha256="a718ccdf916442693af5392944774d8aec5ce48f417871f9de84dd1089d26ca6")
version("1.5.7", sha256="d087cb148f71c222fc89199d03df2502689149873414a6d89c2f006d3a109fde")
@@ -26,6 +27,7 @@ class RVroom(RPackage):
depends_on("r@3.1:", type=("build", "run"))
depends_on("r@3.4:", type=("build", "run"), when="@1.6.0:")
+ depends_on("r@3.6:", type=("build", "run"), when="@1.6.4:")
depends_on("r-bit64", type=("build", "run"))
depends_on("r-crayon", type=("build", "run"))
depends_on("r-cli", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-vsn/package.py b/var/spack/repos/builtin/packages/r-vsn/package.py
index f89be04997..d814c3c5f8 100644
--- a/var/spack/repos/builtin/packages/r-vsn/package.py
+++ b/var/spack/repos/builtin/packages/r-vsn/package.py
@@ -35,6 +35,8 @@ class RVsn(RPackage):
version("3.46.0", commit="7ecfd20452348da27d6fcc052cbff2b9be777792")
version("3.44.0", commit="e54513fcdd07ccfb8094359e93cef145450f0ee0")
+ depends_on("c", type="build") # generated
+
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r@3.4.0:", type=("build", "run"), when="@3.46.0:")
depends_on("r@4.0.0:", type=("build", "run"), when="@3.62.0:")
diff --git a/var/spack/repos/builtin/packages/r-waldo/package.py b/var/spack/repos/builtin/packages/r-waldo/package.py
index 69b70bcd05..77ba7a5e26 100644
--- a/var/spack/repos/builtin/packages/r-waldo/package.py
+++ b/var/spack/repos/builtin/packages/r-waldo/package.py
@@ -17,10 +17,12 @@ class RWaldo(RPackage):
license("MIT")
+ version("0.5.2", sha256="82cdae1ab2c5e7e5dbf5c6bdf832020b46e152732053fb45de7c9a81afdf2e05")
version("0.4.0", sha256="57ee89eec9bcbba58cf8fa29c8e097f038768c30833eaf812682826333127eaa")
version("0.3.1", sha256="ec2c8c1afbc413f8db8b6b0c6970194a875f616ad18e1e72a004bc4497ec019b")
version("0.2.3", sha256="1fbab22fe9be6ca8caa3df7306c763d7025d81ab6f17b85daaf8bdc8c9455c53")
+ depends_on("r@3.6:", type=("build", "run"), when="@0.5.2:")
depends_on("r-cli", type=("build", "run"))
depends_on("r-diffobj", type=("build", "run"))
depends_on("r-diffobj@0.3.4:", type=("build", "run"), when="@0.3.1:")
diff --git a/var/spack/repos/builtin/packages/r-webshot/package.py b/var/spack/repos/builtin/packages/r-webshot/package.py
index 044732bf6b..9f63294f24 100644
--- a/var/spack/repos/builtin/packages/r-webshot/package.py
+++ b/var/spack/repos/builtin/packages/r-webshot/package.py
@@ -16,6 +16,7 @@ class RWebshot(RPackage):
license("GPL-2.0-only")
+ version("0.5.5", sha256="d675913ccac80e0af8ee396f95a24124eae6c42d80aed9f47f7a88218ecbb913")
version("0.5.4", sha256="3dc2b9baef7855e1deea060276b9ccc6375eee36b7100987cbb1f8e5cd7a8f24")
version("0.5.3", sha256="b7c4f2be61c8c4730202a9c3604072478e30cb85b423b7497cd703cc3f49dbc0")
version("0.5.2", sha256="f183dc970157075b51ac543550a7a48fa3428b9c6838abb72fe987c21982043f")
diff --git a/var/spack/repos/builtin/packages/r-wgcna/package.py b/var/spack/repos/builtin/packages/r-wgcna/package.py
index b11908f105..55ffd8739e 100644
--- a/var/spack/repos/builtin/packages/r-wgcna/package.py
+++ b/var/spack/repos/builtin/packages/r-wgcna/package.py
@@ -20,6 +20,7 @@ class RWgcna(RPackage):
cran = "WGCNA"
+ version("1.72-5", sha256="03439143ff235c17f0dbca7dd6362afa8ddb5a72594f5c2df1c6df1caca2e79d")
version("1.72-1", sha256="1dbf82761ef3e76464b18fc9f698ad0f971aafecabf66ca937b950930bd57fdc")
version("1.71", sha256="21f5349e888ea76241912600ee5c35a0d2fd50180568b9b08b2b597f099bf708")
version("1.70-3", sha256="b9843b839728183af6b746f239e9519d438b294613362b556002acdb8522cbd4")
diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py
index b678ee0b11..b0ec21dda4 100644
--- a/var/spack/repos/builtin/packages/r-withr/package.py
+++ b/var/spack/repos/builtin/packages/r-withr/package.py
@@ -18,6 +18,7 @@ class RWithr(RPackage):
license("MIT")
+ version("3.0.1", sha256="d573f1ac2f733c7dd89669feb495d68f1f15d7a9774473c2e46a9848945a3841")
version("2.5.0", sha256="37317b3ed790a08407072993a05ab255f6305f95a12a16e0e28aa6aa80fc8bc0")
version("2.4.3", sha256="9bdac7459ccc6c2d599ecfd132a7f0aa68d958942d9fe7dbb0442c9eda129d4c")
version("2.4.2", sha256="48f96a4cb780cf6fd5fbbea1f1eb04ea3102d7a4a644cae1ed1e91139dcbbac8")
@@ -29,3 +30,4 @@ class RWithr(RPackage):
depends_on("r@3.0.2:", type=("build", "run"))
depends_on("r@3.2.0:", type=("build", "run"), when="@2.2:")
+ depends_on("r@3.6.0:", type=("build", "run"), when="@3.0.1:")
diff --git a/var/spack/repos/builtin/packages/r-wk/package.py b/var/spack/repos/builtin/packages/r-wk/package.py
index 4b3497b89d..d445018ee3 100644
--- a/var/spack/repos/builtin/packages/r-wk/package.py
+++ b/var/spack/repos/builtin/packages/r-wk/package.py
@@ -20,6 +20,7 @@ class RWk(RPackage):
license("MIT")
+ version("0.9.2", sha256="33675edd9baedb09bf69a3a55fec3190e2bf57a5f4f63f94bc06861b5e83e5f8")
version("0.7.2", sha256="6f8b72f54e2efea62fda8bc897124b43a39b81cffa9569103d06d95f946eab2f")
version("0.7.0", sha256="e24327d38f2ff2d502c67c60eba3b4e44079a64ed8b805df64f231dc4712a2de")
version("0.6.0", sha256="af2c2837056a6dcc9f64d5ace29601d6d668c95769f855ca0329648d7326eaf5")
diff --git a/var/spack/repos/builtin/packages/r-writexl/package.py b/var/spack/repos/builtin/packages/r-writexl/package.py
new file mode 100644
index 0000000000..84f8d76b47
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-writexl/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RWritexl(RPackage):
+ """Zero-dependency data frame to xlsx exporter based on 'libxlsxwriter'.
+ Fast and no Java or Excel required."""
+
+ homepage = "https://docs.ropensci.org/writexl/"
+ cran = "writexl"
+
+ license("BSD-2-Clause", checked_by="wdconinc")
+
+ version("1.5.0", sha256="e253dc58f00abf51e9b727ae132e8b301e359fb23df0afc40c3ebec3fb096dce")
+
+ depends_on("zlib-api", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-wru/package.py b/var/spack/repos/builtin/packages/r-wru/package.py
index ef07ef21b4..a945fa30b9 100644
--- a/var/spack/repos/builtin/packages/r-wru/package.py
+++ b/var/spack/repos/builtin/packages/r-wru/package.py
@@ -25,6 +25,7 @@ class RWru(RPackage):
license("GPL-3.0-or-later")
+ version("3.0.3", sha256="8430fc83609cda110eb340d104d408d362110d15d23208e7f5213cfeeb4a13b5")
version("1.0.1", sha256="80b3f54cb2de77ea005755a2de3acfb923a1d380c0dbd52bc4d3e3fcb1d6f1fc")
version("1.0.0", sha256="4eae65644981d0b99d3610adf40340b3606f40e6cd578e76a745524ba927e417")
version("0.1-12", sha256="896ef4718109ab9fee686f050a3269cbab1589ef2aff7a45fc11a67f7bb35a29")
@@ -45,6 +46,7 @@ class RWru(RPackage):
depends_on("r@3.2.0:", type=("build", "run"), when="@0.0-1:")
depends_on("r@3.5.0:", type=("build", "run"), when="@0.0-10:")
depends_on("r@4.1.0:", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-cli", type=("build", "run"), when="@3.0.0:")
depends_on("r-devtools", type=("build", "run"), when="@0.0-2:0.1-12")
depends_on("r-devtools@1.10.0:", type=("build", "run"), when="@0.1-1:0.1-12")
depends_on("r-dplyr", type=("build", "run"), when="@1.0.0:")
@@ -53,6 +55,8 @@ class RWru(RPackage):
depends_on("r-purrr", type=("build", "run"), when="@1.0.0:")
depends_on("r-rcpp", type=("build", "run"), when="@1.0.0:")
depends_on("r-rcpparmadillo", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-rlang", type=("build", "run"), when="@3.0.0:")
depends_on("r-piggyback", type=("build", "run"), when="@1.0.0:")
depends_on("r-piggyback@0.1.4:", type=("build", "run"), when="@1.0.0:")
depends_on("r-pl94171", type=("build", "run"), when="@1.0.0:")
+ depends_on("r-tidyr", type=("build", "run"), when="@3.0.0:")
diff --git a/var/spack/repos/builtin/packages/r-xde/package.py b/var/spack/repos/builtin/packages/r-xde/package.py
index 309e099ede..dc1264e2e1 100644
--- a/var/spack/repos/builtin/packages/r-xde/package.py
+++ b/var/spack/repos/builtin/packages/r-xde/package.py
@@ -26,6 +26,9 @@ class RXde(RPackage):
version("2.24.0", commit="fd5f245f82893657dc36e5a67a1d3b8255772462")
version("2.22.0", commit="25bcec965ae42a410dd285a9db9be46d112d8e81")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r-biobase@2.5.5:", type=("build", "run"))
depends_on("r-biocgenerics", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-xfun/package.py b/var/spack/repos/builtin/packages/r-xfun/package.py
index 57f44f4912..84cc89d068 100644
--- a/var/spack/repos/builtin/packages/r-xfun/package.py
+++ b/var/spack/repos/builtin/packages/r-xfun/package.py
@@ -16,6 +16,7 @@ class RXfun(RPackage):
license("MIT")
+ version("0.47", sha256="999874fdbf4df2e686a3cb134bfef782c0d3eb0141006191ca1eda94ce232c4b")
version("0.39", sha256="d0ecaabb243dd3496da6029932fcdd4772914843de7ffd0b78a172efde1356c9")
version("0.34", sha256="50e76c1febb988c044e44fb78e1abc1ba681173c9ff3c336f4c0ad71e6a2853d")
version("0.33", sha256="45fbc2d252867b69bbde64d4a4e3d2e049ad1d3a84984e9cfb242d8d1f41ee6c")
@@ -24,3 +25,5 @@ class RXfun(RPackage):
version("0.24", sha256="e3e39a95202f6db4f6de3a8b9a344074a4944a3a8a522d44971390c905e2b583")
version("0.20", sha256="284239d12a3d5ea7d1ef8b1382fb0a7a4661af54c85510501279681871da7c10")
version("0.8", sha256="c2f8ecf8b57ddec02f9be7f417d9e22fc1ae2c7db8d70aa703fc62bf4a5c5416")
+
+ depends_on("r@3.2.0:", when="@0.47:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-xgboost/package.py b/var/spack/repos/builtin/packages/r-xgboost/package.py
index 9abb3f87a8..317c910a4d 100644
--- a/var/spack/repos/builtin/packages/r-xgboost/package.py
+++ b/var/spack/repos/builtin/packages/r-xgboost/package.py
@@ -23,6 +23,7 @@ class RXgboost(RPackage):
license("Apache-2.0 OR custom")
+ version("1.7.8.1", sha256="394d6fd00b2fe97549c7a7e6598df86448cdfbd7c0af45b0c17f7b9e81bc1be9")
version("1.7.5.1", sha256="4ec0833f206f84e5983e9f373ea64903bec488f751fba6f75a6f4702b1c965bc")
version("1.6.0.1", sha256="9ae99a20997e1b02ffd21cabada2a55e53f5754746238ee900de5eb6cd964ebd")
version("1.5.0.2", sha256="4750b9a289d8cb685291939eed7c493bb42c5cc154ef98e13100abb1727eab13")
@@ -40,9 +41,6 @@ class RXgboost(RPackage):
depends_on("r-jsonlite@1.0:", type=("build", "run"), when="@1.5.0.2:")
depends_on("gmake", type="build")
- # This is not listed as required, but installation fails without it
- # ERROR: dependency 'stringr' is not available for package 'xgboost'
- depends_on("r-stringr", type=("build", "run"))
-
+ depends_on("r-stringr", type=("build", "run"), when="@:0.7")
depends_on("r-stringi@0.5.2:", type=("build", "run"), when="@:0.90.0.2")
depends_on("r-magrittr@1.5:", type=("build", "run"), when="@:1.3.2.1")
diff --git a/var/spack/repos/builtin/packages/r-xlconnect/package.py b/var/spack/repos/builtin/packages/r-xlconnect/package.py
index a91a83c1bd..841cea86d5 100644
--- a/var/spack/repos/builtin/packages/r-xlconnect/package.py
+++ b/var/spack/repos/builtin/packages/r-xlconnect/package.py
@@ -14,6 +14,7 @@ class RXlconnect(RPackage):
cran = "XLConnect"
+ version("1.0.10", sha256="e3c267cb1e6a6fb3a9fb132e60649182ee7a28e4e9188c72786fb843aad6e2b4")
version("1.0.7", sha256="821dba231c3c3147455e7525119b51e5dc001984c638b7ce519d0974b32de677")
version("1.0.6", sha256="b233b9f74d1464b78d5dd28bd8a1fa46ca6254518da2d3bda3c978a3f4aaa4f9")
version("1.0.5", sha256="975c2ef57f28ccfac79ae5d285b7e82e60791fb121052616c10bc52e2bca16ad")
diff --git a/var/spack/repos/builtin/packages/r-xml/package.py b/var/spack/repos/builtin/packages/r-xml/package.py
index 7c69fe12e6..a66775fda7 100644
--- a/var/spack/repos/builtin/packages/r-xml/package.py
+++ b/var/spack/repos/builtin/packages/r-xml/package.py
@@ -15,6 +15,7 @@ class RXml(RPackage):
cran = "XML"
+ version("3.99-0.17", sha256="6e233265ff69ff2f59f56fe4abc5af70e2cfa6d99aec6ad2afd2bf2c0d98a2d8")
version("3.99-0.14", sha256="2cb6a61a4d8d89e311994f47df09913d4ce5281317d42c78af4aafd75a31f1f9")
version("3.99-0.12", sha256="cb209425c886bf405dc03fda8854e819bd9b2d4e4b031c71c5120b7302a36d14")
version("3.99-0.11", sha256="c523bd8e6419d44a477038396e9c3b3ec70a67ed85a0c9bfa8b9445f91647fc8")
diff --git a/var/spack/repos/builtin/packages/r-xml2/package.py b/var/spack/repos/builtin/packages/r-xml2/package.py
index 33165efa43..306c5aa0c3 100644
--- a/var/spack/repos/builtin/packages/r-xml2/package.py
+++ b/var/spack/repos/builtin/packages/r-xml2/package.py
@@ -16,6 +16,7 @@ class RXml2(RPackage):
license("MIT")
+ version("1.3.6", sha256="e81991ff99bff3616dde8683c1327194e3ea64fa3b8062f52d8ce32673dd308f")
version("1.3.3", sha256="cb4e9c0d31618ed67d2bfa4c7b5e52680e11612ed356a8164b541d44163c1c8d")
version("1.3.2", sha256="df22f9e7e3189d8c9b8804eaf0105324fdac983cffe743552f6d76613600a4cf")
version("1.2.2", sha256="3050f147c4335be2925a576557bbda36bd52a5bba3110d47b740a2dd811a78f4")
@@ -23,7 +24,10 @@ class RXml2(RPackage):
version("1.1.1", sha256="00f3e3b66b76760c19da5f6dddc98e6f30de36a96b211e59e1a3f4ff58763116")
depends_on("r@3.1.0:", type=("build", "run"))
+ depends_on("r@3.6.0:", type=("build", "run"), when="@1.3.6:")
depends_on("libxml2")
- depends_on("r-rcpp@0.12.12:", type=("build", "run"), when="@:1.2")
depends_on("r-bh", type=("build", "run"), when="@:1.1.1")
+ depends_on("r-cli", type=("build", "run"), when="@1.3.6:")
+ depends_on("r-rcpp@0.12.12:", type=("build", "run"), when="@:1.2")
+ depends_on("r-rlang@1.1.0:", type=("build", "run"), when="@1.3.6:")
diff --git a/var/spack/repos/builtin/packages/r-xnomial/package.py b/var/spack/repos/builtin/packages/r-xnomial/package.py
index 1d58c27b9b..60e7d84e37 100644
--- a/var/spack/repos/builtin/packages/r-xnomial/package.py
+++ b/var/spack/repos/builtin/packages/r-xnomial/package.py
@@ -26,4 +26,6 @@ class RXnomial(RPackage):
version("1.0.4", sha256="e6237f79d96f02bb30af1cf055ae9f70541abba34ce045a9d4359b5304189dd7")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.14:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-xopen/package.py b/var/spack/repos/builtin/packages/r-xopen/package.py
index e208642641..577246068b 100644
--- a/var/spack/repos/builtin/packages/r-xopen/package.py
+++ b/var/spack/repos/builtin/packages/r-xopen/package.py
@@ -16,6 +16,7 @@ class RXopen(RPackage):
license("MIT")
+ version("1.0.1", sha256="e3b278b8c324a1aa2650141dd89d01253eea5c2555007422c797915689b29aec")
version("1.0.0", sha256="e207603844d69c226142be95281ba2f4a056b9d8cbfae7791ba60535637b3bef")
depends_on("r@3.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-xts/package.py b/var/spack/repos/builtin/packages/r-xts/package.py
index af45b05ae0..468a19f8f9 100644
--- a/var/spack/repos/builtin/packages/r-xts/package.py
+++ b/var/spack/repos/builtin/packages/r-xts/package.py
@@ -18,6 +18,7 @@ class RXts(RPackage):
license("GPL-2.0-or-later")
+ version("0.14.0", sha256="d28b16eefa9876a815bad3fc204779c197e3a0d7796b8dae8856fe153f5fcfd9")
version("0.13.1", sha256="2c3907c6d0162e48d1898647105bbb32cfe0cb005788481a64ee675a941d825d")
version("0.13.0", sha256="188e4d1d8c3ec56a544dfb9da002e8aac80b9303d0a5a1f62ff0e960aeef9674")
version("0.12.2", sha256="9c287ceaeb758ff4c9596be6a688db5683d50b45e7610e6d068891ca10dca743")
diff --git a/var/spack/repos/builtin/packages/r-xvector/package.py b/var/spack/repos/builtin/packages/r-xvector/package.py
index 55a3b400cc..47bd682206 100644
--- a/var/spack/repos/builtin/packages/r-xvector/package.py
+++ b/var/spack/repos/builtin/packages/r-xvector/package.py
@@ -26,6 +26,8 @@ class RXvector(RPackage):
version("0.18.0", commit="27acf47282c9880b54d04dff46c1e50f0c87fa6b")
version("0.16.0", commit="54615888e1a559da4a81de33e934fc0f1c3ad99f")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.8.0:", type=("build", "run"))
depends_on("r@4.0.0:", type=("build", "run"), when="@0.34.0:")
depends_on("r-biocgenerics@0.19.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-yaimpute/package.py b/var/spack/repos/builtin/packages/r-yaimpute/package.py
index bee3635d39..6fda7d1e8c 100644
--- a/var/spack/repos/builtin/packages/r-yaimpute/package.py
+++ b/var/spack/repos/builtin/packages/r-yaimpute/package.py
@@ -22,6 +22,7 @@ class RYaimpute(RPackage):
cran = "yaImpute"
+ version("1.0-34", sha256="b4c898c95fca784480bbbc239c78c85dc9f45a96c34c563ea7e81248ef8a8a73")
version("1.0-33", sha256="58595262eb1bc9ffeeadca78664c418ea24b4e894744890c00252c5ebd02512c")
version("1.0-32", sha256="08eee5d851b80aad9c7c80f9531aadd50d60e4b16b3a80657a50212269cd73ff")
diff --git a/var/spack/repos/builtin/packages/r-yaml/package.py b/var/spack/repos/builtin/packages/r-yaml/package.py
index f8cb214c85..d9ada94424 100644
--- a/var/spack/repos/builtin/packages/r-yaml/package.py
+++ b/var/spack/repos/builtin/packages/r-yaml/package.py
@@ -16,6 +16,7 @@ class RYaml(RPackage):
license("BSD-3-Clause")
+ version("2.3.10", sha256="e236d42d366e361d4855aa4f520260debd53a31e4786442b94770b045da02a6d")
version("2.3.7", sha256="d20cb219e0f9c48aba02f132f81cfa9ecda5e22c925e36726840218ed56680ab")
version("2.3.6", sha256="5dd19d8d6654ef2e4ccd6216ce8e96ca5185ae6143f95194955f6908a6e1ba26")
version("2.3.5", sha256="3edf6c0554a0e184a25e8bec5721a2e66b4ab0dceb3737428e22705e52eb5140")
diff --git a/var/spack/repos/builtin/packages/r-yulab-utils/package.py b/var/spack/repos/builtin/packages/r-yulab-utils/package.py
index 30137e8782..a5de07b573 100644
--- a/var/spack/repos/builtin/packages/r-yulab-utils/package.py
+++ b/var/spack/repos/builtin/packages/r-yulab-utils/package.py
@@ -13,6 +13,15 @@ class RYulabUtils(RPackage):
cran = "yulab.utils"
+ version("0.1.6", sha256="589be7ad1425f7d84dc3748f352fc432e494edb725209c05e28ca2a44f34beec")
version("0.0.6", sha256="973a51b8d1284060aec34e94849eea6783439dbcbf85083dd4f1a5df4f927b25")
version("0.0.5", sha256="6ecd4dc5dae40e86b7a462fdac3ab8c0b276dcae5a284eb43390a05b01e3056b")
version("0.0.4", sha256="38850663de53a9166b8e85deb85be1ccf1a5b310bbe4355f3b8bc823ed1b49ae")
+
+ depends_on("r-cli", when="@0.1.0:", type=("build", "run"))
+ depends_on("r-digest", when="@0.1.0:", type=("build", "run"))
+ depends_on("r-fs", when="@0.1.0:", type=("build", "run"))
+ depends_on("r-httr2", when="@0.1.6:", type=("build", "run"))
+ depends_on("r-rlang", when="@0.0.7:", type=("build", "run"))
+
+ depends_on("r-memoise", when="@0.0.7:0.1.5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r-zcompositions/package.py b/var/spack/repos/builtin/packages/r-zcompositions/package.py
index 110f4a120e..67ce6f10be 100644
--- a/var/spack/repos/builtin/packages/r-zcompositions/package.py
+++ b/var/spack/repos/builtin/packages/r-zcompositions/package.py
@@ -16,6 +16,7 @@ class RZcompositions(RPackage):
cran = "zCompositions"
+ version("1.5.0-4", sha256="73188e1e065a042723ed7a48df04e22317b204222d40744b83e8c392aae16aaf")
version("1.4.0-1", sha256="33ee11f635cb87cc9c0617e1cfc91f1ac41c6cfe2b70fc441e226015939230e7")
version("1.4.0", sha256="a00d7d0ba861988b1836e947fd521d58137a4def04a5d7aa73a099314b7e530c")
version("1.3.4", sha256="ae22c86fe92368a26265933f42eecc518b9b69e7d9b698bc31bfaabfc3c48e95")
diff --git a/var/spack/repos/builtin/packages/r-zip/package.py b/var/spack/repos/builtin/packages/r-zip/package.py
index 8f17fba457..4d0dfe08de 100644
--- a/var/spack/repos/builtin/packages/r-zip/package.py
+++ b/var/spack/repos/builtin/packages/r-zip/package.py
@@ -17,6 +17,7 @@ class RZip(RPackage):
license("MIT")
+ version("2.3.1", sha256="83754408781c525917f36535865d28214893de0778b5f337e050cb543cacc28f")
version("2.3.0", sha256="33eba844922af9981732ee6ec1582d46cf04c562344f09a0f0f14a22c6f74543")
version("2.2.2", sha256="e16cde23bb283efbe9b6bce19575c716c371d09033b42514471ccb444c0a8ea4")
version("2.2.1", sha256="14873d0874813139411c120d8b209af71e4e087871eeb963f235411eb1061422")
diff --git a/var/spack/repos/builtin/packages/r-zlibbioc/package.py b/var/spack/repos/builtin/packages/r-zlibbioc/package.py
index ed618d261f..c658f0baec 100644
--- a/var/spack/repos/builtin/packages/r-zlibbioc/package.py
+++ b/var/spack/repos/builtin/packages/r-zlibbioc/package.py
@@ -26,3 +26,5 @@ class RZlibbioc(RPackage):
version("1.26.0", commit="2e3ab097caa09a5e3ddaa3469b13e19a7224da0d")
version("1.24.0", commit="2990059338d1b987d098c009b0bfa806bd24afec")
version("1.22.0", commit="30377f830af2bc1ff17bbf3fdd2cb6442015fea5")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/r-zoo/package.py b/var/spack/repos/builtin/packages/r-zoo/package.py
index 907daa0f33..50e4a5b1b9 100644
--- a/var/spack/repos/builtin/packages/r-zoo/package.py
+++ b/var/spack/repos/builtin/packages/r-zoo/package.py
@@ -30,6 +30,8 @@ class RZoo(RPackage):
version("1.7-14", sha256="4858675fed056a4329c4998517cc944db386447483390bd342de719e0509f598")
version("1.7-13", sha256="0ca5264d6077c785963705e462aec3e57e0d0651379f9bf4ee32e4f3b25dc754")
+ depends_on("c", type="build") # generated
+
depends_on("r@2.10.0:", type=("build", "run"))
depends_on("r@3.1.0:", type=("build", "run"), when="@1.8-2:")
depends_on("r-lattice@0.20-27:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py
index f4c96ce85e..768952a363 100644
--- a/var/spack/repos/builtin/packages/r/package.py
+++ b/var/spack/repos/builtin/packages/r/package.py
@@ -16,12 +16,17 @@ class R(AutotoolsPackage):
Please consult the R project homepage for further information."""
homepage = "https://www.r-project.org"
- url = "https://cloud.r-project.org/src/base/R-3/R-3.4.3.tar.gz"
+ url = "https://cloud.r-project.org/src/base/R-4/R-4.4.0.tar.gz"
extendable = True
+ executables = ["^R$"]
+
license("GPL-2.0-or-later")
+ version("4.4.1", sha256="b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d")
+ version("4.4.0", sha256="ace4125f9b976d2c53bcc5fca30c75e30d4edc401584859cbadb080e72b5f030")
+ version("4.3.3", sha256="80851231393b85bf3877ee9e39b282e750ed864c5ec60cbd68e6e139f0520330")
version("4.3.2", sha256="b3f5760ac2eee8026a3f0eefcb25b47723d978038eee8e844762094c860c452a")
version("4.3.1", sha256="8dd0bf24f1023c6f618c3b317383d291b4a494f40d73b983ac22ffea99e4ba99")
version("4.3.0", sha256="45dcc48b6cf27d361020f77fde1a39209e997b81402b3663ca1c010056a6a609")
@@ -64,6 +69,10 @@ class R(AutotoolsPackage):
version("3.1.3", sha256="07e98323935baa38079204bfb9414a029704bb9c0ca5ab317020ae521a377312")
version("3.1.2", sha256="bcd150afcae0e02f6efb5f35a6ab72432be82e849ec52ce0bb89d8c342a8fa7a")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
variant("X", default=False, description="Enable X11 support (TCLTK, PNG, JPEG, TIFF, CAIRO)")
variant("memory_profiling", default=False, description="Enable memory profiling")
variant("rmath", default=False, description="Build standalone Rmath library")
@@ -85,7 +94,7 @@ class R(AutotoolsPackage):
depends_on("xz")
depends_on("which", type=("build", "run"))
depends_on("zlib-api")
- depends_on("zlib@1.2.5:", when="^zlib")
+ depends_on("zlib@1.2.5:", when="^[virtuals=zlib-api] zlib")
depends_on("texinfo", type="build")
with when("+X"):
@@ -108,8 +117,37 @@ class R(AutotoolsPackage):
# temporary fix to lower the optimization level.
patch("change_optflags_tmp.patch", when="%fj@4.1.0")
+ # Make R use a symlink to which in Sys.which, otherwise an absolute path
+ # gets stored as compressed byte code, which is not relocatable
+ patch("relocate-which.patch")
+
+ # CVE-2024-27322 Patch only needed in R 4.3.3 and below; doesn't apply to R older than 3.5.0.
+ patch(
+ "https://github.com/r-devel/r-svn/commit/f7c46500f455eb4edfc3656c3fa20af61b16abb7.patch?full_index=1",
+ sha256="56c77763cb104aa9cb63420e585da63cb2c23bc03fa3ef9d088044eeff9d7380",
+ when="@3.5.0:4.3.3",
+ )
+
build_directory = "spack-build"
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ # R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
+ match = re.search(r"^R version ([^\s]+)", output)
+ return match.group(1) if match else None
+
+ @classmethod
+ def determine_variants(cls, exes, version):
+ variants = []
+ for exe in exes:
+ output = Executable(exe)("CMD", "config", "--all", output=str, error=str)
+
+ if "-lX11" in output:
+ variants.append("+X")
+
+ return variants
+
# R custom URL version
def url_for_version(self, version):
"""Handle R's customed URL versions"""
@@ -260,8 +298,3 @@ class R(AutotoolsPackage):
# Add variable for library directry
module.r_lib_dir = join_path(dependent_spec.prefix, self.r_lib_dir)
-
- # Make the site packages directory for extensions, if it does not exist
- # already.
- if dependent_spec.package.is_extension:
- mkdirp(module.r_lib_dir)
diff --git a/var/spack/repos/builtin/packages/r/relocate-which.patch b/var/spack/repos/builtin/packages/r/relocate-which.patch
new file mode 100644
index 0000000000..d8e18e1877
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r/relocate-which.patch
@@ -0,0 +1,52 @@
+From 3f2b1b6c94460fd4d3e9f03c9f17a25db2d2b473 Mon Sep 17 00:00:00 2001
+From: Harmen Stoppels <me@harmenstoppels.nl>
+Date: Wed, 10 Jan 2024 12:40:40 +0100
+Subject: [PATCH] base: use a symlink for which instead of hard-coded string
+
+---
+ share/make/basepkg.mk | 8 ++++----
+ src/library/base/R/unix/system.unix.R | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/share/make/basepkg.mk b/share/make/basepkg.mk
+index c0a69c8a0af338ec002156236e47b9d7efea8165..4cf6387870915001cbb8b1439509ff4955cc67b1 100644
+--- a/share/make/basepkg.mk
++++ b/share/make/basepkg.mk
+@@ -72,16 +72,16 @@ mkRbase:
+ else \
+ cat $(RSRC) > "$${f}"; \
+ fi; \
+- f2=$${TMPDIR:-/tmp}/R2$$$$; \
+- sed -e "s:@WHICH@:${WHICH}:" "$${f}" > "$${f2}"; \
+- rm -f "$${f}"; \
+- $(SHELL) $(top_srcdir)/tools/move-if-change "$${f2}" all.R)
++ $(SHELL) $(top_srcdir)/tools/move-if-change "$${f}" all.R)
+ @if ! test -f $(top_builddir)/library/$(pkg)/R/$(pkg); then \
+ $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
+ else if test all.R -nt $(top_builddir)/library/$(pkg)/R/$(pkg); then \
+ $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
+ fi \
+ fi
++ @if ! test -f $(top_builddir)/library/$(pkg)/R/which; then \
++ cd $(top_builddir)/library/$(pkg)/R/ && $(LN_S) $(WHICH) which; \
++ fi
+
+ mkdesc:
+ @if test -f DESCRIPTION; then \
+diff --git a/src/library/base/R/unix/system.unix.R b/src/library/base/R/unix/system.unix.R
+index 3bb7d0cb27cc73a024bcea3e41e2e0c5c7e9648a..78271c8c12cb3217bc068e9d53ef9e3060e8dcc9 100644
+--- a/src/library/base/R/unix/system.unix.R
++++ b/src/library/base/R/unix/system.unix.R
+@@ -114,9 +114,9 @@ system2 <- function(command, args = character(),
+ Sys.which <- function(names)
+ {
+ res <- character(length(names)); names(res) <- names
+- ## hopefully configure found [/usr]/bin/which
+- which <- "@WHICH@"
+- if (!nzchar(which)) {
++ which <- file.path(R.home(), "library", "base", "R", "which")
++ ## which should be a symlink to the system's which
++ if (!file.exists(which)) {
+ warning("'which' was not found on this platform")
+ return(res)
+ }
diff --git a/var/spack/repos/builtin/packages/r3d/package.py b/var/spack/repos/builtin/packages/r3d/package.py
index 63f13ec238..40f44e2afa 100644
--- a/var/spack/repos/builtin/packages/r3d/package.py
+++ b/var/spack/repos/builtin/packages/r3d/package.py
@@ -21,6 +21,9 @@ class R3d(CMakePackage):
version("2018-12-19", commit="47308f68c782ed3227d3dab1eff24d41f6421f21", deprecated=True)
version("2018-01-07", commit="d6799a582256a120ef3bd7e18959e96cba0e5495", deprecated=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"r3d_max_verts",
default="0",
diff --git a/var/spack/repos/builtin/packages/rabbitmq-c/package.py b/var/spack/repos/builtin/packages/rabbitmq-c/package.py
index 3e7396a1b3..1868b90a13 100644
--- a/var/spack/repos/builtin/packages/rabbitmq-c/package.py
+++ b/var/spack/repos/builtin/packages/rabbitmq-c/package.py
@@ -16,11 +16,14 @@ class RabbitmqC(CMakePackage):
maintainers("lpottier")
- license("MIT")
+ license("MIT", checked_by="wdconinc")
+ version("0.14.0", sha256="839b28eae20075ac58f45925fe991d16a3138cbde015db0ee11df1acb1c493df")
version("0.13.0", sha256="8b224e41bba504fc52b02f918d8df7e4bf5359d493cbbff36c06078655c676e6")
version("0.11.0", sha256="437d45e0e35c18cf3e59bcfe5dfe37566547eb121e69fca64b98f5d2c1c2d424")
+ depends_on("c", type="build")
+
variant("ssl", default=True, description="Required to connect to RabbitMQ using SSL/TLS")
variant("shared", default=True, description="Build shared library")
variant("static", default=True, description="Build static library")
@@ -28,6 +31,7 @@ class RabbitmqC(CMakePackage):
variant("tools", default=False, description="Build the tools")
depends_on("cmake@3.12:", type="build")
+ depends_on("cmake@3.22:", type="build", when="@0.14:")
depends_on("openssl@1.1.1:", when="+ssl", type=("build", "link", "run"))
depends_on("doxygen", when="+doc", type="build")
depends_on("popt@1.14:", when="+tools", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/rabbitmq/package.py b/var/spack/repos/builtin/packages/rabbitmq/package.py
index 754b272f06..9d226f01c8 100644
--- a/var/spack/repos/builtin/packages/rabbitmq/package.py
+++ b/var/spack/repos/builtin/packages/rabbitmq/package.py
@@ -15,7 +15,7 @@ class Rabbitmq(Package):
"""
homepage = "https://www.rabbitmq.com/"
- url = "http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-generic-unix-3.6.15.tar.xz"
+ url = "https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-generic-unix-3.6.15.tar.xz"
license("BSD-2-Clause")
diff --git a/var/spack/repos/builtin/packages/racket/package.py b/var/spack/repos/builtin/packages/racket/package.py
index a9cfa27dea..bd53c4b3b4 100644
--- a/var/spack/repos/builtin/packages/racket/package.py
+++ b/var/spack/repos/builtin/packages/racket/package.py
@@ -17,9 +17,11 @@ class Racket(MakefilePackage):
version("8.3", sha256="3b963cd29ae119e1acc2c6dc4781bd9f25027979589caaae3fdfc021aac2324b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libffi", type=("build", "link", "run"))
depends_on("patchutils")
- depends_on("libtool", type=("build"))
variant("cs", default=True, description="Build Racket CS (new ChezScheme VM)")
variant("bc", default=False, description="Build Racket BC (old MZScheme VM)")
diff --git a/var/spack/repos/builtin/packages/racon/package.py b/var/spack/repos/builtin/packages/racon/package.py
index 4ba7ec80e0..f2a93947d2 100644
--- a/var/spack/repos/builtin/packages/racon/package.py
+++ b/var/spack/repos/builtin/packages/racon/package.py
@@ -25,6 +25,9 @@ class Racon(CMakePackage):
version("1.3.0", sha256="f2331fb88eae5c54227dc16651607af6f045ae1ccccc1d117011762927d4606a")
version("1.2.1", sha256="6e4b752b7cb6ab13b5e8cb9db58188cf1a3a61c4dcc565c8849bf4868b891bf8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.2:", type="build")
depends_on("python", type="build")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/raft/package.py b/var/spack/repos/builtin/packages/raft/package.py
index 919a555a00..9e9a37d84a 100644
--- a/var/spack/repos/builtin/packages/raft/package.py
+++ b/var/spack/repos/builtin/packages/raft/package.py
@@ -18,6 +18,8 @@ class Raft(CMakePackage):
version("develop", branch="master")
version("1.2.3", sha256="c41630e74491c8db272dcf4707e9b11cdcb226c0b7e978ca6eba8006f47bdae6")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("cmake", type="build")
depends_on("hdf5")
diff --git a/var/spack/repos/builtin/packages/ragel/package.py b/var/spack/repos/builtin/packages/ragel/package.py
index 62d97dde14..0e6029e0e2 100644
--- a/var/spack/repos/builtin/packages/ragel/package.py
+++ b/var/spack/repos/builtin/packages/ragel/package.py
@@ -24,4 +24,7 @@ class Ragel(AutotoolsPackage):
version("6.10", sha256="5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("colm", type="build")
diff --git a/var/spack/repos/builtin/packages/raja-perf/package.py b/var/spack/repos/builtin/packages/raja-perf/package.py
new file mode 100644
index 0000000000..a62cb861c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/raja-perf/package.py
@@ -0,0 +1,344 @@
+# Copyright 2013-2024 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 socket
+
+from spack.package import *
+
+from .blt import llnl_link_helpers
+
+
+class RajaPerf(CachedCMakePackage, CudaPackage, ROCmPackage):
+ """RAJA Performance Suite."""
+
+ homepage = "https://github.com/LLNL/RAJAPerf"
+ git = "https://github.com/LLNL/RAJAPerf.git"
+ tags = ["radiuss"]
+
+ maintainers("davidbeckingsale", "adrienbernede")
+
+ license("BSD-3-Clause")
+
+ version("develop", branch="develop", submodules="True")
+ version("main", branch="main", submodules="True")
+ version(
+ "2024.07.0",
+ tag="v2024.07.0",
+ commit="6e81aa58af244a13755a694bfdc7bc301139a244",
+ submodules="True",
+ )
+ version(
+ "2023.06.0",
+ tag="v2023.06.0",
+ commit="e5b2102f50e4642f53d9c86fb622b398a748974a",
+ submodules="True",
+ )
+ version(
+ "2022.10.0",
+ tag="v2022.10.0",
+ commit="57ee53e402d2ac0a398df39ad1ca85cf1d2be45b",
+ submodules="True",
+ )
+ version(
+ "0.12.0",
+ tag="v0.12.0",
+ commit="388c1d7562e1cb364191cb34c1ff62f3cadf54a0",
+ submodules="True",
+ )
+ version(
+ "0.11.0",
+ tag="v0.11.0",
+ commit="22ac1de533ebd477c781d53962a92478c0a11d43",
+ submodules="True",
+ )
+ version(
+ "0.10.0",
+ tag="v0.10.0",
+ commit="6bf725af38da41b1ebd1d29c75ffa5b8e57f7cbf",
+ submodules="True",
+ )
+ version(
+ "0.9.0", tag="v0.9.0", commit="064dd17dae696c3e440eeb7469fa90341858a636", submodules="True"
+ )
+ version(
+ "0.8.0", tag="v0.8.0", commit="94c65b2caefec2220f712f34c2a198b682ca7e23", submodules="True"
+ )
+ version(
+ "0.7.0", tag="v0.7.0", commit="a6ef0279d9d240199947d872d8f28bf121f2192c", submodules="True"
+ )
+ version(
+ "0.6.0", tag="v0.6.0", commit="21e476f031bc10bbdb8514425c380553bfb23bdc", submodules="True"
+ )
+ version(
+ "0.5.2", tag="v0.5.2", commit="2da5e27bc648ff5540ffa69bbde67f125e4581d3", submodules="True"
+ )
+ version(
+ "0.5.1", tag="v0.5.1", commit="a7b6f63e4fef2d0146932eff409788da51ab0cb3", submodules="True"
+ )
+ version(
+ "0.5.0", tag="v0.5.0", commit="888f5ebe69a9b2ae35058cf8fb8d89d91a379bea", submodules="True"
+ )
+ version(
+ "0.4.0", tag="v0.4.0", commit="a8f669c1ad01d51132a4e3d9d6aa8b2cabc9eff0", submodules="True"
+ )
+
+ depends_on("cxx", type="build") # generated
+
+ variant("mpi", default=False, description="Enable MPI support")
+ variant("openmp", default=False, description="Build OpenMP backend")
+ variant("omptarget", default=False, description="Build with OpenMP target support")
+ variant("sycl", default=False, description="Build sycl backend")
+ variant("shared", default=False, description="Build Shared Libs")
+ variant("omptask", default=False, description="Build OpenMP task variants of algorithms")
+ variant(
+ "tests",
+ default="basic",
+ values=("none", "basic", "benchmarks"),
+ multi=False,
+ description="Tests to run",
+ )
+ variant("caliper", default=False, description="Build with support for Caliper based profiling")
+
+ depends_on("blt")
+ depends_on("blt@0.6.2:", type="build", when="@2024.07.0:")
+ depends_on("blt@0.5.3", type="build", when="@2023.06")
+ depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10")
+ depends_on("blt@0.5.0:", type="build", when="@0.12.0:")
+ depends_on("blt@0.4.1:", type="build", when="@0.11.0:")
+ depends_on("blt@0.4.0:", type="build", when="@0.8.0:")
+ depends_on("blt@0.3.0:", type="build", when="@:0.7.0")
+
+ depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
+ depends_on("cmake@3.23:", when="@0.12.0:2023.06.0 +rocm", type="build")
+ depends_on("cmake@3.20:", when="@0.12.0:2023.06.0", type="build")
+ depends_on("cmake@3.14:", when="@:0.12.0", type="build")
+
+ depends_on("mpi", when="+mpi")
+
+ depends_on("llvm-openmp", when="+openmp %apple-clang")
+
+ depends_on("rocprim", when="+rocm")
+
+ depends_on("caliper@2.9.0:", when="+caliper")
+ depends_on("caliper@2.9.0: +cuda", when="+caliper +cuda")
+ depends_on("caliper@2.9.0: +rocm", when="+caliper +rocm")
+
+ with when("@0.12.0: +rocm +caliper"):
+ depends_on("caliper +rocm")
+ for arch in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "caliper +rocm amdgpu_target={0}".format(arch),
+ when="amdgpu_target={0}".format(arch),
+ )
+ conflicts("+openmp", when="@:2022.03")
+
+ with when("@0.12.0: +cuda +caliper"):
+ depends_on("caliper +cuda")
+ for sm_ in CudaPackage.cuda_arch_values:
+ depends_on("caliper +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+
+ conflicts("~openmp", when="+omptarget", msg="OpenMP target requires OpenMP")
+ conflicts("+cuda", when="+omptarget", msg="Cuda may not be activated when omptarget is ON")
+ conflicts("+omptarget +rocm")
+ conflicts("+sycl +omptarget")
+ conflicts("+sycl +rocm")
+ # Using RAJA version as threshold on purpose (no 2024.02 version of RAJAPerf were released).
+ conflicts(
+ "+sycl",
+ when="@:2024.02.99",
+ msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
+ "please use a newer release.",
+ )
+
+ def _get_sys_type(self, spec):
+ sys_type = str(spec.architecture)
+ if "SYS_TYPE" in env:
+ sys_type = env["SYS_TYPE"]
+ return sys_type
+
+ @property
+ def cache_name(self):
+ hostname = socket.gethostname()
+ if "SYS_TYPE" in env:
+ hostname = hostname.rstrip("1234567890")
+ return "{0}-{1}-{2}@{3}-{4}.cmake".format(
+ hostname,
+ self._get_sys_type(self.spec),
+ self.spec.compiler.name,
+ self.spec.compiler.version,
+ self.spec.dag_hash(8),
+ )
+
+ def initconfig_compiler_entries(self):
+ spec = self.spec
+ compiler = self.compiler
+ # Default entries are already defined in CachedCMakePackage, inherit them:
+ entries = super().initconfig_compiler_entries()
+
+ if spec.satisfies("+rocm"):
+ entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+
+ # adrienbernede-23-01
+ # Maybe we want to share this in the above llnl_link_helpers function.
+ compilers_using_cxx14 = ["intel-17", "intel-18", "xl"]
+ if any(compiler in self.compiler.cxx for compiler in compilers_using_cxx14):
+ entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
+
+ llnl_link_helpers(entries, spec, compiler)
+
+ return entries
+
+ def initconfig_hardware_entries(self):
+ spec = self.spec
+ compiler = self.compiler
+ entries = super().initconfig_hardware_entries()
+
+ entries.append("#------------------{0}".format("-" * 30))
+ entries.append("# Package custom hardware settings")
+ entries.append("#------------------{0}\n".format("-" * 30))
+
+ entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
+
+ # T benefit from the shared function "cuda_for_radiuss_projects",
+ # we do not modify CMAKE_CUDA_FLAGS: it is already appended by the
+ # shared function.
+ if "+cuda" in spec:
+ entries.append(cmake_cache_option("ENABLE_CUDA", True))
+ # Shared handling of cuda.
+
+ # Custom options.
+ # We place everything in CMAKE_CUDA_FLAGS_(RELEASE|RELWITHDEBINFO|DEBUG)
+ # which are not set by cuda_for_radiuss_projects
+ if "xl" in compiler.cxx:
+ all_targets_flags = (
+ "-Xcompiler -qstrict -Xcompiler -qxlcompatmacros -Xcompiler -qalias=noansi"
+ + "-Xcompiler -qsmp=omp -Xcompiler -qhot -Xcompiler -qnoeh"
+ + "-Xcompiler -qsuppress=1500-029 -Xcompiler -qsuppress=1500-036"
+ + "-Xcompiler -qsuppress=1500-030"
+ )
+ cuda_release_flags = "-O3 -Xcompiler -O2 " + all_targets_flags
+ cuda_reldebinf_flags = "-O3 -g -Xcompiler -O2 " + all_targets_flags
+ cuda_debug_flags = "-O0 -g -Xcompiler -O2 " + all_targets_flags
+
+ elif "gcc" in compiler.cxx:
+ all_targets_flags = "-Xcompiler -finline-functions -Xcompiler -finline-limit=20000"
+
+ cuda_release_flags = "-O3 -Xcompiler -Ofast " + all_targets_flags
+ cuda_reldebinf_flags = "-O3 -g -Xcompiler -Ofast " + all_targets_flags
+ cuda_debug_flags = "-O0 -g -Xcompiler -O0 " + all_targets_flags
+
+ else:
+ all_targets_flags = "-Xcompiler -finline-functions"
+
+ cuda_release_flags = "-O3 -Xcompiler -Ofast " + all_targets_flags
+ cuda_reldebinf_flags = "-O3 -g -Xcompiler -Ofast " + all_targets_flags
+ cuda_debug_flags = "-O0 -g -Xcompiler -O0 " + all_targets_flags
+
+ entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS_RELEASE", cuda_release_flags))
+ entries.append(
+ cmake_cache_string("CMAKE_CUDA_FLAGS_RELWITHDEBINFO", cuda_reldebinf_flags)
+ )
+ entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS_DEBUG", cuda_debug_flags))
+
+ else:
+ entries.append(cmake_cache_option("ENABLE_CUDA", False))
+
+ if "+rocm" in spec:
+ entries.append(cmake_cache_option("ENABLE_HIP", True))
+ else:
+ entries.append(cmake_cache_option("ENABLE_HIP", False))
+
+ entries.append(cmake_cache_option("ENABLE_OPENMP_TARGET", "+omptarget" in spec))
+ if "+omptarget" in spec:
+ if "%xl" in spec:
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_COMPILE_FLAGS", "-qoffload;-qsmp=omp;-qnoeh;-qalias=noansi"
+ )
+ )
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_LINK_FLAGS", "-qoffload;-qsmp=omp;-qnoeh;-qalias=noansi"
+ )
+ )
+ if "%clang" in spec:
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_COMPILE_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
+ )
+ )
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_LINK_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
+ )
+ )
+
+ return entries
+
+ def initconfig_mpi_entries(self):
+ spec = self.spec
+ entries = super().initconfig_mpi_entries()
+
+ entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
+
+ return entries
+
+ def initconfig_package_entries(self):
+ spec = self.spec
+ entries = []
+
+ # option_prefix = "RAJA_" if spec.satisfies("@0.14.0:") else ""
+
+ # TPL locations
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# TPLs")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
+ if "caliper" in self.spec:
+ entries.append(
+ cmake_cache_path("caliper_DIR", spec["caliper"].prefix + "/share/cmake/caliper/")
+ )
+ entries.append(
+ cmake_cache_path("adiak_DIR", spec["adiak"].prefix + "/lib/cmake/adiak/")
+ )
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
+
+ entries.append(cmake_cache_string("RAJA_RANGE_ALIGN", "4"))
+ entries.append(cmake_cache_string("RAJA_RANGE_MIN_LENGTH", "32"))
+ entries.append(cmake_cache_string("RAJA_DATA_ALIGN", "64"))
+
+ entries.append(cmake_cache_option("RAJA_HOST_CONFIG_LOADED", True))
+
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
+ entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
+ entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", "+omptask" in spec))
+ entries.append(cmake_cache_option("ENABLE_SYCL", spec.satisfies("+sycl")))
+
+ # C++17
+ if spec.satisfies("@2024.07.0:") and spec.satisfies("+sycl"):
+ entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
+ # C++14
+ # Using RAJA version as threshold on purpose (no 0.14 version of RAJAPerf were released).
+ elif spec.satisfies("@0.14.0:"):
+ entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
+
+ entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "tests=benchmarks" in spec))
+ entries.append(
+ cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec or self.run_tests)
+ )
+
+ entries.append(cmake_cache_option("RAJA_PERFSUITE_USE_CALIPER", "+caliper" in spec))
+
+ return entries
+
+ def cmake_args(self):
+ return []
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index fb67631779..1894598f76 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -6,33 +6,85 @@
import socket
from spack.package import *
-from spack.pkg.builtin.camp import hip_repair_cache
+
+from .blt import llnl_link_helpers
+
+
+# Starting with 2022.03.0, the only submodule we want to fetch is tpl/desul
+# since there is no package for it. Other RAJA submodules are defined as
+# dependencies.
+def submodules(package):
+ submodules = []
+ submodules.append("tpl/desul")
+ return submodules
class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
"""RAJA Parallel Framework."""
- homepage = "https://software.llnl.gov/RAJA/"
+ homepage = "https://github.com/LLNL/RAJA"
git = "https://github.com/LLNL/RAJA.git"
tags = ["radiuss", "e4s"]
- maintainers("davidbeckingsale")
+ maintainers("davidbeckingsale", "adrienbernede")
license("BSD-3-Clause")
- version("develop", branch="develop", submodules=False)
- version("main", branch="main", submodules=False)
+ version("develop", branch="develop", submodules=submodules)
+ version("main", branch="main", submodules=submodules)
+ version(
+ "2024.07.0",
+ tag="v2024.07.0",
+ commit="4d7fcba55ebc7cb972b7cc9f6778b48e43792ea1",
+ submodules=submodules,
+ )
+ version(
+ "2024.02.2",
+ tag="v2024.02.2",
+ commit="593f756b14ac57ded33ee61d8d2292d4beb840e6",
+ submodules=submodules,
+ )
+ version(
+ "2024.02.1",
+ tag="v2024.02.1",
+ commit="3ada0950b0774ec907d30a9eceaf6af7478b833b",
+ submodules=submodules,
+ )
+ version(
+ "2024.02.0",
+ tag="v2024.02.0",
+ commit="82d1b926ada0fbb15a4a6e0adadc30c715cfda7b",
+ submodules=submodules,
+ )
+ version(
+ "2023.06.1",
+ tag="v2023.06.1",
+ commit="9b5f61edf3aa1e6fdbc9a4b30828c81504639963",
+ submodules=submodules,
+ )
+ version(
+ "2023.06.0",
+ tag="v2023.06.0",
+ commit="e330b2560747d5417cd7bd265fab3fb91d32ecbd",
+ submodules=submodules,
+ )
+ version(
+ "2022.10.5",
+ tag="v2022.10.5",
+ commit="3774f51339459bbbdb77055aa23f82919b6335b6",
+ submodules=submodules,
+ )
version(
"2022.10.4",
tag="v2022.10.4",
commit="c2a6b1740759ae3ae7c85b35e20dbffbe235355d",
- submodules=False,
+ submodules=submodules,
)
version(
"2022.03.0",
tag="v2022.03.0",
commit="4351fe6a50bd579511a625b017c9e054885e7fd2",
- submodules=False,
+ submodules=submodules,
)
version(
"0.14.0",
@@ -107,6 +159,8 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
"0.4.0", tag="v0.4.0", commit="31b2a48192542c2da426885baa5af0ed57606b78", submodules="True"
)
+ depends_on("cxx", type="build") # generated
+
# export targets when building pre-2.4.0 release with BLT 0.4.0+
patch(
"https://github.com/LLNL/RAJA/commit/eca1124ee4af380d6613adc6012c307d1fd4176b.patch?full_index=1",
@@ -114,8 +168,24 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
when="@:0.13.0 ^blt@0.4:",
)
- variant("openmp", default=True, description="Build OpenMP backend")
- variant("shared", default=True, description="Build Shared Libs")
+ # Backward compatibility is stopped from ROCm 6.0
+ # Future relase will have the change from PR https://github.com/LLNL/RAJA/pull/1568
+ patch(
+ "https://github.com/LLNL/RAJA/commit/406eb8dee05a41eb32c421c375688a4863b60642.patch?full_index=1",
+ sha256="d9ce5ef038555cbccb330a9016b7be77e56ae0660583cba955dab9d0297a4b07",
+ when="^hip@6.0",
+ )
+
+ variant("openmp", default=False, description="Build OpenMP backend")
+ variant("shared", default=False, description="Build shared libs")
+ variant("desul", default=False, description="Build desul atomics backend")
+ variant("vectorization", default=False, description="Build SIMD/SIMT intrinsics support")
+ variant(
+ "omptask", default=False, description="Build OpenMP task variants of internal algorithms"
+ )
+ variant("omptarget", default=False, description="Build OpenMP on target device support")
+ variant("sycl", default=False, description="Build sycl backend")
+
variant("plugins", default=False, description="Enable runtime plugins")
variant("examples", default=True, description="Build examples.")
variant("exercises", default=True, description="Build exercises.")
@@ -123,24 +193,45 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
# and remove the +tests conflict below.
variant("tests", default=False, description="Build tests")
+ # we don't use variants to express the failing test, we only add a variant to
+ # define whether we want to run all the tests (including those known to fail)
+ # or only the passing ones.
+ variant(
+ "run-all-tests",
+ default=False,
+ description="Run all the tests, including those known to fail.",
+ )
+
depends_on("blt", type="build")
- depends_on("blt@0.5.0:", type="build", when="@0.14.1:")
+ depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
+ depends_on("blt@0.6.1", type="build", when="@2024.02.0")
+ depends_on("blt@0.5.3", type="build", when="@2023.06.0:2023.06.1")
+ depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.5")
+ depends_on("blt@0.5.0:0.5.3", type="build", when="@0.14.1:2022.10.4")
depends_on("blt@0.4.1", type="build", when="@0.14.0")
- depends_on("blt@0.4.0:", type="build", when="@0.13.0")
- depends_on("blt@0.3.6:", type="build", when="@:0.12.0")
+ depends_on("blt@0.4.0:0.4.1", type="build", when="@0.13.0")
+ depends_on("blt@0.3.6:0.4.1", type="build", when="@:0.12.0")
conflicts("^blt@:0.3.6", when="+rocm")
+ depends_on("camp")
+ depends_on("camp+openmp", when="+openmp")
+ depends_on("camp+omptarget", when="+omptarget")
+ depends_on("camp+sycl", when="+sycl")
+ depends_on("camp@2024.07.0:", when="@2024.02.2:")
+ depends_on("camp@2024.02.1", when="@2024.02.1")
+ depends_on("camp@2024.02.0", when="@2024.02.0")
+ depends_on("camp@2023.06.0", when="@2023.06.0:2023.06.1")
+ depends_on("camp@2022.10.1:2023.06.0", when="@2022.10.3:2022.10.5")
+ depends_on("camp@2022.10.0:2023.06.0", when="@2022.10.0:2022.10.2")
+ depends_on("camp@2022.03.2", when="@2022.03.0:2022.03.1")
depends_on("camp@0.2.2:0.2.3", when="@0.14.0")
depends_on("camp@0.1.0", when="@0.10.0:0.13.0")
- depends_on("camp@2022.03.2:2022.03", when="@2022.03.0:2022.03")
- depends_on("camp@2022.10:", when="@2022.10:")
- depends_on("camp@main", when="@main")
- depends_on("camp@main", when="@develop")
- depends_on("camp+openmp", when="+openmp")
- depends_on("cmake@:3.20", when="@:2022.03+rocm", type="build")
- depends_on("cmake@3.23:", when="@2022.10:+rocm", type="build")
- depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
+ depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
+ depends_on("cmake@3.23:", when="@2022.10.0:2024.02.2+rocm", type="build")
+ depends_on("cmake@3.20:", when="@2022.10.0:2024.02.2", type="build")
+ depends_on("cmake@3.20:", when="@:2022.03+rocm", type="build")
+ depends_on("cmake@3.14:", when="@:2022.03", type="build")
depends_on("llvm-openmp", when="+openmp %apple-clang")
@@ -151,13 +242,23 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on(
"camp+rocm amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)
)
- conflicts("+openmp")
+ conflicts("+openmp", when="@:2022.03")
with when("+cuda @0.12.0:"):
depends_on("camp+cuda")
for sm_ in CudaPackage.cuda_arch_values:
depends_on("camp +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
+ conflicts("+omptarget +rocm")
+ conflicts("+sycl +omptarget")
+ conflicts("+sycl +rocm")
+ conflicts(
+ "+sycl",
+ when="@:2024.02.99",
+ msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
+ "please use a newer release.",
+ )
+
def _get_sys_type(self, spec):
sys_type = spec.architecture
if "SYS_TYPE" in env:
@@ -174,49 +275,47 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
hostname = socket.gethostname()
if "SYS_TYPE" in env:
hostname = hostname.rstrip("1234567890")
- return "{0}-{1}-{2}@{3}.cmake".format(
+ return "{0}-{1}-{2}@{3}-{4}.cmake".format(
hostname,
self._get_sys_type(self.spec),
self.spec.compiler.name,
self.spec.compiler.version,
+ self.spec.dag_hash(8),
)
def initconfig_compiler_entries(self):
spec = self.spec
+ compiler = self.compiler
+ # Default entries are already defined in CachedCMakePackage, inherit them:
entries = super().initconfig_compiler_entries()
- if "+rocm" in spec:
+
+ if spec.satisfies("+rocm"):
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+
+ llnl_link_helpers(entries, spec, compiler)
+
return entries
def initconfig_hardware_entries(self):
spec = self.spec
entries = super().initconfig_hardware_entries()
- entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
+ entries.append("#------------------{0}".format("-" * 30))
+ entries.append("# Package custom hardware settings")
+ entries.append("#------------------{0}\n".format("-" * 30))
- if "+cuda" in spec:
- entries.append(cmake_cache_option("ENABLE_CUDA", True))
+ entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
- if not spec.satisfies("cuda_arch=none"):
- cuda_arch = spec.variants["cuda_arch"].value
- entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0])))
- entries.append(
- cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0]))
- )
+ if spec.satisfies("+cuda"):
+ entries.append(cmake_cache_option("ENABLE_CUDA", True))
else:
entries.append(cmake_cache_option("ENABLE_CUDA", False))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
entries.append(cmake_cache_option("ENABLE_HIP", True))
- entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
- hip_repair_cache(entries, spec)
hipcc_flags = []
- if self.spec.satisfies("@0.14.0"):
+ if self.spec.satisfies("@0.14.0:"):
hipcc_flags.append("-std=c++14")
- archs = self.spec.variants["amdgpu_target"].value
- if archs != "none":
- arch_str = ",".join(archs)
- hipcc_flags.append("--amdgpu-target={0}".format(arch_str))
entries.append(cmake_cache_string("HIP_HIPCC_FLAGS", " ".join(hipcc_flags)))
else:
entries.append(cmake_cache_option("ENABLE_HIP", False))
@@ -229,36 +328,122 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
option_prefix = "RAJA_" if spec.satisfies("@0.14.0:") else ""
+ # TPL locations
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# TPLs")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
if "camp" in self.spec:
entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix))
- entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
- entries.append(cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", "+plugins" in spec))
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
+
+ entries.append(cmake_cache_option("RAJA_ENABLE_DESUL_ATOMICS", spec.satisfies("+desul")))
+
+ entries.append(
+ cmake_cache_option("RAJA_ENABLE_VECTORIZATION", spec.satisfies("+vectorization"))
+ )
+
+ entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", spec.satisfies("+omptask")))
+
+ entries.append(
+ cmake_cache_option("RAJA_ENABLE_TARGET_OPENMP", spec.satisfies("+omptarget"))
+ )
+
+ entries.append(cmake_cache_option("RAJA_ENABLE_SYCL", spec.satisfies("+sycl")))
+
+ # C++17
+ if spec.satisfies("@2024.07.0:") and spec.satisfies("+sycl"):
+ entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
+ # C++14
+ elif spec.satisfies("@0.14.0:"):
+ entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
+
+ if spec.satisfies("+desul"):
+ if spec.satisfies("+cuda"):
+ entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "14"))
+
entries.append(
- cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
+ cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", spec.satisfies("+plugins"))
+ )
+
+ if spec.satisfies("+omptarget"):
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_COMPILE_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
+ )
+ )
+ entries.append(
+ cmake_cache_string(
+ "BLT_OPENMP_LINK_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
+ )
+ )
+
+ entries.append(
+ cmake_cache_option(
+ "{}ENABLE_EXAMPLES".format(option_prefix), spec.satisfies("+examples")
+ )
)
if spec.satisfies("@0.14.0:"):
entries.append(
cmake_cache_option(
- "{}ENABLE_EXERCISES".format(option_prefix), "+exercises" in spec
+ "{}ENABLE_EXERCISES".format(option_prefix), spec.satisfies("+exercises")
)
)
else:
- entries.append(cmake_cache_option("ENABLE_EXERCISES", "+exercises" in spec))
+ entries.append(cmake_cache_option("ENABLE_EXERCISES", spec.satisfies("+exercises")))
+ # TODO: Treat the workaround when building tests with spack wrapper
+ # For now, removing it to test CI, which builds tests outside of wrapper.
# Work around spack adding -march=ppc64le to SPACK_TARGET_ARGS which
# is used by the spack compiler wrapper. This can go away when BLT
# removes -Werror from GTest flags
- if self.spec.satisfies("%clang target=ppc64le:") or not self.run_tests:
+ #
+ # if self.spec.satisfies("%clang target=ppc64le:")
+ # or (not self.run_tests and not spec.satisfies("+tests")):
+ if not self.run_tests and not spec.satisfies("+tests"):
entries.append(cmake_cache_option("ENABLE_TESTS", False))
else:
entries.append(cmake_cache_option("ENABLE_TESTS", True))
+ if not spec.satisfies("+run-all-tests"):
+ if spec.satisfies("%clang@12.0.0:13.9.999"):
+ entries.append(
+ cmake_cache_string(
+ "CTEST_CUSTOM_TESTS_IGNORE",
+ "test-algorithm-sort-OpenMP.exe;test-algorithm-stable-sort-OpenMP.exe",
+ )
+ )
+ excluded_tests = [
+ "test-algorithm-sort-Cuda.exe",
+ "test-algorithm-stable-sort-Cuda.exe",
+ "test-algorithm-sort-OpenMP.exe",
+ "test-algorithm-stable-sort-OpenMP.exe",
+ ]
+ if spec.satisfies("+cuda %clang@12.0.0:13.9.999"):
+ entries.append(
+ cmake_cache_string("CTEST_CUSTOM_TESTS_IGNORE", ";".join(excluded_tests))
+ )
+ if spec.satisfies("+cuda %xl@16.1.1.12"):
+ entries.append(
+ cmake_cache_string(
+ "CTEST_CUSTOM_TESTS_IGNORE",
+ "test-algorithm-sort-Cuda.exe;test-algorithm-stable-sort-Cuda.exe",
+ )
+ )
+
+ entries.append(cmake_cache_option("RAJA_HOST_CONFIG_LOADED", True))
return entries
def cmake_args(self):
- options = []
- return options
+ return []
@property
def build_relpath(self):
@@ -270,50 +455,62 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
"""Copy the build test files after the package is installed to a
relative install test subdirectory for use during `spack test run`."""
# Now copy the relative files
- self.cache_extra_test_sources(self.build_relpath)
+ cache_extra_test_sources(self, self.build_relpath)
# Ensure the path exists since relying on a relative path at the
# same level as the normal stage source path.
- mkdirp(self.install_test_root)
+ mkdirp(install_test_root(self))
@property
def _extra_tests_path(self):
# TODO: The tests should be converted to re-build and run examples
# TODO: using the installed libraries.
- return join_path(self.install_test_root, self.build_relpath, "bin")
-
- def _test_examples(self):
- """Perform very basic checks on a subset of copied examples."""
- checks = [
- (
- "ex5_line-of-sight_solution",
- [r"RAJA sequential", r"RAJA OpenMP", r"result -- PASS"],
- ),
- (
- "ex6_stencil-offset-layout_solution",
- [r"RAJA Views \(permuted\)", r"result -- PASS"],
- ),
- (
- "ex8_tiled-matrix-transpose_solution",
- [r"parallel top inner loop", r"collapsed inner loops", r"result -- PASS"],
- ),
- ("kernel-dynamic-tile", [r"Running index", r"(24,24)"]),
- ("plugin-example", [r"Launching host kernel for the 10 time"]),
- ("tut_batched-matrix-multiply", [r"result -- PASS"]),
- ("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"]),
- ]
- for exe, expected in checks:
- reason = "test: checking output of {0} for {1}".format(exe, expected)
- self.run_test(
- exe,
- [],
- expected,
- installed=False,
- purpose=reason,
- skip_missing=True,
- work_dir=self._extra_tests_path,
- )
+ return join_path(install_test_root(self), self.build_relpath, "bin")
+
+ def run_example(self, exe, expected):
+ """run and check outputs of the example"""
+ with working_dir(self._extra_tests_path):
+ example = which(exe)
+ if example is None:
+ raise SkipTest(f"{exe} was not built")
+
+ out = example(output=str.split, error=str.split)
+ check_outputs(expected, out)
+
+ def test_line_of_sight(self):
+ """check line of sight example"""
+ self.run_example(
+ "ex5_line-of-sight_solution",
+ [r"C-style sequential", r"RAJA sequential", r"result -- PASS"],
+ )
+
+ def test_stencil_offset_layout(self):
+ """check stencil offset layout"""
+ self.run_example(
+ "ex6_stencil-offset-layout_solution", [r"RAJA Views \(permuted\)", r"result -- PASS"]
+ )
+
+ def test_tiled_matrix(self):
+ """check tiled matrix transpose"""
+ self.run_example(
+ "ex8_tiled-matrix-transpose_solution",
+ [r"C-version", r"RAJA sequential", r"result -- PASS"],
+ )
+
+ def test_dynamic_tile(self):
+ """check kernel dynamic tile"""
+ self.run_example("kernel-dynamic-tile", [r"Running index", r"(24,24)"])
+
+ def test_plugin_example(self):
+ """check plugin example"""
+ self.run_example("plugin-example", [r"Launching host kernel for the 10 time"])
+
+ def test_matrix_multiply(self):
+ """check batched matrix multiple tutorial"""
+ self.run_example(
+ "tut_batched-matrix-multiply", [r"batched matrix multiplication", r"result -- PASS"]
+ )
- def test(self):
- """Perform smoke tests."""
- self._test_examples()
+ def test_wave_equation(self):
+ """check wave equation"""
+ self.run_example("wave-eqn", [r"Max Error = 2", r"Evolved solution to time"])
diff --git a/var/spack/repos/builtin/packages/ramulator/package.py b/var/spack/repos/builtin/packages/ramulator/package.py
index 724a26fc27..dcb9c6ff6f 100644
--- a/var/spack/repos/builtin/packages/ramulator/package.py
+++ b/var/spack/repos/builtin/packages/ramulator/package.py
@@ -21,6 +21,8 @@ class Ramulator(MakefilePackage):
version("sst", commit="7d2e72306c6079768e11a1867eb67b60cee34a1c")
+ depends_on("cxx", type="build") # generated
+
patch("ramulator_sha_7d2e723_gcc48Patch.patch", when="@sst")
patch("ramulator_sha_7d2e723_libPatch.patch", when="@sst")
diff --git a/var/spack/repos/builtin/packages/randfold/package.py b/var/spack/repos/builtin/packages/randfold/package.py
index ae2dbac959..a4c70f5ed4 100644
--- a/var/spack/repos/builtin/packages/randfold/package.py
+++ b/var/spack/repos/builtin/packages/randfold/package.py
@@ -16,6 +16,8 @@ class Randfold(MakefilePackage):
version("2.0.1", sha256="b286145deb9ac6197062d98e209da095f00c45a5a615616bcf2b2a6609ed113f")
+ depends_on("c", type="build") # generated
+
depends_on("squid")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/random123/package.py b/var/spack/repos/builtin/packages/random123/package.py
index efc681f98c..e474f88279 100644
--- a/var/spack/repos/builtin/packages/random123/package.py
+++ b/var/spack/repos/builtin/packages/random123/package.py
@@ -16,6 +16,8 @@ class Random123(Package):
homepage = "https://www.deshawresearch.com/resources_random123.html"
url = "https://github.com/DEShawResearch/random123/archive/refs/tags/v1.14.0.tar.gz"
+ maintainers("KineticTheory")
+
version("1.14.0", sha256="effafd8656b18030b2a5b995cd3650c51a7c45052e6e1c21e48b9fa7a59d926e")
version(
"1.13.2",
@@ -33,9 +35,13 @@ class Random123(Package):
url="https://www.deshawresearch.com/downloads/download_random123.cgi/Random123-1.09.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("ibmxl.patch", when="@1.09")
patch("arm-gcc.patch", when="@1.09")
patch("v1132-xl161.patch", when="@1.13.2")
+ patch("v1140-hip.patch", when="@1.14.0")
def install(self, spec, prefix):
# Random123 doesn't have a build system.
diff --git a/var/spack/repos/builtin/packages/random123/v1140-hip.patch b/var/spack/repos/builtin/packages/random123/v1140-hip.patch
new file mode 100644
index 0000000000..4e3ef56a12
--- /dev/null
+++ b/var/spack/repos/builtin/packages/random123/v1140-hip.patch
@@ -0,0 +1,296 @@
+warning: refname 'v1.14.0' is ambiguous.
+diff --git a/include/Random123/array.h b/include/Random123/array.h
+index 8076f23..06650ec 100644
+--- a/include/Random123/array.h
++++ b/include/Random123/array.h
+@@ -81,7 +81,7 @@ inline R123_CUDA_DEVICE value_type assemble_from_u32(uint32_t *p32){
+
+ /** @endcond */
+
+-#ifdef __CUDA_ARCH__
++#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__)
+ /* CUDA can't handle std::reverse_iterator. We *could* implement it
+ ourselves, but let's not bother until somebody really feels a need
+ to reverse-iterate through an r123array */
+@@ -114,8 +114,8 @@ inline R123_CUDA_DEVICE value_type assemble_from_u32(uint32_t *p32){
+ enum {static_size = _N}; \
+ R123_CUDA_DEVICE reference operator[](size_type i){return v[i];} \
+ R123_CUDA_DEVICE const_reference operator[](size_type i) const {return v[i];} \
+- R123_CUDA_DEVICE reference at(size_type i){ if(i >= _N) R123_THROW(std::out_of_range("array index out of range")); return (*this)[i]; } \
+- R123_CUDA_DEVICE const_reference at(size_type i) const { if(i >= _N) R123_THROW(std::out_of_range("array index out of range")); return (*this)[i]; } \
++ R123_CUDA_DEVICE reference at(size_type i){ if(i >= _N) {R123_THROW(std::out_of_range("array index out of range"));}; return (*this)[i]; } \
++ R123_CUDA_DEVICE const_reference at(size_type i) const { if(i >= _N) {R123_THROW(std::out_of_range("array index out of range"));}; return (*this)[i]; } \
+ R123_CUDA_DEVICE size_type size() const { return _N; } \
+ R123_CUDA_DEVICE size_type max_size() const { return _N; } \
+ R123_CUDA_DEVICE bool empty() const { return _N==0; }; \
+diff --git a/include/Random123/boxmuller.hpp b/include/Random123/boxmuller.hpp
+index 9c91cf8..16d91f9 100644
+--- a/include/Random123/boxmuller.hpp
++++ b/include/Random123/boxmuller.hpp
+@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //
+ // r123::float2 r123::boxmuller(uint32_t u0, uint32_t u1);
+ // r123::double2 r123::boxmuller(uint64_t u0, uint64_t u1);
+-//
++//
+ // float2 and double2 are identical to their synonymous global-
+ // namespace structures in CUDA.
+ //
+@@ -68,7 +68,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ namespace r123{
+
+-#if !defined(__CUDACC__)
++#if !(defined(__CUDACC__) || defined(__HIPCC__))
+ typedef struct { float x, y; } float2;
+ typedef struct { double x, y; } double2;
+ #else
+diff --git a/include/Random123/features/compilerfeatures.h b/include/Random123/features/compilerfeatures.h
+index 0606dee..9ad3f82 100644
+--- a/include/Random123/features/compilerfeatures.h
++++ b/include/Random123/features/compilerfeatures.h
+@@ -36,7 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ The Random123 library is portable across C, C++, CUDA, OpenCL environments,
+ and multiple operating systems (Linux, Windows 7, Mac OS X, FreeBSD, Solaris).
+ This level of portability requires the abstraction of some features
+-and idioms that are either not standardized (e.g., asm statments), or for which
++and idioms that are either not standardized (e.g., asm statments), or for which
+ different vendors have their own standards (e.g., SSE intrinsics) or for
+ which vendors simply refuse to conform to well-established standards (e.g., <inttypes.h>).
+
+@@ -55,7 +55,7 @@ Most of the symbols are boolean valued. In general, they will
+ Library users can override any value by defining the pp-symbol with a compiler option,
+ e.g.,
+
+- cc -DR123_USE_MULHILO64_C99
++ cc -DR123_USE_MULHILO64_C99
+
+ will use a strictly c99 version of the full-width 64x64->128-bit multiplication
+ function, even if it would be disabled by default.
+@@ -84,8 +84,8 @@ All boolean-valued pre-processor symbols in Random123/features/compilerfeatures.
+ CXX11_EXPLICIT_CONVERSIONS
+ CXX11_LONG_LONG
+ CXX11_STD_ARRAY
+- CXX11
+-
++ CXX11
++
+ X86INTRIN_H
+ IA32INTRIN_H
+ XMMINTRIN_H
+@@ -102,7 +102,7 @@ All boolean-valued pre-processor symbols in Random123/features/compilerfeatures.
+ MULHILO64_C99
+
+ U01_DOUBLE
+-
++
+ @endverbatim
+ Most have obvious meanings. Some non-obvious ones:
+
+@@ -141,11 +141,11 @@ There are also non-boolean valued symbols:
+ <ul>
+ <li>R123_STATIC_INLINE -
+ According to both C99 and GNU99, the 'static inline' declaration allows
+- the compiler to not emit code if the function is not used.
++ the compiler to not emit code if the function is not used.
+ Note that the semantics of 'inline', 'static' and 'extern' in
+ gcc have changed over time and are subject to modification by
+ command line options, e.g., -std=gnu89, -fgnu-inline.
+- Nevertheless, it appears that the meaning of 'static inline'
++ Nevertheless, it appears that the meaning of 'static inline'
+ has not changed over time and (with a little luck) the use of 'static inline'
+ here will be portable between versions of gcc and to other C99
+ compilers.
+@@ -157,7 +157,7 @@ There are also non-boolean valued symbols:
+ embellishments to strongly encourage that the declared function be
+ inlined. If there is no such compiler-specific magic, it should
+ expand to decl, unadorned.
+-
++
+ <li>R123_CUDA_DEVICE - which expands to __device__ (or something else with
+ sufficiently similar semantics) when CUDA is in use, and expands
+ to nothing in other cases.
+@@ -192,7 +192,7 @@ There are also non-boolean valued symbols:
+ \cond HIDDEN_FROM_DOXYGEN
+ */
+
+-/*
++/*
+ N.B. When something is added to the list of features, it should be
+ added to each of the *features.h files, AND to examples/ut_features.cpp.
+ */
+@@ -204,6 +204,8 @@ added to each of the *features.h files, AND to examples/ut_features.cpp.
+ #include "openclfeatures.h"
+ #elif defined(__CUDACC__)
+ #include "nvccfeatures.h"
++#elif defined(__HIPCC__)
++#include "hipfeatures.h"
+ #elif defined(__ICC)
+ #include "iccfeatures.h"
+ #elif defined(__xlC__) || defined(__ibmxl__)
+@@ -292,7 +294,7 @@ added to each of the *features.h files, AND to examples/ut_features.cpp.
+
+ #ifndef R123_USE_64BIT
+ #define R123_USE_64BIT 1
+-#endif
++#endif
+
+ #ifndef R123_USE_PHILOX_64BIT
+ #define R123_USE_PHILOX_64BIT (R123_USE_64BIT && (R123_USE_MULHILO64_ASM || R123_USE_MULHILO64_MSVC_INTRIN || R123_USE_MULHILO64_CUDA_INTRIN || R123_USE_GNU_UINT128 || R123_USE_MULHILO64_C99 || R123_USE_MULHILO64_OPENCL_INTRIN || R123_USE_MULHILO64_MULHI_INTRIN))
+@@ -327,7 +329,7 @@ added to each of the *features.h files, AND to examples/ut_features.cpp.
+ #ifndef R123_METAL_CONSTANT_ADDRESS_SPACE
+ #define R123_METAL_CONSTANT_ADDRESS_SPACE
+ #endif
+-
++
+ /*
+ * Windows.h (and perhaps other "well-meaning" code define min and
+ * max, so there's a high chance that our definition of min, max
+diff --git a/include/Random123/features/hipfeatures.h b/include/Random123/features/hipfeatures.h
+new file mode 100644
+index 0000000..f3ac0ed
+--- /dev/null
++++ b/include/Random123/features/hipfeatures.h
+@@ -0,0 +1,129 @@
++/*
++Copyright 2010-2011, D. E. Shaw Research.
++All rights reserved.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are
++met:
++
++* Redistributions of source code must retain the above copyright
++ notice, this list of conditions, and the following disclaimer.
++
++* Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions, and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++
++* Neither the name of D. E. Shaw Research nor the names of its
++ contributors may be used to endorse or promote products derived from
++ this software without specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++*/
++#ifndef __r123_hip_features_dot_h__
++#define __r123_hip_features_dot_h__
++
++#if !(defined(CUDART_VERSION) || defined(HIP_INCLUDE_HIP_HIP_RUNTIME_API_H))
++#error "why are we in hipfeatures.h if neither CUDART_VERSION NOR HIP_PLATFORM?"
++#endif
++
++#if CUDART_VERSION < 4010 && !defined(HIP_INCLUDE_HIP_HIP_RUNTIME_API_H)
++#error "CUDA versions earlier than 4.1 produce incorrect results for some templated functions in namespaces. Random123 is unsupported. See comments in nvccfeatures.h"
++// This test was added in Random123-1.08 (August, 2013) because we
++// discovered that Ftype(maxTvalue<T>()) with Ftype=double and
++// T=uint64_t in examples/uniform.hpp produces -1 for CUDA4.0 and
++// earlier. We can't be sure this bug doesn't also affect invocations
++// of other templated functions, e.g., essentially all of Random123.
++// Thus, we no longer trust CUDA versions earlier than 4.1 even though
++// we had previously tested and timed Random123 with CUDA 3.x and 4.0.
++// If you feel lucky or desperate, you can change #error to #warning, but
++// please take extra care to be sure that you are getting correct
++// results.
++#endif
++
++// nvcc falls through to gcc or msvc. So first define
++// a couple of things and then include either gccfeatures.h
++// or msvcfeatures.h
++
++//#ifdef __CUDA_ARCH__ allows Philox32 and Philox64 to be compiled
++//for both device and host functions in CUDA by setting compiler flags
++//for the device function
++#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__)
++#ifndef R123_CUDA_DEVICE
++#define R123_CUDA_DEVICE __host__ __device__
++#endif
++
++#ifndef R123_USE_MULHILO64_CUDA_INTRIN
++#define R123_USE_MULHILO64_CUDA_INTRIN 1
++#endif
++
++#ifndef R123_THROW
++// No exceptions in CUDA, at least upto 4.0
++#define R123_THROW(x) R123_ASSERT(0)
++#endif
++
++#ifndef R123_ASSERT
++# if defined(__CUDA_ARCH__)
++# define R123_ASSERT(x) if((x)); else asm("trap;")
++# elif defined(__HIP_DEVICE_COMPILE__)
++# define R123_ASSERT(x) if((x)); else asm("s_trap 2;")
++# endif
++#endif
++
++#else // ! ( defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) )
++// If we're using nvcc not compiling for the CUDA architecture,
++// then we must be compiling for the host. In that case,
++// tell the philox code to use the mulhilo64 asm because
++// nvcc doesn't grok uint128_t.
++#ifndef R123_USE_MULHILO64_ASM
++#define R123_USE_MULHILO64_ASM 1
++#endif
++
++#endif // __CUDA_ARCH__
++
++#ifndef R123_BUILTIN_EXPECT
++#define R123_BUILTIN_EXPECT(expr,likely) expr
++#endif
++
++#ifndef R123_USE_AES_NI
++#define R123_USE_AES_NI 0
++#endif
++
++#ifndef R123_USE_SSE4_2
++#define R123_USE_SSE4_2 0
++#endif
++
++#ifndef R123_USE_SSE4_1
++#define R123_USE_SSE4_1 0
++#endif
++
++#ifndef R123_USE_SSE
++#define R123_USE_SSE 0
++#endif
++
++#ifndef R123_USE_GNU_UINT128
++#define R123_USE_GNU_UINT128 0
++#endif
++
++#ifndef R123_ULONG_LONG
++// uint64_t, which is what we'd get without this, is
++// not the same as unsigned long long
++#define R123_ULONG_LONG unsigned long long
++#endif
++
++#if defined(__GNUC__)
++#include "gccfeatures.h"
++#elif defined(_MSC_FULL_VER)
++#include "msvcfeatures.h"
++#endif
++
++#endif
+diff --git a/include/Random123/uniform.hpp b/include/Random123/uniform.hpp
+index ee4ddfb..d40d0a4 100644
+--- a/include/Random123/uniform.hpp
++++ b/include/Random123/uniform.hpp
+@@ -125,7 +125,7 @@ R123_MK_SIGNED_UNSIGNED(__int128_t, __uint128_t);
+ #undef R123_MK_SIGNED_UNSIGNED
+ #endif
+
+-#if defined(__CUDACC__) || defined(_LIBCPP_HAS_NO_CONSTEXPR)
++#if defined(__CUDACC__) || defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(__HIPCC__)
+ // Amazing! cuda thinks numeric_limits::max() is a __host__ function, so
+ // we can't use it in a device function.
+ //
diff --git a/var/spack/repos/builtin/packages/range-v3/package.py b/var/spack/repos/builtin/packages/range-v3/package.py
index 40227261c0..feed5f0cfc 100644
--- a/var/spack/repos/builtin/packages/range-v3/package.py
+++ b/var/spack/repos/builtin/packages/range-v3/package.py
@@ -24,6 +24,7 @@ class RangeV3(CMakePackage):
license("BSL-1.0")
version("master", branch="master")
+ version("0.12.0", sha256="015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb")
version("0.11.0", sha256="376376615dbba43d3bef75aa590931431ecb49eb36d07bb726a19f680c75e20c")
version("0.10.0", sha256="5a1cd44e7315d0e8dcb1eee4df6802221456a9d1dbeac53da02ac7bd4ea150cd")
version("0.5.0", sha256="32e30b3be042246030f31d40394115b751431d9d2b4e0f6d58834b2fd5594280")
@@ -40,6 +41,8 @@ class RangeV3(CMakePackage):
version("0.2.1", sha256="25d5e3dad8052d668873e960bd78f068bebfba3bd28a278f805ea386f9438790")
version("0.2.0", sha256="49b1a62a7a36dab582521c8034d8e736a8922af664d007c1529d3162b1294331")
+ depends_on("cxx", type="build") # generated
+
# Note that as of 0.3.6 range is a header-only library so it is not
# necessary to match standards with packages using this
# one. Eventually range-v3 will be obsoleted by the C++ standard.
diff --git a/var/spack/repos/builtin/packages/rankstr/package.py b/var/spack/repos/builtin/packages/rankstr/package.py
index 899e8ed1c3..32e3cb1302 100644
--- a/var/spack/repos/builtin/packages/rankstr/package.py
+++ b/var/spack/repos/builtin/packages/rankstr/package.py
@@ -19,12 +19,16 @@ class Rankstr(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.4.0", sha256="f33c920aa67b867d0fa2001d98f6762e90f59a41b2f66c27a63cff6bd6afeb1b")
version("0.3.0", sha256="5e6378a8fe155b4c6c5cf45db8aaf0562d88e93471d0e12c1e922252ffcce5e6")
version("0.2.0", sha256="a3f7fd8015156c1b600946af759a03e099e05c83e7b2da6bac394fe7c0d4efae")
version("0.1.0", sha256="b68239d67b2359ecc067cc354f86ccfbc8f02071e60d28ae0a2449f2e7f88001")
version("0.0.3", sha256="d32052fbecd44299e13e69bf2dd7e5737c346404ccd784b8c2100ceed99d8cd3")
version("0.0.2", sha256="b88357bf88cdda9565472543225d6b0fa50f0726f6e2d464c92d31a98b493abb")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("mpi")
variant("shared", default=True, description="Build with shared libraries")
@@ -36,8 +40,5 @@ class Rankstr(CMakePackage):
if spec.satisfies("@0.1.0:"):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("RANKSTR_LINK_STATIC", True))
return args
diff --git a/var/spack/repos/builtin/packages/rapidjson/no_march-1.2-2024.patch b/var/spack/repos/builtin/packages/rapidjson/no_march-1.2-2024.patch
new file mode 100644
index 0000000000..e2f1e1a07c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rapidjson/no_march-1.2-2024.patch
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1b3a79de..2d165f45 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,15 +70,7 @@ endif(CCACHE_FOUND)
+ find_program(VALGRIND_FOUND valgrind)
+
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+- if(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT AND NOT CMAKE_CROSSCOMPILING)
+- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
+- else()
+- #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+- endif()
+- endif()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+ set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wsign-conversion)
+ if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
+@@ -106,15 +98,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ endif()
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- if(NOT CMAKE_CROSSCOMPILING)
+- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
+- else()
+- #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+- endif()
+- endif()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
+ set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough)
+ if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
diff --git a/var/spack/repos/builtin/packages/rapidjson/package.py b/var/spack/repos/builtin/packages/rapidjson/package.py
index fdd0b7f903..bfa9573ae7 100644
--- a/var/spack/repos/builtin/packages/rapidjson/package.py
+++ b/var/spack/repos/builtin/packages/rapidjson/package.py
@@ -15,6 +15,7 @@ class Rapidjson(CMakePackage):
license("MIT")
+ version("1.2.0-2024-08-16", commit="7c73dd7de7c4f14379b781418c6e947ad464c818")
version("1.2.0-2022-03-09", commit="8261c1ddf43f10de00fd8c9a67811d1486b2c784")
version("1.2.0-2021-08-13", commit="00dbcf2c6e03c47d6c399338b6de060c71356464")
version("1.1.0", sha256="bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e")
@@ -22,6 +23,8 @@ class Rapidjson(CMakePackage):
version("1.0.1", sha256="a9003ad5c6384896ed4fd1f4a42af108e88e1b582261766df32d717ba744ee73")
version("1.0.0", sha256="4189b32b9c285f34b37ffe4c0fd5627c1e59c2444daacffe5a96fdfbf08d139b")
+ depends_on("cxx", type="build") # generated
+
variant("doc", default=False, description="Build and install documentation")
depends_on("doxygen+graphviz", when="+doc")
@@ -29,10 +32,13 @@ class Rapidjson(CMakePackage):
# -march=native causes issues on ARM, with older GCC, and with Fujitsu
# Spack injects the appropriate optimization flags anyway
# https://github.com/Tencent/rapidjson/issues/1816
- patch("no_march-1.2.patch", when="@1.2")
+ patch("no_march-1.2-2024.patch", when="@1.2.0-2024-08-16:")
+ patch("no_march-1.2.patch", when="@1.2:1.2.0-2022-03-09")
patch("no_march-1.1.patch", when="@1.1")
patch("no_march-1.0.patch", when="@1.0")
+ conflicts("%gcc@14", when="@:1.2.0-2022-03-09")
+
def cmake_args(self):
args = []
args.append(self.define_from_variant("RAPIDJSON_BUILD_DOC", "doc"))
diff --git a/var/spack/repos/builtin/packages/raptor2/package.py b/var/spack/repos/builtin/packages/raptor2/package.py
index 5c9bf22a46..d792938853 100644
--- a/var/spack/repos/builtin/packages/raptor2/package.py
+++ b/var/spack/repos/builtin/packages/raptor2/package.py
@@ -14,6 +14,9 @@ class Raptor2(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("2.0.16", sha256="089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680")
version("2.0.15", sha256="ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed")
+ depends_on("c", type="build") # generated
+
depends_on("libxml2")
diff --git a/var/spack/repos/builtin/packages/rarpd/package.py b/var/spack/repos/builtin/packages/rarpd/package.py
index c9eb493031..2ab4f94537 100644
--- a/var/spack/repos/builtin/packages/rarpd/package.py
+++ b/var/spack/repos/builtin/packages/rarpd/package.py
@@ -23,6 +23,8 @@ class Rarpd(MakefilePackage):
"0.981107-fixes", sha256="92b44adc4a061dcedeb01f7e1c1700374199cccceef1a798de97303d387bb4c2"
)
+ depends_on("c", type="build") # generated
+
@property
def install_targets(self):
return ["PREFIX={0}".format(self.prefix), "install"]
diff --git a/var/spack/repos/builtin/packages/rasdaemon/package.py b/var/spack/repos/builtin/packages/rasdaemon/package.py
index 4d3a07af0a..8f488e5833 100644
--- a/var/spack/repos/builtin/packages/rasdaemon/package.py
+++ b/var/spack/repos/builtin/packages/rasdaemon/package.py
@@ -23,6 +23,8 @@ class Rasdaemon(AutotoolsPackage):
version("0.6.5", sha256="1d85580778a0b7c0587b42e24dfe6c02f4c07c6ca9bbb80737d50b58ac830c92")
version("0.6.4", sha256="c70e2dae1e15af496873b9e5a4d89847759fffd6cbf5ed1d74d28cd250c0771b")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/rasqal/package.py b/var/spack/repos/builtin/packages/rasqal/package.py
index bce50a0341..417412704e 100644
--- a/var/spack/repos/builtin/packages/rasqal/package.py
+++ b/var/spack/repos/builtin/packages/rasqal/package.py
@@ -21,4 +21,6 @@ class Rasqal(AutotoolsPackage):
version("0.9.32", sha256="eeba03218e3b7dfa033934d523a1a64671a9a0f64eadc38a01e4b43367be2e8f")
version("0.9.31", sha256="28d743c9f1b0e5b0486ae4a945fa1e021c8495707e7adbfa0e232244b28b7fee")
+ depends_on("c", type="build") # generated
+
depends_on("raptor2")
diff --git a/var/spack/repos/builtin/packages/ratel/package.py b/var/spack/repos/builtin/packages/ratel/package.py
index 34b2a6c08b..5de9d55acf 100644
--- a/var/spack/repos/builtin/packages/ratel/package.py
+++ b/var/spack/repos/builtin/packages/ratel/package.py
@@ -21,6 +21,8 @@ class Ratel(MakefilePackage, CudaPackage, ROCmPackage):
version("0.2.1", tag="v0.2.1", commit="043b61696a2407205fdfd898681467d1a7ff59e0")
version("0.1.2", tag="v0.1.2", commit="94ad630bf897d231af7a94bf08257f6067258aae")
+ depends_on("c", type="build") # generated
+
# development version
depends_on("libceed@develop", when="@develop")
depends_on("petsc@main", when="@develop")
diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py
index accaf42d88..c952b9d71f 100644
--- a/var/spack/repos/builtin/packages/ravel/package.py
+++ b/var/spack/repos/builtin/packages/ravel/package.py
@@ -14,6 +14,8 @@ class Ravel(CMakePackage):
url = "https://github.com/llnl/ravel/archive/v1.0.0.tar.gz"
version("1.0.0", sha256="e1e1ac6d70c9aae915623d81a8f1258488fd26f880612fe21f2e032827aa93eb")
+
+ depends_on("cxx", type="build") # generated
# See https://github.com/LLNL/ravel/pull/18
patch("qpainterpath.patch")
diff --git a/var/spack/repos/builtin/packages/raxml-ng/package.py b/var/spack/repos/builtin/packages/raxml-ng/package.py
index 4564eaca28..6f33e5f56b 100644
--- a/var/spack/repos/builtin/packages/raxml-ng/package.py
+++ b/var/spack/repos/builtin/packages/raxml-ng/package.py
@@ -27,6 +27,9 @@ class RaxmlNg(CMakePackage):
version("1.0.2", submodules=True)
version("1.0.1", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Use MPI")
depends_on("bison")
diff --git a/var/spack/repos/builtin/packages/raxml/package.py b/var/spack/repos/builtin/packages/raxml/package.py
index ee3669cf3d..4d09f191e3 100644
--- a/var/spack/repos/builtin/packages/raxml/package.py
+++ b/var/spack/repos/builtin/packages/raxml/package.py
@@ -21,6 +21,8 @@ class Raxml(Package):
version("8.2.12", sha256="338f81b52b54e16090e193daf36c1d4baa9b902705cfdc7f4497e3e09718533b")
version("8.2.11", sha256="08cda74bf61b90eb09c229e39b1121c6d95caf182708e8745bd69d02848574d7")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
variant("pthreads", default=False, description="Enable pthreads version")
@@ -33,7 +35,6 @@ class Raxml(Package):
conflicts("%apple-clang")
conflicts("%clang")
conflicts("%nag")
- conflicts("%pgi")
conflicts("%xl")
conflicts("%xl_r")
diff --git a/var/spack/repos/builtin/packages/ray/package.py b/var/spack/repos/builtin/packages/ray/package.py
index bc75c8a938..48d5962cb1 100644
--- a/var/spack/repos/builtin/packages/ray/package.py
+++ b/var/spack/repos/builtin/packages/ray/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Ray(CMakePackage, SourceforgePackage):
"""Parallel genome assemblies for parallel DNA sequencing"""
- homepage = "http://denovoassembler.sourceforge.net/"
+ homepage = "https://denovoassembler.sourceforge.net/"
sourceforge_mirror_path = "denovoassembler/Ray-2.3.1.tar.bz2"
license("GPL-3.0-or-later")
version("2.3.1", sha256="3122edcdf97272af3014f959eab9a0f0e5a02c8ffc897d842b06b06ccd748036")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
@run_after("build")
diff --git a/var/spack/repos/builtin/packages/rayleigh/package.py b/var/spack/repos/builtin/packages/rayleigh/package.py
new file mode 100644
index 0000000000..df8d46e615
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rayleigh/package.py
@@ -0,0 +1,75 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Rayleigh(MakefilePackage):
+ """Rayleigh is a 3-D convection code designed for the study of
+ dynamo behavior in spherical geometry."""
+
+ homepage = "https://github.com/geodynamics/Rayleigh"
+ url = "https://github.com/geodynamics/Rayleigh/archive/refs/tags/v1.0.1.tar.gz"
+ git = "https://github.com/geodynamics/Rayleigh.git"
+
+ maintainers("tukss")
+
+ version("main", branch="main")
+ version("1.2.0", sha256="e90acf18d47f6066fa68fd7b16c70ad9781a00be9e97467e9a388773e21e9e09")
+ version("1.1.0", sha256="93fbbdbde6088807638e4dcbd4d622203fd4753c1831bab2cb8eaeca5cba45c3")
+ version("1.0.1", sha256="9c9e3b0b180f32a889f158e2ea2967f4ac2bb2124f5d264f230efb8c8f19ea36")
+ version("1.0.0", sha256="4f2e8249256adff8c4b0bc377ceacf8a6441dcee54b7d36c784f05a454dc6dcf")
+ version("0.9.1", sha256="ab96445fc61822fe2d2cba8729a85b36de6b541febf5759de6d614847844573f")
+ version("0.9.0", sha256="63a80d1619cb639f3cb01ab82a441b77d736eee94469c47c50ab740fa81c08f4")
+
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
+ depends_on("mpi")
+ depends_on("fftw-api@3")
+ depends_on("lapack")
+
+ def setup_build_environment(self, env):
+ spec = self.spec
+ if spec.satisfies("^cray-mpich"):
+ # The Cray wrapper takes care of linking MPI correctly for all compilers.
+ env.set("FC", "ftn")
+ else:
+ env.set("FC", spec["mpi"].mpifc)
+
+ def edit(self, spec, prefix):
+ # Note that Rayleigh's configure script is a handcrafted file that is not generated
+ # by autotools. This is why we use MakefilePackage and call it manually.
+ # We pass in /dev/null as input to prevent interactive questions in configure.
+ configure("--prefix={}".format(prefix), *self.configure_args(), **{"input": os.devnull})
+
+ def configure_args(self):
+ spec = self.spec
+ args = []
+ if spec.satisfies("^mkl"):
+ args.append("--with-mkl={}".format(spec["mkl"].prefix))
+ else:
+ if not spec.satisfies("^cray-fftw"):
+ args.append("--with-fftw={}".format(spec["fftw"].prefix))
+
+ if spec.satisfies("^openblas"):
+ args.append("--openblas")
+ elif not spec.satisfies("^cray-libsci"):
+ args.append("--with-lapack={}".format(spec["lapack"].prefix))
+ args.append("--with-blas={}".format(spec["blas"].prefix))
+ else:
+ # Cray options are handled through modules and the compiler wrapper.
+ args.append("--LIBFLAGS=")
+ args.append("--INCLUDE=")
+
+ args.append("--FFLAGS_DBG=-O0 -g")
+ args.append(
+ "--FFLAGS_OPT=-O3 {}".format(
+ spec.target.optimization_flags(spec.compiler.name, str(spec.compiler.version))
+ )
+ )
+ return args
diff --git a/var/spack/repos/builtin/packages/raylib/package.py b/var/spack/repos/builtin/packages/raylib/package.py
new file mode 100644
index 0000000000..2c0d14cb1e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/raylib/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Raylib(CMakePackage):
+ """Simple and easy-to-use library for game development and multimedia applications"""
+
+ homepage = "https://www.raylib.com/"
+ url = "https://github.com/raysan5/raylib/archive/refs/tags/5.0.tar.gz"
+ git = "https://github.com/raysan5/raylib.git"
+
+ maintainers("georgemalerbo")
+
+ license("Zlib", checked_by="georgemalerbo")
+
+ version("5.5", sha256="aea98ecf5bc5c5e0b789a76de0083a21a70457050ea4cc2aec7566935f5e258e")
+ version("5.0", sha256="98f049b9ea2a9c40a14e4e543eeea1a7ec3090ebdcd329c4ca2cf98bc9793482")
+
+ depends_on("c", type="build") # generated
+
+ # The package includes an llvm variant, which is disabled by default to simplify the build.
+ # If enabled, allows Mesa to utilize software-based OpenGL rendering on systems without a GPU.
+ variant("llvm", default=False, description="Enables LLVM support in Mesa")
+
+ depends_on("cmake@3.11:", type="build")
+ depends_on("glfw", when="platform=linux")
+ depends_on("glfw", when="platform=darwin")
+ depends_on("mesa", when="platform=linux +llvm")
+ depends_on("mesa~llvm", when="platform=linux ~llvm")
+ depends_on("mesa-glu", when="platform=linux")
diff --git a/var/spack/repos/builtin/packages/rccl-tests/package.py b/var/spack/repos/builtin/packages/rccl-tests/package.py
index 18131077e4..2dc5378ba7 100644
--- a/var/spack/repos/builtin/packages/rccl-tests/package.py
+++ b/var/spack/repos/builtin/packages/rccl-tests/package.py
@@ -10,9 +10,9 @@ class RcclTests(MakefilePackage):
"""These tests check both the performance and the correctness of RCCL
operations. They can be compiled against RCCL."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rccl-tests"
- git = "https://github.com/ROCmSoftwarePlatform/rccl-tests.git"
- url = "https://github.com/ROCmSoftwarePlatform/rccl-tests.git"
+ homepage = "https://github.com/ROCm/rccl-tests"
+ git = "https://github.com/ROCm/rccl-tests.git"
+ url = "https://github.com/ROCm/rccl-tests.git"
tags = ["rocm"]
maintainers("bvanessen")
@@ -22,6 +22,8 @@ class RcclTests(MakefilePackage):
version("develop", branch="develop", preferred=True)
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="with MPI support")
depends_on("hip")
diff --git a/var/spack/repos/builtin/packages/rccl/0001-Fix-numactl-path-issue.patch b/var/spack/repos/builtin/packages/rccl/0001-Fix-numactl-path-issue.patch
deleted file mode 100644
index a984c79042..0000000000
--- a/var/spack/repos/builtin/packages/rccl/0001-Fix-numactl-path-issue.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3bd1ce0..dc72b16 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -80,6 +80,8 @@ include_directories(src)
- include_directories(src/include)
- include_directories(src/collectives)
- include_directories(src/collectives/device)
-+include_directories(${NUMACTL_DIR}/include)
-+link_directories(${NUMACTL_DIR}/lib)
-
- set(CU_SOURCES
- src/collectives/device/all_reduce.cu
diff --git a/var/spack/repos/builtin/packages/rccl/0002-Fix-numactl-rocm-smi-path-issue.patch b/var/spack/repos/builtin/packages/rccl/0002-Fix-numactl-rocm-smi-path-issue.patch
deleted file mode 100644
index 30c8b92a68..0000000000
--- a/var/spack/repos/builtin/packages/rccl/0002-Fix-numactl-rocm-smi-path-issue.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1deb1ba..f2bbf30 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -117,6 +117,8 @@ include_directories(src)
- include_directories(src/include)
- include_directories(src/collectives)
- include_directories(src/collectives/device)
-+include_directories(${NUMACTL_DIR}/include)
-+link_directories(${NUMACTL_DIR}/lib)
-
- set(CU_SOURCES
- src/collectives/device/all_reduce.cu
-@@ -241,8 +243,8 @@ if("${HIP_COMPILER}" MATCHES "hcc")
- endif()
- endif()
-
--target_include_directories(rccl PRIVATE ${ROCM_PATH}/rocm_smi/include)
--target_link_libraries(rccl PRIVATE hip::device dl -lrocm_smi64 -L${ROCM_PATH}/rocm_smi/lib)
-+target_include_directories(rccl PRIVATE ${ROCM_SMI_DIR}/include)
-+target_link_libraries(rccl PRIVATE hip::device dl -lrocm_smi64 -L${ROCM_SMI_DIR}/lib)
- target_link_libraries(rccl INTERFACE hip::host)
-
- #Setup librccl.so version
diff --git a/var/spack/repos/builtin/packages/rccl/0004-Set-rocm-core-path-for-version-file.patch b/var/spack/repos/builtin/packages/rccl/0004-Set-rocm-core-path-for-version-file.patch
new file mode 100644
index 0000000000..fd03def3ee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rccl/0004-Set-rocm-core-path-for-version-file.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5384287..ea6fd4b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -121,7 +121,7 @@ message(STATUS "hipcc version: ${hipcc_version_string}")
+
+ ## Check for ROCm version
+ execute_process(
+- COMMAND bash "-c" "cat ${ROCM_PATH}/.info/version"
++ COMMAND bash "-c" "cat $ENV{ROCMCORE_PATH}/.info/version"
+ OUTPUT_VARIABLE rocm_version_string
+ )
+ string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" rocm_version_matches ${rocm_version_string})
diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py
index 9b388d1a27..03e8089738 100644
--- a/var/spack/repos/builtin/packages/rccl/package.py
+++ b/var/spack/repos/builtin/packages/rccl/package.py
@@ -14,98 +14,35 @@ class Rccl(CMakePackage):
implementing all-reduce, all-gather, reduce, broadcast,
and reduce-scatter."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rccl"
- git = "https://github.com/ROCmSoftwarePlatform/rccl.git"
- url = "https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rccl"
+ git = "https://github.com/ROCm/rccl.git"
+ url = "https://github.com/ROCm/rccl/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["librccl"]
+ version("6.2.4", sha256="12a04743ed89a74b4a08aa046b6a549d385e15d6866042fd41eac8f085f50eea")
+ version("6.2.1", sha256="0f5e35c7afbb21c1d49ff201b7d1ddf163d853c27c75c3eaf7b449f4dc1e2188")
+ version("6.2.0", sha256="a29c94ea3b9c1a0121d7b1450cb01a697f9f9132169632312b9b0bf744d3c0e3")
+ version("6.1.2", sha256="98af99c12d800f5439c7740d797162c35810a25e08e3b11b397d3300d3c0148e")
+ version("6.1.1", sha256="6368275059ba190d554535d5aeaa5c2510d944b56efd85c90a1701d0292a14c5")
+ version("6.1.0", sha256="c6308f6883cbd63dceadbe4ee154cc6fa9e6bdccbd2f0fda295b564b0cf01e9a")
+ version("6.0.2", sha256="5c8495acba3d620b751e729d1157e7b4eea8f5e5692c50ce47c5204d3dfd443c")
+ version("6.0.0", sha256="0496d5a5f2e48c92cd390ab318df31a53cf7ec590988c2574c9f3d99c38b0fa7")
version("5.7.1", sha256="fb4c1f0084196d1226ce8a726d0f012d3890b54508a06ca87bbda619be8b90b1")
version("5.7.0", sha256="4c2825a3e4323ef3c2f8855ef445c1a81cf1992fb37e3e8a07a50db354aa3954")
version("5.6.1", sha256="27ec6b86a1a329684d808f728c1fce134517ac8e6e7047689f95dbf8386c077e")
version("5.6.0", sha256="cce13c8a9e233e7ddf91a67b1626b7aaeaf818fefe61af8de6b6b6ff47cb358c")
version("5.5.1", sha256="f6b9dc6dafeb49d95c085825876b09317d8252771c746ccf5aa19a9204a404b2")
version("5.5.0", sha256="be2964b408741d046bcd606d339a233d1d1deac7b841647ec53d6d62d71452ba")
- version("5.4.3", sha256="a2524f602bd7b3b6afeb8ba9aff660216ee807fa836e46442d068b5ed5f51a4d")
- version("5.4.0", sha256="213f4f3d75389be588673e43f563e5c0d6908798228b0b6a71f27138fd4ed0c7")
- version("5.3.3", sha256="8995a2d010ad0748fc85ac06e8da7e8d110ba996db04d42b77526c9c059c05bb")
- version("5.3.0", sha256="51da5099fa58c2be882319cebe9ceabe2062feebcc0c5849e8c109030882c10a")
- version("5.2.3", sha256="ecba09f4c95b4b2dae81b88231a972ac956d29909b5e712e21cf2a74bd251ff4")
- version("5.2.1", sha256="cfd17dc003f19900e44928d81111570d3720d4905321f2a18c909909c4bee822")
- version("5.2.0", sha256="6ee3a04da0d16eb53f768a088633a7d8ecc4416a2d0c07f7ba8426ab7892b060")
- version("5.1.3", sha256="56491257f27b48bf85f4b91434a2a6e49a448337c889db181b02c8a4a260a4bc")
- version("5.1.0", sha256="02b0180857e615326f9cab775573436b9162899ad8e526830f54392b8a51b1f5")
- version(
- "5.0.2",
- sha256="a2377ad2332b93d3443a8ee74f4dd9f965ae8cbbfad473f8f57ca17905389a39",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="80eb70243f11b80e215458a67c278cd5a655f6e486289962b92ba3504e50af5c",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="36de0d3f3ffad491758d89c208ef72c5be5e0db766053a9c766e9c5c6a33a487",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="f806f9f65c490abddc562cb4812e12701582bbb449e41cc4797d00e0dedf084e",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="c5db71423dc654e8d2c3111e142e65c89436bc636827d95d41a09a87f44fe246",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="b5231d8c5ab034a583feceebcef68d0cc0b05ec5a683f802fc7747c89f27d5f6",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="2829fae40ebc1d8be201856d2193a941c87e9cf38dca0a2f4414e675c1742f20",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="88ec9b43c31cb054fe6aa28bcc0f4b510213635268f951939d6980eee5bb3680",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="0632a15b3d6b5981c05377cf4aeb51546f4c4901fd7c37fb0c98071851ad531a",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="d9dd0b0d8b9d056fc5e6c7b814520800190952acd30dac3a7c462c4cb6f42bb3",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="ff9d03154d668093309ff814a33788f2cc093b3c627e78e42ae246e6017408b0",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="0b6676d06bdb1f65d511a95db9f842a3443def83d75759dfdf812b5e62d8c910",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="8273878ff71aac2e7adf5cc8562d2933034c6c6b3652f88fbe3cd4f2691036e3",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="290b57a66758dce47d0bfff3f5f8317df24764e858af67f60ddcdcadb9337253",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="a2524f602bd7b3b6afeb8ba9aff660216ee807fa836e46442d068b5ed5f51a4d")
+ version("5.4.0", sha256="213f4f3d75389be588673e43f563e5c0d6908798228b0b6a71f27138fd4ed0c7")
+ version("5.3.3", sha256="8995a2d010ad0748fc85ac06e8da7e8d110ba996db04d42b77526c9c059c05bb")
+ version("5.3.0", sha256="51da5099fa58c2be882319cebe9ceabe2062feebcc0c5849e8c109030882c10a")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -116,66 +53,14 @@ class Rccl(CMakePackage):
sticky=True,
)
- patch("0001-Fix-numactl-path-issue.patch", when="@3.7.0:4.3.2")
- patch("0002-Fix-numactl-rocm-smi-path-issue.patch", when="@4.5.0:5.2.1")
patch("0003-Fix-numactl-rocm-smi-path-issue.patch", when="@5.2.3:5.6")
+ patch("0004-Set-rocm-core-path-for-version-file.patch", when="@6.0:")
depends_on("cmake@3.5:", type="build")
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- "5.6.0",
- "5.6.1",
- "5.7.0",
- "5.7.1",
- ]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
+ depends_on("chrpath", when="@5.3.0:5", type="build")
+ depends_on("numactl@2:")
for ver in [
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -186,34 +71,38 @@ class Rccl(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("numactl@2:", when="@" + ver)
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
+
for ver in [
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
"5.5.0",
"5.5.1",
"5.6.0",
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-smi-lib@" + ver, when="@" + ver)
- depends_on("chrpath", when="@5.3.0:")
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
depends_on("googletest@1.11.0:", when="@5.3:")
@classmethod
@@ -229,28 +118,24 @@ class Rccl(CMakePackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ env.set("ROCMCORE_PATH", self.spec["rocm-core"].prefix)
def cmake_args(self):
- args = []
- if "@3.7.0:" in self.spec:
- args.append(self.define("NUMACTL_DIR", self.spec["numactl"].prefix))
-
+ args = [
+ self.define("NUMACTL_DIR", self.spec["numactl"].prefix),
+ self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix),
+ ]
if "auto" not in self.spec.variants["amdgpu_target"]:
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
- if self.spec.satisfies("@4.5.0:"):
- args.append(self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix))
if self.spec.satisfies("@5.3.0:"):
args.append(self.define("BUILD_TESTS", "ON"))
return args
- def test(self):
- if self.spec.satisfies("@:5.3.0"):
- print("Skipping: stand-alone tests")
- return
- test_dir = join_path(self.spec["rccl"].prefix, "bin")
- with working_dir(test_dir, create=True):
- self.run_test("UnitTests")
+ def test_unit(self):
+ """Run unit tests"""
+ unit_tests = which(join_path(self.prefix.bin, "rccl-UnitTests"))
+ unit_tests()
diff --git a/var/spack/repos/builtin/packages/rclone/package.py b/var/spack/repos/builtin/packages/rclone/package.py
index 92ace3d4fb..6e29913e38 100644
--- a/var/spack/repos/builtin/packages/rclone/package.py
+++ b/var/spack/repos/builtin/packages/rclone/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Rclone(Package):
+class Rclone(GoPackage):
"""Rclone is a command line program to sync files and directories
to and from various cloud storage providers"""
@@ -17,9 +17,18 @@ class Rclone(Package):
license("MIT")
+ version("1.68.1", sha256="c5d45b83dd008d08a0903eebf1578a11a40a77152226e22ce5e9287b9db05579")
+ version("1.65.2", sha256="1305c913ac3684d02ce2bade0a23a2115c1ec03c9447d1562bb6cd9fa2573412")
+ version("1.65.1", sha256="904b906cc465dd679a00487497e3891d33fca6b6e25c184400bccfb248344f39")
+ version("1.65.0", sha256="45ec732d50b2517dc2c860317a3bf79867634a8143e4a441a3e399434ad6c141")
version("1.64.2", sha256="0c74d8fb887691e04e865e3b6bc32e8af47c3e54a9922ffdbed38c8323e281c9")
+ version("1.64.1", sha256="670e18960efd34bae9d1a0152a54f16ba0c6b8fad728d7ff4ea8b141ef1ed93d")
+ version("1.64.0", sha256="fb08b2b7c991ade4019a561f9bb75683b8d0daa45226efbc9937639775977203")
version("1.63.1", sha256="0d8bf8b7460681f7906096a9d37eedecc5a1d1d3ad17652e68f0c6de104c2412")
+ version("1.63.0", sha256="88ed9c876b03d2cc745463903ac5233e441cd56d0d1031906bc8381af11ea0c8")
version("1.62.2", sha256="340371f94604e6771cc4a2c91e37d1bf00a524deab520340440fb0968e783f63")
+ version("1.62.1", sha256="3bb03c08f11fda276c953544487558c3c0bfe14f89796b9eaa108a334d854ed1")
+ version("1.62.0", sha256="2a04a254f60255c10998f74be9d320740df82525a7d16d8ceebab57627137b44")
version("1.61.1", sha256="34b5f52047741c7bbf54572c02cc9998489c4736a753af3c99255296b1af125d")
version("1.59.1", sha256="db3860e4549af28d87aa83f2035a57c5d081b179e40d4c828db19c3c3545831e")
version("1.58.1", sha256="4d1d50a5b4888aa8eca10624073759ab8376c8b1acb38a238831d40074792524")
@@ -32,18 +41,20 @@ class Rclone(Package):
version("1.55.0", sha256="75accdaedad3b82edc185dc8824a19a59c30dc6392de7074b6cd98d1dc2c9040")
depends_on("go@1.14:", type="build")
- depends_on("go@1.17:", type="build", when="@1.58.0:")
- depends_on("go@1.18:", type="build", when="@1.62.0:")
-
- phases = ["build", "install"]
-
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
-
- def build(self, spec, prefix):
- go("build")
-
- def install(self, spec, prefix):
- mkdirp(prefix.bin)
- install("rclone", prefix.bin)
+ depends_on("go@1.17:", type="build", when="@1.58:")
+ depends_on("go@1.18:", type="build", when="@1.62:")
+ depends_on("go@1.19:", type="build", when="@1.63:")
+ depends_on("go@1.20:", type="build", when="@1.66:")
+ depends_on("go@1.21:", type="build", when="@1.68:")
+
+ @run_after("install")
+ def install_completions(self):
+ rclone = Executable(self.prefix.bin.rclone)
+
+ mkdirp(bash_completion_path(self.prefix))
+ mkdirp(fish_completion_path(self.prefix))
+ mkdirp(zsh_completion_path(self.prefix))
+
+ rclone("genautocomplete", "bash", str(bash_completion_path(self.prefix) / "rclone"))
+ rclone("genautocomplete", "fish", str(fish_completion_path(self.prefix) / "rclone.fish"))
+ rclone("genautocomplete", "zsh", str(zsh_completion_path(self.prefix) / "_rclone"))
diff --git a/var/spack/repos/builtin/packages/rdc/package.py b/var/spack/repos/builtin/packages/rdc/package.py
index fbcb130fb2..7320dabd9e 100644
--- a/var/spack/repos/builtin/packages/rdc/package.py
+++ b/var/spack/repos/builtin/packages/rdc/package.py
@@ -12,8 +12,8 @@ from spack.package import *
class Rdc(CMakePackage):
"""ROCm Data Center Tool"""
- homepage = "https://github.com/RadeonOpenCompute/rdc"
- url = "https://github.com/RadeonOpenCompute/rdc/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rdc"
+ url = "https://github.com/ROCm/rdc/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -21,115 +21,44 @@ class Rdc(CMakePackage):
def url_for_version(self, version):
if version == Version("3.9.0"):
- return "https://github.com/RadeonOpenCompute/rdc/archive/rdc_so_ver-0.3.tar.gz"
+ return "https://github.com/ROCm/rdc/archive/rdc_so_ver-0.3.tar.gz"
- url = "https://github.com/RadeonOpenCompute/rdc/archive/rocm-{0}.tar.gz"
+ url = "https://github.com/ROCm/rdc/archive/rocm-{0}.tar.gz"
return url.format(version)
license("MIT")
-
+ version("6.2.4", sha256="cdebbc0c1a49f067fb8ff17bd91cd92f6f83b2aee142e5b576e5eb1742983a7f")
+ version("6.2.1", sha256="63c0cffd772a43d0984505646023485ca2bc8512f5a87ece016f1d381cded075")
+ version("6.2.0", sha256="dd12428426a4963d6eb3cfdd818acef7a3c4cddf32504df17f4c1004fa902bef")
+ version("6.1.2", sha256="5553b76d4c8b6381d236197613720587377d03d4fd43a5a20bb6a716d49f7dfc")
+ version("6.1.1", sha256="c133ebd20bf42e543d13c5b84ea420a7f7c069c77b1d6dcae9680de924e5f539")
+ version("6.1.0", sha256="a8ad5d880645c9e95c9c90b0c9026627b22467e3e879525fff38ccd924f36c39")
+ version("6.0.2", sha256="00defa3b68c340d7f46b8cb06b37ab0602a7949bfddc884b01c163a1526502f8")
+ version("6.0.0", sha256="5e3847a919d5f7efe99d8d76c96e78401659eccd1fb234b1b8cb4304096d6e89")
version("5.7.1", sha256="5251eb3085f2019246b332e9552dfae1572cf64ddf58306b81cbe7108019ffee")
version("5.7.0", sha256="924e94f14f6390d7a6ff7863fb4e2085c1ff5f9c12b8bd46471eb31f001c4f14")
version("5.6.1", sha256="9e9f57cebbc5ae386a405957ed2c17344cdb42db5e1a71285f2c9bc09eea6519")
version("5.6.0", sha256="5213cd89215463862f6a1e9480ebe017944a6bb6b0db1722628afaa34af57991")
version("5.5.1", sha256="a58a319ee702cf61cf71a4eba647c231392f68449b35419d941079c6de944844")
version("5.5.0", sha256="56e85e77581963fbcfcc43e091a91773de470152347808ae730bcaf92c9f5ee8")
- version("5.4.3", sha256="c44f0b070b5650bc78e2eb968aae57a8ac1e1fd160e897055b79f3026c4fbad3")
- version("5.4.0", sha256="268aab43e31045443b08a21aee8750da4cf04750c6f419ec171ec704d377a4e4")
- version("5.3.3", sha256="1bf1a02f305e3a629801e62584116a34eafbd1b26627837a2a8c10550fcf611b")
- version("5.3.0", sha256="ce9c85dad8e0c0b21e8e5938bf16f86a62dc5f6ded5f453c61acd43666634d6b")
- version("5.2.3", sha256="5ba060449bbf5e84979cb4c62eb1dac9b0e3eca45e930d2e20e7beaa87361b39")
- version("5.2.1", sha256="84b3c3754b8c9732ee6d00d37881591d3d6876feb8f29746d9eb18faea7ad035")
- version("5.2.0", sha256="2f35f74485e783f56ea724a7c69ce825f181fcdbe89de453d97ce6a3d3176ae0")
- version("5.1.3", sha256="ac3e594d7b245c787d6d9b63f551ca898d4d9403fbec0e4502f9970575e031b8")
- version("5.1.0", sha256="3cf58cb07ef241b3b73b23af83b6477194884feba642584a491e67deeceff038")
- version(
- "5.0.2",
- sha256="9e21fe7e9dd02b69425dab6be22a85469fee072bcebd2d2957633dfad8b45574",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="68d45a319dc4222d94e1fb1ce10df5f3464de0b745d0d2e9aebbf273493adcc5",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="1b467e2a473374488292ca1680562ec4e798f43847ea6464453f8f8297f12d8d",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="e9bc53d068e9a4fdccff587e34c7fe0880f003a18652cd48c29faf031dd2c98f",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="aae028aae61eb0f4dd30708c4bbb8c5c57a426f10dae9b967b81500fb106d981",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="d3dda2022ec1f8c7de4de64696009125a903fcb2f82c38b3ac07e4ab35bf9190",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="ea2c7c07d55f607968f58d7e30326cae5db5b48c1ba354caa5727394d5bad258",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="dc81ee9727c8913c05dcf20a00669ce611339ef6d6db8af34e57f42bcfa804ac",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="e9ebfc46dfa983400909ed8a9da4fa37869ab118a8426c2e4f793e21174ca07f",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="fdc51f9f1f756406d1e2ffaeee0e247d1b04fc4078f08e581bbaa7da79697ac1",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="bc6339e7f41850a4a049d085a880cfafd3fd8e1610fb94c572d79753d01aa298",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="d0d0a0e68a848b7a8fa2d88c1d0352ce68e1e142debf32c31d941904f03c4b2f",
- deprecated=True,
- )
-
- depends_on("cmake@3.15:3.19.7", type="build", when="@:4.3.1")
- depends_on("cmake@3.15:", type="build", when="@4.5.0:")
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="c44f0b070b5650bc78e2eb968aae57a8ac1e1fd160e897055b79f3026c4fbad3")
+ version("5.4.0", sha256="268aab43e31045443b08a21aee8750da4cf04750c6f419ec171ec704d377a4e4")
+ version("5.3.3", sha256="1bf1a02f305e3a629801e62584116a34eafbd1b26627837a2a8c10550fcf611b")
+ version("5.3.0", sha256="ce9c85dad8e0c0b21e8e5938bf16f86a62dc5f6ded5f453c61acd43666634d6b")
+
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.15:", type="build")
depends_on("grpc@1.28.1+shared", type="build", when="@:5.3")
depends_on("grpc@1.44.0+shared", when="@5.4.0:5.4")
- depends_on("grpc@1.55.0+shared", when="@5.5.0:")
+ depends_on("grpc@1.55.0+shared", when="@5.5.0:6.0")
+ depends_on("grpc@1.59.1+shared", when="@6.1")
+ depends_on("grpc@1.61.2+shared", when="@6.2:")
depends_on("protobuf")
depends_on("libcap")
for ver in [
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -140,32 +69,37 @@ class Rdc(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-smi-lib@" + ver, type=("build", "link"), when="@" + ver)
+ depends_on(f"rocm-smi-lib@{ver}", type=("build", "link"), when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
for ver in [
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
"5.5.0",
"5.5.1",
"5.6.0",
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
-
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"amdsmi@{ver}", when=f"@{ver}")
def patch(self):
filter_file(r"\${ROCM_DIR}/rocm_smi", "${ROCM_SMI_DIR}", "CMakeLists.txt")
@@ -177,13 +111,13 @@ class Rdc(CMakePackage):
)
if self.spec.satisfies("@5.4.0:5.4"):
filter_file(
- "${ROCM_DIR}/${CMAKE_INSTALL_INCLUDEDIR}",
+ r"${ROCM_DIR}/${CMAKE_INSTALL_INCLUDEDIR}",
"{0}/include".format(self.spec["rocm-smi-lib"].prefix),
"CMakeLists.txt",
string=True,
)
filter_file(
- "${ROCM_DIR}/${CMAKE_INSTALL_LIBDIR}",
+ r"${ROCM_DIR}/${CMAKE_INSTALL_LIBDIR}",
"{0}/lib".format(self.spec["rocm-smi-lib"].prefix),
"CMakeLists.txt",
string=True,
@@ -193,22 +127,14 @@ class Rdc(CMakePackage):
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
- rpath = self.rpath
- rpath.append(self.prefix.opt.rocm.rdc.lib)
- rpath = ";".join(rpath)
- args = [
- "-DCMAKE_INSTALL_RPATH=" + rpath,
- "-DGRPC_ROOT=" + self.spec["grpc"].prefix,
- "-DCMAKE_MODULE_PATH={0}/cmake_modules".format(self.stage.source_path),
- "-DROCM_SMI_DIR=" + self.spec["rocm-smi-lib"].prefix,
- "-DCMAKE_BUILD_WITH_INSTALL_RPATH=1",
+ return [
+ self.define("GRPC_ROOT", self.spec["grpc"].prefix),
+ self.define("CMAKE_MODULE_PATH", f"{self.stage.source_path}/cmake_modules"),
+ self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix),
]
- return args
diff --git a/var/spack/repos/builtin/packages/rdkit/package.py b/var/spack/repos/builtin/packages/rdkit/package.py
index 60263763ec..4017b49436 100644
--- a/var/spack/repos/builtin/packages/rdkit/package.py
+++ b/var/spack/repos/builtin/packages/rdkit/package.py
@@ -18,6 +18,7 @@ class Rdkit(CMakePackage):
license("BSD-3-Clause")
+ version("2024_03_3", sha256="52f79c6bf1d446cdb5c86a35de655d96bad0c52a5f4ecbe15f08eaf334e6f76a")
version("2023_03_1", sha256="db346afbd0ba52c843926a2a62f8a38c7b774ffab37eaf382d789a824f21996c")
version("2022_09_5", sha256="2efe7ce3b527df529ed3e355e2aaaf14623e51876be460fa4ad2b7f7ad54c9b1")
version("2021_09_5", sha256="f720b3f6292c4cd0a412a073d848ffac01a43960082e33ee54b68798de0cbfa1")
@@ -46,6 +47,10 @@ class Rdkit(CMakePackage):
version("2020_09_1", sha256="ac105498be52ff77f7e9328c41d0e61a2318cac0789d6efc30f5f50dc78a992c")
version("2020_03_6", sha256="a3663295a149aa0307ace6d1995094d0334180bc8f892fa325558a110154272b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("freetype", default=True, description="Build freetype support")
with when("@2022_09_5:"):
@@ -69,6 +74,8 @@ class Rdkit(CMakePackage):
depends_on("eigen@3:", when="+descriptors3d")
depends_on("python@3:", when="+python")
depends_on("py-numpy", when="+python")
+ # https://github.com/rdkit/rdkit/issues/7477
+ depends_on("py-numpy@:1", when="@:2024.03.3+python")
extends("python", when="+python")
@@ -81,6 +88,8 @@ class Rdkit(CMakePackage):
with when("@:2021_09_5"):
depends_on("python@3:")
depends_on("py-numpy")
+ # https://github.com/rdkit/rdkit/issues/7477
+ depends_on("py-numpy@:1")
extends("python")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/rdma-core/libdrm.patch b/var/spack/repos/builtin/packages/rdma-core/libdrm.patch
new file mode 100644
index 0000000000..41048b39cb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rdma-core/libdrm.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt 2024-06-24 15:48:01.389773228 +0200
++++ b/CMakeLists.txt 2024-06-25 09:51:13.637660505 +0200
+@@ -539,7 +539,7 @@
+ # drm headers
+
+ # Check if the headers have been installed by kernel-headers
+-find_path(DRM_INCLUDE_DIRS "drm.h" PATH_SUFFIXES "drm")
++find_path(DRM_INCLUDE_DIRS "drm.h" PATH_SUFFIXES "drm" "libdrm")
+
+ # Alternatively the headers could have been installed by libdrm
+ if (NOT DRM_INCLUDE_DIRS)
diff --git a/var/spack/repos/builtin/packages/rdma-core/package.py b/var/spack/repos/builtin/packages/rdma-core/package.py
index 6d2dbfbbc2..4d3a8fe239 100644
--- a/var/spack/repos/builtin/packages/rdma-core/package.py
+++ b/var/spack/repos/builtin/packages/rdma-core/package.py
@@ -18,6 +18,10 @@ class RdmaCore(CMakePackage):
license("GPL-2.0-only OR BSD-2-Clause")
+ version("52.0", sha256="1f0ce5f2462c982b20d21156707076278807a7adf4d10e9142f3be4bec1b2b83")
+ version("51.0", sha256="0a4a55b1351356c2750f26ec9010e8c7370402a13c95799cb8b447cf0134dd61")
+ version("50.0", sha256="405b9dd551120da9d1b8944c5ad24ab1f478fb13caedf5bf0d47053a6d6e20cc")
+ version("49.1", sha256="2e531d398073dd7ed28d95c94fa698e1a831952b508e9af93e36644dcd399936")
version("49.0", sha256="953546ad2b179f9ce68dc21eb1eb26003098ea1bf0f87a4baed45bcea134b2b4")
version("47.1", sha256="5d92058473b90be231c17220ce456837cb6da9975de498bd63b9660baa25afd6")
version("46.2", sha256="c59c3c79fbae6038d7c6d16b37132e433e19f4a86d41341c6b7974b830b0d4fa")
@@ -66,6 +70,10 @@ class RdmaCore(CMakePackage):
version("17.1", sha256="b47444b7c05d3906deb8771eec3e634984dd83f5e620d5e37d3a83f74f0cc1ba")
version("13", sha256="e5230fd7cda610753ad1252b40a28b1e9cf836423a10d8c2525b081527760d97")
+ depends_on("c", type="build") # generated
+
+ patch("libdrm.patch", when="@34:")
+
variant(
"static",
default=True,
@@ -107,11 +115,4 @@ class RdmaCore(CMakePackage):
if self.spec.satisfies("~man_pages"):
cmake_args.append("-DNO_MAN_PAGES=1")
- if self.spec.satisfies("@:39.0"):
- cmake_args.extend(
- [
- self.define("PYTHON_LIBRARY", self.spec["python"].libs[0]),
- self.define("PYTHON_INCLUDE_DIR", self.spec["python"].headers.directories[0]),
- ]
- )
return cmake_args
diff --git a/var/spack/repos/builtin/packages/re2/package.py b/var/spack/repos/builtin/packages/re2/package.py
index 0932968d18..f7232c7051 100644
--- a/var/spack/repos/builtin/packages/re2/package.py
+++ b/var/spack/repos/builtin/packages/re2/package.py
@@ -13,9 +13,30 @@ class Re2(CMakePackage):
homepage = "https://github.com/google/re2"
url = "https://github.com/google/re2/archive/2020-08-01.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
version(
+ "2024-07-02", sha256="eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b"
+ )
+ version(
+ "2024-06-01", sha256="7326c74cddaa90b12090fcfc915fe7b4655723893c960ee3c2c66e85c5504b6c"
+ )
+ version(
+ "2024-05-01", sha256="fef2f366578401eada34f5603679fb2aebe9b409de8d275a482ce5f2cbac2492"
+ )
+ version(
+ "2024-04-01", sha256="3f6690c3393a613c3a0b566309cf04dc381d61470079b653afc47c67fb898198"
+ )
+ version(
+ "2024-03-01", sha256="7b2b3aa8241eac25f674e5b5b2e23d4ac4f0a8891418a2661869f736f03f57f4"
+ )
+ version(
+ "2024-02-01", sha256="cd191a311b84fcf37310e5cd876845b4bf5aee76fdd755008eef3b6478ce07bb"
+ )
+ version(
+ "2023-11-01", sha256="4e6593ac3c71de1c0f322735bc8b0492a72f66ffccfad76e259fa21c41d27d8a"
+ )
+ version(
"2023-09-01", sha256="5bb6875ae1cd1e9fedde98018c346db7260655f86fdb8837e3075103acd3649b"
)
version(
@@ -28,17 +49,37 @@ class Re2(CMakePackage):
"2020-04-01", sha256="98794bc5416326817498384a9c43cbb5a406bab8da9f84f83c39ecad43ed5cea"
)
+ depends_on("cxx", type="build")
+
+ variant(
+ "icu",
+ default=False,
+ description="Build against ICU for full Unicode properties support",
+ when="@2023-02-01:",
+ )
variant("shared", default=False, description="Build shared instead of static libraries")
variant("pic", default=True, description="Enable position independent code")
depends_on("abseil-cpp", when="@2023-09-01:")
+ depends_on("icu4c", when="+icu")
+
+ depends_on("googletest", type="test")
+ depends_on("benchmark ~performance_counters", type="test")
+
# shared libs must have position-independent code
conflicts("+shared ~pic")
def cmake_args(self):
args = [
+ self.define_from_variant("RE2_USE_ICU", "icu"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
+ self.define("RE2_BUILD_TESTING", self.run_tests),
]
+
+ abseil = self.spec.dependencies("abseil-cpp")
+
+ if abseil:
+ args.append(self.define("CMAKE_CXX_STANDARD", abseil[0].variants["cxxstd"].value))
return args
diff --git a/var/spack/repos/builtin/packages/re2c/package.py b/var/spack/repos/builtin/packages/re2c/package.py
index 6f621b5d3a..c9ca466d02 100644
--- a/var/spack/repos/builtin/packages/re2c/package.py
+++ b/var/spack/repos/builtin/packages/re2c/package.py
@@ -2,13 +2,11 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import sys
-
+from spack.build_systems import autotools, cmake
from spack.package import *
-class Re2c(Package):
+class Re2c(AutotoolsPackage, CMakePackage):
"""re2c: a free and open-source lexer generator for C and C++"""
homepage = "https://re2c.org/index.html"
@@ -17,27 +15,31 @@ class Re2c(Package):
license("Public-Domain")
+ version("3.1", sha256="0ac299ad359e3f512b06a99397d025cfff81d3be34464ded0656f8a96676c029")
+ version("3.0", sha256="b3babbbb1461e13fe22c630a40c43885efcfbbbb585830c6f4c0d791cf82ba0b")
version("2.2", sha256="0fc45e4130a8a555d68e230d1795de0216dfe99096b61b28e67c86dfd7d86bda")
version("2.1.1", sha256="036ee264fafd5423141ebd628890775aa9447a4c4068a6307385d7366fe711f8")
version("2.1", sha256="8cba0d95c246c670de8f97f57def83a9c0f2113eaa6f7e4867a941f48f633540")
- version("2.0.3", sha256="b2bc1eb8aaaa21ff2fcd26507b7e6e72c5e3d887e58aa515c2155fb17d744278")
- version("2.0.2", sha256="6cddbb558dbfd697a729cb4fd3f095524480283b89911ca5221835d8a67ae5e0")
- version("2.0.1", sha256="aef8b50bb75905b2d55a7236380c0efdc756fa077fe16d808aaacbb10fb53531")
- version("2.0", sha256="89a9d7ee14be10e3779ea7b2c8ea4a964afce6e76b8dbcd5479940681db46d20")
- version("1.3", sha256="f37f25ff760e90088e7d03d1232002c2c2672646d5844fdf8e0d51a5cd75a503")
- version("1.2.1", sha256="1a4cd706b5b966aeffd78e3cf8b24239470ded30551e813610f9cd1a4e01b817")
- phases = ["configure", "build", "install"]
+ with default_args(deprecated=True):
+ version("2.0.3", sha256="b2bc1eb8aaaa21ff2fcd26507b7e6e72c5e3d887e58aa515c2155fb17d744278")
+ version("2.0.2", sha256="6cddbb558dbfd697a729cb4fd3f095524480283b89911ca5221835d8a67ae5e0")
+ version("2.0.1", sha256="aef8b50bb75905b2d55a7236380c0efdc756fa077fe16d808aaacbb10fb53531")
+ version("2.0", sha256="89a9d7ee14be10e3779ea7b2c8ea4a964afce6e76b8dbcd5479940681db46d20")
+ version("1.3", sha256="f37f25ff760e90088e7d03d1232002c2c2672646d5844fdf8e0d51a5cd75a503")
+ version("1.2.1", sha256="1a4cd706b5b966aeffd78e3cf8b24239470ded30551e813610f9cd1a4e01b817")
+
+ build_system(conditional("cmake", when="@2.2:"), "autotools", default="autotools")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("python@3.7:", when="@3.1", type="build")
- depends_on("cmake", when="platform=windows")
+ with when("build_system=cmake"):
+ depends_on("cmake@3.12:", type="build")
- @property
- def make_tool(self):
- if sys.platform == "win32":
- return ninja
- else:
- return make
+class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):
return [
"--disable-benchmarks",
@@ -45,24 +47,18 @@ class Re2c(Package):
"--disable-dependency-tracking",
"--disable-docs",
"--disable-lexers", # requires existing system re2c
- "--disable-libs", # experimental
+ "--enable-libs",
"--enable-golang",
]
- def configure(self, spec, prefix):
- with working_dir(self.stage.source_path, create=True):
- configure("--prefix=" + prefix, *self.configure_args())
- @when("platform=windows")
- def configure(self, spec, prefix):
- with working_dir(self.stage.source_path, create=True):
- args = ["-G", "Ninja", "-DCMAKE_INSTALL_PREFIX=%s" % prefix]
- cmake(*args)
-
- def build(self, spec, prefix):
- with working_dir(self.stage.source_path):
- self.make_tool()
-
- def install(self, spec, prefix):
- with working_dir(self.stage.source_path):
- self.make_tool("install")
+class CMakeBuilder(cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [
+ self.define("RE2C_BUILD_LIBS", True),
+ self.define("RE2C_REBUILD_DOCS", False),
+ self.define("RE2C_REBUILD_LEXERS", False),
+ self.define("RE2C_REBUILD_PARSERS", False),
+ self.define("RE2C_BUILD_RE2RUST", False),
+ self.define("RE2C_BUILD_RE2GO", False),
+ ]
diff --git a/var/spack/repos/builtin/packages/readfq/package.py b/var/spack/repos/builtin/packages/readfq/package.py
index 280ca5cf3b..2a7a777760 100644
--- a/var/spack/repos/builtin/packages/readfq/package.py
+++ b/var/spack/repos/builtin/packages/readfq/package.py
@@ -18,5 +18,7 @@ class Readfq(Package):
version("2013.04.10", commit="4fb766095d8f459e0f8025be70f9173673905d12")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
install_tree(".", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py
index 3ef4ee6894..5140bb79d2 100644
--- a/var/spack/repos/builtin/packages/readline/package.py
+++ b/var/spack/repos/builtin/packages/readline/package.py
@@ -26,6 +26,8 @@ class Readline(AutotoolsPackage, GNUMirrorPackage):
version("7.0", sha256="750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334")
version("6.3", sha256="56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
patches = [
diff --git a/var/spack/repos/builtin/packages/recola-sm/package.py b/var/spack/repos/builtin/packages/recola-sm/package.py
index 93d104250d..22458b88e7 100644
--- a/var/spack/repos/builtin/packages/recola-sm/package.py
+++ b/var/spack/repos/builtin/packages/recola-sm/package.py
@@ -21,6 +21,8 @@ class RecolaSm(CMakePackage):
version("2.2.3", sha256="9ebdc4fd8ca48789de0b6bbb2ab7e4845c92d19dfe0c3f67866cbf114d6242a5")
+ depends_on("fortran", type="build") # generated
+
depends_on("collier")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/recola/package.py b/var/spack/repos/builtin/packages/recola/package.py
index 1ea5a04dec..649262918e 100644
--- a/var/spack/repos/builtin/packages/recola/package.py
+++ b/var/spack/repos/builtin/packages/recola/package.py
@@ -39,6 +39,10 @@ class Recola(CMakePackage):
sha256="dc7db5ac9456dda2e6c03a63ad642066b0b5e4ceb8cae1f2a13ab33b35caaba8",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("collier")
depends_on("recola-sm")
depends_on("python@3:", when="+python")
diff --git a/var/spack/repos/builtin/packages/recon/package.py b/var/spack/repos/builtin/packages/recon/package.py
index fa6117fffe..1bbea3c956 100644
--- a/var/spack/repos/builtin/packages/recon/package.py
+++ b/var/spack/repos/builtin/packages/recon/package.py
@@ -19,6 +19,8 @@ class Recon(MakefilePackage):
version("1.05", sha256="4d4f76f439bcffd50380cffc41a80dc15fa4a80f38a04234e24da893ed7c025a")
+ depends_on("c", type="build") # generated
+
variant("repeatmasker", default=False, description="Use RepeatMasker developer patches (1.08)")
patch("repeatmasker_recon.patch", when="+repeatmasker")
diff --git a/var/spack/repos/builtin/packages/recorder/package.py b/var/spack/repos/builtin/packages/recorder/package.py
index 064e20f62e..5cd4e84b95 100644
--- a/var/spack/repos/builtin/packages/recorder/package.py
+++ b/var/spack/repos/builtin/packages/recorder/package.py
@@ -24,6 +24,9 @@ class Recorder(AutotoolsPackage):
version("2.1.5", sha256="6d2f8b942f61da498e25327e79c1a25b2244f4f78a9cf5482fb4aaa32d7332a1")
version("2.1.4", sha256="f66756595a7f310929c247ae03fd08a18d9843f578fffa1e3072f557bf5a158e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("posix", default=True, description="Enable POSIX level tracing.")
variant(
"mpi",
diff --git a/var/spack/repos/builtin/packages/redis-ai/package.py b/var/spack/repos/builtin/packages/redis-ai/package.py
index b790fd638a..2bdf71bdd7 100644
--- a/var/spack/repos/builtin/packages/redis-ai/package.py
+++ b/var/spack/repos/builtin/packages/redis-ai/package.py
@@ -22,6 +22,9 @@ class RedisAi(MakefilePackage):
"1.2.7", tag="v1.2.7", commit="1bf38d86233ba06e1350ca9de794df2b07cdb274", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("torch", default=True, description="Build with the pytorch backend")
variant("cuda", default=False, description="Use CUDA")
variant("rocm", default=False, description="Use ROCm")
diff --git a/var/spack/repos/builtin/packages/redis-plus-plus/package.py b/var/spack/repos/builtin/packages/redis-plus-plus/package.py
index 04fe1d0df8..87c68a5e9e 100644
--- a/var/spack/repos/builtin/packages/redis-plus-plus/package.py
+++ b/var/spack/repos/builtin/packages/redis-plus-plus/package.py
@@ -34,6 +34,8 @@ class RedisPlusPlus(CMakePackage):
version("1.3.5", sha256="a49a72fef26ed39d36a278fcc4e4d92822e111697b5992d8f26f70d16edc6c1f")
version("1.3.4", sha256="b9f2b3e0f084fe9a7360e44a9ae28aa42067fbaf027734989c778865c2d5dca5")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.18:", type="build")
depends_on("hiredis@1.0.0:", type=("build", "link"))
depends_on("hiredis@1.0.0:+ssl", type=("build", "link"), when="+tls")
diff --git a/var/spack/repos/builtin/packages/redis/package.py b/var/spack/repos/builtin/packages/redis/package.py
index e2e325faf7..d1e91863ca 100644
--- a/var/spack/repos/builtin/packages/redis/package.py
+++ b/var/spack/repos/builtin/packages/redis/package.py
@@ -19,8 +19,8 @@ class Redis(MakefilePackage):
homepage = "https://redis.io"
urls = [
- "https://download.redis.io/releases/redis-7.0.5.tar.gz",
- "https://github.com/redis/redis/archive/refs/tags/7.0.5.tar.gz",
+ "https://download.redis.io/releases/redis-7.4.0.tar.gz",
+ "https://github.com/redis/redis/archive/refs/tags/7.4.0.tar.gz",
]
git = "https://github.com/redis/redis.git"
@@ -28,29 +28,44 @@ class Redis(MakefilePackage):
license("BSD-3-Clause")
- version("7.0.5", sha256="67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3")
- version("7.0.4", sha256="f0e65fda74c44a3dd4fa9d512d4d4d833dd0939c934e946a5c622a630d057f2f")
- version("7.0.3", sha256="2cde7d17214ffe305953da9fff12333e8a72caa57fd4923e4872f6362a208e73")
- version("7.0.2", sha256="5e57eafe7d4ac5ecb6a7d64d6b61db775616dbf903293b3fcc660716dbda5eeb")
- version("7.0.1", sha256="ca1820d527e4759884620be2917079e61e996fa81da5fbe5c07c4a7b507264dc")
- version("7.0.0", sha256="284d8bd1fd85d6a55a05ee4e7c31c31977ad56cbf344ed83790beeb148baa720")
- version("6.2.7", sha256="b7a79cc3b46d3c6eb52fa37dde34a4a60824079ebdfb3abfbbfa035947c55319")
- version("6.2.6", sha256="5b2b8b7a50111ef395bf1c1d5be11e6e167ac018125055daa8b5c2317ae131ab")
- version("6.2.5", sha256="4b9a75709a1b74b3785e20a6c158cab94cf52298aa381eea947a678a60d551ae")
- version("6.2.4", sha256="ba32c406a10fc2c09426e2be2787d74ff204eb3a2e496d87cff76a476b6ae16e")
- version("6.2.3", sha256="98ed7d532b5e9671f5df0825bb71f0f37483a16546364049384c63db8764512b")
- version("6.2.2", sha256="7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535")
- version("6.2.1", sha256="cd222505012cce20b25682fca931ec93bd21ae92cb4abfe742cf7b76aa907520")
- version("6.2.0", sha256="67d624c25d962bd68aff8812a135df85bad07556b8825f3bcd5b522a9932dbca")
- version("6.0.15", sha256="4bc295264a95bc94423c162a9eee66135a24a51eefe5f53f18fc9bde5c3a9f74")
- version("6.0.5", sha256="42cf86a114d2a451b898fcda96acd4d01062a7dbaaad2801d9164a36f898f596")
- version("5.0.3", sha256="e290b4ddf817b26254a74d5d564095b11f9cd20d8f165459efa53eb63cd93e02")
- version("5.0.2", sha256="937dde6164001c083e87316aa20dad2f8542af089dfcb1cbb64f9c8300cd00ed")
- version("5.0.1", sha256="82a67c0eec97f9ad379384c30ec391b269e17a3e4596393c808f02db7595abcb")
- version("5.0.0", sha256="70c98b2d0640b2b73c9d8adb4df63bcb62bad34b788fe46d1634b6cf87dc99a4")
- version("4.0.13", sha256="17d955227966dcd68590be6139e5fe7f2d19fc4fb7334248a904ea9cdd30c1d4")
- version("4.0.12", sha256="6447259d2eed426a949c9c13f8fdb2d91fb66d9dc915dd50db13b87f46d93162")
- version("4.0.11", sha256="fc53e73ae7586bcdacb4b63875d1ff04f68c5474c1ddeda78f00e5ae2eed1bbb")
+ version("7.4.0", sha256="57b47c2c6682636d697dbf5d66d8d495b4e653afc9cd32b7adf9da3e433b8aaf")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-36824
+ version("7.0.5", sha256="67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3")
+ version("7.0.4", sha256="f0e65fda74c44a3dd4fa9d512d4d4d833dd0939c934e946a5c622a630d057f2f")
+ version("7.0.3", sha256="2cde7d17214ffe305953da9fff12333e8a72caa57fd4923e4872f6362a208e73")
+ version("7.0.2", sha256="5e57eafe7d4ac5ecb6a7d64d6b61db775616dbf903293b3fcc660716dbda5eeb")
+ version("7.0.1", sha256="ca1820d527e4759884620be2917079e61e996fa81da5fbe5c07c4a7b507264dc")
+ version("7.0.0", sha256="284d8bd1fd85d6a55a05ee4e7c31c31977ad56cbf344ed83790beeb148baa720")
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-24834
+ version("6.2.7", sha256="b7a79cc3b46d3c6eb52fa37dde34a4a60824079ebdfb3abfbbfa035947c55319")
+ version("6.2.6", sha256="5b2b8b7a50111ef395bf1c1d5be11e6e167ac018125055daa8b5c2317ae131ab")
+ version("6.2.5", sha256="4b9a75709a1b74b3785e20a6c158cab94cf52298aa381eea947a678a60d551ae")
+ version("6.2.4", sha256="ba32c406a10fc2c09426e2be2787d74ff204eb3a2e496d87cff76a476b6ae16e")
+ version("6.2.3", sha256="98ed7d532b5e9671f5df0825bb71f0f37483a16546364049384c63db8764512b")
+ version("6.2.2", sha256="7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535")
+ version("6.2.1", sha256="cd222505012cce20b25682fca931ec93bd21ae92cb4abfe742cf7b76aa907520")
+ version("6.2.0", sha256="67d624c25d962bd68aff8812a135df85bad07556b8825f3bcd5b522a9932dbca")
+ version(
+ "6.0.15", sha256="4bc295264a95bc94423c162a9eee66135a24a51eefe5f53f18fc9bde5c3a9f74"
+ )
+ version("6.0.5", sha256="42cf86a114d2a451b898fcda96acd4d01062a7dbaaad2801d9164a36f898f596")
+ version("5.0.3", sha256="e290b4ddf817b26254a74d5d564095b11f9cd20d8f165459efa53eb63cd93e02")
+ version("5.0.2", sha256="937dde6164001c083e87316aa20dad2f8542af089dfcb1cbb64f9c8300cd00ed")
+ version("5.0.1", sha256="82a67c0eec97f9ad379384c30ec391b269e17a3e4596393c808f02db7595abcb")
+ version("5.0.0", sha256="70c98b2d0640b2b73c9d8adb4df63bcb62bad34b788fe46d1634b6cf87dc99a4")
+ version(
+ "4.0.13", sha256="17d955227966dcd68590be6139e5fe7f2d19fc4fb7334248a904ea9cdd30c1d4"
+ )
+ version(
+ "4.0.12", sha256="6447259d2eed426a949c9c13f8fdb2d91fb66d9dc915dd50db13b87f46d93162"
+ )
+ version(
+ "4.0.11", sha256="fc53e73ae7586bcdacb4b63875d1ff04f68c5474c1ddeda78f00e5ae2eed1bbb"
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("tls", default=False, when="@6:", description="Builds with TLS support")
depends_on("openssl@1.1:", type=("build", "link"), when="+tls")
diff --git a/var/spack/repos/builtin/packages/redland-bindings/package.py b/var/spack/repos/builtin/packages/redland-bindings/package.py
index 964f62108f..9225f8af29 100644
--- a/var/spack/repos/builtin/packages/redland-bindings/package.py
+++ b/var/spack/repos/builtin/packages/redland-bindings/package.py
@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
@@ -20,6 +18,8 @@ class RedlandBindings(AutotoolsPackage):
version("1.0.16.1", sha256="065037ef61e9b78f642e75b9c2a42700eb1a87d903f2f9963d86591c7d916826")
version("1.0.14.1", sha256="a8cc365fccf292c56d53341ecae57fe8727e5002e048ca25f6251b5e595aec40")
+ depends_on("c", type="build") # generated
+
depends_on("swig", type="build")
depends_on("redland")
depends_on("krb5")
@@ -27,11 +27,4 @@ class RedlandBindings(AutotoolsPackage):
extends("python")
def configure_args(self):
- plib = self.spec["python"].prefix.lib
- plib64 = self.spec["python"].prefix.lib64
- mybase = self.prefix.lib
- if os.path.isdir(plib64) and not os.path.isdir(plib):
- mybase = self.prefix.lib64
- pver = "python{0}".format(self.spec["python"].version.up_to(2))
- myplib = join_path(mybase, pver, "site-packages")
- return ["--with-python", "PYTHON_LIB={0}".format(myplib)]
+ return ["--with-python", f"PYTHON_LIB={python_platlib}"]
diff --git a/var/spack/repos/builtin/packages/redland/package.py b/var/spack/repos/builtin/packages/redland/package.py
index 1c8fc89e53..4707207de6 100644
--- a/var/spack/repos/builtin/packages/redland/package.py
+++ b/var/spack/repos/builtin/packages/redland/package.py
@@ -19,5 +19,7 @@ class Redland(AutotoolsPackage):
version("1.0.16", sha256="d9a274fc086e61119d5c9beafb8d05527e040ec86f4c0961276ca8de0a049dbd")
version("1.0.15", sha256="0e1f5825b6357c9b490da866c95ae1d895dbb5f445013d2511c37df822ee9ec6")
+ depends_on("c", type="build") # generated
+
depends_on("raptor2")
depends_on("rasqal")
diff --git a/var/spack/repos/builtin/packages/redset/package.py b/var/spack/repos/builtin/packages/redset/package.py
index 5df8a0e25e..b38e4b2f14 100644
--- a/var/spack/repos/builtin/packages/redset/package.py
+++ b/var/spack/repos/builtin/packages/redset/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Redset(CMakePackage):
+class Redset(CMakePackage, CudaPackage):
"""Create MPI communicators for disparate redundancy sets"""
homepage = "https://github.com/ecp-veloc/redset"
@@ -19,6 +19,7 @@ class Redset(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.4.0", sha256="d278a5d3c1323915c379e2077dbfab1248044c86a04fc56faee6681c66380451")
version("0.3.0", sha256="007ca5e7e5f4400e22ad7bca82e366cd51c73f28067c955cc16d7d0ff0c06a1b")
version("0.2.0", sha256="0438b0ba56dafcd5694a8fceeb5a932901307353e056ab29817d30b8387f787f")
version("0.1.0", sha256="baa75de0d0d6de64ade50cff3d38ee89fd136ce69869182bdaefccf5be5d286d")
@@ -26,6 +27,8 @@ class Redset(CMakePackage):
version("0.0.4", sha256="c33fce458d5582f01ad632c6fae8eb0a03eaef00e3c240c713b03bb95e2787ad")
version("0.0.3", sha256="30ac1a960f842ae23a960a88b312af3fddc4795f2053eeeec3433a61e4666a76")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("kvtree+mpi")
depends_on("rankstr")
@@ -36,7 +39,11 @@ class Redset(CMakePackage):
depends_on("rankstr@:0.2.0", when="@:0.2.0")
depends_on("rankstr@0.3.0:", when="@0.3.0:")
- variant("shared", default=True, description="Build with shared libraries")
+ variant("cuda", default=False, description="Enable CUDA support", when="@0.4:")
+ variant("openmp", default=False, description="Enable OpenMP support", when="@0.4:")
+ variant("pthreads", default=False, description="Enable Pthread support", when="@0.4:")
+
+ variant("shared", default=True, description="Build with shared libraries", when="@0.1:")
depends_on("kvtree+shared", when="@0.1: +shared")
depends_on("kvtree~shared", when="@0.1: ~shared")
depends_on("rankstr+shared", when="@0.1: +shared")
@@ -49,10 +56,9 @@ class Redset(CMakePackage):
args.append(self.define("WITH_KVTREE_PREFIX", spec["kvtree"].prefix))
args.append(self.define("WITH_RANKSTR_PREFIX", spec["rankstr"].prefix))
- if spec.satisfies("@0.1.0:"):
- args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("REDSET_LINK_STATIC", True))
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+ args.append(self.define_from_variant("ENABLE_CUDA", "cuda"))
+ args.append(self.define_from_variant("ENABLE_OPENMP", "openmp"))
+ args.append(self.define_from_variant("ENABLE_PTHREADS", "pthreads"))
return args
diff --git a/var/spack/repos/builtin/packages/reframe/package.py b/var/spack/repos/builtin/packages/reframe/package.py
index dce47d2018..8717f6fd7d 100644
--- a/var/spack/repos/builtin/packages/reframe/package.py
+++ b/var/spack/repos/builtin/packages/reframe/package.py
@@ -26,6 +26,29 @@ class Reframe(Package):
license("BSD-3-Clause")
version("develop", branch="develop")
+ version("4.6.3", sha256="0f335e588d21a26d76beb011bc86baf80ba633d875512ecd564d0aeb320fcf2c")
+ version("4.6.2", sha256="d3343815ee3d2c330b91a1cdb924ba184119ed7d9fc88a4a754b939a4259df82")
+ version("4.6.1", sha256="058b05c430af26d2958851af0da32bac0f4bff1af7d78ce6a132c32bbe40ec5c")
+ version("4.6.0", sha256="fcd29a419eebcb990b3e9be94b44e4ea59ce0de76f271e38f10cf5a6545ed29d")
+ version("4.5.2", sha256="3f8750d0cd53261c763f9403723d87fc87361a7b0f9ba38e237d6c570fdc50df")
+ version("4.5.1", sha256="8629c0adef897ccea971d6513f64acadf14e2532a543bc055213f2f5719436b5")
+ version("4.5.0", sha256="5d1773d0bc76c9cd74de8688aa508a14ac7dfcdcea65d7f9473821905c60dacb")
+ version("4.4.2", sha256="d773ce7f48fb177331f92920117d90cba3b9fea6b78f96f2bb83ad7239a55c3c")
+ version("4.4.1", sha256="0fc8c711ccf53be8a5c687572317040e55a4edd3d935421b5957b2d9f218a0fe")
+ version("4.4.0", sha256="3a5de3eab90a1b9ac5d1b272721602b1460eea6fbbda9ba691c38995f2ed3d2b")
+ version("4.3.4", sha256="6a38279dd58da63316143c6f58b92798c1fd9523d50876bc2df19769f1562d3b")
+ version("4.3.3", sha256="3d1a1a6d2c8e3b362dadc47f642f23f7574fb81b03be31055040afe9738829c2")
+ version("4.3.2", sha256="b4e42915cf3d6c7c0f975f12eecd609ae5f165b764989f4ee066a209ff0150ae")
+ version("4.3.1", sha256="63e149b516048d522c36d29c9961cba4d4e7fde9cfcdf9f599d7a1ca0358b9e0")
+ version("4.3.0", sha256="89a73695a6c963eb1a2e6807b019fbad25793261829e3a7032f0b61ac3db66c8")
+ version("4.2.2", sha256="c210999d506f7b0582f58f390c4e35bc89a38ca277915532f9fd68ff562e8ca9")
+ version("4.2.1", sha256="c33c5406227b3fa34ee489769cb178f9dd04ead353062c21a837f31c23205bbe")
+ version("4.2.0", sha256="f1d38133023b37d01fdee46b2bf472f8fd36bf410d1c909db043b9f9d7df6122")
+ version("4.1.3", sha256="33e56bdabbc80cb80ac519ad9c341b296788b0954492059410674eba86044740")
+ version("4.1.2", sha256="b33f44f977ed1942af5fcca0bac291daefb3353e05321832310a0c8d99d09bf6")
+ version("4.1.1", sha256="68f82248dc424197e5254ca5f364565de40ed392ec02b14e8e10cab3eaf5e563")
+ version("4.1.0", sha256="2f6f6793e53fd03cdc8e457b7ed4f9b2105213c26e9d5308c8f3824ea89c936c")
+ version("4.0.5", sha256="4902258e5a201cb72ef9dc175a0970dcfc5869f3270a198dcd8bc47cc1a3cabd")
version("4.0.4", sha256="a9fb10bf2dc01f721142453297e348084683acfc0b8caa38ad1daa1b5c66456e")
version("4.0.3", sha256="ae216b0ccfda9f5f5c09f0be46cf8ab04183a0c30edf581917767dc3bb8de010")
version("4.0.2", sha256="48ec55645256d8686e077c7a9d4d2aa7d327eec27ff2ae2c78dd1db818b76ec7")
@@ -85,6 +108,9 @@ class Reframe(Package):
version("2.17.2", sha256="092241cdc15918040aacb922c806aecb59c5bdc3ff7db034a4f355d39aecc101")
version("2.17.1", sha256="0b0d32a892607840a7d668f5dcea6f03f7022a26b23e5042a0faf5b8c41cb146")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Build ReFrame's man page documentation")
variant("gelf", default=False, description="Add graylog handler support")
diff --git a/var/spack/repos/builtin/packages/regale/package.py b/var/spack/repos/builtin/packages/regale/package.py
index 8cb5977740..fed8981c46 100644
--- a/var/spack/repos/builtin/packages/regale/package.py
+++ b/var/spack/repos/builtin/packages/regale/package.py
@@ -17,6 +17,9 @@ class Regale(CMakePackage):
version("1.0", sha256="894b0927372467e765049e79b855a9a277def65638013f68a1f2b6e837e35663")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("eprosima-fastdds")
variant("examples", default=False, description="Build examples")
diff --git a/var/spack/repos/builtin/packages/regtools/package.py b/var/spack/repos/builtin/packages/regtools/package.py
new file mode 100644
index 0000000000..b262a74609
--- /dev/null
+++ b/var/spack/repos/builtin/packages/regtools/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Regtools(CMakePackage):
+ """Tools that integrate DNA-seq and RNA-seq data to help interpret mutations in a regulatory
+ and splicing context"""
+
+ homepage = "https://regtools.readthedocs.org/"
+ url = "https://github.com/griffithlab/regtools/archive/refs/tags/1.0.0.tar.gz"
+
+ license("MIT", checked_by="A-N-Other")
+
+ version("1.0.0", sha256="ed2b9db6b71b943924002653caee18511a22ed7cc3c88f428e7e9e0c2e4f431b")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install(join_path(self.build_directory, "regtools"), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/relax/package.py b/var/spack/repos/builtin/packages/relax/package.py
index d591b95500..c826a84c4f 100644
--- a/var/spack/repos/builtin/packages/relax/package.py
+++ b/var/spack/repos/builtin/packages/relax/package.py
@@ -17,6 +17,8 @@ class Relax(CMakePackage):
version("root6", sha256="1d24b1a0884bbe99d60f7d02fea45d59695c158ab5e53516ac3fb780eb460bb4")
+ depends_on("cxx", type="build") # generated
+
depends_on("clhep")
depends_on("gsl")
depends_on("hepmc@:2")
diff --git a/var/spack/repos/builtin/packages/relion/package.py b/var/spack/repos/builtin/packages/relion/package.py
index b2b93dbd15..b427880742 100644
--- a/var/spack/repos/builtin/packages/relion/package.py
+++ b/var/spack/repos/builtin/packages/relion/package.py
@@ -12,7 +12,7 @@ class Relion(CMakePackage, CudaPackage):
refinement of (multiple) 3D reconstructions or 2D class averages in
electron cryo-microscopy (cryo-EM)."""
- homepage = "http://www2.mrc-lmb.cam.ac.uk/relion"
+ homepage = "https://www2.mrc-lmb.cam.ac.uk/relion"
git = "https://github.com/3dem/relion.git"
url = "https://github.com/3dem/relion/archive/4.0.0.zip"
maintainers("dacolombo")
diff --git a/var/spack/repos/builtin/packages/remhos/package.py b/var/spack/repos/builtin/packages/remhos/package.py
index f53de7fcb2..7b6942626e 100644
--- a/var/spack/repos/builtin/packages/remhos/package.py
+++ b/var/spack/repos/builtin/packages/remhos/package.py
@@ -27,6 +27,8 @@ class Remhos(MakefilePackage):
version("develop", branch="master")
version("1.0", sha256="e60464a867fe5b1fd694fbb37bb51773723427f071c0ae26852a2804c08bbb32")
+ depends_on("cxx", type="build") # generated
+
variant("metis", default=True, description="Enable/disable METIS support")
depends_on("mfem+mpi+metis", when="+metis")
diff --git a/var/spack/repos/builtin/packages/rempi/package.py b/var/spack/repos/builtin/packages/rempi/package.py
index a3651b37a7..fb35e8ddf8 100644
--- a/var/spack/repos/builtin/packages/rempi/package.py
+++ b/var/spack/repos/builtin/packages/rempi/package.py
@@ -18,6 +18,10 @@ class Rempi(AutotoolsPackage):
version("1.1.0", sha256="4fd94fca52311fd19dc04a32547841e6c1c1656b7999b2f76f537d6ec24efccc")
version("1.0.0", sha256="1cb21f457cf8a04632150156a2ba699dd0c3f81d47e8881a9b943b9bf575fa01")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("zlib-api")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/rendercheck/package.py b/var/spack/repos/builtin/packages/rendercheck/package.py
index ab98014564..f19e7b97df 100644
--- a/var/spack/repos/builtin/packages/rendercheck/package.py
+++ b/var/spack/repos/builtin/packages/rendercheck/package.py
@@ -10,14 +10,16 @@ class Rendercheck(AutotoolsPackage, XorgPackage):
"""rendercheck is a program to test a Render extension implementation
against separate calculations of expected output."""
- homepage = "https://cgit.freedesktop.org/xorg/app/rendercheck"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/rendercheck"
xorg_mirror_path = "app/rendercheck-1.5.tar.gz"
version("1.5", sha256="1553fef61c30f2524b597c3758cc8d3f8dc1f52eb8137417fa0667b0adc8a604")
+ depends_on("c", type="build")
+
depends_on("libxrender")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/repeatmasker/package.py b/var/spack/repos/builtin/packages/repeatmasker/package.py
index 385a40198b..b59f04b22e 100644
--- a/var/spack/repos/builtin/packages/repeatmasker/package.py
+++ b/var/spack/repos/builtin/packages/repeatmasker/package.py
@@ -37,10 +37,10 @@ class Repeatmasker(Package):
def url_for_version(self, version):
if version >= Version("4.1.0"):
- url = "http://www.repeatmasker.org/RepeatMasker/RepeatMasker-{0}.tar.gz"
+ url = "https://www.repeatmasker.org/RepeatMasker/RepeatMasker-{0}.tar.gz"
return url.format(version)
else:
- url = "http://www.repeatmasker.org/RepeatMasker/RepeatMasker-open-{0}.tar.gz"
+ url = "https://www.repeatmasker.org/RepeatMasker/RepeatMasker-open-{0}.tar.gz"
return url.format(version.dashed)
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/reprimand/package.py b/var/spack/repos/builtin/packages/reprimand/package.py
index 905e309d2f..521ac78f42 100644
--- a/var/spack/repos/builtin/packages/reprimand/package.py
+++ b/var/spack/repos/builtin/packages/reprimand/package.py
@@ -27,6 +27,8 @@ class Reprimand(MesonPackage):
version("1.4", sha256="260730696175fa21d35d1a92df2c68b69243bb617083c82616efcb4720d557e8")
version("1.3", sha256="8e9f05b1f065a876d1405562285a9f64d1b31c4a436d5a6bb1f023212b40314e")
+ depends_on("cxx", type="build") # generated
+
# Add missing #include statments; see
# <https://github.com/wokast/RePrimAnd/issues/3>
patch("include.patch", when="@1.3")
diff --git a/var/spack/repos/builtin/packages/resolve/package.py b/var/spack/repos/builtin/packages/resolve/package.py
index 82234bf66b..e032a18cf6 100644
--- a/var/spack/repos/builtin/packages/resolve/package.py
+++ b/var/spack/repos/builtin/packages/resolve/package.py
@@ -23,7 +23,15 @@ class Resolve(CMakePackage, CudaPackage, ROCmPackage):
)
version("develop", submodules=False, branch="develop")
+ depends_on("cxx", type="build") # generated
+
variant("klu", default=True, description="Use KLU, AMD and COLAMD Libraries from SuiteSparse")
+ variant(
+ "lusol",
+ default=True,
+ when="@develop:",
+ description="Build the LUSOL Library. Requires fortran",
+ )
depends_on("suite-sparse", when="+klu")
@@ -44,7 +52,11 @@ class Resolve(CMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
args.extend(
- [self.define("RESOLVE_USE_KLU", "klu"), self.define("RESOLVE_TEST_WITH_BSUB", False)]
+ [
+ self.define_from_variant("RESOLVE_USE_KLU", "klu"),
+ self.define_from_variant("RESOLVE_USE_LUSOL", "lusol"),
+ self.define("RESOLVE_TEST_WITH_BSUB", False),
+ ]
)
if "+cuda" in spec:
diff --git a/var/spack/repos/builtin/packages/restic/package.py b/var/spack/repos/builtin/packages/restic/package.py
index 3680fb1583..2c3489e98e 100644
--- a/var/spack/repos/builtin/packages/restic/package.py
+++ b/var/spack/repos/builtin/packages/restic/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Restic(Package):
+class Restic(GoPackage):
"""Fast, secure, efficient backup program."""
homepage = "https://restic.net"
@@ -16,6 +16,10 @@ class Restic(Package):
license("BSD-2-Clause")
+ version("0.17.3", sha256="bf0dd73edfae531c24070e2e7833938613f7b179ed165e6b681098edfdf286c8")
+ version("0.17.1", sha256="cba3a5759690d11dae4b5620c44f56be17a5688e32c9856776db8a9a93d6d59a")
+ version("0.16.4", sha256="d736a57972bb7ee3398cf6b45f30e5455d51266f5305987534b45a4ef505f965")
+ version("0.16.3", sha256="a94d6c1feb0034fcff3e8b4f2d65c0678f906fc21a1cf2d435341f69e7e7af52")
version("0.16.2", sha256="88165b5b89b6064df37a9964d660f40ac62db51d6536e459db9aaea6f2b2fc11")
version("0.16.0", sha256="b91f5ef6203a5c50a72943c21aaef336e1344f19a3afd35406c00f065db8a8b9")
version("0.15.2", sha256="52aca841486eaf4fe6422b059aa05bbf20db94b957de1d3fca019ed2af8192b7")
@@ -24,19 +28,24 @@ class Restic(Package):
version("0.14.0", sha256="78cdd8994908ebe7923188395734bb3cdc9101477e4163c67e7cc3b8fd3b4bd6")
version("0.12.1", sha256="a9c88d5288ce04a6cc78afcda7590d3124966dab3daa9908de9b3e492e2925fb")
- depends_on("go@1.18:", type="build", when="@0.15.0:")
depends_on("go@1.15:", type="build", when="@0.14.0:")
- depends_on("go", type="build")
+ depends_on("go@1.18:", type="build", when="@0.15.0:")
+ depends_on("go@1.19:", type="build", when="@1.16.1:")
+
+ build_directory = "cmd/restic"
- phases = ["build", "install"]
+ @run_after("install")
+ def install_completions(self):
+ restic = Executable(self.prefix.bin.restic)
- def setup_build_environment(self, env):
- # Point GOPATH at the top of the staging dir for the build step.
- env.prepend_path("GOPATH", self.stage.path)
+ mkdirp(bash_completion_path(self.prefix))
+ mkdirp(fish_completion_path(self.prefix))
+ mkdirp(zsh_completion_path(self.prefix))
- def build(self, spec, prefix):
- go("run", "build.go")
+ restic("generate", "--bash-completion", "restic.bash")
+ restic("generate", "--fish-completion", "restic.fish")
+ restic("generate", "--zsh-completion", "_restic")
- def install(self, spec, prefix):
- mkdirp(prefix.bin)
- install("restic", prefix.bin)
+ install("restic.bash", bash_completion_path(self.prefix))
+ install("restic.fish", fish_completion_path(self.prefix))
+ install("_restic", zsh_completion_path(self.prefix))
diff --git a/var/spack/repos/builtin/packages/revbayes/package.py b/var/spack/repos/builtin/packages/revbayes/package.py
index 709c3dadd9..097747e00c 100644
--- a/var/spack/repos/builtin/packages/revbayes/package.py
+++ b/var/spack/repos/builtin/packages/revbayes/package.py
@@ -30,6 +30,9 @@ class Revbayes(CMakePackage):
version("1.0.11", sha256="03052194baa220dde7e622a739f09f34393f67ea00a0b163b409d313d7fc7c02")
version("1.0.10", sha256="6a3cf303e7224b0b32637bd8e2c3c2cf2621f5dbe599cd74ce4b0c215d0fcd2d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel support")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/rgb/package.py b/var/spack/repos/builtin/packages/rgb/package.py
index e30b4cea82..48a63de839 100644
--- a/var/spack/repos/builtin/packages/rgb/package.py
+++ b/var/spack/repos/builtin/packages/rgb/package.py
@@ -15,7 +15,7 @@ class Rgb(AutotoolsPackage, XorgPackage):
The "others" subdirectory contains some alternate color databases."""
- homepage = "https://cgit.freedesktop.org/xorg/app/rgb"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/rgb"
xorg_mirror_path = "app/rgb-1.0.6.tar.gz"
license("MIT")
@@ -23,6 +23,8 @@ class Rgb(AutotoolsPackage, XorgPackage):
version("1.1.0", sha256="77142e3d6f06cfbfbe440e29596765259988a22db40b1e706e14b8ba4c962aa5")
version("1.0.6", sha256="cb998035e08b9f58ad3150cab60461c3225bdd075238cffc665e24da40718933")
+ depends_on("c", type="build")
+
depends_on("xorg-server")
- depends_on("xproto")
+ depends_on("xproto", type="build")
diff --git a/var/spack/repos/builtin/packages/rhash/package.py b/var/spack/repos/builtin/packages/rhash/package.py
index 6a53f98ab4..c0f31f1586 100644
--- a/var/spack/repos/builtin/packages/rhash/package.py
+++ b/var/spack/repos/builtin/packages/rhash/package.py
@@ -22,6 +22,8 @@ class Rhash(MakefilePackage):
version("1.4.2", sha256="600d00f5f91ef04194d50903d3c79412099328c42f28ff43a0bdb777b00bec62")
version("1.3.5", sha256="98e0688acae29e68c298ffbcdbb0f838864105f9b2bd8857980664435b1f1f2e")
+ depends_on("c", type="build") # generated
+
# configure: fix clang detection on macOS
# Patch accepted and merged upstream, remove on next release
patch(
diff --git a/var/spack/repos/builtin/packages/rinetd/package.py b/var/spack/repos/builtin/packages/rinetd/package.py
index bad9485262..92a8ec1b1f 100644
--- a/var/spack/repos/builtin/packages/rinetd/package.py
+++ b/var/spack/repos/builtin/packages/rinetd/package.py
@@ -19,6 +19,8 @@ class Rinetd(AutotoolsPackage):
version("0.70", sha256="e69538e9d1fdc1ba5cc24733a52c571568e9cad0876c09144aa1eaa71e13fba5")
version("0.63", sha256="1f0e8cda524b8f4811a876e69e16d11f12c33a63d00b55c66e2129f87444000c")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/ripgrep/package.py b/var/spack/repos/builtin/packages/ripgrep/package.py
index 11b346d605..ee30a1420d 100644
--- a/var/spack/repos/builtin/packages/ripgrep/package.py
+++ b/var/spack/repos/builtin/packages/ripgrep/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Ripgrep(Package):
+class Ripgrep(CargoPackage):
"""ripgrep is a line-oriented search tool that recursively searches
your current directory for a regex pattern. ripgrep is similar to
other popular search tools like The Silver Searcher, ack and grep.
@@ -15,13 +15,30 @@ class Ripgrep(Package):
homepage = "https://github.com/BurntSushi/ripgrep"
url = "https://github.com/BurntSushi/ripgrep/archive/11.0.2.tar.gz"
+ maintainers("alecbcs")
+
license("MIT OR Unlicense")
+ version("14.1.1", sha256="4dad02a2f9c8c3c8d89434e47337aa654cb0e2aa50e806589132f186bf5c2b66")
+ version("14.1.0", sha256="33c6169596a6bbfdc81415910008f26e0809422fda2d849562637996553b2ab6")
+ version("14.0.3", sha256="f5794364ddfda1e0411ab6cad6dd63abe3a6b421d658d9fee017540ea4c31a0e")
version("13.0.0", sha256="0fb17aaf285b3eee8ddab17b833af1e190d73de317ff9648751ab0660d763ed2")
version("11.0.2", sha256="0983861279936ada8bc7a6d5d663d590ad34eb44a44c75c2d6ccd0ab33490055")
- depends_on("rust")
+ depends_on("rust@1.72:", type="build", when="@14:")
+
+ @run_after("install")
+ def install_completions(self):
+ rg = Executable(self.prefix.bin.rg)
+
+ mkdirp(bash_completion_path(self.prefix))
+ with open(bash_completion_path(self.prefix) / "rg", "w") as file:
+ rg("--generate", "complete-bash", output=file)
+
+ mkdirp(fish_completion_path(self.prefix))
+ with open(fish_completion_path(self.prefix) / "rg.fish", "w") as file:
+ rg("--generate", "complete-fish", output=file)
- def install(self, spec, prefix):
- cargo = which("cargo")
- cargo("install", "--root", prefix, "--path", ".")
+ mkdirp(zsh_completion_path(self.prefix))
+ with open(zsh_completion_path(self.prefix) / "_rg", "w") as file:
+ rg("--generate", "complete-zsh", output=file)
diff --git a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
index c12d5209ae..cc0e26048d 100644
--- a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
+++ b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py
@@ -19,6 +19,54 @@ class RiscvGnuToolchain(AutotoolsPackage):
version("develop", branch="master", submodules=True)
version(
+ "2024.02.02",
+ tag="2024.02.02",
+ commit="59ab58e8a4aed4ed8f711ebab307757a5ebaa1f5",
+ submodules=True,
+ )
+ version(
+ "2023.12.20",
+ tag="2023.12.20",
+ commit="8c969a9efe68a811cf524174d25255632029f3d3",
+ submodules=True,
+ )
+ version(
+ "2023.12.14",
+ tag="2023.12.14",
+ commit="99e2d2bac5144f5152ba6d3fbf04bdd9b9ba4381",
+ submodules=True,
+ )
+ version(
+ "2023.12.12",
+ tag="2023.12.12",
+ commit="ae9efcc33c4968f97ab89b4b13c7f6520b145f94",
+ submodules=True,
+ )
+ version(
+ "2023.11.22",
+ tag="2023.11.22",
+ commit="8e9fb09a0c4b1e566492ee6f42e8c1fa5ef7e0c2",
+ submodules=True,
+ )
+ version(
+ "2023.11.20",
+ tag="2023.11.20",
+ commit="82c3d6550a26f03c3b4acb6cbefe5c5e98855ddb",
+ submodules=True,
+ )
+ version(
+ "2023.11.17",
+ tag="2023.11.17",
+ commit="9b2ad263050085543a1ad57c13039e49a79a7def",
+ submodules=True,
+ )
+ version(
+ "2023.11.08",
+ tag="2023.11.08",
+ commit="b86b2b37d0acc607156ff56ff17ee105a9b48897",
+ submodules=True,
+ )
+ version(
"2023.10.18",
tag="2023.10.18",
commit="b86b2b37d0acc607156ff56ff17ee105a9b48897",
@@ -67,6 +115,10 @@ class RiscvGnuToolchain(AutotoolsPackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Dependencies:
depends_on("pkgconfig", type="build")
depends_on("autoconf", when="@main:", type="build")
@@ -85,14 +137,33 @@ class RiscvGnuToolchain(AutotoolsPackage):
depends_on("gmake@4.3:", type="build")
conflicts("platform=windows", msg="Windows is not supported.")
+ conflicts("arch=aarch64", msg="aarch64 is not supported.")
variant(
"compiler_type",
default="newlib",
- values=("newlib", "linux"),
+ values=("newlib", "linux", "musl"),
description="Compiler back-end to build",
)
+ variant("multilib", default=False, description="Enable multilib support")
+ variant(
+ "cmodel",
+ default="medlow",
+ values=("medlow", "medany"),
+ description="The name of the cmodel",
+ )
+
+ def configure_args(self):
+ args = super(RiscvGnuToolchain, self).configure_args()
+ if "+multilib" in self.spec:
+ args.append("--enable-multilib")
+
+ cmodel_value = self.spec.variants["cmodel"].value
+ if cmodel_value:
+ args.append("--with-cmodel={}".format(cmodel_value))
+ return args
+
def build(self, spec, prefix):
"""Makes the build targets specified by
:py:attr:``~.AutotoolsPackage.build_targets``
@@ -109,5 +180,7 @@ class RiscvGnuToolchain(AutotoolsPackage):
params = []
if self.spec.satisfies("compiler_type=linux"):
params.append("linux")
+ elif self.spec.satisfies("compiler_type=musl"):
+ params.append("musl")
make(*params)
diff --git a/var/spack/repos/builtin/packages/rivet/package.py b/var/spack/repos/builtin/packages/rivet/package.py
index d055f7d8a4..573888d0c4 100644
--- a/var/spack/repos/builtin/packages/rivet/package.py
+++ b/var/spack/repos/builtin/packages/rivet/package.py
@@ -19,6 +19,11 @@ class Rivet(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("4.0.2", sha256="65a3b36f42bff782ed2767930e669e09b140899605d7972fc8f77785b4a882c0")
+ version("4.0.1", sha256="4e8692d6e8a53961c77983eb6ba4893c3765cf23f705789e4d865be4892eff79")
+ version("4.0.0", sha256="d3c42d9b83ede3e7f4b534535345c2e06e6dafb851454c2b0a5d2331ab0f04d0")
+ version("3.1.10", sha256="458b8e0df1de738e9972d24b260eaa087df12c99d4fe9dee5377d47ea6a49919")
+ version("3.1.9", sha256="f6532045da61eeb2adc20a9abc4166b4b2d41ab2c1ca5b500cd616bb1b92e7b1")
version("3.1.8", sha256="75b3f3d419ca6388d1fd2ec0eda7e1f90f324b996ccf0591f48a5d2e28dccc13")
version("3.1.7", sha256="27c7dbbcb5fd7ee81caf136daf4e960bca0ec255d9fa1abe602f4d430861b27a")
version("3.1.6", sha256="1cf6ebb6a79d181c441d1d0c7c6d623c423817c61093f36f21adaae23e679090")
@@ -31,7 +36,15 @@ class Rivet(AutotoolsPackage):
version("3.0.1", sha256="e7551168b86a05c9c029c319c313a0aa142a476195e7ff986c896c1b868f89dd")
version("3.0.0", sha256="3944434d3791dccb54f7b2257589df6252cc7c065ce9deb57fbef466ff9e62b1")
- variant("hepmc", default="2", values=("2", "3"), description="HepMC version to link against")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "hepmc",
+ default="2",
+ values=(conditional("2", when="@:3"), "3"),
+ description="HepMC version to link against",
+ )
# According to A. Buckley (main Rivet developer):
# "typically a given Rivet version will work with
@@ -45,8 +58,13 @@ class Rivet(AutotoolsPackage):
depends_on("yoda@1.8.2", when="@3.1.1")
depends_on("yoda@1.8.3", when="@3.1.2")
depends_on("yoda@1.8.5:", when="@3.1.3:")
- depends_on("yoda@1.9.5:", when="@3.1.6:")
+ depends_on("yoda@1.9.6:", when="@3.1.6:")
depends_on("yoda@1.9.7:", when="@3.1.7:")
+ depends_on("yoda@1.9.8:", when="@3.1.8:")
+ depends_on("yoda@1.9.9:", when="@3.1.9:")
+ depends_on("yoda@1.9.10:", when="@3.1.10:")
+ depends_on("yoda@:1", when="@:3")
+ depends_on("yoda@2.0.1:", when="@4.0.0:")
# The following versions were not a part of LCG stack
# and thus the exact version of YODA is unknown
@@ -54,9 +72,13 @@ class Rivet(AutotoolsPackage):
depends_on("hepmc", when="hepmc=2")
depends_on("hepmc3", when="hepmc=3")
- depends_on("fastjet")
+ conflicts(
+ "hepmc@3.3.0", when="@:4.0.0 hepmc=3", msg="patch-level zero requires at least 4.0.1"
+ )
+ depends_on("fastjet plugins=cxx")
depends_on("fastjet@3.4.0:", when="@3.1.7:")
depends_on("fjcontrib")
+ depends_on("highfive", when="@4:")
depends_on("python", type=("build", "run"))
depends_on("py-cython@0.24.0:", type="build")
depends_on("swig", type="build")
@@ -101,12 +123,16 @@ class Rivet(AutotoolsPackage):
args += ["--with-hepmc=" + self.spec["hepmc"].prefix]
else:
args += ["--with-hepmc3=" + self.spec["hepmc3"].prefix]
+ args += ["--with-hepmc3-libpath=" + self.spec["hepmc3"].libs.directories[0]]
args += ["--with-fastjet=" + self.spec["fastjet"].prefix]
args += ["--with-yoda=" + self.spec["yoda"].prefix]
args += ["--with-fjcontrib=" + self.spec["fjcontrib"].prefix]
+ if self.spec.satisfies("^highfive"):
+ args += ["--with-highfive=" + self.spec["highfive"].prefix]
+
args += ["--disable-pdfmanual"]
return args
diff --git a/var/spack/repos/builtin/packages/rkcommon/package.py b/var/spack/repos/builtin/packages/rkcommon/package.py
index ffcd012d32..cbc80a0375 100644
--- a/var/spack/repos/builtin/packages/rkcommon/package.py
+++ b/var/spack/repos/builtin/packages/rkcommon/package.py
@@ -10,14 +10,15 @@ class Rkcommon(CMakePackage):
"""This project represents a common set of C++ infrastructure and CMake utilities
used by various components of Intel® oneAPI Rendering Toolkit."""
- homepage = "https://github.com/ospray/rkcommon"
- url = "https://github.com/ospray/rkcommon/archive/v1.4.1.tar.gz"
- git = "https://github.com/ospray/rkcommon.git"
-
- # maintainers("github_user1",o"github_user2")
+ homepage = "https://github.com/RenderKit/rkcommon"
+ url = "https://github.com/RenderKit/rkcommon/archive/v1.4.1.tar.gz"
+ git = "https://github.com/RenderKit/rkcommon.git"
license("Apache-2.0")
+ version("1.14.2", sha256="79334ef3dadddb03ec0483fbf49bf690fb8902d5c2732d977b2c116651484cc6")
+ version("1.14.0", sha256="5aef75afc8d4fccf9e70df4cbdf29a1b28b39ee51b5588b94b83a14c6a166d83")
+ version("1.13.0", sha256="8ae9f911420085ceeca36e1f16d1316a77befbf6bf6de2a186d65440ac66ff1f")
version("1.12.0", sha256="6abb901073811cdbcbe336772e1fcb458d78cab5ad8d5d61de2b57ab83581e80")
version("1.11.0", sha256="9cfeedaccdefbdcf23c465cb1e6c02057100c4a1a573672dc6cfea5348cedfdd")
version("1.10.0", sha256="57a33ce499a7fc5a5aaffa39ec7597115cf69ed4ff773546b5b71ff475ee4730")
@@ -31,6 +32,8 @@ class Rkcommon(CMakePackage):
version("1.4.2", sha256="2d1c0046cf583d3040fc9bb3b8ddcb1a2262d3f48aebd0973e6bd6cabb487f9e")
version("1.4.1", sha256="f5968f5865fa5fe938843e1db621795524e7d31b37ce6024ba2978bb293ddfcf")
+ depends_on("cxx", type="build") # generated
+
depends_on("tbb")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/rkt-base/package.py b/var/spack/repos/builtin/packages/rkt-base/package.py
index ea277d9120..1a24aaf7f7 100644
--- a/var/spack/repos/builtin/packages/rkt-base/package.py
+++ b/var/spack/repos/builtin/packages/rkt-base/package.py
@@ -15,6 +15,9 @@ class RktBase(RacketPackage):
maintainers("elfprince13")
version("8.3", commit="cab83438422bfea0e4bd74bc3e8305e6517cf25f") # tag='v8.3'
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("racket@8.3", type=("build", "run"), when="@8.3")
racket_name = "base"
diff --git a/var/spack/repos/builtin/packages/rkt-compiler-lib/package.py b/var/spack/repos/builtin/packages/rkt-compiler-lib/package.py
index f91a118a53..dfbe793faf 100644
--- a/var/spack/repos/builtin/packages/rkt-compiler-lib/package.py
+++ b/var/spack/repos/builtin/packages/rkt-compiler-lib/package.py
@@ -15,6 +15,9 @@ class RktCompilerLib(RacketPackage):
maintainers("elfprince13")
version("8.3", commit="cab83438422bfea0e4bd74bc3e8305e6517cf25f") # tag='v8.3'
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("rkt-base@8.3", type=("build", "run"), when="@8.3")
depends_on("rkt-scheme-lib@8.3", type=("build", "run"), when="@8.3")
depends_on("rkt-rackunit-lib@8.3", type=("build", "run"), when="@8.3")
diff --git a/var/spack/repos/builtin/packages/rkt-racket-lib/package.py b/var/spack/repos/builtin/packages/rkt-racket-lib/package.py
index 1dfed11df2..ef5647719a 100644
--- a/var/spack/repos/builtin/packages/rkt-racket-lib/package.py
+++ b/var/spack/repos/builtin/packages/rkt-racket-lib/package.py
@@ -12,9 +12,12 @@ class RktRacketLib(RacketPackage):
git = "ssh://git@github.com/racket/racket.git"
- maintainers = ["elfprince13"]
+ maintainers("elfprince13")
version("8.3", commit="cab83438422bfea0e4bd74bc3e8305e6517cf25f") # tag="v8.3"
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("racket@8.3", type=("build", "run"), when="@8.3")
racket_name = "racket-lib"
diff --git a/var/spack/repos/builtin/packages/rkt-zo-lib/package.py b/var/spack/repos/builtin/packages/rkt-zo-lib/package.py
index 579be294ca..92cbffcf7b 100644
--- a/var/spack/repos/builtin/packages/rkt-zo-lib/package.py
+++ b/var/spack/repos/builtin/packages/rkt-zo-lib/package.py
@@ -14,6 +14,9 @@ class RktZoLib(RacketPackage):
maintainers("elfprince13")
version("1.3", commit="cab83438422bfea0e4bd74bc3e8305e6517cf25f") # tag='v1.3'
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("rkt-base@8.3:", type=("build", "run"), when="@1.3")
racket_name = "zo-lib"
diff --git a/var/spack/repos/builtin/packages/rlwrap/package.py b/var/spack/repos/builtin/packages/rlwrap/package.py
index 9a3d8f2959..e2f52d0728 100644
--- a/var/spack/repos/builtin/packages/rlwrap/package.py
+++ b/var/spack/repos/builtin/packages/rlwrap/package.py
@@ -21,6 +21,8 @@ class Rlwrap(AutotoolsPackage):
version("0.44", sha256="cd7ff50cde66e443cbea0049b4abf1cca64a74948371fa4f1b5d9a5bbce1e13c")
version("0.43", sha256="8e86d0b7882d9b8a73d229897a90edc207b1ae7fa0899dca8ee01c31a93feb2f")
+ depends_on("c", type="build") # generated
+
depends_on("readline@4.2:")
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/rmgdft/package.py b/var/spack/repos/builtin/packages/rmgdft/package.py
index 55acee0203..2337252052 100644
--- a/var/spack/repos/builtin/packages/rmgdft/package.py
+++ b/var/spack/repos/builtin/packages/rmgdft/package.py
@@ -16,6 +16,7 @@ class Rmgdft(CMakePackage, CudaPackage):
maintainers("elbriggs")
tags = ["ecp", "ecp-apps"]
version("master", branch="master")
+ version("6.1.0", tag="v6.1.0", commit="4dd5862725006b35d3118705197f89f13b24b858")
version("5.4.0", tag="v5.4.0", commit="471251b191abb5f6ffdca4333c1fcb2add3c52f2")
version("5.3.1", tag="v5.3.1", commit="dd6217ed82a8fe335acd0c030023b539d1be920a")
version("5.2.0", tag="v5.2.0", commit="e95a84a258f84a3c33f36eb34ebb9daba691b649")
@@ -23,6 +24,10 @@ class Rmgdft(CMakePackage, CudaPackage):
version("5.0.4", tag="v5.0.4", commit="30faadeff7dc896169d011910831263fb19eb965")
version("5.0.1", tag="v5.0.1", commit="60b3ad64b09a4fccdd2b84052350e7947e3e8ad0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="Release",
@@ -50,7 +55,6 @@ class Rmgdft(CMakePackage, CudaPackage):
compiler_warning14 = "RMGDFT 4.0.0 or later requires a compiler with support for C++14"
conflicts("%gcc@:4", when="@3.6.0:", msg=compiler_warning14)
conflicts("%intel@:17", when="@3.6.0:", msg=compiler_warning14)
- conflicts("%pgi@:17", when="@3.6.0:", msg=compiler_warning14)
conflicts("%llvm@:3.4", when="@3.6.0:", msg=compiler_warning14)
# RMGDFT 5.0.0 requires C++17 and increase the minimum gcc to 8
diff --git a/var/spack/repos/builtin/packages/rmlab/package.py b/var/spack/repos/builtin/packages/rmlab/package.py
index d9aa91441c..63f361d0a8 100644
--- a/var/spack/repos/builtin/packages/rmlab/package.py
+++ b/var/spack/repos/builtin/packages/rmlab/package.py
@@ -18,6 +18,8 @@ class Rmlab(CMakePackage):
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
variant("png", default=True, description="Enable PNG conversion support")
# modern CMake
@@ -25,7 +27,6 @@ class Rmlab(CMakePackage):
# C++11
conflicts("%gcc@:4.7")
conflicts("%intel@:15")
- conflicts("%pgi@:14")
depends_on("pngwriter@0.6.0:", when="+png")
diff --git a/var/spack/repos/builtin/packages/rnaz/package.py b/var/spack/repos/builtin/packages/rnaz/package.py
index 7031c2dc9b..d25e257233 100644
--- a/var/spack/repos/builtin/packages/rnaz/package.py
+++ b/var/spack/repos/builtin/packages/rnaz/package.py
@@ -16,6 +16,9 @@ class Rnaz(AutotoolsPackage):
version("2.1.1", commit="f2c19f7237f2eb3df04f4747c8c11616447ec095")
version("2.1", sha256="b32ec0361889319f2058f224d6c456c853dbc30dff4dba90c53a8f9fd7b83be5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
with when("@2.1.1:"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/rng-tools/package.py b/var/spack/repos/builtin/packages/rng-tools/package.py
index 40341e0b15..23283c21dc 100644
--- a/var/spack/repos/builtin/packages/rng-tools/package.py
+++ b/var/spack/repos/builtin/packages/rng-tools/package.py
@@ -21,6 +21,8 @@ class RngTools(AutotoolsPackage):
version("6.9", sha256="a57a7f51a2e3c0faa8afb979709a4c0cbea36d0b52fd835b104f8fb4fd1fa610")
version("6.8", sha256="93e548d4aaf2a1897d4b677f41d8473db1c7f57648adeca18cafa1907e410bb3")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/rngstreams/package.py b/var/spack/repos/builtin/packages/rngstreams/package.py
index f5a86039eb..f95f4a55e7 100644
--- a/var/spack/repos/builtin/packages/rngstreams/package.py
+++ b/var/spack/repos/builtin/packages/rngstreams/package.py
@@ -15,3 +15,5 @@ class Rngstreams(AutotoolsPackage):
license("GPL-3.0-only")
version("1.0.1", sha256="966195febb9fb9417e4e361948843425aee12efc8b4e85332acbcd011ff2d9b0")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/rnpletal/package.py b/var/spack/repos/builtin/packages/rnpletal/package.py
index b055e94968..f7f862af07 100644
--- a/var/spack/repos/builtin/packages/rnpletal/package.py
+++ b/var/spack/repos/builtin/packages/rnpletal/package.py
@@ -24,6 +24,9 @@ class Rnpletal(AutotoolsPackage):
# which carry no version number.
version("develop", sha256="2886f96393b64703fccf61b3dbc34e0fa45a79297232be76352f29cb83863d4d")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
maintainers("eschnett")
variant(
diff --git a/var/spack/repos/builtin/packages/rocal/package.py b/var/spack/repos/builtin/packages/rocal/package.py
new file mode 100644
index 0000000000..5ceeef3cc9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocal/package.py
@@ -0,0 +1,108 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Rocal(CMakePackage):
+ """The AMD rocAL is designed to efficiently decode and process images and videos from a variety
+ of storage formats and modify them through a processing graph programmable by the user."""
+
+ homepage = "https://github.com/ROCm/rocAL"
+ url = "https://github.com/ROCm/rocAL/archive/refs/tags/rocm-6.2.0.tar.gz"
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ license("MIT")
+
+ version("6.2.4", sha256="630813669e75a8ee179b89f489101931a26f7a7ee486fcbe1b0e3cb1803c582c")
+ version("6.2.1", sha256="77d3e63e02afaee6f1ee1d877d88b48c6ea66a0afca96a1313d0f1c4f8e86b2a")
+ version("6.2.0", sha256="c7c265375a40d4478a628258378726c252caac424f974456d488fce43890e157")
+
+ depends_on("libjpeg-turbo@2.0.6+partial_decoder", when="@6.2.0")
+ depends_on("libjpeg-turbo@3.0.2:", when="@6.2.1:")
+ depends_on("rapidjson")
+ depends_on("ffmpeg@4.4:")
+
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"mivisionx@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+ depends_on(f"rpp@{ver}", when=f"@{ver}")
+
+ def patch(self):
+ filter_file(
+ r"${ROCM_PATH}/llvm/bin/clang++",
+ "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
+ "rocAL/rocAL_hip/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/include/rocal",
+ "{0}/include/rocal".format(self.spec.prefix),
+ "tests/cpp_api/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/rocal",
+ "{0}/include/rocal".format(self.spec.prefix),
+ "tests/cpp_api/audio_tests/CMakeLists.txt",
+ "tests/cpp_api/image_augmentation/CMakeLists.txt",
+ "tests/cpp_api/basic_test/CMakeLists.txt",
+ "tests/cpp_api/performance_tests/CMakeLists.txt",
+ "tests/cpp_api/dataloader/CMakeLists.txt",
+ "tests/cpp_api/performance_tests_with_depth/CMakeLists.txt",
+ "tests/cpp_api/dataloader_multithread/CMakeLists.txt",
+ "tests/cpp_api/unit_tests/CMakeLists.txt",
+ "tests/cpp_api/dataloader_tf/CMakeLists.txt",
+ "tests/cpp_api/video_tests/CMakeLists.txt",
+ "tests/cpp_api/external_source/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/lib",
+ "{0}/lib".format(self.spec.prefix),
+ "tests/cpp_api/audio_tests/CMakeLists.txt",
+ "tests/cpp_api/image_augmentation/CMakeLists.txt",
+ "tests/cpp_api/basic_test/CMakeLists.txt",
+ "tests/cpp_api/performance_tests/CMakeLists.txt",
+ "tests/cpp_api/dataloader/CMakeLists.txt",
+ "tests/cpp_api/performance_tests_with_depth/CMakeLists.txt",
+ "tests/cpp_api/dataloader_multithread/CMakeLists.txt",
+ "tests/cpp_api/unit_tests/CMakeLists.txt",
+ "tests/cpp_api/dataloader_tf/CMakeLists.txt",
+ "tests/cpp_api/video_tests/CMakeLists.txt",
+ "tests/cpp_api/external_source/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/lib",
+ "{0}/lib".format(self.spec.prefix),
+ "tests/cpp_api/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/share/rocal",
+ "{0}/share/rocal".format(self.spec.prefix),
+ "tests/cpp_api/CMakeLists.txt",
+ string=True,
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define("AMDRPP_PATH", self.spec["rpp"].prefix),
+ self.define("TURBO_JPEG_PATH", self.spec["libjpeg-turbo"].prefix),
+ self.define("MIVisionX_PATH", self.spec["mivisionx"].prefix),
+ self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix),
+ ]
+ return args
+
+ def check(self):
+ print("test will run after install")
+
+ @run_after("install")
+ @on_package_attributes(run_tests=True)
+ def check_install(self):
+ with working_dir(self.build_directory, create=True):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/rocalution/0003-fix-compilation-for-rocalution-5.2.0.patch b/var/spack/repos/builtin/packages/rocalution/0003-fix-compilation-for-rocalution-5.2.0.patch
deleted file mode 100644
index 7090e92e1c..0000000000
--- a/var/spack/repos/builtin/packages/rocalution/0003-fix-compilation-for-rocalution-5.2.0.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 58046aee2ab5d53092811e77ae9b17a226aadf90 Mon Sep 17 00:00:00 2001
-From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
-Date: Mon, 8 Aug 2022 22:52:43 +0000
-Subject: [PATCH] Fix for compilation failure in rocalution 5.2.0
-
----
- src/solvers/multigrid/ruge_stueben_amg.hpp | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/solvers/multigrid/ruge_stueben_amg.hpp b/src/solvers/multigrid/ruge_stueben_amg.hpp
-index 24ee942..7f25796 100644
---- a/src/solvers/multigrid/ruge_stueben_amg.hpp
-+++ b/src/solvers/multigrid/ruge_stueben_amg.hpp
-@@ -58,14 +58,16 @@ namespace rocalution
- ROCALUTION_EXPORT
- virtual void Print(void) const;
-
-+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32)
- /** \brief Set coupling strength */
- ROCALUTION_EXPORT
--#if defined(WIN32) || defined(_WIN32) || defined(__WIN32)
-+ void SetCouplingStrength(ValueType eps);
- #else
- [[deprecated("This function will be removed in a future release. Use "
- "SetStrengthThreshold() instead")]]
--#endif
-+ ROCALUTION_EXPORT
- void SetCouplingStrength(ValueType eps);
-+#endif
-
- /** \brief Set strength threshold */
- ROCALUTION_EXPORT
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py
index 103fcd7373..0f7a517aec 100644
--- a/var/spack/repos/builtin/packages/rocalution/package.py
+++ b/var/spack/repos/builtin/packages/rocalution/package.py
@@ -17,101 +17,36 @@ class Rocalution(CMakePackage):
generic and flexible design that allows seamless integration with
other scientific software packages."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocALUTION"
- git = "https://github.com/ROCmSoftwarePlatform/rocALUTION.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocALUTION/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocALUTION"
+ git = "https://github.com/ROCm/rocALUTION.git"
+ url = "https://github.com/ROCm/rocALUTION/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
libraries = ["librocalution_hip"]
license("MIT")
-
+ version("6.2.4", sha256="993c55e732d0ee390746890639486649f36ae806110cf7490b9bb5d49b0663c0")
+ version("6.2.1", sha256="94f15add5316c81529ce84ae8bf2701e9a4df57d08eda04a2f70147d31b12632")
+ version("6.2.0", sha256="fd9ad0aae5524d3995343d4d7c1948e7b21f0bdf5b1203d1de58548a814a9c39")
+ version("6.1.2", sha256="5f9fb302ab1951a1caf54ed31b41d6f41a353dd4b5ee32bc3de2e9f9244dd4ef")
+ version("6.1.1", sha256="1f80b33813291c2e81e5b1efc325d3f5bb6592c8670c016930d01e73e74ab46b")
+ version("6.1.0", sha256="699a9b73844fcd4e30d0607b4042dc779f9bcdc27ad732e7a038968ff555af2b")
+ version("6.0.2", sha256="453f889677728b510286d4c72952b343cac63c45e2cb8b801d8388a2ec599d2a")
+ version("6.0.0", sha256="cabf37691b8db00c82bda49c7dcfaefd9b9067b7d097afa43b7a5f86c45bff99")
version("5.7.1", sha256="b95afa1285759843c5fea1ad6e1c1edf283922e0d448db03a3e1f42b6942bc24")
version("5.7.0", sha256="48232a0d1250debce89e39a233bd0b5d52324a2454c078b99c9d44965cbbc0e9")
version("5.6.1", sha256="7197b3617a0c91e90adaa32003c04d247a5f585d216e77493d20984ba215addb")
version("5.6.0", sha256="7397a2039e9615c0cf6776c33c4083c00b185b5d5c4149c89fea25a8976a3097")
version("5.5.1", sha256="4612e30a0290b1732c8862eea655122abc2d22ce4345b8498fe4127697e880b4")
version("5.5.0", sha256="626e966b67b83a1ef79f9bf27aba998c49cf65c4208092516aa1e32a6cbd8c36")
- version("5.4.3", sha256="39d00951a9b3cbdc4205a7e3ce75c026d9428c71c784815288c445f84a7f8a0e")
- version("5.4.0", sha256="dccf004434e0fee6d0c7bedd46827f5a2af0392bc4807a08403b130e461f55eb")
- version("5.3.3", sha256="3af022250bc25bebdee12bfb8fdbab4b60513b537b9fe15dfa82ded8850c5066")
- version("5.3.0", sha256="f623449789a5c9c9137ae51d4dbbee5c6940d8813826629cb4b7e84f07fab494")
- version("5.2.3", sha256="8e0d77099bf7dc0d00505e1c936b072a59719102c75398dc1416cbef31902253")
- version("5.2.1", sha256="f246bd5b5d1b5821c29b566610a1c1d5c5cc361e0e5c373b8b04168b05e9b26f")
- version("5.2.0", sha256="a5aac471bbec87d019ad7c6db779c73327ad40ecdea09dc5ab2106e62cd6b7eb")
- version("5.1.3", sha256="7febe8179f120cbe58ea255bc233ad5d1b4c106f3934eb8e670135a8b7bd09c7")
- version("5.1.0", sha256="d9122189103ebafe7ec5aeb50e60f3e02af5c2747021f9071aab91e7f875c29e")
- version(
- "5.0.2",
- sha256="b01adaf858b9c3683523b087a55fafb655864f5db8e2a1acdbf588f53d6972e2",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="df9e7eacb8cc1bd5c7c4071b20356a885ee8ae13e6ab5afdabf88a272ab32c7e",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="8be38922320cd9d4fc465a30f0322843849f62c0c7dad2bdbe52290a1b69d2a0",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="191629fef002fd1a0793a6b4fe5a6b8c43ac49d3cd173ba64a91359f54659e5b",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="d3a7b9290f99bdc7382d1d5259c3f5e0e66a43aef4d05b7c2cd78b0e4a5c59bc",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="f064b96f9f04cf22b89f95f72147fcfef28e2c56ecd764008c060f869c74c144",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="0424adf522ded41de5b77666e04464a25c73c92e34025762f30837f90a797445",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="3f61be18a02dff0c152a0ad7eb4779c43dd744b0ba172aa6a4267fc596d582e4",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="80a224a5c19dea290e6edc0e170c3dff2e726c2b3105d599ec6858cc66f076a9",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="c24cb9d1a8a1a3118040b8b16dec7c06268bcf157424d3378256cc9eb93f1b58",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="1ce36801fe1d44f743b46b43345c0cd90d76b73911b2ec97be763f93a35396fb",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="39e64a29e75c4276163a93596436064c6338770ca72ce7f43711ed8285ed2de5",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="4d6b20aaaac3bafb7ec084d684417bf578349203b0f9f54168f669e3ec5699f8",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="be2f78c10c100d7fd9df5dd2403a44700219c2cbabaacf2ea50a6e2241df7bfe",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="39d00951a9b3cbdc4205a7e3ce75c026d9428c71c784815288c445f84a7f8a0e")
+ version("5.4.0", sha256="dccf004434e0fee6d0c7bedd46827f5a2af0392bc4807a08403b130e461f55eb")
+ version("5.3.3", sha256="3af022250bc25bebdee12bfb8fdbab4b60513b537b9fe15dfa82ded8850c5066")
+ version("5.3.0", sha256="f623449789a5c9c9137ae51d4dbbee5c6940d8813826629cb4b7e84f07fab494")
+
+ depends_on("cxx", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -121,40 +56,15 @@ class Rocalution(CMakePackage):
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
depends_on("cmake@3.5:", type="build")
- for ver in ["3.5.0", "3.7.0", "3.8.0"]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocprim@" + ver, when="@" + ver)
- for tgt in itertools.chain(["auto"], amdgpu_targets):
- rocblas_tgt = tgt if tgt != "gfx900:xnack-" else "gfx900"
- depends_on(
- "rocblas@{0} amdgpu_target={1}".format(ver, rocblas_tgt),
- when="@{0} amdgpu_target={1}".format(ver, tgt),
- )
- depends_on(
- "rocsparse@{0} amdgpu_target={1}".format(ver, tgt),
- when="@{0} amdgpu_target={1}".format(ver, tgt),
- )
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
for ver in [
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -165,55 +75,57 @@ class Rocalution(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocprim@" + ver, when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocprim@{ver}", when=f"@{ver}")
for tgt in itertools.chain(["auto"], amdgpu_targets):
rocblas_tgt = tgt if tgt != "gfx900:xnack-" else "gfx900"
depends_on(
- "rocblas@{0} amdgpu_target={1}".format(ver, rocblas_tgt),
- when="@{0} amdgpu_target={1}".format(ver, tgt),
- )
- depends_on(
- "rocsparse@{0} amdgpu_target={1}".format(ver, tgt),
- when="@{0} amdgpu_target={1}".format(ver, tgt),
+ f"rocblas@{ver} amdgpu_target={rocblas_tgt}", when=f"@{ver} amdgpu_target={tgt}"
)
- depends_on(
- "rocrand@{0} amdgpu_target={1}".format(ver, tgt),
- when="@{0} amdgpu_target={1}".format(ver, tgt),
- )
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"rocsparse@{ver} amdgpu_target={tgt}", when=f"@{ver} amdgpu_target={tgt}")
+ depends_on(f"rocrand@{ver} amdgpu_target={tgt}", when=f"@{ver} amdgpu_target={tgt}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
depends_on("googletest@1.10.0:", type="test")
- # This fix is added to address the compilation failure and it is
- # already taken in 5.2.3 rocm release.
- patch("0003-fix-compilation-for-rocalution-5.2.0.patch", when="@5.2")
# Fix build for most Radeon 5000 and Radeon 6000 series GPUs.
patch("0004-fix-navi-1x.patch", when="@5.2.0:5.3")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
def patch(self):
- if "@3.9.0:" in self.spec:
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
-
- with working_dir("src/base/hip"):
- match = "^#include <rocrand/rocrand.hpp>"
- substitute = "#include <rocrand.hpp>"
- files = ["hip_rand_normal.hpp", "hip_rand_uniform.hpp"]
- filter_file(match, substitute, *files, **kwargs)
+ with working_dir("src/base/hip"):
+ filter_file(
+ "^#include <rocrand/rocrand.hpp>",
+ "#include <rocrand.hpp>",
+ "hip_rand_normal.hpp",
+ "hip_rand_uniform.hpp",
+ )
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
args = [
@@ -222,9 +134,7 @@ class Rocalution(CMakePackage):
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
]
- if self.spec.satisfies("@3.7.0:5.1.3"):
- args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.cmake))
- elif self.spec.satisfies("@5.2.0:"):
+ if self.spec.satisfies("@5.2:"):
args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
if "auto" not in self.spec.variants["amdgpu_target"]:
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
@@ -232,10 +142,10 @@ class Rocalution(CMakePackage):
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
- if self.spec.satisfies("@5.2.0:"):
+ if self.spec.satisfies("@5.2:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
- if self.spec.satisfies("@5.3.0:"):
+ if self.spec.satisfies("@5.3:"):
args.append("-DCMAKE_INSTALL_LIBDIR=lib")
return args
diff --git a/var/spack/repos/builtin/packages/rocblas/0001-Fix-compilation-error-with-StringRef-to-basic-string.patch b/var/spack/repos/builtin/packages/rocblas/0001-Fix-compilation-error-with-StringRef-to-basic-string.patch
deleted file mode 100644
index 54845c5a4a..0000000000
--- a/var/spack/repos/builtin/packages/rocblas/0001-Fix-compilation-error-with-StringRef-to-basic-string.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From f4e7ceba4593540d6d6bf35a958d187cc84c5172 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <harmenstoppels@gmail.com>
-Date: Mon, 10 Aug 2020 23:39:22 +0200
-Subject: [PATCH] Fix compilation error with StringRef to basic string
-
----
- Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp b/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-index 16e64ff9..0d00f470 100644
---- a/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-+++ b/Tensile/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-@@ -261,7 +261,7 @@ namespace llvm
-
- static void inputOne(IO& io, StringRef key, Hide<T>& value)
- {
-- Impl::inputOne(io, key, *value);
-+ Impl::inputOne(io, key.str(), *value);
- }
-
- static void output(IO& io, Hide<T>& value)
---
-2.25.1
-
diff --git a/var/spack/repos/builtin/packages/rocblas/0002-Fix-rocblas-clients-blas.patch b/var/spack/repos/builtin/packages/rocblas/0002-Fix-rocblas-clients-blas.patch
deleted file mode 100644
index 5ac534d6d0..0000000000
--- a/var/spack/repos/builtin/packages/rocblas/0002-Fix-rocblas-clients-blas.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
---- a/clients/benchmarks/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
-+++ b/clients/benchmarks/CMakeLists.txt 2021-11-12 14:21:31.246604351 -0700
-@@ -52,6 +52,8 @@
- target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas )
- if(LINK_BLIS)
- target_link_libraries( rocblas-bench PRIVATE ${BLIS_LIBRARY} )
-+else()
-+ target_link_libraries( rocblas-bench PRIVATE blas )
- endif()
-
- if( CUDA_FOUND )
-diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
---- a/clients/gtest/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
-+++ b/clients/gtest/CMakeLists.txt 2021-11-12 14:20:59.057676192 -0700
-@@ -132,6 +132,8 @@
- target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} )
- if(LINK_BLIS)
- target_link_libraries( rocblas-test PRIVATE ${BLIS_LIBRARY} )
-+else()
-+ target_link_libraries( rocblas-test PRIVATE blas )
- endif()
-
-
diff --git a/var/spack/repos/builtin/packages/rocblas/0003-Fix-rocblas-gentest.patch b/var/spack/repos/builtin/packages/rocblas/0003-Fix-rocblas-gentest.patch
deleted file mode 100644
index 4bc1631fec..0000000000
--- a/var/spack/repos/builtin/packages/rocblas/0003-Fix-rocblas-gentest.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -r -u a/clients/common/rocblas_gentest.py b/clients/common/rocblas_gentest.py
---- a/clients/common/rocblas_gentest.py 2021-11-12 12:22:24.359556397 -0700
-+++ b/clients/common/rocblas_gentest.py 2021-11-12 12:22:41.464044040 -0700
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/env python3
- """Copyright 2018-2020 Advanced Micro Devices, Inc.
- Expand rocBLAS YAML test data file into binary Arguments records"""
-
diff --git a/var/spack/repos/builtin/packages/rocblas/0007-add-rocm-openmp-extras-include-dir.patch b/var/spack/repos/builtin/packages/rocblas/0007-add-rocm-openmp-extras-include-dir.patch
new file mode 100644
index 0000000000..4e265011b1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocblas/0007-add-rocm-openmp-extras-include-dir.patch
@@ -0,0 +1,20 @@
+diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
+index 55e9bbe..32b350c 100644
+--- a/clients/gtest/CMakeLists.txt
++++ b/clients/gtest/CMakeLists.txt
+@@ -164,6 +164,7 @@ target_include_directories( rocblas-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${ROCM_OPENMP_EXTRAS_DIR}/include>
+ )
+ target_include_directories( rocblas_v3-test
+ SYSTEM PRIVATE
+@@ -171,6 +172,7 @@ target_include_directories( rocblas_v3-test
+ $<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
+ $<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
+ $<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${ROCM_OPENMP_EXTRAS_DIR}/include>
+ )
+
+ if( BUILD_FORTRAN_CLIENTS )
diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py
index d352d1185f..e75274282f 100644
--- a/var/spack/repos/builtin/packages/rocblas/package.py
+++ b/var/spack/repos/builtin/packages/rocblas/package.py
@@ -11,9 +11,9 @@ from spack.package import *
class Rocblas(CMakePackage):
"""Radeon Open Compute BLAS library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocBLAS/"
- git = "https://github.com/ROCmSoftwarePlatform/rocBLAS.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocBLAS/"
+ git = "https://github.com/ROCm/rocBLAS.git"
+ url = "https://github.com/ROCm/rocBLAS/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie")
@@ -23,91 +23,29 @@ class Rocblas(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="8bacf74e3499c445f1bb0a8048df1ef3ce6f72388739b1823b5784fd1e8aa22a")
+ version("6.2.1", sha256="cf3bd7b47694f95f387803191615e2ff5c1106175473be7a5b2e8eb6fb99179f")
+ version("6.2.0", sha256="184e9b39dcbed57c25f351b047d44c613f8a2bbab3314a20c335f024a12ad4e5")
+ version("6.1.2", sha256="1e83918bd7b28ec9ee292c6fb7eb0fc5f4db2d5d831a9a3db541f14a90c20a1a")
+ version("6.1.1", sha256="c920742fb8f45512c360cdb40e37d0ac767f042e52f1981264853dab5ec2c876")
+ version("6.1.0", sha256="af00357909da60d82618038aa9a3cc1f9d4ce1bdfb54db20ec746b592d478edf")
+ version("6.0.2", sha256="d1bf31063a2d349797b88c994c91d05f94e681bafb5550ad9b53529703d89dbb")
+ version("6.0.0", sha256="befa4a75f1de0ea37f2358d4c2de5406d7bce671ca9936e2294b64d3b3bafb60")
version("5.7.1", sha256="2984a5ed0ea5a05d40996ee3fddecb24399cbe8ea3e4921fc254e54d8f52fe4f")
version("5.7.0", sha256="024edd98de9687ee5394badc4dd4c543eef4eb3f71c96ff64100705d851e1744")
version("5.6.1", sha256="73896ebd445162a69af97f9fd462684609b4e0cf617eab450cd4558b4a23941e")
version("5.6.0", sha256="6a70b27eede02c45f46095a6ce8421af9a774a565e39f5e1074783ecf00c1ea7")
version("5.5.1", sha256="7916a8d238d51cc239949d799f0b61c9d5cd63c6ccaed0e16749489b89ca8ff3")
version("5.5.0", sha256="b5260517f199e806ae18f2c4495f163884e0d7a0a7c67af0770f7428ea50f898")
- version("5.4.3", sha256="d82cd334b7a9b40d16ec4f4bb1fb5662382dcbfc86ee5e262413ed63d9e6a701")
- version("5.4.0", sha256="261e05375024a01e68697c5d175210a07f0f5fc63a756234d996ddedffde78a2")
- version("5.3.3", sha256="62a3b5f415bd8e0dcd0d68233d379f1a928ec0349977c32b4eea72ae5004e805")
- version("5.3.0", sha256="8ea7269604cba949a6ea84b78dc92a44fa890427db88334da6358813f6512e34")
- version("5.2.3", sha256="36f74ce53b82331a756c42f95f3138498d6f4a66f2fd370cff9ab18281bb12d5")
- version("5.2.1", sha256="6be804ba8d9e491a85063c220cd0ddbf3d13e3b481eee31041c35a938723f4c6")
- version("5.2.0", sha256="b178b7db5f0af55b21b5f744b8825f5e002daec69b4688e50df2bca2fac155bd")
- version("5.1.3", sha256="915374431db8f0cecdc2bf318a0ad33c3a8eceedc461d7a06b92ccb02b07313c")
- version("5.1.0", sha256="efa0c424b5ada697314aa8a78c19c93ade15f1612c4bfc8c53d71d1c9719aaa3")
- version(
- "5.0.2",
- sha256="358a0902fc279bfc80205659a90e96269cb7d83a80386b121e4e3dfe221fec23",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="4b01fba937ada774f09c7ccb5e9fdc66e1a5d46c130be833e3706e6b5841b1da",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="15d725e38f91d1ff7772c4204b97c1515af58fa7b8ec2a2014b99b6d337909c4",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="22d15a1389a10f1324f5e0ceac1a6ec0758a2801a18419a55e37e2bc63793eaf",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="ad3c09573cb2bcfdb12bfb5a05e85f9c95073993fd610981df24dda792727b4b",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="b15a66c861b3394cb83c56b64530b2c7e57b2b4c50f55d0e66bb3d1483b50ec4",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="547f6d5d38a41786839f01c5bfa46ffe9937b389193a8891f251e276a1a47fb0",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="8be20c722bab169bc4badd79a9eab9a1aa338e0e5ff58ad85ba6bf09e8ac60f4",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="78e37a7597b581d90a29e4b956fa65d0f8d1c8fb51667906b5fe2a223338d401",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="9bfd0cf99662192b1ac105ab387531cfa9338ae615db80ed690c6a14d987e0e8",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="3ecd2d9fd2be0e1697a191d143a2d447b53a91ae01afb50231d591136ad5e2fe",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="568a9da0360349b1b134d74cc67cbb69b43c06eeca7c33b50072cd26cd3d8900",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="9425db5f8e8b6f7fb172d09e2a360025b63a4e54414607709efc5acb28819642",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="8560fabef7f13e8d67da997de2295399f6ec595edfd77e452978c140d5f936f0",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="d82cd334b7a9b40d16ec4f4bb1fb5662382dcbfc86ee5e262413ed63d9e6a701")
+ version("5.4.0", sha256="261e05375024a01e68697c5d175210a07f0f5fc63a756234d996ddedffde78a2")
+ version("5.3.3", sha256="62a3b5f415bd8e0dcd0d68233d379f1a928ec0349977c32b4eea72ae5004e805")
+ version("5.3.0", sha256="8ea7269604cba949a6ea84b78dc92a44fa890427db88334da6358813f6512e34")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -118,62 +56,44 @@ class Rocblas(CMakePackage):
sticky=True,
)
variant("tensile", default=True, description="Use Tensile as a backend")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
- # gfx906, gfx908,gfx803,gfx900 are valid for @:4.0.0
- # gfx803,gfx900,gfx:xnack-,gfx908:xnack- are valid gpus for @4.1.0:4.2.0
- # gfx803 till gfx1030 are valid gpus for @4.3.0:
- conflicts("amdgpu_target=gfx906:xnack-", when="@:4.0.0")
- conflicts("amdgpu_target=gfx908:xnack-", when="@:4.0.0")
- conflicts("amdgpu_target=gfx90a:xnack+", when="@:4.2.1")
- conflicts("amdgpu_target=gfx90a:xnack-", when="@:4.2.1")
- conflicts("amdgpu_target=gfx1010", when="@:4.2.1")
- conflicts("amdgpu_target=gfx1011", when="@:4.2.1")
- conflicts("amdgpu_target=gfx1012", when="@:4.2.1")
- conflicts("amdgpu_target=gfx1030", when="@:4.2.1")
# https://reviews.llvm.org/D124866
- # https://github.com/ROCm-Developer-Tools/HIP/issues/2678
- # https://github.com/ROCm-Developer-Tools/hipamd/blob/rocm-5.2.x/include/hip/amd_detail/host_defines.h#L50
- conflicts("%gcc@12", when="@5.2.1:5.2.3")
+ # https://github.com/ROCm/HIP/issues/2678
+ # https://github.com/ROCm/hipamd/blob/rocm-5.2.x/include/hip/amd_detail/host_defines.h#L50
+ conflicts("%gcc@12", when="@5.2")
- depends_on("cmake@3.16.8:", type="build", when="@4.2.0:")
- depends_on("cmake@3.8:", type="build", when="@3.9.0:")
- depends_on("cmake@3.5:", type="build")
+ depends_on("cmake@3.16.8:", type="build")
depends_on("googletest@1.10.0:", type="test")
- depends_on("netlib-lapack@3.7.1:", type="test")
+ depends_on("amdblis", type="test")
+
+ for ver in [
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}")
- def check(self):
- if "@4.2.0:" in self.spec:
- exe = join_path(self.build_directory, "clients", "staging", "rocblas-test")
- self.run_test(exe, options=["--gtest_filter=*quick*-*known_bug*"])
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocm-smi-lib@{ver}", type="test", when=f"@{ver}")
- depends_on("hip@4.1.0:", when="@4.1.0:")
- depends_on("llvm-amdgpu@4.1.0:", type="build", when="@4.1.0:")
depends_on("rocm-cmake@master", type="build", when="@master:")
- depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
- depends_on("rocm-cmake@4.3.0:", type="build", when="@4.3.0:")
- depends_on("rocm-cmake@3.5.0:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -184,16 +104,24 @@ class Rocblas(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver)
- depends_on("rocminfo@" + ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
depends_on("python@3.6:", type="build")
with when("+tensile"):
- # default library format since 3.7.0
- depends_on("msgpack-c@3:", when="@3.7:")
+ depends_on("msgpack-c@3:")
depends_on("py-virtualenv", type="build")
depends_on("perl-file-which", type="build")
@@ -205,25 +133,6 @@ class Rocblas(CMakePackage):
depends_on("procps", type="build", when="@5.6:")
for t_version, t_commit in [
- ("@3.5.0", "f842a1a4427624eff6cbddb2405c36dec9a210cd"),
- ("@3.7.0", "af71ea890a893e647bf2cf4571a90297d65689ca"),
- ("@3.8.0", "9123205f9b5f95c96ff955695e942d2c3b321cbf"),
- ("@3.9.0", "b68edc65aaeed08c71b2b8622f69f83498b57d7a"),
- ("@3.10.0", "ab44bf46b609b5a40053f310bef2ab7511f726ae"),
- ("@4.0.0", "ab44bf46b609b5a40053f310bef2ab7511f726ae"),
- ("@4.1.0", "d175277084d3253401583aa030aba121e8875bfd"),
- ("@4.2.0", "3438af228dc812768b20a068b0285122f327fa5b"),
- ("@4.3.0", "9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf"),
- ("@4.3.1", "9cbabb07f81e932b9c98bf5ae48fbd7fcef615cf"),
- ("@4.5.0", "0f6a6d1557868d6d563cb1edf167c32c2e34fda0"),
- ("@4.5.2", "0f6a6d1557868d6d563cb1edf167c32c2e34fda0"),
- ("@5.0.0", "75b9aefe5981d85d1df32ddcebf32dab52bfdabd"),
- ("@5.0.2", "75b9aefe5981d85d1df32ddcebf32dab52bfdabd"),
- ("@5.1.0", "ea38f8661281a37cd81c96cc07868e3f07d2c4da"),
- ("@5.1.3", "ea38f8661281a37cd81c96cc07868e3f07d2c4da"),
- ("@5.2.0", "9ca08f38c4c3bfe6dfa02233637e7e3758c7b6db"),
- ("@5.2.1", "9ca08f38c4c3bfe6dfa02233637e7e3758c7b6db"),
- ("@5.2.3", "9ca08f38c4c3bfe6dfa02233637e7e3758c7b6db"),
("@5.3.0", "b33ca97af456cda14f7b1ec9bcc8aeab3ed6dd08"),
("@5.3.3", "006a5d653ce0d82fecb05d5e215d053749b57c04"),
("@5.4.0", "5aec08937473b27865fa969bb38a83bcf9463c2b"),
@@ -234,33 +143,44 @@ class Rocblas(CMakePackage):
("@5.6.1", "7d0a9d040c3bbae893df7ecef6a19d9cd1c304aa"),
("@5.7.0", "97e0cfc2c8cb87a1e38901d99c39090dc4181652"),
("@5.7.1", "97e0cfc2c8cb87a1e38901d99c39090dc4181652"),
+ ("@6.0.0", "17df881bde80fc20f997dfb290f4bb4b0e05a7e9"),
+ ("@6.0.2", "17df881bde80fc20f997dfb290f4bb4b0e05a7e9"),
+ ("@6.1.0", "2b55ccf58712f67b3df0ca53b0445f094fcb96b2"),
+ ("@6.1.1", "2b55ccf58712f67b3df0ca53b0445f094fcb96b2"),
+ ("@6.1.2", "2b55ccf58712f67b3df0ca53b0445f094fcb96b2"),
+ ("@6.2.0", "dbc2062dced66e4cbee8e0591d76e0a1588a4c70"),
+ ("@6.2.1", "dbc2062dced66e4cbee8e0591d76e0a1588a4c70"),
+ ("@6.2.4", "81ae9537671627fe541332c0a5d953bfd6af71d6"),
]:
resource(
name="Tensile",
- git="https://github.com/ROCmSoftwarePlatform/Tensile.git",
+ git="https://github.com/ROCm/Tensile.git",
commit=t_commit,
- when="{} +tensile".format(t_version),
+ when=f"{t_version} +tensile",
)
for ver in ["master", "develop"]:
resource(
name="Tensile",
- git="https://github.com/ROCmSoftwarePlatform/Tensile.git",
+ git="https://github.com/ROCm/Tensile.git",
branch=ver,
- when="@{} +tensile".format(ver),
+ when=f"@{ver} +tensile",
)
- # Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087
- # Not yet landed in 3.7.0, nor 3.8.0.
- patch("0001-Fix-compilation-error-with-StringRef-to-basic-string.patch", when="@:3.8")
- patch("0002-Fix-rocblas-clients-blas.patch", when="@4.2.0:4.3.1")
- patch("0003-Fix-rocblas-gentest.patch", when="@4.2.0:5.1")
# Finding Python package and set command python as python3
patch("0004-Find-python.patch", when="@5.2.0:5.4")
patch("0006-Guard-use-of-OpenMP-to-make-it-optional-5.4.patch", when="@5.4")
+ patch("0007-add-rocm-openmp-extras-include-dir.patch", when="@5.6:5.7")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
@classmethod
def determine_version(cls, lib):
@@ -282,9 +202,18 @@ class Rocblas(CMakePackage):
self.define_from_variant("BUILD_WITH_TENSILE", "tensile"),
]
if self.run_tests:
- args.append(self.define("LINK_BLIS", "OFF"))
+ args.append(self.define("LINK_BLIS", "ON"))
+ if self.spec.satisfies("@5.6.0:"):
+ args.append(
+ self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
+ )
+ args.append(
+ self.define("BLIS_INCLUDE_DIR", self.spec["amdblis"].prefix + "/include/blis/")
+ )
+ args.append(
+ self.define("BLAS_LIBRARY", self.spec["amdblis"].prefix + "/lib/libblis.a")
+ )
- arch_define_name = "AMDGPU_TARGETS"
if "+tensile" in self.spec:
tensile_path = join_path(self.stage.source_path, "Tensile")
args += [
@@ -292,22 +221,19 @@ class Rocblas(CMakePackage):
self.define("Tensile_COMPILER", "hipcc"),
self.define("Tensile_LOGIC", "asm_full"),
self.define("BUILD_WITH_TENSILE_HOST", "@3.7.0:" in self.spec),
+ self.define("Tensile_LIBRARY_FORMAT", "msgpack"),
]
- if self.spec.satisfies("@3.7.0:"):
- args.append(self.define("Tensile_LIBRARY_FORMAT", "msgpack"))
- if self.spec.satisfies("@:4.2.0"):
- arch_define_name = "Tensile_ARCHITECTURE"
# Restrict the number of jobs Tensile can spawn.
# If we don't specify otherwise, Tensile creates a job per available core,
# and that consumes a lot of system memory.
- # https://github.com/ROCmSoftwarePlatform/Tensile/blob/93e10678a0ced7843d9332b80bc17ebf9a166e8e/Tensile/Parallel.py#L38
+ # https://github.com/ROCm/Tensile/blob/93e10678a0ced7843d9332b80bc17ebf9a166e8e/Tensile/Parallel.py#L38
args.append(self.define("Tensile_CPU_THREADS", min(16, make_jobs)))
- # See https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/c1895ba4bb3f4f5947f3818ebd155cf71a27b634
+ # See https://github.com/ROCm/rocBLAS/commit/c1895ba4bb3f4f5947f3818ebd155cf71a27b634
if "auto" not in self.spec.variants["amdgpu_target"]:
- args.append(self.define_from_variant(arch_define_name, "amdgpu_target"))
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
- # See https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1196
+ # See https://github.com/ROCm/rocBLAS/issues/1196
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
@@ -321,3 +247,9 @@ class Rocblas(CMakePackage):
args.append(self.define("Tensile_CODE_OBJECT_VERSION", "default"))
return args
+
+ @run_after("build")
+ @on_package_attributes(run_tests=True)
+ def check_build(self):
+ exe = Executable(join_path(self.build_directory, "clients", "staging", "rocblas-test"))
+ exe("--gtest_filter=*quick*-*known_bug*")
diff --git a/var/spack/repos/builtin/packages/rocdecode/package.py b/var/spack/repos/builtin/packages/rocdecode/package.py
new file mode 100644
index 0000000000..6a48c8a7c7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocdecode/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Rocdecode(CMakePackage):
+ """rocDecode is a high performance video decode SDK for AMD hardware"""
+
+ homepage = "https://github.com/ROCm/rocDecode"
+ git = "https://github.com/ROCm/rocDecode.git"
+ url = "https://github.com/ROCm/rocDecode/archive/refs/tags/rocm-6.2.0.tar.gz"
+
+ tags = ["rocm"]
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ license("MIT")
+ version("6.2.4", sha256="37aaa1299cfc517ddaf60b0e8a5cf06d672f59e8acc0da3862b40b810d4931cb")
+ version("6.2.1", sha256="d4a636415d61fef94f97197cb9ebbff59e3a18dc4850612ee142e3e14a35e6d4")
+ version("6.2.0", sha256="fe0d7c19a4e65b93405566511880b94f25ef68c830d0088f9458da9baea1d4f9")
+ version("6.1.2", sha256="67a13aeaa495e06683124de5908e61cf2be3beff79b13d858897344aa809775e")
+ version("6.1.1", sha256="5914c91e433ec7e8511b8a9017d165a0589c1aff9f5527b413d0b3a32a3cc318")
+ version("6.1.0", sha256="8316dbde87f1fea782af6216c8d013e866542329a673fb24a668335c6169ef8f")
+
+ amdgpu_targets = ROCmPackage.amdgpu_targets
+
+ variant(
+ "amdgpu_target",
+ description="AMD GPU architecture",
+ values=auto_or_any_combination_of(*amdgpu_targets),
+ sticky=True,
+ )
+
+ depends_on("libva", type="build", when="@6.2:")
+
+ for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+
+ def patch(self):
+ filter_file(
+ r"${ROCM_PATH}/llvm/bin/clang++",
+ "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
+ "CMakeLists.txt",
+ string=True,
+ )
+
+ def cmake_args(self):
+ args = []
+ if "auto" not in self.spec.variants["amdgpu_target"]:
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
+ return args
diff --git a/var/spack/repos/builtin/packages/rocfft/0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch b/var/spack/repos/builtin/packages/rocfft/0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch
deleted file mode 100644
index 85fb71a843..0000000000
--- a/var/spack/repos/builtin/packages/rocfft/0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
-index 0fed2d2..c426b94 100644
---- a/library/src/CMakeLists.txt
-+++ b/library/src/CMakeLists.txt
-@@ -138,27 +138,42 @@ set( rocfft_source
- # for cache serialization. We also want to use a static SQLite,
- # and distro static libraries aren't typically built
- # position-independent.
--include( FetchContent )
-
--# embed SQLite
--FetchContent_Declare(sqlite_local
-- URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
-- URL_HASH SHA256=999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729
--)
--FetchContent_MakeAvailable(sqlite_local)
--add_library( sqlite3 STATIC ${sqlite_local_SOURCE_DIR}/sqlite3.c )
--set_target_properties( sqlite3 PROPERTIES
-- C_VISIBILITY_PRESET "hidden"
-- VISIBILITY_INLINES_HIDDEN ON
-- POSITION_INDEPENDENT_CODE ON
-+option( SQLITE_USE_SYSTEM_PACKAGE "Use SQLite3 from find_package" OFF )
-+if( SQLITE_USE_SYSTEM_PACKAGE )
-+ find_package(SQLite3 3.36 REQUIRED)
-+ set(ROCFFT_SQLITE_LIB SQLite::SQLite3)
-+else()
-+ include( FetchContent )
-+ if(DEFINED ENV{SQLITE_SRC_URL})
-+ set(SQLITE_SRC_URL_INIT $ENV{SQLITE_SRC_URL})
-+ else()
-+ set(SQLITE_SRC_URL_INIT https://sqlite.org/2021/sqlite-amalgamation-3360000.zip)
-+ endif()
-+ set(SQLITE_SRC_URL ${SQLITE_SRC_URL_INIT} CACHE STRING "Location of SQLite source code")
-+ set(SQLITE_SRC_SHA256 999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 CACHE STRING "SHA256 hash of SQLite source code")
-+
-+ # embed SQLite
-+ FetchContent_Declare(sqlite_local
-+ URL ${SQLITE_SRC_URL}
-+ URL_HASH SHA256=${SQLITE_SRC_SHA256}
- )
--
--# we don't need extensions, and omitting them from SQLite removes the
--# need for dlopen/dlclose from within rocFFT
--target_compile_options(
-- sqlite3
-- PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION
--)
-+ FetchContent_MakeAvailable(sqlite_local)
-+ add_library( sqlite3 OBJECT ${sqlite_local_SOURCE_DIR}/sqlite3.c )
-+ set_target_properties( sqlite3 PROPERTIES
-+ C_VISIBILITY_PRESET "hidden"
-+ VISIBILITY_INLINES_HIDDEN ON
-+ POSITION_INDEPENDENT_CODE ON
-+ )
-+
-+ # we don't need extensions, and omitting them from SQLite removes the
-+ # need for dlopen/dlclose from within rocFFT
-+ target_compile_options(
-+ sqlite3
-+ PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION
-+ )
-+ set(ROCFFT_SQLITE_LIB sqlite3)
-+endif()
-
- set_property(
- SOURCE rtc.cpp
-@@ -169,8 +184,8 @@ prepend_path( ".." rocfft_headers_public relative_rocfft_headers_public )
-
- add_library( rocfft ${rocfft_source} ${relative_rocfft_headers_public} )
- add_library( roc::rocfft ALIAS rocfft )
-+target_link_libraries( rocfft PRIVATE ${ROCFFT_SQLITE_LIB} )
-
--target_link_libraries( rocfft PRIVATE stockham_gen sqlite3 )
- if( NOT WIN32 )
- target_link_libraries( rocfft PRIVATE -lstdc++fs )
- endif()
diff --git a/var/spack/repos/builtin/packages/rocfft/0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch b/var/spack/repos/builtin/packages/rocfft/0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch
deleted file mode 100644
index 7d7b0574d2..0000000000
--- a/var/spack/repos/builtin/packages/rocfft/0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
-index 6f2bfb8..2354f7b 100644
---- a/clients/tests/CMakeLists.txt
-+++ b/clients/tests/CMakeLists.txt
-@@ -58,7 +58,7 @@ find_package( FFTW 3.0 REQUIRED MODULE COMPONENTS FLOAT DOUBLE )
-
- set( rocfft-test_include_dirs
- $<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
-- $<BUILD_INTERFACE:${FFTW_INCLUDES}>
-+ $<BUILD_INTERFACE:${FFTW_INCLUDE_DIRS}>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/misc/include>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/src/include>
- )
diff --git a/var/spack/repos/builtin/packages/rocfft/0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch b/var/spack/repos/builtin/packages/rocfft/0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch
deleted file mode 100644
index aaf44a872a..0000000000
--- a/var/spack/repos/builtin/packages/rocfft/0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
-index 7f14a55..a62fbd4 100644
---- a/clients/CMakeLists.txt
-+++ b/clients/CMakeLists.txt
-@@ -103,6 +103,7 @@ if( BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_SAMPLES )
- # look for installed FFTW if we weren't asked to build it
- if( NOT BUILD_FFTW )
- find_package( FFTW 3.0 MODULE COMPONENTS FLOAT DOUBLE )
-+ set( FFTW_INCLUDES ${FFTW_INCLUDE_DIRS} )
- endif()
-
- # also try to build FFTW if FFTW isn't present
diff --git a/var/spack/repos/builtin/packages/rocfft/0005-Fix-clients-tests-include-rocrand-fftw-include-dir-rocm-6.0.0.patch b/var/spack/repos/builtin/packages/rocfft/0005-Fix-clients-tests-include-rocrand-fftw-include-dir-rocm-6.0.0.patch
new file mode 100644
index 0000000000..8144fb8d29
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocfft/0005-Fix-clients-tests-include-rocrand-fftw-include-dir-rocm-6.0.0.patch
@@ -0,0 +1,39 @@
+diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
+index d0b95b4..0339daa 100644
+--- a/clients/tests/CMakeLists.txt
++++ b/clients/tests/CMakeLists.txt
+@@ -64,6 +64,10 @@ if( NOT hiprand_FOUND )
+ find_package( hiprand REQUIRED )
+ endif()
+
++if( NOT rocrand_FOUND )
++ find_package( rocrand REQUIRED )
++endif()
++
+ include( ROCMInstallTargets )
+
+ set( rocfft-test_source
+@@ -109,6 +113,7 @@ option( BUILD_FFTW "Download and build FFTW" OFF )
+ # look for installed FFTW if we weren't asked to build it
+ if( NOT BUILD_FFTW )
+ find_package( FFTW 3.0 MODULE COMPONENTS FLOAT DOUBLE )
++ set( FFTW_INCLUDES ${FFTW_INCLUDE_DIRS} )
+ endif()
+
+ include( ExternalProject )
+@@ -174,6 +179,7 @@ endif()
+
+ set( rocfft-test_include_dirs
+ $<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
++ $<BUILD_INTERFACE:${rocrand_INCLUDE_DIRS}>
+ $<BUILD_INTERFACE:${FFTW_INCLUDES}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/misc/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/src/include>
+@@ -216,6 +222,7 @@ target_link_libraries( rocfft-test
+ hip::device
+ roc::rocfft
+ hip::hiprand
++ roc::rocrand
+ ${rocfft-test_link_libs}
+ )
+
diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py
index 229dd4bdb0..65381c9756 100644
--- a/var/spack/repos/builtin/packages/rocfft/package.py
+++ b/var/spack/repos/builtin/packages/rocfft/package.py
@@ -11,101 +11,38 @@ from spack.package import *
class Rocfft(CMakePackage):
"""Radeon Open Compute FFT library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT/"
- git = "https://github.com/ROCmSoftwarePlatform/rocFFT.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocfft/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocFFT/"
+ git = "https://github.com/ROCm/rocFFT.git"
+ url = "https://github.com/ROCm/rocfft/archive/rocm-6.1.1.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie")
libraries = ["librocfft"]
license("MIT")
-
+ version("master", branch="master")
+ version("6.2.4", sha256="8ddc4e779a84b73c21b054ae37fec69e5c2f248589c7fb1b84a2197baf6ce995")
+ version("6.2.1", sha256="662d56cbc4c40a82e2f320bfc8e48a571a448e19c04a9ce30d3419b47fcf3574")
+ version("6.2.0", sha256="c9886ec2c713c502dcde4f5fed3d6e1a7dd019023fb07e82d3b622e66c6f2c36")
+ version("6.1.2", sha256="6f54609b0ecb8ceae8b7acd4c8692514c2c2dbaf0f8b199fe990fd4711428193")
+ version("6.1.1", sha256="d517a931d49a1e59df4e494ab2b68e301fe7ebf39723863985567467f111111c")
+ version("6.1.0", sha256="9e6643174a2b0f376127f43454e78d4feba6fac695d4cda9796da50005ecac66")
+ version("6.0.2", sha256="d3e1f7a4dc661f1e5ffce02e2e01ae6c3c339bac8e93deaf175e4c03ddfea459")
+ version("6.0.0", sha256="fb8ba56572702e77e4383d922cd1fee4ad3fa5f63a5ebdb3d9c354439a446992")
version("5.7.1", sha256="202f11f60dc8738e29bbd1b397d419e032794f8bffb7f48f2b31f09cc5f08bc2")
version("5.7.0", sha256="3c4a1537a6ec76dc9b622644fe3890647306bf9f28f61c5d2028259c31bb964f")
version("5.6.1", sha256="a65861e453587c3e6393da75b0b1976508c61f968aecda77fbec920fea48489e")
version("5.6.0", sha256="e3d4a6c1bdac78f9a22033f57011af783d560308103f73542f9e0e4dd133d38a")
version("5.5.1", sha256="57423a64f5cdb1c37ff0891b6c17b59f73198d46be42db4ae23781ef2c0cd49d")
version("5.5.0", sha256="9288152e66504b06082e4eed8cdb791b4f9ae2836b3defbeb4d2b54901b96485")
- version("5.4.3", sha256="ed9664adc9825c237327497bc4b23f020d50be7645647f14a45f4d943dd506e7")
- version("5.4.0", sha256="d35a67332f4425fba1824eed78cf98d5c9a17a422614ff3f4cba2461df952336")
- version("5.3.3", sha256="678c18710578c1fb36a0009311bb79de7607c3468f9102cfba56a866ebb7ff78")
- version("5.3.0", sha256="d655c5541c4aff4267e80e36d002fc3a55c2f84a0ae8631197c12af3bf03fa7d")
- version("5.2.3", sha256="0cee37886f01f1afb3ae5dad1164c819573c13c6675bff4eb668de334adbff27")
- version("5.2.1", sha256="6302349b6cc610a9a939377e2c7ffba946656a8d43f2e438ff0b3088f0f963ad")
- version("5.2.0", sha256="ebba280b7879fb4bc529a68072b98d4e815201f90d24144d672094bc241743d4")
- version("5.1.3", sha256="b4fcd03c1b07d465bb307ec33cc7fb50036dff688e497c5e52b2dec37f4cb618")
- version("5.1.0", sha256="dc11c9061753ae43a9d5db9c4674aa113a8adaf50818b2701cbb940894147f68")
- version(
- "5.0.2",
- sha256="30d4bd5fa85185ddafc69fa6d284edd8033c9d77d1e351fa328267242995eb0a",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="c16374dac2f85fbaf145511653e93f6db3151425ce39b282187745c716b67405",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="2724118ca00b9e97ac9578fe0b7e64a82d86c4fb0246d0da88d8ddd9c608b1e1",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="045c1cf1737db6e7ee332c274dacdb565f99c976ed4cc5626a116878dc80a48c",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="fcdc4d12b93d967b6f992b4045da98433eabf2ee0ba84fc6b6f81e380584fbc9",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="cb5b8f62330bc61b17a3a2fd1500068ee05d48cb51797901dd259dbc84610478",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="db29c9067f0cfa98bddd3574f6aa7200cfc790cc6da352d19e4696c3f3982163",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="df23fcb05aae72557461ae3687be7e3b8b78be4132daf1aa9dc07339f4eba0cc",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="d1d10d270f822e0bab64307313ef163ba449b058bf3352962bbb26d4f4db89d0",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="9f57226aac7d9a0515e14a5a5b08a85e727de72b3f9c2177daf56749ac2c76ae",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="9c9c0b7f09bab17250f5101d1605e7a61218eae828a3eb8fe048d607181294ce",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="ed23009796e2ee7c43dcc24527f2d6b1d7a73dceac06c30384460098d2fe1556",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="94462e4bd19c2c749fcf6903adbee66d4d3bd345c0246861ff8f40b9d08a6ead",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="629f02cfecb7de5ad2517b6a8aac6ed4de60d3a9c620413c4d9db46081ac2c88",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="ed9664adc9825c237327497bc4b23f020d50be7645647f14a45f4d943dd506e7")
+ version("5.4.0", sha256="d35a67332f4425fba1824eed78cf98d5c9a17a422614ff3f4cba2461df952336")
+ version("5.3.3", sha256="678c18710578c1fb36a0009311bb79de7607c3468f9102cfba56a866ebb7ff78")
+ version("5.3.0", sha256="d655c5541c4aff4267e80e36d002fc3a55c2f84a0ae8631197c12af3bf03fa7d")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -121,42 +58,24 @@ class Rocfft(CMakePackage):
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
- depends_on("cmake@3.16:", type="build", when="@4.5.0:")
- depends_on("cmake@3.5:", type="build")
- depends_on("python@3.6:", type="build", when="@5.0.0:")
- depends_on("sqlite@3.36:", when="@5.0.0:")
+ depends_on("cmake@3.16:", type="build")
+ depends_on("python@3.6:", type="build")
+ depends_on("sqlite@3.36:")
depends_on("googletest@1.10.0:", type="test")
depends_on("fftw@3.3.8:", type="test")
depends_on("boost@1.64.0: +program_options", type="test")
depends_on("rocm-openmp-extras", type="test")
depends_on("hiprand", type="test")
-
- def check(self):
- exe = join_path(self.build_directory, "clients", "staging", "rocfft-test")
- self.run_test(exe, options="--gtest_filter=mix*:adhoc*")
+ depends_on("rocrand", type="test")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -167,64 +86,82 @@ class Rocfft(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ "master",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
- patch("0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch", when="@5.0.0:5.0.2")
- # Patch to add spack build test support. No longer required from 5.2
- patch("0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch", when="@4.2.0:4.3.1")
- patch("0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch", when="@4.5.0:5.1")
# Patch to add install prefix header location for sqlite for 5.4
patch("0004-fix-missing-sqlite-include-paths.patch", when="@5.4.0:5.5")
+ # Patch to fix the build issue when --test=root is enabled
+ # This adds the include headers from the rocrand and fftw in the cmakelists.txt
+ # issue is seen from 5.7.0 onwards
+ patch(
+ "0005-Fix-clients-tests-include-rocrand-fftw-include-dir-rocm-6.0.0.patch", when="@5.7.0:"
+ )
+
+ # Set LD_LIBRARY_PATH for executing the binaries from build directoryfix missing type
+ # https://github.com/ROCm/rocFFT/pull/449)
+ patch(
+ "https://github.com/ROCm/rocFFT/commit/0ec78f1daac2d7fa1415f4deff0d129252c1c9de.patch?full_index=1",
+ sha256="bac7873185ac60f2aaa50e278f0b8d52b4d79d586bf7f52db1da33559569ba54",
+ when="@6.0.0",
+ )
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+ if self.spec.satisfies("%gcc@8.0:8.9") and self.spec.satisfies("@6.1:"):
+ env.append_flags("LDFLAGS", "-lstdc++fs")
+
+ @run_after("build")
+ @on_package_attributes(run_tests=True)
+ def check_build(self):
+ exe = Executable(join_path(self.build_directory, "clients", "staging", "rocfft-test"))
+ exe("--gtest_filter=mix*:adhoc*")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
- args = [self.define("BUILD_CLIENTS_TESTS", self.run_tests)]
+ args = [
+ self.define("BUILD_CLIENTS_TESTS", self.run_tests),
+ self.define("SQLITE_USE_SYSTEM_PACKAGE", True),
+ ]
+
tgt = self.spec.variants["amdgpu_target"]
if "auto" not in tgt:
- if "@:3.8.0" in self.spec:
- args.append(
- self.define(
- "CMAKE_CXX_FLAGS", "--amdgpu-target={0}".format(",".join(tgt.value))
- )
- )
- else:
- args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
-
- # From version 3.9 and above we have AMDGPU_TARGETS_SRAM_ECC
- tgt_sram = self.spec.variants["amdgpu_target_sram_ecc"]
-
- if "auto" not in tgt_sram and self.spec.satisfies("@3.9.0:4.0.0"):
- args.append(
- self.define_from_variant("AMDGPU_TARGETS_SRAM_ECC", "amdgpu_target_sram_ecc")
- )
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
- # See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/322
+ # See https://github.com/ROCm/rocFFT/issues/322
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
- if self.spec.satisfies("@5.0.0:"):
- args.append(self.define("SQLITE_USE_SYSTEM_PACKAGE", "ON"))
-
if self.spec.satisfies("@5.2.0:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
if self.spec.satisfies("@5.3.0:"):
- args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
return args
diff --git a/var/spack/repos/builtin/packages/rocketmq/package.py b/var/spack/repos/builtin/packages/rocketmq/package.py
index 33d73d444c..95925f2465 100644
--- a/var/spack/repos/builtin/packages/rocketmq/package.py
+++ b/var/spack/repos/builtin/packages/rocketmq/package.py
@@ -16,16 +16,23 @@ class Rocketmq(Package):
homepage = "https://rocketmq.apache.org/"
url = "https://archive.apache.org/dist/rocketmq/4.5.2/rocketmq-all-4.5.2-bin-release.zip"
- license("Apache-2.0")
-
- version("4.6.0", sha256="584910d50639297808dd0b86fcdfaf431efd9607009a44c6258d9a0e227748fe")
- version("4.5.2", sha256="f7711ef9c203d7133e70e0e1e887025d7dd80d29f6d5283ca6022b12576b8aba")
- version("4.5.1", sha256="0c46e4b652b007d07e9c456eb2e275126b9210c27cd56bee518809f33c8ed437")
- version("4.5.0", sha256="d75dc26291b47413f7c565bc65499501e3499f01beb713246586f72844e31042")
- version("4.4.0", sha256="8a948e240e8d2ebbf4c40c180105d088a937f82a594cd1f2ae527b20349f1d34")
- version("4.3.2", sha256="e31210a86266ee218eb6ff4f8ca6e211439895459c3bdad162067b573d9e3415")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("5.3.1", sha256="251d7261fa26d35eaffef6a2fce30880054af7a5883d578dd31574bf908a8b97")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-37582
+ version("4.6.0", sha256="584910d50639297808dd0b86fcdfaf431efd9607009a44c6258d9a0e227748fe")
+ version("4.5.2", sha256="f7711ef9c203d7133e70e0e1e887025d7dd80d29f6d5283ca6022b12576b8aba")
+ version("4.5.1", sha256="0c46e4b652b007d07e9c456eb2e275126b9210c27cd56bee518809f33c8ed437")
+ version("4.5.0", sha256="d75dc26291b47413f7c565bc65499501e3499f01beb713246586f72844e31042")
+ version("4.4.0", sha256="8a948e240e8d2ebbf4c40c180105d088a937f82a594cd1f2ae527b20349f1d34")
+ version("4.3.2", sha256="e31210a86266ee218eb6ff4f8ca6e211439895459c3bdad162067b573d9e3415")
depends_on("java@8:", type="run")
+ # UseBiasedLocking deprecated in java@15:, removed in java@21:
+ # https://openjdk.org/jeps/374, https://github.com/apache/rocketmq/pull/8809
+ depends_on("java@:20", type="run")
+
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/rocksdb/package.py b/var/spack/repos/builtin/packages/rocksdb/package.py
index b8dd075da9..7ff8ad1efd 100644
--- a/var/spack/repos/builtin/packages/rocksdb/package.py
+++ b/var/spack/repos/builtin/packages/rocksdb/package.py
@@ -16,6 +16,8 @@ class Rocksdb(MakefilePackage):
license("Apache-2.0 OR GPL-2.0-only")
version("master", git=git, branch="master", submodules=True)
+ version("9.4.0", sha256="1f829976aa24b8ba432e156f52c9e0f0bd89c46dc0cc5a9a628ea70571c1551c")
+ version("9.2.1", sha256="bb20fd9a07624e0dc1849a8e65833e5421960184f9c469d508b58ed8f40a780f")
version("8.6.7", sha256="cdb2fc3c6a556f20591f564cb8e023e56828469aa3f76e1d9535c443ba1f0c1a")
version("8.1.1", sha256="9102704e169cfb53e7724a30750eeeb3e71307663852f01fa08d5a320e6155a8")
version("7.7.3", sha256="b8ac9784a342b2e314c821f6d701148912215666ac5e9bdbccd93cf3767cb611")
@@ -30,6 +32,9 @@ class Rocksdb(MakefilePackage):
version("5.16.6", sha256="f0739edce1707568bdfb36a77638fd5bae287ca21763ce3e56cf0bfae8fff033")
version("5.15.10", sha256="26d5d4259fa352ae1604b5b4d275f947cacc006f4f7d2ef0b815056601b807c0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("bz2", default=False, description="Enable bz2 compression support")
variant("lz4", default=True, description="Enable lz4 compression support")
variant("shared", default=True, description="Build shared library")
@@ -41,6 +46,12 @@ class Rocksdb(MakefilePackage):
variant("werror", default=False, description="Build with -Werror")
variant("rtti", default=False, description="Build with RTTI")
+ depends_on("bash", type="build")
+ # Depends on coreutil's install command (e.g., Alpine's Busybox version does not work)
+ depends_on("coreutils", type="build")
+ depends_on("perl", type="build")
+ depends_on("which", type="build")
+
depends_on("bzip2", when="+bz2")
depends_on("gflags")
depends_on("lz4", when="+lz4")
diff --git a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py
index 27806866a4..cdb37eb391 100644
--- a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py
+++ b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py
@@ -10,122 +10,39 @@ from spack.package import *
class RocmBandwidthTest(CMakePackage):
"""Test to measure PciE bandwidth on ROCm platforms"""
- homepage = "https://github.com/RadeonOpenCompute/rocm_bandwidth_test"
- git = "https://github.com/RadeonOpenCompute/rocm_bandwidth_test.git"
- url = "https://github.com/RadeonOpenCompute/rocm_bandwidth_test/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocm_bandwidth_test"
+ git = "https://github.com/ROCm/rocm_bandwidth_test.git"
+ url = "https://github.com/ROCm/rocm_bandwidth_test/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
version("master", branch="master")
+ version("6.2.4", sha256="4d25c62d81f60eba8042f57ca0905adc853a214333ffc70238d91e2f53606a79")
+ version("6.2.1", sha256="042cfe3adc0f0ad0b8620e361b2846eb57c7b54837ed7a8c3a773e6fdc4e1af4")
+ version("6.2.0", sha256="ca4caa4470c7ad0f1a4963072c1a25b0fd243844a72b26c83fcbca1e82091a41")
+ version("6.1.2", sha256="4259d53350d6731613d36c03593750547f84f084569f8017783947486b8189da")
+ version("6.1.1", sha256="01da756228f2bfb5e25ddb74b75a5939693b1b4f4559f37cfc85729e36a98450")
+ version("6.1.0", sha256="b06522efbd1a55247412c8f535321058e2463eab4abd25505c37e8c67941ae26")
+ version("6.0.2", sha256="af95fe84729701184aeb14917cee0d8d77ab1858ddcced01eb7380401e2134ae")
+ version("6.0.0", sha256="9023401bd6a896059545b8e6263c6730afd89d7d45c0f5866261c300415532a6")
version("5.7.1", sha256="7426ef1e317b8293e4d6389673cfa8c63efb3f7d061e2f50a6f0b1b706e2a2a7")
version("5.7.0", sha256="fa95c28488ab4bb6d920b9f3c316554ca340f44c87ec2efb4cf8fa488e63ddd9")
version("5.6.1", sha256="849af715d08dfd89e7aa5e4453b624151db1cafaa567ab5fa36a77948b90bf0d")
version("5.6.0", sha256="ae2f7263a21a3a650068f43e3112b2b765eea80a5af2297572f850c77f83c85e")
version("5.5.1", sha256="768b3da49fe7d4bb4e6536a8ee15be9f5e865d961e813ed4a407f32402685e1f")
version("5.5.0", sha256="1070ce14d45f34c2c6b2fb003184f3ae735ccfd640e9df1c228988b2a5a82949")
- version("5.4.3", sha256="a2f5a75bf47db1e39a4626a9f5cd2d120bcafe56b1baf2455d794f7a4734993e")
- version("5.4.0", sha256="47a1ef92e565d5ce7a167cc1ebe3d4198cc04d598b259426245b8c11eb795677")
- version("5.3.3", sha256="2bc079297e639d45d57c8017f6f47bc44d4ed34613ec76c80574bb703d79b498")
- version("5.3.0", sha256="a97365c04d79663db7c85027c63a12d56356abc0a351697f49c2d82bf9ef8999")
- version("5.2.3", sha256="b76fe33898d67ec1f5f1ec58adaea88e88ed28b1f5470aa4c08c347d8f558af2")
- version("5.2.1", sha256="ebdf868bef8ab6c7f32775ba6eab85cf3e078af1fc1b1a11fdbaad777f37a190")
- version("5.2.0", sha256="046f2a6984c62899f57a557490136fbe7ab28e2fd334750abac71b03609226ef")
- version("5.1.3", sha256="6a6e7fb998c886951db75dcf34dca523d9caaff8d0ccf2b7431504a1808b1ff3")
- version("5.1.0", sha256="18fe51f0ba61760fc89ffc81f737fd4fa20fb4b00df3f35145be77c3e0a6162b")
- version(
- "5.0.2",
- sha256="c93f7dbb37233aa32d81057fa8b3fa88d7c7be9b7916430b5ffc701600a5ff45",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="b33c6a12ad8de1d7ea9b8b380b8fa5db6b601ed426c3d3940134863f7d10740f",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="559ca7ef582d81047c5dd5a908f3989cb2694e89577f7f556214e324ba65e75e",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="4d20a6017ca6975df98f3ca61ba95fa0c7c62fbf63cd6abae3396c30a423933f",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="a4804c28586457c231594b4e7689872eaf91972119d892325468f3fe8fdbe5ef",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="c6eb406cd2836af61dd5987f6b761340a1be20f66a9325f480423d10b9d3ec1b",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="d268365e3bb8031c1201c05e705074d1fd794d236843f80064855cf31e4412f5",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="4e34b60a7e4090d6475f0cdd86594b1b9a7b85d4e343999b9e148e196f0c2f4c",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="bde2aa743979eac195dd13ec8d0fcb7da183fff489da32c28b872eed7f6681b3",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="ad1dedad9023ccb050082c866fa5131665d9c3b50de0b78e4618730c29a07773",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="f366299b48a29b419febb2ba398d1abe4cd01425d33254777e426966b722d3b1",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="7de71a2ba17bbeea9107f2e9e65729f507234d6cbbb44f251240d64683027497",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="9aa1d4b7b01ee4d443effc76ed5f6f43a051fd815692b59dfccf0ecbfeaeed03",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="fbb63fb8713617fd167d9c1501acbd92a6b189ee8e1a8aed668fa6666baae389",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="a2f5a75bf47db1e39a4626a9f5cd2d120bcafe56b1baf2455d794f7a4734993e")
+ version("5.4.0", sha256="47a1ef92e565d5ce7a167cc1ebe3d4198cc04d598b259426245b8c11eb795677")
+ version("5.3.3", sha256="2bc079297e639d45d57c8017f6f47bc44d4ed34613ec76c80574bb703d79b498")
+ version("5.3.0", sha256="a97365c04d79663db7c85027c63a12d56356abc0a351697f49c2d82bf9ef8999")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -136,12 +53,35 @@ class RocmBandwidthTest(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
build_targets = ["package"]
diff --git a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py
index 6961c15b80..6c23a9e084 100644
--- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py
+++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py
@@ -9,123 +9,37 @@ from spack.package import *
class RocmClangOcl(CMakePackage):
"""OpenCL compilation with clang compiler"""
- homepage = "https://github.com/RadeonOpenCompute/clang-ocl"
- git = "https://github.com/RadeonOpenCompute/clang-ocl.git"
- url = "https://github.com/RadeonOpenCompute/clang-ocl/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/clang-ocl"
+ git = "https://github.com/ROCm/clang-ocl.git"
+ url = "https://github.com/ROCm/clang-ocl/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
+ test_requires_compiler = True
+
license("MIT")
maintainers("srekolam", "renjithravindrankannath")
version("master", branch="master")
+ version("6.1.2", sha256="cc9942539b5e50b97fa0d2425ba93aae7223635fecba869d8f43b2c26f9482ae")
+ version("6.1.1", sha256="21b8a6d521a8e584e18851d27b5ef328a63ea7ee9eb3cc52508b9bfcf975e119")
+ version("6.1.0", sha256="c983adad49ab5850307db1282f8bc957b9870d4ce37db8fbb43c52db6c90d0ed")
+ version("6.0.2", sha256="a2f2fcb203737b1f436b4c2b78bbd696552f6de619ba0e7e8faf95a888869866")
+ version("6.0.0", sha256="74b5a64c32f3c57e7e4de638fffabbf448ecdb3dd8e65678b7ba0633352b4ca3")
version("5.7.1", sha256="32e4430d009cbbf5404ca9cbbb549b36897fa1826bc2285372e293cfe7531bf8")
version("5.7.0", sha256="c9ca80bfee674e740039256a846107373f1cf6554dc28398599976d8646a0392")
version("5.6.1", sha256="c41deb1b564d939fc897b2bbdb13570b2234fa4c052a39783f5ad2dd1052f901")
version("5.6.0", sha256="1afc47dee02d73c10de422f254067f4ef3ff921c4a1204d54ecc40e61fc63497")
version("5.5.1", sha256="bfa62ad14830e2bd5afbc346685216c69f8cbef0eb449954f793178e10b19a38")
version("5.5.0", sha256="43a5459165693301ba2ebcc41b2b0705df9a3a47571d43bdc2cc49cfdd0833a7")
- version("5.4.3", sha256="689e0354ea685bd488116de8eb902b902492e9ace184c3109b97b9a43f8b2d59")
- version("5.4.0", sha256="602f8fb1f36587543cc0ee95fd1938f8eeb03de79119101e128150332cc8d89c")
- version("5.3.3", sha256="549d5bf37507f67c5277abdeed4ec40b5d0edbfbb72907c685444c26b9ce6f8a")
- version("5.3.0", sha256="66b80ba050848ad921496bd894e740e66afad0ba1923b385f01f2eeae97999ad")
- version("5.2.3", sha256="9cdb387168975207314c08ba63ae7cd11f70542117a5390eddbec77ebb84bed0")
- version("5.2.1", sha256="693a9a360cb2f7e6910a6714df236df6a9d984f94b01712103a520d8e506c03f")
- version("5.2.0", sha256="a2059f6aeccc119abbd444cb37128e00e4854e22a88a47f120f8f8b947d862c5")
- version("5.1.3", sha256="e19ee15f26fc03309398ac73cc738508c0e1617deccfd667d369a3948b5d3552")
- version("5.1.0", sha256="38d9e2e98cff1a262fdd45c3239fd76a9f6ad5eff38a31aa19c3bb0faea53375")
- version(
- "5.0.2",
- sha256="5e8f39200227388817024ee7ce46a996e43e433ed308f8d5e8e4c03629d8a5e7",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="0dff230754b790a417eb3d6be6f50c3727f944e0157686100354eba1e47d30f3",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="8cc7b8658e81ef378c16bbb00fc6b29140c850da70adc4e520ecec9b4517beb8",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="b9ab42629c8697f8ffdae99ffd25f939161fa8a7a1c49a9ce19d8b207bedbbae",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="12461d4fd4f3f40710d2c041cfee37da83ccda9d2761d7708335349e7ec5ad87",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="bc5650f2f105b10a1e22d8e5cc9464b0f960252a08e5e1fdee222af1fc5c022c",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="702796f4e31f6119173d915db9bee13c060a75d9eb5b1f8e3d20779d6702dfdc",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="c6e65da5541df9ee940caeeffe1b87c92547edc1770538fd2010c9c998a593b5",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="c8f9091396ee0096f6d7c1cd13d80532c424e838bec1e4cebf903ebaf649e82e",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="17fc8fb8c38b18f9f0cac339dda6cea3e9e66805f7a92ec2456072fc1e72fa85",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="3d63c7ac259ba8b0bfd5e4a94df1490c2b6cbac4d43dc7bbc210a536251268fe",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="a829aa2efb6e3bc00d8a08a96404f937f3c8adf3b4922b5ac35050d6e08b912d",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="9c00c7e7dd3ac8326ae6772a43866b44ae049d5960ea6993d14a2370db74d326",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="38c95fbd0ac3d11d9bd224ad333b68b9620dde502b8a8a9f3d96ba642901e8bb",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="689e0354ea685bd488116de8eb902b902492e9ace184c3109b97b9a43f8b2d59")
+ version("5.4.0", sha256="602f8fb1f36587543cc0ee95fd1938f8eeb03de79119101e128150332cc8d89c")
+ version("5.3.3", sha256="549d5bf37507f67c5277abdeed4ec40b5d0edbfbb72907c685444c26b9ce6f8a")
+ version("5.3.0", sha256="66b80ba050848ad921496bd894e740e66afad0ba1923b385f01f2eeae97999ad")
depends_on("cmake@3.5:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -136,17 +50,32 @@ class RocmClangOcl(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
"master",
]:
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
-
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
# support both builtin and standalone device libs
- depends_on(
- "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver)
- )
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
test_src_dir = "test"
@@ -154,19 +83,13 @@ class RocmClangOcl(CMakePackage):
def cache_test_sources(self):
"""Copy the tests source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- if self.spec.satisfies("@:5.1.0"):
- return
- self.cache_extra_test_sources([self.test_src_dir])
+ cache_extra_test_sources(self, [self.test_src_dir])
- def test(self):
- if self.spec.satisfies("@:5.1.0"):
- print("Skipping: stand-alone tests")
- return
+ def test_make(self):
+ """Test make"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
- with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- prefixes = ";".join([self.spec["rocm-clang-ocl"].prefix])
- cc_options = ["-DCMAKE_PREFIX_PATH=" + prefixes, "."]
- self.run_test(cmake_bin, cc_options)
+ with working_dir(test_dir):
+ cmake = self.spec["cmake"].command
+ cmake("-DCMAKE_PREFIX_PATH=" + self.spec["rocm-clang-ocl"].prefix, ".")
+ make = which("make")
make()
- make("clean")
diff --git a/var/spack/repos/builtin/packages/rocm-cmake/package.py b/var/spack/repos/builtin/packages/rocm-cmake/package.py
index c14999a989..b4c97fbdfe 100644
--- a/var/spack/repos/builtin/packages/rocm-cmake/package.py
+++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py
@@ -11,9 +11,9 @@ class RocmCmake(CMakePackage):
"""rocm-cmake provides CMake modules for common build tasks
in the ROCm software stack"""
- homepage = "https://github.com/RadeonOpenCompute/rocm-cmake"
- git = "https://github.com/RadeonOpenCompute/rocm-cmake.git"
- url = "https://github.com/RadeonOpenCompute/rocm-cmake/archive/rocm-5.6.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocm-cmake"
+ git = "https://github.com/ROCm/rocm-cmake.git"
+ url = "https://github.com/ROCm/rocm-cmake/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -21,97 +21,47 @@ class RocmCmake(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("6.2.4", sha256="76bfac6fba31a9c4ec196d9b9b2d5ec51b8b68840b3fba8686aa42323d76a425")
+ version("6.2.1", sha256="5ea05ad58186ac9bac40ab083c1e769a36ecaed950f82e88863169a25bc6ac8f")
+ version("6.2.0", sha256="7b6aaa1bb616669636aa2cd5dbc7fdb7cd05642a8dcc61138e0efb7d0dc7e1a3")
+ version("6.1.2", sha256="0757bb90f25d6f1e6bc93bdd1e238f76bbaddf154d66f94f37e40c425dc6d259")
+ version("6.1.1", sha256="0eb81245f7573a3cadf9e91a854d9a0a014ce93610e4e7ea4d8309867a470bf6")
+ version("6.1.0", sha256="8b37d458e801b486521f12d18ca2103125173dd0f1130d37c8c36e795d34772b")
+ version("6.0.2", sha256="7bd3ff971b1a898b8cf06b0ed9fac45891e2523ae651c3194ba36050ab45f869")
+ version("6.0.0", sha256="82bd97ba23d1883ef38bb667e92f7367fedc50d6c11c82f54cced4ab04b0412d")
version("5.7.1", sha256="4a4c6aa09576ccb834f869bdcb49e98cc0f0bac3678b802358065d1179a9d6f1")
version("5.7.0", sha256="93b98144201a1143eeca32744a9927d063f4685189f132ba52a6f3bba158a86b")
version("5.6.1", sha256="98bf5fe2e6e12f55d122807d0060f1bb19c80d63d2c2f6fee579c40bfd244fa6")
version("5.6.0", sha256="a118ca937856a4d0039955a8aef2466ef1fd1f08f7f7221cda53e1b5d02e476a")
version("5.5.1", sha256="60113412b35d94e20e8100ed3db688c35801991b4b8fa282fdc6fd6fd413fb6e")
version("5.5.0", sha256="b7884c346737eba70ae11044e41598b2482a92e21f3e0719b1ca11619f02a20b")
- version("5.4.3", sha256="c185b3a10d191d73b76770ca0f9d6bdc355ee91fe0c9016a3779c9cfe042ba0f")
- version("5.4.0", sha256="617faa9a1e51db3c7a59bd0393e054ab67e57be357d59cb0cd9b677f47824946")
- version("5.3.3", sha256="3e527f99db52e301ab4f1b994029585951e2ae685f0cdfb7b8529c72f4b77af4")
- version("5.3.0", sha256="659a8327f13e6786103dd562d3632e89a51244548fca081f46c753857cf09d04")
- version("5.2.3", sha256="c63b707ec07d24fda5a2a6fffeda4df4cc04ceea5df3b8822cbe4e6600e358b4")
- version("5.2.1", sha256="3d179496fb8f5f96230f736a313990f66705dc91fd10948a3042b495a440bf63")
- version("5.2.0", sha256="be8646c4f7babfe9a103c97d0e9f369322f8ac6cfa528edacdbdcf7f3ef44943")
- version("5.1.3", sha256="19b2da0d56300aab454655b57435ab3ed9e101ecb96561336ea8865bbd993c23")
- version("5.1.0", sha256="2eff47b7cf5bd56d465ff3c110eb936d31860df60182a82ba511ba11bbcf23fc")
- version(
- "5.0.2",
- sha256="86a4ae0f84dcf5be95a252295eb732d6a7a271297eed37800a9d492c16474d0c",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="45eb958fac33aafea86fb498127ebf8f567646ce9d7288d46afbd087500553a1",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="85f2ef51327e4b09d81a221b4ad31c97923dabc1bc8ff127dd6c570742185751",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="c77b71454010adbeea5357773aa98dd0725f655f51a411815807cabf29258395",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="acf2a58e2cd486f473194bf01247c52dbf20bd5f6465810fb221470298f2557f",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="bb752d8d2727b7ef2754838e389075dd4212cf5439d099392141f93d05391415",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="299e190ec3d38c2279d9aec762469628f0b2b1867adc082edc5708d1ac785c3b",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="a4521d119fa07954e529d5e717ad1b338992c0694690dbce00fee26c01129c8c",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="4577487acaa6e041a1316145867584f31caaf0d4aa2dd8fd7f82f81c269cada6",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="751be4484efdcf0d5fa675480db6e2cddab897de4708c7c7b9fa7adb430b52d7",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="e0a8db85bb55acb549f360eb9b04f55104aa93e4c3db33f9ba11d9adae2a07eb",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="9e4be93c76631224eb49b2fa30b0d14c1b3311a6519c8b393da96ac0649d9f30",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="51abfb06124c2e0677c4d6f7fe83c22fe855cb21386f0053ace09f8ab297058b",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="5fc09e168879823160f5fdf4fd1ace2702d36545bf733e8005ed4ca18c3e910f",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="c185b3a10d191d73b76770ca0f9d6bdc355ee91fe0c9016a3779c9cfe042ba0f")
+ version("5.4.0", sha256="617faa9a1e51db3c7a59bd0393e054ab67e57be357d59cb0cd9b677f47824946")
+ version("5.3.3", sha256="3e527f99db52e301ab4f1b994029585951e2ae685f0cdfb7b8529c72f4b77af4")
+ version("5.3.0", sha256="659a8327f13e6786103dd562d3632e89a51244548fca081f46c753857cf09d04")
- depends_on("cmake@3:", type="build")
- depends_on("cmake@3.6:", type="build", when="@4.1.0:")
+ depends_on("cxx", type="build") # generated
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on("cmake@3.6:", type="build")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
test_src_dir = "test"
@@ -119,19 +69,15 @@ class RocmCmake(CMakePackage):
def cache_test_sources(self):
"""Copy the tests source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- if self.spec.satisfies("@:5.1.0"):
- return
- self.cache_extra_test_sources([self.test_src_dir])
+ cache_extra_test_sources(self, [self.test_src_dir])
- def test(self):
- if self.spec.satisfies("@:5.1.0"):
- print("Skipping: stand-alone tests")
- return
+ def test_cmake(self):
+ """Test cmake"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
prefixes = ";".join([self.spec["rocm-cmake"].prefix])
cc_options = ["-DCMAKE_PREFIX_PATH=" + prefixes, "."]
- self.run_test(cmake_bin, cc_options)
+ cmake = which(self.spec["cmake"].prefix.bin.cmake)
+ cmake(*cc_options)
make()
make("clean")
diff --git a/var/spack/repos/builtin/packages/rocm-core/package.py b/var/spack/repos/builtin/packages/rocm-core/package.py
index 9d6bca46b6..318fb7fb32 100644
--- a/var/spack/repos/builtin/packages/rocm-core/package.py
+++ b/var/spack/repos/builtin/packages/rocm-core/package.py
@@ -12,15 +12,22 @@ class RocmCore(CMakePackage):
It also provides the Lmod modules files for the ROCm release.
getROCmVersion function provides the ROCm version."""
- homepage = "https://github.com/RadeonOpenCompute/rocm-core"
- url = "https://github.com/RadeonOpenCompute/rocm-core/archive/refs/tags/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocm-core"
+ url = "https://github.com/ROCm/rocm-core/archive/refs/tags/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["librocm-core"]
license("MIT")
-
+ version("6.2.4", sha256="46dcfb5d20d242cd0ce6d02ba64d92bdd3ea59c103cf47b665c7d7a4ea7dc7f1")
+ version("6.2.1", sha256="35cb5f6dfb1847469930bf0fa0913499b6c3f59b2b573a9f598b0956104ba5e2")
+ version("6.2.0", sha256="9bafaf801721e98b398624c8d2fa78618d297d6800f96113e26c275889205526")
+ version("6.1.2", sha256="ce9cbe12977f2058564ecb4cdcef4fd0d7880f6eff8591630f542441092f4fa3")
+ version("6.1.1", sha256="a27bebdd1ba9d387f33b82a67f64c55cb565b482fe5017d5b5726d68da1ab839")
+ version("6.1.0", sha256="9dfe542d1647c42993b06f594c316dad63ba6d6fb2a7398bd72c5768fd1d7b5b")
+ version("6.0.2", sha256="04f01dca2862f0bf781de8afb74aabefc3c9b1d9f01bc8cadb2eb3d7395119cc")
+ version("6.0.0", sha256="d950ee4b63336f34579b6e1dda2d05966b7afa9c84bcdc13874991d1147dc788")
version("5.7.1", sha256="fc4915019ddfd126e8ef6a15006bce3aa7bd5fd11dc8eb04ce2ee6bdf9c6ae7f")
version("5.7.0", sha256="722689bfec46c35f5428a41c5aacfc31efec2294fc3b0112861c562f8a71ac93")
version("5.6.1", sha256="eeef75e16e05380ccbc8df17a02dc141a66dddaadb444a97f7278f78067c498c")
@@ -28,6 +35,26 @@ class RocmCore(CMakePackage):
version("5.5.1", sha256="bc73060432ffdc2e210394835d383890b9652476074ef4708d447473f273ce76")
version("5.5.0", sha256="684d3312bb14f05dc280cf136f5eddff38ba340cd85c383d6a217d8e27d3d57d")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("cxx", type="build") # generated
+
+ for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on("llvm-amdgpu", when=f"@{ver}+asan")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", self.spec["llvm-amdgpu"].prefix + "/bin/clang")
+ env.set("CXX", self.spec["llvm-amdgpu"].prefix + "/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+
def cmake_args(self):
args = [self.define("ROCM_VERSION", self.spec.version)]
return args
diff --git a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py
index 92b4ec72a9..f146a614e4 100644
--- a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py
+++ b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py
@@ -14,126 +14,49 @@ class RocmDbgapi(CMakePackage):
control of the execution and inspection of execution state of
AMD's commercially available GPU architectures."""
- homepage = "https://github.com/ROCm-Developer-Tools/ROCdbgapi"
- git = "https://github.com/ROCm-Developer-Tools/ROCdbgapi.git"
- url = "https://github.com/ROCm-Developer-Tools/ROCdbgapi/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCdbgapi"
+ git = "https://github.com/ROCm/ROCdbgapi.git"
+ url = "https://github.com/ROCm/ROCdbgapi/archive/rocm-6.2.1.tar.gz"
tags = ["rocm"]
- maintainers("srekolam", "renjithravindrankannath")
+ maintainers("srekolam", "renjithravindrankannath", "afzpatel")
libraries = ["librocm-dbgapi"]
license("MIT")
version("master", branch="amd-master")
+ version("6.2.4", sha256="004e9ace3ead840e44f98fc033b621d5489a554965deecfdb7df768482068282")
+ version("6.2.1", sha256="40064ca031e41ff3c87bfa31406b7192fa65709ab36734eddad87e0ecc01bb80")
+ version("6.2.0", sha256="311811ce0970ee83206791c21d539f351ddeac56ce3ff7efbefc830038748c0c")
+ version("6.1.2", sha256="6e55839e3d95c2cfe3ff89e3e31da77aeecc74012a17f5308589e8808df78026")
+ version("6.1.1", sha256="425a6cf6a3942c2854c1f5e7717bed906cf6c3753b46c44476f54bfef6188dac")
+ version("6.1.0", sha256="0985405b6fd44667a7ce8914aa39a7e651613e037e649fbdbfa2adcf744a2d50")
+ version("6.0.2", sha256="39036f083de421f46afd8d3a8799576242ef64002643d7185767ccbba41ae854")
+ version("6.0.0", sha256="4e823eba255e46b93aff05fd5938ef2a51693ffd74debebffc1aabfce613805c")
version("5.7.1", sha256="0ee9c2f083868849f2ea0cec7010e0270c27e7679ccbbadd12072cc0ef6c8a6f")
version("5.7.0", sha256="285ddded8e7f1981d8861ffc1cd7770b78129e4955da08ad55a4779945699716")
version("5.6.1", sha256="c7241bf94bdb97a4cf1befbf25b8c35720797710da6f6b5b9d6a4094c1bc9c8b")
version("5.6.0", sha256="9b66e47f4eccb3c8bbc324aade92aac6139539dda449427b7823d0c45341afc8")
version("5.5.1", sha256="c41dfc62591bcf42003fe744d8bd03a51311d54e4b012f946ca0ede0c14dd977")
version("5.5.0", sha256="ce572340a3fe99e4f1538eb614933153456003f8dfe9306a5735cdd25b451e25")
- version("5.4.3", sha256="d647c9121a50f2c54367c567d8f39a145cb135e1ceed931581659f57f49f61e5")
- version("5.4.0", sha256="895eb7056864daada40c3f9cd37645b0bdf4b6dc408b5f8cc974fc4cd9ab7ccb")
- version("5.3.3", sha256="3c81cb23fe671d391557a63c13b6a13d4dc367db5cb5de55592a6758284d8a3f")
- version("5.3.0", sha256="afffec78e34fe70952cd41efc3d7ba8f64e43acb2ad20aa35c9b8b591bed48ca")
- version("5.2.3", sha256="17925d23f614ecb2b40dffe5e14535cba380d4f489ea1a027762c356be9fbc2b")
- version("5.2.1", sha256="169e3914ebd99d6a5c034c568964b7bad56611262e292f77c0c65a7708e02376")
- version("5.2.0", sha256="44f0528a7583bc59b6585166d2289970b20115c4c70e3bcc218aff19fc242b3f")
- version("5.1.3", sha256="880f80ebf741e3451676837f720551e02cffd0b9346ca4dfa6cf7f7043282f2b")
- version("5.1.0", sha256="406db4b20bda12f6f32cbef88b03110aa001bf7bef6676f36e909b53c8354e43")
- version(
- "5.0.2",
- sha256="b7554dfe96bda6c2ee762ad6e3e5f91f0f52b5a525e3fb29d5e1fe6f003652b5",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="cff72d7fe43ff791c4117fe87d57314cbebdbcb70002a0411b8a44761012a495",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="9fa574e8389ef69d116caf714af2f938777e0aeeaadd7fad451cf5d2e6699c6e",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="583bbf18df593f376c4cc70f25b68c191bd38fde20a336c0f5c8e5d85fda2fcf",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="dddf2549ad6bb806f7e5d5a5336f5a00fe87a124f2a778be18ec4dc41f891912",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="4255d83d218bb0db8be9fef18e03a955ea1c6de1c635c31685ee5fc1540ddde6",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="fcdee5aaf5ed40c0377ce007a2947da9e718eeee86ca3e13192ff9e96a1b7373",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="d04fd9b2005691313547c4134b027b56b0ec6089f67d3bccbdb8fb1c92cde9bd",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="e87f31b3a22861397eb62d8363dd1e153596097ccfe68c6eefc1a83a2432ae18",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="89a8d352d59e4c0dc13160b1bf1f4bc3bfec5af544050030aa619b1ff88f1850",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="d1553f89d2b0419304ea82ed2b97abdc323c2fed183f0e119da1a72416a48136",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="760ff77c6578f3548f367a8bd3dda8680b7519f6b20216755105b87785d1e3f8",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="bdeaf81ea8a0ac861a697e435c72cbe767c291638be43f0d09116ad605dfee4f",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="eeba0592bc79b90e5b874bba18fd003eab347e8a3cc80343708f8d19e047e87b",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="d647c9121a50f2c54367c567d8f39a145cb135e1ceed931581659f57f49f61e5")
+ version("5.4.0", sha256="895eb7056864daada40c3f9cd37645b0bdf4b6dc408b5f8cc974fc4cd9ab7ccb")
+ version("5.3.3", sha256="3c81cb23fe671d391557a63c13b6a13d4dc367db5cb5de55592a6758284d8a3f")
+ version("5.3.0", sha256="afffec78e34fe70952cd41efc3d7ba8f64e43acb2ad20aa35c9b8b591bed48ca")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("hwdata", when="@5.5.0:")
+ depends_on("pciutils", when="@5.5.0:")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -144,24 +67,45 @@ class RocmDbgapi(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("hsa-rocr-dev@" + ver, type="build", when="@" + ver)
- depends_on("comgr@" + ver, type=("build", "link"), when="@" + ver)
+ depends_on(f"hsa-rocr-dev@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", type=("build", "link"), when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def patch(self):
filter_file(
@@ -170,8 +114,19 @@ class RocmDbgapi(CMakePackage):
"CMakeLists.txt",
)
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+
def cmake_args(self):
args = []
if self.spec.satisfies("@5.3.0:"):
- args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+ args.append(self.define("CMAKE_INSTALL_LIBDIR", "lib"))
+ if self.spec.satisfies("@5.5.0:"):
+ args.append(self.define("PCI_IDS_PATH", self.spec["pciutils"].prefix.share))
return args
diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py
index 5f95ebf8e4..4febed99a9 100644
--- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py
+++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py
@@ -11,131 +11,45 @@ from spack.package import *
class RocmDebugAgent(CMakePackage):
"""Radeon Open Compute (ROCm) debug agent"""
- homepage = "https://github.com/ROCm-Developer-Tools/rocr_debug_agent"
- git = "https://github.com/ROCm-Developer-Tools/rocr_debug_agent.git"
- url = "https://github.com/ROCm-Developer-Tools/rocr_debug_agent/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocr_debug_agent"
+ git = "https://github.com/ROCm/rocr_debug_agent.git"
+ url = "https://github.com/ROCm/rocr_debug_agent/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["librocm-debug-agent"]
+ version("6.2.4", sha256="a4f213a9e28a1e82543135c0b6d16c5a252186f83fc842f980631943f7e11398")
+ version("6.2.1", sha256="933223ff6e0aefb54917f4102ac6679dcd67e25ade4bce5e49f5212f45e3bae5")
+ version("6.2.0", sha256="a4b839c47b8a1cd8d00c3577eeeea04d3661210eb8124e221d88bcbedc742363")
+ version("6.1.2", sha256="c7cb779915a3d61e39d92cef172997bcf5eae720308f6d9c363a2cbc71b5621c")
+ version("6.1.1", sha256="c631281b346bab9ec3607c59404f548f7cba084a05e9c9ceb3c3579c48361ad1")
+ version("6.1.0", sha256="f52700563e490d662b505693d485272d73521aabff306107586dd1149fb4a70e")
+ version("6.0.2", sha256="da8da1241a6cbb9d0b2a3b81829faf632225a7a27ca881c9715b9f05bca54c89")
+ version("6.0.0", sha256="705be2c2bd0f5c7d1e286eb9b94045b2bd017ff323f07bca9aa7c81f2d168524")
version("5.7.1", sha256="3b8d2835935da98f41e7cfc5b808c596ac06dd705b9a07bb70283e002f8dea6a")
version("5.7.0", sha256="d9344ed02e82a01140f2162e901e6a519e5fee6b498e2f49417730ee2660c5c1")
version("5.6.1", sha256="d3b1d5d757489ed3cc66d351cec56b7b850aaa7ecf6a55b0350b89c3dee3153a")
version("5.6.0", sha256="0bed788f07906afeb9092d0bec184a7963233ac9d8ccd20b4afeb624a1d20698")
version("5.5.1", sha256="1bb66734f11bb57df6efa507f0217651446653bf28b3ca36acfcf94511a7c2bc")
version("5.5.0", sha256="4f2431a395a77a06dc417ed1e9188731b031a0c680e62c6eee19d60965317f5a")
- version("5.4.3", sha256="b2c9ac198ea3cbf35e7e80f57c5d81c461de78b821d07b637ea4037a65cdf49f")
- version("5.4.0", sha256="94bef73ea0a6d385dab2292ee591ca1dc268a5585cf9f1b5092a1530949f575e")
- version("5.3.3", sha256="7170312d08e91334ee03586aa1f23d67f33d9ec0df25a5556cbfa3f210b15b06")
- version("5.3.0", sha256="8dfb6aa442ce136207c0c089321c8099042395977b4a488e4ca219661df0cd78")
- version("5.2.3", sha256="5d31372e2980738271ae26b92dcc402c387cdf5f23710ce6feeb2bd303ff7ea0")
- version("5.2.1", sha256="a60c224c546a25dafcff1e50ce3a1605e152efdb36624a672ddb5812cd34773e")
- version("5.2.0", sha256="f8e8d5ad691033d0c0f1850d69f35c98ba9722ab4adc66c4251f22257f56f0a2")
- version("5.1.3", sha256="ef26130829f3348d503669467ab1ea39fb67d943d88d64e7ac04b9617ec6067d")
- version("5.1.0", sha256="e0ceeef575d8645385bc6e4c9c3accaa192a93c42d83545cf5626c848f59806b")
- version(
- "5.0.2",
- sha256="4ec3cdedc4ba774d05c3dc972186b3181b3aa823af08f3843238961d5ef90e57",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="fb8ebe136bfa815116453bdcb4afb9617ab488f54501434c72eed9706857be3f",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="85c7f19485defd9a58716fffdd1a0e065ed7f779c3f124467fca18755bc634a6",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="6486b1a8515da4711d3c85f8e41886f8fe6ba37ca2c63664f00c811f6296ac20",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="7bee6be6c29883f03f47a8944c0d50b7cf43a6b5eeed734602f521c3c40a18d0",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="0cdee5792b808e03b839070da0d1b08dc4078a7d1fc295f0c99c6a5ae7d636a6",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="ce02a5b752291882daa0a2befa23944e59087ce9fe65a91061476c3c399e4a0c",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="b1ae874887e5ee037070f1dd46b145ad02ec9fd8a724c6b6ae194b534f01acdb",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="a9e64834d56a9221c242e71aa110c2cef0087aa8f86f50428dd618e5e623cc3c",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="675b8d3cc4aecc4428a93553abf664bbe6a2cb153f1f480e6cadeeb4d24ef4b1",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="3e56bf8b2b53d9102e8709b6259deea52257dc6210df16996b71a7d677952b1b",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="55243331ac4b0d90e88882eb29fd06fad354e278f8a34ac7f0680b2c895ca2ac",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="d0f442a2b224a734b0080c906f0fc3066a698e5cde9ff97ffeb485b36d2caba1",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="203ccb18d2ac508aae40bf364923f67375a08798b20057e574a0c5be8039f133",
- deprecated=True,
- )
-
- def url_for_version(self, version):
- url = "https://github.com/ROCm-Developer-Tools/rocr_debug_agent/archive/"
- if version <= Version("3.7.0"):
- url += "roc-{0}.tar.gz".format(version)
- else:
- url += "rocm-{0}.tar.gz".format(version)
-
- return url
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="b2c9ac198ea3cbf35e7e80f57c5d81c461de78b821d07b637ea4037a65cdf49f")
+ version("5.4.0", sha256="94bef73ea0a6d385dab2292ee591ca1dc268a5585cf9f1b5092a1530949f575e")
+ version("5.3.3", sha256="7170312d08e91334ee03586aa1f23d67f33d9ec0df25a5556cbfa3f210b15b06")
+ version("5.3.0", sha256="8dfb6aa442ce136207c0c089321c8099042395977b4a488e4ca219661df0cd78")
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("elfutils@:0.168", type="link")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -146,81 +60,60 @@ class RocmDebugAgent(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-dbgapi@{ver}", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
for ver in [
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
"5.5.0",
"5.5.1",
"5.6.0",
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-dbgapi@" + ver, when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
-
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
- # https://github.com/ROCm-Developer-Tools/rocr_debug_agent/pull/4
- patch("0001-Drop-overly-strict-Werror-flag.patch", when="@3.7.0:")
- patch("0002-add-hip-architecture.patch", when="@3.9.0:")
+ # https://github.com/ROCm/rocr_debug_agent/pull/4
+ patch("0001-Drop-overly-strict-Werror-flag.patch")
+ patch("0002-add-hip-architecture.patch")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
- @property
- def root_cmakelists_dir(self):
- if self.spec.satisfies("@3.5.0"):
- return "src"
- else:
- return self.stage.source_path
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
def cmake_args(self):
spec = self.spec
- args = []
-
- if spec.satisfies("@3.5.0"):
- args.append(
- "-DCMAKE_PREFIX_PATH={0}/include/hsa;{1}/include,".format(
- spec["hsa-rocr-dev"].prefix, spec["hsakmt-roct"].prefix
- )
- )
-
- if spec.satisfies("@3.7.0:5.1"):
- args.append(self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.cmake))
- elif spec.satisfies("@5.2.0:"):
- args.append(self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.lib.cmake.hip))
+ args = [self.define("CMAKE_MODULE_PATH", spec["hip"].prefix.lib.cmake.hip)]
return args
diff --git a/var/spack/repos/builtin/packages/rocm-device-libs/package.py b/var/spack/repos/builtin/packages/rocm-device-libs/package.py
index b83682d120..7a81736be4 100644
--- a/var/spack/repos/builtin/packages/rocm-device-libs/package.py
+++ b/var/spack/repos/builtin/packages/rocm-device-libs/package.py
@@ -10,105 +10,49 @@ from spack.package import *
class RocmDeviceLibs(CMakePackage):
"""set of AMD specific device-side language runtime libraries"""
- homepage = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs"
- git = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git"
- url = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCm-Device-Libs"
+ git = "https://github.com/ROCm/ROCm-Device-Libs.git"
+
+ def url_for_version(self, version):
+ if version <= Version("6.0.2"):
+ url = "https://github.com/ROCm/ROCm-Device-Libs/archive/rocm-{0}.tar.gz"
+ else:
+ url = "https://github.com/ROCm/llvm-project/archive/rocm-{0}.tar.gz"
+ return url.format(version)
+
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "haampie")
version("master", branch="amd-stg-open")
+ version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528")
+ version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7")
+ version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200")
+ version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097")
+ version("6.1.1", sha256="f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d")
+ version("6.1.0", sha256="6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34")
+ version("6.0.2", sha256="c6d88b9b46e39d5d21bd5a0c1eba887ec473a370b1ed0cebd1d2e910eedc5837")
+ version("6.0.0", sha256="198df4550d4560537ba60ac7af9bde31d59779c8ec5d6309627f77a43ab6ef6f")
version("5.7.1", sha256="703de8403c0bd0d80f37c970a698f10f148daf144d34f982e4484d04f7c7bbef")
version("5.7.0", sha256="0f8780b9098573f1c456bdc84358de924dcf00604330770a383983e1775bf61e")
version("5.6.1", sha256="f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c")
version("5.6.0", sha256="efb5dcdca9b3a9fbe408d494fb4a23e0b78417eb5fa8eebd4a5d226088f28921")
version("5.5.1", sha256="3b5f6dd85f0e3371f6078da7b59bf77d5b210e30f1cc66ef1e2de6bbcb775833")
version("5.5.0", sha256="5ab95aeb9c8bed0514f96f7847e21e165ed901ed826cdc9382c14d199cbadbd3")
- version("5.4.3", sha256="f4f7281f2cea6d268fcc3662b37410957d4f0bc23e0df9f60b12eb0fcdf9e26e")
- version("5.4.0", sha256="d68813ded47179c39914c8d1b76af3dad8c714b10229d1e2246af67609473951")
- version("5.3.3", sha256="963c9a0561111788b55a8c3b492e2a5737047914752376226c97a28122a4d768")
- version("5.3.0", sha256="f7e1665a1650d3d0481bec68252e8a5e68adc2c867c63c570f6190a1d2fe735c")
- version("5.2.3", sha256="16b7fc7db4759bd6fb54852e9855fa16ead76c97871d7e1e9392e846381d611a")
- version("5.2.1", sha256="e5855387ce73ed483ed0d03dbfef31f297c6ca66cf816f6816fd5ee373fc8225")
- version("5.2.0", sha256="901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c")
- version("5.1.3", sha256="c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e")
- version("5.1.0", sha256="47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f")
- version(
- "5.0.2",
- sha256="49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="e82cc9a8eb7d92de02cabb856583e28f17a05c8cf9c97aec5275608ef1a38574",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="b3a114180bf184b3b829c356067bc6a98021d52c1c6f9db6bc57272ebafc5f1d",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="dce3a4ba672c4a2da4c2260ee4dc96ff6dd51877f5e7e1993cb107372a35a378",
- deprecated=True,
- )
-
- depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
- depends_on("cmake@3.4.3:", type="build")
-
- depends_on("zlib-api", type="link", when="@3.9.0:")
- depends_on("texinfo", type="link", when="@3.9.0:")
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="f4f7281f2cea6d268fcc3662b37410957d4f0bc23e0df9f60b12eb0fcdf9e26e")
+ version("5.4.0", sha256="d68813ded47179c39914c8d1b76af3dad8c714b10229d1e2246af67609473951")
+ version("5.3.3", sha256="963c9a0561111788b55a8c3b492e2a5737047914752376226c97a28122a4d768")
+ version("5.3.0", sha256="f7e1665a1650d3d0481bec68252e8a5e68adc2c867c63c570f6190a1d2fe735c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("cmake@3.13.4:", type="build")
+
+ depends_on("zlib-api", type="link")
+ depends_on("texinfo", type="link")
depends_on("rocm-cmake@3.5.0:", type="build")
@@ -117,25 +61,6 @@ class RocmDeviceLibs(CMakePackage):
depends_on("llvm-amdgpu ~rocm-device-libs")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -146,12 +71,42 @@ class RocmDeviceLibs(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ @property
+ def root_cmakelists_dir(self):
+ if self.spec.satisfies("@:6.0"):
+ return "."
+ else:
+ return join_path("amd", "device-libs")
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/rocm-gdb/package.py b/var/spack/repos/builtin/packages/rocm-gdb/package.py
index 8c29704b29..65ab1b77f8 100644
--- a/var/spack/repos/builtin/packages/rocm-gdb/package.py
+++ b/var/spack/repos/builtin/packages/rocm-gdb/package.py
@@ -11,98 +11,36 @@ class RocmGdb(AutotoolsPackage):
"""This is ROCmgdb, the ROCm source-level debugger for Linux,
based on GDB, the GNU source-level debugger."""
- homepage = "https://github.com/ROCm-Developer-Tools/ROCgdb/"
- url = "https://github.com/ROCm-Developer-Tools/ROCgdb/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCgdb"
+ url = "https://github.com/ROCm/ROCgdb/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
license("LGPL-2.0-or-later")
maintainers("srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="061d00f3d02ca64094008c5da185712712ccd3a922f6e126d5f203cdae2b9e04")
+ version("6.2.1", sha256="bed312c3fbb9982166538036bb9fd4a75053117c65ba80e34dbdae629a8fe6e4")
+ version("6.2.0", sha256="753fd4f34d49fb0297b01dca2dd7cdf12cd039caa622a5f2d153362d27a8659c")
+ version("6.1.2", sha256="19208de18d503e1da79dc0c9085221072a68e299f110dc836204364fa1b532cc")
+ version("6.1.1", sha256="3d982abc130a286d227948aca5783f2e4507ef4275be21dad0914e37217ba19e")
+ version("6.1.0", sha256="e90d855ca4c1478acf143d45ff0811e7ecd068711db155de6d5f3593cdef6230")
+ version("6.0.2", sha256="69b7c3d63435e7d99088980498c68422e52b69244d10a3a62541633e733286e0")
+ version("6.0.0", sha256="0db4ab32ca729e69688cdb238df274ce5cf58b5cb2538584662cca4358708c2b")
version("5.7.1", sha256="5cd150b5796aea9d77efd43b89d30a34fa4125338179eb87c6053abcac9f3c62")
version("5.7.0", sha256="94fba57b2f17b593de61f7593b404fabc00b054d38567be57d12cf7654b7969a")
version("5.6.1", sha256="d2b40d4c5aa41a6ce2a84307627b30d16a458672e03e13f9d27c12f2dc3f21d6")
version("5.6.0", sha256="997ef1883aac2769552bc7082c70b837f4e98b57d24c133cea52b9c92fb0dee1")
version("5.5.1", sha256="359258548bc7e6abff16bb13c301339fb96560b2b961433c9e0712e4aaf2d9e1")
version("5.5.0", sha256="d3b100e332facd9635e328f5efd9f0565250edbe05be986baa2e0470a19bcd79")
- version("5.4.3", sha256="28c1ce39fb1fabe61f86f6e3c6940c10f9a8b8de77f7bb4fdd73b04e172f85f6")
- version("5.4.0", sha256="7ee984d99818da04733030b140c1f0929639bc719a5e418d53cc2c2a8cbc9a79")
- version("5.3.3", sha256="9fc3ccd9378ad40f2f0c9577bc400cc9a202d0ae4656378813b67653b9023c46")
- version("5.3.0", sha256="402537baf0779cae586d608505e81173ba85f976fe993f1633e3afe81669350f")
- version("5.2.3", sha256="c2df5cccd8bb07ea331b45091fb3141999a37a67696d273f3888b48f6d4281aa")
- version("5.2.1", sha256="77169d88f24e6ccb6aef3945448b179edffe806a51a3e996236b08fb510f3979")
- version("5.2.0", sha256="70c5b443292b9bb114844eb63b72cfab1b65f083511ee39d55db7a633c63bf5a")
- version("5.1.3", sha256="81f5e368facdcc424a37cb5809f0b436bedb9a6d9af4d17785b3c446ab0a7821")
- version("5.1.0", sha256="cf638149b269f838aaec59c5801098b9c0fc42f6c86a39309a8995b56978b424")
- version(
- "5.0.2",
- sha256="0eced8cd5a2996cb4bcf254f2bd9defe24112d21c2f750e98f784ecdf94ba5c9",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="aa311fb557bd95e35c6e4dfd245188f35c294a93bacb77fe4d3b178b1d0097e8",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="e278abf50f1758ce396b26a6719d0af09a6053c195516a44ec9b2be925d79203",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="dd37c8b1ea6bb41b1263183637575d7bf4746cabc573dbff888e23b0379877b0",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="995756a24b1e1510647dac1476a3a9a8e3af8e9fd9f4af1d00dd2db28e7a4ef2",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="8ee0667ab2cd91b2cc41d3a7af046d36a6b4e2007f050265aa65e0aedec83fd7",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="4bc579584a1f8614111e7e44d8aa1c6d5d06be3f5db055aba2cf1abc140122ac",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="28dc806e48695d654d52fb1a634df6d4c1243f00846ae90161e7a5e9f4d88b24",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="b90291b0a8409fe66d8a65d2731dcb87b9f5a22bac9ce3ffbab726eb129ba13d",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="05455cb47dd42404ee8bba047def6a6846a7e877e7a7db8dcffc7100d5ba16f0",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="0765c96439c0efa145418d210d865b9faed463466d7522274959cc4476a37097",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="a7c11dc30c952587c616bf7769bad603c3bf80522afc8b73ccda5b78d27bed41",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="28c1ce39fb1fabe61f86f6e3c6940c10f9a8b8de77f7bb4fdd73b04e172f85f6")
+ version("5.4.0", sha256="7ee984d99818da04733030b140c1f0929639bc719a5e418d53cc2c2a8cbc9a79")
+ version("5.3.3", sha256="9fc3ccd9378ad40f2f0c9577bc400cc9a202d0ae4656378813b67653b9023c46")
+ version("5.3.0", sha256="402537baf0779cae586d608505e81173ba85f976fe993f1633e3afe81669350f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("texinfo", type="build")
@@ -113,28 +51,11 @@ class RocmGdb(AutotoolsPackage):
depends_on("python", type=("build", "link"))
depends_on("zlib-api", type="link")
depends_on("babeltrace@1.2.4", type="link")
- depends_on("gmp", type=("build", "link"), when="@4.5.0:")
+ depends_on("gmp", type=("build", "link"))
+ depends_on("mpfr", type=("build", "link"))
+ depends_on("pkgconfig", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -145,12 +66,35 @@ class RocmGdb(AutotoolsPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-dbgapi@" + ver, type="link", when="@" + ver)
- depends_on("comgr@" + ver, type="link", when="@" + ver)
+ depends_on(f"rocm-dbgapi@{ver}", type="link", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", type="link", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
build_directory = "spack-build"
@@ -160,7 +104,7 @@ class RocmGdb(AutotoolsPackage):
# Distributor options
"--program-prefix=roc",
"--enable-64-bit-bfd",
- "--with-bugurl=https://github.com/ROCm-Developer-Tools/ROCgdb/issues",
+ "--with-bugurl=https://github.com/ROCm/ROCgdb/issues",
"--with-pkgversion=-ROCm",
"--enable-targets=x86_64-linux-gnu,amdgcn-amd-amdhsa",
"--disable-ld",
diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py
index d1fa495090..29bb97ca00 100644
--- a/var/spack/repos/builtin/packages/rocm-opencl/package.py
+++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py
@@ -5,6 +5,7 @@
import os
import re
+import sys
from spack.package import *
@@ -12,8 +13,8 @@ from spack.package import *
class RocmOpencl(CMakePackage):
"""OpenCL: Open Computing Language on ROCclr"""
- homepage = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
- git = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git"
+ homepage = "https://github.com/ROCm/ROCm-OpenCL-Runtime"
+ git = "https://github.com/ROCm/ROCm-OpenCL-Runtime.git"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
@@ -24,100 +25,52 @@ class RocmOpencl(CMakePackage):
return (
"https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-3.5.0.tar.gz"
)
-
- url = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz"
+ elif version <= Version("5.6.1"):
+ url = (
+ "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz"
+ )
+ else:
+ url = "https://github.com/ROCm/clr/archive/refs/tags/rocm-{0}.tar.gz"
return url.format(version)
license("MIT")
version("master", branch="main")
+ version("6.2.4", sha256="0a3164af7f997a4111ade634152957378861b95ee72d7060eb01c86c87208c54")
+ version("6.2.1", sha256="e9cff3a8663defdbda833d49c9e7160171eca14dc285ffe4061378607d6c890d")
+ version("6.2.0", sha256="620e4c6a7f05651cc7a170bc4700fef8cae002420307a667c638b981d00b25e8")
+ version("6.1.2", sha256="1a1e21640035d957991559723cd093f0c7e202874423667d2ba0c7662b01fea4")
+ version("6.1.1", sha256="2db02f335c9d6fa69befcf7c56278e5cecfe3db0b457eaaa41206c2585ef8256")
+ version("6.1.0", sha256="49b23eef621f4e8e528bb4de8478a17436f42053a2f7fde21ff221aa683205c7")
+ version("6.0.2", sha256="cb8ac610c8d4041b74fb3129c084f1e7b817ce1a5a9943feca1fa7531dc7bdcc")
+ version("6.0.0", sha256="798b55b5b5fb90dd19db54f136d8d8e1da9ae1e408d5b12b896101d635f97e50")
+ version("5.7.1", sha256="c78490335233a11b4d8a5426ace7417c555f5e2325de10422df06c0f0f00f7eb")
+ version("5.7.0", sha256="bc2447cb6fd86dff6a333b04e77ce85755104d9011a14a044af53caf02449573")
version("5.6.1", sha256="ec26049f7d93c95050c27ba65472736665ec7a40f25920a868616b2970f6b845")
version("5.6.0", sha256="52ab260d00d279c2a86c353901ffd88ee61b934ad89e9eb480f210656705f04e")
version("5.5.1", sha256="a8a62a7c6fc5398406d2203b8cb75621a24944688e545d917033d87de2724498")
version("5.5.0", sha256="0df9fa0b8aa0c8e6711d34eec0fdf1ed356adcd9625bc8f1ce9b3e72090f3e4f")
- version("5.4.3", sha256="b0f8339c844a2e62773bd85cd1e7c5ecddfe71d7c8e8d604e1a1d60900c30873")
- version("5.4.0", sha256="a294639478e76c75dac0e094b418f9bd309309b07faf6af126cdfad9aab3c5c7")
- version("5.3.3", sha256="cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f")
- version("5.3.0", sha256="d251e2efe95dc12f536ce119b2587bed64bbda013969fa72be58062788044a9e")
- version("5.2.3", sha256="932ea3cd268410010c0830d977a30ef9c14b8c37617d3572a062b5d4595e2b94")
- version("5.2.1", sha256="eb4ff433f8894ca659802f81792646034f8088b47aca6ad999292bcb8d6381d5")
- version("5.2.0", sha256="80f73387effdcd987a150978775a87049a976aa74f5770d4420847b004dd59f0")
- version("5.1.3", sha256="44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31")
- version("5.1.0", sha256="362d81303048cf7ed5d2f69fb65ed65425bc3da4734fff83e3b8fbdda51b0927")
- version(
- "5.0.2",
- sha256="3edb1992ba28b4a7f82dd66fbd121f62bd859c1afb7ceb47fa856bd68feedc95",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="2aa3a628b336461f83866c4e76225ef5338359e31f802987699d6308515ae1be",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="96b43f314899707810db92149caf518bdb7cf39f7c0ad86e98ad687ffb0d396d",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="7f98f7d4707b4392f8aa7017aaca9e27cb20263428a1a81fb7ec7c552e60c4ca",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="d37bddcc6835b6c0fecdf4d02c204ac1d312076f3eef2b1faded1c4c1bc651e9",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="18133451948a83055ca5ebfb5ba1bd536ed0bcb611df98829f1251a98a38f730",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="0729e6c2adf1e3cf649dc6e679f9cb936f4f423f4954ad9852857c0a53ef799c",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="d43ea5898c6b9e730b5efabe8367cc136a9260afeac5d0fe85b481d625dd7df1",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="3aa9dc5a5f570320b04b35ee129ce9ff21062d2770df934c6c307913f975e93d",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="286ff64304905384ce524cd8794c28aee216befd6c9267d4187a12e5a21e2daf",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="b0f8339c844a2e62773bd85cd1e7c5ecddfe71d7c8e8d604e1a1d60900c30873")
+ version("5.4.0", sha256="a294639478e76c75dac0e094b418f9bd309309b07faf6af126cdfad9aab3c5c7")
+ version("5.3.3", sha256="cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f")
+ version("5.3.0", sha256="d251e2efe95dc12f536ce119b2587bed64bbda013969fa72be58062788044a9e")
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
depends_on("gl@4.5:", type="link")
- depends_on("numactl", type="link", when="@3.7.0:")
+ depends_on("numactl", type="link")
+ depends_on("libx11", when="+asan")
+ depends_on("xproto", when="+asan")
+ depends_on("opencl-icd-loader@2024.05.08", when="@6.2")
for d_version, d_shasum in [
("5.6.1", "cc9a99c7e4de3d9360c0a471b27d626e84a39c9e60e0aff1e8e1500d82391819"),
@@ -128,64 +81,33 @@ class RocmOpencl(CMakePackage):
("5.4.0", "46a1579310b3ab9dc8948d0fb5bed4c6b312f158ca76967af7ab69e328d43138"),
("5.3.3", "f8133a5934f9c53b253d324876d74f08a19e2f5b073bc94a62fe64b0d2183a18"),
("5.3.0", "2bf14116b5e2270928265f5d417b3d0f0f2e13cbc8ec5eb8c80d4d4a58ff7e94"),
- ("5.2.3", "0493c414d4db1af8e1eb30a651d9512044644244488ebb13478c2138a7612998"),
- ("5.2.1", "465ca9fa16869cd89dab8c2d66d9b9e3c14f744bbedaa1d215b0746d77a500ba"),
- ("5.2.0", "37f5fce04348183bce2ece8bac1117f6ef7e710ca68371ff82ab08e93368bafb"),
- ("5.1.3", "ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48"),
- ("5.1.0", "f4f265604b534795a275af902b2c814f416434d9c9e16db81b3ed5d062187dfa"),
- ("5.0.2", "34decd84652268dde865f38e66f8fb4750a08c2457fea52ad962bced82a03e5e"),
- ("5.0.0", "6b72faf8819628a5c109b2ade515ab9009606d10f11316f0d7e4c4c998d7f724"),
- ("4.5.2", "6581916a3303a31f76454f12f86e020fb5e5c019f3dbb0780436a8f73792c4d1"),
- ("4.5.0", "ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e"),
]:
resource(
name="rocclr",
- url="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-{0}.tar.gz".format(
- d_version
- ),
+ url=f"https://github.com/ROCm/ROCclr/archive/rocm-{d_version}.tar.gz",
sha256=d_shasum,
expand=True,
destination="",
placement="rocclr",
- when="@{0}".format(d_version),
+ when=f"@{d_version}",
)
+ # For avx build, the start address of values_ buffer in KernelParameters is not
+ # correct as it is computed based on 16-byte alignment.
+ patch(
+ "https://github.com/ROCm/clr/commit/c4f773db0b4ccbbeed4e3d6c0f6bff299c2aa3f0.patch?full_index=1",
+ sha256="5bb9b0e08888830ccf3a0a658529fe25f4ee62b5b8890f349bf2cc914236eb2f",
+ when="@5.7:6.0",
+ )
+ patch(
+ "https://github.com/ROCm/clr/commit/7868876db742fb4d44483892856a66d2993add03.patch?full_index=1",
+ sha256="7668b2a710baf4cb063e6b00280fb75c4c3e0511575e8298a9c7ae5143f60b33",
+ when="@5.7:6.0",
+ )
+
# Patch to set package installation path for OpenCL.
- patch("0001-fix-build-error-rocm-opencl-5.1.0.patch", when="@5.1.0:5.1")
+ patch("0001-fix-build-error-rocm-opencl-5.1.0.patch", when="@5.1")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "master",
- ]:
- depends_on("hip-rocclr@" + ver, type="build", when="@" + ver)
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -194,61 +116,83 @@ class RocmOpencl(CMakePackage):
"5.5.1",
"5.6.0",
"5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("comgr@" + ver, type="build", when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver)
+ depends_on(f"comgr@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", type="link", when=f"@{ver}")
+
+ for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"aqlprofile@{ver}", type="link", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
-
- def flag_handler(self, name, flags):
- # The includes are messed up in ROCm 3.5.0:
- # ROCM-OpenCL-Runtime uses flat includes
- # and the find_package(ROCclr) bit it
- # commented out. So instead we provide
- # all the includes...
-
- if self.spec.satisfies("@:4.3.2") and name in ("cflags", "cxxflags"):
- rocclr = self.spec["hip-rocclr"].prefix
- extra_includes = [
- "include",
- "include/compiler/lib/include",
- "include/elf",
- "compiler/lib",
- "compiler/lib/include",
- "elf/utils/libelf",
- "elf/utils/common",
- ]
-
- for p in extra_includes:
- flag = "-I {0}".format(join_path(rocclr, p))
- flags.append(flag)
-
- return (flags, None, None)
+ return None
def cmake_args(self):
args = ["-DUSE_COMGR_LIBRARY=yes", "-DBUILD_TESTS=ON"]
- if self.spec.satisfies("@:4.3.0"):
- "-DROCclr_DIR={0}".format(self.spec["hip-rocclr"].prefix),
- "-DLIBROCclr_STATIC_DIR={0}/lib".format
- (self.spec["hip-rocclr"].prefix)
- if "@4.5.0:" in self.spec:
+ if self.spec.satisfies("@:5.6"):
args.append(self.define("ROCCLR_PATH", self.stage.source_path + "/rocclr"))
args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path))
+ if self.spec.satisfies("@5.7:"):
+ args.append(self.define("CLR_BUILD_HIP", False))
+ args.append(self.define("CLR_BUILD_OCL", True))
+ if self.spec.satisfies("+asan"):
+ args.append(
+ self.define(
+ "CMAKE_CXX_FLAGS",
+ f"-I{self.spec['libx11'].prefix.include} "
+ f"-I{self.spec['mesa'].prefix.include} "
+ f"-I{self.spec['xproto'].prefix.include}",
+ )
+ )
+ if self.spec.satisfies("@6.2:"):
+ args.append(self.define("BUILD_ICD", False))
+ args.append(self.define("AMD_ICD_LIBRARY_DIR", self.spec["opencl-icd-loader"].prefix))
+
return args
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+
def setup_run_environment(self, env):
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib),
env.set("OCL_ICD_VENDORS", self.prefix.vendors + "/")
@@ -262,13 +206,15 @@ class RocmOpencl(CMakePackage):
with open(join_path(vendor_config_path, config_file_name), "w") as f:
f.write("libamdocl64.so")
- test_src_dir = "tests/ocltst"
+ def test_ocltst(self):
+ """Run ocltst checks"""
+ test_dir = "tests/ocltst" if sys.platform == "win32" else "share/opencl/ocltst"
+
+ os.environ["LD_LIBRARY_PATH"] += os.pathsep + join_path(self.prefix, test_dir)
+
+ ocltst = which(join_path(self.prefix, test_dir, "ocltst"))
+ with test_part(self, "test_ocltst_runtime", purpose="check runtime"):
+ ocltst("-m", "liboclruntime.so", "-A", "oclruntime.exclude")
- def test(self):
- test_dir = join_path(self.spec["rocm-opencl"].prefix, self.test_src_dir)
- with working_dir(test_dir, create=True):
- os.environ["LD_LIBRARY_PATH"] += os.pathsep + test_dir
- args = ["-m", "liboclruntime.so", "-A", "oclruntime.exclude"]
- self.run_test("ocltst", args)
- args = ["-m", "liboclperf.so", "-A", "oclperf.exclude"]
- self.run_test("ocltst", args)
+ with test_part(self, "test_ocltst_perf", purpose="check perf"):
+ ocltst("-m", "liboclperf.so", "-A", "oclperf.exclude")
diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env-6.2.patch b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env-6.2.patch
new file mode 100644
index 0000000000..6f7471fd32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env-6.2.patch
@@ -0,0 +1,13 @@
+diff --git a/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt b/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
+index f97bba7..86e4155 100644
+--- a/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
++++ b/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
+@@ -68,8 +68,6 @@ target_include_directories(omptarget.rtl.cuda PRIVATE ${LIBOMPTARGET_INCLUDE_DIR
+ option(LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF)
+ if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
+ libomptarget_say("Enable tests using CUDA plugin")
+- set(LIBOMPTARGET_SYSTEM_TARGETS
+- "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
+ list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.cuda")
+ set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
+ else()
diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env.patch b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env.patch
new file mode 100644
index 0000000000..1d11dde37d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Avoid-duplicate-registration-on-cuda-env.patch
@@ -0,0 +1,26 @@
+From 518621c818c285d8b5d11f56c331243b985d7654 Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Fri, 9 Aug 2024 22:04:55 +0000
+Subject: [PATCH] Avoiding registration of duplicate when built on cuda
+ environemnt
+
+---
+ .../openmp/libomptarget/plugins/cuda/CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins/cuda/CMakeLists.txt b/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins/cuda/CMakeLists.txt
+index 9b991c735..f21cccdd5 100644
+--- a/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins/cuda/CMakeLists.txt
++++ b/rocm-openmp-extras/llvm-project/openmp/libomptarget/plugins/cuda/CMakeLists.txt
+@@ -102,8 +102,6 @@ target_include_directories(omptarget.rtl.cuda PRIVATE
+ option(LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF)
+ if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
+ libomptarget_say("Enable tests using CUDA plugin")
+- set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-oldDriver" PARENT_SCOPE)
+- set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
+ list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.cuda")
+ set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
+ else()
+--
+2.34.1
+
diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Linking-hsakmt-libdrm-and-numactl-libraries-6.1.patch b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Linking-hsakmt-libdrm-and-numactl-libraries-6.1.patch
new file mode 100644
index 0000000000..03cacf5098
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/0001-Linking-hsakmt-libdrm-and-numactl-libraries-6.1.patch
@@ -0,0 +1,29 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e8b5696..939a30b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -122,7 +122,9 @@ find_path (
+ ${CMAKE_BINARY_DIR}/runtime/src
+ )
+
+-include_directories(${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMP_OMP_TOOLS_INCLUDE_DIR})
++include_directories(${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} ${HSAKMT_INC_PATH})
++link_directories(${HSAKMT_LIB64} ${HSAKMT_LIB} ${LIBDRM_LIB} ${NUMACTL_DIR}/lib)
++
+
+ # Various LLVM_TOOLS are needed to build libomptarget
+ find_package(LLVM QUIET CONFIG PATHS
+diff --git a/DeviceRTL/CMakeLists.txt b/DeviceRTL/CMakeLists.txt
+index 66ccb43..6094d65 100644
+--- a/DeviceRTL/CMakeLists.txt
++++ b/DeviceRTL/CMakeLists.txt
+@@ -13,6 +13,9 @@
+ set(LIBOMPTARGET_BUILD_DEVICERTL_BCLIB TRUE CACHE BOOL
+ "Can be set to false to disable building this library.")
+
++include_directories(${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} ${HSAKMT_INC_PATH})
++link_directories(${HSAKMT_LIB64} ${HSAKMT_LIB} ${LIBDRM_LIB} ${NUMACTL_DIR}/lib)
++
+ if (NOT LIBOMPTARGET_BUILD_DEVICERTL_BCLIB)
+ libomptarget_say("Not building DeviceRTL: Disabled by LIBOMPTARGET_BUILD_DEVICERTL_BCLIB")
+ return()
diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
index 836698b92b..60c38610f5 100644
--- a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
+++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
@@ -6,31 +6,16 @@
import os
import re
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
-tools_url = "https://github.com/ROCm-Developer-Tools"
-compute_url = "https://github.com/RadeonOpenCompute"
+tools_url = "https://github.com/ROCm"
+compute_url = "https://github.com/ROCm"
# Arrays of hashes are in order of the versions array below
# For example array[0] = 3.9.0, array[1] = 3.10.0, etc.
aomp = [
- "377ab59b685a73b3f95fba95f5e028678ec5aafabc4177b7f0ffb78da095d679",
- "808fca9bdefb109d5bcbbc9f5b59c564a6d422488869e986516f2a7233eda235",
- "aa75455cf1d333419e5310117678e5789c5222f7cb05b05e3dfacef855c55d84",
- "9e6ed2c7bdc3b4af069751b5d3e92913fd5ac318ae844f68bd78c5def990a8f7",
- "c368d39ba9c1bc8b0edbe66edaa3f2a4ff5649c2bd16f499ac19dfd1591dec5a",
- "c2b1a61a15fdf8d50c7c7a1ad75512f059c53a7bd5afe85f69e984f1174aa74a",
- "2092fd210160986127c302c2d636bf5f58ba3a946d27a8474593fa7f87603950",
- "27a5794b5885c61dc6f63cec36673b37deb029754d3b2fd3e1b21239efffa96a",
- "ce90b9560205f58f50e72615cd937f02041f4eb2ff66ab445ce3b9faf4f4fa4c",
- "2439473fb18bfd404eadd222e5955d0fcdf410a9efc5509696bf7b2780f3c894",
- "64669ac448c439e89ec4b6e0506158e6d9b5a3edfae05882aee4c9bcd5f187b7",
- "e69fe0c933cb30daafe49d9f1df71fe16f387e0287bba921995feeefdf9ac262",
- "8bab3d621343f419b29043ac0cb56e062f114991dc3ec1e33e786f771deecc8f",
- "20e21312816272222d1f427ea72a99a9a67077078552f5e2638a40860d161d25",
- "c0aa6997e889d6ce0e37cfa6a2e91c5c0b54cda1673abdcabcf34da1ba78ba72",
- "4ba1792095427588c484feed01f2f48e66aaad26bc000cbc74a15032551699e7",
"371ed037b95b83fac64fb2ff2fc17313fe7d3befc8671f0a08f0e2072393fa5b",
"c86141fcde879fc78d06a41ba6a26ff528da539c6a1be8b714f635182c66e3f4",
"bbca540897848fa95fd0f14fc05ab6deda31299a061424972d5e2bc09c7543dc",
@@ -41,25 +26,17 @@ aomp = [
"6c051bf7625f682ba3d2ea80b46a38ca2cbcd20f5d89ae3433602d3e7ef0403a",
"4f34fa02db410808c5e629f30f8804210b42c4ff7d31aa80606deaed43054c3c",
"ed7bbf92230b6535a353ed032a39a9f16e9987397798100392fc25e40c8a1a4e",
+ "1b2c0934ef16e17b2377944fae8c9b3db6dc64b7e43932ddfe2eeefdf6821410",
+ "d6e13a15d5d25990d4bacbac8fabe2eb07973829f2e69abbc628e0736f95caf9",
+ "832b7c48149a730619b577a2863b8d1bf1b2551eda5b815e1865a044929ab9fa",
+ "62a5036a2299ed2e3053ee00b7ea1800469cd545fea486fa17266a8b3acfaf5d",
+ "3de1c7a31a88c3f05a6a66ba6854ac8fdad1ce44462e561cb1e6ad59629029ce",
+ "5f54d7c7c798bcf1cd47d3a7f17ceaf79991bf166cc5e47e5372a68e7cf7d520",
+ "ac82e8da0c210ee14b911c833ae09a029a41541689930759737c135db52464a3",
+ "ad5674b5626ed6720ca5f8772542e8ed3fb7a9150ed7a86a1adbcd70a2074e8e",
]
devlib = [
- "c99f45dacf5967aef9a31e3731011b9c142446d4a12bac69774998976f2576d7",
- "bca9291385d6bdc91a8b39a46f0fd816157d38abb1725ff5222e6a0daa0834cc",
- "d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a",
- "f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b",
- "34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f",
- "055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2",
- "a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592",
- "78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77",
- "50e9e87ecd6b561cad0d471295d29f7220e195528e567fcabe2ec73838979f61",
- "83ed7aa1c9322b4fc1f57c48a63fc7718eb4195ee6fde433009b4bc78cb363f0",
- "49cfa8f8fc276ba27feef40546788a2aabe259a924a97af8bef24e295d19aa5e",
- "47dbcb41fb4739219cadc9f2b5f21358ed2f9895ce786d2f7a1b2c4fd044d30f",
- "c41958560ec29c8bf91332b9f668793463904a2081c330c0d828bf2f91d4f04e",
- "901674bc941115c72f82c5def61d42f2bebee687aefd30a460905996f838e16c",
- "e5855387ce73ed483ed0d03dbfef31f297c6ca66cf816f6816fd5ee373fc8225",
- "16b7fc7db4759bd6fb54852e9855fa16ead76c97871d7e1e9392e846381d611a",
"f7e1665a1650d3d0481bec68252e8a5e68adc2c867c63c570f6190a1d2fe735c",
"963c9a0561111788b55a8c3b492e2a5737047914752376226c97a28122a4d768",
"d68813ded47179c39914c8d1b76af3dad8c714b10229d1e2246af67609473951",
@@ -70,25 +47,17 @@ devlib = [
"f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c",
"0f8780b9098573f1c456bdc84358de924dcf00604330770a383983e1775bf61e",
"703de8403c0bd0d80f37c970a698f10f148daf144d34f982e4484d04f7c7bbef",
+ "198df4550d4560537ba60ac7af9bde31d59779c8ec5d6309627f77a43ab6ef6f",
+ "c6d88b9b46e39d5d21bd5a0c1eba887ec473a370b1ed0cebd1d2e910eedc5837",
+ "6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34",
+ "f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d",
+ "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097",
+ "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200",
+ "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7",
+ "7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528",
]
llvm = [
- "1ff14b56d10c2c44d36c3c412b190d3d8cd1bb12cfc7cd58af004c16fd9987d1",
- "8262aff88c1ff6c4deb4da5a4f8cda1bf90668950e2b911f93f73edaee53b370",
- "aa1f80f429fded465e86bcfaef72255da1af1c5c52d58a4c979bc2f6c2da5a69",
- "244e38d824fa7dfa8d0edf3c036b3c84e9c17a16791828e4b745a8d31eb374ae",
- "751eca1d18595b565cfafa01c3cb43efb9107874865a60c80d6760ba83edb661",
- "1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87",
- "b53c6b13be7d77dc93a7c62e4adbb414701e4e601e1af2d1e98da4ee07c9837f",
- "b71451bf26650ba06c0c5c4c7df70f13975151eaa673ef0cc77c1ab0000ccc97",
- "36a4f7dd961cf373b743fc679bdf622089d2a905de2cfd6fd6c9e7ff8d8ad61f",
- "bca2db4aaab71541cac588d6a708fde60f0ebe744809bde8a3847044a1a77413",
- "99a14394b406263576ed3d8d10334de7c78d42b349109f375d178b11492eecaf",
- "db5d45c4a7842a908527c1b7b8d4a40c688225a41d23cfa382eab23edfffdd10",
- "d236a2064363c0278f7ba1bb2ff1545ee4c52278c50640e8bb2b9cfef8a2f128",
- "0f892174111b78a02d1a00f8f46d9f80b9abb95513a7af38ecf2a5a0882fe87f",
- "3644e927d943d61e22672422591c47a62ff83e3d87ced68439822156d8f79abf",
- "1b852711aec3137b568fb65f93606d37fdcd62e06f5da3766f2ffcd4e0c646df",
"4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e",
"5296d5e474811c7d1e456cb6d5011db248b79b8d0512155e8a6c2aa5b5f12d38",
"ff54f45a17723892cd775c1eaff9e5860527fcfd33d98759223c70e3362335bf",
@@ -99,25 +68,17 @@ llvm = [
"045e43c0c4a3f4f2f1db9fb603a4f1ea3d56e128147e19ba17909eb57d7f08e5",
"4abdf00b297a77c5886cedb37e63acda2ba11cb9f4c0a64e133b05800aadfcf0",
"6b54c422e45ad19c9bf5ab090ec21753e7f7d854ca78132c30eb146657b168eb",
+ "c673708d413d60ca8606ee75c77e9871b6953c59029c987b92f2f6e85f683626",
+ "7d35acc84de1adee65406f92a369a30364703f84279241c444cd93a48c7eeb76",
+ "6bd9912441de6caf6b26d1323e1c899ecd14ff2431874a2f5883d3bc5212db34",
+ "f1a67efb49f76a9b262e9735d3f75ad21e3bd6a05338c9b15c01e6c625c4460d",
+ "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097",
+ "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200",
+ "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7",
+ "7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528",
]
flang = [
- "5d113f44fb173bd0d5704b282c5cebbb2aa642c7c29f188764bfa1daa58374c9",
- "3990d39ff1c908b150f464f0653a123d94be30802f9cad6af18fbb560c4b412e",
- "f3e19699ce4ac404f41ffe08ef4546e31e2e741d8deb403b5477659e054275d5",
- "f41f661425534b5cfb20e2c0efd9d0800609dc3876ee9c3f76f026d36abbfa35",
- "d6c3f3aaa289251a433d99d1cffe432812093089ae876a6863295a15066c1eaf",
- "13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
- "13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
- "3d7277fd658e51e7e43272c4b319e733c18f5a6d11f739aaec0df758a720809e",
- "54bc3e668577fc30ef77f0c95436e9f9327f256ac8c43eee35eb90000883c6d3",
- "e8d7f828e10516666606bcf2459a25f69401f12f0ae4d3b4a0ca57616bbd9bb0",
- "9b9a53150009ff58bd0ab665b970dbebc51be891343fd5dc8e77a2133ac44333",
- "d95e36f3b93097ab6fb319c744ddc71cd94af0c358accc1e5224c2bbd431266d",
- "d7847b5c6e1344dc0b4723dbe76a859257b4c242644dedb34e425f07738530d4",
- "20f48cac9b58496230fa2428eba4e15ec0a6e92d429569b154a328b7a8c5da17",
- "012a9c10a7d2a248dc40510e2f5c02a54b5f6bc39961500dc48b6780dac5ad67",
- "496f00918721c72eae0bd926a5a8f1f35bd443f6b22bc08e2a42c67e44a4dbaf",
"ef1256ddf6cd9de10a1b88df4736dce48295136983a7e31eadd942fb39b156f7",
"ddccd866d0c01086087fe21b5711668f85bcf9cbd9f62853f8bda32eaedb5339",
"fae8195a5e1b3778e31dbc6cbeedeae9998ea4b5a54215534af41e91fdcb8ba0",
@@ -128,25 +89,17 @@ flang = [
"5ebcbca2e03bd0686e677f44ea551e97bd9395c6b119f832fa784818733aa652",
"cc4f1973b1b8e7bcc4f09e3381bae4e1a2e51ea4e2598fc1b520ccb8bf24d28c",
"8fd618d81af092416b267c4d00c801731f7a00c0f8d4aedb795e52a4ec1bf183",
+ "fcb319ddb2aa3004a6ae60370ab4425f529336b1cee50f29200e697e61b53586",
+ "8e6469415880bb068d788596b3ed713a24495eb42788f98cca92e73a2998f703",
+ "51ecd2c154568c971f5b46ff0e1e1b57063afe28d128fc88c503de88f7240267",
+ "1bcaa73e73a688cb092f01987cf3ec9ace4aa1fcaab2b812888c610722c4501d",
+ "12418ea61cca58811b7e75fd9df48be568b406f84a489a41ba5a1fd70c47f7ba",
+ "6af7785b1776aeb9229ce4e5083dcfd451e8450f6e5ebe34214560b13f679d96",
+ "409ee98bf15e51ac68b7ed351f4582930dfa0288de042006e17eea6b64df5ad6",
+ "51c1308f324101e4b637e78cd2eb652e22f68f6d820991a76189c15131f971dc",
]
extras = [
- "830a37cf1c6700f81fc00749206a37e7cda4d2867bbdf489e9e2d81f52d06b3d",
- "5d98d34aff97416d8b5b9e16e7cf474580f8de8a73bd0e549c4440a3c5df4ef5",
- "51cc8a7c5943e1d9bc657fc9b9797f45e3ce6a4e544d3d3a967c7cd0185a0510",
- "91fdfadb94aa6afc1942124d0953ddc80c297fa75de1897fb42ac8e7dea51ab9",
- "31bbe70b51c259a54370d021ae63528a1740b5477a22412685afd14150fff6f4",
- "ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
- "ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
- "a9c32fb7659c0aabba5b1e76ec05037dda485bf893cef4144279b42ef8fae416",
- "2b7ae80dda7ffee63210855bc2746c8a13063777c9b855a562eedca4e7ab6254",
- "9dfaee1eeee2141d4873f7d71fcaeacabe91f1418cb3bed19653e847921944e4",
- "a4affb77bebaafb6f8d22c51d66aa6fa05381ec54cc1e14a4b10e0f3dc00157f",
- "c3a2a83d8f586ee765df96a692ebe010631446f700273fa31738ea260dfc35f7",
- "2e3151a47d77166d071213af2a1691487691aae0abd5c1718d818a6d7d09cb2d",
- "817c2e8975e56a8875ff56f9d1ea34d5e7e50f1b541b7f1236e3e5c8d9eee47f",
- "8b738225f0be39f27bba64c014816cfa1b79f2c7cf2d0e31fbc0fffb6c26e429",
- "f42ca7d85b0b64e6890502f1cf8309ef97f707829876742da2ea5c2cdf3ad8ac",
"b3beee383d9c130666c230595c950bdc2ce4c7a99d728b9ddf1bca3963152223",
"b26b9f4b11a9ccfab53d0dd55aada7e5b98f7ab51981cb033b376321dd44bf87",
"2546becd4b182d1e366f47660c731c8ff7366b6306782f04706b6a7bf4e2094c",
@@ -157,25 +110,17 @@ extras = [
"437e2017cfe2ab73b15ada0fc1ea88f794f0b108cc5410f457268ae7e4e8985a",
"be59433dd85d4b8f0eaff87e0cc424a814152c67f3a682d1343c4bd61dd49a0f",
"8060c6879708faf5f7d417b19a479dec9b7b9583a1b885f12d247faf831f7f0b",
+ "f37e1107e4da5b083e794244f3d0c9fd073ccb6fd6015e635349d8f0d679c4b8",
+ "b2e117d703cefdc2858adaeee5bad95e9b6dab6263a9c13891a79a7b1e2defb6",
+ "57d6d9d26c0cb6ea7f8373996c41165f463ae7936d32e5793822cfae03900f8f",
+ "3dc837fbfcac64e000e1b5518e4f8a6b260eaf1a3e74152d8b8c22f128f575b7",
+ "2b9351fdb1cba229669233919464ae906ca8f70910c6fa508a2812b7c3bed123",
+ "7cef51c980f29d8b46d8d4b110e4f2f75d93544cf7d63c5e5d158cf531aeec7d",
+ "4b0d250b5ebd997ed6d5d057689c3f67dfb4d82f09f582ebb439ca9134fae48d",
+ "34c3506b0f6aefbf0bc7981ff2901b7a2df975a5b40c5eb078522499d81057f0",
]
versions = [
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -186,6 +131,14 @@ versions = [
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]
versions_dict = dict() # type: Dict[str,Dict[str,str]]
components = ["aomp", "devlib", "llvm", "flang", "extras"]
@@ -203,38 +156,36 @@ class RocmOpenmpExtras(Package):
"""OpenMP support for ROCm LLVM."""
homepage = tools_url + "/aomp"
- url = tools_url + "/aomp/archive/rocm-5.5.0.tar.gz"
+ url = tools_url + "/aomp/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
license("Apache-2.0")
- maintainers("srekolam", "renjithravindrankannath", "estewart08")
+ maintainers("srekolam", "renjithravindrankannath", "estewart08", "afzpatel")
+ version("6.2.4", sha256=versions_dict["6.2.4"]["aomp"])
+ version("6.2.1", sha256=versions_dict["6.2.1"]["aomp"])
+ version("6.2.0", sha256=versions_dict["6.2.0"]["aomp"])
+ version("6.1.2", sha256=versions_dict["6.1.2"]["aomp"])
+ version("6.1.1", sha256=versions_dict["6.1.1"]["aomp"])
+ version("6.1.0", sha256=versions_dict["6.1.0"]["aomp"])
+ version("6.0.2", sha256=versions_dict["6.0.2"]["aomp"])
+ version("6.0.0", sha256=versions_dict["6.0.0"]["aomp"])
version("5.7.1", sha256=versions_dict["5.7.1"]["aomp"])
version("5.7.0", sha256=versions_dict["5.7.0"]["aomp"])
version("5.6.1", sha256=versions_dict["5.6.1"]["aomp"])
version("5.6.0", sha256=versions_dict["5.6.0"]["aomp"])
version("5.5.1", sha256=versions_dict["5.5.1"]["aomp"])
version("5.5.0", sha256=versions_dict["5.5.0"]["aomp"])
- version("5.4.3", sha256=versions_dict["5.4.3"]["aomp"])
- version("5.4.0", sha256=versions_dict["5.4.0"]["aomp"])
- version("5.3.3", sha256=versions_dict["5.3.3"]["aomp"])
- version("5.3.0", sha256=versions_dict["5.3.0"]["aomp"])
- version("5.2.3", sha256=versions_dict["5.2.3"]["aomp"])
- version("5.2.1", sha256=versions_dict["5.2.1"]["aomp"])
- version("5.2.0", sha256=versions_dict["5.2.0"]["aomp"])
- version("5.1.3", sha256=versions_dict["5.1.3"]["aomp"])
- version("5.1.0", sha256=versions_dict["5.1.0"]["aomp"])
- version("5.0.2", sha256=versions_dict["5.0.2"]["aomp"], deprecated=True)
- version("5.0.0", sha256=versions_dict["5.0.0"]["aomp"], deprecated=True)
- version("4.5.2", sha256=versions_dict["4.5.2"]["aomp"], deprecated=True)
- version("4.5.0", sha256=versions_dict["4.5.0"]["aomp"], deprecated=True)
- version("4.3.1", sha256=versions_dict["4.3.1"]["aomp"], deprecated=True)
- version("4.3.0", sha256=versions_dict["4.3.0"]["aomp"], deprecated=True)
- version("4.2.0", sha256=versions_dict["4.2.0"]["aomp"], deprecated=True)
- version("4.1.0", sha256=versions_dict["4.1.0"]["aomp"], deprecated=True)
- version("4.0.0", sha256=versions_dict["4.0.0"]["aomp"], deprecated=True)
- version("3.10.0", sha256=versions_dict["3.10.0"]["aomp"], deprecated=True)
- version("3.9.0", sha256=versions_dict["3.9.0"]["aomp"], deprecated=True)
+ version("5.4.3", sha256=versions_dict["5.4.3"]["aomp"], deprecated=True)
+ version("5.4.0", sha256=versions_dict["5.4.0"]["aomp"], deprecated=True)
+ version("5.3.3", sha256=versions_dict["5.3.3"]["aomp"], deprecated=True)
+ version("5.3.0", sha256=versions_dict["5.3.0"]["aomp"], deprecated=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3:", type="build")
depends_on("py-setuptools", type="build")
@@ -243,26 +194,29 @@ class RocmOpenmpExtras(Package):
depends_on("awk", type="build")
depends_on("elfutils", type=("build", "link"))
depends_on("libffi", type=("build", "link"))
- depends_on("libdrm", when="@5.7")
- depends_on("numactl", when="@5.7")
+ depends_on("libdrm", when="@5.7:6.0")
+ depends_on("numactl", when="@5.7:6.0")
+ depends_on("zlib", when="@6.2:")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
for ver in [
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -273,61 +227,95 @@ class RocmOpenmpExtras(Package):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@{0} ~openmp".format(ver), when="@" + ver)
-
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
-
- # tag changed to 'rocm-' in 4.0.0
- if ver == "3.9.0" or ver == "3.10.0":
- tag = "rocm-uc-"
- else:
- tag = "rocm-"
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
resource(
name="rocm-device-libs",
- url=compute_url + "/ROCm-Device-Libs/archive/" + tag + ver + ".tar.gz",
+ url=f"{compute_url}/ROCm-Device-Libs/archive/rocm-{ver}.tar.gz",
sha256=versions_dict[ver]["devlib"],
expand=True,
destination="rocm-openmp-extras",
placement="rocm-device-libs",
- when="@" + ver,
+ when=f"@{ver}",
+ )
+ resource(
+ name="flang",
+ url=f"{tools_url}/flang/archive/rocm-{ver}.tar.gz",
+ sha256=versions_dict[ver]["flang"],
+ expand=True,
+ destination="rocm-openmp-extras",
+ placement="flang",
+ when=f"@{ver}",
)
resource(
+ name="aomp-extras",
+ url=f"{tools_url}/aomp-extras/archive/rocm-{ver}.tar.gz",
+ sha256=versions_dict[ver]["extras"],
+ expand=True,
+ destination="rocm-openmp-extras",
+ placement="aomp-extras",
+ when=f"@{ver}",
+ )
+
+ resource(
+ name="llvm-project",
+ url=f"{compute_url}/llvm-project/archive/rocm-{ver}.tar.gz",
+ sha256=versions_dict[ver]["llvm"],
+ expand=True,
+ destination="rocm-openmp-extras",
+ placement="llvm-project",
+ when=f"@{ver}",
+ )
+ for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+
+ resource(
name="flang",
- url=tools_url + "/flang/archive/" + tag + ver + ".tar.gz",
+ url=f"{tools_url}/flang/archive/rocm-{ver}.tar.gz",
sha256=versions_dict[ver]["flang"],
expand=True,
destination="rocm-openmp-extras",
placement="flang",
- when="@" + ver,
+ when=f"@{ver}",
)
resource(
name="aomp-extras",
- url=tools_url + "/aomp-extras/archive/" + tag + ver + ".tar.gz",
+ url=f"{tools_url}/aomp-extras/archive/rocm-{ver}.tar.gz",
sha256=versions_dict[ver]["extras"],
expand=True,
destination="rocm-openmp-extras",
placement="aomp-extras",
- when="@" + ver,
+ when=f"@{ver}",
)
resource(
name="llvm-project",
- url=compute_url + "/llvm-project/archive/rocm-" + ver + ".tar.gz",
+ url=f"{compute_url}/llvm-project/archive/rocm-{ver}.tar.gz",
sha256=versions_dict[ver]["llvm"],
expand=True,
destination="rocm-openmp-extras",
placement="llvm-project",
- when="@" + ver,
+ when=f"@{ver}",
)
- patch("0001-Linking-hsakmt-libdrm-and-numactl-libraries.patch", when="@5.7")
+ patch("0001-Linking-hsakmt-libdrm-and-numactl-libraries.patch", when="@5.7:6.0")
+ patch(
+ "0001-Linking-hsakmt-libdrm-and-numactl-libraries-6.1.patch",
+ working_dir="rocm-openmp-extras/llvm-project/openmp/libomptarget",
+ when="@6.1",
+ )
+ patch("0001-Avoid-duplicate-registration-on-cuda-env.patch", when="@6.1")
+ patch("0001-Avoid-duplicate-registration-on-cuda-env-6.2.patch", when="@6.2")
def setup_run_environment(self, env):
devlibs_prefix = self.spec["llvm-amdgpu"].prefix
@@ -341,16 +329,23 @@ class RocmOpenmpExtras(Package):
if self.spec.satisfies("@5.3.0:"):
env.prepend_path("LD_LIBRARY_PATH", "{0}/lib".format(openmp_extras_prefix))
env.prepend_path("LD_LIBRARY_PATH", "{0}/lib".format(hsa_prefix))
- if self.spec.version < Version("4.1.0"):
- env.set("AOMP_GPU", "`{0}/rocm-bin/mygpu`".format(openmp_extras_prefix))
- else:
- env.set("AOMP_GPU", "`{0}/bin/mygpu`".format(openmp_extras_prefix))
+ env.set("AOMP_GPU", "`{0}/bin/mygpu`".format(openmp_extras_prefix))
def setup_build_environment(self, env):
openmp_extras_prefix = self.spec["rocm-openmp-extras"].prefix
llvm_prefix = self.spec["llvm-amdgpu"].prefix
env.set("AOMP", "{0}".format(llvm_prefix))
env.set("FC", "{0}/bin/flang".format(openmp_extras_prefix))
+ if self.spec.satisfies("@6.1:"):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib)
+ if self.spec.satisfies("+asan"):
+ env.set("SANITIZER", 1)
+ env.set("VERBOSE", 1)
+ env.set(
+ "LDSHARED",
+ self.spec["llvm-amdgpu"].prefix.bin.clang
+ + " -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2",
+ )
gfx_list = "gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908"
if self.spec.version >= Version("4.3.1"):
@@ -359,19 +354,10 @@ class RocmOpenmpExtras(Package):
def patch(self):
src = self.stage.source_path
- aomp_extras = "{0}/rocm-openmp-extras/aomp-extras/aomp-device-libs"
libomptarget = "{0}/rocm-openmp-extras/llvm-project/openmp/libomptarget"
flang = "{0}/rocm-openmp-extras/flang/"
- if self.spec.version >= Version("4.3.0") and self.spec.version < Version("5.0.0"):
- filter_file(
- "STRIP ${FLANG_SHA}", "STRIP 0", flang.format(src) + "CMakeLists.txt", string=True
- )
-
- if self.spec.version < Version("4.1.0"):
- plugin = "/plugins/hsa/CMakeLists.txt"
- else:
- plugin = "/plugins/amdgpu/CMakeLists.txt"
+ plugin = "/plugins/amdgpu/CMakeLists.txt"
if self.spec.version < Version("5.2.0"):
filter_file(
@@ -380,124 +366,123 @@ class RocmOpenmpExtras(Package):
aomp_extras.format(src) + "/aompextras/CMakeLists.txt",
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
)
-
- # Libm moved into llvm-project in 4.5.0
- if self.spec.version < Version("4.5.0"):
+ if self.spec.satisfies("@6.1"):
filter_file(
- "{ROCM_DIR}/amdgcn/bitcode",
- "{DEVICE_LIBS_DIR}",
- aomp_extras.format(src) + "/libm/CMakeLists.txt",
+ r"${HSAKMT_LIB_PATH}",
+ "${HSAKMT_LIB_PATH} ${HSAKMT_LIB64}"
+ + "${HSAKMT_LIB} ${LIBDRM_LIB} ${NUMACTL_DIR}/lib",
+ libomptarget.format(src) + "/CMakeLists.txt",
+ )
+ filter_file(
+ r"${LIBOMPTARGET_LLVM_INCLUDE_DIRS}",
+ "${LIBOMPTARGET_LLVM_INCLUDE_DIRS} ${HSAKMT_INC_PATH}",
+ libomptarget.format(src) + "/../CMakeLists.txt",
+ )
+ filter_file(
+ r"${LIBOMPTARGET_LLVM_INCLUDE_DIRS}",
+ "${LIBOMPTARGET_LLVM_INCLUDE_DIRS} ${HSAKMT_INC_PATH}",
+ libomptarget.format(src) + "/CMakeLists.txt",
)
# Openmp adjustments
# Fix relocation error with libffi by not using static lib.
- if self.spec.version >= Version("5.1.0"):
+ filter_file(
+ "libffi.a",
+ "",
+ libomptarget.format(src) + "/cmake/Modules/LibomptargetGetDependencies.cmake",
+ )
+ if self.spec.satisfies("@:6.1"):
filter_file(
- "libffi.a",
- "",
- libomptarget.format(src) + "/cmake/Modules/LibomptargetGetDependencies.cmake",
+ r"{OPENMP_INSTALL_LIBDIR}",
+ "{OPENMP_INSTALL_LIBDIR}/libdevice",
+ libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
)
-
- if self.spec.version >= Version("5.0.0"):
filter_file(
- "{OPENMP_INSTALL_LIBDIR}",
- "{OPENMP_INSTALL_LIBDIR}/libdevice",
+ "-nogpulib",
+ "-nogpulib -nogpuinc",
libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
)
-
- if self.spec.version <= Version("5.1.3"):
filter_file(
- "{ROCM_DIR}/amdgcn/bitcode",
- "{DEVICE_LIBS_DIR}",
- libomptarget.format(src) + "/deviceRTLs/libm/CMakeLists.txt",
+ "-x hip",
+ "-x hip -nogpulib -nogpuinc",
+ libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
)
-
- if self.spec.version <= Version("4.5.0"):
filter_file(
- "dl elf",
- "dl ${LIBOMPTARGET_DEP_LIBELF_LIBRARIES}",
- libomptarget.format(src) + "/plugins/amdgpu/CMakeLists.txt",
+ "-c ",
+ "-c -nogpulib -nogpuinc -I{LIMIT}",
+ libomptarget.format(src) + "/hostrpc/CMakeLists.txt",
+ )
+ filter_file(
+ r"${ROCM_DIR}/hsa/include ${ROCM_DIR}/hsa/include/hsa",
+ "${HSA_INCLUDE}/hsa/include ${HSA_INCLUDE}/hsa/include/hsa",
+ libomptarget.format(src) + plugin,
+ string=True,
)
- filter_file(
- "-nogpulib",
- "-nogpulib -nogpuinc",
- libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
- )
-
- filter_file(
- "-x hip",
- "-x hip -nogpulib -nogpuinc",
- libomptarget.format(src) + "/deviceRTLs/amdgcn/CMakeLists.txt",
- )
+ filter_file("{ROCM_DIR}/hsa/lib", "{HSA_LIB}", libomptarget.format(src) + plugin)
- filter_file(
- "-c ",
- "-c -nogpulib -nogpuinc -I{LIMIT}",
- libomptarget.format(src) + "/hostrpc/CMakeLists.txt",
- )
-
- filter_file(
- r"${ROCM_DIR}/hsa/include ${ROCM_DIR}/hsa/include/hsa",
- "${HSA_INCLUDE}/hsa/include ${HSA_INCLUDE}/hsa/include/hsa",
- libomptarget.format(src) + plugin,
- string=True,
- )
+ filter_file(
+ r"{ROCM_DIR}/lib\)",
+ "{HSAKMT_LIB})\nset(HSAKMT_LIB64 ${HSAKMT_LIB64})",
+ libomptarget.format(src) + plugin,
+ )
- filter_file("{ROCM_DIR}/hsa/lib", "{HSA_LIB}", libomptarget.format(src) + plugin)
+ filter_file(
+ r"-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
+ "-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS} -L${HSAKMT_LIB64}",
+ libomptarget.format(src) + plugin,
+ string=True,
+ )
- filter_file(
- r"{ROCM_DIR}/lib\)",
- "{HSAKMT_LIB})\nset(HSAKMT_LIB64 ${HSAKMT_LIB64})",
- libomptarget.format(src) + plugin,
- )
+ filter_file(
+ r"-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
+ "-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}" + ",-rpath,${HSAKMT_LIB64}",
+ libomptarget.format(src) + plugin,
+ string=True,
+ )
- filter_file(
- r"-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
- "-L${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS} -L${HSAKMT_LIB64}",
- libomptarget.format(src) + plugin,
- string=True,
- )
+ filter_file("{ROCM_DIR}/include", "{COMGR_INCLUDE}", libomptarget.format(src) + plugin)
- filter_file(
- r"-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}",
- "-rpath,${LIBOMPTARGET_DEP_LIBHSAKMT_LIBRARIES_DIRS}" + ",-rpath,${HSAKMT_LIB64}",
- libomptarget.format(src) + plugin,
- string=True,
- )
+ filter_file(
+ r"-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
+ "-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX} -L${COMGR_LIB}",
+ libomptarget.format(src) + plugin,
+ string=True,
+ )
- filter_file("{ROCM_DIR}/include", "{COMGR_INCLUDE}", libomptarget.format(src) + plugin)
+ filter_file(
+ r"rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
+ "rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}" + "-Wl,-rpath,${COMGR_LIB}",
+ libomptarget.format(src) + plugin,
+ string=True,
+ )
filter_file(
- r"-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
- "-L${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX} -L${COMGR_LIB}",
- libomptarget.format(src) + plugin,
- string=True,
+ "ADDITIONAL_VERSIONS 2.7",
+ "ADDITIONAL_VERSIONS 3",
+ flang.format(src) + "CMakeLists.txt",
)
filter_file(
- r"rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}",
- "rpath,${LLVM_LIBDIR}${OPENMP_LIBDIR_SUFFIX}" + "-Wl,-rpath,${COMGR_LIB}",
- libomptarget.format(src) + plugin,
+ "if (LIBOMPTARGET_DEP_CUDA_FOUND)",
+ "if (LIBOMPTARGET_DEP_CUDA_FOUND AND NOT LIBOMPTARGET_AMDGPU_ARCH)",
+ libomptarget.format(src) + "/hostexec/CMakeLists.txt",
string=True,
)
- filter_file(
- "ADDITIONAL_VERSIONS 2.7",
- "ADDITIONAL_VERSIONS 3",
- flang.format(src) + "CMakeLists.txt",
- )
-
def install(self, spec, prefix):
src = self.stage.source_path
gfx_list = os.environ["GFXLIST"]
gfx_list = gfx_list.replace(" ", ";")
openmp_extras_prefix = self.spec["rocm-openmp-extras"].prefix
devlibs_prefix = self.spec["llvm-amdgpu"].prefix
- devlibs_src = "{0}/rocm-openmp-extras/rocm-device-libs".format(src)
+ if self.spec.satisfies("@6.1:"):
+ devlibs_src = "{0}/rocm-openmp-extras/llvm-project/amd/device-libs".format(src)
+ else:
+ devlibs_src = "{0}/rocm-openmp-extras/rocm-device-libs".format(src)
hsa_prefix = self.spec["hsa-rocr-dev"].prefix
hsakmt_prefix = self.spec["hsakmt-roct"].prefix
- if self.spec.satisfies("@5.7"):
+ if self.spec.satisfies("@5.7:6.1"):
libdrm_prefix = self.spec["libdrm"].prefix
numactl_prefix = self.spec["numactl"].prefix
comgr_prefix = self.spec["comgr"].prefix
@@ -511,6 +496,9 @@ class RocmOpenmpExtras(Package):
libpgmath = "/rocm-openmp-extras/flang/runtime/libpgmath/lib/common"
elfutils_inc = spec["elfutils"].prefix.include
ffi_inc = spec["libffi"].prefix.include
+ if self.spec.satisfies("@6.2:"):
+ ncurses_lib_dir = self.spec["ncurses"].prefix.lib
+ zlib_lib_dir = self.spec["zlib"].prefix.lib
# flang1 and flang2 symlink needed for build of flang-runtime
# libdevice symlink to rocm-openmp-extras for runtime
@@ -519,6 +507,9 @@ class RocmOpenmpExtras(Package):
os.unlink(os.path.join(bin_dir, "flang1"))
if os.path.islink((os.path.join(bin_dir, "flang2"))):
os.unlink(os.path.join(bin_dir, "flang2"))
+ if self.spec.version >= Version("6.1.0"):
+ if os.path.islink((os.path.join(bin_dir, "flang-legacy"))):
+ os.unlink(os.path.join(bin_dir, "flang-legacy"))
if os.path.islink((os.path.join(lib_dir, "libdevice"))):
os.unlink(os.path.join(lib_dir, "libdevice"))
if os.path.islink((os.path.join(llvm_prefix, "lib-debug"))):
@@ -526,6 +517,11 @@ class RocmOpenmpExtras(Package):
os.symlink(os.path.join(omp_bin_dir, "flang1"), os.path.join(bin_dir, "flang1"))
os.symlink(os.path.join(omp_bin_dir, "flang2"), os.path.join(bin_dir, "flang2"))
+
+ if self.spec.version >= Version("6.1.0"):
+ os.symlink(
+ os.path.join(omp_bin_dir, "flang-legacy"), os.path.join(bin_dir, "flang-legacy")
+ )
os.symlink(os.path.join(omp_lib_dir, "libdevice"), os.path.join(lib_dir, "libdevice"))
os.symlink(
os.path.join(openmp_extras_prefix, "lib-debug"), os.path.join(llvm_prefix, "lib-debug")
@@ -575,17 +571,14 @@ class RocmOpenmpExtras(Package):
"-DCMAKE_C_FLAGS=-isystem{0} -I{1}".format(elfutils_inc, ffi_inc),
"-DCMAKE_CXX_FLAGS=-isystem{0} -I{1}".format(elfutils_inc, ffi_inc),
"-DNEW_BC_PATH=1",
+ "-DHSA_INCLUDE={0}/include/hsa".format(hsa_prefix),
]
- if self.spec.satisfies("@5.7"):
+ if self.spec.satisfies("@5.7:6.1"):
openmp_common_args += [
"-DLIBDRM_LIB={0}/lib".format(libdrm_prefix),
"-DHSAKMT_INC_PATH={0}/include".format(hsakmt_prefix),
"-DNUMACTL_DIR={0}".format(numactl_prefix),
]
- if self.spec.version < Version("4.1.0"):
- openmp_common_args += ["-DHSA_INCLUDE={0}".format(hsa_prefix)]
- else:
- openmp_common_args += ["-DHSA_INCLUDE={0}/include/hsa".format(hsa_prefix)]
if self.spec.satisfies("@5.3.0:"):
openmp_common_args += ["-DLIBOMPTARGET_ENABLE_DEBUG=ON"]
@@ -610,19 +603,59 @@ class RocmOpenmpExtras(Package):
"-DCMAKE_C_COMPILER={0}/clang".format(bin_dir),
"-DCMAKE_Fortran_COMPILER={0}/flang".format(bin_dir),
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;x86",
- ]
- if self.spec.version >= Version("4.2.0"):
# Spack thinks some warnings from the flang build are errors.
# Disable those warnings in C and CXX flags.
- flang_common_args += [
- "-DCMAKE_CXX_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
- "-DCMAKE_C_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
- ]
+ "-DCMAKE_CXX_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
+ "-DCMAKE_C_FLAGS={0}".format(flang_warning) + " -I{0}{1}".format(src, libpgmath),
+ ]
components["pgmath"] = ["../rocm-openmp-extras/flang/runtime/libpgmath"]
components["pgmath"] += flang_common_args
+ flang_legacy_version = "17.0-4"
+
+ components["flang-legacy-llvm"] = [
+ "-DLLVM_ENABLE_PROJECTS=clang",
+ "-DCMAKE_BUILD_TYPE=Release",
+ "-DLLVM_ENABLE_ASSERTIONS=ON",
+ "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86",
+ "-DCLANG_DEFAULT_LINKER=lld",
+ "-DLLVM_INCLUDE_BENCHMARKS=0",
+ "-DLLVM_INCLUDE_RUNTIMES=0",
+ "-DLLVM_INCLUDE_EXAMPLES=0",
+ "-DLLVM_INCLUDE_TESTS=0",
+ "-DLLVM_INCLUDE_DOCS=0",
+ "-DLLVM_INCLUDE_UTILS=0",
+ "-DCLANG_DEFAULT_PIE_ON_LINUX=0",
+ "../../rocm-openmp-extras/flang/flang-legacy/{0}/llvm-legacy/llvm".format(
+ flang_legacy_version
+ ),
+ ]
+
+ components["flang-legacy"] = [
+ "-DCMAKE_C_COMPILER={0}/clang".format(bin_dir),
+ "-DCMAKE_CXX_COMPILER={0}/clang++".format(bin_dir),
+ "../rocm-openmp-extras/flang/flang-legacy/{0}".format(flang_legacy_version),
+ ]
+
+ flang_legacy_flags = []
+ if (
+ self.compiler.name == "gcc"
+ and self.compiler.version >= Version("7.0.0")
+ and self.compiler.version < Version("9.0.0")
+ ):
+ flang_legacy_flags.append("-D_GLIBCXX_USE_CXX11_ABI=0")
+ if self.spec.satisfies("@6.2:"):
+ flang_legacy_flags.append("-L{0}".format(ncurses_lib_dir))
+ flang_legacy_flags.append("-L{0}".format(zlib_lib_dir))
+ components["flang-legacy-llvm"] += [
+ "-DCMAKE_CXX_FLAGS={0}".format(" ".join(flang_legacy_flags))
+ ]
+ components["flang-legacy"] += [
+ "-DCMAKE_CXX_FLAGS={0}".format(" ".join(flang_legacy_flags))
+ ]
+
components["flang"] = [
"../rocm-openmp-extras/flang",
"-DFLANG_OPENMP_GPU_AMD=ON",
@@ -639,22 +672,39 @@ class RocmOpenmpExtras(Package):
]
components["flang-runtime"] += flang_common_args
- build_order = ["aomp-extras", "openmp", "openmp-debug", "pgmath", "flang", "flang-runtime"]
+ build_order = ["aomp-extras", "openmp"]
+ if self.spec.version >= Version("6.1.0"):
+ build_order += ["flang-legacy-llvm", "flang-legacy"]
+ build_order += ["pgmath", "flang", "flang-runtime"]
# Override standard CMAKE_BUILD_TYPE
+ std_cmake_args = CMakeBuilder.std_args(self, generator="Unix Makefiles")
for arg in std_cmake_args:
found = re.search("CMAKE_BUILD_TYPE", arg)
if found:
std_cmake_args.remove(arg)
for component in build_order:
- with working_dir("spack-build-{0}".format(component), create=True):
- cmake_args = components[component]
- cmake_args.extend(std_cmake_args)
- # OpenMP build needs to be run twice(Release, Debug)
- if component == "openmp-debug":
- cmake_args.append("-DCMAKE_BUILD_TYPE=Debug")
- else:
+ cmake_args = components[component]
+ cmake_args.extend(std_cmake_args)
+ if component == "flang-legacy-llvm":
+ with working_dir("spack-build-{0}/llvm-legacy".format(component), create=True):
+ cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
+ cmake(*cmake_args)
+ make()
+ elif component == "flang-legacy":
+ with working_dir("spack-build-flang-legacy-llvm"):
cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
- cmake(*cmake_args)
- make()
- make("install")
+ cmake(*cmake_args)
+ make()
+ make("install")
+ os.symlink(os.path.join(bin_dir, "clang"), os.path.join(omp_bin_dir, "clang"))
+ else:
+ with working_dir("spack-build-{0}".format(component), create=True):
+ # OpenMP build needs to be run twice(Release, Debug)
+ if component == "openmp-debug":
+ cmake_args.append("-DCMAKE_BUILD_TYPE=Debug")
+ else:
+ cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
+ cmake(*cmake_args)
+ make()
+ make("install")
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 fdd2bf216c..9b1b3a6d42 100644
--- a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py
+++ b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py
@@ -7,7 +7,6 @@
import os
import re
import shutil
-import subprocess
from spack.package import *
@@ -16,127 +15,88 @@ class RocmSmiLib(CMakePackage):
"""It is a C library for Linux that provides a user space interface
for applications to monitor and control GPU applications."""
- homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib"
- git = "https://github.com/RadeonOpenCompute/rocm_smi_lib.git"
- url = "https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocm_smi_lib"
+ git = "https://github.com/ROCm/rocm_smi_lib.git"
+ url = "https://github.com/ROCm/rocm_smi_lib/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["librocm_smi64"]
version("master", branch="master")
+ version("6.2.4", sha256="eb8986dd571f5862c2db693398c0dbec28e2754f764f6bd3cfb21be7699e4452")
+ version("6.2.1", sha256="28543d099fa44b4b79644533644aba4b67fa48d477628dd5802c3b50cc78583a")
+ version("6.2.0", sha256="95010dfc9de9c608b9ce159107585ff4adce82a52a38daab2a37870aca2428bf")
+ version("6.1.2", sha256="01f46fb1cb8c7a16a4c4db61871ee710ed37c0f8bd3a2dbe3415d3de2dffb4ef")
+ version("6.1.1", sha256="7fd2234b05eb6b9397c5508bb37e81fb16ce2cadc2c97298b2124b46c3687880")
+ version("6.1.0", sha256="d1a1b372489b27cb7eb8c91d74a71370ad9668dd5aaf89c0267172534e417e41")
+ version("6.0.2", sha256="61e755d710ff38425df3d262d1ad4c510d52d3c64e3fe15140c2575eba316949")
+ version("6.0.0", sha256="0053b42402fd007e5ca9b3186c70f2c6f1b3026558f328722adadc2838c51309")
version("5.7.1", sha256="4d79cb0482b2f801cc7824172743e3dd2b44b9f6784d1ca2e5067f2fbb4ef803")
version("5.7.0", sha256="a399db3d9fc113ce2dd1ab5608a1cf9129ec4b6a2a79ab7922b1d9f43c454640")
version("5.6.1", sha256="9e94f9a941202c3d7ce917fd1cd78c4e0f06f48d6c929f3aa916378ccef1e02c")
version("5.6.0", sha256="88be875948a29454b8aacced8bb8ad967502a7a074ecbc579ed673c1650a2f7e")
version("5.5.1", sha256="37f32350bfaf6c697312628696d1b1d5fd9165f183882759bc6cb9a5d65b9430")
version("5.5.0", sha256="0703f49b1c2924cc1d3f613258eabdff1925cb5bcf7cf22bb6b955dd065e4ce8")
- version("5.4.3", sha256="34d550272e420684230ceb7845aefcef79b155e51cf9ec55e31fdba2a4ed177b")
- version("5.4.0", sha256="4b110c9ec104ec39fc458b1b6f693662ab75395b75ed402b671d8e58c7ae63fe")
- version("5.3.3", sha256="c2c2a377c2e84f0c40297a97b6060dddc49183c2771b833ebe91ed98a98e4119")
- version("5.3.0", sha256="8f72ad825a021d5199fb73726b4975f20682beb966e0ec31b53132bcd56c5408")
- version("5.2.3", sha256="fcf4f75a8daeca81ecb107989712c5f3776ee11e6eed870cb93efbf66ff1c384")
- version("5.2.1", sha256="07ad3be6f8c7d3f0a1b8b79950cd7839fb82972cef373dccffdbda32a3aca760")
- version("5.2.0", sha256="7bce567ff4e087598eace2cae72d24c98b2bcc93af917eafa61ec9d1e8ef4477")
- version("5.1.3", sha256="8a19ce60dc9221545aa50e83e88d8c4be9bf7cde2425cefb13710131dc1d7b1b")
- version("5.1.0", sha256="21b31b43015b77a9119cf4c1d4ff3864f9ef1f34e2a52a38f985a3f710dc5f87")
- version(
- "5.0.2",
- sha256="a169129e4ecd1cca134039dc1bf91e1b3721768781abfae4ae61fad60a633472",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="9d0e560072f815b441528a5d6124e901570a5a04e9cff1f21329861609b37203",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="d4a34db26852defb62817aa44f08ef96d678c63a6f33425bc9d48c18e5e37b7a",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="43a2cc2ec548cc28698ca4fa01a947a4414febd433936a8d9770bf6f6ed55e4f",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="ea2f9d8a9999e4aac1cb969e6bf2a9f0b6d02f29d0c319b36cce26412ab8a8b0",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="c3ff56a14d334cb688a2e9a748dac46d9c2f7f576fe1f53416b1a0edbe842f8b",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="c31bf91c492f00d0c5ab21e45afbd7baa990e4a8d7ce9b01e3b988e5fdd53f50",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="0c1d2152e40e14bb385071ae16e7573290fb9f74afa5ab887c54f4dd75849a6b",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="93d19229b5a511021bf836ddc2a9922e744bf8ee52ee0e2829645064301320f4",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="8bb2142640d1c6bf141f19accf809e61377a6e0c0222e47ac4daa5da2c85ddac",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="b2934b112542af56de2dc1d5bffff59957e21050db6e3e5abd4c99e46d4a0ffe",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="86250c9ae9dfb18d4f7259a5f2f09b21574d4996fe5034a739ce63a27acd0082",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="72d2a3deda0b55a2d92833cd648f50c7cb64f8341b254a0badac0152b26f1391",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="a5d2ec3570d018b60524f0e589c4917f03d26578443f94bde27a170c7bb21e6e",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="34d550272e420684230ceb7845aefcef79b155e51cf9ec55e31fdba2a4ed177b")
+ version("5.4.0", sha256="4b110c9ec104ec39fc458b1b6f693662ab75395b75ed402b671d8e58c7ae63fe")
+ version("5.3.3", sha256="c2c2a377c2e84f0c40297a97b6060dddc49183c2771b833ebe91ed98a98e4119")
+ version("5.3.0", sha256="8f72ad825a021d5199fb73726b4975f20682beb966e0ec31b53132bcd56c5408")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant("shared", default=True, description="Build shared or static library")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3:", type="build")
- depends_on("python@3:", type=("build", "run"), when="@3.9.0:")
+ depends_on("python@3:", type=("build", "run"))
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
+
+ patch(
+ "https://github.com/ROCm/rocm_smi_lib/commit/11f12b86517d0e9868f4d16d74d4e8504c3ba7da.patch?full_index=1",
+ sha256="62be7262f6e1e71bf82a03f500a424a536638f04e913d0f4b477f60e8e1190fd",
+ when="@6.1.1:",
+ )
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
- patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@4.5.2:5.6")
+ patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@:5.6")
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("CMAKE_INSTALL_LIBDIR", "lib"),
+ self.define("BUILD_TESTS", self.run_tests),
]
+ if self.spec.satisfies("@5.7.0:"):
+ args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
return args
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
@run_after("install")
def post_install(self):
@@ -147,68 +107,8 @@ class RocmSmiLib(CMakePackage):
os.remove(join_path(self.prefix.bin, "rsmiBindings.py"))
symlink("../bindings/rsmiBindings.py", join_path(self.prefix.bin, "rsmiBindings.py"))
- test_src_dir = "tests/rocm_smi_test"
-
- @run_after("install")
- def cache_test_sources(self):
- """Copy the tests source files after the package is installed to an
- install test subdirectory for use during `spack test run`."""
- if self.spec.satisfies("@:5.1.0"):
- return
- self.cache_extra_test_sources([self.test_src_dir])
-
- def test(self):
- if self.spec.satisfies("@:5.1.0"):
- print("Skipping: stand-alone tests")
- return
- exclude = "rsmitst.exclude"
- TOPOLOGY_SYSFS_DIR = "/sys/devices/virtual/kfd/kfd/topology/nodes"
- test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
- with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- prefixes = ";".join([self.spec["rocm-smi-lib"].prefix])
- cc_options = [
- "-DCMAKE_PREFIX_PATH=" + prefixes,
- "-DROCM_DIR=" + self.spec["rocm-smi-lib"].prefix,
- ".",
- ]
- self.run_test(cmake_bin, cc_options)
- make()
-
- # Since rsmitst internally attempts to run for every gpu the exclude test list will
- # be the union of all the excludes for all the devices on the system
- disabled_tests = ""
- if os.path.exists(TOPOLOGY_SYSFS_DIR):
- for file in os.listdir(TOPOLOGY_SYSFS_DIR):
- name_file = os.path.join(TOPOLOGY_SYSFS_DIR, str(file), "name")
- if os.path.exists(name_file):
- with open(name_file, "r") as f:
- node = f.readline().strip("\n")
- if node:
- cmd = "source " + exclude + ' && echo "${FILTER[' + node + ']}"'
- node_tests = subprocess.check_output(
- cmd, shell=True, executable="/bin/bash"
- )
- node_tests = node_tests.decode("utf-8").strip("\n")
- if node_tests:
- disabled_tests = disabled_tests + node_tests + ":"
-
- # disable tests under virtualization
- cmd = "source " + exclude + ' && echo "${FILTER[virtualization]}"'
- virtualization_tests = subprocess.check_output(cmd, shell=True, executable="/bin/bash")
- virtualization_tests = virtualization_tests.decode("utf-8").strip("\n")
- disabled_tests = disabled_tests + virtualization_tests
-
- # disable test that requires --privileged permissions
- privileged_tests = ":".join(
- [
- "rsmitstReadWrite.TestPerfLevelReadWrite",
- "rsmitstReadWrite.TestFrequenciesReadWrite",
- "rsmitstReadWrite.TestPciReadWrite",
- "rsmitstReadWrite.TestPerfCntrReadWrite",
- ]
- )
- disabled_tests = disabled_tests + ":" + privileged_tests
-
- self.run_test("rsmitst64", "--gtest_filter=-" + disabled_tests)
- make("clean")
+ @run_after("build")
+ @on_package_attributes(run_tests=True)
+ def check_build(self):
+ exe = which(join_path(self.build_directory, "tests", "rocm_smi_test", "rsmitst"))
+ exe()
diff --git a/var/spack/repos/builtin/packages/rocm-smi/package.py b/var/spack/repos/builtin/packages/rocm-smi/package.py
deleted file mode 100644
index 0cc265c849..0000000000
--- a/var/spack/repos/builtin/packages/rocm-smi/package.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class RocmSmi(MakefilePackage):
- """This tool exposes functionality for clock and temperature
- management of your ROCm enabled system
-
- Note: After ROCm 3.9, this project moved to
- https://github.com/RadeonOpenCompute/rocm_smi_lib/tree/master/python_smi_tools
- The spack package is called: rocm-smi-lib"""
-
- homepage = "https://github.com/RadeonOpenCompute/ROC-smi"
- url = "https://github.com/RadeonOpenCompute/ROC-smi/archive/rocm-4.1.0.tar.gz"
-
- maintainers("srekolam", "renjithravindrankannath")
- tags = ["rocm"]
-
- version(
- "4.1.0",
- sha256="5f9f551f93f673f4b508f47a7f24bce903288ffb08fa9e4c8e0956a4a57865c2",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="bf8738ae81c0a02d83eb9437b93dc153fb63f659f3b04d454024e30678b43575",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="b1c7e529e8fcc53fb6b40a4126651da0ab07bcb91faac99519ba9660412ea4ed",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="af3cc6d5e2296f47b1873339faad2d27cf2f24725771bf34c7f644d20cc6ef3b",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="248d9bddc3353c74defd57f203df0648278a4613f2af7fb838d92a4bc8de575d",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="4e34b3b4e409bb89677882f47d9988d56bc2d9bb9893f0712c22a4b73789e06a",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="4f46e947c415a4ac12b9f6989f15a42afe32551706b4f48476fba3abf92e8e7c",
- deprecated=True,
- )
-
- depends_on("python@3:", type="run")
-
- def install(self, spec, prefix):
- filter_file(
- "^#!/usr/bin/python3",
- "#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command.path)),
- "rocm_smi.py",
- )
- mkdir(prefix.bin)
- copy("rocm_smi.py", prefix.bin)
- symlink("rocm_smi.py", prefix.bin.rocm_smi)
diff --git a/var/spack/repos/builtin/packages/rocm-tensile/0001-fix-compile-error.patch b/var/spack/repos/builtin/packages/rocm-tensile/0001-fix-compile-error.patch
deleted file mode 100644
index 18a99b0cf9..0000000000
--- a/var/spack/repos/builtin/packages/rocm-tensile/0001-fix-compile-error.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3611b904b0f9816e722b8bca779f68ae96d45d27 Mon Sep 17 00:00:00 2001
-From: sreenivasaMurthy Kolam <sreenivasamurthy.kolam@amd.com>
-Date: Thu, 22 Oct 2020 03:31:29 -0700
-Subject: [PATCH] fix compile error
-
----
- Tensile/Source/lib/include/Tensile/llvm/YAML.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp b/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-index 16e64ff9..0d00f470 100644
---- a/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-+++ b/Tensile/Source/lib/include/Tensile/llvm/YAML.hpp
-@@ -261,7 +261,7 @@ namespace llvm
-
- static void inputOne(IO& io, StringRef key, Hide<T>& value)
- {
-- Impl::inputOne(io, key, *value);
-+ Impl::inputOne(io, key.str(), *value);
- }
-
- static void output(IO& io, Hide<T>& value)
---
-2.22.0
-
diff --git a/var/spack/repos/builtin/packages/rocm-tensile/0002-require-openmp-when-tensile-use-openmp-is-on.patch b/var/spack/repos/builtin/packages/rocm-tensile/0002-require-openmp-when-tensile-use-openmp-is-on.patch
deleted file mode 100644
index 4c616d47f2..0000000000
--- a/var/spack/repos/builtin/packages/rocm-tensile/0002-require-openmp-when-tensile-use-openmp-is-on.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/HostLibraryTests/CMakeLists.txt b/HostLibraryTests/CMakeLists.txt
-index 79e1529..034f8bb 100644
---- a/HostLibraryTests/CMakeLists.txt
-+++ b/HostLibraryTests/CMakeLists.txt
-@@ -19,7 +19,7 @@
- # CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- ################################################################################
-
--cmake_minimum_required(VERSION 3.5)
-+cmake_minimum_required(VERSION 3.9)
-
- project(TensileHostLibraryTest)
-
-@@ -78,21 +78,7 @@ if(TENSILE_USE_HIP)
- endif()
-
- if(TENSILE_USE_OPENMP)
-- #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OPENMP")
-- find_package(OpenMP QUIET)
-- if (OPENMP_FOUND)
-- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
-- else()
-- if(EXISTS /etc/redhat-release)
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libgomp")
-- else()
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
-- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
-- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
-- endif()
-- endif()
-+ find_package(OpenMP REQUIRED)
- endif()
-
- add_subdirectory(configs)
-@@ -187,6 +173,6 @@ if(TENSILE_USE_HIP)
- endif()
-
- if(TENSILE_USE_OPENMP)
-- target_link_libraries(TensileTests PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
-+ target_link_libraries(TensileTests PRIVATE OpenMP::OpenMP_CXX)
- endif()
-
-diff --git a/Tensile/Source/CMakeLists.txt b/Tensile/Source/CMakeLists.txt
-index 821fd53..fe65c9e 100644
---- a/Tensile/Source/CMakeLists.txt
-+++ b/Tensile/Source/CMakeLists.txt
-@@ -61,21 +61,7 @@ if(TENSILE_NEW_CLIENT)
- endif()
-
- if(TENSILE_USE_OPENMP)
-- #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OPENMP")
-- find_package(OpenMP QUIET)
-- if (OPENMP_FOUND)
-- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
-- else ()
-- if(EXISTS /etc/redhat-release)
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libgomp")
-- else()
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
-- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
-- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
-- endif()
-- endif()
-+ find_package(OpenMP REQUIRED)
- endif()
-
- #set(TENSILE_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
-diff --git a/Tensile/Source/client/CMakeLists.txt b/Tensile/Source/client/CMakeLists.txt
-index 9ccba86..081280b 100644
---- a/Tensile/Source/client/CMakeLists.txt
-+++ b/Tensile/Source/client/CMakeLists.txt
-@@ -52,12 +52,8 @@ target_link_libraries(TensileClient TensileHost ${Boost_LIBRARIES} rocm_smi)
- add_executable(tensile_client main.cpp)
-
- target_link_libraries(tensile_client PRIVATE TensileHost TensileClient ${Boost_LIBRARIES})
--if(OpenMP_FOUND)
-- target_link_libraries(tensile_client PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
--else()
-- set(OPENMP_LIBRARY /usr/lib/x86_64-linux-gnu/libomp.so)
-- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_LIBRARY}")
-- target_link_libraries(tensile_client PRIVATE "${OpenMP_EXE_LINKER_FLAGS}")
-+if(TENSILE_USE_OPENMP)
-+ target_link_libraries(tensile_client PRIVATE OpenMP::OpenMP_CXX)
- endif()
-
- foreach(arch IN LISTS TENSILE_GPU_ARCHS)
diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py
index c92e4b34d6..e825788976 100644
--- a/var/spack/repos/builtin/packages/rocm-tensile/package.py
+++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py
@@ -11,106 +11,38 @@ from spack.pkg.builtin.boost import Boost
class RocmTensile(CMakePackage):
"""Radeon Open Compute Tensile library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/Tensile/"
- git = "https://github.com/ROCmSoftwarePlatform/Tensile.git"
- url = "https://github.com/ROCmSoftwarePlatform/Tensile/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/Tensile/"
+ git = "https://github.com/ROCm/Tensile.git"
+ url = "https://github.com/ROCm/Tensile/archive/rocm-6.1.1.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("srekolam", "renjithravindrankannath", "haampie")
+ version("6.2.4", sha256="dd0721e4371c8752aa4b14362f75d7ebb7805f57dcb990e03ae08cef4a291383")
+ version("6.2.1", sha256="29802dc65a7cea29f0e2608782c75db87e9c71eea8aeb485e856cf2861d83098")
+ version("6.2.0", sha256="6f7d679bfffd1f723f2788b00fdcb1b4673b597f9f85c2cdaab3c2aa17afb33d")
+ version("6.1.2", sha256="6a08190f6d9c8cc76764a68e2dd3e7af4759d4146ddc1c4b3370c7762a6f6d83")
+ version("6.1.1", sha256="04fd76e6a0e9b7528e61df0721b03c0e977c145a2a1ea331d515c9167d7ac35f")
+ version("6.1.0", sha256="69bfdc711d3a86e6651b1dcfb2c461c7d3ae574e6d884833d4e07d3e7ad06491")
+ version("6.0.2", sha256="1d8a92422560c1e908fa25fd97a4aa07a96659528a543f77618408ffcfe1f307")
+ version("6.0.0", sha256="5d90add62d1439b7daf0527316e950e454e5d8beefb4f723865fe9ab26c7aa42")
version("5.7.1", sha256="9211a51b23c22b7a79e4e494e8ff3c31e90bf21adb8cce260acc57891fb2c917")
version("5.7.0", sha256="fe2ae067c1c579f33d7a1e26da3fe6b4ed44befa08f9dfce2ceae586f184b816")
version("5.6.1", sha256="3e78c933563fade8781a1dca2079bff135af2f5d2c6eb0147797d2c1f24d006c")
version("5.6.0", sha256="383728ecf49def59ab9a7f8a1d1e2eaf8b528e36b461e27030a2aab1a1ed80cb")
version("5.5.1", sha256="b65cb7335abe51ba33be9d46a5ede992b4e5932fa33797397899a6bf33a770e9")
version("5.5.0", sha256="70fd736d40bb4c3461f07c77ad3ae6c485e3e842671ce9b223d023d836884ae2")
- version("5.4.3", sha256="a4c5e62edd33ea6b8528eb3f017a14c28eaa67c540f5c9023f6a245340198b0f")
- version("5.4.0", sha256="2da9c1df3c6d9b44afdad621ef59a03389fb1a38a61a8b8bad9c9991b97157eb")
- version("5.3.3", sha256="ecb99243edf1cd2bb5e953915a7dae7867c3cdb0cd8ed15b8618aaaeb2bd7b29")
- version("5.3.0", sha256="05c546986549154e6c7b4f57a0b3bfd5cb223d2393c206ff1702f89454c832f4")
- version("5.2.3", sha256="840698bf2ac62e08ae76c3843f1dad5367ed098d42e6a5fa7953de70642fd2cf")
- version("5.2.1", sha256="49582e28f7e14fed6a66c59482a41d3899c1eb8e7aa0ce40a7a2e806dadc536b")
- version("5.2.0", sha256="aa6107944482ad278111d11d2e926393423fc70e7e1838574fe7ad9f553bdacf")
- version("5.1.3", sha256="87020ca268e3a1ed8853f629839d6497764d862bd70b8775e98de439f6c89f1d")
- version("5.1.0", sha256="0ac86a623597152c5b1d8bb5634aad3e55afa51959476aaa5e9869d259ddf375")
- version(
- "5.0.2",
- sha256="c6130de3b02f4f10635d18f913b3b88ea754fce2842c680e9caf5a6781da8f37",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="2a814ee8576ff1f06cc5ac4556300c8e7cbf77ef8c87b56992f3e66d8862f213",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="da20256224749c0a8b44aaede25fbcd66cfeac483081af5d22f1d1fcf49dffc1",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="26a27659c864b5372ca4407671c6e8d4be3bbc05c64fc18762ad570cd3b3af1f",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="6fce0ac22051a454fe984283766eb473dc50752cd30bad05acb3dbde6ef4f8b1",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="911c0cdb0146d43a2a59170e6a803f414a2b68df7d9ff369ab784d11a08d7264",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="198e357a14a79366b27b1097856d4821996bc36163be0cd2668910b253721060",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="92b8ee13dfc11a67d5136227ee985622685790fd3f0f0e1ec6db411d4e9a3419",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="cf105ce8c3e352d19713b3bf8bda77f25c1a692c4f2ca82d631ba15523ecc1cd",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="8d5b50aadfa56a9195e4c387b8eb351c9b9b7671b136b624e07fe28db24bd330",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="17a011f8c3433d4f8c2dddabd5854cf96c406d24592b3942deb51672c570882e",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="c78a11db85fdf54bfd26533ee6fa98f6a6e789fa423537993061497ac5f22ed6",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="488a7f76ea42a7601d0557f53068ec4832a2c7c06bb1b511470a4e35599a5a4d",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="71eb3eed6625b08a4cedb539dd9b596e3d4cc82a1a8063d37d94c0765b6f8257",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="a4c5e62edd33ea6b8528eb3f017a14c28eaa67c540f5c9023f6a245340198b0f")
+ version("5.4.0", sha256="2da9c1df3c6d9b44afdad621ef59a03389fb1a38a61a8b8bad9c9991b97157eb")
+ version("5.3.3", sha256="ecb99243edf1cd2bb5e953915a7dae7867c3cdb0cd8ed15b8618aaaeb2bd7b29")
+ version("5.3.0", sha256="05c546986549154e6c7b4f57a0b3bfd5cb223d2393c206ff1702f89454c832f4")
+
+ depends_on("cxx", type="build") # generated
tensile_architecture = (
"all",
- "gfx906",
- "gfx908",
- "gfx000",
- "gfx900",
"gfx906:xnack-",
"gfx908:xnack-",
"gfx90a:xnack-",
@@ -128,86 +60,12 @@ class RocmTensile(CMakePackage):
multi=True,
)
variant("openmp", default=True, description="Enable OpenMP")
- conflicts("tensile_architecture=gfx906", when="@4.0.1:")
- conflicts("tensile_architecture=gfx908", when="@4.0.1:")
depends_on("cmake@3:", type="build")
- # This is the default library format since 3.7.0
- depends_on("msgpack-c@3:", when="@3.7:")
+ depends_on("msgpack-c@3:")
depends_on("boost", type=("build", "link"))
depends_on(Boost.with_default_variants)
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- "5.6.0",
- "5.6.1",
- "5.7.0",
- "5.7.1",
- ]:
- depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
- depends_on("rocminfo@" + ver, type="build", when="@" + ver)
- for ver in [
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
- "5.5.0",
- "5.5.1",
- "5.6.0",
- "5.6.1",
- "5.7.0",
- "5.7.1",
- ]:
- depends_on("rocm-openmp-extras@" + ver, when="@" + ver)
-
- for ver in ["3.5.0", "3.7.0", "3.8.0", "3.9.0"]:
- depends_on("rocm-smi@" + ver, type="build", when="@" + ver)
-
- for ver in [
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -218,14 +76,24 @@ class RocmTensile(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocm-smi-lib@" + ver, type="build", when="@" + ver)
+ depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-smi-lib@{ver}", type="build", when=f"@{ver}")
root_cmakelists_dir = "Tensile/Source"
- # Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087
- # Not yet landed in 3.7.0, nor 3.8.0.
- patch("0001-fix-compile-error.patch", when="@3.7.0:3.8.0")
- patch("0002-require-openmp-when-tensile-use-openmp-is-on.patch", when="@3.9.0:4.0.0")
+
patch("0003-require-openmp-extras-when-tensile-use-openmp.patch", when="@5.1.0:")
def setup_build_environment(self, env):
@@ -234,16 +102,7 @@ class RocmTensile(CMakePackage):
def get_gpulist_for_tensile_support(self):
arch = self.spec.variants["tensile_architecture"].value
- if arch[0] == "all":
- if self.spec.satisfies("@:4.0.0"):
- arch_value = self.tensile_architecture[1:4]
- elif self.spec.satisfies("@4.1.0:4.2.0"):
- arch_value = self.tensile_architecture[3:6]
- elif self.spec.satisfies("@4.3.0:"):
- arch_value = self.tensile_architecture[3:]
- return arch_value
- else:
- return arch
+ return self.tensile_architecture[1:] if arch[0] == "all" else arch
def cmake_args(self):
args = [
@@ -253,19 +112,12 @@ class RocmTensile(CMakePackage):
self.define("Tensile_CODE_OBJECT_VERSION", "V3"),
self.define("Boost_USE_STATIC_LIBS", "OFF"),
self.define_from_variant("TENSILE_USE_OPENMP", "openmp"),
- self.define("BUILD_WITH_TENSILE_HOST", "ON" if "@3.7.0:" in self.spec else "OFF"),
+ self.define("BUILD_WITH_TENSILE_HOST", True),
+ self.define("Tensile_LIBRARY_FORMAT", "msgpack"),
+ self.define("TENSILE_USE_OPENMP", True),
+ self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix),
]
- if "@3.7.0:" in self.spec:
- args.append(self.define("Tensile_LIBRARY_FORMAT", "msgpack"))
- if "@5.1.0:" in self.spec:
- args.append(self.define("TENSILE_USE_OPENMP", "ON")),
- args.append(
- self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
- ),
- else:
- args.append(self.define("TENSILE_USE_OPENMP", "OFF")),
-
if self.spec.satisfies("^cmake@3.21.0:"):
args.append(
self.define("CMAKE_HIP_ARCHITECTURES", self.get_gpulist_for_tensile_support())
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch
deleted file mode 100644
index cc47c5e9d2..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fc4d98e..f1dea96 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -164,7 +164,7 @@ endif()
- message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" )
-
- if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
-- set (CMAKE_PACKAGING_INSTALL_PREFIX "/opt/rocm" )
-+ set (CMAKE_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
- endif ()
-
- ################################################################################
-@@ -369,16 +369,16 @@ if (RVS_ROCBLAS EQUAL 1)
- set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
- set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
- else()
-- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
-- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
-+ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
-+ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
- endif()
-
- if (RVS_ROCMSMI EQUAL 1)
- set(ROCM_SMI_INC_DIR "${CMAKE_BINARY_DIR}/rvs_smi-src/include")
- set(ROCM_SMI_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_smi-build")
- else()
-- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/rocm_smi/include")
-- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
-+ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
-+ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
- endif()
- set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch
deleted file mode 100644
index e1a40ac16d..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/002-remove-force-setting-hip-inc-path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 07048b8..2bfb6c2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -32,8 +32,7 @@ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
- set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
- set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
- set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
--set(HIP_INC_DIR "${ROCM_PATH}/hip" )
--set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
-+set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime")
- set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
-
- execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch
deleted file mode 100644
index edd9507673..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/003-cmake-change-to-remove-installs-and-sudo.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 780e1f17..35a2b391 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -24,10 +24,21 @@
- ################################################################################
-
- cmake_minimum_required ( VERSION 3.5.0 )
-+project ("rocm-validation-suite")
- if ( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
- message(FATAL "In-source build is not allowed")
- endif ()
-
-+enable_testing()
-+
-+# Prerequisite - Check if rocblas was already installed
-+find_package (rocblas)
-+if(rocblas_FOUND)
-+ message(STATUS "rocblas found")
-+else()
-+ message(FATAL_ERROR "rocblas not found !!! Install rocblas to proceed ...")
-+endif(rocblas_FOUND)
-+
- set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
- set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
- set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
-@@ -36,7 +47,6 @@ set(HIP_INC_DIR "${ROCM_PATH}/hip" )
- set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
- set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
-
--execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
-
- #
- # If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their
-@@ -45,20 +55,17 @@ execute_process(COMMAND ln -s /usr/bin/python3 /usr/bin/python)
- #
- if(DEFINED CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of
--build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
--Release RelWithDebInfo MinSizeRel.")
-+ build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
-+ Release RelWithDebInfo MinSizeRel.")
- else()
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build,
--options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
--RelWithDebInfo MinSizeRel.")
-+ options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
-+ RelWithDebInfo MinSizeRel.")
- endif()
-
--project ("rocm-validation-suite")
--enable_testing()
- #include ( CTest )
-
--if (NOT CMAKE_CONFIGURATION_TYPES)
--# message( "CMAKE_CONFIGURATION_TYPES not set")
-+if(NOT CMAKE_CONFIGURATION_TYPES)
- # Set the possible values of build type for cmake-gui
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
- "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
-@@ -70,17 +77,15 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rvs_os_helper.sh
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
--if(result)
-+if (result)
- message(FATAL_ERROR "Could not obtain OS type: ${result}")
- endif()
- message(STATUS "RVS_OS_TYPE: ${RVS_OS_TYPE}")
- if (${RVS_OS_TYPE} STREQUAL "ubuntu")
- set(RVS_OS_TYPE_NUM 1)
-- execute_process(COMMAND sudo apt-get install rocblas --assume-yes)
- elseif ((${RVS_OS_TYPE} STREQUAL "centos") OR (${RVS_OS_TYPE} STREQUAL "rhel")
- OR (${RVS_OS_TYPE} STREQUAL "sles"))
- set(RVS_OS_TYPE_NUM 2)
-- execute_process(COMMAND sudo yum -y install rocblas )
- else()
- set(RVS_OS_TYPE_NUM 0)
- endif()
-@@ -89,7 +94,7 @@ message(STATUS "RVS_OS_TYPE_NUM: ${RVS_OS_TYPE_NUM}")
- ## Set default module path if not already set
- if ( NOT DEFINED CMAKE_MODULE_PATH )
- set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" )
--endif ()
-+endif()
-
- ## Include common cmake modules
- include ( utils )
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch
deleted file mode 100644
index 6224329bab..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ff77558..278a732 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -207,36 +207,7 @@ if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
- endif ()
-
- ################################################################################
--# Download and unpack yaml-cpp at configure time
--configure_file(CMakeYamlDownload.cmake yaml-download/CMakeLists.txt)
--execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
--if(result)
-- message(FATAL_ERROR "CMake step for yaml-download failed: ${result}")
--endif()
--execute_process(COMMAND ${CMAKE_COMMAND} --build .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
--if(result)
-- message(FATAL_ERROR "Build step for yaml-download failed: ${result}")
--endif()
--execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/yaml-src -B${CMAKE_BINARY_DIR}/yaml-build
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src )
--if(result)
-- message(FATAL_ERROR "Config step for yaml-src failed: ${result}")
--endif()
-
--add_custom_target(rvs_yaml_target
-- DEPENDS ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
--)
--
--add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
-- COMMAND make -C ${CMAKE_BINARY_DIR}/yaml-build
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src
-- COMMENT "Generating yaml-cpp targets"
-- VERBATIM)
-
- ################################################################################
- ## GOOGLE TEST
-@@ -446,7 +417,7 @@ if (RVS_BUILD_TESTS)
- add_subdirectory(testif.so)
- endif()
-
--add_dependencies(rvshelper rvs_bin_folder rvs_doc rvs_yaml_target)
-+add_dependencies(rvshelper rvs_bin_folder rvs_doc)
-
-
- add_dependencies(pesm rvslib rvslibrt)
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/005-cleanup-path-reference-donot-download-googletest-yaml.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/005-cleanup-path-reference-donot-download-googletest-yaml.patch
deleted file mode 100644
index 2162ac4516..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/005-cleanup-path-reference-donot-download-googletest-yaml.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9ce8b3b..8644d10 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -43,14 +43,12 @@ endif(rocblas_FOUND)
- # variables since we will pass them as cmake params appropriately, and
- # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH
- set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
--set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
--set(CMAKE_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages")
-+set (CMAKE_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
- list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}")
--set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
--set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
--set(HIP_INC_DIR "${ROCM_PATH}/hip" )
--set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
--set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
-+set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime")
-+set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime")
-+set(HIP_INC_DIR "${ROCM_PATH}/hip" CACHE PATH "Contains header files exported by ROC Runtime")
-+set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk")
-
-
- #
-@@ -162,8 +160,6 @@ set(RVS_ROCBLAS "0" CACHE STRING "1 = use local rocBLAS")
- set(RVS_ROCMSMI "0" CACHE STRING "1 = use local rocm_smi_lib")
-
- set(RVS_LIB_DIR "${CMAKE_BINARY_DIR}/rvslib" CACHE PATH "Contains RVS library")
--set(YAML_INC_DIR "${CMAKE_BINARY_DIR}/yaml-src/include" CACHE PATH "Contains header files exported by yaml-cpp")
--set(YAML_LIB_DIR "${CMAKE_BINARY_DIR}/yaml-build" CACHE PATH "Contains library files exported by yaml-cpp")
-
- if (${RVS_OS_TYPE} STREQUAL "centos")
- set(ROCT_LIB_DIR "${ROCM_PATH}/lib64" CACHE PATH "Contains library files exported by ROC Trunk")
-@@ -207,86 +203,6 @@ if (NOT DEFINED CPACK_GENERATOR )
- endif()
- message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" )
-
--
--################################################################################
--# Download and unpack yaml-cpp at configure time
--configure_file(CMakeYamlDownload.cmake yaml-download/CMakeLists.txt)
--execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
--if(result)
-- message(FATAL_ERROR "CMake step for yaml-download failed: ${result}")
--endif()
--execute_process(COMMAND ${CMAKE_COMMAND} --build .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
--if(result)
-- message(FATAL_ERROR "Build step for yaml-download failed: ${result}")
--endif()
--execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/yaml-src -B${CMAKE_BINARY_DIR}/yaml-build
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src )
--if(result)
-- message(FATAL_ERROR "Config step for yaml-src failed: ${result}")
--endif()
--
--add_custom_target(rvs_yaml_target
-- DEPENDS ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
--)
--
--add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
-- COMMAND make -C ${CMAKE_BINARY_DIR}/yaml-build
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src
-- COMMENT "Generating yaml-cpp targets"
-- VERBATIM)
--
--################################################################################
--## GOOGLE TEST
--if(RVS_BUILD_TESTS)
-- # Download and unpack googletest at configure time
-- configure_file(CMakeGtestDownload.cmake googletest-download/CMakeLists.txt)
-- execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
-- if(result)
-- message(FATAL_ERROR "CMake step for googletest failed: ${result}")
-- endif()
-- execute_process(COMMAND ${CMAKE_COMMAND} --build .
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
-- if(result)
-- message(FATAL_ERROR "Build step for googletest failed: ${result}")
-- endif()
-- execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/googletest-src -B${CMAKE_BINARY_DIR}/googletest-build
-- RESULT_VARIABLE result
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-src )
-- if(result)
-- message(FATAL_ERROR "Config step for googletest-src failed: ${result}")
-- endif()
--
-- add_custom_target(rvs_gtest_target
-- DEPENDS ${CMAKE_BINARY_DIR}/googletest-build/lib/libgtest_main.a
-- )
--
-- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/googletest-build/lib/libgtest_main.a
-- COMMAND make -C ${CMAKE_BINARY_DIR}/googletest-build
-- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-src
-- COMMENT "Generating googletest targets"
-- VERBATIM)
--
-- ## Set default unit test framework include path
-- if (NOT DEFINED UT_INC)
-- set (UT_INC "${CMAKE_BINARY_DIR}/googletest-src/googletest/include")
-- message ("UT_INC ${UT_INC}")
-- endif ()
--
-- ## Set default unit test framework include path
-- if (NOT DEFINED UT_LIB)
-- set (UT_LIB "${CMAKE_BINARY_DIR}/googletest-build/lib")
-- message ("UT_LIB ${UT_LIB}")
-- endif()
--
--endif()
- ################################################################################
- ## rocBLAS
-
-@@ -410,16 +326,16 @@ if (RVS_ROCBLAS EQUAL 1)
- set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
- set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
- else()
-- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
-- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
-+ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
-+ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
- endif()
-
- if (RVS_ROCMSMI EQUAL 1)
- set(ROCM_SMI_INC_DIR "${CMAKE_BINARY_DIR}/rvs_smi-src/include")
- set(ROCM_SMI_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_smi-build")
- else()
-- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/rocm_smi/include")
-- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
-+ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
-+ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
- endif()
- set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
-
-@@ -454,7 +370,7 @@ if (RVS_BUILD_TESTS)
- add_subdirectory(testif.so)
- endif()
-
--add_dependencies(rvshelper rvs_bin_folder rvs_doc rvs_yaml_target)
-+add_dependencies(rvshelper rvs_bin_folder rvs_doc)
-
-
- add_dependencies(pesm rvslib rvslibrt)
-@@ -489,7 +405,7 @@ if (RVS_BUILD_TESTS)
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Create the bintest directory"
- VERBATIM)
-- add_dependencies(rvshelper rvs_bintest_folder rvs_gtest_target)
-+ add_dependencies(rvshelper rvs_bintest_folder)
- endif()
-
- add_custom_target(rvs_doc ALL
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch
deleted file mode 100644
index 229e256f58..0000000000
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch
+++ /dev/null
@@ -1,371 +0,0 @@
-diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt
-index f4e57c7..fb66263 100644
---- a/babel.so/CMakeLists.txt
-+++ b/babel.so/CMakeLists.txt
-@@ -113,13 +113,13 @@ set(ROCBLAS_LIB "rocblas")
- set(HIP_HCC_LIB "amdhip64")
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -139,16 +139,16 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${HIP_PATH})
-
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt
-index 851e24c..3697b4f 100644
---- a/edp.so/CMakeLists.txt
-+++ b/edp.so/CMakeLists.txt
-@@ -108,13 +108,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_HCC_BUILD_FLAGS}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}")
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -134,15 +134,15 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR})
-+link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpciaccess.so libpci.so libm.so)
-
-diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt
-index 7ce465a..c61c52b 100644
---- a/gst.so/CMakeLists.txt
-+++ b/gst.so/CMakeLists.txt
-@@ -117,13 +117,13 @@ else()
- endif()
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt
-index 278c084..5ba9007 100644
---- a/iet.so/CMakeLists.txt
-+++ b/iet.so/CMakeLists.txt
-@@ -122,13 +122,13 @@ else()
- endif()
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -147,8 +147,8 @@ if(DEFINED RVS_ROCMSMI)
- endif()
- endif()
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -162,9 +162,9 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt
-index ec1c01d..c8e040a 100644
---- a/mem.so/CMakeLists.txt
-+++ b/mem.so/CMakeLists.txt
-@@ -114,13 +114,13 @@ set(ROCBLAS_LIB "rocblas")
- set(HIP_HCC_LIB "amdhip64")
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -140,16 +140,16 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${HIP_PATH})
-
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt
-index f88f7c1..f5eb246 100644
---- a/pebb.so/CMakeLists.txt
-+++ b/pebb.so/CMakeLists.txt
-@@ -135,20 +135,20 @@ else()
- endif()
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR})
-+if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so)
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ pci ${ROCR_INC_DIR})
-+include_directories(./ ../ pci ${HSA_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt
-index c99b511..35490fc 100644
---- a/perf.so/CMakeLists.txt
-+++ b/perf.so/CMakeLists.txt
-@@ -117,13 +117,13 @@ else()
- endif()
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
-+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
-@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI)
- endif()
-
-
--if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
-+include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt
-index a887606..9bd797d 100644
---- a/pesm.so/CMakeLists.txt
-+++ b/pesm.so/CMakeLists.txt
-@@ -118,7 +118,7 @@ endif()
- ## define include directories
- include_directories(./ ../ pci)
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
-
-diff --git a/pqt.so/CMakeLists.txt b/pqt.so/CMakeLists.txt
-index d59b254..7cb3743 100644
---- a/pqt.so/CMakeLists.txt
-+++ b/pqt.so/CMakeLists.txt
-@@ -134,20 +134,20 @@ else()
- endif()
-
- # Determine Roc Runtime header files are accessible
--if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h)
-- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR})
-+if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h)
-+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH})
- RETURN()
- endif()
-
--if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
-- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
-+if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so)
-+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH})
- RETURN()
- endif()
-
- ## define include directories
--include_directories(./ ../ pci ${ROCR_INC_DIR})
-+include_directories(./ ../ pci ${HSA_PATH})
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so)
-
-diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt
-index 072c49d..3f00c7a 100644
---- a/rcqt.so/CMakeLists.txt
-+++ b/rcqt.so/CMakeLists.txt
-@@ -120,7 +120,7 @@ endif()
- ## define include directories
- include_directories(./ ../)
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR})
- ## additional libraries
- set (PROJECT_LINK_LIBS rvslibrt rvslib)
-
-diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt
-index 642902c..7acaec4 100644
---- a/rvslib/CMakeLists.txt
-+++ b/rvslib/CMakeLists.txt
-@@ -120,7 +120,7 @@ endif()
-
- ## define include directories
- include_directories(./ ../
-- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}
-+ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH}
- )
- link_directories(${ASAN_LIB_PATH})
-
-diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt
-index 678c980..53e0aa9 100644
---- a/testif.so/CMakeLists.txt
-+++ b/testif.so/CMakeLists.txt
-@@ -119,7 +119,7 @@ endif()
- ## define include directories
- include_directories(./ ../ pci)
- # Add directories to look for library files to link
--link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
-+link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
- ## additional libraries
- set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
-
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.1.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.1.patch
new file mode 100644
index 0000000000..422ab6ddc4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.1.patch
@@ -0,0 +1,543 @@
+From 18a4feabdac234a1af62ae458be44e24c63017e2 Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Mon, 20 May 2024 22:56:55 -0700
+Subject: [PATCH] Updating cmake with include and library path for spack for
+ 6.1
+
+---
+ CMakeLists.txt | 22 +++++++++++-----------
+ babel.so/CMakeLists.txt | 18 +++++++++---------
+ cmake_modules/tests_unit.cmake | 3 ++-
+ edp.so/CMakeLists.txt | 8 ++++----
+ gm.so/CMakeLists.txt | 6 +++---
+ gpup.so/CMakeLists.txt | 6 +++---
+ gst.so/CMakeLists.txt | 8 ++++----
+ iet.so/CMakeLists.txt | 6 +++---
+ mem.so/CMakeLists.txt | 6 +++---
+ pbqt.so/CMakeLists.txt | 6 +++---
+ pebb.so/CMakeLists.txt | 4 ++--
+ peqt.so/CMakeLists.txt | 6 +++---
+ perf.so/CMakeLists.txt | 8 ++++----
+ pesm.so/CMakeLists.txt | 6 +++---
+ rcqt.so/CMakeLists.txt | 6 +++---
+ rvs/CMakeLists.txt | 16 +++++++++-------
+ rvslib/CMakeLists.txt | 2 +-
+ smqt.so/CMakeLists.txt | 6 +++---
+ testif.so/CMakeLists.txt | 6 +++---
+ tst.so/CMakeLists.txt | 2 +-
+ 20 files changed, 77 insertions(+), 74 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6bce31b..f7e31c9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,14 +74,14 @@ endif(rocblas_FOUND)
+ # Making ROCM_PATH, CMAKE_INSTALL_PREFIX, CPACK_PACKAGING_INSTALL_PREFIX as CACHE
+ # variables since we will pass them as cmake params appropriately, and
+ # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH
+-set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
+-set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
+-set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages")
++set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
++set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}")
+-set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+-set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
+-set(HIP_INC_DIR "${ROCM_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
+-set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
++set(ROCR_INC_DIR "${HSA_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCR_LIB_DIR "${HSA_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime")
++set(HIP_INC_DIR "${HIP_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk")
+
+ add_definitions(-DROCM_PATH="${ROCM_PATH}")
+ if(FETCH_ROCMPATH_FROM_ROCMCORE)
+@@ -447,8 +447,8 @@ if (RVS_ROCBLAS EQUAL 1)
+ set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
+ set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
+ else()
+- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
+- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
++ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
+ endif()
+
+ if (RVS_ROCMSMI EQUAL 1)
+@@ -463,8 +463,8 @@ else()
+ set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
+ else()
+ message( STATUS "ROCBLAS REORG Enabled Version: ${RVS_ROCBLAS_VERSION_FLAT}" )
+- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/include")
+- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
++ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
+ endif()
+ endif()
+ set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
+diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt
+index 54a0e3a..bfa0069 100644
+--- a/babel.so/CMakeLists.txt
++++ b/babel.so/CMakeLists.txt
+@@ -109,13 +109,13 @@ set(HIP_HCC_LIB "amdhip64")
+ add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT})
+
+ # Determine Roc Runtime header files are accessible
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+@@ -135,16 +135,16 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
+- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${HIP_PATH})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+ set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
+
+@@ -156,7 +156,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/cmake_modules/tests_unit.cmake b/cmake_modules/tests_unit.cmake
+index 9760b72..2d3a05b 100644
+--- a/cmake_modules/tests_unit.cmake
++++ b/cmake_modules/tests_unit.cmake
+@@ -27,7 +27,7 @@
+ ## define additional unit testing include directories
+ include_directories(${UT_INC})
+ ## define additional unit testing lib directories
+-link_directories(${UT_LIB} ${RVS_LIB_DIR})
++link_directories(${UT_LIB} ${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+
+ file(GLOB TESTSOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/test*.cpp )
+ #message ( "TESTSOURCES: ${TESTSOURCES}" )
+@@ -46,6 +46,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES})
+ add_dependencies(${TEST_NAME} rvs_gtest_target)
+ target_link_libraries(${TEST_NAME}
+ ${UT_LINK_LIBS} rvslibut rvslib gtest_main gtest pthread pci
++ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so
+ )
+ target_compile_definitions(${TEST_NAME} PUBLIC RVS_UNIT_TEST)
+ if(DEFINED tcd.${TEST_NAME})
+diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt
+index 7dd34ea..a208bac 100644
+--- a/edp.so/CMakeLists.txt
++++ b/edp.so/CMakeLists.txt
+@@ -128,17 +128,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set (SOURCES src/rvs_module.cpp src/action.cpp src/edp_worker.cpp )
+diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt
+index d3caa84..73b83ce 100644
+--- a/gm.so/CMakeLists.txt
++++ b/gm.so/CMakeLists.txt
+@@ -118,11 +118,11 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCM_SMI_INC_DIR})
++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+ link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+@@ -133,7 +133,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt
+index 43d337a..9b07004 100644
+--- a/gpup.so/CMakeLists.txt
++++ b/gpup.so/CMakeLists.txt
+@@ -109,11 +109,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ include ../include)
++include_directories(./ ../ include ../include ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt
+index fd346ce..0debf98 100644
+--- a/gst.so/CMakeLists.txt
++++ b/gst.so/CMakeLists.txt
+@@ -137,17 +137,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/gst_worker.cpp)
+diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt
+index a85ca98..252e565 100644
+--- a/iet.so/CMakeLists.txt
++++ b/iet.so/CMakeLists.txt
+@@ -140,7 +140,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+ endif()
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -159,7 +159,7 @@ include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR
+ # Add directories to look for library files to link
+ link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/iet_worker.cpp )
+
+@@ -168,7 +168,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_INC_DIR}/lib/ ${HIP_HCC_LIB} ${ROCBLAS_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt
+index 5133337..2462bbc 100644
+--- a/mem.so/CMakeLists.txt
++++ b/mem.so/CMakeLists.txt
+@@ -134,7 +134,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -143,9 +143,9 @@ endif()
+ include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/rvs_memtest.cpp src/rvs_memworker.cpp)
+diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt
+index 5ae675a..892b6ac 100644
+--- a/pbqt.so/CMakeLists.txt
++++ b/pbqt.so/CMakeLists.txt
+@@ -136,11 +136,11 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci ${ROCR_INC_DIR})
++include_directories(./ ../ pci ${ROCR_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt
+index c4e2964..7a6b368 100644
+--- a/pebb.so/CMakeLists.txt
++++ b/pebb.so/CMakeLists.txt
+@@ -139,9 +139,9 @@ endif()
+ ## define include directories
+ include_directories(./ ../ pci ${ROCR_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} )
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt
+index ead507d..8623ee9 100644
+--- a/peqt.so/CMakeLists.txt
++++ b/peqt.so/CMakeLists.txt
+@@ -107,9 +107,9 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${HSA_PATH})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+ set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
+
+@@ -121,7 +121,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt
+index 518dac9..02d2245 100644
+--- a/perf.so/CMakeLists.txt
++++ b/perf.so/CMakeLists.txt
+@@ -137,7 +137,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -145,9 +145,9 @@ endif()
+ ## define include directories
+ include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/perf_worker.cpp)
+@@ -157,7 +157,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt
+index 1f27f34..729fb5f 100644
+--- a/pesm.so/CMakeLists.txt
++++ b/pesm.so/CMakeLists.txt
+@@ -107,11 +107,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt
+index c0099ab..8d92982 100644
+--- a/rcqt.so/CMakeLists.txt
++++ b/rcqt.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib)
++set (PROJECT_LINK_LIBS rvslib ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES
+diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt
+index 3909be8..d55423b 100644
+--- a/rvs/CMakeLists.txt
++++ b/rvs/CMakeLists.txt
+@@ -34,6 +34,7 @@ set ( RVS "rvs" )
+ set ( RVS_PACKAGE "rvs-roct" )
+ set ( RVS_COMPONENT "lib${RVS}" )
+ set ( RVS_TARGET "${RVS}" )
++set ( YAML_CPP_LIBRARIES "${YAML_CPP_LIB_PATH}")
+
+ project ( ${RVS_TARGET} )
+
+@@ -115,19 +116,20 @@ endif()
+ ## define include directories
+ include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
+ ## define lib directories
+-link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${RVS_LIB_DIR}/.. ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${YAML_CPP_LIBRARIES})
+
+ ## additional libraries
+-set(ROCBLAS_LIB "rocblas")
+-set(ROC_THUNK_NAME "hsakmt")
+-set(CORE_RUNTIME_NAME "hsa-runtime")
+-set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+-set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES})
++set(ROCBLAS_LIB "${ROCBLAS_LIB_DIR}/librocblas.so")
++set(ROC_THUNK_NAME "${HSAKMT_LIB_DIR}/libhsakmt.a")
++set(CORE_RUNTIME_NAME "${HSA_PATH}/lib/libhsa-runtime64.so")
++set(YAML_CPP_LIB "${YAML_CPP_LIBRARIES}/libyaml-cpp.a")
++set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}")
++set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so)
+
+ ## define target
+ add_executable(${RVS_TARGET} src/rvs.cpp)
+ target_link_libraries(${RVS_TARGET} rvslib
+- ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS})
++ ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${YAML_CPP_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ install(TARGETS ${RVS_TARGET}
+diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt
+index 8d29590..e824bdb 100644
+--- a/rvslib/CMakeLists.txt
++++ b/rvslib/CMakeLists.txt
+@@ -116,7 +116,7 @@ endif()
+
+ ## define include directories
+ include_directories(./ ../ ../rvs
+- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+
+ link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+
+diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt
+index 042586f..0133c00 100644
+--- a/smqt.so/CMakeLists.txt
++++ b/smqt.so/CMakeLists.txt
+@@ -106,11 +106,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt
+index 4cba0f9..691534a 100644
+--- a/testif.so/CMakeLists.txt
++++ b/testif.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ endif()
+
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ ## set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+diff --git a/tst.so/CMakeLists.txt b/tst.so/CMakeLists.txt
+index 1a1a8b0..0ca398d 100644
+--- a/tst.so/CMakeLists.txt
++++ b/tst.so/CMakeLists.txt
+@@ -140,7 +140,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+ endif()
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+--
+2.43.0
+
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.2.1.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.2.1.patch
new file mode 100644
index 0000000000..5283f5a256
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path-6.2.1.patch
@@ -0,0 +1,686 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7867e3a..7268387 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,14 +74,18 @@ endif(rocblas_FOUND)
+ # Making ROCM_PATH, CMAKE_INSTALL_PREFIX, CPACK_PACKAGING_INSTALL_PREFIX as CACHE
+ # variables since we will pass them as cmake params appropriately, and
+ # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH
+-set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
+-set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
+-set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages")
++set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
++set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}")
+-set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+-set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
+-set(HIP_INC_DIR "${ROCM_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
+-set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
++set(ROCR_INC_DIR "${HSA_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCR_LIB_DIR "${HSA_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime")
++set(HIP_INC_DIR "${HIP_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk")
++set(HIPRAND_INC_DIR "${HIPRAND_DIR}/include" CACHE PATH "Contains header files exported by ROC Trunk")
++set(HIPRAND_LIB_DIR "${HIPRAND_DIR}/lib" CACHE PATH "Contains header files exported by ROC Trunk")
++set(ROCRAND_INC_DIR "${ROCRAND_DIR}/include" CACHE PATH "Contains header files exported by ROC Trunk")
++set(ROCRAND_LIB_DIR "${ROCRAND_DIR}/lib" CACHE PATH "Contains header files exported by ROC Trunk")
+
+ add_definitions(-DROCM_PATH="${ROCM_PATH}")
+ if(FETCH_ROCMPATH_FROM_ROCMCORE)
+@@ -443,15 +447,18 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/rvs_smi-build/librocm_smi64.so
+
+ endif() # if (RVS_ROCMSMI EQUAL 1)
+
+-set(HIPRAND_INC_DIR "${ROCM_PATH}/include")
+-set(HIPRAND_LIB_DIR "${ROCM_PATH}/lib")
++set(HIPRAND_INC_DIR "${HIPRAND_DIR}/include")
++set(HIPRAND_LIB_DIR "${HIPRAND_DIR}/lib")
++
++set(ROCRAND_INC_DIR "${ROCRAND_DIR}/include")
++set(ROCRAND_LIB_DIR "${ROCRAND_DIR}/lib")
+
+ if (RVS_ROCBLAS EQUAL 1)
+ set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
+ set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
+ else()
+- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
+- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
++ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
+ endif()
+
+ if (RVS_ROCMSMI EQUAL 1)
+@@ -466,8 +473,8 @@ else()
+ set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
+ else()
+ message( STATUS "ROCBLAS REORG Enabled Version: ${RVS_ROCBLAS_VERSION_FLAT}" )
+- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/include")
+- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
++ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
+ endif()
+ endif()
+ set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
+diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt
+index 54a0e3a..c9ddeaa 100644
+--- a/babel.so/CMakeLists.txt
++++ b/babel.so/CMakeLists.txt
+@@ -109,13 +109,13 @@ set(HIP_HCC_LIB "amdhip64")
+ add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT})
+
+ # Determine Roc Runtime header files are accessible
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+@@ -135,16 +135,16 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
+- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${HIP_PATH})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+ set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
+
+@@ -156,7 +156,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/cmake_modules/tests_unit.cmake b/cmake_modules/tests_unit.cmake
+index 9760b72..d585f8b 100644
+--- a/cmake_modules/tests_unit.cmake
++++ b/cmake_modules/tests_unit.cmake
+@@ -27,7 +27,7 @@
+ ## define additional unit testing include directories
+ include_directories(${UT_INC})
+ ## define additional unit testing lib directories
+-link_directories(${UT_LIB} ${RVS_LIB_DIR})
++link_directories(${UT_LIB} ${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+
+ file(GLOB TESTSOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/test*.cpp )
+ #message ( "TESTSOURCES: ${TESTSOURCES}" )
+@@ -46,6 +46,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES})
+ add_dependencies(${TEST_NAME} rvs_gtest_target)
+ target_link_libraries(${TEST_NAME}
+ ${UT_LINK_LIBS} rvslibut rvslib gtest_main gtest pthread pci
++ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so
+ )
+ target_compile_definitions(${TEST_NAME} PUBLIC RVS_UNIT_TEST)
+ if(DEFINED tcd.${TEST_NAME})
+diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt
+index 7dd34ea..41c8493 100644
+--- a/edp.so/CMakeLists.txt
++++ b/edp.so/CMakeLists.txt
+@@ -128,17 +128,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set (SOURCES src/rvs_module.cpp src/action.cpp src/edp_worker.cpp )
+@@ -148,7 +148,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${HIPRAND_LIB} ${ROCRAND_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt
+index d3caa84..94a06be 100644
+--- a/gm.so/CMakeLists.txt
++++ b/gm.so/CMakeLists.txt
+@@ -118,11 +118,11 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCM_SMI_INC_DIR})
++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+@@ -133,7 +133,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -149,7 +149,7 @@ install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${RVS}.so"
+
+ # TEST SECTION
+ if (RVS_BUILD_TESTS)
+- add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
++ B_add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+ COMMAND ln -fs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${RVS}.so.${VERSION_MAJOR} ${RVS_BINTEST_FOLDER}/lib${RVS}.so WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+ )
+ include(${CMAKE_CURRENT_SOURCE_DIR}/tests.cmake)
+diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake
+index b360065..172e97c 100644
+--- a/gm.so/tests.cmake
++++ b/gm.so/tests.cmake
+@@ -30,11 +30,11 @@ set(CORE_RUNTIME_NAME "hsa-runtime")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+
+ set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so"
+- ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB}
++ ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} "lib${HIPRAND_LIB}.so" "lib${ROCRAND_LIB}.so"
+ )
+
+ # Add directories to look for library files to link
+-link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR})
++link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+
+ set (UT_SOURCES src/action.cpp src/worker.cpp
+ )
+diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt
+index 43d337a..c92d8ba 100644
+--- a/gpup.so/CMakeLists.txt
++++ b/gpup.so/CMakeLists.txt
+@@ -109,11 +109,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ include ../include)
++include_directories(./ ../ include ../include ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+diff --git a/gpup.so/tests.cmake b/gpup.so/tests.cmake
+index 9a1f7ed..3649ae4 100644
+--- a/gpup.so/tests.cmake
++++ b/gpup.so/tests.cmake
+@@ -25,12 +25,13 @@
+
+ set(ROCBLAS_LIB "rocblas")
+ set(HIPRAND_LIB "hiprand")
++set(ROCRAND_LIB "rocrand")
+ set(ROC_THUNK_NAME "hsakmt")
+ set(CORE_RUNTIME_NAME "hsa-runtime")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+
+ set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB}
+- ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB})
++ ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${ROCRAND_LIB})
+
+ # Add directories to look for library files to link
+ link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR})
+diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt
+index fd346ce..7e17a68 100644
+--- a/gst.so/CMakeLists.txt
++++ b/gst.so/CMakeLists.txt
+@@ -137,17 +137,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/gst_worker.cpp)
+diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt
+index 002c03c..604b86b 100644
+--- a/iet.so/CMakeLists.txt
++++ b/iet.so/CMakeLists.txt
+@@ -145,7 +145,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+ endif()
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -160,11 +160,11 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so )
+
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/iet_worker.cpp )
+
+@@ -173,7 +173,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_INC_DIR}/lib/ ${HIP_HCC_LIB} ${ROCBLAS_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt
+index 5133337..3ba941f 100644
+--- a/mem.so/CMakeLists.txt
++++ b/mem.so/CMakeLists.txt
+@@ -134,18 +134,18 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/rvs_memtest.cpp src/rvs_memworker.cpp)
+diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt
+index 5ae675a..873a1e8 100644
+--- a/pbqt.so/CMakeLists.txt
++++ b/pbqt.so/CMakeLists.txt
+@@ -136,11 +136,11 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci ${ROCR_INC_DIR})
++include_directories(./ ../ pci ${ROCR_INC_DIR} ${YAML_CPP_INCLUDE_DIRS} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt
+index c4e2964..41a45f5 100644
+--- a/pebb.so/CMakeLists.txt
++++ b/pebb.so/CMakeLists.txt
+@@ -137,11 +137,11 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci ${ROCR_INC_DIR})
++include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR}/.. ${ROCRAND_LIB_DIR}/..)
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt
+index ead507d..d83c9e5 100644
+--- a/peqt.so/CMakeLists.txt
++++ b/peqt.so/CMakeLists.txt
+@@ -107,11 +107,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${HSA_PATH})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+@@ -121,7 +121,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt
+index 518dac9..dfe05f5 100644
+--- a/perf.so/CMakeLists.txt
++++ b/perf.so/CMakeLists.txt
+@@ -137,17 +137,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/perf_worker.cpp)
+@@ -157,7 +157,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt
+index 1f27f34..502c1c8 100644
+--- a/pesm.so/CMakeLists.txt
++++ b/pesm.so/CMakeLists.txt
+@@ -107,11 +107,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+diff --git a/pesm.so/tests.cmake b/pesm.so/tests.cmake
+index 2c72658..c6acbf4 100644
+--- a/pesm.so/tests.cmake
++++ b/pesm.so/tests.cmake
+@@ -30,11 +30,11 @@ set(CORE_RUNTIME_NAME "hsa-runtime")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+
+ set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so"
+- ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB}
++ ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} "lib${HIPRAND_LIB}.so" "lib${ROCRAND_LIB}.so"
+ )
+
+ # Add directories to look for library files to link
+-link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR})
++link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+
+ set (UT_SOURCES test/unitactionbase.cpp
+ )
+diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt
+index c0099ab..fcc82f3 100644
+--- a/rcqt.so/CMakeLists.txt
++++ b/rcqt.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib)
++set (PROJECT_LINK_LIBS rvslib ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES
+diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt
+index fc0118e..04c9abf 100644
+--- a/rvs/CMakeLists.txt
++++ b/rvs/CMakeLists.txt
+@@ -34,6 +34,7 @@ set ( RVS "rvs" )
+ set ( RVS_PACKAGE "rvs-roct" )
+ set ( RVS_COMPONENT "lib${RVS}" )
+ set ( RVS_TARGET "${RVS}" )
++set ( YAML_CPP_LIBRARIES "${YAML_CPP_LIB_PATH}")
+
+ project ( ${RVS_TARGET} )
+
+@@ -115,20 +116,22 @@ endif()
+ ## define include directories
+ include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
+ ## define lib directories
+-link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_PATH})
++link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${RVS_LIB_DIR}/.. ${YAML_CPP_LIBRARIES})
+
+ ## additional libraries
+-set(ROCBLAS_LIB "rocblas")
+-set(ROC_THUNK_NAME "hsakmt")
+-set(CORE_RUNTIME_NAME "hsa-runtime")
+-set(HIPRAND_LIB "hiprand")
+-set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+-set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES})
++set(ROCBLAS_LIB "${ROCBLAS_LIB_DIR}/librocblas.so")
++set(ROC_THUNK_NAME "${HSAKMT_LIB_DIR}/libhsakmt.a")
++set(CORE_RUNTIME_NAME "${HSA_PATH}/lib/libhsa-runtime64.so")
++set(YAML_CPP_LIB "${YAML_CPP_LIBRARIES}/libyaml-cpp.a")
++set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}")
++set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so)
++set(HIPRAND_LIB "${HIPRAND_LIB_DIR}/libhiprand.so")
++set(ROCRAND_LIB "${ROCRAND_LIB_DIR}/librocrand.so")
+
+ ## define target
+ add_executable(${RVS_TARGET} src/rvs.cpp)
+ target_link_libraries(${RVS_TARGET} rvslib
+- ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${HIPRAND_LIB})
++ ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${HIPRAND_LIB} ${YAML_CPP_LIB} ${ROCRAND_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ install(TARGETS ${RVS_TARGET}
+diff --git a/rvs/tests.cmake b/rvs/tests.cmake
+index c519482..64a4ad0 100644
+--- a/rvs/tests.cmake
++++ b/rvs/tests.cmake
+@@ -32,17 +32,18 @@
+
+ set(ROCBLAS_LIB "rocblas")
+ set(HIPRAND_LIB "hiprand")
++set(ROCRAND_LIB "rocrand")
+ set(ROC_THUNK_NAME "hsakmt")
+ set(CORE_RUNTIME_NAME "hsa-runtime")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+
+ ## define lib directories
+-link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${HIPRAND_LIB_DIR})
++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+
+ ## define target for "test-to-fail"
+ add_executable(${RVS_TARGET}fail src/rvs.cpp)
+ target_link_libraries(${RVS_TARGET}fail rvslib rvslibut ${PROJECT_LINK_LIBS}
+- ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${ROCM_CORE} ${CORE_RUNTIME_TARGET} ${HIPRAND_LIB})
++ ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${ROCM_CORE} ${CORE_RUNTIME_TARGET} ${HIPRAND_LIB} ${ROCRAND_LIB})
+
+ target_compile_definitions(${RVS_TARGET}fail PRIVATE RVS_INVERT_RETURN_STATUS)
+ set_target_properties(${RVS_TARGET}fail PROPERTIES
+@@ -211,7 +212,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES})
+ ${PROJECT_LINK_LIBS}
+ ${PROJECT_TEST_LINK_LIBS}
+ rvslib rvslibut gtest_main gtest pthread
+- ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${HIPRAND_LIB}
++ ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${HIPRAND_LIB} ${ROCRAND_LIB}
+ )
+ add_dependencies(${TEST_NAME} rvs_gtest_target)
+
+diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt
+index 8d29590..18eb9f4 100644
+--- a/rvslib/CMakeLists.txt
++++ b/rvslib/CMakeLists.txt
+@@ -116,7 +116,7 @@ endif()
+
+ ## define include directories
+ include_directories(./ ../ ../rvs
+- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++ ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_PATH} ${YAML_CPP_INCLUDE_DIRS} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+
+ link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+
+diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt
+index 042586f..285cb17 100644
+--- a/smqt.so/CMakeLists.txt
++++ b/smqt.so/CMakeLists.txt
+@@ -106,11 +106,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+diff --git a/smqt.so/tests.cmake b/smqt.so/tests.cmake
+index 76766de..804441a 100644
+--- a/smqt.so/tests.cmake
++++ b/smqt.so/tests.cmake
+@@ -30,11 +30,11 @@ set(CORE_RUNTIME_NAME "hsa-runtime")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+
+ set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so"
+- ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB}
++ ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} "lib${HIPRAND_LIB}.so" "lib${HIPRAND_LIB}.so"
+ )
+
+ # Add directories to look for library files to link
+-link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR})
++link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR})
+
+ set (UT_SOURCES src/action.cpp test/unitsmqt.cpp
+ )
+diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt
+index 4cba0f9..691534a 100644
+--- a/testif.so/CMakeLists.txt
++++ b/testif.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ endif()
+
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ ## set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+diff --git a/tst.so/CMakeLists.txt b/tst.so/CMakeLists.txt
+index 1a1a8b0..c6e46da 100644
+--- a/tst.so/CMakeLists.txt
++++ b/tst.so/CMakeLists.txt
+@@ -140,7 +140,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+ endif()
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -155,11 +155,11 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR}/.. ${ROCRAND_LIB_DIR}/..)
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${HIPRAND_LIB_DIR}/libhiprand.so ${ROCRAND_LIB_DIR}/librocrand.so)
+
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/tst_worker.cpp )
+
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path.patch
new file mode 100644
index 0000000000..ae21de8c82
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/009-replacing-rocm-path-with-package-path.patch
@@ -0,0 +1,636 @@
+From 7bb26280b6da667573a581780f97856985b44e4e Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Fri, 12 Jan 2024 09:31:21 +0000
+Subject: [PATCH] Updating cmake with include and library path for spack
+
+---
+ CMakeLists.txt | 21 +++++++++++----------
+ babel.so/CMakeLists.txt | 18 +++++++++---------
+ cmake_modules/tests_unit.cmake | 3 ++-
+ edp.so/CMakeLists.txt | 6 +++---
+ gm.so/CMakeLists.txt | 6 +++---
+ gpup.so/CMakeLists.txt | 8 ++++----
+ gst.so/CMakeLists.txt | 10 +++++-----
+ iet.so/CMakeLists.txt | 6 +++---
+ mem.so/CMakeLists.txt | 6 +++---
+ pbqt.so/CMakeLists.txt | 6 +++---
+ pebb.so/CMakeLists.txt | 4 ++--
+ peqt.so/CMakeLists.txt | 6 +++---
+ perf.so/CMakeLists.txt | 8 ++++----
+ pesm.so/CMakeLists.txt | 8 ++++----
+ rcqt.so/CMakeLists.txt | 6 +++---
+ rvs/CMakeLists.txt | 15 ++++++++-------
+ rvs/tests.cmake | 6 ++++--
+ rvslib/CMakeLists.txt | 2 +-
+ smqt.so/CMakeLists.txt | 6 +++---
+ testif.so/CMakeLists.txt | 20 ++++++++++----------
+ 20 files changed, 88 insertions(+), 83 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b25eca4..eeee55d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,13 +70,14 @@ endif(rocblas_FOUND)
+ # variables since we will pass them as cmake params appropriately, and
+ # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH
+ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path")
+-set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory")
+-set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages")
++set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
++set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}")
+-set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE)
+-set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE)
+-set(HIP_INC_DIR "${ROCM_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
+-set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE)
++set(ROCR_INC_DIR "${HSA_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCR_LIB_DIR "${HSA_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime")
++set(HIP_INC_DIR "${HIP_PATH}" CACHE PATH "Contains header files exported by ROC Runtime")
++set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk")
+
+ add_definitions(-DROCM_PATH="${ROCM_PATH}")
+ add_definitions(-DRVS_LIB_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rvs")
+@@ -420,8 +421,8 @@ if (RVS_ROCBLAS EQUAL 1)
+ set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install")
+ set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/")
+ else()
+- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include")
+- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include")
++ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib")
+ endif()
+
+ if (RVS_ROCMSMI EQUAL 1)
+@@ -436,8 +437,8 @@ else()
+ set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib")
+ else()
+ message( STATUS "ROCBLAS REORG Enabled Version: ${RVS_ROCBLAS_VERSION_FLAT}" )
+- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/include")
+- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/lib")
++ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include")
++ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib")
+ endif()
+ endif()
+ set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name")
+diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt
+index f163dae..fa85b38 100644
+--- a/babel.so/CMakeLists.txt
++++ b/babel.so/CMakeLists.txt
+@@ -107,13 +107,13 @@ set(HIP_HCC_LIB "amdhip64")
+ add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT})
+
+ # Determine Roc Runtime header files are accessible
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h)
+- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR})
++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h)
++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+@@ -133,16 +133,16 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
+- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so")
++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${HIP_PATH})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+ set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
+
+@@ -154,7 +154,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/cmake_modules/tests_unit.cmake b/cmake_modules/tests_unit.cmake
+index e0e9f88..7321e0a 100644
+--- a/cmake_modules/tests_unit.cmake
++++ b/cmake_modules/tests_unit.cmake
+@@ -27,7 +27,7 @@
+ ## define additional unit testing include directories
+ include_directories(${UT_INC})
+ ## define additional unit testing lib directories
+-link_directories(${UT_LIB} ${RVS_LIB_DIR})
++link_directories(${UT_LIB} ${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+
+ file(GLOB TESTSOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/test*.cpp )
+ #message ( "TESTSOURCES: ${TESTSOURCES}" )
+@@ -45,6 +45,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES})
+ )
+ target_link_libraries(${TEST_NAME}
+ ${UT_LINK_LIBS} rvslibut rvslib gtest_main gtest pthread pci
++ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so
+ )
+ target_compile_definitions(${TEST_NAME} PUBLIC RVS_UNIT_TEST)
+ if(DEFINED tcd.${TEST_NAME})
+diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt
+index 7dd34ea..7978abe 100644
+--- a/edp.so/CMakeLists.txt
++++ b/edp.so/CMakeLists.txt
+@@ -134,11 +134,11 @@ if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set (SOURCES src/rvs_module.cpp src/action.cpp src/edp_worker.cpp )
+diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt
+index d3caa84..73b83ce 100644
+--- a/gm.so/CMakeLists.txt
++++ b/gm.so/CMakeLists.txt
+@@ -118,11 +118,11 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCM_SMI_INC_DIR})
++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+ link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+@@ -133,7 +133,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt
+index 43d337a..a234feb 100644
+--- a/gpup.so/CMakeLists.txt
++++ b/gpup.so/CMakeLists.txt
+@@ -109,11 +109,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ include ../include)
++include_directories(./ ../ include ../include ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+@@ -124,7 +124,7 @@ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt
+index fd346ce..cb8c4b6 100644
+--- a/gst.so/CMakeLists.txt
++++ b/gst.so/CMakeLists.txt
+@@ -137,17 +137,17 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/gst_worker.cpp)
+@@ -157,7 +157,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} )
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt
+index a85ca98..252e565 100644
+--- a/iet.so/CMakeLists.txt
++++ b/iet.so/CMakeLists.txt
+@@ -140,7 +140,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+ endif()
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -159,7 +159,7 @@ include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR
+ # Add directories to look for library files to link
+ link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so librocm_smi64.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/iet_worker.cpp )
+
+@@ -168,7 +168,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCM_SMI_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_INC_DIR}/lib/ ${HIP_HCC_LIB} ${ROCBLAS_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt
+index 5133337..2462bbc 100644
+--- a/mem.so/CMakeLists.txt
++++ b/mem.so/CMakeLists.txt
+@@ -134,7 +134,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -143,9 +143,9 @@ endif()
+ include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR})
+
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/rvs_memtest.cpp src/rvs_memworker.cpp)
+diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt
+index 5ae675a..892b6ac 100644
+--- a/pbqt.so/CMakeLists.txt
++++ b/pbqt.so/CMakeLists.txt
+@@ -136,11 +136,11 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so)
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci ${ROCR_INC_DIR})
++include_directories(./ ../ pci ${ROCR_INC_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt
+index c4e2964..7a6b368 100644
+--- a/pebb.so/CMakeLists.txt
++++ b/pebb.so/CMakeLists.txt
+@@ -139,9 +139,9 @@ endif()
+ ## define include directories
+ include_directories(./ ../ pci ${ROCR_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} )
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/action_run.cpp
+diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt
+index ead507d..567358b 100644
+--- a/peqt.so/CMakeLists.txt
++++ b/peqt.so/CMakeLists.txt
+@@ -107,9 +107,9 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${HSA_PATH})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${YAML_CPP_INCLUDE_DIRS})
+ ## additional libraries
+ set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
+
+@@ -121,7 +121,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt
+index 518dac9..02d2245 100644
+--- a/perf.so/CMakeLists.txt
++++ b/perf.so/CMakeLists.txt
+@@ -137,7 +137,7 @@ if(DEFINED RVS_ROCMSMI)
+ endif()
+
+
+-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so")
++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so")
+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR})
+ RETURN()
+ endif()
+@@ -145,9 +145,9 @@ endif()
+ ## define include directories
+ include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/perf_worker.cpp)
+@@ -157,7 +157,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB})
++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt
+index 1f27f34..20a8bed 100644
+--- a/pesm.so/CMakeLists.txt
++++ b/pesm.so/CMakeLists.txt
+@@ -107,11 +107,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${PROJECT_LINK_LIBS} ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+@@ -121,7 +121,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES})
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt
+index c0099ab..8d92982 100644
+--- a/rcqt.so/CMakeLists.txt
++++ b/rcqt.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../)
++include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib)
++set (PROJECT_LINK_LIBS rvslib ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES
+diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt
+index 527d474..76a5efd 100644
+--- a/rvs/CMakeLists.txt
++++ b/rvs/CMakeLists.txt
+@@ -113,21 +113,22 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS})
++include_directories(./ ../ ${YAML_INC_DIR})
+ ## define lib directories
+-link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${RVS_LIB_DIR}/.. ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${YAML_CPP_LIBRARIES} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} )
+
+ ## additional libraries
+-set(ROCBLAS_LIB "rocblas")
+-set(ROC_THUNK_NAME "hsakmt")
+-set(CORE_RUNTIME_NAME "hsa-runtime")
++set(ROCBLAS_LIB "${ROCBLAS_LIB_DIR}/librocblas.so")
++set(ROC_THUNK_NAME "${HSAKMT_LIB_DIR}/libhsakmt.a")
++set(CORE_RUNTIME_NAME "${HSA_PATH}/lib/libhsa-runtime64.so")
++set(YAML_CPP_LIB "${YAML_INC_DIR}/../lib64/libyaml-cpp.a")
+ set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64")
+-set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES})
++set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so)
+
+ ## define target
+ add_executable(${RVS_TARGET} src/rvs.cpp)
+ target_link_libraries(${RVS_TARGET} rvslib
+- ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${PROJECT_LINK_LIBS})
++ ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_NAME} ${YAML_CPP_LIB})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ install(TARGETS ${RVS_TARGET}
+diff --git a/rvs/tests.cmake b/rvs/tests.cmake
+index 38ae3fb..0d62675 100644
+--- a/rvs/tests.cmake
++++ b/rvs/tests.cmake
+@@ -41,7 +41,8 @@ link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LI
+ ## define target for "test-to-fail"
+ add_executable(${RVS_TARGET}fail src/rvs.cpp)
+ target_link_libraries(${RVS_TARGET}fail rvslib rvslibut ${PROJECT_LINK_LIBS}
+- ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET})
++ ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET}
++ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ target_compile_definitions(${RVS_TARGET}fail PRIVATE RVS_INVERT_RETURN_STATUS)
+ set_target_properties(${RVS_TARGET}fail PROPERTIES
+@@ -187,7 +188,7 @@ add_test(NAME unit.ttf.rvs.config.noconfig
+ )
+
+ ## define include directories
+-include_directories(${UT_INC})
++include_directories(${UT_INC} ${YAML_INC_DIR})
+ ## define lib directories
+ link_directories(${UT_LIB} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR})
+ ## additional libraries for unit tests
+@@ -211,6 +212,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES})
+ ${PROJECT_TEST_LINK_LIBS}
+ rvslib rvslibut gtest_main gtest pthread
+ ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET}
++ ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so
+ )
+ add_dependencies(${TEST_NAME} rvs_gtest_target)
+
+diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt
+index 8d29590..d52aee3 100644
+--- a/rvslib/CMakeLists.txt
++++ b/rvslib/CMakeLists.txt
+@@ -116,7 +116,7 @@ endif()
+
+ ## define include directories
+ include_directories(./ ../ ../rvs
+- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR})
++ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${YAML_INC_DIR})
+
+ link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+
+diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt
+index 042586f..0133c00 100644
+--- a/smqt.so/CMakeLists.txt
++++ b/smqt.so/CMakeLists.txt
+@@ -106,11 +106,11 @@ else()
+ endif()
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS rvslib libpci.so libm.so)
++set (PROJECT_LINK_LIBS rvslib libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ set(SOURCES src/rvs_module.cpp src/action.cpp)
+diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt
+index 4cba0f9..34b491e 100644
+--- a/testif.so/CMakeLists.txt
++++ b/testif.so/CMakeLists.txt
+@@ -108,11 +108,11 @@ endif()
+
+
+ ## define include directories
+-include_directories(./ ../ pci)
++include_directories(./ ../ pci ${YAML_CPP_INCLUDE_DIRS})
+ # Add directories to look for library files to link
+-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH})
++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR})
+ ## additional libraries
+-set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so)
++set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so ${ROCBLAS_LIB_DIR}/librocblas.so ${HSAKMT_LIB_DIR}/libhsakmt.a ${HSA_PATH}/lib/libhsa-runtime64.so)
+
+ ## define source files
+ ## set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp)
+@@ -124,7 +124,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_no_if_methods.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -145,7 +145,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_no_if0.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -166,7 +166,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_no_if0_methods.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -187,7 +187,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_no_if1.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -208,7 +208,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_no_if1_methods.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -229,7 +229,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_fail_init.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+@@ -250,7 +250,7 @@ add_library( ${RVS_TARGET} SHARED src/rvs_module_fail_create_action.cpp)
+ set_target_properties(${RVS_TARGET} PROPERTIES
+ SUFFIX .so.${LIB_VERSION_STRING}
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+-target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS} )
++target_link_libraries(${RVS_TARGET} rvslib ${PROJECT_LINK_LIBS})
+ add_dependencies(${RVS_TARGET} rvslib)
+
+ add_custom_command(TARGET ${RVS_TARGET} POST_BUILD
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
index 52e267f580..135f5405cb 100644
--- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
+++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py
@@ -15,105 +15,35 @@ class RocmValidationSuite(CMakePackage):
computing environment, enabled using the ROCm software stack on a
compatible platform."""
- homepage = "https://github.com/ROCm-Developer-Tools/ROCmValidationSuite"
- url = "https://github.com/ROCm-Developer-Tools/ROCmValidationSuite/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/ROCmValidationSuite"
+ url = "https://github.com/ROCm/ROCmValidationSuite/archive/rocm-6.1.1.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="ccdea6e955ca145a29d47da74d77b14196c935b57502edaed37fd18029b5220c")
+ version("6.2.1", sha256="7e1f4f391a5b31087585b250136f3a8c1fdf4c609880499575291c61b3ebbc15")
+ version("6.2.0", sha256="03913a1aae426b9fbb7a4870f408a3af1b8b7d32766515eaccb43107673fe631")
+ version("6.1.2", sha256="8ff0c4ec538841d6b8d008d3849a99173cc5a02df5cf4a11dc1d52f630e079c5")
+ version("6.1.1", sha256="72d1a40bce5b68f7d5959e10c07576234640b9c9fcb24d6301a76336629d9962")
+ version("6.1.0", sha256="712f49bfe3a62c9f9cc6f9dc1c593b57e0b45158bb270d685d1141c9a9e90387")
+ version("6.0.2", sha256="8286d00ce290eeace3697138da9d7a9669f54152e5febcd9e5c5156ae79f0c0c")
+ version("6.0.0", sha256="a84e36b5e50e70ba033fb6bc6fa99da2e32bf7eaef2098df3164365a77a8f14c")
version("5.7.1", sha256="202f2b6e014bbbeec40af5d3ec630c042f09a61087a77bd70715d81044ea4d65")
version("5.7.0", sha256="f049b7786a220e9b6dfe099f17727dd0d9e41be9e680fe8309eae400cc5536ea")
version("5.6.1", sha256="d5e4100e2d07311dfa101563c15d026a8130442cdee8af9ef861832cd7866c0d")
version("5.6.0", sha256="54cc5167055870570c97ee7114f48d24d5415f984e0c9d7b58b83467e0cf18fb")
version("5.5.1", sha256="0fbfaa9f68642b590ef04f9778013925bbf3f17bdcd35d4c85a8ffd091169a6e")
version("5.5.0", sha256="296add772171db67ab8838d2db1ea56df21e895c0348c038768e40146e4fe86a")
- version("5.4.3", sha256="1f0888e559104a4b8c2f5322f7463e425f2baaf12aeb1a8982a5974516e7b667")
- version("5.4.0", sha256="ca2abfa739c2853f71453e65787e318ab879be8a6a362c4cb4d27baa90f3cd5f")
- version("5.3.3", sha256="9acbc8de9b2e18659f51bd49f6e92ab6c93742e2ed0046322025f017fc12497f")
- version("5.3.0", sha256="d6afb8a5f4eaf860fd510bcfe65e735cbf96d4b8817c758ea7aee84d4c994382")
- version("5.2.3", sha256="5dfbd41c694bf2eb4368edad8653dc60ec2927d174fc7aaa5fa416156c5f921f")
- version("5.2.1", sha256="a0ea3ab9cbb8ac17bfa4537713a4d7075f869949bfdead4565a46f75864bd4a9")
- version("5.2.0", sha256="2dfef5d66f544230957ac9aaf647b2f1dccf3cc7592cc322cae9fbdcf3321365")
- version("5.1.3", sha256="0140a4128c31749c078d9e1dc863cbbd690efc65843c34a4b80f0056e5b8c7b6")
- version("5.1.0", sha256="d9b9771b885bd94e5d0352290d3fe0fa12f94ce3f384c3844002cd7614880010")
- version(
- "5.0.2",
- sha256="f249fe700a5a96c6dabf12130a3e366ae6025fe1442a5d11d08801d6c0265af4",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="d4ad31db0377096117714c9f4648cb37d6808ce618cd0bb5e4cc89cc9b4e37fd",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="e2a128395367a60a17d4d0f62daee7d34358c75332ed582243b18da409589ab8",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="54181dd5a132a7f4a34a9316d8c00d78343ec45c069c586134ce4e61e68747f5",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="779a3b0afb53277e41cf863185e87f95d9b2bbb748fcb062cbb428d0b510fb69",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="f7a918b513c51dd5eadce3f2e091679b2dfe6544a913960ac483567792a06a4c",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="b25e58a842a8eb90bfd6c4ae426ca5cfdd5de2f8a091761f83597f7cfc2cd0f3",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="f9618f89384daa0ae897b36638a3737bcfa47e98778e360338267cd1fe2bbc66",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="04743ca8901b94a801759a3c13c8caf3e6ea950ffcda6408173e6f9ef7b86e74",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="9f9a530f7850770663e0b0ec0c786367f2e22500a472ac6652c4fd9fb4df4f64",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="17662028a4485b97e3ccaad5e94d20aaa2c3e9e3f741c7ebbf0f8b4cdebcc555",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="68f1c5102e5cbed205a0ecf5a01efbdccf480f7e484ab1e58cbc6bc03e428122",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="bb42d7fb7ee877b80ce53b0cd1f04b0c8301197b6777d2edddcb44732bf8c9e2",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="273e67ecce7e32939341679362b649f3361a36a22fab5f64cefe94b49e6f1e46",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="1f0888e559104a4b8c2f5322f7463e425f2baaf12aeb1a8982a5974516e7b667")
+ version("5.4.0", sha256="ca2abfa739c2853f71453e65787e318ab879be8a6a362c4cb4d27baa90f3cd5f")
+ version("5.3.3", sha256="9acbc8de9b2e18659f51bd49f6e92ab6c93742e2ed0046322025f017fc12497f")
+ version("5.3.0", sha256="d6afb8a5f4eaf860fd510bcfe65e735cbf96d4b8817c758ea7aee84d4c994382")
+
+ depends_on("cxx", type="build") # generated
- patch("001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch", when="@4.1.0:4.3.2")
- patch("002-remove-force-setting-hip-inc-path.patch", when="@4.1.0:4.3.2")
- patch("003-cmake-change-to-remove-installs-and-sudo.patch", when="@4.1.0:4.3.2")
- patch("004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch", when="@4.3.0:4.3.2")
- patch("005-cleanup-path-reference-donot-download-googletest-yaml.patch", when="@4.5.0:5.2")
- patch("006-library-path.patch", when="@4.5.0:5.2")
patch(
"007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.3.patch",
when="@5.3.0:5.5",
@@ -122,39 +52,26 @@ class RocmValidationSuite(CMakePackage):
"007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch",
when="@5.6",
)
- patch(
- "008-correcting-library-and-include-path-WITHOUT-RVS-BUILD-TESTS.patch", when="@5.7.0:5.7"
- )
+ patch("008-correcting-library-and-include-path-WITHOUT-RVS-BUILD-TESTS.patch", when="@5.7")
+
+ # Replacing ROCM_PATH with corresponding package prefix path.
+ # Adding missing package package prefix paths.
+ # It expects rocm components headers and libraries in /opt/rocm
+ # It doesn't find package to include the library and include path without this patch.
+ patch("009-replacing-rocm-path-with-package-path.patch", when="@6.0")
+ patch("009-replacing-rocm-path-with-package-path-6.1.patch", when="@6.1:6.2.0")
+ patch("009-replacing-rocm-path-with-package-path-6.2.1.patch", when="@6.2.1:6.2.4")
depends_on("cmake@3.5:", type="build")
depends_on("zlib-api", type="link")
depends_on("yaml-cpp~shared")
- depends_on("googletest", when="@4.5.0:")
- depends_on("doxygen", type="build", when="@4.5.0:")
+ depends_on("googletest")
+ depends_on("doxygen", type="build")
def setup_build_environment(self, build_env):
spec = self.spec
build_env.set("HIPCC_PATH", spec["hip"].prefix)
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -165,38 +82,37 @@ class RocmValidationSuite(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocminfo@" + ver, when="@" + ver)
- depends_on("rocblas@" + ver, when="@" + ver)
- depends_on("rocm-smi-lib@" + ver, when="@" + ver)
-
- for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- ]:
- depends_on("hip-rocclr@" + ver, when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", when=f"@{ver}")
+ depends_on(f"rocblas@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ for ver in ["6.2.1", "6.2.4"]:
+ depends_on(f"hiprand@{ver}", when=f"@{ver}")
+ depends_on(f"rocrand@{ver}", when=f"@{ver}")
def patch(self):
- if self.spec.satisfies("@4.5:5.1"):
+ if self.spec.satisfies("@5.2:5.4"):
filter_file(
- "@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
+ r"@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True
)
- elif self.spec.satisfies("@5.2:5.4"):
+ elif self.spec.satisfies("@5.5:5.7"):
filter_file(
- "@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True
+ r"@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
)
- elif self.spec.satisfies("@5.5:"):
+ elif self.spec.satisfies("@6.0:6.1"):
filter_file(
- "@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True
+ "@ROCM_PATH@/rvs", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True
)
def cmake_args(self):
@@ -206,17 +122,23 @@ class RocmValidationSuite(CMakePackage):
self.define("HSA_PATH", self.spec["hsa-rocr-dev"].prefix),
self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix),
self.define("ROCBLAS_DIR", self.spec["rocblas"].prefix),
- self.define("YAML_INC_DIR", self.spec["yaml-cpp"].prefix.include),
- self.define("YAML_LIB_DIR", self.spec["yaml-cpp"].prefix.lib64),
+ self.define("YAML_CPP_INCLUDE_DIRS", self.spec["yaml-cpp"].prefix.include),
+ self.define("UT_INC", self.spec["googletest"].prefix.include),
]
- if self.spec.satisfies("@4.5.0:"):
- args.append(self.define("UT_INC", self.spec["googletest"].prefix.include))
- libloc = self.spec["googletest"].prefix.lib64
- if not os.path.isdir(libloc):
- libloc = self.spec["googletest"].prefix.lib
- args.append(self.define("UT_LIB", libloc))
- libloc = self.spec["hsakmt-roct"].prefix.lib64
- if not os.path.isdir(libloc):
- libloc = self.spec["hsakmt-roct"].prefix.lib
- args.append(self.define("HSAKMT_LIB_DIR", libloc))
+ if self.spec.satisfies("@6.2.1:"):
+ args.append(self.define("HIPRAND_DIR", self.spec["hiprand"].prefix)),
+ args.append(self.define("ROCRAND_DIR", self.spec["rocrand"].prefix)),
+ libloc = self.spec["googletest"].prefix.lib64
+ if not os.path.isdir(libloc):
+ libloc = self.spec["googletest"].prefix.lib
+ args.append(self.define("UT_LIB", libloc))
+ libloc = self.spec["hsakmt-roct"].prefix.lib64
+ if not os.path.isdir(libloc):
+ libloc = self.spec["hsakmt-roct"].prefix.lib
+ args.append(self.define("HSAKMT_LIB_DIR", libloc))
+ libloc = self.spec["yaml-cpp"].prefix.lib64
+ if not os.path.isdir(libloc):
+ libloc = self.spec["yaml-cpp"].prefix.lib
+ args.append(self.define("YAML_CPP_LIB_PATH", libloc))
+
return args
diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py
index 3d70c7024b..1d6199a2db 100644
--- a/var/spack/repos/builtin/packages/rocminfo/package.py
+++ b/var/spack/repos/builtin/packages/rocminfo/package.py
@@ -10,122 +10,40 @@ from spack.package import *
class Rocminfo(CMakePackage):
"""Radeon Open Compute (ROCm) Runtime rocminfo tool"""
- homepage = "https://github.com/RadeonOpenCompute/rocminfo"
- git = "https://github.com/RadeonOpenCompute/rocminfo.git"
- url = "https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocminfo"
+ git = "https://github.com/ROCm/rocminfo.git"
+ url = "https://github.com/ROCm/rocminfo/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath", "haampie")
version("master", branch="master")
+ version("6.2.4", sha256="14d4b0e22e2314156091ac9ad1646dd20909dba3a43e037584a503a6754e7f9e")
+ version("6.2.1", sha256="ae6e08962535e76a81ed872cbd6bf6860c46fa6e4e4bc8f7849c8781359798d8")
+ version("6.2.0", sha256="4d9a9051bda3355f8d2050e981435cd02528a04264a7f61162d685e7e1629f73")
+ version("6.1.2", sha256="882ebe3db60b6290a81a98e0bac9b8923fbf83966f1706fd24484700b8213bcc")
+ version("6.1.1", sha256="ef5e33ad3d0bae462d01e1528ffa9c83c587ccbf7ef5947e096e550480d83819")
+ version("6.1.0", sha256="973352210fdc65932f0125e2db68729383727eaf4ebb7f52c88a948c14bbbb73")
+ version("6.0.2", sha256="e616d364a48de18eaee661bdce999d095086905f49777663ca99312f40a63da1")
+ version("6.0.0", sha256="bc29f1798644b6dea73895353dffada9db7366d0058274e587ebd3291a4d3844")
version("5.7.1", sha256="642dc2ec4254b3c30c43064e6690861486db820b25f4906ec78bdb47e68dcd0b")
version("5.7.0", sha256="a5a3c19513bf26f17f163a03ba5288c5c761619ef55f0cb9e15472771748b93e")
version("5.6.1", sha256="780b186ac7410a503eca1060f4bbc35db1b7b4d1d714d15c7534cd26d8af7b54")
version("5.6.0", sha256="87d98a736e4f7510d1475d35717842068d826096a0af7c15a395bcf9d36d7fa0")
version("5.5.1", sha256="bcab27bb3595d5a4c981e2416458d169e85c27e603c22e743d9240473bfbe98a")
version("5.5.0", sha256="b6107d362b70e20a10911741eb44247139b4eb43489f7fa648daff880b6de37f")
- version("5.4.3", sha256="72159eed31f8deee0df9228b9e306a18fe9efdd4d6c0eead871cad4617874170")
- version("5.4.0", sha256="79123b92992cce75ae679caf9a6bf57b16d24e96e54b36eb002511f3800e29c6")
- version("5.3.3", sha256="77e6adc81da6c1d153517e1d28db774205531a2ec188e6518f998328ef7897c6")
- version("5.3.0", sha256="c279da1d946771d120611b64974fde751534e787a394ceb6b8e0b743c143d782")
- version("5.2.3", sha256="38fe8db21077100ee2242bd087371f6b8e0078d3a269e145d3a4ab314d0b8902")
- version("5.2.1", sha256="e8a3b3228387d164e21de060e18ac018eecb5e9abe0ae45830c51ead4b7f1004")
- version("5.2.0", sha256="e721eb81efd384abd22ff01cdcbb6245b11084dc11a867c74c8ad6b028aa0404")
- version("5.1.3", sha256="7aecd7b189e129b77c8f2af70be2926a0f3a5ee89814879bc8477924a7e6f2ae")
- version("5.1.0", sha256="76f6cc9e69d9fc7e692e5c7db35e89079d3b1d2d47632e4742d612e743c396d3")
- version(
- "5.0.2",
- sha256="5fd970f08c5d6591efe7379ece564ce5580cba87fb6237531dabbd5adcb6a899",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="43e025de31bffa335d9cb682649add886afdd02c92090ee63e9bf77b3aaaa75b",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="5ea839cd1f317cbc72ea1e3634a75f33a458ba0cb5bf48377f08bb329c29222d",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="421ed55192780eb478f0341fd1ce47a0dd3ffafbec9d7a02109a411878a58ee5",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="d042947d3f29e943a2e3294a2a2d759ca436cebe31151ce048e49bc4f02d6993",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="2cc1f251c0ed9c3ea413cc15cb5ce11559e4497540eebbf5e8dcfd52b03e53d1",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="6952b6e28128ab9f93641f5ccb66201339bb4177bb575b135b27b69e2e241996",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="5b994ad02b6d250160770f6f7730835f3a52127193ac9a8dee40c53aec911f4f",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="0b3d692959dd4bc2d1665ab3a838592fcd08d2b5e373593b9192ca369e2c4aa7",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="ed02375be3be518b83aea7309ef5ca62dc9b6dbad0aae33e92995102d6d660be",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="9592781e0c62b910c4adc5c7f4c27c7a0cddbed13111a19dd91a2ff43720e43d",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="c135dc98ecb5f420e22a6efd2f461ba9ed90be3f42e2ac29356e05c6a0706f8f",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="86a8e3ce7d91fb2d79688a22a2805757c83922d9f17ea7ea1cb41bf9516197ea",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="1d113f06b7c9b60d0e92b2c12c0c704a565696867496fe7038e5dddd510567b7",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="72159eed31f8deee0df9228b9e306a18fe9efdd4d6c0eead871cad4617874170")
+ version("5.4.0", sha256="79123b92992cce75ae679caf9a6bf57b16d24e96e54b36eb002511f3800e29c6")
+ version("5.3.3", sha256="77e6adc81da6c1d153517e1d28db774205531a2ec188e6518f998328ef7897c6")
+ version("5.3.0", sha256="c279da1d946771d120611b64974fde751534e787a394ceb6b8e0b743c143d782")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("cmake@3:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -136,13 +54,36 @@ class Rocminfo(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
"master",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
def cmake_args(self):
return [self.define("ROCM_DIR", self.spec["hsa-rocr-dev"].prefix)]
diff --git a/var/spack/repos/builtin/packages/rocmlir/package.py b/var/spack/repos/builtin/packages/rocmlir/package.py
index e7be5107d6..e450e941ec 100644
--- a/var/spack/repos/builtin/packages/rocmlir/package.py
+++ b/var/spack/repos/builtin/packages/rocmlir/package.py
@@ -12,16 +12,30 @@ class Rocmlir(CMakePackage):
targetting AMD hardware. This generator is mainly used from MIOpen and MIGraphX,
but it can be used on a standalone basis."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR"
- git = "https://github.com/ROCmSoftwarePlatform/rocMLIR.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocMLIR/archive/refs/tags/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocMLIR"
+ git = "https://github.com/ROCm/rocMLIR.git"
+ url = "https://github.com/ROCm/rocMLIR/archive/refs/tags/rocm-6.2.1.tar.gz"
- maintainers("srekolam")
+ maintainers("srekolam", "afzpatel", "renjithravindrankannath")
+
+ version("6.2.4", sha256="3283685431fd59e20a6ac5737df22c7c7421901779a2a0b6dbd6c1ab1f1b5adb")
+ version("6.2.1", sha256="eff594c6b6b97ac21bf268da49fcd016584cfe28c8ff64b0a20b8a9144dca683")
+ version("6.2.0", sha256="889e021edab19657947716e0056176ca0298602a21c4b77e7e7b00467fdaa175")
+ version("6.1.2", sha256="9bde02b898896301a30e7007e384b9de9cf8feac04f44c91a3b625e74788fda6")
+ version("6.1.1", sha256="0847fd2325fb287538442cf09daf7fa76e7926a40eafd27049e0b5320371c1b5")
+ version("6.1.0", sha256="dd800783f1ce66ce7c560d5193d053ddf3797abae5ec9375c9842243f5a8ca0b")
+ version("6.0.2", sha256="6ed039e8045169bb64c10fb063c2e1753b8d52d6d56c60e001c929082be1f20b")
+ version("6.0.0", sha256="128915abdceaf5cef26a717d154f2b2f9466f6904f4490f158038878cedbf618")
version("5.5.1", commit="8c29325e7e68e3248e863172bf0e7f97055d45ee")
version("5.5.0", sha256="a5f62769d28a73e60bc8d61022820f050e97c977c8f6f6275488db31512e1f42")
version("5.4.3", sha256="c0ba0f565e1c6614c9e6091a24cbef67b734a29e4a4ed7a8a57dc43f58ed8d53")
version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60")
- version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d")
+ with default_args(deprecated=True):
+ version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"build_type",
default="Release",
@@ -47,12 +61,26 @@ class Rocmlir(CMakePackage):
depends_on("half")
depends_on("pkgconfig", type="build")
- for ver in ["5.3.0", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
- depends_on("rocminfo@" + ver, type="build", when="@" + ver)
+ for ver in [
+ "5.3.0",
+ "5.4.0",
+ "5.4.3",
+ "5.5.0",
+ "5.5.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", type="build", when=f"@{ver}")
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py
index a6fd4806c1..9a5a96a8a3 100644
--- a/var/spack/repos/builtin/packages/rocprim/package.py
+++ b/var/spack/repos/builtin/packages/rocprim/package.py
@@ -9,99 +9,35 @@ from spack.package import *
class Rocprim(CMakePackage):
"""Radeon Open Compute Parallel Primitives Library"""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM"
- git = "https://github.com/ROCmSoftwarePlatform/rocPRIM.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocPRIM/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocPRIM"
+ git = "https://github.com/ROCm/rocPRIM.git"
+ url = "https://github.com/ROCm/rocPRIM/archive/rocm-6.1.0.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("cgmb", "srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="c567aa5e3209dd00aefe5052dde8ceb5bcc3a4aeeeb3ad8dc322f8d0791fc07f")
+ version("6.2.1", sha256="55cfa8a4224bcd2dcf2298e7938c983a8bb0c1c072fc8295c198e53785b521ac")
+ version("6.2.0", sha256="cd9be3a030830c96c940dc69e4a00f2701539a7e10b62ab1181ab83eeef31e57")
+ version("6.1.2", sha256="560b65fffb103c11bee710e4eb871fd47dd84dfe99f5762a19c5650e490fd85d")
+ version("6.1.1", sha256="94b265b6b4ed366b0ba008ef77ab6623b7b880b45874f202c887f01b67905922")
+ version("6.1.0", sha256="9f02e5f8be90baa679a28f83927495ddf0e17d684536e1f820021e8c3e8e6c84")
+ version("6.0.2", sha256="d3998720d3206965335902f8f67ca497b320a33b810cd19b2a2264505cb38779")
+ version("6.0.0", sha256="51f26c9f891a64c8db8df51d75d86d404d682092fd9d243e966ac6b2a6de381a")
version("5.7.1", sha256="15d820a0f61aed60efbba88b6efe6942878b02d912f523f9cf8f33a4583d6cd7")
version("5.7.0", sha256="a1bf94bbad13a0410b49476771270606d8a9d257188ee3ec3a37eee80540fe9b")
version("5.6.1", sha256="e9ec1b0039c07cf3096653a04224fe5fe755afc6ba000f6838b3a8bc84df27de")
version("5.6.0", sha256="360d6ece3c4a3c289dd88043432026fb989e982ae4d05230d8cdc858bcd50466")
version("5.5.1", sha256="63cdc682afb39efd18f097faf695ce64c851c4a550a8ad96fa89d694451b6a42")
version("5.5.0", sha256="968d9059f93d3f0f8a602f7b989e54e36cff2f9136486b6869e4534a5bf8c7d9")
- version("5.4.3", sha256="7be6314a46195912d3203e7e59cb8880a46ed7c1fd221e92fadedd20532e0e48")
- version("5.4.0", sha256="1740dca11c70ed350995331c292f7e3cb86273614e4a5ce9f0ea64dea5364318")
- version("5.3.3", sha256="21a6b352ad3f5b2b7d05a5ed55e612feb3c5c19d34fdb8f80260b6d25af18b2d")
- version("5.3.0", sha256="4885bd662b038c6e9f058a756fd838203dbd00227bfef6adaf31496010b100e4")
- version("5.2.3", sha256="502f49cf3190f4ac20d0a6b19eb2d0786bb3c5661329940378081f1678aa8e82")
- version("5.2.1", sha256="47f09536b0afbb7be4d6fb71cca9f0a4fa58dde29c83aee247d4b167f6f3acae")
- version("5.2.0", sha256="f99eb7d2f6b1445742fba631a0dc8bb0d464a767a9c4fb79ac865d9570fe747b")
- version("5.1.3", sha256="b5a08d2e76388bd1ffa6c946009928fe95de846ab6b65a6475998070c0cf6dc1")
- version("5.1.0", sha256="dfe106c01155e00ed816f0231d1576ff8c08750cc8278fa453926f388dc6fe48")
- version(
- "5.0.2",
- sha256="a4280f15d470699a1c6a5f86bdd951c1387e0af227c6bee6f81cee658406f4b0",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="0e7e7bda6a09b70a07ddd926986882df0c8d8ff3e0a34e12cb6d44f7d0a5840e",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="0dc673847e67db672f2e239f299206fe16c324005ddd2e92c7cb7725bb6f4fa6",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="6f0ca1da9a93064af662d6c61fbdb56bb313f8edca85615ead0dd284eb481089",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="d29ffcb5dd1c6155c586b9952fa4c11b717d90073feb083db6b03ea74746194b",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="f6cf53b5fa07a0d6f508e39c7da5b11f562c0cac4b041ec5c41a8fc733f707c7",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="3932cd3a532eea0d227186febc56747dd95841732734d9c751c656de9dd770c8",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="c46d789f85d15f8ec97f90d67b9d49fb87239912fe8d5f60a7b4c59f9d0e3da8",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="61abf4d51853ae71e54258f43936bbbb096bf06f5891d224d359bfe3104015d0",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="b406956b27d1c06b749e991a250d4ad3eb26e20c6bebf121e2ca6051597b4fa4",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="ace6b4ee4b641280807028375cb0e6fa7b296edba9e9fc09177a5d8d075a716e",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="4d37320d174eaada99dd796d81fa97d5dcc65a6dff8e8ff1c21e8e68acb4ea74",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="225209a0cbd003c241821c8a9192cec5c07c7f1a6ab7da296305fc69f5f6d365",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="29302dbeb27ae88632aa1be43a721f03e7e597c329602f9ca9c9c530c1def40d",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="7be6314a46195912d3203e7e59cb8880a46ed7c1fd221e92fadedd20532e0e48")
+ version("5.4.0", sha256="1740dca11c70ed350995331c292f7e3cb86273614e4a5ce9f0ea64dea5364318")
+ version("5.3.3", sha256="21a6b352ad3f5b2b7d05a5ed55e612feb3c5c19d34fdb8f80260b6d25af18b2d")
+ version("5.3.0", sha256="4885bd662b038c6e9f058a756fd838203dbd00227bfef6adaf31496010b100e4")
+
+ depends_on("cxx", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -111,32 +47,17 @@ class Rocprim(CMakePackage):
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
- depends_on("cmake@3.5.1:", type="build")
- depends_on("numactl", type="link", when="@3.7.0:")
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("cmake@3.10.2:", type="build")
+ depends_on("numactl", type="link")
depends_on("googletest@1.10.0:", type="test")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -147,18 +68,33 @@ class Rocprim(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("comgr@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
# the patch is meant for 5.3.0 only.this is already in the 5.3.3+ releases
patch("fix-device-merge-mismatched-param-5.3.0.patch", when="@5.3.0")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
def cmake_args(self):
args = [
@@ -173,10 +109,9 @@ class Rocprim(CMakePackage):
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
-
- if self.spec.satisfies("@:5.1.3"):
- args.append("-DCMAKE_MODULE_PATH={0}".format(self.spec["hip"].prefix.cmake))
- elif self.spec.satisfies("@5.2.0:"):
+ if self.spec.satisfies("@5.2:"):
+ args.append(self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip))
+ if self.spec.satisfies("@5.2:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
return args
diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch
new file mode 100644
index 0000000000..dc94db638c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch
@@ -0,0 +1,74 @@
+From b28744bd1c0df82efc952e5ad208927007adf6f5 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Fri, 2 Feb 2024 13:38:22 +0000
+Subject: [PATCH] Disable tests and add fPIC compile option
+
+---
+ CMakeLists.txt | 32 ++++----------------------------
+ 1 file changed, 4 insertions(+), 28 deletions(-)
+
+diff git a/CMakeLists.txt b/CMakeLists.txt
+index 8f94b58..95b0387 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,7 @@ endif()
+
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-add_compile_options(-Wall)
++add_compile_options(-Wall -fPIC)
+
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+
+@@ -162,17 +162,17 @@ add_subdirectory(src)
+
+ if(${LIBRARY_TYPE} STREQUAL SHARED)
+ # Build samples
+- add_subdirectory(samples)
++ # add_subdirectory(samples)
+
+ # Build tests
+- add_subdirectory(tests)
++ # add_subdirectory(tests)
+ endif()
+
+ # Build Plugins
+ add_subdirectory(plugin)
+
+ # Build tests
+-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
+
+ # Installation and packaging
+ set(DEST_NAME ${ROCPROFILER_NAME})
+@@ -239,30 +239,6 @@ install(
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+ COMPONENT runtime)
+
+-# librocprof-tool.so
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- COMPONENT runtime)
+-
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- COMPONENT asan)
+-
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- PERMISSIONS
+- OWNER_READ
+- OWNER_WRITE
+- OWNER_EXECUTE
+- GROUP_READ
+- GROUP_EXECUTE
+- WORLD_READ
+- WORLD_EXECUTE
+- COMPONENT runtime)
+-
+ # File reorg backward compatibility for non ASAN packaging
+ if ( NOT ENABLE_ASAN_PACKAGING )
+ # File reorg Backward compatibility
diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch
new file mode 100644
index 0000000000..698a693ca7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch
@@ -0,0 +1,68 @@
+From e7dd0146c83527e4977ecf51b22c9cb6939d74f2 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Fri, 2 Feb 2024 13:50:58 +0000
+Subject: [PATCH] Disable tests and add fPIC compile option
+
+---
+ CMakeLists.txt | 26 ++++----------------------
+ 1 file changed, 4 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c8f5da7..5c2537a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,7 @@ endif()
+
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-add_compile_options(-Wall)
++add_compile_options(-Wall -fPIC)
+
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+
+@@ -162,17 +162,17 @@ add_subdirectory(src)
+
+ if(${LIBRARY_TYPE} STREQUAL SHARED)
+ # Build samples
+- add_subdirectory(samples)
++ # add_subdirectory(samples)
+
+ # Build tests
+- add_subdirectory(tests-v2)
++ # add_subdirectory(tests-v2)
+ endif()
+
+ # Build Plugins
+ add_subdirectory(plugin)
+
+ # Build tests
+-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
+
+ # Installation and packaging
+ set(DEST_NAME ${ROCPROFILER_NAME})
+@@ -236,24 +236,6 @@ install(
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+ COMPONENT runtime)
+
+-# librocprof-tool.so
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- COMPONENT runtime)
+-
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- COMPONENT asan)
+-
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
+- WORLD_EXECUTE
+- COMPONENT runtime)
+-
+ # File reorg backward compatibility for non ASAN packaging
+ if(NOT ENABLE_ASAN_PACKAGING)
+ # File reorg Backward compatibility
diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch
new file mode 100644
index 0000000000..8ff9eebe3e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch
@@ -0,0 +1,69 @@
+From d8a55fe10f0f88087d67a9d7bb1fce47fda8d86f Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Thu, 1 Feb 2024 18:06:40 +0000
+Subject: [PATCH] Disable tests and add fPIC compile option
+
+---
+ CMakeLists.txt | 27 ++++-----------------------
+ 1 file changed, 4 insertions(+), 23 deletions(-)
+
+diff git a/CMakeLists.txt b/CMakeLists.txt
+index 99fb394..63e65ca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,7 @@ endif()
+
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-add_compile_options(-Wall)
++add_compile_options(-Wall -fPIC)
+
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+
+@@ -162,17 +162,17 @@ add_subdirectory(src)
+
+ if(${LIBRARY_TYPE} STREQUAL SHARED)
+ # Build samples
+- add_subdirectory(samples)
++ # add_subdirectory(samples)
+
+ # Build tests
+- add_subdirectory(tests)
++ # add_subdirectory(tests)
+ endif()
+
+ # Build Plugins
+ add_subdirectory(plugin)
+
+ # Build tests
+-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test)
+
+ # Installation and packaging
+ set(DEST_NAME ${ROCPROFILER_NAME})
+@@ -238,25 +238,6 @@ install(
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+ COMPONENT runtime)
+
+-# librocprof-tool.so
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- COMPONENT runtime)
+-
+-install(
+- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME}
+- PERMISSIONS
+- OWNER_READ
+- OWNER_WRITE
+- OWNER_EXECUTE
+- GROUP_READ
+- GROUP_EXECUTE
+- WORLD_READ
+- WORLD_EXECUTE
+- COMPONENT runtime)
+-
+ # File reorg Backward compatibility
+ option(FILE_REORG_BACKWARD_COMPATIBILITY
+ "Enable File Reorg with backward compatibility" ON)
diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch
new file mode 100644
index 0000000000..51a92ccfd1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch
@@ -0,0 +1,24 @@
+From 869c2dc4b88aa5beb5ab0e57aba85d0c520e7074 Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Fri, 2 Feb 2024 14:16:12 +0000
+Subject: [PATCH] Disable tests
+
+---
+ CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9d52082..6f35926 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -176,8 +176,8 @@ endif()
+ enable_testing()
+
+ # Temporarily for CI to work
+-set(ROCPROFILER_BUILD_TESTS ON)
+-set(ROCPROFILER_BUILD_CI ON)
++set(ROCPROFILER_BUILD_TESTS OFF)
++set(ROCPROFILER_BUILD_CI OFF)
+
+ if(ROCPROFILER_BUILD_CI)
+ include(CTest)
diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py
index d87dd3ad2d..e6b854148f 100644
--- a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py
+++ b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py
@@ -11,131 +11,117 @@ from spack.package import *
class RocprofilerDev(CMakePackage):
"""ROCPROFILER library for AMD HSA runtime API extension support"""
- homepage = "https://github.com/ROCm-Developer-Tools/rocprofiler"
- git = "https://github.com/ROCm-Developer-Tools/rocprofiler.git"
- url = "https://github.com/ROCm-Developer-Tools/rocprofiler/archive/refs/tags/rocm-5.4.3.tar.gz"
+ homepage = "https://github.com/ROCm/rocprofiler"
+ git = "https://github.com/ROCm/rocprofiler.git"
+ url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["librocprofiler64"]
-
license("MIT")
+ version("6.2.4", sha256="898eae91938c2d08207b615db03a784c7f3090989bcf09260635d18aa5930a2c")
+ version("6.2.1", sha256="6eb36dad67e3b294f210e21987c52aec666652cffa87b8af1f8077d5b7812245")
+ version("6.2.0", sha256="79b4f29d051e62639b4bf2ca288035514d32e055fc759ff4a82d377bf7ca97ea")
+ version("6.1.2", sha256="e6e8771b8c933c16a99192cc215fe964a95e1718ad286520c8272150e184bc06")
+ version("6.1.1", sha256="b4b01a02de5328c7383c2318a998da86a6a9372e1728fc88a21b52bc1cbe9d9d")
+ version("6.1.0", sha256="14ac0a451428465133583e83d9177ed34b3d4679515018a12ee74f5e0288c956")
+ version("6.0.2", sha256="d3f24e639a5e151fa418a92ae6fe150bdf14120b8982a5baa52844ce2fba0b82")
+ version("6.0.0", sha256="6aca327a6ba302b5957002e55ac640dd185d51a354da3859e957448a5fc36b14")
+ version("5.7.1", sha256="2fb7158592d89312ba419a272d907d8849373c0a676a83dd03c32b9942dfd27a")
+ version("5.7.0", sha256="003af33db5585e71823b2b58618d795df926f6bd25943f2add388db23f2bf377")
+ version("5.6.1", sha256="3e5eecce216418e61ffee893cbc8611e38305ee472d0e10d579eb74e287c8e1b")
+ version("5.6.0", sha256="ff811bd91580f60b6b4d397b6fce38d96f07debc6fd8a631b81d1b266cc9542d")
+ version("5.5.1", sha256="f5dbece5c205e37383fed4a2bd6042ff1c11f11f64dfbf65d7e23c0af6889a5a")
+ version("5.5.0", sha256="d9dd38c42b4b12d4149f1cc3fca1af5bec69c72f455653a8f4fd8195b3b95703")
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="86c3f43ee6cb9808796a21409c853cc8fd496578b9eef4de67ca77830229cac1")
+ version("5.4.0", sha256="0322cbe5d1d3182e616f472da31f0707ad6040833c38c28f2b39381a85210f43")
+ version("5.3.3", sha256="07ee28f3420a07fc9d45910e78ad7961b388109cfc0e74cfdf2666789e6af171")
+ version("5.3.0", sha256="b0905a329dc1c97a362b951f3f8ef5da9d171cabb001ed4253bd59a2742e7d39")
- version("5.4.3", sha256="86c3f43ee6cb9808796a21409c853cc8fd496578b9eef4de67ca77830229cac1")
- version("5.4.0", sha256="0322cbe5d1d3182e616f472da31f0707ad6040833c38c28f2b39381a85210f43")
- version("5.3.3", sha256="07ee28f3420a07fc9d45910e78ad7961b388109cfc0e74cfdf2666789e6af171")
- version("5.3.0", sha256="b0905a329dc1c97a362b951f3f8ef5da9d171cabb001ed4253bd59a2742e7d39")
- version("5.2.3", sha256="4ed22e86633ab177eed85fed8994fcb71017c4c4774998e4d3fc36b6c0a15eac")
- version("5.2.1", sha256="c6768ec428590aadfb0e7ef6e22b8dc5ac8ed97babeb56db07f2d5d41cd122e2")
- version("5.2.0", sha256="1f4db27b56ef1863d4c9e1d96bac9117d66be45156d0637cfe4fd38cae61a23a")
- version("5.1.3", sha256="eca7be451c7bf000fd9c75683e7f5dfbed32dbb385b5ac685d2251ee8c3abc96")
- version("5.1.0", sha256="4a1c6ed887b0159392406af8796508df2794353a4c3aacc801116044fb4a10a5")
- version(
- "5.0.2",
- sha256="48f58c3c16dd45fead2086f89a175f74636e81bc2437e30bb6e9361b1083e71d",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="2ed521f400e4aafd17405c2f9ad2fb3b906a982d3767b233122d9c2964c3245f",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="baa59826f8fb984993c03d05e2e3cdf0b830b08f8056b18ba206dfbaa367aca9",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="9b47b086d28fc831dbe0f83ec7e4640057b97edc961f2f050a0968633f32a06b",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="c6f5fa192c9cdb32553d24ed5c847107d312042e39fa3dd17c83e237c9542a2d",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="3b876a0e601d2c6ae56ddf2a6027afe45b3533f4445b0c2da748d020b6b00cf2",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="c5888eda1404010f88219055778cfeb00d9c21901e172709708720008b1af80f",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="2eead5707016da606d636b97f3af1c98cb471da78659067d5a77d4a2aa43ef4c",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="e9960940d1ec925814a0e55ee31f5fc2fb23fa839d1c6a909f72dd83f657fb25",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="fbf5ce9fbc13ba2b3f9489838e00b54885aba92336f055e8b03fef3e3347071e",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="f07ddd9bf2f86550c8d243f887e9bde9d4f2ceec81ecc6393012aaf2a45999e8",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="38ad3ac20f60f3290ce750c34f0aad442354b1d0a56b81167a018e44ecdf7fff",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="d3f03bf850cbd86ca9dfe6e6cc6f559d8083b0f3ea4711d8260b232cb6fdd1cc",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="c42548dd467b7138be94ad68c715254eb56a9d3b670ccf993c43cd4d43659937",
- deprecated=True,
- )
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("cmake@3:", type="build")
+
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
"5.4.3",
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", when=f"@{ver}")
+ depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("rocminfo@" + ver, when="@" + ver)
- depends_on("roctracer-dev-api@" + ver, when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}")
+
+ for ver in [
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on(f"aqlprofile@{ver}", when=f"@{ver}")
+ depends_on(f"comgr@{ver}", when=f"@{ver}")
depends_on("numactl", type="link", when="@4.3.1")
- # See https://github.com/ROCm-Developer-Tools/rocprofiler/pull/50
- patch("fix-includes.patch")
- patch("0001-Continue-build-in-absence-of-aql-profile-lib.patch", when="@5.3:")
+ depends_on("py-lxml", when="@5.5:")
+ depends_on("py-cppheaderparser", when="@5.5:")
+ depends_on("googletest@1.10.0:", when="@5.5:")
+ depends_on("py-pyyaml", when="@5.5:")
+ depends_on("py-barectf", when="@5.5:")
+ depends_on("py-setuptools", when="@5.5:")
+ depends_on("py-jsonschema", when="@5.5:")
+ depends_on("py-jinja2", when="@5.5:")
+ depends_on("py-termcolor", when="@5.5:")
+ depends_on("py-pandas", when="@6.0:")
+
+ # See https://github.com/ROCm/rocprofiler/pull/50
+ patch("fix-includes.patch", when="@:5.4")
+ patch("0001-Continue-build-in-absence-of-aql-profile-lib.patch", when="@5.3:5.4")
+ patch("0002-add-fPIC-and-disable-tests.patch", when="@5.5")
+ patch("0002-add-fPIC-and-disable-tests-5.6.patch", when="@5.6")
+ patch("0002-add-fPIC-and-disable-tests-5.7.patch", when="@5.7")
+ patch("0003-disable-tests.patch", when="@6.0:")
def patch(self):
filter_file(
@@ -150,17 +136,25 @@ class RocprofilerDev(CMakePackage):
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
- return [
+ args = [
self.define(
"PROF_API_HEADER_PATH", self.spec["roctracer-dev-api"].prefix.roctracer.include.ext
),
self.define("ROCM_ROOT_DIR", self.spec["hsakmt-roct"].prefix.include),
+ self.define("CMAKE_INSTALL_LIBDIR", "lib"),
]
+ if self.spec.satisfies("@6.2:"):
+ args.append(self.define("ROCPROFILER_BUILD_PLUGIN_PERFETTO", "OFF"))
+ return args
+
+ @run_after("install")
+ def post_install(self):
+ if self.spec.satisfies("@6.0:"):
+ install_tree(self.prefix.include.rocprofiler, self.prefix.rocprofiler.include)
+ install_tree(self.prefix.lib, self.prefix.rocprofiler.lib)
diff --git a/var/spack/repos/builtin/packages/rocprofiler-register/001-add-cpack-fmt-glog.patch b/var/spack/repos/builtin/packages/rocprofiler-register/001-add-cpack-fmt-glog.patch
new file mode 100644
index 0000000000..d7b758c3e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-register/001-add-cpack-fmt-glog.patch
@@ -0,0 +1,38 @@
+From 6eb75bd029d17dbe53a6470ca357b2721ba9d87e Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Mon, 12 Aug 2024 20:43:05 +0000
+Subject: [PATCH] add CPack include and find glog and fmt
+
+---
+ cmake/rocprofiler_register_config_packaging.cmake | 1 +
+ source/lib/rocprofiler-register/CMakeLists.txt | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/rocprofiler_register_config_packaging.cmake b/cmake/rocprofiler_register_config_packaging.cmake
+index 5e98f3e..88c4155 100644
+--- a/cmake/rocprofiler_register_config_packaging.cmake
++++ b/cmake/rocprofiler_register_config_packaging.cmake
+@@ -81,6 +81,7 @@ foreach(COMPONENT_GROUP ${ROCPROFILER_REGISTER_COMPONENT_GROUPS})
+ set(_NAME "${COMPONENT_NAME_${COMPONENT_GROUP}}")
+ set(_DESC "${COMPONENT_DESC_${COMPONENT_GROUP}}")
+
++ include(CPack)
+ cpack_add_component_group(
+ ${COMPONENT_GROUP}
+ DISPLAY_NAME "${_NAME}"
+diff --git a/source/lib/rocprofiler-register/CMakeLists.txt b/source/lib/rocprofiler-register/CMakeLists.txt
+index 840fbed..4e30a3f 100644
+--- a/source/lib/rocprofiler-register/CMakeLists.txt
++++ b/source/lib/rocprofiler-register/CMakeLists.txt
+@@ -16,7 +16,8 @@ endif()
+ target_include_directories(
+ rocprofiler-register PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/source
+ ${PROJECT_BINARY_DIR}/source)
+-
++find_package(fmt CONFIG REQUIRED)
++find_package(glog CONFIG REQUIRED)
+ target_link_libraries(
+ rocprofiler-register
+ PUBLIC rocprofiler-register::headers
+--
+2.43.5
diff --git a/var/spack/repos/builtin/packages/rocprofiler-register/package.py b/var/spack/repos/builtin/packages/rocprofiler-register/package.py
new file mode 100644
index 0000000000..7192207872
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocprofiler-register/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RocprofilerRegister(CMakePackage):
+ """The rocprofiler-register library is a helper library that coordinates
+ the modification of the intercept API table(s) of the HSA/HIP/ROCTx runtime
+ libraries by the ROCprofiler (v2) library"""
+
+ homepage = "https://github.com/ROCm/rocprofiler-register"
+ git = "https://github.com/ROCm/rocprofiler-register.git"
+ url = "https://github.com/ROCm/rocprofiler-register/archive/refs/tags/rocm-6.2.4.tar.gz"
+
+ tags = ["rocm"]
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ license("MIT")
+ version("6.2.4", sha256="e7c31d5e1100c1e8ae0a2c6de3bfea75341abc4a68d02b58089421e2a54bba54")
+ version("6.2.1", sha256="161d3502863147df4daeadc538d0eb156c314c94634f8c34ee5994f046f8753f")
+ version("6.2.0", sha256="5cdfdfc621da9ef5a6b828d1a3a342db222b648c91359f71651b9404bf7ba62c")
+ version("6.1.2", sha256="aa57b234cc1db5ae32c7494f4a9120b95a1845b95469dad447f470a6aa5e3cc9")
+ version("6.1.1", sha256="38242443d9147a04d61374de4cecee686578a3140fed17e88480f564a1f67cc7")
+ version("6.1.0", sha256="c6e60447ea2ccca8d6acd8758ac00037347892b16b450e1f99ddd04cc4b6cac1")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fmt")
+ depends_on("glog")
+
+ patch("001-add-cpack-fmt-glog.patch")
+
+ def cmake_args(self):
+ args = ["-DROCPROFILER_REGISTER_BUILD_FMT=OFF", "-DROCPROFILER_REGISTER_BUILD_GLOG=OFF"]
+ args.append(self.define("ROCPROFILER_REGISTER_BUILD_TESTS", self.run_tests))
+ return args
diff --git a/var/spack/repos/builtin/packages/rocpydecode/package.py b/var/spack/repos/builtin/packages/rocpydecode/package.py
new file mode 100644
index 0000000000..d4356625e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocpydecode/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Rocpydecode(CMakePackage):
+ """rocPyDecode is a set of Python bindings to rocDecode C++ library which provides
+ full HW acceleration for video decoding on AMD GPUs."""
+
+ homepage = "https://github.com/ROCm/rocPyDecode"
+ url = "https://github.com/ROCm/rocPyDecode/archive/refs/tags/rocm-6.2.0.tar.gz"
+
+ maintainers("afzpatel", "srekolam", "renjithravindrankannath")
+
+ version("6.2.4", sha256="9cdb8bdc65b54b2c02d6c950dd34cd702ec50d903aa4d252d1eb1f8cae8c0afb")
+ version("6.2.1", sha256="34c595cfe40ad74fcec2f52e7cc7be3ad8c8334030b0e98eb36305b6f63edc0d")
+ version("6.2.0", sha256="e465254cd3e96bbb59208e90293d7c6b7744b0fbcd928ef278ec568c83e63ff3")
+
+ depends_on("py-pybind11")
+ depends_on("ffmpeg@4.4:6")
+ depends_on("dlpack")
+
+ for ver in ["6.2.0", "6.2.1", "6.2.4"]:
+ depends_on(f"rocdecode@{ver}", when=f"@{ver}")
+
+ def patch(self):
+ filter_file(
+ r"${ROCM_PATH}/llvm/bin/clang++",
+ "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
+ "CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ r"${ROCM_PATH}/share/rocdecode/utils",
+ "{0}/share/rocdecode/utils".format(self.spec["rocdecode"].prefix),
+ "CMakeLists.txt",
+ string=True,
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define("rocDecode_PATH", self.spec["rocdecode"].prefix),
+ self.define("FFMPEG_INCLUDE_DIR", self.spec["ffmpeg"].prefix.include),
+ self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix),
+ self.define("CMAKE_CXX_FLAGS", "-I{0}".format(self.spec["dlpack"].prefix.include)),
+ self.define(
+ "CMAKE_CXX_FLAGS",
+ "-DUSE_AVCODEC_GREATER_THAN_58_134 -I{0}".format(
+ self.spec["dlpack"].prefix.include
+ ),
+ ),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py
index 775f1eee69..a07c2a9c32 100644
--- a/var/spack/repos/builtin/packages/rocrand/package.py
+++ b/var/spack/repos/builtin/packages/rocrand/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import glob
import os
import re
@@ -14,9 +13,9 @@ class Rocrand(CMakePackage):
"""The rocRAND project provides functions that generate
pseudo-random and quasi-random numbers."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocRAND"
- git = "https://github.com/ROCmSoftwarePlatform/rocRAND.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocRAND/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocRAND"
+ git = "https://github.com/ROCm/rocRAND.git"
+ url = "https://github.com/ROCm/rocRAND/archive/rocm-6.0.2.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
@@ -26,91 +25,28 @@ class Rocrand(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="94a2ea2413623b427ddf69365b3996c18721456965024c0dfac506a13c8dc547")
+ version("6.2.1", sha256="ed07f638b5e30199251ddda6dd9ee53ee0ec49bcf37cc571a3de85c3a9833248")
+ version("6.2.0", sha256="7f5318e9c9eb36fb3660392e97520268920c59af3a51af19633aabe5046ef1af")
+ version("6.1.2", sha256="ac3c858c0f76188ac50574591aa6b41b27bda2af5925314451a44242319f28c8")
+ version("6.1.1", sha256="d6302d014045694be85385cdc683ea75476e23fd92ae170079c261c0b041764b")
+ version("6.1.0", sha256="ea80c5d657fa48b1122a47986239a04118977195ee4826d2b14b8bfe0fabce6e")
+ version("6.0.2", sha256="51d66c645987cbfb593aaa6be94109e87fe4cb7e9c70309eb3c159af0de292d7")
+ version("6.0.0", sha256="cee93231c088be524bb2cb0e6093ec47e62e61a55153486bebbc2ca5b3d49360")
version("5.7.1", sha256="885cd905bbd23d02ba8f3f87d5c0b79bc44bd020ea9af190f3959cf5aa33d07d")
version("5.7.0", sha256="d6053d986821e5cbc6cfec0778476efb1411ef943f11e7a8b973b1814a259dcf")
version("5.6.1", sha256="6bf71e687ffa0fcc1b00e3567dd43da4147a82390f1b2db5e6f1f594dee6066d")
version("5.6.0", sha256="cc894d2f1af55e16b62c179062063946609c656043556189c656a115fd7d6f5f")
version("5.5.1", sha256="e8bed3741b19e296bd698fc55b43686206f42f4deea6ace71513e0c48258cc6e")
version("5.5.0", sha256="0481e7ef74c181026487a532d1c17e62dd468e508106edde0279ca1adeee6f9a")
- version("5.4.3", sha256="463aa760e9f74e45b326765040bb8a8a4fa27aaeaa5e5df16f8289125f88a619")
- version("5.4.0", sha256="0f6a0279b8b5a6dfbe32b45e1598218fe804fee36170d5c1f7b161c600544ef2")
- version("5.3.3", sha256="b0aae79dce7f6f9ef76ad2594745fe1f589a7b675b22f35b4d2369e7d5e1985a")
- version("5.3.0", sha256="be4c9f9433415bdfea50d9f47b8afb43ac315f205ed39674f863955a6c256dca")
- version("5.2.3", sha256="01eda8022fab7bafb2c457fe26a9e9c99950ed1b772ae7bf8710b23a90b56e32")
- version("5.2.1", sha256="4b2a7780f0112c12b5f307e1130e6b2c02ab984a0c1b94e9190dae38f0067600")
- version("5.2.0", sha256="ab3057e7c17a9fbe584f89ef98ec92a74d638a98d333e7d0f64daf7bc9051e38")
- version("5.1.3", sha256="4a19e1bcb60955a02a73ad64594c23886d6749afe06b0104e2b877dbe02c8d1c")
- version("5.1.0", sha256="0c6f114a775d0b38be71f3f621a10bde2104a1f655d5d68c5fecb79b8b51a815")
- version(
- "5.0.2",
- sha256="2dbce2a7fb273c2f9456c002adf3a510b9ec79f2ff32dfccdd59948f3ddb1505",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="356a03a74d6d5df3ae2d38da07929f23d90bb4dee71f88792c25c25069e673bc",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="1523997a21437c3b74d47a319d81f8cc44b8e96ec5174004944f2fb4629900db",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="fd391f81b9ea0b57808d93e8b72d86eec1b4c3529180dfb99ed6d3e2aa1285c2",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="b3d6ae0cdbbdfb56a73035690f8cb9e173fec1ccaaf9a4c5fdbe5e562e50c901",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="a85ced6c155befb7df8d58365518f4d9afc4407ee4e01d4640b5fd94604ca3e0",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="15725c89e9cc9cc76bd30415fd2c0c5b354078831394ab8b23fe6633497b92c8",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="94327e38739030ab6719a257f5a928a35842694750c7f46d9e11ff2164c2baed",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="1cafdbfa15cde635bd424d2a858dc5cc94d668f9a211ff39606ee01ed1715f41",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="f55e2b49b4dfd887e46eea049f3359ae03c60bae366ffc979667d364205bc99c",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="a500a3a83be36b6c91aa062dc6eef1f9fc1d9ee62422d541cc279513d98efa91",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="79eb84d41363a46ed9bb18d9757cf6a419d2f48bb6a71b8e4db616a5007a6560",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="5e43fe07afe2c7327a692b3b580875bae6e6ee790e044c053fffafbfcbc14860",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="592865a45e7ef55ad9d7eddc8082df69eacfd2c1f3e9c57810eb336b15cd5732",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="463aa760e9f74e45b326765040bb8a8a4fa27aaeaa5e5df16f8289125f88a619")
+ version("5.4.0", sha256="0f6a0279b8b5a6dfbe32b45e1598218fe804fee36170d5c1f7b161c600544ef2")
+ version("5.3.3", sha256="b0aae79dce7f6f9ef76ad2594745fe1f589a7b675b22f35b4d2369e7d5e1985a")
+ version("5.3.0", sha256="be4c9f9433415bdfea50d9f47b8afb43ac315f205ed39674f863955a6c256dca")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -121,9 +57,13 @@ class Rocrand(CMakePackage):
sticky=True,
)
variant("hiprand", default=True, when="@5.1.0:", description="Build the hiprand library")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- depends_on("cmake@3.10.2:", type="build", when="@4.5.0:")
- depends_on("cmake@3.5.1:", type="build")
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ depends_on("cmake@3.10.2:", type="build")
depends_on("googletest@1.10.0:", type="test")
@@ -141,23 +81,18 @@ class Rocrand(CMakePackage):
("5.4.0", "125d691d3bcc6de5f5d63cf5f5a993c636251208"),
("5.3.3", "12e2f070337945318295c330bf69c6c060928b9e"),
("5.3.0", "12e2f070337945318295c330bf69c6c060928b9e"),
- ("5.2.3", "12e2f070337945318295c330bf69c6c060928b9e"),
- ("5.2.1", "12e2f070337945318295c330bf69c6c060928b9e"),
- ("5.2.0", "12e2f070337945318295c330bf69c6c060928b9e"),
- ("5.1.3", "20ac3db9d7462c15a3e96a6f0507cd5f2ee089c4"),
- ("5.1.0", "20ac3db9d7462c15a3e96a6f0507cd5f2ee089c4"),
]:
resource(
name="hipRAND",
- git="https://github.com/ROCmSoftwarePlatform/hipRAND.git",
+ git="https://github.com/ROCm/hipRAND.git",
commit=d_commit,
destination="",
placement="hiprand",
- when="@{0} +hiprand".format(d_version),
+ when=f"@{d_version} +hiprand",
)
resource(
name="hipRAND",
- git="https://github.com/ROCmSoftwarePlatform/hipRAND.git",
+ git="https://github.com/ROCm/hipRAND.git",
branch="master",
destination="",
placement="hiprand",
@@ -165,7 +100,7 @@ class Rocrand(CMakePackage):
)
resource(
name="hipRAND",
- git="https://github.com/ROCmSoftwarePlatform/hipRAND.git",
+ git="https://github.com/ROCm/hipRAND.git",
branch="develop",
destination="",
placement="hiprand",
@@ -173,25 +108,6 @@ class Rocrand(CMakePackage):
)
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -202,9 +118,17 @@ class Rocrand(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
def patch(self):
if self.spec.satisfies("@5.1.0:5.4 +hiprand"):
@@ -213,68 +137,22 @@ class Rocrand(CMakePackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
-
- @run_after("install")
- def fix_library_locations(self):
- if self.spec.satisfies("~hiprand"):
- return
- """Fix the rocRAND and hipRAND libraries location"""
- # rocRAND installs librocrand.so* and libhiprand.so* to rocrand/lib and
- # hiprand/lib, respectively. This confuses spack's RPATH management. We
- # fix it by adding a symlink to the libraries.
- if self.spec.satisfies("@:5.0.2"):
- hiprand_lib_path = join_path(self.prefix, "hiprand", "lib")
- rocrand_lib_path = join_path(self.prefix, "rocrand", "lib")
- mkdirp(self.prefix.lib)
- with working_dir(hiprand_lib_path):
- hiprand_libs = glob.glob("*.so*")
- for lib in hiprand_libs:
- os.symlink(join_path(hiprand_lib_path, lib), join_path(self.prefix.lib, lib))
- with working_dir(rocrand_lib_path):
- rocrand_libs = glob.glob("*.so*")
- for lib in rocrand_libs:
- os.symlink(join_path(rocrand_lib_path, lib), join_path(self.prefix.lib, lib))
- """Fix the rocRAND and hipRAND include path"""
- # rocRAND installs rocrand*.h* and hiprand*.h* rocrand/include and
- # hiprand/include, respectively. This confuses spack's RPATH management. We
- # fix it by adding a symlink to the header files.
- hiprand_include_path = join_path(self.prefix, "hiprand", "include")
- rocrand_include_path = join_path(self.prefix, "rocrand", "include")
-
- with working_dir(hiprand_include_path):
- hiprand_includes = glob.glob("*.h*")
- hiprand_path = join_path(self.prefix, "hiprand")
- with working_dir(hiprand_path):
- for header_file in hiprand_includes:
- os.symlink(join_path("include", header_file), header_file)
- with working_dir(rocrand_include_path):
- rocrand_includes = glob.glob("*.h*")
- rocrand_path = join_path(self.prefix, "rocrand")
- with working_dir(rocrand_path):
- for header_file in rocrand_includes:
- os.symlink(join_path("include", header_file), header_file)
- elif self.spec.satisfies("@5.1.0:5.1.3"):
- if not os.path.isdir(os.path.join(self.prefix, "hiprand")):
- os.mkdir(os.path.join(self.prefix, "hiprand"))
- os.mkdir(os.path.join(self.prefix, "hiprand", "include"))
- hiprand_include_path = join_path(self.prefix, "include", "hiprand")
- with working_dir(hiprand_include_path):
- hiprand_includes = glob.glob("*.h*")
- hiprand_path = join_path(self.prefix, "hiprand", "include")
- with working_dir(hiprand_path):
- for header_file in hiprand_includes:
- os.symlink(join_path("../../include/hiprand", header_file), header_file)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
args = [self.define("BUILD_BENCHMARK", "OFF"), self.define("BUILD_TEST", self.run_tests)]
diff --git a/var/spack/repos/builtin/packages/rocsolver/fmt-8.1-compatibility.patch b/var/spack/repos/builtin/packages/rocsolver/fmt-8.1-compatibility.patch
deleted file mode 100644
index f933366744..0000000000
--- a/var/spack/repos/builtin/packages/rocsolver/fmt-8.1-compatibility.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- a/library/src/include/rocsolver_logvalue.hpp
-+++ b/library/src/include/rocsolver_logvalue.hpp
-@@ -8,6 +8,14 @@
-
- #include "rocsolver_datatype2string.hpp"
-
-+/* The format function for user-defined types cannot be const before fmt v8.0
-+ but must be const in fmt v8.1 if the type is used in a tuple. */
-+#if FMT_VERSION < 80000
-+#define ROCSOLVER_FMT_CONST
-+#else
-+#define ROCSOLVER_FMT_CONST const
-+#endif
-+
- /***************************************************************************
- * Wrapper for types passed to logger, so we can more easily adjust the
- * default way of printing built-in types without doing it globally. (e.g.
-@@ -37,7 +45,7 @@ template <typename T>
- struct formatter<rocsolver_logvalue<T>> : formatter<T>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<T> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<T>::format(wrapper.value, ctx);
- }
-@@ -49,7 +57,7 @@ template <>
- struct formatter<rocsolver_logvalue<bool>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<bool> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(wrapper.value ? '1' : '0', ctx);
- }
-@@ -58,7 +66,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_operation>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_operation> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_operation(wrapper.value), ctx);
- }
-@@ -67,7 +75,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_fill>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_fill> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_fill(wrapper.value), ctx);
- }
-@@ -76,7 +84,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_diagonal>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_diagonal> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_diagonal(wrapper.value), ctx);
- }
-@@ -85,7 +93,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_side>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_side> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_side(wrapper.value), ctx);
- }
-@@ -94,7 +102,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_direct>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_direct> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_direct(wrapper.value), ctx);
- }
-@@ -104,7 +112,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_storev>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_storev> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_storev(wrapper.value), ctx);
- }
-@@ -113,7 +121,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_workmode>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_workmode> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_workmode(wrapper.value), ctx);
- }
-@@ -122,7 +130,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_svect>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_svect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_svect(wrapper.value), ctx);
- }
-@@ -131,7 +139,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_evect>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_evect> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_evect(wrapper.value), ctx);
- }
-@@ -140,7 +148,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_eform>> : formatter<char>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_eform> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<char>::format(rocblas2char_eform(wrapper.value), ctx);
- }
-@@ -149,7 +157,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_datatype>> : formatter<string_view>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_datatype> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<string_view>::format(rocblas2string_datatype(wrapper.value), ctx);
- }
-@@ -158,7 +166,7 @@ template <>
- struct formatter<rocsolver_logvalue<rocblas_initialization>> : formatter<string_view>
- {
- template <typename FormatCtx>
-- auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx)
-+ auto format(rocsolver_logvalue<rocblas_initialization> wrapper, FormatCtx& ctx) ROCSOLVER_FMT_CONST
- {
- return formatter<string_view>::format(rocblas2string_initialization(wrapper.value), ctx);
- }
diff --git a/var/spack/repos/builtin/packages/rocsolver/link-clients-blas.patch b/var/spack/repos/builtin/packages/rocsolver/link-clients-blas.patch
deleted file mode 100644
index 13dfd31976..0000000000
--- a/var/spack/repos/builtin/packages/rocsolver/link-clients-blas.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
---- a/clients/benchmarks/CMakeLists.txt 2021-08-14 18:54:53.356456513 -0600
-+++ b/clients/benchmarks/CMakeLists.txt 2021-08-14 18:55:25.125354419 -0600
-@@ -19,6 +19,7 @@
- target_link_libraries( rocsolver-bench PRIVATE
- cblas
- lapack
-+ blas
- Threads::Threads
- hip::device
- rocsolver-common
-diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
---- a/clients/gtest/CMakeLists.txt 2021-08-14 18:54:53.356456513 -0600
-+++ b/clients/gtest/CMakeLists.txt 2021-08-14 18:55:16.581112850 -0600
-@@ -89,6 +89,7 @@
- target_link_libraries( rocsolver-test PRIVATE
- cblas
- lapack
-+ blas
- GTest::GTest
- hip::device
- rocsolver-common
diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py
index ea85a69965..6f9ddb015d 100644
--- a/var/spack/repos/builtin/packages/rocsolver/package.py
+++ b/var/spack/repos/builtin/packages/rocsolver/package.py
@@ -13,9 +13,9 @@ class Rocsolver(CMakePackage):
"""rocSOLVER is a work-in-progress implementation of a
subset of LAPACK functionality on the ROCm platform."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocSOLVER"
- git = "https://github.com/ROCmSoftwarePlatform/rocSOLVER.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocSOLVER/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocSOLVER"
+ git = "https://github.com/ROCm/rocSOLVER.git"
+ url = "https://github.com/ROCm/rocSOLVER/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie")
@@ -36,140 +36,60 @@ class Rocsolver(CMakePackage):
size and compile time by adding specialized kernels \
for small matrix sizes",
)
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
+
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
license("BSD-2-Clause")
version("develop", branch="develop")
version("master", branch="master")
+ version("6.2.4", sha256="022863df6a9d51bd216e56dd4dc7d437584e48304cfdbc9c5751be1abfd7c73f")
+ version("6.2.1", sha256="e1c19cd25f7119c116d1c63e2384e9c47a4ff7ae14bb42dfcef766a4d3a011d5")
+ version("6.2.0", sha256="74cb799dcddfcbd6ee05398003416dbccd3d06d7f4b23e4324baac3f15440162")
+ version("6.1.2", sha256="8cb45b6a4ed819b8e952c0bfdd8bf7dd941478ac656bea42a6d6751f459e66ea")
+ version("6.1.1", sha256="3bbba30fa7f187676caf858f66c2345e4dcc81b9546eca4a726c0b159dad22bd")
+ version("6.1.0", sha256="f1d7a4edf14ed0b2e2f74aa5cbc9db0c3b0dd31e50bbada1586cb353a28fe015")
+ version("6.0.2", sha256="781d5df2886ab0d5087a215a33ac390dd27653b2a9b4a620c7d51b0ae56f63d2")
+ version("6.0.0", sha256="5fcaba96f3efafc2ecc3f4ec104095d96545c16e1b9f95410bd571cb0fc643ae")
version("5.7.1", sha256="83e0c137b8690dbeb2e85d9e25415d96bd06979f09f2b10b2aff8e4c9f833fa4")
version("5.7.0", sha256="bb16d360f14b34fe6e8a6b8ddc6e631672a5ffccbdcb25f0ce319edddd7f9682")
version("5.6.1", sha256="6a8f366218aee599a0e56755030f94ee690b34f30e6d602748632226c5dc21bb")
version("5.6.0", sha256="54baa7f35f3c53da9005054e6f7aeecece5526dafcb277af32cbcb3996b0cbbc")
version("5.5.1", sha256="8bf843e42d2e89203ea5fdb6e6082cea90da8d02920ab4c09bcc2b6f69909760")
version("5.5.0", sha256="6775aa5b96731208c12c5b450cf218d4c262a80b7ea20c2c3034c448bb2ca4d2")
- version("5.4.3", sha256="5308b68ea72f465239a4bb2ed1a0507f0df7c98d3df3fd1f392e6d9ed7975232")
- version("5.4.0", sha256="69690839cb649dee43353b739d3e6b2312f3d965dfe66705c0ea910e57c6a8cb")
- version("5.3.3", sha256="d2248b5e2e0b20e08dd1ee5408e38deb02ecd28096dc7c7f2539351df6cb6ad5")
- version("5.3.0", sha256="4569f860d240d50e94e77d498050f5cafe5ad11daddaead3e7e9eaa1957878a7")
- version("5.2.3", sha256="b278a1640f31fb1905f18dc5127d57e2b1d36fd2b4f39ae811b5537fa6ce87d4")
- version("5.2.1", sha256="74c127efaefec70a14dff6fa0e92276f38a6c313bf1271d68d03a4222d1fc3b6")
- version("5.2.0", sha256="94d46ebe1266eaa05df50c1789dc27d3f2dbf3cb5af156e757777a82ed6ef356")
- version("5.1.3", sha256="5a8f3b95ac9a131c31538196e954ea53b863009c092cce0c0ef869a0cd5dd554")
- version("5.1.0", sha256="88de515a6e75eaa3c50c9c8ae1e7ae8e3b46e712e388f44f79b63fefa9fc0831")
- version(
- "5.0.2",
- sha256="298e0903f1ba8074055ab072690f967062d6e06a9371574de23e4e38d2997688",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="d444ad5348eb8a2c04646ceae6923467a0e775441f2c73150892e228e585b2e1",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="4639322bd1e77fedfdeb9032633bde6211a0b1cc16a612db7754f873f18a492f",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="0295862da941f31f4d43b19195b79331bd17f5968032f75c89d2791a6f8c1e8c",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="c6e7468d7041718ce6e1c7f50ec80a552439ac9cfed2dc3f753ae417dda5724f",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="63cc88dd285c0fe01ec2394321ec3b4e1e59bb98ce05b06e4b4d8fadcf1ff028",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="e9ef72d7c29e7c36bf02be63a64ca23b444e1ca71751749f7d66647873d9fdea",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="da5cc800dabf7367b02b73c93780b2967f112bb45232e4b06e5fd07b4d5b8d88",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="be9a52644c276813f76d78f2c11eddaf8c2d7f9dd04f4570f23d328ad30d5880",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="bc72483656b6b23a1e321913a580ca460da3bc5976404647536a01857f178dd2",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="85fd77fe5acf5af518d11e90e2c03ee0c5abd61071cea86ef5df09f944879648",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="72aa74284944d8b454088e8c8d74cf05464a4e2e46d33a57017ddd009113025e",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="8c1c630595952806e658c539fd0f3056bd45bafc22b57f0dd10141abefbe4595",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="d655e8c762fb9e123b9fd7200b4258512ceef69973de4d0588c815bc666cb358",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="5308b68ea72f465239a4bb2ed1a0507f0df7c98d3df3fd1f392e6d9ed7975232")
+ version("5.4.0", sha256="69690839cb649dee43353b739d3e6b2312f3d965dfe66705c0ea910e57c6a8cb")
+ version("5.3.3", sha256="d2248b5e2e0b20e08dd1ee5408e38deb02ecd28096dc7c7f2539351df6cb6ad5")
+ version("5.3.0", sha256="4569f860d240d50e94e77d498050f5cafe5ad11daddaead3e7e9eaa1957878a7")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
- depends_on("cmake@3.8:", type="build", when="@4.1.0:")
- depends_on("cmake@3.5:", type="build")
+ depends_on("cmake@3.8:", type="build")
depends_on("fmt@7:", type="build", when="@4.5.0:")
depends_on("fmt@7:8.0.1", type="test", when="@5.6:")
depends_on("googletest@1.10.0:", type="test")
depends_on("netlib-lapack@3.7.1:", type="test")
- patch("link-clients-blas.patch", when="@4.3.0:4.3.2")
- # Backport https://github.com/ROCmSoftwarePlatform/rocSOLVER/commit/2bbfb8976f6e4d667499c77e41a6433850063e88
- patch("fmt-8.1-compatibility.patch", when="@4.5.0:5.1.3")
# Maximize compatibility with other libraries that are using fmt.
patch("fmt-9-compatibility.patch", when="@5.2.0:5.5")
- depends_on("hip@4.1.0:", when="@4.1.0:")
+ depends_on("hip")
depends_on("rocm-cmake@master", type="build", when="@master:")
depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:")
depends_on("rocm-cmake@4.3.0:", type="build", when="@4.3.0:")
depends_on("rocm-cmake@3.5.0:", type="build")
+ depends_on("rocsparse@5.2:", when="@5.6:")
for ver in ["master", "develop"]:
- depends_on("rocblas@" + ver, when="@" + ver)
+ depends_on(f"rocblas@{ver}", when=f"@{ver}")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -180,56 +100,46 @@ class Rocsolver(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocblas@" + ver, when="@" + ver)
- for ver in ["5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocsparse@5.2:", when="@5.6:")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocblas@{ver}", when=f"@{ver}")
for tgt in itertools.chain(["auto"], amdgpu_targets):
- depends_on("rocblas amdgpu_target={0}".format(tgt), when="amdgpu_target={0}".format(tgt))
+ depends_on(f"rocblas amdgpu_target={tgt}", when=f"amdgpu_target={tgt}")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
args = [
self.define("BUILD_CLIENTS_SAMPLES", "OFF"),
self.define("BUILD_CLIENTS_TESTS", self.run_tests),
self.define("BUILD_CLIENTS_BENCHMARKS", "OFF"),
+ self.define_from_variant("OPTIMAL", "optimal"),
+ self.define("ROCSOLVER_EMBED_FMT", "ON"),
]
- if self.spec.satisfies("@4.1.0"):
- incl = self.spec["rocblas"].prefix
- args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}/rocblas/include".format(incl)))
-
- if self.spec.satisfies("@3.7.0:"):
- args.append(self.define_from_variant("OPTIMAL", "optimal"))
tgt = self.spec.variants["amdgpu_target"]
if "auto" not in tgt:
- if "@:3.8.0" in self.spec:
- args.append(
- self.define(
- "CMAKE_CXX_FLAGS", "--amdgpu-target={0}".format(",".join(tgt.value))
- )
- )
- else:
- args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
+ args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON"))
- if self.spec.satisfies("@4.5.0:"):
- args.append(self.define("ROCSOLVER_EMBED_FMT", "ON"))
-
if self.spec.satisfies("@5.2.0:"):
args.append(self.define("BUILD_FILE_REORG_BACKWARD_COMPATIBILITY", True))
if self.spec.satisfies("@5.3.0:"):
@@ -239,6 +149,13 @@ class Rocsolver(CMakePackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
@run_after("build")
@on_package_attributes(run_tests=True)
diff --git a/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-4.5.patch b/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-4.5.patch
deleted file mode 100644
index ab84b91c61..0000000000
--- a/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-4.5.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From f9446b8f4c3cb3a3c6d38734f9980712a82b9db9 Mon Sep 17 00:00:00 2001
-From: Cory Bloor <Cordell.Bloor@amd.com>
-Date: Fri, 8 Jul 2022 20:53:32 -0600
-Subject: [PATCH] Improve guards for arch-specific instructions (#368)
-
-When choosing between a specialized implementation that uses
-architecture-specific functionality and a generic fallback, it is
-usually preferable to make the fallback the default. This will give the
-software the best possible chance of functioning without modification
-on future hardware.
-
-Of course, the library will still need code updates to function
-optimally on hardware released after the software was written.
-
-rocSPARSE can also be compiled with CXXFLAGS=-DROCSPARSE_USE_MOVE_DPP=0
-to force the use of the fallback implementation. Or with the value 1 to
-force the use of the specialized __hip_move_dpp implementation.
-
-This change fixes the compilation error:
-
- Illegal instruction detected: Invalid dpp_ctrl value: broadcasts are not supported on GFX10+
-
-when building for unsupported Navi 1x and Navi 2x GPUs as was
-reported in https://github.com/ROCmSoftwarePlatform/rocSPARSE/issues/250
----
- library/src/include/common.h | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/library/src/include/common.h b/library/src/include/common.h
-index 6a4654af..975c5f7d 100644
---- a/library/src/include/common.h
-+++ b/library/src/include/common.h
-@@ -34,6 +34,18 @@
-
- // clang-format off
-
-+#ifndef ROCSPARSE_USE_MOVE_DPP
-+#if defined(__gfx803__) || \
-+ defined(__gfx900__) || \
-+ defined(__gfx906__) || \
-+ defined(__gfx908__) || \
-+ defined(__gfx90a__)
-+#define ROCSPARSE_USE_MOVE_DPP 1
-+#else
-+#define ROCSPARSE_USE_MOVE_DPP 0
-+#endif
-+#endif
-+
- // BSR indexing macros
- #define BSR_IND(j, bi, bj, dir) ((dir == rocsparse_direction_row) ? BSR_IND_R(j, bi, bj) : BSR_IND_C(j, bi, bj))
- #define BSR_IND_R(j, bi, bj) (block_dim * block_dim * (j) + (bi) * block_dim + (bj))
-@@ -233,7 +245,7 @@ __device__ __forceinline__ void rocsparse_blockreduce_min(int i, T* data)
- if(BLOCKSIZE > 1) { if(i < 1 && i + 1 < BLOCKSIZE) { data[i] = min(data[i], data[i + 1]); } __syncthreads(); }
- }
-
--#ifndef __gfx1030__
-+#if ROCSPARSE_USE_MOVE_DPP
- // DPP-based wavefront reduction maximum
- template <unsigned int WFSIZE>
- __device__ __forceinline__ void rocsparse_wfreduce_max(int* maximum)
-@@ -499,7 +511,7 @@ __device__ __forceinline__ double rocsparse_wfreduce_sum(double sum)
- sum = temp_sum.val;
- return sum;
- }
--#else
-+#else /* ROCSPARSE_USE_MOVE_DPP */
- template <unsigned int WFSIZE>
- __device__ __forceinline__ void rocsparse_wfreduce_max(int* maximum)
- {
-@@ -566,7 +578,7 @@ __device__ __forceinline__ double rocsparse_wfreduce_sum(double sum)
-
- return sum;
- }
--#endif
-+#endif /* ROCSPARSE_USE_MOVE_DPP */
-
- // DPP-based complex float wavefront reduction sum
- template <unsigned int WFSIZE>
diff --git a/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-5.2.patch b/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-5.2.patch
deleted file mode 100644
index 52bbe8336f..0000000000
--- a/var/spack/repos/builtin/packages/rocsparse/0003-fix-navi-1x-rocm-5.2.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From f9446b8f4c3cb3a3c6d38734f9980712a82b9db9 Mon Sep 17 00:00:00 2001
-From: Cory Bloor <Cordell.Bloor@amd.com>
-Date: Fri, 8 Jul 2022 20:53:32 -0600
-Subject: [PATCH] Improve guards for arch-specific instructions (#368)
-
-When choosing between a specialized implementation that uses
-architecture-specific functionality and a generic fallback, it is
-usually preferable to make the fallback the default. This will give the
-software the best possible chance of functioning without modification
-on future hardware.
-
-Of course, the library will still need code updates to function
-optimally on hardware released after the software was written.
-
-rocSPARSE can also be compiled with CXXFLAGS=-DROCSPARSE_USE_MOVE_DPP=0
-to force the use of the fallback implementation. Or with the value 1 to
-force the use of the specialized __hip_move_dpp implementation.
-
-This change fixes the compilation error:
-
- Illegal instruction detected: Invalid dpp_ctrl value: broadcasts are not supported on GFX10+
-
-when building for unsupported Navi 1x and Navi 2x GPUs as was
-reported in https://github.com/ROCmSoftwarePlatform/rocSPARSE/issues/250
----
- library/src/include/common.h | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/library/src/include/common.h b/library/src/include/common.h
-index 6a4654af..975c5f7d 100644
---- a/library/src/include/common.h
-+++ b/library/src/include/common.h
-@@ -34,6 +34,18 @@
-
- // clang-format off
-
-+#ifndef ROCSPARSE_USE_MOVE_DPP
-+#if defined(__gfx803__) || \
-+ defined(__gfx900__) || \
-+ defined(__gfx906__) || \
-+ defined(__gfx908__) || \
-+ defined(__gfx90a__)
-+#define ROCSPARSE_USE_MOVE_DPP 1
-+#else
-+#define ROCSPARSE_USE_MOVE_DPP 0
-+#endif
-+#endif
-+
- // BSR indexing macros
- #define BSR_IND(j, bi, bj, dir) ((dir == rocsparse_direction_row) ? BSR_IND_R(j, bi, bj) : BSR_IND_C(j, bi, bj))
- #define BSR_IND_R(j, bi, bj) (block_dim * block_dim * (j) + (bi) * block_dim + (bj))
-@@ -233,7 +245,7 @@ __device__ __forceinline__ void rocsparse_blockreduce_min(int i, T* data)
- if(BLOCKSIZE > 1) { if(i < 1 && i + 1 < BLOCKSIZE) { data[i] = min(data[i], data[i + 1]); } __syncthreads(); }
- }
-
--#if (!defined(__gfx1030__)) && (!defined(__gfx1011__))
-+#if ROCSPARSE_USE_MOVE_DPP
- // DPP-based wavefront reduction maximum
- template <unsigned int WFSIZE>
- __device__ __forceinline__ void rocsparse_wfreduce_max(int* maximum)
-@@ -499,7 +511,7 @@ __device__ __forceinline__ double rocsparse_wfreduce_sum(double sum)
- sum = temp_sum.val;
- return sum;
- }
--#else
-+#else /* ROCSPARSE_USE_MOVE_DPP */
- template <unsigned int WFSIZE>
- __device__ __forceinline__ void rocsparse_wfreduce_max(int* maximum)
- {
-@@ -566,7 +578,7 @@ __device__ __forceinline__ double rocsparse_wfreduce_sum(double sum)
-
- return sum;
- }
--#endif
-+#endif /* ROCSPARSE_USE_MOVE_DPP */
-
- // DPP-based complex float wavefront reduction sum
- template <unsigned int WFSIZE>
diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py
index 98c02e8807..aa52f5ed93 100644
--- a/var/spack/repos/builtin/packages/rocsparse/package.py
+++ b/var/spack/repos/builtin/packages/rocsparse/package.py
@@ -15,9 +15,9 @@ class Rocsparse(CMakePackage):
and toolchains. rocSPARSE is created using the HIP programming
language and optimized for AMD's latest discrete GPUs."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocSPARSE"
- git = "https://github.com/ROCmSoftwarePlatform/rocSPARSE.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocSPARSE/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocSPARSE"
+ git = "https://github.com/ROCm/rocSPARSE.git"
+ url = "https://github.com/ROCm/rocSPARSE/archive/rocm-6.2.4.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
@@ -32,117 +32,40 @@ class Rocsparse(CMakePackage):
sticky=True,
)
variant("test", default=False, description="Build rocsparse-test client")
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- license("MIT")
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+ license("MIT")
+ version("6.2.4", sha256="1f86c2d439e777cd17724269da66997d351b3a1b83f44143361e9c77d80e2370")
+ version("6.2.1", sha256="4691d689db0a03fc950dbc9d88471752f6d17f5382a4bd2f7e23dfb43fc7074c")
+ version("6.2.0", sha256="d07357d180423cedbabc849983a2d4d79b0e9f4c9b5e07d4993043e646fe6df9")
+ version("6.1.2", sha256="e8989c28085275e7c044b19fd2bc86d8493ce6a1b8545126f787722c535fe6eb")
+ version("6.1.1", sha256="9ac2bf84962cfdf24e4fa68e6f1d91ffdad5d5a5287ecdaddf331e6073ba57b3")
+ version("6.1.0", sha256="d69d9b0079159abb2d7514f8f45a41bb2cbcaf8b52e600e794aca3facf274b5e")
+ version("6.0.2", sha256="00292eb7efe5719a65960bdbe391ba8e0ce610487eea11397aad6a14b11e12cd")
+ version("6.0.0", sha256="bdc618677ec78830c6af315d61194d6ab8532345b8daeeb115aca96f274d4ca4")
version("5.7.1", sha256="4c09b182b371124675d4057246021b5ed45e2833fdbf265b37a9b06b668baf0a")
version("5.7.0", sha256="a42f0eb531b015b719e2bdcdff0cfb214e9894f73107966260f26931f982ecbc")
version("5.6.1", sha256="6a50a64354507f1374e1a86aa7f5c07d1aaa96ac193ac292c279153087bb5d54")
version("5.6.0", sha256="5797db3deb4a532e691447e3e8c923b93bd9fe4c468f3a88f00cecd80bebcae4")
version("5.5.1", sha256="1dd2d18898dfebdf898e8fe7d1c1198e8f8451fd70ff12a1990ec1419cf359e1")
version("5.5.0", sha256="cbee79b637691bc710c1c83fbaa91db7498d38d4df873be23e28ed5617acde72")
- version("5.4.3", sha256="9fb633f235eb0567cc54fae6bdc779f16bf0bb4e6f5bdddb40312c6d11ca8478")
- version("5.4.0", sha256="c8f0e920a8ec15b9ae40564c68191363356cc4d793c16247bb6e11ef5293ed11")
- version("5.3.3", sha256="4204035e952e20ada4526a94989e8e5c76c04574176fe63a021522862461c800")
- version("5.3.0", sha256="521ca0e7b52f26edbff8507eb1479dc26019f456756d884d7b8b192c3ea518e8")
- version("5.2.3", sha256="6da3f3303a8ada94c4dbff4b42ee33a2e2883a908ee21c41cb2aa7180382026a")
- version("5.2.1", sha256="01f3535442740221edad2cde0a20b2499c807f6733d5016b33c47f34a5a55c49")
- version("5.2.0", sha256="7ed929af16d2502135024a6463997d9a95f03899b8a33aa95db7029575c89572")
- version("5.1.3", sha256="ef9641045b36c9aacc87e4fe7717b41b1e29d97e21432678dce7aca633a8edc2")
- version("5.1.0", sha256="a2f0f8cb02b95993480bd7264fc65e8b11464a90b86f2dcd0dd82a2e6d4bd704")
- version(
- "5.0.2",
- sha256="c9d9e1b7859e1c5aa5050f5dfdf86245cbd7c1296c0ce60d9ca5f3e22a9b748b",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="6d352bf27dbed08e5115a58815aa76c59eb2008ec9dcc921aadf2efe20115d2a",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="e37af2cd097e239a55a278df534183b5591ef4d985fe1a268a229bd11ada6599",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="b120e9e17e7e141caee4c8c4288c9d1902bad0cec2ea76458d3ba11343376938",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="fa5ea64f71e1cfbebe41618cc183f501b387824a6dc58486ab1214d7af5cbef2",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="1a8109bdc8863b3acfe991449360c9361cae7cabdbe753c553bc57872cd0ad5e",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="8a86ed49d278e234c82e406a1430dc28f50d416f8f1065cf5bdf25cc5721129c",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="7514968ed2342dc274acce8b269c128a6aa96cce769a37fd3880b5269c2ed17f",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="2b41bc6623d204ad7f351a902810f34cd32b762d1bf59081dbb00f83e689a794",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="8325828c5d7818dfb45e03b5f1572a573cc21964d596aaaa33b7469817b03abd",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="7b8f952d0c7f8ac2f3bb60879ab420fabbfafb0885a3d8464d5b4c191e97dec6",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="a5d085fffe05a7ac7f5658075d9782b9b02d0c5c3e2c1807dad266c3a61141fd",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="db561ae5e8ee117f7c539a9ef6ee49c13b82ba9f702b22c76e741cca245386a9",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="9ca6bae7da78abbb47143c3d77ff4a8cd7d63979875fc7ebc46b400769fd9cb5",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="9fb633f235eb0567cc54fae6bdc779f16bf0bb4e6f5bdddb40312c6d11ca8478")
+ version("5.4.0", sha256="c8f0e920a8ec15b9ae40564c68191363356cc4d793c16247bb6e11ef5293ed11")
+ version("5.3.3", sha256="4204035e952e20ada4526a94989e8e5c76c04574176fe63a021522862461c800")
+ version("5.3.0", sha256="521ca0e7b52f26edbff8507eb1479dc26019f456756d884d7b8b192c3ea518e8")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
depends_on("cmake@3.5:", type="build")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -153,18 +76,23 @@ class Rocsparse(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocprim@" + ver, when="@" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocprim@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
# Add option so Spack can manage downloaded test matricies as resources.
- patch("0001-set-mtx-directory.patch", when="@4.5.0:5.3 +test")
+ patch("0001-set-mtx-directory.patch", when="@:5.3 +test")
# Enable use of Spack-provided Python.
- patch("0002-fix-gentest-shebang.patch", when="@4.5.0:5.3 +test")
- # Fix build for most Radeon 5000 and Radeon 6000 series GPUs.
- patch("0003-fix-navi-1x-rocm-4.5.patch", when="@4.5.0:5.1")
- patch("0003-fix-navi-1x-rocm-5.2.patch", when="@5.2")
+ patch("0002-fix-gentest-shebang.patch", when="@:5.3 +test")
depends_on("googletest@1.11.0:", when="@5.1.0: +test")
depends_on("googletest@1.10.0:", when="+test")
@@ -327,17 +255,22 @@ class Rocsparse(CMakePackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def cmake_args(self):
args = [
diff --git a/var/spack/repos/builtin/packages/rocthrust/package.py b/var/spack/repos/builtin/packages/rocthrust/package.py
index c5e8dd1acc..37704c7dac 100644
--- a/var/spack/repos/builtin/packages/rocthrust/package.py
+++ b/var/spack/repos/builtin/packages/rocthrust/package.py
@@ -12,97 +12,33 @@ class Rocthrust(CMakePackage):
HIP/ROCm platform, which uses the rocPRIM library. The HIP ported
library works on HIP/ROCm platforms"""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust"
- git = "https://github.com/ROCmSoftwarePlatform/rocThrust.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocThrust"
+ git = "https://github.com/ROCm/rocThrust.git"
+ url = "https://github.com/ROCm/rocThrust/archive/rocm-6.1.0.tar.gz"
tags = ["rocm"]
maintainers("cgmb", "srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="ec212f3f5ff1ff3c71b85dae50d19c1faa344d400b5d1fa376471c2390361dc8")
+ version("6.2.1", sha256="de6121e354e4d2d5f90243acc1071e9afb2a335e17570d293b590b85f3f58fa2")
+ version("6.2.0", sha256="8037aadf7ec3d548aa17944e0a47465d608dc6eb7347173a6d76cbf5342e4ab6")
+ version("6.1.2", sha256="149ca325fb8a8527781ec2853282a73bf66f60366652c19e8583afc3f1a9c4b6")
+ version("6.1.1", sha256="03420d8af687107775a1fbd3db5e8c9872c7c738747de77a5e8c0b3466a3321a")
+ version("6.1.0", sha256="8c36fb7b34758579601365a450700899133da5802e5c8370654051b190bd6e1c")
+ version("6.0.2", sha256="8de9414f6b921ff549ba102239fcf65f5cc70ece5eec9753de5ec91870e6934d")
+ version("6.0.0", sha256="a3fdafe4b6124118e07f23a3b0270d91740da324f61aaa3e8c034da08d9312b1")
version("5.7.1", sha256="b7cb9ea6c42b2c6b610c34d2c438443e0f99245bd391aff18591949bf1cd53ee")
version("5.7.0", sha256="64e10f071acfc5b8e3c168b9178289cf1afc7b168bf1962793fc256b25074d3a")
version("5.6.1", sha256="63df61d5ab46d4cfda6066d748274bacecc77151692e372e6f7df5e91852bdc2")
version("5.6.0", sha256="e52a27bcb4add38a5f0f3a5c7e409c230bf4ba9afae19bd2e06c2be00d39db59")
version("5.5.1", sha256="66f126e5ea46ca761533411f81e83402773f95d3184cb7645ca73df227413023")
version("5.5.0", sha256="c031f71cd4b6eaf98664fd2ad50fc18f7ccbfa67be415dca425169d2d1c81e9e")
- version("5.4.3", sha256="d133e14ea6d27d358d1bd4d31b79fb1562d1aea7c400e5a2d28d0f159cb6c8a8")
- version("5.4.0", sha256="a4799fb1086da3f70c9b95effb1f5f9033c861685e960a8759278463cc55a971")
- version("5.3.3", sha256="0c2fc8d437efaf5c4c859d97adb049d4025025d0be0e0908f59a8112508234e5")
- version("5.3.0", sha256="0e11b12f208d2751e3e507e3a32403c9bd45da4e191671d765d33abd727d9b96")
- version("5.2.3", sha256="0f5ef39c5faab31eb34b48391d58096463969c133ca7ed09ab4e43caa5461b29")
- version("5.2.1", sha256="5df35ff0970b83d68b69a07ae9ebb62955faac7401c91daa7929664fdd09d69b")
- version("5.2.0", sha256="afa126218485586682c78e97df8025ae4efd32f3751c340e84c436e08868c326")
- version("5.1.3", sha256="8d92de1e69815d92a423b7657f2f37c90f1d427f5bc92915c202d4c266254dad")
- version("5.1.0", sha256="fee779ae3d55b97327d87beca784fc090fa02bc95238d9c3bf3021e266e73979")
- version(
- "5.0.2",
- sha256="60f0cf1848cc7cd8663f15307bd695eee3c5b20d3ad3baa4bc696189ffdcfd53",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="10b7b1be919881904d64f8084c2afe22aa00c560f8493a75dbf5df8386443ab4",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="9171a05dd7438aebd4f6a939b1b33b7e87be1a0bd52d90a171b74539885cf591",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="86cf897b01a6f5df668d978ce42d44a6ae9df9f8adc92d0a1a49a7c3bbead259",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="86fcd3bc275efe9a485aed48afdc6d3351804c076caee43e3fb8bd69752865e9",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="a50eb6500687b4ea9e0b3affb1daff8bbc56199d39fbed3ee61d2d5bfc1a0271",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="da2b6c831c26c26058218b0c5b7b2e43fd7f0dac3b2e3a8e39a839145592c727",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="e3d06c0387a2a6880776c7423b1acf0808fb8833bc822be75793da8c2f521efd",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="120c87316f44ce8e8975e57c9b9bf1246b1ffc00879d31d744289ba9438a976c",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="31bea6cd19a0ffa15e4ab50ecde2402ea5aaa182149cfab98242357e41f1805b",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="65f5e74d72c5aaee90459468d693b212af7d56e31098ee8237b18d1b4d620eb0",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="39350aeb8bfbcd09e387717b2a05c7e3a19e0fa85ff4284b967bb8fae12f9013",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="4cb923dde5eec150a566cb10d23ee5c7ce3aa892c4dea94886a89d95b90f3bdd",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="0d1bac1129d17bb1259fd06f5c9cb4c1620d1790b5c295b866fb3442d18923cb",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="d133e14ea6d27d358d1bd4d31b79fb1562d1aea7c400e5a2d28d0f159cb6c8a8")
+ version("5.4.0", sha256="a4799fb1086da3f70c9b95effb1f5f9033c861685e960a8759278463cc55a971")
+ version("5.3.3", sha256="0c2fc8d437efaf5c4c859d97adb049d4025025d0be0e0908f59a8112508234e5")
+ version("5.3.0", sha256="0e11b12f208d2751e3e507e3a32403c9bd45da4e191671d765d33abd727d9b96")
+
+ depends_on("cxx", type="build") # generated
amdgpu_targets = ROCmPackage.amdgpu_targets
@@ -114,31 +50,11 @@ class Rocthrust(CMakePackage):
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
- depends_on("cmake@3.10.2:", type="build", when="@4.2.0:")
- depends_on("cmake@3.5.1:", type="build")
+ depends_on("cmake@3.10.2:", type="build")
depends_on("googletest@1.10.0:", type="test")
for ver in [
- "3.5.0",
- "3.7.0",
- "3.8.0",
- "3.9.0",
- "3.10.0",
- "4.0.0",
- "4.1.0",
- "4.2.0",
- "4.3.0",
- "4.3.1",
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -149,17 +65,29 @@ class Rocthrust(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hip@" + ver, when="@" + ver)
- depends_on("rocprim@" + ver, when="@" + ver)
- depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+ depends_on(f"rocprim@{ver}", when=f"@{ver}")
+ depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}")
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
def cmake_args(self):
args = [
- self.define("CMAKE_MODULE_PATH", "{0}/cmake".format(self.spec["hip"].prefix)),
+ self.define("CMAKE_MODULE_PATH", "{0}/lib/cmake/hip".format(self.spec["hip"].prefix)),
self.define("BUILD_TEST", self.run_tests),
]
diff --git a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py
index a944ff3970..5363bad9e3 100644
--- a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py
+++ b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py
@@ -11,99 +11,35 @@ class RoctracerDevApi(Package):
package, mainly to avoid circular dependencies in the ROCm ecosystem.
For the ROC-tracer library, please check out roctracer-dev."""
- homepage = "https://github.com/ROCm-Developer-Tools/roctracer"
- git = "https://github.com/ROCm-Developer-Tools/roctracer.git"
- url = "https://github.com/ROCm-Developer-Tools/roctracer/archive/refs/tags/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/roctracer"
+ git = "https://github.com/ROCm/roctracer.git"
+ url = "https://github.com/ROCm/roctracer/archive/refs/tags/rocm-6.2.4.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="b94c7db8ac57a4a1d7f8115020c36551220c20f33289fd06830495b4914a7d7b")
+ version("6.2.1", sha256="9e69c90b9dc650e0d8642ec675082c9566e576285a725c3a5d07a37cebb18810")
+ version("6.2.0", sha256="2fc39f47161f41cc041cd5ee4b1bb0e9832508650e832434056423fec3739735")
+ version("6.1.2", sha256="073e67e728d5eda16d7944f3abd96348b3f278e9f36cab3ac22773ebaad0d2d6")
+ version("6.1.1", sha256="9cb77fd700a0d615056f0db1e9500b73bd0352214f33bdac520e25b9125a926a")
+ version("6.1.0", sha256="3f8e296c4d04123a7177d815ca166e978b085ad7c816ac298e6bb47a299fa187")
+ version("6.0.2", sha256="1e0105b32fdd9c010aab304bb2ca1a5a38ba323cea610afe1135657edda8f26e")
+ version("6.0.0", sha256="941166a0363c5689bfec118d54e986c43fb1ec8cbf18d95721d9a824bd52c0f8")
version("5.7.1", sha256="ec0453adac7e62b142eb0df1e1e2506863aac4c3f2ce9d117c3184c08c0c6b48")
version("5.7.0", sha256="40bb757920488466e29df90bb80a975cc340bf7f8771fb1d754dfbb6b688d78e")
version("5.6.1", sha256="007c498be25b067ad9a7631a2b0892f9129150ee9714e471a921225875d45e69")
version("5.6.0", sha256="cbcfe4fa2e8b627006b320a93992fb3078696d8ef2ef049b4b880b6b7d57e13e")
version("5.5.1", sha256="3afc31ebfdb14b0365185ca6b9326a83b1503a94a51d910f5ce7ced192d8c133")
version("5.5.0", sha256="fe9ad95628fa96639db6fc33f78d334c814c7161b4a754598f5a4a7852625777")
- version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926")
- version("5.4.0", sha256="04c1e955267a3e8440833a177bb976f57697aba0b90c325d07fc0c6bd4065aea")
- version("5.3.3", sha256="f2cb1e6bb69ea1a628c04f984741f781ae1d8498dc58e15795bb03015f924d13")
- version("5.3.0", sha256="36f1da60863a113bb9fe2957949c661f00a702e249bb0523cda1fb755c053808")
- version("5.2.3", sha256="93f4bb7529db732060bc12055aa10dc346a459a1086cddd5d86c7b509301be4f")
- version("5.2.1", sha256="e200b5342bdf840960ced6919d4bf42c8f30f8013513f25a2190ee8767667e59")
- version("5.2.0", sha256="9747356ce61c57d22c2e0a6c90b66a055e435d235ba3459dc3e3f62aabae6a03")
- version("5.1.3", sha256="45f19875c15eb609b993788b47fd9c773b4216074749d7744f3a671be17ef33c")
- version("5.1.0", sha256="58b535f5d6772258190e4adcc23f37c916f775057a91b960e1f2ee1f40ed5aac")
- version(
- "5.0.2",
- sha256="5ee46f079e57dfe491678ffa4cdaf5f3b3d179cb3137948e4bcafca99ded47cc",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="a21f4fb093cee4a806d53cbc0645d615d89db12fbde305e9eceee7e4150acdf2",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="7012d18b79736dbe119161aab86f4976b78553ce0b2f4753a9386752d75d5074",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="83dcd8987e129b14da0fe74e24ce8d027333f8fedc9247a402d3683765983296",
- deprecated=True,
- )
- version(
- "4.3.1",
- sha256="88ada5f256a570792d1326a305663e94cf2c3b0cbd99f7e745326923882dafd2",
- deprecated=True,
- )
- version(
- "4.3.0",
- sha256="c3d9f408df8d4dc0e9c0026217b8c684f68e775da80b215fecb3cd24419ee6d3",
- deprecated=True,
- )
- version(
- "4.2.0",
- sha256="62a9c0cb1ba50b1c39a0636c886ac86e75a1a71cbf5fec05801517ceb0e67a37",
- deprecated=True,
- )
- version(
- "4.1.0",
- sha256="5d93de4e92895b6eb5f9d098f5dbd182d33923bd9b2ab69cf5a1abbf91d70695",
- deprecated=True,
- )
- version(
- "4.0.0",
- sha256="f47859a46173228b597c463eda850b870e810534af5efd5f2a746067ef04edee",
- deprecated=True,
- )
- version(
- "3.10.0",
- sha256="ac4a1d059fc34377e906071fd0e56f5434a7e0e4ded9db8faf9217a115239dec",
- deprecated=True,
- )
- version(
- "3.9.0",
- sha256="0678f9faf45058b16923948c66d77ba2c072283c975d167899caef969169b292",
- deprecated=True,
- )
- version(
- "3.8.0",
- sha256="5154a84ce7568cd5dba756e9508c34ae9fc62f4b0b5731f93c2ad68b21537ed1",
- deprecated=True,
- )
- version(
- "3.7.0",
- sha256="6fa5b771e990f09c242237ab334b9f01039ec7d54ccde993e719c5d6577d1518",
- deprecated=True,
- )
- version(
- "3.5.0",
- sha256="7af5326c9ca695642b4265232ec12864a61fd6b6056aa7c4ecd9e19c817f209e",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926")
+ version("5.4.0", sha256="04c1e955267a3e8440833a177bb976f57697aba0b90c325d07fc0c6bd4065aea")
+ version("5.3.3", sha256="f2cb1e6bb69ea1a628c04f984741f781ae1d8498dc58e15795bb03015f924d13")
+ version("5.3.0", sha256="36f1da60863a113bb9fe2957949c661f00a702e249bb0523cda1fb755c053808")
+
+ depends_on("cxx", type="build") # generated
def install(self, spec, prefix):
source_directory = self.stage.source_path
diff --git a/var/spack/repos/builtin/packages/roctracer-dev/0002-use-clang-18.patch b/var/spack/repos/builtin/packages/roctracer-dev/0002-use-clang-18.patch
new file mode 100644
index 0000000000..26cc1e21ea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/roctracer-dev/0002-use-clang-18.patch
@@ -0,0 +1,26 @@
+
+m 70c457c9d087f83e5587c0d2f65a284a5cbafa1e Mon Sep 17 00:00:00 2001
+From: Afzal Patel <Afzal.Patel@amd.com>
+Date: Wed, 14 Aug 2024 16:58:27 +0000
+Subject: [PATCH] Use clang version 18
+
+---
+ test/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 95563d5..c9a50b9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -34,7 +34,7 @@ if(DEFINED ROCM_PATH)
+ endif()
+ find_package(HIP REQUIRED MODULE)
+
+-find_package(Clang REQUIRED CONFIG
++find_package(Clang 18 REQUIRED CONFIG
+ PATHS "${ROCM_PATH}"
+ PATH_SUFFIXES "llvm/lib/cmake/clang")
+
+--
+2.43.5
+
diff --git a/var/spack/repos/builtin/packages/roctracer-dev/package.py b/var/spack/repos/builtin/packages/roctracer-dev/package.py
index aa15dca00e..90902a8707 100644
--- a/var/spack/repos/builtin/packages/roctracer-dev/package.py
+++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py
@@ -13,66 +13,45 @@ class RoctracerDev(CMakePackage, ROCmPackage):
The goal of the implementation is to provide a generic independent from
specific runtime profiler to trace API and asyncronous activity."""
- homepage = "https://github.com/ROCm-Developer-Tools/roctracer"
- git = "https://github.com/ROCm-Developer-Tools/roctracer.git"
- url = "https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/roctracer"
+ git = "https://github.com/ROCm/roctracer.git"
+ url = "https://github.com/ROCm/roctracer/archive/rocm-6.1.2.tar.gz"
tags = ["rocm"]
maintainers("srekolam", "renjithravindrankannath")
libraries = ["libroctracer64"]
license("MIT")
-
+ version("6.2.4", sha256="b94c7db8ac57a4a1d7f8115020c36551220c20f33289fd06830495b4914a7d7b")
+ version("6.2.1", sha256="9e69c90b9dc650e0d8642ec675082c9566e576285a725c3a5d07a37cebb18810")
+ version("6.2.0", sha256="2fc39f47161f41cc041cd5ee4b1bb0e9832508650e832434056423fec3739735")
+ version("6.1.2", sha256="073e67e728d5eda16d7944f3abd96348b3f278e9f36cab3ac22773ebaad0d2d6")
+ version("6.1.1", sha256="9cb77fd700a0d615056f0db1e9500b73bd0352214f33bdac520e25b9125a926a")
+ version("6.1.0", sha256="3f8e296c4d04123a7177d815ca166e978b085ad7c816ac298e6bb47a299fa187")
+ version("6.0.2", sha256="1e0105b32fdd9c010aab304bb2ca1a5a38ba323cea610afe1135657edda8f26e")
+ version("6.0.0", sha256="941166a0363c5689bfec118d54e986c43fb1ec8cbf18d95721d9a824bd52c0f8")
version("5.7.1", sha256="ec0453adac7e62b142eb0df1e1e2506863aac4c3f2ce9d117c3184c08c0c6b48")
version("5.7.0", sha256="40bb757920488466e29df90bb80a975cc340bf7f8771fb1d754dfbb6b688d78e")
version("5.6.1", sha256="007c498be25b067ad9a7631a2b0892f9129150ee9714e471a921225875d45e69")
version("5.6.0", sha256="cbcfe4fa2e8b627006b320a93992fb3078696d8ef2ef049b4b880b6b7d57e13e")
version("5.5.1", sha256="3afc31ebfdb14b0365185ca6b9326a83b1503a94a51d910f5ce7ced192d8c133")
version("5.5.0", sha256="fe9ad95628fa96639db6fc33f78d334c814c7161b4a754598f5a4a7852625777")
- version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926")
- version("5.4.0", sha256="04c1e955267a3e8440833a177bb976f57697aba0b90c325d07fc0c6bd4065aea")
- version("5.3.3", sha256="f2cb1e6bb69ea1a628c04f984741f781ae1d8498dc58e15795bb03015f924d13")
- version("5.3.0", sha256="36f1da60863a113bb9fe2957949c661f00a702e249bb0523cda1fb755c053808")
- version("5.2.3", sha256="93f4bb7529db732060bc12055aa10dc346a459a1086cddd5d86c7b509301be4f")
- version("5.2.1", sha256="e200b5342bdf840960ced6919d4bf42c8f30f8013513f25a2190ee8767667e59")
- version("5.2.0", sha256="9747356ce61c57d22c2e0a6c90b66a055e435d235ba3459dc3e3f62aabae6a03")
- version("5.1.3", sha256="45f19875c15eb609b993788b47fd9c773b4216074749d7744f3a671be17ef33c")
- version("5.1.0", sha256="58b535f5d6772258190e4adcc23f37c916f775057a91b960e1f2ee1f40ed5aac")
- version(
- "5.0.2",
- sha256="5ee46f079e57dfe491678ffa4cdaf5f3b3d179cb3137948e4bcafca99ded47cc",
- deprecated=True,
- )
- version(
- "5.0.0",
- sha256="a21f4fb093cee4a806d53cbc0645d615d89db12fbde305e9eceee7e4150acdf2",
- deprecated=True,
- )
- version(
- "4.5.2",
- sha256="7012d18b79736dbe119161aab86f4976b78553ce0b2f4753a9386752d75d5074",
- deprecated=True,
- )
- version(
- "4.5.0",
- sha256="83dcd8987e129b14da0fe74e24ce8d027333f8fedc9247a402d3683765983296",
- deprecated=True,
- )
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926")
+ version("5.4.0", sha256="04c1e955267a3e8440833a177bb976f57697aba0b90c325d07fc0c6bd4065aea")
+ version("5.3.3", sha256="f2cb1e6bb69ea1a628c04f984741f781ae1d8498dc58e15795bb03015f924d13")
+ version("5.3.0", sha256="36f1da60863a113bb9fe2957949c661f00a702e249bb0523cda1fb755c053808")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
depends_on("cmake@3:", type="build")
depends_on("python@3:", type="build")
depends_on("py-cppheaderparser", type="build")
for ver in [
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -83,66 +62,89 @@ class RoctracerDev(CMakePackage, ROCmPackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("hsakmt-roct@" + ver, when="@" + ver)
- depends_on("hsa-rocr-dev@" + ver, when="@" + ver)
- depends_on("rocminfo@" + ver, when="@" + ver)
- depends_on("hip@" + ver, when="@" + ver)
+ depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
+ depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
+ depends_on(f"rocminfo@{ver}", when=f"@{ver}")
+ depends_on(f"hip@{ver}", when=f"@{ver}")
+
+ for ver in ["5.3.0", "5.3.3", "5.4.0", "5.4.3"]:
+ depends_on(f"rocprofiler-dev@{ver}", when=f"@{ver}")
+
for ver in [
- "4.5.0",
- "4.5.2",
- "5.0.0",
- "5.0.2",
- "5.1.0",
- "5.1.3",
- "5.2.0",
- "5.2.1",
- "5.2.3",
- "5.3.0",
- "5.3.3",
- "5.4.0",
- "5.4.3",
+ "5.5.0",
+ "5.5.1",
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
- depends_on("rocprofiler-dev@" + ver, when="@" + ver)
-
- for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
- depends_on("rocm-core@" + ver, when="@" + ver)
+ depends_on(f"rocm-core@{ver}", when=f"@{ver}")
patch("0001-include-rocprofiler-dev-path.patch", when="@5.3:5.4")
+ patch("0002-use-clang-18.patch", when="@6.2")
@classmethod
def determine_version(cls, lib):
match = re.search(r"rocm-(\d+)\.(\d+)\.(\d)/lib/lib\S*\.so\.\d+\.\d+\.\d+", lib)
if match:
- ver = "{0}.{1}.{2}".format(
+ return "{0}.{1}.{2}".format(
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
- else:
- ver = None
- return ver
+ return None
def patch(self):
filter_file(
- "${CMAKE_PREFIX_PATH}/hsa",
+ r"${CMAKE_PREFIX_PATH}/hsa",
"${HSA_RUNTIME_INC_PATH}",
"src/CMakeLists.txt",
string=True,
)
- kwargs = {"ignore_absent": False, "backup": False, "string": False}
with working_dir("script"):
- match = "^#!/usr/bin/python[23]"
- python = self.spec["python"].command.path
- substitute = "#!{python}".format(python=python)
- files = ["check_trace.py", "gen_ostream_ops.py", "hsaap.py"]
- filter_file(match, substitute, *files, **kwargs)
+ filter_file(
+ "^#!/usr/bin/python[23]",
+ f"#!{self.spec['python'].command.path}",
+ "check_trace.py",
+ "gen_ostream_ops.py",
+ "hsaap.py",
+ )
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ self.asan_on(env)
def cmake_args(self):
args = [
- "-DHIP_VDI=1",
- "-DCMAKE_MODULE_PATH={0}/cmake_modules".format(self.stage.source_path),
- "-DHSA_RUNTIME_HSA_INC_PATH={0}/include".format(self.spec["hsa-rocr-dev"].prefix),
- "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON",
+ self.define("HIP_VDI", "1"),
+ self.define("CMAKE_MODULE_PATH", f"{self.stage.source_path}/cmake_modules"),
+ self.define("HSA_RUNTIME_HSA_INC_PATH", self.spec["hsa-rocr-dev"].prefix.include),
+ self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
]
if self.spec.satisfies("@:5.4.0"):
- "-DROCPROFILER_PATH={0}".format(self.spec["rocprofiler-dev"].prefix)
+ args.append(self.define("ROCPROFILER_PATH", self.spec["rocprofiler-dev"].prefix))
+ if self.spec.satisfies("@6.0:"):
+ args.append("-DCMAKE_INSTALL_LIBDIR=lib")
+
return args
+
+ @run_after("install")
+ def post_install(self):
+ if self.spec.satisfies("@6.0:"):
+ install_tree(self.prefix.include.roctracer, self.prefix.roctracer.include)
+ install_tree(self.prefix.lib, self.prefix.roctracer.lib)
diff --git a/var/spack/repos/builtin/packages/rocwmma/package.py b/var/spack/repos/builtin/packages/rocwmma/package.py
index 8d5a9fdbea..3d528cf70b 100644
--- a/var/spack/repos/builtin/packages/rocwmma/package.py
+++ b/var/spack/repos/builtin/packages/rocwmma/package.py
@@ -19,27 +19,35 @@ class Rocwmma(CMakePackage):
generation of kernel assembly, and does not incur additional overhead costs of
linking to external runtime libraries or having to launch separate kernels."""
- homepage = "https://github.com/ROCmSoftwarePlatform/rocWMMA"
- git = "https://github.com/ROCmSoftwarePlatform/rocWMMA.git"
- url = "https://github.com/ROCmSoftwarePlatform/rocWMMA/archive/refs/tags/rocm-5.5.0.tar.gz"
+ homepage = "https://github.com/ROCm/rocWMMA"
+ git = "https://github.com/ROCm/rocWMMA.git"
+ url = "https://github.com/ROCm/rocWMMA/archive/refs/tags/rocm-6.1.2.tar.gz"
tags = ["rocm"]
license("MIT")
maintainers("srekolam", "renjithravindrankannath")
+ version("6.2.4", sha256="eaa2f313a1bfe455d9641df44d7b890ea7334b58a643c75f0b7f108cae5f777c")
+ version("6.2.1", sha256="f05fcb3612827502d2a15b30f0e46228625027145013652b8f591ad403fa9ddc")
+ version("6.2.0", sha256="08c5d19f0417ee9ba0e37055152b22f64ed0eab1d9ab9a7d13d46bf8d3b255dc")
+ version("6.1.2", sha256="7f6171bea5c8b7cdaf5c64dbfb76eecf606f2d34e8409153a74b56027c5e92a7")
+ version("6.1.1", sha256="6e0c15c78feb8fb475ed028ed9b0337feeb45bfce1e206fe5f236a55e33f6135")
+ version("6.1.0", sha256="ca29f33cfe6894909159ad68d786eacd469febab33883886a202f13ae061f691")
+ version("6.0.2", sha256="61c6cc095b4ac555f4be4b55f6a7e3194c8c54bffc57bfeb0c02191119ac5dc8")
+ version("6.0.0", sha256="f9e97e7c6c552d43ef8c7348e4402bead2cd978d0f81a9657d6a0f6c83a6139b")
version("5.7.1", sha256="a998a1385e6ad7062707ddb9ff82bef727ca48c39a10b4d861667024e3ffd2a3")
version("5.7.0", sha256="a8f1b090e9e504a149a924c80cfb6aca817359b43833a6512ba32e178245526f")
version("5.6.1", sha256="41a5159ee1ad5fc411fe6220f37bd754e26d3883c24c0f2378f50ef628bc1b8f")
version("5.6.0", sha256="78b6ab10fce71d10a9d762b2eaab3390eb13b05c764f47a3b0a303ec3d37acf8")
version("5.5.1", sha256="ada30d5e52df5da0d3f4e212a25efb492dbedc129628f4db4ef4ed77667da228")
version("5.5.0", sha256="b9e1938cba111eeea295414c42de34d54a878f0d41a26e433809d60c12d31dbf")
- version("5.4.3", sha256="0968366c83b78a9d058d483be536aba03e79b300ccb6890d3da43298be54c288")
- version("5.4.0", sha256="a18724c3b45d171e54ef9f85c269124ce8d29b6a2f9dbd76a4806bda2933f7a7")
- version("5.3.3", sha256="cd9bc09f98fb78e53ba4bde1dcfe1817c34c2822234a82b1128d36d92b97ae79")
- version("5.3.0", sha256="04bac641ba18059118d3faa5f21fe3bf3e285055d40930489ebf27ffc8e5d16e")
- version("5.2.3", sha256="7f42e9742eff258f7c09c518c5ea9c71a224574e1c075d7e1c4e464192fc4920")
- version("5.2.1", sha256="73adb6a0ae99051493459a9902ad718b0452d6d819583a58d713ce52fa813f21")
- version("5.2.0", sha256="257ccd1cf2bc1d8064e72e78d276ef7446b2cb7e2dec05ff8331bb44eff2b7cb")
+ with default_args(deprecated=True):
+ version("5.4.3", sha256="0968366c83b78a9d058d483be536aba03e79b300ccb6890d3da43298be54c288")
+ version("5.4.0", sha256="a18724c3b45d171e54ef9f85c269124ce8d29b6a2f9dbd76a4806bda2933f7a7")
+ version("5.3.3", sha256="cd9bc09f98fb78e53ba4bde1dcfe1817c34c2822234a82b1128d36d92b97ae79")
+ version("5.3.0", sha256="04bac641ba18059118d3faa5f21fe3bf3e285055d40930489ebf27ffc8e5d16e")
+
+ depends_on("cxx", type="build") # generated
# gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+
# are only targets currently supported for @5.2.0
@@ -65,9 +73,6 @@ class Rocwmma(CMakePackage):
depends_on("googletest@1.10.0:", type="test")
for ver in [
- "5.2.0",
- "5.2.1",
- "5.2.3",
"5.3.0",
"5.3.3",
"5.4.0",
@@ -78,6 +83,14 @@ class Rocwmma(CMakePackage):
"5.6.1",
"5.7.0",
"5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
]:
depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver)
depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver)
@@ -85,7 +98,20 @@ class Rocwmma(CMakePackage):
depends_on("rocblas@" + ver, type="build", when="@" + ver)
depends_on("rocm-openmp-extras@" + ver, type="build", when="@" + ver)
- for ver in ["5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
+ for ver in [
+ "5.6.0",
+ "5.6.1",
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
depends_on("rocm-smi-lib@" + ver, when="@" + ver)
for tgt in itertools.chain(["auto"], amdgpu_targets):
diff --git a/var/spack/repos/builtin/packages/roms/package.py b/var/spack/repos/builtin/packages/roms/package.py
index d5f73bb857..4514a1c67e 100644
--- a/var/spack/repos/builtin/packages/roms/package.py
+++ b/var/spack/repos/builtin/packages/roms/package.py
@@ -15,15 +15,14 @@ class Roms(MakefilePackage):
the scientific community for a diverse range of applications"""
homepage = "https://www.myroms.org/"
- url = "file://{0}/roms_3.8_source.tar.gz".format(os.getcwd())
- manual_download = True
+ url = "https://github.com/myroms/roms/archive/refs/tags/roms-4.1.tar.gz"
- # TODO: ROMS v3.8 (svn version 986) require credentials to download and use
- # Spack recipe expects ROMS source code in .tar.gz format
- # checksum may differ from what is provided here.
- # user can skip checksum verification by placing "--no-checksum"
- # next to "spack install"
- version("3.8", sha256="5da7a61b69bd3e1f84f33f894a9f418971f3ba61cf9f5ef0a806a722161e2c9a")
+ version("4.1", sha256="cf25625066be3ea40fdd7bbe361f830d4415170636163b05bd338ac299809d4e")
+ version("4.0", sha256="d14b4920e791ad24684f439c4751c2f1c38dbf9b82aa0d4d57def93e50a5a747")
+ version("3.9", sha256="8e93f6ed40040e3f1b88d456ea9411ed3c06f280dc50b2787d6e5f793f58f1bc")
+ version("3.8", sha256="99fb69239e70edaef35771d82e203e43cd301dde4f2a5662da038499b7258ae7")
+
+ depends_on("fortran", type="build") # generated
variant("openmp", default=False, description="Turn on shared-memory parallelization in ROMS")
variant("mpi", default=True, description="Turn on distributed-memory parallelization in ROMS")
@@ -77,22 +76,16 @@ class Roms(MakefilePackage):
"""
Edit Linux-flang.mk makefile to support AOCC compiler
"""
- fflags = [
- "-fveclib=AMDLIBM",
- "-O3",
- "-ffast-math",
- "-funroll-loops",
- "-Mstack_arrays",
- "-std=f2008",
- ]
+ fflags = ["-fveclib=AMDLIBM", "-O3", "-ffast-math", "-funroll-loops", "-std=f2008"]
make_aocc = join_path("Compilers", "{0}-{1}.mk".format(self.arch, lib))
- filter_file(r"\sFC := gfortran*$", "FC := {0}".format(lib), make_aocc)
- filter_file(r"\sFFLAGS\s:=.*$", "FFLAGS := {0}".format(" ".join(fflags)), make_aocc)
+ filter_file(r"\sFC := gfortran*$", " FC := {0}".format(lib), make_aocc)
+ filter_file(r"\sFFLAGS :=.*$", " FFLAGS := {0}".format(" ".join(fflags)), make_aocc)
+ filter_file("-fallow-argument-mismatch", "", make_aocc, string=True)
filter_file(
- r"\sLIBS\s:= [$]", "LIBS := {0} $".format(spec["amdlibm"].libs.ld_flags), make_aocc
+ r"\sLIBS :=.*", " LIBS := {0}".format(spec["amdlibm"].libs.ld_flags), make_aocc
)
- filter_file(r"\sFREEFLAGS\s:=.*", "FREEFLAGS := -ffree-form", make_aocc)
+ filter_file(r"\sFREEFLAGS :=.*", " FREEFLAGS := -ffree-form", make_aocc)
def edit(self, spec, prefix):
# ROMS doesn't have support for AOCC out of the box
@@ -102,6 +95,14 @@ class Roms(MakefilePackage):
self._copy_arch_file(lib_info)
self._edit_arch(spec, prefix, lib_info)
+ # With gfortran >= 10 requires '-fallow-argument-mismatch' flag
+ if spec.satisfies("@:4.0 %gcc@10:"):
+ filter_file(
+ r"\sFFLAGS := ",
+ " FFLAGS := -fallow-argument-mismatch ",
+ "Compilers/Linux-gfortran.mk",
+ )
+
makefile = FileFilter("makefile")
app_type = self.selected_roms_application
@@ -144,4 +145,8 @@ class Roms(MakefilePackage):
def install(self, spec, prefix):
mkdirp(prefix.bin)
+ # Keep ROMS External Standard input scripts
+ mkdirp(spec.prefix.ROMS)
+
install("roms*", prefix.bin)
+ install_tree("./ROMS/External", join_path(spec.prefix.ROMS.External))
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
index cec503f4cf..73b016a271 100644
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -4,12 +4,16 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
import sys
+import spack.util.environment
from spack.operating_systems.mac_os import macos_version
from spack.package import *
from spack.util.environment import is_system_path
+_is_macos = sys.platform == "darwin"
+
class Root(CMakePackage):
"""ROOT is a data analysis framework."""
@@ -22,9 +26,7 @@ class Root(CMakePackage):
tags = ["hep"]
- maintainers(
- "drbenmorgan", "gartung", "greenc-FNAL", "HadrienG2", "marcmengel", "vitodb", "vvolkl"
- )
+ maintainers("drbenmorgan", "gartung", "greenc-FNAL", "marcmengel", "vitodb", "vvolkl")
# ###################### Versions ##########################
@@ -35,8 +37,17 @@ class Root(CMakePackage):
version("develop", branch="master")
# Production version
+ version("6.32.08", sha256="29ad4945a72dff1a009c326a65b6fa5ee2478498823251d3cef86a2cbeb77b27")
+ version("6.32.06", sha256="3fc032d93fe848dea5adb1b47d8f0a86279523293fee0aa2b3cd52a1ffab7247")
+ version("6.32.04", sha256="132f126aae7d30efbccd7dcd991b7ada1890ae57980ef300c16421f9d4d07ea8")
+ version("6.32.02", sha256="3d0f76bf05857e1807ccfb2c9e014f525bcb625f94a2370b455f4b164961602d")
+ version("6.32.00", sha256="12f203681a59041c474ce9523761e6f0e8861b3bee78df5f799a8db55189e5d2")
+ version("6.30.08", sha256="8bb8594867b9ded20a65e59f2cb6da965aa30851b8960f8cbf76293aec046b69")
+ version("6.30.06", sha256="300db7ed1b678ed2fb9635ca675921a1945c7c2103da840033b493091f55700c")
+ version("6.30.04", sha256="2b4180b698f39cc65d91084d833a884515b325bc5f673c8e39abe818b025d8cc")
version("6.30.02", sha256="7965a456d1ad1ee0d5fe4769bf5a8fec291af684ed93db0f3080a9c362435183")
version("6.30.00", sha256="0592c066954cfed42312957c9cb251654456064fe2d8dabdcb8826f1c0099d71")
+ version("6.28.12", sha256="fcd325267d238e9c6008f56a3a7e7c87fd864b1e633b0ffcf1f82b7e7ad3d249")
version("6.28.10", sha256="69d6fdeb607e6b20bd02c757fa6217024c0b6132c1e9b1dff4d85d9a2bb7e51e")
version("6.28.06", sha256="af3b673b9aca393a5c9ae1bf86eab2672aaf1841b658c5c6e7a30ab93c586533")
version("6.28.04", sha256="70f7f86a0cd5e3f2a0befdc59942dd50140d990ab264e8e56c7f17f6bfe9c965")
@@ -51,6 +62,7 @@ class Root(CMakePackage):
version("6.26.00", sha256="5fb9be71fdf0c0b5e5951f89c2f03fcb5e74291d043f6240fb86f5ca977d4b31")
version("6.24.08", sha256="882c41fe36e94456fb10443d08ef9152375a90d1f910a10add1793d6e838bc44")
version("6.24.06", sha256="907f69f4baca1e4f30eeb4979598ca7599b6aa803ca046e80e25b6bbaa0ef522")
+ version("6.24.04", sha256="4a416f3d7aa25dba46d05b641505eb074c5f07b3ec1d21911451046adaea3ee7")
version("6.24.02", sha256="0507e1095e279ccc7240f651d25966024325179fa85a1259b694b56723ad7c1c")
version("6.24.00", sha256="9da30548a289211c3122d47dacb07e85d35e61067fac2be6c5a5ff7bda979989")
version("6.22.08", sha256="6f061ff6ef8f5ec218a12c4c9ea92665eea116b16e1cd4df4f96f00c078a2f6f")
@@ -81,6 +93,10 @@ class Root(CMakePackage):
version("6.06.04", sha256="ab86dcc80cbd8e704099af0789e23f49469932ac4936d2291602301a7aa8795b")
version("6.06.02", sha256="18a4ce42ee19e1a810d5351f74ec9550e6e422b13b5c58e0c3db740cdbc569d1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# ###################### Patches ##########################
# Widely used patch (CMS, FNAL) to increase the size of static
@@ -97,6 +113,12 @@ class Root(CMakePackage):
# 6.16.00 fails to handle particular build option combinations, _cf_
# https://github.com/root-project/ROOT/commit/e0ae0483985d90a71a6cabd10d3622dfd1c15611.
patch("root7-webgui.patch", level=1, when="@6.16.00")
+ # Missing includes in libcpp_string_view.h
+ patch(
+ "https://github.com/root-project/root/pull/8289.patch?full_index=1",
+ sha256="5d91d78bcecd4fdbce9c829554a563234a9cb99eaf91dbc14fb85c3de33bac34",
+ when="@6.22:6.22.08",
+ )
# 6.26.00:6.26.06 can fail with empty string COMPILE_DEFINITIONS, which this patch
# protects against
patch(
@@ -117,19 +139,56 @@ class Root(CMakePackage):
patch("webgui.patch", level=0, when="@6.26.00:6.26.10,6.28.00:6.28.08,6.30.00 +webgui")
- if sys.platform == "darwin":
+ # Back-ported patches fixing segfault in weighted likelihood fits
+ patch(
+ "https://github.com/root-project/root/commit/2f00d6df258906c1f6fe848135a88b836db3077f.patch?full_index=1",
+ sha256="8da36032082e65ae246c03558a4c3fd67b157d1d0c6d20adac9de263279d1db6",
+ when="@6.28:6.28.12",
+ )
+ patch(
+ "https://github.com/root-project/root/commit/14838b35600b08278e69bc3d8d8669773bc11399.patch?full_index=1",
+ sha256="4647898ef28cb1adbaacdeedb04b417d69ccbaf02fc2b3aab20e07c0b2a96a0f",
+ when="@6.30:6.30.04",
+ )
+
+ # Fix TUri to be PCRE2 compatible
+ patch(
+ "https://github.com/root-project/root/pull/15988.patch?full_index=1",
+ sha256="9de4aa66f791dc3a1b9521995552b2d28b57be88a96a2e9e369977e32da26eb0",
+ when="@6.32.0:6.32.02",
+ )
+
+ if _is_macos:
# Resolve non-standard use of uint, _cf_
# https://sft.its.cern.ch/jira/browse/ROOT-7886.
patch("math_uint.patch", when="@6.06.02")
# Resolve circular dependency, _cf_
# https://sft.its.cern.ch/jira/browse/ROOT-8226.
patch("root6-60606-mathmore.patch", when="@6.06.06")
+ # Fix macOS build when cocoa is disabled:
+ patch(
+ "https://github.com/root-project/root/pull/14387.patch?full_index=1",
+ sha256="559495f7bdd6b7674d3b1019da9b76e8b374f6dca3dbe72fb1320b0be2b00e53",
+ when="@6.30:6.30.3 ~aqua",
+ )
+ # Fix build issues with libAfterImage for macOS
+ patch(
+ "https://github.com/root-project/root/pull/15044.patch?full_index=1",
+ sha256="e68be5fe7b1ec873da134bd39c5c72730c4ca06d51b52eb436ae44fe81cd472d",
+ when="@:6.30.04 +x",
+ )
+ # Fix rpath for loading cppyy
+ patch(
+ "https://github.com/root-project/root/pull/15925.diff?full_index=1",
+ sha256="1937290a4d54cd2e3e8a8d23d93b8dedaca9ed8dcfdcfa2f0d16629ff53fb3b7",
+ when="@6.28: +python",
+ )
# ###################### Variants ##########################
# See README.md for specific notes about what ROOT configuration
# options are or are not supported, and why.
- variant("aqua", default=False, description="Enable Aqua interface")
+ variant("aqua", default=_is_macos, description="Enable native macOS (Cocoa) interface")
variant("arrow", default=False, description="Enable Arrow interface")
variant("cuda", when="@6.08.00:", default=False, description="Enable CUDA support")
variant("cudnn", when="@6.20.02:", default=False, description="Enable cuDNN support")
@@ -231,7 +290,7 @@ class Root(CMakePackage):
variant(
"webgui", default=True, description="Enable web-based UI components of ROOT", when="+root7"
)
- variant("x", default=True, description="Enable set of graphical options")
+ variant("x", default=(not _is_macos), description="Enable set of graphical options")
variant("xml", default=True, description="Enable XML parser interface")
variant("xrootd", default=False, description="Build xrootd file server and its client")
@@ -253,6 +312,11 @@ class Root(CMakePackage):
depends_on("cmake@3.19:", type="build", when="@6.28.00: platform=darwin")
depends_on("pkgconfig", type="build")
+ # 6.32.00 requires sys/random.h
+ with when("@6.32.00:"):
+ depends_on("glibc@2.25:", when="^[virtuals=libc] glibc")
+ depends_on("musl@1.1.20:", when="^[virtuals=libc] musl")
+
depends_on("freetype")
depends_on("jpeg")
depends_on("libice")
@@ -283,6 +347,7 @@ class Root(CMakePackage):
depends_on("gl2ps", when="+opengl")
depends_on("gl", when="+opengl")
depends_on("glu", when="+opengl")
+ depends_on("libglx", when="+opengl+x")
# Qt4
depends_on("qt@:4", when="+qt4")
@@ -341,11 +406,14 @@ class Root(CMakePackage):
depends_on("vc@1.3.0:", when="@6.09.02: +vc")
depends_on("vc@1.4.4:", when="@6.29.02: +vc")
depends_on("vdt", when="+vdt")
- depends_on("veccore", when="+veccore")
+ depends_on("veccore@0.4.0:", when="@6.09.04: +veccore")
+ depends_on("veccore@0.4.2:", when="@6.11.02: +veccore")
depends_on("libxml2", when="+xml")
depends_on("xrootd", when="+xrootd")
depends_on("xrootd@:4", when="@:6.22.03 +xrootd")
+ depends_on("googletest", when="@6.28.00:", type="test")
+
# ###################### Conflicts ######################
# I was unable to build root with any Intel compiler
@@ -363,7 +431,11 @@ class Root(CMakePackage):
conflicts("target=ppc64le:", when="@:6.24")
# Incompatible variants
- if sys.platform != "darwin":
+ if _is_macos:
+ conflicts("+opengl", when="~x ~aqua", msg="root+opengl requires X or Aqua")
+ # https://github.com/root-project/root/issues/7160
+ conflicts("+aqua", when="~opengl", msg="+aqua requires OpenGL to be enabled")
+ else:
conflicts("+opengl", when="~x", msg="root+opengl requires X")
conflicts("+math", when="~gsl", msg="root+math requires GSL")
conflicts("+tmva", when="~gsl", msg="root+tmva requires GSL")
@@ -373,7 +445,7 @@ class Root(CMakePackage):
conflicts("+tmva-gpu", when="~cuda", msg="root+tmva-gpu requires CUDA")
conflicts("+tmva-pymva", when="~tmva", msg="root+tmva-pymva requires TMVA")
conflicts("+tmva-sofie", when="~tmva", msg="root+tmva-sofie requires TMVA")
- conflicts("~http", when="@6.29.00: +webgui", msg="root+webgui requires HTTP")
+ conflicts("~http", when="+webgui", msg="root+webgui requires HTTP")
conflicts("cxxstd=11", when="+root7", msg="root7 requires at least C++14")
conflicts("cxxstd=11", when="@6.25.02:", msg="This version of root requires at least C++14")
conflicts("cxxstd=14", when="@6.30.00:", msg="This version of root requires at least C++17")
@@ -384,10 +456,18 @@ class Root(CMakePackage):
# See https://github.com/root-project/root/issues/11128
conflicts("%clang@16:", when="@:6.26.07", msg="clang 16+ support was added in root 6.26.08")
+ # See https://github.com/spack/spack/pull/44826
+ if _is_macos and macos_version() == Version("12"):
+ conflicts("@:6.27", when="+python", msg="macOS 12 python support for 6.28: only")
+
# See https://github.com/root-project/root/issues/11714
- if sys.platform == "darwin" and macos_version() >= Version("13"):
+ if _is_macos and macos_version() >= Version("13"):
conflicts("@:6.26.09", msg="macOS 13 support was added in root 6.26.10")
+ # See https://github.com/root-project/root/issues/16219
+ if _is_macos and macos_version() >= Version("15"):
+ conflicts("@:6.32.05", msg="macOS 15 support was added in root 6.32.06")
+
# ROOT <6.14 is incompatible with Python >=3.7, which is the minimum supported by spack
conflicts("+python", when="@:6.13", msg="Spack wants python >=3.7, too new for ROOT <6.14")
@@ -464,21 +544,26 @@ class Root(CMakePackage):
_add_variant(v, f, "gviz", "+graphviz")
_add_variant(v, f, "http", "+http")
_add_variant(v, f, ("imt", "tbb"), "+tbb")
- _add_variant(v, f, "jemalloc", "+jemalloc")
- _add_variant(v, f, "memstat", "+memstat")
+ if Version(version_str) <= Version("6.28"):
+ _add_variant(v, f, "jemalloc", "+jemalloc")
+ if Version(version_str) <= Version("6.17"):
+ _add_variant(v, f, "memstat", "+memstat")
_add_variant(v, f, ("minuit", "minuit2"), "+minuit")
_add_variant(v, f, "mlp", "+mlp")
_add_variant(v, f, "mysql", "+mysql")
- _add_variant(v, f, "oracle", "+oracle")
+ if Version(version_str) <= Version("6.30"):
+ _add_variant(v, f, "oracle", "+oracle")
_add_variant(v, f, "pgsql", "+postgres")
- _add_variant(v, f, "pythia6", "+pythia6")
+ if Version(version_str) <= Version("6.30"):
+ _add_variant(v, f, "pythia6", "+pythia6")
_add_variant(v, f, "pythia8", "+pythia8")
_add_variant(v, f, "pyroot", "+python")
- _add_variant(v, f, ("qt", "qtgsi"), "+qt4")
+ if Version(version_str) <= Version("6.17"):
+ _add_variant(v, f, ("qt", "qtgsi"), "+qt4")
_add_variant(v, f, "r", "+r")
_add_variant(v, f, "roofit", "+roofit")
# webui feature renamed to webgui in 6.18
- if Version(version_str).satisfies("@6.18:"):
+ if Version(version_str) >= Version("6.18"):
_add_variant(v, f, ("root7", "webgui"), "+webgui")
else:
_add_variant(v, f, ("root7", "webui"), "+webgui")
@@ -487,7 +572,8 @@ class Root(CMakePackage):
_add_variant(v, f, "spectrum", "+spectrum")
_add_variant(v, f, "sqlite", "+sqlite")
_add_variant(v, f, "ssl", "+ssl")
- _add_variant(v, f, "table", "+table")
+ if Version(version_str) <= Version("6.17"):
+ _add_variant(v, f, "table", "+table")
_add_variant(v, f, "thread", "+threads")
_add_variant(v, f, "tmva", "+tmva")
_add_variant(v, f, "tmva-cpu", "+tmva-cpu")
@@ -498,14 +584,14 @@ class Root(CMakePackage):
_add_variant(v, f, "vc", "+vc")
_add_variant(v, f, "vdt", "+vdt")
_add_variant(v, f, "veccore", "+veccore")
- _add_variant(v, f, "vmc", "+vmc")
+ if Version(version_str) <= Version("6.25"):
+ _add_variant(v, f, "vmc", "+vmc")
_add_variant(v, f, ("x11", "xft"), "+x")
_add_variant(v, f, "xml", "+xml")
_add_variant(v, f, "xrootd", "+xrootd")
return " ".join(v)
def cmake_args(self):
- spec = self.spec
define = self.define
define_from_variant = self.define_from_variant
options = []
@@ -515,7 +601,6 @@ class Root(CMakePackage):
# Options controlling gross build / config behavior.
options += [
- define("exceptions", True),
define("explicitlink", True),
define("fail-on-missing", True),
define_from_variant("fortran"),
@@ -535,16 +620,16 @@ class Root(CMakePackage):
define("CLING_CXX_PATH", self.compiler.cxx),
]
- if self.spec.satisfies("@:6.28.99"):
+ if self.spec.satisfies("@:6.28"):
options.append(define("cxxmodules", False))
+ if self.spec.satisfies("@:6.30"):
+ options.append(define("exceptions", True))
+
# Options related to ROOT's ability to download and build its own
# dependencies. Per Spack convention, this should generally be avoided.
- afterimage_enabled = ("+x" in self.spec) if "platform=darwin" not in self.spec else True
-
options += [
- define("builtin_afterimage", afterimage_enabled),
define("builtin_cfitsio", False),
define("builtin_davix", False),
define("builtin_fftw3", False),
@@ -569,6 +654,14 @@ class Root(CMakePackage):
define("builtin_zlib", False),
]
+ if self.spec.satisfies("@:6.32"):
+ options.append(
+ define(
+ "builtin_afterimage",
+ ("+x" in self.spec) if "platform=darwin" not in self.spec else True,
+ )
+ )
+
# Features
options += [
define("afdsmrgd", False),
@@ -607,7 +700,6 @@ class Root(CMakePackage):
define_from_variant("memstat"), # See conflicts
define("minimal", False),
define_from_variant("minuit"),
- define_from_variant("minuit2", "minuit"),
define_from_variant("mlp"),
define("monalisa", False),
define_from_variant("mysql"),
@@ -672,9 +764,12 @@ class Root(CMakePackage):
if self.spec.satisfies("@6.25.02:"):
options.append(define_from_variant("tmva-sofie"))
+ if self.spec.satisfies("@:6.30"):
+ options.append(define_from_variant("minuit2", "minuit"))
+
# #################### Compiler options ####################
- if sys.platform == "darwin" and self.compiler.cc == "gcc":
+ if _is_macos and self.compiler.cc == "gcc":
cflags = "-D__builtin_unreachable=__builtin_trap"
options.extend([define("CMAKE_C_FLAGS", cflags), define("CMAKE_CXX_FLAGS", cflags)])
@@ -688,9 +783,6 @@ class Root(CMakePackage):
ftgl_prefix = self.spec["ftgl"].prefix
options.append(define("FTGL_ROOT_DIR", ftgl_prefix))
options.append(define("FTGL_INCLUDE_DIR", ftgl_prefix.include))
- if "+python" in self.spec:
- # See https://github.com/spack/spack/pull/11579
- options.append(define("PYTHON_EXECUTABLE", spec["python"].command.path))
return options
@@ -727,13 +819,22 @@ class Root(CMakePackage):
add_include_path("xproto")
if "+opengl" in spec and "platform=darwin" not in spec:
add_include_path("glew")
- add_include_path("mesa-glu")
+ add_include_path("glu")
if "platform=darwin" in spec:
# Newer deployment targets cause fatal errors in rootcling, so
# override with an empty value even though it may lead to link
# warnings when building against ROOT
env.unset("MACOSX_DEPLOYMENT_TARGET")
+ @property
+ def root_library_path(self):
+ # Where possible, we do not use LD_LIBRARY_PATH as that is non-portable
+ # and pollutes the standard library-loading mechanisms on Linux systems.
+ # The ROOT_LIBRARY_PATH environment variable was added to ROOT 6.26.
+ if self.spec.satisfies("@:6.25"):
+ return "LD_LIBRARY_PATH"
+ return "ROOT_LIBRARY_PATH"
+
def setup_run_environment(self, env):
env.set("ROOTSYS", self.prefix)
env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
@@ -741,8 +842,12 @@ class Root(CMakePackage):
# the following vars are copied from thisroot.sh; silence a cppyy warning
env.set("CLING_STANDARD_PCH", "none")
env.set("CPPYY_API_PATH", "none")
+ if "+rpath" not in self.spec:
+ env.prepend_path(self.root_library_path, self.prefix.lib.root)
- def setup_dependent_build_environment(self, env, dependent_spec):
+ def setup_dependent_build_environment(
+ self, env: spack.util.environment.EnvironmentModifications, dependent_spec
+ ):
env.set("ROOTSYS", self.prefix)
env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
env.prepend_path("PYTHONPATH", self.prefix.lib.root)
@@ -750,16 +855,20 @@ class Root(CMakePackage):
env.append_path("CMAKE_MODULE_PATH", self.prefix.cmake)
env.prepend_path("ROOT_INCLUDE_PATH", dependent_spec.prefix.include)
if "+rpath" not in self.spec:
- env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib.root)
+ env.prepend_path(self.root_library_path, self.prefix.lib.root)
if "platform=darwin" in self.spec:
# Newer deployment targets cause fatal errors in rootcling
env.unset("MACOSX_DEPLOYMENT_TARGET")
- def setup_dependent_run_environment(self, env, dependent_spec):
- env.set("ROOTSYS", self.prefix)
- env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
- env.prepend_path("PYTHONPATH", self.prefix.lib.root)
- env.prepend_path("PATH", self.prefix.bin)
+ def setup_dependent_run_environment(
+ self, env: spack.util.environment.EnvironmentModifications, dependent_spec
+ ):
env.prepend_path("ROOT_INCLUDE_PATH", dependent_spec.prefix.include)
- if "+rpath" not in self.spec:
- env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib.root)
+ # For dependents that build dictionaries, ROOT needs to know where the
+ # dictionaries have been installed. This can be facilitated by
+ # automatically prepending dependent package library paths to
+ # ROOT_LIBRARY_PATH (for @6.26:) or LD_LIBRARY_PATH (for older
+ # versions).
+ for lib_path in (dependent_spec.prefix.lib, dependent_spec.prefix.lib64):
+ if os.path.exists(lib_path):
+ env.prepend_path(self.root_library_path, lib_path)
diff --git a/var/spack/repos/builtin/packages/rosco/intel-oneapi-29.patch b/var/spack/repos/builtin/packages/rosco/intel-oneapi-29.patch
new file mode 100644
index 0000000000..58d6e4bd07
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rosco/intel-oneapi-29.patch
@@ -0,0 +1,13 @@
+diff --git a/rosco/controller/CMakeLists.txt b/rosco/controller/CMakeLists.txt
+index 0d29085..46705c2 100644
+--- a/rosco/controller/CMakeLists.txt
++++ b/rosco/controller/CMakeLists.txt
+@@ -11,7 +11,7 @@ endif()
+ message(STATUS "CMAKE_Fortran_COMPILER_ID = ${CMAKE_Fortran_COMPILER_ID}")
+ if(APPLE OR UNIX)
+ # Enable .dll export
+-if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
++if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIMPLICIT_DLLEXPORT -r8 -double-size 64 -cpp -no-wrap-margin")
+ else()
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIMPLICIT_DLLEXPORT -ffree-line-length-0 -fdefault-real-8 -fdefault-double-8 -cpp")
diff --git a/var/spack/repos/builtin/packages/rosco/intel-oneapi-2x.patch b/var/spack/repos/builtin/packages/rosco/intel-oneapi-2x.patch
new file mode 100644
index 0000000000..fce7258e20
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rosco/intel-oneapi-2x.patch
@@ -0,0 +1,13 @@
+diff --git a/ROSCO/CMakeLists.txt b/ROSCO/CMakeLists.txt
+index b450a30..9506267 100644
+--- a/ROSCO/CMakeLists.txt
++++ b/ROSCO/CMakeLists.txt
+@@ -11,7 +11,7 @@ endif()
+ message(STATUS "CMAKE_Fortran_COMPILER_ID = ${CMAKE_Fortran_COMPILER_ID}")
+ if(APPLE OR UNIX)
+ # Enable .dll export
+-if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
++if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIMPLICIT_DLLEXPORT -r8 -double-size 64 -cpp -no-wrap-margin")
+ else()
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIMPLICIT_DLLEXPORT -ffree-line-length-0 -fdefault-real-8 -fdefault-double-8 -cpp")
diff --git a/var/spack/repos/builtin/packages/rosco/package.py b/var/spack/repos/builtin/packages/rosco/package.py
new file mode 100644
index 0000000000..59c33292ad
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rosco/package.py
@@ -0,0 +1,66 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Rosco(CMakePackage):
+ """
+ ROSCO controls package for OpenFAST from NREL
+ Note: this only builds ROSCO controls library for inclusion with OpenFAST
+ If the toolbox or tuning scripts are needed, please build manually
+ """
+
+ homepage = "https://rosco.readthedocs.io/en/latest/"
+ url = "https://github.com/NREL/ROSCO/archive/refs/tags/v2.9.0.tar.gz"
+ git = "https://github.com/NREL/ROSCO.git"
+
+ maintainers("dzalkind", "ndevelder")
+
+ version("develop", branch="develop")
+ version("main", branch="main")
+ version("2.9.0", sha256="eb7f6220207b8a07c9570fb64bab591906b0c19d73ac4c24bb8dca252722ca79")
+ version("2.8.0", sha256="7a2e3a7bebdf6ee73884a9e3502f904cc3a3f1aa1bf672c223ecbaa041bfc48f")
+ version("2.7.0", sha256="b6a2cda92680cf6a460d194901a2f16c2635710a82788576a6383a3bb189fc83")
+ version("2.6.0", sha256="ca1c1a6ac53e8220b107accccfb8b5299772c38b7c77cd8d2ba383e9825daeaa")
+ version("2.5.1", sha256="55fe7bba612321baa6e089ee1156ef4db2e3bccf1b69534829b06f3367fff05d")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("shared", default=False, description="Build shared libraries")
+ variant("pic", default=False, description="Position independent code")
+
+ patch("intel-oneapi-2x.patch", when="@2.5:2.8%oneapi")
+ patch("intel-oneapi-29.patch", when="@2.9.0:2.9.1%oneapi")
+
+ @property
+ def root_cmakelists_dir(self):
+ if self.spec.version >= Version("2.9.0"):
+ return "rosco/controller"
+ else:
+ return "ROSCO"
+
+ def cmake_args(self):
+ options = []
+
+ options.extend(
+ [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
+ ]
+ )
+
+ return options
+
+ def setup_run_environment(self, env):
+ env.set("ROSCO_DISCON", self.prefix.lib + "/libdiscon.so")
+ env.set("ROSCO_DISCON_DIR", self.prefix.lib)
+
+ def flag_handler(self, name, flags):
+ if name == "fflags" and self.compiler.fc.endswith("gfortran"):
+ flags.extend(["-ffree-line-length-0"])
+
+ return (None, None, flags)
diff --git a/var/spack/repos/builtin/packages/ross/package.py b/var/spack/repos/builtin/packages/ross/package.py
index 53910e4039..77a4cb7fe5 100644
--- a/var/spack/repos/builtin/packages/ross/package.py
+++ b/var/spack/repos/builtin/packages/ross/package.py
@@ -17,6 +17,7 @@ class Ross(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("8.0.0", sha256="5339c9afcf77821fb6ebbcd93b8a1e651c7883e94dff250528815a08f84f1694")
version("7.2.0", sha256="c937f4c7baa1918b6cd08f4eafae8cab44eddcd4aaa1175c23ff8562583ad726")
version("7.1.1", sha256="550e3288cefedcbc7e6ca16cfbee0477b70399d63e94f554b60b32d714029722")
version("7.1.0", sha256="478063f36d96466faef3db3cc15e1c0e1a8b60b9152fcce0eedf367be8252733")
@@ -24,6 +25,8 @@ class Ross(CMakePackage):
version("7.0.0", sha256="fd16be2c86d9d71ae64eef67c02933471ab758c8a5b01b04fe358d9228fc581e")
version("6.0.0", sha256="07ff70518a58503e116bb7386f490e901212798afdd471da1bcd34f78a7e6030")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
depends_on("cmake@3.5:", when="@7.0.1:", type="build")
@@ -32,8 +35,8 @@ class Ross(CMakePackage):
args = []
args.append("-DBUILD_SHARED_LIBS=ON")
- args.append("-DARCH=%s" % self.spec.target)
- args.append("-DCMAKE_C_COMPILER=%s" % self.spec["mpi"].mpicc)
- args.append("-DCMAKE_CXX_COMPILER=%s" % self.spec["mpi"].mpicxx)
+ args.append(f"-DARCH={self.spec.target}")
+ args.append(f"-DCMAKE_C_COMPILER={self.spec['mpi'].mpicc}")
+ args.append(f"-DCMAKE_CXX_COMPILER={self.spec['mpi'].mpicxx}")
return args
diff --git a/var/spack/repos/builtin/packages/routinator/package.py b/var/spack/repos/builtin/packages/routinator/package.py
index e6845beec6..35d1058d05 100644
--- a/var/spack/repos/builtin/packages/routinator/package.py
+++ b/var/spack/repos/builtin/packages/routinator/package.py
@@ -16,6 +16,7 @@ class Routinator(Package):
license("BSD-3-Clause")
+ version("0.14.0", sha256="861e90f395344be19880485185df47e8fd258cc583b82be702af660b466955cb")
version("0.12.1", sha256="8150fe544f89205bb2d65bca46388f055cf13971d3163fe17508bf231f9ab8bc")
version(
"0.11.2",
@@ -25,6 +26,7 @@ class Routinator(Package):
depends_on("rust@1.56:", when="@0.11.2")
depends_on("rust@1.63:", when="@0.12.1")
+ depends_on("rust@1.70:", when="@0.13.0:")
def install(self, spec, prefix):
cargo = which("cargo")
diff --git a/var/spack/repos/builtin/packages/routino/package.py b/var/spack/repos/builtin/packages/routino/package.py
index 602e18a307..33dd2f9037 100644
--- a/var/spack/repos/builtin/packages/routino/package.py
+++ b/var/spack/repos/builtin/packages/routino/package.py
@@ -17,6 +17,9 @@ class Routino(MakefilePackage):
version("3.3.3", sha256="abd82b77c314048f45030f7219887ca241b46d40641db6ccb462202b97a047f5")
version("3.2", sha256="e2a431eaffbafab630835966d342e4ae25d5edb94c8ed419200e1ffb50bc7552")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("bzip2")
diff --git a/var/spack/repos/builtin/packages/rpcsvc-proto/package.py b/var/spack/repos/builtin/packages/rpcsvc-proto/package.py
index 30cf5138be..2aa4338cf1 100644
--- a/var/spack/repos/builtin/packages/rpcsvc-proto/package.py
+++ b/var/spack/repos/builtin/packages/rpcsvc-proto/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.paths
from spack.package import *
@@ -14,11 +15,14 @@ class RpcsvcProto(AutotoolsPackage):
license("BSD-3-Clause")
+ version("1.4.4", sha256="81c3aa27edb5d8a18ef027081ebb984234d5b5860c65bd99d4ac8f03145a558b")
version("1.4.3", sha256="69315e94430f4e79c74d43422f4a36e6259e97e67e2677b2c7d7060436bd99b1")
version("1.4.2", sha256="678851b9f7ddf4410d2859c12016b65a6dd1a0728d478f18aeb54d165352f17c")
version("1.4.1", sha256="9429e143bb8dd33d34bf0663f571d4d4a1103e1afd7c49791b367b7ae1ef7f35")
version("1.4", sha256="4149d5f05d8f7224a4d207362fdfe72420989dc1b028b28b7b62b6c2efe22345")
+ depends_on("c", type="build") # generated
+
depends_on("gettext")
def configure_args(self):
@@ -32,6 +36,6 @@ class RpcsvcProto(AutotoolsPackage):
# Add 'cpp' path for rpcgen
filter_file(
"rpcgen/rpcgen",
- "rpcgen/rpcgen -Y {0}/lib/spack/env".format(spack.paths.spack_root),
+ f"rpcgen/rpcgen -Y {spack.paths.spack_root}/lib/spack/env",
"rpcsvc/Makefile",
)
diff --git a/var/spack/repos/builtin/packages/rpm/package.py b/var/spack/repos/builtin/packages/rpm/package.py
index 840651798b..39d2d44af4 100644
--- a/var/spack/repos/builtin/packages/rpm/package.py
+++ b/var/spack/repos/builtin/packages/rpm/package.py
@@ -24,9 +24,13 @@ class Rpm(AutotoolsPackage):
maintainers("haampie")
version("master", branch="master")
+ version("4.18.2", sha256="8be0a812b2e707c72ae486b54db18ae211dd4158ad35e32b308d662c59a75e85")
version("4.16.1.2", sha256="3d2807807a8ccaa92a8ced74e09b5bf5b2417a5bbf9bee4abc7c6aa497547bf3")
version("4.16.0", sha256="a62b744e3404b107e8467e1a36ff0f2bf9e5c1b748dbfeb36db54bbb859446ea")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"crypto",
values=("openssl", "libgcrypt"),
@@ -56,8 +60,8 @@ class Rpm(AutotoolsPackage):
# Always required
depends_on("popt")
- # Without this file patch, we don't detect lua
- depends_on("lua+pcfile@5.3.5:", when="+lua")
+ # support for embedded Lua interpreter
+ depends_on("lua@5.3.5:", when="+lua")
# Enable POSIX.1e draft 15 file capabilities support
depends_on("libcap", when="+posix")
@@ -91,13 +95,16 @@ class Rpm(AutotoolsPackage):
depends_on("gzip")
depends_on("xz")
depends_on("lzma")
- depends_on("zstd", when="+zstd")
+ with when("+zstd"):
+ depends_on("zstd")
+ depends_on("zstd@1.3.8:", when="@4.17:")
# java jar dependency analysis (already requirement for lua)
depends_on("unzip", type="run")
# Build dependencies
depends_on("doxygen", type="build")
+ depends_on("pandoc", type="build", when="@4.17:")
depends_on("pkgconfig", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests-6.1.patch b/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests-6.1.patch
new file mode 100644
index 0000000000..be8a28b60d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests-6.1.patch
@@ -0,0 +1,56 @@
+From d94cc49d93800b7b50d2582b28a2b6c84fdb166b Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Thu, 20 Jun 2024 10:17:09 +0000
+Subject: [PATCH] changes to cmakelists.txt to include half and turbo-jpeg
+
+---
+ utilities/test_suite/HIP/CMakeLists.txt | 4 ++--
+ utilities/test_suite/HOST/CMakeLists.txt | 5 ++++-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/utilities/test_suite/HIP/CMakeLists.txt b/utilities/test_suite/HIP/CMakeLists.txt
+index b8bf361..bfac5ec 100644
+--- a/utilities/test_suite/HIP/CMakeLists.txt
++++ b/utilities/test_suite/HIP/CMakeLists.txt
+@@ -80,7 +80,7 @@ if (hip_FOUND AND OpenCV_FOUND)
+
+ add_executable(Tensor_hip Tensor_hip.cpp)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGPU_SUPPORT=1 -DRPP_BACKEND_HIP=1 -std=gnu++17")
+- target_link_libraries(Tensor_hip ${OpenCV_LIBS} -lturbojpeg -lrpp ${hip_LIBRARIES} pthread ${LINK_LIBRARY_LIST} hip::device)
++ target_link_libraries(Tensor_hip ${OpenCV_LIBS} -lrpp ${hip_LIBRARIES} pthread ${LINK_LIBRARY_LIST} hip::device)
+ else()
+ message(FATAL_ERROR "-- ${Red}Error: OpenCV and hip must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+ endif()
+@@ -96,4 +96,4 @@ if(NIFTI_FOUND AND OpenCV_FOUND)
+ target_link_libraries(Tensor_voxel_hip ${OpenCV_LIBS} -lturbojpeg -lrpp ${hip_LIBRARIES} pthread ${LINK_LIBRARY_LIST} hip::device ${NIFTI_PACKAGE_PREFIX}NIFTI::${NIFTI_PACKAGE_PREFIX}niftiio)
+ else()
+ message("-- ${Yellow}Warning: libniftiio must be installed to install ${PROJECT_NAME}/Tensor_voxel_hip successfully!${ColourReset}")
+-endif()
+\ No newline at end of file
++endif()
+diff --git a/utilities/test_suite/HOST/CMakeLists.txt b/utilities/test_suite/HOST/CMakeLists.txt
+index 43be2b2..c119f28 100644
+--- a/utilities/test_suite/HOST/CMakeLists.txt
++++ b/utilities/test_suite/HOST/CMakeLists.txt
+@@ -69,6 +69,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -ggdb -O0")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} OpenMP::OpenMP_CXX)
+
++find_path(HALF_INCLUDE_DIR half.hpp)
++include_directories(${HALF_INCLUDE_DIR})
++
+ if(TurboJpeg_FOUND)
+ message("-- ${Green}${PROJECT_NAME} set to build with rpp and TurboJpeg${ColourReset}")
+ include_directories(${TurboJpeg_INCLUDE_DIRS})
+@@ -85,7 +88,7 @@ if (OpenCV_FOUND)
+
+ add_executable(Tensor_host Tensor_host.cpp)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
+- target_link_libraries(Tensor_host ${OpenCV_LIBS} -lturbojpeg -lrpp pthread ${LINK_LIBRARY_LIST})
++ target_link_libraries(Tensor_host ${OpenCV_LIBS} -lrpp pthread ${LINK_LIBRARY_LIST})
+ else()
+ message("-- ${Red}Error: OpenCV must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+ endif()
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests.patch b/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests.patch
new file mode 100644
index 0000000000..b38e526563
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rpp/0003-changes-to-rpp-unit-tests.patch
@@ -0,0 +1,62 @@
+From: Afzal Patel <afzal.patel@amd.com>
+Date: Tue Jan 9 09:57:48 PST 2024
+Subject: [PATCH] changes-to-rpp-unit-tests
+Description: This patch makes changes to the CMakeLists.txt for the rpp unit tests.
+ It adds the directory which contains half.hpp and also modifies the method
+ the libjpegturbo library is linked.
+---
+diff git a/utilities/test_suite/HIP/CMakeLists.txt b/utilities/test_suite/HIP/CMakeLists.txt
+index 8f32a66..456999e 100644
+--- a/utilities/test_suite/HIP/CMakeLists.txt
++++ b/utilities/test_suite/HIP/CMakeLists.txt
+@@ -55,7 +55,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ if(TurboJpeg_FOUND)
+ message("-- ${Green}${PROJECT_NAME} set to build with rpp and TurboJpeg${ColourReset}")
+ include_directories(${TurboJpeg_INCLUDE_DIRS})
+- set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${TurboJpeg_LIBRARIES_DIR})
++ set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${TurboJpeg_LIBRARIES})
+ else()
+ message("-- ${Yellow}Error: TurboJpeg must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+ endif()
+@@ -72,7 +72,7 @@ if (hip_FOUND AND OpenCV_FOUND)
+
+ add_executable(Tensor_hip Tensor_hip.cpp)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGPU_SUPPORT=1 -DRPP_BACKEND_HIP=1 -std=gnu++14")
+- target_link_libraries(Tensor_hip ${OpenCV_LIBS} -lturbojpeg -lrpp ${hip_LIBRARIES} pthread ${LINK_LIBRARY_LIST} hip::device)
++ target_link_libraries(Tensor_hip ${OpenCV_LIBS} -lrpp ${hip_LIBRARIES} pthread ${LINK_LIBRARY_LIST} hip::device)
+ else()
+ message("-- ${Yellow}Error: OpenCV and hip must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+-endif()
+\ No newline at end of file
++endif()
+diff --git a/utilities/test_suite/HOST/CMakeLists.txt b/utilities/test_suite/HOST/CMakeLists.txt
+index bad0d60..5a8fd5c 100644
+--- a/utilities/test_suite/HOST/CMakeLists.txt
++++ b/utilities/test_suite/HOST/CMakeLists.txt
+@@ -50,10 +50,13 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -ggdb -O0")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} OpenMP::OpenMP_CXX)
+
++find_path(HALF_INCLUDE_DIR half.hpp)
++include_directories(${HALF_INCLUDE_DIR})
++
+ if(TurboJpeg_FOUND)
+ message("-- ${Green}${PROJECT_NAME} set to build with rpp and TurboJpeg${ColourReset}")
+ include_directories(${TurboJpeg_INCLUDE_DIRS})
+- set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${TurboJpeg_LIBRARIES_DIR})
++ set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${TurboJpeg_LIBRARIES})
+ else()
+ message("-- ${Yellow}Error: TurboJpeg must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+ endif()
+@@ -67,8 +70,8 @@ if (OpenCV_FOUND)
+ add_executable(Tensor_host Tensor_host.cpp)
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
+- target_link_libraries(Tensor_host ${OpenCV_LIBS} -lturbojpeg -lrpp pthread ${LINK_LIBRARY_LIST})
++ target_link_libraries(Tensor_host ${OpenCV_LIBS} -lrpp pthread ${LINK_LIBRARY_LIST})
+
+ else()
+ message("-- ${Yellow}Error: OpenCV must be installed to install ${PROJECT_NAME} successfully!${ColourReset}")
+-endif()
+\ No newline at end of file
++endif()
diff --git a/var/spack/repos/builtin/packages/rpp/0003-include-half-through-spack-package.patch b/var/spack/repos/builtin/packages/rpp/0003-include-half-through-spack-package.patch
new file mode 100644
index 0000000000..2e7e08c2ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rpp/0003-include-half-through-spack-package.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 137896e..ca82e98 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -129,6 +129,9 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+
+ # OpenMP
+ find_package(OpenMP REQUIRED)
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
++
+ if(APPLE)
+ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ set(OpenMP_C "${CMAKE_C_COMPILER}")
+@@ -278,6 +281,7 @@ target_include_directories(${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${ROCM_PATH}/include
++ ${HALF_INCLUDE_DIR}
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/include/cpu
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/include/common
+diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
+index 2a64d77..80c5686 100644
+--- a/src/modules/CMakeLists.txt
++++ b/src/modules/CMakeLists.txt
+@@ -81,6 +81,8 @@ if("${TIME_INFO}" STREQUAL "1")
+ endif()
+
+ # Backend specific settings
++find_path(HALF_INCLUDE_DIR half.hpp)
++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")
+
+ if( "${BACKEND}" STREQUAL "HIP")
+ # Add HIP kernels
+@@ -99,7 +101,7 @@ if( "${BACKEND}" STREQUAL "HIP")
+ # Add HIP specific includes
+ set(ROCM_INC ${ROCM_PATH}/include/)
+ list(APPEND HIP_LOCAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/include/hip/ ${CMAKE_SOURCE_DIR}/src/include/common/)
+- set(INCLUDE_LIST ${ROCM_INC} ${HIP_LOCAL_INCLUDE_DIRS} ${INCLUDE_LIST})
++ set(INCLUDE_LIST ${ROCM_INC} ${HIP_LOCAL_INCLUDE_DIRS} ${INCLUDE_LIST} ${HALF_INCLUDE_DIR})
+ elseif( "${BACKEND}" STREQUAL "OCL")
+ # Add OpenCL kernels
+ file(GLOB MOD_CL_CPP "cl/*.cpp" )
+@@ -114,7 +116,7 @@ elseif( "${BACKEND}" STREQUAL "OCL")
+ # Add OpenCL specific includes
+ set(ROCM_INC ${ROCM_PATH}/include/)
+ list(APPEND OCL_LOCAL_INCLUDE_LIST ${CMAKE_SOURCE_DIR}/src/include/cl/ ${CMAKE_SOURCE_DIR}/src/include/common/)
+- set(INCLUDE_LIST ${ROCM_INC} ${OCL_LOCAL_INCLUDE_LIST} ${INCLUDE_LIST})
++ set(INCLUDE_LIST ${ROCM_INC} ${OCL_LOCAL_INCLUDE_LIST} ${INCLUDE_LIST} ${HALF_INCLUDE_DIR})
+ elseif( "${BACKEND}" STREQUAL "CPU")
+ # Add CPU specific includes
+ set(INCLUDE_LIST ${CMAKE_SOURCE_DIR}/src/include/common/)
+@@ -136,6 +138,7 @@ target_include_directories( ${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_SOURCE_DIR}/include
+ ${ROCM_INC}
++ ${HALF_INCLUDE_DIR}
+ PRIVATE
+ ${CMAKE_SOURCE_DIR}/src/include/cpu
+ ${CMAKE_SOURCE_DIR}/src/include/common \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/rpp/package.py b/var/spack/repos/builtin/packages/rpp/package.py
index a88093a060..fdb6e84ad0 100644
--- a/var/spack/repos/builtin/packages/rpp/package.py
+++ b/var/spack/repos/builtin/packages/rpp/package.py
@@ -15,7 +15,7 @@ class Rpp(CMakePackage):
homepage = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp"
git = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git"
- url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/archive/refs/tags/rocm-5.7.0.tar.gz"
+ url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/archive/refs/tags/rocm-6.1.2.tar.gz"
def url_for_version(self, version):
if version >= Version("5.7.0"):
@@ -24,19 +24,29 @@ class Rpp(CMakePackage):
url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/archive/{0}.tar.gz"
return url.format(version)
- maintainers = ["srekolam", "afzpatel"]
tags = ["rocm"]
+ maintainers("srekolam", "afzpatel")
license("MIT")
-
+ version("6.2.4", sha256="e733350e938ce8d2f7d6d43d2bfd0febd270d52673bafa0265ed97bb850289de")
+ version("6.2.1", sha256="5ae9d0c6733ba0e00be1cda13003e98acebd3f86de59e6f1969e297d673f124e")
+ version("6.2.0", sha256="69fbebf50b734e055258ea3c5b0399a51babab8f66074166d2b0fc4f1904c09c")
+ version("6.1.2", sha256="3a529bdd17b448a9e05a6aac1b5e173a077f4a4a1fd2ed759bcea331acd2829f")
+ version("6.1.1", sha256="9ca385c6f208a0bbf2be60ad15697d35371992d49ed30077b69e22090cef657c")
+ version("6.1.0", sha256="026c5ac7a92e14e35b9e7630a2ebfff3f4b3544b988eb9aa8af9991d4beea242")
+ version("6.0.2", sha256="2686eb4099233db4444fcd2f77af9b00d38d829f05de2403bed37b1b28f2653c")
+ version("6.0.0", sha256="3626a648bc773520f5cd5ca15f494de6e74b422baf32491750ce0737c3367f15")
version("5.7.1", sha256="36fff5f1c52d969c3e2e0c75b879471f731770f193c9644aa6ab993fb8fa4bbf")
version("5.7.0", sha256="1c612cde3c3d3840ae75ee5c1ee59bd8d61b1fdbf84421ae535cda863470fc06")
version("1.2.0", sha256="660a11e1bd8706967835597b26daa874fd1507459bfebe22818149444bec540c")
- version("1.1.0", sha256="9b1b9e721df27ee577819710b261071c68b2dccba96d9daf5d0535ee5f0e045f")
- version("1.0.0", sha256="040601e356b0a06c4ffb2043320ae822ab0da78af867392002c7b68dbd85989c")
- version("0.99", sha256="f1d7ec65d0148ddb7b3ce836a7e058727036df940d72d1683dee590a913fd44a")
- version("0.98", sha256="191b5d89bf990ae22b5ef73675b89ed4371c3ce342ab9cc65383fa12ef13086e")
- version("0.97", sha256="8ce1a869ff67a29579d87d399d8b0bd97bf12ae1b6b1ca1f161cb8a262fb9939")
+ with default_args(deprecated=True):
+ version("1.1.0", sha256="9b1b9e721df27ee577819710b261071c68b2dccba96d9daf5d0535ee5f0e045f")
+ version("1.0.0", sha256="040601e356b0a06c4ffb2043320ae822ab0da78af867392002c7b68dbd85989c")
+ version("0.99", sha256="f1d7ec65d0148ddb7b3ce836a7e058727036df940d72d1683dee590a913fd44a")
+ version("0.98", sha256="191b5d89bf990ae22b5ef73675b89ed4371c3ce342ab9cc65383fa12ef13086e")
+ version("0.97", sha256="8ce1a869ff67a29579d87d399d8b0bd97bf12ae1b6b1ca1f161cb8a262fb9939")
+
+ depends_on("cxx", type="build") # generated
variant(
"build_type",
default="Release",
@@ -48,15 +58,38 @@ class Rpp(CMakePackage):
variant("opencl", default=False, description="Use OPENCL as the backend")
variant("hip", default=True, description="Use HIP as backend")
variant("cpu", default=False, description="Use CPU as backend")
+ variant(
+ "add_tests",
+ default=False,
+ description="add utilities folder which contains rpp unit tests",
+ )
+ variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
- patch("0001-include-half-openmp-through-spack-package.patch")
+ conflicts("+asan", when="os=rhel9")
+ conflicts("+asan", when="os=centos7")
+ conflicts("+asan", when="os=centos8")
+
+ patch("0001-include-half-openmp-through-spack-package.patch", when="@:5.7")
patch("0002-declare-handle-in-header.patch")
+ patch("0003-include-half-through-spack-package.patch", when="@6.0:")
+
+ # adds half.hpp include directory and modifies how the libjpegturbo
+ # library is linked for the rpp unit test
+ patch("0003-changes-to-rpp-unit-tests.patch", when="@5.7:6.0 +add_tests")
+ patch("0003-changes-to-rpp-unit-tests-6.1.patch", when="@6.1 +add_tests")
def patch(self):
if self.spec.satisfies("+hip"):
filter_file(
"${ROCM_PATH}/llvm", self.spec["llvm-amdgpu"].prefix, "CMakeLists.txt", string=True
)
+ if self.spec.satisfies("+asan"):
+ filter_file(
+ "CMAKE_CXX_COMPILER clang++",
+ "CMAKE_CXX_COMPILER {0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix),
+ "CMakeLists.txt",
+ string=True,
+ )
if self.spec.satisfies("+opencl"):
filter_file(
"${ROCM_PATH}",
@@ -64,11 +97,48 @@ class Rpp(CMakePackage):
"cmake/FindOpenCL.cmake",
string=True,
)
+ if self.spec.satisfies("+add_tests"):
+ filter_file(
+ "${ROCM_PATH}/include/rpp",
+ self.spec.prefix.include.rpp,
+ "utilities/test_suite/HOST/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ "${ROCM_PATH}/lib",
+ self.spec.prefix.lib,
+ "utilities/test_suite/HOST/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ "${ROCM_PATH}/include/rpp",
+ self.spec.prefix.include.rpp,
+ "utilities/test_suite/HIP/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ "${ROCM_PATH}/lib",
+ self.spec.prefix.lib,
+ "utilities/test_suite/HIP/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ "${ROCM_PATH}/share/rpp/test/cmake",
+ self.spec.prefix.share.rpp.test.cmake,
+ "utilities/test_suite/HOST/CMakeLists.txt",
+ string=True,
+ )
+ filter_file(
+ "${ROCM_PATH}/share/rpp/test/cmake",
+ self.spec.prefix.share.rpp.test.cmake,
+ "utilities/test_suite/HIP/CMakeLists.txt",
+ string=True,
+ )
depends_on("cmake@3.5:", type="build")
depends_on("pkgconfig", type="build")
depends_on(Boost.with_default_variants)
- depends_on("boost@1.72.0:1.80.0")
+ depends_on("boost@1.72.0:1.85.0")
depends_on("bzip2")
depends_on("half")
depends_on("hwloc")
@@ -76,18 +146,48 @@ class Rpp(CMakePackage):
"opencv@4.5:"
"+calib3d+features2d+highgui+imgcodecs+imgproc"
"+video+videoio+flann+photo+objdetect",
- type="build",
+ type=("build", "link"),
when="@1.0:",
)
- depends_on("libjpeg-turbo", type="build")
+ depends_on("libjpeg-turbo", type=("build", "link"))
depends_on("rocm-openmp-extras")
conflicts("+opencl+hip")
with when("+hip"):
- depends_on("hip@5:")
+ with when("@5.7:"):
+ for ver in [
+ "5.7.0",
+ "5.7.1",
+ "6.0.0",
+ "6.0.2",
+ "6.1.0",
+ "6.1.1",
+ "6.1.2",
+ "6.2.0",
+ "6.2.1",
+ "6.2.4",
+ ]:
+ depends_on("hip@" + ver, when="@" + ver)
+ with when("@:1.2"):
+ depends_on("hip@5:")
with when("~hip"):
depends_on("rocm-opencl@5:")
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+add_tests"):
+ env.set("TURBO_JPEG_PATH", self.spec["libjpeg-turbo"].prefix)
+ if self.spec.satisfies("@6.1:"):
+ env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib)
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+asan"):
+ env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
+ env.set("ASAN_OPTIONS", "detect_leaks=0")
+ env.set("CFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
+ env.set("LDFLAGS", "-fuse-ld=lld")
+
def cmake_args(self):
spec = self.spec
args = []
diff --git a/var/spack/repos/builtin/packages/rr/package.py b/var/spack/repos/builtin/packages/rr/package.py
index c89b3a457c..6c4bdeb11f 100644
--- a/var/spack/repos/builtin/packages/rr/package.py
+++ b/var/spack/repos/builtin/packages/rr/package.py
@@ -16,6 +16,9 @@ class Rr(CMakePackage):
version("4.4.0", sha256="b2b24a3f67df47576126421746cd2942a458d2825faa76e8bb3ca43edffa03d3")
version("4.3.0", sha256="46933cdd706d71c3de05b55937c85ee055c08e67e5c1e6a1278c7feb187ca37a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gdb")
depends_on("git")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/rrdtool/package.py b/var/spack/repos/builtin/packages/rrdtool/package.py
index a7827fa6db..559acdf910 100644
--- a/var/spack/repos/builtin/packages/rrdtool/package.py
+++ b/var/spack/repos/builtin/packages/rrdtool/package.py
@@ -10,7 +10,7 @@ class Rrdtool(AutotoolsPackage):
"""RA tool for data logging and analysis."""
homepage = "https://oss.oetiker.ch/rrdtool"
- url = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.7.0.tar.gz"
+ url = "https://oss.oetiker.ch/rrdtool/pub/rrdtool-1.7.0.tar.gz"
license("GPL-2.0-or-later")
diff --git a/var/spack/repos/builtin/packages/rsbench/package.py b/var/spack/repos/builtin/packages/rsbench/package.py
index 449af96b28..6b4f041d80 100644
--- a/var/spack/repos/builtin/packages/rsbench/package.py
+++ b/var/spack/repos/builtin/packages/rsbench/package.py
@@ -14,10 +14,14 @@ class Rsbench(MakefilePackage):
homepage = "https://github.com/ANL-CESAR/RSBench"
url = "https://github.com/ANL-CESAR/RSBench/archive/v2.tar.gz"
+ version("13", sha256="4ddba1fe2f657103e5e50199b7dd2eab62069ddf17350489c18238908dd73b61")
version("12", sha256="2e437dbdaf7bf12bb9ade429d46a9e74fd519fc4686777a452770790d0546499")
version("2", sha256="1e97a38a863836e98cedc5cc669f8fdcaed905fafdc921d2bce32319b3e157ff")
version("0", sha256="95c06cf4cb6f396f9964d5e4b58a477bf9d7131cd39804480f1cb74e9310b271")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
tags = ["proxy-app"]
# To-Do: Add build support for other parallelism versions in v12:
@@ -31,24 +35,25 @@ class Rsbench(MakefilePackage):
@property
def build_targets(self):
+ spec = self.spec
targets = []
cflags = "-std=gnu99 -O3"
ldflags = "-lm"
- if self.compiler.name == "gcc":
+ if spec.satisfies("%gcc"):
cflags += " -ffast-math "
- elif self.compiler.name == "intel":
+ elif spec.satisfies("%intel"):
cflags += " -xhost -ansi-alias -no-prec-div "
- elif self.compiler.name == "pgi" or self.compiler.name == "nvhpc":
+ elif spec.satisfies("%nvhpc"):
cflags += " -fastsse "
- elif self.compiler.name == "arm":
+ elif spec.satisfies("%arm"):
cflags += " -ffast-math "
cflags += self.compiler.openmp_flag
- targets.append("CFLAGS={0}".format(cflags))
- targets.append("LDFLAGS={0}".format(ldflags))
+ targets.append(f"CFLAGS={cflags}")
+ targets.append(f"LDFLAGS={ldflags}")
return targets
diff --git a/var/spack/repos/builtin/packages/rsem/package.py b/var/spack/repos/builtin/packages/rsem/package.py
index 1038f21a63..10169e174b 100644
--- a/var/spack/repos/builtin/packages/rsem/package.py
+++ b/var/spack/repos/builtin/packages/rsem/package.py
@@ -19,6 +19,9 @@ class Rsem(MakefilePackage):
version("1.3.1", sha256="93c749a03ac16e94b1aab94d032d4fd5687d3261316ce943ecb89d3ae3ec2e11")
version("1.3.0", sha256="ecfbb79c23973e1c4134f05201f4bd89b0caf0ce4ae1ffd7c4ddc329ed4e05d2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("r", type=("build", "run"))
depends_on("perl", type=("build", "run"))
depends_on("python", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/rsl/package.py b/var/spack/repos/builtin/packages/rsl/package.py
index 8627f862d6..25b3a3bc90 100644
--- a/var/spack/repos/builtin/packages/rsl/package.py
+++ b/var/spack/repos/builtin/packages/rsl/package.py
@@ -17,6 +17,8 @@ class Rsl(AutotoolsPackage):
version("1.50", sha256="9e4e3fe45eb1e4aebea63255d4956b00eb69527044a83f182cde1b43510bd342")
+ depends_on("c", type="build") # generated
+
depends_on("bzip2")
depends_on("jpeg")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/rstart/package.py b/var/spack/repos/builtin/packages/rstart/package.py
index 14442b8692..a7e5c3c137 100644
--- a/var/spack/repos/builtin/packages/rstart/package.py
+++ b/var/spack/repos/builtin/packages/rstart/package.py
@@ -14,12 +14,14 @@ class Rstart(AutotoolsPackage, XorgPackage):
This software has been deprecated in favor of the X11 forwarding
provided in common ssh implementations."""
- homepage = "https://cgit.freedesktop.org/xorg/app/rstart"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/rstart"
xorg_mirror_path = "app/rstart-1.0.5.tar.gz"
version("1.0.6", sha256="28aa687437efeee70965a0878f9db79397cf691f4011268e16bc835627e23ec5")
version("1.0.5", sha256="5271c0c2675b4ad09aace7edddfdd137af10fc754afa6260d8eb5d0bba7098c7")
- depends_on("xproto")
+ depends_on("c", type="build")
+
+ depends_on("xproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/rstudio/package.py b/var/spack/repos/builtin/packages/rstudio/package.py
index e28b243e4d..09fa89332c 100644
--- a/var/spack/repos/builtin/packages/rstudio/package.py
+++ b/var/spack/repos/builtin/packages/rstudio/package.py
@@ -11,11 +11,14 @@ from spack.package import *
class Rstudio(CMakePackage):
"""RStudio is an integrated development environment (IDE) for R."""
- homepage = "www.rstudio.com/products/rstudio/"
+ homepage = "https://www.rstudio.com/products/rstudio/"
url = "https://github.com/rstudio/rstudio/archive/refs/tags/v1.4.1717.tar.gz"
version("1.4.1717", sha256="3af234180fd7cef451aef40faac2c7b52860f14a322244c1c7aede029814d261")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("notebook", default=False, description="Enable notebook support.")
depends_on("r@3.0.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/rsync/package.py b/var/spack/repos/builtin/packages/rsync/package.py
index aba593db40..3e8e97ce59 100644
--- a/var/spack/repos/builtin/packages/rsync/package.py
+++ b/var/spack/repos/builtin/packages/rsync/package.py
@@ -12,20 +12,50 @@ class Rsync(AutotoolsPackage):
"""An open source utility that provides fast incremental file transfer."""
homepage = "https://rsync.samba.org"
- url = "https://download.samba.org/pub/rsync/src/rsync-3.2.4.tar.gz"
+ url = "https://download.samba.org/pub/rsync/src/rsync-3.3.0.tar.gz"
license("GPL-3.0-or-later")
+ version("3.3.0", sha256="7399e9a6708c32d678a72a63219e96f23be0be2336e50fd1348498d07041df90")
version("3.2.7", sha256="4e7d9d3f6ed10878c58c5fb724a67dacf4b6aac7340b13e488fb2dc41346f2bb")
version("3.2.6", sha256="fb3365bab27837d41feaf42e967c57bd3a47bc8f10765a3671efd6a3835454d3")
version("3.2.5", sha256="2ac4d21635cdf791867bc377c35ca6dda7f50d919a58be45057fd51600c69aba")
- version("3.2.4", sha256="6f761838d08052b0b6579cf7f6737d93e47f01f4da04c5d24d3447b7f2a5fad1")
- version("3.2.3", sha256="becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e")
- version("3.2.2", sha256="644bd3841779507665211fd7db8359c8a10670c57e305b4aab61b4e40037afa8")
- version("3.1.3", sha256="55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0")
- version("3.1.2", sha256="ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2")
- version("3.1.1", sha256="7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621")
+ # Releases before 3.2.5 are deprecated because of CVE-2022-29154
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-29154
+ version(
+ "3.2.4",
+ sha256="6f761838d08052b0b6579cf7f6737d93e47f01f4da04c5d24d3447b7f2a5fad1",
+ deprecated=True,
+ )
+ version(
+ "3.2.3",
+ sha256="becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e",
+ deprecated=True,
+ )
+ version(
+ "3.2.2",
+ sha256="644bd3841779507665211fd7db8359c8a10670c57e305b4aab61b4e40037afa8",
+ deprecated=True,
+ )
+ version(
+ "3.1.3",
+ sha256="55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0",
+ deprecated=True,
+ )
+ version(
+ "3.1.2",
+ sha256="ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2",
+ deprecated=True,
+ )
+ version(
+ "3.1.1",
+ sha256="7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("zlib-api")
depends_on("popt")
depends_on("openssl", when="@3.2:")
diff --git a/var/spack/repos/builtin/packages/rsyslog/package.py b/var/spack/repos/builtin/packages/rsyslog/package.py
index 9722a270bd..eafa2d9c1b 100644
--- a/var/spack/repos/builtin/packages/rsyslog/package.py
+++ b/var/spack/repos/builtin/packages/rsyslog/package.py
@@ -10,18 +10,30 @@ class Rsyslog(AutotoolsPackage):
"""The rocket-fast Syslog Server."""
homepage = "https://www.rsyslog.com/"
- url = "https://github.com/rsyslog/rsyslog/archive/v8.2006.0.tar.gz"
+ url = "https://github.com/rsyslog/rsyslog/archive/refs/tags/v8.2006.0.tar.gz"
license("Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later", checked_by="tgamblin")
- version("8.2006.0", sha256="dc30a2ec02d5fac91d3a4f15a00641e0987941313483ced46592ab0b0d68f324")
- version("8.2004.0", sha256="b56b985fec076a22160471d389b7ff271909dfd86513dad31e401a775a6dfdc2")
- version("8.2002.0", sha256="b31d56311532335212ef2ea7be4501508224cb21f1bef9d262c6d78e21959ea1")
+ version("8.2410.0", sha256="0e4e6fcb1d72a1cb65438d85dd2bbf37a8f82115d7e271788535d1e7fbcf6838")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-24903
+ version(
+ "8.2006.0", sha256="dc30a2ec02d5fac91d3a4f15a00641e0987941313483ced46592ab0b0d68f324"
+ )
+ version(
+ "8.2004.0", sha256="b56b985fec076a22160471d389b7ff271909dfd86513dad31e401a775a6dfdc2"
+ )
+ version(
+ "8.2002.0", sha256="b31d56311532335212ef2ea7be4501508224cb21f1bef9d262c6d78e21959ea1"
+ )
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build")
depends_on("libestr")
depends_on("libfastjson")
depends_on("zlib-api")
@@ -34,6 +46,9 @@ class Rsyslog(AutotoolsPackage):
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
+ def autoreconf(self, spec, prefix):
+ Executable("./autogen.sh")()
+
def configure_args(self):
args = ["--with-systemdsystemunitdir=" + self.spec["rsyslog"].prefix.lib.systemd.system]
return args
diff --git a/var/spack/repos/builtin/packages/rt-tests/package.py b/var/spack/repos/builtin/packages/rt-tests/package.py
index f02be36b17..094370110d 100644
--- a/var/spack/repos/builtin/packages/rt-tests/package.py
+++ b/var/spack/repos/builtin/packages/rt-tests/package.py
@@ -20,6 +20,8 @@ class RtTests(MakefilePackage):
version("1.2", sha256="7ccde036059c87681a4b00e7138678d9551b1232113441f6edda31ea45452426")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
mkdirp(prefix.share.man)
diff --git a/var/spack/repos/builtin/packages/rtags/package.py b/var/spack/repos/builtin/packages/rtags/package.py
index 16641b714e..49e6424eed 100644
--- a/var/spack/repos/builtin/packages/rtags/package.py
+++ b/var/spack/repos/builtin/packages/rtags/package.py
@@ -19,6 +19,9 @@ class Rtags(CMakePackage):
version("2.20", sha256="9d73399421327147dc47b0ae5b95e12e8355f30291ad1954a78c0ef68b4b501f")
version("2.17", sha256="288fa49fedf647fb15e2ef10f0ebcd9de1a4ef1bbae3a3940870e136d32a3a60")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("llvm@3.3: +clang")
depends_on("zlib-api")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/rtmpdump/package.py b/var/spack/repos/builtin/packages/rtmpdump/package.py
index e8a5bc8432..718b48f434 100644
--- a/var/spack/repos/builtin/packages/rtmpdump/package.py
+++ b/var/spack/repos/builtin/packages/rtmpdump/package.py
@@ -18,6 +18,8 @@ class Rtmpdump(MakefilePackage):
version("2021-02-19", commit="f1b83c10d8beb43fcc70a6e88cf4325499f25857")
+ depends_on("c", type="build") # generated
+
variant("tls", default="openssl", description="TLS backend", values=("gnutls", "openssl"))
depends_on("openssl@:3", when="tls=openssl")
diff --git a/var/spack/repos/builtin/packages/ruby-hpricot/package.py b/var/spack/repos/builtin/packages/ruby-hpricot/package.py
index 1d30534f8e..e75068b6be 100644
--- a/var/spack/repos/builtin/packages/ruby-hpricot/package.py
+++ b/var/spack/repos/builtin/packages/ruby-hpricot/package.py
@@ -19,3 +19,5 @@ class RubyHpricot(RubyPackage):
license("MIT")
version("0.8.6", sha256="792f63cebe2f2b02058974755b4c8a3aef52e5daf37f779a34885d5ff2876017")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/ruby-narray/package.py b/var/spack/repos/builtin/packages/ruby-narray/package.py
index 5b976cd4e1..32c6759221 100644
--- a/var/spack/repos/builtin/packages/ruby-narray/package.py
+++ b/var/spack/repos/builtin/packages/ruby-narray/package.py
@@ -21,4 +21,6 @@ class RubyNarray(RubyPackage):
version("master", branch="master")
version("0.9.1.8", sha256="48814c6ebf2c4846fcf6cfd2705a15a97a608960c1676cb6c7b5c9254b0dd51b")
+ depends_on("c", type="build") # generated
+
depends_on("ruby@2.2:2", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/ruby-rake/package.py b/var/spack/repos/builtin/packages/ruby-rake/package.py
index 768b242791..b40db76100 100644
--- a/var/spack/repos/builtin/packages/ruby-rake/package.py
+++ b/var/spack/repos/builtin/packages/ruby-rake/package.py
@@ -18,4 +18,6 @@ class RubyRake(RubyPackage):
version("13.0.6", sha256="a39d555a08a3cbd6961a98d0bf222a01018683760664ede3c1610af5ca5de0cc")
version("13.0.1", sha256="d865329b5e0c38bd9d11ce70bd1ad6e0d5676c4eee74fd818671c55ec49d92fd")
+ depends_on("c", type="build") # generated
+
depends_on("ruby@2.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/ruby-rdiscount/package.py b/var/spack/repos/builtin/packages/ruby-rdiscount/package.py
index b85aa30bd2..a8c13d4a5a 100644
--- a/var/spack/repos/builtin/packages/ruby-rdiscount/package.py
+++ b/var/spack/repos/builtin/packages/ruby-rdiscount/package.py
@@ -17,4 +17,6 @@ class RubyRdiscount(RubyPackage):
version("2.2.0.2", sha256="a6956059fc61365c242373b03c5012582d7342842eae38fe59ebc1bc169744db")
+ depends_on("c", type="build") # generated
+
depends_on("ruby@1.9.3:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index 6c2b491f77..87efcab542 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -24,6 +24,10 @@ class Ruby(AutotoolsPackage, NMakePackage):
license("Ruby AND BSD-2-Clause AND MIT", checked_by="tgamblin")
+ version("3.3.5", sha256="3781a3504222c2f26cb4b9eb9c1a12dbf4944d366ce24a9ff8cf99ecbce75196")
+ version("3.3.4", sha256="fe6a30f97d54e029768f2ddf4923699c416cdbc3a6e96db3e2d5716c7db96a34")
+ version("3.3.2", sha256="3be1d100ebf2a0ce60c2cd8d22cd9db4d64b3e04a1943be2c4ff7b520f2bcb5b")
+ version("3.3.0", sha256="96518814d9832bece92a85415a819d4893b307db5921ae1f0f751a9a89a56b7d")
version("3.1.0", sha256="50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854")
version("3.0.2", sha256="5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1")
version("3.0.1", sha256="369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727")
@@ -34,12 +38,16 @@ class Ruby(AutotoolsPackage, NMakePackage):
version("2.5.3", sha256="9828d03852c37c20fa333a0264f2490f07338576734d910ee3fd538c9520846c")
version("2.2.0", sha256="7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system("autotools", "nmake", default="autotools")
- for _platform_condition in ("platform=linux", "platform=darwin", "platform=cray"):
+ for _platform_condition in ("platform=linux", "platform=darwin"):
with when(_platform_condition):
variant("openssl", default=True, description="Enable OpenSSL support")
variant("readline", default=False, description="Enable Readline support")
+ variant("yjit", default=False, description="Enable Rust JIT", when="@3.2:")
depends_on("pkgconfig", type="build")
depends_on("libffi")
depends_on("libx11", when="@:2.3")
@@ -47,9 +55,12 @@ class Ruby(AutotoolsPackage, NMakePackage):
depends_on("tk", when="@:2.3")
depends_on("readline", when="+readline")
depends_on("zlib-api")
+ depends_on("libyaml", when="@3:")
with when("+openssl"):
depends_on("openssl@:1")
depends_on("openssl@:1.0", when="@:2.3")
+ with when("+yjit"):
+ depends_on("rust@1.58:")
extendable = True
@@ -125,6 +136,7 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, SetupEnvi
args.append("--with-tk=%s" % self.spec["tk"].prefix)
if self.spec.satisfies("%fj"):
args.append("--disable-dtrace")
+ args.extend(self.enable_or_disable("yjit"))
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/runc/package.py b/var/spack/repos/builtin/packages/runc/package.py
index d1088eb205..8db11fea2e 100644
--- a/var/spack/repos/builtin/packages/runc/package.py
+++ b/var/spack/repos/builtin/packages/runc/package.py
@@ -15,10 +15,13 @@ class Runc(MakefilePackage):
license("Apache-2.0")
+ version("1.1.13", sha256="d20e76688ce0681dc687369e18b47aeffcfdac5184c978befa7ce5da35e797fe")
version("1.1.6", sha256="548506fc1de8f0a4790d8e937eeede17db4beb79c53d66acb4f7ec3edbc31668")
version("1.1.4", sha256="9f5972715dffb0b2371e4d678c1206cc8c4ec5eb80f2d48755d150bac49be35b")
version("1.0.2", sha256="740acb49e33eaf4958b5109c85363c1d3900f242d4cab47fbdbefa6f8f3c6909")
+ depends_on("c", type="build") # generated
+
depends_on("go", type="build")
depends_on("go-md2man", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py
index b05818412e..3ea40bfb5c 100644
--- a/var/spack/repos/builtin/packages/rust-bindgen/package.py
+++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py
@@ -2,26 +2,30 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import os
-
from spack.package import *
-class RustBindgen(Package):
+class RustBindgen(CargoPackage):
"""The rust programming language toolchain"""
- homepage = "https://www.rust-lang.org"
- url = "https://github.com/servo/rust-bindgen/archive/v0.20.5.tar.gz"
+ homepage = "https://rust-lang.github.io/rust-bindgen/"
+ url = "https://github.com/rust-lang/rust-bindgen/archive/v0.20.5.tar.gz"
license("BSD-3-Clause")
+ version("0.69.4", sha256="c02ce18b95c4e5021b95b8b461e5dbe6178edffc52a5f555cbca35b910559b5e")
+ version("0.69.3", sha256="5cdaa156403841e7b286ccbb7b31398c8b49b99f89ebf329457101819aa5eaf0")
+ version("0.69.2", sha256="78fbb8bd100e145d1effc982eaab21b555ccc3fc1cbe6e734f17cdfe5c33af32")
+ version("0.69.1", sha256="c10e2806786fb75f05ef32f3f03f4cb7e37bb8e06be5a4a0e95f974fdc567d87")
+ version("0.69.0", sha256="10790bb9863bff6a6f877b89d9d7cff7eac2ff0f45c1482f5edc9d9d0a82488d")
+ version("0.68.1", sha256="6a577026184a6f7a99b48f46f2074c83d272d3aadf91c7b94a4c6c34e6acd445")
+ version("0.66.1", sha256="adedec96f2a00ce835a7c31656e09d6aae6ef55df9ca3d8d65d995f8f2542388")
+ version("0.66.0", sha256="d2c8e8c1c9fbabecaa1146a02cc3bbbf968931136e7dc94614af06880d291685")
version("0.20.5", sha256="4f5236e7979d262c43267afba365612b1008b91b8f81d1efc6a8a2199d52bb37")
- extends("rust")
- depends_on("llvm")
+ depends_on("cxx", type="build") # generated
- def install(self, spec, prefix):
- env = dict(os.environ)
- env["LIBCLANG_PATH"] = os.path.join(spec["llvm"].prefix, "lib")
- cargo("install", "--root", prefix, env=env)
+ def build(self, spec, prefix):
+ # The carogopackage installer doesn't allow for an option to install from a subdir
+ # see: https://github.com/rust-lang/cargo/issues/7599
+ cargo("install", "--root", "out", "bindgen-cli")
diff --git a/var/spack/repos/builtin/packages/rust-bootstrap/package.py b/var/spack/repos/builtin/packages/rust-bootstrap/package.py
index ff1013419c..1603c9e853 100644
--- a/var/spack/repos/builtin/packages/rust-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/rust-bootstrap/package.py
@@ -16,11 +16,46 @@ class RustBootstrap(Package):
maintainers("alecbcs")
+ skip_version_audit = ["platform=windows"]
+
# List binary rust releases for multiple operating systems and architectures.
# These binary versions are not intended to stay up-to-date. Instead we
# should update these binary releases as bootstrapping requirements are
# modified by new releases of Rust.
rust_releases = {
+ "1.81.0": {
+ "darwin": {
+ "x86_64": "f74d8ad24cc3cbfb825da98a08d98319565e4d18ec2c3e9503bf0a33c81ba767",
+ "aarch64": "60a41dea4ae0f4006325745a6400e6fdc3e08ad3f924fac06f04c238cf23f4ec",
+ },
+ "linux": {
+ "x86_64": "4ca7c24e573dae2f382d8d266babfddc307155e1a0a4025f3bc11db58a6cab3e",
+ "aarch64": "ef4da9c1ecd56bbbb36f42793524cce3062e6a823ae22cb679a945c075c7755b",
+ "powerpc64le": "bf98b27de08a2fd5a2202a2b621b02bfde2a6fde397df2a735d018aeffcdc5e2",
+ },
+ },
+ "1.78.0": {
+ "darwin": {
+ "x86_64": "6c91ed3bd90253961fcb4a2991b8b22e042e2aaa9aba9f389f1e17008171d898",
+ "aarch64": "3be74c31ee8dc4f1d49e2f2888228de374138eaeca1876d0c1b1a61df6023b3b",
+ },
+ "linux": {
+ "x86_64": "1307747915e8bd925f4d5396ab2ae3d8d9c7fad564afbc358c081683d0f22e87",
+ "aarch64": "131eda738cd977fff2c912e5838e8e9b9c260ecddc1247c0fe5473bf09c594af",
+ "powerpc64le": "c5aedb12c552daa18072e386697205fb7b91cef1e8791fe6fb74834723851388",
+ },
+ },
+ "1.75.0": {
+ "darwin": {
+ "x86_64": "ad066e4dec7ae5948c4e7afe68e250c336a5ab3d655570bb119b3eba9cf22851",
+ "aarch64": "878ecf81e059507dd2ab256f59629a4fb00171035d2a2f5638cb582d999373b1",
+ },
+ "linux": {
+ "x86_64": "473978b6f8ff216389f9e89315211c6b683cf95a966196e7914b46e8cf0d74f6",
+ "aarch64": "30828cd904fcfb47f1ac43627c7033c903889ea4aca538f53dcafbb3744a9a73",
+ "powerpc64le": "2599cdfea5860b4efbceb7bca69845a96ac1c96aa50cf8261151e82280b397a0",
+ },
+ },
"1.73.0": {
"darwin": {
"x86_64": "ece9646bb153d4bc0f7f1443989de0cbcd8989a7d0bf3b7fb9956e1223954f0c",
@@ -98,7 +133,16 @@ class RustBootstrap(Package):
if os in rust_releases[release] and target in rust_releases[release][os]:
version(release, sha256=rust_releases[release][os][target])
+ # rust-ldd and libLLVM both depend on zlib, which is not vendored.
+ depends_on("zlib-api")
+ depends_on("zlib-ng +shared", when="^[virtuals=zlib-api] zlib-ng")
+ depends_on("zlib +shared", when="^[virtuals=zlib-api] zlib")
+ depends_on("patchelf@0.13:", when="platform=linux", type="build")
+
def url_for_version(self, version):
+ if self.os not in ("linux", "darwin"):
+ return None
+
# Allow maintainers to checksum multiple architectures via
# `spack checksum rust-bootstrap@1.70.0-darwin-aarch64`.
match = re.search(r"(\S+)-(\S+)-(\S+)", str(version))
@@ -113,6 +157,16 @@ class RustBootstrap(Package):
url = "https://static.rust-lang.org/dist/rust-{0}-{1}-{2}.tar.gz"
return url.format(version, target, os)
+ @run_before("install", when="platform=linux")
+ def fixup_rpaths(self):
+ # set rpaths of libLLVM.so and rust-ldd to zlib's lib directory
+ rpaths = self.spec["zlib-api"].libs.directories
+
+ for binary in find(self.stage.source_path, ["libLLVM.so.*", "rust-lld"]):
+ patchelf = Executable("patchelf")
+ patchelf("--add-rpath", ":".join(rpaths), binary)
+
def install(self, spec, prefix):
install_script = Executable("./install.sh")
- install_script(f"--prefix={prefix}")
+ install_args = [f"--prefix={prefix}", "--without=rust-docs"]
+ install_script(" ".join(install_args))
diff --git a/var/spack/repos/builtin/packages/rust-clap/package.py b/var/spack/repos/builtin/packages/rust-clap/package.py
new file mode 100644
index 0000000000..47d0f47221
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rust-clap/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2024 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.package import *
+
+
+class RustClap(CargoPackage):
+ """A full featured, fast Command Line Argument Parser for Rust"""
+
+ homepage = "http://docs.rs/clap"
+ url = "https://github.com/clap-rs/clap/archive/refs/tags/v4.5.10.tar.gz"
+
+ license("APACHE-2.0 OR MIT", checked_by="teaguesterling")
+
+ version("4.5.10", sha256="854c345f8e1af7067edd4777b5862843f1018b3037658d890619f89678cbc033")
+ version("4.5.9", sha256="8e0de093cd01b8a5be700ea807e937b36c54598a1902004ed64e0635a84c8f69")
+ version("4.5.8", sha256="9a00964ac907c1d5c0a87ab950ea9b4eec0fec0f5a73d2f5491570d5a9607823")
+ version("4.5.7", sha256="206001eda043fd7ba4167874ccd069387cfb98f7935cef44e77219c31e8e9ad6")
+ version("4.5.6", sha256="88763b098a791af71534ccf8e92bcf0b8c591bb0d2f36adabbad272906e79aca")
+ version("4.5.4", sha256="7023c210ff45a773b588448a803d05bf543cce6e28696967b7f16c0490faaec4")
+ version("4.5.3", sha256="01b966f804aba86acfd06ecd3f248c6e523227a157a790f6649a20338b0f2109")
+ version("4.5.2", sha256="10962660f531b5a1bbd4c7c8e96fdf4aef0ecbc8ad64ca3d9995b6e59ced765f")
+ version("4.5.1", sha256="f3cc654960dc16bf3212d7964e1033c1e4339acbd3ddb1b153ae731b7a9609e7")
+ version("4.5.0", sha256="c501afbe05a20d86c62206a66cc3c5e0d39e11bc10b000436a2166fc99a56e65")
diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py
index 2d5892aff7..d7226b16c9 100644
--- a/var/spack/repos/builtin/packages/rust/package.py
+++ b/var/spack/repos/builtin/packages/rust/package.py
@@ -18,13 +18,13 @@ class Rust(Package):
maintainers("alecbcs")
+ license("Apache-2.0 OR MIT")
+
# When adding a version of Rust you may need to add an additional version
# to rust-bootstrap as the minimum bootstrapping requirements increase.
# As a general rule of thumb Rust can be built with either the previous major
# version or the current version of the compiler as shown above.
-
- license("Apache-2.0 OR MIT")
-
+ #
# Pre-release versions.
# Note: If you plan to use these versions remember to install with
# `-n` to prevent Spack from failing due to failed checksums.
@@ -36,19 +36,42 @@ class Rust(Package):
version("nightly")
# Stable versions.
+ version("1.81.0", sha256="872448febdff32e50c3c90a7e15f9bb2db131d13c588fe9071b0ed88837ccfa7")
+ version("1.78.0", sha256="ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9")
+ version("1.76.0", sha256="9e5cff033a7f0d2266818982ad90e4d3e4ef8f8ee1715776c6e25073a136c021")
+ version("1.75.0", sha256="5b739f45bc9d341e2d1c570d65d2375591e22c2d23ef5b8a37711a0386abc088")
+ version("1.74.0", sha256="882b584bc321c5dcfe77cdaa69f277906b936255ef7808fcd5c7492925cf1049")
version("1.73.0", sha256="96d62e6d1f2d21df7ac8acb3b9882411f9e7c7036173f7f2ede9e1f1f6b1bb3a")
version("1.70.0", sha256="b2bfae000b7a5040e4ec4bbc50a09f21548190cb7570b0ed77358368413bd27c")
version("1.65.0", sha256="5828bb67f677eabf8c384020582b0ce7af884e1c84389484f7f8d00dd82c0038")
version("1.60.0", sha256="20ca826d1cf674daf8e22c4f8c4b9743af07973211c839b85839742314c838b7")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ variant(
+ "dev",
+ default=False,
+ description="Include rust developer tools like rustfmt, clippy, and rust-analyzer.",
+ )
+ variant("docs", default=False, description="Build Rust core documentation.")
+ variant("src", default=True, description="Include standard library source files.")
+
# Core dependencies
- depends_on("cmake@3.13.4:", type="build")
depends_on("curl+nghttp2")
depends_on("libgit2")
+ depends_on("libssh2")
depends_on("ninja", type="build")
depends_on("openssl")
depends_on("pkgconfig", type="build")
depends_on("python", type="build")
+ depends_on("zlib-api")
+
+ # cmake dependency comes from LLVM. Rust has their own fork of LLVM, with tags corresponding
+ # to each Rust release, so it's easy to loop through tags and grep for "cmake_minimum_required"
+ depends_on("cmake@3.4.3:", type="build", when="@:1.51")
+ depends_on("cmake@3.13.4:", type="build", when="@1.52:1.72")
+ depends_on("cmake@3.20.0:", type="build", when="@1.73:")
# Compiling Rust requires a previous version of Rust.
# The easiest way to bootstrap a Rust environment is to
@@ -61,24 +84,22 @@ class Rust(Package):
depends_on("rust-bootstrap@nightly", type="build", when="@nightly")
# Stable version dependencies
+ depends_on("rust-bootstrap", type="build")
depends_on("rust-bootstrap@1.59:1.60", type="build", when="@1.60")
depends_on("rust-bootstrap@1.64:1.65", type="build", when="@1.65")
depends_on("rust-bootstrap@1.69:1.70", type="build", when="@1.70")
depends_on("rust-bootstrap@1.72:1.73", type="build", when="@1.73")
-
- variant(
- "analysis",
- default=False,
- description="Outputs code analysis that can be consumed by other tools",
- )
- variant(
- "clippy",
- default=True,
- description="A bunch of lints to catch common mistakes and improve your Rust code.",
- )
- variant("docs", default=False, description="Build Rust documentation.")
- variant("rustfmt", default=True, description="Formatting tool for Rust code.")
- variant("src", default=True, description="Include standard library source files.")
+ depends_on("rust-bootstrap@1.73:1.74", type="build", when="@1.74")
+ depends_on("rust-bootstrap@1.74:1.75", type="build", when="@1.75")
+ depends_on("rust-bootstrap@1.77:1.78", type="build", when="@1.78")
+ depends_on("rust-bootstrap@1.80:1.81", type="build", when="@1.81")
+
+ # src/llvm-project/llvm/cmake/modules/CheckCompilerVersion.cmake
+ conflicts("%gcc@:7.3", when="@1.73:", msg="Host GCC version must be at least 7.4")
+ # https://github.com/rust-lang/llvm-project/commit/4d039a7a71899038b3bc6ed6fe5a8a48d915caa0
+ conflicts("%gcc@13:", when="@:1.63", msg="Rust<1.64 not compatible with GCC>=13")
+ conflicts("%intel", msg="Rust not compatible with Intel Classic compilers")
+ conflicts("%oneapi", msg="Rust not compatible with Intel oneAPI compilers")
extendable = True
executables = ["^rustc$", "^cargo$"]
@@ -86,15 +107,27 @@ class Rust(Package):
phases = ["configure", "build", "install"]
@classmethod
- def determine_version(csl, exe):
- output = Executable(exe)("--version", output=str, error=str)
+ def determine_spec_details(cls, prefix, exes_in_prefix):
+ rustc_candidates = [x for x in exes_in_prefix if os.path.basename(x) == "rustc"]
+ cargo_candidates = [x for x in exes_in_prefix if os.path.basename(x) == "cargo"]
+ # Both rustc and cargo must be present
+ if not (rustc_candidates and cargo_candidates):
+ return
+ output = Executable(rustc_candidates[0])("--version", output=str, error=str)
match = re.match(r"rustc (\S+)", output)
- return match.group(1) if match else None
+ if match:
+ version_str = match.group(1)
+ return Spec.from_detection(f"rust@{version_str}", external_path=prefix)
def setup_dependent_package(self, module, dependent_spec):
module.cargo = Executable(os.path.join(self.spec.prefix.bin, "cargo"))
def setup_build_environment(self, env):
+ # Manually instruct Cargo dependency libssh2-sys to build with
+ # the Spack installed libssh2 package. For more info see
+ # https://github.com/alexcrichton/ssh2-rs/issues/173
+ env.set("LIBSSH2_SYS_USE_PKG_CONFIG", "1")
+
# Manually inject the path of ar for build.
ar = which("ar", required=True)
env.set("AR", ar.path)
@@ -154,26 +187,22 @@ class Rust(Package):
# Convert opts to '--set key=value' format.
flags = [flag for opt in opts for flag in ("--set", opt)]
- # Include both cargo and rustdoc in minimal install to match
- # standard download of rust.
- tools = ["cargo", "rustdoc"]
+ # Core rust tools to install.
+ tools = ["cargo"]
# Add additional tools as directed by the package variants.
- if spec.satisfies("+analysis"):
- tools.append("analysis")
-
- if spec.satisfies("+clippy"):
- tools.append("clippy")
+ if spec.satisfies("+dev"):
+ tools.extend(["clippy", "rustdoc", "rustfmt", "rust-analyzer"])
if spec.satisfies("+src"):
tools.append("src")
- if spec.satisfies("+rustfmt"):
- tools.append("rustfmt")
-
# Compile tools into flag for configure.
flags.append(f"--tools={','.join(tools)}")
+ # Use vendored resources to perform offline build.
+ flags.append("--enable-vendor")
+
configure(*flags)
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/s4pred/package.py b/var/spack/repos/builtin/packages/s4pred/package.py
new file mode 100644
index 0000000000..b25f4aa16f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/s4pred/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class S4pred(Package):
+ """A tool for accurate prediction of a protein's secondary structure from only its amino
+ acid sequence with no evolutionary information"""
+
+ homepage = "http://bioinf.cs.ucl.ac.uk/psipred/"
+ url = "https://github.com/psipred/s4pred/archive/refs/tags/v1.2.0.tar.gz"
+
+ license("GPL-3.0-only", checked_by="A-N-Other")
+
+ version("1.2.0", sha256="133d4710cef8c58fa603bdedcd41dbd060d9afc029dd181a5bd43f6539783a89")
+
+ depends_on("python", type="run")
+
+ depends_on("py-torch@1.5.1:", type="run")
+ depends_on("py-biopython@1.78:", type="run")
+
+ resource(
+ name="weights",
+ url="http://bioinfadmin.cs.ucl.ac.uk/downloads/s4pred/weights.tar.gz",
+ sha256="6a91e887c01bac41b11249ae098fe0d43bcb9e3e15c746758a24a3299fe20283",
+ )
+
+ def install(self, spec, prefix):
+ # This package has no setup.py, so...
+ mkdirp(prefix.bin)
+ # unpack resources and correct hardcoded location
+ install_tree("weights", prefix.weights)
+ filter_file("/weights/", "/../weights/", "run_model.py")
+ # add shebang and ensure +x for the main script
+ sed = Executable("sed")
+ sed("-i", rf'1 i\#! {self.spec["python"].command.path}\n', "run_model.py")
+ os.chmod("run_model.py", 0o755)
+ # install files and make convenience symlink
+ install("*.py", prefix.bin)
+ os.symlink(join_path(prefix.bin, "run_model.py"), join_path(prefix.bin, "s4pred"))
diff --git a/var/spack/repos/builtin/packages/sabre/package.py b/var/spack/repos/builtin/packages/sabre/package.py
index 341e026645..61829b80ad 100644
--- a/var/spack/repos/builtin/packages/sabre/package.py
+++ b/var/spack/repos/builtin/packages/sabre/package.py
@@ -24,6 +24,8 @@ class Sabre(MakefilePackage):
version("2013-09-27", commit="039a55e500ba07b7e6432ea6ec2ddcfb3471d949")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/saga-gis/package.py b/var/spack/repos/builtin/packages/saga-gis/package.py
index ed313b19cc..2322be0f63 100644
--- a/var/spack/repos/builtin/packages/saga-gis/package.py
+++ b/var/spack/repos/builtin/packages/saga-gis/package.py
@@ -39,6 +39,9 @@ class SagaGis(AutotoolsPackage, SourceforgePackage):
version("2.3.1", branch="release-2-3-1", deprecated=True)
version("2.3.0", branch="release-2-3-0", deprecated=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("gui", default=True, description="Build GUI and interactive SAGA tools")
variant("odbc", default=True, description="Build with ODBC support")
diff --git a/var/spack/repos/builtin/packages/sailfish/package.py b/var/spack/repos/builtin/packages/sailfish/package.py
index c6e65a2c00..e5af8d79d7 100644
--- a/var/spack/repos/builtin/packages/sailfish/package.py
+++ b/var/spack/repos/builtin/packages/sailfish/package.py
@@ -17,6 +17,9 @@ class Sailfish(CMakePackage):
version("0.10.1", sha256="a0d6d944382f2e07ffbfd0371132588e2f22bb846ecfc3d3435ff3d81b30d6c6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.55:")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/salmon-tddft/package.py b/var/spack/repos/builtin/packages/salmon-tddft/package.py
index 55da0a2cd5..38803fe530 100644
--- a/var/spack/repos/builtin/packages/salmon-tddft/package.py
+++ b/var/spack/repos/builtin/packages/salmon-tddft/package.py
@@ -23,6 +23,9 @@ class SalmonTddft(CMakePackage):
version("2.0.0", sha256="c3bb80bc5d338cba21cd8f345acbf2f2d81ef75af069a0a0ddbdc0acf358456c")
version("1.2.1", sha256="a5045149e49abe9dd9edefe00cd1508a1323081bc3d034632176b728effdbaeb")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI")
variant("libxc", default=False, description="Enable libxc")
variant("scalapack", default=False, description="Enable scalapack")
diff --git a/var/spack/repos/builtin/packages/salmon/package.py b/var/spack/repos/builtin/packages/salmon/package.py
index 9b90af0ff0..b4dccd0497 100644
--- a/var/spack/repos/builtin/packages/salmon/package.py
+++ b/var/spack/repos/builtin/packages/salmon/package.py
@@ -15,6 +15,7 @@ class Salmon(CMakePackage):
license("GPL-3.0-only")
+ version("1.10.3", sha256="a053fba63598efc4ade3684aa2c8e8e2294186927d4fcdf1041c36edc2aa0871")
version("1.10.2", sha256="976989182160fef3afb4429ee8b85d8dd39ed6ca212bb14d6a65cde0e985fb98")
version("1.9.0", sha256="450d953a5c43fe63fd745733f478d3fbaf24d926cb52731fd38ee21c4990d613")
version("1.4.0", sha256="6d3e25387450710f0aa779a1e9aaa9b4dec842324ff8551d66962d7c7606e71d")
@@ -23,6 +24,9 @@ class Salmon(CMakePackage):
version("0.9.1", sha256="3a32c28d217f8f0af411c77c04144b1fa4e6fd3c2f676661cc875123e4f53520")
version("0.8.2", sha256="299168e873e71e9b07d63a84ae0b0c41b0876d1ad1d434b326a5be2dce7c4b91")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant(
"build_type",
default="RELEASE",
@@ -55,6 +59,8 @@ class Salmon(CMakePackage):
depends_on("bzip2")
depends_on("libdivsufsort")
depends_on("staden-io-lib~curl")
+ # docs suggest libdeflate is slightly faster
+ depends_on("staden-io-lib~curl+libdeflate~shared@1.15:", when="@1.10.3:")
depends_on("libgff")
depends_on("pkgconfig")
depends_on("curl", when="@0.14.1:")
@@ -66,6 +72,11 @@ class Salmon(CMakePackage):
resources = [
(
+ "1.10.3",
+ "pufferfish",
+ "52b6699de0d33814b73edb3455175568c2330d8014be017dce7b564e54134860",
+ ),
+ (
"1.10.2",
"pufferfish",
"f225b74833f71dcf767a565345224357fb091f90ce79717abc836814d9ccd101",
@@ -88,7 +99,7 @@ class Salmon(CMakePackage):
for ver, repo, checksum in resources:
resource(
- name="rapmap",
+ name=repo,
url="https://github.com/COMBINE-lab/{0}/archive/salmon-v{1}.zip".format(repo, ver),
sha256=checksum,
placement="external",
@@ -132,6 +143,11 @@ class Salmon(CMakePackage):
)
filter_file("curl -k.*", "", "scripts/fetchPufferfish.sh")
+ if self.spec.satisfies("@1.10.3:"):
+ findstadenio_module = join_path("cmake", "Modules", "Findlibstadenio.cmake")
+ filter_file("PACKAGE_VERSION", "IOLIB_VERSION", findstadenio_module, string=True)
+ filter_file("io_lib_config.h", "version.h", findstadenio_module, string=True)
+
def cmake_args(self):
args = ["-DBOOST_ROOT=%s" % self.spec["boost"].prefix]
diff --git a/var/spack/repos/builtin/packages/salome-configuration/package.py b/var/spack/repos/builtin/packages/salome-configuration/package.py
index 13f15926ac..9abb0fe942 100644
--- a/var/spack/repos/builtin/packages/salome-configuration/package.py
+++ b/var/spack/repos/builtin/packages/salome-configuration/package.py
@@ -18,6 +18,12 @@ class SalomeConfiguration(Package):
homepage = "https://www.salome-platform.org"
git = "https://git.salome-platform.org/gitpub/tools/configuration.git"
+ version("9.13.0", tag="V9_13_0", commit="1c9b00436fc0e8264742460ebc102ae7d1970e97")
+ version("9.12.0", tag="V9_12_0", commit="61ed79521f31363ba4aeedcd59812a4838c076aa")
+ version("9.11.0", tag="V9_11_0", commit="33fc859a523e9f84cabaae2c55fdc64d1be11ec0")
+ version("9.10.0", tag="V9_10_0", commit="25f724f7a6c0000330a40c3851dcd8bc2493e1fa")
+ version("9.9.0", tag="V9_9_0", commit="5e61c7330cb2e0ff39e0bf4ba7b65d1d26c824ac")
+ version("9.8.0", tag="V9_8_0", commit="f1b2929d32953ac4d2056d564dab62e2e8d7c2a5")
version("9.7.0", tag="V9_7_0", commit="b1430e72bc252867289b45de9a94041841fade06")
version("9.6.0", tag="V9_6_0", commit="02e621fc9e24b4eab20f82ef921859013bf024b4")
version("9.5.0", tag="V9_5_0", commit="96ecd4927604943dc80ead4aaf732a9d0215b70c")
@@ -25,7 +31,7 @@ class SalomeConfiguration(Package):
version("9.3.0", tag="V9_3_0", commit="de7bac0ee58007a9501fffa7c1488de029b19cdc")
patch("SalomeMacros.patch", working_dir="./cmake")
- patch("FindSalomeHDF5.patch", working_dir="./cmake")
+ patch("FindSalomeHDF5.patch", working_dir="./cmake", when="@:9.7.0")
def setup_dependent_build_environment(self, env, dependent_spec):
env.set("CONFIGURATION_ROOT_DIR", self.prefix)
diff --git a/var/spack/repos/builtin/packages/salome-med/package.py b/var/spack/repos/builtin/packages/salome-med/package.py
index 19c0eca618..a96950b500 100644
--- a/var/spack/repos/builtin/packages/salome-med/package.py
+++ b/var/spack/repos/builtin/packages/salome-med/package.py
@@ -20,28 +20,32 @@ class SalomeMed(CMakePackage):
license("LGPL-3.0-only")
+ version(
+ "5.0.0",
+ sha256="267e76d0c67ec51c10e3199484ec1508baa8d5ed845c628adf660529dce7a3d4",
+ url="ftp://ftp.cea.fr/pub/salome/prerequisites/med-5.0.0.tar.bz2",
+ )
+ version("4.1.1", sha256="a082b705d1aafe95d3a231d12c57f0b71df554c253e190acca8d26fc775fb1e6")
version("4.1.0", sha256="847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce")
version("4.0.0", sha256="a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004")
version("3.3.1", sha256="856e9c4bb75eb0cceac3d5a5c65b1ce52fb3c46b9182920e1c9f34ae69bd2d5f")
version("3.2.0", sha256="d52e9a1bdd10f31aa154c34a5799b48d4266dc6b4a5ee05a9ceda525f2c6c138")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=False, description="Enable MPI")
variant("static", default=False, description="Enable static library build")
variant("fortran", default=False, description="Enable Fortran")
+ variant("int64", default=False, description="Use 64-bit integers as indices.")
depends_on("mpi", when="+mpi")
- depends_on("hdf5@1.10.3+mpi", when="@4.1.0+mpi")
- depends_on("hdf5@1.10.3~mpi", when="@4.1.0~mpi")
-
- depends_on("hdf5@1.10.3+mpi", when="@4.0.0+mpi")
- depends_on("hdf5@1.10.3~mpi", when="@4.0.0~mpi")
-
- depends_on("hdf5@1.8.14+mpi", when="@3.3.1+mpi")
- depends_on("hdf5@1.8.14~mpi", when="@3.3.1~mpi")
-
- depends_on("hdf5@1.8.14+mpi", when="@3.2.0+mpi")
- depends_on("hdf5@1.8.14~mpi", when="@3.2.0~mpi")
+ for _mpi_variant in ("~mpi", "+mpi"):
+ depends_on(f"hdf5@1.12{_mpi_variant}", when=f"@5:{_mpi_variant}")
+ depends_on(f"hdf5@1.10{_mpi_variant}", when=f"@4{_mpi_variant}")
+ depends_on(f"hdf5@1.8{_mpi_variant}", when=f"@3{_mpi_variant}")
patch("MAJ_400_410_champs.patch", when="@4.1.0+static", working_dir="./tools/medimport/4.0.0")
@@ -81,6 +85,11 @@ class SalomeMed(CMakePackage):
else:
options.extend(["-DCMAKE_Fortran_COMPILER="])
+ if "+int64" in spec:
+ options.append("-DMED_MEDINT_TYPE=long")
+ else:
+ options.append("-DMED_MEDINT_TYPE=int")
+
options.extend(
[
"-DMEDFILE_BUILD_PYTHON=OFF",
diff --git a/var/spack/repos/builtin/packages/salome-medcoupling/package.py b/var/spack/repos/builtin/packages/salome-medcoupling/package.py
index 629141d672..2c24579706 100644
--- a/var/spack/repos/builtin/packages/salome-medcoupling/package.py
+++ b/var/spack/repos/builtin/packages/salome-medcoupling/package.py
@@ -20,15 +20,24 @@ class SalomeMedcoupling(CMakePackage):
license("LGPL-2.1-or-later")
+ version("9.13.0", tag="V9_13_0", commit="8bea530c92cd907ae859ef11fd95b2db54b2894a")
+ version("9.12.0", tag="V9_12_0", commit="28e485bde1c26dc835ec7acf449b1d519997ddce")
+ version("9.11.0", tag="V9_11_0", commit="1b5fb5650409b0ad3a61da3215496f2adf2dae02")
+ version("9.10.0", tag="V9_10_0", commit="fe2e38d301902c626f644907e00e499552bb2fa5")
+ version("9.9.0", tag="V9_9_0", commit="5b2a9cc1cc18fffd5674a589aacf368008983b45")
+ version("9.8.0", tag="V9_8_0", commit="8a82259c9a9228c54efeddd52d4afe6c0e397c30")
version("9.7.0", tag="V9_7_0", commit="773434a7f2a5cbacc2f50e93ea6d6a48a157acd9")
version("9.6.0", tag="V9_6_0", commit="2c14a65b40252770b3503945405f5bdb2f29f8e2")
version("9.5.0", tag="V9_5_0", commit="dd75474d950baf8ff862b03cb1685f2a2d562846")
version("9.4.0", tag="V9_4_0", commit="984fe46c4076f08f42ef43e290e3cd1aea5a8182")
version("9.3.0", tag="V9_3_0", commit="32521cd6e5c113de5db7953a80149e5ab492120a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("static", default=False, description="Enable static library build")
variant("mpi", default=False, description="Enable MPI")
- variant("in64", default=False, description="Enable 64 bits indexes")
+ variant("int64", default=False, description="Use 64 bits indices")
variant("partitioner", default=False, description="Enable partitioner")
variant("metis", default=False, description="Enable Metis")
variant("scotch", default=False, description="Enable Scotch")
@@ -46,35 +55,25 @@ class SalomeMedcoupling(CMakePackage):
depends_on("scotch@6.0.4:", when="+scotch")
depends_on("mpi", when="+mpi")
- depends_on("salome-configuration@9.7.0", when="@9.7.0")
- depends_on("salome-med@4.1.0+mpi+static", when="@9.7.0+mpi+static")
- depends_on("salome-med@4.1.0+mpi", when="@9.7.0+mpi")
- depends_on("salome-med@4.1.0+static", when="@9.7.0~mpi+static")
- depends_on("salome-med@4.1.0", when="@9.7.0~mpi")
-
- depends_on("salome-configuration@9.6.0", when="@9.6.0")
- depends_on("salome-med@4.1.0+mpi+static", when="@9.6.0+mpi+static")
- depends_on("salome-med@4.1.0+mpi", when="@9.6.0+mpi")
- depends_on("salome-med@4.1.0+static", when="@9.6.0~mpi+static")
- depends_on("salome-med@4.1.0", when="@9.6.0~mpi")
-
- depends_on("salome-configuration@9.5.0", when="@9.5.0")
- depends_on("salome-med@4.1.0+mpi+static", when="@9.5.0+mpi+static")
- depends_on("salome-med@4.1.0+mpi", when="@9.5.0+mpi")
- depends_on("salome-med@4.1.0+static", when="@9.5.0~mpi+static")
- depends_on("salome-med@4.1.0", when="@9.5.0~mpi")
-
- depends_on("salome-configuration@9.4.0", when="@9.4.0")
- depends_on("salome-med@4.0.0+mpi+static", when="@9.4.0+mpi+static")
- depends_on("salome-med@4.0.0+mpi", when="@9.4.0+mpi")
- depends_on("salome-med@4.0.0+static", when="@9.4.0~mpi+static")
- depends_on("salome-med@4.0.0", when="@9.4.0~mpi")
-
- depends_on("salome-configuration@9.3.0", when="@9.3.0")
- depends_on("salome-med@4.0.0+mpi+static", when="@9.3.0+mpi+static")
- depends_on("salome-med@4.0.0+mpi", when="@9.3.0+mpi")
- depends_on("salome-med@4.0.0+static", when="@9.3.0~mpi+static")
- depends_on("salome-med@4.0.0", when="@9.3.0~mpi")
+ for _min_ver in range(3, 14):
+ _ver = f"9.{_min_ver}.0"
+ depends_on(f"salome-configuration@{_ver}", when=f"@{_ver}")
+
+ for _mpi_variant in ("~mpi", "+mpi"):
+ for _static_variant in ("~static", "+static"):
+ for _int64_variant in ("~int64", "+int64"):
+ depends_on(
+ f"salome-med@4.1.1{_mpi_variant}{_static_variant}{_int64_variant}",
+ when=f"@9.11.0:{_mpi_variant}{_static_variant}{_int64_variant}",
+ )
+ depends_on(
+ f"salome-med@4.1.0{_mpi_variant}{_static_variant}{_int64_variant}",
+ when=f"@9.5.0:9.10.0{_mpi_variant}{_static_variant}{_int64_variant}",
+ )
+ depends_on(
+ f"salome-med@4.0.0{_mpi_variant}{_static_variant}{_int64_variant}",
+ when=f"@9.3.0:9.4.0{_mpi_variant}{_static_variant}{_int64_variant}",
+ )
def check(self):
pass
@@ -87,13 +86,9 @@ class SalomeMedcoupling(CMakePackage):
env.set("SCOTCH_ROOT_DIR", self.spec["scotch"].prefix)
def setup_run_environment(self, env):
+ python_ver = self.spec["python"].version.up_to(2)
env.prepend_path(
- "PYTHONPATH",
- join_path(
- self.prefix.lib,
- "python{0}".format(self.spec["python"].version.up_to(2)),
- "site-packages",
- ),
+ "PYTHONPATH", join_path(self.prefix.lib, f"python{python_ver}", "site-packages")
)
def cmake_args(self):
@@ -110,7 +105,7 @@ class SalomeMedcoupling(CMakePackage):
else:
options.extend(["-DMEDCOUPLING_USE_MPI=OFF", "-DSALOME_USE_MPI=OFF"])
- if "+in64" in spec:
+ if "+int64" in spec:
options.extend(["-DMEDCOUPLING_USE_64BIT_IDS=ON"])
else:
options.extend(["-DMEDCOUPLING_USE_64BIT_IDS=OFF"])
diff --git a/var/spack/repos/builtin/packages/sam2p/package.py b/var/spack/repos/builtin/packages/sam2p/package.py
index 7b90b5b59d..b87e5abec7 100644
--- a/var/spack/repos/builtin/packages/sam2p/package.py
+++ b/var/spack/repos/builtin/packages/sam2p/package.py
@@ -20,6 +20,9 @@ class Sam2p(Package):
version("master", branch="master")
version("2021-05-04", commit="f3e9cc0a2df1880a63f9f37c96e3595bca890cfa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
compile_sh = Executable("./compile.sh")
compile_sh()
diff --git a/var/spack/repos/builtin/packages/sambamba/package.py b/var/spack/repos/builtin/packages/sambamba/package.py
index c8600dc279..c436775d13 100644
--- a/var/spack/repos/builtin/packages/sambamba/package.py
+++ b/var/spack/repos/builtin/packages/sambamba/package.py
@@ -18,6 +18,8 @@ class Sambamba(Package):
"0.6.6", tag="v0.6.6", commit="63cfd5c7b3053e1f7045dec0b5a569f32ef73d06", submodules=True
)
+ depends_on("c", type="build") # generated
+
depends_on("ldc~shared", type=("build", "link"))
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/samblaster/package.py b/var/spack/repos/builtin/packages/samblaster/package.py
index 9191ab9ae0..7814c4f4e4 100644
--- a/var/spack/repos/builtin/packages/samblaster/package.py
+++ b/var/spack/repos/builtin/packages/samblaster/package.py
@@ -15,9 +15,12 @@ class Samblaster(MakefilePackage):
license("MIT")
+ version("0.1.26", sha256="6b42a53d64a3ed340852028546693a24c860f236fd70e90c2b24fde9dcc4fd63")
version("0.1.24", sha256="72c42e0a346166ba00152417c82179bd5139636fea859babb06ca855af93d11f")
version("0.1.23", sha256="0d35ce629771946e3d6fc199025747054e5512bffa1ba4446ed81160fffee57a")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("samblaster", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/samrai/package.py b/var/spack/repos/builtin/packages/samrai/package.py
index 2495476b13..99239717b9 100644
--- a/var/spack/repos/builtin/packages/samrai/package.py
+++ b/var/spack/repos/builtin/packages/samrai/package.py
@@ -71,6 +71,10 @@ class Samrai(AutotoolsPackage):
depends_on(Boost.with_default_variants, when="@3.0.0:3.11.99", type="build")
depends_on("silo+mpi", when="+silo")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
# don't build SAMRAI 3+ with tools with gcc
patch("no-tool-build.patch", when="@3.0.0:%gcc")
diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py
index 2561b563ad..6328bdf90a 100644
--- a/var/spack/repos/builtin/packages/samtools/package.py
+++ b/var/spack/repos/builtin/packages/samtools/package.py
@@ -18,6 +18,7 @@ class Samtools(Package):
license("MIT")
+ version("1.19.2", sha256="71f60499668e4c08e7d745fbff24c15cc8a0977abab1acd5d2bb419bdb065e96")
version("1.19", sha256="fa6b3b18e20851b6f3cb55afaf3205d02fcb79dae3b849fcf52e8fc10ff08b83")
version("1.18", sha256="d686ffa621023ba61822a2a50b70e85d0b18e79371de5adb07828519d3fc06e1")
version("1.17", sha256="3adf390b628219fd6408f14602a4c4aa90e63e18b395dad722ab519438a2a729")
@@ -43,12 +44,16 @@ class Samtools(Package):
url="https://github.com/samtools/samtools/archive/0.1.8.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("ncurses")
depends_on("perl", type="run")
depends_on("python", type="run")
# htslib became standalone @1.3.1, must use corresponding version
+ depends_on("htslib@1.19.1", when="@1.19.2")
depends_on("htslib@1.19", when="@1.19")
depends_on("htslib@1.18", when="@1.18")
depends_on("htslib@1.17", when="@1.17")
diff --git a/var/spack/repos/builtin/packages/sandbox/package.py b/var/spack/repos/builtin/packages/sandbox/package.py
index 2bd88f2295..a24c819a38 100644
--- a/var/spack/repos/builtin/packages/sandbox/package.py
+++ b/var/spack/repos/builtin/packages/sandbox/package.py
@@ -17,4 +17,6 @@ class Sandbox(AutotoolsPackage):
version("2.25", sha256="24055986a1ed9b933da608e41e3284ee53c5a724f3c2457009f8e09e9c581ca8")
version("2.12", sha256="265a490a8c528237c55ad26dfd7f62336fa5727c82358fc9cfbaa2e52c47fc50")
+ depends_on("c", type="build") # generated
+
depends_on("gawk", type="build")
diff --git a/var/spack/repos/builtin/packages/sartre/package.py b/var/spack/repos/builtin/packages/sartre/package.py
index e22e690920..d9a4e23216 100644
--- a/var/spack/repos/builtin/packages/sartre/package.py
+++ b/var/spack/repos/builtin/packages/sartre/package.py
@@ -21,6 +21,10 @@ class Sartre(CMakePackage):
version("1.39", sha256="82ed77243bea61bb9335f705c4b132f0b53d0de17c26b89389fa9cd3adcef44d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
parallel = False
depends_on("gsl")
diff --git a/var/spack/repos/builtin/packages/sarus/package.py b/var/spack/repos/builtin/packages/sarus/package.py
index 8fe36fdef9..eba4e9ca1e 100644
--- a/var/spack/repos/builtin/packages/sarus/package.py
+++ b/var/spack/repos/builtin/packages/sarus/package.py
@@ -31,6 +31,8 @@ class Sarus(CMakePackage):
version("1.0.1", commit="abb8c314a196207204826f7b60e5064677687405")
version("1.0.0", commit="d913b1d0ef3729f9f41ac5bd06dd5615c407ced4")
+ depends_on("cxx", type="build") # generated
+
variant(
"ssh",
default=False,
diff --git a/var/spack/repos/builtin/packages/satsuma2/package.py b/var/spack/repos/builtin/packages/satsuma2/package.py
index 3dfa800cf0..996783d4a0 100644
--- a/var/spack/repos/builtin/packages/satsuma2/package.py
+++ b/var/spack/repos/builtin/packages/satsuma2/package.py
@@ -19,6 +19,9 @@ class Satsuma2(CMakePackage):
version("2021-03-04", commit="37c5f386819614cd3ce96016b423ddc4df1d86ec")
version("2016-11-22", commit="da694aeecf352e344b790bea4a7aaa529f5b69e6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
maintainers("snehring")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/saws/package.py b/var/spack/repos/builtin/packages/saws/package.py
index 55514d4b02..365f5be296 100644
--- a/var/spack/repos/builtin/packages/saws/package.py
+++ b/var/spack/repos/builtin/packages/saws/package.py
@@ -19,4 +19,6 @@ class Saws(AutotoolsPackage):
version("0.1.1", tag="v0.1.1", commit="c483e262b22bdf83ab026d20c35f0e09465d768d")
version("0.1.0", tag="v0.1.0", commit="312ccc1698cf6c489c0d1eff6db46f54bd9031b7")
+ depends_on("c", type="build") # generated
+
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/sbcl-bootstrap/package.py b/var/spack/repos/builtin/packages/sbcl-bootstrap/package.py
new file mode 100644
index 0000000000..3631f2d400
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sbcl-bootstrap/package.py
@@ -0,0 +1,115 @@
+# Copyright 2013-2024 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.package import *
+from spack.util.environment import set_env
+
+
+class SbclBootstrap(Package):
+ """Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler.
+ It is open source / free software, with a permissive license. In addition
+ to the compiler and runtime system for ANSI Common Lisp, it provides an
+ interactive environment including a debugger, a statistical profiler, a
+ code coverage tool, and many other extensions.
+ """
+
+ homepage = "https://www.sbcl.org/"
+
+ maintainers("ashermancinelli")
+
+ # sbcl-bootstrap is not available on Windows, but is depended on by sbcl:
+ skip_version_audit = ["platform=windows"]
+
+ # NOTE: The sbcl homepage lists
+ # while the sourceforge repo lists "Public Domain, MIT License", the
+ # COPYING file distributed with the source code contains this message:
+ #
+ # Thus, there are no known obstacles to copying, using, and modifying
+ # SBCL freely, as long as copyright notices of MIT, Symbolics, Xerox and
+ # Gerd Moellmann are retained.
+ #
+ # MIT seems the most appropriate, but if we can add more context to this
+ # license message, then we should.
+ license("MIT", checked_by="ashermancinelli")
+
+ # By checking objdump -T of the sbcl binary in each prebuilt tarball, I
+ # found the latest reference to glibc for each version.
+ sbcl_releases = {
+ "2.4.0": {
+ "darwin": {"arm64": "1d01fac2d9748f769c9246a0a11a2c011d7843337f8f06ca144f5a500e10c117"}
+ },
+ "2.3.11": {
+ "linux": {
+ "x86_64": "98784b04f68882b887984242eef73dbb092ec5c778dd536b2c60846715e03f3c",
+ "min_glibc": "2.34",
+ }
+ },
+ # TODO(ashermancinelli): I don't have a machine to test this on, but the binaries are
+ # available.
+ # "2.2.9": {
+ # "darwin": {
+ # "x86_64": "0000000000000000000000000000000000000000000000000000000000000000"
+ # }
+ # },
+ "2.0.11": {
+ "linux": {
+ "x86_64": "b7e61bc6b8d238f8878e660bc0635e99c2ea1255bfd6153d702fe9a00f8138fd",
+ "min_glibc": "2.28",
+ }
+ },
+ "1.4.16": {
+ "linux": {
+ "x86_64": "df3d905d37656a7eeeba72d703577afc94a21d756a4dde0949310200f82ce575",
+ "min_glibc": "2.14",
+ }
+ },
+ "1.4.2": {
+ "linux": {
+ "aarch64": "ddac6499f36c18ecbce9822a53ef3914c0def5276a457446a456c62999b16d36",
+ "min_glibc": "2.17",
+ }
+ },
+ "1.3.21": {
+ "linux": {
+ "x86_64": "c1c3e17e1857fb1c22af575941be5cd1d5444b462397b1b3c9f3877aee2e814b",
+ "min_glibc": "2.3",
+ }
+ },
+ }
+
+ os = platform.system().lower()
+ target = platform.machine().lower()
+
+ for ver in sbcl_releases:
+ if os in sbcl_releases[ver]:
+ if target in sbcl_releases[ver][os]:
+ version(ver, sha256=sbcl_releases[ver][os][target])
+ if "min_glibc" in sbcl_releases[ver][os]:
+ conflicts(
+ "glibc@:{0}".format(sbcl_releases[ver][os]["min_glibc"]),
+ when="@{0}".format(ver),
+ )
+
+ supported_sysinfo_msg = (
+ "Not a supported platform. See https://www.sbcl.org/platform-table.html"
+ )
+ for sysinfo in ["platform=windows", "target=ppc64le"]:
+ conflicts(sysinfo, msg=supported_sysinfo_msg)
+
+ def url_for_version(self, version):
+ target = platform.machine().lower()
+ os = platform.system().lower()
+ sbcl_targets = {"arm64": "arm64", "aarch64": "arm64", "x86_64": "x86-64"}
+ if target not in sbcl_targets:
+ return None
+ sbcl_url = "https://sourceforge.net/projects/sbcl/files/sbcl/{version}/sbcl-{version}-{target}-{os}-binary.tar.bz2"
+ return sbcl_url.format(version=version, target=sbcl_targets[target], os=os)
+
+ def install(self, spec, prefix):
+ sh = which("sh")
+ with set_env(INSTALL_ROOT=self.spec.prefix):
+ sh("install.sh")
diff --git a/var/spack/repos/builtin/packages/sbcl/package.py b/var/spack/repos/builtin/packages/sbcl/package.py
new file mode 100644
index 0000000000..1c7f98e3b7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sbcl/package.py
@@ -0,0 +1,82 @@
+# Copyright 2013-2024 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.package import *
+from spack.util.environment import set_env
+
+
+class Sbcl(MakefilePackage):
+ """Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler.
+ It is open source / free software, with a permissive license. In addition
+ to the compiler and runtime system for ANSI Common Lisp, it provides an
+ interactive environment including a debugger, a statistical profiler, a
+ code coverage tool, and many other extensions.
+ """
+
+ homepage = "https://www.sbcl.org/"
+ url = "https://sourceforge.net/projects/sbcl/files/sbcl/2.4.8/sbcl-2.4.8-source.tar.bz2"
+ git = "git://git.code.sf.net/p/sbcl/sbcl"
+
+ maintainers("ashermancinelli")
+
+ # NOTE: The sbcl homepage lists
+ # while the sourceforge repo lists "Public Domain, MIT License", the
+ # COPYING file distributed with the source code contains this message:
+ #
+ # > Thus, there are no known obstacles to copying, using, and modifying
+ # > SBCL freely, as long as copyright notices of MIT, Symbolics, Xerox and
+ # > Gerd Moellmann are retained.
+ #
+ # MIT seems the most appropriate, but if we can add more context to this
+ # license message, then we should.
+ license("MIT", checked_by="ashermancinelli")
+
+ version("master", branch="master")
+ version("2.4.8", sha256="fc6ecdcc538e80a14a998d530ccc384a41790f4f4fc6cd7ffe8cb126a677694c")
+
+ depends_on("c", type="build")
+ depends_on("sbcl-bootstrap", type="build")
+ depends_on("zstd", when="platform=darwin")
+
+ variant(
+ "fancy", default=True, description="Enable extra features like compression and threading."
+ )
+
+ # TODO(ashermancinelli): there's nothing on the platform support page that
+ # makes me think this shouldn't build, but I can't
+ # get the sbcl binary to link with gcc on darwin.
+ conflicts(
+ "+fancy%gcc",
+ when="platform=darwin",
+ msg="Cannot build with gcc on darwin because pthreads will fail to link",
+ )
+
+ phases = ["build", "install"]
+
+ def build(self, spec, prefix):
+ sh = which("sh")
+
+ version_str = str(spec.version)
+
+ # NOTE: add any other git versions here.
+ # When installing from git, the build system expects a dummy version
+ # to be provided as a lisp expression.
+ if version_str in ("master",):
+ with open("version.lisp-expr", "w") as f:
+ f.write(f'"{version_str}"')
+
+ build_args = []
+ build_args.append("--prefix={0}".format(prefix))
+
+ if "+fancy" in self.spec:
+ build_args.append("--fancy")
+
+ sbcl_bootstrap_prefix = self.spec["sbcl-bootstrap"].prefix.lib.sbcl
+ with set_env(SBCL_HOME=sbcl_bootstrap_prefix):
+ sh("make.sh", *build_args)
+
+ def install(self, spec, prefix):
+ sh = which("sh")
+ sh("install.sh")
diff --git a/var/spack/repos/builtin/packages/sblim-sfcc/package.py b/var/spack/repos/builtin/packages/sblim-sfcc/package.py
index f3e70b5fc8..400a98409b 100644
--- a/var/spack/repos/builtin/packages/sblim-sfcc/package.py
+++ b/var/spack/repos/builtin/packages/sblim-sfcc/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class SblimSfcc(AutotoolsPackage):
"""Small Footprint CIM Client Library"""
- homepage = "https://sourceforge.net/projects/sblim"
+ homepage = "https://sourceforge.net/projects/sblim/"
url = "https://github.com/kkaempf/sblim-sfcc/archive/SFCC_2_2_1.tar.gz"
license("EPL-1.0")
@@ -18,6 +18,9 @@ class SblimSfcc(AutotoolsPackage):
version("2_2_7", sha256="bb85bc75efd112411eb76e83a38413a33b3fb8b6b725c8d08fe326efcbea427f")
version("2_2_6", sha256="65a8b70047c449f8b60e519ec1a47aa50b6476d3876a698e8484467650e9ee78")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/sbml/package.py b/var/spack/repos/builtin/packages/sbml/package.py
index d30d2ee6b4..9a5c04a1ab 100644
--- a/var/spack/repos/builtin/packages/sbml/package.py
+++ b/var/spack/repos/builtin/packages/sbml/package.py
@@ -25,6 +25,9 @@ class Sbml(CMakePackage):
version("5.10.2", sha256="83f32a143cf657672b1050f5f79d3591c418fc59570d180fb1f39b103f4e5286")
version("5.10.0", sha256="2cd8b37018ce8b1df869c8c182803addbce6d451512ae25a7f527b49981f0966")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
url = "https://downloads.sourceforge.net/project/sbml/libsbml/{0}/stable/libSBML-{1}-core-plus-packages-src.tar.gz".format(
version, version
diff --git a/var/spack/repos/builtin/packages/sbp/package.py b/var/spack/repos/builtin/packages/sbp/package.py
index 22cc612883..030d02a4f2 100644
--- a/var/spack/repos/builtin/packages/sbp/package.py
+++ b/var/spack/repos/builtin/packages/sbp/package.py
@@ -20,6 +20,9 @@ class Sbp(CMakePackage):
"3.4.10", tag="v3.4.10", commit="d8ec454a3d7f1b2f8b8f515934612c184b8d5fa3", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
root_cmakelists_dir = "c"
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/sbt/package.py b/var/spack/repos/builtin/packages/sbt/package.py
index 2f34e6da37..bbcd75469a 100644
--- a/var/spack/repos/builtin/packages/sbt/package.py
+++ b/var/spack/repos/builtin/packages/sbt/package.py
@@ -14,6 +14,7 @@ class Sbt(Package):
license("Apache-2.0")
+ version("1.10.0", sha256="154b7de6c19207c73d0a304f901c8c4b6ead9a9c3a99a98a9d72ac19419d2640")
version("1.8.3", sha256="21f4210786fd68fd15dca3f4c8ee9cae0db249c54e1b0ef6e829e9fa4936423a")
version("1.1.6", sha256="f545b530884e3abbca026df08df33d5a15892e6d98da5b8c2297413d1c7b68c1")
version("1.1.5", sha256="8303d7496bc70eb441e8136bd29ffc295c629dadecefa4e7a475176ab4d282d5")
diff --git a/var/spack/repos/builtin/packages/scafacos/package.py b/var/spack/repos/builtin/packages/scafacos/package.py
index dcad460838..387eb50dd4 100644
--- a/var/spack/repos/builtin/packages/scafacos/package.py
+++ b/var/spack/repos/builtin/packages/scafacos/package.py
@@ -22,6 +22,10 @@ class Scafacos(AutotoolsPackage):
version("1.0.1", sha256="2b125f313795c81b0e87eb920082e91addf94c17444f9486d979e691aaded99b")
version("1.0.0", sha256="cc5762edbecfec0323126b6a6a535dcc3e134fcfef4b00f63eb05fae15244a96")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("fftw")
depends_on("file")
depends_on("gmp")
diff --git a/var/spack/repos/builtin/packages/scala/package.py b/var/spack/repos/builtin/packages/scala/package.py
index 4bb3cce92e..c3457c20a7 100644
--- a/var/spack/repos/builtin/packages/scala/package.py
+++ b/var/spack/repos/builtin/packages/scala/package.py
@@ -19,7 +19,12 @@ class Scala(Package):
license("Apache-2.0")
+ version("2.13.14", sha256="5af0637545f674686697f1ac7c9046bda6db638b07e23d6cf8932fc56bdb84c1")
+ version("2.13.10", sha256="b01461599cd0786042c64b533790f45e51babb91c52dc465d846838e97019cc4")
version("2.13.1", sha256="6918ccc494e34810a7254ad2c4e6f0e1183784c22e7b4801b7dbc8d1994a04db")
+ version("2.12.19", sha256="d1876659c9298b6664f91aa7ef4b2c5baca6356ff47a9a598070045058968fb2")
+ version("2.12.16", sha256="2be383c1140e5e8dc84707fae81734f42b666766f91e55bbb04e444af8f3467f")
+ version("2.12.13", sha256="8c5dd265a5daa3e7791517a2266a82eb707179954ae1889b9a53477aba46a49c")
version("2.12.10", sha256="3b12bda3300fedd91f64fc7f9165fd45c58328b1b760af24ca6ffe92e3b0656a")
version("2.12.6", sha256="1ac7444c5a85ed1ea45db4a268ee9ea43adf80e7f5724222863afb5492883416")
version("2.12.5", sha256="b261ffe9a495b12e9dda2ed37331e579547e4d1b8b5810161b6c3b39ac806aa1")
diff --git a/var/spack/repos/builtin/packages/scalasca/package.py b/var/spack/repos/builtin/packages/scalasca/package.py
index 35e34fef5d..4023b4f903 100644
--- a/var/spack/repos/builtin/packages/scalasca/package.py
+++ b/var/spack/repos/builtin/packages/scalasca/package.py
@@ -28,6 +28,9 @@ class Scalasca(AutotoolsPackage):
version("2.2.2", sha256="909567ca294366119bbcb7e8122b94f43982cbb328e18c6f6ce7a722d72cd6d4")
version("2.1", sha256="fefe43f10becf7893863380546c80ac8db171a3b1ebf97d0258602667572c2fc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
# version 2.6.1+
diff --git a/var/spack/repos/builtin/packages/scale/package.py b/var/spack/repos/builtin/packages/scale/package.py
index d8ef261220..3d45b572c4 100644
--- a/var/spack/repos/builtin/packages/scale/package.py
+++ b/var/spack/repos/builtin/packages/scale/package.py
@@ -30,6 +30,9 @@ class Scale(MakefilePackage):
version("5.3.6", sha256="3ab0d42cdb16eee568c65b880899e861e464e92088ceb525066c726f31d04848")
version("5.2.6", sha256="e63141d05810e3f41fc89c9eb15e2319d753832adabdac8f7c8dd7acc0f5f8ed")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi@2:", type=("build", "link", "run"))
depends_on("netcdf-c")
depends_on("netcdf-fortran")
@@ -48,8 +51,6 @@ class Scale(MakefilePackage):
scale_sys_str = "Linux64-gnu-ompi"
elif self.spec.satisfies("platform=linux %intel"):
scale_sys_str = "Linux64-intel-impi"
- elif self.spec.satisfies("platform=linux %pgi"):
- scale_sys_str = "Linux64-pgi-ompi"
elif self.spec.satisfies("platform=linux target=arm %gcc"):
scale_sys_str = "LinuxARM-gnu-ompi"
elif self.spec.satisfies("platform=linux target=a64fx %fj"):
diff --git a/var/spack/repos/builtin/packages/scallop/package.py b/var/spack/repos/builtin/packages/scallop/package.py
index e3150343e9..1d79822e7c 100644
--- a/var/spack/repos/builtin/packages/scallop/package.py
+++ b/var/spack/repos/builtin/packages/scallop/package.py
@@ -16,6 +16,8 @@ class Scallop(AutotoolsPackage):
version("0.10.5", sha256="b09e3c61f1b3b1da2a96d9d8429d80326a3bb14f5fe6af9b5e87570d4b86937a")
version("0.10.3", sha256="04eb3ab27ed8c7ae38e1780d6b2af16b6a2c01807ffafd59e819d33bfeff58a0")
+ depends_on("cxx", type="build") # generated
+
depends_on("clp")
depends_on("boost")
depends_on("htslib@1.5:")
diff --git a/var/spack/repos/builtin/packages/scalpel/package.py b/var/spack/repos/builtin/packages/scalpel/package.py
index 85e1ff2ee6..e2ec4d881c 100644
--- a/var/spack/repos/builtin/packages/scalpel/package.py
+++ b/var/spack/repos/builtin/packages/scalpel/package.py
@@ -12,7 +12,7 @@ class Scalpel(MakefilePackage, SourceforgePackage):
with next-generation sequencing technology.
"""
- homepage = "http://scalpel.sourceforge.net/index.html"
+ homepage = "https://scalpel.sourceforge.net/index.html"
sourceforge_mirror_path = "scalpel/scalpel-0.5.4.tar.gz"
license("MIT")
@@ -20,6 +20,9 @@ class Scalpel(MakefilePackage, SourceforgePackage):
version("0.5.4", sha256="506f731b3886def158c15fd8b74fa98390f304a507d2040972e6b09ddefac8f0")
version("0.5.3", sha256="d45b569fe3aa5934883bc7216c243d53168351c23e020d96a46fa77a1563b65e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl@5.10.0:")
# bamtools needs to build before the others.
diff --git a/var/spack/repos/builtin/packages/scan-for-matches/package.py b/var/spack/repos/builtin/packages/scan-for-matches/package.py
index 6df17616b8..cdfdc7eb7c 100644
--- a/var/spack/repos/builtin/packages/scan-for-matches/package.py
+++ b/var/spack/repos/builtin/packages/scan-for-matches/package.py
@@ -15,6 +15,8 @@ class ScanForMatches(Package):
version("2010-7-16", sha256="c6b17930efbdfbac28b57c3a0b4f8c26effb36c48988d82e41c81c6962e2d68f")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
cc = Executable(self.compiler.cc)
cc("-O", "-o", "scan_for_matches", "ggpunit.c", "scan_for_matches.c")
diff --git a/var/spack/repos/builtin/packages/scantailor/package.py b/var/spack/repos/builtin/packages/scantailor/package.py
index 7618e5bfd0..3256626dd4 100644
--- a/var/spack/repos/builtin/packages/scantailor/package.py
+++ b/var/spack/repos/builtin/packages/scantailor/package.py
@@ -20,6 +20,8 @@ class Scantailor(CMakePackage):
version("0.2.7", sha256="3e27647621d43638888a268902f8fa098b06a70a5da5d0623b1c11220a367910")
+ depends_on("cxx", type="build") # generated
+
depends_on("qt@5:")
depends_on("libjpeg")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/scc/package.py b/var/spack/repos/builtin/packages/scc/package.py
index c6d70053b3..5d0b00e406 100644
--- a/var/spack/repos/builtin/packages/scc/package.py
+++ b/var/spack/repos/builtin/packages/scc/package.py
@@ -19,4 +19,9 @@ class Scc(GoPackage):
license("MIT")
+ version("3.4.0", sha256="bdedb6f32d1c3d73ac7e55780021c742bc8ed32f6fb878ee3e419f9acc76bdaa")
+ version("3.3.2", sha256="2bbfed4cf34bbe50760217b479331cf256285335556a0597645b7250fb603388")
version("3.1.0", sha256="bffea99c7f178bc48bfba3c64397d53a20a751dfc78221d347aabdce3422fd20")
+
+ depends_on("go@1.20:", type="build", when="@3.2.0:")
+ depends_on("go@1.22:", type="build", when="@3.4.0:")
diff --git a/var/spack/repos/builtin/packages/sccache/package.py b/var/spack/repos/builtin/packages/sccache/package.py
new file mode 100644
index 0000000000..2f526242ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sccache/package.py
@@ -0,0 +1,66 @@
+# Copyright 2013-2024 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
+
+import spack.build_systems
+import spack.build_systems.cargo
+from spack.package import *
+
+
+class Sccache(CargoPackage):
+ """Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids
+ compilation when possible. Sccache has the capability to utilize caching in
+ remote storage environments, including various cloud storage options, or
+ alternatively, in local storage."""
+
+ homepage = "https://github.com/mozilla/sccache"
+ url = "https://github.com/mozilla/sccache/archive/refs/tags/v0.8.2.tar.gz"
+
+ tags = ["build-tools"]
+
+ executables = [r"^sccache$", r"^sscache-dist$"]
+
+ license("Apache-2.0", checked_by="pranav-sivaraman")
+
+ version("0.8.2", sha256="2b3e0ef8902fe7bcdcfccf393e29f4ccaafc0194cbb93681eaac238cdc9b94f8")
+
+ depends_on("rust@1.75:", when="@0.8.2:")
+ depends_on("rust@1.70:", when="@0.7.7:")
+ depends_on("rust@1.67.1:") # for 0.6/0.7.1 and newer, but may work for even older versions.
+ depends_on("pkgconfig", type="build", when="platform=linux")
+
+ depends_on("openssl", when="platform=linux")
+
+ variant(
+ "dist-server",
+ default=False,
+ description="Enables the sccache-dist binary",
+ when="platform=linux",
+ )
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.match(r"sccache (\S+)", output)
+ return match.group(1) if match else None
+
+ @classmethod
+ def determine_variants(cls, exes, version_str):
+ if any(os.path.basename(path) == "sccache-dist" for path in exes):
+ return "+dist-server"
+ else:
+ return "~dist-server"
+
+
+class CargoBuilder(spack.build_systems.cargo.CargoBuilder):
+
+ @property
+ def build_args(self):
+ if self.spec.satisfies("+dist-server"):
+ return ["--features=dist-server"]
+
+ return []
diff --git a/var/spack/repos/builtin/packages/scine-core/package.py b/var/spack/repos/builtin/packages/scine-core/package.py
index b006e324f8..049b388153 100644
--- a/var/spack/repos/builtin/packages/scine-core/package.py
+++ b/var/spack/repos/builtin/packages/scine-core/package.py
@@ -18,8 +18,11 @@ class ScineCore(CMakePackage):
license("BSD-3-Clause")
version("master", branch="master")
+ version("6.0.0", sha256="6e47e49694002f9d847507c9aacfe53b2befbff5aa380f8860468afdfe880461")
version("4.0.2", sha256="7181c6f93d71def22f1e0e5767afc7587c04b49abc03516f6926394868e7adc6")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
diff --git a/var/spack/repos/builtin/packages/scine-database/package.py b/var/spack/repos/builtin/packages/scine-database/package.py
index b66da59a26..8bab8c5358 100644
--- a/var/spack/repos/builtin/packages/scine-database/package.py
+++ b/var/spack/repos/builtin/packages/scine-database/package.py
@@ -20,6 +20,8 @@ class ScineDatabase(CMakePackage):
version("master", branch="master")
version("1.1.0", sha256="a9144631dfb90e06f6924cf58fc5db13719cf8577fcd3bbf788a135060a70c18")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -51,11 +53,8 @@ class ScineDatabase(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define("SCINE_BUILD_PYTHON_BINDINGS", "+python" in self.spec),
self.define("SCINE_MARCH", ""),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
diff --git a/var/spack/repos/builtin/packages/scine-molassembler/package.py b/var/spack/repos/builtin/packages/scine-molassembler/package.py
index 79a8b17ac0..da2c314cc7 100644
--- a/var/spack/repos/builtin/packages/scine-molassembler/package.py
+++ b/var/spack/repos/builtin/packages/scine-molassembler/package.py
@@ -20,6 +20,8 @@ class ScineMolassembler(CMakePackage):
version("master", branch="master")
version("1.2.1", sha256="c9fea41d383b7f54cf8a3ed4dabebe9e942fe3ef5b47895e3533e8ce42dacd38")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -84,7 +86,7 @@ class ScineMolassembler(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("BUILD_SHARED_LIBS", True),
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define("SCINE_BUILD_PYTHON_BINDINGS", "+python" in self.spec),
@@ -95,6 +97,3 @@ class ScineMolassembler(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
diff --git a/var/spack/repos/builtin/packages/scine-qcmaquis/cmake_molcas_interface.patch b/var/spack/repos/builtin/packages/scine-qcmaquis/cmake_molcas_interface.patch
new file mode 100644
index 0000000000..ce70786bdb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scine-qcmaquis/cmake_molcas_interface.patch
@@ -0,0 +1,19 @@
+diff --git a/dmrg/lib/interfaces/openmolcas/CMakeLists.txt b/dmrg/lib/interfaces/openmolcas/CMakeLists.txt
+index 46e569074..83fda1ca6 100644
+--- a/dmrg/lib/interfaces/openmolcas/CMakeLists.txt
++++ b/dmrg/lib/interfaces/openmolcas/CMakeLists.txt
+@@ -24,7 +24,13 @@ add_library(qcmaquis-hdf5-interface ${HDF5_INTERFACE_SOURCES})
+
+ target_link_libraries(qcmaquis-hdf5-interface ${HDF5_LIBRARIES})
+
+-set_target_properties(qcmaquis-driver PROPERTIES COMPILE_FLAGS "-cpp")
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
++ target_compile_options(qcmaquis-driver PRIVATE "-cpp")
++elseif ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
++ target_compile_options(qcmaquis-driver PRIVATE "-fpp")
++elseif ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Clang")
++ target_compile_options(qcmaquis-driver PRIVATE "-x f95")
++endif()
+
+ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU"
+ AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 10.0)
diff --git a/var/spack/repos/builtin/packages/scine-qcmaquis/package.py b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py
index 8bf3c20676..8406d00de7 100644
--- a/var/spack/repos/builtin/packages/scine-qcmaquis/package.py
+++ b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -15,14 +17,13 @@ class ScineQcmaquis(CMakePackage):
maintainers("adam-grofe")
version("master", branch="master")
+ version("3.1.4", branch="release-3.1.4")
version("3.1.3", branch="release-3.1.3")
- version("3.1.2", branch="release-3.1.2", preferred=True)
- variant(
- "blas",
- values=("openblas", "mkl"),
- default="openblas",
- description="Which blas library to use.",
- )
+ version("3.1.2", branch="release-3.1.2")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"symmetries",
default="SU2U1PG,TwoU1PG",
@@ -30,9 +31,10 @@ class ScineQcmaquis(CMakePackage):
values=("U1", "TwoU1", "TwoU1PG", "NU1", "Z2", "SU2U1", "SU2U1PG", "U1DG", "NONE"),
multi=True,
)
+ variant("openmolcas", default=False, description="Build the OpenMOLCAS Fortran interface.")
variant(
"build_tests",
- default=True,
+ default=False,
description="Whether to build unit tests using gtest and gmock",
)
@@ -40,17 +42,42 @@ class ScineQcmaquis(CMakePackage):
depends_on("hdf5~mpi")
depends_on("lapack")
- depends_on("openblas+ilp64 threads=openmp", when="blas=openblas")
- depends_on("intel-oneapi-mkl", when="blas=mkl")
+
+ depends_on("blas")
+ for _pkg in ["openblas"] + list(INTEL_MATH_LIBRARIES):
+ with when(f"^[virtuals=blas] {_pkg}"):
+ depends_on(f"{_pkg}+ilp64 threads=openmp")
+
depends_on("gsl")
- depends_on("boost+program_options+filesystem+system+thread+serialization+chrono")
+ depends_on("boost+program_options+filesystem+system+thread+serialization+chrono @1.56:")
depends_on("googletest+gmock", when="+build_tests")
+ depends_on("globalarrays", when="+openmolcas")
+
+ patch("cmake_molcas_interface.patch")
+
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SYMMETRIES", "symmetries"),
+ self.define_from_variant("BUILD_OPENMOLCAS_INTERFACE", "openmolcas"),
self.define_from_variant("QCMAQUIS_TESTS", "build_tests"),
+ self.define("LAPACK_64_BIT", True),
]
+ if "+openmolcas" in self.spec:
+ globalarrays_libdir = self.spec["globalarrays"].prefix.lib
+ args.extend(
+ [
+ self.define("BUILD_OPENMOLCAS_MPI", True),
+ self.define("GA_INCLUDE_DIR", self.spec["globalarrays"].prefix.include),
+ self.define(
+ "GA_LIBRARIES",
+ [
+ os.path.join(globalarrays_libdir, "libga.so"),
+ os.path.join(globalarrays_libdir, "libarmci.so"),
+ ],
+ ),
+ ]
+ )
return args
def patch(self):
diff --git a/var/spack/repos/builtin/packages/scine-readuct/package.py b/var/spack/repos/builtin/packages/scine-readuct/package.py
index 1844037743..935baf2b6e 100644
--- a/var/spack/repos/builtin/packages/scine-readuct/package.py
+++ b/var/spack/repos/builtin/packages/scine-readuct/package.py
@@ -21,6 +21,8 @@ class ScineReaduct(CMakePackage):
version("4.1.0", sha256="9cec0192a444403d6a8fd096509798c49fbd1eec298ec7194aba915e31f50782")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -54,7 +56,7 @@ class ScineReaduct(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define("SCINE_BUILD_PYTHON_BINDINGS", "+python" in self.spec),
self.define("SCINE_MARCH", ""),
@@ -64,6 +66,3 @@ class ScineReaduct(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
diff --git a/var/spack/repos/builtin/packages/scine-serenity/package.py b/var/spack/repos/builtin/packages/scine-serenity/package.py
index ca2924b2c0..ed666fc88c 100644
--- a/var/spack/repos/builtin/packages/scine-serenity/package.py
+++ b/var/spack/repos/builtin/packages/scine-serenity/package.py
@@ -20,6 +20,8 @@ class ScineSerenity(CMakePackage):
version("master", branch="master")
version("1.0.1", sha256="e2e5cc265a68ccab05f1bc934b957ca07c4f1c6004e662684023da451da69299")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -57,7 +59,7 @@ class ScineSerenity(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define_from_variant("SCINE_BUILD_PYTHON_BINDINGS", "python"),
self.define("SCINE_MARCH", ""),
@@ -69,6 +71,3 @@ class ScineSerenity(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
diff --git a/var/spack/repos/builtin/packages/scine-sparrow/package.py b/var/spack/repos/builtin/packages/scine-sparrow/package.py
index 0d8fbf855b..50ef10fe6a 100644
--- a/var/spack/repos/builtin/packages/scine-sparrow/package.py
+++ b/var/spack/repos/builtin/packages/scine-sparrow/package.py
@@ -36,6 +36,8 @@ class ScineSparrow(CMakePackage):
version("3.1.0", sha256="91412de0f2670a1735c4ca76406db5bea04236eeac0bc1f93ccfe18104aa7ce4")
version("3.0.0", sha256="70636871694c9363ae3fb2df5050bddb22667b71d875d5a7e9afd872f6a2b65d")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -76,7 +78,7 @@ class ScineSparrow(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define("SCINE_BUILD_PYTHON_BINDINGS", "+python" in self.spec),
self.define("SCINE_MARCH", ""),
@@ -86,9 +88,6 @@ class ScineSparrow(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
# Adapted from ddd in MacPorts: cmake will build the executable
# "sparrow" right next to the copy of the source directory "Sparrow".
diff --git a/var/spack/repos/builtin/packages/scine-utilities/package.py b/var/spack/repos/builtin/packages/scine-utilities/package.py
index 4f65702afb..1784dedffd 100644
--- a/var/spack/repos/builtin/packages/scine-utilities/package.py
+++ b/var/spack/repos/builtin/packages/scine-utilities/package.py
@@ -21,6 +21,8 @@ class ScineUtilities(CMakePackage):
version("6.0.0", sha256="e4387d5562b7442a8e31e4dfc028bacfeb6d12e39f2d8aa6effc6db380863b4a")
version("5.0.0", sha256="a304c89d9a196fe304f38610dea6b066d74590c0d434e4bd09a9796340700465")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -67,7 +69,7 @@ class ScineUtilities(CMakePackage):
)
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define_from_variant("SCINE_BUILD_PYTHON_BINDINGS", "python"),
self.define("SCINE_MARCH", ""),
@@ -77,7 +79,3 @@ class ScineUtilities(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
-
- return args
diff --git a/var/spack/repos/builtin/packages/scine-xtb/package.py b/var/spack/repos/builtin/packages/scine-xtb/package.py
index f06bc13003..676ddaa233 100644
--- a/var/spack/repos/builtin/packages/scine-xtb/package.py
+++ b/var/spack/repos/builtin/packages/scine-xtb/package.py
@@ -20,6 +20,8 @@ class ScineXtb(CMakePackage):
version("master", branch="master")
version("1.0.2", sha256="9beb1103467f3cfd9ad33beb2f3ec650bc3e6dc7094876774be3cc4e6f210487")
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/5.0.1.tar.gz",
@@ -52,7 +54,7 @@ class ScineXtb(CMakePackage):
os.rename("_dev", "dev")
def cmake_args(self):
- args = [
+ return [
self.define("SCINE_BUILD_TESTS", self.run_tests),
self.define("SCINE_BUILD_PYTHON_BINDINGS", "+python" in self.spec),
self.define("SCINE_MARCH", ""),
@@ -62,6 +64,3 @@ class ScineXtb(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
- if "+python" in self.spec:
- args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
- return args
diff --git a/var/spack/repos/builtin/packages/scitokens-cpp/package.py b/var/spack/repos/builtin/packages/scitokens-cpp/package.py
index c52e850098..6c193e4bd2 100644
--- a/var/spack/repos/builtin/packages/scitokens-cpp/package.py
+++ b/var/spack/repos/builtin/packages/scitokens-cpp/package.py
@@ -17,6 +17,10 @@ class ScitokensCpp(CMakePackage):
license("Apache-2.0")
+ version("1.1.2", sha256="07d33cb51a3ccd8460f2acebb15b35393aeccfc70e3554a73c9e5cffed6edb39")
+ version("1.1.1", sha256="a9091b888fc778282caf2a6808c86f685d2411557673152d58fe53932a6c7212")
+ version("1.1.0", sha256="9c4afd6638e94855ede52ecfc3d4f05082f2bdf151a9ab8dafcc2bb7cd4d9039")
+ version("1.0.2", sha256="cdc1e80e0cba9ca0e16de2efa10ec5e38765792bf5107024bfb66ddad5a16a85")
version("1.0.1", sha256="d4660521fa17189e7a7858747d066052dd8ea8f430ce7649911c157d4423c412")
version("1.0.0", sha256="88376c5cd065aac8d92445184a02ccf5186dc4890ccd7518e88be436978675c0")
version("0.7.3", sha256="7d3c438596588cd74cf1af8255c55f44ca86a34293b81415ee24b33de64f886a")
@@ -24,6 +28,8 @@ class ScitokensCpp(CMakePackage):
version("0.7.1", sha256="44a1bca188897b1e97645149d1f6bc187cd0e482ad36159ca376834f028ce5ef")
version("0.7.0", sha256="72600cf32523b115ec7abf4ac33fa369e0a655b3d3b390e1f68363e6c4e961b6")
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default="11",
@@ -41,7 +47,9 @@ class ScitokensCpp(CMakePackage):
depends_on("pkgconfig", type="build")
depends_on("uuid", type="build")
+ # Some jwt-cpp releases introduce breaking API changes
conflicts("^jwt-cpp@0.5:", when="@:0.7")
+ conflicts("^jwt-cpp@0.7:", when="@:1.1")
# https://github.com/scitokens/scitokens-cpp/issues/72
@when("@0.7.0 ^openssl@3:")
diff --git a/var/spack/repos/builtin/packages/scnlib/package.py b/var/spack/repos/builtin/packages/scnlib/package.py
new file mode 100644
index 0000000000..24135986e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scnlib/package.py
@@ -0,0 +1,61 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Scnlib(CMakePackage):
+ """scanf for modern C++"""
+
+ homepage = "https://scnlib.dev"
+ url = "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v3.0.1.tar.gz"
+
+ maintainers("pranav-sivaraman")
+
+ license("Apache-2.0", checked_by="pranav-sivaraman")
+
+ version("3.0.1", sha256="bc8a668873601d00cce6841c2d0f2c93f836f63f0fbc77997834dea12e951eb1")
+
+ variant("shared", default=True, description="Build shared libs")
+ variant(
+ "regex-backend",
+ default="std",
+ description="Regex backend to use",
+ multi=False,
+ values=("std", "Boost"),
+ )
+ variant(
+ "icu",
+ default=False,
+ description="Use the ICU when using the Boost regex backend",
+ when="regex-backend=Boost",
+ )
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.16:", type="build")
+
+ depends_on("fast-float@5:")
+
+ depends_on("boost +regex cxxstd=17", when="regex-backend=Boost")
+ depends_on("boost +icu", when="+icu")
+
+ depends_on("googletest cxxstd=17", type="test")
+ depends_on("python@3:", type="test")
+
+ def cmake_args(self):
+ args = [
+ self.define("SCN_TESTS", self.run_tests),
+ self.define("SCN_BENCHMARKS", False),
+ self.define("SCN_EXAMPLES", False),
+ self.define("SCN_DOCS", False),
+ self.define("SCN_USE_EXTERNAL_FAST_FLOAT", True),
+ self.define("SCN_USE_EXTERNAL_GTEST", True),
+ self.define("SCN_USE_EXTERNAL_BENCHMARK", True),
+ self.define("SCN_USE_EXTERNAL_REGEX_BACKEND", True),
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("SCN_REGEX_BACKEND", "regex-backend"),
+ ]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py
index 77cd015bea..1295ed6a90 100644
--- a/var/spack/repos/builtin/packages/scons/package.py
+++ b/var/spack/repos/builtin/packages/scons/package.py
@@ -17,6 +17,7 @@ class Scons(PythonPackage):
license("MIT")
+ version("4.7.0", sha256="d8b617f6610a73e46509de70dcf82f76861b79762ff602d546f4e80918ec81f3")
version("4.5.2", sha256="813360b2bce476bc9cc12a0f3a22d46ce520796b352557202cb07d3e402f5458")
version("4.5.1", sha256="9daeabe4d87ba2bd4ea15410765fc1ed2d931b723e4dc730a487a3911b9a1738")
version("4.4.0", sha256="7703c4e9d2200b4854a31800c1dbd4587e1fa86e75f58795c740bcfa7eca7eaa")
@@ -41,7 +42,7 @@ class Scons(PythonPackage):
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/{0}/{1}/{1}-{2}.tar.gz"
- if version >= Version("4.0.0"):
+ if self.spec.satisfies("@4.0.0:"):
name = "SCons"
else:
name = "scons"
diff --git a/var/spack/repos/builtin/packages/scorec-core/package.py b/var/spack/repos/builtin/packages/scorec-core/package.py
index b5f4c35efb..9b2648aa1d 100644
--- a/var/spack/repos/builtin/packages/scorec-core/package.py
+++ b/var/spack/repos/builtin/packages/scorec-core/package.py
@@ -18,6 +18,10 @@ class ScorecCore(CMakePackage):
version("develop")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("zoltan")
depends_on("cmake@3.0:", type="build")
diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py
index 30d36e19f3..d4076a89a1 100644
--- a/var/spack/repos/builtin/packages/scorep/package.py
+++ b/var/spack/repos/builtin/packages/scorep/package.py
@@ -16,6 +16,7 @@ class Scorep(AutotoolsPackage):
url = "https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-7.1/scorep-7.1.tar.gz"
maintainers("wrwilliams")
+ version("8.4", sha256="7bbde9a0721d27cc6205baf13c1626833bcfbabb1f33b325a2d67976290f7f8a")
version("8.3", sha256="76c914e6319221c059234597a3bc53da788ed679179ac99c147284dcefb1574a")
# version 8.2 was immediately superseded before it hit Spack
version("8.1", sha256="3a40b481fce610871ddf6bdfb88a6d06b9e5eb38c6080faac6d5e44990060a37")
@@ -68,6 +69,10 @@ class Scorep(AutotoolsPackage):
deprecated="true",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def url_for_version(self, version):
if version < Version("7.0"):
return "https://www.vi-hps.org/cms/upload/packages/scorep/scorep-{0}.tar.gz".format(
@@ -143,6 +148,8 @@ class Scorep(AutotoolsPackage):
# does not work on macOS
# https://github.com/spack/spack/issues/1609
conflicts("platform=darwin")
+ # Score-P first has support for ROCm 6.x as of v8.4
+ conflicts("hip@6.0:", when="@1.0:8.3+hip")
def find_libpath(self, libname, root):
libs = find_libraries(libname, root, shared=True, recursive=True)
@@ -150,6 +157,14 @@ class Scorep(AutotoolsPackage):
return None
return libs.directories[0]
+ # handle any mapping of Spack compiler names to Score-P args
+ # this should continue to exist for backward compatibility
+ def clean_compiler(self, compiler):
+ renames = {"cce": "cray", "rocmcc": "amdclang"}
+ if compiler in renames:
+ return renames[compiler]
+ return compiler
+
def configure_args(self):
spec = self.spec
@@ -159,9 +174,9 @@ class Scorep(AutotoolsPackage):
"--enable-shared",
]
- cname = spec.compiler.name
- if not spec.satisfies("platform=cray"):
- config_args.append("--with-nocross-compiler-suite={0}".format(cname))
+ cname = self.clean_compiler(spec.compiler.name)
+
+ config_args.append("--with-nocross-compiler-suite={0}".format(cname))
if self.version >= Version("4.0"):
config_args.append("--with-cubew=%s" % spec["cubew"].prefix.bin)
@@ -186,8 +201,7 @@ class Scorep(AutotoolsPackage):
config_args.append("--with-rocm=%s" % spec["hip"].prefix)
config_args += self.with_or_without("shmem")
- if not spec.satisfies("platform=cray"):
- config_args += self.with_or_without("mpi")
+ config_args += self.with_or_without("mpi")
if spec.satisfies("^intel-mpi"):
config_args.append("--with-mpi=intel3")
@@ -197,11 +211,12 @@ class Scorep(AutotoolsPackage):
or spec.satisfies("^cray-mpich")
):
config_args.append("--with-mpi=mpich3")
- elif spec.satisfies("^openmpi"):
+ elif spec.satisfies("^openmpi") or spec.satisfies("^hpcx-mpi"):
config_args.append("--with-mpi=openmpi")
if spec.satisfies("^binutils"):
- config_args.append("--with-libbfd=%s" % spec["binutils"].prefix)
+ config_args.append("--with-libbfd-lib=%s" % spec["binutils"].prefix.lib)
+ config_args.append("--with-libbfd-include=%s" % spec["binutils"].prefix.include)
config_args.extend(
[
diff --git a/var/spack/repos/builtin/packages/scorpio/package.py b/var/spack/repos/builtin/packages/scorpio/package.py
index 360e54dc06..535e10d8ae 100644
--- a/var/spack/repos/builtin/packages/scorpio/package.py
+++ b/var/spack/repos/builtin/packages/scorpio/package.py
@@ -24,6 +24,9 @@ class Scorpio(CMakePackage):
version("2021-12-10", commit="b802f16877a6562ccdbeca8887910d3bd3e25cbb", preferred=True)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.16:", type="build")
depends_on("mpi")
depends_on("hdf5@1.10.6: +hl +mpi")
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 124426d1a0..ad603de5c7 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -25,21 +25,29 @@ class Scotch(CMakePackage, MakefilePackage):
version("7.0.1", sha256="0618e9bc33c02172ea7351600fce4fccd32fe00b3359c4aabb5e415f17c06fed")
version("6.1.3", sha256="4e54f056199e6c23d46581d448fcfe2285987e5554a0aa527f7931684ef2809e")
version("6.1.2", sha256="9c2c75c75f716914a2bd1c15dffac0e29a2f8069b2df1ad2b6207c984b699450")
- 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")
- version("6.0.6", sha256="686f0cad88d033fe71c8b781735ff742b73a1d82a65b8b1586526d69729ac4cf")
+ version("6.1.1", sha256="14daf151399fc67f83fd3ff2933854f5e8d2207c7d35dd66a05660bf0bbd583c")
+ version("6.1.0", sha256="4fe537f608f0fe39ec78807f90203f9cca1181deb16bfa93b7d4cd440e01bbd1")
+ version("6.0.10", sha256="e5542b6102b5616f0f5c6619e3e9d52f9d0e48cb991e9b30670f598deeac0553")
+ version("6.0.9", sha256="b9bc86c50b65781eb416663e938d57555373c2517ea8b9acf680fd3acde0cb0c")
+ version("6.0.8", sha256="9457c1e7c30f073686cc217345b5a96af4166d6abbf148af84cdbab4e144b299")
+ version("6.0.6", sha256="e932b4c04636fcf5d21b9a76376868de052c9b000bdaf96f8967dcec61bdaa10")
version("6.0.5a", sha256="5b21b95e33acd5409d682fa7253cefbdffa8db82875549476c006d8cbe7c556f")
version("6.0.4", sha256="f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7")
version("6.0.3", sha256="6461cc9f28319a9dbe6cc10e28c0cbe90b4b25e205723c3edcde9a3ff974d6d8")
version("6.0.0", sha256="8206127d038bda868dda5c5a7f60ef8224f2e368298fbb01bf13fa250e378dd4")
version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
+
build_system(conditional("cmake", when="@7:"), "makefile", default="cmake")
variant("threads", default=True, description="use POSIX Pthreads within Scotch and PT-Scotch")
- variant("mpi_thread", default=False, description="use multi-threaded algorithms")
+ variant(
+ "mpi_thread",
+ default=False,
+ description="use multi-threaded algorithms in conjunction with MPI",
+ )
variant("mpi", default=True, description="Compile parallel libraries")
variant("compression", default=True, description="May use compressed files")
variant("esmumps", default=False, description="Compile esmumps (needed by mumps)")
@@ -48,6 +56,7 @@ class Scotch(CMakePackage, MakefilePackage):
"metis", default=False, description="Expose vendored METIS/ParMETIS libraries and wrappers"
)
variant("int64", default=False, description="Use int64_t for SCOTCH_Num typedef")
+ variant("noarch", default=False, description="Unset SPACK_TARGET_ARGS")
variant(
"link_error_lib",
default=False,
@@ -69,6 +78,9 @@ class Scotch(CMakePackage, MakefilePackage):
patch("libscotchmetis-return-6.0.5a.patch", when="@6.0.5a")
patch("libscotch-scotcherr-link-7.0.1.patch", when="@7.0.1 +link_error_lib")
+ # Avoid OpenMPI segfaults by using MPI_Comm_F2C for parmetis communicator
+ patch("parmetis-mpi.patch", when="@6.1.1:7.0.3 +metis ^openmpi")
+
# Vendored dependency of METIS/ParMETIS conflicts with standard
# installations
conflicts("metis", when="+metis")
@@ -127,6 +139,10 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
return args
+ @when("+noarch")
+ def setup_build_environment(self, env):
+ env.unset("SPACK_TARGET_ARGS")
+
class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
build_directory = "src"
diff --git a/var/spack/repos/builtin/packages/scotch/parmetis-mpi.patch b/var/spack/repos/builtin/packages/scotch/parmetis-mpi.patch
new file mode 100644
index 0000000000..23190ad584
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scotch/parmetis-mpi.patch
@@ -0,0 +1,127 @@
+diff --git a/src/libscotchmetis/parmetis_dgraph_order_f.c b/src/libscotchmetis/parmetis_dgraph_order_f.c
+index 44c2ede..549a834 100644
+--- a/src/libscotchmetis/parmetis_dgraph_order_f.c
++++ b/src/libscotchmetis/parmetis_dgraph_order_f.c
+@@ -46,7 +46,7 @@
+ /** # Version 6.0 : from : 13 sep 2012 **/
+ /** to : 18 may 2019 **/
+ /** # Version 7.0 : from : 21 jan 2023 **/
+-/** to : 21 jan 2023 **/
++/** to : 30 jun 2023 **/
+ /** **/
+ /************************************************************/
+
+@@ -76,11 +76,14 @@ const SCOTCH_Num * const numflag, \
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const order, \
+ SCOTCH_Num * const sizes, \
+-MPI_Comm * const commptr, \
++const MPI_Fint * const commptr, \
+ int * const revaptr), \
+ (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr, revaptr))
+ {
+- *revaptr = SCOTCH_ParMETIS_V3_NodeND (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr);
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
++ *revaptr = SCOTCH_ParMETIS_V3_NodeND (vtxdist, xadj, adjncy, numflag, options, order, sizes, &commdat);
+ }
+
+ /*******************/
+@@ -101,10 +104,13 @@ const SCOTCH_Num * const numflag, \
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const order, \
+ SCOTCH_Num * const sizes, \
+-MPI_Comm * const commptr), \
++const MPI_Fint * const commptr), \
+ (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr))
+ {
+- METISNAMEU (ParMETIS_V3_NodeND) (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr);
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
++ METISNAMEU (ParMETIS_V3_NodeND) (vtxdist, xadj, adjncy, numflag, options, order, sizes, &commdat);
+ }
+
+ #endif /* SCOTCH_METIS_PREFIX */
+diff --git a/src/libscotchmetis/parmetis_dgraph_part_f.c b/src/libscotchmetis/parmetis_dgraph_part_f.c
+index 2b76818..3bf66af 100644
+--- a/src/libscotchmetis/parmetis_dgraph_part_f.c
++++ b/src/libscotchmetis/parmetis_dgraph_part_f.c
+@@ -44,7 +44,7 @@
+ /** # Version 6.0 : from : 13 sep 2012 **/
+ /** to : 18 may 2019 **/
+ /** # Version 7.0 : from : 21 jan 2023 **/
+-/** to : 21 jan 2023 **/
++/** to : 30 jun 2023 **/
+ /** **/
+ /************************************************************/
+
+@@ -81,12 +81,15 @@ const float * const ubvec, \
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const edgecut, \
+ SCOTCH_Num * const part, \
+-MPI_Comm * const commptr, \
++const MPI_Fint * const commptr, \
+ int * const revaptr), \
+ (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr, revaptr))
+ {
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
+ *revaptr = SCOTCH_ParMETIS_V3_PartKway (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag,
+- ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr);
++ ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat);
+ }
+
+ /*
+@@ -111,12 +114,15 @@ const float * const ubvec, \
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const edgecut, \
+ SCOTCH_Num * const part, \
+-MPI_Comm * const commptr, \
++const MPI_Fint * const commptr, \
+ int * const revaptr), \
+ (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr, revaptr))
+ {
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
+ *revaptr = SCOTCH_ParMETIS_V3_PartGeomKway (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag,
+- ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr);
++ ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat);
+ }
+
+ /*******************/
+@@ -144,10 +150,13 @@ const float * const ubvec, \
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const edgecut, \
+ SCOTCH_Num * const part, \
+-MPI_Comm * const commptr), \
++const MPI_Fint * const commptr), \
+ (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr))
+ {
+- METISNAMEU (ParMETIS_V3_PartKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr);
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
++ METISNAMEU (ParMETIS_V3_PartKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat);
+ }
+
+ /*
+@@ -172,10 +181,13 @@ const float * const ubvec,
+ const SCOTCH_Num * const options, \
+ SCOTCH_Num * const edgecut, \
+ SCOTCH_Num * const part, \
+-MPI_Comm * const commptr), \
++const MPI_Fint * const commptr), \
+ (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr))
+ {
+- METISNAMEU (ParMETIS_V3_PartGeomKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr);
++ MPI_Comm commdat;
++
++ commdat = MPI_Comm_f2c (*commptr);
++ METISNAMEU (ParMETIS_V3_PartGeomKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat);
+ }
+
+ #endif /* SCOTCH_METIS_PREFIX */
diff --git a/var/spack/repos/builtin/packages/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py
index a047fa522a..7ec48f4ac7 100644
--- a/var/spack/repos/builtin/packages/scr/package.py
+++ b/var/spack/repos/builtin/packages/scr/package.py
@@ -12,6 +12,8 @@ from spack.package import *
def detect_scheduler():
if which("aprun"):
return "APRUN"
+ if which("flux"):
+ return "FLUX"
if which("jsrun"):
return "LSF"
return "SLURM"
@@ -33,21 +35,12 @@ class Scr(CMakePackage):
version("legacy", branch="legacy")
version(
- "3.0.1",
- sha256="ba8f9e676aec8176ecc46c31a4f470ac95047101654de8cc88e01a1f9d95665a",
+ "3.1.0",
+ sha256="ca1f37c84e0ff7a307e68f213c8cc868974d7fb30f16826853a711c7c3a55ffa",
preferred=True,
)
- version("3.0", sha256="e204d3e99a49efac50b4bedc7ac05f55a05f1a65429500d919900c82490532cc")
- version(
- "3.0rc2",
- sha256="4b2a718af56b3683e428d25a2269c038e9452db734221d370e3023a491477fad",
- deprecated=True,
- )
- version(
- "3.0rc1",
- sha256="bd31548a986f050024429d8ee3644eb135f047f98a3d503a40c5bd4a85291308",
- deprecated=True,
- )
+ version("3.0.1", sha256="ba8f9e676aec8176ecc46c31a4f470ac95047101654de8cc88e01a1f9d95665a")
+ version("3.0.0", sha256="e204d3e99a49efac50b4bedc7ac05f55a05f1a65429500d919900c82490532cc")
version("2.0.0", sha256="471978ae0afb56a20847d3989b994fbd680d1dea21e77a5a46a964b6e3deed6b")
version(
"1.2.2",
@@ -65,6 +58,10 @@ class Scr(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("zlib-api")
@@ -75,39 +72,31 @@ class Scr(CMakePackage):
# SCR legacy is anything 2.x.x or earlier
# SCR components is anything 3.x.x or later
- depends_on("axl@0.7.1", when="@3.0.1:")
- depends_on("er@0.2.0", when="@3.0.1:")
- depends_on("kvtree@1.3.0", when="@3.0.1:")
- depends_on("rankstr@0.1.0", when="@3.0.1:")
- depends_on("redset@0.2.0", when="@3.0.1:")
- depends_on("shuffile@0.2.0", when="@3.0.1:")
- depends_on("spath@0.2.0 +mpi", when="@3.0.1:")
- depends_on("dtcmp@1.1.4", when="@3.0.1:")
-
- depends_on("axl@0.6.0", when="@3.0.0")
- depends_on("er@0.2.0", when="@3.0.0")
- depends_on("kvtree@1.3.0", when="@3.0.0")
- depends_on("rankstr@0.1.0", when="@3.0.0")
- depends_on("redset@0.2.0", when="@3.0.0")
- depends_on("shuffile@0.2.0", when="@3.0.0")
- depends_on("spath@0.2.0", when="@3.0.0")
- depends_on("dtcmp@1.1.4", when="@3.0.0")
-
- depends_on("axl@0.5.0:", when="@3.0rc2")
- depends_on("er@0.1.0:", when="@3.0rc2")
- depends_on("kvtree@1.2.0:", when="@3.0rc2")
- depends_on("rankstr@0.1.0:", when="@3.0rc2")
- depends_on("redset@0.1.0:", when="@3.0rc2")
- depends_on("shuffile@0.1.0:", when="@3.0rc2")
- depends_on("spath@0.1.0:", when="@3.0rc2")
-
- depends_on("axl@0.4.0", when="@3.0rc1")
- depends_on("er@0.0.4", when="@3.0rc1")
- depends_on("kvtree@1.1.1", when="@3.0rc1")
- depends_on("rankstr@0.0.3", when="@3.0rc1")
- depends_on("redset@0.0.5", when="@3.0rc1")
- depends_on("shuffile@0.0.4", when="@3.0rc1")
- depends_on("spath@0.0.2", when="@3.0rc1")
+ with when("@3.1.0"):
+ depends_on("axl@0.8.0: +mpi")
+ depends_on("er@0.5.0")
+ depends_on("kvtree@1.4.0:")
+ depends_on("rankstr@0.3.0:")
+ depends_on("redset@0.4.0")
+ depends_on("shuffile@0.3.0:")
+ depends_on("spath@0.3.0: +mpi")
+ depends_on("dtcmp@1.1.5")
+
+ with when("@3.0.1"):
+ depends_on("axl@0.7.1 +mpi")
+ depends_on("er@0.3.0")
+
+ with when("@3.0.0"):
+ depends_on("axl@0.6.0")
+ depends_on("er@0.2.0")
+
+ with when("@3.0.0:3.0.1"):
+ depends_on("kvtree@1.3.0")
+ depends_on("rankstr@0.2.0")
+ depends_on("redset@0.2.0")
+ depends_on("shuffile@0.2.0")
+ depends_on("spath@0.2.0 +mpi")
+ depends_on("dtcmp@1.1.4:")
# DTCMP is an optional dependency up until 3.x, required thereafter
variant(
@@ -123,14 +112,15 @@ class Scr(CMakePackage):
"libyogrt", default=True, description="Build SCR with libyogrt for get_time_remaining."
)
depends_on("libyogrt scheduler=slurm", when="+libyogrt resource_manager=SLURM")
+ depends_on("libyogrt scheduler=flux", when="+libyogrt resource_manager=FLUX")
depends_on("libyogrt scheduler=lsf", when="+libyogrt resource_manager=LSF")
depends_on("libyogrt", when="+libyogrt")
# PDSH required up to 3.0rc1, optional thereafter
# TODO spack currently assumes 3.0.0 = 3.0 = 3 < 3.0rc1 < 3.0rc2
- variant("pdsh", default=True, when="@3.0.0,3.0rc2:", description="Enable use of PDSH")
+ variant("pdsh", default=True, when="@3:", description="Enable use of PDSH")
depends_on("pdsh+static_modules", type=("build", "run"), when="+pdsh")
- depends_on("pdsh+static_modules", type=("build", "run"), when="@:2,3.0rc1")
+ depends_on("pdsh+static_modules", type=("build", "run"), when="@:2")
variant(
"scr_config",
@@ -150,7 +140,7 @@ class Scr(CMakePackage):
variant(
"resource_manager",
default=detect_scheduler(),
- values=("SLURM", "APRUN", "LSF", "NONE"),
+ values=("SLURM", "APRUN", "FLUX", "LSF", "NONE"),
multi=False,
description="Resource manager for which to configure SCR.",
)
@@ -165,32 +155,27 @@ class Scr(CMakePackage):
description="Asynchronous data transfer API to use with SCR.",
)
- variant("bbapi", default=True, when="@3.0rc2:", description="Enable IBM BBAPI support")
+ variant("pthreads", default=True, when="@3:", description="Enable Pthread support")
+ depends_on("axl+pthreads", when="+pthreads")
+
+ variant("bbapi", default=False, when="@3:", description="Enable IBM BBAPI support")
depends_on("axl+bbapi", when="+bbapi")
depends_on("axl~bbapi", when="~bbapi")
variant(
"bbapi_fallback",
default=False,
- when="@3:",
+ when="@3: +bbapi",
description="Using BBAPI, if source or destination don't support \
file extents then fallback to pthreads",
)
- depends_on("axl+bbapi_fallback", when="+bbapi_fallback")
- variant(
- "bbapi_fallback",
- default=False,
- when="@3.0rc2: +bbapi",
- description="Using BBAPI, if source or destination don't support \
- file extents then fallback to pthreads",
- )
- depends_on("axl+bbapi+bbapi_fallback", when="@3.0rc2: +bbapi_fallback")
+ depends_on("axl+bbapi+bbapi_fallback", when="@3: +bbapi_fallback")
- variant("dw", default=False, when="@3.0rc2:", description="Enable Cray DataWarp support")
+ variant("dw", default=False, when="@3:", description="Enable Cray DataWarp support")
depends_on("axl+dw", when="+dw")
depends_on("axl~dw", when="~dw")
- variant("examples", default=True, when="@3.0rc2:", description="Build SCR example programs")
+ variant("examples", default=True, when="@3:", description="Build SCR example programs")
variant(
"file_lock",
@@ -209,7 +194,7 @@ class Scr(CMakePackage):
# capturing SCR and syslog messages in a database')
# depends_on('mysql', when='+mysql')
- variant("shared", default=True, when="@3.0rc2:", description="Build with shared libraries")
+ variant("shared", default=True, when="@3:", description="Build with shared libraries")
depends_on("libyogrt+static", when="~shared")
for comp in cmpnts:
depends_on(comp + "+shared", when="+shared")
@@ -219,7 +204,7 @@ class Scr(CMakePackage):
# TODO: Expose `tests` and `resource_manager` variants in components and
# then propogate their setting through components.
- variant("tests", default=True, when="@3.0rc2:", description="Build with CTest included")
+ variant("tests", default=True, when="@3:", description="Build with CTest included")
# The default cache and control directories should be placed in tmpfs if available.
# On Linux, /dev/shm is a common tmpfs location. Other platforms, like macOS,
@@ -255,7 +240,17 @@ class Scr(CMakePackage):
spec = self.spec
args = []
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
args.append(self.define_from_variant("ENABLE_FORTRAN", "fortran"))
+ args.append(self.define_from_variant("ENABLE_IBM_BBAPI", "bbapi"))
+ args.append(self.define_from_variant("ENABLE_CRAY_DW", "dw"))
+ args.append(self.define_from_variant("ENABLE_EXAMPLES", "examples"))
+ args.append(self.define_from_variant("ENABLE_YOGRT", "libyogrt"))
+ # args.append(self.define_from_variant('ENABLE_MYSQL', 'mysql'))
+ args.append(self.define_from_variant("ENABLE_PDSH", "pdsh"))
+ args.append(self.define_from_variant("ENABLE_PTHREADS", "pthreads"))
+ args.append(self.define_from_variant("ENABLE_TESTS", "tests"))
+ args.append(self.define_from_variant("SCR_ASYNC_API", "async_api"))
args.append(self.define_from_variant("SCR_FILE_LOCK", "file_lock"))
args.append(self.define_from_variant("SCR_CACHE_BASE", "cache_base"))
args.append(self.define_from_variant("SCR_CNTL_BASE", "cntl_base"))
@@ -277,34 +272,18 @@ class Scr(CMakePackage):
cmpnts = ["axl", "dtcmp", "er", "kvtree", "rankstr", "redset", "shuffile", "spath"]
for comp in cmpnts:
args.append(self.define("WITH_" + comp.upper() + "_PREFIX", spec[comp].prefix))
- else:
- # dtcmp optional before this point
- if "+dtcmp" in spec:
- args.append(self.define("WITH_DTCMP_PREFIX", spec["dtcmp"].prefix))
-
- # Only used prior to version 3
- args.append(self.define_from_variant("SCR_ASYNC_API", "async_api"))
-
- if spec.satisfies("@3.0rc2:"):
- args.append(self.define_from_variant("ENABLE_IBM_BBAPI", "bbapi"))
- args.append(self.define_from_variant("ENABLE_CRAY_DW", "dw"))
- args.append(self.define_from_variant("ENABLE_EXAMPLES", "examples"))
- args.append(self.define_from_variant("ENABLE_YOGRT", "libyogrt"))
- # args.append(self.define_from_variant('ENABLE_MYSQL', 'mysql'))
- args.append(self.define_from_variant("ENABLE_PDSH", "pdsh"))
- args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- args.append(self.define_from_variant("ENABLE_TESTS", "tests"))
# PDSH optional from this point on
if "+pdsh" in spec:
args.append(self.define("WITH_PDSH_PREFIX", spec["pdsh"].prefix))
else:
+ # dtcmp optional before this point
+ if "+dtcmp" in spec:
+ args.append(self.define("WITH_DTCMP_PREFIX", spec["dtcmp"].prefix))
+
# PDSH required before this point
args.append(self.define("WITH_PDSH_PREFIX", spec["pdsh"].prefix))
- if "platform=cray" in spec:
- args.append(self.define("SCR_LINK_STATIC", False))
-
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/screen/package.py b/var/spack/repos/builtin/packages/screen/package.py
index d4c4dc5ecf..1d450d6dbb 100644
--- a/var/spack/repos/builtin/packages/screen/package.py
+++ b/var/spack/repos/builtin/packages/screen/package.py
@@ -37,6 +37,8 @@ class Screen(AutotoolsPackage, GNUMirrorPackage):
version("3.7.2", sha256="6a882385d2810b8220b9e03c75c5fa184dcbd1afdb95974bbac396bb749a6cc0")
version("3.7.1", sha256="0cd5b1a2cbba6bb2f2bc2145aec650abf02541fd3a2071117a99e4982f6e01da")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
depends_on("autoconf", type="build", when="@4.9.0:")
depends_on("automake", type="build", when="@4.9.0:")
diff --git a/var/spack/repos/builtin/packages/scripts/package.py b/var/spack/repos/builtin/packages/scripts/package.py
index d7e3b34c3d..c34ecb5bd0 100644
--- a/var/spack/repos/builtin/packages/scripts/package.py
+++ b/var/spack/repos/builtin/packages/scripts/package.py
@@ -14,6 +14,8 @@ class Scripts(AutotoolsPackage, XorgPackage):
version("1.0.1", sha256="0ed6dabdbe821944d61830489ad5f21bd934550456b9157a1cd8a32f76e08279")
+ depends_on("cxx", type="build") # generated
+
depends_on("libx11")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/scrot/package.py b/var/spack/repos/builtin/packages/scrot/package.py
index 0aeb0ba2a0..c28f40fb7f 100644
--- a/var/spack/repos/builtin/packages/scrot/package.py
+++ b/var/spack/repos/builtin/packages/scrot/package.py
@@ -20,8 +20,9 @@ class Scrot(AutotoolsPackage):
version("1.6", sha256="42f64d38f04ec530c8b4ebdae04cce8b6893b2f8d30627391d390edcba917090")
version("1.5", sha256="42fcf1c97940f4b4e34ca69990a0fc9b98991357bd6a4b67f30ebe0ccc10f093")
+ depends_on("c", type="build")
+
depends_on("giblib", when="@:1.5")
depends_on("imlib2")
- depends_on("libtool")
depends_on("libxcomposite")
depends_on("libxfixes")
diff --git a/var/spack/repos/builtin/packages/scs/package.py b/var/spack/repos/builtin/packages/scs/package.py
index cdb33aa6fb..585998738a 100644
--- a/var/spack/repos/builtin/packages/scs/package.py
+++ b/var/spack/repos/builtin/packages/scs/package.py
@@ -17,6 +17,8 @@ class Scs(MakefilePackage):
version("2.1.1", sha256="0e20b91e8caf744b84aa985ba4e98cc7235ee33612b2bad2bf31ea5ad4e07d93")
+ depends_on("c", type="build") # generated
+
variant("cuda", default=False, description="Build with Cuda support")
depends_on("blas")
diff --git a/var/spack/repos/builtin/packages/sctk/package.py b/var/spack/repos/builtin/packages/sctk/package.py
index b0c6ff3074..f3311e5721 100644
--- a/var/spack/repos/builtin/packages/sctk/package.py
+++ b/var/spack/repos/builtin/packages/sctk/package.py
@@ -37,6 +37,9 @@ class Sctk(Package):
url="https://www.openslr.org/resources/4/sctk-2.4.0-20091110-0958.tar.bz2",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
make("config")
make("all")
diff --git a/var/spack/repos/builtin/packages/sdl2-image/package.py b/var/spack/repos/builtin/packages/sdl2-image/package.py
index 4e94341aec..87f2265999 100644
--- a/var/spack/repos/builtin/packages/sdl2-image/package.py
+++ b/var/spack/repos/builtin/packages/sdl2-image/package.py
@@ -15,7 +15,10 @@ class Sdl2Image(AutotoolsPackage):
license("Zlib")
+ version("2.8.2", sha256="8f486bbfbcf8464dd58c9e5d93394ab0255ce68b51c5a966a918244820a76ddc")
version("2.6.3", sha256="931c9be5bf1d7c8fae9b7dc157828b7eee874e23c7f24b44ba7eff6b4836312c")
version("2.0.1", sha256="3a3eafbceea5125c04be585373bfd8b3a18f259bd7eae3efc4e6d8e60e0d7f64")
+ depends_on("c", type="build") # generated
+
depends_on("sdl2")
diff --git a/var/spack/repos/builtin/packages/sdl2-ttf/package.py b/var/spack/repos/builtin/packages/sdl2-ttf/package.py
index 9bc5c7a69b..9ab51ccaf3 100644
--- a/var/spack/repos/builtin/packages/sdl2-ttf/package.py
+++ b/var/spack/repos/builtin/packages/sdl2-ttf/package.py
@@ -17,6 +17,9 @@ class Sdl2Ttf(CMakePackage):
version("2.20.2", sha256="9dc71ed93487521b107a2c4a9ca6bf43fb62f6bddd5c26b055e6b91418a22053")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sdl2")
maintainers("georgemalerbo", "amklinv")
diff --git a/var/spack/repos/builtin/packages/sdl2/package.py b/var/spack/repos/builtin/packages/sdl2/package.py
index d8c598de9f..55ea3b0be6 100644
--- a/var/spack/repos/builtin/packages/sdl2/package.py
+++ b/var/spack/repos/builtin/packages/sdl2/package.py
@@ -20,15 +20,19 @@ class Sdl2(CMakePackage):
license("Zlib")
+ version("2.30.3", sha256="820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec")
version("2.26.5", sha256="ad8fea3da1be64c83c45b1d363a6b4ba8fd60f5bde3b23ec73855709ec5eabf7")
version("2.24.1", sha256="bc121588b1105065598ce38078026a414c28ea95e66ed2adab4c44d80b309e1b")
version("2.0.22", sha256="fe7cbf3127882e3fc7259a75a0cb585620272c51745d3852ab9dd87960697f2e")
version("2.0.14", sha256="d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc")
version("2.0.5", sha256="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.5:", type="build")
if sys.platform.startswith("linux"):
depends_on("libxext", type="link")
def cmake_args(self):
- return ["-DSSEMATH={0}".format("OFF" if self.spec.target.family == "aarch64" else "ON")]
+ return [f"-DSSEMATH={'OFF' if self.spec.target.family == 'aarch64' else 'ON'}"]
diff --git a/var/spack/repos/builtin/packages/sdsl-lite/package.py b/var/spack/repos/builtin/packages/sdsl-lite/package.py
index 928f3ca12c..b8f44c8dc7 100644
--- a/var/spack/repos/builtin/packages/sdsl-lite/package.py
+++ b/var/spack/repos/builtin/packages/sdsl-lite/package.py
@@ -20,6 +20,9 @@ class SdslLite(Package):
expand=False,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("tar", type="build")
diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py
index 13726f1607..358ff1148c 100644
--- a/var/spack/repos/builtin/packages/seacas/package.py
+++ b/var/spack/repos/builtin/packages/seacas/package.py
@@ -13,6 +13,8 @@ from spack.package import *
# KOKKOS support using an external (i.e. spack-supplied) kokkos library.
# Data Warehouse (FAODEL) enable/disable
+is_windows = sys.platform == "win32"
+
class Seacas(CMakePackage):
"""The SEACAS Project contains the Exodus and IOSS I/O libraries
@@ -29,11 +31,26 @@ class Seacas(CMakePackage):
url = "https://github.com/sandialabs/seacas/archive/v2019-08-20.tar.gz"
maintainers("gsjaardema")
- license("Intel")
+ license("BSD-3-Clause")
# ###################### Versions ##########################
version("master", branch="master")
version(
+ "2024-08-15", sha256="c85130b0dac5ab9a08dcb53c8ccff478122d72b08bd41d99c0adfddc5eb18a52"
+ )
+ version(
+ "2024-07-10", sha256="b2ba6ca80359fed8ed2a8a210052582c7a3b7b837253bd1e9be941047dcab3ff"
+ )
+ version(
+ "2024-06-27", sha256="a28db6aa3d03ff0a54a091210cf867661427f0b22ac08f89a4cc3bd8e0c704b2"
+ )
+ version(
+ "2024-04-03", sha256="edf1aacbde87212b10737d3037107dba5cf7e2cce167863e2ebb200dc1a3fbb5"
+ )
+ version(
+ "2024-03-11", sha256="b849d958b34e77300aaf331f29c3e6fe417fd82600850a82e674a9b7ba4045ff"
+ )
+ version(
"2023-11-27", sha256="fea1c0a6959d46af7478c9c16aac64e76c6dc358da38e2fe8793c15c1cffa8fc"
)
version(
@@ -60,48 +77,80 @@ class Seacas(CMakePackage):
"2022-01-27", sha256="beff12583814dcaf75cf8f1a78bb183c1dcc8937bc18d5206672e3a692db05e0"
)
version(
- "2021-10-11", sha256="f8a6dac813c0937fed4a5377123aa61d47eb459ba87ddf368d02ebe10c2c3a0d"
+ "2021-10-11",
+ sha256="f8a6dac813c0937fed4a5377123aa61d47eb459ba87ddf368d02ebe10c2c3a0d",
+ deprecated=True,
)
version(
- "2021-09-30", sha256="5d061e35e93eb81214da3b67ddda2829cf5efed38a566be6363a9866ba2f9ab3"
+ "2021-09-30",
+ sha256="5d061e35e93eb81214da3b67ddda2829cf5efed38a566be6363a9866ba2f9ab3",
+ deprecated=True,
)
version(
- "2021-05-12", sha256="92663767f0317018d6f6e422e8c687e49f6f7eb2b92e49e837eb7dc0ca0ac33d"
+ "2021-05-12",
+ sha256="92663767f0317018d6f6e422e8c687e49f6f7eb2b92e49e837eb7dc0ca0ac33d",
+ deprecated=True,
)
version(
- "2021-04-05", sha256="76f66eec1fec7aba30092c94c7609495e6b90d9dcb6f35b3ee188304d02c6e04"
+ "2021-04-05",
+ sha256="76f66eec1fec7aba30092c94c7609495e6b90d9dcb6f35b3ee188304d02c6e04",
+ deprecated=True,
)
version(
- "2021-01-20", sha256="7814e81981d03009b6816be3eb4ed3845fd02cc69e006ee008a2cbc85d508246"
+ "2021-01-20",
+ sha256="7814e81981d03009b6816be3eb4ed3845fd02cc69e006ee008a2cbc85d508246",
+ deprecated=True,
)
version(
- "2021-01-06", sha256="b233502a7dc3e5ab69466054cf358eb033e593b8679c6721bf630b03999bd7e5"
+ "2021-01-06",
+ sha256="b233502a7dc3e5ab69466054cf358eb033e593b8679c6721bf630b03999bd7e5",
+ deprecated=True,
)
version(
- "2020-08-13", sha256="e5eaf203eb2dbfb33c61ccde26deea459d058aaea79b0847e2f4bdb0cef1ddcb"
+ "2020-08-13",
+ sha256="e5eaf203eb2dbfb33c61ccde26deea459d058aaea79b0847e2f4bdb0cef1ddcb",
+ deprecated=True,
)
version(
- "2020-05-12", sha256="7fc6915f60568b36e052ba07a77d691c99abe42eaba6ae8a6dc74bb33490ed60"
+ "2020-05-12",
+ sha256="7fc6915f60568b36e052ba07a77d691c99abe42eaba6ae8a6dc74bb33490ed60",
+ deprecated=True,
)
version(
- "2020-03-16", sha256="2eb404f3dcb17c3e7eacf66978372830d40ef3722788207741fcd48417807af6"
+ "2020-03-16",
+ sha256="2eb404f3dcb17c3e7eacf66978372830d40ef3722788207741fcd48417807af6",
+ deprecated=True,
)
version(
- "2020-01-16", sha256="5ae84f61e410a4f3f19153737e0ac0493b144f20feb1bbfe2024f76613d8bff5"
+ "2020-01-16",
+ sha256="5ae84f61e410a4f3f19153737e0ac0493b144f20feb1bbfe2024f76613d8bff5",
+ deprecated=True,
)
version(
- "2019-12-18", sha256="f82cfa276ebc5fe6054852383da16eba7a51c81e6640c73b5f01fc3109487c6f"
+ "2019-12-18",
+ sha256="f82cfa276ebc5fe6054852383da16eba7a51c81e6640c73b5f01fc3109487c6f",
+ deprecated=True,
)
version(
- "2019-10-14", sha256="ca4cf585cdbc15c25f302140fe1f61ee1a30d72921e032b9a854492b6c61fb91"
+ "2019-10-14",
+ sha256="ca4cf585cdbc15c25f302140fe1f61ee1a30d72921e032b9a854492b6c61fb91",
+ deprecated=True,
)
version(
- "2019-08-20", sha256="a82c1910c2b37427616dc3716ca0b3c1c77410db6723aefb5bea9f47429666e5"
+ "2019-08-20",
+ sha256="a82c1910c2b37427616dc3716ca0b3c1c77410db6723aefb5bea9f47429666e5",
+ deprecated=True,
)
version(
- "2019-07-26", sha256="651dac832b0cfee0f63527f563415c8a65b8e4d79242735c1e2aec606f6b2e17"
+ "2019-07-26",
+ sha256="651dac832b0cfee0f63527f563415c8a65b8e4d79242735c1e2aec606f6b2e17",
+ deprecated=True,
)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
# ###################### Variants ##########################
# Package options
# The I/O libraries (exodus, IOSS) are always built
@@ -125,37 +174,103 @@ class Seacas(CMakePackage):
)
# Build options
- variant("fortran", default=True, description="Compile with Fortran support")
- variant("shared", default=True, description="Enables the build of shared libraries")
+ variant("fortran", default=not is_windows, description="Compile with Fortran support.")
+ # Enable this on Windows at your own risk, SEACAS exports no symbols and so cannot be
+ # meaningfully linked against as a shared library
+ variant("shared", default=True, description="Enables the build of shared libraries.")
variant("mpi", default=True, description="Enables MPI parallelism.")
-
+ variant("tests", default=True, description="Enable building the SEACAS tests.")
variant(
- "thread_safe", default=False, description="Enable thread-safe exodus and IOSS libraries"
+ "thread_safe", default=False, description="Enable thread-safe exodus and IOSS libraries."
)
# TPLs (alphabet order)
- variant("adios2", default=False, description="Enable ADIOS2")
- variant("cgns", default=True, description="Enable CGNS")
- variant("faodel", default=False, description="Enable Faodel")
- variant("matio", default=True, description="Compile with matio (MatLab) support")
- variant("metis", default=False, description="Compile with METIS and ParMETIS")
- variant("x11", default=True, description="Compile with X11")
-
+ variant(
+ "adios2",
+ default=False,
+ description="Enable ADIOS2. See https://github.com/ornladios/ADIOS2",
+ )
+ variant("cgns", default=True, description="Enable CGNS.")
+ variant(
+ "faodel",
+ default=False,
+ description="Enable Faodel. See https://github.com/sandialabs/faodel",
+ )
+ variant(
+ "libcatalyst",
+ default=False,
+ description="Enable libcatalyst tpl (catalyst api 2); Kitware insitu library",
+ )
+ variant(
+ "matio",
+ default=True,
+ description="Compile with matio (MatLab) support."
+ " Enables exo2mat and mat2exo translators.",
+ )
+ variant(
+ "metis",
+ default=False,
+ description="Compile with METIS and ParMETIS. "
+ "Provides additional parallel decomposition options.",
+ )
+ variant(
+ "pamgen",
+ default=False,
+ description="Compile with pamgen. "
+ "Provides another ioss database option for internal generation of mesh models.",
+ )
+ variant(
+ "x11",
+ default=True,
+ description="Compile with X11. "
+ "Needed if building blot (visualizer) and fastq (2D mesh generation).",
+ )
+ variant(
+ "zlib",
+ default=False,
+ description="Compile with zlib. "
+ "Sometimes needed when building static libraries on some systems.",
+ )
# ###################### Dependencies ##########################
depends_on("cmake@3.22:", when="@2023-10-24:", type="build")
depends_on("cmake@3.17:", when="@:2023-05-30", type="build")
depends_on("mpi", when="+mpi")
-
+ depends_on("zlib-api", when="+zlib")
+ depends_on("parallel", when="platform=linux", type="run")
+ depends_on("parallel", when="platform=darwin", type="run")
+ depends_on("parallel", when="platform=freebsd", type="run")
+ depends_on("trilinos~exodus+mpi+pamgen", when="+mpi+pamgen")
+ depends_on("trilinos~exodus~mpi+pamgen", when="~mpi+pamgen")
# Always depends on netcdf-c
depends_on("netcdf-c@4.8.0:+mpi+parallel-netcdf", when="+mpi")
depends_on("netcdf-c@4.8.0:~mpi", when="~mpi")
depends_on("hdf5+hl~mpi", when="~mpi")
+ depends_on("hdf5+hl+mpi", when="+mpi")
- depends_on("fmt@10.1.0", when="@2023-10-24:")
+ depends_on("fmt@10:", when="@2024-08-15:")
+ depends_on("fmt@10.2.1:10", when="@2024-03-11:2024-07-10")
+ depends_on("fmt@10.1.0:10", when="@2023-10-24:2023-11-27")
depends_on("fmt@9.1.0", when="@2022-10-14:2023-05-30")
depends_on("fmt@8.1.0:9", when="@2022-03-04:2022-05-16")
+ # if fmt@9.1.0%gcc is mixed with an %apple-clang seacas build
+ # it triggers a bug in apple-clang w.r.t how symbols are mangled
+ # https://github.com/spack/spack/issues/44330
+ conflicts(
+ "^fmt@9%gcc",
+ msg="""Cannot mix gcc/apple-clang toolchains
+ for this library combination.
+ See https://github.com/spack/spack/issues/44330""",
+ when="%apple-clang",
+ )
+
+ depends_on("catch2@3:", when="@2024-03-11:+tests")
+
depends_on("matio", when="+matio")
+
+ depends_on("libcatalyst+mpi~python", when="+libcatalyst+mpi")
+ depends_on("libcatalyst~mpi~python", when="+libcatalyst~mpi")
+
depends_on("libx11", when="+x11")
with when("+cgns"):
@@ -163,7 +278,7 @@ class Seacas(CMakePackage):
depends_on("cgns@4.2.0:~mpi+scoping", when="~mpi")
with when("+adios2"):
- depends_on("adios2@master")
+ depends_on("adios2@2.10.1")
depends_on("adios2~mpi", when="~mpi")
depends_on("adios2+mpi", when="+mpi")
@@ -179,6 +294,18 @@ class Seacas(CMakePackage):
when="@:2021-01-20",
msg="The Faodel TPL is only compatible with @2021-04-05 and later.",
)
+ conflicts("+shared", when="platform=windows")
+ conflicts("+x11", when="platform=windows")
+ # Remove use of variable in array assignment (triggers c2057 on MSVC)
+ # See https://github.com/sandialabs/seacas/issues/438
+ patch(
+ "https://github.com/sandialabs/seacas/commit/29a9ebeccb5a656b4b334fa6af904689da9ffddc.diff?full_index=1",
+ sha256="d088208511fb0a087e2bf70ae70676e59bfefe8d8f5b24bd53b829566f5147d2",
+ when="@:2023-10-24",
+ )
+
+ # Based on install-tpl.sh script, cereal seems to only be used when faodel enabled
+ depends_on("cereal", when="@2021-04-02: +faodel")
def setup_run_environment(self, env):
env.prepend_path("PYTHONPATH", self.prefix.lib)
@@ -199,10 +326,13 @@ class Seacas(CMakePackage):
options.extend(
[
- define(project_name_base + "_ENABLE_TESTS", True),
+ from_variant(project_name_base + "_ENABLE_TESTS", "tests"),
define(project_name_base + "_ENABLE_CXX11", True),
define(project_name_base + "_ENABLE_Kokkos", False),
define(project_name_base + "_HIDE_DEPRECATED_CODE", False),
+ # Seacas MSVC tests are not tested with Zoltan
+ # which causes build errors, skip for now
+ define(project_name_base + "_ENABLE_Zoltan", not is_windows),
from_variant("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "shared"),
from_variant("BUILD_SHARED_LIBS", "shared"),
from_variant("SEACASExodus_ENABLE_THREADSAFE", "thread_safe"),
@@ -211,11 +341,13 @@ class Seacas(CMakePackage):
from_variant("TPL_ENABLE_Pthread", "thread_safe"),
from_variant("TPL_ENABLE_X11", "x11"),
from_variant(project_name_base + "_ENABLE_Fortran", "fortran"),
+ define(project_name_base + "_ENABLE_SEACAS", True),
]
)
-
+ if "~shared" in self.spec and not is_windows:
+ options.append(self.define(f"{project_name_base}_EXTRA_LINK_FLAGS", "z;dl"))
options.append(from_variant("TPL_ENABLE_MPI", "mpi"))
- if "+mpi" in spec:
+ if "+mpi" in spec and not is_windows:
options.extend(
[
define("CMAKE_C_COMPILER", spec["mpi"].mpicc),
@@ -307,7 +439,7 @@ class Seacas(CMakePackage):
[define("TPL_ENABLE_Netcdf", True), define("NetCDF_ROOT", spec["netcdf-c"].prefix)]
)
- if "+parmetis" in spec:
+ if spec.satisfies("+metis+mpi"):
options.extend(
[
define("TPL_ENABLE_METIS", True),
@@ -341,6 +473,9 @@ class Seacas(CMakePackage):
[define("TPL_ENABLE_METIS", False), define("TPL_ENABLE_ParMETIS", False)]
)
+ options.append(from_variant(f"{project_name_base}_ENABLE_Pamgen", "pamgen"))
+ options.append(from_variant("TPL_ENABLE_Pamgen", "pamgen"))
+
options.append(from_variant("TPL_ENABLE_Matio", "matio"))
if "+matio" in spec:
options.append(define("Matio_ROOT", spec["matio"].prefix))
@@ -354,10 +489,22 @@ class Seacas(CMakePackage):
if pkg.lower() in spec:
options.append(define(pkg + "_ROOT", spec[pkg.lower()].prefix))
+ if "+faodel" in spec:
+ # faodel headers are under $faodel_prefix/include/faodel but seacas
+ # leaves off the faodel part
+ faodel_incdir = spec["faodel"].prefix.include
+ faodel_incdir2 = spec["faodel"].prefix.include.faodel
+ faodel_incdirs = [faodel_incdir, faodel_incdir2]
+ options.append(define("Faodel_INCLUDE_DIRS", ";".join(faodel_incdirs)))
+ options.append(define("Faodel_LIBRARY_DIRS", spec["faodel"].prefix.lib))
+
options.append(from_variant("TPL_ENABLE_ADIOS2", "adios2"))
if "+adios2" in spec:
options.append(define("ADIOS2_ROOT", spec["adios2"].prefix))
+ if "+libcatalyst" in spec:
+ options.append(define("TPL_ENABLE_Catalyst2", "ON"))
+
# ################# RPath Handling ######################
if sys.platform == "darwin" and macos_version() >= Version("10.12"):
# use @rpath on Sierra due to limit of dynamic loader
@@ -366,3 +513,9 @@ class Seacas(CMakePackage):
options.append(define("CMAKE_INSTALL_NAME_DIR", self.prefix.lib))
return options
+
+ @run_after("install")
+ def symlink_parallel(self):
+ if not self.spec.dependencies("parallel"):
+ return
+ symlink(self.spec["parallel"].prefix.bin.parallel, self.prefix.bin.parallel)
diff --git a/var/spack/repos/builtin/packages/seacr/package.py b/var/spack/repos/builtin/packages/seacr/package.py
new file mode 100644
index 0000000000..fafe5e6c9d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/seacr/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Seacr(Package):
+ """SEACR (Sparse Enrichment Analysis for CUT&RUN) is intended to call peaks and
+ enriched regions from sparse CUT&RUN or chromatin profiling data in which the
+ background is dominated by zeros"""
+
+ homepage = "https://github.com/FredHutch/SEACR"
+ git = "https://github.com/FredHutch/SEACR.git"
+
+ license("GPL-2.0-only", checked_by="A-N-Other")
+
+ version("1.4-b2", tag="v1.4-beta.2", commit="5179a70494eb129fcb1d640177de73f6509654e7")
+ version("1.3", tag="v1.3", commit="5a0efe59f06fb17cf9d34d415bb0c1a1f7a77a3c", preferred=True)
+
+ # Dependencies as per the README.md
+ depends_on("r", type="run")
+ depends_on("bedtools2", type="run")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ script_name = f"SEACR_{self.version.up_to(2)}"
+ os.chmod(f"{script_name}.sh", 0o755)
+ install(f"{script_name}.sh", prefix.bin.SEACR)
+ install(f"{script_name}.R", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/seal/package.py b/var/spack/repos/builtin/packages/seal/package.py
index a101a27623..59f8c99194 100644
--- a/var/spack/repos/builtin/packages/seal/package.py
+++ b/var/spack/repos/builtin/packages/seal/package.py
@@ -31,3 +31,6 @@ class Seal(CMakePackage):
version("3.6.1", sha256="e399c0df7fb60ad450a0ccfdc81b99d19308d0fc1f730d4cad4748dfb2fdb516")
version("3.6.0", sha256="79c0e45bf301f4577a7633b14e8b26e37eefc89fd4f6a29d13f87e5f22a372ad")
version("3.5.9", sha256="23bf3bf7ae1dae5dae271244a5baa66fa01856c52e263fe8368c3a40f2399fc7")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/sed/package.py b/var/spack/repos/builtin/packages/sed/package.py
index d84c3421f6..5a6b21b4b9 100644
--- a/var/spack/repos/builtin/packages/sed/package.py
+++ b/var/spack/repos/builtin/packages/sed/package.py
@@ -20,11 +20,15 @@ class Sed(AutotoolsPackage, GNUMirrorPackage):
version("4.8", sha256="f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633")
version("4.2.2", sha256="f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7")
+ depends_on("c", type="build") # generated
+
# Avoid symlinking GNUMakefile to GNUMakefile
build_directory = "spack-build"
executables = ["^sed$"]
+ tags = ["build-tools"]
+
def url_for_version(self, version):
if Version("4.2") <= version < Version("4.3.0"):
self.gnu_mirror_path = "sed/sed-{0}.tar.bz2".format(version)
@@ -40,8 +44,7 @@ class Sed(AutotoolsPackage, GNUMirrorPackage):
return match.group(1) if match else None
def flag_handler(self, name, flags):
- iflags = []
if name == "cflags":
if self.spec.satisfies("%oneapi@2023.0.0:"):
- iflags.append("-Wno-error=incompatible-function-pointer-types")
- return (iflags, None, None)
+ flags.append("-Wno-error=incompatible-function-pointer-types")
+ return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/seissol/package.py b/var/spack/repos/builtin/packages/seissol/package.py
new file mode 100644
index 0000000000..50944306f2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/seissol/package.py
@@ -0,0 +1,364 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Seissol(CMakePackage, CudaPackage, ROCmPackage):
+ """Seissol - A scientific software for the numerical simulation
+ of seismic wave phenomena and earthquake dynamics.
+ """
+
+ homepage = "http://www.seissol.org"
+ git = "https://github.com/SeisSol/SeisSol.git"
+ version("master", branch="master", submodules=True)
+ # we cannot use the tar.gz file because it does not contains submodules
+ version(
+ "1.3.0", tag="v1.3.0", commit="91377508af4412914d707b04481f8b678b1c4044", submodules=True
+ )
+ version(
+ "1.2.0", tag="v1.2.0", commit="2057e6e81965e0789128c6d177592800bcf956e1", submodules=True
+ )
+ version(
+ "1.1.4", tag="v1.1.4", commit="6d301757378ad8446173e0a12c095a695a708aaf", submodules=True
+ )
+ version(
+ "1.1.3", tag="v1.1.3", commit="01ae1b127fcc6f766b819d2e797df6a3547d730a", submodules=True
+ )
+ version(
+ "1.1.2", tag="v1.1.2", commit="71002c1c1498ebd6f50a954731da68fa4f9d436b", submodules=True
+ )
+
+ version(
+ "1.0.1", tag="v1.0.1", commit="9b1b0ec970af4ad79a155c63035234b660838476", submodules=True
+ )
+
+ maintainers("Thomas-Ulrich", "davschneller", "vikaskurapati")
+
+ variant("asagi", default=True, description="Use ASAGI for material input")
+ variant(
+ "convergence_order",
+ default="4",
+ description="polynomial degree plus one",
+ values=(str(v) for v in range(2, 9)),
+ multi=False,
+ )
+ variant(
+ "precision",
+ default="double",
+ description="float numerical precision",
+ values=("single", "double"),
+ multi=False,
+ )
+ variant(
+ "dr_quad_rule",
+ default="stroud",
+ description="dynamic rupture quadrature rule",
+ values=("stroud", "dunavant"),
+ multi=False,
+ )
+ variant(
+ "plasticity_method",
+ default="nb",
+ description="Plasticity method",
+ values=("nb", "ib"),
+ multi=False,
+ )
+ variant(
+ "equations",
+ default="elastic",
+ description="equation set used",
+ values=("elastic", "anisotropic", "viscoelastic2", "poroelastic"),
+ multi=False,
+ )
+ variant(
+ "number_of_mechanisms", default="3", description="number of mechanisms for viscoelasticity"
+ )
+ variant("netcdf", default=True, description="Enable Netcdf")
+ variant(
+ "graph_partitioning_libs",
+ default="parmetis",
+ description="graph partitioning library for mesh partitioning",
+ values=("none", "parmetis", "ptscotch", "parhip"),
+ multi=True,
+ )
+
+ # GPU options
+ variant("intel_gpu", default=False, description="Compile for Intel GPUs")
+ variant(
+ "intel_gpu_arch",
+ default="none",
+ values=("none", "bdw", "skl", "pvc"),
+ description="The Intel GPU to compile for",
+ when="+intel_gpu",
+ )
+
+ forwarded_variants = ["cuda", "intel_gpu", "rocm"]
+ for v in forwarded_variants:
+ variant(
+ "sycl_backend",
+ default="acpp",
+ description="SYCL backend to use for DR and point sources",
+ values=("acpp", "oneapi"),
+ when=f"+{v}",
+ )
+ variant(
+ "sycl_gemm",
+ default=False,
+ description="Use SYCL also for the wave propagation part (default for Intel GPUs)",
+ when=f"+{v}",
+ )
+
+ requires(
+ "-cuda -rocm -intel_gpu",
+ "+cuda",
+ "+rocm",
+ "+intel_gpu",
+ policy="one_of",
+ msg="You may either compile for one GPU backend, or for CPU.",
+ )
+
+ requires("%oneapi", when="sycl_backend=oneapi")
+
+ depends_on("hipsycl@0.9.3: +cuda", when="+cuda sycl_backend=acpp")
+
+ # TODO: this one needs to be +rocm as well--but that's not implemented yet
+ depends_on("hipsycl@develop", when="+rocm sycl_backend=acpp")
+
+ # TODO: extend as soon as level zero is available
+ depends_on("hipsycl@develop", when="+intel_gpu sycl_backend=acpp")
+
+ # TODO: once adaptivecpp supports NVHPC, forward that (SYCL_USE_NVHPC)
+
+ # GPU architecture requirements
+ conflicts(
+ "cuda_arch=none",
+ when="+cuda",
+ msg="A value for cuda_arch must be specified. Add cuda_arch=XX",
+ )
+
+ conflicts(
+ "amdgpu_target=none",
+ when="+rocm",
+ msg="A value for amdgpu_arch must be specified. Add amdgpu_arch=XX",
+ )
+
+ conflicts(
+ "intel_gpu_arch=none",
+ when="+intel_gpu",
+ msg="A value for intel_gpu_arch must be specified. Add intel_gpu_arch=XX",
+ )
+
+ conflicts(
+ "%intel",
+ when="@1.3:",
+ msg="The Intel compiler is unsupported from v1.3 onward. Please use e.g.gcc or oneapi",
+ )
+
+ variant(
+ "gemm_tools_list",
+ default="LIBXSMM,PSpaMM",
+ description="gemm toolkit(s) for the (CPU) code generator",
+ values=("LIBXSMM", "MKL", "OpenBLAS", "BLIS", "PSpaMM", "Eigen", "LIBXSMM_JIT"),
+ multi=True,
+ )
+
+ variant("memkind", default=True, description="Use memkind library for hbw memory support")
+
+ depends_on("mpi")
+
+ with when("+cuda"):
+ for var in ["openmpi", "mpich", "mvapich", "mvapich2", "mvapich2-gdr"]:
+ depends_on(f"{var} +cuda", when=f"^[virtuals=mpi] {var}")
+
+ with when("+rocm"):
+ for var in ["mpich", "mvapich2-gdr"]:
+ depends_on(f"{var} +rocm", when=f"^[virtuals=mpi] {var}")
+
+ # with cuda 12 and llvm 14:15, we have the issue: "error: no template named 'texture"
+ # https://github.com/llvm/llvm-project/issues/61340
+ conflicts("cuda@12", when="+cuda ^llvm@14:15")
+ depends_on("cuda@11:", when="+cuda")
+ depends_on("hip", when="+rocm")
+
+ # graph partitioning
+ with when("graph_partitioning_libs=parmetis"):
+ depends_on("parmetis +int64 +shared")
+ depends_on("metis +int64 +shared")
+
+ depends_on(
+ "scotch +mpi +mpi_thread +shared +threads +int64", when="graph_partitioning_libs=ptscotch"
+ )
+ depends_on("kahip", when="graph_partitioning_libs=parhip")
+
+ depends_on("hdf5 +shared +threadsafe +hl +mpi")
+
+ depends_on("netcdf-c@4.6: +shared +mpi", when="+netcdf")
+
+ depends_on("asagi +mpi +mpi3", when="+asagi")
+
+ depends_on("easi ~asagi jit=impalajit,lua", when="~asagi")
+ depends_on("easi +asagi jit=impalajit,lua", when="+asagi")
+
+ depends_on("intel-mkl threads=none", when="gemm_tools_list=MKL")
+ depends_on("blis threads=none", when="gemm_tools_list=BLIS")
+ depends_on("openblas threads=none", when="gemm_tools_list=OpenBLAS")
+ depends_on("libxsmm@main", when="gemm_tools_list=LIBXSMM_JIT")
+
+ conflicts("gemm_tools_list=LIBXSMM", when="gemm_tools_list=LIBXSMM_JIT")
+
+ depends_on("memkind", when="+memkind target=x86_64:")
+
+ depends_on("yaml-cpp@0.6.2")
+ depends_on("eigen@3.4.0")
+
+ # build dependencies (code generation)
+ with default_args(type="build"):
+ # https://seissol.readthedocs.io/en/latest/installing-dependencies.html
+ depends_on("cmake@3.20:")
+ depends_on("python@3.9:")
+ depends_on("py-setuptools")
+ depends_on("py-numpy@1.12:")
+ depends_on("py-scipy")
+ depends_on("py-matplotlib")
+ depends_on("py-pspamm", when="gemm_tools_list=PSpaMM")
+
+ forwarded_variants = ["cuda", "intel_gpu", "rocm"]
+ for v in forwarded_variants:
+ depends_on("py-gemmforge", when=f"+{v}")
+ depends_on("py-chainforgecodegen", when=f"+{v}")
+
+ depends_on("libxsmm@=1.17 +generator", when="gemm_tools_list=LIBXSMM target=x86_64:")
+
+ def cmake_args(self):
+ args = [
+ "-DMPI=ON",
+ self.define_from_variant("ASAGI", "asagi"),
+ self.define_from_variant("PRECISION", "precision"),
+ self.define_from_variant("PLASTICITY_METHOD", "plasticity_method"),
+ self.define_from_variant("DR_QUAD_RULE", "dr_quad_rule"),
+ self.define_from_variant("ORDER", "convergence_order"),
+ self.define_from_variant("EQUATIONS", "equations"),
+ self.define_from_variant("NETCDF", "netcdf"),
+ ]
+
+ gemm_tools_list = ",".join(self.spec.variants["gemm_tools_list"].value)
+ args.append(f"-DGEMM_TOOLS_LIST={gemm_tools_list}")
+
+ graph_partitioning_libs = ",".join(self.spec.variants["graph_partitioning_libs"].value)
+ args.append(f"-DGRAPH_PARTITIONING_LIBS={graph_partitioning_libs}")
+
+ if self.spec.variants["equations"].value != "viscoelastic2":
+ args.append("-DNUMBER_OF_MECHANISMS=0")
+ else:
+ args.append(self.define_from_variant("NUMBER_OF_MECHANISMS", "number_of_mechanisms"))
+
+ with_gpu = (
+ self.spec.satisfies("+cuda")
+ or self.spec.satisfies("+rocm")
+ or self.spec.satisfies("+intel_gpu")
+ )
+
+ if with_gpu:
+ # Nvidia GPUs
+ if self.spec.satisfies("+cuda"):
+ cuda_arch = self.spec.variants["cuda_arch"].value[0]
+ args.append(f"-DDEVICE_ARCH=sm_{cuda_arch}")
+ args.append("-DUSE_GRAPH_CAPTURING=ON -DENABLE_PROFILING_MARKERS=ON")
+ if self.spec.satisfies("~sycl_gemm"):
+ args.append("-DDEVICE_BACKEND=cuda")
+
+ # ROCm/AMD GPUs
+ if self.spec.satisfies("+rocm"):
+ amdgpu_target = self.spec.variants["amdgpu_target"].value[0]
+ args.append(f"-DDEVICE_ARCH={amdgpu_target}")
+ args.append("-DENABLE_PROFILING_MARKERS=ON")
+
+ if self.spec.satisfies("+rocm@:5.6"):
+ args.append("-DUSE_GRAPH_CAPTURING=OFF")
+ else:
+ args.append("-DUSE_GRAPH_CAPTURING=ON")
+
+ if self.spec.satisfies("~sycl_gemm"):
+ args.append("-DDEVICE_BACKEND=hip")
+
+ # Intel GPUs
+ if self.spec.satisfies("+intel_gpu"):
+ assert self.spec.variants["intel_gpu_arch"].value != "none"
+ intel_gpu_arch = self.spec.variants["intel_gpu_arch"].value
+ if self.spec.satisfies("@:1.1.3"):
+ args.append("-DUSE_GRAPH_CAPTURING=OFF")
+ else:
+ args.append("-DUSE_GRAPH_CAPTURING=ON")
+ args.append(f"-DDEVICE_ARCH={intel_gpu_arch}")
+
+ # SYCL
+ sycl_backends = {"acpp": "hipsycl", "oneapi": "oneapi"}
+ syclcc_backends = {"acpp": "hipsycl", "oneapi": "dpcpp"}
+
+ sycl_backend = self.spec.variants["sycl_backend"].value
+ args.append(f"-DSYCLCC={syclcc_backends[sycl_backend]}")
+ if self.spec.satisfies("+sycl_gemm"):
+ args.append(f"-DDEVICE_BACKEND={sycl_backends[sycl_backend]}")
+
+ # CPU arch
+
+ # cf. https://spack.readthedocs.io/en/latest/basic_usage.html#support-for-specific-microarchitectures
+
+ # basic family matching
+ hostarch = "noarch"
+ if str(self.spec.target) == "aarch64":
+ hostarch = "neon"
+ if str(self.spec.target) == "x86_64":
+ # pure x86_64v1 doesn't support anything above SSE3
+ hostarch = "noarch"
+ if str(self.spec.target) == "x86_64_v2":
+ # AVX is only required for x86_64v3 and upwards
+ hostarch = "wsm"
+ if str(self.spec.target) == "x86_64_v3":
+ hostarch = "hsw"
+ if str(self.spec.target) == "x86_64_v4":
+ hostarch = "skx"
+
+ # specific architecture matching
+ if self.spec.target >= "westmere":
+ hostarch = "wsm"
+ if self.spec.target >= "sandybridge":
+ hostarch = "snb"
+ if self.spec.target >= "haswell":
+ hostarch = "hsw"
+ if self.spec.target >= "mic_knl":
+ hostarch = "knl"
+ if self.spec.target >= "skylake_avx512":
+ hostarch = "skx"
+ if self.spec.target >= "zen":
+ hostarch = "naples"
+ if self.spec.target >= "zen2":
+ hostarch = "rome"
+ if self.spec.target >= "zen3":
+ hostarch = "milan"
+ if self.spec.target >= "zen4":
+ hostarch = "bergamo"
+ if self.spec.target >= "thunderx2":
+ hostarch = "thunderx2t99"
+ if self.spec.target >= "power9":
+ hostarch = "power9"
+ if self.spec.target >= "m1":
+ hostarch = "apple-m1"
+ if self.spec.target >= "m2":
+ hostarch = "apple-m2"
+ if self.spec.target >= "a64fx":
+ hostarch = "a64fx"
+
+ args.append(f"-DHOST_ARCH={hostarch}")
+
+ args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
+
+ return args
+
+ def setup_run_environment(self, env):
+ # for seissol-launch
+ env.prepend_path("PATH", self.prefix.share)
diff --git a/var/spack/repos/builtin/packages/selalib/package.py b/var/spack/repos/builtin/packages/selalib/package.py
index 0486604567..ade72efed1 100644
--- a/var/spack/repos/builtin/packages/selalib/package.py
+++ b/var/spack/repos/builtin/packages/selalib/package.py
@@ -18,6 +18,10 @@ class Selalib(CMakePackage):
version("main", branch="main")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("fmempool", default=False, description="Use memory pool")
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=True, description="Build with OpenMP support")
diff --git a/var/spack/repos/builtin/packages/semiprof/package.py b/var/spack/repos/builtin/packages/semiprof/package.py
index d26b4248c7..2a04757154 100644
--- a/var/spack/repos/builtin/packages/semiprof/package.py
+++ b/var/spack/repos/builtin/packages/semiprof/package.py
@@ -21,6 +21,8 @@ class Semiprof(CMakePackage):
version("0.1", sha256="4fb3823c65a4f5dfbe05e8cbe1911dfd25cd7740597f82c7b3a84472de26f0dc")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
return [
self.define("SEMIPROF_WITH_INSTALL", True),
diff --git a/var/spack/repos/builtin/packages/sensei/package.py b/var/spack/repos/builtin/packages/sensei/package.py
index 7f79d7df11..ab59e1983a 100644
--- a/var/spack/repos/builtin/packages/sensei/package.py
+++ b/var/spack/repos/builtin/packages/sensei/package.py
@@ -35,6 +35,9 @@ class Sensei(CMakePackage):
version("1.1.0", sha256="769e0b5db50be25666c0d13176a7e4f89cbffe19cdc12349437d0efff615b200")
version("1.0.0", sha256="5b8609352048e048e065a7b99f615a602f84b3329085e40274341488ef1b9522")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enables shared libraries")
variant("ascent", default=False, description="Build with ParaView-Catalyst support")
variant("catalyst", default=False, description="Build with ParaView-Catalyst support")
@@ -85,11 +88,13 @@ class Sensei(CMakePackage):
# HDF5
depends_on("hdf5", when="+hdf5")
- depends_on("python@3:", when="+python", type=("build", "run"))
- extends("python", when="+python")
- depends_on("py-numpy", when="+python", type=("build", "run"))
- depends_on("py-mpi4py", when="+python", type=("build", "run"))
- depends_on("swig", when="+python", type="build")
+ with when("+python"):
+ extends("python")
+ depends_on("python@3:", type=("build", "link", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-mpi4py@:3", type=("build", "run"))
+ depends_on("swig", type="build")
+
depends_on("cmake@3.6:", when="@3:", type="build")
depends_on("pugixml")
depends_on("mpi")
@@ -116,27 +121,30 @@ class Sensei(CMakePackage):
def cmake_args(self):
spec = self.spec
+ prefix = ""
+ if spec.satisfies("@5:"):
+ prefix = "SENSEI_"
# -Ox flags are set by default in CMake based on the build type
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("SENSEI_USE_EXTERNAL_pugixml", True),
- self.define("ENABLE_SENSEI", True),
+ self.define(f"{prefix}ENABLE_SENSEI", True),
self.define("MPI_C_COMPILER", spec["mpi"].mpicc),
self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx),
# Don"t rely on MPI found in cray environment for cray systems.
# On non-cray systems this should be a no-op
- self.define("ENABLE_CRAY_MPICH", False),
- self.define_from_variant("ENABLE_ASCENT", "ascent"),
- self.define_from_variant("ENABLE_VTKM", "vtkm"),
- self.define_from_variant("ENABLE_CATALYST", "catalyst"),
- self.define_from_variant("ENABLE_LIBSIM", "libsim"),
- self.define_from_variant("ENABLE_VTK_IO", "vtkio"),
- self.define_from_variant("ENABLE_PYTHON", "python"),
- self.define_from_variant("ENABLE_ADIOS2", "adios2"),
- self.define_from_variant("ENABLE_HDF5", "hdf5"),
- self.define_from_variant("ENABLE_PARALLEL3D", "miniapps"),
- self.define_from_variant("ENABLE_OSCILLATORS", "miniapps"),
+ self.define(f"{prefix}ENABLE_CRAY_MPICH", False),
+ self.define_from_variant(f"{prefix}ENABLE_ASCENT", "ascent"),
+ self.define_from_variant(f"{prefix}ENABLE_VTKM", "vtkm"),
+ self.define_from_variant(f"{prefix}ENABLE_CATALYST", "catalyst"),
+ self.define_from_variant(f"{prefix}ENABLE_LIBSIM", "libsim"),
+ self.define_from_variant(f"{prefix}ENABLE_VTK_IO", "vtkio"),
+ self.define_from_variant(f"{prefix}ENABLE_PYTHON", "python"),
+ self.define_from_variant(f"{prefix}ENABLE_ADIOS2", "adios2"),
+ self.define_from_variant(f"{prefix}ENABLE_HDF5", "hdf5"),
+ self.define_from_variant(f"{prefix}ENABLE_PARALLEL3D", "miniapps"),
+ self.define_from_variant(f"{prefix}ENABLE_OSCILLATORS", "miniapps"),
]
if "+adios2" in spec:
@@ -151,11 +159,17 @@ class Sensei(CMakePackage):
args.append("-DVISIT_DIR:PATH={0}/current/linux-x86_64".format(spec["visit"].prefix))
if "+python" in spec:
- args.append(self.define("PYTHON_EXECUTABLE", spec["python"].command.path))
- args.append(self.define("Python_EXECUTABLE", spec["python"].command.path))
- args.append(self.define("Python3_EXECUTABLE", spec["python"].command.path))
if spec.satisfies("@3:"):
args.append(self.define("SENSEI_PYTHON_VERSION", 3))
- args.append(self.define_from_variant("ENABLE_CATALYST_PYTHON", "catalyst"))
+ args.append(self.define_from_variant(f"{prefix}ENABLE_CATALYST_PYTHON", "catalyst"))
+
+ # lib/libsensei.so links to lib/pythonX.Y/site-packages/sensei/_PythonAnalysis.so, so
+ # register the install rpath.
+ install_rpaths = [
+ self.spec.prefix.lib,
+ self.spec.prefix.lib64,
+ join_path(python_platlib, "sensei"),
+ ]
+ args.append(self.define("CMAKE_INSTALL_RPATH", install_rpaths))
return args
diff --git a/var/spack/repos/builtin/packages/sentencepiece/package.py b/var/spack/repos/builtin/packages/sentencepiece/package.py
index 845dea6add..a954519ece 100644
--- a/var/spack/repos/builtin/packages/sentencepiece/package.py
+++ b/var/spack/repos/builtin/packages/sentencepiece/package.py
@@ -22,5 +22,7 @@ class Sentencepiece(CMakePackage):
version("0.1.91", sha256="acbc7ea12713cd2a8d64892f8d2033c7fd2bb4faecab39452496120ace9a4b1b")
version("0.1.85", sha256="dd4956287a1b6af3cbdbbd499b7227a859a4e3f41c9882de5e6bdd929e219ae6")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("gperftools") # optional, 10-40% performance improvement
diff --git a/var/spack/repos/builtin/packages/sentieon-genomics/package.py b/var/spack/repos/builtin/packages/sentieon-genomics/package.py
index 4520afbe20..6e7ad201c3 100644
--- a/var/spack/repos/builtin/packages/sentieon-genomics/package.py
+++ b/var/spack/repos/builtin/packages/sentieon-genomics/package.py
@@ -26,6 +26,7 @@ class SentieonGenomics(Package):
url = "https://s3.amazonaws.com/sentieon-release/software/sentieon-genomics-201808.01.tar.gz"
maintainers("snehring")
+ version("202308.02", sha256="a04b98c1b7c4e8916fdc45f15685d5fd83db56386ec2478eb5ea594170405bd5")
version("202308", sha256="d663067f46e499c23819e344cf548fdc362abbf94d3ef086a2e655c072ebe0d6")
version("202112.07", sha256="7178769bb5a9619840996356bda4660410fb6f228b2c0b86611bcb1c6bcfc2e1")
version("202112.06", sha256="18306036f01c3d41dd7ae738b18ae76fd6b666f1172dd4696cd55b4a8465270d")
diff --git a/var/spack/repos/builtin/packages/seq-gen/package.py b/var/spack/repos/builtin/packages/seq-gen/package.py
index 2aa4cca47e..c67831285d 100644
--- a/var/spack/repos/builtin/packages/seq-gen/package.py
+++ b/var/spack/repos/builtin/packages/seq-gen/package.py
@@ -26,6 +26,8 @@ class SeqGen(MakefilePackage):
version("1.3.4", sha256="092ec2255ce656a02b2c3012c32443c7d8e38c692f165fb155b304ca030cbb59")
+ depends_on("c", type="build") # generated
+
build_directory = "source"
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/seqan/package.py b/var/spack/repos/builtin/packages/seqan/package.py
index 5650cc43a0..0fc2a493ab 100644
--- a/var/spack/repos/builtin/packages/seqan/package.py
+++ b/var/spack/repos/builtin/packages/seqan/package.py
@@ -20,6 +20,8 @@ class Seqan(CMakePackage):
version("2.4.0", sha256="d7084d17729214003e84818e0280a16f223c8f1c6a30eeef040c27e0c0047bd7")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.4.0:", type="build")
depends_on("python@2.7.0:", type="build")
depends_on("py-nose", type="build")
diff --git a/var/spack/repos/builtin/packages/seqfu/package.py b/var/spack/repos/builtin/packages/seqfu/package.py
new file mode 100644
index 0000000000..895d5386c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/seqfu/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Seqfu(Package):
+ """seqfu - Sequece Fastx Utilities"""
+
+ homepage = "https://github.com/telatin/seqfu2"
+ url = "https://github.com/telatin/seqfu2/archive/refs/tags/v1.20.3.tar.gz"
+
+ license("GPL-3.0", checked_by="dialvarezs")
+ maintainers("dialvarezs")
+
+ version("1.22.3", sha256="65c1090cafe0e760e68d15d450bccfd57c0a03d553fdabca26e2191f566fef62")
+ version("1.20.3", sha256="1b287b99f3f1ac7045f4d551e781d6780ce168ba8e0a7bfaa0f5490f32e15938")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ depends_on("nim@2", type="build")
+ depends_on("zlib", type="build")
+
+ patch("wno_incompatible_pointer_types.patch", when="@:1.21%gcc@14:")
+
+ def setup_build_environment(self, env):
+ env.set("NIMBLE_DIR", ".nimble")
+
+ def install(self, spec, prefix):
+ nimble = Executable("nimble")
+ nimble("install", "-y", "--depsOnly")
+
+ make(parallel=False)
+ install_tree("bin", join_path(prefix, "bin"))
diff --git a/var/spack/repos/builtin/packages/seqfu/wno_incompatible_pointer_types.patch b/var/spack/repos/builtin/packages/seqfu/wno_incompatible_pointer_types.patch
new file mode 100644
index 0000000000..b8c2e93d7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/seqfu/wno_incompatible_pointer_types.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 287bb7c..7fb9434 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,7 +7,7 @@ SCRIPTS=./scripts
+ SOURCE=./src
+ DATA=./data
+ VERSION := $(shell grep version seqfu.nimble | grep -o "[0-9]\\+\.[0-9]\\+\.[0-9]\\+")
+-NIMPARAM := --gc:orc -d:NimblePkgVersion=$(VERSION) -d:release --opt:speed
++NIMPARAM := --gc:orc -d:NimblePkgVersion=$(VERSION) -d:release --opt:speed --passC:"-Wno-error=incompatible-pointer-types"
+ TARGETS=$(BIN)/seqfu $(BIN)/fu-msa $(BIN)/fu-primers $(BIN)/dadaist2-mergeseqs $(BIN)/fu-shred $(BIN)/fu-homocomp $(BIN)/fu-multirelabel $(BIN)/fu-index $(BIN)/fu-cov $(BIN)/fu-16Sregion $(BIN)/fu-nanotags $(BIN)/fu-orf $(BIN)/fu-sw $(BIN)/fu-virfilter $(BIN)/fu-tabcheck $(BIN)/byteshift $(BIN)/SeqCountHelper $(BIN)/fu-secheck
+ PYTARGETS=$(BIN)/fu-split $(BIN)/fu-pecheck $(BIN)/fu-readtope
+
diff --git a/var/spack/repos/builtin/packages/seqkit/package.py b/var/spack/repos/builtin/packages/seqkit/package.py
index 05a2d6ed00..da1e1dbae8 100644
--- a/var/spack/repos/builtin/packages/seqkit/package.py
+++ b/var/spack/repos/builtin/packages/seqkit/package.py
@@ -3,20 +3,28 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.go
from spack.package import *
-class Seqkit(Package):
- """A cross-platform and ultrafast toolkit for FASTA/Q file manipulation
- in Golang."""
+class GoBuilder(spack.build_systems.go.GoBuilder):
+ @property
+ def build_directory(self):
+ return join_path(self.pkg.stage.source_path, "seqkit")
- homepage = "https://bioinf.shenwei.me/seqkit"
- url = (
- "https://github.com/shenwei356/seqkit/releases/download/v0.10.1/seqkit_linux_amd64.tar.gz"
- )
- version("0.10.1", sha256="82f1c86dc4bd196403a56c2bf3ec063e5674a71777e68d940c4cc3d8411d2e9d")
+class Seqkit(GoPackage):
+ """seqkit: a cross-platform and ultrafast toolkit for FASTA/Q file manipulation"""
- def install(self, spec, prefix):
- mkdir(prefix.bin)
- install("seqkit", prefix.bin)
+ homepage = "https://bioinf.shenwei.me/seqkit/"
+ url = "https://github.com/shenwei356/seqkit/archive/refs/tags/v2.4.0.tar.gz"
+
+ license("MIT", checked_by="A-N-Other")
+
+ version("2.8.2", sha256="9cf1e744b785fa673af5a7a1ce2f96d52dc03e14b6537097df86aa6266204556")
+ version("2.7.0", sha256="b5c723ffd4640659860fc70a71c218d8f53bea0eae571cecc98eff04c7291e02")
+ version("2.6.1", sha256="d88249bd3b630c908ebd308abaa9cd7acb7a781c12bab877d3daaab56f43c443")
+ version("2.5.1", sha256="76d105921f918be20e616fbb607fe0fb2db603535a254ec0f853cb36bef817da")
+ version("2.4.0", sha256="c319f3d5feb7c99309e654042432959f01bbc5f7e4c71f55dc9854df46c73c7f")
+
+ depends_on("go@1.17:", type="build")
diff --git a/var/spack/repos/builtin/packages/seqprep/package.py b/var/spack/repos/builtin/packages/seqprep/package.py
index ab75623742..4140b78554 100644
--- a/var/spack/repos/builtin/packages/seqprep/package.py
+++ b/var/spack/repos/builtin/packages/seqprep/package.py
@@ -17,6 +17,8 @@ class Seqprep(MakefilePackage):
version("1.3.2", sha256="2b8a462a0e0a3e51f70be7730dc77b1f2bb69e74845dd0fbd2110a921c32265a")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api", type="link")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/seqtk/package.py b/var/spack/repos/builtin/packages/seqtk/package.py
index 6334292fbb..12a665479f 100644
--- a/var/spack/repos/builtin/packages/seqtk/package.py
+++ b/var/spack/repos/builtin/packages/seqtk/package.py
@@ -19,6 +19,8 @@ class Seqtk(Package):
version("1.2", sha256="bd53316645ab10f0aaba59e1e72c28442ee4c9c37fddaacce5e24757eff78d7b")
version("1.1", sha256="f01b9f9af6e443673a0105a7536a01957a4fc371826385a1f3dd1e417aa91d52")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/serenity-libint/package.py b/var/spack/repos/builtin/packages/serenity-libint/package.py
index 3447d11845..3677f35e02 100644
--- a/var/spack/repos/builtin/packages/serenity-libint/package.py
+++ b/var/spack/repos/builtin/packages/serenity-libint/package.py
@@ -9,8 +9,7 @@ from spack.package import *
class SerenityLibint(CMakePackage):
"""Serenity fork of libint, which is difficult to reproduce from libint itself"""
- homepage = "https://thclab.uni-muenster.de/serenity/libint"
- url = "https://thclab.uni-muenster.de/serenity/libint/-/raw/e3eb756c/libint-2.7.0-beta.6.tgz"
+ url = "https://www.uni-muenster.de/Chemie.oc/THCLAB/libint/libint-2.7.0-beta.6.tgz"
license("LGPL-3.0-or-later")
@@ -18,6 +17,10 @@ class SerenityLibint(CMakePackage):
"2.7.0-beta.6", sha256="53af60c7be74374b2a2d893b3d2d37fa6a3078a72d98067bf71ba4ede4e807df"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("boost")
depends_on("eigen@3:") # Probably overdepending?
depends_on("gmp+cxx")
diff --git a/var/spack/repos/builtin/packages/serenity/package.py b/var/spack/repos/builtin/packages/serenity/package.py
index 6a3e69c515..e8a70da49b 100644
--- a/var/spack/repos/builtin/packages/serenity/package.py
+++ b/var/spack/repos/builtin/packages/serenity/package.py
@@ -16,21 +16,33 @@ class Serenity(CMakePackage):
license("LGPL-3.0-only")
version("master", branch="master")
+ version("1.6.1", sha256="cc04b13c2e8a010d07389b2fed98981deacf085778d5375b3b6e89b967c3a5e6")
version("1.4.0", sha256="c7a87fc8e6f8ca21685a27e08d09d49824d9a1e9947fc6abb40d20fbba0cc6e8")
+ depends_on("cxx", type="build") # generated
+
variant("blas", default=True, description="Use BLAS library with Eigen")
variant("lapack", default=True, description="Use Lapack library with Eigen")
variant("python", default=False, description="Build Python bindings")
+ variant("prefer_xcfun", default=True, description="Prefer XCFun instead of LibXC")
+ variant(
+ "laplace_minimax",
+ default=False,
+ description="Download and use Laplace-Minimax",
+ when="@1.6.1:",
+ )
depends_on("blas", when="+blas")
depends_on("cmake@3.12:", type="build")
- depends_on("boost")
+ depends_on("boost+system+filesystem+program_options cxxstd=17 @1.65.0:")
depends_on("eigen@3:")
- depends_on("googletest@1.8.1:", type="test")
- depends_on("hdf5@1.10.1:")
+ depends_on("googletest@1.8.1:", type="test", when="@1.4.0")
+ depends_on("googletest@1.13.0:", type="test", when="@1.6.1:")
+ depends_on("hdf5@1.10.1:+hl+cxx")
depends_on("lapack", when="+lapack")
depends_on("libecpint")
- depends_on("libxc@5.0.0")
+ depends_on("libxc@6.1.0", when="@1.6.1:")
+ depends_on("libxc@5.0.0", when="@1.4.0")
depends_on("pkgconfig", type="build")
depends_on("python@3.6:", when="+python", type=("build", "run"))
depends_on("py-pip", when="+python", type="build")
@@ -40,6 +52,12 @@ class Serenity(CMakePackage):
extends("python", when="+python")
+ patch(
+ "https://github.com/qcserenity/serenity/commit/af9f76d013e240d971337a467a03640cb9aabfb7.patch?full_index=1",
+ sha256="45cce5e4d47b681891e78725b2cf5031d306337a5c7b8e62cd4891beb4a7b8b6",
+ when="@1.6.1:",
+ )
+
def patch(self):
filter_file(
"include(CMakeParseArguments)",
@@ -48,7 +66,7 @@ class Serenity(CMakePackage):
string=True,
)
- if self.run_tests:
+ if self.spec.satisfies(":@1.4"):
filter_file(
"find_package(GTest 1.8.1 QUIET)",
"find_package(GTest REQUIRED)",
@@ -63,63 +81,75 @@ class Serenity(CMakePackage):
string=True,
)
- filter_file(
- "function(import_libecpint)",
- "function(import_libecpint)\n"
- "find_package(ecpint CONFIG REQUIRED)\n"
- "add_library(ecpint INTERFACE IMPORTED)\n"
- "target_link_libraries(ecpint INTERFACE ECPINT::ecpint)\n",
- "cmake/ImportLibecpint.cmake",
- string=True,
- )
+ filter_file(
+ "function(import_libecpint)",
+ "function(import_libecpint)\n"
+ "find_package(ecpint CONFIG REQUIRED)\n"
+ "add_library(ecpint INTERFACE IMPORTED)\n"
+ "target_link_libraries(ecpint INTERFACE ECPINT::ecpint)\n",
+ "cmake/ImportLibecpint.cmake",
+ string=True,
+ )
- filter_file(
- "function(import_libint)",
- "function(import_libint)\n"
- "find_package(Libint2 CONFIG REQUIRED)\n"
- "add_library(libint2-static INTERFACE IMPORTED)\n"
- "target_link_libraries(libint2-static INTERFACE Libint2::libint2)\n",
- "cmake/ImportLibint.cmake",
- string=True,
- )
+ filter_file(
+ "function(import_libint)",
+ "function(import_libint)\n"
+ "find_package(Libint2 CONFIG REQUIRED)\n"
+ "add_library(libint2-static INTERFACE IMPORTED)\n"
+ "target_link_libraries(libint2-static INTERFACE Libint2::libint2)\n",
+ "cmake/ImportLibint.cmake",
+ string=True,
+ )
- filter_file(
- "function(import_libxc)",
- "function(import_libxc)\n"
- "find_package(PkgConfig QUIET)\n"
- "pkg_check_modules(pc_libxc libxc)\n"
- "if(pc_libxc_FOUND)\n"
- "add_library(xc INTERFACE IMPORTED)\n"
- "target_link_libraries(xc INTERFACE ${pc_libxc_LINK_LIBRARIES})\n"
- "target_include_directories(xc INTERFACE ${pc_libxc_INCLUDE_DIRS})\n"
- "endif()",
- "cmake/ImportLibxc.cmake",
- string=True,
- )
+ filter_file(
+ "function(import_libxc)",
+ "function(import_libxc)\n"
+ "find_package(PkgConfig QUIET)\n"
+ "pkg_check_modules(pc_libxc libxc)\n"
+ "if(pc_libxc_FOUND)\n"
+ "add_library(xc INTERFACE IMPORTED)\n"
+ "target_link_libraries(xc INTERFACE ${pc_libxc_LINK_LIBRARIES})\n"
+ "target_include_directories(xc INTERFACE ${pc_libxc_INCLUDE_DIRS})\n"
+ 'message("XC: included ${pc_libxc_LINK_LIBRARIES} ${pc_libxc_INCLUDE_DIRS}")\n'
+ "endif()",
+ "cmake/ImportLibxc.cmake",
+ string=True,
+ )
- filter_file(
- "function(import_pybind11)",
- "function(import_pybind11)\nfind_package(pybind11 REQUIRED)",
- "cmake/ImportPybind11.cmake",
- string=True,
- )
+ filter_file(
+ "function(import_pybind11)",
+ "function(import_pybind11)\nfind_package(pybind11 REQUIRED)",
+ "cmake/ImportPybind11.cmake",
+ string=True,
+ )
- filter_file(
- "function(import_xcfun)",
- "function(import_xcfun)\n"
- "find_package(XCFun CONFIG REQUIRED)\n"
- "add_library(xcfun INTERFACE IMPORTED)\n"
- "target_link_libraries(xcfun INTERFACE XCFun::xcfun)\n",
- "cmake/ImportXCFun.cmake",
- string=True,
- )
+ filter_file(
+ "function(import_xcfun)",
+ "function(import_xcfun)\n"
+ "find_package(XCFun CONFIG REQUIRED)\n"
+ "add_library(xcfun INTERFACE IMPORTED)\n"
+ "target_link_libraries(xcfun INTERFACE XCFun::xcfun)\n",
+ "cmake/ImportXCFun.cmake",
+ string=True,
+ )
+ else:
+ filter_file(
+ "find_package(GTest QUIET)",
+ "find_package(GTest REQUIRED)",
+ "cmake/ImportGTest.cmake",
+ string=True,
+ )
+
+ filter_file(
+ "find_package(GMock QUIET)", "return()", "cmake/ImportGTest.cmake", string=True
+ )
def cmake_args(self):
args = [
- self.define("SERENITY_BUILD_TESTS", self.run_tests),
- self.define_from_variant("SERENITY_BUILD_PYTHON_BINDINGS", "python"),
+ self.define("SERENITY_ENABLE_TESTS", self.run_tests),
+ self.define_from_variant("SERENITY_PYTHON_BINDINGS", "python"),
self.define("SERENITY_MARCH", ""),
- self.define("SERENITY_PREFER_XCFUN", False),
+ self.define_from_variant("SERENITY_PREFER_XCFUN", "prefer_xcfun"),
self.define("SERENITY_USE_XCFUN", True),
self.define("SERENITY_USE_LIBXC", True),
self.define(
@@ -137,6 +167,18 @@ class Serenity(CMakePackage):
self.define("BOOST_NO_SYSTEM_PATHS", True),
self.define("Boost_NO_BOOST_CMAKE", True),
]
+ if self.spec.satisfies("@1.6.1:"):
+ args += [
+ self.define("SERENITY_DOWNLOAD_DEPENDENCIES", False),
+ self.define_from_variant("SERENITY_USE_LAPLACE_MINIMAX", "laplace_minimax"),
+ ]
if "+python" in self.spec:
args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
return args
+
+ def setup_run_environment(self, env):
+ # set up environment like if we sourced dev/templates/serenity.sh
+ env.set("SERENITY_HOME", self.prefix)
+ env.set("SERENITY_BIN", self.prefix.bin)
+ env.set("SERENITY_RESOURCES", join_path(self.prefix.share, "serenity/data/"))
+ env.prepend_path("PYTHONPATH", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py
index 192d84f4a9..a0a68e16a6 100644
--- a/var/spack/repos/builtin/packages/serf/package.py
+++ b/var/spack/repos/builtin/packages/serf/package.py
@@ -21,6 +21,8 @@ class Serf(SConsPackage):
version("1.3.9", sha256="549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc")
version("1.3.8", sha256="e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590")
+ depends_on("c", type="build") # generated
+
variant(
"debug", default=False, description="Enable debugging info and strict compile warnings"
)
diff --git a/var/spack/repos/builtin/packages/serialbox/package.py b/var/spack/repos/builtin/packages/serialbox/package.py
index 9905b581b9..ed455611cf 100644
--- a/var/spack/repos/builtin/packages/serialbox/package.py
+++ b/var/spack/repos/builtin/packages/serialbox/package.py
@@ -24,6 +24,10 @@ class Serialbox(CMakePackage):
version("2.5.4", sha256="f4aee8ef284f58e6847968fe4620e222ac7019d805bbbb26c199e4b6a5094fee")
version("2.5.3", sha256="696499b3f43978238c3bcc8f9de50bce2630c07971c47c9e03af0324652b2d5d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("c", default=True, description="enable C interface")
variant("python", default=False, description="enable Python interface")
variant("fortran", default=False, description="enable Fortran interface")
@@ -41,9 +45,6 @@ class Serialbox(CMakePackage):
)
depends_on("cmake@3.12:", type="build")
- # We might be provided with an external vanilla cmake, and we need one with
- # with https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5025
- depends_on("cmake@3.19:", when="%pgi", type="build")
depends_on("boost@1.54:", type="build")
depends_on("boost+filesystem+system", when="~std-filesystem", type=("build", "link"))
@@ -130,7 +131,7 @@ class Serialbox(CMakePackage):
return libs
msg = "Unable to recursively locate {0} libraries in {1}"
- raise spack.error.NoLibrariesError(msg.format(self.spec.name, self.spec.prefix))
+ raise NoLibrariesError(msg.format(self.spec.name, self.spec.prefix))
def flag_handler(self, name, flags):
cmake_flags = []
@@ -143,10 +144,7 @@ class Serialbox(CMakePackage):
# undefined reference to
# `std::experimental::filesystem::v1::__cxx11::path::
# _M_find_extension[abi:cxx11]() const'
- if any(
- self.spec.satisfies("{0}+std-filesystem".format(x))
- for x in ["%intel@:19.0.1", "%pgi@:19.9"]
- ):
+ if self.spec.satisfies("%intel@:19.0.1+std-filesystem"):
cmake_flags.append("-D_GLIBCXX_USE_CXX11_ABI=0")
return flags, None, (cmake_flags or None)
@@ -156,10 +154,7 @@ class Serialbox(CMakePackage):
env.prepend_path("PATH", self.prefix.python.pp_ser)
# Allow for running the preprocessor as a Python module, as well as
# enable the Python interface in a non-standard directory:
- env.prepend_path("PYTHONPATH", self.prefix.python)
-
- def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
+ env.prepend_path("PYTHONPATH", self.prefix.python.pp_ser)
def setup_dependent_package(self, module, dependent_spec):
# Simplify the location of the preprocessor by dependent packages:
diff --git a/var/spack/repos/builtin/packages/sessreg/package.py b/var/spack/repos/builtin/packages/sessreg/package.py
index 12d0804d92..63f14e8904 100644
--- a/var/spack/repos/builtin/packages/sessreg/package.py
+++ b/var/spack/repos/builtin/packages/sessreg/package.py
@@ -11,7 +11,7 @@ class Sessreg(AutotoolsPackage, XorgPackage):
sessions. It was originally written for use with xdm, but may also be
used with other display managers such as gdm or kdm."""
- homepage = "https://cgit.freedesktop.org/xorg/app/sessreg"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/sessreg"
xorg_mirror_path = "app/sessreg-1.1.0.tar.gz"
license("ICU")
@@ -21,7 +21,9 @@ class Sessreg(AutotoolsPackage, XorgPackage):
version("1.1.1", sha256="3e38f72ff690eaffc0f5eaff533a236bb5e93d4b91ed4fff60e9a2505347d009")
version("1.1.0", sha256="e561edb48dfc3b0624554169c15f9dd2c3139e83084cb323b0c712724f2b6043")
- depends_on("xproto@7.0.25:")
+ depends_on("c", type="build")
+
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/setserial/package.py b/var/spack/repos/builtin/packages/setserial/package.py
index 65bb951974..5f8eb61dac 100644
--- a/var/spack/repos/builtin/packages/setserial/package.py
+++ b/var/spack/repos/builtin/packages/setserial/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Setserial(AutotoolsPackage):
"""A utility for configuring serial ports."""
- homepage = "http://setserial.sourceforge.net"
+ homepage = "https://setserial.sourceforge.net"
url = (
"https://udomain.dl.sourceforge.net/project/setserial/setserial/2.17/setserial-2.17.tar.gz"
)
@@ -18,6 +18,8 @@ class Setserial(AutotoolsPackage):
version("2.17", sha256="7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
mkdirp(prefix.usr.man.man8)
diff --git a/var/spack/repos/builtin/packages/setxkbmap/package.py b/var/spack/repos/builtin/packages/setxkbmap/package.py
index d68814690a..4dff2c3898 100644
--- a/var/spack/repos/builtin/packages/setxkbmap/package.py
+++ b/var/spack/repos/builtin/packages/setxkbmap/package.py
@@ -16,10 +16,13 @@ class Setxkbmap(AutotoolsPackage, XorgPackage):
license("MIT")
+ version("1.3.4", sha256="cc4113eab3cd70c28c986174aa30e62690e789723c874acc53e8d1f058d11f92")
version("1.3.3", sha256="51ba28edf93a464a7444b53b154fd5e93dedd1e9bbcc85b636f4cf56986c4842")
version("1.3.2", sha256="7e934afc55f161406f7dd99b5be8837e5d1478d8263776697b159d48461a1d3c")
version("1.3.1", sha256="e24a73669007fa3b280eba4bdc7f75715aeb2e394bf2d63f5cc872502ddde264")
+ depends_on("c", type="build") # generated
+
depends_on("libxkbfile")
depends_on("libx11")
depends_on("libxrandr", when="@1.3.3:")
diff --git a/var/spack/repos/builtin/packages/sfcgal/package.py b/var/spack/repos/builtin/packages/sfcgal/package.py
index 3d01ae506b..d7a6f00e9b 100644
--- a/var/spack/repos/builtin/packages/sfcgal/package.py
+++ b/var/spack/repos/builtin/packages/sfcgal/package.py
@@ -15,16 +15,39 @@ class Sfcgal(CMakePackage):
"""
homepage = "http://www.sfcgal.org/"
- url = "https://github.com/Oslandia/SFCGAL/archive/v1.3.8.tar.gz"
+ url = "https://gitlab.com/sfcgal/SFCGAL/-/archive/v1.5.1/SFCGAL-v1.5.1.tar.gz"
+ # URL for versions up to 1.3.8
+ old_github_urlbase = "https://github.com/Oslandia/SFCGAL/archive/v{0}.tar.gz"
license("LGPL-2.0-or-later")
- version("1.3.8", sha256="5154bfc67a5e99d95cb653d70d2b9d9293d3deb3c8f18b938a33d68fec488a6d")
- version("1.3.7", sha256="30ea1af26cb2f572c628aae08dd1953d80a69d15e1cac225390904d91fce031b")
+ version("1.5.1", sha256="ea5d1662fada7de715ad564dc810c3059024ed81ae393f5352489f706fdfa3b1")
+ version("1.4.1", sha256="1800c8a26241588f11cddcf433049e9b9aea902e923414d2ecef33a3295626c3")
+ version(
+ "1.3.8",
+ sha256="5154bfc67a5e99d95cb653d70d2b9d9293d3deb3c8f18b938a33d68fec488a6d",
+ url=old_github_urlbase.format("1.3.8"),
+ )
+ version(
+ "1.3.7",
+ sha256="30ea1af26cb2f572c628aae08dd1953d80a69d15e1cac225390904d91fce031b",
+ url=old_github_urlbase.format("1.3.7"),
+ )
+
+ depends_on("cxx", type="build") # generated
depends_on("cmake@2.8.6:", type="build")
# Ref: https://oslandia.github.io/SFCGAL/installation.html, but starts to work @4.7:
- depends_on("cgal@4.7: +core")
+ # Ref: https://gitlab.com/sfcgal/SFCGAL/-/blob/v1.5.1/NEWS?ref_type=tags
+ # and looking at CMakeLists.txt find_package(CGAL) declaration
+ # for different versions (around line 70)
+ # @1.3.8:1.3.10 (from comments) cgal@4.3 is minimal, @4.13 recommended, @5 supported?
+ depends_on("cgal +core")
+ depends_on("cgal@4.7:4", when="@1.3.8")
+ depends_on("cgal@4.7:5.1", when="@1.3.9")
+ depends_on("cgal@4.7:5.2", when="@1.3.10")
+ depends_on("cgal@5.3", when="@1.4")
+ depends_on("cgal@5.6", when="@1.5")
depends_on(
"boost@1.54.0:+chrono+filesystem+program_options+serialization+system+test+thread+timer"
)
@@ -40,3 +63,14 @@ class Sfcgal(CMakePackage):
# https://github.com/Oslandia/SFCGAL/releases/tag/v1.3.0
# Also, see https://github.com/Oslandia/SFCGAL-viewer
return [self.define("BUILD_SHARED_LIBS", True), self.define("SFCGAL_BUILD_VIEWER", False)]
+
+ @property
+ def libs(self):
+ # Override because libs have different case than Spack package name
+ name = "libSFCGAL*"
+ # We expect libraries to be in either lib64 or lib directory
+ for root in (self.prefix.lib64, self.prefix.lib):
+ liblist = find_libraries(name, root=root, shared=True, recursive=False)
+ if liblist:
+ break
+ return liblist
diff --git a/var/spack/repos/builtin/packages/sfcio/package.py b/var/spack/repos/builtin/packages/sfcio/package.py
index aa762cebc5..5ee64f7092 100644
--- a/var/spack/repos/builtin/packages/sfcio/package.py
+++ b/var/spack/repos/builtin/packages/sfcio/package.py
@@ -19,8 +19,19 @@ class Sfcio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("1.4.2", sha256="bfde52320b836886a766ff8d0d6707b8a533c903b947f8b49250c544aaccaaac")
version("1.4.1", sha256="d9f900cf18ec1a839b4128c069b1336317ffc682086283443354896746b89c59")
+ depends_on("fortran", type="build")
+
+ depends_on("pfunit", type="test")
+
+ conflicts("%oneapi", when="@:1.4.1", msg="Requires @1.4.2: for Intel oneAPI")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
+
def setup_run_environment(self, env):
lib = find_libraries("libsfcio", root=self.prefix, shared=False, recursive=True)
# Only one library version, but still need to set _4 to make NCO happy
@@ -33,3 +44,7 @@ class Sfcio(CMakePackage):
if name == "fflags":
flags.append("-Free")
return (None, None, flags)
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/sga/package.py b/var/spack/repos/builtin/packages/sga/package.py
index f99cf55c97..3a6802f85c 100644
--- a/var/spack/repos/builtin/packages/sga/package.py
+++ b/var/spack/repos/builtin/packages/sga/package.py
@@ -24,6 +24,9 @@ class Sga(AutotoolsPackage):
version("0.10.8", sha256="55c5e0e425e14902e83d68cfb8cee4c86ee186459e54113a484b2a1b06d223c8")
version("0.10.3", sha256="c000823a58428d9db2979b30a571ad89aec78a8cb1af60bae1ce252dd4e8adac")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("sparsehash")
depends_on("jemalloc")
diff --git a/var/spack/repos/builtin/packages/sgpp/package.py b/var/spack/repos/builtin/packages/sgpp/package.py
index 635f047166..367547e8b9 100644
--- a/var/spack/repos/builtin/packages/sgpp/package.py
+++ b/var/spack/repos/builtin/packages/sgpp/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
from spack.pkg.builtin.boost import Boost
@@ -22,6 +23,8 @@ class Sgpp(SConsPackage):
version("3.4.0", sha256="450d4002850b0a48c561abe221b634261ca44eee111ca605c3e80797182f40b3")
version("3.3.0", sha256="ca4d5b79f315b425ce69b04940c141451a76848bf1bd7b96067217304c68e2d4")
version("3.2.0", sha256="dab83587fd447f92ed8546eacaac6b8cbe65b8db5e860218c0fa2e42f776962d")
+
+ depends_on("cxx", type="build") # generated
# Note: Older versions of SGpp required Python 2 (and offered Python 2 bindings) and have
# thus been removed from this list as Spack now requires Python 3.
# The last spack release with support for Python 2 is v0.19 - there, the spack package
@@ -46,11 +49,13 @@ class Sgpp(SConsPackage):
# Fixes compilation with AVX512 and datadriven
# Fixed in SGpp in PR https://github.com/SGpp/SGpp/pull/229
patch("avx512_datadriven_compilation.patch", when="@:3.3.0+datadriven")
- # Continue despite distutils deprecation warning!
- # distutils will be removed in future SGpp versions. See
- # https://github.com/SGpp/SGpp/issues/263 for associated issue!
- # TODO Once distutils is removed from SGpp, limit patch to @:3.4.0
- patch("disable_disutils_deprecation_warning.patch", when="^python@3.10:3.11")
+ # The distutils deprecation warning in python 3.10/3.11 caused the sgpp build system
+ # to complain about missing headers (due to a path check not working anymore)
+ # See issue https://github.com/SGpp/SGpp/issues/263 and https://github.com/SGpp/SGpp/pull/266
+ patch("disable_disutils_deprecation_warning.patch", when="@:3.4.0 ^python@3.10:3.11")
+ # SGpp does not contain aarch64 support as of yet. To make it work still, this patch adds
+ # simple build system support for it.
+ patch("for_aarch64.patch", when="target=aarch64:")
variant("python", default=True, description="Provide Python bindings for SGpp")
variant("optimization", default=True, description="Builds the optimization module of SGpp")
@@ -66,30 +71,30 @@ class Sgpp(SConsPackage):
variant("mpi", default=False, description="Enables support for MPI-distributed operations")
# Mandatory dependencies
- depends_on("scons@3:", type=("build"))
- depends_on("zlib-api", type=("link"))
+ depends_on("scons@3:", type="build")
+ depends_on("zlib-api", type="link")
# Python dependencies
extends("python", when="+python")
depends_on("py-pip", when="+python", type="build")
depends_on("py-wheel", when="+python", type="build")
- # TODO allow newer versions once distutils is removed from SGpp
- depends_on("py-setuptools@:59", type=("build"))
- # TODO allow newer versions once distutils is removed from SGpp
- depends_on("python@3.7:3.11", type=("build", "run"))
- depends_on("swig@3:", when="+python", type=("build"))
+ depends_on("py-setuptools", type="build")
+ # Older SGpp releases (:3.4.0) do not support python 3.12 due to them using distutils
+ depends_on("python@3.7:3.11", type=("build", "run"), when="@:3.4.0")
+ # SGpp@master works with newer python versions (3.12:) as well
+ depends_on("python@3.7:", type=("build", "run"))
+ # Newest swig version 4.1 seems to cause problem -> limit to 3:4.0 for now
+ depends_on("swig@3:4.0", when="+python", type="build")
depends_on("py-numpy@1.17:", when="+python", type=("build", "run"))
depends_on("py-scipy@1.3:", when="+python", type=("build", "run"))
# OpenCL dependency
depends_on("opencl@1.1:", when="+opencl", type=("build", "run"))
# MPI dependency
depends_on("mpi", when="+mpi", type=("build", "run"))
- # Testing requires boost test
- depends_on("boost+test", type=("test"))
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants, type=("test"))
+ depends_on(Boost.with_default_variants, type="test")
# Compiler with C++11 support is required
conflicts("%gcc@:4.8.4", msg="Compiler with c++11 support is required!")
@@ -116,8 +121,6 @@ class Sgpp(SConsPackage):
conflicts("+combigrid", when="@1.0.0:3.2.0~solver")
conflicts("+combigrid", when="@1.0.0:3.2.0~quadrature")
- patch("for_aarch64.patch", when="target=aarch64:")
-
def build_args(self, spec, prefix):
# Testing parameters
if self.run_tests:
@@ -177,6 +180,8 @@ class Sgpp(SConsPackage):
else:
self.args.append("CXX={0}".format(self.compiler.cxx))
+ # Parallel builds do not seem to work without this:
+ self.args.append("-j{0}".format(make_jobs))
return self.args
def install_args(self, spec, prefix):
@@ -186,5 +191,4 @@ class Sgpp(SConsPackage):
@run_after("install")
def python_install(self):
if "+python" in self.spec:
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/shadow/package.py b/var/spack/repos/builtin/packages/shadow/package.py
index c6b1df9b8c..95825c3656 100644
--- a/var/spack/repos/builtin/packages/shadow/package.py
+++ b/var/spack/repos/builtin/packages/shadow/package.py
@@ -16,7 +16,15 @@ class Shadow(AutotoolsPackage):
license("BSD-3-Clause")
+ version("4.16.0", sha256="1744f339e07a2b41056347ddd612839762ff565d7e9494fb049428002fa2e7e0")
+ version("4.15.1", sha256="b34686b89b279887ffbf1f33128902ccc0fa1a998a3add44213bb12d7385b218")
version("4.13", sha256="813057047499c7fe81108adcf0cffa3ad4ec75e19a80151f9cbaa458ff2e86cd")
version("4.8.1", sha256="3ee3081fbbcbcfea5c8916419e46bc724807bab271072104f23e7a29e9668f3a")
version("4.7", sha256="5135b0ca2a361a218fab59e63d9c1720d2a8fc1faa520c819a654b638017286f")
version("4.6", sha256="4668f99bd087399c4a586084dc3b046b75f560720d83e92fd23bf7a89dda4d31")
+
+ depends_on("c", type="build")
+
+ def configure_args(self):
+ # Fix build when libbsd is not installed on the host:
+ return ["--without-libbsd"]
diff --git a/var/spack/repos/builtin/packages/shapeit4/package.py b/var/spack/repos/builtin/packages/shapeit4/package.py
index 42d5e950ac..2b65520617 100644
--- a/var/spack/repos/builtin/packages/shapeit4/package.py
+++ b/var/spack/repos/builtin/packages/shapeit4/package.py
@@ -18,6 +18,8 @@ class Shapeit4(MakefilePackage):
version("4.2.2", sha256="9f109e307b5cc22ab68e7bf77de2429a9bbb2212d66303386e6a3dd81a5bc556")
version("4.1.3", sha256="d209731277b00bca1e3478b7e0a0cbe40fbe23826c3d640ad12e0dd6033cbbb8")
+ depends_on("cxx", type="build") # generated
+
maintainers("ilbiondo")
depends_on("htslib")
diff --git a/var/spack/repos/builtin/packages/shapelib/package.py b/var/spack/repos/builtin/packages/shapelib/package.py
index a10310cc6a..756f7ea1e4 100644
--- a/var/spack/repos/builtin/packages/shapelib/package.py
+++ b/var/spack/repos/builtin/packages/shapelib/package.py
@@ -17,4 +17,8 @@ class Shapelib(CMakePackage):
license("LGPL-2.0-only OR MIT")
+ version("1.6.0", sha256="0bfd1eab9616ca3c420a5ad674b0d07c7c5018620d6ab6ae43917daa18ff0d1e")
version("1.5.0", sha256="48de3a6a8691b0b111b909c0b908af4627635c75322b3a501c0c0885f3558cad")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/shapemapper/package.py b/var/spack/repos/builtin/packages/shapemapper/package.py
index ad52b917f4..32b3165fe1 100644
--- a/var/spack/repos/builtin/packages/shapemapper/package.py
+++ b/var/spack/repos/builtin/packages/shapemapper/package.py
@@ -21,22 +21,37 @@ class Shapemapper(CMakePackage):
license("MIT")
version(
+ "2.2.0",
+ sha256="eec1bfca339731816142bf2e7826dfb2e125588d72a1f7c36aaa927393e6fbec",
+ url="https://github.com/Weeks-UNC/shapemapper2/releases/download/2.2.0/shapemapper2-2.2-source-only.tar.gz",
+ )
+ version(
"2.1.5",
sha256="0846a5d8b5f01d2d039fad4b957df0b6220a8505463f1a410368a1b90d2b227c",
url="https://github.com/Weeks-UNC/shapemapper2/releases/download/2.1.5/shapemapper-2.1.5-source-only.tar.gz",
)
- depends_on("bowtie2@2.3.0:", type="run")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("bowtie2@2.3.0:", type="run", when="@2.1.5")
+ depends_on("bowtie2@2.3.4:", type="run", when="@2.2.0:")
depends_on("perl+threads", type="run")
+ depends_on("pv@1.6.20:", type="run")
# hard version dep due to jni
depends_on("bbmap@37.78", type="run")
depends_on("boost+filesystem+program_options+iostreams+system")
depends_on("star@2.5.2:", type="run")
depends_on("pv@1.6.0:", type="run")
- depends_on("python@3.7:", type="run")
- depends_on("graphviz@2.38.0:", type="run")
- depends_on("py-scikit-learn@0.18.1:", type="run")
- depends_on("py-matplotlib@1.5.1:3.3", type="run")
+ depends_on("python@3.7:", type="run", when="@2.1.5")
+ depends_on("python@3.9.12:", type="run", when="@2.2.0")
+ depends_on("graphviz@2.38.0:", type="run", when="@2.1.5")
+ depends_on("graphviz@7.1.0:", type="run", when="@2.2.0:")
+ depends_on("py-numpy@1.19.5:1.19", type="run", when="@2.2.0:")
+ depends_on("py-scikit-learn@0.18.1:", type="run", when="@2.1.5")
+ depends_on("py-scikit-learn@1.1.2:", type="run", when="@2.2.0:")
+ depends_on("py-matplotlib@1.5.1:3.3", type="run", when="@2.1.5")
+ depends_on("py-matplotlib@3.6.2:3.6", type="run", when="@2.2.0:")
+ depends_on("zlib-api")
build_directory = "build"
diff --git a/var/spack/repos/builtin/packages/shared-mime-info/package.py b/var/spack/repos/builtin/packages/shared-mime-info/package.py
index 7da52d5052..e19a5cded1 100644
--- a/var/spack/repos/builtin/packages/shared-mime-info/package.py
+++ b/var/spack/repos/builtin/packages/shared-mime-info/package.py
@@ -10,7 +10,7 @@ class SharedMimeInfo(AutotoolsPackage):
"""Database of common MIME types."""
homepage = "https://freedesktop.org/wiki/Software/shared-mime-info"
- url = "http://freedesktop.org/~hadess/shared-mime-info-1.8.tar.xz"
+ url = "https://people.freedesktop.org/~hadess/shared-mime-info-1.8.tar.xz"
license("GPL-2.0-or-later")
@@ -18,6 +18,8 @@ class SharedMimeInfo(AutotoolsPackage):
version("1.9", sha256="5c0133ec4e228e41bdf52f726d271a2d821499c2ab97afd3aa3d6cf43efcdc83")
version("1.8", sha256="2af55ef1a0319805b74ab40d331a3962c905477d76c086f49e34dc96363589e9")
+ depends_on("c", type="build") # generated
+
parallel = False
depends_on("glib")
diff --git a/var/spack/repos/builtin/packages/shark/package.py b/var/spack/repos/builtin/packages/shark/package.py
index fcec7ed1f1..58eb5dccce 100644
--- a/var/spack/repos/builtin/packages/shark/package.py
+++ b/var/spack/repos/builtin/packages/shark/package.py
@@ -20,6 +20,8 @@ class Shark(CMakePackage):
version("4.0.0", sha256="19d4099776327d5f8a2e2be286818c6081c61eb13ca279c1e438c86e70d90210")
version("3.1.4", sha256="160c35ddeae3f6aeac3ce132ea4ba2611ece39eee347de2faa3ca52639dc6311")
+ depends_on("cxx", type="build") # generated
+
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
diff --git a/var/spack/repos/builtin/packages/shc/package.py b/var/spack/repos/builtin/packages/shc/package.py
index 5ff617eebc..4338930e42 100644
--- a/var/spack/repos/builtin/packages/shc/package.py
+++ b/var/spack/repos/builtin/packages/shc/package.py
@@ -13,7 +13,7 @@ class Shc(AutotoolsPackage):
and linked to produce a stripped binary executable."""
homepage = "https://neurobin.org/projects/softwares/unix/shc/"
- url = "https://github.com/neurobin/shc/archive/4.0.3.tar.gz"
+ url = "https://github.com/neurobin/shc/archive/refs/tags/4.0.3.tar.gz"
license("GPL-3.0-or-later")
diff --git a/var/spack/repos/builtin/packages/sheenbidi/package.py b/var/spack/repos/builtin/packages/sheenbidi/package.py
index 5b9351b2a4..27c06e4e02 100644
--- a/var/spack/repos/builtin/packages/sheenbidi/package.py
+++ b/var/spack/repos/builtin/packages/sheenbidi/package.py
@@ -16,4 +16,8 @@ class Sheenbidi(MesonPackage):
license("Apache-2.0")
+ version("2.7", sha256="620f732141fd62354361f921a67ba932c44d94e73f127379a0c73ad40c7fa6e0")
version("2.6", sha256="f538f51a7861dd95fb9e3f4ad885f39204b5c670867019b5adb7c4b410c8e0d9")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/shengbte/package.py b/var/spack/repos/builtin/packages/shengbte/package.py
index c56dac10cd..2e67bfca1b 100644
--- a/var/spack/repos/builtin/packages/shengbte/package.py
+++ b/var/spack/repos/builtin/packages/shengbte/package.py
@@ -9,8 +9,8 @@ class Shengbte(MakefilePackage):
"""ShengBTE is a software package for solving the Boltzmann Transport
Equation for phonons."""
- homepage = "www.shengbte.org"
- url = "www.shengbte.org/downloads/ShengBTE-v1.1.1-8a63749.tar.bz2"
+ homepage = "https://www.shengbte.org"
+ url = "https://www.shengbte.org/downloads/ShengBTE-v1.1.1-8a63749.tar.bz2"
license("GPL-3.0-only")
diff --git a/var/spack/repos/builtin/packages/sherpa/package.py b/var/spack/repos/builtin/packages/sherpa/package.py
index 5bb3470216..20133e54be 100644
--- a/var/spack/repos/builtin/packages/sherpa/package.py
+++ b/var/spack/repos/builtin/packages/sherpa/package.py
@@ -3,10 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.autotools
+import spack.build_systems.cmake
from spack.package import *
-class Sherpa(AutotoolsPackage):
+class Sherpa(CMakePackage, AutotoolsPackage):
"""Sherpa is a Monte Carlo event generator for the Simulation of
High-Energy Reactions of PArticles in lepton-lepton, lepton-photon,
photon-photon, lepton-hadron and hadron-hadron collisions."""
@@ -22,102 +24,22 @@ class Sherpa(AutotoolsPackage):
license("GPL-3.0-only")
+ version("3.0.1", sha256="ff5f43e79a9a10919391242307a771eca0c57b0462c11bfb99ee4a0fe8c48c58")
+ version("3.0.0", sha256="e460d8798b323c4ef663293a2c918b1463e9641b35703a54d70d25c852c67d36")
version("2.2.15", sha256="0300fd719bf6a089b7dc5441f720e669ac1cb030045d87034a4733bee98e7bbc")
version("2.2.14", sha256="f17d88d7f3bc4234a9db3872e8a3c1f3ef99e1e2dc881ada5ddf848715dc82da")
version("2.2.13", sha256="ed1fd1372923c191ca44897802d950702b810382260e7464d36ac3234c5c8a64")
version("2.2.12", sha256="4ba78098e45aaac0bc303d1b5abdc15809f30b407abf9457d99b55e63384c83d")
version("2.2.11", sha256="5e12761988b41429f1d104f84fdf352775d233cde7a165eb64e14dcc20c3e1bd")
- version(
- "2.2.10",
- sha256="ae23bc8fdcc9f8c26becc41692822233b62203cd72a7e0dab2ca19316aa0aad7",
- deprecated=True,
- )
- version(
- "2.2.9",
- sha256="ebc836d42269a0c4049d3fc439a983d19d12595d9a06db2d18765bd1e301923e",
- deprecated=True,
- )
- version(
- "2.2.8",
- sha256="ff198cbae5de445e6fe383151021ef24b1628dffc0da6bf3737753f6672a0091",
- deprecated=True,
- )
- version(
- "2.0.0",
- sha256="0e873b27bb1be46ca5ed451d1b8514ca84c10221057b11be5952180076e6f848",
- deprecated=True,
- )
- version(
- "1.3.1",
- sha256="31881207838d341358db64e3fdadfeee1ea2f6d1cb42f370014f622f579159ae",
- deprecated=True,
- )
- version(
- "1.3.0",
- sha256="08b13c65b66f2edde6996d2a06762a12a0682ffb64bca43654df47321e5039a0",
- deprecated=True,
- )
- version(
- "1.2.3",
- sha256="029727337a430d6675a1a12dce3ced0411041e79ddaf4ce3b9466035cf6c8804",
- deprecated=True,
- )
- version(
- "1.2.2",
- sha256="6e7b5ea80b99f1378519009e494030d6cf4c4491f91218d749eabb8ffaad9ac1",
- deprecated=True,
- )
- version(
- "1.2.1",
- sha256="838462f4a1e8768135363aa6b8532fd8f5e5789a269b858f8e3728ab37f6a1d1",
- deprecated=True,
- )
- version(
- "1.2.0",
- sha256="509508fd0ad72aaf55ab484da8b6bc0b31688c955adcda62a3e8f94689cebf99",
- deprecated=True,
- )
- version(
- "1.1.3",
- sha256="6335e5eb1fc304e9618496d3ddb198b3591e57b27db6e876af8fd649a8b98c93",
- deprecated=True,
- )
- version(
- "1.1.2",
- sha256="e1689cad6700dc013af0afb0d33729ac2b5e9841d2f325c85b10d773e7f8a80e",
- deprecated=True,
- )
- version(
- "1.1.1",
- sha256="b80e1d75934be79b73400d2c95d96e88651626ea29ddcb9d8fde9c1812039e29",
- deprecated=True,
- )
- version(
- "1.1.0",
- sha256="8052d137d668353dc710f8691b921e772820d39e20361f0d616ee2da1ac798f2",
- deprecated=True,
- )
- version(
- "1.0.9",
- sha256="fe28db91ea8264364395c7e5efeeae3e5c01ea1343e0db7fe13924c6f17fb963",
- deprecated=True,
- )
- version(
- "1.0.8",
- sha256="6e346bafd13b5b05ad566a73759da6d5e64d65c5036780cc4911d93277e891fa",
- deprecated=True,
- )
- version(
- "1.0.7",
- sha256="d1eeefd96c6822ea8eb926447ca91ec4a1c714e4746323e92b1e17764e51ff0b",
- deprecated=True,
- )
- version(
- "1.0.6",
- sha256="358d417ec3afde24618c222bc9b742bc5102d435622b3cd6f2e3f72d03656255",
- deprecated=True,
+
+ build_system(
+ conditional("cmake", when="@3:"), conditional("autotools", when="@:2"), default="cmake"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
_cxxstd_values = ("11", "14", "17")
variant(
"cxxstd",
@@ -130,11 +52,11 @@ class Sherpa(AutotoolsPackage):
variant("analysis", default=True, description="Enable analysis components")
variant("mpi", default=False, description="Enable MPI")
variant("python", default=False, description="Enable Python API")
- variant("hepmc2", default=True, description="Enable HepMC (version 2.x) support")
+ variant("hepmc2", default=True, when="@:2", description="Enable HepMC (version 2.x) support")
variant("hepmc3", default=True, description="Enable HepMC (version 3.x) support")
variant("hepmc3root", default=False, description="Enable HepMC (version 3.1+) ROOT support")
variant("rivet", default=False, description="Enable Rivet support")
- variant("fastjet", default=True, description="Enable FASTJET")
+ variant("fastjet", default=True, when="@:2", description="Enable FASTJET")
variant("openloops", default=False, description="Enable OpenLoops")
variant("recola", default=False, description="Enable Recola")
variant("lhole", default=False, description="Enable Les Houches One-Loop Generator interface")
@@ -144,7 +66,7 @@ class Sherpa(AutotoolsPackage):
variant("pythia", default=True, description="Enable fragmentation/decay interface to Pythia")
variant("blackhat", default=False, description="Enable BLACKHAT support")
variant("ufo", default=False, description="Enable UFO support")
- variant("hztool", default=False, description="Enable HZTOOL support")
+ variant("hztool", default=False, when="@:2", description="Enable HZTOOL support")
variant(
"libs",
default="shared,static",
@@ -159,10 +81,11 @@ class Sherpa(AutotoolsPackage):
# Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
- depends_on("m4", type="build")
+ # autotools dependencies are needed at runtime to compile processes
+ depends_on("autoconf", when="@:2")
+ depends_on("automake", when="@:2")
+ depends_on("libtool", when="@:2")
+ depends_on("m4", when="@:2")
depends_on("texinfo", type="build")
depends_on("sqlite")
@@ -182,10 +105,14 @@ class Sherpa(AutotoolsPackage):
depends_on("root", when="+root")
depends_on("lhapdf", when="+lhapdf")
depends_on("gzip", when="+gzip")
- depends_on("pythia6", when="+pythia")
+ depends_on("pythia6", when="+pythia @:2")
+ depends_on("pythia8", when="+pythia @3:")
depends_on("blackhat", when="+blackhat")
depends_on("hztool", when="+hztool")
# depends_on('cernlib', when='+cernlib')
+ depends_on("libzip", when="@3:")
+
+ filter_compiler_wrappers("share/SHERPA-MC/makelibs")
for std in _cxxstd_values:
depends_on("root cxxstd=" + std, when="+root cxxstd=" + std)
@@ -205,6 +132,42 @@ class Sherpa(AutotoolsPackage):
string=True,
)
+ def flag_handler(self, name, flags):
+ flags = list(flags)
+ if name == "cxxflags":
+ flags.append("-std=c++" + self.spec.variants["cxxstd"].value)
+
+ if "+cms" in self.spec:
+ flags.extend(["-fuse-cxa-atexit", "-O2"])
+ if self.spec.target.family == "x86_64":
+ flags.append("-m64")
+
+ return (None, None, flags)
+
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("SHERPA_ENABLE_ANALYSIS", "analysis"),
+ self.define_from_variant("SHERPA_ENABLE_BLACKHAT", "blackhat"),
+ self.define_from_variant("SHERPA_ENABLE_GZIP", "gzip"),
+ self.define_from_variant("SHERPA_ENABLE_HEPMC3", "hepmc3"),
+ self.define_from_variant("SHERPA_ENABLE_HEPMC3_ROOT", "hepmc3root"),
+ self.define_from_variant("SHERPA_ENABLE_LHAPDF", "lhapdf"),
+ self.define_from_variant("SHERPA_ENABLE_LHOLE", "lhole"),
+ self.define_from_variant("SHERPA_ENABLE_MPI", "mpi"),
+ self.define_from_variant("SHERPA_ENABLE_OPENLOOPS", "openloops"),
+ self.define_from_variant("SHERPA_ENABLE_PYTHIA8", "pythia"),
+ self.define_from_variant("SHERPA_ENABLE_PYTHON", "python"),
+ self.define_from_variant("SHERPA_ENABLE_RECOLA", "recola"),
+ self.define_from_variant("SHERPA_ENABLE_RIVET", "rivet"),
+ self.define_from_variant("SHERPA_ENABLE_ROOT", "root"),
+ self.define_from_variant("SHERPA_ENABLE_UFO", "ufo"),
+ ]
+ return args
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
args = []
args.append("--enable-binreloc")
@@ -219,18 +182,13 @@ class Sherpa(AutotoolsPackage):
args.extend(self.enable_or_disable("pythia"))
hepmc_root = lambda x: self.spec["hepmc"].prefix
args.extend(self.enable_or_disable("hepmc2", activation_value=hepmc_root))
- if self.spec.satisfies("@3:"):
- args.extend(self.enable_or_disable("hepmc3", activation_value="prefix"))
- args.extend(self.enable_or_disable("rivet", activation_value="prefix"))
- args.extend(self.enable_or_disable("lhapdf", activation_value="prefix"))
- else:
- # See https://gitlab.com/sherpa-team/sherpa/-/issues/348
- if self.spec.satisfies("+hepmc3"):
- args.append("--enable-hepmc3=" + self.spec["hepmc3"].prefix)
- if self.spec.satisfies("+rivet"):
- args.append("--enable-rivet=" + self.spec["rivet"].prefix)
- if self.spec.satisfies("+lhapdf"):
- args.append("--enable-lhapdf=" + self.spec["lhapdf"].prefix)
+ # See https://gitlab.com/sherpa-team/sherpa/-/issues/348
+ if self.spec.satisfies("+hepmc3"):
+ args.append("--enable-hepmc3=" + self.spec["hepmc3"].prefix)
+ if self.spec.satisfies("+rivet"):
+ args.append("--enable-rivet=" + self.spec["rivet"].prefix)
+ if self.spec.satisfies("+lhapdf"):
+ args.append("--enable-lhapdf=" + self.spec["lhapdf"].prefix)
args.extend(self.enable_or_disable("fastjet", activation_value="prefix"))
args.extend(self.enable_or_disable("openloops", activation_value="prefix"))
@@ -250,14 +208,11 @@ class Sherpa(AutotoolsPackage):
return args
- def flag_handler(self, name, flags):
- flags = list(flags)
- if name == "cxxflags":
- flags.append("-std=c++" + self.spec.variants["cxxstd"].value)
-
- if "+cms" in self.spec:
- flags.extend(["-fuse-cxa-atexit", "-O2"])
- if self.spec.target.family == "x86_64":
- flags.append("-m64")
-
- return (None, None, flags)
+ def install(self, spec, prefix):
+ # Make sure the path to the provided libtool is used instead of the system one
+ filter_file(
+ r"autoreconf -fi",
+ f"autoreconf -fi -I {self.spec['libtool'].prefix.share.aclocal}",
+ "AMEGIC++/Main/makelibs",
+ )
+ make("install")
diff --git a/var/spack/repos/builtin/packages/shocklibs/package.py b/var/spack/repos/builtin/packages/shocklibs/package.py
index 079f3d6e49..79fc07ae21 100644
--- a/var/spack/repos/builtin/packages/shocklibs/package.py
+++ b/var/spack/repos/builtin/packages/shocklibs/package.py
@@ -14,7 +14,10 @@ class Shocklibs(Package):
license("BSD-2-Clause")
+ version("0.9.29", sha256="81c61f22b869b9923065ee57f9bcf62d95bf266887b09486f6c8e6aa07aa2c0a")
version("0.9.24", sha256="465d06f33df2570eaf3ffd535a38fc464084ac95a2f145ead5c71f34beeb0a35")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
install_tree("libs", prefix.libs)
diff --git a/var/spack/repos/builtin/packages/shoremap/package.py b/var/spack/repos/builtin/packages/shoremap/package.py
index be2c189b4f..6eae1ff1fb 100644
--- a/var/spack/repos/builtin/packages/shoremap/package.py
+++ b/var/spack/repos/builtin/packages/shoremap/package.py
@@ -23,6 +23,8 @@ class Shoremap(MakefilePackage):
version("3.6", sha256="0da4179e92cbc68434a9d8eff7bd5fff55c89fd9a543a2db6bd0f69074f2ec70")
+ depends_on("cxx", type="build") # generated
+
depends_on("dislin")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/showfont/package.py b/var/spack/repos/builtin/packages/showfont/package.py
index 794ed08ae6..7779300415 100644
--- a/var/spack/repos/builtin/packages/showfont/package.py
+++ b/var/spack/repos/builtin/packages/showfont/package.py
@@ -17,6 +17,8 @@ class Showfont(AutotoolsPackage, XorgPackage):
version("1.0.6", sha256="006c5cb931e33c8c073215cf106a9c7fe93b81ccb4268274bb33dd5697e1f425")
version("1.0.5", sha256="566e34a145ea73397724d46e84f6a9b3691cf55d0fcb96ec7f917b2b39265ebb")
+ depends_on("c", type="build") # generated
+
depends_on("libfs")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/shtools/package.py b/var/spack/repos/builtin/packages/shtools/package.py
index 6bfdb4e050..2213eca082 100644
--- a/var/spack/repos/builtin/packages/shtools/package.py
+++ b/var/spack/repos/builtin/packages/shtools/package.py
@@ -20,6 +20,9 @@ class Shtools(MakefilePackage):
version("4.8", sha256="c36fc86810017e544abbfb12f8ddf6f101a1ac8b89856a76d7d9801ffc8dac44")
version("4.5", sha256="1975a2a2bcef8c527d321be08c13c2bc479e0d6b81c468a3203f95df59be4f89")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Note: This package also provides Python wrappers. We do not
# install these properly yet, only the Fortran library is
# installed.
diff --git a/var/spack/repos/builtin/packages/shuffile/package.py b/var/spack/repos/builtin/packages/shuffile/package.py
index ee1697dacd..201d1f3b1a 100644
--- a/var/spack/repos/builtin/packages/shuffile/package.py
+++ b/var/spack/repos/builtin/packages/shuffile/package.py
@@ -19,12 +19,16 @@ class Shuffile(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.4.0", sha256="fc7116d8eaa1ab79480e6e3f04064750e517d2a8aeccbff90c73a2590f726378")
version("0.3.0", sha256="3463ad4a23fd31aa9a3426346ada04399fb9369dd1f40d22df9f19f9c0c1f8ae")
version("0.2.0", sha256="467ffef72214c109b69f09d03e42be5e9254f13751b09c71168c14fa99117521")
version("0.1.0", sha256="9e730cc8b7937517a9cffb08c031d9f5772306341c49d17b87b7f349d55a6d5e")
version("0.0.4", sha256="f0249ab31fc6123103ad67b1eaf799277c72adcf0dfcddf8c3a18bad2d45031d")
version("0.0.3", sha256="a3f685526a1146a5ad8dbacdc5f9c2e1152d9761a1a179c1db34f55afc8372f6")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("mpi")
depends_on("kvtree+mpi")
depends_on("zlib-api", type="link")
@@ -44,8 +48,5 @@ class Shuffile(CMakePackage):
if spec.satisfies("@0.1.0:"):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("SHUFFILE_LINK_STATIC", True))
return args
diff --git a/var/spack/repos/builtin/packages/sicer2/package.py b/var/spack/repos/builtin/packages/sicer2/package.py
new file mode 100644
index 0000000000..3c638453f0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sicer2/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Sicer2(PythonPackage):
+ """SICER2: a redesigned and improved ChIP-seq broad peak calling tool"""
+
+ homepage = "https://zanglab.github.io/SICER2/"
+ pypi = "SICER2/SICER2-1.0.3.tar.gz"
+
+ license("MIT", checked_by="A-N-Other")
+
+ version("1.0.3", sha256="003e0f46fb45717fa6b1c94b2c21416161f5b3a4896fbb335cf2024daf2560dd")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy@1.0.0:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/sickle/package.py b/var/spack/repos/builtin/packages/sickle/package.py
index ad0db85568..f4706dc67b 100644
--- a/var/spack/repos/builtin/packages/sickle/package.py
+++ b/var/spack/repos/builtin/packages/sickle/package.py
@@ -19,6 +19,8 @@ class Sickle(MakefilePackage):
version("1.33", sha256="eab271d25dc799e2ce67c25626128f8f8ed65e3cd68e799479bba20964624734")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/sicm/package.py b/var/spack/repos/builtin/packages/sicm/package.py
index 68ab4de4ef..32ecbb9458 100644
--- a/var/spack/repos/builtin/packages/sicm/package.py
+++ b/var/spack/repos/builtin/packages/sicm/package.py
@@ -16,6 +16,10 @@ class Sicm(CMakePackage):
version("master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("jemalloc jemalloc_prefix=je_")
depends_on("numactl")
diff --git a/var/spack/repos/builtin/packages/siesta/package.py b/var/spack/repos/builtin/packages/siesta/package.py
index aa41d69581..36a7a440d4 100644
--- a/var/spack/repos/builtin/packages/siesta/package.py
+++ b/var/spack/repos/builtin/packages/siesta/package.py
@@ -5,16 +5,40 @@
import os
+import shutil
+from spack.build_systems import cmake
from spack.package import *
-class Siesta(MakefilePackage):
+class Siesta(MakefilePackage, CMakePackage):
"""SIESTA performs electronic structure calculations and ab initio molecular
dynamics simulations of molecules and solids.
"""
+ build_system(
+ conditional("cmake", when="@5:"), conditional("makefile", when="@:4"), default="cmake"
+ )
+
homepage = "https://departments.icmab.es/leem/siesta/"
+ git = "https://gitlab.com/siesta-project/siesta"
+
+ version(
+ "5.0.1",
+ url="https://gitlab.com/siesta-project/siesta/-/archive/5.0.1/siesta-5.0.1.tar.gz",
+ sha256="800a22a831c1d36c6f5fe4aa9c49ee510cbd49a0b2f87b3c8bf3edb6ebd0193a",
+ )
+
+ version(
+ "5.0.0",
+ url="https://gitlab.com/siesta-project/siesta/-/archive/rel-5.0/siesta-rel-5.0.tar.gz",
+ sha256="0b40c341dfd47e99e7e191189600bbcaadb0f9af03977fefed6a69836bd523e4",
+ )
+ version(
+ "4.1.5",
+ url="https://gitlab.com/siesta-project/siesta/-/archive/v4.1.5/siesta-v4.1.5.tar.gz",
+ sha256="adc88619bf7e17fca2c67ecdcdae1f07ec4b3caf3541c0edf12964c8c330edc9",
+ )
license("GPL-3.0-or-later")
@@ -32,12 +56,41 @@ class Siesta(MakefilePackage):
patch("configure.patch", when="@:4.0")
- depends_on("mpi")
+ variant("mpi", default=True, description="Builds with mpi support")
+ variant("openmp", default=True, description="Enables OpenMP support")
+ variant("netcdf", default=False, description="Compile with Netcdf")
+ variant("metis", default=False, description="Activate Metis as a possible ordering library")
+ variant("elpa", default=False, description="Use ELPA")
+ variant("mumps", default=False, description="Compile with support for MUMPS solvers")
+ variant("pexsi", default=False, description="Compile with PEXSI")
+ variant(
+ "cray",
+ default=False,
+ description="Enable specific cray settings for using cray-hdf5"
+ " and cray-netcdf modulefiles",
+ )
+ variant("debug", default=False, description="Build in debug mode")
+ variant(
+ "build_type",
+ default="Release",
+ description="The build type to build",
+ values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel", "check"),
+ )
+
+ depends_on("mpi", when="+mpi")
depends_on("blas")
depends_on("lapack")
- depends_on("scalapack")
+ depends_on("scalapack", when="+mpi")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
+ depends_on("cray-libsci+openmp", when="^[virtuals=cray-libsci] cray-libsci")
+ depends_on("metis@5:", when="+metis")
+ depends_on("elpa", when="+elpa")
+ depends_on("mumps", when="+mumps")
+ depends_on("pexsi", when="+pexsi")
+
+ with when("build_system=cmake"):
+ depends_on("cmake@3.20:", type="build")
def flag_handler(self, name, flags):
if "%gcc@10:" in self.spec and name == "fflags":
@@ -46,49 +99,207 @@ class Siesta(MakefilePackage):
def edit(self, spec, prefix):
sh = which("sh")
- configure_args = [
- "--enable-mpi",
- "--with-blas=%s" % spec["blas"].libs,
- "--with-lapack=%s" % spec["lapack"].libs,
- # need to include BLAS below because Intel MKL's
- # BLACS depends on BLAS, otherwise the compiler
- # test fails
- "--with-blacs=%s" % (spec["scalapack"].libs + spec["blas"].libs),
- "--with-scalapack=%s" % spec["scalapack"].libs,
- "--with-netcdf=%s" % (spec["netcdf-fortran"].libs + spec["netcdf-c"].libs),
- # need to specify MPIFC explicitly below, otherwise
- # Intel's mpiifort is not found
- "MPIFC=%s" % spec["mpi"].mpifc,
- ]
- if self.spec.satisfies("%gcc"):
- configure_args.append("FCFLAGS=-ffree-line-length-0")
- for d in ["Obj", "Obj_trans"]:
- with working_dir(d, create=True):
- sh("../Src/configure", *configure_args)
- if spec.satisfies("@:4.0%intel"):
- with open("arch.make", "a") as f:
- f.write("\natom.o: atom.F\n")
- f.write("\t$(FC) -c $(FFLAGS) -O1")
- f.write("$(INCFLAGS) $(FPPFLAGS) $<")
+ if "+cray" in spec:
+ netcdff_prefix = os.environ.get("NETCDF_DIR", "")
+ hdf5_prefix = os.environ.get("HDF5_DIR", "")
+ if spec.satisfies("@:4.0.2 +mpi"):
+ configure_args = [
+ "--enable-mpi",
+ "--with-blas=%s" % spec["blas"].libs,
+ "--with-lapack=%s" % spec["lapack"].libs,
+ # need to include BLAS below because Intel MKL's
+ # BLACS depends on BLAS, otherwise the compiler
+ # test fails
+ "--with-blacs=%s" % (spec["scalapack"].libs + spec["blas"].libs),
+ "--with-scalapack=%s" % spec["scalapack"].libs,
+ # need to specify MPIFC explicitly below, otherwise
+ # Intel's mpiifort is not found
+ "MPIFC=%s" % spec["mpi"].mpifc,
+ ]
+ if "+cray" in spec:
+ configure_args += ["--with-netcdf={0}/lib/libnetcdff.so".format(netcdff_prefix)]
+ else:
+ configure_args += [
+ "--with-netcdf=%s" % (spec["netcdf-fortran"].libs + spec["netcdf-c"].libs)
+ ]
+
+ if self.spec.satisfies("%gcc"):
+ if "+cray" in spec:
+ configure_args.append(
+ "FCFLAGS=-ffree-line-length-0 -I{0}/include".format(netcdff_prefix)
+ )
+ else:
+ configure_args.append("FCFLAGS=-ffree-line-length-0")
+ for d in ["Obj", "Obj_trans"]:
+ with working_dir(d, create=True):
+ sh("../Src/configure", *configure_args)
+ if spec.satisfies("@:4.0%intel"):
+ with open("arch.make", "a") as f:
+ f.write("\natom.o: atom.F\n")
+ f.write("\t$(FC) -c $(FFLAGS) -O1")
+ f.write("$(INCFLAGS) $(FPPFLAGS) $<")
+ sh("../Src/obj_setup.sh")
+
+ elif self.spec.satisfies("@:4.1.5"):
+ with working_dir("Obj", create=True):
sh("../Src/obj_setup.sh")
+ if spec.satisfies("@:4.1.5%gcc"):
+ shutil.copy("./gfortran.make", "./arch.make")
+ libs_arg = []
+ fppflags_arg = []
+ arch_make = FileFilter("./arch.make")
+ arch_make.filter(
+ "FFLAGS = .*",
+ "FFLAGS = {0}".format(
+ "-O2 -fPIC -ftree-vectorize -fallow-argument-mismatch"
+ ),
+ )
+
+ if "+debug" in spec:
+ arch_make.filter("FFLAGS_DEBUG=.*", "FFLAGS_DEBUG= -g -O1")
+
+ if "^cray-libsci" in spec:
+ libs_arg.append("-L{0}/lib -lsci_gnu".format(spec["cray-libsci"].prefix))
+
+ with open("arch.make", "a") as f:
+ if "+mpi" in spec:
+ arch_make.filter("CC = .*", "CC = {0}".format(spec["mpi"].mpicc))
+ arch_make.filter("FC = .*", "FC = {0}".format(spec["mpi"].mpifc))
+ if "^cray-libsci" in spec:
+ libs_arg.append("-lsci_gnu_mpi")
+ f.write("MPI_INTERFACE = libmpi_f90.a\n")
+ f.write("MPI_INCLUDE = .\n")
+ f.write("LIBS += " + spec["scalapack"].libs.ld_flags + "\n")
+ fppflags_arg.append("-DMPI ")
+
+ if "+openmp" in spec:
+ f.write("FFLAGS += -fopenmp\n")
+ f.write("LIBS += -fopenmp\n")
+
+ if "+netcdf" in spec:
+ if "+cray" in spec:
+ libs_arg.append(
+ "-L{0}/lib -lnetcdff -lnetcdf".format(netcdff_prefix)
+ )
+ libs_arg.append(
+ "-L{0}/lib -lhdf5_fortran -lhdf5".format(hdf5_prefix)
+ )
+ else:
+ libs_arg.append(
+ "-L{0}/lib -lnetcdff -lnetcdf".format(
+ spec["netcdf-fortran"].prefix
+ )
+ )
+
+ if "+metis" in spec:
+ libs_arg.append("-L{0} -lmetis".format(self.spec["metis"].prefix.lib))
+ fppflags_arg.append("-DSIESTA__METIS ")
+
+ if "elpa" in spec:
+ elpa = spec["elpa"]
+ elpa_suffix = "_openmp" if "+openmp" in elpa else ""
+ elpa_incdir = elpa.headers.directories[0]
+ libs_arg.append(
+ "-L{0} -lelpa{1}".format(self.spec["elpa"].prefix.lib, elpa_suffix)
+ )
+ fppflags_arg.append(
+ "-DSIESTA__ELPA -I{0}".format(join_path(elpa_incdir, "modules"))
+ )
+
+ if "mumps" in spec:
+ libs_arg.append(
+ "-L{0} -lmumps_common -lzmumps".format(
+ self.spec["mumps"].prefix.lib
+ )
+ )
+ fppflags_arg.append("-DSIESTA__MUMPS ")
+
+ if "+pexsi" in spec:
+ libs_arg.append(
+ "-L{0} -lpexsi_linux".format(self.spec["pexsi"].prefix.lib)
+ )
+ fppflags_arg.append("-DSIESTA__PEXSI ")
+ f.write("INCFLAGS += -I{0}/include".format(self.spec["pexsi"].prefix))
+
+ arch_make.filter("^LIBS =.*", "LIBS = {0}".format(" ".join(libs_arg)))
+ f.write("FPPFLAGS = {0}".format(" ".join(fppflags_arg)))
def build(self, spec, prefix):
with working_dir("Obj"):
make(parallel=False)
- with working_dir("Obj_trans"):
- make("transiesta", parallel=False)
- with working_dir("Util"):
- sh = which("sh")
- sh("build_all.sh")
+ if spec.satisfies("@:4.0.2"):
+ with working_dir("Obj_trans"):
+ make("transiesta", parallel=False)
+ with working_dir("Util"):
+ sh = which("sh")
+ sh("build_all.sh")
def install(self, spec, prefix):
mkdir(prefix.bin)
with working_dir("Obj"):
install("siesta", prefix.bin)
- with working_dir("Obj_trans"):
- install("transiesta", prefix.bin)
+ if spec.satisfies("@:4.0.2"):
+ with working_dir("Obj_trans"):
+ install("transiesta", prefix.bin)
for root, _, files in os.walk("Util"):
for fname in files:
fname = join_path(root, fname)
if os.access(fname, os.X_OK):
install(fname, prefix.bin)
+
+
+class CMakeBuilder(cmake.CMakeBuilder):
+ """Use the new CMake build system to build siesta@5.0.0:."""
+
+ def cmake_args(self):
+ spec = self.spec
+ args = []
+
+ args += ["-DBLAS_LIBRARIES={0}".format(self.spec["blas"].libs.link_flags)]
+ args += ["-DLAPACK_LIBRARIES={0}".format(self.spec["lapack"].libs.link_flags)]
+
+ if "+mpi" in spec:
+ args += [
+ "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
+ "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
+ "-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
+ ]
+ args += ["-DSIESTA_WITH_MPI=ON"]
+ args += ["-DSCALAPACK_LIBRARY={0}".format(spec["scalapack"].libs.joined(";"))]
+
+ if "+openmp" in spec:
+ args += ["-DSIESTA_WITH_OPENMP=ON"]
+ if "+cray" in spec:
+ args += ["-DFortran_FLAGS=-fopenmp"]
+
+ if "build_type=Debug" in spec:
+ args += [
+ "-DFortran_FLAGS=-Og -g -Wall -fcheck=all -fbacktrace"
+ " -Warray-bounds -Wunused -Wuninitialized"
+ ]
+ else:
+ args += ["-DFortran_FLAGS=-O2 -fPIC -ftree-vectorize -fallow-argument-mismatch"]
+
+ if "+netcdf" in spec:
+ args += ["-DSIESTA_WITH_NETCDF=ON"]
+ if "+cray" in spec:
+ args += ["-DNetCDF_PATH={0}".format(os.environ.get("NETCDF_DIR", ""))]
+ else:
+ args += ["-DNetCDF_PATH={0}".format(spec["netcdf-fortran"].prefix)]
+
+ if "+elpa" in spec:
+ args += ["-DSIESTA_WITH_ELPA=ON"]
+
+ if "+mumps" in spec:
+ args += ["-DSIESTA__MUMPS=ON"]
+ args += [
+ "-DSIESTA_LINKER_FLAGS=-L{0} -lmumps_common -lzmumps".format(
+ self.spec["mumps"].prefix.lib
+ )
+ ]
+
+ if "+metis" in spec:
+ args += ["-DSIESTA__METIS=ON"]
+ args += ["-DSIESTA_LINKER_FLAGS=-L{0} -lmetis".format(self.spec["metis"].prefix.lib)]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/sigcpp/package.py b/var/spack/repos/builtin/packages/sigcpp/package.py
index b4afc0f1b3..375f7c3c37 100644
--- a/var/spack/repos/builtin/packages/sigcpp/package.py
+++ b/var/spack/repos/builtin/packages/sigcpp/package.py
@@ -17,9 +17,12 @@ class Sigcpp(CMakePackage):
license("LGPL-3.0-only")
+ version("3.6.0", sha256="bbe81e4f6d8acb41a9795525a38c0782751dbc4af3d78a9339f4a282e8a16c38")
version("3.2.0", sha256="f9c36331b5d5ac7a1651477288f47eec51394c03ade8bb1a05d1c46eac5f77e7")
version("3.0.7", sha256="063b6ab86e4d8703ea65d894d78e8482b1fc34b92be8849f82ce1c5b05cf2b8d")
+ depends_on("cxx", type="build") # generated
+
variant("doc", default=True, description="Keep man files")
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/sigio/package.py b/var/spack/repos/builtin/packages/sigio/package.py
index 1fc5edd76a..b6d3020211 100644
--- a/var/spack/repos/builtin/packages/sigio/package.py
+++ b/var/spack/repos/builtin/packages/sigio/package.py
@@ -19,8 +19,17 @@ class Sigio(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("2.3.3", sha256="2b4a04be3be10f222d0ff47f973f65a03b8b5521dcad8e8866f3bfe4e8dfafab")
version("2.3.2", sha256="333f3cf3a97f97103cbafcafc2ad89b24faa55b1332a98adc1637855e8a5b613")
+ depends_on("fortran", type="build")
+
+ conflicts("%oneapi", when="@:2.3.2", msg="Requires @2.3.3: for Intel OneAPI")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
+
def setup_run_environment(self, env):
lib = find_libraries("libsigio", root=self.prefix, shared=False, recursive=True)
# Only one library version, but still need to set _4 to make NCO happy
@@ -33,3 +42,7 @@ class Sigio(CMakePackage):
if name == "fflags":
flags.append("-Free")
return (None, None, flags)
+
+ def check(self):
+ with working_dir(self.build_directory):
+ make("test")
diff --git a/var/spack/repos/builtin/packages/signify/package.py b/var/spack/repos/builtin/packages/signify/package.py
index 5c7e6c37c1..d63eed1060 100644
--- a/var/spack/repos/builtin/packages/signify/package.py
+++ b/var/spack/repos/builtin/packages/signify/package.py
@@ -14,9 +14,12 @@ class Signify(MakefilePackage):
license("ISC")
+ version("32", sha256="48cfd7bfe55be01909b37e78045f240b950ea51c954bab205bcdcddc0492dca4")
version("31", sha256="8111af7424f4cc69dab5cd43a14ccd607ca2d171ac77dd3ae288264a53254e5f")
version("23", sha256="1c690bf0e4283e0764a4a9dd784cb3debf4bb456b975b275dd1aaac7d5afe030")
+ depends_on("c", type="build") # generated
+
depends_on("libbsd@0.8:")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch b/var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch
index ae74145081..023f0bbe66 100644
--- a/var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch
+++ b/var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch
@@ -1,50 +1,38 @@
diff --git a/src/hdf5_drv/H5FDsilo.c b/src/hdf5_drv/H5FDsilo.c
+index 840dfd0..0153e18 100644
--- a/src/hdf5_drv/H5FDsilo.c
+++ b/src/hdf5_drv/H5FDsilo.c
-@@ -243,6 +243,12 @@
- return tmp;
- }
-
-+#if HDF5_VERSION_GE(1,10,8)
-+#define H5EPR_SEMI_COLON ;
-+#else
-+#define H5EPR_SEMI_COLON
-+#endif
-+
-
- #ifdef H5_HAVE_SNPRINTF
- #define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno) \
-@@ -252,13 +258,13 @@
+@@ -255,13 +255,13 @@ static const char *flavors(H5F_mem_t m)
snprintf(msg, sizeof(msg), Msg "(errno=%d, \"%s\")", \
Errno, strerror(Errno)); \
ret_value = Ret; \
- H5Epush_ret(Func, Cls, Maj, Min, msg, Ret) \
-+ H5Epush_ret(Func, Cls, Maj, Min, msg, Ret) H5EPR_SEMI_COLON \
++ H5Epush_ret(Func, Cls, Maj, Min, msg, Ret) ; \
}
#else
#define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno) \
{ \
ret_value = Ret; \
- H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret) \
-+ H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret) H5EPR_SEMI_COLON \
++ H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret) ; \
}
#endif
-@@ -1355,7 +1368,7 @@
+@@ -1308,7 +1308,7 @@ H5FD_silo_sb_encode(H5FD_t *_file, char *name/*out*/,
assert(sizeof(hsize_t)<=8);
memcpy(p, &file->block_size, sizeof(hsize_t));
if (H5Tconvert(H5T_NATIVE_HSIZE, H5T_STD_U64LE, 1, buf+8, NULL, H5P_DEFAULT)<0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
-+ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) H5EPR_SEMI_COLON
++ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) ;
return 0;
}
-@@ -1383,14 +1396,14 @@
+@@ -1336,14 +1336,14 @@ H5FD_silo_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
/* Make sure the name/version number is correct */
if (strcmp(name, "LLNLsilo"))
- H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1)
-+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1) H5EPR_SEMI_COLON
++ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1) ;
buf += 8;
/* Decode block size */
@@ -52,7 +40,7 @@ diff --git a/src/hdf5_drv/H5FDsilo.c b/src/hdf5_drv/H5FDsilo.c
memcpy(x, buf, 8);
if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HSIZE, 1, x, NULL, H5P_DEFAULT)<0)
- H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
-+ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) H5EPR_SEMI_COLON
++ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) ;
ap = (hsize_t*)x;
/*file->block_size = *ap; ignore stored value for now */
diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py
index 435255a4de..3416a5c610 100644
--- a/var/spack/repos/builtin/packages/silo/package.py
+++ b/var/spack/repos/builtin/packages/silo/package.py
@@ -50,6 +50,11 @@ class Silo(AutotoolsPackage):
version("4.9", sha256="90f3d069963d859c142809cfcb034bc83eb951f61ac02ccb967fc8e8d0409854")
version("4.8", sha256="c430c1d33fcb9bc136a99ad473d535d6763bd1357b704a915ba7b1081d58fb21")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("python", default=True, description="Enable Python support")
variant("fortran", default=True, description="Enable Fortran support")
variant("shared", default=True, description="Build shared libraries")
variant("silex", default=False, description="Builds Silex, a GUI for viewing Silo files")
@@ -137,12 +142,18 @@ class Silo(AutotoolsPackage):
# presented with an HDF5 API consistent with the HDF5 version.
# Use the latest even-numbered API version, i.e. v1.13.1 uses
# API v1.12
- maj_ver = int(spec["hdf5"].version[0])
- min_ver = int(spec["hdf5"].version[1])
+
+ # hdf5 support branches have a `develop` prefix
+ if "develop" in str(spec["hdf5"].version):
+ maj_ver = int(spec["hdf5"].version[1])
+ min_ver = int(spec["hdf5"].version[2])
+ else:
+ maj_ver = int(spec["hdf5"].version[0])
+ min_ver = int(spec["hdf5"].version[1])
min_apiver = int(min_ver / 2) * 2
flags.append("-DH5_USE_{0}{1}_API".format(maj_ver, min_apiver))
- if spec.compiler.name in ["clang", "apple-clang"]:
+ if spec.satisfies("%clang") or spec.satisfies("%apple-clang"):
flags.append("-Wno-implicit-function-declaration")
return (flags, None, None)
@@ -194,14 +205,14 @@ class Silo(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- config_args = [
- "--enable-install-lite-headers",
- "--enable-fortran" if "+fortran" in spec else "--disable-fortran",
- "--enable-silex" if "+silex" in spec else "--disable-silex",
- "--enable-shared" if "+shared" in spec else "--disable-shared",
- "--enable-hzip" if "+hzip" in spec else "--disable-hzip",
- "--enable-fpzip" if "+fpzip" in spec else "--disable-fpzip",
- ]
+ config_args = ["--enable-install-lite-headers"]
+
+ config_args.extend(self.enable_or_disable("pythonmodule", variant="python"))
+ config_args.extend(self.enable_or_disable("fortran"))
+ config_args.extend(self.enable_or_disable("silex"))
+ config_args.extend(self.enable_or_disable("shared"))
+ config_args.extend(self.enable_or_disable("hzip"))
+ config_args.extend(self.enable_or_disable("fpzip"))
# Do not specify the prefix of zlib if it is in a system directory
# (see https://github.com/spack/spack/pull/21900).
diff --git a/var/spack/repos/builtin/packages/simde/package.py b/var/spack/repos/builtin/packages/simde/package.py
index becbbdea6e..17cd3a66fa 100644
--- a/var/spack/repos/builtin/packages/simde/package.py
+++ b/var/spack/repos/builtin/packages/simde/package.py
@@ -24,5 +24,7 @@ class Simde(MesonPackage):
version("0.7.2", sha256="366d5e9a342c30f1e40d1234656fb49af5ee35590aaf53b3c79b2afb906ed4c8")
version("0.6.0", sha256="25a8b8c69c17ddc2f6209e86caa6b12d4ed91c0f841617efc56e5675eea84915")
+ depends_on("c", type="build") # generated
+
patch("sve-gcc.patch", when="@0.6.0 %gcc")
conflicts("%gcc@8", when="target=a64fx", msg="Internal compiler error with gcc8 and a64fx")
diff --git a/var/spack/repos/builtin/packages/simgrid/package.py b/var/spack/repos/builtin/packages/simgrid/package.py
index d164029b39..a7d7b7de87 100644
--- a/var/spack/repos/builtin/packages/simgrid/package.py
+++ b/var/spack/repos/builtin/packages/simgrid/package.py
@@ -119,6 +119,10 @@ class Simgrid(CMakePackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("doc", default=False, description="Build documentation")
variant("smpi", default=True, description="SMPI provides MPI")
variant("examples", default=False, description="Install examples")
diff --git a/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py b/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py
index 65fe64d19d..19a9f2fa1c 100644
--- a/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py
+++ b/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py
@@ -542,8 +542,9 @@ class SimmetrixSimmodsuite(Package):
variant("paralleladapt", default=False, description="enable parallel adaptation")
depends_on("mpi")
+ depends_on("libtirpc", type="link")
- oslib = "x64_rhel7_gcc48"
+ oslib = "x64_rhel8_gcc83"
for release in RELEASES:
# define the version using the mscore tarball
@@ -571,12 +572,12 @@ class SimmetrixSimmodsuite(Package):
simmetrix_resource(_name, url, sha256, condition)
def setup_dependent_build_environment(self, env, dependent_spec):
- archlib = join_path(prefix.lib, self.oslib)
+ archlib = join_path(self.prefix.lib, self.oslib)
env.append_path("CMAKE_PREFIX_PATH", archlib)
simmetrix_setkernelcmakeprefixpath(self.spec, archlib, env)
def setup_run_environment(self, env):
- archlib = join_path(prefix.lib, self.oslib)
+ archlib = join_path(self.prefix.lib, self.oslib)
env.append_path("CMAKE_PREFIX_PATH", archlib)
simmetrix_setkernelcmakeprefixpath(self.spec, archlib, env)
diff --git a/var/spack/repos/builtin/packages/simple-dftd3/package.py b/var/spack/repos/builtin/packages/simple-dftd3/package.py
index dda976818a..e79bf2f9a2 100644
--- a/var/spack/repos/builtin/packages/simple-dftd3/package.py
+++ b/var/spack/repos/builtin/packages/simple-dftd3/package.py
@@ -24,6 +24,9 @@ class SimpleDftd3(MesonPackage):
version("0.6.0", sha256="c057361565f570cb128489c70131487f71b6891a40e5292dfe37041596810dfe")
version("0.5.1", sha256="0411fdaebe438f652a970cb232ae3199c4cc840366ed05fda4c38e634632040d")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP parallelisation")
variant("python", default=False, description="Build Python extension module")
diff --git a/var/spack/repos/builtin/packages/simplemoc/package.py b/var/spack/repos/builtin/packages/simplemoc/package.py
index edae6d58e4..9699d1bd52 100644
--- a/var/spack/repos/builtin/packages/simplemoc/package.py
+++ b/var/spack/repos/builtin/packages/simplemoc/package.py
@@ -20,6 +20,8 @@ class Simplemoc(MakefilePackage):
version("4", sha256="a39906014fdb234c43bf26e1919bdc8a13097788812e0b353a492b8e568816a6")
+ depends_on("c", type="build") # generated
+
tags = ["proxy-app"]
variant("mpi", default=True, description="Build with MPI support")
diff --git a/var/spack/repos/builtin/packages/simsipm/package.py b/var/spack/repos/builtin/packages/simsipm/package.py
index c60d3c1fe8..8cdce1904a 100644
--- a/var/spack/repos/builtin/packages/simsipm/package.py
+++ b/var/spack/repos/builtin/packages/simsipm/package.py
@@ -24,6 +24,8 @@ class Simsipm(CMakePackage):
version("2.0.2", sha256="ba60ed88b54b1b29d089f583dbce93b3272b0b13d47772941339f1503ee3fa48")
version("1.2.4", sha256="1c633bebb19c490b5e6dfa5ada4a6bc7ec36348237c2626d57843a25af923211")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Build pybind11-based python bindings")
variant("openmp", default=False, description="Use OpenMP", when="@:1")
diff --git a/var/spack/repos/builtin/packages/simul/package.py b/var/spack/repos/builtin/packages/simul/package.py
index a415be56c7..b8eda857f5 100644
--- a/var/spack/repos/builtin/packages/simul/package.py
+++ b/var/spack/repos/builtin/packages/simul/package.py
@@ -18,6 +18,8 @@ class Simul(Package):
version("1.14", sha256="cbc70881b2a03e9a5076dbdf82b6fdfa48351ab381e379935b9c7db0ee315c92")
version("1.13", sha256="42a67258181fbf723cfe13d4d2dabc5aed0d0daa606b9d817108c354e37d1c64")
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/simulationio/package.py b/var/spack/repos/builtin/packages/simulationio/package.py
index 0ca06958f0..04b3efd8c1 100644
--- a/var/spack/repos/builtin/packages/simulationio/package.py
+++ b/var/spack/repos/builtin/packages/simulationio/package.py
@@ -23,6 +23,8 @@ class Simulationio(CMakePackage):
version("9.0.2", sha256="3dd3422e64f6a75215783f6157effd07430e1d0af5884e565f73388a815511f8")
version("9.0.1", sha256="c2f6c99417165f6eb8cbb9c44822d119586675abb34eabd553eb80f44b53e0c8")
+ depends_on("cxx", type="build") # generated
+
variant("asdf", default=True, description="Enable ASDF bindings")
variant("julia", default=False, description="Enable Julia bindings")
variant("python", default=True, description="Enable Python bindings", when="@9:")
diff --git a/var/spack/repos/builtin/packages/sina/package.py b/var/spack/repos/builtin/packages/sina/package.py
index 1131cfba3a..fd46c1e1e0 100644
--- a/var/spack/repos/builtin/packages/sina/package.py
+++ b/var/spack/repos/builtin/packages/sina/package.py
@@ -20,6 +20,9 @@ class Sina(CachedCMakePackage):
version("1.11.0", sha256="a080f6583101696a6354940f00646ef892e1b2f8fc3f1b1907ba1c3ade6d4b47")
version("1.10.0", sha256="b34379ce8cc5eca5a0f16893053fac75be14c2109d1beed4c6d48e11f9b281c7")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("docs", default=False, description="Allow generating documentation")
variant("adiak", default=False, description="Create interface for calling Sina through Adiak")
variant("test", default=False, description="Build tests")
diff --git a/var/spack/repos/builtin/packages/singularity-eos/package.py b/var/spack/repos/builtin/packages/singularity-eos/package.py
index 45970a4f5c..509a7177ee 100644
--- a/var/spack/repos/builtin/packages/singularity-eos/package.py
+++ b/var/spack/repos/builtin/packages/singularity-eos/package.py
@@ -5,6 +5,8 @@
import os
+import spack
+import spack.version
from spack.package import *
@@ -66,6 +68,10 @@ class SingularityEos(CMakePackage, CudaPackage):
variant("closure", default=True, description="Build closure module")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
# building/testing/docs
depends_on("cmake@3.19:", type="build")
depends_on("python@3:", when="+python")
diff --git a/var/spack/repos/builtin/packages/singularity-legacy/package.py b/var/spack/repos/builtin/packages/singularity-legacy/package.py
index 3cd875286a..9780439e87 100644
--- a/var/spack/repos/builtin/packages/singularity-legacy/package.py
+++ b/var/spack/repos/builtin/packages/singularity-legacy/package.py
@@ -36,6 +36,8 @@ class SingularityLegacy(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libarchive", when="@2.5.2:")
# these are only needed if we're grabbing the unreleased tree
depends_on("m4", type="build", when="@2.6-release")
diff --git a/var/spack/repos/builtin/packages/singularity/package.py b/var/spack/repos/builtin/packages/singularity/package.py
index 317c3ac827..b5b6c48950 100644
--- a/var/spack/repos/builtin/packages/singularity/package.py
+++ b/var/spack/repos/builtin/packages/singularity/package.py
@@ -132,4 +132,6 @@ class Singularity(SingularityBase):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
patch("singularity_v3.4.0_remove_root_check.patch", level=0, when="@3.4.0:3.4.1")
diff --git a/var/spack/repos/builtin/packages/singularityce/package.py b/var/spack/repos/builtin/packages/singularityce/package.py
index ca7a49d9d3..6a14fe471f 100644
--- a/var/spack/repos/builtin/packages/singularityce/package.py
+++ b/var/spack/repos/builtin/packages/singularityce/package.py
@@ -8,6 +8,7 @@ import shutil
import llnl.util.tty as tty
+import spack.tengine
from spack.package import *
@@ -26,6 +27,10 @@ class SingularityBase(MakefilePackage):
depends_on("git", when="@develop") # mconfig uses it for version info
depends_on("shadow", type="run", when="@3.3:")
depends_on("cryptsetup", type=("build", "run"), when="@3.4:")
+ depends_on("libfuse", type=("build", "run"), when="@4.0:")
+ depends_on("autoconf", type="build", when="@4.0:")
+ depends_on("automake", type="build", when="@4.0:")
+ depends_on("libtool", type="build", when="@4.0:")
conflicts("platform=darwin", msg="singularity requires a Linux VM on Windows & Mac")
@@ -109,6 +114,11 @@ class SingularityBase(MakefilePackage):
"mksquashfs path = {0}".format(squash_path),
join_path(prefix.etc, self.singularity_name, self.singularity_name + ".conf"),
)
+ filter_file(
+ r"^shared loop devices = no",
+ "shared loop devices = yes",
+ join_path(prefix.etc, self.singularity_name, self.singularity_name + ".conf"),
+ )
#
# Assemble a script that fixes the ownership and permissions of several
@@ -202,6 +212,10 @@ class Singularityce(SingularityBase):
maintainers("alalazo")
version("master", branch="master")
+ version("4.1.0", sha256="119667f18e76a750b7d4f8612d7878c18a824ee171852795019aa68875244813")
+ version("4.0.3", sha256="b3789c9113edcac62032ce67cd1815cab74da6c33c96da20e523ffb54cdcedf3")
+ version("3.11.5", sha256="5acfbb4a109d9c63a25c230e263f07c1e83f6c726007fbcd97a533f03d33a86a")
+ version("3.11.4", sha256="751dbea64ec16fd7e7af1e36953134c778c404909f9d27ba89006644160b2fde")
version("3.11.3", sha256="a77ede063fd115f85f98f82d2e30459b5565db7d098665497bcd684bf8edaec9")
version("3.10.3", sha256="f87d8e212ce209c5212d6faf253b97a24b5d0b6e6b17b5e58b316cdda27a332f")
version("3.10.2", sha256="b4f279856ea4bf28a1f34f89320c02b545d6e57d4143679920e1ac4267f540e1")
@@ -210,3 +224,5 @@ class Singularityce(SingularityBase):
version("3.9.9", sha256="1381433d64138c08e93ffacdfb4844e82c2288f1e39a9d2c631a1c4021381f2a")
version("3.9.1", sha256="1ba3bb1719a420f48e9b0a6afdb5011f6c786d0f107ef272528c632fff9fd153")
version("3.8.0", sha256="5fa2c0e7ef2b814d8aa170826b833f91e5031a85d85cd1292a234e6c55da1be1")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/builtin/packages/sio/package.py b/var/spack/repos/builtin/packages/sio/package.py
index 972f682107..c549311fa1 100644
--- a/var/spack/repos/builtin/packages/sio/package.py
+++ b/var/spack/repos/builtin/packages/sio/package.py
@@ -27,6 +27,9 @@ class Sio(CMakePackage):
version("0.0.3", sha256="4c8b9c08480fb53cd10abb0e1260071a8c3f68d06a8acfd373f6560a916155cc")
version("0.0.2", sha256="e4cd2aeaeaa23c1da2c20c5c08a9b72a31b16b7a8f5aa6d480dcd561ef667657")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"builtin_zlib",
default=True,
diff --git a/var/spack/repos/builtin/packages/sionlib/package.py b/var/spack/repos/builtin/packages/sionlib/package.py
index c329066b0e..b69e418f44 100644
--- a/var/spack/repos/builtin/packages/sionlib/package.py
+++ b/var/spack/repos/builtin/packages/sionlib/package.py
@@ -23,6 +23,10 @@ class Sionlib(AutotoolsPackage):
extension="tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
patch("for_aarch64.patch", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py
index ba4a918627..02f547a082 100644
--- a/var/spack/repos/builtin/packages/sirius/package.py
+++ b/var/spack/repos/builtin/packages/sirius/package.py
@@ -23,6 +23,10 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("7.6.1", sha256="16a114dc17e28697750585820e69718a96e6929f88406d266c75cf9a7cdbdaaa")
+ version("7.6.0", sha256="e424206fecb35bb2082b5c87f0865a9536040e984b88b041e6f7d531f8a65b20")
+ version("7.5.2", sha256="9ae01935578532c84f1d0d673dbbcdd490e26be22efa6c4acf7129f9dc1a0c60")
+ version("7.5.1", sha256="aadfa7976e90a109aeb1677042454388a8d1a50d75834d59c86c8aef06bc12e4")
version("7.5.0", sha256="c583f88ffc02e9acac24e786bc35c7c32066882d2f70a1e0c14b5780b510365d")
version("7.4.3", sha256="015679a60a39fa750c5d1bd8fb1ce73945524bef561270d8a171ea2fd4687fec")
version("7.4.0", sha256="f9360a695a1e786d8cb9d6702c82dd95144a530c4fa7e8115791c7d1e92b020b")
@@ -80,6 +84,9 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("openmp", default=True, description="Build with OpenMP support")
variant("fortran", default=False, description="Build Fortran bindings")
@@ -106,9 +113,19 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
)
variant("nvtx", default=False, description="Use NVTX profiler")
+ with when("@7.6:"):
+ variant(
+ "pugixml",
+ default=False,
+ description="Enable direct reading of UPF v2 pseudopotentials",
+ )
+ conflicts("+tests~pugixml")
+ depends_on("pugixml", when="+pugixml")
+
depends_on("cmake@3.23:", type="build")
depends_on("mpi")
depends_on("gsl")
+ depends_on("blas")
depends_on("lapack")
depends_on("fftw-api@3")
depends_on("libxc@3.0.0:")
@@ -132,16 +149,19 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
depends_on("magma", when="+magma")
- depends_on("spfft@0.9.13:", when="@7.0.1:")
- depends_on("spfft+single_precision", when="+single_precision ^spfft")
- depends_on("spfft+cuda", when="+cuda ^spfft")
- depends_on("spfft+rocm", when="+rocm ^spfft")
- depends_on("spfft+openmp", when="+openmp ^spfft")
+ with when("@7.0.1:"):
+ depends_on("spfft@0.9.13:")
+ depends_on("spfft+single_precision", when="+single_precision")
+ depends_on("spfft+cuda", when="+cuda")
+ depends_on("spfft+rocm", when="+rocm")
+ depends_on("spfft+openmp", when="+openmp")
- depends_on("spla@1.1.0:", when="@7.0.2:")
- depends_on("spla+cuda", when="+cuda ^spla")
- depends_on("spla+rocm", when="+rocm ^spla")
- depends_on("spla+openmp", when="+openmp ^spla")
+ with when("@7.0.2:"):
+ depends_on("spla@1.1.0:")
+ depends_on("spla+cuda", when="+cuda")
+ depends_on("spla+rocm", when="+rocm")
+ # spla removed the openmp option in 1.6.0
+ conflicts("^spla@:1.5~openmp", when="+openmp")
depends_on("nlcglib", when="+nlcglib")
depends_on("nlcglib+rocm", when="+nlcglib+rocm")
@@ -157,21 +177,38 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
depends_on("dla-future +cuda", when="+cuda")
depends_on("dla-future +rocm", when="+rocm")
+ conflicts("^pika@:0.22.1", when="+cuda")
+ conflicts("^pika@:0.22.1", when="+rocm")
+
depends_on("rocblas", when="+rocm")
depends_on("rocsolver", when="@7.5.0: +rocm")
- # FindHIP cmake script only works for < 4.1
- depends_on("hip@:4.0", when="@:7.2.0 +rocm")
+ # FindHIP cmake script only works for < 4.1, but HIP 4.1 is not provided by spack anymore
+ conflicts("+rocm", when="@:7.2.0")
conflicts("^libxc@5.0.0") # known to produce incorrect results
conflicts("+single_precision", when="@:7.2.4")
conflicts("+scalapack", when="^cray-libsci")
# Propagate openmp to blas
- depends_on("openblas threads=openmp", when="+openmp ^openblas")
- depends_on("amdblis threads=openmp", when="+openmp ^amdblis")
- depends_on("blis threads=openmp", when="+openmp ^blis")
- depends_on("intel-mkl threads=openmp", when="+openmp ^intel-mkl")
+ depends_on("openblas threads=openmp", when="+openmp ^[virtuals=blas,lapack] openblas")
+ depends_on("amdblis threads=openmp", when="+openmp ^[virtuals=blas] amdblis")
+ depends_on("blis threads=openmp", when="+openmp ^[virtuals=blas] blis")
+ depends_on(
+ "intel-mkl threads=openmp", when="+openmp ^[virtuals=blas,lapack,fftw-api] intel-mkl"
+ )
+ depends_on(
+ "intel-oneapi-mkl threads=openmp",
+ when="+openmp ^[virtuals=blas,lapack,fftw-api] intel-oneapi-mkl",
+ )
+ depends_on(
+ "intel-oneapi-mkl+cluster",
+ when="+scalapack ^[virtuals=blas,lapack,fftw-api] intel-oneapi-mkl",
+ )
+
+ conflicts("intel-mkl", when="@develop") # TODO: Change to @7.5.3
+ # MKLConfig.cmake introduced in 2021.3
+ conflicts("intel-oneapi-mkl@:2021.2", when="^intel-oneapi-mkl")
depends_on("wannier90", when="@7.5.0: +wannier90")
depends_on("wannier90+shared", when="@7.5.0: +wannier90+shared")
@@ -216,6 +253,7 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant(cm_label + "USE_PROFILER", "profiler"),
self.define_from_variant(cm_label + "USE_NVTX", "nvtx"),
self.define_from_variant(cm_label + "USE_WANNIER90", "wannier90"),
+ self.define_from_variant(cm_label + "USE_PUGIXML", "pugixml"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("BUILD_TESTING", "tests"),
]
@@ -248,9 +286,43 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
if "^cray-libsci" in spec:
args.append(self.define(cm_label + "USE_CRAY_LIBSCI", "ON"))
- if spec["blas"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]:
+ if spec["blas"].name in INTEL_MATH_LIBRARIES:
args.append(self.define(cm_label + "USE_MKL", "ON"))
+ if spec.satisfies("@develop"): # TODO: Change to @7.5.3:
+ mkl_mapper = {
+ "threading": {
+ "none": "sequential",
+ "openmp": "gnu_thread",
+ "tbb": "tbb_thread",
+ },
+ "mpi": {"intel-mpi": "intelmpi", "mpich": "mpich", "openmpi": "openmpi"},
+ }
+
+ mkl_threads = mkl_mapper["threading"][
+ spec["intel-oneapi-mkl"].variants["threads"].value
+ ]
+
+ mpi_provider = spec["mpi"].name
+ if mpi_provider in ["mpich", "cray-mpich", "mvapich", "mvapich2"]:
+ mkl_mpi = mkl_mapper["mpi"]["mpich"]
+ else:
+ mkl_mpi = mkl_mapper["mpi"][mpi_provider]
+
+ args.extend(
+ [
+ self.define("MKL_INTERFACE", "lp64"),
+ self.define("MKL_THREADING", mkl_threads),
+ self.define("MKL_MPI", mkl_mpi),
+ ]
+ )
+
+ if "+scalapack" in self.spec:
+ # options provided by `MKLConfig.cmake`
+ args.extend(
+ [self.define("ENABLE_BLACS", "On"), self.define("ENABLE_SCALAPACK", "On")]
+ )
+
if "+elpa" in spec:
elpa_incdir = os.path.join(spec["elpa"].headers.directories[0], "elpa")
args.append(self.define(cm_label + "ELPA_INCLUDE_DIR", elpa_incdir))
diff --git a/var/spack/repos/builtin/packages/skilion-onedrive/package.py b/var/spack/repos/builtin/packages/skilion-onedrive/package.py
index 87befed09d..116864412f 100644
--- a/var/spack/repos/builtin/packages/skilion-onedrive/package.py
+++ b/var/spack/repos/builtin/packages/skilion-onedrive/package.py
@@ -28,7 +28,7 @@ class SkilionOnedrive(MakefilePackage):
makefile.filter("$(shell git describe --tags)", "{0}".format(spec.version), string=True)
# Patch sqlite.d https://github.com/skilion/onedrive/issues/392
sqlited = FileFilter("src/sqlite.d")
- sqlited.filter("std.c.stdlib", "core.stdc.stdlib", String=True)
+ sqlited.filter("std.c.stdlib", "core.stdc.stdlib", string=True)
def build(self, spec, prefix):
make("onedrive", "DESTDIR={0}".format(prefix), "PREFIX=/")
diff --git a/var/spack/repos/builtin/packages/skopeo/package.py b/var/spack/repos/builtin/packages/skopeo/package.py
index 218b98bfc3..3603636b62 100644
--- a/var/spack/repos/builtin/packages/skopeo/package.py
+++ b/var/spack/repos/builtin/packages/skopeo/package.py
@@ -22,6 +22,8 @@ class Skopeo(MakefilePackage):
version("0.1.37", sha256="49c0c1b2c2f32422d3230f827ae405fc554fb34af41a54e59b2121ac1500505d")
version("0.1.36", sha256="42f9b0bf53ae44bc294be400e2c5259f977ffa4d5dbac3576b0b5e23d59791fd")
+ depends_on("c", type="build") # generated
+
depends_on("go")
depends_on("go-md2man", type="build")
depends_on("gpgme")
diff --git a/var/spack/repos/builtin/packages/sl/package.py b/var/spack/repos/builtin/packages/sl/package.py
index 8061eb601e..69c57f8390 100644
--- a/var/spack/repos/builtin/packages/sl/package.py
+++ b/var/spack/repos/builtin/packages/sl/package.py
@@ -16,6 +16,8 @@ class Sl(MakefilePackage):
version("5.02", sha256="1e5996757f879c81f202a18ad8e982195cf51c41727d3fea4af01fdcbbb5563a")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/slang/package.py b/var/spack/repos/builtin/packages/slang/package.py
index 3da247a8e2..cd21296584 100644
--- a/var/spack/repos/builtin/packages/slang/package.py
+++ b/var/spack/repos/builtin/packages/slang/package.py
@@ -18,4 +18,6 @@ class Slang(AutotoolsPackage):
version("2.3.2", sha256="fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a")
version("2.3.1", sha256="a810d5da7b0c0c8c335393c6b4f12884be6fa7696d9ca9521ef21316a4e00f9d")
+ depends_on("c", type="build") # generated
+
parallel = False
diff --git a/var/spack/repos/builtin/packages/slate/omp.patch b/var/spack/repos/builtin/packages/slate/omp.patch
new file mode 100644
index 0000000000..b4dab603d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/slate/omp.patch
@@ -0,0 +1,20 @@
+diff --git a/src/omptarget/device_util.hh b/src/omptarget/device_util.hh
+index e7aa15c3..3968878d 100644
+--- a/src/omptarget/device_util.hh
++++ b/src/omptarget/device_util.hh
+@@ -6,6 +6,8 @@
+ #ifndef SLATE_OMPTARGET_UTIL_HH
+ #define SLATE_OMPTARGET_UTIL_HH
+
++#ifdef SLATE_HAVE_OMPTARGET
++
+ #include <math.h>
+
+ namespace slate {
+@@ -157,4 +159,6 @@ inline double abs_val(std::complex<double> x)
+ } // namespace device
+ } // namespace slate
+
++#endif // SLATE_HAVE_OMPTARGET
++
+ #endif // SLATE_OMPTARGET_UTIL_HH
diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py
index 284a350624..879c773603 100644
--- a/var/spack/repos/builtin/packages/slate/package.py
+++ b/var/spack/repos/builtin/packages/slate/package.py
@@ -27,6 +27,15 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version(
+ "2024.10.29", sha256="e729fad51f44b1340c0f64ac0f862026121183a3c8d731874f0a11a3b5053223"
+ )
+ version(
+ "2024.05.31", sha256="9c5d4d6779d8935b6fe41031b46e11ab92102f13c5f684022287c8616661b775"
+ )
+ version(
+ "2023.11.05", sha256="d3d925adec137ef4b7d876b2d7d0f8f2ff9d8485fa4125454a42f5da4ac026f3"
+ )
+ version(
"2023.08.25", sha256="0894d8669ed88358cc7c4cb7b77d8467336613245a7b843f3504e9224632ce0e"
)
version(
@@ -48,6 +57,12 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
"2020.10.00", sha256="ff58840cdbae2991d100dfbaf3ef2f133fc2f43fc05f207dc5e38a41137882ab"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ patch("omp.patch", when="@2023.11.05")
+
variant(
"mpi", default=True, description="Build with MPI support (without MPI is experimental)."
)
@@ -58,7 +73,7 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
# The runtime dependency on cmake is needed by the stand-alone tests (spack test).
depends_on("cmake", type="run")
- depends_on("mpi", when="+mpi")
+ depends_on("mpi")
depends_on("intel-oneapi-mkl threads=openmp", when="+sycl")
depends_on("blas")
depends_on("blaspp ~cuda", when="~cuda")
@@ -77,16 +92,25 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
for val in ROCmPackage.amdgpu_targets:
depends_on("blaspp +rocm amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
depends_on("lapackpp +rocm amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
+ depends_on("lapackpp@2024.10.26:", when="@2024.10.29:")
+ depends_on("lapackpp@2024.05.31:", when="@2024.05.31:")
+ depends_on("lapackpp@2023.11.05:", when="@2023.11.05:")
depends_on("lapackpp@2023.08.25:", when="@2023.08.25:")
depends_on("lapackpp@2022.07.00:", when="@2022.07.00:")
depends_on("lapackpp@2022.05.00:", when="@2022.05.00:")
depends_on("lapackpp@2021.04.00:", when="@2021.05.01:")
depends_on("lapackpp@2020.10.02", when="@2020.10.00")
depends_on("lapackpp@master", when="@master")
- depends_on("scalapack", type="test")
+ depends_on("scalapack", when="@:2022.07.00", type="test")
+ depends_on("python", type="test")
depends_on("hipify-clang", when="@:2021.05.02 +rocm ^hip@5:")
+ depends_on("comgr", when="+rocm")
+ depends_on("rocblas", when="+rocm")
+ depends_on("rocsolver", when="+rocm")
requires("%oneapi", when="+sycl", msg="slate+sycl must be compiled with %oneapi")
+ requires("+mpi", msg="MPI is required (use of the 'mpi' variant is deprecated)")
+ requires("+openmp", msg="OpenMP is required (use of the 'openmp' variant is deprecated)")
cpp_17_msg = "Requires C++17 compiler support"
conflicts("%gcc@:5", msg=cpp_17_msg)
@@ -101,6 +125,13 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+rocm", when="+sycl", msg=backend_msg)
conflicts("+cuda", when="+sycl", msg=backend_msg)
conflicts("+sycl", when="@:2022.07.00", msg="SYCL support requires SLATE version 2023.08.25")
+ conflicts("^hip@5.6.0:", when="@:2023.08.25", msg="Incompatible version of HIP/ROCm")
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ if self.spec.satisfies("%oneapi@2025:"):
+ flags.append("-Wno-error=missing-template-arg-list-after-template-kw")
+ return (flags, None, None)
def cmake_args(self):
spec = self.spec
@@ -117,10 +148,8 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
config = [
"-Dbuild_tests=%s" % self.run_tests,
- "-Duse_openmp=%s" % ("+openmp" in spec),
"-DBUILD_SHARED_LIBS=%s" % ("+shared" in spec),
backend_config,
- "-Duse_mpi=%s" % ("+mpi" in spec),
]
if "+cuda" in spec:
archs = ";".join(spec.variants["cuda_arch"].value)
@@ -129,8 +158,8 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
archs = ";".join(spec.variants["amdgpu_target"].value)
config.append("-DCMAKE_HIP_ARCHITECTURES=%s" % archs)
- if self.run_tests:
- config.append("-DSCALAPACK_LIBRARIES=%s" % spec["scalapack"].libs.joined(";"))
+ slibs = spec["scalapack"].libs.joined(";") if "scalapack" in spec else "none"
+ config.append(f"-DSCALAPACK_LIBRARIES={slibs}")
return config
@run_after("install")
@@ -139,7 +168,7 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
return
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(["examples"])
+ cache_extra_test_sources(self, ["examples"])
def mpi_launcher(self):
searchpath = [self.spec["mpi"].prefix.bin]
@@ -150,23 +179,26 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
commands = ["srun", "mpirun", "mpiexec"]
return which(*commands, path=searchpath) or which(*commands)
- def test(self):
+ def test_example(self):
+ """build and run slate example"""
+
if self.spec.satisfies("@2020.10.00") or "+mpi" not in self.spec:
- print("Skipping: stand-alone tests")
- return
+ raise SkipTest("Package must be installed with +mpi and version @2021.05.01 or later")
test_dir = join_path(self.test_suite.current_test_cache_dir, "examples", "build")
with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- deps = "blaspp lapackpp mpi"
+ cmake = self.spec["cmake"].command
+
+ # This package must directly depend on all packages listed here.
+ # Otherwise, it will not work when some packages are external to spack.
+ deps = "slate blaspp lapackpp mpi"
if self.spec.satisfies("+rocm"):
- deps += " rocblas hip llvm-amdgpu comgr hsa-rocr-dev rocsolver"
+ deps += " rocblas hip llvm-amdgpu comgr hsa-rocr-dev rocsolver "
prefixes = ";".join([self.spec[x].prefix for x in deps.split()])
- self.run_test(cmake_bin, ["-DCMAKE_PREFIX_PATH=" + prefixes, ".."])
+
+ cmake("-DCMAKE_PREFIX_PATH=" + prefixes, "..")
+ make = which("make")
make()
- test_args = ["-n", "4", "./ex05_blas"]
launcher = self.mpi_launcher()
- if not launcher:
- raise RuntimeError("Cannot run tests due to absence of MPI launcher")
- self.run_test(launcher.command, test_args, purpose="SLATE smoke test")
- make("clean")
+ assert launcher is not None, "Cannot run tests due to absence of MPI launcher"
+ launcher("-n", "4", "./ex05_blas")
diff --git a/var/spack/repos/builtin/packages/sleef/package.py b/var/spack/repos/builtin/packages/sleef/package.py
index cf64f3eb34..ccbce0473a 100644
--- a/var/spack/repos/builtin/packages/sleef/package.py
+++ b/var/spack/repos/builtin/packages/sleef/package.py
@@ -10,18 +10,22 @@ class Sleef(CMakePackage):
"""SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT."""
homepage = "https://sleef.org"
- url = "https://github.com/shibatch/sleef/archive/3.2.tar.gz"
+ url = "https://github.com/shibatch/sleef/archive/3.7.tar.gz"
git = "https://github.com/shibatch/sleef.git"
+ maintainers("blapie")
+
license("BSL-1.0")
version("master", branch="master")
- version("3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff") # py-torch@1.8:
+ version("3.7.0", commit="c5494730bf601599a55f4e77f357b51ba590585e", preferred=True)
+ version("3.6.1", commit="6ee14bcae5fe92c2ff8b000d5a01102dab08d774")
+ version("3.6.0_2024-03-20", commit="60e76d2bce17d278b439d9da17177c8f957a9e9b") # py-torch@2.4:
+ version("3.6.0", commit="a99491afee2bae0b11e9ffbf3211349f43a5fd10")
version(
- "3.5.1",
- sha256="415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab",
- preferred=True,
- )
+ "3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff"
+ ) # py-torch@1.8:2.3
+ version("3.5.1", sha256="415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab")
version(
"3.4.0_2019-07-30", commit="7f523de651585fe25cade462efccca647dcc8d02"
) # py-torch@1.3:1.7
@@ -29,35 +33,51 @@ class Sleef(CMakePackage):
"3.4.0_2019-05-13",
commit="9b249c53a80343cc1a394ca961d7d5696ea76409", # py-torch@1.2
git="https://github.com/zdevito/sleef.git",
+ deprecated=True,
)
version(
"3.3.1_2018-12-09",
commit="191f655caa25526ae226cf88dd2529265176014a", # py-torch@1.1
git="https://github.com/zdevito/sleef.git",
+ deprecated=True,
)
version(
- "3.2_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f"
+ "3.2.0_2018-05-09", commit="6ff7a135a1e31979d1e1844a2e7171dfbd34f54f", deprecated=True
) # py-torch@0.4.1:1.0
- version("3.2", sha256="3130c5966e204e6d6a3ace81e543d12b5b21f60897f1c185bfa587c1bd77bee2")
+ version(
+ "3.2.0",
+ sha256="3130c5966e204e6d6a3ace81e543d12b5b21f60897f1c185bfa587c1bd77bee2",
+ deprecated=True,
+ )
- # https://github.com/shibatch/sleef/issues/474
- conflicts("%apple-clang@15:")
+ depends_on("c", type="build")
generator("ninja")
- depends_on("cmake@3.4.3:", type="build")
+ depends_on("cmake@3.18:", type="build")
- # # https://github.com/shibatch/sleef/issues/475
- # depends_on("fftw-api")
- # depends_on("mpfr")
- # depends_on("openssl")
+ depends_on("fftw-api", type="test")
+ depends_on("mpfr", type="test")
+ depends_on("openssl", type="test")
- # # https://github.com/shibatch/sleef/issues/458
- # conflicts("^mpfr@4.2:")
+ # https://github.com/shibatch/sleef/issues/458
+ # https://github.com/shibatch/sleef/pull/471
+ conflicts("^mpfr@4.2:", when="@:3.5.1_2023-11-20")
+
+ def sleef_define(self, cmake_var, value):
+ # https://github.com/shibatch/sleef/pull/509
+ if self.spec.satisfies("@3.5.1_2024-02-07:"):
+ cmake_var = "SLEEF_" + cmake_var
+
+ return self.define(cmake_var, value)
def cmake_args(self):
- # https://salsa.debian.org/science-team/sleef/-/blob/master/debian/rules
- return [
- self.define("BUILD_DFT", False),
- self.define("SLEEF_TEST_ALL_IUT", True),
- self.define("BUILD_TESTS", False),
+ args = [
+ self.sleef_define("BUILD_TESTS", self.run_tests),
+ self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
]
+
+ # https://github.com/shibatch/sleef/issues/474
+ if self.spec.satisfies("@:3.5.1_2024-02-08 platform=darwin"):
+ args.append(self.sleef_define("DISABLE_SVE", True))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index 3b88b858e3..bf41ed4b0f 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -22,6 +22,13 @@ class Slepc(Package, CudaPackage, ROCmPackage):
test_requires_compiler = True
version("main", branch="main")
+ version("3.22.2", sha256="b60e58b2fa5eb7db05ce5e3a585811b43b1cc7cf89c32266e37b05f0cefd8899")
+ version("3.22.1", sha256="badb5cb038d09dbf1cc8f34d194673ab011c69cc46888101955c786d21c8d8c9")
+ version("3.22.0", sha256="45eb4d085875b50108c91fd9168ed17bc9158cc3b1e530ac843b26d9981c3db0")
+ version("3.21.2", sha256="306fa649750509b3957b9f9311bff5dc1d20be5c5d494dd6472584c439b931f6")
+ version("3.21.1", sha256="beb33f0a15c3ce81744b15ad09ddf84dae70dbf3475c5ef032b8549ab87d6d8a")
+ version("3.21.0", sha256="782833f0caa6585509a837ccd470265c62a1bb56ba64e54c38bde6c63d92629e")
+ version("3.20.2", sha256="125258c87360e326675238eaeb21ce2fbb3f27f4eeb1c72062043931aea05493")
version("3.20.1", sha256="5a36b664895881d3858d0644f56bf7bb922bdab70d732fa11cbf6442fec11806")
version("3.20.0", sha256="780c50260a9bc9b72776cb920774800c73832370938f1d48c2ea5c66d31b7380")
version("3.19.2", sha256="ca7ed906795971fbe35f08ee251a26b86a4442a18609b878cba00835c9d62034")
@@ -56,6 +63,10 @@ class Slepc(Package, CudaPackage, ROCmPackage):
version("3.11.1", sha256="4816070d4ecfeea6212c6944cee22dc7b4763df1eaf6ab7847cc5ac5132608fb")
version("3.11.0", sha256="bf29043c311fe2c549a25e2b0835095723a3eebc1dff288a233b32913b5762a2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("arpack", default=True, description="Enables Arpack wrappers")
variant("blopex", default=False, description="Enables BLOPEX wrappers")
variant("hpddm", default=False, description="Enables HPDDM wrappers")
@@ -65,7 +76,20 @@ class Slepc(Package, CudaPackage, ROCmPackage):
# Cannot mix release and development versions of SLEPc and PETSc:
depends_on("petsc@main", when="@main")
- for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.14", "3.13", "3.12", "3.11"]:
+ for ver in [
+ "3.22",
+ "3.21",
+ "3.20",
+ "3.19",
+ "3.18",
+ "3.17",
+ "3.16",
+ "3.15",
+ "3.14",
+ "3.13",
+ "3.12",
+ "3.11",
+ ]:
depends_on(f"petsc@{ver}", when=f"@{ver}")
depends_on("petsc+cuda", when="+cuda")
depends_on("arpack-ng~mpi", when="+arpack^petsc~mpi~int64")
diff --git a/var/spack/repos/builtin/packages/slirp4netns/package.py b/var/spack/repos/builtin/packages/slirp4netns/package.py
index 83e97fcc5b..b799b7fa10 100644
--- a/var/spack/repos/builtin/packages/slirp4netns/package.py
+++ b/var/spack/repos/builtin/packages/slirp4netns/package.py
@@ -18,6 +18,8 @@ class Slirp4netns(AutotoolsPackage):
version("1.2.0", sha256="b584edde686d3cfbac210cbdb93c4b0ba5d8cc0a6a4d92b9dfc3c5baec99c727")
version("1.1.12", sha256="279dfe58a61b9d769f620b6c0552edd93daba75d7761f7c3742ec4d26aaa2962")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/sloccount/package.py b/var/spack/repos/builtin/packages/sloccount/package.py
index ace22a2d3d..fbd2cd8a00 100644
--- a/var/spack/repos/builtin/packages/sloccount/package.py
+++ b/var/spack/repos/builtin/packages/sloccount/package.py
@@ -19,6 +19,9 @@ class Sloccount(MakefilePackage):
version("2.26", sha256="fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# md5sum needed at run-time
depends_on("coreutils", type=("build", "run"))
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/slurm-drmaa/package.py b/var/spack/repos/builtin/packages/slurm-drmaa/package.py
index c240de8329..26c0fecbae 100644
--- a/var/spack/repos/builtin/packages/slurm-drmaa/package.py
+++ b/var/spack/repos/builtin/packages/slurm-drmaa/package.py
@@ -26,6 +26,8 @@ class SlurmDrmaa(AutotoolsPackage):
version("main", branch="main", submodules=True)
version("1.1.2", sha256="5bfe25d501de83729df3c8c8f28535b9da3e99aea7738e259903abd6f1f5c836")
+ depends_on("c", type="build") # generated
+
# Remove this patch when it is merged into main:
patch(
"https://github.com/natefoo/slurm-drmaa/pull/62.patch?full_index=1",
diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py
index 1e1422eecc..d3f475af00 100644
--- a/var/spack/repos/builtin/packages/slurm/package.py
+++ b/var/spack/repos/builtin/packages/slurm/package.py
@@ -28,6 +28,11 @@ class Slurm(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("23-11-1-1", sha256="31506df24c6d24e0ea0329cac1395ab9b645bbde1518f5c469f7711df5e22c11")
+ version("23-11-0-1", sha256="3780773a80b73ea2edb4353318b4220188f4eda92c31ab3a2bdd3a4fdec76be9")
+ version("23-02-7-1", sha256="3f60ad5b5a492312d1febb9f9167caa3aee7f8438bb032590a993f5a65c5e4db")
+ version("23-02-6-1", sha256="ed44d4e591c0f91874d535cb8c9ea67dd2a38bfa4e96fa6c71687293f6a1d3bb")
+ version("23-02-5-1", sha256="4fee743a34514d8fe487080048256f5ee032374ed5f42d0eae342110dcd59edf")
version("23-02-4-1", sha256="7290143a71ce2797d0df3423f08396fd5c0ae4504749ff372d6860b2d6a3a1b0")
version("23-02-3-1", sha256="c41747e4484011cf376d6d4bc73b6c4696cdc0f7db4f64174f111bb9f53fb603")
version("23-02-2-1", sha256="71edcf187a7d68176cca06143adf98e8f332d42cdf000cb534b03b13834ad537")
@@ -117,6 +122,8 @@ class Slurm(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
variant("gtk", default=False, description="Enable GTK+ support")
variant("mariadb", default=False, description="Use MariaDB instead of MySQL")
diff --git a/var/spack/repos/builtin/packages/smalt/package.py b/var/spack/repos/builtin/packages/smalt/package.py
index 4890f6d867..2a2b9ee11d 100644
--- a/var/spack/repos/builtin/packages/smalt/package.py
+++ b/var/spack/repos/builtin/packages/smalt/package.py
@@ -15,3 +15,5 @@ class Smalt(AutotoolsPackage, SourceforgePackage):
license("GPL-3.0-only")
version("0.7.6", sha256="89ccdfe471edba3577b43de9ebfdaedb5cd6e26b02bf4000c554253433796b31")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/smartdenovo/package.py b/var/spack/repos/builtin/packages/smartdenovo/package.py
index 2a933fdf0c..47206e5170 100644
--- a/var/spack/repos/builtin/packages/smartdenovo/package.py
+++ b/var/spack/repos/builtin/packages/smartdenovo/package.py
@@ -17,6 +17,8 @@ class Smartdenovo(MakefilePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
depends_on("sse2neon", when="target=aarch64:")
patch(
diff --git a/var/spack/repos/builtin/packages/smartmontools/package.py b/var/spack/repos/builtin/packages/smartmontools/package.py
index a8fa3cde21..7edcb317f3 100644
--- a/var/spack/repos/builtin/packages/smartmontools/package.py
+++ b/var/spack/repos/builtin/packages/smartmontools/package.py
@@ -16,6 +16,9 @@ class Smartmontools(AutotoolsPackage):
version("6.6", sha256="51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def setup_run_environment(self, env):
env.prepend_path("PATH", self.prefix.sbin)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.usr.lib)
diff --git a/var/spack/repos/builtin/packages/smee-client/package.py b/var/spack/repos/builtin/packages/smee-client/package.py
index 649aa609aa..e8bf872248 100644
--- a/var/spack/repos/builtin/packages/smee-client/package.py
+++ b/var/spack/repos/builtin/packages/smee-client/package.py
@@ -20,6 +20,7 @@ class SmeeClient(Package):
license("ISC")
+ version("2.0.3", sha256="98ca658cf3214c5116651f2a788c793bc2fe76543f24ada20e8751fcf1de8e1a")
version("1.2.3", sha256="b9afff843fc7a3c2b5d6659acf45357b5db7a739243b99f6d18a9b110981a328")
depends_on("node-js", type=("build", "link", "run"))
@@ -31,6 +32,9 @@ class SmeeClient(Package):
def build(self, spec, prefix):
npm = which("npm", required=True)
+ # Install node-js dependencies of smee-client
+ npm("install")
+
# Allow tsc to fail with typing "errors" which don't affect results
output = npm("run", "build", output=str, error=str, fail_on_error=False)
if npm.returncode not in (0, 2):
diff --git a/var/spack/repos/builtin/packages/smproxy/package.py b/var/spack/repos/builtin/packages/smproxy/package.py
index 1c9d463ea6..81d2530895 100644
--- a/var/spack/repos/builtin/packages/smproxy/package.py
+++ b/var/spack/repos/builtin/packages/smproxy/package.py
@@ -16,6 +16,8 @@ class Smproxy(AutotoolsPackage, XorgPackage):
version("1.0.7", sha256="aabd5e644512442da2bca1ce65ccee403b760a08e354b3474753ed36033e3d21")
version("1.0.6", sha256="a01374763426a5fdcbc7a65edc54e2070cdbca4df41dddd3051c7586e4c814c9")
+ depends_on("c", type="build") # generated
+
depends_on("libsm")
depends_on("libice")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/snakemake/package.py b/var/spack/repos/builtin/packages/snakemake/package.py
index 6a0b135794..501c0076b6 100644
--- a/var/spack/repos/builtin/packages/snakemake/package.py
+++ b/var/spack/repos/builtin/packages/snakemake/package.py
@@ -7,14 +7,25 @@ from spack.package import *
class Snakemake(PythonPackage):
- """Snakemake is an MIT-licensed workflow management system."""
+ """Workflow management system to create reproducible and scalable data analyses."""
- homepage = "https://snakemake.readthedocs.io/en/stable/"
- pypi = "snakemake/snakemake-6.12.3.tar.gz"
- maintainers("marcusboden")
+ homepage = "https://snakemake.readthedocs.io/en"
+ pypi = "snakemake/snakemake-8.18.2.tar.gz"
+ maintainers("marcusboden", "w8jcik")
license("MIT")
+ version("8.18.2", sha256="7dc8cdc3c836444c2bc3d67a4a7f4d703557c1bf96a90da18f312f4df9daefc4")
+ version("8.5.2", sha256="cc94876263182277e4a429e5d371c867400eeddc791c114dfd090d1bb3158975")
+ version("7.32.4", sha256="fdc3f15dd7b06fabb7da30d460e0a3b1fba08e4ea91f9c32c47a83705cdc7b6e")
+ version("7.31.1", sha256="6fadcc9a051737aa187dccf437879b3b83ddc917fff9bd7d400e056cf17a1788")
+ version("7.30.2", sha256="0cb86cf9b43b9f2f45d5685cd932595131031c7087690f64c5bc7eaec88df029")
+ version("7.29.0", sha256="c420a545924b599390efe9e2fa7a07c01d167cceac63d1d06fa6eff5e7b43be0")
+ version("7.28.3", sha256="4d0d5f9643d97154cd8925830bdb3922e4bd9cfcf7f8b619df75e4ddfdbc3f9e")
+ version("7.26.0", sha256="5e5b4750a943f73a1b62979ccac203f4bc87876559f5e44d0ce9305ac198aff0")
+ version("7.25.4", sha256="e89146fd0df196a9135dcf41c9c70841551aa4735a18da9e0402bda6746afdcc")
+ version("7.24.2", sha256="3e9bcbb9743aa2a073922e90659e9209edbea89e6d22bf7b29ea538e60983908")
+ version("7.23.1", sha256="4dc960a721d2d8eaebd9b10e56564e3742f78c65d36cd31966ed205afcc4253d")
version("7.22.0", sha256="68d7bb4ab7555f7b58a3ba748a880024df919042cfb670da231886385de697cd")
version("7.21.0", sha256="ebf91f4ca5c70809fcbfd2e8cbc982096cdadac1ec34138bb147b4a8c975c85b")
version("7.20.0", sha256="f5b45191f1d419ebf28606880cb9bfac3bfa7c5949d1d2b64f551586d4212a2a")
@@ -25,64 +36,123 @@ class Snakemake(PythonPackage):
version("6.13.1", sha256="22f57dcd8b1ca8a30aaa45c5d2c0f56d381d4731abd0988f24f9de46b7d9827c")
version("6.12.3", sha256="af86af9a540da3dceb05dad1040f1d3d733e6a695f8b3f8c30f8cf3bc6570a88")
- depends_on("py-setuptools", type=("build", "run"))
- depends_on("py-setuptools@42:", type=("build", "run"), when="@7:")
+ depends_on("python@3.11:", type=("build", "run"), when="@8:")
+ depends_on("python@3.7:", type=("build", "run"), when="@7.31.1:7")
+ depends_on("python@3.9:", type=("build", "run"), when="@7.30.2:7.31.1")
- # See https://github.com/snakemake/snakemake/pull/2065
+ depends_on("py-setuptools@42:", type=("build", "run"), when="@7:")
+ depends_on("py-setuptools", type=("build", "run"))
depends_on("py-tomli", type=("build"), when="@7.20.0: ^python@:3.10")
- # See https://github.com/snakemake/snakemake/blob/v7.20.0/setup.cfg#L44
- depends_on("py-humanfriendly", type=("build", "run"), when="@7.20.0:")
- # See https://github.com/snakemake/snakemake/blob/v7.18.2/setup.py#L56
- depends_on("py-wrapt", type=("build", "run"))
- depends_on("py-requests", type=("build", "run"))
- depends_on("py-throttler", type=("build", "run"), when="@7:")
- depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-configargparse", type=("build", "run"))
+
depends_on("py-appdirs", type=("build", "run"))
+ depends_on("py-immutables", type=("build", "run"), when="@8:")
+ depends_on("py-configargparse", type=("build", "run"))
+ depends_on("py-connectionpool@0.0.3:", type=("build", "run"))
depends_on("py-datrie", type=("build", "run"))
- depends_on("py-jsonschema", type=("build", "run"))
depends_on("py-docutils", type=("build", "run"))
depends_on("py-gitpython", type=("build", "run"))
- depends_on("py-psutil", type=("build", "run"))
+ depends_on("py-humanfriendly", type=("build", "run"), when="@7.20.0:")
+ depends_on("py-jinja2@3", type=("build", "run"), when="@7:")
+ depends_on("py-jsonschema", type=("build", "run"))
depends_on("py-nbformat", type=("build", "run"))
- depends_on("py-toposort", type=("build", "run"))
- depends_on("py-connectionpool@0.0.3:", type=("build", "run"))
- depends_on("py-pulp@2:", type=("build", "run"))
+ depends_on("py-packaging", type=("build", "run"), when="@7.29.0:")
+ depends_on("py-psutil", type=("build", "run"))
+ depends_on("py-pulp@2.3.1:2.8", type=("build", "run"), when="@8.1.2:")
+ depends_on("py-pulp@2:", type=("build", "run"), when="@:8.1.1")
+ depends_on("py-pyyaml", type=("build", "run"))
+
+ depends_on("py-requests@2.8.1:2", type=("build", "run"), when="@8.4.12")
+ depends_on("py-requests", type=("build", "run"))
+
+ depends_on("py-reretry", type=("build", "run"), when="@7:")
+
+ depends_on("py-smart-open@4:7", type=("build", "run"), when="@8.11:")
+ depends_on("py-smart-open@3:7", type=("build", "run"), when="@8.8:8.10")
+ depends_on("py-smart-open@3:6", type=("build", "run"), when="@8.4.12:8.7")
depends_on("py-smart-open@3:", type=("build", "run"))
- depends_on("py-filelock", type=("build", "run"), when="@:6")
+
+ depends_on(
+ "py-snakemake-interface-executor-plugins@9.2:9", type=("build", "run"), when="@8.15.0:"
+ )
+ depends_on(
+ "py-snakemake-interface-executor-plugins@9.1:9", type=("build", "run"), when="@8.10.1:"
+ )
+ depends_on(
+ "py-snakemake-interface-executor-plugins@9.0.2:9", type=("build", "run"), when="@8.10:"
+ )
+ depends_on("py-snakemake-interface-executor-plugins@9", type=("build", "run"), when="@8.6:")
+ depends_on(
+ "py-snakemake-interface-executor-plugins@8.1.3:8", type=("build", "run"), when="@8:8.5"
+ )
+
+ depends_on("py-snakemake-interface-common@1.17:1", type=("build", "run"), when="@8.4.10:")
+ depends_on("py-snakemake-interface-common@1.15:1", type=("build", "run"), when="@8:")
+
+ depends_on(
+ "py-snakemake-interface-storage-plugins@3.2.3:3", type=("build", "run"), when="@8.15.1:"
+ )
+ depends_on(
+ "py-snakemake-interface-storage-plugins@3.1:3", type=("build", "run"), when="@8.4.10:"
+ )
+ depends_on("py-snakemake-interface-storage-plugins@3", type=("build", "run"), when="@8:")
+
+ depends_on("py-snakemake-interface-report-plugins@1", type=("build", "run"), when="@8.5:")
depends_on("py-stopit", type=("build", "run"))
depends_on("py-tabulate", type=("build", "run"))
- depends_on("py-ratelimiter", type=("build", "run"), when="@:6")
- depends_on("py-yte@1", type=("build", "run"), when="@7:")
- depends_on("py-jinja2@3", type=("build", "run"), when="@7:")
- depends_on("py-reretry", type=("build", "run"), when="@7:")
+ depends_on("py-throttler", type=("build", "run"), when="@7:")
+ depends_on("py-toposort@1.10:1", type=("build", "run"), when="@8.4.12:")
+ depends_on("py-toposort@1.10:", type=("build", "run"), when="@7.24.0:")
+ depends_on("py-toposort", type=("build", "run"), when="@:7.23")
+ depends_on("py-wrapt", type=("build", "run"))
+ depends_on("py-yte@1.5.1:1", type=("build", "run"), when="@7.28.1:")
+ depends_on("py-yte@1", type=("build", "run"), when="@7:7.28.0")
+ depends_on("py-dpath@2.1.6:2", type=("build", "run"), when="@8.3:")
+ depends_on("py-conda-inject@1.3.1:1", type=("build", "run"), when="@8:")
variant("reports", default=False, description="Generate self-contained HTML reports")
+
with when("+reports"):
- depends_on("py-jinja2", type=("build", "run"), when="@:7.19.1")
depends_on("py-pygments", type=("build", "run"))
- # https://github.com/snakemake/snakemake/pull/1470
+
+ depends_on("py-jinja2", type=("build", "run"), when="@:7.19.1")
depends_on("py-networkx", type=("build", "run"), when="@:7.1.1")
depends_on("py-pygraphviz", type=("build", "run"), when="@:7.1.1")
- variant("google-cloud", default=False, description="Enable Google Cloud execution")
+ variant("google-cloud", default=False, description="Enable Google Cloud execution", when="@:7")
+
with when("+google-cloud"):
- depends_on("py-oauth2client", type=("build", "run"))
- depends_on("py-google-crc32c", type=("build", "run"))
depends_on("py-google-api-python-client", type=("build", "run"))
depends_on("py-google-cloud-storage", type=("build", "run"))
+ depends_on("py-google-crc32c", type=("build", "run"))
+ depends_on("py-oauth2client", type=("build", "run"))
+
+ variant("azure", default=False, description="Enable Azure execution", when="@7.28.0:7")
+
+ with when("+azure"):
+ depends_on("py-azure-storage-blob", type=("build", "run"))
+ depends_on("py-azure-batch", type=("build", "run"))
+ depends_on("py-azure-core", type=("build", "run"))
+ depends_on("py-azure-identity", type=("build", "run"))
+ depends_on("py-azure-mgmt-batch", type=("build", "run"))
+
+ depends_on("py-msrest", type=("build", "run"), when="@7.28.0")
+ depends_on("py-filelock", type=("build", "run"), when="@:6")
+ depends_on("py-ratelimiter", type=("build", "run"), when="@:6")
- # These variants are not in PyPI/pip, but they are undocumented dependencies
- # needed to make certain parts of Snakemake work.
- variant("ftp", default=False, description="Enable snakemake.remote.FTP")
+ variant("ftp", default=False, description="Handling input and output via FTP", when="@:7")
depends_on("py-ftputil", when="+ftp", type=("build", "run"))
- variant("s3", default=False, description="Enable snakemake.remote.S3")
+ variant(
+ "s3", default=False, description="Amazon S3 API storage (AWS S3, MinIO, etc.)", when="@:7"
+ )
depends_on("py-boto3", when="+s3", type=("build", "run"))
depends_on("py-botocore", when="+s3", type=("build", "run"))
- variant("http", default=False, description="Enable snakemake.remote.HTTP")
+ variant(
+ "http", default=False, description="Downloading of input files from HTTP(s)", when="@:7"
+ )
depends_on("py-requests", when="+http", type=("build", "run"))
- def test(self):
- Executable("snakemake")("--version")
+ def test_run(self):
+ """Test if snakemake runs with the version option"""
+ Executable(self.prefix.bin.snakemake)("--version")
diff --git a/var/spack/repos/builtin/packages/snap-berkeley/package.py b/var/spack/repos/builtin/packages/snap-berkeley/package.py
index 03fed202d8..4fa5f6a9e0 100644
--- a/var/spack/repos/builtin/packages/snap-berkeley/package.py
+++ b/var/spack/repos/builtin/packages/snap-berkeley/package.py
@@ -29,6 +29,8 @@ class SnapBerkeley(MakefilePackage):
preferred=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
conflicts("%gcc@6:", when="@:1.0beta.18")
diff --git a/var/spack/repos/builtin/packages/snap-korf/package.py b/var/spack/repos/builtin/packages/snap-korf/package.py
index 1887b94da5..92089ca03e 100644
--- a/var/spack/repos/builtin/packages/snap-korf/package.py
+++ b/var/spack/repos/builtin/packages/snap-korf/package.py
@@ -21,6 +21,8 @@ class SnapKorf(MakefilePackage):
"2013-11-29", sha256="e2a236392d718376356fa743aa49a987aeacd660c6979cee67121e23aeffc66a"
)
+ depends_on("c", type="build") # generated
+
depends_on("perl", type=("build", "run"))
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/snap/package.py b/var/spack/repos/builtin/packages/snap/package.py
index 1c26c4a03c..7ecaf3af9f 100644
--- a/var/spack/repos/builtin/packages/snap/package.py
+++ b/var/spack/repos/builtin/packages/snap/package.py
@@ -23,6 +23,10 @@ class Snap(MakefilePackage):
version("master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=False, description="Build with OpenMP support")
variant("opt", default=True, description="Build with debugging")
variant("mpi", default=True, description="Build with MPI support")
diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py
index 796ea1af84..be67125417 100644
--- a/var/spack/repos/builtin/packages/snappy/package.py
+++ b/var/spack/repos/builtin/packages/snappy/package.py
@@ -14,11 +14,14 @@ class Snappy(CMakePackage):
license("BSD-3-Clause")
+ version("1.2.1", sha256="736aeb64d86566d2236ddffa2865ee5d7a82d26c9016b36218fcc27ea4f09f86")
version("1.1.10", sha256="49d831bffcc5f3d01482340fe5af59852ca2fe76c3e05df0e67203ebbe0f1d90")
version("1.1.9", sha256="75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7")
version("1.1.8", sha256="16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f")
version("1.1.7", sha256="3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("pic", default=True, description="Build position independent code")
diff --git a/var/spack/repos/builtin/packages/snbone/package.py b/var/spack/repos/builtin/packages/snbone/package.py
index 3671cda064..f01017d4f5 100644
--- a/var/spack/repos/builtin/packages/snbone/package.py
+++ b/var/spack/repos/builtin/packages/snbone/package.py
@@ -16,6 +16,9 @@ class Snbone(MakefilePackage):
version("develop")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
tags = ["proxy-app"]
depends_on("metis")
diff --git a/var/spack/repos/builtin/packages/sniffles/package.py b/var/spack/repos/builtin/packages/sniffles/package.py
index 2c8e4d65c5..c9033e53f7 100644
--- a/var/spack/repos/builtin/packages/sniffles/package.py
+++ b/var/spack/repos/builtin/packages/sniffles/package.py
@@ -17,6 +17,9 @@ class Sniffles(CMakePackage):
version("1.0.7", sha256="03fa703873bdf9c32055c584448e1eece45f94b4bc68e60c9624cf3841e6d8a9")
version("1.0.5", sha256="386c6536bdaa4637579e235bac48444c08297337c490652d1e165accd34b258f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api", type="link")
depends_on("bamtools", type="link")
diff --git a/var/spack/repos/builtin/packages/snpeff/package.py b/var/spack/repos/builtin/packages/snpeff/package.py
index 975cf0b0f6..4a8c05f408 100644
--- a/var/spack/repos/builtin/packages/snpeff/package.py
+++ b/var/spack/repos/builtin/packages/snpeff/package.py
@@ -13,7 +13,7 @@ class Snpeff(Package, SourceforgePackage):
annotates and predicts the effects of genetic variants (such as
amino acid changes)."""
- homepage = "http://snpeff.sourceforge.net/"
+ homepage = "https://snpeff.sourceforge.net/"
sourceforge_mirror_path = "snpeff/snpEff_latest_core.zip"
version(
diff --git a/var/spack/repos/builtin/packages/snptest/package.py b/var/spack/repos/builtin/packages/snptest/package.py
index 1795b605e7..8146c3558c 100644
--- a/var/spack/repos/builtin/packages/snptest/package.py
+++ b/var/spack/repos/builtin/packages/snptest/package.py
@@ -13,8 +13,9 @@ class Snptest(Package):
homepage = "https://mathgen.stats.ox.ac.uk/genetics_software/snptest/snptest.html"
url = "https://www.well.ox.ac.uk/~gav/resources/snptest_v2.5.2_linux_x86_64_dynamic.tgz"
+ version("2.5.6", sha256="22582e49f4a16edf52fe44e8f5e6f3479871658ec1be6341275f6f15d9cbd301")
version("2.5.2", sha256="1ffa3ebafa2c5db4866a38e01bb09f43df7973d053423ce67221cb3f8acb30f6")
def install(self, spec, prefix):
mkdirp(prefix.bin)
- install("snptest_v{0}".format(self.version), prefix.bin)
+ install(f"snptest_v{self.version}", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/soapdenovo-trans/package.py b/var/spack/repos/builtin/packages/soapdenovo-trans/package.py
index b57bc0e2cd..33c7d269d3 100644
--- a/var/spack/repos/builtin/packages/soapdenovo-trans/package.py
+++ b/var/spack/repos/builtin/packages/soapdenovo-trans/package.py
@@ -20,6 +20,8 @@ class SoapdenovoTrans(MakefilePackage):
version("1.0.5", sha256="c1903c0d81142270db95916e2833400f72c4841b5c9194f182c19ebda418936f")
version("1.0.4", sha256="378a54cde0ebe240fb515ba67197c053cf95393645c1ae1399b3a611be2a9795")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api", type="link")
depends_on("samtools@0.1.8", type="link", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/soapdenovo2/package.py b/var/spack/repos/builtin/packages/soapdenovo2/package.py
index 201506ba90..364f0b2610 100644
--- a/var/spack/repos/builtin/packages/soapdenovo2/package.py
+++ b/var/spack/repos/builtin/packages/soapdenovo2/package.py
@@ -24,6 +24,9 @@ class Soapdenovo2(MakefilePackage):
version("242", sha256="a0043ceb41bc17a1c3fd2b8abe4f9029a60ad3edceb2b15af3c2cfabd36aa11b")
version("240", sha256="cc9e9f216072c0bbcace5efdead947e1c3f41f09baec5508c7b90f933a090909")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def flag_handler(self, name, flags):
if name.lower() == "cflags" and self.spec.satisfies("%gcc@10:"):
flags.append("-fcommon")
diff --git a/var/spack/repos/builtin/packages/socat/package.py b/var/spack/repos/builtin/packages/socat/package.py
index 6b19b479a6..1d6873fa9b 100644
--- a/var/spack/repos/builtin/packages/socat/package.py
+++ b/var/spack/repos/builtin/packages/socat/package.py
@@ -24,6 +24,8 @@ class Socat(AutotoolsPackage):
version("1.7.4.4", sha256="fbd42bd2f0e54a3af6d01bdf15385384ab82dbc0e4f1a5e153b3e0be1b6380ac")
+ depends_on("c", type="build") # generated
+
depends_on("openssl")
depends_on("readline")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/soci/package.py b/var/spack/repos/builtin/packages/soci/package.py
index ef165f4195..a6506b78d2 100644
--- a/var/spack/repos/builtin/packages/soci/package.py
+++ b/var/spack/repos/builtin/packages/soci/package.py
@@ -27,6 +27,8 @@ class Soci(CMakePackage):
url="https://github.com/SOCI/soci/archive/3.2.2.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
default=11,
diff --git a/var/spack/repos/builtin/packages/sofa-c/package.py b/var/spack/repos/builtin/packages/sofa-c/package.py
index 758b5c3583..7269cf13b6 100644
--- a/var/spack/repos/builtin/packages/sofa-c/package.py
+++ b/var/spack/repos/builtin/packages/sofa-c/package.py
@@ -14,6 +14,8 @@ class SofaC(MakefilePackage):
version("20180130", sha256="de09807198c977e1c58ea1d0c79c40bdafef84f2072eab586a7ac246334796db")
+ depends_on("c", type="build") # generated
+
@property
def build_directory(self):
return join_path(self.version, "c", "src")
diff --git a/var/spack/repos/builtin/packages/sollve/package.py b/var/spack/repos/builtin/packages/sollve/package.py
index f9783acc52..fcfe622eed 100644
--- a/var/spack/repos/builtin/packages/sollve/package.py
+++ b/var/spack/repos/builtin/packages/sollve/package.py
@@ -16,8 +16,6 @@ class Sollve(CMakePackage):
homepage = "https://www.bnl.gov/compsci/projects/SOLLVE/"
git = "https://github.com/SOLLVE/llvm.git"
- family = "compiler" # Used by lmod
-
# NOTE: The debug version of LLVM is an order of magnitude larger than
# the release version, and may take up 20-30 GB of space. If you want
# to save space, build with `build_type=Release`.
@@ -259,7 +257,6 @@ class Sollve(CMakePackage):
"-DLLVM_ENABLE_RTTI:BOOL=ON",
"-DLLVM_ENABLE_EH:BOOL=ON",
"-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp",
- "-DPYTHON_EXECUTABLE:PATH={0}".format(spec["python"].command.path),
]
# TODO: Instead of unconditionally disabling CUDA, add a "cuda" variant
diff --git a/var/spack/repos/builtin/packages/sollya/package.py b/var/spack/repos/builtin/packages/sollya/package.py
index f146d78900..5e1af4fdde 100644
--- a/var/spack/repos/builtin/packages/sollya/package.py
+++ b/var/spack/repos/builtin/packages/sollya/package.py
@@ -19,6 +19,9 @@ class Sollya(AutotoolsPackage):
version("7.0", sha256="15745871f7dd3e96e12915098dd6df2078b815853a38143b2bc6c01477044984")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gmp")
depends_on("mpfi")
depends_on("mpfr")
diff --git a/var/spack/repos/builtin/packages/solr/package.py b/var/spack/repos/builtin/packages/solr/package.py
index 5b7ff248e7..532b5dfc65 100644
--- a/var/spack/repos/builtin/packages/solr/package.py
+++ b/var/spack/repos/builtin/packages/solr/package.py
@@ -12,22 +12,37 @@ class Solr(Package):
recovery,centralized configuration and more. Solr powers the search and
navigation features of many of the world's largest internet sites."""
- homepage = "https://lucene.apache.org/"
- url = "https://archive.apache.org/dist/lucene/solr/7.7.3/solr-7.7.3.tgz"
- list_url = "https://archive.apache.org/dist/lucene/solr"
+ homepage = "https://solr.apache.org/"
+ url = "https://archive.apache.org/dist/solr/solr/7.7.3/solr-7.7.3.tgz"
+ list_url = "https://archive.apache.org/dist/solr/solr"
list_depth = 1
- depends_on("java", type="run")
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("9.7.0", sha256="38548b86fa4e3c87883875952da124bf7d742cb8f7b25d37a1176833588e8552")
+ version("8.11.4", sha256="163fbdf246bbd78910bc36c3257ad50cdf31ccc3329a5ef885c23c9ef69e0ebe")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2024-45216
+ version(
+ "8.11.3", sha256="178300ae095094c2060a1060cf475aa935f1202addfb5bacb38e8712ccb56455"
+ )
+ version(
+ "8.11.2", sha256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6"
+ )
+ version("8.6.0", sha256="4519ccdb531619df770f1065db6adcedc052c7aa94b42806d541966550956aa5")
+ version("8.5.2", sha256="c457d6c7243241cad141e1df34c6f669d58a6c60e537f4217d032616dd066dcf")
+ version("8.5.1", sha256="47b68073b37bbcc0517a355ef722f20827c3f1416537ebbccf5239dda8064a0b")
+ version("8.5.0", sha256="9e54711ad0aa60e9723d2cdeb20cf0d21ee2ab9fa0048ec59dcb5f9d94dc61dd")
+ version("8.4.1", sha256="ec39e1e024b2e37405149de41e39e875a39bf11a53f506d07d96b47b8d2a4301")
+ version("7.7.3", sha256="3ec67fa430afa5b5eb43bb1cd4a659e56ee9f8541e0116d6080c0d783870baee")
- license("CC-BY-2.5")
+ depends_on("java", type="run")
- version("8.11.2", sha256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6")
- version("8.6.0", sha256="4519ccdb531619df770f1065db6adcedc052c7aa94b42806d541966550956aa5")
- version("8.5.2", sha256="c457d6c7243241cad141e1df34c6f669d58a6c60e537f4217d032616dd066dcf")
- version("8.5.1", sha256="47b68073b37bbcc0517a355ef722f20827c3f1416537ebbccf5239dda8064a0b")
- version("8.5.0", sha256="9e54711ad0aa60e9723d2cdeb20cf0d21ee2ab9fa0048ec59dcb5f9d94dc61dd")
- version("8.4.1", sha256="ec39e1e024b2e37405149de41e39e875a39bf11a53f506d07d96b47b8d2a4301")
- version("7.7.3", sha256="3ec67fa430afa5b5eb43bb1cd4a659e56ee9f8541e0116d6080c0d783870baee")
+ def url_for_version(self, version):
+ if self.spec.satisfies("@9:"):
+ return f"https://archive.apache.org/dist/solr/solr/{version}/solr-{version}.tgz"
+ else:
+ return f"https://archive.apache.org/dist/lucene/solr/{version}/solr-{version}.tgz"
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/somatic-sniper/package.py b/var/spack/repos/builtin/packages/somatic-sniper/package.py
index da9be147fa..cda1c6eb78 100644
--- a/var/spack/repos/builtin/packages/somatic-sniper/package.py
+++ b/var/spack/repos/builtin/packages/somatic-sniper/package.py
@@ -16,6 +16,9 @@ class SomaticSniper(CMakePackage):
version("1.0.5.0", sha256="fc41e90237b059fcc591e404830c4b1be678642dd5afd76ce545b97b4b7b3de1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("ncurses")
parallel = False
diff --git a/var/spack/repos/builtin/packages/sombrero/package.py b/var/spack/repos/builtin/packages/sombrero/package.py
index 4fcde4280d..5e900524f3 100644
--- a/var/spack/repos/builtin/packages/sombrero/package.py
+++ b/var/spack/repos/builtin/packages/sombrero/package.py
@@ -36,6 +36,8 @@ class Sombrero(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("mpi")
maintainers("mmesiti", "edbennett")
diff --git a/var/spack/repos/builtin/packages/sonlib/package.py b/var/spack/repos/builtin/packages/sonlib/package.py
index 7c31f41883..eaacf8e942 100644
--- a/var/spack/repos/builtin/packages/sonlib/package.py
+++ b/var/spack/repos/builtin/packages/sonlib/package.py
@@ -26,6 +26,9 @@ class Sonlib(MakefilePackage):
version("master", branch="master")
version("2020-04-01", commit="7ebe2ede05a6ee366d93a7a993db69a99943a68f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def setup_build_environment(self, env):
binpath = os.path.join(self.stage.source_path, "bin")
libpath = os.path.join(self.stage.source_path, "lib")
diff --git a/var/spack/repos/builtin/packages/sopt/package.py b/var/spack/repos/builtin/packages/sopt/package.py
new file mode 100644
index 0000000000..754cf8b0a3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sopt/package.py
@@ -0,0 +1,79 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Sopt(CMakePackage):
+ """SOPT is an open-source C++ package available under the license below. It performs
+ Sparse OPTimisation using state-of-the-art convex optimisation algorithms. It solves a
+ variety of sparse regularisation problems, including the Sparsity Averaging Reweighted
+ Analysis (SARA) algorithm.
+ """
+
+ homepage = "https://astro-informatics.github.io/sopt/"
+ url = "https://github.com/astro-informatics/sopt/archive/refs/tags/v4.2.0.tar.gz"
+ git = "https://github.com/astro-informatics/sopt"
+
+ maintainers("tkoskela", "mmcleod89", "20DM")
+ license("GPL-2.0")
+
+ version("4.2.0", sha256="25e579722f8e049d37c9155affa57ec2f38a2f8414c9cf430da2b7bafc86907b")
+
+ variant("tests", default=False, description="Build tests")
+ variant("examples", default=False, description="Build examples")
+ variant("benchmarks", default=False, description="Build benchmarks")
+ variant("openmp", default=False, description="Enable multithreading with OpenMP")
+ variant("mpi", default=False, description="Enable parallelisation with MPI")
+ variant("docs", default=False, description="Enable multithreading with OpenMP")
+ variant("coverage", default=False, description="Enable code coverage")
+ variant("onnxrt", default=False, description="Build with Tensorflow support using onnx")
+
+ depends_on("cmake@3")
+ depends_on("eigen@3.4")
+ depends_on("libtiff@4.7:")
+ depends_on("mpi", when="+mpi")
+ depends_on("catch2@3.4:3", when="+tests")
+ depends_on("benchmark@1.8~performance_counters", when="+benchmarks")
+ depends_on("onnx@1.16:", when="+onnxrt")
+ depends_on("py-onnxruntime@1.17.1:", when="+onnxrt")
+ depends_on("doxygen@1.8:1.12+graphviz", when="+docs")
+
+ patch(
+ "https://github.com/astro-informatics/sopt/commit/836171f32d39a3fbc1147d6c302a08a61f842fee.patch?full_index=1",
+ sha256="00729db4695712c3fb38aeb9e23a17107a7c8504c3a8249d9d4ddd2782d29661",
+ when="@4.2.0",
+ )
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("tests", "tests"),
+ self.define_from_variant("examples", "examples"),
+ self.define_from_variant("benchmarks", "benchmarks"),
+ self.define_from_variant("openmp", "openmp"),
+ self.define_from_variant("dompi", "mpi"),
+ self.define_from_variant("docs", "docs"),
+ self.define_from_variant("coverage", "coverage"),
+ self.define_from_variant("onnxrt", "onnxrt"),
+ ]
+ return args
+
+ def setup_run_environment(self, env):
+ if "+tests" in self.spec:
+ env.prepend_path("PATH", self.spec.prefix.tests)
+ if "+examples" in self.spec:
+ env.prepend_path("PATH", join_path(self.spec.prefix, "examples"))
+ if "+benchmarks" in self.spec:
+ env.prepend_path("PATH", join_path(self.spec.prefix, "benchmarks"))
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make("install")
+ if "+tests" in spec:
+ install_tree("cpp/tests", spec.prefix.tests)
+ if "+examples" in spec:
+ install_tree("cpp/examples", join_path(spec.prefix, "examples"))
+ if "+benchmarks" in spec:
+ install_tree("cpp/benchmarks", join_path(spec.prefix, "benchmarks"))
diff --git a/var/spack/repos/builtin/packages/soqt/package.py b/var/spack/repos/builtin/packages/soqt/package.py
new file mode 100644
index 0000000000..bceeb5bc46
--- /dev/null
+++ b/var/spack/repos/builtin/packages/soqt/package.py
@@ -0,0 +1,56 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Soqt(CMakePackage):
+ """Old Coin GUI binding for Qt, replaced by Quarter"""
+
+ homepage = "https://github.com/coin3d/soqt/"
+ url = "https://github.com/coin3d/soqt/releases/download/v1.6.3/soqt-1.6.3-src.tar.gz"
+ git = "https://github.com/coin3d/soqt/"
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3:", type="build")
+
+ license("BSD-3-Clause", checked_by="paulgessinger")
+
+ version("1.6.3", sha256="79342e89290783457c075fb6a60088aad4a48ea072ede06fdf01985075ef46bd")
+ version("1.6.2", sha256="fb483b20015ab827ba46eb090bd7be5bc2f3d0349c2f947c3089af2b7003869c")
+ version("1.6.1", sha256="80289d9bd49ffe709ab85778c952573f43f1c725ea958c6d5969b2e9c77bb3ba")
+
+ depends_on("coin3d")
+ depends_on("opengl")
+
+ variant(
+ "static_defaults",
+ default=True,
+ description="Enable statically linked in default materials",
+ )
+ variant("spacenav", default=True, description="Enable Space Navigator support")
+ variant("tests", default=False, description="Build small test programs.")
+ variant("iv", default=True, description="Enable extra Open Inventor extensions")
+
+ depends_on("qmake")
+ with when("^[virtuals=qmake] qt"):
+ depends_on("qt@5 +gui +opengl")
+ with when("^[virtuals=qmake] qt-base"):
+ depends_on("qt-base@6 +gui +opengl +widgets")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("COIN_IV_EXTENSIONS", "iv"),
+ self.define_from_variant("WITH_STATIC_DEFAULTS", "static_defaults"),
+ self.define_from_variant("HAVE_SPACENAV_SUPPORT", "spacenav"),
+ self.define_from_variant("SOQT_BUILD_TESTS", "tests"),
+ ]
+ if self.spec.satisfies("^[virtuals=qmake] qt"):
+ args.append(self.define("SOQT_USE_QT5", True))
+ args.append(self.define("SOQT_USE_QT6", False))
+ if self.spec.satisfies("^[virtuals=qmake] qt-base"):
+ args.append(self.define("SOQT_USE_QT5", False))
+ args.append(self.define("SOQT_USE_QT6", True))
+ return args
diff --git a/var/spack/repos/builtin/packages/sortmerna/package.py b/var/spack/repos/builtin/packages/sortmerna/package.py
index 11213ac876..f174b2cb47 100644
--- a/var/spack/repos/builtin/packages/sortmerna/package.py
+++ b/var/spack/repos/builtin/packages/sortmerna/package.py
@@ -17,6 +17,9 @@ class Sortmerna(CMakePackage):
version("2017-07-13", commit="8bde6fa113a5d99a23ae81b48eeea6760e966094")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
diff --git a/var/spack/repos/builtin/packages/sos/package.py b/var/spack/repos/builtin/packages/sos/package.py
index fc3465624b..8deba7e875 100644
--- a/var/spack/repos/builtin/packages/sos/package.py
+++ b/var/spack/repos/builtin/packages/sos/package.py
@@ -15,7 +15,7 @@ class Sos(AutotoolsPackage):
# notify when the package is updated.
maintainers("rscohn2")
- license("GPL-2.0-or-later")
+ license("BSD-3-Clause")
version("1.5.2", sha256="c9df8c6ab43890e5d8970467c188ae2fad736845875ca4c370ff047dbb37d017")
version("1.5.1", sha256="0a6303dcbdd713ef2d83c617c1eb821227603c98cb9816c53585fd993da8a984")
@@ -24,12 +24,47 @@ class Sos(AutotoolsPackage):
variant("xpmem", default=False, description="Enable xpmem for transport")
variant("ofi", default=True, description="Enable ofi for transport")
+ variant(
+ "manual-progress",
+ default=False,
+ description="Enable intermittent progress calls in transport layer",
+ )
+ variant(
+ "ofi-manual-progress",
+ default=False,
+ when="+ofi",
+ description="Use FI_MANUAL_PROGRESS for data progress control mode",
+ )
variant("shr-atomics", default=False, description="Enable shared memory atomic operations")
+ variant(
+ "av-map",
+ default=False,
+ description="Enable av-map instead of av-table in the OFI transport",
+ )
+ variant(
+ "completion-polling",
+ default=False,
+ description="Enable polling in quiet, fence, and local completion operations",
+ )
+ variant(
+ "thread-completion",
+ default=False,
+ description="Support SHMEM_THREAD_MULTIPLE in OFI transport using FI_THREAD_COMPLETION",
+ )
+ variant("error-checking", default=False, description="Enable error checking for SHMEM calls")
+ variant(
+ "lengthy-tests",
+ default=False,
+ description="Execute long running tests as part of 'make check'",
+ )
+ variant("rpath", default=True, description="Use rpath in compiler wrappers ")
+ variant("hard-polling", default=False, description="Enable hard polling of wait calls")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("hydra", type=("build", "run"), when="+ofi")
depends_on("libfabric", type="link", when="+ofi")
depends_on("xpmem", type="link", when="+xpmem")
@@ -39,8 +74,6 @@ class Sos(AutotoolsPackage):
filter_compiler_wrappers("oshcc", "oshc++", "oshcc", "oshfort", relative_root="bin")
def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_compiler_environment(env)
-
# Enable the osh wrappers to use spack wrappers when inside spack
# with env variables
env.set("SHMEM_CC", spack_cc)
@@ -57,5 +90,14 @@ class Sos(AutotoolsPackage):
args.extend(self.with_or_without("ofi"))
# This option is not compatiable with remote atomics
args.extend(self.enable_or_disable("shr-atomics"))
+ args.extend(self.enable_or_disable("av-map"))
+ args.extend(self.enable_or_disable("completion-polling"))
+ args.extend(self.enable_or_disable("thread-completion"))
+ args.extend(self.enable_or_disable("error-checking"))
+ args.extend(self.enable_or_disable("lengthy-tests"))
+ args.extend(self.enable_or_disable("rpath"))
+ args.extend(self.enable_or_disable("manual-progress"))
+ args.extend(self.enable_or_disable("ofi-manual-progress"))
+ args.extend(self.enable_or_disable("hard-polling"))
args.append("--enable-pmi-simple")
return args
diff --git a/var/spack/repos/builtin/packages/sosflow/package.py b/var/spack/repos/builtin/packages/sosflow/package.py
index 0551a3bd6a..709d1374a6 100644
--- a/var/spack/repos/builtin/packages/sosflow/package.py
+++ b/var/spack/repos/builtin/packages/sosflow/package.py
@@ -16,6 +16,9 @@ class Sosflow(CMakePackage):
version("spack", tag="spack-build-v0.9901", commit="57c77f18af88b01615d5900124f9cfd1770c8241")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libevpath")
depends_on("sqlite@3:")
depends_on("pkgconfig")
diff --git a/var/spack/repos/builtin/packages/source-highlight/package.py b/var/spack/repos/builtin/packages/source-highlight/package.py
index c4fdf0f0c2..8ac6ef672f 100644
--- a/var/spack/repos/builtin/packages/source-highlight/package.py
+++ b/var/spack/repos/builtin/packages/source-highlight/package.py
@@ -22,6 +22,9 @@ class SourceHighlight(AutotoolsPackage, GNUMirrorPackage):
version("3.1.9", sha256="3a7fd28378cb5416f8de2c9e77196ec915145d44e30ff4e0ee8beb3fe6211c91")
version("3.1.8", sha256="01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch(
"https://git.savannah.gnu.org/cgit/src-highlite.git/"
+ "patch/lib?id=904949c9026cb772dc93fbe0947a252ef47127f4",
diff --git a/var/spack/repos/builtin/packages/sourmash/package.py b/var/spack/repos/builtin/packages/sourmash/package.py
index 102fc499ee..abcf9f60c3 100644
--- a/var/spack/repos/builtin/packages/sourmash/package.py
+++ b/var/spack/repos/builtin/packages/sourmash/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -35,8 +36,7 @@ class Sourmash(PythonPackage):
cargo = Executable("cargo")
cargo("build", "--release")
# install python package
- args = std_pip_args + ["--prefix=" + prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={prefix}", ".")
# move sourmash.so into expected place
site_packages = join_path(python_platlib, "sourmash")
lib_ext = "dylib" if spec.platform == "Darwin" else "so"
diff --git a/var/spack/repos/builtin/packages/sowing/package.py b/var/spack/repos/builtin/packages/sowing/package.py
index d4f4b32eda..e0428b7e73 100644
--- a/var/spack/repos/builtin/packages/sowing/package.py
+++ b/var/spack/repos/builtin/packages/sowing/package.py
@@ -17,10 +17,15 @@ class Sowing(AutotoolsPackage):
git = "https://bitbucket.org/petsc/pkg-sowing"
maintainers("balay")
+ version("master", branch="master")
version("1.1.26-p8", sha256="2ef4d6db2075230247306e3d0194ffb3e4591aeb05bd244647c72dc1a4e52994")
version("1.1.26-p1", sha256="fa0bd07295e5d768f2c33c8ab32205cc6411d42cb40bde0700fb57f9ee31c3d9")
version("1.1.25-p1", sha256="c3a5bb170fffeeb1405ec4c3a048744a528d2bef24de29b6ac5e970cfeaddab5")
version("1.1.23-p1", sha256="3e36f59e06fccbbf7b78d185c5654edaf70cf76f1c584bcbf08c39d7f29125e8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
def build(self, spec, prefix):
make("ALL", parallel=False)
diff --git a/var/spack/repos/builtin/packages/sox/package.py b/var/spack/repos/builtin/packages/sox/package.py
index f3f74d3299..f21c34222c 100644
--- a/var/spack/repos/builtin/packages/sox/package.py
+++ b/var/spack/repos/builtin/packages/sox/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Sox(AutotoolsPackage):
"""SoX, the Swiss Army knife of sound processing programs."""
- homepage = "http://sox.sourceforge.net/Main/HomePage"
+ homepage = "https://sox.sourceforge.net/Main/HomePage"
url = "https://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2"
version("14.4.2", sha256="81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c")
+ depends_on("c", type="build")
+
variant("mp3", default=False, description="Build with mp3 support")
depends_on("bzip2")
@@ -22,3 +24,10 @@ class Sox(AutotoolsPackage):
depends_on("opus")
depends_on("lame", when="+mp3")
depends_on("libmad", when="+mp3")
+
+ def flag_handler(self, name, flags):
+ # https://github.com/Homebrew/homebrew-core/blob/master/Formula/s/sox.rb
+ if name == "cflags":
+ if self.spec.satisfies("%apple-clang@15:"):
+ flags.append("-Wno-incompatible-function-pointer-types")
+ return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/sp/package.py b/var/spack/repos/builtin/packages/sp/package.py
index c4fe181601..7b22e688b8 100644
--- a/var/spack/repos/builtin/packages/sp/package.py
+++ b/var/spack/repos/builtin/packages/sp/package.py
@@ -18,9 +18,12 @@ class Sp(CMakePackage):
maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA")
version("develop", branch="develop")
+ version("2.5.0", sha256="aec475ccb5ccf7c5a758dfb699626f2be78a22729a9d8d5e0a286db6a3213a51")
version("2.4.0", sha256="dbb4280e622d2683b68a28f8e3837744adf9bbbb1e7940856e8f4597f481c708")
version("2.3.3", sha256="c0d465209e599de3c0193e65671e290e9f422f659f1da928505489a3edeab99f")
+ depends_on("fortran", type="build")
+
variant("shared", default=False, description="Build shared library", when="@2.4:")
variant("openmp", default=False, description="Use OpenMP threading")
variant("pic", default=False, description="Enable position-independent code (PIC)")
@@ -63,5 +66,5 @@ class Sp(CMakePackage):
return args
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/spaceranger/package.py b/var/spack/repos/builtin/packages/spaceranger/package.py
new file mode 100644
index 0000000000..9b02fc0942
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spaceranger/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Spaceranger(Package):
+ """Space Ranger is a set of analysis pipelines that process Visium data with brightfield
+ and fluorescence microscope images. Space Ranger allows users to map the whole
+ transcriptome in formalin fixed paraffin embedded (FFPE) and fresh frozen (FF) tissues.
+
+ This package requires the user to accept a license and to download the tarball manually.
+ Once downloaded, the file should be placed within a manual mirror or within the current
+ directory. For instructions on making a manual mirror, see
+ https://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.10xgenomics.com/support/software/space-ranger/latest"
+ manual_download = True
+ license_url = "support.10xgenomics.com/license"
+
+ version("2.1.1", sha256="e3c2982ae91afc4031f7b29e4b27ea012243e1c61ca8fa246b8c1f6ef7c7c241")
+
+ # spaceranger is distributed as precompiled binaries that are not compatible with
+ # processors without the avx instruction set ...
+ # https://www.10xgenomics.com/support/software/space-ranger/downloads/space-ranger-system-requirements
+ conflicts("target=:k10") # last AMD processor not to support avx
+ conflicts("target=:westmere") # last Intel processor not to support avx
+ conflicts("target=:x86_64_v2") # last generic architecture not to support avx
+
+ def url_for_version(self, version):
+ return "file://{0}/spaceranger-{1}.tar.gz".format(os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/spack/package.py b/var/spack/repos/builtin/packages/spack/package.py
index 24b679748a..ca4d8b7e6b 100644
--- a/var/spack/repos/builtin/packages/spack/package.py
+++ b/var/spack/repos/builtin/packages/spack/package.py
@@ -24,6 +24,8 @@ class Spack(Package):
license("Apache-2.0 OR MIT")
version("develop", branch="develop")
+ version("0.21.1", sha256="9a66bc8b59d436d5c0bd7b052c36d2177b228665ece6c9a2c339c2acb3f9103e")
+ version("0.21.0", sha256="98680e52591428dc194a021e673a79bdc7799f394c1217b3fc22c89465159a84")
version("0.20.1", sha256="141be037b56e4b095840a95ac51c428c29dad078f7f88140ae6355b2a1b32dc3")
version("0.20.0", sha256="a189b4e8173eefdf76617445125b329d912f730767048846c38c8a2637396a7d")
version("0.19.2", sha256="4978b37da50f5690f4e1aa0cfe3975a89ccef85d96c68d417ea0716a8ce3aa98")
@@ -40,6 +42,10 @@ class Spack(Package):
version("0.16.1", sha256="8d893036b24d9ee0feee41ac33dd66e4fc68d392918f346f8a7a36a69c567567")
version("0.16.0", sha256="064b2532c70916c7684d4c7c973416ac32dd2ea15f5c392654c75258bfc8c6c2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("development_tools", default=False, description="Build development dependencies")
variant(
"fetchers",
@@ -67,6 +73,7 @@ class Spack(Package):
depends_on("python@2.6.0:2.7,3.5:", type="run")
depends_on("python@2.7.0:2.7,3.5:", type="run", when="@0.18.0:")
depends_on("python@2.7.0:2.7,3.6:", type="run", when="@0.19.0:")
+ depends_on("python@3.6:", type="run", when="@0.20.0:")
# Old Spack unfortunately depends on distutils, removed in Python 3.12
depends_on("python@:3.12", type="run", when="@0.18:0.20.1")
@@ -112,7 +119,6 @@ class Spack(Package):
depends_on("binutils", type="run", when="@:0.20")
depends_on("gnupg", type="run")
depends_on("patchelf", type="run", when="platform=linux")
- depends_on("patchelf", type="run", when="platform=cray")
# See https://github.com/spack/spack/pull/24686
# and #25595, #25726, #25853, #25923, #25924 upstream in python/cpython
diff --git a/var/spack/repos/builtin/packages/spades/package.py b/var/spack/repos/builtin/packages/spades/package.py
index d5cbb11439..7ce989fb6b 100644
--- a/var/spack/repos/builtin/packages/spades/package.py
+++ b/var/spack/repos/builtin/packages/spades/package.py
@@ -12,7 +12,9 @@ class Spades(CMakePackage):
homepage = "https://cab.spbu.ru/software/spades/"
url = "https://github.com/ablab/spades/releases/download/v3.15.3/SPAdes-3.15.3.tar.gz"
+ maintainers("snehring")
+ version("4.0.0", sha256="07c02eb1d9d90f611ac73bdd30ddc242ed51b00c8a3757189e8a8137ad8cfb8b")
version("3.15.5", sha256="155c3640d571f2e7b19a05031d1fd0d19bd82df785d38870fb93bd241b12bbfa")
version("3.15.3", sha256="b2e5a9fd7a65aee5ab886222d6af4f7b7bc7f755da7a03941571fabd6b9e1499")
version("3.15.0", sha256="6719489fa4bed6dd96d78bdd4001a30806d5469170289085836711d1ffb8b28b")
@@ -22,13 +24,25 @@ class Spades(CMakePackage):
version("3.11.1", sha256="3ab85d86bf7d595bd8adf11c971f5d258bbbd2574b7c1703b16d6639a725b474")
version("3.10.1", sha256="d49dd9eb947767a14a9896072a1bce107fb8bf39ed64133a9e2f24fb1f240d96")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python", type=("build", "run"))
depends_on("zlib-api")
depends_on("bzip2")
+ variant("sra", default=True, description="Build with ncbi sra file support", when="@4:")
+ variant("tools", default=True, description="Build additional tools", when="@4:")
+
# SPAdes will explicitly not compile with gcc < 5.3.0
conflicts("%gcc@:5.2.9")
conflicts("%gcc@7.1.0:", when="@:3.10.1")
root_cmakelists_dir = "src"
+
+ def cmake_args(self):
+ args = [self.define_from_variant("SPADES_USE_NCBISDK", "sra")]
+ if self.spec.satisfies("+tools"):
+ args.append("-DSPADES_ENABLE_PROJECTS:STRING=all")
+ return args
diff --git a/var/spack/repos/builtin/packages/span-lite/package.py b/var/spack/repos/builtin/packages/span-lite/package.py
index 0ea94646d6..f256873a2b 100644
--- a/var/spack/repos/builtin/packages/span-lite/package.py
+++ b/var/spack/repos/builtin/packages/span-lite/package.py
@@ -20,6 +20,7 @@ class SpanLite(CMakePackage):
license("BSL-1.0")
+ version("0.11.0", sha256="ef4e028e18ff21044da4b4641ca1bc8a2e2d656e2028322876c0e1b9b6904f9d")
version("0.10.3", sha256="04ac8148760369f11d4cdbc7969d66cb3d372357b6b5c7744841a60551ccb50b")
version("0.9.2", sha256="7562802aac9b78e0140c3d59933cf4dc5825c0712c63daad2f7fff8c67e62eb4")
version("0.8.1", sha256="2136dba54988c16b03f7c652ea977205bf624bfde90c24331177027d6529386d")
@@ -30,10 +31,12 @@ class SpanLite(CMakePackage):
version("0.2.0", sha256="6e3305fe868442410a00962a39fc59ed494cecc4f99fe2aff187e33932f06e46")
version("0.1.0", sha256="0a84b9369f86beba326e2160b683fd0922f416ce136437751a9ed70afcc67a1c")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
return [
"-DSPAN_LITE_EXPORT_PACKAGE=ON",
- "-DSPAN_LITE_OPT_BUILD_TESTS=%s" % ("ON" if self.run_tests else "OFF"),
+ f"-DSPAN_LITE_OPT_BUILD_TESTS={'ON' if self.run_tests else 'OFF'}",
"-DSPAN_LITE_OPT_BUILD_EXAMPLES=OFF",
]
diff --git a/var/spack/repos/builtin/packages/spark/package.py b/var/spack/repos/builtin/packages/spark/package.py
index faf15b8398..46e3551604 100644
--- a/var/spack/repos/builtin/packages/spark/package.py
+++ b/var/spack/repos/builtin/packages/spark/package.py
@@ -16,6 +16,8 @@ class Spark(Package):
homepage = "https://spark.apache.org"
url = "https://archive.apache.org/dist/spark/spark-2.0.0/spark-2.0.0-bin-without-hadoop.tgz"
+ maintainers("teaguesterling")
+
variant("hadoop", default=False, description="Build with Hadoop")
depends_on("java", type=("build", "run"))
@@ -23,6 +25,10 @@ class Spark(Package):
license("Apache-2.0")
+ version("3.5.1", sha256="5548c02625676fa97cb6b8072f131ed0b860a09d1e86be4e025d0cbfa869bc4a")
+ version("3.4.3", sha256="85caa74671d46640a2ecccc5248ef673842b507b9843aeebccd6891721b6673f")
+ version("3.3.4", sha256="793205ff45ce2cb4d91bb2c2724c14fb2a2a49754b93f36c60c4f47e100c2b10")
+ version("3.2.4", sha256="9a824ad6d73797d602027d650f515d8b68269ffa52a64ff15cfedf10d85fe049")
version("3.1.1", sha256="2d16f527016993e69a7c801233e661a170e3099ae2d9b950f7457729d63062f4")
version("3.0.2", sha256="1a904f9bfa44a1218cb440c99800dd2ae729249a73c63b3bb10e431ed5b58406")
version("3.0.1", sha256="ddda310ac09e3f2da9c33ad278b1665fbad2411d8da127d0de86b90019e962dc")
diff --git a/var/spack/repos/builtin/packages/sparrow/package.py b/var/spack/repos/builtin/packages/sparrow/package.py
index 249d8e12fb..0abf013b72 100644
--- a/var/spack/repos/builtin/packages/sparrow/package.py
+++ b/var/spack/repos/builtin/packages/sparrow/package.py
@@ -35,6 +35,8 @@ class Sparrow(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
resource(
name="dev",
url="https://github.com/qcscine/development-utils/archive/refs/tags/4.0.0.tar.gz",
diff --git a/var/spack/repos/builtin/packages/sparse/package.py b/var/spack/repos/builtin/packages/sparse/package.py
index c1d7313076..6181c8702c 100644
--- a/var/spack/repos/builtin/packages/sparse/package.py
+++ b/var/spack/repos/builtin/packages/sparse/package.py
@@ -10,8 +10,8 @@ from spack.package import *
class Sparse(MakefilePackage):
"""An open source sparse linear equation solver."""
- homepage = "http://sparse.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/sparse/sparse/sparse1.4b/sparse1.4b.tar.gz"
+ homepage = "https://sparse.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/sparse/sparse/sparse1.4b/sparse1.4b.tar.gz"
maintainers("wortiz")
@@ -19,6 +19,8 @@ class Sparse(MakefilePackage):
version("1.4b", sha256="63e6646244fd8f4d89f7f70fbf4cfd46b7688d21b22840a0ce57d294a7496d28")
+ depends_on("c", type="build") # generated
+
variant("pic", default=True, description="Build with position independent code")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/sparsehash/package.py b/var/spack/repos/builtin/packages/sparsehash/package.py
index 7755970932..1be4970216 100644
--- a/var/spack/repos/builtin/packages/sparsehash/package.py
+++ b/var/spack/repos/builtin/packages/sparsehash/package.py
@@ -16,3 +16,6 @@ class Sparsehash(AutotoolsPackage):
version("2.0.4", sha256="8cd1a95827dfd8270927894eb77f62b4087735cbede953884647f16c521c7e58")
version("2.0.3", sha256="05e986a5c7327796dad742182b2d10805a8d4f511ad090da0490f146c1ff7a8c")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/sparskit/package.py b/var/spack/repos/builtin/packages/sparskit/package.py
index 67d3741712..5792c22417 100644
--- a/var/spack/repos/builtin/packages/sparskit/package.py
+++ b/var/spack/repos/builtin/packages/sparskit/package.py
@@ -24,6 +24,9 @@ class Sparskit(MakefilePackage):
url="http://www-users.cs.umn.edu/~saad/software/SPARSKIT/SPARSKIT2.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# The library uses blas routine which needs to be known when the lib is used.
# A dependent package should add self.spec['blas'].libs.ld_flags
# at the end of its link line.
diff --git a/var/spack/repos/builtin/packages/sparta/package.py b/var/spack/repos/builtin/packages/sparta/package.py
index 0597791863..4a73b6705b 100644
--- a/var/spack/repos/builtin/packages/sparta/package.py
+++ b/var/spack/repos/builtin/packages/sparta/package.py
@@ -14,6 +14,7 @@ class Sparta(Package):
homepage = "https://github.com/atulkakrana/sPARTA.github"
url = "https://github.com/atulkakrana/sPARTA/archive/1.25.tar.gz"
+ version("1.27", sha256="6f66a646bd4ecf14fc4dc1e5729e44a740c205b5f0e0f7771ae22f14b047931e")
version("1.25", sha256="007997b9bf5041ae35c9bb79455d533c0f0773f9dd3ba4e5ddf306139625681f")
depends_on("bowtie2")
diff --git a/var/spack/repos/builtin/packages/spath/package.py b/var/spack/repos/builtin/packages/spath/package.py
index 62cac22998..0256997362 100644
--- a/var/spack/repos/builtin/packages/spath/package.py
+++ b/var/spack/repos/builtin/packages/spath/package.py
@@ -19,12 +19,16 @@ class Spath(CMakePackage):
license("MIT")
version("main", branch="main")
+ version("0.4.0", sha256="469c9d36f9244826c6ec264a779eed870a772f467d6964030d336e509d3c9374")
version("0.3.0", sha256="cb155a31cebde8b7bf397123de3be290fd99d3863509b4ba9b0252caba660082")
version("0.2.0", sha256="2de8a25547b53ef064664d79b543141bc3020219f40ff0e1076f676e13a9e77a")
version("0.1.0", sha256="2cfc635b2384d3f92973c7aea173dabe47da112d308f5098e6636e4b2f4a704c")
version("0.0.2", sha256="7a65be59c3d27e92ed4718fba1a97a4a1c68e0a552b54de13d58afe3d8199cf7")
version("0.0.1", sha256="f41c0ac74e6fb8acfd0c072d756db0fc9c00441f22be492cc4ad25f7fb596a24")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("zlib-api", type="link", when="@:0.0.2")
variant("mpi", default=True, description="Build with MPI support")
@@ -41,8 +45,5 @@ class Spath(CMakePackage):
if spec.satisfies("@0.1.0:"):
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
- else:
- if spec.satisfies("platform=cray"):
- args.append(self.define("SPATH_LINK_STATIC", True))
return args
diff --git a/var/spack/repos/builtin/packages/spatialdata/package.py b/var/spack/repos/builtin/packages/spatialdata/package.py
new file mode 100644
index 0000000000..38dee9dae6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spatialdata/package.py
@@ -0,0 +1,69 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Spatialdata(AutotoolsPackage):
+ """SpatialData provides an interface to Proj.4 for converting coordinates
+
+ Spatialdata is a C++ library for
+
+ interpolating values for spatially distributed data,
+ converting coordinates among geographic projections using Proj,
+ nondimensionalization of quantities,
+ specification of units via Pyre (optional).
+
+ This library is used in the finite-element code PyLith
+ (https://github.com/geodynamics/pylith). The primary focus is specification
+ of parameters that vary in space, such as values for boundary conditions
+ and parameters of constitutive models. This provides a specification of
+ these parameters independent of the discretization."""
+
+ homepage = "https://geodynamics.org/resources/spatialdata/"
+ url = "https://github.com/geodynamics/spatialdata/archive/refs/tags/v3.1.0.tar.gz"
+ git = "https://github.com/geodynamics/spatialdata.git"
+
+ license("MIT", checked_by="downloadico")
+
+ version("develop", branch="develop", submodules="true")
+ version("3.1.0", sha256="dd6caccbf41a51928183d6a1caf2380aa0ed0f2c8c71ecc9b2cd9e3f23aa418c")
+
+ depends_on("cxx", type="build") # generated
+
+ # M4 macros shared for the CIG codes
+ resource(
+ name="autoconf_cig",
+ git="https://github.com/geodynamics/autoconf_cig.git",
+ commit="e490e14fb13595428d39055304bcf0ee7ab94806",
+ )
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ depends_on("swig", type="build")
+
+ depends_on("python")
+ depends_on("py-setuptools")
+ depends_on("py-cig-pythia")
+ depends_on("proj@6:")
+ depends_on("py-numpy")
+
+ def autoreconf(self, spec, prefix):
+ autoupdate("--include=autoconf_cig", "--include=m4")
+ autoreconf(
+ "--install",
+ "--verbose",
+ "--force",
+ "--include=autoconf_cig",
+ "--include=m4",
+ "--include=" + spec["libtool"].prefix + "/share/aclocal/",
+ )
+
+ def configure_args(self):
+ args = []
+ args.append("--enable-swig")
+ return args
diff --git a/var/spack/repos/builtin/packages/spdk/package.py b/var/spack/repos/builtin/packages/spdk/package.py
index d4766691db..6c6f71af5f 100644
--- a/var/spack/repos/builtin/packages/spdk/package.py
+++ b/var/spack/repos/builtin/packages/spdk/package.py
@@ -27,6 +27,9 @@ class Spdk(AutotoolsPackage):
"23.01", tag="v23.01", commit="10edc60aa8b5f1b04d6496fea976dec75e276a95", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("crypto", default=False, description="Build vbdev crypto module")
variant("dpdk", default=False, description="Build with dpdk")
variant("fio", default=False, description="Build fio plugin")
diff --git a/var/spack/repos/builtin/packages/spdlog/package.py b/var/spack/repos/builtin/packages/spdlog/package.py
index a1281c3ab8..f812cc1613 100644
--- a/var/spack/repos/builtin/packages/spdlog/package.py
+++ b/var/spack/repos/builtin/packages/spdlog/package.py
@@ -14,6 +14,8 @@ class Spdlog(CMakePackage):
license("MIT")
+ version("1.14.1", sha256="1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b")
+ version("1.13.0", sha256="534f2ee1a4dcbeb22249856edfb2be76a1cf4f708a20b0ac2ed090ee24cfdbc9")
version("1.12.0", sha256="4dccf2d10f410c1e2feaff89966bfc49a1abb29ef6f08246335b110e001e09a9")
version("1.11.0", sha256="ca5cae8d6cac15dae0ec63b21d6ad3530070650f68076f3a4a862ca293a858bb")
version("1.10.0", sha256="697f91700237dbae2326b90469be32b876b2b44888302afbc7aceb68bcfe8224")
@@ -48,36 +50,34 @@ class Spdlog(CMakePackage):
version("0.10.0", sha256="fbbc53c1cc09b93b4c3d76b683bbe9315e2efe3727701227374dce6aa4264075")
version("0.9.0", sha256="bbbe5a855c8b309621352921d650449eb2f741d35d55ec50fb4d8122ddfb8f01")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries (v1.4.0+)")
- variant(
- "fmt_external",
- default=False,
- description="Build using external fmt libraries instead of bundled one",
- )
depends_on("cmake@3.2:", when="@:1.7.0", type="build")
depends_on("cmake@3.10:", when="@1.8.0:", type="build")
+ depends_on("cmake@3.11:", when="@1.13.0:", type="build")
- depends_on("fmt@5.3:", when="+fmt_external")
- depends_on("fmt@7:", when="@1.7: +fmt_external")
- depends_on("fmt@8:", when="@1.9: +fmt_external")
- depends_on("fmt@9:", when="@1.11: +fmt_external")
+ depends_on("fmt@5.3:")
+ depends_on("fmt@7:", when="@1.7:")
+ depends_on("fmt@8:", when="@1.9:")
+ depends_on("fmt@9:", when="@1.11:")
# spdlog@1.11.0 with fmt@10 https://github.com/gabime/spdlog/pull/2694
patch(
"https://github.com/gabime/spdlog/commit/0ca574ae168820da0268b3ec7607ca7b33024d05.patch?full_index=1",
sha256="31b22a9bfa6790fdabff186c0a9b0fd588439485f05cbef5e661231d15fec49b",
- when="@1.11.0 +fmt_external ^fmt@10:",
+ when="@1.11.0 ^fmt@10:",
)
def cmake_args(self):
args = []
- if self.spec.version >= Version("1.4.0"):
+ if self.spec.satisfies("@1.4.0:"):
args.extend(
[
self.define_from_variant("SPDLOG_BUILD_SHARED", "shared"),
- self.define_from_variant("SPDLOG_FMT_EXTERNAL", "fmt_external"),
+ self.define("SPDLOG_FMT_EXTERNAL", True),
# tests and examples
self.define("SPDLOG_BUILD_TESTS", self.run_tests),
self.define("SPDLOG_BUILD_EXAMPLE", self.run_tests),
diff --git a/var/spack/repos/builtin/packages/specfem3d-globe/package.py b/var/spack/repos/builtin/packages/specfem3d-globe/package.py
index 937975855c..2c1bd39c21 100644
--- a/var/spack/repos/builtin/packages/specfem3d-globe/package.py
+++ b/var/spack/repos/builtin/packages/specfem3d-globe/package.py
@@ -19,6 +19,10 @@ class Specfem3dGlobe(AutotoolsPackage, CudaPackage):
version("8.0.0", sha256="3e234e66fce4cc5484c651584187b255f951ee6cd1ec057e6aa6d42aced9052d")
version("7.0.2", sha256="78b4cfbe4e5121927ab82a8c2e821b65cdfff3e94d017303bf21af7805186d9b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("opencl", default=False, description="Build with OpenCL code generator")
variant("openmp", default=True, description="Build with OpenMP code generator")
variant("double-precision", default=False, description="Treat REAL as double precision")
diff --git a/var/spack/repos/builtin/packages/spectra/package.py b/var/spack/repos/builtin/packages/spectra/package.py
index 5288beecfe..66f2dc2e0e 100644
--- a/var/spack/repos/builtin/packages/spectra/package.py
+++ b/var/spack/repos/builtin/packages/spectra/package.py
@@ -28,5 +28,8 @@ class Spectra(CMakePackage):
version("1.0.0", sha256="45228b7d77b916b5384245eb13aa24bc994f3b0375013a8ba6b85adfd2dafd67")
version("0.9.0", sha256="2966757d432e8fba5958c2a05ad5674ce34eaae3718dd546c1ba8760b80b7a3d")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@3.5:")
depends_on("eigen")
diff --git a/var/spack/repos/builtin/packages/spectre/package.py b/var/spack/repos/builtin/packages/spectre/package.py
index 4f40fa4cf8..3d56114c42 100644
--- a/var/spack/repos/builtin/packages/spectre/package.py
+++ b/var/spack/repos/builtin/packages/spectre/package.py
@@ -32,6 +32,39 @@ class Spectre(CMakePackage):
version("develop", branch="develop")
version(
+ "2024.03.19", sha256="42a25c8827b56268d9826239cde521491be19318d83785b35cd0265a9f6a1f7c"
+ )
+ version(
+ "2024.09.29", sha256="b5e84b4564ad7cd2e069a24c6c472aab342753fe8393242eceba378b52226acb"
+ )
+ version(
+ "2024.09.16", sha256="2524d4e3cbe9206c0d8830fd6969dcf4cf53aefb26c882c6a743638611763171"
+ )
+ version(
+ "2024.08.03", sha256="18582b625b121c16cd9a1ec421c4ac6cb77bb252622a205b038306e75a466138"
+ )
+ version(
+ "2024.06.18", sha256="75ca22f3f9d59887b4ae40397fffc0ada9f218cbb23013e86e14deabb30490f7"
+ )
+ version(
+ "2024.06.05", sha256="7f1dcb5dc067a3977d1720ab655507f52821d898ea1e2b2a82c52dd9e246804f"
+ )
+ version(
+ "2024.05.11", sha256="be3a91011dd52adfe6f1263a1ee4bf8c51ac95c7d537ad934453997637e5d31a"
+ )
+ version(
+ "2024.04.12", sha256="2ca46e1c493225e9067546595b1bb234d8634de4974ba87a7b8f011e686b44b6"
+ )
+ version(
+ "2024.03.19", sha256="42a25c8827b56268d9826239cde521491be19318d83785b35cd0265a9f6a1f7c"
+ )
+ version(
+ "2024.02.05", sha256="cf5c4da473d665d0cac0a32562b1b8e8c0f1a77eebca8c3171e52cdf3056fdb3"
+ )
+ version(
+ "2023.12.08", sha256="662b4df6b6cdb097f9edcba869b3e05affeae485de8766ca66bf21399c39a9d8"
+ )
+ version(
"2023.10.11", sha256="f25d17bc80cc49ebdd81726326701fe9ecd2b6705d86e6e3d48d9e4a458c8aff"
)
version(
@@ -107,6 +140,10 @@ class Spectre(CMakePackage):
"2021.12.15", sha256="4bfe9e27412e263ffdc6fcfcb84011f16d34a9fdd633ad7fc84a34c898f67e5c"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Configuration variants
variant(
"executables",
@@ -128,7 +165,7 @@ class Spectre(CMakePackage):
),
description="Executables to install",
)
- variant("python", default=False, description="Build Python bindings")
+ variant("python", default=True, description="Build Python bindings")
variant("doc", default=False, description="Build documentation")
# Build type and debug symbols:
# - Both Debug and Release builds have debug symbols enabled by default in
@@ -151,6 +188,15 @@ class Spectre(CMakePackage):
description="Which memory allocator to use",
)
variant(
+ "openmp",
+ default=False,
+ when="@2024.03.19:",
+ description=(
+ "Enable OpenMP parallelization in some parts of the code"
+ " (Python bindings and exporter)"
+ ),
+ )
+ variant(
"formaline",
default=True,
description=(
@@ -163,15 +209,20 @@ class Spectre(CMakePackage):
)
# Compiler support
+ conflicts("%gcc@:8", when="@2022.06.14:")
conflicts("%gcc@:6")
+ conflicts("%clang@:12", when="@2023.10.11:")
conflicts("%clang@:7")
+ conflicts("%apple-clang@:12", when="@2023.10.11:")
conflicts("%apple-clang@:10")
# Build dependencies
+ depends_on("cmake@3.18:", when="@2023.02.09:", type="build")
depends_on("cmake@3.12:", type="build")
depends_on("python@2.7:", type="build")
# Link dependencies
+ depends_on("charmpp@7.0.0:", when="@2022.09.02:")
depends_on("charmpp@6.10.2:")
depends_on("blaze@3.8")
depends_on("boost@1.60:+math+program_options")
@@ -180,13 +231,14 @@ class Spectre(CMakePackage):
depends_on("hdf5")
depends_on("jemalloc", when="memory_allocator=jemalloc")
depends_on("libsharp~mpi~openmp")
- depends_on("libxsmm@1.16.1:")
+ depends_on("libxsmm@1.16.1:1")
depends_on("blas")
depends_on("lapack")
depends_on("yaml-cpp@0.6:")
# Test dependencies
- depends_on("catch2@2.8:", type="test")
+ depends_on("catch2@3.4.0:3", when="@2023.08.18:", type="test")
+ depends_on("catch2@2.8:2", when="@:2023.07.29", type="test")
depends_on("py-numpy@1.10:", type="test")
depends_on("py-scipy", type="test")
depends_on("py-h5py", type="test")
@@ -194,12 +246,19 @@ class Spectre(CMakePackage):
# Python bindings
with when("+python"):
extends("python")
+ depends_on("python@3.8:", when="@2023.08.18:", type=("build", "run"))
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-pybind11@2.6:", type="build")
+ depends_on("py-click", when="@2022.12.16:", type=("build", "run"))
+ depends_on("py-h5py@3.5.0:", type=("build", "run"))
+ depends_on("py-humanize", when="@2023.04.07:", type=("build", "run"))
+ depends_on("py-jinja2", when="@2023.07.29:", type=("build", "run"))
depends_on("py-numpy@1.10:", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
- depends_on("py-h5py", type=("build", "run"))
+ depends_on("py-pandas@1.5:1", when="@2023.04.07:", type=("build", "run"))
+ depends_on("py-pyyaml", type=("build", "run"))
+ depends_on("py-rich", when="@2022.12.16:", type=("build", "run"))
# Docs
with when("+doc"):
@@ -307,13 +366,13 @@ class Spectre(CMakePackage):
args = [
self.define("CHARM_ROOT", self.spec["charmpp"].prefix),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
- self.define("Python_EXECUTABLE", self.spec["python"].command.path),
self.define_from_variant("BUILD_PYTHON_BINDINGS", "python"),
self.define("BUILD_TESTING", self.run_tests),
self.define_from_variant("BUILD_DOCS", "doc"),
self.define("USE_GIT_HOOKS", False),
self.define("USE_IWYU", False),
self.define_from_variant("USE_FORMALINE", "formaline"),
+ self.define_from_variant("ENABLE_OPENMP", "openmp"),
self.define_from_variant("MEMORY_ALLOCATOR").upper(),
self.define_from_variant("ENABLE_PROFILING", "profiling"),
self.define("USE_PCH", True),
diff --git a/var/spack/repos/builtin/packages/spectrum-mpi/package.py b/var/spack/repos/builtin/packages/spectrum-mpi/package.py
index ca7a55e599..e36be9826c 100644
--- a/var/spack/repos/builtin/packages/spectrum-mpi/package.py
+++ b/var/spack/repos/builtin/packages/spectrum-mpi/package.py
@@ -5,6 +5,7 @@
import os
import re
+import spack.compilers
from spack.package import *
@@ -20,6 +21,8 @@ class SpectrumMpi(BundlePackage):
provides("mpi")
+ requires("platform=linux")
+
executables = ["^ompi_info$"]
@classmethod
@@ -35,7 +38,6 @@ class SpectrumMpi(BundlePackage):
def determine_variants(cls, exes, version):
compiler_suites = {
"xl": {"cc": "mpixlc", "cxx": "mpixlC", "f77": "mpixlf", "fc": "mpixlf"},
- "pgi": {"cc": "mpipgicc", "cxx": "mpipgic++", "f77": "mpipgifort", "fc": "mpipgifort"},
"default": {"cc": "mpicc", "cxx": "mpicxx", "f77": "mpif77", "fc": "mpif90"},
}
@@ -108,11 +110,6 @@ class SpectrumMpi(BundlePackage):
self.spec.mpicxx = os.path.join(self.prefix.bin, "mpixlC")
self.spec.mpif77 = os.path.join(self.prefix.bin, "mpixlf")
self.spec.mpifc = os.path.join(self.prefix.bin, "mpixlf")
- elif "%pgi" in dependent_spec:
- self.spec.mpicc = os.path.join(self.prefix.bin, "mpipgicc")
- self.spec.mpicxx = os.path.join(self.prefix.bin, "mpipgic++")
- self.spec.mpif77 = os.path.join(self.prefix.bin, "mpipgifort")
- self.spec.mpifc = os.path.join(self.prefix.bin, "mpipgifort")
else:
self.spec.mpicc = os.path.join(self.prefix.bin, "mpicc")
self.spec.mpicxx = os.path.join(self.prefix.bin, "mpicxx")
@@ -125,22 +122,17 @@ class SpectrumMpi(BundlePackage):
env.set("MPICXX", os.path.join(self.prefix.bin, "mpixlC"))
env.set("MPIF77", os.path.join(self.prefix.bin, "mpixlf"))
env.set("MPIF90", os.path.join(self.prefix.bin, "mpixlf"))
- elif "%pgi" in dependent_spec:
- env.set("MPICC", os.path.join(self.prefix.bin, "mpipgicc"))
- env.set("MPICXX", os.path.join(self.prefix.bin, "mpipgic++"))
- env.set("MPIF77", os.path.join(self.prefix.bin, "mpipgifort"))
- env.set("MPIF90", os.path.join(self.prefix.bin, "mpipgifort"))
else:
env.set("MPICC", os.path.join(self.prefix.bin, "mpicc"))
env.set("MPICXX", os.path.join(self.prefix.bin, "mpic++"))
env.set("MPIF77", os.path.join(self.prefix.bin, "mpif77"))
env.set("MPIF90", os.path.join(self.prefix.bin, "mpif90"))
- env.set("OMPI_CC", spack_cc)
- env.set("OMPI_CXX", spack_cxx)
- env.set("OMPI_FC", spack_fc)
- env.set("OMPI_F77", spack_f77)
-
+ dependent_module = dependent_spec.package.module
+ env.set("OMPI_CC", dependent_module.spack_cc)
+ env.set("OMPI_CXX", dependent_module.spack_cxx)
+ env.set("OMPI_FC", dependent_module.spack_fc)
+ env.set("OMPI_F77", dependent_module.spack_f77)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
def setup_run_environment(self, env):
@@ -151,11 +143,6 @@ class SpectrumMpi(BundlePackage):
env.set("MPICXX", os.path.join(self.prefix.bin, "mpixlC"))
env.set("MPIF77", os.path.join(self.prefix.bin, "mpixlf"))
env.set("MPIF90", os.path.join(self.prefix.bin, "mpixlf"))
- elif "%pgi" in self.spec:
- env.set("MPICC", os.path.join(self.prefix.bin, "mpipgicc"))
- env.set("MPICXX", os.path.join(self.prefix.bin, "mpipgic++"))
- env.set("MPIF77", os.path.join(self.prefix.bin, "mpipgifort"))
- env.set("MPIF90", os.path.join(self.prefix.bin, "mpipgifort"))
else:
env.set("MPICC", os.path.join(self.prefix.bin, "mpicc"))
env.set("MPICXX", os.path.join(self.prefix.bin, "mpic++"))
diff --git a/var/spack/repos/builtin/packages/speex/package.py b/var/spack/repos/builtin/packages/speex/package.py
index 63867eca45..e031643acb 100644
--- a/var/spack/repos/builtin/packages/speex/package.py
+++ b/var/spack/repos/builtin/packages/speex/package.py
@@ -17,3 +17,5 @@ class Speex(AutotoolsPackage):
version("1.2.1", sha256="4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea")
version("1.2.0", sha256="eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/speexdsp/package.py b/var/spack/repos/builtin/packages/speexdsp/package.py
index 8e5ebd571c..8d83eb28a5 100644
--- a/var/spack/repos/builtin/packages/speexdsp/package.py
+++ b/var/spack/repos/builtin/packages/speexdsp/package.py
@@ -17,6 +17,8 @@ class Speexdsp(AutotoolsPackage):
version("1.2.1", sha256="d17ca363654556a4ff1d02cc13d9eb1fc5a8642c90b40bd54ce266c3807b91a7")
version("1.2.0", sha256="d7032f607e8913c019b190c2bccc36ea73fc36718ee38b5cdfc4e4c0a04ce9a4")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/sperr/package.py b/var/spack/repos/builtin/packages/sperr/package.py
index e048996bb6..b8f0543006 100644
--- a/var/spack/repos/builtin/packages/sperr/package.py
+++ b/var/spack/repos/builtin/packages/sperr/package.py
@@ -12,18 +12,23 @@ class Sperr(CMakePackage):
# Package info
homepage = "https://github.com/NCAR/SPERR"
- url = "https://github.com/NCAR/SPERR/archive/refs/tags/v0.7.1.tar.gz"
+ url = "https://github.com/NCAR/SPERR/archive/refs/tags/v0.8.1.tar.gz"
git = "https://github.com/NCAR/SPERR.git"
maintainers("shaomeng", "robertu94")
- license("GPL-3.0-only")
+ license("Apache-2.0", when="@0.8.1:")
+ license("GPL-3.0-only", when="@:0.7.1")
# Versions
version("main", branch="main")
+ version("0.8.1", sha256="0d059fd15a0415f0cba9c54417507488ae95c5e3ff9729720db63dfd4ef2494b")
version("0.7.1", sha256="1c3f46200be365427d1f57f5873f1b0b6dbcd297de4603a47a7fa3f41b273d79")
version("0.6.2", sha256="d986997e2d79a1f27146ad02c623359976a1e72a1ab0d957e128d430cda3782d")
version("0.5", sha256="20ad48c0e7599d3e5866e024d0c49648eb817f72ad5459f5468122cf14a97171")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# Variants
variant("shared", description="build shared libaries", default=True)
variant("openmp", description="use OpenMP in 3D inputs", default=True)
diff --git a/var/spack/repos/builtin/packages/spfft/package.py b/var/spack/repos/builtin/packages/spfft/package.py
index 7ccd6fe67a..391a3868a2 100644
--- a/var/spack/repos/builtin/packages/spfft/package.py
+++ b/var/spack/repos/builtin/packages/spfft/package.py
@@ -21,6 +21,7 @@ class Spfft(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("1.1.0", sha256="231454a3142bc56249b1b551ac5175882311365509cc111d7ad0e91ed5537102")
version("1.0.6", sha256="e1b927c61f8abbb4a9937653f917169e6253e8c40b850df491594310943ca14b")
version("1.0.5", sha256="2a59d856286ea8559f00a32fc38f9f7546209cfa90112232a5288a69689a6e05")
version("1.0.4", sha256="41e63880d95343da0d8c3dbe5bfb3d46a1d612199cc9cc13a936f1628a7fdb8e")
@@ -50,17 +51,21 @@ class Spfft(CMakePackage, CudaPackage, ROCmPackage):
depends_on("fftw-api@3")
depends_on("mpi", when="+mpi")
depends_on("cmake@3.11:", type="build")
+ depends_on("cmake@3.18:", type="build", when="@1.1.0:")
+ depends_on("cmake@3.21:", type="build", when="@1.1.0: +rocm")
- depends_on("cuda@:10", when="@:0.9.11 +cuda")
+ depends_on("cuda@9:10", when="@:0.9.11 +cuda")
+ depends_on("cuda@9:", when="@0.9.12:1.0.6 +cuda")
+ depends_on("cuda@11:", when="@1.1.0: +cuda")
+
+ # Workaround for compiler bug in ROCm 4.5+ added in SpFFT 1.0.6
+ conflicts("+rocm", when="@:1.0.5")
with when("+rocm"):
- # FindHIP cmake script only works for < 4.1
- depends_on("hip@:4.0", when="@:1.0.1")
- # Workaround for compiler bug in ROCm 4.5 added in SpFFT 1.0.6
- depends_on("hip@:4.3.1", when="@:1.0.5")
depends_on("rocfft")
- # rocFFT and hipFFT have split with latest versions
- depends_on("hipfft", when="^rocfft@4.1.0:")
+ depends_on("hipfft")
+ # hip 6.0 requires v1.1.0 and later
+ conflicts("^hip@6.0.0:", when="@:1.0.6 +rocm")
# Fix compilation error in some cases due to missing include statement
# before version 1.0.3
@@ -84,7 +89,13 @@ class Spfft(CMakePackage, CudaPackage, ROCmPackage):
if cuda_arch[0] != "none":
args += [self.define("CMAKE_CUDA_ARCHITECTURES", cuda_arch)]
- if spec.satisfies("+rocm"):
+ if spec.satisfies("@1.1.0: +rocm"):
+ # v1.1.0 switched to CMake HIP language feature
+ args += ["-DSPFFT_GPU_BACKEND=ROCM"]
+ rocm_arch = self.spec.variants["amdgpu_target"].value
+ if rocm_arch[0] != "none":
+ args += [self.define("CMAKE_HIP_ARCHITECTURES", rocm_arch)]
+ elif spec.satisfies("+rocm"):
archs = ",".join(self.spec.variants["amdgpu_target"].value)
args += [
"-DSPFFT_GPU_BACKEND=ROCM",
diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py
index f937b78343..b918fab2d0 100644
--- a/var/spack/repos/builtin/packages/spglib/package.py
+++ b/var/spack/repos/builtin/packages/spglib/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Spglib(CMakePackage):
"""C library for finding and handling crystal symmetries."""
- homepage = "https://atztogo.github.io/spglib/"
+ homepage = "https://spglib.readthedocs.io/"
url = "https://github.com/spglib/spglib/archive/v2.0.2.tar.gz"
maintainers("RMeli")
@@ -20,6 +20,11 @@ class Spglib(CMakePackage):
license("BSD-3-Clause")
+ version("2.5.0", sha256="b6026f5e85106c0c9ee57e54b9399890d0f29982e20e96ede0428b3efbe6b914")
+ version("2.4.0", sha256="e33694b189c6864f719a59c31e2af55301a524fb68ba9fb65f08e95af471847d")
+ version("2.3.1", sha256="c295dbea7d2fc9e50639aa14331fef277878c35f00ef0766e688bfbb7b17d44c")
+ version("2.3.0", sha256="c05eb869018efe2efe5dcb2654cda19c5dd4c07434874205fa542f7766f7548e")
+ version("2.2.0", sha256="ac929e20ec9d4621411e2cdec59b1442e02506c1e546005bbe2c7f781e9bd49a")
version("2.1.0", sha256="31bca273a1bc54e1cff4058eebe7c0a35d5f9b489579e84667d8e005c73dcc13")
version("2.0.2", sha256="10e44a35099a0a5d0fc6ee0cdb39d472c23cb98b1f5167c0e2b08f6069f3db1e")
version("2.0.1", sha256="d7407c0d67174a0c5e41a82ed62948c43fcaf1b5529f97238d7fadd1123ffe22")
@@ -49,8 +54,16 @@ class Spglib(CMakePackage):
version("1.10.1", sha256="8ed979cda82f6d440567197ec191bffcb82ee83c5bfe8a484c5a008dd00273f0")
version("1.10.0", sha256="117fff308731784bea2ddaf3d076f0ecbf3981b31ea1c1bfd5ce4f057a5325b1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Build with OpenMP support", when="@1.16.2:")
variant("fortran", default=True, description="Build Fortran interface", when="@1.16.4:")
+ variant("tests", default=False, description="Build with tests", when="@2.1.0:")
+
+ depends_on("cmake@3.15:", type="build", when="@2.1.0:")
+ depends_on("cmake@3.24:", type="build", when="+tests")
@property
def libs(self):
@@ -61,4 +74,5 @@ class Spglib(CMakePackage):
return [
self.define_from_variant(pfx + "USE_OMP", "openmp"),
self.define_from_variant(pfx + "WITH_Fortran", "fortran"),
+ self.define_from_variant(pfx + "WITH_TESTS", "tests"),
]
diff --git a/var/spack/repos/builtin/packages/sph2pipe/package.py b/var/spack/repos/builtin/packages/sph2pipe/package.py
index 562ac4b553..6e61c2cc9d 100644
--- a/var/spack/repos/builtin/packages/sph2pipe/package.py
+++ b/var/spack/repos/builtin/packages/sph2pipe/package.py
@@ -15,4 +15,6 @@ class Sph2pipe(CMakePackage):
version("2.5", sha256="5be236dc94ed0a301c5c8a369f849f76799ec7e70f25dfc0521068d9d1d4d3e3")
+ depends_on("c", type="build") # generated
+
patch("cmake.patch")
diff --git a/var/spack/repos/builtin/packages/spherepack/package.py b/var/spack/repos/builtin/packages/spherepack/package.py
index c2931c51e5..82d40378ec 100644
--- a/var/spack/repos/builtin/packages/spherepack/package.py
+++ b/var/spack/repos/builtin/packages/spherepack/package.py
@@ -10,14 +10,16 @@ from spack.package import *
class Spherepack(Package):
"""SPHEREPACK - A Package for Modeling Geophysical Processes"""
- homepage = "https://www2.cisl.ucar.edu/resources/legacy/spherepack"
- url = "https://www2.cisl.ucar.edu/sites/default/files/spherepack3.2.tar"
+ homepage = "https://github.com/NCAR/NCAR-Classic-Libraries-for-Geophysics"
+ url = "https://github.com/NCAR/NCAR-Classic-Libraries-for-Geophysics/raw/refs/heads/main/SpherePack/spherepack3.2.tar.gz"
- version("3.2", sha256="d58ef8cbc45cf2ad24f73a9f73f5f9d4fbe03cd9e2e7722e526fffb68be581ba")
+ version("3.2", sha256="7f5497e77101a4423cee887294f873048f6ff6bc8d0e908c8a89ece677ee19ea")
+
+ depends_on("fortran", type="build")
def install(self, spec, prefix):
if self.compiler.fc is None:
raise InstallError("SPHEREPACK requires a Fortran 90 compiler")
- make("MAKE=make", "F90=f90 -O2", "AR=ar", "libspherepack")
- make("MAKE=make", "F90=f90 -O2", "AR=ar", "testspherepack")
+ make("MAKE=make", "F90=f90 -O2 -fallow-argument-mismatch", "AR=ar", "libspherepack")
+ make("MAKE=make", "F90=f90 -O2 -fallow-argument-mismatch", "AR=ar", "testspherepack")
install_tree("lib", prefix.lib)
diff --git a/var/spack/repos/builtin/packages/spindle/package.py b/var/spack/repos/builtin/packages/spindle/package.py
index b1b2e1e526..d20ed13e56 100644
--- a/var/spack/repos/builtin/packages/spindle/package.py
+++ b/var/spack/repos/builtin/packages/spindle/package.py
@@ -19,6 +19,9 @@ class Spindle(AutotoolsPackage):
version("0.12", sha256="3fd9d0afefa9072fffdf2cfd80a0b5e557e201a0b0eb02e7379eae65e64eb1f2")
version("0.8.1", sha256="c1e099e913faa8199be5811dc7b8be0266f0d1fd65f0a3a25bb46fbc70954ed6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("launchmon")
# All versions provide the runtime option --no-mpi to not use MPI, but mpi
# is needed for the build:
diff --git a/var/spack/repos/builtin/packages/spiner/package.py b/var/spack/repos/builtin/packages/spiner/package.py
index 485387254b..7b065d482b 100644
--- a/var/spack/repos/builtin/packages/spiner/package.py
+++ b/var/spack/repos/builtin/packages/spiner/package.py
@@ -38,6 +38,9 @@ class Spiner(CMakePackage, CudaPackage):
deprecated=True,
)
+ depends_on("c", type="build") # todo: disable cmake default?
+ depends_on("cxx", type="build")
+
# When overriding/overloading varaints, the last variant is always used, except for
# "when" clauses. Therefore, call the whens FIRST then the non-whens.
# https://spack.readthedocs.io/en/latest/packaging_guide.html#overriding-variants
diff --git a/var/spack/repos/builtin/packages/spiral-package-fftx/package.py b/var/spack/repos/builtin/packages/spiral-package-fftx/package.py
index 979b705a4d..5ac50c06e6 100644
--- a/var/spack/repos/builtin/packages/spiral-package-fftx/package.py
+++ b/var/spack/repos/builtin/packages/spiral-package-fftx/package.py
@@ -30,6 +30,9 @@ class SpiralPackageFftx(Package):
version("1.2.1", sha256="3f15aa5949c1b09eb59257cf1c5f6fcddc6e46f77ae9d5fce8acd8b9f99ce941")
version("1.1.1", sha256="99ec7fab9274d378524b4933917fae23f9590255518c7a124cb46bd5e8d9af37")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# FFTX package is an extension for Spiral (spec: spiral-software).
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/spiral-software/package.py b/var/spack/repos/builtin/packages/spiral-software/package.py
index cc380f8078..169c0ded1e 100644
--- a/var/spack/repos/builtin/packages/spiral-software/package.py
+++ b/var/spack/repos/builtin/packages/spiral-software/package.py
@@ -26,6 +26,9 @@ class SpiralSoftware(CMakePackage):
version("8.4.0", sha256="d0c58de65c678130eeee6b8b8b48061bbe463468990f66d9b452225ce46dee19")
version("8.3.0", sha256="41cf0e7f14f9497e98353baa1ef4ca6204ce5ca525db8093f5bb44e89992abdf")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
extendable = True
# No dependencies. Spiral pacakges are listed here as variants. If a
@@ -71,6 +74,11 @@ class SpiralSoftware(CMakePackage):
src = join_path(pkg_prefix, "namespaces", "packages", pkg)
install_tree(src, dest)
+ def flag_handler(self, name, flags):
+ if name == "cflags" and self.spec.satisfies("%oneapi"):
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
+
def install(self, spec, prefix):
with working_dir(self.stage.source_path):
files = ("LICENSE", "README.md", "ReleaseNotes.md", "Contributing.md")
diff --git a/var/spack/repos/builtin/packages/spla/package.py b/var/spack/repos/builtin/packages/spla/package.py
index 37eaba4bca..bd81ac3b0a 100644
--- a/var/spack/repos/builtin/packages/spla/package.py
+++ b/var/spack/repos/builtin/packages/spla/package.py
@@ -19,6 +19,8 @@ class Spla(CMakePackage):
license("BSD-3-Clause")
+ version("1.6.1", sha256="62b51e6ce05c41cfc1c6f6600410f9549a209c50f0331e1db41047f94493e02f")
+ version("1.6.0", sha256="917c24e2a768499967eba47b2cc2475df9fabee327b7821d24970b6a08055c09")
version("1.5.5", sha256="bc0c366e228344b1b2df55b9ce750d73c1165380e512da5a04d471db126d66ce")
version("1.5.4", sha256="de30e427d24c741e2e4fcae3d7668162056ac2574afed6522c0bb49d6f1d0f79")
version("1.5.3", sha256="527c06e316ce46ec87309a16bfa4138b1abad23fd276fe789c78a2de84f05637")
@@ -35,7 +37,11 @@ class Spla(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
- variant("openmp", default=True, description="Build with OpenMP support")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("openmp", default=True, when="@:1.5.5", description="Build with OpenMP support")
variant("static", default=False, description="Build as static library")
variant("cuda", default=False, description="CUDA backend")
variant("rocm", default=False, description="ROCm backend")
@@ -51,46 +57,57 @@ class Spla(CMakePackage):
depends_on("mpi")
depends_on("blas")
depends_on("cmake@3.10:", type="build")
+ depends_on("cmake@3.18:", type="build", when="@1.6.0:")
depends_on("cuda", when="+cuda")
- depends_on("rocblas", when="+rocm")
+ depends_on("cuda@11:", when="@1.6.0: +cuda")
+
depends_on("hip", when="+rocm")
+ depends_on("rocblas", when="+rocm")
+ conflicts("^rocblas@6.0.0:", when="@:1.5.5 +rocm")
+ conflicts("^hip@6.0.0:", when="@:1.6.0 +rocm") # v1.6.1 includes fix for hip 6.0
# Propagate openmp to blas
- depends_on("openblas threads=openmp", when="+openmp ^openblas")
- depends_on("amdblis threads=openmp", when="+openmp ^amdblis")
- depends_on("blis threads=openmp", when="+openmp ^blis")
- depends_on("intel-mkl threads=openmp", when="+openmp ^intel-mkl")
+ depends_on("openblas threads=openmp", when="+openmp ^[virtuals=blas] openblas")
+ depends_on("amdblis threads=openmp", when="+openmp ^[virtuals=blas] amdblis")
+ depends_on("blis threads=openmp", when="+openmp ^[virtuals=blas] blis")
+ depends_on("intel-mkl threads=openmp", when="+openmp ^[virtuals=blas] intel-mkl")
# Fix CMake find module for AMD BLIS,
# which uses a different library name for the multi-threaded version
patch("0001-amd_blis.patch", when="@1.3.0:1.4.0 ^amdblis")
def cmake_args(self):
+ spec = self.spec
+
args = [
- self.define_from_variant("SPLA_OMP", "openmp"),
self.define_from_variant("SPLA_FORTRAN", "fortran"),
self.define_from_variant("SPLA_STATIC", "static"),
]
- if "+cuda" in self.spec:
+ if "+cuda" in spec:
args += ["-DSPLA_GPU_BACKEND=CUDA"]
- elif "+rocm" in self.spec:
+ elif "+rocm" in spec:
args += ["-DSPLA_GPU_BACKEND=ROCM"]
else:
args += ["-DSPLA_GPU_BACKEND=OFF"]
- if self.spec["blas"].name == "openblas":
- args += ["-DSPLA_HOST_BLAS=OPENBLAS"]
- elif self.spec["blas"].name in ["amdblis", "blis"]:
- args += ["-DSPLA_HOST_BLAS=BLIS"]
- elif self.spec["blas"].name == "atlas":
- args += ["-DSPLA_HOST_BLAS=ATLAS"]
- elif self.spec["blas"].name == "intel-mkl":
- args += ["-DSPLA_HOST_BLAS=MKL"]
- elif self.spec["blas"].name == "netlib-lapack":
- args += ["-DSPLA_HOST_BLAS=GENERIC"]
- elif self.spec["blas"].name == "cray-libsci":
- args += ["-DSPLA_HOST_BLAS=CRAY_LIBSCI"]
+ # v1.6.0: No longer has custom BLAS detection and only uses the FindBLAS CMake module.
+ if spec.satisfies("@:1.5.5"):
+ args += [self.define_from_variant("SPLA_OMP", "openmp")]
+ if spec["blas"].name == "openblas":
+ args += ["-DSPLA_HOST_BLAS=OPENBLAS"]
+ elif spec["blas"].name in ["amdblis", "blis"]:
+ args += ["-DSPLA_HOST_BLAS=BLIS"]
+ elif spec["blas"].name == "atlas":
+ args += ["-DSPLA_HOST_BLAS=ATLAS"]
+ elif spec["blas"].name == "intel-mkl":
+ args += ["-DSPLA_HOST_BLAS=MKL"]
+ elif spec["blas"].name == "netlib-lapack":
+ args += ["-DSPLA_HOST_BLAS=GENERIC"]
+ elif spec["blas"].name == "cray-libsci":
+ args += ["-DSPLA_HOST_BLAS=CRAY_LIBSCI"]
+ else:
+ args += [self.define("BLAS_LIBRARIES", spec["blas"].libs.joined(";"))]
return args
diff --git a/var/spack/repos/builtin/packages/spot/package.py b/var/spack/repos/builtin/packages/spot/package.py
index d5aa234e98..776e744bdf 100644
--- a/var/spack/repos/builtin/packages/spot/package.py
+++ b/var/spack/repos/builtin/packages/spot/package.py
@@ -16,12 +16,17 @@ class Spot(AutotoolsPackage):
license("MIT")
+ version("2.12", sha256="26ba076ad57ec73d2fae5482d53e16da95c47822707647e784d8c7cec0d10455")
+ version("2.11.6", sha256="a692794f89c0db3956ba5919bdd5313e372e0de34000a9022f29e1c6e91c538a")
version("2.11.5", sha256="3acfd5cd112d00576ac234baeb34e1c6adf8c03155d4cda973e6317ac8bd1774")
version("2.11.4", sha256="91ecac6202819ea1de4534902ce457ec6eec0573d730584d6494d06b0bcaa0b4")
version("2.9.4", sha256="e11208323baabe9b5f98098d4b9bb39803fb102a68abbbaf900f1fcd578f0f85")
version("1.99.3", sha256="86964af559994af4451a8dca663a9e1db6e869ed60e747ab60ce72dddc31b61b")
version("1.2.6", sha256="360678c75f6741f697e8e56cdbc9937f104eb723a839c3629f0dc5dc6de11bfc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Enable python API")
depends_on("python@3.3:", when="@1.99.5: +python")
diff --git a/var/spack/repos/builtin/packages/sprng/package.py b/var/spack/repos/builtin/packages/sprng/package.py
index 4c014a3b8a..44d871a009 100644
--- a/var/spack/repos/builtin/packages/sprng/package.py
+++ b/var/spack/repos/builtin/packages/sprng/package.py
@@ -22,6 +22,10 @@ class Sprng(AutotoolsPackage):
version("5.0", sha256="9172a495472cc24893e7489ce9b5654300dc60cba4430e436ce50d28eb749a66")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
variant("fortran", default=False, description="Enable Fortran support")
diff --git a/var/spack/repos/builtin/packages/sqlcipher/package.py b/var/spack/repos/builtin/packages/sqlcipher/package.py
index 52887ccff0..221393e1b6 100644
--- a/var/spack/repos/builtin/packages/sqlcipher/package.py
+++ b/var/spack/repos/builtin/packages/sqlcipher/package.py
@@ -18,14 +18,21 @@ class Sqlcipher(AutotoolsPackage):
license("BSD-3-Clause")
- version("4.4.1", sha256="a36ed7c879a5e9af1054942201c75fc56f1db22e46bf6c2bbae3975dfeb6782d")
- version("4.4.0", sha256="0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148")
- version("4.3.0", sha256="fccb37e440ada898902b294d02cde7af9e8706b185d77ed9f6f4d5b18b4c305f")
- version("4.2.0", sha256="105c1b813f848da038c03647a8bfc9d42fb46865e6aaf4edfd46ff3b18cdccfc")
- version("4.1.0", sha256="65144ca3ba4c0f9cd4bae8c20bb42f2b84424bf29d1ebcf04c44a728903b1faa")
- version("4.0.1", sha256="2f803017378c7479cb791be59b7bad8392a15acddbcc094e4433581fe421f4ca")
- version("4.0.0", sha256="c8f5fc6d800aae6107bf23900144804db5510c2676c93fbb269e4a0700837d68")
- version("3.4.2", sha256="69897a5167f34e8a84c7069f1b283aba88cdfa8ec183165c4a5da2c816cfaadb")
+ version("4.6.1", sha256="d8f9afcbc2f4b55e316ca4ada4425daf3d0b4aab25f45e11a802ae422b9f53a3")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2021-3119
+ version("4.4.1", sha256="a36ed7c879a5e9af1054942201c75fc56f1db22e46bf6c2bbae3975dfeb6782d")
+ version("4.4.0", sha256="0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148")
+ version("4.3.0", sha256="fccb37e440ada898902b294d02cde7af9e8706b185d77ed9f6f4d5b18b4c305f")
+ version("4.2.0", sha256="105c1b813f848da038c03647a8bfc9d42fb46865e6aaf4edfd46ff3b18cdccfc")
+ version("4.1.0", sha256="65144ca3ba4c0f9cd4bae8c20bb42f2b84424bf29d1ebcf04c44a728903b1faa")
+ version("4.0.1", sha256="2f803017378c7479cb791be59b7bad8392a15acddbcc094e4433581fe421f4ca")
+ version("4.0.0", sha256="c8f5fc6d800aae6107bf23900144804db5510c2676c93fbb269e4a0700837d68")
+ # strictly, 3.4.2 is not affected by any CVEs
+ version("3.4.2", sha256="69897a5167f34e8a84c7069f1b283aba88cdfa8ec183165c4a5da2c816cfaadb")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("openssl")
depends_on("tcl", type=["build"])
diff --git a/var/spack/repos/builtin/packages/sqlite-jdbc/package.py b/var/spack/repos/builtin/packages/sqlite-jdbc/package.py
index b39bdea894..a403288030 100644
--- a/var/spack/repos/builtin/packages/sqlite-jdbc/package.py
+++ b/var/spack/repos/builtin/packages/sqlite-jdbc/package.py
@@ -18,3 +18,5 @@ class SqliteJdbc(MavenPackage):
version("3.32.3.2", sha256="9168ad02cb8b01449271eabd8a2a81461954c2c3fa854d3828a37dc07a1fefec")
version("3.32.3.1", sha256="455e2a009101ede40f9510cf2c34e76f30d411f290957bfd9296da12d6e06591")
version("3.32.3", sha256="19725caa4742960d385472a6094b8164bb8f29e816f04b830fa65c56517b4564")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py
index f95e12f9ee..ef8840ea7a 100644
--- a/var/spack/repos/builtin/packages/sqlite/package.py
+++ b/var/spack/repos/builtin/packages/sqlite/package.py
@@ -4,21 +4,31 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
+import sys
from tempfile import NamedTemporaryFile
+import spack.build_systems.autotools
+import spack.build_systems.nmake
import spack.platforms
from spack.package import *
+is_windows = sys.platform == "win32"
-class Sqlite(AutotoolsPackage):
+
+class Sqlite(AutotoolsPackage, NMakePackage):
"""SQLite is a C-language library that implements a small, fast,
self-contained, high-reliability, full-featured, SQL database engine.
"""
homepage = "https://www.sqlite.org"
+ tags = ["windows"]
license("blessing")
+ version("3.46.0", sha256="6f8e6a7b335273748816f9b3b62bbdc372a889de8782d7f048c653a447417a7d")
+ version("3.45.3", sha256="b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531")
+ version("3.45.1", sha256="cd9c27841b7a5932c9897651e20b86c701dd740556989b01ca596fcfa3d49a0a")
+ version("3.44.2", sha256="1c6719a148bc41cf0f2bbbe3926d7ce3f5ca09d878f1246fcc20767b175bb407")
version("3.43.2", sha256="6d422b6f62c4de2ca80d61860e3a3fb693554d2f75bb1aaca743ccc4d6f609f0")
version("3.42.0", sha256="7abcfd161c6e2742ca5c6c0895d1f853c940f203304a0b49da4e1eca5d088ca6")
version("3.40.1", sha256="2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9")
@@ -46,23 +56,43 @@ class Sqlite(AutotoolsPackage):
version("3.27.1", sha256="54a92b8ff73ff6181f89b9b0c08949119b99e8cccef93dbef90e852a8b10f4f8")
version("3.27.0", sha256="dbfb0fb4fc32569fa427d3658e888f5e3b84a0952f706ccab1fd7c62a54f10f0")
version("3.26.0", sha256="5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d")
+
+ depends_on("c", type="build") # generated
# All versions prior to 3.26.0 are vulnerable to Magellan when FTS
# is enabled, see https://blade.tencent.com/magellan/index_en.html
+ # no hard readline dep on Windows + no variant support, makefile has minimal to no options
+ for plat in ["linux", "darwin", "freebsd"]:
+ variant(
+ "column_metadata",
+ default=True,
+ description="Build with COLUMN_METADATA",
+ when=f"platform={plat}",
+ )
+ variant(
+ "dynamic_extensions",
+ default=True,
+ description="Support loadable extensions",
+ when=f"platform={plat}",
+ )
+
+ depends_on("readline", when=f"platform={plat}")
+
+ variant("fts", default=True, description="Include fts4 and fts5 support")
+
+ # functions variant is always available on Windows platform, otherwise is tied
+ # to +dynamic_extensions
+ function_condition = "platform=windows" if is_windows else "+dynamic_extensions"
variant(
"functions",
- default=False,
- when="+dynamic_extensions",
+ default=is_windows,
description="Provide mathematical and string extension functions for SQL "
"queries using the loadable extensions mechanism",
+ when=f"{function_condition}",
)
- variant("fts", default=True, description="Include fts4 and fts5 support")
- variant("column_metadata", default=True, description="Build with COLUMN_METADATA")
- variant("dynamic_extensions", default=True, description="Support loadable extensions")
variant("rtree", default=True, description="Build with Rtree module")
-
- depends_on("readline")
depends_on("zlib-api")
+ depends_on("tcl", when="platform=windows")
# See https://blade.tencent.com/magellan/index_en.html
conflicts("+fts", when="@:3.25")
@@ -89,6 +119,10 @@ class Sqlite(AutotoolsPackage):
# compiler is used.
patch("remove_overflow_builtins.patch", when="@3.17.0:3.20%intel")
+ patch("quote_compiler_in_makefile.patch", when="platform=windows")
+
+ build_system("autotools", "nmake")
+
executables = ["^sqlite3$"]
@classmethod
@@ -152,11 +186,13 @@ class Sqlite(AutotoolsPackage):
return all_variants
def url_for_version(self, version):
- full_version = list(version.version) + [0 * (4 - len(version.version))]
- version_string = str(full_version[0]) + "".join(["%02d" % v for v in full_version[1:]])
+ if len(version) < 3:
+ raise ValueError(f"Unsupported sqlite version: {version}")
# See https://www.sqlite.org/chronology.html for version -> year
# correspondence.
- if version >= Version("3.41.0"):
+ if version >= Version("3.45.0"):
+ year = "2024"
+ elif version >= Version("3.41.0"):
year = "2023"
elif version >= Version("3.37.2"):
year = "2022"
@@ -179,17 +215,42 @@ class Sqlite(AutotoolsPackage):
elif version >= Version("3.7.16"):
year = "2013"
else:
- raise ValueError("Unsupported version {0}".format(version))
- return "https://www.sqlite.org/{0}/sqlite-autoconf-{1}.tar.gz".format(year, version_string)
+ raise ValueError(f"Unsupported sqlite version {version}")
+ return f"https://www.sqlite.org/{year}/sqlite-autoconf-{version[0]}{version[1]:02}{version[2]:02}00.tar.gz"
@property
def libs(self):
- return find_libraries("libsqlite3", root=self.prefix.lib)
+ prefix = "lib" if sys.platform != "win32" else ""
+ return find_libraries(f"{prefix}sqlite3", root=self.prefix.lib, runtime=False)
- def get_arch(self):
- host_platform = spack.platforms.host()
- return str(host_platform.target("default_target"))
+ def test_example(self):
+ """check example table dump"""
+
+ test_data_dir = self.test_suite.current_test_data_dir
+ db_filename = test_data_dir.join("packages.db")
+ # Ensure the database only contains one table
+ sqlite3 = which(self.prefix.bin.sqlite3)
+ out = sqlite3(db_filename, ".tables", output=str.split, error=str.split)
+ assert "packages" in out
+
+ # Ensure the database dump matches expectations, where special
+ # characters are replaced with spaces in the expected and actual
+ # output to avoid pattern errors.
+ expected = get_escaped_text_output(test_data_dir.join("dump.out"))
+ out = sqlite3(db_filename, ".dump", output=str.split, error=str.split)
+ check_outputs(expected, out)
+
+ def test_version(self):
+ """ensure version is expected"""
+ vers_str = str(self.spec.version)
+
+ sqlite3 = which(self.prefix.bin.sqlite3)
+ out = sqlite3("-version", output=str.split, error=str.split)
+ assert vers_str in out
+
+
+class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):
args = []
@@ -211,13 +272,17 @@ class Sqlite(AutotoolsPackage):
return args
+ def get_arch(self):
+ host_platform = spack.platforms.host()
+ return str(host_platform.target("default_target"))
+
@run_after("install")
def build_libsqlitefunctions(self):
if "+functions" in self.spec:
libraryname = "libsqlitefunctions." + dso_suffix
cc = Executable(spack_cc)
cc(
- self.compiler.cc_pic_flag,
+ self.pkg.compiler.cc_pic_flag,
"-lm",
"-shared",
"extension-functions.c",
@@ -226,28 +291,39 @@ class Sqlite(AutotoolsPackage):
)
install(libraryname, self.prefix.lib)
- def test_example(self):
- """check example table dump"""
-
- test_data_dir = self.test_suite.current_test_data_dir
- db_filename = test_data_dir.join("packages.db")
- # Ensure the database only contains one table
- sqlite3 = which(self.prefix.bin.sqlite3)
- out = sqlite3(db_filename, ".tables", output=str.split, error=str.split)
- assert "packages" in out
-
- # Ensure the database dump matches expectations, where special
- # characters are replaced with spaces in the expected and actual
- # output to avoid pattern errors.
- expected = get_escaped_text_output(test_data_dir.join("dump.out"))
- out = sqlite3(db_filename, ".dump", output=str.split, error=str.split)
- check_outputs(expected, out)
-
- def test_version(self):
- """ensure version is expected"""
- vers_str = str(self.spec.version)
-
- sqlite3 = which(self.prefix.bin.sqlite3)
- out = sqlite3("-version", output=str.split, error=str.split)
- assert vers_str in out
+class NMakeBuilder(spack.build_systems.nmake.NMakeBuilder):
+ @property
+ def makefile_name(self):
+ return "Makefile.msc"
+
+ def nmake_args(self):
+ enable_fts = "1" if "+fts" in self.spec else "0"
+ enable_rtree = "1" if "+rtree" in self.spec else "0"
+ enable_functions = "1" if "+functions" in self.spec else "0"
+
+ opts = (
+ "OPTS="
+ f"-DSQLITE_ENABLE_FTS3={enable_fts} "
+ f"-DSQLITE_ENABLE_FTS4={enable_fts} "
+ f"-DSQLITE_ENABLE_FTS5={enable_fts} "
+ f"-DSQLITE_ENABLE_RTREE={enable_rtree} "
+ "-DSQLITE_ENABLE_JSON1=1 "
+ "-DSQLITE_ENABLE_GEOPOLY=1 "
+ "-DSQLITE_ENABLE_SESSION=1 "
+ "-DSQLITE_ENABLE_PREUPDATE_HOOK=1 "
+ "-DSQLITE_ENABLE_SERIALIZE=1 "
+ f"-DSQLITE_ENABLE_MATH_FUNCTIONS={enable_functions}"
+ )
+
+ return ["USE_NATIVE_LIBPATHS=1", "DYNAMIC_SHELL=1", opts]
+
+ def install(self, pkg, spec, prefix):
+ with working_dir(self.build_directory):
+ mkdirp(prefix.include)
+ mkdirp(prefix.lib)
+ mkdirp(prefix.bin)
+ install(f"{self.build_directory}\\*.exe", prefix.bin)
+ install(f"{self.build_directory}\\*.dll", prefix.bin)
+ install(f"{self.build_directory}\\*.lib", prefix.lib)
+ install(f"{self.build_directory}\\*.h", prefix.include)
diff --git a/var/spack/repos/builtin/packages/sqlite/quote_compiler_in_makefile.patch b/var/spack/repos/builtin/packages/sqlite/quote_compiler_in_makefile.patch
new file mode 100644
index 0000000000..3f2ad4656c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sqlite/quote_compiler_in_makefile.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.msc b/Makefile.msc
+index 95f0eee0d..8fc173e98 100644
+--- a/Makefile.msc
++++ b/Makefile.msc
+@@ -441,6 +441,8 @@ PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
+ #
+ !IFNDEF CC
+ CC = cl.exe
++!ELSE
++CC = "$(CC)"
+ !ENDIF
+
+ # Check for the predefined command macro CSC. This should point to a working
diff --git a/var/spack/repos/builtin/packages/sqlitebrowser/package.py b/var/spack/repos/builtin/packages/sqlitebrowser/package.py
index 1b23b7f7d4..bd5c82f0e5 100644
--- a/var/spack/repos/builtin/packages/sqlitebrowser/package.py
+++ b/var/spack/repos/builtin/packages/sqlitebrowser/package.py
@@ -19,6 +19,9 @@ class Sqlitebrowser(CMakePackage):
version("3.12.2", sha256="645f98d38e5d128a449e93cebf03c8070f9eacd2d16b10e433a781d54a9d478a")
version("3.10.1", sha256="36eb53bc75192c687dce298c79f1532c410ce4ecbeeacfb07b9d02a307f16bef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
msg = "sqlitebrowser requires C++11 support"
conflicts("%gcc@:4.8.0", msg=msg)
conflicts("%apple-clang@:3.9", msg=msg)
diff --git a/var/spack/repos/builtin/packages/squashfs-mount/package.py b/var/spack/repos/builtin/packages/squashfs-mount/package.py
index b90f3f5a6d..e1f9deb295 100644
--- a/var/spack/repos/builtin/packages/squashfs-mount/package.py
+++ b/var/spack/repos/builtin/packages/squashfs-mount/package.py
@@ -20,6 +20,8 @@ class SquashfsMount(MakefilePackage):
version("0.4.0", sha256="0b17c797b4befdab172fc58a74f3b647bbdf127ff5bdaf7c21d907b7a9714339")
version("0.1.0", sha256="37841ede7a7486d437fd06ae13e432560f81806f69addc72cfc8e564c8727bc6")
+ depends_on("c", type="build") # generated
+
variant("suid", default=False, description="Make squashfs-mount a suid executable")
depends_on("util-linux", type="link")
diff --git a/var/spack/repos/builtin/packages/squashfs/package.py b/var/spack/repos/builtin/packages/squashfs/package.py
index 73d37fab5b..595da9a5cb 100644
--- a/var/spack/repos/builtin/packages/squashfs/package.py
+++ b/var/spack/repos/builtin/packages/squashfs/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Squashfs(MakefilePackage):
"""Squashfs - read only compressed filesystem"""
- homepage = "http://squashfs.sourceforge.net"
+ homepage = "https://squashfs.sourceforge.net"
url = "https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.3/squashfs4.3.tar.gz"
license("GPL-2.0-or-later")
@@ -52,6 +52,8 @@ class Squashfs(MakefilePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
variant("gzip", default=True, description="Enable gzip compression support")
variant("lz4", default=False, description="Enable LZ4 compression support")
variant("lzo", default=False, description="Enable LZO compression support")
diff --git a/var/spack/repos/builtin/packages/squashfuse/package.py b/var/spack/repos/builtin/packages/squashfuse/package.py
index 89461c45d3..39b5e4f60a 100644
--- a/var/spack/repos/builtin/packages/squashfuse/package.py
+++ b/var/spack/repos/builtin/packages/squashfuse/package.py
@@ -18,10 +18,21 @@ class Squashfuse(AutotoolsPackage):
license("BSD-2-Clause")
version("master", branch="master")
+ version("0.5.2", sha256="54e4baaa20796e86a214a1f62bab07c7c361fb7a598375576d585712691178f5")
+ version("0.5.1", sha256="4dd81ea10323078193e5435ad8481b59f3ac8539648ddc732bcaea50b13966c9")
version("0.5.0", sha256="d7602c7a3b1d0512764547d27cb8cc99d1b21181e1c9819e76461ee96c2ab4d9")
+ version("0.4.0", sha256="646e31449b7914d2404933aea88f8d5f72c5d135d7deae3370ccb394c40d114a")
+ version("0.2.0", sha256="e8eea1b013b41d0a320e5a07b131bc70df14e6b3f2d3a849bdee66d100186f4f")
+ version(
+ "0.1.105",
+ sha256="3f776892ab2044ecca417be348e482fee2839db75e35d165b53737cb8153ab1e",
+ url="https://github.com/vasi/squashfuse/archive/refs/tags/0.1.105.tar.gz",
+ )
version("0.1.104", sha256="aa52460559e0d0b1753f6b1af5c68cfb777ca5a13913285e93f4f9b7aa894b3a")
version("0.1.103", sha256="42d4dfd17ed186745117cfd427023eb81effff3832bab09067823492b6b982e7")
+ depends_on("c", type="build") # generated
+
variant("shared", default=True, description="Enable shared libraries")
variant("static", default=True, description="Enable static libraries")
variant("min_size", default=False, description="Build small binaries")
@@ -49,10 +60,10 @@ class Squashfuse(AutotoolsPackage):
depends_on("xz", when="+xz")
depends_on("zstd", when="+zstd")
- depends_on("m4", type="build", when="@master")
- depends_on("autoconf", type="build", when="@master")
- depends_on("automake", type="build", when="@master")
- depends_on("libtool", type="build", when="@master")
+ depends_on("m4", type="build", when="@0.1.105,master")
+ depends_on("autoconf", type="build", when="@0.1.105,master")
+ depends_on("automake", type="build", when="@0.1.105,master")
+ depends_on("libtool", type="build", when="@0.1.105,master")
def flag_handler(self, name, flags):
if name == "cflags" and "+min_size" in self.spec:
diff --git a/var/spack/repos/builtin/packages/squid/package.py b/var/spack/repos/builtin/packages/squid/package.py
index 87b89b5322..b54a346e27 100644
--- a/var/spack/repos/builtin/packages/squid/package.py
+++ b/var/spack/repos/builtin/packages/squid/package.py
@@ -15,3 +15,5 @@ class Squid(AutotoolsPackage):
license("GPL-2.0-or-later")
version("1.9g", sha256="302f42e8794aa4dbcfa0996c14fb7a70a7c4397fc45c2bbd2748055460d8dca7")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/sra-tools/package.py b/var/spack/repos/builtin/packages/sra-tools/package.py
index 19461f17d4..7ae214e1da 100644
--- a/var/spack/repos/builtin/packages/sra-tools/package.py
+++ b/var/spack/repos/builtin/packages/sra-tools/package.py
@@ -16,6 +16,9 @@ class SraTools(CMakePackage):
version("3.0.3", tag="3.0.3", commit="01f0aa21bb20b84c68ea34404d43da680811e27a")
version("3.0.0", tag="3.0.0", commit="bd2053a1049e64207e75f4395fd1be7f1572a5aa")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("openjdk")
depends_on("flex@2.6:")
depends_on("libxml2")
diff --git a/var/spack/repos/builtin/packages/srcml-identifier-getter-tool/package.py b/var/spack/repos/builtin/packages/srcml-identifier-getter-tool/package.py
index 4dcf19637b..ec2225bc84 100644
--- a/var/spack/repos/builtin/packages/srcml-identifier-getter-tool/package.py
+++ b/var/spack/repos/builtin/packages/srcml-identifier-getter-tool/package.py
@@ -16,6 +16,8 @@ class SrcmlIdentifierGetterTool(CMakePackage):
version("2022-10-17", commit="01394c247ae6f61cc5864a9697e72e3623d8e7fb", submodules=True)
+ depends_on("cxx", type="build") # generated
+
depends_on("libxml2")
depends_on("zlib-api")
depends_on("lzma")
diff --git a/var/spack/repos/builtin/packages/srcml/package.py b/var/spack/repos/builtin/packages/srcml/package.py
index ceae7cb7de..c7030d413b 100644
--- a/var/spack/repos/builtin/packages/srcml/package.py
+++ b/var/spack/repos/builtin/packages/srcml/package.py
@@ -23,6 +23,9 @@ class Srcml(CMakePackage):
version("1.0.0", sha256="3ddf33271c3b3953d5e3ecbb14c4f925fc0e609a81250d921d3516537dcffae2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.14:", type="build")
depends_on("antlr+cxx+java+pic")
depends_on("libxslt")
diff --git a/var/spack/repos/builtin/packages/srm-ifce/package.py b/var/spack/repos/builtin/packages/srm-ifce/package.py
new file mode 100644
index 0000000000..64be41841d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/srm-ifce/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 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.package import *
+
+
+class SrmIfce(CMakePackage):
+ """Client side implementation of the SRMv2 specification."""
+
+ homepage = "https://dmc-docs.web.cern.ch/dmc-docs/srm-ifce.html"
+ url = "https://github.com/cern-fts/srm-ifce/archive/refs/tags/v1.24.4.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("1.24.4", sha256="1a4b937e4ecf04e34106eb4652e18beb3e6fc81ba9c815f6d9b21e07a8a12b1e")
+
+ depends_on("c", type="build")
+
+ depends_on("glib")
+ depends_on("gsoap")
+ depends_on("cgsi-gsoap")
+ depends_on("globus-common")
+ depends_on("globus-gsi-cert-utils")
+ depends_on("globus-gsi-credential")
+ depends_on("globus-gss-assist")
+ depends_on("globus-gssapi-gsi")
+ depends_on("globus-openssl-module")
+ depends_on("openssl")
+
+ def cmake_args(self):
+ args = [
+ self.define("UNIT_TESTS", self.run_tests),
+ self.define("CGSI_GSOAP_LOCATION", self.spec["cgsi-gsoap"].prefix.lib64),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/sse2neon/package.py b/var/spack/repos/builtin/packages/sse2neon/package.py
index 9ac1f23a12..4535f5a3db 100644
--- a/var/spack/repos/builtin/packages/sse2neon/package.py
+++ b/var/spack/repos/builtin/packages/sse2neon/package.py
@@ -18,10 +18,13 @@ class Sse2neon(Package):
license("MIT")
version("master", branch="master")
+ version("1.7.0", sha256="cee6d54922dbc9d4fa57749e3e4b46161b7f435a22e592db9da008051806812a")
version("1.6.0", sha256="06f4693219deccb91b457135d836fc514a1c0a57e9fa66b143982901d2d19677")
version("1.5.1", sha256="4001e2dfb14fcf3831211581ed83bcc83cf6a3a69f638dcbaa899044a351bb2a")
version("1.5.0", sha256="92ab852aac6c8726a615f77438f2aa340f168f9f6e70c72033d678613e97b65a")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.include)
install("*.h", prefix.include)
diff --git a/var/spack/repos/builtin/packages/sshfs/package.py b/var/spack/repos/builtin/packages/sshfs/package.py
index 36dc287f87..ff85c91371 100644
--- a/var/spack/repos/builtin/packages/sshfs/package.py
+++ b/var/spack/repos/builtin/packages/sshfs/package.py
@@ -19,6 +19,8 @@ class Sshfs(MesonPackage):
version("3.7.1", sha256="fe5d3436d61b46974889e0c4515899c21a9d67851e3793c209989f72353d7750")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("fuse@3.1.0:")
diff --git a/var/spack/repos/builtin/packages/sshpass/package.py b/var/spack/repos/builtin/packages/sshpass/package.py
index bd8250dc6f..989ddcd40d 100644
--- a/var/spack/repos/builtin/packages/sshpass/package.py
+++ b/var/spack/repos/builtin/packages/sshpass/package.py
@@ -25,6 +25,8 @@ class Sshpass(AutotoolsPackage):
version("1.01", sha256="e2adc378d61b72e63b4381fe123de3c63bd4093c9553d3219e83878f379754f4")
version("1.00", sha256="71d4be85a464a8ce2ae308bc04dcb342918f3989b6a81c74217b5df7f11471f8")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/ssht/package.py b/var/spack/repos/builtin/packages/ssht/package.py
index d71bfab09f..76bb77cfcb 100644
--- a/var/spack/repos/builtin/packages/ssht/package.py
+++ b/var/spack/repos/builtin/packages/ssht/package.py
@@ -34,6 +34,9 @@ class Ssht(CMakePackage):
version("1.3.3", sha256="1f3b89e29d89fa79170b9979046a55c81b588d9dd563fd36f37887495b71dd28")
version("1.3.2", sha256="6cb3b6f94fb90dff45ba59da30a8ccd9667d8e319bed437f19d2287f59e35dd1")
version("1.3.0", sha256="9e2c220a70d662714ff601a121b674c8423866058279e000cbbee532d31dd3c9")
+
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
# version('1.2b1', commit='7378ce8853897cbd1b08adebf7ec088c1e40f860')
depends_on("fftw @3.0.0:")
diff --git a/var/spack/repos/builtin/packages/ssmtp/package.py b/var/spack/repos/builtin/packages/ssmtp/package.py
index 282a35146a..24bc2d0bc0 100644
--- a/var/spack/repos/builtin/packages/ssmtp/package.py
+++ b/var/spack/repos/builtin/packages/ssmtp/package.py
@@ -17,6 +17,8 @@ class Ssmtp(AutotoolsPackage):
version("2.64", sha256="22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36")
+ depends_on("c", type="build") # generated
+
variant("ssl", default=True, description="Enable support for secure connection to mail server")
variant("inet6", default=True, description="Enable support for IPv6 transport")
variant("md5auth", default=True, description="Enable support for MD5 authentication")
diff --git a/var/spack/repos/builtin/packages/sst-core/package.py b/var/spack/repos/builtin/packages/sst-core/package.py
index cc8931be35..a9fa676e16 100644
--- a/var/spack/repos/builtin/packages/sst-core/package.py
+++ b/var/spack/repos/builtin/packages/sst-core/package.py
@@ -14,12 +14,14 @@ class SstCore(AutotoolsPackage):
homepage = "https://github.com/sstsimulator"
git = "https://github.com/sstsimulator/sst-core.git"
- url = "https://github.com/sstsimulator/sst-core/releases/download/v13.1.0_Final/sstcore-13.1.0.tar.gz"
+ url = "https://github.com/sstsimulator/sst-core/releases/download/v14.1.0_Final/sstcore-14.1.0.tar.gz"
maintainers("berquist", "naromero77")
license("BSD-3-Clause")
+ version("14.1.0", sha256="9d17c37d1ebdff8d8eb10ab0084eb901c78a7c5a76db15189e3d7fc318fd6f9d")
+ version("14.0.0", sha256="fadc7ee99472ff3ac5d4b3f3e507123e32bd9fb89c4c6b48fbd2dca8aeb8b8d6")
version("13.1.0", sha256="0a44c62ee0b18a20a3cb089f4e0d43e293dc5adc6c3fa7639d40986cf5b9854c")
version("13.0.0", sha256="c9d868dcdd75d59bef7c73146709a3b2a52a78f0df5ec2c3dc9f21434c51d935")
version("12.1.0", sha256="f7530226643439678e2f4183ec4dbadf7750411bdaa44d9443887f81feb97574")
@@ -41,6 +43,8 @@ class SstCore(AutotoolsPackage):
version("develop", branch="devel")
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
variant(
"pdes_mpi",
default=True,
@@ -54,6 +58,13 @@ class SstCore(AutotoolsPackage):
)
variant("hdf5", default=False, description="Build support for HDF5 statistic output")
variant("zlib", default=False, description="Build support for ZLIB compression")
+ # Starting with 0bc4832f3f87aa78d1efd3e15743eb059dc03250 and then 14.0.0.
+ variant(
+ "curses",
+ default=True,
+ when="@develop,master",
+ description="Build support for interactive sst-info",
+ )
variant("trackevents", default=False, description="Enable event and activity tracking")
variant(
@@ -69,16 +80,19 @@ class SstCore(AutotoolsPackage):
depends_on("zoltan", when="+zoltan")
depends_on("hdf5", when="+hdf5")
depends_on("zlib-api", when="+zlib")
-
- depends_on("autoconf@1.68:", type="build")
- depends_on("automake@1.11.1:", type="build")
- depends_on("libtool@1.2.4:", type="build")
- depends_on("m4", type="build", when="@master:")
depends_on("gettext")
+ depends_on("ncurses", when="+curses")
+
+ for version_name in ("master", "develop"):
+ depends_on("autoconf@1.68:", type="build", when="@{}".format(version_name))
+ depends_on("automake@1.11.1:", type="build", when="@{}".format(version_name))
+ depends_on("libtool@1.2.4:", type="build", when="@{}".format(version_name))
+ depends_on("m4", type="build", when="@{}".format(version_name))
# force out-of-source builds
build_directory = "spack-build"
+ @when("@develop,master")
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("autogen.sh")
@@ -91,6 +105,8 @@ class SstCore(AutotoolsPackage):
args.append("--with-hdf5=%s" % self.spec["hdf5"].prefix)
if "+zlib" in self.spec:
args.append("--with-zlib=%s" % self.spec["zlib-api"].prefix)
+ if "+curses" in self.spec:
+ args.append("--with-curses={}".format(self.spec["ncurses"].prefix))
if "+pdes_mpi" in self.spec:
args.append("--enable-mpi")
diff --git a/var/spack/repos/builtin/packages/sst-dumpi/package.py b/var/spack/repos/builtin/packages/sst-dumpi/package.py
index c53e0cd977..f796e33e3e 100644
--- a/var/spack/repos/builtin/packages/sst-dumpi/package.py
+++ b/var/spack/repos/builtin/packages/sst-dumpi/package.py
@@ -14,7 +14,7 @@ class SstDumpi(AutotoolsPackage):
information, and PAPI counters.
"""
- homepage = "http://sst.sandia.gov/about_dumpi.html"
+ homepage = "https://github.com/sstsimulator/sst-dumpi"
url = "https://github.com/sstsimulator/sst-dumpi/archive/refs/tags/v13.0.0_Final.tar.gz"
git = "https://github.com/sstsimulator/sst-dumpi.git"
@@ -30,6 +30,10 @@ class SstDumpi(AutotoolsPackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf@1.68:", type="build")
depends_on("automake@1.11.1:", type="build")
depends_on("libtool@1.2.4:", type="build")
diff --git a/var/spack/repos/builtin/packages/sst-elements/package.py b/var/spack/repos/builtin/packages/sst-elements/package.py
index be4125fb9c..35eaa739f1 100644
--- a/var/spack/repos/builtin/packages/sst-elements/package.py
+++ b/var/spack/repos/builtin/packages/sst-elements/package.py
@@ -14,12 +14,14 @@ class SstElements(AutotoolsPackage):
homepage = "https://github.com/sstsimulator"
git = "https://github.com/sstsimulator/sst-elements.git"
- url = "https://github.com/sstsimulator/sst-elements/releases/download/v13.1.0_Final/sstelements-13.1.0.tar.gz"
+ url = "https://github.com/sstsimulator/sst-elements/releases/download/v14.1.0_Final/sstelements-14.1.0.tar.gz"
maintainers("berquist", "naromero77")
license("BSD-3-Clause")
+ version("14.1.0", sha256="433994065810d3afee4e355173e781cd76171043cce8835bbc40887672a33350")
+ version("14.0.0", sha256="68eab77febdd0138a497249d854e1cb0c3a67b1c56c4d51f1fe35df12dcd1b9c")
version("13.1.0", sha256="ebda6ee5af858192dff8a7faf3125010001d5c439beec22afe5b9828a74adf1a")
version("13.0.0", sha256="1f6f6b403a8c1b22a27cdf2943c9e505825ee14866891e7bc944d4471b7b0321")
version("12.1.0", sha256="77948cf8e1f8bf8d238d475cea111c9a72b307cbf403cb429ef0426d0cf708a4")
@@ -41,6 +43,10 @@ class SstElements(AutotoolsPackage):
version("develop", branch="devel")
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Contact SST developers (https://github.com/sstsimulator)
# if your use case requires support for:
# - balar
@@ -81,10 +87,11 @@ class SstElements(AutotoolsPackage):
depends_on("gettext")
depends_on("zlib-api")
- depends_on("autoconf@1.68:", type="build")
- depends_on("automake@1.11.1:", type="build")
- depends_on("libtool@1.2.4:", type="build")
- depends_on("m4", type="build")
+ for version_name in ("master", "develop"):
+ depends_on("autoconf@1.68:", type="build", when="@{}".format(version_name))
+ depends_on("automake@1.11.1:", type="build", when="@{}".format(version_name))
+ depends_on("libtool@1.2.4:", type="build", when="@{}".format(version_name))
+ depends_on("m4", type="build", when="@{}".format(version_name))
conflicts("+dumpi", msg="Dumpi not currently supported, contact SST Developers for help")
conflicts("+otf", msg="OTF not currently supported, contact SST Developers for help")
@@ -102,6 +109,7 @@ class SstElements(AutotoolsPackage):
# force out-of-source builds
build_directory = "spack-build"
+ @when("@develop,master")
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("autogen.sh")
diff --git a/var/spack/repos/builtin/packages/sst-macro/package.py b/var/spack/repos/builtin/packages/sst-macro/package.py
index 5cb45ec347..f5e57db7c0 100644
--- a/var/spack/repos/builtin/packages/sst-macro/package.py
+++ b/var/spack/repos/builtin/packages/sst-macro/package.py
@@ -17,10 +17,12 @@ class SstMacro(AutotoolsPackage):
homepage = "https://github.com/sstsimulator"
git = "https://github.com/sstsimulator/sst-macro.git"
- url = "https://github.com/sstsimulator/sst-macro/releases/download/v13.1.0_Final/sstmacro-13.1.0.tar.gz"
+ url = "https://github.com/sstsimulator/sst-macro/releases/download/v14.1.0_Final/sstmacro-14.1.0.tar.gz"
maintainers("berquist")
+ version("14.1.0", sha256="241f42f5c460b0e7462592a7f412bda9c9de19ad7a4b62c22f35be4093b57014")
+ version("14.0.0", sha256="3962942268dd9fe6ebd4462e2d6d305ab757f3f510487e84687146a8d461be13")
version("13.1.0", sha256="022e39daae1067b56c0011dbe87e3234fee4587049fd53671e1ed6b23233f70e")
version("13.0.0", sha256="410dad4ac0c7a4c0e16c54da308b6c6b631112af18ae2c37585c8a14472987d4")
version("12.1.0", sha256="ee57e08acfd4b6429a0500d981d468ee6ded2638ec5abec7b47f172388b267f1")
@@ -42,10 +44,15 @@ class SstMacro(AutotoolsPackage):
version("master", branch="master")
version("develop", branch="devel")
- depends_on("autoconf@1.68:", type="build", when="@master:")
- depends_on("automake@1.11.1:", type="build", when="@master:")
- depends_on("libtool@1.2.4:", type="build", when="@master:")
- depends_on("m4", type="build", when="@master:")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ for version_name in ("master", "develop"):
+ depends_on("autoconf@1.68:", type="build", when="@{}".format(version_name))
+ depends_on("automake@1.11.1:", type="build", when="@{}".format(version_name))
+ depends_on("libtool@1.2.4:", type="build", when="@{}".format(version_name))
+ depends_on("m4", type="build", when="@{}".format(version_name))
depends_on("binutils", type="build")
depends_on("zlib-api", type=("build", "link"))
@@ -75,6 +82,7 @@ class SstMacro(AutotoolsPackage):
# force out-of-source builds
build_directory = "spack-build"
+ @when("@develop,master")
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./bootstrap.sh")
diff --git a/var/spack/repos/builtin/packages/sst-transports/package.py b/var/spack/repos/builtin/packages/sst-transports/package.py
index a3d84df818..04425eac72 100644
--- a/var/spack/repos/builtin/packages/sst-transports/package.py
+++ b/var/spack/repos/builtin/packages/sst-transports/package.py
@@ -19,6 +19,9 @@ class SstTransports(CMakePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sst-macro")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/stacks/package.py b/var/spack/repos/builtin/packages/stacks/package.py
index 8fed579fd7..74279d0728 100644
--- a/var/spack/repos/builtin/packages/stacks/package.py
+++ b/var/spack/repos/builtin/packages/stacks/package.py
@@ -19,6 +19,9 @@ class Stacks(AutotoolsPackage):
version("2.3b", sha256="a46786d8811a730ebcdc17891e89f50d4f4ae196734439dac86091f45c92ac72")
version("1.46", sha256="45a0725483dc0c0856ad6b1f918e65d91c1f0fe7d8bf209f76b93f85c29ea28a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("sparsehash", default=True, description="Improve Stacks memory usage with SparseHash")
depends_on("perl", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/staden-io-lib/package.py b/var/spack/repos/builtin/packages/staden-io-lib/package.py
index 18531e0a7f..36bd498913 100644
--- a/var/spack/repos/builtin/packages/staden-io-lib/package.py
+++ b/var/spack/repos/builtin/packages/staden-io-lib/package.py
@@ -10,22 +10,37 @@ class StadenIoLib(AutotoolsPackage):
"""Io_lib is a library for reading/writing various bioinformatics
file formats."""
- homepage = "http://staden.sourceforge.net/"
- url = (
- "https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download"
- )
+ homepage = "https://github.com/jkbonfield/io_lib"
license("BSD-3-Clause")
- version("1.14.8", sha256="3bd560309fd6d70b14bbb8230e1baf8706b804eb6201220bb6c3d6db72003d1b")
+ maintainers("snehring")
+
+ version("1.15.0", sha256="ad343dac7c77086db1b54585c5887b26eda6430d1639d111dd3304c3b749494f")
+ version("1.14.9", sha256="8d0732f3d37abba1633731bfacac5fd7f8172eccb1cef224e8ced904d3b242f4")
+ version(
+ "1.14.8",
+ sha256="3bd560309fd6d70b14bbb8230e1baf8706b804eb6201220bb6c3d6db72003d1b",
+ url="https://sourceforge.net/projects/staden/files/io_lib/1.14.8/io_lib-1.14.8.tar.gz/download",
+ )
+ depends_on("c", type="build")
+
+ variant("libdeflate", default=False, description="Build with libdeflate")
variant("curl", default=False, description="Build with curl support")
+ variant("shared", default=True, description="Build shared libraries")
- depends_on("zlib-api")
+ depends_on("zlib-api", when="~libdeflate")
+ depends_on("libdeflate", when="+libdeflate")
+ depends_on("bzip2")
+ depends_on("xz")
depends_on("curl", when="+curl")
+ def url_for_version(self, version):
+ return f"https://github.com/jkbonfield/io_lib/releases/download/io_lib-{version.dashed}/io_lib-{version.dotted}.tar.gz"
+
def configure_args(self):
- args = []
+ args = self.enable_or_disable("shared")
if self.spec.satisfies("~curl"):
args.append("--without-libcurl")
diff --git a/var/spack/repos/builtin/packages/star/package.py b/var/spack/repos/builtin/packages/star/package.py
index 4b0d1822ac..be17fbfc14 100644
--- a/var/spack/repos/builtin/packages/star/package.py
+++ b/var/spack/repos/builtin/packages/star/package.py
@@ -14,6 +14,8 @@ class Star(MakefilePackage):
license("MIT")
+ version("2.7.11b", sha256="3f65305e4112bd154c7e22b333dcdaafc681f4a895048fa30fa7ae56cac408e7")
+ version("2.7.11a", sha256="542457b1a4fee73f27a581b1776e9f73ad2b4d7e790388b6dc71147bd039f99a")
version("2.7.10b", sha256="0d1b71de6c5be1c5d90b32130d2abcd5785a4fc7c1e9bf19cc391947f2dc46e5")
version("2.7.10a", sha256="af0df8fdc0e7a539b3ec6665dce9ac55c33598dfbc74d24df9dae7a309b0426a")
version("2.7.6a", sha256="9320797c604673debea0fe8f2e3762db364915cc59755de1a0d87c8018f97d51")
@@ -35,7 +37,14 @@ class Star(MakefilePackage):
url="https://github.com/alexdobin/STAR/archive/STAR_2.4.2a.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
+ # required for certain steps in the makefile
+ depends_on("xxd", type="build")
+
+ conflicts("zlib-ng") # https://github.com/alexdobin/STAR/issues/2063
build_directory = "source"
@@ -44,8 +53,12 @@ class Star(MakefilePackage):
env["CXXFLAGS_SIMD"] = ""
def build(self, spec, prefix):
+ # different make targets if we're compiling for Mac M1/2
with working_dir(self.build_directory):
- make("STAR", "STARlong")
+ if spec.satisfies("platform=darwin target=aarch64:"):
+ make("STARforMacStatic", "STARlongForMacStatic")
+ else:
+ make("STAR", "STARlong")
def install(self, spec, prefix):
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/starlight/package.py b/var/spack/repos/builtin/packages/starlight/package.py
index b9b11bc330..2ce197cf6e 100644
--- a/var/spack/repos/builtin/packages/starlight/package.py
+++ b/var/spack/repos/builtin/packages/starlight/package.py
@@ -29,6 +29,10 @@ class Starlight(CMakePackage):
url="https://starlight.hepforge.org/downloads?f=starlight_r300.tar",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch(
"https://gitlab.cern.ch/sft/lcgcmake/-/raw/master/generators/patches/starlight-r313.patch",
sha256="c70f70fd7c96dc0417f9254d25b584222abcb2c452e1e6dd4b8cfb0b64bf10e0",
diff --git a/var/spack/repos/builtin/packages/starpu/package.py b/var/spack/repos/builtin/packages/starpu/package.py
index 4620bdb450..8fcc35dd12 100644
--- a/var/spack/repos/builtin/packages/starpu/package.py
+++ b/var/spack/repos/builtin/packages/starpu/package.py
@@ -30,6 +30,11 @@ class Starpu(AutotoolsPackage):
maintainers("nfurmento", "sthibaul")
+ version("1.4.7", sha256="1eb3df551089153fe6e0b172ad95118434b4a81ea9eaa5a2c38725d0db53b13e")
+ version("1.4.6", sha256="579f38e150ab78c9ab299649d8649a043dbf49786e54acbf3dad90c160672cc7")
+ version("1.4.5", sha256="28f389b34df57a2a4e4743b40554b0f8d098ff2199e9eb8fbbe20aa377b64541")
+ version("1.4.4", sha256="37f37739911451bbea063cff52779114f76bc681ea8de3a2ab65fc517d0ea112")
+ version("1.4.3", sha256="848cce0a2fbaa75b104d9878da928e19b1c3bc9b978193081672ac882e63bbea")
version("1.4.2", sha256="6c1fce80593a96d599881c1e9697a10e2072195b1c4c64a99528192b6715ddd6")
version("1.4.1", sha256="f023aa53da245a0f43944c3a13f63b4bfdf1324f3e66bf5cd367ce51e2044925")
version("1.4.0", sha256="5058127761a0604606a852fd6d20b07040d5fbd9f798c5383e49f336b4eeaca1")
@@ -60,6 +65,11 @@ class Starpu(AutotoolsPackage):
version("git-1.1", branch="starpu-1.1")
version("git-1.2", branch="starpu-1.2")
version("git-1.3", branch="starpu-1.3")
+ version("git-1.4", branch="starpu-1.4")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant("shared", default=True, description="Build STARPU as a shared library")
variant("fast", default=True, description="Disable runtime assertions")
@@ -81,6 +91,7 @@ class Starpu(AutotoolsPackage):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
+ depends_on("py-setuptools", type="build")
depends_on("m4", type="build")
depends_on("hwloc")
depends_on("hwloc+cuda", when="+cuda")
diff --git a/var/spack/repos/builtin/packages/startup-notification/package.py b/var/spack/repos/builtin/packages/startup-notification/package.py
index 6ec0622e0f..a4d228ef06 100644
--- a/var/spack/repos/builtin/packages/startup-notification/package.py
+++ b/var/spack/repos/builtin/packages/startup-notification/package.py
@@ -17,6 +17,9 @@ class StartupNotification(AutotoolsPackage):
version("0.12", sha256="3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxcb")
depends_on("xcb-util")
+ depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py
index fab3a29213..2d089b38ef 100644
--- a/var/spack/repos/builtin/packages/stat/package.py
+++ b/var/spack/repos/builtin/packages/stat/package.py
@@ -42,6 +42,10 @@ class Stat(AutotoolsPackage):
url="https://github.com/LLNL/STAT/files/2489327/stat-4.0.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# TODO: dysect requires Dyninst patch for version 3.0.0b
variant("dysect", default=False, description="enable DySectAPI")
variant("examples", default=False, description="enable examples")
diff --git a/var/spack/repos/builtin/packages/static-analysis-suite/package.py b/var/spack/repos/builtin/packages/static-analysis-suite/package.py
deleted file mode 100644
index f2e75c06b2..0000000000
--- a/var/spack/repos/builtin/packages/static-analysis-suite/package.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2013-2024 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.package import *
-
-
-class StaticAnalysisSuite(CMakePackage):
- """SAS (Static Analysis Suite) is a powerful tool for running static
- analysis on C++ code."""
-
- homepage = "https://github.com/dpiparo/SAS"
- url = "https://github.com/dpiparo/SAS/archive/0.1.3.tar.gz"
-
- version(
- "0.2.0",
- sha256="a369e56f8edc61dbf59ae09dbb11d98bc05fd337c5e47e13af9c913bf7bfc538",
- deprecated=True,
- )
- version(
- "0.1.4",
- sha256="9b2a3436efe3c8060ee4882f3ed37d848ee79a63d6055a71a23fad6409559f40",
- deprecated=True,
- )
- version(
- "0.1.3",
- sha256="93c3194bb7d518c215e79436bfb43304683832b3cc66bfc838f6195ce4574943",
- deprecated=True,
- )
-
- depends_on("python@2.7:")
- depends_on("llvm@3.5:")
- depends_on("cmake@2.8:", type="build")
-
- def cmake_args(self):
- args = ["-DLLVM_DEV_DIR=%s" % self.spec["llvm"].prefix]
- return args
diff --git a/var/spack/repos/builtin/packages/stc/package.py b/var/spack/repos/builtin/packages/stc/package.py
index 75ab2ee837..b5283aceb6 100644
--- a/var/spack/repos/builtin/packages/stc/package.py
+++ b/var/spack/repos/builtin/packages/stc/package.py
@@ -21,7 +21,7 @@ class Stc(AutotoolsPackage):
version("0.8.3", sha256="d61ca80137a955b12e84e41cb8a78ce1a58289241a2665076f12f835cf68d798")
version("0.8.2", sha256="13f0f03fdfcca3e63d2d58d7e7dbdddc113d5b9826c9357ab0713b63e8e42c5e")
- depends_on("java", type=("build", "run"))
+ depends_on("java@11", type=("build", "run"))
depends_on("ant", type="build")
depends_on("turbine", type=("build", "run"))
depends_on("turbine@master", type=("build", "run"), when="@master")
diff --git a/var/spack/repos/builtin/packages/stdexec/package.py b/var/spack/repos/builtin/packages/stdexec/package.py
index 14fc4328c4..464dfa9117 100644
--- a/var/spack/repos/builtin/packages/stdexec/package.py
+++ b/var/spack/repos/builtin/packages/stdexec/package.py
@@ -16,13 +16,23 @@ class Stdexec(CMakePackage):
license("Apache-2.0")
+ version("24.09", sha256="d2d811c852dc6c53527a244a54ae343d6b65a50c23ea49f93723e3082435fff4")
version("23.03", sha256="2c9dfb6e56a190543049d2300ccccd1b626f4bb82af5b607869c626886fadd15")
version("main", branch="main")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.23.1:", type="build")
conflicts("%gcc@:10")
- conflicts("%clang@:13")
+ conflicts("%clang@:12")
+ @when("@:23.03")
def build(self, spec, prefix):
pass
+
+ def cmake_args(self):
+ return [
+ self.define("STDEXEC_BUILD_TESTS", self.run_tests),
+ self.define("STDEXEC_BUILD_EXAMPLES", False),
+ ]
diff --git a/var/spack/repos/builtin/packages/steps/package.py b/var/spack/repos/builtin/packages/steps/package.py
index 7d6c59657a..99f8c0306d 100644
--- a/var/spack/repos/builtin/packages/steps/package.py
+++ b/var/spack/repos/builtin/packages/steps/package.py
@@ -15,19 +15,22 @@ class Steps(CMakePackage):
maintainers("tristan0x")
license("GPL-3.0-or-later")
+ submodules = True
- version("develop", branch="master", submodules=True)
- version("4.1.1", submodules=True)
+ version("develop", branch="master")
+ version("5.0.1", tag="5.0.1", commit="1f2eb8193edc1c75e0877fe37e39452b399242c9")
+ version("4.1.1", tag="4.1.1", commit="fdb6d9e02a69dae698f66013117fc3f08f808f45")
+ depends_on("cxx", type="build") # generated
+
+ variant("blender", default=False, description="Build stepsblender package")
variant(
"codechecks",
default=False,
description="Perform additional code checks like code formatting or static analysis",
)
variant("lapack", default=False, description="Use new BDSystem/Lapack code for E-Field solver")
- variant(
- "distmesh", default=True, when="+mpi", description="Add solvers based on distributed mesh"
- )
+ variant("distmesh", default=True, description="Add solvers based on distributed mesh")
variant("petsc", default=True, description="Use PETSc library for parallel E-Field solver")
variant("mpi", default=True, description="Use MPI for parallel solvers")
variant("coverage", default=False, description="Enable code coverage")
@@ -45,21 +48,26 @@ class Steps(CMakePackage):
variant(
"likwid", default=False, description="Build in likwid support (Instrumentor Interface)"
)
+ variant("vesicle", default=True, when="@5:", description="Add vesicle model")
# Build with `ninja` instead of `make`
generator("ninja")
+ conflicts("+distmesh~mpi", msg="steps+distmesh requires +mpi")
depends_on("benchmark", type=("build", "test"))
depends_on("blas")
depends_on("boost", type="build")
depends_on("caliper", when="+caliper")
depends_on("easyloggingpp", when="~bundle")
+ depends_on("eigen", when="@5:")
depends_on("gmsh", when="+distmesh")
+ depends_on("gsl", when="+vesicle")
depends_on("lapack", when="+lapack")
depends_on("lcov", when="+coverage", type="build")
depends_on("likwid", when="+likwid")
depends_on("metis+int64")
depends_on("mpi", when="+mpi")
+ depends_on("ninja", type="build")
depends_on("omega-h+gmsh+mpi", when="~bundle+distmesh")
depends_on("petsc~debug+int64+mpi", when="+petsc+mpi")
depends_on("petsc~debug+int64~mpi", when="+petsc~mpi")
@@ -67,25 +75,31 @@ class Steps(CMakePackage):
depends_on("py-cython")
depends_on("py-gcovr", when="+coverage", type="build")
depends_on("py-h5py", type=("build", "test", "run"))
+ depends_on("py-pip", type="build", when="@5:")
depends_on("py-matplotlib", type=("build", "test"))
+ depends_on("py-build", type="build", when="@5:")
depends_on("py-mpi4py", when="+distmesh", type=("build", "test", "run"))
depends_on("py-numpy", type=("build", "test", "run"))
depends_on("py-scipy", type=("build", "test", "run"))
depends_on("python", type=("build", "test", "run"))
depends_on("random123", when="~bundle")
- depends_on("sundials@:2.99.99+int64", when="~bundle")
-
- patch("for_aarch64.patch", when="target=aarch64:")
+ depends_on("sundials@:2+int64", when="@:5~bundle")
+ depends_on("sundials@:6+int64", when="@develop~bundle")
def patch(self):
# easylogging requires compilation by
# its dependents: splice in disabling all errors
filter_file(r"(-Wno-double-promotion)", r"-Wno-error \1", "src/steps/util/CMakeLists.txt")
+ # unittest2 is unmaintained, shan't be used and does not build with modern Python
+ filter_file("unittest2", "", "requirements.txt", ignore_absent=True)
def cmake_args(self):
+ python_interpreter = self.spec["python"].prefix.bin.python + str(
+ self.spec["python"].version.up_to(1)
+ )
args = [
- self.define("BLAS_LIBRARIES", self.spec["blas"].libs.joined(";")),
- self.define("PYTHON_EXECUTABLE", self.spec["python"].command),
+ self.define("BLAS_LIBRARIES", self.spec["blas"].libs),
+ self.define("PYTHON_EXECUTABLE", python_interpreter),
self.define("STEPS_INSTALL_PYTHON_DEPS", False),
self.define_from_variant("BUILD_STOCHASTIC_TESTS", "stochtests"),
self.define_from_variant("BUILD_TESTING", "codechecks"),
@@ -95,6 +109,8 @@ class Steps(CMakePackage):
self.define_from_variant("STEPS_USE_CALIPER_PROFILING", "caliper"),
self.define_from_variant("STEPS_USE_DIST_MESH", "distmesh"),
self.define_from_variant("STEPS_USE_LIKWID_PROFILING", "likwid"),
+ self.define_from_variant("STEPS_USE_STEPSBLENDER", "blender"),
+ self.define_from_variant("STEPS_USE_VESICLE_SOLVER", "vesicle"),
self.define_from_variant("USE_BDSYSTEM_LAPACK", "lapack"),
self.define_from_variant("USE_MPI", "mpi"),
self.define_from_variant("USE_PETSC", "petsc"),
diff --git a/var/spack/repos/builtin/packages/stinger/package.py b/var/spack/repos/builtin/packages/stinger/package.py
index 8f11bf8429..0ae1fd5173 100644
--- a/var/spack/repos/builtin/packages/stinger/package.py
+++ b/var/spack/repos/builtin/packages/stinger/package.py
@@ -16,6 +16,9 @@ class Stinger(CMakePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
parallel = False
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/storm/package.py b/var/spack/repos/builtin/packages/storm/package.py
index d18dfd853e..2e7a971b6b 100644
--- a/var/spack/repos/builtin/packages/storm/package.py
+++ b/var/spack/repos/builtin/packages/storm/package.py
@@ -20,6 +20,7 @@ class Storm(Package):
license("CC-BY-4.0")
+ version("2.6.2", sha256="640c2c54a593cdcffef9441336738774ae618830d3e63eb8e770c22d68beed30")
version("2.3.0", sha256="49c2255b26633c6fd96399c520339e459fcda29a0e7e6d0c8775cefcff6c3636")
version("2.2.0", sha256="f621163f349a8e85130bc3d2fbb34e3b08f9c039ccac5474f3724e47a3a38675")
version("2.1.0", sha256="e279a495dda42af7d9051543989f74a1435a5bda53e795a1de4a1def32027fc4")
diff --git a/var/spack/repos/builtin/packages/stow/package.py b/var/spack/repos/builtin/packages/stow/package.py
index cec0871bd5..180c69920b 100644
--- a/var/spack/repos/builtin/packages/stow/package.py
+++ b/var/spack/repos/builtin/packages/stow/package.py
@@ -19,6 +19,7 @@ class Stow(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("2.4.0", sha256="a7bac673daa246cf54ffb48a113eadd204a615630e76b53b5f64d81a275b77b3")
version("2.3.1", sha256="26a6cfdfdaca0eea742db5487798c15fcd01889dc86bc5aa62614ec9415a422f")
version("2.2.2", sha256="a0022034960e47a8d23dffb822689f061f7a2d9101c9835cf11bf251597aa6fd")
version("2.2.0", sha256="86bc30fe1d322a5c80ff3bd7580c2758149aad7c3bbfa18b48a9d95c25d66b05")
diff --git a/var/spack/repos/builtin/packages/strace/package.py b/var/spack/repos/builtin/packages/strace/package.py
index 9870692bcc..8a615b2bdb 100644
--- a/var/spack/repos/builtin/packages/strace/package.py
+++ b/var/spack/repos/builtin/packages/strace/package.py
@@ -13,12 +13,13 @@ class Strace(AutotoolsPackage):
signal deliveries, and changes of process state."""
homepage = "https://strace.io"
- url = "https://github.com/strace/strace/releases/download/v5.2/strace-5.2.tar.xz"
+ url = "https://github.com/strace/strace/releases/download/v6.11/strace-6.11.tar.xz"
maintainers("michaelkuhn")
license("BSD-3-Clause")
+ version("6.11", sha256="83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5")
version("5.19", sha256="aa3dc1c8e60e4f6ff3d396514aa247f3c7bf719d8a8dc4dd4fa793be786beca3")
version("5.17", sha256="5fb298dbd1331fd1e1bc94c5c32395860d376101b87c6cd3d1ba9f9aa15c161f")
version("5.12", sha256="29171edf9d252f89c988a4c340dfdec662f458cb8c63d85431d64bab5911e7c4")
@@ -36,12 +37,18 @@ class Strace(AutotoolsPackage):
version("5.0", sha256="3b7ad77eb2b81dc6078046a9cc56eed5242b67b63748e7fc28f7c2daf4e647da")
version("4.21", sha256="5c7688db44073e94c59a5627744e5699454419824cc8166e8bcfd7ec58375c37")
- conflicts("platform=darwin", msg="strace runs only on Linux.")
+ variant("mpers", default=False, description="Enable multiple personalities support")
+
+ depends_on("c", type="build")
+ depends_on("gawk", when="+mpers", type="build")
+
+ conflicts("platform=darwin", msg="strace runs only on Linux")
+ conflicts("platform=windows", msg="strace runs only on Linux")
def configure_args(self):
args = []
- if self.spec.target.family == "aarch64":
- args.append("--enable-mpers=no")
- else:
+ if self.spec.satisfies("+mpers"):
args.append("--enable-mpers=yes")
+ else:
+ args.append("--enable-mpers=no")
return args
diff --git a/var/spack/repos/builtin/packages/stream/package.py b/var/spack/repos/builtin/packages/stream/package.py
index 842a9b2e8a..f10b894b85 100644
--- a/var/spack/repos/builtin/packages/stream/package.py
+++ b/var/spack/repos/builtin/packages/stream/package.py
@@ -16,6 +16,9 @@ class Stream(MakefilePackage):
version("5.10")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=False, description="Build with OpenMP support")
variant("stream_array_size", default="none", description="Size of work arrays in elements")
diff --git a/var/spack/repos/builtin/packages/stress/package.py b/var/spack/repos/builtin/packages/stress/package.py
index ec7859d3c9..531aa8ec86 100644
--- a/var/spack/repos/builtin/packages/stress/package.py
+++ b/var/spack/repos/builtin/packages/stress/package.py
@@ -20,3 +20,5 @@ class Stress(AutotoolsPackage):
license("GPL-2.0-or-later")
version("1.0.4", sha256="b03dbb9664d7f8dcb3eadc918c2e8eb822f5a3ba47d9bd51246540bac281bd75")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/stressapptest/package.py b/var/spack/repos/builtin/packages/stressapptest/package.py
index 84191c6c06..27ad1f603f 100644
--- a/var/spack/repos/builtin/packages/stressapptest/package.py
+++ b/var/spack/repos/builtin/packages/stressapptest/package.py
@@ -23,3 +23,6 @@ class Stressapptest(AutotoolsPackage):
version("1.0.9", sha256="2ba470587ad4f6ae92057d427c3a2a2756e5f10bd25cd91e62eaef55a40b30a1")
version("1.0.8", sha256="b0432f39055166156ed04eb234f3c226b17a42f802a3f81d76ee999838e205df")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/string-view-lite/package.py b/var/spack/repos/builtin/packages/string-view-lite/package.py
index 1f93927eb0..261ba49a15 100644
--- a/var/spack/repos/builtin/packages/string-view-lite/package.py
+++ b/var/spack/repos/builtin/packages/string-view-lite/package.py
@@ -26,6 +26,8 @@ class StringViewLite(CMakePackage):
version("0.2.0", sha256="c8ae699dfd2ccd15c5835e9b1d246834135bbb91b82f7fc4211b8ac366bffd34")
version("0.1.0", sha256="7de87d6595230a6085655dab6145340bc423f2cf206263ef73c9b78f7b153340")
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
return [
"-DSTRINGVIEW_LITE_OPT_BUILD_TESTS=%s" % ("ON" if self.run_tests else "OFF"),
diff --git a/var/spack/repos/builtin/packages/stringtie/package.py b/var/spack/repos/builtin/packages/stringtie/package.py
index 13428929af..566fce744f 100644
--- a/var/spack/repos/builtin/packages/stringtie/package.py
+++ b/var/spack/repos/builtin/packages/stringtie/package.py
@@ -20,6 +20,9 @@ class Stringtie(MakefilePackage):
version("1.3.4a", sha256="6164a5fa9bf8807ef68ec89f47e3a61fe57fa07fe858f52fb6627f705bf71add")
version("1.3.3b", sha256="30e8a3a29b474f0abeef1540d9b4624a827d8b29d7347226d86a38afea28bc0f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/stripack/package.py b/var/spack/repos/builtin/packages/stripack/package.py
index 9f38c8dc3c..75a1c63687 100644
--- a/var/spack/repos/builtin/packages/stripack/package.py
+++ b/var/spack/repos/builtin/packages/stripack/package.py
@@ -18,6 +18,11 @@ class Stripack(MakefilePackage):
"""
homepage = "https://people.sc.fsu.edu/~jburkardt/f_src/stripack/stripack.html"
+
+ maintainers("cessenat")
+
+ license("MIT")
+
version(
"develop",
sha256="26c074bc46fb8549d7a42ec713636798297d7327c8f3ce0ba2d3348a501ffa7c",
@@ -64,7 +69,7 @@ class Stripack(MakefilePackage):
fflags += ["-qrealsize=8"]
elif satisfies("%fj"):
fflags += ["-CcdRR8"]
- elif satisfies("%pgi") or satisfies("%nvhpc"):
+ elif satisfies("%nvhpc"):
fflags += ["-r8"]
fflags += [self.compiler.fc_pic_flag]
make("all", "FFLAGS={0}".format(" ".join(fflags)))
diff --git a/var/spack/repos/builtin/packages/structure/package.py b/var/spack/repos/builtin/packages/structure/package.py
index 6620fc0536..90ffb21a85 100644
--- a/var/spack/repos/builtin/packages/structure/package.py
+++ b/var/spack/repos/builtin/packages/structure/package.py
@@ -15,6 +15,8 @@ class Structure(MakefilePackage):
version("2.3.4", sha256="f2b72b9189a514f53e921bbdc1aa3dbaca7ac34a8467af1f972c7e4fc9c0bb37")
+ depends_on("c", type="build") # generated
+
def url_for_version(self, version):
url = "http://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v{0}/structure_kernel_source.tar.gz"
return url.format(version)
diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py
index 795fa1756b..d1cb572f29 100644
--- a/var/spack/repos/builtin/packages/strumpack/package.py
+++ b/var/spack/repos/builtin/packages/strumpack/package.py
@@ -3,7 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from platform import machine
+import os
+
+import llnl.util.tty as tty
from spack.package import *
from spack.util.environment import set_env
@@ -33,6 +35,7 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause-LBNL")
version("master", branch="master")
+ version("8.0.0", sha256="11cc8645d622a16510b39a20efc64f34862b41976152d17f9fbf3e91f899766c")
version("7.2.0", sha256="6988c00c3213f13e53d75fb474102358f4fecf07a4b4304b7123d86fdc784639")
version("7.1.3", sha256="c951f38ee7af20da3ff46429e38fcebd57fb6f12619b2c56040d6da5096abcb0")
version("7.1.2", sha256="262a0193fa1682d0eaa90363f739e0be7a778d5deeb80e4d4ae12446082a39cc")
@@ -53,6 +56,10 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
version("3.2.0", sha256="34d93e1b2a3b8908ef89804b7e08c5a884cbbc0b2c9f139061627c0d2de282c1")
version("3.1.1", sha256="c1c3446ee023f7b24baa97b24907735e89ce4ae9f5ef516645dfe390165d1778")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("mpi", default=True, description="Use MPI")
variant(
@@ -73,15 +80,17 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
depends_on("mpi", when="+mpi")
depends_on("blas")
depends_on("lapack")
- depends_on("openblas threads=openmp", when="^openblas")
+ depends_on("openblas threads=openmp", when="^[virtuals=blas] openblas")
depends_on("scalapack", when="+mpi")
depends_on("metis")
depends_on("parmetis", when="+parmetis")
depends_on("scotch~metis", when="+scotch")
depends_on("scotch~metis+mpi", when="+scotch+mpi")
+ depends_on("scotch@7.0.4:", when="@8.0.0: +scotch")
depends_on("butterflypack@1.1.0", when="@3.3.0:3.9 +butterflypack+mpi")
depends_on("butterflypack@1.2.0:", when="@4.0.0: +butterflypack+mpi")
depends_on("butterflypack@2.1.0:", when="@6.3.0: +butterflypack+mpi")
+ depends_on("butterflypack@3.2.0:", when="@8.0.0: +butterflypack+mpi")
depends_on("cuda", when="@4.0.0: +cuda")
depends_on("zfp@0.5.5", when="@:7.0.1 +zfp")
depends_on("zfp", when="@7.0.2: +zfp")
@@ -177,7 +186,13 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
if "%cce" in spec:
# Assume the proper Cray CCE module (cce) is loaded:
- craylibs_path = env["CRAYLIBS_" + machine().upper()]
+ craylibs_var = "CRAYLIBS_" + str(spec.target.family).upper()
+ craylibs_path = env.get(craylibs_var, None)
+ if not craylibs_path:
+ raise InstallError(
+ f"The environment variable {craylibs_var} is not defined.\n"
+ "\tMake sure the 'cce' module is in the compiler spec."
+ )
env.setdefault("LDFLAGS", "")
env["LDFLAGS"] += " -Wl,-rpath," + craylibs_path
@@ -191,30 +206,14 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
add_sparse = not self.spec.satisfies("@:5.1.1")
return join_path("examples", "sparse" if add_sparse else "", "data")
- # TODO: Replace this method and its 'get' use for cmake path with
- # join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone
- # tests can access build dependencies through self.spec['cmake'].
- def cmake_bin(self, set=True):
- """(Hack) Set/get cmake dependency path."""
- filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
- if set:
- with open(filepath, "w") as out_file:
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- out_file.write("{0}\n".format(cmake_bin))
- else:
- with open(filepath, "r") as in_file:
- return in_file.read().strip()
-
@run_after("install")
def cache_test_sources(self):
"""Copy the example source files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.test_data_dir, self.test_src_dir])
-
- # TODO: Remove once self.spec['cmake'] is available here
- self.cmake_bin(set=True)
+ cache_extra_test_sources(self, [self.test_data_dir, self.test_src_dir])
- def _test_example(self, test_prog, test_dir, test_cmd, test_args):
+ def _test_example(self, test_prog, test_cmd, pre_args=[]):
+ test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
cmake_filename = join_path(test_dir, "CMakeLists.txt")
with open(cmake_filename, "w") as mkfile:
mkfile.write("cmake_minimum_required(VERSION 3.15)\n")
@@ -225,50 +224,43 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage):
"target_link_libraries({0} ".format(test_prog) + "PRIVATE STRUMPACK::strumpack)\n"
)
- # TODO: Remove/replace once self.spec['cmake'] is available here
- cmake_bin = self.cmake_bin(set=False)
+ with working_dir(test_dir):
+ opts = self.std_cmake_args + self.cmake_args() + ["."]
+ cmake = self.spec["cmake"].command
+ cmake(*opts)
- opts = self.std_cmake_args
- opts += self.cmake_args()
- opts += ["."]
+ make = which("make")
+ make(test_prog)
- self.run_test(
- cmake_bin,
- opts,
- [],
- installed=False,
- purpose="test: generating makefile",
- work_dir=test_dir,
- )
- self.run_test(
- "make", test_prog, purpose="test: building {0}".format(test_prog), work_dir=test_dir
- )
- with set_env(OMP_NUM_THREADS="1"):
- self.run_test(
- test_cmd,
- test_args,
- installed=False,
- purpose="test: running {0}".format(test_prog),
- skip_missing=False,
- work_dir=test_dir,
- )
+ with set_env(OMP_NUM_THREADS="1"):
+ exe = which(test_cmd)
+ test_args = pre_args + [join_path("..", self.test_data_dir, "pde900.mtx")]
+ exe(*test_args)
- def test(self):
- """Run the stand-alone tests for the installed software."""
- test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
+ def test_sparse_seq(self):
+ """Run sequential test_sparse"""
test_exe = "test_sparse_seq"
+ self._test_example(test_exe, test_exe)
+
+ def test_sparse_mpi(self):
+ """Run parallel test_sparse"""
+ if "+mpi" not in self.spec:
+ raise SkipTest("Package must be installed with '+mpi'")
test_exe_mpi = "test_sparse_mpi"
- exe_arg = [join_path("..", self.test_data_dir, "pde900.mtx")]
- if "+mpi" in self.spec:
- test_args = ["-n", "1", test_exe_mpi]
- test_args.extend(exe_arg)
- mpiexe_list = ["srun", "mpirun", "mpiexec"]
- for mpiexe in mpiexe_list:
- if which(mpiexe) is not None:
- self._test_example(test_exe_mpi, test_dir, mpiexe, test_args)
- break
- else:
- self._test_example(test_exe, test_dir, test_exe, exe_arg)
+ mpi_args = ["-n", "1", test_exe_mpi]
+
+ mpi_bin = self.spec["mpi"].prefix.bin
+ mpiexe_list = ["srun", mpi_bin.mpirun, mpi_bin.mpiexec]
+ for exe in mpiexe_list:
+ tty.info(f"Attempting to build and launch with {os.path.basename(exe)}")
+ try:
+ args = ["--immediate=30"] + mpi_args if exe == "srun" else mpi_args
+ self._test_example(test_exe_mpi, exe, args)
+ return
+ except (Exception, ProcessError) as err:
+ tty.info(f"Skipping {exe}: {str(err)}")
+
+ assert False, "No MPI executable was found"
def check(self):
"""Skip the builtin testsuite, use the stand-alone tests instead."""
diff --git a/var/spack/repos/builtin/packages/su2/package.py b/var/spack/repos/builtin/packages/su2/package.py
index 8f73b02d8e..4b0d056ae7 100644
--- a/var/spack/repos/builtin/packages/su2/package.py
+++ b/var/spack/repos/builtin/packages/su2/package.py
@@ -18,6 +18,8 @@ class Su2(MesonPackage):
license("BSD-3-Clause")
+ version("8.0.1", commit="8ef4b1be045122b2fdb485bfb5fe4eecd1bc4246", submodules=True)
+ version("8.0.0", commit="1fe59817e984f67ff55146d90d0059e27b772891", submodules=True)
version("7.5.1", commit="09ba9e3a9605c02d38290e34f42aa6982cb4dd05", submodules=True)
version("7.5.0", commit="8e8ea59fe6225c8ec4e94d0e0a4b6690ea4294e5", submodules=True)
version("7.4.0", commit="745e5d922c63c8ec6963b31808c20df2e3bfd075", submodules=True)
@@ -36,24 +38,33 @@ class Su2(MesonPackage):
version("7.0.0", sha256="6207dcca15eaebc11ce12b2866c937b4ad9b93274edf6f23d0487948ac3963b8")
version("6.2.0", sha256="ffc953326e8432a1a6534556a5f6cf086046d3149cfcec6b4e7390eebe30ce2e")
- variant("mpi", default=False, description="enable MPI support")
- variant("openmp", default=False, description="enable OpenMP support")
- variant("tecio", default=True, description="enable TECIO support")
- variant("cgns", default=True, description="enable CGNS support")
- variant("autodiff", default=False, description="enable AD(reverse) support")
- variant("directdiff", default=False, description="enable AD(forward) support")
- variant("pywrapper", default=False, description="enable Python wrapper support")
- variant("mkl", default=False, description="enable Intel MKL support")
- variant("openblas", default=False, description="enable OpenBLAS support")
- variant("mpp", default=False, description="enable Mutation++ support")
+ # @:7 is missing few <cstdint> includes, causing a few files to fail with %gcc@13:
+ conflicts("%gcc@13:", when="@:7")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("mpi", default=False, description="Enable MPI support")
+ variant("openmp", default=False, description="Enable OpenMP support")
+ variant("tecio", default=True, description="Enable TECIO support")
+ variant("cgns", default=True, description="Enable CGNS support")
+ variant("autodiff", default=False, description="Enable AD(reverse) support")
+ variant("directdiff", default=False, description="Enable AD(forward) support")
+ variant("pywrapper", default=False, description="Enable Python wrapper support")
+ variant("mkl", default=False, description="Enable Intel MKL support")
+ variant("openblas", default=False, description="Enable OpenBLAS support")
+ variant("mpp", default=False, description="Enable Mutation++ support")
variant(
"mixedprec",
default=False,
- description="use single precision floating point arithmetic for sparse algebra",
+ description="Enable the use of single precision on linear solvers and preconditioners",
)
depends_on("meson@0.61.1:", type=("build"))
depends_on("python@3:", type=("build", "run"))
+ depends_on("py-numpy", type="run")
+ depends_on("py-scipy", type="run")
depends_on("zlib-api")
depends_on("pkgconfig")
depends_on("mpi", when="+mpi")
@@ -63,30 +74,94 @@ class Su2(MesonPackage):
depends_on("openblas", when="+openblas ~mkl")
depends_on("cmake", type="build", when="+mpp")
+ for diff_type in ("+autodiff", "+directdiff"):
+ with when(diff_type):
+ depends_on("codipack@1.9.3", when="@:7.5.1")
+ depends_on("codipack@2.2.0:", when="@8.0.0:")
+ depends_on("medipack", when="+mpi")
+ depends_on("opdilib", when="+autodiff +openmp")
+
# Remove the part that fixes the meson version to 0.61.1.
# This fix is considered meaningless and will be removed in the next version(@7.6:) of SU2.
patch("meson_version.patch", when="@7.4.0:7.5.1")
+ # Remove the timestamp check of preconfigure.py for version(@8:)
+ patch("remove_preconfigure_timestamp_check.patch", when="@8.0.0:")
+
+ def patch(self):
+ if self.spec.satisfies("+autodiff") or self.spec.satisfies("+directdiff"):
+ filter_file(
+ "externals/codi/include",
+ join_path(self.spec["codipack"].prefix, "include"),
+ "meson.build",
+ )
+
+ if self.spec.satisfies("+mpi"):
+ filter_file(
+ "externals/medi/include", self.spec["medipack"].prefix.include, "meson.build"
+ )
+ filter_file("externals/medi/src", self.spec["medipack"].prefix.src, "meson.build")
+
+ if self.spec.satisfies("+autodiff") and self.spec.satisfies("+openmp"):
+ filter_file(
+ "externals/opdi/include", self.spec["opdilib"].prefix.include, "meson.build"
+ )
+ filter_file(
+ "externals/opdi/syntax/check.py",
+ join_path(self.spec["opdilib"].prefix.syntax, "check.py"),
+ "meson.build",
+ )
+
+ if self.spec.satisfies("+mpp") and self.spec.satisfies("@8.0:"):
+ filter_file(
+ r"join_paths\(meson\.project_source_root\(\), 'ninja'\)",
+ f"join_paths('{self.spec['ninja'].prefix.bin}', 'ninja')",
+ "meson.build",
+ )
+
def meson_args(self):
args = [
"-Dwith-omp={}".format("+openmp" in self.spec),
"-Denable-tecio={}".format("+tecio" in self.spec),
"-Denable-cgns={}".format("+cgns" in self.spec),
"-Denable-autodiff={}".format("+autodiff" in self.spec),
- "-Denable-directdiff={}".format("+direcdiff" in self.spec),
+ "-Denable-directdiff={}".format("+directdiff" in self.spec),
"-Denable-pywrapper={}".format("+pywrapper" in self.spec),
"-Denable-mkl={}".format("+mkl" in self.spec),
"-Denable-openblas={}".format("+openblas" in self.spec),
- "-Denable-mpp={}".format("+mpp" in self.spec),
"-Denable-mixedprec={}".format("+midexprec" in self.spec),
]
+ if self.spec.version >= Version("7.1.0"):
+ args.append("-Denable-mpp={}".format("+mpp" in self.spec))
if "+mkl" in self.spec:
args.append("-Dmkl_root=" + self.spec["intel-oneapi-mkl"].prefix)
if "+mpi" in self.spec:
- args.append("-Dwith-mpi=enabled")
+ args.append("-Dwith-mpi=auto")
else:
args.append("-Dwith-mpi=disabled")
return args
+
+ @run_after("install")
+ def install_mpp(self):
+ if "+mpp" in self.spec:
+ mkdirp(join_path(self.prefix, "mpp-data"))
+ mkdirp(join_path(self.prefix, "lib"))
+ install_tree(
+ join_path(self.stage.source_path, "subprojects", "Mutationpp", "data"),
+ join_path(self.prefix, "mpp-data"),
+ )
+ install_tree(
+ join_path(self.build_directory, "subprojects", "Mutationpp"), self.prefix.lib
+ )
+
+ def setup_run_environment(self, env):
+ env.set("su2_run", self.prefix.bin)
+ env.set("su2_home", self.prefix)
+ env.prepend_path("path", self.prefix.bin)
+ env.prepend_path("pythonpath", self.prefix.bin)
+ if "+mpp" in self.spec:
+ env.set("mpp_data_directory", join_path(self.prefix, "mpp-data"))
+ env.prepend_path("ld_library_path", self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/su2/remove_preconfigure_timestamp_check.patch b/var/spack/repos/builtin/packages/su2/remove_preconfigure_timestamp_check.patch
new file mode 100644
index 0000000000..a0f844f65a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/su2/remove_preconfigure_timestamp_check.patch
@@ -0,0 +1,13 @@
+--- a/meson.build 2022-12-20 21:08:29.000000000 +0900
++++ b/meson.build 2023-05-19 03:24:08.870966665 +0900
+@@ -6,10 +6,6 @@
+ 'c_std=c99',
+ 'cpp_std=c++11'])
+
+-fsmod = import('fs')
+-if not fsmod.exists('su2preconfig.timestamp')
+- error('SU2 must be (pre-)configured with the extended Meson script (./meson.py) or with the ./preconfigure.py script in the SU2 root directory.')
+-endif
+
+ pymod = import('python')
+ python = pymod.find_installation()
diff --git a/var/spack/repos/builtin/packages/subread/package.py b/var/spack/repos/builtin/packages/subread/package.py
index bc5b2b8c4d..7ab7f678c5 100644
--- a/var/spack/repos/builtin/packages/subread/package.py
+++ b/var/spack/repos/builtin/packages/subread/package.py
@@ -27,6 +27,8 @@ class Subread(MakefilePackage):
version("1.6.0", sha256="31251ec4c134e3965d25ca3097890fb37e2c7a4163f6234515534fd325b1002a")
version("1.5.2", sha256="a8c5f0e09ed3a105f01866517a89084c7302ff70c90ef8714aeaa2eab181a0aa")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def build(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py
index 42e1f63eca..f64614d5b9 100644
--- a/var/spack/repos/builtin/packages/subversion/package.py
+++ b/var/spack/repos/builtin/packages/subversion/package.py
@@ -37,6 +37,9 @@ class Subversion(AutotoolsPackage):
version("1.8.17", sha256="1b2cb9a0ca454035e55b114ee91c6433b9ede6c2893f2fb140939094d33919e4")
version("1.8.13", sha256="17e8900a877ac9f0d5ef437c20df437fec4eb2c5cb9882609d2277e2312da52c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("serf", default=True, description="Serf HTTP client library")
variant("perl", default=False, description="Build with Perl bindings")
variant("apxs", default=True, description="Build with APXS")
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index a01a961112..3069a52127 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os.path
+
from spack.package import *
@@ -17,6 +19,9 @@ class SuiteSparse(Package):
license("Apache-2.0")
+ version("7.7.0", sha256="529b067f5d80981f45ddf6766627b8fc5af619822f068f342aab776e683df4f3")
+ version("7.3.1", sha256="b512484396a80750acf3082adc1807ba0aabb103c2e09be5691f46f14d0a9718")
+ version("7.2.1", sha256="304e959a163ff74f8f4055dade3e0b5498d9aa3b1c483633bb400620f521509f")
version("5.13.0", sha256="59c6ca2959623f0c69226cf9afb9a018d12a37fab3a8869db5f6d7f83b6b147d")
version("5.12.0", sha256="5fb0064a3398111976f30c5908a8c0b40df44c6dd8f0cc4bfa7b9e45d8c647de")
version("5.11.0", sha256="fdd957ed06019465f7de73ce931afaf5d40e96e14ae57d91f60868b8c123c4c8")
@@ -39,6 +44,10 @@ class SuiteSparse(Package):
version("4.5.5", sha256="80d1d9960a6ec70031fecfe9adfe5b1ccd8001a7420efb50d6fa7326ef14af91")
version("4.5.3", sha256="b6965f9198446a502cde48fb0e02236e75fa5700b94c7306fc36599d57b563f4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"pic",
default=True,
@@ -65,6 +74,7 @@ class SuiteSparse(Package):
depends_on("gmp", when="@5.8.0:")
depends_on("m4", type="build", when="@5.0.0:")
depends_on("cmake", when="+graphblas @5.2.0:", type="build")
+ depends_on("cmake@3.22:", when="@6:", type="build")
depends_on("metis@5.1.0", when="@4.5.1:")
with when("+tbb"):
@@ -74,14 +84,13 @@ class SuiteSparse(Package):
# related stuff (which have long been deprecated). This appears to be
# rather problematic for suite-sparse (see e.g.
# https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/master/SPQR/Source/spqr_parallel.cpp)
- depends_on("intel-tbb@:2020 build_system=makefile", when="^intel-tbb")
+ depends_on("intel-tbb@:2020 build_system=makefile", when="^[virtuals=tbb] intel-tbb")
conflicts(
"^intel-oneapi-tbb@2021:",
msg="suite-sparse needs task_scheduler_init.h dropped in recent tbb libs",
)
- # This patch removes unsupported flags for pgi compiler
- patch("pgi.patch", when="%pgi")
+ # This patch removes unsupported flags for nvhpc compiler
patch("pgi.patch", when="%nvhpc")
# This patch adds '-lm' when linking libgraphblas and when using clang.
@@ -117,36 +126,48 @@ class SuiteSparse(Package):
return
symbols = (
- "dtrsv_",
- "dgemv_",
- "dtrsm_",
+ "cgemm_",
+ "cgemv_",
+ "cherk_",
+ "cpotrf_",
+ "ctrsm_",
+ "ctrsv_",
"dgemm_",
- "dsyrk_",
+ "dgemv_",
"dger_",
- "dscal_",
- "dpotrf_",
- "ztrsv_",
- "zgemv_",
- "ztrsm_",
- "zgemm_",
- "zherk_",
- "zgeru_",
- "zscal_",
- "zpotrf_",
- "dnrm2_",
"dlarf_",
+ "dlarfb_",
"dlarfg_",
"dlarft_",
- "dlarfb_",
+ "dnrm2_",
+ "dpotrf_",
+ "dscal_",
+ "dsyrk_",
+ "dtrsm_",
+ "dtrsv_",
"dznrm2_",
+ "sgemm_",
+ "sgemv_",
+ "spotrf_",
+ "ssyrk_",
+ "strsm_",
+ "strsv_",
+ "zgemm_",
+ "zgemv_",
+ "zgeru_",
+ "zherk_",
"zlarf_",
+ "zlarfb_",
"zlarfg_",
"zlarft_",
- "zlarfb_",
+ "zpotrf_",
+ "zscal_",
+ "ztrsm_",
+ "ztrsv_",
)
for symbol in symbols:
- args.append("CFLAGS+=-D{0}={1}{2}".format(symbol, symbol, suffix))
+ args.append(f"CFLAGS+=-D{symbol}={symbol}{suffix}")
def install(self, spec, prefix):
# The build system of SuiteSparse is quite old-fashioned.
@@ -168,23 +189,24 @@ class SuiteSparse(Package):
# completely disabled. See
# [SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk] for more.
"CUDA=no",
- "CUDA_PATH=%s" % (spec["cuda"].prefix if "+cuda" in spec else ""),
- "CFOPENMP=%s" % (self.compiler.openmp_flag if "+openmp" in spec else ""),
- "CFLAGS=-O3 %s" % cc_pic_flag,
+ f"CUDA_PATH={spec['cuda'].prefix if '+cuda' in spec else ''}",
+ f"CFOPENMP={self.compiler.openmp_flag if '+openmp' in spec else ''}",
+ f"CFLAGS=-O3 {cc_pic_flag}",
# Both FFLAGS and F77FLAGS are used in SuiteSparse makefiles;
# FFLAGS is used in CHOLMOD, F77FLAGS is used in AMD and UMFPACK.
- "FFLAGS=%s" % f77_pic_flag,
- "F77FLAGS=%s" % f77_pic_flag,
+ f"FFLAGS={f77_pic_flag}",
+ f"F77FLAGS={f77_pic_flag}",
# use Spack's metis in CHOLMOD/Partition module,
# otherwise internal Metis will be compiled
- "MY_METIS_LIB=%s" % spec["metis"].libs.ld_flags,
- "MY_METIS_INC=%s" % spec["metis"].prefix.include,
+ f"MY_METIS_LIB={spec['metis'].libs.ld_flags}",
+ f"MY_METIS_INC={spec['metis'].prefix.include}",
# Make sure Spack's Blas/Lapack is used. Otherwise System's
# Blas/Lapack might be picked up. Need to add -lstdc++, following
# with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk,
# even though this fix is ugly
- "BLAS=%s" % (spec["blas"].libs.ld_flags + (" -lstdc++" if "@4.5.1" in spec else "")),
- "LAPACK=%s" % spec["lapack"].libs.ld_flags,
+ f"BLAS={spec['blas'].libs.ld_flags + (' -lstdc++' if '@4.5.1' in spec else '')}",
+ f"LAPACK={spec['lapack'].libs.ld_flags}",
+ f"JOBS={make_jobs}",
]
# Recent versions require c11 but some demos do not get the c11 from
@@ -193,7 +215,7 @@ class SuiteSparse(Package):
# not an issue because c11 or newer is their default. However, for some
# compilers (e.g. xlc) the c11 flag is necessary.
if spec.satisfies("@5.4:5.7.1") and ("%xl" in spec or "%xl_r" in spec):
- make_args += ["CFLAGS+=%s" % self.compiler.c11_flag]
+ make_args += [f"CFLAGS+={self.compiler.c11_flag}"]
# 64bit blas in UMFPACK:
if (
@@ -211,29 +233,59 @@ class SuiteSparse(Package):
# optimizations
if any([x in spec for x in ("%apple-clang", "%clang", "%gcc", "%intel", "%fj")]):
make_args += ["CFLAGS+=-fno-common -fexceptions"]
- elif "%pgi" in spec:
- make_args += ["CFLAGS+=--exceptions"]
if spack_f77.endswith("xlf") or spack_f77.endswith("xlf_r"):
make_args += ["CFLAGS+=-DBLAS_NO_UNDERSCORE"]
# Intel TBB in SuiteSparseQR
if "+tbb" in spec:
- make_args += ["SPQR_CONFIG=-DHAVE_TBB", "TBB=%s" % spec["tbb"].libs.ld_flags]
+ make_args += ["SPQR_CONFIG=-DHAVE_TBB", f"TBB={spec['tbb'].libs.ld_flags}"]
if "@5.3:" in spec:
# Without CMAKE_LIBRARY_PATH defined, the CMake file in the
# Mongoose directory finds libsuitesparseconfig.so in system
# directories like /usr/lib.
- make_args += [
- "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=%s" % prefix
- + " -DCMAKE_LIBRARY_PATH=%s" % prefix.lib
+ cmake_args = [
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON",
+ f"-DCMAKE_INSTALL_PREFIX={prefix}",
+ f"-DCMAKE_LIBRARY_PATH={prefix.lib}",
+ f"-DBLAS_ROOT={spec['blas'].prefix}",
+ f"-DLAPACK_ROOT={spec['lapack'].prefix}",
+ # *_LIBRARIES is critical to pick up static
+ # libraries (if intended) and also to avoid
+ # unintentional system blas/lapack packages
+ f'-DBLAS_LIBRARIES="{";".join(spec["blas"].libs)}"',
+ f'-DLAPACK_LIBRARIES="{";".join(spec["lapack"].libs)}"',
+ "-DCMAKE_VERBOSE_MAKEFILE=ON",
]
+ if spec.satisfies("@:7.3"):
+ cmake_args += [
+ f"-DNOPENMP={'OFF' if '+openmp' in spec else 'ON'}",
+ f"-DENABLE_CUDA={'ON' if '+cuda' in spec else 'OFF'}",
+ ]
+ else:
+ cmake_args += [
+ f"-DSUITESPARSE_USE_OPENMP={'ON' if '+openmp' in spec else 'OFF'}",
+ f"-DSUITESPARSE_USE_CUDA={'ON' if '+cuda' in spec else 'OFF'}",
+ ]
+ make_args += [f"CMAKE_OPTIONS={' '.join(cmake_args)}"]
if spec.satisfies("%gcc platform=darwin"):
make_args += ["LDLIBS=-lm"]
- make_args.append("INSTALL=%s" % prefix)
+ if "%cce" in spec:
+ # Assume the proper Cray CCE module (cce) is loaded:
+ craylibs_var = "CRAYLIBS_" + str(spec.target.family).upper()
+ craylibs_path = env.get(craylibs_var, None)
+ if not craylibs_path:
+ raise InstallError(
+ f"The environment variable {craylibs_var} is not defined.\n"
+ "\tMake sure the 'cce' module is in the compiler spec."
+ )
+ env.setdefault("LDFLAGS", "")
+ env["LDFLAGS"] += " -Wl,-rpath," + craylibs_path
+
+ make_args.append(f"INSTALL={prefix}")
# Filter the targets we're interested in
targets = [
@@ -255,15 +307,28 @@ class SuiteSparse(Package):
targets.extend(["SPQR"])
if spec.satisfies("+graphblas"):
targets.append("GraphBLAS")
- if spec.satisfies("@5.8.0:"):
+ if spec.satisfies("@5.8.0:6"):
targets.append("SLIP_LU")
# Finally make and install
- make("-C", "SuiteSparse_config", "config", *make_args)
+ if spec.satisfies("@6:"):
+ make("-C", "SuiteSparse_config", *make_args)
+ else:
+ make("-C", "SuiteSparse_config", "config", *make_args)
for target in targets:
make("-C", target, "library", *make_args)
make("-C", target, "install", *make_args)
+ # Starting with v7.4.0 headers are installed in a subdirectory called
+ # 'suitesparse' by default. For backward compatibility, after
+ # installation, we create links for all files from 'suitesparse' in the
+ # containing directory, '<prefix>/include':
+ if spec.satisfies("@7.4:"):
+ with working_dir(prefix.include):
+ for f in find("suitesparse", "*", recursive=False):
+ sf = os.path.basename(f)
+ symlink(join_path("suitesparse", sf), sf)
+
@run_after("install")
def fix_darwin_install(self):
# The shared libraries are not installed correctly on Darwin:
@@ -296,5 +361,10 @@ class SuiteSparse(Package):
query_parameters = self.spec.last_query.extra_parameters
comps = all_comps if not query_parameters else query_parameters
return find_libraries(
- ["lib" + c for c in comps], root=self.prefix.lib, shared=True, recursive=False
+ # Libraries may be installed under both `lib/` and `lib64/`,
+ # don't force searching under `lib/` only.
+ ["lib" + c for c in comps],
+ root=self.prefix,
+ shared=True,
+ recursive=True,
)
diff --git a/var/spack/repos/builtin/packages/sumo/package.py b/var/spack/repos/builtin/packages/sumo/package.py
index a8b49d2e75..e67d61d219 100644
--- a/var/spack/repos/builtin/packages/sumo/package.py
+++ b/var/spack/repos/builtin/packages/sumo/package.py
@@ -19,6 +19,8 @@ class Sumo(CMakePackage):
version("1.5.0", sha256="be6ba0361b487a5e71c81e60b4c07a67826d5e170500c10c37374c1086ac2cb6")
+ depends_on("cxx", type="build") # generated
+
variant("gdal", default=True, description="gdal support, for arcgis")
variant("ffmpeg", default=False, description="ffmpeg support, for video output")
variant(
diff --git a/var/spack/repos/builtin/packages/sundials/Change-HIP_PLATFORM-from-HCC-to-AMD-and-NVCC-to-NVIDIA.patch b/var/spack/repos/builtin/packages/sundials/Change-HIP_PLATFORM-from-HCC-to-AMD-and-NVCC-to-NVIDIA.patch
new file mode 100644
index 0000000000..4dd9dc7a47
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sundials/Change-HIP_PLATFORM-from-HCC-to-AMD-and-NVCC-to-NVIDIA.patch
@@ -0,0 +1,28 @@
+From d4afbed86fc4f9925e55367267b3796a522ba5d5 Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Sun, 14 Jan 2024 10:20:21 +0000
+Subject: [PATCH] Change HIP_PLATFORM from HCC to AMD and NVCC to NVIDIA
+
+---
+ include/sundials/sundials_hip_policies.hpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/sundials/sundials_hip_policies.hpp b/include/sundials/sundials_hip_policies.hpp
+index d759bbc..f6dfe41 100644
+--- a/include/sundials/sundials_hip_policies.hpp
++++ b/include/sundials/sundials_hip_policies.hpp
+@@ -30,9 +30,9 @@ namespace sundials
+ namespace hip
+ {
+
+-#if defined(__HIP_PLATFORM_HCC__)
++#if defined(__HIP_PLATFORM_AMD__)
+ constexpr const sunindextype WARP_SIZE = 64;
+-#elif defined(__HIP_PLATFORM_NVCC__)
++#elif defined(__HIP_PLATFORM_NVIDIA__)
+ constexpr const sunindextype WARP_SIZE = 32;
+ #endif
+ constexpr const sunindextype MAX_BLOCK_SIZE = 1024;
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index ee71a22855..8f02572430 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -6,8 +6,6 @@
import os
import sys
-from llnl.util import tty
-
from spack.package import *
@@ -17,7 +15,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://computing.llnl.gov/projects/sundials"
url = "https://github.com/LLNL/sundials/releases/download/v2.7.0/sundials-2.7.0.tar.gz"
- git = "https://github.com/llnl/sundials.git"
+ git = "https://github.com/LLNL/sundials.git"
tags = ["radiuss", "e4s"]
test_requires_compiler = True
@@ -28,6 +26,9 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# Versions
# ==========================================================================
version("develop", branch="develop")
+ version("7.1.1", tag="v7.1.1", commit="c28eaa3764a03705d61decb6025b409360e9d53f")
+ version("7.0.0", sha256="d762a7950ef4097fbe9d289f67a8fb717a0b9f90f87ed82170eb5c36c0a07989")
+ version("6.7.0", sha256="5f113a1564a9d2d98ff95249f4871a4c815a05dbb9b8866a82b13ab158c37adb")
version("6.6.2", sha256="08f8223a5561327e44c072e46faa7f665c0c0bc8cd7e45d23f486c3d24c65009")
version("6.6.1", sha256="21f71e4aef95b18f954c8bbdc90b62877443950533d595c68051ab768b76984b")
version("6.6.0", sha256="f90029b8da846c8faff5530fd1fa4847079188d040554f55c1d5d1e04743d29d")
@@ -61,6 +62,10 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
version("2.7.0", sha256="d39fcac7175d701398e4eb209f7e92a5b30a78358d4a0c0fcc23db23c11ba104")
version("2.6.2", sha256="d8ed0151509dd2b0f317b318a4175f8b95a174340fc3080b8c20617da8aa4d2f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# ==========================================================================
# Variants
# ==========================================================================
@@ -83,10 +88,10 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
values=("99", "11", "14", "17"),
)
- # Logging
+ # Logging (default=0 when "@6.2.0:6.7.0", default=2 when "@7.0.0:")
variant(
"logging-level",
- default="0",
+ default="2",
description="logging level\n 0 = no logging,\n 1 = errors,\n "
"2 = errors + warnings,\n 3 = errors + "
"warnings + info,\n 4 = errors + warnings + info + debugging, "
@@ -96,12 +101,12 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
when="@6.2.0:",
)
- # MPI logging
+ # MPI logging (option removed in 7.0)
variant(
"logging-mpi",
default="OFF",
description="enable MPI support in the logger",
- when="@6.2.0:",
+ when="@6.2.0:6.7.0",
)
# Real type
@@ -164,10 +169,11 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
variant("examples", default=True, description="Enable examples")
variant("examples-install", default=True, description="Install examples")
- # Generic (std-c) math libraries (UNIX only)
+ # Generic (std-c) math libraries (UNIX only) (option removed in 7.0)
variant(
"generic-math",
default=True,
+ when="@:6.7.0",
description="Use generic (std-c) math libraries on unix systems",
)
@@ -195,7 +201,6 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# External libraries incompatible with 64-bit indices
conflicts("+lapack", when="@3.0.0: +int64")
- conflicts("+hypre", when="+hypre@:2.6.1a +int64")
# External libraries incompatible with single precision
conflicts("+klu", when="precision=single")
@@ -220,8 +225,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# ==========================================================================
# Build dependencies
- depends_on("cmake@3.12:", type="build")
- depends_on("cmake@3.18:", when="+cuda", type="build")
+ depends_on("cmake@3.18:", type="build")
# MPI related dependencies
depends_on("mpi", when="+mpi")
@@ -281,9 +285,17 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# ==========================================================================
# Patches
# ==========================================================================
+ # https://github.com/LLNL/sundials/pull/434
+ # https://github.com/LLNL/sundials/pull/437
+ patch("sundials-hip-platform.patch", when="@7.0.0 +rocm")
+
# https://github.com/spack/spack/issues/29526
patch("nvector-pic.patch", when="@6.1.0:6.2.0 +rocm")
+ # Backward compatibility is stopped from ROCm 6.0
+ # Need to follow the changes similar to PR https://github.com/LLNL/RAJA/pull/1568
+ patch("Change-HIP_PLATFORM-from-HCC-to-AMD-and-NVCC-to-NVIDIA.patch", when="^hip@6.0 +rocm")
+
# remove OpenMP header file and function from hypre vector test code
patch("test_nvector_parhyp.patch", when="@2.7.0:3.0.0")
patch("FindPackageMultipass.cmake.patch", when="@5.0.0")
@@ -333,7 +345,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
args.extend(
[
define("SUNDIALS_INDEX_SIZE", intsize),
- define("SUNDIALS_INDEX_TYPE", "int{}_t".format(intsize)),
+ define("SUNDIALS_INDEX_TYPE", f"int{intsize}_t"),
]
)
@@ -386,6 +398,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
if "+cuda" in spec:
args.append(define("CMAKE_CUDA_ARCHITECTURES", spec.variants["cuda_arch"].value))
+ args.append(define("CUDAToolkit_ROOT", self.spec["cuda"].prefix))
if "+rocm" in spec:
args.extend(
@@ -659,7 +672,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
f2003_files = [
"arkode/F2003_serial/Makefile",
"cvode/F2003_serial/Makefile",
- "cvodes/F2003_serial/Makefike",
+ "cvodes/F2003_serial/Makefile",
"ida/F2003_serial/Makefile",
"idas/F2003_serial/Makefile",
"kinsol/F2003_serial/Makefile",
@@ -721,6 +734,8 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# Q: should the result be ordered by dependency?
else:
sun_libs = ["libsundials_" + p for p in query_parameters]
+ if self.spec.satisfies("@7:"):
+ sun_libs += ["libsundials_core"]
is_shared = "+shared" in self.spec
libs = find_libraries(sun_libs, root=self.prefix, shared=is_shared, recursive=True)
@@ -729,119 +744,95 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
- def test_install(self):
- """Perform make test_install."""
+ def check_test_install(self):
+ """Perform test_install on the build."""
with working_dir(self.build_directory):
make("test_install")
@property
- def _smoke_tests(self):
- # smoke_tests tuple: exe, args, purpose, use cmake (true/false)
- smoke_tests = [
- ("nvector/serial/test_nvector_serial", ["10", "0"], "Test serial N_Vector", False)
- ]
- if "+CVODE" in self.spec:
- smoke_tests.append(("cvode/serial/cvAdvDiff_bnd", [], "Test CVODE", True))
+ def _smoke_tests_path(self):
+ # examples/smoke-tests are cached for testing
+ return self.prefix.examples
- if "+cuda" in self.spec:
- smoke_tests.append(
- ("nvector/cuda/test_nvector_cuda", ["10", "0", "0"], "Test CUDA N_Vector", True)
- )
- if "+CVODE" in self.spec:
- smoke_tests.append(
- ("cvode/cuda/cvAdvDiff_kry_cuda", [], "Test CVODE with CUDA", True)
- )
+ def run_example(self, exe_path, opts, cmake_bool):
+ """Common sundials test method"""
+ if "~examples-install" in self.spec:
+ raise SkipTest("Package must be installed with +examples-install")
- if "+rocm" in self.spec:
- smoke_tests.append(
- ("nvector/hip/test_nvector_hip", ["10", "0", "0"], "Test HIP N_Vector", True)
- )
- if "+CVODE" in self.spec:
- smoke_tests.append(
- ("cvode/hip/cvAdvDiff_kry_hip", [], "Test CVODE with HIP", True)
- )
+ (dirname, basename) = os.path.split(exe_path)
+ srcpath = join_path(self._smoke_tests_path, dirname)
+ if not os.path.exists(srcpath):
+ raise SkipTest(f"Example '{basename}' source directory not found in {self.version}")
- if "+sycl" in self.spec:
- smoke_tests.append(
- ("nvector/sycl/test_nvector_sycl", ["10", "0", "0"], "Test SYCL N_Vector")
- )
- if "+CVODE" in self.spec:
- smoke_tests.append(
- ("cvode/sycl/cvAdvDiff_kry_sycl", [], "Test CVODE with SYCL", True)
- )
+ # copy the example's directory to the test stage
+ mkdirp(dirname)
+ install_tree(srcpath, dirname)
- return smoke_tests
+ # build and run the example
+ with working_dir(dirname):
+ if cmake_bool:
+ deps = "sundials mpi"
+ prefixes = ";".join([self.spec[x].prefix for x in deps.split()])
+ cmake = self.spec["cmake"].command
+ cmake("-DCMAKE_PREFIX_PATH=" + prefixes, ".")
- @property
- def _smoke_tests_path(self):
- # examples/smoke-tests are cached for testing
- return self.prefix.examples
+ make = which("make")
+ make()
+ exe = which(basename)
+ exe(*opts)
+ make("clean")
- # TODO: Replace this method and its 'get' use for cmake path with
- # join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone
- # tests can access build dependencies through self.spec['cmake'].
- def cmake_bin(self, set=True):
- """(Hack) Set/get cmake dependency path."""
- filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
- if set:
- if not os.path.exists(self.install_test_root):
- mkdirp(self.install_test_root)
- with open(filepath, "w") as out_file:
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
- out_file.write("{0}\n".format(cmake_bin))
- elif os.path.isfile(filepath):
- with open(filepath, "r") as in_file:
- return in_file.read().strip()
+ def test_nvector_serial(self):
+ """build and run serial N_Vector"""
+ self.run_example(join_path("nvector", "serial", "test_nvector_serial"), ["10", "0"], False)
- @run_after("install")
- def setup_smoke_tests(self):
- if "+examples-install" in self.spec:
- install_tree(self._smoke_tests_path, join_path(self.install_test_root, "testing"))
- self.cmake_bin(set=True)
+ def test_cvadvdiff_serial(self):
+ """build and run serial cvAdvDiff_bnd"""
+ if "+CVODE" not in self.spec:
+ raise SkipTest("Package must be installed with +CVODE")
- def build_smoke_tests(self):
- cmake_bin = self.cmake_bin(set=False)
+ self.run_example(join_path("cvode", "serial", "cvAdvDiff_bnd"), [], True)
- if not cmake_bin:
- tty.msg("Skipping sundials test: cmake_bin_path.txt not found")
- return
+ def test_nvector_cuda(self):
+ """build and run CUDA N_Vector"""
+ if "+cuda" not in self.spec:
+ raise SkipTest("Package must be installed with +cuda")
- if "~examples-install" in self.spec:
- tty.msg("Skipping sundials test: examples were not installed")
- return
+ self.run_example(join_path("nvector", "cuda", "test_nvector_cuda"), ["10", "0", "0"], True)
- for smoke_test in self._smoke_tests:
- work_dir = join_path(self._smoke_tests_path, os.path.dirname(smoke_test[0]))
- with working_dir(work_dir):
- if smoke_test[3]: # use cmake
- self.run_test(exe=cmake_bin, options=["."])
- self.run_test(exe="make")
+ def test_cvadvdiff_cuda(self):
+ """build and run CUDA cvAdvDiff_kry"""
+ if "+cuda" not in self.spec or "+CVODE" not in self.spec:
+ raise SkipTest("Package must be installed with +cuda+CVODE")
- def run_smoke_tests(self):
- if "~examples-install" in self.spec:
- return
-
- for smoke_test in self._smoke_tests:
- self.run_test(
- exe=join_path(self._smoke_tests_path, smoke_test[0]),
- options=smoke_test[1],
- status=[0],
- installed=True,
- skip_missing=True,
- purpose=smoke_test[2],
- )
+ self.run_example(join_path("cvode", "cuda", "cvAdvDiff_kry_cuda"), [], True)
- def clean_smoke_tests(self):
- if "~examples-install" in self.spec:
- return
-
- for smoke_test in self._smoke_tests:
- work_dir = join_path(self._smoke_tests_path, os.path.dirname(smoke_test[0]))
- with working_dir(work_dir):
- self.run_test(exe="make", options=["clean"])
-
- def test(self):
- self.build_smoke_tests()
- self.run_smoke_tests()
- self.clean_smoke_tests()
- return
+ def test_nvector_hip(self):
+ """build and run ROCM N_Vector"""
+ if "+rocm" not in self.spec:
+ raise SkipTest("Package must be installed with +rocm")
+
+ self.run_example(join_path("nvector", "hip", "test_nvector_hip"), ["10", "0", "0"], True)
+
+ def test_cvadvdiff_hip(self):
+ """build and run ROCM cvAdvDiff_kry"""
+ if "+rocm" not in self.spec or "+CVODE" not in self.spec:
+ raise SkipTest("Package must be installed with +rocm+CVODE")
+
+ self.run_example(join_path("cvode", "hip", "cvAdvDiff_kry_hip"), [], True)
+
+ def test_nvector_sycl(self):
+ """build and run SYCL N_Vector"""
+ if "+sycl" not in self.spec:
+ raise SkipTest("Package must be installed with +sycl")
+
+ self.run_example(
+ join_path("nvector", "sycl", "test_nvector_sycl"), ["10", "0", "0"], False
+ )
+
+ def test_sycl_cvode(self):
+ """build and run SYCL cvAdvDiff_kry"""
+ if "+sycl" not in self.spec or "+CVODE" not in self.spec:
+ raise SkipTest("Package must be installed with +sycl and +CVODE")
+
+ self.run_example(join_path("cvode", "sycl", "cvAdvDiff_kry_sycl"), [], True)
diff --git a/var/spack/repos/builtin/packages/sundials/sundials-hip-platform.patch b/var/spack/repos/builtin/packages/sundials/sundials-hip-platform.patch
new file mode 100644
index 0000000000..c4092c9385
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sundials/sundials-hip-platform.patch
@@ -0,0 +1,33 @@
+diff -ruN spack-src/cmake/SundialsSetupHIP.cmake spack-src-patched/cmake/SundialsSetupHIP.cmake
+--- spack-src/cmake/SundialsSetupHIP.cmake 2024-02-29 22:47:30.000000000 +0000
++++ spack-src-patched/cmake/SundialsSetupHIP.cmake 2024-06-07 15:22:57.920619263 +0000
+@@ -32,9 +32,9 @@
+
+ if(NOT DEFINED HIP_PLATFORM)
+ if(NOT DEFINED ENV{HIP_PLATFORM})
+- set(HIP_PLATFORM "hcc" CACHE STRING "HIP platform (hcc, nvcc)")
++ set(HIP_PLATFORM "amd" CACHE STRING "HIP platform (amd, nvidia)")
+ else()
+- set(HIP_PLATFORM "$ENV{HIP_PLATFORM}" CACHE STRING "HIP platform (hcc, nvcc)")
++ set(HIP_PLATFORM "$ENV{HIP_PLATFORM}" CACHE STRING "HIP platform (amd, nvidia)")
+ endif()
+ endif()
+
+diff -ruN spack-src/include/sundials/sundials_hip_policies.hpp spack-src-patched/include/sundials/sundials_hip_policies.hpp
+--- spack-src/include/sundials/sundials_hip_policies.hpp 2024-02-29 22:47:30.000000000 +0000
++++ spack-src-patched/include/sundials/sundials_hip_policies.hpp 2024-06-07 15:23:15.752724851 +0000
+@@ -27,10 +27,12 @@
+ namespace sundials {
+ namespace hip {
+
+-#if defined(__HIP_PLATFORM_HCC__)
++#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)
+ constexpr const sunindextype WARP_SIZE = 64;
+-#elif defined(__HIP_PLATFORM_NVCC__)
++#elif defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVDIA__)
+ constexpr const sunindextype WARP_SIZE = 32;
++#else
++#error "Unknown HIP_PLATFORM, report to github.com/LLNL/sundials/issues"
+ #endif
+ constexpr const sunindextype MAX_BLOCK_SIZE = 1024;
+ constexpr const sunindextype MAX_WARPS = MAX_BLOCK_SIZE / WARP_SIZE;
diff --git a/var/spack/repos/builtin/packages/superchic/package.py b/var/spack/repos/builtin/packages/superchic/package.py
index e1cbcf3c7a..6d874bfd6f 100644
--- a/var/spack/repos/builtin/packages/superchic/package.py
+++ b/var/spack/repos/builtin/packages/superchic/package.py
@@ -23,6 +23,8 @@ class Superchic(MakefilePackage):
version("3.06", sha256="17b4f56e85634f3c9708d5263772d7035fe4d7fb91a11bbffe889e0860efbd02")
version("3.05", sha256="032f5c784f284ca02003a990234b099f61cd125791d56715680cd342e55c7da1")
+ depends_on("fortran", type="build") # generated
+
depends_on("lhapdf")
depends_on("apfel", when="@4.01:")
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py
index e4ccfe3665..0e3844bcc3 100644
--- a/var/spack/repos/builtin/packages/superlu-dist/package.py
+++ b/var/spack/repos/builtin/packages/superlu-dist/package.py
@@ -16,10 +16,12 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage):
tags = ["e4s"]
- maintainers("xiaoye", "gchavez2", "balay", "pghysels", "liuyangzhuan")
+ maintainers("xiaoyeli", "gchavez2", "balay", "pghysels", "liuyangzhuan")
version("develop", branch="master")
version("amd", branch="amd")
+ version("9.1.0", sha256="1cb2c6dc7e8231b2ec30c1266e55e440ffca9f55527771d8df28f900dd179f9d")
+ version("9.0.0", sha256="aa43d33d4b1b0f5f7b5ad7685e9a6bc25088832c6c74d2ab8f75a2c9f4e9e955")
version("8.2.1", sha256="b77d065cafa6bc1a1dcc15bf23fd854f54b05762b165badcffc195835ad2bddf")
version("8.2.0", sha256="d53573e5a399b2b4ab1fcc36e8421c1b6fab36345c0af14f8fa20326e3365f1f")
version("8.1.2", sha256="7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b")
@@ -45,6 +47,10 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage):
version("5.1.0", sha256="73f292ab748b590b6dd7469e6986aeb95d279b8b8b3da511c695a396bdbc996c")
version("5.0.0", sha256="78d1d6460ff16b3f71e4bcd7306397574d54d421249553ccc26567f00a10bfc6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("int64", default=False, description="Build with 64 bit integers")
variant(
"openmp",
@@ -93,8 +99,8 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage):
append_define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx)
append_define("CMAKE_INSTALL_LIBDIR", self.prefix.lib)
append_define("CMAKE_INSTALL_BINDIR", self.prefix.bin)
- append_define("TPL_BLAS_LIBRARIES", spec["blas"].libs)
- append_define("TPL_LAPACK_LIBRARIES", spec["lapack"].libs)
+ append_define("TPL_BLAS_LIBRARIES", spec["blas"].libs.ld_flags)
+ append_define("TPL_LAPACK_LIBRARIES", spec["lapack"].libs.ld_flags)
append_define("TPL_ENABLE_LAPACKLIB", True)
append_define("USE_XSDK_DEFAULTS", True)
@@ -165,7 +171,7 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage):
def cache_test_sources(self):
"""Copy the example matrices after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
def test_pddrive(self):
"""run cached pddrive"""
diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py
index 788500d536..46786c508f 100644
--- a/var/spack/repos/builtin/packages/superlu-mt/package.py
+++ b/var/spack/repos/builtin/packages/superlu-mt/package.py
@@ -16,9 +16,15 @@ class SuperluMt(Package):
homepage = "https://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_mt_3.1.tar.gz"
+ git = "https://github.com/xiaoyeli/superlu_mt"
+ version("master", branch="master")
+ version("4.0.1", tag="v4.0.1", commit="1300aec2a46327ecdd34fc7460d56e86e5431f79")
version("3.1", sha256="407b544b9a92b2ed536b1e713e80f986824cf3016657a4bfc2f3e7d2a76ecab6")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("int64", default=False, description="Build with 64 bit integers")
variant("pic", default=True, description="Build with position independent code")
variant("blas", default=True, description="Build with external BLAS library")
@@ -125,6 +131,9 @@ class SuperluMt(Package):
# Set up make include file manually
self.configure(spec)
+ # Workaround Makefile bug where lib directory is not always created
+ mkdirp("lib")
+
# BLAS needs to be compiled separately if using internal BLAS library
if "+blas" not in spec:
make("blaslib")
diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py
index df5c7bcaaf..92f7481bef 100644
--- a/var/spack/repos/builtin/packages/superlu/package.py
+++ b/var/spack/repos/builtin/packages/superlu/package.py
@@ -34,16 +34,17 @@ class Superlu(CMakePackage, Package):
version(
"4.3",
sha256="169920322eb9b9c6a334674231479d04df72440257c17870aaa0139d74416781",
- deprecated=True,
url="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz",
)
version(
"4.2",
sha256="5a06e19bf5a597405dfeea39fe92aa8c5dd41da73c72c7187755a75f581efb28",
- deprecated=True,
url="https://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.2.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
build_system(
conditional("cmake", when="@5:"), conditional("generic", when="@:4"), default="cmake"
)
@@ -83,7 +84,7 @@ class Superlu(CMakePackage, Package):
superlu()
-class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
+class AnyBuilder(BaseBuilder):
@run_after("install")
def setup_standalone_tests(self):
"""Set up and copy example source files after the package is installed
@@ -115,7 +116,7 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
filter_file(r"include \.\./" + filename, "include ./" + filename, makefile)
# Cache the examples directory for use by stand-alone tests
- self.pkg.cache_extra_test_sources(self.pkg.examples_src_dir)
+ cache_extra_test_sources(self.pkg, self.pkg.examples_src_dir)
def _make_hdr_for_test(self, lib):
"""Standard configure arguments for make.inc"""
@@ -137,7 +138,7 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
]
-class CMakeBuilder(BaseBuilder, spack.build_systems.cmake.CMakeBuilder):
+class CMakeBuilder(AnyBuilder, spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
if self.pkg.version > Version("5.2.1"):
_blaslib_key = "enable_internal_blaslib"
@@ -152,7 +153,7 @@ class CMakeBuilder(BaseBuilder, spack.build_systems.cmake.CMakeBuilder):
return args
-class GenericBuilder(BaseBuilder, spack.build_systems.generic.GenericBuilder):
+class GenericBuilder(AnyBuilder, spack.build_systems.generic.GenericBuilder):
def install(self, pkg, spec, prefix):
"""Use autotools before version 5"""
# Define make.inc file
diff --git a/var/spack/repos/builtin/packages/supermagic/package.py b/var/spack/repos/builtin/packages/supermagic/package.py
new file mode 100644
index 0000000000..23baff3c02
--- /dev/null
+++ b/var/spack/repos/builtin/packages/supermagic/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Supermagic(AutotoolsPackage):
+ """Supermagic is a very simple MPI sanity code. Nothing more, nothing less."""
+
+ homepage = "https://hpc.github.io/supermagic"
+ url = "https://hpc.github.io/supermagic/dists/supermagic-1.2.tar.gz"
+ git = "https://github.com/hpc/supermagic.git"
+
+ maintainers("marcodelapierre")
+
+ version("master", branch="master")
+ version("1.2", sha256="f8f6e0f74a58400d8d3c6b95c4b943aa8608e15a318fcfe12fc9abb008aed734")
+
+ depends_on("mpi")
+
+ depends_on("autoconf", when="@master", type="build")
+ depends_on("automake", when="@master", type="build")
+ depends_on("libtool", when="@master", type="build")
+
+ @when("@master")
+ def autoreconf(self, spec, prefix):
+ bash = which("bash")
+ bash("./autogen")
+
+ def configure_args(self):
+ config_args = ["CC={0}".format(self.spec["mpi"].mpicc)]
+ return config_args
diff --git a/var/spack/repos/builtin/packages/survey/package.py b/var/spack/repos/builtin/packages/survey/package.py
index 8ff7a737cd..1de6c410db 100644
--- a/var/spack/repos/builtin/packages/survey/package.py
+++ b/var/spack/repos/builtin/packages/survey/package.py
@@ -27,13 +27,14 @@ class Survey(CMakePackage):
jeg@trenzasynergy.com
"""
- homepage = "http://www.trenzasynergy.com"
+ homepage = "https://www.trenzasynergy.com"
git = "ssh://git@gitlab.com/trenza/survey.git"
maintainers("jgalarowicz")
version("master", branch="master")
version("1.0.9", branch="1.0.9")
+ version("1.0.8.1", branch="1.0.8.1")
version("1.0.8", tag="1.0.8")
version("1.0.7", tag="1.0.7")
version("1.0.6", tag="1.0.6")
@@ -69,7 +70,7 @@ class Survey(CMakePackage):
depends_on("llvm-openmp@12.0.1", type=("build", "link"), when="@1.0.3:")
# MPI Installation
- depends_on("mpi", when="+mpi")
+ depends_on("mpi", type="build", when="+mpi")
depends_on("python@3:", type=("build", "run"))
depends_on("py-setuptools", type="build")
diff --git a/var/spack/repos/builtin/packages/sw4/package.py b/var/spack/repos/builtin/packages/sw4/package.py
index a277513d66..32515f1199 100644
--- a/var/spack/repos/builtin/packages/sw4/package.py
+++ b/var/spack/repos/builtin/packages/sw4/package.py
@@ -20,6 +20,9 @@ class Sw4(MakefilePackage):
version("developer", branch="developer")
version("3.0", tag="v3.0", commit="13e6d431976f7fc49124c997bf87353aa7afd35e")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="build with OpenMP")
variant("hdf5", default=True, description="build with HDF5")
variant("proj", default=True, description="build with proj")
@@ -60,7 +63,7 @@ class Sw4(MakefilePackage):
os.environ["EXTRA_LINK_FLAGS"] += spec["llvm-openmp"].libs.ld_flags + " "
# From spack/trilinos
- if spec.compiler.name in ["clang", "apple-clang", "gcc"]:
+ if spec.satisfies("%gcc") or spec.satisfies("%clang") or spec.satisfies("%apple-clang"):
fc = Executable(self.compiler.fc)
libgfortran = fc("--print-file-name", "libgfortran." + dso_suffix, output=str).strip()
if libgfortran == "libgfortran." + dso_suffix:
diff --git a/var/spack/repos/builtin/packages/swan/package.py b/var/spack/repos/builtin/packages/swan/package.py
index e510cb90f3..d88c7bf1f1 100644
--- a/var/spack/repos/builtin/packages/swan/package.py
+++ b/var/spack/repos/builtin/packages/swan/package.py
@@ -32,6 +32,8 @@ class Swan(MakefilePackage):
version("4141", sha256="5d411e6602bd4ef764f6c7d23e5e25b588e955cb21a606d6d8a7bc4c9393aa0a")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("netcdf-fortran")
depends_on("perl", type="build")
diff --git a/var/spack/repos/builtin/packages/swap-assembler/package.py b/var/spack/repos/builtin/packages/swap-assembler/package.py
index ef7c2eb7d8..56c31d9439 100644
--- a/var/spack/repos/builtin/packages/swap-assembler/package.py
+++ b/var/spack/repos/builtin/packages/swap-assembler/package.py
@@ -16,6 +16,8 @@ class SwapAssembler(MakefilePackage):
version("0.4", sha256="45632e25578aacfbacd76df9697cbc798e09ac92284d9c9c07be15e0eb348e0d")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpich")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/swarm/package.py b/var/spack/repos/builtin/packages/swarm/package.py
index 9bcc5b9b27..7837296ff4 100644
--- a/var/spack/repos/builtin/packages/swarm/package.py
+++ b/var/spack/repos/builtin/packages/swarm/package.py
@@ -17,6 +17,8 @@ class Swarm(MakefilePackage):
version("3.0.0", sha256="b63761a9914ebf1fee14befaffd93af9c795b692c006c644d049a6d985b55810")
version("2.1.13", sha256="ec4b22cc1874ec6d2c89fe98e23a2fb713aec500bc4a784f0556389d22c02650")
+ depends_on("cxx", type="build") # generated
+
conflicts("@2.1.13", when="target=aarch64:")
build_directory = "src"
diff --git a/var/spack/repos/builtin/packages/swftools/package.py b/var/spack/repos/builtin/packages/swftools/package.py
index ecf06eb8d3..8fbdc29189 100644
--- a/var/spack/repos/builtin/packages/swftools/package.py
+++ b/var/spack/repos/builtin/packages/swftools/package.py
@@ -21,6 +21,9 @@ class Swftools(AutotoolsPackage):
version("0.9.2", sha256="bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
patch("configure.patch")
patch("swfs_Makefile.in.patch")
patch(
diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py
index 5bb38e1beb..a92e992a74 100644
--- a/var/spack/repos/builtin/packages/swiftsim/package.py
+++ b/var/spack/repos/builtin/packages/swiftsim/package.py
@@ -23,6 +23,8 @@ class Swiftsim(AutotoolsPackage):
version("0.7.0", sha256="d570e83e1038eb31bc7ae95d1903a2371fffbca90d08f60b6b32bb0fd8a6f516")
version("0.3.0", sha256="dd26075315cb2754dc1292e8d838bbb83739cff7f068a98319b80b9c2b0f84bc")
+ depends_on("c", type="build") # generated
+
variant("mpi", default=True, description="Enable distributed memory parallelism")
# Build dependencies
diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py
index 99e35b1b3e..8e2230f176 100644
--- a/var/spack/repos/builtin/packages/swig/package.py
+++ b/var/spack/repos/builtin/packages/swig/package.py
@@ -19,7 +19,7 @@ class Swig(AutotoolsPackage, SourceforgePackage):
features that let you tailor the wrapping process to suit your
application."""
- homepage = "http://www.swig.org"
+ homepage = "https://www.swig.org"
sourceforge_mirror_path = "swig/swig-3.0.12.tar.gz"
maintainers("sethrj")
@@ -69,6 +69,9 @@ class Swig(AutotoolsPackage, SourceforgePackage):
url="https://github.com/swig-fortran/swig/archive/v4.0.2+fortran.tar.gz",
)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("pcre", when="@:4.0")
depends_on("pcre2", when="@4.1:")
depends_on("zlib-api")
@@ -148,7 +151,7 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def create_symlink(self):
# CMake compatibility: see https://github.com/spack/spack/pull/6240
with working_dir(self.prefix.bin):
- os.symlink("swig", "swig{0}".format(self.spec.version.up_to(2)))
+ os.symlink("swig", "swig{0}.0".format(self.spec.version.up_to(1)))
@when(Swig.AUTOCONF_VERSIONS)
def autoreconf(self, pkg, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/swipl/package.py b/var/spack/repos/builtin/packages/swipl/package.py
index 3d4db45c9c..3942c0ceb8 100644
--- a/var/spack/repos/builtin/packages/swipl/package.py
+++ b/var/spack/repos/builtin/packages/swipl/package.py
@@ -27,6 +27,9 @@ class Swipl(CMakePackage):
version("8.2.0", sha256="d8c9f3adb9cd997a5fed7b5f5dbfe971d2defda969b9066ada158e4202c09c3c")
version("8.0.3", sha256="cee59c0a477c8166d722703f6e52f962028f3ac43a5f41240ecb45dbdbe2d6ae")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("gmp", default=True, description="bignum and rational number support")
variant("xpce", default=True, description="GUI support")
variant("ssl", default=True, description="SSL support")
diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py
index 68f45f6139..e460812688 100644
--- a/var/spack/repos/builtin/packages/symengine/package.py
+++ b/var/spack/repos/builtin/packages/symengine/package.py
@@ -30,6 +30,9 @@ class Symengine(CMakePackage):
version("0.2.0", sha256="64d050b0b9decd12bf4ea3b7d18d3904dd7cb8baaae9fbac1b8068e3c59709be")
version("0.1.0", sha256="daba3ba0ae91983a772f66bf755b1953c354fe6dc353588b23705d9a79b011fc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"boostmp", default=False, description="Compile with Boost multi-precision integer library"
)
diff --git a/var/spack/repos/builtin/packages/symlinks/package.py b/var/spack/repos/builtin/packages/symlinks/package.py
index 5d5f8cef22..b6ba210f1d 100644
--- a/var/spack/repos/builtin/packages/symlinks/package.py
+++ b/var/spack/repos/builtin/packages/symlinks/package.py
@@ -14,6 +14,8 @@ class Symlinks(MakefilePackage):
version("1.4", sha256="b0bb689dd0a2c46d9a7dd111b053707aba7b9cf29c4f0bad32984b14bdbe0399")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
filter_file("/usr/local", prefix, "Makefile", string=True)
filter_file("-o root -g root", "", "Makefile")
diff --git a/var/spack/repos/builtin/packages/sympack/package.py b/var/spack/repos/builtin/packages/sympack/package.py
new file mode 100644
index 0000000000..211265ab01
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sympack/package.py
@@ -0,0 +1,93 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Sympack(CMakePackage, CudaPackage):
+ """symPACK is a sparse symmetric matrix direct linear solver,
+ with optional support for CUDA devices"""
+
+ homepage = "https://go.lbl.gov/sympack"
+ url = "https://github.com/symPACK/symPACK/archive/refs/tags/v3.0.tar.gz"
+ git = "https://github.com/symPACK/symPACK.git"
+
+ maintainers("bonachea")
+
+ version("master", branch="master")
+
+ version("3.0", sha256="bd04284bb6a309a71cd4f9f54f72345ff98fa7ba5719498df1e8a00ef05c41de")
+ version("2.0.1", sha256="21c172e902531c94c3bb5932c15de4b4ec9adf9c0d8e2071bb12cdbdfa25ca52")
+ version("2.0", sha256="93fcfbadab73718e249e7ed12641a3c6be58b19cafdf6bad12a6a09c3d1eb4a1")
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("cmake@3.11:", type="build")
+
+ depends_on("upcxx@2019.9.0:")
+ depends_on("upcxx@2022.3.0:+cuda", when="+cuda")
+
+ depends_on("mpi")
+ depends_on("blas")
+
+ variant(
+ "cuda",
+ default=False,
+ when="@3.0:",
+ description="Enables solver to offload large operations to CUDA GPUs",
+ )
+ conflicts("+cuda", when="@:2", msg="symPACK version 3.0 or later required for CUDA support")
+ depends_on("cuda@6.0:", when="+cuda")
+
+ variant("scotch", default=False, description="Enable SCOTCH ordering")
+ depends_on("scotch", when="+scotch")
+
+ variant("ptscotch", default=False, description="Enable PT-SCOTCH ordering")
+ depends_on("scotch+mpi", when="+ptscotch")
+
+ variant("metis", default=False, description="Enable MeTiS ordering")
+ depends_on("metis", when="+metis")
+
+ variant("parmetis", default=False, description="Enable ParMETIS ordering")
+ depends_on("parmetis", when="+parmetis")
+
+ variant(
+ "network",
+ default="auto",
+ multi=False,
+ values=("auto", "ibv", "udp", "ofi", "ucx", "aries", "mpi"),
+ description="The hardware-dependent UPC++ network backend to use.\n"
+ + "'auto' selects the default network provided by the UPC++ install.\n"
+ + "Note: smp-conduit is currently incompatible with symPACK, "
+ + "udp is recommended for single-node configurations.",
+ )
+
+ build_targets = ["all", "run_sympack2D"]
+
+ def cmake_args(self):
+ # UPC++ is picky about what C++ compiler we use:
+ meta = join_path(self.spec["upcxx"].prefix.bin, "upcxx-meta")
+ cxx = Executable(meta)("CXX", output=str, error=str).strip()
+ args = [
+ self.define("CMAKE_CXX_COMPILER", cxx),
+ self.define_from_variant("ENABLE_CUDA", "cuda"),
+ self.define_from_variant("ENABLE_SCOTCH", "scotch"),
+ self.define_from_variant("ENABLE_PTSCOTCH", "ptscotch"),
+ self.define_from_variant("ENABLE_METIS", "metis"),
+ self.define_from_variant("ENABLE_PARMETIS", "parmetis"),
+ ]
+ return args
+
+ def setup_build_environment(self, env):
+ spec = self.spec
+ if "network=auto" not in spec:
+ env.set("UPCXX_NETWORK", spec.variants["network"].value)
+
+ @run_after("install")
+ def finish_install(self):
+ # Test driver is not installed by default
+ mkdirp(self.prefix.bin)
+ install(join_path(self.build_directory, "run_sympack2D"), self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sympol/package.py b/var/spack/repos/builtin/packages/sympol/package.py
index 45511c400e..325d8e1317 100644
--- a/var/spack/repos/builtin/packages/sympol/package.py
+++ b/var/spack/repos/builtin/packages/sympol/package.py
@@ -18,6 +18,9 @@ class Sympol(CMakePackage):
version("0.1.8", sha256="8f4c013fa563e696fc8c27c408fd1f3d47783639815e8141e3a99826f1f3d54f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.6:", type="build")
depends_on("bliss")
diff --git a/var/spack/repos/builtin/packages/sys-sage/package.py b/var/spack/repos/builtin/packages/sys-sage/package.py
index c96dd329a3..6318c11868 100644
--- a/var/spack/repos/builtin/packages/sys-sage/package.py
+++ b/var/spack/repos/builtin/packages/sys-sage/package.py
@@ -17,10 +17,13 @@ class SysSage(CMakePackage):
license("Apache-2.0")
+ version("0.5.0", sha256="044e53bf0f3873325fa4dedb510849d58b23b5a2c654d41b1389a318b2cb7ee1")
version("0.4.3", sha256="e24313c4274576c1511a62e1b27c86a78cea7e4c123b8a53303cfc70de978faa")
version("master", branch="master")
version("develop", branch="develop")
+ depends_on("cxx", type="build") # generated
+
conflicts("%gcc@:7", msg="gcc can be used from version 8 and above")
variant(
diff --git a/var/spack/repos/builtin/packages/sysbench/package.py b/var/spack/repos/builtin/packages/sysbench/package.py
index b1843bf49d..768220ea9b 100644
--- a/var/spack/repos/builtin/packages/sysbench/package.py
+++ b/var/spack/repos/builtin/packages/sysbench/package.py
@@ -18,6 +18,9 @@ class Sysbench(AutotoolsPackage):
version("1.0.19", sha256="39cde56b58754d97b2fe6a1688ffc0e888d80c262cf66daee19acfb2997f9bdd")
version("1.0.18", sha256="c679b285e633c819d637bdafaeacc1bec13f37da5b3357c7e17d97a71bf28cb1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/syscalc/package.py b/var/spack/repos/builtin/packages/syscalc/package.py
index eb59fef8c4..c266720811 100644
--- a/var/spack/repos/builtin/packages/syscalc/package.py
+++ b/var/spack/repos/builtin/packages/syscalc/package.py
@@ -19,6 +19,9 @@ class Syscalc(MakefilePackage):
extension=".tgz",
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
tags = ["hep"]
depends_on("lhapdf@6:")
diff --git a/var/spack/repos/builtin/packages/sysfsutils/package.py b/var/spack/repos/builtin/packages/sysfsutils/package.py
index b2267ef721..99a3728497 100644
--- a/var/spack/repos/builtin/packages/sysfsutils/package.py
+++ b/var/spack/repos/builtin/packages/sysfsutils/package.py
@@ -23,6 +23,8 @@ class Sysfsutils(AutotoolsPackage):
version("0_4_0", sha256="9c78edb118c6bd962e04558ddb2df46d456273284fe3f23bb930dc287225aea5")
version("0_3_0", sha256="f10250aa09513d245cb4ed61ac0dbfd7dfb2e7810bcd8804a07b3fe18f08a74a")
+ depends_on("c", type="build") # generated
+
@when("target=aarch64:")
def configure_args(self):
args = ["--build=arm-linux"]
diff --git a/var/spack/repos/builtin/packages/sysget/package.py b/var/spack/repos/builtin/packages/sysget/package.py
index bbad2d2244..afb5106025 100644
--- a/var/spack/repos/builtin/packages/sysget/package.py
+++ b/var/spack/repos/builtin/packages/sysget/package.py
@@ -21,6 +21,8 @@ class Sysget(MakefilePackage):
version("2.2", sha256="8f55ee8402d6de3cc16fa0577148b484e35da6688ad5f3ee3e9c1be04c88863a")
version("2.1", sha256="0590aaae10494ca76c6749264925feb0e40b6e4b3822a8a4d148761addcb66c1")
+ depends_on("cxx", type="build") # generated
+
def edit(self, spec, prefix):
if os.path.exists("Makefile"):
makefile = FileFilter("Makefile")
diff --git a/var/spack/repos/builtin/packages/sysstat/package.py b/var/spack/repos/builtin/packages/sysstat/package.py
index e4fab86b95..16940d3412 100644
--- a/var/spack/repos/builtin/packages/sysstat/package.py
+++ b/var/spack/repos/builtin/packages/sysstat/package.py
@@ -17,8 +17,18 @@ class Sysstat(AutotoolsPackage):
license("GPL-2.0-or-later")
- version("12.4.5", sha256="4e35abdd9eaf766ecdab55786f459093f3e1c350db23e57a15561afda417ff0d")
- version("12.2.0", sha256="614ab9fe8e7937a3edb7b2b6760792a3764ea3a7310ac540292dd0e3dfac86a6")
+ version("12.7.6", sha256="dc77a08871f8e8813448ea31048833d4acbab7276dd9a456cd2526c008bd5301")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-33204
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-39377
+ version(
+ "12.4.5", sha256="4e35abdd9eaf766ecdab55786f459093f3e1c350db23e57a15561afda417ff0d"
+ )
+ version(
+ "12.2.0", sha256="614ab9fe8e7937a3edb7b2b6760792a3764ea3a7310ac540292dd0e3dfac86a6"
+ )
+
+ depends_on("c", type="build") # generated
depends_on("pkgconfig", type="build")
depends_on("gettext")
diff --git a/var/spack/repos/builtin/packages/systemc/package.py b/var/spack/repos/builtin/packages/systemc/package.py
index 403bbf28a2..89ed1c6bec 100644
--- a/var/spack/repos/builtin/packages/systemc/package.py
+++ b/var/spack/repos/builtin/packages/systemc/package.py
@@ -19,6 +19,9 @@ class Systemc(CMakePackage):
version("2.3.3", sha256="5781b9a351e5afedabc37d145e5f7edec08f3fd5de00ffeb8fa1f3086b1f7b3f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"cxxstd",
values=("11", "14", "17", "20"),
diff --git a/var/spack/repos/builtin/packages/systemd/package.py b/var/spack/repos/builtin/packages/systemd/package.py
new file mode 100644
index 0000000000..cbd6596c1c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/systemd/package.py
@@ -0,0 +1,155 @@
+# Copyright 2013-2023 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 glob
+import os
+
+from spack.package import *
+
+
+class Systemd(MesonPackage):
+ """systemd is a suite of basic building blocks for a Linux system.
+ It provides a system and service manager that runs as PID 1 and
+ starts the rest of the system."""
+
+ homepage = "https://systemd.io/"
+ url = "https://github.com/systemd/systemd/archive/refs/tags/v255.tar.gz"
+ license("GPL-2.0-only")
+
+ version("256.7", sha256="896d76ff65c88f5fd9e42f90d152b0579049158a163431dd77cdc57748b1d7b0")
+ version("255", sha256="28854ffb2cb5f9e07fcbdbaf1e03a80b3462a12edeef84893ca2f37b22e4491e")
+
+ depends_on("c", type="build") # generated
+
+ depends_on("meson@0.60.0:", type="build")
+ depends_on("ninja", type="build")
+ depends_on("py-jinja2", type="build")
+ depends_on("util-linux@2.30:") # libmount
+ depends_on("gperf")
+ depends_on("libcap")
+ depends_on("pkgconfig")
+
+ conflicts("%gcc@:8.4")
+ conflicts("%clang@:7")
+
+ def meson_args(self):
+ # Setting prefix is required here because without this the installation
+ # prefix would be repeated twice because of the required use of DESTDIR
+ # during the install phase.
+ # Similarly libdir must be set to prevent the regular prefix path from
+ # influencing the placement of the installed files.
+ args = [
+ "-Dprefix=/",
+ "-Dlibdir=/lib",
+ "-Dlibidn2=disabled",
+ "-Dopenssl=disabled",
+ "-Dpcre2=disabled",
+ "-Dinitrd=false",
+ "-Dresolve=false",
+ "-Defi=false",
+ "-Dtpm=false",
+ "-Dcreate-log-dirs=false",
+ "-Dseccomp=disabled",
+ "-Dselinux=disabled",
+ "-Dapparmor=disabled",
+ "-Dsmack=false",
+ "-Dpolkit=disabled",
+ "-Dima=false",
+ "-Dacl=disabled",
+ "-Daudit=disabled",
+ "-Dblkid=disabled",
+ "-Dfdisk=disabled",
+ "-Dkmod=false",
+ "-Dpam=disabled",
+ "-Dpasswdqc=disabled",
+ "-Dpwquality=disabled",
+ "-Dmicrohttpd=disabled",
+ "-Dlibcryptsetup=disabled",
+ "-Dlibcurl=disabled",
+ "-Dlibiptc=disabled",
+ "-Dqrencode=disabled",
+ "-Dgcrypt=disabled",
+ "-Dgnutls=disabled",
+ "-Dp11kit=disabled",
+ "-Dlibfido2=disabled",
+ "-Dtpm2=disabled",
+ "-Delfutils=disabled",
+ "-Dzlib=disabled",
+ "-Dbzip2=disabled",
+ "-Dxz=disabled",
+ "-Dlz4=disabled",
+ "-Dzstd=disabled",
+ "-Dxkbcommon=disabled",
+ "-Dbootloader=disabled",
+ "-Dnscd=false", # support for...
+ "-Dutmp=false",
+ "-Dhibernate=false",
+ "-Dldconfig=false",
+ "-Denvironment-d=false",
+ "-Dbinfmt=false",
+ "-Dremote=disabled",
+ "-Dfirstboot=false",
+ "-Drandomseed=false",
+ "-Dbacklight=false",
+ "-Dvconsole=false",
+ "-Dvmspawn=disabled",
+ "-Dquotacheck=false",
+ "-Dsysusers=false",
+ "-Dstoragetm=false",
+ "-Dtmpfiles=false",
+ "-Dimportd=disabled",
+ "-Dhwdb=false",
+ "-Drfkill=false",
+ "-Dgshadow=false",
+ "-Dkmod=disabled",
+ "-Dxenctrl=disabled",
+ "-Drepart=disabled", # install the...
+ "-Dsysupdate=disabled",
+ "-Dcoredump=false",
+ "-Dpstore=false",
+ "-Doomd=false",
+ "-Dlogind=false",
+ "-Dhostnamed=false",
+ "-Dlocaled=false",
+ "-Dmachined=false",
+ "-Dportabled=false",
+ "-Dsysext=false",
+ "-Duserdb=false",
+ "-Dhomed=disabled",
+ "-Dnetworkd=false",
+ "-Dtimedated=false",
+ "-Dtimesyncd=false",
+ "-Dxdg-autostart=false",
+ "-Ddefault-network=false", # install...
+ "-Dnss-myhostname=false",
+ "-Dnss-mymachines=disabled",
+ "-Dnss-resolve=disabled",
+ "-Dnss-systemd=false",
+ "-Dhtml=disabled",
+ "-Dtranslations=false",
+ "-Dinstall-sysconfdir=false",
+ "-Dkernel-install=false",
+ "-Dukify=disabled",
+ "-Danalyze=false",
+ ]
+
+ return args
+
+ def install(self, spec, prefix):
+ # DESTDIR is required because without it the install phase will attempt
+ # to install files in the root file system by default.
+ os.environ["DESTDIR"] = prefix
+ with working_dir(self.build_directory):
+ ninja("install")
+
+ @run_after("install")
+ def symlink_internal_libs(self):
+ with working_dir(self.prefix):
+ # Create symlinks lib/lib*.so* -> lib/systemd/lib*.so* so that executables and
+ # libraries from systemd can find its own libraries in rpaths.
+ for lib_path in glob.glob("lib*/systemd/lib*.so*"):
+ lib_name = os.path.basename(lib_path)
+ lib_dir = os.path.dirname(os.path.dirname(lib_path))
+ os.symlink(os.path.relpath(lib_path, lib_dir), os.path.join(lib_dir, lib_name))
diff --git a/var/spack/repos/builtin/packages/systemtap/package.py b/var/spack/repos/builtin/packages/systemtap/package.py
index 8e5a318448..e7132981cf 100644
--- a/var/spack/repos/builtin/packages/systemtap/package.py
+++ b/var/spack/repos/builtin/packages/systemtap/package.py
@@ -24,6 +24,9 @@ class Systemtap(AutotoolsPackage):
version("4.2", sha256="0984ebe3162274988252ec35074021dc1e8420d87a8b35f437578562fce08781")
version("4.1", sha256="8efa1ee2b34f1c6b2f33a25313287d59c8ed1b00265e900aea874da8baca1e1d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("gettext")
depends_on("elfutils@0.151:")
depends_on("sqlite")
diff --git a/var/spack/repos/builtin/packages/sz-cpp/package.py b/var/spack/repos/builtin/packages/sz-cpp/package.py
index f59ea178fc..c76174fb4e 100644
--- a/var/spack/repos/builtin/packages/sz-cpp/package.py
+++ b/var/spack/repos/builtin/packages/sz-cpp/package.py
@@ -16,6 +16,8 @@ class SzCpp(CMakePackage):
version("2022-01-27", commit="9441b79abc89d4bcce53fe18edf0df53fd92d1d7")
+ depends_on("cxx", type="build") # generated
+
variant("shared", description="build shared libs", default=True)
depends_on("zstd")
diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py
index 30c9faa74f..72fab24143 100644
--- a/var/spack/repos/builtin/packages/sz/package.py
+++ b/var/spack/repos/builtin/packages/sz/package.py
@@ -46,12 +46,18 @@ class Sz(CMakePackage, AutotoolsPackage):
version("1.4.10.0", sha256="cf23cf1ffd7c69c3d3128ae9c356b6acdc03a38f92c02db5d9bfc04f3fabc506")
version("1.4.9.2", sha256="9dc785274d068d04c2836955fc93518a9797bfd409b46fea5733294b7c7c18f8")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
build_system(
conditional("autotools", when="@:2.1.8.0"),
conditional("cmake", when="@2.1.8.1:"),
default="cmake",
)
+ variant("openmp", default=False, description="build the multithreaded version using openmp")
+ variant("examples", default=False, description="build examples")
variant("python", default=False, description="builds the python wrapper")
variant("netcdf", default=False, description="build the netcdf reader")
variant("hdf5", default=False, description="build the hdf5 filter")
@@ -82,6 +88,9 @@ class Sz(CMakePackage, AutotoolsPackage):
patch("ctags-only-if-requested.patch", when="@2.1.8.1:2.1.8.3")
+ # Windows requires numerous commits that only exist on master at the moment
+ conflicts("platform=windows", when="@:2.1.12.5")
+
def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
@@ -92,87 +101,69 @@ class Sz(CMakePackage, AutotoolsPackage):
if "+hdf5" in self.spec:
env.prepend_path("HDF5_PLUGIN_PATH", self.prefix.lib64)
- def _test_2d_float(self):
- """This test performs simple 2D compression/decompression (float)"""
+ def test_2d_float(self):
+ """Run simple 2D compression/decompression"""
test_data_dir = self.test_suite.current_test_data_dir
- filename = "testfloat_8_8_128.dat"
- orifile = test_data_dir.join(filename)
-
- exe = "sz"
- reason = "testing 2D compression of {0}".format(exe)
- options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-2", "8", "1024"]
-
- self.run_test(
- exe,
- options,
- [],
- installed=True,
- purpose=reason,
- skip_missing=True,
- work_dir=test_data_dir,
- )
-
- filename = "testfloat_8_8_128.dat.sz"
- decfile = test_data_dir.join(filename)
-
- reason = "testing 2D decompression of {0}".format(exe)
- options = ["-x", "-f", "-i", orifile, "-s", decfile, "-2", "8", "1024", "-a"]
-
- self.run_test(
- exe,
- options,
- [],
- installed=True,
- purpose=reason,
- skip_missing=True,
- work_dir=test_data_dir,
- )
-
- def _test_3d_float(self):
- """This test performs simple 3D compression/decompression (float)"""
-
+ exe = which(self.prefix.bin.sz)
+ if exe is None:
+ raise SkipTest(f"sz is not installed for version {self.version}")
+
+ with working_dir(test_data_dir):
+ filename = "testfloat_8_8_128.dat"
+ orifile = test_data_dir.join(filename)
+ with test_part(
+ self, "test_2d_float_compression", purpose="testing 2D compression of sz"
+ ):
+ options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-2", "8", "1024"]
+ exe(*options)
+
+ filename = "testfloat_8_8_128.dat.sz"
+ decfile = test_data_dir.join(filename)
+
+ with test_part(
+ self, "test_2d_float_decompression", purpose="testing 2D decompression of sz"
+ ):
+ options = ["-x", "-f", "-i", orifile, "-s", decfile, "-2", "8", "1024", "-a"]
+ exe(*options)
+
+ def test_3d_float(self):
+ """Run simple 3D compression/decompression"""
test_data_dir = self.test_suite.current_test_data_dir
- filename = "testfloat_8_8_128.dat"
- orifile = test_data_dir.join(filename)
-
- exe = "sz"
- reason = "testing 3D compression of {0}".format(exe)
- options = ["-z", "-f", "-i", orifile, "-M", "REL", "-R", "1E-3", "-3", "8", "8", "128"]
-
- self.run_test(
- exe,
- options,
- [],
- installed=True,
- purpose=reason,
- skip_missing=True,
- work_dir=test_data_dir,
- )
-
- filename = "testfloat_8_8_128.dat.sz"
- decfile = test_data_dir.join(filename)
-
- reason = "testing 3D decompression of {0}".format(exe)
- options = ["-x", "-f", "-i", orifile, "-s", decfile, "-3", "8", "8", "128", "-a"]
-
- self.run_test(
- exe,
- options,
- [],
- installed=True,
- purpose=reason,
- skip_missing=True,
- work_dir=test_data_dir,
- )
-
- def test(self):
- """Perform smoke tests on the installed package"""
- # run 2D compression and decompression (float)
- self._test_2d_float()
- # run 3D compression and decompression (float)
- self._test_3d_float()
+ exe = which(self.prefix.bin.sz)
+ if exe is None:
+ raise SkipTest(f"sz is not installed for version {self.version}")
+
+ with working_dir(test_data_dir):
+ filename = "testfloat_8_8_128.dat"
+ orifile = test_data_dir.join(filename)
+ with test_part(
+ self, "test_3d_float_compression", purpose="testing 3D compression of sz"
+ ):
+ options = [
+ "-z",
+ "-f",
+ "-i",
+ orifile,
+ "-M",
+ "REL",
+ "-R",
+ "1E-3",
+ "-3",
+ "8",
+ "8",
+ "128",
+ ]
+ exe(*options)
+
+ filename = "testfloat_8_8_128.dat.sz"
+ decfile = test_data_dir.join(filename)
+ with test_part(
+ self, "test_3d_float_decompression", purpose="testing 3D decompression of sz"
+ ):
+ options = ["-x", "-f", "-i", orifile, "-s", decfile, "-3", "8", "8", "128", "-a"]
+ exe(*options)
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
@@ -201,6 +192,8 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("BUILD_STATS", "stats"),
self.define("BUILD_TESTS", self.pkg.run_tests),
self.define_from_variant("BUILD_PYTHON_WRAPPER", "python"),
+ self.define_from_variant("BUILD_OPENMP", "openmp"),
+ self.define_from_variant("BUILD_SZ_EXAMPLES", "examples"),
]
if "+python" in self.spec:
diff --git a/var/spack/repos/builtin/packages/sz3/package.py b/var/spack/repos/builtin/packages/sz3/package.py
index 9e94f34705..9a1e3a0d0f 100644
--- a/var/spack/repos/builtin/packages/sz3/package.py
+++ b/var/spack/repos/builtin/packages/sz3/package.py
@@ -12,16 +12,21 @@ class Sz3(CMakePackage):
homepage = "https://github.com/szcompressor/SZ3"
git = "https://github.com/szcompressor/SZ3"
- maintainers("disheng222")
+ maintainers("disheng222", "robertu94")
tags = ["e4s"]
version("master")
+ version("3.2.0", commit="b3dab4018425803a55d8073dc55dade7fa46b7b4")
+ version("3.1.8", commit="e308ebf8528c233286874b920c72c0a6c0218fb2")
version("3.1.7", commit="c49fd17f2d908835c41000c1286c510046c0480e")
version("3.1.5.4", commit="4c6ddf628f27d36b28d1bbda02174359cd05573d")
version("3.1.5.1", commit="5736a63b917e439dd62248b4ff6234e96726af5d")
version("3.1.3.1", commit="323cb17b412d657c4be681b52c34beaf933fe7af")
version("3.1.3", commit="695dff8dc326f3b165f6676d810f46add088a585")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("hdf5", default=False, description="enable hdf5 filter support")
variant("mdz", default=True, description="build mdz executable")
@@ -42,12 +47,18 @@ class Sz3(CMakePackage):
self.define_from_variant("BUILD_H5Z_FILTER", "hdf5"),
]
- def test(self):
+ def test_sz3_smoke_test(self):
+ """Run sz3 smoke test"""
if self.spec.satisfies("@:3.1.6"):
- print("smoke tests are only supported on 3.1.7 and later, skipping")
- return
-
- self.run_test(self.prefix.bin.sz3_smoke_test, purpose="sz3 works")
+ raise SkipTest("Package must be installed as version 3.1.7 or later")
+ exe = which(self.prefix.bin.sz3_smoke_test)
+ exe()
- if "+mdz" in self.spec:
- self.run_test(self.prefix.bin.mdz_smoke_test, purpose="mdz works")
+ def test_mdz_smoke_test(self):
+ """Run mdz smoke test"""
+ if self.spec.satisfies("@:3.1.6"):
+ raise SkipTest("Package must be installed as version 3.1.7 or later")
+ if "+mdz" not in self.spec:
+ raise SkipTest("Package must be installed with '+mdz'")
+ exe = which(self.prefix.bin.mdz_smoke_test)
+ exe()
diff --git a/var/spack/repos/builtin/packages/szauto/package.py b/var/spack/repos/builtin/packages/szauto/package.py
index 02c19e38bf..b470291068 100644
--- a/var/spack/repos/builtin/packages/szauto/package.py
+++ b/var/spack/repos/builtin/packages/szauto/package.py
@@ -19,5 +19,8 @@ class Szauto(CMakePackage):
version("1.2.1", sha256="55c58f58df3a874f684ef864a9247907df0501e5598c089fd2d855ae0309b03a")
version("1.0.0", commit="03f3ab0312bd1de647e9d65746add73a0e8602d2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zstd")
depends_on("pkgconfig")
diff --git a/var/spack/repos/builtin/packages/szx/package.py b/var/spack/repos/builtin/packages/szx/package.py
new file mode 100644
index 0000000000..df430e0528
--- /dev/null
+++ b/var/spack/repos/builtin/packages/szx/package.py
@@ -0,0 +1,53 @@
+# Copyright 2013-2024 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 spack.build_systems.autotools
+import spack.build_systems.cmake
+from spack.package import *
+
+
+class Szx(CMakePackage, AutotoolsPackage, CudaPackage):
+ """An ultra fast error bounded compressor for scientific datasets"""
+
+ homepage = "https://github.com/szcompressor/szx"
+ url = "https://github.com/szcompressor/SZx/archive/refs/tags/1.1.1.tar.gz"
+ git = "https://github.com/szcompressor/szx"
+
+ maintainers = ["robertu94"]
+
+ version("main", branch="main")
+ version("1.1.1", commit="b1609dde7702135b647fb92f91833fc84de2492e")
+ version("1.1.0", commit="194a9dc91ee8c46632f79de3c87a63ec29c52b26")
+
+ depends_on("cxx", type="build") # generated
+ build_system(
+ conditional("cmake", when="@1.1.1:"),
+ conditional("autotools", when="@:1.1.0"),
+ default="cmake",
+ )
+
+ variant("cli", default=True, description="install the CLI", when="@1.1.1:")
+ variant("examples", default=False, description="install the examples", when="@1.1.1:")
+ conflicts("+cuda", when="@:1.1.0")
+
+ with when("build_system=autotools"):
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
+ force_autoreconf = True
+
+ def configure_args(self):
+ args = ["--enable-openmp", "--enable-fortran"]
+ return args
+
+ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("SZx_INSTALL_CLI", "cli"),
+ self.define_from_variant("SZx_INSTALL_EXAMPLES", "examples"),
+ self.define_from_variant("SZx_BUILD_CUDA", "cuda"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/t8code/package.py b/var/spack/repos/builtin/packages/t8code/package.py
index 9ba18b9993..dce76b118d 100644
--- a/var/spack/repos/builtin/packages/t8code/package.py
+++ b/var/spack/repos/builtin/packages/t8code/package.py
@@ -16,12 +16,19 @@ class T8code(AutotoolsPackage):
homepage = "https://github.com/DLR-AMR/t8code"
url = "https://github.com/DLR-AMR/t8code/releases/download/v1.4.1/t8-1.4.1.tar.gz"
- maintainers = ["Davknapp", "melven"]
+ maintainers("Davknapp", "melven")
license("GPL-2.0-or-later")
+ version("2.0.0", sha256="b83f6c204cdb663cec7e0c1059406afc4c06df236b71d7b190fb698bec44c1e0")
+ version("1.6.1", sha256="dc96effa7c1ad1d50437fefdd0963f6ef7c943eb10a372a4e8546a5f2970a412")
+ version("1.6.0", sha256="94fb8dd9d9401130867ff18e8f71249cbb0fc34995fd04412a983eb2c93db3d5")
+ version("1.5.0", sha256="22ce6492c0f808c6859a42921352d857639fddd48ecdc9935e419db95c466f28")
version("1.4.1", sha256="b0ec0c9b4a182f8ac7e930ba80cd20e6dc5baefc328630e4a9dac8c688749e9a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI parallel code")
variant("vtk", default=False, description="Enable vtk-dependent code")
variant("petsc", default=False, description="Enable PETSc-dependent code")
@@ -61,9 +68,14 @@ class T8code(AutotoolsPackage):
# vtk paths need to be passed to configure command
args.append(f"CPPFLAGS=-I{include_dir}")
- args.append(f"LDFLAGS=-L{lib_dir}")
+ if "%gcc@14:" in spec:
+ args.append(f"LDFLAGS=-L{lib_dir} -lm")
+ else:
+ args.append(f"LDFLAGS=-L{lib_dir}")
# Chosen vtk version number is needed for t8code to find the right version
args.append(f"--with-vtk_version_number={vtk_ver}")
+ elif "%gcc@14:" in spec:
+ args.append("LDFLAGS=-lm")
if "+petsc" in spec:
args.append(f"--with-petsc={spec['petsc'].prefix}")
diff --git a/var/spack/repos/builtin/packages/tabix/package.py b/var/spack/repos/builtin/packages/tabix/package.py
index 7ae1e07804..5f3c28f7d4 100644
--- a/var/spack/repos/builtin/packages/tabix/package.py
+++ b/var/spack/repos/builtin/packages/tabix/package.py
@@ -14,6 +14,8 @@ class Tabix(MakefilePackage):
version("2013-12-16", commit="1ae158ac79b459f5feeed7490c67519b14ce9f35")
+ depends_on("c", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("python", type=("build", "run"))
depends_on("zlib-api", type="link")
diff --git a/var/spack/repos/builtin/packages/talass/package.py b/var/spack/repos/builtin/packages/talass/package.py
index d98e7d01ce..56c4d7e6ee 100644
--- a/var/spack/repos/builtin/packages/talass/package.py
+++ b/var/spack/repos/builtin/packages/talass/package.py
@@ -22,6 +22,8 @@ class Talass(CMakePackage):
version("process-statistics", branch="process-statistics")
version("2018-10-29", commit="5d459c0dd89e733fa301391908a5b79fe2850ad7")
+ depends_on("cxx", type="build") # generated
+
# The default precision and index space sizes
variant(
"precision",
diff --git a/var/spack/repos/builtin/packages/talloc/package.py b/var/spack/repos/builtin/packages/talloc/package.py
index 567950dcdc..58fda93013 100644
--- a/var/spack/repos/builtin/packages/talloc/package.py
+++ b/var/spack/repos/builtin/packages/talloc/package.py
@@ -15,10 +15,13 @@ class Talloc(AutotoolsPackage):
license("LGPL-3.0-or-later")
+ version("2.4.2", sha256="85ecf9e465e20f98f9950a52e9a411e14320bc555fa257d87697b7e7a9b1d8a6")
version("2.4.0", sha256="6df36862c42466ef88f360444513870ef46934f9016c84383cc4008a7d0c46ba")
version("2.3.1", sha256="ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77")
version("2.3.0", sha256="75d5bcb34482545a82ffb06da8f6c797f963a0da450d0830c669267b14992fc6")
version("2.1.9", sha256="f0aad4cb88a3322207c82136ddc07bed48a37c2c21f82962d6c5ccb422711062")
+ depends_on("c", type="build") # generated
+
extends("python")
depends_on("python@3:")
diff --git a/var/spack/repos/builtin/packages/tamaas/package.py b/var/spack/repos/builtin/packages/tamaas/package.py
index 298287e463..8e742a2a99 100644
--- a/var/spack/repos/builtin/packages/tamaas/package.py
+++ b/var/spack/repos/builtin/packages/tamaas/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -17,7 +18,10 @@ class Tamaas(SConsPackage):
maintainers("prs513rosewood")
version("master", branch="master")
- version("2.6.0", sha256="e3a262e5b893aa1e23554b6bd6b41af68c841ef4ffd862bb8e50a1a17ac15af6")
+ version("2.8.0", sha256="8ec49bf484a622c0554452416d1804eefbd545da79ced352f2ea63bbd17c83f0")
+ version("2.7.1", sha256="d7de6db3f5532bb9c8ab7e8cca1cdb5c133050dd5720249dde07027b0d41641f")
+ version("2.7.0", sha256="bc5717c1ead621cb9c18a073fdafbe8778fd160ad23d80c98283445d79066579")
+ version("2.6.0", sha256="4aafa0f727f43afc6ae45705ae80cf113a6a95e728bdf536c22b3b39be87f153")
version(
"2.5.0.post1", sha256="28e52dc5b8a5f77588c73a6ef396c44c6a8e9d77e3e4929a4ab07232dc9bc565"
)
@@ -25,6 +29,8 @@ class Tamaas(SConsPackage):
version("2.3.1", sha256="7d63e374cbc7b5b93578ece7be5c084d1c2f0dbe1d57c4f0c8abd5ff5fff9ab0")
version("2.3.0", sha256="0529e015c6cb5bbabaea5dce6efc5ec0f2aa76c00541f0d90ad0e2e3060a4520")
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Provide Python bindings for Tamaas")
variant(
"solvers",
@@ -32,6 +38,7 @@ class Tamaas(SConsPackage):
when="+python",
description="Enables extra Scipy-based nonlinear solvers",
)
+ variant("petsc", default=False, when="@2.8.0:", description="Additional PETSc solvers")
# Python 3.6 causes unicode issues with scons
depends_on("python@3.7:", type="build", when="~python")
@@ -46,6 +53,10 @@ class Tamaas(SConsPackage):
conflicts("%clang@:5")
conflicts("%intel")
+ # MPI type-traits issues (constexpr vs static const) in recent gcc
+ # fixed for tamaas versions > 2.6.0
+ patch("recent_compilers.patch", when="@:2.6.0%gcc@11:")
+
with when("+python"):
extends("python")
depends_on("python@3.7:", type=("build", "run"))
@@ -53,6 +64,9 @@ class Tamaas(SConsPackage):
depends_on("py-scipy", when="+solvers", type="run")
depends_on("py-pybind11", type="build")
depends_on("py-wheel", type="build")
+ depends_on("py-pip", type="build")
+
+ depends_on("petsc", type="build", when="+petsc")
def build_args(self, spec, prefix):
args = [
@@ -76,4 +90,16 @@ class Tamaas(SConsPackage):
if spec.satisfies("+python"):
args += ["PYBIND11_ROOT={}".format(spec["py-pybind11"].prefix)]
+ if spec.satisfies("+petsc"):
+ args += ["PETSC_ROOT={}".format(spec["petsc"].prefix), "use_petsc=True"]
+
return args
+
+ def install(self, spec, prefix):
+ """Install the package."""
+ args = self.install_args(spec, prefix)
+
+ scons("install-lib", *args)
+
+ if spec.satisfies("+python"):
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={prefix}", "build-release/python")
diff --git a/var/spack/repos/builtin/packages/tamaas/recent_compilers.patch b/var/spack/repos/builtin/packages/tamaas/recent_compilers.patch
new file mode 100644
index 0000000000..11a288ed16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tamaas/recent_compilers.patch
@@ -0,0 +1,57 @@
+diff --git a/src/core/mpi_interface.cpp b/src/core/mpi_interface.cpp
+index e7f9f72..f602fb1 100644
+--- a/src/core/mpi_interface.cpp
++++ b/src/core/mpi_interface.cpp
+@@ -36,6 +36,30 @@ comm& comm::world() {
+ static comm _world{MPI_COMM_WORLD};
+ return _world;
+ }
++
++// Define type traits for MPI data types
++#define TYPE(t, mpi_t) \
++ const MPI_Datatype type_trait<t>::value { mpi_t }
++TYPE(double, MPI_DOUBLE);
++TYPE(int, MPI_INT);
++TYPE(unsigned int, MPI_UNSIGNED);
++TYPE(long double, MPI_LONG_DOUBLE);
++TYPE(long, MPI_LONG);
++TYPE(unsigned long, MPI_UNSIGNED_LONG);
++TYPE(::thrust::complex<double>, MPI_CXX_DOUBLE_COMPLEX);
++TYPE(::thrust::complex<long double>, MPI_CXX_LONG_DOUBLE_COMPLEX);
++TYPE(bool, MPI_CXX_BOOL);
++#undef TYPE
++
++// Define type traits for MPI operations
++#define OPERATION(op, mpi_op) \
++ const MPI_Op operation_trait<operation::op>::value { mpi_op }
++OPERATION(plus, MPI_SUM);
++OPERATION(min, MPI_MIN);
++OPERATION(max, MPI_MAX);
++OPERATION(times, MPI_PROD);
++#undef OPERATION
++
+ } // namespace mpi_impl
+ #endif
+
+diff --git a/src/core/mpi_interface.hh b/src/core/mpi_interface.hh
+index b4cfc81..b53c826 100644
+--- a/src/core/mpi_interface.hh
++++ b/src/core/mpi_interface.hh
+@@ -149,7 +149,7 @@ struct type_trait;
+ #define TYPE(t, mpi_t) \
+ template <> \
+ struct type_trait<t> { \
+- static constexpr MPI_Datatype value = mpi_t; \
++ static const MPI_Datatype value; \
+ }
+ TYPE(double, MPI_DOUBLE);
+ TYPE(int, MPI_INT);
+@@ -168,7 +168,7 @@ struct operation_trait;
+ #define OPERATION(op, mpi_op) \
+ template <> \
+ struct operation_trait<operation::op> { \
+- static constexpr MPI_Op value = mpi_op; \
++ static const MPI_Op value; \
+ }
+ OPERATION(plus, MPI_SUM);
+ OPERATION(min, MPI_MIN);
diff --git a/var/spack/repos/builtin/packages/tandem/package.py b/var/spack/repos/builtin/packages/tandem/package.py
index f984a5d57d..04bb2b915b 100644
--- a/var/spack/repos/builtin/packages/tandem/package.py
+++ b/var/spack/repos/builtin/packages/tandem/package.py
@@ -7,7 +7,7 @@
from spack.package import *
-class Tandem(CMakePackage):
+class Tandem(CMakePackage, CudaPackage, ROCmPackage):
"""Tandem is a scientific software for SEAS modelling and for solving Poisson
and linear elasticity problems. It implements the Symmetric Interior Penalty
Galerkin (SIPG) method using unstructured simplicial meshes (triangle meshes
@@ -21,7 +21,13 @@ class Tandem(CMakePackage):
version("main", branch="main", submodules=True)
# we cannot use the tar.gz file because it does not contains submodules
+ version(
+ "1.1.0", tag="v1.1.0", commit="17c42dc9ae0ec519dcc1b5732681b2e4054666f1", submodules=True
+ )
version("1.0", tag="v1.0", commit="eccab10cbdf5842ed9903fac7a023be5e2779f36", submodules=True)
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
patch("fix_v1.0_compilation.diff", when="@1.0")
maintainers("dmay23", "Thomas-Ulrich")
@@ -39,8 +45,16 @@ class Tandem(CMakePackage):
description="Minimum order of quadrature rule, 0 = automatic",
)
variant("libxsmm", default=False, description="Install libxsmm-generator")
+ variant("python", default=False, description="installs python and numpy")
depends_on("mpi")
+
+ for var in ["openmpi", "mpich", "mvapich", "mvapich2", "mvapich2-gdr"]:
+ depends_on(f"{var} +cuda", when=f"+cuda ^[virtuals=mpi] {var}")
+
+ for var in ["mpich", "mvapich2-gdr"]:
+ depends_on(f"{var} +rocm", when=f"+rocm ^[virtuals=mpi] {var}")
+
depends_on("parmetis +int64 +shared")
depends_on("metis +int64 +shared")
depends_on("libxsmm@1.17 +generator", when="+libxsmm target=x86_64:")
@@ -48,11 +62,35 @@ class Tandem(CMakePackage):
depends_on("eigen@3.4.0")
depends_on("zlib-api")
- depends_on("petsc@3.14.6:3.18.5 +int64 +mumps +scalapack memalign=32")
- depends_on("petsc@3.14.6:3.18.5 +int64 +mumps +scalapack +knl", when="target=skylake:")
+ depends_on("petsc@3.16: +int64 +mumps +scalapack memalign=32")
+ depends_on("petsc +knl", when="target=skylake:")
+
+ with when("+cuda"):
+ for tgt in CudaPackage.cuda_arch_values:
+ depends_on(f"petsc +cuda cuda_arch={tgt}", when=f"+cuda cuda_arch={tgt}")
+ with when("+rocm"):
+ for tgt in ROCmPackage.amdgpu_targets:
+ depends_on(f"petsc +rocm amdgpu_target={tgt}", when=f"+rocm amdgpu_target={tgt}")
+
+ depends_on("python@3", type="build", when="+python")
+ depends_on("py-numpy", type="build", when="+python")
+
# see https://github.com/TEAR-ERC/tandem/issues/45
conflicts("%intel")
+ # GPU architecture requirements
+ conflicts(
+ "cuda_arch=none",
+ when="+cuda",
+ msg="A value for cuda_arch must be specified. Add cuda_arch=XX",
+ )
+
+ conflicts(
+ "amdgpu_target=none",
+ when="+rocm",
+ msg="A value for amdgpu_arch must be specified. Add amdgpu_arch=XX",
+ )
+
def cmake_args(self):
args = [
self.define_from_variant("DOMAIN_DIMENSION", "domain_dimension"),
diff --git a/var/spack/repos/builtin/packages/tangram/package.py b/var/spack/repos/builtin/packages/tangram/package.py
index 4c0886d94c..b23d0cda0e 100644
--- a/var/spack/repos/builtin/packages/tangram/package.py
+++ b/var/spack/repos/builtin/packages/tangram/package.py
@@ -24,6 +24,9 @@ class Tangram(CMakePackage):
version("1.0.1", sha256="8f2f8c01bb2d726b0f64e5a5bc3aa2bd8057ccaee7a29c68f1439d16e39aaa90")
version("master", branch="master", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable interface reconstruction with MPI")
variant("thrust", default=False, description="Enable on-node parallelism with NVidia Thrust")
variant(
diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py
index 7b5af9403c..d583f7e32a 100644
--- a/var/spack/repos/builtin/packages/tar/package.py
+++ b/var/spack/repos/builtin/packages/tar/package.py
@@ -6,7 +6,6 @@
import re
from spack.package import *
-from spack.util.environment import is_system_path
class Tar(AutotoolsPackage, GNUMirrorPackage):
@@ -22,14 +21,18 @@ class Tar(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("1.35", sha256="14d55e32063ea9526e057fbf35fcabd53378e769787eff7919c3755b02d2b57e")
version("1.34", sha256="03d908cf5768cfe6b7ad588c921c6ed21acabfb2b79b788d1330453507647aed")
- version("1.32", sha256="b59549594d91d84ee00c99cf2541a3330fed3a42c440503326dab767f2fbb96c")
- version("1.31", sha256="b471be6cb68fd13c4878297d856aebd50551646f4e3074906b1a74549c40d5a2")
- version("1.30", sha256="4725cc2c2f5a274b12b39d1f78b3545ec9ebb06a6e48e8845e1995ac8513b088")
- version("1.29", sha256="cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0")
- version("1.28", sha256="6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2019-9923
+ version("1.32", sha256="b59549594d91d84ee00c99cf2541a3330fed3a42c440503326dab767f2fbb96c")
+ version("1.31", sha256="b471be6cb68fd13c4878297d856aebd50551646f4e3074906b1a74549c40d5a2")
+ version("1.30", sha256="4725cc2c2f5a274b12b39d1f78b3545ec9ebb06a6e48e8845e1995ac8513b088")
+ version("1.29", sha256="cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0")
+ version("1.28", sha256="6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de")
+
+ depends_on("c", type="build")
- # A saner default than gzip?
variant(
"zip",
default="pigz",
@@ -51,12 +54,16 @@ class Tar(AutotoolsPackage, GNUMirrorPackage):
patch("se-selinux.patch", when="@:1.29")
patch("argp-pgi.patch", when="@:1.29")
patch("gnutar-configure-xattrs.patch", when="@1.28")
+
# The NVIDIA compilers do not currently support some GNU builtins.
# Detect this case and use the fallback path.
- patch("nvhpc-1.30.patch", when="@1.30:1.32 %nvhpc")
- patch("nvhpc-1.34.patch", when="@1.34 %nvhpc")
- # Workaround bug where __LONG_WIDTH__ is not defined
- patch("nvhpc-long-width.patch", when="@1.34 %nvhpc")
+ with when("%nvhpc"):
+ patch("nvhpc-1.30.patch", when="@1.30:1.32")
+ patch("nvhpc-1.34.patch", when="@1.34")
+ # Workaround bug where __LONG_WIDTH__ is not defined
+ patch("nvhpc-long-width.patch", when="@1.34:")
+ # Newer versions are marked as conflict for now
+ conflicts("@1.35:", msg="NVHPC not yet supported for 1.35")
@classmethod
def determine_version(cls, exe):
@@ -64,29 +71,35 @@ class Tar(AutotoolsPackage, GNUMirrorPackage):
match = re.search(r"tar \(GNU tar\) (\S+)", output)
return match.group(1) if match else None
+ def flag_handler(self, name, flags):
+ if name == "ldflags" and self.spec.satisfies("@1.35 ^[virtuals=iconv] libiconv"):
+ # https://savannah.gnu.org/bugs/?64441
+ flags.append("-liconv")
+ return (flags, None, None)
+
def configure_args(self):
- spec = self.spec
# Note: compression programs are passed by abs path,
# so that tar can locate them when invoked without spack load.
args = [
- "--with-xz={0}".format(spec["xz"].prefix.bin.xz),
- "--with-lzma={0}".format(spec["xz"].prefix.bin.lzma),
- "--with-bzip2={0}".format(spec["bzip2"].prefix.bin.bzip2),
+ "--disable-nls",
+ f"--with-xz={self.spec['xz'].prefix.bin.xz}",
+ f"--with-lzma={self.spec['xz'].prefix.bin.lzma}",
+ f"--with-bzip2={self.spec['bzip2'].prefix.bin.bzip2}",
]
- if spec["iconv"].name == "libc":
- args.append("--without-libiconv-prefix")
- elif not is_system_path(spec["iconv"].prefix):
- args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
-
- if "^zstd" in spec:
- args.append("--with-zstd={0}".format(spec["zstd"].prefix.bin.zstd))
+ if self.spec.dependencies("zstd"):
+ args.append(f"--with-zstd={self.spec['zstd'].prefix.bin.zstd}")
# Choose gzip/pigz
- zip = spec.variants["zip"].value
+ zip = self.spec.variants["zip"].value
if zip == "gzip":
- gzip_path = spec["gzip"].prefix.bin.gzip
+ gzip_path = self.spec["gzip"].prefix.bin.gzip
elif zip == "pigz":
- gzip_path = spec["pigz"].prefix.bin.pigz
- args.append("--with-gzip={}".format(gzip_path))
+ gzip_path = self.spec["pigz"].prefix.bin.pigz
+ args.append(f"--with-gzip={gzip_path}")
+
+ if self.spec["iconv"].name == "libiconv":
+ args.append(f"--with-libiconv-prefix={self.spec['iconv'].prefix}")
+ else:
+ args.append("--without-libiconv-prefix")
return args
diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py
index 65f71a6218..786127d604 100644
--- a/var/spack/repos/builtin/packages/task/package.py
+++ b/var/spack/repos/builtin/packages/task/package.py
@@ -14,12 +14,23 @@ class Task(CMakePackage):
license("MIT")
+ version("3.0.0", sha256="30f397081044f5dc2e5a0ba51609223011a23281cd9947ea718df98d149fcc83")
version("2.6.2", sha256="b1d3a7f000cd0fd60640670064e0e001613c9e1cb2242b9b3a9066c78862cfec")
version("2.5.1", sha256="d87bcee58106eb8a79b850e9abc153d98b79e00d50eade0d63917154984f2a15")
version("2.4.4", sha256="7ff406414e0be480f91981831507ac255297aab33d8246f98dbfd2b1b2df8e3b")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
depends_on("gnutls")
depends_on("uuid")
+ depends_on("rust@1.64.0:", when="@3.0.0:")
conflicts("%gcc@:4.7")
+
+ def patch(self):
+ if self.spec.satisfies("@3.0.0:"):
+ # new major release adds rust to the codebase. A bug in cmake/Corrosion
+ # causes release builds with the integration tests to fail.
+ # See https://github.com/GothenburgBitFactory/taskwarrior/issues/3294
+ filter_file('"taskchampion/integration-tests",', "", "Cargo.toml")
diff --git a/var/spack/repos/builtin/packages/taskflow/package.py b/var/spack/repos/builtin/packages/taskflow/package.py
index 1e00312654..510509e5b5 100644
--- a/var/spack/repos/builtin/packages/taskflow/package.py
+++ b/var/spack/repos/builtin/packages/taskflow/package.py
@@ -18,15 +18,19 @@ class Taskflow(CMakePackage):
license("MIT")
version("master", branch="master")
+ version("3.7.0", sha256="788b88093fb3788329ebbf7c7ee05d1f8960d974985a301798df01e77e04233b")
version("3.6.0", sha256="5a1cd9cf89f93a97fcace58fd73ed2fc8ee2053bcb43e047acb6bc121c3edf4c")
version("2.7.0", sha256="bc2227dcabec86abeba1fee56bb357d9d3c0ef0184f7c2275d7008e8758dfc3e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Compiler must offer C++14 support
conflicts("%gcc@:4.8")
conflicts("%clang@:3.5")
conflicts("%apple-clang@:8.0.0")
# untested: conflicts('%intel@:15')
- # untested: conflicts('%pgi@:14')
def cmake_args(self):
try:
diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py
index dcbaa2e793..2d3ebc5fbc 100644
--- a/var/spack/repos/builtin/packages/tasmanian/package.py
+++ b/var/spack/repos/builtin/packages/tasmanian/package.py
@@ -12,7 +12,7 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage):
interpolation as well as parameter calibration."""
homepage = "https://ornl.github.io/TASMANIAN/stable/"
- url = "https://github.com/ORNL/TASMANIAN/archive/v8.0.tar.gz"
+ url = "https://github.com/ORNL/TASMANIAN/archive/v8.1.tar.gz"
git = "https://github.com/ORNL/TASMANIAN.git"
tags = ["e4s"]
@@ -22,18 +22,21 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="master")
+ version("8.1", sha256="e870d26ebe9e5038a8bb75710e47a66f3040c5ad34d03c2fc993b984240d247b")
version("8.0", sha256="248c941346150bf6cfb386ba86b69bd4697f4fc93bff0e8d5f57e555614fd534")
version("7.9", sha256="decba62e6bbccf1bc26c6e773a8d4fd51d7f3e3e534ddd386ec41300694ce5cc")
version("7.7", sha256="85fb3a7b302ea21a3b700712767a59a623d9ab93da03308fa47d4413654c3878")
- version("7.5", sha256="d621bd36dced4db86ef638693ba89b336762e7a3d7fedb3b5bcefb03390712b3")
- # Tasmanian is backwards compatible, no need to use 7.3 from back in 2020
+ # when adding a new version, deprecate an old one, this gives us 3 - 4 years of support
version(
- "7.3",
- sha256="5bd1dd89cc5c84506f6900b6569b17e50becd73eb31ec85cfa11d6f1f912c4fa",
+ "7.5",
+ sha256="d621bd36dced4db86ef638693ba89b336762e7a3d7fedb3b5bcefb03390712b3",
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("xsdkflags", default=False, description="enable XSDK defaults for Tasmanian")
variant("openmp", default=False, description="add OpenMP support to Tasmanian")
@@ -114,17 +117,12 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage):
args.append("-DBLAS_LIBRARIES={0}".format(spec["blas"].libs.joined(";")))
args.append("-DLAPACK_LIBRARIES={0}".format(spec["lapack"].libs.joined(";")))
- if spec.satisfies("+python"):
- args.append(
- "-DPYTHON_EXECUTABLE:FILEPATH={0}".format(self.spec["python"].command.path)
- )
-
return args
@run_after("install")
def setup_smoke_test(self):
install_tree(
- self.prefix.share.Tasmanian.testing, join_path(self.install_test_root, "testing")
+ self.prefix.share.Tasmanian.testing, join_path(install_test_root(self), "testing")
)
def test_make_test(self):
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py
index 1aab871277..9081b5965a 100644
--- a/var/spack/repos/builtin/packages/tau/package.py
+++ b/var/spack/repos/builtin/packages/tau/package.py
@@ -28,6 +28,9 @@ class Tau(Package):
license("MIT")
version("master", branch="master")
+ version("2.34", sha256="229ab425e0532e635a0be76d60b8aa613adf7596d15a9ced0b87e7f243bb2132")
+ version("2.33.2", sha256="8ee81fe75507612379f70033183bed2a90e1245554b2a78196b6c5145da44f27")
+ version("2.33.1", sha256="13cc5138e110932f34f02ddf548db91d8219ccb7ff9a84187f0790e40a502403")
version("2.33", sha256="04d9d67adb495bc1ea56561f33c5ce5ba44f51cc7f64996f65bd446fac5483d9")
version("2.32.1", sha256="0eec3de46b0873846dfc639270c5e30a226b463dd6cb41aa12e975b7563f0eeb")
version("2.32", sha256="ee774a06e30ce0ef0f053635a52229152c39aba4f4933bed92da55e5e13466f3")
@@ -54,6 +57,10 @@ class Tau(Package):
version("2.24", sha256="5d28e8b26561c7cd7d0029b56ec0f95fc26803ac0b100c98e00af0b02e7f55e2")
version("2.23.1", sha256="31a4d0019cec6ef57459a9cd18a220f0130838a5f1a0b5ea7879853f5a38cf88")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Disable some default dependencies on Darwin/OSX
darwin_default = False
if sys.platform != "darwin":
@@ -73,22 +80,39 @@ class Tau(Package):
variant("pdt", default=True, description="Use PDT for source code instrumentation")
variant("comm", default=False, description=" Generate profiles with MPI communicator info")
variant("python", default=False, description="Activates Python support")
- variant("likwid", default=False, description="Activates LIKWID support")
+ variant("likwid", default=False, description="Activates LIKWID support", when="@2.27")
variant("ompt", default=False, description="Activates OMPT instrumentation")
variant("opari", default=False, description="Activates Opari2 instrumentation")
variant("shmem", default=False, description="Activates SHMEM support")
variant("gasnet", default=False, description="Activates GASNET support")
variant("cuda", default=False, description="Activates CUDA support")
- variant("rocm", default=False, description="Activates ROCm support")
- variant("level_zero", default=False, description="Activates Intel OneAPI Level Zero support")
- variant("rocprofiler", default=False, description="Activates ROCm rocprofiler support")
- variant("roctracer", default=False, description="Activates ROCm roctracer support")
+ variant("rocm", default=False, description="Activates ROCm support", when="@2.28:")
+ variant(
+ "level_zero",
+ default=False,
+ description="Activates Intel OneAPI Level Zero support",
+ when="@2.30:",
+ )
+ variant(
+ "rocprofiler",
+ default=False,
+ description="Activates ROCm rocprofiler support",
+ when="@2.29.1:",
+ )
+ variant(
+ "roctracer", default=False, description="Activates ROCm roctracer support", when="@2.28.1:"
+ )
+ variant(
+ "rocprofv2", default=False, description="Activates ROCm rocprofiler support", when="@2.34:"
+ )
variant("opencl", default=False, description="Activates OpenCL support")
variant("fortran", default=darwin_default, description="Activates Fortran support")
variant("io", default=True, description="Activates POSIX I/O support")
- variant("adios2", default=False, description="Activates ADIOS2 output support")
+ variant(
+ "adios2", default=False, description="Activates ADIOS2 output support", when="@2.26.3:"
+ )
variant("sqlite", default=False, description="Activates SQLite3 output support")
- variant("syscall", default=False, description="Activates syscall wrapper")
+ variant("syscall", default=False, description="Activates syscall wrapper", when="@2.33:")
variant(
"profileparam",
default=False,
@@ -105,7 +129,15 @@ class Tau(Package):
)
variant("dyninst", default=False, description="Activates dyninst support")
+ variant(
+ "disable-no-pie",
+ default=False,
+ description="Do not add -no-pie while linking with Ubuntu.",
+ )
+
+ depends_on("gmake", type="build")
depends_on("cmake@3.14:", type="build", when="%clang")
+ depends_on("cmake@3.14:", type="build", when="%aocc")
depends_on("zlib-api", type="link")
depends_on("pdt", when="+pdt") # Required for TAU instrumentation
depends_on("scorep", when="+scorep")
@@ -117,10 +149,12 @@ class Tau(Package):
depends_on("elf", when="+elf")
# TAU requires the ELF header support, libiberty and demangle.
depends_on("binutils+libiberty+headers+plugins", when="+binutils")
- # Build errors with Python 3.9
- depends_on("python@2.7:3.8", when="@:2.31.0+python")
- # python 3.11 doesn't work as of 2.32
- depends_on("python@2.7:3.10", when="@2.31.1:+python")
+ with when("+python"):
+ depends_on("python@2.7:")
+ # Build errors with Python 3.9
+ depends_on("python@:3.8", when="@:2.31.0")
+ # python 3.11 doesn't work in the 2.32 releases
+ depends_on("python@:3.10", when="@:2.32.1")
depends_on("libunwind", when="+libunwind")
depends_on("mpi", when="+mpi", type=("build", "run", "link"))
depends_on("cuda", when="+cuda")
@@ -129,9 +163,12 @@ class Tau(Package):
depends_on("sqlite", when="+sqlite")
depends_on("hwloc")
depends_on("rocprofiler-dev", when="+rocprofiler")
+ depends_on("rocprofiler-dev@6.0.0:", when="@2.34: +rocprofv2")
depends_on("roctracer-dev", when="+roctracer")
depends_on("hsa-rocr-dev", when="+rocm")
depends_on("rocm-smi-lib", when="@2.32.1: +rocm")
+ depends_on("rocm-core", when="@2.34: +rocm")
+ depends_on("hip", when="@2.34: +roctracer")
depends_on("java", type="run") # for paraprof
depends_on("oneapi-level-zero", when="+level_zero")
depends_on("dyninst@12.3.0:", when="+dyninst")
@@ -144,9 +181,27 @@ class Tau(Package):
conflicts("+adios2", when="@:2.29.1")
conflicts("+sqlite", when="@:2.29.1")
conflicts("+dyninst", when="@:2.32.1")
-
+ conflicts("+disable-no-pie", when="@:2.33.2")
patch("unwind.patch", when="@2.29.0")
+ conflicts("+rocprofiler", when="+roctracer", msg="Use either rocprofiler or roctracer")
+ conflicts("+rocprofv2", when="+rocprofiler", msg="Rocprofv2 does not need rocprofiler")
+ conflicts("+rocprofv2", when="+roctracer", msg="Rocprofv2 does not need roctracer")
+ requires("+rocm", when="+rocprofiler", msg="Rocprofiler requires ROCm")
+ requires("+rocm", when="+roctracer", msg="Roctracer requires ROCm")
+
+ requires(
+ "+rocprofiler",
+ "+roctracer",
+ "+rocprofv2",
+ policy="one_of",
+ when="+rocm",
+ msg="Using ROCm, select either +rocprofiler, +roctracer or +rocprofv2",
+ )
+
+ # https://github.com/UO-OACISS/tau2/commit/1d2cb6b
+ patch("tau-rocm-disable-llvm-plugin.patch", when="@2.33.2 +rocm")
+
filter_compiler_wrappers("Makefile", relative_root="include")
filter_compiler_wrappers("Makefile.tau*", relative_root="lib")
filter_compiler_wrappers("Makefile.tau*", relative_root="lib64")
@@ -166,25 +221,21 @@ class Tau(Package):
# ('CC', 'CXX' and 'FC')
# 4 - if no -cc=<compiler> -cxx=<compiler> is passed tau is built with
# system compiler silently
- # (regardless of what %<compiler> is used in the spec)
- # 5 - On cray gnu compilers are not provied by self.compilers
- # Checking GCC_PATH will work if spack loads the gcc module
- #
- # In the following we give TAU what he expects and put compilers into
- # PATH
- compiler_path = os.path.dirname(self.compiler.cc)
- if not compiler_path and self.compiler.cc_names[0] == "gcc":
- compiler_path = os.environ.get("GCC_PATH", "")
- if compiler_path:
- compiler_path = compiler_path + "/bin/"
- os.environ["PATH"] = ":".join([compiler_path, os.environ["PATH"]])
- compiler_options = [
- "-c++=%s" % os.path.basename(self.compiler.cxx),
- "-cc=%s" % os.path.basename(self.compiler.cc),
- ]
-
- if "+fortran" in spec and self.compiler.fc:
- compiler_options.append("-fortran=%s" % os.path.basename(self.compiler.fc))
+ compiler_flags: Dict[str, str] = {
+ flag: os.path.basename(getattr(self.compiler, compiler))
+ for flag, compiler in (("-cc", "cc"), ("-c++", "cxx"), ("-fortran", "fc"))
+ if getattr(self.compiler, compiler)
+ }
+
+ if "~fortran" in spec:
+ compiler_flags.pop("-fortran", None)
+
+ # tau does not understand `craycc`, `crayCC`, `crayftn`, strip off the `cray` prefix
+ for flag, value in compiler_flags.items():
+ if value.startswith("cray"):
+ compiler_flags[flag] = value[4:]
+
+ compiler_options = [f"{flag}={value}" for flag, value in compiler_flags.items()]
##########
@@ -219,9 +270,6 @@ class Tau(Package):
if "+x86_64" in spec:
options.append("-arch=x86_64")
- if ("platform=cray" in self.spec) and ("+x86_64" not in spec):
- options.append("-arch=craycnl")
-
if "+pdt" in spec:
options.append("-pdt=%s" % spec["pdt"].prefix)
if spec["pdt"].satisfies("%intel"):
@@ -275,8 +323,12 @@ class Tau(Package):
if "+fortran" in spec:
env["F77"] = spec["mpi"].mpif77
env["FC"] = spec["mpi"].mpifc
- options.append("-mpiinc=%s" % spec["mpi"].prefix.include)
- options.append("-mpilib=%s" % spec["mpi"].prefix.lib)
+ if spec["mpi"].name == "intel-oneapi-mpi":
+ options.append("-mpiinc=%s/include" % spec["mpi"].package.component_prefix)
+ options.append("-mpilib=%s/lib" % spec["mpi"].package.component_prefix)
+ else:
+ options.append("-mpiinc=%s" % spec["mpi"].prefix.include)
+ options.append("-mpilib=%s" % spec["mpi"].prefix.lib)
options.append("-mpi")
if "+comm" in spec:
@@ -304,12 +356,20 @@ class Tau(Package):
options.append("-rocm=%s" % spec["hsa-rocr-dev"].prefix)
if spec.satisfies("@2.32.1"):
options.append("-rocmsmi=%s" % spec["rocm-smi-lib"].prefix)
+ if spec.satisfies("@2.34:"):
+ options.append("-rocm-core=%s" % spec["rocm-core"].prefix)
if "+rocprofiler" in spec:
options.append("-rocprofiler=%s" % spec["rocprofiler-dev"].prefix)
if "+roctracer" in spec:
options.append("-roctracer=%s" % spec["roctracer-dev"].prefix)
+ if spec.satisfies("@2.34:"):
+ options.append("-hip=%s" % spec["hip"].prefix)
+
+ if "+rocprofv2" in spec:
+ options.append("-rocprofiler=%s" % spec["rocprofiler-dev"].prefix)
+ options.append("-rocprofv2")
if "+adios2" in spec:
options.append("-adios=%s" % spec["adios2"].prefix)
@@ -347,6 +407,8 @@ class Tau(Package):
if found:
break
options.append("-pythonlib=%s" % lib_path)
+ if "+disable-no-pie" in spec:
+ options.append("-disable-no-pie-on-ubuntu")
if "+dyninst" in spec:
options.append("-dyninst=%s" % spec["dyninst"].prefix)
@@ -366,8 +428,14 @@ class Tau(Package):
# Link arch-specific directories into prefix since there is
# only one arch per prefix the way spack installs.
self.link_tau_arch_dirs()
- # TAU may capture Spack's internal compiler wrapper. Replace
- # it with the correct compiler.
+ # TAU may capture Spack's internal compiler wrapper. Fixed
+ # by filter_compiler_wrappers. Switch back the environment
+ # variables the filter uses.
+ if "+mpi" in spec:
+ env["CC"] = spack_cc
+ env["CXX"] = spack_cxx
+ env["FC"] = spack_fc
+ env["F77"] = spack_f77
def link_tau_arch_dirs(self):
for subdir in os.listdir(self.prefix):
@@ -388,50 +456,149 @@ class Tau(Package):
# in the latter case.
if files:
env.set("TAU_MAKEFILE", files[0])
+ if "+dyninst" in self.spec:
+ path_to_dyn_lib = self.spec["dyninst"].prefix.lib
+ dyninst_apirt = join_path(path_to_dyn_lib, "libdyninstAPI_RT.so")
+ env.set("DYNINSTAPI_RT_LIB", dyninst_apirt)
+ env.append_path("LD_LIBRARY_PATH", path_to_dyn_lib)
+ env.append_path("LD_LIBRARY_PATH", self.prefix.lib)
+ if "+cuda" in self.spec:
+ env.append_path("PATH", self.spec["cuda"].prefix.bin)
matmult_test = join_path("examples", "mm")
+ dyninst_test = join_path("examples", "dyninst")
+ makefile_test = join_path("examples", "Makefile")
+ makefile_inc_test = join_path("include", "Makefile")
+ cuda_test = join_path("examples", "gpu", "cuda", "dataElem_um")
+ level_zero_test = join_path("examples", "gpu", "oneapi", "complex_mult")
+ rocm_test = join_path("examples", "gpu", "hip", "vectorAdd")
+ syscall_test = join_path("examples", "syscall")
+ ompt_test = join_path("examples", "openmp", "c++")
+ python_test = join_path("examples", "python")
+ disable_tests = False
@run_after("install")
def setup_build_tests(self):
"""Copy the build test files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources(self.matmult_test)
-
- def _run_matmult_test(self):
- mm_dir = join_path(self.test_suite.current_test_cache_dir, self.matmult_test)
- self.run_test(
- "make",
- ["all"],
- [],
- 0,
- False,
- "Instrument and build matrix multiplication test code",
- False,
- mm_dir,
- )
- test_exe = "matmult"
- if "+mpi" in self.spec:
- test_args = ["-n", "4", test_exe]
- mpiexe_list = ["mpirun", "mpiexec", "srun"]
- for mpiexe in mpiexe_list:
- if which(mpiexe) is not None:
- self.run_test(
- mpiexe, test_args, [], 0, False, "Run matmult test with mpi", False, mm_dir
- )
- break
- else:
- self.run_test(test_exe, [], [], 0, False, "Run sequential matmult test", False, mm_dir)
- self.run_test(
- "pprof",
- [],
- [],
- 0,
- False,
- "Run pprof profile analysis tool on profile output",
- False,
- mm_dir,
- )
-
- def test(self):
- # Run mm test program pulled from the build
- self._run_matmult_test()
+ cache_extra_test_sources(self, self.matmult_test)
+ cache_extra_test_sources(self, self.makefile_test)
+ cache_extra_test_sources(self, self.makefile_inc_test)
+ if "+dyninst" in self.spec:
+ cache_extra_test_sources(self, self.dyninst_test)
+ if "+cuda" in self.spec:
+ cache_extra_test_sources(self, self.cuda_test)
+ if "+level_zero" in self.spec:
+ cache_extra_test_sources(self, self.level_zero_test)
+ if "+rocm" in self.spec:
+ cache_extra_test_sources(self, self.rocm_test)
+ if "+syscall" in self.spec:
+ cache_extra_test_sources(self, self.syscall_test)
+ if "+ompt" in self.spec:
+ cache_extra_test_sources(self, self.ompt_test)
+ if "+python" in self.spec:
+ cache_extra_test_sources(self, self.python_test)
+
+ def _run_python_test(self, test_name, purpose, work_dir):
+ tau_python = which(self.prefix.bin.tau_python)
+ tau_py_inter = "-tau-python-interpreter=" + self.spec["python"].prefix.bin.python
+ pprof = which(self.prefix.bin.pprof)
+ with test_part(self, f"{test_name}", purpose, work_dir):
+ if "+mpi" in self.spec:
+ flag = "mpi"
+ mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
+ mpirun(
+ "-np",
+ "4",
+ self.prefix.bin.tau_python,
+ tau_py_inter,
+ "-T",
+ flag,
+ "firstprime.py",
+ )
+ else:
+ flag = "serial"
+ tau_python(tau_py_inter, "-T", flag, "firstprime.py")
+ pprof()
+
+ def _run_default_test(self, test_name, purpose, work_dir):
+ tau_exec = which(self.prefix.bin.tau_exec)
+ pprof = which(self.prefix.bin.pprof)
+ with test_part(self, f"{test_name}", purpose, work_dir):
+ make("all")
+ if "+mpi" in self.spec:
+ flags = ["-T", "mpi"]
+ mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
+ mpirun("-np", "4", self.prefix.bin.tau_exec, *flags, "./matmult")
+ else:
+ flags = ["-T", "serial"]
+ tau_exec(*flags, "./matmult")
+ pprof()
+
+ def _run_ompt_test(self, test_name, purpose, work_dir):
+ tau_exec = which(self.prefix.bin.tau_exec)
+ pprof = which(self.prefix.bin.pprof)
+ with test_part(self, f"{test_name}", purpose, work_dir):
+ make("all")
+ if "+mpi" in self.spec:
+ flags = ["-T", "mpi", "-ompt"]
+ mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
+ mpirun("-np", "4", self.prefix.bin.tau_exec, *flags, "./mandel")
+ else:
+ flags = ["-T", "serial", "-ompt"]
+ tau_exec(*flags, "./mandel")
+ pprof()
+
+ def _run_rocm_test(self, test_name, purpose, work_dir):
+ tau_exec = which(self.prefix.bin.tau_exec)
+ pprof = which(self.prefix.bin.pprof)
+ with test_part(self, f"{test_name}", purpose, work_dir):
+ make("all")
+ if "+mpi" in self.spec:
+ flags = ["-T", "mpi", "-rocm"]
+ mpirun = which(self.spec["mpi"].prefix.bin.mpirun)
+ mpirun("-np", "4", self.prefix.bin.tau_exec, *flags, "./gpu-stream-hip")
+ else:
+ flags = ["-T", "serial", "-rocm"]
+ tau_exec(*flags, "./gpu-stream-hip")
+ pprof()
+
+ def test_python(self):
+ """test python variant"""
+ if self.disable_tests:
+ return
+ if "+python" in self.spec:
+ # current_test_cache_dir.examples.python
+ python_test_dir = join_path(self.test_suite.current_test_cache_dir, self.python_test)
+ self._run_python_test("test_tau_python", "Testing tau_python", python_test_dir)
+
+ def test_default(self):
+ """default matmult test"""
+ if self.disable_tests:
+ return
+ if "+ompt" in self.spec:
+ return
+ default_test_dir = join_path(self.test_suite.current_test_cache_dir, self.matmult_test)
+ self._run_default_test("test_default", "Testing TAU", default_test_dir)
+
+ def test_ompt(self):
+ """ompt test"""
+ if self.disable_tests:
+ return
+ if "+ompt" in self.spec:
+ ompt_test_dir = join_path(self.test_suite.current_test_cache_dir, self.ompt_test)
+ self._run_ompt_test("test_ompt", "Testing ompt", ompt_test_dir)
+
+ def test_rocm(self):
+ """rocm test"""
+ # Disabled, see PR#43682
+ # make is unable to find rocm_agent_enumerator
+ # when testing, with spack load, there is no issue
+ return
+ if self.disable_tests:
+ return
+ if "+rocm" in self.spec and (
+ "+rocprofiler" in self.spec or "+roctracer" in self.spec or "+rocprofv2" in self.spec
+ ):
+ rocm_test_dir = join_path(self.test_suite.current_test_cache_dir, self.rocm_test)
+ self._run_rocm_test("test_rocm", "Testing rocm", rocm_test_dir)
diff --git a/var/spack/repos/builtin/packages/tau/tau-rocm-disable-llvm-plugin.patch b/var/spack/repos/builtin/packages/tau/tau-rocm-disable-llvm-plugin.patch
new file mode 100644
index 0000000000..0f863c6a9a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tau/tau-rocm-disable-llvm-plugin.patch
@@ -0,0 +1,19 @@
+diff -ruN spack-src/configure spack-src-patched/configure
+--- spack-src/configure 2024-04-16 00:20:41.000000000 +0000
++++ spack-src-patched/configure 2024-06-12 19:35:50.799407280 +0000
+@@ -3101,7 +3101,6 @@
+ rocprofiler=yes
+ tauoptions="${tauoptions}-rocm"
+ pthread=yes
+- build_llvm_plugin=yes
+ shift
+ ;;
+
+@@ -3118,7 +3117,6 @@
+ rocprofiler=yes
+ tauoptions="${tauoptions}-rocm"
+ pthread=yes
+- build_llvm_plugin=yes
+ shift
+ ;;
+
diff --git a/var/spack/repos/builtin/packages/tauola/package.py b/var/spack/repos/builtin/packages/tauola/package.py
index 7275fb9358..93e41f380f 100644
--- a/var/spack/repos/builtin/packages/tauola/package.py
+++ b/var/spack/repos/builtin/packages/tauola/package.py
@@ -18,6 +18,10 @@ class Tauola(AutotoolsPackage):
version("1.1.8", sha256="3f734e8a967682869cca2c1ffebd3e055562613c40853cc81820d8b666805ed5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("hepmc", default=True, description="Enable hepmc 2.x support")
variant("hepmc3", default=False, description="Enable hepmc3 support")
variant("lhapdf", default=True, description="Enable lhapdf support. Required for TauSpinner.")
diff --git a/var/spack/repos/builtin/packages/tb-lmto/package.py b/var/spack/repos/builtin/packages/tb-lmto/package.py
new file mode 100644
index 0000000000..57612427e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tb-lmto/package.py
@@ -0,0 +1,66 @@
+# Copyright 2013-2024 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.package import *
+
+
+class TbLmto(MakefilePackage):
+ """
+ The STUTTGART TB-LMTO program. The linear muffin-tin orbital (LMTO) method has been described in numerous publications.
+ Use of this software is subject to the license at
+ https://www2.fkf.mpg.de/andersen/LMTODOC/node180.html#SECTION000130000000000000000
+ """
+
+ homepage = "https://www2.fkf.mpg.de/andersen/LMTODOC/LMTODOC.html"
+ manual_download = True
+
+ maintainers("snehring")
+
+ version(
+ "20240601-47.1d", sha256="5b24f2917cef85fe49d3a4ff6403294a44a9cf7c003234a0fd96d626c316bda0"
+ )
+ version(
+ "20240601-47c2.1d",
+ sha256="c80ef9b4aa725ad75ae07b0215671b3674a8f5dced9e87202dd0d486ffe1cb10",
+ )
+ version(
+ "20240601-47u.1d",
+ sha256="bbcc1c57005f33749f8ee6d33be3490071704bce11214544cc4f9c13c28a126e",
+ )
+
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+ depends_on("gnuplot", type="run")
+
+ parallel = False
+
+ @property
+ def build_targets(self):
+ # something about the spack wrapper breaks this, it's extremely weird
+ return [
+ f"CC={self.compiler.cc}",
+ f"FC={self.compiler.fc} -finit-local-zero -fallow-argument-mismatch",
+ "all",
+ ]
+
+ def url_for_version(self, version):
+ return f"file://{os.getcwd()}/lmto{version.string.split('-')[1]}.tar.gz"
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter("makefile")
+ makefile.filter("LMPATH = .*", "LMPATH = ./")
+ makefile.filter("^FFLAGS =.*", "")
+ makefile.filter("^CCFLAGS =.*", "")
+ makefile.filter("CC=.*", "")
+ makefile.filter("FC=.*", "")
+
+ def install(self, spec, prefix):
+ mkdirp(prefix)
+ install_tree(".", prefix)
+
+ def setup_run_environment(self, env):
+ env.prepend_path("PATH", self.prefix)
diff --git a/var/spack/repos/builtin/packages/tbl2asn/package.py b/var/spack/repos/builtin/packages/tbl2asn/package.py
index abea200fb4..dd9de3d3aa 100644
--- a/var/spack/repos/builtin/packages/tbl2asn/package.py
+++ b/var/spack/repos/builtin/packages/tbl2asn/package.py
@@ -22,6 +22,8 @@ class Tbl2asn(Package):
deprecated=True,
)
+ depends_on("libidn@1.34", type="run")
+
def url_for_version(self, ver):
return "https://ftp.ncbi.nih.gov/toolbox/ncbi_tools/converters/by_program/tbl2asn/linux64.tbl2asn.gz"
diff --git a/var/spack/repos/builtin/packages/tblite/package.py b/var/spack/repos/builtin/packages/tblite/package.py
index 52661f0744..68cea15883 100644
--- a/var/spack/repos/builtin/packages/tblite/package.py
+++ b/var/spack/repos/builtin/packages/tblite/package.py
@@ -19,6 +19,9 @@ class Tblite(MesonPackage):
version("0.3.0", sha256="46d77c120501ac55ed6a64dea8778d6593b26fb0653c591f8e8c985e35884f0a")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP parallelisation")
variant("python", default=False, description="Build Python extension module")
diff --git a/var/spack/repos/builtin/packages/tcl-itcl/package.py b/var/spack/repos/builtin/packages/tcl-itcl/package.py
index d7a42c60f8..0d33f8c973 100644
--- a/var/spack/repos/builtin/packages/tcl-itcl/package.py
+++ b/var/spack/repos/builtin/packages/tcl-itcl/package.py
@@ -16,6 +16,8 @@ class TclItcl(AutotoolsPackage):
version("4.0.4", sha256="63860438ca22f70049aecff70dc607b31bb1bea0edcc736e36ac6e36c24aecde")
+ depends_on("c", type="build") # generated
+
extends("tcl")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/tcl-tcllib/package.py b/var/spack/repos/builtin/packages/tcl-tcllib/package.py
index d0a0ccaa3d..5b0231c583 100644
--- a/var/spack/repos/builtin/packages/tcl-tcllib/package.py
+++ b/var/spack/repos/builtin/packages/tcl-tcllib/package.py
@@ -27,4 +27,7 @@ class TclTcllib(AutotoolsPackage):
version("1.15", sha256="6d308980d9dace24c6252b96223c1646e83795ba03dbf996525ad27e1b56bffd")
version("1.14", sha256="dd149fcb37ceb04da83531276a9d7563827807dcee49f9b9f63bedea9e130584")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
extends("tcl")
diff --git a/var/spack/repos/builtin/packages/tcl-tclxml/package.py b/var/spack/repos/builtin/packages/tcl-tclxml/package.py
index 5d39a94ec7..f52651a1cb 100644
--- a/var/spack/repos/builtin/packages/tcl-tclxml/package.py
+++ b/var/spack/repos/builtin/packages/tcl-tclxml/package.py
@@ -12,7 +12,7 @@ class TclTclxml(AutotoolsPackage):
XSL Transformations (TclXSLT). These allow Tcl scripts to read, manipulate
and write XML documents."""
- homepage = "http://tclxml.sourceforge.net/tclxml.html"
+ homepage = "https://tclxml.sourceforge.net/tclxml.html"
url = "https://sourceforge.net/projects/tclxml/files/TclXML/3.2/tclxml-3.2.tar.gz"
list_url = "https://sourceforge.net/projects/tclxml/files/TclXML/"
list_depth = 1
@@ -20,6 +20,8 @@ class TclTclxml(AutotoolsPackage):
version("3.2", sha256="f4116b6680b249ce74b856a121762361ca09e6256f0c8ad578d1c661b822cb39")
version("3.1", sha256="9b017f29c7a06fa1a57d1658bd1d3867297c26013604bdcc4d7b0ca2333552c9")
+ depends_on("c", type="build") # generated
+
extends("tcl")
depends_on("tcl-tcllib")
diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py
index 66cfa63df2..b8e9be6e89 100644
--- a/var/spack/repos/builtin/packages/tcl/package.py
+++ b/var/spack/repos/builtin/packages/tcl/package.py
@@ -4,14 +4,32 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import sys
from llnl.util.filesystem import find_first
+import spack.build_systems.autotools
+import spack.build_systems.nmake
from spack.package import *
from spack.util.environment import is_system_path
+is_windows = sys.platform == "win32"
-class Tcl(AutotoolsPackage, SourceforgePackage):
+
+def find_script_dir(spec: Spec) -> str:
+ # Put more-specific prefixes first
+ check_prefixes = [
+ join_path(spec.prefix, "share", "tcl{0}".format(spec.package.version.up_to(2))),
+ spec.prefix,
+ ]
+ for prefix in check_prefixes:
+ result = find_first(prefix, "init.tcl")
+ if result:
+ return os.path.dirname(result)
+ raise RuntimeError("Cannot locate init.tcl")
+
+
+class Tcl(AutotoolsPackage, NMakePackage, SourceforgePackage):
"""Tcl (Tool Command Language) is a very powerful but easy to learn dynamic
programming language, suitable for a very wide range of uses, including web and
desktop applications, networking, administration, testing and many more. Open source
@@ -20,6 +38,7 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
homepage = "https://www.tcl.tk/"
sourceforge_mirror_path = "tcl/tcl8.6.11-src.tar.gz"
+ tags = ["windows"]
license("TCL")
@@ -33,57 +52,36 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
version("8.6.3", sha256="6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005")
version("8.5.19", sha256="d3f04456da873d17f02efc30734b0300fb6c3b85028d445fe284b83253a6db18")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
extendable = True
depends_on("zlib-api")
- configure_directory = "unix"
-
- filter_compiler_wrappers("tclConfig.sh", relative_root="lib")
-
- def install(self, spec, prefix):
- with working_dir(self.build_directory):
- make("install")
-
- # https://wiki.tcl-lang.org/page/kitgen
- if self.spec.satisfies("@8.6:"):
- make("install-headers")
-
- # Some applications like Expect require private Tcl headers.
- make("install-private-headers")
-
- # Copy source to install tree
- # A user-provided install option might re-do this
- # https://github.com/spack/spack/pull/4102/files
- installed_src = join_path(self.spec.prefix, "share", self.name, "src")
- stage_src = os.path.realpath(self.stage.source_path)
- install_tree(stage_src, installed_src)
-
- # Replace stage dir -> installed src dir in tclConfig
- filter_file(
- stage_src,
- installed_src,
- join_path(self.spec["tcl"].libs.directories[0], "tclConfig.sh"),
- )
-
- # Don't install binaries in src/ tree
- with working_dir(join_path(installed_src, self.configure_directory)):
- make("clean")
-
- @run_after("install")
- def symlink_tclsh(self):
- with working_dir(self.prefix.bin):
- symlink("tclsh{0}".format(self.version.up_to(2)), "tclsh")
+ if sys.platform != "win32":
+ filter_compiler_wrappers("tclConfig.sh", relative_root="lib")
+ build_system("autotools", "nmake")
+ patch("tcl-quote-cc-path.patch", when="platform=windows")
# ========================================================================
# Set up environment to make install easy for tcl extensions.
# ========================================================================
@property
+ def _tcl_name(self):
+ ver_suffix = self.version.up_to(2)
+ win_suffix = ""
+ if is_windows:
+ if self.spec.satisfies("@:8.7"):
+ win_suffix = "t"
+ ver_suffix = ver_suffix.joined
+ return f"{ver_suffix}{win_suffix}"
+
+ @property
def libs(self):
- return find_libraries(
- ["libtcl{0}".format(self.version.up_to(2))], root=self.prefix, recursive=True
- )
+ lib = "lib" if not is_windows else ""
+ return find_libraries([f"{lib}tcl{self._tcl_name}"], root=self.prefix, recursive=True)
@property
def command(self):
@@ -95,21 +93,8 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
# Although we symlink tclshX.Y to tclsh, we also need to support external
# installations that may not have this symlink, or may have multiple versions
# of Tcl installed in the same directory.
- return Executable(
- os.path.realpath(self.prefix.bin.join("tclsh{0}".format(self.version.up_to(2))))
- )
-
- def _find_script_dir(self):
- # Put more-specific prefixes first
- check_prefixes = [
- join_path(self.prefix, "share", "tcl{0}".format(self.version.up_to(2))),
- self.prefix,
- ]
- for prefix in check_prefixes:
- result = find_first(prefix, "init.tcl")
- if result:
- return os.path.dirname(result)
- raise RuntimeError("Cannot locate init.tcl")
+ exe = ".exe" if is_windows else ""
+ return Executable(os.path.realpath(self.prefix.bin.join(f"tclsh{self._tcl_name}{exe}")))
def setup_run_environment(self, env):
"""Set TCL_LIBRARY to the directory containing init.tcl.
@@ -120,7 +105,41 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
"""
# When using tkinter from within spack provided python+tkinter,
# python will not be able to find Tcl unless TCL_LIBRARY is set.
- env.set("TCL_LIBRARY", self._find_script_dir())
+ env.set("TCL_LIBRARY", find_script_dir(self.spec))
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ """Set TCLLIBPATH to include the tcl-shipped directory for
+ extensions and any other tcl extension it depends on.
+
+ For further info see:
+
+ * https://wiki.tcl-lang.org/page/TCLLIBPATH
+ """
+ if dependent_spec.package.extends(self.spec):
+ # Tcl libraries may be installed in lib or lib64, see #19546
+ for lib in ["lib", "lib64"]:
+ tcllibpath = join_path(dependent_spec.prefix, lib)
+ if os.path.exists(tcllibpath):
+ env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ")
+
+
+class AnyBuilder(BaseBuilder):
+ @run_after("install")
+ def symlink_tclsh(self):
+ # There's some logic regarding this suffix in the build system
+ # but the way Spack builds tcl, the Windows suffix is always 't'
+ # unless the version is >= 8.7, in which case there is no suffix
+ # if the build is ever switched to static, this will need to change
+ # to be "s[t]"
+ win_suffix = ""
+ ver_suffix = self.pkg.version.up_to(2)
+ if is_windows:
+ win_suffix = "t" if self.spec.satisfies("@:8.7") else ""
+ win_suffix += ".exe"
+ ver_suffix = ver_suffix.joined
+
+ with working_dir(self.prefix.bin):
+ symlink(f"tclsh{ver_suffix}{win_suffix}", "tclsh")
def setup_dependent_build_environment(self, env, dependent_spec):
"""Set TCL_LIBRARY to the directory containing init.tcl.
@@ -132,15 +151,15 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
* https://wiki.tcl-lang.org/page/TCL_LIBRARY
* https://wiki.tcl-lang.org/page/TCLLIBPATH
"""
- env.set("TCL_LIBRARY", self._find_script_dir())
+ env.set("TCL_LIBRARY", find_script_dir(self.spec))
# If we set TCLLIBPATH, we must also ensure that the corresponding
# tcl is found in the build environment. This to prevent cases
# where a system provided tcl is run against the standard libraries
# of a Spack built tcl. See issue #7128 that relates to python but
# it boils down to the same situation we have here.
- if not is_system_path(self.prefix.bin):
- env.prepend_path("PATH", self.prefix.bin)
+ if not is_system_path(self.spec.prefix.bin):
+ env.prepend_path("PATH", self.spec.prefix.bin)
# WARNING: paths in $TCLLIBPATH must be *space* separated,
# its value is meant to be a Tcl list, *not* an env list
@@ -162,17 +181,51 @@ class Tcl(AutotoolsPackage, SourceforgePackage):
if os.path.exists(tcllibpath):
env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ")
- def setup_dependent_run_environment(self, env, dependent_spec):
- """Set TCLLIBPATH to include the tcl-shipped directory for
- extensions and any other tcl extension it depends on.
- For further info see:
+class AutotoolsBuilder(AnyBuilder, spack.build_systems.autotools.AutotoolsBuilder):
+ configure_directory = "unix"
- * https://wiki.tcl-lang.org/page/TCLLIBPATH
- """
- if dependent_spec.package.extends(self.spec):
- # Tcl libraries may be installed in lib or lib64, see #19546
- for lib in ["lib", "lib64"]:
- tcllibpath = join_path(dependent_spec.prefix, lib)
- if os.path.exists(tcllibpath):
- env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ")
+ def install(self, pkg, spec, prefix):
+ with working_dir(self.build_directory):
+ make("install")
+
+ # https://wiki.tcl-lang.org/page/kitgen
+ if self.spec.satisfies("@8.6:"):
+ make("install-headers")
+
+ # Some applications like Expect require private Tcl headers.
+ make("install-private-headers")
+
+ # Copy source to install tree
+ # A user-provided install option might re-do this
+ # https://github.com/spack/spack/pull/4102/files
+ installed_src = join_path(self.spec.prefix, "share", pkg.name, "src")
+ stage_src = os.path.realpath(pkg.stage.source_path)
+ install_tree(stage_src, installed_src)
+
+ # Replace stage dir -> installed src dir in tclConfig
+ filter_file(
+ stage_src,
+ installed_src,
+ join_path(self.spec["tcl"].libs.directories[0], "tclConfig.sh"),
+ )
+
+ # Don't install binaries in src/ tree
+ with working_dir(join_path(installed_src, self.configure_directory)):
+ make("clean")
+
+
+class NMakeBuilder(AnyBuilder, spack.build_systems.nmake.NMakeBuilder):
+ build_targets = ["all"]
+ install_targets = ["install"]
+
+ @property
+ def makefile_root(self):
+ return f"{self.stage.source_path}\\win"
+
+ @property
+ def makefile_name(self):
+ return "makefile.vc"
+
+ def nmake_install_args(self):
+ return [self.define("INSTALLDIR", self.spec.prefix)]
diff --git a/var/spack/repos/builtin/packages/tcl/tcl-quote-cc-path.patch b/var/spack/repos/builtin/packages/tcl/tcl-quote-cc-path.patch
new file mode 100644
index 0000000000..53039c1aa2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tcl/tcl-quote-cc-path.patch
@@ -0,0 +1,13 @@
+diff --git a/win/rules.vc b/win/rules.vc
+index 8a91b58b46..9e888ce8cb 100644
+--- a/win/rules.vc
++++ b/win/rules.vc
+@@ -416,7 +416,7 @@ _INSTALLDIR=$(_INSTALLDIR)\lib
+ # MACHINE - same as $(ARCH) - legacy
+ # _VC_MANIFEST_EMBED_{DLL,EXE} - commands for embedding a manifest if needed
+
+-cc32 = $(CC) # built-in default.
++cc32 = "$(CC)" # built-in default.
+ link32 = link
+ lib32 = lib
+ rc32 = $(RC) # built-in default.
diff --git a/var/spack/repos/builtin/packages/tclap/package.py b/var/spack/repos/builtin/packages/tclap/package.py
index a2ab335f31..cabbe44e55 100644
--- a/var/spack/repos/builtin/packages/tclap/package.py
+++ b/var/spack/repos/builtin/packages/tclap/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Tclap(AutotoolsPackage, SourceforgePackage):
"""Templatized C++ Command Line Parser"""
- homepage = "http://tclap.sourceforge.net"
+ homepage = "https://tclap.sourceforge.net"
sourceforge_mirror_path = "tclap/tclap-1.2.2.tar.gz"
license("MIT")
@@ -19,3 +19,5 @@ class Tclap(AutotoolsPackage, SourceforgePackage):
version("1.2.3", sha256="19e7db5281540f154348770bc3a7484575f4f549aef8e00aabcc94b395f773c9")
version("1.2.2", sha256="f5013be7fcaafc69ba0ce2d1710f693f61e9c336b6292ae4f57554f59fde5837")
version("1.2.1", sha256="9f9f0fe3719e8a89d79b6ca30cf2d16620fba3db5b9610f9b51dd2cd033deebb")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/tcoffee/package.py b/var/spack/repos/builtin/packages/tcoffee/package.py
index 1564b43ef8..c6cdbc2d9f 100644
--- a/var/spack/repos/builtin/packages/tcoffee/package.py
+++ b/var/spack/repos/builtin/packages/tcoffee/package.py
@@ -14,6 +14,9 @@ class Tcoffee(MakefilePackage):
version("2017-08-17", commit="f389b558e91d0f82e7db934d9a79ce285f853a71")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("blast-plus")
depends_on("dialign-tx")
diff --git a/var/spack/repos/builtin/packages/tcpdump/package.py b/var/spack/repos/builtin/packages/tcpdump/package.py
index 57c2a3f0dc..de2b66e135 100644
--- a/var/spack/repos/builtin/packages/tcpdump/package.py
+++ b/var/spack/repos/builtin/packages/tcpdump/package.py
@@ -24,5 +24,7 @@ class Tcpdump(AutotoolsPackage):
version("4.9.2", sha256="798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79")
version("4.9.1", sha256="f9448cf4deb2049acf713655c736342662e652ef40dbe0a8f6f8d5b9ce5bd8f3")
+ depends_on("c", type="build") # generated
+
depends_on("libpcap")
depends_on("libpcap@1.10.0:", when="@4.99.0:")
diff --git a/var/spack/repos/builtin/packages/tcsh/package.py b/var/spack/repos/builtin/packages/tcsh/package.py
index 5196673c87..24215b5d9f 100644
--- a/var/spack/repos/builtin/packages/tcsh/package.py
+++ b/var/spack/repos/builtin/packages/tcsh/package.py
@@ -30,6 +30,8 @@ class Tcsh(AutotoolsPackage):
version("6.21.00", sha256="c438325448371f59b12a4c93bfd3f6982e6f79f8c5aef4bc83aac8f62766e972")
version("6.20.00", sha256="b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d")
+ depends_on("c", type="build") # generated
+
# Upstream patches
fedora_patch(
"96b95844cc685b11ed0cc215137e394da4505d41",
@@ -106,6 +108,7 @@ class Tcsh(AutotoolsPackage):
)
depends_on("ncurses+termlib")
+ depends_on("libxcrypt", when="platform=linux")
@run_after("install")
def link_csh(self):
diff --git a/var/spack/repos/builtin/packages/tdengine/package.py b/var/spack/repos/builtin/packages/tdengine/package.py
index 6b6d548887..e6760d3078 100644
--- a/var/spack/repos/builtin/packages/tdengine/package.py
+++ b/var/spack/repos/builtin/packages/tdengine/package.py
@@ -18,6 +18,9 @@ class Tdengine(CMakePackage):
version("2.0.3.2", sha256="3eb8df894998d5592cce377b4f7e267972aee8adf9fc1ce60d1af532ffa9c1c6")
version("2.0.3.1", sha256="69418815afcac8051f1aab600415669003b4aeec4ec2aaf09cab24636edaf51f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
@when("target=aarch64:")
def cmake_args(self):
args = ["-DCPUTYPE=aarch64"]
diff --git a/var/spack/repos/builtin/packages/tealeaf/package.py b/var/spack/repos/builtin/packages/tealeaf/package.py
index 64cd5a5db3..ba894d0380 100644
--- a/var/spack/repos/builtin/packages/tealeaf/package.py
+++ b/var/spack/repos/builtin/packages/tealeaf/package.py
@@ -24,6 +24,10 @@ class Tealeaf(MakefilePackage):
version("1.0", sha256="e11799d1a3fbe76041333ba98858043b225c5d65221df8c600479bc55e7197ce")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
def edit(self, spec, prefix):
@@ -43,8 +47,6 @@ class Tealeaf(MakefilePackage):
targets.append("COMPILER=CRAY")
elif "%intel" in self.spec:
targets.append("COMPILER=INTEL")
- elif "%pgi" in self.spec:
- targets.append("COMPILER=PGI")
elif "%xl" in self.spec:
targets.append("COMPILER=XL")
diff --git a/var/spack/repos/builtin/packages/teckit/package.py b/var/spack/repos/builtin/packages/teckit/package.py
index ad918cfdb6..987d7feae9 100644
--- a/var/spack/repos/builtin/packages/teckit/package.py
+++ b/var/spack/repos/builtin/packages/teckit/package.py
@@ -30,6 +30,9 @@ class Teckit(AutotoolsPackage):
version("2.5.6", commit="41c20be2793e1afcbb8de6339af89d1eeab84fe8")
version("2.5.5", commit="2733fd9895819e3697257550cc39b8e419c1ee7e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/tecplot/package.py b/var/spack/repos/builtin/packages/tecplot/package.py
index c11d28d9a1..ba5e2745bc 100644
--- a/var/spack/repos/builtin/packages/tecplot/package.py
+++ b/var/spack/repos/builtin/packages/tecplot/package.py
@@ -20,6 +20,11 @@ class Tecplot(Package):
maintainers("LRWeber")
version(
+ "2024r1",
+ sha256="709022a5d5532d46a47cfa3bf0698a4ea8428c7a0dea2feb708a5add8091a8f0",
+ expand=False,
+ )
+ version(
"2023r1",
sha256="58e7f4de875e65047f4edd684013d0ff538df6246f00c059458989f281be4c93",
expand=False,
diff --git a/var/spack/repos/builtin/packages/telegraf/package.py b/var/spack/repos/builtin/packages/telegraf/package.py
index 92d4084bc0..2523852bd4 100644
--- a/var/spack/repos/builtin/packages/telegraf/package.py
+++ b/var/spack/repos/builtin/packages/telegraf/package.py
@@ -16,6 +16,7 @@ class Telegraf(MakefilePackage):
license("MIT")
+ version("1.30.2", sha256="3514d870fe1899f20c5d1f1545233413cbe11061b23a0cafbd44b861a9295dc6")
version("1.20.3", sha256="cf8fd4d38970648281101e8a71b1a48c5765c8aaa9d67619c00272c9192e9057")
version("1.19.3", sha256="d2fb8a3519a5690c801e1221e22c3693ed95204f70f6c57eb13267ca1964c659")
diff --git a/var/spack/repos/builtin/packages/telocal/package.py b/var/spack/repos/builtin/packages/telocal/package.py
new file mode 100644
index 0000000000..2b7e9437b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/telocal/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Telocal(PythonPackage):
+ """A package for quantifying transposable elements at a locus level for RNAseq datasets"""
+
+ homepage = "https://hammelllab.labsites.cshl.edu/software/#TElocal"
+
+ url = "https://github.com/mhammell-laboratory/TElocal/archive/refs/tags/1.1.2.tar.gz"
+
+ license("GPL-3.0-only", checked_by="A_N_Other")
+
+ version("1.1.2", sha256="d0c7d419d7df06dedbdffbf316fe01fa7324994e0fe1c4ea721835ec9b3e9bb5")
+
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pysam@0.9:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/tempestremap/package.py b/var/spack/repos/builtin/packages/tempestremap/package.py
index faf870e61f..5733663bbd 100644
--- a/var/spack/repos/builtin/packages/tempestremap/package.py
+++ b/var/spack/repos/builtin/packages/tempestremap/package.py
@@ -28,6 +28,8 @@ class Tempestremap(AutotoolsPackage):
version("2.0.1", sha256="a3f1bef8cc413a689d429ac56f2bcc2e1d282d99797c3375233de792a7448ece")
version("2.0.0", sha256="5850e251a4ad04fc924452f49183e5e12c38725832a568e57fa424a844b8a000")
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/templight-tools/package.py b/var/spack/repos/builtin/packages/templight-tools/package.py
index c2951943ba..ea41e74827 100644
--- a/var/spack/repos/builtin/packages/templight-tools/package.py
+++ b/var/spack/repos/builtin/packages/templight-tools/package.py
@@ -16,5 +16,7 @@ class TemplightTools(CMakePackage):
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake @2.8.7:", type="build")
depends_on("boost @1.48.1: +exception+filesystem+system+graph+program_options+test+container")
diff --git a/var/spack/repos/builtin/packages/templight/package.py b/var/spack/repos/builtin/packages/templight/package.py
index e49375e30e..5bf08fa5f8 100644
--- a/var/spack/repos/builtin/packages/templight/package.py
+++ b/var/spack/repos/builtin/packages/templight/package.py
@@ -18,8 +18,6 @@ class Templight(CMakePackage):
git = "https://github.com/mikael-s-persson/templight.git"
llvm_svn = "http://llvm.org/svn/llvm-project/{0}/trunk"
- family = "compiler" # Used by lmod
-
# Templight is a patch to clang, so we have three versions to care about:
# - The one that will be used in Spack specifications
# - The git branch that we need to fetch from in the templight repo
@@ -63,6 +61,8 @@ class Templight(CMakePackage):
)
version("2018.07.20", commit="91589f95427620dd0a2346bd69ba922f374aa42a")
+
+ depends_on("cxx", type="build") # generated
resource(
name="llvm-r337566",
svn=llvm_svn.format("llvm"),
@@ -128,7 +128,6 @@ class Templight(CMakePackage):
cmake_args = [
"-DLLVM_REQUIRES_RTTI:BOOL=ON",
"-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp",
- "-DPYTHON_EXECUTABLE:PATH={0}".format(spec["python"].command.path),
"-DLLVM_EXTERNAL_POLLY_BUILD:Bool=OFF",
"-DLLVM_TOOL_POLLY_BUILD:Bool=OFF",
"-DLLVM_POLLY_BUILD:Bool=OFF",
diff --git a/var/spack/repos/builtin/packages/tempo/package.py b/var/spack/repos/builtin/packages/tempo/package.py
index 95215a857d..9b89bc8b06 100644
--- a/var/spack/repos/builtin/packages/tempo/package.py
+++ b/var/spack/repos/builtin/packages/tempo/package.py
@@ -9,15 +9,63 @@ from spack.package import *
class Tempo(AutotoolsPackage):
"""Tempo is a program for pulsar timing data analysis."""
+ # Warning: Tempo references reads files that it's shipped with.
+ # It's written in Fortran and the fortran code declares strings of a certain length
+ # for those files. If you haven't modified some of the Spack configurations
+ # in terms of where the install go, hash length, etc. then it is likely
+ # that running tempo will fail with an error similar to
+ #
+ # more: cannot open /...../gcc-11.3.0/tempo-master-lnizs: No such file or directory
+ #
+
homepage = "http://tempo.sourceforge.net/"
- git = "git://git.code.sf.net/p/tempo/tempo.git"
+ git = "https://git.code.sf.net/p/tempo/tempo.git"
+ version("master", branch="master", preferred=True)
version("develop")
version("LWA-10-17-2020", commit="6bab1083350eca24745eafed79a55156bdd1e7d5")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
- def setup_dependent_run_environment(self, spack_env, dependent_spec):
- spack_env.set("TEMPO_DIR", self.prefix)
+ @run_before("configure")
+ def edit(self):
+ # By default tempo.cfg.in uses abs_top_srcdir (i.e., the staging/build directory)
+ # In spack this directory gets deleted by default so make the file use the
+ # Install prefix directory instead but only for the master version
+ # So we don't possibly break anything for the LWA version
+ if "master" in str(self.version):
+ tempocfg = FileFilter("tempo.cfg.in")
+ tempocfg.filter(r"(.*)(abs_top_srcdir)(.*)", r"\1prefix\3")
+
+ @run_after("install")
+ def post_install_packages(self):
+
+ # Copy some files over needed by TEMPO, again only for the master version
+ if "master" in str(self.version):
+ cd(self.stage.source_path)
+ cp = which("cp")
+
+ cp("obsys.dat", join_path(self.prefix, "obsys.dat"))
+ cp("tempo.hlp", join_path(self.prefix, "tempo.hlp"))
+ cp("tempo.cfg", join_path(self.prefix, "tempo.cfg"))
+
+ cp("-r", "clock", join_path(self.prefix, "clock"))
+ cp("-r", "ephem", join_path(self.prefix, "ephem"))
+ cp("-r", "tzpar", join_path(self.prefix, "tzpar"))
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set("TEMPO", self.prefix)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.set("TEMPO", self.prefix)
+
+ # For LWA-10-17-2020 version
+ env.set("TEMPO_DIR", self.prefix)
+
+ def setup_run_environment(self, env):
+ env.set("TEMPO", self.prefix)
diff --git a/var/spack/repos/builtin/packages/tengine/package.py b/var/spack/repos/builtin/packages/tengine/package.py
index 73412eb30d..23753d44f0 100644
--- a/var/spack/repos/builtin/packages/tengine/package.py
+++ b/var/spack/repos/builtin/packages/tengine/package.py
@@ -12,10 +12,14 @@ class Tengine(AutotoolsPackage):
homepage = "https://tengine.taobao.org/"
url = "https://github.com/alibaba/tengine/archive/2.3.2.tar.gz"
+ version("3.1.0", sha256="64ed7155c0c904ce0fe7199c21b8eb6c2abfc267278fa8af832c0cb781e864dc")
version("2.3.2", sha256="a65998a35739a59f8a16ec4c6090a59e569ba5a1a3f68fecad952057c1a18fea")
version("2.3.1", sha256="3dd93f813b80ed7581a81079a2037df6e4777b7e760fd6635b4009d344a5ab1c")
version("2.3.0", sha256="17cf1380d4faefb70707970437b3f8b66f6ff4530b5e6e61970b35f59b2e2624")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("pcre")
def setup_run_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/tensorflow-serving-client/package.py b/var/spack/repos/builtin/packages/tensorflow-serving-client/package.py
index 38dd6e7fd2..5b63beeb16 100644
--- a/var/spack/repos/builtin/packages/tensorflow-serving-client/package.py
+++ b/var/spack/repos/builtin/packages/tensorflow-serving-client/package.py
@@ -22,5 +22,7 @@ class TensorflowServingClient(CMakePackage):
version("2.1.0", sha256="7a31d8cfa1d861f73953d4728665dd6d74e205d1fa01062a6c2b1aeee4674f73")
version("2.0.0", sha256="55310ad484f257173ad5194df7f7116b2049260c3d29049ef8d789d1d8bd9948")
+ depends_on("cxx", type="build") # generated
+
depends_on("protobuf")
depends_on("grpc")
diff --git a/var/spack/repos/builtin/packages/tensorpipe/package.py b/var/spack/repos/builtin/packages/tensorpipe/package.py
index e2e58e2efc..efe9beb8ae 100644
--- a/var/spack/repos/builtin/packages/tensorpipe/package.py
+++ b/var/spack/repos/builtin/packages/tensorpipe/package.py
@@ -31,6 +31,9 @@ class Tensorpipe(CMakePackage):
"2020-06-26", commit="3b8089c9c6717038cff44b70b881d0ad6c93e679", submodules=True
) # py-torch@1.6
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("libuv@1.26:")
diff --git a/var/spack/repos/builtin/packages/termcap/package.py b/var/spack/repos/builtin/packages/termcap/package.py
index 58cf70e466..d8b702aa3a 100644
--- a/var/spack/repos/builtin/packages/termcap/package.py
+++ b/var/spack/repos/builtin/packages/termcap/package.py
@@ -18,3 +18,5 @@ class Termcap(AutotoolsPackage):
version("1.3.1", sha256="91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100")
version("1.3", sha256="3eb4b98ae08408ca65dd9275f3c8e56e2feac1261fae914a9b21273db51cf000")
+
+ depends_on("c", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/tesseract/package.py b/var/spack/repos/builtin/packages/tesseract/package.py
index f74fdda513..7f8359f297 100644
--- a/var/spack/repos/builtin/packages/tesseract/package.py
+++ b/var/spack/repos/builtin/packages/tesseract/package.py
@@ -18,6 +18,8 @@ class Tesseract(AutotoolsPackage):
version("4.1.0", sha256="5c5ed5f1a76888dc57a83704f24ae02f8319849f5c4cf19d254296978a1a1961")
version("4.0.0", sha256="a1f5422ca49a32e5f35c54dee5112b11b99928fc9f4ee6695cdc6768d69f61dd")
+ depends_on("cxx", type="build") # generated
+
# do not fetch the jar files from Makefile
patch("java_Makefile.patch")
diff --git a/var/spack/repos/builtin/packages/test-drive/package.py b/var/spack/repos/builtin/packages/test-drive/package.py
index 921bc213c2..194cfbfe13 100644
--- a/var/spack/repos/builtin/packages/test-drive/package.py
+++ b/var/spack/repos/builtin/packages/test-drive/package.py
@@ -17,3 +17,5 @@ class TestDrive(MesonPackage):
license("Apache-2.0")
version("0.4.0", "effabe5d46ea937a79f3ea8d37eea43caf38f9f1377398bad0ca02784235e54a")
+
+ depends_on("fortran", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/testdfsio/package.py b/var/spack/repos/builtin/packages/testdfsio/package.py
index f002893c21..cbe7e75fc3 100644
--- a/var/spack/repos/builtin/packages/testdfsio/package.py
+++ b/var/spack/repos/builtin/packages/testdfsio/package.py
@@ -10,9 +10,13 @@ from spack.package import *
class Testdfsio(MavenPackage):
"""A corrected and enhanced version of Apache Hadoop TestDFSIO"""
- homepage = "https://github.com/tthx/testdfsio"
- url = "https://github.com/tthx/testdfsio/archive/0.0.1.tar.gz"
+ homepage = "https://github.com/asotirov0/testdfsio"
+ url = "https://github.com/asotirov0/testdfsio/archive/0.0.1.tar.gz"
- version("0.0.1", sha256="fe8cc47260ffb3e3ac90e0796ebfe73eb4dac64964ab77671e5d32435339dd09")
+ version(
+ "0.0.1",
+ sha256="fe8cc47260ffb3e3ac90e0796ebfe73eb4dac64964ab77671e5d32435339dd09",
+ deprecated=True,
+ )
depends_on("hadoop@3.2.1:", type="run")
diff --git a/var/spack/repos/builtin/packages/tests-sos/package.py b/var/spack/repos/builtin/packages/tests-sos/package.py
new file mode 100644
index 0000000000..41a6274e70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tests-sos/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class TestsSos(AutotoolsPackage):
+ """Sandia OpenSHMEM unit tests and performance testing suite."""
+
+ homepage = "https://github.com/openshmem-org/tests-sos"
+ url = "https://github.com/openshmem-org/tests-sos/archive/refs/tags/v1.5.2.tar.gz"
+
+ maintainers("jack-morrison")
+
+ version("1.5.2", sha256="3a063963ef779419aadc6b21ff2f1e4dcdd3e95fa8ed23545434e56757f3187f")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ depends_on("sos", type=("build", "run"))
+
+ def autoreconf(self, spec, prefix):
+ bash = which("bash")
+ bash("./autogen.sh")
+
+ def setup_build_environment(self, env):
+ env.set("CC", "oshcc")
+ env.set("CXX", "oshc++")
+ env.set("FC", "oshfort")
diff --git a/var/spack/repos/builtin/packages/testu01/package.py b/var/spack/repos/builtin/packages/testu01/package.py
index be693dd652..b49fd5d16f 100644
--- a/var/spack/repos/builtin/packages/testu01/package.py
+++ b/var/spack/repos/builtin/packages/testu01/package.py
@@ -16,8 +16,6 @@ class Testu01(AutotoolsPackage):
homepage = "http://simul.iro.umontreal.ca/testu01/tu01.html"
git = "https://github.com/umontreal-simul/TestU01-2009/"
- maintainers("sethrj")
-
version(
"1.2.3",
sha256="bc1d1dd2aea7ed3b3d28eaad2c8ee55913f11ce67aec8fe4f643c1c0d2ed1cac",
diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py
index 7faeedc9fe..ce56f975ae 100644
--- a/var/spack/repos/builtin/packages/tetgen/package.py
+++ b/var/spack/repos/builtin/packages/tetgen/package.py
@@ -42,6 +42,8 @@ class Tetgen(Package):
url="http://www.tetgen.org/files/tetgen1.4.3.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=True, description="Builds the library in pic mode.")
variant("debug", default=False, description="Builds the library in debug mode.")
variant(
diff --git a/var/spack/repos/builtin/packages/tethex/package.py b/var/spack/repos/builtin/packages/tethex/package.py
index 2698cde1c2..028040d497 100644
--- a/var/spack/repos/builtin/packages/tethex/package.py
+++ b/var/spack/repos/builtin/packages/tethex/package.py
@@ -20,6 +20,8 @@ class Tethex(CMakePackage):
version("develop", branch="master")
version("0.0.7", sha256="5f93f434c6d110be3d8d0eba69336864d0e5a26aba2d444eb25adbd2caf73645")
+ depends_on("cxx", type="build") # generated
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/texinfo/package.py b/var/spack/repos/builtin/packages/texinfo/package.py
index bc1bc5b64b..ae3cfc9582 100644
--- a/var/spack/repos/builtin/packages/texinfo/package.py
+++ b/var/spack/repos/builtin/packages/texinfo/package.py
@@ -25,6 +25,7 @@ class Texinfo(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
+ version("7.1", sha256="dd5710b3a53ac002644677a06145748e260592a35be182dc830ebebb79c5d5a0")
version("7.0.3", sha256="3cc5706fb086b895e1dc2b407aade9f95a3a233ff856273e2b659b089f117683")
version("7.0", sha256="9261d4ee11cdf6b61895e213ffcd6b746a61a64fe38b9741a3aaa73125b35170")
version("6.8", sha256="8e09cf753ad1833695d2bac0f57dc3bd6bcbbfbf279450e1ba3bc2d7fb297d08")
@@ -37,6 +38,9 @@ class Texinfo(AutotoolsPackage, GNUMirrorPackage):
version("5.1", sha256="50e8067f9758bb2bf175b69600082ac4a27c464cb4bcd48a578edd3127216600")
version("5.0", sha256="2c579345a39a2a0bb4b8c28533f0b61356504a202da6a25d17d4d866af7f5803")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl")
depends_on("ncurses")
depends_on("gettext")
@@ -61,7 +65,7 @@ class Texinfo(AutotoolsPackage, GNUMirrorPackage):
def build_targets(self):
targets = []
if self.spec.satisfies("@7.0:"):
- targets.append("CFLAGS={}".format(self.compiler.c11_flag))
+ targets.append(f"CFLAGS={self.compiler.c11_flag}")
return targets
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/texlive/package.py b/var/spack/repos/builtin/packages/texlive/package.py
index 654ad2553f..7accb43e8e 100644
--- a/var/spack/repos/builtin/packages/texlive/package.py
+++ b/var/spack/repos/builtin/packages/texlive/package.py
@@ -3,10 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
import platform
import re
-import tempfile
from spack.package import *
@@ -21,28 +19,27 @@ class Texlive(AutotoolsPackage):
homepage = "https://www.tug.org/texlive"
url = "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2020/texlive-20200406-source.tar.xz"
- base_url = "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/{year}/texlive-{version}-{dist}.tar.xz"
- list_url = "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive"
+ base_url = "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/{year}/texlive-{version}-{dist}.tar.xz"
+ list_url = "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive"
list_depth = 1
license("GPL-2.0-or-later AND GPL-3.0-or-later", checked_by="tgamblin")
- # Below is the url for a binary distribution. This was originally how this
- # was distributed in Spack, but should be considered deprecated. Note that
- # the "live" version will pull down the packages so it requires an Internet
- # connection at install time and the package versions could change over
- # time. It is better to use a version built from tarballs, as defined with
- # the "releases" below.
- version(
- "live",
- sha256="e67edec49df6b7c4a987a7d5a9b31bcf41258220f9ac841c7a836080cd334fb5",
- url="ftp://tug.org/historic/systems/texlive/2022/install-tl-unx.tar.gz",
- deprecated=True,
- )
-
# Add information for new versions below.
releases = [
{
+ "version": "20240312",
+ "year": "2024",
+ "sha256_source": "7b6d87cf01661670fac45c93126bed97b9843139ed510f975d047ea938b6fe96",
+ "sha256_texmf": "c8eae2deaaf51e86d93baa6bbcc4e94c12aa06a0d92893df474cc7d2a012c7a7",
+ },
+ {
+ "version": "20230313",
+ "year": "2023",
+ "sha256_source": "3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9",
+ "sha256_texmf": "4c4dc77a025acaad90fb6140db2802cdb7ca7a9a2332b5e3d66aa77c43a81253",
+ },
+ {
"version": "20220321",
"year": "2022",
"sha256_source": "5ffa3485e51eb2c4490496450fc69b9d7bd7cb9e53357d92db4bcd4fd6179b56",
@@ -82,44 +79,32 @@ class Texlive(AutotoolsPackage):
when="@{0}".format(release["version"]),
)
- # The following variant is only for the "live" binary installation.
- # There does not seem to be a complete list of schemes.
- # Examples include:
- # full scheme (everything)
- # medium scheme (small + more packages and languages)
- # small scheme (basic + xetex, metapost, a few languages)
- # basic scheme (plain and latex)
- # minimal scheme (plain only)
- # See:
- # https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-25025r6
- variant(
- "scheme",
- default="small",
- values=("minimal", "basic", "small", "medium", "full"),
- description='Package subset to install, only meaningful for "live" ' "version",
- )
-
- depends_on("perl", type="build", when="@live")
- depends_on("pkgconfig", when="@2019:", type="build")
-
- depends_on("cairo+X", when="@2019:")
- depends_on("freetype", when="@2019:")
- depends_on("ghostscript", when="@2019:")
- depends_on("gmp", when="@2019:")
- depends_on("harfbuzz+graphite2", when="@2019:")
- depends_on("icu4c", when="@2019:")
- depends_on("libgd", when="@2019:")
- depends_on("libpaper", when="@2019:")
- depends_on("libpng", when="@2019:")
- depends_on("libxaw", when="@2019:")
- depends_on("libxt", when="@2019:")
- depends_on("mpfr", when="@2019:")
- depends_on("perl", when="@2019:")
- depends_on("pixman", when="@2019:")
- depends_on("poppler@:0.84", when="@2019:")
- depends_on("teckit", when="@2019:")
- depends_on("zlib-api", when="@2019:")
- depends_on("zziplib", when="@2019:")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ depends_on("pkgconfig", type="build")
+
+ depends_on("cairo+X")
+ depends_on("freetype")
+ depends_on("ghostscript")
+ depends_on("gmp")
+ depends_on("harfbuzz+graphite2")
+ depends_on("icu4c")
+ depends_on("libgd")
+ depends_on("libpaper")
+ depends_on("libpng")
+ depends_on("libxaw")
+ depends_on("libxt")
+ depends_on("mpfr")
+ depends_on("perl")
+ depends_on("pixman")
+ depends_on("poppler@:0.83", when="@:2019")
+ depends_on("poppler", when="@:2020")
+ depends_on("teckit")
+ depends_on("zlib-api")
+ depends_on("zziplib")
+ depends_on("lua-lpeg", when="@20240312:")
build_directory = "spack-build"
@@ -127,7 +112,6 @@ class Texlive(AutotoolsPackage):
tex_arch = "{0}-{1}".format(platform.machine(), platform.system().lower())
return tex_arch
- @when("@2019:")
def configure_args(self):
args = [
"--bindir={0}".format(join_path(self.prefix.bin, self.tex_arch())),
@@ -158,25 +142,29 @@ class Texlive(AutotoolsPackage):
@run_after("install")
def setup_texlive(self):
- if not self.spec.satisfies("@live"):
- mkdirp(self.prefix.tlpkg.TeXLive)
- install("texk/tests/TeXLive/*", self.prefix.tlpkg.TeXLive)
+ mkdirp(self.prefix.tlpkg.TeXLive)
+ install("texk/tests/TeXLive/*", self.prefix.tlpkg.TeXLive)
- with working_dir("spack-build"):
- make("texlinks")
+ with working_dir("spack-build"):
+ make("texlinks")
- copy_tree("texlive-{0}-texmf".format(self.version.string), self.prefix)
+ copy_tree("texlive-{0}-texmf".format(self.version.string), self.prefix)
- # Create and run setup utilities
- fmtutil_sys = Executable(join_path(self.prefix.bin, self.tex_arch(), "fmtutil-sys"))
- mktexlsr = Executable(join_path(self.prefix.bin, self.tex_arch(), "mktexlsr"))
+ # Create and run setup utilities
+ fmtutil_sys = Executable(join_path(self.prefix.bin, self.tex_arch(), "fmtutil-sys"))
+ mktexlsr = Executable(join_path(self.prefix.bin, self.tex_arch(), "mktexlsr"))
+ mktexlsr()
+ fmtutil_sys("--all")
+ if self.spec.satisfies("@:2023"):
mtxrun = Executable(join_path(self.prefix.bin, self.tex_arch(), "mtxrun"))
- mktexlsr()
- fmtutil_sys("--all")
- mtxrun("--generate")
-
else:
- pass
+ mtxrun_lua = join_path(
+ self.prefix, "texmf-dist", "scripts", "context", "lua", "mtxrun.lua"
+ )
+ chmod = which("chmod")
+ chmod("+x", mtxrun_lua)
+ mtxrun = Executable(mtxrun_lua)
+ mtxrun("--generate")
def setup_build_environment(self, env):
env.prepend_path("PATH", join_path(self.prefix.bin, self.tex_arch()))
@@ -184,48 +172,6 @@ class Texlive(AutotoolsPackage):
def setup_run_environment(self, env):
env.prepend_path("PATH", join_path(self.prefix.bin, self.tex_arch()))
- def setup_dependent_build_environment(self, env, dependent_spec):
- self.setup_run_environment(env)
-
- @when("@live")
- def autoreconf(self, spec, prefix):
- touch("configure")
-
- @when("@live")
- def configure(self, spec, prefix):
- pass
-
- @when("@live")
- def build(self, spec, prefix):
- pass
-
- @when("@live")
- def install(self, spec, prefix):
- # The binary install needs a profile file to be present
- tmp_profile = tempfile.NamedTemporaryFile()
- tmp_profile.write("selected_scheme {0}".format(spec.variants["scheme"]).encode())
-
- # Using texlive's mirror system leads to mysterious problems,
- # in lieu of being able to specify a repository as a variant, hardwire
- # a particular (slow, but central) one for now.
- _repository = "https://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet/"
- env = os.environ
- env["TEXLIVE_INSTALL_PREFIX"] = prefix
- perl = which("perl")
- scheme = spec.variants["scheme"].value
- perl(
- "./install-tl",
- "-scheme",
- scheme,
- "-repository",
- _repository,
- "-portable",
- "-profile",
- tmp_profile.name,
- )
-
- tmp_profile.close()
-
executables = [r"^tex$"]
@classmethod
@@ -233,15 +179,7 @@ class Texlive(AutotoolsPackage):
# https://askubuntu.com/questions/100406/finding-the-tex-live-version
# Thanks to @michaelkuhn that told how to reuse the package releases
# variable.
- # Added 3 older releases: 2018 (CentOS-8), 2017 (Ubuntu-18.04), 2013 (CentOS-7).
releases = cls.releases
- releases.extend(
- [
- {"version": "20180414", "year": "2018"},
- {"version": "20170524", "year": "2017"},
- {"version": "20130530", "year": "2013"},
- ]
- )
# tex indicates the year only
output = Executable(exe)("--version", output=str, error=str)
match = re.search(r"TeX Live (\d+)", output)
diff --git a/var/spack/repos/builtin/packages/texstudio/package.py b/var/spack/repos/builtin/packages/texstudio/package.py
index a775f16886..c33575a8c2 100644
--- a/var/spack/repos/builtin/packages/texstudio/package.py
+++ b/var/spack/repos/builtin/packages/texstudio/package.py
@@ -25,6 +25,9 @@ class Texstudio(QMakePackage):
version("2.12.12", sha256="5978daa806c616f9a1eea231bb613f0bc1037d7d2435ee5ca6b14fe88a2caa8c")
version("2.12.10", sha256="92cf9cbb536e58a5929611fa40438cd9d7ea6880022cd3c5de0483fd15d3df0b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"poppler",
default=True,
diff --git a/var/spack/repos/builtin/packages/textparser/package.py b/var/spack/repos/builtin/packages/textparser/package.py
index 54658a61ba..fff741ef06 100644
--- a/var/spack/repos/builtin/packages/textparser/package.py
+++ b/var/spack/repos/builtin/packages/textparser/package.py
@@ -18,6 +18,10 @@ class Textparser(CMakePackage):
version("master", branch="master")
version("1.8.8", commit="31ec1f23df21611d0765c27a6458fdbbf4cde66d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Activate MPI support")
variant("fapi", default=False, description="This option is for building Fortran API.")
variant(
diff --git a/var/spack/repos/builtin/packages/tfel/package.py b/var/spack/repos/builtin/packages/tfel/package.py
index 540d6f2503..901feee1ab 100644
--- a/var/spack/repos/builtin/packages/tfel/package.py
+++ b/var/spack/repos/builtin/packages/tfel/package.py
@@ -27,7 +27,7 @@ class Tfel(CMakePackage):
constraints on each component of the strain or the stress.
"""
- homepage = "http://tfel.sourceforge.net"
+ homepage = "https://tfel.sourceforge.net"
url = "https://github.com/thelfer/tfel/archive/TFEL-4.0.tar.gz"
git = "https://github.com/thelfer/tfel.git"
maintainers("thelfer")
@@ -49,26 +49,32 @@ class Tfel(CMakePackage):
# released version
version(
- "4.2.0",
- sha256="cf8a309c4d19a8e36232f8540ff28aa0d6285645f8dfb1ac57dd481ba3453e02",
+ "4.2.1",
+ sha256="14f27257014a992a4e511f35390e4b9a086f6a5ed74087f891f8c00306f1758f",
preferred=True,
)
+ version("4.2.0", sha256="cf8a309c4d19a8e36232f8540ff28aa0d6285645f8dfb1ac57dd481ba3453e02")
+ version("4.1.2", sha256="e9e7c2aeef7d19f92ffd83b2a7fc54186e648d25e42696b5cba7c4bfa194276a")
version("4.1.1", sha256="e0f229094e88a2d6c6a78ae60fa77d2f4b8294e9d810c21fd7df61004bf29a33")
version("4.1.0", sha256="7505c41da9df5fb3c281651ff29b58a18fd4d91b92f839322f0267269c5f1375")
+ version("4.0.3", sha256="c21c13fbd5ad8f52e9874a7931c619b9b7e69d69a2ab003e09628a1e9945542d")
version("4.0.2", sha256="f5c8a285e00f334fd3e1a95f9a393fed393990ee827dae3766da1decfaa1074e")
version("4.0.1", sha256="f54741b7e654cb12511ca68c6494a4789ba41b5ada4cd345ad2bc7da631309d1")
version("4.0.0", sha256="7a0c32c8a9cd2fd65cbcb54fff802f303665d7cba5d46f92ff3d55f057c92845")
+ version("3.4.6", sha256="88c3d076ca360ffbadb6ffeb6cbc1267a9da0e098e7c182407501820ba2bf6e7")
version("3.4.5", sha256="064d6926106e0052829182087a025f58fc3e98dfb69967e0795d9cdb4e1500b9")
version("3.4.4", sha256="a518a7a761fec6c92fab6dc9df5694c28aad2554c7c649d707dfdc71fe93d2ca")
version("3.4.3", sha256="e58515effe57d473385fe0b592d9e1d1286c0901496c61268d9efd92a2550849")
version("3.4.2", sha256="f39e65b2282fd3b108081388f161ba662407b192fed68fafe324c7528026a202")
version("3.4.1", sha256="04cd4257e39e1b05e02b12ad941106fff4d439934bdfe6e950c08bab23e2a4ba")
version("3.4.0", sha256="176feb4c1726d0f21f4c656b20620dce6f99ab7f5f09a66905aeb643a316bbc1")
+ version("3.3.5", sha256="4319a7a6363f69f7f0c78abb0741bc90b49dc777831c2886b13aca61c79bae04")
version("3.3.4", sha256="3829e0b07520a14b17a8e75f879683a0d97b04b897aeb3ad0dd96dc94c0fcd6b")
version("3.3.3", sha256="5a1fb43a8086e594e0a7234c1f227e6e005d384fd84affe3acadccb68fe2bbf6")
version("3.3.2", sha256="17127ffdf92367c10041258f70a88ac3dcb0a7d89c1766a6aa1ebaeb4d03d55d")
version("3.3.1", sha256="ad07329c25874832fbacc999b5f88d9b9ab84415bc897a6f3cae5b4afcd7661f")
version("3.3.0", sha256="884ad68b0fbbededc3a602d559433c24114ae4534dc9f0a759d31ca3589dace0")
+ version("3.2.10", sha256="3fe24a2811811d68ce5735f601d12fae7b1da465ac5b2917bd0887782218f2bd")
version("3.2.9", sha256="4ee26f2b5db24dc10113100ae0165cbbe8c7960c99c0e64ec96410788774aa54")
version("3.2.8", sha256="8bc3db975a87c3f0da3a857ab45cd237ee02f4ab35094a7db28b01d92676a78c")
version("3.2.7", sha256="05a055a955dd52f0b2dbf9d518a86c58805b2b63f3766268d72cacd6126c187d")
@@ -79,6 +85,7 @@ class Tfel(CMakePackage):
version("3.2.2", sha256="69b01ae0d1f9140b619aaa9135948284ff40d4654672c335e55ab4934c02eb43")
version("3.2.1", sha256="12786480524a7fe86889120fb334fa00211dfd44ad5ec71e2279e7adf1ddc807")
version("3.2.0", sha256="089d79745e9f267a2bd03dcd8841d484e668bd27f5cc2ff7453634cb39016848")
+ version("3.1.13", sha256="f0e5dddb5d32931dcab2d060029da31aacb47cd3251297d701b86d93c8fa0255")
version("3.1.12", sha256="770aa4680063ddd7be4f735ed1ec9402e83502d1ceb688c79cdba27490b7bf98")
version("3.1.11", sha256="578e3463db029bfed7b24bfa1226394e6998cc95959b46246ab9bf5cfb6d65f0")
version("3.1.10", sha256="635a2507f139bb6d893e0a7bb223cd1d9ddab5dfddee179a3b2e9f8b0b63e065")
@@ -92,6 +99,7 @@ class Tfel(CMakePackage):
version("3.1.2", sha256="2eaa191f0699031786d8845ac769320a42c7e035991d82b3738289886006bfba")
version("3.1.1", sha256="a4c0c21c6c22752cc90c82295a6bafe637b3395736c66fcdfcfe4aeccb5be7af")
version("3.1.0", sha256="dd67b400b5f157aef503aa3615b9bf6b52333876a29e75966f94ee3f79ab37ad")
+ version("3.0.13", sha256="04987d318c46294853481fa987dd09e8ca38493b8994a363d20623f9b8f009ff")
version("3.0.12", sha256="f7dae9e5a00c721445b3167ec7bc71747bab047ddb36103f232b72d3e4d3cd00")
version("3.0.11", sha256="3d2d249534563887d301f6be5c4c2e4be33258b9d712d550d4c71271b764cc2d")
version("3.0.10", sha256="1604f22948b4af6ef84839d97909f7011ce614254e1a6de092ddc61832f7d343")
@@ -107,6 +115,10 @@ class Tfel(CMakePackage):
version("3.0.0", sha256="b2cfaa3d7900b4f32f327565448bf9cb8e4242763f651bff8f231f378a278f9e")
version("2.0.4", sha256="cac078435aad73d9a795516f161b320d204d2099d6a286e786359f484355a43a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# solvers interfaces
variant("castem", default=True, description="Enables Cast3M interface")
variant("aster", default=True, description="Enables Code_Aster interface")
@@ -180,6 +192,8 @@ class Tfel(CMakePackage):
args.append("-Denable-python-bindings=OFF")
if ("+python" in self.spec) or ("+python_bindings" in self.spec):
+ # Note: calls find_package(PythonLibs) before find_package(PythonInterp), so these
+ # variables are required.
python = self.spec["python"]
args.append("-DPYTHON_LIBRARY={0}".format(python.libs[0]))
args.append("-DPYTHON_INCLUDE_DIR={0}".format(python.headers.directories[0]))
@@ -192,6 +206,9 @@ class Tfel(CMakePackage):
return args
+ def setup_run_environment(self, env):
+ env.append_path("LD_LIBRARY_PATH", self.prefix.lib)
+
def check(self):
"""Skip the target 'test' which doesn't build all test programs used by tests"""
with working_dir(self.build_directory):
diff --git a/var/spack/repos/builtin/packages/the-silver-searcher/package.py b/var/spack/repos/builtin/packages/the-silver-searcher/package.py
index 5d0d3caa9b..ac3285a6cb 100644
--- a/var/spack/repos/builtin/packages/the-silver-searcher/package.py
+++ b/var/spack/repos/builtin/packages/the-silver-searcher/package.py
@@ -19,6 +19,8 @@ class TheSilverSearcher(AutotoolsPackage):
version("0.32.0", sha256="944ca77e498f344b2bfbd8df6d5d8df7bbc1c7e080b50c0bab3d1a9a55151b60")
version("0.30.0", sha256="b4bf9e50bf48bc5fde27fc386f7bcad8644ef15a174c862a10813e81bd127e69")
+ depends_on("c", type="build") # generated
+
depends_on("pcre")
depends_on("xz")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/thepeg/package.py b/var/spack/repos/builtin/packages/thepeg/package.py
index 1856bfbdfd..318049a1b3 100644
--- a/var/spack/repos/builtin/packages/thepeg/package.py
+++ b/var/spack/repos/builtin/packages/thepeg/package.py
@@ -18,7 +18,7 @@ class Thepeg(AutotoolsPackage):
# The commented out versions exist, but may need patches
# and/or recipe changes
- version("2.3.0", sha256="deec8f22e89bb1a3f31b3b84e8feddf59a69845c9d33fba718f5599ce4a6ae9d")
+ version("2.3.0", sha256="ac35979ae89c29608ca92c156a49ff68aace7a5a12a0c92f0a01a833d2d34572")
version("2.2.3", sha256="f21473197a761fc32917b08a8d24d2bfaf93ff57f3441fd605da99ac9de5d50b")
version("2.2.2", sha256="97bf55d4391b0a070a3303d3845f8160afec403f1573dfb0e857709ad6262e3e")
version("2.2.1", sha256="63abc7215e6ad45c11cf9dac013738e194cc38556a8368b850b70ab1b57ea58f")
@@ -40,6 +40,8 @@ class Thepeg(AutotoolsPackage):
# version('1.9.1', sha256='8ec6d0669eba51e308be4e33aeb219999418170eae3aad93ec1491c942c2a4e9')
version("1.9.0", sha256="3ee58e5e3a26184567df1b9a10ca70df228e86f322e72f018dd7d8d5a4700a5d")
version("1.8.3", sha256="55ede3a3dd0bd07b90d0d49cf7ae28c18cd965780fdf53528508b97d57152fc7")
+
+ depends_on("cxx", type="build") # generated
# version('1.8.2', sha256='44ccd0d70e42bb6ecd801a51bade6c25b3953c56f33017402d4f52ee6492dffa')
# version('1.8.1', sha256='84c2a212a681545cddd541dca191eb65d96f41df86c87480b6f4f7d4f9683562')
# version('1.8.0', sha256='4b22fda1078f410b999a23a17f611c9ae3a7f0f4cee4e83dc82c9336b7adf037')
diff --git a/var/spack/repos/builtin/packages/thermo4pfm/package.py b/var/spack/repos/builtin/packages/thermo4pfm/package.py
index 421fc05028..a6418a1cb1 100644
--- a/var/spack/repos/builtin/packages/thermo4pfm/package.py
+++ b/var/spack/repos/builtin/packages/thermo4pfm/package.py
@@ -18,4 +18,6 @@ class Thermo4pfm(CMakePackage):
version("1.1.1", sha256="cff3c83405224a39bb34c57e444e208e94c6782d84303acd0588d1dfa61513a1")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost")
diff --git a/var/spack/repos/builtin/packages/thornado-mini/package.py b/var/spack/repos/builtin/packages/thornado-mini/package.py
index efe7b935cb..65cbf0ee7a 100644
--- a/var/spack/repos/builtin/packages/thornado-mini/package.py
+++ b/var/spack/repos/builtin/packages/thornado-mini/package.py
@@ -21,6 +21,8 @@ class ThornadoMini(MakefilePackage):
version("1.0", sha256="8a9f97acc823d374cce567831270cfcc50fa968949e49159c7e3442b93a2827d")
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("hdf5+fortran")
depends_on("lapack")
diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py
index 4ad8a10f1b..764b57b370 100644
--- a/var/spack/repos/builtin/packages/thrift/package.py
+++ b/var/spack/repos/builtin/packages/thrift/package.py
@@ -18,8 +18,8 @@ class Thrift(Package):
"""
homepage = "https://thrift.apache.org"
- url = "http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz"
- list_url = "http://archive.apache.org/dist/thrift/"
+ url = "https://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz"
+ list_url = "https://archive.apache.org/dist/thrift/"
list_depth = 1
maintainers("thomas-bouvier")
@@ -35,6 +35,9 @@ class Thrift(Package):
version("0.10.0", sha256="2289d02de6e8db04cbbabb921aeb62bfe3098c4c83f36eec6c31194301efa10b")
version("0.9.3", sha256="b0740a070ac09adde04d43e852ce4c320564a292f26521c46b78e0641564969e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("pic", default=True, description="Build position independent code")
variant("c", default=True, description="Build support for C-family languages")
variant("java", default=False, description="Build support for java")
@@ -62,6 +65,7 @@ class Thrift(Package):
depends_on("ant", when="+java")
extends("python", when="+python")
+ depends_on("python@:3.11.9", when="+python")
depends_on("py-setuptools", type=("build", "run"), when="+python")
depends_on("py-six@1.7.2:", type=("build", "run"), when="@0.10.0:+python")
depends_on("py-tornado", type=("build", "run"), when="+python")
diff --git a/var/spack/repos/builtin/packages/thrust/package.py b/var/spack/repos/builtin/packages/thrust/package.py
index ab37e4b347..bbd1708b8c 100644
--- a/var/spack/repos/builtin/packages/thrust/package.py
+++ b/var/spack/repos/builtin/packages/thrust/package.py
@@ -3,18 +3,27 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.cmake
+import spack.build_systems.generic
from spack.package import *
-class Thrust(Package):
+class Thrust(Package, CMakePackage):
"""Thrust is a parallel algorithms library
which resembles the C++ Standard Template Library (STL)."""
homepage = "https://thrust.github.io"
url = "https://github.com/NVIDIA/thrust/archive/1.12.0.tar.gz"
+ git = "https://github.com/NVIDIA/thrust.git"
license("BSL-1.0")
+ # to support CMake build system package installation, Thrust
+ # submodules must be downloaded, which aren't included in tarballs
+ version("1.17.2", commit="1ac51f2b6219ff17d15d93f2e0be85038556f346", submodules=True)
+ version("1.17.1", commit="4dd337f41622f5624359d6a958e3cb6ac7c6f57e", submodules=True)
+ version("1.17.0", commit="6a3078c64cab0e2f276340fa5dcafa0d758ed890", submodules=True)
+ # versions prior to 1.17 install from tarballs
version("1.16.0", sha256="93b9553e3ee544e05395022bea67e6d600f8f3eb680950ec7cf73c0f55162487")
version("1.15.0", sha256="0eeaf5a77cd7cb143f3443bd96b215ae1c4eacf18a712762e6a5c85213f80cc2")
version("1.14.0", sha256="ddba9f3ed47b1a33562a4aea2d000a2ca2abcd45ff760af12aa81b8b7e492962")
@@ -45,7 +54,32 @@ class Thrust(Package):
version("1.8.3", sha256="2254200512fde7f4fd0fc74306286e192ea6ac9037576dbd31309c0579229dbb")
version("1.8.2", sha256="83bc9e7b769daa04324c986eeaf48fcb53c2dda26bcc77cb3c07f4b1c359feb8")
- def install(self, spec, prefix):
+ depends_on("cxx", type="build") # generated
+
+ # leave the build system of pre-1.17 as originally implemented,
+ # but use CMake for newer versions
+ build_system(
+ conditional("cmake", when="@1.17:"), conditional("generic", when="@:1.16"), default="cmake"
+ )
+
+ # minimum CMake version is 3.15 for plain package installation (no
+ # examples, tests, etc)
+ depends_on("cmake@3.15:", when="@1.17:", type="build")
+
+
+class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
+ def cmake_args(self):
+ return [
+ self.define("THRUST_ENABLE_HEADER_TESTING", "OFF"),
+ self.define("THRUST_ENABLE_TESTING", "OFF"),
+ self.define("THRUST_ENABLE_EXAMPLES", "OFF"),
+ self.define("THRUST_ENABLE_BENCHMARKS", "OFF"),
+ self.define("THRUST_INCLUDE_CUB_CMAKE", "OFF"),
+ ]
+
+
+class GenericBuilder(spack.build_systems.generic.GenericBuilder):
+ def install(self, pkg, spec, prefix):
install_tree("doc", join_path(prefix, "doc"))
install_tree("examples", join_path(prefix, "examples"))
install_tree("thrust", join_path(prefix, "include", "thrust"))
diff --git a/var/spack/repos/builtin/packages/thunar-volman/package.py b/var/spack/repos/builtin/packages/thunar-volman/package.py
new file mode 100644
index 0000000000..a1943bb91d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/thunar-volman/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class ThunarVolman(AutotoolsPackage):
+ """Thunar extension which enables automatic management of removable drives and media."""
+
+ homepage = "https://docs.xfce.org/xfce/thunar/thunar-volman"
+ url = "https://archive.xfce.org/xfce/4.18/src/thunar-volman-4.18.0.tar.bz2"
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling")
+
+ version("4.18.0", sha256="93b75c7ffbe246a21f4190295acc148e184be8df397e431b258d0d676e87fc65")
+
+ extends("thunar")
+
+ # Base requirements
+ depends_on("intltool@0.39.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("exo")
+ depends_on("libgudev")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("dbus-glib")
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("libgudev@145:")
diff --git a/var/spack/repos/builtin/packages/thunar/package.py b/var/spack/repos/builtin/packages/thunar/package.py
new file mode 100644
index 0000000000..9d1e4bd517
--- /dev/null
+++ b/var/spack/repos/builtin/packages/thunar/package.py
@@ -0,0 +1,76 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Thunar(AutotoolsPackage):
+ """Thunar File Manager"""
+
+ homepage = "https://docs.xfce.org/xfce/thunar/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/thunar-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="d1f4b080c97b9e390eff199aaaac7562fb20f031686f8d5ee5207e953bfc2feb")
+ version("4.16.0", sha256="6277c448116a91ebfa564972645d8d79ef69864992a02bb164b7b13f98fdfd9b")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant("notifications", default=True, description="Build with startup-notification support")
+ variant("jpeg", default=True, description="Build with libjpeg support")
+ variant("exif", default=True, description="Build with libexif support")
+ variant("gdbus", default=True, description="Build with gdbus support")
+ variant("gio-unix", default=True, description="Build with gio-unix support")
+ variant("libnotify", default=True, description="Build with libnotify support")
+ variant("freetype", default=True, description="Build with freetype support")
+
+ extendable = True
+
+ # Base requirements
+ depends_on("intltool@0.39.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("exo")
+ depends_on("libpng")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("libexif", when="+exif")
+ depends_on("dbus-glib", when="+gdbus")
+ depends_on("libnotify", when="+libnotify")
+ depends_on("libjpeg", when="+jpeg")
+ depends_on("freetype", when="+freetype")
+ depends_on("startup-notification", when="+notifications")
+ with when("+introspection"):
+ depends_on("libxfce4util+introspection")
+ depends_on("libxfce4ui+introspection")
+ depends_on("gobject-introspection")
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("@4.18"):
+ # Fails to check in xcfe4 include subdirectory for the libxfce4kbd-private-3 tree
+ env.append_flags("CPPFLAGS", f"-I{self.spec['libxfce4ui'].home.include.xfce4}")
+
+ def configure_args(self):
+ args = []
+ args += self.enable_or_disable("introspection")
+ args += self.enable_or_disable("notifications")
+ args += self.enable_or_disable("exif")
+ args += self.enable_or_disable("gio-unix")
+ args += ["--with-custom-thunarx-dirs-enabled"]
+ return args
diff --git a/var/spack/repos/builtin/packages/tig/package.py b/var/spack/repos/builtin/packages/tig/package.py
index 04f93a8ece..31da344e44 100644
--- a/var/spack/repos/builtin/packages/tig/package.py
+++ b/var/spack/repos/builtin/packages/tig/package.py
@@ -14,7 +14,10 @@ class Tig(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("2.5.10", sha256="f655cc1366fc10058a2bd505bb88ca78e653ff7526c1b81774c44b9d841210e3")
version("2.5.8", sha256="b70e0a42aed74a4a3990ccfe35262305917175e3164330c0889bd70580406391")
version("2.2.2", sha256="316214d87f7693abc0cbe8ebbb85decdf5e1b49d7ad760ac801af3dd73385e35")
+ depends_on("c", type="build") # generated
+
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/tiled-mm/package.py b/var/spack/repos/builtin/packages/tiled-mm/package.py
index 6df0851b5f..9a2ea91555 100644
--- a/var/spack/repos/builtin/packages/tiled-mm/package.py
+++ b/var/spack/repos/builtin/packages/tiled-mm/package.py
@@ -19,9 +19,14 @@ class TiledMm(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("master", branch="master")
+
+ version("2.3.1", sha256="68914a483e62f796b790ea428210b1d5ef5943d6289e53d1aa62f56a20fbccc8")
+ version("2.3", sha256="504c6201f5a9be9741c55036bf8e2656ae3f4bc19996295b264ee5e303c9253c")
version("2.2", sha256="6d0b49c9588ece744166822fd44a7bc5bec3dc666b836de8bf4bf1a7bb675aac")
version("2.0", sha256="ea554aea8c53d7c8e40044e6d478c0e8137d7e8b09d7cb9650703430d92cf32e")
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries")
variant("examples", default=False, description="Enable examples")
variant("tests", default=False, description="Enable tests")
diff --git a/var/spack/repos/builtin/packages/time/package.py b/var/spack/repos/builtin/packages/time/package.py
index bb9be71394..7e6e7d8578 100644
--- a/var/spack/repos/builtin/packages/time/package.py
+++ b/var/spack/repos/builtin/packages/time/package.py
@@ -18,4 +18,6 @@ class Time(AutotoolsPackage, GNUMirrorPackage):
version("1.9", sha256="fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e")
+ depends_on("c", type="build") # generated
+
build_directory = "spack-build"
diff --git a/var/spack/repos/builtin/packages/timedatex/package.py b/var/spack/repos/builtin/packages/timedatex/package.py
index 2f9483160e..09555fe7e4 100644
--- a/var/spack/repos/builtin/packages/timedatex/package.py
+++ b/var/spack/repos/builtin/packages/timedatex/package.py
@@ -23,6 +23,8 @@ class Timedatex(MakefilePackage):
version("0.5", sha256="bc54960bb9554bb2b34985ba2b8a78480db568c3c6a9d26f2ab34de1bc0aab11")
version("0.4", sha256="204285eb03c6cec9ae1c7fdb99e7c996259ec5a918d72bf6bc28564a6f738d4a")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/timemory/package.py b/var/spack/repos/builtin/packages/timemory/package.py
index fa5eb2bdc5..5ae88c6d46 100644
--- a/var/spack/repos/builtin/packages/timemory/package.py
+++ b/var/spack/repos/builtin/packages/timemory/package.py
@@ -28,6 +28,10 @@ class Timemory(CMakePackage, PythonExtension):
version("3.0.1", commit="ef638e1cde90275ce7c0e12fc4902c27bcbdeefd", submodules=True)
version("3.0.0", commit="b36b1673b2c6b7ff3126d8261bef0f8f176c7beb", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
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")
@@ -322,11 +326,6 @@ class Timemory(CMakePackage, PythonExtension):
self.define_from_variant("TIMEMORY_USE_ALLINEA_MAP", "allinea_map"),
]
- if "+python" in spec:
- 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(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
diff --git a/var/spack/repos/builtin/packages/timew/package.py b/var/spack/repos/builtin/packages/timew/package.py
new file mode 100644
index 0000000000..aaf3318511
--- /dev/null
+++ b/var/spack/repos/builtin/packages/timew/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Timew(CMakePackage):
+ """
+ Timewarrior is Free and Open Source Software that tracks time from the
+ command line.
+ """
+
+ homepage = "https://timewarrior.net/"
+ url = "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v1.7.1/timew-1.7.1.tar.gz"
+
+ license("MIT", checked_by="taliaferro")
+
+ version("1.7.1", sha256="5e0817fbf092beff12598537c894ec1f34b0a21019f5a3001fe4e6d15c11bd94")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/tini/package.py b/var/spack/repos/builtin/packages/tini/package.py
index 5fdf47d9ae..29b67ea328 100644
--- a/var/spack/repos/builtin/packages/tini/package.py
+++ b/var/spack/repos/builtin/packages/tini/package.py
@@ -17,4 +17,6 @@ class Tini(CMakePackage):
license("MIT")
version("0.19.0", sha256="0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d")
+
+ depends_on("c", type="build") # generated
patch("tini_static_rpath_issue.patch", when="@0.19.0:")
diff --git a/var/spack/repos/builtin/packages/tinker/package.py b/var/spack/repos/builtin/packages/tinker/package.py
index 1d26543d8d..8d3bcb7f3b 100644
--- a/var/spack/repos/builtin/packages/tinker/package.py
+++ b/var/spack/repos/builtin/packages/tinker/package.py
@@ -16,7 +16,13 @@ class Tinker(CMakePackage):
homepage = "https://dasher.wustl.edu/tinker/"
url = "https://dasher.wustl.edu/tinker/downloads/tinker-8.7.1.tar.gz"
- version("8.7.1", sha256="0d6eff8bbc9be0b37d62b6fd3da35bb5499958eafe67aa9c014c4648c8b46d0f")
+ version("8.7.2", sha256="f9e94ae0684d527cd2772a4a7a05c41864ce6246f1194f6c1c402a94598151c2")
+ version(
+ "8.7.1",
+ sha256="0d6eff8bbc9be0b37d62b6fd3da35bb5499958eafe67aa9c014c4648c8b46d0f",
+ deprecated=True,
+ )
+
patch("tinker-8.7.1-cmake.patch")
depends_on("fftw")
diff --git a/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py b/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py
new file mode 100644
index 0000000000..cba0e2cb8b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py
@@ -0,0 +1,52 @@
+# Copyright 2013-2024 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.package import *
+
+
+class TinyTensorCompiler(CMakePackage):
+ """A compiler for tensor computations on GPUs and other devices,
+ supporting the OpenCL, Level Zero, and SYCL runtime."""
+
+ homepage = "https://github.com/intel/tiny-tensor-compiler"
+ url = "https://github.com/intel/tiny-tensor-compiler/archive/refs/tags/v0.3.1.tar.gz"
+
+ maintainers("uphoffc")
+
+ license("BSD-3-Clause", checked_by="uphoffc")
+
+ version("0.3.1", sha256="e512b92f9ef8f21362ea4a8f2655338769bc7fcf9de543e3dc7db86b696695b3")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("shared", default=True, description="Shared library")
+ variant("level-zero", default=False, description="Build tinytc_ze (Level Zero runtime)")
+ variant("opencl", default=True, description="Build tintc_cl (OpenCL runtime)")
+ variant("sycl", default=False, description="Build tinytc_sycl (SYCL runtime)")
+
+ requires("+opencl +level-zero", when="+sycl")
+
+ depends_on("cmake@3.23.0:", type="build")
+ depends_on("double-batched-fft-library ~sycl ~level-zero ~opencl@0.5.1:", type="link")
+ depends_on("oneapi-level-zero@1.13:", when="+level-zero")
+ depends_on("opencl-c-headers@2022.01.04:", when="+opencl")
+ depends_on("opencl-icd-loader@2022.01.04:", when="+opencl", type="link")
+ depends_on("re2c@3.0:", type="build")
+ depends_on("bison@3.8.2:", type="build")
+
+ def cmake_args(self):
+ cxx_compiler = os.path.basename(self.compiler.cxx)
+ if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx"]:
+ raise InstallError("The tinytc_sycl library requires the oneapi C++ compiler")
+
+ return [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("BUILD_SYCL", "sycl"),
+ self.define_from_variant("BUILD_LEVEL_ZERO", "level-zero"),
+ self.define_from_variant("BUILD_OPENCL", "opencl"),
+ ]
diff --git a/var/spack/repos/builtin/packages/tinycbor/package.py b/var/spack/repos/builtin/packages/tinycbor/package.py
new file mode 100644
index 0000000000..cd2c5a43bc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tinycbor/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Tinycbor(MakefilePackage):
+ """Concise Binary Object Representation (CBOR) Library"""
+
+ homepage = "https://github.com/intel/tinycbor"
+ url = "https://github.com/intel/tinycbor/archive/refs/tags/v0.6.0.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.6.0", sha256="512e2c9fce74f60ef9ed3af59161e905f9e19f30a52e433fc55f39f4c70d27e4")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ build_targets = ["CC=cc", "CXX=cxx"]
+
+ @property
+ def install_targets(self):
+ return ["install", f"prefix={self.prefix}"]
diff --git a/var/spack/repos/builtin/packages/tinygltf/package.py b/var/spack/repos/builtin/packages/tinygltf/package.py
index 31f7e6581d..63c189c263 100644
--- a/var/spack/repos/builtin/packages/tinygltf/package.py
+++ b/var/spack/repos/builtin/packages/tinygltf/package.py
@@ -16,9 +16,13 @@ class Tinygltf(CMakePackage):
license("MIT")
version("release", branch="release")
+ version("2.8.21", sha256="e567257d7addde58b0a483832cbaa5dd8f15e5bcaee6f023831e215d1a2c0502")
version("2.8.14", sha256="63cd43746c9ddfe5777494500422e831a312299e386fbf80922839dc1a5575f8")
version("2.7.0", sha256="a1bbc0b831719e3a809a1bb01ce299a60e80b4e15221f58e822303ba22a69d45")
version("2.6.3", sha256="f61e4a501baa7fbf31b18ea0f6815a59204ad0de281f7b04f0168f6bbd17c340")
version("2.5.0", sha256="5d85bd556b60b1b69527189293cfa4902957d67fabb8582b6532f23a5ef27ec1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.6:", type="build")
diff --git a/var/spack/repos/builtin/packages/tinyobjloader/package.py b/var/spack/repos/builtin/packages/tinyobjloader/package.py
index 8f89fb0369..49743a4cb8 100644
--- a/var/spack/repos/builtin/packages/tinyobjloader/package.py
+++ b/var/spack/repos/builtin/packages/tinyobjloader/package.py
@@ -16,4 +16,6 @@ class Tinyobjloader(CMakePackage):
version("1.0.6", sha256="19ee82cd201761954dd833de551edb570e33b320d6027e0d91455faf7cd4c341")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8.11:", type="build")
diff --git a/var/spack/repos/builtin/packages/tinyxml2/package.py b/var/spack/repos/builtin/packages/tinyxml2/package.py
index 4aca62c7e4..3c6eb0eb1f 100644
--- a/var/spack/repos/builtin/packages/tinyxml2/package.py
+++ b/var/spack/repos/builtin/packages/tinyxml2/package.py
@@ -14,6 +14,10 @@ class Tinyxml2(CMakePackage):
license("Zlib")
+ version("10.0.0", sha256="3bdf15128ba16686e69bce256cc468e76c7b94ff2c7f391cc5ec09e40bff3839")
+ version("9.0.0", sha256="cc2f1417c308b1f6acc54f88eb70771a0bf65f76282ce5c40e54cfe52952702c")
+ version("8.0.0", sha256="6ce574fbb46751842d23089485ae73d3db12c1b6639cda7721bf3a7ee862012c")
+ version("7.0.0", sha256="fa0d1c745d65d4d833e62cb183e23c2034dc7a35ec1a4977e808bdebb9b4fe60")
version("6.2.0", sha256="cdf0c2179ae7a7931dba52463741cf59024198bbf9673bf08415bcb46344110f")
version("4.0.1", sha256="14b38ef25cc136d71339ceeafb4856bb638d486614103453eccd323849267f20")
version("4.0.0", sha256="90add44f06de081047d431c08d7269c25b4030e5fe19c3bc8381c001ce8f258c")
@@ -21,3 +25,15 @@ class Tinyxml2(CMakePackage):
version("2.2.0", sha256="f891224f32e7a06bf279290619cec80cc8ddc335c13696872195ffb87f5bce67")
version("2.1.0", sha256="4bdd6569fdce00460bf9cda0ff5dcff46d342b4595900d849cc46a277a74cce6")
version("2.0.2", sha256="3cc3aa09cd1ce77736f23488c7cb24e65e11daed4e870ddc8d352aa4070c7c74")
+
+ depends_on("cxx", type="build") # generated
+
+ variant("shared", default=False, description="Build shared library")
+
+ def cmake_args(self):
+ args = []
+
+ if self.spec.satisfies("+shared"):
+ args.append("-DBUILD_SHARED_LIBS=ON")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/tioga/package.py b/var/spack/repos/builtin/packages/tioga/package.py
index 8a453c39f9..62e3234ab1 100644
--- a/var/spack/repos/builtin/packages/tioga/package.py
+++ b/var/spack/repos/builtin/packages/tioga/package.py
@@ -17,11 +17,16 @@ class Tioga(CMakePackage):
license("LGPL-3.0-only")
- # The original TIOGA repo has possibly been abandoned,
+ # The original TIOGA repo has been abandoned,
# so work on TIOGA has continued in the Exawind project
version("develop", git="https://github.com/Exawind/tioga.git", branch="exawind")
+ version("1.2.0", git="https://github.com/Exawind/tioga.git", tag="v1.2.0")
+ version("1.1.0", git="https://github.com/Exawind/tioga.git", tag="v1.1.0")
+ version("1.0.0", git="https://github.com/Exawind/tioga.git", tag="v1.0.0")
version("master", branch="master")
+ depends_on("cxx", type="build")
+
variant("shared", default=sys.platform != "darwin", description="Build shared libraries")
variant("pic", default=True, description="Position independent code")
variant("nodegid", default=True, description="Enable support for global Node IDs")
diff --git a/var/spack/repos/builtin/packages/tippecanoe/package.py b/var/spack/repos/builtin/packages/tippecanoe/package.py
index 420aa6cc64..3a38b6971e 100644
--- a/var/spack/repos/builtin/packages/tippecanoe/package.py
+++ b/var/spack/repos/builtin/packages/tippecanoe/package.py
@@ -18,6 +18,9 @@ class Tippecanoe(MakefilePackage):
version("1.36.0", sha256="0e385d1244a0d836019f64039ea6a34463c3c2f49af35d02c3bf241aec41e71b")
version("1.34.3", sha256="7a2dd2376a93d66a82c8253a46dbfcab3eaaaaca7bf503388167b9ee251bee54")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("sqlite")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/tiptop/package.py b/var/spack/repos/builtin/packages/tiptop/package.py
index 6848c1adf4..075509922b 100644
--- a/var/spack/repos/builtin/packages/tiptop/package.py
+++ b/var/spack/repos/builtin/packages/tiptop/package.py
@@ -16,6 +16,8 @@ class Tiptop(AutotoolsPackage):
version("master", commit="529886d445ec32febad14246245372a8f244b3eb")
+ depends_on("c", type="build") # generated
+
depends_on("papi")
depends_on("byacc", type="build")
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/tiramisu/package.py b/var/spack/repos/builtin/packages/tiramisu/package.py
index b3c95a0738..d30e419612 100644
--- a/var/spack/repos/builtin/packages/tiramisu/package.py
+++ b/var/spack/repos/builtin/packages/tiramisu/package.py
@@ -23,6 +23,9 @@ class Tiramisu(CMakePackage, CudaPackage, PythonExtension):
version("master", branch="master")
version("2023-2-8", commit="2cd0c43cc1656bfa43cfb6e81d06f770cbf7251e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=True, description="Install python bindings.")
extends("python", when="+python")
variant(
@@ -57,10 +60,7 @@ class Tiramisu(CMakePackage, CudaPackage, PythonExtension):
self.define("USE_FLEXNLP", False),
]
if "+python" in spec:
- args += [
- self.define("Tiramisu_INSTALL_PYTHONDIR", python_platlib),
- self.define("Python3_EXECUTABLE", spec["python"].command.path),
- ]
+ args += [self.define("Tiramisu_INSTALL_PYTHONDIR", python_platlib)]
return args
@property
diff --git a/var/spack/repos/builtin/packages/tix/package.py b/var/spack/repos/builtin/packages/tix/package.py
index c9513d5e9b..b92541ed07 100644
--- a/var/spack/repos/builtin/packages/tix/package.py
+++ b/var/spack/repos/builtin/packages/tix/package.py
@@ -21,6 +21,8 @@ class Tix(AutotoolsPackage):
version("8.4.3", sha256="562f040ff7657e10b5cffc2c41935f1a53c6402eb3d5f3189113d734fd6c03cb")
+ depends_on("c", type="build") # generated
+
extends("tcl", type=("build", "link", "run"))
depends_on("tk", type=("build", "link", "run"))
@@ -29,10 +31,15 @@ class Tix(AutotoolsPackage):
sha256="1be1a1c7453f6ab8771f90d7e7c0f8959490104752a16a8755bbb7287a841a96",
level=0,
)
+ # This patch causes 'install' to fail on RHEL8 with at least gcc@10.3.1 with
+ # "error: expected ')' before '->' token in expansion of macro 'Tcl_Panic'".
+ #
+ # TBD: Is the problem the platform, os, or compiler?
patch(
"https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tix/files/implicit.patch",
sha256="8a2720368c7757896814684147029d8318b9aa3b0914b3f37dd5e8a8603a61d3",
level=0,
+ when="platform=darwin",
)
patch(
"https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tix/files/patch-generic-tixGrSort.c.diff",
@@ -77,12 +84,12 @@ class Tix(AutotoolsPackage):
if "platform=darwin" in self.spec:
fix_darwin_install_name(self.prefix.lib.Tix + str(self.version))
- def test(self):
+ def test_tcl(self):
+ """Test that tix can be loaded"""
test_data_dir = self.test_suite.current_test_data_dir
test_file = test_data_dir.join("test.tcl")
- self.run_test(
- self.spec["tcl"].command.path, test_file, purpose="test that tix can be loaded"
- )
+ tcl = self.spec["tcl"].command
+ tcl(test_file)
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/tixi/package.py b/var/spack/repos/builtin/packages/tixi/package.py
index 269f1477f9..41872d8ca1 100644
--- a/var/spack/repos/builtin/packages/tixi/package.py
+++ b/var/spack/repos/builtin/packages/tixi/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -14,6 +16,8 @@ class Tixi(CMakePackage):
url = "https://github.com/DLR-SC/tixi/archive/v3.0.3.tar.gz"
git = "https://github.com/DLR-SC/tixi.git"
+ maintainers("melven", "joergbrech")
+
license("Apache-2.0")
version("3.3.0", sha256="988d79ccd53c815d382cff0c244c0bb8e393986377dfb45385792766adf6f6a9")
@@ -22,21 +26,50 @@ class Tixi(CMakePackage):
version("3.0.3", sha256="3584e0cec6ab811d74fb311a9af0663736b1d7f11b81015fcb378efaf5ad3589")
version("2.2.4", sha256="9080d2a617b7c411b9b4086de23998ce86e261b88075f38c73d3ce25da94b21c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"shared", default=True, description="Enables the build of shared libraries", when="@3.0.3:"
)
variant("fortran", default=True, description="Enable Fortran bindings", when="@3.1.1:")
+ variant("python", default=True, description="Add python bindings to PYTHONPATH")
- depends_on("python", type="build")
+ depends_on("python", when="~python", type="build")
+ depends_on("python", when="+python", type=("build", "run"))
+ conflicts("~shared", when="+python")
depends_on("expat")
depends_on("curl")
depends_on("libxml2")
depends_on("libxslt")
+ @property
+ def libs(self):
+ # different library names for tixi@2 and tixi@3
+ libname = "libtixi3" if "@3" in self.spec else "libTIXI"
+ shared = "~shared" not in self.spec
+ return find_libraries(libname, root=self.prefix, shared=shared, recursive=True)
+
def cmake_args(self):
- args = []
- if self.spec.satisfies("+shared"):
- args.append("-DBUILD_SHARED_LIBS=ON")
- if self.spec.satisfies("+fortran"):
- args.append("-DTIXI_ENABLE_FORTRAN=ON")
- return args
+ return [
+ self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant("TIXI_ENABLE_FORTRAN", "fortran"),
+ ]
+
+ def setup_run_environment(self, env):
+ """Allow to import tixi3wrapper in python"""
+
+ if "+python" in self.spec:
+ # add tixi3wrapper.py to the PYTHONPATH
+ if "@3" in self.spec:
+ env.prepend_path("PYTHONPATH", self.spec.prefix.share.tixi3.python)
+ else:
+ env.prepend_path("PYTHONPATH", self.spec.prefix.share.tixi.python)
+
+ # allow ctypes to find the tixi library
+ libs = ":".join(self.spec["tixi"].libs.directories)
+ if sys.platform == "darwin":
+ env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", libs)
+ else:
+ env.prepend_path("LD_LIBRARY_PATH", libs)
diff --git a/var/spack/repos/builtin/packages/tkrzw/package.py b/var/spack/repos/builtin/packages/tkrzw/package.py
index 1b8f584b8c..17b2250421 100644
--- a/var/spack/repos/builtin/packages/tkrzw/package.py
+++ b/var/spack/repos/builtin/packages/tkrzw/package.py
@@ -16,6 +16,7 @@ class Tkrzw(AutotoolsPackage):
license("Apache-2.0")
version("master", branch="master")
+ version("1.0.29", sha256="abaabd6fc89a19ed8a202ac3711bc3b0763d928bc3a8eeeea73a3679f7e7f790")
version("0.9.44", sha256="088ac619fbf7fc22c110674b3f8fe8d8573a1d7088e5616b268fd9f68ba25650")
version("0.9.43", sha256="60f7b579edb4f911ecaf35ff6c07f53b3d566424d8bf179b1991ade5071f0bbc")
version("0.9.42", sha256="135fb404d5a1b0bcee717f8e648a6f5ff140ec30069fecfde3b380f611356535")
@@ -61,6 +62,9 @@ class Tkrzw(AutotoolsPackage):
version("0.9.2", sha256="9040af148ab3f35c6f1d4c83f2eba8b68625dbd760f2c0537a9981dbc9bbc661")
version("0.9.1", sha256="1062502f93d4a9b387372d89265a9ede1704c6bcadd9aac23f5fc8383e26045a")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"compression",
values=any_combination_of("zlib", "lz4", "lzma", "zstd"),
diff --git a/var/spack/repos/builtin/packages/tl-expected/package.py b/var/spack/repos/builtin/packages/tl-expected/package.py
index cf91fbf1a4..bffc895b9e 100644
--- a/var/spack/repos/builtin/packages/tl-expected/package.py
+++ b/var/spack/repos/builtin/packages/tl-expected/package.py
@@ -10,16 +10,20 @@ class TlExpected(CMakePackage):
"""C++11/14/17 std::expected with functional-style extensions."""
homepage = "https://tl.tartanllama.xyz/en/latest/"
- url = "https://github.com/TartanLlama/expected/archive/1.0.0.tar.gz"
+ url = "https://github.com/TartanLlama/expected/archive/refs/tags/v1.0.0.tar.gz"
git = "https://github.com/TartanLlama/expected.git"
maintainers("charmoniumQ")
- license("CC0-1.0")
+ license("CC0-1.0", checked_by="wdconinc")
- # Note that the 1.0.0 has this issue:
- # https://github.com/TartanLlama/expected/issues/114
- # But no new patch version has been released,
- # so I will use the latest commit at the time of writing:
- version("2022-11-24", commit="b74fecd4448a1a5549402d17ddc51e39faa5020c")
+ version("1.1.0", sha256="1db357f46dd2b24447156aaf970c4c40a793ef12a8a9c2ad9e096d9801368df6")
+ with default_args(deprecated=True):
+ # Note that the 1.0.0 has this issue:
+ # https://github.com/TartanLlama/expected/issues/114
+ # But no new patch version has been released,
+ # so I will use the latest commit at the time of writing:
+ version("2022-11-24", commit="b74fecd4448a1a5549402d17ddc51e39faa5020c")
version("1.0.0", sha256="8f5124085a124113e75e3890b4e923e3a4de5b26a973b891b3deb40e19c03cee")
+
+ depends_on("cxx", type="build")
diff --git a/var/spack/repos/builtin/packages/tldd/package.py b/var/spack/repos/builtin/packages/tldd/package.py
index b9a75f9703..4be634fdf2 100644
--- a/var/spack/repos/builtin/packages/tldd/package.py
+++ b/var/spack/repos/builtin/packages/tldd/package.py
@@ -17,6 +17,8 @@ class Tldd(MakefilePackage):
version("2018-10-05", commit="61cb512cc992ea6cbb7239e99ec7ac92ea072507")
version("master", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("pstreams@0.8.0:")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index f9c77ad0fd..0fa3d96bc4 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -20,6 +20,7 @@ class Tmux(AutotoolsPackage):
license("ISC")
+ version("3.4", sha256="551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa")
version("3.3a", sha256="e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f")
version("3.2a", sha256="551553a4f82beaa8dadc9256800bcc284d7c000081e47aa6ecbb6ff36eacd05f")
version("3.2", sha256="664d345338c11cbe429d7ff939b92a5191e231a7c1ef42f381cebacb1e08a399")
@@ -42,6 +43,8 @@ class Tmux(AutotoolsPackage):
version("1.9a", sha256="c5e3b22b901cf109b20dab54a4a651f0471abd1f79f6039d79b250d21c2733f5")
version("master", branch="master")
+ depends_on("c", type="build") # generated
+
variant(
"utf8proc", default=False, description="Build with UTF-8 support from utf8proc library"
)
@@ -57,8 +60,16 @@ class Tmux(AutotoolsPackage):
depends_on("automake", when="@master")
depends_on("autoconf", when="@master")
+ depends_on("yacc", type="build", when="@3:")
+
conflicts("+static", when="platform=darwin", msg="Static build not supported on MacOS")
+ patch(
+ "https://github.com/tmux/tmux/commit/775789fbd5c4f3aa93061480cd64e61daf7fb689.patch?full_index=1",
+ sha256="c1b61a1244f758480578888d3f89cac470271c376ea0879996b81e10b397cad0",
+ when="@2.4:",
+ )
+
@run_before("autoreconf")
def autogen(self):
if self.spec.satisfies("@master"):
diff --git a/var/spack/repos/builtin/packages/tnftp/package.py b/var/spack/repos/builtin/packages/tnftp/package.py
index 76806264e7..db140c2474 100644
--- a/var/spack/repos/builtin/packages/tnftp/package.py
+++ b/var/spack/repos/builtin/packages/tnftp/package.py
@@ -1,6 +1,5 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
-# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -18,5 +17,7 @@ class Tnftp(AutotoolsPackage):
version("20230507", sha256="be0134394bd7d418a3b34892b0709eeb848557e86474e1786f0d1a887d3a6580")
+ depends_on("c", type="build") # generated
+
depends_on("bison")
depends_on("ncurses")
diff --git a/var/spack/repos/builtin/packages/tomcat/package.py b/var/spack/repos/builtin/packages/tomcat/package.py
index b3f69890ed..0b11a910c6 100644
--- a/var/spack/repos/builtin/packages/tomcat/package.py
+++ b/var/spack/repos/builtin/packages/tomcat/package.py
@@ -14,19 +14,44 @@ class Tomcat(Package):
"""
homepage = "https://tomcat.apache.org/"
- url = "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.30/bin/apache-tomcat-9.0.30.tar.gz"
+ url = (
+ "https://archive.apache.org/dist/tomcat/tomcat-11/v11.0.0/bin/apache-tomcat-11.0.0.tar.gz"
+ )
license("Apache-2.0")
- version("9.0.30", sha256="43a9b268671bbd3aace427637fbf577e742b521901e111342321ae901478100b")
- version("9.0.29", sha256="1bf634413326ec96972fc1c3ac6666e8e4cab49ad3fc9f5e3228b85208d9c4b0")
- version("9.0.27", sha256="6616a150e1593ef1a622298aaef9b889db70c8ee5122d35ad52adfcda1084d10")
- version("9.0.26", sha256="b5430890d3b986d6b7ec6a6ef611f9451cbfa933b0a1a3dd48e2cd1f46a63381")
- version("9.0.24", sha256="22064138e25f7ab899802804775259a156c06770535b8ce93856beba13dfcf6d")
+ version("11.0.0", sha256="d0ca319af349838f59009a9c5ed3709f02344201059dbc26dce4313ee969cd20")
+ version("10.1.31", sha256="06f6e2e11ef5afb435a4b27e1e264ebcdbafd95389f5ee37e425dc135ed325d4")
+ version(
+ "9.0.96",
+ sha256="bf4ad04955457ad663157876461015437a7479546aec9a38840d736b3d70151f",
+ preferred=True,
+ )
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-46589
+ version(
+ "9.0.30", sha256="43a9b268671bbd3aace427637fbf577e742b521901e111342321ae901478100b"
+ )
+ version(
+ "9.0.29", sha256="1bf634413326ec96972fc1c3ac6666e8e4cab49ad3fc9f5e3228b85208d9c4b0"
+ )
+ version(
+ "9.0.27", sha256="6616a150e1593ef1a622298aaef9b889db70c8ee5122d35ad52adfcda1084d10"
+ )
+ version(
+ "9.0.26", sha256="b5430890d3b986d6b7ec6a6ef611f9451cbfa933b0a1a3dd48e2cd1f46a63381"
+ )
+ version(
+ "9.0.24", sha256="22064138e25f7ab899802804775259a156c06770535b8ce93856beba13dfcf6d"
+ )
+
+ # https://tomcat.apache.org/whichversion.html
+ depends_on("java@8:", type="run", when="@9:")
+ depends_on("java@11:", type="run", when="@10:")
+ depends_on("java@17:", type="run", when="@11:")
def url_for_version(self, version):
- url = "https://archive.apache.org/dist/tomcat/tomcat-9/v{0}/bin/apache-tomcat-{0}.tar.gz"
- return url.format(version)
+ return f"https://archive.apache.org/dist/tomcat/tomcat-{version.up_to(1)}/v{version}/bin/apache-tomcat-{version}.tar.gz"
def install(self, spec, prefix):
install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/toml-f/package.py b/var/spack/repos/builtin/packages/toml-f/package.py
index 4a55fa0bb5..544f5b420a 100644
--- a/var/spack/repos/builtin/packages/toml-f/package.py
+++ b/var/spack/repos/builtin/packages/toml-f/package.py
@@ -25,4 +25,6 @@ class TomlF(MesonPackage):
version("0.2.4", sha256="ebfeb1e201725b98bae3e656bde4eea2db90154efa8681de758f1389fec902cf")
version("0.2.3", sha256="2dca7ff6d3e35415cd92454c31560d2b656c014af8236be09c54c13452e4539c")
+ depends_on("fortran", type="build") # generated
+
depends_on("meson@0.57.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/toml11/package.py b/var/spack/repos/builtin/packages/toml11/package.py
index cec19cf10a..79038f5c6b 100644
--- a/var/spack/repos/builtin/packages/toml11/package.py
+++ b/var/spack/repos/builtin/packages/toml11/package.py
@@ -18,6 +18,11 @@ class Toml11(CMakePackage):
license("MIT")
+ version("4.0.2", sha256="d1bec1970d562d328065f2667b23f9745a271bf3900ca78e92b71a324b126070")
+ version("4.0.1", sha256="96965cb00ca7757c611c169cd5a6fb15736eab1cd1c1a88aaa62ad9851d926aa")
+ version("4.0.0", sha256="f3dc3095f22e38745a5d448ac629f69b7ee76d2b3e6d653e4ce021deb7f7266e")
+ version("3.8.1", sha256="6a3d20080ecca5ea42102c078d3415bef80920f6c4ea2258e87572876af77849")
+ version("3.8.0", sha256="36ce64b09f9151b57ba1970f12a591006fcae17b751ba011314c1f5518e77bc7")
version("3.7.1", sha256="afeaa9aa0416d4b6b2cd3897ca55d9317084103077b32a852247d8efd4cf6068")
version("3.7.0", sha256="a0b6bec77c0e418eea7d270a4437510884f2fe8f61e7ab121729624f04c4b58e")
version("3.6.1", sha256="ca4c390ed8da0d77ae6eca30e70ab0bf5cc92adfc1bc2f71a2066bc5656d8d96")
@@ -29,3 +34,14 @@ class Toml11(CMakePackage):
version("3.2.1", sha256="370f17409cfcbf3f629728ed7ec2e1573544058615fb5d066f4f7c14693143a9")
version("3.2.0", sha256="3d54cac38ea24477190e0535377e824bf06562970ef4d35b59aa9729437e1019")
version("3.1.0", sha256="3a118f32e5343998f37be9807c72fd11c3168fe12a5b1abfdc0f1e60de6380a4")
+
+ depends_on("cxx", type="build") # generated
+
+ variant(
+ "cxx_std", default="11", description="C++ standard", values=("11", "14", "17"), multi=False
+ )
+
+ @when("@3.8.0:")
+ def cmake_args(self):
+ args = [self.define_from_variant("CMAKE_CXX_STANDARD", "cxx_std")]
+ return args
diff --git a/var/spack/repos/builtin/packages/tomlplusplus/package.py b/var/spack/repos/builtin/packages/tomlplusplus/package.py
new file mode 100644
index 0000000000..d165127d3e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tomlplusplus/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Tomlplusplus(CMakePackage):
+ """Header-only TOML config file parser and serializer for C++17"""
+
+ homepage = "https://marzer.github.io/tomlplusplus/"
+ url = "https://github.com/marzer/tomlplusplus/archive/refs/tags/v3.4.0.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("3.4.0", sha256="8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155")
+
+ depends_on("cxx", type="build")
+ depends_on("cmake@3.14:", type="build")
diff --git a/var/spack/repos/builtin/packages/tophat/package.py b/var/spack/repos/builtin/packages/tophat/package.py
index a2083894dc..ebf9794514 100644
--- a/var/spack/repos/builtin/packages/tophat/package.py
+++ b/var/spack/repos/builtin/packages/tophat/package.py
@@ -17,6 +17,9 @@ class Tophat(AutotoolsPackage):
version("2.1.2", sha256="15016b82255dad085d4ee7d970e50f0e53a280d466335553d47790d8344ff4b1")
version("2.1.1", sha256="991b1b7c840a5f5c4e9a15b2815983257d2b0748246af0b9094c7d07552b023e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
# 2.1.1 only builds with automake@1.15.1. There's a patch here:
# https://github.com/spack/spack/pull/8244, which was incorporated
diff --git a/var/spack/repos/builtin/packages/torque/package.py b/var/spack/repos/builtin/packages/torque/package.py
index 541eff2596..19f3f5fa71 100644
--- a/var/spack/repos/builtin/packages/torque/package.py
+++ b/var/spack/repos/builtin/packages/torque/package.py
@@ -14,8 +14,6 @@ class Torque(Package):
homepage = "https://github.com/abarbu/torque"
has_code = False
- maintainers("sethrj")
-
version("3.0.4")
version("3.0.2")
diff --git a/var/spack/repos/builtin/packages/totalview/package.py b/var/spack/repos/builtin/packages/totalview/package.py
index ff20fe302f..6f44e97085 100644
--- a/var/spack/repos/builtin/packages/totalview/package.py
+++ b/var/spack/repos/builtin/packages/totalview/package.py
@@ -3,212 +3,79 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import os
-
from spack.package import *
class Totalview(Package):
"""Totalview parallel debugger.
- Source must be made available to Spack
- externally, either by having the tarballs in the current working directory
- or having the tarballs in a Spack mirror.
-
- The documentation tarball will
- be used as the primary source and the architecture appropriate tarball will
- be downloaded as a resource."""
+ Select the version associated with your machine architecture'
+ '."""
homepage = "https://totalview.io"
- maintainers("dshrader", "petertea")
- manual_download = True
+ maintainers("dshrader", "petertea", "suzannepaterno", "elliebinkley")
license_required = True
license_comment = "#"
- license_files = ["licenses/license.dat", "licenses/tv_license_file"]
- license_vars = ["LM_LICENSE_FILE", "TV_LICENSE_FILE"]
+ license_files = ["tv_license/license.lic"]
+ license_vars = ["RLM_LICENSE"]
# As the install of Totalview is via multiple tarballs, the base install
# will be the documentation. The architecture-specific tarballs are added
# as resources dependent on the specific architecture used.
- version("2022.3.6", sha256="3f60714b8c885c562433e30c8bcde7e6383b3517664f37f25da7bf7f9110f308")
- version("2022.2.13", sha256="4bf625c760454e532fe66666f2f5479d38f36f569f104bbe3341c0f48cbc8766")
- version("2022.1.11", sha256="0042afdbb024b99350c395decf2606b6913479ab0117bfd7bd4252d91843ef69")
- version("2021.4.10", sha256="c476288ebe1964e0803c7316975c71a957e52f45187b135bc1dc3b65491bb61d")
- version("2021.3.9", sha256="fd947ce755e76a6a06747755aa61bedd0c1428999a46e920db9498ac930ddc29")
-
- # Distributed with Totalview
- variant("memoryscape", default=True, description="Install memoryscape")
-
- # Because the actual source tarball is architecture dependent, the main
- # download is the documentation tarball and the source is downloaded as a
- # resource once the target architecture is known.
- # Version 2022.3.6
- resource(
- name="crayx86",
- url="file://totalview_2022.3.6_linux_x86-64.tar",
- destination=".",
- sha256="a2639c52bfd4c7484b728d6a0158239074ff0e0c52208a5452b12b878016a519",
- when="@2022.3.6 platform=cray target=x86_64:",
- )
- resource(
- name="x86-64",
- url="file://totalview.2022.3.6-linux-x86-64.tar",
- destination=".",
- sha256="a2639c52bfd4c7484b728d6a0158239074ff0e0c52208a5452b12b878016a519",
- when="@2022.3.6 platform=linux target=x86_64:",
- )
- resource(
- name="ppcle",
- url="file://totalview_2022.3.6_linux_powerle.tar",
- destination=".",
- sha256="93771a6ce99cff6d11e8172ff57da16aed76ab8ad1804e1d18186fba6de945f7",
- when="@2022.3.6 platform=linux target=ppc64le:",
- )
- resource(
- name="aarch64",
- url="file://totalview_2022.3.6_linux_arm64.tar",
- destination=".",
- sha256="5c18a9a187196980f9bd0fbbb77bb8e5c1d51442188ca44d58a9c49329c98783",
- when="@2022.3.6 platform=linux target=aarch64:",
- )
- resource(
- name="darwinx86",
- url="file://totalview.2022.3.6-darwin-x86.tar",
- destination=".",
- sha256="f558877f7debbeeef200f587edf4cbba41b6bc8db5a0166757445cc652de8a33",
- when="@2022.3.6 platform=darwin target=x86_64:",
+ version(
+ "2024.3-x86-64",
+ sha256="fb47c5a5abc6ad0e3e7cff1a346037387fa471c3a5cb46b6cdbe7f8a10aff2a7",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.3/totalview_2024.3.10_linux_x86-64.tar",
)
- # Version 2022.2.13
- resource(
- name="crayx86",
- url="file://totalview_2022.2.13_linux_x86-64.tar",
- destination=".",
- sha256="aebd11b837ce18b8200859ea762caa56e2cea346daa114f2841aa0f05a422309",
- when="@2022.2.13 platform=cray target=x86_64:",
- )
- resource(
- name="x86-64",
- url="file://totalview.2022.2.13-linux-x86-64.tar",
- destination=".",
- sha256="aebd11b837ce18b8200859ea762caa56e2cea346daa114f2841aa0f05a422309",
- when="@2022.2.13 platform=linux target=x86_64:",
- )
- resource(
- name="ppcle",
- url="file://totalview_2022.2.13_linux_powerle.tar",
- destination=".",
- sha256="0136be160576b51b03e6409b06d6cc22b5535380894e0fdc6569e2238e12120e",
- when="@2022.2.13 platform=linux target=ppc64le:",
- )
- resource(
- name="aarch64",
- url="file://totalview_2022.2.13_linux_arm64.tar",
- destination=".",
- sha256="d82154222e1ae5fce0bb7abd19b6782494ecb1f76a9a5f38a19e9dcd40bd42aa",
- when="@2022.2.13 platform=linux target=aarch64:",
- )
- resource(
- name="darwinx86",
- url="file://totalview.2022.2.13-darwin-x86.tar",
- destination=".",
- sha256="abcad08e80967959f556cb9f2a7d6dfa7f38e33213fe56f7f3198ff94cd9f3fe",
- when="@2022.2.13 platform=darwin target=x86_64:",
+ version(
+ "2024.3-powerle",
+ sha256="a064d3c9b12108ec228e2ff203549442172e282682786ff20d02ea9bf40109b2",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.3/totalview_2024.3.10_linux_powerle.tar",
)
- # Version 2022.1.11
- resource(
- name="crayx86",
- url="file://totalview_2022.1.11_linux_x86-64.tar",
- destination=".",
- sha256="3ec9a7d702572dbbafa41726a036c94b549f9a5911ed6fd6aa55f7b377554bac",
- when="@2022.1.11 platform=cray target=x86_64:",
- )
- resource(
- name="x86-64",
- url="file://totalview.2022.1.11-linux-x86-64.tar",
- destination=".",
- sha256="3ec9a7d702572dbbafa41726a036c94b549f9a5911ed6fd6aa55f7b377554bac",
- when="@2022.1.11 platform=linux target=x86_64:",
- )
- resource(
- name="ppcle",
- url="file://totalview_2022.1.11_linux_powerle.tar",
- destination=".",
- sha256="4c49546508f7e0b1a91bea3ea8d71f6f9dc76989c69a4fd78012a4ae8fa44aa6",
- when="@2022.1.11 platform=linux target=ppc64le:",
- )
- resource(
- name="aarch64",
- url="file://totalview_2022.1.11_linux_arm64.tar",
- destination=".",
- sha256="89407c043679d161b6e204fc4ad5686b7ac18742081a045f19388c7294e5ddbe",
- when="@2022.1.11 platform=linux target=aarch64:",
- )
- resource(
- name="darwinx86",
- url="file://totalview.2022.1.11-darwin-x86.tar",
- destination=".",
- sha256="3a99eda8b7be225e0b7596b3c52032809378c86ea736c88e915c0a0e8efedbe4",
- when="@2022.1.11 platform=darwin target=x86_64:",
+ version(
+ "2024.3-linux-arm64",
+ sha256="91701e3460cad8bba8810c5ece4720f0156ccba7526d407801a7d0b0e09fb054",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.3/totalview_2024.3.10_linux_arm64.tar",
)
- # Version 2021.4.10
- resource(
- name="crayx86",
- url="file://totalview_2021.4.10_linux_x86-64.tar",
- destination=".",
- sha256="7e5509b2cfb219100b0032304bdad7d422657c0736c386ba64bdb1bf11d10a1d",
- when="@2021.4.10 platform=cray target=x86_64:",
- )
- resource(
- name="x86-64",
- url="file://totalview.2021.4.10-linux-x86-64.tar",
- destination=".",
- sha256="7e5509b2cfb219100b0032304bdad7d422657c0736c386ba64bdb1bf11d10a1d",
- when="@2021.4.10 platform=linux target=x86_64:",
- )
- resource(
- name="ppcle",
- url="file://totalview_2021.4.10_linux_powerle.tar",
- destination=".",
- sha256="79e812d1cd600172c5ea29c4aa6fb660d293300683419af36dd0e52cd7e15d56",
- when="@2021.4.10 platform=linux target=ppc64le:",
+ version(
+ "2024.2-x86-64",
+ sha256="b6d9cfd804ff1f6641fbd92f9730b34f62062ead9b1324eaf44f34ea78c69ef1",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.2/totalview_2024.2.11_linux_x86-64.tar",
)
- resource(
- name="aarch64",
- url="file://totalview_2021.4.10_linux_arm64.tar",
- destination=".",
- sha256="46faaae1f33b4f4a20de345611092fbc65cd5759511c1fcf86ca71a0811c76fd",
- when="@2021.4.10 platform=linux target=aarch64:",
+
+ version(
+ "2024.2-powerle",
+ sha256="2bc1ef377e95f6f09d1f221a1dcc2f79415bad9e1e8403c647f38e2d383524d6",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.2/totalview_2024.2.11_linux_powerle.tar",
)
- resource(
- name="darwinx86",
- url="file://totalview.2021.4.10-darwin-x86.tar",
- destination=".",
- sha256="adbf95f86763e3cc5ec51fd504f3172bdcbb42a7f1f4e73b17cacca002729ad2",
- when="@2021.4.10 platform=darwin target=x86_64:",
+
+ version(
+ "2024.2-linux-arm64",
+ sha256="63f737e61c2fb7f4816bcfc1d00e9e7c39817455531abdd09500f953be4ac75d",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.2/totalview_2024.2.11_linux_arm64.tar",
)
- # Version 2021.3
- resource(
- name="x86_64",
- url="file://totalview_2021.3.9_linux_x86-64.tar",
- destination=".",
- sha256="6315ca855e1bee14678c640c3c9c8207b4f66c91714dcedd4aed592354112b48",
- when="@2021.3.9 platform=linux target=x86_64:",
+ version(
+ "2024.1-x86-64",
+ sha256="964b73e70cb9046ce320bb0f95891b05c96a59117e5243fdc269855831c7059b",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.1/totalview_2024.1.21_linux_x86-64.tar",
)
- resource(
- name="ppcle",
- url="file://totalview_2021.3.9_linux_powerle.tar",
- destination=".",
- sha256="a7657b61895805024f5d4e7550796a485f98ce297a585583cdd20fe0b9b30bbb",
- when="@2021.3.9 platform=linux target=ppc64le:",
+
+ version(
+ "2024.1-powerle",
+ sha256="c4dd8a3099d4f6ed23a6646b1d091129e0bf0b10c7a0d7ec73bd767818bab39b",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.1/totalview_2024.1.21_linux_powerle.tar",
)
- def url_for_version(self, version):
- return "file://{0}/totalview.{1}-doc.tar".format(os.getcwd(), version)
+ version(
+ "2024.1-linux-arm64",
+ sha256="769527478dceb30855413970621f09a9dc54ef863ddaf75bb5a40142a54af346",
+ url="https://dslwuu69twiif.cloudfront.net/totalview/2024.1/totalview_2024.1.21_linux_arm64.tar",
+ )
def setup_run_environment(self, env):
env.prepend_path(
@@ -228,40 +95,23 @@ class Totalview(Package):
# Platform specification.
if spec.target.family == "x86_64" and spec.platform == "linux":
arg_list.extend(["-platform", "linux-x86-64"])
- elif spec.target.family == "x86_64" and spec.platform == "darwin":
- arg_list.extend(["-platform", "darwin-x86"])
- elif spec.target.family == "x86_64" and spec.platform == "cray":
- arg_list.extend(["-platform", "linux-x86-64"])
- elif spec.target.family == "x86":
- arg_list.extend(["-platform", "linux-x86"])
elif spec.target.family == "aarch64":
arg_list.extend(["-platform", "linux-arm64"])
elif spec.target.family == "ppc64le":
arg_list.extend(["-platform", "linux-powerle"])
- elif spec.target.family == "ppc64":
- arg_list.extend(["-platform", "linux-power"])
else:
raise InstallError("Architecture {0} not permitted!".format(spec.target.family))
- # Docs are the "base" install used with every architecture.
install_cmd.exe.extend(arg_list)
- install_cmd("-install", "doc-pdf")
# Run install script for totalview (which automatically installs memoryscape)
- with working_dir("./totalview.{0}".format(self.version)):
- install_cmd = which("./Install")
- arg_list.extend(["-install", "totalview"])
- # TotalView automatically installs Memoryscape, so no need to add
-
- install_cmd.exe.extend(arg_list)
- install_cmd()
+ install_cmd = which("./Install")
+ arg_list.extend(["-install", "totalview"])
+ install_cmd.exe.extend(arg_list)
+ install_cmd()
- # If a license file was created, link to FNE_license or FNP_license
- symlink(
- join_path(self.prefix, "licenses", "tv_license_file"),
- join_path(self.prefix, "toolworks", "FNE_license", "tv_license_file"),
- )
+ # If a license file was created
symlink(
- join_path(self.prefix, "licenses", "license.dat"),
- join_path(self.prefix, "toolworks", "FNP_license", "license.dat"),
+ join_path(self.prefix, "tv_license", "license.lic"),
+ join_path(self.prefix, "toolworks", "tv_license", "license.lic"),
)
diff --git a/var/spack/repos/builtin/packages/tpm2-tss/package.py b/var/spack/repos/builtin/packages/tpm2-tss/package.py
index 1cbb0a7575..bc3f80a1bd 100644
--- a/var/spack/repos/builtin/packages/tpm2-tss/package.py
+++ b/var/spack/repos/builtin/packages/tpm2-tss/package.py
@@ -14,10 +14,13 @@ class Tpm2Tss(AutotoolsPackage):
license("BSD-2-Clause")
+ version("4.1.1", sha256="da5b09d5a82d381f7bbd2e1d2db494213f7148659cfaf1b9e423b4df62f48504")
version("3.0.0", sha256="e88e91aeee2e01ccc45596fb8afcc3b521a660dcebe5a6e1b14ea5e9e5c15cf5")
version("2.4.2", sha256="1cec5e834a6a750b138cabcd100b3fcd12b16cd21fa4f9103739914743511f75")
version("2.4.1", sha256="cc6f0691307f3c65d5a1375e2cd22508cc72850dbc70eb820b892f0b3d0cbea2")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/tracer/package.py b/var/spack/repos/builtin/packages/tracer/package.py
index a6e4e70c6d..3bc8d4a8d6 100644
--- a/var/spack/repos/builtin/packages/tracer/package.py
+++ b/var/spack/repos/builtin/packages/tracer/package.py
@@ -19,6 +19,8 @@ class Tracer(MakefilePackage):
version("develop", branch="master")
version("2.2", tag="v2.2", commit="fdd1b07a1a0faca14aac53dcbcbccc44237ae7cb")
+ depends_on("cxx", type="build") # generated
+
variant("otf2", default=True, description="Use OTF2 traces for simulation")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/tracy-client/package.py b/var/spack/repos/builtin/packages/tracy-client/package.py
index 3237119b87..a1c0854166 100644
--- a/var/spack/repos/builtin/packages/tracy-client/package.py
+++ b/var/spack/repos/builtin/packages/tracy-client/package.py
@@ -22,6 +22,9 @@ class TracyClient(CMakePackage):
version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a")
version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build the client library as a shared library")
tracy_options = {
diff --git a/var/spack/repos/builtin/packages/tracy/package.py b/var/spack/repos/builtin/packages/tracy/package.py
index fbb74fd7df..e9102607c8 100644
--- a/var/spack/repos/builtin/packages/tracy/package.py
+++ b/var/spack/repos/builtin/packages/tracy/package.py
@@ -22,6 +22,9 @@ class Tracy(MakefilePackage):
version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a")
version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
depends_on("capstone")
depends_on("dbus")
depends_on("freetype")
diff --git a/var/spack/repos/builtin/packages/tramonto/package.py b/var/spack/repos/builtin/packages/tramonto/package.py
index 718949a66a..627872ac67 100644
--- a/var/spack/repos/builtin/packages/tramonto/package.py
+++ b/var/spack/repos/builtin/packages/tramonto/package.py
@@ -14,6 +14,9 @@ class Tramonto(CMakePackage):
version("develop", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("trilinos@:12+nox")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/transposome/package.py b/var/spack/repos/builtin/packages/transposome/package.py
index 0a07f5c570..386f3f9cd5 100644
--- a/var/spack/repos/builtin/packages/transposome/package.py
+++ b/var/spack/repos/builtin/packages/transposome/package.py
@@ -16,4 +16,6 @@ class Transposome(PerlPackage):
version("0.12.1", sha256="fc3706a883cba58626ccd753df7a77f0baf52ff3b1d8aa7644a7f474f296a603")
version("0.11.2", sha256="f0bfdb33c34ada726b36c7b7ed6defa8540a7f8abe08ad46b3ccfec5dcd4720d")
+ depends_on("cxx", type="build") # generated
+
depends_on("blast-plus")
diff --git a/var/spack/repos/builtin/packages/transset/package.py b/var/spack/repos/builtin/packages/transset/package.py
index 7df51842e3..9215ef0574 100644
--- a/var/spack/repos/builtin/packages/transset/package.py
+++ b/var/spack/repos/builtin/packages/transset/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Transset(AutotoolsPackage, XorgPackage):
"""transset is an utility for setting opacity property."""
- homepage = "https://cgit.freedesktop.org/xorg/app/transset"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/transset"
xorg_mirror_path = "app/transset-1.0.1.tar.gz"
license("MIT")
@@ -18,8 +18,10 @@ class Transset(AutotoolsPackage, XorgPackage):
version("1.0.2", sha256="5c7d7d1bac36137f41ac3db84d7ed9b9fdac868608572bcba0bc1de40510ca67")
version("1.0.1", sha256="87c560e69e05ae8a5bad17ff62ac31cda43a5065508205b109c756c0ab857d55")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/tree-sitter/package.py b/var/spack/repos/builtin/packages/tree-sitter/package.py
index bfb36001fe..c6872b43a9 100644
--- a/var/spack/repos/builtin/packages/tree-sitter/package.py
+++ b/var/spack/repos/builtin/packages/tree-sitter/package.py
@@ -19,12 +19,25 @@ class TreeSitter(MakefilePackage):
license("MIT")
+ version("0.22.6", sha256="e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f")
+ version("0.22.5", sha256="6bc22ca7e0f81d77773462d922cf40b44bfd090d92abac75cb37dbae516c2417")
+ version("0.22.4", sha256="919b750da9af1260cd989498bc84c63391b72ee2aa2ec20fc84882544eb7a229")
+ version("0.22.3", sha256="b394b948646e67c81319f3b859a09b50280b16c66b4445ae1958b35aa4eed586")
+ version("0.22.2", sha256="0c829523b876d4a37e1bd46a655c133a93669c0fe98fcd84972b168849c27afc")
+ version("0.22.1", sha256="b21065e78da33e529893c954e712ad15d9ad44a594b74567321d4a3a007d6090")
+ version("0.22.0", sha256="1cc0c832c6cc3d04f0b702247fac3dac45f958b0ee1f946619b7ae7b67258060")
+ version("0.21.0", sha256="6bb60e5b63c1dc18aba57a9e7b3ea775b4f9ceec44cc35dac4634d26db4eb69c")
+ version("0.20.9", sha256="9b2fd489a7281e3a7e5e7cbbf3a974e5a6a115889ae65676d61b79bdae96464e")
version("0.20.8", sha256="6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791")
+ version("0.20.7", sha256="b355e968ec2d0241bbd96748e00a9038f83968f85d822ecb9940cbe4c42e182e")
version("0.20.6", sha256="4d37eaef8a402a385998ff9aca3e1043b4a3bba899bceeff27a7178e1165b9de")
version("0.20.4", sha256="979ad0b36eb90975baf0c65d155d106276cac08afb1c2fe0ad54d4b7d498ce39")
version("0.20.3", sha256="ab52fe93e0c658cff656b9d10d67cdd29084247052964eba13ed6f0e9fa3bd36")
version("0.20.2", sha256="2a0445f8172bbf83db005aedb4e893d394e2b7b33251badd3c94c2c5cc37c403")
version("0.20.1", sha256="12a3f7206af3028dbe8a0de50d8ebd6d7010bf762db918acae76fc7585f1258d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def edit(self, spec, prefix):
env["PREFIX"] = prefix
diff --git a/var/spack/repos/builtin/packages/treelite/package.py b/var/spack/repos/builtin/packages/treelite/package.py
index c3ee15474c..d1ca6ccec3 100644
--- a/var/spack/repos/builtin/packages/treelite/package.py
+++ b/var/spack/repos/builtin/packages/treelite/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
@@ -17,6 +18,9 @@ class Treelite(CMakePackage):
version("0.93", sha256="7d347372f7fdc069904afe93e69ed0bf696ba42d271fe2f8bf6835d2ab2f45d5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("protobuf", default=False, description="Build with protobuf")
variant("python", default=True, description="Build with python support")
@@ -26,6 +30,8 @@ class Treelite(CMakePackage):
depends_on("py-wheel", when="+python", type="build")
depends_on("py-setuptools", when="+python", type="build")
depends_on("py-numpy", when="+python", type=("build", "run"))
+ # https://github.com/dmlc/treelite/issues/560
+ depends_on("py-numpy@:1", when="@:4.2.0+python", type=("build", "run"))
depends_on("py-scipy", when="+python", type=("build", "run"))
build_directory = "build"
@@ -45,5 +51,4 @@ class Treelite(CMakePackage):
def python_install(self):
if "+python" in self.spec:
with working_dir("python"):
- args = std_pip_args + ["--prefix=" + self.prefix, "."]
- pip(*args)
+ pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")
diff --git a/var/spack/repos/builtin/packages/treesub/package.py b/var/spack/repos/builtin/packages/treesub/package.py
index ac5e699057..c82ffcc120 100644
--- a/var/spack/repos/builtin/packages/treesub/package.py
+++ b/var/spack/repos/builtin/packages/treesub/package.py
@@ -15,7 +15,7 @@ class Treesub(Package):
occurred on a given branch. Originally written for colleagues at
the MRC NIMR."""
- homepage = "https:/github.com/tamuri/treesub"
+ homepage = "https://github.com/tamuri/treesub"
url = "https://github.com/tamuri/treesub/archive/v0.2.tar.gz"
version("0.2", sha256="58b0d2638cf9ae1ad8705df26a57c32b52a69f50e7954debbd678c82772fdc56")
diff --git a/var/spack/repos/builtin/packages/trexio/package.py b/var/spack/repos/builtin/packages/trexio/package.py
index e47b403096..540bd82eab 100644
--- a/var/spack/repos/builtin/packages/trexio/package.py
+++ b/var/spack/repos/builtin/packages/trexio/package.py
@@ -23,6 +23,9 @@ class Trexio(AutotoolsPackage):
version("2.1.0", sha256="232866c943b98fa8a42d34b55e940f7501634eb5bd426555ba970f5c09775e83")
version("2.0.0", sha256="6eeef2da44259718b43991eedae4b20d4f90044e38f3b44a8beea52c38b14cb4")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("hdf5", default=True, description="Enable HDF5 support")
depends_on("emacs@26.0:", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/trf/package.py b/var/spack/repos/builtin/packages/trf/package.py
index 7d02ecce6b..3efb595978 100644
--- a/var/spack/repos/builtin/packages/trf/package.py
+++ b/var/spack/repos/builtin/packages/trf/package.py
@@ -38,6 +38,8 @@ class Trf(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
@when("@4.07b")
def autoreconf(self, spec, prefix):
touch("configure")
diff --git a/var/spack/repos/builtin/packages/trident/package.py b/var/spack/repos/builtin/packages/trident/package.py
index 53839256f4..810763971a 100644
--- a/var/spack/repos/builtin/packages/trident/package.py
+++ b/var/spack/repos/builtin/packages/trident/package.py
@@ -17,6 +17,7 @@ class Trident(Package):
license("Apache-2.0")
+ version("24.02.0", sha256="a0e73a935079114e8a7010766e8a229084638c3c58a7ab6688c51b2d8fd1efa0")
version("23.01.1", sha256="d0aedf2446e09b15abe9b0f052f42145c6acf23014a6e009e22cff5a2ad6c77d")
version("20.01.1", sha256="02ba92e569916b98fb1b563c5ef03a94fd7981c3ac1ecb47e69ebb45471dc976")
version("20.01.0", sha256="5de190579acf62f5e9945dfd45aeb21989272c4972e85cb10256b7ec605c29c7")
diff --git a/var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py b/var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py
index 891929bdb4..5dd2a1f270 100644
--- a/var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py
+++ b/var/spack/repos/builtin/packages/trilinos-catalyst-ioss-adapter/package.py
@@ -15,9 +15,15 @@ class TrilinosCatalystIossAdapter(CMakePackage):
version("develop", branch="develop")
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("bison", type="build")
depends_on("flex", type="build")
- depends_on("paraview+mpi+python+osmesa")
+ depends_on("paraview+mpi+python")
+ depends_on("gl", type="run")
+ requires("^[virtuals=gl] osmesa", msg="OSMesa is required for paraview")
depends_on("py-numpy", type=("build", "run"))
# Here we avoid paraview trying to use netcdf-c~parallel-netcdf
# which is netcdf-c's default, even though paraview depends on 'netcdf-c'
diff --git a/var/spack/repos/builtin/packages/trilinos/0001-use-the-gcnArchName-inplace-of-gcnArch-as-gcnArch-is.patch b/var/spack/repos/builtin/packages/trilinos/0001-use-the-gcnArchName-inplace-of-gcnArch-as-gcnArch-is.patch
new file mode 100644
index 0000000000..ea2b8b98a4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/trilinos/0001-use-the-gcnArchName-inplace-of-gcnArch-as-gcnArch-is.patch
@@ -0,0 +1,26 @@
+From e7fa7ea37423d3d17d77334ac849c5df00feb20e Mon Sep 17 00:00:00 2001
+From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
+Date: Tue, 16 Jan 2024 10:09:34 +0000
+Subject: [PATCH] use the gcnArchName inplace of gcnArch as gcnArch is
+ deprecated from rocm-6.0.0
+
+---
+ packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.cpp b/packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.cpp
+index 7840ad9..882d143 100644
+--- a/packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.cpp
++++ b/packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.cpp
+@@ -86,7 +86,7 @@ void HIPInternal::print_configuration(std::ostream &s) const {
+ KOKKOS_IMPL_HIP_SAFE_CALL(hipGetDeviceProperties(&hipProp, i));
+
+ s << "Kokkos::HIP[ " << i << " ] "
+- << "gcnArch " << hipProp.gcnArch << ", Total Global Memory: "
++ << "gcnArchName " << hipProp.gcnArchName << ", Total Global Memory: "
+ << ::Kokkos::Impl::human_memory_size(hipProp.totalGlobalMem)
+ << ", Shared Memory per Block: "
+ << ::Kokkos::Impl::human_memory_size(hipProp.sharedMemPerBlock);
+--
+2.39.3
+
diff --git a/var/spack/repos/builtin/packages/trilinos/cstdint_gcc13.patch b/var/spack/repos/builtin/packages/trilinos/cstdint_gcc13.patch
new file mode 100644
index 0000000000..671720903a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/trilinos/cstdint_gcc13.patch
@@ -0,0 +1,33 @@
+diff -Naur spack-src.orig/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp spack-src/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp
+--- spack-src.orig/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp 2024-09-02 10:53:10.022724683 +0200
++++ spack-src/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp 2024-09-02 10:57:03.312228742 +0200
+@@ -44,6 +44,7 @@
+
+ #include <impl/Kokkos_Error.hpp>
+
++#include <cstdint>
+ #include <ostream>
+ #include <sstream>
+
+diff -Naur spack-src.orig/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp spack-src/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp
+--- spack-src.orig/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp 2024-09-02 10:53:50.098010896 +0200
++++ spack-src/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp 2024-09-02 10:51:17.777157344 +0200
+@@ -42,6 +42,7 @@
+ #ifndef TEUCHOS_BIG_UINT_DECL_HPP
+ #define TEUCHOS_BIG_UINT_DECL_HPP
+
++#include <cstdint>
+ #include <iosfwd>
+
+ /*! \file Teuchos_BigUIntDecl.hpp
+diff -Naur spack-src.orig/packages/teuchos/core/src/Teuchos_PrintDouble.cpp spack-src/packages/teuchos/core/src/Teuchos_PrintDouble.cpp
+--- spack-src.orig/packages/teuchos/core/src/Teuchos_PrintDouble.cpp 2024-09-02 10:54:02.240401775 +0200
++++ spack-src/packages/teuchos/core/src/Teuchos_PrintDouble.cpp 2024-09-02 10:51:34.110672927 +0200
+@@ -42,6 +42,7 @@
+ #include "Teuchos_PrintDouble.hpp"
+ #include "Teuchos_BigUInt.hpp"
+
++#include <cstdint>
+ #include <cstring>
+
+ namespace Teuchos {
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index d1de74f11c..aa32363062 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -5,10 +5,10 @@
import os
import pathlib
+import re
import sys
from spack.build_environment import dso_suffix
-from spack.error import NoHeadersError
from spack.operating_systems.mac_os import macos_version
from spack.package import *
from spack.pkg.builtin.kokkos import Kokkos
@@ -34,7 +34,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
url = "https://github.com/trilinos/Trilinos/archive/refs/tags/trilinos-release-12-12-1.tar.gz"
git = "https://github.com/trilinos/Trilinos.git"
- maintainers("keitat", "sethrj", "kuberry", "jwillenbring", "psakievich")
+ maintainers("keitat", "kuberry", "jwillenbring", "psakievich")
tags = ["e4s"]
@@ -42,6 +42,8 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version("develop", branch="develop")
+ version("16.0.0", sha256="46bfc40419ed2aa2db38c144fb8e61d4aa8170eaa654a88d833ba6b92903f309")
+ version("15.1.1", sha256="2108d633d2208ed261d09b2d6b2fbae7a9cdc455dd963c9c94412d38d8aaefe4")
version("15.0.0", sha256="5651f1f967217a807f2c418a73b7e649532824dbf2742fa517951d6cc11518fb")
version("14.4.0", sha256="8e7d881cf6677aa062f7bfea8baa1e52e8956aa575d6a4f90f2b6f032632d4c6")
version("14.2.0", sha256="c96606e5cd7fc9d25b9dc20719cd388658520d7cbbd2b4de77a118440d1e0ccb")
@@ -69,10 +71,19 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
version("11.14.2", sha256="f22b2b0df7b88e28b992e19044ba72b845292b93cbbb3a948488199647381119")
version("11.14.1", sha256="f10fc0a496bf49427eb6871c80816d6e26822a39177d850cc62cf1484e4eec07")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
# ###################### Variants ##########################
# Build options
variant("complex", default=False, description="Enable complex numbers in Trilinos")
+ variant(
+ "cuda_constexpr",
+ default=False,
+ description="Enable relaxed constexpr functions for CUDA build",
+ )
variant("cuda_rdc", default=False, description="Turn on RDC for CUDA build")
variant("rocm_rdc", default=False, description="Turn on RDC for ROCm build")
variant(
@@ -102,6 +113,13 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
variant("uvm", default=False, when="@13.2: +cuda", description="Turn on UVM for CUDA build")
variant("wrapper", default=False, description="Use nvcc-wrapper for CUDA build")
+ # Makes the Teuchos Memory Management classes (Teuchos::RCP, Teuchos::Ptr, Teuchos::Array,
+ # Teuchos::ArrayView, and Teuchos::ArrayRCP) thread-safe. Requires at least the OMP kokkos
+ # backend to be enabled. Without, this seemingly does nothing
+ variant(
+ "threadsafe", default=False, when="+openmp", description="Enable threadsafe in Teuchos"
+ )
+
# TPLs (alphabet order)
variant("adios2", default=False, description="Enable ADIOS2")
variant("boost", default=False, description="Compile with Boost")
@@ -137,6 +155,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
variant("minitensor", default=False, description="Compile with MiniTensor")
variant("muelu", default=True, description="Compile with Muelu")
variant("nox", default=False, description="Compile with NOX")
+ variant("pamgen", default=False, description="Compile with Pamgen")
variant("panzer", default=False, description="Compile with Panzer")
variant("piro", default=False, description="Compile with Piro")
variant("phalanx", default=False, description="Compile with Phalanx")
@@ -242,6 +261,9 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("@:12 gotype=long")
with when("+piro"):
conflicts("~stratimikos")
+ conflicts("~thyra")
+ conflicts("~tpetra")
+ conflicts("@15: ~teko")
conflicts("~nox")
# Tpetra stack
@@ -291,6 +313,10 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("~ifpack")
conflicts("~aztec")
+ with when("+tempus"):
+ conflicts("~nox")
+ conflicts("~thyra")
+
# Known requirements from tribits dependencies
conflicts("~thyra", when="+stratimikos")
conflicts("+adelus", when="~kokkos")
@@ -301,7 +327,6 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+minitensor", when="~boost")
conflicts("+phalanx", when="~sacado")
conflicts("+stokhos", when="~kokkos")
- conflicts("+tempus", when="~nox")
# Only allow DTK with Trilinos 12.14, 12.18
conflicts("+dtk", when="~boost")
@@ -317,6 +342,9 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+strumpack", when="@:13.0")
# Can only use one type of SuperLU
conflicts("+superlu-dist", when="+superlu")
+ # Amesos and Ifpack only support up to SuperLU 4.x.y interfaces
+ conflicts("+amesos", when="+superlu@5:")
+ conflicts("+ifpack", when="+superlu@5:")
# For Trilinos v11 we need to force SuperLUDist=OFF, since only the
# deprecated SuperLUDist v3.3 together with an Amesos patch is working.
conflicts("+superlu-dist", when="@11.4.1:11.14.3")
@@ -328,12 +356,6 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
# see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html
# and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
conflicts("+superlu-dist", when="+complex+amesos2")
- # https://github.com/trilinos/Trilinos/issues/2994
- conflicts(
- "+shared",
- when="+stk platform=darwin",
- msg="Cannot build Trilinos with STK as a shared library on Darwin.",
- )
conflicts("+adios2", when="@:12.14.1")
conflicts("cxxstd=11", when="@13.2:")
conflicts("cxxstd=14", when="@14:")
@@ -365,9 +387,6 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
# Fix: https://github.com/xiaoyeli/superlu_dist/commit/09cb1430f7be288fd4d75b8ed461aa0b7e68fefe
# is not tagged yet. See discussion here https://github.com/trilinos/Trilinos/issues/11839
conflicts("+cuda +stokhos +superlu-dist")
- # Cuda UVM must be enabled prior to 13.2
- # See https://github.com/spack/spack/issues/28869
- conflicts("~uvm", when="@:13.1 +cuda")
# stokhos fails on xl/xl_r
conflicts("+stokhos", when="%xl")
@@ -388,32 +407,35 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
# ###################### Dependencies ##########################
# External Kokkos
- depends_on("kokkos@4.1.00", when="@14.4.0: +kokkos")
- depends_on("kokkos +wrapper", when="trilinos@14.4.0: +kokkos +wrapper")
- depends_on("kokkos ~wrapper", when="trilinos@14.4.0: +kokkos ~wrapper")
-
- for a in CudaPackage.cuda_arch_values:
- arch_str = "+cuda cuda_arch=" + a
- kokkos_spec = "kokkos@4.1.00 " + arch_str
- depends_on(kokkos_spec, when="@14.4.0 +kokkos " + arch_str)
-
- for a in ROCmPackage.amdgpu_targets:
- arch_str = "+rocm amdgpu_target={0}".format(a)
- kokkos_spec = "kokkos@4.1.00 {0}".format(arch_str)
- depends_on(kokkos_spec, when="@14.4.0 +kokkos {0}".format(arch_str))
+ with when("@14.4: +kokkos"):
+ depends_on("kokkos+wrapper", when="+wrapper")
+ depends_on("kokkos~wrapper", when="~wrapper")
+ depends_on("kokkos~complex_align")
+ depends_on("kokkos@4.5.00", when="@master:")
+ depends_on("kokkos@4.3.01", when="@16")
+ depends_on("kokkos@4.2.01", when="@15.1:15")
+ depends_on("kokkos@4.1.00", when="@14.4:15.0")
+ depends_on("kokkos-kernels@4.5.00", when="@master:")
+ depends_on("kokkos-kernels@4.3.01", when="@16")
+ depends_on("kokkos-kernels@4.2.01", when="@15.1:15")
+ depends_on("kokkos-kernels@4.1.00", when="@15.0")
+
+ for a in CudaPackage.cuda_arch_values:
+ arch_str = f"+cuda cuda_arch={a}"
+ depends_on(f"kokkos{arch_str}", when=arch_str)
+ for a in ROCmPackage.amdgpu_targets:
+ arch_str = f"+rocm amdgpu_target={a}"
+ depends_on(f"kokkos{arch_str}", when=arch_str)
depends_on("adios2", when="+adios2")
depends_on("binder@1.3:", when="@15: +python", type="build")
depends_on("blas")
depends_on("boost+graph+math+exception+stacktrace", when="+boost")
- # Need to revisit the requirement of STK
- depends_on("boost+graph+math+exception+stacktrace", when="+stk")
-
- #
+ depends_on("boost+graph+math+exception+stacktrace", when="@:13.4.0 +stk")
depends_on("cgns", when="+exodus")
depends_on("cmake@3.23:", type="build", when="@14.0.0:")
depends_on("hdf5+hl", when="+hdf5")
- for plat in ["cray", "darwin", "linux"]:
+ for plat in ["darwin", "linux"]:
depends_on("hypre~internal-superlu~int64", when="+hypre platform=%s" % plat)
depends_on("hypre-cmake~int64", when="+hypre platform=windows")
depends_on("kokkos-nvcc-wrapper", when="+wrapper")
@@ -437,9 +459,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
depends_on("scalapack", when="+mumps")
depends_on("scalapack", when="+strumpack+mpi")
depends_on("strumpack+shared", when="+strumpack")
- depends_on("suite-sparse", when="+suite-sparse")
+ depends_on("suite-sparse@:7.3.1", when="+suite-sparse")
depends_on("superlu-dist", when="+superlu-dist")
- depends_on("superlu@4.3 +pic", when="+superlu")
+ depends_on("superlu@3:5.2", when="@12.18.1: +superlu")
+ depends_on("superlu@3:5.1.1", when="@12.14.1 +superlu")
+ depends_on("superlu@3:4", when="@:12.12.1 +superlu")
depends_on("swig", when="@:14 +python")
depends_on("zlib-api", when="+zoltan")
@@ -489,6 +513,12 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
# workaround an NVCC bug with c++14 (https://github.com/trilinos/Trilinos/issues/6954)
# avoid calling deprecated functions with CUDA-11
patch("fix_cxx14_cuda11.patch", when="@13.0.0:13.0.1 cxxstd=14 ^cuda@11:")
+ patch(
+ "0001-use-the-gcnArchName-inplace-of-gcnArch-as-gcnArch-is.patch",
+ when="@15.0.0 ^hip@6.0 +rocm",
+ )
+ patch("cstdint_gcc13.patch", when="@13.4.0:13.4.1 %gcc@13.0.0:")
+
# Allow building with +teko gotype=long
patch(
"https://github.com/trilinos/Trilinos/commit/b17f20a0b91e0b9fc5b1b0af3c8a34e2a4874f3f.patch?full_index=1",
@@ -524,7 +554,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
flags.append("-Wl,-undefined,dynamic_lookup")
# Fortran lib (assumes clang is built with gfortran!)
- if "+fortran" in spec and spec.compiler.name in ["gcc", "clang", "apple-clang"]:
+ if spec.satisfies("+fortran") and (
+ spec.satisfies("%gcc")
+ or spec.satisfies("%clang")
+ or spec.satisfies("%apple-clang")
+ ):
fc = Executable(self.compiler.fc)
libgfortran = fc(
"--print-file-name", "libgfortran." + dso_suffix, output=str
@@ -586,6 +620,30 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
define = self.define
define_from_variant = self.define_from_variant
+ if self.spec.satisfies("@master: +kokkos"):
+ with open(
+ os.path.join(self.stage.source_path, "packages", "kokkos", "CMakeLists.txt")
+ ) as f:
+ all_txt = f.read()
+ r = dict(
+ re.findall(r".*set\s?\(\s?Kokkos_VERSION_(MAJOR|MINOR|PATCH)\s?(\d+)", all_txt)
+ )
+ kokkos_version_in_trilinos_source = Version(
+ ".".join([r["MAJOR"], r["MINOR"], r["PATCH"].zfill(2)])
+ )
+ kokkos_version_specified = spec["kokkos"].version
+ if kokkos_version_in_trilinos_source != kokkos_version_specified:
+ raise InstallError(
+ "For Trilinos@[master,develop], ^kokkos version in spec must "
+ "match version in Trilinos source code. Specify ^kokkos@{0} ".format(
+ kokkos_version_in_trilinos_source
+ )
+ + "for trilinos@[master,develop] instead of ^kokkos@{0}.\n".format(
+ kokkos_version_specified
+ )
+ + "Trilinos recipe maintainers, please update the ^kokkos version range"
+ )
+
def _make_definer(prefix):
def define_enable(suffix, value=None):
key = prefix + suffix
@@ -622,6 +680,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
define_trilinos_enable(
"EXPLICIT_INSTANTIATION", "explicit_template_instantiation"
),
+ define_from_variant("Trilinos_ENABLE_THREAD_SAFE", "threadsafe"),
]
)
@@ -644,9 +703,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
options.append(
define(
"Trilinos_CXX11_FLAGS",
- self.compiler.cxx14_flag
- if spec.variants["cxxstd"].value == "14"
- else self.compiler.cxx11_flag,
+ (
+ self.compiler.cxx14_flag
+ if spec.variants["cxxstd"].value == "14"
+ else self.compiler.cxx11_flag
+ ),
)
)
@@ -675,7 +736,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
define_trilinos_enable("ML"),
define_trilinos_enable("MueLu"),
define_trilinos_enable("NOX"),
- define_trilinos_enable("Pamgen", False),
+ define_trilinos_enable("Pamgen"),
define_trilinos_enable("Panzer"),
define_trilinos_enable("Pike", False),
define_trilinos_enable("Piro"),
@@ -807,6 +868,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
("HDF5", "hdf5", "hdf5"),
("HYPRE", "hypre", "hypre"),
("MUMPS", "mumps", "mumps"),
+ ("AMD", "suite-sparse", "suite-sparse"),
("UMFPACK", "suite-sparse", "suite-sparse"),
("SuperLU", "superlu", "superlu"),
("SuperLUDist", "superlu-dist", "superlu-dist"),
@@ -839,8 +901,10 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
define_tpl(tpl_name, dep_name, dep_name in spec)
# External Kokkos
- if spec.satisfies("@14.4.0 +kokkos"):
+ if spec.satisfies("@14.4.0: +kokkos"):
options.append(define_tpl_enable("Kokkos"))
+ if spec.satisfies("@15.0: +kokkos"):
+ options.append(define_tpl_enable("KokkosKernels", True))
# MPI settings
options.append(define_tpl_enable("MPI"))
@@ -955,6 +1019,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
[
define_kok_enable("CUDA_UVM", use_uvm),
define_kok_enable("CUDA_LAMBDA", True),
+ define_kok_enable("CUDA_CONSTEXPR", "cuda_constexpr"),
define_kok_enable("CUDA_RELOCATABLE_DEVICE_CODE", "cuda_rdc"),
]
)
diff --git a/var/spack/repos/builtin/packages/trimal/package.py b/var/spack/repos/builtin/packages/trimal/package.py
index abf454f927..5f4ba78289 100644
--- a/var/spack/repos/builtin/packages/trimal/package.py
+++ b/var/spack/repos/builtin/packages/trimal/package.py
@@ -17,6 +17,8 @@ class Trimal(MakefilePackage):
version("1.4.1", sha256="cb8110ca24433f85c33797b930fa10fe833fa677825103d6e7f81dd7551b9b4e")
+ depends_on("cxx", type="build") # generated
+
build_directory = "source"
def install(self, sinstall_treepec, prefix):
diff --git a/var/spack/repos/builtin/packages/trinity/package.py b/var/spack/repos/builtin/packages/trinity/package.py
index 2edfaefc9b..8195ddda8f 100644
--- a/var/spack/repos/builtin/packages/trinity/package.py
+++ b/var/spack/repos/builtin/packages/trinity/package.py
@@ -46,6 +46,9 @@ class Trinity(MakefilePackage):
)
version("2.6.6", sha256="868dfadeefaf2d3c6150a88d5e86fbc09466d69bbf4a65f70b4f5a7485668984")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("java@8:", type=("build", "run"))
depends_on("bowtie2")
diff --git a/var/spack/repos/builtin/packages/trnascan-se/package.py b/var/spack/repos/builtin/packages/trnascan-se/package.py
index c7e043f505..d22647f2c6 100644
--- a/var/spack/repos/builtin/packages/trnascan-se/package.py
+++ b/var/spack/repos/builtin/packages/trnascan-se/package.py
@@ -14,16 +14,19 @@ class TrnascanSe(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("2.0.12", sha256="96fa4af507cd918c1c623763d9260bd6ed055d091662b44314426f6bbf447251")
version("2.0.11", sha256="29b74edd0f84ad88139035e119b66397c54a37428e0b61c66a1b3d4733adcd1e")
version("2.0.0", sha256="0dde1c07142e4bf77b21d53ddf3eeb1ef8c52248005a42323d13f8d7c798100c")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("infernal@1.1:", type="run", when="@2.0.0:")
def patch(self):
filter_file(
"infernal_dir: {bin_dir}",
- "infernal_dir: %s" % self.spec["infernal"].prefix.bin,
+ f"infernal_dir: {self.spec['infernal'].prefix.bin}",
"tRNAscan-SE.conf.src",
string=True,
)
diff --git a/var/spack/repos/builtin/packages/trompeloeil/package.py b/var/spack/repos/builtin/packages/trompeloeil/package.py
index 1cd132278a..f2ed10d527 100644
--- a/var/spack/repos/builtin/packages/trompeloeil/package.py
+++ b/var/spack/repos/builtin/packages/trompeloeil/package.py
@@ -17,6 +17,9 @@ class Trompeloeil(CMakePackage):
license("BSL-1.0")
version("master", branch="master")
+ version("47", sha256="4a1d79260c1e49e065efe0817c8b9646098ba27eed1802b0c3ba7d959e4e5e84")
version("45", sha256="124b0aa45d84415193719376b6557fc1f1180cbfebf4dc4f7ca247cb404d6bd8")
version("44", sha256="004877db6ba22f24c7867e112e081eeb68858122f55ebe7c7dd9d8d9e3b46c88")
version("43", sha256="86a0afa2e97347202a0a883ab43da78c1d4bfff0d6cb93205cfc433d0d9eb9eb")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/truchas/package.py b/var/spack/repos/builtin/packages/truchas/package.py
index ad31afc053..0b283c763a 100644
--- a/var/spack/repos/builtin/packages/truchas/package.py
+++ b/var/spack/repos/builtin/packages/truchas/package.py
@@ -24,9 +24,15 @@ class Truchas(CMakePackage):
maintainers("pbrady", "zjibben")
version("develop", branch="master")
+ version("24.07", sha256="42a2e2edfaa157786bd801e889477f08c6d168690a123a8bfa6d86c222bc54e6")
+ version("24.06", sha256="648c5c3f3c3c72fd359de91713af5feed1c1580268489c079511fa5ac2428519")
version("23.06", sha256="a786caba5129d7e33ba42a06751d6c570bd3b9697e3404276a56216d27820c68")
version("22.04.1", sha256="ed2000f27ee5c4bd3024063a374023878c61e8a3c76c37542fffd341d1226dc1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# ------------------------------------------------------------ #
# Variants
# ------------------------------------------------------------ #
@@ -39,7 +45,8 @@ class Truchas(CMakePackage):
# ------------------------------------------------------------ #
# Build dependencies
# ------------------------------------------------------------ #
- depends_on("cmake@3.16:", type="build")
+ depends_on("cmake@3.20.2:", type="build")
+ depends_on("cmake@3.16:", when="@:24.05", type="build")
# ------------------------------------------------------------ #
# Test suite and restart utils
@@ -51,16 +58,25 @@ class Truchas(CMakePackage):
# ------------------------------------------------------------ #
# IO dependencies
# ------------------------------------------------------------ #
- depends_on("exodusii@2020-05-12: +mpi")
+ depends_on("exodusii@2023-11-27: +mpi", when="@24.06:")
+ depends_on("exodusii@2020-05-12: +mpi", when="@:24.05")
depends_on("scorpio")
- depends_on("petaca@22.03: +shared")
- depends_on("petaca@22.03: +shared +std_name", when="+std_name")
+ depends_on("hdf5@1.14:", when="@24.06:")
+ depends_on("hdf5@1.10", when="@:24.05")
+ depends_on("netcdf-c@4.9:", when="@24.06:")
+ depends_on("netcdf-c@4.8", when="@:24.05")
+ depends_on("petaca@24.04: +shared", when="@24.06:")
+ depends_on("petaca@24.04: +shared +std_name", when="@24.06: +std_name")
+ depends_on("petaca@22.03: +shared", when="@:24.05")
+ depends_on("petaca@22.03: +shared +std_name", when="@:24.05 +std_name")
# ------------------------------------------------------------ #
# Partitioning
# ------------------------------------------------------------ #
- depends_on("chaco")
+ # Chaco dependency removed & metis required starting 24.06.
+ depends_on("chaco", when="@:24.05")
depends_on("metis@5:", when="+metis")
+ requires("+metis", when="@24.06:", msg="Metis is required starting with Truchas 24.06")
# ------------------------------------------------------------ #
# Radiation
@@ -70,8 +86,9 @@ class Truchas(CMakePackage):
# ------------------------------------------------------------ #
# Solvers
# ------------------------------------------------------------ #
- depends_on("hypre@2.20: ~fortran")
- depends_on("netlib-lapack")
+ depends_on("hypre@2.29: ~fortran", when="@24.06:")
+ depends_on("hypre@2.20:2.28 ~fortran", when="@:24.05")
+ depends_on("lapack")
# ------------------------------------------------------------ #
# Mapping
diff --git a/var/spack/repos/builtin/packages/tskit/package.py b/var/spack/repos/builtin/packages/tskit/package.py
index 54445ec562..8a03cc558a 100644
--- a/var/spack/repos/builtin/packages/tskit/package.py
+++ b/var/spack/repos/builtin/packages/tskit/package.py
@@ -15,8 +15,11 @@ class Tskit(PythonPackage):
license("MIT")
+ version("0.5.6", sha256="ddfe213f1cb063cdb6982177230a2805ecd7dfc7ccd73026e13878abffd2ce46")
version("0.3.1", sha256="b9c5a9b2fb62a615e389036946345ef8a35b09f1ffee541995b16f97fedb3d36")
+ depends_on("c", type="build") # generated
+
depends_on("python@3.6:", type=("build", "run"))
depends_on("py-setuptools", type=("build", "run"))
depends_on("py-svgwrite", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/tulip/package.py b/var/spack/repos/builtin/packages/tulip/package.py
index 226a01c5bf..aa30d842f1 100644
--- a/var/spack/repos/builtin/packages/tulip/package.py
+++ b/var/spack/repos/builtin/packages/tulip/package.py
@@ -24,6 +24,9 @@ class Tulip(CMakePackage):
version("5.4.0", sha256="2175e4e1a79028ab7a2479e882242f304fd3e01fedf80e1f29f8f5e9a6eb1325")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
extends("python")
depends_on("py-pyqt5", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/tumbler/package.py b/var/spack/repos/builtin/packages/tumbler/package.py
new file mode 100644
index 0000000000..66fa45706a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tumbler/package.py
@@ -0,0 +1,72 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Tumbler(AutotoolsPackage):
+ """Tumbler is a D-Bus service for applications to request thumbnails for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/tumbler/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/tumbler-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="4087f3af4ef31271d3f315421a2f1fe67e4fda7ad60bbab1f073627914dfcf00")
+ version("4.16.0", sha256="9b0b7fed0c64041733d490b1b307297984629d0dd85369749617a8766850af66")
+
+ variant("desktop-thumbnailer", default=True, description="Build with .desktop file support")
+ variant("cover-thumbnailer", default=True, description="Build with cover support")
+ variant("pixbuf-thumbnailer", default=True, description="Build with pixbuf support")
+ variant("font-thumbnailer", default=True, description="Build with font support")
+ variant("jpeg-thumbnailer", default=True, description="Build with jpeg thumbnail support")
+ variant("ffmpeg-thumbnailer", default=True, description="Build with ffmpg video support")
+ # variant("gstreamer", default=True, description="Build with gstreamer video support")
+ variant("poppler-thumbnailer", default=True, description="Build with pdf support")
+ # variant("libgsf", default=True, description="Build with odf support")
+ # variant("libopenraw-gnome", default=True, description="Build with raw image support")
+
+ conflicts("%gcc@13:", when="@:4.18", msg="GCC 13+ fails on implicit pointer casting")
+
+ # Base requirements
+ with default_args(type="build"):
+ depends_on("intltool@0.35.0:")
+ depends_on("gettext")
+ depends_on("pkgconfig", type=("build", "link"))
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("glib@2:")
+ depends_on("dbus-glib")
+ depends_on("gdk-pixbuf")
+ depends_on("libpng")
+ depends_on("gtkplus@3:")
+ depends_on("freetype", when="+font-thumbnailer")
+ depends_on("libjpeg", when="+jpeg-thumbnailer")
+ depends_on("ffmpeg", when="+ffmpeg-thumbnailer")
+ depends_on("poppler+glib", when="+poppler-thumbnailer")
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+
+ def configure_args(self):
+ args = []
+
+ args += self.enable_or_disable("desktop-thumbnailer")
+ args += self.enable_or_disable("cover-thumbnailer")
+ args += self.enable_or_disable("pixbuf-thumbnailer")
+ args += self.enable_or_disable("font-thumbnailer")
+ args += self.enable_or_disable("jpeg-thumbnailer")
+ args += self.enable_or_disable("ffmpeg-thumbnailer")
+ args += self.enable_or_disable("poppler-thumbnailer")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/turbine/package.py b/var/spack/repos/builtin/packages/turbine/package.py
index 4f247cf444..7bd02a83e9 100644
--- a/var/spack/repos/builtin/packages/turbine/package.py
+++ b/var/spack/repos/builtin/packages/turbine/package.py
@@ -18,6 +18,9 @@ class Turbine(AutotoolsPackage):
version("1.3.0", sha256="9709e5dada91a7dce958a7967d6ff2bd39ccc9e7da62d05a875324b5089da393")
version("1.2.3", sha256="a3156c7e0b39e166da3de8892f55fa5d535b0c99c87a9add067c801098fe51ba")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Enable calling python")
variant("r", default=False, description="Enable calling R")
variant("hdf5", default=False, description="Enable HDF5 support")
@@ -57,9 +60,14 @@ class Turbine(AutotoolsPackage):
"--with-c-utils=" + self.spec["exmcutils"].prefix,
"--with-adlb=" + self.spec["adlbx"].prefix,
"--with-tcl=" + self.spec["tcl"].prefix,
- "--with-mpi=" + self.spec["mpi"].prefix,
"--disable-static-pkg",
]
+
+ if self.spec.satisfies("^intel-oneapi-mpi"):
+ args.append("--with-mpi=" + self.spec["intel-oneapi-mpi"].package.component_prefix)
+ else:
+ args.append("--with-mpi=" + self.spec["mpi"].prefix)
+
if "+hdf5" in self.spec:
args.append("--with-hdf5=ON")
else:
diff --git a/var/spack/repos/builtin/packages/turnserver/package.py b/var/spack/repos/builtin/packages/turnserver/package.py
index 2ff2fc4dee..8662815c59 100644
--- a/var/spack/repos/builtin/packages/turnserver/package.py
+++ b/var/spack/repos/builtin/packages/turnserver/package.py
@@ -16,4 +16,6 @@ class Turnserver(AutotoolsPackage):
version("4.5.1.3", sha256="408bf7fde455d641bb2a23ba2df992ea0ae87b328de74e66e167ef58d8e9713a")
+ depends_on("c", type="build") # generated
+
depends_on("libevent")
diff --git a/var/spack/repos/builtin/packages/twm/package.py b/var/spack/repos/builtin/packages/twm/package.py
index b350728d02..3a027151ad 100644
--- a/var/spack/repos/builtin/packages/twm/package.py
+++ b/var/spack/repos/builtin/packages/twm/package.py
@@ -12,7 +12,7 @@ class Twm(AutotoolsPackage, XorgPackage):
user-defined macro functions, click-to-type and pointer-driven
keyboard focus, and user-specified key and pointer button bindings."""
- homepage = "https://cgit.freedesktop.org/xorg/app/twm"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/twm"
xorg_mirror_path = "app/twm-1.0.9.tar.gz"
license("MIT")
@@ -22,6 +22,8 @@ class Twm(AutotoolsPackage, XorgPackage):
version("1.0.10", sha256="679a1d07078c918fa32454498dc15573b299bbb0f001499e213c408e4b2170f5")
version("1.0.9", sha256="1c325e8456a200693c816baa27ceca9c5e5e0f36af63d98f70a335853a0039e8")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
depends_on("libxt")
@@ -29,7 +31,7 @@ class Twm(AutotoolsPackage, XorgPackage):
depends_on("libice")
depends_on("libsm")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/tycho2/package.py b/var/spack/repos/builtin/packages/tycho2/package.py
index 16c73d0654..50f99f7505 100644
--- a/var/spack/repos/builtin/packages/tycho2/package.py
+++ b/var/spack/repos/builtin/packages/tycho2/package.py
@@ -19,6 +19,8 @@ class Tycho2(MakefilePackage):
version("develop", branch="master")
+ depends_on("cxx", type="build") # generated
+
depends_on("mpi")
def patch(self):
diff --git a/var/spack/repos/builtin/packages/typhon/package.py b/var/spack/repos/builtin/packages/typhon/package.py
index 04f9f9300b..5470d6a2eb 100644
--- a/var/spack/repos/builtin/packages/typhon/package.py
+++ b/var/spack/repos/builtin/packages/typhon/package.py
@@ -24,6 +24,9 @@ class Typhon(CMakePackage):
version("3.0.1", sha256="8d6e19192e52eadf92175423ae0efd8a1a343c2ea2bc48aacb9028074447c2bb")
version("3.0", sha256="b9736269ebe9c0fd7efabc4716b0543144780ed26ddaf595083354113aa2efd7")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/typhonio/package.py b/var/spack/repos/builtin/packages/typhonio/package.py
index 0833a30a06..b0197f7d0b 100644
--- a/var/spack/repos/builtin/packages/typhonio/package.py
+++ b/var/spack/repos/builtin/packages/typhonio/package.py
@@ -19,6 +19,9 @@ class Typhonio(CMakePackage):
version("develop", branch="cmake_build")
version("1.6_CMake", sha256="c9b7b2a7f4fa0b786f6b69c6426b67f42efc4ea6871323139d52cd44f4d0ff7c")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/typst/package.py b/var/spack/repos/builtin/packages/typst/package.py
new file mode 100644
index 0000000000..b495b89482
--- /dev/null
+++ b/var/spack/repos/builtin/packages/typst/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2024 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 re
+
+from spack.package import *
+
+
+class Typst(CargoPackage):
+ """Typst is a new markup-based typesetting system for the sciences."""
+
+ homepage = "https://typst.app"
+ git = "https://github.com/typst/typst"
+ executables = ["^typst$"]
+
+ maintainers("upsj")
+
+ license("Apache-2.0", checked_by="upsj")
+
+ version("0.12.0", commit="737895d769188f6fc154523e67a9102bc24c872e", tag="v0.12.0")
+
+ depends_on("rust@1.81.0:")
+ depends_on("openssl")
+ depends_on("pkgconf", type="build")
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.search(r"typst ([0-9.]+)", output)
+ return match.group(1) if match else None
+
+ def build(self, spec, prefix):
+ # The cargopackage installer doesn't allow for an option to install from a subdir
+ # see: https://github.com/rust-lang/cargo/issues/7599
+ cargo("install", "--root", "out", "--path", "crates/typst-cli")
diff --git a/var/spack/repos/builtin/packages/ucc/package.py b/var/spack/repos/builtin/packages/ucc/package.py
index a77295aca5..c1427a62a3 100644
--- a/var/spack/repos/builtin/packages/ucc/package.py
+++ b/var/spack/repos/builtin/packages/ucc/package.py
@@ -5,7 +5,7 @@
from spack.package import *
-class Ucc(AutotoolsPackage, CudaPackage):
+class Ucc(AutotoolsPackage, CudaPackage, ROCmPackage):
"""UCC is a collective communication operations API and library that is
flexible, complete, and feature-rich for current and emerging programming
models and runtimes."""
@@ -15,12 +15,15 @@ class Ucc(AutotoolsPackage, CudaPackage):
maintainers("zzzoom")
+ version("1.3.0", sha256="b56379abe5f1c125bfa83be305d78d81a64aa271b7b5fff0ac17b86725ff3acf")
version("1.2.0", sha256="c1552797600835c0cf401b82dc89c4d27d5717f4fb805d41daca8e19f65e509d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("cuda", default=False, description="Enable CUDA TL")
variant("nccl", default=False, description="Enable NCCL TL", when="+cuda")
- # RCCL build not tested
- # variant("rccl", default=False, description="Enable RCCL TL")
+ variant("rccl", default=False, description="Enable RCCL TL", when="+rocm")
# https://github.com/openucx/ucc/pull/847
patch(
@@ -36,7 +39,7 @@ class Ucc(AutotoolsPackage, CudaPackage):
depends_on("ucx")
depends_on("nccl", when="+nccl")
- # depends_on("rccl", when="+rccl")
+ depends_on("rccl", when="+rccl")
with when("+nccl"):
for arch in CudaPackage.cuda_arch_values:
@@ -51,5 +54,26 @@ class Ucc(AutotoolsPackage, CudaPackage):
args = []
args.extend(self.with_or_without("cuda", activation_value="prefix"))
args.extend(self.with_or_without("nccl", activation_value="prefix"))
- # args.extend(self.with_or_without("rccl", activation_value="prefix"))
+ if self.spec.satisfies("+rocm"):
+ cppflags = " ".join(
+ "-I" + include_dir
+ for include_dir in (
+ self.spec["hip"].prefix.include,
+ self.spec["hip"].prefix.include.hip,
+ self.spec["hsa-rocr-dev"].prefix.include.hsa,
+ )
+ )
+ ldflags = " ".join(
+ "-L" + library_dir
+ for library_dir in (
+ self.spec["hip"].prefix.lib,
+ self.spec["hsa-rocr-dev"].prefix.lib,
+ )
+ )
+ args.extend(["CPPFLAGS=" + cppflags, "LDFLAGS=" + ldflags])
+ args.append("--with-rocm=" + self.spec["hip"].prefix)
+ args.append("--with-ucx=" + self.spec["ucx"].prefix)
+ args.extend(self.with_or_without("rccl", activation_value="prefix"))
+ else:
+ args.append("--without-rocm")
return args
diff --git a/var/spack/repos/builtin/packages/uchardet/package.py b/var/spack/repos/builtin/packages/uchardet/package.py
index 0af81372d9..3be62d1d0b 100644
--- a/var/spack/repos/builtin/packages/uchardet/package.py
+++ b/var/spack/repos/builtin/packages/uchardet/package.py
@@ -19,6 +19,7 @@ class Uchardet(CMakePackage):
license("MPL-1.1")
version("master", branch="master")
+ version("0.0.8", sha256="8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61")
version("0.0.7", sha256="8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61")
version("0.0.6", sha256="8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61")
version("0.0.5", sha256="7c5569c8ee1a129959347f5340655897e6a8f81ec3344de0012a243f868eabd1")
@@ -26,6 +27,9 @@ class Uchardet(CMakePackage):
version("0.0.3", sha256="8caba57524b6e306e764b4dabf5bfec48b6f9d89b73543ed7c95263890e2006f")
version("0.0.2", sha256="eb59b5b36269212a0d5f44d654cdbeb02e4e43ff59e3ce0205d6a64670991e83")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def url_for_version(self, version):
if version >= Version("0.0.6"):
url = "https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.6.tar.xz"
diff --git a/var/spack/repos/builtin/packages/ucsc-bedclip/package.py b/var/spack/repos/builtin/packages/ucsc-bedclip/package.py
index 5173346a71..f9b34ee28f 100644
--- a/var/spack/repos/builtin/packages/ucsc-bedclip/package.py
+++ b/var/spack/repos/builtin/packages/ucsc-bedclip/package.py
@@ -16,8 +16,11 @@ class UcscBedclip(Package):
version("377", sha256="932f149c19641064a9cd3f2382cbb54b45a9292b8444792872d531346925d676")
version("449", sha256="b5a86863d6cfe2120f6c796a13b1572ad05b22622f6534b95c9d26ccbede09b7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libpng")
- depends_on("libuuid")
+ depends_on("uuid")
depends_on("gmake")
depends_on("mysql-connector-c")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/ucsc-bedgraphtobigwig/package.py b/var/spack/repos/builtin/packages/ucsc-bedgraphtobigwig/package.py
index 1483336228..2d66fd771c 100644
--- a/var/spack/repos/builtin/packages/ucsc-bedgraphtobigwig/package.py
+++ b/var/spack/repos/builtin/packages/ucsc-bedgraphtobigwig/package.py
@@ -16,8 +16,11 @@ class UcscBedgraphtobigwig(Package):
version("449", sha256="b5a86863d6cfe2120f6c796a13b1572ad05b22622f6534b95c9d26ccbede09b7")
version("445", sha256="c7abb5db6a5e16a79aefcee849d2b59dbc71ee112ca1e41fea0afb25229cf56c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libpng")
- depends_on("libuuid")
+ depends_on("uuid")
depends_on("gmake")
depends_on("openssl")
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/ucx/package.py b/var/spack/repos/builtin/packages/ucx/package.py
index bddf46bb34..c61e097c4e 100644
--- a/var/spack/repos/builtin/packages/ucx/package.py
+++ b/var/spack/repos/builtin/packages/ucx/package.py
@@ -11,7 +11,7 @@ class Ucx(AutotoolsPackage, CudaPackage):
"""a communication library implementing high-performance messaging for
MPI/PGAS frameworks"""
- homepage = "http://www.openucx.org"
+ homepage = "https://www.openucx.org"
url = "https://github.com/openucx/ucx/releases/download/v1.3.1/ucx-1.3.1.tar.gz"
git = "https://github.com/openucx/ucx.git"
@@ -20,9 +20,12 @@ class Ucx(AutotoolsPackage, CudaPackage):
license("BSD-3-Clause")
# Current
- version("1.14.1", sha256="baa0634cafb269a3112f626eb226bcd2ca8c9fcf0fec3b8e2a3553baad5f77aa")
+ version("1.17.0", sha256="34658e282f99f89ce7a991c542e9727552734ac6ad408c52f22b4c2653b04276")
# Still supported
+ version("1.16.0", sha256="f73770d3b583c91aba5fb07557e655ead0786e057018bfe42f0ebe8716e9d28c")
+ version("1.15.0", sha256="4b202087076bc1c98f9249144f0c277a8ea88ad4ca6f404f94baa9cb3aebda6d")
+ version("1.14.1", sha256="baa0634cafb269a3112f626eb226bcd2ca8c9fcf0fec3b8e2a3553baad5f77aa")
version("1.14.0", sha256="9bd95e2059de5dece9dddd049aacfca3d21bfca025748a6a0b1be4486e28afdd")
version("1.13.1", sha256="efc37829b68e131d2acc82a3fd4334bfd611156a756837ffeb650ab9a9dd3828")
version("1.13.0", sha256="8a3881f21fe2788113789f5bae1c8174e931f7542de0a934322a96ef354e5e3d")
@@ -52,6 +55,9 @@ class Ucx(AutotoolsPackage, CudaPackage):
version("1.2.1", sha256="fc63760601c03ff60a2531ec3c6637e98f5b743576eb410f245839c84a0ad617")
version("1.2.0", sha256="1e1a62d6d0f89ce59e384b0b5b30b416b8fd8d7cedec4182a5319d0dfddf649c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
simd_values = ("avx", "sse41", "sse42")
variant("assertions", default=False, description="Enable assertions")
@@ -136,6 +142,7 @@ class Ucx(AutotoolsPackage, CudaPackage):
depends_on("rdma-core", when="+verbs")
depends_on("xpmem", when="+xpmem")
depends_on("hip", when="+rocm")
+ depends_on("hsa-rocr-dev", when="+rocm")
conflicts("+gdrcopy", when="~cuda", msg="gdrcopy currently requires cuda support")
conflicts("+rocm", when="+gdrcopy", msg="gdrcopy > 2.0 does not support rocm")
@@ -158,6 +165,9 @@ class Ucx(AutotoolsPackage, CudaPackage):
"-L$with_rocm/hip/lib -L$with_rocm/lib", "$ROCM_LDFLAGS", "configure", string=True
)
+ if self.spec.satisfies("@:1.15 ^hip@6:"):
+ filter_file("HIP_PLATFORM_HCC", "HIP_PLATFORM_AMD", "configure", string=True)
+
@when("@1.9-dev")
def autoreconf(self, spec, prefix):
Executable("./autogen.sh")()
diff --git a/var/spack/repos/builtin/packages/udunits/package.py b/var/spack/repos/builtin/packages/udunits/package.py
index e5f366a66b..559d5f11cb 100644
--- a/var/spack/repos/builtin/packages/udunits/package.py
+++ b/var/spack/repos/builtin/packages/udunits/package.py
@@ -36,6 +36,8 @@ class Udunits(AutotoolsPackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("expat")
variant("shared", default=True, description="Build shared library")
diff --git a/var/spack/repos/builtin/packages/ufo-core/package.py b/var/spack/repos/builtin/packages/ufo-core/package.py
index 3154723acf..703b7e8364 100644
--- a/var/spack/repos/builtin/packages/ufo-core/package.py
+++ b/var/spack/repos/builtin/packages/ufo-core/package.py
@@ -17,7 +17,10 @@ class UfoCore(CMakePackage):
license("LGPL-3.0-only")
+ version("0.16.0", sha256="ff895386e10920ec399b9951a231e517bd6cf5f70c3b527430c2c1fccff6f181")
version("0.14.0", sha256="3bf0d1924d6ae3f51673cc8b0b31b17873e79f1a0129a9af54b4062b1b2b3ad7")
+ depends_on("c", type="build") # generated
+
depends_on("glib")
depends_on("json-glib")
diff --git a/var/spack/repos/builtin/packages/ufo-filters/package.py b/var/spack/repos/builtin/packages/ufo-filters/package.py
index de57eec948..18d951bd80 100644
--- a/var/spack/repos/builtin/packages/ufo-filters/package.py
+++ b/var/spack/repos/builtin/packages/ufo-filters/package.py
@@ -16,4 +16,7 @@ class UfoFilters(CMakePackage):
version("0.14.1", sha256="084d7cdef59205e1a048e5c142be1ffeaacedc42965824b642e8302ef30ebb13")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("ufo-core")
diff --git a/var/spack/repos/builtin/packages/ufs-utils/package.py b/var/spack/repos/builtin/packages/ufs-utils/package.py
index 1333ef3f4c..2af09c08b5 100644
--- a/var/spack/repos/builtin/packages/ufs-utils/package.py
+++ b/var/spack/repos/builtin/packages/ufs-utils/package.py
@@ -49,6 +49,9 @@ class UfsUtils(CMakePackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("cmake@3.23:")
depends_on("bacio")
diff --git a/var/spack/repos/builtin/packages/ufs-weather-model/package.py b/var/spack/repos/builtin/packages/ufs-weather-model/package.py
index ff30c425f0..cc0fa715a8 100644
--- a/var/spack/repos/builtin/packages/ufs-weather-model/package.py
+++ b/var/spack/repos/builtin/packages/ufs-weather-model/package.py
@@ -17,8 +17,9 @@ class UfsWeatherModel(CMakePackage):
url = "https://github.com/ufs-community/ufs-weather-model/archive/refs/tags/ufs-v1.1.0.tar.gz"
git = "https://github.com/ufs-community/ufs-weather-model.git"
- maintainers("t-brown")
+ maintainers("AlexanderRichert-NOAA")
+ version("develop", branch="develop", submodules=True)
version(
"2.0.0",
tag="ufs-v2.0.0",
@@ -32,12 +33,48 @@ class UfsWeatherModel(CMakePackage):
submodules=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ variant("mpi", default=True, description="Enable MPI")
variant(
"32bit", default=True, description="Enable 32-bit single precision arithmetic in dycore"
)
- variant("avx2", default=False, description="Enable AVX2 instructions")
variant(
- "ccpp", default=True, description="Enable the Common Community Physics Package (CCPP))"
+ "ccpp_32bit",
+ default=False,
+ description="Enable CCPP_32BIT (single precision arithmetic in slow physics)",
+ )
+ variant("debug", default=False, description="Enable DEBUG mode", when="@develop")
+ variant(
+ "debug_linkmpi",
+ default=True,
+ description="Enable linkmpi option when DEBUG mode is on",
+ when="@develop",
+ )
+ variant("inline_post", default=False, description="Enable inline post")
+ variant("multi_gases", default=False, description="Enable multi gases in physics routines")
+ variant("moving_nest", default=False, description="Enable moving nest code", when="@develop")
+ variant("openmp", default=True, description="Enable OpenMP")
+ variant("pdlib", default=False, description="Enable PDLIB (WW3)", when="@develop")
+ variant("parallel_netcdf", default=True, description="Enable parallel NetCDF")
+ variant(
+ "jedi_driver",
+ default=False,
+ description="Enable JEDI as top level driver",
+ when="@develop",
+ )
+ variant(
+ "cmeps_aoflux",
+ default=False,
+ description="Enable atmosphere-ocean flux calculation in mediator",
+ when="@develop",
+ )
+ variant(
+ "ccpp",
+ default=True,
+ description="Enable the Common Community Physics Package (CCPP)",
+ when="@:2.0.0",
)
variant(
"ccpp_suites",
@@ -45,37 +82,96 @@ class UfsWeatherModel(CMakePackage):
description="CCPP suites to compile",
values=("FV3_GFS_v15p2", "FV3_RRFS_v1alpha", "FV3_GFS_v15p2,FV3_RRFS_v1alpha"),
multi=True,
+ when="@:2.0.0",
+ )
+ dev_ccpp_default = [
+ "FV3_GFS_v16",
+ "FV3_GFS_v16_flake",
+ "FV3_GFS_v17_p8",
+ "FV3_GFS_v17_p8_rrtmgp",
+ "FV3_GFS_v15_thompson_mynn_lam3km",
+ "FV3_WoFS_v0",
+ "FV3_GFS_v17_p8_mynn",
+ "FV3_GFS_v17_p8_ugwpv1",
+ ]
+ variant(
+ "ccpp_suites",
+ default=",".join(dev_ccpp_default),
+ description="CCPP suites to compile",
+ multi=True,
+ when="@develop",
)
- variant("inline_post", default=False, description="Compile post processing inline")
- variant("multi_gases", default=False, description="Enable multi gases in physics routines")
- variant("openmp", default=True, description="Enable OpenMP")
- variant("parallel_netcdf", default=True, description="Enable parallel I/O in netCDF")
variant(
"quad_precision",
default=False,
description="Enable quad precision for certain grid metric terms in dycore",
+ when="@:2.0.0",
)
- variant(
- "simdmultiarch", default=False, description="Enable multi-target SIMD instruction sets"
- )
+ variant("mom6solo", default=False, description="Build MOM6 solo executable", when="@develop")
+
+ variant("app", default="ATM", description="UFS application", when="@develop")
depends_on("bacio")
- depends_on("esmf@:8.0.0")
- depends_on("mpi")
- depends_on("nemsio")
+ depends_on("mpi", when="+mpi")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("sp")
depends_on("w3emc")
- depends_on("w3nco")
- depends_on("python", type="build")
+ depends_on("esmf@:8.0.0", when="@:2.0.0")
+ depends_on("nemsio", when="@:2.0.0")
+ depends_on("w3nco", when="@:2.0.0")
+ depends_on("bacio@2.4.0:", when="@develop")
+ depends_on("crtm", when="@develop")
+ depends_on("esmf@8.3.0:", when="@develop")
+ depends_on("fms@2022.04: +deprecated_io precision=32,64 constants=GFS", when="@develop")
+ depends_on("g2", when="@develop")
+ depends_on("g2tmpl", when="@develop")
+ depends_on("hdf5+hl+mpi", when="@develop")
+ depends_on("ip@:4", when="@develop")
+ depends_on("netcdf-c~parallel-netcdf+mpi", when="@develop")
+ for app in [
+ "ATMW",
+ "ATML",
+ "NG-GODAS",
+ "S2S",
+ "S2SA",
+ "S2SW",
+ "S2SWA",
+ "S2SWAL",
+ "HAFS",
+ "HAFSW",
+ "HAFS-ALL",
+ "LND",
+ ]:
+ depends_on("parallelio@2.5.3: +fortran~pnetcdf~shared", when="@develop app=%s" % app)
+ depends_on("python@3.6:", type="build", when="@develop")
+ depends_on("sp@2.3.3:", when="@develop")
+ depends_on("w3emc@2.9.2:", when="@develop")
+
+ with when("@develop app=S2SA"):
+ depends_on("mapl")
+ depends_on("gftl-shared")
+ with when("@develop app=S2SWA"):
+ depends_on("mapl")
+ depends_on("gftl-shared")
+ with when("@develop app=ATMAERO"):
+ depends_on("mapl")
+ depends_on("gftl-shared")
+ depends_on("scotch", when="+pdlib")
+
+ depends_on("w3nco", when="@:2.0.0")
+ depends_on("python", type="build", when="@:2.0.0")
+
+ conflicts("%gcc@:8", when="@develop")
def setup_build_environment(self, env):
spec = self.spec
+ env.set("CC", spec["mpi"].mpicc)
+ env.set("CXX", spec["mpi"].mpicxx)
+ env.set("FC", spec["mpi"].mpifc)
env.set("CMAKE_C_COMPILER", spec["mpi"].mpicc)
env.set("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx)
env.set("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)
- env.set("ESMFMKFILE", join_path(spec["esmf"].prefix.lib, "esmf.mk"))
env.set("CCPP_SUITES", ",".join([x for x in spec.variants["ccpp_suites"].value if x]))
@@ -91,25 +187,50 @@ class UfsWeatherModel(CMakePackage):
raise InstallError(msg.format(spec.platform, self.compiler.name))
def cmake_args(self):
- from_variant = self.define_from_variant
args = [
- from_variant("32BIT", "32bit"),
- from_variant("AVX2", "avx2"),
- from_variant("CCPP", "ccpp"),
- from_variant("INLINE_POST", "inline_post"),
- from_variant("MULTI_GASES", "multi_gases"),
- from_variant("OPENMP", "openmp"),
- from_variant("PARALLEL_NETCDF", "parallel_netcdf"),
- from_variant("QUAD_PRECISION", "quad_precision"),
- from_variant("SIMDMULTIARCH", "simdmultiarch"),
+ self.define("AVX2", False), # use target settings from Spack
+ self.define("SIMDMULTIARCH", False), # use target settings from Spack
+ self.define_from_variant("CCPP_SUITES", "ccpp_suites").replace(";", ","),
+ ]
+ variants = [
+ "32bit",
+ "app",
+ "ccpp_32bit",
+ "cmeps_aoflux",
+ "debug",
+ "debug_linkmpi",
+ "inline_post",
+ "jedi_driver",
+ "moving_nest",
+ "mpi",
+ "multi_gases",
+ "openmp",
+ "parallel_netcdf",
+ "pdlib",
]
+ for variant in variants:
+ args.append(self.define_from_variant(variant.upper(), variant))
+
+ if self.spec.satisfies("@:2.0.0"):
+ args.append(self.define_from_variant("CCPP", "ccpp"))
+ args.append(self.define_from_variant("QUAD_PRECISION", "quad_precision"))
return args
+ # This patch can be removed once https://github.com/NOAA-EMC/WW3/issues/1021
+ # is resolved.
+ @when("+pdlib ^scotch+shared")
+ def patch(self):
+ filter_file(r"(lib[^ ]+)\.a", r"\1.so", "WW3/cmake/FindSCOTCH.cmake")
+ filter_file("STATIC", "SHARED", "WW3/cmake/FindSCOTCH.cmake")
+
@run_after("install")
def install_additional_files(self):
mkdirp(prefix.bin)
- ufs_src = join_path(self.build_directory, "NEMS.exe")
+ if self.spec.satisfies("@develop"):
+ ufs_src = join_path(self.build_directory, "ufs_model")
+ else:
+ ufs_src = join_path(self.build_directory, "NEMS.exe")
ufs_dst = join_path(prefix.bin, "ufs_weather_model")
install(ufs_src, ufs_dst)
set_executable(ufs_dst)
diff --git a/var/spack/repos/builtin/packages/uftrace/package.py b/var/spack/repos/builtin/packages/uftrace/package.py
index ef411830d1..bf478b5455 100644
--- a/var/spack/repos/builtin/packages/uftrace/package.py
+++ b/var/spack/repos/builtin/packages/uftrace/package.py
@@ -13,7 +13,7 @@ class Uftrace(AutotoolsPackage):
"""Dynamic function graph tracer for Linux which demangles C, C++ and Rust calls"""
homepage = "https://uftrace.github.io/slide/"
- url = "https://github.com/namhyung/uftrace/archive/v0.11.tar.gz"
+ url = "https://github.com/namhyung/uftrace/archive/v0.16.tar.gz"
git = "https://github.com/namhyung/uftrace.git"
executables = ["^uftrace$"]
maintainers("bernhardkaindl")
@@ -23,8 +23,10 @@ class Uftrace(AutotoolsPackage):
# The build process uses 'git describe --tags' to get the package version
version("master", branch="master", get_full_repo=True)
- version("0.11", sha256="101dbb13cb3320ee76525ec26426f2aa1de4e3ee5af74f79cb403ae4d2c6c871")
- version("0.10", sha256="b8b56d540ea95c3eafe56440d6a998e0a140d53ca2584916b6ca82702795bbd9")
+ version("0.16", sha256="dd0549f610d186b6f25fa2334a5e82b6ddc232ec6ca088dbb41b3fe66961d6bb")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build") # full demangler support with libstdc++
variant("doc", default=False, description="Build uftrace's documentation")
variant("python2", default=False, description="Build uftrace with python2 support")
variant("python3", default=True, description="Build uftrace with python3 support")
@@ -35,16 +37,12 @@ class Uftrace(AutotoolsPackage):
depends_on("lsof", type="test")
depends_on("pkgconfig", type="build")
depends_on("libunwind")
+ depends_on("libtraceevent")
depends_on("ncurses")
depends_on("python@2.7:", when="+python2")
depends_on("python@3.5:", when="+python3")
depends_on("lua-luajit")
- # Fix the version string if building below another git repo. Submitted upstream:
- @when("@:0.11")
- def patch(self):
- filter_file("shell git", "shell test -e .git && git", "Makefile")
-
def check(self):
make("test", *["V=1", "-j{0}".format(max(int(make_jobs), 20))])
# In certain cases, tests using TCP/IP can hang. Ensure that spack can continue:
@@ -56,26 +54,23 @@ class Uftrace(AutotoolsPackage):
def installcheck(self):
pass
- def test(self):
+ def test_uftrace(self):
"""Perform stand-alone/smoke tests using the installed package."""
- uftrace = self.prefix.bin.uftrace
- self.run_test(
- uftrace,
- ["-A", ".", "-R", ".", "-P", "main", uftrace, "-V"],
- [
- r"dwarf",
- r"luajit",
- r"tui",
- r"sched",
- r"dynamic",
- r"main\(2, ",
- r" getopt_long\(2, ",
- r" .*printf.*\(",
- r"} = 0; /\* main \*/",
- ],
- installed=True,
- purpose="test: testing the installation",
- )
+ uftrace = which(self.prefix.bin.uftrace)
+ options = (["-A", ".", "-R", ".", "-P", "main", uftrace, "-V"],)
+ expected = [
+ r"dwarf",
+ r"luajit",
+ r"tui",
+ r"sched",
+ r"dynamic",
+ r"main\(2, ",
+ r" getopt_long\(2, ",
+ r" .*printf.*\(",
+ r"} = 0; /\* main \*/",
+ ]
+ out = uftrace(*options, output=str.split, error=str.split)
+ check_outputs(expected, out)
@classmethod
def determine_version(cls, exe):
diff --git a/var/spack/repos/builtin/packages/umap/package.py b/var/spack/repos/builtin/packages/umap/package.py
index 57cbcb3202..9f45d9c8a9 100644
--- a/var/spack/repos/builtin/packages/umap/package.py
+++ b/var/spack/repos/builtin/packages/umap/package.py
@@ -20,6 +20,7 @@ class Umap(CMakePackage):
license("LGPL-2.1-or-later")
version("develop", branch="develop")
+ version("2.1.1", sha256="6257e1ffd667a7d14e2061671328ccf7ecda27bc98fafb10f45502f967b1a115")
version("2.1.0", sha256="dfdc5b717aecdbfbb0da22e8567b9f2ffbc3607000a31122bf7c5ab3b85cecd9")
version("2.0.0", sha256="85c4bc68e8790393847a84eb54eaf6fc321acade382a399a2679d541b0e34150")
version("1.0.0", sha256="c746de3fae5bfc5bbf36234d5e888ea45eeba374c26cd8b5a817d0c08e454ed5")
@@ -28,6 +29,9 @@ class Umap(CMakePackage):
version("0.0.2", sha256="eccc987b414bc568bd33b569ab6e18c328409499f11e65ac5cd5c3e1a8b47509")
version("0.0.1", sha256="49020adf55aa3f8f03757373b21ff229d2e8cf4155d54835019cd4745c1291ef")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("logging", default=False, description="Build with logging enabled.")
variant("tests", default=False, description="Build test programs.")
diff --git a/var/spack/repos/builtin/packages/umesimd/package.py b/var/spack/repos/builtin/packages/umesimd/package.py
index 3a9286864b..5d2d329d73 100644
--- a/var/spack/repos/builtin/packages/umesimd/package.py
+++ b/var/spack/repos/builtin/packages/umesimd/package.py
@@ -23,3 +23,5 @@ class Umesimd(CMakePackage):
version("0.4.1", sha256="e05b9f886164826005c8db5d2240f22cb88593c05b4fe45c81aba4d1d57a9bfa")
version("0.3.2", sha256="90399fa64489ca4d492a57a49582f5b827d4710a691f533822fd61edc346e8f6")
version("0.3.1", sha256="9bab8b4c70e11dbdd864a09053225c74cfabb801739e09a314ddeb1d84a43f0a")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/umoci/package.py b/var/spack/repos/builtin/packages/umoci/package.py
index 562dfbf53d..6695b7d31d 100644
--- a/var/spack/repos/builtin/packages/umoci/package.py
+++ b/var/spack/repos/builtin/packages/umoci/package.py
@@ -12,10 +12,11 @@ class Umoci(MakefilePackage):
complete manipulation tool for OCI images."""
homepage = "https://umo.ci/"
- url = "https://github.com/openSUSE/umoci/archive/v0.4.4.tar.gz"
+ url = "https://github.com/opencontainers/umoci/archive/v0.4.4.tar.gz"
- license("Apache-2.0")
+ license("Apache-2.0", checked_by="wdconinc")
+ version("0.4.7", sha256="c01b36de6fdc513eb65add57bc882d72f94fc3b4b65a8f9ef59826fb754af93e")
version("0.4.4", sha256="bc5c53812e0076d026aa275b197b878857cf7ba7a4f048fd13433de6107b9aed")
version("0.4.3", sha256="b7d537fec84d4327b1bbfe27118f69df5591143a74a7a1b66cc9904d85c30226")
version("0.4.2", sha256="fbc397dd39bda2570155dc3b1be0835809a36fccc342e2545b3edb9f0f9dc6f5")
@@ -27,7 +28,7 @@ class Umoci(MakefilePackage):
def build(self, spec, prefix):
provider = "github.com"
- project = "openSUSE"
+ project = "opencontainers"
repo = "umoci"
mkdirp(join_path(self.stage.source_path, "src", provider, project))
diff --git a/var/spack/repos/builtin/packages/umpire/dual_blt_import_umpire_2022.10_2023.06.patch b/var/spack/repos/builtin/packages/umpire/dual_blt_import_umpire_2022.10_2023.06.patch
new file mode 100644
index 0000000000..c8edc8012d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/umpire/dual_blt_import_umpire_2022.10_2023.06.patch
@@ -0,0 +1,106 @@
+diff --git a/cmake/SetupUmpireThirdParty.cmake b/cmake/SetupUmpireThirdParty.cmake
+index fc351369..6e82ab6e 100644
+--- a/cmake/SetupUmpireThirdParty.cmake
++++ b/cmake/SetupUmpireThirdParty.cmake
+@@ -80,29 +80,40 @@ if (UMPIRE_ENABLE_SQLITE_EXPERIMENTAL)
+ find_package(SQLite3 REQUIRED)
+ endif()
+
+-set(UMPIRE_NEEDS_BLT_TPLS False)
+-if (UMPIRE_ENABLE_MPI OR UMPIRE_ENABLE_HIP OR UMPIRE_ENABLE_OPENMP OR UMPIRE_ENABLE_CUDA)
+- set(UMPIRE_NEEDS_BLT_TPLS True)
+-
+- if (NOT BLT_EXPORTED)
+- set(BLT_EXPORTED On CACHE BOOL "" FORCE)
+- blt_import_library(NAME blt_stub EXPORTABLE On)
+- set_target_properties(blt_stub PROPERTIES EXPORT_NAME blt::blt_stub)
+- install(TARGETS blt_stub
+- EXPORT bltTargets)
+- blt_export_tpl_targets(EXPORT bltTargets NAMESPACE blt)
+- install(EXPORT bltTargets
+- DESTINATION lib/cmake/umpire)
+- elseif (UMPIRE_ENABLE_MPI)
++
++#################################################
++# use bonafide cmake targets for openmp and mpi
++#################################################
++set(umpire_mpi_deps "")
++if (UMPIRE_ENABLE_MPI)
++ if(ENABLE_FIND_MPI)
++ set (umpire_mpi_deps MPI::MPI_CXX)
++ endif()
++endif()
++
++set(umpire_openmp_deps "")
++if (UMPIRE_ENABLE_OPENMP)
++ set (umpire_openmp_deps OpenMP::OpenMP_CXX)
++endif ()
++
++#################################################
++# export necessary blt targets
++#################################################
++
++set(UMPIRE_BLT_TPL_DEPS_EXPORTS)
++
++blt_list_append(TO UMPIRE_BLT_TPL_DEPS_EXPORTS ELEMENTS cuda cuda_runtime IF UMPIRE_ENABLE_CUDA)
++blt_list_append(TO UMPIRE_BLT_TPL_DEPS_EXPORTS ELEMENTS blt_hip blt_hip_runtime IF UMPIRE_ENABLE_HIP)
++
++foreach(dep ${UMPIRE_BLT_TPL_DEPS_EXPORTS})
+ # If the target is EXPORTABLE, add it to the export set
+- get_target_property(_is_imported mpi IMPORTED)
++ get_target_property(_is_imported ${dep} IMPORTED)
+ if(NOT ${_is_imported})
+- install(TARGETS mpi
+- EXPORT ${arg_EXPORT})
+- # Namespace target to avoid conflicts
+- set_target_properties(mpi PROPERTIES EXPORT_NAME blt::mpi)
+- install(EXPORT bltTargets
+- DESTINATION lib/cmake/umpire)
++ install(TARGETS ${dep}
++ EXPORT umpire-targets
++ DESTINATION lib/cmake/umpire)
++ # Namespace target to avoid conflicts
++ set_target_properties(${dep} PROPERTIES EXPORT_NAME umpire::blt_tpl_exports_${dep})
+ endif()
+- endif()
+-endif()
++endforeach()
++
+diff --git a/src/umpire/interface/c_fortran/CMakeLists.txt b/src/umpire/interface/c_fortran/CMakeLists.txt
+index ab675adf..22e4dc90 100644
+--- a/src/umpire/interface/c_fortran/CMakeLists.txt
++++ b/src/umpire/interface/c_fortran/CMakeLists.txt
+@@ -43,7 +43,7 @@ set_source_files_properties(
+ set(umpire_interface_c_fortran_depends camp umpire_util)
+ blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS cuda_runtime IF UMPIRE_ENABLE_CUDA )
+-blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS blt::hip_runtime IF UMPIRE_ENABLE_HIP )
+-blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS mpi IF UMPIRE_ENABLE_MPI )
++blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS blt_hip_runtime IF UMPIRE_ENABLE_HIP )
++blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS ${umpire_mpi_deps} IF UMPIRE_ENABLE_MPI )
+
+ blt_add_library(
+ NAME umpire_interface
+diff --git a/src/umpire/util/CMakeLists.txt b/src/umpire/util/CMakeLists.txt
+index 551f8188..02eb13e4 100644
+--- a/src/umpire/util/CMakeLists.txt
++++ b/src/umpire/util/CMakeLists.txt
+@@ -73,14 +73,15 @@ endif()
+
+ if (UMPIRE_ENABLE_MPI)
+ set (umpire_util_depends
+- ${umpire_util_depends}
+- mpi)
++ ${umpire_util_depends}
++ ${umpire_mpi_deps}
++ )
+ endif ()
+
+ if (UMPIRE_ENABLE_OPENMP_TARGET)
+ set (umpire_util_depends
+- ${umpire_util_depends}
+- openmp)
++ ${umpire_util_depends}
++ ${umpire_openmp_deps})
+ endif ()
+
+ if (UMPIRE_ENABLE_HIP)
diff --git a/var/spack/repos/builtin/packages/umpire/export_includes.patch b/var/spack/repos/builtin/packages/umpire/export_includes.patch
new file mode 100644
index 0000000000..c5a56518ff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/umpire/export_includes.patch
@@ -0,0 +1,130 @@
+diff --git a/src/tpl/CMakeLists.txt b/src/tpl/CMakeLists.txt
+index 6803f0a4..60269f88 100644
+--- a/src/tpl/CMakeLists.txt
++++ b/src/tpl/CMakeLists.txt
+@@ -50,7 +50,13 @@ target_include_directories(
+ umpire_tpl_json
+ INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
+- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
++ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
++
++blt_convert_to_system_includes(TARGET umpire_tpl_json)
++
++target_include_directories(
++ umpire_tpl_json
++ INTERFACE
+ $<INSTALL_INTERFACE:include>)
+
+ install(FILES
+@@ -64,8 +70,6 @@ install(TARGETS
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+-blt_patch_target(NAME umpire_tpl_json
+- TREAT_INCLUDES_AS_SYSTEM ON)
+
+ #
+ # CLI11 Option Parsing Headers
+@@ -82,7 +86,13 @@ target_include_directories(
+ umpire_tpl_CLI11
+ INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
+- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
++ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
++
++blt_convert_to_system_includes(TARGET umpire_tpl_CLI11)
++
++target_include_directories(
++ umpire_tpl_CLI11
++ INTERFACE
+ $<INSTALL_INTERFACE:include>)
+
+ install(FILES
+@@ -96,9 +106,6 @@ install(TARGETS
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+-blt_patch_target(NAME umpire_tpl_CLI11
+- TREAT_INCLUDES_AS_SYSTEM ON)
+-
+ add_subdirectory(umpire/judy)
+
+ if (NOT TARGET camp)
+@@ -153,7 +160,14 @@ target_include_directories(
+ umpire_tpl_fmt
+ INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
+- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
++ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
++
++# Avoid warnings from fmt (so we can still use -Werror)
++blt_convert_to_system_includes(TARGET umpire_tpl_fmt)
++
++target_include_directories(
++ umpire_tpl_fmt
++ INTERFACE
+ $<INSTALL_INTERFACE:include>)
+
+ if (C_COMPILER_FAMILY_IS_XL)
+@@ -168,21 +182,17 @@ if (C_COMPILER_FAMILY_IS_PGI)
+ set(_fmt_warning_disable_flag
+ "--diag_suppress 1625;--diag_suppress 185;--diag_suppress 811;--diag_suppress 186")
+
+- if (ENABLE_FORTRAN)
++ if (ENABLE_FORTRAN)
+ target_compile_options(umpire_tpl_fmt
+ INTERFACE
+ $<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:${_fmt_warning_disable_flag}>)
+- else ()
+- target_compile_options(umpire_tpl_fmt
+- INTERFACE
+- ${_fmt_warning_disable_flag})
+- endif ()
++ else ()
++ target_compile_options(umpire_tpl_fmt
++ INTERFACE
++ ${_fmt_warning_disable_flag})
++ endif ()
+ endif ()
+
+-# Avoid warnings from fmt (so we can still use -Werror)
+-blt_patch_target(NAME umpire_tpl_fmt
+- TREAT_INCLUDES_AS_SYSTEM ON)
+-
+ if (C_COMPILER_FAMILY_IS_GNU)
+ target_compile_options(umpire_tpl_fmt
+ INTERFACE
+diff --git a/src/umpire/interface/c_fortran/CMakeLists.txt b/src/umpire/interface/c_fortran/CMakeLists.txt
+index cf0d6932..ab675adf 100644
+--- a/src/umpire/interface/c_fortran/CMakeLists.txt
++++ b/src/umpire/interface/c_fortran/CMakeLists.txt
+@@ -57,15 +57,22 @@ target_include_directories(
+ PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
+- $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${CMAKE_Fortran_MODULE_DIRECTORY}>>
+- $<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:include/umpire>> # for Fortran module files
+ $<INSTALL_INTERFACE:include>)
+
+ install(FILES
+ ${umpire_interface_c_fortran_headers}
+ DESTINATION include/umpire/interface/c_fortran)
+
+-install(DIRECTORY
+- ${CMAKE_Fortran_MODULE_DIRECTORY}/
+- DESTINATION include/umpire
+- FILES_MATCHING PATTERN "*.mod")
++if(UMPIRE_ENABLE_FORTRAN)
++ target_include_directories(
++ umpire_interface
++ PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
++ $<INSTALL_INTERFACE:include/umpire>)
++
++ install(DIRECTORY
++ ${CMAKE_Fortran_MODULE_DIRECTORY}/
++ DESTINATION include/umpire
++ FILES_MATCHING PATTERN "*.mod")
++endif()
++
diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py
index 7a976ccdf1..bf04b347b9 100644
--- a/var/spack/repos/builtin/packages/umpire/package.py
+++ b/var/spack/repos/builtin/packages/umpire/package.py
@@ -6,10 +6,9 @@
import os
import socket
-import llnl.util.tty as tty
-
from spack.package import *
-from spack.pkg.builtin.camp import hip_repair_cache
+
+from .blt import llnl_link_helpers
class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
@@ -20,12 +19,35 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/Umpire.git"
tags = ["radiuss", "e4s"]
- maintainers("davidbeckingsale")
+ maintainers("davidbeckingsale", "adrienbernede")
license("MIT")
version("develop", branch="develop", submodules=False)
- version("main", branch="main", submodules=False)
+ version(
+ "2024.07.0",
+ tag="v2024.07.0",
+ commit="abd729f40064175e999a83d11d6b073dac4c01d2",
+ submodules=False,
+ )
+ version(
+ "2024.02.1",
+ tag="v2024.02.1",
+ commit="3058d562fc707650e904f9321b1ee9bcebad3ae2",
+ submodules=False,
+ )
+ version(
+ "2024.02.0",
+ tag="v2024.02.0",
+ commit="1db3fef913a70d8882ca510a4830c77c388873e0",
+ submodules=False,
+ )
+ version(
+ "2023.06.0",
+ tag="v2023.06.0",
+ commit="1e5ef604de88e81bb3b6fc4a5d914be833529da5",
+ submodules=False,
+ )
version(
"2022.10.0",
tag="v2022.10.0",
@@ -126,6 +148,15 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
"0.1.3", tag="v0.1.3", commit="cc347edeb17f5f30f694aa47f395d17369a2e449", submodules=True
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
+ # Some projects importing both camp and umpire targets end up with conflicts in BLT targets
+ # import. This is not addressing the root cause, which will be addressed in BLT@5.4.0 and will
+ # require adapting umpire build system.
+ patch("dual_blt_import_umpire_2022.10_2023.06.patch", when="@2022.10.0:2023.06.0")
+ patch("export_includes.patch", when="@2022.10.0")
patch("std-filesystem-pr784.patch", when="@2022.03.1 +rocm ^blt@0.5.2:")
patch("camp_target_umpire_3.0.0.patch", when="@3.0.0")
patch("cmake_version_check.patch", when="@4.1")
@@ -140,15 +171,15 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
# https://github.com/LLNL/Umpire/pull/805
patch(
- "https://github.com/LLNL/Umpire/pull/805/commits/47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25.patch?full_index=1",
- sha256="7ed5d2c315a3b31e339f664f6108e32d7cb4cb8e9f22e5c78a65ba02625ccc09",
+ "https://github.com/LLNL/Umpire/commit/47ff0aa1f7a01a917c3b7ac618e8a9e44a10fd25.patch?full_index=1",
+ sha256="802f074a05e1cb1f428e13d99c5fcb1435f86bd8f36a1ea2f7b6756e6625e0a0",
when="@2022.10.0",
)
# https://github.com/LLNL/Umpire/pull/816
patch(
- "https://github.com/LLNL/Umpire/pull/816/commits/2292d1d6078f6d9523b7ad0886ffa053644569d5.patch?full_index=1",
- sha256="0f43cad7cdaec3c225ab6414ab9f81bd405a1157abf5a508e515bcb6ca53326d",
+ "https://github.com/LLNL/Umpire/commit/2292d1d6078f6d9523b7ad0886ffa053644569d5.patch?full_index=1",
+ sha256="170dbcadb9ae36c7e211119c17a812695f11f4fe1be290b750f7af4fb4896192",
when="@2022.10.0",
)
@@ -161,11 +192,19 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
variant("fortran", default=False, description="Build C/Fortran API")
variant("c", default=True, description="Build C API")
+ variant("mpi", default=False, description="Enable MPI support")
+ variant("ipc_shmem", default=False, description="Enable POSIX shared memory")
+ variant(
+ "sqlite_experimental",
+ default=False,
+ description="Enable sqlite integration with umpire events (Experimental)",
+ )
variant("numa", default=False, description="Enable NUMA support")
variant("shared", default=True, description="Enable Shared libs")
variant("openmp", default=False, description="Build with OpenMP support")
+ variant("omptarget", default=False, description="Build with OpenMP 4.5 support")
variant("deviceconst", default=False, description="Enables support for constant device memory")
- variant("examples", default=True, description="Build Umpire Examples")
+ variant("examples", default=False, description="Build Umpire Examples")
variant(
"tests",
default="none",
@@ -173,27 +212,54 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
multi=False,
description="Tests to run",
)
- variant("device_alloc", default=True, description="Build Umpire Device Allocator")
-
- depends_on("cmake@3.8:", type="build")
- depends_on("cmake@3.9:", when="+cuda", type="build")
+ variant("tools", default=False, description="Enable tools")
+ variant("backtrace", default=False, description="Enable backtrace tools")
+ variant("dev_benchmarks", default=False, description="Enable developer benchmarks")
+ variant("device_alloc", default=False, description="Enable DeviceAllocator")
+ variant("werror", default=False, description="Enable warnings as errors")
+ variant("asan", default=False, description="Enable ASAN")
+ variant("sanitizer_tests", default=False, description="Enable address sanitizer tests")
+ variant("fmt_header_only", default=True, description="Link to header-only fmt target")
+
+ depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
+ depends_on("cmake@3.23:", when="@2022.10.0: +rocm", type="build")
+ depends_on("cmake@3.20:", when="@2022.10.0:2024.02.1", type="build")
+ depends_on("cmake@:3.20", when="@2022.03.0:2022.03 +rocm", type="build")
depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
+ depends_on("cmake@3.9:", when="+cuda", type="build")
+ depends_on("cmake@3.8:", type="build")
- depends_on("blt@0.5.2:", type="build", when="@2022.10.0:")
- depends_on("blt@0.5.0:", type="build", when="@2022.03.0:")
+ depends_on("blt", type="build")
+ depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
+ depends_on("blt@0.6.1", type="build", when="@2024.02.0")
+ depends_on("blt@0.5.3", type="build", when="@2023.06.0")
+ depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.0")
+ depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:2022.03.1")
depends_on("blt@0.4.1", type="build", when="@6.0.0")
- depends_on("blt@0.4.0:", type="build", when="@4.1.3:5.0.1")
- depends_on("blt@0.3.6:", type="build", when="@:4.1.2")
+ depends_on("blt@0.4.0:0.4.1", type="build", when="@4.1.3:5.0.1")
+ depends_on("blt@0.3.6:0.4.1", type="build", when="@:4.1.2")
conflicts("^blt@:0.3.6", when="+rocm")
- depends_on("camp", when="@5.0.0:")
- depends_on("camp@0.2.2:0.2.3", when="@6.0.0")
- depends_on("camp@0.1.0", when="@5.0.0:5.0.1")
- depends_on("camp@2022.03.2:", when="@2022.03.0:")
- depends_on("camp@main", when="@main")
- depends_on("camp@main", when="@develop")
+ depends_on("camp")
depends_on("camp+openmp", when="+openmp")
depends_on("camp~cuda", when="~cuda")
+ depends_on("camp~rocm", when="~rocm")
+ depends_on("camp@main", when="@develop")
+ depends_on("camp@2024.07.0:", when="@2024.07.0:")
+ depends_on("camp@2024.02.1", when="@2024.02.1")
+ depends_on("camp@2024.02.0", when="@2024.02.0")
+ depends_on("camp@2023.06.0", when="@2023.06.0")
+ depends_on("camp@2022.10.0:2023.06.0", when="@2022.10.0")
+ depends_on("camp@2022.03.2:2023.06.0", when="@2022.03.0:2022.03.1")
+ depends_on("camp@0.2.2:0.2.3", when="@6.0.0")
+ depends_on("camp@0.1.0", when="@5.0.0:5.0.1")
+
+ depends_on("sqlite", when="+sqlite_experimental")
+ depends_on("mpi", when="+mpi")
+
+ depends_on("fmt@9.1:", when="@2024.02.0:")
+ # For some reason, we need c++ 17 explicitly only with intel
+ depends_on("fmt@9.1: cxxstd=17", when="@2024.02.0: %intel@19.1")
with when("@5.0.0:"):
with when("+cuda"):
@@ -211,7 +277,24 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
conflicts("+numa", when="@:0.3.2")
conflicts("~c", when="+fortran", msg="Fortran API requires C API")
+
+ # device allocator must be used with more current umpire versions, rocm 5.4.0 and greater,
+ # and with either rocm or cuda enabled
conflicts("+device_alloc", when="@:2022.03.0")
+ conflicts("+device_alloc", when="^hip@:5.3.99")
+ conflicts("+device_alloc", when="~rocm~cuda")
+
+ conflicts("+deviceconst", when="~rocm~cuda")
+ conflicts("~openmp", when="+omptarget", msg="OpenMP target requires OpenMP")
+ conflicts("+cuda", when="+rocm")
+ conflicts("+tools", when="+rocm")
+ conflicts(
+ "+rocm", when="+omptarget", msg="Cant support both rocm and openmp device backends at once"
+ )
+ conflicts("+ipc_shmem", when="@:5.0.1")
+
+ conflicts("+sqlite_experimental", when="@:6.0.0")
+ conflicts("+sanitizer_tests", when="~asan")
# device allocator exports device code, which requires static libs
# currently only available for cuda.
@@ -228,15 +311,18 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
hostname = socket.gethostname()
if "SYS_TYPE" in env:
hostname = hostname.rstrip("1234567890")
- return "{0}-{1}-{2}@{3}.cmake".format(
+ return "{0}-{1}-{2}@{3}-{4}.cmake".format(
hostname,
self._get_sys_type(self.spec),
self.spec.compiler.name,
self.spec.compiler.version,
+ self.spec.dag_hash(8),
)
def initconfig_compiler_entries(self):
spec = self.spec
+ compiler = self.compiler
+ # Default entries are already defined in CachedCMakePackage, inherit them:
entries = super().initconfig_compiler_entries()
if "+rocm" in spec:
@@ -244,12 +330,16 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
- if "+fortran" in spec and self.compiler.fc is not None:
+ if spec.satisfies("+fortran") and compiler.fc is not None:
entries.append(cmake_cache_option("ENABLE_FORTRAN", True))
else:
entries.append(cmake_cache_option("ENABLE_FORTRAN", False))
- entries.append(cmake_cache_option("{}ENABLE_C".format(option_prefix), "+c" in spec))
+ entries.append(
+ cmake_cache_option("{}ENABLE_C".format(option_prefix), spec.satisfies("+c"))
+ )
+
+ llnl_link_helpers(entries, spec, compiler)
return entries
@@ -257,44 +347,47 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
spec = self.spec
entries = super().initconfig_hardware_entries()
+ entries.append("#------------------{0}".format("-" * 30))
+ entries.append("# Package custom hardware settings")
+ entries.append("#------------------{0}\n".format("-" * 30))
+
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
- if "+cuda" in spec:
+ if spec.satisfies("+cuda"):
entries.append(cmake_cache_option("ENABLE_CUDA", True))
-
- if not spec.satisfies("cuda_arch=none"):
- cuda_arch = spec.variants["cuda_arch"].value
- entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0])))
- entries.append(
- cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0]))
- )
- flag = "-arch sm_{0}".format(cuda_arch[0])
- entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", "{0}".format(flag)))
-
- entries.append(
- cmake_cache_option(
- "{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst")
- )
- )
+ # Umpire used to pick only the first architecture in the list. The shared logic in
+ # CachedCMakePackage keeps the list of architectures.
else:
entries.append(cmake_cache_option("ENABLE_CUDA", False))
- if "+rocm" in spec:
+ if spec.satisfies("+rocm"):
entries.append(cmake_cache_option("ENABLE_HIP", True))
- entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
- hip_repair_cache(entries, spec)
- archs = self.spec.variants["amdgpu_target"].value
- if archs != "none":
- arch_str = ",".join(archs)
- entries.append(
- cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
- )
- entries.append(
- cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
- )
else:
entries.append(cmake_cache_option("ENABLE_HIP", False))
+ entries.append(
+ cmake_cache_option(
+ "{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst")
+ )
+ )
+
+ entries.append(
+ cmake_cache_option(
+ "{}ENABLE_OPENMP_TARGET".format(option_prefix), spec.satisfies("+omptarget")
+ )
+ )
+
+ if spec.satisfies("+omptarget") and spec.satisfies("%xl"):
+ entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-qsmp;-qoffload"))
+
+ return entries
+
+ def initconfig_mpi_entries(self):
+ spec = self.spec
+
+ entries = super().initconfig_mpi_entries()
+ entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
+
return entries
def initconfig_package_entries(self):
@@ -311,58 +404,140 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
if spec.satisfies("@5.0.0:"):
entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix))
- entries.append(cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), "+numa" in spec))
+
+ if spec.satisfies("@2024.02.0:"):
+ entries.append(cmake_cache_path("fmt_DIR", spec["fmt"].prefix))
+
+ # Build options
+ entries.append("#------------------{0}".format("-" * 60))
+ entries.append("# Build Options")
+ entries.append("#------------------{0}\n".format("-" * 60))
+
+ entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
+ entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
+ entries.append(cmake_cache_option("ENABLE_WARNINGS_AS_ERRORS", spec.satisfies("+werror")))
+
+ # Generic options that have a prefixed equivalent in Umpire CMake
+ entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
+ entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
+ entries.append(cmake_cache_option("ENABLE_DOCS", False))
+ if spec.satisfies("tests=benchmarks") or spec.satisfies("+dev_benchmarks"):
+ # BLT requires ENABLE_TESTS=True to enable benchmarks
+ entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True))
+ entries.append(cmake_cache_option("ENABLE_TESTS", True))
+ else:
+ entries.append(cmake_cache_option("ENABLE_BENCHMARKS", False))
+ entries.append(cmake_cache_option("ENABLE_TESTS", not spec.satisfies("tests=none")))
+
+ # Prefixed options that used to be name without one
entries.append(
- cmake_cache_option("{}ENABLE_OPENMP".format(option_prefix), "+openmp" in spec)
+ cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), spec.satisfies("+numa"))
)
- entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "tests=benchmarks" in spec))
entries.append(
- cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
+ cmake_cache_option(
+ "{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix),
+ spec.satisfies("+dev_benchmarks"),
+ )
)
- entries.append(cmake_cache_option("{}ENABLE_DOCS".format(option_prefix), False))
entries.append(
- cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", "+device_alloc" in spec)
+ cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), spec.satisfies("+tools"))
+ )
+ entries.append(
+ cmake_cache_option(
+ "{}ENABLE_BACKTRACE".format(option_prefix), spec.satisfies("+backtrace")
+ )
+ )
+ entries.append(
+ cmake_cache_option("{}ENABLE_ASAN".format(option_prefix), spec.satisfies("+asan"))
+ )
+ entries.append(
+ cmake_cache_option(
+ "{}ENABLE_SANITIZER_TESTS".format(option_prefix),
+ spec.satisfies("+sanitizer_tests"),
+ )
)
- entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
- entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec))
+
+ # Recent options, were never name without prefix
+ entries.append(
+ cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", spec.satisfies("+device_alloc"))
+ )
+ entries.append(
+ cmake_cache_option(
+ "UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", spec.satisfies("+sqlite_experimental")
+ )
+ )
+ if spec.satisfies("+sqlite_experimental"):
+ entries.append(cmake_cache_path("SQLite3_ROOT", spec["sqlite"].prefix))
+
+ # This option was renamed later than the others
+ if spec.satisfies("@2022.10.0:"):
+ entries.append(
+ cmake_cache_option("UMPIRE_ENABLE_IPC_SHARED_MEMORY", spec.satisfies("+ipc_shmem"))
+ )
+ else:
+ entries.append(
+ cmake_cache_option("ENABLE_IPC_SHARED_MEMORY", spec.satisfies("+ipc_shmem"))
+ )
+
+ if spec.satisfies("~fmt_header_only"):
+ entries.append(cmake_cache_string("UMPIRE_FMT_TARGET", "fmt::fmt"))
return entries
def cmake_args(self):
- options = []
- return options
+ return []
+
+ def setup_run_environment(self, env):
+ for library in ["lib", "lib64"]:
+ lib_path = join_path(self.prefix, library)
+ if os.path.exists(lib_path):
+ env.append_path("LD_LIBRARY_PATH", lib_path)
- def test(self):
+ def run_example(self, exe, expected):
"""Perform stand-alone checks on the installed package."""
- if self.spec.satisfies("@:1") or not os.path.isdir(self.prefix.bin):
- tty.info("Skipping: checks not installed in bin for v{0}".format(self.version))
- return
-
- # Run a subset of examples PROVIDED installed
- # tutorials with readily checkable outputs.
- checks = {
- "malloc": ["99 should be 99"],
- "recipe_dynamic_pool_heuristic": ["in the pool", "releas"],
- "recipe_no_introspection": ["has allocated", "used"],
- "strategy_example": ["Available allocators", "HOST"],
- "tut_copy": ["Copied source data"],
- "tut_introspection": ["Allocator used is HOST", "size of the allocation"],
- "tut_memset": ["Set data from HOST"],
- "tut_move": ["Moved source data", "HOST"],
- "tut_reallocate": ["Reallocated data"],
- "vector_allocator": [""],
- }
-
- for exe in checks:
- expected = checks[exe]
- reason = "test: checking output from {0}".format(exe)
- self.run_test(
- exe,
- [],
- expected,
- 0,
- installed=False,
- purpose=reason,
- skip_missing=True,
- work_dir=self.prefix.bin,
- )
+
+ exe_run = which(join_path(self.prefix.bin, exe))
+ if exe_run is None:
+ raise SkipTest(f"{exe} is not installed for version {self.version}")
+ out = exe_run(output=str.split, error=str.split)
+ check_outputs(expected, out)
+
+ def test_malloc(self):
+ """Run Malloc"""
+ self.run_example("malloc", ["99 should be 99"])
+
+ def test_recipe_dynamic_pool_heuristic(self):
+ """Multiple use allocator test"""
+ self.run_example("recipe_dynamic_pool_heuristic", ["in the pool", "releas"])
+
+ def test_recipe_no_introspection(self):
+ """Test without introspection"""
+ self.run_example("recipe_no_introspection", ["has allocated", "used"])
+
+ def test_strategy_example(self):
+ """Memory allocation strategy test"""
+ self.run_example("strategy_example", ["Available allocators", "HOST"])
+
+ def test_tut_copy(self):
+ """Copy data test"""
+ self.run_example("tut_copy", ["Copied source data"])
+
+ def test_tut_introspection(self):
+ """Keep track of pointer allocation test"""
+ self.run_example("tut_introspection", ["Allocator used is HOST", "size of the allocation"])
+
+ def test_tut_memset(self):
+ """Set entire block of memory to one value test"""
+ self.run_example("tut_memset", ["Set data from HOST"])
+
+ def test_tut_move(self):
+ """Move memory test"""
+ self.run_example("tut_move", ["Moved source data", "HOST"])
+
+ def test_tut_reallocate(self):
+ """Reallocate memory test"""
+ self.run_example("tut_reallocate", ["Reallocated data"])
+
+ def test_vector_allocator(self):
+ """Allocate vector memory test"""
+ self.run_example("vector_allocator", [""])
diff --git a/var/spack/repos/builtin/packages/unblur/package.py b/var/spack/repos/builtin/packages/unblur/package.py
index 0965489df8..c0e6bc1a79 100644
--- a/var/spack/repos/builtin/packages/unblur/package.py
+++ b/var/spack/repos/builtin/packages/unblur/package.py
@@ -26,7 +26,6 @@ class Unblur(AutotoolsPackage):
depends_on("fftw@3:")
# Requires Intel Fortran compiler
conflicts("%gcc")
- conflicts("%pgi")
conflicts("%apple-clang")
conflicts("%clang")
conflicts("%cce")
diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py
index 4e0d627b83..ebd09af5fd 100644
--- a/var/spack/repos/builtin/packages/uncrustify/package.py
+++ b/var/spack/repos/builtin/packages/uncrustify/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Uncrustify(CMakePackage, AutotoolsPackage):
"""Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others."""
- homepage = "http://uncrustify.sourceforge.net/"
+ homepage = "https://uncrustify.sourceforge.net/"
git = "https://github.com/uncrustify/uncrustify"
url = "https://sourceforge.net/projects/uncrustify/files/uncrustify/uncrustify-0.69/uncrustify-0.69.tar.gz"
@@ -33,6 +33,9 @@ class Uncrustify(CMakePackage, AutotoolsPackage):
version("0.62", commit="5987f2223f16b993dbece1360363eef9515fe5e8")
version("0.61", sha256="1df0e5a2716e256f0a4993db12f23d10195b3030326fdf2e07f8e6421e172df9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system(
conditional("cmake", when="@0.64:"),
conditional("autotools", when="@:0.63"),
diff --git a/var/spack/repos/builtin/packages/unibilium/package.py b/var/spack/repos/builtin/packages/unibilium/package.py
index b5b54d6838..9ad5173b85 100644
--- a/var/spack/repos/builtin/packages/unibilium/package.py
+++ b/var/spack/repos/builtin/packages/unibilium/package.py
@@ -17,6 +17,9 @@ class Unibilium(Package):
version("2.0.0", sha256="78997d38d4c8177c60d3d0c1aa8c53fd0806eb21825b7b335b1768d7116bc1c1")
version("1.2.0", sha256="623af1099515e673abfd3cae5f2fa808a09ca55dda1c65a7b5c9424eb304ead8")
+ depends_on("c", type="build") # generated
+
+ depends_on("gmake", type="build")
depends_on("libtool", type="build")
depends_on("perl", type="build")
depends_on("gzip", type="build")
diff --git a/var/spack/repos/builtin/packages/unifdef/package.py b/var/spack/repos/builtin/packages/unifdef/package.py
index a1a8da0e98..b9cdf43116 100644
--- a/var/spack/repos/builtin/packages/unifdef/package.py
+++ b/var/spack/repos/builtin/packages/unifdef/package.py
@@ -23,6 +23,8 @@ class Unifdef(MakefilePackage):
version("2.12", sha256="43ce0f02ecdcdc723b2475575563ddb192e988c886d368260bc0a63aee3ac400")
version("2.11", sha256="828ffc270ac262b88fe011136acef2780c05b0dc3c5435d005651740788d4537")
+ depends_on("c", type="build") # generated
+
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter(r"\$\{HOME\}", prefix)
diff --git a/var/spack/repos/builtin/packages/unifyfs/package.py b/var/spack/repos/builtin/packages/unifyfs/package.py
index 0c0585e9bd..e1e2146648 100644
--- a/var/spack/repos/builtin/packages/unifyfs/package.py
+++ b/var/spack/repos/builtin/packages/unifyfs/package.py
@@ -27,6 +27,10 @@ class Unifyfs(AutotoolsPackage):
version("1.0.1", sha256="d92800778661b15ab50275c4efe345a6c60d8f1802a0d5909fda38db91b12116")
version("1.0", sha256="c9ad0d15d382773841a3dab89c661fbdcfd686ec37fa263eb22713f6404258f5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"auto-mount",
default=True,
diff --git a/var/spack/repos/builtin/packages/unigen/package.py b/var/spack/repos/builtin/packages/unigen/package.py
index 732e8f0a6c..ddfd81e2a7 100644
--- a/var/spack/repos/builtin/packages/unigen/package.py
+++ b/var/spack/repos/builtin/packages/unigen/package.py
@@ -23,6 +23,8 @@ class Unigen(MakefilePackage):
license("GPL-3.0-only")
version("2.3", sha256="8783bcabbdf8c50dab6e93153cff9cfb267a9a9e61aef51bf1e17679ba42a717")
+
+ depends_on("cxx", type="build") # generated
patch("unigen-2.3.patch", level=0)
depends_on("root", type=("build", "link"))
diff --git a/var/spack/repos/builtin/packages/unison/package.py b/var/spack/repos/builtin/packages/unison/package.py
index 7ec1641e68..202b93a531 100644
--- a/var/spack/repos/builtin/packages/unison/package.py
+++ b/var/spack/repos/builtin/packages/unison/package.py
@@ -6,7 +6,7 @@
from spack.package import *
-class Unison(Package):
+class Unison(MakefilePackage):
"""Unison is a file-synchronization tool for OSX, Unix, and
Windows. It allows two replicas of a collection of files and
directories to be stored on different hosts (or different disks
@@ -20,19 +20,30 @@ class Unison(Package):
license("GPL-3.0-or-later")
- version("2.51.2", sha256="a2efcbeab651be6df69cc9b253011a07955ecb91fb407a219719451197849d5e")
- version("2.48.15v4", sha256="f8c7e982634bbe1ed6510fe5b36b6c5c55c06caefddafdd9edc08812305fdeec")
+ version("2.53.3", sha256="aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46")
+ version(
+ "2.51.2",
+ sha256="a2efcbeab651be6df69cc9b253011a07955ecb91fb407a219719451197849d5e",
+ deprecated=True,
+ )
+ version(
+ "2.48.15v4",
+ sha256="f8c7e982634bbe1ed6510fe5b36b6c5c55c06caefddafdd9edc08812305fdeec",
+ deprecated=True,
+ )
- depends_on("ocaml@4.10.0:~force-safe-string", type="build")
+ depends_on("c", type="build") # generated
- patch("large.patch", level=0)
- patch("4.08-compatibility.patch", when="^ocaml@4.08:")
+ depends_on("ocaml@4.10.0:~force-safe-string", type=("build", "link"))
+
+ with when("@:2.51.2"):
+ patch("large.patch", level=0)
+ patch("4.08-compatibility.patch", when="^ocaml@4.08:")
parallel = False
- def install(self, spec, prefix):
- make("UISTYLE=text DEBUGGING=false THREADS=true")
+ build_targets = ["UISTYLE=text", "DEBUGGING=false", "THREADS=true"]
+ def install(self, spec, prefix):
mkdirp(prefix.bin)
install("src/unison", prefix.bin)
- set_executable(join_path(prefix.bin, "unison"))
diff --git a/var/spack/repos/builtin/packages/units/package.py b/var/spack/repos/builtin/packages/units/package.py
index 45e4660cff..86ae202792 100644
--- a/var/spack/repos/builtin/packages/units/package.py
+++ b/var/spack/repos/builtin/packages/units/package.py
@@ -14,7 +14,10 @@ class Units(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-only")
+ version("2.23", sha256="d957b451245925c9e614c4513397449630eaf92bd62b8495ba09bbe351a17370")
version("2.22", sha256="5d13e1207721fe7726d906ba1d92dc0eddaa9fc26759ed22e3b8d1a793125848")
version("2.13", sha256="0ba5403111f8e5ea22be7d51ab74c8ccb576dc30ddfbf18a46cb51f9139790ab")
+ depends_on("c", type="build") # generated
+
depends_on("python", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/unittest-cpp/package.py b/var/spack/repos/builtin/packages/unittest-cpp/package.py
index 0c71fdc9b7..f605896a98 100644
--- a/var/spack/repos/builtin/packages/unittest-cpp/package.py
+++ b/var/spack/repos/builtin/packages/unittest-cpp/package.py
@@ -21,3 +21,5 @@ class UnittestCpp(CMakePackage):
version("2.0.0", sha256="74852198877dc2fdebdc4e5e9bd074018bf8ee03a13de139bfe41f4585b2f5b9")
version("1.6.0", sha256="9fa7e797816e16669d68171418b0dc41ec6b7eaf8483f782441f5f159598c3c0")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/universal-ctags/package.py b/var/spack/repos/builtin/packages/universal-ctags/package.py
index 899b475d48..9cbe8558f0 100644
--- a/var/spack/repos/builtin/packages/universal-ctags/package.py
+++ b/var/spack/repos/builtin/packages/universal-ctags/package.py
@@ -20,12 +20,19 @@ class UniversalCtags(AutotoolsPackage):
version("master", branch="master")
version(
+ "6.1.20240505.0", sha256="d9329d9d28c8280fcf8626594813958d9f90160ad6c7f10b0341a577d5b53527"
+ )
+ version(
"5.9.20210912.0", sha256="5082d4f7e5695be3d697c46e2232d76c6d8adff51d22ba7a4b869362f444ee21"
)
version(
"5.9.20210808.0", sha256="7f5f88d20750dfa2437ca9d163972b8684e3cf16de022a5177f322be92f528cc"
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/universal/package.py b/var/spack/repos/builtin/packages/universal/package.py
index c873dd0b6e..9dd7734cd8 100644
--- a/var/spack/repos/builtin/packages/universal/package.py
+++ b/var/spack/repos/builtin/packages/universal/package.py
@@ -17,3 +17,6 @@ class Universal(CMakePackage):
license("MIT")
version("3.68", sha256="67de4e0a3276b873a298ab98f1237ff3fd23240178e71405bf813ee38e4b1f62")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py
index 171c25961e..289a763cb4 100644
--- a/var/spack/repos/builtin/packages/unixodbc/package.py
+++ b/var/spack/repos/builtin/packages/unixodbc/package.py
@@ -11,15 +11,17 @@ class Unixodbc(AutotoolsPackage):
a predictable API with which to access Data Sources. Data Sources include
SQL Servers and any Data Source with an ODBC Driver."""
- homepage = "http://www.unixodbc.org/"
- url = "http://www.unixodbc.org/unixODBC-2.3.4.tar.gz"
+ homepage = "https://www.unixodbc.org/"
+ url = "https://www.unixodbc.org/unixODBC-2.3.4.tar.gz"
license("LGPL-2.0-or-later")
+ version("2.3.12", sha256="f210501445ce21bf607ba51ef8c125e10e22dffdffec377646462df5f01915ec")
version("2.3.4", sha256="2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39")
+ depends_on("c", type="build")
+
depends_on("iconv")
- depends_on("libtool")
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/unqlite/package.py b/var/spack/repos/builtin/packages/unqlite/package.py
index 301a0b2eed..420afc9626 100644
--- a/var/spack/repos/builtin/packages/unqlite/package.py
+++ b/var/spack/repos/builtin/packages/unqlite/package.py
@@ -19,6 +19,8 @@ class Unqlite(CMakePackage):
version("master", branch="master")
version("1.1.9", sha256="33d5b5e7b2ca223942e77d31112d2e20512bc507808414451c8a98a7be5e15c0")
+ depends_on("c", type="build") # generated
+
# This patch corresponds to https://github.com/symisc/unqlite/pull/99
patch("0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch", when="@1.1.9")
diff --git a/var/spack/repos/builtin/packages/unrar/package.py b/var/spack/repos/builtin/packages/unrar/package.py
index 339f255161..1c73ebd572 100644
--- a/var/spack/repos/builtin/packages/unrar/package.py
+++ b/var/spack/repos/builtin/packages/unrar/package.py
@@ -13,9 +13,14 @@ class Unrar(MakefilePackage):
homepage = "https://www.rarlab.com"
url = "https://www.rarlab.com/rar/unrarsrc-5.9.4.tar.gz"
- version("5.9.4", sha256="3d010d14223e0c7a385ed740e8f046edcbe885e5c22c5ad5733d009596865300")
- version("5.8.2", sha256="33386623fd3fb153b56292df4a6a69b457e69e1803b6d07b614e5fd22fb33dda")
- version("5.8.1", sha256="035f1f436f0dc2aea09aec146b9cc3e47ca2442f2c62b4ad9374c7c9cc20e632")
+ version("7.0.9", sha256="505c13f9e4c54c01546f2e29b2fcc2d7fabc856a060b81e5cdfe6012a9198326")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-48579
+ version("5.9.4", sha256="3d010d14223e0c7a385ed740e8f046edcbe885e5c22c5ad5733d009596865300")
+ version("5.8.2", sha256="33386623fd3fb153b56292df4a6a69b457e69e1803b6d07b614e5fd22fb33dda")
+ version("5.8.1", sha256="035f1f436f0dc2aea09aec146b9cc3e47ca2442f2c62b4ad9374c7c9cc20e632")
+
+ depends_on("cxx", type="build") # generated
def edit(self, spec, prefix):
makefile = FileFilter("makefile")
diff --git a/var/spack/repos/builtin/packages/unuran/package.py b/var/spack/repos/builtin/packages/unuran/package.py
index 9e185e5a63..6779f6a9cc 100644
--- a/var/spack/repos/builtin/packages/unuran/package.py
+++ b/var/spack/repos/builtin/packages/unuran/package.py
@@ -16,6 +16,9 @@ class Unuran(AutotoolsPackage):
version("1.8.1", sha256="c270ae96857857dbac6450043df865e0517f52856ddbe5202fd35583b13c5193")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("shared", default=True, description="Enable the build of shared libraries")
variant(
"rngstreams",
diff --git a/var/spack/repos/builtin/packages/unzip/package.py b/var/spack/repos/builtin/packages/unzip/package.py
index 39deb4e6c0..f04dee4f8c 100644
--- a/var/spack/repos/builtin/packages/unzip/package.py
+++ b/var/spack/repos/builtin/packages/unzip/package.py
@@ -10,29 +10,30 @@ class Unzip(MakefilePackage):
"""Unzip is a compression and file packaging/archive utility."""
homepage = "http://www.info-zip.org/Zip.html"
- url = "http://downloads.sourceforge.net/infozip/unzip60.tar.gz"
+ url = "https://downloads.sourceforge.net/infozip/unzip60.tar.gz"
license("custom")
version("6.0", sha256="036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37")
- patch("configure-cflags.patch", when="%clang@16:")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
- # The Cray cc wrapper doesn't handle the '-s' flag (strip) cleanly.
- @when("platform=cray")
- def patch(self):
- filter_file(r"^LFLAGS2=.*", "LFLAGS2=", join_path("unix", "configure"))
+ # clang and oneapi need this patch, likely others
+ # There is no problem with it on gcc, so make it a catch all
+ patch("configure-cflags.patch")
+ patch("strip.patch")
def get_make_args(self):
make_args = ["-f", join_path("unix", "Makefile")]
cflags = []
- if self.spec.satisfies("%clang@16:"):
+ if not self.spec.satisfies("%nvhpc"):
cflags.append("-Wno-error=implicit-function-declaration")
cflags.append("-Wno-error=implicit-int")
cflags.append("-DLARGE_FILE_SUPPORT")
- make_args.append('LOC="{}"'.format(" ".join(cflags)))
+ make_args.append(f"LOC={' '.join(cflags)}")
return make_args
@property
@@ -41,8 +42,8 @@ class Unzip(MakefilePackage):
return self.get_make_args() + [target]
def url_for_version(self, version):
- return "http://downloads.sourceforge.net/infozip/unzip{0}.tar.gz".format(version.joined)
+ return f"http://downloads.sourceforge.net/infozip/unzip{version.joined}.tar.gz"
@property
def install_targets(self):
- return self.get_make_args() + ["prefix={0}".format(self.prefix), "install"]
+ return self.get_make_args() + [f"prefix={self.prefix}", "install"]
diff --git a/var/spack/repos/builtin/packages/unzip/strip.patch b/var/spack/repos/builtin/packages/unzip/strip.patch
new file mode 100644
index 0000000000..bff72d7bc8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/unzip/strip.patch
@@ -0,0 +1,11 @@
+--- spack-src/unix/configure 2024-08-23 14:21:34.822163922 +0200
++++ spack-src/unix/configure.patched 2024-08-23 14:27:24.862640828 +0200
+@@ -17,7 +17,7 @@
+ IZ_BZIP2=${3}
+ CFLAGS="${CFLAGS} -I. -DUNIX"
+ LFLAGS1=""
+-LFLAGS2="-s"
++LFLAGS2="-Wl,-s"
+ LN="ln -s"
+
+ CFLAGS_OPT=''
diff --git a/var/spack/repos/builtin/packages/upcxx/fix_configure_ldflags.patch b/var/spack/repos/builtin/packages/upcxx/fix_configure_ldflags.patch
new file mode 100644
index 0000000000..f41bc982f5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/upcxx/fix_configure_ldflags.patch
@@ -0,0 +1,26 @@
+diff --git a/configure b/configure
+index 27c35a43..b0f3cbe9 100755
+--- a/configure
++++ b/configure
+@@ -1168,7 +1168,7 @@ if [[ $UPCXX_CUDA -eq 1 ]]; then
+ # check that the CUDA Driver API is linkable, adding explicit link flags if needed
+ echo -e "#include <cuda.h>\n#include <cuda_runtime_api.h>\nint main() { cuInit(0); return 0; }" >| conftest.cpp
+ for ldextra in '' '-lcuda' '-framework CUDA' 'FAIL'; do
+- eval $CXX $UPCXX_CUDA_CPPFLAGS conftest.cpp -o conftest.exe $UPCXX_CUDA_LIBFLAGS $ldextra &> /dev/null
++ eval $CXX $UPCXX_CUDA_CPPFLAGS $LDFLAGS conftest.cpp -o conftest.exe $UPCXX_CUDA_LIBFLAGS $ldextra &> /dev/null
+ if [[ $? -eq 0 ]] && ( ./conftest.exe 2>/dev/null ); then
+ [[ -n "$ldextra" ]] && UPCXX_CUDA_LIBFLAGS+=" $ldextra"
+ break
+diff --git a/utils/system-checks.sh b/utils/system-checks.sh
+index 728792d0..e065f636 100644
+--- a/utils/system-checks.sh
++++ b/utils/system-checks.sh
+@@ -493,7 +493,7 @@ _EOF
+ check_maybe_c_compiler
+ return 2
+ fi
+- if ! (set -x; eval $CXX $CXXFLAGS $CXXSTDFLAG -o conftest.o conftest-cc.o conftest-cxx.o -lm) >> $DETAIL_LOG 2>&1 ; then
++ if ! (set -x; eval $CXX $CXXFLAGS $CXXSTDFLAG $LDFLAGS -o conftest.o conftest-cc.o conftest-cxx.o -lm) >> $DETAIL_LOG 2>&1 ; then
+ echo "ERROR: CXX=$CXX failed to link object files produced by CC=$CC and CXX=$CXX"
+ echo "ERROR: See $DETAIL_LOG for details. Last four lines are as follows:"
+ tail -4 $DETAIL_LOG
diff --git a/var/spack/repos/builtin/packages/upcxx/package.py b/var/spack/repos/builtin/packages/upcxx/package.py
index c76c3049c7..6fdcaf6a46 100644
--- a/var/spack/repos/builtin/packages/upcxx/package.py
+++ b/var/spack/repos/builtin/packages/upcxx/package.py
@@ -6,27 +6,36 @@
import os
import re
+import llnl.util.lang
+
+import spack.platforms
from spack.package import *
+@llnl.util.lang.memoized
def is_CrayXC():
- return (spack.platforms.host().name in ["linux", "cray"]) and (
+ return spack.platforms.host().name == "linux" and (
os.environ.get("CRAYPE_NETWORK_TARGET") == "aries"
)
+@llnl.util.lang.memoized
def is_CrayEX():
- if spack.platforms.host().name in ["linux", "cray"]:
+ if spack.platforms.host().name == "linux":
target = os.environ.get("CRAYPE_NETWORK_TARGET")
if target in ["ofi", "ucx"]: # normal case
return True
elif target is None: # but some systems lack Cray PrgEnv
fi_info = which("fi_info")
- if fi_info and fi_info("-l", output=str).find("cxi") >= 0:
+ if (
+ fi_info
+ and fi_info("-l", output=str, error=str, fail_on_error=False).find("cxi") >= 0
+ ):
return True
return False
+@llnl.util.lang.memoized
def cross_detect():
if is_CrayXC():
if which("srun"):
@@ -55,22 +64,49 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
version("develop", branch="develop")
version("master", branch="master")
+ version("2023.9.0", sha256="6bad2976b4bfc0263b497daa967f448159c3c2259827c8376bc96c9bf9171a83")
version("2023.3.0", sha256="382af3c093decdb51f0533e19efb4cc7536b6617067b2dd89431e323704a1009")
version("2022.9.0", sha256="dbf15fd9ba38bfe2491f556b55640343d6303048a117c4e84877ceddb64e4c7c")
version("2022.3.0", sha256="72bccfc9dfab5c2351ee964232b3754957ecfdbe6b4de640e1b1387d45019496")
- version("2021.9.0", sha256="9299e17602bcc8c05542cdc339897a9c2dba5b5c3838d6ef2df7a02250f42177")
- version("2021.3.0", sha256="3433714cd4162ffd8aad9a727c12dbf1c207b7d6664879fc41259a4b351595b7")
+ version(
+ "2021.9.0",
+ deprecated=True,
+ sha256="9299e17602bcc8c05542cdc339897a9c2dba5b5c3838d6ef2df7a02250f42177",
+ )
+ version(
+ "2021.3.0",
+ deprecated=True,
+ sha256="3433714cd4162ffd8aad9a727c12dbf1c207b7d6664879fc41259a4b351595b7",
+ )
version(
"2020.11.0",
+ deprecated=True,
sha256="f6f212760a485a9f346ca11bb4751e7095bbe748b8e5b2389ff9238e9e321317",
url="https://bitbucket.org/berkeleylab/upcxx/downloads/upcxx-2020.11.0-memory_kinds_prototype.tar.gz",
)
- version("2020.10.0", sha256="623e074b512bf8cad770a04040272e1cc660d2749760398b311f9bcc9d381a37")
- version("2020.3.2", sha256="978adc315d21089c739d5efda764b77fc9a2a7c5860f169fe5cd2ca1d840620f")
- version("2020.3.0", sha256="01be35bef4c0cfd24e9b3d50c88866521b9cac3ad4cbb5b1fc97aea55078810f")
+ version(
+ "2020.10.0",
+ deprecated=True,
+ sha256="623e074b512bf8cad770a04040272e1cc660d2749760398b311f9bcc9d381a37",
+ )
+ version(
+ "2020.3.2",
+ deprecated=True,
+ sha256="978adc315d21089c739d5efda764b77fc9a2a7c5860f169fe5cd2ca1d840620f",
+ )
+ version(
+ "2020.3.0",
+ deprecated=True,
+ sha256="01be35bef4c0cfd24e9b3d50c88866521b9cac3ad4cbb5b1fc97aea55078810f",
+ )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Do NOT add older versions here.
# UPC++ releases over 2 years old are not supported.
+ patch("fix_configure_ldflags.patch", when="@2021.9.0:master")
+
variant("mpi", default=False, description="Enables MPI-based spawners and mpi-conduit")
variant(
@@ -80,6 +116,9 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
+ "NOTE: Requires CUDA Driver library be present on the build system",
when="@2019.3.0:",
)
+ conflicts(
+ "+cuda", when="@:2019.2", msg="UPC++ version 2019.3.0 or newer required for CUDA support"
+ )
variant(
"rocm",
@@ -87,6 +126,9 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
description="Enables UPC++ support for the ROCm/HIP memory kind on AMD GPUs",
when="@2022.3.0:",
)
+ conflicts(
+ "+rocm", when="@:2022.2", msg="UPC++ version 2022.3.0 or newer required for ROCm support"
+ )
variant(
"level_zero",
@@ -104,20 +146,22 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
conflicts(
"cross=none",
when=is_CrayXC(),
- msg="cross=none is unacceptable on Cray XC."
- + 'Please specify an appropriate "cross" value',
+ msg='cross=none is unacceptable on Cray XC. Please specify an appropriate "cross" value',
)
# UPC++ always relies on GASNet-EX.
- # The default (and recommendation) is to use the implicit, embedded version.
# This variant allows overriding with a particular version of GASNet-EX sources,
# although this is not officially supported and some combinations might be rejected.
- variant("gasnet", default=False, description="Override embedded GASNet-EX version")
+ # Original default was to use the embedded version of GASNet-EX,
+ # but currently there are newer versions in Spack so we default to that instead.
+ variant("gasnet", default=True, description="Override embedded GASNet-EX with Spack's")
depends_on("gasnet conduits=none", when="+gasnet")
depends_on("mpi", when="+mpi")
depends_on("python@2.7.5:", type=("build", "run"))
+ depends_on("libfabric", when=is_CrayEX())
+
conflicts("^hip@:4.4.0", when="+rocm")
depends_on("oneapi-level-zero@1.8.0:", when="+level_zero")
@@ -179,8 +223,8 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
if is_CrayEX():
# Probe to find the right libfabric provider (SlingShot 10 vs 11)
- fi_info = which("fi_info")("-l", output=str)
- if fi_info.find("cxi") >= 0:
+ fi_info = which(spec["libfabric"].prefix.bin.fi_info) or which("fi_info")
+ if fi_info is None or fi_info("-l", output=str).find("cxi") >= 0:
provider = "cxi"
else:
provider = "verbs;ofi_rxm"
@@ -211,13 +255,16 @@ class Upcxx(Package, CudaPackage, ROCmPackage):
if "+cuda" in spec:
options.append("--enable-cuda")
+ options.append("--with-cuda-home=" + spec["cuda"].prefix)
options.append("--with-nvcc=" + spec["cuda"].prefix.bin.nvcc)
+ options.append(
+ "--with-ldflags=" + self.compiler.cc_rpath_arg + spec["cuda"].prefix.lib64
+ )
if "+rocm" in spec:
options.append("--enable-hip")
- options.append(
- "--with-ld-flags=" + self.compiler.cc_rpath_arg + spec["hip"].prefix.lib
- )
+ options.append("--with-hip-home=" + spec["hip"].prefix)
+ options.append("--with-ldflags=" + self.compiler.cc_rpath_arg + spec["hip"].prefix.lib)
if "+level_zero" in spec:
options.append("--enable-ze")
diff --git a/var/spack/repos/builtin/packages/upp/package.py b/var/spack/repos/builtin/packages/upp/package.py
index 3a6c52686e..b8b7fe13ed 100644
--- a/var/spack/repos/builtin/packages/upp/package.py
+++ b/var/spack/repos/builtin/packages/upp/package.py
@@ -43,6 +43,9 @@ class Upp(CMakePackage):
)
version("8.2.0", sha256="38de2178dc79420f42aa3fb8b85796fc49d43d66f90e5276e47ab50c282627ac")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("openmp", default=True, description="Use OpenMP threading")
variant("postexec", default=True, description="Build NCEPpost executable")
variant("wrf-io", default=False, description="Build with WRF-IO library")
diff --git a/var/spack/repos/builtin/packages/uqtk/package.py b/var/spack/repos/builtin/packages/uqtk/package.py
index 4eb4e7fbdb..929b7c2650 100644
--- a/var/spack/repos/builtin/packages/uqtk/package.py
+++ b/var/spack/repos/builtin/packages/uqtk/package.py
@@ -22,6 +22,10 @@ class Uqtk(CMakePackage):
version("3.1.0", sha256="56ecd3d13bdd908d568e9560dc52cc0f66d7bdcdbe64ab2dd0147a7cf1734f97")
version("3.0.4", sha256="0a72856438134bb571fd328d1d30ce3d0d7aead32eda9b7fb6e436a27d546d2e")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"python", default=True, description="Compile Python scripts and interface to C++ libraries"
)
diff --git a/var/spack/repos/builtin/packages/uriparser/package.py b/var/spack/repos/builtin/packages/uriparser/package.py
index b9bc7a8501..0c6dacbfeb 100644
--- a/var/spack/repos/builtin/packages/uriparser/package.py
+++ b/var/spack/repos/builtin/packages/uriparser/package.py
@@ -28,6 +28,9 @@ class Uriparser(CMakePackage):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Build API documentation")
depends_on("cmake@3.3:", type="build")
diff --git a/var/spack/repos/builtin/packages/usbutils/package.py b/var/spack/repos/builtin/packages/usbutils/package.py
index a74b154e2a..9228889ec2 100644
--- a/var/spack/repos/builtin/packages/usbutils/package.py
+++ b/var/spack/repos/builtin/packages/usbutils/package.py
@@ -19,6 +19,8 @@ class Usbutils(AutotoolsPackage):
version("011", sha256="9cf6e8c3030efc6abbb3c12de4da49816e0d6c6429f43fa3afb874cf72c2c869")
version("010", sha256="e32f3debe6c1308bb9aa9a92c3d86f8565a6f6cf7711bccb07b0f83bf530717d")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/usearch/0001-Don-t-statically-link.patch b/var/spack/repos/builtin/packages/usearch/0001-Don-t-statically-link.patch
new file mode 100644
index 0000000000..f591259663
--- /dev/null
+++ b/var/spack/repos/builtin/packages/usearch/0001-Don-t-statically-link.patch
@@ -0,0 +1,26 @@
+From 8df3df8574522ec75c085d35f7c42a65dfe16cf4 Mon Sep 17 00:00:00 2001
+From: Alex C Leute <aclrc@rit.edu>
+Date: Thu, 18 Jul 2024 14:39:35 -0400
+Subject: [PATCH] Don't statically link
+
+---
+ src/Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index e849853..b796f52 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -15,9 +15,6 @@ CXXFLAGS := $(CFLAGS) -DNDEBUG -pthread -O3 -ffast-math -march=native --std=c++1
+
+ UNAME_S := $(shell uname -s)
+ LDFLAGS := $(LDFLAGS) -O3 -pthread -lpthread
+-ifeq ($(UNAME_S),Linux)
+- LDFLAGS += -static
+-endif
+
+ HDRS = \
+ accepter.h \
+--
+2.43.5
+
diff --git a/var/spack/repos/builtin/packages/usearch/package.py b/var/spack/repos/builtin/packages/usearch/package.py
index 6ce96241bc..300a13b688 100644
--- a/var/spack/repos/builtin/packages/usearch/package.py
+++ b/var/spack/repos/builtin/packages/usearch/package.py
@@ -8,28 +8,52 @@ import os
from spack.package import *
-class Usearch(Package):
+class Usearch(MakefilePackage):
"""USEARCH is a unique sequence analysis tool with thousands of users
world-wide.
- Note: A manual download is required for USEARCH.
- Spack will search your current directory for the download file.
- Alternatively, add this file to a mirror so that Spack can find it.
- For instructions on how to set up a mirror, see
+ Note: A manual download is required for USEARCH when @:11.0.667. Spack
+ will search your current directory for the download file. Alternatively,
+ add this file to a mirror so that Spack can find it. For instructions on
+ how to set up a mirror, see
https://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://www.drive5.com/usearch/"
+ url = "https://github.com/rcedgar/usearch12/archive/refs/tags/v12.0-beta1.tar.gz"
maintainers("snehring")
- manual_download = True
+ build_directory = "src"
+ version(
+ "12.0-beta1", sha256="dbb06e4733801dab1c405616880261bd885ab171dfdb1d44e8ede48d739cdc43"
+ )
version("11.0.667", sha256="1be0faa1380100296029064e4cf9665d723d43f03c794da444c5b1a6b6799ac2")
version("10.0.240", sha256="297ba03cb5bdc60c9727b7949cc08bfeecad8b290c2844b5ad011f72a7e1399c")
+ with when("@12:"):
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("ccache", type="build")
+
+ patch("0001-Don-t-statically-link.patch", when="@12:")
+
+ @property
+ def manual_download(self):
+ return self.spec.satisfies("@:11.0.667")
+
def url_for_version(self, version):
- return "file://{0}/usearch{1}_i86linux32.gz".format(os.getcwd(), version)
+ if version <= Version("11.0.667"):
+ return "file://{0}/usearch{1}_i86linux32.gz".format(os.getcwd(), version)
+ return super().url_for_version(version)
+
+ def build(self, spec, prefix):
+ if not self.spec.satisfies("@:11.0.667"):
+ super().build(spec, prefix)
def install(self, spec, prefix):
mkdirp(prefix.bin)
- install("usearch{0}_i86linux32".format(self.version), prefix.bin.usearch)
+ if self.spec.satisfies("@:11.0.667"):
+ install("usearch{0}_i86linux32".format(self.version), prefix.bin.usearch)
+ else:
+ install("bin/usearch{0}".format(self.version.up_to(1)), prefix.bin.usearch)
set_executable(prefix.bin.usearch)
diff --git a/var/spack/repos/builtin/packages/userspace-rcu/package.py b/var/spack/repos/builtin/packages/userspace-rcu/package.py
index adbfe989b6..732b0c693f 100644
--- a/var/spack/repos/builtin/packages/userspace-rcu/package.py
+++ b/var/spack/repos/builtin/packages/userspace-rcu/package.py
@@ -30,6 +30,8 @@ class UserspaceRcu(AutotoolsPackage):
version("0.10.2", sha256="e117c416fced894e24720cc1b38247074a13020f19d6704b38e554cbcb993d06")
version("0.9.6", sha256="4d9e4ca40c079e0b0e9f912a9092589b97fbaf80eb6537e9ae70d48c09472efa")
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/ut/package.py b/var/spack/repos/builtin/packages/ut/package.py
index 1f76e497d0..2cdd96dc99 100644
--- a/var/spack/repos/builtin/packages/ut/package.py
+++ b/var/spack/repos/builtin/packages/ut/package.py
@@ -18,10 +18,14 @@ class Ut(CMakePackage):
license("BSL-1.0")
version("master", branch="master")
+ version("2.1.1", sha256="016ac5ece1808cd1100be72f90da4fa59ea41de487587a3283c6c981381cc216")
+ version("2.1.0", sha256="1c9c35c039ad3a9795a278447db6da0a4ec1a1d223bf7d64687ad28f673b7ae8")
version("2.0.1", sha256="1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad")
version("2.0.0", sha256="8b5b11197d1308dfc1fe20efd6a656e0c833dbec2807e2292967f6e2f7c0420f")
version("1.1.9", sha256="1a666513157905aa0e53a13fac602b5673dcafb04a869100a85cd3f000c2ed0d")
+ depends_on("cxx", type="build")
+
generator("ninja")
depends_on("cmake@3.21:3.25", type="build", when="@master")
diff --git a/var/spack/repos/builtin/packages/utf8cpp/package.py b/var/spack/repos/builtin/packages/utf8cpp/package.py
index 49a2ecc2a6..1d74adaae8 100644
--- a/var/spack/repos/builtin/packages/utf8cpp/package.py
+++ b/var/spack/repos/builtin/packages/utf8cpp/package.py
@@ -6,20 +6,16 @@
from spack.package import *
-class Utf8cpp(Package):
+class Utf8cpp(CMakePackage):
"""A simple, portable and lightweight generic library for handling UTF-8
encoded strings."""
- homepage = "http://utfcpp.sourceforge.net/"
+ homepage = "https://github.com/nemtrif/utfcpp"
+ url = "https://github.com/nemtrif/utfcpp/archive/refs/tags/v2.3.4.tar.gz"
- version("2.3.4", sha256="3373cebb25d88c662a2b960c4d585daf9ae7b396031ecd786e7bb31b15d010ef")
+ version("4.0.6", sha256="6920a6a5d6a04b9a89b2a89af7132f8acefd46e0c2a7b190350539e9213816c0")
+ version("3.2.4", sha256="fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e")
+ version("2.3.4", sha256="1a26d07f88d173dbd26a45f645009d0c6f6ceeb5f0fc391b9f3a769d090a66f4")
- def url_for_version(self, version):
- url = (
- "https://sourceforge.net/projects/utfcpp/files/utf8cpp_2x/Release%20{0}/utf8_v{1}.zip"
- )
- return url.format(version, version.underscored)
-
- def install(self, spec, prefix):
- install_tree("doc", prefix.share.doc)
- install_tree("source", prefix.include)
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
diff --git a/var/spack/repos/builtin/packages/utf8proc/package.py b/var/spack/repos/builtin/packages/utf8proc/package.py
index 1ab8b537e1..ae92704eca 100644
--- a/var/spack/repos/builtin/packages/utf8proc/package.py
+++ b/var/spack/repos/builtin/packages/utf8proc/package.py
@@ -13,6 +13,7 @@ class Utf8proc(CMakePackage):
homepage = "https://juliastrings.github.io/utf8proc/"
url = "https://github.com/JuliaStrings/utf8proc/archive/v2.4.0.tar.gz"
+ version("2.9.0", sha256="18c1626e9fc5a2e192311e36b3010bfc698078f692888940f1fa150547abb0c1")
version("2.8.0", sha256="a0a60a79fe6f6d54e7d411facbfcc867a6e198608f2cd992490e46f04b1bcecc")
version("2.7.0", sha256="4bb121e297293c0fd55f08f83afab6d35d48f0af4ecc07523ad8ec99aa2b12a1")
version("2.6.1", sha256="4c06a9dc4017e8a2438ef80ee371d45868bda2237a98b26554de7a95406b283b")
@@ -20,6 +21,8 @@ class Utf8proc(CMakePackage):
version("2.5.0", sha256="d4e8dfc898cfd062493cb7f42d95d70ccdd3a4cd4d90bec0c71b47cca688f1be")
version("2.4.0", sha256="b2e5d547c1d94762a6d03a7e05cea46092aab68636460ff8648f1295e2cdfbd7")
+ depends_on("c", type="build") # generated
+
variant("shared", default=False, description="Build a shared version of the library")
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/uthash/package.py b/var/spack/repos/builtin/packages/uthash/package.py
index 1b176904a7..61b1535e2e 100644
--- a/var/spack/repos/builtin/packages/uthash/package.py
+++ b/var/spack/repos/builtin/packages/uthash/package.py
@@ -16,6 +16,9 @@ class Uthash(Package):
version("2.3.0", sha256="e10382ab75518bad8319eb922ad04f907cb20cccb451a3aa980c9d005e661acc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.include)
for header in find(join_path(self.stage.source_path, "src"), "*.h"):
diff --git a/var/spack/repos/builtin/packages/util-linux-uuid/package.py b/var/spack/repos/builtin/packages/util-linux-uuid/package.py
index d41a9a93ae..554158491b 100644
--- a/var/spack/repos/builtin/packages/util-linux-uuid/package.py
+++ b/var/spack/repos/builtin/packages/util-linux-uuid/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -14,18 +16,23 @@ class UtilLinuxUuid(AutotoolsPackage):
list_url = "https://www.kernel.org/pub/linux/utils/util-linux"
list_depth = 1
- license("GPL-2.0-or-later")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("2.40.2", sha256="7bec316b713a14c6be1a5721aa0e56a3b6170277329e6e1f1a56013cc91eece0")
+ version("2.40.1", sha256="8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7")
version("2.38.1", sha256="0820eb8eea90408047e3715424bc6be771417047f683950fecb4bdd2e2cbbc6e")
version("2.37.4", sha256="c8b7b4fa541f974cc32c1c6559d9bfca33651020a456ad6ee5fc9b0cacd00151")
version("2.36.2", sha256="f5dbe79057e7d68e1a46fc04083fc558b26a49499b1b3f50e4f4893150970463")
version("2.36", sha256="82942cd877a989f6d12d4ce2c757fb67ec53d8c5cd9af0537141ec5f84a2eea3")
+ depends_on("c", type="build") # generated
+
conflicts("%gcc@:4", when="@2.37:")
depends_on("pkgconfig", type="build")
- provides("uuid")
+ if sys.platform not in ["darwin", "win32"]:
+ provides("uuid")
def url_for_version(self, version):
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py
index 72529d2a35..e4a67d8ed9 100644
--- a/var/spack/repos/builtin/packages/util-linux/package.py
+++ b/var/spack/repos/builtin/packages/util-linux/package.py
@@ -16,8 +16,11 @@ class UtilLinux(AutotoolsPackage):
list_url = "https://www.kernel.org/pub/linux/utils/util-linux"
list_depth = 1
- license("GPL-2.0-only")
+ license("GPL-2.0-only", checked_by="wdconinc")
+ version("2.40.2", sha256="7bec316b713a14c6be1a5721aa0e56a3b6170277329e6e1f1a56013cc91eece0")
+ version("2.40", sha256="2a51d08cb71fd8e491e0cf633032c928f9a2848417f8441cb8cf7ef9971de916")
+ version("2.39.3", sha256="40ea07584d56c310455471afa92c119ec259776a561af7159cc802344c2c370d")
version("2.39.1", sha256="d7c8a58eb2c7248a32754eb3a3b6772e368b984d9907ada834c2cf3e13024270")
version("2.38.1", sha256="0820eb8eea90408047e3715424bc6be771417047f683950fecb4bdd2e2cbbc6e")
version("2.38", sha256="c31d4e54f30b56b0f7ec8b342658c07de81378f2c067941c2b886da356f8ad42")
@@ -36,6 +39,8 @@ class UtilLinux(AutotoolsPackage):
version("2.29.1", sha256="a6a7adba65a368e6dad9582d9fbedee43126d990df51266eaee089a73c893653")
version("2.25", sha256="7e43273a9e2ab99b5a54ac914fddf5d08ba7ab9b114c550e9f03474672bd23a1")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.7:", type="build")
depends_on("pkgconfig", type="build")
depends_on("ncurses", type="link")
@@ -76,6 +81,10 @@ class UtilLinux(AutotoolsPackage):
["--disable-ipcs", "--disable-ipcrm", "--disable-wall", "--disable-libmount"]
)
+ if self.spec.satisfies("@2.40:"):
+ # Disable liblastlog2, which depends on sqlite
+ config_args.append("--disable-liblastlog2")
+
return config_args
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/util-macros/package.py b/var/spack/repos/builtin/packages/util-macros/package.py
index feca9d82d1..e0bf69fb56 100644
--- a/var/spack/repos/builtin/packages/util-macros/package.py
+++ b/var/spack/repos/builtin/packages/util-macros/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.url
from spack.package import *
@@ -11,18 +12,24 @@ class UtilMacros(AutotoolsPackage, XorgPackage):
other Xorg modular packages, and is needed to generate new versions
of their configure scripts with autoconf."""
- homepage = "https://cgit.freedesktop.org/xorg/util/macros/"
- xorg_mirror_path = "util/util-macros-1.19.1.tar.bz2"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/macros"
+ xorg_mirror_path = "util/util-macros-1.19.1.tar.xz"
- maintainers("robert-mijakovic")
+ maintainers("robert-mijakovic", "wdconinc")
license("MIT")
+ version("1.20.1", sha256="0b308f62dce78ac0f4d9de6888234bf170f276b64ac7c96e99779bb4319bcef5")
version("1.19.3", sha256="0f812e6e9d2786ba8f54b960ee563c0663ddbe2434bf24ff193f5feab1f31971")
version("1.19.2", sha256="d7e43376ad220411499a79735020f9d145fdc159284867e99467e0d771f3e712")
version("1.19.1", sha256="18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6")
version("1.19.0", sha256="2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba")
+ # note: url_for_version can only return a single url, no mirrors
+ def url_for_version(self, version):
+ if self.spec.satisfies("@:1.19"):
+ return spack.url.substitute_version(self.urls[0].replace("xz", "bz2"), version)
+
def setup_dependent_build_environment(self, env, dependent_spec):
"""Adds the ACLOCAL path for autotools."""
env.append_path("ACLOCAL_PATH", self.prefix.share.aclocal)
diff --git a/var/spack/repos/builtin/packages/uvw/package.py b/var/spack/repos/builtin/packages/uvw/package.py
index 685ab77ffb..b993124271 100644
--- a/var/spack/repos/builtin/packages/uvw/package.py
+++ b/var/spack/repos/builtin/packages/uvw/package.py
@@ -21,6 +21,8 @@ class Uvw(CMakePackage):
version("1.13.0", sha256="cc9944e5a2cdeb19bb74c61c3c02816c5a02b4339f3ad16e979bb7c8640e22c0")
version("1.12.0", sha256="b7751294fa00e8a96cd7d70989beda7a6117f5d9f4751306b7b2bbbb4702aac8")
+ depends_on("cxx", type="build") # generated
+
variant("docs", default=False, description="Builds and install the documentation")
depends_on("libuv", type="link")
diff --git a/var/spack/repos/builtin/packages/vacuumms/package.py b/var/spack/repos/builtin/packages/vacuumms/package.py
index 96b07689e6..eb5418df90 100644
--- a/var/spack/repos/builtin/packages/vacuumms/package.py
+++ b/var/spack/repos/builtin/packages/vacuumms/package.py
@@ -16,25 +16,51 @@ class Vacuumms(CMakePackage):
under Linux on x86_64 and ARM64. Please submit questions, pull requests, and bug
reports via github. https://dl.acm.org/doi/abs/10.1145/2335755.2335826"""
- homepage = "https://github.com/frankwillmore/VACUUMMS"
- url = "https://github.com/frankwillmore/VACUUMMS/archive/refs/tags/v1.0.0.tar.gz"
- git = "https://github.com/frankwillmore/VACUUMMS.git"
+ homepage = "https://github.com/VACUUMMS/VACUUMMS"
+ url = "https://github.com/VACUUMMS/VACUUMMS/archive/refs/tags/v1.0.0.tar.gz"
+ git = "https://github.com/VACUUMMS/VACUUMMS.git"
maintainers("frankwillmore")
- license("Unlicense")
+ license("MIT")
- version("master", branch="master")
- version("1.1.1", tag="v1.1.1", commit="a395930c87f5b52ab0ab8db278bd2bde592e8f12")
+ # This is the main branch, for the latest functionality
+ version("develop", branch="develop")
+
+ version(
+ "1.2.0",
+ sha256="1836e6c29d1e83a79f9c6a9b686d1419bd72618aba7c46d3d038373808519d56",
+ preferred=True,
+ deprecated=False,
+ )
+ version(
+ "1.1.4",
+ sha256="13052bafca8622df5f14613b3d4cddd50bae725e0c13c1df7f3cdee28a2e673a",
+ deprecated=False,
+ )
version(
"1.0.0",
sha256="c18fe52f5041880da7f50d3808d37afb3e9c936a56f80f67838d045bf7af372f",
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("test", default=True, description="enable CMake testing")
variant("tiff", default=False, description="Build TIFF utilities")
variant("cuda", default=False, description="Build CUDA applications and utilities")
+ variant("variational", default=False, description="Build VARIATIONAL module")
+ variant("voronoi", default=False, description="Build VORONOI applications and utilities")
+ variant(
+ "VOROPP_HOME",
+ default="/opt/voropp",
+ description="voro++ location",
+ multi=False,
+ when="+voronoi",
+ )
+ depends_on("voropp", type=("link", "run"), when="+voronoi")
depends_on("libtiff", type=("link", "run"), when="+tiff")
depends_on("cuda", type=("link", "run"), when="+cuda")
depends_on("libx11", type=("link", "run"))
@@ -44,6 +70,10 @@ class Vacuumms(CMakePackage):
def cmake_args(self):
return [
+ self.define_from_variant("ENABLE_TESTING", "test"),
self.define_from_variant("BUILD_CUDA_COMPONENTS", "cuda"),
self.define_from_variant("BUILD_TIFF_UTILS", "tiff"),
+ self.define_from_variant("BUILD_VARIATIONAL_MODULE", "variational"),
+ self.define_from_variant("BUILD_VORONOI_UTILS", "voronoi"),
+ self.define_from_variant("VOROPP_HOME", "VOROPP_HOME"),
]
diff --git a/var/spack/repos/builtin/packages/vala/package.py b/var/spack/repos/builtin/packages/vala/package.py
index e7e03a4462..5fbec5e05d 100644
--- a/var/spack/repos/builtin/packages/vala/package.py
+++ b/var/spack/repos/builtin/packages/vala/package.py
@@ -32,6 +32,8 @@ class Vala(AutotoolsPackage):
version("0.48.15", sha256="5f64283f8e69a48c73256cb93578c7db4c35c0b7df079568a4d5b6065b602a50")
version("0.48.14", sha256="dca57de29f4ce18ee8c6b1e4f1b37ca3843d19dae5c455fceebccc5ae3ffe347")
+ depends_on("c", type="build") # generated
+
variant("doc", default=False, description="build valadoc")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py
index 0820d4c6b6..a87966faf9 100644
--- a/var/spack/repos/builtin/packages/valgrind/package.py
+++ b/var/spack/repos/builtin/packages/valgrind/package.py
@@ -27,6 +27,9 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
license("GPL-2.0-or-later")
version("develop", branch="master")
+ version("3.23.0", sha256="c5c34a3380457b9b75606df890102e7df2c702b9420c2ebef9540f8b5d56264d")
+ version("3.22.0", sha256="c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c")
+ version("3.21.0", sha256="10ce1618bb3e33fad16eb79552b0a3e1211762448a0d7fce11c8a6243b9ac971")
version("3.20.0", sha256="8536c031dbe078d342f121fa881a9ecd205cb5a78e639005ad570011bdb9f3c6")
version("3.19.0", sha256="dd5e34486f1a483ff7be7300cc16b4d6b24690987877c3278d797534d6738f02")
version("3.18.1", sha256="00859aa13a772eddf7822225f4b46ee0d39afbe071d32778da4d99984081f7f5")
@@ -41,6 +44,9 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
version("3.10.1", sha256="fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997")
version("3.10.0", sha256="03047f82dfc6985a4c7d9d2700e17bc05f5e1a0ca6ad902e5d6c81aeb720edc9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Activates MPI support for valgrind")
variant("boost", default=True, description="Activates boost support for valgrind")
variant("only64bit", default=True, description="Sets --enable-only64bit option for valgrind")
diff --git a/var/spack/repos/builtin/packages/valijson/package.py b/var/spack/repos/builtin/packages/valijson/package.py
index 0b7f2ddf1b..8887373954 100644
--- a/var/spack/repos/builtin/packages/valijson/package.py
+++ b/var/spack/repos/builtin/packages/valijson/package.py
@@ -18,4 +18,7 @@ class Valijson(CMakePackage):
license("BSD-2-Clause")
version("master", branch="master")
+ version("1.0.2", sha256="35d86e54fc727f1265226434dc996e33000a570f833537a25c8b702b0b824431")
version("1.0", sha256="6b9f0bc89880feb3fe09aa469cd81f6168897d2fbb4e715853da3b94afd3779a")
+
+ depends_on("cxx", type="build") # generated
diff --git a/var/spack/repos/builtin/packages/vampirtrace/package.py b/var/spack/repos/builtin/packages/vampirtrace/package.py
index bc28a286d0..2809c5d74f 100644
--- a/var/spack/repos/builtin/packages/vampirtrace/package.py
+++ b/var/spack/repos/builtin/packages/vampirtrace/package.py
@@ -16,6 +16,10 @@ class Vampirtrace(AutotoolsPackage):
version("5.14.4", sha256="1719a1666dd274c221b781631958cae56aa8bcb3f22861fb4ba6526c1b465a30")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("mpi", default=True, description="Enable MPI support")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/vapor/package.py b/var/spack/repos/builtin/packages/vapor/package.py
index 72507b8b86..e6a2bf2349 100644
--- a/var/spack/repos/builtin/packages/vapor/package.py
+++ b/var/spack/repos/builtin/packages/vapor/package.py
@@ -29,6 +29,9 @@ class Vapor(CMakePackage):
preferred=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("doc", default=True, description="Build docs using Doxygen")
variant("ospray", default=False, description="Enable OSPRay raytracing")
diff --git a/var/spack/repos/builtin/packages/vardictjava/package.py b/var/spack/repos/builtin/packages/vardictjava/package.py
index e48185dca3..967ca0b938 100644
--- a/var/spack/repos/builtin/packages/vardictjava/package.py
+++ b/var/spack/repos/builtin/packages/vardictjava/package.py
@@ -16,6 +16,7 @@ class Vardictjava(Package):
"https://github.com/AstraZeneca-NGS/VarDictJava/releases/download/v1.5.1/VarDict-1.5.1.tar"
)
+ version("1.8.3", sha256="020a84d6718531097a05207a59d85d80803b0eda074ea6c0a3d1842cc84f2daf")
version("1.5.1", sha256="f1d710d238e8ab41b02a99fa8698baeee8c8668635a847b826913dd03a9176b9")
depends_on("java@8:", type="run")
diff --git a/var/spack/repos/builtin/packages/variorum/package.py b/var/spack/repos/builtin/packages/variorum/package.py
index 201061aeff..a1c0ce5f15 100644
--- a/var/spack/repos/builtin/packages/variorum/package.py
+++ b/var/spack/repos/builtin/packages/variorum/package.py
@@ -19,6 +19,8 @@ class Variorum(CMakePackage):
license("MIT")
+ version("dev", branch="dev")
+ version("0.8.0", sha256="0e7288d523488b2a585af8ffeb7874721526f46df563b21fc51e8846bf65f7d8")
version("0.7.0", sha256="36ec0219379ea2b7c8f9770b3271335c776ff5a3de71585714c33356345b2f0c")
version("0.6.0", sha256="c0928a0e6901808ee50142d1034de15edc2c90d7d1b9fbce43757226e7c04306")
version("0.5.0", sha256="de331762e7945ee882d08454ff9c66436e2b6f87f761d2b31c6ab3028723bfed")
@@ -28,6 +30,10 @@ class Variorum(CMakePackage):
version("0.2.0", sha256="b8c010b26aad8acc75d146c4461532cf5d9d3d24d6fc30ee68f6330a68e65744")
version("0.1.0", tag="v0.1.0", commit="7747ee48cc60567bb3f09e732f24c041ecac894d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
############
# Variants #
############
diff --git a/var/spack/repos/builtin/packages/varnish-cache/package.py b/var/spack/repos/builtin/packages/varnish-cache/package.py
index 9d3fd83987..b6ffd4e571 100644
--- a/var/spack/repos/builtin/packages/varnish-cache/package.py
+++ b/var/spack/repos/builtin/packages/varnish-cache/package.py
@@ -10,21 +10,28 @@ class VarnishCache(AutotoolsPackage):
"""This is Varnish Cache, the high-performance HTTP accelerator."""
homepage = "https://www.varnish-cache.org/"
- url = "https://github.com/varnishcache/varnish-cache/archive/varnish-6.4.0.tar.gz"
+ url = "https://github.com/varnishcache/varnish-cache/archive/refs/tags/varnish-6.4.0.tar.gz"
license("BSD-2-Clause")
- version("6.4.0", sha256="d9702c2c689c5d4ecd911886f769ddf22f46ac0722e275bee4033928cab09243")
- version("6.3.2", sha256="e50f3dd4e26d5669c5b73657cdb0d5ddac7dcc3cfa1761a983afa24b659f3785")
- version("6.3.1", sha256="8cc57360c1db36e8c77fc51304a935803a06247f6d6120fa47e8345efadf17a9")
- version("6.3.0", sha256="c7170d4bc57f1d2454da046fc5e43e2d19a804448d2dd839fa5c33f76bd677bb")
- version("6.2.3", sha256="64cd273aa155c78c21e74def53622be5920c8a7d952fee74f0663e57a01c9a9d")
+ version("7.6.1", sha256="6cfa30d761fa5edf33322048564cda3ee99de93ee57732c10f720d98d12f1899")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2022-23959
+ version("6.4.0", sha256="d9702c2c689c5d4ecd911886f769ddf22f46ac0722e275bee4033928cab09243")
+ version("6.3.2", sha256="e50f3dd4e26d5669c5b73657cdb0d5ddac7dcc3cfa1761a983afa24b659f3785")
+ version("6.3.1", sha256="8cc57360c1db36e8c77fc51304a935803a06247f6d6120fa47e8345efadf17a9")
+ version("6.3.0", sha256="c7170d4bc57f1d2454da046fc5e43e2d19a804448d2dd839fa5c33f76bd677bb")
+ version("6.2.3", sha256="64cd273aa155c78c21e74def53622be5920c8a7d952fee74f0663e57a01c9a9d")
+
+ depends_on("c", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("pcre")
+ depends_on("pkgconfig", type="build")
+ depends_on("pcre2", when="@7:")
+ depends_on("pcre", when="@:6")
depends_on("readline")
depends_on("python", type=("build", "run"))
depends_on("py-sphinx", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/vasp/package.py b/var/spack/repos/builtin/packages/vasp/package.py
index 1f67e9b006..aa937bc4ab 100644
--- a/var/spack/repos/builtin/packages/vasp/package.py
+++ b/var/spack/repos/builtin/packages/vasp/package.py
@@ -8,7 +8,7 @@ import os
from spack.package import *
-class Vasp(MakefilePackage):
+class Vasp(MakefilePackage, CudaPackage):
"""
The Vienna Ab initio Simulation Package (VASP)
is a computer program for atomic scale materials modelling,
@@ -18,14 +18,32 @@ class Vasp(MakefilePackage):
homepage = "https://vasp.at"
url = "file://{0}/vasp.5.4.4.pl2.tgz".format(os.getcwd())
+ maintainers("snehring")
manual_download = True
+ version("6.4.3", sha256="fe30e773f2a3e909b5e0baa9654032dfbdeff7ec157bc348cee7681a7b6c24f4")
version("6.3.2", sha256="f7595221b0f9236a324ea8afe170637a578cdd5a837cc7679e7f7812f6edf25a")
version("6.3.0", sha256="adcf83bdfd98061016baae31616b54329563aa2739573f069dd9df19c2071ad3")
- version("6.2.0", sha256="49e7ba351bd634bc5f5f67a8ef1e38e64e772857a1c02f602828898a84197e25")
- version("6.1.1", sha256="e37a4dfad09d3ad0410833bcd55af6b599179a085299026992c2d8e319bf6927")
- version("5.4.4.pl2", sha256="98f75fd75399a23d76d060a6155f4416b340a1704f256a00146f89024035bc8e")
- version("5.4.4", sha256="5bd2449462386f01e575f9adf629c08cb03a13142806ffb6a71309ca4431cfb3")
+ version(
+ "6.2.0",
+ sha256="49e7ba351bd634bc5f5f67a8ef1e38e64e772857a1c02f602828898a84197e25",
+ deprecated=True,
+ )
+ version(
+ "6.1.1",
+ sha256="e37a4dfad09d3ad0410833bcd55af6b599179a085299026992c2d8e319bf6927",
+ deprecated=True,
+ )
+ version(
+ "5.4.4.pl2",
+ sha256="98f75fd75399a23d76d060a6155f4416b340a1704f256a00146f89024035bc8e",
+ deprecated=True,
+ )
+ version(
+ "5.4.4",
+ sha256="5bd2449462386f01e575f9adf629c08cb03a13142806ffb6a71309ca4431cfb3",
+ deprecated=True,
+ )
resource(
name="vaspsol",
@@ -34,270 +52,289 @@ class Vasp(MakefilePackage):
when="+vaspsol",
)
- variant("openmp", default=False, description="Enable openmp build")
- with when("+openmp"):
- conflicts("^fftw~openmp")
- conflicts("^amdfftw~openmp")
- conflicts("^amdblis threads=none")
- conflicts("^amdblis threads=pthreads")
- conflicts("^openblas threads=none")
- conflicts("^openblas threads=pthreads")
+ variant("openmp", default=False, when="@6:", description="Enable openmp build")
- variant("scalapack", default=False, description="Enables build with SCALAPACK")
+ variant("scalapack", default=False, when="@:5", description="Enables build with SCALAPACK")
variant("cuda", default=False, description="Enables running on Nvidia GPUs")
- variant("fftlib", default=False, description="Enables fftlib build")
- with when("+fftlib"):
- conflicts("@:6.1.1", msg="fftlib support started from 6.2.0")
- conflicts("~openmp", msg="fftlib is intended to be used with openmp")
+ variant("fftlib", default=True, when="@6.2: +openmp", description="Enables fftlib build")
variant(
"vaspsol",
default=False,
+ when="@:6.2",
description="Enable VASPsol implicit solvation model\n"
"https://github.com/henniggroup/VASPsol",
)
variant("shmem", default=True, description="Enable use_shmem build flag")
+ variant("hdf5", default=False, when="@6.2:", description="Enabled HDF5 support")
depends_on("rsync", type="build")
depends_on("blas")
depends_on("lapack")
depends_on("fftw-api")
+ depends_on("fftw+openmp", when="+openmp ^[virtuals=fftw-api] fftw")
+ depends_on("amdfftw+openmp", when="+openmp ^[virtuals=fftw-api] amdfftw")
+ depends_on("amdblis threads=openmp", when="+openmp ^[virtuals=blas] amdblis")
+ depends_on("openblas threads=openmp", when="+openmp ^[virtuals=blas] openblas")
depends_on("mpi", type=("build", "link", "run"))
+ # fortran oddness requires the below
+ depends_on("openmpi%aocc", when="%aocc ^[virtuals=mpi] openmpi")
+ depends_on("openmpi%gcc", when="%gcc ^[virtuals=mpi] openmpi")
depends_on("scalapack", when="+scalapack")
- depends_on("cuda", when="+cuda")
- depends_on("qd", when="%nvhpc")
+ # wiki (and makefiles) suggest scalapack is expected in 6:
+ depends_on("scalapack", when="@6:")
+ depends_on("nccl", when="@6.3: +cuda")
+ depends_on("hdf5+fortran+mpi", when="+hdf5")
+ # at the very least the nvhpc mpi seems required
+ depends_on("nvhpc+mpi+lapack+blas", when="%nvhpc")
conflicts(
"%gcc@:8", msg="GFortran before 9.x does not support all features needed to build VASP"
)
conflicts("+vaspsol", when="+cuda", msg="+vaspsol only available for CPU")
- conflicts("+openmp", when="@:6.1.1", msg="openmp support started from 6.2")
-
- parallel = False
+ requires("%nvhpc", when="@6.3: +cuda", msg="vasp requires nvhpc to build the openacc build")
+ # the mpi compiler wrappers in nvhpc assume nvhpc is the underlying compiler, seemingly
+ conflicts("^[virtuals=mpi] nvhpc", when="%gcc", msg="nvhpc mpi requires nvhpc compiler")
+ conflicts("^[virtuals=mpi] nvhpc", when="%aocc", msg="nvhpc mpi requires nvhpc compiler")
+ conflicts(
+ "cuda_arch=none", when="@6.3: +cuda", msg="CUDA arch required when building openacc port"
+ )
def edit(self, spec, prefix):
- if "%gcc" in spec:
- if "+openmp" in spec:
- make_include = join_path("arch", "makefile.include.linux_gnu_omp")
- else:
- make_include = join_path("arch", "makefile.include.linux_gnu")
- elif "%nvhpc" in spec:
- make_include = join_path("arch", "makefile.include.linux_pgi")
- filter_file("-pgc++libs", "-c++libs", make_include, string=True)
- filter_file("pgcc", spack_cc, make_include)
- filter_file("pgc++", spack_cxx, make_include, string=True)
- filter_file("pgfortran", spack_fc, make_include)
- filter_file(
- "/opt/pgi/qd-2.3.17/install/include", spec["qd"].prefix.include, make_include
- )
- filter_file("/opt/pgi/qd-2.3.17/install/lib", spec["qd"].prefix.lib, make_include)
- elif "%aocc" in spec:
- if "+openmp" in spec:
- if "@6.3.0" in spec:
- copy(
- join_path("arch", "makefile.include.gnu_ompi_aocl_omp"),
- join_path("arch", "makefile.include.linux_aocc_omp"),
- )
- make_include = join_path("arch", "makefile.include.linux_aocc_omp")
-
- elif "@6.3.2:" in spec:
- make_include = join_path("arch", "makefile.include.aocc_ompi_aocl_omp")
- else:
- copy(
- join_path("arch", "makefile.include.linux_gnu_omp"),
- join_path("arch", "makefile.include.linux_aocc_omp"),
- )
- make_include = join_path("arch", "makefile.include.linux_aocc_omp")
- else:
- if "@6.3.0:" in spec:
- copy(
- join_path("arch", "makefile.include.gnu_ompi_aocl"),
- join_path("arch", "makefile.include.linux_aocc"),
- )
- make_include = join_path("arch", "makefile.include.linux_aocc")
- if "@6.3.2:" in spec:
- make_include = join_path("arch", "makefile.include.aocc_ompi_aocl")
- else:
- copy(
- join_path("arch", "makefile.include.linux_gnu"),
- join_path("arch", "makefile.include.linux_aocc"),
- )
- make_include = join_path("arch", "makefile.include.linux_aocc_omp")
- filter_file("^CC_LIB[ ]{0,}=.*$", "CC_LIB={0}".format(spack_cc), make_include)
- if "@6.3.0:" in spec:
- filter_file("gcc", "{0} {1}".format(spack_fc, "-Mfree"), make_include, string=True)
- else:
- filter_file("gcc", "{0}".format(spack_fc), make_include, string=True)
- filter_file("g++", spack_cxx, make_include, string=True)
-
- filter_file("^CFLAGS_LIB[ ]{0,}=.*$", "CFLAGS_LIB = -O3", make_include)
- filter_file("^FFLAGS_LIB[ ]{0,}=.*$", "FFLAGS_LIB = -O3", make_include)
- filter_file("^OFLAG[ ]{0,}=.*$", "OFLAG = -O3", make_include)
- filter_file(
- "^FC[ ]{0,}=.*$", "FC = {0}".format(spec["mpi"].mpifc), make_include, string=True
- )
- filter_file(
- "^FCL[ ]{0,}=.*$",
- '"FCL = {0}".format(spec["mpi"].mpifc)',
- make_include,
- string=True,
- )
- filter_file(
- "-fallow-argument-mismatch", " -fno-fortran-main", make_include, string=True
- )
-
- filter_file("^OBJECTS_LIB[ ]{0,}=.*$", "OBJECTS_LIB ?=", make_include)
- filter_file("-march=native", " ", make_include)
- else:
- if "+openmp" in spec:
- make_include = join_path(
- "arch", "makefile.include.linux_{0}_omp".format(spec.compiler.name)
- )
- else:
- make_include = join_path("arch", "makefile.include.linux_" + spec.compiler.name)
-
- # Recent versions of vasp have renamed the makefile.include files
- # to leave out the linux_ string
- if not os.path.exists(make_include):
- make_include = make_include.replace("linux_", "")
- os.rename(make_include, "makefile.include")
-
- # This bunch of 'filter_file()' is to make these options settable
- # as environment variables
- filter_file("^CPP_OPTIONS[ ]{0,}=[ ]{0,}", "CPP_OPTIONS ?= ", "makefile.include")
- filter_file("^FFLAGS[ ]{0,}=[ ]{0,}", "FFLAGS ?= ", "makefile.include")
-
- filter_file("^LIBDIR[ ]{0,}=.*$", "", "makefile.include")
- filter_file("^BLAS[ ]{0,}=.*$", "BLAS ?=", "makefile.include")
- filter_file("^LAPACK[ ]{0,}=.*$", "LAPACK ?=", "makefile.include")
- filter_file("^FFTW[ ]{0,}?=.*$", "FFTW ?=", "makefile.include")
- filter_file("^MPI_INC[ ]{0,}=.*$", "MPI_INC ?=", "makefile.include")
- filter_file("-DscaLAPACK.*$\n", "", "makefile.include")
- filter_file("^SCALAPACK[ ]{0,} =.*$", "SCALAPACK ?=", "makefile.include")
-
- if "+cuda" in spec:
- filter_file("^OBJECTS_GPU[ ]{0,}=.*$", "OBJECTS_GPU ?=", "makefile.include")
-
- filter_file("^CPP_GPU[ ]{0,}=.*$", "CPP_GPU ?=", "makefile.include")
-
- filter_file("^CFLAGS[ ]{0,}=.*$", "CFLAGS ?=", "makefile.include")
-
- if "+fftlib" in spec:
- filter_file("^#FCL[ ]{0,}=fftlib.o", "FCL += fftlib/fftlib.o", "makefile.include")
- filter_file("^#CXX_FFTLIB", "CXX_FFTLIB", "makefile.include")
- filter_file("^#INCS_FFTLIB", "INCS_FFTLIB", "makefile.include")
- filter_file("^#LIBS", "LIBS", "makefile.include")
- filter_file(
- "LIBS[ ]{0,}=.*$", "LIBS=-lstdc++ fftlib/fftlib.o -ldl", "makefile.include"
- )
- if "+vaspsol" in spec:
- copy("VASPsol/src/solvation.F", "src/")
-
- def setup_build_environment(self, spack_env):
- spec = self.spec
-
cpp_options = [
- "-DMPI -DMPI_BLOCK=8000",
+ "-DMPI",
+ "-DMPI_BLOCK=8000",
"-Duse_collective",
"-DCACHE_SIZE=4000",
"-Davoidalloc",
"-Duse_bse_te",
"-Dtbdyn",
+ "-Dfock_dblbuf",
]
+ objects_lib = ["linpack_double.o"]
+ llibs = list(self.compiler.stdcxx_libs)
+ cflags = ["-fPIC", "-DAAD_"]
+ fflags = ["-w"]
+ incs = [spec["fftw-api"].headers.include_flags]
- if "+shmem" in spec:
- cpp_options.append("-Duse_shmem")
+ if self.spec.satisfies("@6:"):
+ cpp_options.append("-Dvasp6")
+
+ llibs.extend([spec["blas"].libs.ld_flags, spec["lapack"].libs.ld_flags])
+
+ fc = [spec["mpi"].mpifc]
+ fcl = [spec["mpi"].mpifc]
+
+ include_prefix = ""
+ omp_flag = "-fopenmp"
- if "%nvhpc" in self.spec:
- cpp_options.extend(['-DHOST=\\"LinuxPGI\\"', "-DPGI16", "-Dqd_emulate"])
- elif "%aocc" in self.spec:
- cpp_options.extend(
- [
- '-DHOST=\\"LinuxAMD\\"',
- "-Dfock_dblbuf",
- "-Dsysv",
- "-Dshmem_bcast_buffer",
- "-DNGZhalf",
- ]
+ if spec.satisfies("+shmem"):
+ cpp_options.append("-Duse_shmem")
+ objects_lib.append("getshmem.o")
+
+ if spec.satisfies("@:6.2"):
+ include_prefix = "linux_"
+ include_string = f"makefile.include.{include_prefix}"
+
+ # gcc
+ if spec.satisfies("%gcc"):
+ include_string += "gnu"
+ if spec.satisfies("+openmp"):
+ include_string += "_omp"
+ make_include = join_path("arch", include_string)
+ # nvhpc
+ elif spec.satisfies("%nvhpc"):
+ qd_root = join_path(
+ spec["nvhpc"].prefix,
+ f"Linux_{spec['nvhpc'].target.family.name}",
+ str(spec["nvhpc"].version.dotted),
+ "compilers",
+ "extras",
+ "qd",
)
- if "@6.3.0:" and "^amdfftw@4.0:" in self.spec:
+ nvroot = join_path(spec["nvhpc"].prefix, f"Linux_{spec['nvhpc'].target.family.name}")
+ if spec.satisfies("@6.3:"):
+ cpp_options.extend(['-DHOST=\\"LinuxNV\\"', "-Dqd_emulate"])
+ else:
+ cpp_options.extend(['-DHOST=\\"LinuxPGI\\"', "-DPGI16", "-Dqd_emulate", "-Mfree"])
+
+ fflags.extend(["-Mnoupcase", "-Mbackslash", "-Mlarge_arrays"])
+ incs.append(f"-I{join_path(qd_root, 'include', 'qd')}")
+ llibs.extend([f"-L{join_path(qd_root, 'lib')}", "-lqdmod", "-lqd"])
+
+ if spec.satisfies("@:6.2"):
+ make_include = join_path("arch", f"{include_string}pgi")
+ filter_file("pgcc", spack_cc, make_include)
+ filter_file("pgc++", spack_cxx, make_include, string=True)
+ filter_file("pgfortran", spack_fc, make_include)
+ else:
+ include_string += "nvhpc"
+ if spec.satisfies("+openmp"):
+ include_string += "_omp"
+ if spec.satisfies("+cuda"):
+ include_string += "_acc"
+ make_include = join_path("arch", include_string)
+ omp_flag = "-mp"
+ filter_file(r"^QD[ \t]*\??=.*$", f"QD = {qd_root}", make_include)
+ filter_file("NVROOT[ \t]*=.*$", f"NVROOT = {nvroot}", make_include)
+ # aocc
+ elif spec.satisfies("%aocc"):
+ cpp_options.extend(['-DHOST=\\"LinuxAMD\\"', "-Dshmem_bcast_buffer", "-DNGZhalf"])
+ fflags.extend(["-fno-fortran-main", "-Mbackslash", "-ffunc-args-alias"])
+ if spec.satisfies("@6.3.0: ^amdfftw@4.0:"):
cpp_options.extend(["-Dfftw_cache_plans", "-Duse_fftw_plan_effort"])
- if "+openmp" in self.spec:
- cpp_options.extend(["-D_OPENMP"])
- cpp_options.extend(["-Mfree "])
+ if spec.satisfies("+openmp"):
+ if spec.satisfies("@6.3.2:"):
+ include_string += "aocc_ompi_aocl_omp"
+ elif spec.satisfies("@=6.3.0"):
+ include_string += "gnu_ompi_aocl_omp"
+ else:
+ include_string += "gnu_omp"
+ else:
+ if spec.satisfies("@6.3.2:"):
+ include_string += "aocc_ompi_aocl"
+ elif spec.satisfies("@=6.3.0"):
+ include_string += "gnu_ompi_aocl"
+ else:
+ include_string += "gnu"
+ make_include = join_path("arch", include_string)
+ filter_file("^CC_LIB[ ]{0,}=.*$", f"CC_LIB={spack_cc}", make_include)
+ if spec.satisfies("@6:6.3.0"):
+ filter_file("gcc", f"{spack_fc} -Mfree", make_include, string=True)
+ filter_file(
+ "-fallow-argument-mismatch", " -fno-fortran-main", make_include, string=True
+ )
+ # fj
+ elif spec.satisfies("@6.4.3: %fj target=a64fx"):
+ include_string += "fujitsu_a64fx"
+ omp_flag = "-Kopenmp"
+ fc.extend(["simd_nouse_multiple_structures", "-X03"])
+ fcl.append("simd_nouse_multiple_structures")
+ cpp_options.append('-DHOST=\\"FJ-A64FX\\"')
+ fflags.append("-Koptmsg=2")
+ llibs.extend(["-SSL2BLAMP", "-SCALAPACK"])
+ if spec.satisfies("+openmp"):
+ include_string += "_omp"
+ make_include = join_path("arch", include_string)
+
else:
+ if spec.satisfies("+openmp"):
+ make_include = join_path("arch", f"{include_string}{spec.compiler.name}_omp")
+ # if the above doesn't work, fallback to gnu
+ if not os.path.exists(make_include):
+ make_include = join_path("arch", f"{include_string}.gnu_omp")
+ else:
+ make_include = join_path(
+ "arch", f"{include_string}{include_prefix}" + spec.compiler.name
+ )
+ if not os.path.exists(make_include):
+ make_include = join_path("arch", f"{include_string}.gnu")
cpp_options.append('-DHOST=\\"LinuxGNU\\"')
- if self.spec.satisfies("@6:"):
- cpp_options.append("-Dvasp6")
-
- cflags = ["-fPIC", "-DADD_"]
- fflags = []
- if "%gcc" in spec or "%intel" in spec:
- fflags.append("-w")
- elif "%nvhpc" in spec:
- fflags.extend(["-Mnoupcase", "-Mbackslash", "-Mlarge_arrays"])
- elif "%aocc" in spec:
- fflags.extend(["-fno-fortran-main", "-Mbackslash"])
- objects_lib = ["linpack_double.o", "getshmem.o"]
- spack_env.set("OBJECTS_LIB", " ".join(objects_lib))
-
- spack_env.set("BLAS", spec["blas"].libs.ld_flags)
- spack_env.set("LAPACK", spec["lapack"].libs.ld_flags)
- if "^amdfftw" in spec:
- spack_env.set("AMDFFTW_ROOT", spec["fftw-api"].prefix)
+ if spec.satisfies("+openmp"):
+ cpp_options.extend(["-Dsysv", "-D_OPENMP"])
+ llibs.extend(["-ldl", spec["fftw-api:openmp"].libs.ld_flags])
+ fc.append(omp_flag)
+ fcl.append(omp_flag)
else:
- spack_env.set("FFTW", spec["fftw-api"].libs.ld_flags)
- spack_env.set("MPI_INC", spec["mpi"].prefix.include)
-
- if "%nvhpc" in spec:
- spack_env.set("QD", spec["qd"].prefix)
+ llibs.append(spec["fftw-api"].libs.ld_flags)
- if "+scalapack" in spec:
+ if spec.satisfies("^scalapack"):
cpp_options.append("-DscaLAPACK")
- spack_env.set("SCALAPACK", spec["scalapack"].libs.ld_flags)
-
- if "+cuda" in spec:
- cpp_gpu = [
- "-DCUDA_GPU",
- "-DRPROMU_CPROJ_OVERLAP",
- "-DCUFFT_MIN=28",
- "-DUSE_PINNED_MEMORY",
- ]
-
- objects_gpu = [
- "fftmpiw.o",
- "fftmpi_map.o",
- "fft3dlib.o",
- "fftw3d_gpu.o",
- "fftmpiw_gpu.o",
- ]
-
- cflags.extend(["-DGPUSHMEM=300", "-DHAVE_CUBLAS"])
-
- spack_env.set("CUDA_ROOT", spec["cuda"].prefix)
- spack_env.set("CPP_GPU", " ".join(cpp_gpu))
- spack_env.set("OBJECTS_GPU", " ".join(objects_gpu))
-
- if "+vaspsol" in spec:
+ if spec.satisfies("%nvhpc"):
+ llibs.append("-Mscalapack")
+ else:
+ llibs.append(spec["scalapack"].libs.ld_flags)
+
+ if spec.satisfies("+cuda"):
+ if spec.satisfies("@6.3:"):
+ # openacc
+ cpp_options.extend(["-D_OPENACC", "-DUSENCCL"])
+ llibs.extend(["-cudalib=cublas,cusolver,cufft,nccl", "-cuda"])
+ fc.append("-acc")
+ fcl.append("-acc")
+ cuda_flags = [f"cuda{str(spec['cuda'].version.dotted[0:2])}", "rdc"]
+ for f in spec.variants["cuda_arch"].value:
+ cuda_flags.append(f"cc{f}")
+ fc.append(f"-gpu={','.join(cuda_flags)}")
+ fcl.append(f"-gpu={','.join(cuda_flags)}")
+ fcl.extend(list(self.compiler.stdcxx_libs))
+ cc = [spec["mpi"].mpicc, "-acc"]
+ if spec.satisfies("+openmp"):
+ cc.append(omp_flag)
+ filter_file("^CC[ \t]*=.*$", f"CC = {' '.join(cc)}", make_include)
+
+ else:
+ # old cuda thing
+ cflags.extend(["-DGPUSHMEM=300", "-DHAVE_CUBLAS"])
+ filter_file(r"^CUDA_ROOT[ \t]*\?=.*$", spec["cuda"].prefix, make_include)
+
+ if spec.satisfies("+vaspsol"):
cpp_options.append("-Dsol_compat")
+ copy("VASPsol/src/solvation.F", "src/")
+
+ if spec.satisfies("+hdf5"):
+ cpp_options.append("-DVASP_HDF5")
+ llibs.append(spec["hdf5:fortran"].libs.ld_flags)
+ incs.append(spec["hdf5"].headers.include_flags)
if spec.satisfies("%gcc@10:"):
fflags.append("-fallow-argument-mismatch")
- if spec.satisfies("%aocc"):
- fflags.append("-fno-fortran-main -Mbackslash -ffunc-args-alias")
- # Finally
- spack_env.set("CPP_OPTIONS", " ".join(cpp_options))
- spack_env.set("CFLAGS", " ".join(cflags))
- spack_env.set("FFLAGS", " ".join(fflags))
+ filter_file(r"^VASP_TARGET_CPU[ ]{0,}\?=.*", "", make_include)
+
+ if spec.satisfies("@:5"):
+ filter_file("-DscaLAPACK.*$\n", "", make_include)
+
+ if spec.satisfies("+fftlib"):
+ cxxftlib = (
+ f"CXX_FFTLIB = {spack_cxx} {omp_flag}"
+ f" -DFFTLIB_THREADSAFE{' '.join(list(self.compiler.stdcxx_libs))}"
+ )
+ filter_file("^#FCL[ ]{0,}=fftlib.o", "FCL += fftlib/fftlib.o", make_include)
+ filter_file("^#CXX_FFTLIB.*$", cxxftlib, make_include)
+ filter_file(
+ "^#INCS_FFTLIB.*$",
+ f"INCS_FFTLIB = -I./include {spec['fftw-api'].headers.include_flags}",
+ make_include,
+ )
+ filter_file(r"#LIBS[ \t]*\+=.*$", "LIBS = fftlib", make_include)
+ llibs.append("-ldl")
+ fcl.append(join_path("fftlib", "fftlib.o"))
+
+ # clean multiline CPP options at begining of file
+ filter_file(r"^[ \t]+(-D[a-zA-Z0-9_=]+[ ]*)+[ ]*\\*$", "", make_include)
+ # replace relevant variables in the makefile.include
+ filter_file("^FFLAGS[ \t]*=.*$", f"FFLAGS = {' '.join(fflags)}", make_include)
+ filter_file(r"^FFLAGS[ \t]*\+=.*$", "", make_include)
+ filter_file(
+ "^CPP_OPTIONS[ \t]*=.*$", f"CPP_OPTIONS = {' '.join(cpp_options)}", make_include
+ )
+ filter_file(r"^INCS[ \t]*\+?=.*$", f"INCS = {' '.join(incs)}", make_include)
+ filter_file(r"^LLIBS[ \t]*\+?=.*$", f"LLIBS = {' '.join(llibs)}", make_include)
+ filter_file(r"^LLIBS[ \t]*\+=[ ]*-.*$", "", make_include)
+ filter_file("^CFLAGS[ \t]*=.*$", f"CFLAGS = {' '.join(cflags)}", make_include)
+ filter_file(
+ "^OBJECTS_LIB[ \t]*=.*$", f"OBJECTS_LIB = {' '.join(objects_lib)}", make_include
+ )
+ filter_file("^FC[ \t]*=.*$", f"FC = {' '.join(fc)}", make_include)
+ filter_file("^FCL[ \t]*=.*$", f"FCL = {' '.join(fcl)}", make_include)
+
+ os.rename(make_include, "makefile.include")
+
+ def setup_build_environment(self, spack_env):
+ if self.spec.satisfies("%nvhpc +cuda"):
+ spack_env.set("NVHPC_CUDA_HOME", self.spec["cuda"].prefix)
def build(self, spec, prefix):
- if "+cuda" in self.spec:
- make("gpu", "gpu_ncl")
+ if spec.satisfies("@:6.2"):
+ if spec.satisfies("+cuda"):
+ make("DEPS=1", "all")
+ else:
+ make("DEPS=1", "std", "gam", "ncl")
else:
- make("std", "gam", "ncl")
+ make("DEPS=1, all")
def install(self, spec, prefix):
install_tree("bin/", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/vbfnlo/package.py b/var/spack/repos/builtin/packages/vbfnlo/package.py
index 69d9e2807d..42abc3245c 100644
--- a/var/spack/repos/builtin/packages/vbfnlo/package.py
+++ b/var/spack/repos/builtin/packages/vbfnlo/package.py
@@ -20,6 +20,7 @@ class Vbfnlo(AutotoolsPackage):
license("GPL-2.0-only")
# The commented out versions exist, but are not tested
+ version("3.0", sha256="b9df02603e4f801f866360c720191a29afdb958d0bd4369ea7d810e761503e51")
version(
"3.0.0beta5", sha256="777a3dedb365ea9abc38848a60f30d325da3799cbad69fa308664b94a8c31a90"
)
@@ -38,7 +39,9 @@ class Vbfnlo(AutotoolsPackage):
sha256="13e33d73d8a8ef64094621f87e6f94e01712e76cc19a86298d0b52cfcb9decca",
preferred=True,
)
- # version('2.7.0', sha256='0e96c0912599e3000fffec5305700b947b604a7b06c7975851503f445311e4ef')
+
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
# Documentation is broken on some systems:
# See https://github.com/vbfnlo/vbfnlo/issues/2
@@ -52,6 +55,8 @@ class Vbfnlo(AutotoolsPackage):
depends_on("autoconf", type="build")
depends_on("m4", type="build")
depends_on("libtool", type="build")
+ # needed as tcsh is hardcoded in m4/vbfnlo.m4, could be patched out in the future
+ depends_on("tcsh", type="build")
@when("@2.7.1")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/vbz-compression/package.py b/var/spack/repos/builtin/packages/vbz-compression/package.py
index 52712253b4..feba17e46c 100644
--- a/var/spack/repos/builtin/packages/vbz-compression/package.py
+++ b/var/spack/repos/builtin/packages/vbz-compression/package.py
@@ -30,6 +30,9 @@ class VbzCompression(CMakePackage):
version("1.0.0", commit="2db0e3f62fa7a612dc42dc802401c26781eed068", submodules=True)
version("0.9.3", commit="9a748efcdd0754be835e1080cf7086f3451e17d1", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.11:", type="build")
depends_on("zstd@1.3.1:")
depends_on("hdf5@1.8.16:")
diff --git a/var/spack/repos/builtin/packages/vc/package.py b/var/spack/repos/builtin/packages/vc/package.py
index a5d549c360..98c2276544 100644
--- a/var/spack/repos/builtin/packages/vc/package.py
+++ b/var/spack/repos/builtin/packages/vc/package.py
@@ -13,8 +13,9 @@ class Vc(CMakePackage):
git = "https://github.com/VcDevel/Vc.git"
url = "https://github.com/VcDevel/Vc/archive/refs/tags/1.3.3.tar.gz"
- license("BSD-3-Clause")
+ license("BSD-3-Clause", checked_by="wdconinc")
+ version("1.4.5", sha256="eb734ef4827933fcd67d4c74aef54211b841c350a867c681c73003eb6d511a48")
version("1.4.4", sha256="5933108196be44c41613884cd56305df320263981fe6a49e648aebb3354d57f3")
version("1.4.3", sha256="988ea0053f3fbf17544ca776a2749c097b3139089408b0286fa4e9e8513e037f")
version("1.4.2", sha256="50d3f151e40b0718666935aa71d299d6370fafa67411f0a9e249fbce3e6e3952")
@@ -24,6 +25,10 @@ class Vc(CMakePackage):
version("1.2.0", sha256="9cd7b6363bf40a89e8b1d2b39044b44a4ce3f1fd6672ef3fc45004198ba28a2b")
version("1.1.0", sha256="281b4c6152fbda11a4b313a0a0ca18565ee049a86f35f672f1383967fef8f501")
+ depends_on("cxx", type="build") # generated
+
+ depends_on("cmake@3.5:", type="build", when="@1.4.5:")
+
@run_before("cmake")
def fetch_additional_sources(self):
"""Starting from 1.4:, the test suite requires both the virtest framework
diff --git a/var/spack/repos/builtin/packages/vcftools/package.py b/var/spack/repos/builtin/packages/vcftools/package.py
index 042b9febd9..adb359bbb2 100644
--- a/var/spack/repos/builtin/packages/vcftools/package.py
+++ b/var/spack/repos/builtin/packages/vcftools/package.py
@@ -23,8 +23,12 @@ class Vcftools(AutotoolsPackage):
# version('0.1.15', sha256='31e47afd5be679d89ece811a227525925b6907cce4af2c86f10f465e080383e3')
version("0.1.14", sha256="76d799dd9afcb12f1ed42a07bc2886cd1a989858a4d047f24d91dcf40f608582")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("perl", type=("build", "run"))
depends_on("zlib-api")
+ depends_on("pkgconfig")
# this needs to be in sync with what setup_run_environment adds to
# PERL5LIB below
diff --git a/var/spack/repos/builtin/packages/vde/package.py b/var/spack/repos/builtin/packages/vde/package.py
new file mode 100644
index 0000000000..04dc384fc5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vde/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Vde(AutotoolsPackage):
+ """Ethernet compliant virtual network"""
+
+ homepage = "https://github.com/virtualsquare/vde-2"
+ url = "https://github.com/virtualsquare/vde-2/archive/refs/tags/v2.3.3.tar.gz"
+
+ license("GPL-2.0-or-later AND LGPL-2.1-or-later", checked_by="trws")
+
+ version("2.3.3", sha256="a7d2cc4c3d0c0ffe6aff7eb0029212f2b098313029126dcd12dc542723972379")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ def autoreconf(self, spec, prefix):
+ autoreconf("--install", "--verbose")
diff --git a/var/spack/repos/builtin/packages/vdt/package.py b/var/spack/repos/builtin/packages/vdt/package.py
index 24869c0865..8e6afa6eee 100644
--- a/var/spack/repos/builtin/packages/vdt/package.py
+++ b/var/spack/repos/builtin/packages/vdt/package.py
@@ -22,6 +22,9 @@ class Vdt(CMakePackage):
version("0.3.7", sha256="713a7e6d76d98f3b2b56b5216e7d5906e30f17865a5c7c889968e9a0b0664949")
version("0.3.6", sha256="fb8f6386f2cd1eeb03db43f2b5c83a172107949bb5e5e8d4dfa603660a9757b0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"preload",
default=False,
@@ -46,10 +49,7 @@ class Vdt(CMakePackage):
elif spec.satisfies("target=ppc64le:"):
disable_features.add("fma")
- args = [
- self.define_from_variant("PRELOAD"),
- self.define("PYTHON_EXECUTABLE", spec["python"].command),
- ]
+ args = [self.define_from_variant("PRELOAD")]
for f in ["sse", "avx", "avx2", "fma", "neon"]:
args.append(
self.define(f.upper(), f not in disable_features and f in self.spec.target)
diff --git a/var/spack/repos/builtin/packages/veccore/package.py b/var/spack/repos/builtin/packages/veccore/package.py
index f8a7ab885e..38f714e2fa 100644
--- a/var/spack/repos/builtin/packages/veccore/package.py
+++ b/var/spack/repos/builtin/packages/veccore/package.py
@@ -34,6 +34,8 @@ class Veccore(CMakePackage):
version("0.4.0", sha256="0a38b958c92647c30b5709d17edaf39d241b92b988f1040c0fbe24932b42927e")
version("0.3.2", sha256="d72b03df00f5e94b2d07f78ab3af6d9d956c19e9a1fae07267b48f6fc8d7713f")
+ depends_on("cxx", type="build")
+
variant("vc", default=False, description="Enable Vc backend")
depends_on("vc@1.2.0:", when="@0.2.0: +vc")
diff --git a/var/spack/repos/builtin/packages/vecgeom/package.py b/var/spack/repos/builtin/packages/vecgeom/package.py
index 773cf7d661..3483d11576 100644
--- a/var/spack/repos/builtin/packages/vecgeom/package.py
+++ b/var/spack/repos/builtin/packages/vecgeom/package.py
@@ -5,7 +5,7 @@
from spack.package import *
-from spack.variant import _ConditionalVariantValues
+from spack.variant import ConditionalVariantValues
class Vecgeom(CMakePackage, CudaPackage):
@@ -21,124 +21,60 @@ class Vecgeom(CMakePackage, CudaPackage):
maintainers("drbenmorgan", "sethrj")
version("master", branch="master")
- version("1.2.6", sha256="e5162cf8adb67859dc4a111a81d1390d995895293e6ef1acf5f9d9834fd6d40e")
- version("1.2.5", sha256="d79ea05125e4d03c5605e5ea232994c500841d207b4543ac3d84758adddc15a9")
version(
- "1.2.4",
- sha256="4f5d43a9cd34a5e0200c41547a438cbb1ed4439f5bb757857c5a225d708590ce",
- deprecated=True,
- )
- version(
- "1.2.3",
- sha256="703e52d78b5b78e9f595bc76771659ab0cb09898ea32c50cfbde07d6d09ef1e1",
- deprecated=True,
- )
- version(
- "1.2.2",
- sha256="887134d40fc9731138189299f0bd5e73485fbb95a96eb4124ce0854e4672291f",
- deprecated=True,
- )
- version(
- "1.2.1",
- sha256="2b47f0d23f6d25ca4fc0601b93a98167bbfb4b8aa6a1bba16d0391569e99e6f0",
- deprecated=True,
- )
- version(
- "1.2.0",
- sha256="3448606fceb98ceb72d687d2d3b7ad44c67793d799def4ece9601b8e39c2868a",
- deprecated=True,
- )
- version(
- "1.1.20",
- sha256="e1c75e480fc72bca8f8072ea00320878a9ae375eed7401628b15cddd097ed7fd",
- deprecated=True,
- )
- version(
- "1.1.19",
- sha256="4c586b57fd4e30be044366c9be983249c7fa8bec629624523f5f69fd9caaa05b",
- deprecated=True,
- )
- version(
- "1.1.18",
- sha256="2780640233a36e0d3c767140417015be1893c1ad695ccc0bd3ee0767bc9fbed8",
- deprecated=True,
+ "1.2.10",
+ url="https://gitlab.cern.ch/-/project/981/uploads/8e0a94013efdd1b2d4f44c3fbb10bcdf/VecGeom-v1.2.10.tar.gz",
+ sha256="3e0934842694452e4cb4a265428cb99af1ecc45f0e2d28a32dfeaa0634c21e2a",
)
version(
- "1.1.17",
- sha256="2e95429b795311a6986320d785bedcd9dace9f8e7b7f6bd778d23a4ff23e0424",
+ "1.2.9",
+ url="https://gitlab.cern.ch/-/project/981/uploads/55a89cafbf48a418bec68be42867d4bf/VecGeom-v1.2.9.tar.gz",
+ sha256="93ee9ce6f7b2d704e9b9db22fad68f81b8eaf17453452969fc47e93dba4bfaf4",
deprecated=True,
)
version(
- "1.1.16",
- sha256="2fa636993156d9d06750586e8a1ac1701ae2be62dea07964e2369698ae521d02",
+ "1.2.8",
+ url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/db11697eb81d6f369e9ded1078de946b/VecGeom-v1.2.8.tar.gz",
+ sha256="769f59e8377f8268e253a9b2a3eee86868a9ebc1fa66c968b96e19c31440c12b",
deprecated=True,
)
version(
- "1.1.15",
- sha256="0ee9897eb12d8d560dc0c9e56e8fdb78d0111f651a984df24e983da035bd1c70",
+ "1.2.7",
+ url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/e4172cca4f6f731ef15e2780ecbb1645/VecGeom-v1.2.7.tar.gz",
+ sha256="d264c69b78bf431b9542be1f1af087517eac629da03cf2da62eb1e433fe06021",
deprecated=True,
)
version(
- "1.1.13",
- sha256="6bb364cc74bdab2e64e2fe132debd7f1e192da0a103f5149df7ab25b7c19a205",
+ "1.2.6",
+ url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/0b16aed9907cea62aa5f5914bec99a90/VecGeom-v1.2.6.tar.gz",
+ sha256="337f8846491930f3d8bfa4b45a1589d46e5d1d87f2d38c8f7006645c3aa90df8",
deprecated=True,
)
version(
- "1.1.12",
- sha256="fec4495aac4a9d583f076551da61a68b956bba1dd1ebe1cd48c00ef95c962049",
- deprecated=True,
- )
- version(
- "1.1.9",
- sha256="a90e11bf83724300d1d7206e5fe89a7915c4ec6aae881587f18e282ac0f6ee8e",
- deprecated=True,
- )
- version(
- "1.1.8",
- sha256="9c42206d788ec4b791571882f5ea8d2c591c938abe61c21cc5ec37bfea6bf768",
- deprecated=True,
- )
- version(
- "1.1.7",
- sha256="cc79a0baa783b21ecc399c4e7cca925ca340e6aeb96e3b2cad45c141557519bf",
- deprecated=True,
- )
- version(
- "1.1.6",
- sha256="c4806a6b67d01b40074b8cc6865d78574a6a1c573be51696f2ecdf98b9cb954a",
+ "1.2.5",
+ url="https://gitlab.cern.ch/VecGeom/VecGeom/uploads/33b93e656c5bc49d81cfcba291f5be51/VecGeom-v1.2.5.tar.gz",
+ sha256="d79ea05125e4d03c5605e5ea232994c500841d207b4543ac3d84758adddc15a9",
deprecated=True,
)
+ version("1.1.20", sha256="e1c75e480fc72bca8f8072ea00320878a9ae375eed7401628b15cddd097ed7fd")
version(
"1.1.5",
sha256="da674f3bbc75c30f56c1a2d251fa8930c899f27fa64b03a36569924030d87b95",
deprecated=True,
)
version(
- "1.1.3",
- sha256="ada09e8b6b2fa6c058290302b2cb5a6c2e644192aab1623c31d18c6a2f4c01c8",
- deprecated=True,
- )
- version(
"1.1.0",
sha256="e9d1ef83ff591fe4f9ef744a4d3155a3dc7e90ddb6735b24f3afe4c2dc3f7064",
deprecated=True,
)
version(
- "1.0.1",
- sha256="1eae7ac9014c608e8d8db5568058b8c0fea1a1dc7a8f54157a3a1c997b6fd9eb",
- deprecated=True,
- )
- version(
"0.5.2",
tag="v00.05.02",
commit="a7e0828c915ff936a79e672d1dd84b087a323b51",
deprecated=True,
)
- version(
- "0.3.rc",
- sha256="a87a9ea4ab126b59ff9c79182bc0911ead3d76dd197194742e2a35ccd341299d",
- deprecated=True,
- )
+
+ depends_on("cxx", type="build")
_cxxstd_values = (conditional("11", "14", when="@:1.1"), "17", conditional("20", when="@1.2:"))
variant(
@@ -176,7 +112,7 @@ class Vecgeom(CMakePackage, CudaPackage):
def std_when(values):
for v in values:
- if isinstance(v, _ConditionalVariantValues):
+ if isinstance(v, ConditionalVariantValues):
for c in v:
yield (c.value, c.when)
else:
diff --git a/var/spack/repos/builtin/packages/veclibfort/package.py b/var/spack/repos/builtin/packages/veclibfort/package.py
index eac366bfa6..a6949f3113 100644
--- a/var/spack/repos/builtin/packages/veclibfort/package.py
+++ b/var/spack/repos/builtin/packages/veclibfort/package.py
@@ -23,6 +23,9 @@ class Veclibfort(Package):
version("0.4.3", sha256="fe9e7e0596bfb4aa713b2273b21e7d96c0d7a6453ee4b214a8a50050989d5586")
version("0.4.2", sha256="c61316632bffa1c76e3c7f92b11c9def4b6f41973ecf9e124d68de6ae37fbc85")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build shared libraries as well as static libs.")
# virtual dependency
@@ -30,6 +33,8 @@ class Veclibfort(Package):
# https://github.com/scipy/scipy/wiki/Dropping-support-for-Accelerate
provides("lapack@3.2.1")
+ requires("platform=darwin", msg="vecLibFort can be installed on macOS only")
+
@property
def libs(self):
shared = True if "+shared" in self.spec else False
diff --git a/var/spack/repos/builtin/packages/vecmem/package.py b/var/spack/repos/builtin/packages/vecmem/package.py
index 30186fd24d..3a5f01bd4a 100644
--- a/var/spack/repos/builtin/packages/vecmem/package.py
+++ b/var/spack/repos/builtin/packages/vecmem/package.py
@@ -13,10 +13,28 @@ class Vecmem(CMakePackage, CudaPackage):
url = "https://github.com/acts-project/vecmem/archive/refs/tags/v0.5.0.tar.gz"
list_url = "https://github.com/acts-project/vecmem/tags"
- maintainers("wdconinc", "HadrienG2")
+ maintainers("wdconinc", "stephenswat")
license("MPL-2.0-no-copyleft-exception")
+ version("1.13.0", sha256="fc21cea04140e1210c83a32579b0a7194601889b6c895404214ac55ce547342b")
+ version("1.12.0", sha256="59a5ef061fc9949c3159cb920a717dee7aa1e9a98b3672495200071d3d4b61cf")
+ version("1.11.0", sha256="8f4ef9b50da45ea245291e2a4fef86025245150df4a4654ecb708a20adec5c42")
+ version("1.10.0", sha256="1fbdc599a65ad7b2cd1176844c7578da38911bc747fbe51a71e00d20e6105330")
+ version("1.9.0", sha256="c1ddc43ff0d742306cbee71afd80efd348b6b0b1ba9e4210ca7f8b607f03bd70")
+ version("1.8.0", sha256="d04f1bfcd08837f85c794a69da9f248e163985214a302c22381037feb5b3a7a9")
+ version("1.7.0", sha256="ff4bf8ea86a5edcb4a1e3d8dd0c42c73c60e998c6fb6512a40182c1f4620a73d")
+ version("1.6.0", sha256="797b016ac0b79bb39abad059ffa9f4817e519218429c9ab4c115f989616bd5d4")
+ version("1.5.0", sha256="5d7a2d2dd8eb961af12a1ed9e4e427b89881e843064ffa96ad0cf0934ba9b7ae")
+ version("1.4.0", sha256="545dfb4de4f9f3d773eef6a0e3297ebf981bb81950930d0991ad739e31ab16af")
+ version("1.3.1", sha256="09b108b0b48d564bbc1b9893ad9c3f7fa0b7914179f55be4c81f88a93e25f2e2")
+ version("1.3.0", sha256="53367db3084de56891ff885754c8fc2427d9ae69a351dd4d984558edf4162bad")
+ version("1.2.0", sha256="2cca8c1143803f209b58e49e9f2d58ebeeec4c815e7d99b0da9f61a319274aa9")
+ version("1.1.0", sha256="4d1f08a28268708819b68ed547eac912ec46e6707b059f0cc4aa7103a525164e")
+ version("1.0.0", sha256="59f478e036aed384eed1ecee1a99c5c52983534d3007d9f9203b7cb12c6ffa19")
+ version("0.27.0", sha256="f50a32214500767402930d4650243583769684c28fa29fe17f17f393a37ce0f2")
+ version("0.26.0", sha256="0e67acc197c4c1052288957c6419478c243aca718b64d383decd758d3c8f49ee")
+ version("0.25.0", sha256="90a87f00d45216cf4548fbcd6bb255dc15190873dc52936293a8c13f82e907f3")
version("0.24.0", sha256="b395c013fba4e01f02939fefac14b357dbfd8e572b5c8f4ee5a1414adbd2ea93")
version("0.22.0", sha256="b8811723bee60b0ea289d4c8b73363883e7c856859baf4cb6276b38816b0b258")
version("0.21.0", sha256="97df3beb9a59b89b65c51ceb7e7c9b09172b3875b25f2d8fc070e4f9b061b631")
@@ -41,21 +59,35 @@ class Vecmem(CMakePackage, CudaPackage):
version("0.2.0", sha256="33aea135989684e325cb097e455ff0f9d1a9e85ff32f671e3b3ed6cc036176ac")
version("0.1.0", sha256="19e24e3262aa113cd4242e7b94e2de34a4b362e78553730a358f64351c6a0a01")
+ depends_on("cxx", type="build") # generated
+
variant("hip", default=False, description="Build the vecmem::hip library")
variant("sycl", default=False, description="Build the vecmem::sycl library")
depends_on("cmake@3.17:", type="build")
depends_on("hip", when="+hip")
depends_on("sycl", when="+sycl")
- depends_on("googletest", type="test")
+
+ # FIXME: due to #29447, googletest is not available to cmake when building with --test,
+ # and we can choose between always depending on googletest, or using FetchContent
+ # depends_on("googletest", type="test")
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies("+sycl"):
+ env.set("SYCLCXX", self.compiler.cxx)
+ if self.spec.satisfies("%oneapi"):
+ env.set("SYCLFLAGS", "-fsycl")
def cmake_args(self):
args = [
+ self.define("FETCHCONTENT_FULLY_DISCONNECTED", False), # see FIXME above
self.define_from_variant("VECMEM_BUILD_CUDA_LIBRARY", "cuda"),
self.define_from_variant("VECMEM_BUILD_HIP_LIBRARY", "hip"),
self.define_from_variant("VECMEM_BUILD_SYCL_LIBRARY", "sycl"),
+ self.define("BUILD_TESTING", self.run_tests),
self.define("VECMEM_BUILD_TESTING", self.run_tests),
- self.define("VECMEM_USE_SYSTEM_GOOGLETEST", True),
+ self.define("VECMEM_USE_SYSTEM_LIBS", True),
+ self.define("VECMEM_USE_SYSTEM_GOOGLETEST", False), # see FIXME above
]
if "+cuda" in self.spec:
diff --git a/var/spack/repos/builtin/packages/vectorclass-version2/package.py b/var/spack/repos/builtin/packages/vectorclass-version2/package.py
index 784ece9330..dc9a83bc42 100644
--- a/var/spack/repos/builtin/packages/vectorclass-version2/package.py
+++ b/var/spack/repos/builtin/packages/vectorclass-version2/package.py
@@ -20,6 +20,8 @@ class VectorclassVersion2(Package):
version("2.01.04", sha256="7885c343b1af9eb940f4debdd7cd19544130a06ed70e0000e1a8471fb9c15118")
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
# Put all cpp files to an include folder
# (makes a filesystem view with this
diff --git a/var/spack/repos/builtin/packages/veloc/package.py b/var/spack/repos/builtin/packages/veloc/package.py
index 2bb6f0840d..9d42a6d800 100644
--- a/var/spack/repos/builtin/packages/veloc/package.py
+++ b/var/spack/repos/builtin/packages/veloc/package.py
@@ -14,9 +14,9 @@ class Veloc(CMakePackage):
url = "https://github.com/ECP-VeloC/VELOC/archive/veloc-1.7.tar.gz"
git = "https://github.com/ecp-veloc/veloc.git"
- maintainers = ["bnicolae"]
tags = ["e4s"]
+ maintainers("bnicolae")
license("MIT")
version("main", branch="main")
@@ -29,10 +29,14 @@ class Veloc(CMakePackage):
version("1.1", sha256="2bbdacf3e0ce4e7c9e360874d8d85b405525bdc7bd992bdb1f1ba49218072160")
version("1.0", sha256="d594b73d6549a61fce8e67b8984a17cebc3e766fc520ed1636ae3683cdde77cb")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libpthread-stubs")
depends_on("mpi")
depends_on("boost")
depends_on("er")
+ depends_on("er@0.4:", when="@1.7:")
depends_on("axl@:0.3.0", when="@:1.5")
depends_on("axl@0.5.0:", when="@1.6:")
depends_on("openssl")
diff --git a/var/spack/repos/builtin/packages/vep-cache/package.py b/var/spack/repos/builtin/packages/vep-cache/package.py
new file mode 100644
index 0000000000..6e84426a52
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vep-cache/package.py
@@ -0,0 +1,151 @@
+# Copyright 2013-2024 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.package import *
+
+
+class VepCache(Package):
+ """Separate installation and management for the Ensembl Variant Effect Predictor (vep)"""
+
+ homepage = "https://useast.ensembl.org/info/docs/tools/vep/index.html"
+ maintainers("teaguesterling")
+ # This is a dummy value to get spack to resolve resources, which are not downloaded
+ # when has_code = False
+ has_code = False
+
+ license("Apache-2.0", checked_by="teaguesterling")
+
+ vep_versions = ["112", "111", "110"]
+ depends_on("vep", type="build")
+ for major in vep_versions:
+ version(major)
+ depends_on(f"vep@{major}", type="build", when=f"@{major}+match_vep_version")
+
+ vep_assembly_sources = ["ensembl", "refseq", "merged"]
+
+ # This is an incomplete list
+ vep_species = {
+ "bos_taurus": ["UMD3.1"],
+ "danio_rerio": ["GRCz11"],
+ "homo_sapiens": ["GRCh38", "GRCh37"],
+ "mus_musculus": ["GRCm38"],
+ "rattus_norvegicus": ["Rnor_6.0"],
+ }
+
+ variant("match_vep_version", default=True, description="Match cache and software version")
+ variant("env", default=True, description="Setup VEP environment variables for this cache")
+
+ # Cache configuration options
+ variant("fasta", default=True, description="Add FASTA files to the cache")
+ variant("indexed", default=True, description="Use indexed cache")
+
+ variant(
+ "assembly_source",
+ values=vep_assembly_sources,
+ default="ensembl",
+ description="What reference genome source",
+ )
+ variant(
+ "species",
+ values=vep_species.keys(),
+ default="homo_sapiens",
+ description="Which species to download the cache for (only one at a time)",
+ )
+ variant(
+ "assembly",
+ values=["latest"]
+ + [
+ conditional(*assemblies, when=f"species={species}")
+ for species, assemblies in vep_species.items()
+ ],
+ default="latest",
+ multi=False,
+ description="Which assembly of genome to use (only needed for homo sapiens)",
+ )
+
+ def cache_from_spec(self, spec):
+ variants = spec.variants
+ indexed = spec.satisfies("+indexed")
+ cache_type = variants["assembly_source"].value
+ species = variants["species"].value
+ assembly = variants["assembly"].value
+ assembly = self.vep_species[species][0] if assembly == "latest" else assembly
+ return indexed, cache_type, species, assembly
+
+ def vep_cache_config(self, base):
+ spec = self.spec
+ cache_version = spec.version.up_to(1)
+ indexed, cache_type, species, assembly = self.cache_from_spec(spec)
+ user_root = join_path(base, "share", "vep")
+ root = user_root # Should this be VEP install dir?
+
+ suffix = "" if cache_type == "ensembl" else f"_{cache_type}"
+ species_cache = f"{species}{suffix}"
+
+ if species == "homo_sapiens":
+ cache_dir = join_path(species, f"{cache_version}_{assembly}")
+ else:
+ cache_dir = join_path(species, f"{cache_version}")
+
+ return {
+ "root": root,
+ "user_root": user_root,
+ "version": f"{cache_version}",
+ "type": f"{cache_type}",
+ "species": species,
+ "cache_species": species_cache,
+ "assembly": f"{assembly}",
+ "indexed": indexed,
+ "dir": cache_dir,
+ "full_path": join_path(root, cache_dir),
+ }
+
+ def setup_run_environment(self, env):
+ if self.spec.satisfies("+env"):
+ cache = self.vep_cache_config(self.home)
+ env.set("VEP_OFFLINE", "1")
+ env.set("VEP_CACHE", "1")
+ env.set("VEP_DIR", cache["user_root"])
+ env.set("VEP_SPECIES", cache["species"])
+ env.set("VEP_CACHE_VERSION", cache["version"])
+ if cache["assembly"] is not None:
+ env.set("VEP_ASSEMBLY", cache["assembly"])
+ if cache["type"] == "refseq":
+ env.set("VEP_REFSEQ", "1")
+ if cache["type"] == "merged":
+ env.set("VEP_MERGED", "1")
+ if self.spec.satisfies("+fasta"):
+ pass
+
+ def cache_installer_args(self):
+ cache = self.vep_cache_config(self.prefix)
+ args = [
+ "--CACHEDIR",
+ cache["full_path"],
+ "--CACHE_VERSION",
+ cache["version"],
+ "--SPECIES",
+ cache["cache_species"],
+ ]
+ if cache["species"] == "homo_sapiens":
+ args += ["--ASSEMBLY", cache["assembly"]]
+
+ return args
+
+ def installer_args(self):
+ auto = "cf" if self.spec.satisfies("+fasta") else "c"
+ args = ["--AUTO", auto, "--NO_UPDATE", "--NO_TEST"]
+ args += self.cache_installer_args()
+ return args
+
+ def install_with_installer(self):
+ vep = self.spec["vep"].package
+ installer = which(vep.vep_installer_path)
+ installer(*self.installer_args())
+
+ def install(self, spec, prefix):
+ cache = self.vep_cache_config(self.prefix)
+ mkdirp(cache["full_path"])
+ self.install_with_installer()
diff --git a/var/spack/repos/builtin/packages/vep/package.py b/var/spack/repos/builtin/packages/vep/package.py
new file mode 100644
index 0000000000..5f60345277
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vep/package.py
@@ -0,0 +1,131 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Vep(Package):
+ """
+ Ensembl Variant Effect Predictor (VEP) determines the effect of your variants
+ (SNPs, insertions, deletions, CNVs or structural variants) on genes, transcripts,
+ and protein sequence, as well as regulatory regions.
+ (Requires addtional data available via the `vep-cache` package)
+ """
+
+ homepage = "https://useast.ensembl.org/info/docs/tools/vep/index.html"
+ url = "https://github.com/Ensembl/ensembl-vep/archive/release/111.zip"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ version("112.0", sha256="46dd08838fd94ecbfaa931266c78570748a3cb39668b6e43c3608e6cd0aff93f")
+ version("111.0", sha256="9cb326a1fa0054ce1a417f8fd4f2325ba605c40ec10eefbf87f461c264a89407")
+ version("110.0", sha256="391a1fe50139064c1044c09e013bb21437933d677537b5d3336807f3b131fb51")
+
+ variant("vep_installer", default=False, description="Install dependencies with VEP installer")
+ variant("utility_scripts", default=True, description="Install utility scripts")
+
+ # Optional dependencies
+ variant("json", default=True, description="Include requirements for JSON support")
+ variant("nearest", default=True, description="Include requirements for 'nearest'")
+ variant("gzip", default=True, description="Include requirements for gzip support")
+
+ # Bundled versions
+ variant("bundled_bioperl", default=False, description="Build with bundled BioPerl")
+ variant("bundled_htslib", default=False, description="Build with bundled HTSLib")
+
+ extends("perl")
+
+ with default_args(type="build"):
+ depends_on("gcc", when="+vep_installer")
+ depends_on("gmake")
+
+ with default_args(type=("build", "run")):
+ depends_on("perl@5.10:")
+ depends_on("perl-archive-zip")
+ depends_on("perl-dbd-mysql")
+ depends_on("perl-dbi")
+ depends_on("perl-bio-db-hts")
+ depends_on("perl-json", when="+json")
+ depends_on("perl-set-intervaltree", when="+nearest")
+ depends_on("perl-perlio-gzip", when="+gzip")
+ depends_on("perl-bioperl@1.6:", when="~bundled_bioperl")
+ depends_on("htslib@1.9:", when="~bundled_htslib")
+
+ # This is a workaround for the VEP installer which downloads
+ # and manually installs dependent packages
+ with default_args(type=("build", "run"), when="~vep_installer"):
+ for ver in ["110", "111", "112"]:
+ depends_on(f"perl-bio-ensembl@{ver}", when=f"@{ver}")
+ depends_on(f"perl-bio-ensembl-variation@{ver}", when=f"@{ver}")
+ depends_on(f"perl-bio-ensembl-funcgen@{ver}", when=f"@{ver}")
+ depends_on(f"perl-bio-ensembl-io@{ver}", when=f"@{ver}")
+
+ # These should probably move futher up the dependency stack
+ conflicts("zlib-ng", when="+gzip")
+ conflicts("zlib-ng", when="+bundled_htslib")
+
+ @property
+ def vep_lib_path(self):
+ return self.prefix.lib.perl5
+
+ @property
+ def vep_share_path(self):
+ return self.prefix.share.vep
+
+ @property
+ def vep_scripts_path(self):
+ return self.vep_share_path.scripts
+
+ @property
+ def vep_installer_path(self):
+ return f"{self.vep_scripts_path.INSTALL}.pl"
+
+ def setup_run_environment(self, env):
+ env.set("VEP_HOME", self.home)
+ if self.spec.satisfies("+bundled_htslib"):
+ env.prepend_path("PATH", self.vep_lib_path.htslib)
+
+ def installer_args(self):
+ auto = "a"
+ args = ["--DESTDIR", f"{self.vep_lib_path}", "--NO_UPDATE", "--NO_TEST"]
+ if self.spec.satisfies("~bundled_htslib"):
+ args += ["--NO_HTSLIB"]
+ if self.spec.satisfies("~bundled_bioperl"):
+ args += ["--NO_BIOPERL"]
+ args += ["--AUTO", auto]
+ return args
+
+ def install(self, spec, prefix):
+ mkdirp(self.prefix.bin)
+ mkdirp(self.vep_lib_path)
+ mkdirp(self.vep_share_path)
+ mkdirp(self.vep_scripts_path)
+
+ # Add the VEP perl modules and executable
+ install_tree("modules", self.vep_lib_path)
+ install("vep", prefix.bin.vep)
+
+ # We save this so it can be used later to update caches
+ # and use to do the rest of the install, if requested
+ install("INSTALL.pl", self.vep_installer_path)
+
+ # This is required for any cache updating via the installer
+ install("convert_cache.pl", self.vep_scripts_path)
+
+ # Resolve dependencies via VEP installer if desired
+ if spec.satisfies("+vep_installer"):
+ # If we don't do this a bunch of perl libs will be missing
+ # Run the customer VEP installer/downloader, which downloads
+ # copies a bunch of additional perl modules
+ installer = which(self.vep_installer_path)
+ installer(*self.installer_args())
+
+ # Manually install auxilary scripts if requested
+ if self.spec.satisfies("+utility_scripts"):
+ install("filter_vep", prefix.bin.filter_vep)
+ install("haplo", prefix.bin.haplo)
+ install("variant_recoder", prefix.bin.variant_recoder)
diff --git a/var/spack/repos/builtin/packages/verdict/package.py b/var/spack/repos/builtin/packages/verdict/package.py
new file mode 100644
index 0000000000..0834497886
--- /dev/null
+++ b/var/spack/repos/builtin/packages/verdict/package.py
@@ -0,0 +1,41 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Verdict(CMakePackage):
+ """Verdict mesh quality library for evaluating the geometric qualities of regions of space."""
+
+ homepage = "https://github.com/sandialabs/verdict"
+ url = "https://github.com/sandialabs/verdict/archive/refs/tags/1.4.2.tar.gz"
+ git = "https://github.com/sandialabs/verdict.git"
+
+ maintainers("rblake-llnl")
+
+ license("BSD-3-Clause", checked_by="rblake-llnl")
+
+ version("1.4.2", sha256="225c8c5318f4b02e7215cefa61b5dc3f99e05147ad3fefe6ee5a3ee5b828964b")
+ version("1.4.1", sha256="26fa583265cb2ced2e9b30ed26260f6c9f89c3296221d96ccd5e7bfeec219de7")
+
+ variant("doc", default=False, description="install documentation with library")
+ variant(
+ "mangle",
+ default=False,
+ description="Mangle verdict names for inclusion in a larger library",
+ )
+ variant("test", default=False, description="enable testing from cmake")
+
+ depends_on("cxx", type="build")
+
+ depends_on("googletest", type="test", when="+test")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("VERDICT_BUILD_DOCS", "doc"),
+ self.define_from_variant("VERDICT_MANGLE", "mangle"),
+ self.define_from_variant("VERDICT_ENABLE_TESTING", "test"),
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/verible/package.py b/var/spack/repos/builtin/packages/verible/package.py
index 1b9b4c7986..e16c84f56a 100644
--- a/var/spack/repos/builtin/packages/verible/package.py
+++ b/var/spack/repos/builtin/packages/verible/package.py
@@ -35,6 +35,46 @@ class Verible(Package):
version("master", branch="master")
version(
+ "0.0.3841",
+ sha256="fbc9cb32aa8a64ba60f24dc89e8573c8ea62c45d76113a0f2ab5b73babed5990",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3841-g5eb8aa34.tar.gz",
+ )
+ version(
+ "0.0.3836",
+ sha256="946625a1527d0a97772ea031ab7358af29e61258c189a2ab0d9533b43e71f35b",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3836-g86ee9bab.tar.gz",
+ )
+ version(
+ "0.0.3671",
+ sha256="9f492cdc64b047f4e91aece8aa01fd2b846d9695510360dde34980daf5dbe0dd",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3671-gf2731544.tar.gz",
+ )
+ version(
+ "0.0.3667",
+ sha256="6a13a902bfd37ecabfd772d619251da40e8ad8e44cf75ec2bc8663046200b02a",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3667-g88d12889.tar.gz",
+ )
+ version(
+ "0.0.3624",
+ sha256="e5995644e092e72c9d37c492f319b0d4861a3c63d03d1c3cfefe2363bcd6b74f",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3624-gd256d779.tar.gz",
+ )
+ version(
+ "0.0.3607",
+ sha256="5ea427ed843916f8c1b5d7263c1aaad526dc7181de5afcf84542bca4c4f8f1ca",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3607-g46de0f64.tar.gz",
+ )
+ version(
+ "0.0.3539",
+ sha256="e93c9638dac7d314cea506d483b0f078b80aa6837afa74db68ace322b0dbba31",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3539-g9442853c.tar.gz",
+ )
+ version(
+ "0.0.3483",
+ sha256="c40591813a7cf6b1a6f46f7e02d81526c999966c3ceb9a67c5542234cf49dddb",
+ url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3483-ga4d61b11.tar.gz",
+ )
+ version(
"0.0.3430",
sha256="580ab39c82da9f67523658c0bb0859e2b6c662f7c06855859f476eeedd92a7e0",
url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3430-g060bde0f.tar.gz",
@@ -45,6 +85,8 @@ class Verible(Package):
url="https://github.com/chipsalliance/verible/archive/refs/tags/v0.0-3428-gcfcbb82b.tar.gz",
)
+ depends_on("cxx", type="build") # generated
+
maintainers("davekeeshan")
depends_on("flex", type="build")
diff --git a/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch b/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch
new file mode 100644
index 0000000000..761eeb9fa7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in
+index 18947923a..d29baa840 100644
+--- a/src/Makefile_obj.in
++++ b/src/Makefile_obj.in
+@@ -363,7 +363,7 @@ $(TGT): $(PREDEP_H) $(OBJS)
+ .SECONDARY:
+
+ %.gch: %
+- $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH} $< -o $@
++ $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH} -c $< -o $@
+ %.o: %.cpp
+ $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} -c $< -o $@
+ %.o: %.c
diff --git a/var/spack/repos/builtin/packages/verilator/package.py b/var/spack/repos/builtin/packages/verilator/package.py
index d353da4b11..1422c28f17 100644
--- a/var/spack/repos/builtin/packages/verilator/package.py
+++ b/var/spack/repos/builtin/packages/verilator/package.py
@@ -33,7 +33,7 @@ class Verilator(AutotoolsPackage):
designs with thousands of modules."""
homepage = "https://www.veripool.org/projects/verilator"
- url = "https://github.com/verilator/verilator/archive/refs/tags/v5.018.tar.gz"
+ url = "https://github.com/verilator/verilator/archive/refs/tags/v5.026.tar.gz"
git = "https://github.com/verilator/verilator.git"
maintainers("davekeeshan")
@@ -42,6 +42,12 @@ class Verilator(AutotoolsPackage):
version("master", branch="master")
+ version("5.030", sha256="b9e7e97257ca3825fcc75acbed792b03c3ec411d6808ad209d20917705407eac")
+ version("5.028", sha256="02d4b6f34754b46a97cfd70f5fcbc9b730bd1f0a24c3fc37223397778fcb142c")
+ version("5.026", sha256="87fdecf3967007d9ee8c30191ff2476f2a33635d0e0c6e3dbf345cc2f0c50b78")
+ version("5.024", sha256="88b04c953e7165c670d6a700f202cef99c746a0867b4e2efe1d7ea789dee35f3")
+ version("5.022", sha256="3c2f5338f4b6ce7e2f47a142401acdd18cbf4c5da06092618d6d036c0afef12d")
+ version("5.020", sha256="41ca9abfadf8d2413efbff7f8277379733d0095957fe7769dc38f8fd1bc899a6")
version("5.018", sha256="8b544273eedee379e3c1a3bb849e14c754c9b5035d61ad03acdf3963092ba6c0")
version("5.016", sha256="66fc36f65033e5ec904481dd3d0df56500e90c0bfca23b2ae21b4a8d39e05ef1")
version("5.014", sha256="36e16c8a7c4b376f88d87411cea6ee68710e6d1382a13faf21f35d65b54df4a7")
@@ -67,27 +73,34 @@ class Verilator(AutotoolsPackage):
version("4.110", sha256="603c23944577a5d53a2e09191d04d5c61740a77b58f3a590a70e56f4526a5a0b")
version("4.108", sha256="ce521dc57754e5a325ff7000c434ce23674c8e1de30e1f2a6506dc3a33bd7c55")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("help2man", type="build")
depends_on("bison", type="build")
depends_on("flex")
- depends_on("ccache", type=("build", "run"), when="@5.018:")
depends_on("perl", type=("build", "run"))
- depends_on("bash", type="build")
+ depends_on("ccache", type=("build", "run"), when="@5.018:")
conflicts("%gcc@:6", msg="C++14 support required")
+ patch("fix_compile_gch.patch", level=1, when="@5.018:5.028")
+
# we need to fix the CXX and LINK paths, as they point to the spack
# wrapper scripts which aren't usable without spack
filter_compiler_wrappers("verilated.mk", relative_root="include")
+ filter_compiler_wrappers("verilated.mk", relative_root="share/verilator/include")
+ @when("@:5.022")
def setup_run_environment(self, env):
env.prepend_path("VERILATOR_ROOT", self.prefix)
def autoreconf(self, spec, prefix):
- which("bash")("autoconf")
+ autoconf()
# verilator requires access to its shipped scripts (bin) and include
# but the standard make doesn't put it in the correct places
diff --git a/var/spack/repos/builtin/packages/verrou/package.py b/var/spack/repos/builtin/packages/verrou/package.py
index dc0cba56c6..a32b6a9299 100644
--- a/var/spack/repos/builtin/packages/verrou/package.py
+++ b/var/spack/repos/builtin/packages/verrou/package.py
@@ -25,14 +25,15 @@ class Verrou(AutotoolsPackage):
url = "https://github.com/edf-hpc/verrou/archive/v2.0.0.tar.gz"
git = "https://github.com/edf-hpc/verrou.git"
- maintainers("HadrienG2")
-
license("GPL-2.0-only")
version("develop", branch="master")
version("2.2.0", sha256="d4ea3d19f0c61329723907b5b145d85776bb702643c1605a31f584484d2c5efc")
version("2.1.0", sha256="b1ba49f84aebab15b8ab5649946c9c31b53ad1499f6ffb681c98db41ed28566d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# The server is sometimes a bit slow to respond
timeout = {"timeout": 60}
diff --git a/var/spack/repos/builtin/packages/vgm/package.py b/var/spack/repos/builtin/packages/vgm/package.py
index 5ec8dd46eb..468e627280 100644
--- a/var/spack/repos/builtin/packages/vgm/package.py
+++ b/var/spack/repos/builtin/packages/vgm/package.py
@@ -33,6 +33,8 @@ class Vgm(CMakePackage):
version("4-00", sha256="c24de76f919dca7c92b3c9fce7a39142c6e61fd39f691d2e4df15fe413b5190d")
version("3-06", sha256="41948869f2e4dcfa31f4bad42b938c25dd174660c427feb2f9effa9af5e59c7d")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.8:", type="build")
depends_on("clhep")
depends_on("root")
diff --git a/var/spack/repos/builtin/packages/viennarna/package.py b/var/spack/repos/builtin/packages/viennarna/package.py
index a0420ed18f..6c74d9b4f7 100644
--- a/var/spack/repos/builtin/packages/viennarna/package.py
+++ b/var/spack/repos/builtin/packages/viennarna/package.py
@@ -14,11 +14,17 @@ class Viennarna(AutotoolsPackage):
homepage = "https://www.tbi.univie.ac.at/RNA/"
url = "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_4_x/ViennaRNA-2.4.3.tar.gz"
+ maintainers("snehring")
+ version("2.6.4", sha256="d1259ce5809601a12b0dc9b724ea2c55806fece80d8d83ad417ea8a2dd574982")
version("2.5.0", sha256="b85544650ee316743173ec9b30497cc4c559f1bfb8f66d16c563f780afd8c0c5")
version("2.4.3", sha256="4cda6e22029b34bb9f5375181562f69e4a780a89ead50fe952891835e9933ac0")
version("2.3.5", sha256="26b62a00da21bc5597b580ab8fef4e624234ec446d7d3cb0ce22803a5d7074ca")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"sse", default=True, description="Enable SSE in order to substantially speed up execution"
)
diff --git a/var/spack/repos/builtin/packages/viewres/package.py b/var/spack/repos/builtin/packages/viewres/package.py
index 73ea059626..66b4df5532 100644
--- a/var/spack/repos/builtin/packages/viewres/package.py
+++ b/var/spack/repos/builtin/packages/viewres/package.py
@@ -20,6 +20,8 @@ class Viewres(AutotoolsPackage, XorgPackage):
version("1.0.5", sha256="9dee5e6b0a18961bb5c33f3f654605d45912087b6ba781cb2277d1941fa35a4b")
version("1.0.4", sha256="fd2aaec85c952fd6984fe14d0fcbda4d2ab9849a9183e4787b0ef552a10a87a1")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/vigra/package.py b/var/spack/repos/builtin/packages/vigra/package.py
index 6178b1b1a6..54de86618b 100644
--- a/var/spack/repos/builtin/packages/vigra/package.py
+++ b/var/spack/repos/builtin/packages/vigra/package.py
@@ -23,6 +23,9 @@ class Vigra(CMakePackage):
version("master", branch="master")
version("1.11.1", sha256="a5564e1083f6af6a885431c1ee718bad77d11f117198b277557f8558fa461aaf")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("png", default=False, description="Include support for PNG images")
variant("jpeg", default=False, description="Include support for JPEG images")
variant("tiff", default=False, description="Include support for TIFF images")
diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py
index 583d12c8f9..c246f1c1cd 100644
--- a/var/spack/repos/builtin/packages/vim/package.py
+++ b/var/spack/repos/builtin/packages/vim/package.py
@@ -17,10 +17,12 @@ class Vim(AutotoolsPackage):
homepage = "https://www.vim.org"
url = "https://github.com/vim/vim/archive/v8.1.0338.tar.gz"
+
maintainers("sethrj")
license("Vim")
+ version("9.1.0437", sha256="7024fbf8d0e8eec2eae21d279d487b60c58dc4ba3d42146388dc3743506d1fe6")
version("9.0.0045", sha256="594a31e96e3eda07a358db305de939ca749693b4684de9e027bfa70311b1994d")
version(
"9.0.0000",
@@ -39,6 +41,9 @@ class Vim(AutotoolsPackage):
version("8.0.0134", sha256="1b3e3e7d187eed55cbdb0a1dae6b8f3b885005fbae84222420877d7afa3b2310")
version("7.4.2367", sha256="a9ae4031ccd73cc60e771e8bf9b3c8b7f10f63a67efce7f61cd694cd8d7cda5c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
_features = ("huge", "big", "normal", "small", "tiny")
variant("cscope", default=False, description="build with cscope support")
diff --git a/var/spack/repos/builtin/packages/virtualgl/package.py b/var/spack/repos/builtin/packages/virtualgl/package.py
index d7f9330e60..1dcb644939 100644
--- a/var/spack/repos/builtin/packages/virtualgl/package.py
+++ b/var/spack/repos/builtin/packages/virtualgl/package.py
@@ -13,12 +13,15 @@ class Virtualgl(CMakePackage):
3D application in real time."""
homepage = "https://www.virtualgl.org/Main/HomePage"
- url = "http://downloads.sourceforge.net/project/virtualgl/2.5.2/VirtualGL-2.5.2.tar.gz"
+ url = "https://downloads.sourceforge.net/project/virtualgl/2.5.2/VirtualGL-2.5.2.tar.gz"
license("LGPL-2.1-or-later")
version("2.5.2", sha256="4f43387678b289a24139c5b7c3699740ca555a9f10011c979e51aa4df2b93238")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# This package will only work with libjpeg-turbo, not other jpeg providers
depends_on("libjpeg-turbo")
depends_on("glu")
diff --git a/var/spack/repos/builtin/packages/virtuoso/package.py b/var/spack/repos/builtin/packages/virtuoso/package.py
index 806ca82671..18b36fc3c2 100644
--- a/var/spack/repos/builtin/packages/virtuoso/package.py
+++ b/var/spack/repos/builtin/packages/virtuoso/package.py
@@ -17,6 +17,9 @@ class Virtuoso(AutotoolsPackage):
version("7.2.5.1-dev", commit="3ff1d4b3de3977337baf909c264968b9f70b7d2c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("dbpedia-vad", default=False, description="DBpedia vad package")
variant("demo-vad", default=False, description="Demo vad package")
variant("fct-vad", default=True, description="Facet Browser vad package")
diff --git a/var/spack/repos/builtin/packages/visit-cgns/package.py b/var/spack/repos/builtin/packages/visit-cgns/package.py
index c85b86bc99..ef611aa049 100644
--- a/var/spack/repos/builtin/packages/visit-cgns/package.py
+++ b/var/spack/repos/builtin/packages/visit-cgns/package.py
@@ -39,6 +39,10 @@ class VisitCgns(CMakePackage):
version("2.10.2", sha256="89ecdfaf197ef431685e31b75628774deb6cd75d3e332ef26505774403e8beff")
version("2.10.1", sha256="6b53dea89a241fd03300a7a3a50c0f773e2fb8458cd3ad06816e9bd2f0337cd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("cgns@3.3.1+int64~scoping~legacy", when="@2.10.1:3.1.4")
depends_on("cgns+int64~scoping~legacy")
diff --git a/var/spack/repos/builtin/packages/visit-ffp/package.py b/var/spack/repos/builtin/packages/visit-ffp/package.py
index a48b2d5079..6766495fd0 100644
--- a/var/spack/repos/builtin/packages/visit-ffp/package.py
+++ b/var/spack/repos/builtin/packages/visit-ffp/package.py
@@ -21,6 +21,8 @@ class VisitFfp(CMakePackage):
maintainers("cyrush", "cessenat")
+ license("BSD-3-Clause")
+
# Here we provide a local file that contains only the plugin in a flat directory
version("local", url="file://{0}/visit-ffp.tgz".format(os.getcwd()))
# Below we copy the VisIt paths, ffp first shipment is with VisIt 3
@@ -30,6 +32,10 @@ class VisitFfp(CMakePackage):
version("3.1.1", sha256="0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0")
version("3.0.1", sha256="a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("stripack", default=True, description="Enable STRIPACK unit sphere Delaunay meshing")
depends_on("cmake", type="build")
diff --git a/var/spack/repos/builtin/packages/visit-mfem/package.py b/var/spack/repos/builtin/packages/visit-mfem/package.py
index 76c3abf5f2..9fb677fc88 100644
--- a/var/spack/repos/builtin/packages/visit-mfem/package.py
+++ b/var/spack/repos/builtin/packages/visit-mfem/package.py
@@ -39,6 +39,10 @@ class VisitMfem(CMakePackage):
version("2.10.2", sha256="89ecdfaf197ef431685e31b75628774deb6cd75d3e332ef26505774403e8beff")
version("2.10.1", sha256="6b53dea89a241fd03300a7a3a50c0f773e2fb8458cd3ad06816e9bd2f0337cd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("mfem")
depends_on("visit")
diff --git a/var/spack/repos/builtin/packages/visit-silo/package.py b/var/spack/repos/builtin/packages/visit-silo/package.py
index d31402e3f9..3dc7a4bbc6 100644
--- a/var/spack/repos/builtin/packages/visit-silo/package.py
+++ b/var/spack/repos/builtin/packages/visit-silo/package.py
@@ -44,6 +44,10 @@ class VisitSilo(CMakePackage):
version("2.10.2", sha256="89ecdfaf197ef431685e31b75628774deb6cd75d3e332ef26505774403e8beff")
version("2.10.1", sha256="6b53dea89a241fd03300a7a3a50c0f773e2fb8458cd3ad06816e9bd2f0337cd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("silo")
depends_on("visit")
diff --git a/var/spack/repos/builtin/packages/visit-unv/package.py b/var/spack/repos/builtin/packages/visit-unv/package.py
index 3b7063c826..768ac3f66e 100644
--- a/var/spack/repos/builtin/packages/visit-unv/package.py
+++ b/var/spack/repos/builtin/packages/visit-unv/package.py
@@ -19,6 +19,8 @@ class VisitUnv(CMakePackage):
maintainers("cyrush", "cessenat")
+ license("BSD-3-Clause")
+
# 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:
@@ -35,6 +37,10 @@ class VisitUnv(CMakePackage):
version("2.10.2", sha256="89ecdfaf197ef431685e31b75628774deb6cd75d3e332ef26505774403e8beff")
version("2.10.1", sha256="6b53dea89a241fd03300a7a3a50c0f773e2fb8458cd3ad06816e9bd2f0337cd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("visit")
diff --git a/var/spack/repos/builtin/packages/visit/19958-enable-python-and-check-pip.patch b/var/spack/repos/builtin/packages/visit/19958-enable-python-and-check-pip.patch
new file mode 100644
index 0000000000..a4f0f2dd47
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/19958-enable-python-and-check-pip.patch
@@ -0,0 +1,60 @@
+diff --git a/src/CMake/FindVisItPython.cmake b/src/CMake/FindVisItPython.cmake
+index f8fca9f730..76ab1f54ca 100644
+--- a/src/CMake/FindVisItPython.cmake
++++ b/src/CMake/FindVisItPython.cmake
+@@ -280,6 +280,13 @@ if(PYTHONINTERP_FOUND)
+ endif()
+ endif()
+
++ # Ensure pip module is avaiable
++ execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import sys; import pip; sys.stdout.write(pip.__version__)"
++ OUTPUT_VARIABLE PYTHON_PIP_VERSION
++ ERROR_VARIABLE ERROR_FINDING_PYTHON_PIP_MODULE
++ COMMAND_ERROR_IS_FATAL ANY)
++ message(STATUS "PYTHON_PIP_VERSION: ${PYTHON_PIP_VERSION}")
++
+ if(NOT EXISTS ${PYTHON_LIBRARY})
+ message(FATAL_ERROR "Failed to find main library using PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")
+ endif()
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 422bef895f..dacbaf0552 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1226,15 +1226,17 @@ if(NOT VISIT_DBIO_ONLY)
+ endif()
+ endif()
+
++# Configure python CLI extensions
++if(VISIT_PYTHON_SCRIPTING AND PYTHONLIBS_FOUND)
++ if(NOT VISIT_STATIC)
++ add_subdirectory(visitpy)
++ endif()
++endif()
++
+ if(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
+ add_subdirectory(vtkqt)
+ add_subdirectory(winutil)
+ add_subdirectory(gui)
+- if(VISIT_PYTHON_SCRIPTING AND PYTHONLIBS_FOUND)
+- if(NOT VISIT_STATIC)
+- add_subdirectory(visitpy)
+- endif()
+- endif()
+ # always add java subdir, so code gen targets can be active even
+ # if java is not enabled
+ add_subdirectory(java)
+diff --git a/src/viewer/CMakeLists.txt b/src/viewer/CMakeLists.txt
+index e47b0f271a..be9b2486ca 100644
+--- a/src/viewer/CMakeLists.txt
++++ b/src/viewer/CMakeLists.txt
+@@ -11,9 +11,9 @@
+
+ ADD_SUBDIRECTORY(rpc)
+ ADD_SUBDIRECTORY(core)
++ADD_SUBDIRECTORY(proxy)
+
+ IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
+- ADD_SUBDIRECTORY(proxy)
+ ADD_SUBDIRECTORY(subjectproxy)
+ IF(NOT VISIT_STATIC)
+ # "main" is handled from the top level in the static case so it can be
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index cf023cb705..a95b9943b4 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -58,6 +58,12 @@ class Visit(CMakePackage):
executables = ["^visit$"]
version("develop", branch="develop")
+ version("3.4.1", sha256="942108cb294f4c9584a1628225b0be39c114c7e9e01805fb335d9c0b507689f5")
+ version(
+ "3.4.0",
+ sha256="6cfb8b190045439e39fa6014dfa797de189bd40bbb9aa6facf711ebd908229e3",
+ deprecated=True,
+ )
version("3.3.3", sha256="cc67abb7585e23b51ad576e797df4108641ae6c8c5e80e5359a279c729769187")
version("3.3.2", sha256="0ae7c38287598e8d7d238cf284ea8be1096dcf13f58a7e9e444a28a32c085b56")
version("3.3.1", sha256="2e969d3146b559fb833e4cdfaefa72f303d8ad368ef325f68506003f7bc317b9")
@@ -71,11 +77,16 @@ class Visit(CMakePackage):
version("3.1.1", sha256="0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0")
version("3.0.1", sha256="a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
root_cmakelists_dir = "src"
- generator("ninja")
+ generator("ninja", "make")
+ # Temporary fix for now due to issue installing with ninja generator
+ conflicts("generator=ninja", when="+python")
variant("gui", default=True, description="Enable VisIt's GUI")
- variant("osmesa", default=False, description="Use OSMesa for off-screen CPU rendering")
variant("adios2", default=True, description="Enable ADIOS2 file format")
variant("hdf5", default=True, description="Enable HDF5 file format")
variant("netcdf", default=True, description="Enable NetCDF file format")
@@ -91,7 +102,7 @@ class Visit(CMakePackage):
patch("spack-changes-3.0.1.patch", when="@3.0.1")
patch("nonframework-qwt.patch", when="^qt~framework platform=darwin")
patch("parallel-hdf5.patch", when="@3.0.1:3.2.2+hdf5+mpi")
- patch("parallel-hdf5-3.3.patch", when="@3.3.0:+hdf5+mpi")
+ patch("parallel-hdf5-3.3.patch", when="@3.3.0:3.3+hdf5+mpi")
patch("cmake-findvtkh-3.3.patch", when="@3.3.0:3.3.2+vtkm")
patch("cmake-findjpeg.patch", when="@3.1.0:3.2.2")
patch("cmake-findjpeg-3.3.patch", when="@3.3.0")
@@ -105,16 +116,22 @@ class Visit(CMakePackage):
# Fix const-correctness in VTK interface
patch("vtk-8.2-constcorrect.patch", when="@3.3.3 ^vtk@8.2.1a")
- # Exactly one of 'gui' or 'osmesa' has to be enabled
- conflicts("+gui", when="+osmesa")
+ # Add dectection for py-pip and enable python extensions with building with GUI
+ patch("19958-enable-python-and-check-pip.patch", when="@3.4:3.4.1 +python")
- depends_on("cmake@3.14.7:", type="build")
+ conflicts(
+ "+gui", when="^[virtuals=gl] osmesa", msg="GUI cannot be activated with OSMesa front-end"
+ )
+ depends_on("cmake@3.14.7:", type="build")
+ depends_on("cmake@3.24:", type="build", when="@3.4:")
depends_on("mpi", when="+mpi")
+ conflicts("mpi", when="~mpi")
# VTK flavors
- depends_on("vtk@8.1:8 +opengl2")
- depends_on("vtk +osmesa", when="+osmesa")
+ depends_on("vtk +opengl2")
+ depends_on("vtk@8.1:8", when="@:3.3")
+ depends_on("vtk@9.2.6", when="@3.4:")
depends_on("vtk +qt", when="+gui")
depends_on("vtk +python", when="+python")
depends_on("vtk +mpi", when="+mpi")
@@ -125,19 +142,22 @@ class Visit(CMakePackage):
depends_on(
"vtk",
patches=[patch("vtk_rendering_opengl2_x11.patch")],
- when="~osmesa platform=linux ^vtk@8",
+ when="platform=linux ^[virtuals=gl] glx ^vtk@8",
)
depends_on("vtk", patches=[patch("vtk_wrapping_python_x11.patch")], when="+python ^vtk@8")
depends_on("glu")
+ depends_on("gl")
# VisIt doesn't work with later versions of qt.
- depends_on("qt+gui+opengl@5:5.14", when="+gui")
+ depends_on("qt+gui+opengl", when="+gui")
+ depends_on("qt@5:5.14", when="+gui")
depends_on("qwt+opengl", when="+gui")
- # python@3.8 doesn't work with VisIt.
+ # python@3.8 doesn't work with older VisIt.
depends_on("python@3.2:3.7,3.9:", when="@:3.2 +python")
depends_on("python@3.2:", when="@3.3: +python")
+ depends_on("py-pip", when="+python")
extends("python", when="+python")
# VisIt uses the hdf5 1.8 api
@@ -153,7 +173,8 @@ class Visit(CMakePackage):
# VisIt uses Silo's 'ghost zone' data structures, which are only available
# in v4.10+ releases: https://wci.llnl.gov/simulation/computer-codes/silo/releases/release-notes-4.10
- depends_on("silo@4.10: +shared", when="+silo")
+ # Silo versions < 4.11 do not build successfully with Spack
+ depends_on("silo@4.11: +shared", when="+silo")
depends_on("silo+hdf5", when="+silo+hdf5")
depends_on("silo~hdf5", when="+silo~hdf5")
depends_on("silo+mpi", when="+silo+mpi")
@@ -170,13 +191,16 @@ class Visit(CMakePackage):
depends_on("mfem+shared+exceptions+fms+conduit", when="+mfem")
depends_on("libfms@0.2:", when="+mfem")
- depends_on("adios2@2.7.1", when="+adios2")
- depends_on("adios2+hdf5", when="+adios2+hdf5")
- depends_on("adios2~hdf5", when="+adios2~hdf5")
- depends_on("adios2+mpi", when="+adios2+mpi")
- depends_on("adios2~mpi", when="+adios2~mpi")
- depends_on("adios2+python", when="+adios2+python")
- depends_on("adios2~python", when="+adios2~python")
+ with when("+adios2"):
+ depends_on("adios2")
+ # adios 2.8 removed adios2_taustubs (https://github.com/visit-dav/visit/issues/19209)
+ # Fixed in 3.4.1
+ depends_on("adios2@:2.7.1", when="@:3.4.0")
+ depends_on("adios2+hdf5", when="+hdf5")
+ depends_on("adios2~hdf5", when="~hdf5")
+ depends_on("adios2+mpi", when="+mpi")
+ depends_on("adios2~mpi", when="~mpi")
+ depends_on("adios2+python", when="+python")
# For version 3.3.0 through 3.3.2, we used vtk-h to utilize vtk-m.
# For version starting with 3.3.3 we use vtk-m directly.
@@ -236,6 +260,12 @@ class Visit(CMakePackage):
self.define("VISIT_CONFIG_SITE", "NONE"),
]
+ # TODO: Remove this hack when VTK 8.2.1a is removed
+ if spec["vtk"].satisfies("@8.2.1a"):
+ args.append(self.define("VISIT_VTK_VERSION", "8.2.1"))
+ else:
+ args.append(self.define("VISIT_VTK_VERSION", str(spec["vtk"].version)))
+
# Provide the plugin compilation environment so as to extend VisIt
args.append(self.define_from_variant("VISIT_INSTALL_THIRD_PARTY", "plugins"))
@@ -287,10 +317,11 @@ class Visit(CMakePackage):
self.define("VISIT_OSMESA_DIR", "IGNORE"),
self.define("OpenGL_GL_PREFERENCE", "LEGACY"),
self.define("OPENGL_INCLUDE_DIR", spec["gl"].headers.directories[0]),
+ self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0]),
self.define("OPENGL_glu_LIBRARY", spec["glu"].libs[0]),
]
)
- if "+osmesa" in spec:
+ if spec.satisfies("^[virtuals=gl] osmesa"):
args.extend(
[
self.define("HAVE_OSMESA", True),
@@ -298,8 +329,6 @@ class Visit(CMakePackage):
self.define("OPENGL_gl_LIBRARY", spec["osmesa"].libs[0]),
]
)
- else:
- args.append(self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0]))
if "+hdf5" in spec:
args.append(self.define("HDF5_DIR", spec["hdf5"].prefix))
@@ -352,23 +381,23 @@ class Visit(CMakePackage):
args.append(self.define("VISIT_VTKH_DIR", spec["vtk-h"].prefix))
if "@3.3.3: +vtkm" in spec:
+ lib_dirs = [spec["libx11"].prefix.lib]
+ if self.spec.satisfies("^vtkm+rocm"):
+ lib_dirs.append(spec["hip"].prefix.lib)
args.append(self.define("VISIT_VTKM_DIR", spec["vtk-m"].prefix))
args.append(
self.define(
- "CMAKE_EXE_LINKER_FLAGS",
- "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix),
+ "CMAKE_EXE_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip()
)
)
args.append(
self.define(
- "CMAKE_MODULE_LINKER_FLAGS",
- "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix),
+ "CMAKE_MODULE_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip()
)
)
args.append(
self.define(
- "CMAKE_SHARED_LINKER_FLAGS",
- "-L%s/lib -L%s/lib" % (spec["hip"].prefix, spec["libx11"].prefix),
+ "CMAKE_SHARED_LINKER_FLAGS", "".join("-L%s " % s for s in lib_dirs).strip()
)
)
diff --git a/var/spack/repos/builtin/packages/vite/package.py b/var/spack/repos/builtin/packages/vite/package.py
index bf45ae8e66..3f760fd70d 100644
--- a/var/spack/repos/builtin/packages/vite/package.py
+++ b/var/spack/repos/builtin/packages/vite/package.py
@@ -20,6 +20,9 @@ class Vite(CMakePackage):
version("master", branch="master")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("qt+opengl")
depends_on("glm")
diff --git a/var/spack/repos/builtin/packages/vmatch/package.py b/var/spack/repos/builtin/packages/vmatch/package.py
index e5778416c0..f533443886 100644
--- a/var/spack/repos/builtin/packages/vmatch/package.py
+++ b/var/spack/repos/builtin/packages/vmatch/package.py
@@ -15,5 +15,7 @@ class Vmatch(Package):
version("2.3.0", sha256="5e18d0dddf04e86dad193fcdde6e48f3901365932634125602d8808f35acf979")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
install_tree(self.stage.source_path, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/vmc/package.py b/var/spack/repos/builtin/packages/vmc/package.py
index 683f58c350..b7b04b7a89 100644
--- a/var/spack/repos/builtin/packages/vmc/package.py
+++ b/var/spack/repos/builtin/packages/vmc/package.py
@@ -23,6 +23,8 @@ class Vmc(CMakePackage):
version("1-0-p2", sha256="46b4c82b0b7516502e88db920732fc78f06f0393ac740a17816f2eb53f80e75e")
version("1-0-p1", sha256="4a20515f7de426797955cec4a271958b07afbaa330770eeefb5805c882ad9749")
+ depends_on("cxx", type="build") # generated
+
patch("dict_fixes_101.patch", when="@1-0-p1")
depends_on("root@6.18.04: ~vmc")
diff --git a/var/spack/repos/builtin/packages/vmd/package.py b/var/spack/repos/builtin/packages/vmd/package.py
index f4986e0c6d..15b58af21b 100644
--- a/var/spack/repos/builtin/packages/vmd/package.py
+++ b/var/spack/repos/builtin/packages/vmd/package.py
@@ -24,7 +24,7 @@ class Vmd(Package):
homepage = "https://www.ks.uiuc.edu/Research/vmd/"
version(
"1.9.3",
- sha256="145b4d0cc10b56cadeb71e16c54ab8be713e268f11491714cd617422758ec643",
+ sha256="9427a7acb1c7809525f70f635bceeb7eff8e7574e7e3565d6f71f3d6ce405a71",
url="file://{0}/vmd-1.9.3.bin.LINUXAMD64-CUDA8-OptiX4-OSPRay111p1.opengl.tar.gz".format(
os.getcwd()
),
diff --git a/var/spack/repos/builtin/packages/volk/package.py b/var/spack/repos/builtin/packages/volk/package.py
index 601c5190c3..79c02bbb0c 100644
--- a/var/spack/repos/builtin/packages/volk/package.py
+++ b/var/spack/repos/builtin/packages/volk/package.py
@@ -31,5 +31,8 @@ class Volk(CMakePackage):
version("2.3.0", sha256="f42c928f561b128acfe4adb21227e4a62a3f6ab8103592fc3233765ff326d5fc")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3.4:", type=("build", "run"))
depends_on("py-mako@0.4.2:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/voms/package.py b/var/spack/repos/builtin/packages/voms/package.py
new file mode 100644
index 0000000000..bfbf92b572
--- /dev/null
+++ b/var/spack/repos/builtin/packages/voms/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Voms(AutotoolsPackage):
+ """The VOMS native service and APIs."""
+
+ homepage = "https://github.com/italiangrid/voms"
+ url = "https://github.com/italiangrid/voms/archive/refs/tags/v2.1.0.tar.gz"
+
+ maintainers("wdconinc")
+
+ license("Apache-2.0", checked_by="wdconinc")
+
+ version("2.1.0", sha256="2fd2468620af531c02e9ac495aaaf2a8d5b8cfbe24d4904f2e8fa7f64cdeeeec")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build")
+
+ depends_on("openssl")
+ depends_on("gsoap@2.7:")
+ depends_on("expat")
+ depends_on("zlib-api")
+
+ force_autoreconf = True
+
+ def patch(self):
+ filter_file(
+ r"/usr/bin/soapcpp2", f"{self.spec['gsoap'].prefix.bin.soapcpp2}", "m4/wsdl2h.m4"
+ )
+
+ def setup_build_environment(self, env):
+ # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=voms
+ pkgconfig = Executable(join_path(self.spec["pkgconfig"].prefix.bin, "pkg-config"))
+ env.set("GSOAP_SSL_PP_CFLAGS", pkgconfig("--cflags", "gsoapssl++", "zlib", output=str))
+ env.set("GSOAP_SSL_PP_LIBS", pkgconfig("--libs", "gsoapssl++", "zlib", output=str))
+
+ def autoreconf(self, spec, prefix):
+ autogen = Executable("./autogen.sh")
+ autogen()
+
+ def configure_args(self):
+ args = [f"--with-gsoap-wsdl2h={self.spec['gsoap'].prefix.bin.wsdl2h}"]
+ return args
diff --git a/var/spack/repos/builtin/packages/voropp/package.py b/var/spack/repos/builtin/packages/voropp/package.py
index 5a07ef7130..e9c358b513 100644
--- a/var/spack/repos/builtin/packages/voropp/package.py
+++ b/var/spack/repos/builtin/packages/voropp/package.py
@@ -6,26 +6,28 @@
from spack.package import *
-class Voropp(MakefilePackage):
+class Voropp(CMakePackage):
"""Voro++ is a open source software library for the computation of the
Voronoi diagram, a widely-used tessellation that has applications in many
scientific fields."""
- homepage = "http://math.lbl.gov/voro++/about.html"
- url = "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz"
+ homepage = "https://math.lbl.gov/voro++/about.html"
+ url = "https://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz"
+ git = "https://github.com/chr1shr/voro"
- variant("pic", default=True, description="Position independent code")
+ variant("shared", default=True, description="Build shared libraries")
license("BSD-3-Clause-LBNL")
+ version("master", branch="master")
version("0.4.6", sha256="ef7970071ee2ce3800daa8723649ca069dc4c71cc25f0f7d22552387f3ea437e")
- def edit(self, spec, prefix):
- filter_file(r"CC=g\+\+", "CC={0}".format(self.compiler.cxx), "config.mk")
- filter_file(r"PREFIX=/usr/local", "PREFIX={0}".format(self.prefix), "config.mk")
- # We can safely replace the default CFLAGS which are:
- # CFLAGS=-Wall -ansi -pedantic -O3
- cflags = ""
- if "+pic" in spec:
- cflags += self.compiler.cc_pic_flag
- filter_file(r"CFLAGS=.*", "CFLAGS={0}".format(cflags), "config.mk")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ patch("voro++-0.4.6-cmake.patch", when="@0.4.6")
+
+ def cmake_args(self):
+ args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
+
+ return args
diff --git a/var/spack/repos/builtin/packages/voropp/voro++-0.4.6-cmake.patch b/var/spack/repos/builtin/packages/voropp/voro++-0.4.6-cmake.patch
new file mode 100644
index 0000000000..48f2ab9a69
--- /dev/null
+++ b/var/spack/repos/builtin/packages/voropp/voro++-0.4.6-cmake.patch
@@ -0,0 +1,33 @@
+diff -Naur voro++-0.4.6.orig/CMakeLists.txt voro++-0.4.6/CMakeLists.txt
+--- voro++-0.4.6.orig/CMakeLists.txt 1969-12-31 17:00:00.000000000 -0700
++++ voro++-0.4.6/CMakeLists.txt 2024-10-16 21:14:06.755336366 -0600
+@@ -0,0 +1,3 @@
++# Set the minimum required version of cmake for a project.
++cmake_minimum_required(VERSION 2.6)
++add_subdirectory(src)
+diff -Naur voro++-0.4.6.orig/src/CMakeLists.txt voro++-0.4.6/src/CMakeLists.txt
+--- voro++-0.4.6.orig/src/CMakeLists.txt 1969-12-31 17:00:00.000000000 -0700
++++ voro++-0.4.6/src/CMakeLists.txt 2024-10-16 21:14:07.639351723 -0600
+@@ -0,0 +1,22 @@
++add_library(voro++ SHARED
++ cell.cc
++ common.cc
++ container.cc
++ unitcell.cc
++ v_compute.cc
++ c_loops.cc
++ v_base.cc wall.cc
++ pre_container.cc
++ container_prd.cc
++)
++set_target_properties(voro++ PROPERTIES VERSION 0.0.0 SOVERSION 0)
++
++add_executable(voro++-bin cmd_line.cc)
++set_target_properties(voro++-bin PROPERTIES OUTPUT_NAME voro++)
++target_link_libraries(voro++-bin voro++)
++
++file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.hh)
++
++install(TARGETS voro++ LIBRARY DESTINATION lib${LIB_SUFFIX})
++install(FILES ${HDR} DESTINATION include)
++install(TARGETS voro++-bin DESTINATION bin)
diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py
index 04ad3d39e5..2be5343d72 100644
--- a/var/spack/repos/builtin/packages/votca-csg/package.py
+++ b/var/spack/repos/builtin/packages/votca-csg/package.py
@@ -83,6 +83,8 @@ class VotcaCsg(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
for v in [
"1.4",
diff --git a/var/spack/repos/builtin/packages/votca-csgapps/package.py b/var/spack/repos/builtin/packages/votca-csgapps/package.py
index 2654417761..16f9358e0a 100644
--- a/var/spack/repos/builtin/packages/votca-csgapps/package.py
+++ b/var/spack/repos/builtin/packages/votca-csgapps/package.py
@@ -67,6 +67,8 @@ class VotcaCsgapps(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
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"]:
depends_on("votca-csg@%s" % v, when="@%s:%s.0" % (v, v))
depends_on("boost+exception+math+serialization+container")
diff --git a/var/spack/repos/builtin/packages/votca-ctp/package.py b/var/spack/repos/builtin/packages/votca-ctp/package.py
index e1846fe900..a56fbe0622 100644
--- a/var/spack/repos/builtin/packages/votca-ctp/package.py
+++ b/var/spack/repos/builtin/packages/votca-ctp/package.py
@@ -31,6 +31,9 @@ class VotcaCtp(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
depends_on("votca-tools@1.5.1")
depends_on("votca-csg@1.5.1")
diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py
index bb47d42a67..990a5f6839 100644
--- a/var/spack/repos/builtin/packages/votca-tools/package.py
+++ b/var/spack/repos/builtin/packages/votca-tools/package.py
@@ -83,6 +83,8 @@ class VotcaTools(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
# https://github.com/votca/tools/pull/229, fix mkl in exported target
patch(
"https://github.com/votca/tools/pull/229.patch?full_index=1",
diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py
index 5276740f71..3156ab4f12 100644
--- a/var/spack/repos/builtin/packages/votca-xtp/package.py
+++ b/var/spack/repos/builtin/packages/votca-xtp/package.py
@@ -78,6 +78,8 @@ class VotcaXtp(CMakePackage):
deprecated=True,
)
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@2.8:", type="build")
for v in [
"1.4.1",
diff --git a/var/spack/repos/builtin/packages/votca/package.py b/var/spack/repos/builtin/packages/votca/package.py
index 330f361cbd..b5edbe3612 100644
--- a/var/spack/repos/builtin/packages/votca/package.py
+++ b/var/spack/repos/builtin/packages/votca/package.py
@@ -20,10 +20,15 @@ class Votca(CMakePackage):
maintainers("junghans")
version("master", branch="master")
+ version("2024.2", sha256="aa9ea3ad54dae31d3f68685d12f3bad4910ef3034a7f51c9ddd573b3856f4bc8")
+ version("2024.1", sha256="68669a7d09020f780d2633eb865c6c53e5fb38d155f80c9670ebf9d10d10bee6")
+ version("2024", sha256="7f342e857f4a6ba6d25937f63830afa3c32cbd906255c8d78aa6c500cfd418c8")
version("2023", sha256="6150a38c77379d05592a56ae4392a00c4636d02198bb06108a3dc739a45115f8")
version("2022.1", sha256="358119b2645fe60f88ca621aed508c49fb61f88d29d3e3fa24b5b831ed4a66ec")
version("2022", sha256="7991137098ff4511f4ca2c6f1b6c45f53d92d9f84e5c0d0e32fbc31768f73a83")
+ depends_on("cxx", type="build") # generated
+
variant("mkl", default=False, description="Build with MKL support")
variant(
"new-gmx", default=False, description="Build against gromacs>2019 - no tabulated kernels"
@@ -38,7 +43,10 @@ class Votca(CMakePackage):
depends_on("expat")
depends_on("fftw-api@3")
depends_on("eigen@3.3:")
- depends_on("boost")
+ depends_on("boost+filesystem+system+regex+timer")
+ depends_on("boost@1.71:")
+ depends_on("boost@1.71:1.84", when="@=2024")
+ depends_on("boost@1.71:1.82", when="@:2023")
depends_on("mkl", when="+mkl")
depends_on("hdf5+cxx~mpi")
depends_on("gromacs~mpi@5.1:")
diff --git a/var/spack/repos/builtin/packages/vpfft/package.py b/var/spack/repos/builtin/packages/vpfft/package.py
index e2b09e2dc2..31f3830d30 100644
--- a/var/spack/repos/builtin/packages/vpfft/package.py
+++ b/var/spack/repos/builtin/packages/vpfft/package.py
@@ -24,6 +24,8 @@ class Vpfft(MakefilePackage):
version("develop")
+ depends_on("cxx", type="build") # generated
+
depends_on("eigen")
depends_on("fftw")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/vpic/package.py b/var/spack/repos/builtin/packages/vpic/package.py
index c51eaf3cb2..7cfd778434 100644
--- a/var/spack/repos/builtin/packages/vpic/package.py
+++ b/var/spack/repos/builtin/packages/vpic/package.py
@@ -24,6 +24,9 @@ class Vpic(CMakePackage):
version("develop", branch="master", submodules=True)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/vsearch/package.py b/var/spack/repos/builtin/packages/vsearch/package.py
index 29c9f563d4..81b0613da1 100644
--- a/var/spack/repos/builtin/packages/vsearch/package.py
+++ b/var/spack/repos/builtin/packages/vsearch/package.py
@@ -20,6 +20,9 @@ class Vsearch(AutotoolsPackage):
version("2.13.3", sha256="e5f34ece28b76403d3ba4a673eca41178fe399c35a1023dbc87d0c0da5efaa52")
version("2.4.3", sha256="f7ffc2aec5d76bdaf1ffe7fb733102138214cec3e3846eb225455dcc3c088141")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("m4", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/vsftpd/package.py b/var/spack/repos/builtin/packages/vsftpd/package.py
index 33d197d039..a10eb6d319 100644
--- a/var/spack/repos/builtin/packages/vsftpd/package.py
+++ b/var/spack/repos/builtin/packages/vsftpd/package.py
@@ -19,6 +19,8 @@ class Vsftpd(MakefilePackage):
version("3.0.2", sha256="be46f0e2c5528fe021fafc8dab1ecfea0c1f183063a06977f8537fcd0b195e56")
version("3.0.1", sha256="65487a9fccc0ae566df5999a84448a9ccb57b556b7643ffd345540299487784c")
+ depends_on("c", type="build") # generated
+
depends_on("libcap")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/vt/package.py b/var/spack/repos/builtin/packages/vt/package.py
index 9a4d34449c..5bd8e126cc 100644
--- a/var/spack/repos/builtin/packages/vt/package.py
+++ b/var/spack/repos/builtin/packages/vt/package.py
@@ -12,9 +12,13 @@ class Vt(MakefilePackage):
homepage = "https://genome.sph.umich.edu/wiki/vt"
url = "https://github.com/atks/vt/archive/0.577.tar.gz"
+ version("0.57721", sha256="8f06d464ec5458539cfa30f81a034f47fe7f801146fe8ca80c14a3816b704e17")
version("0.5772", sha256="b147520478a2f7c536524511e48133d0360e88282c7159821813738ccbda97e7")
version("0.577", sha256="009e2592e787ab37e471b4e8a66520141bb2791ca78142ca1767d27036f460d0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, spack):
diff --git a/var/spack/repos/builtin/packages/vtable-dumper/package.py b/var/spack/repos/builtin/packages/vtable-dumper/package.py
index 7be75560d0..75bff498fe 100644
--- a/var/spack/repos/builtin/packages/vtable-dumper/package.py
+++ b/var/spack/repos/builtin/packages/vtable-dumper/package.py
@@ -18,6 +18,8 @@ class VtableDumper(MakefilePackage):
version("1.1", sha256="f0a57a7b82a0a56845cea9ab56ad449e63f5f01c6a0c9f1467efa4ef60dd4a93")
version("1.0", sha256="a222de5a19bf716ab2f35148f43bbf8a052772b54ff622c6387a4ba2440fb9a0")
+ depends_on("c", type="build") # generated
+
depends_on("libelf")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/vtk-h/package.py b/var/spack/repos/builtin/packages/vtk-h/package.py
index 9a159e4e0b..011e479ff1 100644
--- a/var/spack/repos/builtin/packages/vtk-h/package.py
+++ b/var/spack/repos/builtin/packages/vtk-h/package.py
@@ -60,6 +60,9 @@ class VtkH(CMakePackage, CudaPackage):
version("0.5.3", sha256="0c4aae3bd2a5906738a6806de2b62ea2049ac8b40ebe7fc2ba25505272c2d359")
version("0.5.2", sha256="db2e6250c0ece6381fc90540317ad7b5869dbcce0231ce9be125916a77bfdb25")
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Build vtk-h as shared libs")
variant("mpi", default=True, description="build mpi support")
# set to false for systems that implicitly link mpi
diff --git a/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch b/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch
new file mode 100644
index 0000000000..c7ddcc44fb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk-m/mr3258-fix-typo-thrust-dependency-with-rocm.patch
@@ -0,0 +1,73 @@
+From be6649803d199c33bb6abcaab57074dca066f1c0 Mon Sep 17 00:00:00 2001
+From: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
+Date: Fri, 2 Aug 2024 17:43:54 -0400
+Subject: [PATCH] ci,thrust: fix typo thrust dependency with kokkos
+
+---
+ CMakeLists.txt | 14 ++++++++++++--
+ README.md | 1 +
+ vtkm/cont/kokkos/internal/CMakeLists.txt | 8 +++++++-
+ 3 files changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 561bee9835..46d1cfc37c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -264,11 +264,21 @@ include(VTKmWrappers)
+
+ # By default: Set VTKm_ENABLE_KOKKOS_THRUST to ON if VTKm_ENABLE_KOKKOS is ON, otherwise
+ # disable it (or if the user explicitly turns this option OFF)
+-cmake_dependent_option(VTKm_ENABLE_KOKKOS_THRUST "Enable Kokkos thrust support (only valid with CUDA and HIP)"
+- ON "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP" OFF)
++cmake_dependent_option(
++ VTKm_ENABLE_KOKKOS_THRUST
++ "Enable Kokkos thrust support (only valid with CUDA and HIP)"
++ ON
++ "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP; NOT Kokkos_ENABLE_HIP AND CMAKE_VERSION VERSION_LESS 3.24"
++ OFF
++)
+
+ # CUDA already provides thrust
+ if (VTKm_ENABLE_KOKKOS_THRUST AND TARGET vtkm_kokkos_hip)
++ if (CMAKE_VERSION VERSION_LESS 3.24)
++ message(FATAL_ERROR "VTKm_ENABLE_KOKKOS_THRUST=ON with HIP needs CMAKE >= 3.24")
++ endif()
++ # This policy is needed for LINK_ONLY to work in LINK_LIBRARIES.
++ cmake_policy(SET CMP0131 NEW)
+ find_package(rocthrust REQUIRED CONFIG)
+ endif()
+
+diff --git a/README.md b/README.md
+index aad908b955..8f5512a7e6 100644
+--- a/README.md
++++ b/README.md
+@@ -76,6 +76,7 @@ VTK-m Requires:
+ + [CMake](http://www.cmake.org/download/)
+ + CMake 3.12+
+ + CMake 3.13+ (for CUDA support)
++ + CMake 3.24+ (for ROCM+THRUST support)
+
+ Optional dependencies are:
+
+diff --git a/vtkm/cont/kokkos/internal/CMakeLists.txt b/vtkm/cont/kokkos/internal/CMakeLists.txt
+index 7777005f3e..210d9ed25c 100644
+--- a/vtkm/cont/kokkos/internal/CMakeLists.txt
++++ b/vtkm/cont/kokkos/internal/CMakeLists.txt
+@@ -35,7 +35,13 @@ if (TARGET vtkm_kokkos)
+ set_source_files_properties(${sources} TARGET_DIRECTORY vtkm_cont PROPERTIES LANGUAGE HIP)
+ kokkos_compilation(SOURCE ${sources})
+ if (VTKm_ENABLE_KOKKOS_THRUST)
+- target_link_libraries(vtkm_cont PRIVATE $<$<LINK_LANGUAGE:CUDA>:roc::rocthrust>)
++ # rocthrust does not wrap its compile defs/ops/dirs with $<$<COMPILE_LANGUAGE:HIP>.
++ # We need this workaround since we mix CXX and HIP source files in vtkm_cont.
++ target_link_libraries(vtkm_cont
++ PRIVATE
++ $<$<COMPILE_LANGUAGE:HIP>:roc::rocthrust>
++ $<LINK_ONLY:roc::rocthrust>
++ )
+ endif()
+ endif()
+
+--
+2.35.3
+
diff --git a/var/spack/repos/builtin/packages/vtk-m/mr3259-thrust-is_arithmetic-fix.patch b/var/spack/repos/builtin/packages/vtk-m/mr3259-thrust-is_arithmetic-fix.patch
new file mode 100644
index 0000000000..7b60ab777b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk-m/mr3259-thrust-is_arithmetic-fix.patch
@@ -0,0 +1,35 @@
+diff --git a/vtkm/exec/cuda/internal/WrappedOperators.h b/vtkm/exec/cuda/internal/WrappedOperators.h
+index bece57098..b46077e6a 100644
+--- a/vtkm/exec/cuda/internal/WrappedOperators.h
++++ b/vtkm/exec/cuda/internal/WrappedOperators.h
+@@ -22,6 +22,10 @@ VTKM_THIRDPARTY_PRE_INCLUDE
+ #include <thrust/system/cuda/memory.h>
+ VTKM_THIRDPARTY_POST_INCLUDE
+
++#if THRUST_VERSION >= 200500
++#include <cuda/std/type_traits>
++#endif
++
+ namespace vtkm
+ {
+ namespace exec
+@@ -193,11 +197,19 @@ namespace detail
+ // the binary functor is commutative and the T type is is_arithmetic
+ //
+ //
++#if THRUST_VERSION >= 200500
++template <typename T, typename F>
++struct is_commutative<vtkm::exec::cuda::internal::WrappedBinaryOperator<T, F>>
++ : public ::cuda::std::is_arithmetic<T>
++{
++};
++#else
+ template <typename T, typename F>
+ struct is_commutative<vtkm::exec::cuda::internal::WrappedBinaryOperator<T, F>>
+ : public thrust::detail::is_arithmetic<T>
+ {
+ };
++#endif
+ }
+ } //namespace thrust::detail
+
diff --git a/var/spack/repos/builtin/packages/vtk-m/mr3271-contourtree-print-error.patch b/var/spack/repos/builtin/packages/vtk-m/mr3271-contourtree-print-error.patch
new file mode 100644
index 0000000000..c8943aea9f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk-m/mr3271-contourtree-print-error.patch
@@ -0,0 +1,38 @@
+From 48e385af319543800398656645327243a29babfb Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <morelandkd@ornl.gov>
+Date: Tue, 15 Oct 2024 12:01:34 -0400
+Subject: [PATCH] Fix compile error for contour tree print
+
+A print for one of the contour tree objects was referencing members of
+itself that don't seem to exist. This causes the Intel compiler to fail
+to compile it. I'm at a loss about how any other compiler does not error
+out, but at any rate this should be correct.
+---
+ .../worklet/contourtree_distributed/HierarchicalContourTree.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h b/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
+index a996d4292..e40d5f4f1 100644
+--- a/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
++++ b/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
+@@ -663,7 +663,7 @@ std::string HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
+ auto hyperarcsPortal = this->Hyperarcs.ReadPortal();
+ auto regularNodeGlobalIdsPortal = this->RegularNodeGlobalIds.ReadPortal();
+ auto whichIterationPortal = this->WhichIteration.ReadPortal();
+- auto whichRoundPortal = this->whichRound.ReadPortal();
++ auto whichRoundPortal = this->WhichRound.ReadPortal();
+ auto superarcsPortal = this->Superarcs.ReadPortal();
+ auto superparentsPortal = this->Superparents.ReadPortal();
+ for (vtkm::Id supernode = 0; supernode < this->Supernodes.GetNumberOfValues(); supernode++)
+@@ -708,7 +708,7 @@ std::string HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
+ if (contourtree_augmented::NoSuchElement(superarcTo))
+ { // no superarc
+ // if it occurred on the final round, it's the global root and is shown as the NULL node
+- if (whichRoundPortal.Get(superarcFrom) == this->NRounds)
++ if (whichRoundPortal.Get(superarcFrom) == this->NumRounds)
+ { // root node
+ outstream << "\tSN" << std::setw(1) << superarcFrom << " -> SA" << std::setw(1) << superarc
+ << " [label=\"S" << std::setw(1) << superarc << "\",style=dotted]\n";
+--
+2.46.2
+
diff --git a/var/spack/repos/builtin/packages/vtk-m/mr3272-bad-mir-table-method.patch b/var/spack/repos/builtin/packages/vtk-m/mr3272-bad-mir-table-method.patch
new file mode 100644
index 0000000000..cf3987079b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk-m/mr3272-bad-mir-table-method.patch
@@ -0,0 +1,35 @@
+From c805a6039ea500cb96158cfc11271987c9f67aa4 Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <morelandkd@ornl.gov>
+Date: Tue, 15 Oct 2024 13:06:36 -0400
+Subject: [PATCH] Remove unused method from MIR tables
+
+The implementation of this method was incorrect as it referenced a class
+member that does not exist. Many compilers allowed it in a templated
+class when the method was never used, but other compilers attempt to
+compile the inlined method regardless.
+
+Since the method clearly is not needed, the easy solution is to remove
+it.
+---
+ vtkm/filter/contour/worklet/mir/MIRTables.h | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/vtkm/filter/contour/worklet/mir/MIRTables.h b/vtkm/filter/contour/worklet/mir/MIRTables.h
+index 3dff3329e..a6f4d4f1f 100644
+--- a/vtkm/filter/contour/worklet/mir/MIRTables.h
++++ b/vtkm/filter/contour/worklet/mir/MIRTables.h
+@@ -11400,11 +11400,6 @@ public:
+ return FacesLookup[shape];
+ }
+
+- VTKM_EXEC vtkm::UInt8 GetPoint(vtkm::Id pointIndex) const
+- {
+- return this->CellFacePortal.Get(pointIndex);
+- }
+-
+ private:
+ typename vtkm::cont::ArrayHandle<vtkm::UInt8>::ReadPortalType MIRTablesDataPortal;
+ typename vtkm::cont::ArrayHandle<vtkm::UInt16>::ReadPortalType MIRTablesIndicesPortal;
+--
+2.46.2
+
diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py
index d98da40018..09525457c2 100644
--- a/var/spack/repos/builtin/packages/vtk-m/package.py
+++ b/var/spack/repos/builtin/packages/vtk-m/package.py
@@ -7,6 +7,7 @@
import os
import sys
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -21,8 +22,8 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://m.vtk.org/"
maintainers("kmorel", "vicentebolea")
- url = "https://gitlab.kitware.com/vtk/vtk-m/-/archive/v1.5.1/vtk-m-v1.5.1.tar.gz"
- git = "https://gitlab.kitware.com/vtk/vtk-m.git"
+ url = "https://github.com/Kitware/VTK-m/archive/refs/tags/v2.2.0.tar.gz"
+ git = "https://github.com/Kitware/VTK-m.git"
tags = ["e4s"]
test_requires_compiler = True
@@ -30,38 +31,36 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
version("master", branch="master")
version("release", branch="release")
version(
- "2.1.0",
- sha256="9cf3522b6dc0675281a1a16839464ebd1cc5f9c08c20eabee1719b3bcfdcf41f",
+ "2.2.0",
+ sha256="f40d6b39ca1bcecd232571c92ce606627811909f4e21972d1823e605f686bcf5",
preferred=True,
)
- version("2.0.0", sha256="32643cf3564fa77f8e2a2a5456a574b6b2355bb68918eb62ccde493993ade1a3")
- version("1.9.0", sha256="12355dea1a24ec32767260068037adeb71abb3df2f9f920c92ce483f35ff46e4")
- version("1.8.0", sha256="fcedee6e8f4ac50dde56e8c533d48604dbfb663cea1561542a837e8e80ba8768")
- version("1.7.1", sha256="7ea3e945110b837a8c2ba49b41e45e1a1d8d0029bb472b291f7674871dbbbb63")
- version("1.7.0", sha256="a86667ac22057462fc14495363cfdcc486da125b366cb568ec23c86946439be4")
- version("1.6.0", sha256="14e62d306dd33f82eb9ddb1d5cee987b7a0b91bf08a7a02ca3bce3968c95fd76")
+ version("2.1.0", sha256="7b224f1f91e5ef140e193338bf091133b1e9f40d323bccdc8bb80bfc2675e6ea")
+ version("2.0.0", sha256="21c8b2cb8f3d4116a4f90c1d08c9f5e27b25c7a0951f7b403eced94576f84880")
+ version("1.9.0", sha256="f9862d9d24deae32063ba1ea3d9a42900ac0cdd7f98412d960249a7cac35d47f")
+ version("1.8.0", sha256="17f875e62b4c412574109af9b1bdbedbef49ab8797b113b69b21e6cfc64077d4")
+ version("1.7.1", sha256="c623895edde050f79d2d48e1abbaf4d537eaf544bc12bae0d4350614eb888011")
+ version("1.7.0", sha256="c334ce01aa1e6a506c9395789d41dc80c62234c3108506021b0cb104ba2eba7a")
+ version("1.6.0", sha256="6ab2124e51a2fbfcf2a90587d7b242e39afe08e75ea497a953c865741be3cc79")
version("1.5.5", commit="d2d1c854adc8c0518802f153b48afd17646b6252")
version("1.5.4", commit="bbba2a1967b271cc393abd043716d957bca97972")
version("1.5.3", commit="a3b8525ef97d94996ae843db0dd4f675c38e8b1e")
version("1.5.2", commit="c49390f2537c5ba8cf25bd39aa5c212d6eafcf61")
- version("1.5.1", sha256="64c19e66c0d579cfb21bb0df10d649b523b470b0c9a6c2ea5fd979dfeda2c25e")
- version("1.5.0", sha256="b1b13715c7fcc8d17f5c7166ff5b3e9025f6865dc33eb9b06a63471c21349aa8")
- version("1.4.0", sha256="8d83cca7cd5e204d10da151ce4f1846c1f7414c7c1e579173d15c5ea0631555a")
- version("1.3.0", sha256="f88c1b0a1980f695240eeed9bcccfa420cc089e631dc2917c9728a2eb906df2e")
- version("1.2.0", sha256="607272992e05f8398d196f0acdcb4af025a4a96cd4f66614c6341f31d4561763")
- version("1.1.0", sha256="78618c81ca741b1fbba0853cb5d7af12c51973b514c268fc96dfb36b853cdb18")
+ version("1.5.1", sha256="c6652fc03c9648b06f856231c270fc832e527d633d4bf6a9600b2175172f0a27")
+ version("1.5.0", sha256="d4ffc6f1176c1fda41852a3e8b83650b6765205b829b70f014f4100dd51161b8")
+ version("1.4.0", sha256="c70a9a19058dd32f15b1845b4bb40c0d3ad2b3916267c434e62cd3f6f256c1e6")
+ version("1.3.0", sha256="2d05a6545abfaa7594ef344389617fdca48c7f5ebddc617038544317b70ba19e")
+ version("1.2.0", sha256="44596e88b844e7626248fb8e96a38be25a0e585a22256b1c859208b23ef45171")
+ version("1.1.0", sha256="55f42c417d3a41893230b2fd3b5c192daeee689a2193de10bf22a1ef5c24c7ad")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("shared", default=False, description="build shared libs")
variant("doubleprecision", default=True, description="enable double precision")
variant("logging", default=False, when="@1.3:", description="build logging support")
variant(
- "ascent_types",
- default=True,
- when="~64bitids",
- description="build support for ascent types",
- )
- variant(
"virtuals",
default=False,
description="enable support for deprecated virtual functions",
@@ -88,6 +87,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
description="build openmp support",
)
variant("tbb", default=(sys.platform == "darwin"), description="build TBB support")
+ variant("sycl", default=False, description="Build with SYCL backend")
depends_on("cmake@3.12:", type="build") # CMake >= 3.12
depends_on("cmake@3.18:", when="+rocm", type="build") # CMake >= 3.18
@@ -124,7 +124,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
depends_on("hip@3.7:", when="+rocm")
# CUDA thrust is already include in the CUDA pkg
- depends_on("rocthrust", when="@2.1: +kokkos+rocm")
+ depends_on("rocthrust", when="@2.2: +kokkos+rocm ^cmake@3.24:")
# The rocm variant is only valid options for >= 1.7. It would be better if
# this could be expressed as a when clause to disable the rocm variant,
@@ -135,6 +135,13 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+rocm", when="~kokkos", msg="VTK-m does not support HIP without Kokkos")
conflicts("+rocm", when="+virtuals", msg="VTK-m does not support virtual functions with ROCm")
+ # VTK-m uses the Kokkos SYCL backend.
+ # If Kokkos provides multiple backends, the SYCL backend may or
+ # may not be used for VTK-m depending on the default selected by Kokkos
+ depends_on("kokkos +sycl", when="+kokkos +sycl")
+
+ conflicts("+sycl", when="~kokkos", msg="VTK-m does not support SYCL without Kokkos")
+
# Can build +shared+cuda after @1.7:
conflicts("+shared", when="@:1.6 +cuda_native")
conflicts("+cuda~cuda_native~kokkos", msg="Cannot have +cuda without a cuda device")
@@ -145,13 +152,46 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
# Patch
patch("diy-include-cstddef.patch", when="@1.5.3:1.8.0")
+ # VTK-M PR#3215
+ # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3215
+ patch("vtkm-mr3215-ext-geom-fix.patch", when="@2.1")
+
# VTK-M PR#2972
# https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2972
patch("vtkm-cuda-swap-conflict-pr2972.patch", when="@1.9 +cuda ^cuda@12:")
# VTK-M PR#3160
# https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3160
- patch("mr3160-rocthrust-fix.patch", when="@2.1:")
+ patch("mr3160-rocthrust-fix.patch", when="@2.1")
+
+ # VTK-M PR#3258
+ # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3258
+ patch("mr3258-fix-typo-thrust-dependency-with-rocm.patch", when="@2.2:")
+
+ # VTK-M PR#3259
+ # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3259
+ patch("mr3259-thrust-is_arithmetic-fix.patch", when="@2.0.0:2.2.0 +cuda ^cuda@12.6:")
+
+ # VTK-m PR#3271
+ # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3271
+ patch("mr3271-contourtree-print-error.patch", when="@2.0:2.2")
+
+ # VTK-m PR#3272
+ # https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/3272
+ patch("mr3272-bad-mir-table-method.patch", when="@2.0:2.2")
+
+ # Disable Thrust patch that is no longer needed in modern Thrust
+ patch(
+ "https://github.com/Kitware/VTK-m/commit/4a4466e7c8cd44d2be2bd3fe6f359faa8e9547aa.patch?full_index=1",
+ sha256="58dc104ba05ec99c359eeec3ac094cdb071053a4250f4ad9d72ef6a356c4346e",
+ when="@1.6.0:2.1 +cuda ^cuda@12.5:",
+ )
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ if self.spec.satisfies("@:2.2.0 %oneapi@2025:"):
+ flags.append("-Wno-error=missing-template-arg-list-after-template-kw")
+ return (flags, None, None)
def cmake_args(self):
spec = self.spec
@@ -188,14 +228,19 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
self.define_from_variant("VTKm_INSTALL_EXAMPLES", "examples"),
self.define_from_variant("VTKm_NO_DEPRECATED_VIRTUAL", "virtuals"),
self.define_from_variant("VTKm_USE_64BIT_IDS", "64bitids"),
- self.define_from_variant("VTKm_USE_DEFAULT_TYPES_FOR_ASCENT", "ascent_types"),
self.define_from_variant("VTKm_USE_DOUBLE_PRECISION", "doubleprecision"),
+ self.define(
+ "VTKm_USE_DEFAULT_TYPES_FOR_ASCENT", "~64bitids +doubleprecision" in spec
+ ),
]
if "+tbb" in spec:
# vtk-m detectes tbb via TBB_ROOT env var
os.environ["TBB_ROOT"] = spec["tbb"].prefix
+ if "+kokkos" in spec and "+rocm" in spec and spec.satisfies("^kokkos@4:"):
+ options.append(f"-DCMAKE_CXX_COMPILER:BOOL={spec['hip'].prefix.bin.hipcc}")
+
# Support for relocatable code
if "~shared" in spec and "+fpic" in spec:
options.append("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")
@@ -206,7 +251,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
options.append("-DCMAKE_CUDA_HOST_COMPILER={0}".format(env["SPACK_CXX"]))
if spec.satisfies("@1.9.0:") and spec.satisfies("^cmake@3.18:"):
- options.append(self.builder.define_cuda_architectures(self))
+ options.append(CMakeBuilder.define_cuda_architectures(self))
else:
# VTKm_CUDA_Architecture only accepts a single CUDA arch
@@ -226,18 +271,16 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
# hip support
if "+rocm" in spec:
- options.append(self.builder.define_hip_architectures(self))
+ options.append(CMakeBuilder.define_hip_architectures(self))
return options
- # Delegate in the vtk-m built smoke test
- def smoke_test(self):
+ def test_smoke_test(self):
+ """Build and run ctests"""
spec = self.spec
if "+examples" not in spec:
- raise RuntimeError(
- "Examples needed for smoke test missing", "reinstall with `+examples` variant"
- )
+ raise SkipTest("Package must be installed with +examples")
testdir = "smoke_test_build"
with working_dir(testdir, create=True):
@@ -252,7 +295,4 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def build_test(self):
- self.smoke_test()
-
- def test(self):
- self.smoke_test()
+ self.test_smoke_test()
diff --git a/var/spack/repos/builtin/packages/vtk-m/vtkm-mr3215-ext-geom-fix.patch b/var/spack/repos/builtin/packages/vtk-m/vtkm-mr3215-ext-geom-fix.patch
new file mode 100644
index 0000000000..ed82e5630e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk-m/vtkm-mr3215-ext-geom-fix.patch
@@ -0,0 +1,145 @@
+From 49518e5054c607942f644c82a5289e12b0f50476 Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <morelandkd@ornl.gov>
+Date: Fri, 3 May 2024 09:22:56 -0400
+Subject: [PATCH] Fix bug with ExtractGeometry filter
+
+The `ExtractGeometry` filter was outputing datasets containing
+`CellSetPermutation` as the representation for the cells. Although this is
+technically correct and a very fast implementation, it is essentially
+useless. The problem is that any downstream processing will have to know
+that the data has a `CellSetPermutation`. None do (because the permutation
+can be on any other cell set type, which creates an explosion of possible
+cell types).
+
+Like was done with `Threshold` a while ago, this problem is fixed by deep
+copying the result into a `CellSetExplicit`. This behavior is consistent
+with VTK.
+---
+ .../changelog/extract-geometry-permutation.md | 13 +++++++
+ .../testing/UnitTestExtractGeometryFilter.cxx | 13 ++++++-
+ .../worklet/ExtractGeometry.h | 34 +++++++------------
+ 3 files changed, 37 insertions(+), 23 deletions(-)
+ create mode 100644 docs/changelog/extract-geometry-permutation.md
+
+diff --git a/docs/changelog/extract-geometry-permutation.md b/docs/changelog/extract-geometry-permutation.md
+new file mode 100644
+index 0000000000..8a90495f76
+--- /dev/null
++++ b/docs/changelog/extract-geometry-permutation.md
+@@ -0,0 +1,13 @@
++# Fix bug with ExtractGeometry filter
++
++The `ExtractGeometry` filter was outputing datasets containing
++`CellSetPermutation` as the representation for the cells. Although this is
++technically correct and a very fast implementation, it is essentially
++useless. The problem is that any downstream processing will have to know
++that the data has a `CellSetPermutation`. None do (because the permutation
++can be on any other cell set type, which creates an explosion of possible
++cell types).
++
++Like was done with `Threshold` a while ago, this problem is fixed by deep
++copying the result into a `CellSetExplicit`. This behavior is consistent
++with VTK.
+diff --git a/vtkm/filter/entity_extraction/testing/UnitTestExtractGeometryFilter.cxx b/vtkm/filter/entity_extraction/testing/UnitTestExtractGeometryFilter.cxx
+index 675df8f77c..14de333666 100644
+--- a/vtkm/filter/entity_extraction/testing/UnitTestExtractGeometryFilter.cxx
++++ b/vtkm/filter/entity_extraction/testing/UnitTestExtractGeometryFilter.cxx
+@@ -11,6 +11,7 @@
+ #include <vtkm/cont/testing/MakeTestDataSet.h>
+ #include <vtkm/cont/testing/Testing.h>
+
++#include <vtkm/filter/clean_grid/CleanGrid.h>
+ #include <vtkm/filter/entity_extraction/ExtractGeometry.h>
+
+ using vtkm::cont::testing::MakeTestDataSet;
+@@ -41,11 +42,21 @@ public:
+ vtkm::cont::DataSet output = extractGeometry.Execute(dataset);
+ VTKM_TEST_ASSERT(test_equal(output.GetNumberOfCells(), 8), "Wrong result for ExtractGeometry");
+
++ vtkm::filter::clean_grid::CleanGrid cleanGrid;
++ cleanGrid.SetCompactPointFields(true);
++ cleanGrid.SetMergePoints(false);
++ vtkm::cont::DataSet cleanOutput = cleanGrid.Execute(output);
++
+ vtkm::cont::ArrayHandle<vtkm::Float32> outCellData;
+- output.GetField("cellvar").GetData().AsArrayHandle(outCellData);
++ cleanOutput.GetField("cellvar").GetData().AsArrayHandle(outCellData);
+
+ VTKM_TEST_ASSERT(outCellData.ReadPortal().Get(0) == 21.f, "Wrong cell field data");
+ VTKM_TEST_ASSERT(outCellData.ReadPortal().Get(7) == 42.f, "Wrong cell field data");
++
++ vtkm::cont::ArrayHandle<vtkm::Float32> outPointData;
++ cleanOutput.GetField("pointvar").GetData().AsArrayHandle(outPointData);
++ VTKM_TEST_ASSERT(outPointData.ReadPortal().Get(0) == 99);
++ VTKM_TEST_ASSERT(outPointData.ReadPortal().Get(7) == 90);
+ }
+
+ static void TestUniformByBox1()
+diff --git a/vtkm/filter/entity_extraction/worklet/ExtractGeometry.h b/vtkm/filter/entity_extraction/worklet/ExtractGeometry.h
+index 97521335f2..449d7eae60 100644
+--- a/vtkm/filter/entity_extraction/worklet/ExtractGeometry.h
++++ b/vtkm/filter/entity_extraction/worklet/ExtractGeometry.h
+@@ -10,11 +10,13 @@
+ #ifndef vtkm_m_worklet_ExtractGeometry_h
+ #define vtkm_m_worklet_ExtractGeometry_h
+
++#include <vtkm/worklet/CellDeepCopy.h>
+ #include <vtkm/worklet/WorkletMapTopology.h>
+
+ #include <vtkm/cont/Algorithm.h>
+ #include <vtkm/cont/ArrayCopy.h>
+ #include <vtkm/cont/ArrayHandle.h>
++#include <vtkm/cont/CellSetExplicit.h>
+ #include <vtkm/cont/CellSetPermutation.h>
+ #include <vtkm/cont/CoordinateSystem.h>
+ #include <vtkm/cont/Invoker.h>
+@@ -114,28 +116,13 @@ public:
+ }
+ };
+
+- ////////////////////////////////////////////////////////////////////////////////////
+- // Extract cells by ids permutes input data
+- template <typename CellSetType>
+- vtkm::cont::CellSetPermutation<CellSetType> Run(const CellSetType& cellSet,
+- const vtkm::cont::ArrayHandle<vtkm::Id>& cellIds)
+- {
+- using OutputType = vtkm::cont::CellSetPermutation<CellSetType>;
+-
+- vtkm::cont::ArrayCopy(cellIds, this->ValidCellIds);
+-
+- return OutputType(this->ValidCellIds, cellSet);
+- }
+-
+- ////////////////////////////////////////////////////////////////////////////////////
+- // Extract cells by implicit function permutes input data
+ template <typename CellSetType, typename ImplicitFunction>
+- vtkm::cont::CellSetPermutation<CellSetType> Run(const CellSetType& cellSet,
+- const vtkm::cont::CoordinateSystem& coordinates,
+- const ImplicitFunction& implicitFunction,
+- bool extractInside,
+- bool extractBoundaryCells,
+- bool extractOnlyBoundaryCells)
++ vtkm::cont::CellSetExplicit<> Run(const CellSetType& cellSet,
++ const vtkm::cont::CoordinateSystem& coordinates,
++ const ImplicitFunction& implicitFunction,
++ bool extractInside,
++ bool extractBoundaryCells,
++ bool extractOnlyBoundaryCells)
+ {
+ // Worklet output will be a boolean passFlag array
+ vtkm::cont::ArrayHandle<bool> passFlags;
+@@ -149,7 +136,10 @@ public:
+ vtkm::cont::Algorithm::CopyIf(indices, passFlags, this->ValidCellIds);
+
+ // generate the cellset
+- return vtkm::cont::CellSetPermutation<CellSetType>(this->ValidCellIds, cellSet);
++ vtkm::cont::CellSetPermutation<CellSetType> permutedCellSet(this->ValidCellIds, cellSet);
++
++ vtkm::cont::CellSetExplicit<> outputCells;
++ return vtkm::worklet::CellDeepCopy::Run(permutedCellSet);
+ }
+
+ vtkm::cont::ArrayHandle<vtkm::Id> GetValidCellIds() const { return this->ValidCellIds; }
+--
+GitLab
+
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index 1a2fa8786d..e972c5b582 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import glob
import os
from spack.package import *
@@ -19,10 +20,15 @@ class Vtk(CMakePackage):
url = "https://www.vtk.org/files/release/9.0/VTK-9.0.0.tar.gz"
list_url = "https://www.vtk.org/download/"
- maintainers("chuckatkins", "danlipsa")
+ maintainers("chuckatkins", "danlipsa", "johnwparent")
license("BSD-3-Clause")
+ version(
+ "9.3.1",
+ sha256="8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8",
+ preferred=True,
+ )
version("9.2.6", sha256="06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12")
version("9.2.2", sha256="1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075")
version("9.1.0", sha256="8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96")
@@ -48,14 +54,18 @@ class Vtk(CMakePackage):
version("6.3.0", sha256="92a493354c5fa66bea73b5fc014154af5d9f3f6cee8d20a826f4cd5d4b0e8a5e")
version("6.1.0", sha256="bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("pkgconfig", type="build", when="platform=linux")
+
# VTK7 defaults to OpenGL2 rendering backend
variant("opengl2", default=True, description="Enable OpenGL2 backend")
- variant("osmesa", default=False, description="Enable OSMesa support")
variant("python", default=False, description="Enable Python support", when="@8:")
variant("qt", default=False, description="Build with support for Qt")
variant("xdmf", default=False, description="Build XDMF file support")
variant("ffmpeg", default=False, description="Build with FFMPEG support")
variant("mpi", default=True, description="Enable MPI support")
+ variant("examples", default=False, description="Enable building & installing the VTK examples")
patch("gcc.patch", when="@6.1.0")
# patch to fix some missing stl includes
@@ -73,18 +83,19 @@ class Vtk(CMakePackage):
patch("xdmf2-hdf51.13.2.patch", when="@9:9.2.2 +xdmf")
# We cannot build with both osmesa and qt in spack
- conflicts("+osmesa", when="+qt")
+ conflicts("^osmesa", when="+qt")
conflicts("%gcc@13", when="@9.2")
- with when("+python"):
- # Depend on any Python, add bounds below.
- extends("python@2.7:", type=("build", "run"))
- depends_on("python@:3.7", when="@:8.2.0", type=("build", "run"))
- # Python 3.8 support from vtk 9 and patched 8.2
- depends_on("python@:3.8", when="@:8.2.1a", type=("build", "run"))
- # Python 3.10 support from vtk 9.2
- depends_on("python@:3.9", when="@:9.1", type=("build", "run"))
+ # Based on PyPI wheel availability
+ with when("+python"), default_args(type=("build", "link", "run")):
+ depends_on("python@:3.13")
+ depends_on("python@:3.12", when="@:9.3")
+ depends_on("python@:3.11", when="@:9.2")
+ depends_on("python@:3.10", when="@:9.2.2")
+ depends_on("python@:3.9", when="@:9.1")
+ depends_on("python@:3.8", when="@:9.0.1")
+ depends_on("python@:3.7", when="@:8.2.0")
# We need mpi4py if buidling python wrappers and using MPI
depends_on("py-mpi4py", when="+python+mpi", type="run")
@@ -96,8 +107,9 @@ class Vtk(CMakePackage):
# Broken downstream FindMPI
patch("vtkm-findmpi-downstream.patch", when="@9.0.0")
- # use internal FindHDF5
- patch("internal_findHDF5.patch", when="@:8")
+ for plat in ["linux", "darwin", "freebsd"]:
+ # use internal FindHDF5
+ patch("internal_findHDF5.patch", when=f"@:8 platform={plat}")
# Fix IOADIOS2 module to work with kits
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8653
@@ -116,13 +128,27 @@ class Vtk(CMakePackage):
depends_on("gl@3.2:", when="+opengl2")
depends_on("gl@1.2:", when="~opengl2")
- with when("~osmesa"):
- depends_on("glx", when="platform=linux")
- depends_on("glx", when="platform=cray")
- depends_on("libxt", when="platform=linux")
- depends_on("libxt", when="platform=cray")
-
- depends_on("osmesa", when="+osmesa")
+ depends_on("xz")
+ patch("vtk_find_liblzma.patch", when="@8.2")
+ patch("vtk_movie_link_ogg.patch", when="@8.2")
+ patch("vtk_use_sqlite_name_vtk_expects.patch", when="@8.2")
+ patch("vtk_proj_include_no_strict.patch", when="@9: platform=windows")
+ # allow proj to be detected via a CMake produced export config file
+ # failing that, falls back on standard library detection
+ # required for VTK to build against modern proj/more robustly
+ patch("vtk_findproj_config.patch", when="@9:")
+ # adds a fake target alias'ing the hdf5 target to prevent
+ # checks for that target from falling on VTK's empty stub target
+ # Required to consume netcdf and hdf5 both built
+ # with CMake from VTK
+ # a patch with the same name is also applied to paraview
+ # the two patches are the same but for the path to the files they patch
+ patch("vtk_alias_hdf5.patch", when="@9:")
+ # VTK 9.0 on Windows uses dll instead of lib for hdf5-hl target, which fails linking. Can't
+ # be fixed by bumping CMake lower bound, because VTK vendors FindHDF5.cmake. Various other
+ # patches to FindHDF5.cmake are missing, so add conflict instead of a series of patches.
+ conflicts("@9.0 platform=windows")
+ depends_on("libxt", when="^[virtuals=gl] glx platform=linux")
# VTK will need Qt5OpenGL, and qt needs '-opengl' for that
depends_on("qt+opengl", when="+qt")
@@ -153,21 +179,22 @@ class Vtk(CMakePackage):
depends_on("lz4")
depends_on("netcdf-c~mpi", when="~mpi")
depends_on("netcdf-c+mpi", when="+mpi")
- depends_on("netcdf-cxx")
+ depends_on("netcdf-cxx4", when="@:8.1.2")
depends_on("libpng")
depends_on("libtiff")
depends_on("zlib-api")
depends_on("eigen", when="@8.2.0:")
depends_on("double-conversion", when="@8.2.0:")
depends_on("sqlite", when="@8.2.0:")
- depends_on("pugixml", when="@8.2.0:")
+ depends_on("pugixml", when="@8.3.0:")
depends_on("libogg")
depends_on("libtheora")
depends_on("utf8cpp", when="@9:")
depends_on("gl2ps", when="@8.1:")
depends_on("gl2ps@1.4.1:", when="@9:")
- depends_on("proj@4", when="@8.2.0")
- depends_on("proj@4:7", when="@9:")
+ # "8.2.1a" uses an internal proj so this special cases 8.2.1a
+ depends_on("proj@4:7", when="@:8.2.0, 9:9.1")
+ depends_on("proj@8:", when="@9.2:")
depends_on("cgns@4.1.1:+mpi", when="@9.1: +mpi")
depends_on("cgns@4.1.1:~mpi", when="@9.1: ~mpi")
with when("@9.1:"):
@@ -203,6 +230,14 @@ class Vtk(CMakePackage):
when="@9.1",
)
+ # vtk@9 does not compile with gcc 13 or 14
+ # https://gitlab.kitware.com/vtk/vtk/-/issues/18782
+ patch(
+ "https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9996.diff",
+ sha256="dab51ffd0d62b00c089c1245e6b105f740106b53893305c87193d4ba03a948e0",
+ when="@9.1:9.2 %gcc@13:",
+ )
+
@when("@9.2:")
def patch(self):
# provide definition for Ioss::Init::Initializer::Initializer(),
@@ -265,6 +300,7 @@ class Vtk(CMakePackage):
cmake_args.extend(
[
"-DVTK_USE_EXTERNAL:BOOL=ON",
+ "-DVTK_MODULE_USE_EXTERNAL_VTK_fast_float:BOOL=OFF",
"-DVTK_MODULE_USE_EXTERNAL_VTK_libharu:BOOL=OFF",
"-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl:BOOL=OFF",
"-DHDF5_ROOT={0}".format(spec["hdf5"].prefix),
@@ -309,8 +345,6 @@ class Vtk(CMakePackage):
# Enable/Disable wrappers for Python.
if "+python" in spec:
cmake_args.append("-DVTK_WRAP_PYTHON=ON")
- if spec.satisfies("@:8"):
- cmake_args.append("-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path))
if "+mpi" in spec and spec.satisfies("@:8"):
cmake_args.append("-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON")
if spec.satisfies("@9.0.0: ^python@3:"):
@@ -407,7 +441,7 @@ class Vtk(CMakePackage):
cmake_args.append("-DVTK_RENDERING_BACKEND:STRING=" + opengl_ver)
- if "+osmesa" in spec:
+ if spec.satisfies("^[virtuals=gl] osmesa"):
cmake_args.extend(
[
"-DVTK_USE_X:BOOL=OFF",
@@ -473,5 +507,18 @@ class Vtk(CMakePackage):
"-DCMAKE_CXX_FLAGS={0}".format(compile_flags),
]
)
+ if spec.satisfies("@:8"):
+ vtk_example_arg = "BUILD_EXAMPLES"
+ else:
+ vtk_example_arg = "VTK_BUILD_EXAMPLES"
+ cmake_args.append(self.define_from_variant(f"{vtk_example_arg}", "examples"))
return cmake_args
+
+ @when("+examples")
+ def install(self, spec, prefix):
+ super().install(spec, prefix)
+ with working_dir(self.build_directory):
+ examples = glob.glob("bin\\*.exe")
+ for example in examples:
+ install(example, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_alias_hdf5.patch b/var/spack/repos/builtin/packages/vtk/vtk_alias_hdf5.patch
new file mode 100644
index 0000000000..c2e33e4ecb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_alias_hdf5.patch
@@ -0,0 +1,14 @@
+diff --git a/CMake/patches/99/FindHDF5.cmake b/CMake/patches/99/FindHDF5.cmake
+index b54877d519..adf5d84430 100644
+--- a/CMake/patches/99/FindHDF5.cmake
++++ b/CMake/patches/99/FindHDF5.cmake
+@@ -1150,6 +1150,9 @@ if (HDF5_FOUND)
+ endif ()
+ endif ()
+ endforeach ()
++ if(NOT TARGET "hdf5")
++ add_library(hdf5 ALIAS hdf5::hdf5)
++ endif()
+ unset(hdf5_lang)
+
+ if (HDF5_DIFF_EXECUTABLE AND NOT TARGET hdf5::h5diff)
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_find_liblzma.patch b/var/spack/repos/builtin/packages/vtk/vtk_find_liblzma.patch
new file mode 100644
index 0000000000..7ad2c9961e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_find_liblzma.patch
@@ -0,0 +1,11 @@
+diff --git a/CMake/FindLZMA.cmake b/CMake/FindLZMA.cmake
+index 213ab18df1..c9e693800b 100644
+--- a/CMake/FindLZMA.cmake
++++ b/CMake/FindLZMA.cmake
+@@ -1,5 +1,5 @@
+
+-find_library(LZMA_LIBRARIES NAMES lzma)
++find_library(LZMA_LIBRARIES NAMES lzma liblzma)
+ find_path(LZMA_INCLUDE_DIRS NAMES lzma.h)
+
+ include(FindPackageHandleStandardArgs)
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_findproj_config.patch b/var/spack/repos/builtin/packages/vtk/vtk_findproj_config.patch
new file mode 100644
index 0000000000..3621f80e3f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_findproj_config.patch
@@ -0,0 +1,115 @@
+diff --git a/CMake/FindLibPROJ.cmake b/CMake/FindLibPROJ.cmake
+index e2344bb171..68061c05f5 100644
+--- a/CMake/FindLibPROJ.cmake
++++ b/CMake/FindLibPROJ.cmake
+@@ -1,42 +1,76 @@
+-find_path(LibPROJ_INCLUDE_DIR
+- NAMES proj_api.h proj.h
+- DOC "libproj include directories")
+-mark_as_advanced(LibPROJ_INCLUDE_DIR)
++# Mirror the expected configuration from a manual
++# detection of proj
++macro(setup_proj_conf PROJ_NAME)
++ set(_PROJ_FOUND TRUE)
++ set(LibPROJ_LIBRARY ${${PROJ_NAME}_LIBRARIES})
++ set(LibPROJ_LIBRARIES ${${PROJ_NAME}_LIBRARIES})
++ set(LibPROJ_INCLUDE_DIR ${${PROJ_NAME}_INCLUDE_DIRS})
++ set(LibPROJ_INCLUDE_DIRS ${${PROJ_NAME}_INCLUDE_DIRS})
++ set(LibPROJ_VERSION ${${PROJ_NAME}_VERSION})
++ string(REPLACE "." ";" _VERSION ${LibPROJ_VERSION})
++ list(GET _VERSION 0 LibPROJ_MAJOR_VERSION)
++ if(TARGET ${PROJ_NAME}::proj)
++ add_library(LibPROJ::LibPROJ ALIAS ${PROJ_NAME}::proj)
++ endif()
++endmacro()
+
+-find_library(LibPROJ_LIBRARY_RELEASE
+- NAMES proj
+- DOC "libproj release library")
+-mark_as_advanced(LibPROJ_LIBRARY_RELEASE)
++set(_PROJ_FOUND)
++# Try to find proj with installed proj-config.cmake
++if(NOT LibPROJ_FOUND AND NOT LibPROJ_NO_FIND_CONFIG_FILE)
++ # Try find proj4 to support legacy proj CMake config
++ find_package(PROJ4 QUIET NO_MODULE)
++ if(PROJ4_FOUND)
++ setup_proj_conf(PROJ4)
++ else()
++ # Try to find proj with modern target name
++ find_package(PROJ QUIET NO_MODULE)
++ if(PROJ_FOUND)
++ setup_proj_conf(PROJ)
++ endif()
++ endif()
++endif()
+
+-find_library(LibPROJ_LIBRARY_DEBUG
+- NAMES projd
+- DOC "libproj debug library")
+-mark_as_advanced(LibPROJ_LIBRARY_DEBUG)
++if(NOT _PROJ_FOUND)
++ find_path(LibPROJ_INCLUDE_DIR
++ NAMES proj_api.h proj.h
++ DOC "libproj include directories")
++ mark_as_advanced(LibPROJ_INCLUDE_DIR)
+
+-include(SelectLibraryConfigurations)
+-select_library_configurations(LibPROJ)
++ find_library(LibPROJ_LIBRARY_RELEASE
++ NAMES proj
++ DOC "libproj release library")
++ mark_as_advanced(LibPROJ_LIBRARY_RELEASE)
+
+-if (LibPROJ_INCLUDE_DIR)
+- if (EXISTS "${LibPROJ_INCLUDE_DIR}/proj.h")
+- file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj.h" _libproj_version_lines REGEX "#define[ \t]+PROJ_VERSION_(MAJOR|MINOR|PATCH)")
+- string(REGEX REPLACE ".*PROJ_VERSION_MAJOR *\([0-9]*\).*" "\\1" _libproj_version_major "${_libproj_version_lines}")
+- string(REGEX REPLACE ".*PROJ_VERSION_MINOR *\([0-9]*\).*" "\\1" _libproj_version_minor "${_libproj_version_lines}")
+- string(REGEX REPLACE ".*PROJ_VERSION_PATCH *\([0-9]*\).*" "\\1" _libproj_version_patch "${_libproj_version_lines}")
+- else ()
+- file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj_api.h" _libproj_version_lines REGEX "#define[ \t]+PJ_VERSION")
+- string(REGEX REPLACE ".*PJ_VERSION *\([0-9]*\).*" "\\1" _libproj_version "${_libproj_version_lines}")
+- math(EXPR _libproj_version_major "${_libproj_version} / 100")
+- math(EXPR _libproj_version_minor "(${_libproj_version} % 100) / 10")
+- math(EXPR _libproj_version_patch "${_libproj_version} % 10")
++ find_library(LibPROJ_LIBRARY_DEBUG
++ NAMES projd
++ DOC "libproj debug library")
++ mark_as_advanced(LibPROJ_LIBRARY_DEBUG)
++
++ include(SelectLibraryConfigurations)
++ select_library_configurations(LibPROJ)
++
++ if (LibPROJ_INCLUDE_DIR)
++ if (EXISTS "${LibPROJ_INCLUDE_DIR}/proj.h")
++ file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj.h" _libproj_version_lines REGEX "#define[ \t]+PROJ_VERSION_(MAJOR|MINOR|PATCH)")
++ string(REGEX REPLACE ".*PROJ_VERSION_MAJOR *\([0-9]*\).*" "\\1" _libproj_version_major "${_libproj_version_lines}")
++ string(REGEX REPLACE ".*PROJ_VERSION_MINOR *\([0-9]*\).*" "\\1" _libproj_version_minor "${_libproj_version_lines}")
++ string(REGEX REPLACE ".*PROJ_VERSION_PATCH *\([0-9]*\).*" "\\1" _libproj_version_patch "${_libproj_version_lines}")
++ else ()
++ file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj_api.h" _libproj_version_lines REGEX "#define[ \t]+PJ_VERSION")
++ string(REGEX REPLACE ".*PJ_VERSION *\([0-9]*\).*" "\\1" _libproj_version "${_libproj_version_lines}")
++ math(EXPR _libproj_version_major "${_libproj_version} / 100")
++ math(EXPR _libproj_version_minor "(${_libproj_version} % 100) / 10")
++ math(EXPR _libproj_version_patch "${_libproj_version} % 10")
++ endif ()
++ set(LibPROJ_VERSION "${_libproj_version_major}.${_libproj_version_minor}.${_libproj_version_patch}")
++ set(LibPROJ_MAJOR_VERSION "${_libproj_version_major}")
++ unset(_libproj_version_major)
++ unset(_libproj_version_minor)
++ unset(_libproj_version_patch)
++ unset(_libproj_version)
++ unset(_libproj_version_lines)
+ endif ()
+- set(LibPROJ_VERSION "${_libproj_version_major}.${_libproj_version_minor}.${_libproj_version_patch}")
+- set(LibPROJ_MAJOR_VERSION "${_libproj_version_major}")
+- unset(_libproj_version_major)
+- unset(_libproj_version_minor)
+- unset(_libproj_version_patch)
+- unset(_libproj_version)
+- unset(_libproj_version_lines)
+-endif ()
++endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LibPROJ
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_movie_link_ogg.patch b/var/spack/repos/builtin/packages/vtk/vtk_movie_link_ogg.patch
new file mode 100644
index 0000000000..d020286678
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_movie_link_ogg.patch
@@ -0,0 +1,12 @@
+diff --git a/IO/Movie/module.cmake b/IO/Movie/module.cmake
+index 4275171403..dd1efc3dd9 100644
+--- a/IO/Movie/module.cmake
++++ b/IO/Movie/module.cmake
+@@ -1,6 +1,6 @@
+ if(NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
+ if(NOT ${CMAKE_CROSSCOMPILING})
+- set(vtkIOMovie_vtkoggtheora vtktheora)
++ set(vtkIOMovie_vtkoggtheora vtkogg vtktheora)
+ endif()
+ endif()
+ vtk_module(vtkIOMovie
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_proj_include_no_strict.patch b/var/spack/repos/builtin/packages/vtk/vtk_proj_include_no_strict.patch
new file mode 100644
index 0000000000..209501623d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_proj_include_no_strict.patch
@@ -0,0 +1,26 @@
+diff --git a/ThirdParty/libproj/vtk_libproj.h.in b/ThirdParty/libproj/vtk_libproj.h.in
+index 00cd3599e3..3ce90dd198 100644
+--- a/ThirdParty/libproj/vtk_libproj.h.in
++++ b/ThirdParty/libproj/vtk_libproj.h.in
+@@ -26,6 +26,10 @@
+ #endif
+
+ #if VTK_MODULE_USE_EXTERNAL_vtklibproj
++# ifdef STRICT
++# define _OLD_STRICT STRICT
++# undef STRICT
++# endif
+ # if VTK_LibPROJ_MAJOR_VERSION >= 5
+ # include <proj.h>
+ # include <proj/io.hpp>
+@@ -35,6 +39,10 @@
+ # include <projects.h>
+ # endif
+ # include <geodesic.h>
++# ifdef _OLD_STRICT
++# define STRICT _OLD_STRICT
++# undef _OLD_STRICT
++# endif
+ #else
+ # include <vtklibproj/src/proj.h>
+ # include <vtklibproj/src/geodesic.h>
diff --git a/var/spack/repos/builtin/packages/vtk/vtk_use_sqlite_name_vtk_expects.patch b/var/spack/repos/builtin/packages/vtk/vtk_use_sqlite_name_vtk_expects.patch
new file mode 100644
index 0000000000..8d72a380d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/vtk_use_sqlite_name_vtk_expects.patch
@@ -0,0 +1,26 @@
+diff --git a/CMake/FindSQLite3.cmake b/CMake/FindSQLite3.cmake
+index 7933ba7cc3..43f467e524 100644
+--- a/CMake/FindSQLite3.cmake
++++ b/CMake/FindSQLite3.cmake
+@@ -1,6 +1,6 @@
+-find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h)
++find_path(SQLite3_INCLUDE_DIRS NAMES sqlite3.h)
+
+-get_filename_component(POSSIBLE_SQLite_ROOT "${SQLite3_INCLUDE_DIR}" DIRECTORY)
++get_filename_component(POSSIBLE_SQLite_ROOT "${SQLite3_INCLUDE_DIRS}" DIRECTORY)
+
+ find_library(SQLite3_LIBRARY
+ NAMES sqlite3
+@@ -14,9 +14,9 @@ add_library(sqlite3::sqlite3 UNKNOWN IMPORTED)
+ set_target_properties(sqlite3::sqlite3
+ PROPERTIES
+ IMPORTED_LOCATION ${SQLite3_LIBRARY}
+- INTERFACE_INCLUDE_DIRECTORIES ${SQLite3_INCLUDE_DIR})
++ INTERFACE_INCLUDE_DIRECTORIES ${SQLite3_INCLUDE_DIRS})
+
+ include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(SQLite3 DEFAULT_MSG SQLite3_LIBRARY SQLite3_INCLUDE_DIR)
++find_package_handle_standard_args(SQLite3 DEFAULT_MSG SQLite3_LIBRARY SQLite3_INCLUDE_DIRS)
+
+-mark_as_advanced(SQLite3_INCLUDE_DIR SQLite3_LIBRARY)
++mark_as_advanced(SQLite3_INCLUDE_DIRS SQLite3_LIBRARY)
diff --git a/var/spack/repos/builtin/packages/vvtest/package.py b/var/spack/repos/builtin/packages/vvtest/package.py
index 8bc51b5022..106a497924 100644
--- a/var/spack/repos/builtin/packages/vvtest/package.py
+++ b/var/spack/repos/builtin/packages/vvtest/package.py
@@ -24,6 +24,8 @@ class Vvtest(Package):
version("1.1.0", sha256="674585f12d393ab9745a5ab26f59cb0f0e213f9c597b37467125979b5955ca79")
version("1.0.0", sha256="acd04e8e6635ed1b1725b793e8287a58831d6380759a81159142a6ff3397a8dd")
+ depends_on("c", type="build") # generated
+
depends_on("python@2.6.0:3", type=("build", "run"))
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/w3emc/package.py b/var/spack/repos/builtin/packages/w3emc/package.py
index f27000dbda..7e0967bcde 100644
--- a/var/spack/repos/builtin/packages/w3emc/package.py
+++ b/var/spack/repos/builtin/packages/w3emc/package.py
@@ -19,6 +19,7 @@ class W3emc(CMakePackage):
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("develop", branch="develop")
+ version("2.12.0", sha256="77c0732541ade1deb381f5a208547ccc36e65efa91c8f7021b299b20a6ae0d27")
version("2.11.0", sha256="53a03d03421c5da699b026ca220512ed494a531b83284693f66d2579d570c43b")
version("2.10.0", sha256="366b55a0425fc3e729ecb9f3b236250349399fe4c8e19f325500463043fd2f18")
version("2.9.3", sha256="9ca1b08dd13dfbad4a955257ae0cf38d2e300ccd8d983606212bc982370a29bc")
@@ -27,6 +28,9 @@ class W3emc(CMakePackage):
version("2.9.0", sha256="994f59635ab91e34e96cab5fbaf8de54389d09461c7bac33b3104a1187e6c98a")
version("2.7.3", sha256="eace811a1365f69b85fdf2bcd93a9d963ba72de5a7111e6fa7c0e6578b69bfbc")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("pic", default=True, description="Build with position-independent-code")
variant("bufr", default=False, description="Build with BUFR routines", when="@2.10:")
variant(
@@ -42,7 +46,13 @@ class W3emc(CMakePackage):
"extradeps",
default=False,
description="Build w3emc with subprograms which call unknown dependencies",
- when="@2.10:",
+ when="@2.10:2.11",
+ )
+ variant(
+ "build_deprecated",
+ default=False,
+ description="Build deprecated subroutines",
+ when="@2.12:",
)
conflicts("+shared +extradeps", msg="Shared library cannot be built with unknown dependencies")
@@ -79,10 +89,11 @@ class W3emc(CMakePackage):
self.define("BUILD_8", self.spec.satisfies("precision=8")),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("BUILD_WITH_EXTRA_DEPS", "extradeps"),
+ self.define_from_variant("BUILD_DEPRECATED", "build_deprecated"),
]
return args
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
make("test")
diff --git a/var/spack/repos/builtin/packages/w3m/package.py b/var/spack/repos/builtin/packages/w3m/package.py
index 80aa64adca..d4d693afbc 100644
--- a/var/spack/repos/builtin/packages/w3m/package.py
+++ b/var/spack/repos/builtin/packages/w3m/package.py
@@ -21,14 +21,23 @@ class W3m(AutotoolsPackage):
# Feel free to use Debian's branch as you need.
# Currently, Arch and Ubuntu (and Debian derivatives) use Debian's branch.
# Also, Gentoo, Fedora and openSUSE switched to Debian's branch.
- homepage = "http://w3m.sourceforge.net/index.en.html"
- url = "https://downloads.sourceforge.net/project/w3m/w3m/w3m-0.5.3/w3m-0.5.3.tar.gz"
+ homepage = "https://w3m.sourceforge.net/index.en.html"
+ url = "https://salsa.debian.org/debian/w3m/-/archive/upstream/0.5.3+git20230121/w3m-upstream-0.5.3+git20230121.tar.gz"
+ git = "https://salsa.debian.org/debian/w3m.git"
+
maintainers("ronin_gw")
license("MIT")
+ version(
+ "0.5.3.git20230121",
+ sha256="8f0592e1cf7cf1de053e22c114cd79b85ebdb8dab925be7d343a130343b97c25",
+ )
version("0.5.3", sha256="e994d263f2fd2c22febfbe45103526e00145a7674a0fda79c822b97c2770a9e3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# mandatory dependency
depends_on("bdw-gc")
@@ -59,12 +68,19 @@ class W3m(AutotoolsPackage):
values=("gdk-pixbuf", "imlib2"),
multi=False,
)
- depends_on("gdk-pixbuf@2:+x11", when="imagelib=gdk-pixbuf +image")
+ depends_on("gdk-pixbuf@2:", when="imagelib=gdk-pixbuf +image")
depends_on("imlib2@1.0.5:", when="imagelib=imlib2 +image")
# fix for modern libraries
- patch("fix_redef.patch")
- patch("fix_gc.patch")
+ patch("fix_redef.patch", when="@=0.5.3")
+ patch("fix_gc.patch", when="@=0.5.3")
+
+ def url_for_version(self, version):
+ if ".git" in version.string:
+ v = version.string.replace(".git", "+git")
+ return f"https://salsa.debian.org/debian/w3m/-/archive/upstream/{v}/w3m-upstream-{v}.tar.gz"
+ else:
+ return f"https://downloads.sourceforge.net/project/w3m/w3m/w3m-{version}/w3m-{version}.tar.gz"
def patch(self):
# w3m is not developed since 2012, everybody is doing this:
diff --git a/var/spack/repos/builtin/packages/w3nco/package.py b/var/spack/repos/builtin/packages/w3nco/package.py
index 495293c1a6..ef757778ff 100644
--- a/var/spack/repos/builtin/packages/w3nco/package.py
+++ b/var/spack/repos/builtin/packages/w3nco/package.py
@@ -19,3 +19,16 @@ class W3nco(CMakePackage):
maintainers("t-brown", "AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
version("2.4.1", sha256="48b06e0ea21d3d0fd5d5c4e7eb50b081402567c1bff6c4abf4fd4f3669070139")
+
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ if (
+ self.spec.satisfies("%oneapi")
+ or self.spec.satisfies("%apple-clang")
+ or self.spec.satisfies("%clang")
+ ):
+ flags.append("-Wno-error=implicit-function-declaration")
+ return (flags, None, None)
diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py
index 8bb4310893..417cdc38f7 100644
--- a/var/spack/repos/builtin/packages/wannier90/package.py
+++ b/var/spack/repos/builtin/packages/wannier90/package.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import inspect
import os.path
from spack.package import *
@@ -15,7 +14,7 @@ class Wannier90(MakefilePackage):
Wannier90 is released under the GNU General Public License.
"""
- homepage = "http://wannier.org"
+ homepage = "https://wannier.org"
url = "https://github.com/wannier-developers/wannier90/archive/v3.1.0.tar.gz"
git = "https://github.com/wannier-developers/wannier90.git"
@@ -27,6 +26,9 @@ class Wannier90(MakefilePackage):
version("2.1.0", sha256="ee90108d4bc4aa6a1cf16d72abebcb3087cf6c1007d22dda269eb7e7076bddca")
version("2.0.1", sha256="05ea7cd421a219ce19d379ad6ae3d9b1a84be4ffb367506ffdfab1e729309e94")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
depends_on("lapack")
depends_on("blas")
@@ -51,7 +53,7 @@ class Wannier90(MakefilePackage):
if version > Version("2"):
url = "https://github.com/wannier-developers/wannier90/archive/v{0}.tar.gz"
else:
- url = "http://wannier.org/code/wannier90-{0}.tar.gz"
+ url = "https://wannier.org/code/wannier90-{0}.tar.gz"
return url.format(version)
@property
@@ -77,7 +79,7 @@ class Wannier90(MakefilePackage):
"@LIBS": (lapack + blas + mpi).joined(),
}
- template = join_path(os.path.dirname(inspect.getmodule(self).__file__), "make.sys")
+ template = join_path(os.path.dirname(__file__), "make.sys")
copy(template, self.makefile_name)
for key, value in substitutions.items():
diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py
index 1b9cc4b727..906c495d3a 100644
--- a/var/spack/repos/builtin/packages/warpx/package.py
+++ b/var/spack/repos/builtin/packages/warpx/package.py
@@ -3,64 +3,191 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.python import PythonPipBuilder
from spack.package import *
-class Warpx(CMakePackage):
+class Warpx(CMakePackage, PythonExtension):
"""WarpX is an advanced electromagnetic Particle-In-Cell code. It supports
many features including Perfectly-Matched Layers (PML) and mesh refinement.
- In addition, WarpX is a highly-parallel and highly-optimized code and
- features hybrid OpenMP/MPI parallelization, advanced vectorization
- techniques and load balancing capabilities.
- For WarpX' Python bindings and PICMI input support, see the 'py-warpx' package.
+ In addition, WarpX is a highly-parallel and highly-optimized code and
+ features hybrid GPU/OpenMP/MPI parallelization and load balancing capabilities.
"""
homepage = "https://ecp-warpx.github.io"
- url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.08.tar.gz"
+ url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/24.10.tar.gz"
git = "https://github.com/ECP-WarpX/WarpX.git"
- maintainers("ax3l", "dpgrote", "MaxThevenet", "RemiLehe")
+ maintainers("ax3l", "dpgrote", "EZoni", "RemiLehe")
tags = ["e4s", "ecp"]
license("BSD-3-Clause-LBNL")
# NOTE: if you update the versions here, also see py-warpx
version("develop", branch="development")
- version("23.08", sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc")
- version("23.07", sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945")
- version("23.06", sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b")
- version("23.05", sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73")
- version("23.04", sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823")
- version("23.03", sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718")
- version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1")
- version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c")
- version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062")
- version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e")
- version("22.10", sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e")
- version("22.09", sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3")
- version("22.08", sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4")
- version("22.07", sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b")
- version("22.06", sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9")
- version("22.05", sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479")
- version("22.04", sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f")
- version("22.03", sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564")
- version("22.02", sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42")
- version("22.01", sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28")
+ version("24.10", sha256="1fe3a86bf820a2ecef853cdcd9427fba4e0cb1efb05326da7dc9dbf94551202f")
+ version(
+ "24.08",
+ sha256="8da1f2967f613a65a295260260aa4f081ac1d1b7c1d6987d294e02b86099df08",
+ deprecated=True,
+ )
+ version(
+ "23.08",
+ sha256="67695ff04b83d1823ea621c19488e54ebaf268532b0e5eb4ea8ad293d7ab3ddc",
+ deprecated=True,
+ )
+ version(
+ "23.07",
+ sha256="511633f94c0d0205013609bde5bbf92a29c2e69f6e69b461b80d09dc25602945",
+ deprecated=True,
+ )
+ version(
+ "23.06",
+ sha256="75fcac949220c44dce04de581860c9a2caa31a0eee8aa7d49455fa5fc928514b",
+ deprecated=True,
+ )
+ version(
+ "23.05",
+ sha256="34306a98fdb1f5f44ab4fb92f35966bfccdcf1680a722aa773af2b59a3060d73",
+ deprecated=True,
+ )
+ version(
+ "23.04",
+ sha256="e5b285c73e13a0d922eba5d83760c168d4fd388e54a519830003b2e692dab823",
+ deprecated=True,
+ )
+ version(
+ "23.03",
+ sha256="e1274aaa2a2c83d599d61c6e4c426db4ed5d4c5dc61a2002715783a6c4843718",
+ deprecated=True,
+ )
+ version(
+ "23.02",
+ sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1",
+ deprecated=True,
+ )
+ version(
+ "23.01",
+ sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c",
+ deprecated=True,
+ )
+ version(
+ "22.12",
+ sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062",
+ deprecated=True,
+ )
+ version(
+ "22.11",
+ sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e",
+ deprecated=True,
+ )
+ version(
+ "22.10",
+ sha256="3cbbbbb4d79f806b15e81c3d0e4a4401d1d03d925154682a3060efebd3b6ca3e",
+ deprecated=True,
+ )
+ version(
+ "22.09",
+ sha256="dbef1318248c86c860cc47f7e18bbb0397818e3acdfb459e48075004bdaedea3",
+ deprecated=True,
+ )
+ version(
+ "22.08",
+ sha256="5ff7fd628e8bf615c1107e6c51bc55926f3ef2a076985444b889d292fecf56d4",
+ deprecated=True,
+ )
+ version(
+ "22.07",
+ sha256="0286adc788136cb78033cb1678d38d36e42265bcfd3d0c361a9bcc2cfcdf241b",
+ deprecated=True,
+ )
+ version(
+ "22.06",
+ sha256="e78398e215d3fc6bc5984f5d1c2ddeac290dcbc8a8e9d196e828ef6299187db9",
+ deprecated=True,
+ )
+ version(
+ "22.05",
+ sha256="2fa69e6a4db36459b67bf663e8fbf56191f6c8c25dc76301dbd02a36f9b50479",
+ deprecated=True,
+ )
+ version(
+ "22.04",
+ sha256="9234d12e28b323cb250d3d2cefee0b36246bd8a1d1eb48e386f41977251c028f",
+ deprecated=True,
+ )
+ version(
+ "22.03",
+ sha256="ddbef760c8000f2f827dfb097ca3359e7aecbea8766bec5c3a91ee28d3641564",
+ deprecated=True,
+ )
+ version(
+ "22.02",
+ sha256="d74b593d6f396e037970c5fbe10c2e5d71d557a99c97d40e4255226bc6c26e42",
+ deprecated=True,
+ )
+ version(
+ "22.01",
+ sha256="e465ffadabb7dc360c63c4d3862dc08082b5b0e77923d3fb05570408748b0d28",
+ deprecated=True,
+ )
# 22.01+ requires C++17 or newer
- version("21.12", sha256="847c98aac20c73d94c823378803c82be9a14139f1c14ea483757229b452ce4c1")
- version("21.11", sha256="ce60377771c732033a77351cd3500b24b5d14b54a5adc7a622767b9251c10d0b")
- version("21.10", sha256="d372c573f0360094d5982d64eceeb0149d6620eb75e8fdbfdc6777f3328fb454")
- version("21.09", sha256="861a65f11846541c803564db133c8678b9e8779e69902ef1637b21399d257eab")
- version("21.08", sha256="6128a32cfd075bc63d08eebea6d4f62d33ce0570f4fd72330a71023ceacccc86")
- version("21.07", sha256="a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561")
- version("21.06", sha256="a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30")
- version("21.05", sha256="f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc")
- version("21.04", sha256="51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0")
+ version(
+ "21.12",
+ sha256="847c98aac20c73d94c823378803c82be9a14139f1c14ea483757229b452ce4c1",
+ deprecated=True,
+ )
+ version(
+ "21.11",
+ sha256="ce60377771c732033a77351cd3500b24b5d14b54a5adc7a622767b9251c10d0b",
+ deprecated=True,
+ )
+ version(
+ "21.10",
+ sha256="d372c573f0360094d5982d64eceeb0149d6620eb75e8fdbfdc6777f3328fb454",
+ deprecated=True,
+ )
+ version(
+ "21.09",
+ sha256="861a65f11846541c803564db133c8678b9e8779e69902ef1637b21399d257eab",
+ deprecated=True,
+ )
+ version(
+ "21.08",
+ sha256="6128a32cfd075bc63d08eebea6d4f62d33ce0570f4fd72330a71023ceacccc86",
+ deprecated=True,
+ )
+ version(
+ "21.07",
+ sha256="a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561",
+ deprecated=True,
+ )
+ version(
+ "21.06",
+ sha256="a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30",
+ deprecated=True,
+ )
+ version(
+ "21.05",
+ sha256="f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc",
+ deprecated=True,
+ )
+ version(
+ "21.04",
+ sha256="51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0",
+ deprecated=True,
+ )
# 20.01+ requires C++14 or newer
variant("app", default=True, description="Build the WarpX executable application")
variant("ascent", default=False, description="Enable Ascent in situ visualization")
+ variant(
+ "catalyst",
+ default=False,
+ description="Enable Catalyst2 in situ visualization",
+ when="@24.09:",
+ )
variant("sensei", default=False, description="Enable SENSEI in situ visualization")
variant(
"compute",
@@ -85,7 +212,15 @@ class Warpx(CMakePackage):
description="Number of spatial dimensions",
when="@23.06:",
)
- variant("eb", default=False, description="Embedded boundary support (in development)")
+ variant("eb", default=True, description="Embedded boundary support", when="@24.10:")
+ variant("eb", default=False, description="Embedded boundary support", when="@:24.09")
+ # Spack defaults to False but pybind11 defaults to True (and IPO is highly
+ # encouraged to be used)
+ variant(
+ "python_ipo",
+ default=True,
+ description="CMake interprocedural optimization for Python bindings (recommended)",
+ )
variant("lib", default=True, description="Build WarpX as a shared library")
variant("mpi", default=True, description="Enable MPI support")
variant(
@@ -101,59 +236,120 @@ class Warpx(CMakePackage):
multi=False,
description="Floating point precision (single/double)",
)
- variant("psatd", default=True, description="Enable PSATD solver support")
+ variant("fft", default=True, description="Enable support for FFT-based solvers")
+ variant("python", default=False, description="Enable Python bindings")
variant("qed", default=True, description="Enable QED support")
variant("qedtablegen", default=False, description="QED table generation support")
variant("shared", default=True, description="Build a shared version of the library")
variant("tprof", default=True, description="Enable tiny profiling features")
- depends_on("sensei@4.0.0:", when="@22.07: +sensei")
- conflicts("+sensei", when="@:22.06", msg="WarpX supports SENSEI 4.0+ with 22.07 and newer")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
+ for v in ["24.10", "24.08", "develop"]:
+ depends_on(
+ f"amrex@{v} build_system=cmake +linear_solvers +pic +particles +shared +tiny_profile",
+ when=f"@{v}",
+ type=("build", "link"),
+ )
+ depends_on("py-amrex@{0}".format(v), when="@{0} +python".format(v), type=("build", "run"))
- depends_on("ascent", when="+ascent")
- depends_on("ascent +cuda", when="+ascent compute=cuda")
- depends_on("ascent +mpi", when="+ascent +mpi")
depends_on("boost@1.66.0: +math", when="+qedtablegen")
depends_on("cmake@3.15.0:", type="build")
depends_on("cmake@3.18.0:", type="build", when="@22.01:")
depends_on("cmake@3.20.0:", type="build", when="@22.08:")
+ depends_on("cmake@3.24.0:", type="build", when="@24.09:")
+ with when("+ascent"):
+ depends_on("ascent", when="+ascent")
+ depends_on("ascent +cuda", when="+ascent compute=cuda")
+ depends_on("ascent +mpi", when="+ascent +mpi")
+ depends_on("amrex +ascent +conduit")
+ with when("+catalyst"):
+ depends_on("libcatalyst@2.0: +conduit")
+ depends_on("libcatalyst +mpi", when="+mpi")
+ depends_on("amrex +catalyst +conduit")
+ with when("dims=1"):
+ depends_on("amrex dimensions=1")
+ with when("dims=2"):
+ depends_on("amrex dimensions=2")
+ with when("dims=rz"):
+ depends_on("amrex dimensions=2")
+ with when("dims=3"):
+ depends_on("amrex dimensions=3")
+ with when("+eb"):
+ depends_on("amrex +eb")
depends_on("mpi", when="+mpi")
+ with when("+mpi"):
+ depends_on("amrex +mpi")
+ depends_on("py-amrex +mpi", when="+python")
+ with when("~mpi"):
+ depends_on("amrex ~mpi")
+ depends_on("py-amrex ~mpi", when="~python")
+ with when("precision=single"):
+ depends_on("amrex precision=single")
+ with when("precision=double"):
+ depends_on("amrex precision=double")
+ depends_on("py-pybind11@2.12.0:", when="@24.04: +python", type=("build", "link"))
+ depends_on("sensei@4.0.0:", when="@22.07: +sensei")
with when("compute=cuda"):
+ depends_on("amrex +cuda")
depends_on("cuda@9.2.88:")
depends_on("cuda@11.0:", when="@22.01:")
with when("compute=hip"):
- depends_on("rocfft", when="+psatd")
+ depends_on("amrex +rocm")
+ depends_on("rocfft", when="+fft")
depends_on("rocprim")
depends_on("rocrand")
with when("compute=noacc"):
- with when("+psatd"):
+ depends_on("amrex ~cuda ~openmp ~rocm ~sycl")
+ with when("+fft"):
depends_on("fftw@3: ~mpi", when="~mpi")
depends_on("fftw@3: +mpi", when="+mpi")
depends_on("pkgconfig", type="build")
with when("compute=omp"):
+ depends_on("amrex +openmp")
depends_on("llvm-openmp", when="%apple-clang")
- with when("+psatd"):
+ with when("+fft"):
depends_on("fftw@3: +openmp")
depends_on("fftw ~mpi", when="~mpi")
depends_on("fftw +mpi", when="+mpi")
depends_on("pkgconfig", type="build")
- with when("+psatd dims=rz"):
+ with when("+fft dims=rz"):
depends_on("lapackpp")
depends_on("blaspp")
depends_on("blaspp +cuda", when="compute=cuda")
with when("+openpmd"):
depends_on("openpmd-api@0.13.1:")
depends_on("openpmd-api@0.14.2:", when="@21.09:")
+ depends_on("openpmd-api@0.15.1:", when="@23.05:")
depends_on("openpmd-api ~mpi", when="~mpi")
depends_on("openpmd-api +mpi", when="+mpi")
+ # Python bindings
+ # note: in Spack, we only need the cmake package, not py-cmake
+ with when("+python"):
+ extends("python")
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-numpy@1.15.0:", type=("build", "run"))
+ depends_on("py-mpi4py@2.1.0:", type=("build", "run"), when="+mpi")
+ depends_on("py-periodictable@1.5:1", type=("build", "run"))
+ depends_on("py-picmistandard@0.28.0", type=("build", "run"), when="@23.11:24.07")
+ depends_on("py-picmistandard@0.29.0", type=("build", "run"), when="@24.08")
+ depends_on("py-picmistandard@0.30.0", type=("build", "run"), when="@24.09:")
+ depends_on("py-pip@23:", type="build")
+ depends_on("py-setuptools@42:", type="build")
+ depends_on("py-pybind11@2.12.0:", type=("build", "link"))
+ depends_on("py-wheel@0.40:", type="build")
+
+ conflicts("+python", when="@:24.04", msg="Python bindings only supported in 24.04+")
conflicts("dims=1", when="@:21.12", msg="WarpX 1D support starts in 22.01+")
conflicts("~qed +qedtablegen", msg="WarpX PICSAR QED table generation needs +qed")
conflicts(
"compute=sycl",
- when="+psatd",
- msg="WarpX spectral solvers are not yet tested with SYCL " '(use "warpx ~psatd")',
+ when="+fft",
+ msg="WarpX spectral solvers are not yet tested with SYCL " '(use "warpx ~fft")',
)
+ conflicts("+sensei", when="@:22.06", msg="WarpX supports SENSEI 4.0+ with 22.07 and newer")
# The symbolic aliases for our +lib target were missing in the install
# location
@@ -198,6 +394,7 @@ class Warpx(CMakePackage):
# variants
self.define_from_variant("WarpX_APP", "app"),
self.define_from_variant("WarpX_ASCENT", "ascent"),
+ self.define_from_variant("WarpX_CATALYST", "catalyst"),
self.define_from_variant("WarpX_SENSEI", "sensei"),
"-DWarpX_COMPUTE={0}".format(spec.variants["compute"].value.upper()),
"-DWarpX_DIMS={0}".format(";".join(spec.variants["dims"].value).upper()),
@@ -207,11 +404,17 @@ class Warpx(CMakePackage):
self.define_from_variant("WarpX_MPI_THREAD_MULTIPLE", "mpithreadmultiple"),
self.define_from_variant("WarpX_OPENPMD", "openpmd"),
"-DWarpX_PRECISION={0}".format(spec.variants["precision"].value.upper()),
- self.define_from_variant("WarpX_PSATD", "psatd"),
+ self.define_from_variant("WarpX_PYTHON", "python"),
self.define_from_variant("WarpX_QED", "qed"),
self.define_from_variant("WarpX_QED_TABLE_GEN", "qedtablegen"),
]
+ if spec.satisfies("@24.08:"):
+ args.append("-DWarpX_amrex_internal=OFF")
+ args.append(self.define_from_variant("WarpX_FFT", "fft"))
+ else:
+ args.append(self.define_from_variant("WarpX_PSATD", "fft"))
+
# FindMPI needs an extra hint sometimes, particularly on cray systems
if "+mpi" in spec:
args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
@@ -220,13 +423,45 @@ class Warpx(CMakePackage):
if "+openpmd" in spec:
args.append("-DWarpX_openpmd_internal=OFF")
+ if "+python" in spec:
+ if spec.satisfies("@24.08:"):
+ args.append("-DWarpX_pyamrex_internal=OFF")
+ args.append("-DWarpX_pybind11_internal=OFF")
+ args.append(self.define_from_variant("WarpX_PYTHON_IPO", "python_ipo"))
+
# Work-around for SENSEI 4.0: wrong install location for CMake config
# https://github.com/SENSEI-insitu/SENSEI/issues/79
if "+sensei" in spec:
args.append(self.define("SENSEI_DIR", spec["sensei"].prefix.lib.cmake))
+ # WarpX uses CCache by default, interfering with Spack wrappers
+ ccache_var = "CCACHE_PROGRAM" if spec.satisfies("@:24.01") else "WarpX_CCACHE"
+ args.append(self.define(ccache_var, False))
+
return args
+ phases = ("cmake", "build", "install", "pip_install_nodeps")
+ build_targets = ["all"]
+ with when("+python"):
+ build_targets += ["pip_wheel"]
+
+ def pip_install_nodeps(self, spec, prefix):
+ """Install everything from build directory."""
+ pip = spec["python"].command
+ pip.add_default_arg("-m", "pip")
+
+ args = PythonPipBuilder.std_args(self) + [
+ f"--prefix={prefix}",
+ "--find-links=warpx-whl",
+ "pywarpx",
+ ]
+
+ with working_dir(self.build_directory):
+ pip(*args)
+
+ # todo: from PythonPipBuilder
+ # ....execute_install_time_tests()
+
@property
def libs(self):
libsuffix = {"1": "1d", "2": "2d", "3": "3d", "rz": "rz"}
@@ -250,12 +485,20 @@ class Warpx(CMakePackage):
def _get_input_options(self, dim, post_install):
spec = self.spec
examples_dir = join_path(
- self.install_test_root if post_install else self.stage.source_path,
+ install_test_root(self) if post_install else self.stage.source_path,
self.examples_src_dir,
)
- inputs_nD = {"1": "inputs_1d", "2": "inputs_2d", "3": "inputs_3d", "rz": "inputs_rz"}
- if spec.satisfies("@:21.12"):
- inputs_nD["rz"] = "inputs_2d_rz"
+ if spec.satisfies("@:24.09"):
+ inputs_nD = {"1": "inputs_1d", "2": "inputs_2d", "3": "inputs_3d", "rz": "inputs_rz"}
+ if spec.satisfies("@:21.12"):
+ inputs_nD["rz"] = "inputs_2d_rz"
+ else:
+ inputs_nD = {
+ "1": "inputs_test_1d_laser_acceleration",
+ "2": "inputs_base_2d",
+ "3": "inputs_base_3d",
+ "rz": "inputs_base_rz",
+ }
inputs = join_path(examples_dir, inputs_nD[dim])
cli_args = [inputs, "max_step=50", "diag1.intervals=10"]
@@ -285,25 +528,40 @@ class Warpx(CMakePackage):
def copy_test_sources(self):
"""Copy the example input files after the package is installed to an
install test subdirectory for use during `spack test run`."""
- self.cache_extra_test_sources([self.examples_src_dir])
+ cache_extra_test_sources(self, [self.examples_src_dir])
- def test(self):
+ # TODO: remove installed static ablastr lib
+ # (if build as static lib - Spack default is shared)
+ # @run_after("install")
+ # def remove_unwanted_library(self):
+ # ... libablastr_{1d,2d,3d,rz}.a ...
+
+ def run_warpx(self, dim):
"""Perform smoke tests on the installed package."""
if "+app" not in self.spec:
- print("WarpX smoke tests skipped: requires variant +app")
- return
-
- # our executable names are a variant-dependent and naming evolves
- for dim in self.spec.variants["dims"].value:
- exe_nD = {"1": "warpx.1d", "2": "warpx.2d", "3": "warpx.3d", "rz": "warpx.rz"}
- exe = find(self.prefix.bin, exe_nD[dim] + ".*", recursive=False)[0]
-
- cli_args = self._get_input_options(dim, True)
- self.run_test(
- exe,
- cli_args,
- [],
- installed=True,
- purpose="Smoke test for WarpX",
- skip_missing=False,
- )
+ raise SkipTest("Package must be installed with +app")
+ if dim not in self.spec.variants["dims"].value:
+ raise SkipTest(f"Package must be installed with {dim} in dims")
+ dim_arg = f"{dim}d" if dim.isdigit() else dim
+ if self.spec.satisfies("@:23.05") and not dim.isdigit():
+ dim_arg = dim_arg.upper()
+ exe = find(self.prefix.bin, f"warpx.{dim_arg}.*", recursive=False)[0]
+ cli_args = self._get_input_options(dim, True)
+ warpx = which(exe)
+ warpx(*cli_args)
+
+ def test_warpx_1d(self):
+ """Run warpx 1d test"""
+ self.run_warpx("1")
+
+ def test_warpx_2d(self):
+ """Run warpx 2d test"""
+ self.run_warpx("2")
+
+ def test_warpx_3d(self):
+ """Run warpx 3d test"""
+ self.run_warpx("3")
+
+ def test_warpx_rz(self):
+ """Run warpx rz test"""
+ self.run_warpx("rz")
diff --git a/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py b/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py
new file mode 100644
index 0000000000..e81f26cbf8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/wasi-sdk-prebuilt/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class WasiSdkPrebuilt(Package):
+ """
+ A group of standard API specifications for software compiled to the W3C WebAssembly standard
+ """
+
+ homepage = "https://wasi.dev/"
+ url = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("APACHE-2.0", checked_by="teaguesterling")
+
+ version("22.0", sha256="fa46b8f1b5170b0fecc0daf467c39f44a6d326b80ced383ec4586a50bc38d7b8")
+ version("21.0", sha256="f2fe0723b337c484556b19d64c0f6c6044827014bfcd403d00951c65a86cfa26")
+ version("20.0", sha256="7030139d495a19fbeccb9449150c2b1531e15d8fb74419872a719a7580aad0f9")
+ version("19.0", sha256="d900abc826eec1955b9afd250e7cc2496338abbf6c440d86a313c06e42083fa1")
+ version("17.0", sha256="8778a476af7898a51db9b78395687cc9c8b69702850da77a763711e832614dac")
+ version("16.0", sha256="10df3418485e60b9283c1132102f8d3ca34b4fbe8c4649e30282ee84fe42d788")
+ version("15.0", sha256="9b1f2c900a034a44e59b74843cd79b4f189342598e554029367ef0a2ac286703")
+ version("14.0", sha256="8c8ebb7f71dcccbb8b1ab384499a53913b0b6d1b7b3281c3d70165e0f002e821")
+
+ provides("wasi-sdk")
+
+ def url_for_version(self, version):
+ base = "https://github.com/WebAssembly/wasi-sdk/releases/download"
+ major = version.up_to(1)
+ full = version.up_to(2)
+ return f"{base}/wasi-sdk-{major}/wasi-sdk-{full}-linux.tar.gz"
+
+ def install(self, spec, prefix):
+ install_tree("share/wasi-sysroot", prefix)
diff --git a/var/spack/repos/builtin/packages/watch/package.py b/var/spack/repos/builtin/packages/watch/package.py
index 5b8712599f..fae74fc445 100644
--- a/var/spack/repos/builtin/packages/watch/package.py
+++ b/var/spack/repos/builtin/packages/watch/package.py
@@ -21,6 +21,8 @@ class Watch(AutotoolsPackage):
version("master", branch="master")
version("3.3.15", tag="v3.3.15", commit="7bb949bcba13c107fa0f45d2d0298b1ad6b6d6cc")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/wayland-protocols/package.py b/var/spack/repos/builtin/packages/wayland-protocols/package.py
index 5fd0ab5ac8..dc5054a356 100644
--- a/var/spack/repos/builtin/packages/wayland-protocols/package.py
+++ b/var/spack/repos/builtin/packages/wayland-protocols/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import spack.build_systems.meson
from spack.package import *
@@ -28,6 +29,12 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
license("MIT")
+ version("1.37", sha256="c3b215084eb4cf318415533554c2c2714e58ed75847d7c3a8e50923215ffbbf3")
+ version("1.36", sha256="c839dd4325565fd59a93d6cde17335357328f66983c2e1fb03c33e92d6918b17")
+ version("1.35", sha256="6e62dfa92ce82487d107b76064cfe2d7ca107c87c239ea9036a763d79c09105a")
+ version("1.34", sha256="cd3cc9dedb838e6fc8f55bbeb688e8569ffac7df53bc59dbfac8acbb39267f05")
+ version("1.33", sha256="71a7d2f062d463aa839497ddfac97e4bd3f00aa306e014f94529aa3a2be193a8")
+ version("1.32", sha256="444b5d823ad0163dfe505c97ea1a0689ca7e2978a87cf59b03f06573b87db260")
version("1.31", sha256="04d3f66eca99d638ec8dbfdfdf79334290e22028f7d0b04c7034d9ef18a3248a")
version("1.30", sha256="1c02ce27d5267c904f2f0d31039265f3e4112f15bf274b1c72bdacd5322f243d")
version("1.29", sha256="4a85786ae69cd6d53bbe9278572f3c3d6ea342875ea444960edb6089237c3a18")
@@ -50,7 +57,9 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
depends_on("meson@0.55:")
depends_on("pkgconfig", type="build")
- depends_on("doxygen", type="build")
- depends_on("xmlto", type="build")
- depends_on("libxslt", type="build")
depends_on("wayland")
+
+
+class MesonBuilder(spack.build_systems.meson.MesonBuilder):
+ def meson_args(self):
+ return ["-Dtests={}".format("true" if self.pkg.run_tests else "false")]
diff --git a/var/spack/repos/builtin/packages/wayland/package.py b/var/spack/repos/builtin/packages/wayland/package.py
index 7b0d7eb3fb..e44b87c17a 100644
--- a/var/spack/repos/builtin/packages/wayland/package.py
+++ b/var/spack/repos/builtin/packages/wayland/package.py
@@ -39,6 +39,9 @@ class Wayland(MesonPackage, AutotoolsPackage):
version("1.17.93", sha256="293536ad23bfed15fc34e2a63bbb511167e8b096c0eba35e805cb64d46ad62ae")
version("1.17.92", sha256="d944a7b999cfe6fee5327a2315c8e5891222c5a88a96e1ca73485978e4990512")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
with when("build_system=autotools"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -59,7 +62,7 @@ class Wayland(MesonPackage, AutotoolsPackage):
depends_on("doxygen", type="build")
depends_on("xmlto", type="build")
depends_on("libxslt", type="build")
- depends_on("graphviz+libgd", type="build")
+ depends_on("graphviz+expat+libgd", type="build")
@when("build_system=autotools")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/wcs/package.py b/var/spack/repos/builtin/packages/wcs/package.py
index 0070396347..5b9800233c 100644
--- a/var/spack/repos/builtin/packages/wcs/package.py
+++ b/var/spack/repos/builtin/packages/wcs/package.py
@@ -19,6 +19,8 @@ class Wcs(CMakePackage):
version("master", branch="master")
version("develop", branch="devel")
+ depends_on("cxx", type="build") # generated
+
depends_on("boost+graph+filesystem+regex+system")
# TODO: replace this with an explicit list of components of Boost,
diff --git a/var/spack/repos/builtin/packages/webbench/package.py b/var/spack/repos/builtin/packages/webbench/package.py
index eaf47ee8d8..67e47a24aa 100644
--- a/var/spack/repos/builtin/packages/webbench/package.py
+++ b/var/spack/repos/builtin/packages/webbench/package.py
@@ -16,6 +16,8 @@ class Webbench(MakefilePackage):
version("1.5", commit="b1acf3c01cc914729fe188dfc8ed761858028d4f")
+ depends_on("c", type="build") # generated
+
depends_on("ntirpc")
def setup_build_environment(self, env):
diff --git a/var/spack/repos/builtin/packages/weechat/package.py b/var/spack/repos/builtin/packages/weechat/package.py
index c93b965831..b305941aa8 100644
--- a/var/spack/repos/builtin/packages/weechat/package.py
+++ b/var/spack/repos/builtin/packages/weechat/package.py
@@ -18,6 +18,9 @@ class Weechat(CMakePackage):
version("2.9", sha256="3a78063b76c42ba306eacf8f74cb8c9a260f8a61d1915d0b5d76f11d2be69a53")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("perl", default=False, description="Include perl support")
variant("lua", default=False, description="Include lua support")
variant("ruby", default=False, description="Include ruby support")
diff --git a/var/spack/repos/builtin/packages/weighttp/package.py b/var/spack/repos/builtin/packages/weighttp/package.py
index d27a8c070f..9650d9707c 100644
--- a/var/spack/repos/builtin/packages/weighttp/package.py
+++ b/var/spack/repos/builtin/packages/weighttp/package.py
@@ -18,6 +18,8 @@ class Weighttp(AutotoolsPackage):
version("0.3", sha256="376e2311af2decb8f6051e4f968d7c0ba92ca60cd563d768beb4868eb9679f45")
version("0.2", sha256="bc2b3955126010ce27e0829285720f973df9f144e9cca2568569a657a3d5e634")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py
index ac6bce9593..582a68f151 100644
--- a/var/spack/repos/builtin/packages/wget/package.py
+++ b/var/spack/repos/builtin/packages/wget/package.py
@@ -17,6 +17,8 @@ class Wget(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later WITH OpenSSL-Exception")
+ version("1.24.5", sha256="fa2dc35bab5184ecbc46a9ef83def2aaaa3f4c9f3c97d4bd19dcb07d4da637de")
+ version("1.21.4", sha256="81542f5cefb8faacc39bbbc6c82ded80e3e4a88505ae72ea51df27525bcde04c")
version("1.21.3", sha256="5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5")
version("1.21.2", sha256="e6d4c76be82c676dd7e8c61a29b2ac8510ae108a810b5d1d18fc9a1d2c9a2497")
version("1.21.1", sha256="59ba0bdade9ad135eda581ae4e59a7a9f25e3a4bde6a5419632b31906120e26e")
@@ -26,6 +28,8 @@ class Wget(AutotoolsPackage, GNUMirrorPackage):
version("1.17", sha256="3e04ad027c5b6ebd67c616eec13e66fbedb3d4d8cbe19cc29dadde44b92bda55")
version("1.16", sha256="b977fc10ac7a72d987d48136251aeb332f2dced1aabd50d6d56bdf72e2b79101")
+ depends_on("c", type="build") # generated
+
variant(
"ssl", default="openssl", values=("gnutls", "openssl"), description="Specify SSL backend"
)
@@ -36,6 +40,8 @@ class Wget(AutotoolsPackage, GNUMirrorPackage):
depends_on("gnutls", when="ssl=gnutls")
depends_on("openssl", when="ssl=openssl")
+ # OpenSSL 3.0 is not supported by wget, openssl@3.1: works:
+ conflicts("openssl@3.0", when="ssl=openssl")
depends_on("gettext", type="build")
depends_on("python@3:", type="build", when="+python")
diff --git a/var/spack/repos/builtin/packages/wgl/package.py b/var/spack/repos/builtin/packages/wgl/package.py
index 17be11243d..9d02f3c139 100644
--- a/var/spack/repos/builtin/packages/wgl/package.py
+++ b/var/spack/repos/builtin/packages/wgl/package.py
@@ -14,7 +14,7 @@ class Wgl(Package):
homepage = "https://learn.microsoft.com/en-us/windows/win32/opengl/wgl-and-windows-reference"
has_code = False
- tags = ["windows"]
+ tags = ["windows", "windows-system"]
# hard code the extension as shared lib
libraries = ["OpenGL32.Lib"]
@@ -36,6 +36,10 @@ class Wgl(Package):
version("10.0.26639")
version("10.0.20348")
+ variant(
+ "plat", values=("x64", "x86", "arm", "arm64"), default="x64", description="Toolchain arch"
+ )
+
# As per https://github.com/spack/spack/pull/31748 this provisory version represents
# an arbitrary openGL version designed for maximum compatibility with calling packages
# this current version simply reflects the latest OpenGL vesion available at the time of
@@ -58,7 +62,7 @@ class Wgl(Package):
depends_on("win-sdk@10.0.14393", when="@10.0.14393")
# WGL has no meaning on other platforms, should not be able to spec
- for plat in ["linux", "darwin", "cray"]:
+ for plat in ["linux", "darwin"]:
conflicts("platform=%s" % plat)
@classmethod
@@ -68,8 +72,18 @@ class Wgl(Package):
ver_str = re.search(version_match_pat, lib)
return ver_str if not ver_str else Version(ver_str.group())
+ @classmethod
+ def determine_variants(cls, libs, ver_str):
+ """Allow for determination of toolchain arch for detected WGL"""
+ variants = []
+ for lib in libs:
+ base, lib_name = os.path.split(lib)
+ _, arch = os.path.split(base)
+ variants.append("plat=%s" % arch)
+ return variants
+
def _spec_arch_to_sdk_arch(self):
- spec_arch = str(self.spec.architecture.target).lower()
+ spec_arch = str(self.spec.architecture.target.family).lower()
_64bit = "64" in spec_arch
arm = "arm" in spec_arch
if arm:
diff --git a/var/spack/repos/builtin/packages/wgrib2/package.py b/var/spack/repos/builtin/packages/wgrib2/package.py
index 52ad78f32b..ba1b1bcd61 100644
--- a/var/spack/repos/builtin/packages/wgrib2/package.py
+++ b/var/spack/repos/builtin/packages/wgrib2/package.py
@@ -38,6 +38,9 @@ class Wgrib2(MakefilePackage):
extension="tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("netcdf3", default=True, description="Link in netcdf3 library to write netcdf3 files")
variant(
"netcdf4", default=False, description="Link in netcdf4 library to write netcdf3/4 files"
@@ -113,13 +116,14 @@ class Wgrib2(MakefilePackage):
# Use Spack compiler wrapper flags
def inject_flags(self, name, flags):
+ spec = self.spec
if name == "cflags":
- if self.spec.compiler.name == "apple-clang":
+ if spec.satisfies("%apple-clang"):
flags.append("-Wno-error=implicit-function-declaration")
# When mixing Clang/gfortran need to link to -lgfortran
# Find this by searching for gfortran/../lib
- if self.spec.compiler.name in ["apple-clang", "clang"]:
+ if spec.satisfies("%apple-clang") or spec.satisfies("%clang"):
if "gfortran" in self.compiler.fc:
output = Executable(self.compiler.fc)("-###", output=str, error=str)
libdir = re.search("--libdir=(.+?) ", output).group(1)
@@ -150,9 +154,10 @@ class Wgrib2(MakefilePackage):
makefile.filter(r"^%s=.*" % makefile_option, "{}={}".format(makefile_option, value))
def setup_build_environment(self, env):
- if self.spec.compiler.name in "intel":
+ spec = self.spec
+ if spec.satisfies("%oneapi") or spec.satisfies("%intel"):
comp_sys = "intel_linux"
- elif self.spec.compiler.name in ["gcc", "clang", "apple-clang"]:
+ elif spec.satisfies("%gcc") or spec.satisfies("%clang") or spec.satisfies("%apple-clang"):
comp_sys = "gnu_linux"
env.set("COMP_SYS", comp_sys)
diff --git a/var/spack/repos/builtin/packages/wgsim/package.py b/var/spack/repos/builtin/packages/wgsim/package.py
index f2a6d25535..8c471e5642 100644
--- a/var/spack/repos/builtin/packages/wgsim/package.py
+++ b/var/spack/repos/builtin/packages/wgsim/package.py
@@ -20,6 +20,8 @@ class Wgsim(Package):
version("2011.10.17", commit="a12da3375ff3b51a5594d4b6fa35591173ecc229")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/which/package.py b/var/spack/repos/builtin/packages/which/package.py
index 1c36d3ed39..8fc8eb0fe1 100644
--- a/var/spack/repos/builtin/packages/which/package.py
+++ b/var/spack/repos/builtin/packages/which/package.py
@@ -18,6 +18,8 @@ class Which(AutotoolsPackage):
version("2.21", sha256="f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad")
+ depends_on("c", type="build") # generated
+
executables = ["which"]
@classmethod
diff --git a/var/spack/repos/builtin/packages/whip/package.py b/var/spack/repos/builtin/packages/whip/package.py
index 138ce77477..f6b826a7fa 100644
--- a/var/spack/repos/builtin/packages/whip/package.py
+++ b/var/spack/repos/builtin/packages/whip/package.py
@@ -18,9 +18,12 @@ class Whip(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("main", branch="main")
+ version("0.3.0", sha256="0c803e9453bc9c0cc8fbead507635b5c30465b6c2d46328f2a6a1140b4a8ff48")
version("0.2.0", sha256="d8fec662526accbd1624922fdf01a077d6f312cf253382660e4a2f65e28e8686")
version("0.1.0", sha256="5d557794f4afc8332fc660948a342f69e22bc9e5d575ffb3e3944cf526db5ec9")
+ depends_on("cxx", type="build")
+
depends_on("cmake@3.22:", type="build")
# Exactly one of +cuda and +rocm need to be set
diff --git a/var/spack/repos/builtin/packages/whizard/hepmc3.3.0.patch b/var/spack/repos/builtin/packages/whizard/hepmc3.3.0.patch
new file mode 100644
index 0000000000..80cacea69f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/whizard/hepmc3.3.0.patch
@@ -0,0 +1,25 @@
+--- a/src/hepmc/HepMC3Wrap.cpp 2024-08-21 20:16:15.770305323 +0200
++++ b/src/hepmc/HepMC3Wrap.cpp 2024-08-21 20:16:28.463638884 +0200
+@@ -161,7 +162,7 @@
+ }
+
+ extern "C" void gen_event_add_vertex( GenEvent* evt, GenVertex* v ) {
+- evt->add_vertex( v );
++ evt->add_vertex( GenVertexPtr(v) );
+ }
+
+ extern "C" void gen_event_set_signal_process_vertex
+@@ -237,11 +238,11 @@
+ }
+
+ extern "C" void gen_vertex_add_particle_in( GenVertex* v, GenParticle* p ) {
+- v->add_particle_in( p );
++ v->add_particle_in( GenParticlePtr(p) );
+ }
+
+ extern "C" void gen_vertex_add_particle_out( GenVertex* v, GenParticle* p ) {
+- v->add_particle_out( p );
++ v->add_particle_out( GenParticlePtr(p) );
+ }
+
+ extern "C" bool gen_vertex_is_valid( GenVertex* v ) { \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/whizard/package.py b/var/spack/repos/builtin/packages/whizard/package.py
index 57241cd6cf..c6481fa571 100644
--- a/var/spack/repos/builtin/packages/whizard/package.py
+++ b/var/spack/repos/builtin/packages/whizard/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -11,7 +13,7 @@ class Whizard(AutotoolsPackage):
of multi-particle scattering cross sections
and simulated event samples."""
- homepage = "whizard.hepforge.org"
+ homepage = "https://whizard.hepforge.org"
urls = [
"https://launchpad.net/whizard/3.1.x/3.1.2/+download/whizard-3.1.2.tar.gz",
"https://whizard.hepforge.org/downloads/?f=whizard-2.8.3.tar.gz",
@@ -25,6 +27,7 @@ class Whizard(AutotoolsPackage):
license("GPL-2.0-or-later")
version("master", branch="master")
+ version("3.1.4", sha256="9da9805251d786adaf4ad5a112f9c4ee61d515778af0d2623d6460c3f1f900cd")
version("3.1.2", sha256="4f706f8ef02a580ae4dba867828691dfe0b3f9f9b8982b617af72eb8cd4c6fa3")
version("3.1.1", sha256="dd48e4e39b8a4990be47775ec6171f89d8147cb2e9e293afc7051a7dbc5a23ef")
version("3.1.0", sha256="9dc5e6d1a25d2fc708625f85010cb81b63559ff02cceb9b35024cf9f426c0ad9")
@@ -41,6 +44,10 @@ class Whizard(AutotoolsPackage):
version("2.8.1", sha256="0c759ce0598e25f38e04659f745c5963d238c4b5c12209f16449b6c0bc6dc64e")
version("2.8.0", sha256="3b5175eafa879d1baca20237d18fb2b18bee89631e73ada499de9c082d009696")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"hepmc",
default="3",
@@ -51,6 +58,7 @@ class Whizard(AutotoolsPackage):
variant("pythia8", default=True, description="builds with pythia8")
variant("fastjet", default=False, description="builds with fastjet")
+ variant("gosam", default=False, description="builds with gosam")
variant("lcio", default=False, description="builds with lcio")
variant("lhapdf", default=False, description="builds with fastjet")
variant("openmp", default=False, description="builds with openmp")
@@ -64,20 +72,29 @@ class Whizard(AutotoolsPackage):
depends_on("hepmc3", when="hepmc=3")
depends_on("lcio", when="+lcio")
depends_on("pythia8", when="+pythia8")
+ depends_on("pythia8@:8.309", when="@:3.1.3+pythia8")
depends_on("lhapdf", when="+lhapdf")
depends_on("fastjet", when="+fastjet")
+ depends_on("py-gosam", when="+gosam")
+ depends_on("gosam-contrib", when="+gosam")
+ depends_on("qgraf", when="+gosam")
+
depends_on(
"openloops@2.0.0: +compile_extra num_jobs=1 " "processes=eett,eevvjj,ppllj,tbw",
when="+openloops",
)
depends_on("texlive", when="+latex")
+ depends_on("ghostscript", when="+latex")
depends_on("zlib-api")
# Fix for https://github.com/key4hep/key4hep-spack/issues/71
# NOTE: This will become obsolete in a future release of whizard, so once
# that happens, this needs to be adapted with a when clause
- patch("parallel_build_fix.patch", when="@3:")
+ patch("parallel_build_fix.patch", when="@3:3.1.3")
patch("parallel_build_fix_2.8.patch", when="@2.8")
+
+ # Subset of https://gitlab.tp.nt.uni-siegen.de/whizard/public/-/commit/f6048e4
+ patch("hepmc3.3.0.patch", when="@3:3.1.4^hepmc3@3.3.0:")
# Make sure that the patch actually has an effect by running autoreconf
force_autoreconf = True
# Which then requires the following build dependencies
@@ -121,6 +138,14 @@ class Whizard(AutotoolsPackage):
env.set("FC", self.compiler.fc)
env.set("F77", self.compiler.fc)
+ @run_before("autoreconf")
+ def prepare_whizard(self):
+ # As described in the manual (SVN Repository version)
+ # https://whizard.hepforge.org/manual/manual003.html#sec%3Aprerequisites
+ if not os.path.exists("configure.ac"):
+ shell = which("sh")
+ shell("build_master.sh")
+
def configure_args(self):
spec = self.spec
enable_hepmc = "no" if "hepmc=off" in spec else "yes"
@@ -131,10 +156,10 @@ class Whizard(AutotoolsPackage):
# todo: hoppet
# todo: recola
# todo: looptools
- # todo: gosam
# todo: pythia6
]
args.extend(self.enable_or_disable("fastjet"))
+ args.extend(self.enable_or_disable("gosam"))
args.extend(self.enable_or_disable("pythia8"))
args.extend(self.enable_or_disable("lcio"))
args.extend(self.enable_or_disable("lhapdf"))
@@ -142,8 +167,8 @@ class Whizard(AutotoolsPackage):
if "+openloops" in spec:
args.append(f"--with-openloops={spec['openloops'].prefix}")
- if "+openmp" not in spec:
- args.append("--disable-openmp")
+ if "+openmp" in spec:
+ args.append("--enable-fc-openmp")
return args
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/wi4mpi/package.py b/var/spack/repos/builtin/packages/wi4mpi/package.py
index 808dc1d08b..19b5ba033a 100644
--- a/var/spack/repos/builtin/packages/wi4mpi/package.py
+++ b/var/spack/repos/builtin/packages/wi4mpi/package.py
@@ -27,6 +27,10 @@ class Wi4mpi(CMakePackage):
version("3.2.2", sha256="23ac69740577d66a68ddd5360670f0a344e3c47a5d146033c63a67e54e56c66f")
version("3.2.1", sha256="0d928cb930b6cb1ae648eca241db59812ee0e5c041faf2f57728bbb6ee4e36df")
version("3.2.0", sha256="3322f6823dbec1d58a1fcf163b2bcdd7b9cd75dc6c7f78865fc6cb0a91bf6f94")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
variant(
"build_type",
default="Release",
@@ -43,8 +47,6 @@ class Wi4mpi(CMakePackage):
compiler = "INTEL"
elif "%clang" in self.spec:
compiler = "LLVM"
- elif "%pgi" in self.spec:
- compiler = "PGI"
else:
tty.error("Could not determine compiler used")
wi4mpi_build_type = "RELEASE"
diff --git a/var/spack/repos/builtin/packages/win-file/package.py b/var/spack/repos/builtin/packages/win-file/package.py
new file mode 100644
index 0000000000..2196be842d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/win-file/package.py
@@ -0,0 +1,35 @@
+# Copyright 2013-2024 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
+import shutil
+
+from spack.package import *
+
+
+class WinFile(Package):
+ """File "file type guesser" system utility cross compiled for x86_64 Windows
+ systems via the Mingw-w64 cross compiler and a custom Spack repository
+ """
+
+ homepage = "https://spack.github.io/windows-bootstrap-resources"
+ url = (
+ "https://spack.github.io/windows-bootstrap-resources/resources/file/5.45/file_5.45.tar.gz"
+ )
+
+ executables = ["^file$"]
+
+ version("5.45", sha256="11b8f3abf647c711bc50ef8451c8d6e955f11c4afd8b0a98f2ac65e9b6e10d5e")
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.search(r"file-(\S+)", output)
+ return match.group(1) if match else None
+
+ def install(self, spec, prefix):
+ mkdirp(prefix)
+ for subdir in os.listdir(self.stage.source_path):
+ shutil.move(subdir, prefix)
diff --git a/var/spack/repos/builtin/packages/win-gpg/package.py b/var/spack/repos/builtin/packages/win-gpg/package.py
new file mode 100644
index 0000000000..f2fef7ff6d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/win-gpg/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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
+import shutil
+
+from spack.package import *
+
+
+class WinGpg(Package):
+ """GnuPG is a complete and free implementation of the OpenPGP
+ standard as defined by RFC4880 (also known as PGP).
+
+ This utility was cross compiled for x86_64 Windows
+ systems via the Mingw-w64 cross compiler and a custom Spack repository
+ """
+
+ homepage = "https://spack.github.io/windows-bootstrap-resources/"
+ url = "https://spack.github.io/windows-bootstrap-resources/resources/gpg/2.4.5/gpg4win_2.4.5.tar.gz"
+
+ executables = ["^gpg$"]
+
+ version("2.4.5", sha256="249ab87bd06abea3140054089bad44d9a5d1531413590576da609142db2673ec")
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.search(r"gpg (\S+)", output)
+ return match.group(1) if match else None
+
+ def install(self, spec, prefix):
+ mkdirp(prefix)
+ for subdir in os.listdir(self.stage.source_path):
+ shutil.move(subdir, prefix)
diff --git a/var/spack/repos/builtin/packages/win-sdk/package.py b/var/spack/repos/builtin/packages/win-sdk/package.py
index 3c96fb1a91..7d40c22539 100644
--- a/var/spack/repos/builtin/packages/win-sdk/package.py
+++ b/var/spack/repos/builtin/packages/win-sdk/package.py
@@ -19,7 +19,7 @@ class WinSdk(Package):
homepage = "https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/"
has_code = False
- tags = ["windows"]
+ tags = ["windows", "windows-system"]
# The sdk has many libraries and executables. Record one for detection purposes
libraries = ["rcdll.dll"]
@@ -55,7 +55,7 @@ class WinSdk(Package):
# For now we don't support Windows development env
# on other platforms
- for plat in ["linux", "darwin", "cray"]:
+ for plat in ["linux", "darwin"]:
conflicts("platform=%s" % plat)
@classmethod
diff --git a/var/spack/repos/builtin/packages/win-wdk/package.py b/var/spack/repos/builtin/packages/win-wdk/package.py
index 8bf9f5b9d0..2138cbea2f 100644
--- a/var/spack/repos/builtin/packages/win-wdk/package.py
+++ b/var/spack/repos/builtin/packages/win-wdk/package.py
@@ -18,7 +18,7 @@ class WinWdk(Package):
"""
homepage = "https://learn.microsoft.com/en-us/windows-hardware/drivers/"
- tags = ["windows"]
+ tags = ["windows", "windows-system"]
# The wdk has many libraries and executables. Record one for detection purposes
libraries = ["mmos.lib"]
@@ -81,7 +81,7 @@ class WinWdk(Package):
depends_on("win-sdk@10.0.15063", when="@10.0.15063")
depends_on("win-sdk@10.0.14393", when="@10.0.14393")
- for plat in ["linux", "darwin", "cray"]:
+ for plat in ["linux", "darwin"]:
conflicts("platform=%s" % plat)
@classmethod
diff --git a/var/spack/repos/builtin/packages/winbison/package.py b/var/spack/repos/builtin/packages/winbison/package.py
index 877188c0cd..5b492f3183 100644
--- a/var/spack/repos/builtin/packages/winbison/package.py
+++ b/var/spack/repos/builtin/packages/winbison/package.py
@@ -36,6 +36,9 @@ class Winbison(CMakePackage):
version("2.5.14", sha256="2ace5c964fb4b45279544669950412dbe4e86908c03bd5ebc8c8d306e458e97d")
version("2.4.12", sha256="fcffc223897e14f2b5dce2db1c832f297cc43a1204e4b3fd713f1dc410e956e4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_directory = "spack-build"
cmake_dir = os.path.join(build_directory, "CMakeBuild")
diff --git a/var/spack/repos/builtin/packages/wiredtiger/package.py b/var/spack/repos/builtin/packages/wiredtiger/package.py
index 23675d7713..6f509117ba 100644
--- a/var/spack/repos/builtin/packages/wiredtiger/package.py
+++ b/var/spack/repos/builtin/packages/wiredtiger/package.py
@@ -15,6 +15,9 @@ class Wiredtiger(AutotoolsPackage):
version("10.0.0", sha256="4830107ac744c0459ef99697652aa3e655c2122005a469a49d221e692fb834a5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("python@3:", type=("build", "run"), when="+python")
depends_on("swig", type=("build", "run"), when="+python")
depends_on("lz4", when="+lz4")
diff --git a/var/spack/repos/builtin/packages/wireshark/package.py b/var/spack/repos/builtin/packages/wireshark/package.py
index 129677f177..951b125238 100644
--- a/var/spack/repos/builtin/packages/wireshark/package.py
+++ b/var/spack/repos/builtin/packages/wireshark/package.py
@@ -21,6 +21,9 @@ class Wireshark(CMakePackage):
version("3.0.8", sha256="b4bd8189934d82330a053c5b10398f2b625b1e1c8818831ab61739b2d7aa7561")
version("2.6.0", sha256="711c7f01d27a8817d58277a5487cef3e3c7bab1c8caaf8f4c92aa21015b9117f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("libssh", default=False, description="Build with libssh")
variant("nghttp2", default=False, description="Build with nghttp2")
variant("qt", default=False, description="Build with qt")
diff --git a/var/spack/repos/builtin/packages/wonton/package.py b/var/spack/repos/builtin/packages/wonton/package.py
index 6a6dcf0482..f73136012f 100644
--- a/var/spack/repos/builtin/packages/wonton/package.py
+++ b/var/spack/repos/builtin/packages/wonton/package.py
@@ -29,6 +29,9 @@ class Wonton(CMakePackage):
version("1.2.10", sha256="c5c2c99f040f1fa5a8da21ac5ccbbc5b226d1fd43ce3eb14c76d211601b65a72")
version("1.2.1", sha256="4f00513d1abe86f256214d2b5171b1575b2cd464df8609307c24cbc4c595c305")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("lapacke", default=True, description="Use LAPACKE solvers")
# Variants for controlling parallelism
diff --git a/var/spack/repos/builtin/packages/wordnet/package.py b/var/spack/repos/builtin/packages/wordnet/package.py
index d7bd40e092..efaed4924b 100644
--- a/var/spack/repos/builtin/packages/wordnet/package.py
+++ b/var/spack/repos/builtin/packages/wordnet/package.py
@@ -16,6 +16,8 @@ class Wordnet(AutotoolsPackage):
version("3.0", sha256="640db279c949a88f61f851dd54ebbb22d003f8b90b85267042ef85a3781d3a52")
+ depends_on("c", type="build") # generated
+
depends_on("tk")
depends_on("tcl")
diff --git a/var/spack/repos/builtin/packages/wps/package.py b/var/spack/repos/builtin/packages/wps/package.py
index 3a3aaa69f5..7aef1c38cf 100644
--- a/var/spack/repos/builtin/packages/wps/package.py
+++ b/var/spack/repos/builtin/packages/wps/package.py
@@ -22,6 +22,10 @@ class Wps(Package):
version("4.3", sha256="1913cb24de549f029d65635feea27f3304a8f42ec025954a0887651fc89d1e9e")
version("4.2", sha256="3e175d033355d3e7638be75bc7c0bc0de6da299ebd175a9bbc1b7a121acd0168")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Serial variant recommended in WRF/WPS docs
variant(
"build_type",
@@ -91,7 +95,6 @@ class Wps(Package):
"dmpar": "19",
"dmpar_NO_GRIB2": "20",
},
- "pgi": {"serial": "5", "serial_NO_GRIB2": "6", "dmpar": "7", "dmpar_NO_GRIB2": "8"},
}
try:
diff --git a/var/spack/repos/builtin/packages/wrf-io/package.py b/var/spack/repos/builtin/packages/wrf-io/package.py
index 6b80fdeef7..b63725927b 100644
--- a/var/spack/repos/builtin/packages/wrf-io/package.py
+++ b/var/spack/repos/builtin/packages/wrf-io/package.py
@@ -22,6 +22,9 @@ class WrfIo(CMakePackage):
version("develop", branch="develop")
version("1.2.0", sha256="000cf5294a2c68460085258186e1f36c86d3d0d9c433aa969a0f92736b745617")
+ depends_on("c", type="build")
+ depends_on("fortran", type="build")
+
variant("openmp", default=False, description="Enable multithreading with OpenMP")
depends_on("netcdf-c")
diff --git a/var/spack/repos/builtin/packages/wrf/package.py b/var/spack/repos/builtin/packages/wrf/package.py
index 15f81f0aac..e7187645c7 100644
--- a/var/spack/repos/builtin/packages/wrf/package.py
+++ b/var/spack/repos/builtin/packages/wrf/package.py
@@ -71,6 +71,21 @@ class Wrf(Package):
tags = ["windows"]
version(
+ "4.6.1",
+ sha256="b8ec11b240a3cf1274b2bd609700191c6ec84628e4c991d3ab562ce9dc50b5f2",
+ url="https://github.com/wrf-model/WRF/releases/download/v4.6.1/v4.6.1.tar.gz",
+ )
+ version(
+ "4.6.0",
+ sha256="1bb010f9e20b40d33d9df55a602ea9eb54c5444a7316c00a95e1cc44b209021e",
+ url="https://github.com/wrf-model/WRF/releases/download/v4.6.0/v4.6.0.tar.gz",
+ )
+ version(
+ "4.5.2",
+ sha256="408ba6aa60d9cd51d6bad2fa075a3d37000eb581b5d124162885b049c892bbdc",
+ url="https://github.com/wrf-model/WRF/releases/download/v4.5.2/v4.5.2.tar.gz",
+ )
+ version(
"4.5.1",
sha256="9d557c34c105db4d41e727843ecb19199233c7cf82c5369b34a2ce8efe65e2d1",
url="https://github.com/wrf-model/WRF/releases/download/v4.5.1/v4.5.1.tar.gz",
@@ -102,6 +117,9 @@ class Wrf(Package):
url="https://github.com/wrf-model/WRF/archive/V3.9.1.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant(
"build_type",
default="dmpar",
@@ -159,13 +177,13 @@ class Wrf(Package):
patch("patches/4.0/tirpc_detect.patch", when="@4.0")
patch("patches/4.0/add_aarch64.patch", when="@4.0")
- patch("patches/4.2/arch.Config.pl.patch", when="@4.2:")
+ patch("patches/4.2/arch.Config.pl.patch", when="@4.2:4.5.1")
patch("patches/4.2/arch.configure.defaults.patch", when="@=4.2")
patch("patches/4.2/4.2.2_arch.configure.defaults.patch", when="@4.2.2")
patch("patches/4.2/arch.conf_tokens.patch", when="@4.2:")
patch("patches/4.2/arch.postamble.patch", when="@4.2")
patch("patches/4.2/configure.patch", when="@4.2:4.3.3")
- patch("patches/4.2/external.io_netcdf.makefile.patch", when="@4.2:")
+ patch("patches/4.2/external.io_netcdf.makefile.patch", when="@4.2:4.5.1")
patch("patches/4.2/var.gen_be.Makefile.patch", when="@4.2:")
patch("patches/4.2/Makefile.patch", when="@4.2")
patch("patches/4.2/tirpc_detect.patch", when="@4.2")
@@ -173,7 +191,7 @@ class Wrf(Package):
patch("patches/4.2/add_aarch64_acfl.patch", when="@4.2:4.3.1 %arm target=aarch64:")
patch("patches/4.2/configure_aocc_2.3.patch", when="@4.2 %aocc@:2.4.0")
patch("patches/4.2/configure_aocc_3.0.patch", when="@4.2 %aocc@3.0.0:3.2.0")
- patch("patches/4.2/hdf5_fix.patch", when="@4.2: %aocc")
+ patch("patches/4.2/hdf5_fix.patch", when="@4.2:4.5.1 %aocc")
patch("patches/4.2/derf_fix.patch", when="@=4.2 %aocc")
patch(
"patches/4.2/add_tools_flags_acfl2304.patch",
@@ -183,14 +201,14 @@ class Wrf(Package):
patch("patches/4.3/add_aarch64.patch", when="@4.3.2:4.4.2 %gcc target=aarch64:")
patch("patches/4.3/add_aarch64_acfl.patch", when="@4.3.2:4.4.2 %arm target=aarch64:")
- patch("patches/4.4/arch.postamble.patch", when="@4.4:")
+ patch("patches/4.4/arch.postamble.patch", when="@4.4:4.5.1")
patch("patches/4.4/configure.patch", when="@4.4:4.4.2")
patch("patches/4.4/ifx.patch", when="@4.4: %oneapi")
patch("patches/4.5/configure.patch", when="@4.5:")
# Fix WRF to remove deprecated ADIOS2 functions
# https://github.com/wrf-model/WRF/pull/1860
- patch("patches/4.5/adios2-remove-deprecated-functions.patch", when="@4.5: ^adios2@2.9:")
+ patch("patches/4.5/adios2-remove-deprecated-functions.patch", when="@=4.5.0 ^adios2@2.9:")
# Various syntax fixes found by FPT tool
patch(
@@ -200,9 +218,9 @@ class Wrf(Package):
)
patch("patches/4.2/configure_fujitsu.patch", when="@4 %fj")
- patch("patches/4.3/Makefile.patch", when="@4.3:")
+ patch("patches/4.3/Makefile.patch", when="@4.3:4.5.1")
patch("patches/4.3/arch.postamble.patch", when="@4.3:4.3.3")
- patch("patches/4.3/fujitsu.patch", when="@4.3: %fj")
+ patch("patches/4.3/fujitsu.patch", when="@4.3:4.4 %fj")
# Syntax errors in physics routines
patch(
"https://github.com/wrf-model/WRF/commit/7c6fd575b7a8fe5715b07b38db160e606c302956.patch?full_index=1",
@@ -216,13 +234,13 @@ class Wrf(Package):
)
# Add ARM compiler support
patch(
- "https://github.com/wrf-model/WRF/pull/1888/commits/4a084e03575da65f254917ef5d8eb39074abd3fc.patch",
- sha256="c522c4733720df9a18237c06d8ab6199fa9674d78375b644aec7017cb38af9c5",
+ "https://github.com/wrf-model/WRF/commit/4a084e03575da65f254917ef5d8eb39074abd3fc.patch?full_index=1",
+ sha256="2d06d709074ded9bd6842aa83c0dfdad5a4e4e2df99e2e5d4a82579f0486117e",
when="@4.5: %arm",
)
patch(
- "https://github.com/wrf-model/WRF/pull/1888/commits/6087d9192f7f91967147e50f5bc8b9e49310cf98.patch",
- sha256="f82a18cf7334e0cbbfdf4ef3aa91ca26d4a372709f114ce0116b3fbb136ffac6",
+ "https://github.com/wrf-model/WRF/commit/6087d9192f7f91967147e50f5bc8b9e49310cf98.patch?full_index=1",
+ sha256="7c6487aefaa6cda0fff3976e78da07b09d2ba6c005d649f35a0f8f1694a0b2bb",
when="@4.5: %arm",
)
@@ -251,6 +269,20 @@ class Wrf(Package):
depends_on("m4", type="build")
depends_on("libtool", type="build")
depends_on("adios2", when="@4.5: +adios2")
+
+ requires(
+ "%gcc",
+ "%intel",
+ "%arm",
+ "%aocc",
+ "%fj",
+ "%oneapi",
+ policy="one_of",
+ msg="WRF supports only the GCC, Intel, AMD of Fujitsu compilers",
+ )
+ conflicts(
+ "%oneapi", when="@:4.3", msg="Intel oneapi compiler patch only added for version 4.4"
+ )
phases = ["configure", "build", "install"]
def setup_run_environment(self, env):
@@ -259,7 +291,13 @@ class Wrf(Package):
env.append_path("PATH", self.prefix.tools)
def setup_build_environment(self, env):
- env.set("NETCDF", self.spec["netcdf-c"].prefix)
+ # From 4.5.2 the split-netcdf patches are not needed,
+ # just tell the build system where netcdf and netcdf-c are:
+ if self.spec.satisfies("@4.5.2:"):
+ env.set("NETCDF", self.spec["netcdf-fortran"].prefix)
+ env.set("NETCDF_C", self.spec["netcdf-c"].prefix)
+ else:
+ env.set("NETCDF", self.spec["netcdf-c"].prefix)
if "+pnetcdf" in self.spec:
env.set("PNETCDF", self.spec["parallel-netcdf"].prefix)
# Add WRF-Chem module
@@ -381,6 +419,15 @@ class Wrf(Package):
config.filter("^DM_FC.*mpif90", "DM_FC = {0}".format(self.spec["mpi"].mpifc))
config.filter("^DM_CC.*mpicc", "DM_CC = {0}".format(self.spec["mpi"].mpicc))
+ if self.spec.satisfies("@:4.0.3 %intel@2018:"):
+ config.filter(r"-openmp", "-qopenmp")
+
+ if self.spec.satisfies("%gcc@14:"):
+ config.filter(
+ "^CFLAGS_LOCAL(.*?)=([^#\n\r]*)(.*)$", r"CFLAGS_LOCAL\1= \2 -fpermissive \3"
+ )
+ config.filter("^CC_TOOLS(.*?)=([^#\n\r]*)(.*)$", r"CC_TOOLS\1=\2 -fpermissive \3")
+
@run_before("configure")
def fortran_check(self):
if not self.compiler.fc:
@@ -391,11 +438,6 @@ class Wrf(Package):
# Remove broken default options...
self.do_configure_fixup()
- if self.spec.compiler.name not in ["intel", "gcc", "arm", "aocc", "fj", "oneapi"]:
- raise InstallError(
- "Compiler %s not currently supported for WRF build." % self.spec.compiler.name
- )
-
p = Popen("./configure", stdin=PIPE, stdout=PIPE, stderr=PIPE)
if sys.platform != "win32":
setNonBlocking(p.stdout)
diff --git a/var/spack/repos/builtin/packages/wrf/patches/4.4/ifx.patch b/var/spack/repos/builtin/packages/wrf/patches/4.4/ifx.patch
index 06ab5cff2b..3acd8be485 100644
--- a/var/spack/repos/builtin/packages/wrf/patches/4.4/ifx.patch
+++ b/var/spack/repos/builtin/packages/wrf/patches/4.4/ifx.patch
@@ -26,7 +26,7 @@ index 6aa210d7..a3224d34 100644
+PROMOTION = -real-size `expr 8 \* $(RWORDSIZE)` -i4
+ARCH_LOCAL = -DNONSTANDARD_SYSTEM_FUNC -DRPC_TYPES=2 -DXEON_SIMD
+CFLAGS_LOCAL = -w -flto -O3 -Wno-implicit-function-declaration -Wno-implicit-int
-+LDFLAGS_LOCAL = -flto -fuse-ld=lld
++LDFLAGS_LOCAL = -flto -fuse-ld=lld -i_use-path
+CPLUSPLUSLIB =
+ESMF_LDFLAG = $(CPLUSPLUSLIB)
+FCOPTIM = -O3
@@ -38,7 +38,7 @@ index 6aa210d7..a3224d34 100644
+FCSUFFIX =
+BYTESWAPIO = -convert big_endian
+RECORDLENGTH = -assume byterecl
-+FCBASEOPTS_NO_G = -O3 -flto -w -ftz -align array64byte -fno-alias $(FORMAT_FREE) $(BYTESWAPIO) -fp-model fast=2 -fimf-use-svml=true -vec-threshold0 -xCORE-AVX512
++FCBASEOPTS_NO_G = -O3 -flto -w -ftz -align array64byte -fno-alias $(FORMAT_FREE) $(BYTESWAPIO) -fp-model fast=2 -fimf-use-svml=true -vec-threshold0
+FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG)
+MODULE_SRCH_FLAG =
+TRADFLAG = -traditional-cpp
diff --git a/var/spack/repos/builtin/packages/wrk/package.py b/var/spack/repos/builtin/packages/wrk/package.py
index cb2c400a48..aada2b0133 100644
--- a/var/spack/repos/builtin/packages/wrk/package.py
+++ b/var/spack/repos/builtin/packages/wrk/package.py
@@ -22,6 +22,8 @@ class Wrk(MakefilePackage):
version("4.0.0", sha256="8fa8fb05f4663d03c1ca7804367eb602882f9630441bd56e8e9aaf3a2bd26067")
version("3.1.2", sha256="da88a25f0eeb9e1fd6a9dcf4a96859e9e758f9446f0787cf7c95e4ccde14eefc")
+ depends_on("c", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("wrk", prefix.bin)
diff --git a/var/spack/repos/builtin/packages/wsmancli/package.py b/var/spack/repos/builtin/packages/wsmancli/package.py
index c5e5372131..dc1dd65951 100644
--- a/var/spack/repos/builtin/packages/wsmancli/package.py
+++ b/var/spack/repos/builtin/packages/wsmancli/package.py
@@ -17,6 +17,9 @@ class Wsmancli(AutotoolsPackage):
version("2.5.0", sha256="9e60e9b21d14328feadceeaf0c3c233d7ee701e7814010ede23367a9bd5efb33")
version("2.3.2", sha256="b5ffd4c4cdbcde7cf8cf84be3a3c1b92d84ffb8b492e6008a83e090c760d6c2d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/wt/package.py b/var/spack/repos/builtin/packages/wt/package.py
index eb43df3d58..a26ba6d7ee 100644
--- a/var/spack/repos/builtin/packages/wt/package.py
+++ b/var/spack/repos/builtin/packages/wt/package.py
@@ -19,6 +19,9 @@ class Wt(CMakePackage):
version("master", branch="master")
version("3.3.7", sha256="054af8d62a7c158df62adc174a6a57610868470a07e7192ee7ce60a18552851d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
# wt builds in parallel, but requires more than 5 GByte RAM per -j <njob>
# which most machines do not provide and crash the build
parallel = False
diff --git a/var/spack/repos/builtin/packages/wtdbg2/package.py b/var/spack/repos/builtin/packages/wtdbg2/package.py
index 07d9022276..f40d5e292d 100644
--- a/var/spack/repos/builtin/packages/wtdbg2/package.py
+++ b/var/spack/repos/builtin/packages/wtdbg2/package.py
@@ -14,8 +14,11 @@ class Wtdbg2(MakefilePackage):
license("GPL-3.0-only")
+ version("2.5", sha256="a2ffc8503d29f491a9a38ef63230d5b3c96db78377b5d25c91df511d0df06413")
version("2.3", sha256="fb61d38a4c60a39b3b194e63b855141c05ddcbe71cf244ae613766a9b0a56621")
+ depends_on("c", type="build") # generated
+
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
@@ -27,4 +30,4 @@ class Wtdbg2(MakefilePackage):
makefile.filter("-mpopcnt -msse4.2", "")
def install(self, spec, prefix):
- make("install", "BIN=%s" % prefix.bin)
+ make("install", f"BIN={prefix.bin}")
diff --git a/var/spack/repos/builtin/packages/wxparaver/package.py b/var/spack/repos/builtin/packages/wxparaver/package.py
index 831831e76b..8e1d9c7543 100644
--- a/var/spack/repos/builtin/packages/wxparaver/package.py
+++ b/var/spack/repos/builtin/packages/wxparaver/package.py
@@ -27,6 +27,9 @@ class Wxparaver(AutotoolsPackage):
version("4.7.1", sha256="8cbec0c5e0f8a849820f6682cbb0920ea234bb7f20d1483e38ea5d0b0ee045cd")
version("4.7.0", sha256="81e02bcc1853455b13435172a4336ba85ba05020887d322c9678c97def03d76f")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("boost@1.36: +serialization")
depends_on("wxwidgets@2.8:") # NOTE: using external for this one is usually simpler
depends_on("wxpropgrid@1.4:")
diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py
index b105d4f928..e8e7937b11 100644
--- a/var/spack/repos/builtin/packages/wxpropgrid/package.py
+++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py
@@ -12,11 +12,13 @@ class Wxpropgrid(Package, SourceforgePackage):
properties such as strings, numbers, flagsets, string arrays,
and colours."""
- homepage = "http://wxpropgrid.sourceforge.net/"
+ homepage = "https://wxpropgrid.sourceforge.net/"
sourceforge_mirror_path = "wxpropgrid/wxpropgrid-1.4.15-src.tar.gz"
version("1.4.15", sha256="f0c9a86656828f592c8e57d2c89401f07f0af6a45b17bbca3990e8d29121c2b8")
+ depends_on("cxx", type="build") # generated
+
depends_on("wxwidgets")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/wxwidgets/package.py b/var/spack/repos/builtin/packages/wxwidgets/package.py
index ea4dfac626..232aec767b 100644
--- a/var/spack/repos/builtin/packages/wxwidgets/package.py
+++ b/var/spack/repos/builtin/packages/wxwidgets/package.py
@@ -23,16 +23,25 @@ class Wxwidgets(AutotoolsPackage):
git = "https://github.com/wxWidgets/wxWidgets.git"
version("develop", branch="master")
+ version("3.2.5", sha256="0ad86a3ad3e2e519b6a705248fc9226e3a09bbf069c6c692a02acf7c2d1c6b51")
+ version("3.2.4", sha256="0640e1ab716db5af2ecb7389dbef6138d7679261fbff730d23845ba838ca133e")
version("3.2.2.1", sha256="dffcb6be71296fff4b7f8840eb1b510178f57aa2eb236b20da41182009242c02")
version("3.2.2", sha256="8edf18672b7bc0996ee6b7caa2bee017a9be604aad1ee471e243df7471f5db5d")
version("3.1.0", sha256="e082460fb6bf14b7dd6e8ac142598d1d3d0b08a7b5ba402fdbf8711da7e66da8")
version("3.0.2", sha256="346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d")
version("3.0.1", sha256="bd671b79ec56af8fb3844e11cafceac1a4276fb02c79404d06b91b6c19d2c5f5")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("opengl", default=False, description="Enable OpenGL support")
+ variant("gui", default=True, description="Enable GUI support.")
+
patch("math_include.patch", when="@3.0.1:3.0.2")
depends_on("pkgconfig", type="build")
- depends_on("gtkplus")
+ depends_on("gtkplus", when="+gui")
+ depends_on("mesa-glu", when="+opengl")
@when("@:3.0.2")
def build(self, spec, prefix):
@@ -42,6 +51,11 @@ class Wxwidgets(AutotoolsPackage):
spec = self.spec
options = ["--enable-unicode", "--disable-precomp-headers"]
+ if self.spec.satisfies("+opengl"):
+ options.append("--with-opengl")
+ if not self.spec.satisfies("+gui"):
+ options.append("--disable-gui")
+
# see https://trac.wxwidgets.org/ticket/17639
if spec.satisfies("@:3.1.0") and sys.platform == "darwin":
options.extend(["--disable-qtkit", "--disable-mediactrl"])
diff --git a/var/spack/repos/builtin/packages/x11perf/package.py b/var/spack/repos/builtin/packages/x11perf/package.py
index ef3e402e66..cdd5ee0496 100644
--- a/var/spack/repos/builtin/packages/x11perf/package.py
+++ b/var/spack/repos/builtin/packages/x11perf/package.py
@@ -9,17 +9,19 @@ from spack.package import *
class X11perf(AutotoolsPackage, XorgPackage):
"""Simple X server performance benchmarker."""
- homepage = "https://cgit.freedesktop.org/xorg/app/x11perf"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/x11perf"
xorg_mirror_path = "app/x11perf-1.6.0.tar.gz"
version("1.6.1", sha256="a1874618df0e30ae1a9b2470fb50e77a40c4a6f6ddf87a5c154f7a3b913ac0b3")
version("1.6.0", sha256="d33051c4e93100ab60609aee14ff889bb2460f28945063d793e21eda19381abb")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxmu")
depends_on("libxrender")
depends_on("libxft")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/x264/package.py b/var/spack/repos/builtin/packages/x264/package.py
index 5bd179b8e8..2d222278a3 100644
--- a/var/spack/repos/builtin/packages/x264/package.py
+++ b/var/spack/repos/builtin/packages/x264/package.py
@@ -13,8 +13,11 @@ class X264(AutotoolsPackage):
license("GPL-2.0-or-later")
+ version("20240314", commit="585e01997f0c7e6d72c8ca466406d955c07de912")
version("20210613", commit="5db6aa6cab1b146e07b60cc1736a01f21da01154")
+ depends_on("c", type="build") # generated
+
depends_on("nasm")
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/xalan-c/package.py b/var/spack/repos/builtin/packages/xalan-c/package.py
index 29dfbed8fb..6e01b278da 100644
--- a/var/spack/repos/builtin/packages/xalan-c/package.py
+++ b/var/spack/repos/builtin/packages/xalan-c/package.py
@@ -22,6 +22,9 @@ class XalanC(CMakePackage):
version("1.12", sha256="ee7d4b0b08c5676f5e586c7154d94a5b32b299ac3cbb946e24c4375a25552da7")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant(
"transcoder",
default="default",
diff --git a/var/spack/repos/builtin/packages/xapian-core/package.py b/var/spack/repos/builtin/packages/xapian-core/package.py
index 9117b3bb1f..0256664206 100644
--- a/var/spack/repos/builtin/packages/xapian-core/package.py
+++ b/var/spack/repos/builtin/packages/xapian-core/package.py
@@ -21,4 +21,7 @@ class XapianCore(AutotoolsPackage):
version("1.4.11", sha256="9f16b2f3e2351a24034d7636f73566ab74c3f0729e9e0492934e956b25c5bc07")
version("1.4.3", sha256="7d5295511ca2de70463a29e75f6a2393df5dc1485bf33074b778c66e1721e475")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
diff --git a/var/spack/repos/builtin/packages/xauth/package.py b/var/spack/repos/builtin/packages/xauth/package.py
index c4a792f1d4..33649b571a 100644
--- a/var/spack/repos/builtin/packages/xauth/package.py
+++ b/var/spack/repos/builtin/packages/xauth/package.py
@@ -10,7 +10,7 @@ class Xauth(AutotoolsPackage, XorgPackage):
"""The xauth program is used to edit and display the authorization
information used in connecting to the X server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xauth"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xauth"
xorg_mirror_path = "app/xauth-1.0.9.tar.gz"
license("custom")
@@ -21,12 +21,14 @@ class Xauth(AutotoolsPackage, XorgPackage):
version("1.0.10", sha256="5196821221d824b9bc278fa6505c595acee1d374518a52217d9b64d3c63dedd0")
version("1.0.9", sha256="0709070caf23ba2fb99536907b75be1fe31853999c62d3e87a6a8d26ba8a8cdb")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxau")
depends_on("libxext")
depends_on("libxmu")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xbacklight/package.py b/var/spack/repos/builtin/packages/xbacklight/package.py
index 0392228ac2..542bbabb41 100644
--- a/var/spack/repos/builtin/packages/xbacklight/package.py
+++ b/var/spack/repos/builtin/packages/xbacklight/package.py
@@ -12,7 +12,7 @@ class Xbacklight(AutotoolsPackage, XorgPackage):
supporting backlight brightness control and changes them all in the
same way."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xbacklight"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xbacklight"
xorg_mirror_path = "app/xbacklight-1.2.1.tar.gz"
license("MIT")
@@ -21,6 +21,8 @@ class Xbacklight(AutotoolsPackage, XorgPackage):
version("1.2.2", sha256="9812497b95b28776539808ba75e8b8a2d48a57416e172e04e9580e65c76a61bb")
version("1.2.1", sha256="82c80cd851e3eb6d7a216d92465fcf6d5e456c2d5ac12c63cd2757b39fb65b10")
+ depends_on("c", type="build") # generated
+
depends_on("libxcb")
depends_on("xcb-util")
diff --git a/var/spack/repos/builtin/packages/xbae/package.py b/var/spack/repos/builtin/packages/xbae/package.py
new file mode 100644
index 0000000000..f17282d21c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xbae/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xbae(AutotoolsPackage):
+ """The Xbae widget set consists of the well known XbaeMatrix widget,
+ and Caption and XbaeInput widgets."""
+
+ homepage = "https://sourceforge.net/projects/xbae/"
+ url = "https://sourceforge.net/projects/xbae/files/xbae/4.60.4/xbae-4.60.4.tar.gz"
+
+ license("MIT", checked_by="wdconinc") # Old style, Bellcore variant
+
+ version("4.60.4", sha256="eb72702ed0a36d043f2075a9d5a4545556da1b8dab4d67d85fca92f37aeb04a8")
+
+ depends_on("c", type="build")
+
+ depends_on("libxext")
+ depends_on("libxmu")
+ depends_on("libxpm")
+ depends_on("libxt")
+ depends_on("motif")
diff --git a/var/spack/repos/builtin/packages/xbiff/package.py b/var/spack/repos/builtin/packages/xbiff/package.py
index 0e7f535e30..0709fbf0e0 100644
--- a/var/spack/repos/builtin/packages/xbiff/package.py
+++ b/var/spack/repos/builtin/packages/xbiff/package.py
@@ -11,7 +11,7 @@ class Xbiff(AutotoolsPackage, XorgPackage):
It only handles mail stored in a filesystem accessible file,
not via IMAP, POP or other remote access protocols."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xbiff"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xbiff"
xorg_mirror_path = "app/xbiff-1.0.3.tar.gz"
license("X11")
@@ -19,6 +19,8 @@ class Xbiff(AutotoolsPackage, XorgPackage):
version("1.0.4", sha256="8a0ca5628e6893340a2448b461a103b48a174ae777500beb9a9f56f99330ce62")
version("1.0.3", sha256="b4b702348674985741685e3ec7fcb5640ffb7bf20e753fc2d708f70f2e4c304d")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxext")
diff --git a/var/spack/repos/builtin/packages/xbitmaps/package.py b/var/spack/repos/builtin/packages/xbitmaps/package.py
index 5331ba0a55..87d799efe5 100644
--- a/var/spack/repos/builtin/packages/xbitmaps/package.py
+++ b/var/spack/repos/builtin/packages/xbitmaps/package.py
@@ -10,11 +10,15 @@ class Xbitmaps(AutotoolsPackage, XorgPackage):
"""The xbitmaps package contains bitmap images used by multiple
applications built in Xorg."""
- homepage = "https://cgit.freedesktop.org/xorg/data/bitmaps/"
+ homepage = "https://gitlab.freedesktop.org/xorg/data/bitmaps/"
xorg_mirror_path = "data/xbitmaps-1.1.1.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.1.3", sha256="93b433b7ff223c4685fdba583b4bd30f2706be2413a670021084422d85b0269d")
+ version("1.1.2", sha256="27e700e8ee02c43f7206f4eca8f1953ad15236cac95d7a0f08505c3f7d99c265")
version("1.1.1", sha256="3bc89e05be4179ce4d3dbba1ae554da4591d41f7a489d9e2735a18cfd8378188")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/xbraid/package.py b/var/spack/repos/builtin/packages/xbraid/package.py
index eb845dad60..4f77813bc5 100644
--- a/var/spack/repos/builtin/packages/xbraid/package.py
+++ b/var/spack/repos/builtin/packages/xbraid/package.py
@@ -13,10 +13,15 @@ class Xbraid(MakefilePackage):
url = "https://github.com/XBraid/xbraid/archive/v2.2.0.tar.gz"
tags = ["radiuss"]
+ version("3.1.0", sha256="3419b22918c65555e8c552b70a0837a251a74c471dac8e4a7b2272bf7d955c88")
version("3.0.0", sha256="06988c0599cd100d3b3f3ebb183c9ad34a4021922e0896815cbedc659aaadce6")
version("2.3.0", sha256="706f0acde201c7c336ade3604679759752a74e2cd6c2a29a8bf5676b6e54b704")
version("2.2.0", sha256="082623b2ddcd2150b3ace65b96c1e00be637876ec6c94dc8fefda88743b35ba3")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("mpi")
@when("@:2.2.0")
diff --git a/var/spack/repos/builtin/packages/xcalc/package.py b/var/spack/repos/builtin/packages/xcalc/package.py
index ea4145c272..de11c6f870 100644
--- a/var/spack/repos/builtin/packages/xcalc/package.py
+++ b/var/spack/repos/builtin/packages/xcalc/package.py
@@ -10,7 +10,7 @@ class Xcalc(AutotoolsPackage, XorgPackage):
"""xcalc is a scientific calculator X11 client that can emulate a TI-30
or an HP-10C."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xcalc"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xcalc"
xorg_mirror_path = "app/xcalc-1.0.6.tar.gz"
license("MIT")
@@ -20,10 +20,12 @@ class Xcalc(AutotoolsPackage, XorgPackage):
version("1.0.7", sha256="2b00129583f51a45acfcaaa461750169e530996e190b31f7a92891846380f1f5")
version("1.0.6", sha256="7fd5cd9a35160925c41cbadfb1ea23599fa20fd26cd873dab20a650b24efe8d1")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxt")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xcb-demo/package.py b/var/spack/repos/builtin/packages/xcb-demo/package.py
index f023755b03..09be1af090 100644
--- a/var/spack/repos/builtin/packages/xcb-demo/package.py
+++ b/var/spack/repos/builtin/packages/xcb-demo/package.py
@@ -14,6 +14,8 @@ class XcbDemo(AutotoolsPackage):
version("0.1", sha256="19ace2812a05313747356dc5e2331a9a6f5eb46631a26819cf30eeeaa38077f9")
+ depends_on("c", type="build") # generated
+
depends_on("libxcb")
depends_on("xcb-util")
depends_on("xcb-util-image")
diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py
index 27247cbb75..31e87a3453 100644
--- a/var/spack/repos/builtin/packages/xcb-proto/package.py
+++ b/var/spack/repos/builtin/packages/xcb-proto/package.py
@@ -6,30 +6,41 @@
from spack.package import *
-class XcbProto(AutotoolsPackage):
+class XcbProto(AutotoolsPackage, XorgPackage):
"""xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to
generate the majority of its code and API."""
homepage = "https://xcb.freedesktop.org/"
- url = "https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-1.14.1.tar.xz"
+ xorg_mirror_path = "proto/xcb-proto-1.14.1.tar.xz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.17.0", sha256="2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c")
+ version("1.16.0", sha256="a75a1848ad2a89a82d841a51be56ce988ff3c63a8d6bf4383ae3219d8d915119")
version("1.15.2", sha256="7072beb1f680a2fe3f9e535b797c146d22528990c72f63ddb49d2f350a3653ed")
version("1.14.1", sha256="f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3")
version("1.14", sha256="186a3ceb26f9b4a015f5a44dcc814c93033a5fc39684f36f1ecc79834416a605")
- version("1.13", sha256="0698e8f596e4c0dbad71d3dc754d95eb0edbb42df5464e0f782621216fa33ba7")
- version("1.12", sha256="cfa49e65dd390233d560ce4476575e4b76e505a0e0bacdfb5ba6f8d0af53fd59")
- version("1.11", sha256="d12152193bd71aabbdbb97b029717ae6d5d0477ab239614e3d6193cc0385d906")
+ version(
+ "1.13",
+ sha256="0698e8f596e4c0dbad71d3dc754d95eb0edbb42df5464e0f782621216fa33ba7",
+ url="https://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.gz",
+ deprecated=True,
+ )
+ version(
+ "1.12",
+ sha256="cfa49e65dd390233d560ce4476575e4b76e505a0e0bacdfb5ba6f8d0af53fd59",
+ url="https://xcb.freedesktop.org/dist/xcb-proto-1.12.tar.gz",
+ deprecated=True,
+ )
+ version(
+ "1.11",
+ sha256="d12152193bd71aabbdbb97b029717ae6d5d0477ab239614e3d6193cc0385d906",
+ url="https://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.gz",
+ deprecated=True,
+ )
extends("python")
patch("xcb-proto-1.12-schema-1.patch", when="@1.12")
-
- def url_for_version(self, version):
- if version >= Version("1.14"):
- url = "https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-{0}.tar.xz"
- else:
- url = "http://xcb.freedesktop.org/dist/xcb-proto-{0}.tar.gz"
-
- return url.format(version)
diff --git a/var/spack/repos/builtin/packages/xcb-util-cursor/package.py b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py
index 3c408d0ed6..31b19f9a9b 100644
--- a/var/spack/repos/builtin/packages/xcb-util-cursor/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-cursor/package.py
@@ -24,8 +24,11 @@ class XcbUtilCursor(AutotoolsPackage, XorgPackage):
"0.1.3",
sha256="a322332716a384c94d3cbf98f2d8fe2ce63c2fe7e2b26664b6cea1d411723df8",
url="https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.4.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("xcb-util-renderutil")
depends_on("xcb-util-image")
diff --git a/var/spack/repos/builtin/packages/xcb-util-errors/package.py b/var/spack/repos/builtin/packages/xcb-util-errors/package.py
index c6f28d2ccb..0a4dea8c4b 100644
--- a/var/spack/repos/builtin/packages/xcb-util-errors/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-errors/package.py
@@ -22,8 +22,11 @@ class XcbUtilErrors(AutotoolsPackage, XorgPackage):
"1.0",
sha256="7752a722e580efdbada30632cb23aed35c18757399ac3b547b59fd7257cf5e33",
url="https://xcb.freedesktop.org/dist/xcb-util-errors-1.0.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("xcb-proto")
diff --git a/var/spack/repos/builtin/packages/xcb-util-image/package.py b/var/spack/repos/builtin/packages/xcb-util-image/package.py
index ecd793cb64..0702e1e36d 100644
--- a/var/spack/repos/builtin/packages/xcb-util-image/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-image/package.py
@@ -24,8 +24,11 @@ class XcbUtilImage(AutotoolsPackage, XorgPackage):
"0.4.0",
sha256="cb2c86190cf6216260b7357a57d9100811bb6f78c24576a3a5bfef6ad3740a42",
url="https://xcb.freedesktop.org/dist/xcb-util-image-0.4.0.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("xcb-util")
diff --git a/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py
index e7c19ebb57..af65e8994a 100644
--- a/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-keysyms/package.py
@@ -24,8 +24,11 @@ class XcbUtilKeysyms(AutotoolsPackage, XorgPackage):
"0.4.0",
sha256="0807cf078fbe38489a41d755095c58239e1b67299f14460dec2ec811e96caa96",
url="https://xcb.freedesktop.org/dist/xcb-util-keysyms-0.4.0.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("xproto@7.0.8:")
diff --git a/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py
index 6ae06aa0bd..59fa41039a 100644
--- a/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-renderutil/package.py
@@ -24,8 +24,11 @@ class XcbUtilRenderutil(AutotoolsPackage, XorgPackage):
"0.3.9",
sha256="55eee797e3214fe39d0f3f4d9448cc53cffe06706d108824ea37bb79fcedcad5",
url="https://xcb.freedesktop.org/dist/xcb-util-renderutil-0.3.9.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/xcb-util-wm/package.py b/var/spack/repos/builtin/packages/xcb-util-wm/package.py
index 3f825e83b5..b6386eb803 100644
--- a/var/spack/repos/builtin/packages/xcb-util-wm/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-wm/package.py
@@ -24,8 +24,11 @@ class XcbUtilWm(AutotoolsPackage, XorgPackage):
"0.4.1",
sha256="038b39c4bdc04a792d62d163ba7908f4bb3373057208c07110be73c1b04b8334",
url="https://xcb.freedesktop.org/dist/xcb-util-wm-0.4.1.tar.gz",
+ deprecated=True,
)
+ depends_on("c", type="build") # generated
+
depends_on("m4", type="build")
depends_on("libxcb@1.4:")
diff --git a/var/spack/repos/builtin/packages/xcb-util-xrm/package.py b/var/spack/repos/builtin/packages/xcb-util-xrm/package.py
index cdf160d149..3eda838445 100644
--- a/var/spack/repos/builtin/packages/xcb-util-xrm/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util-xrm/package.py
@@ -19,6 +19,8 @@ class XcbUtilXrm(AutotoolsPackage):
# in order to build it.
version("1.2", tag="v1.2", commit="a45b3d0bbaa94bf8a68405ab8c5c61404da464ce", submodules=True)
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/xcb-util/package.py b/var/spack/repos/builtin/packages/xcb-util/package.py
index 65f539510f..060bdba882 100644
--- a/var/spack/repos/builtin/packages/xcb-util/package.py
+++ b/var/spack/repos/builtin/packages/xcb-util/package.py
@@ -26,6 +26,8 @@ class XcbUtil(AutotoolsPackage, XorgPackage):
url="https://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.gz",
)
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.4:")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/xcdf/package.py b/var/spack/repos/builtin/packages/xcdf/package.py
index 8de5354463..2ab94a4c36 100644
--- a/var/spack/repos/builtin/packages/xcdf/package.py
+++ b/var/spack/repos/builtin/packages/xcdf/package.py
@@ -17,6 +17,8 @@ class Xcdf(CMakePackage):
version("3.01", sha256="39fe816f40d6af18e16e71ffcf958258fdac4959ac894a60d1b863efaa57754e")
version("3.00.03", sha256="4e445a2fea947ba14505d08177c8d5b55856f8411f28de1fe4d4c00f6824b711")
+ depends_on("cxx", type="build") # generated
+
patch("remove_python_support.patch", when="@3.00.03")
depends_on("python@3.7:", when="@3.01:")
diff --git a/var/spack/repos/builtin/packages/xcfun/package.py b/var/spack/repos/builtin/packages/xcfun/package.py
index 4e803367bc..8c9b0440de 100644
--- a/var/spack/repos/builtin/packages/xcfun/package.py
+++ b/var/spack/repos/builtin/packages/xcfun/package.py
@@ -22,6 +22,10 @@ class Xcfun(CMakePackage):
version("2.0.1", sha256="719383c3fffdd5da5b005f56ffd97457b0b2fb48317e955263ef5384d53ddfca")
version("2.0.0", sha256="34398e935c522d0b55e1803fd6116e7cd40677d1add8894ef08362361705cf25")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
extends("python")
depends_on("cmake@3.14:", type="build")
depends_on("python@3:")
@@ -36,7 +40,6 @@ class Xcfun(CMakePackage):
"-DPYMOD_INSTALL_LIBDIR=/python{0}/site-packages".format(spec["python"].version[:-1]),
"-DXCFUN_MAX_ORDER=8",
"-DXCFUN_PYTHON_INTERFACE=ON",
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command),
"-DENABLE_TESTALL=OFF",
]
return args
diff --git a/var/spack/repos/builtin/packages/xclip/package.py b/var/spack/repos/builtin/packages/xclip/package.py
index 9335a84729..0cd0e9c16e 100644
--- a/var/spack/repos/builtin/packages/xclip/package.py
+++ b/var/spack/repos/builtin/packages/xclip/package.py
@@ -21,6 +21,8 @@ class Xclip(AutotoolsPackage):
version("0.13", commit="9aa7090c3b8b437c6489edca32ae43d82e0c1281")
+ depends_on("c", type="build") # generated
+
depends_on("libxmu")
depends_on("libx11")
depends_on("autoconf", type="build")
diff --git a/var/spack/repos/builtin/packages/xclipboard/package.py b/var/spack/repos/builtin/packages/xclipboard/package.py
index df29c0afef..b1b4215a00 100644
--- a/var/spack/repos/builtin/packages/xclipboard/package.py
+++ b/var/spack/repos/builtin/packages/xclipboard/package.py
@@ -12,18 +12,20 @@ class Xclipboard(AutotoolsPackage, XorgPackage):
CLIPBOARD selections for later use. It stores each CLIPBOARD
selection as a separate string, each of which can be selected."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xclipboard"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xclipboard"
xorg_mirror_path = "app/xclipboard-1.1.3.tar.gz"
version("1.1.4", sha256="c40cb97f6c8597ba74a3de5c188d4429f686e4d395b85dac0ec8c7311bdf3d10")
version("1.1.3", sha256="a8c335cf166cbb27ff86569503db7e639f85741ad199bfb3ba45dd0cfda3da7f")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt@1.1:")
depends_on("libx11")
depends_on("libxkbfile")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xclock/package.py b/var/spack/repos/builtin/packages/xclock/package.py
index d7f3ff4c9c..9d2bf79db2 100644
--- a/var/spack/repos/builtin/packages/xclock/package.py
+++ b/var/spack/repos/builtin/packages/xclock/package.py
@@ -11,7 +11,7 @@ class Xclock(AutotoolsPackage, XorgPackage):
the time in analog or digital form, continuously updated at a
frequency which may be specified by the user."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xclock"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xclock"
xorg_mirror_path = "app/xclock-1.0.7.tar.gz"
license("MIT")
@@ -22,6 +22,8 @@ class Xclock(AutotoolsPackage, XorgPackage):
version("1.0.8", sha256="bb6f2439e6037759dc1682d80a3fe0232e7b55aa9b38548203e746d290b246bd")
version("1.0.7", sha256="e730bd575938d5628ef47003a9d4d41b882621798227f5d0c12f4a26365ed1b5")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libx11")
@@ -30,6 +32,6 @@ class Xclock(AutotoolsPackage, XorgPackage):
depends_on("libxkbfile")
depends_on("libxt")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xcmiscproto/package.py b/var/spack/repos/builtin/packages/xcmiscproto/package.py
index d358bc2b9c..0cd8d9999f 100644
--- a/var/spack/repos/builtin/packages/xcmiscproto/package.py
+++ b/var/spack/repos/builtin/packages/xcmiscproto/package.py
@@ -12,7 +12,7 @@ class Xcmiscproto(AutotoolsPackage, XorgPackage):
This extension defines a protocol that provides Xlib two ways to query
the server for available resource IDs."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xcmiscproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xcmiscproto"
xorg_mirror_path = "proto/xcmiscproto-1.2.2.tar.gz"
version("1.2.2", sha256="48013cfbe4bd5580925a854a43e2bccbb4c7a5a31128070644617b6dc7f8ef85")
diff --git a/var/spack/repos/builtin/packages/xcmsdb/package.py b/var/spack/repos/builtin/packages/xcmsdb/package.py
index 4537b3f438..a918e086e5 100644
--- a/var/spack/repos/builtin/packages/xcmsdb/package.py
+++ b/var/spack/repos/builtin/packages/xcmsdb/package.py
@@ -12,7 +12,7 @@ class Xcmsdb(AutotoolsPackage, XorgPackage):
specified in section 7, Device Color Characterization, of the
X11 Inter-Client Communication Conventions Manual (ICCCM)."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xcmsdb"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xcmsdb"
xorg_mirror_path = "app/xcmsdb-1.0.5.tar.gz"
license("custom")
@@ -20,6 +20,8 @@ class Xcmsdb(AutotoolsPackage, XorgPackage):
version("1.0.6", sha256="640b42c746eb34bdd71ca2850f2bc9fb0ade194c9f152a8d002425a0684df077")
version("1.0.5", sha256="8442352ee5eb3ea0d3a489c26d734e784ef6964150c2a173401d0dc6638ca236")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/xcompmgr/package.py b/var/spack/repos/builtin/packages/xcompmgr/package.py
index d555c4369c..3fcb79a1d1 100644
--- a/var/spack/repos/builtin/packages/xcompmgr/package.py
+++ b/var/spack/repos/builtin/packages/xcompmgr/package.py
@@ -11,7 +11,7 @@ class Xcompmgr(AutotoolsPackage, XorgPackage):
XFIXES, DAMAGE, RENDER, and COMPOSITE extensions. It enables basic
eye-candy effects."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xcompmgr"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xcompmgr"
xorg_mirror_path = "app/xcompmgr-1.1.7.tar.gz"
license("MIT")
@@ -20,6 +20,8 @@ class Xcompmgr(AutotoolsPackage, XorgPackage):
version("1.1.8", sha256="ba10933678a5665d06fa7096bd08f37316add8ed84aaacd7ba26a97e8f2e0498")
version("1.1.7", sha256="ef4b23c370f99403bbd9b6227f8aa4edc3bc83fc6d57ee71f6f442397cef505a")
+ depends_on("c", type="build") # generated
+
depends_on("libxcomposite")
depends_on("libxfixes")
depends_on("libxdamage")
diff --git a/var/spack/repos/builtin/packages/xconsole/package.py b/var/spack/repos/builtin/packages/xconsole/package.py
index 2a8b3fecc4..8ca378c614 100644
--- a/var/spack/repos/builtin/packages/xconsole/package.py
+++ b/var/spack/repos/builtin/packages/xconsole/package.py
@@ -10,18 +10,21 @@ class Xconsole(AutotoolsPackage, XorgPackage):
"""xconsole displays in a X11 window the messages which are usually sent
to /dev/console."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xconsole"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xconsole"
xorg_mirror_path = "app/xconsole-1.0.6.tar.gz"
+ version("1.1.0", sha256="fe5d2ba99b754909b2a04ce4abf054cd1e3134a830d69aea82e8465cc9f73942")
version("1.0.8", sha256="1897be35738489f92ef511caef189db8d5079469374021dc09b59e89992b7c29")
version("1.0.7", sha256="91bc7327643b1ca57800a37575930af16fbea485d426a96d8f465de570aa6eb3")
version("1.0.6", sha256="28151453a0a687462516de133bac0287b488a2ff56da78331fee34bc1bf3e7d5")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt@1.0:")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xcursor-themes/package.py b/var/spack/repos/builtin/packages/xcursor-themes/package.py
index 316e7e42db..dedf61d022 100644
--- a/var/spack/repos/builtin/packages/xcursor-themes/package.py
+++ b/var/spack/repos/builtin/packages/xcursor-themes/package.py
@@ -11,9 +11,12 @@ class XcursorThemes(Package, XorgPackage):
originally created for the XFree86 Project, and now shipped as part
of the X.Org software distribution."""
- homepage = "https://cgit.freedesktop.org/xorg/data/cursors"
+ homepage = "https://gitlab.freedesktop.org/xorg/data/cursors"
xorg_mirror_path = "data/xcursor-themes-1.0.4.tar.gz"
+ version("1.0.7", sha256="dcb68b6265235db3064a4427e2bc5ae0d30f21f7468dd7534553715d1c39d009")
+ version("1.0.6", sha256="22638f7bd6257adf889d25af9c8a7b2cfdcf5a5e18339d25fbb092dbf6c663c1")
+ version("1.0.5", sha256="85636a3774debe830a15b9cd3c438171356fb451d7e3667212777a55d88f7897")
version("1.0.4", sha256="8ed23bab13a4010fe4e95b37eefb634e31ac7cb8240b8b3b7d919c3a2db09503")
depends_on("libxcursor")
@@ -21,6 +24,7 @@ class XcursorThemes(Package, XorgPackage):
depends_on("xcursorgen", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
+ depends_on("util-macros@1.20:", type="build", when="@1.0.7:")
def install(self, spec, prefix):
configure("--prefix={0}".format(prefix))
diff --git a/var/spack/repos/builtin/packages/xcursorgen/package.py b/var/spack/repos/builtin/packages/xcursorgen/package.py
index 0a082116b1..6672be219f 100644
--- a/var/spack/repos/builtin/packages/xcursorgen/package.py
+++ b/var/spack/repos/builtin/packages/xcursorgen/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Xcursorgen(AutotoolsPackage, XorgPackage):
"""xcursorgen prepares X11 cursor sets for use with libXcursor."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xcursorgen"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xcursorgen"
xorg_mirror_path = "app/xcursorgen-1.0.6.tar.gz"
version("1.0.8", sha256="b8bb2756918343b8bc15a4ce875e9efb6c4e7777adba088280e53dd09753b6ac")
version("1.0.7", sha256="6bc32d4977ffd60c00583bfd217f1d1245ca54dafbfbbcdbf14f696f9487b83e")
version("1.0.6", sha256="4559f2b6eaa93de4cb6968679cf40e39bcbe969b62ebf3ff84f6780f8048ef8c")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxcursor")
depends_on("libpng@1.2.0:")
diff --git a/var/spack/repos/builtin/packages/xdbedizzy/package.py b/var/spack/repos/builtin/packages/xdbedizzy/package.py
index 22e8a1de48..1945ac1911 100644
--- a/var/spack/repos/builtin/packages/xdbedizzy/package.py
+++ b/var/spack/repos/builtin/packages/xdbedizzy/package.py
@@ -10,11 +10,13 @@ class Xdbedizzy(AutotoolsPackage, XorgPackage):
"""xdbedizzy is a demo of the X11 Double Buffer Extension (DBE)
creating a double buffered spinning scene."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xdbedizzy"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xdbedizzy"
xorg_mirror_path = "app/xdbedizzy-1.1.0.tar.gz"
version("1.1.0", sha256="810e88b087b76f8b5993db4fc5165de3e5d29b0d4bf0e893750ee408fc7a5c0a")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxext")
diff --git a/var/spack/repos/builtin/packages/xdelta/package.py b/var/spack/repos/builtin/packages/xdelta/package.py
index 551a4d2cba..eeba577cff 100644
--- a/var/spack/repos/builtin/packages/xdelta/package.py
+++ b/var/spack/repos/builtin/packages/xdelta/package.py
@@ -17,6 +17,9 @@ class Xdelta(AutotoolsPackage):
version("3.0.11", sha256="28278a4d73127f3d2b00bbde179f8ee1f289ccd3f7f2ac7cd837f6580f90a7b7")
version("3.0.10", sha256="a3f9c177ec2b91e6d8ec82ee7f0bcbbb2d18fed7d743d7577a990c01235e657d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/xditview/package.py b/var/spack/repos/builtin/packages/xditview/package.py
index 48e809ab3a..4c0c9790b3 100644
--- a/var/spack/repos/builtin/packages/xditview/package.py
+++ b/var/spack/repos/builtin/packages/xditview/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xditview(AutotoolsPackage, XorgPackage):
"""xditview displays ditroff output on an X display."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xditview"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xditview"
xorg_mirror_path = "app/xditview-1.0.4.tar.gz"
license("X11")
@@ -18,6 +18,8 @@ class Xditview(AutotoolsPackage, XorgPackage):
version("1.0.5", sha256="67c4522a24dd7e8762ae458fe216c5bddc12101af295e78c19ff7313fa8cbfad")
version("1.0.4", sha256="73ad88cfc879edcc6ede65999c11d670da27575388126795d71f3ad60286d379")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xdm/package.py b/var/spack/repos/builtin/packages/xdm/package.py
index 7b811992ae..909b877c39 100644
--- a/var/spack/repos/builtin/packages/xdm/package.py
+++ b/var/spack/repos/builtin/packages/xdm/package.py
@@ -9,16 +9,19 @@ from spack.package import *
class Xdm(AutotoolsPackage, XorgPackage):
"""X Display Manager / XDMCP server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xdm"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xdm"
xorg_mirror_path = "app/xdm-1.1.11.tar.gz"
license("MIT")
+ version("1.1.16", sha256="931013642b7fab893f374eb1aa6f9ad043c88b654802fc51f841cea76aff44e0")
version("1.1.14", sha256="bcc543c3c120094d58d9cc9837958d4303693c2116ba342ba3dd9440137b4026")
version("1.1.13", sha256="2f05aa58c205dcf10443ba414d27535b74ec11466dc95228343b0ce4f0c2a307")
version("1.1.12", sha256="8ea737945f69e172afbbc8b5060e4c7ea8079f402eb0a458572197c907020bb4")
version("1.1.11", sha256="38c544a986143b1f24566c1a0111486b339b92224b927be78714eeeedca12a14")
+ depends_on("c", type="build") # generated
+
depends_on("libxmu")
depends_on("libx11")
depends_on("libxau")
diff --git a/var/spack/repos/builtin/packages/xdmf3/package.py b/var/spack/repos/builtin/packages/xdmf3/package.py
index 22a6d92345..4909c669e3 100644
--- a/var/spack/repos/builtin/packages/xdmf3/package.py
+++ b/var/spack/repos/builtin/packages/xdmf3/package.py
@@ -22,6 +22,10 @@ class Xdmf3(CMakePackage):
# but the current version, 3.x, is maintained on the master branch.
version("2019-01-14", commit="8d9c98081d89ac77a132d56bc8bef53581db4078")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("shared", default=True, description="Enable shared libraries")
variant("mpi", default=True, description="Enable MPI")
diff --git a/var/spack/repos/builtin/packages/xdotool/package.py b/var/spack/repos/builtin/packages/xdotool/package.py
index 66df65bb47..877e924187 100644
--- a/var/spack/repos/builtin/packages/xdotool/package.py
+++ b/var/spack/repos/builtin/packages/xdotool/package.py
@@ -30,6 +30,8 @@ class Xdotool(MakefilePackage):
"3.20150503.1", sha256="e8326883bd5e91bede7336cbee186e6e9143f40b3fb61c84afc9bb31b87e96d1"
)
+ depends_on("c", type="build") # generated
+
depends_on("libxext")
depends_on("libxtst")
depends_on("libxi")
diff --git a/var/spack/repos/builtin/packages/xdpyinfo/package.py b/var/spack/repos/builtin/packages/xdpyinfo/package.py
index 9cf8c460cd..5c972059d1 100644
--- a/var/spack/repos/builtin/packages/xdpyinfo/package.py
+++ b/var/spack/repos/builtin/packages/xdpyinfo/package.py
@@ -14,7 +14,7 @@ class Xdpyinfo(AutotoolsPackage, XorgPackage):
and the server, and the different types of screens, visuals, and X11
protocol extensions that are available."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xdpyinfo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xdpyinfo"
xorg_mirror_path = "app/xdpyinfo-1.3.2.tar.gz"
license("custom")
@@ -22,14 +22,16 @@ class Xdpyinfo(AutotoolsPackage, XorgPackage):
version("1.3.3", sha256="2ae7b8213ea839b8376843477496276e8d69550c48bff081e16376539fc27c5a")
version("1.3.2", sha256="ef39935e8e9b328e54a85d6218d410d6939482da6058db1ee1b39749d98cbcf2")
+ depends_on("c", type="build")
+
depends_on("libxext")
depends_on("libx11")
depends_on("libxtst")
depends_on("libxcb")
- depends_on("xproto@7.0.22:")
- depends_on("recordproto")
- depends_on("inputproto")
- depends_on("fixesproto")
+ depends_on("xproto@7.0.22:", type="build")
+ depends_on("recordproto", type="build")
+ depends_on("inputproto", type="build")
+ depends_on("fixesproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xdriinfo/package.py b/var/spack/repos/builtin/packages/xdriinfo/package.py
index d9d1b15ec3..b0ed3d5f98 100644
--- a/var/spack/repos/builtin/packages/xdriinfo/package.py
+++ b/var/spack/repos/builtin/packages/xdriinfo/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xdriinfo(AutotoolsPackage, XorgPackage):
"""xdriinfo - query configuration information of X11 DRI drivers."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xdriinfo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xdriinfo"
xorg_mirror_path = "app/xdriinfo-1.0.5.tar.gz"
license("custom")
@@ -18,6 +18,8 @@ class Xdriinfo(AutotoolsPackage, XorgPackage):
version("1.0.6", sha256="c59d1d97d8b1066ea470407237c87fb131ca9f6c4db4652a6e9461ae03c698ad")
version("1.0.5", sha256="e4e6abaa4591c540ab63133927a6cebf0a5f4d27dcd978878ab4a422d62a838e")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("expat")
depends_on("libxshmfence")
diff --git a/var/spack/repos/builtin/packages/xedit/package.py b/var/spack/repos/builtin/packages/xedit/package.py
index dad2b3cdec..07bfc8ff26 100644
--- a/var/spack/repos/builtin/packages/xedit/package.py
+++ b/var/spack/repos/builtin/packages/xedit/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xedit(AutotoolsPackage, XorgPackage):
"""Xedit is a simple text editor for X."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xedit"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xedit"
xorg_mirror_path = "app/xedit-1.2.2.tar.gz"
license("BSD-3-Clause")
@@ -17,6 +17,8 @@ class Xedit(AutotoolsPackage, XorgPackage):
version("1.2.3", sha256="3c8be175613f72858b24d973b0d66ae2d3c9a48a5f0bd637920d85b283feede7")
version("1.2.2", sha256="7e2dacbc2caed81d462ee028e108866893217d55e35e4b860b09be2b409ee18f")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt@1.0:")
diff --git a/var/spack/repos/builtin/packages/xeniumranger/package.py b/var/spack/repos/builtin/packages/xeniumranger/package.py
new file mode 100644
index 0000000000..d08ceb553d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xeniumranger/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xeniumranger(Package):
+ """The Xenium In Situ software suite is a set of software applications for analyzing and
+ visualizing in situ gene expression data produced by the Xenium Analyzer. Xenium Ranger
+ provides flexible off-instrument reanalysis of Xenium In Situ data.
+
+ This package requires the user to accept a license and to download the tarball manually.
+ Once downloaded, the file should be placed within a manual mirror or within the current
+ directory. For instructions on making a manual mirror, see
+ https://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.10xgenomics.com/support/software/xenium-ranger/latest"
+ manual_download = True
+ license_url = "support.10xgenomics.com/license"
+
+ version("1.7.1", sha256="3bfa85de75ef473b54a5a6d853649999e446f2f00cc202750bb22af5078965a1")
+
+ # xeniumranger is distributed as precompiled binaries that are not compatible with
+ # processors without the avx instruction set ...
+ # https://www.10xgenomics.com/support/software/xenium-ranger/downloads/XR-system-requirements
+ conflicts("target=:k10") # last AMD processor not to support avx
+ conflicts("target=:westmere") # last Intel processor not to support avx
+ conflicts("target=:x86_64_v2") # last generic architecture not to support avx
+
+ def url_for_version(self, version):
+ return "file://{0}/xeniumranger-{1}.tar.gz".format(os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ install_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py
index 5c42b25cb5..ac10c1e068 100644
--- a/var/spack/repos/builtin/packages/xerces-c/package.py
+++ b/var/spack/repos/builtin/packages/xerces-c/package.py
@@ -20,12 +20,19 @@ class XercesC(AutotoolsPackage):
license("Apache-2.0")
- version("3.2.4", sha256="74aa626fc71e729ee227602870dd29a5a01cd8c9c1c7330837a51da2eb5722cc")
- version("3.2.3", sha256="45c2329e684405f2b8854ecbddfb8d5b055cdf0fe4d35736cc352c504989bbb6")
- version("3.2.2", sha256="1f2a4d1dbd0086ce0f52b718ac0fa4af3dc1ce7a7ff73a581a05fbe78a82bce0")
- version("3.2.1", sha256="a36b6e162913ec218cfb84772d2535d43c3365355a601d45d4b8ce11f0ece0da")
- version("3.1.4", sha256="9408f12c1628ecf80730bedbe8b2caad810edd01bb4c66f77b60c873e8cc6891")
- version("3.1.3", sha256="fc5e5e0247b108b8d64d75aeb124cabdee9b7fcd725a89fe2242b4637b25c1fa")
+ version("3.3.0", sha256="ef752578587e26013a933f16d76305c9b43ca32f869e3d3426986e03efb01d64")
+ version("3.2.5", sha256="1db4028c9b7f1f778efbf4a9462d65e13f9938f2c22f9e9994e12c49ba97e252")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2018-1311
+ version("3.2.4", sha256="74aa626fc71e729ee227602870dd29a5a01cd8c9c1c7330837a51da2eb5722cc")
+ version("3.2.3", sha256="45c2329e684405f2b8854ecbddfb8d5b055cdf0fe4d35736cc352c504989bbb6")
+ version("3.2.2", sha256="1f2a4d1dbd0086ce0f52b718ac0fa4af3dc1ce7a7ff73a581a05fbe78a82bce0")
+ version("3.2.1", sha256="a36b6e162913ec218cfb84772d2535d43c3365355a601d45d4b8ce11f0ece0da")
+ version("3.1.4", sha256="9408f12c1628ecf80730bedbe8b2caad810edd01bb4c66f77b60c873e8cc6891")
+ version("3.1.3", sha256="fc5e5e0247b108b8d64d75aeb124cabdee9b7fcd725a89fe2242b4637b25c1fa")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
# Whilst still using Autotools, can use full cxxstd with 'default'
# If build is moved to CMake, then will also need a patch to Xerces-C's
diff --git a/var/spack/repos/builtin/packages/xeus/package.py b/var/spack/repos/builtin/packages/xeus/package.py
index ab4cd48d19..624835fc75 100644
--- a/var/spack/repos/builtin/packages/xeus/package.py
+++ b/var/spack/repos/builtin/packages/xeus/package.py
@@ -22,6 +22,8 @@ class Xeus(CMakePackage):
version("0.15.0", sha256="bc99235b24d5757dc129f3ed531501fb0d0667913927ed39ee24281952649183")
version("0.14.1", sha256="a6815845d4522ec279f142d3b4e92ef52cd80847b512146a65f256a77e058cfe")
+ depends_on("cxx", type="build") # generated
+
variant("examples", default=False, description="Build examples")
variant("shared", default=True, description="Build shared libraries")
diff --git a/var/spack/repos/builtin/packages/xev/package.py b/var/spack/repos/builtin/packages/xev/package.py
index e6c418d4c7..f5db651986 100644
--- a/var/spack/repos/builtin/packages/xev/package.py
+++ b/var/spack/repos/builtin/packages/xev/package.py
@@ -15,16 +15,19 @@ class Xev(AutotoolsPackage, XorgPackage):
debugging and development tool, and should not be needed in normal
usage."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xev"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xev"
xorg_mirror_path = "app/xev-1.2.2.tar.gz"
license("MIT")
+ version("1.2.6", sha256="e2e3527023017af3a9bfbef0a90f8e46ac354c506b51f0ee3834b30823e43b25")
version("1.2.5", sha256="a948974ede621a8402ed9ea64f1ec83992285aa4fbb9d40b52985156c61a358a")
version("1.2.4", sha256="6b1f94813f008a4ba45e0a2d4e1b64deaab1def56fabd7fac3621106cbaa3383")
version("1.2.3", sha256="a3c5fbf339f43ba625a6d84e52ab1a7170581505ef498be6aa4e7bdfbd8d5cef")
version("1.2.2", sha256="e4c0c7b6f411e8b9731f2bb10d729d167bd00480d172c28b62607a6ea9e45c57")
+ depends_on("c", type="build") # generated
+
depends_on("libxrandr@1.2:")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xextproto/package.py b/var/spack/repos/builtin/packages/xextproto/package.py
index 1b5f4ca83e..47dc4a4df2 100644
--- a/var/spack/repos/builtin/packages/xextproto/package.py
+++ b/var/spack/repos/builtin/packages/xextproto/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xextproto(AutotoolsPackage, XorgPackage):
"""X Protocol Extensions."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xextproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xextproto"
xorg_mirror_path = "proto/xextproto-7.3.0.tar.gz"
version("7.3.0", sha256="1b1bcdf91221e78c6c33738667a57bd9aaa63d5953174ad8ed9929296741c9f5")
diff --git a/var/spack/repos/builtin/packages/xeyes/package.py b/var/spack/repos/builtin/packages/xeyes/package.py
index 8d72001bb5..711ee12c49 100644
--- a/var/spack/repos/builtin/packages/xeyes/package.py
+++ b/var/spack/repos/builtin/packages/xeyes/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xeyes(AutotoolsPackage, XorgPackage):
"""xeyes - a follow the mouse X demo, using the X SHAPE extension"""
- homepage = "https://cgit.freedesktop.org/xorg/app/xeyes"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xeyes"
xorg_mirror_path = "app/xeyes-1.1.1.tar.gz"
license("MIT")
@@ -18,6 +18,8 @@ class Xeyes(AutotoolsPackage, XorgPackage):
version("1.1.2", sha256="4a675b34854da362bd8dff4f21ff92e0c19798b128ea0af24b7fc7c5ac2feea3")
version("1.1.1", sha256="3a1871a560ab87c72a2e2ecb7fd582474448faec3e254c9bd8bead428ab1bca3")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxt")
depends_on("libxext")
diff --git a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py
index 7ef9adf327..0504e17e49 100644
--- a/var/spack/repos/builtin/packages/xf86bigfontproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86bigfontproto/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xf86bigfontproto(AutotoolsPackage, XorgPackage):
"""X.org XF86BigFontProto protocol headers."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86bigfontproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86bigfontproto"
xorg_mirror_path = "proto/xf86bigfontproto-1.2.0.tar.gz"
version("1.2.0", sha256="d190e6462b2bbbac6ee9a007fb8eccb9ad9f5f70544154f388266f031d4bbb23")
diff --git a/var/spack/repos/builtin/packages/xf86dga/package.py b/var/spack/repos/builtin/packages/xf86dga/package.py
index 64a48a6b08..4400f34a3d 100644
--- a/var/spack/repos/builtin/packages/xf86dga/package.py
+++ b/var/spack/repos/builtin/packages/xf86dga/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Xf86dga(AutotoolsPackage, XorgPackage):
"""dga is a simple test client for the XFree86-DGA extension."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xf86dga"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xf86dga"
xorg_mirror_path = "app/xf86dga-1.0.3.tar.gz"
version("1.0.3", sha256="acbf89f60a99b18c161d2beb0e4145a0fdf6c516f7f45fa52e547d88491f75c9")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxxf86dga@1.1:")
diff --git a/var/spack/repos/builtin/packages/xf86dgaproto/package.py b/var/spack/repos/builtin/packages/xf86dgaproto/package.py
index 7242c4c3ba..e60bdb4942 100644
--- a/var/spack/repos/builtin/packages/xf86dgaproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86dgaproto/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xf86dgaproto(AutotoolsPackage, XorgPackage):
"""X.org XF86DGAProto protocol headers."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86dgaproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86dgaproto"
xorg_mirror_path = "proto/xf86dgaproto-2.1.tar.gz"
version("2.1", sha256="73bc6fc830cce5a0ec9c750d4702601fc0fca12d6353ede8b4c0092c9c4ca2af")
diff --git a/var/spack/repos/builtin/packages/xf86driproto/package.py b/var/spack/repos/builtin/packages/xf86driproto/package.py
index 953be0c912..defa0dd092 100644
--- a/var/spack/repos/builtin/packages/xf86driproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86driproto/package.py
@@ -13,7 +13,7 @@ class Xf86driproto(AutotoolsPackage, XorgPackage):
the video hardware without requiring data to be passed through the X
server."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86driproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86driproto"
xorg_mirror_path = "proto/xf86driproto-2.1.1.tar.gz"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/xf86miscproto/package.py b/var/spack/repos/builtin/packages/xf86miscproto/package.py
index 69de74bb79..7487eb933c 100644
--- a/var/spack/repos/builtin/packages/xf86miscproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86miscproto/package.py
@@ -12,7 +12,7 @@ class Xf86miscproto(AutotoolsPackage, XorgPackage):
supported by the XFree86 X server and versions of the Xorg X server
prior to Xorg 1.6."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86miscproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86miscproto"
xorg_mirror_path = "proto/xf86miscproto-0.9.3.tar.gz"
version("0.9.3", sha256="1b05cb76ac165c703b82bdd270b86ebbc4d42a7d04d299050b07ba2099c31352")
diff --git a/var/spack/repos/builtin/packages/xf86rushproto/package.py b/var/spack/repos/builtin/packages/xf86rushproto/package.py
index 4ad729f915..9ac71210a3 100644
--- a/var/spack/repos/builtin/packages/xf86rushproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86rushproto/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xf86rushproto(AutotoolsPackage, XorgPackage):
"""X.org XF86RushProto protocol headers."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86rushproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86rushproto"
xorg_mirror_path = "proto/xf86rushproto-1.1.2.tar.gz"
version("1.1.2", sha256="7d420ae7e5f0dd94c6010c764c66acc93eed7df7f81bcf93d2a57739970ec841")
diff --git a/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py
index 1f310726d2..65feeed287 100644
--- a/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py
+++ b/var/spack/repos/builtin/packages/xf86vidmodeproto/package.py
@@ -12,7 +12,7 @@ class Xf86vidmodeproto(AutotoolsPackage, XorgPackage):
This extension defines a protocol for dynamically configuring modelines
and gamma."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xf86vidmodeproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xf86vidmodeproto"
xorg_mirror_path = "proto/xf86vidmodeproto-2.3.1.tar.gz"
version("2.3.1", sha256="c3512b11cefa7558576551f8582c6e7071c8a24d78176059d94b84b48b262979")
diff --git a/var/spack/repos/builtin/packages/xfce4-appfinder/package.py b/var/spack/repos/builtin/packages/xfce4-appfinder/package.py
new file mode 100644
index 0000000000..c7c48fdfa5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-appfinder/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfce4Appfinder(AutotoolsPackage):
+ """Program to find and launch installed applications for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/xfce4-appfinder/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfce4-appfinder-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="962a98d7b327d2073ed4cd0f78bce7945ed51b97d52fd60196e8b02ef819c18c")
+ version("4.16.0", sha256="37b92aaaeeec8220ed23163cf89321168d3b49e0c48b4c10f12dc4a21fdf0954")
+
+ # Base requirements
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4ui")
+ depends_on("garcon")
+ depends_on("glib@2:")
+
+ depends_on("intltool@0.35.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
diff --git a/var/spack/repos/builtin/packages/xfce4-core/package.py b/var/spack/repos/builtin/packages/xfce4-core/package.py
new file mode 100644
index 0000000000..406fdcaaa6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-core/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfce4Core(BundlePackage):
+ """Core libraries and applications for the Xfce4 desktop environment"""
+
+ homepage = "https://docs.xfce.org/start"
+
+ maintainers("teaguesterling")
+
+ version("4.18")
+ version("4.16")
+
+ with when("@4.18"):
+ depends_on("libxfce4util@4.18")
+ depends_on("xfconf@4.18")
+ depends_on("libxfce4ui@4.18")
+ depends_on("garcon@4.18.0")
+ depends_on("exo@4.18")
+ depends_on("thunar@4.18")
+ depends_on("xfce4-session@4.18")
+ depends_on("xfce4-panel@4.18")
+ depends_on("xfce4-settings@4.18")
+ depends_on("xfdesktop@4.18")
+ depends_on("xfwm4@4.18")
+ depends_on("xfce4-appfinder@4.18")
+ depends_on("tumbler@4.18")
+ with when("@4.16"):
+ depends_on("libxfce4util@4.16")
+ depends_on("xfconf@4.16")
+ depends_on("libxfce4ui@4.16")
+ depends_on("garcon@0.8.0")
+ depends_on("exo@4.16")
+ depends_on("thunar@4.16")
+ depends_on("xfce4-session@4.16")
+ depends_on("xfce4-panel@4.16")
+ depends_on("xfce4-settings@4.16")
+ depends_on("xfdesktop@4.16")
+ depends_on("xfwm4@4.16")
+ depends_on("xfce4-appfinder@4.16")
+ depends_on("tumbler@4.16")
diff --git a/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch b/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch
new file mode 100644
index 0000000000..7716dd8d4a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-panel/fix-libxfce4util-gir.patch
@@ -0,0 +1,14 @@
+diff --git a/libxfce4panel/Makefile.in b/libxfce4panel/Makefile.in
+index 41642e1..c7d7b51 100644
+--- a/libxfce4panel/Makefile.in
++++ b/libxfce4panel/Makefile.in
+@@ -861,7 +861,7 @@ INTROSPECTION_COMPILER_ARGS = \
+ --includedir=.
+
+ @HAVE_INTROSPECTION_TRUE@introspection_sources = $(libxfce4panel_2_0_la_SOURCES)
+-@HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0 Libxfce4util-1.0
++@HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_INCLUDES = GObject-2.0 GLib-2.0 Gtk-3.0 libxfce4util-1.0
+ @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_CFLAGS = $(AM_CPPFLAGS)
+ @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_LIBS = libxfce4panel-2.0.la
+ @HAVE_INTROSPECTION_TRUE@libxfce4panel_2_0_gir_FILES = $(introspection_sources)
+
diff --git a/var/spack/repos/builtin/packages/xfce4-panel/package.py b/var/spack/repos/builtin/packages/xfce4-panel/package.py
new file mode 100644
index 0000000000..b406173fc4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-panel/package.py
@@ -0,0 +1,57 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfce4Panel(AutotoolsPackage):
+ """Panel manager for Xfce4"""
+
+ homepage = "https://docs.xfce.org/xfce/xfce4-panel/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfce4-panel-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2 OR LGPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="be80023fd546587831bab25ded15ae4c9e346289a75744b6ba4cf4ee53794710")
+ version("4.16.0", sha256="5e979aeeb37d306d72858b1bc67448222ea7a68de01409055b846cd31f3cc53d")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant("notification", default=True, description="Build with startup-notification support")
+
+ patch("fix-libxfce4util-gir.patch", when="@4.16.0") # Capitalization difference causes error
+
+ # Base requirements
+ depends_on("intltool@0.51.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4ui")
+ depends_on("libxfce4util")
+ depends_on("exo")
+ depends_on("garcon")
+ depends_on("libwnck@3:")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("startup-notification", when="+notification")
+ with when("+introspection"):
+ depends_on("libxfce4ui+introspection")
+ depends_on("gobject-introspection")
+ depends_on("gobject-introspection")
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+ args += self.enable_or_disable("introspection")
+ return args
diff --git a/var/spack/repos/builtin/packages/xfce4-session/package.py b/var/spack/repos/builtin/packages/xfce4-session/package.py
new file mode 100644
index 0000000000..850af1c059
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-session/package.py
@@ -0,0 +1,65 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfce4Session(AutotoolsPackage):
+ """Session manager for Xfce4"""
+
+ homepage = "https://docs.xfce.org/xfce/xfce4-session/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfce4-session-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="38badb500b272012f494543a60a9c0563c381647cc95bed73b68aec0b0b89a7f")
+ version("4.16.0", sha256="22f273f212481d71e0b5618c62710cd85f69aea74f5ea5c0093f7918b07d17b7")
+
+ variant(
+ "icon-themes",
+ description="Default icon themes to include",
+ default="hicolor",
+ values=["hicolor", "adwaita"],
+ multi=True,
+ )
+
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4ui")
+ depends_on("libwnck@3.10:")
+ depends_on("dbus-glib")
+ depends_on("iceauth")
+ depends_on("perl-xml-parser")
+
+ depends_on("intltool@0.39.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+
+ with default_args(type="run"):
+ depends_on("adwaita-icon-theme", when="icon-themes=adwaita")
+ depends_on("hicolor-icon-theme", when="icon-themes=hicolor")
+
+ def configure_args(self):
+ args = []
+ args += [f"--with-xsession-prefix={self.home}"]
+ return args
+
+ def setup_run_enviornment(self, env):
+ self.add_xdg_dirs(env)
+
+ def setup_dependent_run_environment(self, env, dep_spec):
+ self.add_xdg_dirs(env)
+
+ def add_xdg_dirs(self, env):
+ # Xfce4-session needs $prefix/etc/xdg in it XDG_CONFIG_DIRS
+ env.append_path("XDG_CONFIG_DIRS", self.home.etc.xdg)
+ env.append_path("XDG_CONFIG_DIRS", self.prefix.etc.xdg)
diff --git a/var/spack/repos/builtin/packages/xfce4-settings/package.py b/var/spack/repos/builtin/packages/xfce4-settings/package.py
new file mode 100644
index 0000000000..1d9b7cfb79
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfce4-settings/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfce4Settings(AutotoolsPackage):
+ """Daemon, manager, and editor to centralize the configuration management for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/xfce4-settings/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfce4-settings-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling")
+
+ version("4.18.0", sha256="ed3f75837cb33cd694610fc87cd569c4782b7ac4e099143a3dbe8fff1f1c6a9d")
+ version("4.16.0", sha256="67a1404fc754c675c6431e22a8fe0e5d79644fdfadbfe25a4523d68e1442ddc2")
+
+ variant("introspection", default=True, description="Build with gobject-introspection support")
+ variant("libxcursor", default=True, description="Build with Xcursor support")
+ variant("libnotify", default=True, description="Build with libnotify support")
+
+ # Base requirements
+ with default_args(type=("build", "link", "run")):
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("garcon")
+ depends_on("exo")
+ depends_on("dbus-glib")
+ depends_on("libxi")
+ depends_on("libxrandr")
+ depends_on("libxcursor", when="+libxcursor")
+ depends_on("libnotify", when="+libnotify")
+ with when("+introspection"):
+ depends_on("libxfce4util+introspection")
+ depends_on("libxfce4ui+introspection")
+ depends_on("gobject-introspection")
+
+ depends_on("intltool@0.39.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gobject-introspection@1.66:", when="+introspection")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gobject-introspection@1.60:", when="+introspection")
+
+ def configure_args(self):
+ args = []
+ args += self.enable_or_disable("libxcursor")
+ args += self.enable_or_disable("libnotify")
+ args += self.enable_or_disable("introspection")
+ return args
diff --git a/var/spack/repos/builtin/packages/xfconf/package.py b/var/spack/repos/builtin/packages/xfconf/package.py
new file mode 100644
index 0000000000..ffd975c11f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfconf/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfconf(AutotoolsPackage):
+ """xfconf - Configuration Storage System for XFCE4"""
+
+ homepage = "https://docs.xfce.org/xfce/xfconf/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfconf-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("LGPLv2.1", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="2e8c50160bf800a807aea094fc9dad81f9f361f42db56607508ed5b4855d2906")
+ version("4.16.0", sha256="652a119007c67d9ba6c0bc7a740c923d33f32d03dc76dfc7ba682584e72a5425")
+
+ depends_on("intltool@0.35.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("dbus-glib")
+ with when("@4.18"):
+ depends_on("glib@2.66:")
+ depends_on("gettext") # Undocumented
+ with when("@4.16"):
+ depends_on("glib@2.50:")
diff --git a/var/spack/repos/builtin/packages/xfd/package.py b/var/spack/repos/builtin/packages/xfd/package.py
index e5a69e9159..1d11e330aa 100644
--- a/var/spack/repos/builtin/packages/xfd/package.py
+++ b/var/spack/repos/builtin/packages/xfd/package.py
@@ -10,7 +10,7 @@ class Xfd(AutotoolsPackage, XorgPackage):
"""xfd - display all the characters in a font using either the
X11 core protocol or libXft2."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfd"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfd"
xorg_mirror_path = "app/xfd-1.1.2.tar.gz"
license("X11")
@@ -19,6 +19,8 @@ class Xfd(AutotoolsPackage, XorgPackage):
version("1.1.3", sha256="4a1bd18f324c239b1a807ed4ccaeb172ba771d65a7307fb492d8dd8d27f01527")
version("1.1.2", sha256="4eff3e15b2526ceb48d0236d7ca126face399289eabc0ef67e6ed3b3fdcb60ad")
+ depends_on("c", type="build") # generated
+
depends_on("fontconfig")
depends_on("gettext")
depends_on("libxaw")
diff --git a/var/spack/repos/builtin/packages/xfdesktop/package.py b/var/spack/repos/builtin/packages/xfdesktop/package.py
new file mode 100644
index 0000000000..58daf8ac72
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfdesktop/package.py
@@ -0,0 +1,53 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfdesktop(AutotoolsPackage):
+ """Xfdesktop is a desktop manager for the Xfce Desktop Environment."""
+
+ homepage = "https://docs.xfce.org/xfce/xfdesktop/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfdesktop-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="661783e7e6605459926d80bca46d25ce2197c221456457a863ea9d0252120d14")
+ version("4.16.0", sha256="934ba5affecff21e62d9fac1dd50c50cd94b3a807fefa5f5bff59f3d6f155bae")
+
+ variant("libnotify", default=True, description="Build with libnotify support")
+ variant("thunarx", default=False, description="Build with thunarx support") # TODO
+
+ # Base requirements
+ depends_on("intltool@0.35.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("libwnck")
+ depends_on("exo")
+ depends_on("garcon")
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+
+ depends_on("libnotify", when="+libnotify")
+
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
+
+ def configure_args(self):
+ args = []
+
+ args += self.enable_or_disable("libnotify")
+
+ return args
diff --git a/var/spack/repos/builtin/packages/xfindproxy/package.py b/var/spack/repos/builtin/packages/xfindproxy/package.py
index e2bb1ef186..8358377d23 100644
--- a/var/spack/repos/builtin/packages/xfindproxy/package.py
+++ b/var/spack/repos/builtin/packages/xfindproxy/package.py
@@ -14,15 +14,17 @@ class Xfindproxy(AutotoolsPackage, XorgPackage):
services, starts new proxies when necessary, and makes sure that
proxies are shared whenever possible."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfindproxy"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfindproxy"
xorg_mirror_path = "app/xfindproxy-1.0.4.tar.gz"
version("1.0.4", sha256="fa6152fcf9c16fbb2ef52259731df5df899a39a86894b0508456613f26ff924a")
+ depends_on("c", type="build")
+
depends_on("libice")
depends_on("libxt")
- depends_on("xproto")
- depends_on("xproxymanagementprotocol")
+ depends_on("xproto", type="build")
+ depends_on("xproxymanagementprotocol", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xfontsel/package.py b/var/spack/repos/builtin/packages/xfontsel/package.py
index 5ad88b7f1a..a719a841c7 100644
--- a/var/spack/repos/builtin/packages/xfontsel/package.py
+++ b/var/spack/repos/builtin/packages/xfontsel/package.py
@@ -11,7 +11,7 @@ class Xfontsel(AutotoolsPackage, XorgPackage):
protocol fonts known to your X server, examine samples of each, and
retrieve the X Logical Font Description ("XLFD") full name for a font."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfontsel"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfontsel"
xorg_mirror_path = "app/xfontsel-1.0.5.tar.gz"
license("MIT")
@@ -20,6 +20,8 @@ class Xfontsel(AutotoolsPackage, XorgPackage):
version("1.0.6", sha256="a7b025cb96b678f03caeb61a2770890359bdab34dc37e09d447b30c54c4df35e")
version("1.0.5", sha256="9b3ad0cc274398d22be9fa7efe930f4e3749fd4b1b61d9c31a7fb6c1f1ff766e")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xforms/package.py b/var/spack/repos/builtin/packages/xforms/package.py
index fcceb73bb5..7474b1074d 100644
--- a/var/spack/repos/builtin/packages/xforms/package.py
+++ b/var/spack/repos/builtin/packages/xforms/package.py
@@ -19,9 +19,12 @@ class Xforms(AutotoolsPackage):
version("1.2.3", sha256="7989b39598c769820ad451ad91e5cb0de29946940c8240aac94ca8238c2def61")
version("1.0.91", sha256="88684237c77489bcb1fbc9a794621a2919aa800e1c0a6d83d679b97980e3441d")
+ depends_on("c", type="build") # generated
+
depends_on("libx11", type="link")
depends_on("libxpm", type="link")
depends_on("jpeg", type="link")
+ patch("xformsPatch.patch")
def configure_args(self):
args = ["--enable-static"]
diff --git a/var/spack/repos/builtin/packages/xforms/xformsPatch.patch b/var/spack/repos/builtin/packages/xforms/xformsPatch.patch
new file mode 100644
index 0000000000..f51b586752
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xforms/xformsPatch.patch
@@ -0,0 +1,66 @@
+diff --git a/fdesign/sp_spinner.c b/fdesign/sp_spinner.c
+index 04f2c19..6206daa 100644
+--- a/fdesign/sp_spinner.c
++++ b/fdesign/sp_spinner.c
+@@ -29,7 +29,7 @@
+ #include "spec/spinner_spec.h"
+
+ static FD_spinnerattrib * spn_attrib;
+-FL_OBJECT *curobj;
++static FL_OBJECT *curobj;
+
+
+ /***************************************
+diff --git a/fdesign/sp_twheel.c b/fdesign/sp_twheel.c
+index 5cfda18..22537f6 100644
+--- a/fdesign/sp_twheel.c
++++ b/fdesign/sp_twheel.c
+@@ -38,7 +38,7 @@
+ #include "spec/twheel_spec.h"
+
+ static FD_twheelattrib * twheel_attrib;
+-FL_OBJECT * curobj;
++static FL_OBJECT * curobj;
+
+
+ /***************************************
+
+diff --git a/lib/xpopup.c b/lib/xpopup.c
+index e9629e6..84a74a2 100644
+--- a/lib/xpopup.c
++++ b/lib/xpopup.c
+@@ -1973,6 +1973,7 @@ draw_popup( PopUP * m )
+ void
+ fl_showpup( int n )
+ {
++ const char empty_title[] = "\0";
+ PopUP *m = menu_rec + n;
+ int req_y = exty;
+ unsigned int dummy;
+@@ -2083,6 +2084,10 @@ fl_showpup( int n )
+ fli_visual( fl_vmode ), vmask, &xswa );
+
+ XSetTransientForHint( flx->display, m->win, fl_root );
++ if(!m->title)
++ {
++ m->title = fl_strdup(empty_title);
++ }
+ XStoreName( flx->display, m->win, m->title );
+
+ if ( ! m->gc_active && ! m->gc_inactive )
+--
+
+diff --git a/lib/include/Basic.h b/lib/include/Basic.h
+index 7544193..46da14e 100644
+--- a/lib/include/Basic.h
++++ b/lib/include/Basic.h
+@@ -1441,7 +1441,7 @@ FL_EXPORT void fl_draw_text_cursor( int align,
+ FL_COLOR cc,
+ int pos );
+
+-#define fl_draw_box fl_draw_box
++#define fl_drw_box fl_draw_box
+ FL_EXPORT void fl_draw_box( int style,
+ FL_Coord x,
+ FL_Coord y,
+--
diff --git a/var/spack/repos/builtin/packages/xfs/package.py b/var/spack/repos/builtin/packages/xfs/package.py
index 0641d14a97..1b4ebf3cd5 100644
--- a/var/spack/repos/builtin/packages/xfs/package.py
+++ b/var/spack/repos/builtin/packages/xfs/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xfs(AutotoolsPackage, XorgPackage):
"""X Font Server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfs"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfs"
xorg_mirror_path = "app/xfs-1.1.4.tar.gz"
license("X11")
@@ -18,6 +18,9 @@ class Xfs(AutotoolsPackage, XorgPackage):
version("1.2.0", sha256="56ebdc5ff85af332a0c5dc60c9b971551624bbc312bf6af3d13b925600ea367f")
version("1.1.4", sha256="28f89b854d1ff14fa1efa5b408e5e1c4f6a145420310073c4e44705feeb6d23b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libxfont@1.4.5:", when="@:1.1")
depends_on("libxfont2@2.0.1:", when="@1.2:")
depends_on("font-util")
diff --git a/var/spack/repos/builtin/packages/xfsdump/package.py b/var/spack/repos/builtin/packages/xfsdump/package.py
index dde23593d4..481a7b506a 100644
--- a/var/spack/repos/builtin/packages/xfsdump/package.py
+++ b/var/spack/repos/builtin/packages/xfsdump/package.py
@@ -16,6 +16,8 @@ class Xfsdump(MakefilePackage):
version("3.1.5", sha256="ba5bb91413ccb5a0eaffaa84f242baa08520a09f7b990b28bbd0d33a4390f7b6")
version("3.1.4", sha256="a75d5c7dabd3dd4184008efcfd30d0c96b6ab318edaad9659ce180dfb9652b01")
+ depends_on("c", type="build") # generated
+
depends_on("gettext")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
diff --git a/var/spack/repos/builtin/packages/xfsinfo/package.py b/var/spack/repos/builtin/packages/xfsinfo/package.py
index fc8b1ebca8..c56c6bf3d8 100644
--- a/var/spack/repos/builtin/packages/xfsinfo/package.py
+++ b/var/spack/repos/builtin/packages/xfsinfo/package.py
@@ -13,15 +13,17 @@ class Xfsinfo(AutotoolsPackage, XorgPackage):
clients and the server, and the font catalogues and alternate servers
that are available."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfsinfo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfsinfo"
xorg_mirror_path = "app/xfsinfo-1.0.5.tar.gz"
version("1.0.7", sha256="df874933710c9c38640496a2121d73272501b9620bdb95784e9e67b913788151")
version("1.0.6", sha256="a817e553703748fe2d721b1fe8ea95687ee78f7aef25427ed72d9584494d91e1")
version("1.0.5", sha256="56a0492ed2cde272dc8f4cff4ba0970ccb900e51c10bb8ec62747483d095fd69")
+ depends_on("c", type="build")
+
depends_on("libfs")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xfsprogs/package.py b/var/spack/repos/builtin/packages/xfsprogs/package.py
index b67540ecb7..b5478dcc82 100644
--- a/var/spack/repos/builtin/packages/xfsprogs/package.py
+++ b/var/spack/repos/builtin/packages/xfsprogs/package.py
@@ -14,6 +14,20 @@ class Xfsprogs(AutotoolsPackage):
license("LGPL-2.1-or-later")
+ version("6.11.0", sha256="dae3bb432196f7b183b2e6bd5dc44bf33edbd7d0e85bd37d25c235df81b8100a")
+ version("6.10.1", sha256="6cb839be1a9535f8352441b3f6eea521ead5c5c7c913e8106cdfac96aa117041")
+ version("6.10.0", sha256="a16e7caa5d8fea1c9652f1a45c8e5f2acc13fc632cf2066fe364ab13bd9df82d")
+ version("6.9.0", sha256="975284783fb3fbc4e1ae640bd804d788e4237a86b07582acee86b6e48f6521b7")
+ version("6.8.0", sha256="78b6ab776eebe5ab52e0884a70fa1b3633e64a282b1ecfae91f5dd1d9ec5f07d")
+ version("6.7.0", sha256="e75d1e012853e11597411cfcb80e26c811881cf0ca03715e852b42946cc61e1f")
+ version("6.6.0", sha256="50ca2f4676df8fab4cb4c3ef3dd512d5551e6844d40a65a31d5b8e03593d22df")
+ version("6.5.0", sha256="8db81712b32756b97d89dd9a681ac5e325bbb75e585382cd4863fab7f9d021c6")
+ version("6.4.0", sha256="c31868418bfbf49a3a9c47fc70cdffde9d96f4ff0051bd04a0881e6654648104")
+ version("6.3.0", sha256="ec987c9f0bcb2db2991bffb80d353150b389c3a2b79b6830411f7042adf6990c")
+ version("6.2.0", sha256="d67dcba5a28e0904b60886b6e5f752bc7c9c3a5c7096153855b5adca9db86c51")
+ version("6.1.1", sha256="05e8a137870db1d6182df72dda98ab7a7100deb376947e854b9d59c914c2c7bb")
+ version("6.1.0", sha256="eceb9015c4ebefa56fa85faff756ccb51ed2cf9c39ba239767f8e78705e85251")
+ version("6.0.0", sha256="b77cec2364aab0b8ae8d8c67daac7fdb3801e0979f1d8328d9c3469e57ca9ca0")
version("5.11.0", sha256="0e9c390fcdbb8a79e1b8f5e6e25fd529fc9f9c2ef8f2d5e647b3556b82d1b353")
version("5.8.0", sha256="8ef46ed9e6bb927f407f541dc4324857c908ddf1374265edc910d23724048c6b")
version("5.7.0", sha256="8f2348a68a686a3f4491dda5d62dd32d885fbc52d32875edd41e2c296e7b4f35")
@@ -21,16 +35,20 @@ class Xfsprogs(AutotoolsPackage):
version("4.20.0", sha256="beafdfd080352a8c9d543491e0874d0e8809cb643a3b9d352d5feed38d77022a")
+ depends_on("c", type="build") # generated
+
depends_on("libinih")
depends_on("gettext")
+ depends_on("gettext@:0.21.1", when="@:6.3")
depends_on("uuid")
depends_on("util-linux")
+ depends_on("liburcu", when="@6:")
def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("@:5.4.0 %gcc@10:"):
flags.append("-fcommon")
- elif name == "ldlibs":
+ elif name == "ldlibs" or name == "ldflags":
if "intl" in self.spec["gettext"].libs.names:
flags.append("-lintl")
return build_system_flags(name, flags)
@@ -39,7 +57,10 @@ class Xfsprogs(AutotoolsPackage):
env.append_path("C_INCLUDE_PATH", self.spec["util-linux"].prefix.include.blkid)
def configure_args(self):
- return ["--with-systemd-unit-dir=" + self.spec["xfsprogs"].prefix.lib.systemd.system]
+ args = ["--with-systemd-unit-dir=" + self.spec["xfsprogs"].prefix.lib.systemd.system]
+ if self.spec.satisfies("@6.5.0:"):
+ args.append("--with-udev-rule-dir=" + self.spec["xfsprogs"].prefix)
+ return args
def install(self, spec, prefix):
make("install")
diff --git a/var/spack/repos/builtin/packages/xfwm4/package.py b/var/spack/repos/builtin/packages/xfwm4/package.py
new file mode 100644
index 0000000000..c97354369e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xfwm4/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xfwm4(AutotoolsPackage):
+ """xfwm4 is the window manager for Xfce"""
+
+ homepage = "https://docs.xfce.org/xfce/xfwm4/start"
+ url = "https://archive.xfce.org/xfce/4.16/src/xfwm4-4.16.0.tar.bz2"
+ list_url = "https://archive.xfce.org/xfce/"
+ list_depth = 2
+
+ maintainers("teaguesterling")
+
+ license("GPLv2", checked_by="teaguesterling") # https://wiki.xfce.org/licenses/audit
+
+ version("4.18.0", sha256="92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f")
+ version("4.16.0", sha256="1e22eae1bbb66cebfd1753b0a5606e76ecbf6b09ce4cdfd732d093c936f1feb3")
+
+ variant("notification", default=True, description="Build with startup-notification support")
+
+ # Base requirements
+ depends_on("intltool@0.35.0:", type="build")
+ with default_args(type=("build", "link", "run")):
+ depends_on("libxfce4util")
+ depends_on("xfconf")
+ depends_on("libxfce4ui")
+ depends_on("dbus-glib")
+ depends_on("libwnck")
+ depends_on("libxinerama") # Undocumented
+ depends_on("glib@2:")
+ depends_on("gtkplus@3:")
+ depends_on("startup-notification", when="+notification")
+
+ with when("@4.18.0:"):
+ depends_on("glib@2.66:")
+ depends_on("gtkplus@3.24:")
+ with when("@4.16.0:"):
+ depends_on("glib@2.50:")
+ depends_on("gtkplus@3.22:")
diff --git a/var/spack/repos/builtin/packages/xfwp/package.py b/var/spack/repos/builtin/packages/xfwp/package.py
index 2ee35cea52..ac243fe9d5 100644
--- a/var/spack/repos/builtin/packages/xfwp/package.py
+++ b/var/spack/repos/builtin/packages/xfwp/package.py
@@ -9,15 +9,17 @@ from spack.package import *
class Xfwp(AutotoolsPackage, XorgPackage):
"""xfwp proxies X11 protocol connections, such as through a firewall."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xfwp"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xfwp"
xorg_mirror_path = "app/xfwp-1.0.3.tar.gz"
version("1.0.3", sha256="6fe243bde0374637e271a3f038b5d6d79a04621fc18162727782392069c5c04d")
+ depends_on("c", type="build")
+
depends_on("libice")
- depends_on("xproto")
- depends_on("xproxymanagementprotocol")
+ depends_on("xproto", type="build")
+ depends_on("xproxymanagementprotocol", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xgamma/package.py b/var/spack/repos/builtin/packages/xgamma/package.py
index c5d08e2421..47f1e0b3fe 100644
--- a/var/spack/repos/builtin/packages/xgamma/package.py
+++ b/var/spack/repos/builtin/packages/xgamma/package.py
@@ -10,7 +10,7 @@ class Xgamma(AutotoolsPackage, XorgPackage):
"""xgamma allows X users to query and alter the gamma correction of a
monitor via the X video mode extension (XFree86-VidModeExtension)."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xgamma"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xgamma"
xorg_mirror_path = "app/xgamma-1.0.6.tar.gz"
license("custom")
@@ -18,6 +18,8 @@ class Xgamma(AutotoolsPackage, XorgPackage):
version("1.0.7", sha256="61f5ef02883d65ab464678ad3d8c5445a0ff727fe6255af90b1b842ddf77370d")
version("1.0.6", sha256="66da1d67e84146518b69481c6283c5d8f1027ace9ff7e214d3f81954842e796a")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxxf86vm")
diff --git a/var/spack/repos/builtin/packages/xgboost/package.py b/var/spack/repos/builtin/packages/xgboost/package.py
index dd82b452d1..ea48be3d6a 100644
--- a/var/spack/repos/builtin/packages/xgboost/package.py
+++ b/var/spack/repos/builtin/packages/xgboost/package.py
@@ -18,33 +18,43 @@ class Xgboost(CMakePackage, CudaPackage):
homepage = "https://xgboost.ai/"
git = "https://github.com/dmlc/xgboost.git"
+ submodules = True
+ license("Apache-2.0")
maintainers("adamjstewart")
- license("Apache-2.0")
+ version("master", branch="master")
+ version("2.1.1", tag="v2.1.1", commit="9c9db1259240bffe9040ed7ca6e3fb2c1bda80e4")
+ version("2.1.0", tag="v2.1.0", commit="213ebf7796b757448dfa2cfba532074696fa1524")
+ version("1.7.6", tag="v1.7.6", commit="36eb41c960483c8b52b44082663c99e6a0de440a")
+ version("1.6.2", tag="v1.6.2", commit="b9934246faa9a25e10a12339685dfbe56d56f70b")
+ version("1.6.1", tag="v1.6.1", commit="5d92a7d936fc3fad4c7ecb6031c3c1c7da882a14")
+ version("1.5.2", tag="v1.5.2", commit="742c19f3ecf2135b4e008a4f4a10b59add8b1045")
+ version("1.3.3", tag="v1.3.3", commit="000292ce6d99ed658f6f9aebabc6e9b330696e7e")
- version("master", branch="master", submodules=True)
- version(
- "1.6.2", tag="v1.6.2", commit="b9934246faa9a25e10a12339685dfbe56d56f70b", submodules=True
- )
- version(
- "1.6.1", tag="v1.6.1", commit="5d92a7d936fc3fad4c7ecb6031c3c1c7da882a14", submodules=True
- )
- version(
- "1.5.2", tag="v1.5.2", commit="742c19f3ecf2135b4e008a4f4a10b59add8b1045", submodules=True
- )
- version(
- "1.3.3", tag="v1.3.3", commit="000292ce6d99ed658f6f9aebabc6e9b330696e7e", submodules=True
- )
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
variant("nccl", default=False, description="Build with NCCL to enable distributed GPU support")
variant("openmp", default=True, description="Build with OpenMP support")
- depends_on("cmake@3.13:", type="build")
- depends_on("cmake@3.16:", when="platform=darwin", type="build")
- depends_on("cuda@10:", when="+cuda")
- # https://github.com/dmlc/xgboost/pull/7379
- depends_on("cuda@10:11.4", when="@:1.5.0+cuda")
+ with default_args(type="build"):
+ depends_on("cmake@3.16:", when="platform=darwin") # openmp issues
+ depends_on("cmake@3.13:")
+ depends_on("cmake@3.14:", when="@1.5:")
+ depends_on("cmake@3.18:", when="@2:")
+
+ with when("+cuda"):
+ depends_on("cuda@10:")
+ # https://github.com/dmlc/xgboost/pull/7379
+ depends_on("cuda@:11.4", when="@:1.5.0")
+ # https://github.com/dmlc/xgboost/commit/ca0547bb65966896254a99f7868943d606a18c53
+ depends_on("cuda@:11", when="@:1.6")
+ # thrust 2.3.1 tuple issues
+ depends_on("cuda@:12.3", when="@:1.7")
+ # https://github.com/dmlc/xgboost/issues/10555
+ depends_on("cuda@:12.4", when="@:2.1")
+
depends_on("nccl", when="+nccl")
depends_on("llvm-openmp", when="%apple-clang +openmp")
depends_on("hwloc", when="%clang")
diff --git a/var/spack/repos/builtin/packages/xgc/package.py b/var/spack/repos/builtin/packages/xgc/package.py
index 4ddedf216b..7e6629a34d 100644
--- a/var/spack/repos/builtin/packages/xgc/package.py
+++ b/var/spack/repos/builtin/packages/xgc/package.py
@@ -10,12 +10,14 @@ class Xgc(AutotoolsPackage, XorgPackage):
"""xgc is an X11 graphics demo that shows various features of the X11
core protocol graphics primitives."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xgc"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xgc"
xorg_mirror_path = "app/xgc-1.0.5.tar.gz"
version("1.0.6", sha256="8b5cfc547c04a2bd0807be700349522c0e717e34387019dd209eefa83cfa74f0")
version("1.0.5", sha256="16645fb437699bad2360f36f54f42320e33fce5a0ab9a086f6e0965963205b02")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xhmm/package.py b/var/spack/repos/builtin/packages/xhmm/package.py
index fb3eb7f270..b573f2a818 100644
--- a/var/spack/repos/builtin/packages/xhmm/package.py
+++ b/var/spack/repos/builtin/packages/xhmm/package.py
@@ -17,6 +17,9 @@ class Xhmm(MakefilePackage):
version("20160104", commit="cc14e528d90932f059ac4fe94e869e81221fd732")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("lapack")
def edit(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/xhost/package.py b/var/spack/repos/builtin/packages/xhost/package.py
index 9e083dcb25..44c547cfa0 100644
--- a/var/spack/repos/builtin/packages/xhost/package.py
+++ b/var/spack/repos/builtin/packages/xhost/package.py
@@ -10,7 +10,7 @@ class Xhost(AutotoolsPackage, XorgPackage):
"""xhost is used to manage the list of host names or user names
allowed to make connections to the X server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xhost"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xhost"
xorg_mirror_path = "app/xhost-1.0.7.tar.gz"
license("MIT")
@@ -19,6 +19,8 @@ class Xhost(AutotoolsPackage, XorgPackage):
version("1.0.8", sha256="e5aabce1533dc778ceb5bbc207105cf3770f710629caceaad64675b00c38c3f8")
version("1.0.7", sha256="8dd1b6245dfbdef45a64a18ea618f233f77432c2f30881b1db9dc40d510d9490")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxmu")
depends_on("libxau")
diff --git a/var/spack/repos/builtin/packages/xineramaproto/package.py b/var/spack/repos/builtin/packages/xineramaproto/package.py
index 43327786fe..fe47a592f6 100644
--- a/var/spack/repos/builtin/packages/xineramaproto/package.py
+++ b/var/spack/repos/builtin/packages/xineramaproto/package.py
@@ -12,7 +12,7 @@ class Xineramaproto(AutotoolsPackage, XorgPackage):
This is an X extension that allows multiple physical screens controlled
by a single X server to appear as a single screen."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/xineramaproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xineramaproto"
xorg_mirror_path = "proto/xineramaproto-1.2.1.tar.gz"
version("1.2.1", sha256="d99e121edf7b310008d7371ac5dbe3aa2810996d476b754dc78477cc26e5e7c1")
diff --git a/var/spack/repos/builtin/packages/xinit/package.py b/var/spack/repos/builtin/packages/xinit/package.py
index 1d9bdf11d0..e0d70ec09b 100644
--- a/var/spack/repos/builtin/packages/xinit/package.py
+++ b/var/spack/repos/builtin/packages/xinit/package.py
@@ -11,7 +11,7 @@ class Xinit(AutotoolsPackage, XorgPackage):
first client program on systems that are not using a display manager
such as xdm."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xinit"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xinit"
xorg_mirror_path = "app/xinit-1.3.4.tar.gz"
license("MIT")
@@ -21,6 +21,9 @@ class Xinit(AutotoolsPackage, XorgPackage):
version("1.4.0", sha256="17548a5df41621b87d395f1074dfb88b0dc6917f9127540b89c6de4a80f33776")
version("1.3.4", sha256="754c284875defa588951c1d3d2b20897d3b84918d0a97cb5a4724b00c0da0746")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("libx11")
depends_on("xproto@7.0.17:")
diff --git a/var/spack/repos/builtin/packages/xinput/package.py b/var/spack/repos/builtin/packages/xinput/package.py
index b6e9007af4..9dd5b69f25 100644
--- a/var/spack/repos/builtin/packages/xinput/package.py
+++ b/var/spack/repos/builtin/packages/xinput/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xinput(AutotoolsPackage, XorgPackage):
"""xinput is a utility to configure and test XInput devices."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xinput"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xinput"
xorg_mirror_path = "app/xinput-1.6.2.tar.gz"
license("MIT")
@@ -17,15 +17,17 @@ class Xinput(AutotoolsPackage, XorgPackage):
version("1.6.3", sha256="9f29f9bfe387c5a3d582f9edc8c5a753510ecc6fdfb154c03b5cea5975b10ce4")
version("1.6.2", sha256="2c8ca5ff2a8703cb7d898629a4311db720dbd30d0c162bfe37f18849a727bd42")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxext")
depends_on("libxi@1.5.99.1:")
depends_on("libxrandr")
depends_on("libxinerama")
- depends_on("inputproto@2.1.99.1:")
- depends_on("fixesproto")
- depends_on("randrproto")
- depends_on("xineramaproto")
+ depends_on("inputproto@2.1.99.1:", type="build")
+ depends_on("fixesproto", type="build")
+ depends_on("randrproto", type="build")
+ depends_on("xineramaproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xkbcomp/package.py b/var/spack/repos/builtin/packages/xkbcomp/package.py
index 8453095dcd..0b75d3709f 100644
--- a/var/spack/repos/builtin/packages/xkbcomp/package.py
+++ b/var/spack/repos/builtin/packages/xkbcomp/package.py
@@ -14,14 +14,21 @@ class Xkbcomp(AutotoolsPackage, XorgPackage):
keyboard. It also includes a number of keyboard controls designed to
make keyboards more accessible to people with physical impairments."""
- homepage = "https://www.x.org/wiki/XKB/"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xkbcomp"
xorg_mirror_path = "app/xkbcomp-1.3.1.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.4.7", sha256="00cecc490fcbe2f789cf13c408c459673c2c33ab758d802677321cffcda35373")
+ version("1.4.6", sha256="b216a2c8c0eab83f3dc4a3d5ee2bdf7827b30e49c8907035d0f222138eca0987")
+ version("1.4.5", sha256="e88a4d86b9925ea1e8685dd5ea29c815abafb8ddf19bf5f1a1e0650839252c23")
version("1.4.4", sha256="159fba6b62ef4a3fb16ef7fc4eb4fc26f3888652471ceb604c495783dda020bc")
version("1.3.1", sha256="018e83a922430652d4bc3f3db610d2296e618c76c9b3fbcdccde975aeb655749")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxkbfile")
diff --git a/var/spack/repos/builtin/packages/xkbevd/package.py b/var/spack/repos/builtin/packages/xkbevd/package.py
index 6aec948166..b19781d439 100644
--- a/var/spack/repos/builtin/packages/xkbevd/package.py
+++ b/var/spack/repos/builtin/packages/xkbevd/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Xkbevd(AutotoolsPackage, XorgPackage):
"""XKB event daemon demo."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xkbevd"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xkbevd"
xorg_mirror_path = "app/xkbevd-1.1.4.tar.gz"
version("1.1.5", sha256="5d6b65a417be57e19a76277601da83271b19de6e71cb0e8821441f6fb9973c47")
version("1.1.4", sha256="97dc2c19617da115c3d1183807338fa78c3fd074d8355d10a484f7b1c5b18459")
+ depends_on("c", type="build") # generated
+
depends_on("libxkbfile")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xkbprint/package.py b/var/spack/repos/builtin/packages/xkbprint/package.py
index 92e1f634f8..9942bbd2a2 100644
--- a/var/spack/repos/builtin/packages/xkbprint/package.py
+++ b/var/spack/repos/builtin/packages/xkbprint/package.py
@@ -10,13 +10,15 @@ class Xkbprint(AutotoolsPackage, XorgPackage):
"""xkbprint generates a printable or encapsulated PostScript description
of an XKB keyboard description."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xkbprint"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xkbprint"
xorg_mirror_path = "app/xkbprint-1.0.4.tar.gz"
version("1.0.6", sha256="0d4602034cde190ca3d8f5c1051d34cebff5c0d92f7a32422a4de9d2313698ad")
version("1.0.5", sha256="af5d91b7e5b05f7d081b66e93fca0112cca049b7b6a644b2637b344d52054ac3")
version("1.0.4", sha256="169ebbf57fc8b7685c577c73a435998a38c27e0d135ce0a55fccc64cbebec768")
+ depends_on("c", type="build") # generated
+
depends_on("libxkbfile")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xkbutils/package.py b/var/spack/repos/builtin/packages/xkbutils/package.py
index ab80af7039..e090389b6a 100644
--- a/var/spack/repos/builtin/packages/xkbutils/package.py
+++ b/var/spack/repos/builtin/packages/xkbutils/package.py
@@ -10,17 +10,20 @@ class Xkbutils(AutotoolsPackage, XorgPackage):
"""xkbutils is a collection of small utilities utilizing the XKeyboard
(XKB) extension to the X11 protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xkbutils"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xkbutils"
xorg_mirror_path = "app/xkbutils-1.0.4.tar.gz"
+ version("1.0.6", sha256="d747d4ce5c390223e3bfdb13a1f673d3e19ae46ded25838cb8b28b1bafe1b9bd")
version("1.0.5", sha256="b87072f0d7e75f56ee04455e1feab92bb5847aee4534b18c2e08b926150279ff")
version("1.0.4", sha256="cf31303cbdd6a86c34cab46f4b6e0c7acd2e84578593b334a146142894529bca")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxt")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
- depends_on("inputproto")
+ depends_on("xproto@7.0.17:", type="build")
+ depends_on("inputproto", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xkeyboard-config/package.py b/var/spack/repos/builtin/packages/xkeyboard-config/package.py
index 50436f37ef..5e139ffe7d 100644
--- a/var/spack/repos/builtin/packages/xkeyboard-config/package.py
+++ b/var/spack/repos/builtin/packages/xkeyboard-config/package.py
@@ -24,7 +24,7 @@ class XkeyboardConfig(AutotoolsPackage, XorgPackage):
depends_on("libxslt", type="build")
depends_on("pkgconfig", type="build")
depends_on("intltool@0.30:", type="build")
- depends_on("xproto@7.0.20:")
+ depends_on("xproto@7.0.20:", type="build")
# TODO: missing dependencies
# xgettext
diff --git a/var/spack/repos/builtin/packages/xkill/package.py b/var/spack/repos/builtin/packages/xkill/package.py
index 52f4392579..398d352eff 100644
--- a/var/spack/repos/builtin/packages/xkill/package.py
+++ b/var/spack/repos/builtin/packages/xkill/package.py
@@ -11,7 +11,7 @@ class Xkill(AutotoolsPackage, XorgPackage):
clients. This program is very dangerous, but is useful for aborting
programs that have displayed undesired windows on a user's screen."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xkill"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xkill"
xorg_mirror_path = "app/xkill-1.0.4.tar.gz"
license("MIT")
@@ -20,9 +20,11 @@ class Xkill(AutotoolsPackage, XorgPackage):
version("1.0.5", sha256="98fab8a8af78d5aae4e1f284b580c60e3d25ed2a72daa4dbce419b28d8adaf8a")
version("1.0.4", sha256="f80115f2dcca3d4b61f3c28188752c21ca7b2718b54b6e0274c0497a7f827da0")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxmu")
- depends_on("xproto@7.0.22:")
+ depends_on("xproto@7.0.22:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xl/detection_test.yaml b/var/spack/repos/builtin/packages/xl/detection_test.yaml
new file mode 100644
index 0000000000..da7b2fa92f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xl/detection_test.yaml
@@ -0,0 +1,31 @@
+paths:
+- layout:
+ - executables:
+ - "bin/xlc"
+ - "bin/xlc++"
+ - "bin/xlc_r"
+ - "bin/xlc++_r"
+ script: |
+ echo "IBM XL C/C++ for Linux, V16.1.1 (5725-C73, 5765-J13)"
+ echo "Version: 16.01.0001.0006"
+ - executables:
+ - "bin/xlf"
+ - "bin/xlf_r"
+ - "bin/xlcuf"
+ script: |
+ echo "IBM XL Fortran for Linux, V16.1.1 (5725-C73, 5765-J13)"
+ echo "Version: 16.01.0001.0006"
+ platforms: ["linux"]
+ results:
+ - spec: "xl~r@16.1"
+ extra_attributes:
+ compilers:
+ c: ".*/bin/xlc"
+ cxx: ".*/bin/xlc[+][+]"
+ fortran: ".*/bin/xlf"
+ - spec: "xl+r@16.1"
+ extra_attributes:
+ compilers:
+ c: ".*/bin/xlc_r"
+ cxx: ".*/bin/xlc[+][+]_r"
+ fortran: ".*/bin/xlf_r"
diff --git a/var/spack/repos/builtin/packages/xl/package.py b/var/spack/repos/builtin/packages/xl/package.py
new file mode 100644
index 0000000000..379c35810b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xl/package.py
@@ -0,0 +1,65 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xl(Package, CompilerPackage):
+ """IBM XL C/C++/Fortran is an advanced, high-performance compiler that can be
+ used for developing complex, computationally intensive programs, including
+ interlanguage calls with C and Fortran programs.
+ """
+
+ homepage = "https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/welcome.html"
+
+ variant("r", default=True, description="The _r version of compilers")
+
+ def install(self, spec, prefix):
+ raise InstallError(
+ "XL compilers are not installable yet, but can be "
+ "detected on a system where they are supplied by vendor"
+ )
+
+ compiler_languages = ["c", "cxx", "fortran"]
+ c_names = ["xlc", "xlc_r"]
+ cxx_names = ["xlc++", "xlC", "xlc++_r", "xlC_r"]
+ fortran_names = ["xlf", "xlf_r"] # TODO complete this
+ compiler_version_argument = "-qversion"
+ compiler_version_regex = r"([0-9]?[0-9]\.[0-9])"
+
+ @classmethod
+ def determine_variants(cls, exes, version_str):
+ _r_exes = [e for e in exes if e.endswith("_r")]
+ _exes = [e for e in exes if not e.endswith("_r")]
+
+ _r_compilers = cls.determine_compiler_paths(exes=_r_exes) if _r_exes else None
+ _compilers = cls.determine_compiler_paths(exes=_exes) if _exes else None
+
+ results = []
+ if _r_compilers:
+ results.append(("+r", {"compilers": _r_compilers}))
+ if _compilers:
+ results.append(("~r", {"compilers": _compilers}))
+ return results
+
+ @property
+ def cc(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["c"]
+ msg = "cannot retrieve C compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
+
+ @property
+ def cxx(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["cxx"]
+ msg = "cannot retrieve C++ compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
+
+ @property
+ def fortran(self):
+ if self.spec.external:
+ return self.spec.extra_attributes["compilers"]["fortran"]
+ msg = "cannot retrieve Fortran compiler [spec is not concrete]"
+ assert self.spec.concrete, msg
diff --git a/var/spack/repos/builtin/packages/xlc/detection_test.yaml b/var/spack/repos/builtin/packages/xlc/detection_test.yaml
deleted file mode 100644
index e76c608aba..0000000000
--- a/var/spack/repos/builtin/packages/xlc/detection_test.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-paths:
- - layout:
- - executables:
- - "bin/xlc"
- - "bin/xlc++"
- - "bin/xlc_r"
- - "bin/xlc++_r"
- script: |
- echo "IBM XL C/C++ for Linux, V16.1.1 (5725-C73, 5765-J13)"
- echo "Version: 16.01.0001.0006"
- - executables:
- - "bin/xlcuf"
- script: |
- echo "IBM XL Fortran for Linux, V16.1.1 (5725-C73, 5765-J13)"
- echo "Version: 16.01.0001.0006"
- results:
- - spec: "xlc+r@16.1"
- - spec: "xlc~r@16.1"
diff --git a/var/spack/repos/builtin/packages/xlc/package.py b/var/spack/repos/builtin/packages/xlc/package.py
deleted file mode 100644
index 983db7739b..0000000000
--- a/var/spack/repos/builtin/packages/xlc/package.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2013-2024 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 collections
-import re
-
-import llnl.util.tty as tty
-
-import spack.compiler
-from spack.package import *
-
-
-class Xlc(Package):
- """IBM XL C/C++ is an advanced, high-performance compiler that can be
- used for developing complex, computationally intensive programs, including
- interlanguage calls with C and Fortran programs.
- """
-
- homepage = "https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/welcome.html"
-
- variant("r", default=True, description="The _r version of compilers")
-
- def install(self, spec, prefix):
- raise InstallError(
- "XL compilers are not installable yet, but can be "
- "detected on a system where they are supplied by vendor"
- )
-
- executables = [r"xlc", r"xlC", r"xlc\+\+"]
-
- @classmethod
- def determine_version(cls, exe):
- version_regex = re.compile(r"([0-9]?[0-9]\.[0-9])")
- try:
- output = spack.compiler.get_compiler_version_output(exe, "-qversion")
- # Exclude spurious Fortran compilers
- if "Fortran" in output:
- return None
-
- match = version_regex.search(output)
- if match:
- return match.group(1)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(str(e))
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- variants = collections.defaultdict(dict)
- for exe in exes:
- # Determine the variant of the spec
- variant_str = "+r" if "_r" in exe else "~r"
- if "xlc++" in exe:
- variants[variant_str]["cxx"] = exe
- continue
-
- if "xlc" in exe:
- variants[variant_str]["c"] = exe
- continue
-
- results = []
- for variant_str, compilers in variants.items():
- results.append((variant_str, {"compilers": compilers}))
-
- return results
-
- @property
- def cc(self):
- if self.spec.external:
- return self.spec.extra_attributes["compilers"]["c"]
- msg = "cannot retrieve C compiler [spec is not concrete]"
- assert self.spec.concrete, msg
-
- @property
- def cxx(self):
- if self.spec.external:
- return self.spec.extra_attributes["compilers"]["cxx"]
- msg = "cannot retrieve C compiler [spec is not concrete]"
- assert self.spec.concrete, msg
diff --git a/var/spack/repos/builtin/packages/xlf/detection_test.yaml b/var/spack/repos/builtin/packages/xlf/detection_test.yaml
deleted file mode 100644
index 461ef007d7..0000000000
--- a/var/spack/repos/builtin/packages/xlf/detection_test.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-paths:
- - layout:
- - executables:
- - "bin/xlf"
- - "bin/xlf_r"
- script: |
- echo "IBM XL Fortran for Linux, V16.1.1 (5725-C73, 5765-J13)"
- echo "Version: 16.01.0001.0006"
- results:
- - spec: "xlf+r@16.1"
- - spec: "xlf~r@16.1"
diff --git a/var/spack/repos/builtin/packages/xlf/package.py b/var/spack/repos/builtin/packages/xlf/package.py
deleted file mode 100644
index dc26e7fd91..0000000000
--- a/var/spack/repos/builtin/packages/xlf/package.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2013-2024 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 collections
-import os.path
-import re
-
-import llnl.util.tty as tty
-
-import spack.compiler
-from spack.package import *
-
-
-class Xlf(Package):
- """IBM XL Fortran is an advanced, high-performance compiler that can be
- used for developing complex, computationally intensive programs, including
- interlanguage calls with C and Fortran programs.
- """
-
- homepage = "https://www.ibm.com/support/knowledgecenter/SSXVZZ_16.1.1/com.ibm.compilers.linux.doc/welcome.html"
-
- variant("r", default=True, description="The _r version of compilers")
-
- def install(self, spec, prefix):
- raise InstallError(
- "XL compilers are not installable yet, but can be "
- "detected on a system where they are supplied by vendor"
- )
-
- executables = [r"xlf"]
-
- @classmethod
- def determine_version(cls, exe):
- version_regex = re.compile(r"([0-9]?[0-9]\.[0-9])")
- try:
- output = spack.compiler.get_compiler_version_output(exe, "-qversion")
- match = version_regex.search(output)
- if match:
- return match.group(1)
- except spack.util.executable.ProcessError:
- pass
- except Exception as e:
- tty.debug(e)
-
- @classmethod
- def determine_variants(cls, exes, version_str):
- variants = collections.defaultdict(dict)
- for exe in exes:
- if os.path.basename(exe) == "xlf":
- variants["~r"]["fortran"] = exe
- continue
-
- if os.path.basename(exe) == "xlf_r":
- variants["+r"]["fortran"] = exe
- continue
-
- results = []
- for variant_str, compilers in variants.items():
- results.append((variant_str, {"compilers": compilers}))
-
- return results
-
- @property
- def fortran(self):
- if self.spec.external:
- return self.spec.extra_attributes["compilers"]["fortran"]
- msg = "cannot retrieve C compiler [spec is not concrete]"
- assert self.spec.concrete, msg
diff --git a/var/spack/repos/builtin/packages/xload/package.py b/var/spack/repos/builtin/packages/xload/package.py
index 7c6b24fcde..8890804164 100644
--- a/var/spack/repos/builtin/packages/xload/package.py
+++ b/var/spack/repos/builtin/packages/xload/package.py
@@ -10,21 +10,24 @@ class Xload(AutotoolsPackage, XorgPackage):
"""xload displays a periodically updating histogram of the
system load average."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xload"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xload"
xorg_mirror_path = "app/xload-1.1.3.tar.gz"
license("MIT")
+ version("1.2.0", sha256="0d3b84d22d2d85e9c3c152e48871e490dfcaad420f8836333f1323c5a690d55f")
version("1.1.4", sha256="4e3d240ab63e02f2ddac8182519d94bea82bda4887e3e364dd8832a04ca8436a")
version("1.1.3", sha256="9952e841d25ab2fd0ce5e27ba91858331c3f97575d726481772d4deb89432483")
version("1.1.2", sha256="4863ad339d22c41a0ca030dc5886404f5ae8b8c47cd5e09f0e36407edbdbe769")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xlogo/package.py b/var/spack/repos/builtin/packages/xlogo/package.py
index aa556d31ab..1f809b9274 100644
--- a/var/spack/repos/builtin/packages/xlogo/package.py
+++ b/var/spack/repos/builtin/packages/xlogo/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Xlogo(AutotoolsPackage, XorgPackage):
"""The xlogo program simply displays the X Window System logo."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xlogo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xlogo"
xorg_mirror_path = "app/xlogo-1.0.4.tar.gz"
version("1.0.6", sha256="0b0dbd90f53103b9241cc3a68c232213cec5c1d9a839604e59d128e4d81d1a4d")
version("1.0.5", sha256="28f51b64e3bce6aa5ac0e35d0c12121e6e0311d3bd8b48664a57a74f6be651eb")
version("1.0.4", sha256="0072eb3b41af77d5edfafb12998c7dd875f2795dc94735a998fd2ed8fc246e57")
+ depends_on("c", type="build") # generated
+
depends_on("libsm")
depends_on("libxaw")
depends_on("libxmu")
diff --git a/var/spack/repos/builtin/packages/xlsatoms/package.py b/var/spack/repos/builtin/packages/xlsatoms/package.py
index 7f28f2bd5b..4108c17e4f 100644
--- a/var/spack/repos/builtin/packages/xlsatoms/package.py
+++ b/var/spack/repos/builtin/packages/xlsatoms/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Xlsatoms(AutotoolsPackage, XorgPackage):
"""xlsatoms lists the interned atoms defined on an X11 server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xlsatoms"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xlsatoms"
xorg_mirror_path = "app/xlsatoms-1.1.2.tar.gz"
version("1.1.4", sha256="e3b4dce0e6bf3b60bc308ed184d2dc201ea4af6ce03f0126aa303ccd1ccb1237")
version("1.1.3", sha256="2a5a3ac0ded207c31ac1c2e9b8ae0030bba7ff604fea87a92781186ba71cbffa")
version("1.1.2", sha256="5400e22211795e40c4c4d28a048250f92bfb8c373004f0e654a2ad3138c2b36d")
+ depends_on("c", type="build") # generated
+
depends_on("libxcb", when="@1.1:")
depends_on("libx11", when="@:1.0")
diff --git a/var/spack/repos/builtin/packages/xlsclients/package.py b/var/spack/repos/builtin/packages/xlsclients/package.py
index bf42cd27cd..94510a3b14 100644
--- a/var/spack/repos/builtin/packages/xlsclients/package.py
+++ b/var/spack/repos/builtin/packages/xlsclients/package.py
@@ -10,13 +10,15 @@ class Xlsclients(AutotoolsPackage, XorgPackage):
"""xlsclients is a utility for listing information about the client
applications running on a X11 server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xlsclients"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xlsclients"
xorg_mirror_path = "app/xlsclients-1.1.3.tar.gz"
version("1.1.5", sha256="225d75e4c0b0929f16f974e20931ab85204b40098d92a5479b0b9379120637e5")
version("1.1.4", sha256="0b46e8289413c3e7c437a95ecd6494f99d27406d3a0b724ef995a98cbd6c33e8")
version("1.1.3", sha256="4670a4003aae01e9172efb969246c3d8f33481f290aa8726ff50398c838e6994")
+ depends_on("c", type="build") # generated
+
depends_on("libxcb@1.6:", when="@1.1:")
depends_on("libx11", when="@:1.0")
diff --git a/var/spack/repos/builtin/packages/xlsfonts/package.py b/var/spack/repos/builtin/packages/xlsfonts/package.py
index 4efceb02be..54be4a0082 100644
--- a/var/spack/repos/builtin/packages/xlsfonts/package.py
+++ b/var/spack/repos/builtin/packages/xlsfonts/package.py
@@ -10,15 +10,17 @@ class Xlsfonts(AutotoolsPackage, XorgPackage):
"""xlsfonts lists fonts available from an X server via the X11
core protocol."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xlsfonts"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xlsfonts"
xorg_mirror_path = "app/xlsfonts-1.0.5.tar.gz"
version("1.0.7", sha256="b92d4954eaf525674ff83f7e85240ef166c240a774277f71c30674f9f7794171")
version("1.0.6", sha256="870bbcfb903e790e730ea8ee964c72ce4a4df60f7a4b39541b88193d1e8c9453")
version("1.0.5", sha256="2a7aeca1023a3918ad2a1af2258ed63d8f8b6c48e53841b3a3f15fb9a0c008ce")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xmag/package.py b/var/spack/repos/builtin/packages/xmag/package.py
index 18ece436a9..a11dc957d6 100644
--- a/var/spack/repos/builtin/packages/xmag/package.py
+++ b/var/spack/repos/builtin/packages/xmag/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xmag(AutotoolsPackage, XorgPackage):
"""xmag displays a magnified snapshot of a portion of an X11 screen."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xmag"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xmag"
xorg_mirror_path = "app/xmag-1.0.6.tar.gz"
license("custom")
@@ -17,6 +17,8 @@ class Xmag(AutotoolsPackage, XorgPackage):
version("1.0.7", sha256="bf94f5ac6ad0dd423b3ee8fb78710d1e47ad7e9fc8b4cf561851fba5370e38eb")
version("1.0.6", sha256="07c5ec9114376dcd9a3303a38779e79b949d486f3b832d4a438550357d797aa5")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xman/package.py b/var/spack/repos/builtin/packages/xman/package.py
index 48ed103f02..2c8b9b0057 100644
--- a/var/spack/repos/builtin/packages/xman/package.py
+++ b/var/spack/repos/builtin/packages/xman/package.py
@@ -10,7 +10,7 @@ class Xman(AutotoolsPackage, XorgPackage):
"""xman is a graphical manual page browser using the Athena Widgets (Xaw)
toolkit."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xman"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xman"
xorg_mirror_path = "app/xman-1.1.4.tar.gz"
license("X11")
@@ -18,9 +18,11 @@ class Xman(AutotoolsPackage, XorgPackage):
version("1.1.5", sha256="ff0aeb164fcb736b381bd7722c27aa0284cafb9a5d1b3940c3c3ee0af642f204")
version("1.1.4", sha256="72fd0d479624a31d9a7330e5fdd220b7aa144744781f8e78aa12deece86e05c7")
+ depends_on("c", type="build")
+
depends_on("libxaw")
depends_on("libxt")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xmessage/package.py b/var/spack/repos/builtin/packages/xmessage/package.py
index 2672776886..fff7c6901e 100644
--- a/var/spack/repos/builtin/packages/xmessage/package.py
+++ b/var/spack/repos/builtin/packages/xmessage/package.py
@@ -11,7 +11,7 @@ class Xmessage(AutotoolsPackage, XorgPackage):
on an "okay" button to dismiss it or can select one of several buttons
to answer a question. xmessage can also exit after a specified time."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xmessage"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xmessage"
xorg_mirror_path = "app/xmessage-1.0.4.tar.gz"
license("MIT")
@@ -20,6 +20,8 @@ class Xmessage(AutotoolsPackage, XorgPackage):
version("1.0.5", sha256="99533a90ab66e268180a8400796950a7f560ea9421e2c3f32284cabc1858806b")
version("1.0.4", sha256="883099c3952c8cace5bd11d3df2e9ca143fc07375997435d5ff4f2d50353acca")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xmh/package.py b/var/spack/repos/builtin/packages/xmh/package.py
index e751b144d8..875a90396a 100644
--- a/var/spack/repos/builtin/packages/xmh/package.py
+++ b/var/spack/repos/builtin/packages/xmh/package.py
@@ -11,12 +11,15 @@ class Xmh(AutotoolsPackage, XorgPackage):
MH Message Handling System. To actually do things with your
mail, it makes calls to the MH package."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xmh"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xmh"
xorg_mirror_path = "app/xmh-1.0.3.tar.gz"
+ version("1.0.5", sha256="3ab74096031ba89bcc88a46dbfa652837c4aeb6a36168ff9799782efe88128b8")
version("1.0.4", sha256="2034f24fb3181b6e07ebf7235d2845a7ebb18d533aa405dbc99235eec4ab410f")
version("1.0.3", sha256="f90baf2615a4e1e01232c50cfd36ee4d50ad2fb2f76b8b5831fb796661f194d2")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxmu")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xmlf90/fj_modmakefile.patch b/var/spack/repos/builtin/packages/xmlf90/fj_modmakefile.patch
new file mode 100644
index 0000000000..10f23fd081
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xmlf90/fj_modmakefile.patch
@@ -0,0 +1,13 @@
+--- a/doc/Examples/dom/Makefile.am 2018-02-28 23:18:25.000000000 +0900
++++ b/doc/Examples/dom/Makefile.am 2023-08-03 10:32:10.000000000 +0900
+@@ -5,8 +5,8 @@
+ #
+
+ # Connect this directory to the main source code
+-AM_CPPFLAGS = -I../../../src/dom -I../../../src/sax -DDOM_DATA_DIR=\"$(srcdir)/\"
+-AM_FCFLAGS = -I../../../src/dom -I../../../src/sax
++AM_CPPFLAGS = -I../../../src/dom -I../../../src/sax -I../../../src/wxml -DDOM_DATA_DIR=\"$(srcdir)/\"
++AM_FCFLAGS = -I../../../src/dom -I../../../src/sax -I../../../src/wxml
+
+ # Example programs
+ noinst_PROGRAMS = data features pseudo pseudo_dom text
diff --git a/var/spack/repos/builtin/packages/xmlf90/package.py b/var/spack/repos/builtin/packages/xmlf90/package.py
index 715c4ccf14..c8a0937c29 100644
--- a/var/spack/repos/builtin/packages/xmlf90/package.py
+++ b/var/spack/repos/builtin/packages/xmlf90/package.py
@@ -10,23 +10,30 @@ from spack.package import *
class Xmlf90(AutotoolsPackage):
"""xmlf90 is a suite of libraries to handle XML in Fortran."""
- homepage = "https://launchpad.net/xmlf90"
- url = "https://launchpad.net/xmlf90/trunk/1.5/+download/xmlf90-1.5.4.tar.gz"
+ homepage = "https://xmlf90.readthedocs.io/en/latest/"
+ git = "https://gitlab.com/siesta-project/libraries/xmlf90"
license("BSD-2-Clause")
- version("1.5.4", sha256="a0b1324ff224d5b5ad1127a6ad4f90979f6b127f1a517f98253eea377237bbe4")
- version("1.5.3", sha256="a5378a5d9df4b617f51382092999eb0f20fa1a90ab49afbccfd80aa51650d27c")
- version("1.5.2", sha256="666694db793828d1d1e9aea665f75c75ee21772693465a88b43e6370862abfa6")
+ version("1.6.3", tag="1.6.3", commit="963fe5d11487233d43ac59dd0c1340a7b2cc3dc5")
+ version("1.6.2", tag="1.6.2", commit="2be1d8d2253233093857e8555e50e74857d0bb51")
+ version("1.6.1", tag="1.6.1", commit="773726675fc4290334444adcc76d9af96871f25f")
+ version("1.6.0", tag="1.6.0", commit="36c64350138af1edfbbd8e0ce23b36a0ac8db617")
+ version("1.5.6", tag="1.5.6", commit="c51a18e86b0d9e7d624509e799ee823c95f69fd1")
+ version("1.5.5", tag="1.5.5", commit="166c0458750f973e2d6f86dd59738f3e3088295e")
+ version("1.5.4", tag="xmlf90-1.5.4", commit="5b21b2c63c834adaa2327e22daa0c856644b2c75")
+ version("1.5.3", tag="xmlf90-1.5.3", commit="d55a5bcf8a0d4e592a03585209435d342d8e6d0f")
+ version("1.5.2", tag="xmlf90-1.5.2", commit="b238aec8719b7c40c7b7252c5f200818a0d5004a")
+
+ depends_on("fortran", type="build") # generated
depends_on("autoconf@2.69:", type="build")
depends_on("automake@1.14:", type="build")
depends_on("libtool@2.4.2:", type="build")
depends_on("m4", type="build")
- def url_for_version(self, version):
- url = "https://launchpad.net/xmlf90/trunk/{0}/+download/xmlf90-{1}.tar.gz"
- return url.format(version.up_to(2), version)
+ # Additional include directory specification required for Fujitsu compiler
+ patch("fj_modmakefile.patch", when="%fj")
@when("@1.5.2")
def autoreconf(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/xmlrpc-c/package.py b/var/spack/repos/builtin/packages/xmlrpc-c/package.py
index 080b086584..e32b2a0a01 100644
--- a/var/spack/repos/builtin/packages/xmlrpc-c/package.py
+++ b/var/spack/repos/builtin/packages/xmlrpc-c/package.py
@@ -17,6 +17,9 @@ class XmlrpcC(AutotoolsPackage):
version("1.51.06", sha256="06dcd87d9c88374559369ffbe83b3139cf41418c1a2d03f20e08808085f89fd0")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("curl", default=False, description="Build the XMLRPC curl client")
depends_on("curl", when="+curl")
diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py
index d70e6f6dda..ea16a58550 100644
--- a/var/spack/repos/builtin/packages/xmlto/package.py
+++ b/var/spack/repos/builtin/packages/xmlto/package.py
@@ -19,7 +19,10 @@ class Xmlto(AutotoolsPackage):
version("0.0.28", sha256="2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3")
+ depends_on("c", type="build") # generated
+
# FIXME: missing a lot of dependencies
+ depends_on("flex", type=("build"))
depends_on("docbook-xsl", type=("build", "run"))
depends_on("libxml2", type=("build", "run")) # xmllint
depends_on("libxslt", type=("build", "run")) # xsltconf
@@ -28,10 +31,10 @@ class Xmlto(AutotoolsPackage):
depends_on("docbook-xml", type="run")
patch(
- "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-1.patch",
+ "https://src.fedoraproject.org/rpms/xmlto/raw/571fc033c0ff5d6cf448e2ca20d8ae8ac61a7cb8/f/xmlto-c99-1.patch",
sha256="056c8bebc25d8d1488cc6a3724e2bcafc0e5e0df5c50080559cdef99bd377839",
)
patch(
- "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-2.patch",
+ "https://src.fedoraproject.org/rpms/xmlto/raw/571fc033c0ff5d6cf448e2ca20d8ae8ac61a7cb8/f/xmlto-c99-2.patch",
sha256="50e39b1810bbf22a1d67944086c5681bcd58b8c325dfb251d56ac15d088fc17a",
)
diff --git a/var/spack/repos/builtin/packages/xmodmap/package.py b/var/spack/repos/builtin/packages/xmodmap/package.py
index d3544926c5..f521bebad8 100644
--- a/var/spack/repos/builtin/packages/xmodmap/package.py
+++ b/var/spack/repos/builtin/packages/xmodmap/package.py
@@ -13,7 +13,7 @@ class Xmodmap(AutotoolsPackage, XorgPackage):
session startup script to configure the keyboard according to personal
tastes."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xmodmap"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xmodmap"
xorg_mirror_path = "app/xmodmap-1.0.9.tar.gz"
license("MIT")
@@ -22,8 +22,10 @@ class Xmodmap(AutotoolsPackage, XorgPackage):
version("1.0.10", sha256="d4e9dc4cb034d0d774d059498d05348869934c52b0f24b0f3913823090b88640")
version("1.0.9", sha256="73427a996f0fcda2a2c7ac96cfc4edd5985aeb13b48053f55ae7f63a668fadef")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xmore/package.py b/var/spack/repos/builtin/packages/xmore/package.py
index 782484dc15..2642215c4f 100644
--- a/var/spack/repos/builtin/packages/xmore/package.py
+++ b/var/spack/repos/builtin/packages/xmore/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Xmore(AutotoolsPackage, XorgPackage):
"""xmore - plain text display program for the X Window System."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xmore"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xmore"
xorg_mirror_path = "app/xmore-1.0.2.tar.gz"
version("1.0.3", sha256="00e2f55ce4d2699a97f70060d309898c92ed2a42b9e16f21047a3654432a92b6")
version("1.0.2", sha256="7371631d05986f1111f2026a77e43e048519738cfcc493c6222b66e7b0f309c0")
+ depends_on("c", type="build") # generated
+
depends_on("libxaw")
depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xnnpack/package.py b/var/spack/repos/builtin/packages/xnnpack/package.py
index 9549e256db..6611fe7190 100644
--- a/var/spack/repos/builtin/packages/xnnpack/package.py
+++ b/var/spack/repos/builtin/packages/xnnpack/package.py
@@ -22,6 +22,9 @@ class Xnnpack(CMakePackage):
version("2020-03-23", commit="1b354636b5942826547055252f3b359b54acff95") # py-torch@1.6:1.7
version("2020-02-24", commit="7493bfb9d412e59529bcbced6a902d44cfa8ea1c") # py-torch@1.5
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
diff --git a/var/spack/repos/builtin/packages/xorg-cf-files/package.py b/var/spack/repos/builtin/packages/xorg-cf-files/package.py
index 578c10e7f4..d02e7c757c 100644
--- a/var/spack/repos/builtin/packages/xorg-cf-files/package.py
+++ b/var/spack/repos/builtin/packages/xorg-cf-files/package.py
@@ -12,11 +12,12 @@ class XorgCfFiles(AutotoolsPackage, XorgPackage):
have not been verified or tested in over a decade), and for many of the
libraries formerly delivered in the X.Org monolithic releases."""
- homepage = "https://cgit.freedesktop.org/xorg/util/cf"
+ homepage = "https://gitlab.freedesktop.org/xorg/util/cf"
xorg_mirror_path = "util/xorg-cf-files-1.0.6.tar.gz"
license("custom")
+ version("1.0.8", sha256="c6f1c9ffce96278a9d7c72d081e508d81c219dec69ae0dbaf8ae88f4bc9ef977")
version("1.0.6", sha256="6d56094e5d1a6c7d7a9576ac3a0fc2c042344509ea900d59f4b23df668b96c7a")
depends_on("pkgconfig", type="build")
diff --git a/var/spack/repos/builtin/packages/xorg-docs/package.py b/var/spack/repos/builtin/packages/xorg-docs/package.py
index 73a861422d..78b772a7e7 100644
--- a/var/spack/repos/builtin/packages/xorg-docs/package.py
+++ b/var/spack/repos/builtin/packages/xorg-docs/package.py
@@ -12,15 +12,17 @@ class XorgDocs(AutotoolsPackage, XorgPackage):
The preferred documentation format for these documents is DocBook XML."""
- homepage = "https://cgit.freedesktop.org/xorg/doc/xorg-docs"
+ homepage = "https://gitlab.freedesktop.org/xorg/doc/xorg-docs"
xorg_mirror_path = "doc/xorg-docs-1.7.1.tar.gz"
maintainers("wdconinc")
+ version("1.7.3", sha256="30f8fc4b435cda82f21d08d81c2e2fc9046ec7e20945e32ab7b63326674cf8c5")
version("1.7.2", sha256="0c1e018868a00cb5a5bc8622ffd87e706e119ffa0949edde00d0d0d912663677")
version("1.7.1", sha256="360707db2ba48f6deeb53d570deca9fa98218af48ead4a726a67f63e3ef63816")
depends_on("pkgconfig", type="build")
- depends_on("util-macros", type="build")
+ depends_on("util-macros@1.8:", type="build")
+ depends_on("util-macros@1.20:", type="build", when="@1.7.3:")
depends_on("xorg-sgml-doctools@1.8:", type="build")
depends_on("xmlto", type="build")
diff --git a/var/spack/repos/builtin/packages/xorg-gtest/package.py b/var/spack/repos/builtin/packages/xorg-gtest/package.py
index 1a22f12565..55d1fddddd 100644
--- a/var/spack/repos/builtin/packages/xorg-gtest/package.py
+++ b/var/spack/repos/builtin/packages/xorg-gtest/package.py
@@ -15,6 +15,8 @@ class XorgGtest(AutotoolsPackage, XorgPackage):
version("0.7.1", sha256="6cedc7904c698472783203bd686e777db120b808bb4052e451a822e437b72682")
+ depends_on("cxx", type="build") # generated
+
depends_on("libx11")
depends_on("libxi")
depends_on("xorg-server")
diff --git a/var/spack/repos/builtin/packages/xorg-server/package.py b/var/spack/repos/builtin/packages/xorg-server/package.py
index 3bafc23339..55a7496827 100644
--- a/var/spack/repos/builtin/packages/xorg-server/package.py
+++ b/var/spack/repos/builtin/packages/xorg-server/package.py
@@ -10,54 +10,114 @@ class XorgServer(AutotoolsPackage, XorgPackage):
"""X.Org Server is the free and open source implementation of the display
server for the X Window System stewarded by the X.Org Foundation."""
- homepage = "https://cgit.freedesktop.org/xorg/xserver"
+ homepage = "https://gitlab.freedesktop.org/xorg/xserver"
xorg_mirror_path = "xserver/xorg-server-1.18.99.901.tar.gz"
license("MIT")
version(
+ "1.18.99.902", sha256="fe5a312f7bdc6762c97f01b7a1d3c7a8691997255be6fbf7598c180abf384ea3"
+ )
+ version(
"1.18.99.901", sha256="c8425163b588de2ee7e5c8e65b0749f2710f55a7e02a8d1dc83b3630868ceb21"
)
+ variant("glx", default=True, description="Build GLX extension")
+ variant("dri", default=True, description="Build DRI, DRI2, DRI3 extensions")
+
+ # glibc stopped declaring major()/minor() macros in <sys/types.h>
+ # https://gitlab.freedesktop.org/xorg/xserver/-/commit/d732c36597fab2e9bc4f2aa72cf1110997697557
+ patch("sysmacros.patch", when="@:1.18 ^glibc@2.25:")
+
+ def patch(self):
+ with when("@1"):
+ # Due to transition from mesa version numbers to libglvnd version numbers,
+ # subset of https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/292
+ filter_file('LIBGL="gl >= 7.1.0"', 'LIBGL="gl >= 1.2"', "configure")
+ filter_file('LIBGL="gl >= 9.2.0"', 'LIBGL="gl >= 1.2"', "configure")
+
+ depends_on("c", type="build")
+
depends_on("pixman@0.27.2:")
depends_on("font-util")
depends_on("libxshmfence@1.1:")
- depends_on("libdrm@2.3.0:")
+ depends_on("libdrm@2.3.0:", when="+dri")
depends_on("libx11")
- depends_on("dri2proto@2.8:")
- depends_on("dri3proto@1.0:")
- depends_on("glproto@1.4.17:")
+ depends_on("gl", when="+dri")
+ depends_on("gl", when="+glx")
+
+ depends_on("xf86driproto@2.1.0:", type="build", when="+dri")
+ depends_on("dri2proto@2.8:", type="build", when="+dri")
+ depends_on("dri3proto@1.0:", type="build", when="+dri")
+ depends_on("glproto@1.4.17:", type="build", when="+dri")
+ depends_on("glproto@1.4.17:", type="build", when="+glx")
depends_on("flex", type="build")
depends_on("bison", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
- depends_on("fixesproto@5.0:")
- depends_on("damageproto@1.1:")
- depends_on("xcmiscproto@1.2.0:")
+ depends_on("fixesproto@5.0:", type="build")
+ depends_on("damageproto@1.1:", type="build")
+ depends_on("xcmiscproto@1.2.0:", type="build")
depends_on("xtrans@1.3.5:")
- depends_on("bigreqsproto@1.1.0:")
- depends_on("xproto@7.0.28:")
- depends_on("randrproto@1.5.0:")
- depends_on("renderproto@0.11:")
- depends_on("xextproto@7.2.99.901:")
- depends_on("inputproto@2.3:")
- depends_on("kbproto@1.0.3:")
- depends_on("fontsproto@2.1.3:")
+ depends_on("bigreqsproto@1.1.0:", type="build")
+ depends_on("xproto@7.0.28:", type="build")
+ depends_on("randrproto@1.5.0:", type="build")
+ depends_on("renderproto@0.11:", type="build")
+ depends_on("xextproto@7.2.99.901:", type="build")
+ depends_on("inputproto@2.3:", type="build")
+ depends_on("kbproto@1.0.3:", type="build")
+ depends_on("fontsproto@2.1.3:", type="build")
depends_on("pixman@0.27.2:")
- depends_on("videoproto")
- depends_on("compositeproto@0.4:")
- depends_on("recordproto@1.13.99.1:")
- depends_on("scrnsaverproto@1.1:")
- depends_on("resourceproto@1.2.0:")
- depends_on("xf86driproto@2.1.0:")
- depends_on("glproto@1.4.17:")
- depends_on("presentproto@1.0:")
- depends_on("xineramaproto")
+ depends_on("videoproto", type="build")
+ depends_on("compositeproto@0.4:", type="build")
+ depends_on("recordproto@1.13.99.1:", type="build")
+ depends_on("scrnsaverproto@1.1:", type="build")
+ depends_on("resourceproto@1.2.0:", type="build")
+ depends_on("presentproto@1.0:", type="build")
+ depends_on("xineramaproto", type="build")
depends_on("libxkbfile")
depends_on("libxfont2")
depends_on("libxext")
depends_on("libxdamage")
depends_on("libxfixes")
depends_on("libepoxy")
+ depends_on("libpciaccess")
+
+ @when("@:1.19")
+ def setup_build_environment(self, env):
+ # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/406
+ env.set("CPPFLAGS", "-fcommon")
+
+ gl_libs = self.spec["gl"].libs
+ env.set("GL_LIBS", gl_libs)
+ env.set("GL_CFLAGS", self.spec["gl"].headers.cpp_flags)
+
+ def configure_args(self):
+ args = []
+
+ if self.spec.satisfies("+glx ^[virtuals=gl] osmesa"):
+ args.append("--enable-glx")
+ else:
+ args.append("--disable-glx")
+
+ if self.spec.satisfies("+dri"):
+ args.append("--disable-dri") # dri requires libdri, not libdrm
+ args.append("--enable-dri2")
+ args.append("--enable-dri3")
+ args.append("--enable-drm")
+ else:
+ args.append("--disable-dri")
+ args.append("--disable-dri2")
+ args.append("--disable-dri3")
+ args.append("--disable-drm")
+
+ if self.spec.satisfies("^[virtuals=gl] osmesa"):
+ args.append("--enable-glx")
+ else:
+ args.append("--disable-glx")
+
+ args.extend(["--disable-glamor"]) # Glamor for Xorg requires gbm >= 10.2.0
+
+ return args
diff --git a/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch b/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch
new file mode 100644
index 0000000000..15f8c314c0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-server/sysmacros.patch
@@ -0,0 +1,24 @@
+diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
+index 39de498a372c468b67013bb43488ef3201c267d4..136bf50ff9de77ad68e1933572de3efd0d9d786d 100644
+--- a/hw/xfree86/common/xf86Xinput.c
++++ b/hw/xfree86/common/xf86Xinput.c
+@@ -84,6 +84,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+ #ifdef HAVE_SYS_MKDEV_H
+ #include <sys/mkdev.h> /* for major() & minor() on Solaris */
+ #endif
+diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
+index dbf497ca2ebdc09e2ee28ec9d72ea335b43c947b..9e5ddcd503d370f733b4fc66bd0532f903f94a1c 100644
+--- a/hw/xfree86/os-support/linux/lnx_init.c
++++ b/hw/xfree86/os-support/linux/lnx_init.c
+@@ -38,6 +38,7 @@
+ #include "xf86_OSlib.h"
+
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+
+ #ifndef K_OFF
+ #define K_OFF 0x4
diff --git a/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py
index a92365b134..a796f927c1 100644
--- a/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py
+++ b/var/spack/repos/builtin/packages/xorg-sgml-doctools/package.py
@@ -11,15 +11,17 @@ class XorgSgmlDoctools(AutotoolsPackage, XorgPackage):
sheets used in building/formatting the documentation provided in other
X.Org packages."""
- homepage = "https://cgit.freedesktop.org/xorg/doc/xorg-sgml-doctools"
+ homepage = "https://gitlab.freedesktop.org/xorg/doc/xorg-sgml-doctools"
xorg_mirror_path = "doc/xorg-sgml-doctools-1.11.tar.gz"
maintainers("wdconinc")
license("MIT")
+ version("1.12.1", sha256="8de3406f96a02bc3ab51ff47ba1612d9a11fc25d2edcaa06caa2cb2420d7bae0")
version("1.12", sha256="985a0329e6a6dadd6ad517f8d54f8766ab4b52bb8da7b07d02ec466bec444bdb")
version("1.11", sha256="986326d7b4dd2ad298f61d8d41fe3929ac6191c6000d6d7e47a8ffc0c34e7426")
depends_on("pkgconfig", type="build")
- depends_on("util-macros", type="build")
+ depends_on("util-macros@1.8:", type="build")
+ depends_on("util-macros@1.20:", type="build", when="@1.12.1:")
diff --git a/var/spack/repos/builtin/packages/xorgproto/package.py b/var/spack/repos/builtin/packages/xorgproto/package.py
new file mode 100644
index 0000000000..b27d1e2a40
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorgproto/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Xorgproto(MesonPackage, XorgPackage):
+ """X Window System unified protocol definitions replacing standalone protos"""
+
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/xorgproto"
+ xorg_mirror_path = "proto/xorgproto-2024.1.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("OTHER", checked_by="teaguesterling")
+
+ version("2024.1", sha256="4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce")
+
+ depends_on("meson@0.56:", type="build")
+ depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xphelloworld/package.py b/var/spack/repos/builtin/packages/xphelloworld/package.py
index 3eec5ffc21..47d4bca340 100644
--- a/var/spack/repos/builtin/packages/xphelloworld/package.py
+++ b/var/spack/repos/builtin/packages/xphelloworld/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Xphelloworld(AutotoolsPackage, XorgPackage):
"""Xprint sample applications."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xphelloworld"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xphelloworld"
xorg_mirror_path = "app/xphelloworld-1.0.1.tar.gz"
version("1.0.1", sha256="ead6437c4dc9540698a41e174c9d1ac792de07baeead81935d72cb123196f866")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxaw")
depends_on("libxprintapputil")
diff --git a/var/spack/repos/builtin/packages/xplsprinters/package.py b/var/spack/repos/builtin/packages/xplsprinters/package.py
index 901bfaa0e4..332064d4f4 100644
--- a/var/spack/repos/builtin/packages/xplsprinters/package.py
+++ b/var/spack/repos/builtin/packages/xplsprinters/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Xplsprinters(AutotoolsPackage, XorgPackage):
"""List Xprint printers."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xplsprinters"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xplsprinters"
xorg_mirror_path = "app/xplsprinters-1.0.1.tar.gz"
version("1.0.1", sha256="33377e499429ce3e100fbd7b59153c87ad79bf55872561db08419f69cac4fbfd")
+ depends_on("c", type="build") # generated
+
depends_on("libxp")
depends_on("libxprintutil")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xpmem/package.py b/var/spack/repos/builtin/packages/xpmem/package.py
index cd437e3cf7..20d88b8ced 100644
--- a/var/spack/repos/builtin/packages/xpmem/package.py
+++ b/var/spack/repos/builtin/packages/xpmem/package.py
@@ -35,6 +35,8 @@ class Xpmem(AutotoolsPackage):
version("2.6.3", sha256="ee239a32269f33234cdbdb94db29c12287862934c0784328d34aff82a9fa8b54")
version("2.6.2", sha256="2c1a93b4cb20ed73c2093435a7afec513e0e797aa1e49d4d964cc6bdae89d65b")
+ depends_on("c", type="build") # generated
+
variant("kernel-module", default=True, description="Enable building the kernel module")
# Added RHEL 8.3 kernel support
diff --git a/var/spack/repos/builtin/packages/xpr/package.py b/var/spack/repos/builtin/packages/xpr/package.py
index 291aa4e031..1ab58ef195 100644
--- a/var/spack/repos/builtin/packages/xpr/package.py
+++ b/var/spack/repos/builtin/packages/xpr/package.py
@@ -10,16 +10,18 @@ class Xpr(AutotoolsPackage, XorgPackage):
"""xpr takes as input a window dump file produced by xwd
and formats it for output on various types of printers."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xpr"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xpr"
xorg_mirror_path = "app/xpr-1.0.4.tar.gz"
version("1.1.0", sha256="fabd02fb1a52358d521f1be7422738bc8c9b511a8d82a163888f628db6f6cb18")
version("1.0.5", sha256="7a429478279a2b0f2363b24b8279ff132cc5e83762d3329341490838b0723757")
version("1.0.4", sha256="9ec355388ae363fd40239a3fa56908bb2f3e53b5bfc872cf0182d14d730c6207")
+ depends_on("c", type="build")
+
depends_on("libxmu")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py
index 5ad7f37fb3..b6477d53aa 100644
--- a/var/spack/repos/builtin/packages/xprehashprinterlist/package.py
+++ b/var/spack/repos/builtin/packages/xprehashprinterlist/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Xprehashprinterlist(AutotoolsPackage, XorgPackage):
"""Rehash list of Xprint printers."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xprehashprinterlist"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xprehashprinterlist"
xorg_mirror_path = "app/xprehashprinterlist-1.0.1.tar.gz"
version("1.0.1", sha256="396986da064b584138cfcff79a8aed12590a9dab24f1cd2d80b08bc1cb896a43")
+ depends_on("c", type="build") # generated
+
depends_on("libxp")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xprop/package.py b/var/spack/repos/builtin/packages/xprop/package.py
index b426118a02..da9bd6b4a9 100644
--- a/var/spack/repos/builtin/packages/xprop/package.py
+++ b/var/spack/repos/builtin/packages/xprop/package.py
@@ -10,19 +10,22 @@ class Xprop(AutotoolsPackage, XorgPackage):
"""xprop is a command line tool to display and/or set window and font
properties of an X server."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xprop"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xprop"
xorg_mirror_path = "app/xprop-1.2.2.tar.gz"
license("MIT")
+ version("1.2.7", sha256="11c06a876b0aa0bfac6cbfe4b3ebe1f5062f8b39b9b1b6c136a8629265f134b6")
version("1.2.6", sha256="58ee5ee0c47fa454d3b16312e778c3f549605a8ad0fd0daafc70d2d6174b116d")
version("1.2.5", sha256="b7bf6b6be6cf23e7966a153fc84d5901c14f01ee952fbd9d930aa48e2385d670")
version("1.2.4", sha256="dddb6e208ffa515e68f001c22077a465f1365a4bcf91d9b37f336a6c0d15400d")
version("1.2.3", sha256="82c13f40577e10b6f3f0160a21b1e46c00a0c719aa560618b961c453e1b5c80d")
version("1.2.2", sha256="3db78771ce8fb8954fb242ed9d4030372523649c5e9c1a9420340020dd0afbc2")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xproperty/package.py b/var/spack/repos/builtin/packages/xproperty/package.py
index 9d8a0d1483..9944f6da8e 100644
--- a/var/spack/repos/builtin/packages/xproperty/package.py
+++ b/var/spack/repos/builtin/packages/xproperty/package.py
@@ -20,6 +20,8 @@ class Xproperty(CMakePackage):
version("master", branch="master")
version("0.11.0", sha256="bf86a11c6758308aa0aa0f64d8dd24cd3e9d78378467b74002f552bfb75fc0eb")
+ depends_on("cxx", type="build") # generated
+
depends_on("xtl@0.7.0:0.7", when="@0.11.0:")
# C++14 support
diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py
index b7403f13bd..fccbd571e4 100644
--- a/var/spack/repos/builtin/packages/xproto/package.py
+++ b/var/spack/repos/builtin/packages/xproto/package.py
@@ -16,7 +16,7 @@ class Xproto(AutotoolsPackage, XorgPackage):
but are depended upon by many other X Window System packages to provide
common definitions and porting layer."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/x11proto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/x11proto"
xorg_mirror_path = "proto/xproto-7.0.31.tar.gz"
version("7.0.31", sha256="6d755eaae27b45c5cc75529a12855fed5de5969b367ed05003944cf901ed43c7")
diff --git a/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py
index a9a1489722..b724478e97 100644
--- a/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py
+++ b/var/spack/repos/builtin/packages/xproxymanagementprotocol/package.py
@@ -11,7 +11,7 @@ class Xproxymanagementprotocol(AutotoolsPackage, XorgPackage):
way for application servers to easily locate proxy services available to
them."""
- homepage = "https://cgit.freedesktop.org/xorg/proto/pmproto"
+ homepage = "https://gitlab.freedesktop.org/xorg/proto/pmproto"
xorg_mirror_path = "proto/xproxymanagementprotocol-1.0.3.tar.gz"
version("1.0.3", sha256="c1501045ec781f36b6f867611ab2b4e81be542f5c669b2fd0cc4ec1340c42bcf")
diff --git a/var/spack/repos/builtin/packages/xqilla/package.py b/var/spack/repos/builtin/packages/xqilla/package.py
index 03efa9b1b4..22e61bd632 100644
--- a/var/spack/repos/builtin/packages/xqilla/package.py
+++ b/var/spack/repos/builtin/packages/xqilla/package.py
@@ -10,13 +10,16 @@ class Xqilla(AutotoolsPackage, SourceforgePackage):
"""XQilla is an XQuery and XPath 2 library and command line utility
written in C++, implemented on top of the Xerces-C library."""
- homepage = "http://xqilla.sourceforge.net/HomePage"
+ homepage = "https://xqilla.sourceforge.net/HomePage"
sourceforge_mirror_path = "xqilla/XQilla-2.3.3.tar.gz"
license("Apache-2.0")
version("2.3.3", sha256="8f76b9b4f966f315acc2a8e104e426d8a76ba4ea3441b0ecfdd1e39195674fd6")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("debug", default=False, description="Build a debugging version.")
variant("shared", default=True, description="Build shared libraries.")
diff --git a/var/spack/repos/builtin/packages/xrandr/package.py b/var/spack/repos/builtin/packages/xrandr/package.py
index e6103ec6b3..c3b2838ae6 100644
--- a/var/spack/repos/builtin/packages/xrandr/package.py
+++ b/var/spack/repos/builtin/packages/xrandr/package.py
@@ -10,18 +10,24 @@ class Xrandr(AutotoolsPackage, XorgPackage):
"""xrandr - primitive command line interface to X11 Resize, Rotate, and
Reflect (RandR) extension."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xrandr"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xrandr"
xorg_mirror_path = "app/xrandr-1.5.0.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.5.2", sha256="efd062cd228dc18a7de26422c81bc4be6a7e62f7f0ad6f9bebdd9ff8385c5668")
+ version("1.5.1", sha256="7b99edb7970a1365eaf5bcaf552144e4dfc3ccf510c4abc08569849929fb366e")
version("1.5.0", sha256="ddfe8e7866149c24ccce8e6aaa0623218ae19130c2859cadcaa4228d8bb4a46d")
+ depends_on("c", type="build")
+
depends_on("libxrandr@1.5:")
depends_on("libxrender")
depends_on("libx11")
- depends_on("randrproto")
+ depends_on("randrproto", type="build")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xrdb/package.py b/var/spack/repos/builtin/packages/xrdb/package.py
index d60b5a4ddb..96fd97b88e 100644
--- a/var/spack/repos/builtin/packages/xrdb/package.py
+++ b/var/spack/repos/builtin/packages/xrdb/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xrdb(AutotoolsPackage, XorgPackage):
"""xrdb - X server resource database utility."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xrdb"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xrdb"
xorg_mirror_path = "app/xrdb-1.1.0.tar.gz"
license("MIT")
@@ -19,9 +19,11 @@ class Xrdb(AutotoolsPackage, XorgPackage):
version("1.1.1", sha256="d19f856296c5f1742a703afc620654efc76fedfb86e1afe0bff9f1038b9e8a47")
version("1.1.0", sha256="44b0b6b7b7eb80b83486dfea67c880f6b0059052386c7ddec4d58fd2ad9ae8e9")
+ depends_on("c", type="build")
+
depends_on("libxmu")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xrdcl-record/package.py b/var/spack/repos/builtin/packages/xrdcl-record/package.py
index 606fade55c..684715eb9f 100644
--- a/var/spack/repos/builtin/packages/xrdcl-record/package.py
+++ b/var/spack/repos/builtin/packages/xrdcl-record/package.py
@@ -17,4 +17,6 @@ class XrdclRecord(CMakePackage):
version("5.4.2", sha256="fb76284491ff4e723bce4c9e9d87347e98e278e70c597167bc39a162bc876734")
+ depends_on("cxx", type="build") # generated
+
depends_on("xrootd")
diff --git a/var/spack/repos/builtin/packages/xrefresh/package.py b/var/spack/repos/builtin/packages/xrefresh/package.py
index d9fa199988..7b28eb364f 100644
--- a/var/spack/repos/builtin/packages/xrefresh/package.py
+++ b/var/spack/repos/builtin/packages/xrefresh/package.py
@@ -9,17 +9,20 @@ from spack.package import *
class Xrefresh(AutotoolsPackage, XorgPackage):
"""xrefresh - refresh all or part of an X screen."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xrefresh"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xrefresh"
xorg_mirror_path = "app/xrefresh-1.0.5.tar.gz"
license("MIT")
+ version("1.1.0", sha256="cbf0d3ed80f03188841a96ceb20e615b40a006e3928be2e179d9d5a0ded639b2")
version("1.0.7", sha256="f2817920f119bd9146ed3cde223b8a4ab17cb72da4ece7bddde35e18b31aa337")
version("1.0.6", sha256="0dda726365d341c00aed0f9cfebf3d2cfaa0c661212c73c0114cbb4ce92f357e")
version("1.0.5", sha256="b373cc1ecd37c3d787e7074ce89a8a06ea173d7ba9e73fa48de973c759fbcf38")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py
index 1d20706fc9..73482d7920 100644
--- a/var/spack/repos/builtin/packages/xrootd/package.py
+++ b/var/spack/repos/builtin/packages/xrootd/package.py
@@ -11,14 +11,28 @@ class Xrootd(CMakePackage):
"""The XROOTD project aims at giving high performance, scalable fault
tolerant access to data repositories of many kinds."""
- homepage = "http://xrootd.org"
- url = "https://xrootd.slac.stanford.edu/download/v5.5.1/xrootd-5.5.1.tar.gz"
- list_url = "https://xrootd.slac.stanford.edu/dload.html"
+ homepage = "https://xrootd.web.cern.ch"
+ urls = [
+ "https://xrootd.web.cern.ch/download/v5.7.0/xrootd-5.7.0.tar.gz",
+ "https://github.com/xrootd/xrootd/releases/download/v5.7.0/xrootd-5.7.0.tar.gz",
+ ]
+ list_url = "https://xrootd.web.cern.ch/dload.html"
+ git = "https://github.com/xrootd/xrootd.git"
maintainers("gartung", "greenc-FNAL", "marcmengel", "vitodb", "wdconinc")
license("LGPL-3.0-only")
+ version("5.7.1", sha256="c28c9dc0a2f5d0134e803981be8b1e8b1c9a6ec13b49f5fa3040889b439f4041")
+ version("5.7.0", sha256="214599bba98bc69875b82ac74f2d4b9ac8a554a1024119d8a9802b3d8b9986f8")
+ version("5.6.9", sha256="44196167fbcf030d113e3749dfdecab934c43ec15e38e77481e29aac191ca3a8")
+ version("5.6.8", sha256="19268fd9f0307d936da3598a5eb8471328e059c58f60d91d1ce7305ca0d57528")
+ version("5.6.7", sha256="4089ce3a69fcf6566d320ef1f4a73a1d6332e6835b7566e17548569bdea78a8d")
+ version("5.6.6", sha256="b265a75be750472561df9ff321dd0b2102bd64ca19451d312799f501edc597ba")
+ version("5.6.5", sha256="600874e7c5cdb11d20d6bd6c549b04a3c5beb230d755829726cd15fab99073b1")
+ version("5.6.4", sha256="52f041ab2eaa4bf7c6087a7246c3d5f90fbab0b0622b57c018b65f60bf677fad")
+ version("5.6.3", sha256="72000835497f6337c3c6a13c6d39a51fa6a5f3a1ccd34214f2d92f7d47cc6b6c")
+ version("5.6.2", sha256="7d7c262714268b92dbe370a9ae72275cc07f0cdbed400afd9989c366fed04c00")
version("5.6.1", sha256="9afc48ab0fb3ba69611b1edc1b682a185d49b45caf197323eecd1146d705370c")
version("5.6.0", sha256="cda0d32d29f94220be9b6627a80386eb33fac2dcc25c8104569eaa4ea3563009")
version("5.5.5", sha256="0710caae527082e73d3bf8f9d1dffe95808afd3fcaaaa15ab0b937b8b226bc1f")
@@ -54,7 +68,16 @@ class Xrootd(CMakePackage):
version("4.4.0", sha256="f066e7488390c0bc50938d23f6582fb154466204209ca92681f0aa06340e77c8")
version("4.3.0", sha256="d34865772d975b5d58ad80bb05312bf49aaf124d5431e54dc8618c05a0870e3c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("davix", default=True, description="Build with Davix")
+ variant(
+ "ec",
+ default=True,
+ description="Build with erasure coding component support",
+ when="@5.7.0:",
+ )
variant("http", default=True, description="Build with HTTP support")
variant("krb5", default=False, description="Build with KRB5 support")
variant("python", default=False, description="Build pyxroot Python extension")
@@ -84,7 +107,16 @@ class Xrootd(CMakePackage):
values=("98", "11", "14", "17", "20"),
multi=False,
description="Use the specified C++ standard when building",
- when="@5.2.0:",
+ when="@5.2.0:5.6.99",
+ )
+
+ variant(
+ "cxxstd",
+ default="17",
+ values=("98", "11", "14", "17", "20"),
+ multi=False,
+ description="Use the specified C++ standard when building",
+ when="@5.7.0:",
)
variant(
@@ -112,6 +144,8 @@ class Xrootd(CMakePackage):
conflicts("^cmake@:3.0", when="@5.0.0")
conflicts("^cmake@:3.15.99", when="@5.5.4:5.5")
depends_on("davix", when="+davix")
+ depends_on("isa-l", when="+ec")
+ depends_on("pkgconfig", type="build", when="+davix")
depends_on("libxml2", when="+http")
depends_on("uuid", when="@4.11.0:")
depends_on("openssl@:1", when="@:5.4")
@@ -193,6 +227,7 @@ class Xrootd(CMakePackage):
define_from_variant("ENABLE_READLINE", "readline"),
define_from_variant("ENABLE_KRB5", "krb5"),
define_from_variant("ENABLE_SCITOKENS", "scitokens-cpp"),
+ define_from_variant("ENABLE_XRDEC", "ec"),
define_from_variant("XRDCL_ONLY", "client_only"),
define("ENABLE_CEPH", False),
define("ENABLE_CRYPTO", True),
@@ -200,15 +235,11 @@ class Xrootd(CMakePackage):
define("ENABLE_MACAROONS", False),
define("ENABLE_VOMS", False),
define("FORCE_ENABLED", True),
+ define("USE_SYSTEM_ISAL", True),
]
# see https://github.com/spack/spack/pull/11581
if "+python" in self.spec:
- options.extend(
- [
- define("PYTHON_EXECUTABLE", spec["python"].command.path),
- define("XRD_PYTHON_REQ_VERSION", spec["python"].version.up_to(2)),
- ]
- )
+ options.append(define("XRD_PYTHON_REQ_VERSION", spec["python"].version.up_to(2)))
if "+scitokens-cpp" in self.spec:
options.append("-DSCITOKENS_CPP_DIR=%s" % spec["scitokens-cpp"].prefix)
diff --git a/var/spack/repos/builtin/packages/xrx/package.py b/var/spack/repos/builtin/packages/xrx/package.py
index b354252f5c..bb4f3d9f22 100644
--- a/var/spack/repos/builtin/packages/xrx/package.py
+++ b/var/spack/repos/builtin/packages/xrx/package.py
@@ -14,11 +14,13 @@ class Xrx(AutotoolsPackage, XorgPackage):
browser must identify specific instances of the services in the request
to invoke the application."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xrx"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xrx"
xorg_mirror_path = "app/xrx-1.0.4.tar.gz"
version("1.0.4", sha256="1ffa1c2af28587c6ed7ded3af2e62e93bad8f9900423d09c45b1d59449d15134")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxt")
depends_on("libxext")
@@ -27,6 +29,6 @@ class Xrx(AutotoolsPackage, XorgPackage):
depends_on("libxaw")
depends_on("xtrans")
- depends_on("xproxymanagementprotocol")
+ depends_on("xproxymanagementprotocol", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xsbench/package.py b/var/spack/repos/builtin/packages/xsbench/package.py
index 5525b5be47..f92a0c4fb6 100644
--- a/var/spack/repos/builtin/packages/xsbench/package.py
+++ b/var/spack/repos/builtin/packages/xsbench/package.py
@@ -24,6 +24,9 @@ class Xsbench(MakefilePackage, CudaPackage):
version("14", sha256="595afbcba8c1079067d5d17eedcb4ab0c1d115f83fd6f8c3de01d74b23015e2d")
version("13", sha256="b503ea468d3720a0369304924477b758b3d128c8074776233fa5d567b7ffcaa2")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=True, description="Build with MPI support")
variant("openmp", default=True, description="Build with OpenMP support")
variant("cuda", default=False, when="@19:", description="Build with CUDA support")
diff --git a/var/spack/repos/builtin/packages/xscope/package.py b/var/spack/repos/builtin/packages/xscope/package.py
index 43b8a3aa4d..9bb0cf44bf 100644
--- a/var/spack/repos/builtin/packages/xscope/package.py
+++ b/var/spack/repos/builtin/packages/xscope/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xscope(AutotoolsPackage, XorgPackage):
"""XSCOPE -- a program to monitor X11/Client conversations."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xscope"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xscope"
xorg_mirror_path = "app/xscope-1.4.1.tar.gz"
license("MIT")
@@ -18,7 +18,9 @@ class Xscope(AutotoolsPackage, XorgPackage):
version("1.4.2", sha256="e12d634a69ce1ec36b0afd1d40814215e262801a030ddf83d7d0348cd046b381")
version("1.4.1", sha256="f99558a64e828cd2c352091ed362ad2ef42b1c55ef5c01cbf782be9735bb6de3")
- depends_on("xproto@7.0.17:")
+ depends_on("c", type="build")
+
+ depends_on("xproto@7.0.17:", type="build")
depends_on("xtrans")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xsd/package.py b/var/spack/repos/builtin/packages/xsd/package.py
index 44fa3fc14b..d820ef58fc 100644
--- a/var/spack/repos/builtin/packages/xsd/package.py
+++ b/var/spack/repos/builtin/packages/xsd/package.py
@@ -18,6 +18,9 @@ class Xsd(MakefilePackage):
version("4.0.0", sha256="eca52a9c8f52cdbe2ae4e364e4a909503493a0d51ea388fc6c9734565a859817")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("xerces-c")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/xsdk-examples/package.py b/var/spack/repos/builtin/packages/xsdk-examples/package.py
index 4978f57049..4cdb496b97 100644
--- a/var/spack/repos/builtin/packages/xsdk-examples/package.py
+++ b/var/spack/repos/builtin/packages/xsdk-examples/package.py
@@ -10,20 +10,21 @@ from spack.package import *
class XsdkExamples(CMakePackage, CudaPackage, ROCmPackage):
"""xSDK Examples show usage of libraries in the xSDK package."""
- homepage = "http://xsdk.info"
+ homepage = "https://xsdk.info"
url = "https://github.com/xsdk-project/xsdk-examples/archive/v0.1.0.tar.gz"
git = "https://github.com/xsdk-project/xsdk-examples"
maintainers("balay", "luszczek", "balos1", "shuds13", "v-dobrev")
- version("develop", branch="master")
- version("0.4.0", sha256="de54e02e0222420976a2f4cf0a6230e4bb625b443c66500fa1441032db206df9")
version(
- "0.3.0",
- sha256="e7444a403c0a69eeeb34a4068be4d6f4e5b54cbfd275629019b9236a538a739e",
+ "0.4.0",
+ sha256="de54e02e0222420976a2f4cf0a6230e4bb625b443c66500fa1441032db206df9",
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("xsdk+cuda", when="+cuda")
depends_on("xsdk~cuda", when="~cuda")
for sm_ in CudaPackage.cuda_arch_values:
@@ -35,7 +36,6 @@ class XsdkExamples(CMakePackage, CudaPackage, ROCmPackage):
"xsdk+rocm amdgpu_target={0}".format(ac_), when="+rocm amdgpu_target={0}".format(ac_)
)
- depends_on("xsdk@develop", when="@develop")
# Use ^dealii~hdf5 because of HDF5 linking issue in deal.II 9.4.0.
# Disable 'arborx' to remove the 'kokkos' dependency which conflicts with
# the internal Kokkos used by 'trilinos':
@@ -48,11 +48,6 @@ class XsdkExamples(CMakePackage, CudaPackage, ROCmPackage):
depends_on("mfem+hiop", when="^xsdk+hiop")
depends_on("sundials+magma", when="+cuda")
- with when("@0.3.0"):
- depends_on("xsdk@0.7.0")
- depends_on("mfem+strumpack", when="^xsdk+strumpack")
- depends_on("sundials+magma", when="+cuda")
-
depends_on("mpi")
depends_on("cmake@3.21:", type="build", when="@0.3.0:")
@@ -106,5 +101,5 @@ class XsdkExamples(CMakePackage, CudaPackage, ROCmPackage):
return args
def check(self):
- with working_dir(self.builder.build_directory):
+ with working_dir(self.build_directory):
ctest("--output-on-failure")
diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py
index cf4990a99c..832d9537c6 100644
--- a/var/spack/repos/builtin/packages/xsdk/package.py
+++ b/var/spack/repos/builtin/packages/xsdk/package.py
@@ -84,18 +84,18 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
homepage = "https://xsdk.info"
maintainers("balay", "luszczek", "balos1", "shuds13", "v-dobrev")
- version("develop")
+ version("1.1.0")
version("1.0.0")
- version("0.8.0")
- version("0.7.0", deprecated=True)
+ version("0.8.0", deprecated=True)
variant("sycl", default=False, sticky=True, description="Enable sycl variant of xsdk packages")
variant("trilinos", default=True, sticky=True, description="Enable trilinos package build")
variant("datatransferkit", default=True, description="Enable datatransferkit package build")
+ variant("amrex", default=True, description="Enable amrex package build")
variant("omega-h", default=True, description="Enable omega-h package build")
variant("strumpack", default=True, description="Enable strumpack package build")
variant("dealii", default=True, description="Enable dealii package build")
- variant("alquimia", default=True, description="Enable alquimia package build")
+ variant("alquimia", default=True, when="@:1.0.0", description="Enable alquimia package build")
variant("phist", default=True, description="Enable phist package build")
variant("ginkgo", default=True, description="Enable ginkgo package build")
variant("libensemble", default=True, description="Enable py-libensemble package build")
@@ -106,23 +106,22 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
variant("heffte", default=True, description="Enable heffte package build")
variant("slate", default=(sys.platform != "darwin"), description="Enable slate package build")
variant("arborx", default=True, description="Enable ArborX build")
- variant("exago", default=True, description="Enable exago build")
+ variant("exago", default=True, when="@:1.0.0", description="Enable exago build")
variant("hiop", default=True, description="Enable hiop build")
variant("raja", default=(sys.platform != "darwin"), description="Enable raja for hiop, exago")
- variant("pflotran", default=True, description="Enable pflotran package build")
+ variant("pflotran", default=True, when="@:1.0.0", description="Enable pflotran package build")
xsdk_depends_on(
- "hypre@develop+superlu-dist+shared", when="@develop", cuda_var="cuda", rocm_var="rocm"
+ "hypre@2.32.0+superlu-dist+shared", when="@1.1.0", cuda_var="cuda", rocm_var="rocm"
)
xsdk_depends_on(
"hypre@2.30.0+superlu-dist+shared", when="@1.0.0", cuda_var="cuda", rocm_var="rocm"
)
xsdk_depends_on("hypre@2.26.0+superlu-dist+shared", when="@0.8.0", cuda_var="cuda")
- xsdk_depends_on("hypre@2.23.0+superlu-dist+shared", when="@0.7.0", cuda_var="cuda")
xsdk_depends_on(
- "mfem@develop+shared+mpi+superlu-dist+petsc+sundials+examples+miniapps",
- when="@develop",
+ "mfem@4.7.0+shared+mpi+superlu-dist+petsc+sundials+examples+miniapps",
+ when="@1.1.0",
cuda_var="cuda",
rocm_var="rocm",
)
@@ -138,25 +137,18 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
cuda_var="cuda",
rocm_var="rocm",
)
- xsdk_depends_on(
- "mfem@4.3.0+mpi+superlu-dist+petsc+sundials+examples+miniapps",
- when="@0.7.0",
- cuda_var="cuda",
- rocm_var="rocm",
- )
- xsdk_depends_on("superlu-dist@develop", when="@develop", cuda_var="cuda", rocm_var="rocm")
+ xsdk_depends_on("superlu-dist@9.1.0", when="@1.1.0", cuda_var="cuda", rocm_var="rocm")
xsdk_depends_on("superlu-dist@8.2.1", when="@1.0.0", cuda_var="cuda", rocm_var="rocm")
xsdk_depends_on("superlu-dist@8.1.2", when="@0.8.0")
- xsdk_depends_on("superlu-dist@7.1.1", when="@0.7.0")
xsdk_depends_on("trilinos +superlu-dist", when="@1.0.0: +trilinos ~cuda ~rocm")
xsdk_depends_on(
- "trilinos@develop+hypre+hdf5~mumps+boost"
+ "trilinos@16.0.0+hypre+hdf5~mumps+boost"
+ "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2"
+ "~exodus~dtk+intrepid2+shards+stratimikos gotype=int"
- + " cxxstd=14",
- when="@develop +trilinos",
+ + " cxxstd=17",
+ when="@1.1.0 +trilinos",
)
xsdk_depends_on(
"trilinos@14.4.0+hypre+hdf5~mumps+boost"
@@ -172,25 +164,17 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
+ " cxxstd=14",
when="@0.8.0 +trilinos",
)
- xsdk_depends_on(
- "trilinos@13.2.0+hypre+superlu-dist+hdf5~mumps+boost"
- + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2"
- + "~exodus~dtk+intrepid2+shards+stratimikos gotype=int"
- + " cxxstd=14",
- when="@0.7.0 +trilinos",
- )
- xsdk_depends_on("datatransferkit@master", when="@develop +trilinos +datatransferkit")
+ xsdk_depends_on("datatransferkit@3.1.1", when="@1.1.0 +trilinos +datatransferkit")
xsdk_depends_on("datatransferkit@3.1.1", when="@1.0.0 +trilinos +datatransferkit")
dtk7ver = "3.1-rc2" if sys.platform == "darwin" else "3.1-rc3"
xsdk_depends_on("datatransferkit@" + dtk7ver, when="@0.8.0 +trilinos +datatransferkit")
- xsdk_depends_on("datatransferkit@" + dtk7ver, when="@0.7.0 +trilinos +datatransferkit")
- xsdk_depends_on("petsc +batch", when="@0.7.0: ^cray-mpich")
+ xsdk_depends_on("petsc +batch", when="^cray-mpich")
xsdk_depends_on("petsc +sycl +kokkos", when="@1.0.0: +sycl")
xsdk_depends_on(
- "petsc@main+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64",
- when="@develop",
+ "petsc@3.22.1+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64",
+ when="@1.1.0",
cuda_var="cuda",
rocm_var="rocm",
)
@@ -206,51 +190,40 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
cuda_var="cuda",
rocm_var="rocm",
)
- xsdk_depends_on(
- "petsc@3.16.1+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64",
- when="@0.7.0",
- cuda_var="cuda",
- )
xsdk_depends_on("dealii +trilinos~adol-c", when="+trilinos +dealii")
xsdk_depends_on("dealii ~trilinos", when="~trilinos +dealii")
xsdk_depends_on(
- "dealii@master~assimp~python~doc~gmsh+petsc+slepc+mpi~int64"
- + "~netcdf+metis+sundials~ginkgo~symengine~nanoflann~simplex~arborx~cgal~oce",
- when="@develop +dealii",
+ "dealii@9.6.0~assimp~python~doc~gmsh+petsc+slepc+mpi~int64"
+ + "~netcdf+metis~sundials~ginkgo~symengine~simplex~arborx~cgal~oce"
+ + "~opencascade~vtk~taskflow",
+ when="@1.1.0 +dealii",
)
xsdk_depends_on(
"dealii@9.5.1~assimp~python~doc~gmsh+petsc+slepc+mpi~int64"
- + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal~oce",
+ + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal~oce"
+ + "~opencascade",
when="@1.0.0 +dealii",
)
xsdk_depends_on(
"dealii@9.4.0~assimp~python~doc~gmsh+petsc+slepc+mpi~int64"
- + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal",
+ + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal~oce"
+ + "~opencascade",
when="@0.8.0 +dealii",
)
- xsdk_depends_on(
- "dealii@9.3.2~assimp~python~doc~gmsh+petsc+slepc+mpi~int64+hdf5"
- + "~netcdf+metis~sundials~ginkgo~symengine~simplex~arborx",
- when="@0.7.0 +dealii",
- )
- xsdk_depends_on("pflotran@develop", when="@develop +pflotran")
xsdk_depends_on("pflotran@5.0.0", when="@1.0.0 +pflotran")
xsdk_depends_on("pflotran@4.0.1", when="@0.8.0 +pflotran")
- xsdk_depends_on("pflotran@3.0.2", when="@0.7.0 +pflotran")
- xsdk_depends_on("alquimia@master", when="@develop +alquimia")
xsdk_depends_on("alquimia@1.1.0", when="@1.0.0 +alquimia")
xsdk_depends_on("alquimia@1.0.10", when="@0.8.0 +alquimia")
- xsdk_depends_on("alquimia@1.0.9", when="@0.7.0 +alquimia")
- xsdk_depends_on("sundials +trilinos", when="+trilinos @0.7.0:")
+ xsdk_depends_on("sundials +trilinos", when="+trilinos")
xsdk_depends_on("sundials +ginkgo", when="+ginkgo @0.8.0:")
xsdk_depends_on("sundials +sycl cxxstd=17", when="@1.0.0: +sycl")
xsdk_depends_on(
- "sundials@develop~int64+hypre+petsc+superlu-dist",
- when="@develop",
+ "sundials@7.1.1~int64+hypre+petsc+superlu-dist",
+ when="@1.1.0",
cuda_var=["cuda", "?magma"],
rocm_var=["rocm", "?magma"],
)
@@ -266,73 +239,43 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
cuda_var=["cuda", "?magma"],
rocm_var=["rocm", "?magma"],
)
- xsdk_depends_on(
- "sundials@5.8.0~int64+hypre+petsc+superlu-dist",
- when="@0.7.0",
- cuda_var="cuda",
- rocm_var="rocm",
- )
- xsdk_depends_on("plasma@develop:", when="@develop %gcc@6.0:")
+ xsdk_depends_on("plasma@24.8.7", when="@1.1.0 %gcc@6.0:")
xsdk_depends_on("plasma@23.8.2:", when="@1.0.0 %gcc@6.0:")
xsdk_depends_on("plasma@22.9.29:", when="@0.8.0 %gcc@6.0:")
- xsdk_depends_on("plasma@21.8.29:", when="@0.7.0 %gcc@6.0:")
- xsdk_depends_on("magma@master", when="@develop", cuda_var="?cuda", rocm_var="?rocm")
+ xsdk_depends_on("magma@2.8.0", when="@1.1.0", cuda_var="?cuda", rocm_var="?rocm")
xsdk_depends_on("magma@2.7.1", when="@1.0.0", cuda_var="?cuda", rocm_var="?rocm")
xsdk_depends_on("magma@2.7.0", when="@0.8.0", cuda_var="?cuda", rocm_var="?rocm")
- xsdk_depends_on("magma@2.6.1", when="@0.7.0", cuda_var="?cuda", rocm_var="?rocm")
xsdk_depends_on("amrex +sycl", when="@1.0.0: +sycl")
- xsdk_depends_on(
- "amrex@develop+sundials", when="@develop %intel", cuda_var="cuda", rocm_var="rocm"
- )
- xsdk_depends_on(
- "amrex@develop+sundials", when="@develop %gcc", cuda_var="cuda", rocm_var="rocm"
- )
- xsdk_depends_on(
- "amrex@develop+sundials", when="@develop %cce", cuda_var="cuda", rocm_var="rocm"
- )
- xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %intel", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %gcc", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %cce", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %intel", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %gcc", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %cce", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@21.10+sundials", when="@0.7.0 %intel", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@21.10+sundials", when="@0.7.0 %gcc", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("amrex@21.10+sundials", when="@0.7.0 %cce", cuda_var="cuda", rocm_var="rocm")
-
- xsdk_depends_on("slepc@main", when="@develop")
+ xsdk_depends_on("amrex@24.10+sundials", when="@1.1.0 +amrex", cuda_var="cuda", rocm_var="rocm")
+ xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 +amrex", cuda_var="cuda", rocm_var="rocm")
+ xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 +amrex", cuda_var="cuda", rocm_var="rocm")
+
+ xsdk_depends_on("slepc@3.22.1", when="@1.1.0", cuda_var="cuda", rocm_var="rocm")
xsdk_depends_on("slepc@3.20.0", when="@1.0.0", cuda_var="cuda", rocm_var="rocm")
xsdk_depends_on("slepc@3.18.1", when="@0.8.0", cuda_var="cuda", rocm_var="rocm")
- xsdk_depends_on("slepc@3.16.0", when="@0.7.0")
xsdk_depends_on("omega-h +trilinos", when="+trilinos +omega-h")
xsdk_depends_on("omega-h ~trilinos", when="~trilinos +omega-h")
- xsdk_depends_on("omega-h@main", when="@develop +omega-h")
- xsdk_depends_on("omega-h@scorec.10.6.0", when="@1.0.0 +omega-h")
+ xsdk_depends_on("omega-h@10.8.6", when="@1.1.0 +omega-h")
+ xsdk_depends_on("omega-h@10.6.0", when="@1.0.0 +omega-h")
xsdk_depends_on("omega-h@9.34.13", when="@0.8.0 +omega-h")
- xsdk_depends_on("omega-h@9.34.1", when="@0.7.0 +omega-h")
- xsdk_depends_on("strumpack ~cuda", when="~cuda @0.7.0: +strumpack")
+ xsdk_depends_on("strumpack ~cuda", when="~cuda +strumpack")
xsdk_depends_on("strumpack ~slate~openmp", when="~slate @0.8.0: +strumpack")
- xsdk_depends_on("strumpack@master", when="@develop +strumpack", cuda_var=["cuda"])
+ xsdk_depends_on("strumpack@8.0.0", when="@1.1.0 +strumpack", cuda_var=["cuda"])
xsdk_depends_on("strumpack@7.2.0", when="@1.0.0 +strumpack", cuda_var=["cuda"])
xsdk_depends_on("strumpack@7.0.1", when="@0.8.0 +strumpack", cuda_var=["cuda"])
- xsdk_depends_on("strumpack@6.1.0~slate~openmp", when="@0.7.0 +strumpack")
- xsdk_depends_on("pumi@master+shared", when="@develop")
+ xsdk_depends_on("pumi@2.2.9+shared", when="@1.1.0")
xsdk_depends_on("pumi@2.2.8+shared", when="@1.0.0")
xsdk_depends_on("pumi@2.2.7+shared", when="@0.8.0")
- xsdk_depends_on("pumi@2.2.6", when="@0.7.0")
tasmanian_openmp = "~openmp" if sys.platform == "darwin" else "+openmp"
xsdk_depends_on(
- "tasmanian@develop+blas" + tasmanian_openmp,
- when="@develop",
- cuda_var=["cuda", "?magma"],
- rocm_var=["rocm", "?magma"],
+ "tasmanian@8.1+mpi+blas" + tasmanian_openmp, when="@1.1.0", cuda_var=["cuda", "?magma"]
)
xsdk_depends_on(
"tasmanian@8.0+mpi+blas" + tasmanian_openmp, when="@1.0.0", cuda_var=["cuda", "?magma"]
@@ -342,17 +285,11 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
when="@0.8.0",
cuda_var=["cuda", "?magma"],
)
- xsdk_depends_on(
- "tasmanian@7.7+xsdkflags+mpi+blas" + tasmanian_openmp,
- when="@0.7.0",
- cuda_var=["cuda", "?magma"],
- )
- xsdk_depends_on("arborx@master", when="@develop +arborx")
xsdk_depends_on("arborx+sycl", when="@1.0.0: +arborx +sycl")
+ xsdk_depends_on("arborx@1.7", when="@1.1.0 +arborx")
xsdk_depends_on("arborx@1.4.1", when="@1.0.0 +arborx")
xsdk_depends_on("arborx@1.2", when="@0.8.0 +arborx")
- xsdk_depends_on("arborx@1.1", when="@0.7.0 +arborx")
# the Fortran 2003 bindings of phist require python@3:, but this
# creates a conflict with other packages like petsc@main. Actually
@@ -362,14 +299,13 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
xsdk_depends_on("phist kernel_lib=tpetra", when="+trilinos +phist")
xsdk_depends_on("phist kernel_lib=petsc", when="~trilinos +phist")
- xsdk_depends_on("phist@develop ~fortran ~scamac ~openmp ~host ~int64", when="@develop +phist")
+ xsdk_depends_on("phist@1.12.1 ~fortran ~scamac ~openmp ~host ~int64", when="@1.1.0 +phist")
xsdk_depends_on("phist@1.12.0 ~fortran ~scamac ~openmp ~host ~int64", when="@1.0.0 +phist")
xsdk_depends_on("phist@1.11.2 ~fortran ~scamac ~openmp ~host ~int64", when="@0.8.0 +phist")
- xsdk_depends_on("phist@1.9.5 ~fortran ~scamac ~openmp ~host ~int64", when="@0.7.0 +phist")
xsdk_depends_on("ginkgo+sycl", when="@1.0.0: +ginkgo +sycl")
xsdk_depends_on(
- "ginkgo@develop +mpi ~openmp", when="@develop +ginkgo", cuda_var="cuda", rocm_var="rocm"
+ "ginkgo@1.8.0 +mpi ~openmp", when="@1.1.0 +ginkgo", cuda_var="cuda", rocm_var="rocm"
)
xsdk_depends_on(
"ginkgo@1.7.0 +mpi ~openmp", when="@1.0.0 +ginkgo", cuda_var="cuda", rocm_var="rocm"
@@ -377,70 +313,55 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage):
xsdk_depends_on(
"ginkgo@1.5.0 +mpi ~openmp", when="@0.8.0 +ginkgo", cuda_var="cuda", rocm_var="rocm"
)
- xsdk_depends_on(
- "ginkgo@1.4.0 ~openmp", when="@0.7.0 +ginkgo", cuda_var="cuda", rocm_var="rocm"
- )
- xsdk_depends_on("py-libensemble@develop+petsc4py", when="@develop +libensemble")
- xsdk_depends_on("py-petsc4py@main", when="@develop +libensemble")
+ xsdk_depends_on("py-libensemble@1.4.2+petsc4py", when="@1.1.0 +libensemble")
+ xsdk_depends_on("py-petsc4py@3.22.1", when="@1.1.0 +libensemble")
xsdk_depends_on("py-libensemble@1.0.0+petsc4py", when="@1.0.0 +libensemble")
xsdk_depends_on("py-petsc4py@3.20.1", when="@1.0.0 +libensemble")
xsdk_depends_on("py-libensemble@0.9.3+petsc4py", when="@0.8.0 +libensemble")
xsdk_depends_on("py-petsc4py@3.18.1", when="@0.8.0 +libensemble")
- xsdk_depends_on("py-libensemble@0.8.0+petsc4py", when="@0.7.0 +libensemble")
- xsdk_depends_on("py-petsc4py@3.16.1", when="@0.7.0 +libensemble")
xsdk_depends_on("precice ~petsc", when="+precice ^cray-mpich")
- xsdk_depends_on("precice@develop", when="@develop +precice")
+ xsdk_depends_on("precice@3.1.2", when="@1.1.0 +precice")
xsdk_depends_on("precice@2.5.0", when="@1.0.0 +precice")
xsdk_depends_on("precice@2.5.0", when="@0.8.0 +precice")
- xsdk_depends_on("precice@2.3.0", when="@0.7.0 +precice")
bfpk_openmp = "~openmp" if sys.platform == "darwin" else "+openmp"
- xsdk_depends_on("butterflypack@master", when="@develop +butterflypack")
+ xsdk_depends_on("butterflypack@3.2.0" + bfpk_openmp, when="@1.1.0 +butterflypack")
xsdk_depends_on("butterflypack@2.4.0" + bfpk_openmp, when="@1.0.0 +butterflypack")
xsdk_depends_on("butterflypack@2.2.2" + bfpk_openmp, when="@0.8.0 +butterflypack")
- xsdk_depends_on("butterflypack@2.0.0", when="@0.7.0 +butterflypack")
+ xsdk_depends_on("heffte+fftw", when="+heffte ~rocm")
xsdk_depends_on(
- "heffte@develop+fftw",
- when="@develop +heffte",
+ "heffte@2.4.1",
+ when="@1.1.0 +heffte",
cuda_var=["cuda", "?magma"],
rocm_var=["rocm", "?magma"],
)
xsdk_depends_on(
- "heffte@2.4.0+fftw",
+ "heffte@2.4.0",
when="@1.0.0 +heffte",
cuda_var=["cuda", "?magma"],
rocm_var=["rocm", "?magma"],
)
xsdk_depends_on(
- "heffte@2.3.0+fftw",
+ "heffte@2.3.0",
when="@0.8.0 +heffte",
cuda_var=["cuda", "?magma"],
rocm_var=["rocm", "?magma"],
)
- xsdk_depends_on(
- "heffte@2.2.0+fftw",
- when="@0.7.0 +heffte",
- cuda_var=["cuda", "?magma"],
- rocm_var=["rocm", "?magma"],
- )
- xsdk_depends_on("slate@master", when="@develop +slate", cuda_var="cuda")
+ xsdk_depends_on("slate@2024.10.29", when="@1.1.0 +slate", cuda_var="cuda")
xsdk_depends_on("slate@2023.08.25", when="@1.0.0 +slate", cuda_var="cuda")
xsdk_depends_on("slate@2022.07.00", when="@0.8.0 +slate", cuda_var="cuda")
- xsdk_depends_on("slate@2021.05.02", when="@0.7.0 +slate %gcc@6.0:", cuda_var="cuda")
- xsdk_depends_on("exago@develop~ipopt~hiop~python", when="@develop +exago ~raja")
- xsdk_depends_on("exago@develop~ipopt+hiop+raja", when="@develop +exago +raja", cuda_var="cuda")
xsdk_depends_on("exago@1.6.0~ipopt~hiop~python", when="@1.0.0 +exago ~raja")
xsdk_depends_on("exago@1.6.0~ipopt+hiop+raja", when="@1.0.0 +exago +raja", cuda_var="cuda")
xsdk_depends_on("exago@1.5.0~ipopt~hiop~python", when="@0.8.0 +exago ~raja")
xsdk_depends_on("exago@1.5.0~ipopt+hiop+raja", when="@0.8.0 +exago +raja", cuda_var="cuda")
- xsdk_depends_on("hiop@develop", when="@develop +hiop ~raja")
- xsdk_depends_on("hiop@develop+raja", when="@develop +hiop +raja", cuda_var="cuda")
+ xsdk_depends_on("hiop@1.1.0", when="@1.1.0 +hiop ~raja")
+ xsdk_depends_on("hiop@1.1.0+raja", when="@1.1.0 +hiop +raja", cuda_var="cuda")
xsdk_depends_on("hiop@1.0.0", when="@1.0.0 +hiop ~raja")
xsdk_depends_on("hiop@1.0.0+raja", when="@1.0.0 +hiop +raja", cuda_var="cuda")
xsdk_depends_on("hiop@0.7.1", when="@0.8.0 +hiop ~raja")
diff --git a/var/spack/repos/builtin/packages/xset/package.py b/var/spack/repos/builtin/packages/xset/package.py
index 8727bbdb43..c47e76d570 100644
--- a/var/spack/repos/builtin/packages/xset/package.py
+++ b/var/spack/repos/builtin/packages/xset/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xset(AutotoolsPackage, XorgPackage):
"""User preference utility for X."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xset"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xset"
xorg_mirror_path = "app/xset-1.2.3.tar.gz"
license("MIT")
@@ -18,9 +18,11 @@ class Xset(AutotoolsPackage, XorgPackage):
version("1.2.4", sha256="3a05e8626298c7a79002ec5fb4949dcba8abc7a2b95c03ed5e0f5698c3b4dea0")
version("1.2.3", sha256="5ecb2bb2cbf3c9349b735080b155a08c97b314dacedfc558c7f5a611ee1297f7")
+ depends_on("c", type="build")
+
depends_on("libxmu")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xsetmode/package.py b/var/spack/repos/builtin/packages/xsetmode/package.py
index bc47707078..0b9012cdb9 100644
--- a/var/spack/repos/builtin/packages/xsetmode/package.py
+++ b/var/spack/repos/builtin/packages/xsetmode/package.py
@@ -9,11 +9,13 @@ from spack.package import *
class Xsetmode(AutotoolsPackage, XorgPackage):
"""Set the mode for an X Input device."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xsetmode"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xsetmode"
xorg_mirror_path = "app/xsetmode-1.0.0.tar.gz"
version("1.0.0", sha256="9ee0d6cf72dfaacb997f9570779dcbc42f5395ae102180cb19382860b4b02ef3")
+ depends_on("c", type="build") # generated
+
depends_on("libxi")
depends_on("libx11")
diff --git a/var/spack/repos/builtin/packages/xsetpointer/package.py b/var/spack/repos/builtin/packages/xsetpointer/package.py
index 0a77e1f844..6205461c5f 100644
--- a/var/spack/repos/builtin/packages/xsetpointer/package.py
+++ b/var/spack/repos/builtin/packages/xsetpointer/package.py
@@ -9,14 +9,16 @@ from spack.package import *
class Xsetpointer(AutotoolsPackage, XorgPackage):
"""Set an X Input device as the main pointer."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xsetpointer"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xsetpointer"
xorg_mirror_path = "app/xsetpointer-1.0.1.tar.gz"
version("1.0.1", sha256="54be93b20fd6f1deac67246d6e214a60b02dcfbf05295e43751f7a04edb986ac")
+ depends_on("c", type="build")
+
depends_on("libxi", type="link")
depends_on("libx11", type="link")
- depends_on("inputproto@1.4:")
+ depends_on("inputproto@1.4:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xsetroot/package.py b/var/spack/repos/builtin/packages/xsetroot/package.py
index 4c701d31dd..9427a96bc4 100644
--- a/var/spack/repos/builtin/packages/xsetroot/package.py
+++ b/var/spack/repos/builtin/packages/xsetroot/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xsetroot(AutotoolsPackage, XorgPackage):
"""xsetroot - root window parameter setting utility for X."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xsetroot"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xsetroot"
xorg_mirror_path = "app/xsetroot-1.1.1.tar.gz"
license("MIT")
@@ -18,11 +18,13 @@ class Xsetroot(AutotoolsPackage, XorgPackage):
version("1.1.2", sha256="9d007f5119be09924ac3a5d2bd506f32e6c164b82633c88d2aff26311e1a2a2b")
version("1.1.1", sha256="6cdd48757d18835251124138b4a8e4008c3bbc51cf92533aa39c6ed03277168b")
+ depends_on("c", type="build")
+
depends_on("libxmu")
depends_on("libx11")
depends_on("libxcursor")
depends_on("xbitmaps")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xsimd/package.py b/var/spack/repos/builtin/packages/xsimd/package.py
index b17899e084..0086812647 100644
--- a/var/spack/repos/builtin/packages/xsimd/package.py
+++ b/var/spack/repos/builtin/packages/xsimd/package.py
@@ -33,13 +33,14 @@ class Xsimd(CMakePackage):
version("4.0.0", sha256="67b818601c15ef15ea4d611a8cd7382588c340ebd9146c799a0210d212540455")
version("3.1.0", sha256="d56288826f6b82fd9583f83ace6aa2306ba2ae82cec003de1d04ce17fbb1e91f")
+ depends_on("cxx", type="build") # generated
+
depends_on("googletest", type="test")
# C++14 support
conflicts("%gcc@:4.8")
conflicts("%clang@:3.6")
# untested: conflicts('%intel@:15')
- # untested: conflicts('%pgi@:14')
def cmake_args(self):
args = [self.define("BUILD_TESTS", self.run_tests)]
diff --git a/var/spack/repos/builtin/packages/xsm/package.py b/var/spack/repos/builtin/packages/xsm/package.py
index 5104bb886f..f14a71f49c 100644
--- a/var/spack/repos/builtin/packages/xsm/package.py
+++ b/var/spack/repos/builtin/packages/xsm/package.py
@@ -9,13 +9,15 @@ from spack.package import *
class Xsm(AutotoolsPackage, XorgPackage):
"""X Session Manager."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xsm"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xsm"
xorg_mirror_path = "app/xsm-1.0.3.tar.gz"
version("1.0.5", sha256="e8a2f64b5a37be39a81877cd4069745a226a31493080f03ae74b76fb3f17b7a6")
version("1.0.4", sha256="d12fb0071719de5845d41602963988e4b889f482427c13ce8e515f5ca51c0564")
version("1.0.3", sha256="f70815139d62416dbec5915ec37db66f325932a69f6350bb1a74c0940cdc796a")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxt@1.1.0:")
depends_on("libice")
diff --git a/var/spack/repos/builtin/packages/xstdcmap/package.py b/var/spack/repos/builtin/packages/xstdcmap/package.py
index bf4d21b0ed..88b23d029f 100644
--- a/var/spack/repos/builtin/packages/xstdcmap/package.py
+++ b/var/spack/repos/builtin/packages/xstdcmap/package.py
@@ -12,16 +12,18 @@ class Xstdcmap(AutotoolsPackage, XorgPackage):
create standard colormap definitions in order to facilitate sharing of
scarce colormap resources among clients using PseudoColor visuals."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xstdcmap"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xstdcmap"
xorg_mirror_path = "app/xstdcmap-1.0.3.tar.gz"
version("1.0.5", sha256="70bd5909d6f1b4d9b038593f72ce70b0095a6f773e1dd8059136bbeb021b8771")
version("1.0.4", sha256="7b1a23ba7ac623803101b6f9df37889fb1ef2f1bb53da25a415c8a88eebc8073")
version("1.0.3", sha256="b97aaa883a9eedf9c3056ea1a7e818e3d93b63aa1f54193ef481d392bdef5711")
+ depends_on("c", type="build")
+
depends_on("libxmu")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xtb/package.py b/var/spack/repos/builtin/packages/xtb/package.py
index b8bab6d0d1..6dfc4ed965 100644
--- a/var/spack/repos/builtin/packages/xtb/package.py
+++ b/var/spack/repos/builtin/packages/xtb/package.py
@@ -20,6 +20,9 @@ class Xtb(MesonPackage):
version("6.5.1", sha256="0922205cc224fe79e28f3d75be4e10c03efa8f3f666aedec8346fed82b272cad")
version("6.5.0", sha256="5f780656bf7b440a8e1f753a9a877401a7d497fb3160762f48bdefc8a9914976")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
depends_on("blas")
depends_on("lapack")
depends_on("meson@0.57.2:", type="build")
diff --git a/var/spack/repos/builtin/packages/xtcdata/package.py b/var/spack/repos/builtin/packages/xtcdata/package.py
index fa87a2f6cf..1fb2064788 100644
--- a/var/spack/repos/builtin/packages/xtcdata/package.py
+++ b/var/spack/repos/builtin/packages/xtcdata/package.py
@@ -16,4 +16,7 @@ class Xtcdata(CMakePackage):
version("3.3.37", sha256="127a5ae44c9272039708bd877849a3af354ce881fde093a2fc6fe0550b698b72")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
root_cmakelists_dir = "xtcdata"
diff --git a/var/spack/repos/builtin/packages/xtensor-blas/package.py b/var/spack/repos/builtin/packages/xtensor-blas/package.py
index c43cd4a4da..3d4060979a 100644
--- a/var/spack/repos/builtin/packages/xtensor-blas/package.py
+++ b/var/spack/repos/builtin/packages/xtensor-blas/package.py
@@ -23,6 +23,8 @@ class XtensorBlas(CMakePackage):
version("0.18.0", sha256="fba992bc08323bc40fd04d6549e50e43b97942624a51e08129102d18c135eec0")
version("0.17.2", sha256="2798c7e230d0c4b2d357bba20a0ef23a2b774d892be31ebbf702cb9935ea9f64")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake@3.1:", type="build")
# the information below can be found in the xtensor-blas README
depends_on("xtensor@0.24.0:", when="@0.20:")
diff --git a/var/spack/repos/builtin/packages/xtensor-python/package.py b/var/spack/repos/builtin/packages/xtensor-python/package.py
index 1b0c883e56..cd5d6caba3 100644
--- a/var/spack/repos/builtin/packages/xtensor-python/package.py
+++ b/var/spack/repos/builtin/packages/xtensor-python/package.py
@@ -21,6 +21,8 @@ class XtensorPython(CMakePackage):
version("0.23.1", sha256="450b25f5c739df174b2a50774b89e68b23535fdc37cb55bd542ffdb7c78991ab")
version("0.17.0", sha256="30f2e8c99376e38f942d62c0d2959bc1e52a562a4f8cc5e27ddc4d572a25e34c")
+ depends_on("cxx", type="build") # generated
+
depends_on("xtensor", when="@develop")
depends_on("xtensor@0.20.6:0.20", when="@0.23.1")
depends_on("xtensor@0.15.1:0.15", when="@0.17.0")
@@ -33,11 +35,3 @@ class XtensorPython(CMakePackage):
depends_on("python", type=("build", "link", "run"))
extends("python")
-
- def cmake_args(self):
- spec = self.spec
-
- python_exe = spec["python"].command.path
-
- args = ["-DPYTHON_EXECUTABLE={0}".format(python_exe)]
- return args
diff --git a/var/spack/repos/builtin/packages/xtensor/package.py b/var/spack/repos/builtin/packages/xtensor/package.py
index b7f1a3fa9e..3e964afbf0 100644
--- a/var/spack/repos/builtin/packages/xtensor/package.py
+++ b/var/spack/repos/builtin/packages/xtensor/package.py
@@ -27,6 +27,8 @@ class Xtensor(CMakePackage):
version("0.15.1", sha256="2f4ac632f7aa8c8e9da99ebbfc949d9129b4d644f715ef16c27658bf4fddcdd3")
version("0.13.1", sha256="f9ce4cd2110386d49e3f36bbab62da731c557b6289be19bc172bd7209b92a6bc")
+ depends_on("cxx", type="build") # generated
+
variant("xsimd", default=True, description="Enable SIMD intrinsics")
variant("tbb", default=True, description="Enable TBB parallelization")
@@ -50,7 +52,6 @@ class Xtensor(CMakePackage):
conflicts("%gcc@:4.8")
conflicts("%clang@:3.5")
# untested: conflicts('%intel@:15')
- # untested: conflicts('%pgi@:14')
def cmake_args(self):
args = [
diff --git a/var/spack/repos/builtin/packages/xterm/package.py b/var/spack/repos/builtin/packages/xterm/package.py
index 8e8f48ec58..7edbe346e2 100644
--- a/var/spack/repos/builtin/packages/xterm/package.py
+++ b/var/spack/repos/builtin/packages/xterm/package.py
@@ -12,10 +12,11 @@ class Xterm(AutotoolsPackage):
that can't use the window system directly."""
homepage = "https://invisible-island.net/xterm/"
- url = "ftp://ftp.invisible-island.net/xterm/xterm-327.tgz"
+ url = "https://invisible-island.net/archives/xterm/xterm-327.tgz"
license("MIT")
+ version("393", sha256="dc3abf533d66ae3db49e6783b0e1e29f0e4d045b4b3dac797a5e93be2735ec7b")
version("353", sha256="e521d3ee9def61f5d5c911afc74dd5c3a56ce147c7071c74023ea24cac9bb768")
version("350", sha256="aefb59eefd310268080d1a90a447368fb97a9a6737bfecfc3800bf6cc304104d")
version("340", sha256="b5c7f77b7afade798461e2a2f86d5af64f9c9c9f408b1af0f545add978df722a")
diff --git a/var/spack/repos/builtin/packages/xtl/package.py b/var/spack/repos/builtin/packages/xtl/package.py
index c9d3029548..007c4d1ea6 100644
--- a/var/spack/repos/builtin/packages/xtl/package.py
+++ b/var/spack/repos/builtin/packages/xtl/package.py
@@ -25,8 +25,9 @@ class Xtl(CMakePackage):
version("0.3.4", sha256="618536c3998091b0bdd7f8202e8bec9c34e82409c8ee0ea179a2759bdea426e2")
version("0.3.3", sha256="1110364c2ea0a2536ec6673e46afcb8fa7e92a66593211270bbeb26b85342600")
+ depends_on("cxx", type="build") # generated
+
# C++14 support
conflicts("%gcc@:4.8")
conflicts("%clang@:3.6")
# untested: conflicts('%intel@:15')
- # untested: conflicts('%pgi@:14')
diff --git a/var/spack/repos/builtin/packages/xtrans/package.py b/var/spack/repos/builtin/packages/xtrans/package.py
index 3d9ddf7100..aeadc39d7f 100644
--- a/var/spack/repos/builtin/packages/xtrans/package.py
+++ b/var/spack/repos/builtin/packages/xtrans/package.py
@@ -12,13 +12,19 @@ class Xtrans(AutotoolsPackage, XorgPackage):
single place to add new transport types. It is used by the X server,
libX11, libICE, the X font server, and related components."""
- homepage = "https://cgit.freedesktop.org/xorg/lib/libxtrans"
+ homepage = "https://gitlab.freedesktop.org/xorg/lib/libxtrans"
xorg_mirror_path = "lib/xtrans-1.3.5.tar.gz"
license("MIT")
+ maintainers("wdconinc")
+
+ version("1.5.2", sha256="23031301f10fef5eaa55b438610fbd29294a70d2fa189355343bf0186bff8374")
+ version("1.5.0", sha256="a806f8a92f879dcd0146f3f1153fdffe845f2fc0df9b1a26c19312b7b0a29c86")
version("1.4.0", sha256="48ed850ce772fef1b44ca23639b0a57e38884045ed2cbb18ab137ef33ec713f9")
version("1.3.5", sha256="b7a577c1b6c75030145e53b4793db9c88f9359ac49e7d771d4385d21b3e5945d")
+ depends_on("c", type="build") # generated
+
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xtrap/package.py b/var/spack/repos/builtin/packages/xtrap/package.py
index 9f2abfbb09..99fef53039 100644
--- a/var/spack/repos/builtin/packages/xtrap/package.py
+++ b/var/spack/repos/builtin/packages/xtrap/package.py
@@ -9,12 +9,14 @@ from spack.package import *
class Xtrap(AutotoolsPackage, XorgPackage):
"""XTrap sample clients."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xtrap"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xtrap"
xorg_mirror_path = "app/xtrap-1.0.2.tar.gz"
version("1.0.3", sha256="c6b86b921a748acbf1d82590fbd9c4575f970220760088f0e0efac6fd93d6dc3")
version("1.0.2", sha256="e8916e05bfb0d72a088aaaac0feaf4ad7671d0f509d1037fb3c0c9ea131b93d2")
+ depends_on("c", type="build") # generated
+
depends_on("libx11")
depends_on("libxtrap")
diff --git a/var/spack/repos/builtin/packages/xts/package.py b/var/spack/repos/builtin/packages/xts/package.py
index 31ff532a8d..d2a76cb302 100644
--- a/var/spack/repos/builtin/packages/xts/package.py
+++ b/var/spack/repos/builtin/packages/xts/package.py
@@ -10,11 +10,13 @@ class Xts(AutotoolsPackage, XorgPackage):
"""This is a revamped version of X Test Suite (XTS) which removes some of
the ugliness of building and running the tests."""
- homepage = "https://www.x.org/wiki/XorgTesting/"
+ homepage = "https://gitlab.freedesktop.org/xorg/test/xts"
xorg_mirror_path = "test/xts-0.99.1.tar.gz"
version("0.99.1", sha256="d04d987b9a9f8b3921dfe8de8577d0c2a0f21d2c4c3196948fc9805838a352e6")
+ depends_on("c", type="build")
+
depends_on("libx11", type="link")
depends_on("libxext", type="link")
depends_on("libxi", type="link")
@@ -23,9 +25,9 @@ class Xts(AutotoolsPackage, XorgPackage):
depends_on("libxt", type="link")
depends_on("libxmu", type="link")
depends_on("libxaw", type="link")
- depends_on("inputproto")
- depends_on("recordproto")
- depends_on("fixesproto")
+ depends_on("inputproto", type="build")
+ depends_on("recordproto", type="build")
+ depends_on("fixesproto", type="build")
depends_on("xtrans")
depends_on("bdftopcf", type="build")
@@ -34,5 +36,8 @@ class Xts(AutotoolsPackage, XorgPackage):
depends_on("xset", type="build")
depends_on("xdpyinfo", type="build")
+ depends_on("pkgconfig", type="build")
+ depends_on("util-macros", type="build")
+
# FIXME: Crashes during compilation
# error: redeclaration of enumerator 'XawChainTop'
diff --git a/var/spack/repos/builtin/packages/xv/package.py b/var/spack/repos/builtin/packages/xv/package.py
index 30a56226ee..8947f35608 100644
--- a/var/spack/repos/builtin/packages/xv/package.py
+++ b/var/spack/repos/builtin/packages/xv/package.py
@@ -23,7 +23,10 @@ class Xv(CMakePackage):
version("4.2.0", sha256="2871338c517a7444fc9d6a3d146bc2c5c7bd98b50c83369b24d24ad49fa0ab87")
+ depends_on("c", type="build") # generated
+
depends_on("libjpeg")
depends_on("libpng")
depends_on("libtiff")
depends_on("libx11")
+ depends_on("libxt")
diff --git a/var/spack/repos/builtin/packages/xvidtune/package.py b/var/spack/repos/builtin/packages/xvidtune/package.py
index eeb9d3096a..c1c8dd4092 100644
--- a/var/spack/repos/builtin/packages/xvidtune/package.py
+++ b/var/spack/repos/builtin/packages/xvidtune/package.py
@@ -10,7 +10,7 @@ class Xvidtune(AutotoolsPackage, XorgPackage):
"""xvidtune is a client interface to the X server video mode
extension (XFree86-VidModeExtension)."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xvidtune"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xvidtune"
xorg_mirror_path = "app/xvidtune-1.0.3.tar.gz"
license("MIT")
@@ -18,6 +18,8 @@ class Xvidtune(AutotoolsPackage, XorgPackage):
version("1.0.4", sha256="e5982c9e6c5009f0061c187a9cc82368215bd004cfa464a3d738c90e1d258668")
version("1.0.3", sha256="c0e158388d60e1ce054ce462958a46894604bd95e13093f3476ec6d9bbd786d4")
+ depends_on("c", type="build") # generated
+
depends_on("libxxf86vm")
depends_on("libxt")
depends_on("libxaw")
diff --git a/var/spack/repos/builtin/packages/xvinfo/package.py b/var/spack/repos/builtin/packages/xvinfo/package.py
index 5b1f3aabb1..eb176b410d 100644
--- a/var/spack/repos/builtin/packages/xvinfo/package.py
+++ b/var/spack/repos/builtin/packages/xvinfo/package.py
@@ -10,7 +10,7 @@ class Xvinfo(AutotoolsPackage, XorgPackage):
"""xvinfo prints out the capabilities of any video adaptors associated
with the display that are accessible through the X-Video extension."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xvinfo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xvinfo"
xorg_mirror_path = "app/xvinfo-1.1.3.tar.gz"
license("MIT")
@@ -19,9 +19,11 @@ class Xvinfo(AutotoolsPackage, XorgPackage):
version("1.1.4", sha256="43d06be36fe10f247295fbe2edf1062740064343f2228d6a61b4f9feac4f7396")
version("1.1.3", sha256="1c1c2f97abfe114389e94399cc7bf3dfd802ed30ad41ba23921d005bd8a6c39f")
+ depends_on("c", type="build")
+
depends_on("libxv")
depends_on("libx11")
- depends_on("xproto@7.0.25:")
+ depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xwd/package.py b/var/spack/repos/builtin/packages/xwd/package.py
index 954b8b2d6d..662895c73f 100644
--- a/var/spack/repos/builtin/packages/xwd/package.py
+++ b/var/spack/repos/builtin/packages/xwd/package.py
@@ -9,7 +9,7 @@ from spack.package import *
class Xwd(AutotoolsPackage, XorgPackage):
"""xwd - dump an image of an X window."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xwd"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xwd"
xorg_mirror_path = "app/xwd-1.0.6.tar.gz"
license("custom")
@@ -18,9 +18,11 @@ class Xwd(AutotoolsPackage, XorgPackage):
version("1.0.7", sha256="1c5e86806234a96a29c90be1872128293c6def5ba69ecb70e161efe325e2ba03")
version("1.0.6", sha256="ff01f0a4b736f955aaf7c8c3942211bc52f9fb75d96f2b19777f33fff5dc5b83")
+ depends_on("c", type="build")
+
depends_on("libx11")
depends_on("libxkbfile")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xwidgets/package.py b/var/spack/repos/builtin/packages/xwidgets/package.py
index aa108f7587..2ccdec69e0 100644
--- a/var/spack/repos/builtin/packages/xwidgets/package.py
+++ b/var/spack/repos/builtin/packages/xwidgets/package.py
@@ -20,6 +20,8 @@ class Xwidgets(CMakePackage):
version("master", branch="master")
version("0.25.0", sha256="7b6d36999e3b926c40389167c48b33f234a075365f089f89571b33a160421d8e")
+ depends_on("cxx", type="build") # generated
+
depends_on("xtl@0.7.0:0.7", when="@0.25.0:")
depends_on("xproperty@0.11.0:0.11", when="@0.25.0:")
depends_on("xeus@1.0:1", when="@0.25.0:")
diff --git a/var/spack/repos/builtin/packages/xwininfo/package.py b/var/spack/repos/builtin/packages/xwininfo/package.py
index 57f8308b5d..8ffeedad1d 100644
--- a/var/spack/repos/builtin/packages/xwininfo/package.py
+++ b/var/spack/repos/builtin/packages/xwininfo/package.py
@@ -10,18 +10,21 @@ class Xwininfo(AutotoolsPackage, XorgPackage):
"""xwininfo prints information about windows on an X server. Various
information is displayed depending on which options are selected."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xwininfo"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xwininfo"
xorg_mirror_path = "app/xwininfo-1.1.3.tar.gz"
license("MIT")
+ version("1.1.6", sha256="2d52151de9d2808343c715c480e7d37f88958c8b7fcd090178b097436d987c2b")
version("1.1.5", sha256="aaa915909bb509320c3c775c79babaccc063fd3edc39e520a3c0352e265e9f58")
version("1.1.4", sha256="3561f6c37eec416ad306f41ff24172b86cbed00854dff8912915e97d2cc17c34")
version("1.1.3", sha256="784f8b9c9ddab24ce4faa65fde6430a8d7cf3c0564573582452cc99c599bd941")
+ depends_on("c", type="build")
+
depends_on("libxcb@1.6:")
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xwud/package.py b/var/spack/repos/builtin/packages/xwud/package.py
index 9a5098c512..4618088d60 100644
--- a/var/spack/repos/builtin/packages/xwud/package.py
+++ b/var/spack/repos/builtin/packages/xwud/package.py
@@ -10,15 +10,17 @@ class Xwud(AutotoolsPackage, XorgPackage):
"""xwud allows X users to display in a window an image saved in a
specially formatted dump file, such as produced by xwd."""
- homepage = "https://cgit.freedesktop.org/xorg/app/xwud"
+ homepage = "https://gitlab.freedesktop.org/xorg/app/xwud"
xorg_mirror_path = "app/xwud-1.0.4.tar.gz"
version("1.0.6", sha256="262171b0c434966ddbbe8a54afb9615567ad74d4cc2e823e14e51e099ec3ab0d")
version("1.0.5", sha256="24d51e236ec3d1dd57c73679136029a14808aee5a2edda152d61598ba018c697")
version("1.0.4", sha256="b7c124ccd87f529daedb7ef01c670ce6049fe141fd9ba7f444361de34510cd6c")
+ depends_on("c", type="build")
+
depends_on("libx11")
- depends_on("xproto@7.0.17:")
+ depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")
diff --git a/var/spack/repos/builtin/packages/xxd-standalone/package.py b/var/spack/repos/builtin/packages/xxd-standalone/package.py
index c0bf61e3c7..7ba6f40e85 100644
--- a/var/spack/repos/builtin/packages/xxd-standalone/package.py
+++ b/var/spack/repos/builtin/packages/xxd-standalone/package.py
@@ -25,6 +25,9 @@ class XxdStandalone(MakefilePackage):
version("8.2.1201", sha256="39032fe866f44724b104468038dc9ac4ff2c00a4b18c9a1e2c27064ab1f1143d")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install(os.path.join(self.build_directory, "src", "xxd", "xxd"), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/xxdiff/package.py b/var/spack/repos/builtin/packages/xxdiff/package.py
index 6acd871f83..52fa2f0a3d 100644
--- a/var/spack/repos/builtin/packages/xxdiff/package.py
+++ b/var/spack/repos/builtin/packages/xxdiff/package.py
@@ -19,6 +19,9 @@ class Xxdiff(MakefilePackage):
version("master", branch="master")
version("2023-01-10", commit="604300ea9875611726ba885fb14f872b964df579")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
depends_on("flex@2.5.31:", type="build")
depends_on("bison", type="build")
depends_on("qt@5:", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/xxhash/package.py b/var/spack/repos/builtin/packages/xxhash/package.py
index 99661986c4..a4a94e56f3 100644
--- a/var/spack/repos/builtin/packages/xxhash/package.py
+++ b/var/spack/repos/builtin/packages/xxhash/package.py
@@ -19,6 +19,7 @@ class Xxhash(MakefilePackage):
license("BSD-2-Clause")
+ version("0.8.2", sha256="baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4")
version("0.8.1", sha256="3bb6b7d6f30c591dd65aaaff1c8b7a5b94d81687998ca9400082c739a690436c")
version("0.8.0", sha256="7054c3ebd169c97b64a92d7b994ab63c70dd53a06974f1f630ab782c28db0f4f")
version("0.7.4", sha256="4d9706c9da4fbdf901598f5e3b71db0eddd4ac962e827a73ebf75d66dfd820fe")
@@ -31,6 +32,9 @@ class Xxhash(MakefilePackage):
version("0.5.1", sha256="0171af39eefa06be1e616bc43b250d13bba417e4741135ec85c1fe8dc391997d")
version("0.5.0", sha256="9605cd18d40d798eb1262bc0c2a154e1a3c138a6a9a0c4c792e855d0c08c23e1")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
@property
def build_targets(self):
targets = []
diff --git a/var/spack/repos/builtin/packages/xyce/package.py b/var/spack/repos/builtin/packages/xyce/package.py
index f6d701d592..de0a94f836 100644
--- a/var/spack/repos/builtin/packages/xyce/package.py
+++ b/var/spack/repos/builtin/packages/xyce/package.py
@@ -10,13 +10,18 @@ from spack.package import *
class Xyce(CMakePackage):
"""Xyce (rhymes with 'spice') is an open source, SPICE-compatible,
- high-performance analog circuit simulator, capable of solving extremely
- large circuit problems by supporting large-scale parallel computing
- platforms.
- Xyce also supports serial execution on all common desktop platforms,
- and small-scale parallel runs on Unix-like systems. In addition to analog
- electronic simulation, Xyce has also been used to investigate more general
- network systems, such as neural networks and power grids.
+ high-performance analog circuit simulator, Xyce supports the standard
+ analysis capabilities found in other SPICE-like codes, such as DC,
+ transient, AC, and small-signal noise analyses; it also has less common
+ capabilities, such as harmonic balance, sensitivity analysis, and
+ uncertainty propagation techniques. Xyce supplies industry-standard compact
+ models and can support custom models via its Verilog-A model compiler.
+ Foundry process-development kits (PDKs) in other SPICE syntax can be used
+ via the XDM netlist translator, which is included as part of the Xyce
+ package. In addition to supporting use on all common desktop platforms
+ (Mac, Windows, Linux), Xyce can also be compiled to run in a large-scale
+ parallel mode to provide scalable, numerically accurate analog simulation
+ of circuits containing millions of devices, or more.
"""
homepage = "https://xyce.sandia.gov"
@@ -27,18 +32,43 @@ class Xyce(CMakePackage):
license("GPL-3.0-or-later")
version("master", branch="master")
+ version("7.8.0", sha256="f763b7d5ad6defd25d2c7e5cc95155958cd12510a5e22a179daab459b21fa713")
version("7.7.0", sha256="1b95450e1905c3af3c16b42c41d5ef1f8ab0e640f48086d0cb4d52961a90a175")
- version("7.6.0", sha256="fc25557e2edc82adbe0436a15fca2929a2f9ab08ddf91f1a47aab5e8b27ec88c")
- version("7.5.0", sha256="854d7d5e19e0ee2138d1f20f10f8f27f2bebb94ec81c157040955cff7250dacd")
- version("7.4.0", sha256="2d6bc1b7377834b2e0bf50131e96728c5be83dbb3548e765bb48911067c87c91")
- version("7.3.0", sha256="43869a70967f573ff6f00451db3f4642684834bdad1fd3926380e3789016b446")
- version("7.2.0", sha256="cf49705278ecda46373784bb24925cb97f9017b6adff49e4416de146bdd6a4b5")
+ version(
+ "7.6.0",
+ sha256="fc25557e2edc82adbe0436a15fca2929a2f9ab08ddf91f1a47aab5e8b27ec88c",
+ deprecated=True,
+ )
+ version(
+ "7.5.0",
+ sha256="854d7d5e19e0ee2138d1f20f10f8f27f2bebb94ec81c157040955cff7250dacd",
+ deprecated=True,
+ )
+ version(
+ "7.4.0",
+ sha256="2d6bc1b7377834b2e0bf50131e96728c5be83dbb3548e765bb48911067c87c91",
+ deprecated=True,
+ )
+ version(
+ "7.3.0",
+ sha256="43869a70967f573ff6f00451db3f4642684834bdad1fd3926380e3789016b446",
+ deprecated=True,
+ )
+ version(
+ "7.2.0",
+ sha256="cf49705278ecda46373784bb24925cb97f9017b6adff49e4416de146bdd6a4b5",
+ deprecated=True,
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build")
- depends_on("cmake@3.13:", type="build")
+ depends_on("cmake@3.22:", type="build")
depends_on("flex")
depends_on("bison")
- variant("mpi", default=True, description="Enable MPI support")
+ variant("mpi", default=False, description="Enable MPI support")
depends_on("mpi", when="+mpi")
variant("plugin", default=False, description="Enable plug-in support for Xyce")
@@ -58,8 +88,8 @@ class Xyce(CMakePackage):
variant("cxxstd", default="11", description="C++ standard", values=cxxstd_choices, multi=False)
variant("pymi", default=False, description="Enable Python Model Interpreter for Xyce")
- # Downstream dynamic library symbols from pip installed numpy and other
- # pip installed python packages can cause conflicts. This is most often
+ # Downstream dynamic library symbols from pip-installed numpy and other
+ # pip-installed python packages can cause conflicts. This is most often
# seen with blas symbols from numpy, and building blas static resolves
# this issue.
variant(
@@ -76,17 +106,21 @@ class Xyce(CMakePackage):
depends_on(
"trilinos"
- "+amesos+amesos2+anasazi+aztec+basker+belos+complex+epetra+epetraext"
- "+explicit_template_instantiation+fortran+ifpack+kokkos+nox"
- "+sacado+suite-sparse+trilinoscouplings+stokhos+epetraextbtf"
- "+epetraextexperimental+epetraextgraphreorderings"
+ "+amesos+amesos2+aztec+basker+belos+complex+epetra+epetraext"
+ "+epetraextbtf+epetraextexperimental+epetraextgraphreorderings"
+ "+ifpack+nox+sacado+stokhos+suite-sparse+trilinoscouplings"
)
depends_on("trilinos+isorropia+zoltan", when="+mpi")
- # tested versions of Trilinos for everything up to 7.4.0
- depends_on("trilinos@12.12.1:13.4", when="@:7.5")
- depends_on("trilinos@13.5.0:develop", when="@7.6.0:master")
- depends_on("trilinos gotype=all cxxstd=11", when="^trilinos@:12.15")
+ # Currently supported versions of Xyce
+ depends_on("trilinos@15.0.0:develop", when="@7.8.0:")
+ depends_on("trilinos+rol", when="@7.7.0:")
+
+ # tested versions of Trilinos against older versions of Xyce
+ depends_on("trilinos@13.5.0:14.4", when="@7.6.0:7.7.0")
+ depends_on("trilinos@12.12.1:13.4", when="@7.5")
+ depends_on("trilinos@12.12.1", when="@:7.4")
+ requires("^trilinos gotype=all cxxstd=11", when="^trilinos@:12.15")
# pymi requires Kokkos/KokkosKernels >= 3.3, Trilinos 13.2 onward
depends_on("trilinos@13.2.0:", when="+pymi")
@@ -97,33 +131,31 @@ class Xyce(CMakePackage):
# The default settings for various Trilinos variants would require the
# installation of many more packages than are needed for Xyce.
- depends_on("trilinos~float~ifpack2~ml~muelu~zoltan2")
+ depends_on("trilinos~anasazi~float~ifpack2~ml~muelu~zoltan2")
# Issue #1712 forces explicitly enumerating blas packages to propagate variants
with when("+pymi_static_tpls"):
# BLAS
depends_on("blas")
- depends_on("openblas~shared", when="^openblas")
- depends_on("netlib-lapack~shared", when="^netlib-lapack~external-blas")
-
- depends_on("armpl-gcc~shared", when="^armpl-gcc")
- depends_on("atlas~shared", when="^atlas")
- depends_on("blis libs=static", when="^blis+cblas")
- depends_on("blis libs=static", when="^blis+blas")
- depends_on("clblast~shared", when="^clblast+netlib")
- depends_on("intel-mkl~shared", when="^intel-mkl")
- depends_on("intel-oneapi-mkl~shared", when="^intel-oneapi-mkl")
- depends_on("intel-parallel-studio~shared", when="^intel-parallel-studio+mkl")
- depends_on("veclibfort~shared", when="^veclibfort")
+ depends_on("openblas~shared", when="^[virtuals=blas] openblas")
+ depends_on("netlib-lapack~shared", when="^[virtuals=blas] netlib-lapack~external-blas")
+ depends_on("armpl-gcc~shared", when="^[virtuals=blas] armpl-gcc")
+ depends_on("atlas~shared", when="^[virtuals=blas] atlas")
+ depends_on("blis libs=static", when="^[virtuals=blas] blis+cblas")
+ depends_on("blis libs=static", when="^[virtuals=blas] blis+blas")
+ depends_on("clblast~shared", when="^[virtuals=blas] clblast+netlib")
+ depends_on("intel-mkl~shared", when="^[virtuals=blas] intel-mkl")
+ depends_on("intel-oneapi-mkl~shared", when="^[virtuals=blas] intel-oneapi-mkl")
+ depends_on(
+ "intel-parallel-studio~shared", when="^[virtuals=blas] intel-parallel-studio+mkl"
+ )
+ depends_on("veclibfort~shared", when="^[virtuals=blas] veclibfort")
conflicts("^essl", msg="essl not supported with +pymi_static_tpls")
conflicts("^flexiblas", msg="flexiblas not supported with +pymi_static_tpls")
conflicts("^nvhpc", msg="nvhpc not supported with +pymi_static_tpls")
conflicts("^cray-libsci", msg="cray-libsci not supported with +pymi_static_tpls")
# netlib-xblas+plain_blas is always static
- # HDF5
- depends_on("hdf5~shared", when="^hdf5")
-
# fix MPI issue
patch(
"https://github.com/xyce/xyce/commit/2f95783637a5171a7f65f5d18c24d9a580a7f39e.patch?full_index=1",
@@ -152,7 +184,12 @@ class Xyce(CMakePackage):
when="@:7.7",
)
- # fix cmake trilinos test issue
+ # Xyce CMake relies on Kokkos to report if OpenMP was used. However, the
+ # OpenMP requirement does not always propogate via the Spack packages, for
+ # various esoteric reasons. Therefore, when Xyce checks to see if it can
+ # compile against Trilinos, the check might erroneously fail. Since Spack
+ # should be handling everything properly, we simply disable the Trilinos
+ # compile test. See the Xyce internal issue 454 for more information.
patch(
"454-cmake-xyce.patch",
sha256="4d47cd1f10607205e64910ac124c6dd329f1ecbf861416e9da24a1736f2149ff",
@@ -191,7 +228,11 @@ class Xyce(CMakePackage):
flags.append("-DXyce_INTRUSIVE_PCE -Wreorder")
elif name == "ldflags":
# Fortran lib (assumes clang is built with gfortran!)
- if spec.compiler.name in ["gcc", "clang", "apple-clang"]:
+ if (
+ spec.satisfies("%gcc")
+ or spec.satisfies("%clang")
+ or spec.satisfies("%apple-clang")
+ ):
fc = Executable(self.compiler.fc)
libgfortran = fc(
"--print-file-name", "libgfortran." + dso_suffix, output=str
diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py
index c4113f9920..a5d4bbc89c 100644
--- a/var/spack/repos/builtin/packages/xz/package.py
+++ b/var/spack/repos/builtin/packages/xz/package.py
@@ -28,6 +28,10 @@ class Xz(MSBuildPackage, AutotoolsPackage, SourceforgePackage):
license("GPL-2.0-or-later AND Public-Domain AND LGPL-2.1-or-later", checked_by="tgamblin")
+ # NOTE: don't add XZ 5.6 until this compromise is resolved:
+ # https://www.openwall.com/lists/oss-security/2024/03/29/4
+ version("5.4.6", sha256="913851b274e8e1d31781ec949f1c23e8dbcf0ecf6e73a2436dc21769dd3e6f49")
+ version("5.4.5", sha256="8ccf5fff868c006f29522e386fb4c6a1b66463fbca65a4cfc3c4bd596e895e79")
version("5.4.1", sha256="dd172acb53867a68012f94c17389401b2f274a1aa5ae8f84cbfb8b7e383ea8d3")
version("5.2.10", sha256="01b71df61521d9da698ce3c33148bff06a131628ff037398c09482f3a26e5408")
version("5.2.7", sha256="b65f1d0c2708e57716f4dd2216989a73847ac6fdb4168ffceb155767e22b834b")
@@ -39,6 +43,8 @@ class Xz(MSBuildPackage, AutotoolsPackage, SourceforgePackage):
version("5.2.1", sha256="679148f497e0bff2c1adce42dee5a23f746e71321c33ebb0f641a302e30c2a80")
version("5.2.0", sha256="f7357d7455a1670229b3cca021da71dd5d13b789db62743c20624bdffc9cc4a5")
+ depends_on("c", type="build") # generated
+
variant("pic", default=False, description="Compile with position independent code.")
variant(
diff --git a/var/spack/repos/builtin/packages/yade/package.py b/var/spack/repos/builtin/packages/yade/package.py
index eabbcc4ccd..5590d270a3 100644
--- a/var/spack/repos/builtin/packages/yade/package.py
+++ b/var/spack/repos/builtin/packages/yade/package.py
@@ -26,6 +26,8 @@ class Yade(CMakePackage):
version("2017.01a", sha256="cd35caa6b6a017ee82f894e7d6f0826fddc1d921aea04b5896d3f1da95cb649b")
version("2016.06a", sha256="6e7374d2dcb7c90026be9229a6b30373f9d82fdefd3dc1f952aa6262924f2579")
+ depends_on("cxx", type="build") # generated
+
depends_on("cmake", type="build")
depends_on("gcc@11.4:", type=("build", "run"))
depends_on("boost@1.47:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/yafyaml/package.py b/var/spack/repos/builtin/packages/yafyaml/package.py
index 5c216a80a0..379fff05ab 100644
--- a/var/spack/repos/builtin/packages/yafyaml/package.py
+++ b/var/spack/repos/builtin/packages/yafyaml/package.py
@@ -4,7 +4,9 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
+import re
+import spack.compiler
from spack.package import *
@@ -30,6 +32,8 @@ class Yafyaml(CMakePackage):
version("main", branch="main")
+ version("1.4.0", sha256="2a415087eb26d291ff40da4430d668c702d22601ed52a72d001140d97372bc7d")
+ version("1.3.0", sha256="a3882210b2620485471e3337d995edc1e653b49d9caaa902a43293826a61a635")
version("1.2.0", sha256="912a4248bbf2e2e84cf3e36f2ae8483bee6b32d2eaa4406dd2100ad660c9bfc6")
version("1.1.0", sha256="f0be81afe643adc2452055e5485f09cdb509a8fdd5a4ec5547b0c31dd22b4830")
version("1.0.7", sha256="54f5c87e86c12e872e615fbc9540610ae38053f844f1e75d1e753724fea85c64")
@@ -48,10 +52,48 @@ class Yafyaml(CMakePackage):
version("0.5.1", sha256="7019460314e388b2d556db75d5eb734237a18494f79b921613addb96b7b7ce2f")
version("0.5.0", sha256="8ac5d41b1020e9311ac87f50dbd61b9f3e3188f3599ce463ad59650208fdb8ad")
+ depends_on("fortran", type="build")
+
depends_on("gftl-shared")
depends_on("gftl")
depends_on("cmake@3.12:", type="build")
+ # yafyaml only works with the Fujitsu compiler from 1.3.0 onwards
+ conflicts(
+ "%fj",
+ when="@:1.2.0",
+ msg="yaFyaml only works with the Fujitsu compiler from 1.3.0 onwards",
+ )
+
+ # GCC 13.3 and higher only work with yafyaml 1.4.0 onwards
+ # First we can check if the spec is gcc@13.3...
+ conflicts("%gcc@13.3:", when="@:1.3.0", msg="GCC 13.3+ only works with yafyaml 1.4.0 onwards")
+
+ # ...but if it is not (say apple-clang with gfortran as a fc), there is
+ # no easy way to check this. So we hijack flag_handler to raise an
+ # exception if we detect gfortran 13.3 or 14.
+ # NOTE: This will only error out at install time, so `spack spec` will
+ # not catch this.
+ def flag_handler(self, name, flags):
+ # We need to match any compiler that has a name of gfortran or gfortran-*
+ pattern = re.compile(r"gfortran(-\d+)?$")
+
+ if pattern.search(self.compiler.fc):
+ gfortran_version = spack.compiler.get_compiler_version_output(
+ self.compiler.fc, "-dumpfullversion"
+ ).strip()
+
+ # gfortran_version is now a string like "13.3.0". We now need to just capture
+ # the major and minor version numbers
+ gfortran_version = ".".join(gfortran_version.split(".")[:2])
+
+ if self.spec.satisfies("@:1.3.0") and (float(gfortran_version) >= 13.3):
+ raise InstallError(
+ f"Your gfortran version {gfortran_version} is not compatible with "
+ f"yafyaml 1.3.0 and below. Use yafyaml 1.4.0 or higher."
+ )
+ return None, None, None
+
variant(
"build_type",
default="Release",
diff --git a/var/spack/repos/builtin/packages/yajl/package.py b/var/spack/repos/builtin/packages/yajl/package.py
index 686714cadb..24572d06f7 100644
--- a/var/spack/repos/builtin/packages/yajl/package.py
+++ b/var/spack/repos/builtin/packages/yajl/package.py
@@ -10,7 +10,7 @@ class Yajl(CMakePackage):
"""Yet Another JSON Library (YAJL)"""
homepage = "https://lloyd.github.io/yajl/"
- url = "https://github.com/lloyd/yajl/archive/2.1.0.zip"
+ url = "https://github.com/lloyd/yajl/archive/refs/tags/2.1.0.zip"
git = "https://github.com/lloyd/yajl.git"
license("MIT")
diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py
index e24ee70d05..7a3c16d023 100644
--- a/var/spack/repos/builtin/packages/yaksa/package.py
+++ b/var/spack/repos/builtin/packages/yaksa/package.py
@@ -29,6 +29,8 @@ class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage):
version("0.3", sha256="c9e5291211bee8852831bb464f430ad5ba1541e31db5718a6fa2f2d3329fc2d9")
version("0.2", sha256="9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
diff --git a/var/spack/repos/builtin/packages/yambo/package.py b/var/spack/repos/builtin/packages/yambo/package.py
index d554b0bbbc..8ff7e500a5 100644
--- a/var/spack/repos/builtin/packages/yambo/package.py
+++ b/var/spack/repos/builtin/packages/yambo/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import shutil
+
from spack.package import *
@@ -17,29 +19,37 @@ class Yambo(AutotoolsPackage):
to its release under the GPL license, yambo was known as SELF.
"""
- homepage = "http://www.yambo-code.org/index.php"
+ homepage = "https://www.yambo-code.org/index.php"
url = "https://github.com/yambo-code/yambo/archive/4.2.2.tar.gz"
+ maintainers("LydDeb")
+
license("GPL-2.0-or-later")
+ version("5.2.4", sha256="7c3f2602389fc29a0d8570c2fe85fe3768d390cfcbb2d371e83e75c6c951d5fc")
+ version("5.2.3", sha256="a6168d1fa820af857ac51217bd6ad26dda4cc89c07e035bd7dc230038ae1ab9c")
+ version("5.2.1", sha256="0ac362854313927d75bbf87be98ff58447f3805f79724c38dc79df07f03a7046")
version("5.1.1", sha256="c85036ca60507e627c47b6c6aee8241830349e88110e1ce9132ef03ab2c4e9f6")
version("4.2.2", sha256="86b4ebe679387233266aba49948246c85a32b1e6840d024f162962bd0112448c")
version("4.2.1", sha256="8ccd0ca75cc32d9266d4a37edd2a7396cf5038f3a68be07c0f0f77d1afc72bdc")
version("4.2.0", sha256="9f78c4237ff363ff4e9ea5eeea671b6fff783d9a6078cc31b0b1abeb1f040f4d")
+ depends_on("c", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("dp", default=False, description="Enable double precision")
variant(
"profile",
values=any_combination_of("time", "memory"),
description="Activate profiling of specific sections",
)
-
variant(
"io",
- values=any_combination_of("iotk", "etsf-io"),
+ default="iotk",
+ values=("iotk", "etsf-io"),
+ multi=True,
description="Activate support for different io formats (requires network access)",
)
-
# MPI + OpenMP parallelism
variant("mpi", default=True, description="Enable MPI support")
variant("openmp", default=False, description="Enable OpenMP support")
@@ -67,18 +77,57 @@ class Yambo(AutotoolsPackage):
depends_on("netcdf-fortran")
depends_on("libxc@2.0.3:")
+ depends_on("etsf-io", when="io=etsf-io")
+
build_targets = ["all"]
parallel = False
- # The configure in the package has the string 'cat config/report'
- # hard-coded, which causes a failure at configure time due to the
- # current working directory in Spack. Fix this by using the absolute
- # path to the file.
- @run_before("configure")
- def filter_configure(self):
- report_abspath = join_path(self.build_directory, "config", "report")
- filter_file("config/report", report_abspath, "configure")
+ sanity_check_is_file = ["bin/yambo"]
+
+ resource(
+ when="@5.2.4",
+ name="ydriver",
+ url="https://github.com/yambo-code/Ydriver/archive/refs/tags/1.4.2.tar.gz",
+ sha256="c242f0700a224325ff59326767614a561b02ce16ddb2ce6c13ddd2d5901cc3e4",
+ destination="ydriver_archive",
+ placement="archive",
+ expand=False,
+ )
+ resource(
+ when="@5.2.1:5.2.3",
+ name="ydriver",
+ url="https://github.com/yambo-code/Ydriver/archive/refs/tags/1.2.0.tar.gz",
+ sha256="0f29a44e9c4b49d3f6be3f159a7ef415932b2ae2f2fdba163af60a0673befe6e",
+ destination="ydriver_archive",
+ placement="archive",
+ expand=False,
+ )
+ # iotk archive is contained inside this git repository
+ resource(
+ when="@5.2",
+ name="iotk",
+ git="https://github.com/yambo-code/yambo-libraries.git",
+ destination="yambo_libraries",
+ expand=False,
+ )
+
+ # ydriver-1.1.0 is required by yambo 5.1.1 but the oldest release in
+ # https://github.com/yambo-code/Ydriver is 1.2.0
+ # So, the air-gapped installation is only available since yambo@5.2.1
+ @when("@5.2")
+ @run_before("autoreconf")
+ def setup_archives(self):
+ if self.spec.satisfies("@5.2.4"):
+ shutil.move("ydriver_archive/archive/1.4.2.tar.gz", "lib/archive/Ydriver-1.4.2.tar.gz")
+ if self.spec.satisfies("@5.2.1:5.2.3"):
+ shutil.move("ydriver_archive/archive/1.2.0.tar.gz", "lib/archive/Ydriver-1.2.0.tar.gz")
+ shutil.move(
+ "yambo_libraries/yambo-libraries/external/iotk-y1.2.2.tar.gz",
+ "lib/archive/iotk-y1.2.2.tar.gz",
+ )
+ shutil.rmtree("ydriver_archive")
+ shutil.rmtree("yambo_libraries")
def enable_or_disable_time(self, activated):
return "--enable-time-profile" if activated else "--disable-time-profile"
@@ -89,12 +138,58 @@ class Yambo(AutotoolsPackage):
def enable_or_disable_openmp(self, activated):
return "--enable-open-mp" if activated else "--disable-open-mp"
+ @when("@5")
+ def configure_args(self):
+ spec = self.spec
+ args = [
+ f"--with-hdf5-path={spec['hdf5'].prefix}",
+ f"--prefix={self.stage.source_path}",
+ f"--exec-prefix={self.stage.source_path}",
+ ]
+ # Double precision
+ args.extend(self.enable_or_disable("dp"))
+
+ # Application profiling
+ args.extend(self.enable_or_disable("profile"))
+
+ # MPI + threading
+ args.extend(self.enable_or_disable("mpi"))
+ args.extend(self.enable_or_disable("openmp"))
+
+ if spec.satisfies("+mpi"):
+ args.append(f"--with-scalapack-libs={spec['scalapack'].libs}")
+
+ args.append(f"--with-blas-libs={spec['blas'].libs}")
+ args.append(f"--with-lapack-libs={spec['lapack'].libs}")
+ args.append(f"--with-netcdf-path={spec['netcdf-c'].prefix}")
+ args.append(f"--with-netcdff-path={spec['netcdf-fortran'].prefix}")
+ args.append(f"--with-fft-path={spec['fftw'].prefix}")
+ args.append(f"--with-libxc-path={spec['libxc'].prefix}")
+ args.append("--enable-hdf5-p2y-support")
+ # IO
+ if spec.satisfies("io=etsf-io"):
+ args.append(f"--with-etsf-io-path={spec['etsf-io'].prefix}")
+ args.extend(self.enable_or_disable("io"))
+
+ return args
+
+ # The configure in the package has the string 'cat config/report'
+ # hard-coded, which causes a failure at configure time due to the
+ # current working directory in Spack. Fix this by using the absolute
+ # path to the file.
+ @when("@4.2.1")
+ @run_before("configure")
+ def filter_configure(self):
+ report_abspath = join_path(self.build_directory, "config", "report")
+ filter_file("config/report", report_abspath, "configure")
+
+ @when("@4.2.1")
def configure_args(self):
args = [
# As of version 4.2.1 there are hard-coded paths that make
# the build process fail if the target prefix is not the
# configure directory
- "--prefix={0}".format(self.stage.source_path),
+ f"--prefix={self.stage.source_path}",
"--disable-keep-objects",
"--with-editor=none",
]
@@ -111,7 +206,7 @@ class Yambo(AutotoolsPackage):
args.extend(self.enable_or_disable("openmp"))
# LAPACK
- if "+mpi" in spec:
+ if spec.satisfies("+mpi"):
args.append(
"--with-scalapack-libs={0}".format(
spec["scalapack"].libs + spec["lapack"].libs + spec["blas"].libs
@@ -119,10 +214,7 @@ class Yambo(AutotoolsPackage):
)
args.extend(
- [
- "--with-blas-libs={0}".format(spec["blas"].libs),
- "--with-lapack-libs={0}".format(spec["lapack"].libs),
- ]
+ [f"--with-blas-libs={spec['blas'].libs}", f"--with-lapack-libs={spec['lapack'].libs}"]
)
# Netcdf
@@ -130,17 +222,17 @@ class Yambo(AutotoolsPackage):
[
"--enable-netcdf-hdf5",
"--enable-hdf5-compression",
- "--with-hdf5-libs={0}".format(spec["hdf5"].libs),
- "--with-netcdf-path={0}".format(spec["netcdf-c"].prefix),
- "--with-netcdff-path={0}".format(spec["netcdf-fortran"].prefix),
+ f"--with-hdf5-libs={spec['hdf5'].libs}",
+ f"--with-netcdf-path={spec['netcdf-c'].prefix}",
+ f"--with-netcdff-path={spec['netcdf-fortran'].prefix}",
]
)
args.extend(self.enable_or_disable("io"))
# Other dependencies
- args.append("--with-fft-path={0}".format(spec["fftw"].prefix))
- args.append("--with-libxc-path={0}".format(spec["libxc"].prefix))
+ args.append(f"--with-fft-path={spec['fftw'].prefix}")
+ args.append(f"--with-libxc-path={spec['libxc'].prefix}")
return args
diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py
index 5954481cff..1a3b8afa72 100644
--- a/var/spack/repos/builtin/packages/yaml-cpp/package.py
+++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py
@@ -14,19 +14,23 @@ class YamlCpp(CMakePackage):
"""A YAML parser and emitter in C++"""
homepage = "https://github.com/jbeder/yaml-cpp"
- url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz"
+ url = "https://github.com/jbeder/yaml-cpp/archive/0.8.0.tar.gz"
git = "https://github.com/jbeder/yaml-cpp.git"
maintainers("eschnett")
license("MIT")
version("develop", branch="master")
+ version("0.8.0", sha256="fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16")
version("0.7.0", sha256="43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3")
version("0.6.3", sha256="77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed")
version("0.6.2", sha256="e4d8560e163c3d875fd5d9e5542b5fd5bec810febdcba61481fe5fc4e6b1fd05")
version("0.5.3", sha256="decc5beabb86e8ed9ebeb04358d5363a5c4f72d458b2c788cb2f3ac9c19467b2")
version("0.3.0", sha256="ab8d0e07aa14f10224ed6682065569761f363ec44bc36fcdb2946f6d38fe5a89")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
variant("shared", default=True, description="Build shared instead of static libraries")
variant("pic", default=True, description="Build with position independent code")
variant("tests", default=False, description="Build yaml-cpp tests using internal gtest")
@@ -84,8 +88,10 @@ class YamlCpp(CMakePackage):
return options
def url_for_version(self, version):
- url = "https://github.com/jbeder/yaml-cpp/archive/{0}-{1}.tar.gz"
+ url = "https://github.com/jbeder/yaml-cpp/archive/{0}.tar.gz"
if version < Version("0.5.3"):
- return url.format("release", version)
+ return url.format(f"release-{version}")
+ elif version < Version("0.8.0"):
+ return url.format(f"yaml-cpp-{version}")
else:
- return url.format("yaml-cpp", version)
+ return url.format(version)
diff --git a/var/spack/repos/builtin/packages/yara/package.py b/var/spack/repos/builtin/packages/yara/package.py
index e80978bd1c..cce0191a10 100644
--- a/var/spack/repos/builtin/packages/yara/package.py
+++ b/var/spack/repos/builtin/packages/yara/package.py
@@ -15,9 +15,16 @@ class Yara(AutotoolsPackage):
license("BSD-3-Clause")
- version("3.9.0", sha256="ebe7fab0abadb90449a62afbd24e196e18b177efe71ffd8bf22df95c5386f64d")
+ version("4.5.2", sha256="1f87056fcb10ee361936ee7b0548444f7974612ebb0e681734d8de7df055d1ec")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2021-3402
+ version("3.9.0", sha256="ebe7fab0abadb90449a62afbd24e196e18b177efe71ffd8bf22df95c5386f64d")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
+ depends_on("pkgconfig", type="build", when="@4:")
diff --git a/var/spack/repos/builtin/packages/yasm/package.py b/var/spack/repos/builtin/packages/yasm/package.py
index 4c2f9ae8b6..46a921ac91 100644
--- a/var/spack/repos/builtin/packages/yasm/package.py
+++ b/var/spack/repos/builtin/packages/yasm/package.py
@@ -21,6 +21,8 @@ class Yasm(AutotoolsPackage):
version("develop", branch="master")
version("1.3.0", sha256="3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f")
+ depends_on("c", type="build") # generated
+
depends_on("autoconf", when="@develop")
depends_on("automake", when="@develop")
depends_on("libtool", when="@develop")
diff --git a/var/spack/repos/builtin/packages/yoda/package.py b/var/spack/repos/builtin/packages/yoda/package.py
index 1360dd1306..34bcda42d3 100644
--- a/var/spack/repos/builtin/packages/yoda/package.py
+++ b/var/spack/repos/builtin/packages/yoda/package.py
@@ -17,6 +17,11 @@ class Yoda(AutotoolsPackage):
license("GPL-3.0-or-later")
+ version("2.0.2", sha256="31a41413641189814ff3c6bbb96ac5d17d2b68734fe327d06794cdbd3a540399")
+ version("2.0.1", sha256="ae5a78eaae5574a5159d4058839d0983c9923558bfc88fbce21d251fd925d260")
+ version("2.0.0", sha256="680f43dabebb3167ce1c5dee72d1c2c285c3190751245aa51e3260a005a99575")
+ version("1.9.10", sha256="0a708ee9d704945d3387cc437b15ffddf382c70fe5bab39ed2bdbf83c2c28c6f")
+ version("1.9.9", sha256="ebcad55369a1cedcee3a2de059407c851652ba44495113f5c09d8c2e57f516aa")
version("1.9.8", sha256="7bc3062468abba50aff3ecb8b22ce677196036009890688ef4533aaa7f92e6e4")
version("1.9.7", sha256="8d07bb04dcb79364858718a18203452d8d9fa00029fa94239eafa8529032b8ff")
version("1.9.6", sha256="21523fa2f6b6c8f3348959f3a948734a930ca25951d3c9190b4424e13735f2a4")
@@ -66,6 +71,9 @@ class Yoda(AutotoolsPackage):
version("1.0.4", sha256="697fe397c69689feecb2a731e19b2ff85e19343b8198c4f18a7064c4f7123950")
version("1.0.3", sha256="6a1d1d75d9d74da457726ea9463c1b0b6ba38d4b43ef54e1c33f885e70fdae4b")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("root", default=False, description="Enable ROOT interface")
depends_on("python", type=("build", "link", "run"))
diff --git a/var/spack/repos/builtin/packages/yorick/package.py b/var/spack/repos/builtin/packages/yorick/package.py
index fa3ef816f0..c4a97d688b 100644
--- a/var/spack/repos/builtin/packages/yorick/package.py
+++ b/var/spack/repos/builtin/packages/yorick/package.py
@@ -24,6 +24,10 @@ class Yorick(Package):
version("2.2.04", sha256="4a4f3a18aed533cc5fadbb3d4bafb48f04834a22cbff6ad5c19d9dba74facbda")
version("f90-plugin", branch="f90-plugin")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
variant("X", default=False, description="Enable X11 support")
depends_on("libx11", when="+X")
diff --git a/var/spack/repos/builtin/packages/yosys/package.py b/var/spack/repos/builtin/packages/yosys/package.py
index ac73e07a18..2da4aa007a 100644
--- a/var/spack/repos/builtin/packages/yosys/package.py
+++ b/var/spack/repos/builtin/packages/yosys/package.py
@@ -20,7 +20,7 @@ class Yosys(MakefilePackage):
"""
homepage = "https://yosyshq.net/yosys"
- url = "https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-0.36.tar.gz"
+ url = "https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-0.46.tar.gz"
git = "https://github.com/YosysHQ/yosys.git"
maintainers("davekeeshan")
@@ -29,6 +29,17 @@ class Yosys(MakefilePackage):
version("master", branch="master")
+ version("0.47", commit="647d61dd9212365a3cd44db219660b8f90b95cbd", submodules=True)
+ version("0.46", commit="e97731b9dda91fa5fa53ed87df7c34163ba59a41", submodules=True)
+ version("0.45", commit="9ed031ddd588442f22be13ce608547a5809b62f0", submodules=True)
+ version("0.44", commit="80ba43d26264738c93900129dc0aab7fab36c53f", submodules=True)
+ version("0.43", commit="ead4718e567aed2e552dcfe46294b132aa04c158", submodules=True)
+ version("0.42", commit="9b6afcf3f83fea413b57c3790c25ba43b9914ce2", submodules=True)
+ version("0.41", sha256="b0037d0a5864550a07a72ba81346e52a7d5f76b3027ef1d7c71b975d2c8bd2b2")
+ version("0.40", sha256="c1d42ad90d587b587210b40cf3c5584e41e20f656e8630c33b6583322e8b764e")
+ version("0.39", sha256="a66d95747b21d03e5b9c274d3f7cb0f7dd99610891dd66920bfaee25bc30dad1")
+ version("0.38", sha256="5f3d7bb12c5371db00586700a658a9196008a9457839f046403a660fe0c7a1df")
+ version("0.37", sha256="98e91253b116728e5db037512a4d837529d408269358f06fe7b4633c89cf8756")
version("0.36", sha256="d69beedcb76db80681c2a0f445046311f3ba16716d5d0c3c5034dabcb6bd9b23")
version("0.35", sha256="a00643cf4cf83701bfa2b358066eb9d360393d30e8f5a8e65f619ab1fd10474a")
version("0.34", sha256="57897bc3fe5fdc940e9f3f3ae03b84f5f8e9149b6f26d3699f7ecb9f31a41ae0")
@@ -47,6 +58,9 @@ class Yosys(MakefilePackage):
version("0.21", sha256="2b0e140f47d682e1069b1ca53b1fd91cbb1c1546932bd5cb95566f59a673cd8d")
version("0.20", sha256="ee261487badf1b554616d555da8496a7c84ef21ae66a979ddd946b6949a780a4")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("abc", default=True, description="build with abc support")
variant("ccache", default=False, description="build with ccache support")
@@ -55,7 +69,7 @@ class Yosys(MakefilePackage):
depends_on("bison")
depends_on("libffi")
depends_on("readline")
- depends_on("pkg-config")
+ depends_on("pkgconfig")
depends_on("tcl")
depends_on("zlib")
depends_on("llvm")
diff --git a/var/spack/repos/builtin/packages/yq/package.py b/var/spack/repos/builtin/packages/yq/package.py
new file mode 100644
index 0000000000..9c94f459fe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/yq/package.py
@@ -0,0 +1,28 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Yq(GoPackage):
+ """yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor.
+ This is different from the py-yq package that is a wrapper around jq."""
+
+ homepage = "https://mikefarah.gitbook.io/yq"
+ url = "https://github.com/mikefarah/yq/archive/refs/tags/v4.43.1.tar.gz"
+
+ maintainers("teaguesterling")
+
+ license("MIT", checked_by="teaguesterling")
+
+ version("4.44.3", sha256="ea950f5622480fc0ff3708c52589426a737cd4ec887a52922a74efa1be8f2fbf")
+ version("4.43.1", sha256="e5581d28bae2bcdf70501dfd251233c592eb3e39a210956ee74965b784435d63")
+ version("4.41.1", sha256="25d61e72887f57510f88d1a30d515c7e2d79e7c6dce5c96aea7c069fcbc089e7")
+ version("4.40.7", sha256="c38024d40ee37d26caba1824965d9ea1d65468f48b2bacd45647ff4f547fa59f")
+ version("4.35.2", sha256="8b17d710c56f764e9beff06d7a7b1c77d87c4ba4219ce4ce67e7ee29670f4f13")
+
+ # from go.mod
+ depends_on("go@1.21:", type="build", when="@4.40:")
+ depends_on("go@1.20:", type="build", when="@4.31:")
diff --git a/var/spack/repos/builtin/packages/yyjson/package.py b/var/spack/repos/builtin/packages/yyjson/package.py
new file mode 100644
index 0000000000..d15bd85117
--- /dev/null
+++ b/var/spack/repos/builtin/packages/yyjson/package.py
@@ -0,0 +1,23 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Yyjson(CMakePackage):
+ """The fastest JSON library in C"""
+
+ homepage = "https://ibireme.github.io/yyjson/doc/doxygen/html/"
+ url = "https://github.com/ibireme/yyjson/archive/refs/tags/0.10.0.tar.gz"
+
+ license("MIT", checked_by="pranav-sivaraman")
+
+ version("0.10.0", sha256="0d901cb2c45c5586e3f3a4245e58c2252d6b24bf4b402723f6179523d389b165")
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build") # TODO: test only dependency, but does not work
+
+ def cmake_args(self):
+ return [self.define("YYJSON_BUILD_TESTS", self.run_tests)]
diff --git a/var/spack/repos/builtin/packages/z-checker/package.py b/var/spack/repos/builtin/packages/z-checker/package.py
index fde46b0513..87c22c9547 100644
--- a/var/spack/repos/builtin/packages/z-checker/package.py
+++ b/var/spack/repos/builtin/packages/z-checker/package.py
@@ -23,6 +23,9 @@ class ZChecker(AutotoolsPackage):
version("0.6.0", sha256="b01c2c78157234a734c2f4c10a7ab82c329d3cd1a8389d597e09386fa33a3117")
version("0.5.0", sha256="ad5e68472c511b393ee1ae67d2e3072a22004001cf19a14bd99a2e322a6ce7f9")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("mpi", default=False, description="Enable mpi compilation")
depends_on("mpi", when="+mpi")
diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py
index e5aca4f12a..219fbe7b15 100644
--- a/var/spack/repos/builtin/packages/z3/package.py
+++ b/var/spack/repos/builtin/packages/z3/package.py
@@ -14,8 +14,11 @@ class Z3(CMakePackage):
homepage = "https://github.com/Z3Prover/z3/wiki"
url = "https://github.com/Z3Prover/z3/archive/z3-4.5.0.tar.gz"
+ maintainers("vmiheer")
+
license("MIT")
+ version("4.12.4", sha256="25e9b18d04ee22f1d872dfe0daaf4c39034744525214e34fedd206e25140e96e")
version("4.11.2", sha256="e3a82431b95412408a9c994466fad7252135c8ed3f719c986cd75c8c5f234c7e")
version("4.8.16", sha256="75f95e09f3f35fef746e571d5ec88a4efba27f1bc8f1a0ef1117167486ec3dc6")
version("4.8.15", sha256="2abe7f5ecb7c8023b712ffba959c55b4515f4978522a6882391de289310795ac")
@@ -25,6 +28,9 @@ class Z3(CMakePackage):
version("4.8.7", sha256="8c1c49a1eccf5d8b952dadadba3552b0eac67482b8a29eaad62aa7343a0732c3")
version("4.5.0", sha256="aeae1d239c5e06ac183be7dd853775b84698db1265cb2258e5918a28372d4a0c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("python", default=False, description="Enable python binding")
depends_on("python", type="build", when="~python")
depends_on("python", type=("build", "run"), when="+python")
@@ -50,13 +56,6 @@ class Z3(CMakePackage):
]
if spec.satisfies("+python"):
- args.append(
- self.define(
- "CMAKE_INSTALL_PYTHON_PKG_DIR",
- join_path(
- prefix.lib, "python%s" % spec["python"].version.up_to(2), "site-packages"
- ),
- )
- )
+ args.append(self.define("CMAKE_INSTALL_PYTHON_PKG_DIR", python_platlib))
return args
diff --git a/var/spack/repos/builtin/packages/zabbix/package.py b/var/spack/repos/builtin/packages/zabbix/package.py
index 0d3b389b73..a84097c1c7 100644
--- a/var/spack/repos/builtin/packages/zabbix/package.py
+++ b/var/spack/repos/builtin/packages/zabbix/package.py
@@ -11,32 +11,59 @@ class Zabbix(AutotoolsPackage):
such as networks, servers, VMs, applications and the cloud."""
homepage = "https://www.zabbix.com"
- url = "https://github.com/zabbix/zabbix/archive/5.0.3.tar.gz"
+ url = "https://github.com/zabbix/zabbix/archive/refs/tags/5.0.3.tar.gz"
- license("GPL-2.0-or-later")
+ license("AGPL-3.0-only", when="@7:", checked_by="wdconinc")
+ license("GPL-2.0-or-later", when="@:6", checked_by="wdconinc")
- version("5.0.3", sha256="d579c5fa4e9065e8041396ace24d7132521ef5054ce30dfd9d151cbb7f0694ec")
- version("4.0.24", sha256="c7e4962d745277d67797d90e124555ce27d198822a7e65c55d86aee45d3e93fc")
- version("4.0.23", sha256="652143614f52411cad47db64e93bf3ba1cd547d6ca9591296223b5f0528b3b61")
+ version("7.0.4", sha256="73aa6b47bd4078587589b30f09671fb30c7743f5b57e81ea8e9bd5a7c5f221c7")
+ version("6.0.34", sha256="e60558911230d27ffad98850e414b46e318c9d41591a6ff65a255c0810cfcb8b")
+ version("5.0.44", sha256="f8ee86fd21f0f57e7fad68387271b995c1e5cc402d517cd7df5d5221fd6129fd")
+ with default_args(deprecated=True):
+ # https://nvd.nist.gov/vuln/detail/CVE-2023-32724
+ version("5.0.3", sha256="d579c5fa4e9065e8041396ace24d7132521ef5054ce30dfd9d151cbb7f0694ec")
+ # https://nvd.nist.gov/vuln/detail/CVE-2019-17382
+ version(
+ "4.0.24", sha256="c7e4962d745277d67797d90e124555ce27d198822a7e65c55d86aee45d3e93fc"
+ )
+ version(
+ "4.0.23", sha256="652143614f52411cad47db64e93bf3ba1cd547d6ca9591296223b5f0528b3b61"
+ )
+
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
depends_on("autoconf", type="build")
+ depends_on("autoconf-archive", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
- depends_on("mysql")
+ depends_on("pkgconfig", type="build")
+ depends_on("mysql-client")
+ # Older versions of mysql use openssl-1.x, causing build issues:
+ depends_on("mysql@8.0.35:", when="^[virtuals=mysql-client] mysql")
depends_on("libevent")
depends_on("pcre")
depends_on("go")
+ def autoreconf(self, spec, prefix):
+ Executable("./bootstrap.sh")()
+
def configure_args(self):
+ mysql_prefix = self.spec["mysql-client"].prefix
+ if self.spec.satisfies("^[virtuals=mysql-client] mysql"):
+ mysql_config = mysql_prefix.bin.mysql_config
+ else:
+ mysql_config = mysql_prefix.bin.mariadb_config
+
args = [
"--enable-server",
"--enable-proxy",
"--enable-agent",
"--enable-agent2",
- "--with-mysql",
- "--with-libevent=%s" % self.spec["libevent"].prefix,
- "--with-libpcre=%s" % self.spec["pcre"].prefix,
+ f"--with-mysql={mysql_config}",
+ f"--with-libevent={self.spec['libevent'].prefix}",
+ f"--with-libpcre={self.spec['pcre'].prefix}",
]
return args
diff --git a/var/spack/repos/builtin/packages/zerosum/package.py b/var/spack/repos/builtin/packages/zerosum/package.py
new file mode 100644
index 0000000000..01b16b70de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zerosum/package.py
@@ -0,0 +1,76 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Zerosum(CMakePackage):
+ """Utility for monitoring process, thread, OS and HW resources,
+ including GPU utilization.
+ """
+
+ homepage = "https://github.com/UO-OACISS/zerosum"
+ url = "https://github.com/UO-OACISS/zerosum.git"
+ git = "https://github.com/UO-OACISS/zerosum"
+
+ maintainers("khuck", "wspear", "sameershende")
+
+ license("MIT", checked_by="khuck")
+
+ version("main", branch="main")
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
+ variant("perfstubs", default=True, description="Enable PerfStubs support")
+ variant("hwloc", default=True, description="Enable HWLOC support")
+ variant("mpi", default=True, description="Enable MPI support")
+ variant("cuda", default=False, description="Enable CUDA support")
+ variant("hip", default=False, description="Enable HIP support")
+ variant("sycl", default=False, description="Enable SYCL support")
+ variant("openmp", default=True, description="Enable OpenMP support")
+ # GCC has no support for OMPT, and doesn't plan to add it any time soon.
+ # For that reason, we disable OMPT support by default.
+ variant("ompt", default=False, when="%gcc", description="Enable OpenMP Tools support")
+ # All other compilers default to having the support enabled.
+ # This works because Spack allows overriding of variants:
+ # "When a variant is defined multiple times, whether in the same package
+ # file or in a subclass and a superclass, the _last_ definition is used
+ # for all attributes except for the when clauses."
+ variant("ompt", default=True, description="Enable OpenMP Tools support")
+
+ depends_on("cmake", type="build")
+ depends_on("hwloc", when="+hwloc")
+ depends_on("mpi", when="+mpi")
+ depends_on("rocm-smi-lib", when="+hip")
+ depends_on("cuda", when="+cuda")
+ depends_on("hip", when="+hip")
+ depends_on("sycl", when="+sycl")
+
+ # GCC has no support for OMPT, and doesn't plan to add it any time soon.
+ # For that reason, we let the user know this support is not allowed.
+ conflicts("+ompt", when="%gcc")
+
+ conflicts("platform=darwin", msg="zerosum runs only on Linux.")
+ conflicts("platform=windows", msg="zerosum runs only on Linux.")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("ZeroSum_WITH_PerfStubs", "perfstubs"),
+ self.define_from_variant("ZeroSum_WITH_HWLOC", "hwloc"),
+ self.define_from_variant("ZeroSum_WITH_MPI", "mpi"),
+ self.define_from_variant("ZeroSum_WITH_CUDA", "cuda"),
+ self.define_from_variant("ZeroSum_WITH_HIP", "hip"),
+ self.define_from_variant("ZeroSum_WITH_SYCL", "sycl"),
+ self.define_from_variant("ZeroSum_WITH_OPENMP", "openmp"),
+ self.define_from_variant("ZeroSum_WITH_OMPT", "ompt"),
+ ]
+
+ if "+cuda" in self.spec:
+ args.append(self.define("CUDAToolkit_ROOT", self.spec["cuda"].prefix))
+ if "+hip" in self.spec:
+ args.append(self.define("ROCM_ROOT}", self.spec["hip"].prefix))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py
index 805c4dcafd..00c671ddc9 100644
--- a/var/spack/repos/builtin/packages/zfp/package.py
+++ b/var/spack/repos/builtin/packages/zfp/package.py
@@ -43,6 +43,10 @@ class Zfp(CMakePackage, CudaPackage):
url="https://github.com/LLNL/zfp/archive/0.5.1/zfp-0.5.1.tar.gz",
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
# Dependencies
depends_on("cmake@3.9.0:", type="build")
depends_on("cuda@7:", type=("build", "test", "run"), when="+cuda")
diff --git a/var/spack/repos/builtin/packages/zfs/package.py b/var/spack/repos/builtin/packages/zfs/package.py
index fb31c68811..b4197c639a 100644
--- a/var/spack/repos/builtin/packages/zfs/package.py
+++ b/var/spack/repos/builtin/packages/zfs/package.py
@@ -22,6 +22,8 @@ class Zfs(AutotoolsPackage):
version("0.8.1", sha256="0af79fde44b7b8ecb94d5166ce2e4fff7409c20ed874c2d759db92909e6c2799")
version("0.8.0", sha256="0fd92e87f4b9df9686f18e2ac707c16b2eeaf00f682d41c20ea519f3a0fe4705")
+ depends_on("c", type="build") # generated
+
depends_on("uuid")
depends_on("libtirpc")
depends_on("util-linux")
diff --git a/var/spack/repos/builtin/packages/zig/package.py b/var/spack/repos/builtin/packages/zig/package.py
index cfeda3ac65..aea0a86818 100644
--- a/var/spack/repos/builtin/packages/zig/package.py
+++ b/var/spack/repos/builtin/packages/zig/package.py
@@ -17,11 +17,13 @@ class Zig(CMakePackage):
license("MIT")
+ version("0.13.0", tag="0.13.0", commit="cf90dfd3098bef5b3c22d5ab026173b3c357f2dd")
+ version("0.12.0", tag="0.12.0", commit="a685ab1499d6560c523f0dbce2890dc140671e43")
version("0.11.0", tag="0.11.0", commit="67709b638224ac03820226c6744d8b6ead59184c")
version("0.10.1", tag="0.10.1", commit="b57081f039bd3f8f82210e8896e336e3c3a6869b")
- version(
- "0.9.1", tag="0.9.1", commit="6d44a6222d6eba600deb7f16c124bfa30628fb60", deprecated=True
- )
+
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
variant(
"build_type",
@@ -31,9 +33,10 @@ class Zig(CMakePackage):
)
depends_on("llvm targets=all")
- depends_on("llvm@13", when="@0.9.1")
depends_on("llvm@15", when="@0.10.1")
depends_on("llvm@16", when="@0.11.0")
+ depends_on("llvm@17", when="@0.12.0")
+ depends_on("llvm@18", when="@0.13.0")
depends_on("git", type="build")
depends_on("ccache")
diff --git a/var/spack/repos/builtin/packages/zip/11-typo-it-is-ambiguities-not-amgibuities.patch b/var/spack/repos/builtin/packages/zip/11-typo-it-is-ambiguities-not-amgibuities.patch
new file mode 100644
index 0000000000..aa61ba5fc5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zip/11-typo-it-is-ambiguities-not-amgibuities.patch
@@ -0,0 +1,26 @@
+From: Santiago Vila <sanvila@debian.org>
+Subject: manpage typo: amgibuities -> ambiguities
+X-Debian-version: 3.0-12
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -297,7 +297,7 @@
+ If Zip64 support for large files and archives is enabled and
+ \fIzip\fR is used as a filter, \fIzip\fR creates a Zip64 archive
+ that requires a PKZIP 4.5 or later compatible unzip to read it. This is
+-to avoid amgibuities in the zip file structure as defined in the current
++to avoid ambiguities in the zip file structure as defined in the current
+ zip standard (PKWARE AppNote) where the decision to use Zip64 needs to
+ be made before data is written for the entry, but for a stream the size
+ of the data is not known at that point. If the data is known to be smaller
+--- a/zip.txt
++++ b/zip.txt
+@@ -184,7 +184,7 @@
+
+ If Zip64 support for large files and archives is enabled and zip is
+ used as a filter, zip creates a Zip64 archive that requires a PKZIP 4.5
+- or later compatible unzip to read it. This is to avoid amgibuities in
++ or later compatible unzip to read it. This is to avoid ambiguities in
+ the zip file structure as defined in the current zip standard (PKWARE
+ AppNote) where the decision to use Zip64 needs to be made before data
+ is written for the entry, but for a stream the size of the data is not
diff --git a/var/spack/repos/builtin/packages/zip/12-gcc14-no-implicit-declarations-fix.patch b/var/spack/repos/builtin/packages/zip/12-gcc14-no-implicit-declarations-fix.patch
new file mode 100644
index 0000000000..2f2f7c164b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zip/12-gcc14-no-implicit-declarations-fix.patch
@@ -0,0 +1,71 @@
+diff --git a/unix/configure b/unix/configure
+index 6a3d1d9..148a6d6 100644
+--- a/unix/configure
++++ b/unix/configure
+@@ -509,17 +509,32 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+ # Check for missing functions
+ # add NO_'function_name' to flags if missing
+
+-for func in rmdir strchr strrchr rename mktemp mktime mkstemp
++for func_hdr in unistd/rmdir string/strchr string/strrchr stdio/renaae \
++ stdlib/mktemp time/mktime stdlib/mkstemp
+ do
+- echo Check for $func
++ hdr=${func_hdr%/*}
++ func=${func_hdr#*/}
++ echo -n Check for $func
+ echo "int main(){ $func(); return 0; }" > conftest.c
+ $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
+- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
+-done
++ if [ $? -ne 0 ] ; then
++ echo " ... in $hdr"
++ cat > conftest.c << _EOF_
++#include <$hdr.h>
++int main(){ $func(); return 0; }
++_EOF_
++ [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
++ else
++ echo
++ fi
++ done
+
+
+ echo Check for memset
+-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
++cat > conftest.c << _EOF_
++#include <string.h>
++int main(){ char k; memset(&k,0,0); return 0; }
++_EOF_
+ $CC -o conftest conftest.c >/dev/null 2>/dev/null
+ [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
+
+@@ -544,7 +559,7 @@ $CC -o conftest conftest.c >/dev/null 2>/dev/null
+ echo Check for errno declaration
+ cat > conftest.c << _EOF_
+ #include <errno.h>
+-main()
++int main()
+ {
+ errno = 0;
+ return 0;
+@@ -556,6 +571,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+
+ echo Check for directory libraries
+ cat > conftest.c << _EOF_
++#include <dirent.h>
+ int main() { return closedir(opendir(".")); }
+ _EOF_
+
+diff --git a/timezone.c b/timezone.c
+index 485ec02..325fd5a 100644
+--- a/timezone.c
++++ b/timezone.c
+@@ -39,6 +39,7 @@
+
+ #include "zip.h"
+ #include "timezone.h"
++#include <time.h>
+ #include <ctype.h>
+ #include <errno.h>
+
diff --git a/var/spack/repos/builtin/packages/zip/package.py b/var/spack/repos/builtin/packages/zip/package.py
index 354f6d624d..3e387ec029 100644
--- a/var/spack/repos/builtin/packages/zip/package.py
+++ b/var/spack/repos/builtin/packages/zip/package.py
@@ -18,6 +18,8 @@ class Zip(MakefilePackage):
version("3.0", sha256="f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369")
+ depends_on("c", type="build") # generated
+
depends_on("bzip2")
# Upstream is unmaintained, get patches from:
@@ -32,6 +34,11 @@ class Zip(MakefilePackage):
patch("08-hardening-build-fix-1.patch")
patch("09-hardening-build-fix-2.patch")
patch("10-remove-build-date.patch")
+ patch("11-typo-it-is-ambiguities-not-amgibuities.patch")
+
+ # Configure and header changes needed for comatibility with strict gcc14+
+ # these are not from the debian branch
+ patch("12-gcc14-no-implicit-declarations-fix.patch", when="%gcc@14:")
executables = ["^zip$"]
@@ -42,7 +49,7 @@ class Zip(MakefilePackage):
return match.group(1) if match else None
def url_for_version(self, version):
- return "http://downloads.sourceforge.net/infozip/zip{0}.tar.gz".format(version.joined)
+ return f"http://downloads.sourceforge.net/infozip/zip{version.joined}.tar.gz"
def build(self, spec, prefix):
make("-f", "unix/Makefile", "CC=" + spack_cc, "generic")
diff --git a/var/spack/repos/builtin/packages/zlib-ng/package.py b/var/spack/repos/builtin/packages/zlib-ng/package.py
index 0215d33662..40de58f4e0 100644
--- a/var/spack/repos/builtin/packages/zlib-ng/package.py
+++ b/var/spack/repos/builtin/packages/zlib-ng/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.build_systems import autotools, cmake
from spack.package import *
@@ -18,23 +20,25 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
license("Zlib")
+ version("2.2.1", sha256="ec6a76169d4214e2e8b737e0850ba4acb806c69eeace6240ed4481b9f5c57cdf")
+ version("2.1.7", sha256="59e68f67cbb16999842daeb517cdd86fc25b177b4affd335cd72b76ddc2a46d8")
+ version("2.1.6", sha256="a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2")
version("2.1.5", sha256="3f6576971397b379d4205ae5451ff5a68edf6c103b2f03c4188ed7075fbb5f04")
version("2.1.4", sha256="a0293475e6a44a3f6c045229fe50f69dc0eebc62a42405a51f19d46a5541e77a")
- version(
- "2.1.3",
- sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a",
- deprecated=True,
- )
- version(
- "2.1.2",
- sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33",
- deprecated=True,
- )
version("2.0.7", sha256="6c0853bb27738b811f2b4d4af095323c3d5ce36ceed6b50e5f773204fb8f7200")
version("2.0.0", sha256="86993903527d9b12fc543335c19c1d33a93797b3d4d37648b5addae83679ecd8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("compat", default=True, description="Enable compatibility API")
variant("opt", default=True, description="Enable optimizations")
+ variant("shared", default=True, description="Build shared library")
+ variant("pic", default=True, description="Enable position-independent code (PIC)")
+
+ conflicts("+shared~pic")
+
+ variant("new_strategies", default=True, description="Enable new deflate strategies")
provides("zlib-api", when="+compat")
@@ -42,30 +46,52 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
# reused.
build_system("autotools", "cmake", default="autotools")
- # rpath shenanigans, see https://github.com/zlib-ng/zlib-ng/pull/1546
- with when("@2.1.3"):
- patch("pr-1546.patch", when="platform=darwin")
- patch("pr-1542.patch") # fix sse4.2 detection
- patch("pr-1561.patch", when="build_system=autotools") # drop bash dependency
- patch("pr-1562.patch") # improve intrinsics detection
+ # fix building with NVHPC, see https://github.com/zlib-ng/zlib-ng/pull/1698
+ patch("pr-1698.patch", when="@2.1.4:2.1.6%nvhpc+opt")
with when("build_system=cmake"):
depends_on("cmake@3.5.1:", type="build")
depends_on("cmake@3.14.0:", type="build", when="@2.1.0:")
+ conflicts("%nvhpc@:20", msg="the compiler is too old and too broken")
+
@property
def libs(self):
- name = "libz" if self.spec.satisfies("+compat") else "libz-ng"
- return find_libraries(name, root=self.prefix, recursive=True, shared=True)
+ compat_name = "zlib" if sys.platform == "win32" else "libz"
+ non_compat_name = "zlib-ng" if sys.platform == "win32" else "libz-ng"
+ name = compat_name if self.spec.satisfies("+compat") else non_compat_name
+ return find_libraries(
+ name,
+ root=self.prefix,
+ recursive=True,
+ shared=self.spec.satisfies("+shared"),
+ runtime=False,
+ )
+
+ def flag_handler(self, name, flags):
+ if name == "cflags" and self.spec.satisfies("+pic build_system=autotools"):
+ flags.append(self.compiler.cc_pic_flag)
+ return (flags, None, None)
class AutotoolsBuilder(autotools.AutotoolsBuilder):
+ @run_before("configure")
+ def pretend_gcc(self):
+ # All nice things (PIC flags, symbol versioning) that happen to the compilers that are
+ # recognized as gcc (%gcc, %clang, %intel, %oneapi) we want for some other compilers too:
+ if self.spec.satisfies("%nvhpc"):
+ filter_file(r"^gcc=0$", "gcc=1", join_path(self.configure_directory, "configure"))
+
def configure_args(self):
args = []
if self.spec.satisfies("+compat"):
args.append("--zlib-compat")
if self.spec.satisfies("~opt"):
args.append("--without-optimizations")
+ if self.spec.satisfies("~shared"):
+ args.append("--static")
+ if self.spec.satisfies("~new_strategies"):
+ args.append("--without-new-strategies")
return args
@@ -74,4 +100,8 @@ class CMakeBuilder(cmake.CMakeBuilder):
return [
self.define_from_variant("ZLIB_COMPAT", "compat"),
self.define_from_variant("WITH_OPTIM", "opt"),
+ self.define("BUILD_SHARED_LIBS", self.spec.satisfies("+shared")),
+ self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
+ self.define_from_variant("WITH_NEW_STRATEGIES", "new_strategies"),
+ self.define("ZLIB_ENABLE_TESTS", self.pkg.run_tests),
]
diff --git a/var/spack/repos/builtin/packages/zlib-ng/pr-1542.patch b/var/spack/repos/builtin/packages/zlib-ng/pr-1542.patch
deleted file mode 100644
index 675c2c1a3d..0000000000
--- a/var/spack/repos/builtin/packages/zlib-ng/pr-1542.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From 8c5d5eca51d9e4cd9aa046dba8f939b3f4012256 Mon Sep 17 00:00:00 2001
-From: Hans Kristian Rosbach <hk-git@circlestorm.org>
-Date: Fri, 21 Jul 2023 13:43:15 +0200
-Subject: [PATCH 1/3] Clean up SSE4.2 support, and no longer use asm fallback
- or gcc builtin.
-
-Defines changing meaning:
-X86_SSE42 used to mean the compiler supports crc asm fallback.
-X86_SSE42_CRC_INTRIN used to mean compiler supports SSE4.2 intrinsics.
-
-X86_SSE42 now means compiler supports SSE4.2 intrinsics.
-
-This therefore also fixes the adler32_sse42 checks, since those were depending
-on SSE4.2 intrinsics but was mistakenly checking the X86_SSE42 define.
-Now the X86_SSE42 define actually means what it appears to.
----
- CMakeLists.txt | 5 +----
- arch/x86/insert_string_sse42.c | 36 +++++----------------------------
- cmake/detect-intrinsics.cmake | 23 +++------------------
- configure | 37 ++++++++--------------------------
- win32/Makefile.msc | 1 -
- 5 files changed, 17 insertions(+), 85 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 420a5c78..1e42239a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -827,15 +827,12 @@ if(WITH_OPTIM)
- endif()
- if(WITH_SSE42)
- check_sse42_intrinsics()
-- if(HAVE_SSE42CRC_INLINE_ASM OR HAVE_SSE42CRC_INTRIN)
-+ if(HAVE_SSE42_INTRIN)
- add_definitions(-DX86_SSE42)
- set(SSE42_SRCS ${ARCHDIR}/adler32_sse42.c ${ARCHDIR}/insert_string_sse42.c)
- add_feature_info(SSE42_CRC 1 "Support SSE4.2 optimized CRC hash generation, using \"${SSE42FLAG}\"")
- list(APPEND ZLIB_ARCH_SRCS ${SSE42_SRCS})
- set_property(SOURCE ${SSE42_SRCS} PROPERTY COMPILE_FLAGS "${SSE42FLAG} ${NOLTOFLAG}")
-- if(HAVE_SSE42CRC_INTRIN)
-- add_definitions(-DX86_SSE42_CRC_INTRIN)
-- endif()
- else()
- set(WITH_SSE42 OFF)
- endif()
-diff --git a/arch/x86/insert_string_sse42.c b/arch/x86/insert_string_sse42.c
-index 565d92f9..ae092a7e 100644
---- a/arch/x86/insert_string_sse42.c
-+++ b/arch/x86/insert_string_sse42.c
-@@ -5,38 +5,13 @@
- *
- */
-
-+#ifdef X86_SSE42
- #include "../../zbuild.h"
--#include <immintrin.h>
--#ifdef _MSC_VER
--# include <nmmintrin.h>
--#endif
-+#include <nmmintrin.h>
- #include "../../deflate.h"
-
--#ifdef X86_SSE42_CRC_INTRIN
--# ifdef _MSC_VER
--# define HASH_CALC(s, h, val)\
-- h = _mm_crc32_u32(h, val)
--# else
--# define HASH_CALC(s, h, val)\
-- h = __builtin_ia32_crc32si(h, val)
--# endif
--#else
--# ifdef _MSC_VER
--# define HASH_CALC(s, h, val) {\
-- __asm mov edx, h\
-- __asm mov eax, val\
-- __asm crc32 eax, edx\
-- __asm mov h, eax\
-- }
--# else
--# define HASH_CALC(s, h, val) \
-- __asm__ __volatile__ (\
-- "crc32 %1,%0\n\t"\
-- : "+r" (h)\
-- : "r" (val)\
-- );
--# endif
--#endif
-+#define HASH_CALC(s, h, val)\
-+ h = _mm_crc32_u32(h, val)
-
- #define HASH_CALC_VAR h
- #define HASH_CALC_VAR_INIT uint32_t h = 0
-@@ -45,6 +20,5 @@
- #define INSERT_STRING insert_string_sse42
- #define QUICK_INSERT_STRING quick_insert_string_sse42
-
--#ifdef X86_SSE42
--# include "../../insert_string_tpl.h"
-+#include "../../insert_string_tpl.h"
- #endif
-diff --git a/cmake/detect-intrinsics.cmake b/cmake/detect-intrinsics.cmake
-index 9cbc5908..52c54dc8 100644
---- a/cmake/detect-intrinsics.cmake
-+++ b/cmake/detect-intrinsics.cmake
-@@ -481,35 +481,18 @@ macro(check_sse42_intrinsics)
- set(SSE42FLAG "-msse4.2")
- endif()
- endif()
-- # Check whether compiler supports SSE4.2 CRC inline asm
-+ # Check whether compiler supports SSE4.2 intrinsics
- set(CMAKE_REQUIRED_FLAGS "${SSE42FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
-- "int main(void) {
-- unsigned val = 0, h = 0;
-- #if defined(_MSC_VER)
-- { __asm mov edx, h __asm mov eax, val __asm crc32 eax, edx __asm mov h, eax }
-- #else
-- __asm__ __volatile__ ( \"crc32 %1,%0\" : \"+r\" (h) : \"r\" (val) );
-- #endif
-- return (int)h;
-- }"
-- HAVE_SSE42CRC_INLINE_ASM
-- )
-- # Check whether compiler supports SSE4.2 CRC intrinsics
-- check_c_source_compile_or_run(
-- "#include <immintrin.h>
-+ "#include <nmmintrin.h>
- int main(void) {
- unsigned crc = 0;
- char c = 'c';
-- #if defined(_MSC_VER)
- crc = _mm_crc32_u32(crc, c);
-- #else
-- crc = __builtin_ia32_crc32qi(crc, c);
-- #endif
- (void)crc;
- return 0;
- }"
-- HAVE_SSE42CRC_INTRIN
-+ HAVE_SSE42_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
- endmacro()
-diff --git a/configure b/configure
-index 8714590e..6b4e7fff 100755
---- a/configure
-+++ b/configure
-@@ -1431,38 +1431,23 @@ EOF
- }
-
- check_sse42_intrinsics() {
-- # Check whether compiler supports SSE4.2 CRC inline asm
-- cat > $test.c << EOF
--int main(void) {
-- unsigned val = 0, h = 0;
-- __asm__ __volatile__ ( "crc32 %1,%0" : "+r" (h) : "r" (val) );
-- return (int) h;
--}
--EOF
-- if try ${CC} ${CFLAGS} ${sse42flag} $test.c; then
-- echo "Checking for SSE4.2 CRC inline assembly ... Yes." | tee -a configure.log
-- HAVE_SSE42CRC_INLINE_ASM=1
-- else
-- echo "Checking for SSE4.2 CRC inline assembly ... No." | tee -a configure.log
-- HAVE_SSE42CRC_INLINE_ASM=0
-- fi
--
-- # Check whether compiler supports SSE4.2 CRC intrinsics
-+ # Check whether compiler supports SSE4.2 intrinsics
- cat > $test.c << EOF
-+#include <nmmintrin.h>
- int main(void) {
- unsigned crc = 0;
- char c = 'c';
-- crc = __builtin_ia32_crc32qi(crc, c);
-+ crc = _mm_crc32_u32(crc, c);
- (void)crc;
- return 0;
- }
- EOF
- if try ${CC} ${CFLAGS} ${sse42flag} $test.c; then
-- echo "Checking for SSE4.2 CRC intrinsics ... Yes." | tee -a configure.log
-- HAVE_SSE42CRC_INTRIN=1
-+ echo "Checking for SSE4.2 intrinsics ... Yes." | tee -a configure.log
-+ HAVE_SSE42_INTRIN=1
- else
-- echo "Checking for SSE4.2 CRC intrinsics ... No." | tee -a configure.log
-- HAVE_SSE42CRC_INTRIN=0
-+ echo "Checking for SSE4.2 intrinsics ... No." | tee -a configure.log
-+ HAVE_SSE42_INTRIN=0
- fi
- }
-
-@@ -1606,15 +1591,9 @@ case "${ARCH}" in
-
- check_sse42_intrinsics
-
-- if test ${HAVE_SSE42CRC_INTRIN} -eq 1 || test ${HAVE_SSE42CRC_INLINE_ASM} -eq 1; then
-+ if test ${HAVE_SSE42_INTRIN} -eq 1; then
- CFLAGS="${CFLAGS} -DX86_SSE42"
- SFLAGS="${SFLAGS} -DX86_SSE42"
--
-- if test ${HAVE_SSE42CRC_INTRIN} -eq 1; then
-- CFLAGS="${CFLAGS} -DX86_SSE42_CRC_INTRIN"
-- SFLAGS="${SFLAGS} -DX86_SSE42_CRC_INTRIN"
-- fi
--
- ARCH_STATIC_OBJS="${ARCH_STATIC_OBJS} adler32_sse42.o insert_string_sse42.o"
- ARCH_SHARED_OBJS="${ARCH_SHARED_OBJS} adler32_sse42.lo insert_string_sse42.lo"
- fi
-diff --git a/win32/Makefile.msc b/win32/Makefile.msc
-index 9ed26f28..3035072b 100644
---- a/win32/Makefile.msc
-+++ b/win32/Makefile.msc
-@@ -31,7 +31,6 @@ WFLAGS = \
- -DX86_PCLMULQDQ_CRC \
- -DX86_SSE2 \
- -DX86_SSE42 \
-- -DX86_SSE42_CRC_INTRIN \
- -DX86_SSSE3 \
- -DX86_AVX2
-
---
-2.39.2
-
diff --git a/var/spack/repos/builtin/packages/zlib-ng/pr-1546.patch b/var/spack/repos/builtin/packages/zlib-ng/pr-1546.patch
deleted file mode 100644
index 8966cdd36b..0000000000
--- a/var/spack/repos/builtin/packages/zlib-ng/pr-1546.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From 101bc10dcef8d2cb45a51534180c7134001b07a9 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <me@harmenstoppels.nl>
-Date: Mon, 24 Jul 2023 09:37:57 +0200
-Subject: [PATCH 1/3] Relative paths CMAKE_INSTALL_*, absolute paths
- CMAKE_INSTALL_FULL_*; use @rpath/libname as install name on macOS
-
----
- CMakeLists.txt | 46 ++--------------------------------------------
- configure | 7 +------
- test/pkgcheck.sh | 2 +-
- 3 files changed, 4 insertions(+), 51 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 003e66db7..46b85bc48 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -951,36 +951,8 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
- endif()
- endif()
-
--# Refer to prefix symbolically to ease relocation by end user,
--# as Makefile-generated .pc file does.
--string(FIND "${CMAKE_INSTALL_INCLUDEDIR}" "${CMAKE_INSTALL_PREFIX}/" INCLUDEDIR_POS)
--string(FIND "${CMAKE_INSTALL_LIBDIR}" "${CMAKE_INSTALL_PREFIX}/" LIBDIR_POS)
--string(LENGTH "${CMAKE_INSTALL_PREFIX}/" INSTALL_PREFIX_LEN)
--
--if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
-- set(PC_INC_INSTALL_DIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
--elseif(INCLUDEDIR_POS EQUAL 0)
-- string(SUBSTRING "${CMAKE_INSTALL_INCLUDEDIR}" "${INSTALL_PREFIX_LEN}" "-1" INCLUDEDIR_RELATIVE)
-- set(PC_INC_INSTALL_DIR "\${prefix}/${INCLUDEDIR_RELATIVE}")
--else()
-- set(PC_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
--endif()
--
--if(APPLE)
-- option(WITH_RPATH "Enable RPATH for shared library" OFF)
--endif()
--if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
-- if(APPLE AND WITH_RPATH)
-- set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
-- else()
-- set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
-- endif()
--elseif(LIBDIR_POS EQUAL 0)
-- string(SUBSTRING "${CMAKE_INSTALL_LIBDIR}" "${INSTALL_PREFIX_LEN}" "-1" LIBDIR_RELATIVE)
-- set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${LIBDIR_RELATIVE}")
--else()
-- set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
--endif()
-+set(PC_INC_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
-+set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-
- #============================================================================
- # zlib
-@@ -1142,11 +1114,6 @@ if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
- if(NOT APPLE)
- set_target_properties(zlib PROPERTIES LINK_FLAGS
- "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib${SUFFIX}.map\"")
-- elseif(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}" OR NOT WITH_RPATH)
-- # Match configure/make's behavior (i.e. don't use @rpath on mac when using absolute path).
-- set_target_properties(zlib PROPERTIES INSTALL_NAME_DIR "@rpath/${CMAKE_INSTALL_FULL_LIBDIR}")
-- else()
-- set_target_properties(zlib PROPERTIES INSTALL_NAME_DIR "@rpath/${CMAKE_INSTALL_LIBDIR}")
- endif()
- endif()
- if(MSYS)
-@@ -1183,11 +1150,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zlib${SUFFIX}.h.in
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gzread.c.in
- ${CMAKE_CURRENT_BINARY_DIR}/gzread.c @ONLY)
-
--# Fix install directory after generating zlib.pc/zlib-ng.pc
--if (NOT IS_ABSOLUTE CMAKE_INSTALL_LIBDIR AND WITH_RPATH)
-- set(CMAKE_INSTALL_LIBDIR "/${CMAKE_INSTALL_LIBDIR}")
--endif()
--
- if (NOT ZLIB_SYMBOL_PREFIX STREQUAL "")
- add_feature_info(ZLIB_SYMBOL_PREFIX ON "Publicly exported symbols have a custom prefix")
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zlib_name_mangling${SUFFIX}.h.in
-@@ -1286,8 +1248,4 @@ endif()
-
- add_feature_info(INSTALL_UTILS INSTALL_UTILS "Copy minigzip and minideflate during install")
-
--if(APPLE)
-- add_feature_info(WITH_RPATH WITH_RPATH "Enable RPATH for shared library")
--endif()
--
- FEATURE_SUMMARY(WHAT ALL INCLUDE_QUIET_PACKAGES)
-diff --git a/configure b/configure
-index 29a64badf..6881f7af5 100755
---- a/configure
-+++ b/configure
-@@ -513,12 +513,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
- SHAREDLIBM=${LIBNAME}.$VER1$shared_ext
- SHAREDTARGET=$SHAREDLIBV
- LDSHARED=${LDSHARED-"$cc"}
-- case ${libdir} in
-- /*)
-- LDSHAREDFLAGS="-dynamiclib -install_name ${libdir}/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}" ;;
-- *)
-- LDSHAREDFLAGS="-dynamiclib -install_name @rpath/${libdir}/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}" ;;
-- esac
-+ LDSHAREDFLAGS="-dynamiclib -install_name @rpath/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}"
- if libtool -V 2>&1 | grep Apple > /dev/null; then
- AR="libtool"
- else
-diff --git a/test/pkgcheck.sh b/test/pkgcheck.sh
-index 629f98ade..6641b300a 100644
---- a/test/pkgcheck.sh
-+++ b/test/pkgcheck.sh
-@@ -81,7 +81,7 @@ Darwin)
- sysctl -n machdep.cpu.features
- sysctl -n machdep.cpu.leaf7_features
- sysctl -n machdep.cpu.extfeatures
-- CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib -DPKGCONFIG_INSTALL_DIR=/lib/pkgconfig -DWITH_RPATH=on ${CMAKE_ARGS}"
-+ CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
- CONFIGURE_ARGS="--libdir=lib ${CONFIGURE_ARGS}"
- ;;
- *)
-
-From c6fbd1459eda454402c3450c670b7e538233b8d4 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <me@harmenstoppels.nl>
-Date: Mon, 24 Jul 2023 11:37:31 +0200
-Subject: [PATCH 2/3] relocatable pc files by default, while allowing
- discouraged absolute paths for CMAKE_INSTALL_[LIB|INCLUDE]DIR
-
----
- CMakeLists.txt | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 46b85bc48..1894d10d5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -951,8 +951,19 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
- endif()
- endif()
-
--set(PC_INC_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
--set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-+# The user is allowed (but discouraged) to set absolute CMAKE_INSTALL_*DIR paths.
-+# If they do, we copy these non-relocatable paths into the pkg-config file.
-+if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
-+ set(PC_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
-+else()
-+ set(PC_INC_INSTALL_DIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
-+endif()
-+
-+if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
-+ set(PC_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
-+else()
-+ set(PC_LIB_INSTALL_DIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
-+endif()
-
- #============================================================================
- # zlib
-
-From 0bae8f7d8379e5863b7c9328f0d71a87a33ca02f Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <me@harmenstoppels.nl>
-Date: Mon, 24 Jul 2023 10:20:32 +0200
-Subject: [PATCH 3/3] Remove relative configure --lib
-
----
- test/pkgcheck.sh | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/test/pkgcheck.sh b/test/pkgcheck.sh
-index 6641b300a..94a67a191 100644
---- a/test/pkgcheck.sh
-+++ b/test/pkgcheck.sh
-@@ -81,11 +81,6 @@ Darwin)
- sysctl -n machdep.cpu.features
- sysctl -n machdep.cpu.leaf7_features
- sysctl -n machdep.cpu.extfeatures
-- CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
-- CONFIGURE_ARGS="--libdir=lib ${CONFIGURE_ARGS}"
-- ;;
--*)
-- CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
- ;;
- esac
-
diff --git a/var/spack/repos/builtin/packages/zlib-ng/pr-1561.patch b/var/spack/repos/builtin/packages/zlib-ng/pr-1561.patch
deleted file mode 100644
index f87aea684b..0000000000
--- a/var/spack/repos/builtin/packages/zlib-ng/pr-1561.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From f6fb1d350a7b8210cc9c45ed502b3cc34e4dac32 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <me@harmenstoppels.nl>
-Date: Mon, 21 Aug 2023 10:13:10 +0200
-Subject: [PATCH 2/3] PR #1561
-
----
- configure | 50 +++++++++++++++++++++++++-------------------------
- 1 file changed, 25 insertions(+), 25 deletions(-)
-
-diff --git a/configure b/configure
-index 6b4e7fff..fc78a135 100755
---- a/configure
-+++ b/configure
-@@ -1,4 +1,4 @@
--#!/usr/bin/env bash
-+#!/bin/sh
- # configure script for zlib.
- #
- # Normally configure builds both a static and a shared library.
-@@ -230,13 +230,13 @@ test=ztest$$
- # put arguments in log, also put test file in log if used in arguments
- show()
- {
-- case "$*" in
-+ case "$@" in
- *$test.c*)
- echo "=== $test.c ===" >> configure.log
- cat $test.c >> configure.log
- echo "===" >> configure.log;;
- esac
-- echo $* >> configure.log
-+ echo "$@" >> configure.log
- }
-
- # check for gcc vs. cc and set compile and link flags based on the system identified by uname
-@@ -246,7 +246,7 @@ int main() {return getchar();}
- EOF
-
- cc=${CC-${CROSS_PREFIX}gcc}
--echo -n "Checking for compiler... " | tee -a configure.log
-+printf "Checking for compiler... " | tee -a configure.log
- case "$cc" in
- *gcc*) gcc=1 ;;
- *clang*) gcc=1 ;;
-@@ -401,7 +401,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
- SFLAGS="${SFLAGS} -DNDEBUG"
- fi
- if test -z "$uname"; then
-- uname=$((uname -s || echo unknown) 2>/dev/null)
-+ uname=$( (uname -s || echo unknown) 2>/dev/null)
- fi
- case "$uname" in
- Linux* | linux* | GNU | GNU/* | solaris*)
-@@ -483,7 +483,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
- fi
- RC="${CROSS_PREFIX}windres"
- RCFLAGS="-I ${BUILDDIR}"
-- if [ "$CC" == "mingw32-gcc" ]; then
-+ if [ "$CC" = "mingw32-gcc" ]; then
- case $ARCH in
- i386 | i486 | i586 | i686) RCFLAGS="${RCFLAGS} -F pe-i386";;
- esac;
-@@ -498,7 +498,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
- HP-UX*)
- LDSHARED=${LDSHARED-"$cc"}
- LDSHAREDFLAGS="-shared"
-- case $((uname -m || echo unknown) 2>/dev/null) in
-+ case $( (uname -m || echo unknown) 2>/dev/null) in
- ia64)
- shared_ext='.so'
- SHAREDLIB='${LIBNAME}.so' ;;
-@@ -539,14 +539,14 @@ else
- gcc=0
- echo "$CC" | tee -a configure.log
- if test -z "$uname"; then
-- uname=$((uname -sr || echo unknown) 2>/dev/null)
-+ uname=$( (uname -sr || echo unknown) 2>/dev/null)
- fi
- case "$uname" in
- HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"ld"}
- LDSHAREDFLAGS="-b"
-- case $((uname -m || echo unknown) 2>/dev/null) in
-+ case $( (uname -m || echo unknown) 2>/dev/null) in
- ia64)
- shared_ext='.so'
- SHAREDLIB='${LIBNAME}.so' ;;
-@@ -591,15 +591,15 @@ EOF
- if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- try()
- {
-- show $*
-- test "$(\( $* \) 2>&1 | tee -a configure.log)" = ""
-+ show "$@"
-+ test "$( ("$@") 2>&1 | tee -a configure.log)" = ""
- }
- echo - using any output from compiler to indicate an error >> configure.log
- else
- try()
- {
-- show $*
-- ( $* ) >> configure.log 2>&1
-+ show "$@"
-+ ( "$@" ) >> configure.log 2>&1
- ret=$?
- if test $ret -ne 0; then
- echo "(exit code $ret)" >> configure.log
-@@ -627,7 +627,7 @@ extern int getchar();
- int hello() {return getchar();}
- EOF
- if test $shared -eq 1; then
-- echo -n "Checking for shared library support... " | tee -a configure.log
-+ printf "Checking for shared library support... " | tee -a configure.log
- # we must test in two steps (cc then ld), required at least on SunOS 4.x
- if try $CC -w -c $SFLAGS $test.c &&
- try $LDSHARED $LDSHAREDFLAGS $LDFLAGS -o $test$shared_ext $test.o $LDSHAREDLIBC; then
-@@ -784,7 +784,7 @@ fi
- # Rename @ZLIB_SYMBOL_PREFIX@ to $symbol_prefix in gzread.c, zlib.h and zlib_name_mangling.h
- sed < $SRCDIR/gzread.c.in "s/@ZLIB_SYMBOL_PREFIX@/$symbol_prefix/g" > gzread.c
- sed < $SRCDIR/zlib${SUFFIX}.h.in "s/@ZLIB_SYMBOL_PREFIX@/$symbol_prefix/g" > zlib${SUFFIX}.h
--if [[ ! -z $symbol_prefix ]]; then
-+if [ ! -z "$symbol_prefix" ]; then
- sed < $SRCDIR/zlib_name_mangling${SUFFIX}.h.in "s/@ZLIB_SYMBOL_PREFIX@/$symbol_prefix/g" > zlib_name_mangling${SUFFIX}.h
- else
- # symbol_prefix is not set, copy the empty mangling header
-@@ -814,7 +814,7 @@ fi
- echo >> configure.log
-
- # check for ptrdiff_t and save result in zconf.h
--echo -n "Checking for ptrdiff_t... " | tee -a configure.log
-+printf "Checking for ptrdiff_t... " | tee -a configure.log
- cat > $test.c <<EOF
- #include <stddef.h>
- int fun(ptrdiff_t *a) { (void)a; return 0; }
-@@ -826,7 +826,7 @@ else
- sed < zconf${SUFFIX}.h "/^#ifdef NEED_PTRDIFF_T.* may be/s/def NEED_PTRDIFF_T\(.*\) may be/ 1\1 was/" > zconf${SUFFIX}.temp.h
- mv zconf${SUFFIX}.temp.h zconf${SUFFIX}.h
-
-- echo -n "Checking for sizeof(void *)... " | tee -a configure.log
-+ printf "Checking for sizeof(void *)... " | tee -a configure.log
- cat > $test.c <<EOF
- #include <stdint.h>
- #define COMPILE_TIME_ASSERT(pred) struct s { int x: (pred) ? 1 : -1; }
-@@ -864,7 +864,7 @@ if test $compat -eq 1; then
- esac
- fi
-
--if [[ ! -z $DEFFILE ]]; then
-+if [ ! -z "$DEFFILE" ]; then
- mkdir -p win32
- sed < $SRCDIR/$DEFFILE.in "s/@ZLIB_SYMBOL_PREFIX@/$symbol_prefix/g" > $DEFFILE
- fi
-@@ -1476,14 +1476,14 @@ EOF
-
- check_vgfma_intrinsics() {
- # Check whether "VECTOR GALOIS FIELD MULTIPLY SUM AND ACCUMULATE" intrinsic is available
-- echo -n "Checking for -mzarch... " | tee -a configure.log
-+ printf "Checking for -mzarch... " | tee -a configure.log
- if try $CC -x c -c /dev/null -o /dev/null -mzarch; then
- echo Yes. | tee -a configure.log
- vgfmaflag="${vgfmaflag} -mzarch"
- else
- echo No. | tee -a configure.log
- fi
-- echo -n "Checking for -fzvector... " | tee -a configure.log
-+ printf "Checking for -fzvector... " | tee -a configure.log
- if try $CC -x c -c /dev/null -o /dev/null -fzvector; then
- echo Yes. | tee -a configure.log
- vgfmaflag="${vgfmaflag} -fzvector"
-@@ -1500,7 +1500,7 @@ int main(void) {
- return c[0];
- }
- EOF
-- echo -n "Checking for VGFMA support... " | tee -a configure.log
-+ printf "Checking for VGFMA support... " | tee -a configure.log
- if try $CC -c $CFLAGS $vgfmaflag $test.c; then
- HAVE_VGFMA_INTRIN=1
- echo "Yes." | tee -a configure.log
-@@ -2156,11 +2156,11 @@ for file in $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/
- # Check that the include file exists in the current dir,
- # otherwise it may be one of the system include header.
- if test -e $SRCDIR/$i; then
-- echo -n " \$(SRCDIR)/$i"
-+ printf " \$(SRCDIR)/$i"
- fi
- # We also need to check whether the include file is in the ARCHDIR.
- if test -e $SRCDIR/$ARCHDIR/$i; then
-- echo -n " \$(SRCDIR)/$ARCHDIR/$i"
-+ printf " \$(SRCDIR)/$ARCHDIR/$i"
- fi
- done)
- obj=$(basename $(echo $file | sed -e 's/\.c/\.o/g' -e 's#^\./##g'))
-@@ -2233,11 +2233,11 @@ for file in $SRCDIR/$ARCHDIR/*.c; do
- # Check that the include file exists in the current dir,
- # otherwise it may be one of the system include header.
- if test -e $SRCDIR/$i; then
-- echo -n " \$(SRCTOP)/$i"
-+ printf " \$(SRCTOP)/$i"
- fi
- # We also need to check whether the include file is in the ARCHDIR.
- if test -e $SRCDIR/$ARCHDIR/$i; then
-- echo -n " \$(SRCDIR)/$i"
-+ printf " \$(SRCDIR)/$i"
- fi
- done)
- obj=$(basename $(echo $file | sed -e 's/\.c/\.o/g' -e 's#^\./##g'))
---
-2.39.2
-
diff --git a/var/spack/repos/builtin/packages/zlib-ng/pr-1562.patch b/var/spack/repos/builtin/packages/zlib-ng/pr-1562.patch
deleted file mode 100644
index 70806e900c..0000000000
--- a/var/spack/repos/builtin/packages/zlib-ng/pr-1562.patch
+++ /dev/null
@@ -1,432 +0,0 @@
-From 13df84c54aaf06cc7aeb1813ef60b17591d29ea3 Mon Sep 17 00:00:00 2001
-From: Harmen Stoppels <me@harmenstoppels.nl>
-Date: Mon, 21 Aug 2023 11:10:29 +0200
-Subject: [PATCH 3/3] PR #1562
-
----
- cmake/detect-intrinsics.cmake | 118 ++++++++++++----------------------
- configure | 115 ++++++++++-----------------------
- 2 files changed, 73 insertions(+), 160 deletions(-)
-
-diff --git a/cmake/detect-intrinsics.cmake b/cmake/detect-intrinsics.cmake
-index 52c54dc8..d476093f 100644
---- a/cmake/detect-intrinsics.cmake
-+++ b/cmake/detect-intrinsics.cmake
-@@ -62,28 +62,19 @@ macro(check_avx512_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${AVX512FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m512i x = _mm512_set1_epi8(2);
-- const __m512i y = _mm512_set_epi32(0x1020304, 0x5060708, 0x90a0b0c, 0xd0e0f10,
-- 0x11121314, 0x15161718, 0x191a1b1c, 0x1d1e1f20,
-- 0x21222324, 0x25262728, 0x292a2b2c, 0x2d2e2f30,
-- 0x31323334, 0x35363738, 0x393a3b3c, 0x3d3e3f40);
-- x = _mm512_sub_epi8(x, y);
-- (void)x;
-- return 0;
-- }"
-+ __m512i f(__m512i y) {
-+ __m512i x = _mm512_set1_epi8(2);
-+ return _mm512_sub_epi8(x, y);
-+ }
-+ int main(void) { return 0; }"
- HAVE_AVX512_INTRIN
- )
-
- # Evidently both GCC and clang were late to implementing these
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __mmask16 a = 0xFF;
-- a = _knot_mask16(a);
-- (void)a;
-- return 0;
-- }"
-+ __mmask16 f(__mmask16 x) { return _knot_mask16(x); }
-+ int main(void) { return 0; }"
- HAVE_MASK_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -117,17 +108,11 @@ macro(check_avx512vnni_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${AVX512VNNIFLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m512i x = _mm512_set1_epi8(2);
-- const __m512i y = _mm512_set_epi8(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
-- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
-- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
-- 56, 57, 58, 59, 60, 61, 62, 63, 64);
-+ __m512i f(__m512i x, __m512i y) {
- __m512i z = _mm512_setzero_epi32();
-- z = _mm512_dpbusd_epi32(z, x, y);
-- (void)z;
-- return 0;
-- }"
-+ return _mm512_dpbusd_epi32(z, x, y);
-+ }
-+ int main(void) { return 0; }"
- HAVE_AVX512VNNI_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -151,13 +136,11 @@ macro(check_avx2_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${AVX2FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m256i x = _mm256_set1_epi16(2);
-+ __m256i f(__m256i x) {
- const __m256i y = _mm256_set1_epi16(1);
-- x = _mm256_subs_epu16(x, y);
-- (void)x;
-- return 0;
-- }"
-+ return _mm256_subs_epu16(x, y);
-+ }
-+ int main(void) { return 0; }"
- HAVE_AVX2_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -204,12 +187,8 @@ macro(check_neon_ld4_intrinsics)
- #else
- # include <arm_neon.h>
- #endif
-- int main(void) {
-- int stack_var[16];
-- int32x4x4_t v = vld1q_s32_x4(stack_var);
-- (void)v;
-- return 0;
-- }"
-+ int32x4x4_t f(int var[16]) { return vld1q_s32_x4(var); }
-+ int main(void) { return 0; }"
- NEON_HAS_LD4)
- set(CMAKE_REQUIRED_FLAGS)
- endmacro()
-@@ -226,13 +205,9 @@ macro(check_pclmulqdq_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${PCLMULFLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m128i a = _mm_setzero_si128();
-- __m128i b = _mm_setzero_si128();
-- __m128i c = _mm_clmulepi64_si128(a, b, 0x10);
-- (void)c;
-- return 0;
-- }"
-+ #include <wmmintrin.h>
-+ __m128i f(__m128i a, __m128i b) { return _mm_clmulepi64_si128(a, b, 0x10); }
-+ int main(void) { return 0; }"
- HAVE_PCLMULQDQ_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -252,13 +227,12 @@ macro(check_vpclmulqdq_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${VPCLMULFLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m512i a = _mm512_setzero_si512();
-+ #include <wmmintrin.h>
-+ __m512i f(__m512i a) {
- __m512i b = _mm512_setzero_si512();
-- __m512i c = _mm512_clmulepi64_epi128(a, b, 0x10);
-- (void)c;
-- return 0;
-- }"
-+ return _mm512_clmulepi64_epi128(a, b, 0x10);
-+ }
-+ int main(void) { return 0; }"
- HAVE_VPCLMULQDQ_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -431,11 +405,8 @@ macro(check_sse2_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${SSE2FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m128i zero = _mm_setzero_si128();
-- (void)zero;
-- return 0;
-- }"
-+ __m128i f(__m128i x, __m128i y) { return _mm_sad_epu8(x, y); }
-+ int main(void) { return 0; }"
- HAVE_SSE2_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -457,14 +428,11 @@ macro(check_ssse3_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${SSSE3FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <immintrin.h>
-- int main(void) {
-- __m128i u, v, w;
-- u = _mm_set1_epi32(1);
-- v = _mm_set1_epi32(2);
-- w = _mm_hadd_epi32(u, v);
-- (void)w;
-- return 0;
-- }"
-+ __m128i f(__m128i u) {
-+ __m128i v = _mm_set1_epi32(1);
-+ return _mm_hadd_epi32(u, v);
-+ }
-+ int main(void) { return 0; }"
- HAVE_SSSE3_INTRIN
- )
- endmacro()
-@@ -485,13 +453,8 @@ macro(check_sse42_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${SSE42FLAG} ${NATIVEFLAG}")
- check_c_source_compile_or_run(
- "#include <nmmintrin.h>
-- int main(void) {
-- unsigned crc = 0;
-- char c = 'c';
-- crc = _mm_crc32_u32(crc, c);
-- (void)crc;
-- return 0;
-- }"
-+ unsigned int f(unsigned int a, unsigned int b) { return _mm_crc32_u32(a, b); }
-+ int main(void) { return 0; }"
- HAVE_SSE42_INTRIN
- )
- set(CMAKE_REQUIRED_FLAGS)
-@@ -529,13 +492,12 @@ macro(check_xsave_intrinsics)
- set(CMAKE_REQUIRED_FLAGS "${XSAVEFLAG} ${NATIVEFLAG}")
- check_c_source_compiles(
- "#ifdef _WIN32
-- # include <intrin.h>
-- #else
-- # include <x86gprintrin.h>
-- #endif
-- int main(void) {
-- return _xgetbv(0);
-- }"
-+ # include <intrin.h>
-+ #else
-+ # include <x86gprintrin.h>
-+ #endif
-+ unsigned int f(unsigned int a) { return _xgetbv(a); }
-+ int main(void) { return 0; }"
- HAVE_XSAVE_INTRIN FAIL_REGEX "not supported")
- set(CMAKE_REQUIRED_FLAGS)
- endmacro()
-diff --git a/configure b/configure
-index fc78a135..e5a1965f 100755
---- a/configure
-+++ b/configure
-@@ -1023,12 +1023,8 @@ fi
-
- # Check for __builtin_ctz() support in compiler
- cat > $test.c << EOF
--int main(void) {
-- unsigned int zero = 0;
-- long test = __builtin_ctz(zero);
-- (void)test;
-- return 0;
--}
-+long f(unsigned int x) { return __builtin_ctz(x); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} $test.c $LDSHAREDLIBC; then
- echo "Checking for __builtin_ctz ... Yes." | tee -a configure.log
-@@ -1040,12 +1036,8 @@ fi
-
- # Check for __builtin_ctzll() support in compiler
- cat > $test.c << EOF
--int main(void) {
-- unsigned long long zero = 0;
-- long test = __builtin_ctzll(zero);
-- (void)test;
-- return 0;
--}
-+long f(unsigned long long x) { return __builtin_ctzll(x); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} $test.c $LDSHAREDLIBC; then
- echo "Checking for __builtin_ctzll ... Yes." | tee -a configure.log
-@@ -1059,13 +1051,11 @@ check_avx2_intrinsics() {
- # Check whether compiler supports AVX2 intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void) {
-- __m256i x = _mm256_set1_epi16(2);
-+__m256i f(__m256i x) {
- const __m256i y = _mm256_set1_epi16(1);
-- x = _mm256_subs_epu16(x, y);
-- (void)x;
-- return 0;
-+ return _mm256_subs_epu16(x, y);
- }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${avx2flag} $test.c; then
- echo "Checking for AVX2 intrinsics ... Yes." | tee -a configure.log
-@@ -1080,16 +1070,11 @@ check_avx512_intrinsics() {
- # Check whether compiler supports AVX512 intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void) {
-- __m512i x = _mm512_set1_epi8(2);
-- const __m512i y = _mm512_set_epi32(0x1020304, 0x5060708, 0x90a0b0c, 0xd0e0f10,
-- 0x11121314, 0x15161718, 0x191a1b1c, 0x1d1e1f20,
-- 0x21222324, 0x25262728, 0x292a2b2c, 0x2d2e2f30,
-- 0x31323334, 0x35363738, 0x393a3b3c, 0x3d3e3f40);
-- x = _mm512_sub_epi8(x, y);
-- (void)x;
-- return 0;
-+__m512i f(__m512i y) {
-+ __m512i x = _mm512_set1_epi8(2);
-+ return _mm512_sub_epi8(x, y);
- }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${avx512flag} $test.c; then
- echo "Checking for AVX512 intrinsics ... Yes." | tee -a configure.log
-@@ -1133,17 +1118,11 @@ check_avx512vnni_intrinsics() {
- # Check whether compiler supports AVX512-VNNI intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void) {
-- __m512i x = _mm512_set1_epi8(2);
-- const __m512i y = _mm512_set_epi8(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
-- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
-- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
-- 56, 57, 58, 59, 60, 61, 62, 63, 64);
-+__m512i f(__m512i x, __m512i y) {
- __m512i z = _mm512_setzero_epi32();
-- z = _mm512_dpbusd_epi32(z, x, y);
-- (void)z;
-- return 0;
-+ return _mm512_dpbusd_epi32(z, x, y);
- }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${avx512vnniflag} $test.c; then
- echo "Checking for AVX512VNNI intrinsics ... Yes." | tee -a configure.log
-@@ -1158,12 +1137,8 @@ check_mask_intrinsics() {
- # Check whether compiler supports AVX512 k-mask intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void) {
-- __mmask16 a = 0xFF;
-- a = _knot_mask16(a);
-- (void)a;
-- return 0;
--}
-+__mmask16 f(__mmask16 x) { return _knot_mask16(x); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${avx512flag} $test.c; then
- echo "Checking for AVX512 k-mask intrinsics ... Yes." | tee -a configure.log
-@@ -1230,12 +1205,8 @@ check_neon_ld4_intrinsics() {
- #else
- # include <arm_neon.h>
- #endif
--int main(void) {
-- int stack_var[16];
-- int32x4x4_t v = vld1q_s32_x4(stack_var);
-- (void)v;
-- return 0;
--}
-+int32x4x4_t f(int var[16]) { return vld1q_s32_x4(var); }
-+int main(void) { return 0; }
- EOF
- if try $CC -c $CFLAGS $neonflag $test.c; then
- NEON_HAS_LD4=1
-@@ -1251,13 +1222,8 @@ check_pclmulqdq_intrinsics() {
- cat > $test.c << EOF
- #include <immintrin.h>
- #include <wmmintrin.h>
--int main(void) {
-- __m128i a = _mm_setzero_si128();
-- __m128i b = _mm_setzero_si128();
-- __m128i c = _mm_clmulepi64_si128(a, b, 0x10);
-- (void)c;
-- return 0;
--}
-+__m128i f(__m128i a, __m128i b) { return _mm_clmulepi64_si128(a, b, 0x10); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${pclmulflag} $test.c; then
- echo "Checking for PCLMULQDQ intrinsics ... Yes." | tee -a configure.log
-@@ -1273,13 +1239,11 @@ check_vpclmulqdq_intrinsics() {
- cat > $test.c << EOF
- #include <immintrin.h>
- #include <wmmintrin.h>
--int main(void) {
-- __m512i a = _mm512_setzero_si512();
-+__m512i f(__m512i a) {
- __m512i b = _mm512_setzero_si512();
-- __m512i c = _mm512_clmulepi64_epi128(a, b, 0x10);
-- (void)c;
-- return 0;
-+ return _mm512_clmulepi64_epi128(a, b, 0x10);
- }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${vpclmulflag} $test.c; then
- echo "Checking for VPCLMULQDQ intrinsics ... Yes." | tee -a configure.log
-@@ -1298,9 +1262,8 @@ check_xsave_intrinsics() {
- #else
- # include <x86gprintrin.h>
- #endif
--int main(void) {
-- return _xgetbv(0);
--}
-+unsigned int f(unsigned int a) { return _xgetbv(a); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${xsaveflag} $test.c; then
- echo "Checking for XSAVE intrinsics ... Yes." | tee -a configure.log
-@@ -1415,11 +1378,8 @@ check_sse2_intrinsics() {
- # Check whether compiler supports SSE2 intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void) {
-- __m128i zero = _mm_setzero_si128();
-- (void)zero;
-- return 0;
--}
-+__m128i f(__m128i x, __m128i y) { return _mm_sad_epu8(x, y); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${sse2flag} $test.c; then
- echo "Checking for SSE2 intrinsics ... Yes." | tee -a configure.log
-@@ -1434,13 +1394,8 @@ check_sse42_intrinsics() {
- # Check whether compiler supports SSE4.2 intrinsics
- cat > $test.c << EOF
- #include <nmmintrin.h>
--int main(void) {
-- unsigned crc = 0;
-- char c = 'c';
-- crc = _mm_crc32_u32(crc, c);
-- (void)crc;
-- return 0;
--}
-+unsigned int f(unsigned int a, unsigned int b) { return _mm_crc32_u32(a, b); }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${sse42flag} $test.c; then
- echo "Checking for SSE4.2 intrinsics ... Yes." | tee -a configure.log
-@@ -1455,15 +1410,11 @@ check_ssse3_intrinsics() {
- # Check whether compiler supports SSSE3 intrinsics
- cat > $test.c << EOF
- #include <immintrin.h>
--int main(void)
--{
-- __m128i u, v, w;
-- u = _mm_set1_epi32(1);
-- v = _mm_set1_epi32(2);
-- w = _mm_hadd_epi32(u, v);
-- (void)w;
-- return 0;
-+__m128i f(__m128i u) {
-+ __m128i v = _mm_set1_epi32(1);
-+ return _mm_hadd_epi32(u, v);
- }
-+int main(void) { return 0; }
- EOF
- if try ${CC} ${CFLAGS} ${ssse3flag} $test.c; then
- echo "Checking for SSSE3 intrinsics ... Yes." | tee -a configure.log
---
-2.39.2
-
diff --git a/var/spack/repos/builtin/packages/zlib-ng/pr-1698.patch b/var/spack/repos/builtin/packages/zlib-ng/pr-1698.patch
new file mode 100644
index 0000000000..7bea02d0ca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zlib-ng/pr-1698.patch
@@ -0,0 +1,31 @@
+From fb504432aae51c45397f3e563c659c11d68a10e2 Mon Sep 17 00:00:00 2001
+From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
+Date: Tue, 12 Mar 2024 15:46:52 +0100
+Subject: [PATCH] Fix building with NVHPC
+
+---
+ arch/x86/x86_intrins.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/x86_intrins.h b/arch/x86/x86_intrins.h
+index 52e1085d66..0e596d18a1 100644
+--- a/arch/x86/x86_intrins.h
++++ b/arch/x86/x86_intrins.h
+@@ -7,7 +7,7 @@
+ #ifdef __AVX2__
+ #include <immintrin.h>
+
+-#if (!defined(__clang__) && defined(__GNUC__) && __GNUC__ < 10) \
++#if (!defined(__clang__) && !defined(__NVCOMPILER) && defined(__GNUC__) && __GNUC__ < 10) \
+ || (defined(__apple_build_version__) && __apple_build_version__ < 9020039)
+ static inline __m256i _mm256_zextsi128_si256(__m128i a) {
+ __m128i r;
+@@ -29,7 +29,7 @@ static inline __m512i _mm512_zextsi128_si512(__m128i a) {
+ /* GCC <9 is missing some AVX512 intrinsics.
+ */
+ #ifdef __AVX512F__
+-#if (!defined(__clang__) && defined(__GNUC__) && __GNUC__ < 9)
++#if (!defined(__clang__) && !defined(__NVCOMPILER) && defined(__GNUC__) && __GNUC__ < 9)
+ #include <immintrin.h>
+
+ #define PACK(c0, c1, c2, c3) (((int)(unsigned char)(c0) << 24) | ((int)(unsigned char)(c1) << 16) | \
diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py
index d17db27bef..c579a83813 100644
--- a/var/spack/repos/builtin/packages/zlib/package.py
+++ b/var/spack/repos/builtin/packages/zlib/package.py
@@ -8,6 +8,7 @@
# The AutotoolsPackage causes zlib to fail to build with PGI
import glob
import os
+import re
import spack.build_systems.generic
import spack.build_systems.makefile
@@ -24,6 +25,10 @@ class Zlib(MakefilePackage, Package):
url = "http://zlib.net/fossils/zlib-1.2.11.tar.gz"
git = "https://github.com/madler/zlib.git"
+ tags = ["core-packages"]
+ libraries = ["libz", "zlib", "zlibstatic", "zlibd", "zlibstaticd"]
+
+ version("1.3.1", sha256="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23")
version("1.3", sha256="ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e")
version("1.2.13", sha256="b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30")
version(
@@ -47,6 +52,9 @@ class Zlib(MakefilePackage, Package):
deprecated=True,
)
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
build_system("makefile", conditional("generic", when="platform=windows"), default="makefile")
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
@@ -62,6 +70,18 @@ class Zlib(MakefilePackage, Package):
license("Zlib")
+ @classmethod
+ def determine_version(cls, lib):
+ for library in cls.libraries:
+ for ext in library_extensions:
+ if ext == "dylib":
+ pattern = re.compile(rf"{library}\.(\d+\.\d+\.\d+)\.{ext}")
+ else:
+ pattern = re.compile(rf"{library}\.{ext}\.(\d+\.\d+\.\d+)")
+ match = re.search(pattern, lib)
+ if match:
+ return match.group(1)
+
@property
def libs(self):
shared = "+shared" in self.spec
@@ -95,7 +115,7 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder, SetupEnviron
# script but patch the makefile for all the aforementioned compilers, given the
# importance of the package, we try to be conservative for now and do the patching only
# for compilers that will not produce a correct shared library otherwise.
- if self.spec.compiler.name in ["nvhpc"]:
+ if self.spec.satisfies("%nvhpc"):
if "~pic" in self.spec:
# In this case, we should build the static library without PIC, therefore we
# don't append the respective compiler flag to CFLAGS in the build environment.
@@ -105,9 +125,8 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder, SetupEnviron
r"\1 {0}".format(self.pkg.compiler.cc_pic_flag),
"Makefile",
)
- if any(self.spec.satisfies("platform={0}".format(p)) for p in ["linux", "cray"]):
+ if self.spec.satisfies("platform=linux"):
# Without the following, the shared library will not have a soname entry.
- # Currently, we support linux and cray platforms only.
filter_file(
r"^(LDSHARED *= *).*$",
# Note that we should use '-Wl,` and not self.pkg.compiler.linker_arg
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index 63427a6a90..f6e3b6d746 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -28,6 +28,10 @@ class Zoltan(AutotoolsPackage):
version("3.901", sha256="030c22d9f7532d3076e40cba1f03a63b2ee961d8cc9a35149af4a3684922a910")
version("3.83", sha256="17320a9f08e47f30f6f3846a74d15bfea6f3c1b937ca93c0ab759ca02c40e56c")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+ depends_on("fortran", type="build") # generated
+
patch("notparallel.patch", when="@3.8")
variant("debug", default=False, description="Builds a debug version of the library.")
@@ -98,8 +102,6 @@ class Zoltan(AutotoolsPackage):
config_incdirs = []
# PGI runtime libraries
- if "%pgi" in spec:
- config_ldflags.append("-pgf90libs")
# NVHPC runtime libraries
if "%nvhpc" in spec:
config_ldflags.append("-fortranlibs")
diff --git a/var/spack/repos/builtin/packages/zookeeper/package.py b/var/spack/repos/builtin/packages/zookeeper/package.py
index edac1784e7..3e57b856e6 100644
--- a/var/spack/repos/builtin/packages/zookeeper/package.py
+++ b/var/spack/repos/builtin/packages/zookeeper/package.py
@@ -13,11 +13,27 @@ class Zookeeper(Package):
"""
homepage = "https://archive.apache.org"
- url = "https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz"
+ urls = [
+ "https://archive.apache.org/dist/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz",
+ "https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz",
+ ]
license("Apache-2.0")
- version("3.4.11", sha256="f6bd68a1c8f7c13ea4c2c99f13082d0d71ac464ffaf3bf7a365879ab6ad10e84")
+ version("3.8.4", sha256="284cb4675adb64794c63d95bf202d265cebddc0cda86ac86fb0ede8049de9187")
+ with default_args(deprecated=True):
+ # 3.6 is EoL since 30th of December, 2022
+ # 3.5 is EoL since 1st of June, 2022
+ version(
+ "3.4.11", sha256="f6bd68a1c8f7c13ea4c2c99f13082d0d71ac464ffaf3bf7a365879ab6ad10e84"
+ )
+
+ depends_on("java")
def install(self, spec, prefix):
install_tree(".", prefix)
+
+ def setup_run_environment(self, env):
+ env.set("ZOOBINDIR", self.prefix.bin)
+ env.set("ZOOCFGDIR", ".")
+ env.set("ZOO_LOG_DIR", ".")
diff --git a/var/spack/repos/builtin/packages/zopfli/package.py b/var/spack/repos/builtin/packages/zopfli/package.py
index b1ec085cfb..8e5931a67d 100644
--- a/var/spack/repos/builtin/packages/zopfli/package.py
+++ b/var/spack/repos/builtin/packages/zopfli/package.py
@@ -19,6 +19,9 @@ class Zopfli(CMakePackage):
version("1.0.3", sha256="e955a7739f71af37ef3349c4fa141c648e8775bceb2195be07e86f8e638814bd")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
def cmake_args(self):
args = [self.define_from_variant("ZOPFLI_BUILD_SHARED", "shared")]
diff --git a/var/spack/repos/builtin/packages/zoxide/package.py b/var/spack/repos/builtin/packages/zoxide/package.py
new file mode 100644
index 0000000000..7c25679b34
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zoxide/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Zoxide(CargoPackage):
+ """zoxide is a smarter cd command, inspired by z and autojump. It
+ remembers which directories you use most frequently, so you can
+ "jump" to them in just a few keystrokes. zoxide works on all major shells.
+ """
+
+ homepage = "https://github.com/ajeetdsouza/zoxide"
+ url = "https://github.com/ajeetdsouza/zoxide/archive/refs/tags/v0.9.4.tar.gz"
+
+ maintainers("pranav-sivaraman")
+
+ license("MIT")
+
+ version("0.9.6", sha256="e1811511a4a9caafa18b7d1505147d4328b39f6ec88b88097fe0dad59919f19c")
+ version("0.9.5", sha256="1278660e671d96c5421f0910fa7d79b9e0bb0bfacf7611ff63bf383f721d7a4f")
+ version("0.9.4", sha256="ec002bdca37917130ae34e733eb29d4baa03b130c4b11456d630a01a938e0187")
diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py
index 11ca3f8cce..5e68d30465 100644
--- a/var/spack/repos/builtin/packages/zsh/package.py
+++ b/var/spack/repos/builtin/packages/zsh/package.py
@@ -13,10 +13,12 @@ class Zsh(AutotoolsPackage):
"""
homepage = "https://www.zsh.org"
- url = "http://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz"
+ url = "https://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz"
license("custom")
+ version("5.9", sha256="9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5")
+ version("5.8.1", sha256="b6973520bace600b4779200269b1e5d79e5f505ac4952058c11ad5bbf0dd9919")
version("5.8", sha256="dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27")
version("5.7.1", sha256="7260292c2c1d483b2d50febfa5055176bd512b32a8833b116177bf5f01e77ee8")
version("5.6.2", sha256="a50bd66c0557e8eca3b8fa24e85d0de533e775d7a22df042da90488623752e9e")
@@ -24,6 +26,8 @@ class Zsh(AutotoolsPackage):
version("5.3.1", sha256="fc886cb2ade032d006da8322c09a7e92b2309177811428b121192d44832920da")
version("5.1.1", sha256="74e9453b5470b3c0970f9f93cfd603d241c3d7b1968adc0e4b3951073e8d3dec")
+ depends_on("c", type="build") # generated
+
# Testing for terminal related things causes failures in e.g. Jenkins.
# See e.g. https://www.zsh.org/mla/users/2003/msg00845.html,
# although the name of the option has evolved since then.
diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py
index cdfdff74ba..e6b97661e2 100644
--- a/var/spack/repos/builtin/packages/zstd/package.py
+++ b/var/spack/repos/builtin/packages/zstd/package.py
@@ -24,6 +24,7 @@ class Zstd(CMakePackage, MakefilePackage):
license("BSD-3-Clause OR GPL-2.0-or-later")
version("develop", branch="dev")
+ version("1.5.6", sha256="30f35f71c1203369dc979ecde0400ffea93c27391bfd2ac5a9715d2173d92ff7")
version("1.5.5", sha256="98e9c3d949d1b924e28e01eccb7deed865eefebf25c2f21c702e5cd5b63b85e1")
version("1.5.4", sha256="35ad983197f8f8eb0c963877bf8be50490a0b3df54b4edeb8399ba8a8b2f60a4")
version("1.5.2", sha256="f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e")
@@ -40,6 +41,9 @@ class Zstd(CMakePackage, MakefilePackage):
version("1.3.0", sha256="0fdba643b438b7cbce700dcc0e7b3e3da6d829088c63757a5984930e2f70b348")
version("1.1.2", sha256="980b8febb0118e22f6ed70d23b5b3e600995dbf7489c1f6d6122c1411cdda8d8")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
+
variant("programs", default=False, description="Build executables")
variant(
"libs",
@@ -55,6 +59,8 @@ class Zstd(CMakePackage, MakefilePackage):
description="Enable support for additional compression methods in programs",
)
+ depends_on("cmake@3.5:", type="build", when="build_system=cmake @1.5.6:")
+
depends_on("zlib-api", when="compression=zlib")
depends_on("lz4", when="compression=lz4")
depends_on("xz", when="compression=lzma")
@@ -63,6 +69,8 @@ class Zstd(CMakePackage, MakefilePackage):
# (last tested: nvhpc@22.3)
conflicts("+programs %nvhpc")
+ conflicts("platform=windows", when="@1.5.6")
+
build_system("cmake", "makefile", default="makefile")
diff --git a/var/spack/repos/builtin/packages/zstr/package.py b/var/spack/repos/builtin/packages/zstr/package.py
index 26131cecf4..e056d9aea9 100644
--- a/var/spack/repos/builtin/packages/zstr/package.py
+++ b/var/spack/repos/builtin/packages/zstr/package.py
@@ -24,6 +24,8 @@ class Zstr(Package):
version("1.0.1", sha256="e17e67e00ede182504b3165cebd802420770541465d4ba41df1a15bf4c2a63b7")
version("1.0.0", sha256="9f4fa8cb0d2cbba03dfe67900c48b6e75c8380d9263a0ac71d795f11e0224b96")
+ depends_on("cxx", type="build") # generated
+
depends_on("zlib-api")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/zziplib/package.py b/var/spack/repos/builtin/packages/zziplib/package.py
index 13fc3fee33..2a3b10a14d 100644
--- a/var/spack/repos/builtin/packages/zziplib/package.py
+++ b/var/spack/repos/builtin/packages/zziplib/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.build_systems.autotools
-import spack.build_systems.cmake
from spack.package import *
@@ -17,9 +16,12 @@ class Zziplib(AutotoolsPackage, CMakePackage):
homepage = "https://github.com/gdraheim/zziplib"
url = "https://github.com/gdraheim/zziplib/archive/v0.13.69.tar.gz"
+ version("0.13.78", sha256="feaeee7c34f18aa27bd3da643cc6a47d04d2c41753a59369d09102d79b9b0a31")
version("0.13.72", sha256="93ef44bf1f1ea24fc66080426a469df82fa631d13ca3b2e4abaeab89538518dc")
version("0.13.69", sha256="846246d7cdeee405d8d21e2922c6e97f55f24ecbe3b6dcf5778073a88f120544")
+ depends_on("c", type="build") # generated
+
patch("python2to3.patch", when="@:0.13.69")
# Switch to CMake from 0.13.70, first working release is 0.13.71
diff --git a/var/spack/repos/compiler_runtime.test/packages/gcc/package.py b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py
index c70ff4faff..6d8decc26b 100644
--- a/var/spack/repos/compiler_runtime.test/packages/gcc/package.py
+++ b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py
@@ -14,7 +14,7 @@ class Gcc(Package):
version("12.3.0")
@classmethod
- def runtime_constraints(cls, *, compiler, pkg):
+ def runtime_constraints(cls, *, spec, pkg):
pkg("*").depends_on(
"gcc-runtime",
when="%gcc",
@@ -22,11 +22,14 @@ class Gcc(Package):
description="If any package uses %gcc, it depends on gcc-runtime",
)
pkg("*").depends_on(
- f"gcc-runtime@{str(compiler.version)}:",
- when=f"%{str(compiler.spec)}",
+ f"gcc-runtime@{str(spec.version)}:",
+ when=f"%{str(spec)}",
type="link",
- description=f"If any package uses %{str(compiler.spec)}, "
- f"it depends on gcc-runtime@{str(compiler.version)}:",
+ description=f"If any package uses %{str(spec)}, "
+ f"it depends on gcc-runtime@{str(spec.version)}:",
)
# The version of gcc-runtime is the same as the %gcc used to "compile" it
- pkg("gcc-runtime").requires(f"@={str(compiler.version)}", when=f"%{str(compiler.spec)}")
+ pkg("gcc-runtime").requires(f"@={str(spec.version)}", when=f"%{str(spec)}")
+
+ # If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
+ pkg("*").propagate(f"%gcc@:{str(spec.version)}", when=f"%{str(spec)}")
diff --git a/var/spack/repos/compiler_runtime.test/packages/a/package.py b/var/spack/repos/compiler_runtime.test/packages/pkg-a/package.py
index 01cb6fe3cc..22ca47cf13 100644
--- a/var/spack/repos/compiler_runtime.test/packages/a/package.py
+++ b/var/spack/repos/compiler_runtime.test/packages/pkg-a/package.py
@@ -5,9 +5,9 @@
from spack.package import *
-class A(Package):
+class PkgA(Package):
homepage = "http://www.example.com"
has_code = False
version("1.0")
- depends_on("b")
+ depends_on("pkg-b")
diff --git a/var/spack/repos/compiler_runtime.test/packages/b/package.py b/var/spack/repos/compiler_runtime.test/packages/pkg-b/package.py
index e840a363a5..d4147bf47e 100644
--- a/var/spack/repos/compiler_runtime.test/packages/b/package.py
+++ b/var/spack/repos/compiler_runtime.test/packages/pkg-b/package.py
@@ -5,7 +5,7 @@
from spack.package import *
-class B(Package):
+class PkgB(Package):
homepage = "http://www.example.com"
has_code = False
diff --git a/var/spack/repos/duplicates.test/packages/python-venv b/var/spack/repos/duplicates.test/packages/python-venv
new file mode 120000
index 0000000000..a9a1ce867a
--- /dev/null
+++ b/var/spack/repos/duplicates.test/packages/python-venv
@@ -0,0 +1 @@
+../../builtin.mock/packages/python-venv \ No newline at end of file
diff --git a/var/spack/repos/flags.test/packages/t/package.py b/var/spack/repos/flags.test/packages/t/package.py
new file mode 100644
index 0000000000..359f8f4f03
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/t/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2024 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.package import *
+
+
+class T(Package):
+ version("5.0")
+
+ depends_on("u")
+ depends_on("x+activatemultiflag")
+ depends_on("y cflags='-c1 -c2'")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/packages/u/package.py b/var/spack/repos/flags.test/packages/u/package.py
new file mode 100644
index 0000000000..7839ab8191
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/u/package.py
@@ -0,0 +1,13 @@
+# Copyright 2013-2024 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.package import *
+
+
+class U(Package):
+ version("6.0")
+
+ depends_on("y cflags='-e1 -e2'")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/packages/v/package.py b/var/spack/repos/flags.test/packages/v/package.py
new file mode 100644
index 0000000000..afc8c5117c
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/v/package.py
@@ -0,0 +1,14 @@
+# Copyright 2013-2024 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.package import *
+
+
+class V(Package):
+ version("4.1")
+ version("4.0")
+
+ depends_on("y")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/packages/w/package.py b/var/spack/repos/flags.test/packages/w/package.py
new file mode 100644
index 0000000000..dbfadf6851
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/w/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2024 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.package import *
+
+
+class W(Package):
+ version("3.1")
+ version("3.0")
+
+ variant("moveflaglater", default=False)
+
+ depends_on("x +activatemultiflag")
+ depends_on('y cflags="-d0"', when="~moveflaglater")
+ depends_on('y cflags="-d3"', when="+moveflaglater")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/packages/x/package.py b/var/spack/repos/flags.test/packages/x/package.py
new file mode 100644
index 0000000000..d7c1c07630
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/x/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class X(Package):
+ version("1.1")
+ version("1.0")
+
+ variant("activatemultiflag", default=False)
+ depends_on('y cflags="-d1"', when="~activatemultiflag")
+ depends_on('y cflags="-d1 -d2"', when="+activatemultiflag")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/packages/y/package.py b/var/spack/repos/flags.test/packages/y/package.py
new file mode 100644
index 0000000000..ea736afb8a
--- /dev/null
+++ b/var/spack/repos/flags.test/packages/y/package.py
@@ -0,0 +1,12 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Y(Package):
+ version("2.1")
+ version("2.0")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/flags.test/repo.yaml b/var/spack/repos/flags.test/repo.yaml
new file mode 100644
index 0000000000..a87dc9ca96
--- /dev/null
+++ b/var/spack/repos/flags.test/repo.yaml
@@ -0,0 +1,2 @@
+repo:
+ namespace: flags.test
diff --git a/var/spack/repos/requirements.test/packages/t/package.py b/var/spack/repos/requirements.test/packages/t/package.py
new file mode 100644
index 0000000000..f0ca8563da
--- /dev/null
+++ b/var/spack/repos/requirements.test/packages/t/package.py
@@ -0,0 +1,14 @@
+# Copyright 2013-2024 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.package import *
+
+
+class T(Package):
+ version("2.1")
+ version("2.0")
+
+ depends_on("u", when="@2.1:")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/requirements.test/packages/u/package.py b/var/spack/repos/requirements.test/packages/u/package.py
new file mode 100644
index 0000000000..b220345908
--- /dev/null
+++ b/var/spack/repos/requirements.test/packages/u/package.py
@@ -0,0 +1,12 @@
+# Copyright 2013-2024 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.package import *
+
+
+class U(Package):
+ version("1.1")
+ version("1.0")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/requirements.test/packages/v/package.py b/var/spack/repos/requirements.test/packages/v/package.py
new file mode 100644
index 0000000000..426edbfb80
--- /dev/null
+++ b/var/spack/repos/requirements.test/packages/v/package.py
@@ -0,0 +1,12 @@
+# Copyright 2013-2024 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.package import *
+
+
+class V(Package):
+ version("2.1")
+ version("2.0")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/requirements.test/packages/x/package.py b/var/spack/repos/requirements.test/packages/x/package.py
new file mode 100644
index 0000000000..93771c3311
--- /dev/null
+++ b/var/spack/repos/requirements.test/packages/x/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2024 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.package import *
+
+
+class X(Package):
+ version("1.1")
+ version("1.0")
+ version("0.9")
+
+ variant("shared", default=True, description="Build shared libraries")
+
+ depends_on("y")
+ depends_on("c", type="build")
diff --git a/var/spack/repos/requirements.test/packages/y/package.py b/var/spack/repos/requirements.test/packages/y/package.py
new file mode 100644
index 0000000000..0ba70acf06
--- /dev/null
+++ b/var/spack/repos/requirements.test/packages/y/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2024 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.package import *
+
+
+class Y(Package):
+ version("2.5")
+ version("2.4")
+ version("2.3", deprecated=True)
+
+ variant("shared", default=True, description="Build shared libraries")
+
+ depends_on("c", type="build")
diff --git a/var/spack/repos/requirements.test/repo.yaml b/var/spack/repos/requirements.test/repo.yaml
new file mode 100644
index 0000000000..7be2a780ea
--- /dev/null
+++ b/var/spack/repos/requirements.test/repo.yaml
@@ -0,0 +1,2 @@
+repo:
+ namespace: requirements.test
diff --git a/var/spack/repos/tutorial/packages/mpich/package.py b/var/spack/repos/tutorial/packages/mpich/package.py
index 06138bee94..c625ecbc17 100644
--- a/var/spack/repos/tutorial/packages/mpich/package.py
+++ b/var/spack/repos/tutorial/packages/mpich/package.py
@@ -88,16 +88,10 @@ spack package at this time.""",
pass
def setup_dependent_package(self, module, dependent_spec):
- if "platform=cray" in self.spec:
- self.spec.mpicc = spack_cc
- self.spec.mpicxx = spack_cxx
- self.spec.mpifc = spack_fc
- self.spec.mpif77 = spack_f77
- else:
- self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
- self.spec.mpicxx = join_path(self.prefix.bin, "mpic++")
- self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
- self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
+ self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
+ self.spec.mpicxx = join_path(self.prefix.bin, "mpic++")
+ self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
+ self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")
self.spec.mpicxx_shared_libs = [
join_path(self.prefix.lib, "libmpicxx.{0}".format(dso_suffix)),